@chayns-ui/core 0.9.4 → 0.10.0

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 (210) hide show
  1. package/dist/accordion.css +3 -1
  2. package/dist/badge.css +28 -3
  3. package/dist/banner.css +2 -0
  4. package/dist/breadcrumb.css +63 -0
  5. package/dist/button.css +103 -35
  6. package/dist/card.css +39 -0
  7. package/dist/checkbox.css +3 -3
  8. package/dist/combo-box.css +2 -0
  9. package/dist/components/accordion/Accordion.d.ts +3 -4
  10. package/dist/components/accordion/Accordion.d.ts.map +1 -1
  11. package/dist/components/accordion/Accordion.js +37 -23
  12. package/dist/components/accordion/Accordion.js.map +1 -1
  13. package/dist/components/accordion/Accordion.types.d.ts +7 -2
  14. package/dist/components/accordion/Accordion.types.d.ts.map +1 -1
  15. package/dist/components/accordion/Accordion.types.js +7 -1
  16. package/dist/components/accordion/Accordion.types.js.map +1 -1
  17. package/dist/components/accordion-group/AccordionGroup.d.ts.map +1 -1
  18. package/dist/components/accordion-group/AccordionGroup.js +1 -0
  19. package/dist/components/accordion-group/AccordionGroup.js.map +1 -1
  20. package/dist/components/avatar/Avatar.d.ts.map +1 -1
  21. package/dist/components/avatar/Avatar.js +1 -0
  22. package/dist/components/avatar/Avatar.js.map +1 -1
  23. package/dist/components/avatar/Avatar.types.d.ts +9 -1
  24. package/dist/components/avatar/Avatar.types.d.ts.map +1 -1
  25. package/dist/components/avatar/Avatar.types.js +17 -0
  26. package/dist/components/avatar/Avatar.types.js.map +1 -0
  27. package/dist/components/avatar-group/AvatarGroup.d.ts.map +1 -1
  28. package/dist/components/avatar-group/AvatarGroup.js +4 -3
  29. package/dist/components/avatar-group/AvatarGroup.js.map +1 -1
  30. package/dist/components/badge/Badge.d.ts.map +1 -1
  31. package/dist/components/badge/Badge.js +1 -0
  32. package/dist/components/badge/Badge.js.map +1 -1
  33. package/dist/components/badge/Badge.types.d.ts +13 -0
  34. package/dist/components/badge/Badge.types.d.ts.map +1 -1
  35. package/dist/components/badge/Badge.types.js +16 -1
  36. package/dist/components/badge/Badge.types.js.map +1 -1
  37. package/dist/components/banner/Banner.d.ts.map +1 -1
  38. package/dist/components/banner/Banner.js +1 -0
  39. package/dist/components/banner/Banner.js.map +1 -1
  40. package/dist/components/banner/Banner.types.d.ts +7 -0
  41. package/dist/components/banner/Banner.types.d.ts.map +1 -1
  42. package/dist/components/banner/Banner.types.js +9 -1
  43. package/dist/components/banner/Banner.types.js.map +1 -1
  44. package/dist/components/breadcrumb/Breadcrumb.d.ts +4 -0
  45. package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -0
  46. package/dist/components/breadcrumb/Breadcrumb.js +35 -0
  47. package/dist/components/breadcrumb/Breadcrumb.js.map +1 -0
  48. package/dist/components/breadcrumb/Breadcrumb.types.d.ts +13 -0
  49. package/dist/components/breadcrumb/Breadcrumb.types.d.ts.map +1 -0
  50. package/dist/components/button/Button.d.ts.map +1 -1
  51. package/dist/components/button/Button.js +1 -0
  52. package/dist/components/button/Button.js.map +1 -1
  53. package/dist/components/button/Button.types.d.ts +7 -0
  54. package/dist/components/button/Button.types.d.ts.map +1 -1
  55. package/dist/components/button/Button.types.js +9 -1
  56. package/dist/components/button/Button.types.js.map +1 -1
  57. package/dist/components/button/button-icon/ButtonIcon.d.ts.map +1 -1
  58. package/dist/components/button/button-icon/ButtonIcon.js +7 -3
  59. package/dist/components/button/button-icon/ButtonIcon.js.map +1 -1
  60. package/dist/components/card/Card.d.ts.map +1 -1
  61. package/dist/components/card/Card.js +2 -0
  62. package/dist/components/card/Card.js.map +1 -1
  63. package/dist/components/checkbox/Checkbox.d.ts.map +1 -1
  64. package/dist/components/checkbox/Checkbox.js +1 -0
  65. package/dist/components/checkbox/Checkbox.js.map +1 -1
  66. package/dist/components/combo-box/ComboBox.d.ts.map +1 -1
  67. package/dist/components/combo-box/ComboBox.js +27 -8
  68. package/dist/components/combo-box/ComboBox.js.map +1 -1
  69. package/dist/components/date-time-picker/DateTimePicker.d.ts.map +1 -1
  70. package/dist/components/date-time-picker/DateTimePicker.js +31 -239
  71. package/dist/components/date-time-picker/DateTimePicker.js.map +1 -1
  72. package/dist/components/date-time-picker/DateTimePicker.types.d.ts +12 -0
  73. package/dist/components/date-time-picker/DateTimePicker.types.d.ts.map +1 -1
  74. package/dist/components/date-time-picker/DateTimePicker.types.js +15 -1
  75. package/dist/components/date-time-picker/DateTimePicker.types.js.map +1 -1
  76. package/dist/components/date-time-picker/date-time-picker-utils.d.ts +4 -0
  77. package/dist/components/date-time-picker/date-time-picker-utils.d.ts.map +1 -0
  78. package/dist/components/date-time-picker/date-time-picker-utils.js +19 -0
  79. package/dist/components/date-time-picker/date-time-picker-utils.js.map +1 -0
  80. package/dist/components/date-time-picker/hooks/useDateTimePickerValue.d.ts +37 -0
  81. package/dist/components/date-time-picker/hooks/useDateTimePickerValue.d.ts.map +1 -0
  82. package/dist/components/date-time-picker/hooks/useDateTimePickerValue.js +156 -0
  83. package/dist/components/date-time-picker/hooks/useDateTimePickerValue.js.map +1 -0
  84. package/dist/components/date-time-picker/sizer/PickerSizer.d.ts +7 -0
  85. package/dist/components/date-time-picker/sizer/PickerSizer.d.ts.map +1 -0
  86. package/dist/components/date-time-picker/sizer/PickerSizer.js +15 -0
  87. package/dist/components/date-time-picker/sizer/PickerSizer.js.map +1 -0
  88. package/dist/components/date-time-picker/wheel/Wheel.d.ts +14 -0
  89. package/dist/components/date-time-picker/wheel/Wheel.d.ts.map +1 -0
  90. package/dist/components/date-time-picker/wheel/Wheel.js +136 -0
  91. package/dist/components/date-time-picker/wheel/Wheel.js.map +1 -0
  92. package/dist/components/icon-button/IconButton.d.ts.map +1 -1
  93. package/dist/components/icon-button/IconButton.js +1 -0
  94. package/dist/components/icon-button/IconButton.js.map +1 -1
  95. package/dist/components/list/List.d.ts +15 -10
  96. package/dist/components/list/List.d.ts.map +1 -1
  97. package/dist/components/list/List.js +19 -7
  98. package/dist/components/list/List.js.map +1 -1
  99. package/dist/components/list/List.types.d.ts +2 -2
  100. package/dist/components/list/List.types.d.ts.map +1 -1
  101. package/dist/components/pagination/Pagination.d.ts +4 -0
  102. package/dist/components/pagination/Pagination.d.ts.map +1 -0
  103. package/dist/components/pagination/Pagination.js +57 -0
  104. package/dist/components/pagination/Pagination.js.map +1 -0
  105. package/dist/components/pagination/Pagination.types.d.ts +15 -0
  106. package/dist/components/pagination/Pagination.types.d.ts.map +1 -0
  107. package/dist/components/pagination/pagination-pages.d.ts +2 -0
  108. package/dist/components/pagination/pagination-pages.d.ts.map +1 -0
  109. package/dist/components/pagination/pagination-pages.js +35 -0
  110. package/dist/components/pagination/pagination-pages.js.map +1 -0
  111. package/dist/components/popup/Popup.d.ts +4 -1
  112. package/dist/components/popup/Popup.d.ts.map +1 -1
  113. package/dist/components/popup/Popup.js +25 -18
  114. package/dist/components/popup/Popup.js.map +1 -1
  115. package/dist/components/popup/PopupList.d.ts +4 -1
  116. package/dist/components/popup/PopupList.d.ts.map +1 -1
  117. package/dist/components/popup/PopupList.js +7 -1
  118. package/dist/components/popup/PopupList.js.map +1 -1
  119. package/dist/components/progress/Progress.d.ts.map +1 -1
  120. package/dist/components/progress/Progress.js +1 -0
  121. package/dist/components/progress/Progress.js.map +1 -1
  122. package/dist/components/progress/Progress.types.d.ts +1 -1
  123. package/dist/components/progress/Progress.types.d.ts.map +1 -1
  124. package/dist/components/radio-group/RadioGroup.d.ts.map +1 -1
  125. package/dist/components/radio-group/RadioGroup.js +2 -0
  126. package/dist/components/radio-group/RadioGroup.js.map +1 -1
  127. package/dist/components/segmented-control/SegmentedControl.d.ts.map +1 -1
  128. package/dist/components/segmented-control/SegmentedControl.js +78 -25
  129. package/dist/components/segmented-control/SegmentedControl.js.map +1 -1
  130. package/dist/components/segmented-control/SegmentedControl.types.d.ts +1 -1
  131. package/dist/components/segmented-control/SegmentedControl.types.d.ts.map +1 -1
  132. package/dist/components/segmented-control/SegmentedControlContext.d.ts +2 -0
  133. package/dist/components/segmented-control/SegmentedControlContext.d.ts.map +1 -1
  134. package/dist/components/segmented-control/SegmentedControlContext.js.map +1 -1
  135. package/dist/components/skeleton/Skeleton.d.ts.map +1 -1
  136. package/dist/components/skeleton/Skeleton.js +1 -0
  137. package/dist/components/skeleton/Skeleton.js.map +1 -1
  138. package/dist/components/skeleton/Skeleton.types.d.ts +6 -0
  139. package/dist/components/skeleton/Skeleton.types.d.ts.map +1 -1
  140. package/dist/components/skeleton/Skeleton.types.js +8 -1
  141. package/dist/components/skeleton/Skeleton.types.js.map +1 -1
  142. package/dist/components/slider/Slider.d.ts +4 -0
  143. package/dist/components/slider/Slider.d.ts.map +1 -0
  144. package/dist/components/slider/Slider.js +61 -0
  145. package/dist/components/slider/Slider.js.map +1 -0
  146. package/dist/components/slider/Slider.types.d.ts +10 -0
  147. package/dist/components/slider/Slider.types.d.ts.map +1 -0
  148. package/dist/components/spinner/Spinner.d.ts.map +1 -1
  149. package/dist/components/spinner/Spinner.js +1 -0
  150. package/dist/components/spinner/Spinner.js.map +1 -1
  151. package/dist/components/split-button/SplitButton.d.ts.map +1 -1
  152. package/dist/components/split-button/SplitButton.js +2 -1
  153. package/dist/components/split-button/SplitButton.js.map +1 -1
  154. package/dist/components/stepper/Stepper.d.ts +4 -0
  155. package/dist/components/stepper/Stepper.d.ts.map +1 -0
  156. package/dist/components/stepper/Stepper.js +60 -0
  157. package/dist/components/stepper/Stepper.js.map +1 -0
  158. package/dist/components/stepper/Stepper.types.d.ts +27 -0
  159. package/dist/components/stepper/Stepper.types.d.ts.map +1 -0
  160. package/dist/components/stepper/Stepper.types.js +25 -0
  161. package/dist/components/stepper/Stepper.types.js.map +1 -0
  162. package/dist/components/stepper/stepper-values.d.ts +6 -0
  163. package/dist/components/stepper/stepper-values.d.ts.map +1 -0
  164. package/dist/components/stepper/stepper-values.js +26 -0
  165. package/dist/components/stepper/stepper-values.js.map +1 -0
  166. package/dist/components/switch/Switch.d.ts.map +1 -1
  167. package/dist/components/switch/Switch.js +1 -0
  168. package/dist/components/switch/Switch.js.map +1 -1
  169. package/dist/components/text-area/TextArea.d.ts.map +1 -1
  170. package/dist/components/text-area/TextArea.js +1 -0
  171. package/dist/components/text-area/TextArea.js.map +1 -1
  172. package/dist/components/text-field/TextField.d.ts.map +1 -1
  173. package/dist/components/text-field/TextField.js +1 -0
  174. package/dist/components/text-field/TextField.js.map +1 -1
  175. package/dist/components/tooltip/Tooltip.d.ts +4 -0
  176. package/dist/components/tooltip/Tooltip.d.ts.map +1 -0
  177. package/dist/components/tooltip/Tooltip.js +75 -0
  178. package/dist/components/tooltip/Tooltip.js.map +1 -0
  179. package/dist/components/tooltip/Tooltip.types.d.ts +12 -0
  180. package/dist/components/tooltip/Tooltip.types.d.ts.map +1 -0
  181. package/dist/components/tooltip/hooks/useTooltipInteraction.d.ts +11 -0
  182. package/dist/components/tooltip/hooks/useTooltipInteraction.d.ts.map +1 -0
  183. package/dist/components/tooltip/hooks/useTooltipInteraction.js +59 -0
  184. package/dist/components/tooltip/hooks/useTooltipInteraction.js.map +1 -0
  185. package/dist/components/tooltip/tooltip-trigger-props.d.ts +4 -0
  186. package/dist/components/tooltip/tooltip-trigger-props.d.ts.map +1 -0
  187. package/dist/components/tooltip/tooltip-trigger-props.js +25 -0
  188. package/dist/components/tooltip/tooltip-trigger-props.js.map +1 -0
  189. package/dist/date-time-picker.css +33 -2
  190. package/dist/hooks/useOverlayPosition.d.ts +4 -0
  191. package/dist/hooks/useOverlayPosition.d.ts.map +1 -0
  192. package/dist/hooks/useOverlayPosition.js +60 -0
  193. package/dist/hooks/useOverlayPosition.js.map +1 -0
  194. package/dist/index.d.ts +21 -7
  195. package/dist/index.d.ts.map +1 -1
  196. package/dist/index.js +14 -7
  197. package/dist/pagination.css +54 -0
  198. package/dist/popup.css +4 -0
  199. package/dist/progress.css +1 -1
  200. package/dist/segmented-control.css +2 -0
  201. package/dist/slider.css +109 -0
  202. package/dist/split-button.css +2 -79
  203. package/dist/stepper.css +77 -0
  204. package/dist/styles.css +5 -0
  205. package/dist/tooltip.css +68 -0
  206. package/dist/utils/native-ref.d.ts +4 -0
  207. package/dist/utils/native-ref.d.ts.map +1 -0
  208. package/dist/utils/native-ref.js +24 -0
  209. package/dist/utils/native-ref.js.map +1 -0
  210. package/package.json +7 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.types.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/Accordion.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,eAAO,MAAM,qBAAqB,8BAA+B,CAAC;AAClE,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE;;;;;;GAMG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,qBAAqB,CAAC,KAAK,CAAC,EAC5B,UAAU,GAAG,IAAI,GAAG,OAAO,CAC5B;IACC;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,wEAAwE;IACxE,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB,oEAAoE;IACpE,UAAU,CAAC,EAAE,mBAAmB,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACzF;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAE/C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;IAC3F,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC3F,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
1
+ {"version":3,"file":"Accordion.types.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/Accordion.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,2FAA2F;AAC3F,oBAAY,oBAAoB;IAC9B,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AAED,eAAO,MAAM,qBAAqB,8BAA+B,CAAC;AAClE,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE;;;;;;GAMG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,qBAAqB,CAAC,KAAK,CAAC,EAC5B,UAAU,GAAG,IAAI,GAAG,OAAO,CAC5B;IACC;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,wEAAwE;IACxE,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB,oEAAoE;IACpE,UAAU,CAAC,EAAE,mBAAmB,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACzF;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAE/C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;IAC3F,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CACrD,qBAAqB,CAAC,MAAM,CAAC,EAC7B,OAAO,GAAG,UAAU,CACrB;IACC,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB,CAAC,MAAM,CAAC;IACvE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC3F,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
@@ -1,6 +1,12 @@
1
1
  //#region src/components/accordion/Accordion.types.ts
2
+ /** Named configuration values; existing literal props and value lists remain supported. */
3
+ var AccordionAppearances = /* @__PURE__ */ function(AccordionAppearances) {
4
+ AccordionAppearances["Default"] = "default";
5
+ AccordionAppearances["List"] = "list";
6
+ return AccordionAppearances;
7
+ }({});
2
8
  var ACCORDION_APPEARANCES = ["default", "list"];
3
9
  //#endregion
4
- export { ACCORDION_APPEARANCES };
10
+ export { ACCORDION_APPEARANCES, AccordionAppearances };
5
11
 
6
12
  //# sourceMappingURL=Accordion.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.types.js","names":[],"sources":["../../../src/components/accordion/Accordion.types.ts"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from 'react';\n\nexport const ACCORDION_APPEARANCES = ['default', 'list'] as const;\nexport type AccordionAppearance = (typeof ACCORDION_APPEARANCES)[number];\n\n/**\n * @description Props for a single disclosure accordion: a header button that\n * expands and collapses an associated content region. Nesting an `Accordion`\n * inside another `Accordion`'s content is automatically detected via React\n * context and rendered as the \"Wrapped\" presentation — there is no separate\n * component or prop for that case.\n */\nexport interface AccordionProps extends Omit<\n ComponentPropsWithRef<'div'>,\n 'children' | 'id' | 'title'\n> {\n /**\n * @description Visible, localized header label used as the accordion's\n * accessible name.\n */\n title?: ReactNode;\n\n /** Optional second line used by the list presentation. */\n subtitle?: ReactNode;\n\n /** Optional leading image or icon used by list-style accordion rows. */\n leading?: ReactNode;\n\n /** Selects the compact two-line list presentation from Bodywork. */\n appearance?: AccordionAppearance;\n\n /**\n * @description Panel content revealed when the accordion is open.\n */\n children?: ReactNode;\n\n /**\n * @description Controlled open state. Ignored when the accordion is\n * rendered inside an `AccordionGroup`, which owns exclusivity instead.\n */\n open?: boolean;\n\n /**\n * @description Uncontrolled initial open state. Ignored when inside an\n * `AccordionGroup`.\n * @default false\n */\n defaultOpen?: boolean;\n\n /**\n * @description Called with the next open state on user toggle, for both\n * the controlled and uncontrolled usage.\n */\n onOpenChange?: (open: boolean) => void;\n\n /**\n * @description Disables the header trigger, preventing toggling.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * @description Stable id used to wire the header and panel via ARIA and,\n * inside an `AccordionGroup`, to identify this item. Falls back to a\n * generated id when omitted.\n */\n id?: string;\n\n /**\n * @description Additional class names appended to the accordion root\n * element.\n */\n className?: string;\n}\n\n/**\n * @description Props for a group of mutually exclusive accordions: at most\n * one child `Accordion` is open at a time, and the group renders its\n * children as one joined surface.\n */\nexport interface AccordionGroupProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {\n /**\n * @description `Accordion` items belonging to the group.\n */\n children?: ReactNode;\n\n /**\n * @description Controlled id of the currently open item, or `null` when\n * all items are closed.\n */\n openId?: string | null;\n\n /**\n * @description Uncontrolled id of the initially open item.\n * @default null\n */\n defaultOpenId?: string | null;\n\n /**\n * @description Called with the next open item id, or `null` when the group\n * closes entirely, for both the controlled and uncontrolled usage.\n */\n onOpenChange?: (openId: string | null) => void;\n\n /**\n * @description Additional class names appended to the group root element.\n */\n className?: string;\n}\n\nexport interface AccordionHeadProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {\n children?: ReactNode;\n}\n\nexport interface AccordionHeadContentProps {\n title: ReactNode;\n subtitle?: ReactNode;\n className?: string;\n}\n\nexport interface AccordionPartProps {\n children?: ReactNode;\n className?: string;\n}\n\nexport interface AccordionContentProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {\n children?: ReactNode;\n}\n"],"mappings":";AAEA,IAAa,wBAAwB,CAAC,WAAW,MAAM"}
1
+ {"version":3,"file":"Accordion.types.js","names":[],"sources":["../../../src/components/accordion/Accordion.types.ts"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from 'react';\n\n/** Named configuration values; existing literal props and value lists remain supported. */\nexport enum AccordionAppearances {\n Default = 'default',\n List = 'list',\n}\n\nexport const ACCORDION_APPEARANCES = ['default', 'list'] as const;\nexport type AccordionAppearance = (typeof ACCORDION_APPEARANCES)[number];\n\n/**\n * @description Props for a single disclosure accordion: a header button that\n * expands and collapses an associated content region. Nesting an `Accordion`\n * inside another `Accordion`'s content is automatically detected via React\n * context and rendered as the \"Wrapped\" presentation — there is no separate\n * component or prop for that case.\n */\nexport interface AccordionProps extends Omit<\n ComponentPropsWithRef<'div'>,\n 'children' | 'id' | 'title'\n> {\n /**\n * @description Visible, localized header label used as the accordion's\n * accessible name.\n */\n title?: ReactNode;\n\n /** Optional second line used by the list presentation. */\n subtitle?: ReactNode;\n\n /** Optional leading image or icon used by list-style accordion rows. */\n leading?: ReactNode;\n\n /** Selects the compact two-line list presentation from Bodywork. */\n appearance?: AccordionAppearance;\n\n /**\n * @description Panel content revealed when the accordion is open.\n */\n children?: ReactNode;\n\n /**\n * @description Controlled open state. Ignored when the accordion is\n * rendered inside an `AccordionGroup`, which owns exclusivity instead.\n */\n open?: boolean;\n\n /**\n * @description Uncontrolled initial open state. Ignored when inside an\n * `AccordionGroup`.\n * @default false\n */\n defaultOpen?: boolean;\n\n /**\n * @description Called with the next open state on user toggle, for both\n * the controlled and uncontrolled usage.\n */\n onOpenChange?: (open: boolean) => void;\n\n /**\n * @description Disables the header trigger, preventing toggling.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * @description Stable id used to wire the header and panel via ARIA and,\n * inside an `AccordionGroup`, to identify this item. Falls back to a\n * generated id when omitted.\n */\n id?: string;\n\n /**\n * @description Additional class names appended to the accordion root\n * element.\n */\n className?: string;\n}\n\n/**\n * @description Props for a group of mutually exclusive accordions: at most\n * one child `Accordion` is open at a time, and the group renders its\n * children as one joined surface.\n */\nexport interface AccordionGroupProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {\n /**\n * @description `Accordion` items belonging to the group.\n */\n children?: ReactNode;\n\n /**\n * @description Controlled id of the currently open item, or `null` when\n * all items are closed.\n */\n openId?: string | null;\n\n /**\n * @description Uncontrolled id of the initially open item.\n * @default null\n */\n defaultOpenId?: string | null;\n\n /**\n * @description Called with the next open item id, or `null` when the group\n * closes entirely, for both the controlled and uncontrolled usage.\n */\n onOpenChange?: (openId: string | null) => void;\n\n /**\n * @description Additional class names appended to the group root element.\n */\n className?: string;\n}\n\nexport interface AccordionHeadProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {\n children?: ReactNode;\n}\n\nexport interface AccordionHeadContentProps extends Omit<\n ComponentPropsWithRef<'span'>,\n 'title' | 'children'\n> {\n title: ReactNode;\n subtitle?: ReactNode;\n className?: string;\n}\n\nexport interface AccordionPartProps extends ComponentPropsWithRef<'span'> {\n children?: ReactNode;\n className?: string;\n}\n\nexport interface AccordionContentProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {\n children?: ReactNode;\n}\n"],"mappings":";;AAGA,IAAY,uBAAL,yBAAA,sBAAA;CACL,qBAAA,aAAA;CACA,qBAAA,UAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAa,wBAAwB,CAAC,WAAW,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionGroup.d.ts","sourceRoot":"","sources":["../../../src/components/accordion-group/AccordionGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,QAAA,MAAM,cAAc,6HAkClB,CAAC;AAEH,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"AccordionGroup.d.ts","sourceRoot":"","sources":["../../../src/components/accordion-group/AccordionGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,QAAA,MAAM,cAAc,6HAkClB,CAAC;AAIH,eAAe,cAAc,CAAC"}
@@ -31,6 +31,7 @@ var AccordionGroup = forwardRef(function AccordionGroup({ children, className, d
31
31
  })
32
32
  });
33
33
  });
34
+ AccordionGroup.displayName = "AccordionGroup";
34
35
  //#endregion
35
36
  export { AccordionGroup as default };
36
37
 
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionGroup.js","names":[],"sources":["../../../src/components/accordion-group/AccordionGroup.tsx"],"sourcesContent":["import { forwardRef, useCallback, useMemo, useState } from 'react';\n\nimport { AccordionGroupContext } from '../accordion/AccordionContext.js';\nimport type { AccordionGroupContextValue } from '../accordion/AccordionContext.js';\nimport type { AccordionGroupProps } from '../accordion/Accordion.types.js';\n\nconst AccordionGroup = forwardRef<HTMLDivElement, AccordionGroupProps>(function AccordionGroup(\n { children, className, defaultOpenId = null, onOpenChange, openId, ...rootProps },\n ref,\n) {\n const [uncontrolledOpenId, setUncontrolledOpenId] = useState<string | null>(defaultOpenId);\n\n const isControlled = openId !== undefined;\n const currentOpenId = isControlled ? openId : uncontrolledOpenId;\n\n const isOpen = useCallback((id: string) => currentOpenId === id, [currentOpenId]);\n\n const toggle = useCallback(\n (id: string) => {\n const nextOpenId = currentOpenId === id ? null : id;\n if (!isControlled) setUncontrolledOpenId(nextOpenId);\n onOpenChange?.(nextOpenId);\n },\n [currentOpenId, isControlled, onOpenChange],\n );\n\n const contextValue = useMemo<AccordionGroupContextValue>(\n () => ({ isOpen, toggle }),\n [isOpen, toggle],\n );\n\n const rootClassName = ['chayns-accordion-group', className].filter(Boolean).join(' ');\n\n return (\n <AccordionGroupContext.Provider value={contextValue}>\n <div {...rootProps} className={rootClassName} ref={ref}>\n {children}\n </div>\n </AccordionGroupContext.Provider>\n );\n});\n\nexport default AccordionGroup;\n"],"mappings":";;;;AAMA,IAAM,iBAAiB,WAAgD,SAAS,eAC9E,EAAE,UAAU,WAAW,gBAAgB,MAAM,cAAc,QAAQ,GAAG,aACtE,KACA;CACA,MAAM,CAAC,oBAAoB,yBAAyB,SAAwB,aAAa;CAEzF,MAAM,eAAe,WAAW,KAAA;CAChC,MAAM,gBAAgB,eAAe,SAAS;CAE9C,MAAM,SAAS,aAAa,OAAe,kBAAkB,IAAI,CAAC,aAAa,CAAC;CAEhF,MAAM,SAAS,aACZ,OAAe;EACd,MAAM,aAAa,kBAAkB,KAAK,OAAO;EACjD,IAAI,CAAC,cAAc,sBAAsB,UAAU;EACnD,eAAe,UAAU;CAC3B,GACA;EAAC;EAAe;EAAc;CAAY,CAC5C;CAEA,MAAM,eAAe,eACZ;EAAE;EAAQ;CAAO,IACxB,CAAC,QAAQ,MAAM,CACjB;CAEA,MAAM,gBAAgB,CAAC,0BAA0B,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CAEpF,OACE,oBAAC,sBAAsB,UAAvB;EAAgC,OAAO;EACrC,UAAA,oBAAC,OAAD;GAAK,GAAI;GAAW,WAAW;GAAoB;GAChD;EACE,CAAA;CACyB,CAAA;AAEpC,CAAC"}
1
+ {"version":3,"file":"AccordionGroup.js","names":[],"sources":["../../../src/components/accordion-group/AccordionGroup.tsx"],"sourcesContent":["import { forwardRef, useCallback, useMemo, useState } from 'react';\n\nimport { AccordionGroupContext } from '../accordion/AccordionContext.js';\nimport type { AccordionGroupContextValue } from '../accordion/AccordionContext.js';\nimport type { AccordionGroupProps } from '../accordion/Accordion.types.js';\n\nconst AccordionGroup = forwardRef<HTMLDivElement, AccordionGroupProps>(function AccordionGroup(\n { children, className, defaultOpenId = null, onOpenChange, openId, ...rootProps },\n ref,\n) {\n const [uncontrolledOpenId, setUncontrolledOpenId] = useState<string | null>(defaultOpenId);\n\n const isControlled = openId !== undefined;\n const currentOpenId = isControlled ? openId : uncontrolledOpenId;\n\n const isOpen = useCallback((id: string) => currentOpenId === id, [currentOpenId]);\n\n const toggle = useCallback(\n (id: string) => {\n const nextOpenId = currentOpenId === id ? null : id;\n if (!isControlled) setUncontrolledOpenId(nextOpenId);\n onOpenChange?.(nextOpenId);\n },\n [currentOpenId, isControlled, onOpenChange],\n );\n\n const contextValue = useMemo<AccordionGroupContextValue>(\n () => ({ isOpen, toggle }),\n [isOpen, toggle],\n );\n\n const rootClassName = ['chayns-accordion-group', className].filter(Boolean).join(' ');\n\n return (\n <AccordionGroupContext.Provider value={contextValue}>\n <div {...rootProps} className={rootClassName} ref={ref}>\n {children}\n </div>\n </AccordionGroupContext.Provider>\n );\n});\n\nAccordionGroup.displayName = 'AccordionGroup';\n\nexport default AccordionGroup;\n"],"mappings":";;;;AAMA,IAAM,iBAAiB,WAAgD,SAAS,eAC9E,EAAE,UAAU,WAAW,gBAAgB,MAAM,cAAc,QAAQ,GAAG,aACtE,KACA;CACA,MAAM,CAAC,oBAAoB,yBAAyB,SAAwB,aAAa;CAEzF,MAAM,eAAe,WAAW,KAAA;CAChC,MAAM,gBAAgB,eAAe,SAAS;CAE9C,MAAM,SAAS,aAAa,OAAe,kBAAkB,IAAI,CAAC,aAAa,CAAC;CAEhF,MAAM,SAAS,aACZ,OAAe;EACd,MAAM,aAAa,kBAAkB,KAAK,OAAO;EACjD,IAAI,CAAC,cAAc,sBAAsB,UAAU;EACnD,eAAe,UAAU;CAC3B,GACA;EAAC;EAAe;EAAc;CAAY,CAC5C;CAEA,MAAM,eAAe,eACZ;EAAE;EAAQ;CAAO,IACxB,CAAC,QAAQ,MAAM,CACjB;CAEA,MAAM,gBAAgB,CAAC,0BAA0B,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CAEpF,OACE,oBAAC,sBAAsB,UAAvB;EAAgC,OAAO;EACrC,UAAA,oBAAC,OAAD;GAAK,GAAI;GAAW,WAAW;GAAoB;GAChD;EACE,CAAA;CACyB,CAAA;AAEpC,CAAC;AAED,eAAe,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAarD,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,KAAG,MASpD,CAAC;AAEF,QAAA,MAAM,MAAM,sHA8CV,CAAC;AAEH,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAarD,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,KAAG,MASpD,CAAC;AAEF,QAAA,MAAM,MAAM,sHAwCV,CAAC;AAIH,eAAe,MAAM,CAAC"}
@@ -46,6 +46,7 @@ var Avatar = forwardRef(function Avatar({ alt, badge, className, name, size = "d
46
46
  }) : null]
47
47
  });
48
48
  });
49
+ Avatar.displayName = "Avatar";
49
50
  //#endregion
50
51
  export { Avatar as default, getColorFromInitials };
51
52
 
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","names":[],"sources":["../../../src/components/avatar/Avatar.tsx"],"sourcesContent":["import { forwardRef, useState, type CSSProperties } from 'react';\n\nimport type { AvatarProps } from './Avatar.types.js';\n\nconst getInitials = (name: string) => {\n const words = name.trim().split(/\\s+/).filter(Boolean);\n if (words.length === 0) {\n return '';\n }\n\n const first = words[0]?.charAt(0) ?? '';\n const last = words.length > 1 ? (words.at(-1)?.charAt(0) ?? '') : '';\n return `${first}${last}`.toUpperCase();\n};\n\nexport const getColorFromInitials = (input: string): string => {\n let hash = 0;\n\n for (let index = 0; index < input.length; index += 1) {\n hash = input.charCodeAt(index) + ((hash << 5) - hash);\n }\n\n const hue = Math.abs(hash) % 360;\n return `hsl(${hue} 65% var(--chayns-avatar-initials-lightness))`;\n};\n\nconst Avatar = forwardRef<HTMLSpanElement, AvatarProps>(function Avatar(\n { alt, badge, className, name, size = 'default', src, style, ...spanProps },\n ref,\n) {\n const [failedSource, setFailedSource] = useState<string>();\n const showImage = Boolean(src) && failedSource !== src;\n const initials = getInitials(name);\n const initialsColorStyle: CSSProperties & Record<'--chayns-avatar-initials-color', string> = {\n '--chayns-avatar-initials-color': getColorFromInitials(name),\n ...style,\n };\n\n return (\n <span\n {...spanProps}\n aria-label={alt ?? name}\n className={[\n 'chayns-avatar',\n `chayns-avatar--${size}`,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n role=\"img\"\n ref={ref}\n style={initialsColorStyle}\n >\n {showImage ? (\n <img\n alt=\"\"\n className=\"chayns-avatar__image\"\n onError={() => setFailedSource(src)}\n src={src}\n />\n ) : (\n <span aria-hidden=\"true\" className=\"chayns-avatar__initials\">\n {initials}\n </span>\n )}\n {badge ? (\n <span aria-hidden=\"true\" className=\"chayns-avatar__badge\">\n {badge}\n </span>\n ) : null}\n </span>\n );\n});\n\nexport default Avatar;\n"],"mappings":";;;AAIA,IAAM,eAAe,SAAiB;CACpC,MAAM,QAAQ,KAAK,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,OAAO;CACrD,IAAI,MAAM,WAAW,GACnB,OAAO;CAKT,OAAO,GAFO,MAAM,EAAE,EAAE,OAAO,CAAC,KAAK,KACxB,MAAM,SAAS,IAAK,MAAM,GAAG,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,KAAM,KACzC,YAAY;AACvC;AAEA,IAAa,wBAAwB,UAA0B;CAC7D,IAAI,OAAO;CAEX,KAAK,IAAI,QAAQ,GAAG,QAAQ,MAAM,QAAQ,SAAS,GACjD,OAAO,MAAM,WAAW,KAAK,MAAM,QAAQ,KAAK;CAIlD,OAAO,OADK,KAAK,IAAI,IAAI,IAAI,IACX;AACpB;AAEA,IAAM,SAAS,WAAyC,SAAS,OAC/D,EAAE,KAAK,OAAO,WAAW,MAAM,OAAO,WAAW,KAAK,OAAO,GAAG,aAChE,KACA;CACA,MAAM,CAAC,cAAc,mBAAmB,SAAiB;CACzD,MAAM,YAAY,QAAQ,GAAG,KAAK,iBAAiB;CACnD,MAAM,WAAW,YAAY,IAAI;CACjC,MAAM,qBAAuF;EAC3F,kCAAkC,qBAAqB,IAAI;EAC3D,GAAG;CACL;CAEA,OACE,qBAAC,QAAD;EACE,GAAI;EACJ,cAAY,OAAO;EACnB,WAAW;GACT;GACA,kBAAkB;GAClB;EACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;EACX,MAAK;EACA;EACL,OAAO;EAZT,UAAA,CAcG,YACC,oBAAC,OAAD;GACE,KAAI;GACJ,WAAU;GACV,eAAe,gBAAgB,GAAG;GAC7B;EACN,CAAA,IAED,oBAAC,QAAD;GAAM,eAAY;GAAO,WAAU;GAChC,UAAA;EACG,CAAA,GAEP,QACC,oBAAC,QAAD;GAAM,eAAY;GAAO,WAAU;GAChC,UAAA;EACG,CAAA,IACJ,IACA;;AAEV,CAAC"}
1
+ {"version":3,"file":"Avatar.js","names":[],"sources":["../../../src/components/avatar/Avatar.tsx"],"sourcesContent":["import { forwardRef, useState, type CSSProperties } from 'react';\n\nimport type { AvatarProps } from './Avatar.types.js';\n\nconst getInitials = (name: string) => {\n const words = name.trim().split(/\\s+/).filter(Boolean);\n if (words.length === 0) {\n return '';\n }\n\n const first = words[0]?.charAt(0) ?? '';\n const last = words.length > 1 ? (words.at(-1)?.charAt(0) ?? '') : '';\n return `${first}${last}`.toUpperCase();\n};\n\nexport const getColorFromInitials = (input: string): string => {\n let hash = 0;\n\n for (let index = 0; index < input.length; index += 1) {\n hash = input.charCodeAt(index) + ((hash << 5) - hash);\n }\n\n const hue = Math.abs(hash) % 360;\n return `hsl(${hue} 65% var(--chayns-avatar-initials-lightness))`;\n};\n\nconst Avatar = forwardRef<HTMLSpanElement, AvatarProps>(function Avatar(\n { alt, badge, className, name, size = 'default', src, style, ...spanProps },\n ref,\n) {\n const [failedSource, setFailedSource] = useState<string>();\n const showImage = Boolean(src) && failedSource !== src;\n const initials = getInitials(name);\n const initialsColorStyle: CSSProperties & Record<'--chayns-avatar-initials-color', string> = {\n '--chayns-avatar-initials-color': getColorFromInitials(name),\n ...style,\n };\n\n return (\n <span\n {...spanProps}\n aria-label={alt ?? name}\n className={['chayns-avatar', `chayns-avatar--${size}`, className].filter(Boolean).join(' ')}\n role=\"img\"\n ref={ref}\n style={initialsColorStyle}\n >\n {showImage ? (\n <img\n alt=\"\"\n className=\"chayns-avatar__image\"\n onError={() => setFailedSource(src)}\n src={src}\n />\n ) : (\n <span aria-hidden=\"true\" className=\"chayns-avatar__initials\">\n {initials}\n </span>\n )}\n {badge ? (\n <span aria-hidden=\"true\" className=\"chayns-avatar__badge\">\n {badge}\n </span>\n ) : null}\n </span>\n );\n});\n\nAvatar.displayName = 'Avatar';\n\nexport default Avatar;\n"],"mappings":";;;AAIA,IAAM,eAAe,SAAiB;CACpC,MAAM,QAAQ,KAAK,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,OAAO;CACrD,IAAI,MAAM,WAAW,GACnB,OAAO;CAKT,OAAO,GAFO,MAAM,EAAE,EAAE,OAAO,CAAC,KAAK,KACxB,MAAM,SAAS,IAAK,MAAM,GAAG,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,KAAM,KACzC,YAAY;AACvC;AAEA,IAAa,wBAAwB,UAA0B;CAC7D,IAAI,OAAO;CAEX,KAAK,IAAI,QAAQ,GAAG,QAAQ,MAAM,QAAQ,SAAS,GACjD,OAAO,MAAM,WAAW,KAAK,MAAM,QAAQ,KAAK;CAIlD,OAAO,OADK,KAAK,IAAI,IAAI,IAAI,IACX;AACpB;AAEA,IAAM,SAAS,WAAyC,SAAS,OAC/D,EAAE,KAAK,OAAO,WAAW,MAAM,OAAO,WAAW,KAAK,OAAO,GAAG,aAChE,KACA;CACA,MAAM,CAAC,cAAc,mBAAmB,SAAiB;CACzD,MAAM,YAAY,QAAQ,GAAG,KAAK,iBAAiB;CACnD,MAAM,WAAW,YAAY,IAAI;CACjC,MAAM,qBAAuF;EAC3F,kCAAkC,qBAAqB,IAAI;EAC3D,GAAG;CACL;CAEA,OACE,qBAAC,QAAD;EACE,GAAI;EACJ,cAAY,OAAO;EACnB,WAAW;GAAC;GAAiB,kBAAkB;GAAQ;EAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAC1F,MAAK;EACA;EACL,OAAO;EANT,UAAA,CAQG,YACC,oBAAC,OAAD;GACE,KAAI;GACJ,WAAU;GACV,eAAe,gBAAgB,GAAG;GAC7B;EACN,CAAA,IAED,oBAAC,QAAD;GAAM,eAAY;GAAO,WAAU;GAChC,UAAA;EACG,CAAA,GAEP,QACC,oBAAC,QAAD;GAAM,eAAY;GAAO,WAAU;GAChC,UAAA;EACG,CAAA,IACJ,IACA;;AAEV,CAAC;AAED,OAAO,cAAc"}
@@ -1,4 +1,12 @@
1
1
  import type { ComponentPropsWithRef, ReactNode } from 'react';
2
+ /** Named configuration values; existing literal props and value lists remain supported. */
3
+ export declare enum AvatarSizes {
4
+ Default = "default",
5
+ Small = "small",
6
+ Large = "large"
7
+ }
8
+ export declare const AVATAR_SIZES: readonly ["default", "small", "large"];
9
+ export type AvatarSize = (typeof AVATAR_SIZES)[number];
2
10
  /**
3
11
  * @description Props for a single circular identity avatar: an image with a
4
12
  * deterministic initials-and-tone fallback. `size` is a designer-approved
@@ -16,7 +24,7 @@ export interface AvatarProps extends Omit<ComponentPropsWithRef<'span'>, 'childr
16
24
  * @description Avatar geometry variant.
17
25
  * @default 'default'
18
26
  */
19
- size?: 'default' | 'small' | 'large';
27
+ size?: AvatarSize;
20
28
  /**
21
29
  * @description Optional image source. Initials are shown instead when
22
30
  * omitted or when the image fails to load.
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.types.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,WAAW,WAAY,SAAQ,IAAI,CACvC,qBAAqB,CAAC,MAAM,CAAC,EAC7B,UAAU,GAAG,MAAM,GAAG,YAAY,CACnC;IACC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;IAErC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB"}
1
+ {"version":3,"file":"Avatar.types.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,2FAA2F;AAC3F,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED,eAAO,MAAM,YAAY,wCAAyC,CAAC;AACnE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,WAAW,WAAY,SAAQ,IAAI,CACvC,qBAAqB,CAAC,MAAM,CAAC,EAC7B,UAAU,GAAG,MAAM,GAAG,YAAY,CACnC;IACC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB"}
@@ -0,0 +1,17 @@
1
+ //#region src/components/avatar/Avatar.types.ts
2
+ /** Named configuration values; existing literal props and value lists remain supported. */
3
+ var AvatarSizes = /* @__PURE__ */ function(AvatarSizes) {
4
+ AvatarSizes["Default"] = "default";
5
+ AvatarSizes["Small"] = "small";
6
+ AvatarSizes["Large"] = "large";
7
+ return AvatarSizes;
8
+ }({});
9
+ var AVATAR_SIZES = [
10
+ "default",
11
+ "small",
12
+ "large"
13
+ ];
14
+ //#endregion
15
+ export { AVATAR_SIZES, AvatarSizes };
16
+
17
+ //# sourceMappingURL=Avatar.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Avatar.types.js","names":[],"sources":["../../../src/components/avatar/Avatar.types.ts"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from 'react';\n\n/** Named configuration values; existing literal props and value lists remain supported. */\nexport enum AvatarSizes {\n Default = 'default',\n Small = 'small',\n Large = 'large',\n}\n\nexport const AVATAR_SIZES = ['default', 'small', 'large'] as const;\nexport type AvatarSize = (typeof AVATAR_SIZES)[number];\n\n/**\n * @description Props for a single circular identity avatar: an image with a\n * deterministic initials-and-tone fallback. `size` is a designer-approved\n * local geometry variant for this component, not a global S/M/L density\n * variant.\n */\nexport interface AvatarProps extends Omit<\n ComponentPropsWithRef<'span'>,\n 'children' | 'role' | 'aria-label'\n> {\n /**\n * @description Full name used to derive both the accessible name (unless\n * `alt` is given) and the initials fallback shown when no image is\n * available.\n */\n name: string;\n\n /**\n * @description Avatar geometry variant.\n * @default 'default'\n */\n size?: AvatarSize;\n\n /**\n * @description Optional image source. Initials are shown instead when\n * omitted or when the image fails to load.\n */\n src?: string;\n\n /**\n * @description Optional accessible name override for the avatar, used\n * instead of `name` when the visible identity text differs from the\n * accessible name.\n */\n alt?: string;\n\n /**\n * @description Decorative content positioned at the lower edge of the\n * avatar, for example a presence or status marker. Always rendered\n * `aria-hidden` — any meaning it conveys must also be available elsewhere.\n */\n badge?: ReactNode;\n}\n"],"mappings":";;AAGA,IAAY,cAAL,yBAAA,aAAA;CACL,YAAA,aAAA;CACA,YAAA,WAAA;CACA,YAAA,WAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAa,eAAe;CAAC;CAAW;CAAS;AAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../../src/components/avatar-group/AvatarGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,QAAA,MAAM,WAAW,2HA6Bf,CAAC;AAEH,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../../src/components/avatar-group/AvatarGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,QAAA,MAAM,WAAW,2HA8Bf,CAAC;AAIH,eAAe,WAAW,CAAC"}
@@ -3,9 +3,9 @@ import { jsxs } from "react/jsx-runtime";
3
3
  //#region src/components/avatar-group/AvatarGroup.tsx
4
4
  var AvatarGroup = forwardRef(function AvatarGroup({ children, className, max, size = "default", ...spanProps }, ref) {
5
5
  const avatars = Children.toArray(children).filter((child) => isValidElement(child));
6
- const limited = typeof max === "number" && max > 0;
7
- const visibleCount = limited ? Math.max(max - 1, 0) : avatars.length;
8
- const overflowCount = limited && avatars.length > max ? avatars.length - visibleCount : 0;
6
+ const hasOverflow = typeof max === "number" && Number.isFinite(max) && max >= 1 && avatars.length > max;
7
+ const visibleCount = hasOverflow ? Math.max(Math.floor(max) - 1, 0) : avatars.length;
8
+ const overflowCount = hasOverflow ? avatars.length - visibleCount : 0;
9
9
  return /* @__PURE__ */ jsxs("span", {
10
10
  className: [
11
11
  "chayns-avatar-group",
@@ -21,6 +21,7 @@ var AvatarGroup = forwardRef(function AvatarGroup({ children, className, max, si
21
21
  }) : null]
22
22
  });
23
23
  });
24
+ AvatarGroup.displayName = "AvatarGroup";
24
25
  //#endregion
25
26
  export { AvatarGroup as default };
26
27
 
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarGroup.js","names":[],"sources":["../../../src/components/avatar-group/AvatarGroup.tsx"],"sourcesContent":["import { Children, cloneElement, forwardRef, isValidElement } from 'react';\n\nimport type { AvatarProps } from '../avatar/Avatar.types.js';\nimport type { AvatarGroupProps } from './AvatarGroup.types.js';\n\nconst AvatarGroup = forwardRef<HTMLSpanElement, AvatarGroupProps>(function AvatarGroup(\n { children, className, max, size = 'default', ...spanProps },\n ref,\n) {\n const avatars = Children.toArray(children).filter((child) => isValidElement<AvatarProps>(child));\n const limited = typeof max === 'number' && max > 0;\n const visibleCount = limited ? Math.max(max - 1, 0) : avatars.length;\n const overflowCount = limited && avatars.length > max ? avatars.length - visibleCount : 0;\n\n return (\n <span\n className={['chayns-avatar-group', `chayns-avatar-group--${size}`, className]\n .filter(Boolean)\n .join(' ')}\n {...spanProps}\n ref={ref}\n >\n {avatars.slice(0, visibleCount).map((avatar) =>\n cloneElement(avatar, {\n size,\n }),\n )}\n {overflowCount > 0 ? (\n <span aria-hidden=\"true\" className=\"chayns-avatar-group__overflow\">\n +{overflowCount}\n </span>\n ) : null}\n </span>\n );\n});\n\nexport default AvatarGroup;\n"],"mappings":";;;AAKA,IAAM,cAAc,WAA8C,SAAS,YACzE,EAAE,UAAU,WAAW,KAAK,OAAO,WAAW,GAAG,aACjD,KACA;CACA,MAAM,UAAU,SAAS,QAAQ,QAAQ,CAAC,CAAC,QAAQ,UAAU,eAA4B,KAAK,CAAC;CAC/F,MAAM,UAAU,OAAO,QAAQ,YAAY,MAAM;CACjD,MAAM,eAAe,UAAU,KAAK,IAAI,MAAM,GAAG,CAAC,IAAI,QAAQ;CAC9D,MAAM,gBAAgB,WAAW,QAAQ,SAAS,MAAM,QAAQ,SAAS,eAAe;CAExF,OACE,qBAAC,QAAD;EACE,WAAW;GAAC;GAAuB,wBAAwB;GAAQ;EAAS,CAAC,CAC1E,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;EACX,GAAI;EACC;EALP,UAAA,CAOG,QAAQ,MAAM,GAAG,YAAY,CAAC,CAAC,KAAK,WACnC,aAAa,QAAQ,EACnB,KACF,CAAC,CACH,GACC,gBAAgB,IACf,qBAAC,QAAD;GAAM,eAAY;GAAO,WAAU;GAAnC,UAAA,CAAmE,KAC/D,aACE;EACJ,CAAA,IAAA,IACA;;AAEV,CAAC"}
1
+ {"version":3,"file":"AvatarGroup.js","names":[],"sources":["../../../src/components/avatar-group/AvatarGroup.tsx"],"sourcesContent":["import { Children, cloneElement, forwardRef, isValidElement } from 'react';\n\nimport type { AvatarProps } from '../avatar/Avatar.types.js';\nimport type { AvatarGroupProps } from './AvatarGroup.types.js';\n\nconst AvatarGroup = forwardRef<HTMLSpanElement, AvatarGroupProps>(function AvatarGroup(\n { children, className, max, size = 'default', ...spanProps },\n ref,\n) {\n const avatars = Children.toArray(children).filter((child) => isValidElement<AvatarProps>(child));\n const limited = typeof max === 'number' && Number.isFinite(max) && max >= 1;\n const hasOverflow = limited && avatars.length > max;\n const visibleCount = hasOverflow ? Math.max(Math.floor(max) - 1, 0) : avatars.length;\n const overflowCount = hasOverflow ? avatars.length - visibleCount : 0;\n\n return (\n <span\n className={['chayns-avatar-group', `chayns-avatar-group--${size}`, className]\n .filter(Boolean)\n .join(' ')}\n {...spanProps}\n ref={ref}\n >\n {avatars.slice(0, visibleCount).map((avatar) =>\n cloneElement(avatar, {\n size,\n }),\n )}\n {overflowCount > 0 ? (\n <span aria-hidden=\"true\" className=\"chayns-avatar-group__overflow\">\n +{overflowCount}\n </span>\n ) : null}\n </span>\n );\n});\n\nAvatarGroup.displayName = 'AvatarGroup';\n\nexport default AvatarGroup;\n"],"mappings":";;;AAKA,IAAM,cAAc,WAA8C,SAAS,YACzE,EAAE,UAAU,WAAW,KAAK,OAAO,WAAW,GAAG,aACjD,KACA;CACA,MAAM,UAAU,SAAS,QAAQ,QAAQ,CAAC,CAAC,QAAQ,UAAU,eAA4B,KAAK,CAAC;CAE/F,MAAM,cADU,OAAO,QAAQ,YAAY,OAAO,SAAS,GAAG,KAAK,OAAO,KAC3C,QAAQ,SAAS;CAChD,MAAM,eAAe,cAAc,KAAK,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,CAAC,IAAI,QAAQ;CAC9E,MAAM,gBAAgB,cAAc,QAAQ,SAAS,eAAe;CAEpE,OACE,qBAAC,QAAD;EACE,WAAW;GAAC;GAAuB,wBAAwB;GAAQ;EAAS,CAAC,CAC1E,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;EACX,GAAI;EACC;EALP,UAAA,CAOG,QAAQ,MAAM,GAAG,YAAY,CAAC,CAAC,KAAK,WACnC,aAAa,QAAQ,EACnB,KACF,CAAC,CACH,GACC,gBAAgB,IACf,qBAAC,QAAD;GAAM,eAAY;GAAO,WAAU;GAAnC,UAAA,CAAmE,KAC/D,aACE;EACJ,CAAA,IAAA,IACA;;AAEV,CAAC;AAED,YAAY,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/Badge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,QAAA,MAAM,KAAK,qHAwBT,CAAC;AAEH,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/Badge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,QAAA,MAAM,KAAK,qHAwBT,CAAC;AAIH,eAAe,KAAK,CAAC"}
@@ -20,6 +20,7 @@ var Badge = forwardRef(function Badge({ "aria-label": ariaLabel, children, class
20
20
  })
21
21
  });
22
22
  });
23
+ Badge.displayName = "Badge";
23
24
  //#endregion
24
25
  export { Badge as default };
25
26
 
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport type { BadgeProps } from './Badge.types.js';\n\nconst Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n { 'aria-label': ariaLabel, children, className, size = 'sm', tone = 'neutral', ...spanProps },\n ref,\n) {\n const resolvedClassName = [\n 'chayns-badge',\n `chayns-badge--${tone}`,\n `chayns-badge--${size}`,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span\n {...spanProps}\n aria-label={ariaLabel}\n className={resolvedClassName}\n ref={ref}\n role={ariaLabel === undefined ? undefined : 'status'}\n >\n <span className=\"chayns-badge__content\">{children}</span>\n </span>\n );\n});\n\nexport default Badge;\n"],"mappings":";;;AAIA,IAAM,QAAQ,WAAwC,SAAS,MAC7D,EAAE,cAAc,WAAW,UAAU,WAAW,OAAO,MAAM,OAAO,WAAW,GAAG,aAClF,KACA;CACA,MAAM,oBAAoB;EACxB;EACA,iBAAiB;EACjB,iBAAiB;EACjB;CACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,oBAAC,QAAD;EACE,GAAI;EACJ,cAAY;EACZ,WAAW;EACN;EACL,MAAM,cAAc,KAAA,IAAY,KAAA,IAAY;EAE5C,UAAA,oBAAC,QAAD;GAAM,WAAU;GAAyB;EAAe,CAAA;CACpD,CAAA;AAEV,CAAC"}
1
+ {"version":3,"file":"Badge.js","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport type { BadgeProps } from './Badge.types.js';\n\nconst Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n { 'aria-label': ariaLabel, children, className, size = 'sm', tone = 'neutral', ...spanProps },\n ref,\n) {\n const resolvedClassName = [\n 'chayns-badge',\n `chayns-badge--${tone}`,\n `chayns-badge--${size}`,\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span\n {...spanProps}\n aria-label={ariaLabel}\n className={resolvedClassName}\n ref={ref}\n role={ariaLabel === undefined ? undefined : 'status'}\n >\n <span className=\"chayns-badge__content\">{children}</span>\n </span>\n );\n});\n\nBadge.displayName = 'Badge';\n\nexport default Badge;\n"],"mappings":";;;AAIA,IAAM,QAAQ,WAAwC,SAAS,MAC7D,EAAE,cAAc,WAAW,UAAU,WAAW,OAAO,MAAM,OAAO,WAAW,GAAG,aAClF,KACA;CACA,MAAM,oBAAoB;EACxB;EACA,iBAAiB;EACjB,iBAAiB;EACjB;CACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,oBAAC,QAAD;EACE,GAAI;EACJ,cAAY;EACZ,WAAW;EACN;EACL,MAAM,cAAc,KAAA,IAAY,KAAA,IAAY;EAE5C,UAAA,oBAAC,QAAD;GAAM,WAAU;GAAyB;EAAe,CAAA;CACpD,CAAA;AAEV,CAAC;AAED,MAAM,cAAc"}
@@ -1,4 +1,17 @@
1
1
  import type { ComponentPropsWithRef, ReactNode } from 'react';
2
+ /** Named configuration values; existing literal props and value lists remain supported. */
3
+ export declare enum BadgeSizes {
4
+ Small = "sm",
5
+ Medium = "md"
6
+ }
7
+ /** Named configuration values; existing literal props and value lists remain supported. */
8
+ export declare enum BadgeTones {
9
+ Neutral = "neutral",
10
+ Accent = "accent",
11
+ Success = "success",
12
+ Warning = "warning",
13
+ Danger = "danger"
14
+ }
2
15
  export declare const BADGE_TONES: readonly ["neutral", "accent", "success", "warning", "danger"];
3
16
  export type BadgeTone = (typeof BADGE_TONES)[number];
4
17
  export declare const BADGE_SIZES: readonly ["sm", "md"];
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.types.d.ts","sourceRoot":"","sources":["../../../src/components/badge/Badge.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,eAAO,MAAM,WAAW,gEAAiE,CAAC;AAC1F,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,eAAO,MAAM,WAAW,uBAAwB,CAAC;AACjD,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC1F,QAAQ,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,KAAK,CAAC;CACd"}
1
+ {"version":3,"file":"Badge.types.d.ts","sourceRoot":"","sources":["../../../src/components/badge/Badge.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,2FAA2F;AAC3F,oBAAY,UAAU;IACpB,KAAK,OAAO;IACZ,MAAM,OAAO;CACd;AAED,2FAA2F;AAC3F,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,eAAO,MAAM,WAAW,gEAAiE,CAAC;AAC1F,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,eAAO,MAAM,WAAW,uBAAwB,CAAC;AACjD,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC1F,QAAQ,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,KAAK,CAAC;CACd"}
@@ -1,4 +1,19 @@
1
1
  //#region src/components/badge/Badge.types.ts
2
+ /** Named configuration values; existing literal props and value lists remain supported. */
3
+ var BadgeSizes = /* @__PURE__ */ function(BadgeSizes) {
4
+ BadgeSizes["Small"] = "sm";
5
+ BadgeSizes["Medium"] = "md";
6
+ return BadgeSizes;
7
+ }({});
8
+ /** Named configuration values; existing literal props and value lists remain supported. */
9
+ var BadgeTones = /* @__PURE__ */ function(BadgeTones) {
10
+ BadgeTones["Neutral"] = "neutral";
11
+ BadgeTones["Accent"] = "accent";
12
+ BadgeTones["Success"] = "success";
13
+ BadgeTones["Warning"] = "warning";
14
+ BadgeTones["Danger"] = "danger";
15
+ return BadgeTones;
16
+ }({});
2
17
  var BADGE_TONES = [
3
18
  "neutral",
4
19
  "accent",
@@ -8,6 +23,6 @@ var BADGE_TONES = [
8
23
  ];
9
24
  var BADGE_SIZES = ["sm", "md"];
10
25
  //#endregion
11
- export { BADGE_SIZES, BADGE_TONES };
26
+ export { BADGE_SIZES, BADGE_TONES, BadgeSizes, BadgeTones };
12
27
 
13
28
  //# sourceMappingURL=Badge.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.types.js","names":[],"sources":["../../../src/components/badge/Badge.types.ts"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from 'react';\n\nexport const BADGE_TONES = ['neutral', 'accent', 'success', 'warning', 'danger'] as const;\nexport type BadgeTone = (typeof BADGE_TONES)[number];\n\nexport const BADGE_SIZES = ['sm', 'md'] as const;\nexport type BadgeSize = (typeof BADGE_SIZES)[number];\n\nexport interface BadgeProps extends Omit<ComponentPropsWithRef<'span'>, 'children' | 'role'> {\n children: Exclude<ReactNode, boolean | null | undefined>;\n tone?: BadgeTone;\n size?: BadgeSize;\n 'aria-label'?: string;\n role?: never;\n}\n"],"mappings":";AAEA,IAAa,cAAc;CAAC;CAAW;CAAU;CAAW;CAAW;AAAQ;AAG/E,IAAa,cAAc,CAAC,MAAM,IAAI"}
1
+ {"version":3,"file":"Badge.types.js","names":[],"sources":["../../../src/components/badge/Badge.types.ts"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from 'react';\n\n/** Named configuration values; existing literal props and value lists remain supported. */\nexport enum BadgeSizes {\n Small = 'sm',\n Medium = 'md',\n}\n\n/** Named configuration values; existing literal props and value lists remain supported. */\nexport enum BadgeTones {\n Neutral = 'neutral',\n Accent = 'accent',\n Success = 'success',\n Warning = 'warning',\n Danger = 'danger',\n}\n\nexport const BADGE_TONES = ['neutral', 'accent', 'success', 'warning', 'danger'] as const;\nexport type BadgeTone = (typeof BADGE_TONES)[number];\n\nexport const BADGE_SIZES = ['sm', 'md'] as const;\nexport type BadgeSize = (typeof BADGE_SIZES)[number];\n\nexport interface BadgeProps extends Omit<ComponentPropsWithRef<'span'>, 'children' | 'role'> {\n children: Exclude<ReactNode, boolean | null | undefined>;\n tone?: BadgeTone;\n size?: BadgeSize;\n 'aria-label'?: string;\n role?: never;\n}\n"],"mappings":";;AAGA,IAAY,aAAL,yBAAA,YAAA;CACL,WAAA,WAAA;CACA,WAAA,YAAA;;AACF,EAAA,CAAA,CAAA;;AAGA,IAAY,aAAL,yBAAA,YAAA;CACL,WAAA,aAAA;CACA,WAAA,YAAA;CACA,WAAA,aAAA;CACA,WAAA,aAAA;CACA,WAAA,YAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAa,cAAc;CAAC;CAAW;CAAU;CAAW;CAAW;AAAQ;AAG/E,IAAa,cAAc,CAAC,MAAM,IAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../src/components/banner/Banner.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,MAAM,qNAuDV,CAAC;AAEH,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../src/components/banner/Banner.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,MAAM,qNAuDV,CAAC;AAIH,eAAe,MAAM,CAAC"}
@@ -40,6 +40,7 @@ var Banner = forwardRef(function Banner({ children, className, closeLabel, defau
40
40
  ]
41
41
  });
42
42
  });
43
+ Banner.displayName = "Banner";
43
44
  //#endregion
44
45
  export { Banner as default };
45
46
 
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.js","names":[],"sources":["../../../src/components/banner/Banner.tsx"],"sourcesContent":["import { forwardRef, useState } from 'react';\n\nimport ButtonIcon from '../button/button-icon/ButtonIcon.js';\nimport type { BannerProps } from './Banner.types.js';\n\nconst Banner = forwardRef<HTMLElement, BannerProps>(function Banner(\n {\n children,\n className,\n closeLabel,\n defaultOpen = true,\n icon,\n onClose,\n onOpenChange,\n open,\n tone = 'neutral',\n ...asideProps\n },\n ref,\n) {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);\n const isOpen = open ?? uncontrolledOpen;\n\n function handleClose() {\n if (open === undefined) {\n setUncontrolledOpen(false);\n }\n\n onOpenChange?.(false);\n onClose?.();\n }\n\n if (!isOpen) {\n return null;\n }\n\n const resolvedClassName = ['chayns-banner', `chayns-banner--${tone}`, className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <aside {...asideProps} className={resolvedClassName} ref={ref}>\n {icon ? (\n <span aria-hidden=\"true\" className=\"chayns-banner__icon\">\n <ButtonIcon icon={icon} />\n </span>\n ) : null}\n <div className=\"chayns-banner__content\">{children}</div>\n {onClose ? (\n <button\n aria-label={closeLabel}\n className=\"chayns-banner__close\"\n onClick={handleClose}\n type=\"button\"\n >\n <ButtonIcon icon=\"fa-xmark\" />\n </button>\n ) : null}\n </aside>\n );\n});\n\nexport default Banner;\n"],"mappings":";;;;AAKA,IAAM,SAAS,WAAqC,SAAS,OAC3D,EACE,UACA,WACA,YACA,cAAc,MACd,MACA,SACA,cACA,MACA,OAAO,WACP,GAAG,cAEL,KACA;CACA,MAAM,CAAC,kBAAkB,uBAAuB,SAAS,WAAW;CACpE,MAAM,SAAS,QAAQ;CAEvB,SAAS,cAAc;EACrB,IAAI,SAAS,KAAA,GACX,oBAAoB,KAAK;EAG3B,eAAe,KAAK;EACpB,UAAU;CACZ;CAEA,IAAI,CAAC,QACH,OAAO;CAGT,MAAM,oBAAoB;EAAC;EAAiB,kBAAkB;EAAQ;CAAS,CAAC,CAC7E,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,qBAAC,SAAD;EAAO,GAAI;EAAY,WAAW;EAAwB;EAA1D,UAAA;GACG,OACC,oBAAC,QAAD;IAAM,eAAY;IAAO,WAAU;IACjC,UAAA,oBAAC,YAAD,EAAkB,KAAO,CAAA;GACrB,CAAA,IACJ;GACJ,oBAAC,OAAD;IAAK,WAAU;IAA0B;GAAc,CAAA;GACtD,UACC,oBAAC,UAAD;IACE,cAAY;IACZ,WAAU;IACV,SAAS;IACT,MAAK;IAEL,UAAA,oBAAC,YAAD,EAAY,MAAK,WAAY,CAAA;GACvB,CAAA,IACN;EACC;;AAEX,CAAC"}
1
+ {"version":3,"file":"Banner.js","names":[],"sources":["../../../src/components/banner/Banner.tsx"],"sourcesContent":["import { forwardRef, useState } from 'react';\n\nimport ButtonIcon from '../button/button-icon/ButtonIcon.js';\nimport type { BannerProps } from './Banner.types.js';\n\nconst Banner = forwardRef<HTMLElement, BannerProps>(function Banner(\n {\n children,\n className,\n closeLabel,\n defaultOpen = true,\n icon,\n onClose,\n onOpenChange,\n open,\n tone = 'neutral',\n ...asideProps\n },\n ref,\n) {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);\n const isOpen = open ?? uncontrolledOpen;\n\n function handleClose() {\n if (open === undefined) {\n setUncontrolledOpen(false);\n }\n\n onOpenChange?.(false);\n onClose?.();\n }\n\n if (!isOpen) {\n return null;\n }\n\n const resolvedClassName = ['chayns-banner', `chayns-banner--${tone}`, className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <aside {...asideProps} className={resolvedClassName} ref={ref}>\n {icon ? (\n <span aria-hidden=\"true\" className=\"chayns-banner__icon\">\n <ButtonIcon icon={icon} />\n </span>\n ) : null}\n <div className=\"chayns-banner__content\">{children}</div>\n {onClose ? (\n <button\n aria-label={closeLabel}\n className=\"chayns-banner__close\"\n onClick={handleClose}\n type=\"button\"\n >\n <ButtonIcon icon=\"fa-xmark\" />\n </button>\n ) : null}\n </aside>\n );\n});\n\nBanner.displayName = 'Banner';\n\nexport default Banner;\n"],"mappings":";;;;AAKA,IAAM,SAAS,WAAqC,SAAS,OAC3D,EACE,UACA,WACA,YACA,cAAc,MACd,MACA,SACA,cACA,MACA,OAAO,WACP,GAAG,cAEL,KACA;CACA,MAAM,CAAC,kBAAkB,uBAAuB,SAAS,WAAW;CACpE,MAAM,SAAS,QAAQ;CAEvB,SAAS,cAAc;EACrB,IAAI,SAAS,KAAA,GACX,oBAAoB,KAAK;EAG3B,eAAe,KAAK;EACpB,UAAU;CACZ;CAEA,IAAI,CAAC,QACH,OAAO;CAGT,MAAM,oBAAoB;EAAC;EAAiB,kBAAkB;EAAQ;CAAS,CAAC,CAC7E,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,qBAAC,SAAD;EAAO,GAAI;EAAY,WAAW;EAAwB;EAA1D,UAAA;GACG,OACC,oBAAC,QAAD;IAAM,eAAY;IAAO,WAAU;IACjC,UAAA,oBAAC,YAAD,EAAkB,KAAO,CAAA;GACrB,CAAA,IACJ;GACJ,oBAAC,OAAD;IAAK,WAAU;IAA0B;GAAc,CAAA;GACtD,UACC,oBAAC,UAAD;IACE,cAAY;IACZ,WAAU;IACV,SAAS;IACT,MAAK;IAEL,UAAA,oBAAC,YAAD,EAAY,MAAK,WAAY,CAAA;GACvB,CAAA,IACN;EACC;;AAEX,CAAC;AAED,OAAO,cAAc"}
@@ -1,4 +1,11 @@
1
1
  import type { ComponentPropsWithRef, ReactNode } from 'react';
2
+ /** Named configuration values; existing literal props and value lists remain supported. */
3
+ export declare enum BannerTones {
4
+ Neutral = "neutral",
5
+ Success = "success",
6
+ Warning = "warning",
7
+ Danger = "danger"
8
+ }
2
9
  import type { ButtonIcon } from '../button/Button.types.js';
3
10
  export declare const BANNER_TONES: readonly ["neutral", "success", "warning", "danger"];
4
11
  export type BannerTone = (typeof BANNER_TONES)[number];
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.types.d.ts","sourceRoot":"","sources":["../../../src/components/banner/Banner.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,eAAO,MAAM,YAAY,sDAAuD,CAAC;AACjF,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,UAAU,eAAgB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzF,QAAQ,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,IAAI,CAAC,EAAE,KAAK,CAAC;CACd;AAED,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB;AAED,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,mBAAmB,CAAC"}
1
+ {"version":3,"file":"Banner.types.d.ts","sourceRoot":"","sources":["../../../src/components/banner/Banner.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,2FAA2F;AAC3F,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,eAAO,MAAM,YAAY,sDAAuD,CAAC;AACjF,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,UAAU,eAAgB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IACzF,QAAQ,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,IAAI,CAAC,EAAE,KAAK,CAAC;CACd;AAED,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB;AAED,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,mBAAmB,CAAC"}
@@ -1,4 +1,12 @@
1
1
  //#region src/components/banner/Banner.types.ts
2
+ /** Named configuration values; existing literal props and value lists remain supported. */
3
+ var BannerTones = /* @__PURE__ */ function(BannerTones) {
4
+ BannerTones["Neutral"] = "neutral";
5
+ BannerTones["Success"] = "success";
6
+ BannerTones["Warning"] = "warning";
7
+ BannerTones["Danger"] = "danger";
8
+ return BannerTones;
9
+ }({});
2
10
  var BANNER_TONES = [
3
11
  "neutral",
4
12
  "success",
@@ -6,6 +14,6 @@ var BANNER_TONES = [
6
14
  "danger"
7
15
  ];
8
16
  //#endregion
9
- export { BANNER_TONES };
17
+ export { BANNER_TONES, BannerTones };
10
18
 
11
19
  //# sourceMappingURL=Banner.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.types.js","names":[],"sources":["../../../src/components/banner/Banner.types.ts"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from 'react';\n\nimport type { ButtonIcon } from '../button/Button.types.js';\n\nexport const BANNER_TONES = ['neutral', 'success', 'warning', 'danger'] as const;\nexport type BannerTone = (typeof BANNER_TONES)[number];\n\ninterface BannerBaseProps extends Omit<ComponentPropsWithRef<'aside'>, 'children' | 'role'> {\n children: Exclude<ReactNode, boolean | null | undefined>;\n tone?: BannerTone;\n icon?: ButtonIcon;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n role?: never;\n}\n\nexport interface StaticBannerProps extends BannerBaseProps {\n onClose?: never;\n closeLabel?: never;\n}\n\nexport interface ClosableBannerProps extends BannerBaseProps {\n onClose: () => void;\n closeLabel: string;\n}\n\nexport type BannerProps = StaticBannerProps | ClosableBannerProps;\n"],"mappings":";AAIA,IAAa,eAAe;CAAC;CAAW;CAAW;CAAW;AAAQ"}
1
+ {"version":3,"file":"Banner.types.js","names":[],"sources":["../../../src/components/banner/Banner.types.ts"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from 'react';\n\n/** Named configuration values; existing literal props and value lists remain supported. */\nexport enum BannerTones {\n Neutral = 'neutral',\n Success = 'success',\n Warning = 'warning',\n Danger = 'danger',\n}\n\nimport type { ButtonIcon } from '../button/Button.types.js';\n\nexport const BANNER_TONES = ['neutral', 'success', 'warning', 'danger'] as const;\nexport type BannerTone = (typeof BANNER_TONES)[number];\n\ninterface BannerBaseProps extends Omit<ComponentPropsWithRef<'aside'>, 'children' | 'role'> {\n children: Exclude<ReactNode, boolean | null | undefined>;\n tone?: BannerTone;\n icon?: ButtonIcon;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n role?: never;\n}\n\nexport interface StaticBannerProps extends BannerBaseProps {\n onClose?: never;\n closeLabel?: never;\n}\n\nexport interface ClosableBannerProps extends BannerBaseProps {\n onClose: () => void;\n closeLabel: string;\n}\n\nexport type BannerProps = StaticBannerProps | ClosableBannerProps;\n"],"mappings":";;AAGA,IAAY,cAAL,yBAAA,aAAA;CACL,YAAA,aAAA;CACA,YAAA,aAAA;CACA,YAAA,aAAA;CACA,YAAA,YAAA;;AACF,EAAA,CAAA,CAAA;AAIA,IAAa,eAAe;CAAC;CAAW;CAAW;CAAW;AAAQ"}
@@ -0,0 +1,4 @@
1
+ import type { BreadcrumbProps } from './Breadcrumb.types.js';
2
+ declare const Breadcrumb: import("react").ForwardRefExoticComponent<Omit<BreadcrumbProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
3
+ export default Breadcrumb;
4
+ //# sourceMappingURL=Breadcrumb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,QAAA,MAAM,UAAU,sHAwCd,CAAC;AAEH,eAAe,UAAU,CAAC"}
@@ -0,0 +1,35 @@
1
+ import ButtonIcon from "../button/button-icon/ButtonIcon.js";
2
+ import { forwardRef } from "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ //#region src/components/breadcrumb/Breadcrumb.tsx
5
+ var Breadcrumb = forwardRef(function Breadcrumb({ className, items, ...navProps }, ref) {
6
+ if (items.some((item, index) => index === items.length - 1 ? item.href !== void 0 : item.href === void 0)) throw new Error("Breadcrumb ancestors require href; only the last item is the current page.");
7
+ return /* @__PURE__ */ jsx("nav", {
8
+ ...navProps,
9
+ className: ["chayns-breadcrumb", className].filter(Boolean).join(" "),
10
+ ref,
11
+ children: /* @__PURE__ */ jsx("ol", {
12
+ className: "chayns-breadcrumb__list",
13
+ children: items.map((item, index) => /* @__PURE__ */ jsxs("li", {
14
+ className: "chayns-breadcrumb__item",
15
+ children: [index > 0 ? /* @__PURE__ */ jsx("i", {
16
+ "aria-hidden": "true",
17
+ className: "chayns-breadcrumb__separator far fa-chevron-right"
18
+ }) : null, item.href !== void 0 ? /* @__PURE__ */ jsxs("a", {
19
+ className: "chayns-breadcrumb__link",
20
+ href: item.href,
21
+ children: [item.icon ? /* @__PURE__ */ jsx(ButtonIcon, { icon: item.icon }) : null, item.label]
22
+ }) : /* @__PURE__ */ jsxs("span", {
23
+ "aria-current": "page",
24
+ className: "chayns-breadcrumb__current",
25
+ children: [item.icon ? /* @__PURE__ */ jsx(ButtonIcon, { icon: item.icon }) : null, item.label]
26
+ })]
27
+ }, item.href ?? "current"))
28
+ })
29
+ });
30
+ });
31
+ Breadcrumb.displayName = "Breadcrumb";
32
+ //#endregion
33
+ export { Breadcrumb as default };
34
+
35
+ //# sourceMappingURL=Breadcrumb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.js","names":[],"sources":["../../../src/components/breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport ButtonIcon from '../button/button-icon/ButtonIcon.js';\nimport type { BreadcrumbProps } from './Breadcrumb.types.js';\n\nconst Breadcrumb = forwardRef<HTMLElement, BreadcrumbProps>(function Breadcrumb(\n { className, items, ...navProps },\n ref,\n) {\n if (\n items.some((item, index) =>\n index === items.length - 1 ? item.href !== undefined : item.href === undefined,\n )\n ) {\n throw new Error('Breadcrumb ancestors require href; only the last item is the current page.');\n }\n\n return (\n <nav\n {...navProps}\n className={['chayns-breadcrumb', className].filter(Boolean).join(' ')}\n ref={ref}\n >\n <ol className=\"chayns-breadcrumb__list\">\n {items.map((item, index) => (\n <li className=\"chayns-breadcrumb__item\" key={item.href ?? 'current'}>\n {index > 0 ? (\n <i aria-hidden=\"true\" className=\"chayns-breadcrumb__separator far fa-chevron-right\" />\n ) : null}\n {item.href !== undefined ? (\n <a className=\"chayns-breadcrumb__link\" href={item.href}>\n {item.icon ? <ButtonIcon icon={item.icon} /> : null}\n {item.label}\n </a>\n ) : (\n <span aria-current=\"page\" className=\"chayns-breadcrumb__current\">\n {item.icon ? <ButtonIcon icon={item.icon} /> : null}\n {item.label}\n </span>\n )}\n </li>\n ))}\n </ol>\n </nav>\n );\n});\nBreadcrumb.displayName = 'Breadcrumb';\nexport default Breadcrumb;\n"],"mappings":";;;;AAIA,IAAM,aAAa,WAAyC,SAAS,WACnE,EAAE,WAAW,OAAO,GAAG,YACvB,KACA;CACA,IACE,MAAM,MAAM,MAAM,UAChB,UAAU,MAAM,SAAS,IAAI,KAAK,SAAS,KAAA,IAAY,KAAK,SAAS,KAAA,CACvE,GAEA,MAAM,IAAI,MAAM,4EAA4E;CAG9F,OACE,oBAAC,OAAD;EACE,GAAI;EACJ,WAAW,CAAC,qBAAqB,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAC/D;EAEL,UAAA,oBAAC,MAAD;GAAI,WAAU;GACX,UAAA,MAAM,KAAK,MAAM,UAChB,qBAAC,MAAD;IAAI,WAAU;IAAd,UAAA,CACG,QAAQ,IACP,oBAAC,KAAD;KAAG,eAAY;KAAO,WAAU;IAAqD,CAAA,IACnF,MACH,KAAK,SAAS,KAAA,IACb,qBAAC,KAAD;KAAG,WAAU;KAA0B,MAAM,KAAK;KAAlD,UAAA,CACG,KAAK,OAAO,oBAAC,YAAD,EAAY,MAAM,KAAK,KAAO,CAAA,IAAI,MAC9C,KAAK,KACL;IAEH,CAAA,IAAA,qBAAC,QAAD;KAAM,gBAAa;KAAO,WAAU;KAApC,UAAA,CACG,KAAK,OAAO,oBAAC,YAAD,EAAY,MAAM,KAAK,KAAO,CAAA,IAAI,MAC9C,KAAK,KACF;IAEN,CAAA,CAAA;GAfyC,GAAA,KAAK,QAAQ,SAetD,CACL;EACC,CAAA;CACD,CAAA;AAET,CAAC;AACD,WAAW,cAAc"}
@@ -0,0 +1,13 @@
1
+ import type { ComponentPropsWithRef, ReactNode } from 'react';
2
+ import type { ButtonIcon } from '../button/Button.types.js';
3
+ export interface BreadcrumbItem {
4
+ label: Exclude<ReactNode, boolean | null | undefined>;
5
+ /** Ancestors navigate; the last item omits href and represents the current page. */
6
+ href?: string;
7
+ icon?: ButtonIcon;
8
+ }
9
+ /** Hierarchies of three or more levels; use Tabs for peer content views. */
10
+ export interface BreadcrumbProps extends Omit<ComponentPropsWithRef<'nav'>, 'children'> {
11
+ items: readonly BreadcrumbItem[];
12
+ }
13
+ //# sourceMappingURL=Breadcrumb.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.types.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/Breadcrumb.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACtD,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,4EAA4E;AAC5E,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACrF,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;CAClC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,QAAA,MAAM,MAAM,wHAoCV,CAAC;AAEH,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,QAAA,MAAM,MAAM,wHAoCV,CAAC;AAIH,eAAe,MAAM,CAAC"}
@@ -19,6 +19,7 @@ var Button = forwardRef(function Button({ "aria-busy": ariaBusy, children, class
19
19
  children: [loading ? /* @__PURE__ */ jsx(ButtonIcon, { icon: "fa-spinner" }) : icon ? /* @__PURE__ */ jsx(ButtonIcon, { icon }) : null, children]
20
20
  });
21
21
  });
22
+ Button.displayName = "Button";
22
23
  //#endregion
23
24
  export { Button as default };
24
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","names":[],"sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport type { ButtonProps } from './Button.types.js';\nimport ButtonIcon from './button-icon/ButtonIcon.js';\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n 'aria-busy': ariaBusy,\n children,\n className,\n disabled,\n icon,\n loading = false,\n type = 'button',\n variant,\n ...buttonProps\n },\n ref,\n) {\n const resolvedClassName = [\n 'chayns-button',\n `chayns-button--${variant}`,\n loading ? 'chayns-button--loading' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button\n {...buttonProps}\n aria-busy={loading ? true : ariaBusy}\n className={resolvedClassName}\n disabled={loading || disabled}\n ref={ref}\n type={type}\n >\n {loading ? <ButtonIcon icon=\"fa-spinner\" /> : icon ? <ButtonIcon icon={icon} /> : null}\n {children}\n </button>\n );\n});\n\nexport default Button;\n"],"mappings":";;;;AAKA,IAAM,SAAS,WAA2C,SAAS,OACjE,EACE,aAAa,UACb,UACA,WACA,UACA,MACA,UAAU,OACV,OAAO,UACP,SACA,GAAG,eAEL,KACA;CACA,MAAM,oBAAoB;EACxB;EACA,kBAAkB;EAClB,UAAU,2BAA2B;EACrC;CACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,qBAAC,UAAD;EACE,GAAI;EACJ,aAAW,UAAU,OAAO;EAC5B,WAAW;EACX,UAAU,WAAW;EAChB;EACC;EANR,UAAA,CAQG,UAAU,oBAAC,YAAD,EAAY,MAAK,aAAc,CAAA,IAAI,OAAO,oBAAC,YAAD,EAAkB,KAAO,CAAA,IAAI,MACjF,QACK;;AAEZ,CAAC"}
1
+ {"version":3,"file":"Button.js","names":[],"sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport type { ButtonProps } from './Button.types.js';\nimport ButtonIcon from './button-icon/ButtonIcon.js';\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n 'aria-busy': ariaBusy,\n children,\n className,\n disabled,\n icon,\n loading = false,\n type = 'button',\n variant,\n ...buttonProps\n },\n ref,\n) {\n const resolvedClassName = [\n 'chayns-button',\n `chayns-button--${variant}`,\n loading ? 'chayns-button--loading' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <button\n {...buttonProps}\n aria-busy={loading ? true : ariaBusy}\n className={resolvedClassName}\n disabled={loading || disabled}\n ref={ref}\n type={type}\n >\n {loading ? <ButtonIcon icon=\"fa-spinner\" /> : icon ? <ButtonIcon icon={icon} /> : null}\n {children}\n </button>\n );\n});\n\nButton.displayName = 'Button';\n\nexport default Button;\n"],"mappings":";;;;AAKA,IAAM,SAAS,WAA2C,SAAS,OACjE,EACE,aAAa,UACb,UACA,WACA,UACA,MACA,UAAU,OACV,OAAO,UACP,SACA,GAAG,eAEL,KACA;CACA,MAAM,oBAAoB;EACxB;EACA,kBAAkB;EAClB,UAAU,2BAA2B;EACrC;CACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,qBAAC,UAAD;EACE,GAAI;EACJ,aAAW,UAAU,OAAO;EAC5B,WAAW;EACX,UAAU,WAAW;EAChB;EACC;EANR,UAAA,CAQG,UAAU,oBAAC,YAAD,EAAY,MAAK,aAAc,CAAA,IAAI,OAAO,oBAAC,YAAD,EAAkB,KAAO,CAAA,IAAI,MACjF,QACK;;AAEZ,CAAC;AAED,OAAO,cAAc"}
@@ -1,4 +1,11 @@
1
1
  import type { ComponentPropsWithRef, ReactNode } from 'react';
2
+ /** Named configuration values; existing literal props and value lists remain supported. */
3
+ export declare enum ButtonVariants {
4
+ Primary = "primary",
5
+ Outline = "outline",
6
+ Ghost = "ghost",
7
+ Danger = "danger"
8
+ }
2
9
  /**
3
10
  * @description Supported visual emphasis levels for {@link ButtonProps} and
4
11
  * `IconButtonProps`. Milestone 1 supports exactly these four values; there is
@@ -1 +1 @@
1
- {"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,eAAe,oDAKiB,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,MAAM,EAAE,GAAG,UAAU,MAAM,EAAE,GAAG,MAAM,MAAM,EAAE,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAE3E;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;IACpF;;;;;OAKG;IACH,OAAO,EAAE,aAAa,CAAC;IAEvB;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,EAAE,aAAa,CAAC;CACzB"}
1
+ {"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,2FAA2F;AAC3F,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,eAAe,oDAKiB,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,MAAM,EAAE,GAAG,UAAU,MAAM,EAAE,GAAG,MAAM,MAAM,EAAE,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAE3E;;;;GAIG;AACH,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;IACpF;;;;;OAKG;IACH,OAAO,EAAE,aAAa,CAAC;IAEvB;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,EAAE,aAAa,CAAC;CACzB"}
@@ -1,4 +1,12 @@
1
1
  //#region src/components/button/Button.types.ts
2
+ /** Named configuration values; existing literal props and value lists remain supported. */
3
+ var ButtonVariants = /* @__PURE__ */ function(ButtonVariants) {
4
+ ButtonVariants["Primary"] = "primary";
5
+ ButtonVariants["Outline"] = "outline";
6
+ ButtonVariants["Ghost"] = "ghost";
7
+ ButtonVariants["Danger"] = "danger";
8
+ return ButtonVariants;
9
+ }({});
2
10
  /**
3
11
  * Runtime representation of the finite Button variant contract.
4
12
  * Keep this list as the single source for Storybook controls and iteration.
@@ -10,6 +18,6 @@ var BUTTON_VARIANTS = [
10
18
  "danger"
11
19
  ];
12
20
  //#endregion
13
- export { BUTTON_VARIANTS };
21
+ export { BUTTON_VARIANTS, ButtonVariants };
14
22
 
15
23
  //# sourceMappingURL=Button.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.types.js","names":[],"sources":["../../../src/components/button/Button.types.ts"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from 'react';\n\n/**\n * @description Supported visual emphasis levels for {@link ButtonProps} and\n * `IconButtonProps`. Milestone 1 supports exactly these four values; there is\n * no default variant and no fifth value.\n * @see {@link https://tappqa.tobit.com/Bodywork/DesignSystem/#buttons | DesignSystem — Buttons & Aktionen}\n */\nexport type ButtonVariant = 'primary' | 'outline' | 'ghost' | 'danger';\n\n/**\n * Runtime representation of the finite Button variant contract.\n * Keep this list as the single source for Storybook controls and iteration.\n */\nexport const BUTTON_VARIANTS = [\n 'primary',\n 'outline',\n 'ghost',\n 'danger',\n] as const satisfies readonly ButtonVariant[];\n\n/**\n * @description A FontAwesome Classic icon name (e.g. `fa-plus`) or a\n * FontAwesome Brands icon including its style prefix (e.g. `fab fa-github`).\n * Classic icons resolve the matching Regular and Solid weights internally;\n * Brands icons are rendered as a single icon and must not be combined with\n * `far` or `fas`.\n */\nexport type ButtonIcon = `fa-${string}` | `fab fa-${string}` | `ts-${string}`;\n\n/**\n * @description Visible content that gives a `Button` its accessible name.\n * Excludes `boolean`, `null` and `undefined` so a `Button` can never be\n * rendered without real, visible label content.\n */\nexport type ButtonContent = Exclude<ReactNode, boolean | null | undefined>;\n\n/**\n * @description Props for a visible-label native action button. Renders a\n * native `<button>` and forwards all remaining native button props, events,\n * `className` and `ref`.\n */\nexport interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {\n /**\n * @description Visual emphasis that communicates the action's role within\n * its action scope. At most one `primary` action should exist per closed\n * action scope (page, card, dialog, drawer, form, wizard step, or closed\n * accordion content).\n */\n variant: ButtonVariant;\n\n /**\n * @description Optional leading FontAwesome Classic or Brands icon name.\n * Always rendered before `children`; there is no trailing-icon or icon-only\n * mode on `Button` itself — use `IconButton` for an icon-only action.\n */\n icon?: ButtonIcon;\n\n /**\n * Shows a spinner while preserving the button label and prevents repeated\n * activation through the native disabled state.\n */\n loading?: boolean;\n\n /**\n * @description Visible, non-empty content used as the button label. Loading\n * preserves this content while adding a spinner.\n */\n children: ButtonContent;\n}\n"],"mappings":";;;;;AAcA,IAAa,kBAAkB;CAC7B;CACA;CACA;CACA;AACF"}
1
+ {"version":3,"file":"Button.types.js","names":[],"sources":["../../../src/components/button/Button.types.ts"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from 'react';\n\n/** Named configuration values; existing literal props and value lists remain supported. */\nexport enum ButtonVariants {\n Primary = 'primary',\n Outline = 'outline',\n Ghost = 'ghost',\n Danger = 'danger',\n}\n\n/**\n * @description Supported visual emphasis levels for {@link ButtonProps} and\n * `IconButtonProps`. Milestone 1 supports exactly these four values; there is\n * no default variant and no fifth value.\n * @see {@link https://tappqa.tobit.com/Bodywork/DesignSystem/#buttons | DesignSystem — Buttons & Aktionen}\n */\nexport type ButtonVariant = 'primary' | 'outline' | 'ghost' | 'danger';\n\n/**\n * Runtime representation of the finite Button variant contract.\n * Keep this list as the single source for Storybook controls and iteration.\n */\nexport const BUTTON_VARIANTS = [\n 'primary',\n 'outline',\n 'ghost',\n 'danger',\n] as const satisfies readonly ButtonVariant[];\n\n/**\n * @description A FontAwesome Classic icon name (e.g. `fa-plus`) or a\n * FontAwesome Brands icon including its style prefix (e.g. `fab fa-github`).\n * Classic icons resolve the matching Regular and Solid weights internally;\n * Brands icons are rendered as a single icon and must not be combined with\n * `far` or `fas`.\n */\nexport type ButtonIcon = `fa-${string}` | `fab fa-${string}` | `ts-${string}`;\n\n/**\n * @description Visible content that gives a `Button` its accessible name.\n * Excludes `boolean`, `null` and `undefined` so a `Button` can never be\n * rendered without real, visible label content.\n */\nexport type ButtonContent = Exclude<ReactNode, boolean | null | undefined>;\n\n/**\n * @description Props for a visible-label native action button. Renders a\n * native `<button>` and forwards all remaining native button props, events,\n * `className` and `ref`.\n */\nexport interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {\n /**\n * @description Visual emphasis that communicates the action's role within\n * its action scope. At most one `primary` action should exist per closed\n * action scope (page, card, dialog, drawer, form, wizard step, or closed\n * accordion content).\n */\n variant: ButtonVariant;\n\n /**\n * @description Optional leading FontAwesome Classic or Brands icon name.\n * Always rendered before `children`; there is no trailing-icon or icon-only\n * mode on `Button` itself — use `IconButton` for an icon-only action.\n */\n icon?: ButtonIcon;\n\n /**\n * Shows a spinner while preserving the button label and prevents repeated\n * activation through the native disabled state.\n */\n loading?: boolean;\n\n /**\n * @description Visible, non-empty content used as the button label. Loading\n * preserves this content while adding a spinner.\n */\n children: ButtonContent;\n}\n"],"mappings":";;AAGA,IAAY,iBAAL,yBAAA,gBAAA;CACL,eAAA,aAAA;CACA,eAAA,aAAA;CACA,eAAA,WAAA;CACA,eAAA,YAAA;;AACF,EAAA,CAAA,CAAA;;;;;AAcA,IAAa,kBAAkB;CAC7B;CACA;CACA;CACA;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/button/button-icon/ButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEvE,UAAU,eAAe;IACvB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,GAAI,UAAU,eAAe,gCAqB5C,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ButtonIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/button/button-icon/ButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEvE,UAAU,eAAe;IACvB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,GAAI,UAAU,eAAe,gCA2B5C,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -1,14 +1,17 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  //#region src/components/button/button-icon/ButtonIcon.tsx
3
3
  var ButtonIcon = ({ icon }) => {
4
- const isPlainIcon = icon.startsWith("fab ") || icon.startsWith("ts-");
4
+ const isPlainIcon = icon.startsWith("fab ") || icon.startsWith("fa-brands ") || icon.startsWith("ts-");
5
5
  return /* @__PURE__ */ jsx("span", {
6
6
  "aria-hidden": "true",
7
7
  className: "chayns-button-icon",
8
- children: isPlainIcon ? /* @__PURE__ */ jsx("span", {
8
+ children: isPlainIcon ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
9
9
  className: "chayns-button-icon__weight",
10
10
  children: /* @__PURE__ */ jsx("i", { className: icon })
11
- }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
11
+ }), /* @__PURE__ */ jsx("span", {
12
+ className: "chayns-button-icon__weight chayns-button-icon__weight--active",
13
+ children: /* @__PURE__ */ jsx("i", { className: icon })
14
+ })] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
12
15
  className: "chayns-button-icon__weight",
13
16
  children: /* @__PURE__ */ jsx("i", { className: `far ${icon}` })
14
17
  }), /* @__PURE__ */ jsx("span", {
@@ -17,6 +20,7 @@ var ButtonIcon = ({ icon }) => {
17
20
  })] })
18
21
  });
19
22
  };
23
+ Object.assign(ButtonIcon, { displayName: "ButtonIcon" });
20
24
  //#endregion
21
25
  export { ButtonIcon as default };
22
26
 
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonIcon.js","names":[],"sources":["../../../../src/components/button/button-icon/ButtonIcon.tsx"],"sourcesContent":["import type { ButtonIcon as ButtonIconName } from '../Button.types.js';\n\ninterface ButtonIconProps {\n icon: ButtonIconName;\n}\n\nconst ButtonIcon = ({ icon }: ButtonIconProps) => {\n const isPlainIcon = icon.startsWith('fab ') || icon.startsWith('ts-');\n\n return (\n <span aria-hidden=\"true\" className=\"chayns-button-icon\">\n {isPlainIcon ? (\n <span className=\"chayns-button-icon__weight\">\n <i className={icon} />\n </span>\n ) : (\n <>\n <span className=\"chayns-button-icon__weight\">\n <i className={`far ${icon}`} />\n </span>\n <span className=\"chayns-button-icon__weight chayns-button-icon__weight--active\">\n <i className={`fas ${icon}`} />\n </span>\n </>\n )}\n </span>\n );\n};\n\nexport default ButtonIcon;\n"],"mappings":";;AAMA,IAAM,cAAc,EAAE,WAA4B;CAChD,MAAM,cAAc,KAAK,WAAW,MAAM,KAAK,KAAK,WAAW,KAAK;CAEpE,OACE,oBAAC,QAAD;EAAM,eAAY;EAAO,WAAU;EAChC,UAAA,cACC,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAAC,KAAD,EAAG,WAAW,KAAO,CAAA;EACjB,CAAA,IAEN,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAAC,KAAD,EAAG,WAAW,OAAO,OAAS,CAAA;EAC1B,CAAA,GACN,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAAC,KAAD,EAAG,WAAW,OAAO,OAAS,CAAA;EAC1B,CAAA,CACN,EAAA,CAAA;CAEA,CAAA;AAEV"}
1
+ {"version":3,"file":"ButtonIcon.js","names":[],"sources":["../../../../src/components/button/button-icon/ButtonIcon.tsx"],"sourcesContent":["import type { ButtonIcon as ButtonIconName } from '../Button.types.js';\n\ninterface ButtonIconProps {\n icon: ButtonIconName;\n}\n\nconst ButtonIcon = ({ icon }: ButtonIconProps) => {\n const isPlainIcon =\n icon.startsWith('fab ') || icon.startsWith('fa-brands ') || icon.startsWith('ts-');\n\n return (\n <span aria-hidden=\"true\" className=\"chayns-button-icon\">\n {isPlainIcon ? (\n <>\n <span className=\"chayns-button-icon__weight\">\n <i className={icon} />\n </span>\n <span className=\"chayns-button-icon__weight chayns-button-icon__weight--active\">\n <i className={icon} />\n </span>\n </>\n ) : (\n <>\n <span className=\"chayns-button-icon__weight\">\n <i className={`far ${icon}`} />\n </span>\n <span className=\"chayns-button-icon__weight chayns-button-icon__weight--active\">\n <i className={`fas ${icon}`} />\n </span>\n </>\n )}\n </span>\n );\n};\n\nObject.assign(ButtonIcon, { displayName: 'ButtonIcon' });\n\nexport default ButtonIcon;\n"],"mappings":";;AAMA,IAAM,cAAc,EAAE,WAA4B;CAChD,MAAM,cACJ,KAAK,WAAW,MAAM,KAAK,KAAK,WAAW,YAAY,KAAK,KAAK,WAAW,KAAK;CAEnF,OACE,oBAAC,QAAD;EAAM,eAAY;EAAO,WAAU;EAChC,UAAA,cACC,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAAC,KAAD,EAAG,WAAW,KAAO,CAAA;EACjB,CAAA,GACN,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAAC,KAAD,EAAG,WAAW,KAAO,CAAA;EACjB,CAAA,CACN,EAAA,CAAA,IAEF,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAAC,KAAD,EAAG,WAAW,OAAO,OAAS,CAAA;EAC1B,CAAA,GACN,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAAC,KAAD,EAAG,WAAW,OAAO,OAAS,CAAA;EAC1B,CAAA,CACN,EAAA,CAAA;CAEA,CAAA;AAEV;AAEA,OAAO,OAAO,YAAY,EAAE,aAAa,aAAa,CAAC"}