@navikt/ds-react 5.12.5 → 5.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_docs.json +285 -138
- package/cjs/accordion/Accordion.js +2 -2
- package/cjs/accordion/AccordionHeader.js +3 -5
- package/cjs/accordion/AccordionItem.js +11 -14
- package/cjs/alert/Alert.js +2 -2
- package/cjs/button/Button.js +11 -12
- package/cjs/chat/Bubble.js +1 -1
- package/cjs/chat/Chat.js +2 -2
- package/cjs/chips/Chips.js +1 -1
- package/cjs/chips/Removable.js +4 -7
- package/cjs/copybutton/CopyButton.js +6 -7
- package/cjs/date/datepicker/DatePicker.js +4 -2
- package/cjs/date/datepicker/parts/Caption.js +2 -2
- package/cjs/date/datepicker/parts/DropdownCaption.js +1 -1
- package/cjs/date/datepicker/parts/HeadRow.js +1 -1
- package/cjs/date/datepicker/parts/Row.js +2 -2
- package/cjs/date/datepicker/parts/WeekRow.js +2 -2
- package/cjs/date/monthpicker/MonthCaption.js +1 -1
- package/cjs/date/monthpicker/MonthPicker.js +4 -3
- package/cjs/date/parts/DateInput.js +1 -1
- package/cjs/date/parts/DateWrapper.js +2 -2
- package/cjs/date/utils/check-dates.js +1 -1
- package/cjs/date/utils/is-match.js +2 -2
- package/cjs/date/utils/parse-date.js +1 -1
- package/cjs/dropdown/Dropdown.js +10 -12
- package/cjs/dropdown/Menu/Divider.js +1 -1
- package/cjs/dropdown/Menu/GroupedList/GroupedHeading.js +1 -1
- package/cjs/dropdown/Menu/GroupedList/GroupedItem.js +3 -6
- package/cjs/dropdown/Menu/List/Item.js +3 -6
- package/cjs/dropdown/Toggle.js +6 -5
- package/cjs/expansion-card/ExpansionCardHeader.js +1 -1
- package/cjs/form/ConfirmationPanel.js +2 -2
- package/cjs/form/ReadOnlyIcon.js +1 -1
- package/cjs/form/Select.js +1 -1
- package/cjs/form/Textarea.js +2 -1
- package/cjs/form/checkbox/Checkbox.js +3 -2
- package/cjs/form/combobox/Combobox.js +7 -7
- package/cjs/form/combobox/ComboboxProvider.js +2 -2
- package/cjs/form/combobox/FilteredOptions/FilteredOptions.js +4 -4
- package/cjs/form/combobox/FilteredOptions/filteredOptionsContext.js +5 -6
- package/cjs/form/combobox/Input/inputContext.js +2 -2
- package/cjs/form/combobox/SelectedOptions/SelectedOptions.js +1 -1
- package/cjs/form/combobox/SelectedOptions/selectedOptionsContext.js +2 -5
- package/cjs/form/error-summary/ErrorSummary.js +3 -3
- package/cjs/form/error-summary/ErrorSummaryItem.js +1 -1
- package/cjs/form/radio/Radio.js +3 -2
- package/cjs/form/radio/RadioGroup.js +2 -2
- package/cjs/form/search/Search.js +3 -2
- package/cjs/form/search/SearchButton.js +3 -5
- package/cjs/form/useFormField.js +2 -2
- package/cjs/grid/Cell.js +1 -1
- package/cjs/grid/Grid.js +1 -1
- package/cjs/guide-panel/GuidePanel.js +1 -1
- package/cjs/guide-panel/Illustration.js +2 -2
- package/cjs/help-text/HelpText.js +5 -7
- package/cjs/help-text/HelpTextIcon.js +2 -2
- package/cjs/internal-header/InternalHeaderButton.js +1 -1
- package/cjs/internal-header/InternalHeaderTitle.js +1 -1
- package/cjs/internal-header/InternalHeaderUser.js +1 -1
- package/cjs/internal-header/InternalHeaderUserButton.js +1 -1
- package/cjs/layout/bleed/Bleed.js +1 -1
- package/cjs/layout/content-container/ContentContainer.js +1 -1
- package/cjs/layout/grid/HGrid.js +1 -1
- package/cjs/layout/page/parts/PageBlock.js +1 -1
- package/cjs/layout/sidemal-test/AvatarPanel.js +1 -1
- package/cjs/layout/sidemal-test/Content.js +3 -3
- package/cjs/layout/sidemal-test/Filter.js +1 -1
- package/cjs/layout/sidemal-test/Intro.js +1 -1
- package/cjs/link-panel/LinkPanel.js +3 -3
- package/cjs/link-panel/LinkPanelDescription.js +1 -1
- package/cjs/link-panel/LinkPanelTitle.js +1 -1
- package/cjs/list/List.js +2 -2
- package/cjs/loader/Loader.js +2 -1
- package/cjs/modal/Modal.js +21 -18
- package/cjs/modal/ModalBody.js +1 -1
- package/cjs/modal/ModalFooter.js +1 -1
- package/cjs/modal/ModalHeader.js +1 -1
- package/cjs/pagination/PaginationItem.js +1 -1
- package/cjs/panel/Panel.js +1 -1
- package/cjs/popover/Popover.js +6 -5
- package/cjs/popover/PopoverContent.js +1 -1
- package/cjs/read-more/ReadMore.js +12 -12
- package/cjs/skeleton/Skeleton.js +1 -1
- package/cjs/stepper/Step.js +6 -6
- package/cjs/table/Body.js +1 -1
- package/cjs/table/ColumnHeader.js +1 -1
- package/cjs/table/DataCell.js +3 -3
- package/cjs/table/ExpandableRow.js +23 -22
- package/cjs/table/Header.js +1 -1
- package/cjs/table/HeaderCell.js +2 -1
- package/cjs/table/Row.js +1 -1
- package/cjs/tabs/TabList.js +3 -2
- package/cjs/tabs/Tabs.js +1 -1
- package/cjs/tag/Tag.js +5 -3
- package/cjs/timeline/AxisLabels.js +1 -1
- package/cjs/timeline/Pin.js +2 -2
- package/cjs/timeline/TimelineRow.js +2 -2
- package/cjs/timeline/hooks/useTimelineRows.js +5 -3
- package/cjs/timeline/period/ClickablePeriod.js +2 -2
- package/cjs/timeline/utils/timeline.js +1 -1
- package/cjs/timeline/zoom/ZoomButton.js +1 -1
- package/cjs/toggle-group/ToggleGroup.js +3 -3
- package/cjs/tooltip/Tooltip.js +18 -12
- package/cjs/typography/BodyLong.js +1 -1
- package/cjs/typography/ErrorMessage.js +1 -1
- package/cjs/typography/Ingress.js +1 -1
- package/cjs/util/Slot.js +2 -5
- package/cjs/util/TextareaAutoSize.js +7 -5
- package/cjs/util/composeEventHandlers.js +17 -0
- package/cjs/util/hooks/index.js +19 -0
- package/cjs/util/hooks/package.json +6 -0
- package/cjs/util/hooks/useCallbackRef.js +18 -0
- package/cjs/util/hooks/useClientLayoutEffect.js +7 -0
- package/cjs/util/hooks/useControllableState.js +25 -0
- package/cjs/util/hooks/useMergeRefs.js +37 -0
- package/cjs/util/{usePrevious.js → hooks/usePrevious.js} +2 -1
- package/cjs/util/index.js +7 -7
- package/cjs/util/types/index.js +2 -0
- package/cjs/util/types/package.json +6 -0
- package/esm/accordion/Accordion.d.ts +1 -1
- package/esm/accordion/Accordion.js +2 -2
- package/esm/accordion/Accordion.js.map +1 -1
- package/esm/accordion/AccordionHeader.js +3 -5
- package/esm/accordion/AccordionHeader.js.map +1 -1
- package/esm/accordion/AccordionItem.d.ts +4 -0
- package/esm/accordion/AccordionItem.js +12 -15
- package/esm/accordion/AccordionItem.js.map +1 -1
- package/esm/alert/Alert.js +2 -2
- package/esm/alert/Alert.js.map +1 -1
- package/esm/button/Button.d.ts +1 -1
- package/esm/button/Button.js +12 -13
- package/esm/button/Button.js.map +1 -1
- package/esm/chat/Bubble.js +1 -1
- package/esm/chat/Bubble.js.map +1 -1
- package/esm/chat/Chat.js +2 -2
- package/esm/chat/Chat.js.map +1 -1
- package/esm/chips/Chips.d.ts +2 -2
- package/esm/chips/Chips.js +1 -1
- package/esm/chips/Chips.js.map +1 -1
- package/esm/chips/Removable.js +4 -7
- package/esm/chips/Removable.js.map +1 -1
- package/esm/chips/Toggle.d.ts +1 -1
- package/esm/copybutton/CopyButton.js +6 -7
- package/esm/copybutton/CopyButton.js.map +1 -1
- package/esm/date/context/useSharedMonthContext.js.map +1 -1
- package/esm/date/datepicker/DatePicker.js +5 -3
- package/esm/date/datepicker/DatePicker.js.map +1 -1
- package/esm/date/datepicker/parts/Caption.js +2 -2
- package/esm/date/datepicker/parts/Caption.js.map +1 -1
- package/esm/date/datepicker/parts/DropdownCaption.js +1 -1
- package/esm/date/datepicker/parts/DropdownCaption.js.map +1 -1
- package/esm/date/datepicker/parts/HeadRow.js +1 -1
- package/esm/date/datepicker/parts/HeadRow.js.map +1 -1
- package/esm/date/datepicker/parts/Row.js +3 -3
- package/esm/date/datepicker/parts/Row.js.map +1 -1
- package/esm/date/datepicker/parts/WeekRow.js +1 -1
- package/esm/date/datepicker/parts/WeekRow.js.map +1 -1
- package/esm/date/monthpicker/MonthCaption.js +1 -1
- package/esm/date/monthpicker/MonthCaption.js.map +1 -1
- package/esm/date/monthpicker/MonthPicker.js +4 -3
- package/esm/date/monthpicker/MonthPicker.js.map +1 -1
- package/esm/date/parts/DateInput.js +1 -1
- package/esm/date/parts/DateInput.js.map +1 -1
- package/esm/date/parts/DateWrapper.js +1 -1
- package/esm/date/parts/DateWrapper.js.map +1 -1
- package/esm/date/utils/check-dates.js +1 -1
- package/esm/date/utils/check-dates.js.map +1 -1
- package/esm/date/utils/get-month-weeks.js.map +1 -1
- package/esm/date/utils/is-match.js +2 -2
- package/esm/date/utils/is-match.js.map +1 -1
- package/esm/date/utils/navigation.js.map +1 -1
- package/esm/date/utils/parse-date.js +1 -1
- package/esm/date/utils/parse-date.js.map +1 -1
- package/esm/dropdown/Dropdown.d.ts +4 -0
- package/esm/dropdown/Dropdown.js +10 -12
- package/esm/dropdown/Dropdown.js.map +1 -1
- package/esm/dropdown/Menu/Divider.js +1 -1
- package/esm/dropdown/Menu/Divider.js.map +1 -1
- package/esm/dropdown/Menu/GroupedList/GroupedHeading.js +1 -1
- package/esm/dropdown/Menu/GroupedList/GroupedHeading.js.map +1 -1
- package/esm/dropdown/Menu/GroupedList/GroupedItem.d.ts +1 -1
- package/esm/dropdown/Menu/GroupedList/GroupedItem.js +3 -6
- package/esm/dropdown/Menu/GroupedList/GroupedItem.js.map +1 -1
- package/esm/dropdown/Menu/GroupedList/index.d.ts +1 -1
- package/esm/dropdown/Menu/List/Item.d.ts +1 -1
- package/esm/dropdown/Menu/List/Item.js +3 -6
- package/esm/dropdown/Menu/List/Item.js.map +1 -1
- package/esm/dropdown/Menu/List/index.d.ts +1 -1
- package/esm/dropdown/Toggle.js +6 -5
- package/esm/dropdown/Toggle.js.map +1 -1
- package/esm/expansion-card/ExpansionCard.d.ts +1 -1
- package/esm/expansion-card/ExpansionCardHeader.js +1 -1
- package/esm/expansion-card/ExpansionCardHeader.js.map +1 -1
- package/esm/expansion-card/ExpansionCardTitle.d.ts +1 -1
- package/esm/form/ConfirmationPanel.js +1 -1
- package/esm/form/ConfirmationPanel.js.map +1 -1
- package/esm/form/Fieldset/useFieldset.d.ts +1 -1
- package/esm/form/ReadOnlyIcon.js +1 -1
- package/esm/form/ReadOnlyIcon.js.map +1 -1
- package/esm/form/Select.js +1 -1
- package/esm/form/Select.js.map +1 -1
- package/esm/form/Switch.js.map +1 -1
- package/esm/form/TextField.js.map +1 -1
- package/esm/form/Textarea.js +2 -1
- package/esm/form/Textarea.js.map +1 -1
- package/esm/form/checkbox/Checkbox.js +2 -1
- package/esm/form/checkbox/Checkbox.js.map +1 -1
- package/esm/form/checkbox/useCheckbox.d.ts +1 -1
- package/esm/form/combobox/Combobox.d.ts +1 -1
- package/esm/form/combobox/Combobox.js +8 -8
- package/esm/form/combobox/Combobox.js.map +1 -1
- package/esm/form/combobox/ComboboxProvider.js +2 -2
- package/esm/form/combobox/ComboboxProvider.js.map +1 -1
- package/esm/form/combobox/FilteredOptions/FilteredOptions.js +4 -4
- package/esm/form/combobox/FilteredOptions/FilteredOptions.js.map +1 -1
- package/esm/form/combobox/FilteredOptions/filteredOptionsContext.d.ts +1 -1
- package/esm/form/combobox/FilteredOptions/filteredOptionsContext.js +3 -4
- package/esm/form/combobox/FilteredOptions/filteredOptionsContext.js.map +1 -1
- package/esm/form/combobox/Input/inputContext.js +1 -1
- package/esm/form/combobox/Input/inputContext.js.map +1 -1
- package/esm/form/combobox/SelectedOptions/SelectedOptions.js +1 -1
- package/esm/form/combobox/SelectedOptions/SelectedOptions.js.map +1 -1
- package/esm/form/combobox/SelectedOptions/selectedOptionsContext.js +1 -1
- package/esm/form/combobox/SelectedOptions/selectedOptionsContext.js.map +1 -1
- package/esm/form/combobox/ToggleListButton.js +1 -1
- package/esm/form/combobox/ToggleListButton.js.map +1 -1
- package/esm/form/combobox/customOptionsContext.js +1 -1
- package/esm/form/combobox/customOptionsContext.js.map +1 -1
- package/esm/form/error-summary/ErrorSummary.js +3 -3
- package/esm/form/error-summary/ErrorSummary.js.map +1 -1
- package/esm/form/error-summary/ErrorSummaryItem.d.ts +1 -1
- package/esm/form/error-summary/ErrorSummaryItem.js +1 -1
- package/esm/form/error-summary/ErrorSummaryItem.js.map +1 -1
- package/esm/form/radio/Radio.js +2 -1
- package/esm/form/radio/Radio.js.map +1 -1
- package/esm/form/radio/RadioGroup.js +1 -1
- package/esm/form/radio/RadioGroup.js.map +1 -1
- package/esm/form/radio/useRadio.d.ts +1 -1
- package/esm/form/search/Search.js +5 -4
- package/esm/form/search/Search.js.map +1 -1
- package/esm/form/search/SearchButton.js +3 -5
- package/esm/form/search/SearchButton.js.map +1 -1
- package/esm/form/useFormField.js +1 -1
- package/esm/form/useFormField.js.map +1 -1
- package/esm/grid/Cell.js +1 -1
- package/esm/grid/Cell.js.map +1 -1
- package/esm/grid/Grid.js +1 -1
- package/esm/grid/Grid.js.map +1 -1
- package/esm/guide-panel/GuidePanel.js +1 -1
- package/esm/guide-panel/GuidePanel.js.map +1 -1
- package/esm/guide-panel/Illustration.js +1 -1
- package/esm/guide-panel/Illustration.js.map +1 -1
- package/esm/help-text/HelpText.d.ts +0 -5
- package/esm/help-text/HelpText.js +6 -8
- package/esm/help-text/HelpText.js.map +1 -1
- package/esm/help-text/HelpTextIcon.js +1 -1
- package/esm/internal-header/InternalHeader.d.ts +1 -1
- package/esm/internal-header/InternalHeader.js.map +1 -1
- package/esm/internal-header/InternalHeaderButton.d.ts +1 -1
- package/esm/internal-header/InternalHeaderButton.js +1 -1
- package/esm/internal-header/InternalHeaderButton.js.map +1 -1
- package/esm/internal-header/InternalHeaderTitle.d.ts +1 -1
- package/esm/internal-header/InternalHeaderTitle.js +1 -1
- package/esm/internal-header/InternalHeaderTitle.js.map +1 -1
- package/esm/internal-header/InternalHeaderUser.js +1 -1
- package/esm/internal-header/InternalHeaderUser.js.map +1 -1
- package/esm/internal-header/InternalHeaderUserButton.d.ts +1 -1
- package/esm/internal-header/InternalHeaderUserButton.js +1 -1
- package/esm/internal-header/InternalHeaderUserButton.js.map +1 -1
- package/esm/layout/bleed/Bleed.js +1 -1
- package/esm/layout/bleed/Bleed.js.map +1 -1
- package/esm/layout/box/Box.d.ts +2 -2
- package/esm/layout/content-container/ContentContainer.js +1 -1
- package/esm/layout/content-container/ContentContainer.js.map +1 -1
- package/esm/layout/grid/HGrid.js +1 -1
- package/esm/layout/grid/HGrid.js.map +1 -1
- package/esm/layout/page/Page.d.ts +2 -2
- package/esm/layout/page/Page.js.map +1 -1
- package/esm/layout/page/parts/PageBlock.d.ts +7 -6
- package/esm/layout/page/parts/PageBlock.js +1 -1
- package/esm/layout/page/parts/PageBlock.js.map +1 -1
- package/esm/layout/responsive/Responsive.js.map +1 -1
- package/esm/layout/sidemal-test/AvatarPanel.js +1 -1
- package/esm/layout/sidemal-test/AvatarPanel.js.map +1 -1
- package/esm/layout/sidemal-test/Content.js +4 -4
- package/esm/layout/sidemal-test/Content.js.map +1 -1
- package/esm/layout/sidemal-test/Filter.js +1 -1
- package/esm/layout/sidemal-test/Filter.js.map +1 -1
- package/esm/layout/sidemal-test/Header.js +1 -1
- package/esm/layout/sidemal-test/Header.js.map +1 -1
- package/esm/layout/sidemal-test/Intro.js +2 -2
- package/esm/layout/sidemal-test/Intro.js.map +1 -1
- package/esm/layout/sidemal-test/content-box/ContentBox.js.map +1 -1
- package/esm/layout/stack/HStack.d.ts +1 -1
- package/esm/layout/stack/HStack.js.map +1 -1
- package/esm/layout/stack/Stack.d.ts +1 -1
- package/esm/layout/stack/Stack.js.map +1 -1
- package/esm/layout/stack/VStack.d.ts +1 -1
- package/esm/layout/stack/VStack.js.map +1 -1
- package/esm/layout/utilities/types.d.ts +2 -2
- package/esm/link/Link.d.ts +1 -1
- package/esm/link-panel/LinkPanel.d.ts +2 -2
- package/esm/link-panel/LinkPanel.js +3 -3
- package/esm/link-panel/LinkPanel.js.map +1 -1
- package/esm/link-panel/LinkPanelDescription.js +1 -1
- package/esm/link-panel/LinkPanelDescription.js.map +1 -1
- package/esm/link-panel/LinkPanelTitle.d.ts +1 -1
- package/esm/link-panel/LinkPanelTitle.js +1 -1
- package/esm/link-panel/LinkPanelTitle.js.map +1 -1
- package/esm/list/List.js +1 -1
- package/esm/loader/Loader.js +2 -1
- package/esm/loader/Loader.js.map +1 -1
- package/esm/modal/Modal.js +21 -18
- package/esm/modal/Modal.js.map +1 -1
- package/esm/modal/ModalBody.js +1 -1
- package/esm/modal/ModalBody.js.map +1 -1
- package/esm/modal/ModalFooter.js +1 -1
- package/esm/modal/ModalFooter.js.map +1 -1
- package/esm/modal/ModalHeader.js +1 -1
- package/esm/modal/ModalHeader.js.map +1 -1
- package/esm/modal/types.d.ts +1 -1
- package/esm/pagination/Pagination.js.map +1 -1
- package/esm/pagination/PaginationItem.d.ts +1 -1
- package/esm/pagination/PaginationItem.js +1 -1
- package/esm/pagination/PaginationItem.js.map +1 -1
- package/esm/panel/Panel.d.ts +1 -1
- package/esm/panel/Panel.js +1 -1
- package/esm/panel/Panel.js.map +1 -1
- package/esm/popover/Popover.d.ts +1 -1
- package/esm/popover/Popover.js +4 -3
- package/esm/popover/Popover.js.map +1 -1
- package/esm/popover/PopoverContent.js +1 -1
- package/esm/popover/PopoverContent.js.map +1 -1
- package/esm/read-more/ReadMore.d.ts +4 -0
- package/esm/read-more/ReadMore.js +13 -13
- package/esm/read-more/ReadMore.js.map +1 -1
- package/esm/skeleton/Skeleton.js +1 -1
- package/esm/skeleton/Skeleton.js.map +1 -1
- package/esm/stepper/Step.d.ts +1 -1
- package/esm/stepper/Step.js +6 -6
- package/esm/stepper/Step.js.map +1 -1
- package/esm/table/AnimateHeight.js.map +1 -0
- package/esm/table/Body.js +1 -1
- package/esm/table/Body.js.map +1 -1
- package/esm/table/ColumnHeader.js +1 -1
- package/esm/table/ColumnHeader.js.map +1 -1
- package/esm/table/DataCell.d.ts +4 -0
- package/esm/table/DataCell.js +3 -3
- package/esm/table/DataCell.js.map +1 -1
- package/esm/table/ExpandableRow.js +23 -22
- package/esm/table/ExpandableRow.js.map +1 -1
- package/esm/table/Header.js +1 -1
- package/esm/table/Header.js.map +1 -1
- package/esm/table/HeaderCell.d.ts +4 -0
- package/esm/table/HeaderCell.js +2 -1
- package/esm/table/HeaderCell.js.map +1 -1
- package/esm/table/Row.js +1 -1
- package/esm/table/Row.js.map +1 -1
- package/esm/tabs/Tab.d.ts +1 -1
- package/esm/tabs/TabList.js +4 -3
- package/esm/tabs/TabList.js.map +1 -1
- package/esm/tabs/Tabs.d.ts +1 -1
- package/esm/tabs/Tabs.js +1 -1
- package/esm/tabs/Tabs.js.map +1 -1
- package/esm/tag/Tag.d.ts +4 -0
- package/esm/tag/Tag.js +5 -3
- package/esm/tag/Tag.js.map +1 -1
- package/esm/timeline/AxisLabels.js +1 -1
- package/esm/timeline/AxisLabels.js.map +1 -1
- package/esm/timeline/Pin.js +3 -3
- package/esm/timeline/Pin.js.map +1 -1
- package/esm/timeline/TimelineRow.js +2 -2
- package/esm/timeline/TimelineRow.js.map +1 -1
- package/esm/timeline/hooks/useTimelineRows.js +5 -3
- package/esm/timeline/hooks/useTimelineRows.js.map +1 -1
- package/esm/timeline/period/ClickablePeriod.js +3 -3
- package/esm/timeline/period/ClickablePeriod.js.map +1 -1
- package/esm/timeline/utils/timeline.js +1 -1
- package/esm/timeline/utils/timeline.js.map +1 -1
- package/esm/timeline/zoom/ZoomButton.js +1 -1
- package/esm/timeline/zoom/ZoomButton.js.map +1 -1
- package/esm/toggle-group/ToggleGroup.js +2 -2
- package/esm/toggle-group/ToggleGroup.js.map +1 -1
- package/esm/tooltip/Tooltip.d.ts +4 -0
- package/esm/tooltip/Tooltip.js +18 -12
- package/esm/tooltip/Tooltip.js.map +1 -1
- package/esm/typography/BodyLong.d.ts +1 -1
- package/esm/typography/BodyLong.js +1 -1
- package/esm/typography/BodyLong.js.map +1 -1
- package/esm/typography/BodyShort.d.ts +1 -1
- package/esm/typography/Detail.d.ts +1 -1
- package/esm/typography/ErrorMessage.d.ts +1 -1
- package/esm/typography/ErrorMessage.js +1 -1
- package/esm/typography/ErrorMessage.js.map +1 -1
- package/esm/typography/Heading.d.ts +1 -1
- package/esm/typography/Ingress.d.ts +1 -1
- package/esm/typography/Ingress.js +1 -1
- package/esm/typography/Ingress.js.map +1 -1
- package/esm/typography/Label.d.ts +1 -1
- package/esm/util/Slot.js +1 -1
- package/esm/util/Slot.js.map +1 -1
- package/esm/util/TextareaAutoSize.js +5 -3
- package/esm/util/TextareaAutoSize.js.map +1 -1
- package/esm/util/composeEventHandlers.d.ts +8 -0
- package/esm/util/composeEventHandlers.js +14 -0
- package/esm/util/composeEventHandlers.js.map +1 -0
- package/esm/util/hooks/index.d.ts +8 -0
- package/esm/util/hooks/index.js +9 -0
- package/esm/util/hooks/index.js.map +1 -0
- package/esm/util/hooks/useCallbackRef.d.ts +7 -0
- package/esm/util/hooks/useCallbackRef.js +15 -0
- package/esm/util/hooks/useCallbackRef.js.map +1 -0
- package/esm/util/hooks/useClientLayoutEffect.js +5 -0
- package/esm/util/hooks/useClientLayoutEffect.js.map +1 -0
- package/esm/util/hooks/useControllableState.d.ts +9 -0
- package/esm/util/hooks/useControllableState.js +22 -0
- package/esm/util/hooks/useControllableState.js.map +1 -0
- package/esm/util/{useEventListener.d.ts → hooks/useEventListener.d.ts} +1 -1
- package/esm/util/hooks/useEventListener.js.map +1 -0
- package/esm/util/hooks/useId.js.map +1 -0
- package/esm/util/hooks/useMedia.js.map +1 -0
- package/esm/util/hooks/useMergeRefs.d.ts +15 -0
- package/esm/util/hooks/useMergeRefs.js +30 -0
- package/esm/util/hooks/useMergeRefs.js.map +1 -0
- package/esm/util/hooks/usePrevious.d.ts +1 -0
- package/esm/util/{usePrevious.js → hooks/usePrevious.js} +1 -2
- package/esm/util/hooks/usePrevious.js.map +1 -0
- package/esm/util/index.d.ts +4 -5
- package/esm/util/index.js +3 -5
- package/esm/util/index.js.map +1 -1
- package/esm/util/types/OverridableComponent.js.map +1 -0
- package/esm/util/types/index.d.ts +1 -0
- package/esm/util/types/index.js +2 -0
- package/esm/util/types/index.js.map +1 -0
- package/package.json +3 -3
- package/src/accordion/Accordion.tsx +5 -5
- package/src/accordion/AccordionContent.tsx +3 -3
- package/src/accordion/AccordionHeader.tsx +5 -7
- package/src/accordion/AccordionItem.tsx +22 -22
- package/src/accordion/accordion.stories.tsx +8 -5
- package/src/alert/Alert.tsx +8 -8
- package/src/alert/alert.stories.tsx +6 -7
- package/src/button/Button.tsx +18 -23
- package/src/button/button.stories.tsx +1 -1
- package/src/chat/Bubble.tsx +4 -4
- package/src/chat/Chat.tsx +5 -5
- package/src/chat/chat.stories.tsx +1 -1
- package/src/chips/Chips.tsx +4 -4
- package/src/chips/Removable.tsx +7 -8
- package/src/chips/Toggle.tsx +4 -4
- package/src/chips/chips.stories.tsx +5 -5
- package/src/copybutton/CopyButton.tsx +9 -10
- package/src/copybutton/copy-button.stories.tsx +3 -3
- package/src/date/context/useSharedMonthContext.tsx +1 -1
- package/src/date/datepicker/DatePicker.tsx +7 -5
- package/src/date/datepicker/DatePickerStandalone.tsx +2 -2
- package/src/date/datepicker/datepicker.stories.tsx +2 -2
- package/src/date/datepicker/parts/Caption.tsx +2 -3
- package/src/date/datepicker/parts/DropdownCaption.tsx +2 -2
- package/src/date/datepicker/parts/HeadRow.tsx +1 -1
- package/src/date/datepicker/parts/Row.tsx +3 -3
- package/src/date/datepicker/parts/WeekRow.tsx +1 -1
- package/src/date/hooks/useDatepicker.tsx +7 -7
- package/src/date/hooks/useMonthPicker.tsx +7 -7
- package/src/date/hooks/useRangeDatepicker.test.tsx +2 -2
- package/src/date/hooks/useRangeDatepicker.tsx +28 -28
- package/src/date/monthpicker/MonthButton.tsx +1 -1
- package/src/date/monthpicker/MonthCaption.tsx +1 -1
- package/src/date/monthpicker/MonthPicker.tsx +7 -6
- package/src/date/monthpicker/MonthPickerStandalone.tsx +3 -3
- package/src/date/monthpicker/MonthSelector.tsx +1 -1
- package/src/date/parts/DateInput.tsx +6 -6
- package/src/date/parts/DateWrapper.tsx +1 -1
- package/src/date/utils/__tests__/check-dates.test.ts +3 -3
- package/src/date/utils/__tests__/format-dates.test.ts +7 -7
- package/src/date/utils/__tests__/get-initial-year.test.ts +14 -14
- package/src/date/utils/__tests__/get-month-weeks.test.ts +0 -1
- package/src/date/utils/__tests__/is-match.test.ts +4 -4
- package/src/date/utils/__tests__/parse-dates.test.ts +2 -2
- package/src/date/utils/check-dates.ts +2 -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 +1 -1
- package/src/date/utils/get-month-weeks.ts +6 -6
- package/src/date/utils/is-match.ts +2 -3
- package/src/date/utils/labels.ts +1 -1
- package/src/date/utils/navigation.ts +18 -18
- package/src/date/utils/parse-date.ts +8 -8
- package/src/dropdown/Dropdown.tsx +14 -11
- package/src/dropdown/Menu/Divider.tsx +1 -1
- package/src/dropdown/Menu/GroupedList/GroupedHeading.tsx +2 -2
- package/src/dropdown/Menu/GroupedList/GroupedItem.tsx +23 -23
- package/src/dropdown/Menu/GroupedList/index.tsx +2 -2
- package/src/dropdown/Menu/List/Item.tsx +23 -23
- package/src/dropdown/Menu/List/index.tsx +1 -1
- package/src/dropdown/Menu/index.tsx +1 -1
- package/src/dropdown/Toggle.tsx +10 -6
- package/src/dropdown/dropdown.stories.tsx +1 -1
- package/src/expansion-card/ExpansionCard.tsx +4 -4
- package/src/expansion-card/ExpansionCardContent.tsx +1 -1
- package/src/expansion-card/ExpansionCardDescription.tsx +1 -1
- package/src/expansion-card/ExpansionCardHeader.tsx +2 -2
- package/src/expansion-card/ExpansionCardTitle.tsx +3 -3
- package/src/expansion-card/expansion-card.stories.tsx +1 -1
- package/src/form/ConfirmationPanel.test.tsx +1 -1
- package/src/form/ConfirmationPanel.tsx +3 -3
- package/src/form/Fieldset/Fieldset.tsx +2 -2
- package/src/form/ReadOnlyIcon.tsx +1 -1
- package/src/form/Select.tsx +6 -6
- package/src/form/Switch.tsx +4 -4
- package/src/form/TextField.tsx +4 -4
- package/src/form/Textarea.tsx +6 -5
- package/src/form/checkbox/Checkbox.test.tsx +8 -8
- package/src/form/checkbox/Checkbox.tsx +5 -4
- package/src/form/checkbox/CheckboxGroup.tsx +4 -4
- package/src/form/checkbox/useCheckbox.ts +3 -3
- package/src/form/combobox/Combobox.tsx +9 -12
- package/src/form/combobox/ComboboxProvider.tsx +3 -3
- package/src/form/combobox/ComboboxWrapper.tsx +1 -1
- package/src/form/combobox/FilteredOptions/FilteredOptions.tsx +6 -6
- package/src/form/combobox/FilteredOptions/filteredOptionsContext.tsx +17 -18
- package/src/form/combobox/FilteredOptions/useVirtualFocus.ts +5 -5
- package/src/form/combobox/Input/Input.tsx +6 -6
- package/src/form/combobox/Input/inputContext.tsx +7 -7
- package/src/form/combobox/SelectedOptions/SelectedOptions.tsx +1 -1
- package/src/form/combobox/SelectedOptions/selectedOptionsContext.tsx +10 -10
- package/src/form/combobox/ToggleListButton.tsx +1 -2
- package/src/form/combobox/combobox.stories.tsx +17 -18
- package/src/form/combobox/combobox.test.tsx +14 -12
- package/src/form/combobox/customOptionsContext.tsx +6 -6
- package/src/form/combobox/types.ts +2 -2
- package/src/form/error-summary/ErrorSummary.tsx +6 -6
- package/src/form/error-summary/ErrorSummaryItem.tsx +3 -3
- package/src/form/error-summary/error-summary.stories.tsx +2 -1
- package/src/form/radio/Radio.test.tsx +1 -1
- package/src/form/radio/Radio.tsx +3 -2
- package/src/form/radio/RadioGroup.tsx +4 -4
- package/src/form/radio/useRadio.ts +1 -1
- package/src/form/search/Search.tsx +9 -9
- package/src/form/search/SearchButton.tsx +4 -6
- package/src/form/search/search.stories.tsx +1 -1
- package/src/form/stories/fieldset.stories.tsx +3 -2
- package/src/form/stories/select.stories.tsx +2 -1
- package/src/form/stories/text-field.stories.tsx +2 -1
- package/src/form/useFormField.ts +4 -4
- package/src/grid/Cell.tsx +3 -3
- package/src/grid/Grid.tsx +2 -2
- package/src/grid/grid.stories.tsx +1 -1
- package/src/guide-panel/GuidePanel.tsx +2 -2
- package/src/guide-panel/Illustration.tsx +1 -1
- package/src/guide-panel/guidepanel.stories.tsx +1 -1
- package/src/help-text/HelpText.tsx +9 -27
- package/src/help-text/HelpTextIcon.tsx +1 -1
- package/src/help-text/help-text.stories.tsx +58 -68
- package/src/internal-header/InternalHeader.tsx +2 -2
- package/src/internal-header/InternalHeaderButton.tsx +2 -2
- package/src/internal-header/InternalHeaderTitle.tsx +2 -2
- package/src/internal-header/InternalHeaderUser.tsx +1 -1
- package/src/internal-header/InternalHeaderUserButton.tsx +2 -2
- package/src/internal-header/header.stories.tsx +3 -3
- package/src/layout/bleed/Bleed.tsx +7 -7
- package/src/layout/box/Box.stories.tsx +4 -4
- package/src/layout/box/Box.tsx +8 -8
- package/src/layout/content-container/ContentContainer.tsx +1 -1
- package/src/layout/grid/HGrid.tsx +4 -4
- package/src/layout/page/Page.stories.tsx +1 -1
- package/src/layout/page/Page.tsx +4 -4
- package/src/layout/page/parts/PageBlock.tsx +9 -8
- package/src/layout/responsive/Responsive.tsx +6 -6
- package/src/layout/responsive/hide.stories.tsx +1 -1
- package/src/layout/responsive/show.stories.tsx +1 -1
- package/src/layout/sidemal-test/AvatarPanel.tsx +1 -1
- package/src/layout/sidemal-test/Content.tsx +4 -4
- package/src/layout/sidemal-test/Filter.tsx +1 -1
- package/src/layout/sidemal-test/Header.tsx +1 -1
- package/src/layout/sidemal-test/Intro.tsx +2 -2
- package/src/layout/sidemal-test/content-box/ContentBox.tsx +6 -6
- package/src/layout/sidemal-test/navno-sidemal.stories.tsx +1 -1
- package/src/layout/stack/HStack.tsx +2 -2
- package/src/layout/stack/Stack.tsx +4 -4
- package/src/layout/stack/VStack.tsx +2 -2
- package/src/layout/stack/stack.stories.tsx +2 -2
- package/src/layout/utilities/css.ts +6 -6
- package/src/layout/utilities/types.ts +2 -2
- package/src/link/Link.tsx +3 -3
- package/src/link/{link.stories.tsx → stories/link.stories.tsx} +3 -3
- package/src/link-panel/LinkPanel.tsx +6 -7
- package/src/link-panel/LinkPanelDescription.tsx +1 -1
- package/src/link-panel/LinkPanelTitle.tsx +3 -3
- package/src/list/List.tsx +3 -3
- package/src/list/ListItem.tsx +2 -2
- package/src/list/list.stories.tsx +2 -2
- package/src/loader/Loader.tsx +6 -5
- package/src/loader/loader.stories.tsx +1 -0
- package/src/modal/Modal.test.tsx +4 -4
- package/src/modal/Modal.tsx +32 -32
- package/src/modal/ModalBody.tsx +2 -2
- package/src/modal/ModalFooter.tsx +2 -2
- package/src/modal/ModalHeader.tsx +2 -2
- package/src/modal/ModalUtils.ts +2 -2
- package/src/modal/dialog-polyfill.ts +16 -16
- package/src/modal/types.ts +1 -1
- package/src/pagination/Pagination.tsx +5 -6
- package/src/pagination/PaginationItem.tsx +4 -4
- package/src/pagination/steps.test.ts +8 -8
- package/src/panel/Panel.tsx +4 -4
- package/src/panel/panel.stories.tsx +2 -1
- package/src/popover/Popover.test.tsx +7 -7
- package/src/popover/Popover.tsx +11 -14
- package/src/popover/PopoverContent.tsx +2 -2
- package/src/provider/Provider.tsx +1 -1
- package/src/read-more/ReadMore.tsx +20 -16
- package/src/read-more/readmore.stories.tsx +4 -0
- package/src/skeleton/Skeleton.tsx +4 -4
- package/src/stepper/Step.tsx +10 -7
- package/src/stepper/Stepper.tsx +3 -3
- package/src/{util → table}/AnimateHeight.tsx +1 -1
- package/src/table/Body.tsx +1 -1
- package/src/table/ColumnHeader.tsx +2 -2
- package/src/table/DataCell.tsx +8 -3
- package/src/table/ExpandableRow.tsx +30 -23
- package/src/table/Header.tsx +1 -1
- package/src/table/HeaderCell.tsx +7 -2
- package/src/table/Row.tsx +2 -2
- package/src/table/Table.tsx +2 -2
- package/src/table/stories/table-async.stories.tsx +4 -4
- package/src/table/stories/table.stories.tsx +44 -30
- package/src/table/stories/tests/table.stories.tsx +2 -3
- package/src/tabs/Tab.tsx +4 -4
- package/src/tabs/TabList.tsx +8 -6
- package/src/tabs/TabPanel.tsx +1 -1
- package/src/tabs/Tabs.stories.tsx +1 -1
- package/src/tabs/Tabs.tsx +5 -5
- package/src/tag/Tag.tsx +12 -5
- package/src/tag/tag.stories.tsx +28 -2
- package/src/timeline/AxisLabels.tsx +9 -9
- package/src/timeline/Pin.tsx +4 -7
- package/src/timeline/Timeline.tsx +7 -7
- package/src/timeline/TimelineRow.tsx +5 -5
- package/src/timeline/hooks/useTimelineContext.tsx +1 -1
- package/src/timeline/hooks/useTimelineRows.ts +18 -19
- package/src/timeline/period/ClickablePeriod.tsx +6 -9
- package/src/timeline/period/NonClickablePeriod.tsx +1 -1
- package/src/timeline/period/index.tsx +1 -1
- package/src/timeline/timeline.stories.tsx +2 -2
- package/src/timeline/utils/calc.ts +2 -2
- package/src/timeline/utils/filter.ts +2 -2
- package/src/timeline/utils/period.ts +2 -2
- package/src/timeline/utils/timeline.ts +1 -1
- package/src/timeline/zoom/ZoomButton.tsx +3 -3
- package/src/timeline/zoom/index.tsx +1 -1
- package/src/toggle-group/ToggleGroup.stories.tsx +2 -2
- package/src/toggle-group/ToggleGroup.tsx +6 -6
- package/src/toggle-group/ToggleItem.tsx +1 -1
- package/src/toggle-group/context.ts +1 -1
- package/src/tooltip/Tooltip.test.tsx +10 -10
- package/src/tooltip/Tooltip.tsx +31 -33
- package/src/tooltip/tooltip.stories.tsx +1 -1
- package/src/typography/BodyLong.tsx +5 -5
- package/src/typography/BodyShort.tsx +4 -4
- package/src/typography/Detail.tsx +4 -4
- package/src/typography/ErrorMessage.tsx +4 -4
- package/src/typography/Heading.tsx +4 -4
- package/src/typography/Ingress.tsx +2 -2
- package/src/typography/Label.tsx +4 -4
- package/src/typography/stories/bodylong.stories.tsx +1 -2
- package/src/typography/stories/bodyshort.stories.tsx +1 -2
- package/src/typography/stories/detail.stories.tsx +1 -2
- package/src/typography/stories/error-message.stories.tsx +1 -2
- package/src/typography/stories/heading.stories.tsx +1 -3
- package/src/typography/stories/ingress.stories.tsx +1 -2
- package/src/typography/stories/label.stories.tsx +1 -2
- package/src/util/Slot.tsx +4 -4
- package/src/util/TextareaAutoSize.tsx +11 -7
- package/src/util/__tests__/Slot.test.tsx +11 -11
- package/src/util/__tests__/useMedia.test.tsx +1 -1
- package/src/util/composeEventHandlers.ts +19 -0
- package/src/util/hooks/index.ts +8 -0
- package/src/util/hooks/useCallbackRef.ts +20 -0
- package/src/util/hooks/useClientLayoutEffect.ts +5 -0
- package/src/util/hooks/useControllableState.ts +40 -0
- package/src/util/{useEventListener.ts → hooks/useEventListener.ts} +1 -1
- package/src/util/{useMedia.ts → hooks/useMedia.ts} +1 -1
- package/src/util/hooks/useMergeRefs.ts +32 -0
- package/src/util/{usePrevious.ts → hooks/usePrevious.ts} +1 -4
- package/src/util/index.ts +4 -5
- package/src/util/omit.ts +1 -1
- package/src/util/{OverridableComponent.ts → types/OverridableComponent.ts} +1 -1
- package/src/util/types/index.ts +1 -0
- package/cjs/util/RandomIcon.js +0 -38
- package/cjs/util/mergeRefs.js +0 -16
- package/cjs/util/useClientLayoutEffect.js +0 -10
- package/esm/util/AnimateHeight.js.map +0 -1
- package/esm/util/OverridableComponent.js.map +0 -1
- package/esm/util/RandomIcon.d.ts +0 -2
- package/esm/util/RandomIcon.js +0 -9
- package/esm/util/RandomIcon.js.map +0 -1
- package/esm/util/mergeRefs.d.ts +0 -2
- package/esm/util/mergeRefs.js +0 -14
- package/esm/util/mergeRefs.js.map +0 -1
- package/esm/util/useClientLayoutEffect.js +0 -8
- package/esm/util/useClientLayoutEffect.js.map +0 -1
- package/esm/util/useEventListener.js.map +0 -1
- package/esm/util/useId.js.map +0 -1
- package/esm/util/useMedia.js.map +0 -1
- package/esm/util/usePrevious.d.ts +0 -2
- package/esm/util/usePrevious.js.map +0 -1
- package/src/util/mergeRefs.tsx +0 -15
- package/src/util/useClientLayoutEffect.ts +0 -11
- package/cjs/{util → table}/AnimateHeight.js +0 -0
- package/cjs/util/{useEventListener.js → hooks/useEventListener.js} +0 -0
- package/cjs/util/{useId.js → hooks/useId.js} +0 -0
- package/cjs/util/{useMedia.js → hooks/useMedia.js} +0 -0
- package/cjs/util/{OverridableComponent.js → types/OverridableComponent.js} +0 -0
- package/esm/{util → table}/AnimateHeight.d.ts +0 -0
- package/esm/{util → table}/AnimateHeight.js +0 -0
- package/esm/util/{useClientLayoutEffect.d.ts → hooks/useClientLayoutEffect.d.ts} +0 -0
- package/esm/util/{useEventListener.js → hooks/useEventListener.js} +0 -0
- package/esm/util/{useId.d.ts → hooks/useId.d.ts} +0 -0
- package/esm/util/{useId.js → hooks/useId.js} +0 -0
- package/esm/util/{useMedia.d.ts → hooks/useMedia.d.ts} +0 -0
- package/esm/util/{useMedia.js → hooks/useMedia.js} +0 -0
- package/esm/util/{OverridableComponent.d.ts → types/OverridableComponent.d.ts} +0 -0
- package/esm/util/{OverridableComponent.js → types/OverridableComponent.js} +0 -0
- package/src/{util → link/stories}/RandomIcon.tsx +1 -1
- /package/src/util/{useId.ts → hooks/useId.ts} +0 -0
package/_docs.json
CHANGED
|
@@ -335,6 +335,25 @@
|
|
|
335
335
|
"name": "boolean"
|
|
336
336
|
}
|
|
337
337
|
},
|
|
338
|
+
"onOpenChange": {
|
|
339
|
+
"defaultValue": null,
|
|
340
|
+
"description": "Callback for current open-state",
|
|
341
|
+
"name": "onOpenChange",
|
|
342
|
+
"parent": {
|
|
343
|
+
"fileName": "src/accordion/AccordionItem.tsx",
|
|
344
|
+
"name": "AccordionItemProps"
|
|
345
|
+
},
|
|
346
|
+
"declarations": [
|
|
347
|
+
{
|
|
348
|
+
"fileName": "src/accordion/AccordionItem.tsx",
|
|
349
|
+
"name": "AccordionItemProps"
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
"required": false,
|
|
353
|
+
"type": {
|
|
354
|
+
"name": "((open: boolean) => void)"
|
|
355
|
+
}
|
|
356
|
+
},
|
|
338
357
|
"className": {
|
|
339
358
|
"defaultValue": null,
|
|
340
359
|
"description": "",
|
|
@@ -1879,6 +1898,25 @@
|
|
|
1879
1898
|
"type": {
|
|
1880
1899
|
"name": "boolean"
|
|
1881
1900
|
}
|
|
1901
|
+
},
|
|
1902
|
+
"onOpenChange": {
|
|
1903
|
+
"defaultValue": null,
|
|
1904
|
+
"description": "Change handler for open",
|
|
1905
|
+
"name": "onOpenChange",
|
|
1906
|
+
"parent": {
|
|
1907
|
+
"fileName": "src/dropdown/Dropdown.tsx",
|
|
1908
|
+
"name": "DropdownProps"
|
|
1909
|
+
},
|
|
1910
|
+
"declarations": [
|
|
1911
|
+
{
|
|
1912
|
+
"fileName": "src/dropdown/Dropdown.tsx",
|
|
1913
|
+
"name": "DropdownProps"
|
|
1914
|
+
}
|
|
1915
|
+
],
|
|
1916
|
+
"required": false,
|
|
1917
|
+
"type": {
|
|
1918
|
+
"name": "((open: boolean) => void)"
|
|
1919
|
+
}
|
|
1882
1920
|
}
|
|
1883
1921
|
}
|
|
1884
1922
|
},
|
|
@@ -4134,27 +4172,6 @@
|
|
|
4134
4172
|
"name": "string"
|
|
4135
4173
|
}
|
|
4136
4174
|
},
|
|
4137
|
-
"placement": {
|
|
4138
|
-
"defaultValue": {
|
|
4139
|
-
"value": "top"
|
|
4140
|
-
},
|
|
4141
|
-
"description": "Default dialog-placement on open",
|
|
4142
|
-
"name": "placement",
|
|
4143
|
-
"parent": {
|
|
4144
|
-
"fileName": "src/help-text/HelpText.tsx",
|
|
4145
|
-
"name": "HelpTextProps"
|
|
4146
|
-
},
|
|
4147
|
-
"declarations": [
|
|
4148
|
-
{
|
|
4149
|
-
"fileName": "src/help-text/HelpText.tsx",
|
|
4150
|
-
"name": "HelpTextProps"
|
|
4151
|
-
}
|
|
4152
|
-
],
|
|
4153
|
-
"required": false,
|
|
4154
|
-
"type": {
|
|
4155
|
-
"name": "\"top\" | \"bottom\" | \"right\" | \"left\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"right-start\" | \"right-end\" | \"left-start\" | \"left-end\""
|
|
4156
|
-
}
|
|
4157
|
-
},
|
|
4158
4175
|
"wrapperClassName": {
|
|
4159
4176
|
"defaultValue": null,
|
|
4160
4177
|
"description": "Classname for wrapper",
|
|
@@ -4214,6 +4231,27 @@
|
|
|
4214
4231
|
"name": "\"absolute\" | \"fixed\""
|
|
4215
4232
|
}
|
|
4216
4233
|
},
|
|
4234
|
+
"placement": {
|
|
4235
|
+
"defaultValue": {
|
|
4236
|
+
"value": "\"top\""
|
|
4237
|
+
},
|
|
4238
|
+
"description": "Default orientation of popover\n@note Try to keep general usage to \"top\", \"bottom\", \"left\", \"right\"",
|
|
4239
|
+
"name": "placement",
|
|
4240
|
+
"parent": {
|
|
4241
|
+
"fileName": "react/src/popover/Popover.tsx",
|
|
4242
|
+
"name": "PopoverProps"
|
|
4243
|
+
},
|
|
4244
|
+
"declarations": [
|
|
4245
|
+
{
|
|
4246
|
+
"fileName": "react/src/popover/Popover.tsx",
|
|
4247
|
+
"name": "PopoverProps"
|
|
4248
|
+
}
|
|
4249
|
+
],
|
|
4250
|
+
"required": false,
|
|
4251
|
+
"type": {
|
|
4252
|
+
"name": "\"top\" | \"bottom\" | \"right\" | \"left\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"right-start\" | \"right-end\" | \"left-start\" | \"left-end\""
|
|
4253
|
+
}
|
|
4254
|
+
},
|
|
4217
4255
|
"ref": {
|
|
4218
4256
|
"defaultValue": null,
|
|
4219
4257
|
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).\n@see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom",
|
|
@@ -4986,7 +5024,7 @@
|
|
|
4986
5024
|
],
|
|
4987
5025
|
"required": false,
|
|
4988
5026
|
"type": {
|
|
4989
|
-
"name": "ElementType<any>"
|
|
5027
|
+
"name": "ElementType<any, keyof IntrinsicElements>"
|
|
4990
5028
|
}
|
|
4991
5029
|
},
|
|
4992
5030
|
"size": {
|
|
@@ -5384,7 +5422,7 @@
|
|
|
5384
5422
|
},
|
|
5385
5423
|
"onCancel": {
|
|
5386
5424
|
"defaultValue": null,
|
|
5387
|
-
"description": "*Sometimes** called when the user presses the Esc key
|
|
5425
|
+
"description": "*Sometimes** called when the user presses the Esc key.\n@warning *Some browsers does not always trigger this event. Chrome only triggers it if you have\ninteracted with the modal, and will not trigger it a second time if you press Esc twice in a row.",
|
|
5388
5426
|
"name": "onCancel",
|
|
5389
5427
|
"parent": {
|
|
5390
5428
|
"fileName": "react/src/modal/types.ts",
|
|
@@ -6319,7 +6357,7 @@
|
|
|
6319
6357
|
"defaultValue": {
|
|
6320
6358
|
"value": "\"top\""
|
|
6321
6359
|
},
|
|
6322
|
-
"description": "
|
|
6360
|
+
"description": "Default orientation of popover\n@note Try to keep general usage to \"top\", \"bottom\", \"left\", \"right\"",
|
|
6323
6361
|
"name": "placement",
|
|
6324
6362
|
"parent": {
|
|
6325
6363
|
"fileName": "src/popover/Popover.tsx",
|
|
@@ -6611,6 +6649,25 @@
|
|
|
6611
6649
|
"name": "boolean"
|
|
6612
6650
|
}
|
|
6613
6651
|
},
|
|
6652
|
+
"onOpenChange": {
|
|
6653
|
+
"defaultValue": null,
|
|
6654
|
+
"description": "Callback for current open-state",
|
|
6655
|
+
"name": "onOpenChange",
|
|
6656
|
+
"parent": {
|
|
6657
|
+
"fileName": "src/read-more/ReadMore.tsx",
|
|
6658
|
+
"name": "ReadMoreProps"
|
|
6659
|
+
},
|
|
6660
|
+
"declarations": [
|
|
6661
|
+
{
|
|
6662
|
+
"fileName": "src/read-more/ReadMore.tsx",
|
|
6663
|
+
"name": "ReadMoreProps"
|
|
6664
|
+
}
|
|
6665
|
+
],
|
|
6666
|
+
"required": false,
|
|
6667
|
+
"type": {
|
|
6668
|
+
"name": "((open: boolean) => void)"
|
|
6669
|
+
}
|
|
6670
|
+
},
|
|
6614
6671
|
"size": {
|
|
6615
6672
|
"defaultValue": {
|
|
6616
6673
|
"value": "medium"
|
|
@@ -7065,6 +7122,111 @@
|
|
|
7065
7122
|
}
|
|
7066
7123
|
}
|
|
7067
7124
|
},
|
|
7125
|
+
{
|
|
7126
|
+
"filePath": "src/table/AnimateHeight.tsx",
|
|
7127
|
+
"displayName": "AnimateHeight",
|
|
7128
|
+
"props": {
|
|
7129
|
+
"duration": {
|
|
7130
|
+
"defaultValue": {
|
|
7131
|
+
"value": "250ms"
|
|
7132
|
+
},
|
|
7133
|
+
"description": "",
|
|
7134
|
+
"name": "duration",
|
|
7135
|
+
"parent": {
|
|
7136
|
+
"fileName": "src/table/AnimateHeight.tsx",
|
|
7137
|
+
"name": "AnimateHeightProps"
|
|
7138
|
+
},
|
|
7139
|
+
"declarations": [
|
|
7140
|
+
{
|
|
7141
|
+
"fileName": "src/table/AnimateHeight.tsx",
|
|
7142
|
+
"name": "AnimateHeightProps"
|
|
7143
|
+
}
|
|
7144
|
+
],
|
|
7145
|
+
"required": false,
|
|
7146
|
+
"type": {
|
|
7147
|
+
"name": "number"
|
|
7148
|
+
}
|
|
7149
|
+
},
|
|
7150
|
+
"easing": {
|
|
7151
|
+
"defaultValue": {
|
|
7152
|
+
"value": "ease"
|
|
7153
|
+
},
|
|
7154
|
+
"description": "",
|
|
7155
|
+
"name": "easing",
|
|
7156
|
+
"parent": {
|
|
7157
|
+
"fileName": "src/table/AnimateHeight.tsx",
|
|
7158
|
+
"name": "AnimateHeightProps"
|
|
7159
|
+
},
|
|
7160
|
+
"declarations": [
|
|
7161
|
+
{
|
|
7162
|
+
"fileName": "src/table/AnimateHeight.tsx",
|
|
7163
|
+
"name": "AnimateHeightProps"
|
|
7164
|
+
}
|
|
7165
|
+
],
|
|
7166
|
+
"required": false,
|
|
7167
|
+
"type": {
|
|
7168
|
+
"name": "string"
|
|
7169
|
+
}
|
|
7170
|
+
},
|
|
7171
|
+
"height": {
|
|
7172
|
+
"defaultValue": null,
|
|
7173
|
+
"description": "",
|
|
7174
|
+
"name": "height",
|
|
7175
|
+
"parent": {
|
|
7176
|
+
"fileName": "src/table/AnimateHeight.tsx",
|
|
7177
|
+
"name": "AnimateHeightProps"
|
|
7178
|
+
},
|
|
7179
|
+
"declarations": [
|
|
7180
|
+
{
|
|
7181
|
+
"fileName": "src/table/AnimateHeight.tsx",
|
|
7182
|
+
"name": "AnimateHeightProps"
|
|
7183
|
+
}
|
|
7184
|
+
],
|
|
7185
|
+
"required": true,
|
|
7186
|
+
"type": {
|
|
7187
|
+
"name": "Height"
|
|
7188
|
+
}
|
|
7189
|
+
},
|
|
7190
|
+
"innerClassName": {
|
|
7191
|
+
"defaultValue": null,
|
|
7192
|
+
"description": "",
|
|
7193
|
+
"name": "innerClassName",
|
|
7194
|
+
"parent": {
|
|
7195
|
+
"fileName": "src/table/AnimateHeight.tsx",
|
|
7196
|
+
"name": "AnimateHeightProps"
|
|
7197
|
+
},
|
|
7198
|
+
"declarations": [
|
|
7199
|
+
{
|
|
7200
|
+
"fileName": "src/table/AnimateHeight.tsx",
|
|
7201
|
+
"name": "AnimateHeightProps"
|
|
7202
|
+
}
|
|
7203
|
+
],
|
|
7204
|
+
"required": false,
|
|
7205
|
+
"type": {
|
|
7206
|
+
"name": "string"
|
|
7207
|
+
}
|
|
7208
|
+
},
|
|
7209
|
+
"className": {
|
|
7210
|
+
"defaultValue": null,
|
|
7211
|
+
"description": "",
|
|
7212
|
+
"name": "className",
|
|
7213
|
+
"parent": {
|
|
7214
|
+
"fileName": "aksel/node_modules/@types/react/index.d.ts",
|
|
7215
|
+
"name": "HTMLAttributes"
|
|
7216
|
+
},
|
|
7217
|
+
"declarations": [
|
|
7218
|
+
{
|
|
7219
|
+
"fileName": "aksel/node_modules/@types/react/index.d.ts",
|
|
7220
|
+
"name": "HTMLAttributes"
|
|
7221
|
+
}
|
|
7222
|
+
],
|
|
7223
|
+
"required": false,
|
|
7224
|
+
"type": {
|
|
7225
|
+
"name": "string"
|
|
7226
|
+
}
|
|
7227
|
+
}
|
|
7228
|
+
}
|
|
7229
|
+
},
|
|
7068
7230
|
{
|
|
7069
7231
|
"filePath": "src/table/Body.tsx",
|
|
7070
7232
|
"displayName": "Body",
|
|
@@ -7193,6 +7355,25 @@
|
|
|
7193
7355
|
"name": "\"left\" | \"center\" | \"right\""
|
|
7194
7356
|
}
|
|
7195
7357
|
},
|
|
7358
|
+
"textSize": {
|
|
7359
|
+
"defaultValue": null,
|
|
7360
|
+
"description": "Adjusts font-size",
|
|
7361
|
+
"name": "textSize",
|
|
7362
|
+
"parent": {
|
|
7363
|
+
"fileName": "react/src/table/HeaderCell.tsx",
|
|
7364
|
+
"name": "HeaderCellProps"
|
|
7365
|
+
},
|
|
7366
|
+
"declarations": [
|
|
7367
|
+
{
|
|
7368
|
+
"fileName": "react/src/table/HeaderCell.tsx",
|
|
7369
|
+
"name": "HeaderCellProps"
|
|
7370
|
+
}
|
|
7371
|
+
],
|
|
7372
|
+
"required": false,
|
|
7373
|
+
"type": {
|
|
7374
|
+
"name": "\"medium\" | \"small\""
|
|
7375
|
+
}
|
|
7376
|
+
},
|
|
7196
7377
|
"className": {
|
|
7197
7378
|
"defaultValue": null,
|
|
7198
7379
|
"description": "",
|
|
@@ -7258,6 +7439,25 @@
|
|
|
7258
7439
|
"name": "\"left\" | \"center\" | \"right\""
|
|
7259
7440
|
}
|
|
7260
7441
|
},
|
|
7442
|
+
"textSize": {
|
|
7443
|
+
"defaultValue": null,
|
|
7444
|
+
"description": "Adjusts font-size",
|
|
7445
|
+
"name": "textSize",
|
|
7446
|
+
"parent": {
|
|
7447
|
+
"fileName": "src/table/DataCell.tsx",
|
|
7448
|
+
"name": "DataCellProps"
|
|
7449
|
+
},
|
|
7450
|
+
"declarations": [
|
|
7451
|
+
{
|
|
7452
|
+
"fileName": "src/table/DataCell.tsx",
|
|
7453
|
+
"name": "DataCellProps"
|
|
7454
|
+
}
|
|
7455
|
+
],
|
|
7456
|
+
"required": false,
|
|
7457
|
+
"type": {
|
|
7458
|
+
"name": "\"medium\" | \"small\""
|
|
7459
|
+
}
|
|
7460
|
+
},
|
|
7261
7461
|
"className": {
|
|
7262
7462
|
"defaultValue": null,
|
|
7263
7463
|
"description": "",
|
|
@@ -7634,6 +7834,25 @@
|
|
|
7634
7834
|
"name": "\"left\" | \"center\" | \"right\""
|
|
7635
7835
|
}
|
|
7636
7836
|
},
|
|
7837
|
+
"textSize": {
|
|
7838
|
+
"defaultValue": null,
|
|
7839
|
+
"description": "Adjusts font-size",
|
|
7840
|
+
"name": "textSize",
|
|
7841
|
+
"parent": {
|
|
7842
|
+
"fileName": "src/table/HeaderCell.tsx",
|
|
7843
|
+
"name": "HeaderCellProps"
|
|
7844
|
+
},
|
|
7845
|
+
"declarations": [
|
|
7846
|
+
{
|
|
7847
|
+
"fileName": "src/table/HeaderCell.tsx",
|
|
7848
|
+
"name": "HeaderCellProps"
|
|
7849
|
+
}
|
|
7850
|
+
],
|
|
7851
|
+
"required": false,
|
|
7852
|
+
"type": {
|
|
7853
|
+
"name": "\"medium\" | \"small\""
|
|
7854
|
+
}
|
|
7855
|
+
},
|
|
7637
7856
|
"className": {
|
|
7638
7857
|
"defaultValue": null,
|
|
7639
7858
|
"description": "",
|
|
@@ -8359,6 +8578,25 @@
|
|
|
8359
8578
|
"name": "\"medium\" | \"small\" | \"xsmall\""
|
|
8360
8579
|
}
|
|
8361
8580
|
},
|
|
8581
|
+
"icon": {
|
|
8582
|
+
"defaultValue": null,
|
|
8583
|
+
"description": "Tag Icon",
|
|
8584
|
+
"name": "icon",
|
|
8585
|
+
"parent": {
|
|
8586
|
+
"fileName": "src/tag/Tag.tsx",
|
|
8587
|
+
"name": "TagProps"
|
|
8588
|
+
},
|
|
8589
|
+
"declarations": [
|
|
8590
|
+
{
|
|
8591
|
+
"fileName": "src/tag/Tag.tsx",
|
|
8592
|
+
"name": "TagProps"
|
|
8593
|
+
}
|
|
8594
|
+
],
|
|
8595
|
+
"required": false,
|
|
8596
|
+
"type": {
|
|
8597
|
+
"name": "ReactNode"
|
|
8598
|
+
}
|
|
8599
|
+
},
|
|
8362
8600
|
"className": {
|
|
8363
8601
|
"defaultValue": null,
|
|
8364
8602
|
"description": "",
|
|
@@ -9034,6 +9272,25 @@
|
|
|
9034
9272
|
"name": "boolean"
|
|
9035
9273
|
}
|
|
9036
9274
|
},
|
|
9275
|
+
"onOpenChange": {
|
|
9276
|
+
"defaultValue": null,
|
|
9277
|
+
"description": "Change handler for open",
|
|
9278
|
+
"name": "onOpenChange",
|
|
9279
|
+
"parent": {
|
|
9280
|
+
"fileName": "src/tooltip/Tooltip.tsx",
|
|
9281
|
+
"name": "TooltipProps"
|
|
9282
|
+
},
|
|
9283
|
+
"declarations": [
|
|
9284
|
+
{
|
|
9285
|
+
"fileName": "src/tooltip/Tooltip.tsx",
|
|
9286
|
+
"name": "TooltipProps"
|
|
9287
|
+
}
|
|
9288
|
+
],
|
|
9289
|
+
"required": false,
|
|
9290
|
+
"type": {
|
|
9291
|
+
"name": "((open: boolean) => void)"
|
|
9292
|
+
}
|
|
9293
|
+
},
|
|
9037
9294
|
"placement": {
|
|
9038
9295
|
"defaultValue": {
|
|
9039
9296
|
"value": "\"top\""
|
|
@@ -10237,111 +10494,6 @@
|
|
|
10237
10494
|
}
|
|
10238
10495
|
}
|
|
10239
10496
|
},
|
|
10240
|
-
{
|
|
10241
|
-
"filePath": "src/util/AnimateHeight.tsx",
|
|
10242
|
-
"displayName": "AnimateHeight",
|
|
10243
|
-
"props": {
|
|
10244
|
-
"duration": {
|
|
10245
|
-
"defaultValue": {
|
|
10246
|
-
"value": "250ms"
|
|
10247
|
-
},
|
|
10248
|
-
"description": "",
|
|
10249
|
-
"name": "duration",
|
|
10250
|
-
"parent": {
|
|
10251
|
-
"fileName": "src/util/AnimateHeight.tsx",
|
|
10252
|
-
"name": "AnimateHeightProps"
|
|
10253
|
-
},
|
|
10254
|
-
"declarations": [
|
|
10255
|
-
{
|
|
10256
|
-
"fileName": "src/util/AnimateHeight.tsx",
|
|
10257
|
-
"name": "AnimateHeightProps"
|
|
10258
|
-
}
|
|
10259
|
-
],
|
|
10260
|
-
"required": false,
|
|
10261
|
-
"type": {
|
|
10262
|
-
"name": "number"
|
|
10263
|
-
}
|
|
10264
|
-
},
|
|
10265
|
-
"easing": {
|
|
10266
|
-
"defaultValue": {
|
|
10267
|
-
"value": "ease"
|
|
10268
|
-
},
|
|
10269
|
-
"description": "",
|
|
10270
|
-
"name": "easing",
|
|
10271
|
-
"parent": {
|
|
10272
|
-
"fileName": "src/util/AnimateHeight.tsx",
|
|
10273
|
-
"name": "AnimateHeightProps"
|
|
10274
|
-
},
|
|
10275
|
-
"declarations": [
|
|
10276
|
-
{
|
|
10277
|
-
"fileName": "src/util/AnimateHeight.tsx",
|
|
10278
|
-
"name": "AnimateHeightProps"
|
|
10279
|
-
}
|
|
10280
|
-
],
|
|
10281
|
-
"required": false,
|
|
10282
|
-
"type": {
|
|
10283
|
-
"name": "string"
|
|
10284
|
-
}
|
|
10285
|
-
},
|
|
10286
|
-
"height": {
|
|
10287
|
-
"defaultValue": null,
|
|
10288
|
-
"description": "",
|
|
10289
|
-
"name": "height",
|
|
10290
|
-
"parent": {
|
|
10291
|
-
"fileName": "src/util/AnimateHeight.tsx",
|
|
10292
|
-
"name": "AnimateHeightProps"
|
|
10293
|
-
},
|
|
10294
|
-
"declarations": [
|
|
10295
|
-
{
|
|
10296
|
-
"fileName": "src/util/AnimateHeight.tsx",
|
|
10297
|
-
"name": "AnimateHeightProps"
|
|
10298
|
-
}
|
|
10299
|
-
],
|
|
10300
|
-
"required": true,
|
|
10301
|
-
"type": {
|
|
10302
|
-
"name": "Height"
|
|
10303
|
-
}
|
|
10304
|
-
},
|
|
10305
|
-
"innerClassName": {
|
|
10306
|
-
"defaultValue": null,
|
|
10307
|
-
"description": "",
|
|
10308
|
-
"name": "innerClassName",
|
|
10309
|
-
"parent": {
|
|
10310
|
-
"fileName": "src/util/AnimateHeight.tsx",
|
|
10311
|
-
"name": "AnimateHeightProps"
|
|
10312
|
-
},
|
|
10313
|
-
"declarations": [
|
|
10314
|
-
{
|
|
10315
|
-
"fileName": "src/util/AnimateHeight.tsx",
|
|
10316
|
-
"name": "AnimateHeightProps"
|
|
10317
|
-
}
|
|
10318
|
-
],
|
|
10319
|
-
"required": false,
|
|
10320
|
-
"type": {
|
|
10321
|
-
"name": "string"
|
|
10322
|
-
}
|
|
10323
|
-
},
|
|
10324
|
-
"className": {
|
|
10325
|
-
"defaultValue": null,
|
|
10326
|
-
"description": "",
|
|
10327
|
-
"name": "className",
|
|
10328
|
-
"parent": {
|
|
10329
|
-
"fileName": "aksel/node_modules/@types/react/index.d.ts",
|
|
10330
|
-
"name": "HTMLAttributes"
|
|
10331
|
-
},
|
|
10332
|
-
"declarations": [
|
|
10333
|
-
{
|
|
10334
|
-
"fileName": "aksel/node_modules/@types/react/index.d.ts",
|
|
10335
|
-
"name": "HTMLAttributes"
|
|
10336
|
-
}
|
|
10337
|
-
],
|
|
10338
|
-
"required": false,
|
|
10339
|
-
"type": {
|
|
10340
|
-
"name": "string"
|
|
10341
|
-
}
|
|
10342
|
-
}
|
|
10343
|
-
}
|
|
10344
|
-
},
|
|
10345
10497
|
{
|
|
10346
10498
|
"filePath": "src/util/Slot.tsx",
|
|
10347
10499
|
"displayName": "Slot",
|
|
@@ -10489,11 +10641,6 @@
|
|
|
10489
10641
|
}
|
|
10490
10642
|
}
|
|
10491
10643
|
},
|
|
10492
|
-
{
|
|
10493
|
-
"filePath": "src/util/mergeRefs.tsx",
|
|
10494
|
-
"displayName": "mergeRefs",
|
|
10495
|
-
"props": {}
|
|
10496
|
-
},
|
|
10497
10644
|
{
|
|
10498
10645
|
"filePath": "src/date/context/useSharedMonthContext.tsx",
|
|
10499
10646
|
"displayName": "SharedMonthProvider",
|
|
@@ -15808,7 +15955,7 @@
|
|
|
15808
15955
|
],
|
|
15809
15956
|
"required": false,
|
|
15810
15957
|
"type": {
|
|
15811
|
-
"name": "ElementType<any>"
|
|
15958
|
+
"name": "ElementType<any, keyof IntrinsicElements>"
|
|
15812
15959
|
}
|
|
15813
15960
|
},
|
|
15814
15961
|
"className": {
|
|
@@ -17444,7 +17591,7 @@
|
|
|
17444
17591
|
],
|
|
17445
17592
|
"required": false,
|
|
17446
17593
|
"type": {
|
|
17447
|
-
"name": "\"bg-default\" | \"bg-subtle\""
|
|
17594
|
+
"name": "\"bg-default\" | \"bg-subtle\" | \"surface-subtle\""
|
|
17448
17595
|
}
|
|
17449
17596
|
},
|
|
17450
17597
|
"footer": {
|
|
@@ -19393,7 +19540,7 @@
|
|
|
19393
19540
|
"defaultValue": {
|
|
19394
19541
|
"value": "max-width: 100%;"
|
|
19395
19542
|
},
|
|
19396
|
-
"description": "Predefined max-width\n@example
|
|
19543
|
+
"description": "Predefined max-width\n@example text: 576px + dynamic gutters\nmd: 768px\nlg: 1024px\nxl: 1280px\n2xl: 1440px",
|
|
19397
19544
|
"name": "width",
|
|
19398
19545
|
"parent": {
|
|
19399
19546
|
"fileName": "src/layout/page/parts/PageBlock.tsx",
|
|
@@ -19407,7 +19554,7 @@
|
|
|
19407
19554
|
],
|
|
19408
19555
|
"required": false,
|
|
19409
19556
|
"type": {
|
|
19410
|
-
"name": "\"md\" | \"lg\" | \"xl\" | \"2xl\""
|
|
19557
|
+
"name": "\"text\" | \"md\" | \"lg\" | \"xl\" | \"2xl\""
|
|
19411
19558
|
}
|
|
19412
19559
|
},
|
|
19413
19560
|
"gutters": {
|
|
@@ -40,10 +40,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
40
40
|
exports.Accordion = void 0;
|
|
41
41
|
const clsx_1 = __importDefault(require("clsx"));
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
43
|
-
const AccordionItem_1 = __importDefault(require("./AccordionItem"));
|
|
44
43
|
const AccordionContent_1 = __importDefault(require("./AccordionContent"));
|
|
45
|
-
const AccordionHeader_1 = __importDefault(require("./AccordionHeader"));
|
|
46
44
|
const AccordionContext_1 = require("./AccordionContext");
|
|
45
|
+
const AccordionHeader_1 = __importDefault(require("./AccordionHeader"));
|
|
46
|
+
const AccordionItem_1 = __importDefault(require("./AccordionItem"));
|
|
47
47
|
/**
|
|
48
48
|
* A component that displays collapsible content sections.
|
|
49
49
|
*
|
|
@@ -37,10 +37,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
const aksel_icons_1 = require("@navikt/aksel-icons");
|
|
41
40
|
const clsx_1 = __importDefault(require("clsx"));
|
|
42
41
|
const react_1 = __importStar(require("react"));
|
|
42
|
+
const aksel_icons_1 = require("@navikt/aksel-icons");
|
|
43
43
|
const typography_1 = require("../typography");
|
|
44
|
+
const composeEventHandlers_1 = require("../util/composeEventHandlers");
|
|
44
45
|
const AccordionContext_1 = require("./AccordionContext");
|
|
45
46
|
const AccordionItem_1 = require("./AccordionItem");
|
|
46
47
|
const AccordionHeader = (0, react_1.forwardRef)((_a, ref) => {
|
|
@@ -52,10 +53,7 @@ const AccordionHeader = (0, react_1.forwardRef)((_a, ref) => {
|
|
|
52
53
|
console.error("<Accordion.Header> has to be used within an <Accordion.Item>, which in turn must be within an <Accordion>");
|
|
53
54
|
return null;
|
|
54
55
|
}
|
|
55
|
-
return (react_1.default.createElement("button", Object.assign({ ref: ref }, rest, { className: (0, clsx_1.default)("navds-accordion__header", className), onClick: (
|
|
56
|
-
itemContext.toggleOpen();
|
|
57
|
-
onClick && onClick(e);
|
|
58
|
-
}, "aria-expanded": itemContext.open, type: "button" }),
|
|
56
|
+
return (react_1.default.createElement("button", Object.assign({ ref: ref }, rest, { className: (0, clsx_1.default)("navds-accordion__header", className), onClick: (0, composeEventHandlers_1.composeEventHandlers)(onClick, itemContext.toggleOpen), "aria-expanded": itemContext.open, type: "button" }),
|
|
59
57
|
react_1.default.createElement("span", { className: "navds-accordion__icon-wrapper" },
|
|
60
58
|
react_1.default.createElement(aksel_icons_1.ChevronDownIcon, { className: "navds-accordion__header-chevron", title: "Vis mer", "aria-hidden": true })),
|
|
61
59
|
react_1.default.createElement(typography_1.Heading, { size: (_b = accordionContext === null || accordionContext === void 0 ? void 0 : accordionContext.headingSize) !== null && _b !== void 0 ? _b : "small", as: "span", className: "navds-accordion__header-content" }, children)));
|
|
@@ -40,36 +40,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
40
40
|
exports.AccordionItemContext = void 0;
|
|
41
41
|
const clsx_1 = __importDefault(require("clsx"));
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
43
|
-
const AccordionContext_1 = require("./AccordionContext");
|
|
44
43
|
const util_1 = require("../util");
|
|
44
|
+
const useControllableState_1 = require("../util/hooks/useControllableState");
|
|
45
|
+
const AccordionContext_1 = require("./AccordionContext");
|
|
45
46
|
exports.AccordionItemContext = (0, react_1.createContext)(null);
|
|
46
47
|
const AccordionItem = (0, react_1.forwardRef)((_a, ref) => {
|
|
47
|
-
var { children, className, open, defaultOpen = false } = _a, rest = __rest(_a, ["children", "className", "open", "defaultOpen"]);
|
|
48
|
-
const [
|
|
48
|
+
var { children, className, open, defaultOpen = false, onOpenChange } = _a, rest = __rest(_a, ["children", "className", "open", "defaultOpen", "onOpenChange"]);
|
|
49
|
+
const [_open, _setOpen] = (0, useControllableState_1.useControllableState)({
|
|
50
|
+
defaultValue: defaultOpen,
|
|
51
|
+
value: open,
|
|
52
|
+
onChange: onOpenChange,
|
|
53
|
+
});
|
|
49
54
|
const context = (0, react_1.useContext)(AccordionContext_1.AccordionContext);
|
|
50
|
-
const [_open, _setOpen] = (0, react_1.useState)(defaultOpen);
|
|
51
55
|
const shouldAnimate = (0, react_1.useRef)(!(Boolean(open) || defaultOpen));
|
|
52
56
|
const handleOpen = () => {
|
|
53
|
-
|
|
54
|
-
const newOpen = !_open;
|
|
55
|
-
_setOpen(newOpen);
|
|
56
|
-
setInternalOpen(newOpen);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
setInternalOpen(!open);
|
|
60
|
-
}
|
|
57
|
+
_setOpen((x) => !x);
|
|
61
58
|
shouldAnimate.current = true;
|
|
62
59
|
};
|
|
63
60
|
if (!(context === null || context === void 0 ? void 0 : context.mounted)) {
|
|
64
61
|
console.error("<Accordion.Item> has to be used within an <Accordion>");
|
|
65
62
|
}
|
|
66
63
|
return (react_1.default.createElement("div", Object.assign({ className: (0, clsx_1.default)("navds-accordion__item", className, {
|
|
67
|
-
"navds-accordion__item--open":
|
|
64
|
+
"navds-accordion__item--open": _open,
|
|
68
65
|
"navds-accordion__item--neutral": (context === null || context === void 0 ? void 0 : context.variant) === "neutral",
|
|
69
66
|
"navds-accordion__item--no-animation": !shouldAnimate.current,
|
|
70
67
|
}), ref: ref }, (0, util_1.omit)(rest, ["onClick"])),
|
|
71
68
|
react_1.default.createElement(exports.AccordionItemContext.Provider, { value: {
|
|
72
|
-
open:
|
|
69
|
+
open: _open,
|
|
73
70
|
toggleOpen: handleOpen,
|
|
74
71
|
} }, children)));
|
|
75
72
|
});
|
package/cjs/alert/Alert.js
CHANGED
|
@@ -38,11 +38,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
exports.Alert = void 0;
|
|
41
|
-
const aksel_icons_1 = require("@navikt/aksel-icons");
|
|
42
41
|
const clsx_1 = __importDefault(require("clsx"));
|
|
43
42
|
const react_1 = __importStar(require("react"));
|
|
44
|
-
const
|
|
43
|
+
const aksel_icons_1 = require("@navikt/aksel-icons");
|
|
45
44
|
const button_1 = require("../button");
|
|
45
|
+
const typography_1 = require("../typography");
|
|
46
46
|
const Icon = (_a) => {
|
|
47
47
|
var { variant } = _a, props = __rest(_a, ["variant"]);
|
|
48
48
|
switch (variant) {
|