@helsenorge/designsystem-react 7.12.0 → 7.13.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/CHANGELOG.md +8 -0
- package/_virtual/dynamic-import-helper.js +11 -4
- package/_virtual/dynamic-import-helper.js.map +1 -1
- package/_virtual/index.js +2 -2
- package/components/AnchorLink/AnchorLink.js +16 -16
- package/components/AnchorLink/AnchorLink.js.map +1 -1
- package/components/Avatar/Avatar.js +9 -9
- package/components/Avatar/Avatar.js.map +1 -1
- package/components/Badge/Badge.js +7 -7
- package/components/Badge/Badge.js.map +1 -1
- package/components/Badge/NotificationBadge.js +5 -5
- package/components/Badge/NotificationBadge.js.map +1 -1
- package/components/Button/Button.js +23 -23
- package/components/Button/Button.js.map +1 -1
- package/components/ButtonWithModal/ButtonWithModal.js +5 -5
- package/components/ButtonWithModal/ButtonWithModal.js.map +1 -1
- package/components/Checkbox/Checkbox.js +41 -42
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/index.js +2 -3
- package/components/Checkbox/index.js.map +1 -1
- package/components/Checkbox/styles.module.scss +2 -2
- package/components/Close/Close.js +9 -9
- package/components/Close/Close.js.map +1 -1
- package/components/DictionaryTrigger/DictionaryTrigger.js +14 -15
- package/components/DictionaryTrigger/DictionaryTrigger.js.map +1 -1
- package/components/DictionaryTrigger/styles.module.scss +1 -2
- package/components/Dropdown/Dropdown.js +24 -24
- package/components/Dropdown/Dropdown.js.map +1 -1
- package/components/Dropdown/styles.module.scss +1 -1
- package/components/Duolist/Duolist.d.ts +3 -0
- package/components/Duolist/Duolist.js +45 -36
- package/components/Duolist/Duolist.js.map +1 -1
- package/components/Duolist/index.js +5 -5
- package/components/Duolist/styles.module.scss +4 -0
- package/components/Duolist/styles.module.scss.d.ts +1 -0
- package/components/EmptyState/EmptyState.js +3 -3
- package/components/EmptyState/EmptyState.js.map +1 -1
- package/components/EmptyState/NobodyHome.js +3 -3
- package/components/EmptyState/NobodyHome.js.map +1 -1
- package/components/ErrorWrapper/ErrorWrapper.js +4 -4
- package/components/ErrorWrapper/ErrorWrapper.js.map +1 -1
- package/components/ErrorWrapper/index.js +2 -3
- package/components/ErrorWrapper/index.js.map +1 -1
- package/components/Expander/Expander.js +10 -10
- package/components/Expander/Expander.js.map +1 -1
- package/components/Expander/styles.module.scss +1 -1
- package/components/ExpanderHierarchy/Expander.js +5 -5
- package/components/ExpanderHierarchy/Expander.js.map +1 -1
- package/components/ExpanderHierarchy/ExpanderButton.js +7 -7
- package/components/ExpanderHierarchy/ExpanderButton.js.map +1 -1
- package/components/ExpanderHierarchy/ExpanderHierarchy.js +13 -14
- package/components/ExpanderHierarchy/ExpanderHierarchy.js.map +1 -1
- package/components/ExpanderHierarchy/expander.module.scss +2 -2
- package/components/ExpanderList/ExpanderList.js +34 -35
- package/components/ExpanderList/ExpanderList.js.map +1 -1
- package/components/ExpanderList/index.js +2 -3
- package/components/ExpanderList/index.js.map +1 -1
- package/components/ExpanderList/styles.module.scss +1 -1
- package/components/FormExample/FormExample.d.ts +0 -1
- package/components/FormExample/FormExample.js +12 -12
- package/components/FormExample/FormExample.js.map +1 -1
- package/components/FormExample/index.js +5 -5
- package/components/FormGroup/FormGroup.js +37 -38
- package/components/FormGroup/FormGroup.js.map +1 -1
- package/components/FormGroup/index.js +2 -3
- package/components/FormGroup/index.js.map +1 -1
- package/components/FormLayout/FormLayout.js +16 -17
- package/components/FormLayout/FormLayout.js.map +1 -1
- package/components/FormLayout/index.js +4 -4
- package/components/GridExample/GridExample.js +3 -3
- package/components/GridExample/GridExample.js.map +1 -1
- package/components/GridExample/index.js +3 -4
- package/components/GridExample/index.js.map +1 -1
- package/components/HelpBubble/HelpBubble.js +26 -27
- package/components/HelpBubble/HelpBubble.js.map +1 -1
- package/components/HelpBubble/styles.module.scss +1 -1
- package/components/HelpBubbleExample/HelpBubbleExample.js +3 -3
- package/components/HelpBubbleExample/HelpBubbleExample.js.map +1 -1
- package/components/HelpPanel/HelpPanel.js +11 -11
- package/components/HelpPanel/HelpPanel.js.map +1 -1
- package/components/HelpQuestion/HelpQuestion.js +16 -17
- package/components/HelpQuestion/HelpQuestion.js.map +1 -1
- package/components/HighlightBox/HighlightBox.js +16 -16
- package/components/HighlightBox/HighlightBox.js.map +1 -1
- package/components/HighlightBox/styles.module.scss +4 -4
- package/components/HorizontalScroll/HorizontalScroll.js +4 -4
- package/components/HorizontalScroll/HorizontalScroll.js.map +1 -1
- package/components/HorizontalScroll/index.js +2 -3
- package/components/HorizontalScroll/index.js.map +1 -1
- package/components/Illustration/Illustration.js +16 -17
- package/components/Illustration/Illustration.js.map +1 -1
- package/components/Illustration/index.js +5 -5
- package/components/Input/Input.js +65 -67
- package/components/Input/Input.js.map +1 -1
- package/components/Label/Label.js +16 -16
- package/components/Label/Label.js.map +1 -1
- package/components/LazyIcon/ErrorBoundary.js +7 -8
- package/components/LazyIcon/ErrorBoundary.js.map +1 -1
- package/components/LazyIcon/LazyIcon.js +4 -4
- package/components/LazyIcon/LazyIcon.js.map +1 -1
- package/components/LazyIcon/index.js +3 -3
- package/components/LazyIllustration/LazyIllustration.js +10 -10
- package/components/LazyIllustration/LazyIllustration.js.map +1 -1
- package/components/LazyIllustration/index.js +5 -5
- package/components/LinkList/LinkList.js +36 -37
- package/components/LinkList/LinkList.js.map +1 -1
- package/components/LinkList/index.js +2 -3
- package/components/LinkList/index.js.map +1 -1
- package/components/List/List.js +7 -8
- package/components/List/List.js.map +1 -1
- package/components/ListHeader/ListHeader.js +1 -1
- package/components/ListHeader/ListHeader.js.map +1 -1
- package/components/ListHeader/ListHeaderText/ListHeaderText.js +18 -19
- package/components/ListHeader/ListHeaderText/ListHeaderText.js.map +1 -1
- package/components/ListHeader/ListHeaderText/index.js +2 -3
- package/components/ListHeader/ListHeaderText/index.js.map +1 -1
- package/components/Loader/Loader.js +2 -2
- package/components/Loader/Loader.js.map +1 -1
- package/components/Logo/Logo.js +5 -5
- package/components/Logo/Logo.js.map +1 -1
- package/components/MaxCharacters/MaxCharacters.js +5 -5
- package/components/MaxCharacters/MaxCharacters.js.map +1 -1
- package/components/Modal/Modal.js +32 -33
- package/components/Modal/Modal.js.map +1 -1
- package/components/Modal/styles.module.scss +8 -8
- package/components/NotificationPanel/NotificationPanel.js +14 -14
- package/components/NotificationPanel/NotificationPanel.js.map +1 -1
- package/components/NotificationPanel/styles.module.scss +3 -3
- package/components/Panel/Panel.js +25 -25
- package/components/Panel/Panel.js.map +1 -1
- package/components/Panel/styles.module.scss +3 -3
- package/components/PanelList/PanelList.js +8 -8
- package/components/PanelList/PanelList.js.map +1 -1
- package/components/PopMenu/PopMenu.js +14 -14
- package/components/PopMenu/PopMenu.js.map +1 -1
- package/components/PopMenu/index.js +3 -3
- package/components/PopOver/PopOver.js +27 -28
- package/components/PopOver/PopOver.js.map +1 -1
- package/components/Portal/index.js.map +1 -1
- package/components/Progressbar/Progressbar.js +13 -13
- package/components/Progressbar/Progressbar.js.map +1 -1
- package/components/PromoPanel/PromoPanel.js +16 -16
- package/components/PromoPanel/PromoPanel.js.map +1 -1
- package/components/RadioButton/RadioButton.js +52 -53
- package/components/RadioButton/RadioButton.js.map +1 -1
- package/components/RadioButton/index.js +4 -4
- package/components/RadioButton/styles.module.scss +2 -2
- package/components/Select/Select.js +21 -21
- package/components/Select/Select.js.map +1 -1
- package/components/Select/index.js +2 -3
- package/components/Select/index.js.map +1 -1
- package/components/ServiceMessage/ServiceMessage.js +30 -30
- package/components/ServiceMessage/ServiceMessage.js.map +1 -1
- package/components/ServiceMessage/styles.module.scss +10 -10
- package/components/SharingStatus/SharingStatus.js +7 -7
- package/components/SharingStatus/SharingStatus.js.map +1 -1
- package/components/Slider/Slider.js +15 -17
- package/components/Slider/Slider.js.map +1 -1
- package/components/Slider/index.js +2 -3
- package/components/Slider/index.js.map +1 -1
- package/components/Spacer/Spacer.js +4 -4
- package/components/Spacer/Spacer.js.map +1 -1
- package/components/StatusDot/StatusDot.js +8 -8
- package/components/StatusDot/StatusDot.js.map +1 -1
- package/components/Step/Step.js +10 -10
- package/components/Step/Step.js.map +1 -1
- package/components/StepButtons/StepButtons.js +4 -4
- package/components/StepButtons/StepButtons.js.map +1 -1
- package/components/StepButtons/index.js +2 -3
- package/components/StepButtons/index.js.map +1 -1
- package/components/Stepper/Dot.js +3 -3
- package/components/Stepper/Dot.js.map +1 -1
- package/components/Stepper/DotList.js +4 -4
- package/components/Stepper/DotList.js.map +1 -1
- package/components/Stepper/Stepper.js +10 -10
- package/components/Stepper/Stepper.js.map +1 -1
- package/components/Table/Table.js +1 -1
- package/components/Table/TableBody/TableBody.js +3 -3
- package/components/Table/TableBody/TableBody.js.map +1 -1
- package/components/Table/TableBody/index.js +3 -4
- package/components/Table/TableBody/index.js.map +1 -1
- package/components/Table/TableCell/TableCell.js +10 -10
- package/components/Table/TableCell/TableCell.js.map +1 -1
- package/components/Table/TableCell/index.js +4 -4
- package/components/Table/TableExpandedRow/TableExpandedRow.js +8 -8
- package/components/Table/TableExpandedRow/TableExpandedRow.js.map +1 -1
- package/components/Table/TableExpandedRow/index.js +3 -4
- package/components/Table/TableExpandedRow/index.js.map +1 -1
- package/components/Table/TableExpanderCell/TableExpanderCell.js +3 -3
- package/components/Table/TableExpanderCell/TableExpanderCell.js.map +1 -1
- package/components/Table/TableExpanderCell/TableExpanderCellMobile.js +11 -11
- package/components/Table/TableExpanderCell/TableExpanderCellMobile.js.map +1 -1
- package/components/Table/TableExpanderCell/index.js +3 -4
- package/components/Table/TableExpanderCell/index.js.map +1 -1
- package/components/Table/TableHead/TableHead.js +9 -9
- package/components/Table/TableHead/TableHead.js.map +1 -1
- package/components/Table/TableHead/index.js +4 -4
- package/components/Table/TableHeadCell/TableHeadCell.js +15 -15
- package/components/Table/TableHeadCell/TableHeadCell.js.map +1 -1
- package/components/Table/TableHeadCell/index.js +4 -4
- package/components/Table/TableRow/TableRow.js +16 -16
- package/components/Table/TableRow/TableRow.js.map +1 -1
- package/components/Table/TableRow/index.js +3 -4
- package/components/Table/TableRow/index.js.map +1 -1
- package/components/Table/styles.module.scss +3 -3
- package/components/Table/utils.d.ts +1 -1
- package/components/Tabs/Tab.js +2 -2
- package/components/Tabs/Tab.js.map +1 -1
- package/components/Tabs/TabList/TabList.js +43 -38
- package/components/Tabs/TabList/TabList.js.map +1 -1
- package/components/Tabs/TabList/styles.module.scss +14 -4
- package/components/Tabs/TabPanel/TabPanel.d.ts +5 -1
- package/components/Tabs/TabPanel/TabPanel.js +13 -9
- package/components/Tabs/TabPanel/TabPanel.js.map +1 -1
- package/components/Tabs/TabPanel/styles.module.scss +48 -6
- package/components/Tabs/TabPanel/styles.module.scss.d.ts +4 -0
- package/components/Tabs/Tabs.d.ts +8 -4
- package/components/Tabs/Tabs.js +85 -16
- package/components/Tabs/Tabs.js.map +1 -1
- package/components/Tabs/styles.module.scss +38 -2
- package/components/Tabs/styles.module.scss.d.ts +7 -1
- package/components/Tag/Tag.js +3 -3
- package/components/Tag/Tag.js.map +1 -1
- package/components/TagList/TagList.js +1 -1
- package/components/TagList/TagList.js.map +1 -1
- package/components/Textarea/Textarea.js +48 -49
- package/components/Textarea/Textarea.js.map +1 -1
- package/components/Tile/Tile.js +14 -15
- package/components/Tile/Tile.js.map +1 -1
- package/components/Tile/index.js +2 -3
- package/components/Tile/index.js.map +1 -1
- package/components/Title/Title.js +10 -10
- package/components/Title/Title.js.map +1 -1
- package/components/Title/index.js +4 -4
- package/components/Tooltip/Tooltip.js +4 -4
- package/components/Tooltip/Tooltip.js.map +1 -1
- package/components/Tooltip/TooltipWord/TooltipWord.js +17 -18
- package/components/Tooltip/TooltipWord/TooltipWord.js.map +1 -1
- package/components/Tooltip/index.js +5 -5
- package/components/TooltipExample/TooltipExample.js +4 -4
- package/components/TooltipExample/TooltipExample.js.map +1 -1
- package/components/Trigger/HelpSign.js +3 -3
- package/components/Trigger/HelpSign.js.map +1 -1
- package/components/Trigger/Trigger.js +25 -26
- package/components/Trigger/Trigger.js.map +1 -1
- package/components/Validation/ErrorList.js +5 -5
- package/components/Validation/ErrorList.js.map +1 -1
- package/components/Validation/ErrorListItem.js +8 -8
- package/components/Validation/ErrorListItem.js.map +1 -1
- package/components/Validation/Validation.js +13 -14
- package/components/Validation/Validation.js.map +1 -1
- package/components/Validation/ValidationSummary.js +4 -4
- package/components/Validation/ValidationSummary.js.map +1 -1
- package/components/Validation/index.js +3 -4
- package/components/Validation/index.js.map +1 -1
- package/components/Validation/types.d.ts +0 -1
- package/constants.d.ts +2 -1
- package/constants.js +1 -1
- package/constants.js.map +1 -1
- package/hooks/useIcons.d.ts +0 -1
- package/hooks/useIcons.js +1 -1
- package/hooks/useLayoutEvent.js +1 -2
- package/hooks/useLayoutEvent.js.map +1 -1
- package/hooks/useSticky.d.ts +1 -1
- package/package.json +1 -1
- package/scss/_palette.scss +1 -0
- package/scss/typography.module.scss +1 -1
- package/scss/typography.module.scss.d.ts +1 -1
- package/scss/typography.stories.tsx +157 -0
- package/theme/currys/color.d.ts +1 -1
- package/utils/accessibility.d.ts +2 -1
- package/utils/accessibility.js +1 -1
- package/utils/accessibility.js.map +1 -1
- package/utils/component.d.ts +3 -3
- package/utils/refs.d.ts +1 -2
- package/_virtual/index2.js +0 -5
- package/_virtual/index2.js.map +0 -1
- package/_virtual/index3.js +0 -5
- package/_virtual/index3.js.map +0 -1
- package/components/AnchorLink/AnchorLink.stories.d.ts +0 -31
- package/components/Avatar/Avatar.stories.d.ts +0 -36
- package/components/Badge/Badge.stories.d.ts +0 -42
- package/components/Button/Button.stories.d.ts +0 -56
- package/components/Checkbox/Checkbox.stories.d.ts +0 -54
- package/components/Close/Close.stories.d.ts +0 -29
- package/components/DictionaryTrigger/DictionaryTrigger.stories.d.ts +0 -30
- package/components/Dropdown/Dropdown.stories.d.ts +0 -67
- package/components/Duolist/Duolist.stories.d.ts +0 -32
- package/components/EmptyState/EmptyState.stories.d.ts +0 -26
- package/components/Expander/Expander.stories.d.ts +0 -60
- package/components/ExpanderHierarchy/ExpanderHierarchy.stories.d.ts +0 -44
- package/components/ExpanderList/ExpanderList.stories.d.ts +0 -59
- package/components/FormGroup/FormGroup.stories.d.ts +0 -50
- package/components/FormLayout/FormLayout.stories.d.ts +0 -32
- package/components/HelpBubble/HelpBubble.stories.d.ts +0 -46
- package/components/HelpPanel/HelpPanel.stories.d.ts +0 -31
- package/components/HelpQuestion/HelpQuestion.stories.d.ts +0 -29
- package/components/HighlightBox/HighlightBox.stories.d.ts +0 -42
- package/components/Icon/Icon.stories.d.ts +0 -38
- package/components/Illustration/Illustration.stories.d.ts +0 -34
- package/components/Illustration/Illustrations.stories.d.ts +0 -41
- package/components/Input/Input.stories.d.ts +0 -94
- package/components/Label/Label.stories.d.ts +0 -25
- package/components/LazyIcon/LazyIcon.stories.d.ts +0 -25
- package/components/LazyIllustration/LazyIllustration.stories.d.ts +0 -38
- package/components/LinkList/LinkList.stories.d.ts +0 -49
- package/components/List/List.stories.d.ts +0 -52
- package/components/Loader/Loader.stories.d.ts +0 -31
- package/components/Logo/Logo.stories.d.ts +0 -37
- package/components/Modal/Modal.stories.d.ts +0 -76
- package/components/NotificationPanel/NotificationPanel.stories.d.ts +0 -60
- package/components/Panel/Panel.stories.d.ts +0 -89
- package/components/PanelList/PanelList.stories.d.ts +0 -27
- package/components/PopMenu/PopMenu.stories.d.ts +0 -39
- package/components/PopOver/PopOver.stories.d.ts +0 -38
- package/components/Progressbar/Progressbar.stories.d.ts +0 -43
- package/components/PromoPanel/PromoPanel.stories.d.ts +0 -45
- package/components/RadioButton/RadioButton.stories.d.ts +0 -57
- package/components/Select/Select.stories.d.ts +0 -38
- package/components/ServiceMessage/ServiceMessage.stories.d.ts +0 -71
- package/components/SharingStatus/SharingStatus.stories.d.ts +0 -31
- package/components/Slider/Slider.stories.d.ts +0 -52
- package/components/Spacer/Spacer.stories.d.ts +0 -17
- package/components/StatusDot/StatusDot.stories.d.ts +0 -31
- package/components/Step/Step.stories.d.ts +0 -32
- package/components/StepButtons/StepButtons.stories.d.ts +0 -19
- package/components/Stepper/Stepper.stories.d.ts +0 -38
- package/components/Table/Table.stories.d.ts +0 -90
- package/components/Tabs/Tabs.stories.d.ts +0 -50
- package/components/Tag/Tag.stories.d.ts +0 -48
- package/components/TagList/TagList.stories.d.ts +0 -17
- package/components/Textarea/Textarea.stories.d.ts +0 -94
- package/components/Tile/Tile.stories.d.ts +0 -65
- package/components/Title/Title.stories.d.ts +0 -40
- package/components/Tooltip/Tooltip.stories.d.ts +0 -34
- package/components/Trigger/Trigger.stories.d.ts +0 -52
- package/components/Validation/Validation.stories.d.ts +0 -37
- package/hoc/withBreakpoint/withBreakpoint.stories.d.ts +0 -17
- package/hooks/useBreakpoint.stories.d.ts +0 -16
- package/hooks/useDelayedState.stories.d.ts +0 -27
- package/hooks/useElementList.stories.d.ts +0 -16
- package/hooks/useFocusToggle.stories.d.ts +0 -16
- package/hooks/useFocusTrap.stories.d.ts +0 -16
- package/hooks/useFocusableElements.stories.d.ts +0 -16
- package/hooks/useHover.stories.d.ts +0 -16
- package/hooks/useIntersectionObserver.stories.d.ts +0 -16
- package/hooks/useInterval.stories.d.ts +0 -16
- package/hooks/useIsVisible.stories.d.ts +0 -27
- package/hooks/useKeyboardEvent.stories.d.ts +0 -16
- package/hooks/useLayoutEvent.stories.d.ts +0 -16
- package/hooks/useOutsideEvent.stories.d.ts +0 -16
- package/hooks/usePseudoClasses.stories.d.ts +0 -16
- package/hooks/useResizeObserver.stories.d.ts +0 -16
- package/hooks/useRovingFocus.stories.d.ts +0 -17
- package/hooks/useSize.stories.d.ts +0 -16
- package/hooks/useSticky.stories.d.ts +0 -16
- package/hooks/useUuid.stories.d.ts +0 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../src/components/Input/Input.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\n\nimport cn from 'classnames';\n\nimport { FormMode, FormSize, AnalyticsId, AVERAGE_CHARACTER_WIDTH_PX } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon, { IconSize, SvgIcon } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\nimport { renderLabel } from '../Label';\nimport LazyIcon from '../LazyIcon';\nimport MaxCharacters from '../MaxCharacters/MaxCharacters';\n\nimport styles from './styles.module.scss';\n\nexport interface InputProps\n extends Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n | 'disabled'\n | 'readOnly'\n | 'autoComplete'\n | 'name'\n | 'placeholder'\n | 'defaultValue'\n | 'required'\n | 'value'\n | 'min'\n | 'max'\n | 'aria-describedby'\n | 'aria-labelledby'\n | 'onBlur'\n | 'onClick'\n | 'onChange'\n | 'onFocus'\n | 'onKeyDown'\n | 'autoFocus'\n > {\n /** The number at which the input field starts when you increment or decrement it */\n baseIncrementValue?: number;\n /** Adds custom classes to the element. */\n className?: string;\n /** HMTL Input type */\n type?: keyof typeof InputTypes;\n /** input id */\n inputId?: string;\n /** Width of input field in characters (approximate) */\n width?: number;\n /** If true, the component will be transparent. */\n transparent?: boolean;\n /** Icon to be displayed next to the input field */\n icon?: SvgIcon | IconName;\n /** Places the icon to the right */\n iconRight?: boolean;\n /** Ref that is placed on the inputWrapper */\n inputWrapperRef?: React.RefObject<HTMLDivElement>;\n /** Changes the color profile of the input */\n mode?: keyof typeof FormMode;\n /** Changes the visuals of the input */\n size?: keyof typeof FormSize;\n /** Label of the input */\n label?: React.ReactNode;\n /** Activates Error style for the input */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Error text id */\n errorTextId?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Component shown after input */\n afterInputChildren?: React.ReactNode;\n /** Component shown to the right of input */\n rightOfInput?: React.ReactNode;\n /** max character limit in input */\n maxCharacters?: number;\n /** The text is displayed in the end of the text-counter */\n maxText?: string;\n}\n\nexport enum InputTypes {\n text = 'text',\n number = 'number',\n email = 'email',\n password = 'password',\n search = 'search',\n tel = 'tel',\n url = 'url',\n date = 'date',\n time = 'time',\n}\n\nconst getInputMaxWidth = (characters: number, hasIcon: boolean, iconSize: number): string => {\n const paddingWidth = hasIcon ? '1.5rem' : '2rem';\n const iconWidth = hasIcon ? `${iconSize}px` : '0px';\n const borderWidth = '4px';\n\n return `calc(${characters * AVERAGE_CHARACTER_WIDTH_PX}px + ${paddingWidth} + ${iconWidth} + ${borderWidth})`;\n};\n\nconst Input = React.forwardRef((props: InputProps, ref: React.Ref<HTMLInputElement>) => {\n const {\n className,\n defaultValue,\n placeholder,\n type = InputTypes.text,\n name,\n transparent = false,\n icon,\n iconRight,\n inputId,\n inputWrapperRef,\n mode = FormMode.onwhite,\n size,\n baseIncrementValue,\n label,\n error,\n errorText,\n errorTextId,\n testId,\n disabled,\n readOnly,\n autoComplete = 'off',\n afterInputChildren,\n rightOfInput,\n width,\n required,\n onChange,\n onKeyDown,\n autoFocus,\n maxCharacters,\n maxText,\n ...rest\n } = props;\n const breakpoint = useBreakpoint();\n const inputContainerRef = useRef<HTMLDivElement>(null);\n const inputIdState = useUuid(inputId);\n const [input, setInput] = useState(defaultValue || '');\n const [prevValue, setPrevValue] = useState<string | number | undefined>(undefined);\n const numKeyPressed = useRef<boolean>(false);\n const errorTextUuid = useUuid(errorTextId);\n const numRegex = /^[0-9]$/;\n\n useEffect(() => {\n setInput(defaultValue || '');\n }, [defaultValue]);\n\n const onDark = mode === FormMode.ondark;\n const onBlueberry = mode === FormMode.onblueberry;\n const maxCharactersExceeded = !!maxCharacters && input.toString().length > maxCharacters;\n const onError = mode === FormMode.oninvalid || !!errorText || !!error || maxCharactersExceeded;\n const isLarge = size === FormSize.large;\n const isTransparent = transparent && mode !== FormMode.ondark && !onError;\n\n const inputWrapperClass = cn(styles['input-wrapper'], className);\n\n const inputContainer = cn(styles['input-container'], {\n [styles['input-container--transparent']]: isTransparent,\n [styles['input-container--on-blueberry']]: onBlueberry,\n [styles['input-container--on-dark']]: onDark,\n [styles['input-container--invalid']]: onError,\n [styles['input-container--large']]: isLarge,\n [styles['input-container--disabled']]: disabled,\n [styles['input-container--with-icon']]: icon,\n });\n\n const inputClass = cn(styles['input-container__input'], {\n [styles['input-container__input--large']]: isLarge,\n [styles['input-container__input--disabled']]: disabled,\n });\n\n const iconColor = disabled ? getColor('neutral', 700) : getColor('black');\n const iconSize = breakpoint === Breakpoint.xs || !isLarge ? IconSize.XSmall : IconSize.Small;\n\n const renderIcon = (): React.ReactNode => {\n if (!icon) {\n return;\n }\n\n if (typeof icon === 'string') {\n return <LazyIcon className={styles['input-container__input__icon']} color={iconColor} size={iconSize} iconName={icon} />;\n }\n\n return <Icon className={styles['input-container__input__icon']} color={iconColor} size={iconSize} svgIcon={icon} />;\n };\n\n // eslint-disable-next-line\n const handleClick = (e: React.MouseEvent<any>): void => {\n if (inputContainerRef && inputContainerRef.current && icon) {\n const selectedChild = iconRight ? 0 : 1;\n const input = inputContainerRef.current.children[selectedChild] as HTMLInputElement;\n input.focus();\n\n props.onClick && props.onClick(e);\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n const newValue = getIncrementValue(e);\n\n if (onChange) {\n onChange(e);\n }\n\n setInput(newValue);\n setPrevValue(newValue);\n };\n\n // Hvis bruker endrer number value med 1 og det skal startes på en annen verdi enn 0\n const getIncrementValue = (e: React.ChangeEvent<HTMLInputElement>): string => {\n if (typeof baseIncrementValue === 'undefined' || type !== 'number') return e.target.value;\n\n const valueAsNumber = Number(e.target.value);\n\n if (!prevValue && !numKeyPressed.current && (valueAsNumber === 1 || valueAsNumber === -1)) {\n e.target.value = baseIncrementValue + '';\n }\n\n return e.target.value;\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = true;\n }\n onKeyDown && onKeyDown(e);\n };\n\n const handleKeyUp = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = false;\n }\n };\n\n const maxWidth = width ? getInputMaxWidth(width, !!icon, iconSize) : undefined;\n\n return (\n <ErrorWrapper errorText={errorText} errorTextId={errorTextUuid}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Input} className={inputWrapperClass} ref={inputWrapperRef}>\n {renderLabel(label, inputIdState, mode as FormMode)}\n {/* input-elementet tillater keyboard-interaksjon */}\n <div className={styles['content-wrapper']}>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div onClick={handleClick} ref={inputContainerRef} className={inputContainer} style={{ maxWidth }}>\n {!iconRight && renderIcon()}\n <input\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n name={name}\n type={type}\n defaultValue={defaultValue}\n id={inputIdState}\n className={inputClass}\n ref={ref}\n aria-labelledby={props['aria-labelledby'] ?? undefined}\n aria-describedby={getAriaDescribedBy(props, errorTextUuid)}\n aria-invalid={!!onError}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n autoComplete={autoComplete || 'off'}\n required={required}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n {...rest}\n />\n {iconRight && renderIcon()}\n </div>\n <div className={styles['content-wrapper__right-of-input']}>{rightOfInput}</div>\n </div>\n {maxCharacters && (\n <MaxCharacters maxCharacters={maxCharacters} length={input.toString().length} maxText={maxText} mode={mode} maxWidth={maxWidth} />\n )}\n {afterInputChildren}\n </div>\n </ErrorWrapper>\n );\n});\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"names":["InputTypes","getInputMaxWidth","characters","hasIcon","iconSize","paddingWidth","iconWidth","AVERAGE_CHARACTER_WIDTH_PX","Input","React","props","ref","className","defaultValue","placeholder","type","name","transparent","icon","iconRight","inputId","inputWrapperRef","mode","FormMode","size","baseIncrementValue","label","error","errorText","errorTextId","testId","disabled","readOnly","autoComplete","afterInputChildren","rightOfInput","width","required","onChange","onKeyDown","autoFocus","maxCharacters","maxText","rest","breakpoint","useBreakpoint","inputContainerRef","useRef","inputIdState","useUuid","input","setInput","useState","prevValue","setPrevValue","numKeyPressed","errorTextUuid","numRegex","useEffect","onDark","onBlueberry","maxCharactersExceeded","onError","isLarge","FormSize","isTransparent","inputWrapperClass","cn","styles","inputContainer","inputClass","iconColor","getColor","Breakpoint","IconSize","renderIcon","LazyIcon","Icon","handleClick","e","selectedChild","handleChange","newValue","getIncrementValue","valueAsNumber","handleKeyDown","handleKeyUp","maxWidth","ErrorWrapper","AnalyticsId","renderLabel","getAriaDescribedBy","MaxCharacters","Input$1"],"mappings":";;;;;;;;;;;;;AAkFY,IAAAA,uBAAAA,OACVA,EAAA,OAAO,QACPA,EAAA,SAAS,UACTA,EAAA,QAAQ,SACRA,EAAA,WAAW,YACXA,EAAA,SAAS,UACTA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,OAAO,QACPA,EAAA,OAAO,QATGA,IAAAA,MAAA,CAAA,CAAA;AAYZ,MAAMC,KAAmB,CAACC,GAAoBC,GAAkBC,MAA6B;AACrF,QAAAC,IAAeF,IAAU,WAAW,QACpCG,IAAYH,IAAU,GAAGC,CAAQ,OAAO;AAGvC,SAAA,QAAQF,IAAaK,EAA0B,QAAQF,CAAY,MAAMC,CAAS;AAC3F,GAEME,IAAQC,EAAM,WAAW,CAACC,GAAmBC,MAAqC;AAChF,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,MAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,MAAAC,IAAOC,EAAS;AAAA,IAChB,MAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AA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AAAjB;AAAA,MACA,UAAAkB;AAAA,MACA,cAAcC,KAAgB;AAAA,MAC9B,UAAAI;AAAA,MAEA,WAAAG;AAAA,MACC,GAAGG;AAAA,IAAA;AAAA,EAEL,GAAAxB,KAAawD,EAAW,CAC3B,GACAlE,gBAAAA,EAAA,cAAC,OAAI,EAAA,WAAW2D,EAAO,iCAAiC,EAAI,GAAAjC,CAAa,CAC3E,GACCM,KACChC,gBAAAA,EAAA,cAACmF,IAAc,EAAA,eAAAnD,GAA8B,QAAQS,EAAM,SAAS,EAAE,QAAQ,SAAAR,IAAkB,MAAApB,GAAY,UAAAiE,EAAoB,CAAA,GAEjIrD,CACH,CACF;AAEJ,CAAC;AAED1B,EAAM,cAAc;AAEpB,MAAAqF,KAAerF;"}
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../src/components/Input/Input.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\n\nimport cn from 'classnames';\n\nimport { FormMode, FormSize, AnalyticsId, AVERAGE_CHARACTER_WIDTH_PX } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon, { IconSize, SvgIcon } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\nimport { renderLabel } from '../Label';\nimport LazyIcon from '../LazyIcon';\nimport MaxCharacters from '../MaxCharacters/MaxCharacters';\n\nimport styles from './styles.module.scss';\n\nexport interface InputProps\n extends Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n | 'disabled'\n | 'readOnly'\n | 'autoComplete'\n | 'name'\n | 'placeholder'\n | 'defaultValue'\n | 'required'\n | 'value'\n | 'min'\n | 'max'\n | 'aria-describedby'\n | 'aria-labelledby'\n | 'onBlur'\n | 'onClick'\n | 'onChange'\n | 'onFocus'\n | 'onKeyDown'\n | 'autoFocus'\n > {\n /** The number at which the input field starts when you increment or decrement it */\n baseIncrementValue?: number;\n /** Adds custom classes to the element. */\n className?: string;\n /** HMTL Input type */\n type?: keyof typeof InputTypes;\n /** input id */\n inputId?: string;\n /** Width of input field in characters (approximate) */\n width?: number;\n /** If true, the component will be transparent. */\n transparent?: boolean;\n /** Icon to be displayed next to the input field */\n icon?: SvgIcon | IconName;\n /** Places the icon to the right */\n iconRight?: boolean;\n /** Ref that is placed on the inputWrapper */\n inputWrapperRef?: React.RefObject<HTMLDivElement>;\n /** Changes the color profile of the input */\n mode?: keyof typeof FormMode;\n /** Changes the visuals of the input */\n size?: keyof typeof FormSize;\n /** Label of the input */\n label?: React.ReactNode;\n /** Activates Error style for the input */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Error text id */\n errorTextId?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Component shown after input */\n afterInputChildren?: React.ReactNode;\n /** Component shown to the right of input */\n rightOfInput?: React.ReactNode;\n /** max character limit in input */\n maxCharacters?: number;\n /** The text is displayed in the end of the text-counter */\n maxText?: string;\n}\n\nexport enum InputTypes {\n text = 'text',\n number = 'number',\n email = 'email',\n password = 'password',\n search = 'search',\n tel = 'tel',\n url = 'url',\n date = 'date',\n time = 'time',\n}\n\nconst getInputMaxWidth = (characters: number, hasIcon: boolean, iconSize: number): string => {\n const paddingWidth = hasIcon ? '1.5rem' : '2rem';\n const iconWidth = hasIcon ? `${iconSize}px` : '0px';\n const borderWidth = '4px';\n\n return `calc(${characters * AVERAGE_CHARACTER_WIDTH_PX}px + ${paddingWidth} + ${iconWidth} + ${borderWidth})`;\n};\n\nconst Input = React.forwardRef((props: InputProps, ref: React.Ref<HTMLInputElement>) => {\n const {\n className,\n defaultValue,\n placeholder,\n type = InputTypes.text,\n name,\n transparent = false,\n icon,\n iconRight,\n inputId,\n inputWrapperRef,\n mode = FormMode.onwhite,\n size,\n baseIncrementValue,\n label,\n error,\n errorText,\n errorTextId,\n testId,\n disabled,\n readOnly,\n autoComplete = 'off',\n afterInputChildren,\n rightOfInput,\n width,\n required,\n onChange,\n onKeyDown,\n autoFocus,\n maxCharacters,\n maxText,\n ...rest\n } = props;\n const breakpoint = useBreakpoint();\n const inputContainerRef = useRef<HTMLDivElement>(null);\n const inputIdState = useUuid(inputId);\n const [input, setInput] = useState(defaultValue || '');\n const [prevValue, setPrevValue] = useState<string | number | undefined>(undefined);\n const numKeyPressed = useRef<boolean>(false);\n const errorTextUuid = useUuid(errorTextId);\n const numRegex = /^[0-9]$/;\n\n useEffect(() => {\n setInput(defaultValue || '');\n }, [defaultValue]);\n\n const onDark = mode === FormMode.ondark;\n const onBlueberry = mode === FormMode.onblueberry;\n const maxCharactersExceeded = !!maxCharacters && input.toString().length > maxCharacters;\n const onError = mode === FormMode.oninvalid || !!errorText || !!error || maxCharactersExceeded;\n const isLarge = size === FormSize.large;\n const isTransparent = transparent && mode !== FormMode.ondark && !onError;\n\n const inputWrapperClass = cn(styles['input-wrapper'], className);\n\n const inputContainer = cn(styles['input-container'], {\n [styles['input-container--transparent']]: isTransparent,\n [styles['input-container--on-blueberry']]: onBlueberry,\n [styles['input-container--on-dark']]: onDark,\n [styles['input-container--invalid']]: onError,\n [styles['input-container--large']]: isLarge,\n [styles['input-container--disabled']]: disabled,\n [styles['input-container--with-icon']]: icon,\n });\n\n const inputClass = cn(styles['input-container__input'], {\n [styles['input-container__input--large']]: isLarge,\n [styles['input-container__input--disabled']]: disabled,\n });\n\n const iconColor = disabled ? getColor('neutral', 700) : getColor('black');\n const iconSize = breakpoint === Breakpoint.xs || !isLarge ? IconSize.XSmall : IconSize.Small;\n\n const renderIcon = (): React.ReactNode => {\n if (!icon) {\n return;\n }\n\n if (typeof icon === 'string') {\n return <LazyIcon className={styles['input-container__input__icon']} color={iconColor} size={iconSize} iconName={icon} />;\n }\n\n return <Icon className={styles['input-container__input__icon']} color={iconColor} size={iconSize} svgIcon={icon} />;\n };\n\n // eslint-disable-next-line\n const handleClick = (e: React.MouseEvent<any>): void => {\n if (inputContainerRef && inputContainerRef.current && icon) {\n const selectedChild = iconRight ? 0 : 1;\n const input = inputContainerRef.current.children[selectedChild] as HTMLInputElement;\n input.focus();\n\n props.onClick && props.onClick(e);\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n const newValue = getIncrementValue(e);\n\n if (onChange) {\n onChange(e);\n }\n\n setInput(newValue);\n setPrevValue(newValue);\n };\n\n // Hvis bruker endrer number value med 1 og det skal startes på en annen verdi enn 0\n const getIncrementValue = (e: React.ChangeEvent<HTMLInputElement>): string => {\n if (typeof baseIncrementValue === 'undefined' || type !== 'number') return e.target.value;\n\n const valueAsNumber = Number(e.target.value);\n\n if (!prevValue && !numKeyPressed.current && (valueAsNumber === 1 || valueAsNumber === -1)) {\n e.target.value = baseIncrementValue + '';\n }\n\n return e.target.value;\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = true;\n }\n onKeyDown && onKeyDown(e);\n };\n\n const handleKeyUp = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = false;\n }\n };\n\n const maxWidth = width ? getInputMaxWidth(width, !!icon, iconSize) : undefined;\n\n return (\n <ErrorWrapper errorText={errorText} errorTextId={errorTextUuid}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Input} className={inputWrapperClass} ref={inputWrapperRef}>\n {renderLabel(label, inputIdState, mode as FormMode)}\n {/* input-elementet tillater keyboard-interaksjon */}\n <div className={styles['content-wrapper']}>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div onClick={handleClick} ref={inputContainerRef} className={inputContainer} style={{ maxWidth }}>\n {!iconRight && renderIcon()}\n <input\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n name={name}\n type={type}\n defaultValue={defaultValue}\n id={inputIdState}\n className={inputClass}\n ref={ref}\n aria-labelledby={props['aria-labelledby'] ?? undefined}\n aria-describedby={getAriaDescribedBy(props, errorTextUuid)}\n aria-invalid={!!onError}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n autoComplete={autoComplete || 'off'}\n required={required}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n {...rest}\n />\n {iconRight && renderIcon()}\n </div>\n <div className={styles['content-wrapper__right-of-input']}>{rightOfInput}</div>\n </div>\n {maxCharacters && (\n <MaxCharacters maxCharacters={maxCharacters} length={input.toString().length} maxText={maxText} mode={mode} maxWidth={maxWidth} />\n )}\n {afterInputChildren}\n </div>\n </ErrorWrapper>\n );\n});\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"names":["InputTypes","getInputMaxWidth","characters","hasIcon","iconSize","paddingWidth","iconWidth","AVERAGE_CHARACTER_WIDTH_PX","Input","React","props","ref","className","defaultValue","placeholder","type","name","transparent","icon","iconRight","inputId","inputWrapperRef","mode","FormMode","size","baseIncrementValue","label","error","errorText","errorTextId","testId","disabled","readOnly","autoComplete","afterInputChildren","rightOfInput","width","required","onChange","onKeyDown","autoFocus","maxCharacters","maxText","rest","breakpoint","useBreakpoint","inputContainerRef","useRef","inputIdState","useUuid","input","setInput","useState","prevValue","setPrevValue","numKeyPressed","errorTextUuid","numRegex","useEffect","onDark","onBlueberry","maxCharactersExceeded","onError","isLarge","FormSize","isTransparent","inputWrapperClass","cn","styles","inputContainer","inputClass","iconColor","getColor","Breakpoint","IconSize","renderIcon","LazyIcon","Icon","handleClick","e","selectedChild","handleChange","newValue","getIncrementValue","valueAsNumber","handleKeyDown","handleKeyUp","maxWidth","ErrorWrapper","AnalyticsId","renderLabel","getAriaDescribedBy","MaxCharacters"],"mappings":";;;;;;;;;;;;;AAkFY,IAAAA,uBAAAA,OACVA,EAAA,OAAO,QACPA,EAAA,SAAS,UACTA,EAAA,QAAQ,SACRA,EAAA,WAAW,YACXA,EAAA,SAAS,UACT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
|
-
import { isComponent as
|
|
3
|
+
import { Sublabel as k } from "./SubLabel.js";
|
|
4
|
+
import { AnalyticsId as L, FormMode as b } from "../../constants.js";
|
|
5
|
+
import { isComponent as o } from "../../utils/component.js";
|
|
6
6
|
import S from "../Spacer/Spacer.js";
|
|
7
7
|
import _ from "../StatusDot/StatusDot.js";
|
|
8
8
|
import n from "../Label/styles.module.scss";
|
|
9
|
-
const
|
|
9
|
+
const j = (e) => {
|
|
10
10
|
let r = "";
|
|
11
|
-
return
|
|
11
|
+
return o(e, l) && e.props.labelTexts.forEach((a) => {
|
|
12
12
|
r += a.hideFromScreenReader ? "" : a.text;
|
|
13
13
|
}), r;
|
|
14
|
-
},
|
|
14
|
+
}, q = (e, r, a) => /* @__PURE__ */ t.createElement(t.Fragment, null, e && o(e, l) ? t.cloneElement(e, {
|
|
15
15
|
htmlFor: r,
|
|
16
16
|
mode: a
|
|
17
|
-
}) : typeof e == "string" && /* @__PURE__ */ t.createElement(
|
|
17
|
+
}) : typeof e == "string" && /* @__PURE__ */ t.createElement(l, { labelTexts: [{ text: e, type: "semibold" }], htmlFor: r, mode: a })), B = (e, r, a, s, m, c, p, i) => /* @__PURE__ */ t.createElement(t.Fragment, null, e && o(e, l) ? t.cloneElement(e, {
|
|
18
18
|
htmlFor: a,
|
|
19
19
|
mode: s,
|
|
20
20
|
children: r,
|
|
@@ -24,7 +24,7 @@ const $ = (e) => {
|
|
|
24
24
|
sublabel: i ? void 0 : e.props.sublabel,
|
|
25
25
|
statusDot: i ? void 0 : e.props.statusDot
|
|
26
26
|
}) : typeof e == "string" && /* @__PURE__ */ t.createElement(
|
|
27
|
-
|
|
27
|
+
l,
|
|
28
28
|
{
|
|
29
29
|
labelTexts: [{ text: e }],
|
|
30
30
|
htmlFor: a,
|
|
@@ -34,7 +34,7 @@ const $ = (e) => {
|
|
|
34
34
|
sublabelWrapperClassName: p
|
|
35
35
|
},
|
|
36
36
|
r
|
|
37
|
-
)),
|
|
37
|
+
)), l = ({
|
|
38
38
|
afterLabelChildren: e,
|
|
39
39
|
children: r,
|
|
40
40
|
className: a,
|
|
@@ -64,16 +64,16 @@ const $ = (e) => {
|
|
|
64
64
|
);
|
|
65
65
|
return /* @__PURE__ */ t.createElement("span", { "aria-hidden": u.hideFromScreenReader, className: w, key: v }, u.text);
|
|
66
66
|
});
|
|
67
|
-
return /* @__PURE__ */ t.createElement("div", { className: N }, /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("label", { className: m, id: p, htmlFor: s, "data-testid": y, "data-analyticsid":
|
|
67
|
+
return /* @__PURE__ */ t.createElement("div", { className: N }, /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("label", { className: m, id: p, htmlFor: s, "data-testid": y, "data-analyticsid": L.Label }, /* @__PURE__ */ t.createElement("span", { className: n["label-content-wrapper"] }, r, /* @__PURE__ */ t.createElement("span", { className: n.label__texts }, g()))), /* @__PURE__ */ t.createElement("div", { className: h }, f && o(f, k) && t.cloneElement(f, {
|
|
68
68
|
mode: d
|
|
69
|
-
}), E &&
|
|
69
|
+
}), E && o(E, _) && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(S, { size: "3xs" }), t.cloneElement(E, {
|
|
70
70
|
mode: d === b.ondark ? "ondark" : "onwhite"
|
|
71
71
|
})))), e && /* @__PURE__ */ t.createElement("div", { className: n["after-label-children"] }, e));
|
|
72
|
-
}
|
|
72
|
+
};
|
|
73
73
|
export {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
l as default,
|
|
75
|
+
j as getLabelText,
|
|
76
|
+
q as renderLabel,
|
|
77
|
+
B as renderLabelAsParent
|
|
78
78
|
};
|
|
79
79
|
//# sourceMappingURL=Label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sources":["../../../src/components/Label/Label.tsx"],"sourcesContent":["import React, { FunctionComponent } from 'react';\n\nimport cn from 'classnames';\n\nimport { Sublabel, SublabelProps } from './SubLabel';\nimport { AnalyticsId, FormMode } from '../../constants';\nimport { isComponent } from '../../utils/component';\nimport Spacer from '../Spacer';\nimport StatusDot, { StatusDotProps } from '../StatusDot';\n\nimport styles from './styles.module.scss';\n\nexport type LabelText = {\n hideFromScreenReader?: boolean;\n text: string;\n type?: 'semibold' | 'normal';\n};\n\nexport interface LabelProps {\n /** Component shown after label - discourage use of this */\n afterLabelChildren?: React.ReactNode;\n /** Adds custom classes to the element. */\n children?: React.ReactNode;\n /** Adds custom classes to the label tag. */\n labelClassName?: string;\n /** Adds custom classes to the label text. */\n labelTextClassName?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Id that is put on the \"for\" attribute of the label */\n htmlFor?: string;\n /** Id som plasseres på <label/> */\n labelId?: string;\n /** Array of main label strings. Can be of type semibold or normal */\n labelTexts: LabelText[];\n /** Array of sublabel strings. Can be of type semibold or normal */\n mode?: keyof typeof FormMode;\n /** StatusDot placed underneath the last sublabel */\n statusDot?: React.ReactNode;\n /** Sublabel component */\n sublabel?: React.ReactNode;\n /** Adds custom classes to the div wrapping the sublabels. */\n sublabelWrapperClassName?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const getLabelText = (label: React.ReactNode): string => {\n let allLabelText = '';\n\n if (isComponent<LabelProps>(label, Label)) {\n label.props.labelTexts.forEach(labelText => {\n allLabelText += !labelText.hideFromScreenReader ? labelText.text : '';\n });\n }\n\n return allLabelText;\n};\n\nexport const renderLabel = (label: React.ReactNode, inputId: string, mode: FormMode): React.ReactNode => {\n return (\n <>\n {label && isComponent<LabelProps>(label, Label)\n ? React.cloneElement(label, {\n htmlFor: inputId,\n mode: mode,\n })\n : typeof label === 'string' && <Label labelTexts={[{ text: label, type: 'semibold' }]} htmlFor={inputId} mode={mode} />}\n </>\n );\n};\n\nexport const renderLabelAsParent = (\n label: React.ReactNode,\n children: React.ReactNode,\n inputId: string,\n mode: FormMode,\n labelClassName?: string,\n labelTextClassName?: string,\n sublabelWrapperClassName?: string,\n large?: boolean\n): React.ReactNode => {\n return (\n <>\n {label && isComponent<LabelProps>(label, Label)\n ? React.cloneElement(label, {\n htmlFor: inputId,\n mode: mode,\n children: children,\n labelClassName: cn(labelClassName, label.props.labelClassName),\n labelTextClassName: labelTextClassName,\n sublabelWrapperClassName: sublabelWrapperClassName,\n sublabel: large ? undefined : label.props.sublabel,\n statusDot: large ? undefined : label.props.statusDot,\n })\n : typeof label === 'string' && (\n <Label\n labelTexts={[{ text: label }]}\n htmlFor={inputId}\n mode={mode}\n labelClassName={labelClassName}\n labelTextClassName={labelTextClassName}\n sublabelWrapperClassName={sublabelWrapperClassName}\n >\n {children}\n </Label>\n )}\n </>\n );\n};\n\nconst Label: FunctionComponent<LabelProps> = ({\n afterLabelChildren,\n children,\n className,\n htmlFor,\n labelClassName,\n labelTextClassName,\n labelId,\n labelTexts,\n mode = FormMode.onwhite,\n statusDot,\n sublabel,\n sublabelWrapperClassName,\n testId,\n}) => {\n const hasChildren = children && typeof children !== 'undefined';\n const labelWrapperClasses = cn(\n styles['label-wrapper'],\n { [styles['label-wrapper--no-bottom-margin']]: hasChildren, [styles['label-wrapper--after-label-children']]: afterLabelChildren },\n className\n );\n\n const mapLabels = (): React.ReactNode => {\n return labelTexts.map((labelText, index) => {\n const labelClasses = cn(\n styles.label,\n {\n [styles['label--semibold']]: labelText.type === 'semibold',\n [styles['label--on-dark']]: mode === FormMode.ondark,\n },\n labelTextClassName\n );\n return (\n <span aria-hidden={labelText.hideFromScreenReader} className={labelClasses} key={index}>\n {labelText.text}\n </span>\n );\n });\n };\n\n return (\n <div className={labelWrapperClasses}>\n <div>\n <label className={labelClassName} id={labelId} htmlFor={htmlFor} data-testid={testId} data-analyticsid={AnalyticsId.Label}>\n <span className={styles['label-content-wrapper']}>\n {children}\n <span className={styles.label__texts}>{mapLabels()}</span>\n </span>\n </label>\n <div className={sublabelWrapperClassName}>\n {sublabel &&\n isComponent<SublabelProps>(sublabel, Sublabel) &&\n React.cloneElement(sublabel, {\n mode: mode as FormMode,\n })}\n {statusDot && isComponent<StatusDotProps>(statusDot, StatusDot) && (\n <>\n <Spacer size={'3xs'} />\n {React.cloneElement(statusDot, {\n mode: mode === FormMode.ondark ? 'ondark' : 'onwhite',\n })}\n </>\n )}\n </div>\n </div>\n {afterLabelChildren && <div className={styles['after-label-children']}>{afterLabelChildren}</div>}\n </div>\n );\n};\n\nexport default Label;\n"],"names":["getLabelText","label","allLabelText","isComponent","Label","labelText","renderLabel","inputId","mode","React","renderLabelAsParent","children","labelClassName","labelTextClassName","sublabelWrapperClassName","large","cn","afterLabelChildren","className","htmlFor","labelId","labelTexts","FormMode","statusDot","sublabel","testId","hasChildren","labelWrapperClasses","styles","mapLabels","index","labelClasses","AnalyticsId","Sublabel","StatusDot","Spacer"
|
|
1
|
+
{"version":3,"file":"Label.js","sources":["../../../src/components/Label/Label.tsx"],"sourcesContent":["import React, { FunctionComponent } from 'react';\n\nimport cn from 'classnames';\n\nimport { Sublabel, SublabelProps } from './SubLabel';\nimport { AnalyticsId, FormMode } from '../../constants';\nimport { isComponent } from '../../utils/component';\nimport Spacer from '../Spacer';\nimport StatusDot, { StatusDotProps } from '../StatusDot';\n\nimport styles from './styles.module.scss';\n\nexport type LabelText = {\n hideFromScreenReader?: boolean;\n text: string;\n type?: 'semibold' | 'normal';\n};\n\nexport interface LabelProps {\n /** Component shown after label - discourage use of this */\n afterLabelChildren?: React.ReactNode;\n /** Adds custom classes to the element. */\n children?: React.ReactNode;\n /** Adds custom classes to the label tag. */\n labelClassName?: string;\n /** Adds custom classes to the label text. */\n labelTextClassName?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Id that is put on the \"for\" attribute of the label */\n htmlFor?: string;\n /** Id som plasseres på <label/> */\n labelId?: string;\n /** Array of main label strings. Can be of type semibold or normal */\n labelTexts: LabelText[];\n /** Array of sublabel strings. Can be of type semibold or normal */\n mode?: keyof typeof FormMode;\n /** StatusDot placed underneath the last sublabel */\n statusDot?: React.ReactNode;\n /** Sublabel component */\n sublabel?: React.ReactNode;\n /** Adds custom classes to the div wrapping the sublabels. */\n sublabelWrapperClassName?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const getLabelText = (label: React.ReactNode): string => {\n let allLabelText = '';\n\n if (isComponent<LabelProps>(label, Label)) {\n label.props.labelTexts.forEach(labelText => {\n allLabelText += !labelText.hideFromScreenReader ? labelText.text : '';\n });\n }\n\n return allLabelText;\n};\n\nexport const renderLabel = (label: React.ReactNode, inputId: string, mode: FormMode): React.ReactNode => {\n return (\n <>\n {label && isComponent<LabelProps>(label, Label)\n ? React.cloneElement(label, {\n htmlFor: inputId,\n mode: mode,\n })\n : typeof label === 'string' && <Label labelTexts={[{ text: label, type: 'semibold' }]} htmlFor={inputId} mode={mode} />}\n </>\n );\n};\n\nexport const renderLabelAsParent = (\n label: React.ReactNode,\n children: React.ReactNode,\n inputId: string,\n mode: FormMode,\n labelClassName?: string,\n labelTextClassName?: string,\n sublabelWrapperClassName?: string,\n large?: boolean\n): React.ReactNode => {\n return (\n <>\n {label && isComponent<LabelProps>(label, Label)\n ? React.cloneElement(label, {\n htmlFor: inputId,\n mode: mode,\n children: children,\n labelClassName: cn(labelClassName, label.props.labelClassName),\n labelTextClassName: labelTextClassName,\n sublabelWrapperClassName: sublabelWrapperClassName,\n sublabel: large ? undefined : label.props.sublabel,\n statusDot: large ? undefined : label.props.statusDot,\n })\n : typeof label === 'string' && (\n <Label\n labelTexts={[{ text: label }]}\n htmlFor={inputId}\n mode={mode}\n labelClassName={labelClassName}\n labelTextClassName={labelTextClassName}\n sublabelWrapperClassName={sublabelWrapperClassName}\n >\n {children}\n </Label>\n )}\n </>\n );\n};\n\nconst Label: FunctionComponent<LabelProps> = ({\n afterLabelChildren,\n children,\n className,\n htmlFor,\n labelClassName,\n labelTextClassName,\n labelId,\n labelTexts,\n mode = FormMode.onwhite,\n statusDot,\n sublabel,\n sublabelWrapperClassName,\n testId,\n}) => {\n const hasChildren = children && typeof children !== 'undefined';\n const labelWrapperClasses = cn(\n styles['label-wrapper'],\n { [styles['label-wrapper--no-bottom-margin']]: hasChildren, [styles['label-wrapper--after-label-children']]: afterLabelChildren },\n className\n );\n\n const mapLabels = (): React.ReactNode => {\n return labelTexts.map((labelText, index) => {\n const labelClasses = cn(\n styles.label,\n {\n [styles['label--semibold']]: labelText.type === 'semibold',\n [styles['label--on-dark']]: mode === FormMode.ondark,\n },\n labelTextClassName\n );\n return (\n <span aria-hidden={labelText.hideFromScreenReader} className={labelClasses} key={index}>\n {labelText.text}\n </span>\n );\n });\n };\n\n return (\n <div className={labelWrapperClasses}>\n <div>\n <label className={labelClassName} id={labelId} htmlFor={htmlFor} data-testid={testId} data-analyticsid={AnalyticsId.Label}>\n <span className={styles['label-content-wrapper']}>\n {children}\n <span className={styles.label__texts}>{mapLabels()}</span>\n </span>\n </label>\n <div className={sublabelWrapperClassName}>\n {sublabel &&\n isComponent<SublabelProps>(sublabel, Sublabel) &&\n React.cloneElement(sublabel, {\n mode: mode as FormMode,\n })}\n {statusDot && isComponent<StatusDotProps>(statusDot, StatusDot) && (\n <>\n <Spacer size={'3xs'} />\n {React.cloneElement(statusDot, {\n mode: mode === FormMode.ondark ? 'ondark' : 'onwhite',\n })}\n </>\n )}\n </div>\n </div>\n {afterLabelChildren && <div className={styles['after-label-children']}>{afterLabelChildren}</div>}\n </div>\n );\n};\n\nexport default Label;\n"],"names":["getLabelText","label","allLabelText","isComponent","Label","labelText","renderLabel","inputId","mode","React","renderLabelAsParent","children","labelClassName","labelTextClassName","sublabelWrapperClassName","large","cn","afterLabelChildren","className","htmlFor","labelId","labelTexts","FormMode","statusDot","sublabel","testId","hasChildren","labelWrapperClasses","styles","mapLabels","index","labelClasses","AnalyticsId","Sublabel","StatusDot","Spacer"],"mappings":";;;;;;;;AA+Ca,MAAAA,IAAe,CAACC,MAAmC;AAC9D,MAAIC,IAAe;AAEf,SAAAC,EAAwBF,GAAOG,CAAK,KA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KAAapB,EAA4BoB,GAAWW,CAAS,KAE1DzB,gBAAAA,EAAA,cAAAA,EAAA,UAAA,MAAAA,gBAAAA,EAAA,cAAC0B,KAAO,MAAM,MAAA,CAAO,GACpB1B,EAAM,aAAac,GAAW;AAAA,IAC7B,MAAMf,MAASc,EAAS,SAAS,WAAW;AAAA,EAC7C,CAAA,CACH,CAEJ,CACF,GACCL,KAAuBR,gBAAAA,EAAA,cAAA,OAAA,EAAI,WAAWmB,EAAO,sBAAsB,EAAA,GAAIX,CAAmB,CAC7F;AAEJ;"}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
class
|
|
3
|
-
constructor(
|
|
4
|
-
super(
|
|
1
|
+
import r from "react";
|
|
2
|
+
class o extends r.Component {
|
|
3
|
+
constructor(t) {
|
|
4
|
+
super(t), this.state = {
|
|
5
5
|
error: !1
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
8
|
componentDidCatch() {
|
|
9
9
|
this.setState({ error: !0 });
|
|
10
10
|
}
|
|
11
|
-
componentDidUpdate(
|
|
12
|
-
|
|
11
|
+
componentDidUpdate(t) {
|
|
12
|
+
t.reset !== this.props.reset && this.setState({ error: !1 });
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
15
|
return this.state.error ? this.props.fallback : this.props.children;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
const a = e;
|
|
19
18
|
export {
|
|
20
|
-
|
|
19
|
+
o as default
|
|
21
20
|
};
|
|
22
21
|
//# sourceMappingURL=ErrorBoundary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sources":["../../../src/components/LazyIcon/ErrorBoundary.tsx"],"sourcesContent":["import React from 'react';\n\ninterface ErrorBoundaryProps<T> {\n fallback: React.ReactNode;\n children: React.ReactNode;\n reset: T;\n}\n\ninterface ErrorBoundaryState {\n error: boolean;\n}\n\nclass ErrorBoundary<T> extends React.Component<ErrorBoundaryProps<T>, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps<T>) {\n super(props);\n this.state = {\n error: false,\n };\n }\n\n componentDidCatch(): void {\n this.setState({ error: true });\n }\n\n componentDidUpdate(prevProps: Readonly<ErrorBoundaryProps<T>>): void {\n if (prevProps.reset !== this.props.reset) {\n this.setState({ error: false });\n }\n }\n\n render(): React.ReactNode {\n return this.state.error ? this.props.fallback : this.props.children;\n }\n}\n\nexport default ErrorBoundary;\n"],"names":["ErrorBoundary","React","props","prevProps"
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sources":["../../../src/components/LazyIcon/ErrorBoundary.tsx"],"sourcesContent":["import React from 'react';\n\ninterface ErrorBoundaryProps<T> {\n fallback: React.ReactNode;\n children: React.ReactNode;\n reset: T;\n}\n\ninterface ErrorBoundaryState {\n error: boolean;\n}\n\nclass ErrorBoundary<T> extends React.Component<ErrorBoundaryProps<T>, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps<T>) {\n super(props);\n this.state = {\n error: false,\n };\n }\n\n componentDidCatch(): void {\n this.setState({ error: true });\n }\n\n componentDidUpdate(prevProps: Readonly<ErrorBoundaryProps<T>>): void {\n if (prevProps.reset !== this.props.reset) {\n this.setState({ error: false });\n }\n }\n\n render(): React.ReactNode {\n return this.state.error ? this.props.fallback : this.props.children;\n }\n}\n\nexport default ErrorBoundary;\n"],"names":["ErrorBoundary","React","props","prevProps"],"mappings":";AAYA,MAAMA,UAAyBC,EAAM,UAAqD;AAAA,EACxF,YAAYC,GAA8B;AACxC,UAAMA,CAAK,GACX,KAAK,QAAQ;AAAA,MACX,OAAO;AAAA,IAAA;AAAA,EAEX;AAAA,EAEA,oBAA0B;AACxB,SAAK,SAAS,EAAE,OAAO,GAAM,CAAA;AAAA,EAC/B;AAAA,EAEA,mBAAmBC,GAAkD;AACnE,IAAIA,EAAU,UAAU,KAAK,MAAM,SACjC,KAAK,SAAS,EAAE,OAAO,GAAO,CAAA;AAAA,EAElC;AAAA,EAEA,SAA0B;AACxB,WAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,WAAW,KAAK,MAAM;AAAA,EAC7D;AACF;"}
|
|
@@ -4,7 +4,7 @@ import I from "./ErrorBoundary.js";
|
|
|
4
4
|
import { isServerSide as x } from "./utils.js";
|
|
5
5
|
import { Icon as a } from "../Icon/Icon.js";
|
|
6
6
|
import { IconSize as l } from "../../constants.js";
|
|
7
|
-
const h = (o) => p(() => c(/* @__PURE__ */ Object.assign({ "../Icons/ActiveMonitoring.tsx": () => import("../Icons/ActiveMonitoring.js"), "../Icons/AcupunctureBack.tsx": () => import("../Icons/AcupunctureBack.js"), "../Icons/AlarmClock.tsx": () => import("../Icons/AlarmClock.js"), "../Icons/AlertSignFill.tsx": () => import("../Icons/AlertSignFill.js"), "../Icons/AlertSignStroke.tsx": () => import("../Icons/AlertSignStroke.js"), "../Icons/Amputation.tsx": () => import("../Icons/Amputation.js"), "../Icons/Anxiety.tsx": () => import("../Icons/Anxiety.js"), "../Icons/Apple.tsx": () => import("../Icons/Apple.js"), "../Icons/Archive.tsx": () => import("../Icons/Archive.js"), "../Icons/ArmFlexing.tsx": () => import("../Icons/ArmFlexing.js"), "../Icons/ArrowDown.tsx": () => import("../Icons/ArrowDown.js"), "../Icons/ArrowLeft.tsx": () => import("../Icons/ArrowLeft.js"), "../Icons/ArrowRight.tsx": () => import("../Icons/ArrowRight.js"), "../Icons/ArrowUp.tsx": () => import("../Icons/ArrowUp.js"), "../Icons/ArrowUpRight.tsx": () => import("../Icons/ArrowUpRight.js"), "../Icons/Attachment.tsx": () => import("../Icons/Attachment.js"), "../Icons/Atv.tsx": () => import("../Icons/Atv.js"), "../Icons/Avatar.tsx": () => import("../Icons/Avatar.js"), "../Icons/AwakePersonOnPillow.tsx": () => import("../Icons/AwakePersonOnPillow.js"), "../Icons/Baby.tsx": () => import("../Icons/Baby.js"), "../Icons/BandAid.tsx": () => import("../Icons/BandAid.js"), "../Icons/BeerAndPills.tsx": () => import("../Icons/BeerAndPills.js"), "../Icons/Bell.tsx": () => import("../Icons/Bell.js"), "../Icons/Bike.tsx": () => import("../Icons/Bike.js"), "../Icons/BirthControl.tsx": () => import("../Icons/BirthControl.js"), "../Icons/BirthdayCake.tsx": () => import("../Icons/BirthdayCake.js"), "../Icons/Boat.tsx": () => import("../Icons/Boat.js"), "../Icons/Body.tsx": () => import("../Icons/Body.js"), "../Icons/Braille.tsx": () => import("../Icons/Braille.js"), "../Icons/Brain.tsx": () => import("../Icons/Brain.js"), "../Icons/BreastReconstruction.tsx": () => import("../Icons/BreastReconstruction.js"), "../Icons/BreastRemoval.tsx": () => import("../Icons/BreastRemoval.js"), "../Icons/Breasts.tsx": () => import("../Icons/Breasts.js"), "../Icons/BrokenHeart.tsx": () => import("../Icons/BrokenHeart.js"), "../Icons/BrokenPuzzle.tsx": () => import("../Icons/BrokenPuzzle.js"), "../Icons/Bus.tsx": () => import("../Icons/Bus.js"), "../Icons/Calendar.tsx": () => import("../Icons/Calendar.js"), "../Icons/CalendarChange.tsx": () => import("../Icons/CalendarChange.js"), "../Icons/CalendarCheck.tsx": () => import("../Icons/CalendarCheck.js"), "../Icons/CalendarEvent.tsx": () => import("../Icons/CalendarEvent.js"), "../Icons/CalendarSave.tsx": () => import("../Icons/CalendarSave.js"), "../Icons/Cancer.tsx": () => import("../Icons/Cancer.js"), "../Icons/Candle.tsx": () => import("../Icons/Candle.js"), "../Icons/Car.tsx": () => import("../Icons/Car.js"), "../Icons/Change.tsx": () => import("../Icons/Change.js"), "../Icons/Check.tsx": () => import("../Icons/Check.js"), "../Icons/CheckFill.tsx": () => import("../Icons/CheckFill.js"), "../Icons/CheckOutline.tsx": () => import("../Icons/CheckOutline.js"), "../Icons/Chest.tsx": () => import("../Icons/Chest.js"), "../Icons/ChevronDown.tsx": () => import("../Icons/ChevronDown.js"), "../Icons/ChevronLeft.tsx": () => import("../Icons/ChevronLeft.js"), "../Icons/ChevronRight.tsx": () => import("../Icons/ChevronRight.js"), "../Icons/ChevronUp.tsx": () => import("../Icons/ChevronUp.js"), "../Icons/ChevronsDown.tsx": () => import("../Icons/ChevronsDown.js"), "../Icons/ChevronsUp.tsx": () => import("../Icons/ChevronsUp.js"), "../Icons/ChildPlaying.tsx": () => import("../Icons/ChildPlaying.js"), "../Icons/Cigarette.tsx": () => import("../Icons/Cigarette.js"), "../Icons/Coins.tsx": () => import("../Icons/Coins.js"), "../Icons/Contacts.tsx": () => import("../Icons/Contacts.js"), "../Icons/Copy.tsx": () => import("../Icons/Copy.js"), "../Icons/CoronaCertificate.tsx": () => import("../Icons/CoronaCertificate.js"), "../Icons/Coronavirus.tsx": () => import("../Icons/Coronavirus.js"), "../Icons/Cough.tsx": () => import("../Icons/Cough.js"), "../Icons/CriticalHealthInfo.tsx": () => import("../Icons/CriticalHealthInfo.js"), "../Icons/Cross.tsx": () => import("../Icons/Cross.js"), "../Icons/DataExchange.tsx": () => import("../Icons/DataExchange.js"), "../Icons/DataReceived.tsx": () => import("../Icons/DataReceived.js"), "../Icons/DataSent.tsx": () => import("../Icons/DataSent.js"), "../Icons/Depression.tsx": () => import("../Icons/Depression.js"), "../Icons/DigestiveSystem.tsx": () => import("../Icons/DigestiveSystem.js"), "../Icons/Dizzy.tsx": () => import("../Icons/Dizzy.js"), "../Icons/Documents.tsx": () => import("../Icons/Documents.js"), "../Icons/Dog.tsx": () => import("../Icons/Dog.js"), "../Icons/DonorCard.tsx": () => import("../Icons/DonorCard.js"), "../Icons/Download.tsx": () => import("../Icons/Download.js"), "../Icons/Draft.tsx": () => import("../Icons/Draft.js"), "../Icons/EChat.tsx": () => import("../Icons/EChat.js"), "../Icons/Ear.tsx": () => import("../Icons/Ear.js"), "../Icons/EarDeaf.tsx": () => import("../Icons/EarDeaf.js"), "../Icons/EarHearingAid.tsx": () => import("../Icons/EarHearingAid.js"), "../Icons/EarNoseThroat.tsx": () => import("../Icons/EarNoseThroat.js"), "../Icons/EarVolume.tsx": () => import("../Icons/EarVolume.js"), "../Icons/ElderlyPerson.tsx": () => import("../Icons/ElderlyPerson.js"), "../Icons/Embolization.tsx": () => import("../Icons/Embolization.js"), "../Icons/EmergencyCall.tsx": () => import("../Icons/EmergencyCall.js"), "../Icons/EmoticonAnnoyed.tsx": () => import("../Icons/EmoticonAnnoyed.js"), "../Icons/EmoticonDelighted.tsx": () => import("../Icons/EmoticonDelighted.js"), "../Icons/EmoticonDisappointed.tsx": () => import("../Icons/EmoticonDisappointed.js"), "../Icons/EmoticonHappy.tsx": () => import("../Icons/EmoticonHappy.js"), "../Icons/EmoticonMeh.tsx": () => import("../Icons/EmoticonMeh.js"), "../Icons/EnterFullScreen.tsx": () => import("../Icons/EnterFullScreen.js"), "../Icons/Envelope.tsx": () => import("../Icons/Envelope.js"), "../Icons/Epilepsy.tsx": () => import("../Icons/Epilepsy.js"), "../Icons/Eraser.tsx": () => import("../Icons/Eraser.js"), "../Icons/ErrorSignFill.tsx": () => import("../Icons/ErrorSignFill.js"), "../Icons/ErrorSignStroke.tsx": () => import("../Icons/ErrorSignStroke.js"), "../Icons/EuropeanHealthCard.tsx": () => import("../Icons/EuropeanHealthCard.js"), "../Icons/ExitFullScreen.tsx": () => import("../Icons/ExitFullScreen.js"), "../Icons/Eye.tsx": () => import("../Icons/Eye.js"), "../Icons/Facebook.tsx": () => import("../Icons/Facebook.js"), "../Icons/FallingLeaf.tsx": () => import("../Icons/FallingLeaf.js"), "../Icons/Female.tsx": () => import("../Icons/Female.js"), "../Icons/FemaleDoctor.tsx": () => import("../Icons/FemaleDoctor.js"), "../Icons/Ferry.tsx": () => import("../Icons/Ferry.js"), "../Icons/File.tsx": () => import("../Icons/File.js"), "../Icons/Filter.tsx": () => import("../Icons/Filter.js"), "../Icons/FingerBleed.tsx": () => import("../Icons/FingerBleed.js"), "../Icons/FirstAidKit.tsx": () => import("../Icons/FirstAidKit.js"), "../Icons/FloppyDisk.tsx": () => import("../Icons/FloppyDisk.js"), "../Icons/Football.tsx": () => import("../Icons/Football.js"), "../Icons/Form.tsx": () => import("../Icons/Form.js"), "../Icons/Forward.tsx": () => import("../Icons/Forward.js"), "../Icons/Gallery.tsx": () => import("../Icons/Gallery.js"), "../Icons/Garden.tsx": () => import("../Icons/Garden.js"), "../Icons/GasCan.tsx": () => import("../Icons/GasCan.js"), "../Icons/GenderIdentity.tsx": () => import("../Icons/GenderIdentity.js"), "../Icons/Glasses.tsx": () => import("../Icons/Glasses.js"), "../Icons/Globe.tsx": () => import("../Icons/Globe.js"), "../Icons/Graph.tsx": () => import("../Icons/Graph.js"), "../Icons/Group.tsx": () => import("../Icons/Group.js"), "../Icons/GroupTwins.tsx": () => import("../Icons/GroupTwins.js"), "../Icons/HTMLFile.tsx": () => import("../Icons/HTMLFile.js"), "../Icons/HandWaving.tsx": () => import("../Icons/HandWaving.js"), "../Icons/HandWithDisease.tsx": () => import("../Icons/HandWithDisease.js"), "../Icons/HandsAndHeart.tsx": () => import("../Icons/HandsAndHeart.js"), "../Icons/HealthClinic.tsx": () => import("../Icons/HealthClinic.js"), "../Icons/HealthWarning.tsx": () => import("../Icons/HealthWarning.js"), "../Icons/HealthcarePerson.tsx": () => import("../Icons/HealthcarePerson.js"), "../Icons/HealthcarePersonell.tsx": () => import("../Icons/HealthcarePersonell.js"), "../Icons/HearingProtection.tsx": () => import("../Icons/HearingProtection.js"), "../Icons/Heart.tsx": () => import("../Icons/Heart.js"), "../Icons/HeartHands.tsx": () => import("../Icons/HeartHands.js"), "../Icons/HelpSign.tsx": () => import("../Icons/HelpSign.js"), "../Icons/HelpingHand.tsx": () => import("../Icons/HelpingHand.js"), "../Icons/Hemodialysis.tsx": () => import("../Icons/Hemodialysis.js"), "../Icons/Hiker.tsx": () => import("../Icons/Hiker.js"), "../Icons/Hipprosthesis.tsx": () => import("../Icons/Hipprosthesis.js"), "../Icons/History.tsx": () => import("../Icons/History.js"), "../Icons/HivAndAids.tsx": () => import("../Icons/HivAndAids.js"), "../Icons/Home.tsx": () => import("../Icons/Home.js"), "../Icons/Hormone.tsx": () => import("../Icons/Hormone.js"), "../Icons/Hospital.tsx": () => import("../Icons/Hospital.js"), "../Icons/Hourglass.tsx": () => import("../Icons/Hourglass.js"), "../Icons/ImgFile.tsx": () => import("../Icons/ImgFile.js"), "../Icons/Inbox.tsx": () => import("../Icons/Inbox.js"), "../Icons/InfoSignFill.tsx": () => import("../Icons/InfoSignFill.js"), "../Icons/InfoSignStroke.tsx": () => import("../Icons/InfoSignStroke.js"), "../Icons/Instagram.tsx": () => import("../Icons/Instagram.js"), "../Icons/Intravenous.tsx": () => import("../Icons/Intravenous.js"), "../Icons/JointPain.tsx": () => import("../Icons/JointPain.js"), "../Icons/Journal.tsx": () => import("../Icons/Journal.js"), "../Icons/JpgFile.tsx": () => import("../Icons/JpgFile.js"), "../Icons/Kidney.tsx": () => import("../Icons/Kidney.js"), "../Icons/KitchenScale.tsx": () => import("../Icons/KitchenScale.js"), "../Icons/Kjernejournal.tsx": () => import("../Icons/Kjernejournal.js"), "../Icons/Laboratory.tsx": () => import("../Icons/Laboratory.js"), "../Icons/LaptopBlog.tsx": () => import("../Icons/LaptopBlog.js"), "../Icons/LawBook.tsx": () => import("../Icons/LawBook.js"), "../Icons/LegalDocument.tsx": () => import("../Icons/LegalDocument.js"), "../Icons/LightBulb.tsx": () => import("../Icons/LightBulb.js"), "../Icons/List.tsx": () => import("../Icons/List.js"), "../Icons/Location.tsx": () => import("../Icons/Location.js"), "../Icons/Lock.tsx": () => import("../Icons/Lock.js"), "../Icons/Login.tsx": () => import("../Icons/Login.js"), "../Icons/Logout.tsx": () => import("../Icons/Logout.js"), "../Icons/Lungs.tsx": () => import("../Icons/Lungs.js"), "../Icons/Makeup.tsx": () => import("../Icons/Makeup.js"), "../Icons/MaleDoctor.tsx": () => import("../Icons/MaleDoctor.js"), "../Icons/MaleDoctorAndPerson.tsx": () => import("../Icons/MaleDoctorAndPerson.js"), "../Icons/MaleGenitalia.tsx": () => import("../Icons/MaleGenitalia.js"), "../Icons/Medicine.tsx": () => import("../Icons/Medicine.js"), "../Icons/MedicineWarning.tsx": () => import("../Icons/MedicineWarning.js"), "../Icons/MentalHealthAdult.tsx": () => import("../Icons/MentalHealthAdult.js"), "../Icons/MentalHealthChild.tsx": () => import("../Icons/MentalHealthChild.js"), "../Icons/Menu.tsx": () => import("../Icons/Menu.js"), "../Icons/Microscope.tsx": () => import("../Icons/Microscope.js"), "../Icons/Minus.tsx": () => import("../Icons/Minus.js"), "../Icons/Mirror.tsx": () => import("../Icons/Mirror.js"), "../Icons/MobilePhone.tsx": () => import("../Icons/MobilePhone.js"), "../Icons/MotherHoldingBaby.tsx": () => import("../Icons/MotherHoldingBaby.js"), "../Icons/MuscleBack.tsx": () => import("../Icons/MuscleBack.js"), "../Icons/MuscleLeg.tsx": () => import("../Icons/MuscleLeg.js"), "../Icons/Mushroom.tsx": () => import("../Icons/Mushroom.js"), "../Icons/Music.tsx": () => import("../Icons/Music.js"), "../Icons/MusselsAndSalt.tsx": () => import("../Icons/MusselsAndSalt.js"), "../Icons/NoAccess.tsx": () => import("../Icons/NoAccess.js"), "../Icons/NoEye.tsx": () => import("../Icons/NoEye.js"), "../Icons/NoFilter.tsx": () => import("../Icons/NoFilter.js"), "../Icons/Notepad.tsx": () => import("../Icons/Notepad.js"), "../Icons/Osteotomy.tsx": () => import("../Icons/Osteotomy.js"), "../Icons/PaintRoller.tsx": () => import("../Icons/PaintRoller.js"), "../Icons/PaperPlane.tsx": () => import("../Icons/PaperPlane.js"), "../Icons/PatientAndPerson.tsx": () => import("../Icons/PatientAndPerson.js"), "../Icons/Pause.tsx": () => import("../Icons/Pause.js"), "../Icons/PdfFile.tsx": () => import("../Icons/PdfFile.js"), "../Icons/Pencil.tsx": () => import("../Icons/Pencil.js"), "../Icons/PeopleTalking.tsx": () => import("../Icons/PeopleTalking.js"), "../Icons/Peritonealdialysis.tsx": () => import("../Icons/Peritonealdialysis.js"), "../Icons/Person.tsx": () => import("../Icons/Person.js"), "../Icons/PersonAndPatient.tsx": () => import("../Icons/PersonAndPatient.js"), "../Icons/PersonCancel.tsx": () => import("../Icons/PersonCancel.js"), "../Icons/PersonInXRayMachine.tsx": () => import("../Icons/PersonInXRayMachine.js"), "../Icons/PersonOverweight.tsx": () => import("../Icons/PersonOverweight.js"), "../Icons/PersonRelaxing.tsx": () => import("../Icons/PersonRelaxing.js"), "../Icons/PersonWithBrain.tsx": () => import("../Icons/PersonWithBrain.js"), "../Icons/PersonWithBrokenArm.tsx": () => import("../Icons/PersonWithBrokenArm.js"), "../Icons/PersonWithCrutches.tsx": () => import("../Icons/PersonWithCrutches.js"), "../Icons/PersonWithJaw.tsx": () => import("../Icons/PersonWithJaw.js"), "../Icons/PersonWithMagnifyingGlass.tsx": () => import("../Icons/PersonWithMagnifyingGlass.js"), "../Icons/PersonWithSenses.tsx": () => import("../Icons/PersonWithSenses.js"), "../Icons/PersonWorking.tsx": () => import("../Icons/PersonWorking.js"), "../Icons/PersonalPlan.tsx": () => import("../Icons/PersonalPlan.js"), "../Icons/PizzaSlice.tsx": () => import("../Icons/PizzaSlice.js"), "../Icons/Plane.tsx": () => import("../Icons/Plane.js"), "../Icons/Plant.tsx": () => import("../Icons/Plant.js"), "../Icons/Play.tsx": () => import("../Icons/Play.js"), "../Icons/PlusLarge.tsx": () => import("../Icons/PlusLarge.js"), "../Icons/PlusSmall.tsx": () => import("../Icons/PlusSmall.js"), "../Icons/PngFile.tsx": () => import("../Icons/PngFile.js"), "../Icons/Podcast.tsx": () => import("../Icons/Podcast.js"), "../Icons/PoisonInformation.tsx": () => import("../Icons/PoisonInformation.js"), "../Icons/Pregnant.tsx": () => import("../Icons/Pregnant.js"), "../Icons/Printer.tsx": () => import("../Icons/Printer.js"), "../Icons/Psychosis.tsx": () => import("../Icons/Psychosis.js"), "../Icons/Publication.tsx": () => import("../Icons/Publication.js"), "../Icons/Puzzle.tsx": () => import("../Icons/Puzzle.js"), "../Icons/QrCode.tsx": () => import("../Icons/QrCode.js"), "../Icons/Quarrel.tsx": () => import("../Icons/Quarrel.js"), "../Icons/RadioTherapy.tsx": () => import("../Icons/RadioTherapy.js"), "../Icons/RadioactiveTreatment.tsx": () => import("../Icons/RadioactiveTreatment.js"), "../Icons/Radioiodine.tsx": () => import("../Icons/Radioiodine.js"), "../Icons/Receipt.tsx": () => import("../Icons/Receipt.js"), "../Icons/Receptionist.tsx": () => import("../Icons/Receptionist.js"), "../Icons/Recovery.tsx": () => import("../Icons/Recovery.js"), "../Icons/Referral.tsx": () => import("../Icons/Referral.js"), "../Icons/Refresh.tsx": () => import("../Icons/Refresh.js"), "../Icons/Refund.tsx": () => import("../Icons/Refund.js"), "../Icons/Reply.tsx": () => import("../Icons/Reply.js"), "../Icons/Rocket.tsx": () => import("../Icons/Rocket.js"), "../Icons/RtfFile.tsx": () => import("../Icons/RtfFile.js"), "../Icons/STDs.tsx": () => import("../Icons/STDs.js"), "../Icons/Save.tsx": () => import("../Icons/Save.js"), "../Icons/Scale.tsx": () => import("../Icons/Scale.js"), "../Icons/ScreenReader.tsx": () => import("../Icons/ScreenReader.js"), "../Icons/Search.tsx": () => import("../Icons/Search.js"), "../Icons/SectionSign.tsx": () => import("../Icons/SectionSign.js"), "../Icons/Settings.tsx": () => import("../Icons/Settings.js"), "../Icons/Sexualorientation.tsx": () => import("../Icons/Sexualorientation.js"), "../Icons/ShakingHand.tsx": () => import("../Icons/ShakingHand.js"), "../Icons/Share.tsx": () => import("../Icons/Share.js"), "../Icons/Shield.tsx": () => import("../Icons/Shield.js"), "../Icons/ShuntOperation.tsx": () => import("../Icons/ShuntOperation.js"), "../Icons/Skeleton.tsx": () => import("../Icons/Skeleton.js"), "../Icons/Skin.tsx": () => import("../Icons/Skin.js"), "../Icons/Snake.tsx": () => import("../Icons/Snake.js"), "../Icons/Snapchat.tsx": () => import("../Icons/Snapchat.js"), "../Icons/SortDown.tsx": () => import("../Icons/SortDown.js"), "../Icons/SortUp.tsx": () => import("../Icons/SortUp.js"), "../Icons/SpeechBubble.tsx": () => import("../Icons/SpeechBubble.js"), "../Icons/Spray.tsx": () => import("../Icons/Spray.js"), "../Icons/Stopwatch.tsx": () => import("../Icons/Stopwatch.js"), "../Icons/Sun.tsx": () => import("../Icons/Sun.js"), "../Icons/SupportingPerson.tsx": () => import("../Icons/SupportingPerson.js"), "../Icons/Surgery.tsx": () => import("../Icons/Surgery.js"), "../Icons/Syringe.tsx": () => import("../Icons/Syringe.js"), "../Icons/Taxi.tsx": () => import("../Icons/Taxi.js"), "../Icons/TeddyBear.tsx": () => import("../Icons/TeddyBear.js"), "../Icons/Teenagers.tsx": () => import("../Icons/Teenagers.js"), "../Icons/ThinkingAboutBaby.tsx": () => import("../Icons/ThinkingAboutBaby.js"), "../Icons/Ticket.tsx": () => import("../Icons/Ticket.js"), "../Icons/TimePassing.tsx": () => import("../Icons/TimePassing.js"), "../Icons/Tombstone.tsx": () => import("../Icons/Tombstone.js"), "../Icons/Toolbox.tsx": () => import("../Icons/Toolbox.js"), "../Icons/Tooth.tsx": () => import("../Icons/Tooth.js"), "../Icons/TotalKneeProsthesis.tsx": () => import("../Icons/TotalKneeProsthesis.js"), "../Icons/Train.tsx": () => import("../Icons/Train.js"), "../Icons/Transplantation.tsx": () => import("../Icons/Transplantation.js"), "../Icons/TrashCan.tsx": () => import("../Icons/TrashCan.js"), "../Icons/TravelRoute.tsx": () => import("../Icons/TravelRoute.js"), "../Icons/TriangleX.tsx": () => import("../Icons/TriangleX.js"), "../Icons/Twitter.tsx": () => import("../Icons/Twitter.js"), "../Icons/Undo.tsx": () => import("../Icons/Undo.js"), "../Icons/UniProsthesis.tsx": () => import("../Icons/UniProsthesis.js"), "../Icons/Upload.tsx": () => import("../Icons/Upload.js"), "../Icons/UserOrganization.tsx": () => import("../Icons/UserOrganization.js"), "../Icons/Vaccine.tsx": () => import("../Icons/Vaccine.js"), "../Icons/VerticalDots.tsx": () => import("../Icons/VerticalDots.js"), "../Icons/VideoCamera.tsx": () => import("../Icons/VideoCamera.js"), "../Icons/VideoChat.tsx": () => import("../Icons/VideoChat.js"), "../Icons/Wallet.tsx": () => import("../Icons/Wallet.js"), "../Icons/Watch.tsx": () => import("../Icons/Watch.js"), "../Icons/Website.tsx": () => import("../Icons/Website.js"), "../Icons/Wheelchair.tsx": () => import("../Icons/Wheelchair.js"), "../Icons/WheelchairActive.tsx": () => import("../Icons/WheelchairActive.js"), "../Icons/Window.tsx": () => import("../Icons/Window.js"), "../Icons/WordDocument.tsx": () => import("../Icons/WordDocument.js"), "../Icons/WorkSuitcase.tsx": () => import("../Icons/WorkSuitcase.js"), "../Icons/X.tsx": () => import("../Icons/X.js"), "../Icons/XOutline.tsx": () => import("../Icons/XOutline.js"), "../Icons/XmlFile.tsx": () => import("../Icons/XmlFile.js"), "../Icons/YouTube.tsx": () => import("../Icons/YouTube.js"), "../Icons/Zoom.tsx": () => import("../Icons/Zoom.js") }), `../Icons/${o}.tsx`)), d = ({ iconName: o, size: t = l.Small, ...r }) => {
|
|
7
|
+
const h = (o) => p(() => c(/* @__PURE__ */ Object.assign({ "../Icons/ActiveMonitoring.tsx": () => import("../Icons/ActiveMonitoring.js"), "../Icons/AcupunctureBack.tsx": () => import("../Icons/AcupunctureBack.js"), "../Icons/AlarmClock.tsx": () => import("../Icons/AlarmClock.js"), "../Icons/AlertSignFill.tsx": () => import("../Icons/AlertSignFill.js"), "../Icons/AlertSignStroke.tsx": () => import("../Icons/AlertSignStroke.js"), "../Icons/Amputation.tsx": () => import("../Icons/Amputation.js"), "../Icons/Anxiety.tsx": () => import("../Icons/Anxiety.js"), "../Icons/Apple.tsx": () => import("../Icons/Apple.js"), "../Icons/Archive.tsx": () => import("../Icons/Archive.js"), "../Icons/ArmFlexing.tsx": () => import("../Icons/ArmFlexing.js"), "../Icons/ArrowDown.tsx": () => import("../Icons/ArrowDown.js"), "../Icons/ArrowLeft.tsx": () => import("../Icons/ArrowLeft.js"), "../Icons/ArrowRight.tsx": () => import("../Icons/ArrowRight.js"), "../Icons/ArrowUp.tsx": () => import("../Icons/ArrowUp.js"), "../Icons/ArrowUpRight.tsx": () => import("../Icons/ArrowUpRight.js"), "../Icons/Attachment.tsx": () => import("../Icons/Attachment.js"), "../Icons/Atv.tsx": () => import("../Icons/Atv.js"), "../Icons/Avatar.tsx": () => import("../Icons/Avatar.js"), "../Icons/AwakePersonOnPillow.tsx": () => import("../Icons/AwakePersonOnPillow.js"), "../Icons/Baby.tsx": () => import("../Icons/Baby.js"), "../Icons/BandAid.tsx": () => import("../Icons/BandAid.js"), "../Icons/BeerAndPills.tsx": () => import("../Icons/BeerAndPills.js"), "../Icons/Bell.tsx": () => import("../Icons/Bell.js"), "../Icons/Bike.tsx": () => import("../Icons/Bike.js"), "../Icons/BirthControl.tsx": () => import("../Icons/BirthControl.js"), "../Icons/BirthdayCake.tsx": () => import("../Icons/BirthdayCake.js"), "../Icons/Boat.tsx": () => import("../Icons/Boat.js"), "../Icons/Body.tsx": () => import("../Icons/Body.js"), "../Icons/Braille.tsx": () => import("../Icons/Braille.js"), "../Icons/Brain.tsx": () => import("../Icons/Brain.js"), "../Icons/BreastReconstruction.tsx": () => import("../Icons/BreastReconstruction.js"), "../Icons/BreastRemoval.tsx": () => import("../Icons/BreastRemoval.js"), "../Icons/Breasts.tsx": () => import("../Icons/Breasts.js"), "../Icons/BrokenHeart.tsx": () => import("../Icons/BrokenHeart.js"), "../Icons/BrokenPuzzle.tsx": () => import("../Icons/BrokenPuzzle.js"), "../Icons/Bus.tsx": () => import("../Icons/Bus.js"), "../Icons/Calendar.tsx": () => import("../Icons/Calendar.js"), "../Icons/CalendarChange.tsx": () => import("../Icons/CalendarChange.js"), "../Icons/CalendarCheck.tsx": () => import("../Icons/CalendarCheck.js"), "../Icons/CalendarEvent.tsx": () => import("../Icons/CalendarEvent.js"), "../Icons/CalendarSave.tsx": () => import("../Icons/CalendarSave.js"), "../Icons/Cancer.tsx": () => import("../Icons/Cancer.js"), "../Icons/Candle.tsx": () => import("../Icons/Candle.js"), "../Icons/Car.tsx": () => import("../Icons/Car.js"), "../Icons/Change.tsx": () => import("../Icons/Change.js"), "../Icons/Check.tsx": () => import("../Icons/Check.js"), "../Icons/CheckFill.tsx": () => import("../Icons/CheckFill.js"), "../Icons/CheckOutline.tsx": () => import("../Icons/CheckOutline.js"), "../Icons/Chest.tsx": () => import("../Icons/Chest.js"), "../Icons/ChevronDown.tsx": () => import("../Icons/ChevronDown.js"), "../Icons/ChevronLeft.tsx": () => import("../Icons/ChevronLeft.js"), "../Icons/ChevronRight.tsx": () => import("../Icons/ChevronRight.js"), "../Icons/ChevronUp.tsx": () => import("../Icons/ChevronUp.js"), "../Icons/ChevronsDown.tsx": () => import("../Icons/ChevronsDown.js"), "../Icons/ChevronsUp.tsx": () => import("../Icons/ChevronsUp.js"), "../Icons/ChildPlaying.tsx": () => import("../Icons/ChildPlaying.js"), "../Icons/Cigarette.tsx": () => import("../Icons/Cigarette.js"), "../Icons/Coins.tsx": () => import("../Icons/Coins.js"), "../Icons/Contacts.tsx": () => import("../Icons/Contacts.js"), "../Icons/Copy.tsx": () => import("../Icons/Copy.js"), "../Icons/CoronaCertificate.tsx": () => import("../Icons/CoronaCertificate.js"), "../Icons/Coronavirus.tsx": () => import("../Icons/Coronavirus.js"), "../Icons/Cough.tsx": () => import("../Icons/Cough.js"), "../Icons/CriticalHealthInfo.tsx": () => import("../Icons/CriticalHealthInfo.js"), "../Icons/Cross.tsx": () => import("../Icons/Cross.js"), "../Icons/DataExchange.tsx": () => import("../Icons/DataExchange.js"), "../Icons/DataReceived.tsx": () => import("../Icons/DataReceived.js"), "../Icons/DataSent.tsx": () => import("../Icons/DataSent.js"), "../Icons/Depression.tsx": () => import("../Icons/Depression.js"), "../Icons/DigestiveSystem.tsx": () => import("../Icons/DigestiveSystem.js"), "../Icons/Dizzy.tsx": () => import("../Icons/Dizzy.js"), "../Icons/Documents.tsx": () => import("../Icons/Documents.js"), "../Icons/Dog.tsx": () => import("../Icons/Dog.js"), "../Icons/DonorCard.tsx": () => import("../Icons/DonorCard.js"), "../Icons/Download.tsx": () => import("../Icons/Download.js"), "../Icons/Draft.tsx": () => import("../Icons/Draft.js"), "../Icons/EChat.tsx": () => import("../Icons/EChat.js"), "../Icons/Ear.tsx": () => import("../Icons/Ear.js"), "../Icons/EarDeaf.tsx": () => import("../Icons/EarDeaf.js"), "../Icons/EarHearingAid.tsx": () => import("../Icons/EarHearingAid.js"), "../Icons/EarNoseThroat.tsx": () => import("../Icons/EarNoseThroat.js"), "../Icons/EarVolume.tsx": () => import("../Icons/EarVolume.js"), "../Icons/ElderlyPerson.tsx": () => import("../Icons/ElderlyPerson.js"), "../Icons/Embolization.tsx": () => import("../Icons/Embolization.js"), "../Icons/EmergencyCall.tsx": () => import("../Icons/EmergencyCall.js"), "../Icons/EmoticonAnnoyed.tsx": () => import("../Icons/EmoticonAnnoyed.js"), "../Icons/EmoticonDelighted.tsx": () => import("../Icons/EmoticonDelighted.js"), "../Icons/EmoticonDisappointed.tsx": () => import("../Icons/EmoticonDisappointed.js"), "../Icons/EmoticonHappy.tsx": () => import("../Icons/EmoticonHappy.js"), "../Icons/EmoticonMeh.tsx": () => import("../Icons/EmoticonMeh.js"), "../Icons/EnterFullScreen.tsx": () => import("../Icons/EnterFullScreen.js"), "../Icons/Envelope.tsx": () => import("../Icons/Envelope.js"), "../Icons/Epilepsy.tsx": () => import("../Icons/Epilepsy.js"), "../Icons/Eraser.tsx": () => import("../Icons/Eraser.js"), "../Icons/ErrorSignFill.tsx": () => import("../Icons/ErrorSignFill.js"), "../Icons/ErrorSignStroke.tsx": () => import("../Icons/ErrorSignStroke.js"), "../Icons/EuropeanHealthCard.tsx": () => import("../Icons/EuropeanHealthCard.js"), "../Icons/ExitFullScreen.tsx": () => import("../Icons/ExitFullScreen.js"), "../Icons/Eye.tsx": () => import("../Icons/Eye.js"), "../Icons/Facebook.tsx": () => import("../Icons/Facebook.js"), "../Icons/FallingLeaf.tsx": () => import("../Icons/FallingLeaf.js"), "../Icons/Female.tsx": () => import("../Icons/Female.js"), "../Icons/FemaleDoctor.tsx": () => import("../Icons/FemaleDoctor.js"), "../Icons/Ferry.tsx": () => import("../Icons/Ferry.js"), "../Icons/File.tsx": () => import("../Icons/File.js"), "../Icons/Filter.tsx": () => import("../Icons/Filter.js"), "../Icons/FingerBleed.tsx": () => import("../Icons/FingerBleed.js"), "../Icons/FirstAidKit.tsx": () => import("../Icons/FirstAidKit.js"), "../Icons/FloppyDisk.tsx": () => import("../Icons/FloppyDisk.js"), "../Icons/Football.tsx": () => import("../Icons/Football.js"), "../Icons/Form.tsx": () => import("../Icons/Form.js"), "../Icons/Forward.tsx": () => import("../Icons/Forward.js"), "../Icons/Gallery.tsx": () => import("../Icons/Gallery.js"), "../Icons/Garden.tsx": () => import("../Icons/Garden.js"), "../Icons/GasCan.tsx": () => import("../Icons/GasCan.js"), "../Icons/GenderIdentity.tsx": () => import("../Icons/GenderIdentity.js"), "../Icons/Glasses.tsx": () => import("../Icons/Glasses.js"), "../Icons/Globe.tsx": () => import("../Icons/Globe.js"), "../Icons/Graph.tsx": () => import("../Icons/Graph.js"), "../Icons/Group.tsx": () => import("../Icons/Group.js"), "../Icons/GroupTwins.tsx": () => import("../Icons/GroupTwins.js"), "../Icons/HTMLFile.tsx": () => import("../Icons/HTMLFile.js"), "../Icons/HandWaving.tsx": () => import("../Icons/HandWaving.js"), "../Icons/HandWithDisease.tsx": () => import("../Icons/HandWithDisease.js"), "../Icons/HandsAndHeart.tsx": () => import("../Icons/HandsAndHeart.js"), "../Icons/HealthClinic.tsx": () => import("../Icons/HealthClinic.js"), "../Icons/HealthWarning.tsx": () => import("../Icons/HealthWarning.js"), "../Icons/HealthcarePerson.tsx": () => import("../Icons/HealthcarePerson.js"), "../Icons/HealthcarePersonell.tsx": () => import("../Icons/HealthcarePersonell.js"), "../Icons/HearingProtection.tsx": () => import("../Icons/HearingProtection.js"), "../Icons/Heart.tsx": () => import("../Icons/Heart.js"), "../Icons/HeartHands.tsx": () => import("../Icons/HeartHands.js"), "../Icons/HelpSign.tsx": () => import("../Icons/HelpSign.js"), "../Icons/HelpingHand.tsx": () => import("../Icons/HelpingHand.js"), "../Icons/Hemodialysis.tsx": () => import("../Icons/Hemodialysis.js"), "../Icons/Hiker.tsx": () => import("../Icons/Hiker.js"), "../Icons/Hipprosthesis.tsx": () => import("../Icons/Hipprosthesis.js"), "../Icons/History.tsx": () => import("../Icons/History.js"), "../Icons/HivAndAids.tsx": () => import("../Icons/HivAndAids.js"), "../Icons/Home.tsx": () => import("../Icons/Home.js"), "../Icons/Hormone.tsx": () => import("../Icons/Hormone.js"), "../Icons/Hospital.tsx": () => import("../Icons/Hospital.js"), "../Icons/Hourglass.tsx": () => import("../Icons/Hourglass.js"), "../Icons/ImgFile.tsx": () => import("../Icons/ImgFile.js"), "../Icons/Inbox.tsx": () => import("../Icons/Inbox.js"), "../Icons/InfoSignFill.tsx": () => import("../Icons/InfoSignFill.js"), "../Icons/InfoSignStroke.tsx": () => import("../Icons/InfoSignStroke.js"), "../Icons/Instagram.tsx": () => import("../Icons/Instagram.js"), "../Icons/Intravenous.tsx": () => import("../Icons/Intravenous.js"), "../Icons/JointPain.tsx": () => import("../Icons/JointPain.js"), "../Icons/Journal.tsx": () => import("../Icons/Journal.js"), "../Icons/JpgFile.tsx": () => import("../Icons/JpgFile.js"), "../Icons/Kidney.tsx": () => import("../Icons/Kidney.js"), "../Icons/KitchenScale.tsx": () => import("../Icons/KitchenScale.js"), "../Icons/Kjernejournal.tsx": () => import("../Icons/Kjernejournal.js"), "../Icons/Laboratory.tsx": () => import("../Icons/Laboratory.js"), "../Icons/LaptopBlog.tsx": () => import("../Icons/LaptopBlog.js"), "../Icons/LawBook.tsx": () => import("../Icons/LawBook.js"), "../Icons/LegalDocument.tsx": () => import("../Icons/LegalDocument.js"), "../Icons/LightBulb.tsx": () => import("../Icons/LightBulb.js"), "../Icons/List.tsx": () => import("../Icons/List.js"), "../Icons/Location.tsx": () => import("../Icons/Location.js"), "../Icons/Lock.tsx": () => import("../Icons/Lock.js"), "../Icons/Login.tsx": () => import("../Icons/Login.js"), "../Icons/Logout.tsx": () => import("../Icons/Logout.js"), "../Icons/Lungs.tsx": () => import("../Icons/Lungs.js"), "../Icons/Makeup.tsx": () => import("../Icons/Makeup.js"), "../Icons/MaleDoctor.tsx": () => import("../Icons/MaleDoctor.js"), "../Icons/MaleDoctorAndPerson.tsx": () => import("../Icons/MaleDoctorAndPerson.js"), "../Icons/MaleGenitalia.tsx": () => import("../Icons/MaleGenitalia.js"), "../Icons/Medicine.tsx": () => import("../Icons/Medicine.js"), "../Icons/MedicineWarning.tsx": () => import("../Icons/MedicineWarning.js"), "../Icons/MentalHealthAdult.tsx": () => import("../Icons/MentalHealthAdult.js"), "../Icons/MentalHealthChild.tsx": () => import("../Icons/MentalHealthChild.js"), "../Icons/Menu.tsx": () => import("../Icons/Menu.js"), "../Icons/Microscope.tsx": () => import("../Icons/Microscope.js"), "../Icons/Minus.tsx": () => import("../Icons/Minus.js"), "../Icons/Mirror.tsx": () => import("../Icons/Mirror.js"), "../Icons/MobilePhone.tsx": () => import("../Icons/MobilePhone.js"), "../Icons/MotherHoldingBaby.tsx": () => import("../Icons/MotherHoldingBaby.js"), "../Icons/MuscleBack.tsx": () => import("../Icons/MuscleBack.js"), "../Icons/MuscleLeg.tsx": () => import("../Icons/MuscleLeg.js"), "../Icons/Mushroom.tsx": () => import("../Icons/Mushroom.js"), "../Icons/Music.tsx": () => import("../Icons/Music.js"), "../Icons/MusselsAndSalt.tsx": () => import("../Icons/MusselsAndSalt.js"), "../Icons/NoAccess.tsx": () => import("../Icons/NoAccess.js"), "../Icons/NoEye.tsx": () => import("../Icons/NoEye.js"), "../Icons/NoFilter.tsx": () => import("../Icons/NoFilter.js"), "../Icons/Notepad.tsx": () => import("../Icons/Notepad.js"), "../Icons/Osteotomy.tsx": () => import("../Icons/Osteotomy.js"), "../Icons/PaintRoller.tsx": () => import("../Icons/PaintRoller.js"), "../Icons/PaperPlane.tsx": () => import("../Icons/PaperPlane.js"), "../Icons/PatientAndPerson.tsx": () => import("../Icons/PatientAndPerson.js"), "../Icons/Pause.tsx": () => import("../Icons/Pause.js"), "../Icons/PdfFile.tsx": () => import("../Icons/PdfFile.js"), "../Icons/Pencil.tsx": () => import("../Icons/Pencil.js"), "../Icons/PeopleTalking.tsx": () => import("../Icons/PeopleTalking.js"), "../Icons/Peritonealdialysis.tsx": () => import("../Icons/Peritonealdialysis.js"), "../Icons/Person.tsx": () => import("../Icons/Person.js"), "../Icons/PersonAndPatient.tsx": () => import("../Icons/PersonAndPatient.js"), "../Icons/PersonCancel.tsx": () => import("../Icons/PersonCancel.js"), "../Icons/PersonInXRayMachine.tsx": () => import("../Icons/PersonInXRayMachine.js"), "../Icons/PersonOverweight.tsx": () => import("../Icons/PersonOverweight.js"), "../Icons/PersonRelaxing.tsx": () => import("../Icons/PersonRelaxing.js"), "../Icons/PersonWithBrain.tsx": () => import("../Icons/PersonWithBrain.js"), "../Icons/PersonWithBrokenArm.tsx": () => import("../Icons/PersonWithBrokenArm.js"), "../Icons/PersonWithCrutches.tsx": () => import("../Icons/PersonWithCrutches.js"), "../Icons/PersonWithJaw.tsx": () => import("../Icons/PersonWithJaw.js"), "../Icons/PersonWithMagnifyingGlass.tsx": () => import("../Icons/PersonWithMagnifyingGlass.js"), "../Icons/PersonWithSenses.tsx": () => import("../Icons/PersonWithSenses.js"), "../Icons/PersonWorking.tsx": () => import("../Icons/PersonWorking.js"), "../Icons/PersonalPlan.tsx": () => import("../Icons/PersonalPlan.js"), "../Icons/PizzaSlice.tsx": () => import("../Icons/PizzaSlice.js"), "../Icons/Plane.tsx": () => import("../Icons/Plane.js"), "../Icons/Plant.tsx": () => import("../Icons/Plant.js"), "../Icons/Play.tsx": () => import("../Icons/Play.js"), "../Icons/PlusLarge.tsx": () => import("../Icons/PlusLarge.js"), "../Icons/PlusSmall.tsx": () => import("../Icons/PlusSmall.js"), "../Icons/PngFile.tsx": () => import("../Icons/PngFile.js"), "../Icons/Podcast.tsx": () => import("../Icons/Podcast.js"), "../Icons/PoisonInformation.tsx": () => import("../Icons/PoisonInformation.js"), "../Icons/Pregnant.tsx": () => import("../Icons/Pregnant.js"), "../Icons/Printer.tsx": () => import("../Icons/Printer.js"), "../Icons/Psychosis.tsx": () => import("../Icons/Psychosis.js"), "../Icons/Publication.tsx": () => import("../Icons/Publication.js"), "../Icons/Puzzle.tsx": () => import("../Icons/Puzzle.js"), "../Icons/QrCode.tsx": () => import("../Icons/QrCode.js"), "../Icons/Quarrel.tsx": () => import("../Icons/Quarrel.js"), "../Icons/RadioTherapy.tsx": () => import("../Icons/RadioTherapy.js"), "../Icons/RadioactiveTreatment.tsx": () => import("../Icons/RadioactiveTreatment.js"), "../Icons/Radioiodine.tsx": () => import("../Icons/Radioiodine.js"), "../Icons/Receipt.tsx": () => import("../Icons/Receipt.js"), "../Icons/Receptionist.tsx": () => import("../Icons/Receptionist.js"), "../Icons/Recovery.tsx": () => import("../Icons/Recovery.js"), "../Icons/Referral.tsx": () => import("../Icons/Referral.js"), "../Icons/Refresh.tsx": () => import("../Icons/Refresh.js"), "../Icons/Refund.tsx": () => import("../Icons/Refund.js"), "../Icons/Reply.tsx": () => import("../Icons/Reply.js"), "../Icons/Rocket.tsx": () => import("../Icons/Rocket.js"), "../Icons/RtfFile.tsx": () => import("../Icons/RtfFile.js"), "../Icons/STDs.tsx": () => import("../Icons/STDs.js"), "../Icons/Save.tsx": () => import("../Icons/Save.js"), "../Icons/Scale.tsx": () => import("../Icons/Scale.js"), "../Icons/ScreenReader.tsx": () => import("../Icons/ScreenReader.js"), "../Icons/Search.tsx": () => import("../Icons/Search.js"), "../Icons/SectionSign.tsx": () => import("../Icons/SectionSign.js"), "../Icons/Settings.tsx": () => import("../Icons/Settings.js"), "../Icons/Sexualorientation.tsx": () => import("../Icons/Sexualorientation.js"), "../Icons/ShakingHand.tsx": () => import("../Icons/ShakingHand.js"), "../Icons/Share.tsx": () => import("../Icons/Share.js"), "../Icons/Shield.tsx": () => import("../Icons/Shield.js"), "../Icons/ShuntOperation.tsx": () => import("../Icons/ShuntOperation.js"), "../Icons/Skeleton.tsx": () => import("../Icons/Skeleton.js"), "../Icons/Skin.tsx": () => import("../Icons/Skin.js"), "../Icons/Snake.tsx": () => import("../Icons/Snake.js"), "../Icons/Snapchat.tsx": () => import("../Icons/Snapchat.js"), "../Icons/SortDown.tsx": () => import("../Icons/SortDown.js"), "../Icons/SortUp.tsx": () => import("../Icons/SortUp.js"), "../Icons/SpeechBubble.tsx": () => import("../Icons/SpeechBubble.js"), "../Icons/Spray.tsx": () => import("../Icons/Spray.js"), "../Icons/Stopwatch.tsx": () => import("../Icons/Stopwatch.js"), "../Icons/Sun.tsx": () => import("../Icons/Sun.js"), "../Icons/SupportingPerson.tsx": () => import("../Icons/SupportingPerson.js"), "../Icons/Surgery.tsx": () => import("../Icons/Surgery.js"), "../Icons/Syringe.tsx": () => import("../Icons/Syringe.js"), "../Icons/Taxi.tsx": () => import("../Icons/Taxi.js"), "../Icons/TeddyBear.tsx": () => import("../Icons/TeddyBear.js"), "../Icons/Teenagers.tsx": () => import("../Icons/Teenagers.js"), "../Icons/ThinkingAboutBaby.tsx": () => import("../Icons/ThinkingAboutBaby.js"), "../Icons/Ticket.tsx": () => import("../Icons/Ticket.js"), "../Icons/TimePassing.tsx": () => import("../Icons/TimePassing.js"), "../Icons/Tombstone.tsx": () => import("../Icons/Tombstone.js"), "../Icons/Toolbox.tsx": () => import("../Icons/Toolbox.js"), "../Icons/Tooth.tsx": () => import("../Icons/Tooth.js"), "../Icons/TotalKneeProsthesis.tsx": () => import("../Icons/TotalKneeProsthesis.js"), "../Icons/Train.tsx": () => import("../Icons/Train.js"), "../Icons/Transplantation.tsx": () => import("../Icons/Transplantation.js"), "../Icons/TrashCan.tsx": () => import("../Icons/TrashCan.js"), "../Icons/TravelRoute.tsx": () => import("../Icons/TravelRoute.js"), "../Icons/TriangleX.tsx": () => import("../Icons/TriangleX.js"), "../Icons/Twitter.tsx": () => import("../Icons/Twitter.js"), "../Icons/Undo.tsx": () => import("../Icons/Undo.js"), "../Icons/UniProsthesis.tsx": () => import("../Icons/UniProsthesis.js"), "../Icons/Upload.tsx": () => import("../Icons/Upload.js"), "../Icons/UserOrganization.tsx": () => import("../Icons/UserOrganization.js"), "../Icons/Vaccine.tsx": () => import("../Icons/Vaccine.js"), "../Icons/VerticalDots.tsx": () => import("../Icons/VerticalDots.js"), "../Icons/VideoCamera.tsx": () => import("../Icons/VideoCamera.js"), "../Icons/VideoChat.tsx": () => import("../Icons/VideoChat.js"), "../Icons/Wallet.tsx": () => import("../Icons/Wallet.js"), "../Icons/Watch.tsx": () => import("../Icons/Watch.js"), "../Icons/Website.tsx": () => import("../Icons/Website.js"), "../Icons/Wheelchair.tsx": () => import("../Icons/Wheelchair.js"), "../Icons/WheelchairActive.tsx": () => import("../Icons/WheelchairActive.js"), "../Icons/Window.tsx": () => import("../Icons/Window.js"), "../Icons/WordDocument.tsx": () => import("../Icons/WordDocument.js"), "../Icons/WorkSuitcase.tsx": () => import("../Icons/WorkSuitcase.js"), "../Icons/X.tsx": () => import("../Icons/X.js"), "../Icons/XOutline.tsx": () => import("../Icons/XOutline.js"), "../Icons/XmlFile.tsx": () => import("../Icons/XmlFile.js"), "../Icons/YouTube.tsx": () => import("../Icons/YouTube.js"), "../Icons/Zoom.tsx": () => import("../Icons/Zoom.js") }), `../Icons/${o}.tsx`, 3)), y = ({ iconName: o, size: t = l.Small, ...r }) => {
|
|
8
8
|
const i = m(() => h(o), [o]);
|
|
9
9
|
if (x())
|
|
10
10
|
return null;
|
|
@@ -22,10 +22,10 @@ const h = (o) => p(() => c(/* @__PURE__ */ Object.assign({ "../Icons/ActiveMonit
|
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
return /* @__PURE__ */ s.createElement(I, { fallback: n, reset: o }, /* @__PURE__ */ s.createElement(e, { fallback: n }, /* @__PURE__ */ s.createElement(a, { svgIcon: i, size: t, ...r })));
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
y as LazyIcon,
|
|
28
|
+
y as default,
|
|
29
29
|
h as lazyLoadIcon
|
|
30
30
|
};
|
|
31
31
|
//# sourceMappingURL=LazyIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LazyIcon.js","sources":["../../../src/components/LazyIcon/LazyIcon.tsx"],"sourcesContent":["import React, { lazy, Suspense, useMemo } from 'react';\n\nimport ErrorBoundary from './ErrorBoundary';\nimport { isServerSide } from './utils';\nimport Icon, { BaseIconProps, IconSize, SvgIcon } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\n\nexport interface LazyIconProps extends BaseIconProps {\n // Navnet på ikonet som skal vises. Tilsvarer filnavnet til ikonet i Icons-mappen\n iconName: IconName;\n}\n\nexport const lazyLoadIcon = (iconName: IconName): React.LazyExoticComponent<SvgIcon> =>\n lazy<SvgIcon>(() => import(`../Icons/${iconName}.tsx`));\n\nexport const LazyIcon: React.FC<LazyIconProps> = ({ iconName, size = IconSize.Small, ...rest }) => {\n const icon = useMemo(() => lazyLoadIcon(iconName), [iconName]);\n\n if (isServerSide()) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 48 48\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={iconName}>\n <Suspense fallback={fallback}>\n <Icon svgIcon={icon} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIcon;\n"],"names":["lazyLoadIcon","iconName","lazy","__variableDynamicImportRuntimeHelper","LazyIcon","size","IconSize","rest","icon","useMemo","isServerSide","fallback","React","ErrorBoundary","Suspense","Icon","LazyIcon$1"],"mappings":";;;;;;AAYa,MAAAA,IAAe,CAACC,MAC3BC,EAAc,MAAMC,2/mBAAkC,YAAAF,CAAA,MAAA,CAAA,GAE3CG,IAAoC,CAAC,EAAE,UAAAH,GAAU,MAAAI,IAAOC,EAAS,OAAO,GAAGC,QAAW;AAC3F,QAAAC,IAAOC,EAAQ,MAAMT,EAAaC,CAAQ,GAAG,CAACA,CAAQ,CAAC;AAE7D,MAAIS;AACK,WAAA;AAGT,QAAMC,IACJC,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAa;AAAA,MACb,MAAM;AAAA,MACN,WAAW;AAAA,MACX,eAAa;AAAA,MACb,SAAQ;AAAA,MACR,OAAO,EAAE,UAAUP,GAAM,WAAWA,EAAK;AAAA,MACzC,OAAOA;AAAA,MACP,QAAQA;AAAA,IAAA;AAAA,EAAA;AAIZ,yCACGQ,GAAc,EAAA,UAAAF,GAAoB,OAAOV,qCACvCa,GAAS,EAAA,UAAAH,EAAA,GACPC,gBAAAA,EAAA,cAAAG,GAAA,EAAK,SAASP,GAAM,MAAAH,GAAa,GAAGE,GAAM,CAC7C,CACF;AAEJ,GAEAS,IAAeZ;"}
|
|
1
|
+
{"version":3,"file":"LazyIcon.js","sources":["../../../src/components/LazyIcon/LazyIcon.tsx"],"sourcesContent":["import React, { lazy, Suspense, useMemo } from 'react';\n\nimport ErrorBoundary from './ErrorBoundary';\nimport { isServerSide } from './utils';\nimport Icon, { BaseIconProps, IconSize, SvgIcon } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\n\nexport interface LazyIconProps extends BaseIconProps {\n // Navnet på ikonet som skal vises. Tilsvarer filnavnet til ikonet i Icons-mappen\n iconName: IconName;\n}\n\nexport const lazyLoadIcon = (iconName: IconName): React.LazyExoticComponent<SvgIcon> =>\n lazy<SvgIcon>(() => import(`../Icons/${iconName}.tsx`));\n\nexport const LazyIcon: React.FC<LazyIconProps> = ({ iconName, size = IconSize.Small, ...rest }) => {\n const icon = useMemo(() => lazyLoadIcon(iconName), [iconName]);\n\n if (isServerSide()) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 48 48\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={iconName}>\n <Suspense fallback={fallback}>\n <Icon svgIcon={icon} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIcon;\n"],"names":["lazyLoadIcon","iconName","lazy","__variableDynamicImportRuntimeHelper","LazyIcon","size","IconSize","rest","icon","useMemo","isServerSide","fallback","React","ErrorBoundary","Suspense","Icon"],"mappings":";;;;;;AAYa,MAAAA,IAAe,CAACC,MAC3BC,EAAc,MAAMC,EAAkC,uBAAA,OAAA,EAAA,iCAAA,MAAA,OAAA,8BAAA,GAAA,gCAAA,MAAA,OAAA,6BAAA,GAAA,2BAAA,MAAA,OAAA,wBAAA,GAAA,8BAAA,MAAA,OAAA,2BAAA,GAAA,gCAAA,MAAA,OAAA,6BAAA,GAAA,2BAAA,MAAA,OAAA,wBAAA,GAAA,wBAAA,MAAA,OAAA,qBAAA,GAAA,sBAAA,MAAA,OAAA,mBAAA,GAAA,wBAAA,MAAA,OAAA,qBAAA,GAAA,2BAAA,MAAA,OAAA,wBAAA,GAAA,0BAAA,MAAA,OAAA,uBAAA,GAAA,0BAAA,MAAA,OAAA,uBAAA,GAAA,2BAAA,MAAA,OAAA,wBAAA,GAAA,wBAAA,MAAA,OAAA,qBAAA,GAAA,6BAAA,MAAA,OAAA,0BAAA,GAAA,2BAAA,MAAA,OAAA,wBAAA,GAAA,oBAAA,MAAA,OAAA,iBAAA,GAAA,uBAAA,MAAA,OAAA,oBAAA,GAAA,oCAAA,MAAA,OAAA,iCAAA,GAAA,qBAAA,MAAA,OAAA,kBAAA,GAAA,wBAAA,MAAA,OAAA,qBAAA,GAAA,6BAAA,MAAA,OAAA,0BAAA,GAAA,qBAAA,MAAA,OAAA,kBAAA,GAAA,qBAAA,MAAA,OAAA,kBAAA,GAAA,6BAAA,MAAA,OAAA,0BAAA,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4
|
+
a as LazyIcon,
|
|
5
5
|
a as default,
|
|
6
6
|
e as lazyLoadIcon
|
|
7
7
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import a from "../../_virtual/dynamic-import-helper.js";
|
|
2
|
-
import
|
|
3
|
-
import u from "../Illustration/Illustration.js";
|
|
2
|
+
import e, { lazy as n, useMemo as s, Suspense as m } from "react";
|
|
3
|
+
import { Illustration as u } from "../Illustration/Illustration.js";
|
|
4
4
|
import { getIllustration as c } from "../Illustration/utils.js";
|
|
5
5
|
import { IllustrationSizeList as p } from "../Illustrations/IllustrationNames.js";
|
|
6
6
|
import I from "../LazyIcon/ErrorBoundary.js";
|
|
7
7
|
import { isServerSide as d } from "../LazyIcon/utils.js";
|
|
8
8
|
const f = (r, t) => {
|
|
9
|
-
const
|
|
10
|
-
return n(() => a(/* @__PURE__ */ Object.assign({ "../Illustrations/Doctor.tsx": () => import("../Illustrations/Doctor.js"), "../Illustrations/DoctorMedium.tsx": () => import("../Illustrations/DoctorMedium.js"), "../Illustrations/DoctorSmall.tsx": () => import("../Illustrations/DoctorSmall.js"), "../Illustrations/FacialRecognitionFingerprint.tsx": () => import("../Illustrations/FacialRecognitionFingerprint.js"), "../Illustrations/FacialRecognitionFingerprintMedium.tsx": () => import("../Illustrations/FacialRecognitionFingerprintMedium.js"), "../Illustrations/HealthcarePersonnel.tsx": () => import("../Illustrations/HealthcarePersonnel.js"), "../Illustrations/HealthcarePersonnelMedium.tsx": () => import("../Illustrations/HealthcarePersonnelMedium.js"), "../Illustrations/HealthcarePersonnelSmall.tsx": () => import("../Illustrations/HealthcarePersonnelSmall.js") }), `../Illustrations/${l}.tsx
|
|
11
|
-
},
|
|
9
|
+
const o = p[r], l = c({ size: t, ...o });
|
|
10
|
+
return n(() => a(/* @__PURE__ */ Object.assign({ "../Illustrations/Doctor.tsx": () => import("../Illustrations/Doctor.js"), "../Illustrations/DoctorMedium.tsx": () => import("../Illustrations/DoctorMedium.js"), "../Illustrations/DoctorSmall.tsx": () => import("../Illustrations/DoctorSmall.js"), "../Illustrations/FacialRecognitionFingerprint.tsx": () => import("../Illustrations/FacialRecognitionFingerprint.js"), "../Illustrations/FacialRecognitionFingerprintMedium.tsx": () => import("../Illustrations/FacialRecognitionFingerprintMedium.js"), "../Illustrations/HealthcarePersonnel.tsx": () => import("../Illustrations/HealthcarePersonnel.js"), "../Illustrations/HealthcarePersonnelMedium.tsx": () => import("../Illustrations/HealthcarePersonnelMedium.js"), "../Illustrations/HealthcarePersonnelSmall.tsx": () => import("../Illustrations/HealthcarePersonnelSmall.js") }), `../Illustrations/${l}.tsx`, 3));
|
|
11
|
+
}, F = ({ illustrationName: r, size: t = 512, ...o }) => {
|
|
12
12
|
const l = s(() => f(r, t), [r, t]);
|
|
13
13
|
if (d())
|
|
14
14
|
return null;
|
|
15
|
-
const i = /* @__PURE__ */
|
|
15
|
+
const i = /* @__PURE__ */ e.createElement(
|
|
16
16
|
"svg",
|
|
17
17
|
{
|
|
18
18
|
"data-testid": "fallback",
|
|
@@ -25,11 +25,11 @@ const f = (r, t) => {
|
|
|
25
25
|
height: t
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
}
|
|
28
|
+
return /* @__PURE__ */ e.createElement(I, { fallback: i, reset: r }, /* @__PURE__ */ e.createElement(m, { fallback: i }, /* @__PURE__ */ e.createElement(u, { illustration: l, size: t, ...o })));
|
|
29
|
+
};
|
|
30
30
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
F as LazyIllustration,
|
|
32
|
+
F as default,
|
|
33
33
|
f as lazyLoadIllustration
|
|
34
34
|
};
|
|
35
35
|
//# sourceMappingURL=LazyIllustration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LazyIllustration.js","sources":["../../../src/components/LazyIllustration/LazyIllustration.tsx"],"sourcesContent":["import React, { lazy, Suspense, useMemo } from 'react';\n\nimport Illustration, { BaseIllustrationProps, SvgIllustration } from '../Illustration';\nimport { getIllustration } from '../Illustration/utils';\nimport { IllustrationName, IllustrationSizeList } from '../Illustrations/IllustrationNames';\nimport ErrorBoundary from '../LazyIcon/ErrorBoundary';\nimport { isServerSide } from '../LazyIcon/utils';\n\nexport interface LazyIllustrationProps extends BaseIllustrationProps {\n // Navnet på illustrasjonen som skal vises. Tilsvarer filnavnet til illustrasjonen i Icons-mappen\n illustrationName: IllustrationName;\n}\n\nexport const lazyLoadIllustration = (illustrationName: IllustrationName, size: number): React.LazyExoticComponent<SvgIllustration> => {\n const sizes = IllustrationSizeList[illustrationName];\n const illustrationFileName = getIllustration({ size, ...sizes });\n\n return lazy<SvgIllustration>(() => import(`../Illustrations/${illustrationFileName}.tsx`));\n};\n\nexport const LazyIllustration: React.FC<LazyIllustrationProps> = ({ illustrationName, size = 512, ...rest }) => {\n const illustration = useMemo(() => lazyLoadIllustration(illustrationName, size), [illustrationName, size]);\n\n if (isServerSide()) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 512 512\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={illustrationName}>\n <Suspense fallback={fallback}>\n <Illustration illustration={illustration} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIllustration;\n"],"names":["lazyLoadIllustration","illustrationName","size","sizes","IllustrationSizeList","illustrationFileName","getIllustration","lazy","__variableDynamicImportRuntimeHelper","LazyIllustration","rest","illustration","useMemo","isServerSide","fallback","React","ErrorBoundary","Suspense","Illustration"
|
|
1
|
+
{"version":3,"file":"LazyIllustration.js","sources":["../../../src/components/LazyIllustration/LazyIllustration.tsx"],"sourcesContent":["import React, { lazy, Suspense, useMemo } from 'react';\n\nimport Illustration, { BaseIllustrationProps, SvgIllustration } from '../Illustration';\nimport { getIllustration } from '../Illustration/utils';\nimport { IllustrationName, IllustrationSizeList } from '../Illustrations/IllustrationNames';\nimport ErrorBoundary from '../LazyIcon/ErrorBoundary';\nimport { isServerSide } from '../LazyIcon/utils';\n\nexport interface LazyIllustrationProps extends BaseIllustrationProps {\n // Navnet på illustrasjonen som skal vises. Tilsvarer filnavnet til illustrasjonen i Icons-mappen\n illustrationName: IllustrationName;\n}\n\nexport const lazyLoadIllustration = (illustrationName: IllustrationName, size: number): React.LazyExoticComponent<SvgIllustration> => {\n const sizes = IllustrationSizeList[illustrationName];\n const illustrationFileName = getIllustration({ size, ...sizes });\n\n return lazy<SvgIllustration>(() => import(`../Illustrations/${illustrationFileName}.tsx`));\n};\n\nexport const LazyIllustration: React.FC<LazyIllustrationProps> = ({ illustrationName, size = 512, ...rest }) => {\n const illustration = useMemo(() => lazyLoadIllustration(illustrationName, size), [illustrationName, size]);\n\n if (isServerSide()) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 512 512\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={illustrationName}>\n <Suspense fallback={fallback}>\n <Illustration illustration={illustration} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIllustration;\n"],"names":["lazyLoadIllustration","illustrationName","size","sizes","IllustrationSizeList","illustrationFileName","getIllustration","lazy","__variableDynamicImportRuntimeHelper","LazyIllustration","rest","illustration","useMemo","isServerSide","fallback","React","ErrorBoundary","Suspense","Illustration"],"mappings":";;;;;;;AAaa,MAAAA,IAAuB,CAACC,GAAoCC,MAA6D;AAC9H,QAAAC,IAAQC,EAAqBH,CAAgB,GAC7CI,IAAuBC,EAAgB,EAAE,MAAAJ,GAAM,GAAGC,EAAO,CAAA;AAE/D,SAAOI,EAAsB,MAAMC,EAAA,uBAAA,OAAA,EAAA,+BAAA,MAAA,OAAA,4BAAA,GAAA,qCAAA,MAAA,OAAA,kCAAA,GAAA,oCAAA,MAAA,OAAA,iCAAA,GAAA,qDAAA,MAAA,OAAA,kDAAA,GAAA,2DAAA,MAAA,OAAA,wDAAA,GAAA,4CAAA,MAAA,OAAA,yCAAA,GAAA,kDAAA,MAAA,OAAA,+CAAA,GAAA,iDAAA,MAAA,OAAA,8CAAA,EAAA,CAAA,GAAA,oBAAAH,CAAA,QAAA,CAAA,CAAsD;AAC3F,GAEaI,IAAoD,CAAC,EAAE,kBAAAR,GAAkB,MAAAC,IAAO,KAAK,GAAGQ,QAAW;AACxG,QAAAC,IAAeC,EAAQ,MAAMZ,EAAqBC,GAAkBC,CAAI,GAAG,CAACD,GAAkBC,CAAI,CAAC;AAEzG,MAAIW;AACK,WAAA;AAGT,QAAMC,IACJC,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAa;AAAA,MACb,MAAM;AAAA,MACN,WAAW;AAAA,MACX,eAAa;AAAA,MACb,SAAQ;AAAA,MACR,OAAO,EAAE,UAAUb,GAAM,WAAWA,EAAK;AAAA,MACzC,OAAOA;AAAA,MACP,QAAQA;AAAA,IAAA;AAAA,EAAA;AAIZ,SACGa,gBAAAA,EAAA,cAAAC,GAAA,EAAc,UAAAF,GAAoB,OAAOb,KACvCc,gBAAAA,EAAA,cAAAE,GAAA,EAAS,UAAAH,KACRC,gBAAAA,EAAA,cAACG,KAAa,cAAAP,GAA4B,MAAAT,GAAa,GAAGQ,GAAM,CAClE,CACF;AAEJ;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { LazyIllustration as t } from "./LazyIllustration.js";
|
|
2
|
+
import { lazyLoadIllustration as l } from "./LazyIllustration.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
t as LazyIllustration,
|
|
5
|
+
t as default,
|
|
6
|
+
l as lazyLoadIllustration
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index.js.map
|