diff --git a/.changeset/fix-dead-props-stale-notes.md b/.changeset/fix-dead-props-stale-notes.md new file mode 100644 index 000000000..3221d550f --- /dev/null +++ b/.changeset/fix-dead-props-stale-notes.md @@ -0,0 +1,5 @@ +--- +"@tabler/preview": patch +--- + +Fixed task cards not showing their due date and removed dead props and classes such as `fluidSearch` and `text-*-lt-fg`. diff --git a/core/.build/compare-variables.ts b/core/.build/compare-variables.ts deleted file mode 100644 index 25cff52a1..000000000 --- a/core/.build/compare-variables.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { readFileSync } from 'node:fs' -import path from 'node:path' -import { fileURLToPath } from 'node:url' - -// Get __dirname in ES modules -const __filename = fileURLToPath(import.meta.url) -const __dirname = path.dirname(__filename) - -// File paths (relative to core/.build directory) -const bootstrapPath = path.join(__dirname, '../node_modules/bootstrap/scss/_variables.scss') -const tablerPath = path.join(__dirname, '../scss/_variables.scss') - -// Function to extract variable names from SCSS file -function extractVariables(filePath: string): Set { - const content = readFileSync(filePath, 'utf8') - const variables = new Set() - - // Regex to find SCSS variables - // Looks for patterns like: $variable-name: value - // Includes variables in maps and lists - const variableRegex = /\$([a-zA-Z0-9_-]+)\s*[:=]/g - - let match: RegExpExecArray | null - while ((match = variableRegex.exec(content)) !== null) { - const varName = match[1] - variables.add(varName) - } - - return variables -} - -// Main function -function compareVariables(): void { - console.log('Analyzing Bootstrap variables...') - const bootstrapVars = extractVariables(bootstrapPath) - console.log(`Found ${bootstrapVars.size} variables in Bootstrap\n`) - - console.log('Analyzing Tabler variables...') - const tablerVars = extractVariables(tablerPath) - console.log(`Found ${tablerVars.size} variables in Tabler\n`) - - // Find variables that are in Bootstrap but not in Tabler - const missingInTabler: string[] = [] - for (const varName of bootstrapVars) { - if (!tablerVars.has(varName)) { - missingInTabler.push(varName) - } - } - - // Sort alphabetically - missingInTabler.sort() - - console.log('='.repeat(60)) - console.log(`Variables in Bootstrap that are missing in Tabler: ${missingInTabler.length}`) - console.log('='.repeat(60)) - - if (missingInTabler.length === 0) { - console.log('All Bootstrap variables are present in Tabler!') - } else { - console.log('\nList of missing variables:\n') - missingInTabler.forEach((varName: string, index: number) => { - console.log(`${(index + 1).toString().padStart(4)}. $${varName}`) - }) - } - - // Optionally: show statistics - console.log('\n' + '='.repeat(60)) - console.log('Statistics:') - console.log(` Bootstrap: ${bootstrapVars.size} variables`) - console.log(` Tabler: ${tablerVars.size} variables`) - console.log(` Missing: ${missingInTabler.length} variables`) - console.log(` Coverage: ${((1 - missingInTabler.length / bootstrapVars.size) * 100).toFixed(1)}%`) - console.log('='.repeat(60)) -} - -// Run analysis -try { - compareVariables() -} catch (error) { - const errorMessage = error instanceof Error ? error.message : String(error) - console.error('Error during analysis:', errorMessage) - process.exit(1) -} diff --git a/docs/components/DocsToc.astro b/docs/components/DocsToc.astro index 582baeff1..08e96ad0a 100644 --- a/docs/components/DocsToc.astro +++ b/docs/components/DocsToc.astro @@ -24,7 +24,6 @@ interface Props { const { toc = [], editUrl, sourceUrl, markdownUrl } = Astro.props -// shared/data/illustrations.json has 125 entries. const illustrationsCount = 130 --- diff --git a/preview/pages/colors.astro b/preview/pages/colors.astro index 92657c825..2a5f01444 100644 --- a/preview/pages/colors.astro +++ b/preview/pages/colors.astro @@ -61,7 +61,7 @@ const gradientColors = [...Object.keys(site.colors), 'inverted', 'white', 'trans
- +
{color.title} diff --git a/preview/pages/emails.astro b/preview/pages/emails.astro index 300e439df..6ab7488a8 100644 --- a/preview/pages/emails.astro +++ b/preview/pages/emails.astro @@ -68,7 +68,7 @@ const emailEntries = Object.entries(emails)
diff --git a/preview/pages/lists.astro b/preview/pages/lists.astro index f1af22826..538288148 100644 --- a/preview/pages/lists.astro +++ b/preview/pages/lists.astro @@ -20,7 +20,7 @@ import DocsLink from '@ui/DocsLink.astro'
- +
diff --git a/preview/pages/navigation.astro b/preview/pages/navigation.astro index 2ab2193db..07ab6e787 100644 --- a/preview/pages/navigation.astro +++ b/preview/pages/navigation.astro @@ -25,7 +25,7 @@ import DocsLink from '@ui/DocsLink.astro'
- +
diff --git a/preview/pages/onboarding.astro b/preview/pages/onboarding.astro index 166820dae..48af0f646 100644 --- a/preview/pages/onboarding.astro +++ b/preview/pages/onboarding.astro @@ -1,5 +1,4 @@ --- -// NOTE: `current=2` passed to ProgressSteps is a no-op (reads `active`, not `current`) — only step 1 is active. import BaseLayout from '@shared/layouts/BaseLayout.astro' import Logo from '@shared/components/navbar/Logo.astro' import ProgressSteps from '@ui/ProgressSteps.astro' diff --git a/preview/pages/sign-in-illustration.astro b/preview/pages/sign-in-illustration.astro index ec0469058..cb9c5c2a9 100644 --- a/preview/pages/sign-in-illustration.astro +++ b/preview/pages/sign-in-illustration.astro @@ -3,8 +3,6 @@ import SingleLayout from '@shared/layouts/SingleLayout.astro' import Logo from '@shared/components/navbar/Logo.astro' import SignInCard from '@shared/components/cards/SignInCard.astro' import Illustration from '@ui/Illustration.astro' - -// show-header prop ignored — SignInCard renders header unconditionally. --- diff --git a/preview/pages/social-icons.astro b/preview/pages/social-icons.astro index 9c12fd09d..7ff2903c6 100644 --- a/preview/pages/social-icons.astro +++ b/preview/pages/social-icons.astro @@ -1,5 +1,4 @@ --- -// plugins: ['social'] front matter is inert — .social styles ship globally in tabler-socials.css. import DefaultLayout from '@shared/layouts/DefaultLayout.astro' import ButtonList from '@ui/ButtonList.astro' import Trending from '@ui/Trending.astro' diff --git a/shared/components/cards/UsersList.astro b/shared/components/cards/UsersList.astro index 21c921941..97ea9e7c0 100644 --- a/shared/components/cards/UsersList.astro +++ b/shared/components/cards/UsersList.astro @@ -16,8 +16,6 @@ interface Props { checkedIds?: number[] title?: string class?: string - /** Unused; only `hoverable` toggles the star column. */ - hover?: boolean } const { offset = 0, hoverable = false, checkbox, checkedIds, title = 'Last commits', class: className } = Astro.props diff --git a/shared/components/cards/charts/SocialReferrals.astro b/shared/components/cards/charts/SocialReferrals.astro index 255ed6db5..a6f35dee9 100644 --- a/shared/components/cards/charts/SocialReferrals.astro +++ b/shared/components/cards/charts/SocialReferrals.astro @@ -1,5 +1,4 @@ --- -// legend=true at call site is inert — Chart reads legend from chart data, not props. import CardTitle from '@ui/CardTitle.astro' import Chart from '@shared/components/demo/Chart.astro' import DropdownDays from '@shared/components/demo/DropdownDays.astro' diff --git a/shared/components/modals/SignatureModalContent.astro b/shared/components/modals/SignatureModalContent.astro index 8b6e5fbf6..2be6decf9 100644 --- a/shared/components/modals/SignatureModalContent.astro +++ b/shared/components/modals/SignatureModalContent.astro @@ -1,6 +1,4 @@ --- -// The `sample` flag is unused. - import CardSubtitle from '@ui/CardSubtitle.astro' import ModalClose from './ModalClose.astro' import CardTitle from '@ui/CardTitle.astro' diff --git a/shared/components/navbar/Navbar.astro b/shared/components/navbar/Navbar.astro index c9986cd6c..c04298093 100644 --- a/shared/components/navbar/Navbar.astro +++ b/shared/components/navbar/Navbar.astro @@ -29,7 +29,6 @@ interface Props { background?: string; /** inline `background:` style on the header */ backgroundColor?: string; - fluidSearch?: boolean; /** extra classes on the header */ class?: string | undefined; } diff --git a/shared/components/navbar/NavbarSearch.astro b/shared/components/navbar/NavbarSearch.astro index 96ed10707..5f2395a58 100644 --- a/shared/components/navbar/NavbarSearch.astro +++ b/shared/components/navbar/NavbarSearch.astro @@ -1,5 +1,4 @@ --- -// breakpoint param (default 'lg') is unused. // Form action is "./" for root-level pages. import InputIcon from '@ui/form/InputIcon.astro' diff --git a/shared/components/navbar/NavbarSide.astro b/shared/components/navbar/NavbarSide.astro index 0e95e7f17..b1315fd54 100644 --- a/shared/components/navbar/NavbarSide.astro +++ b/shared/components/navbar/NavbarSide.astro @@ -6,6 +6,7 @@ import NavbarSideNotifications from './NavbarSideNotifications.astro' import NavbarSideApps from './NavbarSideApps.astro' import NavbarSideLanguage from './NavbarSideLanguage.astro' import NavbarSideUser from './NavbarSideUser.astro' +import { site } from '@shared/lib/site' /** Bootstrap responsive breakpoint used for `d-{breakpoint}-flex` — $grid-breakpoints minus xs */ export type Breakpoint = 'sm' | 'md' | 'lg' | 'xl' | 'xxl' @@ -38,8 +39,6 @@ const { showLanguageSelector = false, showUser = false, } = Astro.props - -const githubSponsorsUrl = 'https://github.com/sponsors/codecalm' --- @@ -48,7 +47,7 @@ const githubSponsorsUrl = 'https://github.com/sponsors/codecalm' !condensed && (
-
) diff --git a/shared/components/parts/Tasks.astro b/shared/components/parts/Tasks.astro index 0de049e2b..b1035cf6a 100644 --- a/shared/components/parts/Tasks.astro +++ b/shared/components/parts/Tasks.astro @@ -1,6 +1,4 @@ --- -// task['due-date'] is undefined (field is due_date) — due-date branch never renders. -// Avatar offset uses task['users-offset'] (hyphenated key). import Icon from '@ui/Icon.astro' import PeopleAvatarList from '@shared/components/demo/PeopleAvatarList.astro' import CardTitle from '@ui/CardTitle.astro' @@ -54,11 +52,11 @@ const data = tasksData as unknown as { columns: Column[] }
{task.users && }
- {task['due-date'] && ( + {task.due_date && ( )} diff --git a/shared/lib/site.ts b/shared/lib/site.ts index 940bf7be5..e9ccc9123 100644 --- a/shared/lib/site.ts +++ b/shared/lib/site.ts @@ -13,7 +13,7 @@ export const site = { githubUrl: 'https://github.com/tabler/tabler', githubSponsorsUrl: 'https://github.com/sponsors/codecalm', icons: { link: 'https://tabler.io/icons' }, - emails: { price: '$29', buy_link: 'https://r.tabler.io/buy-emails', count: '' }, + emails: { price: '$29', buy_link: 'https://r.tabler.io/buy-emails' }, // Dev Google Maps API key for local development builds. googleMapsDevKey: 'AIzaSyCL-BY8-sq12m0S9H-S_yMqDmcun3A9znw', // From shared/data/icons-info.json. diff --git a/shared/ui/Badge.astro b/shared/ui/Badge.astro index f2dad649e..f2dc589f6 100644 --- a/shared/ui/Badge.astro +++ b/shared/ui/Badge.astro @@ -8,7 +8,7 @@ interface Props { text?: string color?: string size?: BadgeSize | undefined - /** -lt colour variant + text-{color}-lt-fg */ + /** -lt soft colour variant */ light?: boolean class?: string icon?: string @@ -19,7 +19,7 @@ interface Props { const { text, color, size, light, class: className, icon, iconEnd, ...rest } = Astro.props -const classes = ['badge', size && `badge-${size}`, color && `bg-${color}${light ? '-lt' : ''} text-${color}${light ? '-lt' : ''}-fg`, className] +const classes = ['badge', size && `badge-${size}`, color && (light ? `bg-${color}-lt` : `bg-${color} text-${color}-fg`), className] --- {icon && }{text}{iconEnd && } diff --git a/shared/ui/HrText.astro b/shared/ui/HrText.astro index 5b128cbc1..67d732ea6 100644 --- a/shared/ui/HrText.astro +++ b/shared/ui/HrText.astro @@ -1,7 +1,7 @@ --- interface Props { text: string - /** hr-text-{position} (core/scss/ui/typo/_hr.scss); center is the default look */ + /** hr-text-{position} (core/scss/ui/typo/_hr.scss); center is the default look and emits no class */ position?: 'start' | 'center' | 'end' | undefined class?: string /** remaining attributes (id, data-*, aria-*, …) are forwarded to the root element */ @@ -10,7 +10,7 @@ interface Props { const { text, position, class: className, ...rest } = Astro.props -const classes = ['hr-text', position && `hr-text-${position.toLowerCase()}`, className] +const classes = ['hr-text', position && position !== 'center' && `hr-text-${position}`, className] ---
{text}