@instructure/ui-grid 11.7.4-snapshot-52 → 11.7.4-snapshot-80
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 +10 -2
- package/es/Grid/v2/styles.js +8 -8
- package/es/GridCol/v2/styles.js +8 -8
- package/es/GridRow/v2/styles.js +8 -8
- package/lib/Grid/v2/styles.js +8 -8
- package/lib/GridCol/v2/styles.js +8 -8
- package/lib/GridRow/v2/styles.js +8 -8
- package/package.json +14 -14
- package/src/Grid/v2/props.ts +1 -2
- package/src/Grid/v2/styles.ts +11 -10
- package/src/GridCol/v2/styles.ts +10 -9
- package/src/GridRow/v2/styles.ts +10 -9
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Grid/v2/props.d.ts +1 -2
- package/types/Grid/v2/props.d.ts.map +1 -1
- package/types/Grid/v2/styles.d.ts +6 -6
- package/types/Grid/v2/styles.d.ts.map +1 -1
- package/types/GridCol/v2/styles.d.ts +6 -6
- package/types/GridCol/v2/styles.d.ts.map +1 -1
- package/types/GridRow/v2/styles.d.ts +6 -6
- package/types/GridRow/v2/styles.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [11.7.4-snapshot-
|
|
6
|
+
## [11.7.4-snapshot-80](https://github.com/instructure/instructure-ui/compare/v11.7.3...v11.7.4-snapshot-80) (2026-07-07)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ui-grid:** drop removed Grid component type from v2 props ([d7510c8](https://github.com/instructure/instructure-ui/commit/d7510c819471f3bb0c783250234273412b38e8de))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **ui-grid,ui-form-field:** breakpoints are set from sharedTokens ([3ac1e64](https://github.com/instructure/instructure-ui/commit/3ac1e64e00c5cb29c342879fd596b34f1b1fbb35))
|
|
9
17
|
|
|
10
18
|
|
|
11
19
|
|
package/es/Grid/v2/styles.js
CHANGED
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
* private: true
|
|
28
28
|
* ---
|
|
29
29
|
* Generates the style object from the theme and provided additional information
|
|
30
|
-
* @param
|
|
31
|
-
* @param
|
|
32
|
-
* @param
|
|
33
|
-
* @return
|
|
30
|
+
* @param _componentTheme unused.
|
|
31
|
+
* @param props the props of the component, the style is applied to
|
|
32
|
+
* @param sharedTokens Shared token object that stores common values for the theme.
|
|
33
|
+
* @return The final style object, which will be used in the component
|
|
34
34
|
*/
|
|
35
|
-
const generateStyle = (
|
|
35
|
+
const generateStyle = (_componentTheme, props, sharedTokens) => {
|
|
36
36
|
const {
|
|
37
37
|
startAt,
|
|
38
38
|
visualDebug
|
|
@@ -45,13 +45,13 @@ const generateStyle = (componentTheme, props) => {
|
|
|
45
45
|
label: 'grid',
|
|
46
46
|
display: 'block',
|
|
47
47
|
...getStartAtVariants('small'),
|
|
48
|
-
[`@media screen and (min-width: ${
|
|
48
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.md})`]: {
|
|
49
49
|
...getStartAtVariants('medium')
|
|
50
50
|
},
|
|
51
|
-
[`@media screen and (min-width: ${
|
|
51
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.lg})`]: {
|
|
52
52
|
...getStartAtVariants('large')
|
|
53
53
|
},
|
|
54
|
-
[`@media screen and (min-width: ${
|
|
54
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.xl})`]: {
|
|
55
55
|
...getStartAtVariants('x-large')
|
|
56
56
|
},
|
|
57
57
|
...(visualDebug && {
|
package/es/GridCol/v2/styles.js
CHANGED
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
* private: true
|
|
28
28
|
* ---
|
|
29
29
|
* Generates the style object from the theme and provided additional information
|
|
30
|
-
* @param
|
|
31
|
-
* @param
|
|
32
|
-
* @param
|
|
33
|
-
* @return
|
|
30
|
+
* @param componentTheme The theme variable object.
|
|
31
|
+
* @param props the props of the component, the style is applied to
|
|
32
|
+
* @param sharedTokens Shared token object that stores common values for the theme.
|
|
33
|
+
* @return The final style object, which will be used in the component
|
|
34
34
|
*/
|
|
35
|
-
const generateStyle = (componentTheme, props) => {
|
|
35
|
+
const generateStyle = (componentTheme, props, sharedTokens) => {
|
|
36
36
|
const {
|
|
37
37
|
vAlign,
|
|
38
38
|
textAlign,
|
|
@@ -199,13 +199,13 @@ const generateStyle = (componentTheme, props) => {
|
|
|
199
199
|
marginBottom: 0
|
|
200
200
|
}),
|
|
201
201
|
...getBreakpointStyles('small'),
|
|
202
|
-
[`@media screen and (min-width: ${
|
|
202
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.md})`]: {
|
|
203
203
|
...getBreakpointStyles('medium')
|
|
204
204
|
},
|
|
205
|
-
[`@media screen and (min-width: ${
|
|
205
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.lg})`]: {
|
|
206
206
|
...getBreakpointStyles('large')
|
|
207
207
|
},
|
|
208
|
-
[`@media screen and (min-width: ${
|
|
208
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.xl})`]: {
|
|
209
209
|
...getBreakpointStyles('x-large')
|
|
210
210
|
},
|
|
211
211
|
...(visualDebug && {
|
package/es/GridRow/v2/styles.js
CHANGED
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
* private: true
|
|
28
28
|
* ---
|
|
29
29
|
* Generates the style object from the theme and provided additional information
|
|
30
|
-
* @param
|
|
31
|
-
* @param
|
|
32
|
-
* @param
|
|
33
|
-
* @return
|
|
30
|
+
* @param componentTheme The theme variable object.
|
|
31
|
+
* @param props the props of the component, the style is applied to
|
|
32
|
+
* @param sharedTokens Shared token object that stores common values for the theme.
|
|
33
|
+
* @return The final style object, which will be used in the component
|
|
34
34
|
*/
|
|
35
|
-
const generateStyle = (componentTheme, props) => {
|
|
35
|
+
const generateStyle = (componentTheme, props, sharedTokens) => {
|
|
36
36
|
const {
|
|
37
37
|
hAlign,
|
|
38
38
|
vAlign,
|
|
@@ -121,13 +121,13 @@ const generateStyle = (componentTheme, props) => {
|
|
|
121
121
|
display: 'block',
|
|
122
122
|
boxSizing: 'border-box',
|
|
123
123
|
...getStartAtVariants('small'),
|
|
124
|
-
[`@media screen and (min-width: ${
|
|
124
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.md})`]: {
|
|
125
125
|
...getStartAtVariants('medium')
|
|
126
126
|
},
|
|
127
|
-
[`@media screen and (min-width: ${
|
|
127
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.lg})`]: {
|
|
128
128
|
...getStartAtVariants('large')
|
|
129
129
|
},
|
|
130
|
-
[`@media screen and (min-width: ${
|
|
130
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.xl})`]: {
|
|
131
131
|
...getStartAtVariants('x-large')
|
|
132
132
|
},
|
|
133
133
|
...(visualDebug && {
|
package/lib/Grid/v2/styles.js
CHANGED
|
@@ -33,12 +33,12 @@ exports.default = void 0;
|
|
|
33
33
|
* private: true
|
|
34
34
|
* ---
|
|
35
35
|
* Generates the style object from the theme and provided additional information
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
39
|
-
* @return
|
|
36
|
+
* @param _componentTheme unused.
|
|
37
|
+
* @param props the props of the component, the style is applied to
|
|
38
|
+
* @param sharedTokens Shared token object that stores common values for the theme.
|
|
39
|
+
* @return The final style object, which will be used in the component
|
|
40
40
|
*/
|
|
41
|
-
const generateStyle = (
|
|
41
|
+
const generateStyle = (_componentTheme, props, sharedTokens) => {
|
|
42
42
|
const {
|
|
43
43
|
startAt,
|
|
44
44
|
visualDebug
|
|
@@ -51,13 +51,13 @@ const generateStyle = (componentTheme, props) => {
|
|
|
51
51
|
label: 'grid',
|
|
52
52
|
display: 'block',
|
|
53
53
|
...getStartAtVariants('small'),
|
|
54
|
-
[`@media screen and (min-width: ${
|
|
54
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.md})`]: {
|
|
55
55
|
...getStartAtVariants('medium')
|
|
56
56
|
},
|
|
57
|
-
[`@media screen and (min-width: ${
|
|
57
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.lg})`]: {
|
|
58
58
|
...getStartAtVariants('large')
|
|
59
59
|
},
|
|
60
|
-
[`@media screen and (min-width: ${
|
|
60
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.xl})`]: {
|
|
61
61
|
...getStartAtVariants('x-large')
|
|
62
62
|
},
|
|
63
63
|
...(visualDebug && {
|
package/lib/GridCol/v2/styles.js
CHANGED
|
@@ -33,12 +33,12 @@ exports.default = void 0;
|
|
|
33
33
|
* private: true
|
|
34
34
|
* ---
|
|
35
35
|
* Generates the style object from the theme and provided additional information
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
39
|
-
* @return
|
|
36
|
+
* @param componentTheme The theme variable object.
|
|
37
|
+
* @param props the props of the component, the style is applied to
|
|
38
|
+
* @param sharedTokens Shared token object that stores common values for the theme.
|
|
39
|
+
* @return The final style object, which will be used in the component
|
|
40
40
|
*/
|
|
41
|
-
const generateStyle = (componentTheme, props) => {
|
|
41
|
+
const generateStyle = (componentTheme, props, sharedTokens) => {
|
|
42
42
|
const {
|
|
43
43
|
vAlign,
|
|
44
44
|
textAlign,
|
|
@@ -205,13 +205,13 @@ const generateStyle = (componentTheme, props) => {
|
|
|
205
205
|
marginBottom: 0
|
|
206
206
|
}),
|
|
207
207
|
...getBreakpointStyles('small'),
|
|
208
|
-
[`@media screen and (min-width: ${
|
|
208
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.md})`]: {
|
|
209
209
|
...getBreakpointStyles('medium')
|
|
210
210
|
},
|
|
211
|
-
[`@media screen and (min-width: ${
|
|
211
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.lg})`]: {
|
|
212
212
|
...getBreakpointStyles('large')
|
|
213
213
|
},
|
|
214
|
-
[`@media screen and (min-width: ${
|
|
214
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.xl})`]: {
|
|
215
215
|
...getBreakpointStyles('x-large')
|
|
216
216
|
},
|
|
217
217
|
...(visualDebug && {
|
package/lib/GridRow/v2/styles.js
CHANGED
|
@@ -33,12 +33,12 @@ exports.default = void 0;
|
|
|
33
33
|
* private: true
|
|
34
34
|
* ---
|
|
35
35
|
* Generates the style object from the theme and provided additional information
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
39
|
-
* @return
|
|
36
|
+
* @param componentTheme The theme variable object.
|
|
37
|
+
* @param props the props of the component, the style is applied to
|
|
38
|
+
* @param sharedTokens Shared token object that stores common values for the theme.
|
|
39
|
+
* @return The final style object, which will be used in the component
|
|
40
40
|
*/
|
|
41
|
-
const generateStyle = (componentTheme, props) => {
|
|
41
|
+
const generateStyle = (componentTheme, props, sharedTokens) => {
|
|
42
42
|
const {
|
|
43
43
|
hAlign,
|
|
44
44
|
vAlign,
|
|
@@ -127,13 +127,13 @@ const generateStyle = (componentTheme, props) => {
|
|
|
127
127
|
display: 'block',
|
|
128
128
|
boxSizing: 'border-box',
|
|
129
129
|
...getStartAtVariants('small'),
|
|
130
|
-
[`@media screen and (min-width: ${
|
|
130
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.md})`]: {
|
|
131
131
|
...getStartAtVariants('medium')
|
|
132
132
|
},
|
|
133
|
-
[`@media screen and (min-width: ${
|
|
133
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.lg})`]: {
|
|
134
134
|
...getStartAtVariants('large')
|
|
135
135
|
},
|
|
136
|
-
[`@media screen and (min-width: ${
|
|
136
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.xl})`]: {
|
|
137
137
|
...getStartAtVariants('x-large')
|
|
138
138
|
},
|
|
139
139
|
...(visualDebug && {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-grid",
|
|
3
|
-
"version": "11.7.4-snapshot-
|
|
3
|
+
"version": "11.7.4-snapshot-80",
|
|
4
4
|
"description": "A Grid component.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -14,21 +14,21 @@
|
|
|
14
14
|
"bugs": "https://github.com/instructure/instructure-ui/issues",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@babel/runtime": "^7.29.
|
|
18
|
-
"@instructure/console": "11.7.4-snapshot-
|
|
19
|
-
"@instructure/
|
|
20
|
-
"@instructure/
|
|
21
|
-
"@instructure/
|
|
22
|
-
"@instructure/
|
|
23
|
-
"@instructure/ui-themes": "11.7.4-snapshot-
|
|
24
|
-
"@instructure/ui-utils": "11.7.4-snapshot-
|
|
17
|
+
"@babel/runtime": "^7.29.7",
|
|
18
|
+
"@instructure/console": "11.7.4-snapshot-80",
|
|
19
|
+
"@instructure/emotion": "11.7.4-snapshot-80",
|
|
20
|
+
"@instructure/shared-types": "11.7.4-snapshot-80",
|
|
21
|
+
"@instructure/ui-a11y-content": "11.7.4-snapshot-80",
|
|
22
|
+
"@instructure/ui-react-utils": "11.7.4-snapshot-80",
|
|
23
|
+
"@instructure/ui-themes": "11.7.4-snapshot-80",
|
|
24
|
+
"@instructure/ui-utils": "11.7.4-snapshot-80"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@testing-library/jest-dom": "^6.
|
|
28
|
-
"@testing-library/react": "
|
|
29
|
-
"vitest": "^
|
|
30
|
-
"@instructure/ui-babel-preset": "11.7.4-snapshot-
|
|
31
|
-
"@instructure/ui-color-utils": "11.7.4-snapshot-
|
|
27
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
28
|
+
"@testing-library/react": "16.3.2",
|
|
29
|
+
"vitest": "^4.1.9",
|
|
30
|
+
"@instructure/ui-babel-preset": "11.7.4-snapshot-80",
|
|
31
|
+
"@instructure/ui-color-utils": "11.7.4-snapshot-80"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": ">=18 <=19"
|
package/src/Grid/v2/props.ts
CHANGED
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
|
|
25
25
|
import type { OtherHTMLAttributes } from '@instructure/shared-types'
|
|
26
26
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
27
|
-
import type { NewComponentTypes } from '@instructure/ui-themes'
|
|
28
27
|
import type { GridBreakpoints } from '../../utils/v1/GridTypes'
|
|
29
28
|
|
|
30
29
|
type GridOwnProps = {
|
|
@@ -45,7 +44,7 @@ type PropKeys = keyof GridOwnProps
|
|
|
45
44
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
46
45
|
|
|
47
46
|
type GridProps = GridOwnProps &
|
|
48
|
-
WithStyleProps<
|
|
47
|
+
WithStyleProps<null, GridStyle> &
|
|
49
48
|
OtherHTMLAttributes<GridOwnProps>
|
|
50
49
|
|
|
51
50
|
type GridStyle = ComponentStyle<'grid'>
|
package/src/Grid/v2/styles.ts
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import type {
|
|
25
|
+
import type { SharedTokens } from '@instructure/ui-themes'
|
|
26
26
|
import type { GridBreakpoints } from '../../utils/v1/GridTypes'
|
|
27
27
|
import type { GridProps, GridStyle } from './props'
|
|
28
28
|
|
|
@@ -31,14 +31,15 @@ import type { GridProps, GridStyle } from './props'
|
|
|
31
31
|
* private: true
|
|
32
32
|
* ---
|
|
33
33
|
* Generates the style object from the theme and provided additional information
|
|
34
|
-
* @param
|
|
35
|
-
* @param
|
|
36
|
-
* @param
|
|
37
|
-
* @return
|
|
34
|
+
* @param _componentTheme unused.
|
|
35
|
+
* @param props the props of the component, the style is applied to
|
|
36
|
+
* @param sharedTokens Shared token object that stores common values for the theme.
|
|
37
|
+
* @return The final style object, which will be used in the component
|
|
38
38
|
*/
|
|
39
39
|
const generateStyle = (
|
|
40
|
-
|
|
41
|
-
props: GridProps
|
|
40
|
+
_componentTheme: never,
|
|
41
|
+
props: GridProps,
|
|
42
|
+
sharedTokens: SharedTokens
|
|
42
43
|
): GridStyle => {
|
|
43
44
|
const { startAt, visualDebug } = props
|
|
44
45
|
|
|
@@ -52,13 +53,13 @@ const generateStyle = (
|
|
|
52
53
|
|
|
53
54
|
...getStartAtVariants('small'),
|
|
54
55
|
|
|
55
|
-
[`@media screen and (min-width: ${
|
|
56
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.md})`]: {
|
|
56
57
|
...getStartAtVariants('medium')
|
|
57
58
|
},
|
|
58
|
-
[`@media screen and (min-width: ${
|
|
59
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.lg})`]: {
|
|
59
60
|
...getStartAtVariants('large')
|
|
60
61
|
},
|
|
61
|
-
[`@media screen and (min-width: ${
|
|
62
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.xl})`]: {
|
|
62
63
|
...getStartAtVariants('x-large')
|
|
63
64
|
},
|
|
64
65
|
|
package/src/GridCol/v2/styles.ts
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import type { NewComponentTypes } from '@instructure/ui-themes'
|
|
25
|
+
import type { NewComponentTypes, SharedTokens } from '@instructure/ui-themes'
|
|
26
26
|
import type { GridBreakpoints } from '../../utils/v1/GridTypes'
|
|
27
27
|
import type { GridColProps, GridColStyle } from './props'
|
|
28
28
|
|
|
@@ -33,14 +33,15 @@ type BreakPoints = NonNullable<GridBreakpoints>
|
|
|
33
33
|
* private: true
|
|
34
34
|
* ---
|
|
35
35
|
* Generates the style object from the theme and provided additional information
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
39
|
-
* @return
|
|
36
|
+
* @param componentTheme The theme variable object.
|
|
37
|
+
* @param props the props of the component, the style is applied to
|
|
38
|
+
* @param sharedTokens Shared token object that stores common values for the theme.
|
|
39
|
+
* @return The final style object, which will be used in the component
|
|
40
40
|
*/
|
|
41
41
|
const generateStyle = (
|
|
42
42
|
componentTheme: ReturnType<NewComponentTypes['GridCol']>,
|
|
43
|
-
props: GridColProps
|
|
43
|
+
props: GridColProps,
|
|
44
|
+
sharedTokens: SharedTokens
|
|
44
45
|
): GridColStyle => {
|
|
45
46
|
const {
|
|
46
47
|
vAlign,
|
|
@@ -203,13 +204,13 @@ const generateStyle = (
|
|
|
203
204
|
|
|
204
205
|
...getBreakpointStyles('small'),
|
|
205
206
|
|
|
206
|
-
[`@media screen and (min-width: ${
|
|
207
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.md})`]: {
|
|
207
208
|
...getBreakpointStyles('medium')
|
|
208
209
|
},
|
|
209
|
-
[`@media screen and (min-width: ${
|
|
210
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.lg})`]: {
|
|
210
211
|
...getBreakpointStyles('large')
|
|
211
212
|
},
|
|
212
|
-
[`@media screen and (min-width: ${
|
|
213
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.xl})`]: {
|
|
213
214
|
...getBreakpointStyles('x-large')
|
|
214
215
|
},
|
|
215
216
|
|
package/src/GridRow/v2/styles.ts
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import type { NewComponentTypes } from '@instructure/ui-themes'
|
|
25
|
+
import type { NewComponentTypes, SharedTokens } from '@instructure/ui-themes'
|
|
26
26
|
import type { GridBreakpoints } from '../../utils/v1/GridTypes'
|
|
27
27
|
import type { GridRowProps, GridRowStyle } from './props'
|
|
28
28
|
|
|
@@ -31,14 +31,15 @@ import type { GridRowProps, GridRowStyle } from './props'
|
|
|
31
31
|
* private: true
|
|
32
32
|
* ---
|
|
33
33
|
* Generates the style object from the theme and provided additional information
|
|
34
|
-
* @param
|
|
35
|
-
* @param
|
|
36
|
-
* @param
|
|
37
|
-
* @return
|
|
34
|
+
* @param componentTheme The theme variable object.
|
|
35
|
+
* @param props the props of the component, the style is applied to
|
|
36
|
+
* @param sharedTokens Shared token object that stores common values for the theme.
|
|
37
|
+
* @return The final style object, which will be used in the component
|
|
38
38
|
*/
|
|
39
39
|
const generateStyle = (
|
|
40
40
|
componentTheme: ReturnType<NewComponentTypes['GridRow']>,
|
|
41
|
-
props: GridRowProps
|
|
41
|
+
props: GridRowProps,
|
|
42
|
+
sharedTokens: SharedTokens
|
|
42
43
|
): GridRowStyle => {
|
|
43
44
|
const {
|
|
44
45
|
hAlign,
|
|
@@ -102,13 +103,13 @@ const generateStyle = (
|
|
|
102
103
|
|
|
103
104
|
...getStartAtVariants('small'),
|
|
104
105
|
|
|
105
|
-
[`@media screen and (min-width: ${
|
|
106
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.md})`]: {
|
|
106
107
|
...getStartAtVariants('medium')
|
|
107
108
|
},
|
|
108
|
-
[`@media screen and (min-width: ${
|
|
109
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.lg})`]: {
|
|
109
110
|
...getStartAtVariants('large')
|
|
110
111
|
},
|
|
111
|
-
[`@media screen and (min-width: ${
|
|
112
|
+
[`@media screen and (min-width: ${sharedTokens.breakpoints.xl})`]: {
|
|
112
113
|
...getStartAtVariants('x-large')
|
|
113
114
|
},
|
|
114
115
|
|