@navikt/ds-react 0.7.4 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/accordion/Accordion.js +10 -26
- package/cjs/accordion/AccordionContent.js +60 -0
- package/cjs/accordion/AccordionHeader.js +66 -0
- package/cjs/accordion/AccordionItem.js +62 -0
- package/cjs/accordion/index.js +6 -2
- package/cjs/accordion-menu/AccordionMenu.js +5 -1
- package/cjs/accordion-menu/AccordionMenuCollapsable.js +3 -3
- package/cjs/accordion-menu/AccordionMenuItem.js +4 -4
- package/cjs/accordion-menu/index.js +5 -5
- package/cjs/alert/Alert.js +18 -12
- package/cjs/alert/AlertContent.js +50 -0
- package/cjs/alert/AlertTitle.js +49 -0
- package/cjs/alert/index.js +6 -2
- package/cjs/button/Button.js +5 -3
- package/cjs/button/index.js +6 -2
- package/cjs/card/MicroCard.js +3 -3
- package/cjs/card/index.js +6 -2
- package/cjs/copy-to-clipboard/CopyToClipboard.js +9 -8
- package/cjs/copy-to-clipboard/index.js +6 -2
- package/cjs/form/ConfirmationPanel.js +2 -2
- package/cjs/form/ErrorMessage.js +1 -1
- package/cjs/form/Fieldset/Fieldset.js +2 -2
- package/cjs/form/Fieldset/index.js +5 -1
- package/cjs/form/Fieldset/useFieldset.js +2 -1
- package/cjs/form/Select.js +3 -3
- package/cjs/form/TextField.js +2 -2
- package/cjs/form/Textarea.js +5 -4
- package/cjs/form/checkbox/Checkbox.js +2 -2
- package/cjs/form/checkbox/CheckboxGroup.js +2 -2
- package/cjs/form/checkbox/index.js +6 -2
- package/cjs/form/checkbox/useCheckbox.js +2 -1
- package/cjs/form/error-summary/ErrorSummary.js +4 -4
- package/cjs/form/error-summary/ErrorSummaryItem.js +2 -2
- package/cjs/form/error-summary/index.js +6 -2
- package/cjs/form/index.js +9 -5
- package/cjs/form/radio/Radio.js +2 -2
- package/cjs/form/radio/RadioGroup.js +2 -2
- package/cjs/form/radio/index.js +6 -2
- package/cjs/form/radio/useRadio.js +2 -1
- package/cjs/form/search-field/SearchField.js +3 -3
- package/cjs/form/search-field/SearchFieldButton.js +2 -2
- package/cjs/form/search-field/SearchFieldClearButton.js +3 -3
- package/cjs/form/search-field/SearchFieldInput.js +2 -2
- package/cjs/form/search-field/index.js +8 -4
- package/cjs/form/useFormField.js +3 -2
- package/cjs/grid/Cell.js +2 -2
- package/cjs/{content-container → grid}/ContentContainer.js +3 -3
- package/cjs/grid/Grid.js +1 -1
- package/cjs/grid/index.js +10 -3
- package/cjs/{layouts/product-page/ProductPageSection.js → guide-panel/Guide.js} +7 -5
- package/cjs/guide-panel/GuidePanel.js +47 -0
- package/cjs/guide-panel/Illustration.js +24 -0
- package/cjs/guide-panel/index.js +19 -0
- package/cjs/guide-panel/package.json +6 -0
- package/cjs/help-text/HelpText.js +64 -0
- package/cjs/help-text/index.js +19 -0
- package/cjs/help-text/package.json +6 -0
- package/cjs/index.js +6 -6
- package/cjs/internal-header/InternalHeader.js +1 -1
- package/cjs/internal-header/InternalHeaderTitle.js +1 -1
- package/cjs/internal-header/InternalHeaderUser.js +1 -1
- package/cjs/internal-header/index.js +8 -4
- package/cjs/link/Link.js +3 -3
- package/cjs/link/index.js +6 -2
- package/cjs/link-panel/LinkPanel.js +10 -10
- package/cjs/link-panel/LinkPanelDescription.js +43 -0
- package/cjs/link-panel/LinkPanelTitle.js +42 -0
- package/cjs/link-panel/index.js +6 -2
- package/cjs/loader/Loader.js +4 -7
- package/cjs/loader/index.js +6 -2
- package/cjs/modal/Modal.js +6 -4
- package/cjs/{accordion-anchor-menu/AccordionAnchorMenu.js → modal/ModalContent.js} +5 -11
- package/cjs/modal/index.js +6 -2
- package/cjs/{header/Header.js → page-header/PageHeader.js} +10 -9
- package/cjs/page-header/index.js +19 -0
- package/cjs/page-header/package.json +6 -0
- package/cjs/panel/Panel.js +2 -2
- package/cjs/panel/index.js +6 -2
- package/cjs/popover/Popover.js +13 -4
- package/cjs/popover/PopoverContent.js +42 -0
- package/cjs/popover/index.js +6 -2
- package/cjs/speech-bubble/Bubble.js +1 -1
- package/cjs/speech-bubble/SpeechBubble.js +1 -1
- package/cjs/speech-bubble/index.js +7 -3
- package/cjs/tag/Tag.js +5 -3
- package/cjs/tag/index.js +6 -2
- package/cjs/typography/BodyLong.js +3 -3
- package/cjs/typography/BodyShort.js +3 -3
- package/cjs/typography/Detail.js +3 -3
- package/cjs/typography/{Title.js → Heading.js} +8 -8
- package/cjs/typography/Ingress.js +2 -2
- package/cjs/typography/Label.js +3 -3
- package/cjs/typography/index.js +11 -7
- package/cjs/util/index.js +3 -2
- package/cjs/util/useId.js +5 -4
- package/esm/accordion/Accordion.d.ts +11 -22
- package/esm/accordion/Accordion.js +9 -25
- package/esm/accordion/Accordion.js.map +1 -1
- package/esm/accordion/AccordionContent.d.ts +10 -0
- package/esm/accordion/AccordionContent.js +37 -0
- package/esm/accordion/AccordionContent.js.map +1 -0
- package/esm/accordion/AccordionHeader.d.ts +10 -0
- package/esm/accordion/AccordionHeader.js +43 -0
- package/esm/accordion/AccordionHeader.js.map +1 -0
- package/esm/accordion/AccordionItem.d.ts +35 -0
- package/esm/accordion/AccordionItem.js +38 -0
- package/esm/accordion/AccordionItem.js.map +1 -0
- package/esm/accordion-menu/AccordionMenu.d.ts +9 -3
- package/esm/accordion-menu/AccordionMenu.js +4 -0
- package/esm/accordion-menu/AccordionMenu.js.map +1 -1
- package/esm/accordion-menu/AccordionMenuCollapsable.d.ts +3 -2
- package/esm/accordion-menu/AccordionMenuCollapsable.js +2 -2
- package/esm/accordion-menu/AccordionMenuCollapsable.js.map +1 -1
- package/esm/accordion-menu/AccordionMenuItem.d.ts +11 -10
- package/esm/accordion-menu/AccordionMenuItem.js +3 -3
- package/esm/accordion-menu/AccordionMenuItem.js.map +1 -1
- package/esm/accordion-menu/index.d.ts +3 -3
- package/esm/accordion-menu/index.js +0 -2
- package/esm/accordion-menu/index.js.map +1 -1
- package/esm/alert/Alert.d.ts +26 -4
- package/esm/alert/Alert.js +17 -12
- package/esm/alert/Alert.js.map +1 -1
- package/esm/alert/AlertContent.d.ts +10 -0
- package/esm/alert/AlertContent.js +27 -0
- package/esm/alert/AlertContent.js.map +1 -0
- package/esm/alert/AlertTitle.d.ts +10 -0
- package/esm/alert/AlertTitle.js +26 -0
- package/esm/alert/AlertTitle.js.map +1 -0
- package/esm/button/Button.d.ts +5 -4
- package/esm/button/Button.js +4 -2
- package/esm/button/Button.js.map +1 -1
- package/esm/card/MicroCard.d.ts +7 -7
- package/esm/card/MicroCard.js +2 -2
- package/esm/card/MicroCard.js.map +1 -1
- package/esm/copy-to-clipboard/CopyToClipboard.d.ts +9 -7
- package/esm/copy-to-clipboard/CopyToClipboard.js +10 -9
- package/esm/copy-to-clipboard/CopyToClipboard.js.map +1 -1
- package/esm/form/ConfirmationPanel.js +1 -1
- package/esm/form/ConfirmationPanel.js.map +1 -1
- package/esm/form/ErrorMessage.d.ts +1 -0
- package/esm/form/ErrorMessage.js +1 -1
- package/esm/form/ErrorMessage.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/useFieldset.d.ts +1 -1
- package/esm/form/Select.js +2 -2
- package/esm/form/Select.js.map +1 -1
- package/esm/form/TextField.js +1 -1
- package/esm/form/TextField.js.map +1 -1
- package/esm/form/Textarea.js +2 -2
- package/esm/form/Textarea.js.map +1 -1
- package/esm/form/checkbox/Checkbox.js +1 -1
- package/esm/form/checkbox/Checkbox.js.map +1 -1
- package/esm/form/checkbox/CheckboxGroup.js +1 -1
- package/esm/form/checkbox/CheckboxGroup.js.map +1 -1
- package/esm/form/checkbox/useCheckbox.d.ts +1 -1
- package/esm/form/checkbox/useCheckbox.js +2 -1
- package/esm/form/checkbox/useCheckbox.js.map +1 -1
- package/esm/form/error-summary/ErrorSummary.d.ts +2 -2
- package/esm/form/error-summary/ErrorSummary.js +4 -4
- package/esm/form/error-summary/ErrorSummary.js.map +1 -1
- package/esm/form/error-summary/ErrorSummaryItem.d.ts +6 -9
- 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 +1 -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/radio/useRadio.js.map +1 -1
- package/esm/form/search-field/SearchField.d.ts +1 -1
- package/esm/form/search-field/SearchField.js +2 -2
- package/esm/form/search-field/SearchField.js.map +1 -1
- package/esm/form/search-field/SearchFieldButton.d.ts +2 -2
- package/esm/form/search-field/SearchFieldButton.js +1 -1
- package/esm/form/search-field/SearchFieldButton.js.map +1 -1
- package/esm/form/search-field/SearchFieldClearButton.d.ts +2 -2
- package/esm/form/search-field/SearchFieldClearButton.js +2 -2
- package/esm/form/search-field/SearchFieldClearButton.js.map +1 -1
- package/esm/form/search-field/SearchFieldInput.js +1 -1
- package/esm/form/search-field/SearchFieldInput.js.map +1 -1
- package/esm/form/useFormField.d.ts +2 -2
- 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/{content-container → grid}/ContentContainer.d.ts +1 -1
- package/esm/{content-container → grid}/ContentContainer.js +2 -2
- package/esm/grid/ContentContainer.js.map +1 -0
- package/esm/grid/index.d.ts +2 -0
- package/esm/grid/index.js +2 -0
- package/esm/grid/index.js.map +1 -1
- package/esm/guide-panel/Guide.d.ts +14 -0
- package/esm/guide-panel/Guide.js +21 -0
- package/esm/guide-panel/Guide.js.map +1 -0
- package/esm/guide-panel/GuidePanel.d.ts +18 -0
- package/esm/guide-panel/GuidePanel.js +24 -0
- package/esm/guide-panel/GuidePanel.js.map +1 -0
- package/esm/guide-panel/Illustration.d.ts +2 -0
- package/esm/guide-panel/Illustration.js +18 -0
- package/esm/guide-panel/Illustration.js.map +1 -0
- package/esm/guide-panel/index.d.ts +3 -0
- package/esm/guide-panel/index.js +3 -0
- package/esm/guide-panel/index.js.map +1 -0
- package/esm/help-text/HelpText.d.ts +15 -0
- package/esm/help-text/HelpText.js +41 -0
- package/esm/help-text/HelpText.js.map +1 -0
- package/esm/help-text/index.d.ts +2 -0
- package/esm/help-text/index.js +3 -0
- package/esm/help-text/index.js.map +1 -0
- package/esm/index.d.ts +4 -5
- package/esm/index.js +5 -5
- package/esm/index.js.map +1 -1
- package/esm/link/Link.d.ts +2 -5
- package/esm/link/Link.js +2 -2
- package/esm/link/Link.js.map +1 -1
- package/esm/link-panel/LinkPanel.d.ts +16 -21
- package/esm/link-panel/LinkPanel.js +9 -8
- package/esm/link-panel/LinkPanel.js.map +1 -1
- package/esm/link-panel/LinkPanelDescription.d.ts +7 -0
- package/esm/link-panel/LinkPanelDescription.js +19 -0
- package/esm/link-panel/LinkPanelDescription.js.map +1 -0
- package/esm/link-panel/LinkPanelTitle.d.ts +8 -0
- package/esm/link-panel/LinkPanelTitle.js +18 -0
- package/esm/link-panel/LinkPanelTitle.js.map +1 -0
- package/esm/loader/Loader.d.ts +3 -3
- package/esm/loader/Loader.js +3 -6
- package/esm/loader/Loader.js.map +1 -1
- package/esm/modal/Modal.d.ts +6 -6
- package/esm/modal/Modal.js +5 -3
- package/esm/modal/Modal.js.map +1 -1
- package/esm/modal/ModalContent.d.ts +10 -0
- package/esm/modal/ModalContent.js +19 -0
- package/esm/modal/ModalContent.js.map +1 -0
- package/esm/modal/index.d.ts +1 -0
- package/esm/modal/index.js.map +1 -1
- package/esm/page-header/PageHeader.d.ts +27 -0
- package/esm/page-header/PageHeader.js +24 -0
- package/esm/page-header/PageHeader.js.map +1 -0
- package/esm/page-header/index.d.ts +2 -0
- package/esm/page-header/index.js +3 -0
- package/esm/page-header/index.js.map +1 -0
- package/esm/panel/Panel.d.ts +12 -15
- package/esm/panel/Panel.js +1 -1
- package/esm/panel/Panel.js.map +1 -1
- package/esm/popover/Popover.d.ts +13 -8
- package/esm/popover/Popover.js +12 -3
- package/esm/popover/Popover.js.map +1 -1
- package/esm/popover/PopoverContent.d.ts +10 -0
- package/esm/popover/PopoverContent.js +19 -0
- package/esm/popover/PopoverContent.js.map +1 -0
- package/esm/popover/index.d.ts +1 -0
- package/esm/speech-bubble/Bubble.d.ts +1 -1
- package/esm/tag/Tag.d.ts +7 -1
- package/esm/tag/Tag.js +4 -2
- package/esm/tag/Tag.js.map +1 -1
- package/esm/typography/BodyLong.d.ts +16 -19
- package/esm/typography/BodyLong.js +2 -2
- package/esm/typography/BodyLong.js.map +1 -1
- package/esm/typography/BodyShort.d.ts +16 -19
- package/esm/typography/BodyShort.js +2 -2
- package/esm/typography/BodyShort.js.map +1 -1
- package/esm/typography/Detail.d.ts +16 -19
- package/esm/typography/Detail.js +2 -2
- package/esm/typography/Detail.js.map +1 -1
- package/esm/typography/Heading.d.ts +24 -0
- package/esm/typography/{Title.js → Heading.js} +8 -8
- package/esm/typography/Heading.js.map +1 -0
- package/esm/typography/Ingress.d.ts +11 -14
- package/esm/typography/Ingress.js +1 -1
- package/esm/typography/Ingress.js.map +1 -1
- package/esm/typography/Label.d.ts +16 -19
- package/esm/typography/Label.js +2 -2
- package/esm/typography/Label.js.map +1 -1
- package/esm/typography/index.d.ts +1 -1
- package/esm/typography/index.js +1 -1
- package/esm/typography/index.js.map +1 -1
- package/esm/util/OverridableComponent.d.ts +6 -25
- package/esm/util/OverridableComponent.js +1 -0
- package/esm/util/useId.d.ts +2 -0
- package/esm/util/useId.js +1 -1
- package/esm/util/useId.js.map +1 -1
- package/package.json +6 -3
- package/src/accordion/Accordion.tsx +23 -98
- package/src/accordion/AccordionContent.tsx +59 -0
- package/src/accordion/AccordionHeader.tsx +84 -0
- package/src/accordion/AccordionItem.tsx +93 -0
- package/src/accordion/stories/accordion.stories.mdx +55 -16
- package/src/accordion/stories/accordion.stories.tsx +76 -43
- package/src/accordion-menu/AccordionMenu.tsx +18 -3
- package/src/accordion-menu/AccordionMenuCollapsable.tsx +32 -29
- package/src/accordion-menu/AccordionMenuItem.tsx +17 -18
- package/src/accordion-menu/index.ts +3 -6
- package/src/accordion-menu/stories/accordion-menu.stories.mdx +34 -38
- package/src/accordion-menu/stories/accordion-menu.stories.tsx +60 -79
- package/src/alert/Alert.tsx +66 -43
- package/src/alert/AlertContent.tsx +41 -0
- package/src/alert/AlertTitle.tsx +41 -0
- package/src/alert/stories/alert.stories.mdx +48 -7
- package/src/alert/stories/alert.stories.tsx +95 -11
- package/src/button/Button.tsx +24 -11
- package/src/button/stories/button.stories.mdx +13 -14
- package/src/button/stories/button.stories.tsx +28 -17
- package/src/card/MicroCard.tsx +25 -23
- package/src/copy-to-clipboard/CopyToClipboard.tsx +34 -30
- package/src/copy-to-clipboard/stories/copy-to-clipboard.stories.tsx +9 -10
- package/src/copy-to-clipboard/stories/copy.stories.mdx +24 -14
- package/src/form/ConfirmationPanel.tsx +1 -1
- package/src/form/ErrorMessage.tsx +2 -2
- package/src/form/Fieldset/Fieldset.tsx +2 -2
- package/src/form/Select.tsx +2 -2
- package/src/form/TextField.tsx +1 -1
- package/src/form/Textarea.tsx +2 -2
- package/src/form/checkbox/Checkbox.tsx +1 -1
- package/src/form/checkbox/CheckboxGroup.tsx +1 -1
- package/src/form/checkbox/stories/checkbox.stories.mdx +7 -3
- package/src/form/checkbox/stories/checkbox.stories.tsx +1 -1
- package/src/form/error-summary/ErrorSummary.tsx +18 -17
- package/src/form/error-summary/ErrorSummaryItem.tsx +11 -11
- package/src/form/error-summary/stories/error-summary.stories.tsx +2 -2
- package/src/form/radio/Radio.tsx +1 -1
- package/src/form/radio/RadioGroup.tsx +1 -1
- package/src/form/radio/stories/radio.stories.mdx +11 -3
- package/src/form/radio/stories/radio.stories.tsx +1 -1
- package/src/form/search-field/SearchField.tsx +3 -3
- package/src/form/search-field/SearchFieldButton.tsx +3 -3
- package/src/form/search-field/SearchFieldClearButton.tsx +5 -5
- package/src/form/search-field/SearchFieldInput.tsx +3 -2
- package/src/form/search-field/stories/search-field-example.tsx +9 -10
- package/src/form/search-field/stories/search-field.stories.mdx +23 -68
- package/src/form/search-field/stories/search-field.stories.tsx +48 -15
- package/src/form/stories/confirmation-panel.stories.mdx +2 -2
- package/src/form/stories/confirmation-panel.stories.tsx +3 -3
- package/src/form/stories/fieldset.stories.mdx +2 -2
- package/src/form/stories/fieldset.stories.tsx +1 -1
- package/src/form/stories/live-examples.tsx +2 -2
- package/src/form/stories/select.stories.mdx +2 -2
- package/src/form/stories/select.stories.tsx +1 -1
- package/src/form/stories/text-field.stories.mdx +2 -2
- package/src/form/stories/text-field.stories.tsx +1 -1
- package/src/form/stories/textarea.stories.mdx +2 -2
- package/src/form/stories/textarea.stories.tsx +1 -1
- package/src/form/useFormField.ts +2 -2
- package/src/grid/Cell.tsx +1 -1
- package/src/{content-container → grid}/ContentContainer.tsx +3 -5
- package/src/grid/index.ts +2 -0
- package/src/grid/stories/grid.stories.mdx +24 -5
- package/src/grid/stories/grid.stories.tsx +10 -2
- package/src/grid/stories/styles.css +16 -0
- package/src/guide-panel/Guide.tsx +34 -0
- package/src/guide-panel/GuidePanel.tsx +39 -0
- package/src/guide-panel/Illustration.tsx +99 -0
- package/src/guide-panel/index.ts +3 -0
- package/src/guide-panel/stories/example.css +13 -0
- package/src/guide-panel/stories/guidepanel.stories.mdx +81 -0
- package/src/guide-panel/stories/guidepanel.stories.tsx +68 -0
- package/src/help-text/HelpText.tsx +78 -0
- package/src/help-text/index.ts +2 -0
- package/src/help-text/stories/help-text.stories.mdx +35 -0
- package/src/help-text/stories/help-text.stories.tsx +32 -0
- package/src/index.ts +6 -5
- package/src/link/Link.tsx +7 -18
- package/src/link/stories/link.stories.tsx +30 -3
- package/src/link-panel/LinkPanel.tsx +32 -44
- package/src/link-panel/LinkPanelDescription.tsx +23 -0
- package/src/link-panel/LinkPanelTitle.tsx +27 -0
- package/src/link-panel/stories/link-panel.stories.mdx +52 -23
- package/src/link-panel/stories/link-panel.stories.tsx +43 -34
- package/src/loader/Loader.tsx +13 -10
- package/src/loader/stories/loader.stories.mdx +27 -28
- package/src/loader/stories/loader.stories.tsx +31 -91
- package/src/modal/Modal.tsx +16 -14
- package/src/modal/ModalContent.tsx +26 -0
- package/src/modal/index.ts +1 -0
- package/src/modal/stories/modal.stories.mdx +10 -1
- package/src/modal/stories/modal.stories.tsx +20 -23
- package/src/page-header/PageHeader.tsx +76 -0
- package/src/page-header/index.ts +2 -0
- package/src/{header → page-header}/stories/header.stories.mdx +31 -24
- package/src/{header → page-header}/stories/header.stories.tsx +27 -27
- package/src/{header → page-header}/stories/pictogram.tsx +0 -0
- package/src/panel/Panel.tsx +14 -23
- package/src/popover/Popover.tsx +29 -11
- package/src/popover/PopoverContent.tsx +26 -0
- package/src/popover/index.ts +1 -0
- package/src/popover/stories/popover.stories.tsx +6 -8
- package/src/speech-bubble/Bubble.tsx +1 -1
- package/src/tag/Tag.tsx +18 -10
- package/src/tag/stories/tag.stories.mdx +24 -0
- package/src/tag/stories/tag.stories.tsx +13 -0
- package/src/typography/BodyLong.tsx +22 -21
- package/src/typography/BodyShort.tsx +22 -21
- package/src/typography/Detail.tsx +22 -21
- package/src/typography/Heading.tsx +45 -0
- package/src/typography/Ingress.tsx +23 -24
- package/src/typography/Label.tsx +21 -21
- package/src/typography/index.ts +1 -1
- package/src/typography/stories/typography.stories.tsx +18 -23
- package/src/util/OverridableComponent.ts +7 -44
- package/src/util/useId.ts +1 -1
- package/cjs/accordion-anchor-menu/AccordionAnchorMenuCollapsable.js +0 -4
- package/cjs/accordion-anchor-menu/AccordionAnchorMenuItem.js +0 -44
- package/cjs/accordion-anchor-menu/ActiveAnchorStore.js +0 -68
- package/cjs/accordion-anchor-menu/index.js +0 -8
- package/cjs/accordion-anchor-menu/package.json +0 -6
- package/cjs/content-container/index.js +0 -15
- package/cjs/content-container/package.json +0 -6
- package/cjs/header/index.js +0 -15
- package/cjs/header/package.json +0 -6
- package/cjs/layouts/index.js +0 -8
- package/cjs/layouts/package.json +0 -6
- package/cjs/layouts/product-page/ProductPageLayout.js +0 -62
- package/cjs/layouts/product-page/ProductPagePanel.js +0 -63
- package/esm/accordion-anchor-menu/AccordionAnchorMenu.d.ts +0 -7
- package/esm/accordion-anchor-menu/AccordionAnchorMenu.js +0 -25
- package/esm/accordion-anchor-menu/AccordionAnchorMenu.js.map +0 -1
- package/esm/accordion-anchor-menu/AccordionAnchorMenuCollapsable.d.ts +0 -1
- package/esm/accordion-anchor-menu/AccordionAnchorMenuCollapsable.js +0 -2
- package/esm/accordion-anchor-menu/AccordionAnchorMenuCollapsable.js.map +0 -1
- package/esm/accordion-anchor-menu/AccordionAnchorMenuItem.d.ts +0 -3
- package/esm/accordion-anchor-menu/AccordionAnchorMenuItem.js +0 -24
- package/esm/accordion-anchor-menu/AccordionAnchorMenuItem.js.map +0 -1
- package/esm/accordion-anchor-menu/ActiveAnchorStore.d.ts +0 -11
- package/esm/accordion-anchor-menu/ActiveAnchorStore.js +0 -47
- package/esm/accordion-anchor-menu/ActiveAnchorStore.js.map +0 -1
- package/esm/accordion-anchor-menu/index.d.ts +0 -3
- package/esm/accordion-anchor-menu/index.js +0 -4
- package/esm/accordion-anchor-menu/index.js.map +0 -1
- package/esm/content-container/ContentContainer.js.map +0 -1
- package/esm/content-container/index.d.ts +0 -2
- package/esm/content-container/index.js +0 -3
- package/esm/content-container/index.js.map +0 -1
- package/esm/header/Header.d.ts +0 -27
- package/esm/header/Header.js +0 -23
- package/esm/header/Header.js.map +0 -1
- package/esm/header/index.d.ts +0 -2
- package/esm/header/index.js +0 -3
- package/esm/header/index.js.map +0 -1
- package/esm/layouts/index.d.ts +0 -3
- package/esm/layouts/index.js +0 -4
- package/esm/layouts/index.js.map +0 -1
- package/esm/layouts/product-page/ProductPageLayout.d.ts +0 -7
- package/esm/layouts/product-page/ProductPageLayout.js +0 -39
- package/esm/layouts/product-page/ProductPageLayout.js.map +0 -1
- package/esm/layouts/product-page/ProductPagePanel.d.ts +0 -12
- package/esm/layouts/product-page/ProductPagePanel.js +0 -40
- package/esm/layouts/product-page/ProductPagePanel.js.map +0 -1
- package/esm/layouts/product-page/ProductPageSection.d.ts +0 -10
- package/esm/layouts/product-page/ProductPageSection.js +0 -19
- package/esm/layouts/product-page/ProductPageSection.js.map +0 -1
- package/esm/typography/Title.d.ts +0 -25
- package/esm/typography/Title.js.map +0 -1
- package/src/accordion-anchor-menu/AccordionAnchorMenu.tsx +0 -35
- package/src/accordion-anchor-menu/AccordionAnchorMenuCollapsable.tsx +0 -1
- package/src/accordion-anchor-menu/AccordionAnchorMenuItem.tsx +0 -39
- package/src/accordion-anchor-menu/ActiveAnchorStore.tsx +0 -73
- package/src/accordion-anchor-menu/index.ts +0 -3
- package/src/accordion-anchor-menu/stories/menu.stories.mdx +0 -14
- package/src/accordion-anchor-menu/stories/menu.stories.tsx +0 -125
- package/src/content-container/index.ts +0 -2
- package/src/content-container/stories/container.stories.mdx +0 -31
- package/src/content-container/stories/container.stories.tsx +0 -33
- package/src/content-container/stories/style.css +0 -15
- package/src/form/stories/error-uu.stories.tsx +0 -75
- package/src/header/Header.tsx +0 -69
- package/src/header/index.ts +0 -2
- package/src/layouts/index.ts +0 -3
- package/src/layouts/product-page/ProductPageLayout.tsx +0 -60
- package/src/layouts/product-page/ProductPagePanel.tsx +0 -72
- package/src/layouts/product-page/ProductPageSection.tsx +0 -46
- package/src/layouts/stories/components/sections/Left.tsx +0 -22
- package/src/layouts/stories/components/sections/Main.tsx +0 -133
- package/src/layouts/stories/components/sections/Right.tsx +0 -8
- package/src/layouts/stories/components/styles.css +0 -12
- package/src/layouts/stories/layout.stories.mdx +0 -8
- package/src/layouts/stories/product-page-layout.stories.tsx +0 -90
- package/src/loader/stories/demo.css +0 -18
- package/src/typography/Title.tsx +0 -56
package/src/typography/Label.tsx
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
2
|
import cl from "classnames";
|
|
3
|
-
import { OverridableComponent } from "
|
|
3
|
+
import { OverridableComponent } from "..";
|
|
4
4
|
|
|
5
|
-
export interface LabelProps {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
spacing?: boolean;
|
|
20
|
-
} & React.HTMLAttributes<HTMLParagraphElement>;
|
|
21
|
-
defaultComponent: "p";
|
|
5
|
+
export interface LabelProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
6
|
+
/**
|
|
7
|
+
* medium: 18px, small: 16px
|
|
8
|
+
* @default "medium"
|
|
9
|
+
*/
|
|
10
|
+
size?: "medium" | "small";
|
|
11
|
+
/**
|
|
12
|
+
* Paragraph text
|
|
13
|
+
*/
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Adds margins to typo
|
|
17
|
+
*/
|
|
18
|
+
spacing?: boolean;
|
|
22
19
|
}
|
|
23
20
|
|
|
24
|
-
const Label: OverridableComponent<
|
|
21
|
+
const Label: OverridableComponent<
|
|
22
|
+
LabelProps,
|
|
23
|
+
HTMLParagraphElement
|
|
24
|
+
> = forwardRef(
|
|
25
25
|
(
|
|
26
|
-
{ className, size = "
|
|
26
|
+
{ className, size = "medium", spacing, as: Component = "p", ...rest },
|
|
27
27
|
ref
|
|
28
28
|
) => (
|
|
29
29
|
<Component
|
|
30
30
|
{...rest}
|
|
31
31
|
ref={ref}
|
|
32
32
|
className={cl(className, "navds-label", {
|
|
33
|
-
"navds-label--
|
|
33
|
+
"navds-label--small": size === "small",
|
|
34
34
|
"navds-typo--spacing": !!spacing,
|
|
35
35
|
})}
|
|
36
36
|
/>
|
package/src/typography/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Heading, BodyShort, BodyLong, Detail, Ingress, Label } from "../index";
|
|
3
3
|
import "./index.css";
|
|
4
4
|
|
|
5
5
|
export default {
|
|
@@ -7,21 +7,16 @@ export default {
|
|
|
7
7
|
component: BodyLong,
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
const lorem = () =>
|
|
11
|
-
<>
|
|
12
|
-
Veniam consequat cillum pariatur officia duis aute labore anim labore.
|
|
13
|
-
Pariatur ad duis do nulla.
|
|
14
|
-
</>
|
|
15
|
-
);
|
|
10
|
+
const lorem = () => <>Veniam consequat cillum pariatur officia duis</>;
|
|
16
11
|
|
|
17
12
|
const TitleTemplate = ({ level, size, spacing }) => (
|
|
18
|
-
<
|
|
13
|
+
<Heading spacing={spacing} size={size} level={level}>
|
|
19
14
|
{lorem()}
|
|
20
|
-
</
|
|
15
|
+
</Heading>
|
|
21
16
|
);
|
|
22
17
|
|
|
23
|
-
export const
|
|
24
|
-
|
|
18
|
+
export const HeadingStory = TitleTemplate.bind({});
|
|
19
|
+
HeadingStory.args = { level: 1, size: "2xlarge", spacing: false };
|
|
25
20
|
|
|
26
21
|
const IngressTemplate = ({ spacing }) => (
|
|
27
22
|
<Ingress spacing={spacing}>{lorem()}</Ingress>
|
|
@@ -37,7 +32,7 @@ const BodyLongTemplate = ({ spacing, size }) => (
|
|
|
37
32
|
);
|
|
38
33
|
|
|
39
34
|
export const BodyLongStory = BodyLongTemplate.bind({});
|
|
40
|
-
BodyLongStory.args = { spacing: false, size: "
|
|
35
|
+
BodyLongStory.args = { spacing: false, size: "medium" };
|
|
41
36
|
|
|
42
37
|
const BodyShortTemplate = ({ spacing, size }) => (
|
|
43
38
|
<BodyShort size={size} spacing={spacing}>
|
|
@@ -46,7 +41,7 @@ const BodyShortTemplate = ({ spacing, size }) => (
|
|
|
46
41
|
);
|
|
47
42
|
|
|
48
43
|
export const BodyShortStory = BodyShortTemplate.bind({});
|
|
49
|
-
BodyShortStory.args = { spacing: false, size: "
|
|
44
|
+
BodyShortStory.args = { spacing: false, size: "medium" };
|
|
50
45
|
|
|
51
46
|
const LabelTemplate = ({ spacing, size }) => (
|
|
52
47
|
<Label size={size} spacing={spacing}>
|
|
@@ -55,7 +50,7 @@ const LabelTemplate = ({ spacing, size }) => (
|
|
|
55
50
|
);
|
|
56
51
|
|
|
57
52
|
export const LabelStory = LabelTemplate.bind({});
|
|
58
|
-
LabelStory.args = { spacing: false, size: "
|
|
53
|
+
LabelStory.args = { spacing: false, size: "medium" };
|
|
59
54
|
|
|
60
55
|
const DetailTemplate = ({ spacing, size }) => (
|
|
61
56
|
<Detail size={size} spacing={spacing}>
|
|
@@ -64,14 +59,14 @@ const DetailTemplate = ({ spacing, size }) => (
|
|
|
64
59
|
);
|
|
65
60
|
|
|
66
61
|
export const DetailStory = DetailTemplate.bind({});
|
|
67
|
-
DetailStory.args = { spacing: false, size: "
|
|
62
|
+
DetailStory.args = { spacing: false, size: "medium" };
|
|
68
63
|
|
|
69
64
|
export const SideInnholdEksempel = () => {
|
|
70
65
|
return (
|
|
71
66
|
<div style={{ maxWidth: 600 }}>
|
|
72
|
-
<
|
|
73
|
-
Title lvl 1
|
|
74
|
-
</
|
|
67
|
+
<Heading level={"1"} size="2xlarge" spacing>
|
|
68
|
+
Title lvl 1 2xlarge
|
|
69
|
+
</Heading>
|
|
75
70
|
<BodyLong spacing>
|
|
76
71
|
BodyLong: Aliqua ad et nisi commodo sit excepteur in commodo proident
|
|
77
72
|
proident. Nostrud consectetur dolore eu nostrud aliqua. Adipisicing
|
|
@@ -91,9 +86,9 @@ export const SideInnholdEksempel = () => {
|
|
|
91
86
|
BodyLong: Dolore commodo ad veniam commodo aute voluptate est officia
|
|
92
87
|
sunt proident irure consectetur excepteur.
|
|
93
88
|
</BodyLong>
|
|
94
|
-
<
|
|
95
|
-
Title lvl 2
|
|
96
|
-
</
|
|
89
|
+
<Heading level={"2"} size="xlarge" spacing>
|
|
90
|
+
Title lvl 2 xlarge
|
|
91
|
+
</Heading>
|
|
97
92
|
<Ingress spacing>
|
|
98
93
|
Ingress: Mollit incididunt incididunt officia amet est et non aliqua
|
|
99
94
|
officia nulla et aute aliqua culpa.
|
|
@@ -109,7 +104,7 @@ export const SideInnholdEksempel = () => {
|
|
|
109
104
|
adipisicing ut incididunt laborum laborum. Ipsum non amet laboris quis
|
|
110
105
|
Lorem est laborum qui pariatur ex eu. Eiusmod proident amet esse ex.
|
|
111
106
|
</BodyLong>
|
|
112
|
-
<BodyLong size="
|
|
107
|
+
<BodyLong size="small" spacing>
|
|
113
108
|
BodyLong small: Irure dolore laborum amet occaecat ex laboris mollit
|
|
114
109
|
reprehenderit nisi laborum voluptate laborum. Ipsum eu sint laborum
|
|
115
110
|
adipisicing ut incididunt laborum laborum. Ipsum non amet laboris quis
|
|
@@ -119,7 +114,7 @@ export const SideInnholdEksempel = () => {
|
|
|
119
114
|
BodyShort: Id consectetur velit sunt laboris consequat ullamco
|
|
120
115
|
incididunt.
|
|
121
116
|
</BodyShort>
|
|
122
|
-
<BodyShort size="
|
|
117
|
+
<BodyShort size="small" spacing>
|
|
123
118
|
BodyShort small: Sunt amet officia sit excepteur sit pariatur sit
|
|
124
119
|
reprehenderit irure ipsum.
|
|
125
120
|
</BodyShort>
|
|
@@ -1,47 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
export interface OverridableComponent<Component, Element extends HTMLElement> {
|
|
2
|
+
(props: Component & React.RefAttributes<Element>): ReturnType<React.FC>;
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
* A component whose root component can be controlled via a `component` prop.
|
|
5
|
-
*/
|
|
6
|
-
export interface OverridableComponent<M extends OverridableTypeMap> {
|
|
7
|
-
(props: DefaultComponentProps<M>): React.ReactElement | null;
|
|
8
|
-
|
|
9
|
-
<C extends React.ElementType>(
|
|
4
|
+
<As extends React.ElementType>(
|
|
10
5
|
props: {
|
|
11
|
-
|
|
12
|
-
} &
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Props of the component if `component={Component}` is used.
|
|
18
|
-
*/
|
|
19
|
-
// prettier-ignore
|
|
20
|
-
export type OverrideProps<
|
|
21
|
-
M extends OverridableTypeMap,
|
|
22
|
-
C extends React.ElementType
|
|
23
|
-
> = (
|
|
24
|
-
& BaseProps<M>
|
|
25
|
-
& Omit<React.ComponentPropsWithRef<C>, keyof BaseProps<M>>
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Props if `component={Component}` is NOT used.
|
|
30
|
-
*/
|
|
31
|
-
// prettier-ignore
|
|
32
|
-
export type DefaultComponentProps<
|
|
33
|
-
M extends OverridableTypeMap
|
|
34
|
-
> = (
|
|
35
|
-
& BaseProps<M>
|
|
36
|
-
& Omit<React.ComponentPropsWithRef<M['defaultComponent']>, keyof BaseProps<M>>
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Props defined on the component.
|
|
41
|
-
*/
|
|
42
|
-
export type BaseProps<M extends OverridableTypeMap> = M["props"];
|
|
43
|
-
|
|
44
|
-
export interface OverridableTypeMap {
|
|
45
|
-
props: {};
|
|
46
|
-
defaultComponent: React.ElementType;
|
|
6
|
+
as: As;
|
|
7
|
+
} & Component &
|
|
8
|
+
Omit<React.ComponentPropsWithRef<As>, keyof Component>
|
|
9
|
+
): ReturnType<React.FC>;
|
|
47
10
|
}
|
package/src/util/useId.ts
CHANGED
|
@@ -9,7 +9,7 @@ const canUseDOM = (): boolean => {
|
|
|
9
9
|
);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
const useClientLayoutEffect = canUseDOM() ? useLayoutEffect : () => {};
|
|
12
|
+
export const useClientLayoutEffect = canUseDOM() ? useLayoutEffect : () => {};
|
|
13
13
|
|
|
14
14
|
export const useId: (id?: string) => string = (id) => {
|
|
15
15
|
const [newId, setNewId] = useState<string | undefined>(undefined);
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var accordion_menu_1 = require("../accordion-menu");
|
|
4
|
-
Object.defineProperty(exports, "AccordionAnchorMenuCollapsable", { enumerable: true, get: function () { return accordion_menu_1.AccordionMenuCollapsable; } });
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const react_1 = __importStar(require("react"));
|
|
23
|
-
const accordion_menu_1 = require("../accordion-menu");
|
|
24
|
-
const ActiveAnchorStore_1 = require("./ActiveAnchorStore");
|
|
25
|
-
const AccordionAnchorMenuItem = react_1.forwardRef((props, ref) => {
|
|
26
|
-
const isAnchorActive = useIsAnchorActive(props.href && props.href.split("#")[1]);
|
|
27
|
-
return (react_1.default.createElement(accordion_menu_1.AccordionMenuItem, Object.assign({}, props, { ref: ref, active: props.active || isAnchorActive })));
|
|
28
|
-
});
|
|
29
|
-
const useIsAnchorActive = (anchor) => {
|
|
30
|
-
const { activeAnchor, registerAnchor, unregisterAnchor } = ActiveAnchorStore_1.useStore();
|
|
31
|
-
react_1.useEffect(() => {
|
|
32
|
-
if (anchor) {
|
|
33
|
-
const target = document.getElementById(anchor);
|
|
34
|
-
if (target) {
|
|
35
|
-
registerAnchor(anchor);
|
|
36
|
-
return () => {
|
|
37
|
-
unregisterAnchor(anchor);
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}, [anchor, registerAnchor, unregisterAnchor]);
|
|
42
|
-
return (anchor && activeAnchor === anchor) || false;
|
|
43
|
-
};
|
|
44
|
-
exports.default = AccordionAnchorMenuItem;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.useStore = exports.ActiveAnchorProvider = exports.ActiveAnchorContext = void 0;
|
|
23
|
-
const react_1 = __importStar(require("react"));
|
|
24
|
-
exports.ActiveAnchorContext = react_1.createContext({});
|
|
25
|
-
exports.ActiveAnchorProvider = ({ children, }) => {
|
|
26
|
-
const [anchors, setAnchors] = react_1.useState([]);
|
|
27
|
-
const [activeAnchor, setActiveAnchor] = react_1.useState();
|
|
28
|
-
react_1.useEffect(() => {
|
|
29
|
-
const scrollListener = () => {
|
|
30
|
-
const offset = 100;
|
|
31
|
-
const lastPassedAnchor = anchors
|
|
32
|
-
.map((anchor) => document.getElementById(anchor))
|
|
33
|
-
.map((element) => ({
|
|
34
|
-
id: element.id,
|
|
35
|
-
top: element.getBoundingClientRect().top - offset,
|
|
36
|
-
scrolledToBottom: window.innerHeight + window.pageYOffset >=
|
|
37
|
-
document.body.offsetHeight,
|
|
38
|
-
}))
|
|
39
|
-
.filter((element) => element.scrolledToBottom || element.top <= 0)
|
|
40
|
-
.sort((a, b) => (a.top < b.top ? -1 : 1))
|
|
41
|
-
.map((anchor) => anchor.id)
|
|
42
|
-
.pop();
|
|
43
|
-
// Set active anchor and related url hash
|
|
44
|
-
if (lastPassedAnchor && activeAnchor !== lastPassedAnchor) {
|
|
45
|
-
const { href, hash } = window.location;
|
|
46
|
-
const urlWithoutHash = href.replace(hash, "");
|
|
47
|
-
const urlWithAnchor = `${urlWithoutHash}#${lastPassedAnchor}`;
|
|
48
|
-
const title = document.title;
|
|
49
|
-
window.history.replaceState(window.history.state, title, urlWithAnchor);
|
|
50
|
-
setActiveAnchor(lastPassedAnchor);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
window.addEventListener("scroll", scrollListener);
|
|
54
|
-
return () => {
|
|
55
|
-
window.removeEventListener("scroll", scrollListener);
|
|
56
|
-
};
|
|
57
|
-
}, [anchors, activeAnchor]);
|
|
58
|
-
return (react_1.default.createElement(exports.ActiveAnchorContext.Provider, { value: {
|
|
59
|
-
activeAnchor,
|
|
60
|
-
registerAnchor: react_1.useCallback((anchor) => {
|
|
61
|
-
setAnchors((anchors) => [...anchors, anchor]);
|
|
62
|
-
}, []),
|
|
63
|
-
unregisterAnchor: react_1.useCallback((anchor) => {
|
|
64
|
-
setAnchors((anchors) => anchors.filter((a) => a !== anchor));
|
|
65
|
-
}, []),
|
|
66
|
-
} }, children));
|
|
67
|
-
};
|
|
68
|
-
exports.useStore = () => react_1.useContext(exports.ActiveAnchorContext);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var AccordionAnchorMenu_1 = require("./AccordionAnchorMenu");
|
|
4
|
-
Object.defineProperty(exports, "AccordionAnchorMenu", { enumerable: true, get: function () { return AccordionAnchorMenu_1.default; } });
|
|
5
|
-
var AccordionAnchorMenuCollapsable_1 = require("./AccordionAnchorMenuCollapsable");
|
|
6
|
-
Object.defineProperty(exports, "AccordionAnchorMenuCollapsable", { enumerable: true, get: function () { return AccordionAnchorMenuCollapsable_1.AccordionAnchorMenuCollapsable; } });
|
|
7
|
-
var AccordionAnchorMenuItem_1 = require("./AccordionAnchorMenuItem");
|
|
8
|
-
Object.defineProperty(exports, "AccordionAnchorMenuItem", { enumerable: true, get: function () { return AccordionAnchorMenuItem_1.default; } });
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
var ContentContainer_1 = require("./ContentContainer");
|
|
14
|
-
Object.defineProperty(exports, "ContentContainer", { enumerable: true, get: function () { return ContentContainer_1.default; } });
|
|
15
|
-
__exportStar(require("./ContentContainer"), exports);
|
package/cjs/header/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
var Header_1 = require("./Header");
|
|
14
|
-
Object.defineProperty(exports, "Header", { enumerable: true, get: function () { return Header_1.default; } });
|
|
15
|
-
__exportStar(require("./Header"), exports);
|
package/cjs/header/package.json
DELETED
package/cjs/layouts/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ProductPageLayout_1 = require("./product-page/ProductPageLayout");
|
|
4
|
-
Object.defineProperty(exports, "ProductPageLayout", { enumerable: true, get: function () { return ProductPageLayout_1.default; } });
|
|
5
|
-
var ProductPagePanel_1 = require("./product-page/ProductPagePanel");
|
|
6
|
-
Object.defineProperty(exports, "ProductPagePanel", { enumerable: true, get: function () { return ProductPagePanel_1.default; } });
|
|
7
|
-
var ProductPageSection_1 = require("./product-page/ProductPageSection");
|
|
8
|
-
Object.defineProperty(exports, "ProductPageSection", { enumerable: true, get: function () { return ProductPageSection_1.default; } });
|