@navikt/ds-react 5.6.4 → 5.7.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/_docs.json +297 -257
- package/cjs/accordion/AccordionContent.js +2 -2
- package/cjs/accordion/AccordionHeader.js +2 -2
- package/cjs/alert/Alert.js +2 -2
- package/cjs/button/Button.js +6 -5
- package/cjs/copybutton/CopyButton.js +8 -7
- package/cjs/date/DateInput.js +6 -5
- package/cjs/date/datepicker/DatePicker.js +6 -5
- package/cjs/date/datepicker/DatePickerStandalone.js +6 -6
- package/cjs/date/datepicker/parts/Caption.js +5 -4
- package/cjs/date/datepicker/parts/DropdownCaption.js +7 -6
- package/cjs/date/datepicker/parts/WeekRow.js +1 -1
- package/cjs/date/datepicker/types.js +2 -0
- package/cjs/date/monthpicker/MonthCaption.js +5 -4
- package/cjs/date/monthpicker/MonthPicker.js +4 -3
- package/cjs/date/monthpicker/MonthSelector.js +2 -2
- package/cjs/date/monthpicker/types.js +2 -0
- package/cjs/date/utils/parse-date.js +7 -7
- package/cjs/dropdown/Dropdown.js +4 -4
- package/cjs/dropdown/Menu/GroupedList/GroupedItem.js +2 -2
- package/cjs/dropdown/Menu/List/Item.js +3 -3
- package/cjs/dropdown/Menu/index.js +2 -2
- package/cjs/dropdown/Toggle.js +3 -3
- package/cjs/dropdown/context.js +5 -0
- package/cjs/expansion-card/ExpansionCard.js +3 -7
- package/cjs/expansion-card/ExpansionCardContent.js +4 -4
- package/cjs/expansion-card/ExpansionCardDescription.js +5 -5
- package/cjs/expansion-card/ExpansionCardHeader.js +3 -3
- package/cjs/expansion-card/ExpansionCardTitle.js +1 -1
- package/cjs/expansion-card/context.js +9 -0
- package/cjs/form/ConfirmationPanel.js +8 -6
- package/cjs/form/Fieldset/Fieldset.js +11 -10
- package/cjs/form/Fieldset/context.js +5 -0
- package/cjs/form/Fieldset/index.js +2 -1
- package/cjs/form/Select.js +8 -7
- package/cjs/form/Switch.js +7 -5
- package/cjs/form/TextField.js +6 -5
- package/cjs/form/Textarea.js +8 -7
- package/cjs/form/checkbox/Checkbox.js +1 -1
- package/cjs/form/checkbox/CheckboxGroup.js +4 -4
- package/cjs/form/checkbox/types.js +2 -0
- package/cjs/form/checkbox/useCheckbox.js +2 -2
- package/cjs/form/combobox/Combobox.js +6 -5
- package/cjs/form/combobox/FilteredOptions/FilteredOptions.js +6 -5
- package/cjs/form/combobox/Input/Input.js +2 -2
- package/cjs/form/combobox/SelectedOptions/SelectedOptions.js +3 -3
- package/cjs/form/error-summary/ErrorSummary.js +3 -3
- package/cjs/form/radio/RadioGroup.js +6 -6
- package/cjs/form/radio/types.js +2 -0
- package/cjs/form/radio/useRadio.js +2 -2
- package/cjs/form/search/Search.js +10 -9
- package/cjs/form/search/SearchButton.js +5 -5
- package/cjs/form/search/context.js +5 -0
- package/cjs/form/useFormField.js +5 -5
- package/cjs/guide-panel/Illustration.js +2 -2
- package/cjs/help-text/HelpText.js +5 -4
- package/cjs/link-panel/LinkPanel.js +2 -2
- package/cjs/link-panel/LinkPanelDescription.js +2 -2
- package/cjs/list/List.js +4 -8
- package/cjs/list/ListItem.js +2 -2
- package/cjs/list/context.js +9 -0
- package/cjs/list/types.js +2 -0
- package/cjs/loader/Loader.js +4 -4
- package/cjs/modal/Modal.js +24 -22
- package/cjs/modal/types.js +2 -0
- package/cjs/pagination/Pagination.js +5 -5
- package/cjs/pagination/PaginationItem.js +2 -2
- package/cjs/popover/Popover.js +4 -5
- package/cjs/stepper/Step.js +5 -5
- package/cjs/stepper/Stepper.js +4 -4
- package/cjs/stepper/context.js +5 -0
- package/cjs/table/ColumnHeader.js +3 -3
- package/cjs/table/DataCell.js +2 -2
- package/cjs/table/ExpandableRow.js +2 -2
- package/cjs/table/Table.js +7 -7
- package/cjs/table/context.js +5 -0
- package/cjs/table/types.js +2 -0
- package/cjs/tabs/Tab.js +4 -4
- package/cjs/tabs/TabList.js +5 -5
- package/cjs/tabs/Tabs.js +3 -3
- package/cjs/tabs/context.js +5 -0
- package/cjs/tag/Tag.js +2 -2
- package/cjs/timeline/period/NonClickablePeriod.js +1 -1
- package/cjs/timeline/period/types.js +2 -0
- package/cjs/toggle-group/ToggleGroup.js +7 -6
- package/cjs/toggle-group/ToggleItem.js +4 -4
- package/cjs/toggle-group/context.js +5 -0
- package/cjs/tooltip/Tooltip.js +4 -3
- package/cjs/util/TextareaAutoSize.js +4 -4
- package/cjs/util/index.js +7 -38
- package/cjs/util/omit.js +7 -0
- package/cjs/util/useClientLayoutEffect.js +10 -0
- package/cjs/util/useEventListener.js +17 -0
- package/esm/accordion/AccordionContent.js +1 -1
- package/esm/accordion/AccordionContent.js.map +1 -1
- package/esm/accordion/AccordionHeader.js +1 -1
- package/esm/accordion/AccordionHeader.js.map +1 -1
- package/esm/alert/Alert.js +1 -1
- package/esm/alert/Alert.js.map +1 -1
- package/esm/button/Button.d.ts +1 -1
- package/esm/button/Button.js +4 -3
- package/esm/button/Button.js.map +1 -1
- package/esm/chips/Chips.d.ts +1 -1
- package/esm/chips/Toggle.d.ts +1 -1
- package/esm/copybutton/CopyButton.d.ts +7 -7
- package/esm/copybutton/CopyButton.js +7 -6
- package/esm/copybutton/CopyButton.js.map +1 -1
- package/esm/date/DateInput.js +2 -1
- package/esm/date/DateInput.js.map +1 -1
- package/esm/date/datepicker/DatePicker.d.ts +5 -105
- package/esm/date/datepicker/DatePicker.js +4 -3
- package/esm/date/datepicker/DatePicker.js.map +1 -1
- package/esm/date/datepicker/DatePickerStandalone.d.ts +1 -1
- package/esm/date/datepicker/DatePickerStandalone.js +5 -5
- package/esm/date/datepicker/DatePickerStandalone.js.map +1 -1
- package/esm/date/datepicker/parts/Caption.js +2 -1
- package/esm/date/datepicker/parts/Caption.js.map +1 -1
- package/esm/date/datepicker/parts/DropdownCaption.js +3 -2
- package/esm/date/datepicker/parts/DropdownCaption.js.map +1 -1
- package/esm/date/datepicker/parts/WeekRow.js +1 -1
- package/esm/date/datepicker/parts/WeekRow.js.map +1 -1
- package/esm/date/datepicker/types.d.ts +102 -0
- package/esm/date/datepicker/types.js +2 -0
- package/esm/date/datepicker/types.js.map +1 -0
- package/esm/date/hooks/useMonthPicker.d.ts +1 -1
- package/esm/date/index.d.ts +4 -3
- package/esm/date/index.js +1 -1
- package/esm/date/index.js.map +1 -1
- package/esm/date/monthpicker/MonthCaption.js +2 -1
- package/esm/date/monthpicker/MonthCaption.js.map +1 -1
- package/esm/date/monthpicker/MonthPicker.d.ts +5 -86
- package/esm/date/monthpicker/MonthPicker.js +3 -2
- package/esm/date/monthpicker/MonthPicker.js.map +1 -1
- package/esm/date/monthpicker/MonthPickerStandalone.d.ts +1 -1
- package/esm/date/monthpicker/MonthPickerStandalone.js.map +1 -1
- package/esm/date/monthpicker/MonthSelector.js +1 -1
- package/esm/date/monthpicker/MonthSelector.js.map +1 -1
- package/esm/date/monthpicker/types.d.ts +83 -0
- package/esm/date/monthpicker/types.js +2 -0
- package/esm/date/monthpicker/types.js.map +1 -0
- package/esm/date/utils/parse-date.js +1 -1
- package/esm/date/utils/parse-date.js.map +1 -1
- package/esm/dropdown/Dropdown.d.ts +1 -9
- package/esm/dropdown/Dropdown.js +3 -3
- package/esm/dropdown/Dropdown.js.map +1 -1
- package/esm/dropdown/Menu/GroupedList/GroupedItem.d.ts +1 -1
- package/esm/dropdown/Menu/GroupedList/GroupedItem.js +1 -1
- package/esm/dropdown/Menu/GroupedList/GroupedItem.js.map +1 -1
- package/esm/dropdown/Menu/GroupedList/index.d.ts +1 -1
- package/esm/dropdown/Menu/List/Item.d.ts +1 -1
- package/esm/dropdown/Menu/List/Item.js +2 -2
- package/esm/dropdown/Menu/List/Item.js.map +1 -1
- package/esm/dropdown/Menu/List/index.d.ts +1 -1
- package/esm/dropdown/Menu/index.js +1 -1
- package/esm/dropdown/Menu/index.js.map +1 -1
- package/esm/dropdown/Toggle.js +2 -2
- package/esm/dropdown/Toggle.js.map +1 -1
- package/esm/dropdown/context.d.ts +9 -0
- package/esm/dropdown/context.js +3 -0
- package/esm/dropdown/context.js.map +1 -0
- package/esm/expansion-card/ExpansionCard.d.ts +1 -7
- package/esm/expansion-card/ExpansionCard.js +2 -6
- package/esm/expansion-card/ExpansionCard.js.map +1 -1
- package/esm/expansion-card/ExpansionCardContent.js +2 -2
- package/esm/expansion-card/ExpansionCardContent.js.map +1 -1
- package/esm/expansion-card/ExpansionCardDescription.js +3 -3
- package/esm/expansion-card/ExpansionCardDescription.js.map +1 -1
- package/esm/expansion-card/ExpansionCardHeader.js +2 -2
- package/esm/expansion-card/ExpansionCardHeader.js.map +1 -1
- package/esm/expansion-card/ExpansionCardTitle.d.ts +1 -1
- package/esm/expansion-card/ExpansionCardTitle.js +1 -1
- package/esm/expansion-card/ExpansionCardTitle.js.map +1 -1
- package/esm/expansion-card/context.d.ts +7 -0
- package/esm/expansion-card/context.js +7 -0
- package/esm/expansion-card/context.js.map +1 -0
- package/esm/form/ConfirmationPanel.d.ts +1 -1
- package/esm/form/ConfirmationPanel.js +4 -2
- package/esm/form/ConfirmationPanel.js.map +1 -1
- package/esm/form/Fieldset/Fieldset.d.ts +0 -23
- package/esm/form/Fieldset/Fieldset.js +4 -3
- package/esm/form/Fieldset/Fieldset.js.map +1 -1
- package/esm/form/Fieldset/context.d.ts +24 -0
- package/esm/form/Fieldset/context.js +3 -0
- package/esm/form/Fieldset/context.js.map +1 -0
- package/esm/form/Fieldset/index.d.ts +2 -1
- package/esm/form/Fieldset/index.js +2 -1
- package/esm/form/Fieldset/index.js.map +1 -1
- package/esm/form/Select.js +4 -3
- package/esm/form/Select.js.map +1 -1
- package/esm/form/Switch.js +3 -1
- package/esm/form/Switch.js.map +1 -1
- package/esm/form/TextField.js +2 -1
- package/esm/form/TextField.js.map +1 -1
- package/esm/form/Textarea.js +2 -1
- package/esm/form/Textarea.js.map +1 -1
- package/esm/form/checkbox/Checkbox.d.ts +2 -34
- package/esm/form/checkbox/Checkbox.js +1 -1
- package/esm/form/checkbox/Checkbox.js.map +1 -1
- package/esm/form/checkbox/CheckboxGroup.d.ts +1 -1
- package/esm/form/checkbox/CheckboxGroup.js +2 -2
- package/esm/form/checkbox/CheckboxGroup.js.map +1 -1
- package/esm/form/checkbox/index.d.ts +2 -1
- package/esm/form/checkbox/index.js.map +1 -1
- package/esm/form/checkbox/types.d.ts +34 -0
- package/esm/form/checkbox/types.js +2 -0
- package/esm/form/checkbox/types.js.map +1 -0
- package/esm/form/checkbox/useCheckbox.d.ts +1 -1
- package/esm/form/checkbox/useCheckbox.js +1 -1
- package/esm/form/checkbox/useCheckbox.js.map +1 -1
- package/esm/form/combobox/Combobox.d.ts +1 -1
- package/esm/form/combobox/Combobox.js +2 -1
- package/esm/form/combobox/Combobox.js.map +1 -1
- package/esm/form/combobox/FilteredOptions/FilteredOptions.js +2 -1
- package/esm/form/combobox/FilteredOptions/FilteredOptions.js.map +1 -1
- package/esm/form/combobox/Input/Input.js +1 -1
- package/esm/form/combobox/Input/Input.js.map +1 -1
- package/esm/form/combobox/SelectedOptions/SelectedOptions.js +1 -1
- package/esm/form/combobox/SelectedOptions/SelectedOptions.js.map +1 -1
- package/esm/form/error-summary/ErrorSummary.js +1 -1
- package/esm/form/error-summary/ErrorSummary.js.map +1 -1
- package/esm/form/error-summary/ErrorSummaryItem.d.ts +1 -1
- package/esm/form/radio/Radio.d.ts +2 -16
- package/esm/form/radio/Radio.js.map +1 -1
- package/esm/form/radio/RadioGroup.d.ts +1 -1
- package/esm/form/radio/RadioGroup.js +3 -3
- package/esm/form/radio/RadioGroup.js.map +1 -1
- package/esm/form/radio/index.d.ts +2 -1
- package/esm/form/radio/index.js.map +1 -1
- package/esm/form/radio/types.d.ts +16 -0
- package/esm/form/radio/types.js +2 -0
- package/esm/form/radio/types.js.map +1 -0
- package/esm/form/radio/useRadio.d.ts +1 -1
- package/esm/form/radio/useRadio.js +1 -1
- package/esm/form/radio/useRadio.js.map +1 -1
- package/esm/form/search/Search.d.ts +0 -7
- package/esm/form/search/Search.js +4 -3
- package/esm/form/search/Search.js.map +1 -1
- package/esm/form/search/SearchButton.d.ts +1 -1
- package/esm/form/search/SearchButton.js +3 -3
- package/esm/form/search/SearchButton.js.map +1 -1
- package/esm/form/search/context.d.ts +8 -0
- package/esm/form/search/context.js +3 -0
- package/esm/form/search/context.js.map +1 -0
- package/esm/form/useFormField.js +3 -3
- package/esm/form/useFormField.js.map +1 -1
- package/esm/guide-panel/Illustration.js +1 -1
- package/esm/guide-panel/Illustration.js.map +1 -1
- package/esm/help-text/HelpText.d.ts +1 -1
- package/esm/help-text/HelpText.js +2 -1
- package/esm/help-text/HelpText.js.map +1 -1
- package/esm/link-panel/LinkPanel.d.ts +1 -1
- package/esm/link-panel/LinkPanel.js +1 -1
- package/esm/link-panel/LinkPanel.js.map +1 -1
- package/esm/link-panel/LinkPanelDescription.js +1 -1
- package/esm/link-panel/LinkPanelDescription.js.map +1 -1
- package/esm/list/List.d.ts +4 -35
- package/esm/list/List.js +2 -6
- package/esm/list/List.js.map +1 -1
- package/esm/list/ListItem.js +1 -1
- package/esm/list/ListItem.js.map +1 -1
- package/esm/list/context.d.ts +9 -0
- package/esm/list/context.js +7 -0
- package/esm/list/context.js.map +1 -0
- package/esm/list/index.d.ts +1 -1
- package/esm/list/types.d.ts +27 -0
- package/esm/list/types.js +2 -0
- package/esm/list/types.js.map +1 -0
- package/esm/loader/Loader.js +2 -2
- package/esm/loader/Loader.js.map +1 -1
- package/esm/modal/Modal.d.ts +2 -64
- package/esm/modal/Modal.js +8 -6
- package/esm/modal/Modal.js.map +1 -1
- package/esm/modal/ModalUtils.d.ts +1 -1
- package/esm/modal/index.d.ts +3 -2
- package/esm/modal/index.js.map +1 -1
- package/esm/modal/types.d.ts +64 -0
- package/esm/modal/types.js +2 -0
- package/esm/modal/types.js.map +1 -0
- package/esm/pagination/Pagination.js +1 -1
- package/esm/pagination/Pagination.js.map +1 -1
- package/esm/pagination/PaginationItem.d.ts +2 -1
- package/esm/pagination/PaginationItem.js +1 -1
- package/esm/pagination/PaginationItem.js.map +1 -1
- package/esm/popover/Popover.d.ts +5 -0
- package/esm/popover/Popover.js +5 -6
- package/esm/popover/Popover.js.map +1 -1
- package/esm/stepper/Step.d.ts +1 -1
- package/esm/stepper/Step.js +2 -2
- package/esm/stepper/Step.js.map +1 -1
- package/esm/stepper/Stepper.d.ts +2 -11
- package/esm/stepper/Stepper.js +2 -2
- package/esm/stepper/Stepper.js.map +1 -1
- package/esm/stepper/context.d.ts +10 -0
- package/esm/stepper/context.js +3 -0
- package/esm/stepper/context.js.map +1 -0
- package/esm/table/ColumnHeader.js +2 -2
- package/esm/table/ColumnHeader.js.map +1 -1
- package/esm/table/DataCell.js +1 -1
- package/esm/table/DataCell.js.map +1 -1
- package/esm/table/ExpandableRow.js +1 -1
- package/esm/table/ExpandableRow.js.map +1 -1
- package/esm/table/Table.d.ts +15 -23
- package/esm/table/Table.js +5 -5
- package/esm/table/Table.js.map +1 -1
- package/esm/table/context.d.ts +7 -0
- package/esm/table/context.js +3 -0
- package/esm/table/context.js.map +1 -0
- package/esm/table/index.d.ts +2 -1
- package/esm/table/index.js.map +1 -1
- package/esm/table/types.d.ts +4 -0
- package/esm/table/types.js +2 -0
- package/esm/table/types.js.map +1 -0
- package/esm/tabs/Tab.d.ts +1 -1
- package/esm/tabs/Tab.js +2 -2
- package/esm/tabs/Tab.js.map +1 -1
- package/esm/tabs/TabList.js +2 -2
- package/esm/tabs/TabList.js.map +1 -1
- package/esm/tabs/Tabs.d.ts +0 -6
- package/esm/tabs/Tabs.js +2 -2
- package/esm/tabs/Tabs.js.map +1 -1
- package/esm/tabs/context.d.ts +8 -0
- package/esm/tabs/context.js +3 -0
- package/esm/tabs/context.js.map +1 -0
- package/esm/tabs/index.d.ts +1 -1
- package/esm/tabs/index.js.map +1 -1
- package/esm/tag/Tag.js +1 -1
- package/esm/tag/Tag.js.map +1 -1
- package/esm/timeline/period/ClickablePeriod.d.ts +1 -1
- package/esm/timeline/period/NonClickablePeriod.d.ts +1 -1
- package/esm/timeline/period/NonClickablePeriod.js +1 -1
- package/esm/timeline/period/NonClickablePeriod.js.map +1 -1
- package/esm/timeline/period/index.d.ts +0 -13
- package/esm/timeline/period/index.js.map +1 -1
- package/esm/timeline/period/types.d.ts +14 -0
- package/esm/timeline/period/types.js +2 -0
- package/esm/timeline/period/types.js.map +1 -0
- package/esm/toggle-group/ToggleGroup.d.ts +0 -4
- package/esm/toggle-group/ToggleGroup.js +4 -3
- package/esm/toggle-group/ToggleGroup.js.map +1 -1
- package/esm/toggle-group/ToggleItem.js +3 -3
- package/esm/toggle-group/ToggleItem.js.map +1 -1
- package/esm/toggle-group/context.d.ts +6 -0
- package/esm/toggle-group/context.js +3 -0
- package/esm/toggle-group/context.js.map +1 -0
- package/esm/tooltip/Tooltip.js +2 -1
- package/esm/tooltip/Tooltip.js.map +1 -1
- package/esm/util/TextareaAutoSize.js +1 -1
- package/esm/util/TextareaAutoSize.js.map +1 -1
- package/esm/util/index.d.ts +5 -11
- package/esm/util/index.js +5 -33
- package/esm/util/index.js.map +1 -1
- package/esm/util/omit.d.ts +1 -0
- package/esm/util/omit.js +4 -0
- package/esm/util/omit.js.map +1 -0
- package/esm/util/useClientLayoutEffect.d.ts +2 -0
- package/esm/util/useClientLayoutEffect.js +8 -0
- package/esm/util/useClientLayoutEffect.js.map +1 -0
- package/esm/util/useEventListener.d.ts +5 -0
- package/esm/util/useEventListener.js +14 -0
- package/esm/util/useEventListener.js.map +1 -0
- package/package.json +3 -3
- package/src/accordion/AccordionContent.tsx +1 -1
- package/src/accordion/AccordionHeader.tsx +1 -1
- package/src/alert/Alert.tsx +1 -1
- package/src/button/Button.tsx +9 -3
- package/src/chips/Chips.tsx +1 -1
- package/src/chips/Toggle.tsx +1 -1
- package/src/copybutton/CopyButton.tsx +28 -29
- package/src/copybutton/copy-button.stories.tsx +24 -22
- package/src/date/DateInput.tsx +2 -1
- package/src/date/datepicker/DatePicker.tsx +9 -124
- package/src/date/datepicker/DatePickerStandalone.tsx +9 -9
- package/src/date/datepicker/parts/Caption.tsx +3 -1
- package/src/date/datepicker/parts/DropdownCaption.tsx +3 -2
- package/src/date/datepicker/parts/WeekRow.tsx +1 -1
- package/src/date/datepicker/types.ts +109 -0
- package/src/date/hooks/useMonthPicker.tsx +1 -1
- package/src/date/index.ts +5 -7
- package/src/date/monthpicker/MonthCaption.tsx +2 -1
- package/src/date/monthpicker/MonthPicker.tsx +9 -92
- package/src/date/monthpicker/MonthPickerStandalone.tsx +1 -1
- package/src/date/monthpicker/MonthSelector.tsx +1 -1
- package/src/date/monthpicker/types.ts +83 -0
- package/src/date/utils/parse-date.ts +1 -1
- package/src/dropdown/Dropdown.tsx +3 -12
- package/src/dropdown/Menu/GroupedList/GroupedItem.tsx +2 -2
- package/src/dropdown/Menu/GroupedList/index.tsx +1 -1
- package/src/dropdown/Menu/List/Item.tsx +3 -3
- package/src/dropdown/Menu/List/index.tsx +1 -1
- package/src/dropdown/Menu/index.tsx +1 -1
- package/src/dropdown/Toggle.tsx +2 -2
- package/src/dropdown/context.ts +11 -0
- package/src/expansion-card/ExpansionCard.tsx +3 -14
- package/src/expansion-card/ExpansionCardContent.tsx +2 -2
- package/src/expansion-card/ExpansionCardDescription.tsx +3 -3
- package/src/expansion-card/ExpansionCardHeader.tsx +2 -2
- package/src/expansion-card/ExpansionCardTitle.tsx +2 -2
- package/src/expansion-card/context.ts +13 -0
- package/src/form/ConfirmationPanel.tsx +4 -2
- package/src/form/Fieldset/Fieldset.tsx +4 -29
- package/src/form/Fieldset/context.ts +26 -0
- package/src/form/Fieldset/index.ts +2 -5
- package/src/form/Select.tsx +4 -4
- package/src/form/Switch.tsx +3 -1
- package/src/form/TextField.tsx +2 -1
- package/src/form/Textarea.tsx +2 -1
- package/src/form/checkbox/Checkbox.tsx +3 -38
- package/src/form/checkbox/CheckboxGroup.tsx +2 -2
- package/src/form/checkbox/index.ts +2 -1
- package/src/form/checkbox/types.ts +37 -0
- package/src/form/checkbox/useCheckbox.ts +2 -1
- package/src/form/combobox/Combobox.tsx +2 -1
- package/src/form/combobox/FilteredOptions/FilteredOptions.tsx +2 -1
- package/src/form/combobox/Input/Input.tsx +1 -1
- package/src/form/combobox/SelectedOptions/SelectedOptions.tsx +1 -1
- package/src/form/error-summary/ErrorSummary.tsx +1 -1
- package/src/form/error-summary/ErrorSummaryItem.tsx +1 -1
- package/src/form/radio/Radio.tsx +2 -19
- package/src/form/radio/RadioGroup.tsx +3 -3
- package/src/form/radio/index.ts +2 -1
- package/src/form/radio/types.ts +19 -0
- package/src/form/radio/useRadio.ts +2 -2
- package/src/form/search/Search.tsx +5 -14
- package/src/form/search/SearchButton.tsx +3 -3
- package/src/form/search/context.ts +10 -0
- package/src/form/useFormField.ts +3 -3
- package/src/guide-panel/Illustration.tsx +1 -1
- package/src/help-text/HelpText.tsx +2 -1
- package/src/link-panel/LinkPanel.tsx +2 -1
- package/src/link-panel/LinkPanelDescription.tsx +1 -1
- package/src/list/List.tsx +8 -45
- package/src/list/ListItem.tsx +1 -1
- package/src/list/context.ts +14 -0
- package/src/list/index.ts +1 -1
- package/src/list/types.ts +26 -0
- package/src/loader/Loader.tsx +2 -2
- package/src/modal/Modal.tsx +9 -71
- package/src/modal/ModalUtils.ts +1 -1
- package/src/modal/index.ts +3 -2
- package/src/modal/types.ts +64 -0
- package/src/pagination/Pagination.tsx +1 -1
- package/src/pagination/PaginationItem.tsx +2 -1
- package/src/popover/Popover.tsx +10 -5
- package/src/stepper/Step.tsx +3 -2
- package/src/stepper/Stepper.tsx +3 -13
- package/src/stepper/context.ts +11 -0
- package/src/table/ColumnHeader.tsx +3 -3
- package/src/table/DataCell.tsx +1 -1
- package/src/table/ExpandableRow.tsx +1 -1
- package/src/table/Table.tsx +17 -27
- package/src/table/context.ts +9 -0
- package/src/table/index.ts +2 -1
- package/src/table/types.ts +4 -0
- package/src/tabs/Tab.tsx +3 -2
- package/src/tabs/TabList.tsx +2 -2
- package/src/tabs/Tabs.tsx +2 -9
- package/src/tabs/context.ts +9 -0
- package/src/tabs/index.ts +1 -1
- package/src/tag/Tag.tsx +1 -1
- package/src/timeline/period/ClickablePeriod.tsx +1 -1
- package/src/timeline/period/NonClickablePeriod.tsx +2 -2
- package/src/timeline/period/index.tsx +0 -14
- package/src/timeline/period/types.ts +13 -0
- package/src/timeline/utils/filter.ts +1 -1
- package/src/toggle-group/ToggleGroup.tsx +4 -15
- package/src/toggle-group/ToggleItem.tsx +3 -3
- package/src/toggle-group/context.ts +9 -0
- package/src/tooltip/Tooltip.tsx +2 -1
- package/src/util/TextareaAutoSize.tsx +1 -1
- package/src/util/index.ts +5 -70
- package/src/util/omit.ts +10 -0
- package/src/util/useClientLayoutEffect.ts +11 -0
- package/src/util/useEventListener.ts +32 -0
|
@@ -38,10 +38,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
exports.RadioGroup = exports.RadioGroupContext = void 0;
|
|
41
|
-
const react_1 = __importStar(require("react"));
|
|
42
41
|
const clsx_1 = __importDefault(require("clsx"));
|
|
43
|
-
const
|
|
44
|
-
const
|
|
42
|
+
const react_1 = __importStar(require("react"));
|
|
43
|
+
const util_1 = require("../../util");
|
|
44
|
+
const Fieldset_1 = require("../Fieldset");
|
|
45
45
|
exports.RadioGroupContext = react_1.default.createContext(null);
|
|
46
46
|
/**
|
|
47
47
|
* Form radio group
|
|
@@ -56,9 +56,9 @@ exports.RadioGroupContext = react_1.default.createContext(null);
|
|
|
56
56
|
exports.RadioGroup = (0, react_1.forwardRef)((_a, ref) => {
|
|
57
57
|
var _b, _c;
|
|
58
58
|
var { children, className, name, defaultValue, value, onChange = () => { }, required, readOnly } = _a, rest = __rest(_a, ["children", "className", "name", "defaultValue", "value", "onChange", "required", "readOnly"]);
|
|
59
|
-
const fieldset = (0, react_1.useContext)(
|
|
60
|
-
const nameId = (0,
|
|
61
|
-
return (react_1.default.createElement(
|
|
59
|
+
const fieldset = (0, react_1.useContext)(Fieldset_1.FieldsetContext);
|
|
60
|
+
const nameId = (0, util_1.useId)();
|
|
61
|
+
return (react_1.default.createElement(Fieldset_1.Fieldset, Object.assign({}, rest, { readOnly: readOnly, ref: ref, className: (0, clsx_1.default)(className, "navds-radio-group", `navds-radio-group--${(_c = (_b = rest.size) !== null && _b !== void 0 ? _b : fieldset === null || fieldset === void 0 ? void 0 : fieldset.size) !== null && _c !== void 0 ? _c : "medium"}`), nativeReadOnly: false }),
|
|
62
62
|
react_1.default.createElement(exports.RadioGroupContext.Provider, { value: {
|
|
63
63
|
name: name !== null && name !== void 0 ? name : `radioGroupName-${nameId}`,
|
|
64
64
|
defaultValue,
|
|
@@ -13,15 +13,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.useRadio = void 0;
|
|
15
15
|
const react_1 = require("react");
|
|
16
|
+
const util_1 = require("../../util");
|
|
16
17
|
const useFormField_1 = require("../useFormField");
|
|
17
18
|
const RadioGroup_1 = require("./RadioGroup");
|
|
18
|
-
const __1 = require("../..");
|
|
19
19
|
/**
|
|
20
20
|
* Handles props for Radios in context with Fieldset and RadioGroup
|
|
21
21
|
*/
|
|
22
22
|
const useRadio = (props) => {
|
|
23
23
|
const radioGroup = (0, react_1.useContext)(RadioGroup_1.RadioGroupContext);
|
|
24
|
-
const _a = (0, useFormField_1.useFormField)((0,
|
|
24
|
+
const _a = (0, useFormField_1.useFormField)((0, util_1.omit)(props, ["description"]), "radio"), { inputProps, readOnly } = _a, rest = __rest(_a, ["inputProps", "readOnly"]);
|
|
25
25
|
if (!radioGroup) {
|
|
26
26
|
console.warn("<Radio> must be used inside <RadioGroup>.");
|
|
27
27
|
}
|
|
@@ -37,14 +37,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.Search =
|
|
40
|
+
exports.Search = void 0;
|
|
41
41
|
const aksel_icons_1 = require("@navikt/aksel-icons");
|
|
42
42
|
const clsx_1 = __importDefault(require("clsx"));
|
|
43
43
|
const react_1 = __importStar(require("react"));
|
|
44
|
-
const
|
|
44
|
+
const typography_1 = require("../../typography");
|
|
45
|
+
const util_1 = require("../../util");
|
|
45
46
|
const useFormField_1 = require("../useFormField");
|
|
46
47
|
const SearchButton_1 = __importDefault(require("./SearchButton"));
|
|
47
|
-
|
|
48
|
+
const context_1 = require("./context");
|
|
48
49
|
/**
|
|
49
50
|
* A component that displays a search input field.
|
|
50
51
|
*
|
|
@@ -62,7 +63,7 @@ exports.Search = (0, react_1.forwardRef)((props, ref) => {
|
|
|
62
63
|
const { inputProps, size = "medium", inputDescriptionId, errorId, showErrorMsg, hasError, } = (0, useFormField_1.useFormField)(props, "searchfield");
|
|
63
64
|
const { className, hideLabel = true, label, description, value, clearButtonLabel, onClear, clearButton = true, children, variant = "primary", defaultValue, onChange, onSearchClick, htmlSize } = props, rest = __rest(props, ["className", "hideLabel", "label", "description", "value", "clearButtonLabel", "onClear", "clearButton", "children", "variant", "defaultValue", "onChange", "onSearchClick", "htmlSize"]);
|
|
64
65
|
const searchRef = (0, react_1.useRef)(null);
|
|
65
|
-
const mergedRef = (0, react_1.useMemo)(() => (0,
|
|
66
|
+
const mergedRef = (0, react_1.useMemo)(() => (0, util_1.mergeRefs)([searchRef, ref]), [ref]);
|
|
66
67
|
const [internalValue, setInternalValue] = (0, react_1.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : "");
|
|
67
68
|
const handleChange = (0, react_1.useCallback)((v) => {
|
|
68
69
|
value === undefined && setInternalValue(v);
|
|
@@ -93,26 +94,26 @@ exports.Search = (0, react_1.forwardRef)((props, ref) => {
|
|
|
93
94
|
"navds-search--disabled": !!inputProps.disabled,
|
|
94
95
|
"navds-search--with-size": !!htmlSize,
|
|
95
96
|
}) },
|
|
96
|
-
react_1.default.createElement(
|
|
97
|
+
react_1.default.createElement(typography_1.Label, { htmlFor: inputProps.id, size: size, className: (0, clsx_1.default)("navds-form-field__label", {
|
|
97
98
|
"navds-sr-only": hideLabel,
|
|
98
99
|
}) }, label),
|
|
99
|
-
!!description && (react_1.default.createElement(
|
|
100
|
+
!!description && (react_1.default.createElement(typography_1.BodyShort, { className: (0, clsx_1.default)("navds-form-field__description", {
|
|
100
101
|
"navds-sr-only": hideLabel,
|
|
101
102
|
}), id: inputDescriptionId, size: size, as: "div" }, description)),
|
|
102
103
|
react_1.default.createElement("div", { className: "navds-search__wrapper" },
|
|
103
104
|
react_1.default.createElement("div", { className: "navds-search__wrapper-inner" },
|
|
104
105
|
variant === "simple" && (react_1.default.createElement(aksel_icons_1.MagnifyingGlassIcon, { "aria-hidden": true, className: "navds-search__search-icon" })),
|
|
105
|
-
react_1.default.createElement("input", Object.assign({ ref: mergedRef }, (0,
|
|
106
|
+
react_1.default.createElement("input", Object.assign({ ref: mergedRef }, (0, util_1.omit)(rest, ["error", "errorId", "size", "readOnly"]), inputProps, { value: value !== null && value !== void 0 ? value : internalValue, onChange: (e) => handleChange(e.target.value), type: "search", role: "searchbox", className: (0, clsx_1.default)(className, "navds-search__input", `navds-search__input--${variant}`, "navds-text-field__input", "navds-body-short", `navds-body-${size}`) }, (htmlSize ? { size: Number(htmlSize) } : {}))),
|
|
106
107
|
(value !== null && value !== void 0 ? value : internalValue) && clearButton && (react_1.default.createElement("button", { type: "button", onClick: (e) => handleClear({ trigger: "Click", event: e }), className: "navds-search__button-clear" },
|
|
107
108
|
react_1.default.createElement("span", { className: "navds-sr-only" }, clearButtonLabel ? clearButtonLabel : "Tøm"),
|
|
108
109
|
react_1.default.createElement(aksel_icons_1.XMarkIcon, { "aria-hidden": true })))),
|
|
109
|
-
react_1.default.createElement(
|
|
110
|
+
react_1.default.createElement(context_1.SearchContext.Provider, { value: {
|
|
110
111
|
size,
|
|
111
112
|
disabled: inputProps.disabled,
|
|
112
113
|
variant,
|
|
113
114
|
handleClick,
|
|
114
115
|
} }, children ? children : variant !== "simple" && react_1.default.createElement(SearchButton_1.default, null))),
|
|
115
|
-
react_1.default.createElement("div", { className: "navds-form-field__error", id: errorId, "aria-relevant": "additions removals", "aria-live": "polite" }, showErrorMsg && (react_1.default.createElement(
|
|
116
|
+
react_1.default.createElement("div", { className: "navds-form-field__error", id: errorId, "aria-relevant": "additions removals", "aria-live": "polite" }, showErrorMsg && (react_1.default.createElement(typography_1.ErrorMessage, { size: size }, props.error)))));
|
|
116
117
|
});
|
|
117
118
|
exports.Search.Button = SearchButton_1.default;
|
|
118
119
|
exports.default = exports.Search;
|
|
@@ -37,21 +37,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
const aksel_icons_1 = require("@navikt/aksel-icons");
|
|
40
41
|
const clsx_1 = __importDefault(require("clsx"));
|
|
41
42
|
const react_1 = __importStar(require("react"));
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const aksel_icons_1 = require("@navikt/aksel-icons");
|
|
43
|
+
const button_1 = require("../../button");
|
|
44
|
+
const context_1 = require("./context");
|
|
45
45
|
const SearchButton = (0, react_1.forwardRef)((_a, ref) => {
|
|
46
46
|
var _b;
|
|
47
47
|
var { className, children, disabled, onClick } = _a, rest = __rest(_a, ["className", "children", "disabled", "onClick"]);
|
|
48
|
-
const context = (0, react_1.useContext)(
|
|
48
|
+
const context = (0, react_1.useContext)(context_1.SearchContext);
|
|
49
49
|
if (context === null) {
|
|
50
50
|
console.warn("<Search.Button> has to be wrapped in <Search />");
|
|
51
51
|
return null;
|
|
52
52
|
}
|
|
53
53
|
const { size, variant, handleClick } = context;
|
|
54
|
-
return (react_1.default.createElement(
|
|
54
|
+
return (react_1.default.createElement(button_1.Button, Object.assign({ type: "submit" }, rest, { ref: ref, size: size, variant: variant === "secondary" ? "secondary" : "primary", className: (0, clsx_1.default)("navds-search__button-search", className), disabled: (_b = context === null || context === void 0 ? void 0 : context.disabled) !== null && _b !== void 0 ? _b : disabled, onClick: (e) => {
|
|
55
55
|
handleClick();
|
|
56
56
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
57
57
|
}, icon: react_1.default.createElement(aksel_icons_1.MagnifyingGlassIcon, Object.assign({}, (children ? { "aria-hidden": true } : { title: "Søk" }))) }), children));
|
package/cjs/form/useFormField.js
CHANGED
|
@@ -4,18 +4,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useFormField = void 0;
|
|
7
|
-
const react_1 = require("react");
|
|
8
7
|
const clsx_1 = __importDefault(require("clsx"));
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const util_1 = require("../util");
|
|
10
|
+
const context_1 = require("./Fieldset/context");
|
|
11
11
|
/**
|
|
12
12
|
* Handles props and their state for various form-fields in context with Fieldset
|
|
13
13
|
*/
|
|
14
14
|
const useFormField = (props, prefix) => {
|
|
15
15
|
var _a, _b, _c;
|
|
16
16
|
const { size, error, errorId: propErrorId } = props;
|
|
17
|
-
const fieldset = (0, react_1.useContext)(
|
|
18
|
-
const genId = (0,
|
|
17
|
+
const fieldset = (0, react_1.useContext)(context_1.FieldsetContext);
|
|
18
|
+
const genId = (0, util_1.useId)();
|
|
19
19
|
const id = (_a = props.id) !== null && _a !== void 0 ? _a : `${prefix}-${genId}`;
|
|
20
20
|
const errorId = propErrorId !== null && propErrorId !== void 0 ? propErrorId : `${prefix}-error-${genId}`;
|
|
21
21
|
const inputDescriptionId = `${prefix}-description-${genId}`;
|
|
@@ -16,10 +16,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.DefaultIllustration = void 0;
|
|
18
18
|
const react_1 = __importDefault(require("react"));
|
|
19
|
-
const
|
|
19
|
+
const util_1 = require("../util");
|
|
20
20
|
const DefaultIllustration = (_a) => {
|
|
21
21
|
var { title, titleId: _titleId } = _a, props = __rest(_a, ["title", "titleId"]);
|
|
22
|
-
let titleId = (0,
|
|
22
|
+
let titleId = (0, util_1.useId)();
|
|
23
23
|
titleId = title ? (_titleId ? _titleId : "title-" + titleId) : undefined;
|
|
24
24
|
return (react_1.default.createElement("svg", Object.assign({ width: "56", height: "85", viewBox: "0 0 56 85", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-label": "NAV veileder illustrasjon", focusable: false, role: "img", "aria-labelledby": titleId }, props),
|
|
25
25
|
title ? react_1.default.createElement("title", { id: titleId }, title) : null,
|
|
@@ -40,7 +40,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
40
40
|
exports.HelpText = void 0;
|
|
41
41
|
const clsx_1 = __importDefault(require("clsx"));
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
43
|
-
const
|
|
43
|
+
const popover_1 = require("../popover");
|
|
44
|
+
const util_1 = require("../util");
|
|
44
45
|
const HelpTextIcon_1 = require("./HelpTextIcon");
|
|
45
46
|
/**
|
|
46
47
|
* A component that displays a help text button with a popover.
|
|
@@ -58,7 +59,7 @@ const HelpTextIcon_1 = require("./HelpTextIcon");
|
|
|
58
59
|
exports.HelpText = (0, react_1.forwardRef)((_a, ref) => {
|
|
59
60
|
var { className, children, placement = "top", strategy = "absolute", title = "hjelp", onClick, wrapperClassName } = _a, rest = __rest(_a, ["className", "children", "placement", "strategy", "title", "onClick", "wrapperClassName"]);
|
|
60
61
|
const buttonRef = (0, react_1.useRef)(null);
|
|
61
|
-
const mergedRef = (0, react_1.useMemo)(() => (0,
|
|
62
|
+
const mergedRef = (0, react_1.useMemo)(() => (0, util_1.mergeRefs)([buttonRef, ref]), [ref]);
|
|
62
63
|
const [open, setOpen] = (0, react_1.useState)(false);
|
|
63
64
|
return (react_1.default.createElement("div", { className: (0, clsx_1.default)("navds-help-text", wrapperClassName) },
|
|
64
65
|
react_1.default.createElement("button", Object.assign({}, rest, { ref: mergedRef, onClick: (e) => {
|
|
@@ -67,7 +68,7 @@ exports.HelpText = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
67
68
|
}, className: (0, clsx_1.default)(className, "navds-help-text__button"), type: "button", "aria-expanded": open }),
|
|
68
69
|
react_1.default.createElement(HelpTextIcon_1.HelpTextIcon, { title: title }),
|
|
69
70
|
react_1.default.createElement(HelpTextIcon_1.HelpTextIcon, { filled: true, title: title })),
|
|
70
|
-
react_1.default.createElement(
|
|
71
|
-
react_1.default.createElement(
|
|
71
|
+
react_1.default.createElement(popover_1.Popover, { onClose: () => setOpen(false), className: "navds-help-text__popover", open: open, anchorEl: buttonRef.current, placement: placement, strategy: strategy },
|
|
72
|
+
react_1.default.createElement(popover_1.Popover.Content, { className: "navds-body-short" }, children))));
|
|
72
73
|
});
|
|
73
74
|
exports.default = exports.HelpText;
|
|
@@ -39,11 +39,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
exports.LinkPanelComponent = void 0;
|
|
41
41
|
const react_1 = __importStar(require("react"));
|
|
42
|
-
const __1 = require("..");
|
|
43
42
|
const clsx_1 = __importDefault(require("clsx"));
|
|
44
43
|
const LinkPanelTitle_1 = require("./LinkPanelTitle");
|
|
45
44
|
const LinkPanelDescription_1 = require("./LinkPanelDescription");
|
|
46
45
|
const aksel_icons_1 = require("@navikt/aksel-icons");
|
|
46
|
+
const panel_1 = require("../panel");
|
|
47
47
|
/**
|
|
48
48
|
* A component that displays a link panel.
|
|
49
49
|
*
|
|
@@ -63,7 +63,7 @@ const aksel_icons_1 = require("@navikt/aksel-icons");
|
|
|
63
63
|
*/
|
|
64
64
|
exports.LinkPanelComponent = (0, react_1.forwardRef)((_a, ref) => {
|
|
65
65
|
var { children, as = "a", border = true, className } = _a, rest = __rest(_a, ["children", "as", "border", "className"]);
|
|
66
|
-
return (react_1.default.createElement(
|
|
66
|
+
return (react_1.default.createElement(panel_1.Panel, Object.assign({}, rest, { as: as, border: border, ref: ref, className: (0, clsx_1.default)("navds-link-panel", className) }),
|
|
67
67
|
react_1.default.createElement("div", { className: "navds-link-panel__content" }, children),
|
|
68
68
|
react_1.default.createElement(aksel_icons_1.ChevronRightIcon, { className: "navds-link-panel__chevron", "aria-hidden": true })));
|
|
69
69
|
});
|
|
@@ -40,8 +40,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
40
40
|
exports.LinkPanelDescription = void 0;
|
|
41
41
|
const react_1 = __importStar(require("react"));
|
|
42
42
|
const clsx_1 = __importDefault(require("clsx"));
|
|
43
|
-
const
|
|
43
|
+
const typography_1 = require("../typography");
|
|
44
44
|
exports.LinkPanelDescription = (0, react_1.forwardRef)((_a, ref) => {
|
|
45
45
|
var { className } = _a, rest = __rest(_a, ["className"]);
|
|
46
|
-
return (react_1.default.createElement(
|
|
46
|
+
return (react_1.default.createElement(typography_1.BodyLong, Object.assign({}, rest, { as: "div", ref: ref, className: (0, clsx_1.default)("navds-link-panel__description", className) })));
|
|
47
47
|
});
|
package/cjs/list/List.js
CHANGED
|
@@ -37,24 +37,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.List =
|
|
40
|
+
exports.List = void 0;
|
|
41
41
|
const clsx_1 = __importDefault(require("clsx"));
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
43
43
|
const typography_1 = require("../typography");
|
|
44
44
|
const useId_1 = require("../util/useId");
|
|
45
45
|
const ListItem_1 = require("./ListItem");
|
|
46
|
-
|
|
47
|
-
listType: "ul",
|
|
48
|
-
isNested: null,
|
|
49
|
-
size: "medium",
|
|
50
|
-
});
|
|
46
|
+
const context_1 = require("./context");
|
|
51
47
|
exports.List = (0, react_1.forwardRef)((_a, ref) => {
|
|
52
48
|
var _b;
|
|
53
49
|
var { children, className, as: ListTag = "ul", title, description, headingTag = "h3", size } = _a, rest = __rest(_a, ["children", "className", "as", "title", "description", "headingTag", "size"]);
|
|
54
50
|
const ariaId = (0, useId_1.useId)();
|
|
55
|
-
const { isNested, size: _size } = (0, react_1.useContext)(
|
|
51
|
+
const { isNested, size: _size } = (0, react_1.useContext)(context_1.ListContext);
|
|
56
52
|
const listSize = (_b = size !== null && size !== void 0 ? size : _size) !== null && _b !== void 0 ? _b : "medium";
|
|
57
|
-
return (react_1.default.createElement(
|
|
53
|
+
return (react_1.default.createElement(context_1.ListContext.Provider, { value: {
|
|
58
54
|
listType: ListTag,
|
|
59
55
|
isNested: isNested === null ? false : true,
|
|
60
56
|
size: listSize,
|
package/cjs/list/ListItem.js
CHANGED
|
@@ -41,10 +41,10 @@ exports.ListItem = void 0;
|
|
|
41
41
|
const clsx_1 = __importDefault(require("clsx"));
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
43
43
|
const typography_1 = require("../typography");
|
|
44
|
-
const
|
|
44
|
+
const context_1 = require("./context");
|
|
45
45
|
exports.ListItem = (0, react_1.forwardRef)((_a, ref) => {
|
|
46
46
|
var { className, children, title, icon } = _a, rest = __rest(_a, ["className", "children", "title", "icon"]);
|
|
47
|
-
const { listType, size } = (0, react_1.useContext)(
|
|
47
|
+
const { listType, size } = (0, react_1.useContext)(context_1.ListContext);
|
|
48
48
|
if (listType === "ol" && icon) {
|
|
49
49
|
console.warn("<List />: Icon prop is not supported for ordered lists. Please remove the icon prop.");
|
|
50
50
|
}
|
package/cjs/loader/Loader.js
CHANGED
|
@@ -38,9 +38,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
exports.Loader = void 0;
|
|
41
|
-
const react_1 = __importStar(require("react"));
|
|
42
41
|
const clsx_1 = __importDefault(require("clsx"));
|
|
43
|
-
const
|
|
42
|
+
const react_1 = __importStar(require("react"));
|
|
43
|
+
const util_1 = require("../util");
|
|
44
44
|
/**
|
|
45
45
|
* A component that displays a loading spinner.
|
|
46
46
|
*
|
|
@@ -54,10 +54,10 @@ const __1 = require("..");
|
|
|
54
54
|
*/
|
|
55
55
|
exports.Loader = (0, react_1.forwardRef)((_a, ref) => {
|
|
56
56
|
var { className, size = "medium", title = "venter...", transparent = false, variant = "neutral", id } = _a, rest = __rest(_a, ["className", "size", "title", "transparent", "variant", "id"]);
|
|
57
|
-
const internalId = (0,
|
|
57
|
+
const internalId = (0, util_1.useId)();
|
|
58
58
|
return (react_1.default.createElement("svg", Object.assign({ "aria-labelledby": id !== null && id !== void 0 ? id : `loader-${internalId}`, ref: ref, className: (0, clsx_1.default)("navds-loader", className, `navds-loader--${size}`, `navds-loader--${variant}`, {
|
|
59
59
|
"navds-loader--transparent": transparent,
|
|
60
|
-
}), focusable: "false", viewBox: "0 0 50 50", preserveAspectRatio: "xMidYMid" }, (0,
|
|
60
|
+
}), focusable: "false", viewBox: "0 0 50 50", preserveAspectRatio: "xMidYMid" }, (0, util_1.omit)(rest, ["children"])),
|
|
61
61
|
react_1.default.createElement("title", { id: id !== null && id !== void 0 ? id : `loader-${internalId}` }, title),
|
|
62
62
|
react_1.default.createElement("circle", { className: "navds-loader__background", xmlns: "http://www.w3.org/2000/svg", cx: "25", cy: "25", r: "20", fill: "none" }),
|
|
63
63
|
react_1.default.createElement("circle", { className: "navds-loader__foreground", cx: "25", cy: "25", r: "20", fill: "none", strokeDasharray: "50 155" })));
|
package/cjs/modal/Modal.js
CHANGED
|
@@ -38,17 +38,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
exports.Modal = void 0;
|
|
41
|
-
const react_1 =
|
|
42
|
-
const react_dom_1 = require("react-dom");
|
|
43
|
-
const react_2 = require("@floating-ui/react");
|
|
41
|
+
const react_1 = require("@floating-ui/react");
|
|
44
42
|
const clsx_1 = __importDefault(require("clsx"));
|
|
45
|
-
const
|
|
46
|
-
const
|
|
43
|
+
const react_2 = __importStar(require("react"));
|
|
44
|
+
const react_dom_1 = require("react-dom");
|
|
45
|
+
const provider_1 = require("../provider");
|
|
46
|
+
const typography_1 = require("../typography");
|
|
47
|
+
const util_1 = require("../util");
|
|
47
48
|
const ModalBody_1 = __importDefault(require("./ModalBody"));
|
|
48
|
-
const
|
|
49
|
+
const ModalContext_1 = require("./ModalContext");
|
|
49
50
|
const ModalFooter_1 = __importDefault(require("./ModalFooter"));
|
|
51
|
+
const ModalHeader_1 = __importDefault(require("./ModalHeader"));
|
|
50
52
|
const ModalUtils_1 = require("./ModalUtils");
|
|
51
|
-
const
|
|
53
|
+
const dialog_polyfill_1 = __importStar(require("./dialog-polyfill"));
|
|
52
54
|
/**
|
|
53
55
|
* A component that displays a modal dialog.
|
|
54
56
|
*
|
|
@@ -95,18 +97,18 @@ const ModalContext_1 = require("./ModalContext");
|
|
|
95
97
|
* </Modal>
|
|
96
98
|
* ```
|
|
97
99
|
*/
|
|
98
|
-
exports.Modal = (0,
|
|
100
|
+
exports.Modal = (0, react_2.forwardRef)((_a, ref) => {
|
|
99
101
|
var _b, _c;
|
|
100
102
|
var { header, children, open, onBeforeClose, onCancel, width, portal, className, "aria-labelledby": ariaLabelledby, style } = _a, rest = __rest(_a, ["header", "children", "open", "onBeforeClose", "onCancel", "width", "portal", "className", "aria-labelledby", "style"]);
|
|
101
|
-
const modalRef = (0,
|
|
102
|
-
const mergedRef = (0,
|
|
103
|
-
const ariaLabelId = (0,
|
|
104
|
-
const rootElement = (_b = (0,
|
|
105
|
-
const portalNode = (0,
|
|
106
|
-
if ((0,
|
|
103
|
+
const modalRef = (0, react_2.useRef)(null);
|
|
104
|
+
const mergedRef = (0, react_2.useMemo)(() => (0, util_1.mergeRefs)([modalRef, ref]), [ref]);
|
|
105
|
+
const ariaLabelId = (0, util_1.useId)();
|
|
106
|
+
const rootElement = (_b = (0, provider_1.useProvider)()) === null || _b === void 0 ? void 0 : _b.rootElement;
|
|
107
|
+
const portalNode = (0, react_1.useFloatingPortalNode)({ root: rootElement });
|
|
108
|
+
if ((0, react_2.useContext)(ModalContext_1.ModalContext)) {
|
|
107
109
|
console.error("Modals should not be nested");
|
|
108
110
|
}
|
|
109
|
-
(0,
|
|
111
|
+
(0, react_2.useEffect)(() => {
|
|
110
112
|
// If using portal, modalRef.current will not be set before portalNode is set.
|
|
111
113
|
// If not using portal, modalRef.current is available first.
|
|
112
114
|
// We check both to avoid activating polyfill twice when not using portal.
|
|
@@ -114,7 +116,7 @@ exports.Modal = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
114
116
|
dialog_polyfill_1.default.registerDialog(modalRef.current);
|
|
115
117
|
}
|
|
116
118
|
}, [modalRef, portalNode]);
|
|
117
|
-
(0,
|
|
119
|
+
(0, react_2.useEffect)(() => {
|
|
118
120
|
// We need to have this in a useEffect so that the content renders before the modal is displayed,
|
|
119
121
|
// and in case `open` is true initially.
|
|
120
122
|
// We need to check both modalRef.current and portalNode to make sure the polyfill has been activated.
|
|
@@ -129,7 +131,7 @@ exports.Modal = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
129
131
|
}, [modalRef, portalNode, open]);
|
|
130
132
|
(0, ModalUtils_1.useBodyScrollLock)(modalRef, portalNode);
|
|
131
133
|
const isWidthPreset = typeof width === "string" && ["small", "medium"].includes(width);
|
|
132
|
-
const component = (
|
|
134
|
+
const component = (react_2.default.createElement("dialog", Object.assign({}, rest, { ref: mergedRef, className: (0, clsx_1.default)("navds-modal", className, {
|
|
133
135
|
"navds-modal--polyfilled": dialog_polyfill_1.needPolyfill,
|
|
134
136
|
"navds-modal--autowidth": !width,
|
|
135
137
|
[`navds-modal--${width}`]: isWidthPreset,
|
|
@@ -143,13 +145,13 @@ exports.Modal = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
143
145
|
}, "aria-labelledby": !ariaLabelledby && !rest["aria-label"] && header
|
|
144
146
|
? ariaLabelId
|
|
145
147
|
: ariaLabelledby }),
|
|
146
|
-
|
|
148
|
+
react_2.default.createElement(ModalContext_1.ModalContext.Provider, { value: {
|
|
147
149
|
closeHandler: (0, ModalUtils_1.getCloseHandler)(modalRef, header, onBeforeClose),
|
|
148
150
|
} },
|
|
149
|
-
header && (
|
|
150
|
-
header.label && (
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
header && (react_2.default.createElement(ModalHeader_1.default, null,
|
|
152
|
+
header.label && (react_2.default.createElement(typography_1.Detail, { className: "navds-modal__label" }, header.label)),
|
|
153
|
+
react_2.default.createElement(typography_1.Heading, { size: (_c = header.size) !== null && _c !== void 0 ? _c : "medium", level: "1", id: ariaLabelId },
|
|
154
|
+
react_2.default.createElement("span", { className: "navds-modal__header-icon" }, header.icon),
|
|
153
155
|
header.heading))),
|
|
154
156
|
children)));
|
|
155
157
|
if (portal) {
|
|
@@ -41,7 +41,7 @@ exports.Pagination = exports.getSteps = void 0;
|
|
|
41
41
|
const clsx_1 = __importDefault(require("clsx"));
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
43
43
|
const aksel_icons_1 = require("@navikt/aksel-icons");
|
|
44
|
-
const
|
|
44
|
+
const typography_1 = require("../typography");
|
|
45
45
|
const PaginationItem_1 = __importDefault(require("./PaginationItem"));
|
|
46
46
|
const getSteps = ({ page, count, boundaryCount = 1, siblingCount = 1, }) => {
|
|
47
47
|
var _a, _b;
|
|
@@ -108,13 +108,13 @@ exports.Pagination = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
108
108
|
"navds-pagination--prev-next--with-text": prevNextTexts,
|
|
109
109
|
}), disabled: page === 1, onClick: () => onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(page - 1), page: page - 1, size: size, icon: react_1.default.createElement(aksel_icons_1.ChevronLeftIcon, Object.assign({ className: "navds-pagination__prev-next-icon" }, (prevNextTexts
|
|
110
110
|
? { "aria-hidden": true }
|
|
111
|
-
: { title: "Forrige" }))) }, prevNextTexts && (react_1.default.createElement(
|
|
111
|
+
: { title: "Forrige" }))) }, prevNextTexts && (react_1.default.createElement(typography_1.BodyShort, { size: size === "xsmall" ? "small" : size, className: "navds-pagination__prev-text" }, "Forrige")))),
|
|
112
112
|
(0, exports.getSteps)({ page, count, siblingCount, boundaryCount }).map((step, i) => {
|
|
113
113
|
const n = Number(step);
|
|
114
114
|
return isNaN(n) ? (react_1.default.createElement("li", { className: "navds-pagination__ellipsis", key: `${step}${i}` },
|
|
115
|
-
react_1.default.createElement(
|
|
115
|
+
react_1.default.createElement(typography_1.BodyShort, { size: size === "xsmall" ? "small" : size }, "..."))) : (react_1.default.createElement("li", { key: step },
|
|
116
116
|
react_1.default.createElement(Item, { onClick: () => onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(n), selected: page === n, page: n, size: size },
|
|
117
|
-
react_1.default.createElement(
|
|
117
|
+
react_1.default.createElement(typography_1.BodyShort, { size: size === "xsmall" ? "small" : size }, n))));
|
|
118
118
|
}),
|
|
119
119
|
react_1.default.createElement("li", null,
|
|
120
120
|
react_1.default.createElement(Item, { className: (0, clsx_1.default)("navds-pagination__prev-next", {
|
|
@@ -122,7 +122,7 @@ exports.Pagination = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
122
122
|
"navds-pagination--prev-next--with-text": prevNextTexts,
|
|
123
123
|
}), disabled: page === count, onClick: () => onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(page + 1), page: page + 1, size: size, icon: react_1.default.createElement(aksel_icons_1.ChevronRightIcon, Object.assign({ className: "navds-pagination__prev-next-icon" }, (prevNextTexts
|
|
124
124
|
? { "aria-hidden": true }
|
|
125
|
-
: { title: "Neste" }))), iconPosition: "right" }, prevNextTexts && (react_1.default.createElement(
|
|
125
|
+
: { title: "Neste" }))), iconPosition: "right" }, prevNextTexts && (react_1.default.createElement(typography_1.BodyShort, { size: size === "xsmall" ? "small" : size, className: "navds-pagination__next-text" }, "Neste")))))));
|
|
126
126
|
});
|
|
127
127
|
exports.Pagination.Item = PaginationItem_1.default;
|
|
128
128
|
exports.default = exports.Pagination;
|
|
@@ -40,10 +40,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
40
40
|
exports.Item = void 0;
|
|
41
41
|
const react_1 = __importStar(require("react"));
|
|
42
42
|
const clsx_1 = __importDefault(require("clsx"));
|
|
43
|
-
const
|
|
43
|
+
const button_1 = require("../button");
|
|
44
44
|
exports.Item = (0, react_1.forwardRef)((_a, ref) => {
|
|
45
45
|
var { children, as: Component = "button", selected = false, className } = _a, rest = __rest(_a, ["children", "as", "selected", "className"]);
|
|
46
|
-
return (react_1.default.createElement(
|
|
46
|
+
return (react_1.default.createElement(button_1.Button, Object.assign({ as: Component, variant: "tertiary", "aria-current": selected, ref: ref, className: (0, clsx_1.default)("navds-pagination__item", className, {
|
|
47
47
|
"navds-pagination__item--selected": selected,
|
|
48
48
|
}) }, (Component === "button" && { type: "button" }), rest), children));
|
|
49
49
|
});
|
package/cjs/popover/Popover.js
CHANGED
|
@@ -41,10 +41,9 @@ exports.Popover = void 0;
|
|
|
41
41
|
const react_1 = require("@floating-ui/react");
|
|
42
42
|
const clsx_1 = __importDefault(require("clsx"));
|
|
43
43
|
const react_2 = __importStar(require("react"));
|
|
44
|
-
const
|
|
44
|
+
const ModalContext_1 = require("../modal/ModalContext");
|
|
45
45
|
const util_1 = require("../util");
|
|
46
46
|
const PopoverContent_1 = __importDefault(require("./PopoverContent"));
|
|
47
|
-
const ModalContext_1 = require("../modal/ModalContext");
|
|
48
47
|
/**
|
|
49
48
|
* A component that displays a popover.
|
|
50
49
|
*
|
|
@@ -66,7 +65,7 @@ const ModalContext_1 = require("../modal/ModalContext");
|
|
|
66
65
|
* ```
|
|
67
66
|
*/
|
|
68
67
|
exports.Popover = (0, react_2.forwardRef)((_a, ref) => {
|
|
69
|
-
var { className, children, anchorEl, arrow = true, open, onClose, placement = "top", offset, strategy: userStrategy, bubbleEscape = false } = _a, rest = __rest(_a, ["className", "children", "anchorEl", "arrow", "open", "onClose", "placement", "offset", "strategy", "bubbleEscape"]);
|
|
68
|
+
var { className, children, anchorEl, arrow = true, open, onClose, placement = "top", offset, strategy: userStrategy, bubbleEscape = false, flip: _flip = true } = _a, rest = __rest(_a, ["className", "children", "anchorEl", "arrow", "open", "onClose", "placement", "offset", "strategy", "bubbleEscape", "flip"]);
|
|
70
69
|
const arrowRef = (0, react_2.useRef)(null);
|
|
71
70
|
const isInModal = (0, react_2.useContext)(ModalContext_1.ModalContext) !== null;
|
|
72
71
|
const chosenStrategy = userStrategy !== null && userStrategy !== void 0 ? userStrategy : (isInModal ? "fixed" : "absolute");
|
|
@@ -77,7 +76,7 @@ exports.Popover = (0, react_2.forwardRef)((_a, ref) => {
|
|
|
77
76
|
onOpenChange: () => onClose(),
|
|
78
77
|
middleware: [
|
|
79
78
|
(0, react_1.offset)(offset !== null && offset !== void 0 ? offset : (arrow ? 16 : 4)),
|
|
80
|
-
(0, react_1.flip)({ padding: 5, fallbackPlacements: ["bottom", "top"] }),
|
|
79
|
+
_flip && (0, react_1.flip)({ padding: 5, fallbackPlacements: ["bottom", "top"] }),
|
|
81
80
|
(0, react_1.shift)({ padding: 12 }),
|
|
82
81
|
(0, react_1.arrow)({ element: arrowRef, padding: 8 }),
|
|
83
82
|
],
|
|
@@ -93,7 +92,7 @@ exports.Popover = (0, react_2.forwardRef)((_a, ref) => {
|
|
|
93
92
|
(0, util_1.useClientLayoutEffect)(() => {
|
|
94
93
|
refs.setReference(anchorEl);
|
|
95
94
|
}, [anchorEl]);
|
|
96
|
-
const floatingRef = (0, react_2.useMemo)(() => (0,
|
|
95
|
+
const floatingRef = (0, react_2.useMemo)(() => (0, util_1.mergeRefs)([refs.setFloating, ref]), [refs.setFloating, ref]);
|
|
97
96
|
(0, util_1.useClientLayoutEffect)(() => {
|
|
98
97
|
if (!refs.reference.current || !refs.floating.current || !open)
|
|
99
98
|
return;
|
package/cjs/stepper/Step.js
CHANGED
|
@@ -40,13 +40,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
40
40
|
exports.Step = void 0;
|
|
41
41
|
const clsx_1 = __importDefault(require("clsx"));
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
43
|
-
const
|
|
44
|
-
const
|
|
43
|
+
const typography_1 = require("../typography");
|
|
44
|
+
const context_1 = require("./context");
|
|
45
45
|
const CompletedIcon = () => (react_1.default.createElement("svg", { width: "14", height: "10", viewBox: "0 0 14 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", focusable: false, role: "img", "aria-hidden": true, "aria-label": "Fullf\u00F8rt" },
|
|
46
46
|
react_1.default.createElement("path", { d: "M4.93563 6.41478L11.3755 0.404669C11.9796 -0.160351 12.9294 -0.130672 13.4959 0.47478C14.0624 1.08027 14.0299 2.03007 13.4249 2.59621L5.92151 9.59934C5.64138 9.85904 5.27598 10 4.90064 10C4.5069 10 4.12756 9.84621 3.83953 9.56111L1.33953 7.06111C0.75401 6.47558 0.75401 5.52542 1.33953 4.93989C1.92506 4.35437 2.87522 4.35437 3.46075 4.93989L4.93563 6.41478Z", fill: "currentColor" })));
|
|
47
47
|
exports.Step = (0, react_1.forwardRef)((_a, ref) => {
|
|
48
48
|
var { className, children, as: Component = "a", unsafe_index = 0, completed = false, interactive } = _a, rest = __rest(_a, ["className", "children", "as", "unsafe_index", "completed", "interactive"]);
|
|
49
|
-
const context = (0, react_1.useContext)(
|
|
49
|
+
const context = (0, react_1.useContext)(context_1.StepperContext);
|
|
50
50
|
if (context === null) {
|
|
51
51
|
console.error("<Stepper.Step> has to be used within <Stepper>");
|
|
52
52
|
return null;
|
|
@@ -65,7 +65,7 @@ exports.Step = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
65
65
|
(_a = rest === null || rest === void 0 ? void 0 : rest.onClick) === null || _a === void 0 ? void 0 : _a.call(rest, e);
|
|
66
66
|
} }),
|
|
67
67
|
completed ? (react_1.default.createElement("span", { className: "navds-stepper__circle navds-stepper__circle--success" },
|
|
68
|
-
react_1.default.createElement(CompletedIcon, null))) : (react_1.default.createElement(
|
|
69
|
-
react_1.default.createElement(
|
|
68
|
+
react_1.default.createElement(CompletedIcon, null))) : (react_1.default.createElement(typography_1.Label, { className: "navds-stepper__circle", as: "span", "aria-hidden": "true" }, unsafe_index + 1)),
|
|
69
|
+
react_1.default.createElement(typography_1.Label, { as: "span", className: "navds-stepper__content" }, children)));
|
|
70
70
|
});
|
|
71
71
|
exports.default = exports.Step;
|
package/cjs/stepper/Stepper.js
CHANGED
|
@@ -37,11 +37,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.Stepper =
|
|
41
|
-
const react_1 = __importStar(require("react"));
|
|
40
|
+
exports.Stepper = void 0;
|
|
42
41
|
const clsx_1 = __importDefault(require("clsx"));
|
|
42
|
+
const react_1 = __importStar(require("react"));
|
|
43
43
|
const Step_1 = __importDefault(require("./Step"));
|
|
44
|
-
|
|
44
|
+
const context_1 = require("./context");
|
|
45
45
|
/**
|
|
46
46
|
* A component that displays a stepper with clickable steps.
|
|
47
47
|
*
|
|
@@ -70,7 +70,7 @@ exports.Stepper = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
70
70
|
var { children, className, activeStep, orientation = "vertical", onStepChange = () => { }, interactive = true } = _a, rest = __rest(_a, ["children", "className", "activeStep", "orientation", "onStepChange", "interactive"]);
|
|
71
71
|
activeStep = activeStep - 1;
|
|
72
72
|
return (react_1.default.createElement("ol", Object.assign({}, rest, { ref: ref, className: (0, clsx_1.default)("navds-stepper", orientation === "horizontal" ? "navds-stepper--horizontal" : "", className) }),
|
|
73
|
-
react_1.default.createElement(
|
|
73
|
+
react_1.default.createElement(context_1.StepperContext.Provider, { value: {
|
|
74
74
|
activeStep,
|
|
75
75
|
onStepChange,
|
|
76
76
|
lastIndex: react_1.default.Children.count(children),
|