@egose/shadcn-theme-ng 0.0.10 → 0.0.11

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.
Files changed (72) hide show
  1. package/accordion/fesm2022/accordion.mjs +6 -6
  2. package/accordion/fesm2022/accordion.mjs.map +1 -1
  3. package/alert/fesm2022/alert.mjs +94 -18
  4. package/alert/fesm2022/alert.mjs.map +1 -1
  5. package/alert/index.d.ts +6 -3
  6. package/badge/fesm2022/badge.mjs +2 -2
  7. package/badge/fesm2022/badge.mjs.map +1 -1
  8. package/basic-alert/README.md +64 -0
  9. package/basic-alert/fesm2022/basic-alert.mjs +111 -0
  10. package/basic-alert/fesm2022/basic-alert.mjs.map +1 -0
  11. package/basic-alert/index.d.ts +14 -0
  12. package/button/fesm2022/button.mjs +6 -6
  13. package/button/fesm2022/button.mjs.map +1 -1
  14. package/calendar/README.md +64 -0
  15. package/calendar/fesm2022/calendar.mjs +637 -0
  16. package/calendar/fesm2022/calendar.mjs.map +1 -0
  17. package/calendar/index.d.ts +111 -0
  18. package/confirmation-dialog/README.md +64 -0
  19. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +93 -0
  20. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +1 -0
  21. package/confirmation-dialog/index.d.ts +24 -0
  22. package/date-picker/README.md +64 -0
  23. package/date-picker/fesm2022/date-picker.mjs +599 -0
  24. package/date-picker/fesm2022/date-picker.mjs.map +1 -0
  25. package/date-picker/index.d.ts +227 -0
  26. package/dialog/README.md +64 -0
  27. package/dialog/fesm2022/dialog.mjs +278 -0
  28. package/dialog/fesm2022/dialog.mjs.map +1 -0
  29. package/dialog/index.d.ts +89 -0
  30. package/exports.json +1 -1
  31. package/form-date-picker/README.md +64 -0
  32. package/form-date-picker/fesm2022/form-date-picker.mjs +146 -0
  33. package/form-date-picker/fesm2022/form-date-picker.mjs.map +1 -0
  34. package/form-date-picker/index.d.ts +32 -0
  35. package/form-field/fesm2022/form-field.mjs +7 -5
  36. package/form-field/fesm2022/form-field.mjs.map +1 -1
  37. package/form-select/README.md +64 -0
  38. package/form-select/fesm2022/form-select.mjs +165 -0
  39. package/form-select/fesm2022/form-select.mjs.map +1 -0
  40. package/form-select/index.d.ts +33 -0
  41. package/form-text-input/README.md +64 -0
  42. package/form-text-input/fesm2022/form-text-input.mjs +197 -0
  43. package/form-text-input/fesm2022/form-text-input.mjs.map +1 -0
  44. package/form-text-input/index.d.ts +47 -0
  45. package/form-textarea/README.md +64 -0
  46. package/form-textarea/fesm2022/form-textarea.mjs +156 -0
  47. package/form-textarea/fesm2022/form-textarea.mjs.map +1 -0
  48. package/form-textarea/index.d.ts +33 -0
  49. package/input/fesm2022/input.mjs +4 -4
  50. package/input/fesm2022/input.mjs.map +1 -1
  51. package/label/fesm2022/label.mjs +2 -2
  52. package/label/fesm2022/label.mjs.map +1 -1
  53. package/package.json +44 -1
  54. package/popover/README.md +64 -0
  55. package/popover/fesm2022/popover.mjs +69 -0
  56. package/popover/fesm2022/popover.mjs.map +1 -0
  57. package/popover/index.d.ts +30 -0
  58. package/radio-group/fesm2022/radio-group.mjs +4 -4
  59. package/radio-group/fesm2022/radio-group.mjs.map +1 -1
  60. package/select/fesm2022/select.mjs +11 -11
  61. package/select/fesm2022/select.mjs.map +1 -1
  62. package/sonner/fesm2022/sonner.mjs +2 -2
  63. package/sonner/fesm2022/sonner.mjs.map +1 -1
  64. package/spinner/fesm2022/spinner.mjs +3 -3
  65. package/spinner/fesm2022/spinner.mjs.map +1 -1
  66. package/switch/fesm2022/switch.mjs +3 -3
  67. package/switch/fesm2022/switch.mjs.map +1 -1
  68. package/tabs/fesm2022/tabs.mjs +8 -8
  69. package/tabs/fesm2022/tabs.mjs.map +1 -1
  70. package/utils/fesm2022/utils.mjs +2 -2
  71. package/utils/fesm2022/utils.mjs.map +1 -1
  72. package/utils/index.d.ts +2 -2
@@ -3,14 +3,14 @@ import { input, linkedSignal, computed, inject, Injector, effect, untracked, for
3
3
  import { NgControl, NgForm, FormGroupDirective } from '@angular/forms';
4
4
  import { BrnFormFieldControl } from '@spartan-ng/brain/form-field';
5
5
  import { ErrorStateMatcher, ErrorStateTracker } from '@spartan-ng/brain/forms';
6
- import { cn } from '@egose/shadcn-theme-ng/utils';
6
+ import { hlm } from '@egose/shadcn-theme-ng/utils';
7
7
  import { cva } from 'class-variance-authority';
8
8
 
9
- const inputVariants = cva('tw:file:text-foreground tw:placeholder:text-muted-foreground tw:selection:bg-primary tw:selection:text-primary-foreground tw:dark:bg-input/30 tw:border-input tw:shadow-xs tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:flex tw:h-9 tw:w-full tw:min-w-0 tw:rounded-md tw:border tw:bg-transparent tw:px-3 tw:py-1 tw:text-base tw:outline-none tw:transition-[color,box-shadow] tw:file:inline-flex tw:file:h-7 tw:file:border-0 tw:file:bg-transparent tw:file:text-sm tw:file:font-medium tw:focus-visible:ring-[3px] tw:disabled:pointer-events-none tw:disabled:cursor-not-allowed tw:disabled:opacity-50 md:text-sm', {
9
+ const inputVariants = cva('tw:file:text-foreground tw:placeholder:text-muted-foreground tw:selection:bg-primary tw:selection:text-primary-foreground tw:dark:bg-input/10 tw:border-input tw:shadow-xs tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:flex tw:h-9 tw:w-full tw:min-w-0 tw:rounded-md tw:border tw:bg-transparent tw:px-3 tw:py-1 tw:text-base tw:outline-none tw:transition-[color,box-shadow] tw:file:inline-flex tw:file:h-7 tw:file:border-0 tw:file:bg-transparent tw:file:text-sm tw:file:font-medium tw:focus-visible:ring-[3px] tw:disabled:pointer-events-none tw:disabled:cursor-not-allowed tw:disabled:opacity-50 md:text-sm', {
10
10
  variants: {
11
11
  error: {
12
12
  auto: 'tw:[&.ng-invalid.ng-touched]:text-destructive/20 tw:dark:[&.ng-invalid.ng-touched]:text-destructive/40 tw:[&.ng-invalid.ng-touched]:border-destructive tw:[&.ng-invalid.ng-touched]:focus-visible:ring-destructive',
13
- true: 'tw:text-destructive/20 dark:text-destructive/40 tw:border-destructive tw:focus-visible:ring-destructive',
13
+ true: 'tw:text-destructive/90 dark:text-destructive/60 tw:border-destructive tw:focus-visible:ring-destructive',
14
14
  },
15
15
  },
16
16
  defaultVariants: {
@@ -21,7 +21,7 @@ class HlmInput {
21
21
  error = input('auto', ...(ngDevMode ? [{ debugName: "error" }] : []));
22
22
  _state = linkedSignal(() => ({ error: this.error() }));
23
23
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
24
- _computedClass = computed(() => cn(inputVariants({ error: this._state().error }), this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
24
+ _computedClass = computed(() => hlm(inputVariants({ error: this._state().error }), this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
25
25
  _injector = inject(Injector);
26
26
  ngControl = this._injector.get(NgControl, null);
27
27
  _errorStateTracker;
@@ -1 +1 @@
1
- {"version":3,"file":"input.mjs","sources":["../../../projects/input/src/lib/input.ts","../../../projects/input/src/public-api.ts","../../../projects/input/src/input.ts"],"sourcesContent":["import {\n computed,\n Directive,\n type DoCheck,\n effect,\n forwardRef,\n inject,\n Injector,\n input,\n linkedSignal,\n untracked,\n} from '@angular/core';\nimport { FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport { BrnFormFieldControl } from '@spartan-ng/brain/form-field';\nimport { ErrorStateMatcher, ErrorStateTracker } from '@spartan-ng/brain/forms';\nimport { cn } from '@egose/shadcn-theme-ng/utils';\nimport { cva, VariantProps } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\n\nexport const inputVariants = cva(\n 'tw:file:text-foreground tw:placeholder:text-muted-foreground tw:selection:bg-primary tw:selection:text-primary-foreground tw:dark:bg-input/30 tw:border-input tw:shadow-xs tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:flex tw:h-9 tw:w-full tw:min-w-0 tw:rounded-md tw:border tw:bg-transparent tw:px-3 tw:py-1 tw:text-base tw:outline-none tw:transition-[color,box-shadow] tw:file:inline-flex tw:file:h-7 tw:file:border-0 tw:file:bg-transparent tw:file:text-sm tw:file:font-medium tw:focus-visible:ring-[3px] tw:disabled:pointer-events-none tw:disabled:cursor-not-allowed tw:disabled:opacity-50 md:text-sm',\n {\n variants: {\n error: {\n auto: 'tw:[&.ng-invalid.ng-touched]:text-destructive/20 tw:dark:[&.ng-invalid.ng-touched]:text-destructive/40 tw:[&.ng-invalid.ng-touched]:border-destructive tw:[&.ng-invalid.ng-touched]:focus-visible:ring-destructive',\n true: 'tw:text-destructive/20 dark:text-destructive/40 tw:border-destructive tw:focus-visible:ring-destructive',\n },\n },\n defaultVariants: {\n error: 'auto',\n },\n },\n);\ntype InputVariants = VariantProps<typeof inputVariants>;\n\n@Directive({\n selector: '[hlmInput]',\n host: {\n '[class]': '_computedClass()',\n },\n providers: [\n {\n provide: BrnFormFieldControl,\n useExisting: forwardRef(() => HlmInput),\n },\n ],\n})\nexport class HlmInput implements BrnFormFieldControl, DoCheck {\n public readonly error = input<InputVariants['error']>('auto');\n\n protected readonly _state = linkedSignal(() => ({ error: this.error() }));\n\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n cn(inputVariants({ error: this._state().error }), this.userClass()),\n );\n\n private readonly _injector = inject(Injector);\n\n public readonly ngControl: NgControl | null = this._injector.get(NgControl, null);\n\n private readonly _errorStateTracker: ErrorStateTracker;\n\n private readonly _defaultErrorStateMatcher = inject(ErrorStateMatcher);\n private readonly _parentForm = inject(NgForm, { optional: true });\n private readonly _parentFormGroup = inject(FormGroupDirective, { optional: true });\n\n public readonly errorState = computed(() => this._errorStateTracker.errorState());\n\n constructor() {\n this._errorStateTracker = new ErrorStateTracker(\n this._defaultErrorStateMatcher,\n this.ngControl,\n this._parentFormGroup,\n this._parentForm,\n );\n\n effect(() => {\n const error = this._errorStateTracker.errorState();\n untracked(() => {\n if (this.ngControl) {\n const shouldShowError = error && this.ngControl.invalid && (this.ngControl.touched || this.ngControl.dirty);\n this._errorStateTracker.errorState.set(shouldShowError ? true : false);\n this.setError(shouldShowError ? true : 'auto');\n }\n });\n });\n }\n\n ngDoCheck() {\n this._errorStateTracker.updateErrorState();\n }\n\n setError(error: InputVariants['error']) {\n this._state.set({ error });\n }\n}\n","/*\n * Public API Surface of input\n */\n\nimport { NgModule } from '@angular/core';\nimport { HlmInput } from './lib/input';\n\nexport * from './lib/input';\n\nexport const HlmInputImpots = [HlmInput] as const;\n\n@NgModule({\n imports: [...HlmInputImpots],\n exports: [...HlmInputImpots],\n})\nexport class HlmInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAmBO,MAAM,aAAa,GAAG,GAAG,CAC9B,4mBAA4mB,EAC5mB;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,oNAAoN;AAC1N,YAAA,IAAI,EAAE,yGAAyG;AAChH,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,KAAK,EAAE,MAAM;AACd,KAAA;AACF,CAAA;MAgBU,QAAQ,CAAA;AACH,IAAA,KAAK,GAAG,KAAK,CAAyB,MAAM,iDAAC;AAE1C,IAAA,MAAM,GAAG,YAAY,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAEzD,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,EAAE,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,EAAA,IAAA,SAAA,GAAA,CAA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AAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,mBAAmB;AAC5B,4BAAA,WAAW,EAAE,UAAU,CAAC,cAAc,CAAC;AACxC,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AC9CD;;AAEG;AAOI,MAAM,cAAc,GAAG,CAAC,QAAQ;MAM1B,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAd,cAAc,EAAA,OAAA,EAAA,CANI,QAAQ,CAAA,EAAA,OAAA,EAAA,CAAR,QAAQ,CAAA,EAAA,CAAA;wGAM1B,cAAc,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC;AAC7B,iBAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"input.mjs","sources":["../../../projects/input/src/lib/input.ts","../../../projects/input/src/public-api.ts","../../../projects/input/src/input.ts"],"sourcesContent":["import {\n computed,\n Directive,\n type DoCheck,\n effect,\n forwardRef,\n inject,\n Injector,\n input,\n linkedSignal,\n untracked,\n} from '@angular/core';\nimport { FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport { BrnFormFieldControl } from '@spartan-ng/brain/form-field';\nimport { ErrorStateMatcher, ErrorStateTracker } from '@spartan-ng/brain/forms';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport { cva, VariantProps } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\n\nexport const inputVariants = cva(\n 'tw:file:text-foreground tw:placeholder:text-muted-foreground tw:selection:bg-primary tw:selection:text-primary-foreground tw:dark:bg-input/10 tw:border-input tw:shadow-xs tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:flex tw:h-9 tw:w-full tw:min-w-0 tw:rounded-md tw:border tw:bg-transparent tw:px-3 tw:py-1 tw:text-base tw:outline-none tw:transition-[color,box-shadow] tw:file:inline-flex tw:file:h-7 tw:file:border-0 tw:file:bg-transparent tw:file:text-sm tw:file:font-medium tw:focus-visible:ring-[3px] tw:disabled:pointer-events-none tw:disabled:cursor-not-allowed tw:disabled:opacity-50 md:text-sm',\n {\n variants: {\n error: {\n auto: 'tw:[&.ng-invalid.ng-touched]:text-destructive/20 tw:dark:[&.ng-invalid.ng-touched]:text-destructive/40 tw:[&.ng-invalid.ng-touched]:border-destructive tw:[&.ng-invalid.ng-touched]:focus-visible:ring-destructive',\n true: 'tw:text-destructive/90 dark:text-destructive/60 tw:border-destructive tw:focus-visible:ring-destructive',\n },\n },\n defaultVariants: {\n error: 'auto',\n },\n },\n);\ntype InputVariants = VariantProps<typeof inputVariants>;\n\n@Directive({\n selector: '[hlmInput]',\n host: {\n '[class]': '_computedClass()',\n },\n providers: [\n {\n provide: BrnFormFieldControl,\n useExisting: forwardRef(() => HlmInput),\n },\n ],\n})\nexport class HlmInput implements BrnFormFieldControl, DoCheck {\n public readonly error = input<InputVariants['error']>('auto');\n\n protected readonly _state = linkedSignal(() => ({ error: this.error() }));\n\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(inputVariants({ error: this._state().error }), this.userClass()),\n );\n\n private readonly _injector = inject(Injector);\n\n public readonly ngControl: NgControl | null = this._injector.get(NgControl, null);\n\n private readonly _errorStateTracker: ErrorStateTracker;\n\n private readonly _defaultErrorStateMatcher = inject(ErrorStateMatcher);\n private readonly _parentForm = inject(NgForm, { optional: true });\n private readonly _parentFormGroup = inject(FormGroupDirective, { optional: true });\n\n public readonly errorState = computed(() => this._errorStateTracker.errorState());\n\n constructor() {\n this._errorStateTracker = new ErrorStateTracker(\n this._defaultErrorStateMatcher,\n this.ngControl,\n this._parentFormGroup,\n this._parentForm,\n );\n\n effect(() => {\n const error = this._errorStateTracker.errorState();\n untracked(() => {\n if (this.ngControl) {\n const shouldShowError = error && this.ngControl.invalid && (this.ngControl.touched || this.ngControl.dirty);\n this._errorStateTracker.errorState.set(shouldShowError ? true : false);\n this.setError(shouldShowError ? true : 'auto');\n }\n });\n });\n }\n\n ngDoCheck() {\n this._errorStateTracker.updateErrorState();\n }\n\n setError(error: InputVariants['error']) {\n this._state.set({ error });\n }\n}\n","/*\n * Public API Surface of input\n */\n\nimport { NgModule } from '@angular/core';\nimport { HlmInput } from './lib/input';\n\nexport * from './lib/input';\n\nexport const HlmInputImpots = [HlmInput] as const;\n\n@NgModule({\n imports: [...HlmInputImpots],\n exports: [...HlmInputImpots],\n})\nexport class HlmInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAmBO,MAAM,aAAa,GAAG,GAAG,CAC9B,4mBAA4mB,EAC5mB;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,oNAAoN;AAC1N,YAAA,IAAI,EAAE,yGAAyG;AAChH,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,KAAK,EAAE,MAAM;AACd,KAAA;AACF,CAAA;MAgBU,QAAQ,CAAA;AACH,IAAA,KAAK,GAAG,KAAK,CAAyB,MAAM,iDAAC;AAE1C,IAAA,MAAM,GAAG,YAAY,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAEzD,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,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAA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AAI,EAAE;AACJ,wBAAA,SAAS,EAAE,kBAAkB;AAC9B,qBAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,mBAAmB;AAC5B,4BAAA,WAAW,EAAE,UAAU,CAAC,cAAc,CAAC;AACxC,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AC9CD;;AAEG;AAOI,MAAM,cAAc,GAAG,CAAC,QAAQ;MAM1B,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAd,cAAc,EAAA,OAAA,EAAA,CANI,QAAQ,CAAA,EAAA,OAAA,EAAA,CAAR,QAAQ,CAAA,EAAA,CAAA;wGAM1B,cAAc,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC;AAC7B,iBAAA;;;ACdD;;AAEG;;;;"}
@@ -2,11 +2,11 @@ import * as i0 from '@angular/core';
2
2
  import { input, computed, Directive, NgModule } from '@angular/core';
3
3
  import * as i1 from '@spartan-ng/brain/label';
4
4
  import { BrnLabel } from '@spartan-ng/brain/label';
5
- import { cn } from '@egose/shadcn-theme-ng/utils';
5
+ import { hlm } from '@egose/shadcn-theme-ng/utils';
6
6
 
7
7
  class HlmLabel {
8
8
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
9
- _computedClass = computed(() => cn('tw:flex tw:select-none tw:items-center tw:gap-2 tw:text-sm tw:font-medium tw:leading-none tw:peer-disabled:cursor-not-allowed tw:peer-disabled:opacity-50 tw:has-[[disabled]]:cursor-not-allowed tw:has-[[disabled]]:opacity-50 tw:group-data-[disabled=true]:pointer-events-none tw:group-data-[disabled=true]:opacity-50 tw:peer-data-[disabled]:cursor-not-allowed tw:peer-data-[disabled]:opacity-50', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
9
+ _computedClass = computed(() => hlm('tw:flex tw:select-none tw:items-center tw:gap-2 tw:text-sm tw:font-medium tw:leading-none tw:peer-disabled:cursor-not-allowed tw:peer-disabled:opacity-50 tw:has-[[disabled]]:cursor-not-allowed tw:has-[[disabled]]:opacity-50 tw:group-data-[disabled=true]:pointer-events-none tw:group-data-[disabled=true]:opacity-50 tw:peer-data-[disabled]:cursor-not-allowed tw:peer-data-[disabled]:opacity-50', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
10
10
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11
11
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: HlmLabel, isStandalone: true, selector: "[hlmLabel]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnLabel, inputs: ["id", "id"] }], ngImport: i0 });
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"label.mjs","sources":["../../../projects/label/src/lib/label.ts","../../../projects/label/src/public-api.ts","../../../projects/label/src/label.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { BrnLabel } from '@spartan-ng/brain/label';\nimport { cn } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmLabel]',\n hostDirectives: [\n {\n directive: BrnLabel,\n inputs: ['id'],\n },\n ],\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmLabel {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(() =>\n cn(\n 'tw:flex tw:select-none tw:items-center tw:gap-2 tw:text-sm tw:font-medium tw:leading-none tw:peer-disabled:cursor-not-allowed tw:peer-disabled:opacity-50 tw:has-[[disabled]]:cursor-not-allowed tw:has-[[disabled]]:opacity-50 tw:group-data-[disabled=true]:pointer-events-none tw:group-data-[disabled=true]:opacity-50 tw:peer-data-[disabled]:cursor-not-allowed tw:peer-data-[disabled]:opacity-50',\n this.userClass(),\n ),\n );\n}\n","/*\n * Public API Surface of label\n */\n\nimport { NgModule } from '@angular/core';\nimport { HlmLabel } from './lib/label';\n\nexport * from './lib/label';\n\nexport const HlmLabelImports = [HlmLabel] as const;\n\n@NgModule({\n imports: [...HlmLabelImports],\n exports: [...HlmLabelImports],\n})\nexport class HlmLabelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAiBa,QAAQ,CAAA;AACH,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,EAAE,CACA,0YAA0Y,EAC1Y,IAAI,CAAC,SAAS,EAAE,CACjB,0DACF;uGARU,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,QAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,IAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAZpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,cAAc,EAAE;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,QAAQ;4BACnB,MAAM,EAAE,CAAC,IAAI,CAAC;AACf,yBAAA;AACF,qBAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,kBAAkB;AAC9B,qBAAA;AACF,iBAAA;;;AChBD;;AAEG;AAOI,MAAM,eAAe,GAAG,CAAC,QAAQ;MAM3B,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAd,cAAc,EAAA,OAAA,EAAA,CANK,QAAQ,CAAA,EAAA,OAAA,EAAA,CAAR,QAAQ,CAAA,EAAA,CAAA;wGAM3B,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;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"label.mjs","sources":["../../../projects/label/src/lib/label.ts","../../../projects/label/src/public-api.ts","../../../projects/label/src/label.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { BrnLabel } from '@spartan-ng/brain/label';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmLabel]',\n hostDirectives: [\n {\n directive: BrnLabel,\n inputs: ['id'],\n },\n ],\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmLabel {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:flex tw:select-none tw:items-center tw:gap-2 tw:text-sm tw:font-medium tw:leading-none tw:peer-disabled:cursor-not-allowed tw:peer-disabled:opacity-50 tw:has-[[disabled]]:cursor-not-allowed tw:has-[[disabled]]:opacity-50 tw:group-data-[disabled=true]:pointer-events-none tw:group-data-[disabled=true]:opacity-50 tw:peer-data-[disabled]:cursor-not-allowed tw:peer-data-[disabled]:opacity-50',\n this.userClass(),\n ),\n );\n}\n","/*\n * Public API Surface of label\n */\n\nimport { NgModule } from '@angular/core';\nimport { HlmLabel } from './lib/label';\n\nexport * from './lib/label';\n\nexport const HlmLabelImports = [HlmLabel] as const;\n\n@NgModule({\n imports: [...HlmLabelImports],\n exports: [...HlmLabelImports],\n})\nexport class HlmLabelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAiBa,QAAQ,CAAA;AACH,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,0YAA0Y,EAC1Y,IAAI,CAAC,SAAS,EAAE,CACjB,0DACF;uGARU,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KA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T",
5
5
  "sideEffects": false,
@@ -7,6 +7,9 @@
7
7
  "type": "git",
8
8
  "url": "https://github.com/egose/shadcn-theme"
9
9
  },
10
+ "dependencies": {
11
+ "tslib": "^2.3.0"
12
+ },
10
13
  "engines": {
11
14
  "node": ">=20"
12
15
  },
@@ -64,6 +67,22 @@
64
67
  "types": "./form-field/index.d.ts",
65
68
  "default": "./form-field/fesm2022/form-field.mjs"
66
69
  },
70
+ "./popover": {
71
+ "types": "./popover/index.d.ts",
72
+ "default": "./popover/fesm2022/popover.mjs"
73
+ },
74
+ "./calendar": {
75
+ "types": "./calendar/index.d.ts",
76
+ "default": "./calendar/fesm2022/calendar.mjs"
77
+ },
78
+ "./date-picker": {
79
+ "types": "./date-picker/index.d.ts",
80
+ "default": "./date-picker/fesm2022/date-picker.mjs"
81
+ },
82
+ "./dialog": {
83
+ "types": "./dialog/index.d.ts",
84
+ "default": "./dialog/fesm2022/dialog.mjs"
85
+ },
67
86
  "./radio-group": {
68
87
  "types": "./radio-group/index.d.ts",
69
88
  "default": "./radio-group/fesm2022/radio-group.mjs"
@@ -75,6 +94,30 @@
75
94
  "./tooltip": {
76
95
  "types": "./tooltip/index.d.ts",
77
96
  "default": "./tooltip/fesm2022/tooltip.mjs"
97
+ },
98
+ "./form-select": {
99
+ "types": "./form-select/index.d.ts",
100
+ "default": "./form-select/fesm2022/form-select.mjs"
101
+ },
102
+ "./form-text-input": {
103
+ "types": "./form-text-input/index.d.ts",
104
+ "default": "./form-text-input/fesm2022/form-text-input.mjs"
105
+ },
106
+ "./form-textarea": {
107
+ "types": "./form-textarea/index.d.ts",
108
+ "default": "./form-textarea/fesm2022/form-textarea.mjs"
109
+ },
110
+ "./form-date-picker": {
111
+ "types": "./form-date-picker/index.d.ts",
112
+ "default": "./form-date-picker/fesm2022/form-date-picker.mjs"
113
+ },
114
+ "./basic-alert": {
115
+ "types": "./basic-alert/index.d.ts",
116
+ "default": "./basic-alert/fesm2022/basic-alert.mjs"
117
+ },
118
+ "./confirmation-dialog": {
119
+ "types": "./confirmation-dialog/index.d.ts",
120
+ "default": "./confirmation-dialog/fesm2022/confirmation-dialog.mjs"
78
121
  }
79
122
  }
80
123
  }
@@ -0,0 +1,64 @@
1
+ # Popover
2
+
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.3.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
8
+
9
+ ```bash
10
+ ng generate component component-name
11
+ ```
12
+
13
+ For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
14
+
15
+ ```bash
16
+ ng generate --help
17
+ ```
18
+
19
+ ## Building
20
+
21
+ To build the library, run:
22
+
23
+ ```bash
24
+ ng build popover
25
+ ```
26
+
27
+ This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28
+
29
+ ### Publishing the Library
30
+
31
+ Once the project is built, you can publish your library by following these steps:
32
+
33
+ 1. Navigate to the `dist` directory:
34
+
35
+ ```bash
36
+ cd dist/popover
37
+ ```
38
+
39
+ 2. Run the `npm publish` command to publish your library to the npm registry:
40
+ ```bash
41
+ npm publish
42
+ ```
43
+
44
+ ## Running unit tests
45
+
46
+ To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
47
+
48
+ ```bash
49
+ ng test
50
+ ```
51
+
52
+ ## Running end-to-end tests
53
+
54
+ For end-to-end (e2e) testing, run:
55
+
56
+ ```bash
57
+ ng e2e
58
+ ```
59
+
60
+ Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
61
+
62
+ ## Additional Resources
63
+
64
+ For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
@@ -0,0 +1,69 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, Directive, signal, inject, Renderer2, ElementRef, effect, NgModule } from '@angular/core';
3
+ import { hlm } from '@egose/shadcn-theme-ng/utils';
4
+ import { injectExposesStateProvider } from '@spartan-ng/brain/core';
5
+
6
+ class HlmPopoverClose {
7
+ userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
8
+ _computedClass = computed(() => hlm('tw:ring-offset-background tw:focus:ring-ring tw:data-[state=open]:bg-accent tw:data-[state=open]:text-muted-foreground tw:absolute tw:right-4 tw:top-4 tw:rounded-sm tw:opacity-70 tw:transition-opacity tw:hover:opacity-100 tw:focus:outline-none tw:focus:ring-2 tw:focus:ring-offset-2 tw:disabled:pointer-events-none', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
9
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmPopoverClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
10
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: HlmPopoverClose, isStandalone: true, selector: "[hlmPopoverClose],[brnPopoverClose][hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
11
+ }
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmPopoverClose, decorators: [{
13
+ type: Directive,
14
+ args: [{
15
+ selector: '[hlmPopoverClose],[brnPopoverClose][hlm]',
16
+ host: {
17
+ '[class]': '_computedClass()',
18
+ },
19
+ }]
20
+ }] });
21
+
22
+ class HlmPopoverContent {
23
+ _stateProvider = injectExposesStateProvider({ host: true });
24
+ state = this._stateProvider.state ?? signal('closed');
25
+ _renderer = inject(Renderer2);
26
+ _element = inject(ElementRef);
27
+ constructor() {
28
+ effect(() => {
29
+ this._renderer.setAttribute(this._element.nativeElement, 'data-state', this.state());
30
+ });
31
+ }
32
+ userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
33
+ _computedClass = computed(() => hlm('tw:border-border tw:bg-popover tw:text-popover-foreground 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:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2 tw:relative tw:w-72 tw:rounded-md tw:border tw:p-4 tw:shadow-md tw:outline-none', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
34
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmPopoverContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
35
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: HlmPopoverContent, isStandalone: true, selector: "[hlmPopoverContent],[brnPopoverContent][hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
36
+ }
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmPopoverContent, decorators: [{
38
+ type: Directive,
39
+ args: [{
40
+ selector: '[hlmPopoverContent],[brnPopoverContent][hlm]',
41
+ host: {
42
+ '[class]': '_computedClass()',
43
+ },
44
+ }]
45
+ }], ctorParameters: () => [] });
46
+
47
+ /*
48
+ * Public API Surface of popover
49
+ */
50
+ const HlmPopoverImports = [HlmPopoverContent, HlmPopoverClose];
51
+ class HlmPopoverModule {
52
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmPopoverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
53
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: HlmPopoverModule, imports: [HlmPopoverContent, HlmPopoverClose], exports: [HlmPopoverContent, HlmPopoverClose] });
54
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmPopoverModule });
55
+ }
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmPopoverModule, decorators: [{
57
+ type: NgModule,
58
+ args: [{
59
+ imports: [...HlmPopoverImports],
60
+ exports: [...HlmPopoverImports],
61
+ }]
62
+ }] });
63
+
64
+ /**
65
+ * Generated bundle index. Do not edit.
66
+ */
67
+
68
+ export { HlmPopoverClose, HlmPopoverContent, HlmPopoverImports, HlmPopoverModule };
69
+ //# sourceMappingURL=popover.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.mjs","sources":["../../../projects/popover/src/lib/popover-close.ts","../../../projects/popover/src/lib/popover-content.ts","../../../projects/popover/src/public-api.ts","../../../projects/popover/src/popover.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: '[hlmPopoverClose],[brnPopoverClose][hlm]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmPopoverClose {\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-accent tw:data-[state=open]:text-muted-foreground tw:absolute tw:right-4 tw:top-4 tw:rounded-sm tw:opacity-70 tw:transition-opacity tw:hover:opacity-100 tw:focus:outline-none tw:focus:ring-2 tw:focus:ring-offset-2 tw:disabled:pointer-events-none',\n this.userClass(),\n ),\n );\n}\n","import { Directive, ElementRef, Renderer2, computed, effect, inject, input, signal } from '@angular/core';\nimport { injectExposesStateProvider } from '@spartan-ng/brain/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmPopoverContent],[brnPopoverContent][hlm]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmPopoverContent {\n private readonly _stateProvider = injectExposesStateProvider({ host: true });\n public 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(\n 'tw:border-border tw:bg-popover tw:text-popover-foreground 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:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2 tw:relative tw:w-72 tw:rounded-md tw:border tw:p-4 tw:shadow-md tw:outline-none',\n this.userClass(),\n ),\n );\n}\n","/*\n * Public API Surface of popover\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmPopoverClose } from './lib/popover-close';\nimport { HlmPopoverContent } from './lib/popover-content';\n\nexport * from './lib/popover-close';\nexport * from './lib/popover-content';\n\nexport const HlmPopoverImports = [HlmPopoverContent, HlmPopoverClose] as const;\n\n@NgModule({\n imports: [...HlmPopoverImports],\n exports: [...HlmPopoverImports],\n})\nexport class HlmPopoverModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAUa,eAAe,CAAA;AACV,IAAA,SAAS,GAAG,KAAK,CAAa,EAAE,6CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAClD,IAAA,cAAc,GAAG,QAA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OAAA,EAAA,CAAlC,iBAAiB,EAAE,eAAe,CAAA,EAAA,CAAA;wGAMvD,gBAAgB,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAC/B,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAChC,iBAAA;;;ACjBD;;AAEG;;;;"}
@@ -0,0 +1,30 @@
1
+ import * as i0 from '@angular/core';
2
+ import { ClassValue } from 'clsx';
3
+
4
+ declare class HlmPopoverClose {
5
+ readonly userClass: i0.InputSignal<ClassValue>;
6
+ protected readonly _computedClass: i0.Signal<string>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmPopoverClose, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmPopoverClose, "[hlmPopoverClose],[brnPopoverClose][hlm]", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
9
+ }
10
+
11
+ declare class HlmPopoverContent {
12
+ private readonly _stateProvider;
13
+ state: i0.Signal<"open" | "closed">;
14
+ private readonly _renderer;
15
+ private readonly _element;
16
+ constructor();
17
+ readonly userClass: i0.InputSignal<ClassValue>;
18
+ protected readonly _computedClass: i0.Signal<string>;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmPopoverContent, never>;
20
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmPopoverContent, "[hlmPopoverContent],[brnPopoverContent][hlm]", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
21
+ }
22
+
23
+ declare const HlmPopoverImports: readonly [typeof HlmPopoverContent, typeof HlmPopoverClose];
24
+ declare class HlmPopoverModule {
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmPopoverModule, never>;
26
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HlmPopoverModule, never, [typeof HlmPopoverContent, typeof HlmPopoverClose], [typeof HlmPopoverContent, typeof HlmPopoverClose]>;
27
+ static ɵinj: i0.ɵɵInjectorDeclaration<HlmPopoverModule>;
28
+ }
29
+
30
+ export { HlmPopoverClose, HlmPopoverContent, HlmPopoverImports, HlmPopoverModule };
@@ -3,7 +3,7 @@ import { inject, Renderer2, ElementRef, PLATFORM_ID, input, computed, booleanAtt
3
3
  import { DOCUMENT, isPlatformBrowser } from '@angular/common';
4
4
  import * as i1 from '@spartan-ng/brain/radio-group';
5
5
  import { BrnRadio, BrnRadioGroup } from '@spartan-ng/brain/radio-group';
6
- import { cn } from '@egose/shadcn-theme-ng/utils';
6
+ import { hlm } from '@egose/shadcn-theme-ng/utils';
7
7
 
8
8
  class HlmRadio {
9
9
  _document = inject(DOCUMENT);
@@ -11,7 +11,7 @@ class HlmRadio {
11
11
  _elementRef = inject(ElementRef);
12
12
  _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
13
13
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
14
- _computedClass = computed(() => cn('tw:group tw:flex tw:items-center tw:gap-x-3', this.userClass(), this._state().disabled() ? 'tw:cursor-not-allowed tw:opacity-50' : ''), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
14
+ _computedClass = computed(() => hlm('tw:group tw:flex tw:items-center tw:gap-x-3', this.userClass(), this._state().disabled() ? 'tw:cursor-not-allowed tw:opacity-50' : ''), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
15
15
  /** Used to set the id on the underlying brn element. */
16
16
  id = input(undefined, ...(ngDevMode ? [{ debugName: "id" }] : []));
17
17
  /** Used to set the aria-label attribute on the underlying brn element. */
@@ -104,7 +104,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
104
104
 
105
105
  class HlmRadioGroup {
106
106
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
107
- _computedClass = computed(() => cn('tw:grid tw:gap-3', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
107
+ _computedClass = computed(() => hlm('tw:grid tw:gap-3', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
108
108
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
109
109
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.0", type: HlmRadioGroup, isStandalone: true, selector: "hlm-radio-group", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnRadioGroup, inputs: ["name", "name", "value", "value", "disabled", "disabled", "required", "required", "direction", "direction"], outputs: ["valueChange", "valueChange"] }], ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
110
110
  }
@@ -129,7 +129,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
129
129
 
130
130
  class HlmRadioIndicator {
131
131
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
132
- _computedClass = computed(() => cn('tw:border-input tw:text-primary tw:group-has-[:focus-visible]:border-ring tw:group-has-[:focus-visible]:ring-ring/50 tw:dark:bg-input/30 tw:shadow-xs tw:group-data=[disabled=true]:cursor-not-allowed tw:group-data=[disabled=true]:opacity-50 tw:relative tw:flex tw:aspect-square tw:size-4 tw:shrink-0 tw:items-center tw:justify-center tw:rounded-full tw:border tw:outline-none tw:transition-[color,box-shadow] tw:group-has-[:focus-visible]:ring-[3px]', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
132
+ _computedClass = computed(() => hlm('tw:border-input tw:text-primary tw:group-has-[:focus-visible]:border-ring tw:group-has-[:focus-visible]:ring-ring/50 tw:dark:bg-input/10 tw:shadow-xs tw:group-data=[disabled=true]:cursor-not-allowed tw:group-data=[disabled=true]:opacity-50 tw:relative tw:flex tw:aspect-square tw:size-4 tw:shrink-0 tw:items-center tw:justify-center tw:rounded-full tw:border tw:outline-none tw:transition-[color,box-shadow] tw:group-has-[:focus-visible]:ring-[3px]', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
133
133
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmRadioIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component });
134
134
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.0", type: HlmRadioIndicator, isStandalone: true, selector: "hlm-radio-indicator", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0, template: ` <div class="tw:group-data-[checked=true]:bg-primary tw:size-2 tw:rounded-full tw:bg-transparent"></div> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
135
135
  }
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.mjs","sources":["../../../projects/radio-group/src/lib/radio.ts","../../../projects/radio-group/src/lib/radio-group.ts","../../../projects/radio-group/src/lib/radio-indicator.ts","../../../projects/radio-group/src/public-api.ts","../../../projects/radio-group/src/radio-group.ts"],"sourcesContent":["import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n output,\n PLATFORM_ID,\n Renderer2,\n signal,\n} from '@angular/core';\nimport { BrnRadio, BrnRadioChange } from '@spartan-ng/brain/radio-group';\nimport { cn } from '@egose/shadcn-theme-ng/utils';\nimport { ClassValue } from 'clsx';\n\n@Component({\n selector: 'hlm-radio',\n imports: [BrnRadio],\n template: `\n <brn-radio\n [id]=\"id()\"\n [class]=\"_computedClass()\"\n [value]=\"value()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [aria-describedby]=\"ariaDescribedby()\"\n (change)=\"change.emit($event)\"\n >\n <ng-content select=\"[target],[indicator],hlm-radio-indicator\" indicator />\n <ng-content />\n </brn-radio>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\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})\nexport class HlmRadio<T = unknown> {\n private readonly _document = inject(DOCUMENT);\n private readonly _renderer = inject(Renderer2);\n private readonly _elementRef = inject(ElementRef);\n private readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n cn(\n 'tw:group tw:flex tw:items-center tw:gap-x-3',\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 | undefined>(undefined);\n\n /** Used to set the aria-label attribute on the underlying brn element. */\n public readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n\n /** Used to set the aria-labelledby attribute on the underlying brn element. */\n public readonly ariaLabelledby = input<string | undefined>(undefined, { alias: 'aria-labelledby' });\n\n /** Used to set the aria-describedby attribute on the underlying brn element. */\n public readonly ariaDescribedby = input<string | undefined>(undefined, { alias: 'aria-describedby' });\n\n /**\n * The value this radio button represents.\n */\n public readonly value = input.required<T>();\n\n /** Whether the checkbox is required. */\n public readonly required = input(false, { transform: booleanAttribute });\n\n /** Whether the checkbox is disabled. */\n public readonly disabled = input(false, { transform: booleanAttribute });\n\n protected readonly _state = computed(() => {\n const id = this.id();\n return {\n disabled: signal(this.disabled()),\n id: id ? id : null,\n };\n });\n /**\n * Event emitted when the checked state of this radio button changes.\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n public readonly change = output<BrnRadioChange<T>>();\n\n constructor() {\n effect(() => {\n const state = this._state();\n const isDisabled = state.disabled();\n\n if (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n const labelElement =\n this._elementRef.nativeElement.closest('label') ?? this._document.querySelector(`label[for=\"${state.id}\"]`);\n\n if (!labelElement) return;\n this._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { BrnRadioGroup } from '@spartan-ng/brain/radio-group';\nimport { cn } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'hlm-radio-group',\n hostDirectives: [\n {\n directive: BrnRadioGroup,\n inputs: ['name', 'value', 'disabled', 'required', 'direction'],\n outputs: ['valueChange'],\n },\n ],\n host: {\n '[class]': '_computedClass()',\n },\n template: '<ng-content />',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmRadioGroup {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() => cn('tw:grid tw:gap-3', this.userClass()));\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'hlm-radio-indicator',\n host: {\n '[class]': '_computedClass()',\n },\n template: ` <div class=\"tw:group-data-[checked=true]:bg-primary tw:size-2 tw:rounded-full tw:bg-transparent\"></div> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmRadioIndicator {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n cn(\n 'tw:border-input tw:text-primary tw:group-has-[:focus-visible]:border-ring tw:group-has-[:focus-visible]:ring-ring/50 tw:dark:bg-input/30 tw:shadow-xs tw:group-data=[disabled=true]:cursor-not-allowed tw:group-data=[disabled=true]:opacity-50 tw:relative tw:flex tw:aspect-square tw:size-4 tw:shrink-0 tw:items-center tw:justify-center tw:rounded-full tw:border tw:outline-none tw:transition-[color,box-shadow] tw:group-has-[:focus-visible]:ring-[3px]',\n this.userClass(),\n ),\n );\n}\n","/*\n * Public API Surface of radio-group\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmRadio } from './lib/radio';\nimport { HlmRadioGroup } from './lib/radio-group';\nimport { HlmRadioIndicator } from './lib/radio-indicator';\n\nexport * from './lib/radio';\nexport * from './lib/radio-group';\nexport * from './lib/radio-indicator';\n\nexport const HlmRadioGroupImports = [HlmRadioGroup, HlmRadio, HlmRadioIndicator];\n\n@NgModule({\n imports: [...HlmRadioGroupImports],\n exports: [...HlmRadioGroupImports],\n})\nexport class HlmRadioGroupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA+Ca,QAAQ,CAAA;AACF,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;IAChC,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAEpD,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,EAAE,CACA,6CAA6C,EAC7C,IAAI,CAAC,SAAS,EAAE,EAChB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,GAAG,qCAAqC,GAAG,EAAE,CACtE,0DACF;;AAGe,IAAA,EAAE,GAAG,KAAK,CAAqB,SA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;AAC9B,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,yGAAA,CAA2G;oBACrH,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;ACXD;;AAEG;AAYI,MAAM,oBAAoB,GAAG,CAAC,aAAa,EAAE,QAAQ,EAAE,iBAAiB;MAMlE,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAnB,mBAAmB,EAAA,OAAA,EAAA,CANK,aAAa,EAAE,QAAQ,EAAE,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAA1C,aAAa,EAAE,QAAQ,EAAE,iBAAiB,CAAA,EAAA,CAAA;AAMlE,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YANoB,QAAQ,CAAA,EAAA,CAAA;;2FAM/C,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC;AAClC,oBAAA,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC;AACnC,iBAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"radio-group.mjs","sources":["../../../projects/radio-group/src/lib/radio.ts","../../../projects/radio-group/src/lib/radio-group.ts","../../../projects/radio-group/src/lib/radio-indicator.ts","../../../projects/radio-group/src/public-api.ts","../../../projects/radio-group/src/radio-group.ts"],"sourcesContent":["import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n output,\n PLATFORM_ID,\n Renderer2,\n signal,\n} from '@angular/core';\nimport { BrnRadio, BrnRadioChange } from '@spartan-ng/brain/radio-group';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport { ClassValue } from 'clsx';\n\n@Component({\n selector: 'hlm-radio',\n imports: [BrnRadio],\n template: `\n <brn-radio\n [id]=\"id()\"\n [class]=\"_computedClass()\"\n [value]=\"value()\"\n [required]=\"required()\"\n [disabled]=\"disabled()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [aria-describedby]=\"ariaDescribedby()\"\n (change)=\"change.emit($event)\"\n >\n <ng-content select=\"[target],[indicator],hlm-radio-indicator\" indicator />\n <ng-content />\n </brn-radio>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\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})\nexport class HlmRadio<T = unknown> {\n private readonly _document = inject(DOCUMENT);\n private readonly _renderer = inject(Renderer2);\n private readonly _elementRef = inject(ElementRef);\n private readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:group tw:flex tw:items-center tw:gap-x-3',\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 | undefined>(undefined);\n\n /** Used to set the aria-label attribute on the underlying brn element. */\n public readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n\n /** Used to set the aria-labelledby attribute on the underlying brn element. */\n public readonly ariaLabelledby = input<string | undefined>(undefined, { alias: 'aria-labelledby' });\n\n /** Used to set the aria-describedby attribute on the underlying brn element. */\n public readonly ariaDescribedby = input<string | undefined>(undefined, { alias: 'aria-describedby' });\n\n /**\n * The value this radio button represents.\n */\n public readonly value = input.required<T>();\n\n /** Whether the checkbox is required. */\n public readonly required = input(false, { transform: booleanAttribute });\n\n /** Whether the checkbox is disabled. */\n public readonly disabled = input(false, { transform: booleanAttribute });\n\n protected readonly _state = computed(() => {\n const id = this.id();\n return {\n disabled: signal(this.disabled()),\n id: id ? id : null,\n };\n });\n /**\n * Event emitted when the checked state of this radio button changes.\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n public readonly change = output<BrnRadioChange<T>>();\n\n constructor() {\n effect(() => {\n const state = this._state();\n const isDisabled = state.disabled();\n\n if (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n const labelElement =\n this._elementRef.nativeElement.closest('label') ?? this._document.querySelector(`label[for=\"${state.id}\"]`);\n\n if (!labelElement) return;\n this._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { BrnRadioGroup } from '@spartan-ng/brain/radio-group';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Component({\n selector: 'hlm-radio-group',\n hostDirectives: [\n {\n directive: BrnRadioGroup,\n inputs: ['name', 'value', 'disabled', 'required', 'direction'],\n outputs: ['valueChange'],\n },\n ],\n host: {\n '[class]': '_computedClass()',\n },\n template: '<ng-content />',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmRadioGroup {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() => hlm('tw:grid tw:gap-3', 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-radio-indicator',\n host: {\n '[class]': '_computedClass()',\n },\n template: ` <div class=\"tw:group-data-[checked=true]:bg-primary tw:size-2 tw:rounded-full tw:bg-transparent\"></div> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmRadioIndicator {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:border-input tw:text-primary tw:group-has-[:focus-visible]:border-ring tw:group-has-[:focus-visible]:ring-ring/50 tw:dark:bg-input/10 tw:shadow-xs tw:group-data=[disabled=true]:cursor-not-allowed tw:group-data=[disabled=true]:opacity-50 tw:relative tw:flex tw:aspect-square tw:size-4 tw:shrink-0 tw:items-center tw:justify-center tw:rounded-full tw:border tw:outline-none tw:transition-[color,box-shadow] tw:group-has-[:focus-visible]:ring-[3px]',\n this.userClass(),\n ),\n );\n}\n","/*\n * Public API Surface of radio-group\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmRadio } from './lib/radio';\nimport { HlmRadioGroup } from './lib/radio-group';\nimport { HlmRadioIndicator } from './lib/radio-indicator';\n\nexport * from './lib/radio';\nexport * from './lib/radio-group';\nexport * from './lib/radio-indicator';\n\nexport const HlmRadioGroupImports = [HlmRadioGroup, HlmRadio, HlmRadioIndicator];\n\n@NgModule({\n imports: [...HlmRadioGroupImports],\n exports: [...HlmRadioGroupImports],\n})\nexport class HlmRadioGroupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA+Ca,QAAQ,CAAA;AACF,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;IAChC,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAEpD,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,6CAA6C,EAC7C,IAAI,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AA,CAAA;kBAR7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,kBAAkB;AAC9B,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,yGAAA,CAA2G;oBACrH,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;ACXD;;AAEG;AAYI,MAAM,oBAAoB,GAAG,CAAC,aAAa,EAAE,QAAQ,EAAE,iBAAiB;MAMlE,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAnB,mBAAmB,EAAA,OAAA,EAAA,CANK,aAAa,EAAE,QAAQ,EAAE,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAA1C,aAAa,EAAE,QAAQ,EAAE,iBAAiB,CAAA,EAAA,CAAA;AAMlE,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YANoB,QAAQ,CAAA,EAAA,CAAA;;2FAM/C,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC;AAClC,oBAAA,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC;AACnC,iBAAA;;;ACnBD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, computed, Directive, booleanAttribute, inject, ChangeDetectionStrategy, Component, contentChild, NgModule } from '@angular/core';
3
- import { cn } from '@egose/shadcn-theme-ng/utils';
3
+ import { hlm } from '@egose/shadcn-theme-ng/utils';
4
4
  import { injectExposesStateProvider, injectExposedSideProvider } from '@spartan-ng/brain/core';
5
5
  import * as i1 from '@spartan-ng/brain/select';
6
6
  import { BrnSelectGroup, BrnSelectLabel, BrnSelectOption, BrnSelect, BrnSelectTrigger } from '@spartan-ng/brain/select';
@@ -11,7 +11,7 @@ import { cva } from 'class-variance-authority';
11
11
 
12
12
  class HlmSelect {
13
13
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
14
- _computedClass = computed(() => cn('tw:space-y-2', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
14
+ _computedClass = computed(() => hlm('tw:space-y-2', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
15
15
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive });
16
16
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: HlmSelect, isStandalone: true, selector: "hlm-select, brn-select [hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
17
17
  }
@@ -32,7 +32,7 @@ class HlmSelectContent {
32
32
  }]));
33
33
  _stateProvider = injectExposesStateProvider({ optional: true });
34
34
  _sideProvider = injectExposedSideProvider({ optional: true });
35
- _computedClass = computed(() => cn('tw:border-border tw:bg-popover tw:text-popover-foreground 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:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2 tw:relative tw:z-50 tw:w-full tw:min-w-[8rem] tw:overflow-hidden tw:rounded-md tw:border tw:p-1 tw:shadow-md tw:data-[side=bottom]:top-[2px] tw:data-[side=top]:bottom-[2px]', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
35
+ _computedClass = computed(() => hlm('tw:border-border tw:bg-popover tw:text-popover-foreground 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:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2 tw:relative tw:z-50 tw:w-full tw:min-w-[8rem] tw:overflow-hidden tw:rounded-md tw:border tw:p-1 tw:shadow-md tw:data-[side=bottom]:top-[2px] tw:data-[side=top]:bottom-[2px]', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
36
36
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmSelectContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
37
37
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: HlmSelectContent, isStandalone: true, selector: "[hlmSelectContent], hlm-select-content", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, stickyLabels: { classPropertyName: "stickyLabels", publicName: "stickyLabels", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()", "attr.data-state": "_stateProvider?.state() ?? \"open\"", "attr.data-side": "_sideProvider?.side() ?? \"bottom\"" } }, ngImport: i0 });
38
38
  }
@@ -50,7 +50,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
50
50
 
51
51
  class HlmSelectGroup {
52
52
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
53
- _computedClass = computed(() => cn(this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
53
+ _computedClass = computed(() => hlm(this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
54
54
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmSelectGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
55
55
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: HlmSelectGroup, isStandalone: true, selector: "[hlmSelectGroup], hlm-select-group", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnSelectGroup }], ngImport: i0 });
56
56
  }
@@ -69,7 +69,7 @@ class HlmSelectLabel {
69
69
  _selectContent = inject(HlmSelectContent);
70
70
  _stickyLabels = computed(() => this._selectContent.stickyLabels(), ...(ngDevMode ? [{ debugName: "_stickyLabels" }] : []));
71
71
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
72
- _computedClass = computed(() => cn('tw:text-muted-foreground tw:px-2 tw:py-1.5 tw:text-xs', this._stickyLabels() ? 'tw:bg-popover tw:sticky tw:top-0 tw:z-[2] tw:block' : '', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
72
+ _computedClass = computed(() => hlm('tw:text-muted-foreground tw:px-2 tw:py-1.5 tw:text-xs', this._stickyLabels() ? 'tw:bg-popover tw:sticky tw:top-0 tw:z-[2] tw:block' : '', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
73
73
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmSelectLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
74
74
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: HlmSelectLabel, isStandalone: true, selector: "[hlmSelectLabel], hlm-select-label", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnSelectLabel }], ngImport: i0 });
75
75
  }
@@ -87,7 +87,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
87
87
  class HlmSelectOption {
88
88
  _brnSelectOption = inject(BrnSelectOption, { host: true });
89
89
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
90
- _computedClass = computed(() => cn('tw:data-[active]:bg-accent tw:data-[active]:text-accent-foreground tw:[&>ng-icon]:text-muted-foreground tw:*:[span]:last:flex tw:*:[span]:last:items-center tw:*:[span]:last:gap-2 tw:relative tw:flex tw:w-full tw:cursor-default tw:select-none tw:items-center tw:gap-2 tw:rounded-sm tw:py-1.5 tw:pl-2 tw:pr-8 tw:text-sm tw:outline-none tw:data-[disabled]:pointer-events-none tw:data-[disabled]:opacity-50 tw:[&>ng-icon]:pointer-events-none tw:[&>ng-icon]:size-4 tw:[&>ng-icon]:shrink-0', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
90
+ _computedClass = computed(() => hlm('tw:data-[active]:bg-accent tw:data-[active]:text-accent-foreground tw:[&>ng-icon]:text-muted-foreground tw:*:[span]:last:flex tw:*:[span]:last:items-center tw:*:[span]:last:gap-2 tw:relative tw:flex tw:w-full tw:cursor-default tw:select-none tw:items-center tw:gap-2 tw:rounded-sm tw:py-1.5 tw:pl-2 tw:pr-8 tw:text-sm tw:outline-none tw:data-[disabled]:pointer-events-none tw:data-[disabled]:opacity-50 tw:[&>ng-icon]:pointer-events-none tw:[&>ng-icon]:size-4 tw:[&>ng-icon]:shrink-0', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
91
91
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmSelectOption, deps: [], target: i0.ɵɵFactoryTarget.Component });
92
92
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: HlmSelectOption, isStandalone: true, selector: "hlm-option", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, providers: [provideIcons({ lucideCheck })], hostDirectives: [{ directive: i1.BrnSelectOption, inputs: ["disabled", "disabled", "value", "value"] }], ngImport: i0, template: `
93
93
  <span class="tw:absolute tw:right-2 tw:flex tw:size-3.5 tw:items-center tw:justify-center">
@@ -124,7 +124,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
124
124
 
125
125
  class HlmSelectScrollDown {
126
126
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
127
- _computedClass = computed(() => cn('tw:flex cursor-default tw:items-center tw:justify-center tw:py-1', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
127
+ _computedClass = computed(() => hlm('tw:flex cursor-default tw:items-center tw:justify-center tw:py-1', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
128
128
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmSelectScrollDown, deps: [], target: i0.ɵɵFactoryTarget.Component });
129
129
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.0", type: HlmSelectScrollDown, isStandalone: true, selector: "hlm-select-scroll-down", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, providers: [provideIcons({ lucideChevronDown })], ngImport: i0, template: ` <ng-icon hlm size="sm" class="tw:ml-2" name="lucideChevronDown" /> `, isInline: true, dependencies: [{ 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 });
130
130
  }
@@ -144,7 +144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
144
144
 
145
145
  class HlmSelectScrollUp {
146
146
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
147
- _computedClass = computed(() => cn('tw:flex tw:cursor-default tw:items-center tw:justify-center tw:py-1', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
147
+ _computedClass = computed(() => hlm('tw:flex tw:cursor-default tw:items-center tw:justify-center tw:py-1', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
148
148
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmSelectScrollUp, deps: [], target: i0.ɵɵFactoryTarget.Component });
149
149
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.0", type: HlmSelectScrollUp, isStandalone: true, selector: "hlm-select-scroll-up", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, providers: [provideIcons({ lucideChevronUp })], ngImport: i0, template: ` <ng-icon hlm size="sm" class="tw:ml-2" name="lucideChevronUp" /> `, isInline: true, dependencies: [{ 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 });
150
150
  }
@@ -162,7 +162,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
162
162
  }]
163
163
  }] });
164
164
 
165
- const selectTriggerVariants = cva(`tw:border-input tw:[&>ng-icon]:text-muted-foreground tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:dark:bg-input/30 tw:dark:hover:bg-input/50 tw:shadow-xs tw:flex tw:w-fit tw:items-center tw:justify-between tw:gap-2 tw:whitespace-nowrap tw:rounded-md tw:border tw:bg-transparent tw:px-3 tw:py-2 tw:text-sm tw:outline-none tw:transition-[color,box-shadow] tw:focus-visible:ring-[3px] tw:disabled:cursor-not-allowed tw:disabled:opacity-50 tw:data-[size=default]:h-9 tw:data-[size=sm]:h-8 tw:[&>ng-icon]:pointer-events-none tw:[&>ng-icon]:size-4 tw:[&>ng-icon]:shrink-0`, {
165
+ const selectTriggerVariants = cva(`tw:border-input tw:[&>ng-icon]:text-muted-foreground tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:dark:bg-input/10 tw:dark:hover:bg-input/50 tw:shadow-xs tw:flex tw:w-fit tw:items-center tw:justify-between tw:gap-2 tw:whitespace-nowrap tw:rounded-md tw:border tw:bg-transparent tw:px-3 tw:py-2 tw:text-sm tw:outline-none tw:transition-[color,box-shadow] tw:focus-visible:ring-[3px] tw:disabled:cursor-not-allowed tw:disabled:opacity-50 tw:data-[size=default]:h-9 tw:data-[size=sm]:h-8 tw:[&>ng-icon]:pointer-events-none tw:[&>ng-icon]:size-4 tw:[&>ng-icon]:shrink-0`, {
166
166
  variants: {
167
167
  error: {
168
168
  auto: 'tw:[&.ng-invalid.ng-touched]:text-destructive tw:[&.ng-invalid.ng-touched]:border-destructive tw:[&.ng-invalid.ng-touched]:focus-visible:ring-destructive/20 tw:dark:[&.ng-invalid.ng-touched]:focus-visible:ring-destructive/40',
@@ -178,7 +178,7 @@ class HlmSelectTrigger {
178
178
  _brnSelect = inject(BrnSelect, { optional: true });
179
179
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
180
180
  size = input('default', ...(ngDevMode ? [{ debugName: "size" }] : []));
181
- _computedClass = computed(() => cn(selectTriggerVariants({ error: this._brnSelect?.errorState() }), this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
181
+ _computedClass = computed(() => hlm(selectTriggerVariants({ error: this._brnSelect?.errorState() }), this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
182
182
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmSelectTrigger, deps: [], target: i0.ɵɵFactoryTarget.Component });
183
183
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: HlmSelectTrigger, isStandalone: true, selector: "hlm-select-trigger", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideIcons({ lucideChevronDown })], queries: [{ propertyName: "_icon", first: true, predicate: HlmIcon, descendants: true, isSignal: true }], ngImport: i0, template: `
184
184
  <button [class]="_computedClass()" #button egInput brnSelectTrigger type="button" [attr.data-size]="size()">
@@ -213,7 +213,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
213
213
 
214
214
  class HlmSelectValue {
215
215
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
216
- _computedClass = computed(() => cn('tw:data-[placeholder]:text-muted-foreground tw:line-clamp-1 tw:flex tw:items-center tw:gap-2', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
216
+ _computedClass = computed(() => hlm('tw:data-[placeholder]:text-muted-foreground tw:line-clamp-1 tw:flex tw:items-center tw:gap-2', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
217
217
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HlmSelectValue, deps: [], target: i0.ɵɵFactoryTarget.Directive });
218
218
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.0", type: HlmSelectValue, isStandalone: true, selector: "hlm-select-value,[hlmSelectValue], brn-select-value[hlm]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
219
219
  }