@telus-uds/components-base 1.8.1 → 1.8.4
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 +35 -2
- package/component-docs.json +711 -669
- package/lib/A11yInfoProvider/index.js +4 -3
- package/lib/A11yText/index.js +6 -5
- package/lib/ActivityIndicator/Spinner.js +14 -13
- package/lib/ActivityIndicator/Spinner.native.js +10 -8
- package/lib/ActivityIndicator/index.js +6 -5
- package/lib/ActivityIndicator/shared.js +1 -1
- package/lib/BaseProvider/index.js +13 -10
- package/lib/Box/Box.js +20 -19
- package/lib/Button/Button.js +7 -6
- package/lib/Button/ButtonBase.js +97 -79
- package/lib/Button/ButtonGroup.js +34 -32
- package/lib/Button/ButtonLink.js +9 -7
- package/lib/Button/index.js +4 -4
- package/lib/Button/propTypes.js +1 -1
- package/lib/Card/Card.js +8 -7
- package/lib/Card/CardBase.js +35 -31
- package/lib/Card/PressableCardBase.js +14 -12
- package/lib/Checkbox/Checkbox.js +97 -83
- package/lib/Checkbox/CheckboxGroup.js +29 -27
- package/lib/Checkbox/CheckboxInput.js +12 -10
- package/lib/Divider/Divider.js +10 -9
- package/lib/ExpandCollapse/Control.js +42 -36
- package/lib/ExpandCollapse/ExpandCollapse.js +11 -10
- package/lib/ExpandCollapse/Panel.js +29 -40
- package/lib/Feedback/Feedback.js +48 -35
- package/lib/Fieldset/Fieldset.js +16 -15
- package/lib/Fieldset/FieldsetContainer.js +16 -13
- package/lib/Fieldset/FieldsetContainer.native.js +11 -8
- package/lib/Fieldset/Legend.js +10 -7
- package/lib/Fieldset/Legend.native.js +10 -7
- package/lib/FlexGrid/Col/Col.js +18 -17
- package/lib/FlexGrid/FlexGrid.js +15 -14
- package/lib/FlexGrid/Row/Row.js +13 -12
- package/lib/HorizontalScroll/HorizontalScroll.js +25 -20
- package/lib/HorizontalScroll/HorizontalScrollButton.js +18 -14
- package/lib/HorizontalScroll/ScrollViewEnd.js +6 -5
- package/lib/HorizontalScroll/ScrollViewEnd.native.js +12 -9
- package/lib/HorizontalScroll/itemPositions.js +19 -13
- package/lib/Icon/Icon.js +11 -10
- package/lib/Icon/IconText.js +8 -7
- package/lib/Icon/index.js +5 -5
- package/lib/IconButton/IconButton.js +50 -42
- package/lib/InputLabel/InputLabel.js +37 -30
- package/lib/InputLabel/LabelContent.js +12 -9
- package/lib/InputLabel/LabelContent.native.js +9 -6
- package/lib/InputSupports/InputSupports.js +11 -10
- package/lib/InputSupports/useInputSupports.js +7 -6
- package/lib/Link/ChevronLink.js +9 -8
- package/lib/Link/InlinePressable.js +13 -10
- package/lib/Link/InlinePressable.native.js +20 -16
- package/lib/Link/Link.js +10 -9
- package/lib/Link/LinkBase.js +96 -78
- package/lib/Link/TextButton.js +9 -8
- package/lib/List/List.js +20 -13
- package/lib/List/ListItem.js +103 -79
- package/lib/Modal/Modal.js +74 -60
- package/lib/Notification/Notification.js +46 -33
- package/lib/Pagination/PageButton.js +13 -12
- package/lib/Pagination/Pagination.js +43 -30
- package/lib/Pagination/SideButton.js +21 -18
- package/lib/Pagination/usePagination.js +7 -6
- package/lib/Progress/Progress.js +23 -19
- package/lib/Progress/ProgressBar.js +25 -21
- package/lib/Progress/ProgressBarBackground.js +7 -6
- package/lib/Radio/Radio.js +80 -69
- package/lib/Radio/RadioButton.js +63 -53
- package/lib/Radio/RadioGroup.js +30 -28
- package/lib/Radio/RadioInput.js +12 -10
- package/lib/RadioCard/RadioCard.js +16 -15
- package/lib/RadioCard/RadioCardGroup.js +30 -28
- package/lib/Search/Search.js +52 -32
- package/lib/Select/Group.js +5 -4
- package/lib/Select/Group.native.js +4 -3
- package/lib/Select/Item.js +10 -7
- package/lib/Select/Item.native.js +1 -9
- package/lib/Select/Picker.js +16 -15
- package/lib/Select/Picker.native.js +49 -38
- package/lib/Select/Select.js +134 -113
- package/lib/SideNav/Item.js +39 -33
- package/lib/SideNav/ItemContent.js +15 -12
- package/lib/SideNav/ItemsGroup.js +13 -11
- package/lib/SideNav/SideNav.js +21 -18
- package/lib/Skeleton/Skeleton.js +60 -44
- package/lib/Skeleton/skeleton.constant.js +1 -1
- package/lib/Skeleton/skeletonWebAnimation.js +1 -1
- package/lib/Spacer/Spacer.js +6 -5
- package/lib/StackView/StackView.js +12 -11
- package/lib/StackView/StackWrap.js +5 -3
- package/lib/StackView/StackWrapBox.js +12 -11
- package/lib/StackView/StackWrapGap.js +11 -10
- package/lib/StackView/common.js +14 -11
- package/lib/StackView/getStackedContent.js +10 -9
- package/lib/StackView/index.js +1 -1
- package/lib/StepTracker/Step.js +122 -103
- package/lib/StepTracker/StepTracker.js +48 -38
- package/lib/Tabs/Tabs.js +57 -27
- package/lib/Tabs/TabsItem.js +78 -68
- package/lib/Tags/Tags.js +68 -62
- package/lib/TextInput/TextArea.js +26 -20
- package/lib/TextInput/TextInput.js +20 -15
- package/lib/TextInput/TextInputBase.js +74 -62
- package/lib/TextInput/index.js +4 -4
- package/lib/ThemeProvider/ThemeProvider.js +6 -5
- package/lib/ThemeProvider/index.js +5 -5
- package/lib/ThemeProvider/useSetTheme.js +6 -3
- package/lib/ThemeProvider/useThemeTokens.js +7 -2
- package/lib/ThemeProvider/utils/styles.js +50 -43
- package/lib/ThemeProvider/utils/theme-tokens.js +33 -21
- package/lib/ToggleSwitch/ToggleSwitch.js +90 -74
- package/lib/ToggleSwitch/ToggleSwitchGroup.js +37 -35
- package/lib/Tooltip/Backdrop.js +6 -13
- package/lib/Tooltip/Backdrop.native.js +5 -4
- package/lib/Tooltip/Tooltip.js +81 -65
- package/lib/Tooltip/getTooltipPosition.js +29 -18
- package/lib/TooltipButton/TooltipButton.js +28 -21
- package/lib/Typography/Typography.js +37 -33
- package/lib/ViewportProvider/ViewportProvider.js +4 -3
- package/lib/ViewportProvider/useViewportListener.js +6 -3
- package/lib/index.js +54 -54
- package/lib/utils/a11y/semantics.js +5 -2
- package/lib/utils/a11y/textSize.js +8 -6
- package/lib/utils/animation/useVerticalExpandAnimation.js +46 -19
- package/lib/utils/children.js +4 -3
- package/lib/utils/index.js +10 -10
- package/lib/utils/input.js +28 -29
- package/lib/utils/pressability.js +36 -22
- package/lib/utils/props/clickProps.js +2 -1
- package/lib/utils/props/componentPropType.js +3 -3
- package/lib/utils/props/getPropSelector.js +6 -3
- package/lib/utils/props/handlerProps.js +25 -19
- package/lib/utils/props/hrefAttrsProp.js +14 -11
- package/lib/utils/props/index.js +12 -12
- package/lib/utils/props/inputSupportsProps.js +15 -12
- package/lib/utils/props/linkProps.js +7 -6
- package/lib/utils/props/pressProps.js +1 -1
- package/lib/utils/props/selectSystemProps.js +2 -2
- package/lib/utils/props/tokens.js +29 -15
- package/lib/utils/ssr.js +6 -2
- package/lib/utils/useCopy.js +6 -4
- package/lib/utils/useHash.js +2 -1
- package/lib/utils/useResponsiveProp.js +1 -1
- package/lib/utils/useSpacingScale.js +3 -1
- package/lib/utils/useUniqueId.js +3 -2
- package/lib/utils/withLinkRouter.js +6 -5
- package/lib-module/A11yInfoProvider/index.js +4 -3
- package/lib-module/A11yText/index.js +6 -5
- package/lib-module/ActivityIndicator/Spinner.js +14 -13
- package/lib-module/ActivityIndicator/Spinner.native.js +9 -8
- package/lib-module/ActivityIndicator/index.js +6 -5
- package/lib-module/BaseProvider/index.js +13 -10
- package/lib-module/Box/Box.js +20 -19
- package/lib-module/Button/Button.js +7 -6
- package/lib-module/Button/ButtonBase.js +96 -79
- package/lib-module/Button/ButtonGroup.js +34 -32
- package/lib-module/Button/ButtonLink.js +8 -7
- package/lib-module/Card/Card.js +8 -7
- package/lib-module/Card/CardBase.js +35 -31
- package/lib-module/Card/PressableCardBase.js +12 -11
- package/lib-module/Checkbox/Checkbox.js +97 -83
- package/lib-module/Checkbox/CheckboxGroup.js +29 -27
- package/lib-module/Checkbox/CheckboxInput.js +12 -10
- package/lib-module/Divider/Divider.js +10 -9
- package/lib-module/ExpandCollapse/Control.js +42 -36
- package/lib-module/ExpandCollapse/ExpandCollapse.js +11 -10
- package/lib-module/ExpandCollapse/Panel.js +29 -37
- package/lib-module/Feedback/Feedback.js +46 -33
- package/lib-module/Fieldset/Fieldset.js +16 -15
- package/lib-module/Fieldset/FieldsetContainer.js +16 -13
- package/lib-module/Fieldset/FieldsetContainer.native.js +11 -8
- package/lib-module/Fieldset/Legend.js +10 -7
- package/lib-module/Fieldset/Legend.native.js +10 -7
- package/lib-module/FlexGrid/Col/Col.js +18 -17
- package/lib-module/FlexGrid/FlexGrid.js +15 -14
- package/lib-module/FlexGrid/Row/Row.js +13 -12
- package/lib-module/HorizontalScroll/HorizontalScroll.js +24 -19
- package/lib-module/HorizontalScroll/HorizontalScrollButton.js +18 -14
- package/lib-module/HorizontalScroll/ScrollViewEnd.js +6 -5
- package/lib-module/HorizontalScroll/ScrollViewEnd.native.js +12 -9
- package/lib-module/HorizontalScroll/itemPositions.js +18 -12
- package/lib-module/Icon/Icon.js +10 -9
- package/lib-module/Icon/IconText.js +9 -7
- package/lib-module/IconButton/IconButton.js +48 -41
- package/lib-module/InputLabel/InputLabel.js +37 -30
- package/lib-module/InputLabel/LabelContent.js +12 -9
- package/lib-module/InputLabel/LabelContent.native.js +9 -6
- package/lib-module/InputSupports/InputSupports.js +11 -10
- package/lib-module/InputSupports/useInputSupports.js +7 -6
- package/lib-module/Link/ChevronLink.js +9 -8
- package/lib-module/Link/InlinePressable.js +13 -10
- package/lib-module/Link/InlinePressable.native.js +20 -16
- package/lib-module/Link/Link.js +10 -9
- package/lib-module/Link/LinkBase.js +94 -77
- package/lib-module/Link/TextButton.js +9 -8
- package/lib-module/List/List.js +20 -13
- package/lib-module/List/ListItem.js +103 -78
- package/lib-module/Modal/Modal.js +74 -60
- package/lib-module/Notification/Notification.js +46 -33
- package/lib-module/Pagination/PageButton.js +13 -12
- package/lib-module/Pagination/Pagination.js +43 -30
- package/lib-module/Pagination/SideButton.js +21 -18
- package/lib-module/Pagination/usePagination.js +7 -6
- package/lib-module/Progress/Progress.js +23 -19
- package/lib-module/Progress/ProgressBar.js +25 -21
- package/lib-module/Progress/ProgressBarBackground.js +7 -6
- package/lib-module/Radio/Radio.js +80 -69
- package/lib-module/Radio/RadioButton.js +62 -52
- package/lib-module/Radio/RadioGroup.js +30 -28
- package/lib-module/Radio/RadioInput.js +12 -10
- package/lib-module/RadioCard/RadioCard.js +16 -15
- package/lib-module/RadioCard/RadioCardGroup.js +30 -28
- package/lib-module/Search/Search.js +52 -32
- package/lib-module/Select/Group.js +5 -4
- package/lib-module/Select/Group.native.js +4 -3
- package/lib-module/Select/Item.js +10 -7
- package/lib-module/Select/Item.native.js +1 -7
- package/lib-module/Select/Picker.js +16 -15
- package/lib-module/Select/Picker.native.js +46 -36
- package/lib-module/Select/Select.js +134 -113
- package/lib-module/SideNav/Item.js +39 -33
- package/lib-module/SideNav/ItemContent.js +14 -11
- package/lib-module/SideNav/ItemsGroup.js +13 -11
- package/lib-module/SideNav/SideNav.js +21 -18
- package/lib-module/Skeleton/Skeleton.js +60 -44
- package/lib-module/Skeleton/skeletonWebAnimation.js +1 -1
- package/lib-module/Spacer/Spacer.js +6 -5
- package/lib-module/StackView/StackView.js +12 -11
- package/lib-module/StackView/StackWrap.js +5 -3
- package/lib-module/StackView/StackWrapBox.js +12 -11
- package/lib-module/StackView/StackWrapGap.js +11 -10
- package/lib-module/StackView/common.js +14 -11
- package/lib-module/StackView/getStackedContent.js +10 -9
- package/lib-module/StepTracker/Step.js +122 -103
- package/lib-module/StepTracker/StepTracker.js +48 -38
- package/lib-module/Tabs/Tabs.js +57 -27
- package/lib-module/Tabs/TabsItem.js +77 -68
- package/lib-module/Tags/Tags.js +68 -62
- package/lib-module/TextInput/TextArea.js +26 -20
- package/lib-module/TextInput/TextInput.js +19 -15
- package/lib-module/TextInput/TextInputBase.js +74 -62
- package/lib-module/ThemeProvider/ThemeProvider.js +5 -4
- package/lib-module/ThemeProvider/useSetTheme.js +6 -3
- package/lib-module/ThemeProvider/useThemeTokens.js +7 -2
- package/lib-module/ThemeProvider/utils/styles.js +48 -41
- package/lib-module/ThemeProvider/utils/theme-tokens.js +32 -20
- package/lib-module/ToggleSwitch/ToggleSwitch.js +90 -74
- package/lib-module/ToggleSwitch/ToggleSwitchGroup.js +37 -35
- package/lib-module/Tooltip/Backdrop.js +6 -13
- package/lib-module/Tooltip/Backdrop.native.js +5 -4
- package/lib-module/Tooltip/Tooltip.js +81 -65
- package/lib-module/Tooltip/getTooltipPosition.js +29 -18
- package/lib-module/TooltipButton/TooltipButton.js +28 -21
- package/lib-module/Typography/Typography.js +35 -31
- package/lib-module/ViewportProvider/ViewportProvider.js +4 -3
- package/lib-module/ViewportProvider/useViewportListener.js +6 -3
- package/lib-module/utils/a11y/semantics.js +4 -1
- package/lib-module/utils/a11y/textSize.js +7 -5
- package/lib-module/utils/animation/useVerticalExpandAnimation.js +47 -20
- package/lib-module/utils/children.js +4 -3
- package/lib-module/utils/input.js +28 -29
- package/lib-module/utils/pressability.js +35 -21
- package/lib-module/utils/props/clickProps.js +2 -1
- package/lib-module/utils/props/componentPropType.js +3 -3
- package/lib-module/utils/props/getPropSelector.js +6 -3
- package/lib-module/utils/props/handlerProps.js +24 -18
- package/lib-module/utils/props/hrefAttrsProp.js +14 -11
- package/lib-module/utils/props/inputSupportsProps.js +15 -12
- package/lib-module/utils/props/linkProps.js +7 -6
- package/lib-module/utils/props/selectSystemProps.js +2 -2
- package/lib-module/utils/props/tokens.js +27 -14
- package/lib-module/utils/ssr.js +5 -2
- package/lib-module/utils/useCopy.js +6 -4
- package/lib-module/utils/useHash.js +2 -1
- package/lib-module/utils/useSpacingScale.js +3 -1
- package/lib-module/utils/useUniqueId.js +3 -2
- package/lib-module/utils/withLinkRouter.js +6 -5
- package/package.json +13 -11
- package/src/ExpandCollapse/Panel.jsx +2 -19
- package/src/List/List.jsx +34 -19
- package/src/List/ListItem.jsx +12 -2
- package/src/Modal/Modal.jsx +2 -1
- package/src/Pagination/Pagination.jsx +3 -0
- package/src/Search/Search.jsx +11 -0
- package/src/Select/Item.native.jsx +0 -7
- package/src/Tabs/Tabs.jsx +24 -2
- package/src/Tabs/TabsItem.jsx +6 -5
- package/src/utils/animation/useVerticalExpandAnimation.js +47 -13
|
@@ -5,43 +5,39 @@ import { useCallback, useRef, useState } from 'react';
|
|
|
5
5
|
|
|
6
6
|
const pluralHooks = ['useMultipleInputValues'];
|
|
7
7
|
|
|
8
|
-
const validateProps = ({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const validateProps = (_ref, _ref2, hookName) => {
|
|
9
|
+
let {
|
|
10
|
+
value,
|
|
11
|
+
onChange,
|
|
12
|
+
readOnly,
|
|
13
|
+
initialValue
|
|
14
|
+
} = _ref;
|
|
15
|
+
let {
|
|
16
|
+
isCurrentlyControlled,
|
|
17
|
+
isControlled
|
|
18
|
+
} = _ref2;
|
|
17
19
|
const s = pluralHooks.includes(hookName) ? 's' : '';
|
|
18
20
|
|
|
19
21
|
const usageError = error => {
|
|
20
22
|
// Errors inside hooks in React Native get incomplete stack traces pointing at parent component only.
|
|
21
23
|
// Help devs out by telling them exactly which hook threw the error as well as why.
|
|
22
|
-
throw new Error(
|
|
23
|
-
|
|
24
|
-
Consumers of this hook must be one of:
|
|
25
|
-
1. An "uncontrolled" component responding directly to user actions, with an optional \`initialValue${s}\` but no \`value${s}\` prop,
|
|
26
|
-
2. A "controlled" component where an always-defined \`value${s}\` prop is managed by an \`onChange\` handler, with no \`initialValue${s}\`,
|
|
27
|
-
3. A "read-only" component, with \`readOnly\` prop set as \`true\`.
|
|
28
|
-
`);
|
|
24
|
+
throw new Error("".concat(hookName, " ").concat(error, ".\n\nConsumers of this hook must be one of:\n1. An \"uncontrolled\" component responding directly to user actions, with an optional `initialValue").concat(s, "` but no `value").concat(s, "` prop,\n2. A \"controlled\" component where an always-defined `value").concat(s, "` prop is managed by an `onChange` handler, with no `initialValue").concat(s, "`,\n3. A \"read-only\" component, with `readOnly` prop set as `true`.\n"));
|
|
29
25
|
};
|
|
30
26
|
|
|
31
27
|
if (value && !onChange && !readOnly) {
|
|
32
|
-
usageError(
|
|
28
|
+
usageError("has `value".concat(s, "` prop without `onChange` or `readOnly`"));
|
|
33
29
|
}
|
|
34
30
|
|
|
35
31
|
if (initialValue && value) {
|
|
36
|
-
usageError(
|
|
32
|
+
usageError("has both `initialValue".concat(s, "` and `value").concat(s, "`"));
|
|
37
33
|
}
|
|
38
34
|
|
|
39
35
|
if (isControlled && !isCurrentlyControlled) {
|
|
40
|
-
usageError(
|
|
36
|
+
usageError("stopped receiving `value".concat(s, "` from parent after delegating state management"));
|
|
41
37
|
}
|
|
42
38
|
|
|
43
39
|
if (!isControlled && isCurrentlyControlled) {
|
|
44
|
-
usageError(
|
|
40
|
+
usageError("started receiving `value".concat(s, "` from parent after starting managing own state"));
|
|
45
41
|
}
|
|
46
42
|
};
|
|
47
43
|
/**
|
|
@@ -69,7 +65,9 @@ Consumers of this hook must be one of:
|
|
|
69
65
|
*/
|
|
70
66
|
|
|
71
67
|
|
|
72
|
-
export const useInputValue = (
|
|
68
|
+
export const useInputValue = function () {
|
|
69
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
70
|
+
let hookName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'useInputValue';
|
|
73
71
|
const isCurrentlyControlled = props.value !== undefined;
|
|
74
72
|
const [isControlled] = useState(isCurrentlyControlled);
|
|
75
73
|
validateProps(props, {
|
|
@@ -133,13 +131,14 @@ export const useInputValue = (props = {}, hookName = 'useInputValue') => {
|
|
|
133
131
|
* }}
|
|
134
132
|
*/
|
|
135
133
|
|
|
136
|
-
export const useMultipleInputValues = ({
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
134
|
+
export const useMultipleInputValues = function () {
|
|
135
|
+
let {
|
|
136
|
+
values,
|
|
137
|
+
initialValues,
|
|
138
|
+
maxValues,
|
|
139
|
+
onChange,
|
|
140
|
+
readOnly
|
|
141
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
143
142
|
const {
|
|
144
143
|
currentValue,
|
|
145
144
|
setValue,
|
|
@@ -149,7 +148,7 @@ export const useMultipleInputValues = ({
|
|
|
149
148
|
onChange,
|
|
150
149
|
value: values,
|
|
151
150
|
// if we're controlling our own state, always start with an array
|
|
152
|
-
initialValue: initialValues
|
|
151
|
+
initialValue: initialValues !== null && initialValues !== void 0 ? initialValues : values === undefined ? [] : undefined
|
|
153
152
|
}, 'useMultipleInputValues');
|
|
154
153
|
const enforceMaxValues = useCallback(newValues => {
|
|
155
154
|
if (!maxValues) return newValues;
|
|
@@ -19,11 +19,12 @@ const shouldUseCursor = ['checkbox', 'radio', 'switch'];
|
|
|
19
19
|
* @returns
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
export const getCursorStyle =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
export const getCursorStyle = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
inactive,
|
|
25
|
+
disabled,
|
|
26
|
+
accessibilityRole
|
|
27
|
+
} = _ref;
|
|
27
28
|
if (Platform.OS !== 'web') return undefined;
|
|
28
29
|
if (inactive || disabled) return staticStyles.notAllowed;
|
|
29
30
|
if (shouldUseCursor.includes(accessibilityRole)) return staticStyles.pointer;
|
|
@@ -44,15 +45,19 @@ export const getCursorStyle = ({
|
|
|
44
45
|
* @returns {object}
|
|
45
46
|
*/
|
|
46
47
|
|
|
47
|
-
export const resolvePressableState = ({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
export const resolvePressableState = function () {
|
|
49
|
+
let {
|
|
50
|
+
pressed = false,
|
|
51
|
+
focused = false,
|
|
52
|
+
hovered = false
|
|
53
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
54
|
+
let additionalState = arguments.length > 1 ? arguments[1] : undefined;
|
|
55
|
+
return { ...additionalState,
|
|
56
|
+
focus: focused,
|
|
57
|
+
hover: hovered,
|
|
58
|
+
pressed
|
|
59
|
+
};
|
|
60
|
+
};
|
|
56
61
|
/**
|
|
57
62
|
* Takes a UDS `tokens` prop and, if it is a function, resolves it based on a state
|
|
58
63
|
* object passed from the React Native `Pressable` component and optional extra properties.
|
|
@@ -85,13 +90,22 @@ const staticStyles = StyleSheet.create(Platform.select({
|
|
|
85
90
|
* to pass in press handlers that are then called with state or values that is otherwise internal.
|
|
86
91
|
*/
|
|
87
92
|
|
|
88
|
-
export const getPressHandlersWithArgs = (
|
|
93
|
+
export const getPressHandlersWithArgs = function () {
|
|
94
|
+
let pressableProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
95
|
+
let args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
89
96
|
// Allow handlers to be passed down for blur, hover, focus, pressIn, etc
|
|
90
|
-
const pressHandlers = Object.fromEntries(Object.entries(pressProps.selectHandlers(pressableProps)).map(
|
|
91
|
-
[key]
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
const pressHandlers = Object.fromEntries(Object.entries(pressProps.selectHandlers(pressableProps)).map(_ref2 => {
|
|
98
|
+
let [key, handler] = _ref2;
|
|
99
|
+
return {
|
|
100
|
+
[key]: function () {
|
|
101
|
+
for (var _len = arguments.length, defaultArgs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
102
|
+
defaultArgs[_key] = arguments[_key];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Pass each handler data on this button and current selection
|
|
106
|
+
handler(...args, ...defaultArgs);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}));
|
|
96
110
|
return pressHandlers;
|
|
97
111
|
};
|
|
@@ -18,7 +18,8 @@ export default {
|
|
|
18
18
|
* web-oriented tooling that injects web-oriented event handlers directly. For example, for
|
|
19
19
|
* to support use with NextJS's 'next/link' component, which injects `onClick` prop into its child.
|
|
20
20
|
*/
|
|
21
|
-
toPressProps: props => Object.fromEntries(Object.entries(props).map(
|
|
21
|
+
toPressProps: props => Object.fromEntries(Object.entries(props).map(_ref => {
|
|
22
|
+
let [originalName, value] = _ref;
|
|
22
23
|
const translatedName = clickHandlerMapping[originalName];
|
|
23
24
|
return translatedName ? [translatedName, value] : [originalName, value];
|
|
24
25
|
}))
|
|
@@ -26,8 +26,8 @@ export default function componentPropType(passedName) {
|
|
|
26
26
|
const nameInProp = ((_props$propName$type = props[propName].type) === null || _props$propName$type === void 0 ? void 0 : _props$propName$type.displayName) || ((_props$propName$type2 = props[propName].type) === null || _props$propName$type2 === void 0 ? void 0 : _props$propName$type2.name);
|
|
27
27
|
|
|
28
28
|
if (!nameInProp || !passedNames.includes(nameInProp)) {
|
|
29
|
-
const propDescription = nameInProp ?
|
|
30
|
-
return new Error(
|
|
29
|
+
const propDescription = nameInProp ? "Component ".concat(nameInProp) : typeof props[propName];
|
|
30
|
+
return new Error("".concat(componentName, ": ").concat(propDescription, " was passed to `").concat(propName, "` prop; should be ").concat(passedNames.join(' or ')));
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
return undefined;
|
|
@@ -35,7 +35,7 @@ export default function componentPropType(passedName) {
|
|
|
35
35
|
|
|
36
36
|
const checkRequired = (props, propName, componentName) => {
|
|
37
37
|
if (props[propName] === undefined) {
|
|
38
|
-
return new Error(
|
|
38
|
+
return new Error("The prop `".concat(propName, "` is marked as required in `").concat(componentName, "`, but its value is ").concat(props[propName], "."));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
return undefined;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export default function getPropSelector(propTypes, regexp) {
|
|
2
2
|
const keys = Object.keys(propTypes);
|
|
3
|
-
return props => Object.entries(props).reduce((items,
|
|
4
|
-
[key]
|
|
5
|
-
|
|
3
|
+
return props => Object.entries(props).reduce((items, _ref) => {
|
|
4
|
+
let [key, value] = _ref;
|
|
5
|
+
return keys.includes(key) || regexp && regexp.test(key) ? { ...items,
|
|
6
|
+
[key]: value
|
|
7
|
+
} : items;
|
|
8
|
+
}, {});
|
|
6
9
|
}
|
|
@@ -11,13 +11,16 @@ export const focusHandlerProps = {
|
|
|
11
11
|
*/
|
|
12
12
|
onFocus: PropTypes.func
|
|
13
13
|
},
|
|
14
|
-
select:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
select: _ref => {
|
|
15
|
+
let {
|
|
16
|
+
onBlur,
|
|
17
|
+
onFocus
|
|
18
|
+
} = _ref;
|
|
19
|
+
return {
|
|
20
|
+
onBlur,
|
|
21
|
+
onFocus
|
|
22
|
+
};
|
|
23
|
+
}
|
|
21
24
|
};
|
|
22
25
|
export const textInputHandlerProps = {
|
|
23
26
|
types: {
|
|
@@ -41,17 +44,20 @@ export const textInputHandlerProps = {
|
|
|
41
44
|
*/
|
|
42
45
|
onSubmitEditing: PropTypes.func
|
|
43
46
|
},
|
|
44
|
-
select:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
select: _ref2 => {
|
|
48
|
+
let {
|
|
49
|
+
onChange,
|
|
50
|
+
onChangeText,
|
|
51
|
+
onSubmit,
|
|
52
|
+
onSubmitEditing
|
|
53
|
+
} = _ref2;
|
|
54
|
+
return {
|
|
55
|
+
onChange,
|
|
56
|
+
onChangeText,
|
|
57
|
+
onSubmit,
|
|
58
|
+
onSubmitEditing
|
|
59
|
+
};
|
|
60
|
+
}
|
|
55
61
|
};
|
|
56
62
|
export default {
|
|
57
63
|
focusHandlerProps,
|
|
@@ -14,17 +14,20 @@ export default {
|
|
|
14
14
|
* Takes a props object, bundles any hrefAttrs props present into one object
|
|
15
15
|
* and returns that keyed as `hrefAttrs` and non-hrefAttrs props keyed as `rest`
|
|
16
16
|
*/
|
|
17
|
-
bundle:
|
|
18
|
-
|
|
19
|
-
rel,
|
|
20
|
-
target,
|
|
21
|
-
...rest
|
|
22
|
-
}) => ({
|
|
23
|
-
hrefAttrs: {
|
|
17
|
+
bundle: _ref => {
|
|
18
|
+
let {
|
|
24
19
|
download,
|
|
25
20
|
rel,
|
|
26
|
-
target
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
target,
|
|
22
|
+
...rest
|
|
23
|
+
} = _ref;
|
|
24
|
+
return {
|
|
25
|
+
hrefAttrs: {
|
|
26
|
+
download,
|
|
27
|
+
rel,
|
|
28
|
+
target
|
|
29
|
+
},
|
|
30
|
+
rest
|
|
31
|
+
};
|
|
32
|
+
}
|
|
30
33
|
};
|
|
@@ -37,16 +37,8 @@ export default {
|
|
|
37
37
|
*/
|
|
38
38
|
validation: PropTypes.oneOf(['error', 'success'])
|
|
39
39
|
},
|
|
40
|
-
select:
|
|
41
|
-
|
|
42
|
-
label,
|
|
43
|
-
hint,
|
|
44
|
-
hintPosition,
|
|
45
|
-
feedback,
|
|
46
|
-
tooltip,
|
|
47
|
-
validation
|
|
48
|
-
}) => ({
|
|
49
|
-
supportsProps: {
|
|
40
|
+
select: _ref => {
|
|
41
|
+
let {
|
|
50
42
|
copy,
|
|
51
43
|
label,
|
|
52
44
|
hint,
|
|
@@ -54,6 +46,17 @@ export default {
|
|
|
54
46
|
feedback,
|
|
55
47
|
tooltip,
|
|
56
48
|
validation
|
|
57
|
-
}
|
|
58
|
-
|
|
49
|
+
} = _ref;
|
|
50
|
+
return {
|
|
51
|
+
supportsProps: {
|
|
52
|
+
copy,
|
|
53
|
+
label,
|
|
54
|
+
hint,
|
|
55
|
+
hintPosition,
|
|
56
|
+
feedback,
|
|
57
|
+
tooltip,
|
|
58
|
+
validation
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
59
62
|
};
|
|
@@ -28,14 +28,15 @@ export default {
|
|
|
28
28
|
* @returns {(() => void)|undefined} Returns a press handler, or undefined on web if no press
|
|
29
29
|
* handler is provided (expects calling component to render as `<a href={href}>` on web).
|
|
30
30
|
*/
|
|
31
|
-
handleHref:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
handleHref: _ref => {
|
|
32
|
+
let {
|
|
33
|
+
onPress,
|
|
34
|
+
href
|
|
35
|
+
} = _ref;
|
|
35
36
|
return Platform.select({
|
|
36
37
|
web: onPress,
|
|
37
|
-
default: (
|
|
38
|
-
if (onPress) onPress(...
|
|
38
|
+
default: function () {
|
|
39
|
+
if (onPress) onPress(...arguments);
|
|
39
40
|
if (href) Linking.openURL(href);
|
|
40
41
|
}
|
|
41
42
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export default function selectSystemProps(systemPropHelpers) {
|
|
4
4
|
const selectProps = props => systemPropHelpers.reduce((acc, propHelper) => {
|
|
5
5
|
if (typeof (propHelper === null || propHelper === void 0 ? void 0 : propHelper.select) !== 'function') {
|
|
6
|
-
throw new Error(
|
|
6
|
+
throw new Error("An invalid system prop helper has been passed to 'selectSystemProps': prop selector ('.select') is missing in ".concat(propHelper));
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
return { ...acc,
|
|
@@ -13,7 +13,7 @@ export default function selectSystemProps(systemPropHelpers) {
|
|
|
13
13
|
|
|
14
14
|
const selectedPropTypes = systemPropHelpers.reduce((acc, propHelper) => {
|
|
15
15
|
if (!(propHelper !== null && propHelper !== void 0 && propHelper.types)) {
|
|
16
|
-
throw new Error(
|
|
16
|
+
throw new Error("An invalid system prop helper has been passed to 'selectSystemProps': types selector ('.types') is missing in ".concat(propHelper));
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
return { ...acc,
|
|
@@ -9,7 +9,7 @@ export const getTokenNames = componentName => {
|
|
|
9
9
|
const componentTokenSchema = tokenKeys[componentName];
|
|
10
10
|
|
|
11
11
|
if (!componentTokenSchema) {
|
|
12
|
-
throw new Error(
|
|
12
|
+
throw new Error("No \"".concat(componentName, "\" tokenKeys in @telus-uds/system-theme-tokens"));
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
return Object.keys(componentTokenSchema);
|
|
@@ -47,7 +47,7 @@ export const getTokenNames = componentName => {
|
|
|
47
47
|
export const selectTokens = (specifier, tokens, prefix) => {
|
|
48
48
|
const tokenNames = typeof specifier === 'string' ? getTokenNames(specifier) : specifier;
|
|
49
49
|
const filteredTokens = tokenNames.reduce((validTokens, key) => {
|
|
50
|
-
const prefixedKey = prefix ?
|
|
50
|
+
const prefixedKey = prefix ? "".concat(prefix).concat(key[0].toUpperCase()).concat(key.slice(1)) : key;
|
|
51
51
|
const token = tokens[prefixedKey];
|
|
52
52
|
return token !== undefined ? { ...validTokens,
|
|
53
53
|
[key]: token
|
|
@@ -84,16 +84,22 @@ export const selectTokens = (specifier, tokens, prefix) => {
|
|
|
84
84
|
* }
|
|
85
85
|
*/
|
|
86
86
|
|
|
87
|
-
export const getTokensPropType =
|
|
88
|
-
|
|
89
|
-
[
|
|
90
|
-
}
|
|
87
|
+
export const getTokensPropType = function () {
|
|
88
|
+
for (var _len = arguments.length, componentsNames = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
89
|
+
componentsNames[_key] = arguments[_key];
|
|
90
|
+
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
return (props, propName, componentName) => {
|
|
93
93
|
PropTypes.checkPropTypes({
|
|
94
|
-
[propName]: PropTypes.
|
|
94
|
+
[propName]: PropTypes.oneOfType([PropTypes.object, PropTypes.func])
|
|
95
95
|
}, props, propName, componentName);
|
|
96
|
-
|
|
96
|
+
|
|
97
|
+
if (typeof props[propName] !== 'function') {
|
|
98
|
+
PropTypes.checkPropTypes({
|
|
99
|
+
[propName]: PropTypes.exact(Object.fromEntries(componentsNames.flatMap(component => getTokenNames(component).map(key => [key, tokenValueType]))))
|
|
100
|
+
}, props, propName, componentName);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
97
103
|
};
|
|
98
104
|
/**
|
|
99
105
|
* Get a proptypes validator for a set of tokens that is not based on a component in the theme schema.
|
|
@@ -110,11 +116,18 @@ export const getTokensPropType = (...componentsNames) => (props, propName, compo
|
|
|
110
116
|
* @returns
|
|
111
117
|
*/
|
|
112
118
|
|
|
113
|
-
export const getTokensSetPropType = (componentTokenKeys
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
119
|
+
export const getTokensSetPropType = function (componentTokenKeys) {
|
|
120
|
+
let {
|
|
121
|
+
partial = false,
|
|
122
|
+
allowFunction = false
|
|
123
|
+
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
117
124
|
const tokensObjectValidator = PropTypes.exact(Object.fromEntries(componentTokenKeys.map(key => [key, partial ? tokenValueType : // Some theme tokens can validly resolve to `null`, but .isRequired treats null as undefined
|
|
118
|
-
(props, propName
|
|
125
|
+
function (props, propName) {
|
|
126
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
127
|
+
args[_key2 - 2] = arguments[_key2];
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return props[propName] !== null && tokenValueType.isRequired(props, propName, ...args);
|
|
131
|
+
}])));
|
|
119
132
|
return allowFunction ? PropTypes.oneOfType([tokensObjectValidator, PropTypes.func]) : tokensObjectValidator;
|
|
120
133
|
};
|
package/lib-module/utils/ssr.js
CHANGED
|
@@ -12,7 +12,8 @@ import AppRegistry from "react-native-web/dist/exports/AppRegistry";
|
|
|
12
12
|
* @returns {ReactElement[]}
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
export const getReactNativeWebSSRStyles = (AppRoot
|
|
15
|
+
export const getReactNativeWebSSRStyles = function (AppRoot) {
|
|
16
|
+
let appName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'app';
|
|
16
17
|
AppRegistry.registerComponent(appName, () => AppRoot);
|
|
17
18
|
const {
|
|
18
19
|
getStyleElement
|
|
@@ -29,7 +30,9 @@ export const getReactNativeWebSSRStyles = (AppRoot, appName = 'app') => {
|
|
|
29
30
|
* @returns {ReactElement[]}
|
|
30
31
|
*/
|
|
31
32
|
|
|
32
|
-
export const getSSRStyles = (AppRoot
|
|
33
|
+
export const getSSRStyles = function (AppRoot) {
|
|
34
|
+
let appName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'app';
|
|
35
|
+
let existingStyles = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
33
36
|
return [...existingStyles, ...getReactNativeWebSSRStyles(AppRoot, appName) // if any other CSS-in-JS is added e.g. styled-components generate and add its styles here
|
|
34
37
|
];
|
|
35
38
|
};
|
|
@@ -27,10 +27,12 @@ export const DEFAULT_COPY = 'en';
|
|
|
27
27
|
* @return {function(string): string}
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
-
function useCopy({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
function useCopy(_ref) {
|
|
31
|
+
let {
|
|
32
|
+
dictionary,
|
|
33
|
+
copy = DEFAULT_COPY
|
|
34
|
+
} = _ref;
|
|
35
|
+
|
|
34
36
|
if (typeof copy === 'string') {
|
|
35
37
|
return key => key ? dictionary[copy][key] : dictionary[copy];
|
|
36
38
|
} // support overriding the entire copy dictionary with an object for a single language
|
|
@@ -22,7 +22,8 @@ const doAction = (action, event) => {
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
const useHash = (action
|
|
25
|
+
const useHash = function (action) {
|
|
26
|
+
let isReady = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
26
27
|
const [isDone, setIsDone] = useState(false); // Do the action just once when ready after component mount, from hash on page load
|
|
27
28
|
|
|
28
29
|
const isToDo = isReady && !isDone;
|
|
@@ -101,6 +101,8 @@ const resolveSpacingOptions = space => {
|
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
const useSpacingScale = spaceValue => {
|
|
104
|
+
var _spaceValue$space;
|
|
105
|
+
|
|
104
106
|
// In future, may need to consider window height as well as width, particularly for native apps,
|
|
105
107
|
// e.g. to ensure designs don't look lost on large, tall, not-so-wide portrait screens.
|
|
106
108
|
const viewport = useViewport();
|
|
@@ -110,7 +112,7 @@ const useSpacingScale = spaceValue => {
|
|
|
110
112
|
overridden,
|
|
111
113
|
subtract = 0
|
|
112
114
|
} = resolveSpacingOptions(spaceValue);
|
|
113
|
-
const space = !overridden && ((spaceValue === null || spaceValue === void 0 ? void 0 : spaceValue.space)
|
|
115
|
+
const space = !overridden && ((_spaceValue$space = spaceValue === null || spaceValue === void 0 ? void 0 : spaceValue.space) !== null && _spaceValue$space !== void 0 ? _spaceValue$space : resolveResponsiveProp(spaceValue, viewport, 0));
|
|
114
116
|
const {
|
|
115
117
|
size
|
|
116
118
|
} = useThemeTokens('spacingScale', tokens, variant, {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
let id = 0;
|
|
3
3
|
|
|
4
|
-
function useUniqueId(
|
|
4
|
+
function useUniqueId() {
|
|
5
|
+
let prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
5
6
|
const [uniqueId] = useState(() => {
|
|
6
7
|
id += 1;
|
|
7
|
-
return
|
|
8
|
+
return "".concat(prefix, "-").concat(id);
|
|
8
9
|
});
|
|
9
10
|
return uniqueId;
|
|
10
11
|
}
|
|
@@ -35,11 +35,12 @@ const hasOwnProperty = (object, prop) => Object.prototype.hasOwnProperty.call(ob
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
const withLinkRouter = Component => {
|
|
38
|
-
const wrappedComponent = /*#__PURE__*/forwardRef(({
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
const wrappedComponent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
39
|
+
let {
|
|
40
|
+
LinkRouter,
|
|
41
|
+
linkRouterProps,
|
|
42
|
+
...props
|
|
43
|
+
} = _ref;
|
|
43
44
|
if (!LinkRouter) return /*#__PURE__*/_jsx(Component, { ...props,
|
|
44
45
|
ref: ref
|
|
45
46
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telus-uds/components-base",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.4",
|
|
4
4
|
"description": "Base components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"base"
|
|
@@ -22,16 +22,17 @@
|
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"test": "jest",
|
|
25
|
-
"lint": "
|
|
26
|
-
"lint:fix": "
|
|
25
|
+
"lint": "npm run --prefix ../.. lint:path -- --color packages/components-base",
|
|
26
|
+
"lint:fix": "npm run --prefix ../.. lint:path -- --fix packages/components-base",
|
|
27
27
|
"format": "prettier --write .",
|
|
28
|
-
"build": "
|
|
28
|
+
"build": "npm run build:code && npm run build:docs",
|
|
29
29
|
"build:main": "babel src -d lib",
|
|
30
30
|
"build:module": "babel src -d lib-module --env-name module",
|
|
31
|
-
"build:code": "
|
|
31
|
+
"build:code": "npm run build:main && npm run build:module",
|
|
32
32
|
"build:docs": "babel-node --plugins=@nearform/babel-plugin-react-docgen generate-component-docs.js",
|
|
33
33
|
"storybook": "start-storybook",
|
|
34
|
-
"
|
|
34
|
+
"build-storybook": "build-storybook",
|
|
35
|
+
"dev": "npm run build:code --watch"
|
|
35
36
|
},
|
|
36
37
|
"bugs": {
|
|
37
38
|
"url": "https://github.com/telus/universal-design-system/issues"
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
],
|
|
45
46
|
"peerDependencies": {
|
|
46
47
|
"react": "^17.0.2",
|
|
47
|
-
"react-dom": "
|
|
48
|
+
"react-dom": "^17.0.2",
|
|
48
49
|
"react-native": "*",
|
|
49
50
|
"react-native-web": "^0.17.0"
|
|
50
51
|
},
|
|
@@ -55,16 +56,17 @@
|
|
|
55
56
|
"@storybook/react": "^6.5.6",
|
|
56
57
|
"@storybook/builder-webpack5": "^6.5.6",
|
|
57
58
|
"@storybook/manager-webpack5": "^6.5.6",
|
|
58
|
-
"@telus-uds/browserslist-config": "^1.0.
|
|
59
|
+
"@telus-uds/browserslist-config": "^1.0.4",
|
|
59
60
|
"@testing-library/jest-native": "^4.0.1",
|
|
60
61
|
"@testing-library/react-hooks": "^7.0.1",
|
|
61
62
|
"@testing-library/react-native": "^7.2.0",
|
|
62
|
-
"react-test-renderer": "^16.3.2"
|
|
63
|
+
"react-test-renderer": "^16.3.2",
|
|
64
|
+
"webpack": "5.x"
|
|
63
65
|
},
|
|
64
66
|
"dependencies": {
|
|
65
67
|
"airbnb-prop-types": "^2.16.0",
|
|
66
|
-
"@telus-uds/system-constants": "^1.0.
|
|
67
|
-
"@telus-uds/system-theme-tokens": "^2.0.
|
|
68
|
+
"@telus-uds/system-constants": "^1.0.4",
|
|
69
|
+
"@telus-uds/system-theme-tokens": "^2.0.2",
|
|
68
70
|
"lodash.debounce": "^4.0.8",
|
|
69
71
|
"lodash.merge": "^4.6.2",
|
|
70
72
|
"prop-types": "^15.7.2",
|