@navikt/ds-react 0.17.27 → 0.18.2
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 +9165 -0
- package/cjs/accordion/Accordion.js +6 -5
- package/cjs/accordion/index.js +0 -15
- package/cjs/alert/Alert.js +3 -2
- package/cjs/alert/index.js +0 -15
- package/cjs/button/Button.js +3 -2
- package/cjs/button/index.js +0 -15
- package/cjs/card/index.js +0 -15
- package/cjs/form/ConfirmationPanel.js +3 -2
- package/cjs/form/Fieldset/Fieldset.js +3 -3
- package/cjs/form/Fieldset/index.js +2 -2
- package/cjs/form/Select.js +4 -3
- package/cjs/form/Switch.js +3 -2
- package/cjs/form/TextField.js +4 -3
- package/cjs/form/Textarea.js +3 -3
- package/cjs/form/checkbox/Checkbox.js +3 -2
- package/cjs/form/checkbox/CheckboxGroup.js +3 -3
- package/cjs/form/error-summary/ErrorSummary.js +4 -3
- package/cjs/form/error-summary/ErrorSummaryItem.js +3 -2
- package/cjs/form/error-summary/index.js +0 -15
- package/cjs/form/index.js +6 -6
- package/cjs/form/radio/Radio.js +3 -2
- package/cjs/form/radio/RadioGroup.js +3 -3
- package/cjs/form/search/Search.js +5 -6
- package/cjs/form/search/SearchButton.js +3 -6
- package/cjs/grid/Cell.js +3 -2
- package/cjs/grid/ContentContainer.js +3 -2
- package/cjs/grid/Grid.js +3 -2
- package/cjs/grid/index.js +0 -17
- package/cjs/guide-panel/GuidePanel.js +3 -2
- package/cjs/guide-panel/index.js +0 -15
- package/cjs/help-text/HelpText.js +3 -2
- package/cjs/help-text/index.js +0 -15
- package/cjs/link/Link.js +3 -2
- package/cjs/link/index.js +0 -15
- package/cjs/link-panel/LinkPanel.js +3 -2
- package/cjs/link-panel/index.js +0 -15
- package/cjs/loader/Loader.js +3 -2
- package/cjs/loader/index.js +0 -15
- package/cjs/menu/Menu.js +5 -4
- package/cjs/menu/MenuCollapse.js +3 -3
- package/cjs/menu/MenuItem.js +3 -2
- package/cjs/modal/Modal.js +5 -4
- package/cjs/modal/index.js +0 -15
- package/cjs/page-header/index.js +0 -15
- package/cjs/pagination/Pagination.js +3 -3
- package/cjs/pagination/index.js +0 -15
- package/cjs/panel/Panel.js +3 -2
- package/cjs/panel/index.js +0 -15
- package/cjs/popover/Popover.js +4 -3
- package/cjs/popover/index.js +0 -15
- package/cjs/read-more/ReadMore.js +3 -2
- package/cjs/read-more/index.js +0 -15
- package/cjs/speech-bubble/SpeechBubble.js +4 -3
- package/cjs/speech-bubble/index.js +0 -15
- package/cjs/step-indicator/Step.js +5 -4
- package/cjs/step-indicator/StepIndicator.js +4 -4
- package/cjs/step-indicator/index.js +0 -15
- package/cjs/stepper/Step.js +5 -4
- package/cjs/stepper/Stepper.js +4 -4
- package/cjs/stepper/index.js +0 -15
- package/cjs/table/Body.js +3 -2
- package/cjs/table/ColumnHeader.js +5 -4
- package/cjs/table/DataCell.js +5 -4
- package/cjs/table/ExpandableRow.js +12 -12
- package/cjs/table/Header.js +3 -2
- package/cjs/table/HeaderCell.js +5 -3
- package/cjs/table/Row.js +3 -2
- package/cjs/table/Table.js +10 -10
- package/cjs/table/index.js +0 -15
- package/cjs/tabs/Tab.js +3 -2
- package/cjs/tabs/TabList.js +3 -2
- package/cjs/tabs/TabPanel.js +2 -2
- package/cjs/tabs/Tabs.js +6 -6
- package/cjs/tag/Tag.js +3 -2
- package/cjs/tag/index.js +0 -15
- package/cjs/toggle-group/ToggleGroup.js +4 -4
- package/cjs/tooltip/Tooltip.js +3 -2
- package/cjs/tooltip/index.js +0 -15
- package/cjs/typography/BodyLong.js +3 -2
- package/cjs/typography/BodyShort.js +3 -2
- package/cjs/typography/Detail.js +3 -2
- package/cjs/typography/Heading.js +3 -2
- package/cjs/typography/Ingress.js +3 -2
- package/cjs/typography/Label.js +3 -2
- package/cjs/typography/index.js +5 -5
- package/esm/accordion/Accordion.d.ts +1 -1
- package/esm/accordion/Accordion.js +1 -1
- package/esm/accordion/Accordion.js.map +1 -1
- package/esm/accordion/AccordionHeader.d.ts +1 -1
- package/esm/accordion/AccordionItem.d.ts +2 -2
- package/esm/accordion/index.d.ts +1 -2
- package/esm/accordion/index.js +0 -1
- package/esm/accordion/index.js.map +1 -1
- package/esm/alert/Alert.d.ts +2 -2
- package/esm/alert/Alert.js +1 -1
- package/esm/alert/Alert.js.map +1 -1
- package/esm/alert/index.d.ts +1 -1
- package/esm/alert/index.js +0 -1
- package/esm/alert/index.js.map +1 -1
- package/esm/button/Button.d.ts +3 -3
- package/esm/button/Button.js +1 -1
- package/esm/button/Button.js.map +1 -1
- package/esm/button/index.d.ts +1 -1
- package/esm/button/index.js +0 -1
- package/esm/button/index.js.map +1 -1
- package/esm/card/index.d.ts +1 -1
- package/esm/card/index.js +0 -1
- package/esm/card/index.js.map +1 -1
- package/esm/form/ConfirmationPanel.d.ts +1 -1
- package/esm/form/ConfirmationPanel.js +1 -1
- package/esm/form/ConfirmationPanel.js.map +1 -1
- package/esm/form/Fieldset/Fieldset.d.ts +1 -1
- package/esm/form/Fieldset/Fieldset.js +1 -1
- package/esm/form/Fieldset/Fieldset.js.map +1 -1
- package/esm/form/Fieldset/index.d.ts +1 -1
- package/esm/form/Fieldset/index.js +1 -1
- package/esm/form/Fieldset/index.js.map +1 -1
- package/esm/form/Select.d.ts +1 -1
- package/esm/form/Select.js +2 -2
- package/esm/form/Select.js.map +1 -1
- package/esm/form/Switch.d.ts +1 -1
- package/esm/form/Switch.js +1 -1
- package/esm/form/Switch.js.map +1 -1
- package/esm/form/TextField.d.ts +1 -1
- package/esm/form/TextField.js +2 -2
- package/esm/form/TextField.js.map +1 -1
- package/esm/form/Textarea.d.ts +1 -1
- package/esm/form/Textarea.js +1 -1
- package/esm/form/Textarea.js.map +1 -1
- package/esm/form/checkbox/Checkbox.d.ts +1 -1
- package/esm/form/checkbox/Checkbox.js +1 -1
- package/esm/form/checkbox/Checkbox.js.map +1 -1
- package/esm/form/checkbox/CheckboxGroup.d.ts +1 -1
- package/esm/form/checkbox/CheckboxGroup.js +1 -1
- package/esm/form/checkbox/CheckboxGroup.js.map +1 -1
- package/esm/form/error-summary/ErrorSummary.d.ts +1 -1
- package/esm/form/error-summary/ErrorSummary.js +1 -1
- package/esm/form/error-summary/ErrorSummary.js.map +1 -1
- package/esm/form/error-summary/ErrorSummaryItem.d.ts +1 -1
- package/esm/form/error-summary/ErrorSummaryItem.js +1 -1
- package/esm/form/error-summary/ErrorSummaryItem.js.map +1 -1
- package/esm/form/error-summary/index.d.ts +1 -1
- package/esm/form/error-summary/index.js +0 -1
- package/esm/form/error-summary/index.js.map +1 -1
- package/esm/form/index.d.ts +5 -5
- package/esm/form/index.js +3 -3
- package/esm/form/index.js.map +1 -1
- package/esm/form/radio/Radio.d.ts +1 -1
- package/esm/form/radio/Radio.js +1 -1
- package/esm/form/radio/Radio.js.map +1 -1
- package/esm/form/radio/RadioGroup.d.ts +1 -1
- package/esm/form/radio/RadioGroup.js +1 -1
- package/esm/form/radio/RadioGroup.js.map +1 -1
- package/esm/form/search/Search.d.ts +1 -6
- package/esm/form/search/Search.js +2 -3
- package/esm/form/search/Search.js.map +1 -1
- package/esm/form/search/SearchButton.js +3 -6
- package/esm/form/search/SearchButton.js.map +1 -1
- package/esm/grid/Cell.d.ts +1 -1
- package/esm/grid/Cell.js +1 -1
- package/esm/grid/Cell.js.map +1 -1
- package/esm/grid/ContentContainer.d.ts +1 -1
- package/esm/grid/ContentContainer.js +1 -1
- package/esm/grid/ContentContainer.js.map +1 -1
- package/esm/grid/Grid.d.ts +1 -1
- package/esm/grid/Grid.js +1 -1
- package/esm/grid/Grid.js.map +1 -1
- package/esm/grid/index.d.ts +3 -6
- package/esm/grid/index.js +1 -4
- package/esm/grid/index.js.map +1 -1
- package/esm/guide-panel/GuidePanel.d.ts +1 -1
- package/esm/guide-panel/GuidePanel.js +1 -1
- package/esm/guide-panel/GuidePanel.js.map +1 -1
- package/esm/guide-panel/index.d.ts +1 -2
- package/esm/guide-panel/index.js +0 -1
- package/esm/guide-panel/index.js.map +1 -1
- package/esm/help-text/HelpText.d.ts +1 -1
- package/esm/help-text/HelpText.js +1 -1
- package/esm/help-text/HelpText.js.map +1 -1
- package/esm/help-text/index.d.ts +1 -1
- package/esm/help-text/index.js +0 -1
- package/esm/help-text/index.js.map +1 -1
- package/esm/link/Link.d.ts +1 -1
- package/esm/link/Link.js +1 -1
- package/esm/link/Link.js.map +1 -1
- package/esm/link/index.d.ts +1 -1
- package/esm/link/index.js +0 -1
- package/esm/link/index.js.map +1 -1
- package/esm/link-panel/LinkPanel.d.ts +1 -0
- package/esm/link-panel/LinkPanel.js +1 -1
- package/esm/link-panel/LinkPanel.js.map +1 -1
- package/esm/link-panel/index.d.ts +1 -1
- package/esm/link-panel/index.js +0 -1
- package/esm/link-panel/index.js.map +1 -1
- package/esm/loader/Loader.d.ts +1 -1
- package/esm/loader/Loader.js +1 -1
- package/esm/loader/Loader.js.map +1 -1
- package/esm/loader/index.d.ts +1 -1
- package/esm/loader/index.js +0 -1
- package/esm/loader/index.js.map +1 -1
- package/esm/menu/Menu.d.ts +1 -1
- package/esm/menu/Menu.js +1 -1
- package/esm/menu/Menu.js.map +1 -1
- package/esm/menu/MenuCollapse.d.ts +1 -1
- package/esm/menu/MenuCollapse.js +1 -1
- package/esm/menu/MenuCollapse.js.map +1 -1
- package/esm/menu/MenuItem.d.ts +1 -1
- package/esm/menu/MenuItem.js +1 -1
- package/esm/menu/MenuItem.js.map +1 -1
- package/esm/modal/Modal.d.ts +1 -1
- package/esm/modal/Modal.js +1 -1
- package/esm/modal/Modal.js.map +1 -1
- package/esm/modal/index.d.ts +1 -2
- package/esm/modal/index.js +0 -1
- package/esm/modal/index.js.map +1 -1
- package/esm/page-header/index.d.ts +1 -1
- package/esm/page-header/index.js +0 -1
- package/esm/page-header/index.js.map +1 -1
- package/esm/pagination/Pagination.d.ts +2 -2
- package/esm/pagination/Pagination.js +1 -1
- package/esm/pagination/Pagination.js.map +1 -1
- package/esm/pagination/index.d.ts +1 -1
- package/esm/pagination/index.js +0 -1
- package/esm/pagination/index.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/panel/index.d.ts +1 -1
- package/esm/panel/index.js +0 -1
- package/esm/panel/index.js.map +1 -1
- package/esm/popover/Popover.d.ts +1 -1
- package/esm/popover/Popover.js +1 -1
- package/esm/popover/Popover.js.map +1 -1
- package/esm/popover/index.d.ts +1 -2
- package/esm/popover/index.js +0 -1
- package/esm/popover/index.js.map +1 -1
- package/esm/read-more/ReadMore.d.ts +1 -1
- package/esm/read-more/ReadMore.js +1 -1
- package/esm/read-more/ReadMore.js.map +1 -1
- package/esm/read-more/index.d.ts +1 -2
- package/esm/read-more/index.js +0 -1
- package/esm/read-more/index.js.map +1 -1
- package/esm/speech-bubble/SpeechBubble.d.ts +1 -1
- package/esm/speech-bubble/SpeechBubble.js +1 -1
- package/esm/speech-bubble/SpeechBubble.js.map +1 -1
- package/esm/speech-bubble/index.d.ts +1 -2
- package/esm/speech-bubble/index.js +0 -1
- package/esm/speech-bubble/index.js.map +1 -1
- package/esm/step-indicator/Step.d.ts +1 -0
- package/esm/step-indicator/Step.js +3 -3
- package/esm/step-indicator/Step.js.map +1 -1
- package/esm/step-indicator/StepIndicator.d.ts +1 -1
- package/esm/step-indicator/StepIndicator.js +3 -3
- package/esm/step-indicator/StepIndicator.js.map +1 -1
- package/esm/step-indicator/index.d.ts +1 -2
- package/esm/step-indicator/index.js +0 -1
- package/esm/step-indicator/index.js.map +1 -1
- package/esm/stepper/Step.d.ts +1 -0
- package/esm/stepper/Step.js +2 -2
- package/esm/stepper/Step.js.map +1 -1
- package/esm/stepper/Stepper.d.ts +1 -1
- package/esm/stepper/Stepper.js +1 -1
- package/esm/stepper/Stepper.js.map +1 -1
- package/esm/stepper/index.d.ts +1 -2
- package/esm/stepper/index.js +0 -1
- package/esm/stepper/index.js.map +1 -1
- package/esm/table/Body.d.ts +2 -2
- package/esm/table/Body.js +1 -1
- package/esm/table/Body.js.map +1 -1
- package/esm/table/ColumnHeader.d.ts +2 -2
- package/esm/table/ColumnHeader.js +2 -2
- package/esm/table/ColumnHeader.js.map +1 -1
- package/esm/table/DataCell.d.ts +2 -2
- package/esm/table/DataCell.js +2 -2
- package/esm/table/DataCell.js.map +1 -1
- package/esm/table/ExpandableRow.d.ts +7 -2
- package/esm/table/ExpandableRow.js +10 -11
- package/esm/table/ExpandableRow.js.map +1 -1
- package/esm/table/Header.d.ts +2 -2
- package/esm/table/Header.js +1 -1
- package/esm/table/Header.js.map +1 -1
- package/esm/table/HeaderCell.d.ts +1 -1
- package/esm/table/HeaderCell.js +3 -2
- package/esm/table/HeaderCell.js.map +1 -1
- package/esm/table/Row.d.ts +1 -1
- package/esm/table/Row.js +1 -1
- package/esm/table/Row.js.map +1 -1
- package/esm/table/Table.d.ts +1 -1
- package/esm/table/Table.js +1 -1
- package/esm/table/Table.js.map +1 -1
- package/esm/table/index.d.ts +8 -2
- package/esm/table/index.js +0 -1
- package/esm/table/index.js.map +1 -1
- package/esm/tabs/Tab.d.ts +1 -1
- package/esm/tabs/Tab.js +1 -1
- package/esm/tabs/Tab.js.map +1 -1
- package/esm/tabs/TabList.d.ts +4 -4
- package/esm/tabs/TabList.js +2 -2
- package/esm/tabs/TabList.js.map +1 -1
- package/esm/tabs/TabPanel.d.ts +4 -4
- package/esm/tabs/TabPanel.js +2 -2
- package/esm/tabs/TabPanel.js.map +1 -1
- package/esm/tabs/Tabs.d.ts +5 -5
- package/esm/tabs/Tabs.js +5 -5
- package/esm/tabs/Tabs.js.map +1 -1
- package/esm/tabs/index.d.ts +3 -1
- package/esm/tabs/index.js.map +1 -1
- package/esm/tag/Tag.d.ts +1 -1
- package/esm/tag/Tag.js +1 -1
- package/esm/tag/Tag.js.map +1 -1
- package/esm/tag/index.d.ts +1 -2
- package/esm/tag/index.js +0 -1
- package/esm/tag/index.js.map +1 -1
- package/esm/toggle-group/ToggleGroup.d.ts +1 -1
- package/esm/toggle-group/ToggleGroup.js +1 -1
- package/esm/toggle-group/ToggleGroup.js.map +1 -1
- package/esm/toggle-group/index.d.ts +2 -2
- package/esm/toggle-group/index.js.map +1 -1
- package/esm/tooltip/Tooltip.d.ts +1 -1
- package/esm/tooltip/Tooltip.js +1 -1
- package/esm/tooltip/Tooltip.js.map +1 -1
- package/esm/tooltip/index.d.ts +1 -2
- package/esm/tooltip/index.js +0 -1
- package/esm/tooltip/index.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/BodyShort.js +1 -1
- package/esm/typography/BodyShort.js.map +1 -1
- package/esm/typography/Detail.d.ts +1 -1
- package/esm/typography/Detail.js +1 -1
- package/esm/typography/Detail.js.map +1 -1
- package/esm/typography/Heading.d.ts +1 -1
- package/esm/typography/Heading.js +1 -1
- package/esm/typography/Heading.js.map +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/typography/Label.js +1 -1
- package/esm/typography/Label.js.map +1 -1
- package/esm/typography/index.d.ts +6 -6
- package/esm/typography/index.js +2 -2
- package/esm/typography/index.js.map +1 -1
- package/package.json +10 -5
- package/src/accordion/Accordion.tsx +1 -1
- package/src/accordion/AccordionHeader.tsx +1 -1
- package/src/accordion/AccordionItem.tsx +2 -2
- package/src/accordion/index.ts +1 -2
- package/src/alert/Alert.tsx +2 -2
- package/src/alert/index.ts +1 -1
- package/src/button/Button.tsx +6 -3
- package/src/button/index.ts +1 -1
- package/src/card/index.ts +1 -1
- package/src/form/ConfirmationPanel.tsx +25 -24
- package/src/form/Fieldset/Fieldset.tsx +2 -1
- package/src/form/Fieldset/index.ts +5 -1
- package/src/form/Select.tsx +72 -68
- package/src/form/Switch.tsx +82 -80
- package/src/form/TextField.tsx +86 -82
- package/src/form/Textarea.tsx +1 -1
- package/src/form/checkbox/Checkbox.tsx +63 -61
- package/src/form/checkbox/CheckboxGroup.tsx +4 -1
- package/src/form/error-summary/ErrorSummary.tsx +1 -1
- package/src/form/error-summary/ErrorSummaryItem.tsx +1 -1
- package/src/form/error-summary/index.ts +1 -1
- package/src/form/index.ts +7 -11
- package/src/form/radio/Radio.tsx +1 -1
- package/src/form/radio/RadioGroup.tsx +1 -1
- package/src/form/search/Search.tsx +130 -135
- package/src/form/search/SearchButton.tsx +2 -6
- package/src/form/search/search.stories.tsx +0 -1
- package/src/grid/Cell.tsx +1 -1
- package/src/grid/ContentContainer.tsx +10 -9
- package/src/grid/Grid.tsx +2 -1
- package/src/grid/index.ts +6 -6
- package/src/guide-panel/GuidePanel.tsx +1 -1
- package/src/guide-panel/index.ts +1 -2
- package/src/help-text/HelpText.tsx +1 -1
- package/src/help-text/index.ts +1 -1
- package/src/link/Link.tsx +1 -1
- package/src/link/index.ts +1 -1
- package/src/link-panel/LinkPanel.tsx +1 -1
- package/src/link-panel/index.ts +1 -1
- package/src/loader/Loader.tsx +1 -1
- package/src/loader/index.ts +1 -1
- package/src/menu/Menu.tsx +1 -1
- package/src/menu/MenuCollapse.tsx +1 -1
- package/src/menu/MenuItem.tsx +1 -1
- package/src/modal/Modal.tsx +1 -1
- package/src/modal/index.ts +1 -2
- package/src/page-header/index.ts +1 -1
- package/src/pagination/Pagination.tsx +2 -2
- package/src/pagination/index.ts +1 -1
- package/src/panel/Panel.tsx +1 -1
- package/src/panel/index.ts +1 -1
- package/src/popover/Popover.tsx +1 -1
- package/src/popover/index.ts +1 -2
- package/src/read-more/ReadMore.tsx +1 -1
- package/src/read-more/index.ts +1 -2
- package/src/read-more/read-more.stories.tsx +1 -1
- package/src/speech-bubble/SpeechBubble.tsx +1 -1
- package/src/speech-bubble/index.ts +1 -2
- package/src/step-indicator/Step.tsx +3 -3
- package/src/step-indicator/StepIndicator.tsx +6 -3
- package/src/step-indicator/index.ts +1 -2
- package/src/stepper/Step.tsx +2 -2
- package/src/stepper/Stepper.tsx +4 -1
- package/src/stepper/index.ts +1 -2
- package/src/table/Body.tsx +3 -2
- package/src/table/ColumnHeader.tsx +3 -3
- package/src/table/DataCell.tsx +4 -3
- package/src/table/ExpandableRow.tsx +30 -22
- package/src/table/Header.tsx +3 -2
- package/src/table/HeaderCell.tsx +3 -2
- package/src/table/Row.tsx +1 -1
- package/src/table/Table.tsx +1 -1
- package/src/table/index.ts +8 -2
- package/src/table/stories/table-expandable.stories.tsx +2 -1
- package/src/tabs/Tab.tsx +1 -1
- package/src/tabs/TabList.tsx +6 -6
- package/src/tabs/TabPanel.tsx +6 -6
- package/src/tabs/Tabs.tsx +7 -7
- package/src/tabs/index.ts +3 -1
- package/src/tag/Tag.tsx +1 -1
- package/src/tag/index.ts +1 -2
- package/src/toggle-group/ToggleGroup.tsx +1 -1
- package/src/toggle-group/index.ts +2 -2
- package/src/tooltip/Tooltip.tsx +1 -1
- package/src/tooltip/index.ts +1 -2
- package/src/typography/BodyLong.tsx +1 -1
- package/src/typography/BodyShort.tsx +1 -1
- package/src/typography/Detail.tsx +1 -1
- package/src/typography/Heading.tsx +1 -1
- package/src/typography/Ingress.tsx +1 -1
- package/src/typography/Label.tsx +1 -1
- package/src/typography/index.ts +6 -6
|
@@ -15,7 +15,7 @@ export type ErrorSummaryItemType = OverridableComponent<
|
|
|
15
15
|
HTMLAnchorElement
|
|
16
16
|
>;
|
|
17
17
|
|
|
18
|
-
const ErrorSummaryItem: ErrorSummaryItemType = forwardRef(
|
|
18
|
+
export const ErrorSummaryItem: ErrorSummaryItemType = forwardRef(
|
|
19
19
|
({ children, as: Component = "a", className, ...rest }, ref) => {
|
|
20
20
|
return (
|
|
21
21
|
<Component
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as ErrorSummary } from "./ErrorSummary";
|
|
2
|
-
export
|
|
2
|
+
export { ErrorSummaryProps } from "./ErrorSummary";
|
package/src/form/index.ts
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
export {
|
|
2
2
|
Checkbox,
|
|
3
|
-
CheckboxProps,
|
|
4
3
|
CheckboxGroup,
|
|
5
4
|
CheckboxGroupProps,
|
|
5
|
+
CheckboxProps,
|
|
6
6
|
} from "./checkbox";
|
|
7
7
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} from "./
|
|
8
|
+
ConfirmationPanelProps,
|
|
9
|
+
default as ConfirmationPanel,
|
|
10
|
+
} from "./ConfirmationPanel";
|
|
11
|
+
export { ErrorSummary, ErrorSummaryProps } from "./error-summary";
|
|
12
|
+
export { Fieldset, FieldsetContext, FieldsetProps } from "./Fieldset";
|
|
12
13
|
export { Radio, RadioGroup, RadioGroupProps, RadioProps } from "./radio";
|
|
13
|
-
export { Search,
|
|
14
|
+
export { Search, SearchClearEvent, SearchProps } from "./search";
|
|
14
15
|
export { default as Select, SelectProps } from "./Select";
|
|
15
16
|
export { default as Switch, SwitchProps } from "./Switch";
|
|
16
|
-
export { ErrorSummary, ErrorSummaryProps } from "./error-summary";
|
|
17
17
|
export { Counter, default as Textarea, TextareaProps } from "./Textarea";
|
|
18
18
|
export { default as TextField, TextFieldProps } from "./TextField";
|
|
19
|
-
export {
|
|
20
|
-
default as ConfirmationPanel,
|
|
21
|
-
ConfirmationPanelProps,
|
|
22
|
-
} from "./ConfirmationPanel";
|
package/src/form/radio/Radio.tsx
CHANGED
|
@@ -17,7 +17,7 @@ export interface RadioProps
|
|
|
17
17
|
value: any;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
const Radio = forwardRef<HTMLInputElement, RadioProps>((props, ref) => {
|
|
20
|
+
export const Radio = forwardRef<HTMLInputElement, RadioProps>((props, ref) => {
|
|
21
21
|
const { inputProps, size, hasError } = useRadio(props);
|
|
22
22
|
|
|
23
23
|
const Description = size === "medium" ? BodyShort : Detail;
|
|
@@ -38,10 +38,6 @@ export interface SearchProps
|
|
|
38
38
|
* Callback for value-change in input
|
|
39
39
|
*/
|
|
40
40
|
onChange?: (value: string) => void;
|
|
41
|
-
/**
|
|
42
|
-
* Callback for <Search.Button/> click or onSubmit in form
|
|
43
|
-
*/
|
|
44
|
-
onSearch?: (value: string | number | readonly string[]) => void;
|
|
45
41
|
/**
|
|
46
42
|
* Callback for click on clear-button or Escape keydown
|
|
47
43
|
*/
|
|
@@ -74,157 +70,156 @@ export interface SearchContextProps {
|
|
|
74
70
|
disabled?: boolean;
|
|
75
71
|
size: "medium" | "small";
|
|
76
72
|
variant: "primary" | "secondary" | "simple";
|
|
77
|
-
onSearch: () => void;
|
|
78
73
|
}
|
|
79
74
|
|
|
80
75
|
export const SearchContext = React.createContext<SearchContextProps | null>(
|
|
81
76
|
null
|
|
82
77
|
);
|
|
83
78
|
|
|
84
|
-
const Search = forwardRef<HTMLInputElement, SearchProps>(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const {
|
|
91
|
-
className,
|
|
92
|
-
hideLabel = true,
|
|
93
|
-
label,
|
|
94
|
-
description,
|
|
95
|
-
value,
|
|
96
|
-
clearButtonLabel,
|
|
97
|
-
onClear,
|
|
98
|
-
clearButton = true,
|
|
99
|
-
children,
|
|
100
|
-
onSearch,
|
|
101
|
-
variant = "primary",
|
|
102
|
-
defaultValue,
|
|
103
|
-
onChange,
|
|
104
|
-
...rest
|
|
105
|
-
} = props;
|
|
79
|
+
export const Search = forwardRef<HTMLInputElement, SearchProps>(
|
|
80
|
+
(props, ref) => {
|
|
81
|
+
const { inputProps, size = "medium", inputDescriptionId } = useSearch(
|
|
82
|
+
props,
|
|
83
|
+
"searchfield"
|
|
84
|
+
);
|
|
106
85
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
86
|
+
const {
|
|
87
|
+
className,
|
|
88
|
+
hideLabel = true,
|
|
89
|
+
label,
|
|
90
|
+
description,
|
|
91
|
+
value,
|
|
92
|
+
clearButtonLabel,
|
|
93
|
+
onClear,
|
|
94
|
+
clearButton = true,
|
|
95
|
+
children,
|
|
96
|
+
variant = "primary",
|
|
97
|
+
defaultValue,
|
|
98
|
+
onChange,
|
|
99
|
+
...rest
|
|
100
|
+
} = props;
|
|
110
101
|
|
|
111
|
-
|
|
102
|
+
const searchRef = useRef<HTMLInputElement | null>(null);
|
|
103
|
+
const mergedRef = mergeRefs([searchRef, ref]);
|
|
104
|
+
const [wrapperRef, setWrapperRef] = useState<HTMLDivElement | null>(null);
|
|
112
105
|
|
|
113
|
-
|
|
114
|
-
(v: string) => {
|
|
115
|
-
value === undefined && setInternalValue(v);
|
|
116
|
-
onChange?.(v);
|
|
117
|
-
},
|
|
118
|
-
[onChange, value]
|
|
119
|
-
);
|
|
106
|
+
const [internalValue, setInternalValue] = useState(defaultValue ?? "");
|
|
120
107
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
);
|
|
108
|
+
const handleChange = useCallback(
|
|
109
|
+
(v: string) => {
|
|
110
|
+
value === undefined && setInternalValue(v);
|
|
111
|
+
onChange?.(v);
|
|
112
|
+
},
|
|
113
|
+
[onChange, value]
|
|
114
|
+
);
|
|
129
115
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
e.preventDefault();
|
|
136
|
-
handleClear({ trigger: "Escape", event: e });
|
|
137
|
-
}
|
|
116
|
+
const handleClear = useCallback(
|
|
117
|
+
(event: SearchClearEvent) => {
|
|
118
|
+
onClear?.(event);
|
|
119
|
+
handleChange("");
|
|
120
|
+
searchRef.current && searchRef.current?.focus?.();
|
|
138
121
|
},
|
|
139
|
-
[
|
|
140
|
-
)
|
|
141
|
-
|
|
142
|
-
|
|
122
|
+
[handleChange, onClear]
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
useEventListener(
|
|
126
|
+
"keydown",
|
|
127
|
+
useCallback(
|
|
128
|
+
(e) => {
|
|
129
|
+
if (e.key === "Escape") {
|
|
130
|
+
e.preventDefault();
|
|
131
|
+
handleClear({ trigger: "Escape", event: e });
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
[handleClear]
|
|
135
|
+
),
|
|
136
|
+
wrapperRef
|
|
137
|
+
);
|
|
143
138
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
>
|
|
157
|
-
<Label
|
|
158
|
-
htmlFor={inputProps.id}
|
|
159
|
-
size={size}
|
|
160
|
-
as="label"
|
|
161
|
-
className={cl("navds-text-field__label", {
|
|
162
|
-
"navds-sr-only": hideLabel,
|
|
163
|
-
})}
|
|
139
|
+
return (
|
|
140
|
+
<div
|
|
141
|
+
ref={setWrapperRef}
|
|
142
|
+
className={cl(
|
|
143
|
+
className,
|
|
144
|
+
"navds-form-field",
|
|
145
|
+
`navds-form-field--${size}`,
|
|
146
|
+
"navds-search",
|
|
147
|
+
{
|
|
148
|
+
"navds-search--disabled": !!inputProps.disabled,
|
|
149
|
+
}
|
|
150
|
+
)}
|
|
164
151
|
>
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
className={cl("navds-text-field__description", {
|
|
152
|
+
<Label
|
|
153
|
+
htmlFor={inputProps.id}
|
|
154
|
+
size={size}
|
|
155
|
+
as="label"
|
|
156
|
+
className={cl("navds-text-field__label", {
|
|
171
157
|
"navds-sr-only": hideLabel,
|
|
172
158
|
})}
|
|
173
|
-
id={inputDescriptionId}
|
|
174
|
-
size={size}
|
|
175
159
|
>
|
|
176
|
-
{
|
|
177
|
-
</
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
{
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
className
|
|
194
|
-
"navds-search__input",
|
|
195
|
-
`navds-search__input--${variant}`,
|
|
196
|
-
"navds-text-field__input",
|
|
197
|
-
"navds-body-short",
|
|
198
|
-
`navds-body-${size}`
|
|
160
|
+
{label}
|
|
161
|
+
</Label>
|
|
162
|
+
{!!description && (
|
|
163
|
+
<BodyShort
|
|
164
|
+
as="div"
|
|
165
|
+
className={cl("navds-text-field__description", {
|
|
166
|
+
"navds-sr-only": hideLabel,
|
|
167
|
+
})}
|
|
168
|
+
id={inputDescriptionId}
|
|
169
|
+
size={size}
|
|
170
|
+
>
|
|
171
|
+
{description}
|
|
172
|
+
</BodyShort>
|
|
173
|
+
)}
|
|
174
|
+
<div className="navds-search__wrapper">
|
|
175
|
+
<div className="navds-search__wrapper-inner">
|
|
176
|
+
{variant === "simple" && (
|
|
177
|
+
<SearchIcon aria-hidden className="navds-search__search-icon" />
|
|
199
178
|
)}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
179
|
+
<input
|
|
180
|
+
ref={mergedRef}
|
|
181
|
+
{...omit(rest, ["size"])}
|
|
182
|
+
{...inputProps}
|
|
183
|
+
value={value ?? internalValue}
|
|
184
|
+
onChange={(e) => handleChange(e.target.value)}
|
|
185
|
+
type="search"
|
|
186
|
+
role="searchbox"
|
|
187
|
+
className={cl(
|
|
188
|
+
className,
|
|
189
|
+
"navds-search__input",
|
|
190
|
+
`navds-search__input--${variant}`,
|
|
191
|
+
"navds-text-field__input",
|
|
192
|
+
"navds-body-short",
|
|
193
|
+
`navds-body-${size}`
|
|
194
|
+
)}
|
|
195
|
+
/>
|
|
196
|
+
{(value ?? internalValue) && clearButton && (
|
|
197
|
+
<button
|
|
198
|
+
type="button"
|
|
199
|
+
onClick={(e) => handleClear({ trigger: "Click", event: e })}
|
|
200
|
+
className="navds-search__button-clear"
|
|
201
|
+
>
|
|
202
|
+
<span className="navds-sr-only">
|
|
203
|
+
{clearButtonLabel ? clearButtonLabel : "Tøm"}
|
|
204
|
+
</span>
|
|
205
|
+
<Close aria-hidden />
|
|
206
|
+
</button>
|
|
207
|
+
)}
|
|
208
|
+
</div>
|
|
209
|
+
<SearchContext.Provider
|
|
210
|
+
value={{
|
|
211
|
+
size,
|
|
212
|
+
disabled: inputProps.disabled,
|
|
213
|
+
variant,
|
|
214
|
+
}}
|
|
215
|
+
>
|
|
216
|
+
{children ? children : variant !== "simple" && <SearchButton />}
|
|
217
|
+
</SearchContext.Provider>
|
|
213
218
|
</div>
|
|
214
|
-
<SearchContext.Provider
|
|
215
|
-
value={{
|
|
216
|
-
size,
|
|
217
|
-
disabled: inputProps.disabled,
|
|
218
|
-
variant,
|
|
219
|
-
onSearch: () => onSearch?.(value ?? internalValue),
|
|
220
|
-
}}
|
|
221
|
-
>
|
|
222
|
-
{children ? children : variant !== "simple" && <SearchButton />}
|
|
223
|
-
</SearchContext.Provider>
|
|
224
219
|
</div>
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
) as SearchComponent;
|
|
228
223
|
|
|
229
224
|
Search.Button = SearchButton;
|
|
230
225
|
|
|
@@ -17,7 +17,7 @@ export type SearchButtonType = React.ForwardRefExoticComponent<
|
|
|
17
17
|
>;
|
|
18
18
|
|
|
19
19
|
const SearchButton: SearchButtonType = forwardRef(
|
|
20
|
-
({ className, children, disabled,
|
|
20
|
+
({ className, children, disabled, ...rest }, ref) => {
|
|
21
21
|
const context = useContext(SearchContext);
|
|
22
22
|
|
|
23
23
|
if (context === null) {
|
|
@@ -25,7 +25,7 @@ const SearchButton: SearchButtonType = forwardRef(
|
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
const { size, variant
|
|
28
|
+
const { size, variant } = context;
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
31
|
<Button
|
|
@@ -36,10 +36,6 @@ const SearchButton: SearchButtonType = forwardRef(
|
|
|
36
36
|
variant={variant === "secondary" ? "secondary" : "primary"}
|
|
37
37
|
className={cl("navds-search__button-search", className)}
|
|
38
38
|
disabled={context?.disabled ?? disabled}
|
|
39
|
-
onClick={(e) => {
|
|
40
|
-
onSearch?.();
|
|
41
|
-
onClick?.(e);
|
|
42
|
-
}}
|
|
43
39
|
>
|
|
44
40
|
<Search aria-hidden />
|
|
45
41
|
{children ? children : <span className="navds-sr-only">Søk</span>}
|
|
@@ -33,7 +33,6 @@ export const Default = (props) => {
|
|
|
33
33
|
<Search
|
|
34
34
|
value={props.controlled ? state : undefined}
|
|
35
35
|
onChange={props.controlled ? setState : null}
|
|
36
|
-
onSearch={(v) => console.log({ onSearch: v })}
|
|
37
36
|
label="Søk"
|
|
38
37
|
size={props.size}
|
|
39
38
|
clearButton={props.clearButton}
|
package/src/grid/Cell.tsx
CHANGED
|
@@ -25,7 +25,7 @@ export interface CellProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
25
25
|
lg?: Column;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
const Cell = forwardRef<HTMLDivElement, CellProps>(
|
|
28
|
+
export const Cell = forwardRef<HTMLDivElement, CellProps>(
|
|
29
29
|
({ children, xs, sm, md, lg, className, ...rest }, ref) => {
|
|
30
30
|
return (
|
|
31
31
|
<div
|
|
@@ -8,14 +8,15 @@ export interface ContentContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
const ContentContainer = forwardRef<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
export const ContentContainer = forwardRef<
|
|
12
|
+
HTMLDivElement,
|
|
13
|
+
ContentContainerProps
|
|
14
|
+
>(({ className, ...rest }, ref) => (
|
|
15
|
+
<div
|
|
16
|
+
ref={ref}
|
|
17
|
+
className={cl("navds-content-container", className)}
|
|
18
|
+
{...rest}
|
|
19
|
+
/>
|
|
20
|
+
));
|
|
20
21
|
|
|
21
22
|
export default ContentContainer;
|
package/src/grid/Grid.tsx
CHANGED
|
@@ -7,7 +7,8 @@ export interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
*/
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
export const Grid = forwardRef<HTMLDivElement, GridProps>(
|
|
11
12
|
({ children, className, ...rest }, ref) => (
|
|
12
13
|
<div ref={ref} className={cl("navds-grid", className)} {...rest}>
|
|
13
14
|
{children}
|
package/src/grid/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as Cell } from "./Cell";
|
|
2
|
-
export
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export { default as Cell, CellProps } from "./Cell";
|
|
2
|
+
export { default as Grid, GridProps } from "./Grid";
|
|
3
|
+
export {
|
|
4
|
+
default as ContentContainer,
|
|
5
|
+
ContentContainerProps,
|
|
6
|
+
} from "./ContentContainer";
|
|
@@ -18,7 +18,7 @@ export interface GuidePanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
18
18
|
poster?: boolean;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
const GuidePanel = forwardRef<HTMLDivElement, GuidePanelProps>(
|
|
21
|
+
export const GuidePanel = forwardRef<HTMLDivElement, GuidePanelProps>(
|
|
22
22
|
(
|
|
23
23
|
{ children, className, illustration, poster = false, color, ...rest },
|
|
24
24
|
ref
|
package/src/guide-panel/index.ts
CHANGED
package/src/help-text/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as HelpText } from "./HelpText";
|
|
2
|
-
export
|
|
2
|
+
export { HelpTextProps } from "./HelpText";
|
package/src/link/Link.tsx
CHANGED
package/src/link/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as Link } from "./Link";
|
|
2
|
-
export
|
|
2
|
+
export { LinkProps } from "./Link";
|
package/src/link-panel/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as LinkPanel } from "./LinkPanel";
|
|
2
|
-
export
|
|
2
|
+
export { LinkPanelProps } from "./LinkPanel";
|
package/src/loader/Loader.tsx
CHANGED
|
@@ -25,7 +25,7 @@ export interface LoaderProps extends SVGProps<SVGSVGElement> {
|
|
|
25
25
|
variant?: "neutral" | "interaction" | "inverted";
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
const Loader = forwardRef<SVGSVGElement, LoaderProps>(
|
|
28
|
+
export const Loader = forwardRef<SVGSVGElement, LoaderProps>(
|
|
29
29
|
(
|
|
30
30
|
{
|
|
31
31
|
children,
|
package/src/loader/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as Loader } from "./Loader";
|
|
2
|
-
export
|
|
2
|
+
export { LoaderProps } from "./Loader";
|
package/src/menu/Menu.tsx
CHANGED
|
@@ -35,7 +35,7 @@ export type MenuCollapseType = React.ForwardRefExoticComponent<
|
|
|
35
35
|
MenuCollapseProps & React.RefAttributes<HTMLDivElement>
|
|
36
36
|
>;
|
|
37
37
|
|
|
38
|
-
const Collapse: MenuCollapseType = forwardRef(
|
|
38
|
+
export const Collapse: MenuCollapseType = forwardRef(
|
|
39
39
|
({ children, defaultOpen = false, title, className, ...rest }, ref) => {
|
|
40
40
|
const [isOpen, setIsOpen] = useState(defaultOpen);
|
|
41
41
|
const context = useContext(NestingContext);
|
package/src/menu/MenuItem.tsx
CHANGED
package/src/modal/Modal.tsx
CHANGED
package/src/modal/index.ts
CHANGED
package/src/page-header/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as PageHeader } from "./PageHeader";
|
|
2
|
-
export
|
|
2
|
+
export { PageHeaderProps } from "./PageHeader";
|
|
@@ -3,7 +3,7 @@ import cl from "classnames";
|
|
|
3
3
|
import { Back, Next } from "@navikt/ds-icons";
|
|
4
4
|
import { BodyShort } from "..";
|
|
5
5
|
|
|
6
|
-
interface PaginationProps extends React.HTMLAttributes<HTMLElement> {
|
|
6
|
+
export interface PaginationProps extends React.HTMLAttributes<HTMLElement> {
|
|
7
7
|
/**
|
|
8
8
|
* Current page
|
|
9
9
|
*/
|
|
@@ -71,7 +71,7 @@ export const getSteps = ({
|
|
|
71
71
|
];
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
-
const Pagination = forwardRef<HTMLElement, PaginationProps>(
|
|
74
|
+
export const Pagination = forwardRef<HTMLElement, PaginationProps>(
|
|
75
75
|
(
|
|
76
76
|
{
|
|
77
77
|
page,
|
package/src/pagination/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as Pagination } from "./Pagination";
|
|
2
|
-
export
|
|
2
|
+
export { PaginationProps } from "./Pagination";
|
package/src/panel/Panel.tsx
CHANGED
|
@@ -16,7 +16,7 @@ export interface PanelProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
16
16
|
|
|
17
17
|
export type PanelType = OverridableComponent<PanelProps, HTMLElement>;
|
|
18
18
|
|
|
19
|
-
const Panel: PanelType = forwardRef(
|
|
19
|
+
export const Panel: PanelType = forwardRef(
|
|
20
20
|
(
|
|
21
21
|
{ children, className, border = false, as: Component = "div", ...rest },
|
|
22
22
|
ref
|
package/src/panel/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as Panel } from "./Panel";
|
|
2
|
-
export
|
|
2
|
+
export { PanelProps } from "./Panel";
|