yukit-web 0.10.5 → 0.10.7
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/fesm2022/yukit-web-chart.mjs +807 -552
- package/fesm2022/yukit-web-chart.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-accordion.mjs +271 -100
- package/fesm2022/yukit-web-helm-accordion.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-alert-dialog.mjs +675 -243
- package/fesm2022/yukit-web-helm-alert-dialog.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-alert.mjs +199 -91
- package/fesm2022/yukit-web-helm-alert.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-aspect-ratio.mjs +77 -43
- package/fesm2022/yukit-web-helm-aspect-ratio.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-attachment.mjs +552 -205
- package/fesm2022/yukit-web-helm-attachment.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-autocomplete.mjs +913 -288
- package/fesm2022/yukit-web-helm-autocomplete.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-avatar.mjs +298 -137
- package/fesm2022/yukit-web-helm-avatar.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-badge.mjs +78 -44
- package/fesm2022/yukit-web-helm-badge.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-breadcrumb.mjs +466 -183
- package/fesm2022/yukit-web-helm-breadcrumb.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-bubble.mjs +297 -118
- package/fesm2022/yukit-web-helm-bubble.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-button-group.mjs +179 -83
- package/fesm2022/yukit-web-helm-button-group.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-button.mjs +137 -67
- package/fesm2022/yukit-web-helm-button.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-calendar.mjs +957 -230
- package/fesm2022/yukit-web-helm-calendar.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-card.mjs +318 -136
- package/fesm2022/yukit-web-helm-card.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-carousel.mjs +563 -233
- package/fesm2022/yukit-web-helm-carousel.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-checkbox.mjs +367 -101
- package/fesm2022/yukit-web-helm-checkbox.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-collapsible.mjs +155 -61
- package/fesm2022/yukit-web-helm-collapsible.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-combobox.mjs +1572 -481
- package/fesm2022/yukit-web-helm-combobox.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-command.mjs +752 -260
- package/fesm2022/yukit-web-helm-command.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-context-menu.mjs +161 -63
- package/fesm2022/yukit-web-helm-context-menu.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-date-picker.mjs +2322 -932
- package/fesm2022/yukit-web-helm-date-picker.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-dialog.mjs +625 -240
- package/fesm2022/yukit-web-helm-dialog.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-drawer.mjs +539 -222
- package/fesm2022/yukit-web-helm-drawer.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-dropdown-menu.mjs +1295 -493
- package/fesm2022/yukit-web-helm-dropdown-menu.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-empty.mjs +280 -121
- package/fesm2022/yukit-web-helm-empty.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-field.mjs +670 -301
- package/fesm2022/yukit-web-helm-field.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-hover-card.mjs +198 -99
- package/fesm2022/yukit-web-helm-hover-card.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-input-group.mjs +357 -165
- package/fesm2022/yukit-web-helm-input-group.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-input-otp.mjs +306 -114
- package/fesm2022/yukit-web-helm-input-otp.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-input.mjs +62 -30
- package/fesm2022/yukit-web-helm-input.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-item.mjs +545 -227
- package/fesm2022/yukit-web-helm-item.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-kbd.mjs +85 -44
- package/fesm2022/yukit-web-helm-kbd.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-label.mjs +60 -28
- package/fesm2022/yukit-web-helm-label.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-marker.mjs +165 -74
- package/fesm2022/yukit-web-helm-marker.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-menubar.mjs +207 -82
- package/fesm2022/yukit-web-helm-menubar.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-message.mjs +277 -112
- package/fesm2022/yukit-web-helm-message.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-native-select.mjs +363 -129
- package/fesm2022/yukit-web-helm-native-select.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-navigation-menu.mjs +398 -166
- package/fesm2022/yukit-web-helm-navigation-menu.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-pagination.mjs +1444 -460
- package/fesm2022/yukit-web-helm-pagination.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-popover.mjs +358 -133
- package/fesm2022/yukit-web-helm-popover.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-progress.mjs +126 -58
- package/fesm2022/yukit-web-helm-progress.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-radio-group.mjs +420 -144
- package/fesm2022/yukit-web-helm-radio-group.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-resizable.mjs +210 -91
- package/fesm2022/yukit-web-helm-resizable.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-scroll-area.mjs +64 -34
- package/fesm2022/yukit-web-helm-scroll-area.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-select.mjs +1059 -351
- package/fesm2022/yukit-web-helm-select.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-separator.mjs +61 -31
- package/fesm2022/yukit-web-helm-separator.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-sheet.mjs +590 -231
- package/fesm2022/yukit-web-helm-sheet.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-sidebar.mjs +1781 -757
- package/fesm2022/yukit-web-helm-sidebar.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-skeleton.mjs +45 -27
- package/fesm2022/yukit-web-helm-skeleton.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-slider.mjs +139 -59
- package/fesm2022/yukit-web-helm-slider.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-sonner.mjs +350 -62
- package/fesm2022/yukit-web-helm-sonner.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-spinner.mjs +118 -44
- package/fesm2022/yukit-web-helm-spinner.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-switch.mjs +326 -94
- package/fesm2022/yukit-web-helm-switch.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-table.mjs +374 -177
- package/fesm2022/yukit-web-helm-table.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-tabs.mjs +549 -173
- package/fesm2022/yukit-web-helm-tabs.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-textarea.mjs +62 -30
- package/fesm2022/yukit-web-helm-textarea.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-toggle-group.mjs +291 -89
- package/fesm2022/yukit-web-helm-toggle-group.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-toggle.mjs +132 -57
- package/fesm2022/yukit-web-helm-toggle.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-tooltip.mjs +84 -54
- package/fesm2022/yukit-web-helm-tooltip.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-typography.mjs +461 -202
- package/fesm2022/yukit-web-helm-typography.mjs.map +1 -1
- package/fesm2022/yukit-web-helm-utils.mjs +131 -253
- package/fesm2022/yukit-web-helm-utils.mjs.map +1 -1
- package/fesm2022/yukit-web.mjs +24457 -9655
- package/fesm2022/yukit-web.mjs.map +1 -1
- package/package.json +9 -9
- package/types/yukit-web-chart.d.ts +184 -125
- package/types/yukit-web-helm-accordion.d.ts +49 -28
- package/types/yukit-web-helm-alert-dialog.d.ts +127 -73
- package/types/yukit-web-helm-alert.d.ts +30 -32
- package/types/yukit-web-helm-aspect-ratio.d.ts +17 -15
- package/types/yukit-web-helm-attachment.d.ts +97 -69
- package/types/yukit-web-helm-autocomplete.d.ts +205 -79
- package/types/yukit-web-helm-avatar.d.ts +44 -39
- package/types/yukit-web-helm-badge.d.ts +18 -17
- package/types/yukit-web-helm-breadcrumb.d.ts +69 -45
- package/types/yukit-web-helm-bubble.d.ts +54 -40
- package/types/yukit-web-helm-button-group.d.ts +29 -22
- package/types/yukit-web-helm-button.d.ts +41 -31
- package/types/yukit-web-helm-calendar.d.ts +157 -85
- package/types/yukit-web-helm-card.d.ts +38 -42
- package/types/yukit-web-helm-carousel.d.ts +105 -73
- package/types/yukit-web-helm-checkbox.d.ts +117 -58
- package/types/yukit-web-helm-collapsible.d.ts +34 -19
- package/types/yukit-web-helm-combobox.d.ts +355 -150
- package/types/yukit-web-helm-command.d.ts +140 -73
- package/types/yukit-web-helm-context-menu.d.ts +48 -27
- package/types/yukit-web-helm-date-picker.d.ts +852 -556
- package/types/yukit-web-helm-dialog.d.ts +106 -78
- package/types/yukit-web-helm-drawer.d.ts +90 -61
- package/types/yukit-web-helm-dropdown-menu.d.ts +278 -158
- package/types/yukit-web-helm-empty.d.ts +38 -42
- package/types/yukit-web-helm-field.d.ts +122 -91
- package/types/yukit-web-helm-hover-card.d.ts +39 -27
- package/types/yukit-web-helm-input-group.d.ts +63 -41
- package/types/yukit-web-helm-input-otp.d.ts +38 -35
- package/types/yukit-web-helm-input.d.ts +19 -12
- package/types/yukit-web-helm-item.d.ts +90 -82
- package/types/yukit-web-helm-kbd.d.ts +10 -15
- package/types/yukit-web-helm-label.d.ts +14 -11
- package/types/yukit-web-helm-marker.d.ts +26 -27
- package/types/yukit-web-helm-menubar.d.ts +61 -32
- package/types/yukit-web-helm-message.d.ts +34 -38
- package/types/yukit-web-helm-native-select.d.ts +102 -61
- package/types/yukit-web-helm-navigation-menu.d.ts +76 -42
- package/types/yukit-web-helm-pagination.d.ts +344 -166
- package/types/yukit-web-helm-popover.d.ts +62 -42
- package/types/yukit-web-helm-progress.d.ts +27 -20
- package/types/yukit-web-helm-radio-group.d.ts +121 -63
- package/types/yukit-web-helm-resizable.d.ts +46 -24
- package/types/yukit-web-helm-scroll-area.d.ts +6 -10
- package/types/yukit-web-helm-select.d.ts +231 -114
- package/types/yukit-web-helm-separator.d.ts +15 -12
- package/types/yukit-web-helm-sheet.d.ts +94 -65
- package/types/yukit-web-helm-sidebar.d.ts +322 -232
- package/types/yukit-web-helm-skeleton.d.ts +6 -10
- package/types/yukit-web-helm-slider.d.ts +33 -13
- package/types/yukit-web-helm-sonner.d.ts +112 -51
- package/types/yukit-web-helm-spinner.d.ts +24 -17
- package/types/yukit-web-helm-switch.d.ts +89 -51
- package/types/yukit-web-helm-table.d.ts +38 -42
- package/types/yukit-web-helm-tabs.d.ts +116 -60
- package/types/yukit-web-helm-textarea.d.ts +19 -12
- package/types/yukit-web-helm-toggle-group.d.ts +81 -32
- package/types/yukit-web-helm-toggle.d.ts +39 -21
- package/types/yukit-web-helm-tooltip.d.ts +21 -16
- package/types/yukit-web-helm-typography.d.ts +62 -77
- package/types/yukit-web-helm-utils.d.ts +8 -11
- package/types/yukit-web.d.ts +5092 -2351
|
@@ -1,86 +1,182 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { classes } from
|
|
4
|
-
import { cva } from
|
|
5
|
-
import * as i1 from
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Directive, input } from "@angular/core";
|
|
3
|
+
import { classes } from "yukit-web/helm/utils";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import * as i1 from "@spartan-ng/brain/separator";
|
|
6
|
+
import { BrnSeparator, provideBrnSeparatorConfig } from "@spartan-ng/brain/separator";
|
|
8
7
|
const buttonGroupVariants = cva("has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
defaultVariants: {
|
|
16
|
-
orientation: 'horizontal',
|
|
17
|
-
},
|
|
8
|
+
variants: { orientation: {
|
|
9
|
+
horizontal: "[&>[data-slot]:not(:has(~[data-slot]))]:rounded-e-lg [&>*:not(:first-child)]:rounded-s-none [&>*:not(:first-child)]:border-s-0 [&>*:not(:last-child)]:rounded-e-none",
|
|
10
|
+
vertical: "[&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
11
|
+
} },
|
|
12
|
+
defaultVariants: { orientation: "horizontal" }
|
|
18
13
|
});
|
|
19
|
-
class HlmButtonGroup {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
14
|
+
var HlmButtonGroup = class HlmButtonGroup {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
17
|
+
classes(() => buttonGroupVariants({ orientation: this.orientation() }));
|
|
18
|
+
}
|
|
19
|
+
static {
|
|
20
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
21
|
+
minVersion: "12.0.0",
|
|
22
|
+
version: "22.2.4",
|
|
23
|
+
ngImport: i0,
|
|
24
|
+
type: HlmButtonGroup,
|
|
25
|
+
deps: [],
|
|
26
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
static {
|
|
30
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
31
|
+
minVersion: "17.1.0",
|
|
32
|
+
version: "22.2.4",
|
|
33
|
+
type: HlmButtonGroup,
|
|
34
|
+
isStandalone: true,
|
|
35
|
+
selector: "[hlmButtonGroup],hlm-button-group",
|
|
36
|
+
inputs: { orientation: {
|
|
37
|
+
classPropertyName: "orientation",
|
|
38
|
+
publicName: "orientation",
|
|
39
|
+
isSignal: true,
|
|
40
|
+
isRequired: false,
|
|
41
|
+
transformFunction: null
|
|
42
|
+
} },
|
|
43
|
+
host: {
|
|
44
|
+
attributes: {
|
|
45
|
+
"data-slot": "button-group",
|
|
46
|
+
"role": "group"
|
|
47
|
+
},
|
|
48
|
+
properties: { "attr.data-orientation": "orientation()" }
|
|
49
|
+
},
|
|
50
|
+
ngImport: i0
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
55
|
+
minVersion: "12.0.0",
|
|
56
|
+
version: "22.2.4",
|
|
57
|
+
ngImport: i0,
|
|
58
|
+
type: HlmButtonGroup,
|
|
59
|
+
decorators: [{
|
|
60
|
+
type: Directive,
|
|
61
|
+
args: [{
|
|
62
|
+
selector: "[hlmButtonGroup],hlm-button-group",
|
|
63
|
+
host: {
|
|
64
|
+
"data-slot": "button-group",
|
|
65
|
+
role: "group",
|
|
66
|
+
"[attr.data-orientation]": "orientation()"
|
|
67
|
+
}
|
|
68
|
+
}]
|
|
69
|
+
}],
|
|
70
|
+
ctorParameters: () => [],
|
|
71
|
+
propDecorators: { orientation: [{
|
|
72
|
+
type: i0.Input,
|
|
73
|
+
args: [{
|
|
74
|
+
isSignal: true,
|
|
75
|
+
alias: "orientation",
|
|
76
|
+
required: false
|
|
77
|
+
}]
|
|
78
|
+
}] }
|
|
79
|
+
});
|
|
80
|
+
var HlmButtonGroupSeparator = class HlmButtonGroupSeparator {
|
|
81
|
+
constructor() {
|
|
82
|
+
classes(() => ["bg-input relative self-stretch data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto", "shrink-0 data-horizontal:h-px data-vertical:w-px data-vertical:self-stretch"]);
|
|
83
|
+
}
|
|
84
|
+
static {
|
|
85
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
86
|
+
minVersion: "12.0.0",
|
|
87
|
+
version: "22.2.4",
|
|
88
|
+
ngImport: i0,
|
|
89
|
+
type: HlmButtonGroupSeparator,
|
|
90
|
+
deps: [],
|
|
91
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
static {
|
|
95
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
96
|
+
minVersion: "14.0.0",
|
|
97
|
+
version: "22.2.4",
|
|
98
|
+
type: HlmButtonGroupSeparator,
|
|
99
|
+
isStandalone: true,
|
|
100
|
+
selector: "[hlmButtonGroupSeparator],hlm-button-group-separator",
|
|
101
|
+
host: { attributes: { "data-slot": "button-group-separator" } },
|
|
102
|
+
providers: [provideBrnSeparatorConfig({ orientation: "vertical" })],
|
|
103
|
+
hostDirectives: [{
|
|
104
|
+
directive: i1.BrnSeparator,
|
|
105
|
+
inputs: [
|
|
106
|
+
"orientation",
|
|
107
|
+
"orientation",
|
|
108
|
+
"decorative",
|
|
109
|
+
"decorative"
|
|
110
|
+
]
|
|
111
|
+
}],
|
|
112
|
+
ngImport: i0
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
117
|
+
minVersion: "12.0.0",
|
|
118
|
+
version: "22.2.4",
|
|
119
|
+
ngImport: i0,
|
|
120
|
+
type: HlmButtonGroupSeparator,
|
|
121
|
+
decorators: [{
|
|
122
|
+
type: Directive,
|
|
123
|
+
args: [{
|
|
124
|
+
selector: "[hlmButtonGroupSeparator],hlm-button-group-separator",
|
|
125
|
+
providers: [provideBrnSeparatorConfig({ orientation: "vertical" })],
|
|
126
|
+
hostDirectives: [{
|
|
127
|
+
directive: BrnSeparator,
|
|
128
|
+
inputs: ["orientation", "decorative"]
|
|
129
|
+
}],
|
|
130
|
+
host: { "data-slot": "button-group-separator" }
|
|
131
|
+
}]
|
|
132
|
+
}],
|
|
133
|
+
ctorParameters: () => []
|
|
134
|
+
});
|
|
135
|
+
var HlmButtonGroupText = class HlmButtonGroupText {
|
|
136
|
+
constructor() {
|
|
137
|
+
classes(() => "bg-muted gap-2 rounded-lg border px-2.5 text-sm font-medium [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] flex items-center [&_ng-icon]:pointer-events-none");
|
|
138
|
+
}
|
|
139
|
+
static {
|
|
140
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
141
|
+
minVersion: "12.0.0",
|
|
142
|
+
version: "22.2.4",
|
|
143
|
+
ngImport: i0,
|
|
144
|
+
type: HlmButtonGroupText,
|
|
145
|
+
deps: [],
|
|
146
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
static {
|
|
150
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
151
|
+
minVersion: "14.0.0",
|
|
152
|
+
version: "22.2.4",
|
|
153
|
+
type: HlmButtonGroupText,
|
|
154
|
+
isStandalone: true,
|
|
155
|
+
selector: "[hlmButtonGroupText],hlm-button-group-text",
|
|
156
|
+
host: { attributes: { "data-slot": "button-group-text" } },
|
|
157
|
+
ngImport: i0
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
162
|
+
minVersion: "12.0.0",
|
|
163
|
+
version: "22.2.4",
|
|
164
|
+
ngImport: i0,
|
|
165
|
+
type: HlmButtonGroupText,
|
|
166
|
+
decorators: [{
|
|
167
|
+
type: Directive,
|
|
168
|
+
args: [{
|
|
169
|
+
selector: "[hlmButtonGroupText],hlm-button-group-text",
|
|
170
|
+
host: { "data-slot": "button-group-text" }
|
|
171
|
+
}]
|
|
172
|
+
}],
|
|
173
|
+
ctorParameters: () => []
|
|
174
|
+
});
|
|
175
|
+
const HlmButtonGroupImports = [
|
|
176
|
+
HlmButtonGroup,
|
|
177
|
+
HlmButtonGroupText,
|
|
178
|
+
HlmButtonGroupSeparator
|
|
179
|
+
];
|
|
85
180
|
export { HlmButtonGroup, HlmButtonGroupImports, HlmButtonGroupSeparator, HlmButtonGroupText };
|
|
86
|
-
|
|
181
|
+
|
|
182
|
+
//# sourceMappingURL=yukit-web-helm-button-group.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yukit-web-helm-button-group.mjs","sources":["../../../projects/yukit-web/helm/button-group/src/lib/hlm-button-group.ts","../../../projects/yukit-web/helm/button-group/src/lib/hlm-button-group-separator.ts","../../../projects/yukit-web/helm/button-group/src/lib/hlm-button-group-text.ts","../../../projects/yukit-web/helm/button-group/src/index.ts"
|
|
1
|
+
{"version":3,"file":"yukit-web-helm-button-group.mjs","names":[],"sources":["../../../projects/yukit-web/helm/button-group/src/lib/hlm-button-group.ts","../../../projects/yukit-web/helm/button-group/src/lib/hlm-button-group-separator.ts","../../../projects/yukit-web/helm/button-group/src/lib/hlm-button-group-text.ts","../../../projects/yukit-web/helm/button-group/src/index.ts"],"sourcesContent":["import { Directive, input } from '@angular/core';\nimport { classes } from 'yukit-web/helm/utils';\nimport { cva } from 'class-variance-authority';\n\nconst buttonGroupVariants = cva(\n\t\"has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n\t{\n\t\tvariants: {\n\t\t\torientation: {\n\t\t\t\thorizontal:\n\t\t\t\t\t'[&>[data-slot]:not(:has(~[data-slot]))]:rounded-e-lg [&>*:not(:first-child)]:rounded-s-none [&>*:not(:first-child)]:border-s-0 [&>*:not(:last-child)]:rounded-e-none',\n\t\t\t\tvertical:\n\t\t\t\t\t'[&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\torientation: 'horizontal',\n\t\t},\n\t},\n);\n\n@Directive({\n\tselector: '[hlmButtonGroup],hlm-button-group',\n\thost: {\n\t\t'data-slot': 'button-group',\n\t\trole: 'group',\n\t\t'[attr.data-orientation]': 'orientation()',\n\t},\n})\nexport class HlmButtonGroup {\n\tconstructor() {\n\t\tclasses(() => buttonGroupVariants({ orientation: this.orientation() }));\n\t}\n\n\tpublic readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n}\n","import { Directive } from '@angular/core';\nimport { BrnSeparator, provideBrnSeparatorConfig } from '@spartan-ng/brain/separator';\nimport { classes } from 'yukit-web/helm/utils';\n\n@Directive({\n\tselector: '[hlmButtonGroupSeparator],hlm-button-group-separator',\n\tproviders: [provideBrnSeparatorConfig({ orientation: 'vertical' })],\n\thostDirectives: [{ directive: BrnSeparator, inputs: ['orientation', 'decorative'] }],\n\thost: {\n\t\t'data-slot': 'button-group-separator',\n\t},\n})\nexport class HlmButtonGroupSeparator {\n\tconstructor() {\n\t\tclasses(() => [\n\t\t\t'bg-input relative self-stretch data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto',\n\t\t\t// separator classes\n\t\t\t'shrink-0 data-horizontal:h-px data-vertical:w-px data-vertical:self-stretch',\n\t\t]);\n\t}\n}\n","import { Directive } from '@angular/core';\nimport { classes } from 'yukit-web/helm/utils';\n\n@Directive({\n\tselector: '[hlmButtonGroupText],hlm-button-group-text',\n\thost: {\n\t\t'data-slot': 'button-group-text',\n\t},\n})\nexport class HlmButtonGroupText {\n\tconstructor() {\n\t\tclasses(() => \"bg-muted gap-2 rounded-lg border px-2.5 text-sm font-medium [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] flex items-center [&_ng-icon]:pointer-events-none\");\n\t}\n}\n","import { HlmButtonGroup } from './lib/hlm-button-group';\nimport { HlmButtonGroupSeparator } from './lib/hlm-button-group-separator';\nimport { HlmButtonGroupText } from './lib/hlm-button-group-text';\n\nexport * from './lib/hlm-button-group';\nexport * from './lib/hlm-button-group-separator';\nexport * from './lib/hlm-button-group-text';\n\nexport const HlmButtonGroupImports = [HlmButtonGroup, HlmButtonGroupText, HlmButtonGroupSeparator] as const;\n"],"mappings":";;;;;;AAIA,MAAM,sBAAsB,IAC3B,4R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
|
|
@@ -1,77 +1,147 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { InjectionToken, inject,
|
|
3
|
-
import * as i1 from
|
|
4
|
-
import { BrnButton } from
|
|
5
|
-
import { classes } from
|
|
6
|
-
import { cva } from
|
|
7
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Directive, InjectionToken, inject, input, signal } from "@angular/core";
|
|
3
|
+
import * as i1 from "@spartan-ng/brain/button";
|
|
4
|
+
import { BrnButton } from "@spartan-ng/brain/button";
|
|
5
|
+
import { classes } from "yukit-web/helm/utils";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
8
7
|
const defaultConfig = {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
variant: "default",
|
|
9
|
+
size: "default"
|
|
11
10
|
};
|
|
12
|
-
const BrnButtonConfigToken = new InjectionToken(
|
|
11
|
+
const BrnButtonConfigToken = new InjectionToken("BrnButtonConfig");
|
|
13
12
|
function provideBrnButtonConfig(config) {
|
|
14
|
-
|
|
13
|
+
return {
|
|
14
|
+
provide: BrnButtonConfigToken,
|
|
15
|
+
useValue: {
|
|
16
|
+
...defaultConfig,
|
|
17
|
+
...config
|
|
18
|
+
}
|
|
19
|
+
};
|
|
15
20
|
}
|
|
16
21
|
function injectBrnButtonConfig() {
|
|
17
|
-
|
|
22
|
+
return inject(BrnButtonConfigToken, { optional: true }) ?? defaultConfig;
|
|
18
23
|
}
|
|
19
|
-
|
|
20
24
|
const buttonVariants = cva("focus-visible:border-ring focus-visible:ring-ring/50 data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px data-[matches-spartan-invalid=true]:ring-3 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0", {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
25
|
+
variants: {
|
|
26
|
+
variant: {
|
|
27
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
28
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
29
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
30
|
+
ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
31
|
+
destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
|
|
32
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
33
|
+
},
|
|
34
|
+
size: {
|
|
35
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
|
|
36
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(3)]",
|
|
37
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(3.5)]",
|
|
38
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-3 has-data-[icon=inline-start]:ps-3",
|
|
39
|
+
icon: "size-8",
|
|
40
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(3)]",
|
|
41
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
42
|
+
"icon-lg": "size-9"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
defaultVariants: {
|
|
46
|
+
variant: "default",
|
|
47
|
+
size: "default"
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
var HlmButton = class HlmButton {
|
|
51
|
+
constructor() {
|
|
52
|
+
this._config = injectBrnButtonConfig();
|
|
53
|
+
this._additionalClasses = signal("", ...ngDevMode ? [{ debugName: "_additionalClasses" }] : /* istanbul ignore next */ []);
|
|
54
|
+
this.variant = input(this._config.variant, ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
55
|
+
this.size = input(this._config.size, ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
56
|
+
classes(() => [buttonVariants({
|
|
57
|
+
variant: this.variant(),
|
|
58
|
+
size: this.size()
|
|
59
|
+
}), this._additionalClasses()]);
|
|
60
|
+
}
|
|
61
|
+
setClass(classes) {
|
|
62
|
+
this._additionalClasses.set(classes);
|
|
63
|
+
}
|
|
64
|
+
static {
|
|
65
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
66
|
+
minVersion: "12.0.0",
|
|
67
|
+
version: "22.2.4",
|
|
68
|
+
ngImport: i0,
|
|
69
|
+
type: HlmButton,
|
|
70
|
+
deps: [],
|
|
71
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
static {
|
|
75
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
76
|
+
minVersion: "17.1.0",
|
|
77
|
+
version: "22.2.4",
|
|
78
|
+
type: HlmButton,
|
|
79
|
+
isStandalone: true,
|
|
80
|
+
selector: "button[hlmBtn], a[hlmBtn]",
|
|
81
|
+
inputs: {
|
|
82
|
+
variant: {
|
|
83
|
+
classPropertyName: "variant",
|
|
84
|
+
publicName: "variant",
|
|
85
|
+
isSignal: true,
|
|
86
|
+
isRequired: false,
|
|
87
|
+
transformFunction: null
|
|
88
|
+
},
|
|
89
|
+
size: {
|
|
90
|
+
classPropertyName: "size",
|
|
91
|
+
publicName: "size",
|
|
92
|
+
isSignal: true,
|
|
93
|
+
isRequired: false,
|
|
94
|
+
transformFunction: null
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
host: { attributes: { "data-slot": "button" } },
|
|
98
|
+
exportAs: ["hlmBtn"],
|
|
99
|
+
hostDirectives: [{
|
|
100
|
+
directive: i1.BrnButton,
|
|
101
|
+
inputs: ["disabled", "disabled"]
|
|
102
|
+
}],
|
|
103
|
+
ngImport: i0
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
108
|
+
minVersion: "12.0.0",
|
|
109
|
+
version: "22.2.4",
|
|
110
|
+
ngImport: i0,
|
|
111
|
+
type: HlmButton,
|
|
112
|
+
decorators: [{
|
|
113
|
+
type: Directive,
|
|
114
|
+
args: [{
|
|
115
|
+
selector: "button[hlmBtn], a[hlmBtn]",
|
|
116
|
+
exportAs: "hlmBtn",
|
|
117
|
+
hostDirectives: [{
|
|
118
|
+
directive: BrnButton,
|
|
119
|
+
inputs: ["disabled"]
|
|
120
|
+
}],
|
|
121
|
+
host: { "data-slot": "button" }
|
|
122
|
+
}]
|
|
123
|
+
}],
|
|
124
|
+
ctorParameters: () => [],
|
|
125
|
+
propDecorators: {
|
|
126
|
+
variant: [{
|
|
127
|
+
type: i0.Input,
|
|
128
|
+
args: [{
|
|
129
|
+
isSignal: true,
|
|
130
|
+
alias: "variant",
|
|
131
|
+
required: false
|
|
132
|
+
}]
|
|
133
|
+
}],
|
|
134
|
+
size: [{
|
|
135
|
+
type: i0.Input,
|
|
136
|
+
args: [{
|
|
137
|
+
isSignal: true,
|
|
138
|
+
alias: "size",
|
|
139
|
+
required: false
|
|
140
|
+
}]
|
|
141
|
+
}]
|
|
142
|
+
}
|
|
45
143
|
});
|
|
46
|
-
class HlmButton {
|
|
47
|
-
constructor() {
|
|
48
|
-
this._config = injectBrnButtonConfig();
|
|
49
|
-
this._additionalClasses = signal('', ...(ngDevMode ? [{ debugName: "_additionalClasses" }] : /* istanbul ignore next */ []));
|
|
50
|
-
this.variant = input(this._config.variant, ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
51
|
-
this.size = input(this._config.size, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
52
|
-
classes(() => [buttonVariants({ variant: this.variant(), size: this.size() }), this._additionalClasses()]);
|
|
53
|
-
}
|
|
54
|
-
setClass(classes) {
|
|
55
|
-
this._additionalClasses.set(classes);
|
|
56
|
-
}
|
|
57
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmButton, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
58
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: HlmButton, isStandalone: true, selector: "button[hlmBtn], a[hlmBtn]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "button" } }, exportAs: ["hlmBtn"], hostDirectives: [{ directive: i1.BrnButton, inputs: ["disabled", "disabled"] }], ngImport: i0 }); }
|
|
59
|
-
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmButton, decorators: [{
|
|
61
|
-
type: Directive,
|
|
62
|
-
args: [{
|
|
63
|
-
selector: 'button[hlmBtn], a[hlmBtn]',
|
|
64
|
-
exportAs: 'hlmBtn',
|
|
65
|
-
hostDirectives: [{ directive: BrnButton, inputs: ['disabled'] }],
|
|
66
|
-
host: { 'data-slot': 'button' },
|
|
67
|
-
}]
|
|
68
|
-
}], ctorParameters: () => [], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
69
|
-
|
|
70
144
|
const HlmButtonImports = [HlmButton];
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Generated bundle index. Do not edit.
|
|
74
|
-
*/
|
|
75
|
-
|
|
76
145
|
export { HlmButton, HlmButtonImports, buttonVariants, injectBrnButtonConfig, provideBrnButtonConfig };
|
|
77
|
-
|
|
146
|
+
|
|
147
|
+
//# sourceMappingURL=yukit-web-helm-button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yukit-web-helm-button.mjs","sources":["../../../projects/yukit-web/helm/button/src/lib/hlm-button.token.ts","../../../projects/yukit-web/helm/button/src/lib/hlm-button.ts","../../../projects/yukit-web/helm/button/src/index.ts"
|
|
1
|
+
{"version":3,"file":"yukit-web-helm-button.mjs","names":[],"sources":["../../../projects/yukit-web/helm/button/src/lib/hlm-button.token.ts","../../../projects/yukit-web/helm/button/src/lib/hlm-button.ts","../../../projects/yukit-web/helm/button/src/index.ts"],"sourcesContent":["import { InjectionToken, type ValueProvider, inject } from '@angular/core';\nimport type { ButtonVariants } from './hlm-button';\n\nexport interface BrnButtonConfig {\n\tvariant: ButtonVariants['variant'];\n\tsize: ButtonVariants['size'];\n}\n\nconst defaultConfig: BrnButtonConfig = {\n\tvariant: 'default',\n\tsize: 'default',\n};\n\nconst BrnButtonConfigToken = new InjectionToken<BrnButtonConfig>('BrnButtonConfig');\n\nexport function provideBrnButtonConfig(config: Partial<BrnButtonConfig>): ValueProvider {\n\treturn { provide: BrnButtonConfigToken, useValue: { ...defaultConfig, ...config } };\n}\n\nexport function injectBrnButtonConfig(): BrnButtonConfig {\n\treturn inject(BrnButtonConfigToken, { optional: true }) ?? defaultConfig;\n}\n","import { Directive, input, signal } from '@angular/core';\nimport { BrnButton } from '@spartan-ng/brain/button';\nimport { classes } from 'yukit-web/helm/utils';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\nimport { injectBrnButtonConfig } from './hlm-button.token';\n\nexport const buttonVariants = cva(\n\t\"focus-visible:border-ring focus-visible:ring-ring/50 data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px data-[matches-spartan-invalid=true]:ring-3 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)] group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: 'bg-primary text-primary-foreground [a]:hover:bg-primary/80',\n\t\t\t\toutline: 'border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground',\n\t\t\t\tsecondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',\n\t\t\t\tghost: 'hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground',\n\t\t\t\tdestructive: 'bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30',\n\t\t\t\tlink: 'text-primary underline-offset-4 hover:underline',\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: 'h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2',\n\t\t\t\txs: \"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(3)]\",\n\t\t\t\tsm: \"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(3.5)]\",\n\t\t\t\tlg: 'h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-3 has-data-[icon=inline-start]:ps-3',\n\t\t\t\ticon: 'size-8',\n\t\t\t\t'icon-xs': \"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(3)]\",\n\t\t\t\t'icon-sm': 'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',\n\t\t\t\t'icon-lg': 'size-9',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: 'default',\n\t\t\tsize: 'default',\n\t\t},\n\t},\n);\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\n@Directive({\n\tselector: 'button[hlmBtn], a[hlmBtn]',\n\texportAs: 'hlmBtn',\n\thostDirectives: [{ directive: BrnButton, inputs: ['disabled'] }],\n\thost: { 'data-slot': 'button' },\n})\nexport class HlmButton {\n\tprivate readonly _config = injectBrnButtonConfig();\n\n\tprivate readonly _additionalClasses = signal<ClassValue>('');\n\n\tpublic readonly variant = input<ButtonVariants['variant']>(this._config.variant);\n\n\tpublic readonly size = input<ButtonVariants['size']>(this._config.size);\n\n\tconstructor() {\n\t\tclasses(() => [buttonVariants({ variant: this.variant(), size: this.size() }), this._additionalClasses()]);\n\t}\n\n\tsetClass(classes: string): void {\n\t\tthis._additionalClasses.set(classes);\n\t}\n}\n","import { HlmButton } from './lib/hlm-button';\n\nexport * from './lib/hlm-button';\nexport * from './lib/hlm-button.token';\n\nexport const HlmButtonImports = [HlmButton] as const;\n"],"mappings":";;;;;;AAQA,MAAM,gBAAiC;CACtC,SAAS;CACT,MAAM;AACN;AAED,MAAM,uBAAuB,IAAI,eAAgC,iBAAiB;AAElF,SAAgB,uBAAuB,QAAgC;CACtE,OAAO;EAAE,SAAS;EAAsB,UAAU;GAAE,GAAG;GAAe,GAAG;EAAM;CAAE;AAClF;AAEA,SAAgB,wBAAqB;CACpC,OAAO,OAAO,sBAAsB,EAAE,UAAU,KAAI,CAAE,KAAK;AAC5D;ACdA,MAAa,iBAAiB,IAC7B,2vBACA;CACC,UAAU;EACT,SAAS;GACR,SAAS;GACT,SAAS;GACT,WAAW;GACX,OAAO;GACP,aAAa;GACb,MAAM;EACN;EACD,MAAM;GACL,SAAS;GACT,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,MAAM;GACN,WAAW;GACX,WAAW;GACX,WAAW;EACX;CACD;CACD,iBAAiB;EAChB,SAAS;EACT,MAAM;CACN;AACD,CAAA;AAWF,IAAa,YAAb,MAAa,UAAS;CASrB,cAAA;EARiB,KAAA,UAAU,sB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