@egose/shadcn-theme-ng 0.0.26 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +107 -2
- package/accordion/fesm2022/accordion.mjs +42 -37
- package/accordion/fesm2022/accordion.mjs.map +1 -1
- package/accordion/package.json +25 -0
- package/accordion/{index.d.ts → types/accordion.d.ts} +1 -1
- package/alert/fesm2022/alert.mjs +32 -27
- package/alert/fesm2022/alert.mjs.map +1 -1
- package/alert/package.json +25 -0
- package/alert-dialog/README.md +11 -0
- package/alert-dialog/fesm2022/alert-dialog.mjs +287 -0
- package/alert-dialog/fesm2022/alert-dialog.mjs.map +1 -0
- package/alert-dialog/package.json +25 -0
- package/alert-dialog/types/alert-dialog.d.ts +90 -0
- package/aspect-ratio/README.md +11 -0
- package/aspect-ratio/fesm2022/aspect-ratio.mjs +62 -0
- package/aspect-ratio/fesm2022/aspect-ratio.mjs.map +1 -0
- package/aspect-ratio/package.json +25 -0
- package/aspect-ratio/types/aspect-ratio.d.ts +21 -0
- package/autocomplete/fesm2022/autocomplete.mjs +323 -457
- package/autocomplete/fesm2022/autocomplete.mjs.map +1 -1
- package/autocomplete/package.json +24 -0
- package/autocomplete/types/autocomplete.d.ts +96 -0
- package/avatar/README.md +11 -0
- package/avatar/fesm2022/avatar.mjs +178 -0
- package/avatar/fesm2022/avatar.mjs.map +1 -0
- package/avatar/package.json +25 -0
- package/avatar/types/avatar.d.ts +50 -0
- package/badge/fesm2022/badge.mjs +16 -10
- package/badge/fesm2022/badge.mjs.map +1 -1
- package/badge/package.json +25 -0
- package/basic-alert/fesm2022/basic-alert.mjs +12 -8
- package/basic-alert/fesm2022/basic-alert.mjs.map +1 -1
- package/basic-alert/package.json +24 -0
- package/breadcrumb/README.md +11 -0
- package/breadcrumb/fesm2022/breadcrumb.mjs +224 -0
- package/breadcrumb/fesm2022/breadcrumb.mjs.map +1 -0
- package/breadcrumb/package.json +25 -0
- package/breadcrumb/types/breadcrumb.d.ts +57 -0
- package/button/fesm2022/button.mjs +100 -26
- package/button/fesm2022/button.mjs.map +1 -1
- package/button/package.json +25 -0
- package/button/{index.d.ts → types/button.d.ts} +30 -9
- package/button-group/README.md +11 -0
- package/button-group/fesm2022/button-group.mjs +102 -0
- package/button-group/fesm2022/button-group.mjs.map +1 -0
- package/button-group/package.json +25 -0
- package/button-group/types/button-group.d.ts +30 -0
- package/calendar/fesm2022/calendar.mjs +868 -546
- package/calendar/fesm2022/calendar.mjs.map +1 -1
- package/calendar/package.json +24 -0
- package/calendar/types/calendar.d.ts +94 -0
- package/card/README.md +11 -0
- package/card/fesm2022/card.mjs +169 -0
- package/card/fesm2022/card.mjs.map +1 -0
- package/card/package.json +25 -0
- package/card/types/card.d.ts +54 -0
- package/carousel/README.md +11 -0
- package/carousel/fesm2022/carousel.mjs +309 -0
- package/carousel/fesm2022/carousel.mjs.map +1 -0
- package/carousel/package.json +25 -0
- package/carousel/types/carousel.d.ts +84 -0
- package/checkbox/fesm2022/checkbox.mjs +25 -20
- package/checkbox/fesm2022/checkbox.mjs.map +1 -1
- package/checkbox/package.json +24 -0
- package/collapsible/README.md +11 -0
- package/collapsible/fesm2022/collapsible.mjs +77 -0
- package/collapsible/fesm2022/collapsible.mjs.map +1 -0
- package/collapsible/package.json +25 -0
- package/collapsible/types/collapsible.d.ts +27 -0
- package/combobox/README.md +11 -0
- package/combobox/fesm2022/combobox.mjs +683 -0
- package/combobox/fesm2022/combobox.mjs.map +1 -0
- package/combobox/package.json +25 -0
- package/combobox/types/combobox.d.ts +151 -0
- package/command/README.md +11 -0
- package/command/fesm2022/command.mjs +361 -0
- package/command/fesm2022/command.mjs.map +1 -0
- package/command/package.json +25 -0
- package/command/types/command.d.ts +89 -0
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +19 -8
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +1 -1
- package/confirmation-dialog/package.json +24 -0
- package/context-menu/README.md +11 -0
- package/context-menu/fesm2022/context-menu.mjs +89 -0
- package/context-menu/fesm2022/context-menu.mjs.map +1 -0
- package/context-menu/package.json +25 -0
- package/context-menu/types/context-menu.d.ts +34 -0
- package/date-picker/fesm2022/date-picker.mjs +1262 -307
- package/date-picker/fesm2022/date-picker.mjs.map +1 -1
- package/date-picker/package.json +24 -0
- package/date-picker/types/date-picker.d.ts +551 -0
- package/dialog/fesm2022/dialog.mjs +137 -108
- package/dialog/fesm2022/dialog.mjs.map +1 -1
- package/dialog/package.json +24 -0
- package/dialog/types/dialog.d.ts +95 -0
- package/drawer/README.md +11 -0
- package/drawer/fesm2022/drawer.mjs +271 -0
- package/drawer/fesm2022/drawer.mjs.map +1 -0
- package/drawer/package.json +25 -0
- package/drawer/types/drawer.d.ts +76 -0
- package/dropdown-menu/README.md +11 -0
- package/dropdown-menu/fesm2022/dropdown-menu.mjs +542 -0
- package/dropdown-menu/fesm2022/dropdown-menu.mjs.map +1 -0
- package/dropdown-menu/package.json +25 -0
- package/dropdown-menu/types/dropdown-menu.d.ts +176 -0
- package/empty/README.md +11 -0
- package/empty/fesm2022/empty.mjs +151 -0
- package/empty/fesm2022/empty.mjs.map +1 -0
- package/empty/package.json +25 -0
- package/empty/types/empty.d.ts +54 -0
- package/field/README.md +11 -0
- package/field/fesm2022/field.mjs +367 -0
- package/field/fesm2022/field.mjs.map +1 -0
- package/field/package.json +25 -0
- package/field/types/field.d.ts +107 -0
- package/form-checkbox/fesm2022/form-checkbox.mjs +39 -22
- package/form-checkbox/fesm2022/form-checkbox.mjs.map +1 -1
- package/form-checkbox/package.json +24 -0
- package/form-date-picker/fesm2022/form-date-picker.mjs +58 -51
- package/form-date-picker/fesm2022/form-date-picker.mjs.map +1 -1
- package/form-date-picker/package.json +24 -0
- package/form-field/fesm2022/form-field.mjs +39 -27
- package/form-field/fesm2022/form-field.mjs.map +1 -1
- package/form-field/package.json +25 -0
- package/form-field/{index.d.ts → types/form-field.d.ts} +4 -3
- package/form-field-simple/fesm2022/form-field-simple.mjs +15 -10
- package/form-field-simple/fesm2022/form-field-simple.mjs.map +1 -1
- package/form-field-simple/package.json +24 -0
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +44 -25
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +1 -1
- package/form-searchable-multiselect/package.json +24 -0
- package/form-select/fesm2022/form-select.mjs +132 -71
- package/form-select/fesm2022/form-select.mjs.map +1 -1
- package/form-select/package.json +24 -0
- package/form-text-input/fesm2022/form-text-input.mjs +68 -39
- package/form-text-input/fesm2022/form-text-input.mjs.map +1 -1
- package/form-text-input/package.json +24 -0
- package/form-textarea/fesm2022/form-textarea.mjs +54 -30
- package/form-textarea/fesm2022/form-textarea.mjs.map +1 -1
- package/form-textarea/package.json +24 -0
- package/hover-card/README.md +11 -0
- package/hover-card/fesm2022/hover-card.mjs +123 -0
- package/hover-card/fesm2022/hover-card.mjs.map +1 -0
- package/hover-card/package.json +25 -0
- package/hover-card/types/hover-card.d.ts +36 -0
- package/icon/fesm2022/icon.mjs +12 -10
- package/icon/fesm2022/icon.mjs.map +1 -1
- package/icon/package.json +25 -0
- package/input/fesm2022/input.mjs +20 -70
- package/input/fesm2022/input.mjs.map +1 -1
- package/input/package.json +25 -0
- package/input/types/input.d.ts +18 -0
- package/input-group/README.md +11 -0
- package/input-group/fesm2022/input-group.mjs +199 -0
- package/input-group/fesm2022/input-group.mjs.map +1 -0
- package/input-group/package.json +25 -0
- package/input-group/types/input-group.d.ts +52 -0
- package/input-otp/README.md +11 -0
- package/input-otp/fesm2022/input-otp.mjs +141 -0
- package/input-otp/fesm2022/input-otp.mjs.map +1 -0
- package/input-otp/package.json +25 -0
- package/input-otp/types/input-otp.d.ts +43 -0
- package/item/README.md +11 -0
- package/item/fesm2022/item.mjs +278 -0
- package/item/fesm2022/item.mjs.map +1 -0
- package/item/package.json +25 -0
- package/item/types/item.d.ts +101 -0
- package/kbd/README.md +11 -0
- package/kbd/fesm2022/kbd.mjs +61 -0
- package/kbd/fesm2022/kbd.mjs.map +1 -0
- package/kbd/package.json +25 -0
- package/kbd/types/kbd.d.ts +22 -0
- package/label/fesm2022/label.mjs +11 -10
- package/label/fesm2022/label.mjs.map +1 -1
- package/label/package.json +25 -0
- package/layout-simple/fesm2022/layout-simple.mjs +438 -325
- package/layout-simple/fesm2022/layout-simple.mjs.map +1 -1
- package/layout-simple/package.json +24 -0
- package/layout-simple/{index.d.ts → types/layout-simple.d.ts} +28 -17
- package/menubar/README.md +11 -0
- package/menubar/fesm2022/menubar.mjs +108 -0
- package/menubar/fesm2022/menubar.mjs.map +1 -0
- package/menubar/package.json +25 -0
- package/menubar/types/menubar.d.ts +40 -0
- package/native-select/README.md +11 -0
- package/native-select/fesm2022/native-select.mjs +207 -0
- package/native-select/fesm2022/native-select.mjs.map +1 -0
- package/native-select/package.json +25 -0
- package/native-select/types/native-select.d.ts +70 -0
- package/navigation-menu/README.md +11 -0
- package/navigation-menu/fesm2022/navigation-menu.mjs +206 -0
- package/navigation-menu/fesm2022/navigation-menu.mjs.map +1 -0
- package/navigation-menu/package.json +25 -0
- package/navigation-menu/types/navigation-menu.d.ts +54 -0
- package/package.json +223 -81
- package/pagination/README.md +11 -0
- package/pagination/fesm2022/pagination.mjs +808 -0
- package/pagination/fesm2022/pagination.mjs.map +1 -0
- package/pagination/package.json +25 -0
- package/pagination/types/pagination.d.ts +192 -0
- package/popover/fesm2022/popover.mjs +121 -27
- package/popover/fesm2022/popover.mjs.map +1 -1
- package/popover/package.json +24 -0
- package/popover/types/popover.d.ts +54 -0
- package/progress/README.md +11 -0
- package/progress/fesm2022/progress.mjs +77 -0
- package/progress/fesm2022/progress.mjs.map +1 -0
- package/progress/package.json +25 -0
- package/progress/types/progress.d.ts +27 -0
- package/radio-group/fesm2022/radio-group.mjs +96 -62
- package/radio-group/fesm2022/radio-group.mjs.map +1 -1
- package/radio-group/package.json +25 -0
- package/radio-group/{index.d.ts → types/radio-group.d.ts} +22 -14
- package/resizable/README.md +11 -0
- package/resizable/fesm2022/resizable.mjs +111 -0
- package/resizable/fesm2022/resizable.mjs.map +1 -0
- package/resizable/package.json +25 -0
- package/resizable/types/resizable.d.ts +32 -0
- package/scroll-area/README.md +11 -0
- package/scroll-area/fesm2022/scroll-area.mjs +51 -0
- package/scroll-area/fesm2022/scroll-area.mjs.map +1 -0
- package/scroll-area/package.json +25 -0
- package/scroll-area/types/scroll-area.d.ts +16 -0
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +92 -88
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs.map +1 -1
- package/searchable-multiselect/package.json +24 -0
- package/searchable-multiselect/{index.d.ts → types/searchable-multiselect.d.ts} +13 -24
- package/select/fesm2022/select.mjs +371 -189
- package/select/fesm2022/select.mjs.map +1 -1
- package/select/package.json +25 -0
- package/select/types/select.d.ts +119 -0
- package/separator/fesm2022/separator.mjs +16 -14
- package/separator/fesm2022/separator.mjs.map +1 -1
- package/separator/package.json +24 -0
- package/separator/{index.d.ts → types/separator.d.ts} +4 -5
- package/sheet/fesm2022/sheet.mjs +57 -51
- package/sheet/fesm2022/sheet.mjs.map +1 -1
- package/sheet/package.json +24 -0
- package/sidebar/README.md +11 -0
- package/sidebar/fesm2022/sidebar.mjs +948 -0
- package/sidebar/fesm2022/sidebar.mjs.map +1 -0
- package/sidebar/package.json +25 -0
- package/sidebar/types/sidebar.d.ts +237 -0
- package/skeleton/README.md +11 -0
- package/skeleton/fesm2022/skeleton.mjs +44 -0
- package/skeleton/fesm2022/skeleton.mjs.map +1 -0
- package/skeleton/package.json +25 -0
- package/skeleton/types/skeleton.d.ts +16 -0
- package/slider/README.md +11 -0
- package/slider/fesm2022/slider.mjs +144 -0
- package/slider/fesm2022/slider.mjs.map +1 -0
- package/slider/package.json +25 -0
- package/slider/types/slider.d.ts +19 -0
- package/sonner/fesm2022/sonner.mjs +30 -35
- package/sonner/fesm2022/sonner.mjs.map +1 -1
- package/sonner/package.json +25 -0
- package/spinner/fesm2022/spinner.mjs +18 -14
- package/spinner/fesm2022/spinner.mjs.map +1 -1
- package/spinner/package.json +25 -0
- package/switch/fesm2022/switch.mjs +29 -26
- package/switch/fesm2022/switch.mjs.map +1 -1
- package/switch/package.json +25 -0
- package/table/README.md +11 -0
- package/table/fesm2022/table.mjs +211 -0
- package/table/fesm2022/table.mjs.map +1 -0
- package/table/package.json +25 -0
- package/table/types/table.d.ts +87 -0
- package/tabs/fesm2022/tabs.mjs +131 -103
- package/tabs/fesm2022/tabs.mjs.map +1 -1
- package/tabs/package.json +25 -0
- package/tabs/types/tabs.d.ts +71 -0
- package/textarea/README.md +11 -0
- package/textarea/fesm2022/textarea.mjs +47 -0
- package/textarea/fesm2022/textarea.mjs.map +1 -0
- package/textarea/package.json +25 -0
- package/textarea/types/textarea.d.ts +18 -0
- package/toggle/README.md +11 -0
- package/toggle/fesm2022/toggle.mjs +78 -0
- package/toggle/fesm2022/toggle.mjs.map +1 -0
- package/toggle/package.json +25 -0
- package/toggle/types/toggle.d.ts +27 -0
- package/toggle-group/README.md +11 -0
- package/toggle-group/fesm2022/toggle-group.mjs +117 -0
- package/toggle-group/fesm2022/toggle-group.mjs.map +1 -0
- package/toggle-group/package.json +25 -0
- package/toggle-group/types/toggle-group.d.ts +39 -0
- package/tooltip/fesm2022/tooltip.mjs +33 -54
- package/tooltip/fesm2022/tooltip.mjs.map +1 -1
- package/tooltip/package.json +25 -0
- package/tooltip/types/tooltip.d.ts +22 -0
- package/typography/README.md +11 -0
- package/typography/fesm2022/typography.mjs +242 -0
- package/typography/fesm2022/typography.mjs.map +1 -0
- package/typography/package.json +25 -0
- package/typography/types/typography.d.ts +94 -0
- package/utils/fesm2022/utils.mjs +184 -1
- package/utils/fesm2022/utils.mjs.map +1 -1
- package/utils/package.json +25 -0
- package/utils/types/utils.d.ts +13 -0
- package/autocomplete/index.d.ts +0 -162
- package/calendar/index.d.ts +0 -111
- package/date-picker/index.d.ts +0 -227
- package/dialog/index.d.ts +0 -89
- package/exports.json +0 -1
- package/input/index.d.ts +0 -41
- package/menu/README.md +0 -64
- package/menu/fesm2022/menu.mjs +0 -449
- package/menu/fesm2022/menu.mjs.map +0 -1
- package/menu/index.d.ts +0 -137
- package/popover/index.d.ts +0 -30
- package/select/index.d.ts +0 -92
- package/tabs/index.d.ts +0 -71
- package/tooltip/index.d.ts +0 -21
- package/utils/index.d.ts +0 -5
- /package/alert/{index.d.ts → types/alert.d.ts} +0 -0
- /package/badge/{index.d.ts → types/badge.d.ts} +0 -0
- /package/basic-alert/{index.d.ts → types/basic-alert.d.ts} +0 -0
- /package/checkbox/{index.d.ts → types/checkbox.d.ts} +0 -0
- /package/confirmation-dialog/{index.d.ts → types/confirmation-dialog.d.ts} +0 -0
- /package/form-checkbox/{index.d.ts → types/form-checkbox.d.ts} +0 -0
- /package/form-date-picker/{index.d.ts → types/form-date-picker.d.ts} +0 -0
- /package/form-field-simple/{index.d.ts → types/form-field-simple.d.ts} +0 -0
- /package/form-searchable-multiselect/{index.d.ts → types/form-searchable-multiselect.d.ts} +0 -0
- /package/form-select/{index.d.ts → types/form-select.d.ts} +0 -0
- /package/form-text-input/{index.d.ts → types/form-text-input.d.ts} +0 -0
- /package/form-textarea/{index.d.ts → types/form-textarea.d.ts} +0 -0
- /package/icon/{index.d.ts → types/icon.d.ts} +0 -0
- /package/label/{index.d.ts → types/label.d.ts} +0 -0
- /package/sheet/{index.d.ts → types/sheet.d.ts} +0 -0
- /package/sonner/{index.d.ts → types/sonner.d.ts} +0 -0
- /package/spinner/{index.d.ts → types/spinner.d.ts} +0 -0
- /package/switch/{index.d.ts → types/switch.d.ts} +0 -0
|
@@ -13,27 +13,32 @@ const HLM_CHECKBOX_VALUE_ACCESSOR = {
|
|
|
13
13
|
multi: true,
|
|
14
14
|
};
|
|
15
15
|
class HlmCheckbox {
|
|
16
|
-
userClass = input('', ...(ngDevMode ?
|
|
17
|
-
_computedClass = computed(() => hlm('border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shadow-xs peer size-4 shrink-0 cursor-default rounded-[4px] border outline-none transition-shadow focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50', this.userClass(), this._state().disabled() ? 'cursor-not-allowed opacity-50' : ''),
|
|
16
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
17
|
+
_computedClass = computed(() => hlm('border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shadow-xs peer size-4 shrink-0 cursor-default rounded-[4px] border outline-none transition-shadow focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50', this.userClass(), this._state().disabled() ? 'cursor-not-allowed opacity-50' : ''), /* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
|
|
18
19
|
/** Used to set the id on the underlying brn element. */
|
|
19
|
-
id = input(null,
|
|
20
|
+
id = input(null, /* @ts-ignore */
|
|
21
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
20
22
|
/** Used to set the aria-label attribute on the underlying brn element. */
|
|
21
|
-
ariaLabel = input(null, ...(ngDevMode ?
|
|
23
|
+
ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
22
24
|
/** Used to set the aria-labelledby attribute on the underlying brn element. */
|
|
23
|
-
ariaLabelledby = input(null, ...(ngDevMode ?
|
|
25
|
+
ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
24
26
|
/** Used to set the aria-describedby attribute on the underlying brn element. */
|
|
25
|
-
ariaDescribedby = input(null, ...(ngDevMode ?
|
|
27
|
+
ariaDescribedby = input(null, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
|
|
26
28
|
/** The checked state of the checkbox. */
|
|
27
|
-
checked = model(false,
|
|
29
|
+
checked = model(false, /* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
28
31
|
/** The name attribute of the checkbox. */
|
|
29
|
-
name = input(null,
|
|
32
|
+
name = input(null, /* @ts-ignore */
|
|
33
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
30
34
|
/** Whether the checkbox is required. */
|
|
31
|
-
required = input(false, ...(ngDevMode ?
|
|
35
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
32
36
|
/** Whether the checkbox is disabled. */
|
|
33
|
-
disabled = input(false, ...(ngDevMode ?
|
|
37
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
34
38
|
_state = computed(() => ({
|
|
35
39
|
disabled: signal(this.disabled()),
|
|
36
|
-
}),
|
|
40
|
+
}), /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []));
|
|
37
42
|
changed = output();
|
|
38
43
|
_onChange;
|
|
39
44
|
_onTouched;
|
|
@@ -58,8 +63,8 @@ class HlmCheckbox {
|
|
|
58
63
|
setDisabledState(isDisabled) {
|
|
59
64
|
this._state().disabled.set(isDisabled);
|
|
60
65
|
}
|
|
61
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
62
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
66
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: HlmCheckbox, isStandalone: true, selector: "hlm-checkbox", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", changed: "changed" }, host: { properties: { "attr.id": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null", "attr.data-disabled": "_state().disabled() ? \"\" : null" }, classAttribute: "contents peer" }, providers: [HLM_CHECKBOX_VALUE_ACCESSOR], ngImport: i0, template: `
|
|
63
68
|
<brn-checkbox
|
|
64
69
|
[id]="id()"
|
|
65
70
|
[name]="name()"
|
|
@@ -79,9 +84,9 @@ class HlmCheckbox {
|
|
|
79
84
|
</span>
|
|
80
85
|
}
|
|
81
86
|
</brn-checkbox>
|
|
82
|
-
`, isInline: true, dependencies: [{ kind: "component", type: BrnCheckbox, selector: "brn-checkbox", inputs: ["checked", "id", "name", "class", "aria-label", "aria-labelledby", "aria-describedby", "required", "disabled"], outputs: ["checkedChange", "touched"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: HlmIcon, selector: "ng-icon[hlm]", inputs: ["size"] }], viewProviders: [provideIcons({ lucideCheck })], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
87
|
+
`, isInline: true, dependencies: [{ kind: "component", type: BrnCheckbox, selector: "brn-checkbox", inputs: ["checked", "indeterminate", "id", "name", "class", "hostStyles", "aria-label", "aria-labelledby", "aria-describedby", "required", "disabled", "forceInvalid"], outputs: ["checkedChange", "indeterminateChange", "touched"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: HlmIcon, selector: "ng-icon[hlm]", inputs: ["size"] }], viewProviders: [provideIcons({ lucideCheck })], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
83
88
|
}
|
|
84
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCheckbox, decorators: [{
|
|
85
90
|
type: Component,
|
|
86
91
|
args: [{
|
|
87
92
|
selector: 'hlm-checkbox',
|
|
@@ -119,18 +124,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
119
124
|
viewProviders: [provideIcons({ lucideCheck })],
|
|
120
125
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
121
126
|
}]
|
|
122
|
-
}] });
|
|
127
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }] } });
|
|
123
128
|
|
|
124
129
|
/*
|
|
125
130
|
* Public API Surface of checkbox
|
|
126
131
|
*/
|
|
127
132
|
const HlmCheckboxImports = [HlmCheckbox];
|
|
128
133
|
class HlmCheckboxModule {
|
|
129
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
130
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
131
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
134
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
135
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmCheckboxModule, imports: [HlmCheckbox], exports: [HlmCheckbox] });
|
|
136
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCheckboxModule, imports: [HlmCheckboxImports] });
|
|
132
137
|
}
|
|
133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCheckboxModule, decorators: [{
|
|
134
139
|
type: NgModule,
|
|
135
140
|
args: [{
|
|
136
141
|
imports: [...HlmCheckboxImports],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.mjs","sources":["../../../projects/checkbox/src/lib/checkbox.ts","../../../projects/checkbox/src/public-api.ts","../../../projects/checkbox/src/checkbox.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NgIcon, provideIcons } from '@ng-icons/core';\nimport { lucideCheck } from '@ng-icons/lucide';\nimport { BrnCheckbox } from '@spartan-ng/brain/checkbox';\nimport type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\nimport { HlmIcon } from '@egose/shadcn-theme-ng/icon';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\nexport const HLM_CHECKBOX_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => HlmCheckbox),\n multi: true,\n};\n\n@Component({\n selector: 'hlm-checkbox',\n imports: [BrnCheckbox, NgIcon, HlmIcon],\n template: `\n <brn-checkbox\n [id]=\"id()\"\n [name]=\"name()\"\n [class]=\"_computedClass()\"\n [checked]=\"checked()\"\n [disabled]=\"_state().disabled()\"\n [required]=\"required()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [aria-describedby]=\"ariaDescribedby()\"\n (changed)=\"_handleChange()\"\n (touched)=\"_onTouched?.()\"\n >\n @if (checked()) {\n <span class=\"tw:flex tw:items-center tw:justify-center tw:text-current tw:transition-none\">\n <ng-icon hlm size=\"14px\" name=\"lucideCheck\" />\n </span>\n }\n </brn-checkbox>\n `,\n host: {\n class: 'contents peer',\n '[attr.id]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n '[attr.data-disabled]': '_state().disabled() ? \"\" : null',\n },\n providers: [HLM_CHECKBOX_VALUE_ACCESSOR],\n viewProviders: [provideIcons({ lucideCheck })],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmCheckbox implements ControlValueAccessor {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:border-input tw:dark:bg-input/30 tw:data-[state=checked]:bg-primary tw:data-[state=checked]:text-primary-foreground tw:dark:data-[state=checked]:bg-primary tw:data-[state=checked]:border-primary tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:aria-invalid:ring-destructive/20 tw:dark:aria-invalid:ring-destructive/40 tw:aria-invalid:border-destructive tw:shadow-xs tw:peer tw:size-4 tw:shrink-0 tw:cursor-default tw:rounded-[4px] tw:border tw:outline-none tw:transition-shadow tw:focus-visible:ring-[3px] tw:disabled:cursor-not-allowed tw:disabled:opacity-50',\n this.userClass(),\n this._state().disabled() ? 'tw:cursor-not-allowed tw:opacity-50' : '',\n ),\n );\n\n /** Used to set the id on the underlying brn element. */\n public readonly id = input<string | null>(null);\n\n /** Used to set the aria-label attribute on the underlying brn element. */\n public readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /** Used to set the aria-labelledby attribute on the underlying brn element. */\n public readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n /** Used to set the aria-describedby attribute on the underlying brn element. */\n public readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n /** The checked state of the checkbox. */\n public readonly checked = model<CheckboxValue>(false);\n\n /** The name attribute of the checkbox. */\n public readonly name = input<string | null>(null);\n\n /** Whether the checkbox is required. */\n public readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** Whether the checkbox is disabled. */\n public readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly _state = computed(() => ({\n disabled: signal(this.disabled()),\n }));\n\n public readonly changed = output<boolean>();\n\n protected _onChange?: ChangeFn<CheckboxValue>;\n protected _onTouched?: TouchFn;\n\n protected _handleChange(): void {\n if (this._state().disabled()) return;\n\n const previousChecked = this.checked();\n this.checked.set(previousChecked === 'indeterminate' ? true : !previousChecked);\n this._onChange?.(!previousChecked);\n this.changed.emit(!previousChecked);\n }\n\n /** CONTROL VALUE ACCESSOR */\n writeValue(value: CheckboxValue): void {\n this.checked.set(!!value);\n }\n\n registerOnChange(fn: ChangeFn<CheckboxValue>): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: TouchFn): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._state().disabled.set(isDisabled);\n }\n}\n\ntype CheckboxValue = boolean | 'indeterminate';\n","/*\n * Public API Surface of checkbox\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmCheckbox } from './lib/checkbox';\n\nexport * from './lib/checkbox';\n\nexport const HlmCheckboxImports = [HlmCheckbox] as const;\n@NgModule({\n imports: [...HlmCheckboxImports],\n exports: [...HlmCheckboxImports],\n})\nexport class HlmCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAqBO,MAAM,2BAA2B,GAAG;AACzC,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;AAC1C,IAAA,KAAK,EAAE,IAAI;;MAuCA,WAAW,CAAA;AACN,IAAA,SAAS,GAAG,KAAK,CAAa,EAAE,6CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAElD,IAAA,cAAc,GAAG,QAAQ,CAAC,MAC3C,GAAG,CACD,ikBAAikB,EACjkB,IAAI,CAAC,SAAS,EAAE,EAChB,IAAI,CAAC,MAAM,EAAE,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E,eAAe;AACtB,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,mBAAmB,EAAE,MAAM;AAC3B,wBAAA,wBAAwB,EAAE,MAAM;AAChC,wBAAA,yBAAyB,EAAE,MAAM;AACjC,wBAAA,sBAAsB,EAAE,iCAAiC;AAC1D,qBAAA;oBACD,SAAS,EAAE,CAAC,2BAA2B,CAAC;oBACxC,aAAa,EAAE,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;oBAC9C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;AC9DD;;AAEG;AAQI,MAAM,kBAAkB,GAAG,CAAC,WAAW;MAKjC,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAjB,iBAAiB,EAAA,OAAA,EAAA,CALK,WAAW,CAAA,EAAA,OAAA,EAAA,CAAX,WAAW,CAAA,EAAA,CAAA;AAKjC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHf,kBAAkB,CAAA,EAAA,CAAA;;2FAGpB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AACjC,iBAAA;;;ACdD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"checkbox.mjs","sources":["../../../projects/checkbox/src/lib/checkbox.ts","../../../projects/checkbox/src/public-api.ts","../../../projects/checkbox/src/checkbox.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NgIcon, provideIcons } from '@ng-icons/core';\nimport { lucideCheck } from '@ng-icons/lucide';\nimport { BrnCheckbox } from '@spartan-ng/brain/checkbox';\nimport type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\nimport { HlmIcon } from '@egose/shadcn-theme-ng/icon';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\nexport const HLM_CHECKBOX_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => HlmCheckbox),\n multi: true,\n};\n\n@Component({\n selector: 'hlm-checkbox',\n imports: [BrnCheckbox, NgIcon, HlmIcon],\n template: `\n <brn-checkbox\n [id]=\"id()\"\n [name]=\"name()\"\n [class]=\"_computedClass()\"\n [checked]=\"checked()\"\n [disabled]=\"_state().disabled()\"\n [required]=\"required()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [aria-describedby]=\"ariaDescribedby()\"\n (changed)=\"_handleChange()\"\n (touched)=\"_onTouched?.()\"\n >\n @if (checked()) {\n <span class=\"tw:flex tw:items-center tw:justify-center tw:text-current tw:transition-none\">\n <ng-icon hlm size=\"14px\" name=\"lucideCheck\" />\n </span>\n }\n </brn-checkbox>\n `,\n host: {\n class: 'contents peer',\n '[attr.id]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n '[attr.data-disabled]': '_state().disabled() ? \"\" : null',\n },\n providers: [HLM_CHECKBOX_VALUE_ACCESSOR],\n viewProviders: [provideIcons({ lucideCheck })],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmCheckbox implements ControlValueAccessor {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:border-input tw:dark:bg-input/30 tw:data-[state=checked]:bg-primary tw:data-[state=checked]:text-primary-foreground tw:dark:data-[state=checked]:bg-primary tw:data-[state=checked]:border-primary tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:aria-invalid:ring-destructive/20 tw:dark:aria-invalid:ring-destructive/40 tw:aria-invalid:border-destructive tw:shadow-xs tw:peer tw:size-4 tw:shrink-0 tw:cursor-default tw:rounded-[4px] tw:border tw:outline-none tw:transition-shadow tw:focus-visible:ring-[3px] tw:disabled:cursor-not-allowed tw:disabled:opacity-50',\n this.userClass(),\n this._state().disabled() ? 'tw:cursor-not-allowed tw:opacity-50' : '',\n ),\n );\n\n /** Used to set the id on the underlying brn element. */\n public readonly id = input<string | null>(null);\n\n /** Used to set the aria-label attribute on the underlying brn element. */\n public readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /** Used to set the aria-labelledby attribute on the underlying brn element. */\n public readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n /** Used to set the aria-describedby attribute on the underlying brn element. */\n public readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n /** The checked state of the checkbox. */\n public readonly checked = model<CheckboxValue>(false);\n\n /** The name attribute of the checkbox. */\n public readonly name = input<string | null>(null);\n\n /** Whether the checkbox is required. */\n public readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** Whether the checkbox is disabled. */\n public readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly _state = computed(() => ({\n disabled: signal(this.disabled()),\n }));\n\n public readonly changed = output<boolean>();\n\n protected _onChange?: ChangeFn<CheckboxValue>;\n protected _onTouched?: TouchFn;\n\n protected _handleChange(): void {\n if (this._state().disabled()) return;\n\n const previousChecked = this.checked();\n this.checked.set(previousChecked === 'indeterminate' ? true : !previousChecked);\n this._onChange?.(!previousChecked);\n this.changed.emit(!previousChecked);\n }\n\n /** CONTROL VALUE ACCESSOR */\n writeValue(value: CheckboxValue): void {\n this.checked.set(!!value);\n }\n\n registerOnChange(fn: ChangeFn<CheckboxValue>): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: TouchFn): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._state().disabled.set(isDisabled);\n }\n}\n\ntype CheckboxValue = boolean | 'indeterminate';\n","/*\n * Public API Surface of checkbox\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmCheckbox } from './lib/checkbox';\n\nexport * from './lib/checkbox';\n\nexport const HlmCheckboxImports = [HlmCheckbox] as const;\n@NgModule({\n imports: [...HlmCheckboxImports],\n exports: [...HlmCheckboxImports],\n})\nexport class HlmCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAqBO,MAAM,2BAA2B,GAAG;AACzC,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;AAC1C,IAAA,KAAK,EAAE,IAAI;;MAuCA,WAAW,CAAA;IACN,SAAS,GAAG,KAAK,CAAa,EAAE,iFAAI,KAAK,EAAE,OAAO,EAAA,CAAG;AAElD,IAAA,cAAc,GAAG,QAAQ,CAAC,MAC3C,GAAG,CACD,ikBAAikB,EACjkB,IAAI,CAAC,SAAS,EAAE,EAChB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,GAAG,qCAAqC,GAAG,EAAE,CACtE;uFACF;;IAGe,EAAE,GAAG,KAAK,CAAgB,IAAI;2EAAC;;IAG/B,SAAS,GAAG,KAAK,CAAgB,IAAI,iFAAI,KAAK,EAAE,YAAY,EAAA,CAAG;;IAG/D,cAAc,GAAG,KAAK,CAAgB,IAAI,sFAAI,KAAK,EAAE,iBAAiB,EAAA,CAAG;;IAGzE,eAAe,GAAG,KAAK,CAAgB,IAAI,uFAAI,KAAK,EAAE,kBAAkB,EAAA,CAAG;;IA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AX,WAAW,CAAA,EAAA,CAAA;AAKjC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHf,kBAAkB,CAAA,EAAA,CAAA;;2FAGpB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AACjC,iBAAA;;;ACdD;;AAEG;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "checkbox",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^20.3.0 || ^22.0.0",
|
|
6
|
+
"@angular/core": "^20.3.0 || ^22.0.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"module": "fesm2022/checkbox.mjs",
|
|
13
|
+
"typings": "types/checkbox.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./types/checkbox.d.ts",
|
|
20
|
+
"default": "./fesm2022/checkbox.mjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"type": "module"
|
|
24
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@spartan-ng/brain/collapsible';
|
|
4
|
+
import { BrnCollapsible, BrnCollapsibleContent, BrnCollapsibleTrigger } from '@spartan-ng/brain/collapsible';
|
|
5
|
+
import { classes } from '@egose/shadcn-theme-ng/utils';
|
|
6
|
+
|
|
7
|
+
class HlmCollapsible {
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCollapsible, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmCollapsible, isStandalone: true, selector: "[hlmCollapsible],hlm-collapsible", host: { attributes: { "data-slot": "collapsible" } }, hostDirectives: [{ directive: i1.BrnCollapsible, inputs: ["expanded", "expanded", "disabled", "disabled"], outputs: ["expandedChange", "expandedChange"] }], ngImport: i0 });
|
|
10
|
+
}
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCollapsible, decorators: [{
|
|
12
|
+
type: Directive,
|
|
13
|
+
args: [{
|
|
14
|
+
selector: '[hlmCollapsible],hlm-collapsible',
|
|
15
|
+
hostDirectives: [
|
|
16
|
+
{
|
|
17
|
+
directive: BrnCollapsible,
|
|
18
|
+
inputs: ['expanded', 'disabled'],
|
|
19
|
+
outputs: ['expandedChange'],
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
host: { 'data-slot': 'collapsible' },
|
|
23
|
+
}]
|
|
24
|
+
}] });
|
|
25
|
+
|
|
26
|
+
class HlmCollapsibleContent {
|
|
27
|
+
constructor() {
|
|
28
|
+
classes(() => 'data-[state=closed]:hidden');
|
|
29
|
+
}
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCollapsibleContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
31
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmCollapsibleContent, isStandalone: true, selector: "[hlmCollapsibleContent],hlm-collapsible-content", host: { attributes: { "data-slot": "collapsible-content" } }, hostDirectives: [{ directive: i1.BrnCollapsibleContent, inputs: ["id", "id"] }], ngImport: i0 });
|
|
32
|
+
}
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCollapsibleContent, decorators: [{
|
|
34
|
+
type: Directive,
|
|
35
|
+
args: [{
|
|
36
|
+
selector: '[hlmCollapsibleContent],hlm-collapsible-content',
|
|
37
|
+
hostDirectives: [{ directive: BrnCollapsibleContent, inputs: ['id'] }],
|
|
38
|
+
host: { 'data-slot': 'collapsible-content' },
|
|
39
|
+
}]
|
|
40
|
+
}], ctorParameters: () => [] });
|
|
41
|
+
|
|
42
|
+
class HlmCollapsibleTrigger {
|
|
43
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCollapsibleTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
44
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmCollapsibleTrigger, isStandalone: true, selector: "button[hlmCollapsibleTrigger]", host: { attributes: { "data-slot": "collapsible-trigger" } }, hostDirectives: [{ directive: i1.BrnCollapsibleTrigger, inputs: ["type", "type"] }], ngImport: i0 });
|
|
45
|
+
}
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCollapsibleTrigger, decorators: [{
|
|
47
|
+
type: Directive,
|
|
48
|
+
args: [{
|
|
49
|
+
selector: 'button[hlmCollapsibleTrigger]',
|
|
50
|
+
hostDirectives: [{ directive: BrnCollapsibleTrigger, inputs: ['type'] }],
|
|
51
|
+
host: { 'data-slot': 'collapsible-trigger' },
|
|
52
|
+
}]
|
|
53
|
+
}] });
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* Public API Surface of collapsible
|
|
57
|
+
*/
|
|
58
|
+
const HlmCollapsibleImports = [HlmCollapsible, HlmCollapsibleContent, HlmCollapsibleTrigger];
|
|
59
|
+
class HlmCollapsibleModule {
|
|
60
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCollapsibleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
61
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmCollapsibleModule, imports: [HlmCollapsible, HlmCollapsibleContent, HlmCollapsibleTrigger], exports: [HlmCollapsible, HlmCollapsibleContent, HlmCollapsibleTrigger] });
|
|
62
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCollapsibleModule });
|
|
63
|
+
}
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCollapsibleModule, decorators: [{
|
|
65
|
+
type: NgModule,
|
|
66
|
+
args: [{
|
|
67
|
+
imports: [...HlmCollapsibleImports],
|
|
68
|
+
exports: [...HlmCollapsibleImports],
|
|
69
|
+
}]
|
|
70
|
+
}] });
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Generated bundle index. Do not edit.
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
export { HlmCollapsible, HlmCollapsibleContent, HlmCollapsibleImports, HlmCollapsibleModule, HlmCollapsibleTrigger };
|
|
77
|
+
//# sourceMappingURL=collapsible.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible.mjs","sources":["../../../projects/collapsible/src/lib/hlm-collapsible.ts","../../../projects/collapsible/src/lib/hlm-collapsible-content.ts","../../../projects/collapsible/src/lib/hlm-collapsible-trigger.ts","../../../projects/collapsible/src/public-api.ts","../../../projects/collapsible/src/collapsible.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { BrnCollapsible } from '@spartan-ng/brain/collapsible';\n\n@Directive({\n selector: '[hlmCollapsible],hlm-collapsible',\n hostDirectives: [\n {\n directive: BrnCollapsible,\n inputs: ['expanded', 'disabled'],\n outputs: ['expandedChange'],\n },\n ],\n host: { 'data-slot': 'collapsible' },\n})\nexport class HlmCollapsible {}\n","import { Directive } from '@angular/core';\nimport { BrnCollapsibleContent } from '@spartan-ng/brain/collapsible';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: '[hlmCollapsibleContent],hlm-collapsible-content',\n hostDirectives: [{ directive: BrnCollapsibleContent, inputs: ['id'] }],\n host: { 'data-slot': 'collapsible-content' },\n})\nexport class HlmCollapsibleContent {\n constructor() {\n classes(() => 'data-[state=closed]:hidden');\n }\n}\n","import { Directive } from '@angular/core';\nimport { BrnCollapsibleTrigger } from '@spartan-ng/brain/collapsible';\n\n@Directive({\n selector: 'button[hlmCollapsibleTrigger]',\n hostDirectives: [{ directive: BrnCollapsibleTrigger, inputs: ['type'] }],\n host: { 'data-slot': 'collapsible-trigger' },\n})\nexport class HlmCollapsibleTrigger {}\n","/*\n * Public API Surface of collapsible\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmCollapsible } from './lib/hlm-collapsible';\nimport { HlmCollapsibleContent } from './lib/hlm-collapsible-content';\nimport { HlmCollapsibleTrigger } from './lib/hlm-collapsible-trigger';\n\nexport * from './lib/hlm-collapsible';\nexport * from './lib/hlm-collapsible-content';\nexport * from './lib/hlm-collapsible-trigger';\n\nexport const HlmCollapsibleImports = [HlmCollapsible, HlmCollapsibleContent, HlmCollapsibleTrigger] as const;\n\n@NgModule({\n imports: [...HlmCollapsibleImports],\n exports: [...HlmCollapsibleImports],\n})\nexport class HlmCollapsibleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAca,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EA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,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAApB,oBAAoB,EAAA,OAAA,EAAA,CANK,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAA5D,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,CAAA,EAAA,CAAA;wGAMrF,oBAAoB,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;AACpC,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "collapsible",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^22.0.0",
|
|
6
|
+
"@angular/core": "^22.0.0",
|
|
7
|
+
"@spartan-ng/brain": "^1.1.1"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"module": "fesm2022/collapsible.mjs",
|
|
14
|
+
"typings": "types/collapsible.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
"./package.json": {
|
|
17
|
+
"default": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./types/collapsible.d.ts",
|
|
21
|
+
"default": "./fesm2022/collapsible.mjs"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"type": "module"
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import * as i1 from '@spartan-ng/brain/collapsible';
|
|
3
|
+
|
|
4
|
+
declare class HlmCollapsible {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmCollapsible, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmCollapsible, "[hlmCollapsible],hlm-collapsible", never, {}, {}, never, never, true, [{ directive: typeof i1.BrnCollapsible; inputs: { "expanded": "expanded"; "disabled": "disabled"; }; outputs: { "expandedChange": "expandedChange"; }; }]>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare class HlmCollapsibleContent {
|
|
10
|
+
constructor();
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmCollapsibleContent, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmCollapsibleContent, "[hlmCollapsibleContent],hlm-collapsible-content", never, {}, {}, never, never, true, [{ directive: typeof i1.BrnCollapsibleContent; inputs: { "id": "id"; }; outputs: {}; }]>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare class HlmCollapsibleTrigger {
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmCollapsibleTrigger, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmCollapsibleTrigger, "button[hlmCollapsibleTrigger]", never, {}, {}, never, never, true, [{ directive: typeof i1.BrnCollapsibleTrigger; inputs: { "type": "type"; }; outputs: {}; }]>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare const HlmCollapsibleImports: readonly [typeof HlmCollapsible, typeof HlmCollapsibleContent, typeof HlmCollapsibleTrigger];
|
|
21
|
+
declare class HlmCollapsibleModule {
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmCollapsibleModule, never>;
|
|
23
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HlmCollapsibleModule, never, [typeof HlmCollapsible, typeof HlmCollapsibleContent, typeof HlmCollapsibleTrigger], [typeof HlmCollapsible, typeof HlmCollapsibleContent, typeof HlmCollapsibleTrigger]>;
|
|
24
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<HlmCollapsibleModule>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { HlmCollapsible, HlmCollapsibleContent, HlmCollapsibleImports, HlmCollapsibleModule, HlmCollapsibleTrigger };
|