@bbl-digital/snorre 3.1.56 → 3.1.58
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +670 -1124
- package/esm/app-shell/index.js +1 -4
- package/esm/app-shell/theme.js +2 -1
- package/esm/core/Alert/Alert.stories.js +43 -0
- package/esm/core/Alert/index.js +0 -2
- package/esm/core/Alert/styles.js +0 -1
- package/esm/core/AppLoader/AppLoader.stories.js +10 -0
- package/esm/core/AppLoader/index.js +0 -2
- package/esm/core/Autocomplete/Autocomplete.stories.js +327 -0
- package/esm/core/Autocomplete/hooks/useAutocomplete.js +14 -49
- package/esm/core/Autocomplete/hooks/useHandleDimentions.js +2 -3
- package/esm/core/Autocomplete/index.js +2 -3
- package/esm/core/Autocomplete/styles.js +0 -2
- package/esm/core/Banner/Banner.stories.js +68 -0
- package/esm/core/Banner/index.js +0 -2
- package/esm/core/Banner/styles.js +4 -6
- package/esm/core/BarAndLineComposedChart/BarAndLineComposedChart.stories.js +94 -0
- package/esm/core/BarAndLineComposedChart/index.js +0 -2
- package/esm/core/BarAndLineComposedChart/styles.js +1 -1
- package/esm/core/BarChartWithCustomizedEvent/BarChartWithCustomizedEvent.stories.js +80 -0
- package/esm/core/BarChartWithCustomizedEvent/index.js +0 -3
- package/esm/core/BarChartWithCustomizedEvent/styles.js +1 -1
- package/esm/core/Box/Box.stories.js +89 -0
- package/esm/core/Box/index.js +0 -4
- package/esm/core/Box/styles.js +2 -8
- package/esm/core/BoxedTable/BoxedTable.stories.js +351 -0
- package/esm/core/BoxedTable/DraggableRow/index.js +0 -2
- package/esm/core/BoxedTable/DraggableRow/styles.js +5 -7
- package/esm/core/BoxedTable/HeaderCell/index.js +0 -4
- package/esm/core/BoxedTable/HeaderCell/styles.js +1 -1
- package/esm/core/BoxedTable/RowCell/index.js +0 -2
- package/esm/core/BoxedTable/RowCell/styles.js +1 -3
- package/esm/core/BoxedTable/TableHeader/index.js +0 -2
- package/esm/core/BoxedTable/TableHeader/styles.js +1 -3
- package/esm/core/BoxedTable/TableRow/index.js +0 -7
- package/esm/core/BoxedTable/TableRow/styles.js +6 -8
- package/esm/core/BoxedTable/index.js +2 -5
- package/esm/core/BoxedTable/styles.js +2 -9
- package/esm/core/Button/Button.stories.js +121 -0
- package/esm/core/Button/index.js +0 -4
- package/esm/core/Button/styles.js +1 -5
- package/esm/core/Calendar/Calendar.stories.js +39 -0
- package/esm/core/Calendar/CalendarEvent/index.js +0 -8
- package/esm/core/Calendar/CalendarEvent/styles.js +5 -7
- package/esm/core/Calendar/CalendarSmallEvent/index.js +0 -8
- package/esm/core/Calendar/CalendarSmallEvent/styles.js +5 -7
- package/esm/core/Calendar/index.js +0 -5
- package/esm/core/Calendar/styles.js +5 -7
- package/esm/core/Calendar/util.js +0 -2
- package/esm/core/Card/Card.stories.js +69 -0
- package/esm/core/Card/index.js +0 -3
- package/esm/core/Card/styles.js +0 -1
- package/esm/core/Checkbox/Checkbox.stories.js +43 -0
- package/esm/core/Checkbox/index.js +0 -4
- package/esm/core/Checkbox/styles.js +0 -3
- package/esm/core/CheckboxController/index.js +6 -0
- package/esm/core/CollapseList/CollapseList.stories.js +43 -0
- package/esm/core/CollapseList/Item.js +0 -4
- package/esm/core/CollapseList/index.js +0 -2
- package/esm/core/CollapseList/styles.js +0 -2
- package/esm/core/CommentsTimeline/CommentLine/index.js +0 -2
- package/esm/core/CommentsTimeline/CommentLine/styles.js +4 -6
- package/esm/core/CommentsTimeline/CommentsTimeline.stories.js +79 -0
- package/esm/core/CommentsTimeline/index.js +0 -2
- package/esm/core/CommentsTimeline/styles.js +1 -3
- package/esm/core/CustomText/CustomText.stories.js +33 -0
- package/esm/core/CustomText/index.js +0 -6
- package/esm/core/CustomText/styles.js +1 -3
- package/esm/core/Datepicker/Datepicker.stories.js +58 -0
- package/esm/core/Datepicker/index.js +0 -20
- package/esm/core/Datepicker/styles.js +6 -8
- package/esm/core/DatepickerRange/DatepickerRange.stories.js +21 -0
- package/esm/core/DatepickerRange/index.js +17 -5
- package/esm/core/DatepickerRange/styles.js +6 -8
- package/esm/core/Divider/index.js +1 -2
- package/esm/core/Divider/styles.js +0 -1
- package/esm/core/Dropdown/Dropdown.stories.js +53 -0
- package/esm/core/Dropdown/index.js +0 -8
- package/esm/core/DropdownMenu/DropdownMenu.stories.js +47 -0
- package/esm/core/DropdownMenu/DropdownMenuOption.js +0 -2
- package/esm/core/DropdownMenu/index.js +0 -4
- package/esm/core/DropdownMenu/styles.js +2 -4
- package/esm/core/Editor/Editor.stories.js +54 -0
- package/esm/core/Editor/index.js +2 -6
- package/esm/core/Editor/styles.js +2 -4
- package/esm/core/FileInput/FileInput.stories.js +77 -0
- package/esm/core/FileInput/index.js +2 -12
- package/esm/core/FileInput/styles.js +11 -13
- package/esm/core/GoogleButton/GoogleButton.stories.js +12 -0
- package/esm/core/GoogleButton/index.js +0 -3
- package/esm/core/GoogleButton/styles.js +1 -3
- package/esm/core/Header/Header.stories.js +65 -0
- package/esm/core/Header/index.js +0 -2
- package/esm/core/HighlightText/HighlightText.stories.js +22 -0
- package/esm/core/HighlightText/index.js +0 -2
- package/esm/core/HighlightText/styles.js +1 -3
- package/esm/core/Html/Html.stories.js +43 -0
- package/esm/core/Html/index.js +0 -2
- package/esm/core/Html/styles.js +0 -1
- package/esm/core/Image/Image.stories.js +26 -0
- package/esm/core/Image/index.js +1 -2
- package/esm/core/Image/styles.js +0 -1
- package/esm/core/ImagePicker/IconWithBackground.js +0 -2
- package/esm/core/ImagePicker/ImagePicker.stories.js +28 -0
- package/esm/core/ImagePicker/UploadButton.js +0 -2
- package/esm/core/ImagePicker/index.js +2 -5
- package/esm/core/ImagePicker/styles.js +0 -1
- package/esm/core/InfoButton/InfoButton.stories.js +57 -0
- package/esm/core/InfoButton/index.js +0 -8
- package/esm/core/InfoButton/styles.js +15 -17
- package/esm/core/Input/Input.stories.js +158 -0
- package/esm/core/Input/index.js +4 -10
- package/esm/core/Input/styles.js +0 -1
- package/esm/core/Link/Link.stories.js +75 -0
- package/esm/core/Link/index.js +2 -3
- package/esm/core/Link/styles.js +1 -3
- package/esm/core/List/Item.js +1 -4
- package/esm/core/List/List.stories.js +157 -0
- package/esm/core/List/index.js +0 -3
- package/esm/core/List/styles.js +0 -4
- package/esm/core/ListPager/ListPager.stories.js +16 -0
- package/esm/core/ListPager/index.js +0 -8
- package/esm/core/ListPager/styles.js +2 -4
- package/esm/core/{ImageCarousel → MediaCarousel}/index.js +36 -22
- package/esm/core/MediaCarousel/styles.js +55 -0
- package/esm/core/Modal/ActionButtons/index.js +1 -4
- package/esm/core/Modal/Modal.stories.js +117 -0
- package/esm/core/Modal/index.js +1 -12
- package/esm/core/Modal/styles.js +7 -11
- package/esm/core/NoticeCard/NoticeCard.stories.js +61 -0
- package/esm/core/NoticeCard/index.js +0 -4
- package/esm/core/NoticeCard/models.js +3 -4
- package/esm/core/NoticeCard/privateComponents/NoticeAttachmentBlock/index.js +0 -2
- package/esm/core/NoticeCard/privateComponents/NoticeAttachmentBlock/styles.js +4 -6
- package/esm/core/NoticeCard/privateComponents/NoticeAttachmentList/index.js +0 -2
- package/esm/core/NoticeCard/privateComponents/NoticeAttachmentList/styles.js +1 -3
- package/esm/core/NoticeCard/privateComponents/NoticeMetaInfo/index.js +0 -2
- package/esm/core/NoticeCard/privateComponents/NoticeMetaInfo/styles.js +3 -5
- package/esm/core/NoticeCard/styles.js +5 -7
- package/esm/core/NoticeCard/utils.js +0 -3
- package/esm/core/NotificationCounter/NotificationCounter.stories.js +19 -0
- package/esm/core/NotificationCounter/index.js +1 -2
- package/esm/core/NotificationCounter/styles.js +0 -4
- package/esm/core/NotificationsMenu/NotificationBell/index.js +0 -2
- package/esm/core/NotificationsMenu/NotificationBell/styles.js +2 -2
- package/esm/core/NotificationsMenu/NotificationRow/index.js +0 -2
- package/esm/core/NotificationsMenu/NotificationRow/styles.js +1 -1
- package/esm/core/NotificationsMenu/NotificationsMenu.stories.js +33 -0
- package/esm/core/NotificationsMenu/index.js +0 -8
- package/esm/core/NotificationsMenu/styles.js +2 -4
- package/esm/core/PieChart/ActiveShape/index.js +1 -3
- package/esm/core/PieChart/PieChart.stories.js +81 -0
- package/esm/core/PieChart/index.js +6 -7
- package/esm/core/PieChart/renderTextContent/index.js +1 -3
- package/esm/core/PieChart/styles.js +2 -4
- package/esm/core/PreemptionCard/PreemptionCard.stories.js +68 -0
- package/esm/core/PreemptionCard/index.js +0 -5
- package/esm/core/PreemptionCard/models.js +3 -4
- package/esm/core/PreemptionCard/styles.js +2 -4
- package/esm/core/PreemptionCardLoading/PreemptionCardLoading.stories.js +15 -0
- package/esm/core/PreemptionCardLoading/index.js +0 -2
- package/esm/core/PreemptionCardLoading/styles.js +3 -5
- package/esm/core/Radio/Radio.stories.js +66 -0
- package/esm/core/Radio/index.js +0 -2
- package/esm/core/Radio/styles.js +0 -1
- package/esm/core/SearchFilter/SearchFilter.stories.js +113 -0
- package/esm/core/SearchFilter/index.js +2 -10
- package/esm/core/SearchFilter/styles.js +6 -10
- package/esm/core/SearchSelect/SearchSelect.stories.js +52 -0
- package/esm/core/SearchSelect/hooks/useSelectSearch.js +2 -3
- package/esm/core/SearchSelect/index.js +4 -12
- package/esm/core/SearchSelect/styles.js +4 -6
- package/esm/core/Select/Option.js +0 -3
- package/esm/core/Select/Select.stories.js +246 -0
- package/esm/core/Select/index.js +2 -17
- package/esm/core/Select/styles.js +3 -13
- package/esm/core/SimpleBarChart/SimpleBarChart.stories.js +174 -0
- package/esm/core/SimpleBarChart/index.js +0 -3
- package/esm/core/SimpleBarChart/styles.js +1 -1
- package/esm/core/SimpleLineChart/SimpleLineChart.stories.js +53 -0
- package/esm/core/SimpleLineChart/index.js +0 -2
- package/esm/core/SimpleLineChart/styles.js +1 -1
- package/esm/core/Skeleton/Skeleton.stories.js +46 -0
- package/esm/core/Skeleton/index.js +0 -4
- package/esm/core/Skeleton/styles.js +1 -3
- package/esm/core/Spinner/Spinner.stories.js +30 -0
- package/esm/core/Spinner/index.js +0 -2
- package/esm/core/TabBar/TabBar.stories.js +38 -0
- package/esm/core/TabBar/TabItem/index.js +0 -2
- package/esm/core/TabBar/TabItem/styles.js +1 -3
- package/esm/core/TabBar/index.js +0 -2
- package/esm/core/TabBar/styles.js +1 -3
- package/esm/core/TabNav/TabContext.js +8 -5
- package/esm/core/TabNav/TabNav.stories.js +306 -0
- package/esm/core/TabNav/TabNavItem/index.js +2 -6
- package/esm/core/TabNav/TabNavItem/styles.js +3 -5
- package/esm/core/TabNav/index.js +11 -14
- package/esm/core/TabNav/styles.js +4 -6
- package/esm/core/TabNav/utils/useContainerDimensions.js +0 -1
- package/esm/core/Table/Cell.js +2 -3
- package/esm/core/Table/Row.js +2 -3
- package/esm/core/Table/Table.stories.js +83 -0
- package/esm/core/Table/index.js +0 -2
- package/esm/core/Table/styles.js +2 -4
- package/esm/core/Tag/Tag.stories.js +112 -0
- package/esm/core/Tag/index.js +0 -2
- package/esm/core/Tag/styles.js +0 -1
- package/esm/core/Text/Text.stories.js +132 -0
- package/esm/core/Text/index.js +0 -2
- package/esm/core/Text/styles.js +0 -1
- package/esm/core/Textarea/Textarea.stories.js +33 -0
- package/esm/core/Textarea/index.js +0 -5
- package/esm/core/Textarea/styles.js +3 -5
- package/esm/core/Timeline/Timeline.stories.js +25 -0
- package/esm/core/Timeline/TimelineStep/index.js +0 -2
- package/esm/core/Timeline/TimelineStep/styles.js +3 -5
- package/esm/core/Timeline/index.js +0 -2
- package/esm/core/Timeline/styles.js +1 -3
- package/esm/core/Timepicker/Timepicker.stories.js +77 -0
- package/esm/core/Timepicker/index.js +7 -16
- package/esm/core/Timepicker/styles.js +2 -4
- package/esm/core/Tooltip/Tooptip.stories.js +14 -0
- package/esm/core/Tooltip/index.js +0 -3
- package/esm/core/Tooltip/styles.js +0 -1
- package/esm/core/UnitIllustration/index.js +1 -9
- package/esm/core/UserMenu/UserMenu.stories.js +91 -0
- package/esm/core/UserMenu/UserMenuOption.js +0 -2
- package/esm/core/UserMenu/index.js +0 -8
- package/esm/core/UserMenu/styles.js +6 -8
- package/esm/core/Video/Video.stories.js +23 -0
- package/esm/core/Video/index.js +28 -0
- package/esm/core/Video/styles.js +7 -0
- package/esm/core/YearWheel/YearWheel.stories.js +20 -0
- package/esm/core/YearWheel/index.js +0 -2
- package/esm/core/YearWheel/styles.js +1 -3
- package/esm/core/private/ButtonOrLink.js +8 -13
- package/esm/core/private/preemption.js +0 -4
- package/esm/core/utils/debounce.js +0 -2
- package/esm/enums/Keyboard.js +3 -3
- package/esm/globals/styles/styles.js +0 -1
- package/esm/hooks/useIsMobile.js +0 -2
- package/esm/hooks/useScreenOrientation.js +0 -10
- package/esm/icons/General/IconApartment.js +0 -2
- package/esm/icons/General/IconArchives.js +0 -2
- package/esm/icons/General/IconArea.js +0 -2
- package/esm/icons/General/IconArrowDown.js +0 -2
- package/esm/icons/General/IconArrowLeft.js +0 -2
- package/esm/icons/General/IconArrowRight.js +0 -2
- package/esm/icons/General/IconArrowUp.js +0 -2
- package/esm/icons/General/IconAttachment.js +0 -2
- package/esm/icons/General/IconAuditorFilled.js +0 -2
- package/esm/icons/General/IconAuditorOutline.js +0 -2
- package/esm/icons/General/IconBack.js +0 -2
- package/esm/icons/General/IconBath.js +0 -2
- package/esm/icons/General/IconBblFlame.js +2 -3
- package/esm/icons/General/IconBblShield.js +2 -3
- package/esm/icons/General/IconBblWater.js +2 -3
- package/esm/icons/General/IconBellOutline.js +0 -2
- package/esm/icons/General/IconBlock.js +0 -2
- package/esm/icons/General/IconBoard.js +0 -2
- package/esm/icons/General/IconBookmarkFilled.js +0 -2
- package/esm/icons/General/IconBookmarkOutline.js +0 -2
- package/esm/icons/General/IconBus.js +0 -2
- package/esm/icons/General/IconCalendar.js +0 -2
- package/esm/icons/General/IconCamera.js +0 -2
- package/esm/icons/General/IconCar.js +0 -2
- package/esm/icons/General/IconCaretDown.js +0 -2
- package/esm/icons/General/IconCaretLeft.js +0 -2
- package/esm/icons/General/IconCaretRight.js +0 -2
- package/esm/icons/General/IconCaretUp.js +0 -2
- package/esm/icons/General/IconCases.js +0 -2
- package/esm/icons/General/IconCheck.js +0 -2
- package/esm/icons/General/IconCheckedFilled.js +0 -2
- package/esm/icons/General/IconCheckedOutline.js +0 -2
- package/esm/icons/General/IconChevronDown.js +0 -2
- package/esm/icons/General/IconChevronLeft.js +0 -2
- package/esm/icons/General/IconChevronRight.js +0 -2
- package/esm/icons/General/IconChoice.js +0 -2
- package/esm/icons/General/IconClose.js +0 -2
- package/esm/icons/General/IconCloseAlt.js +0 -2
- package/esm/icons/General/IconComment.js +0 -2
- package/esm/icons/General/IconCommunication.js +0 -2
- package/esm/icons/General/IconCommunicationFilled.js +0 -2
- package/esm/icons/General/IconCompanyBuilding.js +0 -2
- package/esm/icons/General/IconCompanyBuildingFilled.js +0 -2
- package/esm/icons/General/IconCompanyBuildingOutline.js +0 -2
- package/esm/icons/General/IconDashboard.js +0 -2
- package/esm/icons/General/IconDashboardFilled.js +0 -2
- package/esm/icons/General/IconDelete.js +0 -2
- package/esm/icons/General/IconDocument.js +0 -2
- package/esm/icons/General/IconDocumentFilled.js +0 -2
- package/esm/icons/General/IconDoor.js +0 -2
- package/esm/icons/General/IconDotFilled.js +0 -2
- package/esm/icons/General/IconDotOutline.js +0 -2
- package/esm/icons/General/IconDownload.js +0 -2
- package/esm/icons/General/IconDraft.js +0 -2
- package/esm/icons/General/IconEarth.js +0 -2
- package/esm/icons/General/IconEconomy.js +0 -2
- package/esm/icons/General/IconEconomyFilled.js +0 -2
- package/esm/icons/General/IconEdit.js +0 -2
- package/esm/icons/General/IconElevator.js +0 -2
- package/esm/icons/General/IconErrorFilled.js +0 -2
- package/esm/icons/General/IconErrorOutline.js +0 -2
- package/esm/icons/General/IconExternalLink.js +0 -2
- package/esm/icons/General/IconEye.js +0 -2
- package/esm/icons/General/IconEyeDeny.js +0 -2
- package/esm/icons/General/IconFamily.js +0 -2
- package/esm/icons/General/IconFerry.js +0 -2
- package/esm/icons/General/IconFile.js +0 -2
- package/esm/icons/General/IconFileAdd.js +0 -2
- package/esm/icons/General/IconFileCopy.js +0 -2
- package/esm/icons/General/IconFileEdit.js +0 -2
- package/esm/icons/General/IconFileExcel.js +0 -2
- package/esm/icons/General/IconFilePDF.js +0 -2
- package/esm/icons/General/IconFileWord.js +0 -2
- package/esm/icons/General/IconFillOut.js +0 -2
- package/esm/icons/General/IconFilterList.js +0 -2
- package/esm/icons/General/IconFloor.js +0 -2
- package/esm/icons/General/IconForward.js +0 -2
- package/esm/icons/General/IconFullscreenClose.js +0 -2
- package/esm/icons/General/IconFullscreenOpen.js +0 -2
- package/esm/icons/General/IconGarage.js +0 -2
- package/esm/icons/General/IconGrid.js +0 -2
- package/esm/icons/General/IconGym.js +0 -2
- package/esm/icons/General/IconHearth.js +0 -2
- package/esm/icons/General/IconHearthOutline.js +0 -2
- package/esm/icons/General/IconHelp.js +0 -2
- package/esm/icons/General/IconHistory.js +0 -2
- package/esm/icons/General/IconHomeFilled.js +0 -2
- package/esm/icons/General/IconHomeOutline.js +0 -2
- package/esm/icons/General/IconHouse.js +0 -2
- package/esm/icons/General/IconHouseBlockFilled.js +0 -2
- package/esm/icons/General/IconHouseBlockOutline.js +0 -2
- package/esm/icons/General/IconHouseOutline.js +0 -2
- package/esm/icons/General/IconHumans.js +0 -2
- package/esm/icons/General/IconImage.js +0 -2
- package/esm/icons/General/IconImportantComment.js +0 -2
- package/esm/icons/General/IconInbox.js +0 -2
- package/esm/icons/General/IconInfoFilled.js +0 -2
- package/esm/icons/General/IconInfoOutline.js +0 -2
- package/esm/icons/General/IconJanitorFilled.js +0 -2
- package/esm/icons/General/IconJanitorOutline.js +0 -2
- package/esm/icons/General/IconJointcost.js +0 -2
- package/esm/icons/General/IconJointcost2.js +0 -2
- package/esm/icons/General/IconKey.js +0 -2
- package/esm/icons/General/IconKitchen.js +0 -2
- package/esm/icons/General/IconLabel.js +0 -2
- package/esm/icons/General/IconLeafFilled.js +0 -2
- package/esm/icons/General/IconLeafOutline.js +0 -2
- package/esm/icons/General/IconLeisureTime.js +0 -2
- package/esm/icons/General/IconLock.js +0 -2
- package/esm/icons/General/IconLockLocked.js +0 -2
- package/esm/icons/General/IconLockOpen.js +0 -2
- package/esm/icons/General/IconLookup.js +0 -2
- package/esm/icons/General/IconLookupFilled.js +0 -2
- package/esm/icons/General/IconMail.js +0 -2
- package/esm/icons/General/IconMap.js +0 -2
- package/esm/icons/General/IconMembership.js +0 -2
- package/esm/icons/General/IconMembershipFilled.js +0 -2
- package/esm/icons/General/IconMenu.js +0 -2
- package/esm/icons/General/IconMinus.js +0 -2
- package/esm/icons/General/IconMinusAlt.js +0 -2
- package/esm/icons/General/IconMinusAltFilled.js +0 -2
- package/esm/icons/General/IconMoney.js +0 -2
- package/esm/icons/General/IconParking.js +0 -2
- package/esm/icons/General/IconPaymentCard.js +0 -2
- package/esm/icons/General/IconPhone.js +0 -2
- package/esm/icons/General/IconPinned.js +0 -2
- package/esm/icons/General/IconPlus.js +0 -2
- package/esm/icons/General/IconPlusAlt.js +0 -2
- package/esm/icons/General/IconPortalUser.js +0 -2
- package/esm/icons/General/IconPrint.js +0 -2
- package/esm/icons/General/IconProfile.js +0 -2
- package/esm/icons/General/IconProfileFilled.js +0 -2
- package/esm/icons/General/IconRearrange.js +0 -2
- package/esm/icons/General/IconReciept.js +0 -2
- package/esm/icons/General/IconRedo.js +0 -2
- package/esm/icons/General/IconRefresh.js +0 -2
- package/esm/icons/General/IconReply.js +0 -2
- package/esm/icons/General/IconReplyAll.js +0 -2
- package/esm/icons/General/IconRoom.js +0 -2
- package/esm/icons/General/IconSave.js +0 -2
- package/esm/icons/General/IconSearch.js +0 -2
- package/esm/icons/General/IconSend.js +0 -2
- package/esm/icons/General/IconSettings.js +0 -2
- package/esm/icons/General/IconShopping.js +0 -2
- package/esm/icons/General/IconSign.js +0 -2
- package/esm/icons/General/IconSliders.js +0 -2
- package/esm/icons/General/IconSort.js +0 -2
- package/esm/icons/General/IconStarFilled.js +0 -2
- package/esm/icons/General/IconStarHalf.js +0 -2
- package/esm/icons/General/IconStarOutline.js +0 -2
- package/esm/icons/General/IconStore.js +0 -2
- package/esm/icons/General/IconSubway.js +0 -2
- package/esm/icons/General/IconSwitch.js +0 -2
- package/esm/icons/General/IconTrain.js +0 -2
- package/esm/icons/General/IconTram.js +0 -2
- package/esm/icons/General/IconTransport.js +0 -2
- package/esm/icons/General/IconTypeOfBuilding.js +0 -2
- package/esm/icons/General/IconTypeOfBuildingOutline.js +0 -2
- package/esm/icons/General/IconUndo.js +0 -2
- package/esm/icons/General/IconUpload.js +0 -2
- package/esm/icons/General/IconUser.js +0 -2
- package/esm/icons/General/IconUserThin.js +0 -2
- package/esm/icons/General/IconVote.js +0 -2
- package/esm/icons/General/IconWalk.js +0 -2
- package/esm/icons/General/IconWarning.js +0 -2
- package/esm/icons/General/IconWarningBell.js +0 -2
- package/esm/icons/General/IconWork.js +0 -2
- package/esm/icons/General/IconWorkFilled.js +0 -2
- package/esm/icons/General/IconZip.js +0 -2
- package/esm/icons/Icon.stories.js +629 -0
- package/esm/icons/Logos/IconAmericanExpress.js +0 -2
- package/esm/icons/Logos/IconBankAxept.js +0 -2
- package/esm/icons/Logos/IconGmail.js +0 -2
- package/esm/icons/Logos/IconMasterCard.js +0 -2
- package/esm/icons/Logos/IconOffice365.js +0 -2
- package/esm/icons/Logos/IconVisa.js +0 -2
- package/esm/icons/withIcon.js +2 -3
- package/esm/illustrations/Backgrounds/IllustrationHousesBackground.js +0 -2
- package/esm/illustrations/Backgrounds/IllustrationHousesBackgroundWithComposition.js +0 -2
- package/esm/illustrations/General/IllustrationError.js +0 -2
- package/esm/illustrations/General/IllustrationErrorGeneric.js +0 -2
- package/esm/illustrations/General/IllustrationHighHouse.js +0 -2
- package/esm/illustrations/General/IllustrationHighHouseComposition.js +0 -2
- package/esm/illustrations/General/IllustrationHouse.js +0 -2
- package/esm/illustrations/General/IllustrationHouseComposition.js +0 -2
- package/esm/illustrations/General/IllustrationHouseMissing.js +0 -2
- package/esm/illustrations/General/IllustrationLowHouse.js +0 -2
- package/esm/illustrations/General/IllustrationLowHouseComposition.js +0 -2
- package/esm/illustrations/General/IllustrationPaperCompleted.js +0 -2
- package/esm/illustrations/General/IllustrationPaperMissing.js +0 -2
- package/esm/illustrations/General/IllustrationSemiDetachedHouse.js +0 -2
- package/esm/illustrations/General/IllustrationSemiDetachedHouseComposition.js +0 -2
- package/esm/illustrations/General/IllustrationSmallHouse.js +0 -2
- package/esm/illustrations/General/IllustrationSmallHouseComposition.js +0 -2
- package/esm/illustrations/General/IllustrationTerraceBlock.js +0 -2
- package/esm/illustrations/General/IllustrationTerraceBlockComposition.js +0 -2
- package/esm/illustrations/General/IllustrationTownHouse.js +0 -2
- package/esm/illustrations/General/IllustrationTownHouseComposition.js +0 -2
- package/esm/illustrations/Illustration.stories.js +173 -0
- package/esm/illustrations/MySite/IllustrationMySiteAssociation.js +0 -2
- package/esm/illustrations/MySite/IllustrationMySiteBuilding.js +0 -2
- package/esm/illustrations/MySite/IllustrationMySiteCoffeeBook.js +0 -2
- package/esm/illustrations/MySite/IllustrationMySiteComputer.js +0 -2
- package/esm/illustrations/MySite/IllustrationMySiteCooperative.js +0 -2
- package/esm/illustrations/MySite/IllustrationMySiteDashboard.js +0 -2
- package/esm/illustrations/MySite/IllustrationMySiteGift.js +0 -2
- package/esm/illustrations/MySite/IllustrationMySiteMailbox.js +0 -2
- package/esm/illustrations/MySite/IllustrationMySitePapers.js +0 -2
- package/esm/illustrations/MySite/IllustrationMySitePiggyBank.js +0 -2
- package/esm/illustrations/MySite/IllustrationMySiteTransfer.js +0 -2
- package/esm/illustrations/styles.js +0 -1
- package/esm/illustrations/withIllustration.js +2 -4
- package/esm/index.js +3 -1
- package/esm/layout/Footer/Footer.stories.js +62 -0
- package/esm/layout/Footer/FooterButton/index.js +2 -3
- package/esm/layout/Footer/FooterButton/styles.js +0 -2
- package/esm/layout/Footer/FooterCol/index.js +0 -2
- package/esm/layout/Footer/FooterCol/styles.js +1 -3
- package/esm/layout/Footer/FooterGroup/index.js +0 -2
- package/esm/layout/Footer/FooterGroup/styles.js +1 -3
- package/esm/layout/Footer/FooterLabel/index.js +0 -2
- package/esm/layout/Footer/FooterLabel/styles.js +1 -3
- package/esm/layout/Footer/FooterLink/index.js +2 -3
- package/esm/layout/Footer/FooterLink/styles.js +0 -2
- package/esm/layout/Footer/index.js +0 -2
- package/esm/layout/Footer/styles.js +1 -1
- package/esm/layout/Layout/Layout.stories.js +14 -0
- package/esm/layout/Layout/index.js +0 -2
- package/esm/layout/Layout/styles.js +1 -1
- package/esm/layout/LayoutShell/LayoutShell.stories.js +116 -0
- package/esm/layout/LayoutShell/index.js +0 -2
- package/esm/layout/LayoutShell/styles.js +5 -7
- package/esm/layout/Menu/AppPicker/index.js +3 -3
- package/esm/layout/Menu/AppPicker/styles.js +2 -11
- package/esm/layout/Menu/MainMenu/index.js +0 -2
- package/esm/layout/Menu/MainMenu/styles.js +1 -1
- package/esm/layout/Menu/MenuItem/index.js +0 -2
- package/esm/layout/Menu/MenuItem/styles.js +2 -2
- package/esm/layout/Menu/MenuSpacer/index.js +0 -2
- package/esm/layout/Menu/MenuSpacer/styles.js +1 -1
- package/esm/layout/Menu/MenuTop/index.js +0 -2
- package/esm/layout/Menu/MenuTop/styles.js +2 -4
- package/esm/layout/Menu/SecondaryMenu/index.js +0 -2
- package/esm/layout/Menu/SecondaryMenu/styles.js +4 -4
- package/esm/layout/Menu/SecondaryMenuItem/index.js +0 -2
- package/esm/layout/Menu/Sidemenu.stories.js +323 -0
- package/esm/layout/Menu/index.js +0 -2
- package/esm/layout/Menu/styles.js +1 -1
- package/esm/layout/Submenu/Submenu.stories.js +94 -0
- package/esm/layout/Submenu/SubmenuItem/index.js +0 -7
- package/esm/layout/Submenu/SubmenuItem/styles.js +1 -6
- package/esm/layout/Submenu/SubmenuLightThemeBg/index.js +0 -2
- package/esm/layout/Submenu/index.js +0 -11
- package/esm/layout/Submenu/styles.js +6 -8
- package/esm/layout/Topbar/Topbar.stories.js +23 -0
- package/esm/layout/Topbar/index.js +0 -2
- package/esm/layout/Topbar/styles.js +1 -1
- package/esm/shared/components/SbIconGrid/index.js +27 -0
- package/esm/shared/recharts/CustomLegend/styles.js +2 -4
- package/esm/shared/recharts/CustomTooltip/index.js +0 -11
- package/esm/shared/recharts/CustomTooltip/styles.js +3 -5
- package/esm/shared/types/LoadedType.js +1 -0
- package/esm/utils/accountNumber.js +1 -7
- package/esm/utils/alpha.js +0 -1
- package/esm/utils/array.js +1 -3
- package/esm/utils/dates.js +0 -10
- package/esm/utils/file.js +1 -0
- package/esm/utils/format.js +3 -21
- package/esm/utils/formatGraphPrice.js +0 -15
- package/esm/utils/image.js +0 -3
- package/esm/utils/pagination.js +0 -5
- package/esm/utils/phone.js +8 -13
- package/esm/utils/time.js +4 -14
- package/esm/utils/url.js +0 -2
- package/esm/utils/useSnorreTheme.js +31 -0
- package/lib/app-shell/index.js +1 -4
- package/lib/app-shell/theme.js +2 -1
- package/lib/core/Alert/Alert.stories.d.ts +23 -0
- package/lib/core/Alert/Alert.stories.d.ts.map +1 -0
- package/lib/core/Alert/Alert.stories.js +43 -0
- package/lib/core/Alert/index.js +0 -2
- package/lib/core/Alert/styles.d.ts +6 -6
- package/lib/core/Alert/styles.js +0 -1
- package/lib/core/AppLoader/AppLoader.stories.d.ts +7 -0
- package/lib/core/AppLoader/AppLoader.stories.d.ts.map +1 -0
- package/lib/core/AppLoader/AppLoader.stories.js +10 -0
- package/lib/core/AppLoader/index.js +0 -2
- package/lib/core/AppLoader/styles.d.ts +1 -1
- package/lib/core/Autocomplete/Autocomplete.stories.d.ts +71 -0
- package/lib/core/Autocomplete/Autocomplete.stories.d.ts.map +1 -0
- package/lib/core/Autocomplete/Autocomplete.stories.js +327 -0
- package/lib/core/Autocomplete/hooks/useAutocomplete.js +14 -49
- package/lib/core/Autocomplete/hooks/useHandleDimentions.js +2 -3
- package/lib/core/Autocomplete/index.js +2 -3
- package/lib/core/Autocomplete/styles.d.ts +18 -18
- package/lib/core/Autocomplete/styles.js +0 -2
- package/lib/core/Banner/Banner.stories.d.ts +23 -0
- package/lib/core/Banner/Banner.stories.d.ts.map +1 -0
- package/lib/core/Banner/Banner.stories.js +68 -0
- package/lib/core/Banner/index.js +0 -2
- package/lib/core/Banner/styles.js +4 -6
- package/lib/core/BarAndLineComposedChart/BarAndLineComposedChart.stories.d.ts +8 -0
- package/lib/core/BarAndLineComposedChart/BarAndLineComposedChart.stories.d.ts.map +1 -0
- package/lib/core/BarAndLineComposedChart/BarAndLineComposedChart.stories.js +94 -0
- package/lib/core/BarAndLineComposedChart/index.js +0 -2
- package/lib/core/BarAndLineComposedChart/styles.js +1 -1
- package/lib/core/BarChartWithCustomizedEvent/BarChartWithCustomizedEvent.stories.d.ts +14 -0
- package/lib/core/BarChartWithCustomizedEvent/BarChartWithCustomizedEvent.stories.d.ts.map +1 -0
- package/lib/core/BarChartWithCustomizedEvent/BarChartWithCustomizedEvent.stories.js +80 -0
- package/lib/core/BarChartWithCustomizedEvent/index.js +0 -3
- package/lib/core/BarChartWithCustomizedEvent/styles.js +1 -1
- package/lib/core/Box/Box.stories.d.ts +39 -0
- package/lib/core/Box/Box.stories.d.ts.map +1 -0
- package/lib/core/Box/Box.stories.js +89 -0
- package/lib/core/Box/index.js +0 -4
- package/lib/core/Box/styles.d.ts +5 -5
- package/lib/core/Box/styles.js +2 -8
- package/lib/core/BoxedTable/BoxedTable.stories.d.ts +35 -0
- package/lib/core/BoxedTable/BoxedTable.stories.d.ts.map +1 -0
- package/lib/core/BoxedTable/BoxedTable.stories.js +351 -0
- package/lib/core/BoxedTable/DraggableRow/index.js +0 -2
- package/lib/core/BoxedTable/DraggableRow/styles.js +5 -7
- package/lib/core/BoxedTable/HeaderCell/index.js +0 -4
- package/lib/core/BoxedTable/HeaderCell/styles.d.ts +1 -1
- package/lib/core/BoxedTable/HeaderCell/styles.js +1 -1
- package/lib/core/BoxedTable/RowCell/index.js +0 -2
- package/lib/core/BoxedTable/RowCell/styles.d.ts +8 -8
- package/lib/core/BoxedTable/RowCell/styles.js +1 -3
- package/lib/core/BoxedTable/TableHeader/index.js +0 -2
- package/lib/core/BoxedTable/TableHeader/styles.js +1 -3
- package/lib/core/BoxedTable/TableRow/index.js +0 -7
- package/lib/core/BoxedTable/TableRow/styles.js +6 -8
- package/lib/core/BoxedTable/index.js +2 -5
- package/lib/core/BoxedTable/styles.js +2 -9
- package/lib/core/Button/Button.stories.d.ts +63 -0
- package/lib/core/Button/Button.stories.d.ts.map +1 -0
- package/lib/core/Button/Button.stories.js +121 -0
- package/lib/core/Button/index.js +0 -4
- package/lib/core/Button/styles.d.ts +18 -18
- package/lib/core/Button/styles.js +1 -5
- package/lib/core/Calendar/Calendar.stories.d.ts +15 -0
- package/lib/core/Calendar/Calendar.stories.d.ts.map +1 -0
- package/lib/core/Calendar/Calendar.stories.js +39 -0
- package/lib/core/Calendar/CalendarEvent/index.js +0 -8
- package/lib/core/Calendar/CalendarEvent/styles.js +5 -7
- package/lib/core/Calendar/CalendarSmallEvent/index.js +0 -8
- package/lib/core/Calendar/CalendarSmallEvent/styles.js +5 -7
- package/lib/core/Calendar/index.js +0 -5
- package/lib/core/Calendar/styles.js +5 -7
- package/lib/core/Calendar/util.js +0 -2
- package/lib/core/Card/Card.stories.d.ts +49 -0
- package/lib/core/Card/Card.stories.d.ts.map +1 -0
- package/lib/core/Card/Card.stories.js +69 -0
- package/lib/core/Card/index.js +0 -3
- package/lib/core/Card/styles.d.ts +11 -11
- package/lib/core/Card/styles.js +0 -1
- package/lib/core/Checkbox/Checkbox.stories.d.ts +23 -0
- package/lib/core/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/lib/core/Checkbox/Checkbox.stories.js +43 -0
- package/lib/core/Checkbox/index.js +0 -4
- package/lib/core/Checkbox/styles.d.ts +5 -5
- package/lib/core/Checkbox/styles.js +0 -3
- package/lib/core/CheckboxController/index.js +6 -0
- package/lib/core/CollapseList/CollapseList.stories.d.ts +11 -0
- package/lib/core/CollapseList/CollapseList.stories.d.ts.map +1 -0
- package/lib/core/CollapseList/CollapseList.stories.js +43 -0
- package/lib/core/CollapseList/Item.js +0 -4
- package/lib/core/CollapseList/index.js +0 -2
- package/lib/core/CollapseList/styles.d.ts +2 -2
- package/lib/core/CollapseList/styles.js +0 -2
- package/lib/core/CommentsTimeline/CommentLine/index.js +0 -2
- package/lib/core/CommentsTimeline/CommentLine/styles.js +4 -6
- package/lib/core/CommentsTimeline/CommentsTimeline.stories.d.ts +11 -0
- package/lib/core/CommentsTimeline/CommentsTimeline.stories.d.ts.map +1 -0
- package/lib/core/CommentsTimeline/CommentsTimeline.stories.js +79 -0
- package/lib/core/CommentsTimeline/index.js +0 -2
- package/lib/core/CommentsTimeline/styles.js +1 -3
- package/lib/core/CustomText/CustomText.stories.d.ts +19 -0
- package/lib/core/CustomText/CustomText.stories.d.ts.map +1 -0
- package/lib/core/CustomText/CustomText.stories.js +33 -0
- package/lib/core/CustomText/index.js +0 -6
- package/lib/core/CustomText/styles.d.ts +1 -1
- package/lib/core/CustomText/styles.js +1 -3
- package/lib/core/Datepicker/Datepicker.stories.d.ts +27 -0
- package/lib/core/Datepicker/Datepicker.stories.d.ts.map +1 -0
- package/lib/core/Datepicker/Datepicker.stories.js +58 -0
- package/lib/core/Datepicker/index.js +0 -20
- package/lib/core/Datepicker/styles.d.ts +4 -4
- package/lib/core/Datepicker/styles.js +6 -8
- package/lib/core/DatepickerRange/DatepickerRange.stories.d.ts +7 -0
- package/lib/core/DatepickerRange/DatepickerRange.stories.d.ts.map +1 -0
- package/lib/core/DatepickerRange/DatepickerRange.stories.js +21 -0
- package/lib/core/DatepickerRange/index.js +17 -5
- package/lib/core/DatepickerRange/styles.d.ts +4 -4
- package/lib/core/DatepickerRange/styles.js +6 -8
- package/lib/core/Divider/index.js +1 -2
- package/lib/core/Divider/styles.d.ts +5 -5
- package/lib/core/Divider/styles.js +0 -1
- package/lib/core/Dropdown/Dropdown.stories.d.ts +23 -0
- package/lib/core/Dropdown/Dropdown.stories.d.ts.map +1 -0
- package/lib/core/Dropdown/Dropdown.stories.js +53 -0
- package/lib/core/Dropdown/index.js +0 -8
- package/lib/core/Dropdown/styles.d.ts +3 -3
- package/lib/core/DropdownMenu/DropdownMenu.stories.d.ts +15 -0
- package/lib/core/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -0
- package/lib/core/DropdownMenu/DropdownMenu.stories.js +47 -0
- package/lib/core/DropdownMenu/DropdownMenuOption.js +0 -2
- package/lib/core/DropdownMenu/index.js +0 -4
- package/lib/core/DropdownMenu/styles.d.ts +1 -1
- package/lib/core/DropdownMenu/styles.js +2 -4
- package/lib/core/Editor/Editor.stories.d.ts +23 -0
- package/lib/core/Editor/Editor.stories.d.ts.map +1 -0
- package/lib/core/Editor/Editor.stories.js +54 -0
- package/lib/core/Editor/index.js +2 -6
- package/lib/core/Editor/styles.d.ts +2 -2
- package/lib/core/Editor/styles.js +2 -4
- package/lib/core/FileInput/FileInput.stories.d.ts +15 -0
- package/lib/core/FileInput/FileInput.stories.d.ts.map +1 -0
- package/lib/core/FileInput/FileInput.stories.js +77 -0
- package/lib/core/FileInput/index.js +2 -12
- package/lib/core/FileInput/styles.d.ts +1 -1
- package/lib/core/FileInput/styles.js +11 -13
- package/lib/core/GoogleButton/GoogleButton.stories.d.ts +7 -0
- package/lib/core/GoogleButton/GoogleButton.stories.d.ts.map +1 -0
- package/lib/core/GoogleButton/GoogleButton.stories.js +12 -0
- package/lib/core/GoogleButton/index.js +0 -3
- package/lib/core/GoogleButton/styles.js +1 -3
- package/lib/core/Header/Header.stories.d.ts +35 -0
- package/lib/core/Header/Header.stories.d.ts.map +1 -0
- package/lib/core/Header/Header.stories.js +65 -0
- package/lib/core/Header/index.js +0 -2
- package/lib/core/Header/styles.d.ts +7 -7
- package/lib/core/HighlightText/HighlightText.stories.d.ts +11 -0
- package/lib/core/HighlightText/HighlightText.stories.d.ts.map +1 -0
- package/lib/core/HighlightText/HighlightText.stories.js +22 -0
- package/lib/core/HighlightText/index.js +0 -2
- package/lib/core/HighlightText/styles.js +1 -3
- package/lib/core/Html/Html.stories.d.ts +19 -0
- package/lib/core/Html/Html.stories.d.ts.map +1 -0
- package/lib/core/Html/Html.stories.js +43 -0
- package/lib/core/Html/index.js +0 -2
- package/lib/core/Html/styles.d.ts +6 -6
- package/lib/core/Html/styles.js +0 -1
- package/lib/core/Image/Image.stories.d.ts +15 -0
- package/lib/core/Image/Image.stories.d.ts.map +1 -0
- package/lib/core/Image/Image.stories.js +26 -0
- package/lib/core/Image/index.js +1 -2
- package/lib/core/Image/styles.d.ts +4 -4
- package/lib/core/Image/styles.js +0 -1
- package/lib/core/ImagePicker/IconWithBackground.js +0 -2
- package/lib/core/ImagePicker/ImagePicker.stories.d.ts +17 -0
- package/lib/core/ImagePicker/ImagePicker.stories.d.ts.map +1 -0
- package/lib/core/ImagePicker/ImagePicker.stories.js +28 -0
- package/lib/core/ImagePicker/UploadButton.js +0 -2
- package/lib/core/ImagePicker/index.js +2 -5
- package/lib/core/ImagePicker/styles.d.ts +11 -11
- package/lib/core/ImagePicker/styles.js +0 -1
- package/lib/core/InfoButton/InfoButton.stories.d.ts +23 -0
- package/lib/core/InfoButton/InfoButton.stories.d.ts.map +1 -0
- package/lib/core/InfoButton/InfoButton.stories.js +57 -0
- package/lib/core/InfoButton/index.js +0 -8
- package/lib/core/InfoButton/styles.d.ts +7 -7
- package/lib/core/InfoButton/styles.d.ts.map +1 -1
- package/lib/core/InfoButton/styles.js +15 -17
- package/lib/core/Input/Input.stories.d.ts +20 -0
- package/lib/core/Input/Input.stories.d.ts.map +1 -0
- package/lib/core/Input/Input.stories.js +158 -0
- package/lib/core/Input/index.js +4 -10
- package/lib/core/Input/styles.d.ts +16 -16
- package/lib/core/Input/styles.js +0 -1
- package/lib/core/Link/Link.stories.d.ts +39 -0
- package/lib/core/Link/Link.stories.d.ts.map +1 -0
- package/lib/core/Link/Link.stories.js +75 -0
- package/lib/core/Link/index.js +2 -3
- package/lib/core/Link/styles.d.ts +9 -9
- package/lib/core/Link/styles.js +1 -3
- package/lib/core/List/Item.js +1 -4
- package/lib/core/List/List.stories.d.ts +39 -0
- package/lib/core/List/List.stories.d.ts.map +1 -0
- package/lib/core/List/List.stories.js +157 -0
- package/lib/core/List/index.js +0 -3
- package/lib/core/List/styles.d.ts +11 -11
- package/lib/core/List/styles.js +0 -4
- package/lib/core/ListPager/ListPager.stories.d.ts +7 -0
- package/lib/core/ListPager/ListPager.stories.d.ts.map +1 -0
- package/lib/core/ListPager/ListPager.stories.js +16 -0
- package/lib/core/ListPager/index.js +0 -8
- package/lib/core/ListPager/styles.d.ts +1 -1
- package/lib/core/ListPager/styles.js +2 -4
- package/lib/core/MediaCarousel/index.d.ts +24 -0
- package/lib/core/MediaCarousel/index.d.ts.map +1 -0
- package/lib/core/{ImageCarousel → MediaCarousel}/index.js +36 -22
- package/lib/core/{ImageCarousel → MediaCarousel}/styles.d.ts +2 -0
- package/lib/core/MediaCarousel/styles.d.ts.map +1 -0
- package/lib/core/MediaCarousel/styles.js +55 -0
- package/lib/core/Modal/ActionButtons/index.d.ts +1 -1
- package/lib/core/Modal/ActionButtons/index.d.ts.map +1 -1
- package/lib/core/Modal/ActionButtons/index.js +1 -4
- package/lib/core/Modal/Modal.stories.d.ts +23 -0
- package/lib/core/Modal/Modal.stories.d.ts.map +1 -0
- package/lib/core/Modal/Modal.stories.js +117 -0
- package/lib/core/Modal/index.d.ts +1 -1
- package/lib/core/Modal/index.js +1 -12
- package/lib/core/Modal/styles.js +7 -11
- package/lib/core/NoticeCard/NoticeCard.stories.d.ts +11 -0
- package/lib/core/NoticeCard/NoticeCard.stories.d.ts.map +1 -0
- package/lib/core/NoticeCard/NoticeCard.stories.js +61 -0
- package/lib/core/NoticeCard/index.js +0 -4
- package/lib/core/NoticeCard/models.js +3 -4
- package/lib/core/NoticeCard/privateComponents/NoticeAttachmentBlock/index.js +0 -2
- package/lib/core/NoticeCard/privateComponents/NoticeAttachmentBlock/styles.js +4 -6
- package/lib/core/NoticeCard/privateComponents/NoticeAttachmentList/index.js +0 -2
- package/lib/core/NoticeCard/privateComponents/NoticeAttachmentList/styles.js +1 -3
- package/lib/core/NoticeCard/privateComponents/NoticeMetaInfo/index.js +0 -2
- package/lib/core/NoticeCard/privateComponents/NoticeMetaInfo/styles.js +3 -5
- package/lib/core/NoticeCard/styles.js +5 -7
- package/lib/core/NoticeCard/utils.d.ts +2 -1
- package/lib/core/NoticeCard/utils.d.ts.map +1 -1
- package/lib/core/NoticeCard/utils.js +0 -3
- package/lib/core/NotificationCounter/NotificationCounter.stories.d.ts +11 -0
- package/lib/core/NotificationCounter/NotificationCounter.stories.d.ts.map +1 -0
- package/lib/core/NotificationCounter/NotificationCounter.stories.js +19 -0
- package/lib/core/NotificationCounter/index.js +1 -2
- package/lib/core/NotificationCounter/styles.d.ts +1 -1
- package/lib/core/NotificationCounter/styles.js +0 -4
- package/lib/core/NotificationsMenu/NotificationBell/index.js +0 -2
- package/lib/core/NotificationsMenu/NotificationBell/styles.js +2 -2
- package/lib/core/NotificationsMenu/NotificationRow/index.js +0 -2
- package/lib/core/NotificationsMenu/NotificationRow/styles.js +1 -1
- package/lib/core/NotificationsMenu/NotificationsMenu.stories.d.ts +11 -0
- package/lib/core/NotificationsMenu/NotificationsMenu.stories.d.ts.map +1 -0
- package/lib/core/NotificationsMenu/NotificationsMenu.stories.js +33 -0
- package/lib/core/NotificationsMenu/index.js +0 -8
- package/lib/core/NotificationsMenu/styles.js +2 -4
- package/lib/core/PieChart/ActiveShape/index.d.ts +2 -1
- package/lib/core/PieChart/ActiveShape/index.d.ts.map +1 -1
- package/lib/core/PieChart/ActiveShape/index.js +1 -3
- package/lib/core/PieChart/PieChart.stories.d.ts +20 -0
- package/lib/core/PieChart/PieChart.stories.d.ts.map +1 -0
- package/lib/core/PieChart/PieChart.stories.js +81 -0
- package/lib/core/PieChart/index.js +6 -7
- package/lib/core/PieChart/renderTextContent/index.d.ts +2 -1
- package/lib/core/PieChart/renderTextContent/index.d.ts.map +1 -1
- package/lib/core/PieChart/renderTextContent/index.js +1 -3
- package/lib/core/PieChart/styles.js +2 -4
- package/lib/core/PreemptionCard/PreemptionCard.stories.d.ts +7 -0
- package/lib/core/PreemptionCard/PreemptionCard.stories.d.ts.map +1 -0
- package/lib/core/PreemptionCard/PreemptionCard.stories.js +68 -0
- package/lib/core/PreemptionCard/index.js +0 -5
- package/lib/core/PreemptionCard/models.js +3 -4
- package/lib/core/PreemptionCard/styles.js +2 -4
- package/lib/core/PreemptionCardLoading/PreemptionCardLoading.stories.d.ts +7 -0
- package/lib/core/PreemptionCardLoading/PreemptionCardLoading.stories.d.ts.map +1 -0
- package/lib/core/PreemptionCardLoading/PreemptionCardLoading.stories.js +15 -0
- package/lib/core/PreemptionCardLoading/index.js +0 -2
- package/lib/core/PreemptionCardLoading/styles.js +3 -5
- package/lib/core/Radio/Radio.stories.d.ts +19 -0
- package/lib/core/Radio/Radio.stories.d.ts.map +1 -0
- package/lib/core/Radio/Radio.stories.js +66 -0
- package/lib/core/Radio/index.js +0 -2
- package/lib/core/Radio/styles.d.ts +4 -4
- package/lib/core/Radio/styles.js +0 -1
- package/lib/core/SearchFilter/SearchFilter.stories.d.ts +19 -0
- package/lib/core/SearchFilter/SearchFilter.stories.d.ts.map +1 -0
- package/lib/core/SearchFilter/SearchFilter.stories.js +113 -0
- package/lib/core/SearchFilter/index.js +2 -10
- package/lib/core/SearchFilter/styles.d.ts +2 -2
- package/lib/core/SearchFilter/styles.js +6 -10
- package/lib/core/SearchSelect/SearchSelect.stories.d.ts +12 -0
- package/lib/core/SearchSelect/SearchSelect.stories.d.ts.map +1 -0
- package/lib/core/SearchSelect/SearchSelect.stories.js +52 -0
- package/lib/core/SearchSelect/hooks/useSelectSearch.js +2 -3
- package/lib/core/SearchSelect/index.js +4 -12
- package/lib/core/SearchSelect/styles.d.ts +1 -1
- package/lib/core/SearchSelect/styles.js +4 -6
- package/lib/core/Select/Option.js +0 -3
- package/lib/core/Select/Select.stories.d.ts +47 -0
- package/lib/core/Select/Select.stories.d.ts.map +1 -0
- package/lib/core/Select/Select.stories.js +246 -0
- package/lib/core/Select/index.js +2 -17
- package/lib/core/Select/styles.d.ts +13 -13
- package/lib/core/Select/styles.js +3 -13
- package/lib/core/SimpleBarChart/SimpleBarChart.stories.d.ts +29 -0
- package/lib/core/SimpleBarChart/SimpleBarChart.stories.d.ts.map +1 -0
- package/lib/core/SimpleBarChart/SimpleBarChart.stories.js +174 -0
- package/lib/core/SimpleBarChart/index.js +0 -3
- package/lib/core/SimpleBarChart/styles.js +1 -1
- package/lib/core/SimpleLineChart/SimpleLineChart.stories.d.ts +8 -0
- package/lib/core/SimpleLineChart/SimpleLineChart.stories.d.ts.map +1 -0
- package/lib/core/SimpleLineChart/SimpleLineChart.stories.js +53 -0
- package/lib/core/SimpleLineChart/index.js +0 -2
- package/lib/core/SimpleLineChart/styles.js +1 -1
- package/lib/core/Skeleton/Skeleton.stories.d.ts +37 -0
- package/lib/core/Skeleton/Skeleton.stories.d.ts.map +1 -0
- package/lib/core/Skeleton/Skeleton.stories.js +46 -0
- package/lib/core/Skeleton/index.js +0 -4
- package/lib/core/Skeleton/styles.js +1 -3
- package/lib/core/Spinner/Spinner.stories.d.ts +19 -0
- package/lib/core/Spinner/Spinner.stories.d.ts.map +1 -0
- package/lib/core/Spinner/Spinner.stories.js +30 -0
- package/lib/core/Spinner/index.js +0 -2
- package/lib/core/Spinner/styles.d.ts +5 -5
- package/lib/core/TabBar/TabBar.stories.d.ts +7 -0
- package/lib/core/TabBar/TabBar.stories.d.ts.map +1 -0
- package/lib/core/TabBar/TabBar.stories.js +38 -0
- package/lib/core/TabBar/TabItem/index.js +0 -2
- package/lib/core/TabBar/TabItem/styles.js +1 -3
- package/lib/core/TabBar/index.js +0 -2
- package/lib/core/TabBar/styles.js +1 -3
- package/lib/core/TabNav/TabContext.js +8 -5
- package/lib/core/TabNav/TabNav.stories.d.ts +47 -0
- package/lib/core/TabNav/TabNav.stories.d.ts.map +1 -0
- package/lib/core/TabNav/TabNav.stories.js +306 -0
- package/lib/core/TabNav/TabNavItem/index.js +2 -6
- package/lib/core/TabNav/TabNavItem/styles.d.ts +1 -1
- package/lib/core/TabNav/TabNavItem/styles.js +3 -5
- package/lib/core/TabNav/index.js +11 -14
- package/lib/core/TabNav/styles.d.ts +4 -4
- package/lib/core/TabNav/styles.js +4 -6
- package/lib/core/TabNav/utils/useContainerDimensions.js +0 -1
- package/lib/core/Table/Cell.js +2 -3
- package/lib/core/Table/Row.js +2 -3
- package/lib/core/Table/Table.stories.d.ts +11 -0
- package/lib/core/Table/Table.stories.d.ts.map +1 -0
- package/lib/core/Table/Table.stories.js +83 -0
- package/lib/core/Table/index.js +0 -2
- package/lib/core/Table/styles.d.ts +14 -14
- package/lib/core/Table/styles.js +2 -4
- package/lib/core/Tag/Tag.stories.d.ts +59 -0
- package/lib/core/Tag/Tag.stories.d.ts.map +1 -0
- package/lib/core/Tag/Tag.stories.js +112 -0
- package/lib/core/Tag/index.js +0 -2
- package/lib/core/Tag/styles.d.ts +12 -12
- package/lib/core/Tag/styles.js +0 -1
- package/lib/core/Text/Text.stories.d.ts +21 -0
- package/lib/core/Text/Text.stories.d.ts.map +1 -0
- package/lib/core/Text/Text.stories.js +132 -0
- package/lib/core/Text/index.js +0 -2
- package/lib/core/Text/styles.d.ts +14 -14
- package/lib/core/Text/styles.js +0 -1
- package/lib/core/Textarea/Textarea.stories.d.ts +19 -0
- package/lib/core/Textarea/Textarea.stories.d.ts.map +1 -0
- package/lib/core/Textarea/Textarea.stories.js +33 -0
- package/lib/core/Textarea/index.js +0 -5
- package/lib/core/Textarea/styles.d.ts +3 -3
- package/lib/core/Textarea/styles.js +3 -5
- package/lib/core/Timeline/Timeline.stories.d.ts +7 -0
- package/lib/core/Timeline/Timeline.stories.d.ts.map +1 -0
- package/lib/core/Timeline/Timeline.stories.js +25 -0
- package/lib/core/Timeline/TimelineStep/index.js +0 -2
- package/lib/core/Timeline/TimelineStep/styles.d.ts +3 -3
- package/lib/core/Timeline/TimelineStep/styles.js +3 -5
- package/lib/core/Timeline/index.js +0 -2
- package/lib/core/Timeline/styles.js +1 -3
- package/lib/core/Timepicker/Timepicker.stories.d.ts +31 -0
- package/lib/core/Timepicker/Timepicker.stories.d.ts.map +1 -0
- package/lib/core/Timepicker/Timepicker.stories.js +77 -0
- package/lib/core/Timepicker/index.js +7 -16
- package/lib/core/Timepicker/styles.d.ts +5 -5
- package/lib/core/Timepicker/styles.js +2 -4
- package/lib/core/Tooltip/Tooptip.stories.d.ts +7 -0
- package/lib/core/Tooltip/Tooptip.stories.d.ts.map +1 -0
- package/lib/core/Tooltip/Tooptip.stories.js +14 -0
- package/lib/core/Tooltip/index.js +0 -3
- package/lib/core/Tooltip/styles.d.ts +2 -2
- package/lib/core/Tooltip/styles.js +0 -1
- package/lib/core/UnitIllustration/index.js +1 -9
- package/lib/core/UserMenu/UserMenu.stories.d.ts +19 -0
- package/lib/core/UserMenu/UserMenu.stories.d.ts.map +1 -0
- package/lib/core/UserMenu/UserMenu.stories.js +91 -0
- package/lib/core/UserMenu/UserMenuOption.js +0 -2
- package/lib/core/UserMenu/index.js +0 -8
- package/lib/core/UserMenu/styles.d.ts +1 -1
- package/lib/core/UserMenu/styles.js +6 -8
- package/lib/core/Video/Video.stories.d.ts +15 -0
- package/lib/core/Video/Video.stories.d.ts.map +1 -0
- package/lib/core/Video/Video.stories.js +23 -0
- package/lib/core/Video/index.d.ts +24 -0
- package/lib/core/Video/index.d.ts.map +1 -0
- package/lib/core/Video/index.js +28 -0
- package/lib/core/Video/styles.d.ts +7 -0
- package/lib/core/Video/styles.d.ts.map +1 -0
- package/lib/core/Video/styles.js +7 -0
- package/lib/core/YearWheel/YearWheel.stories.d.ts +11 -0
- package/lib/core/YearWheel/YearWheel.stories.d.ts.map +1 -0
- package/lib/core/YearWheel/YearWheel.stories.js +20 -0
- package/lib/core/YearWheel/index.js +0 -2
- package/lib/core/YearWheel/styles.d.ts +2 -2
- package/lib/core/YearWheel/styles.js +1 -3
- package/lib/core/private/ButtonOrLink.js +8 -13
- package/lib/core/private/preemption.js +0 -4
- package/lib/core/utils/debounce.js +0 -2
- package/lib/enums/Keyboard.js +3 -3
- package/lib/globals/styles/styles.d.ts +1 -1
- package/lib/globals/styles/styles.js +0 -1
- package/lib/hooks/useIsMobile.js +0 -2
- package/lib/hooks/useScreenOrientation.js +0 -10
- package/lib/icons/General/IconApartment.js +0 -2
- package/lib/icons/General/IconArchives.js +0 -2
- package/lib/icons/General/IconArea.js +0 -2
- package/lib/icons/General/IconArrowDown.js +0 -2
- package/lib/icons/General/IconArrowLeft.js +0 -2
- package/lib/icons/General/IconArrowRight.js +0 -2
- package/lib/icons/General/IconArrowUp.js +0 -2
- package/lib/icons/General/IconAttachment.js +0 -2
- package/lib/icons/General/IconAuditorFilled.js +0 -2
- package/lib/icons/General/IconAuditorOutline.js +0 -2
- package/lib/icons/General/IconBack.js +0 -2
- package/lib/icons/General/IconBath.js +0 -2
- package/lib/icons/General/IconBblFlame.js +2 -3
- package/lib/icons/General/IconBblShield.js +2 -3
- package/lib/icons/General/IconBblWater.js +2 -3
- package/lib/icons/General/IconBellOutline.js +0 -2
- package/lib/icons/General/IconBlock.js +0 -2
- package/lib/icons/General/IconBoard.js +0 -2
- package/lib/icons/General/IconBookmarkFilled.js +0 -2
- package/lib/icons/General/IconBookmarkOutline.js +0 -2
- package/lib/icons/General/IconBus.js +0 -2
- package/lib/icons/General/IconCalendar.js +0 -2
- package/lib/icons/General/IconCamera.js +0 -2
- package/lib/icons/General/IconCar.js +0 -2
- package/lib/icons/General/IconCaretDown.js +0 -2
- package/lib/icons/General/IconCaretLeft.js +0 -2
- package/lib/icons/General/IconCaretRight.js +0 -2
- package/lib/icons/General/IconCaretUp.js +0 -2
- package/lib/icons/General/IconCases.js +0 -2
- package/lib/icons/General/IconCheck.js +0 -2
- package/lib/icons/General/IconCheckedFilled.js +0 -2
- package/lib/icons/General/IconCheckedOutline.js +0 -2
- package/lib/icons/General/IconChevronDown.js +0 -2
- package/lib/icons/General/IconChevronLeft.js +0 -2
- package/lib/icons/General/IconChevronRight.js +0 -2
- package/lib/icons/General/IconChoice.js +0 -2
- package/lib/icons/General/IconClose.js +0 -2
- package/lib/icons/General/IconCloseAlt.js +0 -2
- package/lib/icons/General/IconComment.js +0 -2
- package/lib/icons/General/IconCommunication.js +0 -2
- package/lib/icons/General/IconCommunicationFilled.js +0 -2
- package/lib/icons/General/IconCompanyBuilding.js +0 -2
- package/lib/icons/General/IconCompanyBuildingFilled.js +0 -2
- package/lib/icons/General/IconCompanyBuildingOutline.js +0 -2
- package/lib/icons/General/IconDashboard.js +0 -2
- package/lib/icons/General/IconDashboardFilled.js +0 -2
- package/lib/icons/General/IconDelete.js +0 -2
- package/lib/icons/General/IconDocument.js +0 -2
- package/lib/icons/General/IconDocumentFilled.js +0 -2
- package/lib/icons/General/IconDoor.js +0 -2
- package/lib/icons/General/IconDotFilled.js +0 -2
- package/lib/icons/General/IconDotOutline.js +0 -2
- package/lib/icons/General/IconDownload.js +0 -2
- package/lib/icons/General/IconDraft.js +0 -2
- package/lib/icons/General/IconEarth.js +0 -2
- package/lib/icons/General/IconEconomy.js +0 -2
- package/lib/icons/General/IconEconomyFilled.js +0 -2
- package/lib/icons/General/IconEdit.js +0 -2
- package/lib/icons/General/IconElevator.js +0 -2
- package/lib/icons/General/IconErrorFilled.js +0 -2
- package/lib/icons/General/IconErrorOutline.js +0 -2
- package/lib/icons/General/IconExternalLink.js +0 -2
- package/lib/icons/General/IconEye.js +0 -2
- package/lib/icons/General/IconEyeDeny.js +0 -2
- package/lib/icons/General/IconFamily.js +0 -2
- package/lib/icons/General/IconFerry.js +0 -2
- package/lib/icons/General/IconFile.js +0 -2
- package/lib/icons/General/IconFileAdd.js +0 -2
- package/lib/icons/General/IconFileCopy.js +0 -2
- package/lib/icons/General/IconFileEdit.js +0 -2
- package/lib/icons/General/IconFileExcel.js +0 -2
- package/lib/icons/General/IconFilePDF.js +0 -2
- package/lib/icons/General/IconFileWord.js +0 -2
- package/lib/icons/General/IconFillOut.js +0 -2
- package/lib/icons/General/IconFilterList.js +0 -2
- package/lib/icons/General/IconFloor.js +0 -2
- package/lib/icons/General/IconForward.js +0 -2
- package/lib/icons/General/IconFullscreenClose.js +0 -2
- package/lib/icons/General/IconFullscreenOpen.js +0 -2
- package/lib/icons/General/IconGarage.js +0 -2
- package/lib/icons/General/IconGrid.js +0 -2
- package/lib/icons/General/IconGym.js +0 -2
- package/lib/icons/General/IconHearth.js +0 -2
- package/lib/icons/General/IconHearthOutline.js +0 -2
- package/lib/icons/General/IconHelp.js +0 -2
- package/lib/icons/General/IconHistory.js +0 -2
- package/lib/icons/General/IconHomeFilled.js +0 -2
- package/lib/icons/General/IconHomeOutline.js +0 -2
- package/lib/icons/General/IconHouse.js +0 -2
- package/lib/icons/General/IconHouseBlockFilled.js +0 -2
- package/lib/icons/General/IconHouseBlockOutline.js +0 -2
- package/lib/icons/General/IconHouseOutline.js +0 -2
- package/lib/icons/General/IconHumans.js +0 -2
- package/lib/icons/General/IconImage.js +0 -2
- package/lib/icons/General/IconImportantComment.js +0 -2
- package/lib/icons/General/IconInbox.js +0 -2
- package/lib/icons/General/IconInfoFilled.js +0 -2
- package/lib/icons/General/IconInfoOutline.js +0 -2
- package/lib/icons/General/IconJanitorFilled.js +0 -2
- package/lib/icons/General/IconJanitorOutline.js +0 -2
- package/lib/icons/General/IconJointcost.js +0 -2
- package/lib/icons/General/IconJointcost2.js +0 -2
- package/lib/icons/General/IconKey.js +0 -2
- package/lib/icons/General/IconKitchen.js +0 -2
- package/lib/icons/General/IconLabel.js +0 -2
- package/lib/icons/General/IconLeafFilled.js +0 -2
- package/lib/icons/General/IconLeafOutline.js +0 -2
- package/lib/icons/General/IconLeisureTime.js +0 -2
- package/lib/icons/General/IconLock.js +0 -2
- package/lib/icons/General/IconLockLocked.js +0 -2
- package/lib/icons/General/IconLockOpen.js +0 -2
- package/lib/icons/General/IconLookup.js +0 -2
- package/lib/icons/General/IconLookupFilled.js +0 -2
- package/lib/icons/General/IconMail.js +0 -2
- package/lib/icons/General/IconMap.js +0 -2
- package/lib/icons/General/IconMembership.js +0 -2
- package/lib/icons/General/IconMembershipFilled.js +0 -2
- package/lib/icons/General/IconMenu.js +0 -2
- package/lib/icons/General/IconMinus.js +0 -2
- package/lib/icons/General/IconMinusAlt.js +0 -2
- package/lib/icons/General/IconMinusAltFilled.js +0 -2
- package/lib/icons/General/IconMoney.js +0 -2
- package/lib/icons/General/IconParking.js +0 -2
- package/lib/icons/General/IconPaymentCard.js +0 -2
- package/lib/icons/General/IconPhone.js +0 -2
- package/lib/icons/General/IconPinned.js +0 -2
- package/lib/icons/General/IconPlus.js +0 -2
- package/lib/icons/General/IconPlusAlt.js +0 -2
- package/lib/icons/General/IconPortalUser.js +0 -2
- package/lib/icons/General/IconPrint.js +0 -2
- package/lib/icons/General/IconProfile.js +0 -2
- package/lib/icons/General/IconProfileFilled.js +0 -2
- package/lib/icons/General/IconRearrange.js +0 -2
- package/lib/icons/General/IconReciept.js +0 -2
- package/lib/icons/General/IconRedo.js +0 -2
- package/lib/icons/General/IconRefresh.js +0 -2
- package/lib/icons/General/IconReply.js +0 -2
- package/lib/icons/General/IconReplyAll.js +0 -2
- package/lib/icons/General/IconRoom.js +0 -2
- package/lib/icons/General/IconSave.js +0 -2
- package/lib/icons/General/IconSearch.js +0 -2
- package/lib/icons/General/IconSend.js +0 -2
- package/lib/icons/General/IconSettings.js +0 -2
- package/lib/icons/General/IconShopping.js +0 -2
- package/lib/icons/General/IconSign.js +0 -2
- package/lib/icons/General/IconSliders.js +0 -2
- package/lib/icons/General/IconSort.js +0 -2
- package/lib/icons/General/IconStarFilled.js +0 -2
- package/lib/icons/General/IconStarHalf.js +0 -2
- package/lib/icons/General/IconStarOutline.js +0 -2
- package/lib/icons/General/IconStore.js +0 -2
- package/lib/icons/General/IconSubway.js +0 -2
- package/lib/icons/General/IconSwitch.js +0 -2
- package/lib/icons/General/IconTrain.js +0 -2
- package/lib/icons/General/IconTram.js +0 -2
- package/lib/icons/General/IconTransport.js +0 -2
- package/lib/icons/General/IconTypeOfBuilding.js +0 -2
- package/lib/icons/General/IconTypeOfBuildingOutline.js +0 -2
- package/lib/icons/General/IconUndo.js +0 -2
- package/lib/icons/General/IconUpload.js +0 -2
- package/lib/icons/General/IconUser.js +0 -2
- package/lib/icons/General/IconUserThin.js +0 -2
- package/lib/icons/General/IconVote.js +0 -2
- package/lib/icons/General/IconWalk.js +0 -2
- package/lib/icons/General/IconWarning.js +0 -2
- package/lib/icons/General/IconWarningBell.js +0 -2
- package/lib/icons/General/IconWork.js +0 -2
- package/lib/icons/General/IconWorkFilled.js +0 -2
- package/lib/icons/General/IconZip.js +0 -2
- package/lib/icons/Icon.stories.d.ts +60 -0
- package/lib/icons/Icon.stories.d.ts.map +1 -0
- package/lib/icons/Icon.stories.js +629 -0
- package/lib/icons/Logos/IconAmericanExpress.js +0 -2
- package/lib/icons/Logos/IconBankAxept.js +0 -2
- package/lib/icons/Logos/IconGmail.js +0 -2
- package/lib/icons/Logos/IconMasterCard.js +0 -2
- package/lib/icons/Logos/IconOffice365.js +0 -2
- package/lib/icons/Logos/IconVisa.js +0 -2
- package/lib/icons/withIcon.js +2 -3
- package/lib/illustrations/Backgrounds/IllustrationHousesBackground.js +0 -2
- package/lib/illustrations/Backgrounds/IllustrationHousesBackgroundWithComposition.js +0 -2
- package/lib/illustrations/General/IllustrationError.js +0 -2
- package/lib/illustrations/General/IllustrationErrorGeneric.js +0 -2
- package/lib/illustrations/General/IllustrationHighHouse.js +0 -2
- package/lib/illustrations/General/IllustrationHighHouseComposition.js +0 -2
- package/lib/illustrations/General/IllustrationHouse.js +0 -2
- package/lib/illustrations/General/IllustrationHouseComposition.js +0 -2
- package/lib/illustrations/General/IllustrationHouseMissing.js +0 -2
- package/lib/illustrations/General/IllustrationLowHouse.js +0 -2
- package/lib/illustrations/General/IllustrationLowHouseComposition.js +0 -2
- package/lib/illustrations/General/IllustrationPaperCompleted.js +0 -2
- package/lib/illustrations/General/IllustrationPaperMissing.js +0 -2
- package/lib/illustrations/General/IllustrationSemiDetachedHouse.js +0 -2
- package/lib/illustrations/General/IllustrationSemiDetachedHouseComposition.js +0 -2
- package/lib/illustrations/General/IllustrationSmallHouse.js +0 -2
- package/lib/illustrations/General/IllustrationSmallHouseComposition.js +0 -2
- package/lib/illustrations/General/IllustrationTerraceBlock.js +0 -2
- package/lib/illustrations/General/IllustrationTerraceBlockComposition.js +0 -2
- package/lib/illustrations/General/IllustrationTownHouse.js +0 -2
- package/lib/illustrations/General/IllustrationTownHouseComposition.js +0 -2
- package/lib/illustrations/Illustration.stories.d.ts +27 -0
- package/lib/illustrations/Illustration.stories.d.ts.map +1 -0
- package/lib/illustrations/Illustration.stories.js +173 -0
- package/lib/illustrations/MySite/IllustrationMySiteAssociation.js +0 -2
- package/lib/illustrations/MySite/IllustrationMySiteBuilding.js +0 -2
- package/lib/illustrations/MySite/IllustrationMySiteCoffeeBook.js +0 -2
- package/lib/illustrations/MySite/IllustrationMySiteComputer.js +0 -2
- package/lib/illustrations/MySite/IllustrationMySiteCooperative.js +0 -2
- package/lib/illustrations/MySite/IllustrationMySiteDashboard.js +0 -2
- package/lib/illustrations/MySite/IllustrationMySiteGift.js +0 -2
- package/lib/illustrations/MySite/IllustrationMySiteMailbox.js +0 -2
- package/lib/illustrations/MySite/IllustrationMySitePapers.js +0 -2
- package/lib/illustrations/MySite/IllustrationMySitePiggyBank.js +0 -2
- package/lib/illustrations/MySite/IllustrationMySiteTransfer.js +0 -2
- package/lib/illustrations/styles.d.ts +2 -2
- package/lib/illustrations/styles.js +0 -1
- package/lib/illustrations/withIllustration.js +2 -4
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -1
- package/lib/layout/Footer/Footer.stories.d.ts +11 -0
- package/lib/layout/Footer/Footer.stories.d.ts.map +1 -0
- package/lib/layout/Footer/Footer.stories.js +62 -0
- package/lib/layout/Footer/FooterButton/index.js +2 -3
- package/lib/layout/Footer/FooterButton/styles.js +0 -2
- package/lib/layout/Footer/FooterCol/index.js +0 -2
- package/lib/layout/Footer/FooterCol/styles.js +1 -3
- package/lib/layout/Footer/FooterGroup/index.js +0 -2
- package/lib/layout/Footer/FooterGroup/styles.js +1 -3
- package/lib/layout/Footer/FooterLabel/index.js +0 -2
- package/lib/layout/Footer/FooterLabel/styles.js +1 -3
- package/lib/layout/Footer/FooterLink/index.js +2 -3
- package/lib/layout/Footer/FooterLink/styles.js +0 -2
- package/lib/layout/Footer/index.js +0 -2
- package/lib/layout/Footer/styles.d.ts +1 -1
- package/lib/layout/Footer/styles.js +1 -1
- package/lib/layout/Layout/Layout.stories.d.ts +7 -0
- package/lib/layout/Layout/Layout.stories.d.ts.map +1 -0
- package/lib/layout/Layout/Layout.stories.js +14 -0
- package/lib/layout/Layout/index.js +0 -2
- package/lib/layout/Layout/styles.js +1 -1
- package/lib/layout/LayoutShell/LayoutShell.stories.d.ts +15 -0
- package/lib/layout/LayoutShell/LayoutShell.stories.d.ts.map +1 -0
- package/lib/layout/LayoutShell/LayoutShell.stories.js +116 -0
- package/lib/layout/LayoutShell/index.js +0 -2
- package/lib/layout/LayoutShell/styles.d.ts +1 -1
- package/lib/layout/LayoutShell/styles.js +5 -7
- package/lib/layout/Menu/AppPicker/index.js +3 -3
- package/lib/layout/Menu/AppPicker/styles.js +2 -11
- package/lib/layout/Menu/MainMenu/index.js +0 -2
- package/lib/layout/Menu/MainMenu/styles.js +1 -1
- package/lib/layout/Menu/MenuItem/index.js +0 -2
- package/lib/layout/Menu/MenuItem/styles.js +2 -2
- package/lib/layout/Menu/MenuSpacer/index.js +0 -2
- package/lib/layout/Menu/MenuSpacer/styles.js +1 -1
- package/lib/layout/Menu/MenuTop/index.js +0 -2
- package/lib/layout/Menu/MenuTop/styles.js +2 -4
- package/lib/layout/Menu/SecondaryMenu/index.js +0 -2
- package/lib/layout/Menu/SecondaryMenu/styles.js +4 -4
- package/lib/layout/Menu/SecondaryMenuItem/index.js +0 -2
- package/lib/layout/Menu/Sidemenu.stories.d.ts +19 -0
- package/lib/layout/Menu/Sidemenu.stories.d.ts.map +1 -0
- package/lib/layout/Menu/Sidemenu.stories.js +323 -0
- package/lib/layout/Menu/index.js +0 -2
- package/lib/layout/Menu/styles.js +1 -1
- package/lib/layout/Submenu/Submenu.stories.d.ts +27 -0
- package/lib/layout/Submenu/Submenu.stories.d.ts.map +1 -0
- package/lib/layout/Submenu/Submenu.stories.js +94 -0
- package/lib/layout/Submenu/SubmenuItem/index.js +0 -7
- package/lib/layout/Submenu/SubmenuItem/styles.d.ts +2 -2
- package/lib/layout/Submenu/SubmenuItem/styles.js +1 -6
- package/lib/layout/Submenu/SubmenuLightThemeBg/index.js +0 -2
- package/lib/layout/Submenu/index.js +0 -11
- package/lib/layout/Submenu/styles.d.ts +4 -4
- package/lib/layout/Submenu/styles.js +6 -8
- package/lib/layout/Topbar/Topbar.stories.d.ts +11 -0
- package/lib/layout/Topbar/Topbar.stories.d.ts.map +1 -0
- package/lib/layout/Topbar/Topbar.stories.js +23 -0
- package/lib/layout/Topbar/index.js +0 -2
- package/lib/layout/Topbar/styles.js +1 -1
- package/lib/shared/components/SbIconGrid/index.d.ts +7 -0
- package/lib/shared/components/SbIconGrid/index.d.ts.map +1 -0
- package/lib/shared/components/SbIconGrid/index.js +27 -0
- package/lib/shared/recharts/CustomLegend/styles.js +2 -4
- package/lib/shared/recharts/CustomTooltip/index.js +0 -11
- package/lib/shared/recharts/CustomTooltip/styles.js +3 -5
- package/lib/shared/types/LoadedType.d.ts +7 -0
- package/lib/shared/types/LoadedType.d.ts.map +1 -0
- package/lib/shared/types/LoadedType.js +1 -0
- package/lib/utils/accountNumber.js +1 -7
- package/lib/utils/alpha.js +0 -1
- package/lib/utils/array.js +1 -3
- package/lib/utils/dates.js +0 -10
- package/lib/utils/file.js +1 -0
- package/lib/utils/format.js +3 -21
- package/lib/utils/formatGraphPrice.js +0 -15
- package/lib/utils/image.js +0 -3
- package/lib/utils/pagination.js +0 -5
- package/lib/utils/phone.js +8 -13
- package/lib/utils/time.js +4 -14
- package/lib/utils/url.js +0 -2
- package/lib/utils/useSnorreTheme.d.ts +11 -0
- package/lib/utils/useSnorreTheme.d.ts.map +1 -0
- package/lib/utils/useSnorreTheme.js +31 -0
- package/package.json +2 -1
- package/esm/core/Autocomplete/utils/useHandleOptionsHeight.js +0 -16
- package/esm/core/Datepicker/yearMonthForm.js +0 -56
- package/esm/core/EditorOld/config.js +0 -69
- package/esm/core/EditorOld/index.js +0 -147
- package/esm/core/EditorOld/styles.js +0 -65
- package/esm/core/ImageCarousel/styles.js +0 -58
- package/esm/enums/ModifierKey.js +0 -13
- package/lib/core/Autocomplete/utils/useHandleOptionsHeight.d.ts +0 -7
- package/lib/core/Autocomplete/utils/useHandleOptionsHeight.d.ts.map +0 -1
- package/lib/core/Autocomplete/utils/useHandleOptionsHeight.js +0 -16
- package/lib/core/Datepicker/yearMonthForm.d.ts +0 -10
- package/lib/core/Datepicker/yearMonthForm.d.ts.map +0 -1
- package/lib/core/Datepicker/yearMonthForm.js +0 -56
- package/lib/core/EditorOld/config.d.ts +0 -56
- package/lib/core/EditorOld/config.d.ts.map +0 -1
- package/lib/core/EditorOld/config.js +0 -69
- package/lib/core/EditorOld/index.d.ts +0 -39
- package/lib/core/EditorOld/index.d.ts.map +0 -1
- package/lib/core/EditorOld/index.js +0 -147
- package/lib/core/EditorOld/styles.d.ts +0 -23
- package/lib/core/EditorOld/styles.d.ts.map +0 -1
- package/lib/core/EditorOld/styles.js +0 -65
- package/lib/core/ImageCarousel/index.d.ts +0 -11
- package/lib/core/ImageCarousel/index.d.ts.map +0 -1
- package/lib/core/ImageCarousel/styles.d.ts.map +0 -1
- package/lib/core/ImageCarousel/styles.js +0 -58
- package/lib/enums/ModifierKey.d.ts +0 -12
- package/lib/enums/ModifierKey.d.ts.map +0 -1
- package/lib/enums/ModifierKey.js +0 -13
@@ -1,8 +1,8 @@
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
2
|
+
|
2
3
|
import React from 'react';
|
3
4
|
import styles from './styles';
|
4
5
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
5
|
-
|
6
6
|
const Divider = ({
|
7
7
|
className,
|
8
8
|
color,
|
@@ -17,5 +17,4 @@ const Divider = ({
|
|
17
17
|
css: theme => [styles.default(color), subtle && styles.subtle(theme), margin && styles.margin(margin), height && styles.height(height), lightGray && styles.lightGray, css && css]
|
18
18
|
});
|
19
19
|
};
|
20
|
-
|
21
20
|
export default Divider;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { IAppTheme } from '../../app-shell/theme';
|
2
2
|
declare const styles: {
|
3
|
-
default: (color?: string) => import("@emotion/
|
4
|
-
subtle: (theme: IAppTheme) => import("@emotion/
|
5
|
-
margin: (margin: string) => import("@emotion/
|
6
|
-
height: (height: number) => import("@emotion/
|
7
|
-
lightGray: import("@emotion/
|
3
|
+
default: (color?: string) => import("@emotion/utils").SerializedStyles;
|
4
|
+
subtle: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
|
5
|
+
margin: (margin: string) => import("@emotion/utils").SerializedStyles;
|
6
|
+
height: (height: number) => import("@emotion/utils").SerializedStyles;
|
7
|
+
lightGray: import("@emotion/utils").SerializedStyles;
|
8
8
|
};
|
9
9
|
export default styles;
|
10
10
|
export { styles };
|
@@ -1,5 +1,4 @@
|
|
1
1
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
2
|
-
|
3
2
|
import { css } from '@emotion/react';
|
4
3
|
const styles = {
|
5
4
|
default: (color = '#f7f7f7') => /*#__PURE__*/css("height:1px;background-color:", color, ";border:none;margin:1em 0;" + (process.env.NODE_ENV === "production" ? "" : ";label:default;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWNrYWdlcy9jb3JlL0RpdmlkZXIvc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlxQyIsImZpbGUiOiIuLi8uLi8uLi9zcmMvcGFja2FnZXMvY29yZS9EaXZpZGVyL3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgSUFwcFRoZW1lIH0gZnJvbSAnLi4vLi4vYXBwLXNoZWxsL3RoZW1lJ1xuXG5jb25zdCBzdHlsZXMgPSB7XG4gIGRlZmF1bHQ6IChjb2xvciA9ICcjZjdmN2Y3JykgPT4gY3NzYFxuICAgIGhlaWdodDogMXB4O1xuICAgIGJhY2tncm91bmQtY29sb3I6ICR7Y29sb3J9O1xuICAgIGJvcmRlcjogbm9uZTtcbiAgICBtYXJnaW46IDFlbSAwO1xuICBgLFxuICBzdWJ0bGU6ICh0aGVtZTogSUFwcFRoZW1lKSA9PiBjc3NgXG4gICAgYmFja2dyb3VuZC1jb2xvcjogJHt0aGVtZS5zdWJ0bGVUZXh0fTtcbiAgYCxcbiAgbWFyZ2luOiAobWFyZ2luOiBzdHJpbmcpID0+IGNzc2BcbiAgICBtYXJnaW46ICR7bWFyZ2lufSAwO1xuICBgLFxuICBoZWlnaHQ6IChoZWlnaHQ6IG51bWJlcikgPT4gY3NzYFxuICAgIGhlaWdodDogJHtoZWlnaHR9cHg7XG4gIGAsXG4gIGxpZ2h0R3JheTogY3NzYFxuICAgIGJhY2tncm91bmQtY29sb3I6ICNkN2Q3ZDc7XG4gIGAsXG59XG5cbmV4cG9ydCBkZWZhdWx0IHN0eWxlc1xuZXhwb3J0IHsgc3R5bGVzIH1cbiJdfQ== */"),
|
@@ -0,0 +1,23 @@
|
|
1
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
2
|
+
export default _default;
|
3
|
+
export declare const Default: {
|
4
|
+
render: () => JSX.Element;
|
5
|
+
name: string;
|
6
|
+
};
|
7
|
+
export declare const Background: {
|
8
|
+
render: () => JSX.Element;
|
9
|
+
name: string;
|
10
|
+
};
|
11
|
+
export declare const CustomLabel: {
|
12
|
+
render: () => JSX.Element;
|
13
|
+
name: string;
|
14
|
+
};
|
15
|
+
export declare const Icon: {
|
16
|
+
render: () => JSX.Element;
|
17
|
+
name: string;
|
18
|
+
};
|
19
|
+
export declare const WithTimeout: {
|
20
|
+
render: () => JSX.Element;
|
21
|
+
name: string;
|
22
|
+
};
|
23
|
+
//# sourceMappingURL=Dropdown.stories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Dropdown.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Dropdown/Dropdown.stories.tsx"],"names":[],"mappings":";AAIA,wBAGS;AAET,eAAO,MAAM,OAAO;;;CAQnB,CAAA;AAED,eAAO,MAAM,UAAU;;;CAQtB,CAAA;AAED,eAAO,MAAM,WAAW;;;CAQvB,CAAA;AAED,eAAO,MAAM,IAAI;;;CAQhB,CAAA;AAED,eAAO,MAAM,WAAW;;;CAQvB,CAAA"}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import Dropdown from '.';
|
2
|
+
import IconEye from '../../icons/General/IconEye';
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
4
|
+
export default {
|
5
|
+
title: 'Core/Dropdown',
|
6
|
+
component: Dropdown
|
7
|
+
};
|
8
|
+
export const Default = {
|
9
|
+
render: () => /*#__PURE__*/_jsx(Dropdown, {
|
10
|
+
children: /*#__PURE__*/_jsx("p", {
|
11
|
+
children: "Stuff"
|
12
|
+
})
|
13
|
+
}),
|
14
|
+
name: 'Default'
|
15
|
+
};
|
16
|
+
export const Background = {
|
17
|
+
render: () => /*#__PURE__*/_jsx(Dropdown, {
|
18
|
+
background: "transparent",
|
19
|
+
children: /*#__PURE__*/_jsx("p", {
|
20
|
+
children: "Stuff"
|
21
|
+
})
|
22
|
+
}),
|
23
|
+
name: 'Background'
|
24
|
+
};
|
25
|
+
export const CustomLabel = {
|
26
|
+
render: () => /*#__PURE__*/_jsx(Dropdown, {
|
27
|
+
label: "Label",
|
28
|
+
children: /*#__PURE__*/_jsx("p", {
|
29
|
+
children: "Stuff"
|
30
|
+
})
|
31
|
+
}),
|
32
|
+
name: 'Custom label'
|
33
|
+
};
|
34
|
+
export const Icon = {
|
35
|
+
render: () => /*#__PURE__*/_jsx(Dropdown, {
|
36
|
+
icon: /*#__PURE__*/_jsx(IconEye, {}),
|
37
|
+
label: "Dropdown icon",
|
38
|
+
children: /*#__PURE__*/_jsx("p", {
|
39
|
+
children: "Hello"
|
40
|
+
})
|
41
|
+
}),
|
42
|
+
name: 'Icon'
|
43
|
+
};
|
44
|
+
export const WithTimeout = {
|
45
|
+
render: () => /*#__PURE__*/_jsx(Dropdown, {
|
46
|
+
label: "Click outside timeout",
|
47
|
+
clickOutsideTimeout: 1000,
|
48
|
+
children: /*#__PURE__*/_jsx("p", {
|
49
|
+
children: "Adds timeout before close on click outside of dropdown"
|
50
|
+
})
|
51
|
+
}),
|
52
|
+
name: 'With timeout'
|
53
|
+
};
|
@@ -6,7 +6,6 @@ import IconCaretDown from '../../icons/General/IconCaretDown';
|
|
6
6
|
import { styles } from './styles';
|
7
7
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
8
8
|
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
9
|
-
|
10
9
|
const Dropdown = ({
|
11
10
|
label,
|
12
11
|
icon,
|
@@ -22,20 +21,16 @@ const Dropdown = ({
|
|
22
21
|
const ref = /*#__PURE__*/createRef();
|
23
22
|
const [open, toggleOpen] = useState(false);
|
24
23
|
const theme = useTheme();
|
25
|
-
|
26
24
|
const onClick = function () {
|
27
25
|
toggleOpen(!open);
|
28
26
|
};
|
29
|
-
|
30
27
|
useEffect(() => {
|
31
28
|
const handleClickOutside = e => {
|
32
29
|
// TODO type
|
33
30
|
const node = ref.current;
|
34
|
-
|
35
31
|
if (node && node.contains(e.target)) {
|
36
32
|
return;
|
37
33
|
}
|
38
|
-
|
39
34
|
if (clickOutsideTimeout !== undefined) {
|
40
35
|
setTimeout(() => {
|
41
36
|
toggleOpen(false);
|
@@ -44,13 +39,11 @@ const Dropdown = ({
|
|
44
39
|
toggleOpen(false);
|
45
40
|
}
|
46
41
|
};
|
47
|
-
|
48
42
|
if (open) {
|
49
43
|
document.addEventListener('mousedown', handleClickOutside);
|
50
44
|
} else {
|
51
45
|
document.removeEventListener('mousedown', handleClickOutside);
|
52
46
|
}
|
53
|
-
|
54
47
|
return () => {
|
55
48
|
document.removeEventListener('mousedown', handleClickOutside);
|
56
49
|
};
|
@@ -82,5 +75,4 @@ const Dropdown = ({
|
|
82
75
|
})]
|
83
76
|
});
|
84
77
|
};
|
85
|
-
|
86
78
|
export default Dropdown;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { IAppTheme } from '../../app-shell/theme';
|
2
2
|
declare const styles: {
|
3
|
-
default: (theme: IAppTheme) => import("@emotion/
|
4
|
-
icon: (theme: IAppTheme) => import("@emotion/
|
5
|
-
background: (bg: string) => import("@emotion/
|
3
|
+
default: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
|
4
|
+
icon: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
|
5
|
+
background: (bg: string) => import("@emotion/utils").SerializedStyles;
|
6
6
|
};
|
7
7
|
export default styles;
|
8
8
|
export { styles };
|
@@ -0,0 +1,15 @@
|
|
1
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
2
|
+
export default _default;
|
3
|
+
export declare const Default: {
|
4
|
+
render: () => JSX.Element;
|
5
|
+
name: string;
|
6
|
+
};
|
7
|
+
export declare const WithCounterProp: {
|
8
|
+
render: () => JSX.Element;
|
9
|
+
name: string;
|
10
|
+
};
|
11
|
+
export declare const WithClassname: {
|
12
|
+
render: () => JSX.Element;
|
13
|
+
name: string;
|
14
|
+
};
|
15
|
+
//# sourceMappingURL=DropdownMenu.stories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DropdownMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/DropdownMenu/DropdownMenu.stories.tsx"],"names":[],"mappings":";AAKA,wBAGS;AAET,eAAO,MAAM,OAAO;;;CAanB,CAAA;AAED,eAAO,MAAM,eAAe;;;CAgB3B,CAAA;AAED,eAAO,MAAM,aAAa;;;CAUzB,CAAA"}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import DropdownMenu from '.';
|
2
|
+
import DropdownMenuOption from './DropdownMenuOption';
|
3
|
+
import IconMail from '../../icons/General/IconMail';
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
6
|
+
export default {
|
7
|
+
title: 'Core/DropdownMenu',
|
8
|
+
component: DropdownMenu
|
9
|
+
};
|
10
|
+
export const Default = {
|
11
|
+
render: () => /*#__PURE__*/_jsxs(DropdownMenu, {
|
12
|
+
icon: /*#__PURE__*/_jsx(IconMail, {}),
|
13
|
+
children: [/*#__PURE__*/_jsx(DropdownMenuOption, {
|
14
|
+
onClick: () => console.log('Option 1 clicked'),
|
15
|
+
children: "Option 1"
|
16
|
+
}), /*#__PURE__*/_jsx(DropdownMenuOption, {
|
17
|
+
onClick: () => console.log('Option 2 clicked'),
|
18
|
+
children: "Option 2"
|
19
|
+
})]
|
20
|
+
}),
|
21
|
+
name: 'Default'
|
22
|
+
};
|
23
|
+
export const WithCounterProp = {
|
24
|
+
render: () => /*#__PURE__*/_jsxs(DropdownMenu, {
|
25
|
+
icon: /*#__PURE__*/_jsx(IconMail, {}),
|
26
|
+
children: [/*#__PURE__*/_jsx(DropdownMenuOption, {
|
27
|
+
onClick: () => console.log('Option 1 clicked'),
|
28
|
+
counter: 3,
|
29
|
+
children: "With counter"
|
30
|
+
}), /*#__PURE__*/_jsx(DropdownMenuOption, {
|
31
|
+
onClick: () => console.log('Option 2 clicked'),
|
32
|
+
children: "Option 2"
|
33
|
+
})]
|
34
|
+
}),
|
35
|
+
name: 'With counter prop'
|
36
|
+
};
|
37
|
+
export const WithClassname = {
|
38
|
+
render: () => /*#__PURE__*/_jsx(DropdownMenu, {
|
39
|
+
icon: /*#__PURE__*/_jsx(IconMail, {}),
|
40
|
+
className: "my-class",
|
41
|
+
children: /*#__PURE__*/_jsx(DropdownMenuOption, {
|
42
|
+
onClick: () => console.log('Option 1 clicked'),
|
43
|
+
children: "This menu has a classname"
|
44
|
+
})
|
45
|
+
}),
|
46
|
+
name: 'With classname'
|
47
|
+
};
|
@@ -3,7 +3,6 @@ import React from 'react';
|
|
3
3
|
import { dropdownMenuOption } from './styles';
|
4
4
|
import Link from '../Link';
|
5
5
|
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
6
|
-
|
7
6
|
const DropdownMenuOption = ({
|
8
7
|
counter,
|
9
8
|
onClick,
|
@@ -19,5 +18,4 @@ const DropdownMenuOption = ({
|
|
19
18
|
children: [children ? children : '', counter ? ` (${counter})` : '']
|
20
19
|
});
|
21
20
|
};
|
22
|
-
|
23
21
|
export default DropdownMenuOption;
|
@@ -3,7 +3,6 @@ import { Wrapper, Content } from './styles';
|
|
3
3
|
import Button from '../Button';
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
5
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
6
|
-
|
7
6
|
const DropdownMenu = ({
|
8
7
|
icon,
|
9
8
|
className,
|
@@ -16,13 +15,11 @@ const DropdownMenu = ({
|
|
16
15
|
setOpen(false);
|
17
16
|
}, 200);
|
18
17
|
};
|
19
|
-
|
20
18
|
if (open) {
|
21
19
|
document.addEventListener('mousedown', handleClickOutside);
|
22
20
|
} else {
|
23
21
|
document.removeEventListener('mousedown', handleClickOutside);
|
24
22
|
}
|
25
|
-
|
26
23
|
return () => {
|
27
24
|
document.removeEventListener('mousedown', handleClickOutside);
|
28
25
|
};
|
@@ -41,5 +38,4 @@ const DropdownMenu = ({
|
|
41
38
|
})]
|
42
39
|
});
|
43
40
|
};
|
44
|
-
|
45
41
|
export default DropdownMenu;
|
@@ -8,5 +8,5 @@ export declare const Content: import("@emotion/styled").StyledComponent<{
|
|
8
8
|
theme?: import("@emotion/react").Theme | undefined;
|
9
9
|
as?: import("react").ElementType<any> | undefined;
|
10
10
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
11
|
-
export declare const dropdownMenuOption: (theme: IAppTheme) => import("@emotion/
|
11
|
+
export declare const dropdownMenuOption: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
|
12
12
|
//# sourceMappingURL=styles.d.ts.map
|
@@ -1,9 +1,7 @@
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
2
|
-
|
3
2
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
4
|
-
|
5
3
|
import { css } from '@emotion/react';
|
6
|
-
export const Wrapper = _styled("div", process.env.NODE_ENV === "production" ? {
|
4
|
+
export const Wrapper = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
7
5
|
target: "e3ttgez1"
|
8
6
|
} : {
|
9
7
|
target: "e3ttgez1",
|
@@ -17,7 +15,7 @@ export const Wrapper = _styled("div", process.env.NODE_ENV === "production" ? {
|
|
17
15
|
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWNrYWdlcy9jb3JlL0Ryb3Bkb3duTWVudS9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSWlDIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9wYWNrYWdlcy9jb3JlL0Ryb3Bkb3duTWVudS9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgSUFwcFRoZW1lIH0gZnJvbSAnLi4vLi4vYXBwLXNoZWxsL3RoZW1lJ1xuXG5leHBvcnQgY29uc3QgV3JhcHBlciA9IHN0eWxlZC5kaXZgXG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LWRpcmVjdGlvbjogcm93O1xuXG4gICYgPiBzdmcge1xuICAgIG1hcmdpbi1sZWZ0OiAwLjVlbTtcbiAgfVxuYFxuXG5leHBvcnQgY29uc3QgQ29udGVudCA9IHN0eWxlZC5kaXZgXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7XG4gIHJpZ2h0OiAwO1xuICB0b3A6IDMwcHg7XG5cbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgbWluLXdpZHRoOiAyMzBweDtcbiAgYm9yZGVyOiAxcHggc29saWQgI2NmZDllYTtcblxuICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmZmZmO1xuICBib3gtc2hhZG93OiAwIDEwcHggMTVweCAwIHJnYmEoMCwgMCwgMCwgMC4xKTtcbiAgYm9yZGVyLXJhZGl1czogMTBweDtcbiAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgei1pbmRleDogMTAwMTtcbmBcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duTWVudU9wdGlvbiA9ICh0aGVtZTogSUFwcFRoZW1lKSA9PiBjc3NgXG4gIHdpZHRoOiAxMDAlO1xuICBoZWlnaHQ6IDUycHg7XG5cbiAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7XG4gIGJvcmRlci1yYWRpdXM6IDA7XG5cbiAgZm9udC13ZWlnaHQ6IDUwMDtcbiAgYm9yZGVyLXRvcDogMXB4IHNvbGlkICR7dGhlbWUuYm9yZGVyfTtcbiAgY3Vyc29yOiBwb2ludGVyO1xuICBmb250LXdlaWdodDogNjAwO1xuXG4gICY6aG92ZXIge1xuICAgIGJhY2tncm91bmQ6ICR7dGhlbWUuYmd9O1xuICB9XG5cbiAgJjpudGgtb2YtdHlwZSgxKSB7XG4gICAgYm9yZGVyLXRvcDogbm9uZTtcbiAgfVxuYFxuIl19 */",
|
18
16
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
19
17
|
});
|
20
|
-
export const Content = _styled("div", process.env.NODE_ENV === "production" ? {
|
18
|
+
export const Content = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
21
19
|
target: "e3ttgez0"
|
22
20
|
} : {
|
23
21
|
target: "e3ttgez0",
|
@@ -0,0 +1,23 @@
|
|
1
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
2
|
+
export default _default;
|
3
|
+
export declare const Default: {
|
4
|
+
render: () => JSX.Element;
|
5
|
+
name: string;
|
6
|
+
};
|
7
|
+
export declare const Rich: {
|
8
|
+
render: () => JSX.Element;
|
9
|
+
name: string;
|
10
|
+
};
|
11
|
+
export declare const ValidElements: {
|
12
|
+
render: () => JSX.Element;
|
13
|
+
name: string;
|
14
|
+
};
|
15
|
+
export declare const InvalidElements: {
|
16
|
+
render: () => JSX.Element;
|
17
|
+
name: string;
|
18
|
+
};
|
19
|
+
export declare const AllProps: {
|
20
|
+
render: () => JSX.Element;
|
21
|
+
name: string;
|
22
|
+
};
|
23
|
+
//# sourceMappingURL=Editor.stories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Editor.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Editor/Editor.stories.tsx"],"names":[],"mappings":";AAGA,wBAGS;AAET,eAAO,MAAM,OAAO;;;CAKnB,CAAA;AAED,eAAO,MAAM,IAAI;;;CAWhB,CAAA;AAED,eAAO,MAAM,aAAa;;;CAWzB,CAAA;AAED,eAAO,MAAM,eAAe;;;CAU3B,CAAA;AAED,eAAO,MAAM,QAAQ;;;CAmBpB,CAAA"}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import Editor from '.';
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
3
|
+
export default {
|
4
|
+
title: 'Core/Editor',
|
5
|
+
component: Editor
|
6
|
+
};
|
7
|
+
export const Default = {
|
8
|
+
render: () => /*#__PURE__*/_jsx(Editor, {
|
9
|
+
onChange: e => console.log(e),
|
10
|
+
label: "Editor-label"
|
11
|
+
}),
|
12
|
+
name: 'Default'
|
13
|
+
};
|
14
|
+
export const Rich = {
|
15
|
+
render: () => /*#__PURE__*/_jsx(Editor, {
|
16
|
+
onChange: e => console.log(e),
|
17
|
+
label: "Editor-label",
|
18
|
+
type: "rich",
|
19
|
+
allowImages: true
|
20
|
+
}),
|
21
|
+
name: 'Rich'
|
22
|
+
};
|
23
|
+
export const ValidElements = {
|
24
|
+
render: () => /*#__PURE__*/_jsx(Editor, {
|
25
|
+
onChange: e => console.log(e),
|
26
|
+
validElements: "strong,p,span,em",
|
27
|
+
type: "custom",
|
28
|
+
customToolbar: "bold italic underline"
|
29
|
+
}),
|
30
|
+
name: 'Valid elements'
|
31
|
+
};
|
32
|
+
export const InvalidElements = {
|
33
|
+
render: () => /*#__PURE__*/_jsx(Editor, {
|
34
|
+
onChange: e => console.log(e),
|
35
|
+
pasteAsText: false,
|
36
|
+
invalidElements: "button,a,h1,h2,h3,h4,h5,h6"
|
37
|
+
}),
|
38
|
+
name: 'Invalid elements'
|
39
|
+
};
|
40
|
+
export const AllProps = {
|
41
|
+
render: () => /*#__PURE__*/_jsx(Editor, {
|
42
|
+
label: "Label",
|
43
|
+
type: "rich",
|
44
|
+
initialValue: '<p><img src="https://i.ytimg.com/vi/CZFKWt3S2Ys/maxresdefault.jpg" alt="testimage" width="444" height="250" /></p><br/><p>"wow" - Owen Wilson</p>',
|
45
|
+
allowImages: true,
|
46
|
+
invalidElements: "",
|
47
|
+
invalidMessage: "Memes are not allowed",
|
48
|
+
height: 400,
|
49
|
+
maxHeight: 600,
|
50
|
+
onChange: (e, length) => console.log(e, length),
|
51
|
+
onBlur: () => console.log('blur')
|
52
|
+
}),
|
53
|
+
name: 'Props'
|
54
|
+
};
|
package/lib/core/Editor/index.js
CHANGED
@@ -12,7 +12,6 @@ import { useEffect } from 'react';
|
|
12
12
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
13
13
|
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
14
14
|
const TINYMCE_API_KEY = 'v1hbb9qthd0z2fr0keceoglnwbzhyjqwsj4q7n193ovikt8s';
|
15
|
-
|
16
15
|
const Editor = ({
|
17
16
|
initialValue,
|
18
17
|
overrideValue,
|
@@ -38,20 +37,18 @@ const Editor = ({
|
|
38
37
|
alert
|
39
38
|
} = useTheme();
|
40
39
|
const isMobile = useIsMobile();
|
41
|
-
|
42
40
|
const handleChange = (html, editor) => {
|
43
41
|
setValue(html);
|
44
42
|
onChange(html, editor.getContent({
|
45
43
|
format: 'text'
|
46
44
|
}).length);
|
47
45
|
};
|
48
|
-
|
49
46
|
const handleBlur = () => onBlur?.(value);
|
50
|
-
|
51
47
|
const toolbar = type === 'basic' ? basicToolbar : type === 'rich' ? richToolbar : customToolbar;
|
52
48
|
useEffect(() => {
|
53
49
|
if (overrideValue === undefined) return;
|
54
|
-
setValue(() => overrideValue);
|
50
|
+
setValue(() => overrideValue);
|
51
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
55
52
|
}, [overrideValue]);
|
56
53
|
return _jsxs("div", {
|
57
54
|
css: theme => [styles.default(theme), !loaded && styles.hideEditor],
|
@@ -111,5 +108,4 @@ const Editor = ({
|
|
111
108
|
})]
|
112
109
|
});
|
113
110
|
};
|
114
|
-
|
115
111
|
export default Editor;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { IAppTheme } from '../../app-shell/theme';
|
3
3
|
export declare const styles: {
|
4
|
-
default: (theme: IAppTheme) => import("@emotion/
|
5
|
-
hideEditor: import("@emotion/
|
4
|
+
default: (theme: IAppTheme) => import("@emotion/utils").SerializedStyles;
|
5
|
+
hideEditor: import("@emotion/utils").SerializedStyles;
|
6
6
|
};
|
7
7
|
export declare const Label: import("@emotion/styled").StyledComponent<{
|
8
8
|
theme?: import("@emotion/react").Theme | undefined;
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
2
|
-
|
3
2
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
4
|
-
|
5
3
|
import { css } from '@emotion/react';
|
6
4
|
export const styles = {
|
7
5
|
default: theme => /*#__PURE__*/css("display:flex;flex-direction:column;gap:4px;.tox-tinymce{border:1px solid ", theme.border, ";border-radius:3px;}.tox-toolbar__group{border-color:", theme.border, "!important;}.tox-toolbar__primary{background:none!important;border-bottom:1px solid ", theme.border, ";}.tox-statusbar{border-top:none!important;}.editor-wrapper{display:grid;.tox-toolbar--scrolling,.tox-edit-area{&::-webkit-scrollbar{width:2px;height:2px;}}}" + (process.env.NODE_ENV === "production" ? "" : ";label:default;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWNrYWdlcy9jb3JlL0VkaXRvci9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS29DIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9wYWNrYWdlcy9jb3JlL0VkaXRvci9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuaW1wb3J0IHsgSUFwcFRoZW1lIH0gZnJvbSAnLi4vLi4vYXBwLXNoZWxsL3RoZW1lJ1xuXG5leHBvcnQgY29uc3Qgc3R5bGVzID0ge1xuICBkZWZhdWx0OiAodGhlbWU6IElBcHBUaGVtZSkgPT4gY3NzYFxuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgICBnYXA6IDRweDtcblxuICAgIC50b3gtdGlueW1jZSB7XG4gICAgICBib3JkZXI6IDFweCBzb2xpZCAke3RoZW1lLmJvcmRlcn07XG4gICAgICBib3JkZXItcmFkaXVzOiAzcHg7XG4gICAgfVxuICAgIC50b3gtdG9vbGJhcl9fZ3JvdXAge1xuICAgICAgYm9yZGVyLWNvbG9yOiAke3RoZW1lLmJvcmRlcn0gIWltcG9ydGFudDtcbiAgICB9XG4gICAgLnRveC10b29sYmFyX19wcmltYXJ5IHtcbiAgICAgIGJhY2tncm91bmQ6IG5vbmUgIWltcG9ydGFudDtcbiAgICAgIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAke3RoZW1lLmJvcmRlcn07XG4gICAgfVxuICAgIC50b3gtc3RhdHVzYmFyIHtcbiAgICAgIGJvcmRlci10b3A6IG5vbmUgIWltcG9ydGFudDtcbiAgICB9XG4gICAgLmVkaXRvci13cmFwcGVyIHtcbiAgICAgIGRpc3BsYXk6IGdyaWQ7XG5cbiAgICAgIC50b3gtdG9vbGJhci0tc2Nyb2xsaW5nLFxuICAgICAgLnRveC1lZGl0LWFyZWEge1xuICAgICAgICAmOjotd2Via2l0LXNjcm9sbGJhciB7XG4gICAgICAgICAgd2lkdGg6IDJweDtcbiAgICAgICAgICBoZWlnaHQ6IDJweDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgYCxcbiAgaGlkZUVkaXRvcjogY3NzYFxuICAgIC5lZGl0b3Itd3JhcHBlciB7XG4gICAgICBkaXNwbGF5OiBub25lO1xuICAgIH1cbiAgYCxcbn1cblxuZXhwb3J0IGNvbnN0IExhYmVsID0gc3R5bGVkLnNwYW5gXG4gIGxpbmUtaGVpZ2h0OiAyMnB4O1xuICBmb250LXNpemU6IDFlbTtcbiAgZm9udC13ZWlnaHQ6IDYwMDtcbiAgbWFyZ2luLWJvdHRvbTogNHB4O1xuYFxuXG5leHBvcnQgY29uc3QgRXJyb3JXcmFwcGVyID0gc3R5bGVkLmRpdmBcbiAgZGlzcGxheTogZ3JpZDtcblxuICAmID4gc3BhbiB7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgIGdhcDogNnB4O1xuICAgIG1hcmdpbi1sZWZ0OiAycHg7XG4gIH1cbmBcbiJdfQ== */"),
|
@@ -15,7 +13,7 @@ export const styles = {
|
|
15
13
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
16
14
|
}
|
17
15
|
};
|
18
|
-
export const Label = _styled("span", process.env.NODE_ENV === "production" ? {
|
16
|
+
export const Label = /*#__PURE__*/_styled("span", process.env.NODE_ENV === "production" ? {
|
19
17
|
target: "e1b0idrw1"
|
20
18
|
} : {
|
21
19
|
target: "e1b0idrw1",
|
@@ -29,7 +27,7 @@ export const Label = _styled("span", process.env.NODE_ENV === "production" ? {
|
|
29
27
|
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9wYWNrYWdlcy9jb3JlL0VkaXRvci9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMkNnQyIsImZpbGUiOiIuLi8uLi8uLi9zcmMvcGFja2FnZXMvY29yZS9FZGl0b3Ivc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IElBcHBUaGVtZSB9IGZyb20gJy4uLy4uL2FwcC1zaGVsbC90aGVtZSdcblxuZXhwb3J0IGNvbnN0IHN0eWxlcyA9IHtcbiAgZGVmYXVsdDogKHRoZW1lOiBJQXBwVGhlbWUpID0+IGNzc2BcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gICAgZ2FwOiA0cHg7XG5cbiAgICAudG94LXRpbnltY2Uge1xuICAgICAgYm9yZGVyOiAxcHggc29saWQgJHt0aGVtZS5ib3JkZXJ9O1xuICAgICAgYm9yZGVyLXJhZGl1czogM3B4O1xuICAgIH1cbiAgICAudG94LXRvb2xiYXJfX2dyb3VwIHtcbiAgICAgIGJvcmRlci1jb2xvcjogJHt0aGVtZS5ib3JkZXJ9ICFpbXBvcnRhbnQ7XG4gICAgfVxuICAgIC50b3gtdG9vbGJhcl9fcHJpbWFyeSB7XG4gICAgICBiYWNrZ3JvdW5kOiBub25lICFpbXBvcnRhbnQ7XG4gICAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgJHt0aGVtZS5ib3JkZXJ9O1xuICAgIH1cbiAgICAudG94LXN0YXR1c2JhciB7XG4gICAgICBib3JkZXItdG9wOiBub25lICFpbXBvcnRhbnQ7XG4gICAgfVxuICAgIC5lZGl0b3Itd3JhcHBlciB7XG4gICAgICBkaXNwbGF5OiBncmlkO1xuXG4gICAgICAudG94LXRvb2xiYXItLXNjcm9sbGluZyxcbiAgICAgIC50b3gtZWRpdC1hcmVhIHtcbiAgICAgICAgJjo6LXdlYmtpdC1zY3JvbGxiYXIge1xuICAgICAgICAgIHdpZHRoOiAycHg7XG4gICAgICAgICAgaGVpZ2h0OiAycHg7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIGAsXG4gIGhpZGVFZGl0b3I6IGNzc2BcbiAgICAuZWRpdG9yLXdyYXBwZXIge1xuICAgICAgZGlzcGxheTogbm9uZTtcbiAgICB9XG4gIGAsXG59XG5cbmV4cG9ydCBjb25zdCBMYWJlbCA9IHN0eWxlZC5zcGFuYFxuICBsaW5lLWhlaWdodDogMjJweDtcbiAgZm9udC1zaXplOiAxZW07XG4gIGZvbnQtd2VpZ2h0OiA2MDA7XG4gIG1hcmdpbi1ib3R0b206IDRweDtcbmBcblxuZXhwb3J0IGNvbnN0IEVycm9yV3JhcHBlciA9IHN0eWxlZC5kaXZgXG4gIGRpc3BsYXk6IGdyaWQ7XG5cbiAgJiA+IHNwYW4ge1xuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICBnYXA6IDZweDtcbiAgICBtYXJnaW4tbGVmdDogMnB4O1xuICB9XG5gXG4iXX0= */",
|
30
28
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
31
29
|
});
|
32
|
-
export const ErrorWrapper = _styled("div", process.env.NODE_ENV === "production" ? {
|
30
|
+
export const ErrorWrapper = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
33
31
|
target: "e1b0idrw0"
|
34
32
|
} : {
|
35
33
|
target: "e1b0idrw0",
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import FileInput from '.';
|
2
|
+
import { Meta, StoryObj } from '@storybook/react';
|
3
|
+
declare const meta: Meta<typeof FileInput>;
|
4
|
+
export default meta;
|
5
|
+
declare type Story = StoryObj<typeof FileInput>;
|
6
|
+
export declare const Default: Story;
|
7
|
+
export declare const Multiple: Story;
|
8
|
+
export declare const WithError: Story;
|
9
|
+
export declare const FilePdf: Story;
|
10
|
+
export declare const HideFileList: Story;
|
11
|
+
export declare const InitialFile: Story;
|
12
|
+
export declare const Maxsize: Story;
|
13
|
+
export declare const NoStyle: Story;
|
14
|
+
export declare const RotateIcon: Story;
|
15
|
+
//# sourceMappingURL=FileInput.stories.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FileInput.stories.d.ts","sourceRoot":"","sources":["../../../src/packages/core/FileInput/FileInput.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,GAAG,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAGxB,CAAA;AAET,eAAe,IAAI,CAAA;AAEnB,aAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAA;AAOvC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAA"}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import FileInput from '.';
|
2
|
+
const meta = {
|
3
|
+
title: 'Core/FileInput',
|
4
|
+
component: FileInput
|
5
|
+
};
|
6
|
+
export default meta;
|
7
|
+
const initialFile = new File([''], 'attachment.pdf', {
|
8
|
+
type: 'application/pdf',
|
9
|
+
lastModified: new Date().getTime()
|
10
|
+
});
|
11
|
+
export const Default = {
|
12
|
+
name: 'Default',
|
13
|
+
args: {
|
14
|
+
onChange: e => console.log('CB', e)
|
15
|
+
}
|
16
|
+
};
|
17
|
+
export const Multiple = {
|
18
|
+
name: 'Multiple',
|
19
|
+
args: {
|
20
|
+
onChange: e => console.log('CB', e),
|
21
|
+
multiple: true
|
22
|
+
}
|
23
|
+
};
|
24
|
+
export const WithError = {
|
25
|
+
name: 'With error',
|
26
|
+
args: {
|
27
|
+
onChange: e => console.log('CB', e),
|
28
|
+
invalidMessage: 'This is an uninformative error',
|
29
|
+
label: 'Should contain error'
|
30
|
+
}
|
31
|
+
};
|
32
|
+
export const FilePdf = {
|
33
|
+
name: 'File pdf',
|
34
|
+
args: {
|
35
|
+
onChange: e => console.log('CB', e),
|
36
|
+
accept: '.pdf',
|
37
|
+
text: 'Last opp PDF'
|
38
|
+
}
|
39
|
+
};
|
40
|
+
export const HideFileList = {
|
41
|
+
name: 'Hide file list',
|
42
|
+
args: {
|
43
|
+
hideFileList: true,
|
44
|
+
onChange: e => console.log('CB', e)
|
45
|
+
}
|
46
|
+
};
|
47
|
+
export const InitialFile = {
|
48
|
+
name: 'Initial file',
|
49
|
+
args: {
|
50
|
+
onChange: e => console.log('CB', e),
|
51
|
+
initialFiles: [initialFile]
|
52
|
+
}
|
53
|
+
};
|
54
|
+
export const Maxsize = {
|
55
|
+
name: 'Maxsize',
|
56
|
+
args: {
|
57
|
+
multiple: true,
|
58
|
+
fileMaxsixe: 512000,
|
59
|
+
onChange: e => console.log('CB', e)
|
60
|
+
}
|
61
|
+
};
|
62
|
+
export const NoStyle = {
|
63
|
+
name: 'No style',
|
64
|
+
args: {
|
65
|
+
nostyle: true,
|
66
|
+
hideFileList: true,
|
67
|
+
multiple: true,
|
68
|
+
onChange: e => console.log('CB', e)
|
69
|
+
}
|
70
|
+
};
|
71
|
+
export const RotateIcon = {
|
72
|
+
name: 'Rotate icon',
|
73
|
+
args: {
|
74
|
+
rotateIcon: true,
|
75
|
+
onChange: e => console.log('CB', e)
|
76
|
+
}
|
77
|
+
};
|
@@ -7,7 +7,6 @@ import Alert from '../Alert';
|
|
7
7
|
import { formatBytes, isAllFilesValid } from '../../utils/file';
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
10
|
-
|
11
10
|
const FileInput = ({
|
12
11
|
multiple,
|
13
12
|
accept,
|
@@ -25,31 +24,25 @@ const FileInput = ({
|
|
25
24
|
const [sizeError, setSizeError] = useState(false);
|
26
25
|
const theme = useTheme();
|
27
26
|
const hiddenFileInput = useRef(null);
|
28
|
-
|
29
27
|
const handleClick = () => {
|
30
28
|
const node = hiddenFileInput.current;
|
31
29
|
node.click();
|
32
30
|
};
|
33
|
-
|
34
31
|
const handleChange = e => {
|
35
32
|
if (!e.target.files[0]) return;
|
36
33
|
let filesFromEvent = [...Array.from(e.target.files)];
|
37
34
|
let valid = true;
|
38
35
|
if (fileMaxsixe) valid = isAllFilesValid(filesFromEvent, fileMaxsixe);
|
39
|
-
|
40
36
|
if (!valid && fileMaxsixe) {
|
41
37
|
filesFromEvent = filesFromEvent.filter(x => x.size <= fileMaxsixe); // Filter out invalid files
|
42
|
-
|
43
38
|
setSizeError(true);
|
44
39
|
}
|
45
|
-
|
46
40
|
if (!multiple) {
|
47
41
|
setFiles([filesFromEvent[0]]);
|
48
42
|
onChange(filesFromEvent[0]);
|
49
43
|
e.target.value = null;
|
50
44
|
return;
|
51
45
|
}
|
52
|
-
|
53
46
|
let newFiles = [...files];
|
54
47
|
filesFromEvent.forEach(file => {
|
55
48
|
newFiles.push(file);
|
@@ -57,23 +50,21 @@ const FileInput = ({
|
|
57
50
|
setFiles(newFiles);
|
58
51
|
onChange(newFiles);
|
59
52
|
};
|
60
|
-
|
61
53
|
const handleDelete = index => {
|
62
54
|
if (!multiple) {
|
63
55
|
setFiles([]);
|
64
56
|
onChange(null);
|
65
57
|
return;
|
66
58
|
}
|
67
|
-
|
68
59
|
const arr = [...files];
|
69
60
|
arr.splice(index, 1);
|
70
61
|
setFiles(arr);
|
71
|
-
onChange(arr);
|
62
|
+
onChange(arr);
|
72
63
|
|
64
|
+
// resets value of input to trigger on change if user removes and readds same file
|
73
65
|
const node = hiddenFileInput.current;
|
74
66
|
if (node) node.value = null;
|
75
67
|
};
|
76
|
-
|
77
68
|
return /*#__PURE__*/_jsxs(Wrapper, {
|
78
69
|
children: [label && /*#__PURE__*/_jsx(Label, {
|
79
70
|
children: label
|
@@ -123,5 +114,4 @@ const FileInput = ({
|
|
123
114
|
})]
|
124
115
|
});
|
125
116
|
};
|
126
|
-
|
127
117
|
export default FileInput;
|