@atom-learning/components 1.2.1 → 1.3.1
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/components/action-icon/ActionIcon.d.ts +1 -1
- package/dist/components/action-icon/ActionIcon.js +1 -1
- package/dist/components/table/Table.d.ts +1 -0
- package/dist/components/table/Table.js +1 -1
- package/dist/components/table/TableHeader.d.ts +7 -1
- package/dist/components/table/TableHeader.js +1 -1
- package/dist/components/table/TableHeaderCell.js +1 -1
- package/dist/components/table/TableRow.js +1 -1
- package/dist/components/tabs/TabTrigger.d.ts +5 -3
- package/dist/components/tabs/TabTrigger.js +1 -1
- package/dist/components/tabs/Tabs.d.ts +8 -268
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/tabs/TabsTriggerList.d.ts +273 -0
- package/dist/components/tabs/TabsTriggerList.js +1 -0
- package/dist/components/tabs/utils.d.ts +2 -0
- package/dist/components/tabs/utils.js +1 -0
- package/dist/components/video/Video.d.ts +265 -1
- package/dist/components/video/Video.js +1 -1
- package/dist/docgen.json +1 -1
- package/dist/docs/Table.mdx +14 -0
- package/dist/docs/Tabs.mdx +9 -1
- package/dist/index.cjs.js +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ListProps extends React.ComponentProps<typeof StyledTriggerList> {
|
|
3
|
+
enableTabScrolling?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const StyledTriggerList: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsListProps & React.RefAttributes<HTMLDivElement>>, {
|
|
6
|
+
theme?: "dark" | "light" | undefined;
|
|
7
|
+
}, {
|
|
8
|
+
sm: string;
|
|
9
|
+
md: string;
|
|
10
|
+
lg: string;
|
|
11
|
+
xl: string;
|
|
12
|
+
reducedMotion: string;
|
|
13
|
+
allowMotion: string;
|
|
14
|
+
hover: string;
|
|
15
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
16
|
+
sm: string;
|
|
17
|
+
md: string;
|
|
18
|
+
lg: string;
|
|
19
|
+
xl: string;
|
|
20
|
+
reducedMotion: string;
|
|
21
|
+
allowMotion: string;
|
|
22
|
+
hover: string;
|
|
23
|
+
}, {
|
|
24
|
+
colors: {
|
|
25
|
+
textForeground: any;
|
|
26
|
+
textSubtle: any;
|
|
27
|
+
textPlaceholder: any;
|
|
28
|
+
background: any;
|
|
29
|
+
backgroundAccent: any;
|
|
30
|
+
tonal50: any;
|
|
31
|
+
tonal100: any;
|
|
32
|
+
tonal200: any;
|
|
33
|
+
tonal300: any;
|
|
34
|
+
tonal400: any;
|
|
35
|
+
tonal500: any;
|
|
36
|
+
tonal600: any;
|
|
37
|
+
alpha100: any;
|
|
38
|
+
alpha150: any;
|
|
39
|
+
alpha200: any;
|
|
40
|
+
alpha250: any;
|
|
41
|
+
alpha600: any;
|
|
42
|
+
primaryLight: any;
|
|
43
|
+
primary: any;
|
|
44
|
+
primaryMid: any;
|
|
45
|
+
primaryDark: any;
|
|
46
|
+
secondary: any;
|
|
47
|
+
brandRed: any;
|
|
48
|
+
brandRedAccent: any;
|
|
49
|
+
brandGreen: any;
|
|
50
|
+
brandGreenAccent: any;
|
|
51
|
+
brandPurple: any;
|
|
52
|
+
brandPurpleAccent: any;
|
|
53
|
+
brandYellow: any;
|
|
54
|
+
brandYellowAccent: any;
|
|
55
|
+
successLight: any;
|
|
56
|
+
success: any;
|
|
57
|
+
successMid: any;
|
|
58
|
+
successDark: any;
|
|
59
|
+
dangerLight: any;
|
|
60
|
+
danger: any;
|
|
61
|
+
dangerMid: any;
|
|
62
|
+
dangerDark: any;
|
|
63
|
+
warningLight: any;
|
|
64
|
+
warning: any;
|
|
65
|
+
warningMid: any;
|
|
66
|
+
warningDark: any;
|
|
67
|
+
subjectEnglish: any;
|
|
68
|
+
subjectMaths: any;
|
|
69
|
+
subjectScience: any;
|
|
70
|
+
subjectVerbalReasoning: any;
|
|
71
|
+
subjectNonVerbalReasoning: any;
|
|
72
|
+
subjectCreativeWriting: any;
|
|
73
|
+
subjectExamSkills: any;
|
|
74
|
+
};
|
|
75
|
+
space: {
|
|
76
|
+
"0": any;
|
|
77
|
+
"1": any;
|
|
78
|
+
"2": any;
|
|
79
|
+
"3": any;
|
|
80
|
+
"4": any;
|
|
81
|
+
"5": any;
|
|
82
|
+
"6": any;
|
|
83
|
+
"7": any;
|
|
84
|
+
"8": any;
|
|
85
|
+
"9": any;
|
|
86
|
+
};
|
|
87
|
+
fontSizes: {
|
|
88
|
+
xs: any;
|
|
89
|
+
sm: any;
|
|
90
|
+
md: any;
|
|
91
|
+
lg: any;
|
|
92
|
+
xl: any;
|
|
93
|
+
"2xl": any;
|
|
94
|
+
"3xl": any;
|
|
95
|
+
"4xl": any;
|
|
96
|
+
};
|
|
97
|
+
fonts: {
|
|
98
|
+
sans: any;
|
|
99
|
+
mono: any;
|
|
100
|
+
display: any;
|
|
101
|
+
body: any;
|
|
102
|
+
};
|
|
103
|
+
sizes: {
|
|
104
|
+
"0": any;
|
|
105
|
+
"1": any;
|
|
106
|
+
"2": any;
|
|
107
|
+
"3": any;
|
|
108
|
+
"4": any;
|
|
109
|
+
"5": any;
|
|
110
|
+
"6": any;
|
|
111
|
+
"7": any;
|
|
112
|
+
"8": any;
|
|
113
|
+
};
|
|
114
|
+
radii: {
|
|
115
|
+
"0": any;
|
|
116
|
+
"1": any;
|
|
117
|
+
"2": any;
|
|
118
|
+
"3": any;
|
|
119
|
+
round: any;
|
|
120
|
+
};
|
|
121
|
+
shadows: {
|
|
122
|
+
"0": any;
|
|
123
|
+
"1": any;
|
|
124
|
+
"2": any;
|
|
125
|
+
"3": any;
|
|
126
|
+
};
|
|
127
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
128
|
+
bg: (value: {
|
|
129
|
+
readonly [$$PropertyValue]: "background";
|
|
130
|
+
}) => {
|
|
131
|
+
background: {
|
|
132
|
+
readonly [$$PropertyValue]: "background";
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
inset: (value: string | number | {
|
|
136
|
+
readonly [$$ScaleValue]: "space";
|
|
137
|
+
}) => {
|
|
138
|
+
top: string | number | {
|
|
139
|
+
readonly [$$ScaleValue]: "space";
|
|
140
|
+
};
|
|
141
|
+
right: string | number | {
|
|
142
|
+
readonly [$$ScaleValue]: "space";
|
|
143
|
+
};
|
|
144
|
+
bottom: string | number | {
|
|
145
|
+
readonly [$$ScaleValue]: "space";
|
|
146
|
+
};
|
|
147
|
+
left: string | number | {
|
|
148
|
+
readonly [$$ScaleValue]: "space";
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
size: (value: string | number | {
|
|
152
|
+
readonly [$$ScaleValue]: "size";
|
|
153
|
+
}) => {
|
|
154
|
+
height: string | number | {
|
|
155
|
+
readonly [$$ScaleValue]: "size";
|
|
156
|
+
};
|
|
157
|
+
width: string | number | {
|
|
158
|
+
readonly [$$ScaleValue]: "size";
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
p: (value: string | number | {
|
|
162
|
+
readonly [$$ScaleValue]: "space";
|
|
163
|
+
}) => {
|
|
164
|
+
padding: string | number | {
|
|
165
|
+
readonly [$$ScaleValue]: "space";
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
pt: (value: string | number | {
|
|
169
|
+
readonly [$$ScaleValue]: "space";
|
|
170
|
+
}) => {
|
|
171
|
+
paddingTop: string | number | {
|
|
172
|
+
readonly [$$ScaleValue]: "space";
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
pr: (value: string | number | {
|
|
176
|
+
readonly [$$ScaleValue]: "space";
|
|
177
|
+
}) => {
|
|
178
|
+
paddingRight: string | number | {
|
|
179
|
+
readonly [$$ScaleValue]: "space";
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
pb: (value: string | number | {
|
|
183
|
+
readonly [$$ScaleValue]: "space";
|
|
184
|
+
}) => {
|
|
185
|
+
paddingBottom: string | number | {
|
|
186
|
+
readonly [$$ScaleValue]: "space";
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
pl: (value: string | number | {
|
|
190
|
+
readonly [$$ScaleValue]: "space";
|
|
191
|
+
}) => {
|
|
192
|
+
paddingLeft: string | number | {
|
|
193
|
+
readonly [$$ScaleValue]: "space";
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
px: (value: string | number | {
|
|
197
|
+
readonly [$$ScaleValue]: "space";
|
|
198
|
+
}) => {
|
|
199
|
+
paddingLeft: string | number | {
|
|
200
|
+
readonly [$$ScaleValue]: "space";
|
|
201
|
+
};
|
|
202
|
+
paddingRight: string | number | {
|
|
203
|
+
readonly [$$ScaleValue]: "space";
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
py: (value: string | number | {
|
|
207
|
+
readonly [$$ScaleValue]: "space";
|
|
208
|
+
}) => {
|
|
209
|
+
paddingTop: string | number | {
|
|
210
|
+
readonly [$$ScaleValue]: "space";
|
|
211
|
+
};
|
|
212
|
+
paddingBottom: string | number | {
|
|
213
|
+
readonly [$$ScaleValue]: "space";
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
m: (value: string | number | {
|
|
217
|
+
readonly [$$ScaleValue]: "space";
|
|
218
|
+
}) => {
|
|
219
|
+
margin: string | number | {
|
|
220
|
+
readonly [$$ScaleValue]: "space";
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
mt: (value: string | number | {
|
|
224
|
+
readonly [$$ScaleValue]: "space";
|
|
225
|
+
}) => {
|
|
226
|
+
marginTop: string | number | {
|
|
227
|
+
readonly [$$ScaleValue]: "space";
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
mr: (value: string | number | {
|
|
231
|
+
readonly [$$ScaleValue]: "space";
|
|
232
|
+
}) => {
|
|
233
|
+
marginRight: string | number | {
|
|
234
|
+
readonly [$$ScaleValue]: "space";
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
mb: (value: string | number | {
|
|
238
|
+
readonly [$$ScaleValue]: "space";
|
|
239
|
+
}) => {
|
|
240
|
+
marginBottom: string | number | {
|
|
241
|
+
readonly [$$ScaleValue]: "space";
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
ml: (value: string | number | {
|
|
245
|
+
readonly [$$ScaleValue]: "space";
|
|
246
|
+
}) => {
|
|
247
|
+
marginLeft: string | number | {
|
|
248
|
+
readonly [$$ScaleValue]: "space";
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
mx: (value: string | number | {
|
|
252
|
+
readonly [$$ScaleValue]: "space";
|
|
253
|
+
}) => {
|
|
254
|
+
marginLeft: string | number | {
|
|
255
|
+
readonly [$$ScaleValue]: "space";
|
|
256
|
+
};
|
|
257
|
+
marginRight: string | number | {
|
|
258
|
+
readonly [$$ScaleValue]: "space";
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
my: (value: string | number | {
|
|
262
|
+
readonly [$$ScaleValue]: "space";
|
|
263
|
+
}) => {
|
|
264
|
+
marginTop: string | number | {
|
|
265
|
+
readonly [$$ScaleValue]: "space";
|
|
266
|
+
};
|
|
267
|
+
marginBottom: string | number | {
|
|
268
|
+
readonly [$$ScaleValue]: "space";
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
}>>;
|
|
272
|
+
export declare const TriggerListWrapper: React.FC<ListProps>;
|
|
273
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=["children","theme","enableTabScrolling"];import{List as t}from"@radix-ui/react-tabs";import r,{useRef as o,useState as i,useCallback as l,useEffect as n}from"react";import{ChevronLeft as s,ChevronRight as c}from"@atom-learning/icons";import{opacify as a}from"polished";import{debounce as m}from"throttle-debounce";import{theme as f,styled as h}from"../../stitches.js";import{ActionIcon as d}from"../action-icon/ActionIcon.js";import{Flex as b}from"../flex/Flex.js";import{Icon as p}from"../icon/Icon.js";import{TabTrigger as u}from"./TabTrigger.js";import{passPropsToChildren as g}from"./utils.js";const v=h(d,{position:"absolute",transition:"all 125ms",variants:{theme:{light:{bg:`${a(-.2,"white")} !important`},dark:{bg:`${a(-.2,f.colors.primaryDark.value)} !important`,color:"currentColor !important"}},visible:{true:{opacity:1,visibility:"visible",pointerEvents:"all"},false:{opacity:0,visibility:"hidden",pointerEvents:"none"}}}}),x=h(t,{flexShrink:0,display:"flex",width:"100%",overflowX:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none",variants:{theme:{light:{borderBottom:"1px solid $tonal300"},dark:{bg:"$primaryDark",borderBottom:"1px solid $tonal200"}}}}),E=t=>{let{children:a,theme:f,enableTabScrolling:h}=t,d=function(e,t){if(null==e)return{};var r,o,i={},l=Object.keys(e);for(o=0;o<l.length;o++)r=l[o],t.indexOf(r)>=0||(i[r]=e[r]);return i}(t,e);const E=o(null),[w,j]=i(!1),[k,y]=i(!1),[W,z]=i(),L=l((e=>{const t=E.current;if(t){const{scrollWidth:r,scrollLeft:o}=t,i=Math.round(r/4);let l=o;if("right"===e){const e=t.scrollLeft+i;l=e<=r?e:o}else{const e=o-i;l=e>0?e:0}t.scroll({left:l,behavior:"smooth"}),setTimeout((()=>{const{scrollWidth:e,scrollLeft:r,offsetWidth:o}=t;0===r?(j(!1),y(!0)):r+o===e?(y(!1),j(!0)):(j(!0),y(!0))}),500)}}),[]);n((()=>{const e=m(500,(()=>{z(window.innerWidth)}));return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),n((()=>{const e=E.current;if(e){const{offsetWidth:t,scrollWidth:r}=e,o=r>t;null==e.scroll||e.scroll({left:0}),j(!1),y(o)}}),[W]);return w||k||h?r.createElement(b,{css:{position:"relative"}},r.createElement(v,{size:"xl",label:"Scroll Left",theme:f,onClick:()=>L("left"),visible:w,css:{left:0}},r.createElement(p,{is:s,size:"lg"})),r.createElement(x,Object.assign({},d,{ref:E,theme:f}),g(a,{theme:f},[u])),r.createElement(v,{size:"xl",label:"Scroll right",theme:f,onClick:()=>L("right"),visible:k,css:{right:0}},r.createElement(p,{is:c,size:"lg"}))):r.createElement(x,Object.assign({theme:f},d,{ref:E}),g(a,{theme:f},[u]))};export{E as TriggerListWrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(){return(t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}import e from"react";const n=(n,r,o=[])=>e.Children.map(n,(n=>e.isValidElement(n)&&o.includes(null==n?void 0:n.type)?e.cloneElement(n,t({},r)):n));export{n as passPropsToChildren};
|
|
@@ -272,5 +272,269 @@ declare type VideoProps = Override<React.ComponentPropsWithoutRef<typeof StyledV
|
|
|
272
272
|
ratio?: number;
|
|
273
273
|
css?: CSS;
|
|
274
274
|
}>;
|
|
275
|
-
export declare const Video: React.
|
|
275
|
+
export declare const Video: React.ForwardRefExoticComponent<Pick<VideoProps, string | number> & React.RefAttributes<import("@stitches/react/types/styled-component").StyledComponent<typeof ReactPlayer, {}, {
|
|
276
|
+
sm: string;
|
|
277
|
+
md: string;
|
|
278
|
+
lg: string;
|
|
279
|
+
xl: string;
|
|
280
|
+
reducedMotion: string;
|
|
281
|
+
allowMotion: string;
|
|
282
|
+
hover: string;
|
|
283
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
284
|
+
sm: string;
|
|
285
|
+
md: string;
|
|
286
|
+
lg: string;
|
|
287
|
+
xl: string;
|
|
288
|
+
reducedMotion: string;
|
|
289
|
+
allowMotion: string;
|
|
290
|
+
hover: string;
|
|
291
|
+
}, {
|
|
292
|
+
colors: {
|
|
293
|
+
textForeground: any;
|
|
294
|
+
textSubtle: any;
|
|
295
|
+
textPlaceholder: any;
|
|
296
|
+
background: any;
|
|
297
|
+
backgroundAccent: any;
|
|
298
|
+
tonal50: any;
|
|
299
|
+
tonal100: any;
|
|
300
|
+
tonal200: any;
|
|
301
|
+
tonal300: any;
|
|
302
|
+
tonal400: any;
|
|
303
|
+
tonal500: any;
|
|
304
|
+
tonal600: any;
|
|
305
|
+
alpha100: any;
|
|
306
|
+
alpha150: any;
|
|
307
|
+
alpha200: any;
|
|
308
|
+
alpha250: any;
|
|
309
|
+
alpha600: any;
|
|
310
|
+
primaryLight: any;
|
|
311
|
+
primary: any;
|
|
312
|
+
primaryMid: any;
|
|
313
|
+
primaryDark: any;
|
|
314
|
+
secondary: any;
|
|
315
|
+
brandRed: any;
|
|
316
|
+
brandRedAccent: any;
|
|
317
|
+
brandGreen: any;
|
|
318
|
+
brandGreenAccent: any;
|
|
319
|
+
brandPurple: any;
|
|
320
|
+
brandPurpleAccent: any;
|
|
321
|
+
brandYellow: any;
|
|
322
|
+
brandYellowAccent: any;
|
|
323
|
+
successLight: any;
|
|
324
|
+
success: any;
|
|
325
|
+
successMid: any;
|
|
326
|
+
successDark: any;
|
|
327
|
+
dangerLight: any;
|
|
328
|
+
danger: any;
|
|
329
|
+
dangerMid: any;
|
|
330
|
+
dangerDark: any;
|
|
331
|
+
warningLight: any;
|
|
332
|
+
warning: any;
|
|
333
|
+
warningMid: any;
|
|
334
|
+
warningDark: any;
|
|
335
|
+
subjectEnglish: any;
|
|
336
|
+
subjectMaths: any;
|
|
337
|
+
subjectScience: any;
|
|
338
|
+
subjectVerbalReasoning: any;
|
|
339
|
+
subjectNonVerbalReasoning: any;
|
|
340
|
+
subjectCreativeWriting: any;
|
|
341
|
+
subjectExamSkills: any;
|
|
342
|
+
};
|
|
343
|
+
space: {
|
|
344
|
+
"0": any;
|
|
345
|
+
"1": any;
|
|
346
|
+
"2": any;
|
|
347
|
+
"3": any;
|
|
348
|
+
"4": any;
|
|
349
|
+
"5": any;
|
|
350
|
+
"6": any;
|
|
351
|
+
"7": any;
|
|
352
|
+
"8": any;
|
|
353
|
+
"9": any;
|
|
354
|
+
};
|
|
355
|
+
fontSizes: {
|
|
356
|
+
xs: any;
|
|
357
|
+
sm: any;
|
|
358
|
+
md: any;
|
|
359
|
+
lg: any;
|
|
360
|
+
xl: any;
|
|
361
|
+
"2xl": any;
|
|
362
|
+
"3xl": any;
|
|
363
|
+
"4xl": any;
|
|
364
|
+
};
|
|
365
|
+
fonts: {
|
|
366
|
+
sans: any;
|
|
367
|
+
mono: any;
|
|
368
|
+
display: any;
|
|
369
|
+
body: any;
|
|
370
|
+
};
|
|
371
|
+
sizes: {
|
|
372
|
+
"0": any;
|
|
373
|
+
"1": any;
|
|
374
|
+
"2": any;
|
|
375
|
+
"3": any;
|
|
376
|
+
"4": any;
|
|
377
|
+
"5": any;
|
|
378
|
+
"6": any;
|
|
379
|
+
"7": any;
|
|
380
|
+
"8": any;
|
|
381
|
+
};
|
|
382
|
+
radii: {
|
|
383
|
+
"0": any;
|
|
384
|
+
"1": any;
|
|
385
|
+
"2": any;
|
|
386
|
+
"3": any;
|
|
387
|
+
round: any;
|
|
388
|
+
};
|
|
389
|
+
shadows: {
|
|
390
|
+
"0": any;
|
|
391
|
+
"1": any;
|
|
392
|
+
"2": any;
|
|
393
|
+
"3": any;
|
|
394
|
+
};
|
|
395
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
396
|
+
bg: (value: {
|
|
397
|
+
readonly [$$PropertyValue]: "background";
|
|
398
|
+
}) => {
|
|
399
|
+
background: {
|
|
400
|
+
readonly [$$PropertyValue]: "background";
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
inset: (value: string | number | {
|
|
404
|
+
readonly [$$ScaleValue]: "space";
|
|
405
|
+
}) => {
|
|
406
|
+
top: string | number | {
|
|
407
|
+
readonly [$$ScaleValue]: "space";
|
|
408
|
+
};
|
|
409
|
+
right: string | number | {
|
|
410
|
+
readonly [$$ScaleValue]: "space";
|
|
411
|
+
};
|
|
412
|
+
bottom: string | number | {
|
|
413
|
+
readonly [$$ScaleValue]: "space";
|
|
414
|
+
};
|
|
415
|
+
left: string | number | {
|
|
416
|
+
readonly [$$ScaleValue]: "space";
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
size: (value: string | number | {
|
|
420
|
+
readonly [$$ScaleValue]: "size";
|
|
421
|
+
}) => {
|
|
422
|
+
height: string | number | {
|
|
423
|
+
readonly [$$ScaleValue]: "size";
|
|
424
|
+
};
|
|
425
|
+
width: string | number | {
|
|
426
|
+
readonly [$$ScaleValue]: "size";
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
p: (value: string | number | {
|
|
430
|
+
readonly [$$ScaleValue]: "space";
|
|
431
|
+
}) => {
|
|
432
|
+
padding: string | number | {
|
|
433
|
+
readonly [$$ScaleValue]: "space";
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
pt: (value: string | number | {
|
|
437
|
+
readonly [$$ScaleValue]: "space";
|
|
438
|
+
}) => {
|
|
439
|
+
paddingTop: string | number | {
|
|
440
|
+
readonly [$$ScaleValue]: "space";
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
pr: (value: string | number | {
|
|
444
|
+
readonly [$$ScaleValue]: "space";
|
|
445
|
+
}) => {
|
|
446
|
+
paddingRight: string | number | {
|
|
447
|
+
readonly [$$ScaleValue]: "space";
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
pb: (value: string | number | {
|
|
451
|
+
readonly [$$ScaleValue]: "space";
|
|
452
|
+
}) => {
|
|
453
|
+
paddingBottom: string | number | {
|
|
454
|
+
readonly [$$ScaleValue]: "space";
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
pl: (value: string | number | {
|
|
458
|
+
readonly [$$ScaleValue]: "space";
|
|
459
|
+
}) => {
|
|
460
|
+
paddingLeft: string | number | {
|
|
461
|
+
readonly [$$ScaleValue]: "space";
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
px: (value: string | number | {
|
|
465
|
+
readonly [$$ScaleValue]: "space";
|
|
466
|
+
}) => {
|
|
467
|
+
paddingLeft: string | number | {
|
|
468
|
+
readonly [$$ScaleValue]: "space";
|
|
469
|
+
};
|
|
470
|
+
paddingRight: string | number | {
|
|
471
|
+
readonly [$$ScaleValue]: "space";
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
py: (value: string | number | {
|
|
475
|
+
readonly [$$ScaleValue]: "space";
|
|
476
|
+
}) => {
|
|
477
|
+
paddingTop: string | number | {
|
|
478
|
+
readonly [$$ScaleValue]: "space";
|
|
479
|
+
};
|
|
480
|
+
paddingBottom: string | number | {
|
|
481
|
+
readonly [$$ScaleValue]: "space";
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
m: (value: string | number | {
|
|
485
|
+
readonly [$$ScaleValue]: "space";
|
|
486
|
+
}) => {
|
|
487
|
+
margin: string | number | {
|
|
488
|
+
readonly [$$ScaleValue]: "space";
|
|
489
|
+
};
|
|
490
|
+
};
|
|
491
|
+
mt: (value: string | number | {
|
|
492
|
+
readonly [$$ScaleValue]: "space";
|
|
493
|
+
}) => {
|
|
494
|
+
marginTop: string | number | {
|
|
495
|
+
readonly [$$ScaleValue]: "space";
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
mr: (value: string | number | {
|
|
499
|
+
readonly [$$ScaleValue]: "space";
|
|
500
|
+
}) => {
|
|
501
|
+
marginRight: string | number | {
|
|
502
|
+
readonly [$$ScaleValue]: "space";
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
mb: (value: string | number | {
|
|
506
|
+
readonly [$$ScaleValue]: "space";
|
|
507
|
+
}) => {
|
|
508
|
+
marginBottom: string | number | {
|
|
509
|
+
readonly [$$ScaleValue]: "space";
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
ml: (value: string | number | {
|
|
513
|
+
readonly [$$ScaleValue]: "space";
|
|
514
|
+
}) => {
|
|
515
|
+
marginLeft: string | number | {
|
|
516
|
+
readonly [$$ScaleValue]: "space";
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
mx: (value: string | number | {
|
|
520
|
+
readonly [$$ScaleValue]: "space";
|
|
521
|
+
}) => {
|
|
522
|
+
marginLeft: string | number | {
|
|
523
|
+
readonly [$$ScaleValue]: "space";
|
|
524
|
+
};
|
|
525
|
+
marginRight: string | number | {
|
|
526
|
+
readonly [$$ScaleValue]: "space";
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
my: (value: string | number | {
|
|
530
|
+
readonly [$$ScaleValue]: "space";
|
|
531
|
+
}) => {
|
|
532
|
+
marginTop: string | number | {
|
|
533
|
+
readonly [$$ScaleValue]: "space";
|
|
534
|
+
};
|
|
535
|
+
marginBottom: string | number | {
|
|
536
|
+
readonly [$$ScaleValue]: "space";
|
|
537
|
+
};
|
|
538
|
+
};
|
|
539
|
+
}>>>>;
|
|
276
540
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const r=["id","ratio","css"];import{createElement as
|
|
1
|
+
const r=["id","ratio","css"];import{forwardRef as t,createElement as e}from"react";import i from"react-player/vimeo";import{Box as o}from"../box/Box.js";import{styled as s}from"../../stitches.js";import{CSSWrapper as p}from"../../utilities/css-wrapper/CSSWrapper.js";const a=s(i,{}),c=t(((t,i)=>{let{id:s,ratio:c=9/16,css:n}=t,d=function(r,t){if(null==r)return{};var e,i,o={},s=Object.keys(r);for(i=0;i<s.length;i++)e=s[i],t.indexOf(e)>=0||(o[e]=r[e]);return o}(t,r);return e(p,{css:n},e(o,{css:{borderRadius:"$0",position:"relative",paddingTop:100*c+"%",overflow:"hidden",height:0,width:"100%"}},e(a,Object.assign({},d,{role:"figure",url:`https://player.vimeo.com/video/${s}`,height:"100%",width:"100%",css:{position:"absolute",top:0,left:0},ref:i}))))}));c.displayName="Video";export{c as Video};
|