@telus-uds/components-base 1.42.0 → 1.44.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 +23 -2
- package/README.md +35 -0
- package/component-docs.json +1 -0
- package/lib/Link/LinkBase.js +3 -1
- package/lib/List/ListItemBase.js +4 -3
- package/lib-module/Link/LinkBase.js +3 -1
- package/lib-module/List/ListItemBase.js +4 -3
- package/package.json +5 -5
- package/src/Link/LinkBase.jsx +4 -2
- package/src/List/ListItemBase.jsx +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-base
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 24 May 2023 23:40:09 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.44.0
|
|
8
|
+
|
|
9
|
+
Wed, 24 May 2023 23:40:09 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- alignSelf works for stackview links bug fix (akshay.pandey1@telus.com)
|
|
14
|
+
- Bump @telus-uds/system-theme-tokens to v2.27.0
|
|
15
|
+
|
|
16
|
+
## 1.43.0
|
|
17
|
+
|
|
18
|
+
Wed, 24 May 2023 01:43:02 GMT
|
|
19
|
+
|
|
20
|
+
### Minor changes
|
|
21
|
+
|
|
22
|
+
- installation, usage and license update in readme.md (srikanthkhari@gmail.com)
|
|
23
|
+
- fix: list (samuraix221@hotmail.com)
|
|
24
|
+
- Bump @telus-uds/system-constants to v1.2.1
|
|
25
|
+
- Bump @telus-uds/system-theme-tokens to v2.26.1
|
|
26
|
+
- Bump @telus-uds/browserslist-config to v1.0.5
|
|
27
|
+
|
|
7
28
|
## 1.42.0
|
|
8
29
|
|
|
9
|
-
Fri, 19 May 2023 04:
|
|
30
|
+
Fri, 19 May 2023 04:57:25 GMT
|
|
10
31
|
|
|
11
32
|
### Minor changes
|
|
12
33
|
|
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
package/lib/Link/LinkBase.js
CHANGED
|
@@ -101,12 +101,14 @@ const selectDecorationStyles = _ref4 => {
|
|
|
101
101
|
let {
|
|
102
102
|
color,
|
|
103
103
|
textLine,
|
|
104
|
-
textLineStyle
|
|
104
|
+
textLineStyle,
|
|
105
|
+
alignSelf
|
|
105
106
|
} = _ref4;
|
|
106
107
|
return {
|
|
107
108
|
color,
|
|
108
109
|
textDecorationLine: textLine,
|
|
109
110
|
textDecorationStyle: textLineStyle,
|
|
111
|
+
alignSelf,
|
|
110
112
|
..._Platform.default.select({
|
|
111
113
|
web: {
|
|
112
114
|
// 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
|
|
|
@@ -76,12 +76,14 @@ const selectDecorationStyles = _ref4 => {
|
|
|
76
76
|
let {
|
|
77
77
|
color,
|
|
78
78
|
textLine,
|
|
79
|
-
textLineStyle
|
|
79
|
+
textLineStyle,
|
|
80
|
+
alignSelf
|
|
80
81
|
} = _ref4;
|
|
81
82
|
return {
|
|
82
83
|
color,
|
|
83
84
|
textDecorationLine: textLine,
|
|
84
85
|
textDecorationStyle: textLineStyle,
|
|
86
|
+
alignSelf,
|
|
85
87
|
...Platform.select({
|
|
86
88
|
web: {
|
|
87
89
|
// 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.
|
|
13
|
+
"@telus-uds/system-constants": "^1.2.1",
|
|
14
|
+
"@telus-uds/system-theme-tokens": "^2.27.0",
|
|
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.44.0"
|
|
76
76
|
}
|
package/src/Link/LinkBase.jsx
CHANGED
|
@@ -67,10 +67,11 @@ const selectBlockStyles = (
|
|
|
67
67
|
themeOptions
|
|
68
68
|
})
|
|
69
69
|
|
|
70
|
-
const selectDecorationStyles = ({ color, textLine, textLineStyle }) => ({
|
|
70
|
+
const selectDecorationStyles = ({ color, textLine, textLineStyle, alignSelf }) => ({
|
|
71
71
|
color,
|
|
72
72
|
textDecorationLine: textLine,
|
|
73
73
|
textDecorationStyle: textLineStyle,
|
|
74
|
+
alignSelf,
|
|
74
75
|
...Platform.select({
|
|
75
76
|
web: {
|
|
76
77
|
// TODO: https://github.com/telus/universal-design-system/issues/487
|
|
@@ -147,7 +148,8 @@ const LinkBase = forwardRef(
|
|
|
147
148
|
return (
|
|
148
149
|
<InlinePressable
|
|
149
150
|
{...selectedProps}
|
|
150
|
-
inlineFlex={hasIcon}
|
|
151
|
+
inlineFlex={hasIcon}
|
|
152
|
+
// assuming links without icons should be inline (even if they are long)
|
|
151
153
|
ref={ref}
|
|
152
154
|
style={(linkState) => {
|
|
153
155
|
const themeTokens = resolveLinkTokens(linkState)
|
|
@@ -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 = {
|