@navikt/ds-react 0.18.1 → 0.18.2-alpha.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 +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/radio/useRadio.js +12 -8
- package/cjs/form/search/Search.js +4 -4
- 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 +3 -2
- 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/radio/useRadio.d.ts +1 -19
- package/esm/form/radio/useRadio.js +13 -9
- package/esm/form/radio/useRadio.js.map +1 -1
- package/esm/form/search/Search.d.ts +1 -1
- package/esm/form/search/Search.js +1 -1
- package/esm/form/search/Search.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 +2 -2
- package/esm/table/ExpandableRow.js +1 -1
- 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 -6
- 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/radio/useRadio.ts +27 -21
- package/src/form/search/Search.tsx +130 -128
- 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/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 +2 -2
- 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/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
- package/LICENCE +0 -31
package/src/stepper/index.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { default as Stepper } from "./Stepper";
|
|
2
|
-
export * from "./Stepper";
|
|
1
|
+
export { default as Stepper, StepperProps } from "./Stepper";
|
package/src/table/Body.tsx
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
2
|
import cl from "classnames";
|
|
3
3
|
|
|
4
|
-
interface BodyProps
|
|
4
|
+
export interface BodyProps
|
|
5
|
+
extends React.HTMLAttributes<HTMLTableSectionElement> {}
|
|
5
6
|
|
|
6
7
|
export interface BodyType
|
|
7
8
|
extends React.ForwardRefExoticComponent<
|
|
8
9
|
BodyProps & React.RefAttributes<HTMLTableSectionElement>
|
|
9
10
|
> {}
|
|
10
11
|
|
|
11
|
-
const Body: BodyType = forwardRef(({ className, ...rest }, ref) => (
|
|
12
|
+
export const Body: BodyType = forwardRef(({ className, ...rest }, ref) => (
|
|
12
13
|
<tbody {...rest} ref={ref} className={cl("navds-table__body", className)} />
|
|
13
14
|
));
|
|
14
15
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef, useContext } from "react";
|
|
2
2
|
import { Down, Up, UpDown } from "@navikt/ds-icons";
|
|
3
|
-
import { TableContext } from "
|
|
3
|
+
import { TableContext } from "./Table";
|
|
4
4
|
import HeaderCell, { HeaderCellProps } from "./HeaderCell";
|
|
5
5
|
|
|
6
|
-
interface ColumnHeaderProps extends HeaderCellProps {
|
|
6
|
+
export interface ColumnHeaderProps extends HeaderCellProps {
|
|
7
7
|
/**
|
|
8
8
|
* Key to sort by
|
|
9
9
|
*/
|
|
@@ -20,7 +20,7 @@ export interface ColumnHeaderType
|
|
|
20
20
|
ColumnHeaderProps & React.RefAttributes<HTMLTableCellElement>
|
|
21
21
|
> {}
|
|
22
22
|
|
|
23
|
-
const ColumnHeader: ColumnHeaderType = forwardRef(
|
|
23
|
+
export const ColumnHeader: ColumnHeaderType = forwardRef(
|
|
24
24
|
({ className, children, sortable = false, sortKey, ...rest }, ref) => {
|
|
25
25
|
const context = useContext(TableContext);
|
|
26
26
|
|
package/src/table/DataCell.tsx
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { forwardRef, useContext } from "react";
|
|
2
2
|
import cl from "classnames";
|
|
3
3
|
import { BodyShort } from "..";
|
|
4
|
-
import { TableContext } from "
|
|
4
|
+
import { TableContext } from "./Table";
|
|
5
5
|
|
|
6
|
-
interface DataCellProps
|
|
6
|
+
export interface DataCellProps
|
|
7
|
+
extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
7
8
|
/**
|
|
8
9
|
* Content alignment
|
|
9
10
|
* @default "left"
|
|
@@ -16,7 +17,7 @@ export interface DataCellType
|
|
|
16
17
|
DataCellProps & React.RefAttributes<HTMLTableCellElement>
|
|
17
18
|
> {}
|
|
18
19
|
|
|
19
|
-
const DataCell: DataCellType = forwardRef(
|
|
20
|
+
export const DataCell: DataCellType = forwardRef(
|
|
20
21
|
({ className, children = "", align, ...rest }, ref) => {
|
|
21
22
|
const context = useContext(TableContext);
|
|
22
23
|
|
|
@@ -6,7 +6,7 @@ import { UnmountClosed } from "react-collapse";
|
|
|
6
6
|
import { Expand, ExpandFilled } from "@navikt/ds-icons";
|
|
7
7
|
import { useId } from "..";
|
|
8
8
|
|
|
9
|
-
interface ExpandableRowProps extends RowProps {
|
|
9
|
+
export interface ExpandableRowProps extends RowProps {
|
|
10
10
|
/**
|
|
11
11
|
* Content of the expanded row
|
|
12
12
|
*/
|
|
@@ -42,7 +42,7 @@ export interface ExpandableRowType
|
|
|
42
42
|
ExpandableRowProps & React.RefAttributes<HTMLTableRowElement>
|
|
43
43
|
> {}
|
|
44
44
|
|
|
45
|
-
const ExpandableRow: ExpandableRowType = forwardRef(
|
|
45
|
+
export const ExpandableRow: ExpandableRowType = forwardRef(
|
|
46
46
|
(
|
|
47
47
|
{
|
|
48
48
|
className,
|
package/src/table/Header.tsx
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
2
|
import cl from "classnames";
|
|
3
3
|
|
|
4
|
-
interface HeaderProps
|
|
4
|
+
export interface HeaderProps
|
|
5
|
+
extends React.HTMLAttributes<HTMLTableSectionElement> {}
|
|
5
6
|
|
|
6
7
|
export interface HeaderType
|
|
7
8
|
extends React.ForwardRefExoticComponent<
|
|
8
9
|
HeaderProps & React.RefAttributes<HTMLTableSectionElement>
|
|
9
10
|
> {}
|
|
10
11
|
|
|
11
|
-
const Header: HeaderType = forwardRef(({ className, ...rest }, ref) => (
|
|
12
|
+
export const Header: HeaderType = forwardRef(({ className, ...rest }, ref) => (
|
|
12
13
|
<thead {...rest} ref={ref} className={cl("navds-table__header", className)} />
|
|
13
14
|
));
|
|
14
15
|
|
package/src/table/HeaderCell.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { forwardRef, useContext } from "react";
|
|
2
2
|
import cl from "classnames";
|
|
3
|
-
import { Label
|
|
3
|
+
import { Label } from "..";
|
|
4
|
+
import { TableContext } from "./Table";
|
|
4
5
|
|
|
5
6
|
export interface HeaderCellProps
|
|
6
7
|
extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
@@ -17,7 +18,7 @@ export interface HeaderCellType
|
|
|
17
18
|
HeaderCellProps & React.RefAttributes<HTMLTableCellElement>
|
|
18
19
|
> {}
|
|
19
20
|
|
|
20
|
-
const HeaderCell: HeaderCellType = forwardRef(
|
|
21
|
+
export const HeaderCell: HeaderCellType = forwardRef(
|
|
21
22
|
({ className, children, align, ...rest }, ref) => {
|
|
22
23
|
const context = useContext(TableContext);
|
|
23
24
|
|
package/src/table/Row.tsx
CHANGED
package/src/table/Table.tsx
CHANGED
package/src/table/index.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
1
|
+
export { BodyProps } from "./Body";
|
|
2
|
+
export { ColumnHeaderProps } from "./ColumnHeader";
|
|
3
|
+
export { DataCellProps } from "./DataCell";
|
|
4
|
+
export { ExpandableRowProps } from "./ExpandableRow";
|
|
5
|
+
export { HeaderProps } from "./Header";
|
|
6
|
+
export { HeaderCellProps } from "./HeaderCell";
|
|
7
|
+
export { RowProps } from "./Row";
|
|
8
|
+
export { default as Table, TableProps } from "./Table";
|
package/src/tabs/Tab.tsx
CHANGED
package/src/tabs/TabList.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import cl from "classnames";
|
|
|
5
5
|
import React, { forwardRef, useEffect, useMemo, useRef, useState } from "react";
|
|
6
6
|
import mergeRefs from "react-merge-refs";
|
|
7
7
|
|
|
8
|
-
export interface
|
|
8
|
+
export interface TabListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
9
|
/**
|
|
10
10
|
* Tab elements
|
|
11
11
|
*/
|
|
@@ -16,11 +16,11 @@ export interface ListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
16
16
|
loop?: boolean;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export type
|
|
20
|
-
|
|
19
|
+
export type TabListType = React.ForwardRefExoticComponent<
|
|
20
|
+
TabListProps & React.RefAttributes<HTMLDivElement>
|
|
21
21
|
>;
|
|
22
22
|
|
|
23
|
-
const
|
|
23
|
+
export const TabList = forwardRef<HTMLDivElement, TabListProps>(
|
|
24
24
|
({ className, ...rest }, ref) => {
|
|
25
25
|
const listRef = useRef<HTMLDivElement | null>(null);
|
|
26
26
|
const mergedRef = mergeRefs([listRef, ref]);
|
|
@@ -122,6 +122,6 @@ const List = forwardRef<HTMLDivElement, ListProps>(
|
|
|
122
122
|
</div>
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
|
-
) as
|
|
125
|
+
) as TabListType;
|
|
126
126
|
|
|
127
|
-
export default
|
|
127
|
+
export default TabList;
|
package/src/tabs/TabPanel.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { TabsContent } from "@radix-ui/react-tabs";
|
|
|
2
2
|
import cl from "classnames";
|
|
3
3
|
import React, { forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface TabPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
6
|
/**
|
|
7
7
|
* Tab panel
|
|
8
8
|
*/
|
|
@@ -13,11 +13,11 @@ export interface PanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
13
13
|
value: string;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export type
|
|
17
|
-
|
|
16
|
+
export type TabPanelType = React.ForwardRefExoticComponent<
|
|
17
|
+
TabPanelProps & React.RefAttributes<HTMLDivElement>
|
|
18
18
|
>;
|
|
19
19
|
|
|
20
|
-
const
|
|
20
|
+
const TabPanel = forwardRef<HTMLDivElement, TabPanelProps>(
|
|
21
21
|
({ className, ...rest }, ref) => (
|
|
22
22
|
<TabsContent
|
|
23
23
|
{...rest}
|
|
@@ -25,6 +25,6 @@ const Panel = forwardRef<HTMLDivElement, PanelProps>(
|
|
|
25
25
|
className={cl("navds-tabs__tabpanel", className)}
|
|
26
26
|
/>
|
|
27
27
|
)
|
|
28
|
-
) as
|
|
28
|
+
) as TabPanelType;
|
|
29
29
|
|
|
30
|
-
export default
|
|
30
|
+
export default TabPanel;
|
package/src/tabs/Tabs.tsx
CHANGED
|
@@ -2,8 +2,8 @@ import cl from "classnames";
|
|
|
2
2
|
import React, { createContext, forwardRef, HTMLAttributes } from "react";
|
|
3
3
|
import * as RadixTabs from "@radix-ui/react-tabs";
|
|
4
4
|
import Tab, { TabType } from "./Tab";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import TabList, { TabListType } from "./TabList";
|
|
6
|
+
import TabPanel, { TabPanelType } from "./TabPanel";
|
|
7
7
|
|
|
8
8
|
export interface TabsProps
|
|
9
9
|
extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "dir"> {
|
|
@@ -40,8 +40,8 @@ interface TabsComponent
|
|
|
40
40
|
TabsProps & React.RefAttributes<HTMLDivElement>
|
|
41
41
|
> {
|
|
42
42
|
Tab: TabType;
|
|
43
|
-
List:
|
|
44
|
-
Panel:
|
|
43
|
+
List: TabListType;
|
|
44
|
+
Panel: TabPanelType;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
interface TabsContextProps {
|
|
@@ -50,7 +50,7 @@ interface TabsContextProps {
|
|
|
50
50
|
|
|
51
51
|
export const TabsContext = createContext<TabsContextProps | null>(null);
|
|
52
52
|
|
|
53
|
-
const Tabs = forwardRef<HTMLDivElement, TabsProps>(
|
|
53
|
+
export const Tabs = forwardRef<HTMLDivElement, TabsProps>(
|
|
54
54
|
(
|
|
55
55
|
{
|
|
56
56
|
className,
|
|
@@ -83,7 +83,7 @@ const Tabs = forwardRef<HTMLDivElement, TabsProps>(
|
|
|
83
83
|
) as TabsComponent;
|
|
84
84
|
|
|
85
85
|
Tabs.Tab = Tab;
|
|
86
|
-
Tabs.List =
|
|
87
|
-
Tabs.Panel =
|
|
86
|
+
Tabs.List = TabList;
|
|
87
|
+
Tabs.Panel = TabPanel;
|
|
88
88
|
|
|
89
89
|
export default Tabs;
|
package/src/tabs/index.ts
CHANGED
package/src/tag/Tag.tsx
CHANGED
|
@@ -19,7 +19,7 @@ export interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
19
19
|
size?: "medium" | "small";
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
const Tag = forwardRef<HTMLSpanElement, TagProps>(
|
|
22
|
+
export const Tag = forwardRef<HTMLSpanElement, TagProps>(
|
|
23
23
|
({ className, variant, size = "medium", ...rest }, ref) => {
|
|
24
24
|
const Component = size === "medium" ? BodyShort : Detail;
|
|
25
25
|
|
package/src/tag/index.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { default as Tag } from "./Tag";
|
|
2
|
-
export * from "./Tag";
|
|
1
|
+
export { default as Tag, TagProps } from "./Tag";
|
|
@@ -53,7 +53,7 @@ export const ToggleGroupContext = createContext<ToggleContextProps | null>(
|
|
|
53
53
|
null
|
|
54
54
|
);
|
|
55
55
|
|
|
56
|
-
const ToggleGroup = forwardRef<HTMLDivElement, ToggleGroupProps>(
|
|
56
|
+
export const ToggleGroup = forwardRef<HTMLDivElement, ToggleGroupProps>(
|
|
57
57
|
(
|
|
58
58
|
{
|
|
59
59
|
className,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as ToggleGroup } from "./ToggleGroup";
|
|
2
|
-
export {
|
|
1
|
+
export { default as ToggleGroup, ToggleGroupProps } from "./ToggleGroup";
|
|
2
|
+
export { ToggleItemProps } from "./ToggleItem";
|
package/src/tooltip/Tooltip.tsx
CHANGED
package/src/tooltip/index.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { default as Tooltip } from "./Tooltip";
|
|
2
|
-
export * from "./Tooltip";
|
|
1
|
+
export { default as Tooltip, TooltipProps } from "./Tooltip";
|
|
@@ -14,7 +14,7 @@ export interface IngressProps
|
|
|
14
14
|
spacing?: boolean;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
const Ingress: OverridableComponent<
|
|
17
|
+
export const Ingress: OverridableComponent<
|
|
18
18
|
IngressProps,
|
|
19
19
|
HTMLParagraphElement
|
|
20
20
|
> = forwardRef(({ className, spacing, as: Component = "p", ...rest }, ref) => (
|
package/src/typography/Label.tsx
CHANGED
package/src/typography/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export { default as
|
|
3
|
-
export { default as
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as Label } from "./Label";
|
|
1
|
+
export { BodyLongProps, default as BodyLong } from "./BodyLong";
|
|
2
|
+
export { BodyShortProps, default as BodyShort } from "./BodyShort";
|
|
3
|
+
export { default as Detail, DetailProps } from "./Detail";
|
|
4
|
+
export { default as Heading, HeadingProps } from "./Heading";
|
|
5
|
+
export { default as Ingress, IngressProps } from "./Ingress";
|
|
6
|
+
export { default as Label, LabelProps } from "./Label";
|
package/LICENCE
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
Font License
|
|
2
|
-
|
|
3
|
-
The Source Sans Pro font files in packages/node_modules/nav-frontend-typografi-style/assets are a subset of Source Sans Pro, licensed under the SIL Open Font License, and copyright Adobe Systems Incorporated, with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
|
|
4
|
-
|
|
5
|
-
Icon License
|
|
6
|
-
|
|
7
|
-
This project uses Streamline Icons. If you use nav-frontend-moduler in your project please adhere to the Streamline Icons license agreement found here: https://streamlineicons.com/ux/extended-license.html
|
|
8
|
-
|
|
9
|
-
The rest of the codebase (excluding 3rd party dependencies):
|
|
10
|
-
|
|
11
|
-
# The MIT License
|
|
12
|
-
|
|
13
|
-
Copyright 2019 NAV (Arbeids- og velferdsdirektoratet) - The Norwegian Labour and Welfare Administration
|
|
14
|
-
|
|
15
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
16
|
-
a copy of this software and associated documentation files (the "Software"),
|
|
17
|
-
to deal in the Software without restriction, including without limitation
|
|
18
|
-
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
19
|
-
and/or sell copies of the Software, and to permit persons to whom the
|
|
20
|
-
Software is furnished to do so, subject to the following conditions:
|
|
21
|
-
|
|
22
|
-
The above copyright notice and this permission notice shall be included
|
|
23
|
-
in all copies or substantial portions of the Software.
|
|
24
|
-
|
|
25
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
26
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
27
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
28
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
29
|
-
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
30
|
-
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
31
|
-
USE OR OTHER DEALINGS IN THE SOFTWARE.
|