@bi-digital/react 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{alert-footer-42JbxJ0B.d.mts → alert-footer-D_kCDrhn.d.mts} +8 -108
- package/dist/components/alert/alert-footer.d.mts +1 -1
- package/dist/components/alert/alert.d.mts +1 -1
- package/dist/components/alert/index.d.mts +1 -1
- package/dist/components/avatar/avatar.d.mts +1 -1
- package/dist/components/avatar/index.d.mts +1 -1
- package/dist/components/badge/badge.d.mts +1 -1
- package/dist/components/badge/index.d.mts +1 -1
- package/dist/components/button/button.d.mts +1 -1
- package/dist/components/button/index.d.mts +1 -1
- package/dist/components/card/card-action.d.mts +1 -1
- package/dist/components/card/card-actions.d.mts +1 -1
- package/dist/components/card/card-content.d.mts +1 -1
- package/dist/components/card/card-date.d.mts +1 -1
- package/dist/components/card/card-header.d.mts +1 -1
- package/dist/components/card/card-media.d.mts +1 -1
- package/dist/components/card/card.d.mts +1 -1
- package/dist/components/card/index.d.mts +1 -1
- package/dist/components/checkbox/checkbox-subsection.d.mts +1 -1
- package/dist/components/checkbox/checkbox.d.mts +1 -1
- package/dist/components/checkbox/index.d.mts +1 -1
- package/dist/components/chip/chip.d.mts +1 -1
- package/dist/components/chip/index.d.mts +1 -1
- package/dist/components/details/details-content.d.mts +1 -1
- package/dist/components/details/details-summary.d.mts +1 -1
- package/dist/components/details/details.d.mts +1 -1
- package/dist/components/details/index.d.mts +1 -1
- package/dist/components/dialog/dialog-close-button.d.mts +1 -1
- package/dist/components/dialog/dialog-content.d.mts +1 -1
- package/dist/components/dialog/dialog-footer.d.mts +1 -1
- package/dist/components/dialog/dialog-header.d.mts +1 -1
- package/dist/components/dialog/dialog-trigger.d.mts +1 -1
- package/dist/components/dialog/dialog.d.mts +1 -1
- package/dist/components/dialog/index.d.mts +1 -1
- package/dist/components/dropdown/dropdown-button.d.mts +1 -1
- package/dist/components/dropdown/dropdown-item.d.mts +1 -1
- package/dist/components/dropdown/dropdown-list.d.mts +1 -1
- package/dist/components/dropdown/dropdown-trigger-context.d.mts +1 -1
- package/dist/components/dropdown/dropdown-trigger.d.mts +1 -1
- package/dist/components/dropdown/dropdown.d.mts +1 -1
- package/dist/components/dropdown/index.d.mts +3 -3
- package/dist/components/field/field-affix.d.mts +1 -1
- package/dist/components/field/field-description.d.mts +1 -1
- package/dist/components/field/field.d.mts +1 -1
- package/dist/components/field/index.d.mts +1 -1
- package/dist/components/fieldset/fieldset-description.d.mts +1 -1
- package/dist/components/fieldset/fieldset-legend.d.mts +1 -1
- package/dist/components/fieldset/fieldset.d.mts +1 -1
- package/dist/components/fieldset/index.d.mts +1 -1
- package/dist/components/filter-group/filter-group.d.mts +1 -1
- package/dist/components/filter-group/index.d.mts +1 -1
- package/dist/components/footer/footer-links.d.mts +1 -1
- package/dist/components/footer/footer.d.mts +1 -1
- package/dist/components/footer/index.d.mts +2 -2
- package/dist/components/index.d.mts +8 -9
- package/dist/components/index.mjs +1 -9
- package/dist/components/input/index.d.mts +1 -1
- package/dist/components/input/input.d.mts +1 -1
- package/dist/components/label/index.d.mts +1 -1
- package/dist/components/label/label.d.mts +1 -1
- package/dist/components/link/index.d.mts +1 -1
- package/dist/components/link/link.d.mts +1 -1
- package/dist/components/logo/index.d.mts +1 -1
- package/dist/components/logo/logo.d.mts +1 -1
- package/dist/components/navbar/index.d.mts +1 -1
- package/dist/components/navbar/navbar.d.mts +1 -1
- package/dist/components/navbar/sub-navbar.d.mts +1 -1
- package/dist/components/pagination/index.d.mts +2 -2
- package/dist/components/pagination/pagination-button.d.mts +1 -1
- package/dist/components/pagination/pagination-item.d.mts +1 -1
- package/dist/components/pagination/pagination.d.mts +1 -1
- package/dist/components/popover/index.d.mts +2 -2
- package/dist/components/popover/popover-trigger-context.d.mts +1 -1
- package/dist/components/popover/popover-trigger.d.mts +1 -1
- package/dist/components/popover/popover.d.mts +1 -1
- package/dist/components/radio/index.d.mts +1 -1
- package/dist/components/radio/radio.d.mts +1 -1
- package/dist/components/search/index.d.mts +1 -1
- package/dist/components/search/search.d.mts +1 -1
- package/dist/components/select/index.d.mts +1 -1
- package/dist/components/select/select-optgroup.d.mts +1 -1
- package/dist/components/select/select-option.d.mts +1 -1
- package/dist/components/select/select.d.mts +1 -1
- package/dist/components/selectfield/index.d.mts +1 -1
- package/dist/components/selectfield/selectfield.d.mts +1 -1
- package/dist/components/skip-link/index.d.mts +1 -1
- package/dist/components/skip-link/skip-link.d.mts +1 -1
- package/dist/components/spinner/index.d.mts +1 -1
- package/dist/components/spinner/spinner.d.mts +1 -1
- package/dist/components/sticky-header/index.d.mts +1 -1
- package/dist/components/sticky-header/sticky-header.d.mts +1 -1
- package/dist/components/switch/index.d.mts +1 -1
- package/dist/components/switch/switch.d.mts +1 -1
- package/dist/components/tabs/index.d.mts +1 -1
- package/dist/components/tabs/tab.d.mts +1 -1
- package/dist/components/tabs/tab.mjs +7 -3
- package/dist/components/tabs/tab.mjs.map +1 -1
- package/dist/components/tabs/tabs-list.d.mts +1 -1
- package/dist/components/tabs/tabs-panel.d.mts +1 -1
- package/dist/components/tabs/tabs.d.mts +1 -1
- package/dist/components/tabs/tabs.mjs +4 -3
- package/dist/components/tabs/tabs.mjs.map +1 -1
- package/dist/components/textarea/index.d.mts +1 -1
- package/dist/components/textarea/textarea.d.mts +1 -1
- package/dist/components/textfield/index.d.mts +1 -1
- package/dist/components/textfield/textfield.d.mts +1 -1
- package/dist/components/validation-message/index.d.mts +1 -1
- package/dist/components/validation-message/validation-message.d.mts +1 -1
- package/dist/{dropdown-item-B6MmulV_.d.mts → dropdown-item-aYyDctA9.d.mts} +1 -1
- package/dist/{dropdown-list-DKugDMKm.d.mts → dropdown-list-Dg3yJhKc.d.mts} +1 -1
- package/dist/{footer-links-Dac3-Emr.d.mts → footer-links-BiBVxNWE.d.mts} +1 -1
- package/dist/main.d.mts +12 -13
- package/dist/main.mjs +1 -8
- package/dist/{pagination-item-AQQSJ7GD.d.mts → pagination-item-BNyKs6wz.d.mts} +1 -1
- package/dist/{popover-trigger-context-BG1lPWXA.d.mts → popover-trigger-context-DTh-_AMm.d.mts} +1 -1
- package/dist/{sticky-header-C6gJlnzy.d.mts → sticky-header-CLZPboYg.d.mts} +1 -1
- package/dist/{types-74lJC5tL.d.mts → types-CgAV-Uiu.d.mts} +1 -1
- package/dist/{useIsElementAboveViewport-Cxt9TwLS.d.mts → useIsElementAboveViewport-DmYCeDwm.d.mts} +1 -1
- package/dist/{useMediaQuery-Di0fXraw.d.mts → useMediaQuery-Cz0DvE8S.d.mts} +1 -1
- package/dist/{useScrollDirection-6pq5a8B3.d.mts → useScrollDirection-CepdY5lA.d.mts} +1 -1
- package/dist/utilities/hooks/index.d.mts +4 -4
- package/dist/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.d.mts +1 -1
- package/dist/utilities/hooks/useMediaQuery/useMediaQuery.d.mts +1 -1
- package/dist/utilities/hooks/usePagination/usePagination.d.mts +1 -1
- package/dist/utilities/hooks/useScrollDirection/useScrollDirection.d.mts +1 -1
- package/dist/utilities/index.d.mts +5 -5
- package/dist/utilities/types.d.mts +1 -1
- package/package.json +9 -9
- package/dist/components/drawer/drawer-close-button.d.mts +0 -2
- package/dist/components/drawer/drawer-close-button.mjs +0 -15
- package/dist/components/drawer/drawer-close-button.mjs.map +0 -1
- package/dist/components/drawer/drawer-content.d.mts +0 -2
- package/dist/components/drawer/drawer-content.mjs +0 -17
- package/dist/components/drawer/drawer-content.mjs.map +0 -1
- package/dist/components/drawer/drawer-footer.d.mts +0 -2
- package/dist/components/drawer/drawer-footer.mjs +0 -17
- package/dist/components/drawer/drawer-footer.mjs.map +0 -1
- package/dist/components/drawer/drawer-header.d.mts +0 -2
- package/dist/components/drawer/drawer-header.mjs +0 -17
- package/dist/components/drawer/drawer-header.mjs.map +0 -1
- package/dist/components/drawer/drawer-trigger-context.d.mts +0 -2
- package/dist/components/drawer/drawer-trigger-context.mjs +0 -12
- package/dist/components/drawer/drawer-trigger-context.mjs.map +0 -1
- package/dist/components/drawer/drawer-trigger.d.mts +0 -2
- package/dist/components/drawer/drawer-trigger.mjs +0 -15
- package/dist/components/drawer/drawer-trigger.mjs.map +0 -1
- package/dist/components/drawer/drawer.d.mts +0 -2
- package/dist/components/drawer/drawer.mjs +0 -48
- package/dist/components/drawer/drawer.mjs.map +0 -1
- package/dist/components/drawer/index.d.mts +0 -3
- package/dist/components/drawer/index.mjs +0 -8
- package/dist/drawer-trigger-context-DxLBj5Xr.d.mts +0 -16
- /package/dist/{index-Dc-SdpIe.d.mts → index-D9zIjQH9.d.mts} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { G as Navbar, K as NavbarProps } from "../../alert-footer-
|
|
1
|
+
import { G as Navbar, K as NavbarProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Navbar, NavbarProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { U as SubNavbar, W as SubNavbarProps } from "../../alert-footer-
|
|
1
|
+
import { U as SubNavbar, W as SubNavbarProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { SubNavbar, SubNavbarProps };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { B as PaginationButtonProps, H as PaginationProps, V as Pagination, z as PaginationButton } from "../../alert-footer-
|
|
2
|
-
import { n as PaginationItemProps, t as PaginationItem } from "../../pagination-item-
|
|
1
|
+
import { B as PaginationButtonProps, H as PaginationProps, V as Pagination, z as PaginationButton } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
|
+
import { n as PaginationItemProps, t as PaginationItem } from "../../pagination-item-BNyKs6wz.mjs";
|
|
3
3
|
export { Pagination, PaginationButton, PaginationButtonProps, PaginationItem, PaginationItemProps, PaginationProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { B as PaginationButtonProps, z as PaginationButton } from "../../alert-footer-
|
|
1
|
+
import { B as PaginationButtonProps, z as PaginationButton } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { PaginationButton, PaginationButtonProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PaginationItemProps, t as PaginationItem } from "../../pagination-item-
|
|
1
|
+
import { n as PaginationItemProps, t as PaginationItem } from "../../pagination-item-BNyKs6wz.mjs";
|
|
2
2
|
export { PaginationItem, PaginationItemProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { H as PaginationProps, V as Pagination } from "../../alert-footer-
|
|
1
|
+
import { H as PaginationProps, V as Pagination } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Pagination, PaginationProps };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Dt as Popover, Et as PopoverTriggerProps, Ot as PopoverProps, Tt as PopoverTrigger } from "../../alert-footer-
|
|
2
|
-
import { n as PopoverTriggerContext, r as PopoverTriggerContextProps } from "../../popover-trigger-context-
|
|
1
|
+
import { Dt as Popover, Et as PopoverTriggerProps, Ot as PopoverProps, Tt as PopoverTrigger } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
|
+
import { n as PopoverTriggerContext, r as PopoverTriggerContextProps } from "../../popover-trigger-context-DTh-_AMm.mjs";
|
|
3
3
|
export { Popover, PopoverProps, PopoverTrigger, PopoverTriggerContext, PopoverTriggerContextProps, PopoverTriggerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PopoverTriggerContext, r as PopoverTriggerContextProps, t as Context } from "../../popover-trigger-context-
|
|
1
|
+
import { n as PopoverTriggerContext, r as PopoverTriggerContextProps, t as Context } from "../../popover-trigger-context-DTh-_AMm.mjs";
|
|
2
2
|
export { Context, PopoverTriggerContext, PopoverTriggerContextProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Et as PopoverTriggerProps, Tt as PopoverTrigger } from "../../alert-footer-
|
|
1
|
+
import { Et as PopoverTriggerProps, Tt as PopoverTrigger } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { PopoverTrigger, PopoverTriggerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Dt as Popover, Ot as PopoverProps } from "../../alert-footer-
|
|
1
|
+
import { Dt as Popover, Ot as PopoverProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Popover, PopoverProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { L as Radio, R as RadioProps } from "../../alert-footer-
|
|
1
|
+
import { L as Radio, R as RadioProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Radio, RadioProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { L as Radio, R as RadioProps } from "../../alert-footer-
|
|
1
|
+
import { L as Radio, R as RadioProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Radio, RadioProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { F as Search, I as SearchProps } from "../../alert-footer-
|
|
1
|
+
import { F as Search, I as SearchProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Search, SearchProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { F as Search, I as SearchProps } from "../../alert-footer-
|
|
1
|
+
import { F as Search, I as SearchProps } from "../../alert-footer-D_kCDrhn.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-
|
|
1
|
+
import { A as SelectOptgroupProps, M as SelectOptionProps, N as Select, P as SelectProps, j as SelectOption, k as SelectOptgroup } from "../../alert-footer-D_kCDrhn.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-
|
|
1
|
+
import { A as SelectOptgroupProps, k as SelectOptgroup } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { SelectOptgroup, SelectOptgroupProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { M as SelectOptionProps, j as SelectOption } from "../../alert-footer-
|
|
1
|
+
import { M as SelectOptionProps, j as SelectOption } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { SelectOption, SelectOptionProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { N as Select, P as SelectProps } from "../../alert-footer-
|
|
1
|
+
import { N as Select, P as SelectProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Select, SelectProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { D as Selectfield, O as SelectfieldProps } from "../../alert-footer-
|
|
1
|
+
import { D as Selectfield, O as SelectfieldProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Selectfield, SelectfieldProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { D as Selectfield, O as SelectfieldProps } from "../../alert-footer-
|
|
1
|
+
import { D as Selectfield, O as SelectfieldProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Selectfield, SelectfieldProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { E as SkipLinkProps, T as SkipLink } from "../../alert-footer-
|
|
1
|
+
import { E as SkipLinkProps, T as SkipLink } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { SkipLink, SkipLinkProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { E as SkipLinkProps, T as SkipLink } from "../../alert-footer-
|
|
1
|
+
import { E as SkipLinkProps, T as SkipLink } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { SkipLink, SkipLinkProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as Spinner, w as SpinnerProps } from "../../alert-footer-
|
|
1
|
+
import { C as Spinner, w as SpinnerProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Spinner, SpinnerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as Spinner, w as SpinnerProps } from "../../alert-footer-
|
|
1
|
+
import { C as Spinner, w as SpinnerProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Spinner, SpinnerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as StickyHeaderProps, t as StickyHeader } from "../../sticky-header-
|
|
1
|
+
import { n as StickyHeaderProps, t as StickyHeader } from "../../sticky-header-CLZPboYg.mjs";
|
|
2
2
|
export { StickyHeader, StickyHeaderProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as StickyHeaderProps, t as StickyHeader } from "../../sticky-header-
|
|
1
|
+
import { n as StickyHeaderProps, t as StickyHeader } from "../../sticky-header-CLZPboYg.mjs";
|
|
2
2
|
export { StickyHeader, StickyHeaderProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as SwitchProps, x as Switch } from "../../alert-footer-
|
|
1
|
+
import { S as SwitchProps, x as Switch } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Switch, SwitchProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as SwitchProps, x as Switch } from "../../alert-footer-
|
|
1
|
+
import { S as SwitchProps, x as Switch } from "../../alert-footer-D_kCDrhn.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-
|
|
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-D_kCDrhn.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-
|
|
1
|
+
import { g as TabProps, h as Tab } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Tab, TabProps };
|
|
@@ -3,16 +3,20 @@ import "@digdir/designsystemet-web";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { use } from "react";
|
|
5
5
|
//#region src/components/tabs/tab.tsx
|
|
6
|
-
const Tab = ({ value, children, dark, onClick, ref, ...props }) => {
|
|
7
|
-
const { onChange, getPrefixedValue,
|
|
6
|
+
const Tab = ({ value, children, dark, onClick, onClickCapture, ref, ...props }) => {
|
|
7
|
+
const { onChange, getPrefixedValue, isControlled, currentValue } = use(Context);
|
|
8
8
|
return /* @__PURE__ */ jsx("ds-tab", {
|
|
9
9
|
"aria-controls": props["aria-controls"] ?? getPrefixedValue?.(value),
|
|
10
10
|
"data-value": value,
|
|
11
11
|
"data-dark": dark,
|
|
12
12
|
ref,
|
|
13
13
|
suppressHydrationWarning: true,
|
|
14
|
+
onClickCapture: (e) => {
|
|
15
|
+
onClickCapture?.(e);
|
|
16
|
+
if (isControlled && currentValue !== value) e.preventDefault();
|
|
17
|
+
},
|
|
14
18
|
onClick: (e) => {
|
|
15
|
-
if (!
|
|
19
|
+
if (e.isTrusted || !isControlled || currentValue !== value) onChange?.(value);
|
|
16
20
|
onClick?.(e);
|
|
17
21
|
},
|
|
18
22
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab.mjs","names":[],"sources":["../../../src/components/tabs/tab.tsx"],"sourcesContent":["import type { DSTabElement } from '@digdir/designsystemet-web';\nimport { use, type HTMLAttributes, type Ref } from 'react';\nimport '@digdir/designsystemet-web'; // Import ds-tab custom element\nimport type { MergeRight } from '../../utilities';\nimport { DefaultProps } from '../../types';\nimport { Context } from './tabs';\n\nexport type TabProps = MergeRight<\n DefaultProps & HTMLAttributes<DSTabElement>,\n {\n /** A unique value that associates the trigger with a content. */\n value: string;\n ref?: Ref<DSTabElement>;\n }\n>;\n\nexport const Tab = ({ value, children, dark, onClick, ref, ...props }: TabProps) => {\n const { onChange, getPrefixedValue,
|
|
1
|
+
{"version":3,"file":"tab.mjs","names":[],"sources":["../../../src/components/tabs/tab.tsx"],"sourcesContent":["import type { DSTabElement } from '@digdir/designsystemet-web';\nimport { use, type HTMLAttributes, type Ref } from 'react';\nimport '@digdir/designsystemet-web'; // Import ds-tab custom element\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\nimport { Context } from './tabs';\n\nexport type TabProps = MergeRight<\n DefaultProps & HTMLAttributes<DSTabElement>,\n {\n /** A unique value that associates the trigger with a content. */\n value: string;\n ref?: Ref<DSTabElement>;\n }\n>;\n\nexport const Tab = ({ value, children, dark, onClick, onClickCapture, ref, ...props }: TabProps) => {\n const { onChange, getPrefixedValue, isControlled, currentValue } = use(Context);\n return (\n <ds-tab\n aria-controls={props['aria-controls'] ?? getPrefixedValue?.(value)}\n data-value={value}\n data-dark={dark}\n ref={ref}\n suppressHydrationWarning // Since <ds-tablist> adds attributes\n onClickCapture={(e: React.MouseEvent<DSTabElement>) => {\n onClickCapture?.(e);\n if (isControlled && currentValue !== value) {\n e.preventDefault();\n }\n }}\n onClick={(e: React.MouseEvent<DSTabElement>) => {\n if (e.isTrusted || !isControlled || currentValue !== value) {\n onChange?.(value); // Only call onChange for user interactions, not programmatic clicks used to sync controlled state\n }\n onClick?.(e);\n }}\n {...props}\n >\n {children}\n </ds-tab>\n );\n};\n"],"mappings":";;;;;AAgBA,MAAa,OAAO,EAAE,OAAO,UAAU,MAAM,SAAS,gBAAgB,KAAK,GAAG,YAAsB;CAClG,MAAM,EAAE,UAAU,kBAAkB,cAAc,iBAAiB,IAAI,QAAQ;AAC/E,QACE,oBAAC,UAAD;EACE,iBAAe,MAAM,oBAAoB,mBAAmB,MAAM;EAClE,cAAY;EACZ,aAAW;EACN;EACL,0BAAA;EACA,iBAAiB,MAAsC;AACrD,oBAAiB,EAAE;AACnB,OAAI,gBAAgB,iBAAiB,MACnC,GAAE,gBAAgB;;EAGtB,UAAU,MAAsC;AAC9C,OAAI,EAAE,aAAa,CAAC,gBAAgB,iBAAiB,MACnD,YAAW,MAAM;AAEnB,aAAU,EAAE;;EAEd,GAAI;EAEH;EACM,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { m as TabsListProps, p as TabsList } from "../../alert-footer-
|
|
1
|
+
import { m as TabsListProps, p as TabsList } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { TabsList, TabsListProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as TabsPanel, f as TabsPanelProps } from "../../alert-footer-
|
|
1
|
+
import { d as TabsPanel, f as TabsPanelProps } from "../../alert-footer-D_kCDrhn.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-
|
|
1
|
+
import { _ as Context, b as TabsProps, v as Tabs, y as TabsContext } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Context, Tabs, TabsContext, TabsProps };
|
|
@@ -7,6 +7,7 @@ import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
|
7
7
|
//#region src/components/tabs/tabs.tsx
|
|
8
8
|
const Context = createContext({});
|
|
9
9
|
const Tabs = ({ defaultValue, value: valueProp, onChange, children, className, dark, ref, ...props }) => {
|
|
10
|
+
const isControlled = valueProp !== void 0;
|
|
10
11
|
const tabsRef = useRef(null);
|
|
11
12
|
const isProgrammaticClick = useRef(false);
|
|
12
13
|
const valuePrefix = useId();
|
|
@@ -29,11 +30,11 @@ const Tabs = ({ defaultValue, value: valueProp, onChange, children, className, d
|
|
|
29
30
|
}, [valueProp]);
|
|
30
31
|
return /* @__PURE__ */ jsx(Context, {
|
|
31
32
|
value: {
|
|
32
|
-
|
|
33
|
+
isControlled,
|
|
34
|
+
currentValue: value,
|
|
33
35
|
defaultValue,
|
|
34
36
|
onChange: setValue,
|
|
35
|
-
getPrefixedValue: (value) => value && `${valuePrefix}-${value}
|
|
36
|
-
isProgrammaticClick
|
|
37
|
+
getPrefixedValue: (value) => value && `${valuePrefix}-${value}`
|
|
37
38
|
},
|
|
38
39
|
children: /* @__PURE__ */ jsx("ds-tabs", {
|
|
39
40
|
suppressHydrationWarning: true,
|
|
@@ -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
|
|
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 defaultValue?: 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 return (\n <Context\n value={{\n isControlled,\n currentValue: value,\n defaultValue,\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}\n {...props}\n >\n {children}\n </ds-tabs>\n </Context>\n );\n};\n"],"mappings":";;;;;;;AA+BA,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;AAEF,iBAAgB;AACd,MAAI,CAAC,QAAQ,WAAW,cAAc,KAAA,EAAW;AACjD,UAAQ,SAAS,SAAS,MAAM,SAAS,QAAQ;AAC/C,OAAI,IAAI,aAAa,aAAa,KAAK,WAAW;AAChD,wBAAoB,UAAU;AAC9B,QAAI,OAAO;AACX,wBAAoB,UAAU;;IAEhC;IACD,CAAC,UAAU,CAAC;AAEf,QACE,oBAAC,SAAD;EACE,OAAO;GACL;GACA,cAAc;GACd;GACA,UAAU;GACV,mBAAmB,UAAmB,SAAS,GAAG,YAAY,GAAG;GAClE;YAED,oBAAC,WAAD;GACE,0BAAA;GACA,KAAK;GACL,WAAW,KAAK,WAAW,UAAU;GACrC,aAAW;GACX,GAAI;GAEH;GACO,CAAA;EACF,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { l as Textarea, u as TextareaProps } from "../../alert-footer-
|
|
1
|
+
import { l as Textarea, u as TextareaProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Textarea, TextareaProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { l as Textarea, u as TextareaProps } from "../../alert-footer-
|
|
1
|
+
import { l as Textarea, u as TextareaProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Textarea, TextareaProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as TextfieldProps, s as Textfield } from "../../alert-footer-
|
|
1
|
+
import { c as TextfieldProps, s as Textfield } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Textfield, TextfieldProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as TextfieldProps, s as Textfield } from "../../alert-footer-
|
|
1
|
+
import { c as TextfieldProps, s as Textfield } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { Textfield, TextfieldProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-
|
|
1
|
+
import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { ValidationMessage, ValidationMessageProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-
|
|
1
|
+
import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { ValidationMessage, ValidationMessageProps };
|
|
@@ -11,4 +11,4 @@ declare const DropdownItem: ({
|
|
|
11
11
|
}: DropdownItemProps) => react_jsx_runtime0.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { DropdownItemProps as n, DropdownItem as t };
|
|
14
|
-
//# sourceMappingURL=dropdown-item-
|
|
14
|
+
//# sourceMappingURL=dropdown-item-aYyDctA9.d.mts.map
|
|
@@ -11,4 +11,4 @@ declare const DropdownList: ({
|
|
|
11
11
|
}: DropdownListProps) => react_jsx_runtime0.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { DropdownListProps as n, DropdownList as t };
|
|
14
|
-
//# sourceMappingURL=dropdown-list-
|
|
14
|
+
//# sourceMappingURL=dropdown-list-Dg3yJhKc.d.mts.map
|
|
@@ -17,4 +17,4 @@ declare const FooterLinks: ({
|
|
|
17
17
|
}: FooterLinksProps) => react_jsx_runtime0.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { FooterLinksProps as n, FooterLinks as t };
|
|
20
|
-
//# sourceMappingURL=footer-links-
|
|
20
|
+
//# sourceMappingURL=footer-links-BiBVxNWE.d.mts.map
|
package/dist/main.d.mts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
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
|
|
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-D_kCDrhn.mjs";
|
|
4
4
|
import { n as DialogTriggerContext, r as DialogTriggerContextProps, t as Context } from "./dialog-trigger-context-CAC7jh1K.mjs";
|
|
5
|
-
import { n as
|
|
6
|
-
import { n as
|
|
7
|
-
import { n as
|
|
8
|
-
import { n as
|
|
9
|
-
import { n as
|
|
10
|
-
import { n as
|
|
11
|
-
import {
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
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, Drawer, DrawerCloseButton, DrawerCloseButtonProps, DrawerContent, DrawerContentProps, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerProps, DrawerTrigger, DrawerTriggerContext, DrawerTriggerContextProps, DrawerTriggerProps, 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 };
|
|
5
|
+
import { n as PopoverTriggerContext, r as PopoverTriggerContextProps } from "./popover-trigger-context-DTh-_AMm.mjs";
|
|
6
|
+
import { n as DropdownItemProps, t as DropdownItem } from "./dropdown-item-aYyDctA9.mjs";
|
|
7
|
+
import { n as DropdownListProps, t as DropdownList } from "./dropdown-list-Dg3yJhKc.mjs";
|
|
8
|
+
import { n as FooterLinksProps, t as FooterLinks } from "./footer-links-BiBVxNWE.mjs";
|
|
9
|
+
import { n as PaginationItemProps, t as PaginationItem } from "./pagination-item-BNyKs6wz.mjs";
|
|
10
|
+
import { n as StickyHeaderProps, t as StickyHeader } from "./sticky-header-CLZPboYg.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 };
|
package/dist/main.mjs
CHANGED
|
@@ -29,13 +29,6 @@ import { DialogHeader } from "./components/dialog/dialog-header.mjs";
|
|
|
29
29
|
import { DialogFooter } from "./components/dialog/dialog-footer.mjs";
|
|
30
30
|
import { DialogTrigger } from "./components/dialog/dialog-trigger.mjs";
|
|
31
31
|
import { DialogCloseButton } from "./components/dialog/dialog-close-button.mjs";
|
|
32
|
-
import { Drawer } from "./components/drawer/drawer.mjs";
|
|
33
|
-
import { DrawerContent } from "./components/drawer/drawer-content.mjs";
|
|
34
|
-
import { DrawerHeader } from "./components/drawer/drawer-header.mjs";
|
|
35
|
-
import { DrawerFooter } from "./components/drawer/drawer-footer.mjs";
|
|
36
|
-
import { DrawerTrigger } from "./components/drawer/drawer-trigger.mjs";
|
|
37
|
-
import { DrawerTriggerContext } from "./components/drawer/drawer-trigger-context.mjs";
|
|
38
|
-
import { DrawerCloseButton } from "./components/drawer/drawer-close-button.mjs";
|
|
39
32
|
import { PopoverTriggerContext } from "./components/popover/popover-trigger-context.mjs";
|
|
40
33
|
import { Popover } from "./components/popover/popover.mjs";
|
|
41
34
|
import { PopoverTrigger } from "./components/popover/popover-trigger.mjs";
|
|
@@ -82,4 +75,4 @@ import { Textarea } from "./components/textarea/textarea.mjs";
|
|
|
82
75
|
import { Textfield } from "./components/textfield/textfield.mjs";
|
|
83
76
|
import "./components/index.mjs";
|
|
84
77
|
import "./utilities/index.mjs";
|
|
85
|
-
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,
|
|
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 };
|
|
@@ -18,4 +18,4 @@ declare const PaginationItem: ({
|
|
|
18
18
|
}: PaginationItemProps) => react_jsx_runtime0.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { PaginationItemProps as n, PaginationItem as t };
|
|
21
|
-
//# sourceMappingURL=pagination-item-
|
|
21
|
+
//# sourceMappingURL=pagination-item-BNyKs6wz.d.mts.map
|
package/dist/{popover-trigger-context-BG1lPWXA.d.mts → popover-trigger-context-DTh-_AMm.d.mts}
RENAMED
|
@@ -40,4 +40,4 @@ declare const PopoverTriggerContext: ({
|
|
|
40
40
|
}: PopoverTriggerContextProps) => react_jsx_runtime0.JSX.Element;
|
|
41
41
|
//#endregion
|
|
42
42
|
export { PopoverTriggerContext as n, PopoverTriggerContextProps as r, Context as t };
|
|
43
|
-
//# sourceMappingURL=popover-trigger-context-
|
|
43
|
+
//# sourceMappingURL=popover-trigger-context-DTh-_AMm.d.mts.map
|
|
@@ -16,4 +16,4 @@ declare const StickyHeader: ({
|
|
|
16
16
|
}: StickyHeaderProps) => react_jsx_runtime0.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { StickyHeaderProps as n, StickyHeader as t };
|
|
19
|
-
//# sourceMappingURL=sticky-header-
|
|
19
|
+
//# sourceMappingURL=sticky-header-CLZPboYg.d.mts.map
|
package/dist/{useIsElementAboveViewport-Cxt9TwLS.d.mts → useIsElementAboveViewport-DmYCeDwm.d.mts}
RENAMED
|
@@ -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-
|
|
8
|
+
//# sourceMappingURL=useIsElementAboveViewport-DmYCeDwm.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-
|
|
32
|
+
//# sourceMappingURL=useMediaQuery-Cz0DvE8S.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-
|
|
4
|
-
import { t as useIsElementAboveViewport } from "../../useIsElementAboveViewport-
|
|
5
|
-
import { t as useScrollDirection } from "../../useScrollDirection-
|
|
6
|
-
import { n as useMediaQuery, t as UseMediaQueryOptions } from "../../useMediaQuery-
|
|
3
|
+
import { i as usePagination, r as UsePaginationProps } from "../../alert-footer-D_kCDrhn.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
7
|
export { UseCheckboxGroupOptions, UseMediaQueryOptions, UsePaginationProps, useCheckboxGroup, useIsElementAboveViewport, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useScrollDirection };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as useIsElementAboveViewport } from "../../../useIsElementAboveViewport-
|
|
1
|
+
import { t as useIsElementAboveViewport } from "../../../useIsElementAboveViewport-DmYCeDwm.mjs";
|
|
2
2
|
export { useIsElementAboveViewport };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as useMediaQuery, t as UseMediaQueryOptions } from "../../../useMediaQuery-
|
|
1
|
+
import { n as useMediaQuery, t as UseMediaQueryOptions } from "../../../useMediaQuery-Cz0DvE8S.mjs";
|
|
2
2
|
export { UseMediaQueryOptions, useMediaQuery };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as usePagination, r as UsePaginationProps } from "../../../alert-footer-
|
|
1
|
+
import { i as usePagination, r as UsePaginationProps } from "../../../alert-footer-D_kCDrhn.mjs";
|
|
2
2
|
export { UsePaginationProps, usePagination };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as useScrollDirection } from "../../../useScrollDirection-
|
|
1
|
+
import { t as useScrollDirection } from "../../../useScrollDirection-CepdY5lA.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-
|
|
4
|
-
import { t as useIsElementAboveViewport } from "../useIsElementAboveViewport-
|
|
5
|
-
import { t as useScrollDirection } from "../useScrollDirection-
|
|
6
|
-
import { n as useMediaQuery, t as UseMediaQueryOptions } from "../useMediaQuery-
|
|
7
|
-
import { t as MergeRight } from "../types-
|
|
3
|
+
import { i as usePagination, r as UsePaginationProps } from "../alert-footer-D_kCDrhn.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";
|
|
8
8
|
export { MergeRight, UseCheckboxGroupOptions, UseMediaQueryOptions, UsePaginationProps, useCheckboxGroup, useIsElementAboveViewport, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useScrollDirection };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as MergeRight } from "../types-
|
|
1
|
+
import { t as MergeRight } from "../types-CgAV-Uiu.mjs";
|
|
2
2
|
export { MergeRight };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bi-digital/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"description": "React components from BI Digital",
|
|
6
6
|
"author": "BI Digital",
|
|
7
7
|
"homepage": "https://designsystem.bi.no/",
|
|
@@ -33,31 +33,31 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@digdir/designsystemet-web": "^1.
|
|
36
|
+
"@digdir/designsystemet-web": "^1.13.0",
|
|
37
37
|
"@floating-ui/dom": "^1.7.6",
|
|
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.
|
|
41
|
+
"@bi-digital/icons": "0.11.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/react": "^19.2.14",
|
|
45
45
|
"@types/react-dom": "^19.2.3",
|
|
46
|
-
"@vitest/browser-playwright": "^4.0
|
|
47
|
-
"@vitest/coverage-v8": "^4.0
|
|
48
|
-
"@vitest/expect": "^4.0
|
|
46
|
+
"@vitest/browser-playwright": "^4.1.0",
|
|
47
|
+
"@vitest/coverage-v8": "^4.1.0",
|
|
48
|
+
"@vitest/expect": "^4.1.0",
|
|
49
49
|
"playwright": "^1.58.2",
|
|
50
50
|
"react": "^19.2.0",
|
|
51
51
|
"react-dom": "^19.2.0",
|
|
52
52
|
"tsconfck": "^3.1.6",
|
|
53
53
|
"tsdown": "^0.21.0",
|
|
54
|
-
"vitest": "^4.0
|
|
55
|
-
"vitest-browser-react": "^2.0
|
|
54
|
+
"vitest": "^4.1.0",
|
|
55
|
+
"vitest-browser-react": "^2.1.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"react": "^19",
|
|
59
59
|
"react-dom": "^19",
|
|
60
|
-
"@bi-digital/css": "0.
|
|
60
|
+
"@bi-digital/css": "0.11.0"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "tsdown",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DialogCloseButton } from "../dialog/dialog-close-button.mjs";
|
|
2
|
-
import "../dialog/index.mjs";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/drawer/drawer-close-button.tsx
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated The DrawerCloseButton component is deprecated in favor of using the DialogCloseButton component with the `anchor` prop set to "left", "right", "top" or "bottom". This allows for a more consistent API and reduces the need for multiple components with similar behavior. The DialogCloseButton component with the appropriate anchor can be used to achieve the same sliding drawer effect.
|
|
7
|
-
*/
|
|
8
|
-
const DrawerCloseButton = ({ ref, ...rest }) => /* @__PURE__ */ jsx(DialogCloseButton, {
|
|
9
|
-
ref,
|
|
10
|
-
...rest
|
|
11
|
-
});
|
|
12
|
-
//#endregion
|
|
13
|
-
export { DrawerCloseButton };
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=drawer-close-button.mjs.map
|