yukit-web 0.10.6 → 0.10.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/fesm2022/yukit-web-chart.mjs +807 -552
  2. package/fesm2022/yukit-web-chart.mjs.map +1 -1
  3. package/fesm2022/yukit-web-helm-accordion.mjs +271 -100
  4. package/fesm2022/yukit-web-helm-accordion.mjs.map +1 -1
  5. package/fesm2022/yukit-web-helm-alert-dialog.mjs +675 -243
  6. package/fesm2022/yukit-web-helm-alert-dialog.mjs.map +1 -1
  7. package/fesm2022/yukit-web-helm-alert.mjs +199 -91
  8. package/fesm2022/yukit-web-helm-alert.mjs.map +1 -1
  9. package/fesm2022/yukit-web-helm-aspect-ratio.mjs +77 -43
  10. package/fesm2022/yukit-web-helm-aspect-ratio.mjs.map +1 -1
  11. package/fesm2022/yukit-web-helm-attachment.mjs +552 -205
  12. package/fesm2022/yukit-web-helm-attachment.mjs.map +1 -1
  13. package/fesm2022/yukit-web-helm-autocomplete.mjs +913 -288
  14. package/fesm2022/yukit-web-helm-autocomplete.mjs.map +1 -1
  15. package/fesm2022/yukit-web-helm-avatar.mjs +298 -137
  16. package/fesm2022/yukit-web-helm-avatar.mjs.map +1 -1
  17. package/fesm2022/yukit-web-helm-badge.mjs +78 -44
  18. package/fesm2022/yukit-web-helm-badge.mjs.map +1 -1
  19. package/fesm2022/yukit-web-helm-breadcrumb.mjs +466 -183
  20. package/fesm2022/yukit-web-helm-breadcrumb.mjs.map +1 -1
  21. package/fesm2022/yukit-web-helm-bubble.mjs +297 -118
  22. package/fesm2022/yukit-web-helm-bubble.mjs.map +1 -1
  23. package/fesm2022/yukit-web-helm-button-group.mjs +179 -83
  24. package/fesm2022/yukit-web-helm-button-group.mjs.map +1 -1
  25. package/fesm2022/yukit-web-helm-button.mjs +137 -67
  26. package/fesm2022/yukit-web-helm-button.mjs.map +1 -1
  27. package/fesm2022/yukit-web-helm-calendar.mjs +957 -230
  28. package/fesm2022/yukit-web-helm-calendar.mjs.map +1 -1
  29. package/fesm2022/yukit-web-helm-card.mjs +318 -136
  30. package/fesm2022/yukit-web-helm-card.mjs.map +1 -1
  31. package/fesm2022/yukit-web-helm-carousel.mjs +563 -233
  32. package/fesm2022/yukit-web-helm-carousel.mjs.map +1 -1
  33. package/fesm2022/yukit-web-helm-checkbox.mjs +367 -101
  34. package/fesm2022/yukit-web-helm-checkbox.mjs.map +1 -1
  35. package/fesm2022/yukit-web-helm-collapsible.mjs +155 -61
  36. package/fesm2022/yukit-web-helm-collapsible.mjs.map +1 -1
  37. package/fesm2022/yukit-web-helm-combobox.mjs +1572 -481
  38. package/fesm2022/yukit-web-helm-combobox.mjs.map +1 -1
  39. package/fesm2022/yukit-web-helm-command.mjs +752 -260
  40. package/fesm2022/yukit-web-helm-command.mjs.map +1 -1
  41. package/fesm2022/yukit-web-helm-context-menu.mjs +161 -63
  42. package/fesm2022/yukit-web-helm-context-menu.mjs.map +1 -1
  43. package/fesm2022/yukit-web-helm-date-picker.mjs +2322 -932
  44. package/fesm2022/yukit-web-helm-date-picker.mjs.map +1 -1
  45. package/fesm2022/yukit-web-helm-dialog.mjs +625 -240
  46. package/fesm2022/yukit-web-helm-dialog.mjs.map +1 -1
  47. package/fesm2022/yukit-web-helm-drawer.mjs +539 -222
  48. package/fesm2022/yukit-web-helm-drawer.mjs.map +1 -1
  49. package/fesm2022/yukit-web-helm-dropdown-menu.mjs +1295 -493
  50. package/fesm2022/yukit-web-helm-dropdown-menu.mjs.map +1 -1
  51. package/fesm2022/yukit-web-helm-empty.mjs +280 -121
  52. package/fesm2022/yukit-web-helm-empty.mjs.map +1 -1
  53. package/fesm2022/yukit-web-helm-field.mjs +670 -301
  54. package/fesm2022/yukit-web-helm-field.mjs.map +1 -1
  55. package/fesm2022/yukit-web-helm-hover-card.mjs +198 -99
  56. package/fesm2022/yukit-web-helm-hover-card.mjs.map +1 -1
  57. package/fesm2022/yukit-web-helm-input-group.mjs +357 -165
  58. package/fesm2022/yukit-web-helm-input-group.mjs.map +1 -1
  59. package/fesm2022/yukit-web-helm-input-otp.mjs +306 -114
  60. package/fesm2022/yukit-web-helm-input-otp.mjs.map +1 -1
  61. package/fesm2022/yukit-web-helm-input.mjs +62 -30
  62. package/fesm2022/yukit-web-helm-input.mjs.map +1 -1
  63. package/fesm2022/yukit-web-helm-item.mjs +545 -227
  64. package/fesm2022/yukit-web-helm-item.mjs.map +1 -1
  65. package/fesm2022/yukit-web-helm-kbd.mjs +85 -44
  66. package/fesm2022/yukit-web-helm-kbd.mjs.map +1 -1
  67. package/fesm2022/yukit-web-helm-label.mjs +60 -28
  68. package/fesm2022/yukit-web-helm-label.mjs.map +1 -1
  69. package/fesm2022/yukit-web-helm-marker.mjs +165 -74
  70. package/fesm2022/yukit-web-helm-marker.mjs.map +1 -1
  71. package/fesm2022/yukit-web-helm-menubar.mjs +207 -82
  72. package/fesm2022/yukit-web-helm-menubar.mjs.map +1 -1
  73. package/fesm2022/yukit-web-helm-message.mjs +277 -112
  74. package/fesm2022/yukit-web-helm-message.mjs.map +1 -1
  75. package/fesm2022/yukit-web-helm-native-select.mjs +363 -129
  76. package/fesm2022/yukit-web-helm-native-select.mjs.map +1 -1
  77. package/fesm2022/yukit-web-helm-navigation-menu.mjs +398 -166
  78. package/fesm2022/yukit-web-helm-navigation-menu.mjs.map +1 -1
  79. package/fesm2022/yukit-web-helm-pagination.mjs +1444 -460
  80. package/fesm2022/yukit-web-helm-pagination.mjs.map +1 -1
  81. package/fesm2022/yukit-web-helm-popover.mjs +358 -133
  82. package/fesm2022/yukit-web-helm-popover.mjs.map +1 -1
  83. package/fesm2022/yukit-web-helm-progress.mjs +126 -58
  84. package/fesm2022/yukit-web-helm-progress.mjs.map +1 -1
  85. package/fesm2022/yukit-web-helm-radio-group.mjs +420 -144
  86. package/fesm2022/yukit-web-helm-radio-group.mjs.map +1 -1
  87. package/fesm2022/yukit-web-helm-resizable.mjs +210 -91
  88. package/fesm2022/yukit-web-helm-resizable.mjs.map +1 -1
  89. package/fesm2022/yukit-web-helm-scroll-area.mjs +64 -34
  90. package/fesm2022/yukit-web-helm-scroll-area.mjs.map +1 -1
  91. package/fesm2022/yukit-web-helm-select.mjs +1059 -351
  92. package/fesm2022/yukit-web-helm-select.mjs.map +1 -1
  93. package/fesm2022/yukit-web-helm-separator.mjs +61 -31
  94. package/fesm2022/yukit-web-helm-separator.mjs.map +1 -1
  95. package/fesm2022/yukit-web-helm-sheet.mjs +590 -231
  96. package/fesm2022/yukit-web-helm-sheet.mjs.map +1 -1
  97. package/fesm2022/yukit-web-helm-sidebar.mjs +1781 -757
  98. package/fesm2022/yukit-web-helm-sidebar.mjs.map +1 -1
  99. package/fesm2022/yukit-web-helm-skeleton.mjs +45 -27
  100. package/fesm2022/yukit-web-helm-skeleton.mjs.map +1 -1
  101. package/fesm2022/yukit-web-helm-slider.mjs +139 -59
  102. package/fesm2022/yukit-web-helm-slider.mjs.map +1 -1
  103. package/fesm2022/yukit-web-helm-sonner.mjs +350 -62
  104. package/fesm2022/yukit-web-helm-sonner.mjs.map +1 -1
  105. package/fesm2022/yukit-web-helm-spinner.mjs +118 -44
  106. package/fesm2022/yukit-web-helm-spinner.mjs.map +1 -1
  107. package/fesm2022/yukit-web-helm-switch.mjs +326 -94
  108. package/fesm2022/yukit-web-helm-switch.mjs.map +1 -1
  109. package/fesm2022/yukit-web-helm-table.mjs +374 -177
  110. package/fesm2022/yukit-web-helm-table.mjs.map +1 -1
  111. package/fesm2022/yukit-web-helm-tabs.mjs +549 -173
  112. package/fesm2022/yukit-web-helm-tabs.mjs.map +1 -1
  113. package/fesm2022/yukit-web-helm-textarea.mjs +62 -30
  114. package/fesm2022/yukit-web-helm-textarea.mjs.map +1 -1
  115. package/fesm2022/yukit-web-helm-toggle-group.mjs +291 -89
  116. package/fesm2022/yukit-web-helm-toggle-group.mjs.map +1 -1
  117. package/fesm2022/yukit-web-helm-toggle.mjs +132 -57
  118. package/fesm2022/yukit-web-helm-toggle.mjs.map +1 -1
  119. package/fesm2022/yukit-web-helm-tooltip.mjs +84 -54
  120. package/fesm2022/yukit-web-helm-tooltip.mjs.map +1 -1
  121. package/fesm2022/yukit-web-helm-typography.mjs +461 -202
  122. package/fesm2022/yukit-web-helm-typography.mjs.map +1 -1
  123. package/fesm2022/yukit-web-helm-utils.mjs +131 -253
  124. package/fesm2022/yukit-web-helm-utils.mjs.map +1 -1
  125. package/fesm2022/yukit-web.mjs +24592 -9669
  126. package/fesm2022/yukit-web.mjs.map +1 -1
  127. package/package.json +9 -9
  128. package/src/lib/theme/components/button.css +14 -0
  129. package/src/lib/theme/spartan-overwrites/sonner.css +2 -2
  130. package/src/lib/theme/tokens/component-colors.css +6 -2
  131. package/types/yukit-web-chart.d.ts +184 -125
  132. package/types/yukit-web-helm-accordion.d.ts +49 -28
  133. package/types/yukit-web-helm-alert-dialog.d.ts +127 -73
  134. package/types/yukit-web-helm-alert.d.ts +30 -32
  135. package/types/yukit-web-helm-aspect-ratio.d.ts +17 -15
  136. package/types/yukit-web-helm-attachment.d.ts +97 -69
  137. package/types/yukit-web-helm-autocomplete.d.ts +205 -79
  138. package/types/yukit-web-helm-avatar.d.ts +44 -39
  139. package/types/yukit-web-helm-badge.d.ts +18 -17
  140. package/types/yukit-web-helm-breadcrumb.d.ts +69 -45
  141. package/types/yukit-web-helm-bubble.d.ts +54 -40
  142. package/types/yukit-web-helm-button-group.d.ts +29 -22
  143. package/types/yukit-web-helm-button.d.ts +41 -31
  144. package/types/yukit-web-helm-calendar.d.ts +157 -85
  145. package/types/yukit-web-helm-card.d.ts +38 -42
  146. package/types/yukit-web-helm-carousel.d.ts +105 -73
  147. package/types/yukit-web-helm-checkbox.d.ts +117 -58
  148. package/types/yukit-web-helm-collapsible.d.ts +34 -19
  149. package/types/yukit-web-helm-combobox.d.ts +355 -150
  150. package/types/yukit-web-helm-command.d.ts +140 -73
  151. package/types/yukit-web-helm-context-menu.d.ts +48 -27
  152. package/types/yukit-web-helm-date-picker.d.ts +852 -556
  153. package/types/yukit-web-helm-dialog.d.ts +106 -78
  154. package/types/yukit-web-helm-drawer.d.ts +90 -61
  155. package/types/yukit-web-helm-dropdown-menu.d.ts +278 -158
  156. package/types/yukit-web-helm-empty.d.ts +38 -42
  157. package/types/yukit-web-helm-field.d.ts +122 -91
  158. package/types/yukit-web-helm-hover-card.d.ts +39 -27
  159. package/types/yukit-web-helm-input-group.d.ts +63 -41
  160. package/types/yukit-web-helm-input-otp.d.ts +38 -35
  161. package/types/yukit-web-helm-input.d.ts +19 -12
  162. package/types/yukit-web-helm-item.d.ts +90 -82
  163. package/types/yukit-web-helm-kbd.d.ts +10 -15
  164. package/types/yukit-web-helm-label.d.ts +14 -11
  165. package/types/yukit-web-helm-marker.d.ts +26 -27
  166. package/types/yukit-web-helm-menubar.d.ts +61 -32
  167. package/types/yukit-web-helm-message.d.ts +34 -38
  168. package/types/yukit-web-helm-native-select.d.ts +102 -61
  169. package/types/yukit-web-helm-navigation-menu.d.ts +76 -42
  170. package/types/yukit-web-helm-pagination.d.ts +344 -166
  171. package/types/yukit-web-helm-popover.d.ts +62 -42
  172. package/types/yukit-web-helm-progress.d.ts +27 -20
  173. package/types/yukit-web-helm-radio-group.d.ts +121 -63
  174. package/types/yukit-web-helm-resizable.d.ts +46 -24
  175. package/types/yukit-web-helm-scroll-area.d.ts +6 -10
  176. package/types/yukit-web-helm-select.d.ts +231 -114
  177. package/types/yukit-web-helm-separator.d.ts +15 -12
  178. package/types/yukit-web-helm-sheet.d.ts +94 -65
  179. package/types/yukit-web-helm-sidebar.d.ts +322 -232
  180. package/types/yukit-web-helm-skeleton.d.ts +6 -10
  181. package/types/yukit-web-helm-slider.d.ts +33 -13
  182. package/types/yukit-web-helm-sonner.d.ts +112 -51
  183. package/types/yukit-web-helm-spinner.d.ts +24 -17
  184. package/types/yukit-web-helm-switch.d.ts +89 -51
  185. package/types/yukit-web-helm-table.d.ts +38 -42
  186. package/types/yukit-web-helm-tabs.d.ts +116 -60
  187. package/types/yukit-web-helm-textarea.d.ts +19 -12
  188. package/types/yukit-web-helm-toggle-group.d.ts +81 -32
  189. package/types/yukit-web-helm-toggle.d.ts +39 -21
  190. package/types/yukit-web-helm-tooltip.d.ts +21 -16
  191. package/types/yukit-web-helm-typography.d.ts +62 -77
  192. package/types/yukit-web-helm-utils.d.ts +8 -11
  193. package/types/yukit-web.d.ts +5125 -2357
@@ -1,86 +1,182 @@
1
- import * as i0 from '@angular/core';
2
- import { input, Directive } 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 { provideBrnSeparatorConfig, BrnSeparator } from '@spartan-ng/brain/separator';
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
- variants: {
10
- orientation: {
11
- 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',
12
- 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',
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
- constructor() {
21
- this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
22
- classes(() => buttonGroupVariants({ orientation: this.orientation() }));
23
- }
24
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmButtonGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
25
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: HlmButtonGroup, isStandalone: true, selector: "[hlmButtonGroup],hlm-button-group", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "button-group", "role": "group" }, properties: { "attr.data-orientation": "orientation()" } }, ngImport: i0 }); }
26
- }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmButtonGroup, decorators: [{
28
- type: Directive,
29
- args: [{
30
- selector: '[hlmButtonGroup],hlm-button-group',
31
- host: {
32
- 'data-slot': 'button-group',
33
- role: 'group',
34
- '[attr.data-orientation]': 'orientation()',
35
- },
36
- }]
37
- }], ctorParameters: () => [], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }] } });
38
-
39
- class HlmButtonGroupSeparator {
40
- constructor() {
41
- classes(() => [
42
- 'bg-input relative self-stretch data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto',
43
- // separator classes
44
- 'shrink-0 data-horizontal:h-px data-vertical:w-px data-vertical:self-stretch',
45
- ]);
46
- }
47
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmButtonGroupSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
48
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HlmButtonGroupSeparator, isStandalone: true, selector: "[hlmButtonGroupSeparator],hlm-button-group-separator", host: { attributes: { "data-slot": "button-group-separator" } }, providers: [provideBrnSeparatorConfig({ orientation: 'vertical' })], hostDirectives: [{ directive: i1.BrnSeparator, inputs: ["orientation", "orientation", "decorative", "decorative"] }], ngImport: i0 }); }
49
- }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmButtonGroupSeparator, decorators: [{
51
- type: Directive,
52
- args: [{
53
- selector: '[hlmButtonGroupSeparator],hlm-button-group-separator',
54
- providers: [provideBrnSeparatorConfig({ orientation: 'vertical' })],
55
- hostDirectives: [{ directive: BrnSeparator, inputs: ['orientation', 'decorative'] }],
56
- host: {
57
- 'data-slot': 'button-group-separator',
58
- },
59
- }]
60
- }], ctorParameters: () => [] });
61
-
62
- class HlmButtonGroupText {
63
- constructor() {
64
- 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");
65
- }
66
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmButtonGroupText, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
67
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: HlmButtonGroupText, isStandalone: true, selector: "[hlmButtonGroupText],hlm-button-group-text", host: { attributes: { "data-slot": "button-group-text" } }, ngImport: i0 }); }
68
- }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmButtonGroupText, decorators: [{
70
- type: Directive,
71
- args: [{
72
- selector: '[hlmButtonGroupText],hlm-button-group-text',
73
- host: {
74
- 'data-slot': 'button-group-text',
75
- },
76
- }]
77
- }], ctorParameters: () => [] });
78
-
79
- const HlmButtonGroupImports = [HlmButtonGroup, HlmButtonGroupText, HlmButtonGroupSeparator];
80
-
81
- /**
82
- * Generated bundle index. Do not edit.
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
- //# sourceMappingURL=yukit-web-helm-button-group.mjs.map
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","../../../projects/yukit-web/helm/button-group/src/yukit-web-helm-button-group.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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAIA,MAAM,mBAAmB,GAAG,GAAG,CAC9B,0RAA0R,EAC1R;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,WAAW,EAAE;AACZ,YAAA,UAAU,EACT,sKAAsK;AACvK,YAAA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UAAA,EAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,4CAA4C;AACtD,oBAAA,IAAI,EAAE;AACL,wBAAA,WAAW,EAAE,mBAAmB;AAChC,qBAAA;AACD,iBAAA;;;ACAM,MAAM,qBAAqB,GAAG,CAAC,cAAc,EAAE,kBAAkB,EAAE,uBAAuB;;ACRjG;;AAEG;;"}
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,4RACA;CACC,UAAU,EACT,aAAa;EACZ,YACC;EACD,UACC;CACD,EACD;CACD,iBAAiB,EAChB,aAAa,aACb;AACD,CAAA;AAWF,IAAa,iBAAb,MAAa,eAAc;CAC1B,cAAA;EAIgB,KAAA,cAAc,MAAiC,cAAa,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;EAH3E,cAAc,oBAAoB,EAAE,aAAa,KAAK,YAAW,EAAE,CAAE,CAAC;CACvE;CAHY;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAc,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAd;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAc,cAAA;GAAA,UAAA;GAAA,QAAA,EAAA,aAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA,EAAA;GAAA,MAAA;IAAA,YAAA;KAAA,aAAA;KAAA,QAAA;IAAA;IAAA,YAAA,EAAA,yBAAA,gBAAA;GAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAd,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EAR1B,MAAA;EAAU,MAAA,CAAA;GACV,UAAU;GACV,MAAM;IACL,aAAa;IACb,MAAM;IACN,2BAA2B;GAC3B;EACD,CAAA;;;;;;;;;;;;AChBD,IAAa,0BAAb,MAAa,wBAAuB;CACnC,cAAA;EACC,cAAc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CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA;EAN9B,MAAA;EAAU,MAAA,CAAA;GACV,UAAU;GACV,MAAM,EACL,aAAa,oBACb;EACD,CAAA;;;;ACAD,MAAa,wBAAwB;CAAC;CAAgB;CAAoB;AAAuB"}
@@ -1,77 +1,147 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, signal, input, Directive } 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';
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
- variant: 'default',
10
- size: 'default',
8
+ variant: "default",
9
+ size: "default"
11
10
  };
12
- const BrnButtonConfigToken = new InjectionToken('BrnButtonConfig');
11
+ const BrnButtonConfigToken = new InjectionToken("BrnButtonConfig");
13
12
  function provideBrnButtonConfig(config) {
14
- return { provide: BrnButtonConfigToken, useValue: { ...defaultConfig, ...config } };
13
+ return {
14
+ provide: BrnButtonConfigToken,
15
+ useValue: {
16
+ ...defaultConfig,
17
+ ...config
18
+ }
19
+ };
15
20
  }
16
21
  function injectBrnButtonConfig() {
17
- return inject(BrnButtonConfigToken, { optional: true }) ?? defaultConfig;
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
- variants: {
22
- variant: {
23
- default: 'bg-primary text-primary-foreground [a]:hover:bg-primary/80',
24
- 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',
25
- secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',
26
- ghost: 'hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground',
27
- 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',
28
- link: 'text-primary underline-offset-4 hover:underline',
29
- },
30
- size: {
31
- default: 'h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2',
32
- 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)]",
33
- 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)]",
34
- lg: 'h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-3 has-data-[icon=inline-start]:ps-3',
35
- icon: 'size-8',
36
- '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)]",
37
- 'icon-sm': 'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',
38
- 'icon-lg': 'size-9',
39
- },
40
- },
41
- defaultVariants: {
42
- variant: 'default',
43
- size: 'default',
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
- //# sourceMappingURL=yukit-web-helm-button.mjs.map
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","../../../projects/yukit-web/helm/button/src/yukit-web-helm-button.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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAQA,MAAM,aAAa,GAAoB;AACtC,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,IAAI,EAAE,SAAS;CACf;AAED,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAAkB,iBAAiB,CAAC;AAE7E,SAAU,sBAAsB,CAAC,MAAgC,EAAA;AACtE,IAAA,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,EAAE,GAAG,aAAa,EAAE,GAAG,MAAM,EAAE,EAAE;AACpF;SAEgB,qBAAqB,GAAA;AACpC,IAAA,OAAO,MAAM,CAAC,oBAAoB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,aAAa;AACzE;;ACdO,MAAM,cAAc,GAAG,GAAG,CAChC,yvBAAyvB,EACzvB;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,OAAO,EAAE,4DAA4D;AACrE,YAAA,OAAO,EAAE,iLAAiL;AAC1L,YAAA,SAAS,EAAE,iIAAiI;AAC5I,YAAA,KAAK,EAAE,kHAAkH;AACzH,YAAA,WAAW,EAAE,6NAA6N;AAC1O,YAA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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;E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