@webstudio-is/sdk-components-react-radix 0.83.0 → 0.85.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.
Files changed (103) hide show
  1. package/lib/__generated__/dialog.props.js +2120 -0
  2. package/lib/__generated__/popover.props.js +468 -0
  3. package/lib/__generated__/sheet.props.js +2159 -0
  4. package/lib/__generated__/tabs.props.js +1286 -0
  5. package/lib/__generated__/tooltip.props.js +478 -0
  6. package/lib/cjs/__generated__/dialog.props.js +2140 -0
  7. package/lib/cjs/__generated__/popover.props.js +488 -0
  8. package/lib/cjs/__generated__/sheet.props.js +2179 -0
  9. package/lib/cjs/__generated__/tabs.props.js +1306 -0
  10. package/lib/cjs/__generated__/tooltip.props.js +498 -0
  11. package/lib/cjs/collapsible.js +34 -4
  12. package/lib/cjs/collapsible.ws.js +14 -9
  13. package/lib/cjs/components.js +30 -1
  14. package/lib/cjs/dialog.js +57 -0
  15. package/lib/cjs/dialog.ws.js +311 -0
  16. package/lib/cjs/hooks.js +25 -0
  17. package/lib/cjs/metas.js +30 -1
  18. package/lib/cjs/popover.js +58 -0
  19. package/lib/cjs/popover.ws.js +141 -0
  20. package/lib/cjs/props.js +30 -1
  21. package/lib/cjs/sheet.js +63 -0
  22. package/lib/cjs/sheet.ws.js +317 -0
  23. package/lib/cjs/tabs.js +41 -0
  24. package/lib/cjs/tabs.ws.js +213 -0
  25. package/lib/cjs/theme/radix-common-types.js +16 -0
  26. package/lib/cjs/theme/tailwind-classes.js +547 -0
  27. package/lib/cjs/theme/tailwind-colors.js +35 -0
  28. package/lib/cjs/theme/tailwind-theme.js +46 -0
  29. package/lib/cjs/tooltip.js +55 -0
  30. package/lib/cjs/tooltip.ws.js +142 -0
  31. package/lib/collapsible.js +35 -7
  32. package/lib/collapsible.ws.js +19 -10
  33. package/lib/components.js +46 -1
  34. package/lib/dialog.js +30 -0
  35. package/lib/dialog.ws.js +298 -0
  36. package/lib/hooks.js +5 -0
  37. package/lib/metas.js +59 -1
  38. package/lib/popover.js +31 -0
  39. package/lib/popover.ws.js +116 -0
  40. package/lib/props.js +59 -1
  41. package/lib/sheet.js +35 -0
  42. package/lib/sheet.ws.js +304 -0
  43. package/lib/tabs.js +24 -0
  44. package/lib/tabs.ws.js +193 -0
  45. package/lib/theme/radix-common-types.js +0 -0
  46. package/lib/theme/tailwind-classes.js +527 -0
  47. package/lib/theme/tailwind-colors.js +15 -0
  48. package/lib/theme/tailwind-theme.js +16 -0
  49. package/lib/tooltip.js +28 -0
  50. package/lib/tooltip.ws.js +117 -0
  51. package/lib/types/__generated__/dialog.props.d.ts +8 -0
  52. package/lib/types/__generated__/popover.props.d.ts +4 -0
  53. package/lib/types/__generated__/sheet.props.d.ts +8 -0
  54. package/lib/types/__generated__/tabs.props.d.ts +5 -0
  55. package/lib/types/__generated__/tooltip.props.d.ts +4 -0
  56. package/lib/types/collapsible.d.ts +4 -3
  57. package/lib/types/components.d.ts +5 -0
  58. package/lib/types/dialog.d.ts +25 -0
  59. package/lib/types/dialog.ws.d.ts +23 -0
  60. package/lib/types/hooks.d.ts +2 -0
  61. package/lib/types/metas.d.ts +5 -0
  62. package/lib/types/popover.d.ts +21 -0
  63. package/lib/types/popover.ws.d.ts +15 -0
  64. package/lib/types/props.d.ts +5 -0
  65. package/lib/types/sheet.d.ts +15 -0
  66. package/lib/types/sheet.ws.d.ts +23 -0
  67. package/lib/types/tabs.d.ts +15 -0
  68. package/lib/types/tabs.ws.d.ts +9 -0
  69. package/lib/types/theme/radix-common-types.d.ts +84 -0
  70. package/lib/types/theme/tailwind-classes.d.ts +83 -0
  71. package/lib/types/theme/tailwind-colors.d.ts +21 -0
  72. package/lib/types/theme/tailwind-theme.d.ts +72 -0
  73. package/lib/types/tooltip.d.ts +21 -0
  74. package/lib/types/tooltip.ws.d.ts +15 -0
  75. package/package.json +23 -6
  76. package/src/__generated__/dialog.props.ts +2363 -0
  77. package/src/__generated__/popover.props.ts +515 -0
  78. package/src/__generated__/sheet.props.ts +2402 -0
  79. package/src/__generated__/tabs.props.ts +1434 -0
  80. package/src/__generated__/tooltip.props.ts +526 -0
  81. package/src/collapsible.stories.tsx +21 -0
  82. package/src/collapsible.tsx +44 -21
  83. package/src/collapsible.ws.ts +21 -10
  84. package/src/components.ts +21 -0
  85. package/src/dialog.tsx +66 -0
  86. package/src/dialog.ws.tsx +315 -0
  87. package/src/hooks.ts +4 -0
  88. package/src/metas.ts +34 -0
  89. package/src/popover.tsx +70 -0
  90. package/src/popover.ws.tsx +127 -0
  91. package/src/props.ts +34 -0
  92. package/src/sheet.stories.tsx +21 -0
  93. package/src/sheet.tsx +40 -0
  94. package/src/sheet.ws.tsx +326 -0
  95. package/src/tabs.stories.tsx +21 -0
  96. package/src/tabs.tsx +46 -0
  97. package/src/tabs.ws.ts +211 -0
  98. package/src/theme/radix-common-types.ts +495 -0
  99. package/src/theme/tailwind-classes.ts +695 -0
  100. package/src/theme/tailwind-colors.ts +45 -0
  101. package/src/theme/tailwind-theme.ts +24 -0
  102. package/src/tooltip.tsx +69 -0
  103. package/src/tooltip.ws.tsx +128 -0
@@ -0,0 +1,547 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var tailwind_classes_exports = {};
20
+ __export(tailwind_classes_exports, {
21
+ absolute: () => absolute,
22
+ backdropBlur: () => backdropBlur,
23
+ bg: () => bg,
24
+ border: () => border,
25
+ bottom: () => bottom,
26
+ disabled: () => disabled,
27
+ fixed: () => fixed,
28
+ flex: () => flex,
29
+ focus: () => focus,
30
+ focusVisible: () => focusVisible,
31
+ font: () => font,
32
+ gap: () => gap,
33
+ grid: () => grid,
34
+ grow: () => grow,
35
+ h: () => h,
36
+ hover: () => hover,
37
+ inlineFlex: () => inlineFlex,
38
+ inset: () => inset,
39
+ items: () => items,
40
+ justify: () => justify,
41
+ leading: () => leading,
42
+ left: () => left,
43
+ m: () => m,
44
+ maxW: () => maxW,
45
+ mb: () => mb,
46
+ ml: () => ml,
47
+ mr: () => mr,
48
+ mt: () => mt,
49
+ mx: () => mx,
50
+ my: () => my,
51
+ opacity: () => opacity,
52
+ outline: () => outline,
53
+ overflow: () => overflow,
54
+ p: () => p,
55
+ pointerEvents: () => pointerEvents,
56
+ px: () => px,
57
+ py: () => py,
58
+ relative: () => relative,
59
+ right: () => right,
60
+ ring: () => ring,
61
+ rounded: () => rounded,
62
+ shadow: () => shadow,
63
+ state: () => state,
64
+ text: () => text,
65
+ top: () => top,
66
+ tracking: () => tracking,
67
+ transition: () => transition,
68
+ w: () => w,
69
+ whitespace: () => whitespace,
70
+ z: () => z
71
+ });
72
+ module.exports = __toCommonJS(tailwind_classes_exports);
73
+ var import_tailwind_theme = require("./tailwind-theme");
74
+ var import_css_data = require("@webstudio-is/css-data");
75
+ const preflight = () => {
76
+ const borderColorValue = (0, import_css_data.parseCssValue)("color", (0, import_tailwind_theme.theme)("colors")["border"]);
77
+ return [
78
+ {
79
+ property: "borderTopStyle",
80
+ value: { type: "keyword", value: "solid" }
81
+ },
82
+ {
83
+ property: "borderRightStyle",
84
+ value: { type: "keyword", value: "solid" }
85
+ },
86
+ {
87
+ property: "borderBottomStyle",
88
+ value: { type: "keyword", value: "solid" }
89
+ },
90
+ {
91
+ property: "borderLeftStyle",
92
+ value: { type: "keyword", value: "solid" }
93
+ },
94
+ {
95
+ property: "borderTopColor",
96
+ value: borderColorValue
97
+ },
98
+ {
99
+ property: "borderRightColor",
100
+ value: borderColorValue
101
+ },
102
+ {
103
+ property: "borderBottomColor",
104
+ value: borderColorValue
105
+ },
106
+ {
107
+ property: "borderLeftColor",
108
+ value: borderColorValue
109
+ }
110
+ ];
111
+ };
112
+ const z = (zIndex) => {
113
+ const valueString = (0, import_tailwind_theme.theme)("zIndex")[zIndex ?? "auto"];
114
+ const value = (0, import_css_data.parseCssValue)("zIndex", valueString);
115
+ return [
116
+ {
117
+ property: "zIndex",
118
+ value
119
+ }
120
+ ];
121
+ };
122
+ const overflow = (value) => [
123
+ {
124
+ property: "overflow",
125
+ value: { type: "keyword", value }
126
+ }
127
+ ];
128
+ const rounded = (radius) => {
129
+ const valueString = (0, import_tailwind_theme.theme)("borderRadius")[radius ?? "DEFAULT"];
130
+ const value = (0, import_css_data.parseCssValue)("borderTopWidth", valueString);
131
+ return [
132
+ {
133
+ property: "borderTopLeftRadius",
134
+ value
135
+ },
136
+ {
137
+ property: "borderTopRightRadius",
138
+ value
139
+ },
140
+ {
141
+ property: "borderBottomRightRadius",
142
+ value
143
+ },
144
+ {
145
+ property: "borderBottomLeftRadius",
146
+ value
147
+ }
148
+ ];
149
+ };
150
+ const border = (borderWidth) => {
151
+ const key = `${borderWidth ?? "DEFAULT"}`;
152
+ const valueString = (0, import_tailwind_theme.theme)("borderWidth")?.[key] ?? "1px";
153
+ const value = (0, import_css_data.parseCssValue)("borderTopWidth", valueString);
154
+ return [
155
+ ...preflight(),
156
+ { property: "borderTopWidth", value },
157
+ { property: "borderRightWidth", value },
158
+ { property: "borderBottomWidth", value },
159
+ { property: "borderLeftWidth", value }
160
+ ];
161
+ };
162
+ const px = (padding) => {
163
+ const key = `${padding}`;
164
+ const valueString = (0, import_tailwind_theme.theme)("padding")?.[key] ?? "0";
165
+ const value = (0, import_css_data.parseCssValue)("paddingLeft", valueString);
166
+ return [
167
+ { property: "paddingLeft", value },
168
+ { property: "paddingRight", value }
169
+ ];
170
+ };
171
+ const py = (padding) => {
172
+ const key = `${padding}`;
173
+ const valueString = (0, import_tailwind_theme.theme)("padding")[key];
174
+ const value = (0, import_css_data.parseCssValue)("paddingTop", valueString);
175
+ return [
176
+ { property: "paddingTop", value },
177
+ { property: "paddingBottom", value }
178
+ ];
179
+ };
180
+ const p = (padding) => {
181
+ return [...px(padding), ...py(padding)];
182
+ };
183
+ const marginProperty = (property) => (margin) => {
184
+ const key = `${margin}`;
185
+ const valueString = (0, import_tailwind_theme.theme)("margin")?.[key] ?? "0";
186
+ const value = (0, import_css_data.parseCssValue)(property, valueString);
187
+ return [{ property, value }];
188
+ };
189
+ const ml = (margin) => {
190
+ return marginProperty("marginLeft")(margin);
191
+ };
192
+ const mr = (margin) => {
193
+ return marginProperty("marginRight")(margin);
194
+ };
195
+ const mt = (margin) => {
196
+ return marginProperty("marginTop")(margin);
197
+ };
198
+ const mb = (margin) => {
199
+ return marginProperty("marginBottom")(margin);
200
+ };
201
+ const mx = (margin) => {
202
+ return [ml(margin), mr(margin)].flat();
203
+ };
204
+ const my = (margin) => {
205
+ return [mt(margin), mb(margin)].flat();
206
+ };
207
+ const m = (margin) => {
208
+ return [mx(margin), my(margin)].flat();
209
+ };
210
+ const w = (spacing) => {
211
+ const key = `${spacing}`;
212
+ const valueString = (0, import_tailwind_theme.theme)("width")?.[key] ?? "0";
213
+ const value = (0, import_css_data.parseCssValue)("width", valueString);
214
+ return [{ property: "width", value }];
215
+ };
216
+ const h = (spacing) => {
217
+ const key = `${spacing}`;
218
+ const valueString = (0, import_tailwind_theme.theme)("height")?.[key] ?? "0";
219
+ const value = (0, import_css_data.parseCssValue)("height", valueString);
220
+ return [{ property: "height", value }];
221
+ };
222
+ const opacity = (opacity2) => {
223
+ const key = `${opacity2}`;
224
+ const valueString = (0, import_tailwind_theme.theme)("opacity")?.[key] ?? "0";
225
+ const value = (0, import_css_data.parseCssValue)("opacity", valueString);
226
+ return [
227
+ {
228
+ property: "opacity",
229
+ value
230
+ }
231
+ ];
232
+ };
233
+ const maxW = (spacing) => {
234
+ const key = `${spacing}`;
235
+ const valueString = (0, import_tailwind_theme.theme)("maxWidth")?.[key] ?? "0";
236
+ const value = (0, import_css_data.parseCssValue)("width", valueString);
237
+ return [{ property: "maxWidth", value }];
238
+ };
239
+ const positionStyle = (property, spacing) => {
240
+ const key = `${spacing}`;
241
+ const valueString = (0, import_tailwind_theme.theme)("spacing")?.[key] ?? "0";
242
+ const value = (0, import_css_data.parseCssValue)(property, valueString);
243
+ return { property, value };
244
+ };
245
+ const top = (spacing) => [positionStyle("top", spacing)];
246
+ const right = (spacing) => [positionStyle("right", spacing)];
247
+ const bottom = (spacing) => [positionStyle("bottom", spacing)];
248
+ const left = (spacing) => [positionStyle("left", spacing)];
249
+ const inset = (spacing) => [
250
+ positionStyle("left", spacing),
251
+ positionStyle("right", spacing),
252
+ positionStyle("top", spacing),
253
+ positionStyle("bottom", spacing)
254
+ ];
255
+ const backdropBlur = (blur) => {
256
+ const valueString = (0, import_tailwind_theme.theme)("blur")[blur];
257
+ const value = {
258
+ type: "unparsed",
259
+ value: `blur(${valueString})`
260
+ };
261
+ return [{ property: "backdropFilter", value }];
262
+ };
263
+ const bg = (color, alpha) => {
264
+ const value = (0, import_css_data.parseCssValue)("backgroundColor", (0, import_tailwind_theme.theme)("colors")[color]);
265
+ if (alpha !== void 0 && value.type === "rgb") {
266
+ value.alpha = alpha / 100;
267
+ }
268
+ return [
269
+ {
270
+ property: "backgroundColor",
271
+ value
272
+ }
273
+ ];
274
+ };
275
+ const fixed = () => {
276
+ return [{ property: "position", value: { type: "keyword", value: "fixed" } }];
277
+ };
278
+ const relative = () => {
279
+ return [
280
+ { property: "position", value: { type: "keyword", value: "relative" } }
281
+ ];
282
+ };
283
+ const absolute = () => {
284
+ return [
285
+ { property: "position", value: { type: "keyword", value: "absolute" } }
286
+ ];
287
+ };
288
+ const grid = () => {
289
+ return [{ property: "display", value: { type: "keyword", value: "grid" } }];
290
+ };
291
+ const alignItems = {
292
+ start: "flex-start",
293
+ end: "flex-end",
294
+ center: "center",
295
+ baseline: "baseline",
296
+ stretch: "stretch"
297
+ };
298
+ const items = (alignItemsParam) => {
299
+ return [
300
+ {
301
+ property: "alignItems",
302
+ value: {
303
+ type: "keyword",
304
+ value: alignItems[alignItemsParam]
305
+ }
306
+ }
307
+ ];
308
+ };
309
+ const justifyContent = {
310
+ start: "flex-start",
311
+ end: "flex-end",
312
+ center: "center",
313
+ between: "space-between",
314
+ around: "space-around",
315
+ evenly: "space-evenly",
316
+ stretch: "stretch"
317
+ };
318
+ const justify = (justifyContentParam) => {
319
+ return [
320
+ {
321
+ property: "justifyContent",
322
+ value: {
323
+ type: "keyword",
324
+ value: justifyContent[justifyContentParam]
325
+ }
326
+ }
327
+ ];
328
+ };
329
+ const inlineFlex = () => {
330
+ return [
331
+ { property: "display", value: { type: "keyword", value: "inline-flex" } }
332
+ ];
333
+ };
334
+ const flexDirection = { row: "row", col: "column" };
335
+ const flex = (flexParam) => {
336
+ if (flexParam === void 0) {
337
+ return [{ property: "display", value: { type: "keyword", value: "flex" } }];
338
+ }
339
+ return [
340
+ {
341
+ property: "flexDirection",
342
+ value: {
343
+ type: "keyword",
344
+ value: flexDirection[flexParam]
345
+ }
346
+ }
347
+ ];
348
+ };
349
+ const grow = () => {
350
+ return [
351
+ {
352
+ property: "flexGrow",
353
+ value: {
354
+ type: "unit",
355
+ value: 1,
356
+ unit: "number"
357
+ }
358
+ }
359
+ ];
360
+ };
361
+ const gap = (gapValue) => {
362
+ const key = `${gapValue}`;
363
+ const valueString = (0, import_tailwind_theme.theme)("spacing")?.[key] ?? "0";
364
+ const value = (0, import_css_data.parseCssValue)("rowGap", valueString);
365
+ return [
366
+ { property: "rowGap", value },
367
+ { property: "columnGap", value }
368
+ ];
369
+ };
370
+ const leading = (lineHeight) => {
371
+ const key = `${lineHeight}`;
372
+ const valueString = (0, import_tailwind_theme.theme)("lineHeight")[key];
373
+ const value = (0, import_css_data.parseCssValue)("lineHeight", valueString);
374
+ return [{ property: "lineHeight", value }];
375
+ };
376
+ const tracking = (letterSpacing) => {
377
+ const key = `${letterSpacing}`;
378
+ const valueString = (0, import_tailwind_theme.theme)("letterSpacing")[key];
379
+ const value = (0, import_css_data.parseCssValue)("letterSpacing", valueString);
380
+ return [{ property: "letterSpacing", value }];
381
+ };
382
+ const outline = (value) => {
383
+ return [
384
+ {
385
+ property: "outlineWidth",
386
+ value: { type: "unit", value: 2, unit: "px" }
387
+ },
388
+ {
389
+ property: "outlineStyle",
390
+ value: { type: "keyword", value: "solid" }
391
+ },
392
+ {
393
+ property: "outlineColor",
394
+ value: { type: "keyword", value: "transparent" }
395
+ },
396
+ {
397
+ property: "outlineOffset",
398
+ value: { type: "unit", value: 2, unit: "px" }
399
+ }
400
+ ];
401
+ };
402
+ const textSizes = [
403
+ "sm",
404
+ "base",
405
+ "lg",
406
+ "xs",
407
+ "xl",
408
+ "2xl",
409
+ "3xl",
410
+ "4xl",
411
+ "5xl",
412
+ "6xl",
413
+ "7xl",
414
+ "8xl",
415
+ "9xl"
416
+ ];
417
+ const isTextSize = (value) => textSizes.includes(value);
418
+ const text = (sizeOrColor) => {
419
+ if (isTextSize(sizeOrColor)) {
420
+ const valueArr = (0, import_tailwind_theme.theme)("fontSize")[sizeOrColor];
421
+ const [fontSizeString, { lineHeight: lineHeightString }] = valueArr;
422
+ const fontSize = (0, import_css_data.parseCssValue)("fontSize", fontSizeString);
423
+ const lineHeight = (0, import_css_data.parseCssValue)("lineHeight", lineHeightString);
424
+ return [
425
+ { property: "fontSize", value: fontSize },
426
+ { property: "lineHeight", value: lineHeight }
427
+ ];
428
+ }
429
+ const value = (0, import_css_data.parseCssValue)("color", (0, import_tailwind_theme.theme)("colors")[sizeOrColor]);
430
+ return [
431
+ {
432
+ property: "color",
433
+ value
434
+ }
435
+ ];
436
+ };
437
+ const weights = {
438
+ thin: "100",
439
+ extralight: "200",
440
+ light: "300",
441
+ normal: "400",
442
+ medium: "500",
443
+ semibold: "600",
444
+ bold: "700",
445
+ extrabold: "800",
446
+ black: "900"
447
+ };
448
+ const font = (weight) => {
449
+ return [
450
+ {
451
+ property: "fontWeight",
452
+ value: { type: "keyword", value: weights[weight] }
453
+ }
454
+ ];
455
+ };
456
+ const whitespace = (value) => {
457
+ return [
458
+ {
459
+ property: "whiteSpace",
460
+ value: { type: "keyword", value }
461
+ }
462
+ ];
463
+ };
464
+ const shadow = (shadowSize) => {
465
+ const valueString = (0, import_tailwind_theme.theme)("boxShadow")[shadowSize];
466
+ const value = (0, import_css_data.parseBoxShadow)(valueString);
467
+ return [
468
+ {
469
+ property: "boxShadow",
470
+ value
471
+ }
472
+ ];
473
+ };
474
+ const ring = (ringColor, ringWidth, ringOffsetColor = "background", ringOffsetWidth = 0, inset2 = "") => {
475
+ const ringWidthUnits = (0, import_tailwind_theme.theme)("ringWidth")[ringWidth];
476
+ const ringOffsetWidthUnits = (0, import_tailwind_theme.theme)("ringOffsetWidth")[ringOffsetWidth];
477
+ const ringColorRgb = (0, import_tailwind_theme.theme)("colors")[ringColor];
478
+ const ringOffsetColorRgb = (0, import_tailwind_theme.theme)("colors")[ringOffsetColor];
479
+ const ringOffsetShadow = `${inset2} 0 0 0 ${ringOffsetWidthUnits} ${ringOffsetColorRgb}`;
480
+ const ringWidthParsed = parseFloat(ringWidthUnits);
481
+ const ringOffsetWidthParsed = parseFloat(ringOffsetWidthUnits);
482
+ const ringShadow = `${inset2} 0 0 0 ${ringWidthParsed + ringOffsetWidthParsed}px ${ringColorRgb}`;
483
+ const value = (0, import_css_data.parseBoxShadow)(`${ringOffsetShadow}, ${ringShadow}`);
484
+ return [
485
+ {
486
+ property: "boxShadow",
487
+ value
488
+ }
489
+ ];
490
+ };
491
+ const pointerEvents = (value) => {
492
+ return [{ property: "pointerEvents", value: { type: "keyword", value } }];
493
+ };
494
+ const transition = (value) => {
495
+ if (value === "none") {
496
+ return [
497
+ {
498
+ property: "transitionProperty",
499
+ value: { type: "keyword", value: "all" }
500
+ }
501
+ ];
502
+ }
503
+ return [
504
+ {
505
+ property: "transitionProperty",
506
+ value: { type: "keyword", value: "all" }
507
+ },
508
+ {
509
+ property: "transitionTimingFunction",
510
+ value: { type: "unparsed", value: "cubic-bezier(0.4, 0, 0.2, 1)" }
511
+ },
512
+ {
513
+ property: "transitionDuration",
514
+ value: { type: "unparsed", value: "150ms" }
515
+ }
516
+ ];
517
+ };
518
+ const hover = (value) => {
519
+ return value.map((decl) => ({
520
+ ...decl,
521
+ state: ":hover"
522
+ }));
523
+ };
524
+ const focus = (value) => {
525
+ return value.map((decl) => ({
526
+ ...decl,
527
+ state: ":focus"
528
+ }));
529
+ };
530
+ const focusVisible = (value) => {
531
+ return value.map((decl) => ({
532
+ ...decl,
533
+ state: ":focus-visible"
534
+ }));
535
+ };
536
+ const disabled = (value) => {
537
+ return value.map((decl) => ({
538
+ ...decl,
539
+ state: ":disabled"
540
+ }));
541
+ };
542
+ const state = (value, state2) => {
543
+ return value.map((decl) => ({
544
+ ...decl,
545
+ state: state2
546
+ }));
547
+ };
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var tailwind_colors_exports = {};
20
+ __export(tailwind_colors_exports, {
21
+ colors: () => colors
22
+ });
23
+ module.exports = __toCommonJS(tailwind_colors_exports);
24
+ const colors = {
25
+ transparent: "transparent",
26
+ current: "currentColor",
27
+ popover: "rgb(255, 255, 255)",
28
+ popoverForeground: "rgb(2, 8, 23)",
29
+ border: "rgb(226, 232, 240)",
30
+ background: "rgb(255, 255, 255)",
31
+ foreground: "hsl(222.2 84% 4.9%)",
32
+ ring: "rgb(148, 163, 184)",
33
+ mutedForeground: "rgb(100, 116, 139)",
34
+ muted: `hsl(210 40% 96.1%)`
35
+ };
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var tailwind_theme_exports = {};
30
+ __export(tailwind_theme_exports, {
31
+ theme: () => theme
32
+ });
33
+ module.exports = __toCommonJS(tailwind_theme_exports);
34
+ var import_defaultTheme = __toESM(require("tailwindcss/defaultTheme"), 1);
35
+ var import_tailwind_colors = require("./tailwind-colors");
36
+ const localTheme = { ...import_defaultTheme.default };
37
+ const theme = (name) => {
38
+ const value = localTheme?.[name];
39
+ if (typeof value === "function") {
40
+ return value({ theme, colors: import_tailwind_colors.colors, breakpoints: () => ({}) });
41
+ }
42
+ return value;
43
+ };
44
+ localTheme.colors = import_tailwind_colors.colors;
45
+ localTheme.borderRadius = { ...theme("borderRadius") };
46
+ localTheme.borderRadius.DEFAULT = "0.5rem";
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var tooltip_exports = {};
30
+ __export(tooltip_exports, {
31
+ Tooltip: () => Tooltip,
32
+ TooltipContent: () => TooltipContent,
33
+ TooltipTrigger: () => TooltipTrigger
34
+ });
35
+ module.exports = __toCommonJS(tooltip_exports);
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
38
+ var import_react = require("react");
39
+ const Tooltip = (0, import_react.forwardRef)(({ open: openProp, isOpen, ...props }, ref) => {
40
+ const open = openProp ?? (isOpen === "open" ? true : isOpen === "closed" ? false : void 0);
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipPrimitive.Provider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipPrimitive.Root, { open, ...props }) });
42
+ });
43
+ const TooltipTrigger = (0, import_react.forwardRef)(({ children, ...props }, ref) => {
44
+ const firstChild = import_react.Children.toArray(children)[0];
45
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipPrimitive.Trigger, { asChild: true, ref, ...props, children: firstChild ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { children: "Add button or link" }) });
46
+ });
47
+ const TooltipContent = (0, import_react.forwardRef)(({ sideOffset = 4, hideWhenDetached = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
+ TooltipPrimitive.Content,
49
+ {
50
+ ref,
51
+ hideWhenDetached,
52
+ sideOffset,
53
+ ...props
54
+ }
55
+ ) }));