@navikt/ds-react 6.0.0-alpha.2 → 6.0.0-alpha.7
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 +520 -60
- 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/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/error-summary/ErrorSummary.d.ts +9 -3
- package/cjs/form/error-summary/ErrorSummary.js +4 -9
- package/cjs/form/error-summary/ErrorSummary.js.map +1 -1
- package/cjs/form/error-summary/ErrorSummaryItem.d.ts +1 -1
- package/cjs/form/error-summary/ErrorSummaryItem.js +2 -1
- package/cjs/form/error-summary/ErrorSummaryItem.js.map +1 -1
- package/cjs/form/search/Search.d.ts +1 -0
- 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 +1 -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/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/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 +3 -7
- 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/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/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 +6 -6
- 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 +9 -3
- package/esm/form/error-summary/ErrorSummary.js +8 -13
- package/esm/form/error-summary/ErrorSummary.js.map +1 -1
- package/esm/form/error-summary/ErrorSummaryItem.d.ts +2 -2
- package/esm/form/error-summary/ErrorSummaryItem.js +2 -1
- package/esm/form/error-summary/ErrorSummaryItem.js.map +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 +3 -2
- 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 -42
- 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.d.ts +4 -4
- package/esm/modal/Modal.js +12 -12
- package/esm/modal/ModalHeader.js +2 -2
- 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/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 +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 +5 -5
- 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/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 +9 -13
- 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/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/index.d.ts +2 -1
- package/package.json +9 -8
- package/src/alert/alert.stories.tsx +202 -113
- package/src/chat/Bubble.tsx +2 -23
- package/src/chat/Chat.tsx +1 -18
- package/src/chat/chat.stories.tsx +0 -31
- 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 +5 -5
- 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 +3 -2
- package/src/date/parts/DateInput.tsx +1 -1
- 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/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/ErrorSummary.tsx +15 -11
- package/src/form/error-summary/ErrorSummaryItem.tsx +10 -8
- package/src/form/error-summary/error-summary.stories.tsx +55 -1
- package/src/form/search/Search.tsx +6 -1
- package/src/form/stories/textarea.stories.tsx +37 -0
- package/src/index.ts +1 -2
- package/src/layout/bleed/Bleed.stories.tsx +13 -0
- package/src/layout/bleed/Bleed.tsx +2 -2
- package/src/layout/box/Box.stories.tsx +1 -1
- package/src/layout/sidemal-test/navno-sidemal.stories.tsx +1 -0
- package/src/layout/utilities/css.ts +3 -0
- package/src/layout/utilities/types.ts +1 -1
- 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/tabs/TabList.tsx +2 -2
- package/src/tabs/TabPanel.tsx +2 -2
- package/src/timeline/AxisLabels.tsx +1 -1
- package/src/tooltip/Tooltip.tsx +4 -8
- package/src/util/Slot.tsx +4 -2
- package/src/util/TextareaAutoSize.tsx +16 -31
- package/src/util/types/AsChildProps.ts +37 -0
- package/src/util/types/index.ts +1 -0
- 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/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/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
|
@@ -10,7 +10,7 @@ type State = {
|
|
|
10
10
|
overflow?: boolean | undefined;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const checkState = (
|
|
14
14
|
prevState: State,
|
|
15
15
|
newState: State,
|
|
16
16
|
renders: React.MutableRefObject<number>,
|
|
@@ -25,20 +25,12 @@ const updateState = (
|
|
|
25
25
|
prevState.overflow !== overflow)
|
|
26
26
|
) {
|
|
27
27
|
renders.current += 1;
|
|
28
|
-
return
|
|
29
|
-
overflow,
|
|
30
|
-
outerHeightStyle,
|
|
31
|
-
};
|
|
28
|
+
return newState;
|
|
32
29
|
}
|
|
33
|
-
if (process.env.NODE_ENV !== "production") {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"Textarea: Too many re-renders. The layout is unstable.",
|
|
38
|
-
"TextareaAutosize limits the number of renders to prevent an infinite loop.",
|
|
39
|
-
].join("\n"),
|
|
40
|
-
);
|
|
41
|
-
}
|
|
30
|
+
if (process.env.NODE_ENV !== "production" && renders.current === 20) {
|
|
31
|
+
console.error(
|
|
32
|
+
"Textarea: Too many re-renders. The layout is unstable. TextareaAutosize limits the number of renders to prevent an infinite loop.",
|
|
33
|
+
);
|
|
42
34
|
}
|
|
43
35
|
return prevState;
|
|
44
36
|
};
|
|
@@ -92,9 +84,7 @@ const TextareaAutosize = forwardRef<HTMLTextAreaElement, TextareaAutosizeProps>(
|
|
|
92
84
|
) => {
|
|
93
85
|
const { current: isControlled } = useRef(value != null);
|
|
94
86
|
const inputRef = useRef<HTMLTextAreaElement>(null);
|
|
95
|
-
|
|
96
87
|
const handleRef = useMergeRefs(inputRef, ref);
|
|
97
|
-
|
|
98
88
|
const shadowRef = useRef<HTMLTextAreaElement>(null);
|
|
99
89
|
const renders = useRef(0);
|
|
100
90
|
const [state, setState] = useState<State>({ outerHeightStyle: 0 });
|
|
@@ -153,35 +143,31 @@ const TextareaAutosize = forwardRef<HTMLTextAreaElement, TextareaAutosizeProps>(
|
|
|
153
143
|
return { outerHeightStyle, overflow };
|
|
154
144
|
}, [maxRows, minRows, other.placeholder]);
|
|
155
145
|
|
|
156
|
-
const syncHeight =
|
|
146
|
+
const syncHeight = () => {
|
|
157
147
|
const newState = getUpdatedState();
|
|
158
|
-
|
|
159
148
|
if (isEmpty(newState)) {
|
|
160
149
|
return;
|
|
161
150
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}, [getUpdatedState]);
|
|
151
|
+
setState((prevState) => checkState(prevState, newState, renders));
|
|
152
|
+
};
|
|
165
153
|
|
|
166
154
|
useClientLayoutEffect(() => {
|
|
167
155
|
const syncHeightWithFlushSync = () => {
|
|
168
156
|
const newState = getUpdatedState();
|
|
169
|
-
|
|
170
157
|
if (isEmpty(newState)) {
|
|
171
158
|
return;
|
|
172
159
|
}
|
|
173
160
|
|
|
174
161
|
// In React 18, state updates in a ResizeObserver's callback are happening after
|
|
175
162
|
// the paint, this leads to an infinite rendering.
|
|
176
|
-
//
|
|
177
|
-
// Using flushSync ensures that the states is updated before the next pain.
|
|
163
|
+
// Using flushSync ensures that the state is updated before the next paint.
|
|
178
164
|
// Related issue - https://github.com/facebook/react/issues/24331
|
|
179
165
|
ReactDOM.flushSync(() => {
|
|
180
|
-
setState((prevState) =>
|
|
166
|
+
setState((prevState) => checkState(prevState, newState, renders));
|
|
181
167
|
});
|
|
182
168
|
};
|
|
183
169
|
|
|
184
|
-
const handleResize = () => {
|
|
170
|
+
const handleResize = debounce(() => {
|
|
185
171
|
renders.current = 0;
|
|
186
172
|
|
|
187
173
|
if (inputRef.current?.style.height || inputRef.current?.style.width) {
|
|
@@ -193,13 +179,12 @@ const TextareaAutosize = forwardRef<HTMLTextAreaElement, TextareaAutosizeProps>(
|
|
|
193
179
|
}
|
|
194
180
|
|
|
195
181
|
syncHeightWithFlushSync();
|
|
196
|
-
};
|
|
182
|
+
});
|
|
197
183
|
|
|
198
|
-
const debounceHandleResize = debounce(handleResize);
|
|
199
184
|
const input = inputRef.current!;
|
|
200
185
|
const containerWindow = ownerWindow(input);
|
|
201
186
|
|
|
202
|
-
containerWindow.addEventListener("resize",
|
|
187
|
+
containerWindow.addEventListener("resize", handleResize);
|
|
203
188
|
|
|
204
189
|
let resizeObserver: ResizeObserver;
|
|
205
190
|
if (typeof ResizeObserver !== "undefined") {
|
|
@@ -208,8 +193,8 @@ const TextareaAutosize = forwardRef<HTMLTextAreaElement, TextareaAutosizeProps>(
|
|
|
208
193
|
}
|
|
209
194
|
|
|
210
195
|
return () => {
|
|
211
|
-
|
|
212
|
-
containerWindow.removeEventListener("resize",
|
|
196
|
+
handleResize.clear();
|
|
197
|
+
containerWindow.removeEventListener("resize", handleResize);
|
|
213
198
|
if (resizeObserver) {
|
|
214
199
|
resizeObserver.disconnect();
|
|
215
200
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type AsChildProps =
|
|
2
|
+
| {
|
|
3
|
+
children: React.ReactElement | false | null;
|
|
4
|
+
/**
|
|
5
|
+
* Renders the component and its child as a single element,
|
|
6
|
+
* merging the props of the component with the props of the child.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Component asChild data-prop>
|
|
11
|
+
* <ChildComponent data-child />
|
|
12
|
+
* </Component>
|
|
13
|
+
*
|
|
14
|
+
* // Renders
|
|
15
|
+
* <MergedComponent data-prop data-child />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
asChild: true;
|
|
19
|
+
}
|
|
20
|
+
| {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Renders the component and its child as a single element,
|
|
24
|
+
* merging the props of the component with the props of the child.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <Component asChild data-prop>
|
|
29
|
+
* <ChildComponent data-child />
|
|
30
|
+
* </Component>
|
|
31
|
+
*
|
|
32
|
+
* // Renders
|
|
33
|
+
* <MergedComponent data-prop data-child />
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
asChild?: false;
|
|
37
|
+
};
|
package/src/util/types/index.ts
CHANGED
package/cjs/grid/Cell.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from "react";
|
|
2
|
-
type Column = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
3
|
-
export interface CellProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
/**
|
|
5
|
-
* Cell content
|
|
6
|
-
*/
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* Cell columns on width < 448px
|
|
10
|
-
*/
|
|
11
|
-
xs: Column;
|
|
12
|
-
/**
|
|
13
|
-
* Cell columns on min-width: 448
|
|
14
|
-
*/
|
|
15
|
-
sm?: Column;
|
|
16
|
-
/**
|
|
17
|
-
* Cell columns on min-width: 648
|
|
18
|
-
*/
|
|
19
|
-
md?: Column;
|
|
20
|
-
/**
|
|
21
|
-
* Cell columns on min-width: 960px
|
|
22
|
-
*/
|
|
23
|
-
lg?: Column;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated Use <HGrid /> instead. <Grid /> will be removed in the future.
|
|
27
|
-
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/hgrid)
|
|
28
|
-
*/
|
|
29
|
-
export declare const Cell: React.ForwardRefExoticComponent<CellProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
export default Cell;
|
package/cjs/grid/Cell.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
-
var t = {};
|
|
27
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
-
t[p] = s[p];
|
|
29
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
-
t[p[i]] = s[p[i]];
|
|
33
|
-
}
|
|
34
|
-
return t;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.Cell = void 0;
|
|
41
|
-
const clsx_1 = __importDefault(require("clsx"));
|
|
42
|
-
const react_1 = __importStar(require("react"));
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated Use <HGrid /> instead. <Grid /> will be removed in the future.
|
|
45
|
-
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/hgrid)
|
|
46
|
-
*/
|
|
47
|
-
exports.Cell = (0, react_1.forwardRef)((_a, ref) => {
|
|
48
|
-
var { children, xs, sm, md, lg, className } = _a, rest = __rest(_a, ["children", "xs", "sm", "md", "lg", "className"]);
|
|
49
|
-
return (react_1.default.createElement("div", Object.assign({}, rest, { ref: ref, className: (0, clsx_1.default)("navds-grid__cell", xs && `navds-grid__cell--xs-${xs}`, sm && `navds-grid__cell--sm-${sm}`, md && `navds-grid__cell--md-${md}`, lg && `navds-grid__cell--lg-${lg}`, className) }), children));
|
|
50
|
-
});
|
|
51
|
-
exports.default = exports.Cell;
|
|
52
|
-
//# sourceMappingURL=Cell.js.map
|
package/cjs/grid/Cell.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Cell.js","sourceRoot":"","sources":["../../src/grid/Cell.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAsB;AACtB,+CAA0D;AA0B1D;;;GAGG;AACU,QAAA,IAAI,GAAG,IAAA,kBAAU,EAC5B,CAAC,EAAgD,EAAE,GAAG,EAAE,EAAE;QAAzD,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,OAAW,EAAN,IAAI,cAA9C,iDAAgD,CAAF;IAC7C,OAAO,CACL,uDACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAE,EACX,kBAAkB,EAClB,EAAE,IAAI,wBAAwB,EAAE,EAAE,EAClC,EAAE,IAAI,wBAAwB,EAAE,EAAE,EAClC,EAAE,IAAI,wBAAwB,EAAE,EAAE,EAClC,EAAE,IAAI,wBAAwB,EAAE,EAAE,EAClC,SAAS,CACV,KAEA,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAe,YAAI,CAAC"}
|
package/cjs/grid/Grid.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from "react";
|
|
2
|
-
export interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/**
|
|
4
|
-
* Collection of <Cell>-elements
|
|
5
|
-
*/
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Use <HGrid /> instead. <Grid /> will be removed in the future.
|
|
10
|
-
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/hgrid)
|
|
11
|
-
*/
|
|
12
|
-
export declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export default Grid;
|
package/cjs/grid/Grid.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../src/grid/Grid.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAsB;AACtB,+CAA0D;AAS1D;;;GAGG;AACU,QAAA,IAAI,GAAG,IAAA,kBAAU,EAC5B,CAAC,EAAgC,EAAE,GAAG,EAAE,EAAE;QAAzC,EAAE,QAAQ,EAAE,SAAS,OAAW,EAAN,IAAI,cAA9B,yBAAgC,CAAF;IAAY,OAAA,CACzC,qDAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,cAAE,EAAC,YAAY,EAAE,SAAS,CAAC,IAAM,IAAI,GAC5D,QAAQ,CACL,CACP,CAAA;CAAA,CACF,CAAC;AAEF,kBAAe,YAAI,CAAC"}
|
package/cjs/grid/index.d.ts
DELETED
package/cjs/grid/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Grid = exports.Cell = void 0;
|
|
7
|
-
var Cell_1 = require("./Cell");
|
|
8
|
-
Object.defineProperty(exports, "Cell", { enumerable: true, get: function () { return __importDefault(Cell_1).default; } });
|
|
9
|
-
var Grid_1 = require("./Grid");
|
|
10
|
-
Object.defineProperty(exports, "Grid", { enumerable: true, get: function () { return __importDefault(Grid_1).default; } });
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
package/cjs/grid/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/grid/index.ts"],"names":[],"mappings":";;;;;;AAAA,+BAAyD;AAAhD,6GAAA,OAAO,OAAQ;AACxB,+BAAyD;AAAhD,6GAAA,OAAO,OAAQ"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from "react";
|
|
2
|
-
export interface ContentContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/**
|
|
4
|
-
* ContentContainer content
|
|
5
|
-
*/
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare const ContentContainer: React.ForwardRefExoticComponent<ContentContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
export default ContentContainer;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
-
var t = {};
|
|
27
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
-
t[p] = s[p];
|
|
29
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
-
t[p[i]] = s[p[i]];
|
|
33
|
-
}
|
|
34
|
-
return t;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.ContentContainer = void 0;
|
|
41
|
-
const clsx_1 = __importDefault(require("clsx"));
|
|
42
|
-
const react_1 = __importStar(require("react"));
|
|
43
|
-
exports.ContentContainer = (0, react_1.forwardRef)((_a, ref) => {
|
|
44
|
-
var { className } = _a, rest = __rest(_a, ["className"]);
|
|
45
|
-
return (react_1.default.createElement("div", Object.assign({ ref: ref, className: (0, clsx_1.default)("navds-content-container", className) }, rest)));
|
|
46
|
-
});
|
|
47
|
-
exports.default = exports.ContentContainer;
|
|
48
|
-
//# sourceMappingURL=ContentContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentContainer.js","sourceRoot":"","sources":["../../../src/layout/content-container/ContentContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAsB;AACtB,+CAA0D;AAS7C,QAAA,gBAAgB,GAAG,IAAA,kBAAU,EAGxC,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;IAAY,OAAA,CACjC,qDACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAE,EAAC,yBAAyB,EAAE,SAAS,CAAC,IAC/C,IAAI,EACR,CACH,CAAA;CAAA,CAAC,CAAC;AAEH,kBAAe,wBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ContentContainer, type ContentContainerProps, } from "./ContentContainer";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ContentContainer = void 0;
|
|
7
|
-
var ContentContainer_1 = require("./ContentContainer");
|
|
8
|
-
Object.defineProperty(exports, "ContentContainer", { enumerable: true, get: function () { return __importDefault(ContentContainer_1).default; } });
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layout/content-container/index.ts"],"names":[],"mappings":";;;;;;AAAA,uDAG4B;AAF1B,qIAAA,OAAO,OAAoB"}
|
package/esm/grid/Cell.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from "react";
|
|
2
|
-
type Column = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
3
|
-
export interface CellProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
/**
|
|
5
|
-
* Cell content
|
|
6
|
-
*/
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* Cell columns on width < 448px
|
|
10
|
-
*/
|
|
11
|
-
xs: Column;
|
|
12
|
-
/**
|
|
13
|
-
* Cell columns on min-width: 448
|
|
14
|
-
*/
|
|
15
|
-
sm?: Column;
|
|
16
|
-
/**
|
|
17
|
-
* Cell columns on min-width: 648
|
|
18
|
-
*/
|
|
19
|
-
md?: Column;
|
|
20
|
-
/**
|
|
21
|
-
* Cell columns on min-width: 960px
|
|
22
|
-
*/
|
|
23
|
-
lg?: Column;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated Use <HGrid /> instead. <Grid /> will be removed in the future.
|
|
27
|
-
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/hgrid)
|
|
28
|
-
*/
|
|
29
|
-
export declare const Cell: React.ForwardRefExoticComponent<CellProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
export default Cell;
|
package/esm/grid/Cell.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import cl from "clsx";
|
|
13
|
-
import React, { forwardRef } from "react";
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated Use <HGrid /> instead. <Grid /> will be removed in the future.
|
|
16
|
-
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/hgrid)
|
|
17
|
-
*/
|
|
18
|
-
export const Cell = forwardRef((_a, ref) => {
|
|
19
|
-
var { children, xs, sm, md, lg, className } = _a, rest = __rest(_a, ["children", "xs", "sm", "md", "lg", "className"]);
|
|
20
|
-
return (React.createElement("div", Object.assign({}, rest, { ref: ref, className: cl("navds-grid__cell", xs && `navds-grid__cell--xs-${xs}`, sm && `navds-grid__cell--sm-${sm}`, md && `navds-grid__cell--md-${md}`, lg && `navds-grid__cell--lg-${lg}`, className) }), children));
|
|
21
|
-
});
|
|
22
|
-
export default Cell;
|
|
23
|
-
//# sourceMappingURL=Cell.js.map
|
package/esm/grid/Cell.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Cell.js","sourceRoot":"","sources":["../../src/grid/Cell.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,KAAK,EAAE,EAAkB,UAAU,EAAE,MAAM,OAAO,CAAC;AA0B1D;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAC5B,CAAC,EAAgD,EAAE,GAAG,EAAE,EAAE;QAAzD,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,OAAW,EAAN,IAAI,cAA9C,iDAAgD,CAAF;IAC7C,OAAO,CACL,6CACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,kBAAkB,EAClB,EAAE,IAAI,wBAAwB,EAAE,EAAE,EAClC,EAAE,IAAI,wBAAwB,EAAE,EAAE,EAClC,EAAE,IAAI,wBAAwB,EAAE,EAAE,EAClC,EAAE,IAAI,wBAAwB,EAAE,EAAE,EAClC,SAAS,CACV,KAEA,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/esm/grid/Grid.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from "react";
|
|
2
|
-
export interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/**
|
|
4
|
-
* Collection of <Cell>-elements
|
|
5
|
-
*/
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Use <HGrid /> instead. <Grid /> will be removed in the future.
|
|
10
|
-
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/hgrid)
|
|
11
|
-
*/
|
|
12
|
-
export declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
export default Grid;
|
package/esm/grid/Grid.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import cl from "clsx";
|
|
13
|
-
import React, { forwardRef } from "react";
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated Use <HGrid /> instead. <Grid /> will be removed in the future.
|
|
16
|
-
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/hgrid)
|
|
17
|
-
*/
|
|
18
|
-
export const Grid = forwardRef((_a, ref) => {
|
|
19
|
-
var { children, className } = _a, rest = __rest(_a, ["children", "className"]);
|
|
20
|
-
return (React.createElement("div", Object.assign({ ref: ref, className: cl("navds-grid", className) }, rest), children));
|
|
21
|
-
});
|
|
22
|
-
export default Grid;
|
|
23
|
-
//# sourceMappingURL=Grid.js.map
|
package/esm/grid/Grid.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../src/grid/Grid.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,KAAK,EAAE,EAAkB,UAAU,EAAE,MAAM,OAAO,CAAC;AAS1D;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAC5B,CAAC,EAAgC,EAAE,GAAG,EAAE,EAAE;QAAzC,EAAE,QAAQ,EAAE,SAAS,OAAW,EAAN,IAAI,cAA9B,yBAAgC,CAAF;IAAY,OAAA,CACzC,2CAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,IAAM,IAAI,GAC5D,QAAQ,CACL,CACP,CAAA;CAAA,CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/esm/grid/index.d.ts
DELETED
package/esm/grid/index.js
DELETED
package/esm/grid/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/grid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAkB,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAkB,MAAM,QAAQ,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from "react";
|
|
2
|
-
export interface ContentContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/**
|
|
4
|
-
* ContentContainer content
|
|
5
|
-
*/
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare const ContentContainer: React.ForwardRefExoticComponent<ContentContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
export default ContentContainer;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import cl from "clsx";
|
|
13
|
-
import React, { forwardRef } from "react";
|
|
14
|
-
export const ContentContainer = forwardRef((_a, ref) => {
|
|
15
|
-
var { className } = _a, rest = __rest(_a, ["className"]);
|
|
16
|
-
return (React.createElement("div", Object.assign({ ref: ref, className: cl("navds-content-container", className) }, rest)));
|
|
17
|
-
});
|
|
18
|
-
export default ContentContainer;
|
|
19
|
-
//# sourceMappingURL=ContentContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentContainer.js","sourceRoot":"","sources":["../../../src/layout/content-container/ContentContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,KAAK,EAAE,EAAkB,UAAU,EAAE,MAAM,OAAO,CAAC;AAS1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAGxC,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;IAAY,OAAA,CACjC,2CACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,SAAS,CAAC,IAC/C,IAAI,EACR,CACH,CAAA;CAAA,CAAC,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ContentContainer, type ContentContainerProps, } from "./ContentContainer";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layout/content-container/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,gBAAgB,GAE5B,MAAM,oBAAoB,CAAC"}
|
package/src/grid/Cell.tsx
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import cl from "clsx";
|
|
2
|
-
import React, { HTMLAttributes, forwardRef } from "react";
|
|
3
|
-
|
|
4
|
-
type Column = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
5
|
-
export interface CellProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
/**
|
|
7
|
-
* Cell content
|
|
8
|
-
*/
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
/**
|
|
11
|
-
* Cell columns on width < 448px
|
|
12
|
-
*/
|
|
13
|
-
xs: Column;
|
|
14
|
-
/**
|
|
15
|
-
* Cell columns on min-width: 448
|
|
16
|
-
*/
|
|
17
|
-
sm?: Column;
|
|
18
|
-
/**
|
|
19
|
-
* Cell columns on min-width: 648
|
|
20
|
-
*/
|
|
21
|
-
md?: Column;
|
|
22
|
-
/**
|
|
23
|
-
* Cell columns on min-width: 960px
|
|
24
|
-
*/
|
|
25
|
-
lg?: Column;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @deprecated Use <HGrid /> instead. <Grid /> will be removed in the future.
|
|
30
|
-
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/hgrid)
|
|
31
|
-
*/
|
|
32
|
-
export const Cell = forwardRef<HTMLDivElement, CellProps>(
|
|
33
|
-
({ children, xs, sm, md, lg, className, ...rest }, ref) => {
|
|
34
|
-
return (
|
|
35
|
-
<div
|
|
36
|
-
{...rest}
|
|
37
|
-
ref={ref}
|
|
38
|
-
className={cl(
|
|
39
|
-
"navds-grid__cell",
|
|
40
|
-
xs && `navds-grid__cell--xs-${xs}`,
|
|
41
|
-
sm && `navds-grid__cell--sm-${sm}`,
|
|
42
|
-
md && `navds-grid__cell--md-${md}`,
|
|
43
|
-
lg && `navds-grid__cell--lg-${lg}`,
|
|
44
|
-
className,
|
|
45
|
-
)}
|
|
46
|
-
>
|
|
47
|
-
{children}
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
},
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
export default Cell;
|
package/src/grid/Grid.tsx
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import cl from "clsx";
|
|
2
|
-
import React, { HTMLAttributes, forwardRef } from "react";
|
|
3
|
-
|
|
4
|
-
export interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
/**
|
|
6
|
-
* Collection of <Cell>-elements
|
|
7
|
-
*/
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Use <HGrid /> instead. <Grid /> will be removed in the future.
|
|
13
|
-
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/hgrid)
|
|
14
|
-
*/
|
|
15
|
-
export const Grid = forwardRef<HTMLDivElement, GridProps>(
|
|
16
|
-
({ children, className, ...rest }, ref) => (
|
|
17
|
-
<div ref={ref} className={cl("navds-grid", className)} {...rest}>
|
|
18
|
-
{children}
|
|
19
|
-
</div>
|
|
20
|
-
),
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
export default Grid;
|