@bi-digital/react 0.11.11 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/{alert-footer-uyWxrEuB.d.mts → alert-footer-Yb_zpMhd.d.mts} +16 -66
  2. package/dist/components/alert/alert-footer.d.mts +1 -1
  3. package/dist/components/alert/alert.d.mts +1 -1
  4. package/dist/components/alert/alert.mjs +6 -7
  5. package/dist/components/alert/alert.mjs.map +1 -1
  6. package/dist/components/alert/index.d.mts +1 -1
  7. package/dist/components/avatar/avatar.d.mts +1 -1
  8. package/dist/components/avatar/avatar.mjs +1 -3
  9. package/dist/components/avatar/avatar.mjs.map +1 -1
  10. package/dist/components/avatar/index.d.mts +1 -1
  11. package/dist/components/badge/badge.d.mts +1 -1
  12. package/dist/components/badge/badge.mjs +1 -3
  13. package/dist/components/badge/badge.mjs.map +1 -1
  14. package/dist/components/badge/index.d.mts +1 -1
  15. package/dist/components/button/button.d.mts +1 -1
  16. package/dist/components/button/button.mjs +1 -2
  17. package/dist/components/button/button.mjs.map +1 -1
  18. package/dist/components/button/index.d.mts +1 -1
  19. package/dist/components/card/card-action.d.mts +1 -1
  20. package/dist/components/card/card-action.mjs +1 -2
  21. package/dist/components/card/card-action.mjs.map +1 -1
  22. package/dist/components/card/card-actions.d.mts +1 -1
  23. package/dist/components/card/card-content.d.mts +1 -1
  24. package/dist/components/card/card-date.d.mts +1 -1
  25. package/dist/components/card/card-header.d.mts +1 -1
  26. package/dist/components/card/card-media.d.mts +1 -1
  27. package/dist/components/card/card.d.mts +1 -1
  28. package/dist/components/card/card.mjs +1 -3
  29. package/dist/components/card/card.mjs.map +1 -1
  30. package/dist/components/card/index.d.mts +1 -1
  31. package/dist/components/checkbox/checkbox-subsection.d.mts +1 -1
  32. package/dist/components/checkbox/checkbox-subsection.mjs +1 -2
  33. package/dist/components/checkbox/checkbox-subsection.mjs.map +1 -1
  34. package/dist/components/checkbox/checkbox.d.mts +1 -1
  35. package/dist/components/checkbox/checkbox.mjs +3 -3
  36. package/dist/components/checkbox/checkbox.mjs.map +1 -1
  37. package/dist/components/checkbox/index.d.mts +1 -1
  38. package/dist/components/chip/chip.d.mts +1 -1
  39. package/dist/components/chip/chip.mjs +1 -3
  40. package/dist/components/chip/chip.mjs.map +1 -1
  41. package/dist/components/chip/index.d.mts +1 -1
  42. package/dist/components/details/details-content.d.mts +1 -1
  43. package/dist/components/details/details-summary.d.mts +1 -1
  44. package/dist/components/details/details.d.mts +1 -1
  45. package/dist/components/details/details.mjs +1 -2
  46. package/dist/components/details/details.mjs.map +1 -1
  47. package/dist/components/details/index.d.mts +1 -1
  48. package/dist/components/dialog/dialog-close-button.d.mts +1 -1
  49. package/dist/components/dialog/dialog-content.d.mts +1 -1
  50. package/dist/components/dialog/dialog-footer.d.mts +1 -1
  51. package/dist/components/dialog/dialog-header.d.mts +1 -1
  52. package/dist/components/dialog/dialog-trigger.d.mts +1 -1
  53. package/dist/components/dialog/dialog.d.mts +1 -1
  54. package/dist/components/dialog/dialog.mjs +1 -2
  55. package/dist/components/dialog/dialog.mjs.map +1 -1
  56. package/dist/components/dialog/index.d.mts +1 -1
  57. package/dist/components/dropdown/dropdown-button.d.mts +1 -1
  58. package/dist/components/dropdown/dropdown-trigger-context.d.mts +1 -1
  59. package/dist/components/dropdown/dropdown-trigger.d.mts +1 -1
  60. package/dist/components/dropdown/dropdown.d.mts +1 -1
  61. package/dist/components/dropdown/index.d.mts +1 -1
  62. package/dist/components/field/field-affix.d.mts +1 -1
  63. package/dist/components/field/field-description.d.mts +1 -1
  64. package/dist/components/field/field.d.mts +1 -1
  65. package/dist/components/field/field.mjs +1 -2
  66. package/dist/components/field/field.mjs.map +1 -1
  67. package/dist/components/field/index.d.mts +1 -1
  68. package/dist/components/fieldset/fieldset-description.d.mts +1 -1
  69. package/dist/components/fieldset/fieldset-legend.d.mts +1 -1
  70. package/dist/components/fieldset/fieldset-legend.mjs +1 -2
  71. package/dist/components/fieldset/fieldset-legend.mjs.map +1 -1
  72. package/dist/components/fieldset/fieldset.d.mts +1 -1
  73. package/dist/components/fieldset/fieldset.mjs +1 -2
  74. package/dist/components/fieldset/fieldset.mjs.map +1 -1
  75. package/dist/components/fieldset/index.d.mts +1 -1
  76. package/dist/components/filter-group/filter-group.d.mts +1 -1
  77. package/dist/components/filter-group/filter-group.mjs +1 -2
  78. package/dist/components/filter-group/filter-group.mjs.map +1 -1
  79. package/dist/components/filter-group/index.d.mts +1 -1
  80. package/dist/components/footer/footer.d.mts +1 -1
  81. package/dist/components/footer/footer.mjs +1 -6
  82. package/dist/components/footer/footer.mjs.map +1 -1
  83. package/dist/components/footer/index.d.mts +1 -1
  84. package/dist/components/index.d.mts +1 -1
  85. package/dist/components/input/index.d.mts +1 -1
  86. package/dist/components/input/input.d.mts +1 -1
  87. package/dist/components/input/input.mjs +1 -2
  88. package/dist/components/input/input.mjs.map +1 -1
  89. package/dist/components/label/index.d.mts +1 -1
  90. package/dist/components/label/label.d.mts +1 -1
  91. package/dist/components/label/label.mjs +1 -2
  92. package/dist/components/label/label.mjs.map +1 -1
  93. package/dist/components/link/index.d.mts +1 -1
  94. package/dist/components/link/link.d.mts +1 -1
  95. package/dist/components/link/link.mjs +1 -2
  96. package/dist/components/link/link.mjs.map +1 -1
  97. package/dist/components/logo/index.d.mts +1 -1
  98. package/dist/components/logo/logo.d.mts +1 -1
  99. package/dist/components/logo/logo.mjs +2 -3
  100. package/dist/components/logo/logo.mjs.map +1 -1
  101. package/dist/components/navbar/index.d.mts +1 -1
  102. package/dist/components/navbar/navbar.d.mts +1 -1
  103. package/dist/components/navbar/navbar.mjs +3 -3
  104. package/dist/components/navbar/navbar.mjs.map +1 -1
  105. package/dist/components/navbar/sub-navbar.d.mts +1 -1
  106. package/dist/components/navbar/sub-navbar.mjs +2 -2
  107. package/dist/components/navbar/sub-navbar.mjs.map +1 -1
  108. package/dist/components/pagination/index.d.mts +1 -1
  109. package/dist/components/pagination/pagination-button.d.mts +1 -1
  110. package/dist/components/pagination/pagination.d.mts +1 -1
  111. package/dist/components/pagination/pagination.mjs +1 -2
  112. package/dist/components/pagination/pagination.mjs.map +1 -1
  113. package/dist/components/popover/index.d.mts +1 -1
  114. package/dist/components/popover/popover-trigger.d.mts +1 -1
  115. package/dist/components/popover/popover.d.mts +1 -1
  116. package/dist/components/popover/popover.mjs +1 -2
  117. package/dist/components/popover/popover.mjs.map +1 -1
  118. package/dist/components/radio/index.d.mts +1 -1
  119. package/dist/components/radio/radio.d.mts +1 -1
  120. package/dist/components/radio/radio.mjs +3 -3
  121. package/dist/components/radio/radio.mjs.map +1 -1
  122. package/dist/components/search/index.d.mts +1 -1
  123. package/dist/components/search/search.d.mts +1 -1
  124. package/dist/components/search/search.mjs +3 -4
  125. package/dist/components/search/search.mjs.map +1 -1
  126. package/dist/components/select/index.d.mts +1 -1
  127. package/dist/components/select/select-optgroup.d.mts +1 -1
  128. package/dist/components/select/select-option.d.mts +1 -1
  129. package/dist/components/select/select.d.mts +1 -1
  130. package/dist/components/select/select.mjs +1 -2
  131. package/dist/components/select/select.mjs.map +1 -1
  132. package/dist/components/selectfield/index.d.mts +1 -1
  133. package/dist/components/selectfield/selectfield.d.mts +1 -1
  134. package/dist/components/selectfield/selectfield.mjs +3 -3
  135. package/dist/components/selectfield/selectfield.mjs.map +1 -1
  136. package/dist/components/skip-link/index.d.mts +1 -1
  137. package/dist/components/skip-link/skip-link.d.mts +1 -1
  138. package/dist/components/skip-link/skip-link.mjs +1 -2
  139. package/dist/components/skip-link/skip-link.mjs.map +1 -1
  140. package/dist/components/spinner/index.d.mts +1 -1
  141. package/dist/components/spinner/spinner.d.mts +1 -1
  142. package/dist/components/switch/index.d.mts +1 -1
  143. package/dist/components/switch/switch.d.mts +1 -1
  144. package/dist/components/switch/switch.mjs +3 -3
  145. package/dist/components/switch/switch.mjs.map +1 -1
  146. package/dist/components/tabs/index.d.mts +1 -1
  147. package/dist/components/tabs/tab.d.mts +1 -1
  148. package/dist/components/tabs/tabs-list.d.mts +1 -1
  149. package/dist/components/tabs/tabs-panel.d.mts +1 -1
  150. package/dist/components/tabs/tabs.d.mts +1 -1
  151. package/dist/components/tabs/tabs.mjs +1 -2
  152. package/dist/components/tabs/tabs.mjs.map +1 -1
  153. package/dist/components/textarea/index.d.mts +1 -1
  154. package/dist/components/textarea/textarea.d.mts +1 -1
  155. package/dist/components/textarea/textarea.mjs +1 -2
  156. package/dist/components/textarea/textarea.mjs.map +1 -1
  157. package/dist/components/textfield/index.d.mts +1 -1
  158. package/dist/components/textfield/textfield.d.mts +1 -1
  159. package/dist/components/textfield/textfield.mjs +3 -4
  160. package/dist/components/textfield/textfield.mjs.map +1 -1
  161. package/dist/components/tooltip/index.d.mts +1 -1
  162. package/dist/components/tooltip/tooltip.d.mts +1 -1
  163. package/dist/components/validation-message/index.d.mts +1 -1
  164. package/dist/components/validation-message/validation-message.d.mts +1 -1
  165. package/dist/main.d.mts +1 -1
  166. package/dist/react-types.d.ts +34 -0
  167. package/dist/{types-BXsMIYrD.d.mts → types-C0q7hMe_.d.mts} +2 -8
  168. package/dist/types.d.mts +1 -1
  169. package/dist/utilities/hooks/index.d.mts +1 -1
  170. package/dist/utilities/hooks/usePagination/usePagination.d.mts +1 -1
  171. package/dist/utilities/index.d.mts +1 -1
  172. package/package.json +6 -3
@@ -1 +1 @@
1
- {"version":3,"file":"selectfield.mjs","names":[],"sources":["../../../src/components/selectfield/selectfield.tsx"],"sourcesContent":["import { useId, type ReactNode } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport { Field, FieldDescription } from '../field';\nimport { Label } from '../label';\nimport { Select, type SelectProps } from '../select';\nimport { ValidationMessage } from '../validation-message';\nimport { MergeRight } from '../../utilities';\n\nexport type SelectfieldProps = MergeRight<\n LabelRequiredProps & SelectProps,\n {\n /** Description */\n description?: ReactNode;\n /** Error message for field */\n error?: ReactNode;\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n }\n>;\n\nexport const Selectfield = ({\n children,\n 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,qBACpB,GAAG,YACmB;CACtB,MAAM,cAAc,OAAO;CAC3B,MAAM,gBAAgB,OAAO;CAC7B,MAAM,eAAe,OAAO;CAC5B,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;EAAoB,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,KAAA;CACzG,OACE,qBAAC,OAAD;EAAkB;EAAW,aAAW;EAAa;EAAkB;YAAvE;GACG,SAAS,oBAAC,OAAD;IAAO,SAAS;cAAK;IAAc,CAAA;GAC5C,eAAe,oBAAC,kBAAD;IAAkB,IAAI;cAAgB;IAA+B,CAAA;GACrF,oBAAC,QAAD;IACM;IACC;IACC;IACN,gBAAc,QAAQ,MAAM,IAAI,KAAA;IAChC,oBAAkB;IAClB,GAAI;IAEH;IACM,CAAA;GACR,CAAC,CAAC,SAAS,oBAAC,mBAAD;IAAmB,IAAI;cAAe;IAA0B,CAAA;GACtE"}
1
+ {"version":3,"file":"selectfield.mjs","names":[],"sources":["../../../src/components/selectfield/selectfield.tsx"],"sourcesContent":["import { useId, type ReactNode } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport { Field, FieldDescription } from '../field';\nimport { Label } from '../label';\nimport { Select, type SelectProps } from '../select';\nimport { ValidationMessage } from '../validation-message';\nimport { MergeRight } from '../../utilities';\n\nexport type SelectfieldProps = MergeRight<\n LabelRequiredProps & SelectProps,\n {\n /** Description */\n description?: ReactNode;\n /** Error message for field */\n error?: ReactNode;\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n }\n>;\n\nexport const Selectfield = ({\n children,\n label,\n description,\n error,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: SelectfieldProps) => {\n const generatedId = useId();\n const descriptionId = useId();\n const validationId = useId();\n const id = idProp || generatedId;\n\n const ariaDescribedBy =\n [description ? descriptionId : '', error ? validationId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n return (\n <Field className={className} data-color={color} data-color-scheme={colorScheme} style={style} fullwidth={fullwidth}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <Select\n id={id}\n ref={ref}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...props}\n >\n {children}\n </Select>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAqBA,MAAa,eAAe,EAC1B,UACA,OACA,aACA,OACA,OACA,WACA,WACA,KACA,IAAI,QACJ,cAAc,OACd,qBAAqB,aACrB,oBAAoB,qBACpB,GAAG,YACmB;CACtB,MAAM,cAAc,OAAO;CAC3B,MAAM,gBAAgB,OAAO;CAC7B,MAAM,eAAe,OAAO;CAC5B,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;EAAoB,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,KAAA;CACzG,OACE,qBAAC,OAAD;EAAkB;EAAW,cAAY;EAAO,qBAAmB;EAAoB;EAAkB;YAAzG;GACG,SAAS,oBAAC,OAAD;IAAO,SAAS;cAAK;IAAc,CAAA;GAC5C,eAAe,oBAAC,kBAAD;IAAkB,IAAI;cAAgB;IAA+B,CAAA;GACrF,oBAAC,QAAD;IACM;IACC;IACL,gBAAc,QAAQ,MAAM,IAAI,KAAA;IAChC,oBAAkB;IAClB,GAAI;IAEH;IACM,CAAA;GACR,CAAC,CAAC,SAAS,oBAAC,mBAAD;IAAmB,IAAI;cAAe;IAA0B,CAAA;GACtE"}
@@ -1,2 +1,2 @@
1
- import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { SkipLink, SkipLinkProps };
@@ -1,2 +1,2 @@
1
- import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { SkipLink, SkipLinkProps };
@@ -2,10 +2,9 @@ import clsx from "clsx/lite";
2
2
  import { Slot } from "@radix-ui/react-slot";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/components/skip-link/skip-link.tsx
5
- const SkipLink = ({ asChild, children, className, dark, ...props }) => {
5
+ const SkipLink = ({ asChild, children, className, ...props }) => {
6
6
  return /* @__PURE__ */ jsx(asChild ? Slot : "a", {
7
7
  className: clsx("bi-skip-link", className),
8
- "data-dark": dark,
9
8
  ...props,
10
9
  children
11
10
  });
@@ -1 +1 @@
1
- {"version":3,"file":"skip-link.mjs","names":[],"sources":["../../../src/components/skip-link/skip-link.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { AnchorHTMLAttributes, Ref } from 'react';\n\nexport type SkipLinkProps = MergeRight<\n DefaultProps & AsChildProps & AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n ref?: Ref<HTMLAnchorElement>;\n }\n>;\n\nexport const SkipLink = ({ asChild, children, className, 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,MAAM,GAAG,YAA2B;CAE3F,OACE,oBAFgB,UAAU,OAAO,KAEjC;EAAW,WAAW,KAAK,gBAAgB,UAAU;EAAE,aAAW;EAAM,GAAI;EACzE;EACS,CAAA"}
1
+ {"version":3,"file":"skip-link.mjs","names":[],"sources":["../../../src/components/skip-link/skip-link.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { AnchorHTMLAttributes, Ref } from 'react';\n\nexport type SkipLinkProps = MergeRight<\n DefaultProps & AsChildProps & AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n ref?: Ref<HTMLAnchorElement>;\n }\n>;\n\nexport const SkipLink = ({ asChild, children, className, ...props }: SkipLinkProps) => {\n const Component = asChild ? Slot : 'a';\n return (\n <Component className={clsx('bi-skip-link', className)} {...props}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAaA,MAAa,YAAY,EAAE,SAAS,UAAU,WAAW,GAAG,YAA2B;CAErF,OACE,oBAFgB,UAAU,OAAO,KAEjC;EAAW,WAAW,KAAK,gBAAgB,UAAU;EAAE,GAAI;EACxD;EACS,CAAA"}
@@ -1,2 +1,2 @@
1
- import { E as SpinnerProps, T as Spinner } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { E as SpinnerProps, T as Spinner } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { Spinner, SpinnerProps };
@@ -1,2 +1,2 @@
1
- import { E as SpinnerProps, T as Spinner } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { E as SpinnerProps, T as Spinner } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { Spinner, SpinnerProps };
@@ -1,2 +1,2 @@
1
- import { C as Switch, w as SwitchProps } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { C as Switch, w as SwitchProps } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { Switch, SwitchProps };
@@ -1,2 +1,2 @@
1
- import { C as Switch, w as SwitchProps } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { C as Switch, w as SwitchProps } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { Switch, SwitchProps };
@@ -6,10 +6,11 @@ import { Label } from "../label/label.mjs";
6
6
  import "../label/index.mjs";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/components/switch/switch.tsx
9
- const Switch = ({ dark, label, error, fullwidth, style, className, ref, id, position = "end", ...props }) => {
9
+ const Switch = ({ label, error, fullwidth, style, className, ref, id, "data-color": color, "data-color-scheme": colorScheme, position = "end", ...props }) => {
10
10
  return /* @__PURE__ */ jsx(Field, {
11
11
  className,
12
- "data-dark": dark,
12
+ "data-color": color,
13
+ "data-color-scheme": colorScheme,
13
14
  style,
14
15
  fullwidth,
15
16
  position,
@@ -20,7 +21,6 @@ const Switch = ({ dark, label, error, fullwidth, style, className, ref, id, posi
20
21
  id,
21
22
  ref,
22
23
  "aria-invalid": error || void 0,
23
- dark,
24
24
  ...props
25
25
  }), label && /* @__PURE__ */ jsx(Label, {
26
26
  weight: "medium",
@@ -1 +1 @@
1
- {"version":3,"file":"switch.mjs","names":[],"sources":["../../../src/components/switch/switch.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, type FieldProps } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type SwitchProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'> & Pick<FieldProps, 'position'>,\n {\n /** Label */\n label?: ReactNode;\n /** Add error indication to the switch. */\n error?: boolean;\n /** If true, the switch will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Switch = ({\n dark,\n label,\n error,\n fullwidth,\n style,\n className,\n ref,\n id,\n position = 'end',\n ...props\n}: SwitchProps) => {\n return (\n <Field className={className} data-dark={dark} style={style} fullwidth={fullwidth} position={position} asChild>\n <label>\n <Input\n role='switch'\n type='checkbox'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n dark={dark}\n {...props}\n />\n {label && (\n <Label weight='medium' htmlFor={id} asChild>\n <span>{label}</span>\n </Label>\n )}\n </label>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;AAqBA,MAAa,UAAU,EACrB,MACA,OACA,OACA,WACA,OACA,WACA,KACA,IACA,WAAW,OACX,GAAG,YACc;CACjB,OACE,oBAAC,OAAD;EAAkB;EAAW,aAAW;EAAa;EAAkB;EAAqB;EAAU,SAAA;YACpG,qBAAC,SAAD,EAAA,UAAA,CACE,oBAAC,OAAD;GACE,MAAK;GACL,MAAK;GACD;GACC;GACL,gBAAc,SAAS,KAAA;GACjB;GACN,GAAI;GACJ,CAAA,EACD,SACC,oBAAC,OAAD;GAAO,QAAO;GAAS,SAAS;GAAI,SAAA;aAClC,oBAAC,QAAD,EAAA,UAAO,OAAa,CAAA;GACd,CAAA,CAEJ,EAAA,CAAA;EACF,CAAA"}
1
+ {"version":3,"file":"switch.mjs","names":[],"sources":["../../../src/components/switch/switch.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, type FieldProps } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type SwitchProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'> & Pick<FieldProps, 'position'>,\n {\n /** Label */\n label?: ReactNode;\n /** Add error indication to the switch. */\n error?: boolean;\n /** If true, the switch will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Switch = ({\n label,\n error,\n fullwidth,\n style,\n className,\n ref,\n id,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n position = 'end',\n ...props\n}: SwitchProps) => {\n return (\n <Field\n className={className}\n data-color={color}\n data-color-scheme={colorScheme}\n style={style}\n fullwidth={fullwidth}\n position={position}\n asChild\n >\n <label>\n {/* oxlint-disable-next-line jsx-a11y/role-has-required-aria-props */}\n <Input role='switch' type='checkbox' id={id} ref={ref} aria-invalid={error || undefined} {...props} />\n {label && (\n <Label weight='medium' htmlFor={id} asChild>\n <span>{label}</span>\n </Label>\n )}\n </label>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;AAqBA,MAAa,UAAU,EACrB,OACA,OACA,WACA,OACA,WACA,KACA,IACA,cAAc,OACd,qBAAqB,aACrB,WAAW,OACX,GAAG,YACc;CACjB,OACE,oBAAC,OAAD;EACa;EACX,cAAY;EACZ,qBAAmB;EACZ;EACI;EACD;EACV,SAAA;YAEA,qBAAC,SAAD,EAAA,UAAA,CAEE,oBAAC,OAAD;GAAO,MAAK;GAAS,MAAK;GAAe;GAAS;GAAK,gBAAc,SAAS,KAAA;GAAW,GAAI;GAAS,CAAA,EACrG,SACC,oBAAC,OAAD;GAAO,QAAO;GAAS,SAAS;GAAI,SAAA;aAClC,oBAAC,QAAD,EAAA,UAAO,OAAa,CAAA;GACd,CAAA,CAEJ,EAAA,CAAA;EACF,CAAA"}
@@ -1,2 +1,2 @@
1
- import { S as TabsProps, _ as Tab, b as Tabs, g as TabsListProps, h as TabsList, m as TabsPanelProps, p as TabsPanel, v as TabProps, x as TabsContext } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { S as TabsProps, _ as Tab, b as Tabs, g as TabsListProps, h as TabsList, m as TabsPanelProps, p as TabsPanel, v as TabProps, x as TabsContext } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { Tab, TabProps, Tabs, TabsContext, TabsList, TabsListProps, TabsPanel, TabsPanelProps, TabsProps };
@@ -1,2 +1,2 @@
1
- import { _ as Tab, v as TabProps } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { _ as Tab, v as TabProps } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { Tab, TabProps };
@@ -1,2 +1,2 @@
1
- import { g as TabsListProps, h as TabsList } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { g as TabsListProps, h as TabsList } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { TabsList, TabsListProps };
@@ -1,2 +1,2 @@
1
- import { m as TabsPanelProps, p as TabsPanel } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { m as TabsPanelProps, p as TabsPanel } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { TabsPanel, TabsPanelProps };
@@ -1,2 +1,2 @@
1
- import { S as TabsProps, b as Tabs, x as TabsContext, y as Context } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { S as TabsProps, b as Tabs, x as TabsContext, y as Context } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { Context, Tabs, TabsContext, TabsProps };
@@ -6,7 +6,7 @@ import { createContext, useEffect, useId, useRef } from "react";
6
6
  import { useControllableState } from "@radix-ui/react-use-controllable-state";
7
7
  //#region src/components/tabs/tabs.tsx
8
8
  const Context = createContext({});
9
- const Tabs = ({ defaultValue, value: valueProp, onChange, children, className, dark, ref, ...props }) => {
9
+ const Tabs = ({ defaultValue, value: valueProp, onChange, children, className, ref, ...props }) => {
10
10
  const isControlled = valueProp !== void 0;
11
11
  const tabsRef = useRef(null);
12
12
  const isProgrammaticClick = useRef(false);
@@ -45,7 +45,6 @@ const Tabs = ({ defaultValue, value: valueProp, onChange, children, className, d
45
45
  suppressHydrationWarning: true,
46
46
  ref: mergedRefs,
47
47
  className: clsx("bi-tabs", className),
48
- "data-dark": dark ? "true" : "false",
49
48
  ...props,
50
49
  children
51
50
  })
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.mjs","names":[],"sources":["../../../src/components/tabs/tabs.tsx"],"sourcesContent":["import { createContext, useEffect, useId, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport type { DSTabsElement } from '@digdir/designsystemet-web';\nimport '@digdir/designsystemet-web'; // Import ds-tabs custom element\nimport clsx from 'clsx/lite';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\n\nexport type TabsProps = MergeRight<\n DefaultProps & HTMLAttributes<DSTabsElement>,\n {\n /** The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. */\n defaultValue?: string;\n /** The controlled value of the tab to activate. Should be used together with `onChange`. */\n value?: string;\n /** Event handler called when the value changes. */\n onChange?: (value: string) => void;\n ref?: Ref<DSTabsElement>;\n }\n>;\n\nexport type TabsContext = {\n isControlled?: boolean;\n currentValue?: string;\n onChange?: (value: string) => void;\n getPrefixedValue?: (value?: string) => string | undefined;\n};\n\nexport const Context = createContext<TabsContext>({});\n\nexport const Tabs = ({\n defaultValue,\n value: valueProp,\n onChange,\n children,\n className,\n dark,\n ref,\n ...props\n}: TabsProps) => {\n const isControlled = valueProp !== undefined;\n const tabsRef = useRef<DSTabsElement>(null);\n const isProgrammaticClick = useRef(false);\n const valuePrefix = useId(); // Used for generation of unique value-based ids for tabs and panels\n const mergedRefs = useMergeRefs([ref, tabsRef]);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange,\n defaultProp: defaultValue || '',\n caller: 'Tabs',\n });\n\n useEffect(() => {\n if (!tabsRef.current || valueProp === undefined) return;\n tabsRef.current?.tabList?.tabs?.forEach((tab) => {\n if (tab.getAttribute('data-value') === valueProp) {\n isProgrammaticClick.current = true;\n tab.click();\n isProgrammaticClick.current = false;\n }\n });\n }, [valueProp]);\n\n useEffect(() => {\n if (!isControlled && defaultValue && tabsRef.current) {\n tabsRef.current?.tabList?.tabs?.forEach((tab) => {\n const isSelected = tab.getAttribute('data-value') === defaultValue;\n tab.setAttribute('aria-selected', isSelected ? 'true' : 'false');\n });\n }\n // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps\n }, []);\n\n return (\n <Context\n value={{\n isControlled,\n currentValue: value,\n onChange: setValue,\n getPrefixedValue: (value?: string) => value && `${valuePrefix}-${value}`,\n }}\n >\n <ds-tabs\n suppressHydrationWarning // Since <ds-tablist> adds attributes\n ref={mergedRefs}\n className={clsx('bi-tabs', className)}\n data-dark={dark ? 'true' : 'false'}\n {...props}\n >\n {children}\n </ds-tabs>\n </Context>\n );\n};\n"],"mappings":";;;;;;;AA8BA,MAAa,UAAU,cAA2B,EAAE,CAAC;AAErD,MAAa,QAAQ,EACnB,cACA,OAAO,WACP,UACA,UACA,WACA,MACA,KACA,GAAG,YACY;CACf,MAAM,eAAe,cAAc,KAAA;CACnC,MAAM,UAAU,OAAsB,KAAK;CAC3C,MAAM,sBAAsB,OAAO,MAAM;CACzC,MAAM,cAAc,OAAO;CAC3B,MAAM,aAAa,aAAa,CAAC,KAAK,QAAQ,CAAC;CAC/C,MAAM,CAAC,OAAO,YAAY,qBAAqB;EAC7C,MAAM;EACN;EACA,aAAa,gBAAgB;EAC7B,QAAQ;EACT,CAAC;CAEF,gBAAgB;EACd,IAAI,CAAC,QAAQ,WAAW,cAAc,KAAA,GAAW;EACjD,QAAQ,SAAS,SAAS,MAAM,SAAS,QAAQ;GAC/C,IAAI,IAAI,aAAa,aAAa,KAAK,WAAW;IAChD,oBAAoB,UAAU;IAC9B,IAAI,OAAO;IACX,oBAAoB,UAAU;;IAEhC;IACD,CAAC,UAAU,CAAC;CAEf,gBAAgB;EACd,IAAI,CAAC,gBAAgB,gBAAgB,QAAQ,SAC3C,QAAQ,SAAS,SAAS,MAAM,SAAS,QAAQ;GAC/C,MAAM,aAAa,IAAI,aAAa,aAAa,KAAK;GACtD,IAAI,aAAa,iBAAiB,aAAa,SAAS,QAAQ;IAChE;IAGH,EAAE,CAAC;CAEN,OACE,oBAAC,SAAD;EACE,OAAO;GACL;GACA,cAAc;GACd,UAAU;GACV,mBAAmB,UAAmB,SAAS,GAAG,YAAY,GAAG;GAClE;YAED,oBAAC,WAAD;GACE,0BAAA;GACA,KAAK;GACL,WAAW,KAAK,WAAW,UAAU;GACrC,aAAW,OAAO,SAAS;GAC3B,GAAI;GAEH;GACO,CAAA;EACF,CAAA"}
1
+ {"version":3,"file":"tabs.mjs","names":[],"sources":["../../../src/components/tabs/tabs.tsx"],"sourcesContent":["import { createContext, useEffect, useId, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport type { DSTabsElement } from '@digdir/designsystemet-web';\nimport '@digdir/designsystemet-web'; // Import ds-tabs custom element\nimport clsx from 'clsx/lite';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\n\nexport type TabsProps = MergeRight<\n DefaultProps & HTMLAttributes<DSTabsElement>,\n {\n /** The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. */\n defaultValue?: string;\n /** The controlled value of the tab to activate. Should be used together with `onChange`. */\n value?: string;\n /** Event handler called when the value changes. */\n onChange?: (value: string) => void;\n ref?: Ref<DSTabsElement>;\n }\n>;\n\nexport type TabsContext = {\n isControlled?: boolean;\n currentValue?: string;\n onChange?: (value: string) => void;\n getPrefixedValue?: (value?: string) => string | undefined;\n};\n\nexport const Context = createContext<TabsContext>({});\n\nexport const Tabs = ({ defaultValue, value: valueProp, onChange, children, className, ref, ...props }: TabsProps) => {\n const isControlled = valueProp !== undefined;\n const tabsRef = useRef<DSTabsElement>(null);\n const isProgrammaticClick = useRef(false);\n const valuePrefix = useId(); // Used for generation of unique value-based ids for tabs and panels\n const mergedRefs = useMergeRefs([ref, tabsRef]);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange,\n defaultProp: defaultValue || '',\n caller: 'Tabs',\n });\n\n useEffect(() => {\n if (!tabsRef.current || valueProp === undefined) return;\n tabsRef.current?.tabList?.tabs?.forEach((tab) => {\n if (tab.getAttribute('data-value') === valueProp) {\n isProgrammaticClick.current = true;\n tab.click();\n isProgrammaticClick.current = false;\n }\n });\n }, [valueProp]);\n\n useEffect(() => {\n if (!isControlled && defaultValue && tabsRef.current) {\n tabsRef.current?.tabList?.tabs?.forEach((tab) => {\n const isSelected = tab.getAttribute('data-value') === defaultValue;\n tab.setAttribute('aria-selected', isSelected ? 'true' : 'false');\n });\n }\n // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps\n }, []);\n\n return (\n <Context\n value={{\n isControlled,\n currentValue: value,\n onChange: setValue,\n getPrefixedValue: (value?: string) => value && `${valuePrefix}-${value}`,\n }}\n >\n <ds-tabs\n suppressHydrationWarning // Since <ds-tablist> adds attributes\n ref={mergedRefs}\n className={clsx('bi-tabs', className)}\n {...props}\n >\n {children}\n </ds-tabs>\n </Context>\n );\n};\n"],"mappings":";;;;;;;AA8BA,MAAa,UAAU,cAA2B,EAAE,CAAC;AAErD,MAAa,QAAQ,EAAE,cAAc,OAAO,WAAW,UAAU,UAAU,WAAW,KAAK,GAAG,YAAuB;CACnH,MAAM,eAAe,cAAc,KAAA;CACnC,MAAM,UAAU,OAAsB,KAAK;CAC3C,MAAM,sBAAsB,OAAO,MAAM;CACzC,MAAM,cAAc,OAAO;CAC3B,MAAM,aAAa,aAAa,CAAC,KAAK,QAAQ,CAAC;CAC/C,MAAM,CAAC,OAAO,YAAY,qBAAqB;EAC7C,MAAM;EACN;EACA,aAAa,gBAAgB;EAC7B,QAAQ;EACT,CAAC;CAEF,gBAAgB;EACd,IAAI,CAAC,QAAQ,WAAW,cAAc,KAAA,GAAW;EACjD,QAAQ,SAAS,SAAS,MAAM,SAAS,QAAQ;GAC/C,IAAI,IAAI,aAAa,aAAa,KAAK,WAAW;IAChD,oBAAoB,UAAU;IAC9B,IAAI,OAAO;IACX,oBAAoB,UAAU;;IAEhC;IACD,CAAC,UAAU,CAAC;CAEf,gBAAgB;EACd,IAAI,CAAC,gBAAgB,gBAAgB,QAAQ,SAC3C,QAAQ,SAAS,SAAS,MAAM,SAAS,QAAQ;GAC/C,MAAM,aAAa,IAAI,aAAa,aAAa,KAAK;GACtD,IAAI,aAAa,iBAAiB,aAAa,SAAS,QAAQ;IAChE;IAGH,EAAE,CAAC;CAEN,OACE,oBAAC,SAAD;EACE,OAAO;GACL;GACA,cAAc;GACd,UAAU;GACV,mBAAmB,UAAmB,SAAS,GAAG,YAAY,GAAG;GAClE;YAED,oBAAC,WAAD;GACE,0BAAA;GACA,KAAK;GACL,WAAW,KAAK,WAAW,UAAU;GACrC,GAAI;GAEH;GACO,CAAA;EACF,CAAA"}
@@ -1,2 +1,2 @@
1
- import { d as Textarea, f as TextareaProps } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { d as Textarea, f as TextareaProps } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { Textarea, TextareaProps };
@@ -1,2 +1,2 @@
1
- import { d as Textarea, f as TextareaProps } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { d as Textarea, f as TextareaProps } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { Textarea, TextareaProps };
@@ -1,10 +1,9 @@
1
1
  import clsx from "clsx/lite";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/components/textarea/textarea.tsx
4
- const Textarea = ({ className, dark, size, ref, ...props }) => {
4
+ const Textarea = ({ className, size, ref, ...props }) => {
5
5
  return /* @__PURE__ */ jsx("textarea", {
6
6
  className: clsx("bi-input", className),
7
- "data-dark": dark,
8
7
  "data-size": size,
9
8
  ref,
10
9
  ...props
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.mjs","names":[],"sources":["../../../src/components/textarea/textarea.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, TextareaHTMLAttributes } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type TextareaProps = MergeRight<\n DefaultProps & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'prefix'>,\n {\n /**\n * Size of the textarea.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n ref?: Ref<HTMLTextAreaElement>;\n }\n>;\n\nexport const Textarea = ({ className, 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,KAAK,GAAG,YAA2B;CACnF,OAAO,oBAAC,YAAD;EAAU,WAAW,KAAK,YAAY,UAAU;EAAE,aAAW;EAAM,aAAW;EAAW;EAAK,GAAI;EAAS,CAAA"}
1
+ {"version":3,"file":"textarea.mjs","names":[],"sources":["../../../src/components/textarea/textarea.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, TextareaHTMLAttributes } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type TextareaProps = MergeRight<\n DefaultProps & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'prefix'>,\n {\n /**\n * Size of the textarea.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n ref?: Ref<HTMLTextAreaElement>;\n }\n>;\n\nexport const Textarea = ({ className, size, ref, ...props }: TextareaProps) => {\n return <textarea className={clsx('bi-input', className)} data-size={size} ref={ref} {...props} />;\n};\n"],"mappings":";;;AAiBA,MAAa,YAAY,EAAE,WAAW,MAAM,KAAK,GAAG,YAA2B;CAC7E,OAAO,oBAAC,YAAD;EAAU,WAAW,KAAK,YAAY,UAAU;EAAE,aAAW;EAAW;EAAK,GAAI;EAAS,CAAA"}
@@ -1,2 +1,2 @@
1
- import { l as Textfield, u as TextfieldProps } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { l as Textfield, u as TextfieldProps } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { Textfield, TextfieldProps };
@@ -1,2 +1,2 @@
1
- import { l as Textfield, u as TextfieldProps } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { l as Textfield, u as TextfieldProps } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { Textfield, TextfieldProps };
@@ -13,7 +13,7 @@ import "../textarea/index.mjs";
13
13
  import { jsx, jsxs } from "react/jsx-runtime";
14
14
  import { useId } from "react";
15
15
  //#region src/components/textfield/textfield.tsx
16
- const Textfield = ({ dark, label, description, error, multiline, prefix, suffix, style, className, fullwidth, ref, id: idProp, "aria-describedby": ariaDescribedByProp, ...props }) => {
16
+ const Textfield = ({ label, description, error, multiline, prefix, suffix, style, className, fullwidth, ref, id: idProp, "data-color": color, "data-color-scheme": colorScheme, "aria-describedby": ariaDescribedByProp, ...props }) => {
17
17
  const generatedId = useId();
18
18
  const descriptionId = useId();
19
19
  const validationId = useId();
@@ -25,7 +25,8 @@ const Textfield = ({ dark, label, description, error, multiline, prefix, suffix,
25
25
  ].join(" ").trim() || void 0;
26
26
  return /* @__PURE__ */ jsxs(Field, {
27
27
  className,
28
- "data-dark": dark,
28
+ "data-color": color,
29
+ "data-color-scheme": colorScheme,
29
30
  style,
30
31
  fullwidth,
31
32
  children: [
@@ -44,14 +45,12 @@ const Textfield = ({ dark, label, description, error, multiline, prefix, suffix,
44
45
  ref,
45
46
  "aria-invalid": Boolean(error) || void 0,
46
47
  "aria-describedby": ariaDescribedBy,
47
- dark,
48
48
  ...props
49
49
  }) : /* @__PURE__ */ jsx(Input, {
50
50
  id,
51
51
  ref,
52
52
  "aria-invalid": Boolean(error) || void 0,
53
53
  "aria-describedby": ariaDescribedBy,
54
- dark,
55
54
  ...props
56
55
  }),
57
56
  suffix && /* @__PURE__ */ jsx(FieldAffix, { children: suffix })
@@ -1 +1 @@
1
- {"version":3,"file":"textfield.mjs","names":[],"sources":["../../../src/components/textfield/textfield.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { DefaultProps, LabelRequiredProps } from '../../types';\nimport { Field, FieldAffix, FieldAffixes, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\nimport { Textarea, type TextareaProps } from '../textarea';\nimport { ValidationMessage } from '../validation-message';\n\ntype InputPropsFiltered = Omit<InputProps, 'prefix' | 'className' | 'style'>;\ntype TextareaPropsFiltered = Omit<TextareaProps, 'prefix' | 'className' | 'style'>;\n\ntype BaseTextfieldProps = LabelRequiredProps &\n DefaultProps & {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Prefix */\n prefix?: string;\n /** Suffix */\n suffix?: string;\n /** Error message for field */\n error?: ReactNode;\n /** `className` for the `Field` element */\n className?: InputProps['className'];\n /** `style` for the `Field` element */\n style?: InputProps['style'];\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n };\n\ntype TextfieldTextareaProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline: true;\n} & TextareaPropsFiltered;\n\ntype TextfieldInputProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline?: never | false;\n} & InputPropsFiltered;\n\nexport type TextfieldProps = BaseTextfieldProps & // We use either Textarea or Input props, depending on the `multiline` prop.\n (TextfieldTextareaProps | TextfieldInputProps) & {\n ref?: Ref<HTMLInputElement | HTMLTextAreaElement>;\n };\n\nexport const Textfield = ({\n 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":";;;;;;;;;;;;;;;AA+CA,MAAa,aAAa,EACxB,MACA,OACA,aACA,OACA,WACA,QACA,QACA,OACA,WACA,WACA,KACA,IAAI,QACJ,oBAAoB,qBACpB,GAAG,YACiB;CACpB,MAAM,cAAc,OAAO;CAC3B,MAAM,gBAAgB,OAAO;CAC7B,MAAM,eAAe,OAAO;CAC5B,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;EAAoB,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,KAAA;CACzG,OACE,qBAAC,OAAD;EAAkB;EAAW,aAAW;EAAa;EAAkB;YAAvE;GACG,SAAS,oBAAC,OAAD;IAAO,SAAS;cAAK;IAAc,CAAA;GAC5C,eAAe,oBAAC,kBAAD;IAAkB,IAAI;cAAgB;IAA+B,CAAA;GACrF,qBAAC,cAAD,EAAA,UAAA;IACG,UAAU,oBAAC,YAAD,EAAA,UAAa,QAAoB,CAAA;IAC3C,YACC,oBAAC,UAAD;KACM;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI,KAAA;KAChC,oBAAkB;KACZ;KACN,GAAK;KACL,CAAA,GAEF,oBAAC,OAAD;KACM;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI,KAAA;KAChC,oBAAkB;KACZ;KACN,GAAK;KACL,CAAA;IAEH,UAAU,oBAAC,YAAD,EAAA,UAAa,QAAoB,CAAA;IAC/B,EAAA,CAAA;GACd,CAAC,CAAC,SAAS,oBAAC,mBAAD;IAAmB,IAAI;cAAe;IAA0B,CAAA;GACtE"}
1
+ {"version":3,"file":"textfield.mjs","names":[],"sources":["../../../src/components/textfield/textfield.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { DefaultProps, LabelRequiredProps } from '../../types';\nimport { Field, FieldAffix, FieldAffixes, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\nimport { Textarea, type TextareaProps } from '../textarea';\nimport { ValidationMessage } from '../validation-message';\n\ntype InputPropsFiltered = Omit<InputProps, 'prefix' | 'className' | 'style'>;\ntype TextareaPropsFiltered = Omit<TextareaProps, 'prefix' | 'className' | 'style'>;\n\ntype BaseTextfieldProps = LabelRequiredProps &\n DefaultProps & {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Prefix */\n prefix?: string;\n /** Suffix */\n suffix?: string;\n /** Error message for field */\n error?: ReactNode;\n /** `className` for the `Field` element */\n className?: InputProps['className'];\n /** `style` for the `Field` element */\n style?: InputProps['style'];\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n };\n\ntype TextfieldTextareaProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline: true;\n} & TextareaPropsFiltered;\n\ntype TextfieldInputProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline?: never | false;\n} & InputPropsFiltered;\n\nexport type TextfieldProps = BaseTextfieldProps & // We use either Textarea or Input props, depending on the `multiline` prop.\n (TextfieldTextareaProps | TextfieldInputProps) & {\n ref?: Ref<HTMLInputElement | HTMLTextAreaElement>;\n };\n\nexport const Textfield = ({\n label,\n description,\n error,\n multiline,\n prefix,\n suffix,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: TextfieldProps) => {\n const generatedId = useId();\n const descriptionId = useId();\n const validationId = useId();\n const id = idProp || generatedId;\n\n const ariaDescribedBy =\n [description ? descriptionId : '', error ? validationId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n return (\n <Field className={className} data-color={color} data-color-scheme={colorScheme} style={style} fullwidth={fullwidth}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <FieldAffixes>\n {prefix && <FieldAffix>{prefix}</FieldAffix>}\n {multiline ? (\n <Textarea\n id={id}\n ref={ref as Ref<HTMLTextAreaElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...(props as TextareaPropsFiltered)}\n />\n ) : (\n <Input\n id={id}\n ref={ref as Ref<HTMLInputElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...(props as InputPropsFiltered)}\n />\n )}\n {suffix && <FieldAffix>{suffix}</FieldAffix>}\n </FieldAffixes>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AA+CA,MAAa,aAAa,EACxB,OACA,aACA,OACA,WACA,QACA,QACA,OACA,WACA,WACA,KACA,IAAI,QACJ,cAAc,OACd,qBAAqB,aACrB,oBAAoB,qBACpB,GAAG,YACiB;CACpB,MAAM,cAAc,OAAO;CAC3B,MAAM,gBAAgB,OAAO;CAC7B,MAAM,eAAe,OAAO;CAC5B,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;EAAoB,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,KAAA;CACzG,OACE,qBAAC,OAAD;EAAkB;EAAW,cAAY;EAAO,qBAAmB;EAAoB;EAAkB;YAAzG;GACG,SAAS,oBAAC,OAAD;IAAO,SAAS;cAAK;IAAc,CAAA;GAC5C,eAAe,oBAAC,kBAAD;IAAkB,IAAI;cAAgB;IAA+B,CAAA;GACrF,qBAAC,cAAD,EAAA,UAAA;IACG,UAAU,oBAAC,YAAD,EAAA,UAAa,QAAoB,CAAA;IAC3C,YACC,oBAAC,UAAD;KACM;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI,KAAA;KAChC,oBAAkB;KAClB,GAAK;KACL,CAAA,GAEF,oBAAC,OAAD;KACM;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI,KAAA;KAChC,oBAAkB;KAClB,GAAK;KACL,CAAA;IAEH,UAAU,oBAAC,YAAD,EAAA,UAAa,QAAoB,CAAA;IAC/B,EAAA,CAAA;GACd,CAAC,CAAC,SAAS,oBAAC,mBAAD;IAAmB,IAAI;cAAe;IAA0B,CAAA;GACtE"}
@@ -1,2 +1,2 @@
1
- import { c as TooltipProps, s as Tooltip } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { c as TooltipProps, s as Tooltip } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { Tooltip, TooltipProps };
@@ -1,2 +1,2 @@
1
- import { c as TooltipProps, s as Tooltip } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { c as TooltipProps, s as Tooltip } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { Tooltip, TooltipProps };
@@ -1,2 +1,2 @@
1
- import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { ValidationMessage, ValidationMessageProps };
@@ -1,2 +1,2 @@
1
- import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-uyWxrEuB.mjs";
1
+ import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { ValidationMessage, ValidationMessageProps };
package/dist/main.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { r as useCheckboxGroup, t as UseCheckboxGroupOptions } from "./useCheckboxGroup-Boc_tLJ3.mjs";
2
2
  import { t as useIsomorphicLayoutEffect } from "./useIsomorphicLayoutEffect-B2JpCiYW.mjs";
3
- import { $ as Footer, $t as Checkbox, A as SelectfieldProps, At as PopoverProps, B as RadioProps, Bt as DialogContentProps, C as Switch, Cn as Alert, Ct as DropdownButton, D as SkipLink, Dt as PopoverTrigger, E as SpinnerProps, Et as DropdownProps, F as Select, Ft as DialogFooter, G as SubNavbar, Gt as DetailsContent, H as PaginationButtonProps, Ht as DialogProps, I as SelectProps, It as DialogFooterProps, J as NavbarProps, Jt as DetailsProps, K as SubNavbarProps, Kt as DetailsContentProps, L as Search, Lt as DialogHeader, M as SelectOptgroupProps, Mt as DialogCloseButtonProps, N as SelectOption, Nt as DialogTrigger, O as SkipLinkProps, Ot as PopoverTriggerProps, P as SelectOptionProps, Pt as DialogTriggerProps, Q as LinkProps, Qt as CheckboxSubsectionProps, R as SearchProps, Rt as DialogHeaderProps, S as TabsProps, Sn as AvatarProps, St as DropdownTriggerProps, T as Spinner, Tt as Dropdown, U as Pagination, Ut as DetailsSummary, V as PaginationButton, Vt as Dialog, W as PaginationProps, Wt as DetailsSummaryProps, X as LogoProps, Xt as ChipProps, Y as Logo, Yt as Chip, Z as Link, Zt as CheckboxSubsection, _ as Tab, _n as Button, _t as Field, a as ValidationMessage, an as CardMedia, at as Label, b as Tabs, bn as BadgeProps, bt as DropdownTriggerContextProps, c as TooltipProps, cn as CardHeaderProps, ct as FieldsetDescriptionProps, d as Textarea, dn as CardAction, dt as FieldAffix, en as CheckboxProps, et as FooterProps, f as TextareaProps, fn as CardActionProps, ft as FieldAffixProps, g as TabsListProps, gn as CardProps, gt as FieldDescriptionProps, h as TabsList, hn as Card, ht as FieldDescription, i as usePagination, in as CardDateProps, it as FieldsetLegendProps, j as SelectOptgroup, jt as DialogCloseButton, k as Selectfield, kt as Popover, l as Textfield, ln as CardContent, lt as Fieldset, m as TabsPanelProps, mn as CardActionsProps, mt as FieldAffixesProps, n as AlertFooterProps, nn as InputProps, nt as FilterGroupProps, o as ValidationMessageProps, on as CardMediaProps, ot as LabelProps, p as TabsPanel, pn as CardActions, pt as FieldAffixes, q as Navbar, qt as Details, r as UsePaginationProps, rn as CardDate, rt as FieldsetLegend, s as Tooltip, sn as CardHeader, st as FieldsetDescription, t as AlertFooter, tn as Input, tt as FilterGroup, u as TextfieldProps, un as CardContentProps, ut as FieldsetProps, v as TabProps, vn as ButtonProps, vt as FieldProps, w as SwitchProps, wn as AlertProps, wt as DropdownButtonProps, x as TabsContext, xn as Avatar, xt as DropdownTrigger, yn as Badge, yt as DropdownTriggerContext, z as Radio, zt as DialogContent } from "./alert-footer-uyWxrEuB.mjs";
3
+ import { $ as Footer, $t as Checkbox, A as SelectfieldProps, At as PopoverProps, B as RadioProps, Bt as DialogContentProps, C as Switch, Cn as Alert, Ct as DropdownButton, D as SkipLink, Dt as PopoverTrigger, E as SpinnerProps, Et as DropdownProps, F as Select, Ft as DialogFooter, G as SubNavbar, Gt as DetailsContent, H as PaginationButtonProps, Ht as DialogProps, I as SelectProps, It as DialogFooterProps, J as NavbarProps, Jt as DetailsProps, K as SubNavbarProps, Kt as DetailsContentProps, L as Search, Lt as DialogHeader, M as SelectOptgroupProps, Mt as DialogCloseButtonProps, N as SelectOption, Nt as DialogTrigger, O as SkipLinkProps, Ot as PopoverTriggerProps, P as SelectOptionProps, Pt as DialogTriggerProps, Q as LinkProps, Qt as CheckboxSubsectionProps, R as SearchProps, Rt as DialogHeaderProps, S as TabsProps, Sn as AvatarProps, St as DropdownTriggerProps, T as Spinner, Tt as Dropdown, U as Pagination, Ut as DetailsSummary, V as PaginationButton, Vt as Dialog, W as PaginationProps, Wt as DetailsSummaryProps, X as LogoProps, Xt as ChipProps, Y as Logo, Yt as Chip, Z as Link, Zt as CheckboxSubsection, _ as Tab, _n as Button, _t as Field, a as ValidationMessage, an as CardMedia, at as Label, b as Tabs, bn as BadgeProps, bt as DropdownTriggerContextProps, c as TooltipProps, cn as CardHeaderProps, ct as FieldsetDescriptionProps, d as Textarea, dn as CardAction, dt as FieldAffix, en as CheckboxProps, et as FooterProps, f as TextareaProps, fn as CardActionProps, ft as FieldAffixProps, g as TabsListProps, gn as CardProps, gt as FieldDescriptionProps, h as TabsList, hn as Card, ht as FieldDescription, i as usePagination, in as CardDateProps, it as FieldsetLegendProps, j as SelectOptgroup, jt as DialogCloseButton, k as Selectfield, kt as Popover, l as Textfield, ln as CardContent, lt as Fieldset, m as TabsPanelProps, mn as CardActionsProps, mt as FieldAffixesProps, n as AlertFooterProps, nn as InputProps, nt as FilterGroupProps, o as ValidationMessageProps, on as CardMediaProps, ot as LabelProps, p as TabsPanel, pn as CardActions, pt as FieldAffixes, q as Navbar, qt as Details, r as UsePaginationProps, rn as CardDate, rt as FieldsetLegend, s as Tooltip, sn as CardHeader, st as FieldsetDescription, t as AlertFooter, tn as Input, tt as FilterGroup, u as TextfieldProps, un as CardContentProps, ut as FieldsetProps, v as TabProps, vn as ButtonProps, vt as FieldProps, w as SwitchProps, wn as AlertProps, wt as DropdownButtonProps, x as TabsContext, xn as Avatar, xt as DropdownTrigger, yn as Badge, yt as DropdownTriggerContext, z as Radio, zt as DialogContent } from "./alert-footer-Yb_zpMhd.mjs";
4
4
  import { n as DialogTriggerContext, r as DialogTriggerContextProps, t as Context } from "./dialog-trigger-context-DbUhxoNL.mjs";
5
5
  import { n as PopoverTriggerContext, r as PopoverTriggerContextProps } from "./popover-trigger-context-BLjAozBn.mjs";
6
6
  import { n as DropdownItemProps, t as DropdownItem } from "./dropdown-item-bA64wFOZ.mjs";
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The available color scheme options.
3
+ * - `'light'`: Use the light color scheme.
4
+ * - `'dark'`: Use the dark color scheme.
5
+ */
6
+ export type ColorScheme = 'light' | 'dark';
7
+ export type Colors = 'primary' | 'neutral' | 'info' | 'success' | 'warning' | 'alert';
8
+
9
+ declare global {
10
+ namespace React {
11
+ interface HTMLAttributes<T> {
12
+ /**
13
+ * Set the design system color.
14
+ */
15
+ 'data-color'?: Colors;
16
+ /**
17
+ * Set the design system color scheme.
18
+ * - `'light'`: Use the light color scheme.
19
+ * - `'dark'`: Use the dark color scheme.
20
+ */
21
+ 'data-color-scheme'?: ColorScheme;
22
+ }
23
+
24
+ // Make React support command attributes: https://github.com/facebook/react/issues/32478
25
+ interface ButtonHTMLAttributes<T> extends React.HTMLAttributes<T> {
26
+ /** https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#command */
27
+ command?: string;
28
+ /** https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#commandfor */
29
+ commandfor?: string;
30
+ }
31
+ }
32
+ }
33
+
34
+ export {};
@@ -1,13 +1,7 @@
1
1
  import { ReactNode } from "react";
2
2
 
3
3
  //#region src/types.d.ts
4
- type DefaultProps = {
5
- /**
6
- * Is the component displayed on a dark background.
7
- * @default false
8
- */
9
- dark?: boolean;
10
- };
4
+ type DefaultProps = {};
11
5
  type AsChildProps = {
12
6
  /**
13
7
  * Change the default rendered element for the one passed as a child, merging their props and behavior.
@@ -31,4 +25,4 @@ type LabelRequiredProps = {
31
25
  };
32
26
  //#endregion
33
27
  export { DefaultProps as n, LabelRequiredProps as r, AsChildProps as t };
34
- //# sourceMappingURL=types-BXsMIYrD.d.mts.map
28
+ //# sourceMappingURL=types-C0q7hMe_.d.mts.map
package/dist/types.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as DefaultProps, r as LabelRequiredProps, t as AsChildProps } from "./types-BXsMIYrD.mjs";
1
+ import { n as DefaultProps, r as LabelRequiredProps, t as AsChildProps } from "./types-C0q7hMe_.mjs";
2
2
  export { AsChildProps, DefaultProps, LabelRequiredProps };
@@ -1,6 +1,6 @@
1
1
  import { r as useCheckboxGroup, t as UseCheckboxGroupOptions } from "../../useCheckboxGroup-Boc_tLJ3.mjs";
2
2
  import { t as useIsomorphicLayoutEffect } from "../../useIsomorphicLayoutEffect-B2JpCiYW.mjs";
3
- import { i as usePagination, r as UsePaginationProps } from "../../alert-footer-uyWxrEuB.mjs";
3
+ import { i as usePagination, r as UsePaginationProps } from "../../alert-footer-Yb_zpMhd.mjs";
4
4
  import { t as useIsElementAboveViewport } from "../../useIsElementAboveViewport-Cxt9TwLS.mjs";
5
5
  import { t as useScrollDirection } from "../../useScrollDirection-6pq5a8B3.mjs";
6
6
  import { n as useMediaQuery, t as UseMediaQueryOptions } from "../../useMediaQuery-Di0fXraw.mjs";
@@ -1,2 +1,2 @@
1
- import { i as usePagination, r as UsePaginationProps } from "../../../alert-footer-uyWxrEuB.mjs";
1
+ import { i as usePagination, r as UsePaginationProps } from "../../../alert-footer-Yb_zpMhd.mjs";
2
2
  export { UsePaginationProps, usePagination };
@@ -1,6 +1,6 @@
1
1
  import { r as useCheckboxGroup, t as UseCheckboxGroupOptions } from "../useCheckboxGroup-Boc_tLJ3.mjs";
2
2
  import { t as useIsomorphicLayoutEffect } from "../useIsomorphicLayoutEffect-B2JpCiYW.mjs";
3
- import { i as usePagination, r as UsePaginationProps } from "../alert-footer-uyWxrEuB.mjs";
3
+ import { i as usePagination, r as UsePaginationProps } from "../alert-footer-Yb_zpMhd.mjs";
4
4
  import { t as useIsElementAboveViewport } from "../useIsElementAboveViewport-Cxt9TwLS.mjs";
5
5
  import { t as useScrollDirection } from "../useScrollDirection-6pq5a8B3.mjs";
6
6
  import { n as useMediaQuery, t as UseMediaQueryOptions } from "../useMediaQuery-Di0fXraw.mjs";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bi-digital/react",
3
3
  "type": "module",
4
- "version": "0.11.11",
4
+ "version": "0.12.1",
5
5
  "description": "React components from BI Digital",
6
6
  "author": "BI Digital",
7
7
  "homepage": "https://designsystem.bi.no/",
@@ -24,6 +24,9 @@
24
24
  "./vanilla": {
25
25
  "types": "./dist/vanilla/index.d.mts",
26
26
  "import": "./dist/vanilla/index.mjs"
27
+ },
28
+ "./react-types": {
29
+ "types": "./dist/react-types.d.ts"
27
30
  }
28
31
  },
29
32
  "files": [
@@ -38,7 +41,7 @@
38
41
  "@radix-ui/react-slot": "^1.3.0",
39
42
  "@radix-ui/react-use-controllable-state": "^1.2.2",
40
43
  "clsx": "^2.1.1",
41
- "@bi-digital/icons": "0.11.11"
44
+ "@bi-digital/icons": "0.12.1"
42
45
  },
43
46
  "devDependencies": {
44
47
  "@types/react": "^19.2.14",
@@ -56,7 +59,7 @@
56
59
  "peerDependencies": {
57
60
  "react": "^19",
58
61
  "react-dom": "^19",
59
- "@bi-digital/css": "0.11.11"
62
+ "@bi-digital/css": "0.12.1"
60
63
  },
61
64
  "scripts": {
62
65
  "build": "tsdown",