@navikt/ds-react 6.0.0-alpha.2 → 6.0.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/cjs/chat/Bubble.d.ts +0 -5
- package/cjs/chat/Bubble.js +2 -2
- package/cjs/chat/Bubble.js.map +1 -1
- package/cjs/chat/Chat.d.ts +0 -10
- package/cjs/chat/Chat.js +3 -3
- package/cjs/chat/Chat.js.map +1 -1
- package/cjs/date/context/useSharedMonthContext.js +2 -6
- package/cjs/date/context/useSharedMonthContext.js.map +1 -1
- package/cjs/date/datepicker/DatePicker.js +3 -5
- package/cjs/date/datepicker/DatePicker.js.map +1 -1
- package/cjs/date/datepicker/DatePickerStandalone.js +3 -5
- package/cjs/date/datepicker/DatePickerStandalone.js.map +1 -1
- package/cjs/date/datepicker/parts/DayButton.js +2 -5
- package/cjs/date/datepicker/parts/DayButton.js.map +1 -1
- package/cjs/date/datepicker/parts/DropdownCaption.js +3 -6
- package/cjs/date/datepicker/parts/DropdownCaption.js.map +1 -1
- package/cjs/date/datepicker/parts/Row.js +2 -1
- package/cjs/date/datepicker/parts/Row.js.map +1 -1
- package/cjs/date/hooks/useDatepicker.d.ts +1 -6
- package/cjs/date/hooks/useDatepicker.js +7 -11
- package/cjs/date/hooks/useDatepicker.js.map +1 -1
- package/cjs/date/hooks/useMonthPicker.d.ts +1 -6
- package/cjs/date/hooks/useMonthPicker.js.map +1 -1
- package/cjs/date/hooks/useRangeDatepicker.js +20 -25
- package/cjs/date/hooks/useRangeDatepicker.js.map +1 -1
- package/cjs/date/monthpicker/MonthButton.js +11 -15
- package/cjs/date/monthpicker/MonthButton.js.map +1 -1
- package/cjs/date/monthpicker/MonthCaption.js +4 -7
- package/cjs/date/monthpicker/MonthCaption.js.map +1 -1
- package/cjs/date/monthpicker/MonthPicker.js +7 -1
- package/cjs/date/monthpicker/MonthPicker.js.map +1 -1
- package/cjs/date/monthpicker/MonthPickerStandalone.js +7 -1
- package/cjs/date/monthpicker/MonthPickerStandalone.js.map +1 -1
- package/cjs/date/monthpicker/MonthSelector.js +8 -11
- package/cjs/date/monthpicker/MonthSelector.js.map +1 -1
- package/cjs/date/parts/DateInput.d.ts +1 -1
- package/cjs/date/parts/DateWrapper.js +2 -2
- package/cjs/date/parts/DateWrapper.js.map +1 -1
- package/cjs/date/utils/check-dates.js +2 -6
- package/cjs/date/utils/check-dates.js.map +1 -1
- package/cjs/date/utils/dates-disabled.js +3 -6
- package/cjs/date/utils/dates-disabled.js.map +1 -1
- package/cjs/date/utils/format-date.d.ts +1 -0
- package/cjs/date/utils/format-date.js +2 -5
- package/cjs/date/utils/format-date.js.map +1 -1
- package/cjs/date/utils/get-dates.js +14 -21
- package/cjs/date/utils/get-dates.js.map +1 -1
- package/cjs/date/utils/get-initial-year.js +2 -5
- package/cjs/date/utils/get-initial-year.js.map +1 -1
- package/cjs/date/utils/is-match.js +14 -20
- package/cjs/date/utils/is-match.js.map +1 -1
- package/cjs/date/utils/labels.d.ts +1 -0
- package/cjs/date/utils/labels.js.map +1 -1
- package/cjs/date/utils/locale.d.ts +1 -1
- package/cjs/date/utils/locale.js +4 -9
- package/cjs/date/utils/locale.js.map +1 -1
- package/cjs/date/utils/navigation.js +21 -24
- package/cjs/date/utils/navigation.js.map +1 -1
- package/cjs/date/utils/parse-date.d.ts +1 -0
- package/cjs/date/utils/parse-date.js +8 -13
- package/cjs/date/utils/parse-date.js.map +1 -1
- package/cjs/form/Textarea.js +8 -8
- package/cjs/form/Textarea.js.map +1 -1
- package/cjs/form/combobox/Combobox.js +1 -1
- package/cjs/form/combobox/Combobox.js.map +1 -1
- package/cjs/form/combobox/ComboboxProvider.js +2 -1
- package/cjs/form/combobox/ComboboxProvider.js.map +1 -1
- package/cjs/form/combobox/ComboboxWrapper.js +1 -1
- package/cjs/form/combobox/ComboboxWrapper.js.map +1 -1
- package/cjs/form/combobox/FilteredOptions/FilteredOptions.js +59 -41
- package/cjs/form/combobox/FilteredOptions/FilteredOptions.js.map +1 -1
- package/cjs/form/combobox/FilteredOptions/filtered-options-util.d.ts +2 -1
- package/cjs/form/combobox/FilteredOptions/filtered-options-util.js +3 -1
- package/cjs/form/combobox/FilteredOptions/filtered-options-util.js.map +1 -1
- package/cjs/form/combobox/FilteredOptions/filteredOptionsContext.js +15 -3
- package/cjs/form/combobox/FilteredOptions/filteredOptionsContext.js.map +1 -1
- package/cjs/form/combobox/FilteredOptions/useVirtualFocus.d.ts +2 -4
- package/cjs/form/combobox/FilteredOptions/useVirtualFocus.js +52 -32
- package/cjs/form/combobox/FilteredOptions/useVirtualFocus.js.map +1 -1
- package/cjs/form/combobox/Input/Input.js +3 -1
- package/cjs/form/combobox/Input/Input.js.map +1 -1
- package/cjs/form/combobox/SelectedOptions/selectedOptionsContext.d.ts +5 -2
- package/cjs/form/combobox/SelectedOptions/selectedOptionsContext.js +3 -1
- package/cjs/form/combobox/SelectedOptions/selectedOptionsContext.js.map +1 -1
- package/cjs/form/combobox/types.d.ts +14 -0
- package/cjs/form/search/Search.d.ts +2 -1
- package/cjs/form/search/Search.js +2 -2
- package/cjs/form/search/Search.js.map +1 -1
- package/cjs/index.d.ts +1 -2
- package/cjs/index.js +2 -3
- package/cjs/index.js.map +1 -1
- package/cjs/layout/bleed/Bleed.d.ts +2 -2
- package/cjs/layout/utilities/css.js +4 -0
- package/cjs/layout/utilities/css.js.map +1 -1
- package/cjs/layout/utilities/types.d.ts +1 -1
- package/cjs/modal/Modal.context.d.ts +9 -0
- package/cjs/modal/Modal.context.js +10 -0
- package/cjs/modal/Modal.context.js.map +1 -0
- package/cjs/modal/Modal.js +3 -6
- package/cjs/modal/Modal.js.map +1 -1
- package/cjs/modal/ModalHeader.js +2 -6
- package/cjs/modal/ModalHeader.js.map +1 -1
- package/cjs/modal/types.d.ts +24 -3
- package/cjs/overlays/index.d.ts +2 -0
- package/cjs/overlays/index.js +6 -0
- package/cjs/overlays/index.js.map +1 -0
- package/cjs/overlays/portal/Portal.d.ts +11 -0
- package/cjs/{grid/Grid.js → overlays/portal/Portal.js} +15 -11
- package/cjs/overlays/portal/Portal.js.map +1 -0
- package/cjs/panel/Panel.d.ts +9 -16
- package/cjs/panel/Panel.js +6 -16
- package/cjs/panel/Panel.js.map +1 -1
- package/cjs/popover/Popover.js +2 -2
- package/cjs/popover/Popover.js.map +1 -1
- package/cjs/table/types.d.ts +1 -1
- package/cjs/tabs/TabList.js +2 -2
- package/cjs/tabs/TabList.js.map +1 -1
- package/cjs/tabs/TabPanel.js +2 -2
- package/cjs/tabs/TabPanel.js.map +1 -1
- package/cjs/timeline/AxisLabels.js +4 -4
- package/cjs/timeline/AxisLabels.js.map +1 -1
- package/cjs/tooltip/Tooltip.js +5 -9
- package/cjs/tooltip/Tooltip.js.map +1 -1
- package/cjs/util/Slot.js +5 -2
- package/cjs/util/Slot.js.map +1 -1
- package/cjs/util/TextareaAutoSize.js +14 -24
- package/cjs/util/TextareaAutoSize.js.map +1 -1
- package/cjs/util/create-context.d.ts +2 -5
- package/cjs/util/create-context.js +9 -5
- package/cjs/util/create-context.js.map +1 -1
- package/cjs/util/types/AsChildProps.d.ts +36 -0
- package/cjs/util/types/AsChildProps.js +3 -0
- package/cjs/util/types/AsChildProps.js.map +1 -0
- package/cjs/util/types/OverridableComponent.d.ts +1 -1
- package/cjs/util/types/index.d.ts +1 -0
- package/esm/accordion/Accordion.d.ts +3 -3
- package/esm/accordion/Accordion.js +4 -4
- package/esm/accordion/AccordionContent.js +2 -2
- package/esm/accordion/AccordionHeader.js +4 -4
- package/esm/accordion/AccordionItem.js +3 -3
- package/esm/accordion/index.d.ts +1 -1
- package/esm/accordion/index.js +1 -1
- package/esm/alert/Alert.js +2 -2
- package/esm/alert/index.d.ts +2 -2
- package/esm/alert/index.js +1 -1
- package/esm/button/Button.d.ts +1 -1
- package/esm/button/Button.js +6 -6
- package/esm/button/index.d.ts +2 -2
- package/esm/button/index.js +1 -1
- package/esm/chat/Bubble.d.ts +0 -5
- package/esm/chat/Bubble.js +3 -3
- package/esm/chat/Bubble.js.map +1 -1
- package/esm/chat/Chat.d.ts +1 -11
- package/esm/chat/Chat.js +5 -5
- package/esm/chat/Chat.js.map +1 -1
- package/esm/chat/index.d.ts +1 -1
- package/esm/chat/index.js +1 -1
- package/esm/chips/Chips.d.ts +3 -3
- package/esm/chips/Chips.js +2 -2
- package/esm/chips/Removable.js +1 -1
- package/esm/chips/Toggle.d.ts +1 -1
- package/esm/chips/index.d.ts +1 -1
- package/esm/chips/index.js +1 -1
- package/esm/copybutton/CopyButton.js +3 -3
- package/esm/copybutton/index.d.ts +1 -1
- package/esm/copybutton/index.js +1 -1
- package/esm/date/context/index.d.ts +2 -2
- package/esm/date/context/index.js +2 -2
- package/esm/date/context/useSharedMonthContext.d.ts +1 -1
- package/esm/date/context/useSharedMonthContext.js +2 -3
- package/esm/date/context/useSharedMonthContext.js.map +1 -1
- package/esm/date/datepicker/DatePicker.d.ts +3 -3
- package/esm/date/datepicker/DatePicker.js +15 -17
- package/esm/date/datepicker/DatePicker.js.map +1 -1
- package/esm/date/datepicker/DatePickerStandalone.d.ts +1 -1
- package/esm/date/datepicker/DatePickerStandalone.js +9 -11
- package/esm/date/datepicker/DatePickerStandalone.js.map +1 -1
- package/esm/date/datepicker/parts/Caption.js +3 -3
- package/esm/date/datepicker/parts/DayButton.js +1 -1
- package/esm/date/datepicker/parts/DayButton.js.map +1 -1
- package/esm/date/datepicker/parts/DropdownCaption.js +6 -9
- package/esm/date/datepicker/parts/DropdownCaption.js.map +1 -1
- package/esm/date/datepicker/parts/HeadRow.js +1 -1
- package/esm/date/datepicker/parts/Row.js +5 -4
- package/esm/date/datepicker/parts/Row.js.map +1 -1
- package/esm/date/datepicker/parts/WeekNumber.js +1 -1
- package/esm/date/datepicker/parts/WeekRow.js +6 -6
- package/esm/date/hooks/index.d.ts +6 -6
- package/esm/date/hooks/index.js +3 -3
- package/esm/date/hooks/useDatepicker.d.ts +3 -8
- package/esm/date/hooks/useDatepicker.js +2 -3
- package/esm/date/hooks/useDatepicker.js.map +1 -1
- package/esm/date/hooks/useMonthPicker.d.ts +3 -8
- package/esm/date/hooks/useMonthPicker.js +1 -1
- package/esm/date/hooks/useMonthPicker.js.map +1 -1
- package/esm/date/hooks/useRangeDatepicker.d.ts +3 -3
- package/esm/date/hooks/useRangeDatepicker.js +2 -4
- package/esm/date/hooks/useRangeDatepicker.js.map +1 -1
- package/esm/date/index.d.ts +7 -7
- package/esm/date/index.js +3 -3
- package/esm/date/monthpicker/MonthButton.js +3 -7
- package/esm/date/monthpicker/MonthButton.js.map +1 -1
- package/esm/date/monthpicker/MonthCaption.js +5 -8
- package/esm/date/monthpicker/MonthCaption.js.map +1 -1
- package/esm/date/monthpicker/MonthPicker.d.ts +3 -3
- package/esm/date/monthpicker/MonthPicker.js +17 -11
- package/esm/date/monthpicker/MonthPicker.js.map +1 -1
- package/esm/date/monthpicker/MonthPickerStandalone.d.ts +1 -1
- package/esm/date/monthpicker/MonthPickerStandalone.js +12 -6
- package/esm/date/monthpicker/MonthPickerStandalone.js.map +1 -1
- package/esm/date/monthpicker/MonthSelector.js +5 -8
- package/esm/date/monthpicker/MonthSelector.js.map +1 -1
- package/esm/date/monthpicker/types.d.ts +1 -1
- package/esm/date/parts/DateInput.d.ts +2 -2
- package/esm/date/parts/DateInput.js +5 -5
- package/esm/date/parts/DateWrapper.js +8 -8
- package/esm/date/parts/DateWrapper.js.map +1 -1
- package/esm/date/utils/check-dates.js +1 -2
- package/esm/date/utils/check-dates.js.map +1 -1
- package/esm/date/utils/dates-disabled.js +1 -1
- package/esm/date/utils/dates-disabled.js.map +1 -1
- package/esm/date/utils/format-date.d.ts +1 -0
- package/esm/date/utils/format-date.js +2 -2
- package/esm/date/utils/format-date.js.map +1 -1
- package/esm/date/utils/get-dates.js +1 -5
- package/esm/date/utils/get-dates.js.map +1 -1
- package/esm/date/utils/get-initial-year.js +1 -1
- package/esm/date/utils/get-initial-year.js.map +1 -1
- package/esm/date/utils/index.d.ts +10 -10
- package/esm/date/utils/index.js +10 -10
- package/esm/date/utils/is-match.js +1 -4
- package/esm/date/utils/is-match.js.map +1 -1
- package/esm/date/utils/labels.d.ts +1 -0
- package/esm/date/utils/labels.js.map +1 -1
- package/esm/date/utils/locale.d.ts +1 -1
- package/esm/date/utils/locale.js +1 -3
- package/esm/date/utils/locale.js.map +1 -1
- package/esm/date/utils/navigation.d.ts +1 -1
- package/esm/date/utils/navigation.js +2 -2
- package/esm/date/utils/navigation.js.map +1 -1
- package/esm/date/utils/parse-date.d.ts +1 -0
- package/esm/date/utils/parse-date.js +2 -4
- package/esm/date/utils/parse-date.js.map +1 -1
- package/esm/dropdown/Dropdown.d.ts +2 -2
- package/esm/dropdown/Dropdown.js +4 -4
- package/esm/dropdown/Menu/GroupedList/GroupedItem.d.ts +1 -1
- package/esm/dropdown/Menu/GroupedList/GroupedItem.js +2 -2
- package/esm/dropdown/Menu/GroupedList/index.d.ts +3 -3
- package/esm/dropdown/Menu/GroupedList/index.js +2 -2
- package/esm/dropdown/Menu/List/Item.d.ts +1 -1
- package/esm/dropdown/Menu/List/Item.js +2 -2
- package/esm/dropdown/Menu/List/index.d.ts +2 -2
- package/esm/dropdown/Menu/List/index.js +1 -1
- package/esm/dropdown/Menu/index.d.ts +2 -2
- package/esm/dropdown/Menu/index.js +5 -5
- package/esm/dropdown/Toggle.js +2 -2
- package/esm/dropdown/index.d.ts +1 -1
- package/esm/dropdown/index.js +1 -1
- package/esm/expansion-card/ExpansionCard.d.ts +5 -5
- package/esm/expansion-card/ExpansionCard.js +5 -5
- package/esm/expansion-card/ExpansionCardContent.js +2 -2
- package/esm/expansion-card/ExpansionCardDescription.js +2 -2
- package/esm/expansion-card/ExpansionCardHeader.js +1 -1
- package/esm/expansion-card/ExpansionCardTitle.d.ts +1 -1
- package/esm/expansion-card/index.d.ts +1 -1
- package/esm/expansion-card/index.js +1 -1
- package/esm/form/ConfirmationPanel.d.ts +1 -1
- package/esm/form/ConfirmationPanel.js +4 -4
- package/esm/form/Fieldset/Fieldset.d.ts +1 -1
- package/esm/form/Fieldset/Fieldset.js +5 -5
- package/esm/form/Fieldset/index.d.ts +2 -2
- package/esm/form/Fieldset/index.js +2 -2
- package/esm/form/Fieldset/useFieldset.js +1 -1
- package/esm/form/Select.d.ts +1 -1
- package/esm/form/Select.js +4 -4
- package/esm/form/Switch.d.ts +1 -1
- package/esm/form/Switch.js +5 -5
- package/esm/form/TextField.d.ts +1 -1
- package/esm/form/TextField.js +4 -4
- package/esm/form/Textarea.d.ts +1 -1
- package/esm/form/Textarea.js +15 -15
- package/esm/form/Textarea.js.map +1 -1
- package/esm/form/TextareaCounter.d.ts +1 -1
- package/esm/form/TextareaCounter.js +2 -2
- package/esm/form/checkbox/Checkbox.d.ts +1 -1
- package/esm/form/checkbox/Checkbox.js +5 -5
- package/esm/form/checkbox/CheckboxGroup.d.ts +1 -1
- package/esm/form/checkbox/CheckboxGroup.js +1 -1
- package/esm/form/checkbox/index.d.ts +3 -3
- package/esm/form/checkbox/index.js +2 -2
- package/esm/form/checkbox/types.d.ts +1 -1
- package/esm/form/checkbox/useCheckbox.d.ts +1 -1
- package/esm/form/checkbox/useCheckbox.js +3 -3
- package/esm/form/combobox/Combobox.d.ts +1 -1
- package/esm/form/combobox/Combobox.js +12 -12
- package/esm/form/combobox/Combobox.js.map +1 -1
- package/esm/form/combobox/ComboboxProvider.d.ts +1 -1
- package/esm/form/combobox/ComboboxProvider.js +7 -6
- package/esm/form/combobox/ComboboxProvider.js.map +1 -1
- package/esm/form/combobox/ComboboxWrapper.js +1 -1
- package/esm/form/combobox/ComboboxWrapper.js.map +1 -1
- package/esm/form/combobox/FilteredOptions/FilteredOptions.js +65 -47
- package/esm/form/combobox/FilteredOptions/FilteredOptions.js.map +1 -1
- package/esm/form/combobox/FilteredOptions/filtered-options-util.d.ts +2 -1
- package/esm/form/combobox/FilteredOptions/filtered-options-util.js +3 -1
- package/esm/form/combobox/FilteredOptions/filtered-options-util.js.map +1 -1
- package/esm/form/combobox/FilteredOptions/filteredOptionsContext.d.ts +2 -2
- package/esm/form/combobox/FilteredOptions/filteredOptionsContext.js +20 -8
- package/esm/form/combobox/FilteredOptions/filteredOptionsContext.js.map +1 -1
- package/esm/form/combobox/FilteredOptions/useVirtualFocus.d.ts +2 -4
- package/esm/form/combobox/FilteredOptions/useVirtualFocus.js +52 -32
- package/esm/form/combobox/FilteredOptions/useVirtualFocus.js.map +1 -1
- package/esm/form/combobox/Input/Input.js +8 -6
- package/esm/form/combobox/Input/Input.js.map +1 -1
- package/esm/form/combobox/Input/inputContext.d.ts +1 -1
- package/esm/form/combobox/Input/inputContext.js +2 -2
- package/esm/form/combobox/SelectedOptions/SelectedOptions.js +3 -3
- package/esm/form/combobox/SelectedOptions/selectedOptionsContext.d.ts +5 -2
- package/esm/form/combobox/SelectedOptions/selectedOptionsContext.js +6 -4
- package/esm/form/combobox/SelectedOptions/selectedOptionsContext.js.map +1 -1
- package/esm/form/combobox/ToggleListButton.js +1 -1
- package/esm/form/combobox/customOptionsContext.js +1 -1
- package/esm/form/combobox/index.d.ts +2 -2
- package/esm/form/combobox/index.js +1 -1
- package/esm/form/combobox/types.d.ts +15 -1
- package/esm/form/error-summary/ErrorSummary.d.ts +1 -1
- package/esm/form/error-summary/ErrorSummary.js +3 -3
- package/esm/form/error-summary/ErrorSummaryItem.d.ts +1 -1
- package/esm/form/error-summary/index.d.ts +2 -2
- package/esm/form/error-summary/index.js +1 -1
- package/esm/form/index.d.ts +11 -11
- package/esm/form/index.js +11 -11
- package/esm/form/radio/Radio.d.ts +1 -1
- package/esm/form/radio/Radio.js +4 -4
- package/esm/form/radio/RadioGroup.d.ts +1 -1
- package/esm/form/radio/RadioGroup.js +2 -2
- package/esm/form/radio/index.d.ts +3 -3
- package/esm/form/radio/index.js +2 -2
- package/esm/form/radio/types.d.ts +1 -1
- package/esm/form/radio/useRadio.d.ts +1 -1
- package/esm/form/radio/useRadio.js +3 -3
- package/esm/form/search/Search.d.ts +4 -3
- package/esm/form/search/Search.js +8 -8
- 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/index.d.ts +1 -1
- package/esm/form/search/index.js +1 -1
- package/esm/form/useFormField.js +2 -2
- package/esm/guide-panel/GuidePanel.js +1 -1
- package/esm/guide-panel/Illustration.js +1 -1
- package/esm/guide-panel/index.d.ts +2 -2
- package/esm/guide-panel/index.js +2 -2
- package/esm/help-text/HelpText.d.ts +1 -1
- package/esm/help-text/HelpText.js +4 -4
- package/esm/help-text/HelpTextIcon.js +1 -1
- package/esm/help-text/index.d.ts +2 -2
- package/esm/help-text/index.js +1 -1
- package/esm/index.d.ts +40 -41
- package/esm/index.js +40 -41
- package/esm/index.js.map +1 -1
- package/esm/internal-header/InternalHeader.d.ts +5 -5
- package/esm/internal-header/InternalHeader.js +4 -4
- package/esm/internal-header/InternalHeaderButton.d.ts +1 -1
- package/esm/internal-header/InternalHeaderTitle.d.ts +1 -1
- package/esm/internal-header/InternalHeaderUser.js +1 -1
- package/esm/internal-header/InternalHeaderUserButton.d.ts +1 -1
- package/esm/internal-header/InternalHeaderUserButton.js +2 -2
- package/esm/internal-header/index.d.ts +5 -5
- package/esm/internal-header/index.js +1 -1
- package/esm/layout/bleed/Bleed.d.ts +3 -3
- package/esm/layout/bleed/Bleed.js +2 -2
- package/esm/layout/bleed/index.d.ts +1 -1
- package/esm/layout/bleed/index.js +1 -1
- package/esm/layout/box/Box.d.ts +2 -2
- package/esm/layout/box/Box.js +1 -1
- package/esm/layout/box/index.d.ts +1 -1
- package/esm/layout/box/index.js +1 -1
- package/esm/layout/grid/HGrid.d.ts +1 -1
- package/esm/layout/grid/HGrid.js +1 -1
- package/esm/layout/grid/index.d.ts +1 -1
- package/esm/layout/grid/index.js +1 -1
- package/esm/layout/page/Page.d.ts +2 -2
- package/esm/layout/page/Page.js +1 -1
- package/esm/layout/page/index.d.ts +2 -2
- package/esm/layout/page/index.js +1 -1
- package/esm/layout/page/parts/PageBlock.d.ts +1 -1
- package/esm/layout/responsive/Responsive.d.ts +1 -1
- package/esm/layout/responsive/Responsive.js +1 -1
- package/esm/layout/responsive/index.d.ts +1 -1
- package/esm/layout/responsive/index.js +1 -1
- package/esm/layout/sidemal-test/AvatarPanel.js +2 -2
- package/esm/layout/sidemal-test/Content.js +9 -9
- package/esm/layout/sidemal-test/Filter.js +4 -4
- package/esm/layout/sidemal-test/Header.js +5 -5
- package/esm/layout/sidemal-test/Intro.js +4 -4
- package/esm/layout/sidemal-test/Sidebar.js +4 -4
- package/esm/layout/sidemal-test/content-box/ContentBox.d.ts +1 -1
- package/esm/layout/sidemal-test/content-box/index.d.ts +1 -1
- package/esm/layout/sidemal-test/content-box/index.js +1 -1
- package/esm/layout/stack/HStack.d.ts +2 -2
- package/esm/layout/stack/HStack.js +1 -1
- package/esm/layout/stack/Stack.d.ts +2 -2
- package/esm/layout/stack/Stack.js +1 -1
- package/esm/layout/stack/VStack.d.ts +2 -2
- package/esm/layout/stack/VStack.js +1 -1
- package/esm/layout/stack/index.d.ts +4 -4
- package/esm/layout/stack/index.js +4 -4
- package/esm/layout/utilities/css.d.ts +1 -1
- package/esm/layout/utilities/css.js +4 -0
- package/esm/layout/utilities/css.js.map +1 -1
- package/esm/layout/utilities/types.d.ts +1 -1
- package/esm/link/Link.d.ts +1 -1
- package/esm/link/index.d.ts +2 -2
- package/esm/link/index.js +1 -1
- package/esm/link-panel/LinkPanel.d.ts +3 -3
- package/esm/link-panel/LinkPanel.js +3 -3
- package/esm/link-panel/LinkPanelDescription.js +1 -1
- package/esm/link-panel/LinkPanelTitle.d.ts +1 -1
- package/esm/link-panel/index.d.ts +2 -2
- package/esm/link-panel/index.js +1 -1
- package/esm/list/List.d.ts +2 -2
- package/esm/list/List.js +4 -4
- package/esm/list/ListItem.js +2 -2
- package/esm/list/context.d.ts +1 -1
- package/esm/list/index.d.ts +2 -2
- package/esm/list/index.js +1 -1
- package/esm/loader/Loader.js +2 -2
- package/esm/loader/index.d.ts +2 -2
- package/esm/loader/index.js +1 -1
- package/esm/modal/Modal.context.d.ts +9 -0
- package/esm/modal/Modal.context.js +6 -0
- package/esm/modal/Modal.context.js.map +1 -0
- package/esm/modal/Modal.d.ts +4 -4
- package/esm/modal/Modal.js +14 -17
- package/esm/modal/Modal.js.map +1 -1
- package/esm/modal/ModalHeader.js +4 -8
- package/esm/modal/ModalHeader.js.map +1 -1
- package/esm/modal/ModalUtils.d.ts +1 -1
- package/esm/modal/index.d.ts +5 -5
- package/esm/modal/index.js +1 -1
- package/esm/modal/types.d.ts +24 -3
- package/esm/overlays/index.d.ts +2 -0
- package/esm/overlays/index.js +2 -0
- package/esm/overlays/index.js.map +1 -0
- package/esm/overlays/portal/Portal.d.ts +11 -0
- package/esm/overlays/portal/Portal.js +27 -0
- package/esm/overlays/portal/Portal.js.map +1 -0
- package/esm/package.json +1 -1
- package/esm/pagination/Pagination.d.ts +1 -1
- package/esm/pagination/Pagination.js +2 -2
- package/esm/pagination/PaginationItem.d.ts +2 -2
- package/esm/pagination/PaginationItem.js +1 -1
- package/esm/pagination/index.d.ts +1 -1
- package/esm/pagination/index.js +1 -1
- package/esm/panel/Panel.d.ts +10 -17
- package/esm/panel/Panel.js +6 -16
- package/esm/panel/Panel.js.map +1 -1
- package/esm/panel/index.d.ts +2 -2
- package/esm/panel/index.js +1 -1
- package/esm/popover/Popover.d.ts +1 -1
- package/esm/popover/Popover.js +6 -6
- package/esm/popover/Popover.js.map +1 -1
- package/esm/popover/index.d.ts +2 -2
- package/esm/popover/index.js +1 -1
- package/esm/provider/index.d.ts +1 -1
- package/esm/provider/index.js +1 -1
- package/esm/read-more/ReadMore.js +3 -3
- package/esm/read-more/index.d.ts +2 -2
- package/esm/read-more/index.js +1 -1
- package/esm/skeleton/index.d.ts +2 -2
- package/esm/skeleton/index.js +1 -1
- package/esm/stepper/Step.d.ts +1 -1
- package/esm/stepper/Step.js +3 -3
- package/esm/stepper/Stepper.d.ts +1 -1
- package/esm/stepper/Stepper.js +2 -2
- package/esm/stepper/index.d.ts +1 -1
- package/esm/stepper/index.js +1 -1
- package/esm/table/ColumnHeader.d.ts +1 -1
- package/esm/table/ColumnHeader.js +2 -2
- package/esm/table/DataCell.js +1 -1
- package/esm/table/ExpandableRow.d.ts +1 -1
- package/esm/table/ExpandableRow.js +6 -6
- package/esm/table/Table.d.ts +8 -8
- package/esm/table/Table.js +8 -8
- package/esm/table/context.d.ts +1 -1
- package/esm/table/index.d.ts +9 -9
- package/esm/table/index.js +1 -1
- package/esm/table/types.d.ts +1 -1
- package/esm/tabs/Tab.d.ts +1 -1
- package/esm/tabs/Tab.js +2 -2
- package/esm/tabs/TabList.js +5 -5
- package/esm/tabs/TabList.js.map +1 -1
- package/esm/tabs/TabPanel.js +2 -2
- package/esm/tabs/TabPanel.js.map +1 -1
- package/esm/tabs/Tabs.d.ts +4 -4
- package/esm/tabs/Tabs.js +4 -4
- package/esm/tabs/index.d.ts +4 -4
- package/esm/tabs/index.js +1 -1
- package/esm/tag/Tag.js +1 -1
- package/esm/tag/index.d.ts +1 -1
- package/esm/tag/index.js +1 -1
- package/esm/timeline/AxisLabels.d.ts +1 -1
- package/esm/timeline/AxisLabels.js +5 -5
- package/esm/timeline/AxisLabels.js.map +1 -1
- package/esm/timeline/Pin.d.ts +1 -1
- package/esm/timeline/Pin.js +3 -3
- package/esm/timeline/Timeline.d.ts +5 -5
- package/esm/timeline/Timeline.js +9 -9
- package/esm/timeline/TimelineRow.d.ts +1 -1
- package/esm/timeline/TimelineRow.js +5 -5
- package/esm/timeline/hooks/useRowContext.d.ts +1 -1
- package/esm/timeline/hooks/useTimelineRows.d.ts +1 -1
- package/esm/timeline/hooks/useTimelineRows.js +3 -3
- package/esm/timeline/index.d.ts +6 -6
- package/esm/timeline/index.js +1 -1
- package/esm/timeline/period/ClickablePeriod.d.ts +1 -1
- package/esm/timeline/period/ClickablePeriod.js +5 -5
- package/esm/timeline/period/NonClickablePeriod.d.ts +1 -1
- package/esm/timeline/period/NonClickablePeriod.js +1 -1
- package/esm/timeline/period/index.d.ts +1 -1
- package/esm/timeline/period/index.js +4 -4
- package/esm/timeline/utils/filter.d.ts +1 -1
- package/esm/timeline/utils/index.d.ts +1 -1
- package/esm/timeline/utils/index.js +1 -1
- package/esm/timeline/utils/sort.d.ts +1 -1
- package/esm/timeline/utils/timeline.d.ts +1 -1
- package/esm/timeline/utils/timeline.js +1 -1
- package/esm/timeline/zoom/ZoomButton.js +2 -2
- package/esm/timeline/zoom/index.d.ts +1 -1
- package/esm/timeline/zoom/index.js +1 -1
- package/esm/toggle-group/ToggleGroup.d.ts +1 -1
- package/esm/toggle-group/ToggleGroup.js +4 -4
- package/esm/toggle-group/ToggleItem.js +2 -2
- package/esm/toggle-group/index.d.ts +2 -2
- package/esm/toggle-group/index.js +1 -1
- package/esm/tooltip/Tooltip.js +11 -15
- package/esm/tooltip/Tooltip.js.map +1 -1
- package/esm/tooltip/index.d.ts +1 -1
- package/esm/tooltip/index.js +1 -1
- package/esm/typography/BodyLong.d.ts +2 -2
- package/esm/typography/BodyLong.js +1 -1
- package/esm/typography/BodyShort.d.ts +2 -2
- package/esm/typography/BodyShort.js +1 -1
- package/esm/typography/Detail.d.ts +2 -2
- package/esm/typography/Detail.js +1 -1
- package/esm/typography/ErrorMessage.d.ts +2 -2
- package/esm/typography/ErrorMessage.js +1 -1
- package/esm/typography/Heading.d.ts +2 -2
- package/esm/typography/Heading.js +1 -1
- package/esm/typography/Ingress.d.ts +1 -1
- package/esm/typography/Label.d.ts +2 -2
- package/esm/typography/Label.js +1 -1
- package/esm/typography/index.d.ts +7 -7
- package/esm/typography/index.js +7 -7
- package/esm/typography/util.d.ts +1 -1
- package/esm/util/Slot.js +6 -3
- package/esm/util/Slot.js.map +1 -1
- package/esm/util/TextareaAutoSize.js +17 -27
- package/esm/util/TextareaAutoSize.js.map +1 -1
- package/esm/util/create-context.d.ts +2 -5
- package/esm/util/create-context.js +10 -6
- package/esm/util/create-context.js.map +1 -1
- package/esm/util/hooks/descendants/descendant.js +1 -1
- package/esm/util/hooks/descendants/useDescendant.d.ts +1 -1
- package/esm/util/hooks/descendants/useDescendant.js +5 -5
- package/esm/util/hooks/index.d.ts +8 -8
- package/esm/util/hooks/index.js +8 -8
- package/esm/util/hooks/useControllableState.js +1 -1
- package/esm/util/index.d.ts +6 -6
- package/esm/util/index.js +5 -5
- package/esm/util/types/AsChildProps.d.ts +36 -0
- package/esm/util/types/AsChildProps.js +2 -0
- package/esm/util/types/AsChildProps.js.map +1 -0
- package/esm/util/types/OverridableComponent.d.ts +1 -1
- package/esm/util/types/index.d.ts +2 -1
- package/package.json +11 -10
- package/src/accordion/accordion.stories.tsx +121 -135
- package/src/alert/alert.stories.tsx +202 -113
- package/src/button/button.stories.tsx +88 -185
- package/src/chat/Bubble.tsx +2 -23
- package/src/chat/Chat.tsx +1 -18
- package/src/chat/chat.stories.tsx +284 -216
- package/src/date/context/useSharedMonthContext.tsx +1 -2
- package/src/date/datepicker/DatePicker.tsx +1 -3
- package/src/date/datepicker/DatePickerStandalone.tsx +1 -3
- package/src/date/datepicker/datepicker.stories.tsx +11 -7
- package/src/date/datepicker/parts/DayButton.tsx +1 -1
- package/src/date/datepicker/parts/DropdownCaption.tsx +1 -4
- package/src/date/datepicker/parts/Row.tsx +3 -2
- package/src/date/hooks/useDatepicker.tsx +2 -8
- package/src/date/hooks/useMonthPicker.tsx +1 -6
- package/src/date/hooks/useRangeDatepicker.tsx +5 -3
- package/src/date/monthpicker/MonthButton.tsx +7 -5
- package/src/date/monthpicker/MonthCaption.tsx +7 -4
- package/src/date/monthpicker/MonthPicker.tsx +10 -8
- package/src/date/monthpicker/MonthPickerStandalone.tsx +10 -8
- package/src/date/monthpicker/MonthSelector.tsx +1 -4
- package/src/date/monthpicker/monthpicker.stories.tsx +5 -3
- package/src/date/parts/DateInput.tsx +1 -1
- package/src/date/parts/DateWrapper.tsx +3 -3
- package/src/date/utils/__tests__/format-dates.test.ts +1 -1
- package/src/date/utils/__tests__/get-initial-year.test.ts +1 -1
- package/src/date/utils/__tests__/parse-dates.test.ts +2 -2
- package/src/date/utils/check-dates.ts +1 -2
- package/src/date/utils/dates-disabled.ts +1 -1
- package/src/date/utils/format-date.ts +1 -1
- package/src/date/utils/get-dates.ts +7 -5
- package/src/date/utils/get-initial-year.ts +1 -1
- package/src/date/utils/is-match.ts +6 -4
- package/src/date/utils/labels.ts +1 -0
- package/src/date/utils/locale.ts +1 -3
- package/src/date/utils/navigation.ts +1 -1
- package/src/date/utils/parse-date.ts +1 -3
- package/src/dropdown/dropdown.stories.tsx +1 -1
- package/src/form/Textarea.tsx +34 -34
- package/src/form/combobox/Combobox.tsx +1 -1
- package/src/form/combobox/ComboboxProvider.tsx +2 -0
- package/src/form/combobox/ComboboxWrapper.tsx +0 -1
- package/src/form/combobox/FilteredOptions/FilteredOptions.tsx +131 -92
- package/src/form/combobox/FilteredOptions/filtered-options-util.ts +9 -2
- package/src/form/combobox/FilteredOptions/filteredOptionsContext.tsx +22 -3
- package/src/form/combobox/FilteredOptions/useVirtualFocus.ts +63 -45
- package/src/form/combobox/Input/Input.tsx +3 -1
- package/src/form/combobox/SelectedOptions/selectedOptionsContext.tsx +11 -1
- package/src/form/combobox/combobox.stories.tsx +36 -1
- package/src/form/combobox/combobox.test.tsx +1 -3
- package/src/form/combobox/types.ts +15 -0
- package/src/form/error-summary/error-summary.stories.tsx +1 -1
- package/src/form/search/Search.tsx +7 -2
- package/src/form/stories/confirmation-panel.stories.tsx +1 -1
- package/src/form/stories/textarea.stories.tsx +37 -0
- package/src/help-text/help-text.stories.tsx +2 -1
- package/src/index.ts +2 -2
- package/src/internal-header/header.stories.tsx +2 -1
- package/src/layout/bleed/Bleed.stories.tsx +15 -1
- package/src/layout/bleed/Bleed.tsx +2 -2
- package/src/layout/box/Box.stories.tsx +3 -2
- package/src/layout/sidemal-test/navno-sidemal.stories.tsx +5 -1
- package/src/layout/utilities/css.ts +3 -0
- package/src/layout/utilities/types.ts +1 -1
- package/src/link/stories/link.stories.tsx +20 -22
- package/src/link-panel/link-panel.stories.tsx +1 -1
- package/src/list/list.stories.tsx +2 -1
- package/src/loader/loader.stories.tsx +1 -1
- package/src/modal/Modal.context.ts +13 -0
- package/src/modal/Modal.test.tsx +2 -2
- package/src/modal/Modal.tsx +6 -8
- package/src/modal/ModalHeader.tsx +3 -7
- package/src/modal/modal.stories.tsx +33 -6
- package/src/modal/types.ts +21 -4
- package/src/overlays/index.ts +2 -0
- package/src/overlays/portal/Portal.stories.tsx +99 -0
- package/src/overlays/portal/Portal.tsx +32 -0
- package/src/panel/Panel.tsx +9 -16
- package/src/popover/Popover.tsx +2 -2
- package/src/stepper/stepper.stories.tsx +1 -1
- package/src/table/stories/{table.stories.tsx → table-1.stories.tsx} +118 -92
- package/src/table/stories/{table-expandable.stories.tsx → table-2-expandable.stories.tsx} +10 -34
- package/src/table/stories/{table-async.stories.tsx → table-3-async.stories.tsx} +5 -3
- package/src/table/stories/tests/table.stories.tsx +4 -1
- package/src/table/types.ts +1 -1
- package/src/tabs/TabList.tsx +2 -2
- package/src/tabs/TabPanel.tsx +2 -2
- package/src/tabs/Tabs.test.tsx +109 -0
- package/src/timeline/AxisLabels.tsx +1 -1
- package/src/toggle-group/ToggleGroup.test.tsx +54 -0
- package/src/tooltip/Tooltip.tsx +7 -17
- package/src/tooltip/tooltip.stories.tsx +4 -1
- package/src/typography/stories/bodylong.stories.tsx +49 -3
- package/src/typography/stories/bodyshort.stories.tsx +50 -4
- package/src/typography/stories/detail.stories.tsx +32 -3
- package/src/typography/stories/error-message.stories.tsx +34 -3
- package/src/typography/stories/heading.stories.tsx +32 -3
- package/src/typography/stories/label.stories.tsx +38 -3
- package/src/util/Slot.tsx +4 -2
- package/src/util/TextareaAutoSize.tsx +16 -31
- package/src/util/create-context.tsx +26 -15
- package/src/util/types/AsChildProps.ts +37 -0
- package/src/util/types/OverridableComponent.ts +1 -1
- package/src/util/types/index.ts +1 -0
- package/_docs.json +0 -19787
- package/cjs/grid/Cell.d.ts +0 -30
- package/cjs/grid/Cell.js +0 -52
- package/cjs/grid/Cell.js.map +0 -1
- package/cjs/grid/Grid.d.ts +0 -13
- package/cjs/grid/Grid.js.map +0 -1
- package/cjs/grid/index.d.ts +0 -2
- package/cjs/grid/index.js +0 -11
- package/cjs/grid/index.js.map +0 -1
- package/cjs/layout/content-container/ContentContainer.d.ts +0 -9
- package/cjs/layout/content-container/ContentContainer.js +0 -48
- package/cjs/layout/content-container/ContentContainer.js.map +0 -1
- package/cjs/layout/content-container/index.d.ts +0 -1
- package/cjs/layout/content-container/index.js +0 -9
- package/cjs/layout/content-container/index.js.map +0 -1
- package/cjs/modal/ModalContext.d.ts +0 -7
- package/cjs/modal/ModalContext.js +0 -9
- package/cjs/modal/ModalContext.js.map +0 -1
- package/esm/grid/Cell.d.ts +0 -30
- package/esm/grid/Cell.js +0 -23
- package/esm/grid/Cell.js.map +0 -1
- package/esm/grid/Grid.d.ts +0 -13
- package/esm/grid/Grid.js +0 -23
- package/esm/grid/Grid.js.map +0 -1
- package/esm/grid/index.d.ts +0 -2
- package/esm/grid/index.js +0 -3
- package/esm/grid/index.js.map +0 -1
- package/esm/layout/content-container/ContentContainer.d.ts +0 -9
- package/esm/layout/content-container/ContentContainer.js +0 -19
- package/esm/layout/content-container/ContentContainer.js.map +0 -1
- package/esm/layout/content-container/index.d.ts +0 -1
- package/esm/layout/content-container/index.js +0 -2
- package/esm/layout/content-container/index.js.map +0 -1
- package/esm/modal/ModalContext.d.ts +0 -7
- package/esm/modal/ModalContext.js +0 -3
- package/esm/modal/ModalContext.js.map +0 -1
- package/src/grid/Cell.tsx +0 -53
- package/src/grid/Grid.tsx +0 -23
- package/src/grid/grid.stories.tsx +0 -67
- package/src/grid/index.ts +0 -2
- package/src/layout/content-container/ContentContainer.tsx +0 -22
- package/src/layout/content-container/index.ts +0 -4
- package/src/layout/sidemal-test/navno-sidemal.stories.mdx +0 -29
- package/src/modal/ModalContext.ts +0 -7
- package/src/panel/panel.stories.tsx +0 -63
- package/src/typography/stories/ingress.stories.tsx +0 -50
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labels.js","sourceRoot":"","sources":["../../../src/date/utils/labels.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"labels.js","sourceRoot":"","sources":["../../../src/date/utils/labels.ts"],"names":[],"mappings":"AAGA,MAAM,SAAS,GAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;;IAClD,QAAQ,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,0CAAE,IAAI,EAAE,CAAC;QAC9B,KAAK,IAAI;YACP,OAAO,oBAAoB,CAAC;QAC9B,KAAK,IAAI;YACP,OAAO,oBAAoB,CAAC;QAC9B,KAAK,IAAI;YACP,OAAO,kBAAkB,CAAC;QAC5B;YACE,OAAO,oBAAoB,CAAC;IAChC,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,aAAa,GAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;;IACtD,QAAQ,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,0CAAE,IAAI,EAAE,CAAC;QAC9B,KAAK,IAAI;YACP,OAAO,sBAAsB,CAAC;QAChC,KAAK,IAAI;YACP,OAAO,oBAAoB,CAAC;QAC9B,KAAK,IAAI;YACP,OAAO,sBAAsB,CAAC;QAChC;YACE,OAAO,sBAAsB,CAAC;IAClC,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAE,EAAE;IAClD,QAAQ,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,EAAE,CAAC;QACrB,KAAK,IAAI;YACP,OAAO,IAAI,CAAC;QACd,KAAK,IAAI;YACP,OAAO,IAAI,CAAC;QACd,KAAK,IAAI;YACP,OAAO,MAAM,CAAC;QAChB;YACE,OAAO,IAAI,CAAC;IAChB,CAA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CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** @private */
|
|
2
|
-
export declare const getLocaleFromString: (locale?: "nb" | "nn" | "en") => Locale;
|
|
2
|
+
export declare const getLocaleFromString: (locale?: "nb" | "nn" | "en") => import("date-fns/locale").Locale;
|
package/esm/date/utils/locale.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale.js","sourceRoot":"","sources":["../../../src/date/utils/locale.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"locale.js","sourceRoot":"","sources":["../../../src/date/utils/locale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAE/C,eAAe;AACf,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,SAA6B,IAAI,EAAE,EAAE;IACvE,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,IAAI;YACP,OAAO,EAAE,CAAC;QACZ,KAAK,IAAI;YACP,OAAO,IAAI,CAAC;QACd;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Matcher } from "./is-match";
|
|
1
|
+
import { Matcher } from "./is-match.js";
|
|
2
2
|
export declare const nextEnabled: (months: any, key: string, disabled: Matcher[], currentMonth: Date, setYearState: (date: Date) => void, yearState: Date, dropdownCaption: boolean, fromDate?: Date, toDate?: Date) => Date;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import setYear from "date-fns
|
|
2
|
-
import { isMatch } from "./is-match";
|
|
1
|
+
import { setYear } from "date-fns";
|
|
2
|
+
import { isMatch } from "./is-match.js";
|
|
3
3
|
export const nextEnabled = (months, key, disabled, currentMonth, setYearState, yearState, dropdownCaption, fromDate, toDate) => {
|
|
4
4
|
const currentIndex = currentMonth.getMonth();
|
|
5
5
|
if (key === "Home") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../src/date/utils/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../src/date/utils/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAW,OAAO,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,MAAM,EACN,GAAW,EACX,QAAmB,EACnB,YAAkB,EAClB,YAAkC,EAClC,SAAe,EACf,eAAwB,EACxB,QAAe,EACf,MAAa,EACP,EAAE;IACR,MAAM,YAAY,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;IAE7C,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;QACnB,MAAM,QAAQ,GAAG,SAAS,CACxB,YAAY,EACZ,MAAM,EACN,SAAS,EACT,QAAQ,EACR,MAAM,CACP,CAAC;QACF,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,QAAQ,CAAC;QAClB,CAAC;IACH,CAAC;IACD,IAAI,GAAG,KAAK,KAAK,EAAE,CAAC;QAClB,MAAM,QAAQ,GAAG,SAAS,CACxB,YAAY,EACZ,MAAM,EACN,SAAS,EACT,QAAQ,EACR,KAAK,CACN,CAAC;QACF,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,QAAQ,CAAC;QAClB,CAAC;IACH,CAAC;IACD,IAAI,GAAG,KAAK,QAAQ,EAAE,CAAC;QACrB,IACE,CAAC,eAAe;YAChB,CAAC,QAAQ,IAAI,SAAS,CAAC,WAAW,EAAE,GAAG,CAAC,KAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAA,CAAC,EACpE,CAAC;YACD,YAAY,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW,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AC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACjC,MAAM;QACR,KAAK,CAAC;YACJ,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACjC,MAAM;QACR,KAAK,CAAC;YACJ,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAClC,MAAM;QACR;YACE,MAAM;IACV,CAAC;IAED,IAAI,IAAI,KAAK,KAAK;QAAE,WAAW,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC;IAExD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5C,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAE7B,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC;YACxE,OAAO,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Locale } from "date-fns";
|
|
1
2
|
export declare const INPUT_DATE_STRING_FORMAT_DATE = "dd.MM.yyyy";
|
|
2
3
|
export declare const INPUT_DATE_STRING_FORMAT_MONTH = "MMMM yyyy";
|
|
3
4
|
export declare const parseDate: (date: string, today: Date, locale: Locale, type: "date" | "month", allowTwoDigitYear: boolean) => Date;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import isBefore from "date-fns
|
|
2
|
-
import
|
|
3
|
-
import sub from "date-fns/sub";
|
|
4
|
-
import { isValidDate } from "./check-dates";
|
|
1
|
+
import { isBefore, parse, sub } from "date-fns";
|
|
2
|
+
import { isValidDate } from "./check-dates.js";
|
|
5
3
|
export const INPUT_DATE_STRING_FORMAT_DATE = "dd.MM.yyyy";
|
|
6
4
|
export const INPUT_DATE_STRING_FORMAT_MONTH = "MMMM yyyy";
|
|
7
5
|
const ALLOWED_INPUT_FORMATS_DATE = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-date.js","sourceRoot":"","sources":["../../../src/date/utils/parse-date.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,
|
|
1
|
+
{"version":3,"file":"parse-date.js","sourceRoot":"","sources":["../../../src/date/utils/parse-date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,CAAC,MAAM,6BAA6B,GAAG,YAAY,CAAC;AAE1D,MAAM,CAAC,MAAM,8BAA8B,GAAG,WAAW,CAAC;AAE1D,MAAM,0BAA0B,GAAG;IACjC,6BAA6B;IAC7B,UAAU;IACV,YAAY;IACZ,YAAY;CACb,CAAC;AAEF,MAAM,2BAA2B,GAAG;IAClC,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,SAAS;IACT,SAAS;IACT,8BAA8B;IAC9B,GAAG,0BAA0B;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,IAAY,EACZ,KAAW,EACX,MAAc,EACd,IAAsB,EACtB,iBAA0B,EACpB,EAAE;IACR,IAAI,MAAM,CAAC;IACX,MAAM,eAAe,GACnB,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,2BAA2B,CAAC;IAE7E,IAAI,iBAAiB,EAAE,CAAC;QACtB,KAAK,MAAM,MAAM,IAAI,eAAe,EAAE,CAAC;YACrC,MAAM,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC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AAC,CAAC,aAAa,CAAC;IACpB,CAAC;IAED,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,qCAAqC,CAC5C,UAAkB,EAClB,OAAoB;IAEpB,MAAM,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,OAAO,GAAG,UAAU,CAAC,KAAK,CACxB,CAAC,EACD,UAAU,CAAC,MAAM,GAAG,CAAC,CACtB,GAAG,OAAO,GAAG,YAAY,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { MenuType } from "./Menu";
|
|
3
|
-
import { ToggleProps } from "./Toggle";
|
|
2
|
+
import { MenuType } from "./Menu/index.js";
|
|
3
|
+
import { ToggleProps } from "./Toggle.js";
|
|
4
4
|
export interface DropdownProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
/**
|
package/esm/dropdown/Dropdown.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { useControllableState } from "../util/hooks/useControllableState";
|
|
3
|
-
import Menu from "./Menu";
|
|
4
|
-
import Toggle from "./Toggle";
|
|
5
|
-
import { DropdownContext } from "./context";
|
|
2
|
+
import { useControllableState } from "../util/hooks/useControllableState.js";
|
|
3
|
+
import Menu from "./Menu/index.js";
|
|
4
|
+
import Toggle from "./Toggle.js";
|
|
5
|
+
import { DropdownContext } from "./context.js";
|
|
6
6
|
/**
|
|
7
7
|
* A component that displays a dropdown menu when the user clicks on its toggle button.
|
|
8
8
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { OverridableComponent } from "../../../util/types";
|
|
2
|
+
import { OverridableComponent } from "../../../util/types/index.js";
|
|
3
3
|
export interface GroupedItemProps extends React.ButtonHTMLAttributes<HTMLElement> {
|
|
4
4
|
/**
|
|
5
5
|
* Menu item content
|
|
@@ -11,8 +11,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef, useContext } from "react";
|
|
14
|
-
import { composeEventHandlers } from "../../../util/composeEventHandlers";
|
|
15
|
-
import { DropdownContext } from "../../context";
|
|
14
|
+
import { composeEventHandlers } from "../../../util/composeEventHandlers.js";
|
|
15
|
+
import { DropdownContext } from "../../context.js";
|
|
16
16
|
export const GroupedItem = forwardRef((_a, ref) => {
|
|
17
17
|
var { as: Component = "button", className, onClick } = _a, rest = __rest(_a, ["as", "className", "onClick"]);
|
|
18
18
|
const context = useContext(DropdownContext);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { OverridableComponent } from "../../../util/types";
|
|
3
|
-
import { GroupedHeadingProps } from "./GroupedHeading";
|
|
4
|
-
import { GroupedItemProps } from "./GroupedItem";
|
|
2
|
+
import { OverridableComponent } from "../../../util/types/index.js";
|
|
3
|
+
import { GroupedHeadingProps } from "./GroupedHeading.js";
|
|
4
|
+
import { GroupedItemProps } from "./GroupedItem.js";
|
|
5
5
|
export interface GroupedListProps extends React.HTMLAttributes<HTMLDListElement> {
|
|
6
6
|
/**
|
|
7
7
|
* Menu list content
|
|
@@ -11,8 +11,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef } from "react";
|
|
14
|
-
import GroupedHeading from "./GroupedHeading";
|
|
15
|
-
import GroupedItem from "./GroupedItem";
|
|
14
|
+
import GroupedHeading from "./GroupedHeading.js";
|
|
15
|
+
import GroupedItem from "./GroupedItem.js";
|
|
16
16
|
export const DescriptionList = forwardRef((_a, ref) => {
|
|
17
17
|
var { className, children } = _a, rest = __rest(_a, ["className", "children"]);
|
|
18
18
|
return (React.createElement("dl", Object.assign({}, rest, { ref: ref, className: cl("navds-dropdown__list", className) }), children));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { OverridableComponent } from "../../../util/types";
|
|
2
|
+
import { OverridableComponent } from "../../../util/types/index.js";
|
|
3
3
|
export interface ListItemProps extends React.ButtonHTMLAttributes<HTMLElement> {
|
|
4
4
|
/**
|
|
5
5
|
* Menu item content
|
|
@@ -11,8 +11,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef, useContext } from "react";
|
|
14
|
-
import { composeEventHandlers } from "../../../util/composeEventHandlers";
|
|
15
|
-
import { DropdownContext } from "../../context";
|
|
14
|
+
import { composeEventHandlers } from "../../../util/composeEventHandlers.js";
|
|
15
|
+
import { DropdownContext } from "../../context.js";
|
|
16
16
|
export const ListItem = forwardRef((_a, ref) => {
|
|
17
17
|
var { as: Component = "button", className, onClick } = _a, rest = __rest(_a, ["as", "className", "onClick"]);
|
|
18
18
|
const context = useContext(DropdownContext);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { OverridableComponent } from "../../../util/types";
|
|
3
|
-
import { ListItemProps } from "./Item";
|
|
2
|
+
import { OverridableComponent } from "../../../util/types/index.js";
|
|
3
|
+
import { ListItemProps } from "./Item.js";
|
|
4
4
|
export interface ListProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
5
5
|
/**
|
|
6
6
|
* Menu list content
|
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef } from "react";
|
|
14
|
-
import ListItem from "./Item";
|
|
14
|
+
import ListItem from "./Item.js";
|
|
15
15
|
export const List = forwardRef((_a, ref) => {
|
|
16
16
|
var { className, children } = _a, rest = __rest(_a, ["className", "children"]);
|
|
17
17
|
return (React.createElement("ul", Object.assign({}, rest, { ref: ref, className: cl("navds-dropdown__list", className) }), children));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { GroupedListType } from "./GroupedList";
|
|
3
|
-
import { ListType } from "./List";
|
|
2
|
+
import { GroupedListType } from "./GroupedList/index.js";
|
|
3
|
+
import { ListType } from "./List/index.js";
|
|
4
4
|
interface MenuProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
/**
|
|
6
6
|
* Dropdown content
|
|
@@ -11,11 +11,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef, useContext } from "react";
|
|
14
|
-
import { Popover } from "../../popover";
|
|
15
|
-
import { DropdownContext } from "../context";
|
|
16
|
-
import Divider from "./Divider";
|
|
17
|
-
import GroupedList from "./GroupedList";
|
|
18
|
-
import List from "./List";
|
|
14
|
+
import { Popover } from "../../popover/index.js";
|
|
15
|
+
import { DropdownContext } from "../context.js";
|
|
16
|
+
import Divider from "./Divider.js";
|
|
17
|
+
import GroupedList from "./GroupedList/index.js";
|
|
18
|
+
import List from "./List/index.js";
|
|
19
19
|
export const Menu = forwardRef((_a, ref) => {
|
|
20
20
|
var { className, onClose, placement = "bottom-end" } = _a, rest = __rest(_a, ["className", "onClose", "placement"]);
|
|
21
21
|
const context = useContext(DropdownContext);
|
package/esm/dropdown/Toggle.js
CHANGED
|
@@ -11,8 +11,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef, useContext } from "react";
|
|
14
|
-
import { composeEventHandlers } from "../util/composeEventHandlers";
|
|
15
|
-
import { DropdownContext } from "./context";
|
|
14
|
+
import { composeEventHandlers } from "../util/composeEventHandlers.js";
|
|
15
|
+
import { DropdownContext } from "./context.js";
|
|
16
16
|
export const Toggle = forwardRef((_a, ref) => {
|
|
17
17
|
var { className, onClick } = _a, rest = __rest(_a, ["className", "onClick"]);
|
|
18
18
|
const context = useContext(DropdownContext);
|
package/esm/dropdown/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Dropdown, type DropdownProps } from "./Dropdown";
|
|
1
|
+
export { default as Dropdown, type DropdownProps } from "./Dropdown.js";
|
package/esm/dropdown/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Dropdown } from "./Dropdown";
|
|
1
|
+
export { default as Dropdown } from "./Dropdown.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { OverridableComponent } from "../util/types";
|
|
3
|
-
import { ExpansionCardContentProps } from "./ExpansionCardContent";
|
|
4
|
-
import { ExpansionCardDescriptionProps } from "./ExpansionCardDescription";
|
|
5
|
-
import { ExpansionCardHeaderProps } from "./ExpansionCardHeader";
|
|
6
|
-
import { ExpansionCardTitleProps } from "./ExpansionCardTitle";
|
|
2
|
+
import { OverridableComponent } from "../util/types/index.js";
|
|
3
|
+
import { ExpansionCardContentProps } from "./ExpansionCardContent.js";
|
|
4
|
+
import { ExpansionCardDescriptionProps } from "./ExpansionCardDescription.js";
|
|
5
|
+
import { ExpansionCardHeaderProps } from "./ExpansionCardHeader.js";
|
|
6
|
+
import { ExpansionCardTitleProps } from "./ExpansionCardTitle.js";
|
|
7
7
|
interface ExpansionCardComponent extends React.ForwardRefExoticComponent<ExpansionCardProps & React.RefAttributes<HTMLDivElement>> {
|
|
8
8
|
/**
|
|
9
9
|
* @see 🏷️ {@link ExpansionCardHeaderProps}
|
|
@@ -11,11 +11,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef, useRef, useState } from "react";
|
|
14
|
-
import ExpansionCardContent from "./ExpansionCardContent";
|
|
15
|
-
import { ExpansionCardDescription, } from "./ExpansionCardDescription";
|
|
16
|
-
import ExpansionCardHeader from "./ExpansionCardHeader";
|
|
17
|
-
import { ExpansionCardTitle, } from "./ExpansionCardTitle";
|
|
18
|
-
import { ExpansionCardContext } from "./context";
|
|
14
|
+
import ExpansionCardContent from "./ExpansionCardContent.js";
|
|
15
|
+
import { ExpansionCardDescription, } from "./ExpansionCardDescription.js";
|
|
16
|
+
import ExpansionCardHeader from "./ExpansionCardHeader.js";
|
|
17
|
+
import { ExpansionCardTitle, } from "./ExpansionCardTitle.js";
|
|
18
|
+
import { ExpansionCardContext } from "./context.js";
|
|
19
19
|
/**
|
|
20
20
|
* A component that displays an expandable card.
|
|
21
21
|
*
|
|
@@ -11,8 +11,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef, useContext } from "react";
|
|
14
|
-
import { BodyLong } from "../typography";
|
|
15
|
-
import { ExpansionCardContext } from "./context";
|
|
14
|
+
import { BodyLong } from "../typography/index.js";
|
|
15
|
+
import { ExpansionCardContext } from "./context.js";
|
|
16
16
|
const ExpansionCardContent = forwardRef((_a, ref) => {
|
|
17
17
|
var { children, className } = _a, rest = __rest(_a, ["children", "className"]);
|
|
18
18
|
const panelContext = useContext(ExpansionCardContext);
|
|
@@ -11,8 +11,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef, useContext } from "react";
|
|
14
|
-
import { BodyLong } from "../typography";
|
|
15
|
-
import { ExpansionCardContext } from "./context";
|
|
14
|
+
import { BodyLong } from "../typography/index.js";
|
|
15
|
+
import { ExpansionCardContext } from "./context.js";
|
|
16
16
|
export const ExpansionCardDescription = forwardRef((_a, ref) => {
|
|
17
17
|
var { className } = _a, rest = __rest(_a, ["className"]);
|
|
18
18
|
const panelContext = useContext(ExpansionCardContext);
|
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef, useContext } from "react";
|
|
14
14
|
import { ChevronDownIcon } from "@navikt/aksel-icons";
|
|
15
|
-
import { ExpansionCardContext } from "./context";
|
|
15
|
+
import { ExpansionCardContext } from "./context.js";
|
|
16
16
|
const ExpansionCardHeader = forwardRef((_a, ref) => {
|
|
17
17
|
var { children, className } = _a, rest = __rest(_a, ["children", "className"]);
|
|
18
18
|
const panelContext = useContext(ExpansionCardContext);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { OverridableComponent } from "../util/types";
|
|
2
|
+
import { OverridableComponent } from "../util/types/index.js";
|
|
3
3
|
export interface ExpansionCardTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type ExpansionCardProps, default as ExpansionCard, } from "./ExpansionCard";
|
|
1
|
+
export { type ExpansionCardProps, default as ExpansionCard, } from "./ExpansionCard.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as ExpansionCard, } from "./ExpansionCard";
|
|
1
|
+
export { default as ExpansionCard, } from "./ExpansionCard.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CheckboxProps } from "./checkbox";
|
|
2
|
+
import { CheckboxProps } from "./checkbox/index.js";
|
|
3
3
|
export interface ConfirmationPanelProps extends Omit<CheckboxProps, "children" | "indeterminate" | "hideLabel" | "error" | "readOnly"> {
|
|
4
4
|
/**
|
|
5
5
|
* Additional information on panel
|
|
@@ -11,10 +11,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef } from "react";
|
|
14
|
-
import { BodyLong, ErrorMessage } from "../typography";
|
|
15
|
-
import { useId } from "../util/hooks";
|
|
16
|
-
import { Checkbox } from "./checkbox";
|
|
17
|
-
import { useFormField } from "./useFormField";
|
|
14
|
+
import { BodyLong, ErrorMessage } from "../typography/index.js";
|
|
15
|
+
import { useId } from "../util/hooks/index.js";
|
|
16
|
+
import { Checkbox } from "./checkbox/index.js";
|
|
17
|
+
import { useFormField } from "./useFormField.js";
|
|
18
18
|
/**
|
|
19
19
|
* A component that displays a confirmation checkbox with a label.
|
|
20
20
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FieldsetHTMLAttributes } from "react";
|
|
2
|
-
import { FormFieldProps } from "../useFormField";
|
|
2
|
+
import { FormFieldProps } from "../useFormField.js";
|
|
3
3
|
export interface FieldsetProps extends FormFieldProps, FieldsetHTMLAttributes<HTMLFieldSetElement> {
|
|
4
4
|
/**
|
|
5
5
|
* FormFields in Fieldset
|
|
@@ -11,11 +11,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef, useContext } from "react";
|
|
14
|
-
import { BodyShort, ErrorMessage, Label } from "../../typography";
|
|
15
|
-
import { omit } from "../../util";
|
|
16
|
-
import { ReadOnlyIcon } from "../ReadOnlyIcon";
|
|
17
|
-
import { FieldsetContext } from "./context";
|
|
18
|
-
import { useFieldset } from "./useFieldset";
|
|
14
|
+
import { BodyShort, ErrorMessage, Label } from "../../typography/index.js";
|
|
15
|
+
import { omit } from "../../util/index.js";
|
|
16
|
+
import { ReadOnlyIcon } from "../ReadOnlyIcon.js";
|
|
17
|
+
import { FieldsetContext } from "./context.js";
|
|
18
|
+
import { useFieldset } from "./useFieldset.js";
|
|
19
19
|
export const Fieldset = forwardRef((props, ref) => {
|
|
20
20
|
var _a, _b, _c;
|
|
21
21
|
const { inputProps, errorId, showErrorMsg, hasError, size, readOnly, inputDescriptionId, } = useFieldset(props);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Fieldset, type FieldsetProps } from "./Fieldset";
|
|
2
|
-
export { FieldsetContext } from "./context";
|
|
1
|
+
export { default as Fieldset, type FieldsetProps } from "./Fieldset.js";
|
|
2
|
+
export { FieldsetContext } from "./context.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as Fieldset } from "./Fieldset";
|
|
2
|
-
export { FieldsetContext } from "./context";
|
|
1
|
+
export { default as Fieldset } from "./Fieldset.js";
|
|
2
|
+
export { FieldsetContext } from "./context.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/esm/form/Select.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { SelectHTMLAttributes } from "react";
|
|
2
|
-
import { FormFieldProps } from "./useFormField";
|
|
2
|
+
import { FormFieldProps } from "./useFormField.js";
|
|
3
3
|
export interface SelectProps extends FormFieldProps, Omit<SelectHTMLAttributes<HTMLSelectElement>, "size"> {
|
|
4
4
|
/**
|
|
5
5
|
* Collection of <option />-elements
|
package/esm/form/Select.js
CHANGED
|
@@ -12,10 +12,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef } from "react";
|
|
14
14
|
import { ChevronDownIcon } from "@navikt/aksel-icons";
|
|
15
|
-
import { BodyShort, ErrorMessage, Label } from "../typography";
|
|
16
|
-
import { omit } from "../util";
|
|
17
|
-
import { ReadOnlyIcon } from "./ReadOnlyIcon";
|
|
18
|
-
import { useFormField } from "./useFormField";
|
|
15
|
+
import { BodyShort, ErrorMessage, Label } from "../typography/index.js";
|
|
16
|
+
import { omit } from "../util/index.js";
|
|
17
|
+
import { ReadOnlyIcon } from "./ReadOnlyIcon.js";
|
|
18
|
+
import { useFormField } from "./useFormField.js";
|
|
19
19
|
/**
|
|
20
20
|
* A component that displays a select input field.
|
|
21
21
|
*
|
package/esm/form/Switch.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { InputHTMLAttributes } from "react";
|
|
2
|
-
import { FormFieldProps } from "./useFormField";
|
|
2
|
+
import { FormFieldProps } from "./useFormField.js";
|
|
3
3
|
export interface SwitchProps extends Omit<FormFieldProps, "error" | "errorId">, Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
4
4
|
/**
|
|
5
5
|
* Switch-label
|
package/esm/form/Switch.js
CHANGED
|
@@ -11,11 +11,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef, useEffect, useState, } from "react";
|
|
14
|
-
import { Loader } from "../loader";
|
|
15
|
-
import { BodyShort } from "../typography";
|
|
16
|
-
import { omit } from "../util";
|
|
17
|
-
import { ReadOnlyIcon } from "./ReadOnlyIcon";
|
|
18
|
-
import { useFormField } from "./useFormField";
|
|
14
|
+
import { Loader } from "../loader/index.js";
|
|
15
|
+
import { BodyShort } from "../typography/index.js";
|
|
16
|
+
import { omit } from "../util/index.js";
|
|
17
|
+
import { ReadOnlyIcon } from "./ReadOnlyIcon.js";
|
|
18
|
+
import { useFormField } from "./useFormField.js";
|
|
19
19
|
const SelectedIcon = () => (React.createElement("svg", { width: "12", height: "10", viewBox: "0 0 12 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", focusable: false, role: "img", "aria-hidden": true, "aria-label": "Deaktiver valg" },
|
|
20
20
|
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.2674 0.647802C11.8762 1.20971 11.9141 2.1587 11.3522 2.76743L5.35221 9.26743C5.07531 9.56739 4.68813 9.74155 4.27998 9.74971C3.87184 9.75787 3.478 9.59933 3.18934 9.31067L0.68934 6.81067C0.103553 6.22488 0.103553 5.27513 0.68934 4.68935C1.27513 4.10356 2.22487 4.10356 2.81066 4.68935L4.20673 6.08541L9.14779 0.732587C9.7097 0.123856 10.6587 0.0858967 11.2674 0.647802Z", fill: "currentColor" })));
|
|
21
21
|
/**
|
package/esm/form/TextField.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { InputHTMLAttributes } from "react";
|
|
2
|
-
import { FormFieldProps } from "./useFormField";
|
|
2
|
+
import { FormFieldProps } from "./useFormField.js";
|
|
3
3
|
export interface TextFieldProps extends FormFieldProps, Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
4
4
|
/**
|
|
5
5
|
* Controlled value
|
package/esm/form/TextField.js
CHANGED
|
@@ -11,10 +11,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef } from "react";
|
|
14
|
-
import { BodyShort, ErrorMessage, Label } from "../typography";
|
|
15
|
-
import { omit } from "../util";
|
|
16
|
-
import { ReadOnlyIcon } from "./ReadOnlyIcon";
|
|
17
|
-
import { useFormField } from "./useFormField";
|
|
14
|
+
import { BodyShort, ErrorMessage, Label } from "../typography/index.js";
|
|
15
|
+
import { omit } from "../util/index.js";
|
|
16
|
+
import { ReadOnlyIcon } from "./ReadOnlyIcon.js";
|
|
17
|
+
import { useFormField } from "./useFormField.js";
|
|
18
18
|
/**
|
|
19
19
|
* A component that displays a text input field with a label.
|
|
20
20
|
*
|
package/esm/form/Textarea.d.ts
CHANGED
package/esm/form/Textarea.js
CHANGED
|
@@ -11,13 +11,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import cl from "clsx";
|
|
13
13
|
import React, { forwardRef, useState } from "react";
|
|
14
|
-
import { BodyShort, ErrorMessage, Label } from "../typography";
|
|
15
|
-
import { omit } from "../util";
|
|
16
|
-
import TextareaAutosize from "../util/TextareaAutoSize";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
14
|
+
import { BodyShort, ErrorMessage, Label } from "../typography/index.js";
|
|
15
|
+
import { omit } from "../util/index.js";
|
|
16
|
+
import TextareaAutosize from "../util/TextareaAutoSize.js";
|
|
17
|
+
import { composeEventHandlers } from "../util/composeEventHandlers.js";
|
|
18
|
+
import { useId } from "../util/hooks/index.js";
|
|
19
|
+
import { ReadOnlyIcon } from "./ReadOnlyIcon.js";
|
|
20
|
+
import Counter from "./TextareaCounter.js";
|
|
21
|
+
import { useFormField } from "./useFormField.js";
|
|
21
22
|
/**
|
|
22
23
|
* A component that displays a textarea input field with a label.
|
|
23
24
|
*
|
|
@@ -35,7 +36,7 @@ export const Textarea = forwardRef((props, ref) => {
|
|
|
35
36
|
const { label, className, description, maxLength, hideLabel = false, resize, UNSAFE_autoScrollbar, i18n, readOnly } = props, rest = __rest(props, ["label", "className", "description", "maxLength", "hideLabel", "resize", "UNSAFE_autoScrollbar", "i18n", "readOnly"]);
|
|
36
37
|
const maxLengthId = useId();
|
|
37
38
|
const hasMaxLength = maxLength !== undefined && maxLength > 0;
|
|
38
|
-
const [
|
|
39
|
+
const [uncontrolledValue, setUncontrolledValue] = useState((_a = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _a !== void 0 ? _a : "");
|
|
39
40
|
const getMinRows = () => {
|
|
40
41
|
let rows = (rest === null || rest === void 0 ? void 0 : rest.minRows) ? rest === null || rest === void 0 ? void 0 : rest.minRows : 3;
|
|
41
42
|
if (size === "small") {
|
|
@@ -62,13 +63,12 @@ export const Textarea = forwardRef((props, ref) => {
|
|
|
62
63
|
!!description && (React.createElement(BodyShort, { className: cl("navds-form-field__description", {
|
|
63
64
|
"navds-sr-only": hideLabel,
|
|
64
65
|
}), id: inputDescriptionId, size: size, as: "div" }, description)),
|
|
65
|
-
React.createElement("
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
React.createElement(Counter, { maxLength: maxLength, currentLength: (_c = (_b = props.value) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : controlledValue === null || controlledValue === void 0 ? void 0 : controlledValue.length, size: size, i18n: i18n })))),
|
|
66
|
+
React.createElement(TextareaAutosize, Object.assign({}, omit(rest, ["error", "errorId", "size"]), inputProps, { onChange: composeEventHandlers(props.onChange, props.value === undefined
|
|
67
|
+
? (e) => setUncontrolledValue(e.target.value)
|
|
68
|
+
: undefined), minRows: getMinRows(), autoScrollbar: UNSAFE_autoScrollbar, ref: ref, readOnly: readOnly, className: cl("navds-textarea__input", "navds-body-short", `navds-body-short--${size !== null && size !== void 0 ? size : "medium"}`) }, (describedBy ? { "aria-describedby": describedBy } : {}))),
|
|
69
|
+
hasMaxLength && !readOnly && !inputProps.disabled && (React.createElement(React.Fragment, null,
|
|
70
|
+
React.createElement("span", { id: maxLengthId, className: "navds-sr-only" }, `Tekstområde med plass til ${maxLength} tegn.`),
|
|
71
|
+
React.createElement(Counter, { maxLength: maxLength, currentLength: (_c = (_b = props.value) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : uncontrolledValue.length, size: size, i18n: i18n }))),
|
|
72
72
|
React.createElement("div", { className: "navds-form-field__error", id: errorId, "aria-relevant": "additions removals", "aria-live": "polite" }, showErrorMsg && (React.createElement(ErrorMessage, { size: size }, props.error)))));
|
|
73
73
|
});
|
|
74
74
|
export default Textarea;
|