@navikt/ds-react 8.2.0 → 8.2.2
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/cjs/accordion/Accordion.d.ts +9 -7
- package/cjs/accordion/Accordion.js +4 -1
- package/cjs/accordion/Accordion.js.map +1 -1
- package/cjs/accordion/AccordionItem.d.ts +8 -6
- package/cjs/accordion/AccordionItem.js +1 -7
- package/cjs/accordion/AccordionItem.js.map +1 -1
- package/cjs/accordion/index.d.ts +2 -4
- package/cjs/accordion/index.js +3 -6
- package/cjs/accordion/index.js.map +1 -1
- package/cjs/chat/Chat.d.ts +4 -2
- package/cjs/chat/Chat.js +2 -1
- package/cjs/chat/Chat.js.map +1 -1
- package/cjs/chat/index.d.ts +2 -2
- package/cjs/chat/index.js +1 -2
- package/cjs/chat/index.js.map +1 -1
- package/cjs/chips/Chips.d.ts +7 -6
- package/cjs/chips/Chips.js +3 -1
- package/cjs/chips/Chips.js.map +1 -1
- package/cjs/chips/index.d.ts +2 -3
- package/cjs/chips/index.js +2 -4
- package/cjs/chips/index.js.map +1 -1
- package/cjs/collapsible/Collapsible.d.ts +6 -4
- package/cjs/collapsible/Collapsible.js +4 -2
- package/cjs/collapsible/Collapsible.js.map +1 -1
- package/cjs/collapsible/index.d.ts +2 -3
- package/cjs/collapsible/index.js +2 -4
- package/cjs/collapsible/index.js.map +1 -1
- package/cjs/data/table/root/DataTableRoot.js +2 -1
- package/cjs/data/table/root/DataTableRoot.js.map +1 -1
- package/cjs/data/table/td/DataTableTd.js +3 -2
- package/cjs/data/table/td/DataTableTd.js.map +1 -1
- package/cjs/data/table/th/DataTableTh.d.ts +12 -2
- package/cjs/data/table/th/DataTableTh.js +7 -2
- package/cjs/data/table/th/DataTableTh.js.map +1 -1
- package/cjs/data/toolbar/button/DataToolbarButton.d.ts +17 -0
- package/cjs/data/toolbar/button/DataToolbarButton.js +28 -0
- package/cjs/data/toolbar/button/DataToolbarButton.js.map +1 -0
- package/cjs/data/toolbar/root/DataToolbarRoot.d.ts +13 -2
- package/cjs/data/toolbar/root/DataToolbarRoot.js +4 -1
- package/cjs/data/toolbar/root/DataToolbarRoot.js.map +1 -1
- package/cjs/data/toolbar/search-field/DataToolbarSearchField.d.ts +3 -2
- package/cjs/data/toolbar/search-field/DataToolbarSearchField.js +4 -1
- package/cjs/data/toolbar/search-field/DataToolbarSearchField.js.map +1 -1
- package/cjs/data/toolbar/toggle-button/DataToolbarToggleButton.d.ts +7 -6
- package/cjs/data/toolbar/toggle-button/DataToolbarToggleButton.js +2 -1
- package/cjs/data/toolbar/toggle-button/DataToolbarToggleButton.js.map +1 -1
- package/cjs/date/datepicker/DatePicker.d.ts +6 -3
- package/cjs/date/datepicker/DatePicker.js +3 -1
- package/cjs/date/datepicker/DatePicker.js.map +1 -1
- package/cjs/date/datepicker/index.d.ts +2 -3
- package/cjs/date/datepicker/index.js +3 -5
- package/cjs/date/datepicker/index.js.map +1 -1
- package/cjs/date/monthpicker/MonthPicker.d.ts +5 -2
- package/cjs/date/monthpicker/MonthPicker.js +3 -1
- package/cjs/date/monthpicker/MonthPicker.js.map +1 -1
- package/cjs/date/monthpicker/index.d.ts +2 -4
- package/cjs/date/monthpicker/index.js +2 -4
- package/cjs/date/monthpicker/index.js.map +1 -1
- package/cjs/dialog/index.d.ts +2 -18
- package/cjs/dialog/index.js +8 -16
- package/cjs/dialog/index.js.map +1 -1
- package/cjs/dialog/root/DialogRoot.d.ts +10 -9
- package/cjs/dialog/root/DialogRoot.js +9 -1
- package/cjs/dialog/root/DialogRoot.js.map +1 -1
- package/cjs/expansion-card/ExpansionCard.d.ts +6 -5
- package/cjs/expansion-card/ExpansionCard.js +3 -9
- package/cjs/expansion-card/ExpansionCard.js.map +1 -1
- package/cjs/form/file-upload/FileUpload.d.ts +2 -2
- package/cjs/form/file-upload/FileUpload.js +1 -1
- package/cjs/form/file-upload/FileUpload.js.map +1 -1
- package/cjs/form/search/Search.d.ts +2 -1
- package/cjs/form/search/Search.js.map +1 -1
- package/cjs/internal-header/InternalHeader.d.ts +11 -10
- package/cjs/internal-header/InternalHeader.js +5 -1
- package/cjs/internal-header/InternalHeader.js.map +1 -1
- package/cjs/internal-header/index.d.ts +2 -5
- package/cjs/internal-header/index.js +4 -8
- package/cjs/internal-header/index.js.map +1 -1
- package/cjs/layout/bleed/Bleed.d.ts +1 -1
- package/cjs/layout/bleed/Bleed.js +1 -1
- package/cjs/layout/responsive/Responsive.d.ts +4 -4
- package/cjs/layout/responsive/Responsive.js +4 -4
- package/cjs/layout/stack/HStack.d.ts +2 -2
- package/cjs/layout/stack/HStack.js +2 -2
- package/cjs/layout/stack/Spacer.d.ts +1 -1
- package/cjs/layout/stack/Spacer.js +1 -1
- package/cjs/layout/stack/VStack.d.ts +2 -2
- package/cjs/layout/stack/VStack.js +2 -2
- package/cjs/link-panel/LinkPanel.d.ts +1 -1
- package/cjs/link-panel/LinkPanel.js.map +1 -1
- package/cjs/list/List.d.ts +4 -2
- package/cjs/list/List.js +2 -1
- package/cjs/list/List.js.map +1 -1
- package/cjs/list/index.d.ts +2 -3
- package/cjs/list/index.js +1 -2
- package/cjs/list/index.js.map +1 -1
- package/cjs/overlays/action-menu/ActionMenu.d.ts +42 -42
- package/cjs/overlays/action-menu/ActionMenu.js +1 -1
- package/cjs/overlays/action-menu/ActionMenu.js.map +1 -1
- package/cjs/panel/Panel.d.ts +2 -2
- package/cjs/panel/Panel.js +2 -2
- package/cjs/stepper/Stepper.d.ts +4 -2
- package/cjs/stepper/Stepper.js +2 -1
- package/cjs/stepper/Stepper.js.map +1 -1
- package/cjs/stepper/index.d.ts +2 -2
- package/cjs/stepper/index.js +1 -2
- package/cjs/stepper/index.js.map +1 -1
- package/cjs/tabs/Tabs.d.ts +5 -3
- package/cjs/tabs/Tabs.js +4 -1
- package/cjs/tabs/Tabs.js.map +1 -1
- package/cjs/tabs/index.d.ts +2 -5
- package/cjs/tabs/index.js +3 -6
- package/cjs/tabs/index.js.map +1 -1
- package/cjs/toggle-group/ToggleGroup.d.ts +4 -2
- package/cjs/toggle-group/ToggleGroup.js +2 -1
- package/cjs/toggle-group/ToggleGroup.js.map +1 -1
- package/cjs/toggle-group/index.d.ts +2 -3
- package/cjs/toggle-group/index.js +1 -2
- package/cjs/toggle-group/index.js.map +1 -1
- package/esm/accordion/Accordion.d.ts +9 -7
- package/esm/accordion/Accordion.js +1 -0
- package/esm/accordion/Accordion.js.map +1 -1
- package/esm/accordion/AccordionItem.d.ts +8 -6
- package/esm/accordion/AccordionItem.js +2 -8
- package/esm/accordion/AccordionItem.js.map +1 -1
- package/esm/accordion/index.d.ts +2 -4
- package/esm/accordion/index.js +1 -4
- package/esm/accordion/index.js.map +1 -1
- package/esm/chat/Chat.d.ts +4 -2
- package/esm/chat/Chat.js +1 -0
- package/esm/chat/Chat.js.map +1 -1
- package/esm/chat/index.d.ts +2 -2
- package/esm/chat/index.js +1 -2
- package/esm/chat/index.js.map +1 -1
- package/esm/chips/Chips.d.ts +7 -6
- package/esm/chips/Chips.js +1 -0
- package/esm/chips/Chips.js.map +1 -1
- package/esm/chips/index.d.ts +2 -3
- package/esm/chips/index.js +1 -3
- package/esm/chips/index.js.map +1 -1
- package/esm/collapsible/Collapsible.d.ts +6 -4
- package/esm/collapsible/Collapsible.js +2 -1
- package/esm/collapsible/Collapsible.js.map +1 -1
- package/esm/collapsible/index.d.ts +2 -3
- package/esm/collapsible/index.js +1 -3
- package/esm/collapsible/index.js.map +1 -1
- package/esm/data/table/root/DataTableRoot.js +2 -1
- package/esm/data/table/root/DataTableRoot.js.map +1 -1
- package/esm/data/table/td/DataTableTd.js +3 -2
- package/esm/data/table/td/DataTableTd.js.map +1 -1
- package/esm/data/table/th/DataTableTh.d.ts +12 -2
- package/esm/data/table/th/DataTableTh.js +7 -2
- package/esm/data/table/th/DataTableTh.js.map +1 -1
- package/esm/data/toolbar/button/DataToolbarButton.d.ts +17 -0
- package/esm/data/toolbar/button/DataToolbarButton.js +22 -0
- package/esm/data/toolbar/button/DataToolbarButton.js.map +1 -0
- package/esm/data/toolbar/root/DataToolbarRoot.d.ts +13 -2
- package/esm/data/toolbar/root/DataToolbarRoot.js +3 -1
- package/esm/data/toolbar/root/DataToolbarRoot.js.map +1 -1
- package/esm/data/toolbar/search-field/DataToolbarSearchField.d.ts +3 -2
- package/esm/data/toolbar/search-field/DataToolbarSearchField.js +4 -1
- package/esm/data/toolbar/search-field/DataToolbarSearchField.js.map +1 -1
- package/esm/data/toolbar/toggle-button/DataToolbarToggleButton.d.ts +7 -6
- package/esm/data/toolbar/toggle-button/DataToolbarToggleButton.js +2 -1
- package/esm/data/toolbar/toggle-button/DataToolbarToggleButton.js.map +1 -1
- package/esm/date/datepicker/DatePicker.d.ts +6 -3
- package/esm/date/datepicker/DatePicker.js +2 -1
- package/esm/date/datepicker/DatePicker.js.map +1 -1
- package/esm/date/datepicker/index.d.ts +2 -3
- package/esm/date/datepicker/index.js +1 -3
- package/esm/date/datepicker/index.js.map +1 -1
- package/esm/date/monthpicker/MonthPicker.d.ts +5 -2
- package/esm/date/monthpicker/MonthPicker.js +3 -2
- package/esm/date/monthpicker/MonthPicker.js.map +1 -1
- package/esm/date/monthpicker/index.d.ts +2 -4
- package/esm/date/monthpicker/index.js +1 -3
- package/esm/date/monthpicker/index.js.map +1 -1
- package/esm/dialog/index.d.ts +2 -18
- package/esm/dialog/index.js +1 -9
- package/esm/dialog/index.js.map +1 -1
- package/esm/dialog/root/DialogRoot.d.ts +10 -9
- package/esm/dialog/root/DialogRoot.js +3 -2
- package/esm/dialog/root/DialogRoot.js.map +1 -1
- package/esm/expansion-card/ExpansionCard.d.ts +6 -5
- package/esm/expansion-card/ExpansionCard.js +4 -10
- package/esm/expansion-card/ExpansionCard.js.map +1 -1
- package/esm/form/file-upload/FileUpload.d.ts +2 -2
- package/esm/form/file-upload/FileUpload.js +1 -1
- package/esm/form/file-upload/FileUpload.js.map +1 -1
- package/esm/form/search/Search.d.ts +2 -1
- package/esm/form/search/Search.js.map +1 -1
- package/esm/internal-header/InternalHeader.d.ts +11 -10
- package/esm/internal-header/InternalHeader.js +1 -0
- package/esm/internal-header/InternalHeader.js.map +1 -1
- package/esm/internal-header/index.d.ts +2 -5
- package/esm/internal-header/index.js +1 -5
- package/esm/internal-header/index.js.map +1 -1
- package/esm/layout/bleed/Bleed.d.ts +1 -1
- package/esm/layout/bleed/Bleed.js +1 -1
- package/esm/layout/responsive/Responsive.d.ts +4 -4
- package/esm/layout/responsive/Responsive.js +4 -4
- package/esm/layout/stack/HStack.d.ts +2 -2
- package/esm/layout/stack/HStack.js +2 -2
- package/esm/layout/stack/Spacer.d.ts +1 -1
- package/esm/layout/stack/Spacer.js +1 -1
- package/esm/layout/stack/VStack.d.ts +2 -2
- package/esm/layout/stack/VStack.js +2 -2
- package/esm/link-panel/LinkPanel.d.ts +1 -1
- package/esm/link-panel/LinkPanel.js.map +1 -1
- package/esm/list/List.d.ts +4 -2
- package/esm/list/List.js +1 -0
- package/esm/list/List.js.map +1 -1
- package/esm/list/index.d.ts +2 -3
- package/esm/list/index.js +1 -2
- package/esm/list/index.js.map +1 -1
- package/esm/overlays/action-menu/ActionMenu.d.ts +42 -42
- package/esm/overlays/action-menu/ActionMenu.js +1 -1
- package/esm/overlays/action-menu/ActionMenu.js.map +1 -1
- package/esm/panel/Panel.d.ts +2 -2
- package/esm/panel/Panel.js +2 -2
- package/esm/stepper/Stepper.d.ts +4 -2
- package/esm/stepper/Stepper.js +1 -0
- package/esm/stepper/Stepper.js.map +1 -1
- package/esm/stepper/index.d.ts +2 -2
- package/esm/stepper/index.js +1 -2
- package/esm/stepper/index.js.map +1 -1
- package/esm/tabs/Tabs.d.ts +5 -3
- package/esm/tabs/Tabs.js +1 -0
- package/esm/tabs/Tabs.js.map +1 -1
- package/esm/tabs/index.d.ts +2 -5
- package/esm/tabs/index.js +1 -4
- package/esm/tabs/index.js.map +1 -1
- package/esm/toggle-group/ToggleGroup.d.ts +4 -2
- package/esm/toggle-group/ToggleGroup.js +1 -0
- package/esm/toggle-group/ToggleGroup.js.map +1 -1
- package/esm/toggle-group/index.d.ts +2 -3
- package/esm/toggle-group/index.js +1 -2
- package/esm/toggle-group/index.js.map +1 -1
- package/package.json +4 -4
- package/src/accordion/Accordion.tsx +14 -14
- package/src/accordion/AccordionItem.tsx +11 -18
- package/src/accordion/index.ts +11 -12
- package/src/chat/Chat.tsx +6 -5
- package/src/chat/index.ts +2 -2
- package/src/chips/Chips.tsx +8 -8
- package/src/chips/index.ts +6 -6
- package/src/collapsible/Collapsible.tsx +18 -10
- package/src/collapsible/index.ts +9 -8
- package/src/data/table/root/DataTableRoot.tsx +7 -5
- package/src/data/table/td/DataTableTd.tsx +4 -2
- package/src/data/table/th/DataTableTh.tsx +54 -3
- package/src/data/toolbar/button/DataToolbarButton.tsx +34 -0
- package/src/data/toolbar/root/DataToolbarRoot.tsx +22 -1
- package/src/data/toolbar/search-field/DataToolbarSearchField.tsx +15 -14
- package/src/data/toolbar/toggle-button/DataToolbarToggleButton.tsx +12 -5
- package/src/date/datepicker/DatePicker.tsx +13 -5
- package/src/date/datepicker/index.ts +10 -6
- package/src/date/monthpicker/MonthPicker.tsx +13 -4
- package/src/date/monthpicker/index.ts +7 -5
- package/src/dialog/index.ts +22 -18
- package/src/dialog/root/DialogRoot.tsx +37 -9
- package/src/expansion-card/ExpansionCard.tsx +15 -21
- package/src/form/file-upload/FileUpload.tsx +5 -6
- package/src/form/search/Search.tsx +9 -6
- package/src/internal-header/InternalHeader.tsx +21 -15
- package/src/internal-header/index.ts +11 -17
- package/src/layout/bleed/Bleed.tsx +1 -1
- package/src/layout/responsive/Responsive.tsx +4 -4
- package/src/layout/stack/HStack.tsx +2 -2
- package/src/layout/stack/Spacer.tsx +1 -1
- package/src/layout/stack/VStack.tsx +2 -2
- package/src/link-panel/LinkPanel.tsx +6 -5
- package/src/list/List.tsx +5 -5
- package/src/list/index.ts +2 -3
- package/src/overlays/action-menu/ActionMenu.tsx +56 -52
- package/src/panel/Panel.tsx +2 -2
- package/src/stepper/Stepper.tsx +6 -5
- package/src/stepper/index.ts +2 -2
- package/src/tabs/Tabs.tsx +13 -7
- package/src/tabs/index.ts +7 -11
- package/src/toggle-group/ToggleGroup.tsx +7 -6
- package/src/toggle-group/index.ts +2 -6
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { HTMLAttributes, forwardRef } from "react";
|
|
2
2
|
import { Theme } from "../theme/Theme";
|
|
3
|
-
import type { OverridableComponent } from "../utils-external";
|
|
4
3
|
import { cl } from "../utils/helpers";
|
|
5
4
|
import InternalHeaderButton, {
|
|
6
5
|
InternalHeaderButtonProps,
|
|
@@ -15,38 +14,32 @@ import InternalHeaderUserButton, {
|
|
|
15
14
|
InternalHeaderUserButtonProps,
|
|
16
15
|
} from "./InternalHeaderUserButton";
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
interface InternalHeaderProps extends HTMLAttributes<HTMLElement> {
|
|
19
18
|
children: React.ReactNode;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
interface InternalHeaderComponent
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
> {
|
|
21
|
+
interface InternalHeaderComponent extends React.ForwardRefExoticComponent<
|
|
22
|
+
InternalHeaderProps & React.RefAttributes<HTMLElement>
|
|
23
|
+
> {
|
|
26
24
|
/**
|
|
27
25
|
* @see 🏷️ {@link InternalHeaderTitleProps}
|
|
28
26
|
* @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support
|
|
29
27
|
*/
|
|
30
|
-
Title:
|
|
28
|
+
Title: typeof InternalHeaderTitle;
|
|
31
29
|
/**
|
|
32
30
|
* @see 🏷️ {@link InternalHeaderUserProps}
|
|
33
31
|
*/
|
|
34
|
-
User:
|
|
35
|
-
InternalHeaderUserProps & React.RefAttributes<HTMLDivElement>
|
|
36
|
-
>;
|
|
32
|
+
User: typeof InternalHeaderUser;
|
|
37
33
|
/**
|
|
38
34
|
* @see 🏷️ {@link InternalHeaderButtonProps}
|
|
39
35
|
* @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support
|
|
40
36
|
*/
|
|
41
|
-
Button:
|
|
37
|
+
Button: typeof InternalHeaderButton;
|
|
42
38
|
/**
|
|
43
39
|
* @see 🏷️ {@link InternalHeaderUserButtonProps}
|
|
44
40
|
* @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support
|
|
45
41
|
*/
|
|
46
|
-
UserButton:
|
|
47
|
-
InternalHeaderUserButtonProps,
|
|
48
|
-
HTMLButtonElement
|
|
49
|
-
>;
|
|
42
|
+
UserButton: typeof InternalHeaderUserButton;
|
|
50
43
|
}
|
|
51
44
|
|
|
52
45
|
/**
|
|
@@ -98,3 +91,16 @@ InternalHeader.Button = InternalHeaderButton;
|
|
|
98
91
|
InternalHeader.UserButton = InternalHeaderUserButton;
|
|
99
92
|
|
|
100
93
|
export default InternalHeader;
|
|
94
|
+
export {
|
|
95
|
+
InternalHeaderTitle,
|
|
96
|
+
InternalHeaderUser,
|
|
97
|
+
InternalHeaderButton,
|
|
98
|
+
InternalHeaderUserButton,
|
|
99
|
+
};
|
|
100
|
+
export type {
|
|
101
|
+
InternalHeaderProps,
|
|
102
|
+
InternalHeaderTitleProps,
|
|
103
|
+
InternalHeaderUserProps,
|
|
104
|
+
InternalHeaderButtonProps,
|
|
105
|
+
InternalHeaderUserButtonProps,
|
|
106
|
+
};
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
export {
|
|
3
3
|
default as InternalHeader,
|
|
4
|
-
|
|
4
|
+
InternalHeaderButton,
|
|
5
|
+
InternalHeaderTitle,
|
|
6
|
+
InternalHeaderUser,
|
|
7
|
+
InternalHeaderUserButton,
|
|
8
|
+
} from "./InternalHeader";
|
|
9
|
+
export type {
|
|
10
|
+
InternalHeaderProps,
|
|
11
|
+
InternalHeaderButtonProps,
|
|
12
|
+
InternalHeaderTitleProps,
|
|
13
|
+
InternalHeaderUserProps,
|
|
14
|
+
InternalHeaderUserButtonProps,
|
|
5
15
|
} from "./InternalHeader";
|
|
6
|
-
export {
|
|
7
|
-
default as InternalHeaderButton,
|
|
8
|
-
type InternalHeaderButtonProps,
|
|
9
|
-
} from "./InternalHeaderButton";
|
|
10
|
-
export {
|
|
11
|
-
default as InternalHeaderTitle,
|
|
12
|
-
type InternalHeaderTitleProps,
|
|
13
|
-
} from "./InternalHeaderTitle";
|
|
14
|
-
export {
|
|
15
|
-
default as InternalHeaderUser,
|
|
16
|
-
type InternalHeaderUserProps,
|
|
17
|
-
} from "./InternalHeaderUser";
|
|
18
|
-
export {
|
|
19
|
-
default as InternalHeaderUserButton,
|
|
20
|
-
type InternalHeaderUserButtonProps,
|
|
21
|
-
} from "./InternalHeaderUserButton";
|
|
@@ -61,7 +61,7 @@ export interface BleedProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
61
61
|
* @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support
|
|
62
62
|
*
|
|
63
63
|
* @example
|
|
64
|
-
* <Box padding="
|
|
64
|
+
* <Box padding="space-16">
|
|
65
65
|
* <Bleed marginInline="space-16" marginBlock="space-16">
|
|
66
66
|
* <BodyLong>Some content</BodyLong>
|
|
67
67
|
* </Bleed>
|
|
@@ -65,14 +65,14 @@ const Responsive = forwardRef<
|
|
|
65
65
|
* @see 🏷️ {@link ResponsiveProps}
|
|
66
66
|
*
|
|
67
67
|
* @example
|
|
68
|
-
* <HGrid columns={{ xs: 1, md: 2 }} gap="
|
|
68
|
+
* <HGrid columns={{ xs: 1, md: 2 }} gap="space-16">
|
|
69
69
|
* <div/>
|
|
70
70
|
* <Hide below="md" asChild>
|
|
71
71
|
* // Only visible above "md"
|
|
72
72
|
* </Hide>
|
|
73
73
|
* </HGrid>
|
|
74
74
|
* @example
|
|
75
|
-
* <HGrid columns={{ xs: 1, md: 2 }} gap="
|
|
75
|
+
* <HGrid columns={{ xs: 1, md: 2 }} gap="space-16">
|
|
76
76
|
* <div/>
|
|
77
77
|
* <Hide above="md" asChild>
|
|
78
78
|
* // Only visible below "md"
|
|
@@ -90,14 +90,14 @@ export const Hide = forwardRef<HTMLDivElement, ResponsiveProps>(
|
|
|
90
90
|
* @see 🏷️ {@link ResponsiveProps}
|
|
91
91
|
*
|
|
92
92
|
* @example
|
|
93
|
-
* <HGrid columns={{ xs: 1, md: 2 }} gap="
|
|
93
|
+
* <HGrid columns={{ xs: 1, md: 2 }} gap="space-16">
|
|
94
94
|
* <div/>
|
|
95
95
|
* <Show below="md" asChild>
|
|
96
96
|
* // Only visible below "md"
|
|
97
97
|
* </Show>
|
|
98
98
|
* </HGrid>
|
|
99
99
|
* @example
|
|
100
|
-
* <HGrid columns={{ xs: 1, md: 2 }} gap="
|
|
100
|
+
* <HGrid columns={{ xs: 1, md: 2 }} gap="space-16">
|
|
101
101
|
* <div/>
|
|
102
102
|
* <Show above="md" asChild>
|
|
103
103
|
* // Only visible above "md"
|
|
@@ -13,14 +13,14 @@ export type HStackProps = PrimitiveAsChildProps & Omit<StackProps, "direction">;
|
|
|
13
13
|
* @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
|
-
* <HStack gap="
|
|
16
|
+
* <HStack gap="space-32">
|
|
17
17
|
* <MyComponent />
|
|
18
18
|
* <MyComponent />
|
|
19
19
|
* </HStack>
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* // Responsive gap
|
|
23
|
-
* <HStack gap={{xs: "
|
|
23
|
+
* <HStack gap={{xs: "space-8", md: "space-24"}}>
|
|
24
24
|
* <MyComponent />
|
|
25
25
|
* <MyComponent />
|
|
26
26
|
* </HStack>
|
|
@@ -14,14 +14,14 @@ export type VStackProps = PrimitiveAsChildProps &
|
|
|
14
14
|
* @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
|
-
* <VStack gap="
|
|
17
|
+
* <VStack gap="space-32">
|
|
18
18
|
* <MyComponent />
|
|
19
19
|
* <MyComponent />
|
|
20
20
|
* </VStack>
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* // Responsive gap
|
|
24
|
-
* <VStack gap={{xs: "
|
|
24
|
+
* <VStack gap={{xs: "space-8", md: "space-24"}}>
|
|
25
25
|
* <MyComponent />
|
|
26
26
|
* <MyComponent />
|
|
27
27
|
* </VStack>
|
|
@@ -9,8 +9,7 @@ import {
|
|
|
9
9
|
} from "./LinkPanelDescription";
|
|
10
10
|
import { LinkPanelTitle, LinkPanelTitleProps } from "./LinkPanelTitle";
|
|
11
11
|
|
|
12
|
-
export interface LinkPanelProps
|
|
13
|
-
extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
12
|
+
export interface LinkPanelProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
14
13
|
/**
|
|
15
14
|
* Panel content
|
|
16
15
|
*/
|
|
@@ -22,10 +21,12 @@ export interface LinkPanelProps
|
|
|
22
21
|
border?: boolean;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
interface LinkPanelComponentType
|
|
26
|
-
|
|
24
|
+
interface LinkPanelComponentType extends OverridableComponent<
|
|
25
|
+
LinkPanelProps,
|
|
26
|
+
HTMLAnchorElement
|
|
27
|
+
> {
|
|
27
28
|
/**
|
|
28
|
-
* @see 🏷️ {@link
|
|
29
|
+
* @see 🏷️ {@link LinkPanelTitleProps}
|
|
29
30
|
* @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support
|
|
30
31
|
*/
|
|
31
32
|
Title: OverridableComponent<LinkPanelTitleProps, HTMLDivElement>;
|
package/src/list/List.tsx
CHANGED
|
@@ -3,13 +3,11 @@ import { BodyLong } from "../typography";
|
|
|
3
3
|
import { cl } from "../utils/helpers";
|
|
4
4
|
import { ListItem } from "./List.Item";
|
|
5
5
|
import { ListContext } from "./List.context";
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7
6
|
import type { ListItemProps, ListProps } from "./List.types";
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
> {
|
|
8
|
+
interface ListComponent extends React.ForwardRefExoticComponent<
|
|
9
|
+
ListProps & React.RefAttributes<HTMLDivElement>
|
|
10
|
+
> {
|
|
13
11
|
/**
|
|
14
12
|
* @see 🏷️ {@link ListItemProps}
|
|
15
13
|
*/
|
|
@@ -78,3 +76,5 @@ export const List = forwardRef<HTMLDivElement, ListProps>(
|
|
|
78
76
|
List.Item = ListItem;
|
|
79
77
|
|
|
80
78
|
export default List;
|
|
79
|
+
export { ListItem };
|
|
80
|
+
export type { ListProps, ListItemProps };
|
package/src/list/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { default as List } from "./List";
|
|
3
|
-
export type { ListProps, ListItemProps } from "./List
|
|
4
|
-
export { default as ListItem } from "./List.Item";
|
|
2
|
+
export { default as List, ListItem } from "./List";
|
|
3
|
+
export type { ListProps, ListItemProps } from "./List";
|
|
@@ -52,7 +52,7 @@ interface ActionMenuComponent extends React.FC<ActionMenuProps> {
|
|
|
52
52
|
* @example
|
|
53
53
|
* ```jsx
|
|
54
54
|
* <ActionMenu.Trigger>
|
|
55
|
-
*
|
|
55
|
+
* <button>Open Menu</button>
|
|
56
56
|
* </ActionMenu.Trigger>
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
@@ -62,12 +62,12 @@ interface ActionMenuComponent extends React.FC<ActionMenuProps> {
|
|
|
62
62
|
* @example
|
|
63
63
|
* ```jsx
|
|
64
64
|
* <ActionMenu.Content>
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
65
|
+
* <ActionMenu.Item>
|
|
66
|
+
* Item 1
|
|
67
|
+
* </ActionMenu.Item>
|
|
68
|
+
* <ActionMenu.Item>
|
|
69
|
+
* Item 2
|
|
70
|
+
* </ActionMenu.Item>
|
|
71
71
|
* </ActionMenu.Content>
|
|
72
72
|
* ```
|
|
73
73
|
*/
|
|
@@ -81,22 +81,22 @@ interface ActionMenuComponent extends React.FC<ActionMenuProps> {
|
|
|
81
81
|
* @example
|
|
82
82
|
* ```jsx
|
|
83
83
|
* <ActionMenu.Content>
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
84
|
+
* <ActionMenu.Group label="Group 1">
|
|
85
|
+
* <ActionMenu.Item>
|
|
86
|
+
* Item 1
|
|
87
|
+
* </ActionMenu.Item>
|
|
88
|
+
* <ActionMenu.Item>
|
|
89
|
+
* Item 2
|
|
90
|
+
* </ActionMenu.Item>
|
|
91
|
+
* </ActionMenu.Group>
|
|
92
|
+
* <ActionMenu.Group label="Group 2">
|
|
93
|
+
* <ActionMenu.Item>
|
|
94
|
+
* Item 3
|
|
95
|
+
* </ActionMenu.Item>
|
|
96
|
+
* <ActionMenu.Item>
|
|
97
|
+
* Item 4
|
|
98
|
+
* </ActionMenu.Item>
|
|
99
|
+
* </ActionMenu.Group>
|
|
100
100
|
* </ActionMenu.Content>
|
|
101
101
|
* ```
|
|
102
102
|
*/
|
|
@@ -107,10 +107,10 @@ interface ActionMenuComponent extends React.FC<ActionMenuProps> {
|
|
|
107
107
|
* @example
|
|
108
108
|
* ```jsx
|
|
109
109
|
* <ActionMenu.Content>
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
110
|
+
* <ActionMenu.Label>
|
|
111
|
+
* Label
|
|
112
|
+
* </ActionMenu.Label>
|
|
113
|
+
* <ActionMenu.Divider />
|
|
114
114
|
* </ActionMenu.Content
|
|
115
115
|
* ```
|
|
116
116
|
*/
|
|
@@ -121,26 +121,26 @@ interface ActionMenuComponent extends React.FC<ActionMenuProps> {
|
|
|
121
121
|
* @example
|
|
122
122
|
* ```jsx
|
|
123
123
|
* <ActionMenu.Content>
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* </ActionMenu.Item>
|
|
129
|
-
* <ActionMenu.Item onSelect={navigate}>
|
|
130
|
-
* Item 2
|
|
131
|
-
* </ActionMenu.Item>
|
|
132
|
-
* </ActionMenu.Group>
|
|
133
|
-
* <ActionMenu.Divider />
|
|
134
|
-
* // Standalone
|
|
135
|
-
* <ActionMenu.Item onSelect={updateState}>
|
|
136
|
-
* Item 3
|
|
124
|
+
* // Grouped
|
|
125
|
+
* <ActionMenu.Group label="Group 1">
|
|
126
|
+
* <ActionMenu.Item onSelect={navigate}>
|
|
127
|
+
* Item 1
|
|
137
128
|
* </ActionMenu.Item>
|
|
129
|
+
* <ActionMenu.Item onSelect={navigate}>
|
|
130
|
+
* Item 2
|
|
131
|
+
* </ActionMenu.Item>
|
|
132
|
+
* </ActionMenu.Group>
|
|
133
|
+
* <ActionMenu.Divider />
|
|
134
|
+
* // Standalone
|
|
135
|
+
* <ActionMenu.Item onSelect={updateState}>
|
|
136
|
+
* Item 3
|
|
137
|
+
* </ActionMenu.Item>
|
|
138
138
|
* </ActionMenu.Content>
|
|
139
139
|
* ```
|
|
140
140
|
* @example As link
|
|
141
141
|
* ```jsx
|
|
142
142
|
* <ActionMenu.Item as="a" href="#">
|
|
143
|
-
*
|
|
143
|
+
* Item
|
|
144
144
|
* </ActionMenu.Item>
|
|
145
145
|
* ```
|
|
146
146
|
*/
|
|
@@ -296,7 +296,7 @@ const ActionMenuRoot = ({
|
|
|
296
296
|
* Item 2
|
|
297
297
|
* </ActionMenu.Item>
|
|
298
298
|
* </ActionMenu.Content>
|
|
299
|
-
*
|
|
299
|
+
* </ActionMenu>
|
|
300
300
|
* ```
|
|
301
301
|
*/
|
|
302
302
|
export const ActionMenu = ActionMenuRoot as ActionMenuComponent;
|
|
@@ -304,8 +304,7 @@ export const ActionMenu = ActionMenuRoot as ActionMenuComponent;
|
|
|
304
304
|
/* -------------------------------------------------------------------------- */
|
|
305
305
|
/* ActionMenuTrigger */
|
|
306
306
|
/* -------------------------------------------------------------------------- */
|
|
307
|
-
interface ActionMenuTriggerProps
|
|
308
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
307
|
+
interface ActionMenuTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
309
308
|
children: React.ReactElement;
|
|
310
309
|
}
|
|
311
310
|
|
|
@@ -351,8 +350,10 @@ export const ActionMenuTrigger = forwardRef<
|
|
|
351
350
|
/* -------------------------------------------------------------------------- */
|
|
352
351
|
/* ActionMenuContent */
|
|
353
352
|
/* -------------------------------------------------------------------------- */
|
|
354
|
-
interface ActionMenuContentProps
|
|
355
|
-
|
|
353
|
+
interface ActionMenuContentProps extends Omit<
|
|
354
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
355
|
+
"id"
|
|
356
|
+
> {
|
|
356
357
|
children?: React.ReactNode;
|
|
357
358
|
align?: "start" | "end";
|
|
358
359
|
}
|
|
@@ -606,8 +607,10 @@ type MenuCheckboxItemProps = React.ComponentPropsWithoutRef<
|
|
|
606
607
|
typeof Menu.CheckboxItem
|
|
607
608
|
>;
|
|
608
609
|
|
|
609
|
-
interface ActionMenuCheckboxItemProps
|
|
610
|
-
|
|
610
|
+
interface ActionMenuCheckboxItemProps extends Omit<
|
|
611
|
+
MenuCheckboxItemProps,
|
|
612
|
+
"asChild"
|
|
613
|
+
> {
|
|
611
614
|
children: React.ReactNode;
|
|
612
615
|
/**
|
|
613
616
|
* Shows connected shortcut-keys for the item.
|
|
@@ -890,8 +893,10 @@ type ActionMenuSubTriggerElement = React.ElementRef<typeof Menu.SubTrigger>;
|
|
|
890
893
|
type MenuSubTriggerProps = React.ComponentPropsWithoutRef<
|
|
891
894
|
typeof Menu.SubTrigger
|
|
892
895
|
>;
|
|
893
|
-
interface ActionMenuSubTriggerProps
|
|
894
|
-
|
|
896
|
+
interface ActionMenuSubTriggerProps extends Omit<
|
|
897
|
+
MenuSubTriggerProps,
|
|
898
|
+
"asChild"
|
|
899
|
+
> {
|
|
895
900
|
icon?: React.ReactNode;
|
|
896
901
|
/**
|
|
897
902
|
* Position of icon.
|
|
@@ -947,8 +952,7 @@ export const ActionMenuSubTrigger = forwardRef<
|
|
|
947
952
|
/* -------------------------------------------------------------------------- */
|
|
948
953
|
type ActionMenuSubContentElement = React.ElementRef<typeof Menu.Content>;
|
|
949
954
|
|
|
950
|
-
interface ActionMenuSubContentProps
|
|
951
|
-
extends React.HTMLAttributes<HTMLDivElement> {
|
|
955
|
+
interface ActionMenuSubContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
952
956
|
children: React.ReactNode;
|
|
953
957
|
}
|
|
954
958
|
|
package/src/panel/Panel.tsx
CHANGED
|
@@ -23,8 +23,8 @@ export type PanelType = OverridableComponent<PanelProps, HTMLElement>;
|
|
|
23
23
|
* @deprecated
|
|
24
24
|
* Use Box with padding and border instead
|
|
25
25
|
* ```
|
|
26
|
-
* <Box padding="
|
|
27
|
-
* <Box padding="
|
|
26
|
+
* <Box padding="space-16" borderRadius="2" />
|
|
27
|
+
* <Box padding="space-16" borderWidth="1" borderRadius="2" />
|
|
28
28
|
* ```
|
|
29
29
|
* Component will be removed in a future major release
|
|
30
30
|
*/
|
package/src/stepper/Stepper.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { cl } from "../utils/helpers";
|
|
|
3
3
|
import Step, { StepperStepProps } from "./Step";
|
|
4
4
|
import { StepperContextProvider } from "./context";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
interface StepperProps extends React.HTMLAttributes<HTMLOListElement> {
|
|
7
7
|
/**
|
|
8
8
|
* `<Stepper.Step />` elements.
|
|
9
9
|
*/
|
|
@@ -33,10 +33,9 @@ export interface StepperProps extends React.HTMLAttributes<HTMLOListElement> {
|
|
|
33
33
|
interactive?: boolean;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
interface StepperComponent
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
> {
|
|
36
|
+
interface StepperComponent extends React.ForwardRefExoticComponent<
|
|
37
|
+
StepperProps & React.RefAttributes<HTMLOListElement>
|
|
38
|
+
> {
|
|
40
39
|
/**
|
|
41
40
|
* @see 🏷️ {@link StepperStepProps}
|
|
42
41
|
* @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support
|
|
@@ -128,3 +127,5 @@ export const Stepper: StepperComponent = forwardRef<
|
|
|
128
127
|
Stepper.Step = Step;
|
|
129
128
|
|
|
130
129
|
export default Stepper;
|
|
130
|
+
export { Step as StepperStep };
|
|
131
|
+
export type { StepperProps, StepperStepProps };
|
package/src/stepper/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { default as Stepper,
|
|
3
|
-
export {
|
|
2
|
+
export { default as Stepper, StepperStep } from "./Stepper";
|
|
3
|
+
export type { StepperProps, StepperStepProps } from "./Stepper";
|
package/src/tabs/Tabs.tsx
CHANGED
|
@@ -6,15 +6,14 @@ import {
|
|
|
6
6
|
useTabsDescendants,
|
|
7
7
|
} from "./Tabs.context";
|
|
8
8
|
import { TabsProps } from "./Tabs.types";
|
|
9
|
-
import Tab from "./parts/tab/Tab";
|
|
10
|
-
import TabList from "./parts/tablist/TabList";
|
|
11
|
-
import TabPanel from "./parts/tabpanel/TabPanel";
|
|
9
|
+
import Tab, { TabProps } from "./parts/tab/Tab";
|
|
10
|
+
import TabList, { TabListProps } from "./parts/tablist/TabList";
|
|
11
|
+
import TabPanel, { TabPanelProps } from "./parts/tabpanel/TabPanel";
|
|
12
12
|
import { useTabs } from "./useTabs";
|
|
13
13
|
|
|
14
|
-
interface TabsComponent
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
> {
|
|
14
|
+
interface TabsComponent extends React.ForwardRefExoticComponent<
|
|
15
|
+
TabsProps & React.RefAttributes<HTMLDivElement>
|
|
16
|
+
> {
|
|
18
17
|
/**
|
|
19
18
|
* @see 🏷️ {@link TabProps}
|
|
20
19
|
* @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support
|
|
@@ -112,3 +111,10 @@ Tabs.List = TabList;
|
|
|
112
111
|
Tabs.Panel = TabPanel;
|
|
113
112
|
|
|
114
113
|
export default Tabs;
|
|
114
|
+
export { Tab as TabsTab, TabList as TabsList, TabPanel as TabsPanel };
|
|
115
|
+
export type {
|
|
116
|
+
TabsProps,
|
|
117
|
+
TabProps as TabsTabProps,
|
|
118
|
+
TabListProps as TabsListProps,
|
|
119
|
+
TabPanelProps as TabsPanelProps,
|
|
120
|
+
};
|
package/src/tabs/index.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { default as Tabs } from "./Tabs";
|
|
3
|
-
export type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "./
|
|
9
|
-
export {
|
|
10
|
-
default as TabsPanel,
|
|
11
|
-
type TabPanelProps,
|
|
12
|
-
} from "./parts/tabpanel/TabPanel";
|
|
2
|
+
export { default as Tabs, TabsTab, TabsList, TabsPanel } from "./Tabs";
|
|
3
|
+
export type {
|
|
4
|
+
TabsProps,
|
|
5
|
+
TabsTabProps,
|
|
6
|
+
TabsListProps,
|
|
7
|
+
TabsPanelProps,
|
|
8
|
+
} from "./Tabs";
|
|
@@ -9,15 +9,14 @@ import {
|
|
|
9
9
|
useToggleGroupDescendants,
|
|
10
10
|
} from "./ToggleGroup.context";
|
|
11
11
|
import { ToggleGroupProps } from "./ToggleGroup.types";
|
|
12
|
-
import ToggleItem from "./parts/ToggleItem";
|
|
12
|
+
import ToggleItem, { ToggleGroupItemProps } from "./parts/ToggleItem";
|
|
13
13
|
import { useToggleGroup } from "./useToggleGroup";
|
|
14
14
|
|
|
15
|
-
interface ToggleGroupComponent
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
> {
|
|
15
|
+
interface ToggleGroupComponent extends React.ForwardRefExoticComponent<
|
|
16
|
+
ToggleGroupProps & React.RefAttributes<HTMLDivElement>
|
|
17
|
+
> {
|
|
19
18
|
/**
|
|
20
|
-
* @see 🏷️ {@link
|
|
19
|
+
* @see 🏷️ {@link ToggleGroupItemProps}
|
|
21
20
|
*/
|
|
22
21
|
Item: typeof ToggleItem;
|
|
23
22
|
}
|
|
@@ -134,3 +133,5 @@ function variantToColor(
|
|
|
134
133
|
ToggleGroup.Item = ToggleItem;
|
|
135
134
|
|
|
136
135
|
export default ToggleGroup;
|
|
136
|
+
export { ToggleItem as ToggleGroupItem };
|
|
137
|
+
export type { ToggleGroupProps, ToggleGroupItemProps };
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { default as ToggleGroup } from "./ToggleGroup";
|
|
3
|
-
export type { ToggleGroupProps } from "./ToggleGroup
|
|
4
|
-
export {
|
|
5
|
-
default as ToggleGroupItem,
|
|
6
|
-
type ToggleGroupItemProps,
|
|
7
|
-
} from "./parts/ToggleItem";
|
|
2
|
+
export { default as ToggleGroup, ToggleGroupItem } from "./ToggleGroup";
|
|
3
|
+
export type { ToggleGroupProps, ToggleGroupItemProps } from "./ToggleGroup";
|