@bi-digital/react 0.11.8 → 0.11.9

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 (123) hide show
  1. package/dist/{alert-footer-HPrijrP2.d.mts → alert-footer-B0RXYXcM.d.mts} +57 -4
  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/index.d.mts +1 -1
  5. package/dist/components/avatar/avatar.d.mts +1 -1
  6. package/dist/components/avatar/index.d.mts +1 -1
  7. package/dist/components/badge/badge.d.mts +1 -1
  8. package/dist/components/badge/index.d.mts +1 -1
  9. package/dist/components/button/button.d.mts +1 -1
  10. package/dist/components/button/index.d.mts +1 -1
  11. package/dist/components/card/card-action.d.mts +1 -1
  12. package/dist/components/card/card-actions.d.mts +1 -1
  13. package/dist/components/card/card-content.d.mts +1 -1
  14. package/dist/components/card/card-date.d.mts +1 -1
  15. package/dist/components/card/card-header.d.mts +1 -1
  16. package/dist/components/card/card-media.d.mts +1 -1
  17. package/dist/components/card/card.d.mts +1 -1
  18. package/dist/components/card/index.d.mts +1 -1
  19. package/dist/components/checkbox/checkbox-subsection.d.mts +1 -1
  20. package/dist/components/checkbox/checkbox.d.mts +1 -1
  21. package/dist/components/checkbox/index.d.mts +1 -1
  22. package/dist/components/chip/chip.d.mts +1 -1
  23. package/dist/components/chip/index.d.mts +1 -1
  24. package/dist/components/details/details-content.d.mts +1 -1
  25. package/dist/components/details/details-summary.d.mts +1 -1
  26. package/dist/components/details/details.d.mts +1 -1
  27. package/dist/components/details/index.d.mts +1 -1
  28. package/dist/components/dialog/dialog-close-button.d.mts +1 -1
  29. package/dist/components/dialog/dialog-content.d.mts +1 -1
  30. package/dist/components/dialog/dialog-footer.d.mts +1 -1
  31. package/dist/components/dialog/dialog-header.d.mts +1 -1
  32. package/dist/components/dialog/dialog-trigger.d.mts +1 -1
  33. package/dist/components/dialog/dialog.d.mts +1 -1
  34. package/dist/components/dialog/index.d.mts +1 -1
  35. package/dist/components/dropdown/dropdown-button.d.mts +1 -1
  36. package/dist/components/dropdown/dropdown-trigger-context.d.mts +1 -1
  37. package/dist/components/dropdown/dropdown-trigger.d.mts +1 -1
  38. package/dist/components/dropdown/dropdown.d.mts +1 -1
  39. package/dist/components/dropdown/index.d.mts +1 -1
  40. package/dist/components/field/field-affix.d.mts +1 -1
  41. package/dist/components/field/field-description.d.mts +1 -1
  42. package/dist/components/field/field.d.mts +1 -1
  43. package/dist/components/field/index.d.mts +1 -1
  44. package/dist/components/fieldset/fieldset-description.d.mts +1 -1
  45. package/dist/components/fieldset/fieldset-legend.d.mts +1 -1
  46. package/dist/components/fieldset/fieldset.d.mts +1 -1
  47. package/dist/components/fieldset/index.d.mts +1 -1
  48. package/dist/components/filter-group/filter-group.d.mts +1 -1
  49. package/dist/components/filter-group/index.d.mts +1 -1
  50. package/dist/components/footer/footer.d.mts +1 -1
  51. package/dist/components/footer/index.d.mts +1 -1
  52. package/dist/components/index.d.mts +2 -2
  53. package/dist/components/index.mjs +3 -1
  54. package/dist/components/input/index.d.mts +1 -1
  55. package/dist/components/input/input.d.mts +1 -1
  56. package/dist/components/label/index.d.mts +1 -1
  57. package/dist/components/label/label.d.mts +1 -1
  58. package/dist/components/link/index.d.mts +1 -1
  59. package/dist/components/link/link.d.mts +1 -1
  60. package/dist/components/logo/index.d.mts +1 -1
  61. package/dist/components/logo/logo.d.mts +1 -1
  62. package/dist/components/logo/logo.mjs +2 -1
  63. package/dist/components/logo/logo.mjs.map +1 -1
  64. package/dist/components/navbar/index.d.mts +1 -1
  65. package/dist/components/navbar/navbar.d.mts +1 -1
  66. package/dist/components/navbar/sub-navbar.d.mts +1 -1
  67. package/dist/components/pagination/index.d.mts +1 -1
  68. package/dist/components/pagination/pagination-button.d.mts +1 -1
  69. package/dist/components/pagination/pagination.d.mts +1 -1
  70. package/dist/components/popover/index.d.mts +1 -1
  71. package/dist/components/popover/popover-trigger.d.mts +1 -1
  72. package/dist/components/popover/popover.d.mts +1 -1
  73. package/dist/components/radio/index.d.mts +1 -1
  74. package/dist/components/radio/radio.d.mts +1 -1
  75. package/dist/components/search/index.d.mts +1 -1
  76. package/dist/components/search/search.d.mts +1 -1
  77. package/dist/components/select/index.d.mts +1 -1
  78. package/dist/components/select/select-optgroup.d.mts +1 -1
  79. package/dist/components/select/select-option.d.mts +1 -1
  80. package/dist/components/select/select.d.mts +1 -1
  81. package/dist/components/selectfield/index.d.mts +1 -1
  82. package/dist/components/selectfield/selectfield.d.mts +1 -1
  83. package/dist/components/skip-link/index.d.mts +1 -1
  84. package/dist/components/skip-link/skip-link.d.mts +1 -1
  85. package/dist/components/spinner/index.d.mts +1 -1
  86. package/dist/components/spinner/spinner.d.mts +1 -1
  87. package/dist/components/switch/index.d.mts +1 -1
  88. package/dist/components/switch/switch.d.mts +1 -1
  89. package/dist/components/tabs/index.d.mts +1 -1
  90. package/dist/components/tabs/tab.d.mts +1 -1
  91. package/dist/components/tabs/tabs-list.d.mts +1 -1
  92. package/dist/components/tabs/tabs-panel.d.mts +1 -1
  93. package/dist/components/tabs/tabs.d.mts +1 -1
  94. package/dist/components/textarea/index.d.mts +1 -1
  95. package/dist/components/textarea/textarea.d.mts +1 -1
  96. package/dist/components/textfield/index.d.mts +1 -1
  97. package/dist/components/textfield/textfield.d.mts +1 -1
  98. package/dist/components/tooltip/index.d.mts +2 -0
  99. package/dist/components/tooltip/index.mjs +2 -0
  100. package/dist/components/tooltip/tooltip.d.mts +2 -0
  101. package/dist/components/tooltip/tooltip.mjs +36 -0
  102. package/dist/components/tooltip/tooltip.mjs.map +1 -0
  103. package/dist/components/validation-message/index.d.mts +1 -1
  104. package/dist/components/validation-message/validation-message.d.mts +1 -1
  105. package/dist/index-Dc-SdpIe.d.mts +1 -0
  106. package/dist/main.d.mts +6 -6
  107. package/dist/main.mjs +2 -1
  108. package/dist/{types-CgAV-Uiu.d.mts → types-74lJC5tL.d.mts} +1 -1
  109. package/dist/{useIsElementAboveViewport-DmYCeDwm.d.mts → useIsElementAboveViewport-Cxt9TwLS.d.mts} +1 -1
  110. package/dist/{useMediaQuery-Cz0DvE8S.d.mts → useMediaQuery-Di0fXraw.d.mts} +1 -1
  111. package/dist/{useScrollDirection-CepdY5lA.d.mts → useScrollDirection-6pq5a8B3.d.mts} +1 -1
  112. package/dist/utilities/hooks/index.d.mts +4 -4
  113. package/dist/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.d.mts +1 -1
  114. package/dist/utilities/hooks/useMediaQuery/useMediaQuery.d.mts +1 -1
  115. package/dist/utilities/hooks/usePagination/usePagination.d.mts +1 -1
  116. package/dist/utilities/hooks/useScrollDirection/useScrollDirection.d.mts +1 -1
  117. package/dist/utilities/index.d.mts +5 -5
  118. package/dist/utilities/types.d.mts +1 -1
  119. package/dist/vanilla/index.mjs +1 -0
  120. package/dist/vanilla/tooltip/index.d.mts +1 -0
  121. package/dist/vanilla/tooltip/index.mjs +11 -0
  122. package/dist/vanilla/tooltip/index.mjs.map +1 -0
  123. package/package.json +4 -4
@@ -1,2 +1,2 @@
1
- import { L as Radio, R as RadioProps } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { B as RadioProps, z as Radio } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Radio, RadioProps };
@@ -1,2 +1,2 @@
1
- import { F as Search, I as SearchProps } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { L as Search, R as SearchProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Search, SearchProps };
@@ -1,2 +1,2 @@
1
- import { F as Search, I as SearchProps } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { L as Search, R as SearchProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Search, SearchProps };
@@ -1,2 +1,2 @@
1
- import { A as SelectOptgroupProps, M as SelectOptionProps, N as Select, P as SelectProps, j as SelectOption, k as SelectOptgroup } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { F as Select, I as SelectProps, M as SelectOptgroupProps, N as SelectOption, P as SelectOptionProps, j as SelectOptgroup } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Select, SelectOptgroup, SelectOptgroupProps, SelectOption, SelectOptionProps, SelectProps };
@@ -1,2 +1,2 @@
1
- import { A as SelectOptgroupProps, k as SelectOptgroup } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { M as SelectOptgroupProps, j as SelectOptgroup } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { SelectOptgroup, SelectOptgroupProps };
@@ -1,2 +1,2 @@
1
- import { M as SelectOptionProps, j as SelectOption } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { N as SelectOption, P as SelectOptionProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { SelectOption, SelectOptionProps };
@@ -1,2 +1,2 @@
1
- import { N as Select, P as SelectProps } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { F as Select, I as SelectProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Select, SelectProps };
@@ -1,2 +1,2 @@
1
- import { D as Selectfield, O as SelectfieldProps } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { A as SelectfieldProps, k as Selectfield } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Selectfield, SelectfieldProps };
@@ -1,2 +1,2 @@
1
- import { D as Selectfield, O as SelectfieldProps } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { A as SelectfieldProps, k as Selectfield } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Selectfield, SelectfieldProps };
@@ -1,2 +1,2 @@
1
- import { E as SkipLinkProps, T as SkipLink } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { SkipLink, SkipLinkProps };
@@ -1,2 +1,2 @@
1
- import { E as SkipLinkProps, T as SkipLink } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { SkipLink, SkipLinkProps };
@@ -1,2 +1,2 @@
1
- import { C as Spinner, w as SpinnerProps } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { E as SpinnerProps, T as Spinner } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Spinner, SpinnerProps };
@@ -1,2 +1,2 @@
1
- import { C as Spinner, w as SpinnerProps } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { E as SpinnerProps, T as Spinner } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Spinner, SpinnerProps };
@@ -1,2 +1,2 @@
1
- import { S as SwitchProps, x as Switch } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { C as Switch, w as SwitchProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Switch, SwitchProps };
@@ -1,2 +1,2 @@
1
- import { S as SwitchProps, x as Switch } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { C as Switch, w as SwitchProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Switch, SwitchProps };
@@ -1,2 +1,2 @@
1
- import { b as TabsProps, d as TabsPanel, f as TabsPanelProps, g as TabProps, h as Tab, m as TabsListProps, p as TabsList, v as Tabs, y as TabsContext } from "../../alert-footer-HPrijrP2.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-B0RXYXcM.mjs";
2
2
  export { Tab, TabProps, Tabs, TabsContext, TabsList, TabsListProps, TabsPanel, TabsPanelProps, TabsProps };
@@ -1,2 +1,2 @@
1
- import { g as TabProps, h as Tab } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { _ as Tab, v as TabProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Tab, TabProps };
@@ -1,2 +1,2 @@
1
- import { m as TabsListProps, p as TabsList } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { g as TabsListProps, h as TabsList } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { TabsList, TabsListProps };
@@ -1,2 +1,2 @@
1
- import { d as TabsPanel, f as TabsPanelProps } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { m as TabsPanelProps, p as TabsPanel } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { TabsPanel, TabsPanelProps };
@@ -1,2 +1,2 @@
1
- import { _ as Context, b as TabsProps, v as Tabs, y as TabsContext } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { S as TabsProps, b as Tabs, x as TabsContext, y as Context } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Context, Tabs, TabsContext, TabsProps };
@@ -1,2 +1,2 @@
1
- import { l as Textarea, u as TextareaProps } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { d as Textarea, f as TextareaProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Textarea, TextareaProps };
@@ -1,2 +1,2 @@
1
- import { l as Textarea, u as TextareaProps } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { d as Textarea, f as TextareaProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Textarea, TextareaProps };
@@ -1,2 +1,2 @@
1
- import { c as TextfieldProps, s as Textfield } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { l as Textfield, u as TextfieldProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Textfield, TextfieldProps };
@@ -1,2 +1,2 @@
1
- import { c as TextfieldProps, s as Textfield } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { l as Textfield, u as TextfieldProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { Textfield, TextfieldProps };
@@ -0,0 +1,2 @@
1
+ import { c as TooltipProps, s as Tooltip } from "../../alert-footer-B0RXYXcM.mjs";
2
+ export { Tooltip, TooltipProps };
@@ -0,0 +1,2 @@
1
+ import { Tooltip } from "./tooltip.mjs";
2
+ export { Tooltip };
@@ -0,0 +1,2 @@
1
+ import { c as TooltipProps, s as Tooltip } from "../../alert-footer-B0RXYXcM.mjs";
2
+ export { Tooltip, TooltipProps };
@@ -0,0 +1,36 @@
1
+ import "../../vanilla/tooltip/index.mjs";
2
+ import "@digdir/designsystemet-web";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/components/tooltip/tooltip.tsx
6
+ /**
7
+ * Tooltip component that displays a small piece of information on hover or focus.
8
+ *
9
+ * @example
10
+ * <Tooltip content='This is the tooltip content'>
11
+ * <button>Hover me</button>
12
+ * </Tooltip>
13
+ *
14
+ * @example
15
+ * <Tooltip content='This is the tooltip content'>
16
+ * Hover me
17
+ * </Tooltip>
18
+ */
19
+ const Tooltip = ({ children, content, placement = "top", disableAutoPlacement = false, ref, ...props }) => {
20
+ return /* @__PURE__ */ jsx(Slot, {
21
+ "data-tooltip": content,
22
+ "data-placement": placement,
23
+ "data-autoplacement": !disableAutoPlacement,
24
+ suppressHydrationWarning: true,
25
+ ref,
26
+ ...props,
27
+ children: typeof children === "string" ? /* @__PURE__ */ jsx("span", {
28
+ tabIndex: 0,
29
+ children
30
+ }) : children
31
+ });
32
+ };
33
+ //#endregion
34
+ export { Tooltip };
35
+
36
+ //# sourceMappingURL=tooltip.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.mjs","names":[],"sources":["../../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport '@digdir/designsystemet-web'; // Import ds-tooltip functionality\nimport type { HTMLAttributes, ReactElement, Ref, RefAttributes } from 'react';\nimport type { Placement } from '@floating-ui/dom';\nimport type { MergeRight } from '../../utilities';\nimport '../../vanilla/tooltip';\n\nexport type TooltipProps = MergeRight<\n HTMLAttributes<HTMLSpanElement>,\n {\n /**\n * The element or string that triggers the tooltip.\n *\n * Note: If it is a string, it will be wrapped in a span.\n * Note: If it is an element, it must be able to receive a ref.\n */\n children: (ReactElement & RefAttributes<HTMLSpanElement>) | string;\n /**\n * Content of the tooltip\n **/\n content: string;\n /**\n * Placement of the tooltip on the trigger.\n * @default 'top'\n */\n placement?: Placement;\n /**\n * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\n/**\n * Tooltip component that displays a small piece of information on hover or focus.\n *\n * @example\n * <Tooltip content='This is the tooltip content'>\n * <button>Hover me</button>\n * </Tooltip>\n *\n * @example\n * <Tooltip content='This is the tooltip content'>\n * Hover me\n * </Tooltip>\n */\nexport const Tooltip = ({\n children,\n content,\n placement = 'top',\n disableAutoPlacement = false,\n ref,\n ...props\n}: TooltipProps) => {\n return (\n <Slot\n data-tooltip={content}\n data-placement={placement}\n data-autoplacement={!disableAutoPlacement}\n suppressHydrationWarning // Since data-tooltip adds aria-label/aria-description\n ref={ref}\n {...props}\n >\n {/* oxlint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\n {typeof children === 'string' ? <span tabIndex={0}>{children}</span> : children}\n </Slot>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgDA,MAAa,WAAW,EACtB,UACA,SACA,YAAY,OACZ,uBAAuB,OACvB,KACA,GAAG,YACe;CAClB,OACE,oBAAC,MAAD;EACE,gBAAc;EACd,kBAAgB;EAChB,sBAAoB,CAAC;EACrB,0BAAA;EACK;EACL,GAAI;YAGH,OAAO,aAAa,WAAW,oBAAC,QAAD;GAAM,UAAU;GAAI;GAAgB,CAAA,GAAG;EAClE,CAAA"}
@@ -1,2 +1,2 @@
1
- import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { ValidationMessage, ValidationMessageProps };
@@ -1,2 +1,2 @@
1
- import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-HPrijrP2.mjs";
1
+ import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-B0RXYXcM.mjs";
2
2
  export { ValidationMessage, ValidationMessageProps };
@@ -0,0 +1 @@
1
+ export { };
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-DXCY5AxR.mjs";
3
- import { $ as FilterGroup, $t as Input, A as SelectOptgroupProps, At as DialogCloseButtonProps, B as PaginationButtonProps, Bt as DialogProps, C as Spinner, Ct as Dropdown, D as Selectfield, Dt as Popover, E as SkipLinkProps, Et as PopoverTriggerProps, F as Search, Ft as DialogHeader, G as Navbar, Gt as Details, H as PaginationProps, Ht as DetailsSummaryProps, I as SearchProps, It as DialogHeaderProps, J as LogoProps, Jt as ChipProps, K as NavbarProps, Kt as DetailsProps, L as Radio, Lt as DialogContent, M as SelectOptionProps, Mt as DialogTriggerProps, N as Select, Nt as DialogFooter, O as SelectfieldProps, Ot as PopoverProps, P as SelectProps, Pt as DialogFooterProps, Q as FooterProps, Qt as CheckboxProps, R as RadioProps, Rt as DialogContentProps, S as SwitchProps, Sn as AlertProps, St as DropdownButtonProps, T as SkipLink, Tt as PopoverTrigger, U as SubNavbar, Ut as DetailsContent, V as Pagination, Vt as DetailsSummary, W as SubNavbarProps, Wt as DetailsContentProps, X as LinkProps, Xt as CheckboxSubsectionProps, Y as Link, Yt as CheckboxSubsection, Z as Footer, Zt as Checkbox, _n as Badge, _t as DropdownTriggerContext, a as ValidationMessage, an as CardHeader, at as FieldsetDescription, b as TabsProps, bn as AvatarProps, bt as DropdownTriggerProps, c as TextfieldProps, cn as CardContentProps, ct as FieldsetProps, d as TabsPanel, dn as CardActions, dt as FieldAffixes, en as InputProps, et as FilterGroupProps, f as TabsPanelProps, fn as CardActionsProps, ft as FieldAffixesProps, g as TabProps, gn as ButtonProps, gt as FieldProps, h as Tab, hn as Button, ht as Field, i as usePagination, in as CardMediaProps, it as LabelProps, j as SelectOption, jt as DialogTrigger, k as SelectOptgroup, kt as DialogCloseButton, l as Textarea, ln as CardAction, lt as FieldAffix, m as TabsListProps, mn as CardProps, mt as FieldDescriptionProps, n as AlertFooterProps, nn as CardDateProps, nt as FieldsetLegendProps, o as ValidationMessageProps, on as CardHeaderProps, ot as FieldsetDescriptionProps, p as TabsList, pn as Card, pt as FieldDescription, q as Logo, qt as Chip, r as UsePaginationProps, rn as CardMedia, rt as Label, s as Textfield, sn as CardContent, st as Fieldset, t as AlertFooter, tn as CardDate, tt as FieldsetLegend, u as TextareaProps, un as CardActionProps, ut as FieldAffixProps, v as Tabs, vn as BadgeProps, vt as DropdownTriggerContextProps, w as SpinnerProps, wt as DropdownProps, x as Switch, xn as Alert, xt as DropdownButton, y as TabsContext, yn as Avatar, yt as DropdownTrigger, z as PaginationButton, zt as Dialog } from "./alert-footer-HPrijrP2.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-B0RXYXcM.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";
@@ -8,8 +8,8 @@ import { n as DropdownListProps, t as DropdownList } from "./dropdown-list-CaYz-
8
8
  import { n as FooterLinksProps, t as FooterLinks } from "./footer-links-DwBghNrz.mjs";
9
9
  import { n as PaginationItemProps, t as PaginationItem } from "./pagination-item-DJicBrIN.mjs";
10
10
  import { n as StickyHeaderProps, t as StickyHeader } from "./sticky-header-CVfE0TUC.mjs";
11
- import { t as useIsElementAboveViewport } from "./useIsElementAboveViewport-DmYCeDwm.mjs";
12
- import { t as useScrollDirection } from "./useScrollDirection-CepdY5lA.mjs";
13
- import { n as useMediaQuery, t as UseMediaQueryOptions } from "./useMediaQuery-Cz0DvE8S.mjs";
14
- import { t as MergeRight } from "./types-CgAV-Uiu.mjs";
15
- export { Alert, AlertFooter, AlertFooterProps, AlertProps, Avatar, AvatarProps, Badge, BadgeProps, Button, ButtonProps, Card, CardAction, CardActionProps, CardActions, CardActionsProps, CardContent, CardContentProps, CardDate, CardDateProps, CardHeader, CardHeaderProps, CardMedia, CardMediaProps, CardProps, Checkbox, CheckboxProps, CheckboxSubsection, CheckboxSubsectionProps, Chip, ChipProps, Context, Details, DetailsContent, DetailsContentProps, DetailsProps, DetailsSummary, DetailsSummaryProps, Dialog, DialogCloseButton, DialogCloseButtonProps, DialogContent, DialogContentProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogProps, DialogTrigger, DialogTriggerContext, DialogTriggerContextProps, DialogTriggerProps, Dropdown, DropdownButton, DropdownButtonProps, DropdownItem, DropdownItemProps, DropdownList, DropdownListProps, DropdownProps, DropdownTrigger, DropdownTriggerContext, DropdownTriggerContextProps, DropdownTriggerProps, Field, FieldAffix, FieldAffixProps, FieldAffixes, FieldAffixesProps, FieldDescription, FieldDescriptionProps, FieldProps, Fieldset, FieldsetDescription, FieldsetDescriptionProps, FieldsetLegend, FieldsetLegendProps, FieldsetProps, FilterGroup, FilterGroupProps, Footer, FooterLinks, FooterLinksProps, FooterProps, Input, InputProps, Label, LabelProps, Link, LinkProps, Logo, LogoProps, MergeRight, Navbar, NavbarProps, Pagination, PaginationButton, PaginationButtonProps, PaginationItem, PaginationItemProps, PaginationProps, Popover, PopoverProps, PopoverTrigger, PopoverTriggerContext, PopoverTriggerContextProps, PopoverTriggerProps, Radio, RadioProps, Search, SearchProps, Select, SelectOptgroup, SelectOptgroupProps, SelectOption, SelectOptionProps, SelectProps, Selectfield, SelectfieldProps, SkipLink, SkipLinkProps, Spinner, SpinnerProps, StickyHeader, StickyHeaderProps, SubNavbar, SubNavbarProps, Switch, SwitchProps, Tab, TabProps, Tabs, TabsContext, TabsList, TabsListProps, TabsPanel, TabsPanelProps, TabsProps, Textarea, TextareaProps, Textfield, TextfieldProps, UseCheckboxGroupOptions, UseMediaQueryOptions, UsePaginationProps, ValidationMessage, ValidationMessageProps, useCheckboxGroup, useIsElementAboveViewport, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useScrollDirection };
11
+ import { t as useIsElementAboveViewport } from "./useIsElementAboveViewport-Cxt9TwLS.mjs";
12
+ import { t as useScrollDirection } from "./useScrollDirection-6pq5a8B3.mjs";
13
+ import { n as useMediaQuery, t as UseMediaQueryOptions } from "./useMediaQuery-Di0fXraw.mjs";
14
+ import { t as MergeRight } from "./types-74lJC5tL.mjs";
15
+ export { Alert, AlertFooter, AlertFooterProps, AlertProps, Avatar, AvatarProps, Badge, BadgeProps, Button, ButtonProps, Card, CardAction, CardActionProps, CardActions, CardActionsProps, CardContent, CardContentProps, CardDate, CardDateProps, CardHeader, CardHeaderProps, CardMedia, CardMediaProps, CardProps, Checkbox, CheckboxProps, CheckboxSubsection, CheckboxSubsectionProps, Chip, ChipProps, Context, Details, DetailsContent, DetailsContentProps, DetailsProps, DetailsSummary, DetailsSummaryProps, Dialog, DialogCloseButton, DialogCloseButtonProps, DialogContent, DialogContentProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogProps, DialogTrigger, DialogTriggerContext, DialogTriggerContextProps, DialogTriggerProps, Dropdown, DropdownButton, DropdownButtonProps, DropdownItem, DropdownItemProps, DropdownList, DropdownListProps, DropdownProps, DropdownTrigger, DropdownTriggerContext, DropdownTriggerContextProps, DropdownTriggerProps, Field, FieldAffix, FieldAffixProps, FieldAffixes, FieldAffixesProps, FieldDescription, FieldDescriptionProps, FieldProps, Fieldset, FieldsetDescription, FieldsetDescriptionProps, FieldsetLegend, FieldsetLegendProps, FieldsetProps, FilterGroup, FilterGroupProps, Footer, FooterLinks, FooterLinksProps, FooterProps, Input, InputProps, Label, LabelProps, Link, LinkProps, Logo, LogoProps, MergeRight, Navbar, NavbarProps, Pagination, PaginationButton, PaginationButtonProps, PaginationItem, PaginationItemProps, PaginationProps, Popover, PopoverProps, PopoverTrigger, PopoverTriggerContext, PopoverTriggerContextProps, PopoverTriggerProps, Radio, RadioProps, Search, SearchProps, Select, SelectOptgroup, SelectOptgroupProps, SelectOption, SelectOptionProps, SelectProps, Selectfield, SelectfieldProps, SkipLink, SkipLinkProps, Spinner, SpinnerProps, StickyHeader, StickyHeaderProps, SubNavbar, SubNavbarProps, Switch, SwitchProps, Tab, TabProps, Tabs, TabsContext, TabsList, TabsListProps, TabsPanel, TabsPanelProps, TabsProps, Textarea, TextareaProps, Textfield, TextfieldProps, Tooltip, TooltipProps, UseCheckboxGroupOptions, UseMediaQueryOptions, UsePaginationProps, ValidationMessage, ValidationMessageProps, useCheckboxGroup, useIsElementAboveViewport, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useScrollDirection };
package/dist/main.mjs CHANGED
@@ -73,6 +73,7 @@ import { TabsList } from "./components/tabs/tabs-list.mjs";
73
73
  import { TabsPanel } from "./components/tabs/tabs-panel.mjs";
74
74
  import { Textarea } from "./components/textarea/textarea.mjs";
75
75
  import { Textfield } from "./components/textfield/textfield.mjs";
76
+ import { Tooltip } from "./components/tooltip/tooltip.mjs";
76
77
  import "./components/index.mjs";
77
78
  import "./utilities/index.mjs";
78
- export { Alert, AlertFooter, Avatar, Badge, Button, Card, CardAction, CardActions, CardContent, CardDate, CardHeader, CardMedia, Checkbox, CheckboxSubsection, Chip, Details, DetailsContent, DetailsSummary, Dialog, DialogCloseButton, DialogContent, DialogFooter, DialogHeader, DialogTrigger, DialogTriggerContext, Dropdown, DropdownButton, DropdownItem, DropdownList, DropdownTrigger, DropdownTriggerContext, Field, FieldAffix, FieldAffixes, FieldDescription, Fieldset, FieldsetDescription, FieldsetLegend, FilterGroup, Footer, FooterLinks, Input, Label, Link, Logo, Navbar, Pagination, PaginationButton, PaginationItem, Popover, PopoverTrigger, PopoverTriggerContext, Radio, Search, Select, SelectOptgroup, SelectOption, Selectfield, SkipLink, Spinner, StickyHeader, SubNavbar, Switch, Tab, Tabs, TabsList, TabsPanel, Textarea, Textfield, ValidationMessage, useCheckboxGroup, useIsElementAboveViewport, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useScrollDirection };
79
+ export { Alert, AlertFooter, Avatar, Badge, Button, Card, CardAction, CardActions, CardContent, CardDate, CardHeader, CardMedia, Checkbox, CheckboxSubsection, Chip, Details, DetailsContent, DetailsSummary, Dialog, DialogCloseButton, DialogContent, DialogFooter, DialogHeader, DialogTrigger, DialogTriggerContext, Dropdown, DropdownButton, DropdownItem, DropdownList, DropdownTrigger, DropdownTriggerContext, Field, FieldAffix, FieldAffixes, FieldDescription, Fieldset, FieldsetDescription, FieldsetLegend, FilterGroup, Footer, FooterLinks, Input, Label, Link, Logo, Navbar, Pagination, PaginationButton, PaginationItem, Popover, PopoverTrigger, PopoverTriggerContext, Radio, Search, Select, SelectOptgroup, SelectOption, Selectfield, SkipLink, Spinner, StickyHeader, SubNavbar, Switch, Tab, Tabs, TabsList, TabsPanel, Textarea, Textfield, Tooltip, ValidationMessage, useCheckboxGroup, useIsElementAboveViewport, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useScrollDirection };
@@ -6,4 +6,4 @@
6
6
  type MergeRight<T1, T2> = Omit<T1, keyof T2> & T2;
7
7
  //#endregion
8
8
  export { MergeRight as t };
9
- //# sourceMappingURL=types-CgAV-Uiu.d.mts.map
9
+ //# sourceMappingURL=types-74lJC5tL.d.mts.map
@@ -5,4 +5,4 @@ import { RefObject } from "react";
5
5
  declare const useIsElementAboveViewport: (elementRef: RefObject<HTMLElement | null>) => boolean;
6
6
  //#endregion
7
7
  export { useIsElementAboveViewport as t };
8
- //# sourceMappingURL=useIsElementAboveViewport-DmYCeDwm.d.mts.map
8
+ //# sourceMappingURL=useIsElementAboveViewport-Cxt9TwLS.d.mts.map
@@ -29,4 +29,4 @@ declare function useMediaQuery(query: string, {
29
29
  }?: UseMediaQueryOptions): boolean;
30
30
  //#endregion
31
31
  export { useMediaQuery as n, UseMediaQueryOptions as t };
32
- //# sourceMappingURL=useMediaQuery-Cz0DvE8S.d.mts.map
32
+ //# sourceMappingURL=useMediaQuery-Di0fXraw.d.mts.map
@@ -8,4 +8,4 @@
8
8
  declare const useScrollDirection: () => "up" | "down" | null;
9
9
  //#endregion
10
10
  export { useScrollDirection as t };
11
- //# sourceMappingURL=useScrollDirection-CepdY5lA.d.mts.map
11
+ //# sourceMappingURL=useScrollDirection-6pq5a8B3.d.mts.map
@@ -1,7 +1,7 @@
1
1
  import { r as useCheckboxGroup, t as UseCheckboxGroupOptions } from "../../useCheckboxGroup-Boc_tLJ3.mjs";
2
2
  import { t as useIsomorphicLayoutEffect } from "../../useIsomorphicLayoutEffect-DXCY5AxR.mjs";
3
- import { i as usePagination, r as UsePaginationProps } from "../../alert-footer-HPrijrP2.mjs";
4
- import { t as useIsElementAboveViewport } from "../../useIsElementAboveViewport-DmYCeDwm.mjs";
5
- import { t as useScrollDirection } from "../../useScrollDirection-CepdY5lA.mjs";
6
- import { n as useMediaQuery, t as UseMediaQueryOptions } from "../../useMediaQuery-Cz0DvE8S.mjs";
3
+ import { i as usePagination, r as UsePaginationProps } from "../../alert-footer-B0RXYXcM.mjs";
4
+ import { t as useIsElementAboveViewport } from "../../useIsElementAboveViewport-Cxt9TwLS.mjs";
5
+ import { t as useScrollDirection } from "../../useScrollDirection-6pq5a8B3.mjs";
6
+ import { n as useMediaQuery, t as UseMediaQueryOptions } from "../../useMediaQuery-Di0fXraw.mjs";
7
7
  export { UseCheckboxGroupOptions, UseMediaQueryOptions, UsePaginationProps, useCheckboxGroup, useIsElementAboveViewport, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useScrollDirection };
@@ -1,2 +1,2 @@
1
- import { t as useIsElementAboveViewport } from "../../../useIsElementAboveViewport-DmYCeDwm.mjs";
1
+ import { t as useIsElementAboveViewport } from "../../../useIsElementAboveViewport-Cxt9TwLS.mjs";
2
2
  export { useIsElementAboveViewport };
@@ -1,2 +1,2 @@
1
- import { n as useMediaQuery, t as UseMediaQueryOptions } from "../../../useMediaQuery-Cz0DvE8S.mjs";
1
+ import { n as useMediaQuery, t as UseMediaQueryOptions } from "../../../useMediaQuery-Di0fXraw.mjs";
2
2
  export { UseMediaQueryOptions, useMediaQuery };
@@ -1,2 +1,2 @@
1
- import { i as usePagination, r as UsePaginationProps } from "../../../alert-footer-HPrijrP2.mjs";
1
+ import { i as usePagination, r as UsePaginationProps } from "../../../alert-footer-B0RXYXcM.mjs";
2
2
  export { UsePaginationProps, usePagination };
@@ -1,2 +1,2 @@
1
- import { t as useScrollDirection } from "../../../useScrollDirection-CepdY5lA.mjs";
1
+ import { t as useScrollDirection } from "../../../useScrollDirection-6pq5a8B3.mjs";
2
2
  export { useScrollDirection };
@@ -1,8 +1,8 @@
1
1
  import { r as useCheckboxGroup, t as UseCheckboxGroupOptions } from "../useCheckboxGroup-Boc_tLJ3.mjs";
2
2
  import { t as useIsomorphicLayoutEffect } from "../useIsomorphicLayoutEffect-DXCY5AxR.mjs";
3
- import { i as usePagination, r as UsePaginationProps } from "../alert-footer-HPrijrP2.mjs";
4
- import { t as useIsElementAboveViewport } from "../useIsElementAboveViewport-DmYCeDwm.mjs";
5
- import { t as useScrollDirection } from "../useScrollDirection-CepdY5lA.mjs";
6
- import { n as useMediaQuery, t as UseMediaQueryOptions } from "../useMediaQuery-Cz0DvE8S.mjs";
7
- import { t as MergeRight } from "../types-CgAV-Uiu.mjs";
3
+ import { i as usePagination, r as UsePaginationProps } from "../alert-footer-B0RXYXcM.mjs";
4
+ import { t as useIsElementAboveViewport } from "../useIsElementAboveViewport-Cxt9TwLS.mjs";
5
+ import { t as useScrollDirection } from "../useScrollDirection-6pq5a8B3.mjs";
6
+ import { n as useMediaQuery, t as UseMediaQueryOptions } from "../useMediaQuery-Di0fXraw.mjs";
7
+ import { t as MergeRight } from "../types-74lJC5tL.mjs";
8
8
  export { MergeRight, UseCheckboxGroupOptions, UseMediaQueryOptions, UsePaginationProps, useCheckboxGroup, useIsElementAboveViewport, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useScrollDirection };
@@ -1,2 +1,2 @@
1
- import { t as MergeRight } from "../types-CgAV-Uiu.mjs";
1
+ import { t as MergeRight } from "../types-74lJC5tL.mjs";
2
2
  export { MergeRight };
@@ -1,4 +1,5 @@
1
1
  import { arrowPseudoElement, initPopover } from "./popover/index.mjs";
2
+ import "./tooltip/index.mjs";
2
3
  import { initDropdown } from "./dropdown/index.mjs";
3
4
  import { initSubNavbar } from "./sub-navbar/index.mjs";
4
5
  import "@digdir/designsystemet-web";
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,11 @@
1
+ import { setTooltipElement } from "@digdir/designsystemet-web";
2
+ //#region src/vanilla/tooltip/index.ts
3
+ if (typeof window !== "undefined") {
4
+ const biTooltip = document.createElement("div");
5
+ biTooltip.className = "bi-tooltip";
6
+ setTooltipElement(biTooltip);
7
+ }
8
+ //#endregion
9
+ export {};
10
+
11
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/vanilla/tooltip/index.ts"],"sourcesContent":["import { setTooltipElement } from '@digdir/designsystemet-web';\n\nif (typeof window !== 'undefined') {\n const biTooltip = document.createElement('div');\n biTooltip.className = 'bi-tooltip';\n setTooltipElement(biTooltip);\n}\n"],"mappings":";;AAEA,IAAI,OAAO,WAAW,aAAa;CACjC,MAAM,YAAY,SAAS,cAAc,MAAM;CAC/C,UAAU,YAAY;CACtB,kBAAkB,UAAU"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bi-digital/react",
3
3
  "type": "module",
4
- "version": "0.11.8",
4
+ "version": "0.11.9",
5
5
  "description": "React components from BI Digital",
6
6
  "author": "BI Digital",
7
7
  "homepage": "https://designsystem.bi.no/",
@@ -38,14 +38,14 @@
38
38
  "@radix-ui/react-slot": "^1.2.4",
39
39
  "@radix-ui/react-use-controllable-state": "^1.2.2",
40
40
  "clsx": "^2.1.1",
41
- "@bi-digital/icons": "0.11.8"
41
+ "@bi-digital/icons": "0.11.9"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/react": "^19.2.14",
45
45
  "@types/react-dom": "^19.2.3",
46
46
  "@vitest/browser-playwright": "^4.1.4",
47
47
  "@vitest/coverage-v8": "^4.1.4",
48
- "@vitest/expect": "^4.1.6",
48
+ "@vitest/expect": "^4.1.7",
49
49
  "playwright": "^1.60.0",
50
50
  "react": "^19.2.0",
51
51
  "react-dom": "^19.2.0",
@@ -56,7 +56,7 @@
56
56
  "peerDependencies": {
57
57
  "react": "^19",
58
58
  "react-dom": "^19",
59
- "@bi-digital/css": "0.11.8"
59
+ "@bi-digital/css": "0.11.9"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "tsdown",