@telus-uds/components-base 0.0.2-prerelease.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +9 -0
- package/.ultra.cache.json +1 -1
- package/CHANGELOG.md +32 -0
- package/README.md +4 -2
- package/__fixtures__/test-utils.js +25 -0
- package/__fixtures__/testTheme.js +4 -2
- package/__tests__/Button/ButtonGroup.test.jsx +4 -5
- package/__tests__/Checkbox/Checkbox.test.jsx +2 -2
- package/__tests__/Checkbox/CheckboxGroup.test.jsx +4 -5
- package/__tests__/ExpandCollapse/ExpandCollapse.test.jsx +2 -2
- package/__tests__/HorizontalScroll/HorizontalScroll.test.jsx +164 -0
- package/__tests__/Link/LinkBase.test.jsx +0 -14
- package/__tests__/Radio/Radio.test.jsx +2 -2
- package/__tests__/Radio/RadioGroup.test.jsx +4 -5
- package/__tests__/RadioCard/RadioCard.test.jsx +2 -2
- package/__tests__/RadioCard/RadioCardGroup.test.jsx +4 -5
- package/__tests__/Search/Search.test.jsx +9 -8
- package/__tests__/Select/Select.test.jsx +3 -2
- package/__tests__/Tabs/Tabs.test.jsx +1 -161
- package/__tests__/Tags/Tags.test.jsx +4 -5
- package/__tests__/TextInput/TextArea.test.jsx +3 -2
- package/__tests__/TextInput/TextInputBase.test.jsx +10 -5
- package/__tests__/ThemeProvider/ThemeProvider.test.jsx +77 -0
- package/__tests__/ThemeProvider/useThemeTokens.test.jsx +9 -5
- package/__tests__/ThemeProvider/utils/theme-tokens.test.js +41 -0
- package/__tests__/ToggleSwitch/ToggleSwitch.test.jsx +3 -2
- package/__tests__/utils/children.test.jsx +128 -0
- package/__tests__/utils/input.test.js +1 -1
- package/__tests__/utils/semantics.test.jsx +43 -0
- package/lib/A11yText/index.js +10 -5
- package/lib/ActivityIndicator/Spinner.js +16 -13
- package/lib/ActivityIndicator/Spinner.native.js +12 -8
- package/lib/Box/Box.js +102 -8
- package/lib/Button/Button.js +9 -8
- package/lib/Button/ButtonBase.js +14 -7
- package/lib/Button/ButtonGroup.js +25 -10
- package/lib/Button/ButtonLink.js +10 -7
- package/lib/Card/Card.js +2 -0
- package/lib/Card/CardBase.js +12 -5
- package/lib/Card/PressableCardBase.js +12 -8
- package/lib/Checkbox/Checkbox.js +25 -14
- package/lib/Checkbox/CheckboxGroup.js +22 -12
- package/lib/Divider/Divider.js +12 -7
- package/lib/ExpandCollapse/Accordion.js +10 -4
- package/lib/ExpandCollapse/Control.js +12 -6
- package/lib/ExpandCollapse/ExpandCollapse.js +10 -5
- package/lib/ExpandCollapse/Panel.js +8 -7
- package/lib/Feedback/Feedback.js +10 -5
- package/lib/Fieldset/Fieldset.js +10 -5
- package/lib/Fieldset/FieldsetContainer.js +10 -5
- package/lib/Fieldset/FieldsetContainer.native.js +10 -5
- package/lib/Fieldset/Legend.js +10 -5
- package/lib/Fieldset/Legend.native.js +10 -5
- package/lib/FlexGrid/Col/Col.js +8 -5
- package/lib/FlexGrid/FlexGrid.js +31 -6
- package/lib/FlexGrid/Row/Row.js +12 -5
- package/lib/{Tabs → HorizontalScroll}/HorizontalScroll.js +5 -4
- package/lib/{Tabs/TabsScrollButton.js → HorizontalScroll/HorizontalScrollButton.js} +14 -8
- package/lib/{Tabs → HorizontalScroll}/ScrollViewEnd.js +0 -0
- package/lib/{Tabs → HorizontalScroll}/ScrollViewEnd.native.js +0 -0
- package/lib/{Tabs → HorizontalScroll}/dictionary.js +0 -0
- package/lib/HorizontalScroll/index.js +35 -0
- package/lib/{Tabs → HorizontalScroll}/itemPositions.js +0 -0
- package/lib/Icon/Icon.js +16 -9
- package/lib/Icon/IconText.js +8 -7
- package/lib/IconButton/IconButton.js +10 -5
- package/lib/InputLabel/InputLabel.js +33 -5
- package/lib/InputLabel/LabelContent.js +22 -12
- package/lib/InputLabel/LabelContent.native.js +23 -5
- package/lib/InputSupports/InputSupports.js +10 -5
- package/lib/Link/ChevronLink.js +12 -5
- package/lib/Link/InlinePressable.js +10 -4
- package/lib/Link/InlinePressable.native.js +5 -4
- package/lib/Link/Link.js +12 -5
- package/lib/Link/LinkBase.js +12 -5
- package/lib/Link/TextButton.js +10 -5
- package/lib/List/List.js +5 -4
- package/lib/List/ListItem.js +16 -8
- package/lib/Modal/Modal.js +10 -5
- package/lib/Notification/Notification.js +21 -5
- package/lib/Pagination/PageButton.js +21 -10
- package/lib/Pagination/Pagination.js +12 -7
- package/lib/Pagination/SideButton.js +12 -7
- package/lib/Pagination/usePagination.js +2 -2
- package/lib/Progress/Progress.js +10 -5
- package/lib/Progress/ProgressBar.js +21 -10
- package/lib/Progress/ProgressBarBackground.js +12 -8
- package/lib/Radio/Radio.js +14 -13
- package/lib/Radio/RadioButton.js +20 -9
- package/lib/Radio/RadioGroup.js +24 -13
- package/lib/RadioCard/RadioCard.js +14 -10
- package/lib/RadioCard/RadioCardGroup.js +13 -12
- package/lib/Search/Search.js +29 -18
- package/lib/Select/Picker.js +11 -6
- package/lib/Select/Picker.native.js +21 -6
- package/lib/Select/Select.js +46 -4
- package/lib/SideNav/Item.js +10 -5
- package/lib/SideNav/ItemsGroup.js +10 -5
- package/lib/SideNav/SideNav.js +11 -7
- package/lib/Skeleton/Skeleton.js +15 -15
- package/lib/Skeleton/skeletonWebAnimation.js +1 -1
- package/lib/Spacer/Spacer.js +19 -7
- package/lib/StackView/StackView.js +25 -7
- package/lib/StackView/StackWrap.js +16 -9
- package/lib/StackView/StackWrapBox.js +33 -8
- package/lib/StackView/StackWrapGap.js +16 -7
- package/lib/StackView/common.js +4 -2
- package/lib/StackView/getStackedContent.js +2 -2
- package/lib/StepTracker/StepTracker.js +10 -5
- package/lib/Tabs/Tabs.js +26 -19
- package/lib/Tabs/TabsItem.js +16 -12
- package/lib/Tags/Tags.js +27 -11
- package/lib/TextInput/TextArea.js +7 -5
- package/lib/TextInput/TextInput.js +12 -6
- package/lib/TextInput/TextInputBase.js +12 -8
- package/lib/ThemeProvider/ThemeProvider.js +14 -10
- package/lib/ThemeProvider/useSetTheme.js +6 -1
- package/lib/ThemeProvider/utils/styles.js +2 -2
- package/lib/ThemeProvider/utils/theme-tokens.js +39 -8
- package/lib/ToggleSwitch/ToggleSwitch.js +11 -6
- package/lib/Tooltip/Backdrop.js +10 -2
- package/lib/Tooltip/Tooltip.js +5 -4
- package/lib/Typography/Typography.js +40 -24
- package/lib/index.js +21 -0
- package/lib/utils/a11y/index.js +13 -0
- package/lib/utils/a11y/semantics.js +173 -0
- package/lib/utils/animation/useVerticalExpandAnimation.js +1 -1
- package/lib/utils/children.js +55 -8
- package/lib/utils/input.js +27 -17
- package/lib/utils/propTypes.js +82 -29
- package/lib/utils/useCopy.js +1 -1
- package/lib/utils/useHash.js +8 -4
- package/lib/utils/useSpacingScale.js +1 -3
- package/lib/utils/useUniqueId.js +1 -1
- package/package.json +9 -5
- package/release-context.json +4 -4
- package/src/A11yText/index.jsx +6 -4
- package/src/ActivityIndicator/Spinner.jsx +5 -3
- package/src/ActivityIndicator/Spinner.native.jsx +5 -3
- package/src/Box/Box.jsx +124 -39
- package/src/Button/Button.jsx +7 -4
- package/src/Button/ButtonBase.jsx +86 -77
- package/src/Button/ButtonGroup.jsx +81 -69
- package/src/Button/ButtonLink.jsx +18 -13
- package/src/Card/Card.jsx +2 -2
- package/src/Card/CardBase.jsx +5 -4
- package/src/Card/PressableCardBase.jsx +71 -64
- package/src/Checkbox/Checkbox.jsx +118 -108
- package/src/Checkbox/CheckboxGroup.jsx +72 -62
- package/src/Divider/Divider.jsx +7 -4
- package/src/ExpandCollapse/Accordion.jsx +3 -2
- package/src/ExpandCollapse/Control.jsx +40 -43
- package/src/ExpandCollapse/ExpandCollapse.jsx +26 -23
- package/src/ExpandCollapse/Panel.jsx +69 -63
- package/src/Feedback/Feedback.jsx +36 -33
- package/src/Fieldset/Fieldset.jsx +63 -56
- package/src/Fieldset/FieldsetContainer.jsx +14 -5
- package/src/Fieldset/FieldsetContainer.native.jsx +7 -4
- package/src/Fieldset/Legend.jsx +7 -2
- package/src/Fieldset/Legend.native.jsx +7 -2
- package/src/FlexGrid/Col/Col.jsx +139 -132
- package/src/FlexGrid/FlexGrid.jsx +79 -51
- package/src/FlexGrid/Row/Row.jsx +55 -48
- package/src/HorizontalScroll/HorizontalScroll.jsx +168 -0
- package/src/HorizontalScroll/HorizontalScrollButton.jsx +105 -0
- package/src/{Tabs → HorizontalScroll}/ScrollViewEnd.jsx +0 -0
- package/src/{Tabs → HorizontalScroll}/ScrollViewEnd.native.jsx +0 -0
- package/src/{Tabs → HorizontalScroll}/dictionary.js +0 -0
- package/src/HorizontalScroll/index.js +17 -0
- package/src/{Tabs → HorizontalScroll}/itemPositions.js +0 -0
- package/src/Icon/Icon.jsx +37 -35
- package/src/Icon/IconText.jsx +22 -17
- package/src/IconButton/IconButton.jsx +49 -42
- package/src/InputLabel/InputLabel.jsx +53 -38
- package/src/InputLabel/LabelContent.jsx +14 -6
- package/src/InputLabel/LabelContent.native.jsx +11 -2
- package/src/InputSupports/InputSupports.jsx +29 -34
- package/src/Link/ChevronLink.jsx +26 -16
- package/src/Link/InlinePressable.jsx +5 -3
- package/src/Link/InlinePressable.native.jsx +5 -3
- package/src/Link/Link.jsx +22 -16
- package/src/Link/LinkBase.jsx +67 -58
- package/src/Link/TextButton.jsx +30 -23
- package/src/List/List.jsx +5 -4
- package/src/List/ListItem.jsx +77 -82
- package/src/Modal/Modal.jsx +9 -4
- package/src/Notification/Notification.jsx +58 -43
- package/src/Pagination/PageButton.jsx +42 -35
- package/src/Pagination/Pagination.jsx +88 -92
- package/src/Pagination/SideButton.jsx +44 -41
- package/src/Progress/Progress.jsx +5 -4
- package/src/Progress/ProgressBar.jsx +42 -29
- package/src/Progress/ProgressBarBackground.jsx +5 -3
- package/src/Radio/Radio.jsx +85 -78
- package/src/Radio/RadioButton.jsx +54 -43
- package/src/Radio/RadioGroup.jsx +74 -63
- package/src/RadioCard/RadioCard.jsx +75 -68
- package/src/RadioCard/RadioCardGroup.jsx +82 -75
- package/src/Search/Search.jsx +127 -106
- package/src/Select/Picker.jsx +49 -42
- package/src/Select/Picker.native.jsx +56 -49
- package/src/Select/Select.jsx +115 -72
- package/src/SideNav/Item.jsx +53 -46
- package/src/SideNav/ItemsGroup.jsx +50 -43
- package/src/SideNav/SideNav.jsx +68 -60
- package/src/Skeleton/Skeleton.jsx +9 -13
- package/src/Spacer/Spacer.jsx +11 -4
- package/src/StackView/StackView.jsx +46 -23
- package/src/StackView/StackWrap.jsx +7 -6
- package/src/StackView/StackWrapBox.jsx +61 -28
- package/src/StackView/StackWrapGap.jsx +46 -24
- package/src/StackView/common.jsx +3 -2
- package/src/StepTracker/StepTracker.jsx +73 -62
- package/src/Tabs/Tabs.jsx +70 -62
- package/src/Tabs/TabsItem.jsx +111 -103
- package/src/Tags/Tags.jsx +114 -102
- package/src/TextInput/TextArea.jsx +5 -4
- package/src/TextInput/TextInput.jsx +5 -4
- package/src/TextInput/TextInputBase.jsx +84 -77
- package/src/ThemeProvider/ThemeProvider.jsx +11 -7
- package/src/ThemeProvider/useSetTheme.js +4 -0
- package/src/ThemeProvider/utils/theme-tokens.js +28 -0
- package/src/ToggleSwitch/ToggleSwitch.jsx +49 -50
- package/src/Tooltip/Tooltip.jsx +134 -130
- package/src/Typography/Typography.jsx +67 -44
- package/src/index.js +2 -0
- package/src/utils/a11y/index.js +1 -0
- package/src/utils/a11y/semantics.js +162 -0
- package/src/utils/children.jsx +60 -7
- package/src/utils/input.js +20 -17
- package/src/utils/propTypes.js +101 -39
- package/src/utils/useCopy.js +1 -1
- package/src/utils/useHash.js +8 -3
- package/stories/A11yText/A11yText.stories.jsx +2 -2
- package/stories/ActivityIndicator/ActivityIndicator.stories.jsx +1 -1
- package/stories/Box/Box.stories.jsx +1 -1
- package/stories/Button/Button.stories.jsx +2 -2
- package/stories/Button/ButtonGroup.stories.jsx +1 -1
- package/stories/Button/ButtonLink.stories.jsx +1 -1
- package/stories/Card/Card.stories.jsx +1 -1
- package/stories/Checkbox/Checkbox.stories.jsx +1 -1
- package/stories/Divider/Divider.stories.jsx +1 -1
- package/stories/ExpandCollapse/ExpandCollapse.stories.jsx +2 -2
- package/stories/Feedback/Feedback.stories.jsx +1 -1
- package/stories/FlexGrid/01 FlexGrid.stories.jsx +1 -1
- package/stories/FlexGrid/02 Row.stories.jsx +1 -1
- package/stories/FlexGrid/03 Col.stories.jsx +1 -1
- package/stories/Icon/Icon.stories.jsx +1 -1
- package/stories/IconButton/IconButton.stories.jsx +1 -1
- package/stories/InputLabel/InputLabel.stories.jsx +1 -1
- package/stories/Link/ChevronLink.stories.jsx +1 -1
- package/stories/Link/Link.stories.jsx +1 -1
- package/stories/Link/TextButton.stories.jsx +1 -1
- package/stories/List/List.stories.jsx +1 -1
- package/stories/Modal/Modal.stories.jsx +1 -1
- package/stories/Notification/Notification.stories.jsx +1 -1
- package/stories/Pagination/Pagination.stories.jsx +1 -1
- package/stories/Progress/Progress.stories.jsx +1 -1
- package/stories/Radio/Radio.stories.jsx +1 -1
- package/stories/RadioCard/RadioCard.stories.jsx +1 -1
- package/stories/Search/Search.stories.jsx +1 -1
- package/stories/Select/Select.stories.jsx +1 -1
- package/stories/SideNav/SideNav.stories.jsx +1 -1
- package/stories/SideNav/SideNavItem.stories.jsx +1 -1
- package/stories/SideNav/SideNavItemsGroup.stories.jsx +1 -1
- package/stories/Skeleton/Skeleton.stories.jsx +2 -2
- package/stories/Spacer/Spacer.stories.jsx +1 -1
- package/stories/StackView/StackView.stories.jsx +1 -1
- package/stories/StackView/StackWrap.stories.jsx +1 -1
- package/stories/StepTracker/StepTracker.stories.jsx +1 -1
- package/stories/Tabs/Tabs.stories.jsx +1 -1
- package/stories/Tags/Tags.stories.jsx +1 -1
- package/stories/TextInput/TextArea.stories.jsx +1 -1
- package/stories/TextInput/TextInput.stories.jsx +1 -1
- package/stories/ToggleSwitch/ToggleSwitch.stories.jsx +1 -1
- package/stories/Tooltip/Tooltip.stories.jsx +1 -1
- package/stories/TooltipButton/TooltipButton.stories.jsx +1 -1
- package/stories/Typography/Typography.stories.jsx +1 -1
- package/stories/platform-supports.jsx +1 -1
- package/stories/supports.jsx +2 -2
- package/src/Tabs/HorizontalScroll.jsx +0 -165
- package/src/Tabs/TabsScrollButton.jsx +0 -100
|
@@ -130,7 +130,7 @@ const selectIconContainerStyles = ({
|
|
|
130
130
|
paddingBottom
|
|
131
131
|
});
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
const TextInputBase = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
134
134
|
value,
|
|
135
135
|
height,
|
|
136
136
|
initialValue,
|
|
@@ -145,7 +145,7 @@ function TextInputBase({
|
|
|
145
145
|
tokens,
|
|
146
146
|
variant = {},
|
|
147
147
|
...remainingProps
|
|
148
|
-
}) {
|
|
148
|
+
}, ref) => {
|
|
149
149
|
const [isFocused, setIsFocused] = (0, _react.useState)(false);
|
|
150
150
|
|
|
151
151
|
const handleFocus = event => {
|
|
@@ -181,9 +181,12 @@ function TextInputBase({
|
|
|
181
181
|
readOnly
|
|
182
182
|
});
|
|
183
183
|
|
|
184
|
-
const handleChangeText =
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
const handleChangeText = event => {
|
|
185
|
+
var _event$nativeEvent, _event$target;
|
|
186
|
+
|
|
187
|
+
const text = ((_event$nativeEvent = event.nativeEvent) === null || _event$nativeEvent === void 0 ? void 0 : _event$nativeEvent.text) || ((_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.value);
|
|
188
|
+
setValue(text, event);
|
|
189
|
+
if (typeof onChangeText === 'function') onChangeText(text, event);
|
|
187
190
|
};
|
|
188
191
|
|
|
189
192
|
const states = {
|
|
@@ -201,7 +204,7 @@ function TextInputBase({
|
|
|
201
204
|
onBlur: handleBlur,
|
|
202
205
|
onMouseOver: handleMouseOver,
|
|
203
206
|
onMouseOut: handleMouseOut,
|
|
204
|
-
|
|
207
|
+
onChange: handleChangeText,
|
|
205
208
|
defaultValue: initialValue,
|
|
206
209
|
// currentValue is being updated even if the input is not controlled, passing it down to the
|
|
207
210
|
// Input could lead to changing its state from uncontrolled to controlled
|
|
@@ -213,6 +216,7 @@ function TextInputBase({
|
|
|
213
216
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
|
|
214
217
|
style: selectOuterBorderStyles(themeTokens),
|
|
215
218
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TextInput.default, {
|
|
219
|
+
ref: ref,
|
|
216
220
|
style: nativeInputStyle,
|
|
217
221
|
...inputProps
|
|
218
222
|
}), IconComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
@@ -223,8 +227,8 @@ function TextInputBase({
|
|
|
223
227
|
})
|
|
224
228
|
})]
|
|
225
229
|
});
|
|
226
|
-
}
|
|
227
|
-
|
|
230
|
+
});
|
|
231
|
+
TextInputBase.displayName = 'TextInputBase';
|
|
228
232
|
TextInputBase.propTypes = {
|
|
229
233
|
value: _propTypes.default.string,
|
|
230
234
|
height: _propTypes.default.number,
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.
|
|
6
|
+
exports.default = exports.ThemeSetterContext = exports.ThemeContext = exports.uninitialisedError = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
+
var _utils = require("./utils");
|
|
13
|
+
|
|
12
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -21,18 +23,18 @@ const uninitialisedError = new Error('Theme context used outside of ThemeProvide
|
|
|
21
23
|
exports.uninitialisedError = uninitialisedError;
|
|
22
24
|
const ThemeContext = /*#__PURE__*/(0, _react.createContext)(uninitialisedError);
|
|
23
25
|
exports.ThemeContext = ThemeContext;
|
|
24
|
-
const ThemeSetterContext = /*#__PURE__*/(0, _react.createContext)(uninitialisedError);
|
|
25
|
-
// https://github.com/telus/universal-design-system/issues/92
|
|
26
|
-
|
|
26
|
+
const ThemeSetterContext = /*#__PURE__*/(0, _react.createContext)(uninitialisedError);
|
|
27
27
|
exports.ThemeSetterContext = ThemeSetterContext;
|
|
28
|
-
const themeType = _propTypes.default.object;
|
|
29
|
-
exports.themeType = themeType;
|
|
30
28
|
|
|
31
29
|
const ThemeProvider = ({
|
|
32
30
|
children,
|
|
33
31
|
defaultTheme
|
|
34
32
|
}) => {
|
|
35
|
-
const [theme, setTheme] = (0, _react.useState)(defaultTheme);
|
|
33
|
+
const [theme, setTheme] = (0, _react.useState)(defaultTheme); // Validate the theme tokens version on every render.
|
|
34
|
+
// This will intentionally break the application when attempting to use an invalid theme.
|
|
35
|
+
// This will surface an incompatibility quickly rather than allowing the potential for strange bugs due to missing or incompatible tokens.
|
|
36
|
+
|
|
37
|
+
(0, _utils.validateThemeTokensVersion)(theme);
|
|
36
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ThemeSetterContext.Provider, {
|
|
37
39
|
value: setTheme,
|
|
38
40
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ThemeContext.Provider, {
|
|
@@ -43,10 +45,12 @@ const ThemeProvider = ({
|
|
|
43
45
|
};
|
|
44
46
|
|
|
45
47
|
ThemeProvider.propTypes = {
|
|
46
|
-
// TODO: implement a custom propType that validates schema version
|
|
47
|
-
// https://github.com/telus/universal-design-system/issues/92
|
|
48
48
|
children: _propTypes.default.node.isRequired,
|
|
49
|
-
defaultTheme:
|
|
49
|
+
defaultTheme: _propTypes.default.shape({
|
|
50
|
+
metadata: _propTypes.default.shape({
|
|
51
|
+
themeTokensVersion: _propTypes.default.string.isRequired
|
|
52
|
+
}).isRequired
|
|
53
|
+
}).isRequired
|
|
50
54
|
};
|
|
51
55
|
var _default = ThemeProvider;
|
|
52
56
|
exports.default = _default;
|
|
@@ -11,7 +11,12 @@ var _ThemeProvider = require("./ThemeProvider");
|
|
|
11
11
|
|
|
12
12
|
const useSetTheme = () => {
|
|
13
13
|
// Replace current theme with provided object
|
|
14
|
-
const setTheme = (0, _react.useContext)(_ThemeProvider.ThemeSetterContext); //
|
|
14
|
+
const setTheme = (0, _react.useContext)(_ThemeProvider.ThemeSetterContext); // Fail fast if dev uses useSetTheme outside of ThemeProvider
|
|
15
|
+
|
|
16
|
+
if (setTheme instanceof Error) {
|
|
17
|
+
throw setTheme;
|
|
18
|
+
} // Merge provided object into current theme
|
|
19
|
+
|
|
15
20
|
|
|
16
21
|
const editTheme = (0, _react.useCallback)(newTheme => setTheme((oldTheme = {}) => ({ ...oldTheme,
|
|
17
22
|
...newTheme
|
|
@@ -50,7 +50,7 @@ function applyTextStyles({
|
|
|
50
50
|
if (fontName) {
|
|
51
51
|
// Don't set undefined font families. May need some validation here that the font is available.
|
|
52
52
|
// Android doesn't recognise font weights natively so apply custom font weights via `fontFamily`.
|
|
53
|
-
styles.fontFamily =
|
|
53
|
+
styles.fontFamily = `${fontName}${fontWeight}${fontStyle}`;
|
|
54
54
|
} else if (fontWeight) {
|
|
55
55
|
// If using system default font, apply the font weight directly.
|
|
56
56
|
// Font weight support in Android is limited to 'bold' or anything else === 'normal'.
|
|
@@ -99,7 +99,7 @@ function applyWebShadow({
|
|
|
99
99
|
}) {
|
|
100
100
|
const insetString = inset ? 'inset ' : '';
|
|
101
101
|
const boxShadow = {
|
|
102
|
-
boxShadow:
|
|
102
|
+
boxShadow: `${insetString}${offsetX}px ${offsetY}px ${blur}px ${spread}px ${color}`
|
|
103
103
|
};
|
|
104
104
|
return boxShadow;
|
|
105
105
|
}
|
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.toArray = exports.getThemeTokens = exports.mergeAppearances = exports.validateThemeTokens = exports.resolveThemeTokens = exports.doesThemeRuleApply = exports.doesThemeConditionApply = exports.getComponentTheme = void 0;
|
|
6
|
+
exports.validateThemeTokensVersion = exports.toArray = exports.getThemeTokens = exports.mergeAppearances = exports.validateThemeTokens = exports.resolveThemeTokens = exports.doesThemeRuleApply = exports.doesThemeConditionApply = exports.getComponentTheme = void 0;
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
+
var _satisfies = _interopRequireDefault(require("semver/functions/satisfies"));
|
|
11
|
+
|
|
12
|
+
var _package = _interopRequireDefault(require("../../../package.json"));
|
|
13
|
+
|
|
10
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
15
|
|
|
12
16
|
/**
|
|
@@ -24,19 +28,19 @@ const getComponentTheme = (theme, componentName) => {
|
|
|
24
28
|
// Give clear and understandable error messages for common dev errors, for example,
|
|
25
29
|
// typo in component name, missing export or accessing old version of theme
|
|
26
30
|
if (!theme) {
|
|
27
|
-
throw new Error(
|
|
31
|
+
throw new Error(`Called useTheme's getStyle on "${componentName}" with no theme provided`);
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
const themeName = ((_theme$metadata = theme.metadata) === null || _theme$metadata === void 0 ? void 0 : _theme$metadata.name) || '';
|
|
31
35
|
|
|
32
36
|
if (!theme.components) {
|
|
33
|
-
throw new Error(
|
|
37
|
+
throw new Error(`Theme "${themeName}" has no components defined (looking for "${componentName}")`);
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
const componentTheme = theme.components[componentName];
|
|
37
41
|
|
|
38
42
|
if (!componentTheme) {
|
|
39
|
-
throw new Error(
|
|
43
|
+
throw new Error(`Theme "${themeName}" does not have styles for component "${componentName}"`);
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
return componentTheme;
|
|
@@ -45,10 +49,8 @@ const getComponentTheme = (theme, componentName) => {
|
|
|
45
49
|
exports.getComponentTheme = getComponentTheme;
|
|
46
50
|
|
|
47
51
|
const doesThemeConditionApply = ([key, value], appearances) => {
|
|
48
|
-
var _appearances$key;
|
|
49
|
-
|
|
50
52
|
// use null rather than undefined so we can serialise the value in themes
|
|
51
|
-
const appearanceValue =
|
|
53
|
+
const appearanceValue = appearances[key] ?? null;
|
|
52
54
|
return Array.isArray(value) ? value.includes(appearanceValue) : value === appearanceValue;
|
|
53
55
|
};
|
|
54
56
|
|
|
@@ -154,5 +156,34 @@ const getThemeTokens = ({
|
|
|
154
156
|
exports.getThemeTokens = getThemeTokens;
|
|
155
157
|
|
|
156
158
|
const toArray = strOrArr => Array.isArray(strOrArr) ? strOrArr : [strOrArr];
|
|
159
|
+
/**
|
|
160
|
+
* Throws an error if the theme was built with an incompatible version of @telus-uds/system-theme-tokens
|
|
161
|
+
*
|
|
162
|
+
* This is used internally by the ThemeProvider to force a fast failure when an incompatible version is detected.
|
|
163
|
+
*
|
|
164
|
+
* Version compatibility is calculated with semver.satisfies.
|
|
165
|
+
* Refer to https://github.com/npm/node-semver and https://semver.npmjs.com/ for details about how
|
|
166
|
+
* semver compatibility.
|
|
167
|
+
*
|
|
168
|
+
* @param {object} theme - UDS theme built for react-native
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
exports.toArray = toArray;
|
|
173
|
+
|
|
174
|
+
const validateThemeTokensVersion = theme => {
|
|
175
|
+
var _theme$metadata2;
|
|
176
|
+
|
|
177
|
+
const expectedThemeTokensVersion = _package.default.dependencies['@telus-uds/system-theme-tokens'];
|
|
178
|
+
const actualThemeTokensVersion = theme === null || theme === void 0 ? void 0 : (_theme$metadata2 = theme.metadata) === null || _theme$metadata2 === void 0 ? void 0 : _theme$metadata2.themeTokensVersion;
|
|
179
|
+
|
|
180
|
+
if (!(0, _satisfies.default)(actualThemeTokensVersion, expectedThemeTokensVersion)) {
|
|
181
|
+
throw new Error(`Invalid UDS token schema version detected.
|
|
182
|
+
|
|
183
|
+
The UDS base components ${_package.default.name} v${_package.default.version} are only compatible with UDS themes that are built with @telus-uds/system-theme-tokens version that is semver compatible with ${expectedThemeTokensVersion}. The current theme was built with @telus-uds/system-theme-tokens v${actualThemeTokensVersion}.
|
|
184
|
+
|
|
185
|
+
If you see this error than most likely you have attempted to install ${_package.default.name} and a UDS theme manually because you are building a multi-brand application. If you are building a single brand application, consider installing the brand specific design system package such as @telus-uds/ds-allium. For more information, see https://github.com/telus/universal-design-system/blob/main/packages/docs-uds/docs/multi-brand-usage.md`);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
157
188
|
|
|
158
|
-
exports.
|
|
189
|
+
exports.validateThemeTokensVersion = validateThemeTokensVersion;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -27,6 +27,10 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
27
27
|
|
|
28
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
29
|
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
+
|
|
30
34
|
const selectButtonTokens = tokens => (0, _propTypes2.selectTokens)('Button', { ...tokens,
|
|
31
35
|
// Width tokens are applied to our inner track. Disable Button width token so it wraps our track width.
|
|
32
36
|
width: null
|
|
@@ -76,7 +80,7 @@ const selectSwitchStyles = ({
|
|
|
76
80
|
})
|
|
77
81
|
});
|
|
78
82
|
|
|
79
|
-
const ToggleSwitch = ({
|
|
83
|
+
const ToggleSwitch = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
80
84
|
value,
|
|
81
85
|
initialValue,
|
|
82
86
|
onChange,
|
|
@@ -84,7 +88,7 @@ const ToggleSwitch = ({
|
|
|
84
88
|
tokens,
|
|
85
89
|
variant,
|
|
86
90
|
accessibilityRole = 'switch'
|
|
87
|
-
}) => {
|
|
91
|
+
}, ref) => {
|
|
88
92
|
const getTokens = (0, _ThemeProvider.useThemeTokensCallback)('ToggleSwitch', tokens, variant);
|
|
89
93
|
const {
|
|
90
94
|
currentValue,
|
|
@@ -95,11 +99,12 @@ const ToggleSwitch = ({
|
|
|
95
99
|
onChange
|
|
96
100
|
});
|
|
97
101
|
|
|
98
|
-
const handlePress =
|
|
102
|
+
const handlePress = event => setValue(!currentValue, event);
|
|
99
103
|
|
|
100
104
|
const getButtonTokens = buttonState => selectButtonTokens(getTokens(buttonState));
|
|
101
105
|
|
|
102
106
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonBase.default, {
|
|
107
|
+
ref: ref,
|
|
103
108
|
selected: currentValue,
|
|
104
109
|
inactive: inactive,
|
|
105
110
|
tokens: getButtonTokens,
|
|
@@ -134,8 +139,8 @@ const ToggleSwitch = ({
|
|
|
134
139
|
});
|
|
135
140
|
}
|
|
136
141
|
});
|
|
137
|
-
};
|
|
138
|
-
|
|
142
|
+
});
|
|
143
|
+
ToggleSwitch.displayName = 'ToggleSwitch';
|
|
139
144
|
ToggleSwitch.propTypes = { ..._propTypes2.a11yProps.propTypes,
|
|
140
145
|
..._propTypes2.pressProps.propTypes,
|
|
141
146
|
tokens: (0, _propTypes2.getTokensPropType)('ToggleSwitch'),
|
package/lib/Tooltip/Backdrop.js
CHANGED
|
@@ -19,7 +19,15 @@ function createPortalNode(nodeId) {
|
|
|
19
19
|
// this way the backdrop stays in place when scrolling the window - that's why we need to
|
|
20
20
|
// position it at the scroll position when rendering
|
|
21
21
|
|
|
22
|
-
node.style.cssText =
|
|
22
|
+
node.style.cssText = `
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: ${window.scrollY}px;
|
|
25
|
+
left: ${window.scrollX}px;
|
|
26
|
+
right: 0;
|
|
27
|
+
bottom: 0;
|
|
28
|
+
z-index: 9999;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
`;
|
|
23
31
|
document.body.appendChild(node);
|
|
24
32
|
return node;
|
|
25
33
|
}
|
|
@@ -39,7 +47,7 @@ function Backdrop({
|
|
|
39
47
|
}) {
|
|
40
48
|
const [portalNode, setPortalNode] = (0, _react.useState)();
|
|
41
49
|
(0, _react.useEffect)(() => {
|
|
42
|
-
const nodeId =
|
|
50
|
+
const nodeId = `tooltip-backdrop-${Date.now()}`;
|
|
43
51
|
const node = createPortalNode(nodeId);
|
|
44
52
|
setPortalNode(node);
|
|
45
53
|
return () => {
|
package/lib/Tooltip/Tooltip.js
CHANGED
|
@@ -161,14 +161,14 @@ const defaultControl = (pressableState, variant) => /*#__PURE__*/(0, _jsxRuntime
|
|
|
161
161
|
*/
|
|
162
162
|
|
|
163
163
|
|
|
164
|
-
const Tooltip = ({
|
|
164
|
+
const Tooltip = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
165
165
|
children,
|
|
166
166
|
content,
|
|
167
167
|
position = 'auto',
|
|
168
168
|
copy = 'en',
|
|
169
169
|
tokens,
|
|
170
170
|
variant
|
|
171
|
-
}) => {
|
|
171
|
+
}, ref) => {
|
|
172
172
|
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
173
173
|
const controlRef = (0, _react.useRef)();
|
|
174
174
|
const [controlLayout, setControlLayout] = (0, _react.useState)(null);
|
|
@@ -292,6 +292,7 @@ const Tooltip = ({
|
|
|
292
292
|
}), isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Backdrop.default, {
|
|
293
293
|
onPress: close,
|
|
294
294
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
|
|
295
|
+
ref: ref,
|
|
295
296
|
style: [staticStyles.tooltip, selectTooltipShadowStyles(themeTokens), // applied separately so that it doesn't cover the arrow
|
|
296
297
|
tooltipPosition && selectTooltipPositionStyles(tooltipPosition), (tooltipPosition === null || (tooltipPosition === null || tooltipPosition === void 0 ? void 0 : tooltipPosition.isNormalized)) && staticStyles.tooltipHidden // visually hide the tooltip until we have a final measurement
|
|
297
298
|
],
|
|
@@ -309,8 +310,8 @@ const Tooltip = ({
|
|
|
309
310
|
})
|
|
310
311
|
})]
|
|
311
312
|
});
|
|
312
|
-
};
|
|
313
|
-
|
|
313
|
+
});
|
|
314
|
+
Tooltip.displayName = 'Tooltip';
|
|
314
315
|
Tooltip.propTypes = {
|
|
315
316
|
/**
|
|
316
317
|
* Used to render the control (i.e. tooltip trigger). If a render function is used it will receive the
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -25,15 +25,13 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
+
|
|
30
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
+
|
|
28
32
|
/**
|
|
29
|
-
*
|
|
30
|
-
* else returns false
|
|
33
|
+
* @typedef {import('../utils/a11y/semantics').TextTag} TextTag
|
|
31
34
|
*/
|
|
32
|
-
function getHeadingLevel(heading) {
|
|
33
|
-
const match = typeof heading === 'string' && heading.match(/^h(\d)$/);
|
|
34
|
-
return match && match[1];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
35
|
const selectTextStyles = ({
|
|
38
36
|
fontWeight,
|
|
39
37
|
fontSize,
|
|
@@ -55,16 +53,18 @@ const selectTextStyles = ({
|
|
|
55
53
|
}); // General-purpose flexible theme-neutral base component for text
|
|
56
54
|
|
|
57
55
|
|
|
58
|
-
const Typography = ({
|
|
56
|
+
const Typography = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
59
57
|
children,
|
|
60
58
|
variant,
|
|
61
59
|
heading,
|
|
60
|
+
tag = typeof heading === 'string' ? heading : undefined,
|
|
61
|
+
accessibilityRole = heading === true ? 'header' : undefined,
|
|
62
62
|
block = false,
|
|
63
63
|
align = undefined,
|
|
64
|
-
accessibilityRole = heading ? 'header' : 'text',
|
|
65
64
|
tokens,
|
|
65
|
+
dataSet,
|
|
66
66
|
...rest
|
|
67
|
-
}) => {
|
|
67
|
+
}, ref) => {
|
|
68
68
|
const viewport = (0, _ViewportProvider.useViewport)();
|
|
69
69
|
const themeTokens = (0, _ThemeProvider.useThemeTokens)('Typography', tokens, variant, {
|
|
70
70
|
viewport
|
|
@@ -73,34 +73,50 @@ const Typography = ({
|
|
|
73
73
|
style: selectTextStyles(align ? { ...themeTokens,
|
|
74
74
|
textAlign: align
|
|
75
75
|
} : themeTokens),
|
|
76
|
+
dataSet,
|
|
76
77
|
maxFontSizeMultiplier: (0, _utils2.getMaxFontMultiplier)(themeTokens)
|
|
77
78
|
};
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
accessibilityRole,
|
|
81
|
-
// On React Native Web, `accessibilityLevel` controls which heading tag (h1, h2 etc) is used.
|
|
82
|
-
...(headingLevel && {
|
|
83
|
-
accessibilityLevel: headingLevel
|
|
84
|
-
})
|
|
79
|
+
const a11y = { ...(0, _utils2.getA11yPropsFromHtmlTag)(tag, accessibilityRole),
|
|
80
|
+
..._utils2.a11yProps.select(rest)
|
|
85
81
|
};
|
|
86
|
-
return block ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
82
|
+
return block ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
83
|
+
ref: ref,
|
|
84
|
+
...a11y,
|
|
87
85
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, { ...textProps,
|
|
88
86
|
children: children
|
|
89
87
|
})
|
|
90
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, {
|
|
88
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, {
|
|
89
|
+
ref: ref,
|
|
90
|
+
...textProps,
|
|
91
91
|
...a11y,
|
|
92
92
|
children: children
|
|
93
93
|
});
|
|
94
|
-
};
|
|
95
|
-
|
|
94
|
+
});
|
|
95
|
+
Typography.displayName = 'Typography';
|
|
96
96
|
Typography.propTypes = { ..._utils2.a11yProps.types,
|
|
97
97
|
tokens: (0, _utils2.getTokensPropType)('Typography'),
|
|
98
98
|
variant: _utils2.variantProp.propType,
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
101
|
+
* Renders the text as a semantic heading. If a html heading tag is provided, uses that tag on Web.
|
|
102
|
+
*
|
|
103
|
+
* Does not affect styling: <Typography heading="h2"> will render a <h2> that looks like plain text.
|
|
104
|
+
* Use both `heading` and `variant` props to render semantic headings that look like headings.
|
|
105
|
+
*
|
|
106
|
+
* In native apps, if this is `true` or any html heading tag string and accessibilityRole prop
|
|
107
|
+
* is not defined, the accessibilityRole will default to "heading".
|
|
108
|
+
*/
|
|
109
|
+
heading: _propTypes.default.oneOf([..._utils2.headingTags, true]),
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Optional semantic HTML tag, to apply to the text on web. Does not change styling.
|
|
113
|
+
*
|
|
114
|
+
* `tag` and `heading` props set the same thing, so shouldn't be used together (`tag` overrides `heading`).
|
|
115
|
+
*
|
|
116
|
+
* In native apps, if a header tag is provided ("h1", "h2" etc) and accessibilityRole prop
|
|
117
|
+
* is not defined, the accessibilityRole will default to "heading".
|
|
102
118
|
*/
|
|
103
|
-
|
|
119
|
+
tag: _propTypes.default.oneOf(_utils2.textTags),
|
|
104
120
|
|
|
105
121
|
/**
|
|
106
122
|
* If true, forces the element to behave as a View block even if nested in other text
|
package/lib/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var _exportNames = {
|
|
|
16
16
|
Feedback: true,
|
|
17
17
|
Fieldset: true,
|
|
18
18
|
FlexGrid: true,
|
|
19
|
+
HorizontalScroll: true,
|
|
19
20
|
Icon: true,
|
|
20
21
|
IconButton: true,
|
|
21
22
|
InputLabel: true,
|
|
@@ -122,6 +123,12 @@ Object.defineProperty(exports, "FlexGrid", {
|
|
|
122
123
|
return _FlexGrid.default;
|
|
123
124
|
}
|
|
124
125
|
});
|
|
126
|
+
Object.defineProperty(exports, "HorizontalScroll", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () {
|
|
129
|
+
return _HorizontalScroll.default;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
125
132
|
Object.defineProperty(exports, "Icon", {
|
|
126
133
|
enumerable: true,
|
|
127
134
|
get: function () {
|
|
@@ -367,6 +374,20 @@ var _Fieldset = _interopRequireDefault(require("./Fieldset"));
|
|
|
367
374
|
|
|
368
375
|
var _FlexGrid = _interopRequireDefault(require("./FlexGrid"));
|
|
369
376
|
|
|
377
|
+
var _HorizontalScroll = _interopRequireWildcard(require("./HorizontalScroll"));
|
|
378
|
+
|
|
379
|
+
Object.keys(_HorizontalScroll).forEach(function (key) {
|
|
380
|
+
if (key === "default" || key === "__esModule") return;
|
|
381
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
382
|
+
if (key in exports && exports[key] === _HorizontalScroll[key]) return;
|
|
383
|
+
Object.defineProperty(exports, key, {
|
|
384
|
+
enumerable: true,
|
|
385
|
+
get: function () {
|
|
386
|
+
return _HorizontalScroll[key];
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
});
|
|
390
|
+
|
|
370
391
|
var _Icon = _interopRequireWildcard(require("./Icon"));
|
|
371
392
|
|
|
372
393
|
Object.keys(_Icon).forEach(function (key) {
|
package/lib/utils/a11y/index.js
CHANGED
|
@@ -15,4 +15,17 @@ Object.keys(_textSize).forEach(function (key) {
|
|
|
15
15
|
return _textSize[key];
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
var _semantics = require("./semantics");
|
|
21
|
+
|
|
22
|
+
Object.keys(_semantics).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _semantics[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _semantics[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
18
31
|
});
|