@telia/teddy 0.0.10 → 0.0.11
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/assets/badge.css +1 -1
- package/dist/assets/main.css +1 -1
- package/dist/assets/radio-group.css +1 -1
- package/dist/badge-DscsRVHR.js +1825 -0
- package/dist/components/accordion/accordion.js +3 -3
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/badge/badge.js +3 -3
- package/dist/components/badge/index.js +1 -1
- package/dist/components/box/box.js +8 -8
- package/dist/components/button/button.d.ts +2 -1
- package/dist/components/button/button.js +59 -60
- package/dist/components/card/card.js +3 -3
- package/dist/components/card/index.js +1 -1
- package/dist/components/flex/flex.js +1 -1
- package/dist/components/grid/grid.js +6 -6
- package/dist/components/heading/heading.d.ts +3 -2
- package/dist/components/heading/heading.js +20 -21
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +26 -25
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.js +4 -0
- package/dist/components/modal/modal.d.ts +76 -0
- package/dist/components/modal/modal.js +28 -0
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts +2 -0
- package/dist/components/navigation-menu/navigation-menu.js +8 -1032
- package/dist/components/notification/index.js +1 -1
- package/dist/components/notification/notification.d.ts +3 -3
- package/dist/components/notification/notification.js +4 -4
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/radio-group.js +1 -1
- package/dist/components/text-field/text-field.js +15 -15
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toggle/toggle.d.ts +2 -2
- package/dist/components/toggle/toggle.js +3 -3
- package/dist/{index-DPFZO9xk.js → index-FPIZOCcD.js} +27 -28
- package/dist/main.js +41 -40
- package/dist/navigation-menu-DKuyW8zE.js +1036 -0
- package/dist/{radio-group-DN1IYZdr.js → radio-group-B--zT3OL.js} +8 -8
- package/dist/tokens/breakpoint/variables.json.d.ts +11 -0
- package/dist/utils/component-props-as.d.ts +5 -0
- package/dist/utils/component-props-as.js +1 -0
- package/dist/utils/layout/align.d.ts +46 -0
- package/dist/utils/layout/align.js +31 -0
- package/dist/utils/layout/flex.d.ts +281 -10
- package/dist/utils/layout/flex.js +44 -8
- package/dist/utils/layout/gap.d.ts +340 -0
- package/dist/utils/layout/gap.js +21 -0
- package/dist/utils/layout/grid.d.ts +313 -0
- package/dist/utils/layout/grid.js +116 -0
- package/dist/utils/layout/height.d.ts +118 -0
- package/dist/utils/layout/height.js +50 -0
- package/dist/utils/layout/index.d.ts +63 -111
- package/dist/utils/layout/index.js +62 -147
- package/dist/utils/layout/justify.d.ts +39 -0
- package/dist/utils/layout/justify.js +16 -0
- package/dist/utils/layout/margin.d.ts +443 -11
- package/dist/utils/layout/margin.js +1 -1
- package/dist/utils/layout/padding.d.ts +478 -0
- package/dist/utils/layout/padding.js +32 -0
- package/dist/utils/layout/util.d.ts +78 -4
- package/dist/utils/layout/util.js +30 -31
- package/dist/utils/layout/width.d.ts +43 -7
- package/dist/utils/layout/width.js +6 -2
- package/package.json +2 -1
- package/dist/badge-cOFoFJw0.js +0 -798
- package/dist/tokens/spacing/variables.json.d.ts +0 -34
|
@@ -3,7 +3,7 @@ import { jsx as I } from "react/jsx-runtime";
|
|
|
3
3
|
import p, { forwardRef as x, createElement as b, useRef as w, useState as T, useEffect as P, useCallback as k } from "react";
|
|
4
4
|
import { c as S } from "./clsx-DB4S2d7J.js";
|
|
5
5
|
import { _ as m, b as M, $ as $e } from "./index-DpfSJps6.js";
|
|
6
|
-
import { $ as _e, a as q, b as H, c as Y, d as ve, e as y, f as ge, g as me, h as Re, i as he } from "./index-
|
|
6
|
+
import { $ as _e, a as q, b as H, c as Y, d as ve, e as y, f as ge, g as me, h as Re, i as he } from "./index-FPIZOCcD.js";
|
|
7
7
|
import { $ as A } from "./index-DM5e-Whg.js";
|
|
8
8
|
import { Label as Ie } from "./components/label/label.js";
|
|
9
9
|
import { useComposedRefs as ye } from "./utils/composeRefs.js";
|
|
@@ -370,13 +370,13 @@ const Ye = [
|
|
|
370
370
|
ref: t
|
|
371
371
|
}));
|
|
372
372
|
}), oo = Je, to = Ze, ro = eo, F = {
|
|
373
|
-
"teddy-radio-group": "_teddy-radio-
|
|
374
|
-
"teddy-radio-group__group-label": "_teddy-radio-group__group-
|
|
375
|
-
"teddy-radio-group__label": "_teddy-radio-
|
|
376
|
-
"teddy-radio-group__group-label--required": "_teddy-radio-group__group-label--
|
|
377
|
-
"teddy-radio-group__item": "_teddy-radio-
|
|
378
|
-
"teddy-radio-group__trigger": "_teddy-radio-
|
|
379
|
-
"teddy-radio-group__indicator": "_teddy-radio-
|
|
373
|
+
"teddy-radio-group": "_teddy-radio-group_1flae_1",
|
|
374
|
+
"teddy-radio-group__group-label": "_teddy-radio-group__group-label_1flae_10",
|
|
375
|
+
"teddy-radio-group__label": "_teddy-radio-group__label_1flae_13",
|
|
376
|
+
"teddy-radio-group__group-label--required": "_teddy-radio-group__group-label--required_1flae_23",
|
|
377
|
+
"teddy-radio-group__item": "_teddy-radio-group__item_1flae_26",
|
|
378
|
+
"teddy-radio-group__trigger": "_teddy-radio-group__trigger_1flae_54",
|
|
379
|
+
"teddy-radio-group__indicator": "_teddy-radio-group__indicator_1flae_111"
|
|
380
380
|
}, E = "teddy-radio-group", re = p.createContext(void 0), ne = p.forwardRef(
|
|
381
381
|
({ className: e, ...t }, o) => {
|
|
382
382
|
const r = S([F[`${E}`]], e), [n, a] = p.useState();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Responsive } from './util';
|
|
2
|
+
|
|
3
|
+
declare const alignValues: readonly [{
|
|
4
|
+
readonly key: "start";
|
|
5
|
+
readonly value: "flex-start";
|
|
6
|
+
}, {
|
|
7
|
+
readonly key: "center";
|
|
8
|
+
readonly value: "center";
|
|
9
|
+
}, {
|
|
10
|
+
readonly key: "end";
|
|
11
|
+
readonly value: "flex-end";
|
|
12
|
+
}, {
|
|
13
|
+
readonly key: "baseline";
|
|
14
|
+
readonly value: "baseline";
|
|
15
|
+
}, {
|
|
16
|
+
readonly key: "stretch";
|
|
17
|
+
readonly value: "stretch";
|
|
18
|
+
}];
|
|
19
|
+
export declare const align: readonly [{
|
|
20
|
+
readonly key: "align";
|
|
21
|
+
readonly className: "teddy-ai";
|
|
22
|
+
readonly values: readonly [{
|
|
23
|
+
readonly key: "start";
|
|
24
|
+
readonly value: "flex-start";
|
|
25
|
+
}, {
|
|
26
|
+
readonly key: "center";
|
|
27
|
+
readonly value: "center";
|
|
28
|
+
}, {
|
|
29
|
+
readonly key: "end";
|
|
30
|
+
readonly value: "flex-end";
|
|
31
|
+
}, {
|
|
32
|
+
readonly key: "baseline";
|
|
33
|
+
readonly value: "baseline";
|
|
34
|
+
}, {
|
|
35
|
+
readonly key: "stretch";
|
|
36
|
+
readonly value: "stretch";
|
|
37
|
+
}];
|
|
38
|
+
}];
|
|
39
|
+
/**
|
|
40
|
+
* The alignment of the grid items. It can be 'start', 'center', 'end', 'baseline', 'stretch' or a responsive value.
|
|
41
|
+
* A responsive value is an object with the keys 'sm', 'md', 'lg', 'xl' and a value for the corresponding breakpoint.
|
|
42
|
+
* @example align={{ sm: 'start', md: 'center' }}
|
|
43
|
+
* @default 'stretch'
|
|
44
|
+
*/
|
|
45
|
+
export type Align = Responsive<(typeof alignValues)[number]['key']>;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const e = [
|
|
2
|
+
{
|
|
3
|
+
key: "start",
|
|
4
|
+
value: "flex-start"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
key: "center",
|
|
8
|
+
value: "center"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
key: "end",
|
|
12
|
+
value: "flex-end"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
key: "baseline",
|
|
16
|
+
value: "baseline"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
key: "stretch",
|
|
20
|
+
value: "stretch"
|
|
21
|
+
}
|
|
22
|
+
], a = [
|
|
23
|
+
{
|
|
24
|
+
key: "align",
|
|
25
|
+
className: "teddy-ai",
|
|
26
|
+
values: e
|
|
27
|
+
}
|
|
28
|
+
];
|
|
29
|
+
export {
|
|
30
|
+
a as align
|
|
31
|
+
};
|
|
@@ -1,23 +1,294 @@
|
|
|
1
1
|
import { Responsive } from './util';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
declare const flexGrowValues: readonly [{
|
|
4
|
+
readonly key: "0";
|
|
5
|
+
readonly value: "0";
|
|
6
|
+
}, {
|
|
7
|
+
readonly key: "1";
|
|
8
|
+
readonly value: "1";
|
|
9
|
+
}];
|
|
10
|
+
declare const flexShrinkValues: readonly [{
|
|
11
|
+
readonly key: "0";
|
|
12
|
+
readonly value: "0";
|
|
13
|
+
}, {
|
|
14
|
+
readonly key: "1";
|
|
15
|
+
readonly value: "1";
|
|
16
|
+
}];
|
|
17
|
+
declare const flexBasisValues: readonly [{
|
|
18
|
+
readonly key: "0";
|
|
19
|
+
readonly value: "var(--teddy-spacing-0)";
|
|
20
|
+
}, {
|
|
21
|
+
readonly key: "10";
|
|
22
|
+
readonly value: "var(--teddy-spacing-10)";
|
|
23
|
+
}, {
|
|
24
|
+
readonly key: "25";
|
|
25
|
+
readonly value: "var(--teddy-spacing-25)";
|
|
26
|
+
}, {
|
|
27
|
+
readonly key: "50";
|
|
28
|
+
readonly value: "var(--teddy-spacing-50)";
|
|
29
|
+
}, {
|
|
30
|
+
readonly key: "100";
|
|
31
|
+
readonly value: "var(--teddy-spacing-100)";
|
|
32
|
+
}, {
|
|
33
|
+
readonly key: "150";
|
|
34
|
+
readonly value: "var(--teddy-spacing-150)";
|
|
35
|
+
}, {
|
|
36
|
+
readonly key: "200";
|
|
37
|
+
readonly value: "var(--teddy-spacing-200)";
|
|
38
|
+
}, {
|
|
39
|
+
readonly key: "250";
|
|
40
|
+
readonly value: "var(--teddy-spacing-250)";
|
|
41
|
+
}, {
|
|
42
|
+
readonly key: "300";
|
|
43
|
+
readonly value: "var(--teddy-spacing-300)";
|
|
44
|
+
}, {
|
|
45
|
+
readonly key: "400";
|
|
46
|
+
readonly value: "var(--teddy-spacing-400)";
|
|
47
|
+
}, {
|
|
48
|
+
readonly key: "600";
|
|
49
|
+
readonly value: "var(--teddy-spacing-600)";
|
|
50
|
+
}, {
|
|
51
|
+
readonly key: "800";
|
|
52
|
+
readonly value: "var(--teddy-spacing-800)";
|
|
53
|
+
}, {
|
|
54
|
+
readonly key: "1000";
|
|
55
|
+
readonly value: "var(--teddy-spacing-1000)";
|
|
56
|
+
}, {
|
|
57
|
+
readonly key: "1200";
|
|
58
|
+
readonly value: "var(--teddy-spacing-1200)";
|
|
59
|
+
}, {
|
|
60
|
+
readonly key: "1600";
|
|
61
|
+
readonly value: "var(--teddy-spacing-1600)";
|
|
62
|
+
}, {
|
|
63
|
+
readonly key: "gutter-sm";
|
|
64
|
+
readonly value: "var(--teddy-spacing-gutter-sm)";
|
|
65
|
+
}, {
|
|
66
|
+
readonly key: "gutter-md";
|
|
67
|
+
readonly value: "var(--teddy-spacing-gutter-md)";
|
|
68
|
+
}, {
|
|
69
|
+
readonly key: "gutter-lg";
|
|
70
|
+
readonly value: "var(--teddy-spacing-gutter-lg)";
|
|
71
|
+
}, {
|
|
72
|
+
readonly key: "gutter-xl";
|
|
73
|
+
readonly value: "var(--teddy-spacing-gutter-xl)";
|
|
74
|
+
}, {
|
|
75
|
+
readonly key: "page-padding-sm";
|
|
76
|
+
readonly value: "var(--teddy-spacing-page-padding-sm)";
|
|
77
|
+
}, {
|
|
78
|
+
readonly key: "page-padding-md";
|
|
79
|
+
readonly value: "var(--teddy-spacing-page-padding-md)";
|
|
80
|
+
}, {
|
|
81
|
+
readonly key: "page-padding-lg";
|
|
82
|
+
readonly value: "var(--teddy-spacing-page-padding-lg)";
|
|
83
|
+
}, {
|
|
84
|
+
readonly key: "page-padding-xl";
|
|
85
|
+
readonly value: "var(--teddy-spacing-page-padding-xl)";
|
|
86
|
+
}, {
|
|
87
|
+
readonly key: "auto";
|
|
88
|
+
readonly value: "auto";
|
|
89
|
+
}, {
|
|
90
|
+
readonly key: "full";
|
|
91
|
+
readonly value: "100%";
|
|
92
|
+
}, {
|
|
93
|
+
readonly key: "1/2";
|
|
94
|
+
readonly value: "50%";
|
|
95
|
+
}];
|
|
96
|
+
declare const flexDirectionValues: readonly [{
|
|
97
|
+
readonly key: "row";
|
|
98
|
+
readonly value: "row";
|
|
99
|
+
}, {
|
|
100
|
+
readonly key: "row-reverse";
|
|
101
|
+
readonly value: "row-reverse";
|
|
102
|
+
}, {
|
|
103
|
+
readonly key: "column";
|
|
104
|
+
readonly value: "column";
|
|
105
|
+
}, {
|
|
106
|
+
readonly key: "column-reverse";
|
|
107
|
+
readonly value: "column-reverse";
|
|
108
|
+
}];
|
|
109
|
+
export declare const displayFlexValues: readonly [{
|
|
110
|
+
readonly key: "none";
|
|
111
|
+
readonly value: "none";
|
|
112
|
+
}, {
|
|
113
|
+
readonly key: "inline-flex";
|
|
114
|
+
readonly value: "inline-flex";
|
|
115
|
+
}, {
|
|
116
|
+
readonly key: "flex";
|
|
117
|
+
readonly value: "flex";
|
|
118
|
+
}];
|
|
119
|
+
declare const flexWrapValues: readonly [{
|
|
120
|
+
readonly key: "nowrap";
|
|
121
|
+
readonly value: "nowrap";
|
|
122
|
+
}, {
|
|
123
|
+
readonly key: "wrap";
|
|
124
|
+
readonly value: "wrap";
|
|
125
|
+
}, {
|
|
126
|
+
readonly key: "wrap-reverse";
|
|
127
|
+
readonly value: "wrap-reverse";
|
|
128
|
+
}];
|
|
6
129
|
export declare const flexLayout: readonly [{
|
|
130
|
+
readonly key: "display";
|
|
131
|
+
readonly className: "teddy-display";
|
|
132
|
+
readonly values: readonly [{
|
|
133
|
+
readonly key: "none";
|
|
134
|
+
readonly value: "none";
|
|
135
|
+
}, {
|
|
136
|
+
readonly key: "inline-flex";
|
|
137
|
+
readonly value: "inline-flex";
|
|
138
|
+
}, {
|
|
139
|
+
readonly key: "flex";
|
|
140
|
+
readonly value: "flex";
|
|
141
|
+
}];
|
|
142
|
+
}, {
|
|
143
|
+
readonly key: "wrap";
|
|
144
|
+
readonly className: "teddy-fw";
|
|
145
|
+
readonly values: readonly [{
|
|
146
|
+
readonly key: "nowrap";
|
|
147
|
+
readonly value: "nowrap";
|
|
148
|
+
}, {
|
|
149
|
+
readonly key: "wrap";
|
|
150
|
+
readonly value: "wrap";
|
|
151
|
+
}, {
|
|
152
|
+
readonly key: "wrap-reverse";
|
|
153
|
+
readonly value: "wrap-reverse";
|
|
154
|
+
}];
|
|
155
|
+
}, {
|
|
156
|
+
readonly key: "direction";
|
|
157
|
+
readonly className: "teddy-fd";
|
|
158
|
+
readonly values: readonly [{
|
|
159
|
+
readonly key: "row";
|
|
160
|
+
readonly value: "row";
|
|
161
|
+
}, {
|
|
162
|
+
readonly key: "row-reverse";
|
|
163
|
+
readonly value: "row-reverse";
|
|
164
|
+
}, {
|
|
165
|
+
readonly key: "column";
|
|
166
|
+
readonly value: "column";
|
|
167
|
+
}, {
|
|
168
|
+
readonly key: "column-reverse";
|
|
169
|
+
readonly value: "column-reverse";
|
|
170
|
+
}];
|
|
171
|
+
}];
|
|
172
|
+
export declare const flexChildren: readonly [{
|
|
7
173
|
readonly key: "flexGrow";
|
|
8
174
|
readonly className: "teddy-fg";
|
|
9
|
-
readonly values: readonly [
|
|
175
|
+
readonly values: readonly [{
|
|
176
|
+
readonly key: "0";
|
|
177
|
+
readonly value: "0";
|
|
178
|
+
}, {
|
|
179
|
+
readonly key: "1";
|
|
180
|
+
readonly value: "1";
|
|
181
|
+
}];
|
|
10
182
|
}, {
|
|
11
183
|
readonly key: "flexShrink";
|
|
12
184
|
readonly className: "teddy-fs";
|
|
13
|
-
readonly values: readonly [
|
|
185
|
+
readonly values: readonly [{
|
|
186
|
+
readonly key: "0";
|
|
187
|
+
readonly value: "0";
|
|
188
|
+
}, {
|
|
189
|
+
readonly key: "1";
|
|
190
|
+
readonly value: "1";
|
|
191
|
+
}];
|
|
14
192
|
}, {
|
|
15
193
|
readonly key: "flexBasis";
|
|
16
194
|
readonly className: "teddy-fb";
|
|
17
|
-
readonly values: readonly [
|
|
195
|
+
readonly values: readonly [{
|
|
196
|
+
readonly key: "0";
|
|
197
|
+
readonly value: "var(--teddy-spacing-0)";
|
|
198
|
+
}, {
|
|
199
|
+
readonly key: "10";
|
|
200
|
+
readonly value: "var(--teddy-spacing-10)";
|
|
201
|
+
}, {
|
|
202
|
+
readonly key: "25";
|
|
203
|
+
readonly value: "var(--teddy-spacing-25)";
|
|
204
|
+
}, {
|
|
205
|
+
readonly key: "50";
|
|
206
|
+
readonly value: "var(--teddy-spacing-50)";
|
|
207
|
+
}, {
|
|
208
|
+
readonly key: "100";
|
|
209
|
+
readonly value: "var(--teddy-spacing-100)";
|
|
210
|
+
}, {
|
|
211
|
+
readonly key: "150";
|
|
212
|
+
readonly value: "var(--teddy-spacing-150)";
|
|
213
|
+
}, {
|
|
214
|
+
readonly key: "200";
|
|
215
|
+
readonly value: "var(--teddy-spacing-200)";
|
|
216
|
+
}, {
|
|
217
|
+
readonly key: "250";
|
|
218
|
+
readonly value: "var(--teddy-spacing-250)";
|
|
219
|
+
}, {
|
|
220
|
+
readonly key: "300";
|
|
221
|
+
readonly value: "var(--teddy-spacing-300)";
|
|
222
|
+
}, {
|
|
223
|
+
readonly key: "400";
|
|
224
|
+
readonly value: "var(--teddy-spacing-400)";
|
|
225
|
+
}, {
|
|
226
|
+
readonly key: "600";
|
|
227
|
+
readonly value: "var(--teddy-spacing-600)";
|
|
228
|
+
}, {
|
|
229
|
+
readonly key: "800";
|
|
230
|
+
readonly value: "var(--teddy-spacing-800)";
|
|
231
|
+
}, {
|
|
232
|
+
readonly key: "1000";
|
|
233
|
+
readonly value: "var(--teddy-spacing-1000)";
|
|
234
|
+
}, {
|
|
235
|
+
readonly key: "1200";
|
|
236
|
+
readonly value: "var(--teddy-spacing-1200)";
|
|
237
|
+
}, {
|
|
238
|
+
readonly key: "1600";
|
|
239
|
+
readonly value: "var(--teddy-spacing-1600)";
|
|
240
|
+
}, {
|
|
241
|
+
readonly key: "gutter-sm";
|
|
242
|
+
readonly value: "var(--teddy-spacing-gutter-sm)";
|
|
243
|
+
}, {
|
|
244
|
+
readonly key: "gutter-md";
|
|
245
|
+
readonly value: "var(--teddy-spacing-gutter-md)";
|
|
246
|
+
}, {
|
|
247
|
+
readonly key: "gutter-lg";
|
|
248
|
+
readonly value: "var(--teddy-spacing-gutter-lg)";
|
|
249
|
+
}, {
|
|
250
|
+
readonly key: "gutter-xl";
|
|
251
|
+
readonly value: "var(--teddy-spacing-gutter-xl)";
|
|
252
|
+
}, {
|
|
253
|
+
readonly key: "page-padding-sm";
|
|
254
|
+
readonly value: "var(--teddy-spacing-page-padding-sm)";
|
|
255
|
+
}, {
|
|
256
|
+
readonly key: "page-padding-md";
|
|
257
|
+
readonly value: "var(--teddy-spacing-page-padding-md)";
|
|
258
|
+
}, {
|
|
259
|
+
readonly key: "page-padding-lg";
|
|
260
|
+
readonly value: "var(--teddy-spacing-page-padding-lg)";
|
|
261
|
+
}, {
|
|
262
|
+
readonly key: "page-padding-xl";
|
|
263
|
+
readonly value: "var(--teddy-spacing-page-padding-xl)";
|
|
264
|
+
}, {
|
|
265
|
+
readonly key: "auto";
|
|
266
|
+
readonly value: "auto";
|
|
267
|
+
}, {
|
|
268
|
+
readonly key: "full";
|
|
269
|
+
readonly value: "100%";
|
|
270
|
+
}, {
|
|
271
|
+
readonly key: "1/2";
|
|
272
|
+
readonly value: "50%";
|
|
273
|
+
}];
|
|
18
274
|
}];
|
|
19
|
-
export type
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
275
|
+
export type FlexLayout = {
|
|
276
|
+
/**
|
|
277
|
+
* The display of the flex. It can be 'none', 'inline-flex', 'flex' or a responsive value.
|
|
278
|
+
* @default 'flex'
|
|
279
|
+
*/
|
|
280
|
+
display?: Responsive<(typeof displayFlexValues)[number]['key']>;
|
|
281
|
+
direction?: Responsive<(typeof flexDirectionValues)[number]['key']>;
|
|
282
|
+
wrap?: Responsive<(typeof flexWrapValues)[number]['key']>;
|
|
283
|
+
};
|
|
284
|
+
export type FlexChildren = {
|
|
285
|
+
flexBasis?: Responsive<(typeof flexBasisValues)[number]['key']>;
|
|
286
|
+
flexGrow?: Responsive<(typeof flexGrowValues)[number]['key']>;
|
|
287
|
+
flexShrink?: Responsive<(typeof flexShrinkValues)[number]['key']>;
|
|
23
288
|
};
|
|
289
|
+
export {};
|
|
290
|
+
/**
|
|
291
|
+
* The direction of the flex items. It can be 'row', 'column', 'row-reverse', 'column-reverse' or a responsive value.
|
|
292
|
+
* A responsive value is an object with the keys 'sm', 'md', 'lg', 'xl' and a value for the corresponding breakpoint.
|
|
293
|
+
* @example direction={{ sm: 'row', md: 'column' }}
|
|
294
|
+
*/
|
|
@@ -1,9 +1,46 @@
|
|
|
1
|
-
import { spacingValues as
|
|
2
|
-
const
|
|
1
|
+
import { spacingValues as l } from "./util.js";
|
|
2
|
+
const e = [
|
|
3
|
+
{ key: "0", value: "0" },
|
|
4
|
+
{ key: "1", value: "1" }
|
|
5
|
+
], a = e, s = [
|
|
6
|
+
...l,
|
|
7
|
+
{ key: "auto", value: "auto" },
|
|
8
|
+
{ key: "full", value: "100%" },
|
|
9
|
+
{ key: "1/2", value: "50%" }
|
|
10
|
+
], u = [
|
|
11
|
+
{ key: "row", value: "row" },
|
|
12
|
+
{ key: "row-reverse", value: "row-reverse" },
|
|
13
|
+
{ key: "column", value: "column" },
|
|
14
|
+
{ key: "column-reverse", value: "column-reverse" }
|
|
15
|
+
], r = [
|
|
16
|
+
{ key: "none", value: "none" },
|
|
17
|
+
{ key: "inline-flex", value: "inline-flex" },
|
|
18
|
+
{ key: "flex", value: "flex" }
|
|
19
|
+
], y = [
|
|
20
|
+
{ key: "nowrap", value: "nowrap" },
|
|
21
|
+
{ key: "wrap", value: "wrap" },
|
|
22
|
+
{ key: "wrap-reverse", value: "wrap-reverse" }
|
|
23
|
+
], n = [
|
|
24
|
+
{
|
|
25
|
+
key: "display",
|
|
26
|
+
className: "teddy-display",
|
|
27
|
+
values: r
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
key: "wrap",
|
|
31
|
+
className: "teddy-fw",
|
|
32
|
+
values: y
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
key: "direction",
|
|
36
|
+
className: "teddy-fd",
|
|
37
|
+
values: u
|
|
38
|
+
}
|
|
39
|
+
], v = [
|
|
3
40
|
{
|
|
4
41
|
key: "flexGrow",
|
|
5
42
|
className: "teddy-fg",
|
|
6
|
-
values:
|
|
43
|
+
values: e
|
|
7
44
|
},
|
|
8
45
|
{
|
|
9
46
|
key: "flexShrink",
|
|
@@ -13,12 +50,11 @@ const s = ["0", "1"], a = ["0", "1"], l = [...e, "auto", "100%", "50%"], o = [
|
|
|
13
50
|
{
|
|
14
51
|
key: "flexBasis",
|
|
15
52
|
className: "teddy-fb",
|
|
16
|
-
values:
|
|
53
|
+
values: s
|
|
17
54
|
}
|
|
18
55
|
];
|
|
19
56
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
a as flexShrinkValues
|
|
57
|
+
r as displayFlexValues,
|
|
58
|
+
v as flexChildren,
|
|
59
|
+
n as flexLayout
|
|
24
60
|
};
|