@sproutsocial/racine 12.21.2 → 12.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +2 -0
- package/__flow__/Avatar/__tests__/features.test.js +98 -0
- package/__flow__/Banner/index.js +2 -1
- package/__flow__/CharacterCounter/index.test.js +1 -1
- package/__flow__/Collapsible/index.js +3 -3
- package/__flow__/Drawer/index.js +11 -0
- package/__flow__/Drawer/index.stories.js +2 -1
- package/__flow__/EmptyState/index.test.js +1 -1
- package/__flow__/Fieldset/index.js +1 -1
- package/__flow__/Indicator/index.js +1 -1
- package/__flow__/Input/index.js +2 -1
- package/__flow__/Input/styles.js +1 -1
- package/__flow__/Link/index.js +2 -1
- package/__flow__/Link/index.test.js +2 -0
- package/__flow__/Listbox/index.stories.js +1 -0
- package/__flow__/Loader/index.js +1 -1
- package/__flow__/Modal/index.stories.js +1 -1
- package/__flow__/Numeral/tests/testNumeral.js +1 -0
- package/__flow__/Popout/index.js +1 -1
- package/__flow__/Portal/index.stories.js +7 -7
- package/__flow__/SegmentedControl/index.js +1 -1
- package/__flow__/Table/index.js +4 -4
- package/__flow__/TableCell/index.js +1 -1
- package/__flow__/TableHeaderCell/index.js +1 -1
- package/__flow__/Tabs/index.js +1 -1
- package/__flow__/Textarea/index.js +1 -1
- package/__flow__/Toast/index.js +1 -1
- package/__flow__/Toast/styles.js +1 -1
- package/__flow__/TokenInput/index.stories.js +4 -4
- package/__flow__/TokenInput/tests/default/pasting.test.js +6 -2
- package/__flow__/code-guidelines.mdx +244 -0
- package/__flow__/setupTests.js +1 -0
- package/__flow__/utils/a11yTest.js +1 -0
- package/__flow__/utils/system-props.js +1 -0
- package/commonjs/Avatar/index.js +19 -10
- package/commonjs/Badge/constants.js +3 -1
- package/commonjs/Badge/index.js +7 -3
- package/commonjs/Badge/styles.js +4 -2
- package/commonjs/Banner/index.js +9 -4
- package/commonjs/Banner/styles.js +5 -2
- package/commonjs/Box/index.js +5 -2
- package/commonjs/Box/styles.js +3 -1
- package/commonjs/Breadcrumb/index.js +12 -5
- package/commonjs/Breadcrumb/styles.js +3 -1
- package/commonjs/Button/index.js +7 -3
- package/commonjs/Button/styles.js +6 -3
- package/commonjs/Card/index.js +7 -3
- package/commonjs/Card/styles.js +3 -1
- package/commonjs/CharacterCounter/index.js +39 -22
- package/commonjs/CharacterCounter/styles.js +5 -2
- package/commonjs/ChartLegend/index.js +7 -3
- package/commonjs/ChartLegend/styles.js +5 -2
- package/commonjs/Checkbox/index.js +117 -97
- package/commonjs/Checkbox/styles.js +5 -2
- package/commonjs/Collapsible/index.js +28 -13
- package/commonjs/Collapsible/styles.js +4 -2
- package/commonjs/DatePicker/DateRangePicker.js +7 -3
- package/commonjs/DatePicker/SingleDatePicker.js +7 -3
- package/commonjs/DatePicker/StatefulDateRangePicker.js +19 -7
- package/commonjs/DatePicker/StatefulSingleDatePicker.js +16 -5
- package/commonjs/DatePicker/common.js +4 -2
- package/commonjs/DatePicker/index.js +15 -3
- package/commonjs/DatePicker/styles.js +5 -2
- package/commonjs/Drawer/SlideTransition.js +9 -5
- package/commonjs/Drawer/index.js +15 -7
- package/commonjs/Drawer/styles.js +5 -2
- package/commonjs/EmptyState/index.js +7 -3
- package/commonjs/Fieldset/index.js +10 -6
- package/commonjs/Fieldset/styles.js +5 -2
- package/commonjs/FormField/index.js +17 -6
- package/commonjs/Icon/deprecatedIcons.js +3 -1
- package/commonjs/Icon/index.js +9 -5
- package/commonjs/Icon/styles.js +6 -3
- package/commonjs/Image/index.js +78 -58
- package/commonjs/Image/styles.js +5 -2
- package/commonjs/Indicator/index.js +40 -23
- package/commonjs/Indicator/styles.js +4 -2
- package/commonjs/Input/index.js +156 -132
- package/commonjs/Input/styles.js +6 -3
- package/commonjs/KeyboardKey/index.js +30 -14
- package/commonjs/KeyboardKey/styles.js +3 -1
- package/commonjs/Label/index.js +32 -16
- package/commonjs/Link/constants.js +3 -1
- package/commonjs/Link/index.js +9 -4
- package/commonjs/Link/styles.js +5 -2
- package/commonjs/Listbox/index.js +15 -8
- package/commonjs/Loader/index.js +43 -26
- package/commonjs/Loader/styles.js +5 -2
- package/commonjs/LoaderButton/index.js +7 -3
- package/commonjs/Menu/constants.js +3 -1
- package/commonjs/Menu/descendants.js +35 -20
- package/commonjs/Menu/hooks.js +8 -8
- package/commonjs/Menu/index.flow.js +2 -1
- package/commonjs/Menu/index.js +44 -27
- package/commonjs/Menu/names.js +3 -1
- package/commonjs/Menu/styles.js +6 -3
- package/commonjs/Message/index.js +7 -3
- package/commonjs/Message/styles.js +4 -2
- package/commonjs/Modal/index.js +9 -5
- package/commonjs/Modal/styles.js +9 -5
- package/commonjs/Numeral/constants.js +3 -1
- package/commonjs/Numeral/index.js +16 -5
- package/commonjs/Numeral/styles.js +3 -1
- package/commonjs/Numeral/tests/testNumeral.js +16 -11
- package/commonjs/OverflowList/index.flow.js +2 -1
- package/commonjs/OverflowList/index.js +6 -3
- package/commonjs/OverflowList/styles.js +5 -2
- package/commonjs/PartnerLogo/index.js +9 -6
- package/commonjs/PartnerLogo/styles.js +5 -2
- package/commonjs/Popout/index.js +28 -13
- package/commonjs/Popout/styles.js +3 -1
- package/commonjs/Portal/index.js +50 -30
- package/commonjs/Radio/index.js +75 -57
- package/commonjs/Radio/styles.js +5 -2
- package/commonjs/SegmentedControl/index.js +21 -9
- package/commonjs/SegmentedControl/styles.js +5 -2
- package/commonjs/Select/index.js +78 -61
- package/commonjs/Select/styles.js +8 -5
- package/commonjs/Skeleton/index.js +4 -2
- package/commonjs/SpotIllustration/illustrationNames.js +3 -1
- package/commonjs/SpotIllustration/index.js +5 -3
- package/commonjs/Stack/index.js +7 -3
- package/commonjs/Switch/index.js +54 -36
- package/commonjs/Switch/styles.js +6 -3
- package/commonjs/Table/index.js +14 -10
- package/commonjs/Table/styles.js +3 -1
- package/commonjs/TableCell/index.js +41 -24
- package/commonjs/TableCell/styles.js +3 -1
- package/commonjs/TableHeaderCell/index.js +56 -38
- package/commonjs/TableHeaderCell/styles.js +5 -2
- package/commonjs/TableRowAccordion/index.js +63 -45
- package/commonjs/TableRowAccordion/styles.js +5 -2
- package/commonjs/Tabs/index.js +118 -91
- package/commonjs/Tabs/styles.js +8 -5
- package/commonjs/Text/index.js +7 -3
- package/commonjs/Text/styles.js +5 -2
- package/commonjs/Textarea/index.js +104 -87
- package/commonjs/Textarea/styles.js +5 -2
- package/commonjs/ThemeProvider/index.js +5 -2
- package/commonjs/Toast/index.js +7 -8
- package/commonjs/Toast/styles.js +5 -2
- package/commonjs/ToggleHint/index.js +45 -27
- package/commonjs/ToggleHint/styles.js +6 -3
- package/commonjs/Token/index.js +7 -3
- package/commonjs/Token/styles.js +5 -2
- package/commonjs/TokenInput/index.js +221 -192
- package/commonjs/TokenInput/styles.js +5 -2
- package/commonjs/TokenInput/util.js +5 -3
- package/commonjs/Tooltip/index.js +30 -14
- package/commonjs/Tooltip/styles.js +3 -1
- package/commonjs/VisuallyHidden/index.js +3 -1
- package/commonjs/dataviz/index.js +3 -1
- package/commonjs/index.js +451 -84
- package/commonjs/systemProps/background.js +3 -1
- package/commonjs/systemProps/border.js +3 -1
- package/commonjs/systemProps/color.js +3 -1
- package/commonjs/systemProps/custom.js +3 -1
- package/commonjs/systemProps/flexbox.js +3 -1
- package/commonjs/systemProps/grid.js +3 -1
- package/commonjs/systemProps/index.js +87 -15
- package/commonjs/systemProps/layout.js +3 -1
- package/commonjs/systemProps/position.js +3 -1
- package/commonjs/systemProps/shadow.js +3 -1
- package/commonjs/systemProps/space.js +3 -1
- package/commonjs/systemProps/systemProps.js +3 -1
- package/commonjs/systemProps/typography.js +3 -1
- package/commonjs/systemProps/variant.js +3 -1
- package/commonjs/themes/dark/dataviz-palette.js +3 -1
- package/commonjs/themes/dark/decorative-palettes.js +3 -1
- package/commonjs/themes/dark/theme.js +11 -7
- package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +9 -5
- package/commonjs/themes/extendedThemes/sproutTheme/index.js +15 -4
- package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +8 -4
- package/commonjs/themes/light/dataviz-palette.js +3 -1
- package/commonjs/themes/light/decorative-palettes.js +3 -1
- package/commonjs/themes/light/literal-colors.js +3 -1
- package/commonjs/themes/light/theme.js +17 -13
- package/commonjs/utils/a11yTest.js +5 -2
- package/commonjs/utils/chartColors.js +3 -1
- package/commonjs/utils/constants.js +3 -1
- package/commonjs/utils/dataQaLabelQueries.js +26 -16
- package/commonjs/utils/hooks.js +39 -26
- package/commonjs/utils/index.js +18 -8
- package/commonjs/utils/innerText.js +4 -2
- package/commonjs/utils/mixins.js +3 -1
- package/commonjs/utils/react-testing-library.js +74 -18
- package/commonjs/utils/responsiveProps/index.js +16 -8
- package/commonjs/utils/system-props.js +6 -2
- package/commonjs/utils/useInteractiveColor.js +3 -1
- package/dist/themes/dark/theme.scss +0 -1
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +0 -1
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +0 -1
- package/dist/themes/light/theme.scss +0 -1
- package/lib/Avatar/index.js +17 -11
- package/lib/Badge/index.js +5 -4
- package/lib/Badge/styles.js +3 -3
- package/lib/Banner/index.js +7 -5
- package/lib/Banner/styles.js +1 -1
- package/lib/Box/index.js +1 -1
- package/lib/Box/styles.js +1 -1
- package/lib/Breadcrumb/index.js +11 -7
- package/lib/Button/index.js +3 -2
- package/lib/Button/styles.js +4 -4
- package/lib/Card/index.js +3 -2
- package/lib/Card/styles.js +2 -2
- package/lib/CharacterCounter/index.js +36 -21
- package/lib/CharacterCounter/styles.js +1 -1
- package/lib/ChartLegend/index.js +5 -4
- package/lib/ChartLegend/styles.js +1 -1
- package/lib/Checkbox/index.js +114 -96
- package/lib/Checkbox/styles.js +5 -5
- package/lib/Collapsible/index.js +25 -13
- package/lib/Collapsible/styles.js +2 -2
- package/lib/DatePicker/DateRangePicker.js +4 -3
- package/lib/DatePicker/SingleDatePicker.js +4 -3
- package/lib/DatePicker/StatefulDateRangePicker.js +15 -6
- package/lib/DatePicker/StatefulSingleDatePicker.js +12 -4
- package/lib/DatePicker/common.js +3 -3
- package/lib/DatePicker/index.js +2 -2
- package/lib/DatePicker/styles.js +2 -2
- package/lib/Drawer/SlideTransition.js +4 -3
- package/lib/Drawer/index.js +17 -12
- package/lib/Drawer/styles.js +2 -2
- package/lib/EmptyState/index.js +4 -3
- package/lib/Fieldset/index.js +8 -7
- package/lib/Fieldset/styles.js +1 -1
- package/lib/FormField/index.js +17 -9
- package/lib/Icon/index.js +8 -7
- package/lib/Icon/styles.js +2 -2
- package/lib/Image/index.js +75 -57
- package/lib/Image/styles.js +1 -1
- package/lib/Indicator/index.js +38 -23
- package/lib/Indicator/styles.js +3 -3
- package/lib/Input/index.js +157 -135
- package/lib/Input/styles.js +3 -3
- package/lib/KeyboardKey/index.js +28 -14
- package/lib/KeyboardKey/styles.js +1 -1
- package/lib/Label/index.js +29 -15
- package/lib/Link/index.js +5 -3
- package/lib/Link/styles.js +3 -3
- package/lib/Listbox/index.js +14 -10
- package/lib/Loader/index.js +40 -25
- package/lib/Loader/styles.js +2 -2
- package/lib/LoaderButton/index.js +5 -4
- package/lib/Menu/descendants.js +30 -18
- package/lib/Menu/hooks.js +7 -9
- package/lib/Menu/index.flow.js +4 -4
- package/lib/Menu/index.js +54 -40
- package/lib/Menu/styles.js +3 -3
- package/lib/Message/index.js +6 -5
- package/lib/Message/styles.js +4 -4
- package/lib/Modal/index.js +9 -8
- package/lib/Modal/styles.js +6 -5
- package/lib/Numeral/index.js +15 -7
- package/lib/Numeral/styles.js +1 -1
- package/lib/Numeral/tests/testNumeral.js +15 -11
- package/lib/OverflowList/index.js +3 -3
- package/lib/OverflowList/styles.js +1 -1
- package/lib/PartnerLogo/index.js +8 -7
- package/lib/PartnerLogo/styles.js +1 -1
- package/lib/Popout/index.js +27 -15
- package/lib/Popout/styles.js +1 -1
- package/lib/Portal/index.js +47 -29
- package/lib/Radio/index.js +72 -56
- package/lib/Radio/styles.js +3 -3
- package/lib/SegmentedControl/index.js +18 -9
- package/lib/SegmentedControl/styles.js +3 -3
- package/lib/Select/index.js +76 -61
- package/lib/Select/styles.js +5 -5
- package/lib/Skeleton/index.js +2 -2
- package/lib/SpotIllustration/index.js +3 -3
- package/lib/Stack/index.js +4 -3
- package/lib/Switch/index.js +53 -37
- package/lib/Switch/styles.js +4 -4
- package/lib/Table/index.js +12 -11
- package/lib/Table/styles.js +1 -1
- package/lib/TableCell/index.js +38 -23
- package/lib/TableCell/styles.js +1 -1
- package/lib/TableHeaderCell/index.js +54 -38
- package/lib/TableHeaderCell/styles.js +1 -1
- package/lib/TableRowAccordion/index.js +62 -46
- package/lib/TableRowAccordion/styles.js +1 -1
- package/lib/Tabs/index.js +115 -90
- package/lib/Tabs/styles.js +5 -5
- package/lib/Text/index.js +3 -2
- package/lib/Text/styles.js +1 -1
- package/lib/Textarea/index.js +101 -86
- package/lib/Textarea/styles.js +2 -2
- package/lib/ThemeProvider/index.js +1 -1
- package/lib/Toast/index.js +6 -10
- package/lib/Toast/styles.js +4 -3
- package/lib/ToggleHint/index.js +43 -27
- package/lib/ToggleHint/styles.js +3 -3
- package/lib/Token/index.js +6 -5
- package/lib/Token/styles.js +3 -3
- package/lib/TokenInput/index.js +223 -196
- package/lib/TokenInput/styles.js +2 -2
- package/lib/TokenInput/util.js +2 -2
- package/lib/Tooltip/index.js +28 -14
- package/lib/Tooltip/styles.js +1 -1
- package/lib/VisuallyHidden/index.js +1 -1
- package/lib/dataviz/index.js +1 -1
- package/lib/index.js +64 -64
- package/lib/systemProps/index.js +14 -14
- package/lib/systemProps/systemProps.js +12 -12
- package/lib/themes/dark/theme.js +11 -9
- package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +7 -5
- package/lib/themes/extendedThemes/sproutTheme/index.js +2 -2
- package/lib/themes/extendedThemes/sproutTheme/light/theme.js +6 -4
- package/lib/themes/light/theme.js +17 -15
- package/lib/types/theme.colors.flow.js +2 -2
- package/lib/types/theme.flow.js +2 -2
- package/lib/utils/a11yTest.js +3 -1
- package/lib/utils/dataQaLabelQueries.js +23 -15
- package/lib/utils/hooks.js +37 -26
- package/lib/utils/index.js +15 -7
- package/lib/utils/innerText.js +1 -1
- package/lib/utils/mixins.js +1 -1
- package/lib/utils/react-testing-library.js +11 -8
- package/lib/utils/responsiveProps/index.js +14 -8
- package/lib/utils/system-props.js +1 -0
- package/package.json +21 -35
- package/__flow__/Avatar/index.test.js +0 -23
package/lib/index.js
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
export * from
|
|
4
|
-
export { visuallyHidden, focusRing, disabled } from
|
|
5
|
-
export { useSelect, useMultiselect, useTextContent } from
|
|
6
|
-
export { useInteractiveColor } from
|
|
7
|
-
export { default as theme } from
|
|
8
|
-
export { default as darkTheme } from
|
|
9
|
-
export { sproutLightTheme, sproutDarkTheme } from
|
|
10
|
-
export { default as Icon } from
|
|
3
|
+
export * from "./systemProps";
|
|
4
|
+
export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
|
|
5
|
+
export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
|
|
6
|
+
export { useInteractiveColor } from "./utils/useInteractiveColor";
|
|
7
|
+
export { default as theme } from "./themes/light/theme";
|
|
8
|
+
export { default as darkTheme } from "./themes/dark/theme";
|
|
9
|
+
export { sproutLightTheme, sproutDarkTheme } from "./themes/extendedThemes/sproutTheme";
|
|
10
|
+
export { default as Icon } from "./Icon";
|
|
11
11
|
// DEPRECATED: Alert has been renamed to Banner
|
|
12
|
-
export { default as Alert } from
|
|
13
|
-
export { default as Banner } from
|
|
14
|
-
export { default as Badge } from
|
|
15
|
-
export { default as Indicator } from
|
|
16
|
-
export { default as Card } from
|
|
17
|
-
export { default as CharacterCounter } from
|
|
18
|
-
export { default as Checkbox } from
|
|
19
|
-
export { default as Radio } from
|
|
20
|
-
export { default as Textarea } from
|
|
21
|
-
export { default as ToggleHint } from
|
|
22
|
-
export { default as Loader } from
|
|
23
|
-
export { default as Text } from
|
|
24
|
-
export { default as Image } from
|
|
25
|
-
export { default as KeyboardKey } from
|
|
26
|
-
export { default as ChartLegend } from
|
|
27
|
-
export { default as Table } from
|
|
28
|
-
export { default as TableCell } from
|
|
29
|
-
export { default as TableHeaderCell } from
|
|
30
|
-
export { default as TableRowAccordion } from
|
|
31
|
-
export { default as Box } from
|
|
32
|
-
export { default as Label } from
|
|
33
|
-
export { default as Input } from
|
|
34
|
-
export { default as Select } from
|
|
35
|
-
export { default as Button } from
|
|
36
|
-
export { default as Link } from
|
|
37
|
-
export { default as Switch } from
|
|
38
|
-
export { default as Token } from
|
|
39
|
-
export { default as TokenInput } from
|
|
40
|
-
export { default as Tabs } from
|
|
41
|
-
export { default as Modal } from
|
|
42
|
-
export { default as Popout } from
|
|
43
|
-
export { default as ThemeProvider } from
|
|
44
|
-
export { default as Tooltip } from
|
|
45
|
-
export { default as Drawer } from
|
|
46
|
-
export { default as LoaderButton } from
|
|
47
|
-
export { default as Numeral } from
|
|
48
|
-
export { default as Collapsible } from
|
|
49
|
-
export { default as SegmentedControl } from
|
|
50
|
-
export { default as EmptyState } from
|
|
51
|
-
export { default as FormField } from
|
|
52
|
-
export { default as Fieldset } from
|
|
53
|
-
export { default as Message } from
|
|
54
|
-
export { default as Stack } from
|
|
55
|
-
export { default as Avatar } from
|
|
56
|
-
export { default as Breadcrumb } from
|
|
57
|
-
export { default as Skeleton } from
|
|
58
|
-
export { default as ToastContainer, toast } from
|
|
59
|
-
export { default as Menu, MenuButton } from
|
|
60
|
-
export { MenuButtonContext } from
|
|
61
|
-
export { MenuItemContainer } from
|
|
62
|
-
export { default as Listbox, ListboxButton } from
|
|
63
|
-
export { default as OverflowList } from
|
|
64
|
-
export { SingleDatePicker, DateRangePicker } from
|
|
65
|
-
export { VisuallyHidden } from
|
|
66
|
-
export { default as PartnerLogo } from
|
|
67
|
-
export { default as SpotIllustration } from
|
|
12
|
+
export { default as Alert } from "./Banner";
|
|
13
|
+
export { default as Banner } from "./Banner";
|
|
14
|
+
export { default as Badge } from "./Badge";
|
|
15
|
+
export { default as Indicator } from "./Indicator";
|
|
16
|
+
export { default as Card } from "./Card";
|
|
17
|
+
export { default as CharacterCounter } from "./CharacterCounter";
|
|
18
|
+
export { default as Checkbox } from "./Checkbox";
|
|
19
|
+
export { default as Radio } from "./Radio";
|
|
20
|
+
export { default as Textarea } from "./Textarea";
|
|
21
|
+
export { default as ToggleHint } from "./ToggleHint";
|
|
22
|
+
export { default as Loader } from "./Loader";
|
|
23
|
+
export { default as Text } from "./Text";
|
|
24
|
+
export { default as Image } from "./Image";
|
|
25
|
+
export { default as KeyboardKey } from "./KeyboardKey";
|
|
26
|
+
export { default as ChartLegend } from "./ChartLegend";
|
|
27
|
+
export { default as Table } from "./Table";
|
|
28
|
+
export { default as TableCell } from "./TableCell";
|
|
29
|
+
export { default as TableHeaderCell } from "./TableHeaderCell";
|
|
30
|
+
export { default as TableRowAccordion } from "./TableRowAccordion";
|
|
31
|
+
export { default as Box } from "./Box";
|
|
32
|
+
export { default as Label } from "./Label";
|
|
33
|
+
export { default as Input } from "./Input";
|
|
34
|
+
export { default as Select } from "./Select";
|
|
35
|
+
export { default as Button } from "./Button";
|
|
36
|
+
export { default as Link } from "./Link";
|
|
37
|
+
export { default as Switch } from "./Switch";
|
|
38
|
+
export { default as Token } from "./Token";
|
|
39
|
+
export { default as TokenInput } from "./TokenInput";
|
|
40
|
+
export { default as Tabs } from "./Tabs";
|
|
41
|
+
export { default as Modal } from "./Modal";
|
|
42
|
+
export { default as Popout } from "./Popout";
|
|
43
|
+
export { default as ThemeProvider } from "./ThemeProvider";
|
|
44
|
+
export { default as Tooltip } from "./Tooltip";
|
|
45
|
+
export { default as Drawer } from "./Drawer";
|
|
46
|
+
export { default as LoaderButton } from "./LoaderButton";
|
|
47
|
+
export { default as Numeral } from "./Numeral";
|
|
48
|
+
export { default as Collapsible } from "./Collapsible";
|
|
49
|
+
export { default as SegmentedControl } from "./SegmentedControl";
|
|
50
|
+
export { default as EmptyState } from "./EmptyState";
|
|
51
|
+
export { default as FormField } from "./FormField";
|
|
52
|
+
export { default as Fieldset } from "./Fieldset";
|
|
53
|
+
export { default as Message } from "./Message";
|
|
54
|
+
export { default as Stack } from "./Stack";
|
|
55
|
+
export { default as Avatar } from "./Avatar";
|
|
56
|
+
export { default as Breadcrumb } from "./Breadcrumb";
|
|
57
|
+
export { default as Skeleton } from "./Skeleton";
|
|
58
|
+
export { default as ToastContainer, toast } from "./Toast";
|
|
59
|
+
export { default as Menu, MenuButton } from "./Menu";
|
|
60
|
+
export { MenuButtonContext } from "./Menu/hooks";
|
|
61
|
+
export { MenuItemContainer } from "./Menu/styles";
|
|
62
|
+
export { default as Listbox, ListboxButton } from "./Listbox";
|
|
63
|
+
export { default as OverflowList } from "./OverflowList";
|
|
64
|
+
export { SingleDatePicker, DateRangePicker } from "./DatePicker";
|
|
65
|
+
export { VisuallyHidden } from "./VisuallyHidden";
|
|
66
|
+
export { default as PartnerLogo } from "./PartnerLogo";
|
|
67
|
+
export { default as SpotIllustration } from "./SpotIllustration";
|
package/lib/systemProps/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
3
|
+
export * from "./types.flow.js";
|
|
4
|
+
export * from "./background";
|
|
5
|
+
export * from "./border";
|
|
6
|
+
export * from "./color";
|
|
7
|
+
export * from "./custom";
|
|
8
|
+
export * from "./flexbox";
|
|
9
|
+
export * from "./grid";
|
|
10
|
+
export * from "./layout";
|
|
11
|
+
export * from "./position";
|
|
12
|
+
export * from "./shadow";
|
|
13
|
+
export * from "./space";
|
|
14
|
+
export * from "./systemProps";
|
|
15
|
+
export * from "./typography";
|
|
16
|
+
export * from "./variant";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
import { compose } from 'styled-system';
|
|
3
|
-
import { backgroundSystemProps } from
|
|
4
|
-
import { borderSystemProps } from
|
|
5
|
-
import { colorSystemProps } from
|
|
6
|
-
import { customSystemProps } from
|
|
7
|
-
import { flexboxSystemProps } from
|
|
8
|
-
import { gridSystemProps } from
|
|
9
|
-
import { layoutSystemProps } from
|
|
10
|
-
import { positionSystemProps } from
|
|
11
|
-
import { shadowSystemProps } from
|
|
12
|
-
import { spaceSystemProps } from
|
|
13
|
-
import { typographySystemProps } from
|
|
14
|
-
import { variantSystemProps } from
|
|
3
|
+
import { backgroundSystemProps } from "./background";
|
|
4
|
+
import { borderSystemProps } from "./border";
|
|
5
|
+
import { colorSystemProps } from "./color";
|
|
6
|
+
import { customSystemProps } from "./custom";
|
|
7
|
+
import { flexboxSystemProps } from "./flexbox";
|
|
8
|
+
import { gridSystemProps } from "./grid";
|
|
9
|
+
import { layoutSystemProps } from "./layout";
|
|
10
|
+
import { positionSystemProps } from "./position";
|
|
11
|
+
import { shadowSystemProps } from "./shadow";
|
|
12
|
+
import { spaceSystemProps } from "./space";
|
|
13
|
+
import { typographySystemProps } from "./typography";
|
|
14
|
+
import { variantSystemProps } from "./variant";
|
|
15
15
|
export var systemProps = compose(customSystemProps, variantSystemProps, backgroundSystemProps, borderSystemProps, colorSystemProps, flexboxSystemProps, gridSystemProps, layoutSystemProps, positionSystemProps, shadowSystemProps, spaceSystemProps, typographySystemProps);
|
package/lib/themes/dark/theme.js
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
4
|
|
|
3
5
|
import COLORS from '@sproutsocial/seeds-color';
|
|
4
6
|
import DEPTH from '@sproutsocial/seeds-depth';
|
|
5
|
-
import lightTheme from
|
|
6
|
-
import { datavizPalette } from
|
|
7
|
-
import { green, blue, purple, yellow, orange, red, neutral, magenta, pink, aqua, teal } from
|
|
7
|
+
import lightTheme from "../light/theme";
|
|
8
|
+
import { datavizPalette } from "./dataviz-palette";
|
|
9
|
+
import { green, blue, purple, yellow, orange, red, neutral, magenta, pink, aqua, teal } from "./decorative-palettes";
|
|
8
10
|
import { transparentize } from 'polished';
|
|
9
11
|
var MODE = 'dark';
|
|
10
12
|
export var shadows = {
|
|
11
|
-
low: DEPTH.ELEVATION_LEVEL_100
|
|
12
|
-
medium: DEPTH.ELEVATION_LEVEL_300
|
|
13
|
-
high: DEPTH.ELEVATION_LEVEL_400
|
|
13
|
+
low: "".concat(DEPTH.ELEVATION_LEVEL_100, " ").concat(COLORS.COLOR_NEUTRAL_1100, "FF"),
|
|
14
|
+
medium: "".concat(DEPTH.ELEVATION_LEVEL_300, " ").concat(COLORS.COLOR_NEUTRAL_1100, "FF"),
|
|
15
|
+
high: "".concat(DEPTH.ELEVATION_LEVEL_400, " ").concat(COLORS.COLOR_NEUTRAL_1100, "FF")
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
// If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
|
|
17
19
|
|
|
18
|
-
var colors =
|
|
20
|
+
var colors = _objectSpread(_objectSpread({}, lightTheme.colors), {}, {
|
|
19
21
|
app: {
|
|
20
22
|
background: {
|
|
21
23
|
base: COLORS.COLOR_NEUTRAL_1000
|
|
@@ -234,7 +236,7 @@ var colors = _extends({}, lightTheme.colors, {
|
|
|
234
236
|
list: datavizPalette.DATAVIZ_COLORS_LIST
|
|
235
237
|
}
|
|
236
238
|
}, datavizPalette);
|
|
237
|
-
var darkTheme =
|
|
239
|
+
var darkTheme = _objectSpread(_objectSpread({}, lightTheme), {}, {
|
|
238
240
|
colors: colors,
|
|
239
241
|
shadows: shadows,
|
|
240
242
|
mode: MODE
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
4
|
import { transparentize } from 'polished';
|
|
3
|
-
import baseDarkTheme from
|
|
5
|
+
import baseDarkTheme from "../../../dark/theme";
|
|
4
6
|
export var navigation = {
|
|
5
7
|
main: {
|
|
6
8
|
background: {
|
|
@@ -25,7 +27,7 @@ export var navigation = {
|
|
|
25
27
|
// Uses hexicimal to change the opacity of the color
|
|
26
28
|
// Adding 'A3' at end to make this color have a 64% opacity
|
|
27
29
|
// Reference https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4
|
|
28
|
-
base: baseDarkTheme.colors.neutral[1000]
|
|
30
|
+
base: "".concat(baseDarkTheme.colors.neutral[1000], "A3")
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
},
|
|
@@ -188,8 +190,8 @@ export var cardControl = {
|
|
|
188
190
|
selected: baseDarkTheme.colors.text.body
|
|
189
191
|
}
|
|
190
192
|
};
|
|
191
|
-
var darkTheme =
|
|
192
|
-
colors:
|
|
193
|
+
var darkTheme = _objectSpread(_objectSpread({}, baseDarkTheme), {}, {
|
|
194
|
+
colors: _objectSpread(_objectSpread({}, baseDarkTheme.colors), {}, {
|
|
193
195
|
navigation: navigation,
|
|
194
196
|
datePicker: datePicker,
|
|
195
197
|
analytics: analytics,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
export { default as sproutLightTheme } from
|
|
3
|
-
export { default as sproutDarkTheme } from
|
|
2
|
+
export { default as sproutLightTheme } from "./light/theme";
|
|
3
|
+
export { default as sproutDarkTheme } from "./dark/theme";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
4
|
import { transparentize } from 'polished';
|
|
3
|
-
import baseLightTheme from
|
|
5
|
+
import baseLightTheme from "../../../light/theme";
|
|
4
6
|
export var navigation = {
|
|
5
7
|
main: {
|
|
6
8
|
background: {
|
|
@@ -185,8 +187,8 @@ export var cardControl = {
|
|
|
185
187
|
selected: baseLightTheme.colors.text.inverse
|
|
186
188
|
}
|
|
187
189
|
};
|
|
188
|
-
var lightTheme =
|
|
189
|
-
colors:
|
|
190
|
+
var lightTheme = _objectSpread(_objectSpread({}, baseLightTheme), {}, {
|
|
191
|
+
colors: _objectSpread(_objectSpread({}, baseLightTheme.colors), {}, {
|
|
190
192
|
navigation: navigation,
|
|
191
193
|
datePicker: datePicker,
|
|
192
194
|
analytics: analytics,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
4
|
|
|
3
5
|
import COLORS from '@sproutsocial/seeds-color';
|
|
4
|
-
import literalColors from
|
|
5
|
-
import { datavizPalette } from
|
|
6
|
-
import { green, blue, purple, yellow, orange, red, neutral, magenta, pink, aqua, teal } from
|
|
6
|
+
import literalColors from "./literal-colors";
|
|
7
|
+
import { datavizPalette } from "./dataviz-palette";
|
|
8
|
+
import { green, blue, purple, yellow, orange, red, neutral, magenta, pink, aqua, teal } from "./decorative-palettes";
|
|
7
9
|
import NETWORKCOLORS from '@sproutsocial/seeds-networkcolor';
|
|
8
10
|
import TYPOGRAPHY from '@sproutsocial/seeds-typography';
|
|
9
11
|
import SPACE from '@sproutsocial/seeds-space';
|
|
@@ -16,7 +18,7 @@ var MODE = 'light';
|
|
|
16
18
|
|
|
17
19
|
// If you are making changes to the colors in the theme file tag the Design Systems team on your PR! Thank you!!
|
|
18
20
|
|
|
19
|
-
var colors =
|
|
21
|
+
var colors = _objectSpread(_objectSpread({
|
|
20
22
|
app: {
|
|
21
23
|
background: {
|
|
22
24
|
base: COLORS.COLOR_NEUTRAL_100
|
|
@@ -223,7 +225,7 @@ var colors = _extends({
|
|
|
223
225
|
}
|
|
224
226
|
},
|
|
225
227
|
elevation: {
|
|
226
|
-
base: COLORS.COLOR_NEUTRAL_900
|
|
228
|
+
base: "".concat(COLORS.COLOR_NEUTRAL_900, "3D")
|
|
227
229
|
},
|
|
228
230
|
illustration: {
|
|
229
231
|
fill: COLORS.COLOR_BLUE_400,
|
|
@@ -260,7 +262,7 @@ var colors = _extends({
|
|
|
260
262
|
map: datavizPalette.DATAVIZ_COLORS_MAP,
|
|
261
263
|
list: datavizPalette.DATAVIZ_COLORS_LIST
|
|
262
264
|
}
|
|
263
|
-
}, literalColors, datavizPalette);
|
|
265
|
+
}, literalColors), datavizPalette);
|
|
264
266
|
export var typography = {
|
|
265
267
|
'100': TYPOGRAPHY.TYPOGRAPHY_SIZE_100,
|
|
266
268
|
'200': TYPOGRAPHY.TYPOGRAPHY_SIZE_200,
|
|
@@ -309,15 +311,15 @@ export var radii = {
|
|
|
309
311
|
pill: BORDER.BORDER_RADIUS_1000
|
|
310
312
|
};
|
|
311
313
|
export var borders = {
|
|
312
|
-
'500': BORDER.BORDER_WIDTH_500
|
|
314
|
+
'500': "".concat(BORDER.BORDER_WIDTH_500, " solid")
|
|
313
315
|
};
|
|
314
316
|
export var borderWidths = {
|
|
315
317
|
'500': BORDER.BORDER_WIDTH_500
|
|
316
318
|
};
|
|
317
319
|
export var shadows = {
|
|
318
|
-
low: DEPTH.ELEVATION_LEVEL_100
|
|
319
|
-
medium: DEPTH.ELEVATION_LEVEL_300
|
|
320
|
-
high: DEPTH.ELEVATION_LEVEL_400
|
|
320
|
+
low: "".concat(DEPTH.ELEVATION_LEVEL_100, " ").concat(COLORS.COLOR_NEUTRAL_900, "3D"),
|
|
321
|
+
medium: "".concat(DEPTH.ELEVATION_LEVEL_300, " ").concat(COLORS.COLOR_NEUTRAL_900, "3D"),
|
|
322
|
+
high: "".concat(DEPTH.ELEVATION_LEVEL_400, " ").concat(COLORS.COLOR_NEUTRAL_900, "3D")
|
|
321
323
|
};
|
|
322
324
|
export var easing = {
|
|
323
325
|
ease_in: MOTION.MOTION_EASE_IN,
|
|
@@ -332,20 +334,20 @@ export var duration = {
|
|
|
332
334
|
var theme = {
|
|
333
335
|
breakpoints: breakpoints,
|
|
334
336
|
colors: colors,
|
|
335
|
-
typography:
|
|
337
|
+
typography: _objectSpread(_objectSpread({}, typography), {}, {
|
|
336
338
|
typography: typography
|
|
337
339
|
}),
|
|
338
340
|
fontFamily: fontFamily,
|
|
339
341
|
fontWeights: fontWeights,
|
|
340
|
-
space:
|
|
342
|
+
space: _objectSpread(_objectSpread({}, space), {}, {
|
|
341
343
|
space: space,
|
|
342
344
|
'-space': Object.keys(space).reduce(function (negativeSpace, key) {
|
|
343
345
|
// The values are strings (eg 24px) so we concatenate a negative sign
|
|
344
|
-
negativeSpace[key] = "-"
|
|
346
|
+
negativeSpace[key] = "-".concat(space[key]);
|
|
345
347
|
return negativeSpace;
|
|
346
348
|
}, {})
|
|
347
349
|
}),
|
|
348
|
-
radii:
|
|
350
|
+
radii: _objectSpread(_objectSpread({}, radii), {}, {
|
|
349
351
|
radii: radii
|
|
350
352
|
}),
|
|
351
353
|
borders: borders,
|
package/lib/types/theme.flow.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { breakpoints, typography, fontWeights, radii, borders, borderWidths, shadows, space, easing, duration } from
|
|
3
|
-
import { datePicker, navigation, analytics, listening, growth, cardControl } from
|
|
2
|
+
import { breakpoints, typography, fontWeights, radii, borders, borderWidths, shadows, space, easing, duration } from "../themes/light/theme";
|
|
3
|
+
import { datePicker, navigation, analytics, listening, growth, cardControl } from "../themes/extendedThemes/sproutTheme/light/theme";
|
package/lib/utils/a11yTest.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
2
3
|
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); } }
|
|
3
4
|
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); }); }; }
|
|
5
|
+
/* eslint-env jest, node */
|
|
4
6
|
import { axe } from 'jest-axe';
|
|
5
7
|
|
|
6
8
|
// use runA11yCheck from react-test-library utils file if using react-testing-library
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
7
|
import { buildQueries, queryAllByAttribute } from '@testing-library/react';
|
|
3
8
|
var getKeyValuePair = function getKeyValuePair(object) {
|
|
4
9
|
var key = Object.keys(object)[0];
|
|
@@ -6,13 +11,14 @@ var getKeyValuePair = function getKeyValuePair(object) {
|
|
|
6
11
|
return [key, value];
|
|
7
12
|
};
|
|
8
13
|
var getDataQaKey = function getDataQaKey(key) {
|
|
9
|
-
return "data-qa-"
|
|
14
|
+
return "data-qa-".concat(key);
|
|
10
15
|
};
|
|
11
16
|
var getTestIdAttribute = function getTestIdAttribute(qaObject) {
|
|
12
17
|
var _getKeyValuePair = getKeyValuePair(qaObject),
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
_getKeyValuePair2 = _slicedToArray(_getKeyValuePair, 2),
|
|
19
|
+
key = _getKeyValuePair2[0],
|
|
20
|
+
value = _getKeyValuePair2[1];
|
|
21
|
+
return "[".concat(getDataQaKey(key), "=\"").concat(value, "\"]");
|
|
16
22
|
};
|
|
17
23
|
|
|
18
24
|
// dom-testing-library works by looking in the dom for: [data-qa-somelabel]
|
|
@@ -28,23 +34,25 @@ var getTestIdAttribute = function getTestIdAttribute(qaObject) {
|
|
|
28
34
|
//
|
|
29
35
|
// queryAllByAttribute('data-qa-label', container, 'my-input', ...rest)
|
|
30
36
|
var queryAllByDataQaLabel = function queryAllByDataQaLabel(container, qaObject, options) {
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
37
|
+
var _getKeyValuePair3 = getKeyValuePair(qaObject),
|
|
38
|
+
_getKeyValuePair4 = _slicedToArray(_getKeyValuePair3, 2),
|
|
39
|
+
key = _getKeyValuePair4[0],
|
|
40
|
+
value = _getKeyValuePair4[1];
|
|
34
41
|
return queryAllByAttribute(getDataQaKey(key), container, String(value), options);
|
|
35
42
|
};
|
|
36
43
|
var getMultipleError = function getMultipleError(c, qaObject) {
|
|
37
|
-
return "Found multiple elements by: "
|
|
44
|
+
return "Found multiple elements by: ".concat(getTestIdAttribute(qaObject));
|
|
38
45
|
};
|
|
39
46
|
var getMissingError = function getMissingError(c, qaObject) {
|
|
40
|
-
return "Unable to find an element by: "
|
|
47
|
+
return "Unable to find an element by: ".concat(getTestIdAttribute(qaObject));
|
|
41
48
|
};
|
|
42
49
|
var _buildQueries = buildQueries(queryAllByDataQaLabel, getMultipleError, getMissingError),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
_buildQueries2 = _slicedToArray(_buildQueries, 5),
|
|
51
|
+
queryByDataQaLabel = _buildQueries2[0],
|
|
52
|
+
getAllByDataQaLabel = _buildQueries2[1],
|
|
53
|
+
getByDataQaLabel = _buildQueries2[2],
|
|
54
|
+
findAllByDataQaLabel = _buildQueries2[3],
|
|
55
|
+
findByDataQaLabel = _buildQueries2[4];
|
|
48
56
|
export var dataQaLabelQueries = {
|
|
49
57
|
queryByDataQaLabel: queryByDataQaLabel,
|
|
50
58
|
queryAllByDataQaLabel: queryAllByDataQaLabel,
|