@navikt/ds-react 8.1.0 → 8.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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/action-bar/root/DataActionBarRoot.d.ts +27 -0
- package/cjs/data/action-bar/root/DataActionBarRoot.js +49 -0
- package/cjs/data/action-bar/root/DataActionBarRoot.js.map +1 -0
- package/cjs/data/filter/index.d.ts +2 -0
- package/cjs/data/filter/index.js +8 -0
- package/cjs/data/filter/index.js.map +1 -0
- package/cjs/data/filter/item/DataFilterItem.d.ts +5 -0
- package/cjs/data/filter/item/DataFilterItem.js +24 -0
- package/cjs/data/filter/item/DataFilterItem.js.map +1 -0
- package/cjs/data/filter/root/DataFilterRoot.d.ts +23 -0
- package/cjs/data/filter/root/DataFilterRoot.js +28 -0
- package/cjs/data/filter/root/DataFilterRoot.js.map +1 -0
- package/cjs/data/stories/dummy-data.d.ts +17 -0
- package/cjs/data/stories/dummy-data.js +1526 -0
- package/cjs/data/stories/dummy-data.js.map +1 -0
- package/cjs/data/table/caption/DataTableCaption.d.ts +5 -0
- package/cjs/data/table/caption/DataTableCaption.js +55 -0
- package/cjs/data/table/caption/DataTableCaption.js.map +1 -0
- package/cjs/data/table/index.d.ts +2 -0
- package/cjs/data/table/index.js +16 -0
- package/cjs/data/table/index.js.map +1 -0
- package/cjs/data/table/root/DataTableRoot.d.ts +94 -0
- package/cjs/data/table/root/DataTableRoot.js +75 -0
- package/cjs/data/table/root/DataTableRoot.js.map +1 -0
- package/cjs/data/table/tbody/DataTableTbody.d.ts +5 -0
- package/cjs/data/table/tbody/DataTableTbody.js +55 -0
- package/cjs/data/table/tbody/DataTableTbody.js.map +1 -0
- package/cjs/data/table/td/DataTableTd.d.ts +5 -0
- package/cjs/data/table/td/DataTableTd.js +56 -0
- package/cjs/data/table/td/DataTableTd.js.map +1 -0
- package/cjs/data/table/th/DataTableTh.d.ts +15 -0
- package/cjs/data/table/th/DataTableTh.js +60 -0
- package/cjs/data/table/th/DataTableTh.js.map +1 -0
- package/cjs/data/table/thead/DataTableThead.d.ts +5 -0
- package/cjs/data/table/thead/DataTableThead.js +55 -0
- package/cjs/data/table/thead/DataTableThead.js.map +1 -0
- package/cjs/data/table/tr/DataTableTr.d.ts +5 -0
- package/cjs/data/table/tr/DataTableTr.js +55 -0
- package/cjs/data/table/tr/DataTableTr.js.map +1 -0
- 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/index.d.ts +2 -0
- package/cjs/data/toolbar/index.js +9 -0
- package/cjs/data/toolbar/index.js.map +1 -0
- package/cjs/data/toolbar/root/DataToolbarRoot.d.ts +43 -0
- package/cjs/data/toolbar/root/DataToolbarRoot.js +35 -0
- package/cjs/data/toolbar/root/DataToolbarRoot.js.map +1 -0
- package/cjs/data/toolbar/search-field/DataToolbarSearchField.d.ts +8 -0
- package/cjs/data/toolbar/search-field/DataToolbarSearchField.js +29 -0
- package/cjs/data/toolbar/search-field/DataToolbarSearchField.js.map +1 -0
- package/cjs/data/toolbar/toggle-button/DataToolbarToggleButton.d.ts +37 -0
- package/cjs/data/toolbar/toggle-button/DataToolbarToggleButton.js +33 -0
- package/cjs/data/toolbar/toggle-button/DataToolbarToggleButton.js.map +1 -0
- 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/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 +16 -16
- package/cjs/internal-header/InternalHeader.js +10 -7
- 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 +53 -43
- package/cjs/overlays/action-menu/ActionMenu.js +9 -10
- 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/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/action-bar/root/DataActionBarRoot.d.ts +27 -0
- package/esm/data/action-bar/root/DataActionBarRoot.js +43 -0
- package/esm/data/action-bar/root/DataActionBarRoot.js.map +1 -0
- package/esm/data/filter/index.d.ts +2 -0
- package/esm/data/filter/index.js +3 -0
- package/esm/data/filter/index.js.map +1 -0
- package/esm/data/filter/item/DataFilterItem.d.ts +5 -0
- package/esm/data/filter/item/DataFilterItem.js +18 -0
- package/esm/data/filter/item/DataFilterItem.js.map +1 -0
- package/esm/data/filter/root/DataFilterRoot.d.ts +23 -0
- package/esm/data/filter/root/DataFilterRoot.js +21 -0
- package/esm/data/filter/root/DataFilterRoot.js.map +1 -0
- package/esm/data/stories/dummy-data.d.ts +17 -0
- package/esm/data/stories/dummy-data.js +1520 -0
- package/esm/data/stories/dummy-data.js.map +1 -0
- package/esm/data/table/caption/DataTableCaption.d.ts +5 -0
- package/esm/data/table/caption/DataTableCaption.js +19 -0
- package/esm/data/table/caption/DataTableCaption.js.map +1 -0
- package/esm/data/table/index.d.ts +2 -0
- package/esm/data/table/index.js +3 -0
- package/esm/data/table/index.js.map +1 -0
- package/esm/data/table/root/DataTableRoot.d.ts +94 -0
- package/esm/data/table/root/DataTableRoot.js +33 -0
- package/esm/data/table/root/DataTableRoot.js.map +1 -0
- package/esm/data/table/tbody/DataTableTbody.d.ts +5 -0
- package/esm/data/table/tbody/DataTableTbody.js +19 -0
- package/esm/data/table/tbody/DataTableTbody.js.map +1 -0
- package/esm/data/table/td/DataTableTd.d.ts +5 -0
- package/esm/data/table/td/DataTableTd.js +20 -0
- package/esm/data/table/td/DataTableTd.js.map +1 -0
- package/esm/data/table/th/DataTableTh.d.ts +15 -0
- package/esm/data/table/th/DataTableTh.js +24 -0
- package/esm/data/table/th/DataTableTh.js.map +1 -0
- package/esm/data/table/thead/DataTableThead.d.ts +5 -0
- package/esm/data/table/thead/DataTableThead.js +19 -0
- package/esm/data/table/thead/DataTableThead.js.map +1 -0
- package/esm/data/table/tr/DataTableTr.d.ts +5 -0
- package/esm/data/table/tr/DataTableTr.js +19 -0
- package/esm/data/table/tr/DataTableTr.js.map +1 -0
- 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/index.d.ts +2 -0
- package/esm/data/toolbar/index.js +3 -0
- package/esm/data/toolbar/index.js.map +1 -0
- package/esm/data/toolbar/root/DataToolbarRoot.d.ts +43 -0
- package/esm/data/toolbar/root/DataToolbarRoot.js +26 -0
- package/esm/data/toolbar/root/DataToolbarRoot.js.map +1 -0
- package/esm/data/toolbar/search-field/DataToolbarSearchField.d.ts +8 -0
- package/esm/data/toolbar/search-field/DataToolbarSearchField.js +23 -0
- package/esm/data/toolbar/search-field/DataToolbarSearchField.js.map +1 -0
- package/esm/data/toolbar/toggle-button/DataToolbarToggleButton.d.ts +37 -0
- package/esm/data/toolbar/toggle-button/DataToolbarToggleButton.js +27 -0
- package/esm/data/toolbar/toggle-button/DataToolbarToggleButton.js.map +1 -0
- 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/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 +16 -16
- package/esm/internal-header/InternalHeader.js +6 -6
- 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 +53 -43
- package/esm/overlays/action-menu/ActionMenu.js +9 -10
- 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 +8 -8
- package/src/accordion/Accordion.tsx +14 -14
- 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/action-bar/root/DataActionBarRoot.tsx +59 -0
- package/src/data/filter/index.ts +6 -0
- package/src/data/filter/item/DataFilterItem.tsx +12 -0
- package/src/data/filter/root/DataFilterRoot.tsx +42 -0
- package/src/data/stories/dummy-data.tsx +1596 -0
- package/src/data/table/Readme.md +11 -0
- package/src/data/table/caption/DataTableCaption.tsx +20 -0
- package/src/data/table/index.tsx +19 -0
- package/src/data/table/root/DataTableRoot.tsx +145 -0
- package/src/data/table/tbody/DataTableTbody.tsx +19 -0
- package/src/data/table/td/DataTableTd.tsx +21 -0
- package/src/data/table/th/DataTableTh.tsx +70 -0
- package/src/data/table/thead/DataTableThead.tsx +19 -0
- package/src/data/table/tr/DataTableTr.tsx +19 -0
- package/src/data/toolbar/button/DataToolbarButton.tsx +34 -0
- package/src/data/toolbar/index.ts +11 -0
- package/src/data/toolbar/root/DataToolbarRoot.tsx +86 -0
- package/src/data/toolbar/search-field/DataToolbarSearchField.tsx +30 -0
- package/src/data/toolbar/toggle-button/DataToolbarToggleButton.tsx +67 -0
- 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/form/file-upload/FileUpload.tsx +5 -6
- package/src/form/search/Search.tsx +9 -6
- package/src/internal-header/InternalHeader.tsx +26 -21
- 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 +114 -86
- 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
|
@@ -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
|
}
|
|
@@ -544,9 +545,14 @@ interface ActionMenuItemProps extends Omit<MenuItemProps, "asChild"> {
|
|
|
544
545
|
*/
|
|
545
546
|
variant?: "danger";
|
|
546
547
|
/**
|
|
547
|
-
* Adds an icon on the left side. The icon will always have aria-hidden.
|
|
548
|
+
* Adds an icon on the left side. For right side position use iconPosition. The icon will always have aria-hidden.
|
|
548
549
|
*/
|
|
549
550
|
icon?: React.ReactNode;
|
|
551
|
+
/**
|
|
552
|
+
* Position of icon.
|
|
553
|
+
* @default "left"
|
|
554
|
+
*/
|
|
555
|
+
iconPosition?: "left" | "right";
|
|
550
556
|
}
|
|
551
557
|
|
|
552
558
|
export const ActionMenuItem: OverridableComponent<
|
|
@@ -561,6 +567,7 @@ export const ActionMenuItem: OverridableComponent<
|
|
|
561
567
|
icon,
|
|
562
568
|
shortcut,
|
|
563
569
|
variant,
|
|
570
|
+
iconPosition = "left",
|
|
564
571
|
...rest
|
|
565
572
|
},
|
|
566
573
|
ref,
|
|
@@ -570,15 +577,18 @@ export const ActionMenuItem: OverridableComponent<
|
|
|
570
577
|
{...rest}
|
|
571
578
|
className={cl("aksel-action-menu__item", className, {
|
|
572
579
|
"aksel-action-menu__item--danger": variant === "danger",
|
|
573
|
-
"aksel-action-menu__item--has-icon": icon,
|
|
574
580
|
})}
|
|
581
|
+
data-marker={icon ? iconPosition : undefined}
|
|
575
582
|
aria-keyshortcuts={shortcut ?? undefined}
|
|
576
583
|
asChild
|
|
577
584
|
>
|
|
578
585
|
<Component ref={ref}>
|
|
579
586
|
{children}
|
|
580
587
|
{icon && (
|
|
581
|
-
<Marker
|
|
588
|
+
<Marker
|
|
589
|
+
placement={iconPosition}
|
|
590
|
+
className="aksel-action-menu__marker-icon"
|
|
591
|
+
>
|
|
582
592
|
{icon}
|
|
583
593
|
</Marker>
|
|
584
594
|
)}
|
|
@@ -597,8 +607,10 @@ type MenuCheckboxItemProps = React.ComponentPropsWithoutRef<
|
|
|
597
607
|
typeof Menu.CheckboxItem
|
|
598
608
|
>;
|
|
599
609
|
|
|
600
|
-
interface ActionMenuCheckboxItemProps
|
|
601
|
-
|
|
610
|
+
interface ActionMenuCheckboxItemProps extends Omit<
|
|
611
|
+
MenuCheckboxItemProps,
|
|
612
|
+
"asChild"
|
|
613
|
+
> {
|
|
602
614
|
children: React.ReactNode;
|
|
603
615
|
/**
|
|
604
616
|
* Shows connected shortcut-keys for the item.
|
|
@@ -632,10 +644,8 @@ export const ActionMenuCheckboxItem = forwardRef<
|
|
|
632
644
|
event.preventDefault();
|
|
633
645
|
})}
|
|
634
646
|
asChild={false}
|
|
635
|
-
className={cl(
|
|
636
|
-
|
|
637
|
-
className,
|
|
638
|
-
)}
|
|
647
|
+
className={cl("aksel-action-menu__item", className)}
|
|
648
|
+
data-marker="left"
|
|
639
649
|
aria-keyshortcuts={shortcut}
|
|
640
650
|
>
|
|
641
651
|
{children}
|
|
@@ -768,10 +778,8 @@ export const ActionMenuRadioItem = forwardRef<
|
|
|
768
778
|
event.preventDefault();
|
|
769
779
|
})}
|
|
770
780
|
asChild={false}
|
|
771
|
-
className={cl(
|
|
772
|
-
|
|
773
|
-
className,
|
|
774
|
-
)}
|
|
781
|
+
className={cl("aksel-action-menu__item", className)}
|
|
782
|
+
data-marker="left"
|
|
775
783
|
>
|
|
776
784
|
{children}
|
|
777
785
|
<Marker placement="left">
|
|
@@ -885,46 +893,66 @@ type ActionMenuSubTriggerElement = React.ElementRef<typeof Menu.SubTrigger>;
|
|
|
885
893
|
type MenuSubTriggerProps = React.ComponentPropsWithoutRef<
|
|
886
894
|
typeof Menu.SubTrigger
|
|
887
895
|
>;
|
|
888
|
-
interface ActionMenuSubTriggerProps
|
|
889
|
-
|
|
896
|
+
interface ActionMenuSubTriggerProps extends Omit<
|
|
897
|
+
MenuSubTriggerProps,
|
|
898
|
+
"asChild"
|
|
899
|
+
> {
|
|
890
900
|
icon?: React.ReactNode;
|
|
901
|
+
/**
|
|
902
|
+
* Position of icon.
|
|
903
|
+
* @default "left"
|
|
904
|
+
*/
|
|
905
|
+
iconPosition?: "left" | "right";
|
|
891
906
|
}
|
|
892
907
|
|
|
893
908
|
export const ActionMenuSubTrigger = forwardRef<
|
|
894
909
|
ActionMenuSubTriggerElement,
|
|
895
910
|
ActionMenuSubTriggerProps
|
|
896
|
-
>(
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
911
|
+
>(
|
|
912
|
+
(
|
|
913
|
+
{
|
|
914
|
+
children,
|
|
915
|
+
className,
|
|
916
|
+
icon,
|
|
917
|
+
iconPosition = "left",
|
|
918
|
+
...rest
|
|
919
|
+
}: ActionMenuSubTriggerProps,
|
|
920
|
+
ref,
|
|
921
|
+
) => {
|
|
922
|
+
return (
|
|
923
|
+
<Menu.SubTrigger
|
|
924
|
+
ref={ref}
|
|
925
|
+
{...rest}
|
|
926
|
+
asChild={false}
|
|
927
|
+
className={cl(
|
|
928
|
+
"aksel-action-menu__item aksel-action-menu__sub-trigger",
|
|
929
|
+
className,
|
|
930
|
+
)}
|
|
931
|
+
data-marker={icon ? iconPosition : undefined}
|
|
932
|
+
>
|
|
933
|
+
{children}
|
|
934
|
+
{icon && (
|
|
935
|
+
<Marker
|
|
936
|
+
placement={iconPosition}
|
|
937
|
+
className="aksel-action-menu__marker-icon"
|
|
938
|
+
>
|
|
939
|
+
{icon}
|
|
940
|
+
</Marker>
|
|
941
|
+
)}
|
|
942
|
+
<Marker placement="right" className="aksel-action-menu__marker-icon">
|
|
943
|
+
<ChevronRightIcon aria-hidden />
|
|
912
944
|
</Marker>
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
</Menu.SubTrigger>
|
|
918
|
-
);
|
|
919
|
-
});
|
|
945
|
+
</Menu.SubTrigger>
|
|
946
|
+
);
|
|
947
|
+
},
|
|
948
|
+
);
|
|
920
949
|
|
|
921
950
|
/* -------------------------------------------------------------------------- */
|
|
922
951
|
/* ActionMenuSubContent */
|
|
923
952
|
/* -------------------------------------------------------------------------- */
|
|
924
953
|
type ActionMenuSubContentElement = React.ElementRef<typeof Menu.Content>;
|
|
925
954
|
|
|
926
|
-
interface ActionMenuSubContentProps
|
|
927
|
-
extends React.HTMLAttributes<HTMLDivElement> {
|
|
955
|
+
interface ActionMenuSubContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
928
956
|
children: React.ReactNode;
|
|
929
957
|
}
|
|
930
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";
|