@egose/shadcn-theme-ng 0.0.17 → 0.0.18
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/alert/fesm2022/alert.mjs +1 -1
- package/alert/fesm2022/alert.mjs.map +1 -1
- package/checkbox/fesm2022/checkbox.mjs +1 -1
- package/checkbox/fesm2022/checkbox.mjs.map +1 -1
- package/exports.json +1 -1
- package/package.json +5 -5
- package/{switch → sheet}/README.md +4 -4
- package/sheet/fesm2022/sheet.mjs +271 -0
- package/sheet/fesm2022/sheet.mjs.map +1 -0
- package/sheet/index.d.ts +79 -0
- package/switch/fesm2022/switch.mjs +0 -139
- package/switch/fesm2022/switch.mjs.map +0 -1
- package/switch/index.d.ts +0 -56
package/alert/fesm2022/alert.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.mjs","sources":["../../../projects/alert/src/lib/alert.ts","../../../projects/alert/src/lib/alert-description.ts","../../../projects/alert/src/lib/alert-icon.ts","../../../projects/alert/src/lib/alert-title.ts","../../../projects/alert/src/public-api.ts","../../../projects/alert/src/alert.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\n\nconst alertVariants = cva(\n 'tw:relative tw:w-full tw:items-start tw:gap-y-0.5 tw:rounded-lg tw:border tw:px-4 tw:py-3 tw:text-sm tw:has-[>[hlmAlertIcon]]:grid tw:has-[>[hlmAlertIcon]]:grid-cols-[calc(theme(spacing.1)*4)_1fr] tw:has-[>[hlmAlertIcon]]:gap-x-3 tw:[&>[hlmAlertIcon]]:size-4 tw:[&>[hlmAlertIcon]]:translate-y-0.5 tw:[&>[hlmAlertIcon]]:text-current',\n {\n variants: {\n variant: {\n primary: 'tw:bg-primary tw:text-primary-foreground tw:[&>[hlmAlertDescription]]:text-primary-foreground/90',\n secondary:\n 'tw:bg-secondary tw:text-secondary-foreground tw:[&>[hlmAlertDescription]]:text-secondary-foreground/90',\n success: 'tw:bg-success tw:text-success-foreground tw:[&>[hlmAlertDescription]]:text-success-foreground/90',\n warning: 'tw:bg-warning tw:text-warning-foreground tw:[&>[hlmAlertDescription]]:text-warning-foreground/90',\n danger: 'tw:bg-danger tw:text-danger-foreground tw:[&>[hlmAlertDescription]]:text-danger-foreground/90',\n info: 'tw:bg-info tw:text-info-foreground tw:[&>[hlmAlertDescription]]:text-info-foreground/90',\n light: 'tw:bg-light tw:text-light-foreground tw:[&>[hlmAlertDescription]]:text-light-foreground/90',\n dark: 'tw:bg-dark tw:text-dark-foreground tw:[&>[hlmAlertDescription]]:text-dark-foreground/90',\n accent: 'tw:bg-accent tw:text-accent-foreground tw:[&>[hlmAlertDescription]]:text-accent-foreground/90',\n destructive:\n 'tw:bg-destructive tw:text-destructive-foreground tw:[&>[hlmAlertDescription]]:text-destructive-foreground/90',\n muted: 'tw:bg-muted tw:text-muted-foreground tw:[&>[hlmAlertDescription]]:text-muted-foreground/90',\n link: 'tw:text-primary tw:underline-offset-4 tw:[&>[hlmAlertDescription]]:text-primary/90',\n ghost: 'tw:[&>[hlmAlertDescription]]:text-muted-foreground',\n },\n appearance: {\n solid: '',\n light: 'tw:text-semibold',\n },\n },\n compoundVariants: [\n {\n variant: 'primary',\n appearance: 'light',\n class: 'tw:bg-primary/20 tw:text-primary tw:[&>[hlmAlertDescription]]:text-primary',\n },\n {\n variant: 'secondary',\n appearance: 'light',\n class: 'tw:bg-secondary/20 tw:text-secondary tw:[&>[hlmAlertDescription]]:text-secondary',\n },\n {\n variant: 'success',\n appearance: 'light',\n class: 'tw:bg-success/20 tw:text-success tw:[&>[hlmAlertDescription]]:text-success',\n },\n {\n variant: 'warning',\n appearance: 'light',\n class: 'tw:bg-warning/20 tw:text-warning tw:[&>[hlmAlertDescription]]:text-warning',\n },\n {\n variant: 'danger',\n appearance: 'light',\n class: 'tw:bg-danger/20 tw:text-danger tw:[&>[hlmAlertDescription]]:text-danger',\n },\n {\n variant: 'info',\n appearance: 'light',\n class: 'tw:bg-info/20 tw:text-info tw:[&>[hlmAlertDescription]]:text-info',\n },\n {\n variant: 'light',\n appearance: 'light',\n class: 'tw:bg-light/20 tw:text-light tw:[&>[hlmAlertDescription]]:text-light',\n },\n {\n variant: 'dark',\n appearance: 'light',\n class: 'tw:bg-dark/20 tw:text-dark tw:[&>[hlmAlertDescription]]:text-dark',\n },\n {\n variant: 'accent',\n appearance: 'light',\n class: 'tw:bg-accent/20 tw:text-accent tw:[&>[hlmAlertDescription]]:text-accent',\n },\n {\n variant: 'destructive',\n appearance: 'light',\n class: 'tw:bg-destructive/20 tw:text-destructive tw:[&>[hlmAlertDescription]]:text-destructive',\n },\n {\n variant: 'muted',\n appearance: 'light',\n class: 'tw:bg-muted/20 tw:text-muted tw:[&>[hlmAlertDescription]]:text-muted',\n },\n {\n variant: 'link',\n appearance: 'light',\n class: 'tw:bg-primary/10 tw:text-primary tw:[&>[hlmAlertDescription]]:text-primary',\n },\n {\n variant: 'ghost',\n appearance: 'light',\n class: 'tw:bg-muted/10 tw:text-muted-foreground tw:[&>[hlmAlertDescription]]:text-muted-foreground',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n appearance: 'solid',\n },\n },\n);\nexport type AlertVariants = VariantProps<typeof alertVariants>;\nexport type VariantType = NonNullable<AlertVariants['variant']>;\nexport type AppearanceType = NonNullable<AlertVariants['appearance']>;\n@Directive({\n selector: '[hlmAlert]',\n host: {\n role: 'alert',\n '[class]': '_computedClass()',\n },\n})\nexport class HlmAlert {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n public readonly variant = input<AlertVariants['variant']>('primary');\n public readonly appearance = input<AlertVariants['appearance']>('solid');\n protected readonly _computedClass = computed(() =>\n hlm(\n alertVariants({\n variant: this.variant(),\n appearance: this.appearance(),\n }),\n this.userClass(),\n ),\n );\n}\n","import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmAlertDesc],[hlmAlertDescription]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmAlertDescription {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:text-current tw:col-start-2 tw:grid tw:justify-items-start tw:gap-1 tw:text-sm tw:[&_p]:leading-relaxed',\n this.userClass(),\n ),\n );\n}\n","import { Directive } from '@angular/core';\nimport { provideHlmIconConfig } from '@egose/shadcn-theme-ng/icon';\n\n@Directive({\n selector: '[hlmAlertIcon]',\n providers: [provideHlmIconConfig({ size: 'sm' })],\n})\nexport class HlmAlertIcon {}\n","import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmAlertTitle]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmAlertTitle {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm('tw:col-start-2 tw:line-clamp-1 tw:min-h-4 tw:text-md tw:font-semibold tw:tracking-tight', this.userClass()),\n );\n}\n","/*\n * Public API Surface of alert\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmAlert } from './lib/alert';\nimport { HlmAlertDescription } from './lib/alert-description';\nimport { HlmAlertIcon } from './lib/alert-icon';\nimport { HlmAlertTitle } from './lib/alert-title';\n\nexport * from './lib/alert';\nexport * from './lib/alert-description';\nexport * from './lib/alert-icon';\nexport * from './lib/alert-title';\n\nexport const HlmAlertImports = [HlmAlert, HlmAlertTitle, HlmAlertDescription, HlmAlertIcon] as const;\n\n@NgModule({\n imports: [...HlmAlertImports],\n exports: [...HlmAlertImports],\n})\nexport class HlmAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAKA,MAAM,aAAa,G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MAM7E,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAAA,OAAA,EAAA,CANK,QAAQ,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,CAAA,EAAA,OAAA,EAAA,CAA1D,QAAQ,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,CAAA,EAAA,CAAA;wGAM7E,cAAc,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC9B,iBAAA;;;ACrBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"alert.mjs","sources":["../../../projects/alert/src/lib/alert.ts","../../../projects/alert/src/lib/alert-description.ts","../../../projects/alert/src/lib/alert-icon.ts","../../../projects/alert/src/lib/alert-title.ts","../../../projects/alert/src/public-api.ts","../../../projects/alert/src/alert.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\n\nconst alertVariants = cva(\n 'tw:relative tw:w-full tw:items-start tw:gap-y-0.5 tw:rounded-lg tw:border tw:px-4 tw:py-3 tw:text-sm tw:has-[>[hlmAlertIcon]]:grid tw:has-[>[hlmAlertIcon]]:grid-cols-[calc(theme(spacing.1)*4)_1fr] tw:has-[>[hlmAlertIcon]]:gap-x-3 tw:[&>[hlmAlertIcon]]:size-4 tw:[&>[hlmAlertIcon]]:translate-y-0.5 tw:[&>[hlmAlertIcon]]:text-current',\n {\n variants: {\n variant: {\n primary: 'tw:bg-primary tw:text-primary-foreground tw:[&>[hlmAlertDescription]]:text-primary-foreground/90',\n secondary:\n 'tw:bg-secondary tw:text-secondary-foreground tw:[&>[hlmAlertDescription]]:text-secondary-foreground/90',\n success: 'tw:bg-success tw:text-success-foreground tw:[&>[hlmAlertDescription]]:text-success-foreground/90',\n warning: 'tw:bg-warning tw:text-warning-foreground tw:[&>[hlmAlertDescription]]:text-warning-foreground/90',\n danger: 'tw:bg-danger tw:text-danger-foreground tw:[&>[hlmAlertDescription]]:text-danger-foreground/90',\n info: 'tw:bg-info tw:text-info-foreground tw:[&>[hlmAlertDescription]]:text-info-foreground/90',\n light: 'tw:bg-light tw:text-light-foreground tw:[&>[hlmAlertDescription]]:text-light-foreground/90',\n dark: 'tw:bg-dark tw:text-dark-foreground tw:[&>[hlmAlertDescription]]:text-dark-foreground/90',\n accent: 'tw:bg-accent tw:text-accent-foreground tw:[&>[hlmAlertDescription]]:text-accent-foreground/90',\n destructive:\n 'tw:bg-destructive tw:text-destructive-foreground tw:[&>[hlmAlertDescription]]:text-destructive-foreground/90',\n muted: 'tw:bg-muted tw:text-muted-foreground tw:[&>[hlmAlertDescription]]:text-muted-foreground/90',\n link: 'tw:text-primary tw:underline-offset-4 tw:[&>[hlmAlertDescription]]:text-primary/90',\n ghost: 'tw:[&>[hlmAlertDescription]]:text-muted-foreground',\n },\n appearance: {\n solid: '',\n light: 'tw:font-semibold',\n },\n },\n compoundVariants: [\n {\n variant: 'primary',\n appearance: 'light',\n class: 'tw:bg-primary/20 tw:text-primary tw:[&>[hlmAlertDescription]]:text-primary',\n },\n {\n variant: 'secondary',\n appearance: 'light',\n class: 'tw:bg-secondary/20 tw:text-secondary tw:[&>[hlmAlertDescription]]:text-secondary',\n },\n {\n variant: 'success',\n appearance: 'light',\n class: 'tw:bg-success/20 tw:text-success tw:[&>[hlmAlertDescription]]:text-success',\n },\n {\n variant: 'warning',\n appearance: 'light',\n class: 'tw:bg-warning/20 tw:text-warning tw:[&>[hlmAlertDescription]]:text-warning',\n },\n {\n variant: 'danger',\n appearance: 'light',\n class: 'tw:bg-danger/20 tw:text-danger tw:[&>[hlmAlertDescription]]:text-danger',\n },\n {\n variant: 'info',\n appearance: 'light',\n class: 'tw:bg-info/20 tw:text-info tw:[&>[hlmAlertDescription]]:text-info',\n },\n {\n variant: 'light',\n appearance: 'light',\n class: 'tw:bg-light/20 tw:text-light tw:[&>[hlmAlertDescription]]:text-light',\n },\n {\n variant: 'dark',\n appearance: 'light',\n class: 'tw:bg-dark/20 tw:text-dark tw:[&>[hlmAlertDescription]]:text-dark',\n },\n {\n variant: 'accent',\n appearance: 'light',\n class: 'tw:bg-accent/20 tw:text-accent tw:[&>[hlmAlertDescription]]:text-accent',\n },\n {\n variant: 'destructive',\n appearance: 'light',\n class: 'tw:bg-destructive/20 tw:text-destructive tw:[&>[hlmAlertDescription]]:text-destructive',\n },\n {\n variant: 'muted',\n appearance: 'light',\n class: 'tw:bg-muted/20 tw:text-muted tw:[&>[hlmAlertDescription]]:text-muted',\n },\n {\n variant: 'link',\n appearance: 'light',\n class: 'tw:bg-primary/10 tw:text-primary tw:[&>[hlmAlertDescription]]:text-primary',\n },\n {\n variant: 'ghost',\n appearance: 'light',\n class: 'tw:bg-muted/10 tw:text-muted-foreground tw:[&>[hlmAlertDescription]]:text-muted-foreground',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n appearance: 'solid',\n },\n },\n);\nexport type AlertVariants = VariantProps<typeof alertVariants>;\nexport type VariantType = NonNullable<AlertVariants['variant']>;\nexport type AppearanceType = NonNullable<AlertVariants['appearance']>;\n@Directive({\n selector: '[hlmAlert]',\n host: {\n role: 'alert',\n '[class]': '_computedClass()',\n },\n})\nexport class HlmAlert {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n public readonly variant = input<AlertVariants['variant']>('primary');\n public readonly appearance = input<AlertVariants['appearance']>('solid');\n protected readonly _computedClass = computed(() =>\n hlm(\n alertVariants({\n variant: this.variant(),\n appearance: this.appearance(),\n }),\n this.userClass(),\n ),\n );\n}\n","import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmAlertDesc],[hlmAlertDescription]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmAlertDescription {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:text-current tw:col-start-2 tw:grid tw:justify-items-start tw:gap-1 tw:text-sm tw:[&_p]:leading-relaxed',\n this.userClass(),\n ),\n );\n}\n","import { Directive } from '@angular/core';\nimport { provideHlmIconConfig } from '@egose/shadcn-theme-ng/icon';\n\n@Directive({\n selector: '[hlmAlertIcon]',\n providers: [provideHlmIconConfig({ size: 'sm' })],\n})\nexport class HlmAlertIcon {}\n","import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmAlertTitle]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmAlertTitle {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm('tw:col-start-2 tw:line-clamp-1 tw:min-h-4 tw:text-md tw:font-semibold tw:tracking-tight', this.userClass()),\n );\n}\n","/*\n * Public API Surface of alert\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmAlert } from './lib/alert';\nimport { HlmAlertDescription } from './lib/alert-description';\nimport { HlmAlertIcon } from './lib/alert-icon';\nimport { HlmAlertTitle } from './lib/alert-title';\n\nexport * from './lib/alert';\nexport * from './lib/alert-description';\nexport * from './lib/alert-icon';\nexport * from './lib/alert-title';\n\nexport const HlmAlertImports = [HlmAlert, HlmAlertTitle, HlmAlertDescription, HlmAlertIcon] as const;\n\n@NgModule({\n imports: [...HlmAlertImports],\n exports: [...HlmAlertImports],\n})\nexport class HlmAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAKA,MAAM,aAAa,GAAG,GAAG,CACvB,6UAA6U,EAC7U;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,kGAAkG;AAC3G,YAAA,SAAS,EACP,wGAAwG;AAC1G,YAAA,OAAO,EAAE,kGAAkG;AAC3G,YAAA,OAAO,EAAE,kGAAkG;AAC3G,YAAA,MAAM,EAAE,+FAA+F;AACvG,YAAA,IAAI,EAAE,yFAAyF;AAC/F,YAAA,KAAK,EAAE,4FAA4F;AACnG,YAAA,IAAI,EAAE,yFAAyF;AAC/F,YAAA,MAAM,EAAE,+FAA+F;AACvG,YAAA,WAAW,EACT,8GAA8G;AAChH,YAAA,KAAK,EAAE,4FAA4F;AACnG,YAAA,IAAI,EAAE,oFAAoF;AAC1F,YAAA,KAAK,EAAE,oDAAoD;AAC5D,SAAA;AACD,QAAA,UAAU,EAAE;AACV,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,KAAK,EAAE,kBAAkB;AAC1B,SAAA;AACF,KAAA;AACD,IAAA,gBAAgB,EAAE;AAChB,QAAA;AACE,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,UAAU,EAAE,OAAO;AACnB,YAAA,KAAK,EAAE,4EAA4E;AACpF,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,WAAW;AACpB,YAAA,UAAU,EAAE,OAAO;AACnB,YAAA,KAAK,EAAE,kFAAkF;AAC1F,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,UAAU,EAAE,OAAO;AACnB,YAAA,KAAK,EAAE,4EAA4E;AACpF,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,SAAS;AAClB,YAAA,UAAU,EAAE,OAAO;AACnB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I,EAAE;AACJ,wBAAA,SAAS,EAAE,kBAAkB;AAC9B,qBAAA;AACF,iBAAA;;;ACTD;;AAEG;AAcI,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY;MAM7E,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EAAA,OAAA,EAAA,CANK,QAAQ,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,CAAA,EAAA,OAAA,EAAA,CAA1D,QAAQ,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,CAAA,EAAA,CAAA;wGAM7E,cAAc,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC9B,iBAAA;;;ACrBD;;AAEG;;;;"}
|
|
@@ -79,7 +79,7 @@ class HlmCheckbox {
|
|
|
79
79
|
</span>
|
|
80
80
|
}
|
|
81
81
|
</brn-checkbox>
|
|
82
|
-
`, isInline: true, dependencies: [{ kind: "component", type: BrnCheckbox, selector: "brn-checkbox", inputs: ["checked", "id", "name", "class", "aria-label", "aria-labelledby", "aria-describedby", "required", "disabled"], outputs: ["checkedChange", "
|
|
82
|
+
`, isInline: true, dependencies: [{ kind: "component", type: BrnCheckbox, selector: "brn-checkbox", inputs: ["checked", "id", "name", "class", "aria-label", "aria-labelledby", "aria-describedby", "required", "disabled"], outputs: ["checkedChange", "touched"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: HlmIcon, selector: "ng-icon[hlm]", inputs: ["size"] }], viewProviders: [provideIcons({ lucideCheck })], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
83
83
|
}
|
|
84
84
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmCheckbox, decorators: [{
|
|
85
85
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.mjs","sources":["../../../projects/checkbox/src/lib/checkbox.ts","../../../projects/checkbox/src/public-api.ts","../../../projects/checkbox/src/checkbox.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NgIcon, provideIcons } from '@ng-icons/core';\nimport { lucideCheck } from '@ng-icons/lucide';\nimport { BrnCheckbox } from '@spartan-ng/brain/checkbox';\nimport type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\nimport { HlmIcon } from '@egose/shadcn-theme-ng/icon';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\nexport const HLM_CHECKBOX_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => HlmCheckbox),\n multi: true,\n};\n\n@Component({\n selector: 'hlm-checkbox',\n imports: [BrnCheckbox, NgIcon, HlmIcon],\n template: `\n <brn-checkbox\n [id]=\"id()\"\n [name]=\"name()\"\n [class]=\"_computedClass()\"\n [checked]=\"checked()\"\n [disabled]=\"_state().disabled()\"\n [required]=\"required()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [aria-describedby]=\"ariaDescribedby()\"\n (changed)=\"_handleChange()\"\n (touched)=\"_onTouched?.()\"\n >\n @if (checked()) {\n <span class=\"tw:flex tw:items-center tw:justify-center tw:text-current tw:transition-none\">\n <ng-icon hlm size=\"14px\" name=\"lucideCheck\" />\n </span>\n }\n </brn-checkbox>\n `,\n host: {\n class: 'contents peer',\n '[attr.id]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n '[attr.data-disabled]': '_state().disabled() ? \"\" : null',\n },\n providers: [HLM_CHECKBOX_VALUE_ACCESSOR],\n viewProviders: [provideIcons({ lucideCheck })],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmCheckbox implements ControlValueAccessor {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:border-input tw:dark:bg-input/30 tw:data-[state=checked]:bg-primary tw:data-[state=checked]:text-primary-foreground tw:dark:data-[state=checked]:bg-primary tw:data-[state=checked]:border-primary tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:aria-invalid:ring-destructive/20 tw:dark:aria-invalid:ring-destructive/40 tw:aria-invalid:border-destructive tw:shadow-xs tw:peer tw:size-4 tw:shrink-0 tw:cursor-default tw:rounded-[4px] tw:border tw:outline-none tw:transition-shadow tw:focus-visible:ring-[3px] tw:disabled:cursor-not-allowed tw:disabled:opacity-50',\n this.userClass(),\n this._state().disabled() ? 'tw:cursor-not-allowed tw:opacity-50' : '',\n ),\n );\n\n /** Used to set the id on the underlying brn element. */\n public readonly id = input<string | null>(null);\n\n /** Used to set the aria-label attribute on the underlying brn element. */\n public readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /** Used to set the aria-labelledby attribute on the underlying brn element. */\n public readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n /** Used to set the aria-describedby attribute on the underlying brn element. */\n public readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n /** The checked state of the checkbox. */\n public readonly checked = model<CheckboxValue>(false);\n\n /** The name attribute of the checkbox. */\n public readonly name = input<string | null>(null);\n\n /** Whether the checkbox is required. */\n public readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** Whether the checkbox is disabled. */\n public readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly _state = computed(() => ({\n disabled: signal(this.disabled()),\n }));\n\n public readonly changed = output<boolean>();\n\n protected _onChange?: ChangeFn<CheckboxValue>;\n protected _onTouched?: TouchFn;\n\n protected _handleChange(): void {\n if (this._state().disabled()) return;\n\n const previousChecked = this.checked();\n this.checked.set(previousChecked === 'indeterminate' ? true : !previousChecked);\n this._onChange?.(!previousChecked);\n this.changed.emit(!previousChecked);\n }\n\n /** CONTROL VALUE ACCESSOR */\n writeValue(value: CheckboxValue): void {\n this.checked.set(!!value);\n }\n\n registerOnChange(fn: ChangeFn<CheckboxValue>): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: TouchFn): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._state().disabled.set(isDisabled);\n }\n}\n\ntype CheckboxValue = boolean | 'indeterminate';\n","/*\n * Public API Surface of checkbox\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmCheckbox } from './lib/checkbox';\n\nexport * from './lib/checkbox';\n\nexport const HlmCheckboxImports = [HlmCheckbox] as const;\n@NgModule({\n imports: [...HlmCheckboxImports],\n exports: [...HlmCheckboxImports],\n})\nexport class HlmCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAqBO,MAAM,2BAA2B,GAAG;AACzC,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;AAC1C,IAAA,KAAK,EAAE,IAAI;;MAuCA,WAAW,CAAA;AACN,IAAA,SAAS,GAAG,KAAK,CAA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AkB,CAAC;AACjC,iBAAA;;;ACdD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"checkbox.mjs","sources":["../../../projects/checkbox/src/lib/checkbox.ts","../../../projects/checkbox/src/public-api.ts","../../../projects/checkbox/src/checkbox.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NgIcon, provideIcons } from '@ng-icons/core';\nimport { lucideCheck } from '@ng-icons/lucide';\nimport { BrnCheckbox } from '@spartan-ng/brain/checkbox';\nimport type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\nimport { HlmIcon } from '@egose/shadcn-theme-ng/icon';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\nexport const HLM_CHECKBOX_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => HlmCheckbox),\n multi: true,\n};\n\n@Component({\n selector: 'hlm-checkbox',\n imports: [BrnCheckbox, NgIcon, HlmIcon],\n template: `\n <brn-checkbox\n [id]=\"id()\"\n [name]=\"name()\"\n [class]=\"_computedClass()\"\n [checked]=\"checked()\"\n [disabled]=\"_state().disabled()\"\n [required]=\"required()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [aria-describedby]=\"ariaDescribedby()\"\n (changed)=\"_handleChange()\"\n (touched)=\"_onTouched?.()\"\n >\n @if (checked()) {\n <span class=\"tw:flex tw:items-center tw:justify-center tw:text-current tw:transition-none\">\n <ng-icon hlm size=\"14px\" name=\"lucideCheck\" />\n </span>\n }\n </brn-checkbox>\n `,\n host: {\n class: 'contents peer',\n '[attr.id]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n '[attr.data-disabled]': '_state().disabled() ? \"\" : null',\n },\n providers: [HLM_CHECKBOX_VALUE_ACCESSOR],\n viewProviders: [provideIcons({ lucideCheck })],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmCheckbox implements ControlValueAccessor {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:border-input tw:dark:bg-input/30 tw:data-[state=checked]:bg-primary tw:data-[state=checked]:text-primary-foreground tw:dark:data-[state=checked]:bg-primary tw:data-[state=checked]:border-primary tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:aria-invalid:ring-destructive/20 tw:dark:aria-invalid:ring-destructive/40 tw:aria-invalid:border-destructive tw:shadow-xs tw:peer tw:size-4 tw:shrink-0 tw:cursor-default tw:rounded-[4px] tw:border tw:outline-none tw:transition-shadow tw:focus-visible:ring-[3px] tw:disabled:cursor-not-allowed tw:disabled:opacity-50',\n this.userClass(),\n this._state().disabled() ? 'tw:cursor-not-allowed tw:opacity-50' : '',\n ),\n );\n\n /** Used to set the id on the underlying brn element. */\n public readonly id = input<string | null>(null);\n\n /** Used to set the aria-label attribute on the underlying brn element. */\n public readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /** Used to set the aria-labelledby attribute on the underlying brn element. */\n public readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n /** Used to set the aria-describedby attribute on the underlying brn element. */\n public readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n /** The checked state of the checkbox. */\n public readonly checked = model<CheckboxValue>(false);\n\n /** The name attribute of the checkbox. */\n public readonly name = input<string | null>(null);\n\n /** Whether the checkbox is required. */\n public readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** Whether the checkbox is disabled. */\n public readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly _state = computed(() => ({\n disabled: signal(this.disabled()),\n }));\n\n public readonly changed = output<boolean>();\n\n protected _onChange?: ChangeFn<CheckboxValue>;\n protected _onTouched?: TouchFn;\n\n protected _handleChange(): void {\n if (this._state().disabled()) return;\n\n const previousChecked = this.checked();\n this.checked.set(previousChecked === 'indeterminate' ? true : !previousChecked);\n this._onChange?.(!previousChecked);\n this.changed.emit(!previousChecked);\n }\n\n /** CONTROL VALUE ACCESSOR */\n writeValue(value: CheckboxValue): void {\n this.checked.set(!!value);\n }\n\n registerOnChange(fn: ChangeFn<CheckboxValue>): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: TouchFn): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._state().disabled.set(isDisabled);\n }\n}\n\ntype CheckboxValue = boolean | 'indeterminate';\n","/*\n * Public API Surface of checkbox\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmCheckbox } from './lib/checkbox';\n\nexport * from './lib/checkbox';\n\nexport const HlmCheckboxImports = [HlmCheckbox] as const;\n@NgModule({\n imports: [...HlmCheckboxImports],\n exports: [...HlmCheckboxImports],\n})\nexport class HlmCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAqBO,MAAM,2BAA2B,GAAG;AACzC,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;AAC1C,IAAA,KAAK,EAAE,IAAI;;MAuCA,WAAW,CAAA;AACN,IAAA,SAAS,GAAG,KAAK,CAAa,EAAE,6CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAElD,IAAA,cAAc,GAAG,QAAQ,CAAC,MAC3C,GAAG,CACD,ikBAAikB,EACjkB,IAAI,CAAC,SAAS,EAAE,EAChB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,GAAG,qCAAqC,GAAG,EAAE,CACtE,0D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BAAmB,EAAE,MAAM;AAC3B,wBAAA,wBAAwB,EAAE,MAAM;AAChC,wBAAA,yBAAyB,EAAE,MAAM;AACjC,wBAAA,sBAAsB,EAAE,iCAAiC;AAC1D,qBAAA;oBACD,SAAS,EAAE,CAAC,2BAA2B,CAAC;oBACxC,aAAa,EAAE,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;oBAC9C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;AC9DD;;AAEG;AAQI,MAAM,kBAAkB,GAAG,CAAC,WAAW;MAKjC,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAjB,iBAAiB,EAAA,OAAA,EAAA,CALK,WAAW,CAAA,EAAA,OAAA,EAAA,CAAX,WAAW,CAAA,EAAA,CAAA;AAKjC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHf,kBAAkB,CAAA,EAAA,CAAA;;2FAGpB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AACjC,iBAAA;;;ACdD;;AAEG;;;;"}
|
package/exports.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"./utils":{"types":"./utils/index.d.ts","default":"./utils/fesm2022/utils.mjs"},"./icon":{"types":"./icon/index.d.ts","default":"./icon/fesm2022/icon.mjs"},"./spinner":{"types":"./spinner/index.d.ts","default":"./spinner/fesm2022/spinner.mjs"},"./badge":{"types":"./badge/index.d.ts","default":"./badge/fesm2022/badge.mjs"},"./input":{"types":"./input/index.d.ts","default":"./input/fesm2022/input.mjs"},"./select":{"types":"./select/index.d.ts","default":"./select/fesm2022/select.mjs"},"./button":{"types":"./button/index.d.ts","default":"./button/fesm2022/button.mjs"},"./accordion":{"types":"./accordion/index.d.ts","default":"./accordion/fesm2022/accordion.mjs"},"./alert":{"types":"./alert/index.d.ts","default":"./alert/fesm2022/alert.mjs"},"./
|
|
1
|
+
{"./utils":{"types":"./utils/index.d.ts","default":"./utils/fesm2022/utils.mjs"},"./icon":{"types":"./icon/index.d.ts","default":"./icon/fesm2022/icon.mjs"},"./spinner":{"types":"./spinner/index.d.ts","default":"./spinner/fesm2022/spinner.mjs"},"./badge":{"types":"./badge/index.d.ts","default":"./badge/fesm2022/badge.mjs"},"./input":{"types":"./input/index.d.ts","default":"./input/fesm2022/input.mjs"},"./select":{"types":"./select/index.d.ts","default":"./select/fesm2022/select.mjs"},"./button":{"types":"./button/index.d.ts","default":"./button/fesm2022/button.mjs"},"./accordion":{"types":"./accordion/index.d.ts","default":"./accordion/fesm2022/accordion.mjs"},"./alert":{"types":"./alert/index.d.ts","default":"./alert/fesm2022/alert.mjs"},"./label":{"types":"./label/index.d.ts","default":"./label/fesm2022/label.mjs"},"./form-field":{"types":"./form-field/index.d.ts","default":"./form-field/fesm2022/form-field.mjs"},"./form-field-simple":{"types":"./form-field-simple/index.d.ts","default":"./form-field-simple/fesm2022/form-field-simple.mjs"},"./checkbox":{"types":"./checkbox/index.d.ts","default":"./checkbox/fesm2022/checkbox.mjs"},"./popover":{"types":"./popover/index.d.ts","default":"./popover/fesm2022/popover.mjs"},"./calendar":{"types":"./calendar/index.d.ts","default":"./calendar/fesm2022/calendar.mjs"},"./date-picker":{"types":"./date-picker/index.d.ts","default":"./date-picker/fesm2022/date-picker.mjs"},"./dialog":{"types":"./dialog/index.d.ts","default":"./dialog/fesm2022/dialog.mjs"},"./radio-group":{"types":"./radio-group/index.d.ts","default":"./radio-group/fesm2022/radio-group.mjs"},"./separator":{"types":"./separator/index.d.ts","default":"./separator/fesm2022/separator.mjs"},"./sheet":{"types":"./sheet/index.d.ts","default":"./sheet/fesm2022/sheet.mjs"},"./tabs":{"types":"./tabs/index.d.ts","default":"./tabs/fesm2022/tabs.mjs"},"./tooltip":{"types":"./tooltip/index.d.ts","default":"./tooltip/fesm2022/tooltip.mjs"},"./form-select":{"types":"./form-select/index.d.ts","default":"./form-select/fesm2022/form-select.mjs"},"./form-text-input":{"types":"./form-text-input/index.d.ts","default":"./form-text-input/fesm2022/form-text-input.mjs"},"./form-textarea":{"types":"./form-textarea/index.d.ts","default":"./form-textarea/fesm2022/form-textarea.mjs"},"./form-date-picker":{"types":"./form-date-picker/index.d.ts","default":"./form-date-picker/fesm2022/form-date-picker.mjs"},"./basic-alert":{"types":"./basic-alert/index.d.ts","default":"./basic-alert/fesm2022/basic-alert.mjs"},"./confirmation-dialog":{"types":"./confirmation-dialog/index.d.ts","default":"./confirmation-dialog/fesm2022/confirmation-dialog.mjs"},"./sonner":{"types":"./sonner/index.d.ts","default":"./sonner/fesm2022/sonner.mjs"},"./autocomplete":{"types":"./autocomplete/index.d.ts","default":"./autocomplete/fesm2022/autocomplete.mjs"},"./searchable-multiselect":{"types":"./searchable-multiselect/index.d.ts","default":"./searchable-multiselect/fesm2022/searchable-multiselect.mjs"},"./form-searchable-multiselect":{"types":"./form-searchable-multiselect/index.d.ts","default":"./form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs"},"./form-checkbox":{"types":"./form-checkbox/index.d.ts","default":"./form-checkbox/fesm2022/form-checkbox.mjs"}}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
2
|
+
"version": "0.0.18",
|
|
3
3
|
"description": "Angular shadcn UI theme",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
@@ -51,10 +51,6 @@
|
|
|
51
51
|
"types": "./alert/index.d.ts",
|
|
52
52
|
"default": "./alert/fesm2022/alert.mjs"
|
|
53
53
|
},
|
|
54
|
-
"./switch": {
|
|
55
|
-
"types": "./switch/index.d.ts",
|
|
56
|
-
"default": "./switch/fesm2022/switch.mjs"
|
|
57
|
-
},
|
|
58
54
|
"./label": {
|
|
59
55
|
"types": "./label/index.d.ts",
|
|
60
56
|
"default": "./label/fesm2022/label.mjs"
|
|
@@ -95,6 +91,10 @@
|
|
|
95
91
|
"types": "./separator/index.d.ts",
|
|
96
92
|
"default": "./separator/fesm2022/separator.mjs"
|
|
97
93
|
},
|
|
94
|
+
"./sheet": {
|
|
95
|
+
"types": "./sheet/index.d.ts",
|
|
96
|
+
"default": "./sheet/fesm2022/sheet.mjs"
|
|
97
|
+
},
|
|
98
98
|
"./tabs": {
|
|
99
99
|
"types": "./tabs/index.d.ts",
|
|
100
100
|
"default": "./tabs/fesm2022/tabs.mjs"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Sheet
|
|
2
2
|
|
|
3
|
-
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.3.0.
|
|
4
4
|
|
|
5
5
|
## Code scaffolding
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ ng generate --help
|
|
|
21
21
|
To build the library, run:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
ng build
|
|
24
|
+
ng build sheet
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
@@ -33,7 +33,7 @@ Once the project is built, you can publish your library by following these steps
|
|
|
33
33
|
1. Navigate to the `dist` directory:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
cd dist/
|
|
36
|
+
cd dist/sheet
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, effect, untracked, Directive, forwardRef, ChangeDetectionStrategy, ViewEncapsulation, Component, signal, inject, Renderer2, ElementRef, NgModule } from '@angular/core';
|
|
3
|
+
import { BrnDialog, provideBrnDialogDefaultOptions } from '@spartan-ng/brain/dialog';
|
|
4
|
+
import * as i1 from '@spartan-ng/brain/sheet';
|
|
5
|
+
import { BrnSheet, BrnSheetOverlay, BrnSheetClose, BrnSheetDescription, BrnSheetTitle } from '@spartan-ng/brain/sheet';
|
|
6
|
+
import { injectCustomClassSettable, injectExposesStateProvider, injectExposedSideProvider } from '@spartan-ng/brain/core';
|
|
7
|
+
import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
8
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
9
|
+
import { lucideX } from '@ng-icons/lucide';
|
|
10
|
+
import { HlmIcon } from '@egose/shadcn-theme-ng/icon';
|
|
11
|
+
import { cva } from 'class-variance-authority';
|
|
12
|
+
|
|
13
|
+
class HlmSheetOverlay {
|
|
14
|
+
_classSettable = injectCustomClassSettable({ optional: true, host: true });
|
|
15
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
16
|
+
_computedClass = computed(() => hlm('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 bg-black/50', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
17
|
+
constructor() {
|
|
18
|
+
effect(() => {
|
|
19
|
+
const classValue = this._computedClass();
|
|
20
|
+
untracked(() => this._classSettable?.setClassToCustomElement(classValue));
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetOverlay, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
24
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetOverlay, isStandalone: true, selector: "[hlmSheetOverlay],brn-sheet-overlay[hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
25
|
+
}
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetOverlay, decorators: [{
|
|
27
|
+
type: Directive,
|
|
28
|
+
args: [{
|
|
29
|
+
selector: '[hlmSheetOverlay],brn-sheet-overlay[hlm]',
|
|
30
|
+
host: {
|
|
31
|
+
'[class]': '_computedClass()',
|
|
32
|
+
},
|
|
33
|
+
}]
|
|
34
|
+
}], ctorParameters: () => [] });
|
|
35
|
+
|
|
36
|
+
class HlmSheet extends BrnSheet {
|
|
37
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheet, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: HlmSheet, isStandalone: true, selector: "hlm-sheet", providers: [
|
|
39
|
+
{
|
|
40
|
+
provide: BrnDialog,
|
|
41
|
+
useExisting: forwardRef(() => BrnSheet),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
provide: BrnSheet,
|
|
45
|
+
useExisting: forwardRef(() => HlmSheet),
|
|
46
|
+
},
|
|
47
|
+
provideBrnDialogDefaultOptions({
|
|
48
|
+
// add custom options here
|
|
49
|
+
}),
|
|
50
|
+
], exportAs: ["hlmSheet"], usesInheritance: true, ngImport: i0, template: `
|
|
51
|
+
<brn-sheet-overlay hlm />
|
|
52
|
+
<ng-content />
|
|
53
|
+
`, isInline: true, dependencies: [{ kind: "component", type: BrnSheetOverlay, selector: "brn-sheet-overlay" }, { kind: "directive", type: HlmSheetOverlay, selector: "[hlmSheetOverlay],brn-sheet-overlay[hlm]", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
54
|
+
}
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheet, decorators: [{
|
|
56
|
+
type: Component,
|
|
57
|
+
args: [{
|
|
58
|
+
selector: 'hlm-sheet',
|
|
59
|
+
imports: [BrnSheetOverlay, HlmSheetOverlay],
|
|
60
|
+
providers: [
|
|
61
|
+
{
|
|
62
|
+
provide: BrnDialog,
|
|
63
|
+
useExisting: forwardRef(() => BrnSheet),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
provide: BrnSheet,
|
|
67
|
+
useExisting: forwardRef(() => HlmSheet),
|
|
68
|
+
},
|
|
69
|
+
provideBrnDialogDefaultOptions({
|
|
70
|
+
// add custom options here
|
|
71
|
+
}),
|
|
72
|
+
],
|
|
73
|
+
template: `
|
|
74
|
+
<brn-sheet-overlay hlm />
|
|
75
|
+
<ng-content />
|
|
76
|
+
`,
|
|
77
|
+
encapsulation: ViewEncapsulation.None,
|
|
78
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
79
|
+
exportAs: 'hlmSheet',
|
|
80
|
+
}]
|
|
81
|
+
}] });
|
|
82
|
+
|
|
83
|
+
class HlmSheetClose {
|
|
84
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
85
|
+
_computedClass = computed(() => hlm('ring-offset-background focus:ring-ring data-[state=open]:bg-secondary rounded-xs focus:outline-hidden absolute right-4 top-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
86
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
87
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetClose, isStandalone: true, selector: "[hlmSheetClose],[brnSheetClose][hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
88
|
+
}
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetClose, decorators: [{
|
|
90
|
+
type: Directive,
|
|
91
|
+
args: [{
|
|
92
|
+
selector: '[hlmSheetClose],[brnSheetClose][hlm]',
|
|
93
|
+
host: {
|
|
94
|
+
'[class]': '_computedClass()',
|
|
95
|
+
},
|
|
96
|
+
}]
|
|
97
|
+
}] });
|
|
98
|
+
|
|
99
|
+
const sheetVariants = cva('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500', {
|
|
100
|
+
variants: {
|
|
101
|
+
side: {
|
|
102
|
+
top: 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b',
|
|
103
|
+
bottom: 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t',
|
|
104
|
+
left: 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
|
|
105
|
+
right: 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
defaultVariants: {
|
|
109
|
+
side: 'right',
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
class HlmSheetContent {
|
|
113
|
+
_stateProvider = injectExposesStateProvider({ host: true });
|
|
114
|
+
_sideProvider = injectExposedSideProvider({ host: true });
|
|
115
|
+
state = this._stateProvider.state ?? signal('closed');
|
|
116
|
+
_renderer = inject(Renderer2);
|
|
117
|
+
_element = inject(ElementRef);
|
|
118
|
+
constructor() {
|
|
119
|
+
effect(() => {
|
|
120
|
+
this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
124
|
+
_computedClass = computed(() => hlm(sheetVariants({ side: this._sideProvider.side() }), this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
125
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
126
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetContent, isStandalone: true, selector: "hlm-sheet-content", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()", "attr.data-state": "state()" } }, providers: [provideIcons({ lucideX })], ngImport: i0, template: `
|
|
127
|
+
<ng-content />
|
|
128
|
+
<button brnSheetClose hlm class="cursor-pointer">
|
|
129
|
+
<span class="sr-only">Close</span>
|
|
130
|
+
<ng-icon hlm size="sm" name="lucideX" />
|
|
131
|
+
</button>
|
|
132
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: HlmSheetClose, selector: "[hlmSheetClose],[brnSheetClose][hlm]", inputs: ["class"] }, { kind: "directive", type: BrnSheetClose, selector: "button[brnSheetClose]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: HlmIcon, selector: "ng-icon[hlm]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
133
|
+
}
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetContent, decorators: [{
|
|
135
|
+
type: Component,
|
|
136
|
+
args: [{
|
|
137
|
+
selector: 'hlm-sheet-content',
|
|
138
|
+
imports: [HlmSheetClose, BrnSheetClose, NgIcon, HlmIcon],
|
|
139
|
+
providers: [provideIcons({ lucideX })],
|
|
140
|
+
host: {
|
|
141
|
+
'[class]': '_computedClass()',
|
|
142
|
+
'[attr.data-state]': 'state()',
|
|
143
|
+
},
|
|
144
|
+
template: `
|
|
145
|
+
<ng-content />
|
|
146
|
+
<button brnSheetClose hlm class="cursor-pointer">
|
|
147
|
+
<span class="sr-only">Close</span>
|
|
148
|
+
<ng-icon hlm size="sm" name="lucideX" />
|
|
149
|
+
</button>
|
|
150
|
+
`,
|
|
151
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
152
|
+
}]
|
|
153
|
+
}], ctorParameters: () => [] });
|
|
154
|
+
|
|
155
|
+
class HlmSheetDescription {
|
|
156
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
157
|
+
_computedClass = computed(() => hlm('text-muted-foreground text-sm', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
159
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetDescription, isStandalone: true, selector: "[hlmSheetDescription]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnSheetDescription }], ngImport: i0 });
|
|
160
|
+
}
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetDescription, decorators: [{
|
|
162
|
+
type: Directive,
|
|
163
|
+
args: [{
|
|
164
|
+
selector: '[hlmSheetDescription]',
|
|
165
|
+
host: {
|
|
166
|
+
'[class]': '_computedClass()',
|
|
167
|
+
},
|
|
168
|
+
hostDirectives: [BrnSheetDescription],
|
|
169
|
+
}]
|
|
170
|
+
}] });
|
|
171
|
+
|
|
172
|
+
class HlmSheetFooter {
|
|
173
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
174
|
+
_computedClass = computed(() => hlm('mt-auto flex flex-col gap-2 p-4', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
175
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
176
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetFooter, isStandalone: true, selector: "hlm-sheet-footer", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
177
|
+
}
|
|
178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetFooter, decorators: [{
|
|
179
|
+
type: Component,
|
|
180
|
+
args: [{
|
|
181
|
+
selector: 'hlm-sheet-footer',
|
|
182
|
+
template: ` <ng-content /> `,
|
|
183
|
+
host: {
|
|
184
|
+
'[class]': '_computedClass()',
|
|
185
|
+
},
|
|
186
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
187
|
+
}]
|
|
188
|
+
}] });
|
|
189
|
+
|
|
190
|
+
class HlmSheetHeader {
|
|
191
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
192
|
+
_computedClass = computed(() => hlm('flex flex-col gap-1.5 p-4', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
193
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
194
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetHeader, isStandalone: true, selector: "hlm-sheet-header", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
195
|
+
}
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetHeader, decorators: [{
|
|
197
|
+
type: Component,
|
|
198
|
+
args: [{
|
|
199
|
+
selector: 'hlm-sheet-header',
|
|
200
|
+
template: ` <ng-content /> `,
|
|
201
|
+
host: {
|
|
202
|
+
'[class]': '_computedClass()',
|
|
203
|
+
},
|
|
204
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
205
|
+
}]
|
|
206
|
+
}] });
|
|
207
|
+
|
|
208
|
+
class HlmSheetTitle {
|
|
209
|
+
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
210
|
+
_computedClass = computed(() => hlm('text-foreground font-semibold', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
211
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
212
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmSheetTitle, isStandalone: true, selector: "[hlmSheetTitle]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnSheetTitle }], ngImport: i0 });
|
|
213
|
+
}
|
|
214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetTitle, decorators: [{
|
|
215
|
+
type: Directive,
|
|
216
|
+
args: [{
|
|
217
|
+
selector: '[hlmSheetTitle]',
|
|
218
|
+
host: {
|
|
219
|
+
'[class]': '_computedClass()',
|
|
220
|
+
},
|
|
221
|
+
hostDirectives: [BrnSheetTitle],
|
|
222
|
+
}]
|
|
223
|
+
}] });
|
|
224
|
+
|
|
225
|
+
/*
|
|
226
|
+
* Public API Surface of sheet
|
|
227
|
+
*/
|
|
228
|
+
const HlmSheetImports = [
|
|
229
|
+
HlmSheet,
|
|
230
|
+
HlmSheetClose,
|
|
231
|
+
HlmSheetContent,
|
|
232
|
+
HlmSheetDescription,
|
|
233
|
+
HlmSheetFooter,
|
|
234
|
+
HlmSheetHeader,
|
|
235
|
+
HlmSheetOverlay,
|
|
236
|
+
HlmSheetTitle,
|
|
237
|
+
];
|
|
238
|
+
class HlmSheetModule {
|
|
239
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
240
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetModule, imports: [HlmSheet,
|
|
241
|
+
HlmSheetClose,
|
|
242
|
+
HlmSheetContent,
|
|
243
|
+
HlmSheetDescription,
|
|
244
|
+
HlmSheetFooter,
|
|
245
|
+
HlmSheetHeader,
|
|
246
|
+
HlmSheetOverlay,
|
|
247
|
+
HlmSheetTitle], exports: [HlmSheet,
|
|
248
|
+
HlmSheetClose,
|
|
249
|
+
HlmSheetContent,
|
|
250
|
+
HlmSheetDescription,
|
|
251
|
+
HlmSheetFooter,
|
|
252
|
+
HlmSheetHeader,
|
|
253
|
+
HlmSheetOverlay,
|
|
254
|
+
HlmSheetTitle] });
|
|
255
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetModule, imports: [HlmSheet,
|
|
256
|
+
HlmSheetContent] });
|
|
257
|
+
}
|
|
258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSheetModule, decorators: [{
|
|
259
|
+
type: NgModule,
|
|
260
|
+
args: [{
|
|
261
|
+
imports: [...HlmSheetImports],
|
|
262
|
+
exports: [...HlmSheetImports],
|
|
263
|
+
}]
|
|
264
|
+
}] });
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Generated bundle index. Do not edit.
|
|
268
|
+
*/
|
|
269
|
+
|
|
270
|
+
export { HlmSheet, HlmSheetClose, HlmSheetContent, HlmSheetDescription, HlmSheetFooter, HlmSheetHeader, HlmSheetImports, HlmSheetModule, HlmSheetOverlay, HlmSheetTitle, sheetVariants };
|
|
271
|
+
//# sourceMappingURL=sheet.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.mjs","sources":["../../../projects/sheet/src/lib/sheet-overlay.ts","../../../projects/sheet/src/lib/sheet.ts","../../../projects/sheet/src/lib/sheet-close.ts","../../../projects/sheet/src/lib/sheet-content.ts","../../../projects/sheet/src/lib/sheet-description.ts","../../../projects/sheet/src/lib/sheet-footer.ts","../../../projects/sheet/src/lib/sheet-header.ts","../../../projects/sheet/src/lib/sheet-title.ts","../../../projects/sheet/src/public-api.ts","../../../projects/sheet/src/sheet.ts"],"sourcesContent":["import { Directive, computed, effect, input, untracked } from '@angular/core';\nimport { injectCustomClassSettable } from '@spartan-ng/brain/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmSheetOverlay],brn-sheet-overlay[hlm]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmSheetOverlay {\n private readonly _classSettable = injectCustomClassSettable({ optional: true, host: true });\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:bg-black/50',\n this.userClass(),\n ),\n );\n\n constructor() {\n effect(() => {\n const classValue = this._computedClass();\n untracked(() => this._classSettable?.setClassToCustomElement(classValue));\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, forwardRef, ViewEncapsulation } from '@angular/core';\nimport { BrnDialog, provideBrnDialogDefaultOptions } from '@spartan-ng/brain/dialog';\nimport { BrnSheet, BrnSheetOverlay } from '@spartan-ng/brain/sheet';\nimport { HlmSheetOverlay } from './sheet-overlay';\n\n@Component({\n selector: 'hlm-sheet',\n imports: [BrnSheetOverlay, HlmSheetOverlay],\n providers: [\n {\n provide: BrnDialog,\n useExisting: forwardRef(() => BrnSheet),\n },\n {\n provide: BrnSheet,\n useExisting: forwardRef(() => HlmSheet),\n },\n provideBrnDialogDefaultOptions({\n // add custom options here\n }),\n ],\n template: `\n <brn-sheet-overlay hlm />\n <ng-content />\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'hlmSheet',\n})\nexport class HlmSheet extends BrnSheet {}\n","import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmSheetClose],[brnSheetClose][hlm]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmSheetClose {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:ring-offset-background tw:focus:ring-ring tw:data-[state=open]:bg-secondary tw:rounded-xs tw:focus:outline-hidden tw:absolute tw:right-4 tw:top-4 tw:opacity-70 tw:transition-opacity tw:hover:opacity-100 tw:focus:ring-2 tw:focus:ring-offset-2 tw:disabled:pointer-events-none',\n this.userClass(),\n ),\n );\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Renderer2,\n computed,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { NgIcon, provideIcons } from '@ng-icons/core';\nimport { lucideX } from '@ng-icons/lucide';\nimport { injectExposedSideProvider, injectExposesStateProvider } from '@spartan-ng/brain/core';\nimport { BrnSheetClose } from '@spartan-ng/brain/sheet';\nimport { HlmIcon } from '@egose/shadcn-theme-ng/icon';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport { cva } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\nimport { HlmSheetClose } from './sheet-close';\n\nexport const sheetVariants = cva(\n 'tw:bg-background tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:fixed tw:z-50 tw:flex tw:flex-col tw:gap-4 tw:shadow-lg tw:transition tw:ease-in-out tw:data-[state=closed]:duration-300 tw:data-[state=open]:duration-500',\n {\n variants: {\n side: {\n top: 'tw:data-[state=closed]:slide-out-to-top tw:data-[state=open]:slide-in-from-top tw:inset-x-0 tw:top-0 tw:h-auto tw:border-b',\n bottom:\n 'tw:data-[state=closed]:slide-out-to-bottom tw:data-[state=open]:slide-in-from-bottom tw:inset-x-0 tw:bottom-0 tw:h-auto tw:border-t',\n left: 'tw:data-[state=closed]:slide-out-to-left tw:data-[state=open]:slide-in-from-left tw:inset-y-0 tw:left-0 tw:h-full tw:w-3/4 tw:border-r tw:sm:max-w-sm',\n right:\n 'tw:data-[state=closed]:slide-out-to-right tw:data-[state=open]:slide-in-from-right tw:inset-y-0 tw:right-0 tw:h-full tw:w-3/4 tw:border-l tw:sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'right',\n },\n },\n);\n\n@Component({\n selector: 'hlm-sheet-content',\n imports: [HlmSheetClose, BrnSheetClose, NgIcon, HlmIcon],\n providers: [provideIcons({ lucideX })],\n host: {\n '[class]': '_computedClass()',\n '[attr.data-state]': 'state()',\n },\n template: `\n <ng-content />\n <button brnSheetClose hlm class=\"tw:cursor-pointer\">\n <span class=\"tw:sr-only\">Close</span>\n <ng-icon hlm size=\"sm\" name=\"lucideX\" />\n </button>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmSheetContent {\n private readonly _stateProvider = injectExposesStateProvider({ host: true });\n private readonly _sideProvider = injectExposedSideProvider({ host: true });\n public readonly state = this._stateProvider.state ?? signal('closed');\n private readonly _renderer = inject(Renderer2);\n private readonly _element = inject(ElementRef);\n\n constructor() {\n effect(() => {\n this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());\n });\n }\n\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(sheetVariants({ side: this._sideProvider.side() }), this.userClass()),\n );\n}\n","import { Directive, computed, input } from '@angular/core';\nimport { BrnSheetDescription } from '@spartan-ng/brain/sheet';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmSheetDescription]',\n host: {\n '[class]': '_computedClass()',\n },\n hostDirectives: [BrnSheetDescription],\n})\nexport class HlmSheetDescription {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() => hlm('tw:text-muted-foreground tw:text-sm', this.userClass()));\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'hlm-sheet-footer',\n template: ` <ng-content /> `,\n host: {\n '[class]': '_computedClass()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmSheetFooter {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected _computedClass = computed(() => hlm('tw:mt-auto tw:flex tw:flex-col tw:gap-2 tw:p-4', this.userClass()));\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'hlm-sheet-header',\n template: ` <ng-content /> `,\n host: {\n '[class]': '_computedClass()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmSheetHeader {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected _computedClass = computed(() => hlm('tw:flex tw:flex-col tw:gap-1.5 tw:p-4', this.userClass()));\n}\n","import { Directive, computed, input } from '@angular/core';\nimport { BrnSheetTitle } from '@spartan-ng/brain/sheet';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmSheetTitle]',\n host: {\n '[class]': '_computedClass()',\n },\n hostDirectives: [BrnSheetTitle],\n})\nexport class HlmSheetTitle {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() => hlm('tw:text-foreground tw:font-semibold', this.userClass()));\n}\n","/*\n * Public API Surface of sheet\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmSheet } from './lib/sheet';\nimport { HlmSheetClose } from './lib/sheet-close';\nimport { HlmSheetContent } from './lib/sheet-content';\nimport { HlmSheetDescription } from './lib/sheet-description';\nimport { HlmSheetFooter } from './lib/sheet-footer';\nimport { HlmSheetHeader } from './lib/sheet-header';\nimport { HlmSheetOverlay } from './lib/sheet-overlay';\nimport { HlmSheetTitle } from './lib/sheet-title';\n\nexport * from './lib/sheet';\nexport * from './lib/sheet-close';\nexport * from './lib/sheet-content';\nexport * from './lib/sheet-description';\nexport * from './lib/sheet-footer';\nexport * from './lib/sheet-header';\nexport * from './lib/sheet-overlay';\nexport * from './lib/sheet-title';\n\nexport const HlmSheetImports = [\n HlmSheet,\n HlmSheetClose,\n HlmSheetContent,\n HlmSheetDescription,\n HlmSheetFooter,\n HlmSheetHeader,\n HlmSheetOverlay,\n HlmSheetTitle,\n] as const;\n\n@NgModule({\n imports: [...HlmSheetImports],\n exports: [...HlmSheetImports],\n})\nexport class HlmSheetModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAWa,eAAe,CAAA;AACT,IAAA,cAAc,GAAG,yBAAyB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC3E,IAAA,SAAS,GAAG,KAAK,CAAa,EAAE,6CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAClD,IAAA,cAAc,GAAG,QAAQ,CAAC,MAC3C,GAAG,CACD,oJAAoJ,EACpJ,IAAI,CAAC,SAAS,EAAE,CACjB,0DACF;AAED,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE;AACxC,YAAA,SAAS,CAAC,MAAM,IAAI,CAAC,cAAc,EAAE,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAC3E,QAAA,CAAC,CAAC;IACJ;uGAfW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0CAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,E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,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAdzB,QAAQ;YACR,aAAa;YACb,eAAe;YACf,mBAAmB;YACnB,cAAc;YACd,cAAc;YACd,eAAe;AACf,YAAA,aAAa,aAPb,QAAQ;YACR,aAAa;YACb,eAAe;YACf,mBAAmB;YACnB,cAAc;YACd,cAAc;YACd,eAAe;YACf,aAAa,CAAA,EAAA,CAAA;AAOF,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAdzB,QAAQ;YAER,eAAe,CAAA,EAAA,CAAA;;2FAYJ,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC9B,iBAAA;;;ACtCD;;AAEG;;;;"}
|
package/sheet/index.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as i1 from '@spartan-ng/brain/sheet';
|
|
2
|
+
import { BrnSheet } from '@spartan-ng/brain/sheet';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { ClassValue } from 'clsx';
|
|
5
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
|
+
|
|
7
|
+
declare class HlmSheet extends BrnSheet {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheet, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HlmSheet, "hlm-sheet", ["hlmSheet"], {}, {}, never, ["*"], true, never>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare class HlmSheetClose {
|
|
13
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
14
|
+
protected readonly _computedClass: i0.Signal<string>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetClose, never>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmSheetClose, "[hlmSheetClose],[brnSheetClose][hlm]", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare const sheetVariants: (props?: ({
|
|
20
|
+
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
21
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
22
|
+
declare class HlmSheetContent {
|
|
23
|
+
private readonly _stateProvider;
|
|
24
|
+
private readonly _sideProvider;
|
|
25
|
+
readonly state: i0.Signal<"closed" | "open">;
|
|
26
|
+
private readonly _renderer;
|
|
27
|
+
private readonly _element;
|
|
28
|
+
constructor();
|
|
29
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
30
|
+
protected readonly _computedClass: i0.Signal<string>;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetContent, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HlmSheetContent, "hlm-sheet-content", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare class HlmSheetDescription {
|
|
36
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
37
|
+
protected readonly _computedClass: i0.Signal<string>;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetDescription, never>;
|
|
39
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmSheetDescription, "[hlmSheetDescription]", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.BrnSheetDescription; inputs: {}; outputs: {}; }]>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class HlmSheetFooter {
|
|
43
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
44
|
+
protected _computedClass: i0.Signal<string>;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetFooter, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HlmSheetFooter, "hlm-sheet-footer", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare class HlmSheetHeader {
|
|
50
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
51
|
+
protected _computedClass: i0.Signal<string>;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetHeader, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HlmSheetHeader, "hlm-sheet-header", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare class HlmSheetOverlay {
|
|
57
|
+
private readonly _classSettable;
|
|
58
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
59
|
+
protected readonly _computedClass: i0.Signal<string>;
|
|
60
|
+
constructor();
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetOverlay, never>;
|
|
62
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmSheetOverlay, "[hlmSheetOverlay],brn-sheet-overlay[hlm]", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
declare class HlmSheetTitle {
|
|
66
|
+
readonly userClass: i0.InputSignal<ClassValue>;
|
|
67
|
+
protected readonly _computedClass: i0.Signal<string>;
|
|
68
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetTitle, never>;
|
|
69
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmSheetTitle, "[hlmSheetTitle]", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.BrnSheetTitle; inputs: {}; outputs: {}; }]>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare const HlmSheetImports: readonly [typeof HlmSheet, typeof HlmSheetClose, typeof HlmSheetContent, typeof HlmSheetDescription, typeof HlmSheetFooter, typeof HlmSheetHeader, typeof HlmSheetOverlay, typeof HlmSheetTitle];
|
|
73
|
+
declare class HlmSheetModule {
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmSheetModule, never>;
|
|
75
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HlmSheetModule, never, [typeof HlmSheet, typeof HlmSheetClose, typeof HlmSheetContent, typeof HlmSheetDescription, typeof HlmSheetFooter, typeof HlmSheetHeader, typeof HlmSheetOverlay, typeof HlmSheetTitle], [typeof HlmSheet, typeof HlmSheetClose, typeof HlmSheetContent, typeof HlmSheetDescription, typeof HlmSheetFooter, typeof HlmSheetHeader, typeof HlmSheetOverlay, typeof HlmSheetTitle]>;
|
|
76
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<HlmSheetModule>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export { HlmSheet, HlmSheetClose, HlmSheetContent, HlmSheetDescription, HlmSheetFooter, HlmSheetHeader, HlmSheetImports, HlmSheetModule, HlmSheetOverlay, HlmSheetTitle, sheetVariants };
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, Directive, forwardRef, model, booleanAttribute, output, linkedSignal, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
-
import { BrnSwitchThumb, BrnSwitch } from '@spartan-ng/brain/switch';
|
|
5
|
-
import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
6
|
-
|
|
7
|
-
class HlmSwitchThumb {
|
|
8
|
-
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
9
|
-
_computedClass = computed(() => hlm('bg-background dark:group-data-[state=unchecked]:bg-foreground dark:group-data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=unchecked]:translate-x-0 group-data-[state=checked]:translate-x-[calc(100%-2px)]', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitchThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
11
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmSwitchThumb, isStandalone: true, selector: "brn-switch-thumb[hlm],[hlmSwitchThumb]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
12
|
-
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitchThumb, decorators: [{
|
|
14
|
-
type: Directive,
|
|
15
|
-
args: [{
|
|
16
|
-
selector: 'brn-switch-thumb[hlm],[hlmSwitchThumb]',
|
|
17
|
-
host: {
|
|
18
|
-
'[class]': '_computedClass()',
|
|
19
|
-
},
|
|
20
|
-
}]
|
|
21
|
-
}] });
|
|
22
|
-
|
|
23
|
-
const EG_SWITCH_VALUE_ACCESSOR = {
|
|
24
|
-
provide: NG_VALUE_ACCESSOR,
|
|
25
|
-
useExisting: forwardRef(() => HlmSwitch),
|
|
26
|
-
multi: true,
|
|
27
|
-
};
|
|
28
|
-
class HlmSwitch {
|
|
29
|
-
userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
|
|
30
|
-
_computedClass = computed(() => hlm('data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 shadow-xs group inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent outline-none transition-all focus-visible:ring-[3px] data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
|
|
31
|
-
/** The checked state of the switch. */
|
|
32
|
-
checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
33
|
-
/** The disabled state of the switch. */
|
|
34
|
-
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{
|
|
35
|
-
transform: booleanAttribute,
|
|
36
|
-
}]));
|
|
37
|
-
/** Used to set the id on the underlying brn element. */
|
|
38
|
-
id = input(null, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
39
|
-
/** Used to set the aria-label attribute on the underlying brn element. */
|
|
40
|
-
ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel", alias: 'aria-label' }] : [{ alias: 'aria-label' }]));
|
|
41
|
-
/** Used to set the aria-labelledby attribute on the underlying brn element. */
|
|
42
|
-
ariaLabelledby = input(null, ...(ngDevMode ? [{ debugName: "ariaLabelledby", alias: 'aria-labelledby' }] : [{ alias: 'aria-labelledby' }]));
|
|
43
|
-
/** Used to set the aria-describedby attribute on the underlying brn element. */
|
|
44
|
-
ariaDescribedby = input(null, ...(ngDevMode ? [{ debugName: "ariaDescribedby", alias: 'aria-describedby' }] : [{ alias: 'aria-describedby' }]));
|
|
45
|
-
/** Emits when the checked state of the switch changes. */
|
|
46
|
-
changed = output();
|
|
47
|
-
_disabled = linkedSignal(this.disabled);
|
|
48
|
-
_onChange;
|
|
49
|
-
_onTouched;
|
|
50
|
-
handleChange(value) {
|
|
51
|
-
this.checked.set(value);
|
|
52
|
-
this._onChange?.(value);
|
|
53
|
-
this.changed.emit(value);
|
|
54
|
-
}
|
|
55
|
-
/** CONROL VALUE ACCESSOR */
|
|
56
|
-
writeValue(value) {
|
|
57
|
-
this.checked.set(Boolean(value));
|
|
58
|
-
}
|
|
59
|
-
registerOnChange(fn) {
|
|
60
|
-
this._onChange = fn;
|
|
61
|
-
}
|
|
62
|
-
registerOnTouched(fn) {
|
|
63
|
-
this._onTouched = fn;
|
|
64
|
-
}
|
|
65
|
-
setDisabledState(isDisabled) {
|
|
66
|
-
this._disabled.set(isDisabled);
|
|
67
|
-
}
|
|
68
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
69
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmSwitch, isStandalone: true, selector: "hlm-switch", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", 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 }, 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 } }, outputs: { checked: "checkedChange", changed: "changed" }, host: { properties: { "attr.id": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" }, classAttribute: "contents" }, providers: [EG_SWITCH_VALUE_ACCESSOR], ngImport: i0, template: `
|
|
70
|
-
<brn-switch
|
|
71
|
-
[class]="_computedClass()"
|
|
72
|
-
[checked]="checked()"
|
|
73
|
-
(changed)="handleChange($event)"
|
|
74
|
-
(touched)="_onTouched?.()"
|
|
75
|
-
[disabled]="_disabled()"
|
|
76
|
-
[id]="id()"
|
|
77
|
-
[aria-label]="ariaLabel()"
|
|
78
|
-
[aria-labelledby]="ariaLabelledby()"
|
|
79
|
-
[aria-describedby]="ariaDescribedby()"
|
|
80
|
-
>
|
|
81
|
-
<brn-switch-thumb hlm />
|
|
82
|
-
</brn-switch>
|
|
83
|
-
`, isInline: true, dependencies: [{ kind: "component", type: BrnSwitchThumb, selector: "brn-switch-thumb" }, { kind: "component", type: BrnSwitch, selector: "brn-switch", inputs: ["checked", "id", "name", "class", "aria-label", "aria-labelledby", "aria-describedby", "required", "disabled", "tabIndex"], outputs: ["checkedChange", "changed", "touched"] }, { kind: "directive", type: HlmSwitchThumb, selector: "brn-switch-thumb[hlm],[hlmSwitchThumb]", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
84
|
-
}
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitch, decorators: [{
|
|
86
|
-
type: Component,
|
|
87
|
-
args: [{
|
|
88
|
-
selector: 'hlm-switch',
|
|
89
|
-
imports: [BrnSwitchThumb, BrnSwitch, HlmSwitchThumb],
|
|
90
|
-
host: {
|
|
91
|
-
class: 'contents',
|
|
92
|
-
'[attr.id]': 'null',
|
|
93
|
-
'[attr.aria-label]': 'null',
|
|
94
|
-
'[attr.aria-labelledby]': 'null',
|
|
95
|
-
'[attr.aria-describedby]': 'null',
|
|
96
|
-
},
|
|
97
|
-
template: `
|
|
98
|
-
<brn-switch
|
|
99
|
-
[class]="_computedClass()"
|
|
100
|
-
[checked]="checked()"
|
|
101
|
-
(changed)="handleChange($event)"
|
|
102
|
-
(touched)="_onTouched?.()"
|
|
103
|
-
[disabled]="_disabled()"
|
|
104
|
-
[id]="id()"
|
|
105
|
-
[aria-label]="ariaLabel()"
|
|
106
|
-
[aria-labelledby]="ariaLabelledby()"
|
|
107
|
-
[aria-describedby]="ariaDescribedby()"
|
|
108
|
-
>
|
|
109
|
-
<brn-switch-thumb hlm />
|
|
110
|
-
</brn-switch>
|
|
111
|
-
`,
|
|
112
|
-
providers: [EG_SWITCH_VALUE_ACCESSOR],
|
|
113
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
114
|
-
}]
|
|
115
|
-
}] });
|
|
116
|
-
|
|
117
|
-
/*
|
|
118
|
-
* Public API Surface of switch
|
|
119
|
-
*/
|
|
120
|
-
const HlmSwitchImports = [HlmSwitch, HlmSwitchThumb];
|
|
121
|
-
class HlmSwitchModule {
|
|
122
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
123
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitchModule, imports: [HlmSwitch, HlmSwitchThumb], exports: [HlmSwitch, HlmSwitchThumb] });
|
|
124
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitchModule, imports: [HlmSwitch] });
|
|
125
|
-
}
|
|
126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitchModule, decorators: [{
|
|
127
|
-
type: NgModule,
|
|
128
|
-
args: [{
|
|
129
|
-
imports: [...HlmSwitchImports],
|
|
130
|
-
exports: [...HlmSwitchImports],
|
|
131
|
-
}]
|
|
132
|
-
}] });
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Generated bundle index. Do not edit.
|
|
136
|
-
*/
|
|
137
|
-
|
|
138
|
-
export { EG_SWITCH_VALUE_ACCESSOR, HlmSwitch, HlmSwitchImports, HlmSwitchModule, HlmSwitchThumb };
|
|
139
|
-
//# sourceMappingURL=switch.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"switch.mjs","sources":["../../../projects/switch/src/lib/switch-thumb.ts","../../../projects/switch/src/lib/switch.ts","../../../projects/switch/src/public-api.ts","../../../projects/switch/src/switch.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: 'brn-switch-thumb[hlm],[hlmSwitchThumb]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmSwitchThumb {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:bg-background tw:dark:group-data-[state=unchecked]:bg-foreground tw:dark:group-data-[state=checked]:bg-primary-foreground tw:pointer-events-none tw:block tw:size-4 tw:rounded-full tw:ring-0 tw:transition-transform tw:data-[state=unchecked]:translate-x-0 tw:group-data-[state=checked]:translate-x-[calc(100%-2px)]',\n this.userClass(),\n ),\n );\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n linkedSignal,\n model,\n output,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\nimport { BrnSwitch, BrnSwitchThumb } from '@spartan-ng/brain/switch';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\nimport { HlmSwitchThumb } from './switch-thumb';\nexport const EG_SWITCH_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => HlmSwitch),\n multi: true,\n};\n\n@Component({\n selector: 'hlm-switch',\n imports: [BrnSwitchThumb, BrnSwitch, HlmSwitchThumb],\n host: {\n class: 'contents',\n '[attr.id]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n },\n template: `\n <brn-switch\n [class]=\"_computedClass()\"\n [checked]=\"checked()\"\n (changed)=\"handleChange($event)\"\n (touched)=\"_onTouched?.()\"\n [disabled]=\"_disabled()\"\n [id]=\"id()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [aria-describedby]=\"ariaDescribedby()\"\n >\n <brn-switch-thumb hlm />\n </brn-switch>\n `,\n providers: [EG_SWITCH_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmSwitch implements ControlValueAccessor {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:data-[state=checked]:bg-primary tw:data-[state=unchecked]:bg-input tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:dark:data-[state=unchecked]:bg-input/80 tw:shadow-xs tw:group tw:inline-flex tw:h-[1.15rem] tw:w-8 tw:shrink-0 tw:items-center tw:rounded-full tw:border tw:border-transparent tw:outline-none tw:transition-all tw:focus-visible:ring-[3px] tw:data-[disabled=true]:cursor-not-allowed tw:data-[disabled=true]:opacity-50',\n this.userClass(),\n ),\n );\n\n /** The checked state of the switch. */\n public readonly checked = model<boolean>(false);\n\n /** The disabled state of the switch. */\n public readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n });\n\n /** Used to set the id on the underlying brn element. */\n public readonly id = input<string | null>(null);\n\n /** Used to set the aria-label attribute on the underlying brn element. */\n public readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /** Used to set the aria-labelledby attribute on the underlying brn element. */\n public readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n /** Used to set the aria-describedby attribute on the underlying brn element. */\n public readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n /** Emits when the checked state of the switch changes. */\n public readonly changed = output<boolean>();\n\n protected readonly _disabled = linkedSignal(this.disabled);\n\n protected _onChange?: ChangeFn<boolean>;\n protected _onTouched?: TouchFn;\n\n protected handleChange(value: boolean): void {\n this.checked.set(value);\n this._onChange?.(value);\n this.changed.emit(value);\n }\n\n /** CONROL VALUE ACCESSOR */\n\n writeValue(value: boolean): void {\n this.checked.set(Boolean(value));\n }\n\n registerOnChange(fn: ChangeFn<boolean>): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: TouchFn): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n }\n}\n","/*\n * Public API Surface of switch\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmSwitch } from './lib/switch';\nimport { HlmSwitchThumb } from './lib/switch-thumb';\n\nexport * from './lib/switch';\nexport * from './lib/switch-thumb';\n\nexport const HlmSwitchImports = [HlmSwitch, HlmSwitchThumb] as const;\n@NgModule({\n imports: [...HlmSwitchImports],\n exports: [...HlmSwitchImports],\n})\nexport class HlmSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAUa,cAAc,CAAA;AACT,IAAA,SAAS,GAAG,KAAK,CAAa,EAAE,6CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAElD,IAAA,cAAc,GAAG,QAAQ,CAAC,MAC3C,GAAG,CACD,6TAA6T,EAC7T,IAAI,CAAC,SAAS,EAAE,CACjB,0DACF;uGARU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wCAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,I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AA;oBACD,SAAS,EAAE,CAAC,wBAAwB,CAAC;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;ACnDD;;AAEG;MAUU,gBAAgB,GAAG,CAAC,SAAS,EAAE,cAAc;MAK7C,eAAe,CAAA;uGAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YALK,SAAS,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAAzB,SAAS,EAAE,cAAc,CAAA,EAAA,CAAA;AAK7C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YALK,SAAS,CAAA,EAAA,CAAA;;2FAK7B,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC9B,oBAAA,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC/B,iBAAA;;;AChBD;;AAEG;;;;"}
|
package/switch/index.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { BooleanInput } from '@angular/cdk/coercion';
|
|
3
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
-
import { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';
|
|
5
|
-
import { ClassValue } from 'clsx';
|
|
6
|
-
|
|
7
|
-
declare const EG_SWITCH_VALUE_ACCESSOR: {
|
|
8
|
-
provide: _angular_core.InjectionToken<readonly ControlValueAccessor[]>;
|
|
9
|
-
useExisting: _angular_core.Type<any>;
|
|
10
|
-
multi: boolean;
|
|
11
|
-
};
|
|
12
|
-
declare class HlmSwitch implements ControlValueAccessor {
|
|
13
|
-
readonly userClass: _angular_core.InputSignal<ClassValue>;
|
|
14
|
-
protected readonly _computedClass: _angular_core.Signal<string>;
|
|
15
|
-
/** The checked state of the switch. */
|
|
16
|
-
readonly checked: _angular_core.ModelSignal<boolean>;
|
|
17
|
-
/** The disabled state of the switch. */
|
|
18
|
-
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
19
|
-
/** Used to set the id on the underlying brn element. */
|
|
20
|
-
readonly id: _angular_core.InputSignal<string | null>;
|
|
21
|
-
/** Used to set the aria-label attribute on the underlying brn element. */
|
|
22
|
-
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
23
|
-
/** Used to set the aria-labelledby attribute on the underlying brn element. */
|
|
24
|
-
readonly ariaLabelledby: _angular_core.InputSignal<string | null>;
|
|
25
|
-
/** Used to set the aria-describedby attribute on the underlying brn element. */
|
|
26
|
-
readonly ariaDescribedby: _angular_core.InputSignal<string | null>;
|
|
27
|
-
/** Emits when the checked state of the switch changes. */
|
|
28
|
-
readonly changed: _angular_core.OutputEmitterRef<boolean>;
|
|
29
|
-
protected readonly _disabled: _angular_core.WritableSignal<boolean>;
|
|
30
|
-
protected _onChange?: ChangeFn<boolean>;
|
|
31
|
-
protected _onTouched?: TouchFn;
|
|
32
|
-
protected handleChange(value: boolean): void;
|
|
33
|
-
/** CONROL VALUE ACCESSOR */
|
|
34
|
-
writeValue(value: boolean): void;
|
|
35
|
-
registerOnChange(fn: ChangeFn<boolean>): void;
|
|
36
|
-
registerOnTouched(fn: TouchFn): void;
|
|
37
|
-
setDisabledState(isDisabled: boolean): void;
|
|
38
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HlmSwitch, never>;
|
|
39
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HlmSwitch, "hlm-switch", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "changed": "changed"; }, never, never, true, never>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
declare class HlmSwitchThumb {
|
|
43
|
-
readonly userClass: _angular_core.InputSignal<ClassValue>;
|
|
44
|
-
protected readonly _computedClass: _angular_core.Signal<string>;
|
|
45
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HlmSwitchThumb, never>;
|
|
46
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HlmSwitchThumb, "brn-switch-thumb[hlm],[hlmSwitchThumb]", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
declare const HlmSwitchImports: readonly [typeof HlmSwitch, typeof HlmSwitchThumb];
|
|
50
|
-
declare class HlmSwitchModule {
|
|
51
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HlmSwitchModule, never>;
|
|
52
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<HlmSwitchModule, never, [typeof HlmSwitch, typeof HlmSwitchThumb], [typeof HlmSwitch, typeof HlmSwitchThumb]>;
|
|
53
|
-
static ɵinj: _angular_core.ɵɵInjectorDeclaration<HlmSwitchModule>;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export { EG_SWITCH_VALUE_ACCESSOR, HlmSwitch, HlmSwitchImports, HlmSwitchModule, HlmSwitchThumb };
|