@telus-uds/components-base 1.41.0 → 1.43.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 +22 -2
- package/README.md +35 -0
- package/component-docs.json +9 -1
- package/lib/Button/ButtonBase.js +2 -1
- package/lib/List/ListItemBase.js +4 -3
- package/lib/StackView/StackView.js +1 -1
- package/lib-module/Button/ButtonBase.js +2 -1
- package/lib-module/List/ListItemBase.js +4 -3
- package/lib-module/StackView/StackView.js +1 -1
- package/package.json +5 -5
- package/src/Button/ButtonBase.jsx +2 -1
- package/src/List/ListItemBase.jsx +3 -3
- package/src/StackView/StackView.jsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-base
|
|
2
2
|
|
|
3
|
-
This log was last generated on Wed,
|
|
3
|
+
This log was last generated on Wed, 24 May 2023 01:36:34 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.43.0
|
|
8
|
+
|
|
9
|
+
Wed, 24 May 2023 01:36:34 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- installation, usage and license update in readme.md (srikanthkhari@gmail.com)
|
|
14
|
+
- fix: list (samuraix221@hotmail.com)
|
|
15
|
+
- Bump @telus-uds/system-constants to v1.2.1
|
|
16
|
+
- Bump @telus-uds/system-theme-tokens to v2.26.1
|
|
17
|
+
- Bump @telus-uds/browserslist-config to v1.0.5
|
|
18
|
+
|
|
19
|
+
## 1.42.0
|
|
20
|
+
|
|
21
|
+
Fri, 19 May 2023 04:57:25 GMT
|
|
22
|
+
|
|
23
|
+
### Minor changes
|
|
24
|
+
|
|
25
|
+
- update default space value for stackview component (evander.owusu@telus.com)
|
|
26
|
+
|
|
7
27
|
## 1.41.0
|
|
8
28
|
|
|
9
|
-
Wed, 17 May 2023 00:
|
|
29
|
+
Wed, 17 May 2023 00:20:05 GMT
|
|
10
30
|
|
|
11
31
|
### Minor changes
|
|
12
32
|
|
package/README.md
CHANGED
|
@@ -3,3 +3,38 @@
|
|
|
3
3
|
The UDS base components are a set of low level react-native components themed by UDS themes.
|
|
4
4
|
|
|
5
5
|
Refer to the [UDS monorepo README](https://github.com/telus/universal-design-system/#readme) for details.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
|
|
11
|
+
npm install @telus-uds/components-base
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
To ensure proper functionality, it is important to install the brand palette and theme since the components package does not include a default theme. For example, you can install the Telus brand palette and theme by running the following command:
|
|
15
|
+
|
|
16
|
+
```javascript
|
|
17
|
+
|
|
18
|
+
npm install @telus-uds/palette-allium @telus-uds/theme-allium
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
This will provide the necessary components, along with the corresponding palette and theme, for your project.
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
1. Export component as a named export from root
|
|
26
|
+
2. Wrap the UDS component in an BaseProvider
|
|
27
|
+
3. Include the BaseProvider provider once at the root of your application (e.g. in App.jsx)
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
|
|
31
|
+
import { BaseProvider, Button } from '@telus-uds/components-base'
|
|
32
|
+
import alliumTheme from '@telus-uds/theme-allium'
|
|
33
|
+
...
|
|
34
|
+
<BaseProvider defaultTheme={alliumTheme}>
|
|
35
|
+
...
|
|
36
|
+
<Button onPress={() => {}}>Hello World!</Button>
|
|
37
|
+
...
|
|
38
|
+
</BaseProvider>
|
|
39
|
+
...
|
|
40
|
+
```
|
package/component-docs.json
CHANGED
|
@@ -190,9 +190,17 @@
|
|
|
190
190
|
"footnoteBodyPaddingRight": "size",
|
|
191
191
|
"footnoteBodyPaddingTop": "size",
|
|
192
192
|
"footnoteBodyPaddingBottom": "size",
|
|
193
|
+
"footnoteHeaderPaddingLeft": "size",
|
|
194
|
+
"footnoteHeaderPaddingRight": "size",
|
|
195
|
+
"footnoteHeaderPaddingTop": "size",
|
|
196
|
+
"footnoteHeaderPaddingBottom": "size",
|
|
193
197
|
"listPaddingLeft": "size",
|
|
194
198
|
"listItemMarkerFontSize": "size",
|
|
195
199
|
"listItemMarkerLineHeight": "lineHeight",
|
|
200
|
+
"headerLineHeight": "size",
|
|
201
|
+
"headerFontSize": "size",
|
|
202
|
+
"headerFontName": "fontName",
|
|
203
|
+
"headerFontWeight": "fontWeight",
|
|
196
204
|
"listItemColor": "color",
|
|
197
205
|
"listItemFontSize": "size",
|
|
198
206
|
"listItemLineHeight": "lineHeight",
|
|
@@ -9253,7 +9261,7 @@
|
|
|
9253
9261
|
"props": {
|
|
9254
9262
|
"space": {
|
|
9255
9263
|
"defaultValue": {
|
|
9256
|
-
"value": "
|
|
9264
|
+
"value": "0",
|
|
9257
9265
|
"computed": false
|
|
9258
9266
|
},
|
|
9259
9267
|
"type": {
|
package/lib/Button/ButtonBase.js
CHANGED
|
@@ -345,7 +345,8 @@ ButtonBase.defaultProps = {
|
|
|
345
345
|
const staticStyles = _StyleSheet.default.create({
|
|
346
346
|
row: {
|
|
347
347
|
// Apply all button alignment horizontally; no vertical stacking within a button
|
|
348
|
-
flexDirection: 'row'
|
|
348
|
+
flexDirection: 'row',
|
|
349
|
+
justifyContent: 'center'
|
|
349
350
|
},
|
|
350
351
|
text: { ..._Platform.default.select({
|
|
351
352
|
// TODO: https://github.com/telus/universal-design-system/issues/487
|
package/lib/List/ListItemBase.js
CHANGED
|
@@ -110,8 +110,8 @@ const ListItemBase = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
110
110
|
isLastItem
|
|
111
111
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
|
|
112
112
|
style: [{
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
flex: 1,
|
|
114
|
+
flexDirection: 'row'
|
|
115
115
|
}, !title && {
|
|
116
116
|
alignItems: 'center'
|
|
117
117
|
}],
|
|
@@ -143,7 +143,8 @@ const staticStyles = _StyleSheet.default.create({
|
|
|
143
143
|
flexDirection: 'row'
|
|
144
144
|
},
|
|
145
145
|
titleAndContentContainer: {
|
|
146
|
-
flexDirection: 'column'
|
|
146
|
+
flexDirection: 'column',
|
|
147
|
+
flexShrink: 1
|
|
147
148
|
}
|
|
148
149
|
});
|
|
149
150
|
|
|
@@ -318,7 +318,8 @@ ButtonBase.defaultProps = {
|
|
|
318
318
|
const staticStyles = StyleSheet.create({
|
|
319
319
|
row: {
|
|
320
320
|
// Apply all button alignment horizontally; no vertical stacking within a button
|
|
321
|
-
flexDirection: 'row'
|
|
321
|
+
flexDirection: 'row',
|
|
322
|
+
justifyContent: 'center'
|
|
322
323
|
},
|
|
323
324
|
text: { ...Platform.select({
|
|
324
325
|
// TODO: https://github.com/telus/universal-design-system/issues/487
|
|
@@ -88,8 +88,8 @@ const ListItemBase = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
|
88
88
|
isLastItem
|
|
89
89
|
}) : /*#__PURE__*/_jsxs(View, {
|
|
90
90
|
style: [{
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
flex: 1,
|
|
92
|
+
flexDirection: 'row'
|
|
93
93
|
}, !title && {
|
|
94
94
|
alignItems: 'center'
|
|
95
95
|
}],
|
|
@@ -120,7 +120,8 @@ const staticStyles = StyleSheet.create({
|
|
|
120
120
|
flexDirection: 'row'
|
|
121
121
|
},
|
|
122
122
|
titleAndContentContainer: {
|
|
123
|
-
flexDirection: 'column'
|
|
123
|
+
flexDirection: 'column',
|
|
124
|
+
flexShrink: 1
|
|
124
125
|
}
|
|
125
126
|
});
|
|
126
127
|
ListItemBase.propTypes = { ...selectedSystemPropTypes,
|
package/package.json
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"@floating-ui/react-dom": "^1.0.1",
|
|
11
11
|
"@floating-ui/react-native": "^0.8.1",
|
|
12
12
|
"@gorhom/portal": "^1.0.14",
|
|
13
|
-
"@telus-uds/system-constants": "^1.2.
|
|
14
|
-
"@telus-uds/system-theme-tokens": "^2.26.
|
|
13
|
+
"@telus-uds/system-constants": "^1.2.1",
|
|
14
|
+
"@telus-uds/system-theme-tokens": "^2.26.1",
|
|
15
15
|
"airbnb-prop-types": "^2.16.0",
|
|
16
16
|
"lodash.debounce": "^4.0.8",
|
|
17
17
|
"lodash.merge": "^4.6.2",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"description": "Base components",
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@telus-uds/browserslist-config": "^1.0.
|
|
24
|
+
"@telus-uds/browserslist-config": "^1.0.5",
|
|
25
25
|
"@testing-library/jest-native": "^4.0.1",
|
|
26
26
|
"@testing-library/react": "^13.3.0",
|
|
27
27
|
"@testing-library/react-hooks": "~7.0.1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"keywords": [
|
|
40
40
|
"base"
|
|
41
41
|
],
|
|
42
|
-
"license": "
|
|
42
|
+
"license": "MIT",
|
|
43
43
|
"main": "lib/index.js",
|
|
44
44
|
"module": "lib-module/index.js",
|
|
45
45
|
"name": "@telus-uds/components-base",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"standard-engine": {
|
|
73
73
|
"skip": true
|
|
74
74
|
},
|
|
75
|
-
"version": "1.
|
|
75
|
+
"version": "1.43.0"
|
|
76
76
|
}
|
|
@@ -285,7 +285,8 @@ ButtonBase.defaultProps = { id: undefined }
|
|
|
285
285
|
const staticStyles = StyleSheet.create({
|
|
286
286
|
row: {
|
|
287
287
|
// Apply all button alignment horizontally; no vertical stacking within a button
|
|
288
|
-
flexDirection: 'row'
|
|
288
|
+
flexDirection: 'row',
|
|
289
|
+
justifyContent: 'center'
|
|
289
290
|
},
|
|
290
291
|
text: {
|
|
291
292
|
...Platform.select({
|
|
@@ -74,8 +74,8 @@ const ListItemBase = forwardRef(
|
|
|
74
74
|
<View
|
|
75
75
|
style={[
|
|
76
76
|
{
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
flex: 1,
|
|
78
|
+
flexDirection: 'row'
|
|
79
79
|
},
|
|
80
80
|
!title && { alignItems: 'center' }
|
|
81
81
|
]}
|
|
@@ -99,7 +99,7 @@ const staticStyles = StyleSheet.create({
|
|
|
99
99
|
itemContainer: {
|
|
100
100
|
flexDirection: 'row'
|
|
101
101
|
},
|
|
102
|
-
titleAndContentContainer: { flexDirection: 'column' }
|
|
102
|
+
titleAndContentContainer: { flexDirection: 'column', flexShrink: 1 }
|
|
103
103
|
})
|
|
104
104
|
|
|
105
105
|
ListItemBase.propTypes = {
|