@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,12 +1,16 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { expect, userEvent, within } from "@storybook/test";
|
|
3
2
|
import React from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { VStack } from "../layout/stack";
|
|
4
|
+
import { Link } from "../link";
|
|
5
|
+
import { BodyLong, Heading as DsHeading } from "../typography";
|
|
6
|
+
import Alert, { AlertProps } from "./Alert";
|
|
6
7
|
|
|
7
8
|
const meta: Meta<typeof Alert> = {
|
|
8
9
|
title: "ds-react/Alert",
|
|
9
10
|
component: Alert,
|
|
11
|
+
parameters: {
|
|
12
|
+
chromatic: { disable: true },
|
|
13
|
+
},
|
|
10
14
|
};
|
|
11
15
|
|
|
12
16
|
export default meta;
|
|
@@ -20,12 +24,13 @@ const variants: AlertProps["variant"][] = [
|
|
|
20
24
|
"success",
|
|
21
25
|
];
|
|
22
26
|
|
|
23
|
-
export const
|
|
27
|
+
export const Controls: Story = {
|
|
24
28
|
render: (props) => <Alert {...props} />,
|
|
25
29
|
|
|
26
30
|
args: {
|
|
27
31
|
children: "Id elit esse enim reprehenderit enim nisi veniam nostrud.",
|
|
28
32
|
fullWidth: false,
|
|
33
|
+
inline: false,
|
|
29
34
|
variant: "info",
|
|
30
35
|
size: "medium",
|
|
31
36
|
closeButton: false,
|
|
@@ -42,43 +47,18 @@ export const Default: Story = {
|
|
|
42
47
|
},
|
|
43
48
|
};
|
|
44
49
|
|
|
45
|
-
export const
|
|
46
|
-
render: (props) => {
|
|
47
|
-
return (
|
|
48
|
-
<div className="colgap">
|
|
49
|
-
{variants.map((variant, i) => (
|
|
50
|
-
<Alert
|
|
51
|
-
key={variant}
|
|
52
|
-
variant={variant}
|
|
53
|
-
size="small"
|
|
54
|
-
closeButton={props.closeButton}
|
|
55
|
-
>
|
|
56
|
-
{new Array(i + 1).fill(
|
|
57
|
-
"Id elit esse enim reprehenderit enim nisi veniam nostrud.",
|
|
58
|
-
)}
|
|
59
|
-
</Alert>
|
|
60
|
-
))}
|
|
61
|
-
</div>
|
|
62
|
-
);
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
args: {
|
|
66
|
-
closeButton: false,
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export const FullWidth = () => {
|
|
50
|
+
export const Variants = () => {
|
|
71
51
|
return (
|
|
72
52
|
<div className="colgap">
|
|
73
53
|
{variants.map((variant, i) => (
|
|
74
|
-
<Alert key={variant} variant={variant}
|
|
54
|
+
<Alert key={variant} variant={variant}>
|
|
75
55
|
{new Array(i + 1).fill(
|
|
76
56
|
"Id elit esse enim reprehenderit enim nisi veniam nostrud.",
|
|
77
57
|
)}
|
|
78
58
|
</Alert>
|
|
79
59
|
))}
|
|
80
60
|
{variants.map((variant, i) => (
|
|
81
|
-
<Alert key={variant} variant={variant}
|
|
61
|
+
<Alert key={variant} variant={variant} size="small">
|
|
82
62
|
{new Array(i + 1).fill(
|
|
83
63
|
"Id elit esse enim reprehenderit enim nisi veniam nostrud.",
|
|
84
64
|
)}
|
|
@@ -88,24 +68,42 @@ export const FullWidth = () => {
|
|
|
88
68
|
);
|
|
89
69
|
};
|
|
90
70
|
|
|
71
|
+
export const FullWidth = () => {
|
|
72
|
+
return (
|
|
73
|
+
<VStack gap="4">
|
|
74
|
+
<Alert variant="info" fullWidth>
|
|
75
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
76
|
+
</Alert>
|
|
77
|
+
<Alert variant="info" fullWidth size="small">
|
|
78
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
79
|
+
</Alert>
|
|
80
|
+
</VStack>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
91
84
|
export const Inline = () => {
|
|
92
85
|
return (
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
86
|
+
<VStack gap="4">
|
|
87
|
+
<h2>Inline</h2>
|
|
88
|
+
<Alert variant="info" inline>
|
|
89
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
90
|
+
</Alert>
|
|
91
|
+
<Alert variant="info" inline>
|
|
92
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud. Id elit esse
|
|
93
|
+
enim reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
94
|
+
reprehenderit enim nisi veniam nostrud. Id elit esse enim reprehenderit
|
|
95
|
+
enim nisi veniam nostrud.
|
|
96
|
+
</Alert>
|
|
97
|
+
<Alert variant="info" size="small" inline>
|
|
98
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
99
|
+
</Alert>
|
|
100
|
+
<Alert variant="info" size="small" inline>
|
|
101
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud. Id elit esse
|
|
102
|
+
enim reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
103
|
+
reprehenderit enim nisi veniam nostrud. Id elit esse enim reprehenderit
|
|
104
|
+
enim nisi veniam nostrud.
|
|
105
|
+
</Alert>
|
|
106
|
+
</VStack>
|
|
109
107
|
);
|
|
110
108
|
};
|
|
111
109
|
|
|
@@ -136,82 +134,173 @@ export const Heading = () => {
|
|
|
136
134
|
);
|
|
137
135
|
};
|
|
138
136
|
|
|
139
|
-
export const
|
|
140
|
-
return (
|
|
141
|
-
<div className="colgap">
|
|
142
|
-
{variants.map((variant) => (
|
|
143
|
-
<Alert key={variant} variant={variant}>
|
|
144
|
-
<Link href="#">Id elit esse enim reprehenderit</Link>
|
|
145
|
-
</Alert>
|
|
146
|
-
))}
|
|
147
|
-
</div>
|
|
148
|
-
);
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
const AlertWithCloseButton = ({
|
|
152
|
-
children,
|
|
153
|
-
size,
|
|
154
|
-
}: {
|
|
155
|
-
size?: "medium" | "small";
|
|
156
|
-
children?: React.ReactNode;
|
|
157
|
-
}) => {
|
|
158
|
-
const [show, setShow] = React.useState(true);
|
|
159
|
-
|
|
160
|
-
return show ? (
|
|
161
|
-
<Alert
|
|
162
|
-
variant="warning"
|
|
163
|
-
size={size}
|
|
164
|
-
closeButton
|
|
165
|
-
onClose={() => setShow(false)}
|
|
166
|
-
>
|
|
167
|
-
{children || "Content"}
|
|
168
|
-
</Alert>
|
|
169
|
-
) : null;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
export const WithCloseButton: Story = {
|
|
137
|
+
export const CloseButton: Story = {
|
|
173
138
|
render: () => {
|
|
174
139
|
return (
|
|
175
|
-
<
|
|
176
|
-
<
|
|
177
|
-
<
|
|
178
|
-
|
|
179
|
-
</
|
|
180
|
-
<
|
|
181
|
-
|
|
182
|
-
|
|
140
|
+
<VStack gap="4">
|
|
141
|
+
<h2>CloseButton</h2>
|
|
142
|
+
<Alert variant="info" closeButton>
|
|
143
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
144
|
+
</Alert>
|
|
145
|
+
<Alert variant="info" closeButton>
|
|
146
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud. Id elit esse
|
|
147
|
+
enim reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
148
|
+
reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
149
|
+
reprehenderit enim nisi veniam nostrud.
|
|
150
|
+
</Alert>
|
|
151
|
+
<Alert size="small" variant="info" closeButton>
|
|
152
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
153
|
+
</Alert>
|
|
154
|
+
<Alert size="small" variant="info" closeButton>
|
|
155
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud. Id elit esse
|
|
156
|
+
enim reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
157
|
+
reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
158
|
+
reprehenderit enim nisi veniam nostrud.
|
|
159
|
+
</Alert>
|
|
160
|
+
<Alert variant="info" closeButton>
|
|
161
|
+
<DsHeading size="small" level="3">
|
|
162
|
+
Id elit esse enim reprehenderit
|
|
183
163
|
</DsHeading>
|
|
184
164
|
<BodyLong>
|
|
185
|
-
|
|
186
|
-
laboris ex. Labore ex occaecat proident qui qui fugiat magna. Fugiat
|
|
187
|
-
sint commodo consequat eu aute.
|
|
165
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
188
166
|
</BodyLong>
|
|
189
|
-
</
|
|
190
|
-
<
|
|
191
|
-
<
|
|
192
|
-
|
|
193
|
-
<AlertWithCloseButton size="small">
|
|
194
|
-
<DsHeading spacing size="small" level="3">
|
|
195
|
-
Aliquip duis est in commodo pariatur
|
|
167
|
+
</Alert>
|
|
168
|
+
<Alert variant="info" closeButton size="small">
|
|
169
|
+
<DsHeading size="xsmall" level="3">
|
|
170
|
+
Id elit esse enim reprehenderit
|
|
196
171
|
</DsHeading>
|
|
197
172
|
<BodyLong>
|
|
198
|
-
|
|
199
|
-
laboris ex. Labore ex occaecat proident qui qui fugiat magna. Fugiat
|
|
200
|
-
sint commodo consequat eu aute.
|
|
173
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
201
174
|
</BodyLong>
|
|
202
|
-
</
|
|
203
|
-
</
|
|
175
|
+
</Alert>
|
|
176
|
+
</VStack>
|
|
204
177
|
);
|
|
205
178
|
},
|
|
206
|
-
|
|
207
|
-
const canvas = within(canvasElement);
|
|
208
|
-
const buttons = canvas.getAllByTitle("Lukk Alert");
|
|
179
|
+
};
|
|
209
180
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
181
|
+
export const Chromatic: Story = {
|
|
182
|
+
render: () => (
|
|
183
|
+
<VStack gap="6">
|
|
184
|
+
<VStack gap="2">
|
|
185
|
+
<h2>Variant</h2>
|
|
186
|
+
{variants.map((variant, i) => (
|
|
187
|
+
<Alert key={variant} variant={variant}>
|
|
188
|
+
{new Array(i + 1).fill(
|
|
189
|
+
"Id elit esse enim reprehenderit enim nisi veniam nostrud.",
|
|
190
|
+
)}
|
|
191
|
+
</Alert>
|
|
192
|
+
))}
|
|
193
|
+
</VStack>
|
|
194
|
+
<VStack gap="2">
|
|
195
|
+
<h2>Small</h2>
|
|
196
|
+
<Alert variant="info" size="small">
|
|
197
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
198
|
+
</Alert>
|
|
199
|
+
<Alert variant="info" size="small">
|
|
200
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud. Id elit esse
|
|
201
|
+
enim reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
202
|
+
reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
203
|
+
reprehenderit enim nisi veniam nostrud.
|
|
204
|
+
</Alert>
|
|
205
|
+
</VStack>
|
|
206
|
+
<VStack gap="2">
|
|
207
|
+
<h2>FullWidth</h2>
|
|
208
|
+
<Alert variant="info" fullWidth>
|
|
209
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
210
|
+
</Alert>
|
|
211
|
+
<Alert variant="info" size="small" fullWidth>
|
|
212
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
213
|
+
</Alert>
|
|
214
|
+
</VStack>
|
|
215
|
+
<VStack gap="2">
|
|
216
|
+
<h2>Inline</h2>
|
|
217
|
+
<Alert variant="info" inline>
|
|
218
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
219
|
+
</Alert>
|
|
220
|
+
<Alert variant="info" inline>
|
|
221
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud. Id elit esse
|
|
222
|
+
enim reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
223
|
+
reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
224
|
+
reprehenderit enim nisi veniam nostrud.
|
|
225
|
+
</Alert>
|
|
226
|
+
<Alert variant="info" size="small" inline>
|
|
227
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
228
|
+
</Alert>
|
|
229
|
+
<Alert variant="info" size="small" inline>
|
|
230
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud. Id elit esse
|
|
231
|
+
enim reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
232
|
+
reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
233
|
+
reprehenderit enim nisi veniam nostrud.
|
|
234
|
+
</Alert>
|
|
235
|
+
</VStack>
|
|
236
|
+
<VStack gap="2">
|
|
237
|
+
<h2>Heading</h2>
|
|
238
|
+
<Alert variant="info">
|
|
239
|
+
<DsHeading size="small" level="3">
|
|
240
|
+
Id elit esse enim reprehenderit
|
|
241
|
+
</DsHeading>
|
|
242
|
+
<BodyLong>
|
|
243
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
244
|
+
</BodyLong>
|
|
245
|
+
</Alert>
|
|
246
|
+
<Alert variant="info" size="small">
|
|
247
|
+
<DsHeading size="xsmall" level="3">
|
|
248
|
+
Id elit esse enim reprehenderit
|
|
249
|
+
</DsHeading>
|
|
250
|
+
<BodyLong size="small">
|
|
251
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
252
|
+
</BodyLong>
|
|
253
|
+
</Alert>
|
|
254
|
+
</VStack>
|
|
255
|
+
<VStack gap="2">
|
|
256
|
+
<h2>CloseButton</h2>
|
|
257
|
+
<Alert variant="info" closeButton>
|
|
258
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
259
|
+
</Alert>
|
|
260
|
+
<Alert variant="info" closeButton>
|
|
261
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud. Id elit esse
|
|
262
|
+
enim reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
263
|
+
reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
264
|
+
reprehenderit enim nisi veniam nostrud.
|
|
265
|
+
</Alert>
|
|
266
|
+
<Alert size="small" variant="info" closeButton>
|
|
267
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
268
|
+
</Alert>
|
|
269
|
+
<Alert size="small" variant="info" closeButton>
|
|
270
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud. Id elit esse
|
|
271
|
+
enim reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
272
|
+
reprehenderit enim nisi veniam nostrud. Id elit esse enim
|
|
273
|
+
reprehenderit enim nisi veniam nostrud.
|
|
274
|
+
</Alert>
|
|
275
|
+
<Alert variant="info" closeButton>
|
|
276
|
+
<DsHeading size="small" level="3">
|
|
277
|
+
Id elit esse enim reprehenderit
|
|
278
|
+
</DsHeading>
|
|
279
|
+
<BodyLong>
|
|
280
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
281
|
+
</BodyLong>
|
|
282
|
+
</Alert>
|
|
283
|
+
<Alert variant="info" size="small" closeButton>
|
|
284
|
+
<DsHeading size="xsmall" level="3">
|
|
285
|
+
Id elit esse enim reprehenderit
|
|
286
|
+
</DsHeading>
|
|
287
|
+
<BodyLong size="small">
|
|
288
|
+
Id elit esse enim reprehenderit enim nisi veniam nostrud.
|
|
289
|
+
</BodyLong>
|
|
290
|
+
</Alert>
|
|
291
|
+
</VStack>
|
|
213
292
|
|
|
214
|
-
|
|
215
|
-
|
|
293
|
+
<VStack gap="2">
|
|
294
|
+
<h2>Links</h2>
|
|
295
|
+
{variants.map((variant) => (
|
|
296
|
+
<Alert key={variant} variant={variant}>
|
|
297
|
+
<Link href="#">Id elit esse enim reprehenderit</Link>
|
|
298
|
+
</Alert>
|
|
299
|
+
))}
|
|
300
|
+
</VStack>
|
|
301
|
+
</VStack>
|
|
302
|
+
),
|
|
303
|
+
parameters: {
|
|
304
|
+
chromatic: { disable: false },
|
|
216
305
|
},
|
|
217
306
|
};
|