@spaced-out/ui-design-system 0.4.13-beta.0 → 0.4.13-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cspell/custom-words.txt +2 -0
- package/CHANGELOG.md +7 -0
- package/cspell.json +3 -1
- package/gulpfile.js +2 -1
- package/lib/styles/index.js +535 -275
- package/package.json +2 -2
- package/lib/components/AIPromptFlow/AIPromptFlow.stories.tsx +0 -465
- package/lib/components/Accordion/Accordion.stories.tsx +0 -165
- package/lib/components/Accordion/Accordion.tsx +0 -112
- package/lib/components/Accordion/AccordionGroup.stories.tsx +0 -215
- package/lib/components/Accordion/AccordionGroup.tsx +0 -77
- package/lib/components/Accordion/index.ts +0 -2
- package/lib/components/Avatar/Avatar.stories.tsx +0 -152
- package/lib/components/Avatar/Avatar.tsx +0 -272
- package/lib/components/Avatar/index.ts +0 -1
- package/lib/components/AvatarGroup/AvatarGroup.stories.tsx +0 -138
- package/lib/components/AvatarGroup/AvatarGroup.tsx +0 -164
- package/lib/components/AvatarGroup/index.ts +0 -1
- package/lib/components/Badge/Badge.stories.tsx +0 -131
- package/lib/components/Badge/Badge.tsx +0 -149
- package/lib/components/Badge/index.ts +0 -1
- package/lib/components/BadgedIcon/BadgedIcon.stories.tsx +0 -80
- package/lib/components/BadgedIcon/BadgedIcon.tsx +0 -76
- package/lib/components/BadgedIcon/index.ts +0 -1
- package/lib/components/Banner/Banner.stories.tsx +0 -187
- package/lib/components/Banner/Banner.tsx +0 -55
- package/lib/components/Banner/index.ts +0 -1
- package/lib/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.stories.tsx +0 -114
- package/lib/components/Breadcrumbs/BreadcrumbLink/BreadcrumbLink.tsx +0 -52
- package/lib/components/Breadcrumbs/BreadcrumbLink/index.ts +0 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -189
- package/lib/components/Breadcrumbs/Breadcrumbs.tsx +0 -59
- package/lib/components/Breadcrumbs/index.ts +0 -2
- package/lib/components/Button/Button.stories.tsx +0 -220
- package/lib/components/Button/Button.tsx +0 -285
- package/lib/components/Button/index.ts +0 -8
- package/lib/components/ButtonDropdown/ButtonDropdown.stories.tsx +0 -677
- package/lib/components/ButtonDropdown/ButtonDropdown.tsx +0 -221
- package/lib/components/ButtonDropdown/SimpleButtonDropdown.stories.tsx +0 -624
- package/lib/components/ButtonDropdown/SimpleButtonDropdown.tsx +0 -167
- package/lib/components/ButtonDropdown/index.ts +0 -2
- package/lib/components/ButtonTabs/ButtonTab/ButtonTab.stories.tsx +0 -125
- package/lib/components/ButtonTabs/ButtonTab/ButtonTab.tsx +0 -76
- package/lib/components/ButtonTabs/ButtonTab/index.ts +0 -1
- package/lib/components/ButtonTabs/ButtonTabDropdown.tsx +0 -147
- package/lib/components/ButtonTabs/ButtonTabs.stories.tsx +0 -393
- package/lib/components/ButtonTabs/ButtonTabs.tsx +0 -119
- package/lib/components/ButtonTabs/index.ts +0 -2
- package/lib/components/Card/Card.stories.tsx +0 -245
- package/lib/components/Card/Card.tsx +0 -172
- package/lib/components/Card/index.ts +0 -1
- package/lib/components/Charts/ChartTooltip/index.ts +0 -13
- package/lib/components/Charts/ChartWrapper/ChartWrapper.tsx +0 -179
- package/lib/components/Charts/ChartWrapper/index.ts +0 -1
- package/lib/components/Charts/ColumnChart/ColumnChart.stories.tsx +0 -574
- package/lib/components/Charts/ColumnChart/ColumnChart.tsx +0 -125
- package/lib/components/Charts/ColumnChart/index.ts +0 -1
- package/lib/components/Charts/DonutChart/DonutChart.stories.tsx +0 -415
- package/lib/components/Charts/DonutChart/DonutChart.tsx +0 -155
- package/lib/components/Charts/DonutChart/index.ts +0 -1
- package/lib/components/Charts/FunnelChart/FunnelChart.stories.tsx +0 -510
- package/lib/components/Charts/FunnelChart/FunnelChart.tsx +0 -110
- package/lib/components/Charts/FunnelChart/index.ts +0 -1
- package/lib/components/Charts/LineChart/LineChart.stories.tsx +0 -590
- package/lib/components/Charts/LineChart/LineChart.tsx +0 -109
- package/lib/components/Charts/LineChart/index.ts +0 -1
- package/lib/components/Charts/SpiderChart/SpiderChart.stories.tsx +0 -467
- package/lib/components/Charts/SpiderChart/SpiderChart.tsx +0 -104
- package/lib/components/Charts/SpiderChart/index.ts +0 -1
- package/lib/components/Charts/index.ts +0 -11
- package/lib/components/ChatBubble/ChatAnchor.stories.tsx +0 -95
- package/lib/components/ChatBubble/ChatBubble.stories.tsx +0 -277
- package/lib/components/ChatBubble/ChatBubble.tsx +0 -232
- package/lib/components/ChatBubble/index.ts +0 -1
- package/lib/components/Checkbox/Checkbox.stories.tsx +0 -180
- package/lib/components/Checkbox/Checkbox.tsx +0 -168
- package/lib/components/Checkbox/CheckboxGroup.stories.tsx +0 -381
- package/lib/components/Checkbox/CheckboxGroup.tsx +0 -119
- package/lib/components/Checkbox/index.ts +0 -2
- package/lib/components/Chip/Chip.stories.tsx +0 -335
- package/lib/components/Chip/Chip.tsx +0 -204
- package/lib/components/Chip/index.ts +0 -2
- package/lib/components/CircularLoader/CircularLoader.stories.tsx +0 -75
- package/lib/components/CircularLoader/CircularLoader.tsx +0 -51
- package/lib/components/CircularLoader/index.ts +0 -1
- package/lib/components/CollapsibleCard/CollapsibleCard.stories.tsx +0 -311
- package/lib/components/CollapsibleCard/CollapsibleCard.tsx +0 -135
- package/lib/components/CollapsibleCard/index.ts +0 -1
- package/lib/components/Combobox/Combobox.stories.tsx +0 -306
- package/lib/components/Combobox/Combobox.tsx +0 -297
- package/lib/components/Combobox/helper.ts +0 -201
- package/lib/components/Combobox/index.ts +0 -1
- package/lib/components/ConditionalWrapper/ConditionalWrapper.stories.tsx +0 -51
- package/lib/components/ConditionalWrapper/ConditionalWrapper.ts +0 -16
- package/lib/components/ConditionalWrapper/index.ts +0 -1
- package/lib/components/DateRangePicker/Calendar.tsx +0 -110
- package/lib/components/DateRangePicker/DateRangePicker.stories.tsx +0 -397
- package/lib/components/DateRangePicker/DateRangePicker.tsx +0 -210
- package/lib/components/DateRangePicker/DateRangeWrapper.tsx +0 -386
- package/lib/components/DateRangePicker/Day.tsx +0 -74
- package/lib/components/DateRangePicker/index.ts +0 -1
- package/lib/components/Dialog/Dialog.stories.tsx +0 -254
- package/lib/components/Dialog/Dialog.tsx +0 -222
- package/lib/components/Dialog/index.ts +0 -1
- package/lib/components/Disclaimer/Disclaimer.stories.tsx +0 -148
- package/lib/components/Disclaimer/Disclaimer.tsx +0 -35
- package/lib/components/Disclaimer/index.ts +0 -1
- package/lib/components/Dropdown/Dropdown.stories.tsx +0 -785
- package/lib/components/Dropdown/Dropdown.tsx +0 -174
- package/lib/components/Dropdown/SimpleDropdown.stories.tsx +0 -534
- package/lib/components/Dropdown/SimpleDropdown.tsx +0 -167
- package/lib/components/Dropdown/index.ts +0 -2
- package/lib/components/EmptyState/EmptyImages/CalendarEmptyImage.tsx +0 -108
- package/lib/components/EmptyState/EmptyImages/ChartEmptyImage.tsx +0 -194
- package/lib/components/EmptyState/EmptyImages/DataEmptyImage.tsx +0 -116
- package/lib/components/EmptyState/EmptyImages/FileEmptyImage.tsx +0 -133
- package/lib/components/EmptyState/EmptyImages/MessageEmptyImage.tsx +0 -64
- package/lib/components/EmptyState/EmptyImages/UploadEmptyImage.tsx +0 -67
- package/lib/components/EmptyState/EmptyImages/index.ts +0 -6
- package/lib/components/EmptyState/EmptyState.stories.tsx +0 -104
- package/lib/components/EmptyState/EmptyState.tsx +0 -83
- package/lib/components/EmptyState/index.ts +0 -1
- package/lib/components/ErrorMessage/ErrorImages/ForbiddenImage.tsx +0 -85
- package/lib/components/ErrorMessage/ErrorImages/NotFoundImage.tsx +0 -117
- package/lib/components/ErrorMessage/ErrorImages/ServerErrorImage.tsx +0 -237
- package/lib/components/ErrorMessage/ErrorImages/UnauthorizedImage.tsx +0 -73
- package/lib/components/ErrorMessage/ErrorImages/index.ts +0 -4
- package/lib/components/ErrorMessage/ErrorMessage.stories.tsx +0 -112
- package/lib/components/ErrorMessage/ErrorMessage.tsx +0 -87
- package/lib/components/ErrorMessage/index.ts +0 -1
- package/lib/components/FileUpload/FileBlock/FileBlock.stories.tsx +0 -85
- package/lib/components/FileUpload/FileBlock/FileBlock.tsx +0 -136
- package/lib/components/FileUpload/FileBlock/index.ts +0 -1
- package/lib/components/FileUpload/FileUpload.stories.tsx +0 -958
- package/lib/components/FileUpload/FileUpload.tsx +0 -206
- package/lib/components/FileUpload/index.ts +0 -2
- package/lib/components/FilterButtonOverlay/FilterButtonOverlay.stories.tsx +0 -345
- package/lib/components/FilterButtonOverlay/FilterButtonOverlay.tsx +0 -163
- package/lib/components/FilterButtonOverlay/index.ts +0 -1
- package/lib/components/FocusManager/FocusManager.stories.tsx +0 -117
- package/lib/components/FocusManager/FocusManager.tsx +0 -59
- package/lib/components/FocusManager/index.ts +0 -1
- package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.stories.tsx +0 -557
- package/lib/components/FocusManagerWithArrowKeyNavigation/FocusManagerWithArrowKeyNavigation.tsx +0 -156
- package/lib/components/FocusManagerWithArrowKeyNavigation/index.ts +0 -1
- package/lib/components/FormTitleWrapper/FormTitleWrapper.stories.tsx +0 -173
- package/lib/components/FormTitleWrapper/FormTitleWrapper.tsx +0 -63
- package/lib/components/FormTitleWrapper/index.ts +0 -1
- package/lib/components/Grid/Col.stories.tsx +0 -114
- package/lib/components/Grid/Grid.tsx +0 -119
- package/lib/components/Grid/GridPatterns.stories.tsx +0 -420
- package/lib/components/Grid/Row.stories.tsx +0 -135
- package/lib/components/Grid/Tablist.layout.stories.tsx +0 -281
- package/lib/components/Grid/index.ts +0 -1
- package/lib/components/Icon/ClickableIcon.tsx +0 -104
- package/lib/components/Icon/Icon.docs.ts +0 -118
- package/lib/components/Icon/Icon.stories.tsx +0 -79
- package/lib/components/Icon/Icon.tsx +0 -78
- package/lib/components/Icon/SemanticIcon.stories.tsx +0 -74
- package/lib/components/Icon/SemanticIcon.tsx +0 -49
- package/lib/components/Icon/index.ts +0 -3
- package/lib/components/InContextAlert/InContextAlert.stories.tsx +0 -164
- package/lib/components/InContextAlert/InContextAlert.tsx +0 -204
- package/lib/components/InContextAlert/index.ts +0 -1
- package/lib/components/InfinitePagination/InfinitePagination.stories.tsx +0 -323
- package/lib/components/InfinitePagination/InfinitePagination.tsx +0 -121
- package/lib/components/InfinitePagination/index.ts +0 -1
- package/lib/components/InlineDropdown/InlineDropdown.stories.tsx +0 -415
- package/lib/components/InlineDropdown/InlineDropdown.tsx +0 -175
- package/lib/components/InlineDropdown/SimpleInlineDropdown.stories.tsx +0 -513
- package/lib/components/InlineDropdown/SimpleInlineDropdown.tsx +0 -165
- package/lib/components/InlineDropdown/index.ts +0 -2
- package/lib/components/Input/Input.stories.tsx +0 -590
- package/lib/components/Input/Input.tsx +0 -336
- package/lib/components/Input/NativeColorpicker.stories.tsx +0 -337
- package/lib/components/Input/NativeDatepicker.stories.tsx +0 -424
- package/lib/components/Input/index.ts +0 -1
- package/lib/components/KPIBox/KPIBox.stories.tsx +0 -321
- package/lib/components/KPIBox/KPIBox.tsx +0 -94
- package/lib/components/KPIBox/index.ts +0 -1
- package/lib/components/LinearLoader/LinearLoader.stories.tsx +0 -132
- package/lib/components/LinearLoader/LinearLoader.tsx +0 -48
- package/lib/components/LinearLoader/index.ts +0 -1
- package/lib/components/Link/Link.stories.tsx +0 -302
- package/lib/components/Link/Link.tsx +0 -231
- package/lib/components/Link/index.ts +0 -1
- package/lib/components/Menu/Menu.stories.tsx +0 -1046
- package/lib/components/Menu/Menu.tsx +0 -391
- package/lib/components/Menu/MenuOptionButton.tsx +0 -206
- package/lib/components/Menu/index.ts +0 -2
- package/lib/components/Modal/Modal.stories.tsx +0 -430
- package/lib/components/Modal/Modal.tsx +0 -379
- package/lib/components/Modal/index.ts +0 -8
- package/lib/components/Notification/Notification.stories.tsx +0 -132
- package/lib/components/Notification/Notification.tsx +0 -140
- package/lib/components/Notification/index.ts +0 -1
- package/lib/components/OptionButton/OptionButton.stories.tsx +0 -397
- package/lib/components/OptionButton/OptionButton.tsx +0 -149
- package/lib/components/OptionButton/SimpleOptionButton.stories.tsx +0 -525
- package/lib/components/OptionButton/SimpleOptionButton.tsx +0 -160
- package/lib/components/OptionButton/index.ts +0 -2
- package/lib/components/PageTitle/PageTitle.stories.tsx +0 -257
- package/lib/components/PageTitle/PageTitle.tsx +0 -276
- package/lib/components/PageTitle/index.ts +0 -1
- package/lib/components/Pagination/Pagination.stories.tsx +0 -259
- package/lib/components/Pagination/Pagination.tsx +0 -147
- package/lib/components/Pagination/PaginationItem.tsx +0 -118
- package/lib/components/Pagination/index.ts +0 -1
- package/lib/components/Panel/Panel.stories.tsx +0 -452
- package/lib/components/Panel/Panel.tsx +0 -181
- package/lib/components/Panel/index.ts +0 -2
- package/lib/components/ProgressDonut/ProgressDonut.stories.tsx +0 -97
- package/lib/components/ProgressDonut/ProgressDonut.tsx +0 -111
- package/lib/components/ProgressDonut/index.ts +0 -1
- package/lib/components/PromptChip/PromptChip.stories.tsx +0 -202
- package/lib/components/PromptChip/PromptChip.tsx +0 -166
- package/lib/components/PromptChip/index.ts +0 -1
- package/lib/components/PromptInput/PromptInput.stories.tsx +0 -349
- package/lib/components/PromptInput/PromptInput.tsx +0 -190
- package/lib/components/PromptInput/index.ts +0 -1
- package/lib/components/RadioButton/RadioButton.stories.tsx +0 -157
- package/lib/components/RadioButton/RadioButton.tsx +0 -135
- package/lib/components/RadioButton/RadioGroup.stories.tsx +0 -283
- package/lib/components/RadioButton/RadioGroup.tsx +0 -90
- package/lib/components/RadioButton/index.ts +0 -2
- package/lib/components/RadioTile/RadioTile.stories.tsx +0 -276
- package/lib/components/RadioTile/RadioTile.tsx +0 -107
- package/lib/components/RadioTile/index.ts +0 -1
- package/lib/components/RangeSlider/RangeSlider.stories.tsx +0 -342
- package/lib/components/RangeSlider/RangeSlider.tsx +0 -201
- package/lib/components/RangeSlider/index.ts +0 -1
- package/lib/components/Rating/Rating.stories.tsx +0 -257
- package/lib/components/Rating/Rating.tsx +0 -141
- package/lib/components/Rating/index.ts +0 -1
- package/lib/components/ScoreBar/ScoreBar.stories.tsx +0 -182
- package/lib/components/ScoreBar/ScoreBar.tsx +0 -133
- package/lib/components/ScoreBar/index.ts +0 -1
- package/lib/components/SearchInput/SearchInput.stories.tsx +0 -260
- package/lib/components/SearchInput/SearchInput.tsx +0 -81
- package/lib/components/SearchInput/index.ts +0 -2
- package/lib/components/Separator/Separator.stories.tsx +0 -95
- package/lib/components/Separator/Separator.tsx +0 -57
- package/lib/components/Separator/index.ts +0 -1
- package/lib/components/Shimmer/Shimmer.stories.tsx +0 -317
- package/lib/components/Shimmer/Shimmer.tsx +0 -143
- package/lib/components/Shimmer/index.ts +0 -1
- package/lib/components/SideMenuLink/SideMenuLink.stories.tsx +0 -153
- package/lib/components/SideMenuLink/SideMenuLink.tsx +0 -344
- package/lib/components/SideMenuLink/index.ts +0 -1
- package/lib/components/StatusIndicator/StatusIndicator.stories.tsx +0 -130
- package/lib/components/StatusIndicator/StatusIndicator.tsx +0 -62
- package/lib/components/StatusIndicator/index.ts +0 -1
- package/lib/components/Stepper/Step/Step.stories.tsx +0 -117
- package/lib/components/Stepper/Step/Step.tsx +0 -125
- package/lib/components/Stepper/Step/StepContent.tsx +0 -40
- package/lib/components/Stepper/Step/StepLabel.tsx +0 -40
- package/lib/components/Stepper/Step/index.ts +0 -3
- package/lib/components/Stepper/Stepper.stories.tsx +0 -422
- package/lib/components/Stepper/Stepper.tsx +0 -68
- package/lib/components/Stepper/index.ts +0 -2
- package/lib/components/StickyBar/StickyBar.stories.tsx +0 -152
- package/lib/components/StickyBar/StickyBar.tsx +0 -65
- package/lib/components/StickyBar/index.ts +0 -1
- package/lib/components/SubMenu/SubMenu.stories.tsx +0 -413
- package/lib/components/SubMenu/SubMenu.tsx +0 -96
- package/lib/components/SubMenu/SubMenuGroup.tsx +0 -161
- package/lib/components/SubMenu/SubMenuItem.tsx +0 -170
- package/lib/components/SubMenu/SubMenuLink.tsx +0 -87
- package/lib/components/SubMenu/index.ts +0 -4
- package/lib/components/Table/BasicTable.stories.tsx +0 -647
- package/lib/components/Table/BulkActions.stories.tsx +0 -267
- package/lib/components/Table/Cell.tsx +0 -125
- package/lib/components/Table/DefaultRow.tsx +0 -159
- package/lib/components/Table/DefaultTableHeader.tsx +0 -244
- package/lib/components/Table/InlineEdit.stories.tsx +0 -390
- package/lib/components/Table/StaticTable.tsx +0 -230
- package/lib/components/Table/Table.docs.ts +0 -495
- package/lib/components/Table/Table.tsx +0 -135
- package/lib/components/Table/TableActionBar.tsx +0 -55
- package/lib/components/Table/TableBottomBar.tsx +0 -25
- package/lib/components/Table/TableTopBar.tsx +0 -25
- package/lib/components/Table/dummyTableData.ts +0 -2189
- package/lib/components/Table/hooks.ts +0 -102
- package/lib/components/Table/index.ts +0 -8
- package/lib/components/Tabs/Tab/Tab.stories.tsx +0 -151
- package/lib/components/Tabs/Tab/Tab.tsx +0 -152
- package/lib/components/Tabs/Tab/index.ts +0 -1
- package/lib/components/Tabs/TabList/TabDropdown.tsx +0 -125
- package/lib/components/Tabs/TabList/TabList.stories.tsx +0 -172
- package/lib/components/Tabs/TabList/TabList.tsx +0 -178
- package/lib/components/Tabs/TabList/index.ts +0 -1
- package/lib/components/Tabs/index.ts +0 -2
- package/lib/components/Text/HighlightedText.stories.tsx +0 -122
- package/lib/components/Text/Text.stories.tsx +0 -302
- package/lib/components/Text/Text.tsx +0 -882
- package/lib/components/Text/index.ts +0 -30
- package/lib/components/TextTile/TextTile.stories.tsx +0 -89
- package/lib/components/TextTile/TextTile.tsx +0 -51
- package/lib/components/TextTile/index.ts +0 -1
- package/lib/components/Textarea/Textarea.stories.tsx +0 -324
- package/lib/components/Textarea/Textarea.tsx +0 -148
- package/lib/components/Textarea/index.ts +0 -2
- package/lib/components/Timeline/Timeline.stories.tsx +0 -272
- package/lib/components/Timeline/Timeline.tsx +0 -57
- package/lib/components/Timeline/TimelineItem/TimelineItem.stories.tsx +0 -216
- package/lib/components/Timeline/TimelineItem/TimelineItem.tsx +0 -128
- package/lib/components/Timeline/TimelineItem/index.ts +0 -1
- package/lib/components/Timeline/index.ts +0 -2
- package/lib/components/Toast/Toast.stories.tsx +0 -274
- package/lib/components/Toast/Toast.tsx +0 -264
- package/lib/components/Toast/ToastContainer.tsx +0 -123
- package/lib/components/Toast/ToastManager.ts +0 -60
- package/lib/components/Toast/index.ts +0 -10
- package/lib/components/Toggle/Toggle.stories.tsx +0 -175
- package/lib/components/Toggle/Toggle.tsx +0 -121
- package/lib/components/Toggle/index.ts +0 -1
- package/lib/components/TokenListInput/TokenListInput.stories.tsx +0 -678
- package/lib/components/TokenListInput/TokenListInput.tsx +0 -393
- package/lib/components/TokenListInput/TokenValueChips.tsx +0 -69
- package/lib/components/TokenListInput/index.ts +0 -1
- package/lib/components/Tooltip/Tooltip.stories.tsx +0 -316
- package/lib/components/Tooltip/Tooltip.tsx +0 -188
- package/lib/components/Tooltip/index.ts +0 -1
- package/lib/components/Truncate/Truncate.stories.tsx +0 -106
- package/lib/components/Truncate/Truncate.tsx +0 -80
- package/lib/components/Truncate/index.ts +0 -2
- package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.stories.tsx +0 -147
- package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.tsx +0 -109
- package/lib/components/TruncatedTextWithTooltip/index.ts +0 -1
- package/lib/components/Typeahead/SimpleTypeahead.stories.tsx +0 -567
- package/lib/components/Typeahead/SimpleTypeahead.tsx +0 -159
- package/lib/components/Typeahead/Typeahead.stories.tsx +0 -552
- package/lib/components/Typeahead/Typeahead.tsx +0 -243
- package/lib/components/Typeahead/index.ts +0 -2
- package/lib/components/WeekdayPicker/WeekdayPicker.stories.tsx +0 -263
- package/lib/components/WeekdayPicker/WeekdayPicker.tsx +0 -224
- package/lib/components/WeekdayPicker/index.ts +0 -1
- package/lib/components/index.ts +0 -77
- package/lib/hooks/index.ts +0 -16
- package/lib/hooks/useArbitraryOptionAddition/index.ts +0 -1
- package/lib/hooks/useArbitraryOptionAddition/useArbitraryOptionAddition.stories.tsx +0 -158
- package/lib/hooks/useArbitraryOptionAddition/useArbitraryOptionAddition.ts +0 -127
- package/lib/hooks/useCopyToClipboard/index.ts +0 -1
- package/lib/hooks/useCopyToClipboard/useCopyToClipboard.stories.tsx +0 -112
- package/lib/hooks/useCopyToClipboard/useCopyToClipboard.ts +0 -29
- package/lib/hooks/useDebounce/index.ts +0 -1
- package/lib/hooks/useDebounce/useDebounce.stories.tsx +0 -82
- package/lib/hooks/useDebounce/useDebounce.ts +0 -15
- package/lib/hooks/useFileUpload/index.ts +0 -1
- package/lib/hooks/useFileUpload/useFileUpload.stories.tsx +0 -468
- package/lib/hooks/useFileUpload/useFileUpload.ts +0 -326
- package/lib/hooks/useFilteredOptions/index.ts +0 -1
- package/lib/hooks/useFilteredOptions/useFilteredOptions.stories.tsx +0 -142
- package/lib/hooks/useFilteredOptions/useFilteredOptions.ts +0 -92
- package/lib/hooks/useInfiniteScroll/index.ts +0 -1
- package/lib/hooks/useInfiniteScroll/useInfiniteScroll.ts +0 -85
- package/lib/hooks/useInputState/index.ts +0 -1
- package/lib/hooks/useInputState/useInputState.stories.tsx +0 -62
- package/lib/hooks/useInputState/useInputState.ts +0 -24
- package/lib/hooks/useLockedBody/index.ts +0 -1
- package/lib/hooks/useLockedBody/useLockedBody.stories.tsx +0 -71
- package/lib/hooks/useLockedBody/useLockedBody.ts +0 -53
- package/lib/hooks/useModal/index.ts +0 -1
- package/lib/hooks/useModal/useModal.stories.tsx +0 -134
- package/lib/hooks/useModal/useModal.ts +0 -36
- package/lib/hooks/useMountTransition/index.ts +0 -25
- package/lib/hooks/useMountTransition/useMountTransition.stories.tsx +0 -64
- package/lib/hooks/usePagination/index.ts +0 -1
- package/lib/hooks/usePagination/usePagination.stories.tsx +0 -72
- package/lib/hooks/usePagination/usePagination.ts +0 -151
- package/lib/hooks/useReferenceElementWidth/index.ts +0 -1
- package/lib/hooks/useReferenceElementWidth/useReferenceElementWidth.ts +0 -19
- package/lib/hooks/useResizeObserver/index.ts +0 -1
- package/lib/hooks/useResizeObserver/useResizeObserver.ts +0 -29
- package/lib/hooks/useToastPortal/index.ts +0 -1
- package/lib/hooks/useToastPortal/useToastPortal.ts +0 -34
- package/lib/hooks/useToggle/index.ts +0 -1
- package/lib/hooks/useToggle/useToggle.stories.tsx +0 -70
- package/lib/hooks/useToggle/useToggle.ts +0 -13
- package/lib/hooks/useWindowSize/index.ts +0 -1
- package/lib/hooks/useWindowSize/useWindowSize.stories.tsx +0 -62
- package/lib/hooks/useWindowSize/useWindowSize.ts +0 -39
- package/lib/index.ts +0 -6
- package/lib/styles/index.ts +0 -533
- package/lib/styles/variables/_border.ts +0 -23
- package/lib/styles/variables/_color.ts +0 -207
- package/lib/styles/variables/_elevation.ts +0 -13
- package/lib/styles/variables/_font.ts +0 -59
- package/lib/styles/variables/_motion.ts +0 -11
- package/lib/styles/variables/_opacity.ts +0 -29
- package/lib/styles/variables/_shadow.ts +0 -47
- package/lib/styles/variables/_size.ts +0 -113
- package/lib/styles/variables/_space.ts +0 -23
- package/lib/types/charts.ts +0 -247
- package/lib/types/common.ts +0 -11
- package/lib/types/cssvariables.d.ts +0 -8
- package/lib/types/date-range-picker.ts +0 -20
- package/lib/types/flow-to-typescript-codemod.d.ts +0 -48
- package/lib/types/global.d.ts +0 -84
- package/lib/types/index.ts +0 -6
- package/lib/types/menu.ts +0 -13
- package/lib/types/toast.ts +0 -34
- package/lib/types/typography.ts +0 -17
- package/lib/utils/array/are-arrays-equal.ts +0 -12
- package/lib/utils/array/index.ts +0 -1
- package/lib/utils/charts/charts.ts +0 -110
- package/lib/utils/charts/columnChart.ts +0 -62
- package/lib/utils/charts/donutChart.ts +0 -123
- package/lib/utils/charts/funnelChart.ts +0 -97
- package/lib/utils/charts/helpers.ts +0 -65
- package/lib/utils/charts/index.ts +0 -7
- package/lib/utils/charts/lineChart.ts +0 -51
- package/lib/utils/charts/spiderChart.ts +0 -57
- package/lib/utils/charts/typography.ts +0 -52
- package/lib/utils/classify/classify.stories.tsx +0 -65
- package/lib/utils/classify/index.ts +0 -27
- package/lib/utils/click-away/ClickAway.stories.tsx +0 -248
- package/lib/utils/click-away/click-away.ts +0 -230
- package/lib/utils/click-away/index.ts +0 -1
- package/lib/utils/date-range-picker/date-range-picker.ts +0 -430
- package/lib/utils/date-range-picker/index.ts +0 -2
- package/lib/utils/date-range-picker/timezones.ts +0 -263
- package/lib/utils/dom/dom.stories.tsx +0 -59
- package/lib/utils/dom/dom.ts +0 -247
- package/lib/utils/dom/index.ts +0 -1
- package/lib/utils/helpers/helpers.stories.tsx +0 -124
- package/lib/utils/helpers/helpers.ts +0 -51
- package/lib/utils/helpers/index.ts +0 -1
- package/lib/utils/index.ts +0 -14
- package/lib/utils/makeClassNameComponent/index.ts +0 -1
- package/lib/utils/makeClassNameComponent/makeClassNameComponent.stories.tsx +0 -46
- package/lib/utils/makeClassNameComponent/makeClassNameComponent.tsx +0 -60
- package/lib/utils/menu/index.ts +0 -1
- package/lib/utils/menu/menu.ts +0 -174
- package/lib/utils/merge-refs/index.ts +0 -1
- package/lib/utils/merge-refs/merge-refs.stories.tsx +0 -92
- package/lib/utils/merge-refs/merge-refs.ts +0 -16
- package/lib/utils/rating/index.ts +0 -1
- package/lib/utils/rating/rating.ts +0 -30
- package/lib/utils/score-bar/index.ts +0 -1
- package/lib/utils/score-bar/score-bar.ts +0 -45
- package/lib/utils/string/index.ts +0 -1
- package/lib/utils/string/string.stories.tsx +0 -71
- package/lib/utils/string/string.ts +0 -26
- package/lib/utils/token-list-input/token-list-input.ts +0 -32
- package/lib/utils/tokens/index.ts +0 -1
- package/lib/utils/tokens/tokens.ts +0 -237
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
import moment from 'moment-timezone';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const TIMEZONES = {
|
|
5
|
-
'Pacific/Niue': '(GMT-11:00) Niue',
|
|
6
|
-
'Pacific/Pago_Pago': '(GMT-11:00) Pago Pago',
|
|
7
|
-
'Pacific/Honolulu': '(GMT-10:00) Hawaii Time',
|
|
8
|
-
'Pacific/Rarotonga': '(GMT-10:00) Rarotonga',
|
|
9
|
-
'Pacific/Tahiti': '(GMT-10:00) Tahiti',
|
|
10
|
-
'Pacific/Marquesas': '(GMT-09:30) Marquesas',
|
|
11
|
-
'America/Anchorage': '(GMT-09:00) Alaska Time',
|
|
12
|
-
'Pacific/Gambier': '(GMT-09:00) Gambier',
|
|
13
|
-
'America/Los_Angeles': '(GMT-08:00) Pacific Time',
|
|
14
|
-
'America/Tijuana': '(GMT-08:00) Pacific Time - Tijuana',
|
|
15
|
-
'America/Vancouver': '(GMT-08:00) Pacific Time - Vancouver',
|
|
16
|
-
'America/Whitehorse': '(GMT-08:00) Pacific Time - Whitehorse',
|
|
17
|
-
'Pacific/Pitcairn': '(GMT-08:00) Pitcairn',
|
|
18
|
-
'America/Dawson_Creek': '(GMT-07:00) Mountain Time - Dawson Creek',
|
|
19
|
-
'America/Denver': '(GMT-07:00) Mountain Time',
|
|
20
|
-
'America/Edmonton': '(GMT-07:00) Mountain Time - Edmonton',
|
|
21
|
-
'America/Hermosillo': '(GMT-07:00) Mountain Time - Hermosillo',
|
|
22
|
-
'America/Mazatlan': '(GMT-07:00) Mountain Time - Chihuahua, Mazatlan',
|
|
23
|
-
'America/Phoenix': '(GMT-07:00) Mountain Time - Arizona',
|
|
24
|
-
'America/Yellowknife': '(GMT-07:00) Mountain Time - Yellowknife',
|
|
25
|
-
'America/Belize': '(GMT-06:00) Belize',
|
|
26
|
-
'America/Chicago': '(GMT-06:00) Central Time',
|
|
27
|
-
'America/Costa_Rica': '(GMT-06:00) Costa Rica',
|
|
28
|
-
'America/El_Salvador': '(GMT-06:00) El Salvador',
|
|
29
|
-
'America/Guatemala': '(GMT-06:00) Guatemala',
|
|
30
|
-
'America/Managua': '(GMT-06:00) Managua',
|
|
31
|
-
'America/Mexico_City': '(GMT-06:00) Central Time - Mexico City',
|
|
32
|
-
'America/Regina': '(GMT-06:00) Central Time - Regina',
|
|
33
|
-
'America/Tegucigalpa': '(GMT-06:00) Central Time - Tegucigalpa',
|
|
34
|
-
'America/Winnipeg': '(GMT-06:00) Central Time - Winnipeg',
|
|
35
|
-
'Pacific/Galapagos': '(GMT-06:00) Galapagos',
|
|
36
|
-
'America/Bogota': '(GMT-05:00) Bogota',
|
|
37
|
-
'America/Cancun': '(GMT-05:00) America Cancun',
|
|
38
|
-
'America/Cayman': '(GMT-05:00) Cayman',
|
|
39
|
-
'America/Guayaquil': '(GMT-05:00) Guayaquil',
|
|
40
|
-
'America/Havana': '(GMT-05:00) Havana',
|
|
41
|
-
'America/Iqaluit': '(GMT-05:00) Eastern Time - Iqaluit',
|
|
42
|
-
'America/Jamaica': '(GMT-05:00) Jamaica',
|
|
43
|
-
'America/Lima': '(GMT-05:00) Lima',
|
|
44
|
-
'America/Nassau': '(GMT-05:00) Nassau',
|
|
45
|
-
'America/New_York': '(GMT-05:00) Eastern Time',
|
|
46
|
-
'America/Panama': '(GMT-05:00) Panama',
|
|
47
|
-
'America/Port-au-Prince': '(GMT-05:00) Port-au-Prince',
|
|
48
|
-
'America/Rio_Branco': '(GMT-05:00) Rio Branco',
|
|
49
|
-
'America/Toronto': '(GMT-05:00) Eastern Time - Toronto',
|
|
50
|
-
'Pacific/Easter': '(GMT-05:00) Easter Island',
|
|
51
|
-
'America/Caracas': '(GMT-04:00) Caracas',
|
|
52
|
-
'America/Asuncion': '(GMT-03:00) Asuncion',
|
|
53
|
-
'America/Barbados': '(GMT-04:00) Barbados',
|
|
54
|
-
'America/Boa_Vista': '(GMT-04:00) Boa Vista',
|
|
55
|
-
'America/Campo_Grande': '(GMT-03:00) Campo Grande',
|
|
56
|
-
'America/Cuiaba': '(GMT-03:00) Cuiaba',
|
|
57
|
-
'America/Curacao': '(GMT-04:00) Curacao',
|
|
58
|
-
'America/Grand_Turk': '(GMT-04:00) Grand Turk',
|
|
59
|
-
'America/Guyana': '(GMT-04:00) Guyana',
|
|
60
|
-
'America/Halifax': '(GMT-04:00) Atlantic Time - Halifax',
|
|
61
|
-
'America/La_Paz': '(GMT-04:00) La Paz',
|
|
62
|
-
'America/Manaus': '(GMT-04:00) Manaus',
|
|
63
|
-
'America/Martinique': '(GMT-04:00) Martinique',
|
|
64
|
-
'America/Port_of_Spain': '(GMT-04:00) Port of Spain',
|
|
65
|
-
'America/Porto_Velho': '(GMT-04:00) Porto Velho',
|
|
66
|
-
'America/Puerto_Rico': '(GMT-04:00) Puerto Rico',
|
|
67
|
-
'America/Santo_Domingo': '(GMT-04:00) Santo Domingo',
|
|
68
|
-
'America/Thule': '(GMT-04:00) Thule',
|
|
69
|
-
'Atlantic/Bermuda': '(GMT-04:00) Bermuda',
|
|
70
|
-
'America/St_Johns': '(GMT-03:30) Newfoundland Time - St. Johns',
|
|
71
|
-
'America/Araguaina': '(GMT-03:00) Araguaina',
|
|
72
|
-
'America/Argentina/Buenos_Aires': '(GMT-03:00) Buenos Aires',
|
|
73
|
-
'America/Bahia': '(GMT-03:00) Salvador',
|
|
74
|
-
'America/Belem': '(GMT-03:00) Belem',
|
|
75
|
-
'America/Cayenne': '(GMT-03:00) Cayenne',
|
|
76
|
-
'America/Fortaleza': '(GMT-03:00) Fortaleza',
|
|
77
|
-
'America/Godthab': '(GMT-03:00) Godthab',
|
|
78
|
-
'America/Maceio': '(GMT-03:00) Maceio',
|
|
79
|
-
'America/Miquelon': '(GMT-03:00) Miquelon',
|
|
80
|
-
'America/Montevideo': '(GMT-03:00) Montevideo',
|
|
81
|
-
'America/Paramaribo': '(GMT-03:00) Paramaribo',
|
|
82
|
-
'America/Recife': '(GMT-03:00) Recife',
|
|
83
|
-
'America/Santiago': '(GMT-03:00) Santiago',
|
|
84
|
-
'America/Sao_Paulo': '(GMT-03:00) Sao Paulo',
|
|
85
|
-
'Antarctica/Palmer': '(GMT-03:00) Palmer',
|
|
86
|
-
'Antarctica/Rothera': '(GMT-03:00) Rothera',
|
|
87
|
-
'Atlantic/Stanley': '(GMT-03:00) Stanley',
|
|
88
|
-
'America/Noronha': '(GMT-02:00) Noronha',
|
|
89
|
-
'Atlantic/South_Georgia': '(GMT-02:00) South Georgia',
|
|
90
|
-
'America/Scoresbysund': '(GMT-01:00) Scoresbysund',
|
|
91
|
-
'Atlantic/Azores': '(GMT-01:00) Azores',
|
|
92
|
-
'Atlantic/Cape_Verde': '(GMT-01:00) Cape Verde',
|
|
93
|
-
'Africa/Abidjan': '(GMT+00:00) Abidjan',
|
|
94
|
-
'Africa/Accra': '(GMT+00:00) Accra',
|
|
95
|
-
'Africa/Bissau': '(GMT+00:00) Bissau',
|
|
96
|
-
'Africa/Casablanca': '(GMT+00:00) Casablanca',
|
|
97
|
-
'Africa/El_Aaiun': '(GMT+00:00) El Aaiun',
|
|
98
|
-
'Africa/Monrovia': '(GMT+00:00) Monrovia',
|
|
99
|
-
'America/Danmarkshavn': '(GMT+00:00) Danmarkshavn',
|
|
100
|
-
'Atlantic/Canary': '(GMT+00:00) Canary Islands',
|
|
101
|
-
'Atlantic/Faroe': '(GMT+00:00) Faeroe',
|
|
102
|
-
'Atlantic/Reykjavik': '(GMT+00:00) Reykjavik',
|
|
103
|
-
'Etc/GMT': '(GMT+00:00) GMT (no daylight saving)',
|
|
104
|
-
'Europe/Dublin': '(GMT+00:00) Dublin',
|
|
105
|
-
'Europe/Lisbon': '(GMT+00:00) Lisbon',
|
|
106
|
-
'Europe/London': '(GMT+00:00) London',
|
|
107
|
-
'Africa/Algiers': '(GMT+01:00) Algiers',
|
|
108
|
-
'Africa/Ceuta': '(GMT+01:00) Ceuta',
|
|
109
|
-
'Africa/Lagos': '(GMT+01:00) Lagos',
|
|
110
|
-
'Africa/Ndjamena': '(GMT+01:00) Ndjamena',
|
|
111
|
-
'Africa/Tunis': '(GMT+01:00) Tunis',
|
|
112
|
-
'Africa/Windhoek': '(GMT+02:00) Windhoek',
|
|
113
|
-
'Europe/Amsterdam': '(GMT+01:00) Amsterdam',
|
|
114
|
-
'Europe/Andorra': '(GMT+01:00) Andorra',
|
|
115
|
-
'Europe/Belgrade': '(GMT+01:00) Central European Time - Belgrade',
|
|
116
|
-
'Europe/Berlin': '(GMT+01:00) Berlin',
|
|
117
|
-
'Europe/Brussels': '(GMT+01:00) Brussels',
|
|
118
|
-
'Europe/Budapest': '(GMT+01:00) Budapest',
|
|
119
|
-
'Europe/Copenhagen': '(GMT+01:00) Copenhagen',
|
|
120
|
-
'Europe/Gibraltar': '(GMT+01:00) Gibraltar',
|
|
121
|
-
'Europe/Luxembourg': '(GMT+01:00) Luxembourg',
|
|
122
|
-
'Europe/Madrid': '(GMT+01:00) Madrid',
|
|
123
|
-
'Europe/Malta': '(GMT+01:00) Malta',
|
|
124
|
-
'Europe/Monaco': '(GMT+01:00) Monaco',
|
|
125
|
-
'Europe/Oslo': '(GMT+01:00) Oslo',
|
|
126
|
-
'Europe/Paris': '(GMT+01:00) Paris',
|
|
127
|
-
'Europe/Prague': '(GMT+01:00) Central European Time - Prague',
|
|
128
|
-
'Europe/Rome': '(GMT+01:00) Rome',
|
|
129
|
-
'Europe/Stockholm': '(GMT+01:00) Stockholm',
|
|
130
|
-
'Europe/Tirane': '(GMT+01:00) Tirane',
|
|
131
|
-
'Europe/Vienna': '(GMT+01:00) Vienna',
|
|
132
|
-
'Europe/Warsaw': '(GMT+01:00) Warsaw',
|
|
133
|
-
'Europe/Zurich': '(GMT+01:00) Zurich',
|
|
134
|
-
'Africa/Cairo': '(GMT+02:00) Cairo',
|
|
135
|
-
'Africa/Johannesburg': '(GMT+02:00) Johannesburg',
|
|
136
|
-
'Africa/Maputo': '(GMT+02:00) Maputo',
|
|
137
|
-
'Africa/Tripoli': '(GMT+02:00) Tripoli',
|
|
138
|
-
'Asia/Amman': '(GMT+02:00) Amman',
|
|
139
|
-
'Asia/Beirut': '(GMT+02:00) Beirut',
|
|
140
|
-
'Asia/Damascus': '(GMT+02:00) Damascus',
|
|
141
|
-
'Asia/Gaza': '(GMT+02:00) Gaza',
|
|
142
|
-
'Asia/Jerusalem': '(GMT+02:00) Jerusalem',
|
|
143
|
-
'Asia/Nicosia': '(GMT+02:00) Nicosia',
|
|
144
|
-
'Europe/Athens': '(GMT+02:00) Athens',
|
|
145
|
-
'Europe/Bucharest': '(GMT+02:00) Bucharest',
|
|
146
|
-
'Europe/Chisinau': '(GMT+02:00) Chisinau',
|
|
147
|
-
'Europe/Helsinki': '(GMT+02:00) Helsinki',
|
|
148
|
-
'Europe/Istanbul': '(GMT+03:00) Istanbul',
|
|
149
|
-
'Europe/Kaliningrad': '(GMT+02:00) Moscow-01 - Kaliningrad',
|
|
150
|
-
'Europe/Kyiv': '(GMT+02:00) Kyiv',
|
|
151
|
-
'Europe/Riga': '(GMT+02:00) Riga',
|
|
152
|
-
'Europe/Sofia': '(GMT+02:00) Sofia',
|
|
153
|
-
'Europe/Tallinn': '(GMT+02:00) Tallinn',
|
|
154
|
-
'Europe/Vilnius': '(GMT+02:00) Vilnius',
|
|
155
|
-
'Africa/Khartoum': '(GMT+03:00) Khartoum',
|
|
156
|
-
'Africa/Nairobi': '(GMT+03:00) Nairobi',
|
|
157
|
-
'Antarctica/Syowa': '(GMT+03:00) Syowa',
|
|
158
|
-
'Asia/Baghdad': '(GMT+03:00) Baghdad',
|
|
159
|
-
'Asia/Qatar': '(GMT+03:00) Qatar',
|
|
160
|
-
'Asia/Riyadh': '(GMT+03:00) Riyadh',
|
|
161
|
-
'Europe/Minsk': '(GMT+03:00) Minsk',
|
|
162
|
-
'Europe/Moscow': '(GMT+03:00) Moscow+00 - Moscow',
|
|
163
|
-
'Asia/Tehran': '(GMT+03:30) Tehran',
|
|
164
|
-
'Asia/Baku': '(GMT+04:00) Baku',
|
|
165
|
-
'Asia/Dubai': '(GMT+04:00) Dubai',
|
|
166
|
-
'Asia/Tbilisi': '(GMT+04:00) Tbilisi',
|
|
167
|
-
'Asia/Yerevan': '(GMT+04:00) Yerevan',
|
|
168
|
-
'Europe/Samara': '(GMT+04:00) Moscow+01 - Samara',
|
|
169
|
-
'Indian/Mahe': '(GMT+04:00) Mahe',
|
|
170
|
-
'Indian/Mauritius': '(GMT+04:00) Mauritius',
|
|
171
|
-
'Indian/Reunion': '(GMT+04:00) Reunion',
|
|
172
|
-
'Asia/Kabul': '(GMT+04:30) Kabul',
|
|
173
|
-
'Antarctica/Mawson': '(GMT+05:00) Mawson',
|
|
174
|
-
'Asia/Aqtau': '(GMT+05:00) Aqtau',
|
|
175
|
-
'Asia/Aqtobe': '(GMT+05:00) Aqtobe',
|
|
176
|
-
'Asia/Ashgabat': '(GMT+05:00) Ashgabat',
|
|
177
|
-
'Asia/Dushanbe': '(GMT+05:00) Dushanbe',
|
|
178
|
-
'Asia/Karachi': '(GMT+05:00) Karachi',
|
|
179
|
-
'Asia/Tashkent': '(GMT+05:00) Tashkent',
|
|
180
|
-
'Asia/Yekaterinburg': '(GMT+05:00) Moscow+02 - Yekaterinburg',
|
|
181
|
-
'Indian/Kerguelen': '(GMT+05:00) Kerguelen',
|
|
182
|
-
'Indian/Maldives': '(GMT+05:00) Maldives',
|
|
183
|
-
'Asia/Calcutta': '(GMT+05:30) India Standard Time',
|
|
184
|
-
'Asia/Colombo': '(GMT+05:30) Colombo',
|
|
185
|
-
'Asia/Katmandu': '(GMT+05:45) Katmandu',
|
|
186
|
-
'Antarctica/Vostok': '(GMT+06:00) Vostok',
|
|
187
|
-
'Asia/Almaty': '(GMT+06:00) Almaty',
|
|
188
|
-
'Asia/Bishkek': '(GMT+06:00) Bishkek',
|
|
189
|
-
'Asia/Dhaka': '(GMT+06:00) Dhaka',
|
|
190
|
-
'Asia/Omsk': '(GMT+06:00) Moscow+03 - Omsk, Novosibirsk',
|
|
191
|
-
'Asia/Thimphu': '(GMT+06:00) Thimphu',
|
|
192
|
-
'Indian/Chagos': '(GMT+06:00) Chagos',
|
|
193
|
-
'Asia/Rangoon': '(GMT+06:30) Rangoon',
|
|
194
|
-
'Indian/Cocos': '(GMT+06:30) Cocos',
|
|
195
|
-
'Antarctica/Davis': '(GMT+07:00) Davis',
|
|
196
|
-
'Asia/Bangkok': '(GMT+07:00) Bangkok',
|
|
197
|
-
'Asia/Hovd': '(GMT+07:00) Hovd',
|
|
198
|
-
'Asia/Jakarta': '(GMT+07:00) Jakarta',
|
|
199
|
-
'Asia/Krasnoyarsk': '(GMT+07:00) Moscow+04 - Krasnoyarsk',
|
|
200
|
-
'Asia/Saigon': '(GMT+07:00) Hanoi',
|
|
201
|
-
'Asia/Ho_Chi_Minh': '(GMT+07:00) Ho Chi Minh',
|
|
202
|
-
'Indian/Christmas': '(GMT+07:00) Christmas',
|
|
203
|
-
'Antarctica/Casey': '(GMT+08:00) Casey',
|
|
204
|
-
'Asia/Brunei': '(GMT+08:00) Brunei',
|
|
205
|
-
'Asia/Choibalsan': '(GMT+08:00) Choibalsan',
|
|
206
|
-
'Asia/Hong_Kong': '(GMT+08:00) Hong Kong',
|
|
207
|
-
'Asia/Irkutsk': '(GMT+08:00) Moscow+05 - Irkutsk',
|
|
208
|
-
'Asia/Kuala_Lumpur': '(GMT+08:00) Kuala Lumpur',
|
|
209
|
-
'Asia/Macau': '(GMT+08:00) Macau',
|
|
210
|
-
'Asia/Makassar': '(GMT+08:00) Makassar',
|
|
211
|
-
'Asia/Manila': '(GMT+08:00) Manila',
|
|
212
|
-
'Asia/Shanghai': '(GMT+08:00) China Time - Beijing',
|
|
213
|
-
'Asia/Singapore': '(GMT+08:00) Singapore',
|
|
214
|
-
'Asia/Taipei': '(GMT+08:00) Taipei',
|
|
215
|
-
'Asia/Ulaanbaatar': '(GMT+08:00) Ulaanbaatar',
|
|
216
|
-
'Australia/Perth': '(GMT+08:00) Western Time - Perth',
|
|
217
|
-
'Asia/Pyongyang': '(GMT+08:30) Pyongyang',
|
|
218
|
-
'Asia/Dili': '(GMT+09:00) Dili',
|
|
219
|
-
'Asia/Jayapura': '(GMT+09:00) Jayapura',
|
|
220
|
-
'Asia/Seoul': '(GMT+09:00) Seoul',
|
|
221
|
-
'Asia/Tokyo': '(GMT+09:00) Tokyo',
|
|
222
|
-
'Asia/Yakutsk': '(GMT+09:00) Moscow+06 - Yakutsk',
|
|
223
|
-
'Pacific/Palau': '(GMT+09:00) Palau',
|
|
224
|
-
'Australia/Adelaide': '(GMT+10:30) Central Time - Adelaide',
|
|
225
|
-
'Australia/Darwin': '(GMT+09:30) Central Time - Darwin',
|
|
226
|
-
'Antarctica/DumontDUrville': '(GMT+10:00) Dumont D\'Urville',
|
|
227
|
-
'Asia/Magadan': '(GMT+10:00) Moscow+07 - Magadan',
|
|
228
|
-
'Asia/Vladivostok': '(GMT+10:00) Moscow+07 - Vladivostok',
|
|
229
|
-
'Australia/Brisbane': '(GMT+10:00) Eastern Time - Brisbane',
|
|
230
|
-
'Asia/Sakhalin': '(GMT+11:00) Moscow+08 - Yuzhno-Sakhalin',
|
|
231
|
-
'Australia/Hobart': '(GMT+11:00) Eastern Time - Hobart',
|
|
232
|
-
'Australia/Sydney': '(GMT+11:00) Eastern Time - Melbourne, Sydney',
|
|
233
|
-
'Pacific/Chuuk': '(GMT+10:00) Truk',
|
|
234
|
-
'Pacific/Guam': '(GMT+10:00) Guam',
|
|
235
|
-
'Pacific/Port_Moresby': '(GMT+10:00) Port Moresby',
|
|
236
|
-
'Pacific/Efate': '(GMT+11:00) Efate',
|
|
237
|
-
'Pacific/Guadalcanal': '(GMT+11:00) Guadalcanal',
|
|
238
|
-
'Pacific/Kosrae': '(GMT+11:00) Kosrae',
|
|
239
|
-
'Pacific/Norfolk': '(GMT+11:00) Norfolk',
|
|
240
|
-
'Pacific/Noumea': '(GMT+11:00) Noumea',
|
|
241
|
-
'Pacific/Pohnpei': '(GMT+11:00) Ponape',
|
|
242
|
-
'Asia/Kamchatka': '(GMT+12:00) Moscow+09 - Petropavlovsk-Kamchatskiy',
|
|
243
|
-
'Pacific/Auckland': '(GMT+13:00) Auckland',
|
|
244
|
-
'Pacific/Fiji': '(GMT+13:00) Fiji',
|
|
245
|
-
'Pacific/Funafuti': '(GMT+12:00) Funafuti',
|
|
246
|
-
'Pacific/Kwajalein': '(GMT+12:00) Kwajalein',
|
|
247
|
-
'Pacific/Majuro': '(GMT+12:00) Majuro',
|
|
248
|
-
'Pacific/Nauru': '(GMT+12:00) Nauru',
|
|
249
|
-
'Pacific/Tarawa': '(GMT+12:00) Tarawa',
|
|
250
|
-
'Pacific/Wake': '(GMT+12:00) Wake',
|
|
251
|
-
'Pacific/Wallis': '(GMT+12:00) Wallis',
|
|
252
|
-
'Pacific/Apia': '(GMT+14:00) Apia',
|
|
253
|
-
'Pacific/Enderbury': '(GMT+13:00) Enderbury',
|
|
254
|
-
'Pacific/Fakaofo': '(GMT+13:00) Fakaofo',
|
|
255
|
-
'Pacific/Tongatapu': '(GMT+13:00) Tongatapu',
|
|
256
|
-
'Pacific/Kiritimati': '(GMT+14:00) Kiritimati',
|
|
257
|
-
} as const;
|
|
258
|
-
|
|
259
|
-
export const addTimezoneStartOfDay = (date: string, timezone: string): string => moment.tz(date, timezone).startOf('d').toISOString();
|
|
260
|
-
|
|
261
|
-
export const addTimezoneEndOfDay = (date: string, timezone: string): string => moment.tz(date, timezone).endOf('d').toISOString();
|
|
262
|
-
|
|
263
|
-
export const getTodayInTimezone = (timezone: string): string => moment.tz(timezone).format('YYYY-MM-DD');
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {BodyLarge} from '../../components/Text';
|
|
4
|
-
|
|
5
|
-
import css from './dom.stories.module.css';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
tags: ['autodocs'],
|
|
10
|
-
title: 'Utils/Dom',
|
|
11
|
-
parameters: {
|
|
12
|
-
docs: {
|
|
13
|
-
description: {
|
|
14
|
-
component: `
|
|
15
|
-
\`\`\`js
|
|
16
|
-
import {
|
|
17
|
-
createElement,
|
|
18
|
-
pageHeight,
|
|
19
|
-
getFixedAnchorPosition,
|
|
20
|
-
pxToNumber,
|
|
21
|
-
listen,
|
|
22
|
-
stopEvent,
|
|
23
|
-
stopEventImmediately,
|
|
24
|
-
cancelEvent,
|
|
25
|
-
requestPointerLock,
|
|
26
|
-
checkDateInputSupport,
|
|
27
|
-
getListPasteHandler
|
|
28
|
-
} from "@spaced-out/ui-design-system/lib/utils/dom";
|
|
29
|
-
\`\`\`
|
|
30
|
-
This story showcases various utility functions that can be used in different scenarios.
|
|
31
|
-
|
|
32
|
-
### Utility Functions
|
|
33
|
-
- \`createElement\`: Creates an HTML element with the provided type and props.
|
|
34
|
-
- \`pageHeight\`: Returns the height of the page.
|
|
35
|
-
- \`getFixedAnchorPosition\`: Returns the position of an element with a fixed placement.
|
|
36
|
-
- \`getAnchorPosition\`: Returns the position of an element taking into account the page offset.
|
|
37
|
-
- \`pxToNumber\`: Converts a string value representing pixels to a number.
|
|
38
|
-
- \`listen\` and \`forget\`: Attach and detach event listeners to an event target.
|
|
39
|
-
- \`stopEvent\`: Stops the propagation of an event.
|
|
40
|
-
- \`stopEventImmediately\`: Stops the propagation of an event immediately.
|
|
41
|
-
- \`cancelEvent\`: Stops the propagation and prevents the default action of an event.
|
|
42
|
-
- \`requestPointerLock\`: Requests pointer lock for an element.
|
|
43
|
-
- \`checkDateInputSupport\`: Checks if the browser supports the date input type.
|
|
44
|
-
- \`getListPasteHandler\`: Handles pasting of list items separated by a specified regex.
|
|
45
|
-
|
|
46
|
-
### Usage
|
|
47
|
-
Please refer to the individual functions for usage examples.
|
|
48
|
-
`,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const Example = (): React.ReactElement<React.ComponentProps<'div'>> => (<div>
|
|
55
|
-
<BodyLarge className={css.text}>
|
|
56
|
-
This story showcases various utility functions that can be used in
|
|
57
|
-
different scenarios.
|
|
58
|
-
</BodyLarge>
|
|
59
|
-
</div>);
|
package/lib/utils/dom/dom.ts
DELETED
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
export type Placement = 'top' | 'left' | 'right' | 'bottom';
|
|
2
|
-
export type ArrowPosition = 'start' | 'center' | 'end';
|
|
3
|
-
export type Justify = ArrowPosition;
|
|
4
|
-
|
|
5
|
-
export type PositionedPlacement = {
|
|
6
|
-
placement: Placement;
|
|
7
|
-
x: number;
|
|
8
|
-
y: number;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export function createElement(
|
|
12
|
-
document: Document,
|
|
13
|
-
type: string,
|
|
14
|
-
props: {
|
|
15
|
-
[key: string]: unknown;
|
|
16
|
-
},
|
|
17
|
-
): HTMLElement {
|
|
18
|
-
const el = document.createElement(type);
|
|
19
|
-
return Object.assign(el, props);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function pageHeight(): number {
|
|
23
|
-
const {body, documentElement} = window.document;
|
|
24
|
-
return Math.max(
|
|
25
|
-
body.scrollHeight,
|
|
26
|
-
body.clientHeight,
|
|
27
|
-
documentElement.scrollHeight,
|
|
28
|
-
documentElement.clientHeight,
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function getFixedAnchorPosition(
|
|
33
|
-
element: HTMLElement,
|
|
34
|
-
placement: Placement = 'top',
|
|
35
|
-
pad: number = 0,
|
|
36
|
-
justify: Justify = 'center',
|
|
37
|
-
): PositionedPlacement {
|
|
38
|
-
const rect = element.getBoundingClientRect();
|
|
39
|
-
|
|
40
|
-
const docX = rect.left;
|
|
41
|
-
const docY = rect.top;
|
|
42
|
-
|
|
43
|
-
let x, y;
|
|
44
|
-
|
|
45
|
-
switch (placement) {
|
|
46
|
-
case 'bottom':
|
|
47
|
-
y = docY + rect.height + pad;
|
|
48
|
-
switch (justify) {
|
|
49
|
-
case 'start':
|
|
50
|
-
x = docX;
|
|
51
|
-
break;
|
|
52
|
-
case 'center':
|
|
53
|
-
x = docX + rect.width / 2;
|
|
54
|
-
break;
|
|
55
|
-
case 'end':
|
|
56
|
-
default:
|
|
57
|
-
x = docX + rect.width;
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
break;
|
|
61
|
-
case 'left':
|
|
62
|
-
x = docX - pad;
|
|
63
|
-
switch (justify) {
|
|
64
|
-
case 'start':
|
|
65
|
-
y = docY;
|
|
66
|
-
break;
|
|
67
|
-
case 'center':
|
|
68
|
-
y = docY + rect.height / 2;
|
|
69
|
-
break;
|
|
70
|
-
case 'end':
|
|
71
|
-
default:
|
|
72
|
-
y = docY + rect.height;
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
break;
|
|
76
|
-
case 'right':
|
|
77
|
-
x = docX + rect.width + pad;
|
|
78
|
-
y = docY + rect.height / 2;
|
|
79
|
-
break;
|
|
80
|
-
default:
|
|
81
|
-
y = docY - pad;
|
|
82
|
-
switch (justify) {
|
|
83
|
-
case 'start':
|
|
84
|
-
x = docX;
|
|
85
|
-
break;
|
|
86
|
-
case 'center':
|
|
87
|
-
x = docX + rect.width / 2;
|
|
88
|
-
break;
|
|
89
|
-
case 'end':
|
|
90
|
-
default:
|
|
91
|
-
x = docX + rect.width;
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return {x, y, placement};
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export function getAnchorPosition(
|
|
101
|
-
element: HTMLElement,
|
|
102
|
-
placement: Placement = 'top',
|
|
103
|
-
pad: number = 0,
|
|
104
|
-
justify: Justify = 'center',
|
|
105
|
-
): PositionedPlacement {
|
|
106
|
-
const position = getFixedAnchorPosition(element, placement, pad, justify);
|
|
107
|
-
const documentStyle = window.document.documentElement.style;
|
|
108
|
-
return {
|
|
109
|
-
...position,
|
|
110
|
-
x: position.x + window.pageXOffset - pxToNumber(documentStyle.paddingLeft),
|
|
111
|
-
y: position.y + window.pageYOffset - pxToNumber(documentStyle.paddingTop),
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export function pxToNumber(px: string): number {
|
|
116
|
-
return parseFloat(px.replace('px', '') || '0');
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// TODO (kyle): add more handler types?
|
|
120
|
-
type Handlers = Partial<{
|
|
121
|
-
// @ts-ignore - TS2411 - Property 'click' of type '(arg1: MouseEvent) => unknown' is not assignable to 'string' index type '(arg1: Event) => unknown'.
|
|
122
|
-
click: (arg1: MouseEvent) => unknown;
|
|
123
|
-
// @ts-ignore - TS2411 - Property 'mousedown' of type '(arg1: MouseEvent) => unknown' is not assignable to 'string' index type '(arg1: Event) => unknown'.
|
|
124
|
-
mousedown: (arg1: MouseEvent) => unknown;
|
|
125
|
-
// @ts-ignore - TS2411 - Property 'mouseup' of type '(arg1: MouseEvent) => unknown' is not assignable to 'string' index type '(arg1: Event) => unknown'.
|
|
126
|
-
mouseup: (arg1: MouseEvent) => unknown;
|
|
127
|
-
// @ts-ignore - TS2411 - Property 'pointerdown' of type '(arg1: PointerEvent) => unknown' is not assignable to 'string' index type '(arg1: Event) => unknown'.
|
|
128
|
-
pointerdown: (arg1: PointerEvent) => unknown;
|
|
129
|
-
// @ts-ignore - TS2411 - Property 'pointerup' of type '(arg1: PointerEvent) => unknown' is not assignable to 'string' index type '(arg1: Event) => unknown'.
|
|
130
|
-
pointerup: (arg1: PointerEvent) => unknown;
|
|
131
|
-
// @ts-ignore - TS2411 - Property 'pointercancel' of type '(arg1: PointerEvent) => unknown' is not assignable to 'string' index type '(arg1: Event) => unknown'.
|
|
132
|
-
pointercancel: (arg1: PointerEvent) => unknown;
|
|
133
|
-
[key: string]: (arg1: Event) => unknown;
|
|
134
|
-
}>;
|
|
135
|
-
export function listen(
|
|
136
|
-
target: EventTarget,
|
|
137
|
-
handlers: Handlers,
|
|
138
|
-
// @ts-ignore - TS2322 - Type 'EventListenerOptionsOrUseCapture' is not assignable to type 'EventListenerOptionsOrUseCapture'.
|
|
139
|
-
options?: EventListenerOptionsOrUseCapture,
|
|
140
|
-
hook: 'addEventListener' | 'removeEventListener' = 'addEventListener',
|
|
141
|
-
) {
|
|
142
|
-
for (const eventName in handlers) {
|
|
143
|
-
// @ts-ignore - TS2345 - Argument of type '((arg1: Event) => unknown) | undefined' is not assignable to parameter of type 'EventListenerOrEventListenerObject | null'.
|
|
144
|
-
target[hook](eventName, handlers[eventName], options);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export function forget(
|
|
149
|
-
target: EventTarget,
|
|
150
|
-
events: Handlers,
|
|
151
|
-
// @ts-ignore - TS2322 - Type 'EventListenerOptionsOrUseCapture' is not assignable to type 'EventListenerOptionsOrUseCapture'.
|
|
152
|
-
options: EventListenerOptionsOrUseCapture,
|
|
153
|
-
): void {
|
|
154
|
-
return listen(target, events, options, 'removeEventListener');
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
type MixedEvent = React.SyntheticEvent<EventTarget> | Event;
|
|
158
|
-
export function stopEvent(event: MixedEvent) {
|
|
159
|
-
event.stopPropagation();
|
|
160
|
-
}
|
|
161
|
-
export function stopEventImmediately(event: React.SyntheticEvent<EventTarget>) {
|
|
162
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
163
|
-
}
|
|
164
|
-
export function cancelEvent(event: MixedEvent) {
|
|
165
|
-
event.stopPropagation();
|
|
166
|
-
event.preventDefault();
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
export function requestPointerLock(element: Element): Promise<void> {
|
|
170
|
-
return new Promise((resolve: (result: Promise<undefined> | undefined) => void, reject: (error?: any) => void) => {
|
|
171
|
-
const handleChange = () => {
|
|
172
|
-
if (document.pointerLockElement === element) {
|
|
173
|
-
// @ts-ignore - TS2794 - Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?
|
|
174
|
-
resolve();
|
|
175
|
-
removeHandlers();
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
const handleError = () => {
|
|
179
|
-
reject();
|
|
180
|
-
removeHandlers();
|
|
181
|
-
};
|
|
182
|
-
const removeHandlers = () => {
|
|
183
|
-
// @ts-ignore - TS2554 - Expected 3 arguments, but got 2.
|
|
184
|
-
forget(document, {
|
|
185
|
-
pointerlockchange: handleChange,
|
|
186
|
-
pointerlockerror: handleError,
|
|
187
|
-
});
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
listen(document, {
|
|
191
|
-
pointerlockchange: handleChange,
|
|
192
|
-
pointerlockerror: handleError,
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
element.requestPointerLock();
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export function checkDateInputSupport(): boolean {
|
|
200
|
-
const input = window.document.createElement('input');
|
|
201
|
-
input.setAttribute('type', 'date');
|
|
202
|
-
|
|
203
|
-
const notADateValue = 'not-a-date';
|
|
204
|
-
input.setAttribute('value', notADateValue);
|
|
205
|
-
|
|
206
|
-
return input.value !== notADateValue;
|
|
207
|
-
}
|
|
208
|
-
//reference: https://stackoverflow.com/a/10199306
|
|
209
|
-
|
|
210
|
-
export const getListPasteHandler = (
|
|
211
|
-
{
|
|
212
|
-
listItemSeparatorRegex = /[\,\n]/,
|
|
213
|
-
handleValue,
|
|
214
|
-
}: {
|
|
215
|
-
listItemSeparatorRegex?: RegExp;
|
|
216
|
-
handleValue?: (arg1: string[]) => unknown;
|
|
217
|
-
},
|
|
218
|
-
): (arg1: ClipboardEvent) => unknown => {
|
|
219
|
-
const handlePaste = (event: ClipboardEvent) => {
|
|
220
|
-
const value = event.clipboardData?.getData('text');
|
|
221
|
-
if (!value || !value.length) {
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
//do nothing if the copied string fails the regex test
|
|
225
|
-
if (!listItemSeparatorRegex.test(value)) {
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
event.preventDefault();
|
|
229
|
-
const parsedValues = value
|
|
230
|
-
.split(listItemSeparatorRegex)
|
|
231
|
-
.reduce<Array<any>>((acc, val) => {
|
|
232
|
-
const newVal = val.trim();
|
|
233
|
-
if (
|
|
234
|
-
// value exists
|
|
235
|
-
!!newVal.length &&
|
|
236
|
-
// value not already in queue
|
|
237
|
-
!acc.includes(newVal)
|
|
238
|
-
) {
|
|
239
|
-
acc.push(newVal);
|
|
240
|
-
}
|
|
241
|
-
return acc;
|
|
242
|
-
}, []);
|
|
243
|
-
handleValue?.(parsedValues);
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
return handlePaste;
|
|
247
|
-
};
|
package/lib/utils/dom/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './dom';
|