@egose/shadcn-theme-ng 0.0.13 → 0.0.15

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 (43) hide show
  1. package/accordion/fesm2022/accordion.mjs +10 -10
  2. package/alert/fesm2022/alert.mjs +30 -30
  3. package/autocomplete/fesm2022/autocomplete.mjs +11 -11
  4. package/badge/fesm2022/badge.mjs +53 -53
  5. package/basic-alert/fesm2022/basic-alert.mjs +2 -2
  6. package/button/fesm2022/button.mjs +108 -108
  7. package/calendar/fesm2022/calendar.mjs +78 -78
  8. package/checkbox/README.md +64 -0
  9. package/checkbox/fesm2022/checkbox.mjs +146 -0
  10. package/checkbox/fesm2022/checkbox.mjs.map +1 -0
  11. package/checkbox/index.d.ts +55 -0
  12. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +10 -10
  13. package/date-picker/fesm2022/date-picker.mjs +11 -11
  14. package/dialog/fesm2022/dialog.mjs +9 -9
  15. package/exports.json +1 -1
  16. package/form-checkbox/README.md +64 -0
  17. package/form-checkbox/fesm2022/form-checkbox.mjs +134 -0
  18. package/form-checkbox/fesm2022/form-checkbox.mjs.map +1 -0
  19. package/form-checkbox/index.d.ts +26 -0
  20. package/form-date-picker/fesm2022/form-date-picker.mjs +9 -9
  21. package/form-field/fesm2022/form-field.mjs +3 -3
  22. package/form-field-simple/README.md +64 -0
  23. package/form-field-simple/fesm2022/form-field-simple.mjs +82 -0
  24. package/form-field-simple/fesm2022/form-field-simple.mjs.map +1 -0
  25. package/form-field-simple/index.d.ts +22 -0
  26. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +27 -20
  27. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +1 -1
  28. package/form-select/fesm2022/form-select.mjs +9 -9
  29. package/form-text-input/fesm2022/form-text-input.mjs +9 -9
  30. package/form-textarea/fesm2022/form-textarea.mjs +9 -9
  31. package/input/fesm2022/input.mjs +3 -3
  32. package/label/fesm2022/label.mjs +1 -1
  33. package/package.json +13 -1
  34. package/popover/fesm2022/popover.mjs +2 -2
  35. package/radio-group/fesm2022/radio-group.mjs +5 -5
  36. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +20 -20
  37. package/select/fesm2022/select.mjs +18 -18
  38. package/separator/fesm2022/separator.mjs +1 -1
  39. package/sonner/fesm2022/sonner.mjs +4 -4
  40. package/spinner/fesm2022/spinner.mjs +6 -6
  41. package/switch/fesm2022/switch.mjs +2 -2
  42. package/tabs/fesm2022/tabs.mjs +12 -12
  43. package/tooltip/fesm2022/tooltip.mjs +5 -5
@@ -14,15 +14,15 @@ class HlmSpinner {
14
14
  spinnerClass = input('', ...(ngDevMode ? [{ debugName: "spinnerClass", alias: 'spinnerClass' }] : [{ alias: 'spinnerClass' }]));
15
15
  // Map sizes to Tailwind classes
16
16
  sizeClasses = {
17
- small: 'tw:size-6!',
18
- medium: 'tw:size-8!',
19
- large: 'tw:size-12!',
17
+ small: 'size-6!',
18
+ medium: 'size-8!',
19
+ large: 'size-12!',
20
20
  };
21
21
  // Outer container class (visibility + layout)
22
- _containerClass = computed(() => hlm('tw:flex-col tw:items-center tw:justify-center', // base container styles
23
- this.show() ? 'tw:flex' : 'tw:hidden', this.wrapperClass()), ...(ngDevMode ? [{ debugName: "_containerClass" }] : []));
22
+ _containerClass = computed(() => hlm('flex-col items-center justify-center', // base container styles
23
+ this.show() ? 'flex' : 'hidden', this.wrapperClass()), ...(ngDevMode ? [{ debugName: "_containerClass" }] : []));
24
24
  // SVG spinner class (size + animation + color)
25
- _iconClass = computed(() => hlm('tw:[&>svg]:animate-spin tw:[&>svg]:text-primary', // base svg styles
25
+ _iconClass = computed(() => hlm('[&>svg]:animate-spin [&>svg]:text-primary', // base svg styles
26
26
  this.sizeClasses[this.size()], this.spinnerClass()), ...(ngDevMode ? [{ debugName: "_iconClass" }] : []));
27
27
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSpinner, deps: [], target: i0.ɵɵFactoryTarget.Component });
28
28
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmSpinner, isStandalone: true, selector: "hlm-spinner", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null }, wrapperClass: { classPropertyName: "wrapperClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, spinnerClass: { classPropertyName: "spinnerClass", publicName: "spinnerClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "status" }, properties: { "class": "_containerClass()" } }, ngImport: i0, template: `<ng-icon [svg]="icon" [class]="_iconClass()" />`, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
@@ -6,7 +6,7 @@ import { hlm } from '@egose/shadcn-theme-ng/utils';
6
6
 
7
7
  class HlmSwitchThumb {
8
8
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
9
- _computedClass = computed(() => hlm('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)]', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
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
10
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSwitchThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11
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
12
  }
@@ -27,7 +27,7 @@ const EG_SWITCH_VALUE_ACCESSOR = {
27
27
  };
28
28
  class HlmSwitch {
29
29
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
30
- _computedClass = computed(() => hlm('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', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
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
31
  /** The checked state of the switch. */
32
32
  checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
33
33
  /** The disabled state of the switch. */
@@ -14,7 +14,7 @@ import { HlmIcon } from '@egose/shadcn-theme-ng/icon';
14
14
  class HlmTabs {
15
15
  tab = input.required(...(ngDevMode ? [{ debugName: "tab" }] : []));
16
16
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
17
- _computedClass = computed(() => hlm('tw:flex tw:flex-col tw:gap-2', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
17
+ _computedClass = computed(() => hlm('flex flex-col gap-2', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
18
18
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmTabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
19
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmTabs, isStandalone: true, selector: "hlm-tabs", inputs: { tab: { classPropertyName: "tab", publicName: "tab", isSignal: true, isRequired: true, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnTabs, inputs: ["orientation", "orientation", "direction", "direction", "activationMode", "activationMode", "brnTabs", "tab"], outputs: ["tabActivated", "tabActivated"] }], ngImport: i0, template: '<ng-content/>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
20
20
  }
@@ -40,7 +40,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
40
40
  class HlmTabsContent {
41
41
  contentFor = input.required(...(ngDevMode ? [{ debugName: "contentFor", alias: 'hlmTabsContent' }] : [{ alias: 'hlmTabsContent' }]));
42
42
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
43
- _computedClass = computed(() => hlm('tw:ring-offset-background tw:focus-visible:ring-ring tw:mt-2 tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
43
+ _computedClass = computed(() => hlm('ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
44
44
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmTabsContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
45
45
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmTabsContent, isStandalone: true, selector: "[hlmTabsContent]", inputs: { contentFor: { classPropertyName: "contentFor", publicName: "hlmTabsContent", isSignal: true, isRequired: true, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnTabsContent, inputs: ["brnTabsContent", "hlmTabsContent"] }], ngImport: i0 });
46
46
  }
@@ -55,11 +55,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
55
55
  }]
56
56
  }] });
57
57
 
58
- const listVariants = cva('tw:bg-muted tw:text-muted-foreground tw:inline-flex tw:h-9 tw:w-fit tw:items-center tw:justify-center tw:rounded-lg tw:p-[3px]', {
58
+ const listVariants = cva('bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]', {
59
59
  variants: {
60
60
  orientation: {
61
- horizontal: 'tw:h-10 tw:space-x-1',
62
- vertical: 'tw:mt-2 tw:h-fit tw:flex-col tw:space-y-1',
61
+ horizontal: 'h-10 space-x-1',
62
+ vertical: 'mt-2 h-fit flex-col space-y-1',
63
63
  },
64
64
  },
65
65
  defaultVariants: {
@@ -96,11 +96,11 @@ class HlmTabsPaginatedList extends BrnTabsPaginatedList {
96
96
  nextPaginator = viewChild.required('nextPaginator');
97
97
  previousPaginator = viewChild.required('previousPaginator');
98
98
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
99
- _computedClass = computed(() => hlm('tw:relative tw:flex tw:flex-shrink-0 tw:gap-1 tw:overflow-hidden', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
99
+ _computedClass = computed(() => hlm('relative flex flex-shrink-0 gap-1 overflow-hidden', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
100
100
  tabListClass = input('', ...(ngDevMode ? [{ debugName: "tabListClass", alias: 'tabListClass' }] : [{ alias: 'tabListClass' }]));
101
101
  _tabListClass = computed(() => hlm(listVariants(), this.tabListClass()), ...(ngDevMode ? [{ debugName: "_tabListClass" }] : []));
102
102
  paginationButtonClass = input('', ...(ngDevMode ? [{ debugName: "paginationButtonClass", alias: 'paginationButtonClass' }] : [{ alias: 'paginationButtonClass' }]));
103
- _paginationButtonClass = computed(() => hlm('tw:relative tw:z-[2] tw:select-none tw:disabled:cursor-default', buttonVariants({ variant: 'ghost', size: 'icon' }), this.paginationButtonClass()), ...(ngDevMode ? [{ debugName: "_paginationButtonClass" }] : []));
103
+ _paginationButtonClass = computed(() => hlm('relative z-[2] select-none disabled:cursor-default', buttonVariants({ variant: 'ghost', size: 'icon' }), this.paginationButtonClass()), ...(ngDevMode ? [{ debugName: "_paginationButtonClass" }] : []));
104
104
  _itemSelected(event) {
105
105
  event.preventDefault();
106
106
  }
@@ -123,9 +123,9 @@ class HlmTabsPaginatedList extends BrnTabsPaginatedList {
123
123
  <ng-icon hlm size="base" name="lucideChevronLeft" />
124
124
  </button>
125
125
 
126
- <div #tabListContainer class="tw:z-[1] tw:flex tw:grow tw:overflow-hidden" (keydown)="_handleKeydown($event)">
126
+ <div #tabListContainer class="z-[1] flex grow overflow-hidden" (keydown)="_handleKeydown($event)">
127
127
  <div
128
- class="tw:relative tw:grow tw:transition-transform"
128
+ class="relative grow transition-transform"
129
129
  #tabList
130
130
  role="tablist"
131
131
  (cdkObserveContent)="_onContentChanges()"
@@ -178,9 +178,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
178
178
  <ng-icon hlm size="base" name="lucideChevronLeft" />
179
179
  </button>
180
180
 
181
- <div #tabListContainer class="tw:z-[1] tw:flex tw:grow tw:overflow-hidden" (keydown)="_handleKeydown($event)">
181
+ <div #tabListContainer class="z-[1] flex grow overflow-hidden" (keydown)="_handleKeydown($event)">
182
182
  <div
183
- class="tw:relative tw:grow tw:transition-transform"
183
+ class="relative grow transition-transform"
184
184
  #tabList
185
185
  role="tablist"
186
186
  (cdkObserveContent)="_onContentChanges()"
@@ -218,7 +218,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
218
218
  class HlmTabsTrigger {
219
219
  triggerFor = input.required(...(ngDevMode ? [{ debugName: "triggerFor", alias: 'hlmTabsTrigger' }] : [{ alias: 'hlmTabsTrigger' }]));
220
220
  userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
221
- _computedClass = computed(() => hlm('tw:data-[state=active]:bg-background tw:dark:data-[state=active]:text-foreground tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:focus-visible:outline-ring tw:dark:data-[state=active]:border-input tw:dark:data-[state=active]:bg-input/10 tw:text-foreground tw:dark:text-muted-foreground tw:inline-flex tw:h-[calc(100%-1px)] tw:flex-1 tw:items-center tw:justify-center tw:gap-1.5 tw:whitespace-nowrap tw:rounded-md tw:border tw:border-transparent tw:px-2 tw:py-1 tw:text-sm tw:font-medium tw:transition-[color,box-shadow] tw:focus-visible:outline-1 tw:focus-visible:ring-[3px] tw:disabled:pointer-events-none tw:disabled:opacity-50 tw:data-[state=active]:shadow-sm tw:[&_ng-icon]:pointer-events-none tw:[&_ng-icon]:shrink-0 tw:[&_ng-icon]:text-base', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
221
+ _computedClass = computed(() => hlm('data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/10 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-transparent px-2 py-1 text-sm font-medium transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0 [&_ng-icon]:text-base', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
222
222
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmTabsTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
223
223
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmTabsTrigger, isStandalone: true, selector: "[hlmTabsTrigger]", inputs: { triggerFor: { classPropertyName: "triggerFor", publicName: "hlmTabsTrigger", isSignal: true, isRequired: true, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnTabsTrigger, inputs: ["brnTabsTrigger", "hlmTabsTrigger", "disabled", "disabled"] }], ngImport: i0 });
224
224
  }
@@ -21,11 +21,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
21
21
  }]
22
22
  }] });
23
23
 
24
- const DEFAULT_TOOLTIP_CONTENT_CLASSES = 'tw:bg-primary tw:text-primary-foreground tw:animate-in tw:fade-in-0 tw:zoom-in-95 tw:z-50 tw:w-fit tw:rounded-md tw:px-3 tw:py-1.5 tw:text-xs tw:text-balance ' +
25
- 'tw:data-[state=open]:animate-in ' +
26
- 'tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=closed]:zoom-out-95 ' +
27
- 'tw:data-[side=below]:slide-in-from-top-2 tw:data-[side=above]:slide-in-from-bottom-2 ' +
28
- 'tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 ';
24
+ const DEFAULT_TOOLTIP_CONTENT_CLASSES = 'bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance ' +
25
+ 'data-[state=open]:animate-in ' +
26
+ 'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 ' +
27
+ 'data-[side=below]:slide-in-from-top-2 data-[side=above]:slide-in-from-bottom-2 ' +
28
+ 'data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 ';
29
29
  class HlmTooltipTrigger {
30
30
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmTooltipTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
31
31
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: HlmTooltipTrigger, isStandalone: true, selector: "[hlmTooltipTrigger]", providers: [