@bi-digital/react 0.3.1 → 0.3.3

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 (185) hide show
  1. package/dist/alert-C6PxDwHt.js.map +1 -1
  2. package/dist/alert-footer-DL4rCThp.js.map +1 -1
  3. package/dist/{alert-footer-BS7TXc1g.d.ts → alert-footer-DWZoQIek.d.ts} +67 -67
  4. package/dist/avatar-6Q2xwviO.js.map +1 -1
  5. package/dist/badge-D9OVAKG8.js.map +1 -1
  6. package/dist/button-fhd-JARc.js.map +1 -1
  7. package/dist/card-QAnFhTk6.js.map +1 -1
  8. package/dist/card-action-D8M3_IVq.js.map +1 -1
  9. package/dist/card-actions-CIsnmxsm.js.map +1 -1
  10. package/dist/card-content-DkEHp8mv.js.map +1 -1
  11. package/dist/card-date-Bd87BGDE.js.map +1 -1
  12. package/dist/card-header-D-RMd4xS.js.map +1 -1
  13. package/dist/card-media-DhU2_Ueq.js.map +1 -1
  14. package/dist/checkbox-ZR1Z2PCF.js.map +1 -1
  15. package/dist/checkbox-subsection-BPe5aj-W.js.map +1 -1
  16. package/dist/chip-b9xUiF7_.js.map +1 -1
  17. package/dist/components/alert/alert-footer.d.ts +2 -2
  18. package/dist/components/alert/alert.d.ts +2 -2
  19. package/dist/components/alert/index.d.ts +2 -2
  20. package/dist/components/avatar/avatar.d.ts +2 -2
  21. package/dist/components/avatar/index.d.ts +2 -2
  22. package/dist/components/badge/badge.d.ts +2 -2
  23. package/dist/components/badge/index.d.ts +2 -2
  24. package/dist/components/button/button.d.ts +2 -2
  25. package/dist/components/button/index.d.ts +2 -2
  26. package/dist/components/card/card-action.d.ts +2 -2
  27. package/dist/components/card/card-actions.d.ts +2 -2
  28. package/dist/components/card/card-content.d.ts +2 -2
  29. package/dist/components/card/card-date.d.ts +2 -2
  30. package/dist/components/card/card-header.d.ts +2 -2
  31. package/dist/components/card/card-media.d.ts +2 -2
  32. package/dist/components/card/card.d.ts +2 -2
  33. package/dist/components/card/index.d.ts +2 -2
  34. package/dist/components/checkbox/checkbox-subsection.d.ts +2 -2
  35. package/dist/components/checkbox/checkbox.d.ts +2 -2
  36. package/dist/components/checkbox/index.d.ts +2 -2
  37. package/dist/components/chip/chip.d.ts +2 -2
  38. package/dist/components/chip/index.d.ts +2 -2
  39. package/dist/components/dialog/dialog-close-button.d.ts +2 -2
  40. package/dist/components/dialog/dialog-content.d.ts +2 -2
  41. package/dist/components/dialog/dialog-footer.d.ts +2 -2
  42. package/dist/components/dialog/dialog-header.d.ts +2 -2
  43. package/dist/components/dialog/dialog-trigger-context.d.ts +1 -1
  44. package/dist/components/dialog/dialog-trigger.d.ts +2 -2
  45. package/dist/components/dialog/dialog.d.ts +2 -2
  46. package/dist/components/dialog/index.d.ts +2 -2
  47. package/dist/components/drawer/drawer-close-button.d.ts +2 -2
  48. package/dist/components/drawer/drawer-content.d.ts +2 -2
  49. package/dist/components/drawer/drawer-footer.d.ts +2 -2
  50. package/dist/components/drawer/drawer-header.d.ts +2 -2
  51. package/dist/components/drawer/drawer-trigger.d.ts +2 -2
  52. package/dist/components/drawer/drawer.d.ts +2 -2
  53. package/dist/components/drawer/index.d.ts +2 -2
  54. package/dist/components/dropdown/dropdown-button.d.ts +2 -2
  55. package/dist/components/dropdown/dropdown-trigger-context.d.ts +2 -2
  56. package/dist/components/dropdown/dropdown-trigger.d.ts +2 -2
  57. package/dist/components/dropdown/dropdown.d.ts +2 -2
  58. package/dist/components/dropdown/index.d.ts +2 -2
  59. package/dist/components/field/field-affix.d.ts +2 -2
  60. package/dist/components/field/field-description.d.ts +2 -2
  61. package/dist/components/field/field.d.ts +2 -2
  62. package/dist/components/field/index.d.ts +2 -2
  63. package/dist/components/fieldset/fieldset-description.d.ts +2 -2
  64. package/dist/components/fieldset/fieldset-legend.d.ts +2 -2
  65. package/dist/components/fieldset/fieldset.d.ts +2 -2
  66. package/dist/components/fieldset/index.d.ts +2 -2
  67. package/dist/components/filter-group/filter-group.d.ts +2 -2
  68. package/dist/components/filter-group/index.d.ts +2 -2
  69. package/dist/components/footer/footer.d.ts +2 -2
  70. package/dist/components/footer/index.d.ts +2 -2
  71. package/dist/components/index.d.ts +2 -2
  72. package/dist/components/input/index.d.ts +2 -2
  73. package/dist/components/input/input.d.ts +2 -2
  74. package/dist/components/label/index.d.ts +2 -2
  75. package/dist/components/label/label.d.ts +2 -2
  76. package/dist/components/link/index.d.ts +2 -2
  77. package/dist/components/link/link.d.ts +2 -2
  78. package/dist/components/logo/index.d.ts +2 -2
  79. package/dist/components/logo/logo.d.ts +2 -2
  80. package/dist/components/navbar/index.d.ts +2 -2
  81. package/dist/components/navbar/navbar.d.ts +2 -2
  82. package/dist/components/navbar/sub-navbar.d.ts +2 -2
  83. package/dist/components/pagination/index.d.ts +2 -2
  84. package/dist/components/pagination/pagination-button.d.ts +2 -2
  85. package/dist/components/pagination/pagination.d.ts +2 -2
  86. package/dist/components/popover/index.d.ts +2 -2
  87. package/dist/components/popover/popover-trigger.d.ts +2 -2
  88. package/dist/components/popover/popover.d.ts +2 -2
  89. package/dist/components/radio/index.d.ts +2 -2
  90. package/dist/components/radio/radio.d.ts +2 -2
  91. package/dist/components/search/index.d.ts +2 -2
  92. package/dist/components/search/search.d.ts +2 -2
  93. package/dist/components/select/index.d.ts +2 -2
  94. package/dist/components/select/select-optgroup.d.ts +2 -2
  95. package/dist/components/select/select-option.d.ts +2 -2
  96. package/dist/components/select/select.d.ts +2 -2
  97. package/dist/components/selectfield/index.d.ts +2 -2
  98. package/dist/components/selectfield/selectfield.d.ts +2 -2
  99. package/dist/components/skip-link/index.d.ts +2 -2
  100. package/dist/components/skip-link/skip-link.d.ts +2 -2
  101. package/dist/components/spinner/index.d.ts +2 -2
  102. package/dist/components/spinner/spinner.d.ts +2 -2
  103. package/dist/components/tabs/index.d.ts +2 -2
  104. package/dist/components/tabs/tab.d.ts +2 -2
  105. package/dist/components/tabs/tabs-list.d.ts +2 -2
  106. package/dist/components/tabs/tabs-panel.d.ts +2 -2
  107. package/dist/components/tabs/tabs.d.ts +2 -2
  108. package/dist/components/textarea/index.d.ts +2 -2
  109. package/dist/components/textarea/textarea.d.ts +2 -2
  110. package/dist/components/textfield/index.d.ts +2 -2
  111. package/dist/components/textfield/textfield.d.ts +2 -2
  112. package/dist/components/validation-message/index.d.ts +2 -2
  113. package/dist/components/validation-message/validation-message.d.ts +2 -2
  114. package/dist/dialog-DzGRZgbP.js.map +1 -1
  115. package/dist/dialog-close-button-C1omdnIn.js.map +1 -1
  116. package/dist/dialog-content-R35XpbSj.js.map +1 -1
  117. package/dist/dialog-footer-AoiCz_Uj.js.map +1 -1
  118. package/dist/dialog-header-Bbq9DcHX.js.map +1 -1
  119. package/dist/dialog-trigger-DinHpkua.js.map +1 -1
  120. package/dist/dialog-trigger-context-51mA5fz3.js.map +1 -1
  121. package/dist/{dialog-trigger-context-ClG9UVsz.d.ts → dialog-trigger-context-BxroyS54.d.ts} +3 -3
  122. package/dist/drawer-CZ05Lizo.js.map +1 -1
  123. package/dist/drawer-close-button-DC39bNW2.js.map +1 -1
  124. package/dist/drawer-content-CFc-rxBo.js.map +1 -1
  125. package/dist/drawer-footer-CfHjfvEg.js.map +1 -1
  126. package/dist/drawer-header-DK4XoaaW.js.map +1 -1
  127. package/dist/drawer-trigger-Do9Htx5M.js.map +1 -1
  128. package/dist/drawer-trigger-context-BUWPPdas.js.map +1 -1
  129. package/dist/dropdown-Fzf2CeX4.js.map +1 -1
  130. package/dist/dropdown-b7acNLZb.js.map +1 -1
  131. package/dist/dropdown-button-FQqIwqdp.js.map +1 -1
  132. package/dist/dropdown-item-DQQXQC4J.js.map +1 -1
  133. package/dist/dropdown-list-DB1mST67.js.map +1 -1
  134. package/dist/dropdown-trigger-Fwrigwtg.js.map +1 -1
  135. package/dist/dropdown-trigger-context-BCcyoZEx.js.map +1 -1
  136. package/dist/field-DFMMLG-d.js.map +1 -1
  137. package/dist/field-affix-npc6m7XL.js.map +1 -1
  138. package/dist/field-description-Dhm1VA08.js.map +1 -1
  139. package/dist/fieldset-Bpu4CRKG.js.map +1 -1
  140. package/dist/fieldset-description-DiHvcLh-.js.map +1 -1
  141. package/dist/fieldset-legend-CR4srn2-.js.map +1 -1
  142. package/dist/filter-group-Fzw9g6JB.js.map +1 -1
  143. package/dist/footer-B9sjkncE.js.map +1 -1
  144. package/dist/footer-links-BIUrxu38.js.map +1 -1
  145. package/dist/input-Dr7BnTyd.js.map +1 -1
  146. package/dist/label-DUzvAx-T.js.map +1 -1
  147. package/dist/link-BqDeZAJF.js.map +1 -1
  148. package/dist/logo-QKrYvRFP.js.map +1 -1
  149. package/dist/main.d.ts +2 -2
  150. package/dist/navbar-Dxv7GQO0.js.map +1 -1
  151. package/dist/pagination-DH6vZYMO.js.map +1 -1
  152. package/dist/pagination-button-CMSNwkeT.js.map +1 -1
  153. package/dist/pagination-item-DzskmZxf.js.map +1 -1
  154. package/dist/popover-DOMLkRA5.js.map +1 -1
  155. package/dist/popover-DmA4qMtu.js.map +1 -1
  156. package/dist/popover-trigger-Chi8uvRM.js.map +1 -1
  157. package/dist/popover-trigger-context-Cre9Mczn.js.map +1 -1
  158. package/dist/radio-DAC5mhl3.js.map +1 -1
  159. package/dist/search-DzjgrvFl.js.map +1 -1
  160. package/dist/select-R87VdG5U.js.map +1 -1
  161. package/dist/select-optgroup-jowSQvbc.js.map +1 -1
  162. package/dist/select-option-WAhhr82L.js.map +1 -1
  163. package/dist/selectfield-BD-t6Mmm.js.map +1 -1
  164. package/dist/skip-link-CbdX4Taw.js.map +1 -1
  165. package/dist/spinner-Ch5bEQBR.js.map +1 -1
  166. package/dist/sticky-header-gE5HX2ug.js.map +1 -1
  167. package/dist/sub-navbar-BdJ9EKsU.js.map +1 -1
  168. package/dist/sub-navbar-DkxQv0WJ.js.map +1 -1
  169. package/dist/tab-BvSndQZ_.js.map +1 -1
  170. package/dist/tabs-C70z_5SJ.js.map +1 -1
  171. package/dist/tabs-list-npvK06bl.js.map +1 -1
  172. package/dist/tabs-panel-L8HovooI.js.map +1 -1
  173. package/dist/textarea-B1fAOfkt.js.map +1 -1
  174. package/dist/textfield-DwLkaC2S.js.map +1 -1
  175. package/dist/useCheckboxGroup-BDH3ewt8.js.map +1 -1
  176. package/dist/useIsElementAboveViewport-lmdnXDdc.js.map +1 -1
  177. package/dist/useMediaQuery-ICPWsO_p.js.map +1 -1
  178. package/dist/useMergeRefs-DC710CHX.js.map +1 -1
  179. package/dist/usePagination-DQR72JNE.js.map +1 -1
  180. package/dist/useScrollDirection-C2EmQi0U.js.map +1 -1
  181. package/dist/utilities/hooks/index.d.ts +2 -2
  182. package/dist/utilities/hooks/usePagination/usePagination.d.ts +2 -2
  183. package/dist/utilities/index.d.ts +2 -2
  184. package/dist/validation-message-CPGA4DxM.js.map +1 -1
  185. package/package.json +6 -3
@@ -1 +1 @@
1
- {"version":3,"file":"navbar-Dxv7GQO0.js","names":[],"sources":["../src/components/navbar/navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { Logo } from '../logo';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type NavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Skip link.\n */\n skipLink?: ReactNode;\n /**\n * Determines if the navbar should be fixed.\n * @default false\n */\n fixed?: boolean;\n /**\n * Aria label for the home link.\n */\n homeAriaLabel: string;\n /**\n * Href for the home link.\n */\n homeHref: string;\n /**\n * Override the default logo\n */\n logo?: ReactNode;\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const Navbar = ({\n dark = false,\n fixed = false,\n homeAriaLabel,\n skipLink,\n homeHref,\n logo,\n children,\n className,\n ref,\n ...props\n}: NavbarProps) => {\n return (\n <nav {...props} className={clsx('bi-navbar', className)} data-fixed={fixed} data-dark={dark} ref={ref}>\n {skipLink}\n <header>\n <a aria-label={homeAriaLabel} href={homeHref}>\n {logo || <Logo dark={dark} />}\n </a>\n {children}\n </header>\n </nav>\n );\n};\n"],"mappings":";;;;;AAkCA,MAAa,SAAS,CAAC,EACrB,OAAO,OACP,QAAQ,OACR,eACA,UACA,UACA,MACA,UACA,WACA,IACA,GAAG,OACS,KAAK;AACjB,6BACG;EAAI,GAAI;EAAO,WAAW,KAAK,aAAa,UAAU;EAAE,cAAY;EAAO,aAAW;EAAW;aAC/F,+BACA,2CACE;GAAE,cAAY;GAAe,MAAM;aACjC,4BAAS,QAAW,OAAQ;IAC3B,EACH,YACM;GACL;AAET"}
1
+ {"version":3,"file":"navbar-Dxv7GQO0.js","names":[],"sources":["../src/components/navbar/navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { Logo } from '../logo';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type NavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Skip link.\n */\n skipLink?: ReactNode;\n /**\n * Determines if the navbar should be fixed.\n * @default false\n */\n fixed?: boolean;\n /**\n * Aria label for the home link.\n */\n homeAriaLabel: string;\n /**\n * Href for the home link.\n */\n homeHref: string;\n /**\n * Override the default logo\n */\n logo?: ReactNode;\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const Navbar = ({\n dark = false,\n fixed = false,\n homeAriaLabel,\n skipLink,\n homeHref,\n logo,\n children,\n className,\n ref,\n ...props\n}: NavbarProps) => {\n return (\n <nav {...props} className={clsx('bi-navbar', className)} data-fixed={fixed} data-dark={dark} ref={ref}>\n {skipLink}\n <header>\n <a aria-label={homeAriaLabel} href={homeHref}>\n {logo || <Logo dark={dark} />}\n </a>\n {children}\n </header>\n </nav>\n );\n};\n"],"mappings":";;;;;AAkCA,MAAa,UAAU,EACrB,OAAO,OACP,QAAQ,OACR,eACA,UACA,UACA,MACA,UACA,WACA,IACA,GAAG,YACc;AACjB,QACE,qBAAC;EAAI,GAAI;EAAO,WAAW,KAAK,aAAa;EAAY,cAAY;EAAO,aAAW;EAAW;aAC/F,UACD,qBAAC,uBACC,oBAAC;GAAE,cAAY;GAAe,MAAM;aACjC,QAAQ,oBAAC,QAAW;MAEtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"pagination-DH6vZYMO.js","names":[],"sources":["../src/components/pagination/pagination.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type PaginationProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLUListElement>;\n }\n>;\n\nexport const Pagination = ({ className, dark = false, ref, children, ...props }: PaginationProps) => {\n return (\n <nav className={clsx('bi-pagination', className)} data-dark={dark} ref={ref} {...props}>\n <ul>{children}</ul>\n </nav>\n );\n};\n"],"mappings":";;;;AAYA,MAAa,aAAa,CAAC,EAAE,WAAW,OAAO,OAAO,KAAK,SAAU,GAAG,OAAwB,KAAK;AACnG,4BACG;EAAI,WAAW,KAAK,iBAAiB,UAAU;EAAE,aAAW;EAAW;EAAK,GAAI;gCAC9E,QAAI,WAAc;GACf;AAET"}
1
+ {"version":3,"file":"pagination-DH6vZYMO.js","names":[],"sources":["../src/components/pagination/pagination.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type PaginationProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLUListElement>;\n }\n>;\n\nexport const Pagination = ({ className, dark = false, ref, children, ...props }: PaginationProps) => {\n return (\n <nav className={clsx('bi-pagination', className)} data-dark={dark} ref={ref} {...props}>\n <ul>{children}</ul>\n </nav>\n );\n};\n"],"mappings":";;;;AAYA,MAAa,cAAc,EAAE,WAAW,OAAO,OAAO,KAAK,SAAU,GAAG,YAA6B;AACnG,QACE,oBAAC;EAAI,WAAW,KAAK,iBAAiB;EAAY,aAAW;EAAW;EAAK,GAAI;YAC/E,oBAAC,QAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"pagination-button-CMSNwkeT.js","names":[],"sources":["../src/components/pagination/pagination-button.tsx"],"sourcesContent":["import { AriaAttributes } from 'react';\nimport { Button, type ButtonProps } from '../button';\n\nexport type PaginationButtonProps = ButtonProps & {\n /**\n * Toggle button as active\n * @default false\n */\n 'aria-current'?: AriaAttributes['aria-current'];\n};\n\nexport const PaginationButton = ({ ref, ...rest }: PaginationButtonProps) => (\n <Button variant='text' icon ref={ref} {...rest} />\n);\n"],"mappings":";;;;AAWA,MAAa,mBAAmB,CAAC,EAAE,IAAK,GAAG,MAA6B,yBACrE;CAAO,SAAQ;CAAO;CAAU;CAAK,GAAI;EAAQ"}
1
+ {"version":3,"file":"pagination-button-CMSNwkeT.js","names":[],"sources":["../src/components/pagination/pagination-button.tsx"],"sourcesContent":["import { AriaAttributes } from 'react';\nimport { Button, type ButtonProps } from '../button';\n\nexport type PaginationButtonProps = ButtonProps & {\n /**\n * Toggle button as active\n * @default false\n */\n 'aria-current'?: AriaAttributes['aria-current'];\n};\n\nexport const PaginationButton = ({ ref, ...rest }: PaginationButtonProps) => (\n <Button variant='text' icon ref={ref} {...rest} />\n);\n"],"mappings":";;;;AAWA,MAAa,oBAAoB,EAAE,IAAK,GAAG,WACzC,oBAAC;CAAO,SAAQ;CAAO;CAAU;CAAK,GAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"pagination-item-DzskmZxf.js","names":[],"sources":["../src/components/pagination/pagination-item.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { HTMLAttributes, Ref } from 'react';\n\nexport type PaginationItemProps = HTMLAttributes<HTMLLIElement> & {\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<HTMLLIElement>;\n};\n\nexport const PaginationItem = ({ ref, asChild, children, ...rest }: PaginationItemProps) => {\n const Component = asChild ? Slot : 'li';\n return (\n <Component ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAYA,MAAa,iBAAiB,CAAC,EAAE,KAAK,SAAS,SAAU,GAAG,MAA2B,KAAK;CAC1F,MAAM,YAAY,UAAU,OAAO;AACnC,4BACG;EAAe;EAAK,GAAI;EACtB;GACS;AAEf"}
1
+ {"version":3,"file":"pagination-item-DzskmZxf.js","names":[],"sources":["../src/components/pagination/pagination-item.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { HTMLAttributes, Ref } from 'react';\n\nexport type PaginationItemProps = HTMLAttributes<HTMLLIElement> & {\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<HTMLLIElement>;\n};\n\nexport const PaginationItem = ({ ref, asChild, children, ...rest }: PaginationItemProps) => {\n const Component = asChild ? Slot : 'li';\n return (\n <Component ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAYA,MAAa,kBAAkB,EAAE,KAAK,SAAS,SAAU,GAAG,WAAgC;CAC1F,MAAM,YAAY,UAAU,OAAO;AACnC,QACE,oBAAC;EAAe;EAAK,GAAI;EACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"popover-DOMLkRA5.js","names":["cleanup: (() => void) | undefined","open: boolean"],"sources":["../src/vanilla/popover/index.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift, hide } from '@floating-ui/dom';\nimport type { Middleware, Placement } from '@floating-ui/dom';\n\nexport type InitPopoverOptions = {\n /** The id of the popover to initialize. The trigger element should have a `aria-controls` attribute with the same id. */\n id: string;\n /**\n * Placement of the popover relative to the trigger.\n * @default 'top'\n */\n placement?: Placement;\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 * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n /**\n * The padding used by the `offset` middleware.\n * @default '20'\n */\n padding?: number;\n};\n\n/**\n * Initializes the popover.\n * @param options - InitPopoverOptions\n * @returns A function to programmatically toggle the popover.\n */\nexport const initPopover = ({\n id,\n disableAutoPlacement = false,\n placement = 'top',\n positionMiddleware = [],\n padding = 20,\n}: InitPopoverOptions) => {\n let cleanup: (() => void) | undefined;\n const popover = document.getElementById(id);\n const triggerSelector = `[aria-controls=\"${id}\"]`;\n const trigger = document.querySelector(triggerSelector);\n\n if (!popover || !trigger) return;\n\n const togglePopover = (open: boolean) => {\n if (open) {\n cleanup = autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n middleware: [\n offset(padding),\n ...(disableAutoPlacement ? [] : [flip({ padding }), shift({ padding })]),\n ...positionMiddleware,\n hide({ padding }),\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 popover.setAttribute('aria-hidden', 'false');\n trigger.setAttribute('aria-expanded', 'true');\n } else {\n cleanup?.();\n popover.setAttribute('aria-hidden', 'true');\n trigger.setAttribute('aria-expanded', 'false');\n }\n };\n\n document.addEventListener(\n 'click',\n (event) => {\n const el = event.target as Element | null;\n const isTrigger = el?.closest?.(triggerSelector);\n const isOutside = !isTrigger && !popover.contains(el as Node);\n const isOpen = popover.getAttribute('aria-hidden') === 'false';\n\n if (isTrigger) {\n togglePopover(!isOpen);\n }\n if (isOutside && isOpen) {\n togglePopover(false);\n }\n },\n true,\n );\n\n return togglePopover;\n};\n"],"mappings":";;;;;;;;AAiDA,MAAa,cAAc,CAAC,EAC1B,IACA,uBAAuB,OACvB,YAAY,OACZ,qBAAqB,CAAE,GACvB,UAAU,IACS,KAAK;CACxB,IAAIA;CACJ,MAAM,UAAU,SAAS,eAAe,GAAG;CAC3C,MAAM,kBAAkB,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC;CACjD,MAAM,UAAU,SAAS,cAAc,gBAAgB;AAEvD,KAAI,CAAC,WAAW,CAAC,QAAS;CAE1B,MAAM,gBAAgB,CAACC,SAAkB;AACvC,MAAI,MAAM;GACR,UAAU,WAAW,SAAS,SAAS,MAAM;IAC3C,gBAAgB,SAAS,SAAS;KAChC,YAAY;MACV,OAAO,QAAQ;MACf,GAAI,uBAAuB,CAAE,IAAG,CAAC,KAAK,EAAE,QAAS,EAAC,EAAE,MAAM,EAAE,QAAS,EAAC,AAAC;MACvE,GAAG;MACH,KAAK,EAAE,QAAS,EAAC;KAClB;KACD,UAAU;KACV;IACD,EAAC,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,gBAAgB,KAAK;KACpC,QAAQ,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;KACzC,QAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;IAC9E,EAAC;GACH,EAAC;GACF,QAAQ,aAAa,eAAe,QAAQ;GAC5C,QAAQ,aAAa,iBAAiB,OAAO;EAC9C,OAAM;GACL,WAAW;GACX,QAAQ,aAAa,eAAe,OAAO;GAC3C,QAAQ,aAAa,iBAAiB,QAAQ;EAC/C;CACF;CAED,SAAS,iBACP,SACA,CAAC,UAAU;EACT,MAAM,KAAK,MAAM;EACjB,MAAM,YAAY,IAAI,UAAU,gBAAgB;EAChD,MAAM,YAAY,CAAC,aAAa,CAAC,QAAQ,SAAS,GAAW;EAC7D,MAAM,SAAS,QAAQ,aAAa,cAAc,KAAK;AAEvD,MAAI,WACF,cAAc,CAAC,OAAO;AAExB,MAAI,aAAa,QACf,cAAc,MAAM;CAEvB,GACD,KACD;AAED,QAAO;AACR"}
1
+ {"version":3,"file":"popover-DOMLkRA5.js","names":["cleanup: (() => void) | undefined"],"sources":["../src/vanilla/popover/index.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift, hide } from '@floating-ui/dom';\nimport type { Middleware, Placement } from '@floating-ui/dom';\n\nexport type InitPopoverOptions = {\n /** The id of the popover to initialize. The trigger element should have a `aria-controls` attribute with the same id. */\n id: string;\n /**\n * Placement of the popover relative to the trigger.\n * @default 'top'\n */\n placement?: Placement;\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 * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n /**\n * The padding used by the `offset` middleware.\n * @default '20'\n */\n padding?: number;\n};\n\n/**\n * Initializes the popover.\n * @param options - InitPopoverOptions\n * @returns A function to programmatically toggle the popover.\n */\nexport const initPopover = ({\n id,\n disableAutoPlacement = false,\n placement = 'top',\n positionMiddleware = [],\n padding = 20,\n}: InitPopoverOptions) => {\n let cleanup: (() => void) | undefined;\n const popover = document.getElementById(id);\n const triggerSelector = `[aria-controls=\"${id}\"]`;\n const trigger = document.querySelector(triggerSelector);\n\n if (!popover || !trigger) return;\n\n const togglePopover = (open: boolean) => {\n if (open) {\n cleanup = autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n middleware: [\n offset(padding),\n ...(disableAutoPlacement ? [] : [flip({ padding }), shift({ padding })]),\n ...positionMiddleware,\n hide({ padding }),\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 popover.setAttribute('aria-hidden', 'false');\n trigger.setAttribute('aria-expanded', 'true');\n } else {\n cleanup?.();\n popover.setAttribute('aria-hidden', 'true');\n trigger.setAttribute('aria-expanded', 'false');\n }\n };\n\n document.addEventListener(\n 'click',\n (event) => {\n const el = event.target as Element | null;\n const isTrigger = el?.closest?.(triggerSelector);\n const isOutside = !isTrigger && !popover.contains(el as Node);\n const isOpen = popover.getAttribute('aria-hidden') === 'false';\n\n if (isTrigger) {\n togglePopover(!isOpen);\n }\n if (isOutside && isOpen) {\n togglePopover(false);\n }\n },\n true,\n );\n\n return togglePopover;\n};\n"],"mappings":";;;;;;;;AAiDA,MAAa,eAAe,EAC1B,IACA,uBAAuB,OACvB,YAAY,OACZ,qBAAqB,IACrB,UAAU,SACc;CACxB,IAAIA;CACJ,MAAM,UAAU,SAAS,eAAe;CACxC,MAAM,kBAAkB,mBAAmB,GAAG;CAC9C,MAAM,UAAU,SAAS,cAAc;AAEvC,KAAI,CAAC,WAAW,CAAC,QAAS;CAE1B,MAAM,iBAAiB,SAAkB;AACvC,MAAI,MAAM;AACR,aAAU,WAAW,SAAS,eAAe;AAC3C,oBAAgB,SAAS,SAAS;KAChC,YAAY;MACV,OAAO;MACP,GAAI,uBAAuB,KAAK,CAAC,KAAK,EAAE,YAAY,MAAM,EAAE;MAC5D,GAAG;MACH,KAAK,EAAE;;KAET,UAAU;KACV;OACC,MAAM,EAAE,GAAG,GAAG,qBAAqB;AACpC,aAAQ,MAAM,YAAY,GAAG,EAAE,KAAK,EAAE;AACtC,aAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;;;AAGjF,WAAQ,aAAa,eAAe;AACpC,WAAQ,aAAa,iBAAiB;SACjC;AACL;AACA,WAAQ,aAAa,eAAe;AACpC,WAAQ,aAAa,iBAAiB;;;AAI1C,UAAS,iBACP,UACC,UAAU;EACT,MAAM,KAAK,MAAM;EACjB,MAAM,YAAY,IAAI,UAAU;EAChC,MAAM,YAAY,CAAC,aAAa,CAAC,QAAQ,SAAS;EAClD,MAAM,SAAS,QAAQ,aAAa,mBAAmB;AAEvD,MAAI,UACF,eAAc,CAAC;AAEjB,MAAI,aAAa,OACf,eAAc;IAGlB;AAGF,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"popover-DmA4qMtu.js","names":["event: MouseEvent","event: KeyboardEvent","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 } 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';\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 * 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 dark = 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 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 ],\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]);\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-dark={dark}\n ref={mergedRefs}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA+FA,MAAa,UAAU,CAAC,EACtB,IACA,WACA,cACA,MACA,YAAY,OACZ,uBAAuB,OACvB,qBAAqB,CAAE,GACvB,UAAU,IACV,OAAO,OACP,UAAU,OACV,IACA,GAAG,MACU,KAAK;CAClB,MAAM,YAAY,UAAU,OAAO;CAEnC,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,eAAe,OAAO,SAAS,OAAU;CAC/C,MAAM,aAAa,aAAa,CAAC,YAAY,GAAI,EAAC;CAClD,MAAM,EAAE,WAAW,cAAc,aAAa,gBAAgB,GAAG,IAAI,QAAQ;CAE7E,MAAM,CAAC,QAAQ,UAAU,GAAG,qBAAqB;EAC/C,MAAM,aAAa,UAAU,OAAO;EACpC,UAAU,CAAC,QAAQ;GACjB,eAAe,IAAI;GACnB,iBAAiB,IAAI;EACtB;EACD,aAAa;EACb,QAAQ;CACT,EAAC;CAEF,UAAU,MAAM;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,cAAc,CAACA,UAAsB;GACzC,MAAM,KAAK,MAAM;GACjB,MAAM,YAAY,IAAI,UAAU,CAAC,gBAAgB,EAAE,SAAS,GAAG,EAAE,CAAC,CAAC;GACnE,MAAM,YAAY,CAAC,aAAa,CAAC,SAAS,SAAS,GAAW;AAE9D,OAAI,WACF,UAAU,MAAM;EAEnB;EAED,MAAM,gBAAgB,CAACC,UAAyB;AAC9C,OAAI,MAAM,QAAQ,YAAY,CAAC,OAAQ;GACvC,MAAM,gBAAgB;GACtB,UAAU,MAAM;EACjB;EAED,SAAS,iBAAiB,SAAS,aAAa,KAAK;EACrD,SAAS,iBAAiB,WAAW,cAAc;AACnD,SAAO,MAAM;GACX,SAAS,oBAAoB,SAAS,aAAa,KAAK;GACxD,SAAS,oBAAoB,WAAW,cAAc;EACvD;CACF,GAAE,CAAC,QAAQ,SAAU,EAAC;CAEvB,UAAU,MAAM;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,UAAU,SAAS,cAAc,CAAC,gBAAgB,EAAE,SAAS,GAAG,EAAE,CAAC,CAAC;AAE1E,MAAI,WAAW,WAAW,OACxB,QAAO,WAAW,SAAS,SAAS,MAAM;GACxC,gBAAgB,SAAS,SAAS;IAChC,YAAY;KACV,OAAO,QAAQ;KACf,GAAI,uBAAuB,CAAE,IAAG,CAAC,KAAK,EAAE,QAAS,EAAC,EAAE,MAAM,EAAE,QAAS,EAAC,AAAC;KACvE,GAAG;KACH,KAAK;MAAE;MAAS,UAAU;KAAW,EAAC;IACvC;IACD,UAAU;IACV;GACD,EAAC,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,gBAAgB,KAAK;IACpC,QAAQ,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IACzC,QAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;GAC9E,EAAC;EACH,EAAC;CACL,GAAE;EAAC;EAAQ;EAAW;EAAI;EAAsB;EAAoB;CAAQ,EAAC;CAG9E,UAAU,MAAM;AACd,MAAI,IAAI,eAAe,GAAG;CAC3B,GAAE,CAAC,IAAI,YAAa,EAAC;AAEtB,4BACG;EACC,WAAWC,KAAG,cAAc,UAAU;EACtC,IAAI,MAAM;EACV,eAAa,CAAC;EACd,aAAW;EACX,KAAK;EACL,GAAI;GACJ;AAEL"}
1
+ {"version":3,"file":"popover-DmA4qMtu.js","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 } 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';\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 * 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 dark = 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 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 ],\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]);\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-dark={dark}\n ref={mergedRefs}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA+FA,MAAa,WAAW,EACtB,IACA,WACA,cACA,MACA,YAAY,OACZ,uBAAuB,OACvB,qBAAqB,IACrB,UAAU,IACV,OAAO,OACP,UAAU,OACV,IACA,GAAG,WACe;CAClB,MAAM,YAAY,UAAU,OAAO;CAEnC,MAAM,aAAa,OAAuB;CAC1C,MAAM,eAAe,OAAO,SAAS;CACrC,MAAM,aAAa,aAAa,CAAC,YAAY;CAC7C,MAAM,EAAE,WAAW,cAAc,aAAa,mBAAmB,IAAI;CAErE,MAAM,CAAC,QAAQ,aAAa,qBAAqB;EAC/C,MAAM,aAAa,UAAU,OAAO;EACpC,WAAW,QAAQ;AACjB,kBAAe;AACf,oBAAiB;;EAEnB,aAAa;EACb,QAAQ;;AAGV,iBAAgB;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,eAAe,UAAsB;GACzC,MAAM,KAAK,MAAM;GACjB,MAAM,YAAY,IAAI,UAAU,mBAAmB,SAAS,GAAG;GAC/D,MAAM,YAAY,CAAC,aAAa,CAAC,SAAS,SAAS;AAEnD,OAAI,UACF,WAAU;;EAId,MAAM,iBAAiB,UAAyB;AAC9C,OAAI,MAAM,QAAQ,YAAY,CAAC,OAAQ;AACvC,SAAM;AACN,aAAU;;AAGZ,WAAS,iBAAiB,SAAS,aAAa;AAChD,WAAS,iBAAiB,WAAW;AACrC,eAAa;AACX,YAAS,oBAAoB,SAAS,aAAa;AACnD,YAAS,oBAAoB,WAAW;;IAEzC,CAAC,QAAQ;AAEZ,iBAAgB;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,UAAU,SAAS,cAAc,mBAAmB,SAAS,GAAG;AAEtE,MAAI,WAAW,WAAW,OACxB,QAAO,WAAW,SAAS,eAAe;AACxC,mBAAgB,SAAS,SAAS;IAChC,YAAY;KACV,OAAO;KACP,GAAI,uBAAuB,KAAK,CAAC,KAAK,EAAE,YAAY,MAAM,EAAE;KAC5D,GAAG;KACH,KAAK;MAAE;MAAS,UAAU;;;IAE5B,UAAU;IACV;MACC,MAAM,EAAE,GAAG,GAAG,qBAAqB;AACpC,YAAQ,MAAM,YAAY,GAAG,EAAE,KAAK,EAAE;AACtC,YAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;;;IAGlF;EAAC;EAAQ;EAAW;EAAI;EAAsB;EAAoB;;AAGrE,iBAAgB;AACd,MAAI,GAAI,gBAAe;IACtB,CAAC,IAAI;AAER,QACE,oBAAC;EACC,WAAWA,KAAG,cAAc;EAC5B,IAAI,MAAM;EACV,eAAa,CAAC;EACd,aAAW;EACX,KAAK;EACL,GAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"popover-trigger-Chi8uvRM.js","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// eslint-disable-next-line @typescript-eslint/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,iBAAiB,CAAC,EAAE,IAAI,QAAQ,SAAS,IAAK,GAAG,MAA2B,KAAK;CAC5F,MAAM,EAAE,WAAW,aAAa,gBAAgB,GAAG,IAAI,QAAQ;CAC/D,MAAM,YAAY,UAAU,OAAO,SAAS,WAAW;CAEvD,MAAM,eAAe,OAAO,OAC1B;EACE,SAAS,MAAM,iBAAiB,CAAC,SAAS,CAAC,KAAK;EAChD,iBAAiB;EACjB,iBAAiB;EACjB,GAAI,SACA,EACE,gBAAgB,SACjB,IACD,CAAE;CACP,GACD,KACD;AAED,4BAAQ;EAAe;EAAK,GAAI;GAAgB;AACjD"}
1
+ {"version":3,"file":"popover-trigger-Chi8uvRM.js","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// eslint-disable-next-line @typescript-eslint/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,IAAK,GAAG,WAAgC;CAC5F,MAAM,EAAE,WAAW,aAAa,mBAAmB,IAAI;CACvD,MAAM,YAAY,UAAU,OAAO,SAAS,WAAW;CAEvD,MAAM,eAAe,OAAO,OAC1B;EACE,eAAe,kBAAkB,SAAS,CAAC;EAC3C,iBAAiB;EACjB,iBAAiB;EACjB,GAAI,SACA,EACE,gBAAgB,aAElB;IAEN;AAGF,QAAO,oBAAC;EAAe;EAAK,GAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"popover-trigger-context-Cre9Mczn.js","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,CAAE,EAAC;;;;;;;;;;;;AA2BN,MAAa,wBAAwB,CAAC,EAAE,UAAU,MAAM,cAA0C,KAAK;CACrG,MAAM,kBAAkB,OAAO;CAC/B,MAAM,CAAC,WAAW,aAAa,GAAG,SAAS,gBAAgB;CAC3D,MAAM,CAAC,aAAa,eAAe,GAAG,qBAAqB;EACzD,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;CACT,EAAC;AAEF,4BAAQ;EAAQ,OAAO;GAAE;GAAW;GAAc;GAAa;EAAgB;EAAG;GAAmB;AACtG"}
1
+ {"version":3,"file":"popover-trigger-context-Cre9Mczn.js","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;;;;;;;;;;;;AA2BH,MAAa,yBAAyB,EAAE,UAAU,MAAM,mBAA+C;CACrG,MAAM,kBAAkB;CACxB,MAAM,CAAC,WAAW,gBAAgB,SAAS;CAC3C,MAAM,CAAC,aAAa,kBAAkB,qBAAqB;EACzD,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;;AAGV,QAAO,oBAAC;EAAQ,OAAO;GAAE;GAAW;GAAc;GAAa;;EAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"radio-DAC5mhl3.js","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 dark,\n label,\n description,\n error,\n fullwidth,\n style,\n className,\n ref,\n id,\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 className={className} data-dark={dark} style={style} fullwidth={fullwidth} asChild>\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n dark={dark}\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,QAAQ,CAAC,EACpB,MACA,OACA,aACA,OACA,WACA,OACA,WACA,KACA,IACA,oBAAoB,oBACpB,GAAG,OACQ,KAAK;CAChB,MAAM,gBAAgB,OAAO;CAE7B,MAAM,kBAAkB,CAAC,cAAc,gBAAgB,IAAI,mBAAoB,EAAC,KAAK,IAAI,CAAC,MAAM,IAAI;AAEpG,4BACG;EAAiB;EAAW,aAAW;EAAa;EAAkB;EAAW;iCAC/E;uBACE;IACC,MAAK;IACD;IACC;IACL,gBAAc,SAAS;IACvB,oBAAkB;IACZ;IACN,GAAI;KACJ;GACD,6BACE;IAAM,QAAO;IAAS,SAAS;IAAI;kCACjC,oBAAM,QAAa;KACd;GAET,mCAGE;IAAiB,eAAY;IAAO,IAAI;cACtC;KACgB;MAEf;GACF;AAEX"}
1
+ {"version":3,"file":"radio-DAC5mhl3.js","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 dark,\n label,\n description,\n error,\n fullwidth,\n style,\n className,\n ref,\n id,\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 className={className} data-dark={dark} style={style} fullwidth={fullwidth} asChild>\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n dark={dark}\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,MACA,OACA,aACA,OACA,WACA,OACA,WACA,KACA,IACA,oBAAoB,oBACpB,GAAG,YACa;CAChB,MAAM,gBAAgB;CAEtB,MAAM,kBAAkB,CAAC,cAAc,gBAAgB,IAAI,qBAAqB,KAAK,KAAK,UAAU;AAEpG,QACE,oBAAC;EAAiB;EAAW,aAAW;EAAa;EAAkB;EAAW;YAChF,qBAAC;GACC,oBAAC;IACC,MAAK;IACD;IACC;IACL,gBAAc,SAAS;IACvB,oBAAkB;IACZ;IACN,GAAI;;GAEL,SACC,oBAAC;IAAM,QAAO;IAAS,SAAS;IAAI;cAClC,oBAAC,oBAAM;;GAGV,eAGC,oBAAC;IAAiB,eAAY;IAAO,IAAI;cACtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"search-DzjgrvFl.js","names":["e: React.FormEvent<HTMLFormElement>"],"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, MagnefyingGlassIcon } 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 * @defaultValue '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 dark,\n style,\n fullwidth,\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 className={clsx('bi-search', className)} data-dark={dark} style={style} fullwidth={fullwidth} asChild>\n <form onSubmit={handleSubmit} onReset={handleReset}>\n <FieldAffixes>\n <FieldAffix>\n <MagnefyingGlassIcon size={size} />\n </FieldAffix>\n <Input type='text' ref={ref} size={size} dark={dark} {...props} />\n <FieldAffix aria-hidden='false'>\n <Button aria-label={clearAriaLabel} icon size={size} dark={dark} 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,SAAS,CAAC,EACrB,WACA,UACA,SACA,iBAAiB,SACjB,OAAO,UACP,KACA,MACA,OACA,UACA,GAAG,OACS,KAAK;CACjB,MAAM,eAAe,CAACA,MAAwC;EAC5D,EAAE,gBAAgB;AAClB,MAAI,UAAU;GACZ,MAAM,QAAQ,EAAE,cAAc,cAAc,QAAQ;GACpD,SAAS,OAAO,SAAS,GAAG;EAC7B;CACF;CACD,MAAM,cAAc,MAAM;AACxB,MAAI,SACF,QAAQ,GAAG;CAEd;AACD,4BACG;EAAM,WAAW,KAAK,aAAa,UAAU;EAAE,aAAW;EAAa;EAAkB;EAAW;gCAClG;GAAK,UAAU;GAAc,SAAS;kCACpC;wBACE,4CACE,uBAA0B,OAAQ,GACxB;wBACZ;KAAM,MAAK;KAAY;KAAW;KAAY;KAAM,GAAI;MAAS;wBACjE;KAAW,eAAY;mCACrB;MAAO,cAAY;MAAgB;MAAW;MAAY;MAAM,SAAQ;MAAO,MAAK;oCAClF;OAAqB;OAAM,eAAY;QAAS;OAC1C;MACE;OACA;IACV;GACD;AAEX"}
1
+ {"version":3,"file":"search-DzjgrvFl.js","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, MagnefyingGlassIcon } 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 * @defaultValue '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 dark,\n style,\n fullwidth,\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 className={clsx('bi-search', className)} data-dark={dark} style={style} fullwidth={fullwidth} asChild>\n <form onSubmit={handleSubmit} onReset={handleReset}>\n <FieldAffixes>\n <FieldAffix>\n <MagnefyingGlassIcon size={size} />\n </FieldAffix>\n <Input type='text' ref={ref} size={size} dark={dark} {...props} />\n <FieldAffix aria-hidden='false'>\n <Button aria-label={clearAriaLabel} icon size={size} dark={dark} 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,MACA,OACA,UACA,GAAG,YACc;CACjB,MAAM,gBAAgB,MAAwC;AAC5D,IAAE;AACF,MAAI,UAAU;GACZ,MAAM,QAAQ,EAAE,cAAc,cAAc;AAC5C,YAAS,OAAO,SAAS;;;CAG7B,MAAM,oBAAoB;AACxB,MAAI,QACF,SAAQ;;AAGZ,QACE,oBAAC;EAAM,WAAW,KAAK,aAAa;EAAY,aAAW;EAAa;EAAkB;EAAW;YACnG,oBAAC;GAAK,UAAU;GAAc,SAAS;aACrC,qBAAC;IACC,oBAAC,wBACC,oBAAC,uBAA0B;IAE7B,oBAAC;KAAM,MAAK;KAAY;KAAW;KAAY;KAAM,GAAI;;IACzD,oBAAC;KAAW,eAAY;eACtB,oBAAC;MAAO,cAAY;MAAgB;MAAW;MAAY;MAAM,SAAQ;MAAO,MAAK;gBACnF,oBAAC;OAAqB;OAAM,eAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"select-R87VdG5U.js","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, dark, onKeyDown, onMouseDown, size, ref, ...props }: SelectProps) => {\n return (\n <select\n className={clsx('bi-input', className)}\n data-dark={dark}\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,SAAS,CAAC,EAAE,WAAW,MAAM,WAAW,aAAa,MAAM,IAAK,GAAG,OAAoB,KAAK;AACvG,4BACG;EACC,WAAW,KAAK,YAAY,UAAU;EACtC,aAAW;EACX,aAAW;EACN;EACL,WAAW,CAAC,UAAU;AACpB,OAAI,MAAM,QAAQ,MAAO;AACzB,OAAI,MAAM,UAAU,MAAM,gBAAgB;GAC1C,YAAY,MAAM;EACnB;EACD,aAAa,CAAC,UAAU;AACtB,OAAI,MAAM,UAAU,MAAM,gBAAgB;GAC1C,cAAc,MAAM;EACrB;EACD,GAAI;GACJ;AAEL"}
1
+ {"version":3,"file":"select-R87VdG5U.js","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, dark, onKeyDown, onMouseDown, size, ref, ...props }: SelectProps) => {\n return (\n <select\n className={clsx('bi-input', className)}\n data-dark={dark}\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,MAAM,WAAW,aAAa,MAAM,IAAK,GAAG,YAAyB;AACvG,QACE,oBAAC;EACC,WAAW,KAAK,YAAY;EAC5B,aAAW;EACX,aAAW;EACN;EACL,YAAY,UAAU;AACpB,OAAI,MAAM,QAAQ,MAAO;AACzB,OAAI,MAAM,SAAU,OAAM;AAC1B,eAAY;;EAEd,cAAc,UAAU;AACtB,OAAI,MAAM,SAAU,OAAM;AAC1B,iBAAc;;EAEhB,GAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"select-optgroup-jowSQvbc.js","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,iBAAiB,CAAC,EAAE,SAAS,IAAK,GAAG,OAA4B,KAAK;CACjF,MAAM,YAAY,UAAU,OAAO;AACnC,4BAAQ;EAAU,GAAI;EAAY;GAAO;AAC1C"}
1
+ {"version":3,"file":"select-optgroup-jowSQvbc.js","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,IAAK,GAAG,YAAiC;CACjF,MAAM,YAAY,UAAU,OAAO;AACnC,QAAO,oBAAC;EAAU,GAAI;EAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"select-option-WAhhr82L.js","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,eAAe,CAAC,EAAE,SAAS,IAAK,GAAG,OAA0B,KAAK;CAC7E,MAAM,YAAY,UAAU,OAAO;AACnC,4BAAQ;EAAU,GAAI;EAAY;GAAO;AAC1C"}
1
+ {"version":3,"file":"select-option-WAhhr82L.js","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,IAAK,GAAG,YAA+B;CAC7E,MAAM,YAAY,UAAU,OAAO;AACnC,QAAO,oBAAC;EAAU,GAAI;EAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"selectfield-BD-t6Mmm.js","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 dark,\n label,\n description,\n error,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\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-dark={dark} 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 dark={dark}\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,cAAc,CAAC,EAC1B,UACA,MACA,OACA,aACA,OACA,OACA,WACA,WACA,KACA,IAAI,QACJ,oBAAoB,oBACpB,GAAG,OACc,KAAK;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;CAAoB,EAAC,KAAK,IAAI,CAAC,MAAM,IAAI;AACzG,6BACG;EAAiB;EAAW,aAAW;EAAa;EAAkB;;GACpE,6BAAU;IAAM,SAAS;cAAK;KAAc;GAC5C,mCAAgB;IAAiB,IAAI;cAAgB;KAA+B;uBACpF;IACK;IACC;IACC;IACN,gBAAc,QAAQ,MAAM,IAAI;IAChC,oBAAkB;IAClB,GAAI;IAEH;KACM;GACR,CAAC,CAAC,6BAAU;IAAkB,IAAI;cAAe;KAA0B;;GACtE;AAEX"}
1
+ {"version":3,"file":"selectfield-BD-t6Mmm.js","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 dark,\n label,\n description,\n error,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\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-dark={dark} 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 dark={dark}\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,MACA,OACA,aACA,OACA,OACA,WACA,WACA,KACA,IAAI,QACJ,oBAAoB,oBACpB,GAAG,YACmB;CACtB,MAAM,cAAc;CACpB,MAAM,gBAAgB;CACtB,MAAM,eAAe;CACrB,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;GAAqB,KAAK,KAAK,UAAU;AACzG,QACE,qBAAC;EAAiB;EAAW,aAAW;EAAa;EAAkB;;GACpE,SAAS,oBAAC;IAAM,SAAS;cAAK;;GAC9B,eAAe,oBAAC;IAAiB,IAAI;cAAgB;;GACtD,oBAAC;IACK;IACC;IACC;IACN,gBAAc,QAAQ,UAAU;IAChC,oBAAkB;IAClB,GAAI;IAEH;;GAEF,CAAC,CAAC,SAAS,oBAAC;IAAkB,IAAI;cAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"skip-link-CbdX4Taw.js","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, dark, ...props }: SkipLinkProps) => {\n const Component = asChild ? Slot : 'a';\n return (\n <Component className={clsx('bi-skip-link', className)} data-dark={dark} {...props}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;AAaA,MAAa,WAAW,CAAC,EAAE,SAAS,UAAU,WAAW,KAAM,GAAG,OAAsB,KAAK;CAC3F,MAAM,YAAY,UAAU,OAAO;AACnC,4BACG;EAAU,WAAW,KAAK,gBAAgB,UAAU;EAAE,aAAW;EAAM,GAAI;EACzE;GACS;AAEf"}
1
+ {"version":3,"file":"skip-link-CbdX4Taw.js","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, dark, ...props }: SkipLinkProps) => {\n const Component = asChild ? Slot : 'a';\n return (\n <Component className={clsx('bi-skip-link', className)} data-dark={dark} {...props}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;AAaA,MAAa,YAAY,EAAE,SAAS,UAAU,WAAW,KAAM,GAAG,YAA2B;CAC3F,MAAM,YAAY,UAAU,OAAO;AACnC,QACE,oBAAC;EAAU,WAAW,KAAK,gBAAgB;EAAY,aAAW;EAAM,GAAI;EACzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"spinner-Ch5bEQBR.js","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 color of the spinner.\n * @default 'inherit'\n */\n color?: 'inherit' | 'black';\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 = ({ color = 'inherit', size, className, ref, ...props }: SpinnerProps) => {\n return <span className={clsx('bi-spinner', className)} data-size={size} data-color={color} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAsBA,MAAa,UAAU,CAAC,EAAE,QAAQ,WAAW,MAAM,WAAW,IAAK,GAAG,OAAqB,KAAK;AAC9F,4BAAQ;EAAK,WAAW,KAAK,cAAc,UAAU;EAAE,aAAW;EAAM,cAAY;EAAY;EAAK,GAAI;GAAS;AACnH"}
1
+ {"version":3,"file":"spinner-Ch5bEQBR.js","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 color of the spinner.\n * @default 'inherit'\n */\n color?: 'inherit' | 'black';\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 = ({ color = 'inherit', size, className, ref, ...props }: SpinnerProps) => {\n return <span className={clsx('bi-spinner', className)} data-size={size} data-color={color} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAsBA,MAAa,WAAW,EAAE,QAAQ,WAAW,MAAM,WAAW,IAAK,GAAG,YAA0B;AAC9F,QAAO,oBAAC;EAAK,WAAW,KAAK,cAAc;EAAY,aAAW;EAAM,cAAY;EAAY;EAAK,GAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"sticky-header-gE5HX2ug.js","names":[],"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,eAAe,CAAC,EAAE,UAA6B,KAAK;CAC/D,MAAM,YAAY;AAClB,4BAAQ;EAAU,WAAU;EAAoB;GAAqB;AACtE"}
1
+ {"version":3,"file":"sticky-header-gE5HX2ug.js","names":[],"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;CAC/D,MAAM,YAAY;AAClB,QAAO,oBAAC;EAAU,WAAU;EAAoB"}
@@ -1 +1 @@
1
- {"version":3,"file":"sub-navbar-BdJ9EKsU.js","names":["callback: (direction: 'up' | 'down' | null) => void","element: HTMLElement","callback: (isAbove: boolean) => void","cleanupFunctions: (() => void)[]"],"sources":["../src/vanilla/sub-navbar/index.ts"],"sourcesContent":["/**\n * Detects the vertical scroll direction of the page.\n * Returns 'up' | 'down' | null. The direction is only updated if the scroll distance\n * exceeds a 5px threshold to prevent sensitivity to minor scroll jitter.\n */\nclass ScrollDirectionTracker {\n private scrollDirection: 'up' | 'down' | null = null;\n private lastScrollY = window.pageYOffset;\n private callbacks = new Set<(direction: 'up' | 'down' | null) => void>();\n\n constructor() {\n this.updateScrollDirection = this.updateScrollDirection.bind(this);\n window.addEventListener('scroll', this.updateScrollDirection);\n }\n\n private updateScrollDirection() {\n const scrollY = window.pageYOffset;\n const direction = scrollY > this.lastScrollY ? 'down' : 'up';\n\n if (direction !== this.scrollDirection && (scrollY - this.lastScrollY > 5 || scrollY - this.lastScrollY < -5)) {\n this.scrollDirection = direction;\n this.callbacks.forEach((callback) => callback(this.scrollDirection));\n }\n\n this.lastScrollY = scrollY > 0 ? scrollY : 0;\n }\n\n subscribe(callback: (direction: 'up' | 'down' | null) => void) {\n this.callbacks.add(callback);\n return () => this.callbacks.delete(callback);\n }\n\n destroy() {\n window.removeEventListener('scroll', this.updateScrollDirection);\n this.callbacks.clear();\n }\n\n getCurrentDirection() {\n return this.scrollDirection;\n }\n}\n\n/**\n * Detects when an element is scrolled past and is no longer in the viewport.\n */\nclass ElementAboveViewportTracker {\n private isAboveViewport = false;\n private observer: IntersectionObserver;\n private callbacks = new Set<(isAbove: boolean) => void>();\n\n constructor(private element: HTMLElement) {\n this.observer = new IntersectionObserver(\n ([entry]) => {\n const newIsAbove = entry.boundingClientRect.y < 0;\n if (newIsAbove !== this.isAboveViewport) {\n this.isAboveViewport = newIsAbove;\n this.callbacks.forEach((callback) => callback(this.isAboveViewport));\n }\n },\n { threshold: [0] },\n );\n\n this.observer.observe(this.element);\n }\n\n subscribe(callback: (isAbove: boolean) => void) {\n this.callbacks.add(callback);\n return () => this.callbacks.delete(callback);\n }\n\n destroy() {\n this.observer.disconnect();\n this.callbacks.clear();\n }\n\n getIsAboveViewport() {\n return this.isAboveViewport;\n }\n}\n\nexport type InitSubNavbarOptions = {\n /**\n * Custom selector to find sub-navbars.\n * @default '.bi-sub-navbar'\n */\n selector?: string;\n};\n\n/**\n * Initializes all sub-navbars on the page to handle scroll-based behavior.\n * This includes:\n * - Setting data-fixed attribute when the navbar is scrolled past\n * - Setting data-scroll-dir attribute based on scroll direction when fixed\n *\n * @param options Configuration options\n * @returns Cleanup function to remove all event listeners and observers\n */\nexport const initSubNavbar = ({ selector = '.bi-sub-navbar' }: InitSubNavbarOptions = {}) => {\n const subNavbars = document.querySelectorAll<HTMLElement>(selector);\n\n if (subNavbars.length === 0) {\n console.warn(`No elements found with selector: ${selector}`);\n return () => {};\n }\n\n const scrollTracker = new ScrollDirectionTracker();\n const cleanupFunctions: (() => void)[] = [];\n\n subNavbars.forEach((navbar) => {\n const wrapper = navbar.closest('.bi-sub-navbar--wrapper') as HTMLElement;\n if (!wrapper) {\n console.warn('Sub-navbar must be wrapped in an element with class \"bi-sub-navbar--wrapper\"');\n return;\n }\n\n // Find or create the reference element (empty div) that acts as the scroll trigger\n let referenceElement = wrapper.querySelector<HTMLElement>('div:first-child');\n if (!referenceElement || referenceElement === navbar) {\n referenceElement = document.createElement('div');\n wrapper.insertBefore(referenceElement, navbar);\n }\n\n const viewportTracker = new ElementAboveViewportTracker(referenceElement);\n\n // Subscribe to viewport changes\n const unsubscribeViewport = viewportTracker.subscribe((isAbove) => {\n navbar.setAttribute('data-fixed', String(isAbove));\n\n // Only set scroll direction when fixed\n if (isAbove) {\n const currentDirection = scrollTracker.getCurrentDirection();\n if (currentDirection) {\n navbar.setAttribute('data-scroll-dir', currentDirection);\n }\n } else {\n navbar.removeAttribute('data-scroll-dir');\n }\n });\n\n // Subscribe to scroll direction changes\n const unsubscribeScroll = scrollTracker.subscribe((direction) => {\n const isFixed = navbar.getAttribute('data-fixed') === 'true';\n if (isFixed && direction) {\n navbar.setAttribute('data-scroll-dir', direction);\n }\n });\n\n cleanupFunctions.push(() => {\n unsubscribeViewport();\n unsubscribeScroll();\n viewportTracker.destroy();\n });\n });\n\n // Return cleanup function\n return () => {\n cleanupFunctions.forEach((cleanup) => cleanup());\n scrollTracker.destroy();\n };\n};\n"],"mappings":";;;;;;AAKA,IAAM,yBAAN,MAA6B;CAC3B,AAAQ,kBAAwC;CAChD,AAAQ,cAAc,OAAO;CAC7B,AAAQ,4BAAY,IAAI;CAExB,cAAc;EACZ,KAAK,wBAAwB,KAAK,sBAAsB,KAAK,KAAK;EAClE,OAAO,iBAAiB,UAAU,KAAK,sBAAsB;CAC9D;CAED,AAAQ,wBAAwB;EAC9B,MAAM,UAAU,OAAO;EACvB,MAAM,YAAY,UAAU,KAAK,cAAc,SAAS;AAExD,MAAI,cAAc,KAAK,oBAAoB,UAAU,KAAK,cAAc,KAAK,UAAU,KAAK,cAAc,KAAK;GAC7G,KAAK,kBAAkB;GACvB,KAAK,UAAU,QAAQ,CAAC,aAAa,SAAS,KAAK,gBAAgB,CAAC;EACrE;EAED,KAAK,cAAc,UAAU,IAAI,UAAU;CAC5C;CAED,UAAUA,UAAqD;EAC7D,KAAK,UAAU,IAAI,SAAS;AAC5B,SAAO,MAAM,KAAK,UAAU,OAAO,SAAS;CAC7C;CAED,UAAU;EACR,OAAO,oBAAoB,UAAU,KAAK,sBAAsB;EAChE,KAAK,UAAU,OAAO;CACvB;CAED,sBAAsB;AACpB,SAAO,KAAK;CACb;AACF;;;;AAKD,IAAM,8BAAN,MAAkC;CAChC,AAAQ,kBAAkB;CAC1B,AAAQ;CACR,AAAQ,4BAAY,IAAI;CAExB,YAAoBC,SAAsB;EAAtB;EAClB,KAAK,WAAW,IAAI,qBAClB,CAAC,CAAC,MAAM,KAAK;GACX,MAAM,aAAa,MAAM,mBAAmB,IAAI;AAChD,OAAI,eAAe,KAAK,iBAAiB;IACvC,KAAK,kBAAkB;IACvB,KAAK,UAAU,QAAQ,CAAC,aAAa,SAAS,KAAK,gBAAgB,CAAC;GACrE;EACF,GACD,EAAE,WAAW,CAAC,CAAE,EAAE;EAGpB,KAAK,SAAS,QAAQ,KAAK,QAAQ;CACpC;CAED,UAAUC,UAAsC;EAC9C,KAAK,UAAU,IAAI,SAAS;AAC5B,SAAO,MAAM,KAAK,UAAU,OAAO,SAAS;CAC7C;CAED,UAAU;EACR,KAAK,SAAS,YAAY;EAC1B,KAAK,UAAU,OAAO;CACvB;CAED,qBAAqB;AACnB,SAAO,KAAK;CACb;AACF;;;;;;;;;;AAmBD,MAAa,gBAAgB,CAAC,EAAE,WAAW,kBAAwC,GAAG,CAAE,MAAK;CAC3F,MAAM,aAAa,SAAS,iBAA8B,SAAS;AAEnE,KAAI,WAAW,WAAW,GAAG;EAC3B,QAAQ,KAAK,CAAC,iCAAiC,EAAE,UAAU,CAAC;AAC5D,SAAO,MAAM,CAAE;CAChB;CAED,MAAM,gBAAgB,IAAI;CAC1B,MAAMC,mBAAmC,CAAE;CAE3C,WAAW,QAAQ,CAAC,WAAW;EAC7B,MAAM,UAAU,OAAO,QAAQ,0BAA0B;AACzD,MAAI,CAAC,SAAS;GACZ,QAAQ,KAAK,iFAA+E;AAC5F;EACD;EAGD,IAAI,mBAAmB,QAAQ,cAA2B,kBAAkB;AAC5E,MAAI,CAAC,oBAAoB,qBAAqB,QAAQ;GACpD,mBAAmB,SAAS,cAAc,MAAM;GAChD,QAAQ,aAAa,kBAAkB,OAAO;EAC/C;EAED,MAAM,kBAAkB,IAAI,4BAA4B;EAGxD,MAAM,sBAAsB,gBAAgB,UAAU,CAAC,YAAY;GACjE,OAAO,aAAa,cAAc,OAAO,QAAQ,CAAC;AAGlD,OAAI,SAAS;IACX,MAAM,mBAAmB,cAAc,qBAAqB;AAC5D,QAAI,kBACF,OAAO,aAAa,mBAAmB,iBAAiB;GAE3D,OACC,OAAO,gBAAgB,kBAAkB;EAE5C,EAAC;EAGF,MAAM,oBAAoB,cAAc,UAAU,CAAC,cAAc;GAC/D,MAAM,UAAU,OAAO,aAAa,aAAa,KAAK;AACtD,OAAI,WAAW,WACb,OAAO,aAAa,mBAAmB,UAAU;EAEpD,EAAC;EAEF,iBAAiB,KAAK,MAAM;GAC1B,qBAAqB;GACrB,mBAAmB;GACnB,gBAAgB,SAAS;EAC1B,EAAC;CACH,EAAC;AAGF,QAAO,MAAM;EACX,iBAAiB,QAAQ,CAAC,YAAY,SAAS,CAAC;EAChD,cAAc,SAAS;CACxB;AACF"}
1
+ {"version":3,"file":"sub-navbar-BdJ9EKsU.js","names":["element: HTMLElement","cleanupFunctions: (() => void)[]"],"sources":["../src/vanilla/sub-navbar/index.ts"],"sourcesContent":["/**\n * Detects the vertical scroll direction of the page.\n * Returns 'up' | 'down' | null. The direction is only updated if the scroll distance\n * exceeds a 5px threshold to prevent sensitivity to minor scroll jitter.\n */\nclass ScrollDirectionTracker {\n private scrollDirection: 'up' | 'down' | null = null;\n private lastScrollY = window.pageYOffset;\n private callbacks = new Set<(direction: 'up' | 'down' | null) => void>();\n\n constructor() {\n this.updateScrollDirection = this.updateScrollDirection.bind(this);\n window.addEventListener('scroll', this.updateScrollDirection);\n }\n\n private updateScrollDirection() {\n const scrollY = window.pageYOffset;\n const direction = scrollY > this.lastScrollY ? 'down' : 'up';\n\n if (direction !== this.scrollDirection && (scrollY - this.lastScrollY > 5 || scrollY - this.lastScrollY < -5)) {\n this.scrollDirection = direction;\n this.callbacks.forEach((callback) => callback(this.scrollDirection));\n }\n\n this.lastScrollY = scrollY > 0 ? scrollY : 0;\n }\n\n subscribe(callback: (direction: 'up' | 'down' | null) => void) {\n this.callbacks.add(callback);\n return () => this.callbacks.delete(callback);\n }\n\n destroy() {\n window.removeEventListener('scroll', this.updateScrollDirection);\n this.callbacks.clear();\n }\n\n getCurrentDirection() {\n return this.scrollDirection;\n }\n}\n\n/**\n * Detects when an element is scrolled past and is no longer in the viewport.\n */\nclass ElementAboveViewportTracker {\n private isAboveViewport = false;\n private observer: IntersectionObserver;\n private callbacks = new Set<(isAbove: boolean) => void>();\n\n constructor(private element: HTMLElement) {\n this.observer = new IntersectionObserver(\n ([entry]) => {\n const newIsAbove = entry.boundingClientRect.y < 0;\n if (newIsAbove !== this.isAboveViewport) {\n this.isAboveViewport = newIsAbove;\n this.callbacks.forEach((callback) => callback(this.isAboveViewport));\n }\n },\n { threshold: [0] },\n );\n\n this.observer.observe(this.element);\n }\n\n subscribe(callback: (isAbove: boolean) => void) {\n this.callbacks.add(callback);\n return () => this.callbacks.delete(callback);\n }\n\n destroy() {\n this.observer.disconnect();\n this.callbacks.clear();\n }\n\n getIsAboveViewport() {\n return this.isAboveViewport;\n }\n}\n\nexport type InitSubNavbarOptions = {\n /**\n * Custom selector to find sub-navbars.\n * @default '.bi-sub-navbar'\n */\n selector?: string;\n};\n\n/**\n * Initializes all sub-navbars on the page to handle scroll-based behavior.\n * This includes:\n * - Setting data-fixed attribute when the navbar is scrolled past\n * - Setting data-scroll-dir attribute based on scroll direction when fixed\n *\n * @param options Configuration options\n * @returns Cleanup function to remove all event listeners and observers\n */\nexport const initSubNavbar = ({ selector = '.bi-sub-navbar' }: InitSubNavbarOptions = {}) => {\n const subNavbars = document.querySelectorAll<HTMLElement>(selector);\n\n if (subNavbars.length === 0) {\n console.warn(`No elements found with selector: ${selector}`);\n return () => {};\n }\n\n const scrollTracker = new ScrollDirectionTracker();\n const cleanupFunctions: (() => void)[] = [];\n\n subNavbars.forEach((navbar) => {\n const wrapper = navbar.closest('.bi-sub-navbar--wrapper') as HTMLElement;\n if (!wrapper) {\n console.warn('Sub-navbar must be wrapped in an element with class \"bi-sub-navbar--wrapper\"');\n return;\n }\n\n // Find or create the reference element (empty div) that acts as the scroll trigger\n let referenceElement = wrapper.querySelector<HTMLElement>('div:first-child');\n if (!referenceElement || referenceElement === navbar) {\n referenceElement = document.createElement('div');\n wrapper.insertBefore(referenceElement, navbar);\n }\n\n const viewportTracker = new ElementAboveViewportTracker(referenceElement);\n\n // Subscribe to viewport changes\n const unsubscribeViewport = viewportTracker.subscribe((isAbove) => {\n navbar.setAttribute('data-fixed', String(isAbove));\n\n // Only set scroll direction when fixed\n if (isAbove) {\n const currentDirection = scrollTracker.getCurrentDirection();\n if (currentDirection) {\n navbar.setAttribute('data-scroll-dir', currentDirection);\n }\n } else {\n navbar.removeAttribute('data-scroll-dir');\n }\n });\n\n // Subscribe to scroll direction changes\n const unsubscribeScroll = scrollTracker.subscribe((direction) => {\n const isFixed = navbar.getAttribute('data-fixed') === 'true';\n if (isFixed && direction) {\n navbar.setAttribute('data-scroll-dir', direction);\n }\n });\n\n cleanupFunctions.push(() => {\n unsubscribeViewport();\n unsubscribeScroll();\n viewportTracker.destroy();\n });\n });\n\n // Return cleanup function\n return () => {\n cleanupFunctions.forEach((cleanup) => cleanup());\n scrollTracker.destroy();\n };\n};\n"],"mappings":";;;;;;AAKA,IAAM,yBAAN,MAA6B;CAC3B,AAAQ,kBAAwC;CAChD,AAAQ,cAAc,OAAO;CAC7B,AAAQ,4BAAY,IAAI;CAExB,cAAc;AACZ,OAAK,wBAAwB,KAAK,sBAAsB,KAAK;AAC7D,SAAO,iBAAiB,UAAU,KAAK;;CAGzC,AAAQ,wBAAwB;EAC9B,MAAM,UAAU,OAAO;EACvB,MAAM,YAAY,UAAU,KAAK,cAAc,SAAS;AAExD,MAAI,cAAc,KAAK,oBAAoB,UAAU,KAAK,cAAc,KAAK,UAAU,KAAK,cAAc,KAAK;AAC7G,QAAK,kBAAkB;AACvB,QAAK,UAAU,SAAS,aAAa,SAAS,KAAK;;AAGrD,OAAK,cAAc,UAAU,IAAI,UAAU;;CAG7C,UAAU,UAAqD;AAC7D,OAAK,UAAU,IAAI;AACnB,eAAa,KAAK,UAAU,OAAO;;CAGrC,UAAU;AACR,SAAO,oBAAoB,UAAU,KAAK;AAC1C,OAAK,UAAU;;CAGjB,sBAAsB;AACpB,SAAO,KAAK;;;;;;AAOhB,IAAM,8BAAN,MAAkC;CAChC,AAAQ,kBAAkB;CAC1B,AAAQ;CACR,AAAQ,4BAAY,IAAI;CAExB,YAAY,AAAQA,SAAsB;EAAtB;AAClB,OAAK,WAAW,IAAI,sBACjB,CAAC,WAAW;GACX,MAAM,aAAa,MAAM,mBAAmB,IAAI;AAChD,OAAI,eAAe,KAAK,iBAAiB;AACvC,SAAK,kBAAkB;AACvB,SAAK,UAAU,SAAS,aAAa,SAAS,KAAK;;KAGvD,EAAE,WAAW,CAAC;AAGhB,OAAK,SAAS,QAAQ,KAAK;;CAG7B,UAAU,UAAsC;AAC9C,OAAK,UAAU,IAAI;AACnB,eAAa,KAAK,UAAU,OAAO;;CAGrC,UAAU;AACR,OAAK,SAAS;AACd,OAAK,UAAU;;CAGjB,qBAAqB;AACnB,SAAO,KAAK;;;;;;;;;;;;AAqBhB,MAAa,iBAAiB,EAAE,WAAW,qBAA2C,OAAO;CAC3F,MAAM,aAAa,SAAS,iBAA8B;AAE1D,KAAI,WAAW,WAAW,GAAG;AAC3B,UAAQ,KAAK,oCAAoC;AACjD,eAAa;;CAGf,MAAM,gBAAgB,IAAI;CAC1B,MAAMC,mBAAmC;AAEzC,YAAW,SAAS,WAAW;EAC7B,MAAM,UAAU,OAAO,QAAQ;AAC/B,MAAI,CAAC,SAAS;AACZ,WAAQ,KAAK;AACb;;EAIF,IAAI,mBAAmB,QAAQ,cAA2B;AAC1D,MAAI,CAAC,oBAAoB,qBAAqB,QAAQ;AACpD,sBAAmB,SAAS,cAAc;AAC1C,WAAQ,aAAa,kBAAkB;;EAGzC,MAAM,kBAAkB,IAAI,4BAA4B;EAGxD,MAAM,sBAAsB,gBAAgB,WAAW,YAAY;AACjE,UAAO,aAAa,cAAc,OAAO;AAGzC,OAAI,SAAS;IACX,MAAM,mBAAmB,cAAc;AACvC,QAAI,iBACF,QAAO,aAAa,mBAAmB;SAGzC,QAAO,gBAAgB;;EAK3B,MAAM,oBAAoB,cAAc,WAAW,cAAc;GAC/D,MAAM,UAAU,OAAO,aAAa,kBAAkB;AACtD,OAAI,WAAW,UACb,QAAO,aAAa,mBAAmB;;AAI3C,mBAAiB,WAAW;AAC1B;AACA;AACA,mBAAgB;;;AAKpB,cAAa;AACX,mBAAiB,SAAS,YAAY;AACtC,gBAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"sub-navbar-DkxQv0WJ.js","names":[],"sources":["../src/components/navbar/sub-navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { useRef, type HTMLAttributes, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\nimport { useIsElementAboveViewport, useScrollDirection } from '../../utilities/hooks';\n\nexport type SubNavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const SubNavbar = ({ dark = false, children, className, ref, ...props }: SubNavbarProps) => {\n const elementRef = useRef<HTMLDivElement>(null);\n const fixed = useIsElementAboveViewport(elementRef);\n const scrollDirection = useScrollDirection();\n\n return (\n <div className='bi-sub-navbar--wrapper'>\n <div ref={elementRef} />\n <nav\n className={clsx('bi-sub-navbar', className)}\n data-fixed={fixed}\n data-scroll-dir={fixed ? scrollDirection : undefined}\n data-dark={dark}\n {...props}\n ref={ref}\n >\n {children}\n </nav>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAaA,MAAa,YAAY,CAAC,EAAE,OAAO,OAAO,UAAU,WAAW,IAAK,GAAG,OAAuB,KAAK;CACjG,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,QAAQ,0BAA0B,WAAW;CACnD,MAAM,kBAAkB,oBAAoB;AAE5C,6BACG;EAAI,WAAU;iCACZ,SAAI,KAAK,aAAc,sBACvB;GACC,WAAW,KAAK,iBAAiB,UAAU;GAC3C,cAAY;GACZ,mBAAiB,QAAQ,kBAAkB;GAC3C,aAAW;GACX,GAAI;GACC;GAEJ;IACG;GACF;AAET"}
1
+ {"version":3,"file":"sub-navbar-DkxQv0WJ.js","names":[],"sources":["../src/components/navbar/sub-navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { useRef, type HTMLAttributes, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\nimport { useIsElementAboveViewport, useScrollDirection } from '../../utilities/hooks';\n\nexport type SubNavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const SubNavbar = ({ dark = false, children, className, ref, ...props }: SubNavbarProps) => {\n const elementRef = useRef<HTMLDivElement>(null);\n const fixed = useIsElementAboveViewport(elementRef);\n const scrollDirection = useScrollDirection();\n\n return (\n <div className='bi-sub-navbar--wrapper'>\n <div ref={elementRef} />\n <nav\n className={clsx('bi-sub-navbar', className)}\n data-fixed={fixed}\n data-scroll-dir={fixed ? scrollDirection : undefined}\n data-dark={dark}\n {...props}\n ref={ref}\n >\n {children}\n </nav>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAaA,MAAa,aAAa,EAAE,OAAO,OAAO,UAAU,WAAW,IAAK,GAAG,YAA4B;CACjG,MAAM,aAAa,OAAuB;CAC1C,MAAM,QAAQ,0BAA0B;CACxC,MAAM,kBAAkB;AAExB,QACE,qBAAC;EAAI,WAAU;aACb,oBAAC,SAAI,KAAK,eACV,oBAAC;GACC,WAAW,KAAK,iBAAiB;GACjC,cAAY;GACZ,mBAAiB,QAAQ,kBAAkB;GAC3C,aAAW;GACX,GAAI;GACC;GAEJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"tab-BvSndQZ_.js","names":[],"sources":["../src/components/tabs/tab.tsx"],"sourcesContent":["import type { MergeRight } from '../../utilities';\nimport { Trigger } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\nimport { Button, ButtonProps } from '../button';\n\nexport type TabProps = MergeRight<\n Omit<ButtonProps, 'variant' | 'type'>,\n {\n /** A unique value that associates the trigger with a content. */\n value: string;\n /**\n * When true, prevents the user from interacting with the tab.\n * @default false\n */\n disabled?: boolean;\n }\n>;\n\nexport const Tab = ({ className, value, disabled, children, asChild, dark, ref, ...props }: TabProps) => {\n return (\n <Trigger value={value} disabled={disabled} asChild>\n <Button\n ref={ref}\n variant='text'\n className={clsx('bi-tabs--tab', className)}\n disabled={disabled}\n asChild={asChild}\n dark={dark}\n {...props}\n >\n {children}\n </Button>\n </Trigger>\n );\n};\n"],"mappings":";;;;;;AAkBA,MAAa,MAAM,CAAC,EAAE,WAAW,OAAO,UAAU,UAAU,SAAS,MAAM,IAAK,GAAG,OAAiB,KAAK;AACvG,4BACG;EAAe;EAAiB;EAAU;gCACxC;GACM;GACL,SAAQ;GACR,WAAW,KAAK,gBAAgB,UAAU;GAChC;GACD;GACH;GACN,GAAI;GAEH;IACM;GACD;AAEb"}
1
+ {"version":3,"file":"tab-BvSndQZ_.js","names":[],"sources":["../src/components/tabs/tab.tsx"],"sourcesContent":["import type { MergeRight } from '../../utilities';\nimport { Trigger } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\nimport { Button, ButtonProps } from '../button';\n\nexport type TabProps = MergeRight<\n Omit<ButtonProps, 'variant' | 'type'>,\n {\n /** A unique value that associates the trigger with a content. */\n value: string;\n /**\n * When true, prevents the user from interacting with the tab.\n * @default false\n */\n disabled?: boolean;\n }\n>;\n\nexport const Tab = ({ className, value, disabled, children, asChild, dark, ref, ...props }: TabProps) => {\n return (\n <Trigger value={value} disabled={disabled} asChild>\n <Button\n ref={ref}\n variant='text'\n className={clsx('bi-tabs--tab', className)}\n disabled={disabled}\n asChild={asChild}\n dark={dark}\n {...props}\n >\n {children}\n </Button>\n </Trigger>\n );\n};\n"],"mappings":";;;;;;AAkBA,MAAa,OAAO,EAAE,WAAW,OAAO,UAAU,UAAU,SAAS,MAAM,IAAK,GAAG,YAAsB;AACvG,QACE,oBAAC;EAAe;EAAiB;EAAU;YACzC,oBAAC;GACM;GACL,SAAQ;GACR,WAAW,KAAK,gBAAgB;GACtB;GACD;GACH;GACN,GAAI;GAEH"}
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-C70z_5SJ.js","names":[],"sources":["../src/components/tabs/tabs.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Root } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `automatic`, tabs are activated when receiving focus. When `manual`, tabs are activated when clicked.\n * @default 'automatic'\n */\n activationMode?: 'manual' | 'automatic';\n /**\n * The orientation of the component.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\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 /**\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\nexport const Tabs = ({\n activationMode = 'automatic',\n orientation = 'horizontal',\n defaultValue,\n value,\n onChange,\n children,\n className,\n asChild,\n dark,\n ref,\n ...props\n}: TabsProps) => {\n return (\n <Root\n className={clsx('bi-tabs', className)}\n activationMode={activationMode}\n orientation={orientation}\n defaultValue={defaultValue}\n value={value}\n onValueChange={onChange}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Root>\n );\n};\n"],"mappings":";;;;;AAkCA,MAAa,OAAO,CAAC,EACnB,iBAAiB,aACjB,cAAc,cACd,cACA,OACA,UACA,UACA,WACA,SACA,MACA,IACA,GAAG,OACO,KAAK;AACf,4BACG;EACC,WAAW,KAAK,WAAW,UAAU;EACrB;EACH;EACC;EACP;EACP,eAAe;EACN;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACI;AAEV"}
1
+ {"version":3,"file":"tabs-C70z_5SJ.js","names":[],"sources":["../src/components/tabs/tabs.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Root } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `automatic`, tabs are activated when receiving focus. When `manual`, tabs are activated when clicked.\n * @default 'automatic'\n */\n activationMode?: 'manual' | 'automatic';\n /**\n * The orientation of the component.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\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 /**\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\nexport const Tabs = ({\n activationMode = 'automatic',\n orientation = 'horizontal',\n defaultValue,\n value,\n onChange,\n children,\n className,\n asChild,\n dark,\n ref,\n ...props\n}: TabsProps) => {\n return (\n <Root\n className={clsx('bi-tabs', className)}\n activationMode={activationMode}\n orientation={orientation}\n defaultValue={defaultValue}\n value={value}\n onValueChange={onChange}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Root>\n );\n};\n"],"mappings":";;;;;AAkCA,MAAa,QAAQ,EACnB,iBAAiB,aACjB,cAAc,cACd,cACA,OACA,UACA,UACA,WACA,SACA,MACA,IACA,GAAG,YACY;AACf,QACE,oBAAC;EACC,WAAW,KAAK,WAAW;EACX;EACH;EACC;EACP;EACP,eAAe;EACN;EACT,aAAW;EACN;EACL,GAAI;EAEH"}
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-list-npvK06bl.js","names":[],"sources":["../src/components/tabs/tabs-list.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { List } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsListProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `true`, keyboard navigation will loop from last tab to first, and vice versa.\n * @default true\n */\n loop?: 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\nexport const TabsList = ({ className, loop = true, children, asChild, dark, ref, ...props }: TabsListProps) => {\n return (\n <List\n className={clsx('bi-tabs--list', className)}\n loop={loop}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </List>\n );\n};\n"],"mappings":";;;;;AAuBA,MAAa,WAAW,CAAC,EAAE,WAAW,OAAO,MAAM,UAAU,SAAS,MAAM,IAAK,GAAG,OAAsB,KAAK;AAC7G,4BACG;EACC,WAAW,KAAK,iBAAiB,UAAU;EACrC;EACG;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACI;AAEV"}
1
+ {"version":3,"file":"tabs-list-npvK06bl.js","names":[],"sources":["../src/components/tabs/tabs-list.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { List } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsListProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `true`, keyboard navigation will loop from last tab to first, and vice versa.\n * @default true\n */\n loop?: 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\nexport const TabsList = ({ className, loop = true, children, asChild, dark, ref, ...props }: TabsListProps) => {\n return (\n <List\n className={clsx('bi-tabs--list', className)}\n loop={loop}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </List>\n );\n};\n"],"mappings":";;;;;AAuBA,MAAa,YAAY,EAAE,WAAW,OAAO,MAAM,UAAU,SAAS,MAAM,IAAK,GAAG,YAA2B;AAC7G,QACE,oBAAC;EACC,WAAW,KAAK,iBAAiB;EAC3B;EACG;EACT,aAAW;EACN;EACL,GAAI;EAEH"}
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-panel-L8HovooI.js","names":[],"sources":["../src/components/tabs/tabs-panel.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Content } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsPanelProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /** A unique value that associates the content with a trigger. */\n value: string;\n /** Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. */\n forceMount?: 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\nexport const TabsPanel = ({ className, value, forceMount, children, asChild, dark, ref, ...props }: TabsPanelProps) => {\n return (\n <Content\n className={clsx('bi-tabs--panel', className)}\n value={value}\n forceMount={forceMount || undefined}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Content>\n );\n};\n"],"mappings":";;;;;AAsBA,MAAa,YAAY,CAAC,EAAE,WAAW,OAAO,YAAY,UAAU,SAAS,MAAM,IAAK,GAAG,OAAuB,KAAK;AACrH,4BACG;EACC,WAAW,KAAK,kBAAkB,UAAU;EACrC;EACP,YAAY,cAAc;EACjB;EACT,aAAW;EACN;EACL,GAAI;EAEH;GACO;AAEb"}
1
+ {"version":3,"file":"tabs-panel-L8HovooI.js","names":[],"sources":["../src/components/tabs/tabs-panel.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Content } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsPanelProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /** A unique value that associates the content with a trigger. */\n value: string;\n /** Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. */\n forceMount?: 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\nexport const TabsPanel = ({ className, value, forceMount, children, asChild, dark, ref, ...props }: TabsPanelProps) => {\n return (\n <Content\n className={clsx('bi-tabs--panel', className)}\n value={value}\n forceMount={forceMount || undefined}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Content>\n );\n};\n"],"mappings":";;;;;AAsBA,MAAa,aAAa,EAAE,WAAW,OAAO,YAAY,UAAU,SAAS,MAAM,IAAK,GAAG,YAA4B;AACrH,QACE,oBAAC;EACC,WAAW,KAAK,kBAAkB;EAC3B;EACP,YAAY,cAAc;EACjB;EACT,aAAW;EACN;EACL,GAAI;EAEH"}
@@ -1 +1 @@
1
- {"version":3,"file":"textarea-B1fAOfkt.js","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, dark, size, ref, ...props }: TextareaProps) => {\n return <textarea className={clsx('bi-input', className)} data-dark={dark} data-size={size} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAiBA,MAAa,WAAW,CAAC,EAAE,WAAW,MAAM,MAAM,IAAK,GAAG,OAAsB,KAAK;AACnF,4BAAQ;EAAS,WAAW,KAAK,YAAY,UAAU;EAAE,aAAW;EAAM,aAAW;EAAW;EAAK,GAAI;GAAS;AACnH"}
1
+ {"version":3,"file":"textarea-B1fAOfkt.js","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, dark, size, ref, ...props }: TextareaProps) => {\n return <textarea className={clsx('bi-input', className)} data-dark={dark} data-size={size} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAiBA,MAAa,YAAY,EAAE,WAAW,MAAM,MAAM,IAAK,GAAG,YAA2B;AACnF,QAAO,oBAAC;EAAS,WAAW,KAAK,YAAY;EAAY,aAAW;EAAM,aAAW;EAAW;EAAK,GAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"textfield-DwLkaC2S.js","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 &\n // 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 dark,\n label,\n description,\n error,\n multiline,\n prefix,\n suffix,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\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-dark={dark} 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 dark={dark}\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 dark={dark}\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":";;;;;;;;;;;AAgDA,MAAa,YAAY,CAAC,EACxB,MACA,OACA,aACA,OACA,WACA,QACA,QACA,OACA,WACA,WACA,KACA,IAAI,QACJ,oBAAoB,oBACpB,GAAG,OACY,KAAK;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;CAAoB,EAAC,KAAK,IAAI,CAAC,MAAM,IAAI;AACzG,6BACG;EAAiB;EAAW,aAAW;EAAa;EAAkB;;GACpE,6BAAU;IAAM,SAAS;cAAK;KAAc;GAC5C,mCAAgB;IAAiB,IAAI;cAAgB;KAA+B;wBACpF;IACE,8BAAW,wBAAY,SAAoB;IAC3C,gCACE;KACK;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI;KAChC,oBAAkB;KACZ;KACN,GAAK;MACL,uBAED;KACK;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI;KAChC,oBAAkB;KACZ;KACN,GAAK;MACL;IAEH,8BAAW,wBAAY,SAAoB;OAC/B;GACd,CAAC,CAAC,6BAAU;IAAkB,IAAI;cAAe;KAA0B;;GACtE;AAEX"}
1
+ {"version":3,"file":"textfield-DwLkaC2S.js","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 &\n // 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 dark,\n label,\n description,\n error,\n multiline,\n prefix,\n suffix,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\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-dark={dark} 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 dark={dark}\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 dark={dark}\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":";;;;;;;;;;;AAgDA,MAAa,aAAa,EACxB,MACA,OACA,aACA,OACA,WACA,QACA,QACA,OACA,WACA,WACA,KACA,IAAI,QACJ,oBAAoB,oBACpB,GAAG,YACiB;CACpB,MAAM,cAAc;CACpB,MAAM,gBAAgB;CACtB,MAAM,eAAe;CACrB,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;GAAqB,KAAK,KAAK,UAAU;AACzG,QACE,qBAAC;EAAiB;EAAW,aAAW;EAAa;EAAkB;;GACpE,SAAS,oBAAC;IAAM,SAAS;cAAK;;GAC9B,eAAe,oBAAC;IAAiB,IAAI;cAAgB;;GACtD,qBAAC;IACE,UAAU,oBAAC,wBAAY;IACvB,YACC,oBAAC;KACK;KACC;KACL,gBAAc,QAAQ,UAAU;KAChC,oBAAkB;KACZ;KACN,GAAK;SAGP,oBAAC;KACK;KACC;KACL,gBAAc,QAAQ,UAAU;KAChC,oBAAkB;KACZ;KACN,GAAK;;IAGR,UAAU,oBAAC,wBAAY;;GAEzB,CAAC,CAAC,SAAS,oBAAC;IAAkB,IAAI;cAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"useCheckboxGroup-BDH3ewt8.js","names":["e: ChangeEvent<HTMLInputElement>"],"sources":["../src/utilities/hooks/useCheckboxGroup/useCheckboxGroup.tsx"],"sourcesContent":["import type { ChangeEvent } from 'react';\n\nexport type UseCheckboxGroupOptions = {\n options: boolean[];\n updateOptions: (checked: boolean) => void;\n};\n\nexport type UseCheckboxGroupReturn = {\n /** Spread this on the \"parent\" checkbox */\n checkboxGroupProps: {\n checked: boolean;\n indeterminate: boolean;\n onChange: (e: ChangeEvent<HTMLInputElement>) => void;\n };\n};\n\nexport const useCheckboxGroup = ({ options, updateOptions }: UseCheckboxGroupOptions): UseCheckboxGroupReturn => {\n const checked = options.every((option) => option);\n const indeterminate = options.some((option) => option) && !checked;\n\n const onChange = (e: ChangeEvent<HTMLInputElement>) => {\n const newChecked = e.target.indeterminate ? true : e.target.checked;\n updateOptions(newChecked);\n };\n\n return {\n checkboxGroupProps: {\n checked,\n indeterminate,\n onChange,\n },\n };\n};\n"],"mappings":";AAgBA,MAAa,mBAAmB,CAAC,EAAE,SAAS,eAAwC,KAA6B;CAC/G,MAAM,UAAU,QAAQ,MAAM,CAAC,WAAW,OAAO;CACjD,MAAM,gBAAgB,QAAQ,KAAK,CAAC,WAAW,OAAO,IAAI,CAAC;CAE3D,MAAM,WAAW,CAACA,MAAqC;EACrD,MAAM,aAAa,EAAE,OAAO,gBAAgB,OAAO,EAAE,OAAO;EAC5D,cAAc,WAAW;CAC1B;AAED,QAAO,EACL,oBAAoB;EAClB;EACA;EACA;CACD,EACF;AACF"}
1
+ {"version":3,"file":"useCheckboxGroup-BDH3ewt8.js","names":[],"sources":["../src/utilities/hooks/useCheckboxGroup/useCheckboxGroup.tsx"],"sourcesContent":["import type { ChangeEvent } from 'react';\n\nexport type UseCheckboxGroupOptions = {\n options: boolean[];\n updateOptions: (checked: boolean) => void;\n};\n\nexport type UseCheckboxGroupReturn = {\n /** Spread this on the \"parent\" checkbox */\n checkboxGroupProps: {\n checked: boolean;\n indeterminate: boolean;\n onChange: (e: ChangeEvent<HTMLInputElement>) => void;\n };\n};\n\nexport const useCheckboxGroup = ({ options, updateOptions }: UseCheckboxGroupOptions): UseCheckboxGroupReturn => {\n const checked = options.every((option) => option);\n const indeterminate = options.some((option) => option) && !checked;\n\n const onChange = (e: ChangeEvent<HTMLInputElement>) => {\n const newChecked = e.target.indeterminate ? true : e.target.checked;\n updateOptions(newChecked);\n };\n\n return {\n checkboxGroupProps: {\n checked,\n indeterminate,\n onChange,\n },\n };\n};\n"],"mappings":";AAgBA,MAAa,oBAAoB,EAAE,SAAS,oBAAqE;CAC/G,MAAM,UAAU,QAAQ,OAAO,WAAW;CAC1C,MAAM,gBAAgB,QAAQ,MAAM,WAAW,WAAW,CAAC;CAE3D,MAAM,YAAY,MAAqC;EACrD,MAAM,aAAa,EAAE,OAAO,gBAAgB,OAAO,EAAE,OAAO;AAC5D,gBAAc;;AAGhB,QAAO,EACL,oBAAoB;EAClB;EACA;EACA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useIsElementAboveViewport-lmdnXDdc.js","names":["elementRef: RefObject<HTMLElement | null>"],"sources":["../src/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.tsx"],"sourcesContent":["import { useEffect, useState, type RefObject } from 'react';\n\n/** Detects when an element's is scrolled past and is no longer in the viewport. */\nexport const useIsElementAboveViewport = (elementRef: RefObject<HTMLElement | null>): boolean => {\n const [isAboveViewport, setIsPast] = useState(false);\n\n useEffect(() => {\n const observer = new IntersectionObserver(([entry]) => setIsPast(entry.boundingClientRect.y < 0), {\n threshold: [0],\n });\n const currentRef = elementRef.current;\n if (currentRef) observer.observe(currentRef);\n return () => {\n if (currentRef) observer.unobserve(currentRef);\n };\n }, [elementRef]);\n return isAboveViewport;\n};\n"],"mappings":";;;;AAGA,MAAa,4BAA4B,CAACA,eAAuD;CAC/F,MAAM,CAAC,iBAAiB,UAAU,GAAG,SAAS,MAAM;CAEpD,UAAU,MAAM;EACd,MAAM,WAAW,IAAI,qBAAqB,CAAC,CAAC,MAAM,KAAK,UAAU,MAAM,mBAAmB,IAAI,EAAE,EAAE,EAChG,WAAW,CAAC,CAAE,EACf;EACD,MAAM,aAAa,WAAW;AAC9B,MAAI,YAAY,SAAS,QAAQ,WAAW;AAC5C,SAAO,MAAM;AACX,OAAI,YAAY,SAAS,UAAU,WAAW;EAC/C;CACF,GAAE,CAAC,UAAW,EAAC;AAChB,QAAO;AACR"}
1
+ {"version":3,"file":"useIsElementAboveViewport-lmdnXDdc.js","names":[],"sources":["../src/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.tsx"],"sourcesContent":["import { useEffect, useState, type RefObject } from 'react';\n\n/** Detects when an element's is scrolled past and is no longer in the viewport. */\nexport const useIsElementAboveViewport = (elementRef: RefObject<HTMLElement | null>): boolean => {\n const [isAboveViewport, setIsPast] = useState(false);\n\n useEffect(() => {\n const observer = new IntersectionObserver(([entry]) => setIsPast(entry.boundingClientRect.y < 0), {\n threshold: [0],\n });\n const currentRef = elementRef.current;\n if (currentRef) observer.observe(currentRef);\n return () => {\n if (currentRef) observer.unobserve(currentRef);\n };\n }, [elementRef]);\n return isAboveViewport;\n};\n"],"mappings":";;;;AAGA,MAAa,6BAA6B,eAAuD;CAC/F,MAAM,CAAC,iBAAiB,aAAa,SAAS;AAE9C,iBAAgB;EACd,MAAM,WAAW,IAAI,sBAAsB,CAAC,WAAW,UAAU,MAAM,mBAAmB,IAAI,IAAI,EAChG,WAAW,CAAC;EAEd,MAAM,aAAa,WAAW;AAC9B,MAAI,WAAY,UAAS,QAAQ;AACjC,eAAa;AACX,OAAI,WAAY,UAAS,UAAU;;IAEpC,CAAC;AACJ,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMediaQuery-ICPWsO_p.js","names":["query: string","query"],"sources":["../src/utilities/hooks/useMediaQuery/useMediaQuery.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect';\n\n/** Hook options. */\nexport type UseMediaQueryOptions = {\n /**\n * The default value to return if the hook is being run on the server.\n * @default false\n */\n defaultValue?: boolean;\n /**\n * If `true` (default), the hook will initialize reading the media query. In SSR, you should set it to `false`, returning `options.defaultValue` or `false` initially.\n * @default true\n */\n initializeWithValue?: boolean;\n};\n\nconst IS_SERVER = typeof window === 'undefined';\n\n/**\n * Custom hook that tracks the state of a media query using the [`Match Media API`](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia).\n * @param {string} query - The media query to track.\n * @param {?UseMediaQueryOptions} [options] - The options for customizing the behavior of the hook (optional).\n * @returns {boolean} The current state of the media query (true if the query matches, false otherwise).\n * @example\n * ```tsx\n * const isSmallScreen = useMediaQuery('(max-width: 600px)');\n * // Use `isSmallScreen` to conditionally apply styles or logic based on the screen size.\n * ```\n */\nexport function useMediaQuery(\n query: string,\n { defaultValue = false, initializeWithValue = true }: UseMediaQueryOptions = {},\n): boolean {\n const getMatches = (query: string): boolean => {\n if (IS_SERVER) {\n return defaultValue;\n }\n return window.matchMedia(query).matches;\n };\n\n const [matches, setMatches] = useState<boolean>(() => {\n if (initializeWithValue) {\n return getMatches(query);\n }\n return defaultValue;\n });\n\n // Handles the change event of the media query.\n function handleChange() {\n setMatches(getMatches(query));\n }\n\n useIsomorphicLayoutEffect(() => {\n const matchMedia = window.matchMedia(query);\n\n // Triggered at the first client-side load and if query changes\n handleChange();\n\n // Use deprecated `addListener` and `removeListener` to support Safari < 14\n if (matchMedia.addListener) {\n matchMedia.addListener(handleChange);\n } else {\n matchMedia.addEventListener('change', handleChange);\n }\n\n return () => {\n if (matchMedia.removeListener) {\n matchMedia.removeListener(handleChange);\n } else {\n matchMedia.removeEventListener('change', handleChange);\n }\n };\n }, [query]);\n\n return matches;\n}\n"],"mappings":";;;;AAkBA,MAAM,YAAY,OAAO,WAAW;;;;;;;;;;;;AAapC,SAAgB,cACdA,OACA,EAAE,eAAe,OAAO,sBAAsB,MAA4B,GAAG,CAAE,GACtE;CACT,MAAM,aAAa,CAACA,YAA2B;AAC7C,MAAI,UACF,QAAO;AAET,SAAO,OAAO,WAAWC,QAAM,CAAC;CACjC;CAED,MAAM,CAAC,SAAS,WAAW,GAAG,SAAkB,MAAM;AACpD,MAAI,oBACF,QAAO,WAAW,MAAM;AAE1B,SAAO;CACR,EAAC;CAGF,SAAS,eAAe;EACtB,WAAW,WAAW,MAAM,CAAC;CAC9B;CAED,0BAA0B,MAAM;EAC9B,MAAM,aAAa,OAAO,WAAW,MAAM;EAG3C,cAAc;AAGd,MAAI,WAAW,aACb,WAAW,YAAY,aAAa;OAEpC,WAAW,iBAAiB,UAAU,aAAa;AAGrD,SAAO,MAAM;AACX,OAAI,WAAW,gBACb,WAAW,eAAe,aAAa;QAEvC,WAAW,oBAAoB,UAAU,aAAa;EAEzD;CACF,GAAE,CAAC,KAAM,EAAC;AAEX,QAAO;AACR"}
1
+ {"version":3,"file":"useMediaQuery-ICPWsO_p.js","names":["query"],"sources":["../src/utilities/hooks/useMediaQuery/useMediaQuery.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../useIsomorphicLayoutEffect/useIsomorphicLayoutEffect';\n\n/** Hook options. */\nexport type UseMediaQueryOptions = {\n /**\n * The default value to return if the hook is being run on the server.\n * @default false\n */\n defaultValue?: boolean;\n /**\n * If `true` (default), the hook will initialize reading the media query. In SSR, you should set it to `false`, returning `options.defaultValue` or `false` initially.\n * @default true\n */\n initializeWithValue?: boolean;\n};\n\nconst IS_SERVER = typeof window === 'undefined';\n\n/**\n * Custom hook that tracks the state of a media query using the [`Match Media API`](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia).\n * @param {string} query - The media query to track.\n * @param {?UseMediaQueryOptions} [options] - The options for customizing the behavior of the hook (optional).\n * @returns {boolean} The current state of the media query (true if the query matches, false otherwise).\n * @example\n * ```tsx\n * const isSmallScreen = useMediaQuery('(max-width: 600px)');\n * // Use `isSmallScreen` to conditionally apply styles or logic based on the screen size.\n * ```\n */\nexport function useMediaQuery(\n query: string,\n { defaultValue = false, initializeWithValue = true }: UseMediaQueryOptions = {},\n): boolean {\n const getMatches = (query: string): boolean => {\n if (IS_SERVER) {\n return defaultValue;\n }\n return window.matchMedia(query).matches;\n };\n\n const [matches, setMatches] = useState<boolean>(() => {\n if (initializeWithValue) {\n return getMatches(query);\n }\n return defaultValue;\n });\n\n // Handles the change event of the media query.\n function handleChange() {\n setMatches(getMatches(query));\n }\n\n useIsomorphicLayoutEffect(() => {\n const matchMedia = window.matchMedia(query);\n\n // Triggered at the first client-side load and if query changes\n handleChange();\n\n // Use deprecated `addListener` and `removeListener` to support Safari < 14\n if (matchMedia.addListener) {\n matchMedia.addListener(handleChange);\n } else {\n matchMedia.addEventListener('change', handleChange);\n }\n\n return () => {\n if (matchMedia.removeListener) {\n matchMedia.removeListener(handleChange);\n } else {\n matchMedia.removeEventListener('change', handleChange);\n }\n };\n }, [query]);\n\n return matches;\n}\n"],"mappings":";;;;AAkBA,MAAM,YAAY,OAAO,WAAW;;;;;;;;;;;;AAapC,SAAgB,cACd,OACA,EAAE,eAAe,OAAO,sBAAsB,SAA+B,IACpE;CACT,MAAM,cAAc,YAA2B;AAC7C,MAAI,UACF,QAAO;AAET,SAAO,OAAO,WAAWA,SAAO;;CAGlC,MAAM,CAAC,SAAS,cAAc,eAAwB;AACpD,MAAI,oBACF,QAAO,WAAW;AAEpB,SAAO;;CAIT,SAAS,eAAe;AACtB,aAAW,WAAW;;AAGxB,iCAAgC;EAC9B,MAAM,aAAa,OAAO,WAAW;AAGrC;AAGA,MAAI,WAAW,YACb,YAAW,YAAY;MAEvB,YAAW,iBAAiB,UAAU;AAGxC,eAAa;AACX,OAAI,WAAW,eACb,YAAW,eAAe;OAE1B,YAAW,oBAAoB,UAAU;;IAG5C,CAAC;AAEJ,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMergeRefs-DC710CHX.js","names":["refs: Array<Ref<Instance> | undefined>","instance: Instance | null","refCleanup: void | (() => void)"],"sources":["../src/utilities/hooks/useMergeRefs/useMergeRefs.ts"],"sourcesContent":["// https://github.com/floating-ui/floating-ui/blob/master/packages/react/src/hooks/useMergeRefs.ts\nimport { useCallback, useMemo, useRef } from 'react';\nimport type { Ref, RefCallback, RefObject } from 'react';\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n */\nexport function useMergeRefs<Instance>(refs: Array<Ref<Instance> | undefined>): null | RefCallback<Instance> {\n const cleanupRef = useRef<undefined | (() => void)>(undefined);\n\n const refEffect = useCallback((instance: Instance | null) => {\n const cleanups = refs.map((ref) => {\n if (ref == null) {\n return;\n }\n\n if (typeof ref === 'function') {\n const refCallback = ref;\n // biome-ignore lint/suspicious/noConfusingVoidType: @types-react wants `void` here\n const refCleanup: void | (() => void) = refCallback(instance);\n return typeof refCleanup === 'function'\n ? refCleanup\n : () => {\n refCallback(null);\n };\n }\n\n (ref as RefObject<Instance | null>).current = instance;\n return () => {\n (ref as RefObject<Instance | null>).current = null;\n };\n });\n\n return () => {\n for (const refCleanup of cleanups) {\n refCleanup?.();\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n\n return useMemo(() => {\n if (refs.every((ref) => ref == null)) {\n return null;\n }\n\n return (value) => {\n if (cleanupRef.current) {\n cleanupRef.current();\n (cleanupRef as RefObject<undefined | (() => void)>).current = undefined;\n }\n\n if (value != null) {\n (cleanupRef as RefObject<undefined | (() => void)>).current = refEffect(value);\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}\n"],"mappings":";;;;;;AAOA,SAAgB,aAAuBA,MAAsE;CAC3G,MAAM,aAAa,OAAiC,OAAU;CAE9D,MAAM,YAAY,YAAY,CAACC,aAA8B;EAC3D,MAAM,WAAW,KAAK,IAAI,CAAC,QAAQ;AACjC,OAAI,OAAO,KACT;AAGF,OAAI,OAAO,QAAQ,YAAY;IAC7B,MAAM,cAAc;IAEpB,MAAMC,aAAkC,YAAY,SAAS;AAC7D,WAAO,OAAO,eAAe,aACzB,aACA,MAAM;KACJ,YAAY,KAAK;IAClB;GACN;GAEA,IAAmC,UAAU;AAC9C,UAAO,MAAM;IACV,IAAmC,UAAU;GAC/C;EACF,EAAC;AAEF,SAAO,MAAM;AACX,QAAK,MAAM,cAAc,UACvB,cAAc;EAEjB;CAEF,GAAE,KAAK;AAER,QAAO,QAAQ,MAAM;AACnB,MAAI,KAAK,MAAM,CAAC,QAAQ,OAAO,KAAK,CAClC,QAAO;AAGT,SAAO,CAAC,UAAU;AAChB,OAAI,WAAW,SAAS;IACtB,WAAW,SAAS;IACnB,WAAmD,UAAU;GAC/D;AAED,OAAI,SAAS,MACV,WAAmD,UAAU,UAAU,MAAM;EAEjF;CAEF,GAAE,KAAK;AACT"}
1
+ {"version":3,"file":"useMergeRefs-DC710CHX.js","names":["refCleanup: void | (() => void)"],"sources":["../src/utilities/hooks/useMergeRefs/useMergeRefs.ts"],"sourcesContent":["// https://github.com/floating-ui/floating-ui/blob/master/packages/react/src/hooks/useMergeRefs.ts\nimport { useCallback, useMemo, useRef } from 'react';\nimport type { Ref, RefCallback, RefObject } from 'react';\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n */\nexport function useMergeRefs<Instance>(refs: Array<Ref<Instance> | undefined>): null | RefCallback<Instance> {\n const cleanupRef = useRef<undefined | (() => void)>(undefined);\n\n const refEffect = useCallback((instance: Instance | null) => {\n const cleanups = refs.map((ref) => {\n if (ref == null) {\n return;\n }\n\n if (typeof ref === 'function') {\n const refCallback = ref;\n // biome-ignore lint/suspicious/noConfusingVoidType: @types-react wants `void` here\n const refCleanup: void | (() => void) = refCallback(instance);\n return typeof refCleanup === 'function'\n ? refCleanup\n : () => {\n refCallback(null);\n };\n }\n\n (ref as RefObject<Instance | null>).current = instance;\n return () => {\n (ref as RefObject<Instance | null>).current = null;\n };\n });\n\n return () => {\n for (const refCleanup of cleanups) {\n refCleanup?.();\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n\n return useMemo(() => {\n if (refs.every((ref) => ref == null)) {\n return null;\n }\n\n return (value) => {\n if (cleanupRef.current) {\n cleanupRef.current();\n (cleanupRef as RefObject<undefined | (() => void)>).current = undefined;\n }\n\n if (value != null) {\n (cleanupRef as RefObject<undefined | (() => void)>).current = refEffect(value);\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}\n"],"mappings":";;;;;;AAOA,SAAgB,aAAuB,MAAsE;CAC3G,MAAM,aAAa,OAAiC;CAEpD,MAAM,YAAY,aAAa,aAA8B;EAC3D,MAAM,WAAW,KAAK,KAAK,QAAQ;AACjC,OAAI,OAAO,KACT;AAGF,OAAI,OAAO,QAAQ,YAAY;IAC7B,MAAM,cAAc;IAEpB,MAAMA,aAAkC,YAAY;AACpD,WAAO,OAAO,eAAe,aACzB,mBACM;AACJ,iBAAY;;;AAIpB,GAAC,IAAmC,UAAU;AAC9C,gBAAa;AACX,IAAC,IAAmC,UAAU;;;AAIlD,eAAa;AACX,QAAK,MAAM,cAAc,SACvB;;IAIH;AAEH,QAAO,cAAc;AACnB,MAAI,KAAK,OAAO,QAAQ,OAAO,MAC7B,QAAO;AAGT,UAAQ,UAAU;AAChB,OAAI,WAAW,SAAS;AACtB,eAAW;AACX,IAAC,WAAmD,UAAU;;AAGhE,OAAI,SAAS,KACX,CAAC,WAAmD,UAAU,UAAU;;IAI3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"usePagination-DQR72JNE.js","names":["start: number","end: number","itemList: (number | 'ellipsis')[]"],"sources":["../src/utilities/hooks/usePagination/usePagination.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport type { PaginationButtonProps } from '../../../components';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nconst range = (start: number, end: number) => {\n const length = end - start + 1;\n return Array.from({ length }, (_, i) => start + i);\n};\n\nexport type UsePaginationProps = {\n /**\n * The number of pages\n */\n count: number;\n /*\n * The current page. The numbering starts from `1`, if controlled\n * @default 1\n */\n page?: number;\n /*\n * The current page. The numbering starts from `1`, if uncontrolled\n * @default 1\n */\n defaultPage?: number;\n /**\n * Number of always visible pages at the beginning and end.\n * @default 1\n */\n boundaryCount?: number;\n /**\n * Number of always visible pages before and after the current page.\n * @default 1\n */\n siblingCount?: number;\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled?: boolean;\n /** Callback when the page changes */\n onPageChange?: (page: number) => void;\n};\n\n/**\n * Hook to help manage pagination state of a Pagination component.\n *\n * @example\n * const { pages, nextButtonProps, prevButtonProps } = usePagination({\n * page,\n * count: 10,\n * showPages: 7,\n * boundaryCount: 1,\n * siblingCount: 1,\n * })\n *\n * <Pagination>\n * <PaginationItem>\n * <PaginationButton {...prevButtonProps}>Previous</PaginationButton>\n * </PaginationItem>\n * {pages.map(({ page, itemKey, buttonProps }) => (\n * <PaginationItem key={itemKey}>\n * {typeof page === 'number' && (\n * <PaginationButton {...buttonProps} aria-label={`Page ${page}`}>\n * {page}\n * </PaginationButton>\n * )}\n * </PaginationItem>\n * ))}\n * <PaginationItem>\n * <PaginationButton {...nextButtonProps}>Next</PaginationButton>\n * </PaginationItem>\n * </Pagination>\n **/\nexport const usePagination = ({\n count,\n page: pageProp,\n defaultPage,\n boundaryCount = 1,\n siblingCount = 1,\n disabled = false,\n onPageChange,\n}: UsePaginationProps) => {\n const [page, setPage] = useControllableState({\n prop: pageProp,\n onChange: onPageChange,\n defaultProp: defaultPage ?? 1,\n caller: 'Pagination',\n });\n\n return useMemo(() => {\n const startPages = range(1, Math.min(boundaryCount, count));\n const endPages = range(Math.max(count - boundaryCount + 1, boundaryCount + 1), count);\n\n const siblingsStart = Math.max(\n Math.min(\n // Natural start\n page - siblingCount,\n // Lower boundary when page is high\n count - boundaryCount - siblingCount * 2 - 1,\n ),\n // Greater than startPages\n boundaryCount + 2,\n );\n\n const siblingsEnd = Math.min(\n Math.max(\n // Natural end\n page + siblingCount,\n // Upper boundary when page is low\n boundaryCount + siblingCount * 2 + 2,\n ),\n // Less than endPages\n count - boundaryCount - 1,\n );\n\n // Basic list of items to render, for example: itemList = ['previous', 1, 'ellipsis', 4, 5, 6, 'ellipsis', 10, 'next']\n const itemList: (number | 'ellipsis')[] = [\n ...startPages,\n\n // Start ellipsis\n ...(siblingsStart > boundaryCount + 2\n ? (['ellipsis'] as const)\n : boundaryCount + 1 < count - boundaryCount\n ? [boundaryCount + 1]\n : []),\n\n // Sibling pages\n ...range(siblingsStart, siblingsEnd),\n\n // End ellipsis\n ...(siblingsEnd < count - boundaryCount - 1\n ? (['ellipsis'] as const)\n : count - boundaryCount > boundaryCount\n ? [count - boundaryCount]\n : []),\n\n ...endPages,\n ];\n\n const hasNext = page < count;\n const hasPrev = page !== 1;\n\n return {\n /** Items and pages to be displayed */\n pages: itemList.map((item, index) => ({\n /** Page number, \"ellipsis\" for ellipsis items */\n page: item,\n /** Unique key for the item */\n key: typeof item === 'number' ? `page-${item}` : `ellipsis-${index}`,\n /** Properties to spread on PaginationButton */\n buttonProps: (typeof item === 'number'\n ? {\n 'aria-current': item === page ? 'page' : undefined,\n onClick: () => setPage(item),\n variant: 'text',\n }\n : null) satisfies PaginationButtonProps | null,\n })),\n /** Properties to spread on PaginationButton used for previous navigation */\n prevButtonProps: {\n disabled: disabled || !hasPrev,\n 'aria-disabled': disabled || !hasPrev, // Using aria-disabled to support all HTML elements if asChild is used\n onClick: () => setPage(page - 1),\n variant: 'text',\n } as PaginationButtonProps,\n /** Properties to spread on PaginationButton used for next naviagation */\n nextButtonProps: {\n disabled: disabled || !hasNext,\n 'aria-disabled': disabled || !hasNext, // Using aria-disabled to support all HTML elements if asChild is used\n onClick: () => setPage(page + 1),\n variant: 'text',\n } as PaginationButtonProps,\n /** If previous page action should be shown */\n hasPrev,\n /** If next page action should be shown */\n hasNext,\n };\n }, [boundaryCount, count, disabled, page, setPage, siblingCount]);\n};\n"],"mappings":";;;;AAIA,MAAM,QAAQ,CAACA,OAAeC,QAAgB;CAC5C,MAAM,SAAS,MAAM,QAAQ;AAC7B,QAAO,MAAM,KAAK,EAAE,OAAQ,GAAE,CAAC,GAAG,MAAM,QAAQ,EAAE;AACnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkED,MAAa,gBAAgB,CAAC,EAC5B,OACA,MAAM,UACN,aACA,gBAAgB,GAChB,eAAe,GACf,WAAW,OACX,cACmB,KAAK;CACxB,MAAM,CAAC,MAAM,QAAQ,GAAG,qBAAqB;EAC3C,MAAM;EACN,UAAU;EACV,aAAa,eAAe;EAC5B,QAAQ;CACT,EAAC;AAEF,QAAO,QAAQ,MAAM;EACnB,MAAM,aAAa,MAAM,GAAG,KAAK,IAAI,eAAe,MAAM,CAAC;EAC3D,MAAM,WAAW,MAAM,KAAK,IAAI,QAAQ,gBAAgB,GAAG,gBAAgB,EAAE,EAAE,MAAM;EAErF,MAAM,gBAAgB,KAAK,IACzB,KAAK,IAEH,OAAO,cAEP,QAAQ,gBAAgB,eAAe,IAAI,EAC5C,EAED,gBAAgB,EACjB;EAED,MAAM,cAAc,KAAK,IACvB,KAAK,IAEH,OAAO,cAEP,gBAAgB,eAAe,IAAI,EACpC,EAED,QAAQ,gBAAgB,EACzB;EAGD,MAAMC,WAAoC;GACxC,GAAG;GAGH,GAAI,gBAAgB,gBAAgB,IAC/B,CAAC,UAAW,IACb,gBAAgB,IAAI,QAAQ,gBAC1B,CAAC,gBAAgB,CAAE,IACnB,CAAE;GAGR,GAAG,MAAM,eAAe,YAAY;GAGpC,GAAI,cAAc,QAAQ,gBAAgB,IACrC,CAAC,UAAW,IACb,QAAQ,gBAAgB,gBACtB,CAAC,QAAQ,aAAc,IACvB,CAAE;GAER,GAAG;EACJ;EAED,MAAM,UAAU,OAAO;EACvB,MAAM,UAAU,SAAS;AAEzB,SAAO;GAEL,OAAO,SAAS,IAAI,CAAC,MAAM,WAAW;IAEpC,MAAM;IAEN,KAAK,OAAO,SAAS,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,SAAS,EAAE,OAAO;IAEpE,aAAc,OAAO,SAAS,WAC1B;KACE,gBAAgB,SAAS,OAAO,SAAS;KACzC,SAAS,MAAM,QAAQ,KAAK;KAC5B,SAAS;IACV,IACD;GACL,GAAE;GAEH,iBAAiB;IACf,UAAU,YAAY,CAAC;IACvB,iBAAiB,YAAY,CAAC;IAC9B,SAAS,MAAM,QAAQ,OAAO,EAAE;IAChC,SAAS;GACV;GAED,iBAAiB;IACf,UAAU,YAAY,CAAC;IACvB,iBAAiB,YAAY,CAAC;IAC9B,SAAS,MAAM,QAAQ,OAAO,EAAE;IAChC,SAAS;GACV;GAED;GAEA;EACD;CACF,GAAE;EAAC;EAAe;EAAO;EAAU;EAAM;EAAS;CAAa,EAAC;AAClE"}
1
+ {"version":3,"file":"usePagination-DQR72JNE.js","names":["itemList: (number | 'ellipsis')[]"],"sources":["../src/utilities/hooks/usePagination/usePagination.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport type { PaginationButtonProps } from '../../../components';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nconst range = (start: number, end: number) => {\n const length = end - start + 1;\n return Array.from({ length }, (_, i) => start + i);\n};\n\nexport type UsePaginationProps = {\n /**\n * The number of pages\n */\n count: number;\n /*\n * The current page. The numbering starts from `1`, if controlled\n * @default 1\n */\n page?: number;\n /*\n * The current page. The numbering starts from `1`, if uncontrolled\n * @default 1\n */\n defaultPage?: number;\n /**\n * Number of always visible pages at the beginning and end.\n * @default 1\n */\n boundaryCount?: number;\n /**\n * Number of always visible pages before and after the current page.\n * @default 1\n */\n siblingCount?: number;\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled?: boolean;\n /** Callback when the page changes */\n onPageChange?: (page: number) => void;\n};\n\n/**\n * Hook to help manage pagination state of a Pagination component.\n *\n * @example\n * const { pages, nextButtonProps, prevButtonProps } = usePagination({\n * page,\n * count: 10,\n * showPages: 7,\n * boundaryCount: 1,\n * siblingCount: 1,\n * })\n *\n * <Pagination>\n * <PaginationItem>\n * <PaginationButton {...prevButtonProps}>Previous</PaginationButton>\n * </PaginationItem>\n * {pages.map(({ page, itemKey, buttonProps }) => (\n * <PaginationItem key={itemKey}>\n * {typeof page === 'number' && (\n * <PaginationButton {...buttonProps} aria-label={`Page ${page}`}>\n * {page}\n * </PaginationButton>\n * )}\n * </PaginationItem>\n * ))}\n * <PaginationItem>\n * <PaginationButton {...nextButtonProps}>Next</PaginationButton>\n * </PaginationItem>\n * </Pagination>\n **/\nexport const usePagination = ({\n count,\n page: pageProp,\n defaultPage,\n boundaryCount = 1,\n siblingCount = 1,\n disabled = false,\n onPageChange,\n}: UsePaginationProps) => {\n const [page, setPage] = useControllableState({\n prop: pageProp,\n onChange: onPageChange,\n defaultProp: defaultPage ?? 1,\n caller: 'Pagination',\n });\n\n return useMemo(() => {\n const startPages = range(1, Math.min(boundaryCount, count));\n const endPages = range(Math.max(count - boundaryCount + 1, boundaryCount + 1), count);\n\n const siblingsStart = Math.max(\n Math.min(\n // Natural start\n page - siblingCount,\n // Lower boundary when page is high\n count - boundaryCount - siblingCount * 2 - 1,\n ),\n // Greater than startPages\n boundaryCount + 2,\n );\n\n const siblingsEnd = Math.min(\n Math.max(\n // Natural end\n page + siblingCount,\n // Upper boundary when page is low\n boundaryCount + siblingCount * 2 + 2,\n ),\n // Less than endPages\n count - boundaryCount - 1,\n );\n\n // Basic list of items to render, for example: itemList = ['previous', 1, 'ellipsis', 4, 5, 6, 'ellipsis', 10, 'next']\n const itemList: (number | 'ellipsis')[] = [\n ...startPages,\n\n // Start ellipsis\n ...(siblingsStart > boundaryCount + 2\n ? (['ellipsis'] as const)\n : boundaryCount + 1 < count - boundaryCount\n ? [boundaryCount + 1]\n : []),\n\n // Sibling pages\n ...range(siblingsStart, siblingsEnd),\n\n // End ellipsis\n ...(siblingsEnd < count - boundaryCount - 1\n ? (['ellipsis'] as const)\n : count - boundaryCount > boundaryCount\n ? [count - boundaryCount]\n : []),\n\n ...endPages,\n ];\n\n const hasNext = page < count;\n const hasPrev = page !== 1;\n\n return {\n /** Items and pages to be displayed */\n pages: itemList.map((item, index) => ({\n /** Page number, \"ellipsis\" for ellipsis items */\n page: item,\n /** Unique key for the item */\n key: typeof item === 'number' ? `page-${item}` : `ellipsis-${index}`,\n /** Properties to spread on PaginationButton */\n buttonProps: (typeof item === 'number'\n ? {\n 'aria-current': item === page ? 'page' : undefined,\n onClick: () => setPage(item),\n variant: 'text',\n }\n : null) satisfies PaginationButtonProps | null,\n })),\n /** Properties to spread on PaginationButton used for previous navigation */\n prevButtonProps: {\n disabled: disabled || !hasPrev,\n 'aria-disabled': disabled || !hasPrev, // Using aria-disabled to support all HTML elements if asChild is used\n onClick: () => setPage(page - 1),\n variant: 'text',\n } as PaginationButtonProps,\n /** Properties to spread on PaginationButton used for next naviagation */\n nextButtonProps: {\n disabled: disabled || !hasNext,\n 'aria-disabled': disabled || !hasNext, // Using aria-disabled to support all HTML elements if asChild is used\n onClick: () => setPage(page + 1),\n variant: 'text',\n } as PaginationButtonProps,\n /** If previous page action should be shown */\n hasPrev,\n /** If next page action should be shown */\n hasNext,\n };\n }, [boundaryCount, count, disabled, page, setPage, siblingCount]);\n};\n"],"mappings":";;;;AAIA,MAAM,SAAS,OAAe,QAAgB;CAC5C,MAAM,SAAS,MAAM,QAAQ;AAC7B,QAAO,MAAM,KAAK,EAAE,WAAW,GAAG,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmElD,MAAa,iBAAiB,EAC5B,OACA,MAAM,UACN,aACA,gBAAgB,GAChB,eAAe,GACf,WAAW,OACX,mBACwB;CACxB,MAAM,CAAC,MAAM,WAAW,qBAAqB;EAC3C,MAAM;EACN,UAAU;EACV,aAAa,eAAe;EAC5B,QAAQ;;AAGV,QAAO,cAAc;EACnB,MAAM,aAAa,MAAM,GAAG,KAAK,IAAI,eAAe;EACpD,MAAM,WAAW,MAAM,KAAK,IAAI,QAAQ,gBAAgB,GAAG,gBAAgB,IAAI;EAE/E,MAAM,gBAAgB,KAAK,IACzB,KAAK,IAEH,OAAO,cAEP,QAAQ,gBAAgB,eAAe,IAAI,IAG7C,gBAAgB;EAGlB,MAAM,cAAc,KAAK,IACvB,KAAK,IAEH,OAAO,cAEP,gBAAgB,eAAe,IAAI,IAGrC,QAAQ,gBAAgB;EAI1B,MAAMA,WAAoC;GACxC,GAAG;GAGH,GAAI,gBAAgB,gBAAgB,IAC/B,CAAC,cACF,gBAAgB,IAAI,QAAQ,gBAC1B,CAAC,gBAAgB,KACjB;GAGN,GAAG,MAAM,eAAe;GAGxB,GAAI,cAAc,QAAQ,gBAAgB,IACrC,CAAC,cACF,QAAQ,gBAAgB,gBACtB,CAAC,QAAQ,iBACT;GAEN,GAAG;;EAGL,MAAM,UAAU,OAAO;EACvB,MAAM,UAAU,SAAS;AAEzB,SAAO;GAEL,OAAO,SAAS,KAAK,MAAM,WAAW;IAEpC,MAAM;IAEN,KAAK,OAAO,SAAS,WAAW,QAAQ,SAAS,YAAY;IAE7D,aAAc,OAAO,SAAS,WAC1B;KACE,gBAAgB,SAAS,OAAO,SAAS;KACzC,eAAe,QAAQ;KACvB,SAAS;QAEX;;GAGN,iBAAiB;IACf,UAAU,YAAY,CAAC;IACvB,iBAAiB,YAAY,CAAC;IAC9B,eAAe,QAAQ,OAAO;IAC9B,SAAS;;GAGX,iBAAiB;IACf,UAAU,YAAY,CAAC;IACvB,iBAAiB,YAAY,CAAC;IAC9B,eAAe,QAAQ,OAAO;IAC9B,SAAS;;GAGX;GAEA;;IAED;EAAC;EAAe;EAAO;EAAU;EAAM;EAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"useScrollDirection-C2EmQi0U.js","names":[],"sources":["../src/utilities/hooks/useScrollDirection/useScrollDirection.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\n/**\n * A custom React hook that detects the vertical scroll direction of the page.\n *\n * @returns {'up' | 'down' | null} The current scroll direction. Returns `null` on the initial render.\n * The direction is only updated if the scroll distance exceeds a 5px threshold to prevent sensitivity to minor scroll jitter.\n */\nexport const useScrollDirection = () => {\n const [scrollDirection, setScrollDirection] = useState<'up' | 'down' | null>(null);\n useEffect(() => {\n let lastScrollY = window.pageYOffset;\n const updateScrollDirection = () => {\n const scrollY = window.pageYOffset;\n const direction = scrollY > lastScrollY ? 'down' : 'up';\n if (direction !== scrollDirection && (scrollY - lastScrollY > 5 || scrollY - lastScrollY < -5)) {\n setScrollDirection(direction);\n }\n lastScrollY = scrollY > 0 ? scrollY : 0;\n };\n window.addEventListener('scroll', updateScrollDirection);\n return () => window.removeEventListener('scroll', updateScrollDirection);\n }, [scrollDirection]);\n\n return scrollDirection;\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,qBAAqB,MAAM;CACtC,MAAM,CAAC,iBAAiB,mBAAmB,GAAG,SAA+B,KAAK;CAClF,UAAU,MAAM;EACd,IAAI,cAAc,OAAO;EACzB,MAAM,wBAAwB,MAAM;GAClC,MAAM,UAAU,OAAO;GACvB,MAAM,YAAY,UAAU,cAAc,SAAS;AACnD,OAAI,cAAc,oBAAoB,UAAU,cAAc,KAAK,UAAU,cAAc,KACzF,mBAAmB,UAAU;GAE/B,cAAc,UAAU,IAAI,UAAU;EACvC;EACD,OAAO,iBAAiB,UAAU,sBAAsB;AACxD,SAAO,MAAM,OAAO,oBAAoB,UAAU,sBAAsB;CACzE,GAAE,CAAC,eAAgB,EAAC;AAErB,QAAO;AACR"}
1
+ {"version":3,"file":"useScrollDirection-C2EmQi0U.js","names":[],"sources":["../src/utilities/hooks/useScrollDirection/useScrollDirection.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\n/**\n * A custom React hook that detects the vertical scroll direction of the page.\n *\n * @returns {'up' | 'down' | null} The current scroll direction. Returns `null` on the initial render.\n * The direction is only updated if the scroll distance exceeds a 5px threshold to prevent sensitivity to minor scroll jitter.\n */\nexport const useScrollDirection = () => {\n const [scrollDirection, setScrollDirection] = useState<'up' | 'down' | null>(null);\n useEffect(() => {\n let lastScrollY = window.pageYOffset;\n const updateScrollDirection = () => {\n const scrollY = window.pageYOffset;\n const direction = scrollY > lastScrollY ? 'down' : 'up';\n if (direction !== scrollDirection && (scrollY - lastScrollY > 5 || scrollY - lastScrollY < -5)) {\n setScrollDirection(direction);\n }\n lastScrollY = scrollY > 0 ? scrollY : 0;\n };\n window.addEventListener('scroll', updateScrollDirection);\n return () => window.removeEventListener('scroll', updateScrollDirection);\n }, [scrollDirection]);\n\n return scrollDirection;\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,2BAA2B;CACtC,MAAM,CAAC,iBAAiB,sBAAsB,SAA+B;AAC7E,iBAAgB;EACd,IAAI,cAAc,OAAO;EACzB,MAAM,8BAA8B;GAClC,MAAM,UAAU,OAAO;GACvB,MAAM,YAAY,UAAU,cAAc,SAAS;AACnD,OAAI,cAAc,oBAAoB,UAAU,cAAc,KAAK,UAAU,cAAc,IACzF,oBAAmB;AAErB,iBAAc,UAAU,IAAI,UAAU;;AAExC,SAAO,iBAAiB,UAAU;AAClC,eAAa,OAAO,oBAAoB,UAAU;IACjD,CAAC;AAEJ,QAAO"}
@@ -1,8 +1,8 @@
1
1
  import { UseCheckboxGroupOptions, useCheckboxGroup } from "../../useCheckboxGroup-D61FVz37.js";
2
2
  import { useIsomorphicLayoutEffect } from "../../useIsomorphicLayoutEffect-DYtMRdO-.js";
3
3
  import "../../types-Bga-EYiy.js";
4
- import { UsePaginationProps, usePagination } from "../../alert-footer-BS7TXc1g.js";
5
- import "../../dialog-trigger-context-ClG9UVsz.js";
4
+ import { UsePaginationProps, usePagination } from "../../alert-footer-DWZoQIek.js";
5
+ import "../../dialog-trigger-context-BxroyS54.js";
6
6
  import "../../drawer-trigger-context-CNBRwj7l.js";
7
7
  import "../../popover-trigger-context-8iojEYe0.js";
8
8
  import "../../dropdown-item-CGg_2cV1.js";
@@ -1,8 +1,8 @@
1
1
  import "../../../useCheckboxGroup-D61FVz37.js";
2
2
  import "../../../useIsomorphicLayoutEffect-DYtMRdO-.js";
3
3
  import "../../../types-Bga-EYiy.js";
4
- import { UsePaginationProps, usePagination } from "../../../alert-footer-BS7TXc1g.js";
5
- import "../../../dialog-trigger-context-ClG9UVsz.js";
4
+ import { UsePaginationProps, usePagination } from "../../../alert-footer-DWZoQIek.js";
5
+ import "../../../dialog-trigger-context-BxroyS54.js";
6
6
  import "../../../drawer-trigger-context-CNBRwj7l.js";
7
7
  import "../../../popover-trigger-context-8iojEYe0.js";
8
8
  import "../../../dropdown-item-CGg_2cV1.js";
@@ -1,8 +1,8 @@
1
1
  import { UseCheckboxGroupOptions, useCheckboxGroup } from "../useCheckboxGroup-D61FVz37.js";
2
2
  import { useIsomorphicLayoutEffect } from "../useIsomorphicLayoutEffect-DYtMRdO-.js";
3
3
  import "../types-Bga-EYiy.js";
4
- import { UsePaginationProps, usePagination } from "../alert-footer-BS7TXc1g.js";
5
- import "../dialog-trigger-context-ClG9UVsz.js";
4
+ import { UsePaginationProps, usePagination } from "../alert-footer-DWZoQIek.js";
5
+ import "../dialog-trigger-context-BxroyS54.js";
6
6
  import "../drawer-trigger-context-CNBRwj7l.js";
7
7
  import "../popover-trigger-context-8iojEYe0.js";
8
8
  import "../dropdown-item-CGg_2cV1.js";