@toptal/picasso-utils 1.0.3-alpha-fx-4594-migrate-griditem-c9028d1d9.92 → 1.0.3-alpha-feature-tw-snackbar-6db9f2db9.54
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/dist-package/src/utils/capitalize.d.ts +4 -1
- package/dist-package/src/utils/capitalize.d.ts.map +1 -1
- package/dist-package/src/utils/capitalize.js +4 -1
- package/dist-package/src/utils/capitalize.js.map +1 -1
- package/package.json +5 -5
- package/src/utils/Modal/__snapshots__/test.tsx.snap +20 -10
- package/src/utils/capitalize.ts +5 -1
- package/src/utils/test.tsx +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capitalize.d.ts","sourceRoot":"","sources":["../../../src/utils/capitalize.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"capitalize.d.ts","sourceRoot":"","sources":["../../../src/utils/capitalize.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,MAAM,WACY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capitalize.js","sourceRoot":"","sources":["../../../src/utils/capitalize.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"capitalize.js","sourceRoot":"","sources":["../../../src/utils/capitalize.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE,CACzC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/picasso-utils",
|
|
3
|
-
"version": "1.0.3-alpha-
|
|
3
|
+
"version": "1.0.3-alpha-feature-tw-snackbar-6db9f2db9.54+6db9f2db9",
|
|
4
4
|
"description": "Toptal UI components library - Utils",
|
|
5
5
|
"homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"prepublishOnly": "yarn build:package"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@toptal/picasso-shared": "14.0.2-alpha-
|
|
29
|
+
"@toptal/picasso-shared": "14.0.2-alpha-feature-tw-snackbar-6db9f2db9.54+6db9f2db9",
|
|
30
30
|
"ap-style-title-case": "^1.1.2",
|
|
31
31
|
"classnames": "^2.5.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@toptal/picasso-provider": "4.2.1-alpha-
|
|
35
|
-
"@toptal/picasso-test-utils": "1.1.1-alpha-
|
|
34
|
+
"@toptal/picasso-provider": "4.2.1-alpha-feature-tw-snackbar-6db9f2db9.25+6db9f2db9",
|
|
35
|
+
"@toptal/picasso-test-utils": "1.1.1-alpha-feature-tw-snackbar-6db9f2db9.46+6db9f2db9",
|
|
36
36
|
"styled-components": "^6.1.1"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"!dist-package/tsconfig.tsbuildinfo",
|
|
50
50
|
"src"
|
|
51
51
|
],
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "6db9f2db95067775f723c4c62c59948813dd5f15"
|
|
53
53
|
}
|
|
@@ -10,14 +10,16 @@ exports[`Modal useModal opens and closes modal 1`] = `
|
|
|
10
10
|
class="Picasso-root"
|
|
11
11
|
>
|
|
12
12
|
<button
|
|
13
|
+
aria-disabled="false"
|
|
13
14
|
aria-hidden="true"
|
|
14
|
-
class="
|
|
15
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
15
16
|
data-component-type="button"
|
|
17
|
+
role="button"
|
|
16
18
|
tabindex="0"
|
|
17
19
|
type="button"
|
|
18
20
|
>
|
|
19
21
|
<span
|
|
20
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
22
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
21
23
|
>
|
|
22
24
|
Show
|
|
23
25
|
</span>
|
|
@@ -50,13 +52,15 @@ exports[`Modal useModal opens and closes modal 1`] = `
|
|
|
50
52
|
Modal content
|
|
51
53
|
</p>
|
|
52
54
|
<button
|
|
53
|
-
|
|
55
|
+
aria-disabled="false"
|
|
56
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
54
57
|
data-component-type="button"
|
|
58
|
+
role="button"
|
|
55
59
|
tabindex="0"
|
|
56
60
|
type="button"
|
|
57
61
|
>
|
|
58
62
|
<span
|
|
59
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
63
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
60
64
|
>
|
|
61
65
|
Hide
|
|
62
66
|
</span>
|
|
@@ -83,13 +87,15 @@ exports[`Modal useModal opens and closes modal 2`] = `
|
|
|
83
87
|
class="Picasso-root"
|
|
84
88
|
>
|
|
85
89
|
<button
|
|
86
|
-
|
|
90
|
+
aria-disabled="false"
|
|
91
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
87
92
|
data-component-type="button"
|
|
93
|
+
role="button"
|
|
88
94
|
tabindex="0"
|
|
89
95
|
type="button"
|
|
90
96
|
>
|
|
91
97
|
<span
|
|
92
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
98
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
93
99
|
>
|
|
94
100
|
Show
|
|
95
101
|
</span>
|
|
@@ -109,27 +115,31 @@ exports[`Modal useModal shows multiple modals at the same time 1`] = `
|
|
|
109
115
|
class="Picasso-root"
|
|
110
116
|
>
|
|
111
117
|
<button
|
|
118
|
+
aria-disabled="false"
|
|
112
119
|
aria-hidden="true"
|
|
113
|
-
class="
|
|
120
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
114
121
|
data-component-type="button"
|
|
122
|
+
role="button"
|
|
115
123
|
tabindex="0"
|
|
116
124
|
type="button"
|
|
117
125
|
>
|
|
118
126
|
<span
|
|
119
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
127
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
120
128
|
>
|
|
121
129
|
Show first
|
|
122
130
|
</span>
|
|
123
131
|
</button>
|
|
124
132
|
<button
|
|
133
|
+
aria-disabled="false"
|
|
125
134
|
aria-hidden="true"
|
|
126
|
-
class="
|
|
135
|
+
class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border-none text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4"
|
|
127
136
|
data-component-type="button"
|
|
137
|
+
role="button"
|
|
128
138
|
tabindex="0"
|
|
129
139
|
type="button"
|
|
130
140
|
>
|
|
131
141
|
<span
|
|
132
|
-
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline
|
|
142
|
+
class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
|
|
133
143
|
>
|
|
134
144
|
Show second
|
|
135
145
|
</span>
|
package/src/utils/capitalize.ts
CHANGED
package/src/utils/test.tsx
CHANGED
|
@@ -27,10 +27,12 @@ import unsafeErrorLog from './unsafe-error-log'
|
|
|
27
27
|
jest.mock('./unsafe-error-log')
|
|
28
28
|
|
|
29
29
|
describe('capitalize', () => {
|
|
30
|
-
it('
|
|
31
|
-
|
|
30
|
+
it('capitalizes the first letter of a string', () => {
|
|
31
|
+
expect(capitalize('test string')).toBe('Test string')
|
|
32
|
+
})
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
it('returns an empty string if the input is empty', () => {
|
|
35
|
+
expect(capitalize('')).toBe('')
|
|
34
36
|
})
|
|
35
37
|
})
|
|
36
38
|
|