@telus-uds/components-base 1.3.1 → 1.6.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/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-lint.log +13 -0
- package/CHANGELOG.json +142 -1
- package/CHANGELOG.md +51 -2
- package/__tests__/FlexGrid/Row.test.jsx +100 -25
- package/__tests__/utils/containUniqueFields.test.js +25 -0
- package/component-docs.json +50 -15
- package/lib/Button/ButtonBase.js +1 -1
- package/lib/Button/ButtonGroup.js +20 -12
- package/lib/Card/PressableCardBase.js +1 -1
- package/lib/Checkbox/Checkbox.js +27 -16
- package/lib/Checkbox/CheckboxGroup.js +19 -5
- package/lib/ExpandCollapse/Panel.js +10 -10
- package/lib/FlexGrid/Col/Col.js +13 -3
- package/lib/FlexGrid/Row/Row.js +8 -2
- package/lib/HorizontalScroll/HorizontalScroll.js +0 -1
- package/lib/HorizontalScroll/HorizontalScrollButton.js +23 -49
- package/lib/InputLabel/InputLabel.js +27 -25
- package/lib/Link/LinkBase.js +19 -6
- package/lib/Modal/Modal.js +18 -18
- package/lib/Notification/Notification.js +5 -6
- package/lib/Radio/Radio.js +23 -12
- package/lib/Radio/RadioGroup.js +12 -3
- package/lib/RadioCard/RadioCard.js +1 -1
- package/lib/RadioCard/RadioCardGroup.js +11 -2
- package/lib/Select/Select.js +2 -3
- package/lib/Tags/Tags.js +23 -17
- package/lib/TextInput/TextArea.js +2 -2
- package/lib/TextInput/TextInput.js +12 -2
- package/lib/TextInput/TextInputBase.js +1 -1
- package/lib/TextInput/propTypes.js +8 -1
- package/lib/ToggleSwitch/ToggleSwitch.js +5 -2
- package/lib/ToggleSwitch/ToggleSwitchGroup.js +20 -12
- package/lib/utils/containUniqueFields.js +34 -0
- package/lib/utils/index.js +10 -1
- package/lib/utils/props/handlerProps.js +72 -0
- package/lib/utils/props/index.js +14 -0
- package/lib/utils/props/inputSupportsProps.js +3 -5
- package/lib-module/Button/ButtonBase.js +2 -2
- package/lib-module/Button/ButtonGroup.js +15 -6
- package/lib-module/Card/PressableCardBase.js +2 -2
- package/lib-module/Checkbox/Checkbox.js +28 -17
- package/lib-module/Checkbox/CheckboxGroup.js +20 -7
- package/lib-module/ExpandCollapse/Panel.js +10 -10
- package/lib-module/FlexGrid/Col/Col.js +13 -3
- package/lib-module/FlexGrid/Row/Row.js +8 -2
- package/lib-module/HorizontalScroll/HorizontalScroll.js +0 -1
- package/lib-module/HorizontalScroll/HorizontalScrollButton.js +24 -49
- package/lib-module/InputLabel/InputLabel.js +28 -25
- package/lib-module/Link/LinkBase.js +19 -6
- package/lib-module/Modal/Modal.js +19 -19
- package/lib-module/Notification/Notification.js +6 -6
- package/lib-module/Radio/Radio.js +24 -13
- package/lib-module/Radio/RadioGroup.js +13 -4
- package/lib-module/RadioCard/RadioCard.js +2 -2
- package/lib-module/RadioCard/RadioCardGroup.js +12 -3
- package/lib-module/Select/Select.js +2 -3
- package/lib-module/Tags/Tags.js +18 -11
- package/lib-module/TextInput/TextArea.js +3 -3
- package/lib-module/TextInput/TextInput.js +11 -3
- package/lib-module/TextInput/TextInputBase.js +2 -2
- package/lib-module/TextInput/propTypes.js +7 -1
- package/lib-module/ToggleSwitch/ToggleSwitch.js +6 -3
- package/lib-module/ToggleSwitch/ToggleSwitchGroup.js +15 -6
- package/lib-module/utils/containUniqueFields.js +26 -0
- package/lib-module/utils/index.js +2 -1
- package/lib-module/utils/props/handlerProps.js +59 -0
- package/lib-module/utils/props/index.js +1 -0
- package/lib-module/utils/props/inputSupportsProps.js +3 -5
- package/package.json +5 -5
- package/src/Button/ButtonBase.jsx +8 -2
- package/src/Button/ButtonGroup.jsx +51 -34
- package/src/Card/PressableCardBase.jsx +6 -1
- package/src/Checkbox/Checkbox.jsx +35 -23
- package/src/Checkbox/CheckboxGroup.jsx +52 -22
- package/src/ExpandCollapse/Panel.jsx +9 -9
- package/src/FlexGrid/Col/Col.jsx +11 -2
- package/src/FlexGrid/Row/Row.jsx +8 -2
- package/src/HorizontalScroll/HorizontalScroll.jsx +1 -1
- package/src/HorizontalScroll/HorizontalScrollButton.jsx +21 -58
- package/src/InputLabel/InputLabel.jsx +36 -27
- package/src/Link/LinkBase.jsx +20 -4
- package/src/Modal/Modal.jsx +30 -26
- package/src/Notification/Notification.jsx +7 -4
- package/src/Radio/Radio.jsx +26 -14
- package/src/Radio/RadioGroup.jsx +39 -21
- package/src/RadioCard/RadioCard.jsx +6 -1
- package/src/RadioCard/RadioCardGroup.jsx +17 -1
- package/src/Select/Select.jsx +2 -2
- package/src/Tags/Tags.jsx +23 -9
- package/src/TextInput/TextArea.jsx +5 -1
- package/src/TextInput/TextInput.jsx +13 -3
- package/src/TextInput/TextInputBase.jsx +6 -1
- package/src/TextInput/propTypes.js +7 -1
- package/src/ToggleSwitch/ToggleSwitch.jsx +11 -2
- package/src/ToggleSwitch/ToggleSwitchGroup.jsx +19 -6
- package/src/utils/containUniqueFields.js +32 -0
- package/src/utils/index.js +1 -0
- package/src/utils/props/handlerProps.js +47 -0
- package/src/utils/props/index.js +1 -0
- package/src/utils/props/inputSupportsProps.js +3 -4
- package/stories/InputLabel/InputLabel.stories.jsx +25 -28
- package/stories/Modal/Modal.stories.jsx +25 -0
- package/stories/Search/Search.stories.jsx +4 -1
- package/stories/TextInput/TextInput.stories.jsx +40 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
@telus-uds/components-base:build:
|
|
2
|
-
@telus-uds/components-base:build: [2K[1G[2m$ yarn build:code && yarn build:docs[22m
|
|
3
|
-
@telus-uds/components-base:build: [2K[1G[2m$ yarn build:main && yarn build:module[22m
|
|
4
|
-
@telus-uds/components-base:build: [2K[1G[2m$ babel src -d lib[22m
|
|
5
|
-
@telus-uds/components-base:build:
|
|
6
|
-
@telus-uds/components-base:build: [2K[1G[2m$ babel src -d lib-module --env-name module[22m
|
|
7
|
-
@telus-uds/components-base:build:
|
|
8
|
-
@telus-uds/components-base:build: [2K[1G[2m$ babel-node --plugins
|
|
1
|
+
[35m@telus-uds/components-base:build: [0mcache hit, replaying output [2md1359cc1069914c5[0m
|
|
2
|
+
[35m@telus-uds/components-base:build: [0m[2K[1G[2m$ yarn build:code && yarn build:docs[22m
|
|
3
|
+
[35m@telus-uds/components-base:build: [0m[2K[1G[2m$ yarn build:main && yarn build:module[22m
|
|
4
|
+
[35m@telus-uds/components-base:build: [0m[2K[1G[2m$ babel src -d lib[22m
|
|
5
|
+
[35m@telus-uds/components-base:build: [0mSuccessfully compiled 217 files with Babel (8026ms).
|
|
6
|
+
[35m@telus-uds/components-base:build: [0m[2K[1G[2m$ babel src -d lib-module --env-name module[22m
|
|
7
|
+
[35m@telus-uds/components-base:build: [0mSuccessfully compiled 217 files with Babel (5098ms).
|
|
8
|
+
[35m@telus-uds/components-base:build: [0m[2K[1G[2m$ babel-node --plugins=@nearform/babel-plugin-react-docgen generate-component-docs.js[22m
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[36m@telus-uds/components-base:lint: [0mcache hit, replaying output [2m946abc71241dcfa6[0m
|
|
2
|
+
[36m@telus-uds/components-base:lint: [0m[2K[1G[2m$ yarn --cwd ../.. lint:path --color packages/components-base[22m
|
|
3
|
+
[36m@telus-uds/components-base:lint: [0m[2K[1G[2m$ eslint --ignore-path .gitignore --ext .js,.jsx,.mjs,.cjs --color packages/components-base[22m
|
|
4
|
+
[36m@telus-uds/components-base:lint: [0m[0m[0m
|
|
5
|
+
[36m@telus-uds/components-base:lint: [0m[0m[4m/home/runner/work/universal-design-system/universal-design-system/packages/components-base/__tests__/FlexGrid/Col.test.jsx[24m[0m
|
|
6
|
+
[36m@telus-uds/components-base:lint: [0m[0m [2m51:71[22m [33mwarning[39m Expect must have a corresponding matcher call [2mjest/valid-expect[22m[0m
|
|
7
|
+
[36m@telus-uds/components-base:lint: [0m[0m [2m106:71[22m [33mwarning[39m Expect must have a corresponding matcher call [2mjest/valid-expect[22m[0m
|
|
8
|
+
[36m@telus-uds/components-base:lint: [0m[0m [2m155:63[22m [33mwarning[39m Expect must have a corresponding matcher call [2mjest/valid-expect[22m[0m
|
|
9
|
+
[36m@telus-uds/components-base:lint: [0m[0m [2m200:71[22m [33mwarning[39m Expect must have a corresponding matcher call [2mjest/valid-expect[22m[0m
|
|
10
|
+
[36m@telus-uds/components-base:lint: [0m[0m [2m248:71[22m [33mwarning[39m Expect must have a corresponding matcher call [2mjest/valid-expect[22m[0m
|
|
11
|
+
[36m@telus-uds/components-base:lint: [0m[0m[0m
|
|
12
|
+
[36m@telus-uds/components-base:lint: [0m[0m[33m[1m✖ 5 problems (0 errors, 5 warnings)[22m[39m[0m
|
|
13
|
+
[36m@telus-uds/components-base:lint: [0m[0m[33m[1m[22m[39m[0m
|
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,148 @@
|
|
|
2
2
|
"name": "@telus-uds/components-base",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 28 Apr 2022 15:40:15 GMT",
|
|
6
|
+
"tag": "@telus-uds/components-base_v1.6.0",
|
|
7
|
+
"version": "1.6.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "shahzaibkhalidmalik@outlook.com",
|
|
12
|
+
"package": "@telus-uds/components-base",
|
|
13
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5",
|
|
14
|
+
"comment": "Add `pattern` prop for `TextInput` (web)"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "ruslan.bredikhin@nearform.com",
|
|
18
|
+
"package": "@telus-uds/components-base",
|
|
19
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5",
|
|
20
|
+
"comment": "feat: add unique ids validation to the group components"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "eugene@michasiw.com",
|
|
24
|
+
"package": "@telus-uds/components-base",
|
|
25
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5",
|
|
26
|
+
"comment": "use IconButton for modal close"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "alan.slater@nearform.com",
|
|
30
|
+
"package": "@telus-uds/components-base",
|
|
31
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5",
|
|
32
|
+
"comment": "Add flex prop to FlexGrid.Col"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "ruslan.bredikhin@nearform.com",
|
|
36
|
+
"package": "@telus-uds/components-base",
|
|
37
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5",
|
|
38
|
+
"comment": "feat: add handler props whitelisting to the input components"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@telus-uds/components-base",
|
|
43
|
+
"comment": "Bump @telus-uds/system-theme-tokens to v1.5.0",
|
|
44
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"patch": [
|
|
48
|
+
{
|
|
49
|
+
"author": "alan.slater@nearform.com",
|
|
50
|
+
"package": "@telus-uds/components-base",
|
|
51
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5",
|
|
52
|
+
"comment": "V-align Checkbox/Radio with label first line"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"author": "shahzaibkhalidmalik@outlook.com",
|
|
56
|
+
"package": "@telus-uds/components-base",
|
|
57
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5",
|
|
58
|
+
"comment": "Fix ExpandCollapse unable to response to window resize"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"author": "ruslan.bredikhin@nearform.com",
|
|
62
|
+
"package": "@telus-uds/components-base",
|
|
63
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5",
|
|
64
|
+
"comment": "fix: move link underline to the inline pressable becoming the anchor tag on web"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"author": "shahzaibkhalidmalik@outlook.com",
|
|
68
|
+
"package": "@telus-uds/components-base",
|
|
69
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5",
|
|
70
|
+
"comment": "Fix scenario where `reverse` props might not work when elements wrap"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"author": "alan.slater@nearform.com",
|
|
74
|
+
"package": "@telus-uds/components-base",
|
|
75
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5",
|
|
76
|
+
"comment": "Fix input label text wrap"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"author": "alan.slater@nearform.com",
|
|
80
|
+
"package": "@telus-uds/components-base",
|
|
81
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5",
|
|
82
|
+
"comment": "fix Select validation icons"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"none": [
|
|
86
|
+
{
|
|
87
|
+
"author": "simon.lawrence@nearform.com",
|
|
88
|
+
"package": "@telus-uds/components-base",
|
|
89
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5",
|
|
90
|
+
"comment": "update babel plugin used for docs generation to maintained fork"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"author": "cody.zuschlag@nearform.com",
|
|
94
|
+
"package": "@telus-uds/components-base",
|
|
95
|
+
"commit": "3db648cd2964f06f91e5d34140cb9f44ede740d5",
|
|
96
|
+
"comment": "improve linting"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"date": "Thu, 07 Apr 2022 20:33:56 GMT",
|
|
103
|
+
"tag": "@telus-uds/components-base_v1.5.0",
|
|
104
|
+
"version": "1.5.0",
|
|
105
|
+
"comments": {
|
|
106
|
+
"minor": [
|
|
107
|
+
{
|
|
108
|
+
"author": "ruslan.bredikhin@nearform.com",
|
|
109
|
+
"package": "@telus-uds/components-base",
|
|
110
|
+
"commit": "63472330f9144ba99c34c7524dcc2d2f4f716e69",
|
|
111
|
+
"comment": "extend HorizontalScrollButton via IconButton"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"author": "beachball",
|
|
115
|
+
"package": "@telus-uds/components-base",
|
|
116
|
+
"comment": "Bump @telus-uds/system-theme-tokens to v1.4.0",
|
|
117
|
+
"commit": "63472330f9144ba99c34c7524dcc2d2f4f716e69"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"date": "Fri, 01 Apr 2022 14:15:21 GMT",
|
|
124
|
+
"tag": "@telus-uds/components-base_v1.4.0",
|
|
125
|
+
"version": "1.4.0",
|
|
126
|
+
"comments": {
|
|
127
|
+
"patch": [
|
|
128
|
+
{
|
|
129
|
+
"author": "simon.lawrence@nearform.com",
|
|
130
|
+
"package": "@telus-uds/components-base",
|
|
131
|
+
"commit": "05e43b4642997ec461094b5d8a439bfef1abaab8",
|
|
132
|
+
"comment": "Refactor children wrapping in the notifications"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"minor": [
|
|
136
|
+
{
|
|
137
|
+
"author": "beachball",
|
|
138
|
+
"package": "@telus-uds/components-base",
|
|
139
|
+
"comment": "Bump @telus-uds/system-theme-tokens to v1.3.0",
|
|
140
|
+
"commit": "05e43b4642997ec461094b5d8a439bfef1abaab8"
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"date": "Wed, 30 Mar 2022 09:49:18 GMT",
|
|
6
147
|
"tag": "@telus-uds/components-base_v1.3.1",
|
|
7
148
|
"version": "1.3.1",
|
|
8
149
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,55 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-base
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 28 Apr 2022 15:40:15 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.6.0
|
|
8
|
+
|
|
9
|
+
Thu, 28 Apr 2022 15:40:15 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Add `pattern` prop for `TextInput` (web) (shahzaibkhalidmalik@outlook.com)
|
|
14
|
+
- feat: add unique ids validation to the group components (ruslan.bredikhin@nearform.com)
|
|
15
|
+
- use IconButton for modal close (eugene@michasiw.com)
|
|
16
|
+
- Add flex prop to FlexGrid.Col (alan.slater@nearform.com)
|
|
17
|
+
- feat: add handler props whitelisting to the input components (ruslan.bredikhin@nearform.com)
|
|
18
|
+
- Bump @telus-uds/system-theme-tokens to v1.5.0
|
|
19
|
+
|
|
20
|
+
### Patches
|
|
21
|
+
|
|
22
|
+
- V-align Checkbox/Radio with label first line (alan.slater@nearform.com)
|
|
23
|
+
- Fix ExpandCollapse unable to response to window resize (shahzaibkhalidmalik@outlook.com)
|
|
24
|
+
- fix: move link underline to the inline pressable becoming the anchor tag on web (ruslan.bredikhin@nearform.com)
|
|
25
|
+
- Fix scenario where `reverse` props might not work when elements wrap (shahzaibkhalidmalik@outlook.com)
|
|
26
|
+
- Fix input label text wrap (alan.slater@nearform.com)
|
|
27
|
+
- fix Select validation icons (alan.slater@nearform.com)
|
|
28
|
+
|
|
29
|
+
## 1.5.0
|
|
30
|
+
|
|
31
|
+
Thu, 07 Apr 2022 20:33:56 GMT
|
|
32
|
+
|
|
33
|
+
### Minor changes
|
|
34
|
+
|
|
35
|
+
- extend HorizontalScrollButton via IconButton (ruslan.bredikhin@nearform.com)
|
|
36
|
+
- Bump @telus-uds/system-theme-tokens to v1.4.0
|
|
37
|
+
|
|
38
|
+
## 1.4.0
|
|
39
|
+
|
|
40
|
+
Fri, 01 Apr 2022 14:15:21 GMT
|
|
41
|
+
|
|
42
|
+
### Minor changes
|
|
43
|
+
|
|
44
|
+
- Bump @telus-uds/system-theme-tokens to v1.3.0
|
|
45
|
+
|
|
46
|
+
### Patches
|
|
47
|
+
|
|
48
|
+
- Refactor children wrapping in the notifications (simon.lawrence@nearform.com)
|
|
49
|
+
|
|
7
50
|
## 1.3.1
|
|
8
51
|
|
|
9
|
-
Wed, 30 Mar 2022 09:49:
|
|
52
|
+
Wed, 30 Mar 2022 09:49:18 GMT
|
|
10
53
|
|
|
11
54
|
### Patches
|
|
12
55
|
|
|
@@ -14,6 +57,12 @@ Wed, 30 Mar 2022 09:49:08 GMT
|
|
|
14
57
|
- Bump @telus-uds/system-constants to v1.0.2
|
|
15
58
|
- Bump @telus-uds/system-theme-tokens to v1.2.2
|
|
16
59
|
- Bump @telus-uds/browserslist-config to v1.0.1
|
|
60
|
+
- Export viewport context
|
|
61
|
+
- Unify system props handling
|
|
62
|
+
- Reduced motion support for ActivityIndicator component
|
|
63
|
+
- Include FootnoteLink in list of wrappable children
|
|
64
|
+
- Add a module build target
|
|
65
|
+
- Add SSR util functions
|
|
17
66
|
|
|
18
67
|
## [1.3.0](https://github.com/telus/universal-design-system/compare/@telus-uds/components-base/v1.2.0...@telus-uds/components-base/v1.3.0) (2022-03-21)
|
|
19
68
|
|
|
@@ -151,48 +151,123 @@ describe('FlexGrid Row', () => {
|
|
|
151
151
|
|
|
152
152
|
it('applies correct row order for each reverse prop at viewport "xs"', () => {
|
|
153
153
|
const { getByText } = renderEachReverseProp('xs')
|
|
154
|
-
expect(getByText('xs--xsReverse').parent).toHaveStyle({
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
expect(getByText('xs--
|
|
154
|
+
expect(getByText('xs--xsReverse').parent).toHaveStyle({
|
|
155
|
+
flexDirection: 'row-reverse',
|
|
156
|
+
flexWrap: 'wrap-reverse'
|
|
157
|
+
})
|
|
158
|
+
expect(getByText('xs--smReverse').parent).toHaveStyle({
|
|
159
|
+
flexDirection: 'row',
|
|
160
|
+
flexWrap: 'wrap'
|
|
161
|
+
})
|
|
162
|
+
expect(getByText('xs--mdReverse').parent).toHaveStyle({
|
|
163
|
+
flexDirection: 'row',
|
|
164
|
+
flexWrap: 'wrap'
|
|
165
|
+
})
|
|
166
|
+
expect(getByText('xs--lgReverse').parent).toHaveStyle({
|
|
167
|
+
flexDirection: 'row',
|
|
168
|
+
flexWrap: 'wrap'
|
|
169
|
+
})
|
|
170
|
+
expect(getByText('xs--xlReverse').parent).toHaveStyle({
|
|
171
|
+
flexDirection: 'row',
|
|
172
|
+
flexWrap: 'wrap'
|
|
173
|
+
})
|
|
159
174
|
})
|
|
160
175
|
|
|
161
176
|
it('applies correct row order for each reverse prop at viewport "sm"', () => {
|
|
162
177
|
const { getByText } = renderEachReverseProp('sm')
|
|
163
|
-
expect(getByText('sm--xsReverse').parent).toHaveStyle({
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
expect(getByText('sm--
|
|
178
|
+
expect(getByText('sm--xsReverse').parent).toHaveStyle({
|
|
179
|
+
flexDirection: 'row-reverse',
|
|
180
|
+
flexWrap: 'wrap-reverse'
|
|
181
|
+
})
|
|
182
|
+
expect(getByText('sm--smReverse').parent).toHaveStyle({
|
|
183
|
+
flexDirection: 'row-reverse',
|
|
184
|
+
flexWrap: 'wrap-reverse'
|
|
185
|
+
})
|
|
186
|
+
expect(getByText('sm--mdReverse').parent).toHaveStyle({
|
|
187
|
+
flexDirection: 'row',
|
|
188
|
+
flexWrap: 'wrap'
|
|
189
|
+
})
|
|
190
|
+
expect(getByText('sm--lgReverse').parent).toHaveStyle({
|
|
191
|
+
flexDirection: 'row',
|
|
192
|
+
flexWrap: 'wrap'
|
|
193
|
+
})
|
|
194
|
+
expect(getByText('sm--xlReverse').parent).toHaveStyle({
|
|
195
|
+
flexDirection: 'row',
|
|
196
|
+
flexWrap: 'wrap'
|
|
197
|
+
})
|
|
168
198
|
})
|
|
169
199
|
|
|
170
200
|
it('applies correct row order for each reverse prop at viewport "md"', () => {
|
|
171
201
|
const { getByText } = renderEachReverseProp('md')
|
|
172
|
-
expect(getByText('md--xsReverse').parent).toHaveStyle({
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
expect(getByText('md--
|
|
202
|
+
expect(getByText('md--xsReverse').parent).toHaveStyle({
|
|
203
|
+
flexDirection: 'row-reverse',
|
|
204
|
+
flexWrap: 'wrap-reverse'
|
|
205
|
+
})
|
|
206
|
+
expect(getByText('md--smReverse').parent).toHaveStyle({
|
|
207
|
+
flexDirection: 'row-reverse',
|
|
208
|
+
flexWrap: 'wrap-reverse'
|
|
209
|
+
})
|
|
210
|
+
expect(getByText('md--mdReverse').parent).toHaveStyle({
|
|
211
|
+
flexDirection: 'row-reverse',
|
|
212
|
+
flexWrap: 'wrap-reverse'
|
|
213
|
+
})
|
|
214
|
+
expect(getByText('md--lgReverse').parent).toHaveStyle({
|
|
215
|
+
flexDirection: 'row',
|
|
216
|
+
flexWrap: 'wrap'
|
|
217
|
+
})
|
|
218
|
+
expect(getByText('md--xlReverse').parent).toHaveStyle({
|
|
219
|
+
flexDirection: 'row',
|
|
220
|
+
flexWrap: 'wrap'
|
|
221
|
+
})
|
|
177
222
|
})
|
|
178
223
|
|
|
179
224
|
it('applies correct row order for each reverse prop at viewport "lg"', () => {
|
|
180
225
|
const { getByText } = renderEachReverseProp('lg')
|
|
181
226
|
|
|
182
|
-
expect(getByText('lg--xsReverse').parent).toHaveStyle({
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
expect(getByText('lg--
|
|
227
|
+
expect(getByText('lg--xsReverse').parent).toHaveStyle({
|
|
228
|
+
flexDirection: 'row-reverse',
|
|
229
|
+
flexWrap: 'wrap-reverse'
|
|
230
|
+
})
|
|
231
|
+
expect(getByText('lg--smReverse').parent).toHaveStyle({
|
|
232
|
+
flexDirection: 'row-reverse',
|
|
233
|
+
flexWrap: 'wrap-reverse'
|
|
234
|
+
})
|
|
235
|
+
expect(getByText('lg--mdReverse').parent).toHaveStyle({
|
|
236
|
+
flexDirection: 'row-reverse',
|
|
237
|
+
flexWrap: 'wrap-reverse'
|
|
238
|
+
})
|
|
239
|
+
expect(getByText('lg--lgReverse').parent).toHaveStyle({
|
|
240
|
+
flexDirection: 'row-reverse',
|
|
241
|
+
flexWrap: 'wrap-reverse'
|
|
242
|
+
})
|
|
243
|
+
expect(getByText('lg--xlReverse').parent).toHaveStyle({
|
|
244
|
+
flexDirection: 'row',
|
|
245
|
+
flexWrap: 'wrap'
|
|
246
|
+
})
|
|
187
247
|
})
|
|
188
248
|
|
|
189
249
|
it('applies correct row order for each reverse prop at viewport "xl"', () => {
|
|
190
250
|
const { getByText } = renderEachReverseProp('xl')
|
|
191
251
|
|
|
192
|
-
expect(getByText('xl--xsReverse').parent).toHaveStyle({
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
expect(getByText('xl--
|
|
252
|
+
expect(getByText('xl--xsReverse').parent).toHaveStyle({
|
|
253
|
+
flexDirection: 'row-reverse',
|
|
254
|
+
flexWrap: 'wrap-reverse'
|
|
255
|
+
})
|
|
256
|
+
expect(getByText('xl--smReverse').parent).toHaveStyle({
|
|
257
|
+
flexDirection: 'row-reverse',
|
|
258
|
+
flexWrap: 'wrap-reverse'
|
|
259
|
+
})
|
|
260
|
+
expect(getByText('xl--mdReverse').parent).toHaveStyle({
|
|
261
|
+
flexDirection: 'row-reverse',
|
|
262
|
+
flexWrap: 'wrap-reverse'
|
|
263
|
+
})
|
|
264
|
+
expect(getByText('xl--lgReverse').parent).toHaveStyle({
|
|
265
|
+
flexDirection: 'row-reverse',
|
|
266
|
+
flexWrap: 'wrap-reverse'
|
|
267
|
+
})
|
|
268
|
+
expect(getByText('xl--xlReverse').parent).toHaveStyle({
|
|
269
|
+
flexDirection: 'row-reverse',
|
|
270
|
+
flexWrap: 'wrap-reverse'
|
|
271
|
+
})
|
|
197
272
|
})
|
|
198
273
|
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { containUniqueFields } from '../../src'
|
|
2
|
+
|
|
3
|
+
const unique = [
|
|
4
|
+
{ a: 1, b: 'B' },
|
|
5
|
+
{ a: 2, b: 'A' }
|
|
6
|
+
]
|
|
7
|
+
|
|
8
|
+
const notUnique = [
|
|
9
|
+
{ a: 1, b: 'B' },
|
|
10
|
+
{ a: 1, b: 'A' }
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
describe('containUniqueFields util', () => {
|
|
14
|
+
it('returns true if no specified fields have duplicates', () => {
|
|
15
|
+
expect(containUniqueFields(unique, ['a', 'b'])).toBe(true)
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('returns false if specified fields have duplicates', () => {
|
|
19
|
+
expect(containUniqueFields(notUnique, ['a'])).toBe(false)
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
it('returns false if fields have duplicates, but not the specified ones', () => {
|
|
23
|
+
expect(containUniqueFields(notUnique, ['b'])).toBe(true)
|
|
24
|
+
})
|
|
25
|
+
})
|
package/component-docs.json
CHANGED
|
@@ -110,7 +110,8 @@
|
|
|
110
110
|
"rightIcon": "icon",
|
|
111
111
|
"iconDisplace": "size",
|
|
112
112
|
"iconSize": "size",
|
|
113
|
-
"iconSpace": "integer"
|
|
113
|
+
"iconSpace": "integer",
|
|
114
|
+
"textLine": "textLine"
|
|
114
115
|
},
|
|
115
116
|
"CheckboxGroup": {
|
|
116
117
|
"space": "integer",
|
|
@@ -171,14 +172,20 @@
|
|
|
171
172
|
"iconGap": "size"
|
|
172
173
|
},
|
|
173
174
|
"HorizontalScrollButton": {
|
|
174
|
-
"borderRadius": "radius",
|
|
175
175
|
"backgroundColor": "color",
|
|
176
|
+
"borderRadius": "radius",
|
|
176
177
|
"borderColor": "color",
|
|
177
178
|
"borderWidth": "border",
|
|
178
|
-
"
|
|
179
|
-
"shadow": "shadow",
|
|
179
|
+
"iconColor": "color",
|
|
180
180
|
"iconSize": "size",
|
|
181
|
-
"
|
|
181
|
+
"iconScale": "iconScale",
|
|
182
|
+
"iconTranslateX": "size",
|
|
183
|
+
"iconTranslateY": "size",
|
|
184
|
+
"outerBorderWidth": "border",
|
|
185
|
+
"outerBorderColor": "color",
|
|
186
|
+
"outerBorderGap": "size",
|
|
187
|
+
"padding": "size",
|
|
188
|
+
"shadow": "shadow"
|
|
182
189
|
},
|
|
183
190
|
"Icon": {
|
|
184
191
|
"size": "size",
|
|
@@ -276,7 +283,8 @@
|
|
|
276
283
|
"paddingBottom": "size",
|
|
277
284
|
"closeIcon": "icon",
|
|
278
285
|
"closeIconColor": "color",
|
|
279
|
-
"closeIconSize": "size"
|
|
286
|
+
"closeIconSize": "size",
|
|
287
|
+
"closePadding": "size"
|
|
280
288
|
},
|
|
281
289
|
"Notification": {
|
|
282
290
|
"backgroundColor": "color",
|
|
@@ -3886,6 +3894,13 @@
|
|
|
3886
3894
|
},
|
|
3887
3895
|
"required": false,
|
|
3888
3896
|
"description": "Align content horizontally within the column.\n\nAccepts a `PropType.string` following the [responsive prop](#/Layout?id=responsive) structure."
|
|
3897
|
+
},
|
|
3898
|
+
"flex": {
|
|
3899
|
+
"type": {
|
|
3900
|
+
"name": "bool"
|
|
3901
|
+
},
|
|
3902
|
+
"required": false,
|
|
3903
|
+
"description": "(web only) Stretches the column to fill vertical space using `display: flex`.\nIn native apps, FlexGrid.Col behaves as if this is always true (as do all `View`s)."
|
|
3889
3904
|
}
|
|
3890
3905
|
},
|
|
3891
3906
|
"attributes": {
|
|
@@ -4750,7 +4765,8 @@
|
|
|
4750
4765
|
"paddingBottom": "size",
|
|
4751
4766
|
"closeIcon": "icon",
|
|
4752
4767
|
"closeIconColor": "color",
|
|
4753
|
-
"closeIconSize": "size"
|
|
4768
|
+
"closeIconSize": "size",
|
|
4769
|
+
"closePadding": "size"
|
|
4754
4770
|
}
|
|
4755
4771
|
},
|
|
4756
4772
|
"required": false,
|
|
@@ -4776,6 +4792,13 @@
|
|
|
4776
4792
|
},
|
|
4777
4793
|
"required": false,
|
|
4778
4794
|
"description": ""
|
|
4795
|
+
},
|
|
4796
|
+
"closeButton": {
|
|
4797
|
+
"type": {
|
|
4798
|
+
"name": "node"
|
|
4799
|
+
},
|
|
4800
|
+
"required": false,
|
|
4801
|
+
"description": "Pass a react node to override the default close button or pass `null` to hide the close button."
|
|
4779
4802
|
}
|
|
4780
4803
|
},
|
|
4781
4804
|
"attributes": {
|
|
@@ -6968,14 +6991,20 @@
|
|
|
6968
6991
|
"type": {
|
|
6969
6992
|
"name": "custom",
|
|
6970
6993
|
"raw": {
|
|
6971
|
-
"borderRadius": "radius",
|
|
6972
6994
|
"backgroundColor": "color",
|
|
6995
|
+
"borderRadius": "radius",
|
|
6973
6996
|
"borderColor": "color",
|
|
6974
6997
|
"borderWidth": "border",
|
|
6975
|
-
"
|
|
6976
|
-
"shadow": "shadow",
|
|
6998
|
+
"iconColor": "color",
|
|
6977
6999
|
"iconSize": "size",
|
|
6978
|
-
"
|
|
7000
|
+
"iconScale": "iconScale",
|
|
7001
|
+
"iconTranslateX": "size",
|
|
7002
|
+
"iconTranslateY": "size",
|
|
7003
|
+
"outerBorderWidth": "border",
|
|
7004
|
+
"outerBorderColor": "color",
|
|
7005
|
+
"outerBorderGap": "size",
|
|
7006
|
+
"padding": "size",
|
|
7007
|
+
"shadow": "shadow"
|
|
6979
7008
|
}
|
|
6980
7009
|
},
|
|
6981
7010
|
"required": false,
|
|
@@ -8277,14 +8306,20 @@
|
|
|
8277
8306
|
"type": {
|
|
8278
8307
|
"name": "custom",
|
|
8279
8308
|
"raw": {
|
|
8280
|
-
"borderRadius": "radius",
|
|
8281
8309
|
"backgroundColor": "color",
|
|
8310
|
+
"borderRadius": "radius",
|
|
8282
8311
|
"borderColor": "color",
|
|
8283
8312
|
"borderWidth": "border",
|
|
8284
|
-
"
|
|
8285
|
-
"shadow": "shadow",
|
|
8313
|
+
"iconColor": "color",
|
|
8286
8314
|
"iconSize": "size",
|
|
8287
|
-
"
|
|
8315
|
+
"iconScale": "iconScale",
|
|
8316
|
+
"iconTranslateX": "size",
|
|
8317
|
+
"iconTranslateY": "size",
|
|
8318
|
+
"outerBorderWidth": "border",
|
|
8319
|
+
"outerBorderColor": "color",
|
|
8320
|
+
"outerBorderGap": "size",
|
|
8321
|
+
"padding": "size",
|
|
8322
|
+
"shadow": "shadow"
|
|
8288
8323
|
}
|
|
8289
8324
|
},
|
|
8290
8325
|
"required": false,
|
package/lib/Button/ButtonBase.js
CHANGED
|
@@ -31,7 +31,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
31
31
|
|
|
32
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
33
|
|
|
34
|
-
const [selectProps, selectedSystemPropTypes] = (0, _utils2.selectSystemProps)([_utils2.a11yProps, _utils2.linkProps, _utils2.viewProps]);
|
|
34
|
+
const [selectProps, selectedSystemPropTypes] = (0, _utils2.selectSystemProps)([_utils2.a11yProps, _utils2.focusHandlerProps, _utils2.linkProps, _utils2.viewProps]);
|
|
35
35
|
|
|
36
36
|
const getOuterBorderOffset = ({
|
|
37
37
|
outerBorderGap = 0,
|