@sproutsocial/racine 25.11.0 → 26.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/dist/esm/index.js +1461 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/index.d.mts +430 -0
- package/dist/index.d.ts +430 -0
- package/dist/index.js +1559 -0
- package/dist/index.js.map +1 -0
- package/package.json +30 -139
- package/commonjs/Avatar/Avatar.js +0 -151
- package/commonjs/Avatar/AvatarTypes.js +0 -5
- package/commonjs/Avatar/constants.js +0 -16
- package/commonjs/Avatar/index.js +0 -38
- package/commonjs/Badge/Badge.js +0 -68
- package/commonjs/Badge/BadgeTypes.js +0 -5
- package/commonjs/Badge/constants.js +0 -62
- package/commonjs/Badge/index.js +0 -42
- package/commonjs/Badge/styles.js +0 -26
- package/commonjs/Banner/Banner.js +0 -100
- package/commonjs/Banner/BannerTypes.js +0 -5
- package/commonjs/Banner/index.js +0 -30
- package/commonjs/Banner/styles.js +0 -24
- package/commonjs/Box/Box.js +0 -35
- package/commonjs/Box/BoxTypes.js +0 -5
- package/commonjs/Box/index.js +0 -30
- package/commonjs/Box/styles.js +0 -17
- package/commonjs/Breadcrumb/Breadcrumb.js +0 -84
- package/commonjs/Breadcrumb/BreadcrumbTypes.js +0 -5
- package/commonjs/Breadcrumb/index.js +0 -30
- package/commonjs/Breadcrumb/styles.js +0 -29
- package/commonjs/Button/Button.js +0 -65
- package/commonjs/Button/ButtonTypes.js +0 -5
- package/commonjs/Button/index.js +0 -30
- package/commonjs/Button/styles.js +0 -59
- package/commonjs/Card/Card.js +0 -101
- package/commonjs/Card/CardTypes.js +0 -5
- package/commonjs/Card/index.js +0 -59
- package/commonjs/Card/styles.js +0 -130
- package/commonjs/Card/subComponents.js +0 -106
- package/commonjs/Card/utils.js +0 -59
- package/commonjs/CharacterCounter/CharacterCounter.js +0 -58
- package/commonjs/CharacterCounter/CharacterCounterTypes.js +0 -5
- package/commonjs/CharacterCounter/index.js +0 -30
- package/commonjs/CharacterCounter/styles.js +0 -26
- package/commonjs/ChartLegend/ChartLegend.js +0 -39
- package/commonjs/ChartLegend/ChartLegendTypes.js +0 -5
- package/commonjs/ChartLegend/index.js +0 -30
- package/commonjs/ChartLegend/styles.js +0 -38
- package/commonjs/ChartLegend/useChartLabels.js +0 -42
- package/commonjs/Checkbox/Checkbox.js +0 -153
- package/commonjs/Checkbox/CheckboxTypes.js +0 -5
- package/commonjs/Checkbox/index.js +0 -30
- package/commonjs/Checkbox/styles.js +0 -138
- package/commonjs/Collapsible/Collapsible.js +0 -145
- package/commonjs/Collapsible/CollapsibleTypes.js +0 -5
- package/commonjs/Collapsible/index.js +0 -30
- package/commonjs/Collapsible/styles.js +0 -21
- package/commonjs/DatePicker/DateRangePicker/DateRangePicker.js +0 -86
- package/commonjs/DatePicker/DateRangePicker/DateRangePickerTypes.js +0 -5
- package/commonjs/DatePicker/DateRangePicker/StatefulDateRangePicker.js +0 -65
- package/commonjs/DatePicker/DateRangePicker/index.js +0 -42
- package/commonjs/DatePicker/SingleDatePicker/SingleDatePicker.js +0 -82
- package/commonjs/DatePicker/SingleDatePicker/SingleDatePickerTypes.js +0 -5
- package/commonjs/DatePicker/SingleDatePicker/StatefulSingleDatePicker.js +0 -44
- package/commonjs/DatePicker/SingleDatePicker/index.js +0 -42
- package/commonjs/DatePicker/common.js +0 -69
- package/commonjs/DatePicker/index.js +0 -27
- package/commonjs/DatePicker/styles.js +0 -128
- package/commonjs/DatePicker/types.js +0 -5
- package/commonjs/Drawer/Drawer.js +0 -279
- package/commonjs/Drawer/DrawerTypes.js +0 -5
- package/commonjs/Drawer/index.js +0 -30
- package/commonjs/Drawer/styles.js +0 -30
- package/commonjs/Duration/Duration.js +0 -111
- package/commonjs/Duration/DurationTypes.js +0 -5
- package/commonjs/Duration/constants.js +0 -27
- package/commonjs/Duration/index.js +0 -47
- package/commonjs/Duration/styles.js +0 -13
- package/commonjs/Duration/utils.js +0 -76
- package/commonjs/EmptyState/EmptyState.js +0 -72
- package/commonjs/EmptyState/EmptyStateTypes.js +0 -5
- package/commonjs/EmptyState/index.js +0 -30
- package/commonjs/Fieldset/Fieldset.js +0 -86
- package/commonjs/Fieldset/FieldsetTypes.js +0 -5
- package/commonjs/Fieldset/index.js +0 -30
- package/commonjs/Fieldset/styles.js +0 -20
- package/commonjs/FormField/FormField.js +0 -93
- package/commonjs/FormField/FormFieldTypes.js +0 -5
- package/commonjs/FormField/index.js +0 -30
- package/commonjs/Icon/Icon.js +0 -147
- package/commonjs/Icon/IconTypes.js +0 -5
- package/commonjs/Icon/index.js +0 -30
- package/commonjs/Icon/styles.js +0 -33
- package/commonjs/IllustrationViewBoxes.d.js +0 -5
- package/commonjs/Image/Image.js +0 -128
- package/commonjs/Image/ImageTypes.js +0 -5
- package/commonjs/Image/index.js +0 -30
- package/commonjs/Image/styles.js +0 -20
- package/commonjs/Indicator/Indicator.js +0 -65
- package/commonjs/Indicator/IndicatorTypes.js +0 -5
- package/commonjs/Indicator/index.js +0 -30
- package/commonjs/Indicator/styles.js +0 -24
- package/commonjs/Input/Input.js +0 -294
- package/commonjs/Input/InputTypes.js +0 -5
- package/commonjs/Input/index.js +0 -30
- package/commonjs/Input/styles.js +0 -97
- package/commonjs/KeyboardKey/KeyboardKey.js +0 -56
- package/commonjs/KeyboardKey/KeyboardKeyTypes.js +0 -5
- package/commonjs/KeyboardKey/index.js +0 -30
- package/commonjs/KeyboardKey/styles.js +0 -26
- package/commonjs/Label/Label.js +0 -75
- package/commonjs/Label/LabelTypes.js +0 -5
- package/commonjs/Label/index.js +0 -30
- package/commonjs/Link/Link.js +0 -55
- package/commonjs/Link/LinkTypes.js +0 -5
- package/commonjs/Link/constants.js +0 -17
- package/commonjs/Link/index.js +0 -42
- package/commonjs/Link/styles.js +0 -37
- package/commonjs/Listbox/Listbox.js +0 -128
- package/commonjs/Listbox/ListboxTypes.js +0 -5
- package/commonjs/Listbox/index.js +0 -39
- package/commonjs/Loader/Loader.js +0 -66
- package/commonjs/Loader/LoaderTypes.js +0 -5
- package/commonjs/Loader/index.js +0 -30
- package/commonjs/Loader/styles.js +0 -42
- package/commonjs/LoaderButton/LoaderButton.js +0 -77
- package/commonjs/LoaderButton/LoaderButtonTypes.js +0 -5
- package/commonjs/LoaderButton/index.js +0 -30
- package/commonjs/LogoViewBoxes.d.js +0 -5
- package/commonjs/Menu/Menu.js +0 -635
- package/commonjs/Menu/MenuTypes.js +0 -5
- package/commonjs/Menu/index.js +0 -63
- package/commonjs/Menu/styles.js +0 -62
- package/commonjs/Menu/utils/constants.js +0 -18
- package/commonjs/Menu/utils/descendants.js +0 -351
- package/commonjs/Menu/utils/hooks.js +0 -176
- package/commonjs/Menu/utils/index.js +0 -38
- package/commonjs/Message/Message.js +0 -174
- package/commonjs/Message/MessageTypes.js +0 -5
- package/commonjs/Message/constants.js +0 -13
- package/commonjs/Message/index.js +0 -42
- package/commonjs/Message/styles.js +0 -127
- package/commonjs/Modal/Modal.js +0 -161
- package/commonjs/Modal/ModalTypes.js +0 -5
- package/commonjs/Modal/index.js +0 -30
- package/commonjs/Modal/styles.js +0 -110
- package/commonjs/Numeral/Numeral.js +0 -183
- package/commonjs/Numeral/NumeralTypes.js +0 -5
- package/commonjs/Numeral/constants.js +0 -16
- package/commonjs/Numeral/index.js +0 -39
- package/commonjs/Numeral/styles.js +0 -19
- package/commonjs/PartnerLogo/PartnerLogo.js +0 -82
- package/commonjs/PartnerLogo/PartnerLogoTypes.js +0 -24
- package/commonjs/PartnerLogo/index.js +0 -30
- package/commonjs/PartnerLogo/styles.js +0 -31
- package/commonjs/Portal/Portal.js +0 -87
- package/commonjs/Portal/PortalTypes.js +0 -5
- package/commonjs/Portal/index.js +0 -22
- package/commonjs/Radio/Radio.js +0 -116
- package/commonjs/Radio/RadioTypes.js +0 -5
- package/commonjs/Radio/index.js +0 -30
- package/commonjs/Radio/styles.js +0 -77
- package/commonjs/SegmentedControl/SegmentedControl.js +0 -105
- package/commonjs/SegmentedControl/SegmentedControlTypes.js +0 -5
- package/commonjs/SegmentedControl/index.js +0 -30
- package/commonjs/SegmentedControl/styles.js +0 -60
- package/commonjs/Select/Select.js +0 -110
- package/commonjs/Select/SelectTypes.js +0 -5
- package/commonjs/Select/index.js +0 -30
- package/commonjs/Select/styles.js +0 -94
- package/commonjs/Skeleton/Skeleton.js +0 -43
- package/commonjs/Skeleton/index.js +0 -15
- package/commonjs/SpotIllustration/SpotIllustration.js +0 -53
- package/commonjs/SpotIllustration/SpotIllustrationTypes.js +0 -5
- package/commonjs/SpotIllustration/illustrationNames.js +0 -7
- package/commonjs/SpotIllustration/index.js +0 -30
- package/commonjs/Stack/Stack.js +0 -117
- package/commonjs/Stack/StackTypes.js +0 -5
- package/commonjs/Stack/index.js +0 -30
- package/commonjs/StatefulStory.js +0 -38
- package/commonjs/Switch/Switch.js +0 -65
- package/commonjs/Switch/SwitchTypes.js +0 -5
- package/commonjs/Switch/index.js +0 -30
- package/commonjs/Switch/styles.js +0 -71
- package/commonjs/Table/Table.js +0 -134
- package/commonjs/Table/TableTypes.js +0 -5
- package/commonjs/Table/index.js +0 -30
- package/commonjs/Table/styles.js +0 -16
- package/commonjs/TableCell/TableCell.js +0 -73
- package/commonjs/TableCell/TableCellTypes.js +0 -5
- package/commonjs/TableCell/index.js +0 -30
- package/commonjs/TableCell/styles.js +0 -22
- package/commonjs/TableHeaderCell/TableHeaderCell.js +0 -133
- package/commonjs/TableHeaderCell/TableHeaderCellTypes.js +0 -5
- package/commonjs/TableHeaderCell/constants.js +0 -10
- package/commonjs/TableHeaderCell/index.js +0 -42
- package/commonjs/TableHeaderCell/styles.js +0 -36
- package/commonjs/TableRowAccordion/TableRowAccordion.js +0 -111
- package/commonjs/TableRowAccordion/TableRowAccordionTypes.js +0 -5
- package/commonjs/TableRowAccordion/index.js +0 -30
- package/commonjs/TableRowAccordion/styles.js +0 -28
- package/commonjs/Tabs/Tabs.js +0 -215
- package/commonjs/Tabs/TabsTypes.js +0 -5
- package/commonjs/Tabs/index.js +0 -30
- package/commonjs/Tabs/styles.js +0 -58
- package/commonjs/Text/Text.js +0 -118
- package/commonjs/Text/TextTypes.js +0 -5
- package/commonjs/Text/index.js +0 -30
- package/commonjs/Text/styles.js +0 -26
- package/commonjs/Textarea/Textarea.js +0 -155
- package/commonjs/Textarea/TextareaTypes.js +0 -5
- package/commonjs/Textarea/index.js +0 -30
- package/commonjs/Textarea/styles.js +0 -67
- package/commonjs/ThemeProvider/index.js +0 -24
- package/commonjs/Toast/Toast.js +0 -166
- package/commonjs/Toast/ToastTypes.js +0 -5
- package/commonjs/Toast/index.js +0 -39
- package/commonjs/Toast/styles.js +0 -71
- package/commonjs/ToggleHint/ToggleHint.js +0 -96
- package/commonjs/ToggleHint/ToggleHintTypes.js +0 -5
- package/commonjs/ToggleHint/index.js +0 -30
- package/commonjs/ToggleHint/styles.js +0 -27
- package/commonjs/Token/Token.js +0 -88
- package/commonjs/Token/TokenTypes.js +0 -5
- package/commonjs/Token/index.js +0 -31
- package/commonjs/Token/styles.js +0 -37
- package/commonjs/TokenInput/TokenInput.js +0 -325
- package/commonjs/TokenInput/TokenInputTypes.js +0 -5
- package/commonjs/TokenInput/TokenScreenReaderStatus.js +0 -52
- package/commonjs/TokenInput/index.js +0 -30
- package/commonjs/TokenInput/styles.js +0 -82
- package/commonjs/TokenInput/util.js +0 -24
- package/commonjs/Tooltip/Tooltip.js +0 -193
- package/commonjs/Tooltip/TooltipTypes.js +0 -5
- package/commonjs/Tooltip/index.js +0 -30
- package/commonjs/Tooltip/styles.js +0 -19
- package/commonjs/VisuallyHidden/VisuallyHidden.js +0 -13
- package/commonjs/VisuallyHidden/index.js +0 -16
- package/commonjs/index.js +0 -760
- package/commonjs/react.d.js +0 -1
- package/commonjs/styled.d.js +0 -3
- package/commonjs/systemProps/index.js +0 -85
- package/commonjs/themes/dark/dataviz-palette.js +0 -33
- package/commonjs/themes/dark/decorative-palettes.js +0 -63
- package/commonjs/themes/dark/theme.js +0 -268
- package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +0 -240
- package/commonjs/themes/extendedThemes/sproutTheme/index.js +0 -20
- package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +0 -237
- package/commonjs/themes/light/dataviz-palette.js +0 -33
- package/commonjs/themes/light/decorative-palettes.js +0 -63
- package/commonjs/themes/light/literal-colors.js +0 -167
- package/commonjs/themes/light/theme.js +0 -425
- package/commonjs/types/index.js +0 -49
- package/commonjs/types/shared.js +0 -5
- package/commonjs/types/styled-components.js +0 -5
- package/commonjs/types/system-props.js +0 -5
- package/commonjs/types/theme.colors.js +0 -5
- package/commonjs/types/theme.js +0 -5
- package/commonjs/utils/a11yTest.js +0 -33
- package/commonjs/utils/chartColors.js +0 -15
- package/commonjs/utils/constants.js +0 -7
- package/commonjs/utils/dataQaLabelQueries.js +0 -70
- package/commonjs/utils/hooks.js +0 -204
- package/commonjs/utils/index.js +0 -63
- package/commonjs/utils/innerText.js +0 -37
- package/commonjs/utils/mixins.js +0 -19
- package/commonjs/utils/responsiveProps/index.js +0 -39
- package/commonjs/utils/system-props/index.js +0 -16
- package/commonjs/utils/use-measure.js +0 -65
- package/commonjs/utils/useInteractiveColor.js +0 -31
- package/dist/dynamicProps.json +0 -1
- package/dist/dynamicPropsRaw.json +0 -1
- package/dist/types/Avatar/Avatar.d.ts +0 -6
- package/dist/types/Avatar/Avatar.d.ts.map +0 -1
- package/dist/types/Avatar/AvatarTypes.d.ts +0 -21
- package/dist/types/Avatar/AvatarTypes.d.ts.map +0 -1
- package/dist/types/Avatar/constants.d.ts +0 -11
- package/dist/types/Avatar/constants.d.ts.map +0 -1
- package/dist/types/Avatar/index.d.ts +0 -6
- package/dist/types/Avatar/index.d.ts.map +0 -1
- package/dist/types/Badge/Badge.d.ts +0 -4
- package/dist/types/Badge/Badge.d.ts.map +0 -1
- package/dist/types/Badge/BadgeTypes.d.ts +0 -21
- package/dist/types/Badge/BadgeTypes.d.ts.map +0 -1
- package/dist/types/Badge/constants.d.ts +0 -47
- package/dist/types/Badge/constants.d.ts.map +0 -1
- package/dist/types/Badge/index.d.ts +0 -6
- package/dist/types/Badge/index.d.ts.map +0 -1
- package/dist/types/Badge/styles.d.ts +0 -7
- package/dist/types/Badge/styles.d.ts.map +0 -1
- package/dist/types/Banner/Banner.d.ts +0 -5
- package/dist/types/Banner/Banner.d.ts.map +0 -1
- package/dist/types/Banner/BannerTypes.d.ts +0 -17
- package/dist/types/Banner/BannerTypes.d.ts.map +0 -1
- package/dist/types/Banner/__tests__/BannerTypes.d.ts +0 -2
- package/dist/types/Banner/__tests__/BannerTypes.d.ts.map +0 -1
- package/dist/types/Banner/index.d.ts +0 -5
- package/dist/types/Banner/index.d.ts.map +0 -1
- package/dist/types/Banner/styles.d.ts +0 -14
- package/dist/types/Banner/styles.d.ts.map +0 -1
- package/dist/types/Box/Box.d.ts +0 -5
- package/dist/types/Box/Box.d.ts.map +0 -1
- package/dist/types/Box/BoxTypes.d.ts +0 -7
- package/dist/types/Box/BoxTypes.d.ts.map +0 -1
- package/dist/types/Box/index.d.ts +0 -5
- package/dist/types/Box/index.d.ts.map +0 -1
- package/dist/types/Box/styles.d.ts +0 -4
- package/dist/types/Box/styles.d.ts.map +0 -1
- package/dist/types/Breadcrumb/Breadcrumb.d.ts +0 -13
- package/dist/types/Breadcrumb/Breadcrumb.d.ts.map +0 -1
- package/dist/types/Breadcrumb/BreadcrumbTypes.d.ts +0 -15
- package/dist/types/Breadcrumb/BreadcrumbTypes.d.ts.map +0 -1
- package/dist/types/Breadcrumb/index.d.ts +0 -5
- package/dist/types/Breadcrumb/index.d.ts.map +0 -1
- package/dist/types/Breadcrumb/styles.d.ts +0 -3
- package/dist/types/Breadcrumb/styles.d.ts.map +0 -1
- package/dist/types/Button/Button.d.ts +0 -7
- package/dist/types/Button/Button.d.ts.map +0 -1
- package/dist/types/Button/ButtonTypes.d.ts +0 -30
- package/dist/types/Button/ButtonTypes.d.ts.map +0 -1
- package/dist/types/Button/index.d.ts +0 -5
- package/dist/types/Button/index.d.ts.map +0 -1
- package/dist/types/Button/styles.d.ts +0 -8
- package/dist/types/Button/styles.d.ts.map +0 -1
- package/dist/types/Card/Card.d.ts +0 -17
- package/dist/types/Card/Card.d.ts.map +0 -1
- package/dist/types/Card/CardTypes.d.ts +0 -63
- package/dist/types/Card/CardTypes.d.ts.map +0 -1
- package/dist/types/Card/__tests__/CardTypes.d.ts +0 -2
- package/dist/types/Card/__tests__/CardTypes.d.ts.map +0 -1
- package/dist/types/Card/index.d.ts +0 -6
- package/dist/types/Card/index.d.ts.map +0 -1
- package/dist/types/Card/styles.d.ts +0 -22
- package/dist/types/Card/styles.d.ts.map +0 -1
- package/dist/types/Card/subComponents.d.ts +0 -22
- package/dist/types/Card/subComponents.d.ts.map +0 -1
- package/dist/types/Card/utils.d.ts +0 -16
- package/dist/types/Card/utils.d.ts.map +0 -1
- package/dist/types/CharacterCounter/CharacterCounter.d.ts +0 -9
- package/dist/types/CharacterCounter/CharacterCounter.d.ts.map +0 -1
- package/dist/types/CharacterCounter/CharacterCounterTypes.d.ts +0 -11
- package/dist/types/CharacterCounter/CharacterCounterTypes.d.ts.map +0 -1
- package/dist/types/CharacterCounter/index.d.ts +0 -5
- package/dist/types/CharacterCounter/index.d.ts.map +0 -1
- package/dist/types/CharacterCounter/styles.d.ts +0 -7
- package/dist/types/CharacterCounter/styles.d.ts.map +0 -1
- package/dist/types/ChartLegend/ChartLegend.d.ts +0 -4
- package/dist/types/ChartLegend/ChartLegend.d.ts.map +0 -1
- package/dist/types/ChartLegend/ChartLegendTypes.d.ts +0 -19
- package/dist/types/ChartLegend/ChartLegendTypes.d.ts.map +0 -1
- package/dist/types/ChartLegend/index.d.ts +0 -5
- package/dist/types/ChartLegend/index.d.ts.map +0 -1
- package/dist/types/ChartLegend/styles.d.ts +0 -10
- package/dist/types/ChartLegend/styles.d.ts.map +0 -1
- package/dist/types/ChartLegend/useChartLabels.d.ts +0 -3
- package/dist/types/ChartLegend/useChartLabels.d.ts.map +0 -1
- package/dist/types/Checkbox/Checkbox.d.ts +0 -14
- package/dist/types/Checkbox/Checkbox.d.ts.map +0 -1
- package/dist/types/Checkbox/CheckboxTypes.d.ts +0 -24
- package/dist/types/Checkbox/CheckboxTypes.d.ts.map +0 -1
- package/dist/types/Checkbox/index.d.ts +0 -5
- package/dist/types/Checkbox/index.d.ts.map +0 -1
- package/dist/types/Checkbox/styles.d.ts +0 -28
- package/dist/types/Checkbox/styles.d.ts.map +0 -1
- package/dist/types/Collapsible/Collapsible.d.ts +0 -14
- package/dist/types/Collapsible/Collapsible.d.ts.map +0 -1
- package/dist/types/Collapsible/CollapsibleTypes.d.ts +0 -16
- package/dist/types/Collapsible/CollapsibleTypes.d.ts.map +0 -1
- package/dist/types/Collapsible/index.d.ts +0 -5
- package/dist/types/Collapsible/index.d.ts.map +0 -1
- package/dist/types/Collapsible/styles.d.ts +0 -5
- package/dist/types/Collapsible/styles.d.ts.map +0 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePicker.d.ts +0 -4
- package/dist/types/DatePicker/DateRangePicker/DateRangePicker.d.ts.map +0 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePickerTypes.d.ts +0 -18
- package/dist/types/DatePicker/DateRangePicker/DateRangePickerTypes.d.ts.map +0 -1
- package/dist/types/DatePicker/DateRangePicker/StatefulDateRangePicker.d.ts +0 -3
- package/dist/types/DatePicker/DateRangePicker/StatefulDateRangePicker.d.ts.map +0 -1
- package/dist/types/DatePicker/DateRangePicker/index.d.ts +0 -6
- package/dist/types/DatePicker/DateRangePicker/index.d.ts.map +0 -1
- package/dist/types/DatePicker/SingleDatePicker/SingleDatePicker.d.ts +0 -5
- package/dist/types/DatePicker/SingleDatePicker/SingleDatePicker.d.ts.map +0 -1
- package/dist/types/DatePicker/SingleDatePicker/SingleDatePickerTypes.d.ts +0 -15
- package/dist/types/DatePicker/SingleDatePicker/SingleDatePickerTypes.d.ts.map +0 -1
- package/dist/types/DatePicker/SingleDatePicker/StatefulSingleDatePicker.d.ts +0 -3
- package/dist/types/DatePicker/SingleDatePicker/StatefulSingleDatePicker.d.ts.map +0 -1
- package/dist/types/DatePicker/SingleDatePicker/index.d.ts +0 -6
- package/dist/types/DatePicker/SingleDatePicker/index.d.ts.map +0 -1
- package/dist/types/DatePicker/common.d.ts +0 -16
- package/dist/types/DatePicker/common.d.ts.map +0 -1
- package/dist/types/DatePicker/index.d.ts +0 -3
- package/dist/types/DatePicker/index.d.ts.map +0 -1
- package/dist/types/DatePicker/styles.d.ts +0 -8
- package/dist/types/DatePicker/styles.d.ts.map +0 -1
- package/dist/types/DatePicker/types.d.ts +0 -19
- package/dist/types/DatePicker/types.d.ts.map +0 -1
- package/dist/types/Drawer/Drawer.d.ts +0 -19
- package/dist/types/Drawer/Drawer.d.ts.map +0 -1
- package/dist/types/Drawer/DrawerTypes.d.ts +0 -49
- package/dist/types/Drawer/DrawerTypes.d.ts.map +0 -1
- package/dist/types/Drawer/index.d.ts +0 -5
- package/dist/types/Drawer/index.d.ts.map +0 -1
- package/dist/types/Drawer/styles.d.ts +0 -9
- package/dist/types/Drawer/styles.d.ts.map +0 -1
- package/dist/types/Duration/Duration.d.ts +0 -6
- package/dist/types/Duration/Duration.d.ts.map +0 -1
- package/dist/types/Duration/DurationTypes.d.ts +0 -26
- package/dist/types/Duration/DurationTypes.d.ts.map +0 -1
- package/dist/types/Duration/__tests__/Duration.typetest.d.ts +0 -2
- package/dist/types/Duration/__tests__/Duration.typetest.d.ts.map +0 -1
- package/dist/types/Duration/__tests__/features/testDuration.d.ts +0 -3
- package/dist/types/Duration/__tests__/features/testDuration.d.ts.map +0 -1
- package/dist/types/Duration/constants.d.ts +0 -20
- package/dist/types/Duration/constants.d.ts.map +0 -1
- package/dist/types/Duration/index.d.ts +0 -9
- package/dist/types/Duration/index.d.ts.map +0 -1
- package/dist/types/Duration/styles.d.ts +0 -11
- package/dist/types/Duration/styles.d.ts.map +0 -1
- package/dist/types/Duration/utils.d.ts +0 -16
- package/dist/types/Duration/utils.d.ts.map +0 -1
- package/dist/types/EmptyState/EmptyState.d.ts +0 -4
- package/dist/types/EmptyState/EmptyState.d.ts.map +0 -1
- package/dist/types/EmptyState/EmptyStateTypes.d.ts +0 -15
- package/dist/types/EmptyState/EmptyStateTypes.d.ts.map +0 -1
- package/dist/types/EmptyState/index.d.ts +0 -5
- package/dist/types/EmptyState/index.d.ts.map +0 -1
- package/dist/types/Fieldset/Fieldset.d.ts +0 -23
- package/dist/types/Fieldset/Fieldset.d.ts.map +0 -1
- package/dist/types/Fieldset/FieldsetTypes.d.ts +0 -13
- package/dist/types/Fieldset/FieldsetTypes.d.ts.map +0 -1
- package/dist/types/Fieldset/index.d.ts +0 -5
- package/dist/types/Fieldset/index.d.ts.map +0 -1
- package/dist/types/Fieldset/styles.d.ts +0 -3
- package/dist/types/Fieldset/styles.d.ts.map +0 -1
- package/dist/types/FormField/FormField.d.ts +0 -4
- package/dist/types/FormField/FormField.d.ts.map +0 -1
- package/dist/types/FormField/FormFieldTypes.d.ts +0 -27
- package/dist/types/FormField/FormFieldTypes.d.ts.map +0 -1
- package/dist/types/FormField/index.d.ts +0 -5
- package/dist/types/FormField/index.d.ts.map +0 -1
- package/dist/types/Icon/Icon.d.ts +0 -29
- package/dist/types/Icon/Icon.d.ts.map +0 -1
- package/dist/types/Icon/IconTypes.d.ts +0 -31
- package/dist/types/Icon/IconTypes.d.ts.map +0 -1
- package/dist/types/Icon/index.d.ts +0 -5
- package/dist/types/Icon/index.d.ts.map +0 -1
- package/dist/types/Icon/styles.d.ts +0 -9
- package/dist/types/Icon/styles.d.ts.map +0 -1
- package/dist/types/Image/Image.d.ts +0 -29
- package/dist/types/Image/Image.d.ts.map +0 -1
- package/dist/types/Image/ImageTypes.d.ts +0 -17
- package/dist/types/Image/ImageTypes.d.ts.map +0 -1
- package/dist/types/Image/index.d.ts +0 -5
- package/dist/types/Image/index.d.ts.map +0 -1
- package/dist/types/Image/styles.d.ts +0 -8
- package/dist/types/Image/styles.d.ts.map +0 -1
- package/dist/types/Indicator/Indicator.d.ts +0 -9
- package/dist/types/Indicator/Indicator.d.ts.map +0 -1
- package/dist/types/Indicator/IndicatorTypes.d.ts +0 -7
- package/dist/types/Indicator/IndicatorTypes.d.ts.map +0 -1
- package/dist/types/Indicator/index.d.ts +0 -5
- package/dist/types/Indicator/index.d.ts.map +0 -1
- package/dist/types/Indicator/styles.d.ts +0 -5
- package/dist/types/Indicator/styles.d.ts.map +0 -1
- package/dist/types/Input/Input.d.ts +0 -32
- package/dist/types/Input/Input.d.ts.map +0 -1
- package/dist/types/Input/InputTypes.d.ts +0 -74
- package/dist/types/Input/InputTypes.d.ts.map +0 -1
- package/dist/types/Input/index.d.ts +0 -5
- package/dist/types/Input/index.d.ts.map +0 -1
- package/dist/types/Input/styles.d.ts +0 -9
- package/dist/types/Input/styles.d.ts.map +0 -1
- package/dist/types/KeyboardKey/KeyboardKey.d.ts +0 -6
- package/dist/types/KeyboardKey/KeyboardKey.d.ts.map +0 -1
- package/dist/types/KeyboardKey/KeyboardKeyTypes.d.ts +0 -8
- package/dist/types/KeyboardKey/KeyboardKeyTypes.d.ts.map +0 -1
- package/dist/types/KeyboardKey/index.d.ts +0 -5
- package/dist/types/KeyboardKey/index.d.ts.map +0 -1
- package/dist/types/KeyboardKey/styles.d.ts +0 -3
- package/dist/types/KeyboardKey/styles.d.ts.map +0 -1
- package/dist/types/Label/Label.d.ts +0 -6
- package/dist/types/Label/Label.d.ts.map +0 -1
- package/dist/types/Label/LabelTypes.d.ts +0 -9
- package/dist/types/Label/LabelTypes.d.ts.map +0 -1
- package/dist/types/Label/index.d.ts +0 -5
- package/dist/types/Label/index.d.ts.map +0 -1
- package/dist/types/Link/Link.d.ts +0 -4
- package/dist/types/Link/Link.d.ts.map +0 -1
- package/dist/types/Link/LinkTypes.d.ts +0 -21
- package/dist/types/Link/LinkTypes.d.ts.map +0 -1
- package/dist/types/Link/constants.d.ts +0 -10
- package/dist/types/Link/constants.d.ts.map +0 -1
- package/dist/types/Link/index.d.ts +0 -6
- package/dist/types/Link/index.d.ts.map +0 -1
- package/dist/types/Link/styles.d.ts +0 -13
- package/dist/types/Link/styles.d.ts.map +0 -1
- package/dist/types/Listbox/Listbox.d.ts +0 -53
- package/dist/types/Listbox/Listbox.d.ts.map +0 -1
- package/dist/types/Listbox/ListboxTypes.d.ts +0 -15
- package/dist/types/Listbox/ListboxTypes.d.ts.map +0 -1
- package/dist/types/Listbox/index.d.ts +0 -5
- package/dist/types/Listbox/index.d.ts.map +0 -1
- package/dist/types/Loader/Loader.d.ts +0 -12
- package/dist/types/Loader/Loader.d.ts.map +0 -1
- package/dist/types/Loader/LoaderTypes.d.ts +0 -13
- package/dist/types/Loader/LoaderTypes.d.ts.map +0 -1
- package/dist/types/Loader/index.d.ts +0 -5
- package/dist/types/Loader/index.d.ts.map +0 -1
- package/dist/types/Loader/styles.d.ts +0 -9
- package/dist/types/Loader/styles.d.ts.map +0 -1
- package/dist/types/LoaderButton/LoaderButton.d.ts +0 -4
- package/dist/types/LoaderButton/LoaderButton.d.ts.map +0 -1
- package/dist/types/LoaderButton/LoaderButtonTypes.d.ts +0 -6
- package/dist/types/LoaderButton/LoaderButtonTypes.d.ts.map +0 -1
- package/dist/types/LoaderButton/index.d.ts +0 -5
- package/dist/types/LoaderButton/index.d.ts.map +0 -1
- package/dist/types/Menu/Menu.d.ts +0 -89
- package/dist/types/Menu/Menu.d.ts.map +0 -1
- package/dist/types/Menu/MenuTypes.d.ts +0 -102
- package/dist/types/Menu/MenuTypes.d.ts.map +0 -1
- package/dist/types/Menu/index.d.ts +0 -7
- package/dist/types/Menu/index.d.ts.map +0 -1
- package/dist/types/Menu/styles.d.ts +0 -4
- package/dist/types/Menu/styles.d.ts.map +0 -1
- package/dist/types/Menu/utils/constants.d.ts +0 -13
- package/dist/types/Menu/utils/constants.d.ts.map +0 -1
- package/dist/types/Menu/utils/descendants.d.ts +0 -87
- package/dist/types/Menu/utils/descendants.d.ts.map +0 -1
- package/dist/types/Menu/utils/hooks.d.ts +0 -19
- package/dist/types/Menu/utils/hooks.d.ts.map +0 -1
- package/dist/types/Menu/utils/index.d.ts +0 -4
- package/dist/types/Menu/utils/index.d.ts.map +0 -1
- package/dist/types/Message/Message.d.ts +0 -50
- package/dist/types/Message/Message.d.ts.map +0 -1
- package/dist/types/Message/MessageTypes.d.ts +0 -18
- package/dist/types/Message/MessageTypes.d.ts.map +0 -1
- package/dist/types/Message/constants.d.ts +0 -7
- package/dist/types/Message/constants.d.ts.map +0 -1
- package/dist/types/Message/index.d.ts +0 -6
- package/dist/types/Message/index.d.ts.map +0 -1
- package/dist/types/Message/styles.d.ts +0 -10
- package/dist/types/Message/styles.d.ts.map +0 -1
- package/dist/types/Modal/Modal.d.ts +0 -30
- package/dist/types/Modal/Modal.d.ts.map +0 -1
- package/dist/types/Modal/ModalTypes.d.ts +0 -46
- package/dist/types/Modal/ModalTypes.d.ts.map +0 -1
- package/dist/types/Modal/index.d.ts +0 -5
- package/dist/types/Modal/index.d.ts.map +0 -1
- package/dist/types/Modal/styles.d.ts +0 -14
- package/dist/types/Modal/styles.d.ts.map +0 -1
- package/dist/types/Numeral/Numeral.d.ts +0 -6
- package/dist/types/Numeral/Numeral.d.ts.map +0 -1
- package/dist/types/Numeral/NumeralTypes.d.ts +0 -20
- package/dist/types/Numeral/NumeralTypes.d.ts.map +0 -1
- package/dist/types/Numeral/__tests__/features/testNumeral.d.ts +0 -3
- package/dist/types/Numeral/__tests__/features/testNumeral.d.ts.map +0 -1
- package/dist/types/Numeral/constants.d.ts +0 -10
- package/dist/types/Numeral/constants.d.ts.map +0 -1
- package/dist/types/Numeral/index.d.ts +0 -6
- package/dist/types/Numeral/index.d.ts.map +0 -1
- package/dist/types/Numeral/styles.d.ts +0 -21
- package/dist/types/Numeral/styles.d.ts.map +0 -1
- package/dist/types/PartnerLogo/PartnerLogo.d.ts +0 -4
- package/dist/types/PartnerLogo/PartnerLogo.d.ts.map +0 -1
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts +0 -34
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts.map +0 -1
- package/dist/types/PartnerLogo/index.d.ts +0 -5
- package/dist/types/PartnerLogo/index.d.ts.map +0 -1
- package/dist/types/PartnerLogo/styles.d.ts +0 -7
- package/dist/types/PartnerLogo/styles.d.ts.map +0 -1
- package/dist/types/Portal/Portal.d.ts +0 -14
- package/dist/types/Portal/Portal.d.ts.map +0 -1
- package/dist/types/Portal/PortalTypes.d.ts +0 -9
- package/dist/types/Portal/PortalTypes.d.ts.map +0 -1
- package/dist/types/Portal/index.d.ts +0 -4
- package/dist/types/Portal/index.d.ts.map +0 -1
- package/dist/types/Radio/Radio.d.ts +0 -15
- package/dist/types/Radio/Radio.d.ts.map +0 -1
- package/dist/types/Radio/RadioTypes.d.ts +0 -21
- package/dist/types/Radio/RadioTypes.d.ts.map +0 -1
- package/dist/types/Radio/index.d.ts +0 -5
- package/dist/types/Radio/index.d.ts.map +0 -1
- package/dist/types/Radio/styles.d.ts +0 -20
- package/dist/types/Radio/styles.d.ts.map +0 -1
- package/dist/types/SegmentedControl/SegmentedControl.d.ts +0 -10
- package/dist/types/SegmentedControl/SegmentedControl.d.ts.map +0 -1
- package/dist/types/SegmentedControl/SegmentedControlTypes.d.ts +0 -21
- package/dist/types/SegmentedControl/SegmentedControlTypes.d.ts.map +0 -1
- package/dist/types/SegmentedControl/index.d.ts +0 -5
- package/dist/types/SegmentedControl/index.d.ts.map +0 -1
- package/dist/types/SegmentedControl/styles.d.ts +0 -18
- package/dist/types/SegmentedControl/styles.d.ts.map +0 -1
- package/dist/types/Select/Select.d.ts +0 -10
- package/dist/types/Select/Select.d.ts.map +0 -1
- package/dist/types/Select/SelectTypes.d.ts +0 -27
- package/dist/types/Select/SelectTypes.d.ts.map +0 -1
- package/dist/types/Select/index.d.ts +0 -5
- package/dist/types/Select/index.d.ts.map +0 -1
- package/dist/types/Select/styles.d.ts +0 -8
- package/dist/types/Select/styles.d.ts.map +0 -1
- package/dist/types/Skeleton/Skeleton.d.ts +0 -5
- package/dist/types/Skeleton/Skeleton.d.ts.map +0 -1
- package/dist/types/Skeleton/index.d.ts +0 -4
- package/dist/types/Skeleton/index.d.ts.map +0 -1
- package/dist/types/SpotIllustration/SpotIllustration.d.ts +0 -4
- package/dist/types/SpotIllustration/SpotIllustration.d.ts.map +0 -1
- package/dist/types/SpotIllustration/SpotIllustrationTypes.d.ts +0 -9
- package/dist/types/SpotIllustration/SpotIllustrationTypes.d.ts.map +0 -1
- package/dist/types/SpotIllustration/__tests__/SpotIllustrationTypes.d.ts +0 -2
- package/dist/types/SpotIllustration/__tests__/SpotIllustrationTypes.d.ts.map +0 -1
- package/dist/types/SpotIllustration/illustrationNames.d.ts +0 -2
- package/dist/types/SpotIllustration/illustrationNames.d.ts.map +0 -1
- package/dist/types/SpotIllustration/index.d.ts +0 -5
- package/dist/types/SpotIllustration/index.d.ts.map +0 -1
- package/dist/types/Stack/Stack.d.ts +0 -4
- package/dist/types/Stack/Stack.d.ts.map +0 -1
- package/dist/types/Stack/StackTypes.d.ts +0 -17
- package/dist/types/Stack/StackTypes.d.ts.map +0 -1
- package/dist/types/Stack/index.d.ts +0 -5
- package/dist/types/Stack/index.d.ts.map +0 -1
- package/dist/types/StatefulStory.d.ts +0 -22
- package/dist/types/StatefulStory.d.ts.map +0 -1
- package/dist/types/Switch/Switch.d.ts +0 -16
- package/dist/types/Switch/Switch.d.ts.map +0 -1
- package/dist/types/Switch/SwitchTypes.d.ts +0 -10
- package/dist/types/Switch/SwitchTypes.d.ts.map +0 -1
- package/dist/types/Switch/index.d.ts +0 -5
- package/dist/types/Switch/index.d.ts.map +0 -1
- package/dist/types/Switch/styles.d.ts +0 -6
- package/dist/types/Switch/styles.d.ts.map +0 -1
- package/dist/types/Table/Table.d.ts +0 -37
- package/dist/types/Table/Table.d.ts.map +0 -1
- package/dist/types/Table/TableTypes.d.ts +0 -35
- package/dist/types/Table/TableTypes.d.ts.map +0 -1
- package/dist/types/Table/index.d.ts +0 -5
- package/dist/types/Table/index.d.ts.map +0 -1
- package/dist/types/Table/styles.d.ts +0 -3
- package/dist/types/Table/styles.d.ts.map +0 -1
- package/dist/types/TableCell/TableCell.d.ts +0 -11
- package/dist/types/TableCell/TableCell.d.ts.map +0 -1
- package/dist/types/TableCell/TableCellTypes.d.ts +0 -19
- package/dist/types/TableCell/TableCellTypes.d.ts.map +0 -1
- package/dist/types/TableCell/index.d.ts +0 -5
- package/dist/types/TableCell/index.d.ts.map +0 -1
- package/dist/types/TableCell/styles.d.ts +0 -6
- package/dist/types/TableCell/styles.d.ts.map +0 -1
- package/dist/types/TableHeaderCell/TableHeaderCell.d.ts +0 -10
- package/dist/types/TableHeaderCell/TableHeaderCell.d.ts.map +0 -1
- package/dist/types/TableHeaderCell/TableHeaderCellTypes.d.ts +0 -19
- package/dist/types/TableHeaderCell/TableHeaderCellTypes.d.ts.map +0 -1
- package/dist/types/TableHeaderCell/constants.d.ts +0 -5
- package/dist/types/TableHeaderCell/constants.d.ts.map +0 -1
- package/dist/types/TableHeaderCell/index.d.ts +0 -6
- package/dist/types/TableHeaderCell/index.d.ts.map +0 -1
- package/dist/types/TableHeaderCell/styles.d.ts +0 -10
- package/dist/types/TableHeaderCell/styles.d.ts.map +0 -1
- package/dist/types/TableRowAccordion/TableRowAccordion.d.ts +0 -10
- package/dist/types/TableRowAccordion/TableRowAccordion.d.ts.map +0 -1
- package/dist/types/TableRowAccordion/TableRowAccordionTypes.d.ts +0 -12
- package/dist/types/TableRowAccordion/TableRowAccordionTypes.d.ts.map +0 -1
- package/dist/types/TableRowAccordion/index.d.ts +0 -5
- package/dist/types/TableRowAccordion/index.d.ts.map +0 -1
- package/dist/types/TableRowAccordion/styles.d.ts +0 -7
- package/dist/types/TableRowAccordion/styles.d.ts.map +0 -1
- package/dist/types/Tabs/Tabs.d.ts +0 -41
- package/dist/types/Tabs/Tabs.d.ts.map +0 -1
- package/dist/types/Tabs/TabsTypes.d.ts +0 -19
- package/dist/types/Tabs/TabsTypes.d.ts.map +0 -1
- package/dist/types/Tabs/index.d.ts +0 -5
- package/dist/types/Tabs/index.d.ts.map +0 -1
- package/dist/types/Tabs/styles.d.ts +0 -15
- package/dist/types/Tabs/styles.d.ts.map +0 -1
- package/dist/types/Text/Text.d.ts +0 -13
- package/dist/types/Text/Text.d.ts.map +0 -1
- package/dist/types/Text/TextTypes.d.ts +0 -18
- package/dist/types/Text/TextTypes.d.ts.map +0 -1
- package/dist/types/Text/index.d.ts +0 -5
- package/dist/types/Text/index.d.ts.map +0 -1
- package/dist/types/Text/styles.d.ts +0 -4
- package/dist/types/Text/styles.d.ts.map +0 -1
- package/dist/types/Textarea/Textarea.d.ts +0 -18
- package/dist/types/Textarea/Textarea.d.ts.map +0 -1
- package/dist/types/Textarea/TextareaTypes.d.ts +0 -65
- package/dist/types/Textarea/TextareaTypes.d.ts.map +0 -1
- package/dist/types/Textarea/index.d.ts +0 -5
- package/dist/types/Textarea/index.d.ts.map +0 -1
- package/dist/types/Textarea/styles.d.ts +0 -5
- package/dist/types/Textarea/styles.d.ts.map +0 -1
- package/dist/types/ThemeProvider/index.d.ts +0 -10
- package/dist/types/ThemeProvider/index.d.ts.map +0 -1
- package/dist/types/Toast/Toast.d.ts +0 -25
- package/dist/types/Toast/Toast.d.ts.map +0 -1
- package/dist/types/Toast/ToastTypes.d.ts +0 -33
- package/dist/types/Toast/ToastTypes.d.ts.map +0 -1
- package/dist/types/Toast/index.d.ts +0 -4
- package/dist/types/Toast/index.d.ts.map +0 -1
- package/dist/types/Toast/styles.d.ts +0 -12
- package/dist/types/Toast/styles.d.ts.map +0 -1
- package/dist/types/ToggleHint/ToggleHint.d.ts +0 -17
- package/dist/types/ToggleHint/ToggleHint.d.ts.map +0 -1
- package/dist/types/ToggleHint/ToggleHintTypes.d.ts +0 -12
- package/dist/types/ToggleHint/ToggleHintTypes.d.ts.map +0 -1
- package/dist/types/ToggleHint/index.d.ts +0 -5
- package/dist/types/ToggleHint/index.d.ts.map +0 -1
- package/dist/types/ToggleHint/styles.d.ts +0 -5
- package/dist/types/ToggleHint/styles.d.ts.map +0 -1
- package/dist/types/Token/Token.d.ts +0 -4
- package/dist/types/Token/Token.d.ts.map +0 -1
- package/dist/types/Token/TokenTypes.d.ts +0 -18
- package/dist/types/Token/TokenTypes.d.ts.map +0 -1
- package/dist/types/Token/index.d.ts +0 -5
- package/dist/types/Token/index.d.ts.map +0 -1
- package/dist/types/Token/styles.d.ts +0 -4
- package/dist/types/Token/styles.d.ts.map +0 -1
- package/dist/types/TokenInput/TokenInput.d.ts +0 -28
- package/dist/types/TokenInput/TokenInput.d.ts.map +0 -1
- package/dist/types/TokenInput/TokenInputTypes.d.ts +0 -78
- package/dist/types/TokenInput/TokenInputTypes.d.ts.map +0 -1
- package/dist/types/TokenInput/index.d.ts +0 -5
- package/dist/types/TokenInput/index.d.ts.map +0 -1
- package/dist/types/TokenInput/styles.d.ts +0 -7
- package/dist/types/TokenInput/styles.d.ts.map +0 -1
- package/dist/types/TokenInput/util.d.ts +0 -4
- package/dist/types/TokenInput/util.d.ts.map +0 -1
- package/dist/types/Tooltip/Tooltip.d.ts +0 -5
- package/dist/types/Tooltip/Tooltip.d.ts.map +0 -1
- package/dist/types/Tooltip/TooltipTypes.d.ts +0 -28
- package/dist/types/Tooltip/TooltipTypes.d.ts.map +0 -1
- package/dist/types/Tooltip/index.d.ts +0 -5
- package/dist/types/Tooltip/index.d.ts.map +0 -1
- package/dist/types/Tooltip/styles.d.ts +0 -3
- package/dist/types/Tooltip/styles.d.ts.map +0 -1
- package/dist/types/VisuallyHidden/VisuallyHidden.d.ts +0 -2
- package/dist/types/VisuallyHidden/VisuallyHidden.d.ts.map +0 -1
- package/dist/types/VisuallyHidden/index.d.ts +0 -2
- package/dist/types/VisuallyHidden/index.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -69
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/systemProps/index.d.ts +0 -21
- package/dist/types/systemProps/index.d.ts.map +0 -1
- package/dist/types/themes/dark/dataviz-palette.d.ts +0 -26
- package/dist/types/themes/dark/dataviz-palette.d.ts.map +0 -1
- package/dist/types/themes/dark/decorative-palettes.d.ts +0 -56
- package/dist/types/themes/dark/decorative-palettes.d.ts.map +0 -1
- package/dist/types/themes/dark/theme.d.ts +0 -612
- package/dist/types/themes/dark/theme.d.ts.map +0 -1
- package/dist/types/themes/extendedThemes/sproutTheme/dark/theme.d.ts +0 -213
- package/dist/types/themes/extendedThemes/sproutTheme/dark/theme.d.ts.map +0 -1
- package/dist/types/themes/extendedThemes/sproutTheme/index.d.ts +0 -3
- package/dist/types/themes/extendedThemes/sproutTheme/index.d.ts.map +0 -1
- package/dist/types/themes/extendedThemes/sproutTheme/light/theme.d.ts +0 -213
- package/dist/types/themes/extendedThemes/sproutTheme/light/theme.d.ts.map +0 -1
- package/dist/types/themes/light/dataviz-palette.d.ts +0 -26
- package/dist/types/themes/light/dataviz-palette.d.ts.map +0 -1
- package/dist/types/themes/light/decorative-palettes.d.ts +0 -56
- package/dist/types/themes/light/decorative-palettes.d.ts.map +0 -1
- package/dist/types/themes/light/literal-colors.d.ts +0 -160
- package/dist/types/themes/light/literal-colors.d.ts.map +0 -1
- package/dist/types/themes/light/theme.d.ts +0 -704
- package/dist/types/themes/light/theme.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -5
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/types/types/shared.d.ts +0 -4
- package/dist/types/types/shared.d.ts.map +0 -1
- package/dist/types/types/styled-components.d.ts +0 -11
- package/dist/types/types/styled-components.d.ts.map +0 -1
- package/dist/types/types/system-props.d.ts +0 -71
- package/dist/types/types/system-props.d.ts.map +0 -1
- package/dist/types/types/theme.colors.d.ts +0 -298
- package/dist/types/types/theme.colors.d.ts.map +0 -1
- package/dist/types/types/theme.d.ts +0 -43
- package/dist/types/types/theme.d.ts.map +0 -1
- package/dist/types/utils/a11yTest.d.ts +0 -2
- package/dist/types/utils/a11yTest.d.ts.map +0 -1
- package/dist/types/utils/chartColors.d.ts +0 -9
- package/dist/types/utils/chartColors.d.ts.map +0 -1
- package/dist/types/utils/constants.d.ts +0 -2
- package/dist/types/utils/constants.d.ts.map +0 -1
- package/dist/types/utils/dataQaLabelQueries.d.ts +0 -14
- package/dist/types/utils/dataQaLabelQueries.d.ts.map +0 -1
- package/dist/types/utils/hooks.d.ts +0 -40
- package/dist/types/utils/hooks.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -15
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/innerText.d.ts +0 -4
- package/dist/types/utils/innerText.d.ts.map +0 -1
- package/dist/types/utils/mixins.d.ts +0 -6
- package/dist/types/utils/mixins.d.ts.map +0 -1
- package/dist/types/utils/responsiveProps/index.d.ts +0 -3
- package/dist/types/utils/responsiveProps/index.d.ts.map +0 -1
- package/dist/types/utils/system-props/index.d.ts +0 -2
- package/dist/types/utils/system-props/index.d.ts.map +0 -1
- package/dist/types/utils/use-measure.d.ts +0 -14
- package/dist/types/utils/use-measure.d.ts.map +0 -1
- package/dist/types/utils/useInteractiveColor.d.ts +0 -9
- package/dist/types/utils/useInteractiveColor.d.ts.map +0 -1
- package/lib/Avatar/Avatar.js +0 -142
- package/lib/Avatar/AvatarTypes.js +0 -1
- package/lib/Avatar/constants.js +0 -10
- package/lib/Avatar/index.js +0 -5
- package/lib/Badge/Badge.js +0 -60
- package/lib/Badge/BadgeTypes.js +0 -1
- package/lib/Badge/constants.js +0 -56
- package/lib/Badge/index.js +0 -5
- package/lib/Badge/styles.js +0 -19
- package/lib/Banner/Banner.js +0 -92
- package/lib/Banner/BannerTypes.js +0 -1
- package/lib/Banner/index.js +0 -4
- package/lib/Banner/styles.js +0 -14
- package/lib/Box/Box.js +0 -26
- package/lib/Box/BoxTypes.js +0 -1
- package/lib/Box/index.js +0 -4
- package/lib/Box/styles.js +0 -10
- package/lib/Breadcrumb/Breadcrumb.js +0 -77
- package/lib/Breadcrumb/BreadcrumbTypes.js +0 -1
- package/lib/Breadcrumb/index.js +0 -4
- package/lib/Breadcrumb/styles.js +0 -22
- package/lib/Button/Button.js +0 -58
- package/lib/Button/ButtonTypes.js +0 -1
- package/lib/Button/index.js +0 -4
- package/lib/Button/styles.js +0 -49
- package/lib/Card/Card.js +0 -95
- package/lib/Card/CardTypes.js +0 -1
- package/lib/Card/index.js +0 -5
- package/lib/Card/styles.js +0 -124
- package/lib/Card/subComponents.js +0 -100
- package/lib/Card/utils.js +0 -52
- package/lib/CharacterCounter/CharacterCounter.js +0 -50
- package/lib/CharacterCounter/CharacterCounterTypes.js +0 -1
- package/lib/CharacterCounter/index.js +0 -4
- package/lib/CharacterCounter/styles.js +0 -17
- package/lib/ChartLegend/ChartLegend.js +0 -30
- package/lib/ChartLegend/ChartLegendTypes.js +0 -1
- package/lib/ChartLegend/index.js +0 -4
- package/lib/ChartLegend/styles.js +0 -29
- package/lib/ChartLegend/useChartLabels.js +0 -36
- package/lib/Checkbox/Checkbox.js +0 -147
- package/lib/Checkbox/CheckboxTypes.js +0 -1
- package/lib/Checkbox/index.js +0 -4
- package/lib/Checkbox/styles.js +0 -128
- package/lib/Collapsible/Collapsible.js +0 -136
- package/lib/Collapsible/CollapsibleTypes.js +0 -1
- package/lib/Collapsible/index.js +0 -4
- package/lib/Collapsible/styles.js +0 -14
- package/lib/DatePicker/DateRangePicker/DateRangePicker.js +0 -79
- package/lib/DatePicker/DateRangePicker/DateRangePickerTypes.js +0 -1
- package/lib/DatePicker/DateRangePicker/StatefulDateRangePicker.js +0 -56
- package/lib/DatePicker/DateRangePicker/index.js +0 -5
- package/lib/DatePicker/SingleDatePicker/SingleDatePicker.js +0 -75
- package/lib/DatePicker/SingleDatePicker/SingleDatePickerTypes.js +0 -1
- package/lib/DatePicker/SingleDatePicker/StatefulSingleDatePicker.js +0 -35
- package/lib/DatePicker/SingleDatePicker/index.js +0 -5
- package/lib/DatePicker/common.js +0 -62
- package/lib/DatePicker/index.js +0 -2
- package/lib/DatePicker/styles.js +0 -119
- package/lib/DatePicker/types.js +0 -1
- package/lib/Drawer/Drawer.js +0 -272
- package/lib/Drawer/DrawerTypes.js +0 -1
- package/lib/Drawer/index.js +0 -4
- package/lib/Drawer/styles.js +0 -20
- package/lib/Duration/Duration.js +0 -104
- package/lib/Duration/DurationTypes.js +0 -1
- package/lib/Duration/constants.js +0 -21
- package/lib/Duration/index.js +0 -7
- package/lib/Duration/styles.js +0 -6
- package/lib/Duration/utils.js +0 -70
- package/lib/EmptyState/EmptyState.js +0 -65
- package/lib/EmptyState/EmptyStateTypes.js +0 -1
- package/lib/EmptyState/index.js +0 -4
- package/lib/Fieldset/Fieldset.js +0 -79
- package/lib/Fieldset/FieldsetTypes.js +0 -1
- package/lib/Fieldset/index.js +0 -4
- package/lib/Fieldset/styles.js +0 -10
- package/lib/FormField/FormField.js +0 -85
- package/lib/FormField/FormFieldTypes.js +0 -1
- package/lib/FormField/index.js +0 -4
- package/lib/Icon/Icon.js +0 -139
- package/lib/Icon/IconTypes.js +0 -1
- package/lib/Icon/index.js +0 -4
- package/lib/Icon/styles.js +0 -24
- package/lib/IllustrationViewBoxes.d.js +0 -1
- package/lib/Image/Image.js +0 -120
- package/lib/Image/ImageTypes.js +0 -1
- package/lib/Image/index.js +0 -4
- package/lib/Image/styles.js +0 -11
- package/lib/Indicator/Indicator.js +0 -58
- package/lib/Indicator/IndicatorTypes.js +0 -1
- package/lib/Indicator/index.js +0 -4
- package/lib/Indicator/styles.js +0 -17
- package/lib/Input/Input.js +0 -288
- package/lib/Input/InputTypes.js +0 -1
- package/lib/Input/index.js +0 -4
- package/lib/Input/styles.js +0 -88
- package/lib/KeyboardKey/KeyboardKey.js +0 -48
- package/lib/KeyboardKey/KeyboardKeyTypes.js +0 -1
- package/lib/KeyboardKey/index.js +0 -4
- package/lib/KeyboardKey/styles.js +0 -19
- package/lib/Label/Label.js +0 -68
- package/lib/Label/LabelTypes.js +0 -1
- package/lib/Label/index.js +0 -4
- package/lib/Link/Link.js +0 -46
- package/lib/Link/LinkTypes.js +0 -1
- package/lib/Link/constants.js +0 -11
- package/lib/Link/index.js +0 -5
- package/lib/Link/styles.js +0 -27
- package/lib/Listbox/Listbox.js +0 -121
- package/lib/Listbox/ListboxTypes.js +0 -1
- package/lib/Listbox/index.js +0 -4
- package/lib/Loader/Loader.js +0 -59
- package/lib/Loader/LoaderTypes.js +0 -1
- package/lib/Loader/index.js +0 -4
- package/lib/Loader/styles.js +0 -33
- package/lib/LoaderButton/LoaderButton.js +0 -69
- package/lib/LoaderButton/LoaderButtonTypes.js +0 -1
- package/lib/LoaderButton/index.js +0 -4
- package/lib/LogoViewBoxes.d.js +0 -1
- package/lib/Menu/Menu.js +0 -631
- package/lib/Menu/MenuTypes.js +0 -1
- package/lib/Menu/index.js +0 -6
- package/lib/Menu/styles.js +0 -52
- package/lib/Menu/utils/constants.js +0 -12
- package/lib/Menu/utils/descendants.js +0 -338
- package/lib/Menu/utils/hooks.js +0 -167
- package/lib/Menu/utils/index.js +0 -3
- package/lib/Message/Message.js +0 -165
- package/lib/Message/MessageTypes.js +0 -1
- package/lib/Message/constants.js +0 -7
- package/lib/Message/index.js +0 -5
- package/lib/Message/styles.js +0 -120
- package/lib/Modal/Modal.js +0 -153
- package/lib/Modal/ModalTypes.js +0 -1
- package/lib/Modal/index.js +0 -4
- package/lib/Modal/styles.js +0 -103
- package/lib/Numeral/Numeral.js +0 -176
- package/lib/Numeral/NumeralTypes.js +0 -1
- package/lib/Numeral/constants.js +0 -10
- package/lib/Numeral/index.js +0 -5
- package/lib/Numeral/styles.js +0 -12
- package/lib/PartnerLogo/PartnerLogo.js +0 -75
- package/lib/PartnerLogo/PartnerLogoTypes.js +0 -18
- package/lib/PartnerLogo/index.js +0 -4
- package/lib/PartnerLogo/styles.js +0 -22
- package/lib/Portal/Portal.js +0 -80
- package/lib/Portal/PortalTypes.js +0 -1
- package/lib/Portal/index.js +0 -3
- package/lib/Radio/Radio.js +0 -110
- package/lib/Radio/RadioTypes.js +0 -1
- package/lib/Radio/index.js +0 -4
- package/lib/Radio/styles.js +0 -67
- package/lib/SegmentedControl/SegmentedControl.js +0 -97
- package/lib/SegmentedControl/SegmentedControlTypes.js +0 -1
- package/lib/SegmentedControl/index.js +0 -4
- package/lib/SegmentedControl/styles.js +0 -50
- package/lib/Select/Select.js +0 -103
- package/lib/Select/SelectTypes.js +0 -1
- package/lib/Select/index.js +0 -4
- package/lib/Select/styles.js +0 -85
- package/lib/Skeleton/Skeleton.js +0 -37
- package/lib/Skeleton/index.js +0 -3
- package/lib/SpotIllustration/SpotIllustration.js +0 -48
- package/lib/SpotIllustration/SpotIllustrationTypes.js +0 -1
- package/lib/SpotIllustration/illustrationNames.js +0 -1
- package/lib/SpotIllustration/index.js +0 -4
- package/lib/Stack/Stack.js +0 -109
- package/lib/Stack/StackTypes.js +0 -1
- package/lib/Stack/index.js +0 -4
- package/lib/StatefulStory.js +0 -33
- package/lib/Switch/Switch.js +0 -56
- package/lib/Switch/SwitchTypes.js +0 -1
- package/lib/Switch/index.js +0 -4
- package/lib/Switch/styles.js +0 -62
- package/lib/Table/Table.js +0 -126
- package/lib/Table/TableTypes.js +0 -1
- package/lib/Table/index.js +0 -4
- package/lib/Table/styles.js +0 -9
- package/lib/TableCell/TableCell.js +0 -64
- package/lib/TableCell/TableCellTypes.js +0 -1
- package/lib/TableCell/index.js +0 -4
- package/lib/TableCell/styles.js +0 -15
- package/lib/TableHeaderCell/TableHeaderCell.js +0 -125
- package/lib/TableHeaderCell/TableHeaderCellTypes.js +0 -1
- package/lib/TableHeaderCell/constants.js +0 -4
- package/lib/TableHeaderCell/index.js +0 -5
- package/lib/TableHeaderCell/styles.js +0 -27
- package/lib/TableRowAccordion/TableRowAccordion.js +0 -104
- package/lib/TableRowAccordion/TableRowAccordionTypes.js +0 -1
- package/lib/TableRowAccordion/index.js +0 -4
- package/lib/TableRowAccordion/styles.js +0 -19
- package/lib/Tabs/Tabs.js +0 -207
- package/lib/Tabs/TabsTypes.js +0 -1
- package/lib/Tabs/index.js +0 -4
- package/lib/Tabs/styles.js +0 -48
- package/lib/Text/Text.js +0 -109
- package/lib/Text/TextTypes.js +0 -1
- package/lib/Text/index.js +0 -4
- package/lib/Text/styles.js +0 -17
- package/lib/Textarea/Textarea.js +0 -152
- package/lib/Textarea/TextareaTypes.js +0 -1
- package/lib/Textarea/index.js +0 -4
- package/lib/Textarea/styles.js +0 -58
- package/lib/ThemeProvider/index.js +0 -18
- package/lib/Toast/Toast.js +0 -160
- package/lib/Toast/ToastTypes.js +0 -1
- package/lib/Toast/index.js +0 -3
- package/lib/Toast/styles.js +0 -63
- package/lib/ToggleHint/ToggleHint.js +0 -89
- package/lib/ToggleHint/ToggleHintTypes.js +0 -1
- package/lib/ToggleHint/index.js +0 -4
- package/lib/ToggleHint/styles.js +0 -18
- package/lib/Token/Token.js +0 -81
- package/lib/Token/TokenTypes.js +0 -1
- package/lib/Token/index.js +0 -4
- package/lib/Token/styles.js +0 -28
- package/lib/TokenInput/TokenInput.js +0 -318
- package/lib/TokenInput/TokenInputTypes.js +0 -1
- package/lib/TokenInput/TokenScreenReaderStatus.js +0 -45
- package/lib/TokenInput/index.js +0 -4
- package/lib/TokenInput/styles.js +0 -73
- package/lib/TokenInput/util.js +0 -17
- package/lib/Tooltip/Tooltip.js +0 -184
- package/lib/Tooltip/TooltipTypes.js +0 -1
- package/lib/Tooltip/index.js +0 -4
- package/lib/Tooltip/styles.js +0 -12
- package/lib/VisuallyHidden/VisuallyHidden.js +0 -6
- package/lib/VisuallyHidden/index.js +0 -1
- package/lib/index.js +0 -75
- package/lib/react.d.js +0 -0
- package/lib/styled.d.js +0 -1
- package/lib/systemProps/index.js +0 -26
- package/lib/themes/dark/dataviz-palette.js +0 -26
- package/lib/themes/dark/decorative-palettes.js +0 -56
- package/lib/themes/dark/theme.js +0 -263
- package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +0 -235
- package/lib/themes/extendedThemes/sproutTheme/index.js +0 -2
- package/lib/themes/extendedThemes/sproutTheme/light/theme.js +0 -232
- package/lib/themes/light/dataviz-palette.js +0 -26
- package/lib/themes/light/decorative-palettes.js +0 -56
- package/lib/themes/light/literal-colors.js +0 -160
- package/lib/themes/light/theme.js +0 -421
- package/lib/types/index.js +0 -4
- package/lib/types/shared.js +0 -1
- package/lib/types/styled-components.js +0 -1
- package/lib/types/system-props.js +0 -1
- package/lib/types/theme.colors.js +0 -1
- package/lib/types/theme.js +0 -1
- package/lib/utils/a11yTest.js +0 -29
- package/lib/utils/chartColors.js +0 -9
- package/lib/utils/constants.js +0 -1
- package/lib/utils/dataQaLabelQueries.js +0 -64
- package/lib/utils/hooks.js +0 -194
- package/lib/utils/index.js +0 -53
- package/lib/utils/innerText.js +0 -31
- package/lib/utils/mixins.js +0 -13
- package/lib/utils/responsiveProps/index.js +0 -33
- package/lib/utils/system-props/index.js +0 -1
- package/lib/utils/use-measure.js +0 -59
- package/lib/utils/useInteractiveColor.js +0 -27
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.a11yCheck = void 0;
|
|
8
|
-
var _jestAxe = require("jest-axe");
|
|
9
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
10
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
11
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } /* eslint-env jest, node */
|
|
12
|
-
// use runA11yCheck from react-test-library utils file if using react-testing-library
|
|
13
|
-
var a11yCheck = exports.a11yCheck = /*#__PURE__*/function () {
|
|
14
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(html) {
|
|
15
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
16
|
-
while (1) switch (_context.prev = _context.next) {
|
|
17
|
-
case 0:
|
|
18
|
-
_context.t0 = expect;
|
|
19
|
-
_context.next = 3;
|
|
20
|
-
return (0, _jestAxe.axe)(html);
|
|
21
|
-
case 3:
|
|
22
|
-
_context.t1 = _context.sent;
|
|
23
|
-
return _context.abrupt("return", (0, _context.t0)(_context.t1).toHaveNoViolations());
|
|
24
|
-
case 5:
|
|
25
|
-
case "end":
|
|
26
|
-
return _context.stop();
|
|
27
|
-
}
|
|
28
|
-
}, _callee);
|
|
29
|
-
}));
|
|
30
|
-
return function a11yCheck(_x) {
|
|
31
|
-
return _ref.apply(this, arguments);
|
|
32
|
-
};
|
|
33
|
-
}();
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.THEME_MAP = exports.EXTENDED_THEME = exports.CONTRAST_THEME = exports.COMPARE_THEME = void 0;
|
|
7
|
-
var _seedsColor = require("@sproutsocial/seeds-color");
|
|
8
|
-
var COMPARE_THEME = exports.COMPARE_THEME = [_seedsColor.COLOR_TEAL_500, _seedsColor.COLOR_TEAL_800, _seedsColor.COLOR_PURPLE_500, _seedsColor.COLOR_PURPLE_800];
|
|
9
|
-
var CONTRAST_THEME = exports.CONTRAST_THEME = [_seedsColor.COLOR_TEAL_500, _seedsColor.COLOR_PURPLE_700, _seedsColor.COLOR_PINK_700, _seedsColor.COLOR_YELLOW_500, _seedsColor.COLOR_BLUE_500, _seedsColor.COLOR_MAGENTA_500, _seedsColor.COLOR_NEUTRAL_500, _seedsColor.COLOR_GREEN_500, _seedsColor.COLOR_ORANGE_500, _seedsColor.COLOR_RED_700];
|
|
10
|
-
var EXTENDED_THEME = exports.EXTENDED_THEME = [_seedsColor.COLOR_GREEN_500, _seedsColor.COLOR_TEAL_500, _seedsColor.COLOR_BLUE_500, _seedsColor.COLOR_PURPLE_500, _seedsColor.COLOR_MAGENTA_500, _seedsColor.COLOR_PINK_500, _seedsColor.COLOR_RED_500, _seedsColor.COLOR_ORANGE_500, _seedsColor.COLOR_YELLOW_500, _seedsColor.COLOR_NEUTRAL_500, _seedsColor.COLOR_GREEN_800, _seedsColor.COLOR_TEAL_800, _seedsColor.COLOR_BLUE_800, _seedsColor.COLOR_PURPLE_800, _seedsColor.COLOR_MAGENTA_800, _seedsColor.COLOR_PINK_800, _seedsColor.COLOR_RED_800, _seedsColor.COLOR_ORANGE_800, _seedsColor.COLOR_YELLOW_800, _seedsColor.COLOR_NEUTRAL_700];
|
|
11
|
-
var THEME_MAP = exports.THEME_MAP = {
|
|
12
|
-
COMPARE: COMPARE_THEME,
|
|
13
|
-
CONTRAST: CONTRAST_THEME,
|
|
14
|
-
EXTENDED: EXTENDED_THEME
|
|
15
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.dataQaLabelQueries = void 0;
|
|
7
|
-
var _react = require("@testing-library/react");
|
|
8
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
-
var getKeyValuePair = function getKeyValuePair(object) {
|
|
15
|
-
var key = Object.keys(object)[0];
|
|
16
|
-
var value = object[key];
|
|
17
|
-
return [key, value];
|
|
18
|
-
};
|
|
19
|
-
var getDataQaKey = function getDataQaKey(key) {
|
|
20
|
-
return "data-qa-".concat(key);
|
|
21
|
-
};
|
|
22
|
-
var getTestIdAttribute = function getTestIdAttribute(qaObject) {
|
|
23
|
-
var _getKeyValuePair = getKeyValuePair(qaObject),
|
|
24
|
-
_getKeyValuePair2 = _slicedToArray(_getKeyValuePair, 2),
|
|
25
|
-
key = _getKeyValuePair2[0],
|
|
26
|
-
value = _getKeyValuePair2[1];
|
|
27
|
-
return "[".concat(getDataQaKey(key), "=\"").concat(value, "\"]");
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
// dom-testing-library works by looking in the dom for: [data-qa-somelabel]
|
|
31
|
-
// and using text supplied to match the value of that label. An example:
|
|
32
|
-
//
|
|
33
|
-
// You have <div data-qa-label='my input' />
|
|
34
|
-
//
|
|
35
|
-
// To search with react-testing-libray, you use:
|
|
36
|
-
//
|
|
37
|
-
// getByDataQaLabel({label: 'my input'})
|
|
38
|
-
//
|
|
39
|
-
// using dom-testing-library's helpers, we split this and use queryAllByAttribute to search:
|
|
40
|
-
//
|
|
41
|
-
// queryAllByAttribute('data-qa-label', container, 'my-input', ...rest)
|
|
42
|
-
var queryAllByDataQaLabel = function queryAllByDataQaLabel(container, qaObject) {
|
|
43
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
44
|
-
var _getKeyValuePair3 = getKeyValuePair(qaObject),
|
|
45
|
-
_getKeyValuePair4 = _slicedToArray(_getKeyValuePair3, 2),
|
|
46
|
-
key = _getKeyValuePair4[0],
|
|
47
|
-
value = _getKeyValuePair4[1];
|
|
48
|
-
return (0, _react.queryAllByAttribute)(getDataQaKey(key), container, String(value), options);
|
|
49
|
-
};
|
|
50
|
-
var getMultipleError = function getMultipleError(c, qaObject) {
|
|
51
|
-
return "Found multiple elements by: ".concat(getTestIdAttribute(qaObject));
|
|
52
|
-
};
|
|
53
|
-
var getMissingError = function getMissingError(c, qaObject) {
|
|
54
|
-
return "Unable to find an element by: ".concat(getTestIdAttribute(qaObject));
|
|
55
|
-
};
|
|
56
|
-
var _buildQueries = (0, _react.buildQueries)(queryAllByDataQaLabel, getMultipleError, getMissingError),
|
|
57
|
-
_buildQueries2 = _slicedToArray(_buildQueries, 5),
|
|
58
|
-
queryByDataQaLabel = _buildQueries2[0],
|
|
59
|
-
getAllByDataQaLabel = _buildQueries2[1],
|
|
60
|
-
getByDataQaLabel = _buildQueries2[2],
|
|
61
|
-
findAllByDataQaLabel = _buildQueries2[3],
|
|
62
|
-
findByDataQaLabel = _buildQueries2[4];
|
|
63
|
-
var dataQaLabelQueries = exports.dataQaLabelQueries = {
|
|
64
|
-
queryByDataQaLabel: queryByDataQaLabel,
|
|
65
|
-
queryAllByDataQaLabel: queryAllByDataQaLabel,
|
|
66
|
-
getAllByDataQaLabel: getAllByDataQaLabel,
|
|
67
|
-
getByDataQaLabel: getByDataQaLabel,
|
|
68
|
-
findAllByDataQaLabel: findAllByDataQaLabel,
|
|
69
|
-
findByDataQaLabel: findByDataQaLabel
|
|
70
|
-
};
|
package/commonjs/utils/hooks.js
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"no babel-plugin-flow-react-proptypes";
|
|
3
|
-
|
|
4
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.useMultiselect = void 0;
|
|
9
|
-
exports.useMutationObserver = useMutationObserver;
|
|
10
|
-
exports.useMutationObserverOnce = useMutationObserverOnce;
|
|
11
|
-
exports.useSelect = void 0;
|
|
12
|
-
exports.useTextContent = useTextContent;
|
|
13
|
-
exports.useWhyDidYouUpdate = useWhyDidYouUpdate;
|
|
14
|
-
var _react = require("react");
|
|
15
|
-
var _seedsReactUtilities = require("@sproutsocial/seeds-react-utilities");
|
|
16
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
20
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
22
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
24
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
25
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
26
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
-
function useTextContent(initial) {
|
|
28
|
-
var _useState = (0, _react.useState)(initial),
|
|
29
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
-
textContent = _useState2[0],
|
|
31
|
-
setTextContent = _useState2[1];
|
|
32
|
-
var ref = (0, _react.useCallback)(function (node) {
|
|
33
|
-
if (node && node.textContent !== null) {
|
|
34
|
-
setTextContent(node.textContent);
|
|
35
|
-
}
|
|
36
|
-
}, []);
|
|
37
|
-
ref.current = textContent;
|
|
38
|
-
return ref;
|
|
39
|
-
}
|
|
40
|
-
var defaultCallback = function defaultCallback(mutationList) {
|
|
41
|
-
return mutationList;
|
|
42
|
-
};
|
|
43
|
-
function useMutationObserver(targetNode, config) {
|
|
44
|
-
var callback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultCallback;
|
|
45
|
-
if (!(0, _seedsReactUtilities.canUseDOM)()) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
/* eslint-disable-next-line */
|
|
49
|
-
var _useState3 = (0, _react.useState)(undefined),
|
|
50
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
51
|
-
value = _useState4[0],
|
|
52
|
-
setValue = _useState4[1];
|
|
53
|
-
/* eslint-disable-next-line */
|
|
54
|
-
var observer = (0, _react.useMemo)(function () {
|
|
55
|
-
return new MutationObserver(function (mutationList, observer) {
|
|
56
|
-
var result = callback(mutationList, observer);
|
|
57
|
-
setValue(result);
|
|
58
|
-
});
|
|
59
|
-
}, [callback]);
|
|
60
|
-
/* eslint-disable-next-line */
|
|
61
|
-
(0, _react.useEffect)(function () {
|
|
62
|
-
if (targetNode) {
|
|
63
|
-
observer.observe(targetNode, config);
|
|
64
|
-
return function () {
|
|
65
|
-
observer.disconnect();
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
}, [targetNode, config, observer]);
|
|
69
|
-
return value;
|
|
70
|
-
}
|
|
71
|
-
function useMutationObserverOnce(targetNode, config, callback) {
|
|
72
|
-
var _useState5 = (0, _react.useState)(true),
|
|
73
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
74
|
-
isObserving = _useState6[0],
|
|
75
|
-
setObserving = _useState6[1];
|
|
76
|
-
var node = isObserving ? targetNode : null;
|
|
77
|
-
var value = useMutationObserver(node, config, callback);
|
|
78
|
-
if (value !== undefined && isObserving) {
|
|
79
|
-
setObserving(false);
|
|
80
|
-
}
|
|
81
|
-
return value;
|
|
82
|
-
}
|
|
83
|
-
var useSelect = exports.useSelect = function useSelect() {
|
|
84
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
85
|
-
initialValue: "",
|
|
86
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
87
|
-
onChange: function onChange() {}
|
|
88
|
-
},
|
|
89
|
-
_ref$initialValue = _ref.initialValue,
|
|
90
|
-
initialValue = _ref$initialValue === void 0 ? "" : _ref$initialValue,
|
|
91
|
-
_ref$onChange = _ref.onChange,
|
|
92
|
-
userOnChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
|
|
93
|
-
var _useState7 = (0, _react.useState)(initialValue),
|
|
94
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
95
|
-
value = _useState8[0],
|
|
96
|
-
setValue = _useState8[1];
|
|
97
|
-
var onChange = (0, _react.useCallback)(function (newValue) {
|
|
98
|
-
if (newValue !== value) {
|
|
99
|
-
setValue(newValue);
|
|
100
|
-
userOnChange(newValue);
|
|
101
|
-
}
|
|
102
|
-
}, [userOnChange, value]);
|
|
103
|
-
return {
|
|
104
|
-
value: value,
|
|
105
|
-
onChange: onChange
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
var valueReducer = function valueReducer(state, action) {
|
|
109
|
-
var newState = new Set(state);
|
|
110
|
-
switch (action.type) {
|
|
111
|
-
case "reset":
|
|
112
|
-
{
|
|
113
|
-
return new Set();
|
|
114
|
-
}
|
|
115
|
-
case "toggle_item":
|
|
116
|
-
default:
|
|
117
|
-
{
|
|
118
|
-
if (action.value) {
|
|
119
|
-
if (newState.has(action.value)) {
|
|
120
|
-
newState.delete(action.value);
|
|
121
|
-
} else {
|
|
122
|
-
newState.add(action.value);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return newState;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
var useMultiselect = exports.useMultiselect = function useMultiselect() {
|
|
130
|
-
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
131
|
-
initialValue: [],
|
|
132
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
133
|
-
onChange: function onChange() {}
|
|
134
|
-
},
|
|
135
|
-
_ref2$initialValue = _ref2.initialValue,
|
|
136
|
-
initialValue = _ref2$initialValue === void 0 ? [] : _ref2$initialValue,
|
|
137
|
-
_ref2$onChange = _ref2.onChange,
|
|
138
|
-
userOnChange = _ref2$onChange === void 0 ? function () {} : _ref2$onChange;
|
|
139
|
-
var _useReducer = (0, _react.useReducer)(valueReducer, new Set(initialValue)),
|
|
140
|
-
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
141
|
-
value = _useReducer2[0],
|
|
142
|
-
dispatch = _useReducer2[1];
|
|
143
|
-
var getArrayValue = function getArrayValue(value) {
|
|
144
|
-
return Array.from(value);
|
|
145
|
-
};
|
|
146
|
-
var onChange = (0, _react.useCallback)(function (newValue) {
|
|
147
|
-
dispatch({
|
|
148
|
-
type: "toggle_item",
|
|
149
|
-
value: newValue
|
|
150
|
-
});
|
|
151
|
-
}, [dispatch]);
|
|
152
|
-
var isFirstRun = (0, _react.useRef)(true);
|
|
153
|
-
(0, _react.useEffect)(function () {
|
|
154
|
-
if (isFirstRun.current) {
|
|
155
|
-
isFirstRun.current = false;
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
userOnChange(getArrayValue(value));
|
|
159
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
160
|
-
}, [userOnChange, value]);
|
|
161
|
-
var onClear = (0, _react.useCallback)(function () {
|
|
162
|
-
dispatch({
|
|
163
|
-
type: "reset"
|
|
164
|
-
});
|
|
165
|
-
}, [dispatch]);
|
|
166
|
-
return {
|
|
167
|
-
value: getArrayValue(value),
|
|
168
|
-
onChange: onChange,
|
|
169
|
-
onClear: onClear
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
function useWhyDidYouUpdate(name, props) {
|
|
173
|
-
// Get a mutable ref object where we can store props ...
|
|
174
|
-
// ... for comparison next time this hook runs.
|
|
175
|
-
var previousProps = (0, _react.useRef)({});
|
|
176
|
-
(0, _react.useEffect)(function () {
|
|
177
|
-
if (previousProps.current) {
|
|
178
|
-
// Get all keys from previous and current props
|
|
179
|
-
var allKeys = Object.keys(_objectSpread(_objectSpread({}, previousProps.current), props));
|
|
180
|
-
// Use this object to keep track of changed props
|
|
181
|
-
var changesObj = {};
|
|
182
|
-
// Iterate through keys
|
|
183
|
-
allKeys.forEach(function (key) {
|
|
184
|
-
// If previous is different from current
|
|
185
|
-
if (previousProps.current[key] !== props[key]) {
|
|
186
|
-
// Add to changesObj
|
|
187
|
-
changesObj[key] = {
|
|
188
|
-
from: previousProps.current[key],
|
|
189
|
-
to: props[key]
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
// If changesObj not empty then output to console
|
|
195
|
-
if (Object.keys(changesObj).length) {
|
|
196
|
-
// eslint-disable-next-line no-console
|
|
197
|
-
console.log("[why-did-you-update]", name, changesObj);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// Finally update previousProps with current props for next hook call
|
|
202
|
-
previousProps.current = props;
|
|
203
|
-
});
|
|
204
|
-
}
|
package/commonjs/utils/index.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.assertIsElement = assertIsElement;
|
|
7
|
-
exports.assertIsNode = assertIsNode;
|
|
8
|
-
exports.canUseDOM = void 0;
|
|
9
|
-
exports.includes = includes;
|
|
10
|
-
exports.mergeRefs = void 0;
|
|
11
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
12
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
13
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
|
-
var canUseDOM = exports.canUseDOM = function canUseDOM() {
|
|
15
|
-
return Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
16
|
-
};
|
|
17
|
-
// Allows a component to pass its own ref *and* a ref prop to the same element.
|
|
18
|
-
// Via https://www.davedrinks.coffee/how-do-i-use-two-react-refs/
|
|
19
|
-
var mergeRefs = exports.mergeRefs = function mergeRefs(refs) {
|
|
20
|
-
var filteredRefs = refs.filter(Boolean);
|
|
21
|
-
if (!filteredRefs.length) return null;
|
|
22
|
-
if (filteredRefs.length === 0) return filteredRefs[0];
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
|
-
return function (inst) {
|
|
25
|
-
var _iterator = _createForOfIteratorHelper(filteredRefs),
|
|
26
|
-
_step;
|
|
27
|
-
try {
|
|
28
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
29
|
-
var ref = _step.value;
|
|
30
|
-
if (typeof ref === "function") {
|
|
31
|
-
ref(inst);
|
|
32
|
-
} else if (ref) {
|
|
33
|
-
ref.current = inst;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
} catch (err) {
|
|
37
|
-
_iterator.e(err);
|
|
38
|
-
} finally {
|
|
39
|
-
_iterator.f();
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Type safe includes with narrowing
|
|
46
|
-
* https://fettblog.eu/typescript-array-includes/
|
|
47
|
-
*/
|
|
48
|
-
function includes(coll, el) {
|
|
49
|
-
return coll.includes(el);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// https://stackoverflow.com/questions/71193818/react-onclick-argument-of-type-eventtarget-is-not-assignable-to-parameter-of-t
|
|
53
|
-
function assertIsNode(e) {
|
|
54
|
-
if (!e || !("nodeType" in e)) {
|
|
55
|
-
throw new Error("Node expected");
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function assertIsElement(e) {
|
|
59
|
-
assertIsNode(e);
|
|
60
|
-
if (e.nodeType !== 1) {
|
|
61
|
-
throw new Error("Element expected");
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var hasOwnProperty = function hasOwnProperty(obj, property) {
|
|
8
|
-
return Object.prototype.hasOwnProperty.call(obj, property);
|
|
9
|
-
};
|
|
10
|
-
var hasChildren = function hasChildren(node) {
|
|
11
|
-
return hasOwnProperty(node, "children");
|
|
12
|
-
};
|
|
13
|
-
var hasProps = function hasProps(node) {
|
|
14
|
-
return hasOwnProperty(node, "props");
|
|
15
|
-
};
|
|
16
|
-
var reduceNodeToString = function reduceNodeToString(previous, current) {
|
|
17
|
-
return previous.length ? "".concat(previous, " ").concat(innerText(current)) : innerText(current);
|
|
18
|
-
};
|
|
19
|
-
var innerText = function innerText(node) {
|
|
20
|
-
if (node === null || typeof node === "undefined" || typeof node === "boolean") {
|
|
21
|
-
return "";
|
|
22
|
-
} else if (typeof node === "string") {
|
|
23
|
-
return node;
|
|
24
|
-
} else if (typeof node === "number") {
|
|
25
|
-
return node.toString();
|
|
26
|
-
} else if (Array.isArray(node)) {
|
|
27
|
-
return node.reduce(reduceNodeToString, "");
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
29
|
-
// @ts-ignore - hasProps checks for props, but may be able to fix this
|
|
30
|
-
} else if (hasProps(node) && hasChildren(node.props)) {
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
32
|
-
// @ts-ignore - how can we make sure ts knows this is ok?
|
|
33
|
-
return innerText(node.props.children);
|
|
34
|
-
}
|
|
35
|
-
return "";
|
|
36
|
-
};
|
|
37
|
-
var _default = exports.default = innerText;
|
package/commonjs/utils/mixins.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.visuallyHidden = exports.svgToDataURL = exports.pill = exports.focusRing = exports.disabled = void 0;
|
|
7
|
-
var _polished = require("polished");
|
|
8
|
-
var _styledComponents = require("styled-components");
|
|
9
|
-
var _seedsReactTheme = require("@sproutsocial/seeds-react-theme");
|
|
10
|
-
var svgToDataURL = exports.svgToDataURL = function svgToDataURL(svgStr) {
|
|
11
|
-
var encoded = encodeURIComponent(svgStr).replace(/'/g, "%27").replace(/"/g, "%22");
|
|
12
|
-
var header = "data:image/svg+xml,";
|
|
13
|
-
var dataUrl = header + encoded;
|
|
14
|
-
return dataUrl;
|
|
15
|
-
};
|
|
16
|
-
var visuallyHidden = exports.visuallyHidden = (0, _styledComponents.css)(["position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0;"]);
|
|
17
|
-
var focusRing = exports.focusRing = (0, _styledComponents.css)(["box-shadow:0 0 0 1px ", ",0 0px 0px 4px ", ";outline:none;&::-moz-focus-inner{border:0;}"], _seedsReactTheme.theme.colors.button.primary.background.base, (0, _polished.transparentize)(0.7, _seedsReactTheme.theme.colors.button.primary.background.base));
|
|
18
|
-
var pill = exports.pill = (0, _styledComponents.css)(["min-width:", ";min-height:", ";padding:", ";border-radius:", ";"], _seedsReactTheme.theme.space[600], _seedsReactTheme.theme.space[600], _seedsReactTheme.theme.space[300], _seedsReactTheme.theme.radii.pill);
|
|
19
|
-
var disabled = exports.disabled = (0, _styledComponents.css)(["opacity:0.4;pointer-events:none;"]);
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.normalizeResponsiveProp = void 0;
|
|
7
|
-
var _seedsReactTheme = require("@sproutsocial/seeds-react-theme");
|
|
8
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
13
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
15
|
-
var breakpoints = _seedsReactTheme.theme.breakpoints;
|
|
16
|
-
var LENGTH = breakpoints.length + 1;
|
|
17
|
-
var normalizeResponsiveProp = exports.normalizeResponsiveProp = function normalizeResponsiveProp(value) {
|
|
18
|
-
if (["string", "number"].includes(_typeof(value))) {
|
|
19
|
-
return Array(LENGTH).fill(value);
|
|
20
|
-
}
|
|
21
|
-
if (value.length) {
|
|
22
|
-
switch (value.length) {
|
|
23
|
-
case 1:
|
|
24
|
-
return Array(LENGTH).fill(value[0]);
|
|
25
|
-
case 2:
|
|
26
|
-
return [value[0]].concat(_toConsumableArray(Array(LENGTH - 1).fill(value[1])));
|
|
27
|
-
case 3:
|
|
28
|
-
return [value[0], value[1]].concat(_toConsumableArray(Array(LENGTH - 2).fill(value[2])));
|
|
29
|
-
case 4:
|
|
30
|
-
return [value[0], value[1], value[2]].concat(_toConsumableArray(Array(LENGTH - 3).fill(value[3])));
|
|
31
|
-
case 5:
|
|
32
|
-
return value;
|
|
33
|
-
default:
|
|
34
|
-
throw new Error("Invalid responsive prop length: ".concat(JSON.stringify(value)));
|
|
35
|
-
}
|
|
36
|
-
} else {
|
|
37
|
-
throw new Error("Invalid responsive prop type: ".concat(JSON.stringify(value)));
|
|
38
|
-
}
|
|
39
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _seedsReactSystemProps = require("@sproutsocial/seeds-react-system-props");
|
|
7
|
-
Object.keys(_seedsReactSystemProps).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _seedsReactSystemProps[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _seedsReactSystemProps[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useMeasure = useMeasure;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
-
var initialBounds = Object.freeze({
|
|
15
|
-
x: 0,
|
|
16
|
-
y: 0,
|
|
17
|
-
width: 0,
|
|
18
|
-
height: 0,
|
|
19
|
-
top: 0,
|
|
20
|
-
right: 0,
|
|
21
|
-
bottom: 0,
|
|
22
|
-
left: 0
|
|
23
|
-
});
|
|
24
|
-
function useMeasure(ref) {
|
|
25
|
-
var _useState = (0, _react.useState)(initialBounds),
|
|
26
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
-
bounds = _useState2[0],
|
|
28
|
-
setContentRect = _useState2[1];
|
|
29
|
-
(0, _react.useLayoutEffect)(function () {
|
|
30
|
-
var element = ref.current;
|
|
31
|
-
if (!element ||
|
|
32
|
-
// in non-browser environments (e.g. Jest tests) ResizeObserver is not defined
|
|
33
|
-
!("ResizeObserver" in window)) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
var resizeObserver = new ResizeObserver(function (_ref) {
|
|
37
|
-
var _ref2 = _slicedToArray(_ref, 1),
|
|
38
|
-
entry = _ref2[0];
|
|
39
|
-
var _entry$contentRect = entry.contentRect,
|
|
40
|
-
x = _entry$contentRect.x,
|
|
41
|
-
y = _entry$contentRect.y,
|
|
42
|
-
width = _entry$contentRect.width,
|
|
43
|
-
height = _entry$contentRect.height,
|
|
44
|
-
top = _entry$contentRect.top,
|
|
45
|
-
right = _entry$contentRect.right,
|
|
46
|
-
bottom = _entry$contentRect.bottom,
|
|
47
|
-
left = _entry$contentRect.left;
|
|
48
|
-
setContentRect({
|
|
49
|
-
x: x,
|
|
50
|
-
y: y,
|
|
51
|
-
width: width,
|
|
52
|
-
height: height,
|
|
53
|
-
top: top,
|
|
54
|
-
right: right,
|
|
55
|
-
bottom: bottom,
|
|
56
|
-
left: left
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
resizeObserver.observe(ref.current);
|
|
60
|
-
return function () {
|
|
61
|
-
resizeObserver.disconnect();
|
|
62
|
-
};
|
|
63
|
-
}, [ref]);
|
|
64
|
-
return bounds;
|
|
65
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useInteractiveColor = void 0;
|
|
7
|
-
var _polished = require("polished");
|
|
8
|
-
var _styledComponents = require("styled-components");
|
|
9
|
-
/**
|
|
10
|
-
* The useInteractiveColor hook has context of theme mode (light or dark)
|
|
11
|
-
* and can be used to lighten or darken a color dynamically
|
|
12
|
-
*
|
|
13
|
-
* note: colors are limited to our theme colors
|
|
14
|
-
*/
|
|
15
|
-
var useInteractiveColor = exports.useInteractiveColor = function useInteractiveColor(themeColor) {
|
|
16
|
-
// Throw error if used outside of a ThemeProvider (styled-components)
|
|
17
|
-
if (!(0, _styledComponents.useTheme)()) {
|
|
18
|
-
throw new Error("useInteractiveColor() must be used within a Styled Components ThemeProvider");
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Get the current theme mode ie. 'light' or 'dark'
|
|
22
|
-
var themeMode = (0, _styledComponents.useTheme)().mode;
|
|
23
|
-
|
|
24
|
-
// If the theme mode is dark, return a lightened version of the themeValue
|
|
25
|
-
if (themeMode === "dark") {
|
|
26
|
-
return (0, _polished.lighten)(0.2, themeColor);
|
|
27
|
-
} else {
|
|
28
|
-
// If the theme mode is light, return a darkened version of the themeValue
|
|
29
|
-
return (0, _polished.darken)(0.2, themeColor);
|
|
30
|
-
}
|
|
31
|
-
};
|