@telus-uds/components-base 1.6.1 → 1.8.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/.storybook/main.js +7 -0
- package/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-lint.log +3 -13
- package/CHANGELOG.json +112 -1
- package/CHANGELOG.md +41 -2
- package/__fixtures__/Accessible.js +1 -2
- package/__fixtures__/Accessible.native.js +1 -2
- package/__tests__/FlexGrid/Col.test.jsx +5 -0
- package/__tests__/InputLabel/InputLabel.test.jsx +28 -0
- package/__tests__/InputLabel/__snapshots__/InputLabel.test.jsx.snap +3 -0
- package/__tests__/InputSupports/InputSupports.test.jsx +10 -0
- package/component-docs.json +278 -40
- package/lib/Button/ButtonGroup.js +118 -45
- package/lib/Checkbox/CheckboxGroup.js +3 -3
- package/lib/ExpandCollapse/Panel.js +2 -1
- package/lib/Fieldset/Fieldset.js +7 -0
- package/lib/InputLabel/InputLabel.js +8 -1
- package/lib/InputSupports/InputSupports.js +7 -0
- package/lib/List/ListItem.js +22 -12
- package/lib/Notification/Notification.js +1 -1
- package/lib/Radio/RadioGroup.js +12 -5
- package/lib/RadioCard/RadioCardGroup.js +7 -0
- package/lib/Search/Search.js +28 -20
- package/lib/Skeleton/Skeleton.js +48 -2
- package/lib/TextInput/TextArea.js +1 -1
- package/lib/TextInput/TextInput.js +1 -1
- package/lib/TextInput/TextInputBase.js +1 -1
- package/lib/ToggleSwitch/ToggleSwitch.js +7 -0
- package/lib/ToggleSwitch/ToggleSwitchGroup.js +7 -0
- package/lib/Tooltip/Tooltip.js +1 -1
- package/lib/Typography/Typography.js +12 -10
- package/lib/index.js +22 -1
- package/lib/utils/animation/useVerticalExpandAnimation.js +26 -13
- package/lib/utils/input.js +5 -6
- package/lib/utils/props/index.js +18 -0
- package/lib/utils/props/inputSupportsProps.js +7 -0
- package/lib/utils/props/textInputProps.js +207 -0
- package/lib/utils/props/textProps.js +72 -0
- package/lib-module/Button/ButtonGroup.js +117 -45
- package/lib-module/Checkbox/CheckboxGroup.js +3 -3
- package/lib-module/ExpandCollapse/Panel.js +2 -1
- package/lib-module/Fieldset/Fieldset.js +7 -0
- package/lib-module/InputLabel/InputLabel.js +8 -1
- package/lib-module/InputSupports/InputSupports.js +7 -0
- package/lib-module/List/ListItem.js +22 -12
- package/lib-module/Notification/Notification.js +1 -1
- package/lib-module/Radio/RadioGroup.js +12 -5
- package/lib-module/RadioCard/RadioCardGroup.js +7 -0
- package/lib-module/Search/Search.js +30 -22
- package/lib-module/Skeleton/Skeleton.js +49 -3
- package/lib-module/TextInput/TextArea.js +2 -2
- package/lib-module/TextInput/TextInput.js +2 -2
- package/lib-module/TextInput/TextInputBase.js +2 -2
- package/lib-module/ToggleSwitch/ToggleSwitch.js +7 -0
- package/lib-module/ToggleSwitch/ToggleSwitchGroup.js +7 -0
- package/lib-module/Tooltip/Tooltip.js +1 -1
- package/lib-module/Typography/Typography.js +13 -11
- package/lib-module/index.js +1 -1
- package/lib-module/utils/animation/useVerticalExpandAnimation.js +26 -14
- package/lib-module/utils/input.js +6 -6
- package/lib-module/utils/props/index.js +2 -0
- package/lib-module/utils/props/inputSupportsProps.js +7 -0
- package/lib-module/utils/props/textInputProps.js +194 -0
- package/lib-module/utils/props/textProps.js +59 -0
- package/package.json +9 -4
- package/src/Button/ButtonGroup.jsx +106 -41
- package/src/Checkbox/Checkbox.jsx +7 -4
- package/src/Checkbox/CheckboxGroup.jsx +3 -3
- package/src/ExpandCollapse/Panel.jsx +3 -1
- package/src/Fieldset/Fieldset.jsx +6 -0
- package/src/InputLabel/InputLabel.jsx +17 -2
- package/src/InputSupports/InputSupports.jsx +9 -1
- package/src/List/ListItem.jsx +17 -9
- package/src/Notification/Notification.jsx +1 -1
- package/src/Radio/Radio.jsx +5 -1
- package/src/Radio/RadioGroup.jsx +11 -5
- package/src/RadioCard/RadioCard.jsx +5 -1
- package/src/RadioCard/RadioCardGroup.jsx +6 -0
- package/src/Search/Search.jsx +34 -22
- package/src/Skeleton/Skeleton.jsx +56 -3
- package/src/TextInput/TextArea.jsx +2 -0
- package/src/TextInput/TextInput.jsx +2 -0
- package/src/TextInput/TextInputBase.jsx +2 -0
- package/src/ToggleSwitch/ToggleSwitch.jsx +6 -0
- package/src/ToggleSwitch/ToggleSwitchGroup.jsx +6 -0
- package/src/Tooltip/Tooltip.jsx +1 -1
- package/src/Typography/Typography.jsx +13 -9
- package/src/index.js +4 -1
- package/src/utils/animation/useVerticalExpandAnimation.js +25 -12
- package/src/utils/input.js +5 -7
- package/src/utils/props/index.js +2 -0
- package/src/utils/props/inputSupportsProps.js +6 -1
- package/src/utils/props/textInputProps.js +178 -0
- package/src/utils/props/textProps.js +58 -0
- package/src/utils/props/tokens.js +21 -19
- package/stories/Search/Search.stories.jsx +49 -2
- package/stories/Tabs/Tabs.stories.jsx +4 -3
package/.storybook/main.js
CHANGED
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
[32m@telus-uds/components-base:build: [0mcache hit, replaying output [
|
|
1
|
+
[32m@telus-uds/components-base:build: [0mcache hit, replaying output [2me0fd098b0b8854c2[0m
|
|
2
2
|
[32m@telus-uds/components-base:build: [0m[2K[1G[2m$ yarn build:code && yarn build:docs[22m
|
|
3
3
|
[32m@telus-uds/components-base:build: [0m[2K[1G[2m$ yarn build:main && yarn build:module[22m
|
|
4
4
|
[32m@telus-uds/components-base:build: [0m[2K[1G[2m$ babel src -d lib[22m
|
|
5
|
-
[32m@telus-uds/components-base:build: [0mSuccessfully compiled
|
|
5
|
+
[32m@telus-uds/components-base:build: [0mSuccessfully compiled 219 files with Babel (4923ms).
|
|
6
6
|
[32m@telus-uds/components-base:build: [0m[2K[1G[2m$ babel src -d lib-module --env-name module[22m
|
|
7
|
-
[32m@telus-uds/components-base:build: [0mSuccessfully compiled
|
|
7
|
+
[32m@telus-uds/components-base:build: [0mSuccessfully compiled 219 files with Babel (3351ms).
|
|
8
8
|
[32m@telus-uds/components-base:build: [0m[2K[1G[2m$ babel-node --plugins=@nearform/babel-plugin-react-docgen generate-component-docs.js[22m
|
package/.turbo/turbo-lint.log
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[35m@telus-uds/components-base:lint: [0m[0m[0m
|
|
5
|
-
[35m@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
|
-
[35m@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
|
-
[35m@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
|
-
[35m@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
|
-
[35m@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
|
-
[35m@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
|
-
[35m@telus-uds/components-base:lint: [0m[0m[0m
|
|
12
|
-
[35m@telus-uds/components-base:lint: [0m[0m[33m[1m✖ 5 problems (0 errors, 5 warnings)[22m[39m[0m
|
|
13
|
-
[35m@telus-uds/components-base:lint: [0m[0m[33m[1m[22m[39m[0m
|
|
1
|
+
[34m@telus-uds/components-base:lint: [0mcache hit, replaying output [2me078e864d81dc28c[0m
|
|
2
|
+
[34m@telus-uds/components-base:lint: [0m[2K[1G[2m$ yarn --cwd ../.. lint:path --color packages/components-base[22m
|
|
3
|
+
[34m@telus-uds/components-base:lint: [0m[2K[1G[2m$ eslint --ignore-path .gitignore --ext .js,.jsx,.mjs,.cjs --color packages/components-base[22m
|
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,118 @@
|
|
|
2
2
|
"name": "@telus-uds/components-base",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Fri,
|
|
5
|
+
"date": "Fri, 03 Jun 2022 17:26:30 GMT",
|
|
6
|
+
"tag": "@telus-uds/components-base_v1.8.0",
|
|
7
|
+
"version": "1.8.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "alan.slater@nearform.com",
|
|
12
|
+
"package": "@telus-uds/components-base",
|
|
13
|
+
"commit": "9606e7f5824d2aa248e2af9ab770bfcce07b51b7",
|
|
14
|
+
"comment": "Make collapsed items in ExpandCollapse non-focusable"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "simon.lawrence@nearform.com",
|
|
18
|
+
"package": "@telus-uds/components-base",
|
|
19
|
+
"commit": "9606e7f5824d2aa248e2af9ab770bfcce07b51b7",
|
|
20
|
+
"comment": "linting updates"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "alan.slater@nearform.com",
|
|
24
|
+
"package": "@telus-uds/components-base",
|
|
25
|
+
"commit": "9606e7f5824d2aa248e2af9ab770bfcce07b51b7",
|
|
26
|
+
"comment": "fix Skeleton size proptype"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "alan.slater@nearform.com",
|
|
30
|
+
"package": "@telus-uds/components-base",
|
|
31
|
+
"commit": "9606e7f5824d2aa248e2af9ab770bfcce07b51b7",
|
|
32
|
+
"comment": "make Skeleton props more intuitive"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"none": [
|
|
36
|
+
{
|
|
37
|
+
"author": "cody.zuschlag@nearform.com",
|
|
38
|
+
"package": "@telus-uds/components-base",
|
|
39
|
+
"commit": "9606e7f5824d2aa248e2af9ab770bfcce07b51b7",
|
|
40
|
+
"comment": "cleanup all mention of standard-version and conventional-commits"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"minor": [
|
|
44
|
+
{
|
|
45
|
+
"author": "ruslan.bredikhin@nearform.com",
|
|
46
|
+
"package": "@telus-uds/components-base",
|
|
47
|
+
"commit": "9606e7f5824d2aa248e2af9ab770bfcce07b51b7",
|
|
48
|
+
"comment": "feat: add passing `copy` for tooltips to components using it internally"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"author": "alan.slater@nearform.com",
|
|
52
|
+
"package": "@telus-uds/components-base",
|
|
53
|
+
"commit": "9606e7f5824d2aa248e2af9ab770bfcce07b51b7",
|
|
54
|
+
"comment": "add Fieldset to ButtonGroup (legend, feedback etc)"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"author": "beachball",
|
|
58
|
+
"package": "@telus-uds/components-base",
|
|
59
|
+
"comment": "Bump @telus-uds/system-theme-tokens to v2.0.0",
|
|
60
|
+
"commit": "9606e7f5824d2aa248e2af9ab770bfcce07b51b7"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"date": "Tue, 17 May 2022 19:56:05 GMT",
|
|
67
|
+
"tag": "@telus-uds/components-base_v1.7.1",
|
|
68
|
+
"version": "1.7.1",
|
|
69
|
+
"comments": {
|
|
70
|
+
"patch": [
|
|
71
|
+
{
|
|
72
|
+
"author": "alan.slater@nearform.com",
|
|
73
|
+
"package": "@telus-uds/components-base",
|
|
74
|
+
"commit": "135b7393e08bc5078bc73da4740da2b1f9e990fd",
|
|
75
|
+
"comment": "fix(components): fix inactive TextInput prop"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"date": "Tue, 17 May 2022 15:04:46 GMT",
|
|
82
|
+
"tag": "@telus-uds/components-base_v1.7.0",
|
|
83
|
+
"version": "1.7.0",
|
|
84
|
+
"comments": {
|
|
85
|
+
"patch": [
|
|
86
|
+
{
|
|
87
|
+
"author": "alan.slater@nearform.com",
|
|
88
|
+
"package": "@telus-uds/components-base",
|
|
89
|
+
"commit": "70105ac8b165247e3cd29a78e3247f7a475b287a",
|
|
90
|
+
"comment": "align List bullets like icons"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"author": "alan.slater@nearform.com",
|
|
94
|
+
"package": "@telus-uds/components-base",
|
|
95
|
+
"commit": "70105ac8b165247e3cd29a78e3247f7a475b287a",
|
|
96
|
+
"comment": "Add text props to Typography"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"author": "alan.slater@nearform.com",
|
|
100
|
+
"package": "@telus-uds/components-base",
|
|
101
|
+
"commit": "70105ac8b165247e3cd29a78e3247f7a475b287a",
|
|
102
|
+
"comment": "fix(components): support TextInput props"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"minor": [
|
|
106
|
+
{
|
|
107
|
+
"author": "alan.slater@nearform.com",
|
|
108
|
+
"package": "@telus-uds/components-base",
|
|
109
|
+
"commit": "70105ac8b165247e3cd29a78e3247f7a475b287a",
|
|
110
|
+
"comment": "Allow Search component to be controlled"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"date": "Fri, 06 May 2022 15:31:28 GMT",
|
|
6
117
|
"tag": "@telus-uds/components-base_v1.6.1",
|
|
7
118
|
"version": "1.6.1",
|
|
8
119
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,51 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-base
|
|
2
2
|
|
|
3
|
-
This log was last generated on Fri,
|
|
3
|
+
This log was last generated on Fri, 03 Jun 2022 17:26:30 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.8.0
|
|
8
|
+
|
|
9
|
+
Fri, 03 Jun 2022 17:26:30 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- feat: add passing `copy` for tooltips to components using it internally (ruslan.bredikhin@nearform.com)
|
|
14
|
+
- add Fieldset to ButtonGroup (legend, feedback etc) (alan.slater@nearform.com)
|
|
15
|
+
- Bump @telus-uds/system-theme-tokens to v2.0.0
|
|
16
|
+
|
|
17
|
+
### Patches
|
|
18
|
+
|
|
19
|
+
- Make collapsed items in ExpandCollapse non-focusable (alan.slater@nearform.com)
|
|
20
|
+
- linting updates (simon.lawrence@nearform.com)
|
|
21
|
+
- fix Skeleton size proptype (alan.slater@nearform.com)
|
|
22
|
+
- make Skeleton props more intuitive (alan.slater@nearform.com)
|
|
23
|
+
|
|
24
|
+
## 1.7.1
|
|
25
|
+
|
|
26
|
+
Tue, 17 May 2022 19:56:05 GMT
|
|
27
|
+
|
|
28
|
+
### Patches
|
|
29
|
+
|
|
30
|
+
- fix(components): fix inactive TextInput prop (alan.slater@nearform.com)
|
|
31
|
+
|
|
32
|
+
## 1.7.0
|
|
33
|
+
|
|
34
|
+
Tue, 17 May 2022 15:04:46 GMT
|
|
35
|
+
|
|
36
|
+
### Minor changes
|
|
37
|
+
|
|
38
|
+
- Allow Search component to be controlled (alan.slater@nearform.com)
|
|
39
|
+
|
|
40
|
+
### Patches
|
|
41
|
+
|
|
42
|
+
- align List bullets like icons (alan.slater@nearform.com)
|
|
43
|
+
- Add text props to Typography (alan.slater@nearform.com)
|
|
44
|
+
- fix(components): support TextInput props (alan.slater@nearform.com)
|
|
45
|
+
|
|
7
46
|
## 1.6.1
|
|
8
47
|
|
|
9
|
-
Fri, 06 May 2022 15:31:
|
|
48
|
+
Fri, 06 May 2022 15:31:28 GMT
|
|
10
49
|
|
|
11
50
|
### Patches
|
|
12
51
|
|
|
@@ -26,8 +26,7 @@ const Accessible = ({ title, titleId, size, color }) =>
|
|
|
26
26
|
)
|
|
27
27
|
: null,
|
|
28
28
|
/*#__PURE__*/ React.createElement('path', {
|
|
29
|
-
d:
|
|
30
|
-
'M4.231 12.257l.662.662a5.87 5.87 0 00-.982 3.235c0 1.585.618 3.078 1.74 4.2a5.903 5.903 0 004.2 1.739 5.839 5.839 0 002.991-.831l.242-.151.647.645c-1.167.81-2.517 1.244-3.88 1.244a6.83 6.83 0 01-4.845-2.003A6.805 6.805 0 013 16.154c0-1.315.378-2.568 1.067-3.65l.165-.247zm5.81-9.99c.178 0 .358.037.527.112l.175.093c.575.334 5.897 3.426 5.907 3.433.307.192.507.492.579.822.124.433.054.913-.22 1.3l-.1.125-2.68 2.738c.106.088.21.178.313.273l.166.162.014.016 5.136-.603.07-.002a1.3 1.3 0 011.3 1.265l-.004.14-.39 6.71a1.46 1.46 0 01-1.455 1.369l-.094-.003a1.456 1.456 0 01-1.362-1.41l.003-.141.337-4.465a.09.09 0 00-.09-.103l-1.71.3a6.86 6.86 0 01-.809 5.367l-.165.254-.66-.66a5.882 5.882 0 00.96-3.206 5.903 5.903 0 00-1.738-4.2 5.904 5.904 0 00-4.201-1.74c-1.06 0-2.073.291-2.966.813l-.24.148-.648-.648a6.827 6.827 0 012.94-1.156l.312-.035 2.507-2.778-1.5-.876L8.33 7.31a1.47 1.47 0 01-2.081.002c-.542-.542-.554-1.423-.078-2.008l.102-.112 2.902-2.596c.244-.217.552-.33.865-.33zm10.24 10.386c.096-.848-.406-.964-.75-.955l-.061.003-3.975.467c.223.338.41.701.576 1.073l.12.28 1.75-.308.077-.022.156-.004c.288 0 .562.125.754.34.15.174.236.392.246.618l-.003.136-.337 4.454a.541.541 0 00.136.389.536.536 0 00.287.171l.086.013c.289 0 .509-.18.567-.422l.015-.093.357-6.14zm-10.24-9.475a.387.387 0 00-.202.056l-.057.043L6.905 5.85c-.215.23-.222.607-.012.817a.558.558 0 00.725.057l.068-.058.027-.027 2.444-2.07 3.024 1.766-2.663 2.952a6.958 6.958 0 012.683.85l.31.183 2.727-2.784a.602.602 0 00.135-.46l-.02-.1-.013-.053a.385.385 0 00-.165-.241l-5.94-3.451a.38.38 0 00-.194-.053zM17.743 1c1.16 0 2.106.945 2.106 2.106a2.11 2.11 0 01-2.106 2.107 2.11 2.11 0 01-2.106-2.107c0-1.161.945-2.106 2.106-2.106zm0 .91a1.196 1.196 0 000 2.392 1.196 1.196 0 000-2.391z',
|
|
29
|
+
d: 'M4.231 12.257l.662.662a5.87 5.87 0 00-.982 3.235c0 1.585.618 3.078 1.74 4.2a5.903 5.903 0 004.2 1.739 5.839 5.839 0 002.991-.831l.242-.151.647.645c-1.167.81-2.517 1.244-3.88 1.244a6.83 6.83 0 01-4.845-2.003A6.805 6.805 0 013 16.154c0-1.315.378-2.568 1.067-3.65l.165-.247zm5.81-9.99c.178 0 .358.037.527.112l.175.093c.575.334 5.897 3.426 5.907 3.433.307.192.507.492.579.822.124.433.054.913-.22 1.3l-.1.125-2.68 2.738c.106.088.21.178.313.273l.166.162.014.016 5.136-.603.07-.002a1.3 1.3 0 011.3 1.265l-.004.14-.39 6.71a1.46 1.46 0 01-1.455 1.369l-.094-.003a1.456 1.456 0 01-1.362-1.41l.003-.141.337-4.465a.09.09 0 00-.09-.103l-1.71.3a6.86 6.86 0 01-.809 5.367l-.165.254-.66-.66a5.882 5.882 0 00.96-3.206 5.903 5.903 0 00-1.738-4.2 5.904 5.904 0 00-4.201-1.74c-1.06 0-2.073.291-2.966.813l-.24.148-.648-.648a6.827 6.827 0 012.94-1.156l.312-.035 2.507-2.778-1.5-.876L8.33 7.31a1.47 1.47 0 01-2.081.002c-.542-.542-.554-1.423-.078-2.008l.102-.112 2.902-2.596c.244-.217.552-.33.865-.33zm10.24 10.386c.096-.848-.406-.964-.75-.955l-.061.003-3.975.467c.223.338.41.701.576 1.073l.12.28 1.75-.308.077-.022.156-.004c.288 0 .562.125.754.34.15.174.236.392.246.618l-.003.136-.337 4.454a.541.541 0 00.136.389.536.536 0 00.287.171l.086.013c.289 0 .509-.18.567-.422l.015-.093.357-6.14zm-10.24-9.475a.387.387 0 00-.202.056l-.057.043L6.905 5.85c-.215.23-.222.607-.012.817a.558.558 0 00.725.057l.068-.058.027-.027 2.444-2.07 3.024 1.766-2.663 2.952a6.958 6.958 0 012.683.85l.31.183 2.727-2.784a.602.602 0 00.135-.46l-.02-.1-.013-.053a.385.385 0 00-.165-.241l-5.94-3.451a.38.38 0 00-.194-.053zM17.743 1c1.16 0 2.106.945 2.106 2.106a2.11 2.11 0 01-2.106 2.107 2.11 2.11 0 01-2.106-2.107c0-1.161.945-2.106 2.106-2.106zm0 .91a1.196 1.196 0 000 2.392 1.196 1.196 0 000-2.391z',
|
|
31
30
|
fillRule: 'evenodd'
|
|
32
31
|
})
|
|
33
32
|
)
|
|
@@ -26,8 +26,7 @@ const Accessible = ({ title, titleId, size, color }) =>
|
|
|
26
26
|
)
|
|
27
27
|
: null,
|
|
28
28
|
/*#__PURE__*/ React.createElement(Path, {
|
|
29
|
-
d:
|
|
30
|
-
'M4.231 12.257l.662.662a5.87 5.87 0 00-.982 3.235c0 1.585.618 3.078 1.74 4.2a5.903 5.903 0 004.2 1.739 5.839 5.839 0 002.991-.831l.242-.151.647.645c-1.167.81-2.517 1.244-3.88 1.244a6.83 6.83 0 01-4.845-2.003A6.805 6.805 0 013 16.154c0-1.315.378-2.568 1.067-3.65l.165-.247zm5.81-9.99c.178 0 .358.037.527.112l.175.093c.575.334 5.897 3.426 5.907 3.433.307.192.507.492.579.822.124.433.054.913-.22 1.3l-.1.125-2.68 2.738c.106.088.21.178.313.273l.166.162.014.016 5.136-.603.07-.002a1.3 1.3 0 011.3 1.265l-.004.14-.39 6.71a1.46 1.46 0 01-1.455 1.369l-.094-.003a1.456 1.456 0 01-1.362-1.41l.003-.141.337-4.465a.09.09 0 00-.09-.103l-1.71.3a6.86 6.86 0 01-.809 5.367l-.165.254-.66-.66a5.882 5.882 0 00.96-3.206 5.903 5.903 0 00-1.738-4.2 5.904 5.904 0 00-4.201-1.74c-1.06 0-2.073.291-2.966.813l-.24.148-.648-.648a6.827 6.827 0 012.94-1.156l.312-.035 2.507-2.778-1.5-.876L8.33 7.31a1.47 1.47 0 01-2.081.002c-.542-.542-.554-1.423-.078-2.008l.102-.112 2.902-2.596c.244-.217.552-.33.865-.33zm10.24 10.386c.096-.848-.406-.964-.75-.955l-.061.003-3.975.467c.223.338.41.701.576 1.073l.12.28 1.75-.308.077-.022.156-.004c.288 0 .562.125.754.34.15.174.236.392.246.618l-.003.136-.337 4.454a.541.541 0 00.136.389.536.536 0 00.287.171l.086.013c.289 0 .509-.18.567-.422l.015-.093.357-6.14zm-10.24-9.475a.387.387 0 00-.202.056l-.057.043L6.905 5.85c-.215.23-.222.607-.012.817a.558.558 0 00.725.057l.068-.058.027-.027 2.444-2.07 3.024 1.766-2.663 2.952a6.958 6.958 0 012.683.85l.31.183 2.727-2.784a.602.602 0 00.135-.46l-.02-.1-.013-.053a.385.385 0 00-.165-.241l-5.94-3.451a.38.38 0 00-.194-.053zM17.743 1c1.16 0 2.106.945 2.106 2.106a2.11 2.11 0 01-2.106 2.107 2.11 2.11 0 01-2.106-2.107c0-1.161.945-2.106 2.106-2.106zm0 .91a1.196 1.196 0 000 2.392 1.196 1.196 0 000-2.391z',
|
|
29
|
+
d: 'M4.231 12.257l.662.662a5.87 5.87 0 00-.982 3.235c0 1.585.618 3.078 1.74 4.2a5.903 5.903 0 004.2 1.739 5.839 5.839 0 002.991-.831l.242-.151.647.645c-1.167.81-2.517 1.244-3.88 1.244a6.83 6.83 0 01-4.845-2.003A6.805 6.805 0 013 16.154c0-1.315.378-2.568 1.067-3.65l.165-.247zm5.81-9.99c.178 0 .358.037.527.112l.175.093c.575.334 5.897 3.426 5.907 3.433.307.192.507.492.579.822.124.433.054.913-.22 1.3l-.1.125-2.68 2.738c.106.088.21.178.313.273l.166.162.014.016 5.136-.603.07-.002a1.3 1.3 0 011.3 1.265l-.004.14-.39 6.71a1.46 1.46 0 01-1.455 1.369l-.094-.003a1.456 1.456 0 01-1.362-1.41l.003-.141.337-4.465a.09.09 0 00-.09-.103l-1.71.3a6.86 6.86 0 01-.809 5.367l-.165.254-.66-.66a5.882 5.882 0 00.96-3.206 5.903 5.903 0 00-1.738-4.2 5.904 5.904 0 00-4.201-1.74c-1.06 0-2.073.291-2.966.813l-.24.148-.648-.648a6.827 6.827 0 012.94-1.156l.312-.035 2.507-2.778-1.5-.876L8.33 7.31a1.47 1.47 0 01-2.081.002c-.542-.542-.554-1.423-.078-2.008l.102-.112 2.902-2.596c.244-.217.552-.33.865-.33zm10.24 10.386c.096-.848-.406-.964-.75-.955l-.061.003-3.975.467c.223.338.41.701.576 1.073l.12.28 1.75-.308.077-.022.156-.004c.288 0 .562.125.754.34.15.174.236.392.246.618l-.003.136-.337 4.454a.541.541 0 00.136.389.536.536 0 00.287.171l.086.013c.289 0 .509-.18.567-.422l.015-.093.357-6.14zm-10.24-9.475a.387.387 0 00-.202.056l-.057.043L6.905 5.85c-.215.23-.222.607-.012.817a.558.558 0 00.725.057l.068-.058.027-.027 2.444-2.07 3.024 1.766-2.663 2.952a6.958 6.958 0 012.683.85l.31.183 2.727-2.784a.602.602 0 00.135-.46l-.02-.1-.013-.053a.385.385 0 00-.165-.241l-5.94-3.451a.38.38 0 00-.194-.053zM17.743 1c1.16 0 2.106.945 2.106 2.106a2.11 2.11 0 01-2.106 2.107 2.11 2.11 0 01-2.106-2.107c0-1.161.945-2.106 2.106-2.106zm0 .91a1.196 1.196 0 000 2.392 1.196 1.196 0 000-2.391z',
|
|
31
30
|
fillRule: 'evenodd'
|
|
32
31
|
})
|
|
33
32
|
)
|
|
@@ -48,6 +48,7 @@ describe('FlexGrid.Col offsets', () => {
|
|
|
48
48
|
)
|
|
49
49
|
const expectIfOffsetExpected = (propViewport) => {
|
|
50
50
|
const target = getByText(`${propViewport}Offset`).parent
|
|
51
|
+
// eslint-disable-next-line jest/valid-expect
|
|
51
52
|
return expected[propViewport] ? expect(target) : expect(target).not
|
|
52
53
|
}
|
|
53
54
|
expectIfOffsetExpected('xs').toHaveStyle(getOffsetStyle('xs'))
|
|
@@ -103,6 +104,7 @@ describe('FlexGrid.Col sizes', () => {
|
|
|
103
104
|
|
|
104
105
|
const expectIfSizeExpected = (propViewport) => {
|
|
105
106
|
const target = getByText(propViewport).parent
|
|
107
|
+
// eslint-disable-next-line jest/valid-expect
|
|
106
108
|
return expected[propViewport] ? expect(target) : expect(target).not
|
|
107
109
|
}
|
|
108
110
|
expectIfSizeExpected('xs').toHaveStyle(getNumericSizeStyle('xs'))
|
|
@@ -152,6 +154,7 @@ describe('FlexGrid.Col sizes', () => {
|
|
|
152
154
|
|
|
153
155
|
const expectIfSizeExpected = (text) => {
|
|
154
156
|
const target = getByText(text).parent
|
|
157
|
+
// eslint-disable-next-line jest/valid-expect
|
|
155
158
|
return expected[text] ? expect(target) : expect(target).not
|
|
156
159
|
}
|
|
157
160
|
expectIfSizeExpected('xs-md').toHaveStyle(getNumericSizeStyle('xs'))
|
|
@@ -197,6 +200,7 @@ describe('FlexGrid.Col sizes', () => {
|
|
|
197
200
|
)
|
|
198
201
|
const expectIfHidingExpected = (propViewport) => {
|
|
199
202
|
const target = getByText(propViewport).parent
|
|
203
|
+
// eslint-disable-next-line jest/valid-expect
|
|
200
204
|
return expected[propViewport] ? expect(target) : expect(target).not
|
|
201
205
|
}
|
|
202
206
|
expectIfHidingExpected('xs').toHaveStyle(hidingStyle)
|
|
@@ -245,6 +249,7 @@ describe('FlexGrid.Col horizontalAlign', () => {
|
|
|
245
249
|
|
|
246
250
|
const expectIfAlignExpected = (propViewport) => {
|
|
247
251
|
const target = getByText(propViewport).parent
|
|
252
|
+
// eslint-disable-next-line jest/valid-expect
|
|
248
253
|
return expected[propViewport] ? expect(target) : expect(target).not
|
|
249
254
|
}
|
|
250
255
|
expectIfAlignExpected('xs').toHaveStyle(alignRightStyle)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { render } from '@testing-library/react-native'
|
|
3
|
+
|
|
4
|
+
import InputLabel from '../../src/InputLabel'
|
|
5
|
+
import Theme from '../../__fixtures__/Theme'
|
|
6
|
+
import tooltipDictionary from '../../src/Tooltip/dictionary'
|
|
7
|
+
|
|
8
|
+
const label = 'Test label'
|
|
9
|
+
|
|
10
|
+
const setup = (props) =>
|
|
11
|
+
render(<InputLabel label={label} {...props} />, {
|
|
12
|
+
wrapper: Theme
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
describe('InputLabel', () => {
|
|
16
|
+
it('renders correctly and matches the snapshot', () => {
|
|
17
|
+
const { container, getByText } = setup()
|
|
18
|
+
|
|
19
|
+
expect(getByText(label)).toBeTruthy()
|
|
20
|
+
expect(container.firstChild).toMatchSnapshot()
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
it('passes the copy prop down to the tooltip component', () => {
|
|
24
|
+
const { getByA11yLabel } = setup({ copy: 'fr', tooltip: 'Test tooltip' })
|
|
25
|
+
|
|
26
|
+
expect(getByA11yLabel(tooltipDictionary.fr.a11yText)).toBeTruthy()
|
|
27
|
+
})
|
|
28
|
+
})
|
|
@@ -4,6 +4,7 @@ import { fireEvent, render } from '@testing-library/react-native'
|
|
|
4
4
|
import InputSupports from '../../src/InputSupports'
|
|
5
5
|
import Theme from '../../__fixtures__/Theme'
|
|
6
6
|
import Viewport from '../../__fixtures__/Viewport'
|
|
7
|
+
import tooltipDictionary from '../../src/Tooltip/dictionary'
|
|
7
8
|
|
|
8
9
|
// eslint-disable-next-line react/prop-types
|
|
9
10
|
const Wrapper = ({ children }) => (
|
|
@@ -47,4 +48,13 @@ describe('InputSupports', () => {
|
|
|
47
48
|
fireEvent(getByRole('button'), 'press')
|
|
48
49
|
expect(queryByText('Test tooltip content')).toBeTruthy()
|
|
49
50
|
})
|
|
51
|
+
|
|
52
|
+
it('passes the copy prop down to the tooltip component', () => {
|
|
53
|
+
const { getByA11yLabel } = render(
|
|
54
|
+
<InputSupports copy="fr" label="Test label content" tooltip="Test tooltip content" />,
|
|
55
|
+
{ wrapper: Wrapper }
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
expect(getByA11yLabel(tooltipDictionary.fr.a11yText)).toBeTruthy()
|
|
59
|
+
})
|
|
50
60
|
})
|