ngx-com 0.0.21 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +137 -33
- package/fesm2022/ngx-com-components-alert.mjs +21 -11
- package/fesm2022/ngx-com-components-alert.mjs.map +1 -1
- package/fesm2022/ngx-com-components-avatar.mjs +9 -7
- package/fesm2022/ngx-com-components-avatar.mjs.map +1 -1
- package/fesm2022/ngx-com-components-button.mjs +1 -1
- package/fesm2022/ngx-com-components-button.mjs.map +1 -1
- package/fesm2022/ngx-com-components-calendar.mjs +27 -3112
- package/fesm2022/ngx-com-components-calendar.mjs.map +1 -1
- package/fesm2022/ngx-com-components-card.mjs +8 -8
- package/fesm2022/ngx-com-components-card.mjs.map +1 -1
- package/fesm2022/ngx-com-components-carousel.mjs +16 -4
- package/fesm2022/ngx-com-components-carousel.mjs.map +1 -1
- package/fesm2022/ngx-com-components-checkbox.mjs +1 -1
- package/fesm2022/ngx-com-components-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-com-components-code-block.mjs +9 -9
- package/fesm2022/ngx-com-components-code-block.mjs.map +1 -1
- package/fesm2022/ngx-com-components-collapsible.mjs +15 -13
- package/fesm2022/ngx-com-components-collapsible.mjs.map +1 -1
- package/fesm2022/ngx-com-components-confirm.mjs +4 -4
- package/fesm2022/ngx-com-components-confirm.mjs.map +1 -1
- package/fesm2022/ngx-com-components-datepicker.mjs +2334 -0
- package/fesm2022/ngx-com-components-datepicker.mjs.map +1 -0
- package/fesm2022/ngx-com-components-dialog.mjs +47 -45
- package/fesm2022/ngx-com-components-dialog.mjs.map +1 -1
- package/fesm2022/ngx-com-components-dropdown.mjs +446 -340
- package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-com-components-empty-state.mjs +5 -3
- package/fesm2022/ngx-com-components-empty-state.mjs.map +1 -1
- package/fesm2022/ngx-com-components-form-field.mjs +11 -6
- package/fesm2022/ngx-com-components-form-field.mjs.map +1 -1
- package/fesm2022/ngx-com-components-icon-lucide.mjs +41 -0
- package/fesm2022/ngx-com-components-icon-lucide.mjs.map +1 -0
- package/fesm2022/ngx-com-components-icon.mjs +89 -61
- package/fesm2022/ngx-com-components-icon.mjs.map +1 -1
- package/fesm2022/ngx-com-components-item.mjs +14 -4
- package/fesm2022/ngx-com-components-item.mjs.map +1 -1
- package/fesm2022/ngx-com-components-menu.mjs +61 -69
- package/fesm2022/ngx-com-components-menu.mjs.map +1 -1
- package/fesm2022/ngx-com-components-native-control.mjs +170 -0
- package/fesm2022/ngx-com-components-native-control.mjs.map +1 -0
- package/fesm2022/ngx-com-components-paginator.mjs +11 -3
- package/fesm2022/ngx-com-components-paginator.mjs.map +1 -1
- package/fesm2022/ngx-com-components-popover.mjs +58 -33
- package/fesm2022/ngx-com-components-popover.mjs.map +1 -1
- package/fesm2022/ngx-com-components-radio.mjs +4 -4
- package/fesm2022/ngx-com-components-radio.mjs.map +1 -1
- package/fesm2022/ngx-com-components-segmented-control.mjs +6 -4
- package/fesm2022/ngx-com-components-segmented-control.mjs.map +1 -1
- package/fesm2022/ngx-com-components-sort.mjs +63 -57
- package/fesm2022/ngx-com-components-sort.mjs.map +1 -1
- package/fesm2022/ngx-com-components-spinner.mjs +6 -6
- package/fesm2022/ngx-com-components-spinner.mjs.map +1 -1
- package/fesm2022/ngx-com-components-switch.mjs +18 -9
- package/fesm2022/ngx-com-components-switch.mjs.map +1 -1
- package/fesm2022/ngx-com-components-table.mjs +23 -9
- package/fesm2022/ngx-com-components-table.mjs.map +1 -1
- package/fesm2022/ngx-com-components-tabs.mjs +81 -58
- package/fesm2022/ngx-com-components-tabs.mjs.map +1 -1
- package/fesm2022/ngx-com-components-timepicker.mjs +1048 -0
- package/fesm2022/ngx-com-components-timepicker.mjs.map +1 -0
- package/fesm2022/ngx-com-components-toast.mjs +18 -14
- package/fesm2022/ngx-com-components-toast.mjs.map +1 -1
- package/fesm2022/ngx-com-components-tooltip.mjs +5 -5
- package/fesm2022/ngx-com-components-tooltip.mjs.map +1 -1
- package/fesm2022/ngx-com-components.mjs +0 -13
- package/fesm2022/ngx-com-components.mjs.map +1 -1
- package/fesm2022/ngx-com-tokens.mjs +0 -8
- package/fesm2022/ngx-com-tokens.mjs.map +1 -1
- package/fesm2022/ngx-com-utils.mjs +13 -1
- package/fesm2022/ngx-com-utils.mjs.map +1 -1
- package/fesm2022/ngx-com.mjs +1 -1
- package/fesm2022/ngx-com.mjs.map +1 -1
- package/package.json +51 -8
- package/styles/animations.css +38 -0
- package/styles/candy.css +121 -0
- package/styles/dark.css +159 -0
- package/styles/forest.css +117 -0
- package/styles/ocean.css +117 -0
- package/styles/themes.css +7 -0
- package/styles/tokens.css +277 -0
- package/styles/utilities.css +16 -0
- package/types/ngx-com-components-alert.d.ts +14 -4
- package/types/ngx-com-components-avatar.d.ts +2 -0
- package/types/ngx-com-components-calendar.d.ts +3 -747
- package/types/ngx-com-components-card.d.ts +2 -2
- package/types/ngx-com-components-carousel.d.ts +11 -1
- package/types/ngx-com-components-code-block.d.ts +4 -4
- package/types/ngx-com-components-collapsible.d.ts +10 -2
- package/types/ngx-com-components-confirm.d.ts +2 -2
- package/types/ngx-com-components-datepicker.d.ts +623 -0
- package/types/ngx-com-components-dialog.d.ts +5 -2
- package/types/ngx-com-components-dropdown.d.ts +22 -4
- package/types/ngx-com-components-empty-state.d.ts +2 -0
- package/types/ngx-com-components-form-field.d.ts +4 -1
- package/types/ngx-com-components-icon-lucide.d.ts +32 -0
- package/types/ngx-com-components-icon.d.ts +49 -35
- package/types/ngx-com-components-item.d.ts +12 -2
- package/types/ngx-com-components-menu.d.ts +38 -38
- package/types/ngx-com-components-native-control.d.ts +99 -0
- package/types/ngx-com-components-paginator.d.ts +2 -0
- package/types/ngx-com-components-popover.d.ts +19 -12
- package/types/ngx-com-components-segmented-control.d.ts +3 -1
- package/types/ngx-com-components-sort.d.ts +13 -10
- package/types/ngx-com-components-switch.d.ts +7 -2
- package/types/ngx-com-components-table.d.ts +16 -2
- package/types/ngx-com-components-tabs.d.ts +46 -34
- package/types/ngx-com-components-timepicker.d.ts +273 -0
- package/types/ngx-com-components-toast.d.ts +4 -2
- package/types/ngx-com-components-tooltip.d.ts +1 -1
- package/types/ngx-com-components.d.ts +6 -7
- package/types/ngx-com-tokens.d.ts +5 -3
- package/types/ngx-com-utils.d.ts +11 -1
- package/types/ngx-com.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-com-components-spinner.mjs","sources":["../../../projects/com/components/spinner/spinner.variants.ts","../../../projects/com/components/spinner/spinner.component.ts","../../../projects/com/components/spinner/index.ts","../../../projects/com/components/spinner/ngx-com-components-spinner.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\n/** Spinner size variants. */\nexport type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/** Spinner color variants. */\nexport type SpinnerColor = 'current' | 'primary' | 'accent' | 'warn' | 'success' | 'muted';\n\n/** Label position relative to spinner. */\nexport type SpinnerLabelPosition = 'right' | 'bottom';\n\n/**\n * CVA variants for the spinning circle element.\n *\n * Creates a circular track with a faded ring and a colored arc that rotates.\n * Uses `border` for the track and `border-t-*` for the spinning arc.\n *\n * @tokens `--color-primary`, `--color-accent`, `--color-warn`, `--color-success`, `--color-muted-foreground`\n */\nexport const spinnerVariants: (props?: {\n size?: SpinnerSize;\n color?: SpinnerColor;\n}) => string = cva(\n [\n 'com-spinner__circle',\n 'inline-block shrink-0 rounded-full border-solid',\n 'animate-[com-spin_0.6s_linear_infinite]',\n ],\n {\n variants: {\n size: {\n xs: 'size-3 border-[1.5px]',\n sm: 'size-4 border-2',\n md: 'size-5 border-2',\n lg: 'size-8 border-[2.5px]',\n xl: 'size-10 border-3',\n },\n color: {\n current: 'border-current/20 border-t-current',\n primary: 'border-primary/20 border-t-primary',\n accent: 'border-accent/20 border-t-accent',\n warn: 'border-warn/20 border-t-warn',\n success: 'border-success/20 border-t-success',\n muted: 'border-muted-foreground/20 border-t-muted-foreground',\n },\n },\n defaultVariants: {\n size: 'md',\n color: 'current',\n },\n }\n);\n\n/**\n * CVA variants for the spinner container layout.\n *\n * Controls flex direction and gap based on label position.\n * Only applies when a visible label is present.\n *\n * @tokens none (layout only)\n */\nexport const spinnerContainerVariants: (props?: {\n labelPosition?: SpinnerLabelPosition;\n}) => string = cva(\n ['inline-flex items-center justify-center'],\n {\n variants: {\n labelPosition: {\n right: 'flex-row gap-2',\n bottom: 'flex-col gap-1.5',\n },\n },\n defaultVariants: {\n labelPosition: 'right',\n },\n }\n);\n\n/** Label font size classes mapped to spinner size. */\nexport const SPINNER_LABEL_SIZES: Record<SpinnerSize, string> = {\n xs: 'text-xs',\n sm: 'text-xs',\n md: 'text-sm',\n lg: 'text-sm',\n xl: 'text-base',\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport {\n spinnerVariants,\n spinnerContainerVariants,\n SPINNER_LABEL_SIZES,\n} from './spinner.variants';\nimport type {\n SpinnerSize,\n SpinnerColor,\n SpinnerLabelPosition,\n} from './spinner.variants';\n\n/**\n * A minimal, CSS-only loading indicator.\n *\n * Drop-in anywhere: inside buttons, next to inline text, centered in cards,\n * or as a page-level overlay. The animation is fast (0.6s) for a snappy feel.\n *\n * @tokens `--color-primary`, `--color-accent`, `--color-warn`, `--color-success`, `--color-muted-foreground`\n *\n * @example Simplest usage (inherits parent text color)\n * ```html\n * <com-spinner />\n * ```\n *\n * @example Inside a button (inline, inherits button text color)\n * ```html\n * <button class=\"btn-primary\" [disabled]=\"saving\">\n * @if (saving) {\n * <com-spinner size=\"xs\" />\n * }\n * Save\n * </button>\n * ```\n *\n * @example With visible label\n * ```html\n * <com-spinner label=\"Loading results...\" />\n * ```\n *\n * @example Centered in a card\n * ```html\n * <div class=\"flex items-center justify-center p-8\">\n * <com-spinner size=\"lg\" color=\"primary\" label=\"Loading...\" labelPosition=\"bottom\" />\n * </div>\n * ```\n *\n * @example Inline with text\n * ```html\n * <p class=\"text-muted-foreground\">\n * <com-spinner size=\"xs\" /> Checking availability...\n * </p>\n * ```\n *\n * @example Color variants\n * ```html\n * <com-spinner color=\"primary\" />\n * <com-spinner color=\"accent\" />\n * <com-spinner color=\"warn\" />\n * ```\n *\n * @example Large page-level\n * ```html\n * <com-spinner size=\"xl\" color=\"primary\" label=\"Preparing your dashboard...\" labelPosition=\"bottom\" />\n * ```\n */\n@Component({\n selector: 'com-spinner',\n exportAs: 'comSpinner',\n template: `\n <span [class]=\"spinnerClasses()\" aria-hidden=\"true\"></span>\n @if (label()) {\n <span class=\"select-none text-muted-foreground\" [class]=\"labelSizeClass()\">\n {{ label() }}\n </span>\n } @else {\n <span class=\"sr-only\">Loading</span>\n }\n `,\n styles: `\n @keyframes com-spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'status',\n '[class]': 'containerClasses()',\n },\n})\nexport class ComSpinner {\n /**\n * Optional loading text (e.g., \"Loading...\", \"Saving...\").\n * When omitted, \"Loading\" is rendered for screen readers only (sr-only).\n * When provided, the label is visible next to or below the spinner.\n */\n readonly label: InputSignal<string | undefined> = input<string>();\n\n /**\n * Position of the label relative to the spinner.\n * Only relevant when a visible `label` is provided.\n */\n readonly labelPosition: InputSignal<SpinnerLabelPosition> = input<SpinnerLabelPosition>('right');\n\n /** Size of the spinner. */\n readonly size: InputSignal<SpinnerSize> = input<SpinnerSize>('md');\n\n /**\n * Color of the spinner.\n * `current` inherits from `currentColor` to match surrounding text.\n */\n readonly color: InputSignal<SpinnerColor> = input<SpinnerColor>('current');\n\n /** @internal Computed classes for the spinning circle. */\n protected readonly spinnerClasses: Signal<string> = computed(() =>\n spinnerVariants({\n size: this.size(),\n color: this.color(),\n })\n );\n\n /** @internal Computed classes for the container/host. */\n protected readonly containerClasses: Signal<string> = computed(() =>\n this.label()\n ? spinnerContainerVariants({ labelPosition: this.labelPosition() })\n : spinnerContainerVariants()\n );\n\n /** @internal Computed label font size class. */\n protected readonly labelSizeClass: Signal<string> = computed(\n () => SPINNER_LABEL_SIZES[this.size()]\n );\n}\n","// Public API for the spinner component\n\n// Main component\nexport { ComSpinner } from './spinner.component';\n\n// Variants (for advanced customization)\nexport {\n spinnerVariants,\n spinnerContainerVariants,\n SPINNER_LABEL_SIZES,\n} from './spinner.variants';\n\nexport type {\n SpinnerSize,\n SpinnerColor,\n SpinnerLabelPosition,\n} from './spinner.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAWA;;;;;;;AAOG;AACI,MAAM,eAAe,GAGb,GAAG,CAChB;IACE,qBAAqB;IACrB,iDAAiD;IACjD,yCAAyC;CAC1C,EACD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,uBAAuB;AAC3B,YAAA,EAAE,EAAE,iBAAiB;AACrB,YAAA,EAAE,EAAE,iBAAiB;AACrB,YAAA,EAAE,EAAE,uBAAuB;AAC3B,YAAA,EAAE,EAAE,kBAAkB;AACvB,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAE,oCAAoC;AAC7C,YAAA,OAAO,EAAE,oCAAoC;AAC7C,YAAA,MAAM,EAAE,kCAAkC;AAC1C,YAAA,IAAI,EAAE,8BAA8B;AACpC,YAAA,OAAO,EAAE,oCAAoC;AAC7C,YAAA,KAAK,EAAE,sDAAsD;AAC9D,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,KAAK,EAAE,SAAS;AACjB,KAAA;AACF,C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AAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EApCX;;;;;;;;;AAST,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,0LAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FA2BU,UAAU,EAAA,UAAA,EAAA,CAAA;kBAvCtB,SAAS;+BACE,aAAa,EAAA,QAAA,EACb,YAAY,EAAA,QAAA,EACZ;;;;;;;;;AAST,EAAA,CAAA,EAAA,eAAA,EAoBgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,SAAS,EAAE,oBAAoB;AAChC,qBAAA,EAAA,MAAA,EAAA,CAAA,0LAAA,CAAA,EAAA;;;AC9GH;AAEA;;ACFA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-com-components-spinner.mjs","sources":["../../../projects/com/components/spinner/spinner.variants.ts","../../../projects/com/components/spinner/spinner.component.ts","../../../projects/com/components/spinner/index.ts","../../../projects/com/components/spinner/ngx-com-components-spinner.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\n/** Spinner size variants. */\nexport type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/** Spinner color variants. */\nexport type SpinnerColor = 'current' | 'primary' | 'accent' | 'warn' | 'success' | 'muted';\n\n/** Label position relative to spinner. */\nexport type SpinnerLabelPosition = 'right' | 'bottom';\n\n/**\n * CVA variants for the spinning circle element.\n *\n * Creates a circular track with a faded ring and a colored arc that rotates.\n * Uses `border` for the track and `border-t-*` for the spinning arc.\n *\n * @tokens `--color-primary`, `--color-accent`, `--color-warn`, `--color-success`, `--color-muted-foreground`\n */\nexport const spinnerVariants: (props?: {\n size?: SpinnerSize;\n color?: SpinnerColor;\n}) => string = cva(\n [\n 'com-spinner__circle',\n 'inline-block shrink-0 rounded-pill border-solid',\n 'animate-[com-spin_0.6s_linear_infinite]',\n ],\n {\n variants: {\n size: {\n xs: 'size-3 border-[1.5px]',\n sm: 'size-4 border-2',\n md: 'size-5 border-2',\n lg: 'size-8 border-[2.5px]',\n xl: 'size-10 border-3',\n },\n color: {\n current: 'border-current/20 border-t-current',\n primary: 'text-primary border-current/20 border-t-current',\n accent: 'text-accent border-current/20 border-t-current',\n warn: 'text-warn border-current/20 border-t-current',\n success: 'text-success border-current/20 border-t-current',\n muted: 'text-muted-foreground border-current/20 border-t-current',\n },\n },\n defaultVariants: {\n size: 'md',\n color: 'current',\n },\n }\n);\n\n/**\n * CVA variants for the spinner container layout.\n *\n * Controls flex direction and gap based on label position.\n * Only applies when a visible label is present.\n *\n * @tokens none (layout only)\n */\nexport const spinnerContainerVariants: (props?: {\n labelPosition?: SpinnerLabelPosition;\n}) => string = cva(\n ['inline-flex items-center justify-center'],\n {\n variants: {\n labelPosition: {\n right: 'flex-row gap-2',\n bottom: 'flex-col gap-1.5',\n },\n },\n defaultVariants: {\n labelPosition: 'right',\n },\n }\n);\n\n/** Label font size classes mapped to spinner size. */\nexport const SPINNER_LABEL_SIZES: Record<SpinnerSize, string> = {\n xs: 'text-xs',\n sm: 'text-xs',\n md: 'text-sm',\n lg: 'text-sm',\n xl: 'text-base',\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport {\n spinnerVariants,\n spinnerContainerVariants,\n SPINNER_LABEL_SIZES,\n} from './spinner.variants';\nimport type {\n SpinnerSize,\n SpinnerColor,\n SpinnerLabelPosition,\n} from './spinner.variants';\n\n/**\n * A minimal, CSS-only loading indicator.\n *\n * Drop-in anywhere: inside buttons, next to inline text, centered in cards,\n * or as a page-level overlay. The animation is fast (0.6s) for a snappy feel.\n *\n * @tokens `--color-primary`, `--color-accent`, `--color-warn`, `--color-success`, `--color-muted-foreground`\n *\n * @example Simplest usage (inherits parent text color)\n * ```html\n * <com-spinner />\n * ```\n *\n * @example Inside a button (inline, inherits button text color)\n * ```html\n * <button class=\"btn-primary\" [disabled]=\"saving\">\n * @if (saving) {\n * <com-spinner size=\"xs\" />\n * }\n * Save\n * </button>\n * ```\n *\n * @example With visible label\n * ```html\n * <com-spinner label=\"Loading results...\" />\n * ```\n *\n * @example Centered in a card\n * ```html\n * <div class=\"flex items-center justify-center p-8\">\n * <com-spinner size=\"lg\" color=\"primary\" label=\"Loading...\" labelPosition=\"bottom\" />\n * </div>\n * ```\n *\n * @example Inline with text\n * ```html\n * <p class=\"text-muted-foreground\">\n * <com-spinner size=\"xs\" /> Checking availability...\n * </p>\n * ```\n *\n * @example Color variants\n * ```html\n * <com-spinner color=\"primary\" />\n * <com-spinner color=\"accent\" />\n * <com-spinner color=\"warn\" />\n * ```\n *\n * @example Large page-level\n * ```html\n * <com-spinner size=\"xl\" color=\"primary\" label=\"Preparing your dashboard...\" labelPosition=\"bottom\" />\n * ```\n */\n@Component({\n selector: 'com-spinner',\n exportAs: 'comSpinner',\n template: `\n <span [class]=\"spinnerClasses()\" aria-hidden=\"true\"></span>\n @if (label()) {\n <span class=\"select-none text-muted-foreground\" [class]=\"labelSizeClass()\">\n {{ label() }}\n </span>\n } @else {\n <span class=\"sr-only\">Loading</span>\n }\n `,\n styles: `\n @keyframes com-spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'status',\n '[class]': 'containerClasses()',\n },\n})\nexport class ComSpinner {\n /**\n * Optional loading text (e.g., \"Loading...\", \"Saving...\").\n * When omitted, \"Loading\" is rendered for screen readers only (sr-only).\n * When provided, the label is visible next to or below the spinner.\n */\n readonly label: InputSignal<string | undefined> = input<string>();\n\n /**\n * Position of the label relative to the spinner.\n * Only relevant when a visible `label` is provided.\n */\n readonly labelPosition: InputSignal<SpinnerLabelPosition> = input<SpinnerLabelPosition>('right');\n\n /** Size of the spinner. */\n readonly size: InputSignal<SpinnerSize> = input<SpinnerSize>('md');\n\n /**\n * Color of the spinner.\n * `current` inherits from `currentColor` to match surrounding text.\n */\n readonly color: InputSignal<SpinnerColor> = input<SpinnerColor>('current');\n\n /** @internal Computed classes for the spinning circle. */\n protected readonly spinnerClasses: Signal<string> = computed(() =>\n spinnerVariants({\n size: this.size(),\n color: this.color(),\n })\n );\n\n /** @internal Computed classes for the container/host. */\n protected readonly containerClasses: Signal<string> = computed(() =>\n this.label()\n ? spinnerContainerVariants({ labelPosition: this.labelPosition() })\n : spinnerContainerVariants()\n );\n\n /** @internal Computed label font size class. */\n protected readonly labelSizeClass: Signal<string> = computed(\n () => SPINNER_LABEL_SIZES[this.size()]\n );\n}\n","// Public API for the spinner component\n\n// Main component\nexport { ComSpinner } from './spinner.component';\n\n// Variants (for advanced customization)\nexport {\n spinnerVariants,\n spinnerContainerVariants,\n SPINNER_LABEL_SIZES,\n} from './spinner.variants';\n\nexport type {\n SpinnerSize,\n SpinnerColor,\n SpinnerLabelPosition,\n} from './spinner.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAWA;;;;;;;AAOG;AACI,MAAM,eAAe,GAGb,GAAG,CAChB;IACE,qBAAqB;IACrB,iDAAiD;IACjD,yCAAyC;CAC1C,EACD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,uBAAuB;AAC3B,YAAA,EAAE,EAAE,iBAAiB;AACrB,YAAA,EAAE,EAAE,iBAAiB;AACrB,YAAA,EAAE,EAAE,uBAAuB;AAC3B,YAAA,EAAE,EAAE,kBAAkB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UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EApCX;;;;;;;;;AAST,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,0LAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FA2BU,UAAU,EAAA,UAAA,EAAA,CAAA;kBAvCtB,SAAS;+BACE,aAAa,EAAA,QAAA,EACb,YAAY,EAAA,QAAA,EACZ;;;;;;;;;AAST,EAAA,CAAA,EAAA,eAAA,EAoBgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,SAAS,EAAE,oBAAoB;AAChC,qBAAA,EAAA,MAAA,EAAA,CAAA,0LAAA,CAAA,EAAA;;;AC9GH;AAEA;;ACFA;;AAEG;;;;"}
|
|
@@ -21,7 +21,7 @@ const switchTrackVariants = cva([
|
|
|
21
21
|
'com-switch__track',
|
|
22
22
|
'relative inline-flex shrink-0 cursor-pointer items-center',
|
|
23
23
|
'rounded-pill border-2 border-transparent',
|
|
24
|
-
'transition-colors duration-
|
|
24
|
+
'transition-colors duration-normal',
|
|
25
25
|
'bg-muted hover:bg-muted-hover',
|
|
26
26
|
'peer-focus-visible:outline-[1px] peer-focus-visible:outline-offset-2 peer-focus-visible:outline-ring',
|
|
27
27
|
'peer-disabled:cursor-not-allowed peer-disabled:bg-disabled peer-disabled:hover:bg-disabled',
|
|
@@ -117,19 +117,24 @@ class ComSwitch {
|
|
|
117
117
|
variant = input('primary', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
118
118
|
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
119
119
|
disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
120
|
-
|
|
120
|
+
htmlValue = input(undefined, { ...(ngDevMode ? { debugName: "htmlValue" } : {}), alias: 'value' });
|
|
121
121
|
name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : []));
|
|
122
122
|
id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : []));
|
|
123
123
|
ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : {}), alias: 'aria-label' });
|
|
124
124
|
ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : {}), alias: 'aria-labelledby' });
|
|
125
125
|
ariaDescribedby = input(null, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : {}), alias: 'aria-describedby' });
|
|
126
|
+
// Signal Forms inputs — set automatically by [formField] via setInputOnDirectives
|
|
127
|
+
touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : []));
|
|
128
|
+
invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid" }] : []));
|
|
129
|
+
sfErrors = input([], { ...(ngDevMode ? { debugName: "sfErrors" } : {}), alias: 'errors' });
|
|
130
|
+
sfRequired = input(false, { ...(ngDevMode ? { debugName: "sfRequired" } : {}), alias: 'required' });
|
|
126
131
|
// Outputs
|
|
127
132
|
changed = output();
|
|
128
133
|
// Computed state
|
|
129
134
|
inputId = computed(() => this.id() ?? this.uniqueId, ...(ngDevMode ? [{ debugName: "inputId" }] : []));
|
|
130
135
|
trackClasses = computed(() => switchTrackVariants({ variant: this.variant(), size: this.size() }), ...(ngDevMode ? [{ debugName: "trackClasses" }] : []));
|
|
131
136
|
thumbClasses = computed(() => {
|
|
132
|
-
const base = `pointer-events-none block rounded-pill bg-background shadow-sm transition-transform duration-
|
|
137
|
+
const base = `pointer-events-none block rounded-pill bg-background shadow-sm transition-transform duration-normal ${SWITCH_THUMB_SIZES[this.size()]}`;
|
|
133
138
|
return this.checked() ? `${base} ${SWITCH_THUMB_TRANSLATE[this.size()]}` : base;
|
|
134
139
|
}, ...(ngDevMode ? [{ debugName: "thumbClasses" }] : []));
|
|
135
140
|
labelClasses = computed(() => `com-switch__label select-none peer-disabled:cursor-not-allowed peer-disabled:text-disabled-foreground ${SWITCH_LABEL_SIZES[this.size()]}`, ...(ngDevMode ? [{ debugName: "labelClasses" }] : []));
|
|
@@ -155,6 +160,10 @@ class ComSwitch {
|
|
|
155
160
|
this.disabled.set(isDisabled);
|
|
156
161
|
}
|
|
157
162
|
// Event handlers
|
|
163
|
+
onBlur() {
|
|
164
|
+
this.onTouched();
|
|
165
|
+
this.touched.set(true);
|
|
166
|
+
}
|
|
158
167
|
onInputChange(event) {
|
|
159
168
|
const input = event.target;
|
|
160
169
|
const newChecked = input.checked;
|
|
@@ -178,7 +187,7 @@ class ComSwitch {
|
|
|
178
187
|
this.changed.emit({ checked: newChecked, source: this });
|
|
179
188
|
}
|
|
180
189
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
181
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.0", type: ComSwitch, isStandalone: true, selector: "com-switch", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null },
|
|
190
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.0", type: ComSwitch, isStandalone: true, selector: "com-switch", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, htmlValue: { classPropertyName: "htmlValue", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, sfErrors: { classPropertyName: "sfErrors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, sfRequired: { classPropertyName: "sfRequired", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", disabled: "disabledChange", touched: "touchedChange", changed: "changed" }, host: { properties: { "class.com-switch--disabled": "disabled()", "class.com-switch--checked": "checked()" }, classAttribute: "com-switch inline-block align-middle" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputElement"], descendants: true, isSignal: true }], exportAs: ["comSwitch"], ngImport: i0, template: `
|
|
182
191
|
<label
|
|
183
192
|
class="group relative inline-flex items-center"
|
|
184
193
|
[class.cursor-pointer]="!disabled()"
|
|
@@ -193,12 +202,12 @@ class ComSwitch {
|
|
|
193
202
|
[checked]="checked()"
|
|
194
203
|
[disabled]="disabled()"
|
|
195
204
|
[attr.name]="name()"
|
|
196
|
-
[attr.value]="
|
|
205
|
+
[attr.value]="htmlValue()"
|
|
197
206
|
[attr.aria-label]="ariaLabel()"
|
|
198
207
|
[attr.aria-labelledby]="ariaLabelledby()"
|
|
199
208
|
[attr.aria-describedby]="ariaDescribedby()"
|
|
200
209
|
(change)="onInputChange($event)"
|
|
201
|
-
(blur)="
|
|
210
|
+
(blur)="onBlur()"
|
|
202
211
|
/>
|
|
203
212
|
<span [class]="trackClasses()">
|
|
204
213
|
<span [class]="thumbClasses()"></span>
|
|
@@ -226,12 +235,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
226
235
|
[checked]="checked()"
|
|
227
236
|
[disabled]="disabled()"
|
|
228
237
|
[attr.name]="name()"
|
|
229
|
-
[attr.value]="
|
|
238
|
+
[attr.value]="htmlValue()"
|
|
230
239
|
[attr.aria-label]="ariaLabel()"
|
|
231
240
|
[attr.aria-labelledby]="ariaLabelledby()"
|
|
232
241
|
[attr.aria-describedby]="ariaDescribedby()"
|
|
233
242
|
(change)="onInputChange($event)"
|
|
234
|
-
(blur)="
|
|
243
|
+
(blur)="onBlur()"
|
|
235
244
|
/>
|
|
236
245
|
<span [class]="trackClasses()">
|
|
237
246
|
<span [class]="thumbClasses()"></span>
|
|
@@ -245,7 +254,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
245
254
|
'[class.com-switch--disabled]': 'disabled()',
|
|
246
255
|
'[class.com-switch--checked]': 'checked()',
|
|
247
256
|
}, styles: [".sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"] }]
|
|
248
|
-
}], ctorParameters: () => [], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ['inputElement', { isSignal: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }],
|
|
257
|
+
}], ctorParameters: () => [], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ['inputElement', { isSignal: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], htmlValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], sfErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], sfRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }] } });
|
|
249
258
|
|
|
250
259
|
// Public API for the switch component
|
|
251
260
|
// Main component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-com-components-switch.mjs","sources":["../../../projects/com/components/switch/switch.variants.ts","../../../projects/com/components/switch/switch.component.ts","../../../projects/com/components/switch/index.ts","../../../projects/com/components/switch/ngx-com-components-switch.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\n/** Switch size variants. */\nexport type SwitchSize = 'sm' | 'md' | 'lg';\n\n/** Switch color variants. */\nexport type SwitchVariant = 'primary' | 'accent' | 'warn';\n\n/**\n * CVA variants for the switch track (pill-shaped container).\n *\n * Uses `peer` selectors to style based on native input state:\n * - `peer-checked:` for on state\n * - `peer-focus-visible:` for keyboard focus\n * - `peer-disabled:` for disabled state\n *\n * @tokens `--color-primary`, `--color-primary-hover`,\n * `--color-accent`, `--color-accent-hover`,\n * `--color-warn`, `--color-warn-hover`,\n * `--color-muted`, `--color-muted-hover`,\n * `--color-disabled`, `--color-ring`, `--radius-pill`\n */\nexport const switchTrackVariants: (props?: {\n variant?: SwitchVariant;\n size?: SwitchSize;\n}) => string = cva(\n [\n 'com-switch__track',\n 'relative inline-flex shrink-0 cursor-pointer items-center',\n 'rounded-pill border-2 border-transparent',\n 'transition-colors duration-150',\n 'bg-muted hover:bg-muted-hover',\n 'peer-focus-visible:outline-[1px] peer-focus-visible:outline-offset-2 peer-focus-visible:outline-ring',\n 'peer-disabled:cursor-not-allowed peer-disabled:bg-disabled peer-disabled:hover:bg-disabled',\n ],\n {\n variants: {\n variant: {\n primary: [\n 'peer-checked:bg-primary peer-checked:hover:bg-primary-hover',\n 'peer-disabled:peer-checked:bg-disabled',\n ],\n accent: [\n 'peer-checked:bg-accent peer-checked:hover:bg-accent-hover',\n 'peer-disabled:peer-checked:bg-disabled',\n ],\n warn: [\n 'peer-checked:bg-warn peer-checked:hover:bg-warn-hover',\n 'peer-disabled:peer-checked:bg-disabled',\n ],\n },\n size: {\n sm: 'h-5 w-9',\n md: 'h-6 w-11',\n lg: 'h-7 w-13',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n },\n }\n);\n\n/** Size-based classes for the sliding thumb. */\nexport const SWITCH_THUMB_SIZES: Record<SwitchSize, string> = {\n sm: 'size-4',\n md: 'size-5',\n lg: 'size-6',\n};\n\n/** Size-based translate classes applied when the switch is checked. */\nexport const SWITCH_THUMB_TRANSLATE: Record<SwitchSize, string> = {\n sm: 'translate-x-4',\n md: 'translate-x-5',\n lg: 'translate-x-6',\n};\n\n/** Size-based classes for the label content. */\nexport const SWITCH_LABEL_SIZES: Record<SwitchSize, string> = {\n sm: 'text-sm ms-2',\n md: 'text-base ms-2.5',\n lg: 'text-lg ms-3',\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n model,\n output,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport type {\n InputSignal,\n ModelSignal,\n OutputEmitterRef,\n Signal,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport type { ControlValueAccessor } from '@angular/forms';\nimport {\n switchTrackVariants,\n SWITCH_THUMB_SIZES,\n SWITCH_THUMB_TRANSLATE,\n SWITCH_LABEL_SIZES,\n} from './switch.variants';\nimport type { SwitchSize, SwitchVariant } from './switch.variants';\n\n/** Event emitted when switch state changes. */\nexport interface SwitchChange {\n checked: boolean;\n source: ComSwitch;\n}\n\n/** Auto-incrementing ID counter for unique switch IDs. */\nlet nextId = 0;\n\n/**\n * Toggle switch component with full accessibility support.\n *\n * Uses a native `<input type=\"checkbox\" role=\"switch\">` for built-in keyboard\n * handling, `:checked` pseudo-class, and screen reader support.\n *\n * Implements `ControlValueAccessor` for Reactive Forms integration via\n * `NgControl` injection pattern (no `NG_VALUE_ACCESSOR` provider).\n *\n * @tokens `--color-primary`, `--color-primary-hover`,\n * `--color-accent`, `--color-accent-hover`,\n * `--color-warn`, `--color-warn-hover`,\n * `--color-muted`, `--color-muted-hover`,\n * `--color-background`, `--color-disabled`, `--color-disabled-foreground`,\n * `--color-ring`, `--radius-pill`\n *\n * @example Basic usage\n * ```html\n * <com-switch [(checked)]=\"darkMode\">Dark mode</com-switch>\n * ```\n *\n * @example With reactive forms\n * ```html\n * <com-switch formControlName=\"notifications\">Push notifications</com-switch>\n * ```\n *\n * @example Variants and sizes\n * ```html\n * <com-switch variant=\"accent\" size=\"lg\">Large accent switch</com-switch>\n * <com-switch variant=\"warn\" size=\"sm\">Small warning switch</com-switch>\n * ```\n */\n@Component({\n selector: 'com-switch',\n exportAs: 'comSwitch',\n template: `\n <label\n class=\"group relative inline-flex items-center\"\n [class.cursor-pointer]=\"!disabled()\"\n [class.cursor-not-allowed]=\"disabled()\"\n >\n <input\n #inputElement\n type=\"checkbox\"\n role=\"switch\"\n class=\"peer sr-only\"\n [id]=\"inputId()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [attr.name]=\"name()\"\n [attr.value]=\"value()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onTouched()\"\n />\n <span [class]=\"trackClasses()\">\n <span [class]=\"thumbClasses()\"></span>\n </span>\n <span [class]=\"labelClasses()\">\n <ng-content />\n </span>\n </label>\n `,\n styles: `\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'com-switch inline-block align-middle',\n '[class.com-switch--disabled]': 'disabled()',\n '[class.com-switch--checked]': 'checked()',\n },\n})\nexport class ComSwitch implements ControlValueAccessor {\n /** Optional NgControl for reactive forms integration. */\n readonly ngControl: NgControl | null = inject(NgControl, { optional: true, self: true });\n\n /** Reference to the native input element. */\n readonly inputRef: Signal<ElementRef<HTMLInputElement> | undefined> =\n viewChild<ElementRef<HTMLInputElement>>('inputElement');\n\n /** Unique ID for this switch instance. */\n private readonly uniqueId: string = `com-switch-${nextId++}`;\n\n // Inputs\n readonly size: InputSignal<SwitchSize> = input<SwitchSize>('md');\n readonly variant: InputSignal<SwitchVariant> = input<SwitchVariant>('primary');\n readonly checked: ModelSignal<boolean> = model<boolean>(false);\n readonly disabled: ModelSignal<boolean> = model<boolean>(false);\n readonly value: InputSignal<string | undefined> = input<string>();\n readonly name: InputSignal<string | undefined> = input<string>();\n readonly id: InputSignal<string | undefined> = input<string>();\n readonly ariaLabel: InputSignal<string | null> = input<string | null>(null, { alias: 'aria-label' });\n readonly ariaLabelledby: InputSignal<string | null> = input<string | null>(null, { alias: 'aria-labelledby' });\n readonly ariaDescribedby: InputSignal<string | null> = input<string | null>(null, { alias: 'aria-describedby' });\n\n // Outputs\n readonly changed: OutputEmitterRef<SwitchChange> = output<SwitchChange>();\n\n // Computed state\n readonly inputId: Signal<string> = computed(() => this.id() ?? this.uniqueId);\n\n protected readonly trackClasses: Signal<string> = computed(() =>\n switchTrackVariants({ variant: this.variant(), size: this.size() })\n );\n\n protected readonly thumbClasses: Signal<string> = computed(() => {\n const base = `pointer-events-none block rounded-pill bg-background shadow-sm transition-transform duration-150 ${SWITCH_THUMB_SIZES[this.size()]}`;\n return this.checked() ? `${base} ${SWITCH_THUMB_TRANSLATE[this.size()]}` : base;\n });\n\n protected readonly labelClasses: Signal<string> = computed(() =>\n `com-switch__label select-none peer-disabled:cursor-not-allowed peer-disabled:text-disabled-foreground ${SWITCH_LABEL_SIZES[this.size()]}`\n );\n\n // CVA callbacks\n private onChange: (value: boolean) => void = () => {};\n protected onTouched: () => void = () => {};\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n // ControlValueAccessor implementation\n writeValue(value: boolean): void {\n this.checked.set(value ?? false);\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n // Event handlers\n protected onInputChange(event: Event): void {\n const input = event.target as HTMLInputElement;\n const newChecked = input.checked;\n\n this.checked.set(newChecked);\n this.onChange(newChecked);\n this.changed.emit({ checked: newChecked, source: this });\n }\n\n // Public API\n /** Focuses this switch's input element. */\n focus(): void {\n this.inputRef()?.nativeElement.focus();\n }\n\n /** Toggles the switch state programmatically. */\n toggle(): void {\n if (this.disabled()) {\n return;\n }\n\n const newChecked = !this.checked();\n this.checked.set(newChecked);\n this.onChange(newChecked);\n this.changed.emit({ checked: newChecked, source: this });\n }\n}\n","// Public API for the switch component\n\n// Main component\nexport { ComSwitch } from './switch.component';\n\n// Types\nexport type { SwitchChange } from './switch.component';\n\n// Variants (for advanced customization)\nexport {\n switchTrackVariants,\n SWITCH_THUMB_SIZES,\n SWITCH_THUMB_TRANSLATE,\n SWITCH_LABEL_SIZES,\n} from './switch.variants';\n\nexport type { SwitchSize, SwitchVariant } from './switch.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAQA;;;;;;;;;;;;;AAaG;AACI,MAAM,mBAAmB,GAGjB,GAAG,CAChB;IACE,mBAAmB;IACnB,2DAA2D;IAC3D,0CAA0C;IAC1C,gCAAgC;IAChC,+BAA+B;IAC/B,sGAAsG;IACtG,4FAA4F;CAC7F,EACD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE;gBACP,6DAA6D;gBAC7D,wCAAwC;AACzC,aAAA;AACD,YAAA,MAAM,EAAE;gBACN,2DAA2D;gBAC3D,wCAAwC;AACzC,aAAA;AACD,YAAA,IAAI,EAAE;gBACJ,uDAAuD;gBACvD,wCAAwC;AACzC,aAAA;AACF,SAAA;AACD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A,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACjI1D;AAEA;;ACFA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-com-components-switch.mjs","sources":["../../../projects/com/components/switch/switch.variants.ts","../../../projects/com/components/switch/switch.component.ts","../../../projects/com/components/switch/index.ts","../../../projects/com/components/switch/ngx-com-components-switch.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\n/** Switch size variants. */\nexport type SwitchSize = 'sm' | 'md' | 'lg';\n\n/** Switch color variants. */\nexport type SwitchVariant = 'primary' | 'accent' | 'warn';\n\n/**\n * CVA variants for the switch track (pill-shaped container).\n *\n * Uses `peer` selectors to style based on native input state:\n * - `peer-checked:` for on state\n * - `peer-focus-visible:` for keyboard focus\n * - `peer-disabled:` for disabled state\n *\n * @tokens `--color-primary`, `--color-primary-hover`,\n * `--color-accent`, `--color-accent-hover`,\n * `--color-warn`, `--color-warn-hover`,\n * `--color-muted`, `--color-muted-hover`,\n * `--color-disabled`, `--color-ring`, `--radius-pill`\n */\nexport const switchTrackVariants: (props?: {\n variant?: SwitchVariant;\n size?: SwitchSize;\n}) => string = cva(\n [\n 'com-switch__track',\n 'relative inline-flex shrink-0 cursor-pointer items-center',\n 'rounded-pill border-2 border-transparent',\n 'transition-colors duration-normal',\n 'bg-muted hover:bg-muted-hover',\n 'peer-focus-visible:outline-[1px] peer-focus-visible:outline-offset-2 peer-focus-visible:outline-ring',\n 'peer-disabled:cursor-not-allowed peer-disabled:bg-disabled peer-disabled:hover:bg-disabled',\n ],\n {\n variants: {\n variant: {\n primary: [\n 'peer-checked:bg-primary peer-checked:hover:bg-primary-hover',\n 'peer-disabled:peer-checked:bg-disabled',\n ],\n accent: [\n 'peer-checked:bg-accent peer-checked:hover:bg-accent-hover',\n 'peer-disabled:peer-checked:bg-disabled',\n ],\n warn: [\n 'peer-checked:bg-warn peer-checked:hover:bg-warn-hover',\n 'peer-disabled:peer-checked:bg-disabled',\n ],\n },\n size: {\n sm: 'h-5 w-9',\n md: 'h-6 w-11',\n lg: 'h-7 w-13',\n },\n },\n defaultVariants: {\n variant: 'primary',\n size: 'md',\n },\n }\n);\n\n/** Size-based classes for the sliding thumb. */\nexport const SWITCH_THUMB_SIZES: Record<SwitchSize, string> = {\n sm: 'size-4',\n md: 'size-5',\n lg: 'size-6',\n};\n\n/** Size-based translate classes applied when the switch is checked. */\nexport const SWITCH_THUMB_TRANSLATE: Record<SwitchSize, string> = {\n sm: 'translate-x-4',\n md: 'translate-x-5',\n lg: 'translate-x-6',\n};\n\n/** Size-based classes for the label content. */\nexport const SWITCH_LABEL_SIZES: Record<SwitchSize, string> = {\n sm: 'text-sm ms-2',\n md: 'text-base ms-2.5',\n lg: 'text-lg ms-3',\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n model,\n output,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport type {\n InputSignal,\n ModelSignal,\n OutputEmitterRef,\n Signal,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport type { ControlValueAccessor } from '@angular/forms';\nimport {\n switchTrackVariants,\n SWITCH_THUMB_SIZES,\n SWITCH_THUMB_TRANSLATE,\n SWITCH_LABEL_SIZES,\n} from './switch.variants';\nimport type { SwitchSize, SwitchVariant } from './switch.variants';\n\n/** Event emitted when switch state changes. */\nexport interface SwitchChange {\n checked: boolean;\n source: ComSwitch;\n}\n\n/** Auto-incrementing ID counter for unique switch IDs. */\nlet nextId = 0;\n\n/**\n * Toggle switch component with full accessibility support.\n *\n * Uses a native `<input type=\"checkbox\" role=\"switch\">` for built-in keyboard\n * handling, `:checked` pseudo-class, and screen reader support.\n *\n * Implements `ControlValueAccessor` for Reactive Forms integration via\n * `NgControl` injection pattern (no `NG_VALUE_ACCESSOR` provider).\n *\n * @tokens `--color-primary`, `--color-primary-hover`,\n * `--color-accent`, `--color-accent-hover`,\n * `--color-warn`, `--color-warn-hover`,\n * `--color-muted`, `--color-muted-hover`,\n * `--color-background`, `--color-disabled`, `--color-disabled-foreground`,\n * `--color-ring`, `--radius-pill`\n *\n * @example Basic usage\n * ```html\n * <com-switch [(checked)]=\"darkMode\">Dark mode</com-switch>\n * ```\n *\n * @example With reactive forms\n * ```html\n * <com-switch formControlName=\"notifications\">Push notifications</com-switch>\n * ```\n *\n * @example Variants and sizes\n * ```html\n * <com-switch variant=\"accent\" size=\"lg\">Large accent switch</com-switch>\n * <com-switch variant=\"warn\" size=\"sm\">Small warning switch</com-switch>\n * ```\n */\n@Component({\n selector: 'com-switch',\n exportAs: 'comSwitch',\n template: `\n <label\n class=\"group relative inline-flex items-center\"\n [class.cursor-pointer]=\"!disabled()\"\n [class.cursor-not-allowed]=\"disabled()\"\n >\n <input\n #inputElement\n type=\"checkbox\"\n role=\"switch\"\n class=\"peer sr-only\"\n [id]=\"inputId()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n [attr.name]=\"name()\"\n [attr.value]=\"htmlValue()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span [class]=\"trackClasses()\">\n <span [class]=\"thumbClasses()\"></span>\n </span>\n <span [class]=\"labelClasses()\">\n <ng-content />\n </span>\n </label>\n `,\n styles: `\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'com-switch inline-block align-middle',\n '[class.com-switch--disabled]': 'disabled()',\n '[class.com-switch--checked]': 'checked()',\n },\n})\nexport class ComSwitch implements ControlValueAccessor {\n /** Optional NgControl for reactive forms integration. */\n readonly ngControl: NgControl | null = inject(NgControl, { optional: true, self: true });\n\n /** Reference to the native input element. */\n readonly inputRef: Signal<ElementRef<HTMLInputElement> | undefined> =\n viewChild<ElementRef<HTMLInputElement>>('inputElement');\n\n /** Unique ID for this switch instance. */\n private readonly uniqueId: string = `com-switch-${nextId++}`;\n\n // Inputs\n readonly size: InputSignal<SwitchSize> = input<SwitchSize>('md');\n readonly variant: InputSignal<SwitchVariant> = input<SwitchVariant>('primary');\n readonly checked: ModelSignal<boolean> = model<boolean>(false);\n readonly disabled: ModelSignal<boolean> = model<boolean>(false);\n readonly htmlValue: InputSignal<string | undefined> = input<string | undefined>(undefined, { alias: 'value' });\n readonly name: InputSignal<string | undefined> = input<string>();\n readonly id: InputSignal<string | undefined> = input<string>();\n readonly ariaLabel: InputSignal<string | null> = input<string | null>(null, { alias: 'aria-label' });\n readonly ariaLabelledby: InputSignal<string | null> = input<string | null>(null, { alias: 'aria-labelledby' });\n readonly ariaDescribedby: InputSignal<string | null> = input<string | null>(null, { alias: 'aria-describedby' });\n\n // Signal Forms inputs — set automatically by [formField] via setInputOnDirectives\n readonly touched: ModelSignal<boolean> = model<boolean>(false);\n readonly invalid: InputSignal<boolean> = input<boolean>(false);\n readonly sfErrors: InputSignal<readonly unknown[]> = input<readonly unknown[]>([], { alias: 'errors' });\n readonly sfRequired: InputSignal<boolean> = input<boolean>(false, { alias: 'required' });\n\n // Outputs\n readonly changed: OutputEmitterRef<SwitchChange> = output<SwitchChange>();\n\n // Computed state\n readonly inputId: Signal<string> = computed(() => this.id() ?? this.uniqueId);\n\n protected readonly trackClasses: Signal<string> = computed(() =>\n switchTrackVariants({ variant: this.variant(), size: this.size() })\n );\n\n protected readonly thumbClasses: Signal<string> = computed(() => {\n const base = `pointer-events-none block rounded-pill bg-background shadow-sm transition-transform duration-normal ${SWITCH_THUMB_SIZES[this.size()]}`;\n return this.checked() ? `${base} ${SWITCH_THUMB_TRANSLATE[this.size()]}` : base;\n });\n\n protected readonly labelClasses: Signal<string> = computed(() =>\n `com-switch__label select-none peer-disabled:cursor-not-allowed peer-disabled:text-disabled-foreground ${SWITCH_LABEL_SIZES[this.size()]}`\n );\n\n // CVA callbacks\n private onChange: (value: boolean) => void = () => {};\n protected onTouched: () => void = () => {};\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n // ControlValueAccessor implementation\n writeValue(value: boolean): void {\n this.checked.set(value ?? false);\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n // Event handlers\n protected onBlur(): void {\n this.onTouched();\n this.touched.set(true);\n }\n\n protected onInputChange(event: Event): void {\n const input = event.target as HTMLInputElement;\n const newChecked = input.checked;\n\n this.checked.set(newChecked);\n this.onChange(newChecked);\n this.changed.emit({ checked: newChecked, source: this });\n }\n\n // Public API\n /** Focuses this switch's input element. */\n focus(): void {\n this.inputRef()?.nativeElement.focus();\n }\n\n /** Toggles the switch state programmatically. */\n toggle(): void {\n if (this.disabled()) {\n return;\n }\n\n const newChecked = !this.checked();\n this.checked.set(newChecked);\n this.onChange(newChecked);\n this.changed.emit({ checked: newChecked, source: this });\n }\n}\n","// Public API for the switch component\n\n// Main component\nexport { ComSwitch } from './switch.component';\n\n// Types\nexport type { SwitchChange } from './switch.component';\n\n// Variants (for advanced customization)\nexport {\n switchTrackVariants,\n SWITCH_THUMB_SIZES,\n SWITCH_THUMB_TRANSLATE,\n SWITCH_LABEL_SIZES,\n} from './switch.variants';\n\nexport type { SwitchSize, SwitchVariant } from './switch.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAQA;;;;;;;;;;;;;AAaG;AACI,MAAM,mBAAmB,GAGjB,GAAG,CAChB;IACE,mBAAmB;IACnB,2DAA2D;IAC3D,0CAA0C;IAC1C,mCAAmC;IACnC,+BAA+B;IAC/B,sGAAsG;IACtG,4FAA4F;CAC7F,EACD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE;gBACP,6DAA6D;gBAC7D,wCAAwC;AACzC,aAAA;AACD,YAAA,MAAM,EAAE;gBACN,2DAA2D;gBAC3D,wCAAwC;AACzC,aAAA;AACD,YAAA,IAAI,EAAE;gBACJ,uDAAuD;gBACvD,wCAAwC;AACzC,aAAA;AACF,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,SAAS;AACb,YAAA,EAAE,EAAE,UAAU;AACd,YAAA,EAAE,EAAE,UAAU;AACf,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,IAAI,EAAE,IAAI;AACX,KAAA;AACF,CAAA;AAGH;AACO,MAAM,kBAAkB,GAA+B;AAC5D,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,EAAE,EAAE,QAAQ;AACZ,IAAA,EAAE,EAAE,QAAQ;;AAGd;AACO,MAAM,sBAAsB,GAA+B;AAChE,IAAA,EAAE,EAAE,eAAe;AACnB,IAAA,EAAE,EAAE,eAAe;AACnB,IAAA,EAAE,EAAE,eAAe;;AAGrB;AACO,MAAM,kBAAkB,GAA+B;AAC5D,IAAA,EAAE,EAAE,cAAc;AACl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AA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACjI1D;AAEA;;ACFA;;AAEG;;;;"}
|
|
@@ -9,6 +9,8 @@ import { cva } from 'class-variance-authority';
|
|
|
9
9
|
*
|
|
10
10
|
* Use with the star syntax inside a `comColumnDef` container.
|
|
11
11
|
*
|
|
12
|
+
* @tokens none
|
|
13
|
+
*
|
|
12
14
|
* @example
|
|
13
15
|
* ```html
|
|
14
16
|
* <ng-container comColumnDef="name">
|
|
@@ -34,6 +36,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
34
36
|
*
|
|
35
37
|
* Use with the star syntax inside a `comColumnDef` container.
|
|
36
38
|
*
|
|
39
|
+
* @tokens none
|
|
40
|
+
*
|
|
37
41
|
* @example
|
|
38
42
|
* ```html
|
|
39
43
|
* <ng-container comColumnDef="name">
|
|
@@ -59,6 +63,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
59
63
|
*
|
|
60
64
|
* Use with the star syntax inside a `comColumnDef` container.
|
|
61
65
|
*
|
|
66
|
+
* @tokens none
|
|
67
|
+
*
|
|
62
68
|
* @example
|
|
63
69
|
* ```html
|
|
64
70
|
* <ng-container comColumnDef="amount">
|
|
@@ -85,6 +91,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
85
91
|
*
|
|
86
92
|
* Contains a header cell template, a body cell template, and an optional footer cell template.
|
|
87
93
|
*
|
|
94
|
+
* @tokens none
|
|
95
|
+
*
|
|
88
96
|
* @example
|
|
89
97
|
* ```html
|
|
90
98
|
* <ng-container comColumnDef="name">
|
|
@@ -116,6 +124,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
116
124
|
/**
|
|
117
125
|
* Defines which columns appear in the header row and their order.
|
|
118
126
|
*
|
|
127
|
+
* @tokens none
|
|
128
|
+
*
|
|
119
129
|
* @example
|
|
120
130
|
* ```html
|
|
121
131
|
* <tr comHeaderRowDef="['name', 'email', 'role']"></tr>
|
|
@@ -145,6 +155,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
145
155
|
/**
|
|
146
156
|
* Defines which columns appear in each body row and their order.
|
|
147
157
|
*
|
|
158
|
+
* @tokens none
|
|
159
|
+
*
|
|
148
160
|
* @example
|
|
149
161
|
* ```html
|
|
150
162
|
* <tr comRowDef [comRowDefColumns]="['name', 'email', 'role']"></tr>
|
|
@@ -166,6 +178,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
166
178
|
/**
|
|
167
179
|
* Defines which columns appear in the footer row and their order.
|
|
168
180
|
*
|
|
181
|
+
* @tokens none
|
|
182
|
+
*
|
|
169
183
|
* @example
|
|
170
184
|
* ```html
|
|
171
185
|
* <tr comFooterRowDef="['description', 'amount']"></tr>
|
|
@@ -189,6 +203,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
189
203
|
*
|
|
190
204
|
* Place inside `com-table`. The template receives the column count for colspan.
|
|
191
205
|
*
|
|
206
|
+
* @tokens none
|
|
207
|
+
*
|
|
192
208
|
* @example
|
|
193
209
|
* ```html
|
|
194
210
|
* <com-table [dataSource]="data()">
|
|
@@ -322,7 +338,7 @@ const tableRowVariants = cva('transition-colors hover:bg-muted-hover', {
|
|
|
322
338
|
variants: {
|
|
323
339
|
variant: {
|
|
324
340
|
default: 'border-b border-border-subtle',
|
|
325
|
-
striped: 'border-b border-border-subtle even:bg-muted
|
|
341
|
+
striped: 'border-b border-border-subtle even:bg-muted-stripe',
|
|
326
342
|
},
|
|
327
343
|
},
|
|
328
344
|
defaultVariants: {
|
|
@@ -444,15 +460,13 @@ class ComTable {
|
|
|
444
460
|
return map;
|
|
445
461
|
}, ...(ngDevMode ? [{ debugName: "columnDefMap" }] : []));
|
|
446
462
|
/** @internal Resolved render data — handles both array and DataSource inputs. */
|
|
447
|
-
|
|
463
|
+
renderData = computed(() => {
|
|
448
464
|
const ds = this.dataSource();
|
|
449
465
|
if (isDataSource(ds)) {
|
|
450
|
-
return ds.connect();
|
|
466
|
+
return ds.connect()();
|
|
451
467
|
}
|
|
452
|
-
return
|
|
453
|
-
}, ...(ngDevMode ? [{ debugName: "
|
|
454
|
-
/** @internal The actual data array to render. */
|
|
455
|
-
renderData = computed(() => this.dataSourceSignal()(), ...(ngDevMode ? [{ debugName: "renderData" }] : []));
|
|
468
|
+
return ds;
|
|
469
|
+
}, ...(ngDevMode ? [{ debugName: "renderData" }] : []));
|
|
456
470
|
/** @internal Header column names. */
|
|
457
471
|
headerColumns = computed(() => this.headerRowDef()?.columns() ?? [], ...(ngDevMode ? [{ debugName: "headerColumns" }] : []));
|
|
458
472
|
/** @internal Body column names. */
|
|
@@ -536,7 +550,7 @@ class ComTable {
|
|
|
536
550
|
</table>
|
|
537
551
|
|
|
538
552
|
@if (loading()) {
|
|
539
|
-
<div class="absolute inset-0 flex items-center justify-center bg-
|
|
553
|
+
<div class="absolute inset-0 flex items-center justify-center bg-overlay" aria-live="polite">
|
|
540
554
|
<com-spinner size="lg" color="primary" label="Loading..." />
|
|
541
555
|
</div>
|
|
542
556
|
}
|
|
@@ -605,7 +619,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
605
619
|
</table>
|
|
606
620
|
|
|
607
621
|
@if (loading()) {
|
|
608
|
-
<div class="absolute inset-0 flex items-center justify-center bg-
|
|
622
|
+
<div class="absolute inset-0 flex items-center justify-center bg-overlay" aria-live="polite">
|
|
609
623
|
<com-spinner size="lg" color="primary" label="Loading..." />
|
|
610
624
|
</div>
|
|
611
625
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-com-components-table.mjs","sources":["../../../projects/com/components/table/table-header-cell-def.directive.ts","../../../projects/com/components/table/table-cell-def.directive.ts","../../../projects/com/components/table/table-footer-cell-def.directive.ts","../../../projects/com/components/table/table-column-def.directive.ts","../../../projects/com/components/table/table-header-row-def.directive.ts","../../../projects/com/components/table/table-row-def.directive.ts","../../../projects/com/components/table/table-footer-row-def.directive.ts","../../../projects/com/components/table/table-no-data-row.directive.ts","../../../projects/com/components/table/table-data-source.ts","../../../projects/com/components/table/table.variants.ts","../../../projects/com/components/table/table.component.ts","../../../projects/com/components/table/index.ts","../../../projects/com/components/table/ngx-com-components-table.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural directive that captures the template for a header cell.\n *\n * Use with the star syntax inside a `comColumnDef` container.\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comHeaderCellDef]',\n})\nexport class ComHeaderCellDef {\n readonly templateRef: TemplateRef<void> = inject(TemplateRef<void>);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport type { CellDefContext } from './table.types';\n\n/**\n * Structural directive that captures the template for a body cell.\n *\n * Use with the star syntax inside a `comColumnDef` container.\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comCellDef]',\n})\nexport class ComCellDef<T = unknown> {\n readonly templateRef: TemplateRef<CellDefContext<T>> = inject(TemplateRef<CellDefContext<T>>);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural directive that captures the template for a footer cell.\n *\n * Use with the star syntax inside a `comColumnDef` container.\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"amount\">\n * <th *comHeaderCellDef>Amount</th>\n * <td *comCellDef=\"let row\">{{ row.amount | currency }}</td>\n * <td *comFooterCellDef>{{ total() | currency }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comFooterCellDef]',\n})\nexport class ComFooterCellDef {\n readonly templateRef: TemplateRef<void> = inject(TemplateRef<void>);\n}\n","import { contentChild, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { ComHeaderCellDef } from './table-header-cell-def.directive';\nimport { ComCellDef } from './table-cell-def.directive';\nimport { ComFooterCellDef } from './table-footer-cell-def.directive';\n\n/**\n * Defines a single column in a `com-table`.\n *\n * Contains a header cell template, a body cell template, and an optional footer cell template.\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comColumnDef]',\n exportAs: 'comColumnDef',\n})\nexport class ComColumnDef {\n /** The column name — used to match header/row column lists. */\n readonly name: InputSignal<string> = input.required<string>({ alias: 'comColumnDef' });\n\n /** @internal Header cell template for this column. */\n readonly headerCellDef: Signal<ComHeaderCellDef | undefined> =\n contentChild<ComHeaderCellDef>(ComHeaderCellDef);\n\n /** @internal Body cell template for this column. */\n readonly cellDef: Signal<ComCellDef | undefined> = contentChild<ComCellDef>(ComCellDef);\n\n /** @internal Optional footer cell template for this column. */\n readonly footerCellDef: Signal<ComFooterCellDef | undefined> =\n contentChild<ComFooterCellDef>(ComFooterCellDef);\n}\n","import { booleanAttribute, Directive, input } from '@angular/core';\nimport type { InputSignal, InputSignalWithTransform } from '@angular/core';\n\n/**\n * Defines which columns appear in the header row and their order.\n *\n * @example\n * ```html\n * <tr comHeaderRowDef=\"['name', 'email', 'role']\"></tr>\n * ```\n *\n * @example Sticky header row\n * ```html\n * <tr comHeaderRowDef=\"['name', 'email']\" comHeaderRowDefSticky></tr>\n * ```\n */\n@Directive({\n selector: '[comHeaderRowDef]',\n})\nexport class ComHeaderRowDef {\n /** Ordered list of column names to display. */\n readonly columns: InputSignal<string[]> = input.required<string[]>({ alias: 'comHeaderRowDef' });\n\n /** Makes this header row sticky (alternative to table-level `stickyHeader`). */\n readonly sticky: InputSignalWithTransform<boolean, unknown> = input(false, {\n alias: 'comHeaderRowDefSticky',\n transform: booleanAttribute,\n });\n}\n","import { Directive, input } from '@angular/core';\nimport type { InputSignal } from '@angular/core';\n\n/**\n * Defines which columns appear in each body row and their order.\n *\n * @example\n * ```html\n * <tr comRowDef [comRowDefColumns]=\"['name', 'email', 'role']\"></tr>\n * ```\n */\n@Directive({\n selector: '[comRowDef]',\n})\nexport class ComRowDef {\n /** Ordered list of column names to display per body row. */\n readonly columns: InputSignal<string[]> = input.required<string[]>({\n alias: 'comRowDefColumns',\n });\n}\n","import { Directive, input } from '@angular/core';\nimport type { InputSignal } from '@angular/core';\n\n/**\n * Defines which columns appear in the footer row and their order.\n *\n * @example\n * ```html\n * <tr comFooterRowDef=\"['description', 'amount']\"></tr>\n * ```\n */\n@Directive({\n selector: '[comFooterRowDef]',\n})\nexport class ComFooterRowDef {\n /** Ordered list of column names in the footer. */\n readonly columns: InputSignal<string[]> = input.required<string[]>({\n alias: 'comFooterRowDef',\n });\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural directive for the empty-state row shown when the data source is empty.\n *\n * Place inside `com-table`. The template receives the column count for colspan.\n *\n * @example\n * ```html\n * <com-table [dataSource]=\"data()\">\n * <!-- column defs... -->\n *\n * <ng-template comNoDataRow>\n * <td [attr.colspan]=\"displayedColumns().length\" class=\"text-center py-8\">\n * No results found.\n * </td>\n * </ng-template>\n * </com-table>\n * ```\n */\n@Directive({\n selector: '[comNoDataRow]',\n})\nexport class ComNoDataRow {\n readonly templateRef: TemplateRef<void> = inject(TemplateRef<void>);\n}\n","import type { Signal } from '@angular/core';\nimport { signal } from '@angular/core';\n\n/**\n * Abstract data source for ComTable.\n *\n * Implement `connect()` to provide a signal of data, and `disconnect()` to clean up.\n * The table calls `connect()` on init and `disconnect()` on destroy.\n *\n * @example Signal-based data source\n * ```typescript\n * class MyDataSource extends ComDataSource<User> {\n * private readonly data = signal<User[]>([]);\n *\n * connect(): Signal<readonly User[]> {\n * return this.data.asReadonly();\n * }\n *\n * disconnect(): void {\n * // cleanup if needed\n * }\n *\n * setData(users: User[]): void {\n * this.data.set(users);\n * }\n * }\n * ```\n */\nexport abstract class ComDataSource<T> {\n /** Returns a signal of the current data set. Called once when the table initializes. */\n abstract connect(): Signal<readonly T[]>;\n\n /** Cleanup resources. Called when the table is destroyed. */\n abstract disconnect(): void;\n}\n\n/**\n * Simple array-backed data source.\n *\n * Wraps a plain array in a writable signal so it can be used with ComTable's DataSource API.\n */\nexport class ComArrayDataSource<T> extends ComDataSource<T> {\n private readonly data = signal<readonly T[]>([]);\n\n constructor(initialData: T[] = []) {\n super();\n this.data.set(initialData);\n }\n\n connect(): Signal<readonly T[]> {\n return this.data.asReadonly();\n }\n\n disconnect(): void {\n // No cleanup needed for a simple array\n }\n\n /** Replace the entire data set. */\n setData(data: T[]): void {\n this.data.set(data);\n }\n}\n\n/**\n * Type guard to check if a value is a ComDataSource instance.\n */\nexport function isDataSource<T>(value: unknown): value is ComDataSource<T> {\n return value instanceof ComDataSource;\n}\n\n/** The types that ComTable accepts for its dataSource input. */\nexport type ComTableDataSourceInput<T> = T[] | ComDataSource<T>;\n","import { cva, type VariantProps } from 'class-variance-authority';\n\n// Table variant types\nexport type TableVariant = 'default' | 'striped';\nexport type TableDensity = 'compact' | 'default' | 'comfortable';\n\n/**\n * CVA variants for the table container wrapper.\n */\nexport const tableContainerVariants: (props?: Record<string, never>) => string = cva(\n 'relative overflow-x-auto'\n);\n\nexport type TableContainerVariants = VariantProps<typeof tableContainerVariants>;\n\n/**\n * CVA variants for the `<table>` element.\n *\n * @tokens `--color-foreground`\n */\nexport const tableVariants: (props?: Record<string, never>) => string = cva(\n 'w-full caption-bottom text-sm text-foreground'\n);\n\nexport type TableVariants = VariantProps<typeof tableVariants>;\n\n/**\n * CVA variants for the `<thead>` element.\n *\n * @tokens `--color-background`\n */\nexport const tableHeaderVariants: (props?: {\n sticky?: boolean;\n}) => string = cva('', {\n variants: {\n sticky: {\n true: 'sticky top-0 z-10 bg-background',\n false: '',\n },\n },\n defaultVariants: {\n sticky: false,\n },\n});\n\nexport type TableHeaderVariants = VariantProps<typeof tableHeaderVariants>;\n\n/**\n * CVA variants for `<th>` header cells.\n *\n * @tokens `--color-muted-foreground`\n */\nexport const tableHeaderCellVariants: (props?: {\n density?: TableDensity;\n}) => string = cva(\n 'text-left align-middle font-medium text-muted-foreground [&:has([comSortHeader])]:cursor-pointer',\n {\n variants: {\n density: {\n compact: 'h-8 px-3 text-xs',\n default: 'h-10 px-4 text-xs',\n comfortable: 'h-12 px-5 text-sm',\n },\n },\n defaultVariants: {\n density: 'default',\n },\n }\n);\n\nexport type TableHeaderCellVariants = VariantProps<typeof tableHeaderCellVariants>;\n\n/**\n * CVA variants for `<tbody> <tr>` rows.\n *\n * @tokens `--color-border-subtle`, `--color-muted`, `--color-muted-hover`\n */\nexport const tableRowVariants: (props?: {\n variant?: TableVariant;\n}) => string = cva('transition-colors hover:bg-muted-hover', {\n variants: {\n variant: {\n default: 'border-b border-border-subtle',\n striped: 'border-b border-border-subtle even:bg-muted/50',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport type TableRowVariants = VariantProps<typeof tableRowVariants>;\n\n/**\n * CVA variants for `<td>` body cells.\n */\nexport const tableBodyCellVariants: (props?: {\n density?: TableDensity;\n}) => string = cva('align-middle [&:has(com-checkbox)]:w-px', {\n variants: {\n density: {\n compact: 'px-3 py-1.5',\n default: 'px-4 py-2.5',\n comfortable: 'px-5 py-3.5',\n },\n },\n defaultVariants: {\n density: 'default',\n },\n});\n\nexport type TableBodyCellVariants = VariantProps<typeof tableBodyCellVariants>;\n\n/**\n * CVA variants for `<tfoot> <td>` footer cells.\n *\n * @tokens `--color-foreground`, `--color-border`\n */\nexport const tableFooterCellVariants: (props?: {\n density?: TableDensity;\n}) => string = cva('align-middle font-medium text-foreground border-t border-border', {\n variants: {\n density: {\n compact: 'h-8 px-3 text-xs',\n default: 'h-10 px-4 text-sm',\n comfortable: 'h-12 px-5 text-sm',\n },\n },\n defaultVariants: {\n density: 'default',\n },\n});\n\nexport type TableFooterCellVariants = VariantProps<typeof tableFooterCellVariants>;\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n inject,\n input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport type {\n InputSignal,\n InputSignalWithTransform,\n Signal,\n TrackByFunction,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ComSpinner } from 'ngx-com/components/spinner';\nimport { ComColumnDef } from './table-column-def.directive';\nimport { ComHeaderCellDef } from './table-header-cell-def.directive';\nimport { ComCellDef } from './table-cell-def.directive';\nimport { ComFooterCellDef } from './table-footer-cell-def.directive';\nimport { ComHeaderRowDef } from './table-header-row-def.directive';\nimport { ComRowDef } from './table-row-def.directive';\nimport { ComFooterRowDef } from './table-footer-row-def.directive';\nimport { ComNoDataRow } from './table-no-data-row.directive';\nimport { ComDataSource, isDataSource } from './table-data-source';\nimport type { ComTableDataSourceInput } from './table-data-source';\nimport type { TableVariant, TableDensity } from './table.variants';\nimport {\n tableContainerVariants,\n tableVariants,\n tableHeaderVariants,\n tableHeaderCellVariants,\n tableRowVariants,\n tableBodyCellVariants,\n tableFooterCellVariants,\n} from './table.variants';\n\n/**\n * Declarative data table component using native HTML `<table>` semantics.\n *\n * Define columns via `comColumnDef` with `*comHeaderCellDef` and `*comCellDef`,\n * then declare row structure via `comHeaderRowDef` and `comRowDef`.\n *\n * Accepts either a plain `T[]` or a `ComDataSource<T>` for the data source.\n *\n * @tokens `--color-background`, `--color-foreground`, `--color-muted`, `--color-muted-foreground`,\n * `--color-muted-hover`, `--color-border`, `--color-border-subtle`\n *\n * @example Basic table\n * ```html\n * <com-table [dataSource]=\"users()\">\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n *\n * <ng-container comColumnDef=\"email\">\n * <th *comHeaderCellDef>Email</th>\n * <td *comCellDef=\"let row\">{{ row.email }}</td>\n * </ng-container>\n *\n * <tr comHeaderRowDef=\"['name', 'email']\"></tr>\n * <tr comRowDef [comRowDefColumns]=\"['name', 'email']\"></tr>\n * </com-table>\n * ```\n *\n * @example With DataSource\n * ```typescript\n * class UserDataSource extends ComDataSource<User> {\n * private data = signal<User[]>([]);\n * connect() { return this.data.asReadonly(); }\n * disconnect() {}\n * setData(users: User[]) { this.data.set(users); }\n * }\n * ```\n * ```html\n * <com-table [dataSource]=\"userDataSource\">\n * ...\n * </com-table>\n * ```\n */\n@Component({\n selector: 'com-table',\n exportAs: 'comTable',\n template: `\n <div [class]=\"containerClasses()\">\n <table [class]=\"tableClasses()\" [attr.aria-label]=\"ariaLabel()\" [attr.aria-busy]=\"loading() || null\">\n <thead [class]=\"theadClasses()\">\n <tr>\n @for (colName of headerColumns(); track colName) {\n @let colDef = columnDefMap().get(colName);\n @if (colDef?.headerCellDef(); as headerDef) {\n <th [class]=\"thClasses()\" scope=\"col\">\n <ng-container [ngTemplateOutlet]=\"headerDef.templateRef\" />\n </th>\n }\n }\n </tr>\n </thead>\n\n <tbody>\n @if (!loading() && renderData().length === 0 && noDataRow()) {\n <tr>\n <ng-container [ngTemplateOutlet]=\"noDataRow()!.templateRef\" />\n </tr>\n } @else {\n @for (row of renderData(); track trackByFn()($index, row); let idx = $index) {\n <tr [class]=\"trClasses()\">\n @for (colName of bodyColumns(); track colName) {\n @let colDef = columnDefMap().get(colName);\n @if (colDef?.cellDef(); as cellDef) {\n <td [class]=\"tdClasses()\">\n <ng-container\n [ngTemplateOutlet]=\"cellDef.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: idx }\"\n />\n </td>\n }\n }\n </tr>\n }\n }\n </tbody>\n\n @if (footerRowDef()) {\n <tfoot>\n <tr>\n @for (colName of footerColumns(); track colName) {\n @let colDef = columnDefMap().get(colName);\n @if (colDef?.footerCellDef(); as footerDef) {\n <td [class]=\"tfootTdClasses()\">\n <ng-container [ngTemplateOutlet]=\"footerDef.templateRef\" />\n </td>\n }\n }\n </tr>\n </tfoot>\n }\n </table>\n\n @if (loading()) {\n <div class=\"absolute inset-0 flex items-center justify-center bg-background/60\" aria-live=\"polite\">\n <com-spinner size=\"lg\" color=\"primary\" label=\"Loading...\" />\n </div>\n }\n </div>\n `,\n imports: [NgTemplateOutlet, ComSpinner],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'block',\n },\n})\nexport class ComTable<T> {\n private readonly destroyRef: DestroyRef = inject(DestroyRef);\n\n // ─── Inputs ───\n\n /** The data to render — accepts a plain array or a ComDataSource. */\n readonly dataSource: InputSignal<ComTableDataSourceInput<T>> = input<ComTableDataSourceInput<T>>(\n [] as T[]\n );\n\n /** Track function for `@for`. Defaults to tracking by index. */\n readonly trackByFn: InputSignal<TrackByFunction<T>> = input<TrackByFunction<T>>(\n (index: number, _item: T) => index\n );\n\n /** Visual treatment of body rows. */\n readonly variant: InputSignal<TableVariant> = input<TableVariant>('default');\n\n /** Row height / cell padding. */\n readonly density: InputSignal<TableDensity> = input<TableDensity>('default');\n\n /** Whether the header row sticks on scroll. */\n readonly stickyHeader: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n /** Shows a loading overlay with spinner. */\n readonly loading: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n /** Accessible label for the table element. */\n readonly ariaLabel: InputSignal<string | undefined> = input<string | undefined>(undefined);\n\n // ─── Content Queries ───\n\n /** @internal All column definitions projected into the table. */\n readonly columnDefs: Signal<readonly ComColumnDef[]> = contentChildren<ComColumnDef>(ComColumnDef);\n\n /** @internal Header row definition. */\n readonly headerRowDef: Signal<ComHeaderRowDef | undefined> =\n contentChild<ComHeaderRowDef>(ComHeaderRowDef);\n\n /** @internal Body row definition. */\n readonly rowDef: Signal<ComRowDef | undefined> = contentChild<ComRowDef>(ComRowDef);\n\n /** @internal Optional footer row definition. */\n readonly footerRowDef: Signal<ComFooterRowDef | undefined> =\n contentChild<ComFooterRowDef>(ComFooterRowDef);\n\n /** @internal Optional no-data row template. */\n readonly noDataRow: Signal<ComNoDataRow | undefined> =\n contentChild<ComNoDataRow>(ComNoDataRow);\n\n // ─── Derived State ───\n\n /** @internal Map of column name → column definition for O(1) lookup. */\n protected readonly columnDefMap: Signal<Map<string, ComColumnDef>> = computed(() => {\n const map = new Map<string, ComColumnDef>();\n for (const col of this.columnDefs()) {\n map.set(col.name(), col);\n }\n return map;\n });\n\n /** @internal Resolved render data — handles both array and DataSource inputs. */\n private readonly dataSourceSignal: Signal<Signal<readonly T[]>> = computed(() => {\n const ds = this.dataSource();\n if (isDataSource<T>(ds)) {\n return ds.connect();\n }\n return signal<readonly T[]>(ds);\n });\n\n /** @internal The actual data array to render. */\n readonly renderData: Signal<readonly T[]> = computed(() => this.dataSourceSignal()());\n\n /** @internal Header column names. */\n protected readonly headerColumns: Signal<string[]> = computed(\n () => this.headerRowDef()?.columns() ?? []\n );\n\n /** @internal Body column names. */\n protected readonly bodyColumns: Signal<string[]> = computed(\n () => this.rowDef()?.columns() ?? this.headerColumns()\n );\n\n /** @internal Footer column names. */\n protected readonly footerColumns: Signal<string[]> = computed(\n () => this.footerRowDef()?.columns() ?? []\n );\n\n /** @internal Whether the header should be sticky. */\n private readonly isSticky: Signal<boolean> = computed(\n () => this.stickyHeader() || (this.headerRowDef()?.sticky() ?? false)\n );\n\n // ─── CVA Classes ───\n\n protected readonly containerClasses: Signal<string> = computed(() => tableContainerVariants());\n\n protected readonly tableClasses: Signal<string> = computed(() => tableVariants());\n\n protected readonly theadClasses: Signal<string> = computed(() =>\n tableHeaderVariants({ sticky: this.isSticky() })\n );\n\n protected readonly thClasses: Signal<string> = computed(() =>\n tableHeaderCellVariants({ density: this.density() })\n );\n\n protected readonly trClasses: Signal<string> = computed(() =>\n tableRowVariants({ variant: this.variant() })\n );\n\n protected readonly tdClasses: Signal<string> = computed(() =>\n tableBodyCellVariants({ density: this.density() })\n );\n\n protected readonly tfootTdClasses: Signal<string> = computed(() =>\n tableFooterCellVariants({ density: this.density() })\n );\n\n constructor() {\n // Disconnect DataSource on destroy\n this.destroyRef.onDestroy(() => {\n const ds = this.dataSource();\n if (isDataSource<T>(ds)) {\n ds.disconnect();\n }\n });\n }\n}\n","// Public API for the table component system\n\n// Main component\nexport { ComTable } from './table.component';\n\n// Data source\nexport { ComDataSource, ComArrayDataSource, isDataSource } from './table-data-source';\nexport type { ComTableDataSourceInput } from './table-data-source';\n\n// Column directives\nexport { ComColumnDef } from './table-column-def.directive';\nexport { ComHeaderCellDef } from './table-header-cell-def.directive';\nexport { ComCellDef } from './table-cell-def.directive';\nexport { ComFooterCellDef } from './table-footer-cell-def.directive';\n\n// Row directives\nexport { ComHeaderRowDef } from './table-header-row-def.directive';\nexport { ComRowDef } from './table-row-def.directive';\nexport { ComFooterRowDef } from './table-footer-row-def.directive';\nexport { ComNoDataRow } from './table-no-data-row.directive';\n\n// Types\nexport type { CellDefContext } from './table.types';\n\n// Variants\nexport {\n tableContainerVariants,\n tableVariants,\n tableHeaderVariants,\n tableHeaderCellVariants,\n tableRowVariants,\n tableBodyCellVariants,\n tableFooterCellVariants,\n} from './table.variants';\n\nexport type {\n TableVariant,\n TableDensity,\n TableContainerVariants,\n TableVariants,\n TableHeaderVariants,\n TableHeaderCellVariants,\n TableRowVariants,\n TableBodyCellVariants,\n TableFooterCellVariants,\n} from './table.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEA;;;;;;;;;;;;AAYG;MAIU,gBAAgB,CAAA;AAClB,IAAA,WAAW,GAAsB,MAAM,EAAC,WAAiB,EAAC;uGADxD,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC/B,iBAAA;;;ACdD;;;;;;;;;;;;AAYG;MAIU,UAAU,CAAA;AACZ,IAAA,WAAW,GAAmC,MAAM,EAAC,WAA8B,EAAC;uGADlF,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBAHtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACzB,iBAAA;;;AChBD;;;;;;;;;;;;;AAaG;MAIU,gBAAgB,CAAA;AAClB,IAAA,WAAW,GAAsB,MAAM,EAAC,WAAiB,EAAC;uGAD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AAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAG0B,SAAS,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAIlD,eAAe,2FAIlB,YAAY,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACnN3C;AAEA;;ACFA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-com-components-table.mjs","sources":["../../../projects/com/components/table/table-header-cell-def.directive.ts","../../../projects/com/components/table/table-cell-def.directive.ts","../../../projects/com/components/table/table-footer-cell-def.directive.ts","../../../projects/com/components/table/table-column-def.directive.ts","../../../projects/com/components/table/table-header-row-def.directive.ts","../../../projects/com/components/table/table-row-def.directive.ts","../../../projects/com/components/table/table-footer-row-def.directive.ts","../../../projects/com/components/table/table-no-data-row.directive.ts","../../../projects/com/components/table/table-data-source.ts","../../../projects/com/components/table/table.variants.ts","../../../projects/com/components/table/table.component.ts","../../../projects/com/components/table/index.ts","../../../projects/com/components/table/ngx-com-components-table.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural directive that captures the template for a header cell.\n *\n * Use with the star syntax inside a `comColumnDef` container.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comHeaderCellDef]',\n})\nexport class ComHeaderCellDef {\n readonly templateRef: TemplateRef<void> = inject(TemplateRef<void>);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport type { CellDefContext } from './table.types';\n\n/**\n * Structural directive that captures the template for a body cell.\n *\n * Use with the star syntax inside a `comColumnDef` container.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comCellDef]',\n})\nexport class ComCellDef<T = unknown> {\n readonly templateRef: TemplateRef<CellDefContext<T>> = inject(TemplateRef<CellDefContext<T>>);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural directive that captures the template for a footer cell.\n *\n * Use with the star syntax inside a `comColumnDef` container.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"amount\">\n * <th *comHeaderCellDef>Amount</th>\n * <td *comCellDef=\"let row\">{{ row.amount | currency }}</td>\n * <td *comFooterCellDef>{{ total() | currency }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comFooterCellDef]',\n})\nexport class ComFooterCellDef {\n readonly templateRef: TemplateRef<void> = inject(TemplateRef<void>);\n}\n","import { contentChild, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { ComHeaderCellDef } from './table-header-cell-def.directive';\nimport { ComCellDef } from './table-cell-def.directive';\nimport { ComFooterCellDef } from './table-footer-cell-def.directive';\n\n/**\n * Defines a single column in a `com-table`.\n *\n * Contains a header cell template, a body cell template, and an optional footer cell template.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comColumnDef]',\n exportAs: 'comColumnDef',\n})\nexport class ComColumnDef {\n /** The column name — used to match header/row column lists. */\n readonly name: InputSignal<string> = input.required<string>({ alias: 'comColumnDef' });\n\n /** @internal Header cell template for this column. */\n readonly headerCellDef: Signal<ComHeaderCellDef | undefined> =\n contentChild<ComHeaderCellDef>(ComHeaderCellDef);\n\n /** @internal Body cell template for this column. */\n readonly cellDef: Signal<ComCellDef | undefined> = contentChild<ComCellDef>(ComCellDef);\n\n /** @internal Optional footer cell template for this column. */\n readonly footerCellDef: Signal<ComFooterCellDef | undefined> =\n contentChild<ComFooterCellDef>(ComFooterCellDef);\n}\n","import { booleanAttribute, Directive, input } from '@angular/core';\nimport type { InputSignal, InputSignalWithTransform } from '@angular/core';\n\n/**\n * Defines which columns appear in the header row and their order.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <tr comHeaderRowDef=\"['name', 'email', 'role']\"></tr>\n * ```\n *\n * @example Sticky header row\n * ```html\n * <tr comHeaderRowDef=\"['name', 'email']\" comHeaderRowDefSticky></tr>\n * ```\n */\n@Directive({\n selector: '[comHeaderRowDef]',\n})\nexport class ComHeaderRowDef {\n /** Ordered list of column names to display. */\n readonly columns: InputSignal<string[]> = input.required<string[]>({ alias: 'comHeaderRowDef' });\n\n /** Makes this header row sticky (alternative to table-level `stickyHeader`). */\n readonly sticky: InputSignalWithTransform<boolean, unknown> = input(false, {\n alias: 'comHeaderRowDefSticky',\n transform: booleanAttribute,\n });\n}\n","import { Directive, input } from '@angular/core';\nimport type { InputSignal } from '@angular/core';\n\n/**\n * Defines which columns appear in each body row and their order.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <tr comRowDef [comRowDefColumns]=\"['name', 'email', 'role']\"></tr>\n * ```\n */\n@Directive({\n selector: '[comRowDef]',\n})\nexport class ComRowDef {\n /** Ordered list of column names to display per body row. */\n readonly columns: InputSignal<string[]> = input.required<string[]>({\n alias: 'comRowDefColumns',\n });\n}\n","import { Directive, input } from '@angular/core';\nimport type { InputSignal } from '@angular/core';\n\n/**\n * Defines which columns appear in the footer row and their order.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <tr comFooterRowDef=\"['description', 'amount']\"></tr>\n * ```\n */\n@Directive({\n selector: '[comFooterRowDef]',\n})\nexport class ComFooterRowDef {\n /** Ordered list of column names in the footer. */\n readonly columns: InputSignal<string[]> = input.required<string[]>({\n alias: 'comFooterRowDef',\n });\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural directive for the empty-state row shown when the data source is empty.\n *\n * Place inside `com-table`. The template receives the column count for colspan.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <com-table [dataSource]=\"data()\">\n * <!-- column defs... -->\n *\n * <ng-template comNoDataRow>\n * <td [attr.colspan]=\"displayedColumns().length\" class=\"text-center py-8\">\n * No results found.\n * </td>\n * </ng-template>\n * </com-table>\n * ```\n */\n@Directive({\n selector: '[comNoDataRow]',\n})\nexport class ComNoDataRow {\n readonly templateRef: TemplateRef<void> = inject(TemplateRef<void>);\n}\n","import type { Signal } from '@angular/core';\nimport { signal } from '@angular/core';\n\n/**\n * Abstract data source for ComTable.\n *\n * Implement `connect()` to provide a signal of data, and `disconnect()` to clean up.\n * The table calls `connect()` on init and `disconnect()` on destroy.\n *\n * @example Signal-based data source\n * ```typescript\n * class MyDataSource extends ComDataSource<User> {\n * private readonly data = signal<User[]>([]);\n *\n * connect(): Signal<readonly User[]> {\n * return this.data.asReadonly();\n * }\n *\n * disconnect(): void {\n * // cleanup if needed\n * }\n *\n * setData(users: User[]): void {\n * this.data.set(users);\n * }\n * }\n * ```\n */\nexport abstract class ComDataSource<T> {\n /** Returns a signal of the current data set. Called once when the table initializes. */\n abstract connect(): Signal<readonly T[]>;\n\n /** Cleanup resources. Called when the table is destroyed. */\n abstract disconnect(): void;\n}\n\n/**\n * Simple array-backed data source.\n *\n * Wraps a plain array in a writable signal so it can be used with ComTable's DataSource API.\n */\nexport class ComArrayDataSource<T> extends ComDataSource<T> {\n private readonly data = signal<readonly T[]>([]);\n\n constructor(initialData: T[] = []) {\n super();\n this.data.set(initialData);\n }\n\n connect(): Signal<readonly T[]> {\n return this.data.asReadonly();\n }\n\n disconnect(): void {\n // No cleanup needed for a simple array\n }\n\n /** Replace the entire data set. */\n setData(data: T[]): void {\n this.data.set(data);\n }\n}\n\n/**\n * Type guard to check if a value is a ComDataSource instance.\n */\nexport function isDataSource<T>(value: unknown): value is ComDataSource<T> {\n return value instanceof ComDataSource;\n}\n\n/** The types that ComTable accepts for its dataSource input. */\nexport type ComTableDataSourceInput<T> = T[] | ComDataSource<T>;\n","import { cva, type VariantProps } from 'class-variance-authority';\n\n// Table variant types\nexport type TableVariant = 'default' | 'striped';\nexport type TableDensity = 'compact' | 'default' | 'comfortable';\n\n/**\n * CVA variants for the table container wrapper.\n */\nexport const tableContainerVariants: (props?: Record<string, never>) => string = cva(\n 'relative overflow-x-auto'\n);\n\nexport type TableContainerVariants = VariantProps<typeof tableContainerVariants>;\n\n/**\n * CVA variants for the `<table>` element.\n *\n * @tokens `--color-foreground`\n */\nexport const tableVariants: (props?: Record<string, never>) => string = cva(\n 'w-full caption-bottom text-sm text-foreground'\n);\n\nexport type TableVariants = VariantProps<typeof tableVariants>;\n\n/**\n * CVA variants for the `<thead>` element.\n *\n * @tokens `--color-background`\n */\nexport const tableHeaderVariants: (props?: {\n sticky?: boolean;\n}) => string = cva('', {\n variants: {\n sticky: {\n true: 'sticky top-0 z-10 bg-background',\n false: '',\n },\n },\n defaultVariants: {\n sticky: false,\n },\n});\n\nexport type TableHeaderVariants = VariantProps<typeof tableHeaderVariants>;\n\n/**\n * CVA variants for `<th>` header cells.\n *\n * @tokens `--color-muted-foreground`\n */\nexport const tableHeaderCellVariants: (props?: {\n density?: TableDensity;\n}) => string = cva(\n 'text-left align-middle font-medium text-muted-foreground [&:has([comSortHeader])]:cursor-pointer',\n {\n variants: {\n density: {\n compact: 'h-8 px-3 text-xs',\n default: 'h-10 px-4 text-xs',\n comfortable: 'h-12 px-5 text-sm',\n },\n },\n defaultVariants: {\n density: 'default',\n },\n }\n);\n\nexport type TableHeaderCellVariants = VariantProps<typeof tableHeaderCellVariants>;\n\n/**\n * CVA variants for `<tbody> <tr>` rows.\n *\n * @tokens `--color-border-subtle`, `--color-muted`, `--color-muted-hover`\n */\nexport const tableRowVariants: (props?: {\n variant?: TableVariant;\n}) => string = cva('transition-colors hover:bg-muted-hover', {\n variants: {\n variant: {\n default: 'border-b border-border-subtle',\n striped: 'border-b border-border-subtle even:bg-muted-stripe',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport type TableRowVariants = VariantProps<typeof tableRowVariants>;\n\n/**\n * CVA variants for `<td>` body cells.\n */\nexport const tableBodyCellVariants: (props?: {\n density?: TableDensity;\n}) => string = cva('align-middle [&:has(com-checkbox)]:w-px', {\n variants: {\n density: {\n compact: 'px-3 py-1.5',\n default: 'px-4 py-2.5',\n comfortable: 'px-5 py-3.5',\n },\n },\n defaultVariants: {\n density: 'default',\n },\n});\n\nexport type TableBodyCellVariants = VariantProps<typeof tableBodyCellVariants>;\n\n/**\n * CVA variants for `<tfoot> <td>` footer cells.\n *\n * @tokens `--color-foreground`, `--color-border`\n */\nexport const tableFooterCellVariants: (props?: {\n density?: TableDensity;\n}) => string = cva('align-middle font-medium text-foreground border-t border-border', {\n variants: {\n density: {\n compact: 'h-8 px-3 text-xs',\n default: 'h-10 px-4 text-sm',\n comfortable: 'h-12 px-5 text-sm',\n },\n },\n defaultVariants: {\n density: 'default',\n },\n});\n\nexport type TableFooterCellVariants = VariantProps<typeof tableFooterCellVariants>;\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport type {\n InputSignal,\n InputSignalWithTransform,\n Signal,\n TrackByFunction,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ComSpinner } from 'ngx-com/components/spinner';\nimport { ComColumnDef } from './table-column-def.directive';\nimport { ComHeaderRowDef } from './table-header-row-def.directive';\nimport { ComRowDef } from './table-row-def.directive';\nimport { ComFooterRowDef } from './table-footer-row-def.directive';\nimport { ComNoDataRow } from './table-no-data-row.directive';\nimport { isDataSource } from './table-data-source';\nimport type { ComTableDataSourceInput } from './table-data-source';\nimport type { TableVariant, TableDensity } from './table.variants';\nimport {\n tableContainerVariants,\n tableVariants,\n tableHeaderVariants,\n tableHeaderCellVariants,\n tableRowVariants,\n tableBodyCellVariants,\n tableFooterCellVariants,\n} from './table.variants';\n\n/**\n * Declarative data table component using native HTML `<table>` semantics.\n *\n * Define columns via `comColumnDef` with `*comHeaderCellDef` and `*comCellDef`,\n * then declare row structure via `comHeaderRowDef` and `comRowDef`.\n *\n * Accepts either a plain `T[]` or a `ComDataSource<T>` for the data source.\n *\n * @tokens `--color-background`, `--color-foreground`, `--color-muted`, `--color-muted-foreground`,\n * `--color-muted-hover`, `--color-border`, `--color-border-subtle`\n *\n * @example Basic table\n * ```html\n * <com-table [dataSource]=\"users()\">\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n *\n * <ng-container comColumnDef=\"email\">\n * <th *comHeaderCellDef>Email</th>\n * <td *comCellDef=\"let row\">{{ row.email }}</td>\n * </ng-container>\n *\n * <tr comHeaderRowDef=\"['name', 'email']\"></tr>\n * <tr comRowDef [comRowDefColumns]=\"['name', 'email']\"></tr>\n * </com-table>\n * ```\n *\n * @example With DataSource\n * ```typescript\n * class UserDataSource extends ComDataSource<User> {\n * private data = signal<User[]>([]);\n * connect() { return this.data.asReadonly(); }\n * disconnect() {}\n * setData(users: User[]) { this.data.set(users); }\n * }\n * ```\n * ```html\n * <com-table [dataSource]=\"userDataSource\">\n * ...\n * </com-table>\n * ```\n */\n@Component({\n selector: 'com-table',\n exportAs: 'comTable',\n template: `\n <div [class]=\"containerClasses()\">\n <table [class]=\"tableClasses()\" [attr.aria-label]=\"ariaLabel()\" [attr.aria-busy]=\"loading() || null\">\n <thead [class]=\"theadClasses()\">\n <tr>\n @for (colName of headerColumns(); track colName) {\n @let colDef = columnDefMap().get(colName);\n @if (colDef?.headerCellDef(); as headerDef) {\n <th [class]=\"thClasses()\" scope=\"col\">\n <ng-container [ngTemplateOutlet]=\"headerDef.templateRef\" />\n </th>\n }\n }\n </tr>\n </thead>\n\n <tbody>\n @if (!loading() && renderData().length === 0 && noDataRow()) {\n <tr>\n <ng-container [ngTemplateOutlet]=\"noDataRow()!.templateRef\" />\n </tr>\n } @else {\n @for (row of renderData(); track trackByFn()($index, row); let idx = $index) {\n <tr [class]=\"trClasses()\">\n @for (colName of bodyColumns(); track colName) {\n @let colDef = columnDefMap().get(colName);\n @if (colDef?.cellDef(); as cellDef) {\n <td [class]=\"tdClasses()\">\n <ng-container\n [ngTemplateOutlet]=\"cellDef.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: idx }\"\n />\n </td>\n }\n }\n </tr>\n }\n }\n </tbody>\n\n @if (footerRowDef()) {\n <tfoot>\n <tr>\n @for (colName of footerColumns(); track colName) {\n @let colDef = columnDefMap().get(colName);\n @if (colDef?.footerCellDef(); as footerDef) {\n <td [class]=\"tfootTdClasses()\">\n <ng-container [ngTemplateOutlet]=\"footerDef.templateRef\" />\n </td>\n }\n }\n </tr>\n </tfoot>\n }\n </table>\n\n @if (loading()) {\n <div class=\"absolute inset-0 flex items-center justify-center bg-overlay\" aria-live=\"polite\">\n <com-spinner size=\"lg\" color=\"primary\" label=\"Loading...\" />\n </div>\n }\n </div>\n `,\n imports: [NgTemplateOutlet, ComSpinner],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'block',\n },\n})\nexport class ComTable<T> {\n private readonly destroyRef: DestroyRef = inject(DestroyRef);\n\n // ─── Inputs ───\n\n /** The data to render — accepts a plain array or a ComDataSource. */\n readonly dataSource: InputSignal<ComTableDataSourceInput<T>> = input<ComTableDataSourceInput<T>>(\n [] as T[]\n );\n\n /** Track function for `@for`. Defaults to tracking by index. */\n readonly trackByFn: InputSignal<TrackByFunction<T>> = input<TrackByFunction<T>>(\n (index: number, _item: T) => index\n );\n\n /** Visual treatment of body rows. */\n readonly variant: InputSignal<TableVariant> = input<TableVariant>('default');\n\n /** Row height / cell padding. */\n readonly density: InputSignal<TableDensity> = input<TableDensity>('default');\n\n /** Whether the header row sticks on scroll. */\n readonly stickyHeader: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n /** Shows a loading overlay with spinner. */\n readonly loading: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n /** Accessible label for the table element. */\n readonly ariaLabel: InputSignal<string | undefined> = input<string | undefined>(undefined);\n\n // ─── Content Queries ───\n\n /** @internal All column definitions projected into the table. */\n readonly columnDefs: Signal<readonly ComColumnDef[]> = contentChildren<ComColumnDef>(ComColumnDef);\n\n /** @internal Header row definition. */\n readonly headerRowDef: Signal<ComHeaderRowDef | undefined> =\n contentChild<ComHeaderRowDef>(ComHeaderRowDef);\n\n /** @internal Body row definition. */\n readonly rowDef: Signal<ComRowDef | undefined> = contentChild<ComRowDef>(ComRowDef);\n\n /** @internal Optional footer row definition. */\n readonly footerRowDef: Signal<ComFooterRowDef | undefined> =\n contentChild<ComFooterRowDef>(ComFooterRowDef);\n\n /** @internal Optional no-data row template. */\n readonly noDataRow: Signal<ComNoDataRow | undefined> =\n contentChild<ComNoDataRow>(ComNoDataRow);\n\n // ─── Derived State ───\n\n /** @internal Map of column name → column definition for O(1) lookup. */\n protected readonly columnDefMap: Signal<Map<string, ComColumnDef>> = computed(() => {\n const map = new Map<string, ComColumnDef>();\n for (const col of this.columnDefs()) {\n map.set(col.name(), col);\n }\n return map;\n });\n\n /** @internal Resolved render data — handles both array and DataSource inputs. */\n readonly renderData: Signal<readonly T[]> = computed(() => {\n const ds = this.dataSource();\n if (isDataSource<T>(ds)) {\n return ds.connect()();\n }\n return ds;\n });\n\n /** @internal Header column names. */\n protected readonly headerColumns: Signal<string[]> = computed(\n () => this.headerRowDef()?.columns() ?? []\n );\n\n /** @internal Body column names. */\n protected readonly bodyColumns: Signal<string[]> = computed(\n () => this.rowDef()?.columns() ?? this.headerColumns()\n );\n\n /** @internal Footer column names. */\n protected readonly footerColumns: Signal<string[]> = computed(\n () => this.footerRowDef()?.columns() ?? []\n );\n\n /** @internal Whether the header should be sticky. */\n private readonly isSticky: Signal<boolean> = computed(\n () => this.stickyHeader() || (this.headerRowDef()?.sticky() ?? false)\n );\n\n // ─── CVA Classes ───\n\n protected readonly containerClasses: Signal<string> = computed(() => tableContainerVariants());\n\n protected readonly tableClasses: Signal<string> = computed(() => tableVariants());\n\n protected readonly theadClasses: Signal<string> = computed(() =>\n tableHeaderVariants({ sticky: this.isSticky() })\n );\n\n protected readonly thClasses: Signal<string> = computed(() =>\n tableHeaderCellVariants({ density: this.density() })\n );\n\n protected readonly trClasses: Signal<string> = computed(() =>\n tableRowVariants({ variant: this.variant() })\n );\n\n protected readonly tdClasses: Signal<string> = computed(() =>\n tableBodyCellVariants({ density: this.density() })\n );\n\n protected readonly tfootTdClasses: Signal<string> = computed(() =>\n tableFooterCellVariants({ density: this.density() })\n );\n\n constructor() {\n // Disconnect DataSource on destroy\n this.destroyRef.onDestroy(() => {\n const ds = this.dataSource();\n if (isDataSource<T>(ds)) {\n ds.disconnect();\n }\n });\n }\n}\n","// Public API for the table component system\n\n// Main component\nexport { ComTable } from './table.component';\n\n// Data source\nexport { ComDataSource, ComArrayDataSource, isDataSource } from './table-data-source';\nexport type { ComTableDataSourceInput } from './table-data-source';\n\n// Column directives\nexport { ComColumnDef } from './table-column-def.directive';\nexport { ComHeaderCellDef } from './table-header-cell-def.directive';\nexport { ComCellDef } from './table-cell-def.directive';\nexport { ComFooterCellDef } from './table-footer-cell-def.directive';\n\n// Row directives\nexport { ComHeaderRowDef } from './table-header-row-def.directive';\nexport { ComRowDef } from './table-row-def.directive';\nexport { ComFooterRowDef } from './table-footer-row-def.directive';\nexport { ComNoDataRow } from './table-no-data-row.directive';\n\n// Types\nexport type { CellDefContext } from './table.types';\n\n// Variants\nexport {\n tableContainerVariants,\n tableVariants,\n tableHeaderVariants,\n tableHeaderCellVariants,\n tableRowVariants,\n tableBodyCellVariants,\n tableFooterCellVariants,\n} from './table.variants';\n\nexport type {\n TableVariant,\n TableDensity,\n TableContainerVariants,\n TableVariants,\n TableHeaderVariants,\n TableHeaderCellVariants,\n TableRowVariants,\n TableBodyCellVariants,\n TableFooterCellVariants,\n} from './table.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEA;;;;;;;;;;;;;;AAcG;MAIU,gBAAgB,CAAA;AAClB,IAAA,WAAW,GAAsB,MAAM,EAAC,WAAiB,EAAC;uGADxD,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC/B,iBAAA;;;AChBD;;;;;;;;;;;;;;AAcG;MAIU,UAAU,CAAA;AACZ,IAAA,WAAW,GAAmC,MAAM,EAAC,WAA8B,EAAC;uGADlF,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBAHtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACzB,iBAAA;;;AClBD;;;;;;;;;;;;;;;AAeG;MAIU,gBAAgB,CAAA;AAClB,IAAA,WAAW,GAAsB,MAAM,EAAC,WAAiB,EAAC;uGADxD,gBAAgB,EAAA,IAAA,EA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