@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
|
@@ -5,12 +5,13 @@ import { BrnSwitchThumb, BrnSwitch } from '@spartan-ng/brain/switch';
|
|
|
5
5
|
import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
6
6
|
|
|
7
7
|
class HlmSwitchThumb {
|
|
8
|
-
userClass = input('', ...(ngDevMode ?
|
|
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()),
|
|
10
|
-
|
|
11
|
-
static
|
|
8
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
9
|
+
_computedClass = computed(() => hlm('bg-background dark:group-data-[state=unchecked]:bg-foreground dark:group-data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=unchecked]:translate-x-0 group-data-[state=checked]:translate-x-[calc(100%-2px)]', this.userClass()), /* @ts-ignore */
|
|
10
|
+
...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitchThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
12
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HlmSwitchThumb, isStandalone: true, selector: "brn-switch-thumb[hlm],[hlmSwitchThumb]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, ngImport: i0 });
|
|
12
13
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitchThumb, decorators: [{
|
|
14
15
|
type: Directive,
|
|
15
16
|
args: [{
|
|
16
17
|
selector: 'brn-switch-thumb[hlm],[hlmSwitchThumb]',
|
|
@@ -18,7 +19,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
18
19
|
'[class]': '_computedClass()',
|
|
19
20
|
},
|
|
20
21
|
}]
|
|
21
|
-
}] });
|
|
22
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
22
23
|
|
|
23
24
|
const EG_SWITCH_VALUE_ACCESSOR = {
|
|
24
25
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -26,25 +27,27 @@ const EG_SWITCH_VALUE_ACCESSOR = {
|
|
|
26
27
|
multi: true,
|
|
27
28
|
};
|
|
28
29
|
class HlmSwitch {
|
|
29
|
-
userClass = input('', ...(ngDevMode ?
|
|
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()),
|
|
30
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
31
|
+
_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()), /* @ts-ignore */
|
|
32
|
+
...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
|
|
31
33
|
/** The checked state of the switch. */
|
|
32
|
-
checked = model(false,
|
|
34
|
+
checked = model(false, /* @ts-ignore */
|
|
35
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
33
36
|
/** The disabled state of the switch. */
|
|
34
|
-
disabled = input(false, ...(ngDevMode ?
|
|
35
|
-
transform: booleanAttribute,
|
|
36
|
-
}]));
|
|
37
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
37
38
|
/** Used to set the id on the underlying brn element. */
|
|
38
|
-
id = input(null,
|
|
39
|
+
id = input(null, /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
39
41
|
/** Used to set the aria-label attribute on the underlying brn element. */
|
|
40
|
-
ariaLabel = input(null, ...(ngDevMode ?
|
|
42
|
+
ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
41
43
|
/** Used to set the aria-labelledby attribute on the underlying brn element. */
|
|
42
|
-
ariaLabelledby = input(null, ...(ngDevMode ?
|
|
44
|
+
ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
43
45
|
/** Used to set the aria-describedby attribute on the underlying brn element. */
|
|
44
|
-
ariaDescribedby = input(null, ...(ngDevMode ?
|
|
46
|
+
ariaDescribedby = input(null, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
|
|
45
47
|
/** Emits when the checked state of the switch changes. */
|
|
46
48
|
changed = output();
|
|
47
|
-
_disabled = linkedSignal(this.disabled,
|
|
49
|
+
_disabled = linkedSignal(this.disabled, /* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
48
51
|
_onChange;
|
|
49
52
|
_onTouched;
|
|
50
53
|
handleChange(value) {
|
|
@@ -66,8 +69,8 @@ class HlmSwitch {
|
|
|
66
69
|
setDisabledState(isDisabled) {
|
|
67
70
|
this._disabled.set(isDisabled);
|
|
68
71
|
}
|
|
69
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
70
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
72
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
73
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.7", type: HlmSwitch, isStandalone: true, selector: "hlm-switch", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", changed: "changed" }, host: { properties: { "attr.id": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" }, classAttribute: "contents" }, providers: [EG_SWITCH_VALUE_ACCESSOR], ngImport: i0, template: `
|
|
71
74
|
<brn-switch
|
|
72
75
|
[class]="_computedClass()"
|
|
73
76
|
[checked]="checked()"
|
|
@@ -82,9 +85,9 @@ class HlmSwitch {
|
|
|
82
85
|
>
|
|
83
86
|
<brn-switch-thumb hlm />
|
|
84
87
|
</brn-switch>
|
|
85
|
-
`, isInline: true, dependencies: [{ kind: "component", type: BrnSwitchThumb, selector: "brn-switch-thumb" }, { kind: "component", type: BrnSwitch, selector: "brn-switch", inputs: ["checked", "id", "name", "class", "aria-label", "aria-labelledby", "aria-describedby", "required", "disabled", "tabIndex"], outputs: ["checkedChange", "touched"] }, { kind: "directive", type: HlmSwitchThumb, selector: "brn-switch-thumb[hlm],[hlmSwitchThumb]", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
88
|
+
`, isInline: true, dependencies: [{ kind: "component", type: BrnSwitchThumb, selector: "brn-switch-thumb" }, { kind: "component", type: BrnSwitch, selector: "brn-switch", inputs: ["checked", "id", "name", "class", "hostStyles", "size", "aria-label", "aria-labelledby", "aria-describedby", "required", "disabled", "tabIndex"], outputs: ["checkedChange", "touched"] }, { kind: "directive", type: HlmSwitchThumb, selector: "brn-switch-thumb[hlm],[hlmSwitchThumb]", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
86
89
|
}
|
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitch, decorators: [{
|
|
88
91
|
type: Component,
|
|
89
92
|
args: [{
|
|
90
93
|
selector: 'hlm-switch',
|
|
@@ -116,18 +119,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
116
119
|
providers: [EG_SWITCH_VALUE_ACCESSOR],
|
|
117
120
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
118
121
|
}]
|
|
119
|
-
}] });
|
|
122
|
+
}], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], 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 }] }], changed: [{ type: i0.Output, args: ["changed"] }] } });
|
|
120
123
|
|
|
121
124
|
/*
|
|
122
125
|
* Public API Surface of switch
|
|
123
126
|
*/
|
|
124
127
|
const HlmSwitchImports = [HlmSwitch, HlmSwitchThumb];
|
|
125
128
|
class HlmSwitchModule {
|
|
126
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
127
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
128
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
129
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
130
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitchModule, imports: [HlmSwitch, HlmSwitchThumb], exports: [HlmSwitch, HlmSwitchThumb] });
|
|
131
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitchModule, imports: [HlmSwitch] });
|
|
129
132
|
}
|
|
130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmSwitchModule, decorators: [{
|
|
131
134
|
type: NgModule,
|
|
132
135
|
args: [{
|
|
133
136
|
imports: [...HlmSwitchImports],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.mjs","sources":["../../../projects/switch/src/lib/switch-thumb.ts","../../../projects/switch/src/lib/switch.ts","../../../projects/switch/src/public-api.ts","../../../projects/switch/src/switch.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: 'brn-switch-thumb[hlm],[hlmSwitchThumb]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmSwitchThumb {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:bg-background tw:dark:group-data-[state=unchecked]:bg-foreground tw:dark:group-data-[state=checked]:bg-primary-foreground tw:pointer-events-none tw:block tw:size-4 tw:rounded-full tw:ring-0 tw:transition-transform tw:data-[state=unchecked]:translate-x-0 tw:group-data-[state=checked]:translate-x-[calc(100%-2px)]',\n this.userClass(),\n ),\n );\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n linkedSignal,\n model,\n output,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\nimport { BrnSwitch, BrnSwitchThumb } from '@spartan-ng/brain/switch';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\nimport { HlmSwitchThumb } from './switch-thumb';\nexport const EG_SWITCH_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => HlmSwitch),\n multi: true,\n};\n\n@Component({\n selector: 'hlm-switch',\n imports: [BrnSwitchThumb, BrnSwitch, HlmSwitchThumb],\n host: {\n class: 'contents',\n '[attr.id]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n },\n // @ts-ignore\n template: `\n <brn-switch\n [class]=\"_computedClass()\"\n [checked]=\"checked()\"\n @ts-ignore\n (changed)=\"handleChange($event)\"\n (touched)=\"_onTouched?.()\"\n [disabled]=\"_disabled()\"\n [id]=\"id()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [aria-describedby]=\"ariaDescribedby()\"\n >\n <brn-switch-thumb hlm />\n </brn-switch>\n `,\n providers: [EG_SWITCH_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmSwitch implements ControlValueAccessor {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:data-[state=checked]:bg-primary tw:data-[state=unchecked]:bg-input tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:dark:data-[state=unchecked]:bg-input/80 tw:shadow-xs tw:group tw:inline-flex tw:h-[1.15rem] tw:w-8 tw:shrink-0 tw:items-center tw:rounded-full tw:border tw:border-transparent tw:outline-none tw:transition-all tw:focus-visible:ring-[3px] tw:data-[disabled=true]:cursor-not-allowed tw:data-[disabled=true]:opacity-50',\n this.userClass(),\n ),\n );\n\n /** The checked state of the switch. */\n public readonly checked = model<boolean>(false);\n\n /** The disabled state of the switch. */\n public readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n });\n\n /** Used to set the id on the underlying brn element. */\n public readonly id = input<string | null>(null);\n\n /** Used to set the aria-label attribute on the underlying brn element. */\n public readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /** Used to set the aria-labelledby attribute on the underlying brn element. */\n public readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n /** Used to set the aria-describedby attribute on the underlying brn element. */\n public readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n /** Emits when the checked state of the switch changes. */\n public readonly changed = output<boolean>();\n\n protected readonly _disabled = linkedSignal(this.disabled);\n\n protected _onChange?: ChangeFn<boolean>;\n protected _onTouched?: TouchFn;\n\n protected handleChange(value: unknown): void {\n const checked = value as boolean;\n this.checked.set(checked);\n this._onChange?.(checked);\n this.changed.emit(checked);\n }\n\n /** CONROL VALUE ACCESSOR */\n\n writeValue(value: boolean): void {\n this.checked.set(Boolean(value));\n }\n\n registerOnChange(fn: ChangeFn<boolean>): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: TouchFn): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n }\n}\n","/*\n * Public API Surface of switch\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmSwitch } from './lib/switch';\nimport { HlmSwitchThumb } from './lib/switch-thumb';\n\nexport * from './lib/switch';\nexport * from './lib/switch-thumb';\n\nexport const HlmSwitchImports = [HlmSwitch, HlmSwitchThumb] as const;\n@NgModule({\n imports: [...HlmSwitchImports],\n exports: [...HlmSwitchImports],\n})\nexport class HlmSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAUa,cAAc,CAAA;AACT,IAAA,SAAS,GAAG,KAAK,CAAa,EAAE,6CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAElD,IAAA,cAAc,GAAG,QAAQ,CAAC,MAC3C,GAAG,CACD,6TAA6T,EAC7T,IAAI,CAAC,SAAS,EAAE,CACjB,0DACF;uGARU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wCAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,kBAAA,EAAA,EAAA,E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U,gBAAgB,GAAG,CAAC,SAAS,EAAE,cAAc;MAK7C,eAAe,CAAA;uGAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YALK,SAAS,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAAzB,SAAS,EAAE,cAAc,CAAA,EAAA,CAAA;AAK7C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YALK,SAAS,CAAA,EAAA,CAAA;;2FAK7B,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC9B,oBAAA,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC/B,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"switch.mjs","sources":["../../../projects/switch/src/lib/switch-thumb.ts","../../../projects/switch/src/lib/switch.ts","../../../projects/switch/src/public-api.ts","../../../projects/switch/src/switch.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: 'brn-switch-thumb[hlm],[hlmSwitchThumb]',\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmSwitchThumb {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:bg-background tw:dark:group-data-[state=unchecked]:bg-foreground tw:dark:group-data-[state=checked]:bg-primary-foreground tw:pointer-events-none tw:block tw:size-4 tw:rounded-full tw:ring-0 tw:transition-transform tw:data-[state=unchecked]:translate-x-0 tw:group-data-[state=checked]:translate-x-[calc(100%-2px)]',\n this.userClass(),\n ),\n );\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n linkedSignal,\n model,\n output,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\nimport { BrnSwitch, BrnSwitchThumb } from '@spartan-ng/brain/switch';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\nimport { HlmSwitchThumb } from './switch-thumb';\nexport const EG_SWITCH_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => HlmSwitch),\n multi: true,\n};\n\n@Component({\n selector: 'hlm-switch',\n imports: [BrnSwitchThumb, BrnSwitch, HlmSwitchThumb],\n host: {\n class: 'contents',\n '[attr.id]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n },\n // @ts-ignore\n template: `\n <brn-switch\n [class]=\"_computedClass()\"\n [checked]=\"checked()\"\n @ts-ignore\n (changed)=\"handleChange($event)\"\n (touched)=\"_onTouched?.()\"\n [disabled]=\"_disabled()\"\n [id]=\"id()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledby()\"\n [aria-describedby]=\"ariaDescribedby()\"\n >\n <brn-switch-thumb hlm />\n </brn-switch>\n `,\n providers: [EG_SWITCH_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmSwitch implements ControlValueAccessor {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected readonly _computedClass = computed(() =>\n hlm(\n 'tw:data-[state=checked]:bg-primary tw:data-[state=unchecked]:bg-input tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:dark:data-[state=unchecked]:bg-input/80 tw:shadow-xs tw:group tw:inline-flex tw:h-[1.15rem] tw:w-8 tw:shrink-0 tw:items-center tw:rounded-full tw:border tw:border-transparent tw:outline-none tw:transition-all tw:focus-visible:ring-[3px] tw:data-[disabled=true]:cursor-not-allowed tw:data-[disabled=true]:opacity-50',\n this.userClass(),\n ),\n );\n\n /** The checked state of the switch. */\n public readonly checked = model<boolean>(false);\n\n /** The disabled state of the switch. */\n public readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n });\n\n /** Used to set the id on the underlying brn element. */\n public readonly id = input<string | null>(null);\n\n /** Used to set the aria-label attribute on the underlying brn element. */\n public readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /** Used to set the aria-labelledby attribute on the underlying brn element. */\n public readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n /** Used to set the aria-describedby attribute on the underlying brn element. */\n public readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n /** Emits when the checked state of the switch changes. */\n public readonly changed = output<boolean>();\n\n protected readonly _disabled = linkedSignal(this.disabled);\n\n protected _onChange?: ChangeFn<boolean>;\n protected _onTouched?: TouchFn;\n\n protected handleChange(value: unknown): void {\n const checked = value as boolean;\n this.checked.set(checked);\n this._onChange?.(checked);\n this.changed.emit(checked);\n }\n\n /** CONROL VALUE ACCESSOR */\n\n writeValue(value: boolean): void {\n this.checked.set(Boolean(value));\n }\n\n registerOnChange(fn: ChangeFn<boolean>): void {\n this._onChange = fn;\n }\n\n registerOnTouched(fn: TouchFn): void {\n this._onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n }\n}\n","/*\n * Public API Surface of switch\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmSwitch } from './lib/switch';\nimport { HlmSwitchThumb } from './lib/switch-thumb';\n\nexport * from './lib/switch';\nexport * from './lib/switch-thumb';\n\nexport const HlmSwitchImports = [HlmSwitch, HlmSwitchThumb] as const;\n@NgModule({\n imports: [...HlmSwitchImports],\n exports: [...HlmSwitchImports],\n})\nexport class HlmSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAUa,cAAc,CAAA;IACT,SAAS,GAAG,KAAK,CAAa,EAAE,iFAAI,KAAK,EAAE,OAAO,EAAA,CAAG;AAElD,IAAA,cAAc,GAAG,QAAQ,CAAC,MAC3C,GAAG,CACD,6TAA6T,EAC7T,IAAI,CAAC,SAAS,EAAE,CACjB;uFACF;uGARU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wCAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wCAAwC;AAClD,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,kBAAkB;AAC9B,qBAAA;AACF,iBAAA;;;ACSM,MAAM,wBAAwB,GAAG;AACtC,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,SAAS,CAAC;AACxC,IAAA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A,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC9B,oBAAA,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC;AAC/B,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "switch",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^20.2.0 || ^22.0.0",
|
|
6
|
+
"@angular/core": "^20.2.0 || ^22.0.0",
|
|
7
|
+
"@spartan-ng/brain": "^0.0.1-alpha.512"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"module": "fesm2022/switch.mjs",
|
|
14
|
+
"typings": "types/switch.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
"./package.json": {
|
|
17
|
+
"default": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./types/switch.d.ts",
|
|
21
|
+
"default": "./fesm2022/switch.mjs"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"type": "module"
|
|
25
|
+
}
|
package/table/README.md
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { classes } from '@egose/shadcn-theme-ng/utils';
|
|
4
|
+
|
|
5
|
+
class HlmTableContainer {
|
|
6
|
+
constructor() {
|
|
7
|
+
classes(() => 'relative w-full overflow-x-auto');
|
|
8
|
+
}
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTableContainer, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
10
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTableContainer, isStandalone: true, selector: "div[hlmTableContainer]", host: { attributes: { "data-slot": "table-container" } }, ngImport: i0 });
|
|
11
|
+
}
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTableContainer, decorators: [{
|
|
13
|
+
type: Directive,
|
|
14
|
+
args: [{
|
|
15
|
+
selector: 'div[hlmTableContainer]',
|
|
16
|
+
host: { 'data-slot': 'table-container' },
|
|
17
|
+
}]
|
|
18
|
+
}], ctorParameters: () => [] });
|
|
19
|
+
/**
|
|
20
|
+
* Directive to apply Shadcn-like styling to a <table> element.
|
|
21
|
+
*/
|
|
22
|
+
class HlmTable {
|
|
23
|
+
constructor() {
|
|
24
|
+
classes(() => 'w-full caption-bottom text-sm');
|
|
25
|
+
}
|
|
26
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
27
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTable, isStandalone: true, selector: "table[hlmTable]", host: { attributes: { "data-slot": "table" } }, ngImport: i0 });
|
|
28
|
+
}
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTable, decorators: [{
|
|
30
|
+
type: Directive,
|
|
31
|
+
args: [{
|
|
32
|
+
selector: 'table[hlmTable]',
|
|
33
|
+
host: { 'data-slot': 'table' },
|
|
34
|
+
}]
|
|
35
|
+
}], ctorParameters: () => [] });
|
|
36
|
+
/**
|
|
37
|
+
* Directive to apply Shadcn-like styling to a <thead> element
|
|
38
|
+
* within an HlmTable context.
|
|
39
|
+
*/
|
|
40
|
+
class HlmTHead {
|
|
41
|
+
constructor() {
|
|
42
|
+
classes(() => '[&_tr]:border-b');
|
|
43
|
+
}
|
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTHead, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
45
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTHead, isStandalone: true, selector: "thead[hlmTHead],thead[hlmTableHeader]", host: { attributes: { "data-slot": "table-header" } }, ngImport: i0 });
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTHead, decorators: [{
|
|
48
|
+
type: Directive,
|
|
49
|
+
args: [{
|
|
50
|
+
selector: 'thead[hlmTHead],thead[hlmTableHeader]',
|
|
51
|
+
host: { 'data-slot': 'table-header' },
|
|
52
|
+
}]
|
|
53
|
+
}], ctorParameters: () => [] });
|
|
54
|
+
/**
|
|
55
|
+
* Directive to apply Shadcn-like styling to a <tbody> element
|
|
56
|
+
* within an HlmTable context.
|
|
57
|
+
*/
|
|
58
|
+
class HlmTBody {
|
|
59
|
+
constructor() {
|
|
60
|
+
classes(() => '[&_tr:last-child]:border-0');
|
|
61
|
+
}
|
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTBody, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
63
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTBody, isStandalone: true, selector: "tbody[hlmTBody],tbody[hlmTableBody]", host: { attributes: { "data-slot": "table-body" } }, ngImport: i0 });
|
|
64
|
+
}
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTBody, decorators: [{
|
|
66
|
+
type: Directive,
|
|
67
|
+
args: [{
|
|
68
|
+
selector: 'tbody[hlmTBody],tbody[hlmTableBody]',
|
|
69
|
+
host: { 'data-slot': 'table-body' },
|
|
70
|
+
}]
|
|
71
|
+
}], ctorParameters: () => [] });
|
|
72
|
+
/**
|
|
73
|
+
* Directive to apply Shadcn-like styling to a <tfoot> element
|
|
74
|
+
* within an HlmTable context.
|
|
75
|
+
*/
|
|
76
|
+
class HlmTFoot {
|
|
77
|
+
constructor() {
|
|
78
|
+
classes(() => 'bg-muted/50 border-t font-medium [&>tr]:last:border-b-0');
|
|
79
|
+
}
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTFoot, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
81
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTFoot, isStandalone: true, selector: "tfoot[hlmTFoot],tfoot[hlmTableFooter]", host: { attributes: { "data-slot": "table-footer" } }, ngImport: i0 });
|
|
82
|
+
}
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTFoot, decorators: [{
|
|
84
|
+
type: Directive,
|
|
85
|
+
args: [{
|
|
86
|
+
selector: 'tfoot[hlmTFoot],tfoot[hlmTableFooter]',
|
|
87
|
+
host: { 'data-slot': 'table-footer' },
|
|
88
|
+
}]
|
|
89
|
+
}], ctorParameters: () => [] });
|
|
90
|
+
/**
|
|
91
|
+
* Directive to apply Shadcn-like styling to a <tr> element
|
|
92
|
+
* within an HlmTable context.
|
|
93
|
+
*/
|
|
94
|
+
class HlmTr {
|
|
95
|
+
constructor() {
|
|
96
|
+
classes(() => 'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors has-aria-expanded:bg-muted/50');
|
|
97
|
+
}
|
|
98
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTr, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
99
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTr, isStandalone: true, selector: "tr[hlmTr],tr[hlmTableRow]", host: { attributes: { "data-slot": "table-row" } }, ngImport: i0 });
|
|
100
|
+
}
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTr, decorators: [{
|
|
102
|
+
type: Directive,
|
|
103
|
+
args: [{
|
|
104
|
+
selector: 'tr[hlmTr],tr[hlmTableRow]',
|
|
105
|
+
host: { 'data-slot': 'table-row' },
|
|
106
|
+
}]
|
|
107
|
+
}], ctorParameters: () => [] });
|
|
108
|
+
/**
|
|
109
|
+
* Directive to apply Shadcn-like styling to a <th> element
|
|
110
|
+
* within an HlmTable context.
|
|
111
|
+
*/
|
|
112
|
+
class HlmTh {
|
|
113
|
+
constructor() {
|
|
114
|
+
classes(() => 'text-foreground h-10 px-2 text-start align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pe-0');
|
|
115
|
+
}
|
|
116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTh, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
117
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTh, isStandalone: true, selector: "th[hlmTh],th[hlmTableHead]", host: { attributes: { "data-slot": "table-head" } }, ngImport: i0 });
|
|
118
|
+
}
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTh, decorators: [{
|
|
120
|
+
type: Directive,
|
|
121
|
+
args: [{
|
|
122
|
+
selector: 'th[hlmTh],th[hlmTableHead]',
|
|
123
|
+
host: { 'data-slot': 'table-head' },
|
|
124
|
+
}]
|
|
125
|
+
}], ctorParameters: () => [] });
|
|
126
|
+
/**
|
|
127
|
+
* Directive to apply Shadcn-like styling to a <td> element
|
|
128
|
+
* within an HlmTable context.
|
|
129
|
+
*/
|
|
130
|
+
class HlmTd {
|
|
131
|
+
constructor() {
|
|
132
|
+
classes(() => 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0');
|
|
133
|
+
}
|
|
134
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTd, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
135
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmTd, isStandalone: true, selector: "td[hlmTd],td[hlmTableCell]", host: { attributes: { "data-slot": "table-cell" } }, ngImport: i0 });
|
|
136
|
+
}
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTd, decorators: [{
|
|
138
|
+
type: Directive,
|
|
139
|
+
args: [{
|
|
140
|
+
selector: 'td[hlmTd],td[hlmTableCell]',
|
|
141
|
+
host: { 'data-slot': 'table-cell' },
|
|
142
|
+
}]
|
|
143
|
+
}], ctorParameters: () => [] });
|
|
144
|
+
/**
|
|
145
|
+
* Directive to apply Shadcn-like styling to a <caption> element
|
|
146
|
+
* within an HlmTable context.
|
|
147
|
+
*/
|
|
148
|
+
class HlmCaption {
|
|
149
|
+
constructor() {
|
|
150
|
+
classes(() => 'text-muted-foreground mt-4 text-sm');
|
|
151
|
+
}
|
|
152
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCaption, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
153
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: HlmCaption, isStandalone: true, selector: "caption[hlmCaption],caption[hlmTableCaption]", host: { attributes: { "data-slot": "table-caption" } }, ngImport: i0 });
|
|
154
|
+
}
|
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmCaption, decorators: [{
|
|
156
|
+
type: Directive,
|
|
157
|
+
args: [{
|
|
158
|
+
selector: 'caption[hlmCaption],caption[hlmTableCaption]',
|
|
159
|
+
host: { 'data-slot': 'table-caption' },
|
|
160
|
+
}]
|
|
161
|
+
}], ctorParameters: () => [] });
|
|
162
|
+
|
|
163
|
+
/*
|
|
164
|
+
* Public API Surface of table
|
|
165
|
+
*/
|
|
166
|
+
const HlmTableImports = [
|
|
167
|
+
HlmCaption,
|
|
168
|
+
HlmTableContainer,
|
|
169
|
+
HlmTable,
|
|
170
|
+
HlmTBody,
|
|
171
|
+
HlmTd,
|
|
172
|
+
HlmTFoot,
|
|
173
|
+
HlmTh,
|
|
174
|
+
HlmTHead,
|
|
175
|
+
HlmTr,
|
|
176
|
+
];
|
|
177
|
+
class HlmTableModule {
|
|
178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
179
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: HlmTableModule, imports: [HlmCaption,
|
|
180
|
+
HlmTableContainer,
|
|
181
|
+
HlmTable,
|
|
182
|
+
HlmTBody,
|
|
183
|
+
HlmTd,
|
|
184
|
+
HlmTFoot,
|
|
185
|
+
HlmTh,
|
|
186
|
+
HlmTHead,
|
|
187
|
+
HlmTr], exports: [HlmCaption,
|
|
188
|
+
HlmTableContainer,
|
|
189
|
+
HlmTable,
|
|
190
|
+
HlmTBody,
|
|
191
|
+
HlmTd,
|
|
192
|
+
HlmTFoot,
|
|
193
|
+
HlmTh,
|
|
194
|
+
HlmTHead,
|
|
195
|
+
HlmTr] });
|
|
196
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTableModule });
|
|
197
|
+
}
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HlmTableModule, decorators: [{
|
|
199
|
+
type: NgModule,
|
|
200
|
+
args: [{
|
|
201
|
+
imports: [...HlmTableImports],
|
|
202
|
+
exports: [...HlmTableImports],
|
|
203
|
+
}]
|
|
204
|
+
}] });
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Generated bundle index. Do not edit.
|
|
208
|
+
*/
|
|
209
|
+
|
|
210
|
+
export { HlmCaption, HlmTBody, HlmTFoot, HlmTHead, HlmTable, HlmTableContainer, HlmTableImports, HlmTableModule, HlmTd, HlmTh, HlmTr };
|
|
211
|
+
//# sourceMappingURL=table.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.mjs","sources":["../../../projects/table/src/lib/hlm-table.ts","../../../projects/table/src/public-api.ts","../../../projects/table/src/table.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { classes } from '@egose/shadcn-theme-ng/utils';\n\n@Directive({\n selector: 'div[hlmTableContainer]',\n host: { 'data-slot': 'table-container' },\n})\nexport class HlmTableContainer {\n constructor() {\n classes(() => 'relative w-full overflow-x-auto');\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <table> element.\n */\n@Directive({\n selector: 'table[hlmTable]',\n host: { 'data-slot': 'table' },\n})\nexport class HlmTable {\n constructor() {\n classes(() => 'w-full caption-bottom text-sm');\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <thead> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'thead[hlmTHead],thead[hlmTableHeader]',\n host: { 'data-slot': 'table-header' },\n})\nexport class HlmTHead {\n constructor() {\n classes(() => '[&_tr]:border-b');\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <tbody> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'tbody[hlmTBody],tbody[hlmTableBody]',\n host: { 'data-slot': 'table-body' },\n})\nexport class HlmTBody {\n constructor() {\n classes(() => '[&_tr:last-child]:border-0');\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <tfoot> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'tfoot[hlmTFoot],tfoot[hlmTableFooter]',\n host: { 'data-slot': 'table-footer' },\n})\nexport class HlmTFoot {\n constructor() {\n classes(() => 'bg-muted/50 border-t font-medium [&>tr]:last:border-b-0');\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <tr> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'tr[hlmTr],tr[hlmTableRow]',\n host: { 'data-slot': 'table-row' },\n})\nexport class HlmTr {\n constructor() {\n classes(\n () => 'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors has-aria-expanded:bg-muted/50',\n );\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <th> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'th[hlmTh],th[hlmTableHead]',\n host: { 'data-slot': 'table-head' },\n})\nexport class HlmTh {\n constructor() {\n classes(\n () =>\n 'text-foreground h-10 px-2 text-start align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pe-0',\n );\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <td> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'td[hlmTd],td[hlmTableCell]',\n host: { 'data-slot': 'table-cell' },\n})\nexport class HlmTd {\n constructor() {\n classes(() => 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0');\n }\n}\n\n/**\n * Directive to apply Shadcn-like styling to a <caption> element\n * within an HlmTable context.\n */\n@Directive({\n selector: 'caption[hlmCaption],caption[hlmTableCaption]',\n host: { 'data-slot': 'table-caption' },\n})\nexport class HlmCaption {\n constructor() {\n classes(() => 'text-muted-foreground mt-4 text-sm');\n }\n}\n","/*\n * Public API Surface of table\n */\n\nimport { NgModule } from '@angular/core';\n\nimport {\n HlmCaption,\n HlmTable,\n HlmTableContainer,\n HlmTBody,\n HlmTd,\n HlmTFoot,\n HlmTh,\n HlmTHead,\n HlmTr,\n} from './lib/hlm-table';\n\nexport * from './lib/hlm-table';\n\nexport const HlmTableImports = [\n HlmCaption,\n HlmTableContainer,\n HlmTable,\n HlmTBody,\n HlmTd,\n HlmTFoot,\n HlmTh,\n HlmTHead,\n HlmTr,\n] as const;\n\n@NgModule({\n imports: [...HlmTableImports],\n exports: [...HlmTableImports],\n})\nexport class HlmTableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAOa,iBAAiB,CAAA;AAC5B,IAAA,WAAA,GAAA;AACE,QAAA,OAAO,CAAC,MAAM,iCAAiC,CAAC;IAClD;uGAHW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,iBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,IAAI,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE;AACzC,iBAAA;;AAOD;;AAEG;MAKU,QAAQ,CAAA;AACnB,IAAA,WAAA,GAAA;AACE,QAAA,OAAO,CAAC,MAAM,+BAA+B,CAAC;IAChD;uGAHW,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,WAAA,EAAA,OAAA,EAAA,EAAA,EAAA,QAAA,EAA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EAAE,CAAC,GAAG,eAAe,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC9B,iBAAA;;;ACnCD;;AAEG;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "table",
|
|
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/table.mjs",
|
|
14
|
+
"typings": "types/table.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
"./package.json": {
|
|
17
|
+
"default": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./types/table.d.ts",
|
|
21
|
+
"default": "./fesm2022/table.mjs"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"type": "module"
|
|
25
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
|
|
3
|
+
declare class HlmTableContainer {
|
|
4
|
+
constructor();
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmTableContainer, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTableContainer, "div[hlmTableContainer]", never, {}, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Directive to apply Shadcn-like styling to a <table> element.
|
|
10
|
+
*/
|
|
11
|
+
declare class HlmTable {
|
|
12
|
+
constructor();
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmTable, never>;
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTable, "table[hlmTable]", never, {}, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Directive to apply Shadcn-like styling to a <thead> element
|
|
18
|
+
* within an HlmTable context.
|
|
19
|
+
*/
|
|
20
|
+
declare class HlmTHead {
|
|
21
|
+
constructor();
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmTHead, never>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTHead, "thead[hlmTHead],thead[hlmTableHeader]", never, {}, {}, never, never, true, never>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Directive to apply Shadcn-like styling to a <tbody> element
|
|
27
|
+
* within an HlmTable context.
|
|
28
|
+
*/
|
|
29
|
+
declare class HlmTBody {
|
|
30
|
+
constructor();
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmTBody, never>;
|
|
32
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTBody, "tbody[hlmTBody],tbody[hlmTableBody]", never, {}, {}, never, never, true, never>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Directive to apply Shadcn-like styling to a <tfoot> element
|
|
36
|
+
* within an HlmTable context.
|
|
37
|
+
*/
|
|
38
|
+
declare class HlmTFoot {
|
|
39
|
+
constructor();
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmTFoot, never>;
|
|
41
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTFoot, "tfoot[hlmTFoot],tfoot[hlmTableFooter]", never, {}, {}, never, never, true, never>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Directive to apply Shadcn-like styling to a <tr> element
|
|
45
|
+
* within an HlmTable context.
|
|
46
|
+
*/
|
|
47
|
+
declare class HlmTr {
|
|
48
|
+
constructor();
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmTr, never>;
|
|
50
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTr, "tr[hlmTr],tr[hlmTableRow]", never, {}, {}, never, never, true, never>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Directive to apply Shadcn-like styling to a <th> element
|
|
54
|
+
* within an HlmTable context.
|
|
55
|
+
*/
|
|
56
|
+
declare class HlmTh {
|
|
57
|
+
constructor();
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmTh, never>;
|
|
59
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTh, "th[hlmTh],th[hlmTableHead]", never, {}, {}, never, never, true, never>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Directive to apply Shadcn-like styling to a <td> element
|
|
63
|
+
* within an HlmTable context.
|
|
64
|
+
*/
|
|
65
|
+
declare class HlmTd {
|
|
66
|
+
constructor();
|
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmTd, never>;
|
|
68
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmTd, "td[hlmTd],td[hlmTableCell]", never, {}, {}, never, never, true, never>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Directive to apply Shadcn-like styling to a <caption> element
|
|
72
|
+
* within an HlmTable context.
|
|
73
|
+
*/
|
|
74
|
+
declare class HlmCaption {
|
|
75
|
+
constructor();
|
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmCaption, never>;
|
|
77
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmCaption, "caption[hlmCaption],caption[hlmTableCaption]", never, {}, {}, never, never, true, never>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare const HlmTableImports: readonly [typeof HlmCaption, typeof HlmTableContainer, typeof HlmTable, typeof HlmTBody, typeof HlmTd, typeof HlmTFoot, typeof HlmTh, typeof HlmTHead, typeof HlmTr];
|
|
81
|
+
declare class HlmTableModule {
|
|
82
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmTableModule, never>;
|
|
83
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HlmTableModule, never, [typeof HlmCaption, typeof HlmTableContainer, typeof HlmTable, typeof HlmTBody, typeof HlmTd, typeof HlmTFoot, typeof HlmTh, typeof HlmTHead, typeof HlmTr], [typeof HlmCaption, typeof HlmTableContainer, typeof HlmTable, typeof HlmTBody, typeof HlmTd, typeof HlmTFoot, typeof HlmTh, typeof HlmTHead, typeof HlmTr]>;
|
|
84
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<HlmTableModule>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { HlmCaption, HlmTBody, HlmTFoot, HlmTHead, HlmTable, HlmTableContainer, HlmTableImports, HlmTableModule, HlmTd, HlmTh, HlmTr };
|