@helsenorge/designsystem-react 13.5.0 → 13.7.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/lib/AnchorLink.js +2 -2
- package/lib/AnchorLink.js.map +1 -1
- package/lib/Avatar.js +2 -2
- package/lib/Avatar.js.map +1 -1
- package/lib/Badge.js +2 -2
- package/lib/Badge.js.map +1 -1
- package/lib/Button.js +6 -6
- package/lib/Button.js.map +1 -1
- package/lib/CHANGELOG.md +36 -1
- package/lib/Checkbox.js +6 -6
- package/lib/Checkbox.js.map +1 -1
- package/lib/Close.js +3 -3
- package/lib/Close.js.map +1 -1
- package/lib/DictionaryTrigger.js +2 -2
- package/lib/DictionaryTrigger.js.map +1 -1
- package/lib/Drawer.js +5 -5
- package/lib/Drawer.js.map +1 -1
- package/lib/Duolist.js +8 -5
- package/lib/Duolist.js.map +1 -1
- package/lib/ElementHeader.js +9 -9
- package/lib/ElementHeader.js.map +1 -1
- package/lib/ElementHeaderText.js +4 -4
- package/lib/ElementHeaderText.js.map +1 -1
- package/lib/ErrorWrapper.js +2 -2
- package/lib/ErrorWrapper.js.map +1 -1
- package/lib/Expander.js +12 -8
- package/lib/Expander.js.map +1 -1
- package/lib/FormFieldTag.js +2 -2
- package/lib/FormFieldTag.js.map +1 -1
- package/lib/FormGroup.js +9 -8
- package/lib/FormGroup.js.map +1 -1
- package/lib/FormLayout.js +3 -3
- package/lib/FormLayout.js.map +1 -1
- package/lib/HelpDetails.js +3 -3
- package/lib/HelpDetails.js.map +1 -1
- package/lib/HelpTriggerIcon.js +2 -2
- package/lib/HelpTriggerIcon.js.map +1 -1
- package/lib/HelpTriggerStandalone.js +2 -2
- package/lib/HelpTriggerStandalone.js.map +1 -1
- package/lib/HighlightPanel.js +3 -3
- package/lib/HighlightPanel.js.map +1 -1
- package/lib/HorizontalScroll.js +4 -4
- package/lib/HorizontalScroll.js.map +1 -1
- package/lib/Icon.js +2 -2
- package/lib/Icon.js.map +1 -1
- package/lib/InfoTeaser.js +5 -4
- package/lib/InfoTeaser.js.map +1 -1
- package/lib/Input.js +4 -4
- package/lib/Input.js.map +1 -1
- package/lib/Label.js +5 -5
- package/lib/Label.js.map +1 -1
- package/lib/LinkList.js +5 -5
- package/lib/LinkList.js.map +1 -1
- package/lib/List.js +2 -2
- package/lib/List.js.map +1 -1
- package/lib/ListEditMode.js +4 -4
- package/lib/ListEditMode.js.map +1 -1
- package/lib/MaxCharacters.js +2 -2
- package/lib/MaxCharacters.js.map +1 -1
- package/lib/Panel.js +63 -39
- package/lib/Panel.js.map +1 -1
- package/lib/PanelOld.js +14 -14
- package/lib/PanelOld.js.map +1 -1
- package/lib/PanelTitle.js +2 -2
- package/lib/PanelTitle.js.map +1 -1
- package/lib/PopOver.js +2 -2
- package/lib/PopOver.js.map +1 -1
- package/lib/RadioButton.js +5 -5
- package/lib/RadioButton.js.map +1 -1
- package/lib/Select.js +4 -4
- package/lib/Select.js.map +1 -1
- package/lib/SingleSelectItem.js +3 -3
- package/lib/SingleSelectItem.js.map +1 -1
- package/lib/Slider.js +4 -4
- package/lib/Slider.js.map +1 -1
- package/lib/Spacer.js +2 -2
- package/lib/Spacer.js.map +1 -1
- package/lib/StatusDot.js +4 -4
- package/lib/StatusDot.js.map +1 -1
- package/lib/StatusDotList.js +2 -2
- package/lib/StatusDotList.js.map +1 -1
- package/lib/StepButtons.js +5 -5
- package/lib/StepButtons.js.map +1 -1
- package/lib/TabList.js +8 -8
- package/lib/TabList.js.map +1 -1
- package/lib/TabPanel.js +2 -2
- package/lib/TabPanel.js.map +1 -1
- package/lib/Table.js +2 -2
- package/lib/Table.js.map +1 -1
- package/lib/TableBody.js +2 -2
- package/lib/TableBody.js.map +1 -1
- package/lib/TableCell.js +2 -2
- package/lib/TableCell.js.map +1 -1
- package/lib/TableExpandedRow.js +4 -4
- package/lib/TableExpandedRow.js.map +1 -1
- package/lib/TableExpanderCell.js +2 -2
- package/lib/TableExpanderCell.js.map +1 -1
- package/lib/TableHead.js +2 -2
- package/lib/TableHead.js.map +1 -1
- package/lib/TableHeadCell.js +3 -3
- package/lib/TableHeadCell.js.map +1 -1
- package/lib/TableRow.js +3 -3
- package/lib/TableRow.js.map +1 -1
- package/lib/Textarea.js +4 -4
- package/lib/Textarea.js.map +1 -1
- package/lib/Title.js +2 -2
- package/lib/Title.js.map +1 -1
- package/lib/Toast.js +3 -3
- package/lib/Toast.js.map +1 -1
- package/lib/__mocks__/uuid.js +0 -1
- package/lib/__mocks__/uuid.js.map +1 -1
- package/lib/components/AnchorLink/index.js +0 -13
- package/lib/components/ArticleTeaser/index.js +4 -4
- package/lib/components/ArticleTeaser/index.js.map +1 -1
- package/lib/components/AsChildSlot/index.js +0 -1
- package/lib/components/Avatar/index.js +0 -4
- package/lib/components/Badge/index.js +0 -8
- package/lib/components/Button/index.js +0 -17
- package/lib/components/Checkbox/index.js +0 -44
- package/lib/components/Chip/index.js +2 -2
- package/lib/components/Chip/index.js.map +1 -1
- package/lib/components/Close/index.js +0 -8
- package/lib/components/DictionaryTrigger/index.js +0 -1
- package/lib/components/Drawer/index.js +0 -37
- package/lib/components/Drawer/styles.module.scss +6 -0
- package/lib/components/Dropdown/SingleSelect/index.js +0 -2
- package/lib/components/Dropdown/SingleSelect/index.js.map +1 -1
- package/lib/components/Dropdown/index.js +5 -42
- package/lib/components/Dropdown/index.js.map +1 -1
- package/lib/components/DropdownOld/index.js +3 -31
- package/lib/components/DropdownOld/index.js.map +1 -1
- package/lib/components/Duolist/Duolist.d.ts +3 -1
- package/lib/components/Duolist/index.js +0 -4
- package/lib/components/ElementHeader/ElementHeaderText/index.js +0 -9
- package/lib/components/ElementHeader/ElementHeaderText/index.js.map +1 -1
- package/lib/components/ElementHeader/StatusDotList/index.js +0 -34
- package/lib/components/ElementHeader/index.js +0 -48
- package/lib/components/ElementHeader/index.js.map +1 -1
- package/lib/components/EmptyState/index.js +2 -4
- package/lib/components/EmptyState/index.js.map +1 -1
- package/lib/components/Expander/index.js +0 -24
- package/lib/components/Expander/styles.module.scss +16 -7
- package/lib/components/Expander/styles.module.scss.d.ts +2 -1
- package/lib/components/ExpanderHierarchy/index.js +7 -8
- package/lib/components/ExpanderHierarchy/index.js.map +1 -1
- package/lib/components/ExpanderList/index.js +6 -52
- package/lib/components/ExpanderList/index.js.map +1 -1
- package/lib/components/EyebrowHeader/index.js +0 -1
- package/lib/components/EyebrowHeader/index.js.map +1 -1
- package/lib/components/FavoriteButton/index.js +2 -3
- package/lib/components/FavoriteButton/index.js.map +1 -1
- package/lib/components/FormFieldTag/index.js +0 -2
- package/lib/components/FormGroup/FormGroup.d.ts +5 -0
- package/lib/components/FormGroup/index.js +0 -55
- package/lib/components/FormGroup/index.js.map +1 -1
- package/lib/components/FormLayout/index.js +0 -1
- package/lib/components/HelpBubble/index.js +3 -20
- package/lib/components/HelpBubble/index.js.map +1 -1
- package/lib/components/HelpDrawer/index.js +0 -36
- package/lib/components/HelpDrawer/index.js.map +1 -1
- package/lib/components/HelpExpanderInline/index.js +0 -2
- package/lib/components/HelpExpanderInline/index.js.map +1 -1
- package/lib/components/HelpExpanderStandalone/index.js +0 -6
- package/lib/components/HelpExpanderStandalone/index.js.map +1 -1
- package/lib/components/HelpPanel/index.js +2 -34
- package/lib/components/HelpPanel/index.js.map +1 -1
- package/lib/components/HelpTeaser/HelpTeaser.d.ts +2 -0
- package/lib/components/HelpTeaser/index.js +2 -9
- package/lib/components/HelpTeaser/index.js.map +1 -1
- package/lib/components/HelpTooltip/index.js +0 -2
- package/lib/components/HelpTooltip/index.js.map +1 -1
- package/lib/components/HelpTriggerIcon/index.js +0 -4
- package/lib/components/HelpTriggerInline/index.js +2 -2
- package/lib/components/HelpTriggerInline/index.js.map +1 -1
- package/lib/components/HelpTriggerStandalone/index.js +0 -8
- package/lib/components/HighlightPanel/index.js +0 -32
- package/lib/components/Highlighter/index.js +0 -8
- package/lib/components/HorizontalScroll/index.js +0 -5
- package/lib/components/Icons/AlarmClock.js +0 -1
- package/lib/components/Icons/AlarmClock.js.map +1 -1
- package/lib/components/Icons/AlertSignFill.js +0 -2
- package/lib/components/Icons/AlertSignStroke.js +0 -2
- package/lib/components/Icons/Archive.js +0 -1
- package/lib/components/Icons/Archive.js.map +1 -1
- package/lib/components/Icons/ArrowDown.js +0 -2
- package/lib/components/Icons/ArrowLeft.js +0 -1
- package/lib/components/Icons/ArrowLeft.js.map +1 -1
- package/lib/components/Icons/ArrowRight.js +0 -2
- package/lib/components/Icons/ArrowUp.js +0 -2
- package/lib/components/Icons/ArrowUpRight.js +0 -2
- package/lib/components/Icons/Attachment.js +0 -1
- package/lib/components/Icons/Attachment.js.map +1 -1
- package/lib/components/Icons/Avatar.js +0 -1
- package/lib/components/Icons/Avatar.js.map +1 -1
- package/lib/components/Icons/Braille.js +0 -1
- package/lib/components/Icons/Braille.js.map +1 -1
- package/lib/components/Icons/Bus.js +0 -1
- package/lib/components/Icons/Bus.js.map +1 -1
- package/lib/components/Icons/Calendar.js +0 -2
- package/lib/components/Icons/CalendarChange.js +0 -1
- package/lib/components/Icons/CalendarChange.js.map +1 -1
- package/lib/components/Icons/CalendarCheck.js +0 -1
- package/lib/components/Icons/CalendarCheck.js.map +1 -1
- package/lib/components/Icons/CalendarSave.js +0 -1
- package/lib/components/Icons/CalendarSave.js.map +1 -1
- package/lib/components/Icons/Candle.js +0 -1
- package/lib/components/Icons/Candle.js.map +1 -1
- package/lib/components/Icons/Change.js +0 -1
- package/lib/components/Icons/Change.js.map +1 -1
- package/lib/components/Icons/Check.js +0 -2
- package/lib/components/Icons/CheckFill.js +0 -2
- package/lib/components/Icons/ChevronDown.js +0 -2
- package/lib/components/Icons/ChevronLeft.js +0 -2
- package/lib/components/Icons/ChevronRight.js +0 -2
- package/lib/components/Icons/ChevronUp.js +0 -2
- package/lib/components/Icons/ChevronsDown.js +0 -1
- package/lib/components/Icons/ChevronsDown.js.map +1 -1
- package/lib/components/Icons/ChevronsUp.js +0 -1
- package/lib/components/Icons/ChevronsUp.js.map +1 -1
- package/lib/components/Icons/Contacts.js +0 -1
- package/lib/components/Icons/Contacts.js.map +1 -1
- package/lib/components/Icons/Copy.js +0 -1
- package/lib/components/Icons/Copy.js.map +1 -1
- package/lib/components/Icons/DotActive.js +0 -1
- package/lib/components/Icons/DotActive.js.map +1 -1
- package/lib/components/Icons/DotAlert.js +0 -1
- package/lib/components/Icons/DotAlert.js.map +1 -1
- package/lib/components/Icons/DotCancelled.js +0 -1
- package/lib/components/Icons/DotCancelled.js.map +1 -1
- package/lib/components/Icons/DotHalfDisc.js +0 -1
- package/lib/components/Icons/DotHalfDisc.js.map +1 -1
- package/lib/components/Icons/DotInactive.js +0 -1
- package/lib/components/Icons/DotInactive.js.map +1 -1
- package/lib/components/Icons/DotInfo.js +0 -1
- package/lib/components/Icons/DotInfo.js.map +1 -1
- package/lib/components/Icons/DotLookingGlass.js +0 -1
- package/lib/components/Icons/DotLookingGlass.js.map +1 -1
- package/lib/components/Icons/DotPending.js +0 -1
- package/lib/components/Icons/DotPending.js.map +1 -1
- package/lib/components/Icons/DotQuestionMark.js +0 -1
- package/lib/components/Icons/DotQuestionMark.js.map +1 -1
- package/lib/components/Icons/DotSuccess.js +0 -1
- package/lib/components/Icons/DotSuccess.js.map +1 -1
- package/lib/components/Icons/DotTransparent.js +0 -1
- package/lib/components/Icons/DotTransparent.js.map +1 -1
- package/lib/components/Icons/DotWarningTriangle.js +0 -1
- package/lib/components/Icons/DotWarningTriangle.js.map +1 -1
- package/lib/components/Icons/Download.js +0 -1
- package/lib/components/Icons/Download.js.map +1 -1
- package/lib/components/Icons/Drag.js +0 -1
- package/lib/components/Icons/Drag.js.map +1 -1
- package/lib/components/Icons/EChat.js +0 -1
- package/lib/components/Icons/EChat.js.map +1 -1
- package/lib/components/Icons/Ear.js +0 -1
- package/lib/components/Icons/Ear.js.map +1 -1
- package/lib/components/Icons/EarDeaf.js +0 -1
- package/lib/components/Icons/EarDeaf.js.map +1 -1
- package/lib/components/Icons/EarHearingAid.js +0 -1
- package/lib/components/Icons/EarHearingAid.js.map +1 -1
- package/lib/components/Icons/EarVolume.js +0 -1
- package/lib/components/Icons/EarVolume.js.map +1 -1
- package/lib/components/Icons/Edit.js +0 -1
- package/lib/components/Icons/Edit.js.map +1 -1
- package/lib/components/Icons/EmergencyCall.js +0 -1
- package/lib/components/Icons/EmergencyCall.js.map +1 -1
- package/lib/components/Icons/EmoticonAnnoyed.js +0 -1
- package/lib/components/Icons/EmoticonAnnoyed.js.map +1 -1
- package/lib/components/Icons/EmoticonDelighted.js +0 -1
- package/lib/components/Icons/EmoticonDelighted.js.map +1 -1
- package/lib/components/Icons/EmoticonDisappointed.js +0 -1
- package/lib/components/Icons/EmoticonDisappointed.js.map +1 -1
- package/lib/components/Icons/EmoticonHappy.js +0 -1
- package/lib/components/Icons/EmoticonHappy.js.map +1 -1
- package/lib/components/Icons/EmoticonMeh.js +0 -1
- package/lib/components/Icons/EmoticonMeh.js.map +1 -1
- package/lib/components/Icons/EnterFullScreen.js +0 -1
- package/lib/components/Icons/EnterFullScreen.js.map +1 -1
- package/lib/components/Icons/Envelope.js +0 -1
- package/lib/components/Icons/Envelope.js.map +1 -1
- package/lib/components/Icons/Eraser.js +0 -1
- package/lib/components/Icons/Eraser.js.map +1 -1
- package/lib/components/Icons/ErrorSignFill.js +0 -2
- package/lib/components/Icons/ErrorSignStroke.js +0 -1
- package/lib/components/Icons/ErrorSignStroke.js.map +1 -1
- package/lib/components/Icons/ExitFullScreen.js +0 -1
- package/lib/components/Icons/ExitFullScreen.js.map +1 -1
- package/lib/components/Icons/Eye.js +0 -1
- package/lib/components/Icons/Eye.js.map +1 -1
- package/lib/components/Icons/FallingLeaf.js +0 -1
- package/lib/components/Icons/FallingLeaf.js.map +1 -1
- package/lib/components/Icons/File.js +0 -1
- package/lib/components/Icons/File.js.map +1 -1
- package/lib/components/Icons/Filter.js +0 -1
- package/lib/components/Icons/Filter.js.map +1 -1
- package/lib/components/Icons/Form.js +0 -1
- package/lib/components/Icons/Form.js.map +1 -1
- package/lib/components/Icons/Forward.js +0 -2
- package/lib/components/Icons/Gallery.js +0 -1
- package/lib/components/Icons/Gallery.js.map +1 -1
- package/lib/components/Icons/Glasses.js +0 -1
- package/lib/components/Icons/Glasses.js.map +1 -1
- package/lib/components/Icons/Globe.js +0 -1
- package/lib/components/Icons/Globe.js.map +1 -1
- package/lib/components/Icons/Graph.js +0 -1
- package/lib/components/Icons/Graph.js.map +1 -1
- package/lib/components/Icons/Group.js +0 -1
- package/lib/components/Icons/Group.js.map +1 -1
- package/lib/components/Icons/GroupTwins.js +0 -1
- package/lib/components/Icons/GroupTwins.js.map +1 -1
- package/lib/components/Icons/HTMLFile.js +0 -1
- package/lib/components/Icons/HTMLFile.js.map +1 -1
- package/lib/components/Icons/HandsAndHeart.js +0 -1
- package/lib/components/Icons/HandsAndHeart.js.map +1 -1
- package/lib/components/Icons/HealthcarePerson.js +0 -1
- package/lib/components/Icons/HealthcarePerson.js.map +1 -1
- package/lib/components/Icons/HealthcarePersonell.js +0 -1
- package/lib/components/Icons/HealthcarePersonell.js.map +1 -1
- package/lib/components/Icons/HearingProtection.js +0 -1
- package/lib/components/Icons/HearingProtection.js.map +1 -1
- package/lib/components/Icons/Heart.js +0 -1
- package/lib/components/Icons/Heart.js.map +1 -1
- package/lib/components/Icons/HelpSign.js +0 -1
- package/lib/components/Icons/HelpSign.js.map +1 -1
- package/lib/components/Icons/History.js +0 -1
- package/lib/components/Icons/History.js.map +1 -1
- package/lib/components/Icons/Home.js +0 -1
- package/lib/components/Icons/Home.js.map +1 -1
- package/lib/components/Icons/HomeFill.js +0 -1
- package/lib/components/Icons/HomeFill.js.map +1 -1
- package/lib/components/Icons/Hospital.js +0 -1
- package/lib/components/Icons/Hospital.js.map +1 -1
- package/lib/components/Icons/Hourglass.js +0 -1
- package/lib/components/Icons/Hourglass.js.map +1 -1
- package/lib/components/Icons/InfoSignFill.js +0 -2
- package/lib/components/Icons/InfoSignStroke.js +0 -1
- package/lib/components/Icons/InfoSignStroke.js.map +1 -1
- package/lib/components/Icons/Journal.js +0 -1
- package/lib/components/Icons/Journal.js.map +1 -1
- package/lib/components/Icons/LegalDocument.js +0 -1
- package/lib/components/Icons/LegalDocument.js.map +1 -1
- package/lib/components/Icons/List.js +0 -1
- package/lib/components/Icons/List.js.map +1 -1
- package/lib/components/Icons/Location.js +0 -1
- package/lib/components/Icons/Location.js.map +1 -1
- package/lib/components/Icons/LocationFill.js +0 -1
- package/lib/components/Icons/LocationFill.js.map +1 -1
- package/lib/components/Icons/Lock.js +0 -1
- package/lib/components/Icons/Lock.js.map +1 -1
- package/lib/components/Icons/Login.js +0 -1
- package/lib/components/Icons/Login.js.map +1 -1
- package/lib/components/Icons/Logout.js +0 -1
- package/lib/components/Icons/Logout.js.map +1 -1
- package/lib/components/Icons/MaleDoctorCompact.js +0 -1
- package/lib/components/Icons/MaleDoctorCompact.js.map +1 -1
- package/lib/components/Icons/MaleDoctorCompactFill.js +0 -1
- package/lib/components/Icons/MaleDoctorCompactFill.js.map +1 -1
- package/lib/components/Icons/Medicine.js +0 -1
- package/lib/components/Icons/Medicine.js.map +1 -1
- package/lib/components/Icons/Menu.js +0 -1
- package/lib/components/Icons/Menu.js.map +1 -1
- package/lib/components/Icons/Minus.js +0 -1
- package/lib/components/Icons/Minus.js.map +1 -1
- package/lib/components/Icons/MobilePhone.js +0 -1
- package/lib/components/Icons/MobilePhone.js.map +1 -1
- package/lib/components/Icons/NoAccess.js +0 -1
- package/lib/components/Icons/NoAccess.js.map +1 -1
- package/lib/components/Icons/NoEye.js +0 -1
- package/lib/components/Icons/NoEye.js.map +1 -1
- package/lib/components/Icons/NoFilter.js +0 -1
- package/lib/components/Icons/NoFilter.js.map +1 -1
- package/lib/components/Icons/PaperPlane.js +0 -1
- package/lib/components/Icons/PaperPlane.js.map +1 -1
- package/lib/components/Icons/Pause.js +0 -1
- package/lib/components/Icons/Pause.js.map +1 -1
- package/lib/components/Icons/Pencil.js +0 -2
- package/lib/components/Icons/PersonCancel.js +0 -1
- package/lib/components/Icons/PersonCancel.js.map +1 -1
- package/lib/components/Icons/PersonalPlan.js +0 -1
- package/lib/components/Icons/PersonalPlan.js.map +1 -1
- package/lib/components/Icons/Play.js +0 -1
- package/lib/components/Icons/Play.js.map +1 -1
- package/lib/components/Icons/PlusLarge.js +0 -1
- package/lib/components/Icons/PlusLarge.js.map +1 -1
- package/lib/components/Icons/PlusSmall.js +0 -2
- package/lib/components/Icons/Printer.js +0 -1
- package/lib/components/Icons/Printer.js.map +1 -1
- package/lib/components/Icons/QrCode.js +0 -1
- package/lib/components/Icons/QrCode.js.map +1 -1
- package/lib/components/Icons/Receptionist.js +0 -1
- package/lib/components/Icons/Receptionist.js.map +1 -1
- package/lib/components/Icons/Referral.js +0 -1
- package/lib/components/Icons/Referral.js.map +1 -1
- package/lib/components/Icons/Refresh.js +0 -1
- package/lib/components/Icons/Refresh.js.map +1 -1
- package/lib/components/Icons/Reply.js +0 -1
- package/lib/components/Icons/Reply.js.map +1 -1
- package/lib/components/Icons/Save.js +0 -1
- package/lib/components/Icons/Save.js.map +1 -1
- package/lib/components/Icons/ScreenReader.js +0 -1
- package/lib/components/Icons/ScreenReader.js.map +1 -1
- package/lib/components/Icons/Search.js +0 -1
- package/lib/components/Icons/Search.js.map +1 -1
- package/lib/components/Icons/SectionSign.js +0 -1
- package/lib/components/Icons/SectionSign.js.map +1 -1
- package/lib/components/Icons/Settings.js +0 -1
- package/lib/components/Icons/Settings.js.map +1 -1
- package/lib/components/Icons/SettingsFill.js +0 -1
- package/lib/components/Icons/SettingsFill.js.map +1 -1
- package/lib/components/Icons/Share.js +0 -1
- package/lib/components/Icons/Share.js.map +1 -1
- package/lib/components/Icons/SortDown.js +0 -1
- package/lib/components/Icons/SortDown.js.map +1 -1
- package/lib/components/Icons/SortUp.js +0 -1
- package/lib/components/Icons/SortUp.js.map +1 -1
- package/lib/components/Icons/SpeechBubble.js +0 -1
- package/lib/components/Icons/SpeechBubble.js.map +1 -1
- package/lib/components/Icons/Stopwatch.js +0 -1
- package/lib/components/Icons/Stopwatch.js.map +1 -1
- package/lib/components/Icons/Sun.js +0 -1
- package/lib/components/Icons/Sun.js.map +1 -1
- package/lib/components/Icons/SupportingPerson.js +0 -1
- package/lib/components/Icons/SupportingPerson.js.map +1 -1
- package/lib/components/Icons/TimePassing.js +0 -1
- package/lib/components/Icons/TimePassing.js.map +1 -1
- package/lib/components/Icons/Tombstone.js +0 -1
- package/lib/components/Icons/Tombstone.js.map +1 -1
- package/lib/components/Icons/Toolbox.js +0 -1
- package/lib/components/Icons/Toolbox.js.map +1 -1
- package/lib/components/Icons/TrashCan.js +0 -1
- package/lib/components/Icons/TrashCan.js.map +1 -1
- package/lib/components/Icons/TreatmentAids.js +0 -1
- package/lib/components/Icons/TreatmentAids.js.map +1 -1
- package/lib/components/Icons/TriangleX.js +0 -2
- package/lib/components/Icons/Undo.js +0 -2
- package/lib/components/Icons/Upload.js +0 -1
- package/lib/components/Icons/Upload.js.map +1 -1
- package/lib/components/Icons/Vaccine.js +0 -1
- package/lib/components/Icons/Vaccine.js.map +1 -1
- package/lib/components/Icons/VerticalDots.js +0 -2
- package/lib/components/Icons/VideoCamera.js +0 -1
- package/lib/components/Icons/VideoCamera.js.map +1 -1
- package/lib/components/Icons/VideoChat.js +0 -1
- package/lib/components/Icons/VideoChat.js.map +1 -1
- package/lib/components/Icons/Wallet.js +0 -1
- package/lib/components/Icons/Wallet.js.map +1 -1
- package/lib/components/Icons/Watch.js +0 -2
- package/lib/components/Icons/X.js +0 -2
- package/lib/components/Icons/Zoom.js +0 -1
- package/lib/components/Icons/Zoom.js.map +1 -1
- package/lib/components/Icons/ZoomInLeft.js +0 -1
- package/lib/components/Icons/ZoomInLeft.js.map +1 -1
- package/lib/components/Icons/ZoomOutLeft.js +0 -1
- package/lib/components/Icons/ZoomOutLeft.js.map +1 -1
- package/lib/components/Illustration/index.js +0 -2
- package/lib/components/Illustrations/BabyMobile.js +0 -2
- package/lib/components/Illustrations/BabyMobile.js.map +1 -1
- package/lib/components/Illustrations/BabyMobileMedium.js +0 -3
- package/lib/components/Illustrations/Child.js +0 -2
- package/lib/components/Illustrations/Child.js.map +1 -1
- package/lib/components/Illustrations/ChildMedium.js +0 -3
- package/lib/components/Illustrations/FacialRecognitionFingerprint.js +0 -2
- package/lib/components/Illustrations/FacialRecognitionFingerprint.js.map +1 -1
- package/lib/components/Illustrations/FacialRecognitionFingerprintMedium.js +0 -3
- package/lib/components/Illustrations/GiveBabyFood.js +0 -2
- package/lib/components/Illustrations/GiveBabyFood.js.map +1 -1
- package/lib/components/Illustrations/GiveBabyFoodMedium.js +0 -3
- package/lib/components/Illustrations/ReadLetters.js +0 -2
- package/lib/components/Illustrations/ReadLetters.js.map +1 -1
- package/lib/components/Illustrations/ReadLettersMedium.js +0 -3
- package/lib/components/Illustrations/Stroller.js +0 -2
- package/lib/components/Illustrations/Stroller.js.map +1 -1
- package/lib/components/Illustrations/StrollerMedium.js +0 -3
- package/lib/components/Illustrations/Support2.js +0 -2
- package/lib/components/Illustrations/Support2.js.map +1 -1
- package/lib/components/Illustrations/Support2Medium.js +0 -3
- package/lib/components/InfoTeaser/InfoTeaser.d.ts +2 -0
- package/lib/components/InfoTeaser/index.js +0 -8
- package/lib/components/InfoTeaser/styles.module.scss +0 -2
- package/lib/components/Input/Input.d.ts +2 -2
- package/lib/components/Input/index.js +0 -44
- package/lib/components/Label/index.js +0 -38
- package/lib/components/LazyIcon/index.js +0 -4
- package/lib/components/LazyIllustration/index.js +0 -6
- package/lib/components/LinkList/index.js +0 -54
- package/lib/components/List/index.js +0 -1
- package/lib/components/ListEditMode/index.js +0 -4
- package/lib/components/Loader/index.js +4 -5
- package/lib/components/Loader/index.js.map +1 -1
- package/lib/components/Logo/index.js +0 -4
- package/lib/components/Logo/index.js.map +1 -1
- package/lib/components/Modal/index.js +9 -30
- package/lib/components/Modal/index.js.map +1 -1
- package/lib/components/NotificationPanel/index.js +6 -34
- package/lib/components/NotificationPanel/index.js.map +1 -1
- package/lib/components/Panel/PanelTitle/index.js +0 -11
- package/lib/components/Panel/index.js +0 -31
- package/lib/components/Panel/index.js.map +1 -1
- package/lib/components/PanelList/PanelList.d.ts +6 -0
- package/lib/components/PanelList/index.js +3 -53
- package/lib/components/PanelList/index.js.map +1 -1
- package/lib/components/PanelListOld/index.js +2 -36
- package/lib/components/PanelListOld/index.js.map +1 -1
- package/lib/components/PanelOld/index.js +0 -35
- package/lib/components/PopMenu/index.js +3 -54
- package/lib/components/PopMenu/index.js.map +1 -1
- package/lib/components/PopOver/index.js +0 -3
- package/lib/components/Portal/index.js +0 -1
- package/lib/components/Progressbar/index.js +2 -2
- package/lib/components/Progressbar/index.js.map +1 -1
- package/lib/components/PromoPanel/index.js +2 -12
- package/lib/components/PromoPanel/index.js.map +1 -1
- package/lib/components/RadioButton/index.js +0 -43
- package/lib/components/Select/index.js +0 -43
- package/lib/components/Select/styles.module.scss +2 -0
- package/lib/components/ServiceMessage/index.js +5 -48
- package/lib/components/ServiceMessage/index.js.map +1 -1
- package/lib/components/SharingStatus/index.js +4 -4
- package/lib/components/SharingStatus/index.js.map +1 -1
- package/lib/components/Slider/index.js +0 -10
- package/lib/components/Spacer/index.js +0 -1
- package/lib/components/StatusDot/index.js +0 -33
- package/lib/components/Step/index.js +2 -2
- package/lib/components/Step/index.js.map +1 -1
- package/lib/components/StepButtons/index.js +0 -1
- package/lib/components/Stepper/index.js +2 -3
- package/lib/components/Stepper/index.js.map +1 -1
- package/lib/components/StickyNote/index.js +8 -11
- package/lib/components/StickyNote/index.js.map +1 -1
- package/lib/components/Table/TableBody/index.js +0 -13
- package/lib/components/Table/TableCell/index.js +0 -13
- package/lib/components/Table/TableExpandedRow/index.js +0 -29
- package/lib/components/Table/TableExpanderCell/index.js +0 -30
- package/lib/components/Table/TableHead/index.js +0 -13
- package/lib/components/Table/TableHeadCell/index.js +0 -16
- package/lib/components/Table/TableRow/index.js +0 -30
- package/lib/components/Table/index.js +0 -31
- package/lib/components/Table/index.js.map +1 -1
- package/lib/components/Tabs/TabList/index.js +0 -14
- package/lib/components/Tabs/index.js +4 -17
- package/lib/components/Tabs/index.js.map +1 -1
- package/lib/components/Tag/index.js +2 -4
- package/lib/components/Tag/index.js.map +1 -1
- package/lib/components/Textarea/Textarea.d.ts +1 -1
- package/lib/components/Textarea/index.js +0 -43
- package/lib/components/Tile/index.js +4 -6
- package/lib/components/Tile/index.js.map +1 -1
- package/lib/components/Title/index.js +0 -1
- package/lib/components/Toast/index.js +0 -10
- package/lib/components/Toast/index.js.map +1 -1
- package/lib/components/ToastList/index.js +0 -9
- package/lib/components/ToastList/index.js.map +1 -1
- package/lib/components/Toggle/index.js +10 -10
- package/lib/components/Toggle/index.js.map +1 -1
- package/lib/components/Validation/index.js +2 -53
- package/lib/components/Validation/index.js.map +1 -1
- package/lib/floating-ui.react.js +65 -61
- package/lib/floating-ui.react.js.map +1 -1
- package/lib/hoc/withBreakpoint/index.js +0 -2
- package/lib/hoc/withBreakpoint/index.js.map +1 -1
- package/lib/hoc/withBreakpoint/withBreakpoint.js +0 -2
- package/lib/hooks/useBreakpoint.js +0 -1
- package/lib/hooks/useExpand.js +0 -1
- package/lib/hooks/useFocusToggle.js +0 -2
- package/lib/hooks/useFocusTrap.js +0 -3
- package/lib/hooks/useFocusableElements.js +0 -1
- package/lib/hooks/useIcons.js +0 -6
- package/lib/hooks/useIsMobileBreakpoint.js +0 -2
- package/lib/hooks/useIsVisible.js +0 -1
- package/lib/hooks/useLayoutEvent.js +0 -1
- package/lib/hooks/useReturnFocusOnUnmount.js +0 -2
- package/lib/hooks/useRovingFocus.js +0 -2
- package/lib/hooks/useSize.js +0 -1
- package/lib/hooks/useToggle.js +0 -1
- package/lib/index.js +0 -9
- package/lib/theme/currys/color.js +0 -4
- package/lib/theme/currys/index.js +0 -5
- package/lib/theme/currys/spacing.js +0 -1
- package/lib/theme/index.js +0 -3
- package/lib/useElementList.js +15 -2
- package/lib/useElementList.js.map +1 -1
- package/lib/utils/uuid.js +0 -1
- package/lib/uuid.js +1 -1
- package/package.json +3 -8
- package/lib/scss/_figma-tokens.scss +0 -68
- package/scss/_figma-tokens.scss +0 -68
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import "../../constants2.js";
|
|
2
1
|
import { t as usePseudoClasses } from "../../usePseudoClasses.js";
|
|
3
|
-
import "../../grid.js";
|
|
4
2
|
import { n as mergeRefs } from "../../refs.js";
|
|
5
3
|
import { t as Icon_default } from "../../Icon.js";
|
|
6
|
-
import "../../useBreakpoint.js";
|
|
7
4
|
import { t as useIsMobileBreakpoint } from "../../useIsMobileBreakpoint.js";
|
|
8
5
|
import { t as useIdWithFallback } from "../../useIdWithFallback.js";
|
|
9
6
|
import { t as getAriaDescribedBy } from "../../accessibility.js";
|
|
10
7
|
import { t as X_default } from "../../X.js";
|
|
11
8
|
import React, { useLayoutEffect, useRef } from "react";
|
|
12
|
-
import
|
|
9
|
+
import classNames from "classnames";
|
|
13
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
11
|
import styles from "./styles.module.scss";
|
|
15
12
|
var Close_default = React.forwardRef(function ButtonForwardedRef(props, ref) {
|
|
16
13
|
const { testId, ariaLabel = "Lukk", onClick } = props;
|
|
17
14
|
const { refObject, isHovered } = usePseudoClasses();
|
|
18
15
|
const iconSize = useIsMobileBreakpoint() ? 38 : 48;
|
|
19
|
-
const closeClasses =
|
|
16
|
+
const closeClasses = classNames(styles.close);
|
|
20
17
|
return /* @__PURE__ */ jsx("button", {
|
|
21
18
|
ref: mergeRefs([ref, refObject]),
|
|
22
19
|
"data-testid": testId,
|
|
@@ -25,7 +22,7 @@ var Close_default = React.forwardRef(function ButtonForwardedRef(props, ref) {
|
|
|
25
22
|
onClick,
|
|
26
23
|
type: "button",
|
|
27
24
|
children: /* @__PURE__ */ jsx("span", {
|
|
28
|
-
className:
|
|
25
|
+
className: classNames(styles["close__inner-container"]),
|
|
29
26
|
children: /* @__PURE__ */ jsx(Icon_default, {
|
|
30
27
|
svgIcon: X_default,
|
|
31
28
|
color: "black",
|
|
@@ -146,7 +143,7 @@ var StickyNote = (props) => {
|
|
|
146
143
|
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
|
|
147
144
|
"data-testid": testId,
|
|
148
145
|
ref: stickynoteRef,
|
|
149
|
-
className:
|
|
146
|
+
className: classNames(styles["sticky-note"], wrapperClassName, {
|
|
150
147
|
[styles["sticky-note--focused"]]: isTextareaFocused,
|
|
151
148
|
[styles["sticky-note--active"]]: isActive,
|
|
152
149
|
[styles["sticky-note--hovered"]]: isHovered && !isTextareaFocused && !textareaProps.disabled,
|
|
@@ -160,7 +157,7 @@ var StickyNote = (props) => {
|
|
|
160
157
|
},
|
|
161
158
|
children: [
|
|
162
159
|
/* @__PURE__ */ jsx("div", {
|
|
163
|
-
className:
|
|
160
|
+
className: classNames(styles["sticky-note__header"]),
|
|
164
161
|
children: timestamp && /* @__PURE__ */ jsx("span", {
|
|
165
162
|
className: styles["sticky-note__header__timestamp"],
|
|
166
163
|
children: timestamp
|
|
@@ -169,7 +166,7 @@ var StickyNote = (props) => {
|
|
|
169
166
|
/* @__PURE__ */ jsx("textarea", {
|
|
170
167
|
ref: textareaRef,
|
|
171
168
|
"data-testid": `${testId}-textarea`,
|
|
172
|
-
className:
|
|
169
|
+
className: classNames(styles["sticky-note__textarea"], textareaProps.className),
|
|
173
170
|
...textareaProps,
|
|
174
171
|
onChange: handleChange,
|
|
175
172
|
"aria-describedby": getAriaDescribedBy(props, errorTextId)
|
|
@@ -180,11 +177,11 @@ var StickyNote = (props) => {
|
|
|
180
177
|
testId: "closeButton"
|
|
181
178
|
}),
|
|
182
179
|
/* @__PURE__ */ jsx("div", {
|
|
183
|
-
className:
|
|
180
|
+
className: classNames(styles["sticky-note__footer"]),
|
|
184
181
|
children: footerText && /* @__PURE__ */ jsx("span", { children: footerText })
|
|
185
182
|
}),
|
|
186
183
|
/* @__PURE__ */ jsx("div", {
|
|
187
|
-
className:
|
|
184
|
+
className: classNames(styles["sticky-note__triangle"]),
|
|
188
185
|
children: /* @__PURE__ */ jsx(Triangle_default, {
|
|
189
186
|
isHover: isHovered,
|
|
190
187
|
isActive,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Triangle: React.FC<TriangleProps>","colors: Palette","svg: React.ReactNode","StickyNote: React.FC<StickyNoteProps>"],"sources":["../../../src/components/StickyNote/Close.tsx","../../../src/components/StickyNote/Triangle.tsx","../../../src/components/StickyNote/StickyNote.tsx","../../../src/components/StickyNote/index.ts"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../utils/refs';\nimport Icon from '../Icon';\nimport X from '../Icons/X';\n\nimport styles from './styles.module.scss';\n\nexport interface CloseProps {\n /** Function is called when user clicks the button */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n /** Sets the aria-label of the button */\n ariaLabel?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\n/*\n Denne er kopiert fra Close-komponent. \n Det er for å kunne ha en egen lokal variant for StickyNote. \n Likt som i Figma.\n */\n\nconst Close = React.forwardRef(function ButtonForwardedRef(props: CloseProps, ref: React.ForwardedRef<HTMLButtonElement>) {\n const { testId, ariaLabel = 'Lukk', onClick } = props;\n const { refObject, isHovered } = usePseudoClasses();\n\n const iconSize = useIsMobileBreakpoint() ? 38 : 48;\n\n const closeClasses = classNames(styles.close);\n\n return (\n <button\n ref={mergeRefs([ref, refObject])}\n data-testid={testId}\n className={closeClasses}\n aria-label={ariaLabel}\n onClick={onClick}\n type=\"button\"\n >\n <span className={classNames(styles['close__inner-container'])}>\n <Icon svgIcon={X} color=\"black\" size={iconSize} isHovered={isHovered} />\n </span>\n </button>\n );\n});\n\nexport default Close;\n","import React from 'react';\n\ninterface TriangleProps {\n isHover: boolean;\n isFocus: boolean;\n isActive: boolean;\n isError: boolean;\n}\n\nexport interface Palette {\n border: string;\n background: string;\n}\n\nconst Triangle: React.FC<TriangleProps> = ({ isHover, isFocus, isActive, isError }) => {\n const palette = ((): Palette => {\n const colors: Palette = {\n border: 'var(--component-stickynote-border-normal)',\n background: 'var(--component-stickynote-background-fold-normal-light)',\n };\n\n if (!isError) {\n if (isHover) {\n colors.background = 'var(--component-stickynote-background-fold-normal-medium)';\n }\n if (isFocus) {\n colors.border = 'var(--color-action-border-onlight-focus)';\n colors.background = 'var(--component-stickynote-background-fold-normal-medium)';\n }\n if (isActive) {\n colors.background = 'var(--component-stickynote-background-fold-normal-dark)';\n }\n } else {\n colors.border = 'var(--component-stickynote-border-error)';\n colors.background = 'var(--component-stickynote-background-fold-error-light)';\n if (isHover) {\n colors.background = 'var(--component-stickynote-background-fold-error-medium)';\n }\n if (isFocus) {\n colors.border = 'var(--color-action-border-onlight-focus)';\n colors.background = 'var(--component-stickynote-background-fold-error-medium)';\n }\n if (isActive) {\n colors.background = 'var(--component-stickynote-background-fold-error-dark)';\n }\n }\n return colors;\n })();\n\n let svg: React.ReactNode;\n\n if (isFocus) {\n svg = (\n <svg width=\"21\" height=\"21\" viewBox=\"0 0 21 21\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <mask id=\"path-1-inside-1_7753_1401\" fill=\"white\">\n <path d=\"M0.493163 20.9211L0.276366 20.9211L0.276367 0.921142L20.2764 0.921143L20.2764 1.13794L0.493163 20.9211Z\" />\n </mask>\n <path\n d=\"M0.493163 20.9211L0.276366 20.9211L0.276367 0.921142L20.2764 0.921143L20.2764 1.13794L0.493163 20.9211Z\"\n fill={palette.background}\n />\n <path\n d=\"M0.493163 20.9211L0.493163 22.9211L1.32159 22.9211L1.90738 22.3354L0.493163 20.9211ZM0.276366 20.9211L-1.72363 20.9211L-1.72363 22.9211L0.276366 22.9211L0.276366 20.9211ZM0.276367 0.921142L0.276367 -1.07886L-1.72363 -1.07886L-1.72363 0.921142L0.276367 0.921142ZM20.2764 0.921143L22.2764 0.921143L22.2764 -1.07886L20.2764 -1.07886L20.2764 0.921143ZM20.2764 1.13794L21.6906 2.55215L22.2764 1.96637L22.2764 1.13794L20.2764 1.13794ZM0.493163 20.9211L0.493163 18.9211L0.276366 18.9211L0.276366 20.9211L0.276366 22.9211L0.493163 22.9211L0.493163 20.9211ZM0.276366 20.9211L2.27637 20.9211L2.27637 0.921142L0.276367 0.921142L-1.72363 0.921142L-1.72363 20.9211L0.276366 20.9211ZM0.276367 0.921142L0.276367 2.92114L20.2764 2.92114L20.2764 0.921143L20.2764 -1.07886L0.276367 -1.07886L0.276367 0.921142ZM20.2764 0.921143L18.2764 0.921142L18.2764 1.13794L20.2764 1.13794L22.2764 1.13794L22.2764 0.921143L20.2764 0.921143ZM20.2764 1.13794L18.8622 -0.276274L-0.92105 19.5069L0.493163 20.9211L1.90738 22.3354L21.6906 2.55215L20.2764 1.13794Z\"\n fill={palette.border}\n mask=\"url(#path-1-inside-1_7753_1401)\"\n />\n </svg>\n );\n } else {\n svg = (\n <svg width=\"21\" height=\"21\" viewBox=\"0 0 21 21\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <mask id=\"path-1-inside-1_7717_293537\" fill=\"white\">\n <path d=\"M0.923827 20.9211L0.70703 20.9211L0.707031 0.921142L20.707 0.921143L20.707 1.13794L0.923827 20.9211Z\" />\n </mask>\n <path\n d=\"M0.923827 20.9211L0.70703 20.9211L0.707031 0.921142L20.707 0.921143L20.707 1.13794L0.923827 20.9211Z\"\n fill={palette.background}\n />\n <path\n d=\"M0.923827 20.9211L0.923827 21.9211L1.33804 21.9211L1.63093 21.6282L0.923827 20.9211ZM0.70703 20.9211L-0.29297 20.9211L-0.29297 21.9211L0.70703 21.9211L0.70703 20.9211ZM0.707031 0.921142L0.707031 -0.0788582L-0.292969 -0.0788583L-0.292969 0.921142L0.707031 0.921142ZM20.707 0.921143L21.707 0.921143L21.707 -0.0788574L20.707 -0.0788574L20.707 0.921143ZM20.707 1.13794L21.4141 1.84505L21.707 1.55215L21.707 1.13794L20.707 1.13794ZM0.923827 20.9211L0.923827 19.9211L0.70703 19.9211L0.70703 20.9211L0.70703 21.9211L0.923827 21.9211L0.923827 20.9211ZM0.70703 20.9211L1.70703 20.9211L1.70703 0.921142L0.707031 0.921142L-0.292969 0.921142L-0.29297 20.9211L0.70703 20.9211ZM0.707031 0.921142L0.707031 1.92114L20.707 1.92114L20.707 0.921143L20.707 -0.0788574L0.707031 -0.0788582L0.707031 0.921142ZM20.707 0.921143L19.707 0.921143L19.707 1.13794L20.707 1.13794L21.707 1.13794L21.707 0.921143L20.707 0.921143ZM20.707 1.13794L19.9999 0.430833L0.21672 20.214L0.923827 20.9211L1.63093 21.6282L21.4141 1.84505L20.707 1.13794Z\"\n fill={palette.border}\n mask=\"url(#path-1-inside-1_7717_293537)\"\n />\n </svg>\n );\n }\n\n return <>{svg}</>;\n};\n\nexport default Triangle;\n","import React, { useLayoutEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Close from './Close';\nimport Triangle from './Triangle';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\n\nimport styles from './styles.module.scss';\n\nexport interface StickyNoteProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n /** Aria label for the delete/close button */\n arialabelXButton: string;\n /** Activates the error styling */\n error?: boolean;\n /** Error text to show below the note */\n errorText?: string;\n /** Error text id */\n errorTextId?: string;\n /** Text shown under the textarea */\n footerText?: string;\n /** Function run when clicking the delete/close button */\n onXButtonClick?: () => void;\n /** Function run if user clicks the component while it is disabled */\n onClickWhileDisabled?: () => void;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Timestamp shown over the textarea */\n timestamp: string;\n /** Classname for the outer wrapper */\n wrapperClassName?: string;\n}\n\nconst StickyNote: React.FC<StickyNoteProps> = (props: StickyNoteProps) => {\n const {\n wrapperClassName,\n timestamp,\n onXButtonClick,\n arialabelXButton,\n footerText,\n error,\n errorText,\n errorTextId: errorTextIdProp,\n onClickWhileDisabled,\n testId,\n ...textareaProps\n } = props;\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const stickynoteRef = useRef<HTMLDivElement>(null);\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const { isFocused: isTextareaFocused } = usePseudoClasses<HTMLTextAreaElement>(textareaRef);\n const { isHovered, isActive } = usePseudoClasses<HTMLDivElement>(stickynoteRef);\n\n const handleWrapperClick = (event: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>): void => {\n if ((event.target as HTMLElement).closest('button')) {\n return;\n }\n if (textareaProps.disabled) {\n if (onClickWhileDisabled) onClickWhileDisabled();\n return;\n }\n textareaRef.current?.focus();\n };\n\n const resizeTextarea = (): void => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n resizeTarget(textarea);\n };\n\n const resizeTarget = (target: HTMLTextAreaElement): void => {\n // Reset field height\n target.style.height = 'inherit';\n // Set new height\n target.style.height = `${target.scrollHeight}px`;\n };\n\n useLayoutEffect(() => {\n resizeTextarea();\n // Must run after the shadow DOM has been set up to work on microweb\n setTimeout(() => resizeTextarea(), 1000);\n }, []);\n\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>): void => {\n const textarea = e.target as HTMLTextAreaElement;\n resizeTarget(textarea);\n if (textareaProps.onChange) textareaProps.onChange(e);\n };\n\n return (\n <div>\n <div\n data-testid={testId}\n ref={stickynoteRef}\n className={classNames(styles['sticky-note'], wrapperClassName, {\n [styles['sticky-note--focused']]: isTextareaFocused,\n [styles['sticky-note--active']]: isActive,\n [styles['sticky-note--hovered']]: isHovered && !isTextareaFocused && !textareaProps.disabled,\n [styles['sticky-note--error']]: error,\n })}\n onClick={handleWrapperClick}\n role=\"textbox\"\n tabIndex={-1}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n handleWrapperClick(e as React.KeyboardEvent<HTMLDivElement>);\n }\n }}\n >\n <div className={classNames(styles['sticky-note__header'])}>\n {timestamp && <span className={styles['sticky-note__header__timestamp']}>{timestamp}</span>}\n </div>\n <textarea\n ref={textareaRef}\n data-testid={`${testId}-textarea`}\n className={classNames(styles['sticky-note__textarea'], textareaProps.className)}\n {...textareaProps}\n onChange={handleChange}\n aria-describedby={getAriaDescribedBy(props, errorTextId)}\n />\n <Close onClick={onXButtonClick} ariaLabel={arialabelXButton} testId=\"closeButton\" />\n <div className={classNames(styles['sticky-note__footer'])}>{footerText && <span>{footerText}</span>}</div>\n <div className={classNames(styles['sticky-note__triangle'])}>\n <Triangle isHover={isHovered} isActive={isActive} isFocus={isTextareaFocused} isError={!!error} />\n </div>\n </div>\n {error && (\n <p className={styles['sticky-note__error-text']} id={errorTextId}>\n {errorText}\n </p>\n )}\n </div>\n );\n};\n\nexport default StickyNote;\n","import StickyNote from './StickyNote';\nexport * from './StickyNote';\nexport default StickyNote;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["Triangle: React.FC<TriangleProps>","colors: Palette","svg: React.ReactNode","StickyNote: React.FC<StickyNoteProps>"],"sources":["../../../src/components/StickyNote/Close.tsx","../../../src/components/StickyNote/Triangle.tsx","../../../src/components/StickyNote/StickyNote.tsx","../../../src/components/StickyNote/index.ts"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../utils/refs';\nimport Icon from '../Icon';\nimport X from '../Icons/X';\n\nimport styles from './styles.module.scss';\n\nexport interface CloseProps {\n /** Function is called when user clicks the button */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n /** Sets the aria-label of the button */\n ariaLabel?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\n/*\n Denne er kopiert fra Close-komponent. \n Det er for å kunne ha en egen lokal variant for StickyNote. \n Likt som i Figma.\n */\n\nconst Close = React.forwardRef(function ButtonForwardedRef(props: CloseProps, ref: React.ForwardedRef<HTMLButtonElement>) {\n const { testId, ariaLabel = 'Lukk', onClick } = props;\n const { refObject, isHovered } = usePseudoClasses();\n\n const iconSize = useIsMobileBreakpoint() ? 38 : 48;\n\n const closeClasses = classNames(styles.close);\n\n return (\n <button\n ref={mergeRefs([ref, refObject])}\n data-testid={testId}\n className={closeClasses}\n aria-label={ariaLabel}\n onClick={onClick}\n type=\"button\"\n >\n <span className={classNames(styles['close__inner-container'])}>\n <Icon svgIcon={X} color=\"black\" size={iconSize} isHovered={isHovered} />\n </span>\n </button>\n );\n});\n\nexport default Close;\n","import React from 'react';\n\ninterface TriangleProps {\n isHover: boolean;\n isFocus: boolean;\n isActive: boolean;\n isError: boolean;\n}\n\nexport interface Palette {\n border: string;\n background: string;\n}\n\nconst Triangle: React.FC<TriangleProps> = ({ isHover, isFocus, isActive, isError }) => {\n const palette = ((): Palette => {\n const colors: Palette = {\n border: 'var(--component-stickynote-border-normal)',\n background: 'var(--component-stickynote-background-fold-normal-light)',\n };\n\n if (!isError) {\n if (isHover) {\n colors.background = 'var(--component-stickynote-background-fold-normal-medium)';\n }\n if (isFocus) {\n colors.border = 'var(--color-action-border-onlight-focus)';\n colors.background = 'var(--component-stickynote-background-fold-normal-medium)';\n }\n if (isActive) {\n colors.background = 'var(--component-stickynote-background-fold-normal-dark)';\n }\n } else {\n colors.border = 'var(--component-stickynote-border-error)';\n colors.background = 'var(--component-stickynote-background-fold-error-light)';\n if (isHover) {\n colors.background = 'var(--component-stickynote-background-fold-error-medium)';\n }\n if (isFocus) {\n colors.border = 'var(--color-action-border-onlight-focus)';\n colors.background = 'var(--component-stickynote-background-fold-error-medium)';\n }\n if (isActive) {\n colors.background = 'var(--component-stickynote-background-fold-error-dark)';\n }\n }\n return colors;\n })();\n\n let svg: React.ReactNode;\n\n if (isFocus) {\n svg = (\n <svg width=\"21\" height=\"21\" viewBox=\"0 0 21 21\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <mask id=\"path-1-inside-1_7753_1401\" fill=\"white\">\n <path d=\"M0.493163 20.9211L0.276366 20.9211L0.276367 0.921142L20.2764 0.921143L20.2764 1.13794L0.493163 20.9211Z\" />\n </mask>\n <path\n d=\"M0.493163 20.9211L0.276366 20.9211L0.276367 0.921142L20.2764 0.921143L20.2764 1.13794L0.493163 20.9211Z\"\n fill={palette.background}\n />\n <path\n d=\"M0.493163 20.9211L0.493163 22.9211L1.32159 22.9211L1.90738 22.3354L0.493163 20.9211ZM0.276366 20.9211L-1.72363 20.9211L-1.72363 22.9211L0.276366 22.9211L0.276366 20.9211ZM0.276367 0.921142L0.276367 -1.07886L-1.72363 -1.07886L-1.72363 0.921142L0.276367 0.921142ZM20.2764 0.921143L22.2764 0.921143L22.2764 -1.07886L20.2764 -1.07886L20.2764 0.921143ZM20.2764 1.13794L21.6906 2.55215L22.2764 1.96637L22.2764 1.13794L20.2764 1.13794ZM0.493163 20.9211L0.493163 18.9211L0.276366 18.9211L0.276366 20.9211L0.276366 22.9211L0.493163 22.9211L0.493163 20.9211ZM0.276366 20.9211L2.27637 20.9211L2.27637 0.921142L0.276367 0.921142L-1.72363 0.921142L-1.72363 20.9211L0.276366 20.9211ZM0.276367 0.921142L0.276367 2.92114L20.2764 2.92114L20.2764 0.921143L20.2764 -1.07886L0.276367 -1.07886L0.276367 0.921142ZM20.2764 0.921143L18.2764 0.921142L18.2764 1.13794L20.2764 1.13794L22.2764 1.13794L22.2764 0.921143L20.2764 0.921143ZM20.2764 1.13794L18.8622 -0.276274L-0.92105 19.5069L0.493163 20.9211L1.90738 22.3354L21.6906 2.55215L20.2764 1.13794Z\"\n fill={palette.border}\n mask=\"url(#path-1-inside-1_7753_1401)\"\n />\n </svg>\n );\n } else {\n svg = (\n <svg width=\"21\" height=\"21\" viewBox=\"0 0 21 21\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <mask id=\"path-1-inside-1_7717_293537\" fill=\"white\">\n <path d=\"M0.923827 20.9211L0.70703 20.9211L0.707031 0.921142L20.707 0.921143L20.707 1.13794L0.923827 20.9211Z\" />\n </mask>\n <path\n d=\"M0.923827 20.9211L0.70703 20.9211L0.707031 0.921142L20.707 0.921143L20.707 1.13794L0.923827 20.9211Z\"\n fill={palette.background}\n />\n <path\n d=\"M0.923827 20.9211L0.923827 21.9211L1.33804 21.9211L1.63093 21.6282L0.923827 20.9211ZM0.70703 20.9211L-0.29297 20.9211L-0.29297 21.9211L0.70703 21.9211L0.70703 20.9211ZM0.707031 0.921142L0.707031 -0.0788582L-0.292969 -0.0788583L-0.292969 0.921142L0.707031 0.921142ZM20.707 0.921143L21.707 0.921143L21.707 -0.0788574L20.707 -0.0788574L20.707 0.921143ZM20.707 1.13794L21.4141 1.84505L21.707 1.55215L21.707 1.13794L20.707 1.13794ZM0.923827 20.9211L0.923827 19.9211L0.70703 19.9211L0.70703 20.9211L0.70703 21.9211L0.923827 21.9211L0.923827 20.9211ZM0.70703 20.9211L1.70703 20.9211L1.70703 0.921142L0.707031 0.921142L-0.292969 0.921142L-0.29297 20.9211L0.70703 20.9211ZM0.707031 0.921142L0.707031 1.92114L20.707 1.92114L20.707 0.921143L20.707 -0.0788574L0.707031 -0.0788582L0.707031 0.921142ZM20.707 0.921143L19.707 0.921143L19.707 1.13794L20.707 1.13794L21.707 1.13794L21.707 0.921143L20.707 0.921143ZM20.707 1.13794L19.9999 0.430833L0.21672 20.214L0.923827 20.9211L1.63093 21.6282L21.4141 1.84505L20.707 1.13794Z\"\n fill={palette.border}\n mask=\"url(#path-1-inside-1_7717_293537)\"\n />\n </svg>\n );\n }\n\n return <>{svg}</>;\n};\n\nexport default Triangle;\n","import React, { useLayoutEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Close from './Close';\nimport Triangle from './Triangle';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\n\nimport styles from './styles.module.scss';\n\nexport interface StickyNoteProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n /** Aria label for the delete/close button */\n arialabelXButton: string;\n /** Activates the error styling */\n error?: boolean;\n /** Error text to show below the note */\n errorText?: string;\n /** Error text id */\n errorTextId?: string;\n /** Text shown under the textarea */\n footerText?: string;\n /** Function run when clicking the delete/close button */\n onXButtonClick?: () => void;\n /** Function run if user clicks the component while it is disabled */\n onClickWhileDisabled?: () => void;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Timestamp shown over the textarea */\n timestamp: string;\n /** Classname for the outer wrapper */\n wrapperClassName?: string;\n}\n\nconst StickyNote: React.FC<StickyNoteProps> = (props: StickyNoteProps) => {\n const {\n wrapperClassName,\n timestamp,\n onXButtonClick,\n arialabelXButton,\n footerText,\n error,\n errorText,\n errorTextId: errorTextIdProp,\n onClickWhileDisabled,\n testId,\n ...textareaProps\n } = props;\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const stickynoteRef = useRef<HTMLDivElement>(null);\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const { isFocused: isTextareaFocused } = usePseudoClasses<HTMLTextAreaElement>(textareaRef);\n const { isHovered, isActive } = usePseudoClasses<HTMLDivElement>(stickynoteRef);\n\n const handleWrapperClick = (event: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>): void => {\n if ((event.target as HTMLElement).closest('button')) {\n return;\n }\n if (textareaProps.disabled) {\n if (onClickWhileDisabled) onClickWhileDisabled();\n return;\n }\n textareaRef.current?.focus();\n };\n\n const resizeTextarea = (): void => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n resizeTarget(textarea);\n };\n\n const resizeTarget = (target: HTMLTextAreaElement): void => {\n // Reset field height\n target.style.height = 'inherit';\n // Set new height\n target.style.height = `${target.scrollHeight}px`;\n };\n\n useLayoutEffect(() => {\n resizeTextarea();\n // Must run after the shadow DOM has been set up to work on microweb\n setTimeout(() => resizeTextarea(), 1000);\n }, []);\n\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>): void => {\n const textarea = e.target as HTMLTextAreaElement;\n resizeTarget(textarea);\n if (textareaProps.onChange) textareaProps.onChange(e);\n };\n\n return (\n <div>\n <div\n data-testid={testId}\n ref={stickynoteRef}\n className={classNames(styles['sticky-note'], wrapperClassName, {\n [styles['sticky-note--focused']]: isTextareaFocused,\n [styles['sticky-note--active']]: isActive,\n [styles['sticky-note--hovered']]: isHovered && !isTextareaFocused && !textareaProps.disabled,\n [styles['sticky-note--error']]: error,\n })}\n onClick={handleWrapperClick}\n role=\"textbox\"\n tabIndex={-1}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n handleWrapperClick(e as React.KeyboardEvent<HTMLDivElement>);\n }\n }}\n >\n <div className={classNames(styles['sticky-note__header'])}>\n {timestamp && <span className={styles['sticky-note__header__timestamp']}>{timestamp}</span>}\n </div>\n <textarea\n ref={textareaRef}\n data-testid={`${testId}-textarea`}\n className={classNames(styles['sticky-note__textarea'], textareaProps.className)}\n {...textareaProps}\n onChange={handleChange}\n aria-describedby={getAriaDescribedBy(props, errorTextId)}\n />\n <Close onClick={onXButtonClick} ariaLabel={arialabelXButton} testId=\"closeButton\" />\n <div className={classNames(styles['sticky-note__footer'])}>{footerText && <span>{footerText}</span>}</div>\n <div className={classNames(styles['sticky-note__triangle'])}>\n <Triangle isHover={isHovered} isActive={isActive} isFocus={isTextareaFocused} isError={!!error} />\n </div>\n </div>\n {error && (\n <p className={styles['sticky-note__error-text']} id={errorTextId}>\n {errorText}\n </p>\n )}\n </div>\n );\n};\n\nexport default StickyNote;\n","import StickyNote from './StickyNote';\nexport * from './StickyNote';\nexport default StickyNote;\n"],"mappings":"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"}
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
import "../../../constants2.js";
|
|
2
|
-
import "../../../grid.js";
|
|
3
|
-
import "../../../useBreakpoint.js";
|
|
4
|
-
import "../../../accessibility.js";
|
|
5
|
-
import "../../../useIntersectionObserver.js";
|
|
6
|
-
import "../../../useIsVisible.js";
|
|
7
|
-
import "../../../debounce.js";
|
|
8
|
-
import "../../../useLayoutEvent.js";
|
|
9
|
-
import "../../../useSize.js";
|
|
10
|
-
import "../../../usestopPropagation.js";
|
|
11
|
-
import "../../../HorizontalScroll.js";
|
|
12
|
-
import "../../../device.js";
|
|
13
|
-
import "../../../Table.js";
|
|
14
1
|
import { n as TableBody, t as TableBody_default } from "../../../TableBody.js";
|
|
15
2
|
export { TableBody, TableBody_default as default };
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
import "../../../constants2.js";
|
|
2
|
-
import "../../../grid.js";
|
|
3
|
-
import "../../../useBreakpoint.js";
|
|
4
|
-
import "../../../accessibility.js";
|
|
5
|
-
import "../../../useIntersectionObserver.js";
|
|
6
|
-
import "../../../useIsVisible.js";
|
|
7
|
-
import "../../../debounce.js";
|
|
8
|
-
import "../../../useLayoutEvent.js";
|
|
9
|
-
import "../../../useSize.js";
|
|
10
|
-
import "../../../usestopPropagation.js";
|
|
11
|
-
import "../../../HorizontalScroll.js";
|
|
12
|
-
import "../../../device.js";
|
|
13
|
-
import "../../../Table.js";
|
|
14
1
|
import { n as TableCell, r as TextAlign, t as TableCell_default } from "../../../TableCell.js";
|
|
15
2
|
export { TableCell, TextAlign, TableCell_default as default };
|
|
@@ -1,31 +1,2 @@
|
|
|
1
|
-
import "../../../environment.js";
|
|
2
|
-
import "../../../constants2.js";
|
|
3
|
-
import "../../../usePseudoClasses.js";
|
|
4
|
-
import "../../../grid.js";
|
|
5
|
-
import "../../../palette.js";
|
|
6
|
-
import "../../../spacers.js";
|
|
7
|
-
import "../../../theme.js";
|
|
8
|
-
import "../../../color.js";
|
|
9
|
-
import "../../../Icon.js";
|
|
10
|
-
import "../../../_rolldown_dynamic_import_helper.js";
|
|
11
|
-
import "../../../useIsServerSide.js";
|
|
12
|
-
import "../../../LazyIcon.js";
|
|
13
|
-
import "../../../component.js";
|
|
14
|
-
import "../../../useIcons.js";
|
|
15
|
-
import "../../../useBreakpoint.js";
|
|
16
|
-
import "../../../useIsMobileBreakpoint.js";
|
|
17
|
-
import "../../../ArrowRight.js";
|
|
18
|
-
import "../../../Button.js";
|
|
19
|
-
import "../../../accessibility.js";
|
|
20
|
-
import "../../../useIntersectionObserver.js";
|
|
21
|
-
import "../../../useIsVisible.js";
|
|
22
|
-
import "../../../debounce.js";
|
|
23
|
-
import "../../../useLayoutEvent.js";
|
|
24
|
-
import "../../../useSize.js";
|
|
25
|
-
import "../../../ChevronUp.js";
|
|
26
|
-
import "../../../usestopPropagation.js";
|
|
27
|
-
import "../../../HorizontalScroll.js";
|
|
28
|
-
import "../../../device.js";
|
|
29
|
-
import "../../../Table.js";
|
|
30
1
|
import { n as TableExpandedRow, t as TableExpandedRow_default } from "../../../TableExpandedRow.js";
|
|
31
2
|
export { TableExpandedRow, TableExpandedRow_default as default };
|
|
@@ -1,32 +1,2 @@
|
|
|
1
|
-
import "../../../environment.js";
|
|
2
|
-
import "../../../constants2.js";
|
|
3
|
-
import "../../../usePseudoClasses.js";
|
|
4
|
-
import "../../../grid.js";
|
|
5
|
-
import "../../../palette.js";
|
|
6
|
-
import "../../../spacers.js";
|
|
7
|
-
import "../../../theme.js";
|
|
8
|
-
import "../../../color.js";
|
|
9
|
-
import "../../../Icon.js";
|
|
10
|
-
import "../../../_rolldown_dynamic_import_helper.js";
|
|
11
|
-
import "../../../useIsServerSide.js";
|
|
12
|
-
import "../../../LazyIcon.js";
|
|
13
|
-
import "../../../component.js";
|
|
14
|
-
import "../../../useIcons.js";
|
|
15
|
-
import "../../../useBreakpoint.js";
|
|
16
|
-
import "../../../useIsMobileBreakpoint.js";
|
|
17
|
-
import "../../../ArrowRight.js";
|
|
18
|
-
import "../../../Button.js";
|
|
19
|
-
import "../../../accessibility.js";
|
|
20
|
-
import "../../../useIntersectionObserver.js";
|
|
21
|
-
import "../../../useIsVisible.js";
|
|
22
|
-
import "../../../debounce.js";
|
|
23
|
-
import "../../../useLayoutEvent.js";
|
|
24
|
-
import "../../../useSize.js";
|
|
25
|
-
import "../../../ChevronDown.js";
|
|
26
|
-
import "../../../ChevronUp.js";
|
|
27
|
-
import "../../../usestopPropagation.js";
|
|
28
|
-
import "../../../HorizontalScroll.js";
|
|
29
|
-
import "../../../device.js";
|
|
30
|
-
import "../../../Table.js";
|
|
31
1
|
import { n as TableExpanderCell, t as TableExpanderCell_default } from "../../../TableExpanderCell.js";
|
|
32
2
|
export { TableExpanderCell, TableExpanderCell_default as default };
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
import "../../../constants2.js";
|
|
2
|
-
import "../../../grid.js";
|
|
3
|
-
import "../../../useBreakpoint.js";
|
|
4
|
-
import "../../../accessibility.js";
|
|
5
|
-
import "../../../useIntersectionObserver.js";
|
|
6
|
-
import "../../../useIsVisible.js";
|
|
7
|
-
import "../../../debounce.js";
|
|
8
|
-
import "../../../useLayoutEvent.js";
|
|
9
|
-
import "../../../useSize.js";
|
|
10
|
-
import "../../../usestopPropagation.js";
|
|
11
|
-
import "../../../HorizontalScroll.js";
|
|
12
|
-
import "../../../device.js";
|
|
13
|
-
import "../../../Table.js";
|
|
14
1
|
import { n as HeaderCategory, r as TableHead, t as TableHead_default } from "../../../TableHead.js";
|
|
15
2
|
export { HeaderCategory, TableHead, TableHead_default as default };
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import "../../../constants2.js";
|
|
2
|
-
import "../../../grid.js";
|
|
3
|
-
import "../../../Icon.js";
|
|
4
|
-
import "../../../useBreakpoint.js";
|
|
5
|
-
import "../../../accessibility.js";
|
|
6
|
-
import "../../../useIntersectionObserver.js";
|
|
7
|
-
import "../../../useIsVisible.js";
|
|
8
|
-
import "../../../debounce.js";
|
|
9
|
-
import "../../../useLayoutEvent.js";
|
|
10
|
-
import "../../../useSize.js";
|
|
11
|
-
import "../../../usestopPropagation.js";
|
|
12
|
-
import "../../../HorizontalScroll.js";
|
|
13
|
-
import "../../../ArrowDown.js";
|
|
14
|
-
import "../../../ArrowUp.js";
|
|
15
|
-
import "../../../device.js";
|
|
16
|
-
import "../../../Table.js";
|
|
17
1
|
import { n as SortDirection, r as TableHeadCell, t as TableHeadCell_default } from "../../../TableHeadCell.js";
|
|
18
2
|
export { SortDirection, TableHeadCell, TableHeadCell_default as default };
|
|
@@ -1,32 +1,2 @@
|
|
|
1
|
-
import "../../../environment.js";
|
|
2
|
-
import "../../../constants2.js";
|
|
3
|
-
import "../../../usePseudoClasses.js";
|
|
4
|
-
import "../../../grid.js";
|
|
5
|
-
import "../../../palette.js";
|
|
6
|
-
import "../../../spacers.js";
|
|
7
|
-
import "../../../theme.js";
|
|
8
|
-
import "../../../color.js";
|
|
9
|
-
import "../../../Icon.js";
|
|
10
|
-
import "../../../_rolldown_dynamic_import_helper.js";
|
|
11
|
-
import "../../../useIsServerSide.js";
|
|
12
|
-
import "../../../LazyIcon.js";
|
|
13
|
-
import "../../../component.js";
|
|
14
|
-
import "../../../useIcons.js";
|
|
15
|
-
import "../../../useBreakpoint.js";
|
|
16
|
-
import "../../../useIsMobileBreakpoint.js";
|
|
17
|
-
import "../../../ArrowRight.js";
|
|
18
|
-
import "../../../Button.js";
|
|
19
|
-
import "../../../accessibility.js";
|
|
20
|
-
import "../../../useIntersectionObserver.js";
|
|
21
|
-
import "../../../useIsVisible.js";
|
|
22
|
-
import "../../../debounce.js";
|
|
23
|
-
import "../../../useLayoutEvent.js";
|
|
24
|
-
import "../../../useSize.js";
|
|
25
|
-
import "../../../ChevronDown.js";
|
|
26
|
-
import "../../../ChevronUp.js";
|
|
27
|
-
import "../../../usestopPropagation.js";
|
|
28
|
-
import "../../../HorizontalScroll.js";
|
|
29
|
-
import "../../../device.js";
|
|
30
|
-
import "../../../Table.js";
|
|
31
1
|
import { n as TableRow, t as TableRow_default } from "../../../TableRow.js";
|
|
32
2
|
export { TableRow, TableRow_default as default };
|
|
@@ -1,34 +1,3 @@
|
|
|
1
|
-
import "../../environment.js";
|
|
2
|
-
import "../../constants2.js";
|
|
3
|
-
import "../../usePseudoClasses.js";
|
|
4
|
-
import "../../grid.js";
|
|
5
|
-
import "../../palette.js";
|
|
6
|
-
import "../../spacers.js";
|
|
7
|
-
import "../../theme.js";
|
|
8
|
-
import "../../color.js";
|
|
9
|
-
import "../../Icon.js";
|
|
10
|
-
import "../../_rolldown_dynamic_import_helper.js";
|
|
11
|
-
import "../../useIsServerSide.js";
|
|
12
|
-
import "../../LazyIcon.js";
|
|
13
|
-
import "../../component.js";
|
|
14
|
-
import "../../useIcons.js";
|
|
15
|
-
import "../../useBreakpoint.js";
|
|
16
|
-
import "../../useIsMobileBreakpoint.js";
|
|
17
|
-
import "../../ArrowRight.js";
|
|
18
|
-
import "../../Button.js";
|
|
19
|
-
import "../../accessibility.js";
|
|
20
|
-
import "../../useIntersectionObserver.js";
|
|
21
|
-
import "../../useIsVisible.js";
|
|
22
|
-
import "../../debounce.js";
|
|
23
|
-
import "../../useLayoutEvent.js";
|
|
24
|
-
import "../../useSize.js";
|
|
25
|
-
import "../../ChevronDown.js";
|
|
26
|
-
import "../../ChevronUp.js";
|
|
27
|
-
import "../../usestopPropagation.js";
|
|
28
|
-
import "../../HorizontalScroll.js";
|
|
29
|
-
import "../../ArrowDown.js";
|
|
30
|
-
import "../../ArrowUp.js";
|
|
31
|
-
import "../../device.js";
|
|
32
1
|
import { a as simpleConfig, i as defaultConfig, n as ResponsiveTableVariant, r as Table, t as ModeType } from "../../Table.js";
|
|
33
2
|
import { n as TableBody } from "../../TableBody.js";
|
|
34
3
|
import { n as TableCell, r as TextAlign } from "../../TableCell.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Table/index.ts"],"sourcesContent":["import { Table } from './Table';\n\nexport { TableBody } from './TableBody';\nexport { TableCell, TextAlign } from './TableCell';\nexport { TableExpandedRow } from './TableExpandedRow';\nexport { TableExpanderCell } from './TableExpanderCell';\nexport { TableHead, HeaderCategory } from './TableHead';\nexport { TableHeadCell, SortDirection } from './TableHeadCell';\nexport { TableRow } from './TableRow';\n\nexport * from './Table';\n\nexport default Table;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Table/index.ts"],"sourcesContent":["import { Table } from './Table';\n\nexport { TableBody } from './TableBody';\nexport { TableCell, TextAlign } from './TableCell';\nexport { TableExpandedRow } from './TableExpandedRow';\nexport { TableExpanderCell } from './TableExpanderCell';\nexport { TableHead, HeaderCategory } from './TableHead';\nexport { TableHeadCell, SortDirection } from './TableHeadCell';\nexport { TableRow } from './TableRow';\n\nexport * from './Table';\n\nexport default Table;\n"],"mappings":";;;;;;;;AAYA,IAAA,gBAAe"}
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
import "../../../constants2.js";
|
|
2
|
-
import "../../../usePseudoClasses.js";
|
|
3
|
-
import "../../../palette.js";
|
|
4
|
-
import "../../../Icon.js";
|
|
5
|
-
import "../../../_rolldown_dynamic_import_helper.js";
|
|
6
|
-
import "../../../useIsServerSide.js";
|
|
7
|
-
import "../../../LazyIcon.js";
|
|
8
|
-
import "../../../component.js";
|
|
9
|
-
import "../../../useIntersectionObserver.js";
|
|
10
|
-
import "../../../useIsVisible.js";
|
|
11
|
-
import "../../../useKeyboardEvent.js";
|
|
12
|
-
import "../../../ChevronLeft.js";
|
|
13
|
-
import "../../../ChevronRight.js";
|
|
14
1
|
import { t as TabList_default } from "../../../TabList.js";
|
|
15
|
-
import "../../../useRovingFocus.js";
|
|
16
2
|
export { TabList_default as default };
|
|
@@ -1,22 +1,9 @@
|
|
|
1
1
|
import { s as LanguageLocales } from "../../constants2.js";
|
|
2
|
-
import "../../usePseudoClasses.js";
|
|
3
|
-
import "../../palette.js";
|
|
4
|
-
import "../../Icon.js";
|
|
5
2
|
import { r as useLanguage } from "../../language.js";
|
|
6
|
-
import "../../_rolldown_dynamic_import_helper.js";
|
|
7
|
-
import "../../useIsServerSide.js";
|
|
8
|
-
import "../../LazyIcon.js";
|
|
9
|
-
import "../../component.js";
|
|
10
|
-
import "../../useIntersectionObserver.js";
|
|
11
|
-
import "../../useIsVisible.js";
|
|
12
|
-
import "../../useKeyboardEvent.js";
|
|
13
|
-
import "../../ChevronLeft.js";
|
|
14
|
-
import "../../ChevronRight.js";
|
|
15
3
|
import { n as Tab_default, t as TabList_default } from "../../TabList.js";
|
|
16
|
-
import "../../useRovingFocus.js";
|
|
17
4
|
import { t as TabPanel_default } from "../../TabPanel.js";
|
|
18
5
|
import React, { useRef, useState } from "react";
|
|
19
|
-
import
|
|
6
|
+
import classNames from "classnames";
|
|
20
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
8
|
import designsystemlayout from "../../scss/layout.module.scss";
|
|
22
9
|
import styles from "./styles.module.scss";
|
|
@@ -56,11 +43,11 @@ const TabsRoot = ({ activeTab, children, className, color = "white", containerBr
|
|
|
56
43
|
};
|
|
57
44
|
const activeTabIndex = isControlled ? activeTab : uncontrolledValue;
|
|
58
45
|
return /* @__PURE__ */ jsxs("div", {
|
|
59
|
-
className:
|
|
46
|
+
className: classNames(className, containerBreakout && designsystemlayout["container-breakout"]),
|
|
60
47
|
"data-testid": testId,
|
|
61
48
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
62
49
|
ref: tabListRef,
|
|
63
|
-
className:
|
|
50
|
+
className: classNames(styles["tab-list-wrapper"], { [styles["tab-list-wrapper--sticky"]]: sticky }),
|
|
64
51
|
style: { zIndex },
|
|
65
52
|
children: [/* @__PURE__ */ jsx(TabList_default, {
|
|
66
53
|
onTabListClick: (index) => onValueChange(index),
|
|
@@ -70,7 +57,7 @@ const TabsRoot = ({ activeTab, children, className, color = "white", containerBr
|
|
|
70
57
|
ariaLabelLeftButton: mergedResources.ariaLabelLeftButton,
|
|
71
58
|
ariaLabelRightButton: mergedResources.ariaLabelRightButton,
|
|
72
59
|
children
|
|
73
|
-
}), /* @__PURE__ */ jsx("div", { className:
|
|
60
|
+
}), /* @__PURE__ */ jsx("div", { className: classNames(styles["panel-wrapper"], styles[`panel-wrapper--${color}`]) })]
|
|
74
61
|
}), /* @__PURE__ */ jsx("div", {
|
|
75
62
|
ref: tabsRef,
|
|
76
63
|
style: { marginTop: "-50px" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["TabsRoot: React.FC<TabsProps>","mergedResources: HNDesignsystemTabs","onColorUsed: TabsOnColor"],"sources":["../../../src/resources/HN.Designsystem.Tabs.en-GB.json","../../../src/resources/HN.Designsystem.Tabs.nb-NO.json","../../../src/components/Tabs/resourceHelper.ts","../../../src/components/Tabs/Tabs.tsx","../../../src/components/Tabs/index.ts"],"sourcesContent":["{\n \"ariaLabelRightButton\": \"Scroll right\",\n \"ariaLabelLeftButton\": \"Scroll left\"\n}\n","{\n \"ariaLabelRightButton\": \"Scroll til høyre\",\n \"ariaLabelLeftButton\": \"Scroll til venstre\"\n}\n","import { LanguageLocales } from '../../constants';\nimport enGB from '../../resources/HN.Designsystem.Tabs.en-GB.json';\nimport nbNO from '../../resources/HN.Designsystem.Tabs.nb-NO.json';\nimport { HNDesignsystemTabs } from '../../resources/Resources';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemTabs => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import React, { useState, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { getResources } from './resourceHelper';\nimport Tab from './Tab';\nimport TabList from './TabList';\nimport TabPanel from './TabPanel';\nimport { LanguageLocales } from '../../constants';\nimport { HNDesignsystemTabs } from '../../resources/Resources';\nimport designsystemlayout from '../../scss/layout.module.scss';\nimport { PaletteNames } from '../../theme/palette';\nimport { useLanguage } from '../../utils/language';\n\nimport styles from './styles.module.scss';\n\nexport type { TabProps } from './Tab';\nexport type TabsColors = Extract<PaletteNames, 'blueberry' | 'neutral' | 'white'>;\nexport type TabsOnColor = 'onblueberry' | 'onneutral' | 'onwhite';\n\nexport interface TabsProps {\n children?: React.ReactNode;\n /** Controlled state for Tabs component */\n activeTab?: number;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the color of the tabs. Default: white */\n color?: TabsColors;\n /** Sets wether the component should use the container-breakout class. Default: true */\n containerBreakout?: boolean;\n /** Sets the background color of the tabs. Can only be used when the color is set to white. Default: onwhite */\n onColor?: TabsOnColor;\n /** Whether the tab list should be sticky */\n sticky?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** @deprecated Sets aria label on the \"scroll to the right\" button in TabList */\n ariaLabelRightButton?: string;\n /** @deprecated Sets aria label on the \"scroll to the left\" button in TabList */\n ariaLabelLeftButton?: string;\n /** Resources for component */\n resources?: Partial<HNDesignsystemTabs>;\n /** Overrides the default z-index of the tabs header */\n zIndex?: number;\n}\n\nexport const TabsRoot: React.FC<TabsProps> = ({\n activeTab,\n children,\n className,\n color = 'white',\n containerBreakout = true,\n onColor = 'onwhite',\n sticky = true,\n testId,\n ariaLabelRightButton,\n ariaLabelLeftButton,\n resources,\n zIndex,\n}) => {\n const isControlled = activeTab !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(0);\n const tabsRef = useRef<HTMLDivElement>(null);\n const tabPanelRef = useRef<HTMLDivElement>(null);\n const tabListRef = useRef<HTMLDivElement>(null);\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemTabs = {\n ...defaultResources,\n ...resources,\n ariaLabelRightButton: ariaLabelRightButton || resources?.ariaLabelRightButton || defaultResources.ariaLabelRightButton,\n ariaLabelLeftButton: ariaLabelLeftButton || resources?.ariaLabelLeftButton || defaultResources.ariaLabelLeftButton,\n };\n\n let onColorUsed: TabsOnColor = 'onwhite';\n if (color === 'white') {\n onColorUsed = onColor;\n }\n\n const onValueChange = (newValue: number): void => {\n if (!isControlled) {\n setUncontrolledValue(newValue);\n }\n };\n\n const activeTabIndex = isControlled ? activeTab : uncontrolledValue;\n\n return (\n <div className={classNames(className, containerBreakout && designsystemlayout['container-breakout'])} data-testid={testId}>\n <div\n ref={tabListRef}\n className={classNames(styles['tab-list-wrapper'], {\n [styles['tab-list-wrapper--sticky']]: sticky,\n })}\n style={{\n zIndex: zIndex,\n }}\n >\n <TabList\n onTabListClick={(index: number) => onValueChange(index)}\n selectedTab={activeTabIndex}\n color={color}\n onColor={onColorUsed}\n ariaLabelLeftButton={mergedResources.ariaLabelLeftButton}\n ariaLabelRightButton={mergedResources.ariaLabelRightButton}\n >\n {children}\n </TabList>\n <div className={classNames(styles['panel-wrapper'], styles[`panel-wrapper--${color}`])}></div>\n </div>\n <div ref={tabsRef} style={{ marginTop: '-50px' }}>\n <TabPanel ref={tabPanelRef} color={color} isFirst={activeTabIndex == 0}>\n {React.Children.toArray(children)[activeTabIndex]}\n </TabPanel>\n </div>\n </div>\n );\n};\n\ntype TabsComponent = typeof TabsRoot & {\n Tab: typeof Tab;\n};\nconst Tabs = TabsRoot as TabsComponent;\nTabsRoot.displayName = 'Tabs';\nTabs.displayName = 'Tabs';\nTabs.Tab = Tab;\nTabs.Tab.displayName = 'Tabs.Tab';\n\nexport default Tabs;\n","import Tabs from './Tabs';\nexport * from './Tabs';\nexport default Tabs;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["TabsRoot: React.FC<TabsProps>","mergedResources: HNDesignsystemTabs","onColorUsed: TabsOnColor"],"sources":["../../../src/resources/HN.Designsystem.Tabs.en-GB.json","../../../src/resources/HN.Designsystem.Tabs.nb-NO.json","../../../src/components/Tabs/resourceHelper.ts","../../../src/components/Tabs/Tabs.tsx","../../../src/components/Tabs/index.ts"],"sourcesContent":["{\n \"ariaLabelRightButton\": \"Scroll right\",\n \"ariaLabelLeftButton\": \"Scroll left\"\n}\n","{\n \"ariaLabelRightButton\": \"Scroll til høyre\",\n \"ariaLabelLeftButton\": \"Scroll til venstre\"\n}\n","import { LanguageLocales } from '../../constants';\nimport enGB from '../../resources/HN.Designsystem.Tabs.en-GB.json';\nimport nbNO from '../../resources/HN.Designsystem.Tabs.nb-NO.json';\nimport { HNDesignsystemTabs } from '../../resources/Resources';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemTabs => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import React, { useState, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { getResources } from './resourceHelper';\nimport Tab from './Tab';\nimport TabList from './TabList';\nimport TabPanel from './TabPanel';\nimport { LanguageLocales } from '../../constants';\nimport { HNDesignsystemTabs } from '../../resources/Resources';\nimport designsystemlayout from '../../scss/layout.module.scss';\nimport { PaletteNames } from '../../theme/palette';\nimport { useLanguage } from '../../utils/language';\n\nimport styles from './styles.module.scss';\n\nexport type { TabProps } from './Tab';\nexport type TabsColors = Extract<PaletteNames, 'blueberry' | 'neutral' | 'white'>;\nexport type TabsOnColor = 'onblueberry' | 'onneutral' | 'onwhite';\n\nexport interface TabsProps {\n children?: React.ReactNode;\n /** Controlled state for Tabs component */\n activeTab?: number;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the color of the tabs. Default: white */\n color?: TabsColors;\n /** Sets wether the component should use the container-breakout class. Default: true */\n containerBreakout?: boolean;\n /** Sets the background color of the tabs. Can only be used when the color is set to white. Default: onwhite */\n onColor?: TabsOnColor;\n /** Whether the tab list should be sticky */\n sticky?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** @deprecated Sets aria label on the \"scroll to the right\" button in TabList */\n ariaLabelRightButton?: string;\n /** @deprecated Sets aria label on the \"scroll to the left\" button in TabList */\n ariaLabelLeftButton?: string;\n /** Resources for component */\n resources?: Partial<HNDesignsystemTabs>;\n /** Overrides the default z-index of the tabs header */\n zIndex?: number;\n}\n\nexport const TabsRoot: React.FC<TabsProps> = ({\n activeTab,\n children,\n className,\n color = 'white',\n containerBreakout = true,\n onColor = 'onwhite',\n sticky = true,\n testId,\n ariaLabelRightButton,\n ariaLabelLeftButton,\n resources,\n zIndex,\n}) => {\n const isControlled = activeTab !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(0);\n const tabsRef = useRef<HTMLDivElement>(null);\n const tabPanelRef = useRef<HTMLDivElement>(null);\n const tabListRef = useRef<HTMLDivElement>(null);\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemTabs = {\n ...defaultResources,\n ...resources,\n ariaLabelRightButton: ariaLabelRightButton || resources?.ariaLabelRightButton || defaultResources.ariaLabelRightButton,\n ariaLabelLeftButton: ariaLabelLeftButton || resources?.ariaLabelLeftButton || defaultResources.ariaLabelLeftButton,\n };\n\n let onColorUsed: TabsOnColor = 'onwhite';\n if (color === 'white') {\n onColorUsed = onColor;\n }\n\n const onValueChange = (newValue: number): void => {\n if (!isControlled) {\n setUncontrolledValue(newValue);\n }\n };\n\n const activeTabIndex = isControlled ? activeTab : uncontrolledValue;\n\n return (\n <div className={classNames(className, containerBreakout && designsystemlayout['container-breakout'])} data-testid={testId}>\n <div\n ref={tabListRef}\n className={classNames(styles['tab-list-wrapper'], {\n [styles['tab-list-wrapper--sticky']]: sticky,\n })}\n style={{\n zIndex: zIndex,\n }}\n >\n <TabList\n onTabListClick={(index: number) => onValueChange(index)}\n selectedTab={activeTabIndex}\n color={color}\n onColor={onColorUsed}\n ariaLabelLeftButton={mergedResources.ariaLabelLeftButton}\n ariaLabelRightButton={mergedResources.ariaLabelRightButton}\n >\n {children}\n </TabList>\n <div className={classNames(styles['panel-wrapper'], styles[`panel-wrapper--${color}`])}></div>\n </div>\n <div ref={tabsRef} style={{ marginTop: '-50px' }}>\n <TabPanel ref={tabPanelRef} color={color} isFirst={activeTabIndex == 0}>\n {React.Children.toArray(children)[activeTabIndex]}\n </TabPanel>\n </div>\n </div>\n );\n};\n\ntype TabsComponent = typeof TabsRoot & {\n Tab: typeof Tab;\n};\nconst Tabs = TabsRoot as TabsComponent;\nTabsRoot.displayName = 'Tabs';\nTabs.displayName = 'Tabs';\nTabs.Tab = Tab;\nTabs.Tab.displayName = 'Tabs.Tab';\n\nexport default Tabs;\n","import Tabs from './Tabs';\nexport * from './Tabs';\nexport default Tabs;\n"],"mappings":";;;;;;;;;;;;;;;;;AEKA,MAAa,gBAAgB,aAAkD;AAC7E,SAAQ,UAAR;EACE,KAAK,gBAAgB,QACnB,QAAO;EACT,KAAK,gBAAgB;EACrB,QACE,QAAO;;;ACmCb,MAAaA,YAAiC,EAC5C,WACA,UACA,WACA,QAAQ,SACR,oBAAoB,MACpB,UAAU,WACV,SAAS,MACT,QACA,sBAAA,wBACA,qBAAA,uBACA,WACA,aACI;CACJ,MAAM,eAAe,cAAc,KAAA;CACnC,MAAM,CAAC,mBAAmB,wBAAwB,SAAS,EAAE;CAC7D,MAAM,UAAU,OAAuB,KAAK;CAC5C,MAAM,cAAc,OAAuB,KAAK;CAChD,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAC5E,MAAM,mBAAmB,aAAa,SAAS;CAE/C,MAAMC,kBAAsC;EAC1C,GAAG;EACH,GAAG;EACH,sBAAsB,0BAAwB,WAAW,wBAAwB,iBAAiB;EAClG,qBAAqB,yBAAuB,WAAW,uBAAuB,iBAAiB;EAChG;CAED,IAAIC,cAA2B;AAC/B,KAAI,UAAU,QACZ,eAAc;CAGhB,MAAM,iBAAiB,aAA2B;AAChD,MAAI,CAAC,aACH,sBAAqB,SAAS;;CAIlC,MAAM,iBAAiB,eAAe,YAAY;AAElD,QACE,qBAAC,OAAA;EAAI,WAAW,WAAW,WAAW,qBAAqB,mBAAmB,sBAAsB;EAAE,eAAa;aACjH,qBAAC,OAAA;GACC,KAAK;GACL,WAAW,WAAW,OAAO,qBAAqB,GAC/C,OAAO,8BAA8B,QACvC,CAAC;GACF,OAAO,EACG,QACT;cAED,oBAAC,iBAAA;IACC,iBAAiB,UAAkB,cAAc,MAAM;IACvD,aAAa;IACN;IACP,SAAS;IACT,qBAAqB,gBAAgB;IACrC,sBAAsB,gBAAgB;IAErC;KACO,EACV,oBAAC,OAAA,EAAI,WAAW,WAAW,OAAO,kBAAkB,OAAO,kBAAkB,SAAS,EAAA,CAAQ,CAAA;IAC1F,EACN,oBAAC,OAAA;GAAI,KAAK;GAAS,OAAO,EAAE,WAAW,SAAS;aAC9C,oBAAC,kBAAA;IAAS,KAAK;IAAoB;IAAO,SAAS,kBAAkB;cAClE,MAAM,SAAS,QAAQ,SAAS,CAAC;KACzB;IACP,CAAA;GACF;;AAOV,IAAM,OAAO;AACb,SAAS,cAAc;AACvB,KAAK,cAAc;AACnB,KAAK,MAAM;AACX,KAAK,IAAI,cAAc;AC7HvB,IAAA,eD+He"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { a as IconSize, n as AnalyticsId } from "../../constants2.js";
|
|
2
2
|
import { t as palette } from "../../palette.js";
|
|
3
3
|
import { t as Icon_default } from "../../Icon.js";
|
|
4
|
-
import "../../_rolldown_dynamic_import_helper.js";
|
|
5
|
-
import "../../useIsServerSide.js";
|
|
6
4
|
import { t as LazyIcon_default } from "../../LazyIcon.js";
|
|
7
5
|
import React from "react";
|
|
8
|
-
import
|
|
6
|
+
import classNames from "classnames";
|
|
9
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
8
|
import styles from "./styles.module.scss";
|
|
11
9
|
let TagSize = /* @__PURE__ */ function(TagSize$1) {
|
|
@@ -22,7 +20,7 @@ let TagVariant = /* @__PURE__ */ function(TagVariant$1) {
|
|
|
22
20
|
var Tag = (props) => {
|
|
23
21
|
const { children, size = TagSize.medium, color = "blueberry", svgIcon, variant = "normal", testId } = props;
|
|
24
22
|
return /* @__PURE__ */ jsxs("span", {
|
|
25
|
-
className:
|
|
23
|
+
className: classNames(styles.tag, styles[`tag--${size}`], styles[`tag--${color}`], {
|
|
26
24
|
[styles["tag--has-icon"]]: svgIcon,
|
|
27
25
|
[styles["tag--emphasised"]]: variant == TagVariant.emphasised
|
|
28
26
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Tag: React.FC<TagProps>"],"sources":["../../../src/components/Tag/Tag.tsx","../../../src/components/Tag/index.ts"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { palette, PaletteNames } from '../../theme/palette';\nimport Icon, { IconSize, SvgIcon } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\nimport LazyIcon from '../LazyIcon';\n\nimport styles from './styles.module.scss';\n\nexport enum TagSize {\n medium = 'medium',\n large = 'large',\n}\n\nexport enum TagVariant {\n normal = 'normal',\n oncolor = 'oncolor',\n emphasised = 'emphasised',\n}\n\nexport type TagColors = Extract<PaletteNames, 'blueberry' | 'neutral' | 'cherry' | 'banana' | 'kiwi' | 'plum'>;\n\nexport interface TagProps {\n /** Sets the text of the tag */\n children: string;\n /** Sets the size of the tag. Default: medium */\n size?: keyof typeof TagSize;\n /** Sets the background of the tag. Default: blueberry */\n color?: TagColors;\n /** Adds an icon to the tag. */\n svgIcon?: SvgIcon | IconName;\n /* Changes the appearance of the tag. Default: normal */\n variant?: keyof typeof TagVariant;\n /** Sets the data-testid attribute on the expander button. */\n testId?: string;\n}\n\nconst Tag: React.FC<TagProps> = props => {\n const { children, size = TagSize.medium, color = 'blueberry', svgIcon, variant = 'normal', testId } = props;\n\n const tagClasses = cn(styles.tag, styles[`tag--${size}`], styles[`tag--${color}`], {\n [styles['tag--has-icon']]: svgIcon,\n [styles['tag--emphasised']]: variant == TagVariant.emphasised,\n });\n\n return (\n <span className={tagClasses} data-testid={testId} data-analyticsid={AnalyticsId.Tag}>\n {svgIcon &&\n (typeof svgIcon === 'string' ? (\n <LazyIcon iconName={svgIcon} size={IconSize.XXSmall} color={palette[`${color}800`]} className={styles.tag__icon} />\n ) : (\n <Icon svgIcon={svgIcon} size={IconSize.XXSmall} color={palette[`${color}800`]} className={styles.tag__icon} />\n ))}\n {children}\n </span>\n );\n};\n\nexport default Tag;\n","import Tag from './Tag';\nexport * from './Tag';\nexport default Tag;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["Tag: React.FC<TagProps>"],"sources":["../../../src/components/Tag/Tag.tsx","../../../src/components/Tag/index.ts"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { palette, PaletteNames } from '../../theme/palette';\nimport Icon, { IconSize, SvgIcon } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\nimport LazyIcon from '../LazyIcon';\n\nimport styles from './styles.module.scss';\n\nexport enum TagSize {\n medium = 'medium',\n large = 'large',\n}\n\nexport enum TagVariant {\n normal = 'normal',\n oncolor = 'oncolor',\n emphasised = 'emphasised',\n}\n\nexport type TagColors = Extract<PaletteNames, 'blueberry' | 'neutral' | 'cherry' | 'banana' | 'kiwi' | 'plum'>;\n\nexport interface TagProps {\n /** Sets the text of the tag */\n children: string;\n /** Sets the size of the tag. Default: medium */\n size?: keyof typeof TagSize;\n /** Sets the background of the tag. Default: blueberry */\n color?: TagColors;\n /** Adds an icon to the tag. */\n svgIcon?: SvgIcon | IconName;\n /* Changes the appearance of the tag. Default: normal */\n variant?: keyof typeof TagVariant;\n /** Sets the data-testid attribute on the expander button. */\n testId?: string;\n}\n\nconst Tag: React.FC<TagProps> = props => {\n const { children, size = TagSize.medium, color = 'blueberry', svgIcon, variant = 'normal', testId } = props;\n\n const tagClasses = cn(styles.tag, styles[`tag--${size}`], styles[`tag--${color}`], {\n [styles['tag--has-icon']]: svgIcon,\n [styles['tag--emphasised']]: variant == TagVariant.emphasised,\n });\n\n return (\n <span className={tagClasses} data-testid={testId} data-analyticsid={AnalyticsId.Tag}>\n {svgIcon &&\n (typeof svgIcon === 'string' ? (\n <LazyIcon iconName={svgIcon} size={IconSize.XXSmall} color={palette[`${color}800`]} className={styles.tag__icon} />\n ) : (\n <Icon svgIcon={svgIcon} size={IconSize.XXSmall} color={palette[`${color}800`]} className={styles.tag__icon} />\n ))}\n {children}\n </span>\n );\n};\n\nexport default Tag;\n","import Tag from './Tag';\nexport * from './Tag';\nexport default Tag;\n"],"mappings":";;;;;;;;AAYA,IAAY,UAAA,yBAAA,WAAL;AACL,WAAA,YAAA;AACA,WAAA,WAAA;;;AAGF,IAAY,aAAA,yBAAA,cAAL;AACL,cAAA,YAAA;AACA,cAAA,aAAA;AACA,cAAA,gBAAA;;;AAoBF,IAAMA,OAA0B,UAAS;CACvC,MAAM,EAAE,UAAU,OAAO,QAAQ,QAAQ,QAAQ,aAAa,SAAS,UAAU,UAAU,WAAW;AAOtG,QACE,qBAAC,QAAA;EAAK,WANW,WAAG,OAAO,KAAK,OAAO,QAAQ,SAAS,OAAO,QAAQ,UAAU;IAChF,OAAO,mBAAmB;IAC1B,OAAO,qBAAqB,WAAW,WAAW;GACpD,CAAC;EAG6B,eAAa;EAAQ,oBAAkB,YAAY;aAC7E,YACE,OAAO,YAAY,WAClB,oBAAC,kBAAA;GAAS,UAAU;GAAS,MAAM,SAAS;GAAS,OAAO,QAAQ,GAAG,MAAM;GAAO,WAAW,OAAO;IAAa,GAEnH,oBAAC,cAAA;GAAc;GAAS,MAAM,SAAS;GAAS,OAAO,QAAQ,GAAG,MAAM;GAAO,WAAW,OAAO;IAAa,GAEjH,SAAA;GACI;;ACvDX,IAAA,cD2De"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FormOnColor } from '../../constants';
|
|
3
2
|
import { HNDesignsystemTextArea } from '../../resources/Resources';
|
|
3
|
+
import { FormOnColor } from '../../constants';
|
|
4
4
|
import { ErrorWrapperClassNameProps } from '../ErrorWrapper';
|
|
5
5
|
export interface TextareaProps extends ErrorWrapperClassNameProps, Pick<React.InputHTMLAttributes<HTMLTextAreaElement>, 'aria-describedby' | 'autoFocus' | 'disabled' | 'name' | 'autoComplete' | 'placeholder' | 'readOnly' | 'required' | 'defaultValue' | 'onChange' | 'value'> {
|
|
6
6
|
/** max character limit in textarea */
|
|
@@ -1,45 +1,2 @@
|
|
|
1
|
-
import "../../uuid.js";
|
|
2
|
-
import "../../environment.js";
|
|
3
|
-
import "../../constants2.js";
|
|
4
|
-
import "../../usePseudoClasses.js";
|
|
5
|
-
import "../../grid.js";
|
|
6
|
-
import "../../palette.js";
|
|
7
|
-
import "../../spacers.js";
|
|
8
|
-
import "../../theme.js";
|
|
9
|
-
import "../../color.js";
|
|
10
|
-
import "../../spacing.js";
|
|
11
|
-
import "../../currys.js";
|
|
12
|
-
import "../../Icon.js";
|
|
13
|
-
import "../../language.js";
|
|
14
|
-
import "../../_rolldown_dynamic_import_helper.js";
|
|
15
|
-
import "../../useIsServerSide.js";
|
|
16
|
-
import "../../LazyIcon.js";
|
|
17
|
-
import "../../component.js";
|
|
18
|
-
import "../../useBreakpoint.js";
|
|
19
|
-
import "../../useIdWithFallback.js";
|
|
20
|
-
import "../../accessibility.js";
|
|
21
|
-
import "../../ErrorWrapper.js";
|
|
22
|
-
import "../../Spacer.js";
|
|
23
|
-
import "../../Label.js";
|
|
24
|
-
import "../../FormFieldTag.js";
|
|
25
|
-
import "../../useElementList.js";
|
|
26
|
-
import "../../useFocusableElements.js";
|
|
27
|
-
import "../../useFocusToggle.js";
|
|
28
|
-
import "../../focus.js";
|
|
29
|
-
import "../../useFocusTrap.js";
|
|
30
|
-
import "../../useIntersectionObserver.js";
|
|
31
|
-
import "../../useIsVisible.js";
|
|
32
|
-
import "../../debounce.js";
|
|
33
|
-
import "../../useLayoutEvent.js";
|
|
34
|
-
import "../../usePrevious.js";
|
|
35
|
-
import "../../useSize.js";
|
|
36
|
-
import "../../useResizeObserver.js";
|
|
37
|
-
import "../../useToggle.js";
|
|
38
|
-
import "../../useKeyboardEvent.js";
|
|
39
|
-
import "../../useOutsideEvent.js";
|
|
40
|
-
import "../../mobile.js";
|
|
41
|
-
import "../../src.js";
|
|
42
|
-
import "../../StatusDot.js";
|
|
43
|
-
import "../../MaxCharacters.js";
|
|
44
1
|
import { t as Textarea_default } from "../../Textarea.js";
|
|
45
2
|
export { Textarea_default as default };
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { a as IconSize, n as AnalyticsId } from "../../constants2.js";
|
|
2
2
|
import { t as usePseudoClasses } from "../../usePseudoClasses.js";
|
|
3
|
-
import "../../grid.js";
|
|
4
3
|
import { n as mergeRefs } from "../../refs.js";
|
|
5
|
-
import "../../Icon.js";
|
|
6
4
|
import { n as useBreakpoint, t as Breakpoint } from "../../useBreakpoint.js";
|
|
7
5
|
import React from "react";
|
|
8
|
-
import
|
|
6
|
+
import classNames from "classnames";
|
|
9
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
8
|
import tileStyles from "./styles.module.scss";
|
|
11
9
|
var Title = React.forwardRef((props, ref) => {
|
|
12
10
|
const { compact, children, className, htmlMarkup = "span", highlighted } = props;
|
|
13
11
|
return /* @__PURE__ */ jsx(htmlMarkup, {
|
|
14
|
-
className:
|
|
12
|
+
className: classNames(tileStyles["tile__title"], {
|
|
15
13
|
[tileStyles["tile__title--highlighted"]]: highlighted,
|
|
16
14
|
[tileStyles["tile__title--compact"]]: compact
|
|
17
15
|
}, className),
|
|
@@ -25,12 +23,12 @@ const Tile = React.forwardRef((props, ref) => {
|
|
|
25
23
|
const { refObject, isHovered } = usePseudoClasses();
|
|
26
24
|
const mobile = useBreakpoint() < Breakpoint.md;
|
|
27
25
|
const compact = variant === "compact";
|
|
28
|
-
const tileClasses =
|
|
26
|
+
const tileClasses = classNames(tileStyles.tile, {
|
|
29
27
|
[tileStyles["tile--fixed"]]: fixed,
|
|
30
28
|
[tileStyles["tile--compact"]]: compact,
|
|
31
29
|
[tileStyles["tile--highlighted"]]: highlighted
|
|
32
30
|
}, className);
|
|
33
|
-
const tileTitleWrapperClasses =
|
|
31
|
+
const tileTitleWrapperClasses = classNames(tileStyles["title-wrapper"], { [tileStyles["title-wrapper--compact"]]: compact });
|
|
34
32
|
return /* @__PURE__ */ jsxs("a", {
|
|
35
33
|
ref: mergeRefs([ref, refObject]),
|
|
36
34
|
href,
|