@bi-digital/react 0.12.3 → 0.12.4

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 (230) hide show
  1. package/dist/{alert-footer-B80k5mkX.d.mts → alert-footer-BoTu7E1s.d.mts} +194 -599
  2. package/dist/components/alert/alert-footer.d.mts +1 -1
  3. package/dist/components/alert/alert-footer.mjs.map +1 -1
  4. package/dist/components/alert/alert.d.mts +1 -1
  5. package/dist/components/alert/alert.mjs +1 -1
  6. package/dist/components/alert/alert.mjs.map +1 -1
  7. package/dist/components/alert/index.d.mts +2 -2
  8. package/dist/components/avatar/avatar.d.mts +1 -1
  9. package/dist/components/avatar/avatar.mjs.map +1 -1
  10. package/dist/components/avatar/index.d.mts +2 -2
  11. package/dist/components/badge/badge.d.mts +1 -1
  12. package/dist/components/badge/badge.mjs.map +1 -1
  13. package/dist/components/badge/index.d.mts +2 -2
  14. package/dist/components/button/button.d.mts +1 -1
  15. package/dist/components/button/button.mjs.map +1 -1
  16. package/dist/components/button/index.d.mts +2 -2
  17. package/dist/components/card/card-action.d.mts +1 -1
  18. package/dist/components/card/card-action.mjs.map +1 -1
  19. package/dist/components/card/card-actions.d.mts +1 -1
  20. package/dist/components/card/card-actions.mjs.map +1 -1
  21. package/dist/components/card/card-content.d.mts +1 -1
  22. package/dist/components/card/card-content.mjs.map +1 -1
  23. package/dist/components/card/card-date.d.mts +1 -1
  24. package/dist/components/card/card-date.mjs.map +1 -1
  25. package/dist/components/card/card-header.d.mts +1 -1
  26. package/dist/components/card/card-header.mjs.map +1 -1
  27. package/dist/components/card/card-media.d.mts +1 -1
  28. package/dist/components/card/card-media.mjs.map +1 -1
  29. package/dist/components/card/card.d.mts +1 -1
  30. package/dist/components/card/card.mjs.map +1 -1
  31. package/dist/components/card/index.d.mts +2 -2
  32. package/dist/components/checkbox/checkbox-subsection.d.mts +1 -1
  33. package/dist/components/checkbox/checkbox-subsection.mjs.map +1 -1
  34. package/dist/components/checkbox/checkbox.d.mts +1 -1
  35. package/dist/components/checkbox/checkbox.mjs.map +1 -1
  36. package/dist/components/checkbox/index.d.mts +2 -2
  37. package/dist/components/chip/chip.d.mts +1 -1
  38. package/dist/components/chip/chip.mjs.map +1 -1
  39. package/dist/components/chip/index.d.mts +2 -2
  40. package/dist/components/details/details-content.d.mts +1 -1
  41. package/dist/components/details/details-content.mjs.map +1 -1
  42. package/dist/components/details/details-summary.d.mts +1 -1
  43. package/dist/components/details/details-summary.mjs.map +1 -1
  44. package/dist/components/details/details.d.mts +1 -1
  45. package/dist/components/details/details.mjs.map +1 -1
  46. package/dist/components/details/index.d.mts +2 -2
  47. package/dist/components/dialog/dialog-close-button.d.mts +1 -1
  48. package/dist/components/dialog/dialog-close-button.mjs.map +1 -1
  49. package/dist/components/dialog/dialog-content.d.mts +1 -1
  50. package/dist/components/dialog/dialog-content.mjs.map +1 -1
  51. package/dist/components/dialog/dialog-footer.d.mts +1 -1
  52. package/dist/components/dialog/dialog-footer.mjs.map +1 -1
  53. package/dist/components/dialog/dialog-header.d.mts +1 -1
  54. package/dist/components/dialog/dialog-header.mjs.map +1 -1
  55. package/dist/components/dialog/dialog-trigger-context.d.mts +1 -1
  56. package/dist/components/dialog/dialog-trigger-context.mjs.map +1 -1
  57. package/dist/components/dialog/dialog-trigger.d.mts +1 -1
  58. package/dist/components/dialog/dialog-trigger.mjs.map +1 -1
  59. package/dist/components/dialog/dialog.d.mts +1 -1
  60. package/dist/components/dialog/dialog.mjs.map +1 -1
  61. package/dist/components/dialog/index.d.mts +3 -3
  62. package/dist/components/dropdown/dropdown-button.d.mts +1 -1
  63. package/dist/components/dropdown/dropdown-button.mjs.map +1 -1
  64. package/dist/components/dropdown/dropdown-item.d.mts +1 -1
  65. package/dist/components/dropdown/dropdown-item.mjs.map +1 -1
  66. package/dist/components/dropdown/dropdown-list.d.mts +1 -1
  67. package/dist/components/dropdown/dropdown-list.mjs.map +1 -1
  68. package/dist/components/dropdown/dropdown-trigger-context.d.mts +1 -1
  69. package/dist/components/dropdown/dropdown-trigger-context.mjs.map +1 -1
  70. package/dist/components/dropdown/dropdown-trigger.d.mts +1 -1
  71. package/dist/components/dropdown/dropdown-trigger.mjs.map +1 -1
  72. package/dist/components/dropdown/dropdown.d.mts +1 -1
  73. package/dist/components/dropdown/dropdown.mjs.map +1 -1
  74. package/dist/components/dropdown/index.d.mts +4 -4
  75. package/dist/components/field/field-affix.d.mts +1 -1
  76. package/dist/components/field/field-affix.mjs.map +1 -1
  77. package/dist/components/field/field-description.d.mts +1 -1
  78. package/dist/components/field/field-description.mjs.map +1 -1
  79. package/dist/components/field/field.d.mts +1 -1
  80. package/dist/components/field/field.mjs.map +1 -1
  81. package/dist/components/field/index.d.mts +2 -2
  82. package/dist/components/fieldset/fieldset-description.d.mts +1 -1
  83. package/dist/components/fieldset/fieldset-description.mjs.map +1 -1
  84. package/dist/components/fieldset/fieldset-legend.d.mts +1 -1
  85. package/dist/components/fieldset/fieldset-legend.mjs.map +1 -1
  86. package/dist/components/fieldset/fieldset.d.mts +1 -1
  87. package/dist/components/fieldset/fieldset.mjs.map +1 -1
  88. package/dist/components/fieldset/index.d.mts +2 -2
  89. package/dist/components/filter-group/filter-group.d.mts +1 -1
  90. package/dist/components/filter-group/filter-group.mjs.map +1 -1
  91. package/dist/components/filter-group/index.d.mts +2 -2
  92. package/dist/components/footer/footer-links.d.mts +1 -1
  93. package/dist/components/footer/footer-links.mjs.map +1 -1
  94. package/dist/components/footer/footer.d.mts +1 -1
  95. package/dist/components/footer/footer.mjs.map +1 -1
  96. package/dist/components/footer/index.d.mts +3 -3
  97. package/dist/components/index.d.mts +9 -9
  98. package/dist/components/input/index.d.mts +2 -2
  99. package/dist/components/input/input.d.mts +1 -1
  100. package/dist/components/input/input.mjs.map +1 -1
  101. package/dist/components/label/index.d.mts +2 -2
  102. package/dist/components/label/label.d.mts +1 -1
  103. package/dist/components/label/label.mjs.map +1 -1
  104. package/dist/components/link/index.d.mts +2 -2
  105. package/dist/components/link/link.d.mts +1 -1
  106. package/dist/components/link/link.mjs +1 -2
  107. package/dist/components/link/link.mjs.map +1 -1
  108. package/dist/components/logo/index.d.mts +2 -2
  109. package/dist/components/logo/logo.d.mts +1 -1
  110. package/dist/components/logo/logo.mjs.map +1 -1
  111. package/dist/components/navbar/index.d.mts +2 -2
  112. package/dist/components/navbar/navbar.d.mts +1 -1
  113. package/dist/components/navbar/navbar.mjs.map +1 -1
  114. package/dist/components/navbar/sub-navbar.d.mts +1 -1
  115. package/dist/components/navbar/sub-navbar.mjs.map +1 -1
  116. package/dist/components/pagination/index.d.mts +3 -3
  117. package/dist/components/pagination/pagination-button.d.mts +1 -1
  118. package/dist/components/pagination/pagination-button.mjs.map +1 -1
  119. package/dist/components/pagination/pagination-item.d.mts +1 -1
  120. package/dist/components/pagination/pagination-item.mjs.map +1 -1
  121. package/dist/components/pagination/pagination.d.mts +1 -1
  122. package/dist/components/pagination/pagination.mjs.map +1 -1
  123. package/dist/components/popover/index.d.mts +3 -3
  124. package/dist/components/popover/popover-trigger-context.d.mts +1 -1
  125. package/dist/components/popover/popover-trigger-context.mjs +2 -1
  126. package/dist/components/popover/popover-trigger-context.mjs.map +1 -1
  127. package/dist/components/popover/popover-trigger.d.mts +1 -1
  128. package/dist/components/popover/popover-trigger.mjs +9 -7
  129. package/dist/components/popover/popover-trigger.mjs.map +1 -1
  130. package/dist/components/popover/popover.d.mts +1 -1
  131. package/dist/components/popover/popover.mjs.map +1 -1
  132. package/dist/components/radio/index.d.mts +2 -2
  133. package/dist/components/radio/radio.d.mts +1 -1
  134. package/dist/components/radio/radio.mjs.map +1 -1
  135. package/dist/components/search/index.d.mts +2 -2
  136. package/dist/components/search/search.d.mts +1 -1
  137. package/dist/components/search/search.mjs.map +1 -1
  138. package/dist/components/select/index.d.mts +2 -2
  139. package/dist/components/select/select-optgroup.d.mts +1 -1
  140. package/dist/components/select/select-optgroup.mjs.map +1 -1
  141. package/dist/components/select/select-option.d.mts +1 -1
  142. package/dist/components/select/select-option.mjs.map +1 -1
  143. package/dist/components/select/select.d.mts +1 -1
  144. package/dist/components/select/select.mjs.map +1 -1
  145. package/dist/components/selectfield/index.d.mts +2 -2
  146. package/dist/components/selectfield/selectfield.d.mts +1 -1
  147. package/dist/components/selectfield/selectfield.mjs.map +1 -1
  148. package/dist/components/skip-link/index.d.mts +2 -2
  149. package/dist/components/skip-link/skip-link.d.mts +1 -1
  150. package/dist/components/skip-link/skip-link.mjs.map +1 -1
  151. package/dist/components/spinner/index.d.mts +2 -2
  152. package/dist/components/spinner/spinner.d.mts +1 -1
  153. package/dist/components/spinner/spinner.mjs.map +1 -1
  154. package/dist/components/sticky-header/index.d.mts +3 -2
  155. package/dist/components/sticky-header/sticky-header.d.mts +1 -1
  156. package/dist/components/sticky-header/sticky-header.mjs.map +1 -1
  157. package/dist/components/switch/index.d.mts +2 -2
  158. package/dist/components/switch/switch.d.mts +1 -1
  159. package/dist/components/switch/switch.mjs.map +1 -1
  160. package/dist/components/tabs/index.d.mts +2 -2
  161. package/dist/components/tabs/tab.d.mts +1 -1
  162. package/dist/components/tabs/tab.mjs.map +1 -1
  163. package/dist/components/tabs/tabs-list.d.mts +1 -1
  164. package/dist/components/tabs/tabs-list.mjs.map +1 -1
  165. package/dist/components/tabs/tabs-panel.d.mts +1 -1
  166. package/dist/components/tabs/tabs-panel.mjs.map +1 -1
  167. package/dist/components/tabs/tabs.d.mts +1 -1
  168. package/dist/components/tabs/tabs.mjs.map +1 -1
  169. package/dist/components/textarea/index.d.mts +2 -2
  170. package/dist/components/textarea/textarea.d.mts +1 -1
  171. package/dist/components/textarea/textarea.mjs.map +1 -1
  172. package/dist/components/textfield/index.d.mts +2 -2
  173. package/dist/components/textfield/textfield.d.mts +1 -1
  174. package/dist/components/textfield/textfield.mjs.map +1 -1
  175. package/dist/components/tooltip/index.d.mts +2 -2
  176. package/dist/components/tooltip/tooltip.d.mts +1 -1
  177. package/dist/components/tooltip/tooltip.mjs.map +1 -1
  178. package/dist/components/validation-message/index.d.mts +2 -2
  179. package/dist/components/validation-message/validation-message.d.mts +1 -1
  180. package/dist/components/validation-message/validation-message.mjs.map +1 -1
  181. package/dist/{dialog-trigger-context-DbUhxoNL.d.mts → dialog-trigger-context-Orqo_NHj.d.mts} +3 -8
  182. package/dist/{dropdown-item-bA64wFOZ.d.mts → dropdown-item-B6Ahk6en.d.mts} +2 -7
  183. package/dist/{dropdown-list-CaYz-O1j.d.mts → dropdown-list-CXM9VhRl.d.mts} +2 -7
  184. package/dist/{footer-links-DwBghNrz.d.mts → footer-links-Dk977Qoi.d.mts} +2 -9
  185. package/dist/index-CaxrMD1A.d.mts +1 -0
  186. package/dist/index-Dqg5-Rt-.d.mts +1 -0
  187. package/dist/main.d.mts +15 -15
  188. package/dist/{pagination-item-DJicBrIN.d.mts → pagination-item-DqbKxAHU.d.mts} +2 -9
  189. package/dist/{popover-trigger-context-BLjAozBn.d.mts → popover-trigger-context-DeCbAC6V.d.mts} +3 -10
  190. package/dist/react-types.d.ts +43 -1
  191. package/dist/{sticky-header-CVfE0TUC.d.mts → sticky-header-BXlBWEWo.d.mts} +2 -6
  192. package/dist/{types-C0q7hMe_.d.mts → types-BoBDvyAZ.d.mts} +1 -2
  193. package/dist/{types-74lJC5tL.d.mts → types-oMo2uOVa.d.mts} +1 -1
  194. package/dist/types.d.mts +1 -1
  195. package/dist/{useCheckboxGroup-Boc_tLJ3.d.mts → useCheckboxGroup-BTzX7PfS.d.mts} +4 -7
  196. package/dist/{useIsElementAboveViewport-Cxt9TwLS.d.mts → useIsElementAboveViewport-Db7ndg3S.d.mts} +1 -2
  197. package/dist/{useIsomorphicLayoutEffect-DXCY5AxR.d.mts → useIsomorphicLayoutEffect-D-Mi76vH.d.mts} +1 -2
  198. package/dist/{useMediaQuery-Di0fXraw.d.mts → useMediaQuery-c1R0kas_.d.mts} +2 -5
  199. package/dist/{useScrollDirection-6pq5a8B3.d.mts → useScrollDirection-DS9Rfs_K.d.mts} +1 -1
  200. package/dist/utilities/hooks/index.d.mts +7 -7
  201. package/dist/utilities/hooks/useCheckboxGroup/useCheckboxGroup.d.mts +1 -1
  202. package/dist/utilities/hooks/useCheckboxGroup/useCheckboxGroup.mjs.map +1 -1
  203. package/dist/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.d.mts +1 -1
  204. package/dist/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.mjs.map +1 -1
  205. package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.mts +1 -1
  206. package/dist/utilities/hooks/useMediaQuery/useMediaQuery.d.mts +1 -1
  207. package/dist/utilities/hooks/useMediaQuery/useMediaQuery.mjs +2 -4
  208. package/dist/utilities/hooks/useMediaQuery/useMediaQuery.mjs.map +1 -1
  209. package/dist/utilities/hooks/useMergeRefs/useMergeRefs.d.mts +0 -1
  210. package/dist/utilities/hooks/useMergeRefs/useMergeRefs.mjs.map +1 -1
  211. package/dist/utilities/hooks/usePagination/usePagination.d.mts +1 -1
  212. package/dist/utilities/hooks/usePagination/usePagination.mjs.map +1 -1
  213. package/dist/utilities/hooks/useScrollDirection/useScrollDirection.d.mts +1 -1
  214. package/dist/utilities/hooks/useScrollDirection/useScrollDirection.mjs.map +1 -1
  215. package/dist/utilities/index.d.mts +8 -8
  216. package/dist/utilities/types.d.mts +1 -1
  217. package/dist/vanilla/dropdown/index.d.mts +3 -9
  218. package/dist/vanilla/dropdown/index.mjs.map +1 -1
  219. package/dist/vanilla/index.d.mts +1 -0
  220. package/dist/vanilla/popover/index.d.mts +3 -9
  221. package/dist/vanilla/popover/index.mjs +1 -3
  222. package/dist/vanilla/popover/index.mjs.map +1 -1
  223. package/dist/vanilla/sub-navbar/index.d.mts +1 -3
  224. package/dist/vanilla/sub-navbar/index.mjs.map +1 -1
  225. package/dist/vanilla/tooltip/index.d.mts +1 -1
  226. package/dist/vanilla/tooltip/index.mjs.map +1 -1
  227. package/dist/vite-env.d.mts +1 -1
  228. package/package.json +19 -19
  229. package/dist/index-D9zIjQH9.d.mts +0 -1
  230. package/dist/index-Dc-SdpIe.d.mts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"popover-trigger-context.mjs","names":[],"sources":["../../../src/components/popover/popover-trigger-context.tsx"],"sourcesContent":["import { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { createContext, useId, useState } from 'react';\nimport type { ReactNode } from 'react';\n\nexport const Context = createContext<{\n popoverId?: string;\n setPopoverId?: (id: string) => void;\n popoverOpen?: boolean;\n setPopoverOpen?: React.Dispatch<React.SetStateAction<boolean>>;\n}>({});\n\nexport type PopoverTriggerContextProps = {\n children: ReactNode;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n};\n\n/**\n * PopoverTriggerContext component, use to wrap a PopoverTrigger and Popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\nexport const PopoverTriggerContext = ({ children, open, onOpenChange }: PopoverTriggerContextProps) => {\n const randomPopoverId = useId();\n const [popoverId, setPopoverId] = useState(randomPopoverId);\n const [popoverOpen, setPopoverOpen] = useControllableState({\n prop: open,\n onChange: onOpenChange,\n defaultProp: false,\n caller: 'PopoverTriggerContext',\n });\n\n return <Context value={{ popoverId, setPopoverId, popoverOpen, setPopoverOpen }}>{children}</Context>;\n};\n"],"mappings":";;;;AAIA,MAAa,UAAU,cAKpB,EAAE,CAAC;;;;;;;;;;;;AA2BN,MAAa,yBAAyB,EAAE,UAAU,MAAM,mBAA+C;CAErG,MAAM,CAAC,WAAW,gBAAgB,SADV,OACkC,CAAC;CAC3D,MAAM,CAAC,aAAa,kBAAkB,qBAAqB;EACzD,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;EACT,CAAC;CAEF,OAAO,oBAAC,SAAD;EAAS,OAAO;GAAE;GAAW;GAAc;GAAa;GAAgB;EAAG;EAAmB,CAAA"}
1
+ {"version":3,"file":"popover-trigger-context.mjs","names":[],"sources":["../../../src/components/popover/popover-trigger-context.tsx"],"sourcesContent":["import { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { createContext, useId, useState } from 'react';\nimport type { ReactNode } from 'react';\n\nexport const Context = createContext<{\n popoverId?: string;\n setPopoverId?: (id: string) => void;\n popoverOpen?: boolean;\n setPopoverOpen?: React.Dispatch<React.SetStateAction<boolean>>;\n}>({});\n\nexport type PopoverTriggerContextProps = {\n children: ReactNode;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n};\n\n/**\n * PopoverTriggerContext component, use to wrap a PopoverTrigger and Popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\nexport const PopoverTriggerContext = ({ children, open, onOpenChange }: PopoverTriggerContextProps) => {\n const randomPopoverId = useId();\n const [popoverId, setPopoverId] = useState(randomPopoverId);\n const [popoverOpen, setPopoverOpen] = useControllableState({\n prop: open,\n onChange: onOpenChange,\n defaultProp: false,\n caller: 'PopoverTriggerContext',\n });\n\n return <Context value={{ popoverId, setPopoverId, popoverOpen, setPopoverOpen }}>{children}</Context>;\n};\n"],"mappings":";;;;AAIA,MAAa,UAAU,cAKpB,CAAC,CAAC;;;;;;;;;;;;AA2BL,MAAa,yBAAyB,EAAE,UAAU,MAAM,mBAA+C;CACrG,MAAM,kBAAkB,MAAM;CAC9B,MAAM,CAAC,WAAW,gBAAgB,SAAS,eAAe;CAC1D,MAAM,CAAC,aAAa,kBAAkB,qBAAqB;EACzD,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;CACV,CAAC;CAED,OAAO,oBAAC,SAAD;EAAS,OAAO;GAAE;GAAW;GAAc;GAAa;EAAe;EAAI;CAAkB,CAAA;AACtG"}
@@ -1,2 +1,2 @@
1
- import { Dt as PopoverTrigger, Ot as PopoverTriggerProps } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { Dt as PopoverTrigger, Ot as PopoverTriggerProps } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { PopoverTrigger, PopoverTriggerProps };
@@ -28,14 +28,16 @@ import { use } from "react";
28
28
  */
29
29
  const PopoverTrigger = ({ id, inline, asChild, ref, ...rest }) => {
30
30
  const { popoverId, popoverOpen, setPopoverOpen } = use(Context);
31
- return /* @__PURE__ */ jsx(asChild ? Slot : inline ? "button" : Button, {
31
+ const Component = asChild ? Slot : inline ? "button" : Button;
32
+ const popoverProps = Object.assign({
33
+ onClick: () => setPopoverOpen?.((prev) => !prev),
34
+ "aria-controls": popoverId,
35
+ "aria-expanded": popoverOpen,
36
+ ...inline ? { "data-popover": "inline" } : {}
37
+ }, rest);
38
+ return /* @__PURE__ */ jsx(Component, {
32
39
  ref,
33
- ...Object.assign({
34
- onClick: () => setPopoverOpen?.((prev) => !prev),
35
- "aria-controls": popoverId,
36
- "aria-expanded": popoverOpen,
37
- ...inline ? { "data-popover": "inline" } : {}
38
- }, rest)
40
+ ...popoverProps
39
41
  });
40
42
  };
41
43
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"popover-trigger.mjs","names":[],"sources":["../../../src/components/popover/popover-trigger.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { type HTMLAttributes, Ref, use } from 'react';\nimport type { DefaultProps } from '../../types';\nimport { Button, type ButtonProps } from '../button';\nimport { Context } from './popover-trigger-context';\n\nexport type PopoverTriggerProps =\n | ({\n /**\n * Will render the trigger as inline text.\n * @default false\n */\n inline?: true;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLButtonElement>;\n } & HTMLAttributes<HTMLButtonElement> &\n DefaultProps)\n | ({\n /**\n * Will not render the trigger as inline text.\n * @default false\n */\n inline?: false;\n } & ButtonProps);\n\n/**\n * PopoverTrigger component, used to trigger a popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example inline\n * <PopoverTriggerContext>\n * <Paragraph>\n * We can use it <PopoverTrigger inline={true}>inline</PopoverTrigger>.\n * </Paragraph>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\n// oxlint-disable-next-line no-unused-vars\nexport const PopoverTrigger = ({ id, inline, asChild, ref, ...rest }: PopoverTriggerProps) => {\n const { popoverId, popoverOpen, setPopoverOpen } = use(Context);\n const Component = asChild ? Slot : inline ? 'button' : Button;\n\n const popoverProps = Object.assign(\n {\n onClick: () => setPopoverOpen?.((prev) => !prev),\n 'aria-controls': popoverId,\n 'aria-expanded': popoverOpen,\n ...(inline\n ? {\n 'data-popover': 'inline',\n }\n : {}),\n },\n rest,\n );\n\n return <Component ref={ref} {...popoverProps} />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,kBAAkB,EAAE,IAAI,QAAQ,SAAS,KAAK,GAAG,WAAgC;CAC5F,MAAM,EAAE,WAAW,aAAa,mBAAmB,IAAI,QAAQ;CAiB/D,OAAO,oBAhBW,UAAU,OAAO,SAAS,WAAW,QAgBhD;EAAgB;EAAK,GAdP,OAAO,OAC1B;GACE,eAAe,kBAAkB,SAAS,CAAC,KAAK;GAChD,iBAAiB;GACjB,iBAAiB;GACjB,GAAI,SACA,EACE,gBAAgB,UACjB,GACD,EAAE;GACP,EACD,KAG0C;EAAI,CAAA"}
1
+ {"version":3,"file":"popover-trigger.mjs","names":[],"sources":["../../../src/components/popover/popover-trigger.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { type HTMLAttributes, Ref, use } from 'react';\nimport type { DefaultProps } from '../../types';\nimport { Button, type ButtonProps } from '../button';\nimport { Context } from './popover-trigger-context';\n\nexport type PopoverTriggerProps =\n | ({\n /**\n * Will render the trigger as inline text.\n * @default false\n */\n inline?: true;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLButtonElement>;\n } & HTMLAttributes<HTMLButtonElement> &\n DefaultProps)\n | ({\n /**\n * Will not render the trigger as inline text.\n * @default false\n */\n inline?: false;\n } & ButtonProps);\n\n/**\n * PopoverTrigger component, used to trigger a popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example inline\n * <PopoverTriggerContext>\n * <Paragraph>\n * We can use it <PopoverTrigger inline={true}>inline</PopoverTrigger>.\n * </Paragraph>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\n// oxlint-disable-next-line no-unused-vars\nexport const PopoverTrigger = ({ id, inline, asChild, ref, ...rest }: PopoverTriggerProps) => {\n const { popoverId, popoverOpen, setPopoverOpen } = use(Context);\n const Component = asChild ? Slot : inline ? 'button' : Button;\n\n const popoverProps = Object.assign(\n {\n onClick: () => setPopoverOpen?.((prev) => !prev),\n 'aria-controls': popoverId,\n 'aria-expanded': popoverOpen,\n ...(inline\n ? {\n 'data-popover': 'inline',\n }\n : {}),\n },\n rest,\n );\n\n return <Component ref={ref} {...popoverProps} />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,kBAAkB,EAAE,IAAI,QAAQ,SAAS,KAAK,GAAG,WAAgC;CAC5F,MAAM,EAAE,WAAW,aAAa,mBAAmB,IAAI,OAAO;CAC9D,MAAM,YAAY,UAAU,OAAO,SAAS,WAAW;CAEvD,MAAM,eAAe,OAAO,OAC1B;EACE,eAAe,kBAAkB,SAAS,CAAC,IAAI;EAC/C,iBAAiB;EACjB,iBAAiB;EACjB,GAAI,SACA,EACE,gBAAgB,SAClB,IACA,CAAC;CACP,GACA,IACF;CAEA,OAAO,oBAAC,WAAD;EAAgB;EAAK,GAAI;CAAe,CAAA;AACjD"}
@@ -1,2 +1,2 @@
1
- import { At as PopoverProps, kt as Popover } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { At as PopoverProps, kt as Popover } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { Popover, PopoverProps };
@@ -1 +1 @@
1
- {"version":3,"file":"popover.mjs","names":["cl"],"sources":["../../../src/components/popover/popover.tsx"],"sourcesContent":["// Thanks to Designsystemet:\n// https://github.com/digdir/designsystemet/blob/8aa6dc274e5b0338d15572f44b5dd3fab6fa4eb1/packages/react/src/components/Popover/Popover.tsx\n\nimport { autoUpdate, computePosition, flip, offset, shift, hide, size } from '@floating-ui/dom';\nimport type { Middleware, Placement } from '@floating-ui/dom';\nimport { Slot } from '@radix-ui/react-slot';\nimport cl from 'clsx/lite';\nimport { use, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useEffect } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\nimport { Context } from './popover-trigger-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { arrowPseudoElement } from '../../vanilla/popover';\n\nexport type PopoverProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * `id` to connect the trigger with the popover - required when not using PopoverContext.\n */\n id?: string;\n /**\n * Placement of the popover on the trigger.\n * @default 'top'\n */\n placement?: Placement;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n /**\n * Additional middleware to use for positioning the popover.\n *\n * @example\n * Prevent the popover from overflowing the navbar by using the `size` middleware:\n * ```ts\n * positionMiddleware={[\n * size({\n * apply: ({ availableHeight, elements, ...state }) => {\n * const available = `${Math.max(0, availableHeight)}px`;\n * const maxHeight = state.placement.includes('top')\n * ? `calc(${available} - var(--bi-layout-navbar-height, 0))`\n * : available;\n * elements.floating.style.maxHeight = maxHeight;\n * },\n * padding,\n * })\n * ]}\n * ```\n */\n positionMiddleware?: Middleware[];\n /**\n * The padding used by the `offset` middleware.\n * @default '20'\n */\n padding?: number;\n /**\n * Show an arrow on the popover, pointing toward the center of the reference element.\n * @default false\n */\n arrow?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\n/**\n * Popover component, used to display content in a popover over an element.\n *\n * @example with TriggerContext\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example without TriggerContext\n * <Button aria-controls=\"my-popover\" aria-expanded={open}>Open Popover</Button>\n * <Popover open={open} onOpenChange={onOpenChange} id=\"my-popover\">\n * Content\n * </Popover>\n */\nexport const Popover = ({\n id,\n className,\n onOpenChange,\n open,\n placement = 'top',\n disableAutoPlacement = false,\n positionMiddleware = [],\n padding = 20,\n arrow = false,\n asChild = false,\n ref,\n ...rest\n}: PopoverProps) => {\n const Component = asChild ? Slot : 'div';\n\n const popoverRef = useRef<HTMLDivElement>(null);\n const isControlled = useRef(open !== undefined);\n const mergedRefs = useMergeRefs([popoverRef, ref]);\n const { popoverId, setPopoverId, popoverOpen, setPopoverOpen } = use(Context);\n\n const [isOpen, setIsOpen] = useControllableState({\n // False positive: isControlled will never change, but is just used to store the initial controlled state\n prop: isControlled.current ? open : popoverOpen,\n onChange: (val) => {\n onOpenChange?.(val);\n setPopoverOpen?.(val);\n },\n defaultProp: false,\n caller: 'Popover',\n });\n\n useEffect(() => {\n const popover = popoverRef.current;\n const handleClick = (event: MouseEvent) => {\n const el = event.target as Element | null;\n const isTrigger = el?.closest?.(`[aria-controls=\"${popover?.id}\"]`);\n const isOutside = !isTrigger && !popover?.contains(el as Node);\n\n if (isOutside) {\n setIsOpen(false);\n }\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || !isOpen) return;\n event.preventDefault(); // Prevent closing fullscreen in Safari\n setIsOpen(false);\n };\n\n document.addEventListener('click', handleClick, true); // Use capture to execute before React event API\n document.addEventListener('keydown', handleKeydown);\n return () => {\n document.removeEventListener('click', handleClick, true);\n document.removeEventListener('keydown', handleKeydown);\n };\n }, [isOpen, setIsOpen]);\n\n useEffect(() => {\n const popover = popoverRef.current;\n const trigger = document.querySelector(`[aria-controls=\"${popover?.id}\"]`);\n\n if (popover && trigger && isOpen)\n return autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n middleware: [\n offset(padding),\n ...(disableAutoPlacement ? [] : [flip({ padding }), shift({ padding })]),\n ...positionMiddleware,\n hide({ padding, strategy: 'escaped' }),\n ...(arrow ? [arrowPseudoElement] : []),\n size({\n apply({ rects, elements }) {\n elements.floating.style.setProperty('--bic-popover-trigger-width', `${rects.reference.width}px`);\n },\n }),\n ],\n strategy: 'fixed',\n placement,\n }).then(({ x, y, middlewareData }) => {\n popover.style.translate = `${x}px ${y}px`;\n popover.style.visibility = middlewareData.hide?.referenceHidden ? 'hidden' : 'visible';\n });\n });\n }, [isOpen, placement, id, disableAutoPlacement, positionMiddleware, padding, arrow]);\n\n // Update context with id\n useEffect(() => {\n if (id) setPopoverId?.(id);\n }, [id, setPopoverId]);\n\n return (\n <Component\n className={cl('bi-popover', className)}\n id={id || popoverId}\n aria-hidden={!isOpen}\n data-arrow={arrow || undefined}\n ref={mergedRefs}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqGA,MAAa,WAAW,EACtB,IACA,WACA,cACA,MACA,YAAY,OACZ,uBAAuB,OACvB,qBAAqB,EAAE,EACvB,UAAU,IACV,QAAQ,OACR,UAAU,OACV,KACA,GAAG,WACe;CAClB,MAAM,YAAY,UAAU,OAAO;CAEnC,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,eAAe,OAAO,SAAS,KAAA,EAAU;CAC/C,MAAM,aAAa,aAAa,CAAC,YAAY,IAAI,CAAC;CAClD,MAAM,EAAE,WAAW,cAAc,aAAa,mBAAmB,IAAI,QAAQ;CAE7E,MAAM,CAAC,QAAQ,aAAa,qBAAqB;EAE/C,MAAM,aAAa,UAAU,OAAO;EACpC,WAAW,QAAQ;GACjB,eAAe,IAAI;GACnB,iBAAiB,IAAI;;EAEvB,aAAa;EACb,QAAQ;EACT,CAAC;CAEF,gBAAgB;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,eAAe,UAAsB;GACzC,MAAM,KAAK,MAAM;GAIjB,IAFkB,CADA,IAAI,UAAU,mBAAmB,SAAS,GAAG,IAAI,IACnC,CAAC,SAAS,SAAS,GAAW,EAG5D,UAAU,MAAM;;EAIpB,MAAM,iBAAiB,UAAyB;GAC9C,IAAI,MAAM,QAAQ,YAAY,CAAC,QAAQ;GACvC,MAAM,gBAAgB;GACtB,UAAU,MAAM;;EAGlB,SAAS,iBAAiB,SAAS,aAAa,KAAK;EACrD,SAAS,iBAAiB,WAAW,cAAc;EACnD,aAAa;GACX,SAAS,oBAAoB,SAAS,aAAa,KAAK;GACxD,SAAS,oBAAoB,WAAW,cAAc;;IAEvD,CAAC,QAAQ,UAAU,CAAC;CAEvB,gBAAgB;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,UAAU,SAAS,cAAc,mBAAmB,SAAS,GAAG,IAAI;EAE1E,IAAI,WAAW,WAAW,QACxB,OAAO,WAAW,SAAS,eAAe;GACxC,gBAAgB,SAAS,SAAS;IAChC,YAAY;KACV,OAAO,QAAQ;KACf,GAAI,uBAAuB,EAAE,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;KACvE,GAAG;KACH,KAAK;MAAE;MAAS,UAAU;MAAW,CAAC;KACtC,GAAI,QAAQ,CAAC,mBAAmB,GAAG,EAAE;KACrC,KAAK,EACH,MAAM,EAAE,OAAO,YAAY;MACzB,SAAS,SAAS,MAAM,YAAY,+BAA+B,GAAG,MAAM,UAAU,MAAM,IAAI;QAEnG,CAAC;KACH;IACD,UAAU;IACV;IACD,CAAC,CAAC,MAAM,EAAE,GAAG,GAAG,qBAAqB;IACpC,QAAQ,MAAM,YAAY,GAAG,EAAE,KAAK,EAAE;IACtC,QAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;KAC7E;IACF;IACH;EAAC;EAAQ;EAAW;EAAI;EAAsB;EAAoB;EAAS;EAAM,CAAC;CAGrF,gBAAgB;EACd,IAAI,IAAI,eAAe,GAAG;IACzB,CAAC,IAAI,aAAa,CAAC;CAEtB,OACE,oBAAC,WAAD;EACE,WAAWA,KAAG,cAAc,UAAU;EACtC,IAAI,MAAM;EACV,eAAa,CAAC;EACd,cAAY,SAAS,KAAA;EACrB,KAAK;EACL,GAAI;EACJ,CAAA"}
1
+ {"version":3,"file":"popover.mjs","names":["cl"],"sources":["../../../src/components/popover/popover.tsx"],"sourcesContent":["// Thanks to Designsystemet:\n// https://github.com/digdir/designsystemet/blob/8aa6dc274e5b0338d15572f44b5dd3fab6fa4eb1/packages/react/src/components/Popover/Popover.tsx\n\nimport { autoUpdate, computePosition, flip, offset, shift, hide, size } from '@floating-ui/dom';\nimport type { Middleware, Placement } from '@floating-ui/dom';\nimport { Slot } from '@radix-ui/react-slot';\nimport cl from 'clsx/lite';\nimport { use, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useEffect } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\nimport { Context } from './popover-trigger-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { arrowPseudoElement } from '../../vanilla/popover';\n\nexport type PopoverProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * `id` to connect the trigger with the popover - required when not using PopoverContext.\n */\n id?: string;\n /**\n * Placement of the popover on the trigger.\n * @default 'top'\n */\n placement?: Placement;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n /**\n * Additional middleware to use for positioning the popover.\n *\n * @example\n * Prevent the popover from overflowing the navbar by using the `size` middleware:\n * ```ts\n * positionMiddleware={[\n * size({\n * apply: ({ availableHeight, elements, ...state }) => {\n * const available = `${Math.max(0, availableHeight)}px`;\n * const maxHeight = state.placement.includes('top')\n * ? `calc(${available} - var(--bi-layout-navbar-height, 0))`\n * : available;\n * elements.floating.style.maxHeight = maxHeight;\n * },\n * padding,\n * })\n * ]}\n * ```\n */\n positionMiddleware?: Middleware[];\n /**\n * The padding used by the `offset` middleware.\n * @default '20'\n */\n padding?: number;\n /**\n * Show an arrow on the popover, pointing toward the center of the reference element.\n * @default false\n */\n arrow?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\n/**\n * Popover component, used to display content in a popover over an element.\n *\n * @example with TriggerContext\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example without TriggerContext\n * <Button aria-controls=\"my-popover\" aria-expanded={open}>Open Popover</Button>\n * <Popover open={open} onOpenChange={onOpenChange} id=\"my-popover\">\n * Content\n * </Popover>\n */\nexport const Popover = ({\n id,\n className,\n onOpenChange,\n open,\n placement = 'top',\n disableAutoPlacement = false,\n positionMiddleware = [],\n padding = 20,\n arrow = false,\n asChild = false,\n ref,\n ...rest\n}: PopoverProps) => {\n const Component = asChild ? Slot : 'div';\n\n const popoverRef = useRef<HTMLDivElement>(null);\n const isControlled = useRef(open !== undefined);\n const mergedRefs = useMergeRefs([popoverRef, ref]);\n const { popoverId, setPopoverId, popoverOpen, setPopoverOpen } = use(Context);\n\n const [isOpen, setIsOpen] = useControllableState({\n // False positive: isControlled will never change, but is just used to store the initial controlled state\n prop: isControlled.current ? open : popoverOpen,\n onChange: (val) => {\n onOpenChange?.(val);\n setPopoverOpen?.(val);\n },\n defaultProp: false,\n caller: 'Popover',\n });\n\n useEffect(() => {\n const popover = popoverRef.current;\n const handleClick = (event: MouseEvent) => {\n const el = event.target as Element | null;\n const isTrigger = el?.closest?.(`[aria-controls=\"${popover?.id}\"]`);\n const isOutside = !isTrigger && !popover?.contains(el as Node);\n\n if (isOutside) {\n setIsOpen(false);\n }\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || !isOpen) return;\n event.preventDefault(); // Prevent closing fullscreen in Safari\n setIsOpen(false);\n };\n\n document.addEventListener('click', handleClick, true); // Use capture to execute before React event API\n document.addEventListener('keydown', handleKeydown);\n return () => {\n document.removeEventListener('click', handleClick, true);\n document.removeEventListener('keydown', handleKeydown);\n };\n }, [isOpen, setIsOpen]);\n\n useEffect(() => {\n const popover = popoverRef.current;\n const trigger = document.querySelector(`[aria-controls=\"${popover?.id}\"]`);\n\n if (popover && trigger && isOpen)\n return autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n middleware: [\n offset(padding),\n ...(disableAutoPlacement ? [] : [flip({ padding }), shift({ padding })]),\n ...positionMiddleware,\n hide({ padding, strategy: 'escaped' }),\n ...(arrow ? [arrowPseudoElement] : []),\n size({\n apply({ rects, elements }) {\n elements.floating.style.setProperty('--bic-popover-trigger-width', `${rects.reference.width}px`);\n },\n }),\n ],\n strategy: 'fixed',\n placement,\n }).then(({ x, y, middlewareData }) => {\n popover.style.translate = `${x}px ${y}px`;\n popover.style.visibility = middlewareData.hide?.referenceHidden ? 'hidden' : 'visible';\n });\n });\n }, [isOpen, placement, id, disableAutoPlacement, positionMiddleware, padding, arrow]);\n\n // Update context with id\n useEffect(() => {\n if (id) setPopoverId?.(id);\n }, [id, setPopoverId]);\n\n return (\n <Component\n className={cl('bi-popover', className)}\n id={id || popoverId}\n aria-hidden={!isOpen}\n data-arrow={arrow || undefined}\n ref={mergedRefs}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqGA,MAAa,WAAW,EACtB,IACA,WACA,cACA,MACA,YAAY,OACZ,uBAAuB,OACvB,qBAAqB,CAAC,GACtB,UAAU,IACV,QAAQ,OACR,UAAU,OACV,KACA,GAAG,WACe;CAClB,MAAM,YAAY,UAAU,OAAO;CAEnC,MAAM,aAAa,OAAuB,IAAI;CAC9C,MAAM,eAAe,OAAO,SAAS,KAAA,CAAS;CAC9C,MAAM,aAAa,aAAa,CAAC,YAAY,GAAG,CAAC;CACjD,MAAM,EAAE,WAAW,cAAc,aAAa,mBAAmB,IAAI,OAAO;CAE5E,MAAM,CAAC,QAAQ,aAAa,qBAAqB;EAE/C,MAAM,aAAa,UAAU,OAAO;EACpC,WAAW,QAAQ;GACjB,eAAe,GAAG;GAClB,iBAAiB,GAAG;EACtB;EACA,aAAa;EACb,QAAQ;CACV,CAAC;CAED,gBAAgB;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,eAAe,UAAsB;GACzC,MAAM,KAAK,MAAM;GAIjB,IAFkB,CADA,IAAI,UAAU,mBAAmB,SAAS,GAAG,GAAG,KAClC,CAAC,SAAS,SAAS,EAAU,GAG3D,UAAU,KAAK;EAEnB;EAEA,MAAM,iBAAiB,UAAyB;GAC9C,IAAI,MAAM,QAAQ,YAAY,CAAC,QAAQ;GACvC,MAAM,eAAe;GACrB,UAAU,KAAK;EACjB;EAEA,SAAS,iBAAiB,SAAS,aAAa,IAAI;EACpD,SAAS,iBAAiB,WAAW,aAAa;EAClD,aAAa;GACX,SAAS,oBAAoB,SAAS,aAAa,IAAI;GACvD,SAAS,oBAAoB,WAAW,aAAa;EACvD;CACF,GAAG,CAAC,QAAQ,SAAS,CAAC;CAEtB,gBAAgB;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,UAAU,SAAS,cAAc,mBAAmB,SAAS,GAAG,GAAG;EAEzE,IAAI,WAAW,WAAW,QACxB,OAAO,WAAW,SAAS,eAAe;GACxC,gBAAgB,SAAS,SAAS;IAChC,YAAY;KACV,OAAO,OAAO;KACd,GAAI,uBAAuB,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,MAAM,EAAE,QAAQ,CAAC,CAAC;KACtE,GAAG;KACH,KAAK;MAAE;MAAS,UAAU;KAAU,CAAC;KACrC,GAAI,QAAQ,CAAC,kBAAkB,IAAI,CAAC;KACpC,KAAK,EACH,MAAM,EAAE,OAAO,YAAY;MACzB,SAAS,SAAS,MAAM,YAAY,+BAA+B,GAAG,MAAM,UAAU,MAAM,GAAG;KACjG,EACF,CAAC;IACH;IACA,UAAU;IACV;GACF,CAAC,CAAC,CAAC,MAAM,EAAE,GAAG,GAAG,qBAAqB;IACpC,QAAQ,MAAM,YAAY,GAAG,EAAE,KAAK,EAAE;IACtC,QAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;GAC/E,CAAC;EACH,CAAC;CACL,GAAG;EAAC;EAAQ;EAAW;EAAI;EAAsB;EAAoB;EAAS;CAAK,CAAC;CAGpF,gBAAgB;EACd,IAAI,IAAI,eAAe,EAAE;CAC3B,GAAG,CAAC,IAAI,YAAY,CAAC;CAErB,OACE,oBAAC,WAAD;EACE,WAAWA,KAAG,cAAc,SAAS;EACrC,IAAI,MAAM;EACV,eAAa,CAAC;EACd,cAAY,SAAS,KAAA;EACrB,KAAK;EACL,GAAI;CACL,CAAA;AAEL"}
@@ -1,2 +1,2 @@
1
- import { B as RadioProps, z as Radio } from "../../alert-footer-B80k5mkX.mjs";
2
- export { Radio, RadioProps };
1
+ import { B as RadioProps, z as Radio } from "../../alert-footer-BoTu7E1s.mjs";
2
+ export { Radio, type RadioProps };
@@ -1,2 +1,2 @@
1
- import { B as RadioProps, z as Radio } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { B as RadioProps, z as Radio } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { Radio, RadioProps };
@@ -1 +1 @@
1
- {"version":3,"file":"radio.mjs","names":[],"sources":["../../../src/components/radio/radio.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type RadioProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'>,\n {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Add error indication to the radio. */\n error?: boolean;\n /** If true, the radio will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Radio = ({\n label,\n description,\n error,\n fullwidth,\n style,\n className,\n ref,\n id,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: RadioProps) => {\n const descriptionId = useId();\n\n const ariaDescribedBy = [description ? descriptionId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n\n return (\n <Field\n className={className}\n data-color={color}\n data-color-scheme={colorScheme}\n style={style}\n fullwidth={fullwidth}\n asChild\n >\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n {...props}\n />\n {label && (\n <Label weight='medium' htmlFor={id} asChild>\n <span>{label}</span>\n </Label>\n )}\n {description && (\n // Aria-hidden is used to prevent screen readers from reading the description twice:\n // once as part of the label and once from being connected through aria-describedby.\n <FieldDescription aria-hidden='true' id={descriptionId}>\n {description}\n </FieldDescription>\n )}\n </label>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;AAuBA,MAAa,SAAS,EACpB,OACA,aACA,OACA,WACA,OACA,WACA,KACA,IACA,cAAc,OACd,qBAAqB,aACrB,oBAAoB,qBACpB,GAAG,YACa;CAChB,MAAM,gBAAgB,OAAO;CAE7B,MAAM,kBAAkB,CAAC,cAAc,gBAAgB,IAAI,oBAAoB,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,KAAA;CAEpG,OACE,oBAAC,OAAD;EACa;EACX,cAAY;EACZ,qBAAmB;EACZ;EACI;EACX,SAAA;YAEA,qBAAC,SAAD,EAAA,UAAA;GACE,oBAAC,OAAD;IACE,MAAK;IACD;IACC;IACL,gBAAc,SAAS,KAAA;IACvB,oBAAkB;IAClB,GAAI;IACJ,CAAA;GACD,SACC,oBAAC,OAAD;IAAO,QAAO;IAAS,SAAS;IAAI,SAAA;cAClC,oBAAC,QAAD,EAAA,UAAO,OAAa,CAAA;IACd,CAAA;GAET,eAGC,oBAAC,kBAAD;IAAkB,eAAY;IAAO,IAAI;cACtC;IACgB,CAAA;GAEf,EAAA,CAAA;EACF,CAAA"}
1
+ {"version":3,"file":"radio.mjs","names":[],"sources":["../../../src/components/radio/radio.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type RadioProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'>,\n {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Add error indication to the radio. */\n error?: boolean;\n /** If true, the radio will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Radio = ({\n label,\n description,\n error,\n fullwidth,\n style,\n className,\n ref,\n id,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: RadioProps) => {\n const descriptionId = useId();\n\n const ariaDescribedBy = [description ? descriptionId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n\n return (\n <Field\n className={className}\n data-color={color}\n data-color-scheme={colorScheme}\n style={style}\n fullwidth={fullwidth}\n asChild\n >\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n {...props}\n />\n {label && (\n <Label weight='medium' htmlFor={id} asChild>\n <span>{label}</span>\n </Label>\n )}\n {description && (\n // Aria-hidden is used to prevent screen readers from reading the description twice:\n // once as part of the label and once from being connected through aria-describedby.\n <FieldDescription aria-hidden='true' id={descriptionId}>\n {description}\n </FieldDescription>\n )}\n </label>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;AAuBA,MAAa,SAAS,EACpB,OACA,aACA,OACA,WACA,OACA,WACA,KACA,IACA,cAAc,OACd,qBAAqB,aACrB,oBAAoB,qBACpB,GAAG,YACa;CAChB,MAAM,gBAAgB,MAAM;CAE5B,MAAM,kBAAkB,CAAC,cAAc,gBAAgB,IAAI,mBAAmB,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,KAAK,KAAA;CAEpG,OACE,oBAAC,OAAD;EACa;EACX,cAAY;EACZ,qBAAmB;EACZ;EACI;EACX,SAAA;EAEA,UAAA,qBAAC,SAAD,EAAA,UAAA;GACE,oBAAC,OAAD;IACE,MAAK;IACD;IACC;IACL,gBAAc,SAAS,KAAA;IACvB,oBAAkB;IAClB,GAAI;GACL,CAAA;GACA,SACC,oBAAC,OAAD;IAAO,QAAO;IAAS,SAAS;IAAI,SAAA;IAClC,UAAA,oBAAC,QAAD,EAAA,UAAO,MAAY,CAAA;GACd,CAAA;GAER,eAGC,oBAAC,kBAAD;IAAkB,eAAY;IAAO,IAAI;IACtC,UAAA;GACe,CAAA;EAEf,EAAA,CAAA;CACF,CAAA;AAEX"}
@@ -1,2 +1,2 @@
1
- import { L as Search, R as SearchProps } from "../../alert-footer-B80k5mkX.mjs";
2
- export { Search, SearchProps };
1
+ import { L as Search, R as SearchProps } from "../../alert-footer-BoTu7E1s.mjs";
2
+ export { Search, type SearchProps };
@@ -1,2 +1,2 @@
1
- import { L as Search, R as SearchProps } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { L as Search, R as SearchProps } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { Search, SearchProps };
@@ -1 +1 @@
1
- {"version":3,"file":"search.mjs","names":[],"sources":["../../../src/components/search/search.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Field, FieldAffixes, FieldAffix } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { CrossSmallIcon, MagnifyingGlassIcon } from '@bi-digital/icons';\nimport type { MergeRight } from '../../utilities';\nimport { Button } from '../button';\n\nexport type SearchProps = MergeRight<\n Omit<InputProps, 'type' | 'size'>,\n {\n /**\n * Size of the search.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Called when the user presses enter. You can use this to for example navigate on submit. */\n onSubmit?: (value: string) => void;\n /** Called when the user resets the search input. */\n onReset?: (value: string) => void;\n /**\n * Aria-label for the clear button.\n * @default 'Clear'\n */\n clearAriaLabel?: string;\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n }\n>;\n\nexport const Search = ({\n className,\n onSubmit,\n onReset,\n clearAriaLabel = 'Clear',\n size = 'medium',\n ref,\n style,\n fullwidth,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n ...props\n}: SearchProps) => {\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n if (onSubmit) {\n const input = e.currentTarget.querySelector('input');\n onSubmit(input?.value || '');\n }\n };\n const handleReset = () => {\n if (onReset) {\n onReset('');\n }\n };\n return (\n <Field\n className={clsx('bi-search', className)}\n data-color={color}\n data-color-scheme={colorScheme}\n style={style}\n fullwidth={fullwidth}\n asChild\n >\n <form onSubmit={handleSubmit} onReset={handleReset}>\n <FieldAffixes>\n <FieldAffix>\n <MagnifyingGlassIcon size={size} />\n </FieldAffix>\n <Input type='text' ref={ref} size={size} {...props} />\n <FieldAffix aria-hidden='false'>\n <Button aria-label={clearAriaLabel} icon size={size} variant='text' type='reset'>\n <CrossSmallIcon size={size} aria-hidden='true' />\n </Button>\n </FieldAffix>\n </FieldAffixes>\n </form>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;AA6BA,MAAa,UAAU,EACrB,WACA,UACA,SACA,iBAAiB,SACjB,OAAO,UACP,KACA,OACA,WACA,cAAc,OACd,qBAAqB,aACrB,GAAG,YACc;CACjB,MAAM,gBAAgB,MAAwC;EAC5D,EAAE,gBAAgB;EAClB,IAAI,UAEF,SADc,EAAE,cAAc,cAAc,QAC9B,EAAE,SAAS,GAAG;;CAGhC,MAAM,oBAAoB;EACxB,IAAI,SACF,QAAQ,GAAG;;CAGf,OACE,oBAAC,OAAD;EACE,WAAW,KAAK,aAAa,UAAU;EACvC,cAAY;EACZ,qBAAmB;EACZ;EACI;EACX,SAAA;YAEA,oBAAC,QAAD;GAAM,UAAU;GAAc,SAAS;aACrC,qBAAC,cAAD,EAAA,UAAA;IACE,oBAAC,YAAD,EAAA,UACE,oBAAC,qBAAD,EAA2B,MAAQ,CAAA,EACxB,CAAA;IACb,oBAAC,OAAD;KAAO,MAAK;KAAY;KAAW;KAAM,GAAI;KAAS,CAAA;IACtD,oBAAC,YAAD;KAAY,eAAY;eACtB,oBAAC,QAAD;MAAQ,cAAY;MAAgB,MAAA;MAAW;MAAM,SAAQ;MAAO,MAAK;gBACvE,oBAAC,gBAAD;OAAsB;OAAM,eAAY;OAAS,CAAA;MAC1C,CAAA;KACE,CAAA;IACA,EAAA,CAAA;GACV,CAAA;EACD,CAAA"}
1
+ {"version":3,"file":"search.mjs","names":[],"sources":["../../../src/components/search/search.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Field, FieldAffixes, FieldAffix } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { CrossSmallIcon, MagnifyingGlassIcon } from '@bi-digital/icons';\nimport type { MergeRight } from '../../utilities';\nimport { Button } from '../button';\n\nexport type SearchProps = MergeRight<\n Omit<InputProps, 'type' | 'size'>,\n {\n /**\n * Size of the search.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Called when the user presses enter. You can use this to for example navigate on submit. */\n onSubmit?: (value: string) => void;\n /** Called when the user resets the search input. */\n onReset?: (value: string) => void;\n /**\n * Aria-label for the clear button.\n * @default 'Clear'\n */\n clearAriaLabel?: string;\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n }\n>;\n\nexport const Search = ({\n className,\n onSubmit,\n onReset,\n clearAriaLabel = 'Clear',\n size = 'medium',\n ref,\n style,\n fullwidth,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n ...props\n}: SearchProps) => {\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n if (onSubmit) {\n const input = e.currentTarget.querySelector('input');\n onSubmit(input?.value || '');\n }\n };\n const handleReset = () => {\n if (onReset) {\n onReset('');\n }\n };\n return (\n <Field\n className={clsx('bi-search', className)}\n data-color={color}\n data-color-scheme={colorScheme}\n style={style}\n fullwidth={fullwidth}\n asChild\n >\n <form onSubmit={handleSubmit} onReset={handleReset}>\n <FieldAffixes>\n <FieldAffix>\n <MagnifyingGlassIcon size={size} />\n </FieldAffix>\n <Input type='text' ref={ref} size={size} {...props} />\n <FieldAffix aria-hidden='false'>\n <Button aria-label={clearAriaLabel} icon size={size} variant='text' type='reset'>\n <CrossSmallIcon size={size} aria-hidden='true' />\n </Button>\n </FieldAffix>\n </FieldAffixes>\n </form>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;AA6BA,MAAa,UAAU,EACrB,WACA,UACA,SACA,iBAAiB,SACjB,OAAO,UACP,KACA,OACA,WACA,cAAc,OACd,qBAAqB,aACrB,GAAG,YACc;CACjB,MAAM,gBAAgB,MAAwC;EAC5D,EAAE,eAAe;EACjB,IAAI,UAEF,SADc,EAAE,cAAc,cAAc,OAC/B,CAAC,EAAE,SAAS,EAAE;CAE/B;CACA,MAAM,oBAAoB;EACxB,IAAI,SACF,QAAQ,EAAE;CAEd;CACA,OACE,oBAAC,OAAD;EACE,WAAW,KAAK,aAAa,SAAS;EACtC,cAAY;EACZ,qBAAmB;EACZ;EACI;EACX,SAAA;EAEA,UAAA,oBAAC,QAAD;GAAM,UAAU;GAAc,SAAS;GACrC,UAAA,qBAAC,cAAD,EAAA,UAAA;IACE,oBAAC,YAAD,EAAA,UACE,oBAAC,qBAAD,EAA2B,KAAO,CAAA,EACxB,CAAA;IACZ,oBAAC,OAAD;KAAO,MAAK;KAAY;KAAW;KAAM,GAAI;IAAQ,CAAA;IACrD,oBAAC,YAAD;KAAY,eAAY;KACtB,UAAA,oBAAC,QAAD;MAAQ,cAAY;MAAgB,MAAA;MAAW;MAAM,SAAQ;MAAO,MAAK;MACvE,UAAA,oBAAC,gBAAD;OAAsB;OAAM,eAAY;MAAQ,CAAA;KAC1C,CAAA;IACE,CAAA;GACA,EAAA,CAAA;EACV,CAAA;CACD,CAAA;AAEX"}
@@ -1,2 +1,2 @@
1
- import { F as Select, I as SelectProps, M as SelectOptgroupProps, N as SelectOption, P as SelectOptionProps, j as SelectOptgroup } from "../../alert-footer-B80k5mkX.mjs";
2
- export { Select, SelectOptgroup, SelectOptgroupProps, SelectOption, SelectOptionProps, SelectProps };
1
+ import { F as Select, I as SelectProps, M as SelectOptgroupProps, N as SelectOption, P as SelectOptionProps, j as SelectOptgroup } from "../../alert-footer-BoTu7E1s.mjs";
2
+ export { Select, SelectOptgroup, type SelectOptgroupProps, SelectOption, type SelectOptionProps, type SelectProps };
@@ -1,2 +1,2 @@
1
- import { M as SelectOptgroupProps, j as SelectOptgroup } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { M as SelectOptgroupProps, j as SelectOptgroup } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { SelectOptgroup, SelectOptgroupProps };
@@ -1 +1 @@
1
- {"version":3,"file":"select-optgroup.mjs","names":[],"sources":["../../../src/components/select/select-optgroup.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptgroupHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptgroupProps = MergeRight<\n AsChildProps & OptgroupHTMLAttributes<HTMLOptGroupElement>,\n {\n ref?: Ref<HTMLOptGroupElement>;\n }\n>;\n\nexport const SelectOptgroup = ({ asChild, ref, ...props }: SelectOptgroupProps) => {\n const Component = asChild ? Slot : 'optgroup';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;AAYA,MAAa,kBAAkB,EAAE,SAAS,KAAK,GAAG,YAAiC;CAEjF,OAAO,oBADW,UAAU,OAAO,YAC5B;EAAW,GAAI;EAAY;EAAO,CAAA"}
1
+ {"version":3,"file":"select-optgroup.mjs","names":[],"sources":["../../../src/components/select/select-optgroup.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptgroupHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptgroupProps = MergeRight<\n AsChildProps & OptgroupHTMLAttributes<HTMLOptGroupElement>,\n {\n ref?: Ref<HTMLOptGroupElement>;\n }\n>;\n\nexport const SelectOptgroup = ({ asChild, ref, ...props }: SelectOptgroupProps) => {\n const Component = asChild ? Slot : 'optgroup';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;AAYA,MAAa,kBAAkB,EAAE,SAAS,KAAK,GAAG,YAAiC;CAEjF,OAAO,oBADW,UAAU,OAAO,YAC5B;EAAW,GAAI;EAAY;CAAM,CAAA;AAC1C"}
@@ -1,2 +1,2 @@
1
- import { N as SelectOption, P as SelectOptionProps } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { N as SelectOption, P as SelectOptionProps } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { SelectOption, SelectOptionProps };
@@ -1 +1 @@
1
- {"version":3,"file":"select-option.mjs","names":[],"sources":["../../../src/components/select/select-option.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptionHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptionProps = MergeRight<\n AsChildProps & OptionHTMLAttributes<HTMLOptionElement>,\n {\n ref?: Ref<HTMLOptionElement>;\n }\n>;\n\nexport const SelectOption = ({ asChild, ref, ...props }: SelectOptionProps) => {\n const Component = asChild ? Slot : 'option';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;AAYA,MAAa,gBAAgB,EAAE,SAAS,KAAK,GAAG,YAA+B;CAE7E,OAAO,oBADW,UAAU,OAAO,UAC5B;EAAW,GAAI;EAAY;EAAO,CAAA"}
1
+ {"version":3,"file":"select-option.mjs","names":[],"sources":["../../../src/components/select/select-option.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptionHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptionProps = MergeRight<\n AsChildProps & OptionHTMLAttributes<HTMLOptionElement>,\n {\n ref?: Ref<HTMLOptionElement>;\n }\n>;\n\nexport const SelectOption = ({ asChild, ref, ...props }: SelectOptionProps) => {\n const Component = asChild ? Slot : 'option';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;AAYA,MAAa,gBAAgB,EAAE,SAAS,KAAK,GAAG,YAA+B;CAE7E,OAAO,oBADW,UAAU,OAAO,UAC5B;EAAW,GAAI;EAAY;CAAM,CAAA;AAC1C"}
@@ -1,2 +1,2 @@
1
- import { F as Select, I as SelectProps } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { F as Select, I as SelectProps } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { Select, SelectProps };
@@ -1 +1 @@
1
- {"version":3,"file":"select.mjs","names":[],"sources":["../../../src/components/select/select.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, SelectHTMLAttributes } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SelectProps = MergeRight<\n DefaultProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, 'multiple' | 'size'>,\n {\n /**\n * Size of the select.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Mark the select as readOnly */\n readOnly?: boolean;\n ref?: Ref<HTMLSelectElement>;\n }\n>;\n\nexport const Select = ({ className, onKeyDown, onMouseDown, size, ref, ...props }: SelectProps) => {\n return (\n <select\n className={clsx('bi-input', className)}\n data-size={size}\n ref={ref}\n onKeyDown={(event) => {\n if (event.key === 'Tab') return;\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onKeyDown?.(event);\n }}\n onMouseDown={(event) => {\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onMouseDown?.(event);\n }}\n {...props}\n />\n );\n};\n"],"mappings":";;;AAmBA,MAAa,UAAU,EAAE,WAAW,WAAW,aAAa,MAAM,KAAK,GAAG,YAAyB;CACjG,OACE,oBAAC,UAAD;EACE,WAAW,KAAK,YAAY,UAAU;EACtC,aAAW;EACN;EACL,YAAY,UAAU;GACpB,IAAI,MAAM,QAAQ,OAAO;GACzB,IAAI,MAAM,UAAU,MAAM,gBAAgB;GAC1C,YAAY,MAAM;;EAEpB,cAAc,UAAU;GACtB,IAAI,MAAM,UAAU,MAAM,gBAAgB;GAC1C,cAAc,MAAM;;EAEtB,GAAI;EACJ,CAAA"}
1
+ {"version":3,"file":"select.mjs","names":[],"sources":["../../../src/components/select/select.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, SelectHTMLAttributes } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SelectProps = MergeRight<\n DefaultProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, 'multiple' | 'size'>,\n {\n /**\n * Size of the select.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Mark the select as readOnly */\n readOnly?: boolean;\n ref?: Ref<HTMLSelectElement>;\n }\n>;\n\nexport const Select = ({ className, onKeyDown, onMouseDown, size, ref, ...props }: SelectProps) => {\n return (\n <select\n className={clsx('bi-input', className)}\n data-size={size}\n ref={ref}\n onKeyDown={(event) => {\n if (event.key === 'Tab') return;\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onKeyDown?.(event);\n }}\n onMouseDown={(event) => {\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onMouseDown?.(event);\n }}\n {...props}\n />\n );\n};\n"],"mappings":";;;AAmBA,MAAa,UAAU,EAAE,WAAW,WAAW,aAAa,MAAM,KAAK,GAAG,YAAyB;CACjG,OACE,oBAAC,UAAD;EACE,WAAW,KAAK,YAAY,SAAS;EACrC,aAAW;EACN;EACL,YAAY,UAAU;GACpB,IAAI,MAAM,QAAQ,OAAO;GACzB,IAAI,MAAM,UAAU,MAAM,eAAe;GACzC,YAAY,KAAK;EACnB;EACA,cAAc,UAAU;GACtB,IAAI,MAAM,UAAU,MAAM,eAAe;GACzC,cAAc,KAAK;EACrB;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -1,2 +1,2 @@
1
- import { A as SelectfieldProps, k as Selectfield } from "../../alert-footer-B80k5mkX.mjs";
2
- export { Selectfield, SelectfieldProps };
1
+ import { A as SelectfieldProps, k as Selectfield } from "../../alert-footer-BoTu7E1s.mjs";
2
+ export { Selectfield, type SelectfieldProps };
@@ -1,2 +1,2 @@
1
- import { A as SelectfieldProps, k as Selectfield } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { A as SelectfieldProps, k as Selectfield } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { Selectfield, SelectfieldProps };
@@ -1 +1 @@
1
- {"version":3,"file":"selectfield.mjs","names":[],"sources":["../../../src/components/selectfield/selectfield.tsx"],"sourcesContent":["import { useId, type ReactNode } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport { Field, FieldDescription } from '../field';\nimport { Label } from '../label';\nimport { Select, type SelectProps } from '../select';\nimport { ValidationMessage } from '../validation-message';\nimport { MergeRight } from '../../utilities';\n\nexport type SelectfieldProps = MergeRight<\n LabelRequiredProps & SelectProps,\n {\n /** Description */\n description?: ReactNode;\n /** Error message for field */\n error?: ReactNode;\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n }\n>;\n\nexport const Selectfield = ({\n children,\n label,\n description,\n error,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: SelectfieldProps) => {\n const generatedId = useId();\n const descriptionId = useId();\n const validationId = useId();\n const id = idProp || generatedId;\n\n const ariaDescribedBy =\n [description ? descriptionId : '', error ? validationId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n return (\n <Field className={className} data-color={color} data-color-scheme={colorScheme} style={style} fullwidth={fullwidth}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <Select\n id={id}\n ref={ref}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...props}\n >\n {children}\n </Select>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAqBA,MAAa,eAAe,EAC1B,UACA,OACA,aACA,OACA,OACA,WACA,WACA,KACA,IAAI,QACJ,cAAc,OACd,qBAAqB,aACrB,oBAAoB,qBACpB,GAAG,YACmB;CACtB,MAAM,cAAc,OAAO;CAC3B,MAAM,gBAAgB,OAAO;CAC7B,MAAM,eAAe,OAAO;CAC5B,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;EAAoB,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,KAAA;CACzG,OACE,qBAAC,OAAD;EAAkB;EAAW,cAAY;EAAO,qBAAmB;EAAoB;EAAkB;YAAzG;GACG,SAAS,oBAAC,OAAD;IAAO,SAAS;cAAK;IAAc,CAAA;GAC5C,eAAe,oBAAC,kBAAD;IAAkB,IAAI;cAAgB;IAA+B,CAAA;GACrF,oBAAC,QAAD;IACM;IACC;IACL,gBAAc,QAAQ,MAAM,IAAI,KAAA;IAChC,oBAAkB;IAClB,GAAI;IAEH;IACM,CAAA;GACR,CAAC,CAAC,SAAS,oBAAC,mBAAD;IAAmB,IAAI;cAAe;IAA0B,CAAA;GACtE"}
1
+ {"version":3,"file":"selectfield.mjs","names":[],"sources":["../../../src/components/selectfield/selectfield.tsx"],"sourcesContent":["import { useId, type ReactNode } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport { Field, FieldDescription } from '../field';\nimport { Label } from '../label';\nimport { Select, type SelectProps } from '../select';\nimport { ValidationMessage } from '../validation-message';\nimport { MergeRight } from '../../utilities';\n\nexport type SelectfieldProps = MergeRight<\n LabelRequiredProps & SelectProps,\n {\n /** Description */\n description?: ReactNode;\n /** Error message for field */\n error?: ReactNode;\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n }\n>;\n\nexport const Selectfield = ({\n children,\n label,\n description,\n error,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: SelectfieldProps) => {\n const generatedId = useId();\n const descriptionId = useId();\n const validationId = useId();\n const id = idProp || generatedId;\n\n const ariaDescribedBy =\n [description ? descriptionId : '', error ? validationId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n return (\n <Field className={className} data-color={color} data-color-scheme={colorScheme} style={style} fullwidth={fullwidth}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <Select\n id={id}\n ref={ref}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...props}\n >\n {children}\n </Select>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAqBA,MAAa,eAAe,EAC1B,UACA,OACA,aACA,OACA,OACA,WACA,WACA,KACA,IAAI,QACJ,cAAc,OACd,qBAAqB,aACrB,oBAAoB,qBACpB,GAAG,YACmB;CACtB,MAAM,cAAc,MAAM;CAC1B,MAAM,gBAAgB,MAAM;CAC5B,MAAM,eAAe,MAAM;CAC3B,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;CAAmB,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,KAAK,KAAA;CACzG,OACE,qBAAC,OAAD;EAAkB;EAAW,cAAY;EAAO,qBAAmB;EAAoB;EAAkB;EAAzG,UAAA;GACG,SAAS,oBAAC,OAAD;IAAO,SAAS;IAAK,UAAA;GAAa,CAAA;GAC3C,eAAe,oBAAC,kBAAD;IAAkB,IAAI;IAAgB,UAAA;GAA8B,CAAA;GACpF,oBAAC,QAAD;IACM;IACC;IACL,gBAAc,QAAQ,KAAK,KAAK,KAAA;IAChC,oBAAkB;IAClB,GAAI;IAEH;GACK,CAAA;GACP,CAAC,CAAC,SAAS,oBAAC,mBAAD;IAAmB,IAAI;IAAe,UAAA;GAAyB,CAAA;EACtE;;AAEX"}
@@ -1,2 +1,2 @@
1
- import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-B80k5mkX.mjs";
2
- export { SkipLink, SkipLinkProps };
1
+ import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-BoTu7E1s.mjs";
2
+ export { SkipLink, type SkipLinkProps };
@@ -1,2 +1,2 @@
1
- import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { SkipLink, SkipLinkProps };
@@ -1 +1 @@
1
- {"version":3,"file":"skip-link.mjs","names":[],"sources":["../../../src/components/skip-link/skip-link.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { AnchorHTMLAttributes, Ref } from 'react';\n\nexport type SkipLinkProps = MergeRight<\n DefaultProps & AsChildProps & AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n ref?: Ref<HTMLAnchorElement>;\n }\n>;\n\nexport const SkipLink = ({ asChild, children, className, ...props }: SkipLinkProps) => {\n const Component = asChild ? Slot : 'a';\n return (\n <Component className={clsx('bi-skip-link', className)} {...props}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAaA,MAAa,YAAY,EAAE,SAAS,UAAU,WAAW,GAAG,YAA2B;CAErF,OACE,oBAFgB,UAAU,OAAO,KAEjC;EAAW,WAAW,KAAK,gBAAgB,UAAU;EAAE,GAAI;EACxD;EACS,CAAA"}
1
+ {"version":3,"file":"skip-link.mjs","names":[],"sources":["../../../src/components/skip-link/skip-link.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { AnchorHTMLAttributes, Ref } from 'react';\n\nexport type SkipLinkProps = MergeRight<\n DefaultProps & AsChildProps & AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n ref?: Ref<HTMLAnchorElement>;\n }\n>;\n\nexport const SkipLink = ({ asChild, children, className, ...props }: SkipLinkProps) => {\n const Component = asChild ? Slot : 'a';\n return (\n <Component className={clsx('bi-skip-link', className)} {...props}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAaA,MAAa,YAAY,EAAE,SAAS,UAAU,WAAW,GAAG,YAA2B;CAErF,OACE,oBAFgB,UAAU,OAAO,KAEjC;EAAW,WAAW,KAAK,gBAAgB,SAAS;EAAG,GAAI;EACxD;CACQ,CAAA;AAEf"}
@@ -1,2 +1,2 @@
1
- import { E as SpinnerProps, T as Spinner } from "../../alert-footer-B80k5mkX.mjs";
2
- export { Spinner, SpinnerProps };
1
+ import { E as SpinnerProps, T as Spinner } from "../../alert-footer-BoTu7E1s.mjs";
2
+ export { Spinner, type SpinnerProps };
@@ -1,2 +1,2 @@
1
- import { E as SpinnerProps, T as Spinner } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { E as SpinnerProps, T as Spinner } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { Spinner, SpinnerProps };
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.mjs","names":[],"sources":["../../../src/components/spinner/spinner.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SpinnerProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLSpanElement>,\n {\n /**\n * The size of the spinner.\n * It sets the font-size as the width and height is `1em`. If not set, the spinner will inherit the font size of its parent.\n */\n size?: 'small' | 'medium' | 'large' | 'xl' | '2xl';\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\nexport const Spinner = ({ size, className, ref, ...props }: SpinnerProps) => {\n return <span className={clsx('bi-spinner', className)} data-size={size} ref={ref} {...props} />;\n};\n"],"mappings":";;;AAiBA,MAAa,WAAW,EAAE,MAAM,WAAW,KAAK,GAAG,YAA0B;CAC3E,OAAO,oBAAC,QAAD;EAAM,WAAW,KAAK,cAAc,UAAU;EAAE,aAAW;EAAW;EAAK,GAAI;EAAS,CAAA"}
1
+ {"version":3,"file":"spinner.mjs","names":[],"sources":["../../../src/components/spinner/spinner.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SpinnerProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLSpanElement>,\n {\n /**\n * The size of the spinner.\n * It sets the font-size as the width and height is `1em`. If not set, the spinner will inherit the font size of its parent.\n */\n size?: 'small' | 'medium' | 'large' | 'xl' | '2xl';\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\nexport const Spinner = ({ size, className, ref, ...props }: SpinnerProps) => {\n return <span className={clsx('bi-spinner', className)} data-size={size} ref={ref} {...props} />;\n};\n"],"mappings":";;;AAiBA,MAAa,WAAW,EAAE,MAAM,WAAW,KAAK,GAAG,YAA0B;CAC3E,OAAO,oBAAC,QAAD;EAAM,WAAW,KAAK,cAAc,SAAS;EAAG,aAAW;EAAW;EAAK,GAAI;CAAQ,CAAA;AAChG"}
@@ -1,2 +1,3 @@
1
- import { n as StickyHeaderProps, t as StickyHeader } from "../../sticky-header-CVfE0TUC.mjs";
2
- export { StickyHeader, StickyHeaderProps };
1
+ import { n as StickyHeaderProps, t as StickyHeader } from "../../sticky-header-BXlBWEWo.mjs";
2
+ import "../../index-Dqg5-Rt-.mjs";
3
+ export { StickyHeader, type StickyHeaderProps };
@@ -1,2 +1,2 @@
1
- import { n as StickyHeaderProps, t as StickyHeader } from "../../sticky-header-CVfE0TUC.mjs";
1
+ import { n as StickyHeaderProps, t as StickyHeader } from "../../sticky-header-BXlBWEWo.mjs";
2
2
  export { StickyHeader, StickyHeaderProps };
@@ -1 +1 @@
1
- {"version":3,"file":"sticky-header.mjs","names":["Component"],"sources":["../../../src/components/sticky-header/sticky-header.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { ReactNode } from 'react';\n\nexport type StickyHeaderProps = {\n children: ReactNode;\n};\n\n/**\n * Make a sticky header that will stay at the top of the viewport when scrolling.\n * It handles different distance to the top based on sub-navbar, navbar and other factors.\n * This element is a Slot which simply adds the correct CSS styles to the children.\n * Make sure that the children passed to this component appends className and not overrides it.\n */\nexport const StickyHeader = ({ children }: StickyHeaderProps) => {\n const Component = Slot;\n return <Component className='bi-sticky-header'>{children}</Component>;\n};\n"],"mappings":";;;;;;;;;AAaA,MAAa,gBAAgB,EAAE,eAAkC;CAE/D,OAAO,oBAACA,MAAD;EAAW,WAAU;EAAoB;EAAqB,CAAA"}
1
+ {"version":3,"file":"sticky-header.mjs","names":["Component"],"sources":["../../../src/components/sticky-header/sticky-header.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { ReactNode } from 'react';\n\nexport type StickyHeaderProps = {\n children: ReactNode;\n};\n\n/**\n * Make a sticky header that will stay at the top of the viewport when scrolling.\n * It handles different distance to the top based on sub-navbar, navbar and other factors.\n * This element is a Slot which simply adds the correct CSS styles to the children.\n * Make sure that the children passed to this component appends className and not overrides it.\n */\nexport const StickyHeader = ({ children }: StickyHeaderProps) => {\n const Component = Slot;\n return <Component className='bi-sticky-header'>{children}</Component>;\n};\n"],"mappings":";;;;;;;;;AAaA,MAAa,gBAAgB,EAAE,eAAkC;CAE/D,OAAO,oBAACA,MAAD;EAAW,WAAU;EAAoB;CAAoB,CAAA;AACtE"}
@@ -1,2 +1,2 @@
1
- import { C as Switch, w as SwitchProps } from "../../alert-footer-B80k5mkX.mjs";
2
- export { Switch, SwitchProps };
1
+ import { C as Switch, w as SwitchProps } from "../../alert-footer-BoTu7E1s.mjs";
2
+ export { Switch, type SwitchProps };
@@ -1,2 +1,2 @@
1
- import { C as Switch, w as SwitchProps } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { C as Switch, w as SwitchProps } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { Switch, SwitchProps };
@@ -1 +1 @@
1
- {"version":3,"file":"switch.mjs","names":[],"sources":["../../../src/components/switch/switch.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, type FieldProps } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type SwitchProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'> & Pick<FieldProps, 'position'>,\n {\n /** Label */\n label?: ReactNode;\n /** Add error indication to the switch. */\n error?: boolean;\n /** If true, the switch will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Switch = ({\n label,\n error,\n fullwidth,\n style,\n className,\n ref,\n id,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n position = 'end',\n ...props\n}: SwitchProps) => {\n return (\n <Field\n className={className}\n data-color={color}\n data-color-scheme={colorScheme}\n style={style}\n fullwidth={fullwidth}\n position={position}\n asChild\n >\n <label>\n {/* oxlint-disable-next-line jsx-a11y/role-has-required-aria-props */}\n <Input role='switch' type='checkbox' id={id} ref={ref} aria-invalid={error || undefined} {...props} />\n {label && (\n <Label weight='medium' htmlFor={id} asChild>\n <span>{label}</span>\n </Label>\n )}\n </label>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;AAqBA,MAAa,UAAU,EACrB,OACA,OACA,WACA,OACA,WACA,KACA,IACA,cAAc,OACd,qBAAqB,aACrB,WAAW,OACX,GAAG,YACc;CACjB,OACE,oBAAC,OAAD;EACa;EACX,cAAY;EACZ,qBAAmB;EACZ;EACI;EACD;EACV,SAAA;YAEA,qBAAC,SAAD,EAAA,UAAA,CAEE,oBAAC,OAAD;GAAO,MAAK;GAAS,MAAK;GAAe;GAAS;GAAK,gBAAc,SAAS,KAAA;GAAW,GAAI;GAAS,CAAA,EACrG,SACC,oBAAC,OAAD;GAAO,QAAO;GAAS,SAAS;GAAI,SAAA;aAClC,oBAAC,QAAD,EAAA,UAAO,OAAa,CAAA;GACd,CAAA,CAEJ,EAAA,CAAA;EACF,CAAA"}
1
+ {"version":3,"file":"switch.mjs","names":[],"sources":["../../../src/components/switch/switch.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, type FieldProps } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type SwitchProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'> & Pick<FieldProps, 'position'>,\n {\n /** Label */\n label?: ReactNode;\n /** Add error indication to the switch. */\n error?: boolean;\n /** If true, the switch will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Switch = ({\n label,\n error,\n fullwidth,\n style,\n className,\n ref,\n id,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n position = 'end',\n ...props\n}: SwitchProps) => {\n return (\n <Field\n className={className}\n data-color={color}\n data-color-scheme={colorScheme}\n style={style}\n fullwidth={fullwidth}\n position={position}\n asChild\n >\n <label>\n {/* oxlint-disable-next-line jsx-a11y/role-has-required-aria-props */}\n <Input role='switch' type='checkbox' id={id} ref={ref} aria-invalid={error || undefined} {...props} />\n {label && (\n <Label weight='medium' htmlFor={id} asChild>\n <span>{label}</span>\n </Label>\n )}\n </label>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;AAqBA,MAAa,UAAU,EACrB,OACA,OACA,WACA,OACA,WACA,KACA,IACA,cAAc,OACd,qBAAqB,aACrB,WAAW,OACX,GAAG,YACc;CACjB,OACE,oBAAC,OAAD;EACa;EACX,cAAY;EACZ,qBAAmB;EACZ;EACI;EACD;EACV,SAAA;EAEA,UAAA,qBAAC,SAAD,EAAA,UAAA,CAEE,oBAAC,OAAD;GAAO,MAAK;GAAS,MAAK;GAAe;GAAS;GAAK,gBAAc,SAAS,KAAA;GAAW,GAAI;EAAQ,CAAA,GACpG,SACC,oBAAC,OAAD;GAAO,QAAO;GAAS,SAAS;GAAI,SAAA;GAClC,UAAA,oBAAC,QAAD,EAAA,UAAO,MAAY,CAAA;EACd,CAAA,CAEJ,EAAA,CAAA;CACF,CAAA;AAEX"}
@@ -1,2 +1,2 @@
1
- import { S as TabsProps, _ as Tab, b as Tabs, g as TabsListProps, h as TabsList, m as TabsPanelProps, p as TabsPanel, v as TabProps, x as TabsContext } from "../../alert-footer-B80k5mkX.mjs";
2
- export { Tab, TabProps, Tabs, TabsContext, TabsList, TabsListProps, TabsPanel, TabsPanelProps, TabsProps };
1
+ import { S as TabsProps, _ as Tab, b as Tabs, g as TabsListProps, h as TabsList, m as TabsPanelProps, p as TabsPanel, v as TabProps, x as TabsContext } from "../../alert-footer-BoTu7E1s.mjs";
2
+ export { Tab, type TabProps, Tabs, type TabsContext, TabsList, type TabsListProps, TabsPanel, type TabsPanelProps, type TabsProps };
@@ -1,2 +1,2 @@
1
- import { _ as Tab, v as TabProps } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { _ as Tab, v as TabProps } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { Tab, TabProps };
@@ -1 +1 @@
1
- {"version":3,"file":"tab.mjs","names":[],"sources":["../../../src/components/tabs/tab.tsx"],"sourcesContent":["import type { DSTabElement } from '@digdir/designsystemet-web';\nimport { use, type HTMLAttributes, type Ref } from 'react';\nimport '@digdir/designsystemet-web'; // Import ds-tab custom element\nimport type { MergeRight } from '../../utilities';\nimport { Context } from './tabs';\n\nexport type TabProps = MergeRight<\n HTMLAttributes<DSTabElement>,\n {\n /** A unique value that associates the trigger with a content. */\n value: string;\n ref?: Ref<DSTabElement>;\n }\n>;\n\nexport const Tab = ({ value, children, onClick, onClickCapture, ref, ...props }: TabProps) => {\n const { onChange, getPrefixedValue, isControlled, currentValue } = use(Context);\n return (\n <ds-tab\n aria-controls={props['aria-controls'] ?? getPrefixedValue?.(value)}\n data-value={value}\n ref={ref}\n suppressHydrationWarning // Since <ds-tablist> adds attributes\n onClickCapture={(e: React.MouseEvent<DSTabElement>) => {\n onClickCapture?.(e);\n if (isControlled && currentValue !== value) {\n e.preventDefault();\n }\n }}\n onClick={(e: React.MouseEvent<DSTabElement>) => {\n if (e.isTrusted || !isControlled || currentValue !== value) {\n onChange?.(value); // Only call onChange for user interactions, not programmatic clicks used to sync controlled state\n }\n onClick?.(e);\n }}\n {...props}\n >\n {children}\n </ds-tab>\n );\n};\n"],"mappings":";;;;;AAeA,MAAa,OAAO,EAAE,OAAO,UAAU,SAAS,gBAAgB,KAAK,GAAG,YAAsB;CAC5F,MAAM,EAAE,UAAU,kBAAkB,cAAc,iBAAiB,IAAI,QAAQ;CAC/E,OACE,oBAAC,UAAD;EACE,iBAAe,MAAM,oBAAoB,mBAAmB,MAAM;EAClE,cAAY;EACP;EACL,0BAAA;EACA,iBAAiB,MAAsC;GACrD,iBAAiB,EAAE;GACnB,IAAI,gBAAgB,iBAAiB,OACnC,EAAE,gBAAgB;;EAGtB,UAAU,MAAsC;GAC9C,IAAI,EAAE,aAAa,CAAC,gBAAgB,iBAAiB,OACnD,WAAW,MAAM;GAEnB,UAAU,EAAE;;EAEd,GAAI;EAEH;EACM,CAAA"}
1
+ {"version":3,"file":"tab.mjs","names":[],"sources":["../../../src/components/tabs/tab.tsx"],"sourcesContent":["import type { DSTabElement } from '@digdir/designsystemet-web';\nimport { use, type HTMLAttributes, type Ref } from 'react';\nimport '@digdir/designsystemet-web'; // Import ds-tab custom element\nimport type { MergeRight } from '../../utilities';\nimport { Context } from './tabs';\n\nexport type TabProps = MergeRight<\n HTMLAttributes<DSTabElement>,\n {\n /** A unique value that associates the trigger with a content. */\n value: string;\n ref?: Ref<DSTabElement>;\n }\n>;\n\nexport const Tab = ({ value, children, onClick, onClickCapture, ref, ...props }: TabProps) => {\n const { onChange, getPrefixedValue, isControlled, currentValue } = use(Context);\n return (\n <ds-tab\n aria-controls={props['aria-controls'] ?? getPrefixedValue?.(value)}\n data-value={value}\n ref={ref}\n suppressHydrationWarning // Since <ds-tablist> adds attributes\n onClickCapture={(e: React.MouseEvent<DSTabElement>) => {\n onClickCapture?.(e);\n if (isControlled && currentValue !== value) {\n e.preventDefault();\n }\n }}\n onClick={(e: React.MouseEvent<DSTabElement>) => {\n if (e.isTrusted || !isControlled || currentValue !== value) {\n onChange?.(value); // Only call onChange for user interactions, not programmatic clicks used to sync controlled state\n }\n onClick?.(e);\n }}\n {...props}\n >\n {children}\n </ds-tab>\n );\n};\n"],"mappings":";;;;;AAeA,MAAa,OAAO,EAAE,OAAO,UAAU,SAAS,gBAAgB,KAAK,GAAG,YAAsB;CAC5F,MAAM,EAAE,UAAU,kBAAkB,cAAc,iBAAiB,IAAI,OAAO;CAC9E,OACE,oBAAC,UAAD;EACE,iBAAe,MAAM,oBAAoB,mBAAmB,KAAK;EACjE,cAAY;EACP;EACL,0BAAA;EACA,iBAAiB,MAAsC;GACrD,iBAAiB,CAAC;GAClB,IAAI,gBAAgB,iBAAiB,OACnC,EAAE,eAAe;EAErB;EACA,UAAU,MAAsC;GAC9C,IAAI,EAAE,aAAa,CAAC,gBAAgB,iBAAiB,OACnD,WAAW,KAAK;GAElB,UAAU,CAAC;EACb;EACA,GAAI;EAEH;CACK,CAAA;AAEZ"}
@@ -1,2 +1,2 @@
1
- import { g as TabsListProps, h as TabsList } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { g as TabsListProps, h as TabsList } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { TabsList, TabsListProps };
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-list.mjs","names":[],"sources":["../../../src/components/tabs/tabs-list.tsx"],"sourcesContent":["import type { DSTabListElement } from '@digdir/designsystemet-web';\nimport '@digdir/designsystemet-web'; // Import ds-tablist custom element\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\n\nexport type TabsListProps = MergeRight<\n HTMLAttributes<DSTabListElement>,\n {\n ref?: Ref<DSTabListElement>;\n }\n>;\n\nexport const TabsList = ({ children, ref, ...props }: TabsListProps) => {\n return (\n <ds-tablist\n suppressHydrationWarning // Since <ds-tablist> adds attributes\n ref={ref}\n {...props}\n >\n {children}\n </ds-tablist>\n );\n};\n"],"mappings":";;;AAYA,MAAa,YAAY,EAAE,UAAU,KAAK,GAAG,YAA2B;CACtE,OACE,oBAAC,cAAD;EACE,0BAAA;EACK;EACL,GAAI;EAEH;EACU,CAAA"}
1
+ {"version":3,"file":"tabs-list.mjs","names":[],"sources":["../../../src/components/tabs/tabs-list.tsx"],"sourcesContent":["import type { DSTabListElement } from '@digdir/designsystemet-web';\nimport '@digdir/designsystemet-web'; // Import ds-tablist custom element\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\n\nexport type TabsListProps = MergeRight<\n HTMLAttributes<DSTabListElement>,\n {\n ref?: Ref<DSTabListElement>;\n }\n>;\n\nexport const TabsList = ({ children, ref, ...props }: TabsListProps) => {\n return (\n <ds-tablist\n suppressHydrationWarning // Since <ds-tablist> adds attributes\n ref={ref}\n {...props}\n >\n {children}\n </ds-tablist>\n );\n};\n"],"mappings":";;;AAYA,MAAa,YAAY,EAAE,UAAU,KAAK,GAAG,YAA2B;CACtE,OACE,oBAAC,cAAD;EACE,0BAAA;EACK;EACL,GAAI;EAEH;CACS,CAAA;AAEhB"}
@@ -1,2 +1,2 @@
1
- import { m as TabsPanelProps, p as TabsPanel } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { m as TabsPanelProps, p as TabsPanel } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { TabsPanel, TabsPanelProps };
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-panel.mjs","names":[],"sources":["../../../src/components/tabs/tabs-panel.tsx"],"sourcesContent":["import type { DSTabPanelElement } from '@digdir/designsystemet-web';\nimport '@digdir/designsystemet-web'; // Import ds-tabpanel custom element\nimport { use, type HTMLAttributes, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport { Context } from './tabs';\n\nexport type TabsPanelProps = MergeRight<\n HTMLAttributes<DSTabPanelElement>,\n {\n /** A unique value that associates the content with a trigger. */\n value: string;\n ref?: Ref<DSTabPanelElement>;\n }\n>;\n\nexport const TabsPanel = ({ value, id, children, ref, ...props }: TabsPanelProps) => {\n const { getPrefixedValue } = use(Context);\n\n return (\n <ds-tabpanel\n suppressHydrationWarning // Since <ds-tablist> adds attributes\n ref={ref}\n id={id ?? getPrefixedValue?.(value)}\n {...props}\n >\n {children}\n </ds-tabpanel>\n );\n};\n"],"mappings":";;;;;AAeA,MAAa,aAAa,EAAE,OAAO,IAAI,UAAU,KAAK,GAAG,YAA4B;CACnF,MAAM,EAAE,qBAAqB,IAAI,QAAQ;CAEzC,OACE,oBAAC,eAAD;EACE,0BAAA;EACK;EACL,IAAI,MAAM,mBAAmB,MAAM;EACnC,GAAI;EAEH;EACW,CAAA"}
1
+ {"version":3,"file":"tabs-panel.mjs","names":[],"sources":["../../../src/components/tabs/tabs-panel.tsx"],"sourcesContent":["import type { DSTabPanelElement } from '@digdir/designsystemet-web';\nimport '@digdir/designsystemet-web'; // Import ds-tabpanel custom element\nimport { use, type HTMLAttributes, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport { Context } from './tabs';\n\nexport type TabsPanelProps = MergeRight<\n HTMLAttributes<DSTabPanelElement>,\n {\n /** A unique value that associates the content with a trigger. */\n value: string;\n ref?: Ref<DSTabPanelElement>;\n }\n>;\n\nexport const TabsPanel = ({ value, id, children, ref, ...props }: TabsPanelProps) => {\n const { getPrefixedValue } = use(Context);\n\n return (\n <ds-tabpanel\n suppressHydrationWarning // Since <ds-tablist> adds attributes\n ref={ref}\n id={id ?? getPrefixedValue?.(value)}\n {...props}\n >\n {children}\n </ds-tabpanel>\n );\n};\n"],"mappings":";;;;;AAeA,MAAa,aAAa,EAAE,OAAO,IAAI,UAAU,KAAK,GAAG,YAA4B;CACnF,MAAM,EAAE,qBAAqB,IAAI,OAAO;CAExC,OACE,oBAAC,eAAD;EACE,0BAAA;EACK;EACL,IAAI,MAAM,mBAAmB,KAAK;EAClC,GAAI;EAEH;CACU,CAAA;AAEjB"}
@@ -1,2 +1,2 @@
1
- import { S as TabsProps, b as Tabs, x as TabsContext, y as Context } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { S as TabsProps, b as Tabs, x as TabsContext, y as Context } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { Context, Tabs, TabsContext, TabsProps };
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.mjs","names":[],"sources":["../../../src/components/tabs/tabs.tsx"],"sourcesContent":["import { createContext, useEffect, useId, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport type { DSTabsElement } from '@digdir/designsystemet-web';\nimport '@digdir/designsystemet-web'; // Import ds-tabs custom element\nimport clsx from 'clsx/lite';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\n\nexport type TabsProps = MergeRight<\n DefaultProps & HTMLAttributes<DSTabsElement>,\n {\n /** The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. */\n defaultValue?: string;\n /** The controlled value of the tab to activate. Should be used together with `onChange`. */\n value?: string;\n /** Event handler called when the value changes. */\n onChange?: (value: string) => void;\n ref?: Ref<DSTabsElement>;\n }\n>;\n\nexport type TabsContext = {\n isControlled?: boolean;\n currentValue?: string;\n onChange?: (value: string) => void;\n getPrefixedValue?: (value?: string) => string | undefined;\n};\n\nexport const Context = createContext<TabsContext>({});\n\nexport const Tabs = ({ defaultValue, value: valueProp, onChange, children, className, ref, ...props }: TabsProps) => {\n const isControlled = valueProp !== undefined;\n const tabsRef = useRef<DSTabsElement>(null);\n const isProgrammaticClick = useRef(false);\n const valuePrefix = useId(); // Used for generation of unique value-based ids for tabs and panels\n const mergedRefs = useMergeRefs([ref, tabsRef]);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange,\n defaultProp: defaultValue || '',\n caller: 'Tabs',\n });\n\n useEffect(() => {\n if (!tabsRef.current || valueProp === undefined) return;\n tabsRef.current?.tabList?.tabs?.forEach((tab) => {\n if (tab.getAttribute('data-value') === valueProp) {\n isProgrammaticClick.current = true;\n tab.click();\n isProgrammaticClick.current = false;\n }\n });\n }, [valueProp]);\n\n useEffect(() => {\n if (!isControlled && defaultValue && tabsRef.current) {\n tabsRef.current?.tabList?.tabs?.forEach((tab) => {\n const isSelected = tab.getAttribute('data-value') === defaultValue;\n tab.setAttribute('aria-selected', isSelected ? 'true' : 'false');\n });\n }\n // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps\n }, []);\n\n return (\n <Context\n value={{\n isControlled,\n currentValue: value,\n onChange: setValue,\n getPrefixedValue: (value?: string) => value && `${valuePrefix}-${value}`,\n }}\n >\n <ds-tabs\n suppressHydrationWarning // Since <ds-tablist> adds attributes\n ref={mergedRefs}\n className={clsx('bi-tabs', className)}\n {...props}\n >\n {children}\n </ds-tabs>\n </Context>\n );\n};\n"],"mappings":";;;;;;;AA8BA,MAAa,UAAU,cAA2B,EAAE,CAAC;AAErD,MAAa,QAAQ,EAAE,cAAc,OAAO,WAAW,UAAU,UAAU,WAAW,KAAK,GAAG,YAAuB;CACnH,MAAM,eAAe,cAAc,KAAA;CACnC,MAAM,UAAU,OAAsB,KAAK;CAC3C,MAAM,sBAAsB,OAAO,MAAM;CACzC,MAAM,cAAc,OAAO;CAC3B,MAAM,aAAa,aAAa,CAAC,KAAK,QAAQ,CAAC;CAC/C,MAAM,CAAC,OAAO,YAAY,qBAAqB;EAC7C,MAAM;EACN;EACA,aAAa,gBAAgB;EAC7B,QAAQ;EACT,CAAC;CAEF,gBAAgB;EACd,IAAI,CAAC,QAAQ,WAAW,cAAc,KAAA,GAAW;EACjD,QAAQ,SAAS,SAAS,MAAM,SAAS,QAAQ;GAC/C,IAAI,IAAI,aAAa,aAAa,KAAK,WAAW;IAChD,oBAAoB,UAAU;IAC9B,IAAI,OAAO;IACX,oBAAoB,UAAU;;IAEhC;IACD,CAAC,UAAU,CAAC;CAEf,gBAAgB;EACd,IAAI,CAAC,gBAAgB,gBAAgB,QAAQ,SAC3C,QAAQ,SAAS,SAAS,MAAM,SAAS,QAAQ;GAC/C,MAAM,aAAa,IAAI,aAAa,aAAa,KAAK;GACtD,IAAI,aAAa,iBAAiB,aAAa,SAAS,QAAQ;IAChE;IAGH,EAAE,CAAC;CAEN,OACE,oBAAC,SAAD;EACE,OAAO;GACL;GACA,cAAc;GACd,UAAU;GACV,mBAAmB,UAAmB,SAAS,GAAG,YAAY,GAAG;GAClE;YAED,oBAAC,WAAD;GACE,0BAAA;GACA,KAAK;GACL,WAAW,KAAK,WAAW,UAAU;GACrC,GAAI;GAEH;GACO,CAAA;EACF,CAAA"}
1
+ {"version":3,"file":"tabs.mjs","names":[],"sources":["../../../src/components/tabs/tabs.tsx"],"sourcesContent":["import { createContext, useEffect, useId, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport type { DSTabsElement } from '@digdir/designsystemet-web';\nimport '@digdir/designsystemet-web'; // Import ds-tabs custom element\nimport clsx from 'clsx/lite';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\n\nexport type TabsProps = MergeRight<\n DefaultProps & HTMLAttributes<DSTabsElement>,\n {\n /** The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. */\n defaultValue?: string;\n /** The controlled value of the tab to activate. Should be used together with `onChange`. */\n value?: string;\n /** Event handler called when the value changes. */\n onChange?: (value: string) => void;\n ref?: Ref<DSTabsElement>;\n }\n>;\n\nexport type TabsContext = {\n isControlled?: boolean;\n currentValue?: string;\n onChange?: (value: string) => void;\n getPrefixedValue?: (value?: string) => string | undefined;\n};\n\nexport const Context = createContext<TabsContext>({});\n\nexport const Tabs = ({ defaultValue, value: valueProp, onChange, children, className, ref, ...props }: TabsProps) => {\n const isControlled = valueProp !== undefined;\n const tabsRef = useRef<DSTabsElement>(null);\n const isProgrammaticClick = useRef(false);\n const valuePrefix = useId(); // Used for generation of unique value-based ids for tabs and panels\n const mergedRefs = useMergeRefs([ref, tabsRef]);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange,\n defaultProp: defaultValue || '',\n caller: 'Tabs',\n });\n\n useEffect(() => {\n if (!tabsRef.current || valueProp === undefined) return;\n tabsRef.current?.tabList?.tabs?.forEach((tab) => {\n if (tab.getAttribute('data-value') === valueProp) {\n isProgrammaticClick.current = true;\n tab.click();\n isProgrammaticClick.current = false;\n }\n });\n }, [valueProp]);\n\n useEffect(() => {\n if (!isControlled && defaultValue && tabsRef.current) {\n tabsRef.current?.tabList?.tabs?.forEach((tab) => {\n const isSelected = tab.getAttribute('data-value') === defaultValue;\n tab.setAttribute('aria-selected', isSelected ? 'true' : 'false');\n });\n }\n // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps\n }, []);\n\n return (\n <Context\n value={{\n isControlled,\n currentValue: value,\n onChange: setValue,\n getPrefixedValue: (value?: string) => value && `${valuePrefix}-${value}`,\n }}\n >\n <ds-tabs\n suppressHydrationWarning // Since <ds-tablist> adds attributes\n ref={mergedRefs}\n className={clsx('bi-tabs', className)}\n {...props}\n >\n {children}\n </ds-tabs>\n </Context>\n );\n};\n"],"mappings":";;;;;;;AA8BA,MAAa,UAAU,cAA2B,CAAC,CAAC;AAEpD,MAAa,QAAQ,EAAE,cAAc,OAAO,WAAW,UAAU,UAAU,WAAW,KAAK,GAAG,YAAuB;CACnH,MAAM,eAAe,cAAc,KAAA;CACnC,MAAM,UAAU,OAAsB,IAAI;CAC1C,MAAM,sBAAsB,OAAO,KAAK;CACxC,MAAM,cAAc,MAAM;CAC1B,MAAM,aAAa,aAAa,CAAC,KAAK,OAAO,CAAC;CAC9C,MAAM,CAAC,OAAO,YAAY,qBAAqB;EAC7C,MAAM;EACN;EACA,aAAa,gBAAgB;EAC7B,QAAQ;CACV,CAAC;CAED,gBAAgB;EACd,IAAI,CAAC,QAAQ,WAAW,cAAc,KAAA,GAAW;EACjD,QAAQ,SAAS,SAAS,MAAM,SAAS,QAAQ;GAC/C,IAAI,IAAI,aAAa,YAAY,MAAM,WAAW;IAChD,oBAAoB,UAAU;IAC9B,IAAI,MAAM;IACV,oBAAoB,UAAU;GAChC;EACF,CAAC;CACH,GAAG,CAAC,SAAS,CAAC;CAEd,gBAAgB;EACd,IAAI,CAAC,gBAAgB,gBAAgB,QAAQ,SAC3C,QAAQ,SAAS,SAAS,MAAM,SAAS,QAAQ;GAC/C,MAAM,aAAa,IAAI,aAAa,YAAY,MAAM;GACtD,IAAI,aAAa,iBAAiB,aAAa,SAAS,OAAO;EACjE,CAAC;CAGL,GAAG,CAAC,CAAC;CAEL,OACE,oBAAC,SAAD;EACE,OAAO;GACL;GACA,cAAc;GACd,UAAU;GACV,mBAAmB,UAAmB,SAAS,GAAG,YAAY,GAAG;EACnE;EAEA,UAAA,oBAAC,WAAD;GACE,0BAAA;GACA,KAAK;GACL,WAAW,KAAK,WAAW,SAAS;GACpC,GAAI;GAEH;EACM,CAAA;CACF,CAAA;AAEb"}
@@ -1,2 +1,2 @@
1
- import { d as Textarea, f as TextareaProps } from "../../alert-footer-B80k5mkX.mjs";
2
- export { Textarea, TextareaProps };
1
+ import { d as Textarea, f as TextareaProps } from "../../alert-footer-BoTu7E1s.mjs";
2
+ export { Textarea, type TextareaProps };
@@ -1,2 +1,2 @@
1
- import { d as Textarea, f as TextareaProps } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { d as Textarea, f as TextareaProps } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { Textarea, TextareaProps };
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.mjs","names":[],"sources":["../../../src/components/textarea/textarea.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, TextareaHTMLAttributes } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type TextareaProps = MergeRight<\n DefaultProps & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'prefix'>,\n {\n /**\n * Size of the textarea.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n ref?: Ref<HTMLTextAreaElement>;\n }\n>;\n\nexport const Textarea = ({ className, size, ref, ...props }: TextareaProps) => {\n return <textarea className={clsx('bi-input', className)} data-size={size} ref={ref} {...props} />;\n};\n"],"mappings":";;;AAiBA,MAAa,YAAY,EAAE,WAAW,MAAM,KAAK,GAAG,YAA2B;CAC7E,OAAO,oBAAC,YAAD;EAAU,WAAW,KAAK,YAAY,UAAU;EAAE,aAAW;EAAW;EAAK,GAAI;EAAS,CAAA"}
1
+ {"version":3,"file":"textarea.mjs","names":[],"sources":["../../../src/components/textarea/textarea.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, TextareaHTMLAttributes } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type TextareaProps = MergeRight<\n DefaultProps & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'prefix'>,\n {\n /**\n * Size of the textarea.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n ref?: Ref<HTMLTextAreaElement>;\n }\n>;\n\nexport const Textarea = ({ className, size, ref, ...props }: TextareaProps) => {\n return <textarea className={clsx('bi-input', className)} data-size={size} ref={ref} {...props} />;\n};\n"],"mappings":";;;AAiBA,MAAa,YAAY,EAAE,WAAW,MAAM,KAAK,GAAG,YAA2B;CAC7E,OAAO,oBAAC,YAAD;EAAU,WAAW,KAAK,YAAY,SAAS;EAAG,aAAW;EAAW;EAAK,GAAI;CAAQ,CAAA;AAClG"}
@@ -1,2 +1,2 @@
1
- import { l as Textfield, u as TextfieldProps } from "../../alert-footer-B80k5mkX.mjs";
2
- export { Textfield, TextfieldProps };
1
+ import { l as Textfield, u as TextfieldProps } from "../../alert-footer-BoTu7E1s.mjs";
2
+ export { Textfield, type TextfieldProps };
@@ -1,2 +1,2 @@
1
- import { l as Textfield, u as TextfieldProps } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { l as Textfield, u as TextfieldProps } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { Textfield, TextfieldProps };
@@ -1 +1 @@
1
- {"version":3,"file":"textfield.mjs","names":[],"sources":["../../../src/components/textfield/textfield.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { DefaultProps, LabelRequiredProps } from '../../types';\nimport { Field, FieldAffix, FieldAffixes, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\nimport { Textarea, type TextareaProps } from '../textarea';\nimport { ValidationMessage } from '../validation-message';\n\ntype InputPropsFiltered = Omit<InputProps, 'prefix' | 'className' | 'style'>;\ntype TextareaPropsFiltered = Omit<TextareaProps, 'prefix' | 'className' | 'style'>;\n\ntype BaseTextfieldProps = LabelRequiredProps &\n DefaultProps & {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Prefix */\n prefix?: string;\n /** Suffix */\n suffix?: string;\n /** Error message for field */\n error?: ReactNode;\n /** `className` for the `Field` element */\n className?: InputProps['className'];\n /** `style` for the `Field` element */\n style?: InputProps['style'];\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n };\n\ntype TextfieldTextareaProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline: true;\n} & TextareaPropsFiltered;\n\ntype TextfieldInputProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline?: never | false;\n} & InputPropsFiltered;\n\nexport type TextfieldProps = BaseTextfieldProps & // We use either Textarea or Input props, depending on the `multiline` prop.\n (TextfieldTextareaProps | TextfieldInputProps) & {\n ref?: Ref<HTMLInputElement | HTMLTextAreaElement>;\n };\n\nexport const Textfield = ({\n label,\n description,\n error,\n multiline,\n prefix,\n suffix,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: TextfieldProps) => {\n const generatedId = useId();\n const descriptionId = useId();\n const validationId = useId();\n const id = idProp || generatedId;\n\n const ariaDescribedBy =\n [description ? descriptionId : '', error ? validationId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n return (\n <Field className={className} data-color={color} data-color-scheme={colorScheme} style={style} fullwidth={fullwidth}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <FieldAffixes>\n {prefix && <FieldAffix>{prefix}</FieldAffix>}\n {multiline ? (\n <Textarea\n id={id}\n ref={ref as Ref<HTMLTextAreaElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...(props as TextareaPropsFiltered)}\n />\n ) : (\n <Input\n id={id}\n ref={ref as Ref<HTMLInputElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...(props as InputPropsFiltered)}\n />\n )}\n {suffix && <FieldAffix>{suffix}</FieldAffix>}\n </FieldAffixes>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AA+CA,MAAa,aAAa,EACxB,OACA,aACA,OACA,WACA,QACA,QACA,OACA,WACA,WACA,KACA,IAAI,QACJ,cAAc,OACd,qBAAqB,aACrB,oBAAoB,qBACpB,GAAG,YACiB;CACpB,MAAM,cAAc,OAAO;CAC3B,MAAM,gBAAgB,OAAO;CAC7B,MAAM,eAAe,OAAO;CAC5B,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;EAAoB,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,KAAA;CACzG,OACE,qBAAC,OAAD;EAAkB;EAAW,cAAY;EAAO,qBAAmB;EAAoB;EAAkB;YAAzG;GACG,SAAS,oBAAC,OAAD;IAAO,SAAS;cAAK;IAAc,CAAA;GAC5C,eAAe,oBAAC,kBAAD;IAAkB,IAAI;cAAgB;IAA+B,CAAA;GACrF,qBAAC,cAAD,EAAA,UAAA;IACG,UAAU,oBAAC,YAAD,EAAA,UAAa,QAAoB,CAAA;IAC3C,YACC,oBAAC,UAAD;KACM;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI,KAAA;KAChC,oBAAkB;KAClB,GAAK;KACL,CAAA,GAEF,oBAAC,OAAD;KACM;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI,KAAA;KAChC,oBAAkB;KAClB,GAAK;KACL,CAAA;IAEH,UAAU,oBAAC,YAAD,EAAA,UAAa,QAAoB,CAAA;IAC/B,EAAA,CAAA;GACd,CAAC,CAAC,SAAS,oBAAC,mBAAD;IAAmB,IAAI;cAAe;IAA0B,CAAA;GACtE"}
1
+ {"version":3,"file":"textfield.mjs","names":[],"sources":["../../../src/components/textfield/textfield.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { DefaultProps, LabelRequiredProps } from '../../types';\nimport { Field, FieldAffix, FieldAffixes, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\nimport { Textarea, type TextareaProps } from '../textarea';\nimport { ValidationMessage } from '../validation-message';\n\ntype InputPropsFiltered = Omit<InputProps, 'prefix' | 'className' | 'style'>;\ntype TextareaPropsFiltered = Omit<TextareaProps, 'prefix' | 'className' | 'style'>;\n\ntype BaseTextfieldProps = LabelRequiredProps &\n DefaultProps & {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Prefix */\n prefix?: string;\n /** Suffix */\n suffix?: string;\n /** Error message for field */\n error?: ReactNode;\n /** `className` for the `Field` element */\n className?: InputProps['className'];\n /** `style` for the `Field` element */\n style?: InputProps['style'];\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n };\n\ntype TextfieldTextareaProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline: true;\n} & TextareaPropsFiltered;\n\ntype TextfieldInputProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline?: never | false;\n} & InputPropsFiltered;\n\nexport type TextfieldProps = BaseTextfieldProps & // We use either Textarea or Input props, depending on the `multiline` prop.\n (TextfieldTextareaProps | TextfieldInputProps) & {\n ref?: Ref<HTMLInputElement | HTMLTextAreaElement>;\n };\n\nexport const Textfield = ({\n label,\n description,\n error,\n multiline,\n prefix,\n suffix,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: TextfieldProps) => {\n const generatedId = useId();\n const descriptionId = useId();\n const validationId = useId();\n const id = idProp || generatedId;\n\n const ariaDescribedBy =\n [description ? descriptionId : '', error ? validationId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n return (\n <Field className={className} data-color={color} data-color-scheme={colorScheme} style={style} fullwidth={fullwidth}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <FieldAffixes>\n {prefix && <FieldAffix>{prefix}</FieldAffix>}\n {multiline ? (\n <Textarea\n id={id}\n ref={ref as Ref<HTMLTextAreaElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...(props as TextareaPropsFiltered)}\n />\n ) : (\n <Input\n id={id}\n ref={ref as Ref<HTMLInputElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...(props as InputPropsFiltered)}\n />\n )}\n {suffix && <FieldAffix>{suffix}</FieldAffix>}\n </FieldAffixes>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AA+CA,MAAa,aAAa,EACxB,OACA,aACA,OACA,WACA,QACA,QACA,OACA,WACA,WACA,KACA,IAAI,QACJ,cAAc,OACd,qBAAqB,aACrB,oBAAoB,qBACpB,GAAG,YACiB;CACpB,MAAM,cAAc,MAAM;CAC1B,MAAM,gBAAgB,MAAM;CAC5B,MAAM,eAAe,MAAM;CAC3B,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;CAAmB,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,KAAK,KAAA;CACzG,OACE,qBAAC,OAAD;EAAkB;EAAW,cAAY;EAAO,qBAAmB;EAAoB;EAAkB;EAAzG,UAAA;GACG,SAAS,oBAAC,OAAD;IAAO,SAAS;IAAK,UAAA;GAAa,CAAA;GAC3C,eAAe,oBAAC,kBAAD;IAAkB,IAAI;IAAgB,UAAA;GAA8B,CAAA;GACpF,qBAAC,cAAD,EAAA,UAAA;IACG,UAAU,oBAAC,YAAD,EAAA,UAAa,OAAmB,CAAA;IAC1C,YACC,oBAAC,UAAD;KACM;KACC;KACL,gBAAc,QAAQ,KAAK,KAAK,KAAA;KAChC,oBAAkB;KAClB,GAAK;IACN,CAAA,IAED,oBAAC,OAAD;KACM;KACC;KACL,gBAAc,QAAQ,KAAK,KAAK,KAAA;KAChC,oBAAkB;KAClB,GAAK;IACN,CAAA;IAEF,UAAU,oBAAC,YAAD,EAAA,UAAa,OAAmB,CAAA;GAC/B,EAAA,CAAA;GACb,CAAC,CAAC,SAAS,oBAAC,mBAAD;IAAmB,IAAI;IAAe,UAAA;GAAyB,CAAA;EACtE;;AAEX"}
@@ -1,2 +1,2 @@
1
- import { c as TooltipProps, s as Tooltip } from "../../alert-footer-B80k5mkX.mjs";
2
- export { Tooltip, TooltipProps };
1
+ import { c as TooltipProps, s as Tooltip } from "../../alert-footer-BoTu7E1s.mjs";
2
+ export { Tooltip, type TooltipProps };
@@ -1,2 +1,2 @@
1
- import { c as TooltipProps, s as Tooltip } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { c as TooltipProps, s as Tooltip } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { Tooltip, TooltipProps };
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.mjs","names":[],"sources":["../../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport '@digdir/designsystemet-web'; // Import ds-tooltip functionality\nimport type { HTMLAttributes, ReactElement, Ref, RefAttributes } from 'react';\nimport type { Placement } from '@floating-ui/dom';\nimport type { MergeRight } from '../../utilities';\nimport '../../vanilla/tooltip';\n\nexport type TooltipProps = MergeRight<\n HTMLAttributes<HTMLSpanElement>,\n {\n /**\n * The element or string that triggers the tooltip.\n *\n * Note: If it is a string, it will be wrapped in a span.\n * Note: If it is an element, it must be able to receive a ref.\n */\n children: (ReactElement & RefAttributes<HTMLSpanElement>) | string;\n /**\n * Content of the tooltip\n **/\n content: string;\n /**\n * Placement of the tooltip on the trigger.\n * @default 'top'\n */\n placement?: Placement;\n /**\n * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\n/**\n * Tooltip component that displays a small piece of information on hover or focus.\n *\n * @example\n * <Tooltip content='This is the tooltip content'>\n * <button>Hover me</button>\n * </Tooltip>\n *\n * @example\n * <Tooltip content='This is the tooltip content'>\n * Hover me\n * </Tooltip>\n */\nexport const Tooltip = ({\n children,\n content,\n placement = 'top',\n disableAutoPlacement = false,\n ref,\n ...props\n}: TooltipProps) => {\n return (\n <Slot\n data-tooltip={content}\n data-placement={placement}\n data-autoplacement={!disableAutoPlacement}\n suppressHydrationWarning // Since data-tooltip adds aria-label/aria-description\n ref={ref}\n {...props}\n >\n {/* oxlint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\n {typeof children === 'string' ? <span tabIndex={0}>{children}</span> : children}\n </Slot>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgDA,MAAa,WAAW,EACtB,UACA,SACA,YAAY,OACZ,uBAAuB,OACvB,KACA,GAAG,YACe;CAClB,OACE,oBAAC,MAAD;EACE,gBAAc;EACd,kBAAgB;EAChB,sBAAoB,CAAC;EACrB,0BAAA;EACK;EACL,GAAI;YAGH,OAAO,aAAa,WAAW,oBAAC,QAAD;GAAM,UAAU;GAAI;GAAgB,CAAA,GAAG;EAClE,CAAA"}
1
+ {"version":3,"file":"tooltip.mjs","names":[],"sources":["../../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport '@digdir/designsystemet-web'; // Import ds-tooltip functionality\nimport type { HTMLAttributes, ReactElement, Ref, RefAttributes } from 'react';\nimport type { Placement } from '@floating-ui/dom';\nimport type { MergeRight } from '../../utilities';\nimport '../../vanilla/tooltip';\n\nexport type TooltipProps = MergeRight<\n HTMLAttributes<HTMLSpanElement>,\n {\n /**\n * The element or string that triggers the tooltip.\n *\n * Note: If it is a string, it will be wrapped in a span.\n * Note: If it is an element, it must be able to receive a ref.\n */\n children: (ReactElement & RefAttributes<HTMLSpanElement>) | string;\n /**\n * Content of the tooltip\n **/\n content: string;\n /**\n * Placement of the tooltip on the trigger.\n * @default 'top'\n */\n placement?: Placement;\n /**\n * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\n/**\n * Tooltip component that displays a small piece of information on hover or focus.\n *\n * @example\n * <Tooltip content='This is the tooltip content'>\n * <button>Hover me</button>\n * </Tooltip>\n *\n * @example\n * <Tooltip content='This is the tooltip content'>\n * Hover me\n * </Tooltip>\n */\nexport const Tooltip = ({\n children,\n content,\n placement = 'top',\n disableAutoPlacement = false,\n ref,\n ...props\n}: TooltipProps) => {\n return (\n <Slot\n data-tooltip={content}\n data-placement={placement}\n data-autoplacement={!disableAutoPlacement}\n suppressHydrationWarning // Since data-tooltip adds aria-label/aria-description\n ref={ref}\n {...props}\n >\n {/* oxlint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\n {typeof children === 'string' ? <span tabIndex={0}>{children}</span> : children}\n </Slot>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgDA,MAAa,WAAW,EACtB,UACA,SACA,YAAY,OACZ,uBAAuB,OACvB,KACA,GAAG,YACe;CAClB,OACE,oBAAC,MAAD;EACE,gBAAc;EACd,kBAAgB;EAChB,sBAAoB,CAAC;EACrB,0BAAA;EACK;EACL,GAAI;EAGH,UAAA,OAAO,aAAa,WAAW,oBAAC,QAAD;GAAM,UAAU;GAAI;EAAe,CAAA,IAAI;CACnE,CAAA;AAEV"}
@@ -1,2 +1,2 @@
1
- import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-B80k5mkX.mjs";
2
- export { ValidationMessage, ValidationMessageProps };
1
+ import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-BoTu7E1s.mjs";
2
+ export { ValidationMessage, type ValidationMessageProps };
@@ -1,2 +1,2 @@
1
- import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-B80k5mkX.mjs";
1
+ import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-BoTu7E1s.mjs";
2
2
  export { ValidationMessage, ValidationMessageProps };
@@ -1 +1 @@
1
- {"version":3,"file":"validation-message.mjs","names":[],"sources":["../../../src/components/validation-message/validation-message.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx/lite';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { AsChildProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { ErrorIcon } from '@bi-digital/icons';\n\nexport type ValidationMessageProps = MergeRight<\n AsChildProps & HTMLAttributes<HTMLParagraphElement>,\n {\n /** Override the default warning icon. Must be a BiIcon to work correctly. */\n icon?: ReactNode;\n ref?: Ref<HTMLParagraphElement>;\n }\n>;\n\nexport const ValidationMessage = ({ children, className, icon, asChild, ref, ...props }: ValidationMessageProps) => {\n const Component = asChild ? Slot : 'p';\n\n return (\n <Component className={clsx('bi-validation-message', className)} ref={ref} {...props}>\n {icon || <ErrorIcon />}\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;AAgBA,MAAa,qBAAqB,EAAE,UAAU,WAAW,MAAM,SAAS,KAAK,GAAG,YAAoC;CAGlH,OACE,qBAHgB,UAAU,OAAO,KAGjC;EAAW,WAAW,KAAK,yBAAyB,UAAU;EAAO;EAAK,GAAI;YAA9E,CACG,QAAQ,oBAAC,WAAD,EAAa,CAAA,EACrB,SACS"}
1
+ {"version":3,"file":"validation-message.mjs","names":[],"sources":["../../../src/components/validation-message/validation-message.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx/lite';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { AsChildProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { ErrorIcon } from '@bi-digital/icons';\n\nexport type ValidationMessageProps = MergeRight<\n AsChildProps & HTMLAttributes<HTMLParagraphElement>,\n {\n /** Override the default warning icon. Must be a BiIcon to work correctly. */\n icon?: ReactNode;\n ref?: Ref<HTMLParagraphElement>;\n }\n>;\n\nexport const ValidationMessage = ({ children, className, icon, asChild, ref, ...props }: ValidationMessageProps) => {\n const Component = asChild ? Slot : 'p';\n\n return (\n <Component className={clsx('bi-validation-message', className)} ref={ref} {...props}>\n {icon || <ErrorIcon />}\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;AAgBA,MAAa,qBAAqB,EAAE,UAAU,WAAW,MAAM,SAAS,KAAK,GAAG,YAAoC;CAGlH,OACE,qBAHgB,UAAU,OAAO,KAGjC;EAAW,WAAW,KAAK,yBAAyB,SAAS;EAAQ;EAAK,GAAI;EAA9E,UAAA,CACG,QAAQ,oBAAC,WAAD,CAAY,CAAA,GACpB,QACQ;;AAEf"}