@telus-uds/components-base 3.11.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -2
- package/lib/cjs/Button/ButtonGroup.js +1 -1
- package/lib/cjs/Card/Card.js +2 -1
- package/lib/cjs/Carousel/index.js +8 -0
- package/lib/cjs/Checkbox/Checkbox.js +73 -39
- package/lib/cjs/Checkbox/CheckboxGroup.js +4 -1
- package/lib/cjs/FlexGrid/index.js +14 -0
- package/lib/cjs/MultiSelectFilter/MultiSelectFilter.js +5 -1
- package/lib/cjs/OrderedList/index.js +7 -0
- package/lib/cjs/StepTracker/Step.js +4 -1
- package/lib/cjs/ToggleSwitch/ToggleSwitch.js +2 -1
- package/lib/cjs/index.js +20 -2
- package/lib/esm/Button/ButtonGroup.js +1 -1
- package/lib/esm/Card/Card.js +2 -1
- package/lib/esm/Carousel/index.js +1 -0
- package/lib/esm/Checkbox/Checkbox.js +73 -39
- package/lib/esm/Checkbox/CheckboxGroup.js +4 -1
- package/lib/esm/FlexGrid/index.js +2 -0
- package/lib/esm/MultiSelectFilter/MultiSelectFilter.js +5 -1
- package/lib/esm/OrderedList/index.js +1 -0
- package/lib/esm/StepTracker/Step.js +4 -1
- package/lib/esm/ToggleSwitch/ToggleSwitch.js +2 -1
- package/lib/esm/index.js +2 -1
- package/lib/package.json +2 -2
- package/package.json +2 -2
- package/src/Button/ButtonGroup.jsx +1 -1
- package/src/Card/Card.jsx +2 -1
- package/src/Carousel/index.js +1 -0
- package/src/Checkbox/Checkbox.jsx +62 -30
- package/src/Checkbox/CheckboxGroup.jsx +12 -2
- package/src/FlexGrid/index.js +3 -0
- package/src/MultiSelectFilter/MultiSelectFilter.jsx +5 -1
- package/src/OrderedList/index.js +1 -0
- package/src/StepTracker/Step.jsx +1 -1
- package/src/ToggleSwitch/ToggleSwitch.jsx +5 -1
- package/src/index.js +2 -1
- package/types/Checkbox.d.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-base
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 11 Jul 2025 22:15:36 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 3.12.0
|
|
8
|
+
|
|
9
|
+
Fri, 11 Jul 2025 22:15:36 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- `Checkbox`: add description feature (sergio.ramirez@telus.com)
|
|
14
|
+
- `Components`: adding named exports for sub-components (oscar.palencia@telus.com)
|
|
15
|
+
- `ToggleSwitch`: add width prop (sergio.ramirez@telus.com)
|
|
16
|
+
- Bump @telus-uds/system-theme-tokens to v4.10.0
|
|
17
|
+
|
|
18
|
+
### Patches
|
|
19
|
+
|
|
20
|
+
- `ButtonGroup`: responsive width issue fixed for the XS breakpoint (35577399+JoshHC@users.noreply.github.com)
|
|
21
|
+
- `StepTracker`: fix dot rendering (guillermo.peitzner@telus.com)
|
|
22
|
+
- `Card`: fix interactive-card size (guillermo.peitzner@telus.com)
|
|
23
|
+
|
|
7
24
|
## 3.11.0
|
|
8
25
|
|
|
9
|
-
Thu, 26 Jun 2025 23:
|
|
26
|
+
Thu, 26 Jun 2025 23:54:42 GMT
|
|
10
27
|
|
|
11
28
|
### Minor changes
|
|
12
29
|
|
|
@@ -126,7 +126,7 @@ const ButtonGroup = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
126
126
|
padding,
|
|
127
127
|
...(_Platform.default.OS === 'web' ? {
|
|
128
128
|
gap,
|
|
129
|
-
width: variant?.width === 'equal' ? '100%' : '
|
|
129
|
+
width: variant?.width === 'equal' ? '100%' : 'auto'
|
|
130
130
|
} : {
|
|
131
131
|
alignSelf: 'flex-start'
|
|
132
132
|
})
|
package/lib/cjs/Card/Card.js
CHANGED
|
@@ -136,7 +136,8 @@ const Card = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
136
136
|
const isControl = interactiveCard?.variant?.isControl === true;
|
|
137
137
|
const getThemeTokens = (0, _ThemeProvider.useThemeTokensCallback)('Card', interactiveCard?.tokens, {
|
|
138
138
|
interactive: true,
|
|
139
|
-
...(interactiveCard?.variant || {})
|
|
139
|
+
...(interactiveCard?.variant || {}),
|
|
140
|
+
...viewport
|
|
140
141
|
});
|
|
141
142
|
// When interactive area is present, spacing tokens should only be applied
|
|
142
143
|
// to individual Card sections, not Card as a whole
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
7
|
Carousel: true,
|
|
8
|
+
CarouselItem: true,
|
|
8
9
|
CarouselTabs: true
|
|
9
10
|
};
|
|
10
11
|
Object.defineProperty(exports, "Carousel", {
|
|
@@ -13,6 +14,12 @@ Object.defineProperty(exports, "Carousel", {
|
|
|
13
14
|
return _Carousel.default;
|
|
14
15
|
}
|
|
15
16
|
});
|
|
17
|
+
Object.defineProperty(exports, "CarouselItem", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () {
|
|
20
|
+
return _CarouselItem.default;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
16
23
|
Object.defineProperty(exports, "CarouselTabs", {
|
|
17
24
|
enumerable: true,
|
|
18
25
|
get: function () {
|
|
@@ -32,5 +39,6 @@ Object.keys(_CarouselContext).forEach(function (key) {
|
|
|
32
39
|
});
|
|
33
40
|
});
|
|
34
41
|
var _Carousel = _interopRequireDefault(require("./Carousel"));
|
|
42
|
+
var _CarouselItem = _interopRequireDefault(require("./CarouselItem"));
|
|
35
43
|
var _CarouselTabs = _interopRequireDefault(require("./CarouselTabs"));
|
|
36
44
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -53,7 +53,30 @@ const selectInputStyles = (_ref, isChecked) => {
|
|
|
53
53
|
})
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
|
-
const
|
|
56
|
+
const selectDescriptionStyles = _ref2 => {
|
|
57
|
+
let {
|
|
58
|
+
containerPaddingLeft = 0,
|
|
59
|
+
descriptionFontSize,
|
|
60
|
+
descriptionLineHeight,
|
|
61
|
+
descriptionMarginLeft,
|
|
62
|
+
descriptionFontName,
|
|
63
|
+
descriptionFontWeight,
|
|
64
|
+
descriptionFontColor,
|
|
65
|
+
inputWidth,
|
|
66
|
+
labelMarginLeft = 0
|
|
67
|
+
} = _ref2;
|
|
68
|
+
return {
|
|
69
|
+
marginLeft: descriptionMarginLeft ?? containerPaddingLeft + inputWidth + labelMarginLeft,
|
|
70
|
+
...(0, _ThemeProvider.applyTextStyles)({
|
|
71
|
+
color: descriptionFontColor,
|
|
72
|
+
fontSize: descriptionFontSize,
|
|
73
|
+
lineHeight: descriptionLineHeight,
|
|
74
|
+
fontName: descriptionFontName,
|
|
75
|
+
fontWeight: descriptionFontWeight
|
|
76
|
+
})
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
const selectLabelStyles = (_ref3, themeOptions) => {
|
|
57
80
|
let {
|
|
58
81
|
labelColor,
|
|
59
82
|
labelFontName,
|
|
@@ -61,7 +84,7 @@ const selectLabelStyles = (_ref2, themeOptions) => {
|
|
|
61
84
|
labelFontWeight,
|
|
62
85
|
labelMarginLeft,
|
|
63
86
|
labelLineHeight
|
|
64
|
-
} =
|
|
87
|
+
} = _ref3;
|
|
65
88
|
return {
|
|
66
89
|
marginLeft: labelMarginLeft,
|
|
67
90
|
...(0, _ThemeProvider.applyTextStyles)({
|
|
@@ -74,24 +97,24 @@ const selectLabelStyles = (_ref2, themeOptions) => {
|
|
|
74
97
|
})
|
|
75
98
|
};
|
|
76
99
|
};
|
|
77
|
-
const selectIconTokens =
|
|
100
|
+
const selectIconTokens = _ref4 => {
|
|
78
101
|
let {
|
|
79
102
|
icon,
|
|
80
103
|
iconColor,
|
|
81
104
|
iconSize
|
|
82
|
-
} =
|
|
105
|
+
} = _ref4;
|
|
83
106
|
return {
|
|
84
107
|
icon,
|
|
85
108
|
color: iconColor,
|
|
86
109
|
size: iconSize
|
|
87
110
|
};
|
|
88
111
|
};
|
|
89
|
-
const selectFeedbackTokens =
|
|
112
|
+
const selectFeedbackTokens = _ref5 => {
|
|
90
113
|
let {
|
|
91
114
|
feedbackMarginBottom,
|
|
92
115
|
feedbackMarginTop,
|
|
93
116
|
feedbackPosition
|
|
94
|
-
} =
|
|
117
|
+
} = _ref5;
|
|
95
118
|
return {
|
|
96
119
|
feedbackPosition,
|
|
97
120
|
feedbackMarginBottom,
|
|
@@ -134,10 +157,11 @@ const selectFeedbackTokens = _ref4 => {
|
|
|
134
157
|
* or the internal state in case of uncontrolled checkbox.
|
|
135
158
|
*
|
|
136
159
|
*/
|
|
137
|
-
const Checkbox = /*#__PURE__*/_react.default.forwardRef((
|
|
160
|
+
const Checkbox = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) => {
|
|
138
161
|
let {
|
|
139
162
|
checked,
|
|
140
163
|
defaultChecked,
|
|
164
|
+
description,
|
|
141
165
|
error = false,
|
|
142
166
|
feedback,
|
|
143
167
|
id,
|
|
@@ -149,7 +173,7 @@ const Checkbox = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
149
173
|
value,
|
|
150
174
|
variant,
|
|
151
175
|
...rest
|
|
152
|
-
} =
|
|
176
|
+
} = _ref6;
|
|
153
177
|
const {
|
|
154
178
|
currentValue: isChecked,
|
|
155
179
|
setValue: setIsChecked,
|
|
@@ -211,12 +235,12 @@ const Checkbox = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
211
235
|
onPress: handleChange,
|
|
212
236
|
...selectedProps,
|
|
213
237
|
style: staticStyles.removeOutline,
|
|
214
|
-
children:
|
|
238
|
+
children: _ref7 => {
|
|
215
239
|
let {
|
|
216
240
|
focused: focus,
|
|
217
241
|
hovered: hover,
|
|
218
242
|
pressed
|
|
219
|
-
} =
|
|
243
|
+
} = _ref7;
|
|
220
244
|
const {
|
|
221
245
|
icon: IconComponent,
|
|
222
246
|
...stateTokens
|
|
@@ -230,34 +254,40 @@ const Checkbox = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
230
254
|
const alignWithLabel = label ? [staticStyles.alignWithLabel, {
|
|
231
255
|
height: labelStyles.lineHeight
|
|
232
256
|
}] : null;
|
|
233
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
234
|
-
|
|
235
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
236
|
-
style:
|
|
237
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
238
|
-
style:
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
children:
|
|
260
|
-
|
|
257
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_StackView.default, {
|
|
258
|
+
space: 0,
|
|
259
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
|
|
260
|
+
style: staticStyles.container,
|
|
261
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
262
|
+
style: alignWithLabel,
|
|
263
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
|
|
264
|
+
style: [staticStyles.defaultInputStyles, selectInputStyles(stateTokens, isChecked)],
|
|
265
|
+
testID: "Checkbox-Input",
|
|
266
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckboxInput.default, {
|
|
267
|
+
checked: isChecked,
|
|
268
|
+
defaultChecked: defaultChecked,
|
|
269
|
+
disabled: inactive,
|
|
270
|
+
id: inputId,
|
|
271
|
+
isControlled: isControlled,
|
|
272
|
+
name: name,
|
|
273
|
+
value: value
|
|
274
|
+
}), isChecked && IconComponent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
275
|
+
testID: "Checkbox-Icon",
|
|
276
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
|
|
277
|
+
...iconTokens
|
|
278
|
+
})
|
|
279
|
+
})]
|
|
280
|
+
})
|
|
281
|
+
}), Boolean(label) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, {
|
|
282
|
+
style: labelStyles,
|
|
283
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_LabelContent.default, {
|
|
284
|
+
forId: inputId,
|
|
285
|
+
children: label
|
|
286
|
+
})
|
|
287
|
+
})]
|
|
288
|
+
}), Boolean(description) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.default, {
|
|
289
|
+
style: selectDescriptionStyles(defaultTokens),
|
|
290
|
+
children: description
|
|
261
291
|
})]
|
|
262
292
|
});
|
|
263
293
|
}
|
|
@@ -324,7 +354,11 @@ Checkbox.propTypes = {
|
|
|
324
354
|
/**
|
|
325
355
|
* Checkbox variant.
|
|
326
356
|
*/
|
|
327
|
-
variant: _utils.variantProp.propType
|
|
357
|
+
variant: _utils.variantProp.propType,
|
|
358
|
+
/**
|
|
359
|
+
* An optional Checkbox description.
|
|
360
|
+
*/
|
|
361
|
+
description: _propTypes.default.string
|
|
328
362
|
};
|
|
329
363
|
var _default = exports.default = Checkbox;
|
|
330
364
|
const staticStyles = _StyleSheet.default.create({
|
|
@@ -124,6 +124,7 @@ const CheckboxGroup = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
124
124
|
let {
|
|
125
125
|
label,
|
|
126
126
|
id,
|
|
127
|
+
description,
|
|
127
128
|
onChange: itemOnChange,
|
|
128
129
|
ref: itemRef,
|
|
129
130
|
inactive: itemInactive,
|
|
@@ -144,6 +145,7 @@ const CheckboxGroup = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
144
145
|
name: inputGroupName,
|
|
145
146
|
tokens: radioTokens,
|
|
146
147
|
variant: variant,
|
|
148
|
+
description: description,
|
|
147
149
|
...selectItemProps(itemRest)
|
|
148
150
|
}, checkboxId);
|
|
149
151
|
});
|
|
@@ -192,7 +194,8 @@ CheckboxGroup.propTypes = {
|
|
|
192
194
|
id: _propTypes.default.string,
|
|
193
195
|
onChange: _propTypes.default.func,
|
|
194
196
|
ref: _airbnbPropTypes.default.ref(),
|
|
195
|
-
inactive: _propTypes.default.bool
|
|
197
|
+
inactive: _propTypes.default.bool,
|
|
198
|
+
description: _propTypes.default.string
|
|
196
199
|
})),
|
|
197
200
|
/**
|
|
198
201
|
* Main text used to describe this group, used in Fieldset's Legend element.
|
|
@@ -3,7 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "FlexGridCol", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Col.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "FlexGridRow", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _Row.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
6
18
|
exports.default = void 0;
|
|
7
19
|
var _FlexGrid = _interopRequireDefault(require("./FlexGrid"));
|
|
20
|
+
var _Row = _interopRequireDefault(require("./Row"));
|
|
21
|
+
var _Col = _interopRequireDefault(require("./Col"));
|
|
8
22
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
23
|
var _default = exports.default = _FlexGrid.default;
|
|
@@ -491,7 +491,11 @@ MultiSelectFilter.propTypes = {
|
|
|
491
491
|
* An optional unique string may be provided to identify this option.
|
|
492
492
|
* If not provided, the label is used.
|
|
493
493
|
*/
|
|
494
|
-
id: _propTypes.default.string
|
|
494
|
+
id: _propTypes.default.string,
|
|
495
|
+
/**
|
|
496
|
+
* An optional Checkbox description.
|
|
497
|
+
*/
|
|
498
|
+
description: _propTypes.default.string
|
|
495
499
|
})),
|
|
496
500
|
/**
|
|
497
501
|
* If the selected item(s) in the checkbox group(s) are to be controlled externally by
|
|
@@ -3,7 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "OrderedListItem", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Item.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
exports.default = void 0;
|
|
7
13
|
var _OrderedList = _interopRequireDefault(require("./OrderedList"));
|
|
14
|
+
var _Item = _interopRequireDefault(require("./Item"));
|
|
8
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
16
|
var _default = exports.default = _OrderedList.default;
|
|
@@ -259,7 +259,10 @@ const staticStyles = _StyleSheet.default.create({
|
|
|
259
259
|
textAlign: 'center'
|
|
260
260
|
},
|
|
261
261
|
knob: {
|
|
262
|
-
borderWidth: 1
|
|
262
|
+
borderWidth: 1,
|
|
263
|
+
display: 'flex',
|
|
264
|
+
justifyContent: 'center',
|
|
265
|
+
alignItems: 'center'
|
|
263
266
|
},
|
|
264
267
|
stepLabelContainer: {
|
|
265
268
|
justifyContent: 'center'
|
|
@@ -172,7 +172,8 @@ const ToggleSwitch = /*#__PURE__*/_react.default.forwardRef((_ref9, ref) => {
|
|
|
172
172
|
direction: togglePosition === 'start' ? 'row-reverse' : 'row',
|
|
173
173
|
tokens: {
|
|
174
174
|
alignItems: 'center',
|
|
175
|
-
justifyContent: 'start'
|
|
175
|
+
justifyContent: themeTokens.containerWidth ? 'space-between' : 'start',
|
|
176
|
+
width: themeTokens.containerWidth
|
|
176
177
|
},
|
|
177
178
|
children: [Boolean(label) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
178
179
|
style: [selectLabelStyles(themeTokens), staticStyles.containText],
|
package/lib/cjs/index.js
CHANGED
|
@@ -44,6 +44,7 @@ var _exportNames = {
|
|
|
44
44
|
MultiSelectFilter: true,
|
|
45
45
|
Notification: true,
|
|
46
46
|
OrderedList: true,
|
|
47
|
+
OrderedListItem: true,
|
|
47
48
|
Pagination: true,
|
|
48
49
|
PriceLockup: true,
|
|
49
50
|
ProductCard: true,
|
|
@@ -328,6 +329,12 @@ Object.defineProperty(exports, "OrderedList", {
|
|
|
328
329
|
return _OrderedList.default;
|
|
329
330
|
}
|
|
330
331
|
});
|
|
332
|
+
Object.defineProperty(exports, "OrderedListItem", {
|
|
333
|
+
enumerable: true,
|
|
334
|
+
get: function () {
|
|
335
|
+
return _OrderedList.OrderedListItem;
|
|
336
|
+
}
|
|
337
|
+
});
|
|
331
338
|
Object.defineProperty(exports, "Pagination", {
|
|
332
339
|
enumerable: true,
|
|
333
340
|
get: function () {
|
|
@@ -683,7 +690,18 @@ var _ExpandCollapse = _interopRequireWildcard(require("./ExpandCollapse"));
|
|
|
683
690
|
var _ExpandCollapseMini = _interopRequireDefault(require("./ExpandCollapseMini"));
|
|
684
691
|
var _Feedback = _interopRequireDefault(require("./Feedback"));
|
|
685
692
|
var _Fieldset = _interopRequireDefault(require("./Fieldset"));
|
|
686
|
-
var _FlexGrid =
|
|
693
|
+
var _FlexGrid = _interopRequireWildcard(require("./FlexGrid"));
|
|
694
|
+
Object.keys(_FlexGrid).forEach(function (key) {
|
|
695
|
+
if (key === "default" || key === "__esModule") return;
|
|
696
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
697
|
+
if (key in exports && exports[key] === _FlexGrid[key]) return;
|
|
698
|
+
Object.defineProperty(exports, key, {
|
|
699
|
+
enumerable: true,
|
|
700
|
+
get: function () {
|
|
701
|
+
return _FlexGrid[key];
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
});
|
|
687
705
|
var _Footnote = _interopRequireDefault(require("./Footnote"));
|
|
688
706
|
var _HorizontalScroll = _interopRequireWildcard(require("./HorizontalScroll"));
|
|
689
707
|
var _Icon = _interopRequireWildcard(require("./Icon"));
|
|
@@ -706,7 +724,7 @@ var _List = _interopRequireWildcard(require("./List"));
|
|
|
706
724
|
var _Modal = _interopRequireDefault(require("./Modal"));
|
|
707
725
|
var _MultiSelectFilter = _interopRequireDefault(require("./MultiSelectFilter"));
|
|
708
726
|
var _Notification = _interopRequireDefault(require("./Notification"));
|
|
709
|
-
var _OrderedList =
|
|
727
|
+
var _OrderedList = _interopRequireWildcard(require("./OrderedList"));
|
|
710
728
|
var _Pagination = _interopRequireDefault(require("./Pagination"));
|
|
711
729
|
var _PriceLockup = _interopRequireDefault(require("./PriceLockup"));
|
|
712
730
|
var _ProductCard = _interopRequireDefault(require("./ProductCard"));
|
|
@@ -119,7 +119,7 @@ const ButtonGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
119
119
|
padding,
|
|
120
120
|
...(Platform.OS === 'web' ? {
|
|
121
121
|
gap,
|
|
122
|
-
width: variant?.width === 'equal' ? '100%' : '
|
|
122
|
+
width: variant?.width === 'equal' ? '100%' : 'auto'
|
|
123
123
|
} : {
|
|
124
124
|
alignSelf: 'flex-start'
|
|
125
125
|
})
|
package/lib/esm/Card/Card.js
CHANGED
|
@@ -129,7 +129,8 @@ const Card = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
129
129
|
const isControl = interactiveCard?.variant?.isControl === true;
|
|
130
130
|
const getThemeTokens = useThemeTokensCallback('Card', interactiveCard?.tokens, {
|
|
131
131
|
interactive: true,
|
|
132
|
-
...(interactiveCard?.variant || {})
|
|
132
|
+
...(interactiveCard?.variant || {}),
|
|
133
|
+
...viewport
|
|
133
134
|
});
|
|
134
135
|
// When interactive area is present, spacing tokens should only be applied
|
|
135
136
|
// to individual Card sections, not Card as a whole
|
|
@@ -46,7 +46,30 @@ const selectInputStyles = (_ref, isChecked) => {
|
|
|
46
46
|
})
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
-
const
|
|
49
|
+
const selectDescriptionStyles = _ref2 => {
|
|
50
|
+
let {
|
|
51
|
+
containerPaddingLeft = 0,
|
|
52
|
+
descriptionFontSize,
|
|
53
|
+
descriptionLineHeight,
|
|
54
|
+
descriptionMarginLeft,
|
|
55
|
+
descriptionFontName,
|
|
56
|
+
descriptionFontWeight,
|
|
57
|
+
descriptionFontColor,
|
|
58
|
+
inputWidth,
|
|
59
|
+
labelMarginLeft = 0
|
|
60
|
+
} = _ref2;
|
|
61
|
+
return {
|
|
62
|
+
marginLeft: descriptionMarginLeft ?? containerPaddingLeft + inputWidth + labelMarginLeft,
|
|
63
|
+
...applyTextStyles({
|
|
64
|
+
color: descriptionFontColor,
|
|
65
|
+
fontSize: descriptionFontSize,
|
|
66
|
+
lineHeight: descriptionLineHeight,
|
|
67
|
+
fontName: descriptionFontName,
|
|
68
|
+
fontWeight: descriptionFontWeight
|
|
69
|
+
})
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
const selectLabelStyles = (_ref3, themeOptions) => {
|
|
50
73
|
let {
|
|
51
74
|
labelColor,
|
|
52
75
|
labelFontName,
|
|
@@ -54,7 +77,7 @@ const selectLabelStyles = (_ref2, themeOptions) => {
|
|
|
54
77
|
labelFontWeight,
|
|
55
78
|
labelMarginLeft,
|
|
56
79
|
labelLineHeight
|
|
57
|
-
} =
|
|
80
|
+
} = _ref3;
|
|
58
81
|
return {
|
|
59
82
|
marginLeft: labelMarginLeft,
|
|
60
83
|
...applyTextStyles({
|
|
@@ -67,24 +90,24 @@ const selectLabelStyles = (_ref2, themeOptions) => {
|
|
|
67
90
|
})
|
|
68
91
|
};
|
|
69
92
|
};
|
|
70
|
-
const selectIconTokens =
|
|
93
|
+
const selectIconTokens = _ref4 => {
|
|
71
94
|
let {
|
|
72
95
|
icon,
|
|
73
96
|
iconColor,
|
|
74
97
|
iconSize
|
|
75
|
-
} =
|
|
98
|
+
} = _ref4;
|
|
76
99
|
return {
|
|
77
100
|
icon,
|
|
78
101
|
color: iconColor,
|
|
79
102
|
size: iconSize
|
|
80
103
|
};
|
|
81
104
|
};
|
|
82
|
-
const selectFeedbackTokens =
|
|
105
|
+
const selectFeedbackTokens = _ref5 => {
|
|
83
106
|
let {
|
|
84
107
|
feedbackMarginBottom,
|
|
85
108
|
feedbackMarginTop,
|
|
86
109
|
feedbackPosition
|
|
87
|
-
} =
|
|
110
|
+
} = _ref5;
|
|
88
111
|
return {
|
|
89
112
|
feedbackPosition,
|
|
90
113
|
feedbackMarginBottom,
|
|
@@ -127,10 +150,11 @@ const selectFeedbackTokens = _ref4 => {
|
|
|
127
150
|
* or the internal state in case of uncontrolled checkbox.
|
|
128
151
|
*
|
|
129
152
|
*/
|
|
130
|
-
const Checkbox = /*#__PURE__*/React.forwardRef((
|
|
153
|
+
const Checkbox = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
131
154
|
let {
|
|
132
155
|
checked,
|
|
133
156
|
defaultChecked,
|
|
157
|
+
description,
|
|
134
158
|
error = false,
|
|
135
159
|
feedback,
|
|
136
160
|
id,
|
|
@@ -142,7 +166,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
142
166
|
value,
|
|
143
167
|
variant,
|
|
144
168
|
...rest
|
|
145
|
-
} =
|
|
169
|
+
} = _ref6;
|
|
146
170
|
const {
|
|
147
171
|
currentValue: isChecked,
|
|
148
172
|
setValue: setIsChecked,
|
|
@@ -204,12 +228,12 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
204
228
|
onPress: handleChange,
|
|
205
229
|
...selectedProps,
|
|
206
230
|
style: staticStyles.removeOutline,
|
|
207
|
-
children:
|
|
231
|
+
children: _ref7 => {
|
|
208
232
|
let {
|
|
209
233
|
focused: focus,
|
|
210
234
|
hovered: hover,
|
|
211
235
|
pressed
|
|
212
|
-
} =
|
|
236
|
+
} = _ref7;
|
|
213
237
|
const {
|
|
214
238
|
icon: IconComponent,
|
|
215
239
|
...stateTokens
|
|
@@ -223,34 +247,40 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
223
247
|
const alignWithLabel = label ? [staticStyles.alignWithLabel, {
|
|
224
248
|
height: labelStyles.lineHeight
|
|
225
249
|
}] : null;
|
|
226
|
-
return /*#__PURE__*/_jsxs(
|
|
227
|
-
|
|
228
|
-
children: [/*#__PURE__*/
|
|
229
|
-
style:
|
|
230
|
-
children: /*#__PURE__*/
|
|
231
|
-
style:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
children:
|
|
253
|
-
|
|
250
|
+
return /*#__PURE__*/_jsxs(StackView, {
|
|
251
|
+
space: 0,
|
|
252
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
253
|
+
style: staticStyles.container,
|
|
254
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
255
|
+
style: alignWithLabel,
|
|
256
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
257
|
+
style: [staticStyles.defaultInputStyles, selectInputStyles(stateTokens, isChecked)],
|
|
258
|
+
testID: "Checkbox-Input",
|
|
259
|
+
children: [/*#__PURE__*/_jsx(CheckboxInput, {
|
|
260
|
+
checked: isChecked,
|
|
261
|
+
defaultChecked: defaultChecked,
|
|
262
|
+
disabled: inactive,
|
|
263
|
+
id: inputId,
|
|
264
|
+
isControlled: isControlled,
|
|
265
|
+
name: name,
|
|
266
|
+
value: value
|
|
267
|
+
}), isChecked && IconComponent && /*#__PURE__*/_jsx(View, {
|
|
268
|
+
testID: "Checkbox-Icon",
|
|
269
|
+
children: /*#__PURE__*/_jsx(IconComponent, {
|
|
270
|
+
...iconTokens
|
|
271
|
+
})
|
|
272
|
+
})]
|
|
273
|
+
})
|
|
274
|
+
}), Boolean(label) && /*#__PURE__*/_jsx(Text, {
|
|
275
|
+
style: labelStyles,
|
|
276
|
+
children: /*#__PURE__*/_jsx(CheckboxLabel, {
|
|
277
|
+
forId: inputId,
|
|
278
|
+
children: label
|
|
279
|
+
})
|
|
280
|
+
})]
|
|
281
|
+
}), Boolean(description) && /*#__PURE__*/_jsx(Text, {
|
|
282
|
+
style: selectDescriptionStyles(defaultTokens),
|
|
283
|
+
children: description
|
|
254
284
|
})]
|
|
255
285
|
});
|
|
256
286
|
}
|
|
@@ -317,7 +347,11 @@ Checkbox.propTypes = {
|
|
|
317
347
|
/**
|
|
318
348
|
* Checkbox variant.
|
|
319
349
|
*/
|
|
320
|
-
variant: variantProp.propType
|
|
350
|
+
variant: variantProp.propType,
|
|
351
|
+
/**
|
|
352
|
+
* An optional Checkbox description.
|
|
353
|
+
*/
|
|
354
|
+
description: PropTypes.string
|
|
321
355
|
};
|
|
322
356
|
export default Checkbox;
|
|
323
357
|
const staticStyles = StyleSheet.create({
|
|
@@ -117,6 +117,7 @@ const CheckboxGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
117
117
|
let {
|
|
118
118
|
label,
|
|
119
119
|
id,
|
|
120
|
+
description,
|
|
120
121
|
onChange: itemOnChange,
|
|
121
122
|
ref: itemRef,
|
|
122
123
|
inactive: itemInactive,
|
|
@@ -137,6 +138,7 @@ const CheckboxGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
137
138
|
name: inputGroupName,
|
|
138
139
|
tokens: radioTokens,
|
|
139
140
|
variant: variant,
|
|
141
|
+
description: description,
|
|
140
142
|
...selectItemProps(itemRest)
|
|
141
143
|
}, checkboxId);
|
|
142
144
|
});
|
|
@@ -185,7 +187,8 @@ CheckboxGroup.propTypes = {
|
|
|
185
187
|
id: PropTypes.string,
|
|
186
188
|
onChange: PropTypes.func,
|
|
187
189
|
ref: ABBPropTypes.ref(),
|
|
188
|
-
inactive: PropTypes.bool
|
|
190
|
+
inactive: PropTypes.bool,
|
|
191
|
+
description: PropTypes.string
|
|
189
192
|
})),
|
|
190
193
|
/**
|
|
191
194
|
* Main text used to describe this group, used in Fieldset's Legend element.
|
|
@@ -484,7 +484,11 @@ MultiSelectFilter.propTypes = {
|
|
|
484
484
|
* An optional unique string may be provided to identify this option.
|
|
485
485
|
* If not provided, the label is used.
|
|
486
486
|
*/
|
|
487
|
-
id: PropTypes.string
|
|
487
|
+
id: PropTypes.string,
|
|
488
|
+
/**
|
|
489
|
+
* An optional Checkbox description.
|
|
490
|
+
*/
|
|
491
|
+
description: PropTypes.string
|
|
488
492
|
})),
|
|
489
493
|
/**
|
|
490
494
|
* If the selected item(s) in the checkbox group(s) are to be controlled externally by
|
|
@@ -252,7 +252,10 @@ const staticStyles = StyleSheet.create({
|
|
|
252
252
|
textAlign: 'center'
|
|
253
253
|
},
|
|
254
254
|
knob: {
|
|
255
|
-
borderWidth: 1
|
|
255
|
+
borderWidth: 1,
|
|
256
|
+
display: 'flex',
|
|
257
|
+
justifyContent: 'center',
|
|
258
|
+
alignItems: 'center'
|
|
256
259
|
},
|
|
257
260
|
stepLabelContainer: {
|
|
258
261
|
justifyContent: 'center'
|
|
@@ -165,7 +165,8 @@ const ToggleSwitch = /*#__PURE__*/React.forwardRef((_ref9, ref) => {
|
|
|
165
165
|
direction: togglePosition === 'start' ? 'row-reverse' : 'row',
|
|
166
166
|
tokens: {
|
|
167
167
|
alignItems: 'center',
|
|
168
|
-
justifyContent: 'start'
|
|
168
|
+
justifyContent: themeTokens.containerWidth ? 'space-between' : 'start',
|
|
169
|
+
width: themeTokens.containerWidth
|
|
169
170
|
},
|
|
170
171
|
children: [Boolean(label) && /*#__PURE__*/_jsx(View, {
|
|
171
172
|
style: [selectLabelStyles(themeTokens), staticStyles.containText],
|
package/lib/esm/index.js
CHANGED
|
@@ -21,6 +21,7 @@ export { default as ExpandCollapse, Accordion } from './ExpandCollapse';
|
|
|
21
21
|
export { default as ExpandCollapseMini } from './ExpandCollapseMini';
|
|
22
22
|
export { default as Feedback } from './Feedback';
|
|
23
23
|
export { default as Fieldset } from './Fieldset';
|
|
24
|
+
export * from './FlexGrid';
|
|
24
25
|
export { default as FlexGrid } from './FlexGrid';
|
|
25
26
|
export { default as Footnote } from './Footnote';
|
|
26
27
|
export { default as HorizontalScroll, horizontalScrollUtils, HorizontalScrollButton } from './HorizontalScroll';
|
|
@@ -33,7 +34,7 @@ export { default as List, ListItem, ListBase } from './List';
|
|
|
33
34
|
export { default as Modal } from './Modal';
|
|
34
35
|
export { default as MultiSelectFilter } from './MultiSelectFilter';
|
|
35
36
|
export { default as Notification } from './Notification';
|
|
36
|
-
export { default as OrderedList } from './OrderedList';
|
|
37
|
+
export { default as OrderedList, OrderedListItem } from './OrderedList';
|
|
37
38
|
export { default as Pagination } from './Pagination';
|
|
38
39
|
export { default as PriceLockup } from './PriceLockup';
|
|
39
40
|
export { default as ProductCard } from './ProductCard';
|
package/lib/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@gorhom/portal": "^1.0.14",
|
|
13
13
|
"@react-native-picker/picker": "^2.9.0",
|
|
14
14
|
"@telus-uds/system-constants": "^3.0.0",
|
|
15
|
-
"@telus-uds/system-theme-tokens": "^4.
|
|
15
|
+
"@telus-uds/system-theme-tokens": "^4.10.0",
|
|
16
16
|
"airbnb-prop-types": "^2.16.0",
|
|
17
17
|
"css-mediaquery": "^0.1.2",
|
|
18
18
|
"expo-document-picker": "^13.0.1",
|
|
@@ -84,6 +84,6 @@
|
|
|
84
84
|
"standard-engine": {
|
|
85
85
|
"skip": true
|
|
86
86
|
},
|
|
87
|
-
"version": "3.
|
|
87
|
+
"version": "3.12.0",
|
|
88
88
|
"types": "types/index.d.ts"
|
|
89
89
|
}
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@gorhom/portal": "^1.0.14",
|
|
13
13
|
"@react-native-picker/picker": "^2.9.0",
|
|
14
14
|
"@telus-uds/system-constants": "^3.0.0",
|
|
15
|
-
"@telus-uds/system-theme-tokens": "^4.
|
|
15
|
+
"@telus-uds/system-theme-tokens": "^4.10.0",
|
|
16
16
|
"airbnb-prop-types": "^2.16.0",
|
|
17
17
|
"css-mediaquery": "^0.1.2",
|
|
18
18
|
"expo-document-picker": "^13.0.1",
|
|
@@ -84,6 +84,6 @@
|
|
|
84
84
|
"standard-engine": {
|
|
85
85
|
"skip": true
|
|
86
86
|
},
|
|
87
|
-
"version": "3.
|
|
87
|
+
"version": "3.12.0",
|
|
88
88
|
"types": "types/index.d.ts"
|
|
89
89
|
}
|
|
@@ -135,7 +135,7 @@ const ButtonGroup = React.forwardRef(
|
|
|
135
135
|
backgroundColor,
|
|
136
136
|
padding,
|
|
137
137
|
...(Platform.OS === 'web'
|
|
138
|
-
? { gap, width: variant?.width === 'equal' ? '100%' : '
|
|
138
|
+
? { gap, width: variant?.width === 'equal' ? '100%' : 'auto' }
|
|
139
139
|
: { alignSelf: 'flex-start' })
|
|
140
140
|
}}
|
|
141
141
|
{...selectProps(rest)}
|
package/src/Card/Card.jsx
CHANGED
|
@@ -132,7 +132,8 @@ const Card = React.forwardRef(
|
|
|
132
132
|
|
|
133
133
|
const getThemeTokens = useThemeTokensCallback('Card', interactiveCard?.tokens, {
|
|
134
134
|
interactive: true,
|
|
135
|
-
...(interactiveCard?.variant || {})
|
|
135
|
+
...(interactiveCard?.variant || {}),
|
|
136
|
+
...viewport
|
|
136
137
|
})
|
|
137
138
|
// When interactive area is present, spacing tokens should only be applied
|
|
138
139
|
// to individual Card sections, not Card as a whole
|
package/src/Carousel/index.js
CHANGED
|
@@ -61,6 +61,28 @@ const selectInputStyles = (
|
|
|
61
61
|
}
|
|
62
62
|
})
|
|
63
63
|
})
|
|
64
|
+
|
|
65
|
+
const selectDescriptionStyles = ({
|
|
66
|
+
containerPaddingLeft = 0,
|
|
67
|
+
descriptionFontSize,
|
|
68
|
+
descriptionLineHeight,
|
|
69
|
+
descriptionMarginLeft,
|
|
70
|
+
descriptionFontName,
|
|
71
|
+
descriptionFontWeight,
|
|
72
|
+
descriptionFontColor,
|
|
73
|
+
inputWidth,
|
|
74
|
+
labelMarginLeft = 0
|
|
75
|
+
}) => ({
|
|
76
|
+
marginLeft: descriptionMarginLeft ?? containerPaddingLeft + inputWidth + labelMarginLeft,
|
|
77
|
+
...applyTextStyles({
|
|
78
|
+
color: descriptionFontColor,
|
|
79
|
+
fontSize: descriptionFontSize,
|
|
80
|
+
lineHeight: descriptionLineHeight,
|
|
81
|
+
fontName: descriptionFontName,
|
|
82
|
+
fontWeight: descriptionFontWeight
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
|
|
64
86
|
const selectLabelStyles = (
|
|
65
87
|
{ labelColor, labelFontName, labelFontSize, labelFontWeight, labelMarginLeft, labelLineHeight },
|
|
66
88
|
themeOptions
|
|
@@ -127,6 +149,7 @@ const Checkbox = React.forwardRef(
|
|
|
127
149
|
{
|
|
128
150
|
checked,
|
|
129
151
|
defaultChecked,
|
|
152
|
+
description,
|
|
130
153
|
error = false,
|
|
131
154
|
feedback,
|
|
132
155
|
id,
|
|
@@ -203,38 +226,43 @@ const Checkbox = React.forwardRef(
|
|
|
203
226
|
: null
|
|
204
227
|
|
|
205
228
|
return (
|
|
206
|
-
<
|
|
207
|
-
<View style={
|
|
208
|
-
<View
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
<
|
|
228
|
-
|
|
229
|
-
|
|
229
|
+
<StackView space={0}>
|
|
230
|
+
<View style={staticStyles.container}>
|
|
231
|
+
<View style={alignWithLabel}>
|
|
232
|
+
<View
|
|
233
|
+
style={[
|
|
234
|
+
staticStyles.defaultInputStyles,
|
|
235
|
+
selectInputStyles(stateTokens, isChecked)
|
|
236
|
+
]}
|
|
237
|
+
testID="Checkbox-Input"
|
|
238
|
+
>
|
|
239
|
+
{/* Add a real input on Web, skip on native platforms */}
|
|
240
|
+
<CheckboxInput
|
|
241
|
+
checked={isChecked}
|
|
242
|
+
defaultChecked={defaultChecked}
|
|
243
|
+
disabled={inactive}
|
|
244
|
+
id={inputId}
|
|
245
|
+
isControlled={isControlled}
|
|
246
|
+
name={name}
|
|
247
|
+
value={value}
|
|
248
|
+
/>
|
|
249
|
+
{isChecked && IconComponent && (
|
|
250
|
+
<View testID="Checkbox-Icon">
|
|
251
|
+
<IconComponent {...iconTokens} />
|
|
252
|
+
</View>
|
|
253
|
+
)}
|
|
254
|
+
</View>
|
|
230
255
|
</View>
|
|
256
|
+
{Boolean(label) && (
|
|
257
|
+
<Text style={labelStyles}>
|
|
258
|
+
<CheckboxLabel forId={inputId}>{label}</CheckboxLabel>
|
|
259
|
+
</Text>
|
|
260
|
+
)}
|
|
231
261
|
</View>
|
|
232
|
-
{Boolean(
|
|
233
|
-
<Text style={
|
|
234
|
-
<CheckboxLabel forId={inputId}>{label}</CheckboxLabel>
|
|
235
|
-
</Text>
|
|
262
|
+
{Boolean(description) && (
|
|
263
|
+
<Text style={selectDescriptionStyles(defaultTokens)}>{description}</Text>
|
|
236
264
|
)}
|
|
237
|
-
</
|
|
265
|
+
</StackView>
|
|
238
266
|
)
|
|
239
267
|
}}
|
|
240
268
|
</Pressable>
|
|
@@ -303,7 +331,11 @@ Checkbox.propTypes = {
|
|
|
303
331
|
/**
|
|
304
332
|
* Checkbox variant.
|
|
305
333
|
*/
|
|
306
|
-
variant: variantProp.propType
|
|
334
|
+
variant: variantProp.propType,
|
|
335
|
+
/**
|
|
336
|
+
* An optional Checkbox description.
|
|
337
|
+
*/
|
|
338
|
+
description: PropTypes.string
|
|
307
339
|
}
|
|
308
340
|
|
|
309
341
|
export default Checkbox
|
|
@@ -135,7 +135,15 @@ const CheckboxGroup = React.forwardRef(
|
|
|
135
135
|
|
|
136
136
|
const checkboxes = items.map(
|
|
137
137
|
(
|
|
138
|
-
{
|
|
138
|
+
{
|
|
139
|
+
label,
|
|
140
|
+
id,
|
|
141
|
+
description,
|
|
142
|
+
onChange: itemOnChange,
|
|
143
|
+
ref: itemRef,
|
|
144
|
+
inactive: itemInactive,
|
|
145
|
+
...itemRest
|
|
146
|
+
},
|
|
139
147
|
index
|
|
140
148
|
) => {
|
|
141
149
|
const checkboxId = id || `Checkbox[${index}]`
|
|
@@ -156,6 +164,7 @@ const CheckboxGroup = React.forwardRef(
|
|
|
156
164
|
name={inputGroupName}
|
|
157
165
|
tokens={radioTokens}
|
|
158
166
|
variant={variant}
|
|
167
|
+
description={description}
|
|
159
168
|
{...selectItemProps(itemRest)}
|
|
160
169
|
/>
|
|
161
170
|
)
|
|
@@ -210,7 +219,8 @@ CheckboxGroup.propTypes = {
|
|
|
210
219
|
id: PropTypes.string,
|
|
211
220
|
onChange: PropTypes.func,
|
|
212
221
|
ref: ABBPropTypes.ref(),
|
|
213
|
-
inactive: PropTypes.bool
|
|
222
|
+
inactive: PropTypes.bool,
|
|
223
|
+
description: PropTypes.string
|
|
214
224
|
})
|
|
215
225
|
),
|
|
216
226
|
/**
|
package/src/FlexGrid/index.js
CHANGED
|
@@ -479,7 +479,11 @@ MultiSelectFilter.propTypes = {
|
|
|
479
479
|
* An optional unique string may be provided to identify this option.
|
|
480
480
|
* If not provided, the label is used.
|
|
481
481
|
*/
|
|
482
|
-
id: PropTypes.string
|
|
482
|
+
id: PropTypes.string,
|
|
483
|
+
/**
|
|
484
|
+
* An optional Checkbox description.
|
|
485
|
+
*/
|
|
486
|
+
description: PropTypes.string
|
|
483
487
|
})
|
|
484
488
|
),
|
|
485
489
|
/**
|
package/src/OrderedList/index.js
CHANGED
package/src/StepTracker/Step.jsx
CHANGED
|
@@ -243,7 +243,7 @@ const staticStyles = StyleSheet.create({
|
|
|
243
243
|
backgroundColor: 'transparent',
|
|
244
244
|
textAlign: 'center'
|
|
245
245
|
},
|
|
246
|
-
knob: { borderWidth: 1 },
|
|
246
|
+
knob: { borderWidth: 1, display: 'flex', justifyContent: 'center', alignItems: 'center' },
|
|
247
247
|
stepLabelContainer: { justifyContent: 'center' },
|
|
248
248
|
wrappingLabel: { width: 0, flex: 1 }
|
|
249
249
|
})
|
|
@@ -146,7 +146,11 @@ const ToggleSwitch = React.forwardRef(
|
|
|
146
146
|
<StackView
|
|
147
147
|
space={themeTokens.space}
|
|
148
148
|
direction={togglePosition === 'start' ? 'row-reverse' : 'row'}
|
|
149
|
-
tokens={{
|
|
149
|
+
tokens={{
|
|
150
|
+
alignItems: 'center',
|
|
151
|
+
justifyContent: themeTokens.containerWidth ? 'space-between' : 'start',
|
|
152
|
+
width: themeTokens.containerWidth
|
|
153
|
+
}}
|
|
150
154
|
>
|
|
151
155
|
{Boolean(label) && (
|
|
152
156
|
<View style={[selectLabelStyles(themeTokens), staticStyles.containText]}>
|
package/src/index.js
CHANGED
|
@@ -21,6 +21,7 @@ export { default as ExpandCollapse, Accordion } from './ExpandCollapse'
|
|
|
21
21
|
export { default as ExpandCollapseMini } from './ExpandCollapseMini'
|
|
22
22
|
export { default as Feedback } from './Feedback'
|
|
23
23
|
export { default as Fieldset } from './Fieldset'
|
|
24
|
+
export * from './FlexGrid'
|
|
24
25
|
export { default as FlexGrid } from './FlexGrid'
|
|
25
26
|
export { default as Footnote } from './Footnote'
|
|
26
27
|
export {
|
|
@@ -37,7 +38,7 @@ export { default as List, ListItem, ListBase } from './List'
|
|
|
37
38
|
export { default as Modal } from './Modal'
|
|
38
39
|
export { default as MultiSelectFilter } from './MultiSelectFilter'
|
|
39
40
|
export { default as Notification } from './Notification'
|
|
40
|
-
export { default as OrderedList } from './OrderedList'
|
|
41
|
+
export { default as OrderedList, OrderedListItem } from './OrderedList'
|
|
41
42
|
export { default as Pagination } from './Pagination'
|
|
42
43
|
export { default as PriceLockup } from './PriceLockup'
|
|
43
44
|
export { default as ProductCard } from './ProductCard'
|
package/types/Checkbox.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ type CheckboxProps = {
|
|
|
9
9
|
id?: string
|
|
10
10
|
inactive?: boolean
|
|
11
11
|
label?: string
|
|
12
|
+
description?: string
|
|
12
13
|
name?: string
|
|
13
14
|
onChange?: (value: boolean, event: any) => void
|
|
14
15
|
tokens?: Tokens
|
|
@@ -44,4 +45,10 @@ type CheckboxTokens = {
|
|
|
44
45
|
labelFontWeight?: number
|
|
45
46
|
labelLineHeight?: number
|
|
46
47
|
labelMarginLeft?: number
|
|
48
|
+
descriptionFontName?: string
|
|
49
|
+
descriptionFontSize?: number
|
|
50
|
+
descriptionFontWeight?: number
|
|
51
|
+
descriptionLineHeight?: number
|
|
52
|
+
descriptionMarginLeft?: number
|
|
53
|
+
descriptionFontColor?: string
|
|
47
54
|
}
|