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