@4sh/ui-kit 0.16.0 → 0.17.1

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 (219) hide show
  1. package/README.fr.md +10 -10
  2. package/README.md +10 -10
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
  12. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
  14. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -1000
  16. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
  18. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2048
  20. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
  22. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  23. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
  24. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
  25. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
  26. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  27. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
  28. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -138
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -257
  36. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  37. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -312
  38. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  39. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
  40. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  41. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -199
  42. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  43. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
  44. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
  45. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
  46. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  47. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
  48. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  49. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
  50. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  51. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
  52. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  53. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
  54. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  55. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
  56. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  57. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
  58. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  59. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
  60. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  61. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -137
  62. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
  64. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
  65. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
  66. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  67. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
  68. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  69. package/fesm2022/4sh-ui-kit-forms.mjs +721 -638
  70. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  71. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
  72. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
  74. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
  76. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
  78. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
  80. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
  82. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
  84. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
  86. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
  88. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  89. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
  90. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  91. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
  92. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  93. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
  94. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
  95. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
  96. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  97. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
  98. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  99. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
  100. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  101. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
  102. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  103. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
  104. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
  105. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
  106. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  107. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
  108. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  109. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
  110. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
  112. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
  114. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
  116. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
  118. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
  120. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
  122. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  123. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
  124. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
  126. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
  128. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  129. package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
  130. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
  131. package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
  132. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
  133. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
  134. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  135. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
  136. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  137. package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
  138. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  139. package/fesm2022/4sh-ui-kit-types.mjs +0 -12
  140. package/fesm2022/4sh-ui-kit.mjs +3 -15
  141. package/fesm2022/4sh-ui-kit.mjs.map +1 -1
  142. package/mcp/data/component-api.json +299 -2
  143. package/mcp/data/text-search-docs.json +149 -9
  144. package/mcp/data/ui-config.json +378 -1
  145. package/mcp/index.js +8190 -2876
  146. package/mcp/package.json +1 -1
  147. package/package.json +5 -1
  148. package/styles/component-vars.scss +22 -1
  149. package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
  150. package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
  151. package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
  152. package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
  153. package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
  154. package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
  155. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
  156. package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
  157. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
  158. package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
  159. package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
  160. package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
  161. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
  162. package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
  163. package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
  164. package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
  165. package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
  166. package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
  167. package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
  168. package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
  169. package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
  170. package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
  171. package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
  172. package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
  173. package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
  174. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
  175. package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
  176. package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
  177. package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
  178. package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
  179. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
  180. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
  181. package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
  182. package/types/4sh-ui-kit-forms.d.ts +275 -194
  183. package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
  184. package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
  185. package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
  186. package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
  187. package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
  188. package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
  189. package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
  190. package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
  191. package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
  192. package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
  193. package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
  194. package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
  195. package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
  196. package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
  197. package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
  198. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
  199. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
  200. package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
  201. package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
  202. package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
  203. package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
  204. package/types/4sh-ui-kit-motion.d.ts +117 -67
  205. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
  206. package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
  207. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
  208. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
  209. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
  210. package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
  211. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
  212. package/types/4sh-ui-kit-overlay.d.ts +6 -6
  213. package/types/4sh-ui-kit-ripple.d.ts +99 -74
  214. package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
  215. package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
  216. package/types/4sh-ui-kit-theming.d.ts +27 -29
  217. package/types/4sh-ui-kit-types.d.ts +6 -5
  218. package/types/4sh-ui-kit.d.ts +4 -3
  219. package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
@@ -1,84 +1,212 @@
1
- import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, computed, isDevMode, effect, Component } from '@angular/core';
3
- import { UiIcon } from '@4sh/ui-kit/base/ui-icon';
4
-
5
- /**
6
- * ui-tag — informative label / status pill.
7
- *
8
- * design system: `level` × `subLevel` (informative color families) instead of a
9
- * flat `severity`, an optional icon on each side, and a pill/square shape.
10
- *
11
- * Fully token-driven (like `ui-badge`) — the color families are the built-in
12
- * customization surface; no per-component CSS hooks.
13
- */
14
- class UiTag {
15
- constructor() {
16
- /** Text content of the tag. */
17
- this.label = input(/* @ts-ignore */
18
- ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
19
- /** Color family. */
20
- this.level = input('default', /* @ts-ignore */
21
- ...(ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []));
22
- /** Intensity: high (solid) or low (subtle). */
23
- this.subLevel = input('high', /* @ts-ignore */
24
- ...(ngDevMode ? [{ debugName: "subLevel" }] : /* istanbul ignore next */ []));
25
- /** Size. */
26
- this.size = input('default', /* @ts-ignore */
27
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
28
- /** FontAwesome name of the leading icon (optional). */
29
- this.iconLeft = input(/* @ts-ignore */
30
- ...(ngDevMode ? [undefined, { debugName: "iconLeft" }] : /* istanbul ignore next */ []));
31
- /** FontAwesome name of the trailing icon (optional). */
32
- this.iconRight = input(/* @ts-ignore */
33
- ...(ngDevMode ? [undefined, { debugName: "iconRight" }] : /* istanbul ignore next */ []));
34
- /** Pill shape when true (default); rounded-rectangle when false. */
35
- this.rounded = input(true, { ...(ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
36
- /** Accessible name (recommended when the tag has no textual label). */
37
- this.ariaLabel = input(/* @ts-ignore */
38
- ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
39
- /** @ignore There is a textual label. */
40
- this.hasLabel = computed(() => !!this.label()?.length, /* @ts-ignore */
41
- ...(ngDevMode ? [{ debugName: "hasLabel" }] : /* istanbul ignore next */ []));
42
- /** @ignore At least one icon and no label. */
43
- this.isIconOnly = computed(() => (!!this.iconLeft() || !!this.iconRight()) && !this.hasLabel(), /* @ts-ignore */
44
- ...(ngDevMode ? [{ debugName: "isIconOnly" }] : /* istanbul ignore next */ []));
45
- /** @ignore Icon size derived from the tag size. */
46
- this.iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'md'), /* @ts-ignore */
47
- ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
48
- /** @ignore */
49
- this.classes = computed(() => {
50
- const c = ['ui-tag', `_${this.level()}`, `_${this.subLevel()}`];
51
- if (this.size() !== 'default')
52
- c.push(`_${this.size()}`);
53
- if (!this.rounded())
54
- c.push('_square');
55
- return c.join(' ');
56
- }, /* @ts-ignore */
57
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
58
- // A11y safeguard: an icon-only tag needs an accessible name.
59
- if (isDevMode()) {
60
- effect(() => {
61
- if (this.isIconOnly() && !this.ariaLabel()) {
62
- console.warn('[ui-tag] Tag has no text: provide `label` or `ariaLabel`.');
63
- }
64
- });
65
- }
66
- }
67
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiTag, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
68
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiTag, isStandalone: true, selector: "ui-tag", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, subLevel: { classPropertyName: "subLevel", publicName: "subLevel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span [class]=\"classes()\" [attr.role]=\"ariaLabel() ? 'img' : null\" [attr.aria-label]=\"ariaLabel() ?? null\">\n @if (iconLeft(); as name) {\n <ui-icon class=\"ui-tag-icon\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n @if (hasLabel()) {\n <span class=\"ui-tag-label\">{{ label() }}</span>\n }\n @if (iconRight(); as name) {\n <ui-icon class=\"ui-tag-icon\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n</span>\n", styles: [".ui-tag{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--ui-tag-padding-x, var(--units-sm));border:var(--ui-tag-stroke-width, var(--stroke-sm)) solid transparent;border-radius:var(--ui-tag-radius, var(--radius-full));font-family:var(--ui-tag-font-family, var(--fontfamily-base));font-weight:var(--ui-tag-weight, var(--weight-regular));line-height:1;white-space:nowrap;height:var(--ui-tag-height, var(--size-components-2xs));min-width:var(--ui-tag-height, var(--size-components-2xs));gap:var(--ui-tag-gap, var(--units-sm));font-size:var(--ui-tag-font-size, var(--size-typography-text-default))}.ui-tag-icon{line-height:0;flex:none}.ui-tag-label{display:inline-block}.ui-tag._square{border-radius:var(--ui-tag-radius-square, var(--radius-sm))}.ui-tag._small{height:var(--ui-tag-height-small, 22px);min-width:var(--ui-tag-height-small, 22px);gap:var(--ui-tag-gap-small, var(--units-xs));font-size:var(--ui-tag-font-size-small, var(--size-typography-text-md))}.ui-tag._default._high{background-color:var(--ui-tag-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-tag-color, var(--informative-defaulthigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-defaulthigh-stroke-default))}.ui-tag._default._low{background-color:var(--ui-tag-surface, var(--informative-defaultlow-surface-default));color:var(--ui-tag-color, var(--informative-defaultlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-defaultlow-stroke-default))}.ui-tag._highlight._high{background-color:var(--ui-tag-surface, var(--informative-highlighthigh-surface-default));color:var(--ui-tag-color, var(--informative-highlighthigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-highlighthigh-stroke-default))}.ui-tag._highlight._low{background-color:var(--ui-tag-surface, var(--informative-highlightlow-surface-default));color:var(--ui-tag-color, var(--informative-highlightlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-highlightlow-stroke-default))}.ui-tag._success._high{background-color:var(--ui-tag-surface, var(--informative-successhigh-surface-default));color:var(--ui-tag-color, var(--informative-successhigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-successhigh-stroke-default))}.ui-tag._success._low{background-color:var(--ui-tag-surface, var(--informative-successlow-surface-default));color:var(--ui-tag-color, var(--informative-successlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-successlow-stroke-default))}.ui-tag._warning._high{background-color:var(--ui-tag-surface, var(--informative-warninghigh-surface-default));color:var(--ui-tag-color, var(--informative-warninghigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-warninghigh-stroke-default))}.ui-tag._warning._low{background-color:var(--ui-tag-surface, var(--informative-warninglow-surface-default));color:var(--ui-tag-color, var(--informative-warninglow-content-default));border-color:var(--ui-tag-stroke, var(--informative-warninglow-stroke-default))}.ui-tag._error._high{background-color:var(--ui-tag-surface, var(--informative-errorhigh-surface-default));color:var(--ui-tag-color, var(--informative-errorhigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-errorhigh-stroke-default))}.ui-tag._error._low{background-color:var(--ui-tag-surface, var(--informative-errorlow-surface-default));color:var(--ui-tag-color, var(--informative-errorlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-errorlow-stroke-default))}\n"], dependencies: [{ kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
69
- }
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiTag, decorators: [{
71
- type: Component,
72
- args: [{ selector: 'ui-tag', imports: [UiIcon], template: "<span [class]=\"classes()\" [attr.role]=\"ariaLabel() ? 'img' : null\" [attr.aria-label]=\"ariaLabel() ?? null\">\n @if (iconLeft(); as name) {\n <ui-icon class=\"ui-tag-icon\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n @if (hasLabel()) {\n <span class=\"ui-tag-label\">{{ label() }}</span>\n }\n @if (iconRight(); as name) {\n <ui-icon class=\"ui-tag-icon\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n</span>\n", styles: [".ui-tag{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--ui-tag-padding-x, var(--units-sm));border:var(--ui-tag-stroke-width, var(--stroke-sm)) solid transparent;border-radius:var(--ui-tag-radius, var(--radius-full));font-family:var(--ui-tag-font-family, var(--fontfamily-base));font-weight:var(--ui-tag-weight, var(--weight-regular));line-height:1;white-space:nowrap;height:var(--ui-tag-height, var(--size-components-2xs));min-width:var(--ui-tag-height, var(--size-components-2xs));gap:var(--ui-tag-gap, var(--units-sm));font-size:var(--ui-tag-font-size, var(--size-typography-text-default))}.ui-tag-icon{line-height:0;flex:none}.ui-tag-label{display:inline-block}.ui-tag._square{border-radius:var(--ui-tag-radius-square, var(--radius-sm))}.ui-tag._small{height:var(--ui-tag-height-small, 22px);min-width:var(--ui-tag-height-small, 22px);gap:var(--ui-tag-gap-small, var(--units-xs));font-size:var(--ui-tag-font-size-small, var(--size-typography-text-md))}.ui-tag._default._high{background-color:var(--ui-tag-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-tag-color, var(--informative-defaulthigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-defaulthigh-stroke-default))}.ui-tag._default._low{background-color:var(--ui-tag-surface, var(--informative-defaultlow-surface-default));color:var(--ui-tag-color, var(--informative-defaultlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-defaultlow-stroke-default))}.ui-tag._highlight._high{background-color:var(--ui-tag-surface, var(--informative-highlighthigh-surface-default));color:var(--ui-tag-color, var(--informative-highlighthigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-highlighthigh-stroke-default))}.ui-tag._highlight._low{background-color:var(--ui-tag-surface, var(--informative-highlightlow-surface-default));color:var(--ui-tag-color, var(--informative-highlightlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-highlightlow-stroke-default))}.ui-tag._success._high{background-color:var(--ui-tag-surface, var(--informative-successhigh-surface-default));color:var(--ui-tag-color, var(--informative-successhigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-successhigh-stroke-default))}.ui-tag._success._low{background-color:var(--ui-tag-surface, var(--informative-successlow-surface-default));color:var(--ui-tag-color, var(--informative-successlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-successlow-stroke-default))}.ui-tag._warning._high{background-color:var(--ui-tag-surface, var(--informative-warninghigh-surface-default));color:var(--ui-tag-color, var(--informative-warninghigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-warninghigh-stroke-default))}.ui-tag._warning._low{background-color:var(--ui-tag-surface, var(--informative-warninglow-surface-default));color:var(--ui-tag-color, var(--informative-warninglow-content-default));border-color:var(--ui-tag-stroke, var(--informative-warninglow-stroke-default))}.ui-tag._error._high{background-color:var(--ui-tag-surface, var(--informative-errorhigh-surface-default));color:var(--ui-tag-color, var(--informative-errorhigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-errorhigh-stroke-default))}.ui-tag._error._low{background-color:var(--ui-tag-surface, var(--informative-errorlow-surface-default));color:var(--ui-tag-color, var(--informative-errorlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-errorlow-stroke-default))}\n"] }]
73
- }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], subLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "subLevel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], iconLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLeft", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
74
-
75
- /*
76
- * Public API Surface of ui-kit/ui-tag
77
- */
78
-
79
- /**
80
- * Generated bundle index. Do not edit.
81
- */
82
-
1
+ import * as i0 from "@angular/core";
2
+ import { Component, booleanAttribute, computed, effect, input, isDevMode } from "@angular/core";
3
+ import { UiIcon } from "@4sh/ui-kit/base/ui-icon";
4
+ var UiTag = class UiTag {
5
+ constructor() {
6
+ this.label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
7
+ this.level = input("default", ...ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []);
8
+ this.subLevel = input("high", ...ngDevMode ? [{ debugName: "subLevel" }] : /* istanbul ignore next */ []);
9
+ this.size = input("default", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
10
+ this.iconLeft = input(...ngDevMode ? [void 0, { debugName: "iconLeft" }] : /* istanbul ignore next */ []);
11
+ this.iconRight = input(...ngDevMode ? [void 0, { debugName: "iconRight" }] : /* istanbul ignore next */ []);
12
+ this.rounded = input(true, {
13
+ ...ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {},
14
+ transform: booleanAttribute
15
+ });
16
+ this.ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
17
+ this.hasLabel = computed(() => !!this.label()?.length, ...ngDevMode ? [{ debugName: "hasLabel" }] : /* istanbul ignore next */ []);
18
+ this.isIconOnly = computed(() => (!!this.iconLeft() || !!this.iconRight()) && !this.hasLabel(), ...ngDevMode ? [{ debugName: "isIconOnly" }] : /* istanbul ignore next */ []);
19
+ this.iconSize = computed(() => this.size() === "small" ? "sm" : "md", ...ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []);
20
+ this.classes = computed(() => {
21
+ const c = [
22
+ "ui-tag",
23
+ `_${this.level()}`,
24
+ `_${this.subLevel()}`
25
+ ];
26
+ if (this.size() !== "default") c.push(`_${this.size()}`);
27
+ if (!this.rounded()) c.push("_square");
28
+ return c.join(" ");
29
+ }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
30
+ if (isDevMode()) effect(() => {
31
+ if (this.isIconOnly() && !this.ariaLabel()) console.warn("[ui-tag] Tag has no text: provide `label` or `ariaLabel`.");
32
+ });
33
+ }
34
+ static {
35
+ this.ɵfac = i0.ɵɵngDeclareFactory({
36
+ minVersion: "12.0.0",
37
+ version: "22.3.0",
38
+ ngImport: i0,
39
+ type: UiTag,
40
+ deps: [],
41
+ target: i0.ɵɵFactoryTarget.Component
42
+ });
43
+ }
44
+ static {
45
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
46
+ minVersion: "17.0.0",
47
+ version: "22.3.0",
48
+ type: UiTag,
49
+ isStandalone: true,
50
+ selector: "ui-tag",
51
+ inputs: {
52
+ label: {
53
+ classPropertyName: "label",
54
+ publicName: "label",
55
+ isSignal: true,
56
+ isRequired: false,
57
+ transformFunction: null
58
+ },
59
+ level: {
60
+ classPropertyName: "level",
61
+ publicName: "level",
62
+ isSignal: true,
63
+ isRequired: false,
64
+ transformFunction: null
65
+ },
66
+ subLevel: {
67
+ classPropertyName: "subLevel",
68
+ publicName: "subLevel",
69
+ isSignal: true,
70
+ isRequired: false,
71
+ transformFunction: null
72
+ },
73
+ size: {
74
+ classPropertyName: "size",
75
+ publicName: "size",
76
+ isSignal: true,
77
+ isRequired: false,
78
+ transformFunction: null
79
+ },
80
+ iconLeft: {
81
+ classPropertyName: "iconLeft",
82
+ publicName: "iconLeft",
83
+ isSignal: true,
84
+ isRequired: false,
85
+ transformFunction: null
86
+ },
87
+ iconRight: {
88
+ classPropertyName: "iconRight",
89
+ publicName: "iconRight",
90
+ isSignal: true,
91
+ isRequired: false,
92
+ transformFunction: null
93
+ },
94
+ rounded: {
95
+ classPropertyName: "rounded",
96
+ publicName: "rounded",
97
+ isSignal: true,
98
+ isRequired: false,
99
+ transformFunction: null
100
+ },
101
+ ariaLabel: {
102
+ classPropertyName: "ariaLabel",
103
+ publicName: "ariaLabel",
104
+ isSignal: true,
105
+ isRequired: false,
106
+ transformFunction: null
107
+ }
108
+ },
109
+ ngImport: i0,
110
+ template: "<span [class]=\"classes()\" [attr.role]=\"ariaLabel() ? 'img' : null\" [attr.aria-label]=\"ariaLabel() ?? null\">\n @if (iconLeft(); as name) {\n <ui-icon class=\"ui-tag-icon\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n @if (hasLabel()) {\n <span class=\"ui-tag-label\">{{ label() }}</span>\n }\n @if (iconRight(); as name) {\n <ui-icon class=\"ui-tag-icon\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n</span>\n",
111
+ styles: [".ui-tag{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--ui-tag-padding-x, var(--units-sm));border:var(--ui-tag-stroke-width, var(--stroke-sm)) solid transparent;border-radius:var(--ui-tag-radius, var(--radius-full));font-family:var(--ui-tag-font-family, var(--fontfamily-base));font-weight:var(--ui-tag-weight, var(--weight-regular));line-height:1;white-space:nowrap;height:var(--ui-tag-height, var(--size-components-2xs));min-width:var(--ui-tag-height, var(--size-components-2xs));gap:var(--ui-tag-gap, var(--units-sm));font-size:var(--ui-tag-font-size, var(--size-typography-text-default))}.ui-tag-icon{line-height:0;flex:none}.ui-tag-label{display:inline-block}.ui-tag._square{border-radius:var(--ui-tag-radius-square, var(--radius-sm))}.ui-tag._small{height:var(--ui-tag-height-small, 22px);min-width:var(--ui-tag-height-small, 22px);gap:var(--ui-tag-gap-small, var(--units-xs));font-size:var(--ui-tag-font-size-small, var(--size-typography-text-md))}.ui-tag._default._high{background-color:var(--ui-tag-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-tag-color, var(--informative-defaulthigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-defaulthigh-stroke-default))}.ui-tag._default._low{background-color:var(--ui-tag-surface, var(--informative-defaultlow-surface-default));color:var(--ui-tag-color, var(--informative-defaultlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-defaultlow-stroke-default))}.ui-tag._highlight._high{background-color:var(--ui-tag-surface, var(--informative-highlighthigh-surface-default));color:var(--ui-tag-color, var(--informative-highlighthigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-highlighthigh-stroke-default))}.ui-tag._highlight._low{background-color:var(--ui-tag-surface, var(--informative-highlightlow-surface-default));color:var(--ui-tag-color, var(--informative-highlightlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-highlightlow-stroke-default))}.ui-tag._success._high{background-color:var(--ui-tag-surface, var(--informative-successhigh-surface-default));color:var(--ui-tag-color, var(--informative-successhigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-successhigh-stroke-default))}.ui-tag._success._low{background-color:var(--ui-tag-surface, var(--informative-successlow-surface-default));color:var(--ui-tag-color, var(--informative-successlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-successlow-stroke-default))}.ui-tag._warning._high{background-color:var(--ui-tag-surface, var(--informative-warninghigh-surface-default));color:var(--ui-tag-color, var(--informative-warninghigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-warninghigh-stroke-default))}.ui-tag._warning._low{background-color:var(--ui-tag-surface, var(--informative-warninglow-surface-default));color:var(--ui-tag-color, var(--informative-warninglow-content-default));border-color:var(--ui-tag-stroke, var(--informative-warninglow-stroke-default))}.ui-tag._error._high{background-color:var(--ui-tag-surface, var(--informative-errorhigh-surface-default));color:var(--ui-tag-color, var(--informative-errorhigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-errorhigh-stroke-default))}.ui-tag._error._low{background-color:var(--ui-tag-surface, var(--informative-errorlow-surface-default));color:var(--ui-tag-color, var(--informative-errorlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-errorlow-stroke-default))}\n"],
112
+ dependencies: [{
113
+ kind: "component",
114
+ type: UiIcon,
115
+ selector: "ui-icon",
116
+ inputs: [
117
+ "name",
118
+ "size",
119
+ "type",
120
+ "family",
121
+ "decorative",
122
+ "ariaLabel"
123
+ ]
124
+ }]
125
+ });
126
+ }
127
+ };
128
+ i0.ɵɵngDeclareClassMetadata({
129
+ minVersion: "12.0.0",
130
+ version: "22.3.0",
131
+ ngImport: i0,
132
+ type: UiTag,
133
+ decorators: [{
134
+ type: Component,
135
+ args: [{
136
+ selector: "ui-tag",
137
+ imports: [UiIcon],
138
+ template: "<span [class]=\"classes()\" [attr.role]=\"ariaLabel() ? 'img' : null\" [attr.aria-label]=\"ariaLabel() ?? null\">\n @if (iconLeft(); as name) {\n <ui-icon class=\"ui-tag-icon\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n @if (hasLabel()) {\n <span class=\"ui-tag-label\">{{ label() }}</span>\n }\n @if (iconRight(); as name) {\n <ui-icon class=\"ui-tag-icon\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n</span>\n",
139
+ styles: [".ui-tag{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--ui-tag-padding-x, var(--units-sm));border:var(--ui-tag-stroke-width, var(--stroke-sm)) solid transparent;border-radius:var(--ui-tag-radius, var(--radius-full));font-family:var(--ui-tag-font-family, var(--fontfamily-base));font-weight:var(--ui-tag-weight, var(--weight-regular));line-height:1;white-space:nowrap;height:var(--ui-tag-height, var(--size-components-2xs));min-width:var(--ui-tag-height, var(--size-components-2xs));gap:var(--ui-tag-gap, var(--units-sm));font-size:var(--ui-tag-font-size, var(--size-typography-text-default))}.ui-tag-icon{line-height:0;flex:none}.ui-tag-label{display:inline-block}.ui-tag._square{border-radius:var(--ui-tag-radius-square, var(--radius-sm))}.ui-tag._small{height:var(--ui-tag-height-small, 22px);min-width:var(--ui-tag-height-small, 22px);gap:var(--ui-tag-gap-small, var(--units-xs));font-size:var(--ui-tag-font-size-small, var(--size-typography-text-md))}.ui-tag._default._high{background-color:var(--ui-tag-surface, var(--informative-defaulthigh-surface-default));color:var(--ui-tag-color, var(--informative-defaulthigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-defaulthigh-stroke-default))}.ui-tag._default._low{background-color:var(--ui-tag-surface, var(--informative-defaultlow-surface-default));color:var(--ui-tag-color, var(--informative-defaultlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-defaultlow-stroke-default))}.ui-tag._highlight._high{background-color:var(--ui-tag-surface, var(--informative-highlighthigh-surface-default));color:var(--ui-tag-color, var(--informative-highlighthigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-highlighthigh-stroke-default))}.ui-tag._highlight._low{background-color:var(--ui-tag-surface, var(--informative-highlightlow-surface-default));color:var(--ui-tag-color, var(--informative-highlightlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-highlightlow-stroke-default))}.ui-tag._success._high{background-color:var(--ui-tag-surface, var(--informative-successhigh-surface-default));color:var(--ui-tag-color, var(--informative-successhigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-successhigh-stroke-default))}.ui-tag._success._low{background-color:var(--ui-tag-surface, var(--informative-successlow-surface-default));color:var(--ui-tag-color, var(--informative-successlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-successlow-stroke-default))}.ui-tag._warning._high{background-color:var(--ui-tag-surface, var(--informative-warninghigh-surface-default));color:var(--ui-tag-color, var(--informative-warninghigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-warninghigh-stroke-default))}.ui-tag._warning._low{background-color:var(--ui-tag-surface, var(--informative-warninglow-surface-default));color:var(--ui-tag-color, var(--informative-warninglow-content-default));border-color:var(--ui-tag-stroke, var(--informative-warninglow-stroke-default))}.ui-tag._error._high{background-color:var(--ui-tag-surface, var(--informative-errorhigh-surface-default));color:var(--ui-tag-color, var(--informative-errorhigh-content-default));border-color:var(--ui-tag-stroke, var(--informative-errorhigh-stroke-default))}.ui-tag._error._low{background-color:var(--ui-tag-surface, var(--informative-errorlow-surface-default));color:var(--ui-tag-color, var(--informative-errorlow-content-default));border-color:var(--ui-tag-stroke, var(--informative-errorlow-stroke-default))}\n"]
140
+ }]
141
+ }],
142
+ ctorParameters: () => [],
143
+ propDecorators: {
144
+ label: [{
145
+ type: i0.Input,
146
+ args: [{
147
+ isSignal: true,
148
+ alias: "label",
149
+ required: false
150
+ }]
151
+ }],
152
+ level: [{
153
+ type: i0.Input,
154
+ args: [{
155
+ isSignal: true,
156
+ alias: "level",
157
+ required: false
158
+ }]
159
+ }],
160
+ subLevel: [{
161
+ type: i0.Input,
162
+ args: [{
163
+ isSignal: true,
164
+ alias: "subLevel",
165
+ required: false
166
+ }]
167
+ }],
168
+ size: [{
169
+ type: i0.Input,
170
+ args: [{
171
+ isSignal: true,
172
+ alias: "size",
173
+ required: false
174
+ }]
175
+ }],
176
+ iconLeft: [{
177
+ type: i0.Input,
178
+ args: [{
179
+ isSignal: true,
180
+ alias: "iconLeft",
181
+ required: false
182
+ }]
183
+ }],
184
+ iconRight: [{
185
+ type: i0.Input,
186
+ args: [{
187
+ isSignal: true,
188
+ alias: "iconRight",
189
+ required: false
190
+ }]
191
+ }],
192
+ rounded: [{
193
+ type: i0.Input,
194
+ args: [{
195
+ isSignal: true,
196
+ alias: "rounded",
197
+ required: false
198
+ }]
199
+ }],
200
+ ariaLabel: [{
201
+ type: i0.Input,
202
+ args: [{
203
+ isSignal: true,
204
+ alias: "ariaLabel",
205
+ required: false
206
+ }]
207
+ }]
208
+ }
209
+ });
83
210
  export { UiTag };
84
- //# sourceMappingURL=4sh-ui-kit-informative-ui-tag.mjs.map
211
+
212
+ //# sourceMappingURL=4sh-ui-kit-informative-ui-tag.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"4sh-ui-kit-informative-ui-tag.mjs","sources":["../../../projects/ui-kit/informative/ui-tag/src/lib/ui-tag.ts","../../../projects/ui-kit/informative/ui-tag/src/lib/ui-tag.html","../../../projects/ui-kit/informative/ui-tag/src/public-api.ts","../../../projects/ui-kit/informative/ui-tag/src/4sh-ui-kit-informative-ui-tag.ts"],"sourcesContent":["import { booleanAttribute, Component, computed, effect, input, isDevMode } from '@angular/core';\nimport { UiIcon, UiIconSize } from '@4sh/ui-kit/base/ui-icon';\nimport { UiFeedbackLevel, UiSubLevel } from '@4sh/ui-kit/types';\n\nexport type TagSize = 'default' | 'small';\n\n/**\n * ui-tag — informative label / status pill.\n *\n * design system: `level` × `subLevel` (informative color families) instead of a\n * flat `severity`, an optional icon on each side, and a pill/square shape.\n *\n * Fully token-driven (like `ui-badge`) — the color families are the built-in\n * customization surface; no per-component CSS hooks.\n */\n@Component({\n selector: 'ui-tag',\n imports: [UiIcon],\n templateUrl: './ui-tag.html',\n styleUrl: './ui-tag.scss',\n})\nexport class UiTag {\n /** Text content of the tag. */\n label = input<string>();\n /** Color family. */\n level = input<UiFeedbackLevel>('default');\n /** Intensity: high (solid) or low (subtle). */\n subLevel = input<UiSubLevel>('high');\n /** Size. */\n size = input<TagSize>('default');\n /** FontAwesome name of the leading icon (optional). */\n iconLeft = input<string>();\n /** FontAwesome name of the trailing icon (optional). */\n iconRight = input<string>();\n /** Pill shape when true (default); rounded-rectangle when false. */\n rounded = input(true, { transform: booleanAttribute });\n /** Accessible name (recommended when the tag has no textual label). */\n ariaLabel = input<string>();\n\n constructor() {\n // A11y safeguard: an icon-only tag needs an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (this.isIconOnly() && !this.ariaLabel()) {\n console.warn('[ui-tag] Tag has no text: provide `label` or `ariaLabel`.');\n }\n });\n }\n }\n\n /** @ignore There is a textual label. */\n protected readonly hasLabel = computed(() => !!this.label()?.length);\n\n /** @ignore At least one icon and no label. */\n protected readonly isIconOnly = computed(\n () => (!!this.iconLeft() || !!this.iconRight()) && !this.hasLabel(),\n );\n\n /** @ignore Icon size derived from the tag size. */\n protected readonly iconSize = computed<UiIconSize>(() => (this.size() === 'small' ? 'sm' : 'md'));\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-tag', `_${this.level()}`, `_${this.subLevel()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (!this.rounded()) c.push('_square');\n return c.join(' ');\n });\n}\n","<span [class]=\"classes()\" [attr.role]=\"ariaLabel() ? 'img' : null\" [attr.aria-label]=\"ariaLabel() ?? null\">\n @if (iconLeft(); as name) {\n <ui-icon class=\"ui-tag-icon\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n @if (hasLabel()) {\n <span class=\"ui-tag-label\">{{ label() }}</span>\n }\n @if (iconRight(); as name) {\n <ui-icon class=\"ui-tag-icon\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n</span>\n","/*\n * Public API Surface of ui-kit/ui-tag\n */\n\nexport * from './lib/ui-tag';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAMA;;;;;;;;AAQG;MAOU,KAAK,CAAA;AAkBhB,IAAA,WAAA,GAAA;;AAhBA,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAU;;QAEvB,IAAA,CAAA,KAAK,GAAG,KAAK,CAAkB,SAAS;kFAAC;;QA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AA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECrBlB,mbAWA,EAAA,MAAA,EAAA,CAAA,yjHAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDMY,MAAM,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,YAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAIL,KAAK,EAAA,UAAA,EAAA,CAAA;kBANjB,SAAS;+BACE,QAAQ,EAAA,OAAA,EACT,CAAC,MAAM,CAAC,EAAA,QAAA,EAAA,mbAAA,EAAA,MAAA,EAAA,CAAA,yjHAAA,CAAA,EAAA;;;AEjBnB;;AAEG;;ACFH;;AAEG;;"}
1
+ {"version":3,"file":"4sh-ui-kit-informative-ui-tag.mjs","names":[],"sources":["../../../projects/ui-kit/informative/ui-tag/src/lib/ui-tag.ts","../../../projects/ui-kit/informative/ui-tag/src/lib/ui-tag.html"],"sourcesContent":["import { booleanAttribute, Component, computed, effect, input, isDevMode } from '@angular/core';\nimport { UiIcon, UiIconSize } from '@4sh/ui-kit/base/ui-icon';\nimport { UiFeedbackLevel, UiSubLevel } from '@4sh/ui-kit/types';\n\nexport type TagSize = 'default' | 'small';\n\n/**\n * ui-tag — informative label / status pill.\n *\n * design system: `level` × `subLevel` (informative color families) instead of a\n * flat `severity`, an optional icon on each side, and a pill/square shape.\n *\n * Fully token-driven (like `ui-badge`) — the color families are the built-in\n * customization surface; no per-component CSS hooks.\n */\n@Component({\n selector: 'ui-tag',\n imports: [UiIcon],\n templateUrl: './ui-tag.html',\n styleUrl: './ui-tag.scss',\n})\nexport class UiTag {\n /** Text content of the tag. */\n label = input<string>();\n /** Color family. */\n level = input<UiFeedbackLevel>('default');\n /** Intensity: high (solid) or low (subtle). */\n subLevel = input<UiSubLevel>('high');\n /** Size. */\n size = input<TagSize>('default');\n /** FontAwesome name of the leading icon (optional). */\n iconLeft = input<string>();\n /** FontAwesome name of the trailing icon (optional). */\n iconRight = input<string>();\n /** Pill shape when true (default); rounded-rectangle when false. */\n rounded = input(true, { transform: booleanAttribute });\n /** Accessible name (recommended when the tag has no textual label). */\n ariaLabel = input<string>();\n\n constructor() {\n // A11y safeguard: an icon-only tag needs an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (this.isIconOnly() && !this.ariaLabel()) {\n console.warn('[ui-tag] Tag has no text: provide `label` or `ariaLabel`.');\n }\n });\n }\n }\n\n /** @ignore There is a textual label. */\n protected readonly hasLabel = computed(() => !!this.label()?.length);\n\n /** @ignore At least one icon and no label. */\n protected readonly isIconOnly = computed(\n () => (!!this.iconLeft() || !!this.iconRight()) && !this.hasLabel(),\n );\n\n /** @ignore Icon size derived from the tag size. */\n protected readonly iconSize = computed<UiIconSize>(() => (this.size() === 'small' ? 'sm' : 'md'));\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-tag', `_${this.level()}`, `_${this.subLevel()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (!this.rounded()) c.push('_square');\n return c.join(' ');\n });\n}\n","<span [class]=\"classes()\" [attr.role]=\"ariaLabel() ? 'img' : null\" [attr.aria-label]=\"ariaLabel() ?? null\">\n @if (iconLeft(); as name) {\n <ui-icon class=\"ui-tag-icon\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n @if (hasLabel()) {\n <span class=\"ui-tag-label\">{{ label() }}</span>\n }\n @if (iconRight(); as name) {\n <ui-icon class=\"ui-tag-icon\" [name]=\"name\" [size]=\"iconSize()\" />\n }\n</span>\n"],"mappings":";;;AAqBA,IAAa,QAAb,MAAa,MAAK;CAkBhB,cAAA;EAhBA,KAAA,QAAQ,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAEvB,KAAA,QAAQ,MAAuB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAEzC,KAAA,WAAW,MAAkB,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAEpC,KAAA,OAAO,MAAe,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAEhC,KAAA,WAAW,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAE1B,KAAA,YAAY,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EAE3B,KAAA,UAAU,MAAM,MAAI;GAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;GAAI,WAAW;EAAgB,CAAA;EAEnD,KAAA,YAAY,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EAcR,KAAA,WAAW,eAAe,CAAC,CAAC,KAAK,MAAK,CAAE,EAAE,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAGjD,KAAA,aAAa,gBACvB,CAAC,CAAC,KAAK,SAAQ,KAAM,C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