@luxfi/ui 5.6.0 → 6.0.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 (125) hide show
  1. package/README.md +109 -0
  2. package/package.json +81 -278
  3. package/dist/accordion.cjs +0 -213
  4. package/dist/accordion.js +0 -186
  5. package/dist/alert.cjs +0 -553
  6. package/dist/alert.js +0 -531
  7. package/dist/avatar.cjs +0 -149
  8. package/dist/avatar.js +0 -125
  9. package/dist/badge.cjs +0 -611
  10. package/dist/badge.js +0 -589
  11. package/dist/button.cjs +0 -689
  12. package/dist/button.js +0 -664
  13. package/dist/checkbox.cjs +0 -265
  14. package/dist/checkbox.js +0 -241
  15. package/dist/close-button.cjs +0 -73
  16. package/dist/close-button.js +0 -51
  17. package/dist/collapsible.cjs +0 -702
  18. package/dist/collapsible.js +0 -679
  19. package/dist/color-mode.cjs +0 -96
  20. package/dist/color-mode.js +0 -72
  21. package/dist/dialog.cjs +0 -279
  22. package/dist/dialog.js +0 -246
  23. package/dist/drawer.cjs +0 -207
  24. package/dist/drawer.js +0 -175
  25. package/dist/empty-state.cjs +0 -93
  26. package/dist/empty-state.js +0 -71
  27. package/dist/field.cjs +0 -183
  28. package/dist/field.js +0 -160
  29. package/dist/heading.cjs +0 -46
  30. package/dist/heading.js +0 -40
  31. package/dist/icon-button.cjs +0 -491
  32. package/dist/icon-button.js +0 -470
  33. package/dist/image.cjs +0 -572
  34. package/dist/image.js +0 -551
  35. package/dist/index.cjs +0 -5779
  36. package/dist/index.js +0 -5619
  37. package/dist/input-group.cjs +0 -155
  38. package/dist/input-group.js +0 -133
  39. package/dist/input.cjs +0 -65
  40. package/dist/input.js +0 -59
  41. package/dist/link.cjs +0 -630
  42. package/dist/link.js +0 -606
  43. package/dist/menu.cjs +0 -305
  44. package/dist/menu.js +0 -269
  45. package/dist/pin-input.cjs +0 -182
  46. package/dist/pin-input.js +0 -160
  47. package/dist/popover.cjs +0 -327
  48. package/dist/popover.js +0 -294
  49. package/dist/progress-circle.cjs +0 -152
  50. package/dist/progress-circle.js +0 -128
  51. package/dist/progress.cjs +0 -117
  52. package/dist/progress.js +0 -94
  53. package/dist/provider.cjs +0 -62
  54. package/dist/provider.js +0 -40
  55. package/dist/radio.cjs +0 -177
  56. package/dist/radio.js +0 -153
  57. package/dist/rating.cjs +0 -80
  58. package/dist/rating.js +0 -58
  59. package/dist/select.cjs +0 -791
  60. package/dist/select.js +0 -757
  61. package/dist/separator.cjs +0 -57
  62. package/dist/separator.js +0 -51
  63. package/dist/skeleton.cjs +0 -370
  64. package/dist/skeleton.js +0 -346
  65. package/dist/slider.cjs +0 -138
  66. package/dist/slider.js +0 -115
  67. package/dist/switch.cjs +0 -163
  68. package/dist/switch.js +0 -140
  69. package/dist/table.cjs +0 -1044
  70. package/dist/table.js +0 -1013
  71. package/dist/tabs.cjs +0 -240
  72. package/dist/tabs.js +0 -213
  73. package/dist/tag.cjs +0 -651
  74. package/dist/tag.js +0 -628
  75. package/dist/textarea.cjs +0 -65
  76. package/dist/textarea.js +0 -59
  77. package/dist/toaster.cjs +0 -99
  78. package/dist/toaster.js +0 -96
  79. package/dist/tooltip.cjs +0 -171
  80. package/dist/tooltip.js +0 -148
  81. package/dist/utils.cjs +0 -11
  82. package/dist/utils.js +0 -9
  83. package/src/accordion.tsx +0 -285
  84. package/src/alert.tsx +0 -221
  85. package/src/avatar.tsx +0 -174
  86. package/src/badge.tsx +0 -158
  87. package/src/button.tsx +0 -411
  88. package/src/checkbox.tsx +0 -307
  89. package/src/close-button.tsx +0 -51
  90. package/src/collapsible.tsx +0 -126
  91. package/src/color-mode.tsx +0 -125
  92. package/src/dialog.tsx +0 -356
  93. package/src/drawer.tsx +0 -186
  94. package/src/empty-state.tsx +0 -97
  95. package/src/field.tsx +0 -202
  96. package/src/heading.tsx +0 -55
  97. package/src/icon-button.tsx +0 -192
  98. package/src/image.tsx +0 -280
  99. package/src/index.ts +0 -192
  100. package/src/input-group.tsx +0 -159
  101. package/src/input.tsx +0 -60
  102. package/src/link.tsx +0 -326
  103. package/src/menu.tsx +0 -471
  104. package/src/pin-input.tsx +0 -187
  105. package/src/popover.tsx +0 -400
  106. package/src/progress-circle.tsx +0 -180
  107. package/src/progress.tsx +0 -109
  108. package/src/provider.tsx +0 -12
  109. package/src/radio.tsx +0 -175
  110. package/src/rating.tsx +0 -79
  111. package/src/select.tsx +0 -696
  112. package/src/separator.tsx +0 -59
  113. package/src/skeleton.tsx +0 -302
  114. package/src/slider.tsx +0 -152
  115. package/src/switch.tsx +0 -158
  116. package/src/table.tsx +0 -621
  117. package/src/tabs.tsx +0 -354
  118. package/src/tag.tsx +0 -159
  119. package/src/textarea.tsx +0 -60
  120. package/src/toaster.tsx +0 -117
  121. package/src/tokens.css +0 -438
  122. package/src/tooltip.tsx +0 -184
  123. package/src/utils/cn.ts +0 -7
  124. package/src/utils.ts +0 -6
  125. package/tokens.css +0 -438
package/dist/drawer.cjs DELETED
@@ -1,207 +0,0 @@
1
- "use client";
2
- 'use strict';
3
-
4
- var RadixDialog = require('@radix-ui/react-dialog');
5
- var React2 = require('react');
6
- var clsx = require('clsx');
7
- var tailwindMerge = require('tailwind-merge');
8
- var jsxRuntime = require('react/jsx-runtime');
9
-
10
- function _interopNamespace(e) {
11
- if (e && e.__esModule) return e;
12
- var n = Object.create(null);
13
- if (e) {
14
- Object.keys(e).forEach(function (k) {
15
- if (k !== 'default') {
16
- var d = Object.getOwnPropertyDescriptor(e, k);
17
- Object.defineProperty(n, k, d.get ? d : {
18
- enumerable: true,
19
- get: function () { return e[k]; }
20
- });
21
- }
22
- });
23
- }
24
- n.default = e;
25
- return Object.freeze(n);
26
- }
27
-
28
- var RadixDialog__namespace = /*#__PURE__*/_interopNamespace(RadixDialog);
29
- var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
30
-
31
- // src/drawer.tsx
32
- function cn(...inputs) {
33
- return tailwindMerge.twMerge(clsx.clsx(inputs));
34
- }
35
- var CLOSE_ICON_PATH = "M9.44 8.035a.791.791 0 0 0 1.12 0l3.802-3.803a.791.791 0 0 1 1.119 0l.287.287a.79.79 0 0 1 0 1.119L11.965 9.44a.79.79 0 0 0 0 1.118l3.803 3.803a.791.791 0 0 1 0 1.119l-.287.287a.791.791 0 0 1-1.119 0l-3.803-3.803a.79.79 0 0 0-1.118 0l-3.803 3.803a.79.79 0 0 1-1.119 0l-.287-.287a.791.791 0 0 1 0-1.119l3.803-3.803a.791.791 0 0 0 0-1.118L4.232 5.638a.791.791 0 0 1 0-1.119l.287-.287a.791.791 0 0 1 1.119 0L9.44 8.035Z";
36
- var CloseButton = React2__namespace.forwardRef(function CloseButton2(props, ref) {
37
- const { variant: _variant, size: _size, className, children, ...rest } = props;
38
- return /* @__PURE__ */ jsxRuntime.jsx(
39
- "button",
40
- {
41
- type: "button",
42
- "aria-label": "Close",
43
- ref,
44
- className: cn(
45
- "inline-flex items-center justify-center",
46
- "size-5 min-w-0 shrink-0 p-0",
47
- "rounded-sm border-0 overflow-hidden",
48
- "bg-transparent text-[var(--closeButton-fg,currentColor)]",
49
- "hover:bg-transparent hover:text-[var(--hover-color,currentColor)]",
50
- "disabled:opacity-40",
51
- "cursor-pointer",
52
- className
53
- ),
54
- ...rest,
55
- children: children ?? /* @__PURE__ */ jsxRuntime.jsx(
56
- "svg",
57
- {
58
- className: "size-5",
59
- viewBox: "0 0 20 20",
60
- fill: "none",
61
- "aria-hidden": "true",
62
- children: /* @__PURE__ */ jsxRuntime.jsx(
63
- "path",
64
- {
65
- d: CLOSE_ICON_PATH,
66
- fill: "currentColor"
67
- }
68
- )
69
- }
70
- )
71
- }
72
- );
73
- });
74
- var DrawerPlacementContext = React2__namespace.createContext("right");
75
- var DrawerSizeContext = React2__namespace.createContext("md");
76
- var DrawerRoot = (props) => {
77
- const {
78
- children,
79
- open,
80
- defaultOpen,
81
- onOpenChange,
82
- placement = "right",
83
- modal = true,
84
- size = "md"
85
- } = props;
86
- const handleOpenChange = React2__namespace.useCallback((nextOpen) => {
87
- onOpenChange?.({ open: nextOpen });
88
- }, [onOpenChange]);
89
- return /* @__PURE__ */ jsxRuntime.jsx(DrawerPlacementContext.Provider, { value: placement, children: /* @__PURE__ */ jsxRuntime.jsx(DrawerSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsxRuntime.jsx(
90
- RadixDialog__namespace.Root,
91
- {
92
- open,
93
- defaultOpen,
94
- onOpenChange: handleOpenChange,
95
- modal,
96
- children
97
- }
98
- ) }) });
99
- };
100
- var PLACEMENT_CLASSES = {
101
- right: [
102
- "inset-y-0 right-0",
103
- "data-[state=open]:animate-in data-[state=open]:slide-in-from-right",
104
- "data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right"
105
- ].join(" "),
106
- left: [
107
- "inset-y-0 left-0",
108
- "data-[state=open]:animate-in data-[state=open]:slide-in-from-left",
109
- "data-[state=closed]:animate-out data-[state=closed]:slide-out-to-left"
110
- ].join(" "),
111
- top: [
112
- "inset-x-0 top-0",
113
- "data-[state=open]:animate-in data-[state=open]:slide-in-from-top",
114
- "data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top"
115
- ].join(" "),
116
- bottom: [
117
- "inset-x-0 bottom-0",
118
- "data-[state=open]:animate-in data-[state=open]:slide-in-from-bottom",
119
- "data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom"
120
- ].join(" ")
121
- };
122
- var SIZE_CLASSES = {
123
- right: { xs: "w-60", sm: "w-80", md: "w-96", lg: "w-[480px]", xl: "w-[640px]", full: "w-screen" },
124
- left: { xs: "w-60", sm: "w-80", md: "w-96", lg: "w-[480px]", xl: "w-[640px]", full: "w-screen" },
125
- top: { xs: "h-40", sm: "h-60", md: "h-80", lg: "h-96", xl: "h-[480px]", full: "h-screen" },
126
- bottom: { xs: "h-40", sm: "h-60", md: "h-80", lg: "h-96", xl: "h-[480px]", full: "h-screen" }
127
- };
128
- var DrawerContent = React2__namespace.forwardRef(
129
- function DrawerContent2(props, ref) {
130
- const { children, portalled = true, portalRef, offset: _offset, backdrop = true, className, ...rest } = props;
131
- const placement = React2__namespace.useContext(DrawerPlacementContext);
132
- const size = React2__namespace.useContext(DrawerSizeContext);
133
- const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
134
- backdrop && /* @__PURE__ */ jsxRuntime.jsx(
135
- RadixDialog__namespace.Overlay,
136
- {
137
- className: cn(
138
- "fixed inset-0 z-50 bg-black/50",
139
- "data-[state=open]:animate-in data-[state=open]:fade-in-0",
140
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0"
141
- )
142
- }
143
- ),
144
- /* @__PURE__ */ jsxRuntime.jsx(
145
- RadixDialog__namespace.Content,
146
- {
147
- ref,
148
- className: cn(
149
- "fixed z-50 flex flex-col bg-[var(--color-drawer-bg)] shadow-[var(--shadow-drawer)] duration-300",
150
- PLACEMENT_CLASSES[placement] ?? PLACEMENT_CLASSES.right,
151
- SIZE_CLASSES[placement]?.[size] ?? SIZE_CLASSES.right?.md,
152
- className
153
- ),
154
- ...rest,
155
- children
156
- }
157
- )
158
- ] });
159
- if (portalled) {
160
- return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Portal, { container: portalRef?.current ?? void 0, children: content });
161
- }
162
- return content;
163
- }
164
- );
165
- var DrawerCloseTrigger = React2__namespace.forwardRef(function DrawerCloseTrigger2(props, ref) {
166
- return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
167
- CloseButton,
168
- {
169
- ref,
170
- className: cn("absolute top-7 right-5", props.className),
171
- ...props
172
- }
173
- ) });
174
- });
175
- var DrawerTrigger = (props) => {
176
- const { asChild = true, ...rest } = props;
177
- return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Trigger, { asChild, ...rest });
178
- };
179
- var DrawerHeader = React2__namespace.forwardRef(
180
- function DrawerHeader2({ className, ...props }, ref) {
181
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex flex-col gap-1.5 p-6 pb-0", className), ...props });
182
- }
183
- );
184
- var DrawerBody = React2__namespace.forwardRef(
185
- function DrawerBody2({ className, ...props }, ref) {
186
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex-1 overflow-auto p-6", className), ...props });
187
- }
188
- );
189
- var DrawerFooter = React2__namespace.forwardRef(
190
- function DrawerFooter2({ className, ...props }, ref) {
191
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center justify-end gap-2 p-6 pt-0", className), ...props });
192
- }
193
- );
194
- var DrawerTitle = RadixDialog__namespace.Title;
195
- var DrawerDescription = RadixDialog__namespace.Description;
196
- var DrawerActionTrigger = RadixDialog__namespace.Close;
197
-
198
- exports.DrawerActionTrigger = DrawerActionTrigger;
199
- exports.DrawerBody = DrawerBody;
200
- exports.DrawerCloseTrigger = DrawerCloseTrigger;
201
- exports.DrawerContent = DrawerContent;
202
- exports.DrawerDescription = DrawerDescription;
203
- exports.DrawerFooter = DrawerFooter;
204
- exports.DrawerHeader = DrawerHeader;
205
- exports.DrawerRoot = DrawerRoot;
206
- exports.DrawerTitle = DrawerTitle;
207
- exports.DrawerTrigger = DrawerTrigger;
package/dist/drawer.js DELETED
@@ -1,175 +0,0 @@
1
- "use client";
2
- import * as RadixDialog from '@radix-ui/react-dialog';
3
- import * as React2 from 'react';
4
- import { clsx } from 'clsx';
5
- import { twMerge } from 'tailwind-merge';
6
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
-
8
- // src/drawer.tsx
9
- function cn(...inputs) {
10
- return twMerge(clsx(inputs));
11
- }
12
- var CLOSE_ICON_PATH = "M9.44 8.035a.791.791 0 0 0 1.12 0l3.802-3.803a.791.791 0 0 1 1.119 0l.287.287a.79.79 0 0 1 0 1.119L11.965 9.44a.79.79 0 0 0 0 1.118l3.803 3.803a.791.791 0 0 1 0 1.119l-.287.287a.791.791 0 0 1-1.119 0l-3.803-3.803a.79.79 0 0 0-1.118 0l-3.803 3.803a.79.79 0 0 1-1.119 0l-.287-.287a.791.791 0 0 1 0-1.119l3.803-3.803a.791.791 0 0 0 0-1.118L4.232 5.638a.791.791 0 0 1 0-1.119l.287-.287a.791.791 0 0 1 1.119 0L9.44 8.035Z";
13
- var CloseButton = React2.forwardRef(function CloseButton2(props, ref) {
14
- const { variant: _variant, size: _size, className, children, ...rest } = props;
15
- return /* @__PURE__ */ jsx(
16
- "button",
17
- {
18
- type: "button",
19
- "aria-label": "Close",
20
- ref,
21
- className: cn(
22
- "inline-flex items-center justify-center",
23
- "size-5 min-w-0 shrink-0 p-0",
24
- "rounded-sm border-0 overflow-hidden",
25
- "bg-transparent text-[var(--closeButton-fg,currentColor)]",
26
- "hover:bg-transparent hover:text-[var(--hover-color,currentColor)]",
27
- "disabled:opacity-40",
28
- "cursor-pointer",
29
- className
30
- ),
31
- ...rest,
32
- children: children ?? /* @__PURE__ */ jsx(
33
- "svg",
34
- {
35
- className: "size-5",
36
- viewBox: "0 0 20 20",
37
- fill: "none",
38
- "aria-hidden": "true",
39
- children: /* @__PURE__ */ jsx(
40
- "path",
41
- {
42
- d: CLOSE_ICON_PATH,
43
- fill: "currentColor"
44
- }
45
- )
46
- }
47
- )
48
- }
49
- );
50
- });
51
- var DrawerPlacementContext = React2.createContext("right");
52
- var DrawerSizeContext = React2.createContext("md");
53
- var DrawerRoot = (props) => {
54
- const {
55
- children,
56
- open,
57
- defaultOpen,
58
- onOpenChange,
59
- placement = "right",
60
- modal = true,
61
- size = "md"
62
- } = props;
63
- const handleOpenChange = React2.useCallback((nextOpen) => {
64
- onOpenChange?.({ open: nextOpen });
65
- }, [onOpenChange]);
66
- return /* @__PURE__ */ jsx(DrawerPlacementContext.Provider, { value: placement, children: /* @__PURE__ */ jsx(DrawerSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx(
67
- RadixDialog.Root,
68
- {
69
- open,
70
- defaultOpen,
71
- onOpenChange: handleOpenChange,
72
- modal,
73
- children
74
- }
75
- ) }) });
76
- };
77
- var PLACEMENT_CLASSES = {
78
- right: [
79
- "inset-y-0 right-0",
80
- "data-[state=open]:animate-in data-[state=open]:slide-in-from-right",
81
- "data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right"
82
- ].join(" "),
83
- left: [
84
- "inset-y-0 left-0",
85
- "data-[state=open]:animate-in data-[state=open]:slide-in-from-left",
86
- "data-[state=closed]:animate-out data-[state=closed]:slide-out-to-left"
87
- ].join(" "),
88
- top: [
89
- "inset-x-0 top-0",
90
- "data-[state=open]:animate-in data-[state=open]:slide-in-from-top",
91
- "data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top"
92
- ].join(" "),
93
- bottom: [
94
- "inset-x-0 bottom-0",
95
- "data-[state=open]:animate-in data-[state=open]:slide-in-from-bottom",
96
- "data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom"
97
- ].join(" ")
98
- };
99
- var SIZE_CLASSES = {
100
- right: { xs: "w-60", sm: "w-80", md: "w-96", lg: "w-[480px]", xl: "w-[640px]", full: "w-screen" },
101
- left: { xs: "w-60", sm: "w-80", md: "w-96", lg: "w-[480px]", xl: "w-[640px]", full: "w-screen" },
102
- top: { xs: "h-40", sm: "h-60", md: "h-80", lg: "h-96", xl: "h-[480px]", full: "h-screen" },
103
- bottom: { xs: "h-40", sm: "h-60", md: "h-80", lg: "h-96", xl: "h-[480px]", full: "h-screen" }
104
- };
105
- var DrawerContent = React2.forwardRef(
106
- function DrawerContent2(props, ref) {
107
- const { children, portalled = true, portalRef, offset: _offset, backdrop = true, className, ...rest } = props;
108
- const placement = React2.useContext(DrawerPlacementContext);
109
- const size = React2.useContext(DrawerSizeContext);
110
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [
111
- backdrop && /* @__PURE__ */ jsx(
112
- RadixDialog.Overlay,
113
- {
114
- className: cn(
115
- "fixed inset-0 z-50 bg-black/50",
116
- "data-[state=open]:animate-in data-[state=open]:fade-in-0",
117
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0"
118
- )
119
- }
120
- ),
121
- /* @__PURE__ */ jsx(
122
- RadixDialog.Content,
123
- {
124
- ref,
125
- className: cn(
126
- "fixed z-50 flex flex-col bg-[var(--color-drawer-bg)] shadow-[var(--shadow-drawer)] duration-300",
127
- PLACEMENT_CLASSES[placement] ?? PLACEMENT_CLASSES.right,
128
- SIZE_CLASSES[placement]?.[size] ?? SIZE_CLASSES.right?.md,
129
- className
130
- ),
131
- ...rest,
132
- children
133
- }
134
- )
135
- ] });
136
- if (portalled) {
137
- return /* @__PURE__ */ jsx(RadixDialog.Portal, { container: portalRef?.current ?? void 0, children: content });
138
- }
139
- return content;
140
- }
141
- );
142
- var DrawerCloseTrigger = React2.forwardRef(function DrawerCloseTrigger2(props, ref) {
143
- return /* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, children: /* @__PURE__ */ jsx(
144
- CloseButton,
145
- {
146
- ref,
147
- className: cn("absolute top-7 right-5", props.className),
148
- ...props
149
- }
150
- ) });
151
- });
152
- var DrawerTrigger = (props) => {
153
- const { asChild = true, ...rest } = props;
154
- return /* @__PURE__ */ jsx(RadixDialog.Trigger, { asChild, ...rest });
155
- };
156
- var DrawerHeader = React2.forwardRef(
157
- function DrawerHeader2({ className, ...props }, ref) {
158
- return /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col gap-1.5 p-6 pb-0", className), ...props });
159
- }
160
- );
161
- var DrawerBody = React2.forwardRef(
162
- function DrawerBody2({ className, ...props }, ref) {
163
- return /* @__PURE__ */ jsx("div", { ref, className: cn("flex-1 overflow-auto p-6", className), ...props });
164
- }
165
- );
166
- var DrawerFooter = React2.forwardRef(
167
- function DrawerFooter2({ className, ...props }, ref) {
168
- return /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center justify-end gap-2 p-6 pt-0", className), ...props });
169
- }
170
- );
171
- var DrawerTitle = RadixDialog.Title;
172
- var DrawerDescription = RadixDialog.Description;
173
- var DrawerActionTrigger = RadixDialog.Close;
174
-
175
- export { DrawerActionTrigger, DrawerBody, DrawerCloseTrigger, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerRoot, DrawerTitle, DrawerTrigger };
@@ -1,93 +0,0 @@
1
- "use client";
2
- 'use strict';
3
-
4
- var React = require('react');
5
- var clsx = require('clsx');
6
- var tailwindMerge = require('tailwind-merge');
7
- var jsxRuntime = require('react/jsx-runtime');
8
-
9
- function _interopNamespace(e) {
10
- if (e && e.__esModule) return e;
11
- var n = Object.create(null);
12
- if (e) {
13
- Object.keys(e).forEach(function (k) {
14
- if (k !== 'default') {
15
- var d = Object.getOwnPropertyDescriptor(e, k);
16
- Object.defineProperty(n, k, d.get ? d : {
17
- enumerable: true,
18
- get: function () { return e[k]; }
19
- });
20
- }
21
- });
22
- }
23
- n.default = e;
24
- return Object.freeze(n);
25
- }
26
-
27
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
-
29
- // src/empty-state.tsx
30
- function cn(...inputs) {
31
- return tailwindMerge.twMerge(clsx.clsx(inputs));
32
- }
33
- var apos = "\u2019";
34
- function upperFirst(str) {
35
- return str.charAt(0).toUpperCase() + str.slice(1);
36
- }
37
- var ICONS = {};
38
- var EmptyState = React__namespace.forwardRef(
39
- function EmptyState2(props, ref) {
40
- const { title, description, term, type = "query", icon, children, className, ...rest } = props;
41
- const titleContent = (() => {
42
- if (title) {
43
- return title;
44
- }
45
- if (type === "stats") {
46
- return "Collecting data";
47
- }
48
- if (type === "coming_soon") {
49
- return "Coming soon";
50
- }
51
- return "No results";
52
- })();
53
- const descriptionContent = (() => {
54
- if (description) {
55
- return description;
56
- }
57
- if (term && type === "query") {
58
- return `Couldn${apos}t find any ${term} that matches your query.`;
59
- }
60
- if (type === "stats") {
61
- return term ? `${upperFirst(term)} stats will be added soon` : "Charts and statistics will be available soon";
62
- }
63
- if (type === "coming_soon") {
64
- return "The information will be available soon. Stay tuned!";
65
- }
66
- })();
67
- const iconContent = (() => {
68
- const Icon = ICONS[type];
69
- if (Icon) {
70
- return /* @__PURE__ */ jsxRuntime.jsx(Icon, {});
71
- }
72
- return icon;
73
- })();
74
- return /* @__PURE__ */ jsxRuntime.jsx(
75
- "div",
76
- {
77
- ref,
78
- className: cn("flex items-center justify-center py-10", className),
79
- ...rest,
80
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-5", children: [
81
- iconContent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: iconContent }),
82
- descriptionContent ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2 text-center", children: [
83
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold text-text-secondary", children: titleContent }),
84
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-text-secondary", children: descriptionContent })
85
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold text-text-secondary", children: titleContent }),
86
- children
87
- ] })
88
- }
89
- );
90
- }
91
- );
92
-
93
- exports.EmptyState = EmptyState;
@@ -1,71 +0,0 @@
1
- "use client";
2
- import * as React from 'react';
3
- import { clsx } from 'clsx';
4
- import { twMerge } from 'tailwind-merge';
5
- import { jsx, jsxs } from 'react/jsx-runtime';
6
-
7
- // src/empty-state.tsx
8
- function cn(...inputs) {
9
- return twMerge(clsx(inputs));
10
- }
11
- var apos = "\u2019";
12
- function upperFirst(str) {
13
- return str.charAt(0).toUpperCase() + str.slice(1);
14
- }
15
- var ICONS = {};
16
- var EmptyState = React.forwardRef(
17
- function EmptyState2(props, ref) {
18
- const { title, description, term, type = "query", icon, children, className, ...rest } = props;
19
- const titleContent = (() => {
20
- if (title) {
21
- return title;
22
- }
23
- if (type === "stats") {
24
- return "Collecting data";
25
- }
26
- if (type === "coming_soon") {
27
- return "Coming soon";
28
- }
29
- return "No results";
30
- })();
31
- const descriptionContent = (() => {
32
- if (description) {
33
- return description;
34
- }
35
- if (term && type === "query") {
36
- return `Couldn${apos}t find any ${term} that matches your query.`;
37
- }
38
- if (type === "stats") {
39
- return term ? `${upperFirst(term)} stats will be added soon` : "Charts and statistics will be available soon";
40
- }
41
- if (type === "coming_soon") {
42
- return "The information will be available soon. Stay tuned!";
43
- }
44
- })();
45
- const iconContent = (() => {
46
- const Icon = ICONS[type];
47
- if (Icon) {
48
- return /* @__PURE__ */ jsx(Icon, {});
49
- }
50
- return icon;
51
- })();
52
- return /* @__PURE__ */ jsx(
53
- "div",
54
- {
55
- ref,
56
- className: cn("flex items-center justify-center py-10", className),
57
- ...rest,
58
- children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-5", children: [
59
- iconContent && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: iconContent }),
60
- descriptionContent ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2 text-center", children: [
61
- /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold text-text-secondary", children: titleContent }),
62
- /* @__PURE__ */ jsx("span", { className: "text-sm text-text-secondary", children: descriptionContent })
63
- ] }) : /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold text-text-secondary", children: titleContent }),
64
- children
65
- ] })
66
- }
67
- );
68
- }
69
- );
70
-
71
- export { EmptyState };