@webstudio-is/sdk-components-react 0.83.0 → 0.84.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/lib/cjs/components.js +0 -16
- package/lib/cjs/form.ws.js +1 -1
- package/lib/cjs/list.ws.js +1 -1
- package/lib/cjs/metas.js +0 -16
- package/lib/cjs/props.js +0 -16
- package/lib/components.js +0 -24
- package/lib/form.ws.js +1 -1
- package/lib/list.ws.js +1 -1
- package/lib/metas.js +0 -32
- package/lib/props.js +0 -32
- package/lib/types/components.d.ts +0 -3
- package/lib/types/metas.d.ts +0 -3
- package/lib/types/props.d.ts +0 -3
- package/lib/types/vimeo-preview-image.d.ts +3 -3
- package/package.json +8 -13
- package/src/components.ts +0 -11
- package/src/form.ws.tsx +1 -1
- package/src/list.ws.tsx +1 -1
- package/src/metas.ts +0 -21
- package/src/props.ts +0 -19
- package/lib/__generated__/radix-dialog.props.js +0 -2120
- package/lib/__generated__/radix-popover.props.js +0 -463
- package/lib/__generated__/radix-tooltip.props.js +0 -473
- package/lib/cjs/__generated__/radix-dialog.props.js +0 -2140
- package/lib/cjs/__generated__/radix-popover.props.js +0 -483
- package/lib/cjs/__generated__/radix-tooltip.props.js +0 -493
- package/lib/cjs/radix-dialog.js +0 -61
- package/lib/cjs/radix-dialog.ws.js +0 -300
- package/lib/cjs/radix-popover.js +0 -59
- package/lib/cjs/radix-popover.ws.js +0 -139
- package/lib/cjs/radix-tooltip.js +0 -51
- package/lib/cjs/radix-tooltip.ws.js +0 -140
- package/lib/cjs/theme/radix-common-types.js +0 -16
- package/lib/cjs/theme/tailwind-classes.js +0 -439
- package/lib/cjs/theme/tailwind-colors.js +0 -33
- package/lib/cjs/theme/tailwind-theme.js +0 -46
- package/lib/radix-dialog.js +0 -36
- package/lib/radix-dialog.ws.js +0 -279
- package/lib/radix-popover.js +0 -34
- package/lib/radix-popover.ws.js +0 -114
- package/lib/radix-tooltip.js +0 -26
- package/lib/radix-tooltip.ws.js +0 -115
- package/lib/theme/radix-common-types.js +0 -0
- package/lib/theme/tailwind-classes.js +0 -419
- package/lib/theme/tailwind-colors.js +0 -13
- package/lib/theme/tailwind-theme.js +0 -16
- package/lib/types/__generated__/radix-dialog.props.d.ts +0 -8
- package/lib/types/__generated__/radix-popover.props.d.ts +0 -4
- package/lib/types/__generated__/radix-tooltip.props.d.ts +0 -4
- package/lib/types/radix-dialog.d.ts +0 -26
- package/lib/types/radix-dialog.ws.d.ts +0 -23
- package/lib/types/radix-popover.d.ts +0 -22
- package/lib/types/radix-popover.ws.d.ts +0 -15
- package/lib/types/radix-tooltip.d.ts +0 -22
- package/lib/types/radix-tooltip.ws.d.ts +0 -15
- package/lib/types/theme/radix-common-types.d.ts +0 -84
- package/lib/types/theme/tailwind-classes.d.ts +0 -69
- package/lib/types/theme/tailwind-colors.d.ts +0 -19
- package/lib/types/theme/tailwind-theme.d.ts +0 -72
- package/src/__generated__/radix-dialog.props.ts +0 -2363
- package/src/__generated__/radix-popover.props.ts +0 -510
- package/src/__generated__/radix-tooltip.props.ts +0 -521
- package/src/radix-dialog.tsx +0 -91
- package/src/radix-dialog.ws.tsx +0 -291
- package/src/radix-popover.tsx +0 -89
- package/src/radix-popover.ws.tsx +0 -124
- package/src/radix-tooltip.tsx +0 -84
- package/src/radix-tooltip.ws.tsx +0 -125
- package/src/theme/radix-common-types.ts +0 -495
- package/src/theme/tailwind-classes.ts +0 -570
- package/src/theme/tailwind-colors.ts +0 -47
- package/src/theme/tailwind-theme.ts +0 -24
|
@@ -1,419 +0,0 @@
|
|
|
1
|
-
import { theme } from "./tailwind-theme";
|
|
2
|
-
import { parseCssValue, parseBoxShadow } from "@webstudio-is/css-data";
|
|
3
|
-
const preflight = () => {
|
|
4
|
-
const borderColorValue = parseCssValue("color", theme("colors")["border"]);
|
|
5
|
-
return [
|
|
6
|
-
{
|
|
7
|
-
property: "borderTopStyle",
|
|
8
|
-
value: { type: "keyword", value: "solid" }
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
property: "borderRightStyle",
|
|
12
|
-
value: { type: "keyword", value: "solid" }
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
property: "borderBottomStyle",
|
|
16
|
-
value: { type: "keyword", value: "solid" }
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
property: "borderLeftStyle",
|
|
20
|
-
value: { type: "keyword", value: "solid" }
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
property: "borderTopColor",
|
|
24
|
-
value: borderColorValue
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
property: "borderRightColor",
|
|
28
|
-
value: borderColorValue
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
property: "borderBottomColor",
|
|
32
|
-
value: borderColorValue
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
property: "borderLeftColor",
|
|
36
|
-
value: borderColorValue
|
|
37
|
-
}
|
|
38
|
-
];
|
|
39
|
-
};
|
|
40
|
-
const z = (zIndex) => {
|
|
41
|
-
const valueString = theme("zIndex")[zIndex ?? "auto"];
|
|
42
|
-
const value = parseCssValue("zIndex", valueString);
|
|
43
|
-
return [
|
|
44
|
-
{
|
|
45
|
-
property: "zIndex",
|
|
46
|
-
value
|
|
47
|
-
}
|
|
48
|
-
];
|
|
49
|
-
};
|
|
50
|
-
const overflow = (value) => [
|
|
51
|
-
{
|
|
52
|
-
property: "overflow",
|
|
53
|
-
value: { type: "keyword", value }
|
|
54
|
-
}
|
|
55
|
-
];
|
|
56
|
-
const rounded = (radius) => {
|
|
57
|
-
const valueString = theme("borderRadius")[radius ?? "DEFAULT"];
|
|
58
|
-
const value = parseCssValue("borderTopWidth", valueString);
|
|
59
|
-
return [
|
|
60
|
-
{
|
|
61
|
-
property: "borderTopLeftRadius",
|
|
62
|
-
value
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
property: "borderTopRightRadius",
|
|
66
|
-
value
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
property: "borderBottomRightRadius",
|
|
70
|
-
value
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
property: "borderBottomLeftRadius",
|
|
74
|
-
value
|
|
75
|
-
}
|
|
76
|
-
];
|
|
77
|
-
};
|
|
78
|
-
const border = (borderWidth) => {
|
|
79
|
-
const key = `${borderWidth ?? "DEFAULT"}`;
|
|
80
|
-
const valueString = theme("borderWidth")?.[key] ?? "1px";
|
|
81
|
-
const value = parseCssValue("borderTopWidth", valueString);
|
|
82
|
-
return [
|
|
83
|
-
...preflight(),
|
|
84
|
-
{ property: "borderTopWidth", value },
|
|
85
|
-
{ property: "borderRightWidth", value },
|
|
86
|
-
{ property: "borderBottomWidth", value },
|
|
87
|
-
{ property: "borderLeftWidth", value }
|
|
88
|
-
];
|
|
89
|
-
};
|
|
90
|
-
const px = (padding) => {
|
|
91
|
-
const key = `${padding}`;
|
|
92
|
-
const valueString = theme("padding")?.[key] ?? "0";
|
|
93
|
-
const value = parseCssValue("paddingLeft", valueString);
|
|
94
|
-
return [
|
|
95
|
-
{ property: "paddingLeft", value },
|
|
96
|
-
{ property: "paddingRight", value }
|
|
97
|
-
];
|
|
98
|
-
};
|
|
99
|
-
const py = (padding) => {
|
|
100
|
-
const key = `${padding}`;
|
|
101
|
-
const valueString = theme("padding")[key];
|
|
102
|
-
const value = parseCssValue("paddingTop", valueString);
|
|
103
|
-
return [
|
|
104
|
-
{ property: "paddingTop", value },
|
|
105
|
-
{ property: "paddingBottom", value }
|
|
106
|
-
];
|
|
107
|
-
};
|
|
108
|
-
const p = (padding) => {
|
|
109
|
-
return [...px(padding), ...py(padding)];
|
|
110
|
-
};
|
|
111
|
-
const mx = (margin) => {
|
|
112
|
-
const key = `${margin}`;
|
|
113
|
-
const valueString = theme("margin")?.[key] ?? "0";
|
|
114
|
-
const value = parseCssValue("marginLeft", valueString);
|
|
115
|
-
return [
|
|
116
|
-
{ property: "marginLeft", value },
|
|
117
|
-
{ property: "marginRight", value }
|
|
118
|
-
];
|
|
119
|
-
};
|
|
120
|
-
const my = (margin) => {
|
|
121
|
-
const key = `${margin}`;
|
|
122
|
-
const valueString = theme("margin")[key];
|
|
123
|
-
const value = parseCssValue("marginTop", valueString);
|
|
124
|
-
return [
|
|
125
|
-
{ property: "marginTop", value },
|
|
126
|
-
{ property: "marginBottom", value }
|
|
127
|
-
];
|
|
128
|
-
};
|
|
129
|
-
const m = (margin) => {
|
|
130
|
-
return [...mx(margin), ...my(margin)];
|
|
131
|
-
};
|
|
132
|
-
const w = (spacing) => {
|
|
133
|
-
const key = `${spacing}`;
|
|
134
|
-
const valueString = theme("width")?.[key] ?? "0";
|
|
135
|
-
const value = parseCssValue("width", valueString);
|
|
136
|
-
return [{ property: "width", value }];
|
|
137
|
-
};
|
|
138
|
-
const h = (spacing) => {
|
|
139
|
-
const key = `${spacing}`;
|
|
140
|
-
const valueString = theme("height")?.[key] ?? "0";
|
|
141
|
-
const value = parseCssValue("height", valueString);
|
|
142
|
-
return [{ property: "height", value }];
|
|
143
|
-
};
|
|
144
|
-
const opacity = (opacity2) => {
|
|
145
|
-
const key = `${opacity2}`;
|
|
146
|
-
const valueString = theme("opacity")?.[key] ?? "0";
|
|
147
|
-
const value = parseCssValue("opacity", valueString);
|
|
148
|
-
return [
|
|
149
|
-
{
|
|
150
|
-
property: "opacity",
|
|
151
|
-
value
|
|
152
|
-
}
|
|
153
|
-
];
|
|
154
|
-
};
|
|
155
|
-
const maxW = (spacing) => {
|
|
156
|
-
const key = `${spacing}`;
|
|
157
|
-
const valueString = theme("maxWidth")?.[key] ?? "0";
|
|
158
|
-
const value = parseCssValue("width", valueString);
|
|
159
|
-
return [{ property: "maxWidth", value }];
|
|
160
|
-
};
|
|
161
|
-
const positionStyle = (property, spacing) => {
|
|
162
|
-
const key = `${spacing}`;
|
|
163
|
-
const valueString = theme("spacing")?.[key] ?? "0";
|
|
164
|
-
const value = parseCssValue(property, valueString);
|
|
165
|
-
return { property, value };
|
|
166
|
-
};
|
|
167
|
-
const top = (spacing) => [positionStyle("top", spacing)];
|
|
168
|
-
const right = (spacing) => [positionStyle("right", spacing)];
|
|
169
|
-
const bottom = (spacing) => [positionStyle("bottom", spacing)];
|
|
170
|
-
const left = (spacing) => [positionStyle("left", spacing)];
|
|
171
|
-
const inset = (spacing) => [
|
|
172
|
-
positionStyle("left", spacing),
|
|
173
|
-
positionStyle("right", spacing),
|
|
174
|
-
positionStyle("top", spacing),
|
|
175
|
-
positionStyle("bottom", spacing)
|
|
176
|
-
];
|
|
177
|
-
const backdropBlur = (blur) => {
|
|
178
|
-
const valueString = theme("blur")[blur];
|
|
179
|
-
const value = {
|
|
180
|
-
type: "unparsed",
|
|
181
|
-
value: `blur(${valueString})`
|
|
182
|
-
};
|
|
183
|
-
return [{ property: "backdropFilter", value }];
|
|
184
|
-
};
|
|
185
|
-
const bg = (color, alpha) => {
|
|
186
|
-
const value = parseCssValue("backgroundColor", theme("colors")[color]);
|
|
187
|
-
if (alpha !== void 0 && value.type === "rgb") {
|
|
188
|
-
value.alpha = alpha / 100;
|
|
189
|
-
}
|
|
190
|
-
return [
|
|
191
|
-
{
|
|
192
|
-
property: "backgroundColor",
|
|
193
|
-
value
|
|
194
|
-
}
|
|
195
|
-
];
|
|
196
|
-
};
|
|
197
|
-
const fixed = () => {
|
|
198
|
-
return [{ property: "position", value: { type: "keyword", value: "fixed" } }];
|
|
199
|
-
};
|
|
200
|
-
const relative = () => {
|
|
201
|
-
return [
|
|
202
|
-
{ property: "position", value: { type: "keyword", value: "relative" } }
|
|
203
|
-
];
|
|
204
|
-
};
|
|
205
|
-
const absolute = () => {
|
|
206
|
-
return [
|
|
207
|
-
{ property: "position", value: { type: "keyword", value: "absolute" } }
|
|
208
|
-
];
|
|
209
|
-
};
|
|
210
|
-
const grid = () => {
|
|
211
|
-
return [{ property: "display", value: { type: "keyword", value: "grid" } }];
|
|
212
|
-
};
|
|
213
|
-
const alignItems = {
|
|
214
|
-
start: "flex-start",
|
|
215
|
-
end: "flex-end",
|
|
216
|
-
center: "center",
|
|
217
|
-
baseline: "baseline",
|
|
218
|
-
stretch: "stretch"
|
|
219
|
-
};
|
|
220
|
-
const items = (alignItemsParam) => {
|
|
221
|
-
return [
|
|
222
|
-
{
|
|
223
|
-
property: "alignItems",
|
|
224
|
-
value: {
|
|
225
|
-
type: "keyword",
|
|
226
|
-
value: alignItems[alignItemsParam]
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
];
|
|
230
|
-
};
|
|
231
|
-
const justifyContent = {
|
|
232
|
-
start: "flex-start",
|
|
233
|
-
end: "flex-end",
|
|
234
|
-
center: "center",
|
|
235
|
-
between: "space-between",
|
|
236
|
-
around: "space-around",
|
|
237
|
-
evenly: "space-evenly",
|
|
238
|
-
stretch: "stretch"
|
|
239
|
-
};
|
|
240
|
-
const justify = (justifyContentParam) => {
|
|
241
|
-
return [
|
|
242
|
-
{
|
|
243
|
-
property: "justifyContent",
|
|
244
|
-
value: {
|
|
245
|
-
type: "keyword",
|
|
246
|
-
value: justifyContent[justifyContentParam]
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
];
|
|
250
|
-
};
|
|
251
|
-
const flexDirection = { row: "row", col: "column" };
|
|
252
|
-
const flex = (flexParam) => {
|
|
253
|
-
if (flexParam === void 0) {
|
|
254
|
-
return [{ property: "display", value: { type: "keyword", value: "flex" } }];
|
|
255
|
-
}
|
|
256
|
-
return [
|
|
257
|
-
{
|
|
258
|
-
property: "flexDirection",
|
|
259
|
-
value: {
|
|
260
|
-
type: "keyword",
|
|
261
|
-
value: flexDirection[flexParam]
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
];
|
|
265
|
-
};
|
|
266
|
-
const gap = (gapValue) => {
|
|
267
|
-
const key = `${gapValue}`;
|
|
268
|
-
const valueString = theme("spacing")?.[key] ?? "0";
|
|
269
|
-
const value = parseCssValue("rowGap", valueString);
|
|
270
|
-
return [
|
|
271
|
-
{ property: "rowGap", value },
|
|
272
|
-
{ property: "columnGap", value }
|
|
273
|
-
];
|
|
274
|
-
};
|
|
275
|
-
const leading = (lineHeight) => {
|
|
276
|
-
const key = `${lineHeight}`;
|
|
277
|
-
const valueString = theme("lineHeight")[key];
|
|
278
|
-
const value = parseCssValue("lineHeight", valueString);
|
|
279
|
-
return [{ property: "lineHeight", value }];
|
|
280
|
-
};
|
|
281
|
-
const tracking = (letterSpacing) => {
|
|
282
|
-
const key = `${letterSpacing}`;
|
|
283
|
-
const valueString = theme("letterSpacing")[key];
|
|
284
|
-
const value = parseCssValue("letterSpacing", valueString);
|
|
285
|
-
return [{ property: "letterSpacing", value }];
|
|
286
|
-
};
|
|
287
|
-
const outline = (value) => {
|
|
288
|
-
return [
|
|
289
|
-
{
|
|
290
|
-
property: "outlineWidth",
|
|
291
|
-
value: { type: "unit", value: 2, unit: "px" }
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
property: "outlineStyle",
|
|
295
|
-
value: { type: "keyword", value: "solid" }
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
property: "outlineColor",
|
|
299
|
-
value: { type: "keyword", value: "transparent" }
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
property: "outlineOffset",
|
|
303
|
-
value: { type: "unit", value: 2, unit: "px" }
|
|
304
|
-
}
|
|
305
|
-
];
|
|
306
|
-
};
|
|
307
|
-
const textSizes = [
|
|
308
|
-
"sm",
|
|
309
|
-
"base",
|
|
310
|
-
"lg",
|
|
311
|
-
"xs",
|
|
312
|
-
"xl",
|
|
313
|
-
"2xl",
|
|
314
|
-
"3xl",
|
|
315
|
-
"4xl",
|
|
316
|
-
"5xl",
|
|
317
|
-
"6xl",
|
|
318
|
-
"7xl",
|
|
319
|
-
"8xl",
|
|
320
|
-
"9xl"
|
|
321
|
-
];
|
|
322
|
-
const isTextSize = (value) => textSizes.includes(value);
|
|
323
|
-
const text = (sizeOrColor) => {
|
|
324
|
-
if (isTextSize(sizeOrColor)) {
|
|
325
|
-
const valueArr = theme("fontSize")[sizeOrColor];
|
|
326
|
-
const [fontSizeString, { lineHeight: lineHeightString }] = valueArr;
|
|
327
|
-
const fontSize = parseCssValue("fontSize", fontSizeString);
|
|
328
|
-
const lineHeight = parseCssValue("lineHeight", lineHeightString);
|
|
329
|
-
return [
|
|
330
|
-
{ property: "fontSize", value: fontSize },
|
|
331
|
-
{ property: "lineHeight", value: lineHeight }
|
|
332
|
-
];
|
|
333
|
-
}
|
|
334
|
-
const value = parseCssValue("color", theme("colors")[sizeOrColor]);
|
|
335
|
-
return [
|
|
336
|
-
{
|
|
337
|
-
property: "color",
|
|
338
|
-
value
|
|
339
|
-
}
|
|
340
|
-
];
|
|
341
|
-
};
|
|
342
|
-
const shadow = (shadowSize) => {
|
|
343
|
-
const valueString = theme("boxShadow")[shadowSize];
|
|
344
|
-
const value = parseBoxShadow(valueString);
|
|
345
|
-
return [
|
|
346
|
-
{
|
|
347
|
-
property: "boxShadow",
|
|
348
|
-
value
|
|
349
|
-
}
|
|
350
|
-
];
|
|
351
|
-
};
|
|
352
|
-
const ring = (ringColor, ringWidth, ringOffsetColor = "background", ringOffsetWidth = 0, inset2 = "") => {
|
|
353
|
-
const ringWidthUnits = theme("ringWidth")[ringWidth];
|
|
354
|
-
const ringOffsetWidthUnits = theme("ringOffsetWidth")[ringOffsetWidth];
|
|
355
|
-
const ringColorRgb = theme("colors")[ringColor];
|
|
356
|
-
const ringOffsetColorRgb = theme("colors")[ringOffsetColor];
|
|
357
|
-
const ringOffsetShadow = `${inset2} 0 0 0 ${ringOffsetWidthUnits} ${ringOffsetColorRgb}`;
|
|
358
|
-
const ringWidthParsed = parseFloat(ringWidthUnits);
|
|
359
|
-
const ringOffsetWidthParsed = parseFloat(ringOffsetWidthUnits);
|
|
360
|
-
const ringShadow = `${inset2} 0 0 0 ${ringWidthParsed + ringOffsetWidthParsed}px ${ringColorRgb}`;
|
|
361
|
-
const value = parseBoxShadow(`${ringOffsetShadow}, ${ringShadow}`);
|
|
362
|
-
return [
|
|
363
|
-
{
|
|
364
|
-
property: "boxShadow",
|
|
365
|
-
value
|
|
366
|
-
}
|
|
367
|
-
];
|
|
368
|
-
};
|
|
369
|
-
const hover = (value) => {
|
|
370
|
-
return value.map((decl) => ({
|
|
371
|
-
...decl,
|
|
372
|
-
state: ":hover"
|
|
373
|
-
}));
|
|
374
|
-
};
|
|
375
|
-
const focus = (value) => {
|
|
376
|
-
return value.map((decl) => ({
|
|
377
|
-
...decl,
|
|
378
|
-
state: ":focus"
|
|
379
|
-
}));
|
|
380
|
-
};
|
|
381
|
-
export {
|
|
382
|
-
absolute,
|
|
383
|
-
backdropBlur,
|
|
384
|
-
bg,
|
|
385
|
-
border,
|
|
386
|
-
bottom,
|
|
387
|
-
fixed,
|
|
388
|
-
flex,
|
|
389
|
-
focus,
|
|
390
|
-
gap,
|
|
391
|
-
grid,
|
|
392
|
-
h,
|
|
393
|
-
hover,
|
|
394
|
-
inset,
|
|
395
|
-
items,
|
|
396
|
-
justify,
|
|
397
|
-
leading,
|
|
398
|
-
left,
|
|
399
|
-
m,
|
|
400
|
-
maxW,
|
|
401
|
-
mx,
|
|
402
|
-
my,
|
|
403
|
-
opacity,
|
|
404
|
-
outline,
|
|
405
|
-
overflow,
|
|
406
|
-
p,
|
|
407
|
-
px,
|
|
408
|
-
py,
|
|
409
|
-
relative,
|
|
410
|
-
right,
|
|
411
|
-
ring,
|
|
412
|
-
rounded,
|
|
413
|
-
shadow,
|
|
414
|
-
text,
|
|
415
|
-
top,
|
|
416
|
-
tracking,
|
|
417
|
-
w,
|
|
418
|
-
z
|
|
419
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const colors = {
|
|
2
|
-
transparent: "transparent",
|
|
3
|
-
current: "currentColor",
|
|
4
|
-
popover: "rgb(255, 255, 255)",
|
|
5
|
-
popoverForeground: "rgb(2, 8, 23)",
|
|
6
|
-
border: "rgb(226, 232, 240)",
|
|
7
|
-
background: "rgb(255, 255, 255)",
|
|
8
|
-
ring: "rgb(148, 163, 184)",
|
|
9
|
-
mutedForeground: "rgb(100, 116, 139)"
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
colors
|
|
13
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import defaultTheme from "tailwindcss/defaultTheme";
|
|
2
|
-
import { colors } from "./tailwind-colors";
|
|
3
|
-
const localTheme = { ...defaultTheme };
|
|
4
|
-
const theme = (name) => {
|
|
5
|
-
const value = localTheme?.[name];
|
|
6
|
-
if (typeof value === "function") {
|
|
7
|
-
return value({ theme, colors, breakpoints: () => ({}) });
|
|
8
|
-
}
|
|
9
|
-
return value;
|
|
10
|
-
};
|
|
11
|
-
localTheme.colors = colors;
|
|
12
|
-
localTheme.borderRadius = { ...theme("borderRadius") };
|
|
13
|
-
localTheme.borderRadius.DEFAULT = "0.5rem";
|
|
14
|
-
export {
|
|
15
|
-
theme
|
|
16
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { PropMeta } from "@webstudio-is/generate-arg-types";
|
|
2
|
-
export declare const propsDialog: Record<string, PropMeta>;
|
|
3
|
-
export declare const propsDialogTrigger: Record<string, PropMeta>;
|
|
4
|
-
export declare const propsDialogOverlay: Record<string, PropMeta>;
|
|
5
|
-
export declare const propsDialogContent: Record<string, PropMeta>;
|
|
6
|
-
export declare const propsDialogClose: Record<string, PropMeta>;
|
|
7
|
-
export declare const propsDialogTitle: Record<string, PropMeta>;
|
|
8
|
-
export declare const propsDialogDescription: Record<string, PropMeta>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
|
-
import { type WebstudioAttributes } from "@webstudio-is/react-sdk";
|
|
3
|
-
import { type ReactNode } from "react";
|
|
4
|
-
/**
|
|
5
|
-
* We don't have support for boolean or undefined nor in UI not at Data variables,
|
|
6
|
-
* instead of binding on "open" prop we bind variable on a isOpen prop to be able to show Dialog in the builder
|
|
7
|
-
**/
|
|
8
|
-
type BuilderDialogProps = {
|
|
9
|
-
isOpen: "initial" | "open" | "closed";
|
|
10
|
-
};
|
|
11
|
-
export declare const Dialog: import("react").ForwardRefExoticComponent<WebstudioAttributes & DialogPrimitive.DialogProps & BuilderDialogProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
-
/**
|
|
13
|
-
* We're not exposing the 'asChild' property for the Trigger.
|
|
14
|
-
* Instead, we're enforcing 'asChild=true' for the Trigger and making it style-less.
|
|
15
|
-
* This avoids situations where the Trigger inadvertently passes all styles to its child,
|
|
16
|
-
* which would prevent us from displaying styles properly in the builder.
|
|
17
|
-
*/
|
|
18
|
-
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<WebstudioAttributes & {
|
|
19
|
-
children: ReactNode;
|
|
20
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
-
export declare const DialogOverlay: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
-
export declare const DialogContent: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
|
-
export declare const DialogClose: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
24
|
-
export declare const DialogTitle: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
25
|
-
export declare const DialogDescription: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
26
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/react-sdk";
|
|
2
|
-
export declare const metaDialogTrigger: WsComponentMeta;
|
|
3
|
-
export declare const metaDialogContent: WsComponentMeta;
|
|
4
|
-
export declare const metaDialogOverlay: WsComponentMeta;
|
|
5
|
-
export declare const metaDialogTitle: WsComponentMeta;
|
|
6
|
-
export declare const metaDialogDescription: WsComponentMeta;
|
|
7
|
-
export declare const metaDialogClose: WsComponentMeta;
|
|
8
|
-
/**
|
|
9
|
-
* Styles source without animations:
|
|
10
|
-
* https://github.com/shadcn-ui/ui/blob/main/apps/www/registry/default/ui/dialog.tsx
|
|
11
|
-
*
|
|
12
|
-
* Attributions
|
|
13
|
-
* MIT License
|
|
14
|
-
* Copyright (c) 2023 shadcn
|
|
15
|
-
**/
|
|
16
|
-
export declare const metaDialog: WsComponentMeta;
|
|
17
|
-
export declare const propsMetaDialog: WsComponentPropsMeta;
|
|
18
|
-
export declare const propsMetaDialogTrigger: WsComponentPropsMeta;
|
|
19
|
-
export declare const propsMetaDialogContent: WsComponentPropsMeta;
|
|
20
|
-
export declare const propsMetaDialogOverlay: WsComponentPropsMeta;
|
|
21
|
-
export declare const propsMetaDialogClose: WsComponentPropsMeta;
|
|
22
|
-
export declare const propsMetaDialogTitle: WsComponentPropsMeta;
|
|
23
|
-
export declare const propsMetaDialogDescription: WsComponentPropsMeta;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2
|
-
import { type WebstudioAttributes } from "@webstudio-is/react-sdk";
|
|
3
|
-
import { type ReactNode } from "react";
|
|
4
|
-
/**
|
|
5
|
-
* We don't have support for boolean or undefined nor in UI not at Data variables,
|
|
6
|
-
* instead of binding on "open" prop we bind variable on a isOpen prop to be able to show Popover in the builder
|
|
7
|
-
**/
|
|
8
|
-
type BuilderPopoverProps = {
|
|
9
|
-
isOpen: "initial" | "open" | "closed";
|
|
10
|
-
};
|
|
11
|
-
export declare const Popover: import("react").ForwardRefExoticComponent<WebstudioAttributes & PopoverPrimitive.PopoverProps & BuilderPopoverProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
-
/**
|
|
13
|
-
* We're not exposing the 'asChild' property for the Trigger.
|
|
14
|
-
* Instead, we're enforcing 'asChild=true' for the Trigger and making it style-less.
|
|
15
|
-
* This avoids situations where the Trigger inadvertently passes all styles to its child,
|
|
16
|
-
* which would prevent us from displaying styles properly in the builder.
|
|
17
|
-
*/
|
|
18
|
-
export declare const PopoverTrigger: import("react").ForwardRefExoticComponent<WebstudioAttributes & {
|
|
19
|
-
children: ReactNode;
|
|
20
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
-
export declare const PopoverContent: import("react").ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/react-sdk";
|
|
2
|
-
export declare const metaPopoverTrigger: WsComponentMeta;
|
|
3
|
-
export declare const metaPopoverContent: WsComponentMeta;
|
|
4
|
-
/**
|
|
5
|
-
* Styles source without animations:
|
|
6
|
-
* https://github.com/shadcn-ui/ui/blob/main/apps/www/registry/default/ui/popover.tsx
|
|
7
|
-
*
|
|
8
|
-
* Attributions
|
|
9
|
-
* MIT License
|
|
10
|
-
* Copyright (c) 2023 shadcn
|
|
11
|
-
**/
|
|
12
|
-
export declare const metaPopover: WsComponentMeta;
|
|
13
|
-
export declare const propsMetaPopover: WsComponentPropsMeta;
|
|
14
|
-
export declare const propsMetaPopoverTrigger: WsComponentPropsMeta;
|
|
15
|
-
export declare const propsMetaPopoverContent: WsComponentPropsMeta;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2
|
-
import { type WebstudioAttributes } from "@webstudio-is/react-sdk";
|
|
3
|
-
import { type ReactNode } from "react";
|
|
4
|
-
/**
|
|
5
|
-
* We don't have support for boolean or undefined nor in UI not at Data variables,
|
|
6
|
-
* instead of binding on "open" prop we bind variable on a isOpen prop to be able to show Tooltip in the builder
|
|
7
|
-
**/
|
|
8
|
-
type BuilderTooltipProps = {
|
|
9
|
-
isOpen: "initial" | "open" | "closed";
|
|
10
|
-
};
|
|
11
|
-
export declare const Tooltip: import("react").ForwardRefExoticComponent<WebstudioAttributes & TooltipPrimitive.TooltipProps & BuilderTooltipProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
-
/**
|
|
13
|
-
* We're not exposing the 'asChild' property for the Trigger.
|
|
14
|
-
* Instead, we're enforcing 'asChild=true' for the Trigger and making it style-less.
|
|
15
|
-
* This avoids situations where the Trigger inadvertently passes all styles to its child,
|
|
16
|
-
* which would prevent us from displaying styles properly in the builder.
|
|
17
|
-
*/
|
|
18
|
-
export declare const TooltipTrigger: import("react").ForwardRefExoticComponent<WebstudioAttributes & {
|
|
19
|
-
children: ReactNode;
|
|
20
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
-
export declare const TooltipContent: import("react").ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type WsComponentMeta, type WsComponentPropsMeta } from "@webstudio-is/react-sdk";
|
|
2
|
-
export declare const metaTooltipTrigger: WsComponentMeta;
|
|
3
|
-
export declare const metaTooltipContent: WsComponentMeta;
|
|
4
|
-
/**
|
|
5
|
-
* Styles source without animations:
|
|
6
|
-
* https://github.com/shadcn-ui/ui/blob/main/apps/www/registry/default/ui/tooltip.tsx
|
|
7
|
-
*
|
|
8
|
-
* Attributions
|
|
9
|
-
* MIT License
|
|
10
|
-
* Copyright (c) 2023 shadcn
|
|
11
|
-
**/
|
|
12
|
-
export declare const metaTooltip: WsComponentMeta;
|
|
13
|
-
export declare const propsMetaTooltip: WsComponentPropsMeta;
|
|
14
|
-
export declare const propsMetaTooltipTrigger: WsComponentPropsMeta;
|
|
15
|
-
export declare const propsMetaTooltipContent: WsComponentPropsMeta;
|