@vellumlabs/cexplorer-sdk 1.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.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # cexplorer-sdk
2
+ SDK
@@ -0,0 +1,782 @@
1
+ import { ButtonHTMLAttributes } from 'react';
2
+ import { default as default_2 } from 'react';
3
+ import { ForwardRefExoticComponent } from 'react';
4
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
5
+ import { MouseEventHandler } from 'react';
6
+ import * as React_2 from 'react';
7
+ import { ReactNode } from 'react';
8
+ import { ReactPortal } from 'react';
9
+ import { RefAttributes } from 'react';
10
+ import { RefObject } from 'react';
11
+
12
+ /**
13
+ * A flexible button component with multiple sizes and variants.
14
+ * Supports icons, custom styling, and all standard button HTML attributes.
15
+ *
16
+ * @param props - Button component props
17
+ * @returns JSX element representing the button
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * // Basic button
22
+ * <Button size="md" variant="primary" label="Click me" />
23
+ *
24
+ * // Button with icons
25
+ * <Button
26
+ * size="lg"
27
+ * variant="secondary"
28
+ * label="Save"
29
+ * leftIcon={<SaveIcon />}
30
+ * rightIcon={<ArrowIcon />}
31
+ * />
32
+ *
33
+ * // Disabled button with custom styling
34
+ * <Button
35
+ * size="sm"
36
+ * variant="tertiary"
37
+ * label="Disabled"
38
+ * disabled
39
+ * className="my-custom-class"
40
+ * />
41
+ * ```
42
+ */
43
+ export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
44
+
45
+ /**
46
+ * Props for the Button component
47
+ */
48
+ export declare interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onClick"> {
49
+ /** Button size affecting padding and text size */
50
+ size: ButtonSize;
51
+ /** Visual variant determining colors and styling */
52
+ variant: ButtonVariant;
53
+ /** Button text or content */
54
+ label?: ReactNode;
55
+ /** Icon displayed to the right of the label */
56
+ rightIcon?: ReactNode;
57
+ /** Icon displayed to the left of the label */
58
+ leftIcon?: ReactNode;
59
+ /** Additional CSS classes */
60
+ className?: string;
61
+ /** Whether the button is disabled */
62
+ disabled?: boolean;
63
+ /** Click handler function */
64
+ onClick?: () => void;
65
+ }
66
+
67
+ /**
68
+ * Available button sizes
69
+ */
70
+ export declare type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
71
+
72
+ /**
73
+ * Available button visual variants
74
+ */
75
+ export declare type ButtonVariant = "primary" | "secondary" | "tertiary" | "purple" | "red" | "discord";
76
+
77
+ /**
78
+ * Combines multiple class names into a single string, filtering out falsy values.
79
+ *
80
+ * @param classes - Array of class names that can be strings, undefined, null, or false
81
+ * @returns A single string containing all valid class names separated by spaces
82
+ *
83
+ * @example
84
+ * ```tsx
85
+ * cn("btn", isActive && "btn-active", "text-lg") // "btn btn-active text-lg"
86
+ * cn("card", undefined, null, false, "shadow") // "card shadow"
87
+ * ```
88
+ */
89
+ export declare const cn: (...classes: (string | undefined | null | false)[]) => string;
90
+
91
+ /**
92
+ * Theme color constants that map to CSS custom properties.
93
+ * These colors automatically adapt to light/dark themes through CSS variables.
94
+ *
95
+ * @example
96
+ * ```tsx
97
+ * import { colors } from '@/constants/colors';
98
+ *
99
+ * <div style={{ color: colors.primary, backgroundColor: colors.cardBg }}>
100
+ * Content with themed colors
101
+ * </div>
102
+ * ```
103
+ *
104
+ * @remarks
105
+ * All color values use CSS custom properties (--variable-name) which are
106
+ * defined in the global CSS and change based on the current theme.
107
+ */
108
+ export declare const colors: {
109
+ /** Primary text color */
110
+ readonly text: "var(--text)";
111
+ /** Primary brand color */
112
+ readonly primary: "var(--primary)";
113
+ /** Dark blue accent color */
114
+ readonly darkBlue: "var(--darkBlue)";
115
+ /** Secondary accent color */
116
+ readonly secondary: "var(--secondary)";
117
+ /** Secondary text color */
118
+ readonly secondaryText: "var(--secondaryText)";
119
+ /** Secondary background color */
120
+ readonly secondaryBg: "var(--secondaryBg)";
121
+ /** Darker background variant */
122
+ readonly darker: "var(--darker)";
123
+ /** Main background color */
124
+ readonly background: "var(--background)";
125
+ /** Border color */
126
+ readonly border: "var(--border)";
127
+ /** Faded border color for subtle dividers */
128
+ readonly borderFaded: "var(--borderFaded)";
129
+ /** Primary gray text color */
130
+ readonly grayTextPrimary: "var(--grayTextPrimary)";
131
+ /** Secondary gray text color */
132
+ readonly grayTextSecondary: "var(--grayTextSecondary)";
133
+ /** Card background color */
134
+ readonly cardBg: "var(--cardBg)";
135
+ /** Purple text color for special content */
136
+ readonly purpleText: "var(--purpleText)";
137
+ /** Red text color for errors and warnings */
138
+ readonly redText: "var(--redText)";
139
+ /** Green text color for success states */
140
+ readonly greenText: "var(--greenText)";
141
+ /** Yellow text color for warnings and highlights */
142
+ readonly yellowText: "var(--yellowText)";
143
+ };
144
+
145
+ /**
146
+ * Configuration for a table column
147
+ * @template T The type of data items in the table
148
+ */
149
+ export declare interface Column<T> {
150
+ /** Unique identifier for the column */
151
+ key: string;
152
+ /** Column header content */
153
+ title: default_2.ReactNode;
154
+ /** Whether this column shows auto-generated ranking numbers */
155
+ standByRanking?: boolean;
156
+ /** Function to render cell content for this column */
157
+ render: (item: T) => default_2.ReactNode | null;
158
+ /** Additional content to display in the header */
159
+ extraContent?: default_2.ReactNode;
160
+ /** Fixed width in pixels */
161
+ widthPx?: number;
162
+ /** Whether the column is visible */
163
+ visible?: boolean;
164
+ /** Direction for ranking numbers (asc = descending numbers, desc = ascending) */
165
+ rankingStart?: "asc" | "desc";
166
+ /** Additional CSS classes for table cells */
167
+ className?: string;
168
+ /** Filter configuration for this column */
169
+ filter?: ColumnFilter;
170
+ }
171
+
172
+ /**
173
+ * Filter configuration for table columns
174
+ */
175
+ export declare interface ColumnFilter {
176
+ /** Whether the filter dropdown is currently open */
177
+ filterOpen?: boolean;
178
+ /** Whether the filter is currently active/applied */
179
+ activeFunnel?: boolean;
180
+ /** Content to display in the filter dropdown */
181
+ filterContent?: ReactNode;
182
+ /** Whether the filter button should be disabled */
183
+ filterButtonDisabled?: boolean;
184
+ /** Reference to the anchor element for positioning the filter dropdown */
185
+ anchorRef: RefObject<HTMLElement>;
186
+ /** Width of the filter dropdown */
187
+ width?: string;
188
+ /** Handler for showing the filter dropdown */
189
+ onShow?: MouseEventHandler<SVGSVGElement>;
190
+ /** Handler for resetting the filter */
191
+ onReset?: () => void;
192
+ /** Handler for applying the filter */
193
+ onFilter?: () => void;
194
+ }
195
+
196
+ /**
197
+ * Creates a variant function for styling components with different visual variants.
198
+ * Similar to class-variance-authority but lightweight and dependency-free.
199
+ *
200
+ * @template V - The variants record type
201
+ * @param base - Base CSS classes that are always applied
202
+ * @param config - Configuration object containing variants and default values
203
+ * @returns A function that takes variant props and returns combined class names
204
+ *
205
+ * @example
206
+ * ```tsx
207
+ * const buttonVariants = createVariants("btn rounded", {
208
+ * variants: {
209
+ * variant: {
210
+ * primary: "bg-blue-500 text-white",
211
+ * secondary: "bg-gray-500 text-white",
212
+ * },
213
+ * size: {
214
+ * sm: "px-3 py-1 text-sm",
215
+ * md: "px-4 py-2 text-base",
216
+ * lg: "px-6 py-3 text-lg",
217
+ * }
218
+ * },
219
+ * defaultVariants: {
220
+ * variant: "primary",
221
+ * size: "md"
222
+ * }
223
+ * });
224
+ *
225
+ * // Usage:
226
+ * buttonVariants({ variant: "secondary", size: "lg" })
227
+ * // Returns: "btn rounded bg-gray-500 text-white px-6 py-3 text-lg"
228
+ * ```
229
+ */
230
+ export declare const createVariants: <V extends Record<string, Record<string, string>>>(base: string, config: VariantConfig<V>) => (props?: VariantProps<V>) => string;
231
+
232
+ /**
233
+ * Props for pagination with external page state management
234
+ */
235
+ declare type ExternalPaginationProps = {
236
+ /** Current active page number */
237
+ currentPage: number;
238
+ /** Total number of pages */
239
+ totalPages: number;
240
+ /** Must not be provided - use onNavigate instead */
241
+ setCurrentPage?: never;
242
+ } & NavigationProps;
243
+
244
+ /**
245
+ * A positioned dropdown filter component that renders as a portal.
246
+ * Automatically positions itself relative to an anchor element and includes
247
+ * reset and apply buttons.
248
+ *
249
+ * @param props - Component props
250
+ * @returns JSX element representing the filter dropdown
251
+ *
252
+ * @example
253
+ * ```tsx
254
+ * const filterRef = useRef<HTMLButtonElement>(null);
255
+ * const [filterOpen, setFilterOpen] = useState(false);
256
+ *
257
+ * return (
258
+ * <div>
259
+ * <button ref={filterRef} onClick={() => setFilterOpen(!filterOpen)}>
260
+ * Filter
261
+ * </button>
262
+ * {filterOpen && (
263
+ * <FunnelFilter
264
+ * anchorRef={filterRef}
265
+ * onFilter={() => {
266
+ * console.log('Apply filter');
267
+ * setFilterOpen(false);
268
+ * }}
269
+ * onReset={() => {
270
+ * console.log('Reset filter');
271
+ * setFilterOpen(false);
272
+ * }}
273
+ * width="300px"
274
+ * >
275
+ * <div className="p-4">
276
+ * <input placeholder="Search..." />
277
+ * </div>
278
+ * </FunnelFilter>
279
+ * )}
280
+ * </div>
281
+ * );
282
+ * ```
283
+ *
284
+ * @remarks
285
+ * - Renders using React Portal for proper layering
286
+ * - Automatically repositions on scroll and resize
287
+ * - Prevents click events from bubbling up
288
+ * - Fixed positioning relative to anchor element
289
+ */
290
+ export declare const FunnelFilter: ({ anchorRef, children, disabled, width, onFilter, onReset, }: FunnelFilterProps) => ReactPortal;
291
+
292
+ /**
293
+ * Props for the FunnelFilter component
294
+ */
295
+ export declare interface FunnelFilterProps {
296
+ /** Reference to the element that the filter dropdown should be positioned relative to */
297
+ anchorRef: RefObject<HTMLElement>;
298
+ /** Whether the filter button should be disabled */
299
+ disabled?: boolean;
300
+ /** Callback function called when the filter is applied */
301
+ onFilter?: () => void;
302
+ /** Callback function called when the filter is reset */
303
+ onReset?: () => void;
304
+ /** Content to display in the filter dropdown */
305
+ children: ReactNode;
306
+ /** Width of the filter dropdown */
307
+ width?: string;
308
+ }
309
+
310
+ /**
311
+ * Props for infinite scrolling table variant
312
+ * @template T The type of data items in the table
313
+ */
314
+ declare interface InfiniteQueryProps<T> extends PropsBase<T> {
315
+ /** Table type identifier */
316
+ type: "infinite";
317
+ /** Whether data is currently loading */
318
+ isLoading?: boolean;
319
+ /** Whether the next page is being fetched */
320
+ isFetchingNextPage?: boolean;
321
+ /** Function to fetch the next page of data */
322
+ onFetchNextPage?: () => void;
323
+ /** Current page number */
324
+ currentPage: number;
325
+ }
326
+
327
+ /**
328
+ * Props for pagination with internal page state management
329
+ */
330
+ declare type InternalPaginationProps = {
331
+ /** Current active page number */
332
+ currentPage: number;
333
+ /** Total number of pages */
334
+ totalPages: number;
335
+ /** Function to update the current page */
336
+ setCurrentPage: React.Dispatch<React.SetStateAction<number>>;
337
+ } & NavigationProps;
338
+
339
+ /**
340
+ * Detects if the current device is a mobile device based on the user agent string.
341
+ *
342
+ * @returns `true` if the device is identified as mobile, `false` otherwise
343
+ *
344
+ * @example
345
+ * ```tsx
346
+ * if (isMobileDevice()) {
347
+ * // Show mobile-specific UI
348
+ * }
349
+ * ```
350
+ *
351
+ * @remarks
352
+ * This function checks for common mobile device identifiers in the user agent string.
353
+ * It includes phones, tablets, and other mobile devices from major manufacturers.
354
+ */
355
+ export declare const isMobileDevice: () => boolean;
356
+
357
+ /**
358
+ * A loading skeleton component that displays an animated placeholder while content is loading.
359
+ * Provides a shimmer effect and customizable dimensions.
360
+ *
361
+ * @param props - Component props
362
+ * @returns JSX element representing the loading skeleton
363
+ *
364
+ * @example
365
+ * ```tsx
366
+ * // Basic skeleton
367
+ * <LoadingSkeleton />
368
+ *
369
+ * // Custom sized skeleton
370
+ * <LoadingSkeleton
371
+ * height="40px"
372
+ * width="200px"
373
+ * rounded="lg"
374
+ * />
375
+ *
376
+ * // Skeleton for specific content
377
+ * <LoadingSkeleton
378
+ * height="20px"
379
+ * width="100%"
380
+ * maxWidth="300px"
381
+ * className="mb-4"
382
+ * />
383
+ * ```
384
+ *
385
+ * @remarks
386
+ * - Uses CSS shimmer animation for visual feedback
387
+ * - Supports all CSS dimension values (px, %, rem, etc.)
388
+ * - Automatically applies `shrink-0` to prevent flex shrinking
389
+ */
390
+ export declare const LoadingSkeleton: ({ height, width, maxHeight, maxWidth, rounded, className, }: LoadingSkeletonProps) => JSX_2.Element;
391
+
392
+ /**
393
+ * Props for the LoadingSkeleton component
394
+ */
395
+ export declare interface LoadingSkeletonProps {
396
+ /** Height of the skeleton (CSS value) */
397
+ height?: string;
398
+ /** Width of the skeleton (CSS value) */
399
+ width?: string;
400
+ /** Maximum height of the skeleton (CSS value) */
401
+ maxHeight?: string;
402
+ /** Maximum width of the skeleton (CSS value) */
403
+ maxWidth?: string;
404
+ /** Margin around the skeleton (CSS value) - currently unused */
405
+ margin?: string;
406
+ /** Border radius size */
407
+ rounded?: SkeletonRounded;
408
+ /** Additional CSS classes */
409
+ className?: string;
410
+ }
411
+
412
+ /**
413
+ * Navigation callback interface
414
+ */
415
+ declare interface NavigationProps {
416
+ /** Callback function called when page changes */
417
+ onNavigate?: (page: number) => void;
418
+ }
419
+
420
+ /**
421
+ * A component that displays a "no results found" message with a search icon.
422
+ * Used to indicate when searches, filters, or data queries return no results.
423
+ *
424
+ * @param props - Component props
425
+ * @returns JSX element showing the no results state
426
+ *
427
+ * @example
428
+ * ```tsx
429
+ * // Basic usage
430
+ * <NoResultsFound />
431
+ *
432
+ * // With custom message
433
+ * <NoResultsFound message="No users found matching your criteria" />
434
+ *
435
+ * // With custom styling
436
+ * <NoResultsFound
437
+ * message="No data available"
438
+ * className="my-custom-spacing"
439
+ * />
440
+ * ```
441
+ */
442
+ export declare const NoResultsFound: ({ message, className }?: NoResultsFoundProps) => JSX_2.Element;
443
+
444
+ /**
445
+ * Props for the NoResultsFound component
446
+ */
447
+ export declare interface NoResultsFoundProps {
448
+ /** Custom message to display instead of the default */
449
+ message?: string;
450
+ /** Additional CSS classes */
451
+ className?: string;
452
+ }
453
+
454
+ /**
455
+ * Paginates an array by returning a subset of items for the specified page.
456
+ *
457
+ * @template T - The type of items in the array
458
+ * @param array - The array to paginate
459
+ * @param currentPage - The current page number (1-based)
460
+ * @param itemsPerPage - The number of items to show per page
461
+ * @returns A slice of the array containing items for the current page
462
+ *
463
+ * @example
464
+ * ```tsx
465
+ * const items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
466
+ * const page1 = paginateArray(items, 1, 3); // [1, 2, 3]
467
+ * const page2 = paginateArray(items, 2, 3); // [4, 5, 6]
468
+ * ```
469
+ *
470
+ * @remarks
471
+ * - Page numbers are 1-based (first page is 1, not 0)
472
+ * - Returns empty array if the array is null/undefined
473
+ * - Returns empty array if currentPage is out of range
474
+ */
475
+ export declare const paginateArray: <T>(array: T[] | null | undefined, currentPage: number, itemsPerPage: number) => T[];
476
+
477
+ /**
478
+ * A flexible pagination component that supports both controlled and uncontrolled modes.
479
+ * Features page jumping with input validation and keyboard navigation.
480
+ *
481
+ * @param props - Pagination component props
482
+ * @returns JSX element representing the pagination controls
483
+ *
484
+ * @example
485
+ * ```tsx
486
+ * // Controlled pagination (external state)
487
+ * <Pagination
488
+ * currentPage={page}
489
+ * totalPages={Math.ceil(totalItems / itemsPerPage)}
490
+ * onNavigate={(newPage) => setPage(newPage)}
491
+ * />
492
+ * ```
493
+ *
494
+ * @example
495
+ * ```tsx
496
+ * // Uncontrolled pagination (internal state)
497
+ * const [currentPage, setCurrentPage] = useState(1);
498
+ * <Pagination
499
+ * currentPage={currentPage}
500
+ * setCurrentPage={setCurrentPage}
501
+ * totalPages={totalPages}
502
+ * />
503
+ * ```
504
+ *
505
+ * @remarks
506
+ * - Supports direct page input with validation
507
+ * - Automatically handles edge cases (first/last page)
508
+ * - Shows ellipsis for large page ranges
509
+ * - Keyboard accessible (Enter to jump to page)
510
+ */
511
+ export declare const Pagination: ({ currentPage, totalPages, setCurrentPage, onNavigate, }: PaginationProps) => JSX_2.Element;
512
+
513
+ /**
514
+ * Union type of all pagination props
515
+ */
516
+ export declare type PaginationProps = ExternalPaginationProps | InternalPaginationProps;
517
+
518
+ /**
519
+ * Union type of all possible table props
520
+ * @template T The type of data items in the table
521
+ */
522
+ declare type Props<T> = InfiniteQueryProps<T> | QueryProps<T>;
523
+
524
+ /**
525
+ * Base props shared between all table variants
526
+ * @template T The type of data items in the table
527
+ */
528
+ declare interface PropsBase<T> {
529
+ /** Array of data items to display */
530
+ items: T[] | undefined;
531
+ /** Column configuration array */
532
+ columns: Column<T>[];
533
+ /** Whether the table should be horizontally scrollable */
534
+ scrollable?: boolean;
535
+ /** Total number of items (for pagination calculations) */
536
+ totalItems?: number;
537
+ /** Number of items to show per page */
538
+ itemsPerPage?: number;
539
+ /** Whether to show ranking numbers */
540
+ standByRanking?: boolean;
541
+ /** Callback when column order changes via drag & drop */
542
+ onOrderChange?: (columnKeys: string[]) => void;
543
+ /** Minimum content width in pixels */
544
+ minContentWidth?: number;
545
+ /** Whether to disable column drag & drop */
546
+ disableDrag?: boolean;
547
+ /** Height of each table row in pixels */
548
+ rowHeight?: number;
549
+ /** Whether to enable infinite scrolling */
550
+ infiniteScrolling?: boolean;
551
+ }
552
+
553
+ /**
554
+ * Props for standard table variant
555
+ * @template T The type of data items in the table
556
+ */
557
+ declare interface QueryProps<T> extends PropsBase<T> {
558
+ /** Table type identifier */
559
+ type: "default";
560
+ /** Whether data is currently loading */
561
+ isLoading?: boolean;
562
+ /** Whether to enable built-in pagination */
563
+ pagination?: boolean;
564
+ }
565
+
566
+ /**
567
+ * Available border radius options for the skeleton
568
+ */
569
+ export declare type SkeletonRounded = "sm" | "md" | "lg" | "xl" | "full";
570
+
571
+ /**
572
+ * A comprehensive table component with support for infinite scrolling, pagination,
573
+ * sorting, filtering, and drag-and-drop column reordering.
574
+ *
575
+ * @template T The type of data items in the table (must extend Record<string, any>)
576
+ * @param props - Table configuration props
577
+ * @returns JSX element representing the table
578
+ *
579
+ * @example
580
+ * ```tsx
581
+ * // Basic table
582
+ * const columns: Column<User>[] = [
583
+ * {
584
+ * key: 'name',
585
+ * title: 'Name',
586
+ * render: (user) => user.name,
587
+ * visible: true,
588
+ * widthPx: 200
589
+ * },
590
+ * {
591
+ * key: 'email',
592
+ * title: 'Email',
593
+ * render: (user) => user.email,
594
+ * visible: true,
595
+ * widthPx: 250
596
+ * }
597
+ * ];
598
+ *
599
+ * <Table
600
+ * type="default"
601
+ * items={users}
602
+ * columns={columns}
603
+ * totalItems={users.length}
604
+ * isLoading={loading}
605
+ * />
606
+ * ```
607
+ *
608
+ * @example
609
+ * ```tsx
610
+ * // Infinite scrolling table
611
+ * <Table
612
+ * type="infinite"
613
+ * items={items}
614
+ * columns={columns}
615
+ * totalItems={totalCount}
616
+ * currentPage={1}
617
+ * infiniteScrolling={true}
618
+ * isLoading={loading}
619
+ * isFetchingNextPage={fetchingNext}
620
+ * onFetchNextPage={handleFetchNext}
621
+ * />
622
+ * ```
623
+ *
624
+ * @remarks
625
+ * - Supports both infinite scrolling and traditional pagination
626
+ * - Includes drag-and-drop column reordering on desktop
627
+ * - Mobile-friendly with touch interactions
628
+ * - Automatic loading states and skeleton placeholders
629
+ * - Built-in filtering system with custom filter content
630
+ * - Responsive design with horizontal scrolling when needed
631
+ */
632
+ export declare const Table: <T extends Record<string, any>>({ items: baseItems, columns: initialColumns, scrollable, totalItems, itemsPerPage, onOrderChange, minContentWidth, disableDrag, rowHeight, infiniteScrolling, type, ...props }: Props<T>) => JSX_2.Element;
633
+
634
+ /**
635
+ * Table body component (tbody element) that contains data rows.
636
+ * Removes border from the last row for clean appearance.
637
+ */
638
+ export declare const TableBody: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
639
+
640
+ /**
641
+ * Table caption component for table titles and descriptions.
642
+ * Provides accessible labeling for screen readers.
643
+ */
644
+ export declare const TableCaption: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableCaptionElement> & React_2.RefAttributes<HTMLTableCaptionElement>>;
645
+
646
+ /**
647
+ * Table data cell component (td element) for displaying content.
648
+ * Maintains consistent height and handles checkbox alignment.
649
+ */
650
+ export declare const TableCell: React_2.ForwardRefExoticComponent<React_2.TdHTMLAttributes<HTMLTableCellElement> & React_2.RefAttributes<HTMLTableCellElement>>;
651
+
652
+ /**
653
+ * Table footer component (tfoot element) with themed background.
654
+ * Includes top border and theme-aware background colors.
655
+ */
656
+ export declare const TableFooter: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
657
+
658
+ /**
659
+ * Table header cell component (th element) for column headers.
660
+ * Includes special handling for checkbox columns.
661
+ */
662
+ export declare const TableHead: React_2.ForwardRefExoticComponent<React_2.ThHTMLAttributes<HTMLTableCellElement> & React_2.RefAttributes<HTMLTableCellElement>>;
663
+
664
+ /**
665
+ * Table header component (thead element) with consistent styling.
666
+ * Automatically applies border styles to child rows.
667
+ */
668
+ export declare const TableHeader: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
669
+
670
+ /**
671
+ * Props for Table component extending standard HTML table attributes
672
+ */
673
+ export declare interface TableProps extends React_2.HTMLAttributes<HTMLTableElement> {
674
+ /** Minimum width for the table in pixels */
675
+ minwidth?: number;
676
+ }
677
+
678
+ /**
679
+ * Table row component (tr element) with fixed height and theming.
680
+ * Supports selection states and consistent spacing.
681
+ */
682
+ export declare const TableRow: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableRowElement> & React_2.RefAttributes<HTMLTableRowElement>>;
683
+
684
+ /**
685
+ * Available theme options for the application
686
+ */
687
+ export declare type Theme = "light" | "dark";
688
+
689
+ /**
690
+ * Theme context interface providing theme state and controls
691
+ */
692
+ declare interface ThemeContextType {
693
+ /** Current active theme */
694
+ theme: Theme;
695
+ /** Function to toggle between light and dark themes */
696
+ toggleTheme: () => void;
697
+ /** Function to set a specific theme */
698
+ setTheme: (theme: Theme) => void;
699
+ }
700
+
701
+ /**
702
+ * Provides theme context to child components with automatic persistence.
703
+ * Manages theme state, localStorage persistence, and DOM attribute updates.
704
+ *
705
+ * @param props - Component props
706
+ * @param props.children - Child components
707
+ * @param props.defaultTheme - Default theme if none is stored (defaults to "dark")
708
+ *
709
+ * @example
710
+ * ```tsx
711
+ * function App() {
712
+ * return (
713
+ * <ThemeProvider defaultTheme="light">
714
+ * <MyApp />
715
+ * </ThemeProvider>
716
+ * );
717
+ * }
718
+ * ```
719
+ *
720
+ * @remarks
721
+ * - Automatically sets `data-theme` attribute on document.documentElement
722
+ * - Persists theme preference in localStorage
723
+ * - Restores theme from localStorage on mount
724
+ */
725
+ export declare const ThemeProvider: ({ children, defaultTheme }: ThemeProviderProps) => JSX_2.Element;
726
+
727
+ /**
728
+ * Props for the ThemeProvider component
729
+ */
730
+ declare interface ThemeProviderProps {
731
+ /** Child components that will have access to theme context */
732
+ children: ReactNode;
733
+ /** Initial theme to use if no theme is stored in localStorage */
734
+ defaultTheme?: Theme;
735
+ }
736
+
737
+ /**
738
+ * Hook to access theme state and controls.
739
+ * Must be used within a ThemeProvider component.
740
+ *
741
+ * @returns Theme context object containing current theme and control functions
742
+ * @throws Error if used outside of ThemeProvider
743
+ *
744
+ * @example
745
+ * ```tsx
746
+ * function MyComponent() {
747
+ * const { theme, toggleTheme, setTheme } = useThemeStore();
748
+ *
749
+ * return (
750
+ * <div>
751
+ * <p>Current theme: {theme}</p>
752
+ * <button onClick={toggleTheme}>Toggle Theme</button>
753
+ * <button onClick={() => setTheme("dark")}>Set Dark</button>
754
+ * </div>
755
+ * );
756
+ * }
757
+ * ```
758
+ */
759
+ export declare const useThemeStore: () => ThemeContextType;
760
+
761
+ /**
762
+ * Configuration object for creating component variants
763
+ */
764
+ export declare interface VariantConfig<V extends Record<string, Record<string, string>>> {
765
+ /** Variant definitions mapping variant names to their possible values and corresponding classes */
766
+ variants: V;
767
+ /** Default values for variants */
768
+ defaultVariants?: Partial<{
769
+ [K in keyof V]: keyof V[K];
770
+ }>;
771
+ }
772
+
773
+ /**
774
+ * Props type for variant functions, allowing selection of variants plus custom className
775
+ */
776
+ export declare type VariantProps<V extends Record<string, Record<string, string>>> = Partial<{
777
+ [K in keyof V]: keyof V[K];
778
+ }> & {
779
+ className?: string;
780
+ };
781
+
782
+ export { }
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import*as a from"react";import l,{createContext as i,useContext as o,useState as s,useEffect as n,forwardRef as d,createElement as c,useLayoutEffect as h,useRef as m}from"react";import{createPortal as u}from"react-dom";const x=i(void 0),g=()=>{const e=o(x);if(!e)throw Error("useThemeStore must be used within ThemeProvider");return e},b="cexplorer_sdk_theme",p=({children:r,t:t="dark"})=>{const[a,l]=s((()=>{const e=localStorage.getItem(b);return!e||"light"!==e&&"dark"!==e?t:e})()),i=e=>{l(e),document.documentElement.setAttribute("data-theme",e),localStorage.setItem(b,e)};return n(()=>{document.documentElement.setAttribute("data-theme",a)},[a]),e(x.l,{value:{theme:a,i:i,o:()=>{i("light"===a?"dark":"light")}},children:r})},v=d(({size:t,variant:a,label:l,h:i,m:o,className:s="",disabled:n,u:d,...c},h)=>r("button",{p:h,u:d,className:`flex box-border max-w-fit justify-center min-w-fit items-center rounded-[8px] font-medium duration-150 hover:scale-[101%] active:scale-[98%] disabled:cursor-not-allowed disabled:opacity-50 ${{v:"bg-darkBlue text-white border-2 border-darkBlue hover:text-white",N:"bg-secondaryBg text-secondaryText border-2 border-secondaryText hover:text-secondaryText",k:"bg-cardBg border border-border",P:"bg-gradient-to-b hover:text-white from-purple-500 to-purple-700 text-white",red:"bg-redText text-white",T:"bg-[#677DC9] text-white"}[a]} ${{$:"py-1 px-1 text-[12px]",C:"py-2 px-3 text-[13px]",B:"py-2 px-4 text-sm",A:"py-2 px-4 text-md",H:"py-3 px-5 text-lg"}[t]} ${s}`,disabled:n,...c,children:[o&&e("span",{className:o&&l?"-ml-1 mr-2":"",children:o}),l&&e("span",{children:l}),i&&e("span",{className:"ml-2",children:i})]}));v.displayName="Button";const f=e=>{const r=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase()))(e);return r.charAt(0).toUpperCase()+r.slice(1)},y=(...e)=>e.filter((e,r,t)=>!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim(),w=e=>{for(const r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0};var N={W:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const k=d(({color:e="currentColor",size:r=24,strokeWidth:t=2,j:a,className:l="",children:i,S:o,...s},n)=>c("svg",{p:n,...N,width:r,height:r,stroke:e,strokeWidth:a?24*Number(t)/Number(r):t,className:y("lucide",l),...!i&&!w(s)&&{D:"true"},...s},[...o.map(([e,r])=>c(e,r)),...Array.isArray(i)?i:[i]])),P=(e,r)=>{const t=d(({className:t,...a},l)=>{return c(k,{p:l,S:r,className:y("lucide-"+(i=f(e),i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-"+e,t),...a});var i});return t.displayName=f(e),t},T=P("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),$=P("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),C=P("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),B=P("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]),z=P("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),A=(...e)=>e.filter(Boolean).join(" "),H=(e,r)=>t=>{var a;const l=[e];for(const e in r.L){const i=e,o=(null==t?void 0:t[i])??(null==(a=r.M)?void 0:a[i]);o&&r.L[i][o]&&l.push(r.L[i][o])}return(null==t?void 0:t.className)&&l.push(t.className),A(...l)},W=H("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-slate-950 disabled:pointer-events-none disabled:opacity-50 dark:focus-visible:ring-slate-300",{L:{variant:{default:"bg-slate-900 text-slate-50 shadow hover:bg-slate-900/90 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/90",V:"bg-red-500 text-slate-50 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:text-slate-50 dark:hover:bg-red-900/90",outline:"border border-slate-200 bg-white shadow-sm hover:bg-slate-100 hover:text-slate-900 dark:border-slate-800 dark:bg-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-50",N:"bg-slate-100 text-slate-900 shadow-sm hover:bg-slate-100/80 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-800/80",J:"hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-800 dark:hover:text-slate-50",link:"text-slate-900 underline-offset-4 hover:underline dark:text-slate-50"},size:{default:"h-9 px-4 py-2",C:"h-8 rounded-md px-3 text-xs",A:"h-10 rounded-md px-8",icon:"h-9 w-9"}},M:{variant:"default",size:"default"}}),j=({className:r,...t})=>e("nav",{role:"navigation",F:"pagination",className:A("flex w-full justify-center gap-3",r),...t});j.displayName="Pagination";const S=d(({className:r,...t},a)=>e("ul",{p:a,className:A("flex flex-row items-center gap-3",r),...t}));S.displayName="PaginationContent";const D=d(({className:r,...t},a)=>e("li",{p:a,className:A("",r),...t}));D.displayName="PaginationItem";const L=({className:r,isActive:t,...a})=>e("button",{R:t?"page":void 0,className:A(W({variant:t?"outline":"ghost"}),"min-w-fit bg-transparent px-4",r),...a});L.displayName="PaginationLink";const M=({className:r,...t})=>e(L,{F:"Go to previous page",size:"default",className:A("gap-1",r),...t,children:e(T,{className:"h-4 w-4"})});M.displayName="PaginationPrevious";const V=({className:r,...t})=>e(L,{F:"Go to next page",size:"default",className:A("gap-1",r),...t,children:e($,{className:"h-4 w-4 grow-0"})});V.displayName="PaginationNext";const J=({className:t,...a})=>r("span",{D:!0,className:A("flex h-9 w-9 items-center justify-center",t),...a,children:[e(C,{className:"h-4 w-4"}),e("span",{className:"sr-only",children:"More pages"})]});J.displayName="PaginationEllipsis";const F=({currentPage:a,I:l,_:i,O:o})=>{const[d,c]=s("");n(()=>{c(a+"")},[a]);const h=e=>{void 0!==i?i(e):null==o||o(e)};return e("div",{className:"flex w-full flex-col items-center gap-5",children:e(j,{className:"mt-4",children:r(S,{children:[e(D,{children:e(M,{disabled:1===a,u:()=>{void 0!==i?i(e=>e-1):null==o||o(a-1)}})}),1!==a?e(D,{children:e(L,{isActive:1===a,u:()=>h(1),children:"1"})}):e(R,{_:i,O:o,q:d,G:c,I:l}),a>2&&e(D,{children:e(J,{})}),a>1&&a<l&&e(R,{_:i,O:o,q:d,G:c,I:l}),a<l-1&&e(D,{children:e(J,{})}),l>1&&e(t,{children:a===l?e(R,{_:i,q:d,G:c,I:l}):e(D,{className:"",children:e(L,{isActive:a===l,u:()=>h(l),children:l})})}),e(D,{children:e(V,{disabled:a>=l,u:()=>{void 0!==i?i(e=>e+1):null==o||o(a+1)}})})]})})})},R=({_:r,O:t,q:a,G:l,I:i})=>{const o=e=>{r?r(Number(e)):null==t||t(Number(e))};return e("div",{className:"flex items-center gap-2 text-sm",children:e("input",{className:"h-8 w-16 rounded-lg border border-border bg-background p-1 text-center text-text",value:a,X:e=>{return r=e.target.value,void(isNaN(Number(r))||l(Number(r)>i?i+"":r&&Number(r)<1?"1":r));var r},Z:e=>o(e.target.value),K:e=>{"Enter"===e.key&&o(e.currentTarget.value)}})})},E=({height:r="100%",width:t="100%",maxHeight:a="100%",maxWidth:l="100%",U:i="sm",className:o=""})=>e("div",{style:{height:r,width:t,maxHeight:a,maxWidth:l},Y:"skeleton",className:`shimmer shrink-0 bg-gray-400/15 rounded-${i} ${o}`}),I={text:"var(--text)",v:"var(--primary)",ee:"var(--darkBlue)",N:"var(--secondary)",re:"var(--secondaryText)",te:"var(--secondaryBg)",ae:"var(--darker)",background:"var(--background)",border:"var(--border)",le:"var(--borderFaded)",ie:"var(--grayTextPrimary)",oe:"var(--grayTextSecondary)",se:"var(--cardBg)",ne:"var(--purpleText)",de:"var(--redText)",ce:"var(--greenText)",he:"var(--yellowText)"},_=({message:t="No results found",className:a=""}={})=>r("div",{className:"my-8 flex w-full flex-col items-center gap-2 text-center font-medium "+a,children:[e("div",{className:"rounded-md border border-border p-1",children:e(z,{color:I.ie,size:17})}),t]}),O=({me:t,children:a,disabled:l=!1,width:i="250px",ue:o,xe:n})=>{const[d,c]=s({top:0,left:0}),m=()=>{if(!(null==t?void 0:t.ge))return;const e=t.ge.getBoundingClientRect();e&&c({top:e.bottom+window.scrollY-45,left:e.left+window.scrollX-80})};return h(()=>{m();const e=()=>m();return window.addEventListener("scroll",e,!0),window.addEventListener("resize",m),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",m)}},[]),u(r("div",{className:"absolute z-50 rounded-lg border border-border bg-background",style:{bottom:window.innerHeight-d.top,left:d.left,width:i},be:e=>e.stopPropagation(),u:e=>e.stopPropagation(),children:[e("div",{className:"min-h-[50px] w-full border-b border-border",children:a}),r("div",{className:"flex h-[40px] w-full items-center justify-between px-6 py-3",children:[e(v,{size:"xs",className:"cursor-pointer px-2",variant:"tertiary",label:"Reset",u:n}),e(v,{size:"xs",className:"cursor-pointer px-2",variant:"primary",label:"Filter",disabled:l,u:o})]})]}),document.body)},q=a.pe(({className:r="",ve:t,...a},l)=>e("div",{style:{minWidth:t||"auto"},className:"relative z-10 w-full overflow-visible",children:e("table",{p:l,className:"w-full caption-bottom text-sm "+r,...a})}));q.displayName="Table";const G=a.pe(({className:r="",...t},a)=>e("thead",{p:a,className:"[&_tr]:border-b "+r,...t}));G.displayName="TableHeader";const X=a.pe(({className:r="",...t},a)=>e("tbody",{p:a,className:"[&_tr:last-child]:border-0 "+r,...t}));X.displayName="TableBody";const Z=a.pe(({className:r="",...t},a)=>e("tfoot",{p:a,className:"border-t bg-slate-100/50 font-medium dark:bg-slate-800/50 [&>tr]:last:border-b-0 "+r,...t}));Z.displayName="TableFooter";const K=a.pe(({className:r="",...t},a)=>e("tr",{p:a,className:"box-border h-[55px] max-h-[55px] min-h-[55px] border-b border-border bg-cardBg data-[state=selected]:bg-slate-100 "+r,...t}));K.displayName="TableRow";const Q=a.pe(({className:r="",...t},a)=>e("th",{p:a,className:"text-grayTextPrimary h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] "+r,...t}));Q.displayName="TableHead";const U=a.pe(({className:r="",...t},a)=>e("td",{p:a,className:"text-grayTextPrimary [&>p]:text-grayTextPrimary box-border h-[55px] max-h-[55px] min-h-[55px] grow-0 px-4 py-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] "+r,...t}));U.displayName="TableCell";const Y=a.pe(({className:r="",...t},a)=>e("caption",{p:a,className:"mt-4 text-sm text-slate-500 dark:text-slate-400 "+r,...t}));Y.displayName="TableCaption";const ee=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),re=(e,r,t)=>{if(!e||0===e.length)return[];const a=(r-1)*t,l=a+t;return e.slice(a,l)},te=({items:a,columns:i,fe:o,ye:d=0,we:c=20,Ne:h,ke:u=1100,Pe:x=!1,Te:g=60,$e:b=!1,type:p,...v})=>{const f="Ce"in v&&!0===v.Ce,y="currentPage"in v?v.currentPage:1,[w,N]=s(y),k="Ce"in v&&f?re(a,w,c):a,[P,T]=s(Math.ceil(d/c)),[$,C]=s(!1),[z,A]=s(null),[H,W]=s(null),[j,S]=s(i),[D,L]=s(!1),M=0===(null==k?void 0:k.length)||!k||0===d,V="Be"in v&&v.Be,J="ze"in v?v.ze:void 0,R=m(null),I=m(null),[Z,Y]=s(null),te=(null==k?void 0:k.length)&&k.length<c?k.length-1:c?c-1:void 0!==k?(null==k?void 0:k.length)-1:0;return n(()=>{"Ce"in v&&T(Array.isArray(a)?Math.ceil(a.length/c):0)},[k]),n(()=>{T(k||V?Math.ceil(d/c):0)},[d,c,k,V]),n(()=>{const e=new AbortController,r=e.signal;return b&&addEventListener("scroll",()=>{R.ge&&R.ge.getBoundingClientRect().bottom<window.innerHeight+200&&!V&&J&&J()},{signal:r}),()=>{e.abort()}},[b,V,y,J]),n(()=>{S(i)},[i]),n(()=>{const e=new AbortController,r=e.signal;return window.addEventListener("scroll",()=>{if(I.ge){const e=I.ge.getBoundingClientRect().top;L(e<=0)}},{signal:r}),()=>{e.abort()}},[I]),n(()=>{if(!R.ge)return;const e=e=>{var r;(null==(r=R.ge)?void 0:r.contains(e.target))||Y(null)};return document.addEventListener("mousedown",r=>e(r),{capture:!0}),()=>{document.removeEventListener("mousedown",r=>e(r),{capture:!0})}},[R]),r(t,{children:[e("div",{className:"thin-scrollbar relative w-full max-w-desktop rounded-xl border border-border "+(o&&"overflow-x-auto xl:overflow-visible [&>div]:w-full"),style:{transform:"rotateX(180deg)"},children:r(q,{style:{transform:"rotateX(180deg)",minWidth:u+"px"},className:"thin-scrollbar border-separate border-spacing-0",p:R,children:[e(G,{p:I,className:`${b?"sticky":"relative"} ${D&&b?"shadow-md":""} top-0 z-10 ${M&&!V?"border-none":""} ${x&&"pointer-events-none"}`,children:e("tr",{className:"",children:j.map(({title:t,Ae:a,visible:i,filter:o},s)=>e(l.He,{children:i&&e(Q,{draggable:!0,We:h?()=>(e=>{!ee()&&h&&(W(e),C(!0))})(s):void 0,je:h?e=>((e,r)=>{ee()||(e.preventDefault(),C(!1),A(r))})(e,s):void 0,Se:h?e=>((e,r)=>{if(!ee()){if(e.preventDefault(),e.stopPropagation(),null!==H&&H!==r){const e=[...j],t=e.splice(H,1)[0];e.splice(r,0,t),S(e),h&&h(e.map(({key:e})=>e))}C(!1),A(null)}})(e,s):void 0,u:()=>(e=>{if(ee()&&!x&&h)if(null===Z)Y(e);else{const r=[...j];[r[Z],r[e]]=[r[e],r[Z]],S(r),h&&h(r.map(({key:e})=>e)),S(r),Y(null)}})(s),style:{maxWidth:(a||200)+"px",width:a+"px",filter:null!==Z&&Z!==s?`hue-rotate(${20*s}deg)`:"none"},className:`relative box-border border-b border-border bg-darker font-semibold ${M&&!V?"first:rounded-l-xl last:rounded-r-xl":"first:rounded-tl-xl last:rounded-tr-xl"} ${ee()||!h?"cursor-pointer":"cursor-move"} last:pr-4 ${null!==Z&&Z!==s&&"border border-dashed border-yellow-400 bg-yellow-200/20"} table-cell first:pl-4 ${null!==Z&&"text-text [&>p]:text-text"} ${Z===s||$&&H===s&&"border border-dashed border-text text-grayTextPrimary [&>p]:text-grayTextPrimary"} ${z===s&&"bg-border"}`,children:r("div",{className:"flex items-center gap-1",children:[t,o&&e(B,{size:15,className:"inline min-w-[20px] cursor-pointer "+((null==o?void 0:o.De)?"text-primary":""),u:o.Le,be:e=>e.stopPropagation()}),(null==o?void 0:o.Me)&&e(O,{me:o.me,xe:o.xe,ue:o.ue,disabled:o.Ve,width:null==o?void 0:o.width,children:o.Je})]})},s+"header")},s+"head"))})}),r(X,{className:"text-grayTextPrimary",children:[e(t,V&&!b?{children:Array.from({length:c},(e,r)=>r+y*c-c).map(r=>e(K,{style:{height:g+"px",maxHeight:g+"px"},children:j.map(({Ae:t,visible:a,className:i},o)=>e(l.He,{children:a&&e(U,{style:{maxWidth:(t||100)+"px",width:(t||100)+"px",height:g+"px",maxHeight:g+"px"},className:`${r%2!=0?"bg-darker":""} ${te===r?"first:rounded-bl-xl last:rounded-br-xl":""} table-cell py-2 text-left first:pl-4 last:pr-4 [&>a]:text-primary ${i}`,children:e(E,{height:"20px"})},`loaderTh-${r}-${o}`)},"loaderTh"+o))},"loaderTr"+r))}:{children:null==k?void 0:k.map((r,t)=>e(K,{style:{height:g+"px",maxHeight:g+"px"},className:(t%2!=0?"bg-darker":"")+" group duration-150",children:j.map(({Ae:a,Fe:i,visible:o,className:s,Re:n,Ee:h},m)=>e(l.He,{children:o&&e(U,{style:{maxWidth:(a||100)+"px",width:(a||100)+"px",height:g+"px",maxHeight:g+"px"},className:`${te===t?"first:rounded-bl-xl last:rounded-br-xl":""} table-cell py-2 text-left duration-200 first:pl-4 last:pr-4 group-hover:bg-tableHover ${s}`,children:n?"asc"===h?(d??0)-t:c*(y-1)+t+1:r&&i(r)},`th-${t}-${m}`)},"th"+m))},"tr"+t))}),V&&b&&e(t,{children:Array.from({length:c},(e,r)=>r+y*c-c).map(r=>e(K,{style:{height:g+"px",maxHeight:g+"px"},className:r%2!=0?"bg-darker":"",children:j.map(({Ae:t,visible:a},i)=>e(l.He,{children:a&&e(U,{style:{maxWidth:(t||100)+"px",width:(t||100)+"px",height:g+"px",maxHeight:g+"px"},className:(te===r?"first:rounded-bl-xl last:rounded-br-xl":"")+" table-cell py-2 text-left first:pl-4 last:pr-4",children:e(E,{height:"20px"})},"infiniteLoaderTd"+r+i)},"infiniteLoader"+r+i))},"infiniteLoader"+r))})]})]})}),!V&&!(null==k?void 0:k.length)&&e(_,{}),!b&&d>c&&!f&&J&&e(F,{currentPage:y,I:P}),!b&&f&&d>c&&(P===w||Number(null==k?void 0:k.length)>=c)&&e(F,{currentPage:w,_:N,I:P}),"default"===p&&f&&!!(null==k?void 0:k.length)||"infinite"===p&&!!(null==k?void 0:k.length)&&e("span",{className:"mt-2 flex w-full justify-center text-sm text-grayTextPrimary",children:d>0&&(null==k?void 0:k.length)?`Displaying ${k.length>d?d:k.length} out of ${d} items`:"No items for displaying"})]})};export{v as Button,O as FunnelFilter,E as LoadingSkeleton,_ as NoResultsFound,F as Pagination,te as Table,X as TableBody,Y as TableCaption,U as TableCell,Z as TableFooter,Q as TableHead,G as TableHeader,K as TableRow,p as ThemeProvider,A as cn,I as colors,H as createVariants,ee as isMobileDevice,re as paginateArray,g as useThemeStore};
@@ -0,0 +1 @@
1
+ var e,r;e=this,r=function(e,r,t,a){"use strict";function l(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const t in e)if("default"!==t){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}return r.default=e,Object.freeze(r)}const i=l(t),o=t.t(void 0),n="cexplorer_sdk_theme",s=t.l(({size:e,variant:t,label:a,i:l,o:i,className:o="",disabled:n,u:s,...d},c)=>r.h("button",{m:c,u:s,className:`flex box-border max-w-fit justify-center min-w-fit items-center rounded-[8px] font-medium duration-150 hover:scale-[101%] active:scale-[98%] disabled:cursor-not-allowed disabled:opacity-50 ${{p:"bg-darkBlue text-white border-2 border-darkBlue hover:text-white",v:"bg-secondaryBg text-secondaryText border-2 border-secondaryText hover:text-secondaryText",N:"bg-cardBg border border-border",k:"bg-gradient-to-b hover:text-white from-purple-500 to-purple-700 text-white",red:"bg-redText text-white",P:"bg-[#677DC9] text-white"}[t]} ${{T:"py-1 px-1 text-[12px]",$:"py-2 px-3 text-[13px]",C:"py-2 px-4 text-sm",j:"py-2 px-4 text-md",B:"py-3 px-5 text-lg"}[e]} ${o}`,disabled:n,...d,children:[i&&r.A("span",{className:i&&a?"-ml-1 mr-2":"",children:i}),a&&r.A("span",{children:a}),l&&r.A("span",{className:"ml-2",children:l})]}));s.displayName="Button";const d=e=>{const r=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase()))(e);return r.charAt(0).toUpperCase()+r.slice(1)},c=(...e)=>e.filter((e,r,t)=>!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim(),u=e=>{for(const r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0};var h={H:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const m=t.l(({color:e="currentColor",size:r=24,strokeWidth:a=2,W:l,className:i="",children:o,S:n,...s},d)=>t.createElement("svg",{m:d,...h,width:r,height:r,stroke:e,strokeWidth:l?24*Number(a)/Number(r):a,className:c("lucide",i),...!o&&!u(s)&&{M:"true"},...s},[...n.map(([e,r])=>t.createElement(e,r)),...Array.isArray(o)?o:[o]])),x=(e,r)=>{const a=t.l(({className:a,...l},i)=>{return t.createElement(m,{m:i,S:r,className:c("lucide-"+(o=d(e),o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-"+e,a),...l});var o});return a.displayName=d(e),a},g=x("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),b=x("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),p=x("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),f=x("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]),v=x("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),y=(...e)=>e.filter(Boolean).join(" "),w=(e,r)=>t=>{var a;const l=[e];for(const e in r.D){const i=e,o=(null==t?void 0:t[i])??(null==(a=r.L)?void 0:a[i]);o&&r.D[i][o]&&l.push(r.D[i][o])}return(null==t?void 0:t.className)&&l.push(t.className),y(...l)},N=w("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-slate-950 disabled:pointer-events-none disabled:opacity-50 dark:focus-visible:ring-slate-300",{D:{variant:{default:"bg-slate-900 text-slate-50 shadow hover:bg-slate-900/90 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/90",O:"bg-red-500 text-slate-50 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:text-slate-50 dark:hover:bg-red-900/90",outline:"border border-slate-200 bg-white shadow-sm hover:bg-slate-100 hover:text-slate-900 dark:border-slate-800 dark:bg-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-50",v:"bg-slate-100 text-slate-900 shadow-sm hover:bg-slate-100/80 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-800/80",V:"hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-800 dark:hover:text-slate-50",link:"text-slate-900 underline-offset-4 hover:underline dark:text-slate-50"},size:{default:"h-9 px-4 py-2",$:"h-8 rounded-md px-3 text-xs",j:"h-10 rounded-md px-8",icon:"h-9 w-9"}},L:{variant:"default",size:"default"}}),k=({className:e,...t})=>r.A("nav",{role:"navigation",J:"pagination",className:y("flex w-full justify-center gap-3",e),...t});k.displayName="Pagination";const P=t.l(({className:e,...t},a)=>r.A("ul",{m:a,className:y("flex flex-row items-center gap-3",e),...t}));P.displayName="PaginationContent";const T=t.l(({className:e,...t},a)=>r.A("li",{m:a,className:y("",e),...t}));T.displayName="PaginationItem";const $=({className:e,isActive:t,...a})=>r.A("button",{F:t?"page":void 0,className:y(N({variant:t?"outline":"ghost"}),"min-w-fit bg-transparent px-4",e),...a});$.displayName="PaginationLink";const C=({className:e,...t})=>r.A($,{J:"Go to previous page",size:"default",className:y("gap-1",e),...t,children:r.A(g,{className:"h-4 w-4"})});C.displayName="PaginationPrevious";const j=({className:e,...t})=>r.A($,{J:"Go to next page",size:"default",className:y("gap-1",e),...t,children:r.A(b,{className:"h-4 w-4 grow-0"})});j.displayName="PaginationNext";const B=({className:e,...t})=>r.h("span",{M:!0,className:y("flex h-9 w-9 items-center justify-center",e),...t,children:[r.A(p,{className:"h-4 w-4"}),r.A("span",{className:"sr-only",children:"More pages"})]});B.displayName="PaginationEllipsis";const z=({currentPage:e,R:a,q:l,I:i})=>{const[o,n]=t._("");t.G(()=>{n(e+"")},[e]);const s=e=>{void 0!==l?l(e):null==i||i(e)};return r.A("div",{className:"flex w-full flex-col items-center gap-5",children:r.A(k,{className:"mt-4",children:r.h(P,{children:[r.A(T,{children:r.A(C,{disabled:1===e,u:()=>{void 0!==l?l(e=>e-1):null==i||i(e-1)}})}),1!==e?r.A(T,{children:r.A($,{isActive:1===e,u:()=>s(1),children:"1"})}):r.A(A,{q:l,I:i,X:o,Z:n,R:a}),e>2&&r.A(T,{children:r.A(B,{})}),e>1&&e<a&&r.A(A,{q:l,I:i,X:o,Z:n,R:a}),e<a-1&&r.A(T,{children:r.A(B,{})}),a>1&&r.A(r.K,{children:e===a?r.A(A,{q:l,X:o,Z:n,R:a}):r.A(T,{className:"",children:r.A($,{isActive:e===a,u:()=>s(a),children:a})})}),r.A(T,{children:r.A(j,{disabled:e>=a,u:()=>{void 0!==l?l(e=>e+1):null==i||i(e+1)}})})]})})})},A=({q:e,I:t,X:a,Z:l,R:i})=>{const o=r=>{e?e(Number(r)):null==t||t(Number(r))};return r.A("div",{className:"flex items-center gap-2 text-sm",children:r.A("input",{className:"h-8 w-16 rounded-lg border border-border bg-background p-1 text-center text-text",value:a,U:e=>{return r=e.target.value,void(isNaN(Number(r))||l(Number(r)>i?i+"":r&&Number(r)<1?"1":r));var r},Y:e=>o(e.target.value),ee:e=>{"Enter"===e.key&&o(e.currentTarget.value)}})})},H=({height:e="100%",width:t="100%",maxHeight:a="100%",maxWidth:l="100%",re:i="sm",className:o=""})=>r.A("div",{style:{height:e,width:t,maxHeight:a,maxWidth:l},te:"skeleton",className:`shimmer shrink-0 bg-gray-400/15 rounded-${i} ${o}`}),W={text:"var(--text)",p:"var(--primary)",ae:"var(--darkBlue)",v:"var(--secondary)",le:"var(--secondaryText)",ie:"var(--secondaryBg)",oe:"var(--darker)",background:"var(--background)",border:"var(--border)",ne:"var(--borderFaded)",se:"var(--grayTextPrimary)",de:"var(--grayTextSecondary)",ce:"var(--cardBg)",ue:"var(--purpleText)",he:"var(--redText)",me:"var(--greenText)",xe:"var(--yellowText)"},S=({message:e="No results found",className:t=""}={})=>r.h("div",{className:"my-8 flex w-full flex-col items-center gap-2 text-center font-medium "+t,children:[r.A("div",{className:"rounded-md border border-border p-1",children:r.A(v,{color:W.se,size:17})}),e]}),M=({ge:e,children:l,disabled:i=!1,width:o="250px",be:n,pe:d})=>{const[c,u]=t._({top:0,left:0}),h=()=>{if(!(null==e?void 0:e.fe))return;const r=e.fe.getBoundingClientRect();r&&u({top:r.bottom+window.scrollY-45,left:r.left+window.scrollX-80})};return t.ve(()=>{h();const e=()=>h();return window.addEventListener("scroll",e,!0),window.addEventListener("resize",h),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",h)}},[]),a.ye(r.h("div",{className:"absolute z-50 rounded-lg border border-border bg-background",style:{bottom:window.innerHeight-c.top,left:c.left,width:o},we:e=>e.stopPropagation(),u:e=>e.stopPropagation(),children:[r.A("div",{className:"min-h-[50px] w-full border-b border-border",children:l}),r.h("div",{className:"flex h-[40px] w-full items-center justify-between px-6 py-3",children:[r.A(s,{size:"xs",className:"cursor-pointer px-2",variant:"tertiary",label:"Reset",u:d}),r.A(s,{size:"xs",className:"cursor-pointer px-2",variant:"primary",label:"Filter",disabled:i,u:n})]})]}),document.body)},D=i.l(({className:e="",Ne:t,...a},l)=>r.A("div",{style:{minWidth:t||"auto"},className:"relative z-10 w-full overflow-visible",children:r.A("table",{m:l,className:"w-full caption-bottom text-sm "+e,...a})}));D.displayName="Table";const L=i.l(({className:e="",...t},a)=>r.A("thead",{m:a,className:"[&_tr]:border-b "+e,...t}));L.displayName="TableHeader";const O=i.l(({className:e="",...t},a)=>r.A("tbody",{m:a,className:"[&_tr:last-child]:border-0 "+e,...t}));O.displayName="TableBody";const V=i.l(({className:e="",...t},a)=>r.A("tfoot",{m:a,className:"border-t bg-slate-100/50 font-medium dark:bg-slate-800/50 [&>tr]:last:border-b-0 "+e,...t}));V.displayName="TableFooter";const J=i.l(({className:e="",...t},a)=>r.A("tr",{m:a,className:"box-border h-[55px] max-h-[55px] min-h-[55px] border-b border-border bg-cardBg data-[state=selected]:bg-slate-100 "+e,...t}));J.displayName="TableRow";const F=i.l(({className:e="",...t},a)=>r.A("th",{m:a,className:"text-grayTextPrimary h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] "+e,...t}));F.displayName="TableHead";const R=i.l(({className:e="",...t},a)=>r.A("td",{m:a,className:"text-grayTextPrimary [&>p]:text-grayTextPrimary box-border h-[55px] max-h-[55px] min-h-[55px] grow-0 px-4 py-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] "+e,...t}));R.displayName="TableCell";const q=i.l(({className:e="",...t},a)=>r.A("caption",{m:a,className:"mt-4 text-sm text-slate-500 dark:text-slate-400 "+e,...t}));q.displayName="TableCaption";const E=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),I=(e,r,t)=>{if(!e||0===e.length)return[];const a=(r-1)*t,l=a+t;return e.slice(a,l)};e.ke=s,e.Pe=M,e.Te=H,e.$e=S,e.Ce=z,e.Table=({items:e,columns:a,je:l,Be:i=0,ze:o=20,Ae:n,He:s=1100,We:d=!1,Se:c=60,Me:u=!1,type:h,...m})=>{const x="De"in m&&!0===m.De,g="currentPage"in m?m.currentPage:1,[b,p]=t._(g),v="De"in m&&x?I(e,b,o):e,[y,w]=t._(Math.ceil(i/o)),[N,k]=t._(!1),[P,T]=t._(null),[$,C]=t._(null),[j,B]=t._(a),[A,W]=t._(!1),V=0===(null==v?void 0:v.length)||!v||0===i,q="Le"in m&&m.Le,_="Oe"in m?m.Oe:void 0,G=t.Ve(null),X=t.Ve(null),[Z,K]=t._(null),Q=(null==v?void 0:v.length)&&v.length<o?v.length-1:o?o-1:void 0!==v?(null==v?void 0:v.length)-1:0;return t.G(()=>{"De"in m&&w(Array.isArray(e)?Math.ceil(e.length/o):0)},[v]),t.G(()=>{w(v||q?Math.ceil(i/o):0)},[i,o,v,q]),t.G(()=>{const e=new AbortController,r=e.signal;return u&&addEventListener("scroll",()=>{G.fe&&G.fe.getBoundingClientRect().bottom<window.innerHeight+200&&!q&&_&&_()},{signal:r}),()=>{e.abort()}},[u,q,g,_]),t.G(()=>{B(a)},[a]),t.G(()=>{const e=new AbortController,r=e.signal;return window.addEventListener("scroll",()=>{if(X.fe){const e=X.fe.getBoundingClientRect().top;W(e<=0)}},{signal:r}),()=>{e.abort()}},[X]),t.G(()=>{if(!G.fe)return;const e=e=>{var r;(null==(r=G.fe)?void 0:r.contains(e.target))||K(null)};return document.addEventListener("mousedown",r=>e(r),{capture:!0}),()=>{document.removeEventListener("mousedown",r=>e(r),{capture:!0})}},[G]),r.h(r.K,{children:[r.A("div",{className:"thin-scrollbar relative w-full max-w-desktop rounded-xl border border-border "+(l&&"overflow-x-auto xl:overflow-visible [&>div]:w-full"),style:{transform:"rotateX(180deg)"},children:r.h(D,{style:{transform:"rotateX(180deg)",minWidth:s+"px"},className:"thin-scrollbar border-separate border-spacing-0",m:G,children:[r.A(L,{m:X,className:`${u?"sticky":"relative"} ${A&&u?"shadow-md":""} top-0 z-10 ${V&&!q?"border-none":""} ${d&&"pointer-events-none"}`,children:r.A("tr",{className:"",children:j.map(({title:e,Je:a,visible:l,filter:i},o)=>r.A(t.K,{children:l&&r.A(F,{draggable:!0,Fe:n?()=>(e=>{!E()&&n&&(C(e),k(!0))})(o):void 0,Re:n?e=>((e,r)=>{E()||(e.preventDefault(),k(!1),T(r))})(e,o):void 0,qe:n?e=>((e,r)=>{if(!E()){if(e.preventDefault(),e.stopPropagation(),null!==$&&$!==r){const e=[...j],t=e.splice($,1)[0];e.splice(r,0,t),B(e),n&&n(e.map(({key:e})=>e))}k(!1),T(null)}})(e,o):void 0,u:()=>(e=>{if(E()&&!d&&n)if(null===Z)K(e);else{const r=[...j];[r[Z],r[e]]=[r[e],r[Z]],B(r),n&&n(r.map(({key:e})=>e)),B(r),K(null)}})(o),style:{maxWidth:(a||200)+"px",width:a+"px",filter:null!==Z&&Z!==o?`hue-rotate(${20*o}deg)`:"none"},className:`relative box-border border-b border-border bg-darker font-semibold ${V&&!q?"first:rounded-l-xl last:rounded-r-xl":"first:rounded-tl-xl last:rounded-tr-xl"} ${E()||!n?"cursor-pointer":"cursor-move"} last:pr-4 ${null!==Z&&Z!==o&&"border border-dashed border-yellow-400 bg-yellow-200/20"} table-cell first:pl-4 ${null!==Z&&"text-text [&>p]:text-text"} ${Z===o||N&&$===o&&"border border-dashed border-text text-grayTextPrimary [&>p]:text-grayTextPrimary"} ${P===o&&"bg-border"}`,children:r.h("div",{className:"flex items-center gap-1",children:[e,i&&r.A(f,{size:15,className:"inline min-w-[20px] cursor-pointer "+((null==i?void 0:i.Ee)?"text-primary":""),u:i.Ie,we:e=>e.stopPropagation()}),(null==i?void 0:i._e)&&r.A(M,{ge:i.ge,pe:i.pe,be:i.be,disabled:i.Ge,width:null==i?void 0:i.width,children:i.Xe})]})},o+"header")},o+"head"))})}),r.h(O,{className:"text-grayTextPrimary",children:[q&&!u?r.A(r.K,{children:Array.from({length:o},(e,r)=>r+g*o-o).map(e=>r.A(J,{style:{height:c+"px",maxHeight:c+"px"},children:j.map(({Je:a,visible:l,className:i},o)=>r.A(t.K,{children:l&&r.A(R,{style:{maxWidth:(a||100)+"px",width:(a||100)+"px",height:c+"px",maxHeight:c+"px"},className:`${e%2!=0?"bg-darker":""} ${Q===e?"first:rounded-bl-xl last:rounded-br-xl":""} table-cell py-2 text-left first:pl-4 last:pr-4 [&>a]:text-primary ${i}`,children:r.A(H,{height:"20px"})},`loaderTh-${e}-${o}`)},"loaderTh"+o))},"loaderTr"+e))}):r.A(r.K,{children:null==v?void 0:v.map((e,a)=>r.A(J,{style:{height:c+"px",maxHeight:c+"px"},className:(a%2!=0?"bg-darker":"")+" group duration-150",children:j.map(({Je:l,Ze:n,visible:s,className:d,Ke:u,Qe:h},m)=>r.A(t.K,{children:s&&r.A(R,{style:{maxWidth:(l||100)+"px",width:(l||100)+"px",height:c+"px",maxHeight:c+"px"},className:`${Q===a?"first:rounded-bl-xl last:rounded-br-xl":""} table-cell py-2 text-left duration-200 first:pl-4 last:pr-4 group-hover:bg-tableHover ${d}`,children:u?"asc"===h?(i??0)-a:o*(g-1)+a+1:e&&n(e)},`th-${a}-${m}`)},"th"+m))},"tr"+a))}),q&&u&&r.A(r.K,{children:Array.from({length:o},(e,r)=>r+g*o-o).map(e=>r.A(J,{style:{height:c+"px",maxHeight:c+"px"},className:e%2!=0?"bg-darker":"",children:j.map(({Je:a,visible:l},i)=>r.A(t.K,{children:l&&r.A(R,{style:{maxWidth:(a||100)+"px",width:(a||100)+"px",height:c+"px",maxHeight:c+"px"},className:(Q===e?"first:rounded-bl-xl last:rounded-br-xl":"")+" table-cell py-2 text-left first:pl-4 last:pr-4",children:r.A(H,{height:"20px"})},"infiniteLoaderTd"+e+i)},"infiniteLoader"+e+i))},"infiniteLoader"+e))})]})]})}),!q&&!(null==v?void 0:v.length)&&r.A(S,{}),!u&&i>o&&!x&&_&&r.A(z,{currentPage:g,R:y}),!u&&x&&i>o&&(y===b||Number(null==v?void 0:v.length)>=o)&&r.A(z,{currentPage:b,q:p,R:y}),"default"===h&&x&&!!(null==v?void 0:v.length)||"infinite"===h&&!!(null==v?void 0:v.length)&&r.A("span",{className:"mt-2 flex w-full justify-center text-sm text-grayTextPrimary",children:i>0&&(null==v?void 0:v.length)?`Displaying ${v.length>i?i:v.length} out of ${i} items`:"No items for displaying"})]})},e.Ue=O,e.Ye=q,e.er=R,e.rr=V,e.tr=F,e.ar=L,e.lr=J,e.ir=({children:e,nr:a="dark"})=>{const[l,i]=t._((()=>{const e=localStorage.getItem(n);return!e||"light"!==e&&"dark"!==e?a:e})()),s=e=>{i(e),document.documentElement.setAttribute("data-theme",e),localStorage.setItem(n,e)};return t.G(()=>{document.documentElement.setAttribute("data-theme",l)},[l]),r.A(o.sr,{value:{theme:l,dr:s,cr:()=>{s("light"===l?"dark":"light")}},children:e})},e.ur=y,e.hr=W,e.mr=w,e.gr=E,e.br=I,e.pr=()=>{const e=t.vr(o);if(!e)throw Error("useThemeStore must be used within ThemeProvider");return e},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})},"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).yr={},e.wr,e.Nr,e.kr);
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ *,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}:root[data-theme=dark]{--text:#fff;--background:#1f242a;--cardBg:#232930;--darker:#20252b;--primary:#79defd;--darkBlue:#1ba3e0;--secondaryText:#b0dff4;--secondaryBg:#b0def412;--border:#424951;--borderDarker:#4d555e;--borderFaded:#374048;--grayTextPrimary:#e9ecef;--grayTextSecondary:#b0b7c3;--scrollbar:#ffffff87;--shimmer:#ffffff0d;--completed:#079455;--inProgress:#fdb022;--notStarted:#f04438;--all:#667085;--bannerGradient:#1f242a;--purpleText:#9f70f7;--redText:#f04438;--yellowText:#f8b942;--greenText:#18c852;--hoverHighlight:#2a2f36;--highlightBorder:#fac415b2;--tableHover:#242a31}:root[data-theme=light]{--text:#101828;--background:#fdfdfd;--cardBg:#fff;--darker:#f8f9fc;--primary:#0094d4;--darkBlue:#0094d4;--secondaryText:#0094d4;--secondaryBg:#effaff;--borderFaded:#e2e1e1;--border:#d0d5dd;--borderDarker:#c0c5cc;--grayTextPrimary:#3e4959;--grayTextSecondary:#546175;--scrollbar:#13294a91;--shimmer:#2828280d;--completed:#abefc6;--inProgress:#fedf89;--notStarted:#fecdca;--all:#e4e7ec;--bannerGradient:#f0f0f6;--purpleText:#7d41ed;--redText:#f04438;--yellowText:#fdb022;--greenText:#0cae34;--hoverHighlight:#fef7c3;--highlightBorder:#fac515;--tableHover:#edf0f5}@layer loader{.loader{animation:spin 1s cubic-bezier(.68,-.55,.27,1.55) infinite;border-radius:50%}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}}body,html{background:var(--background);color:var(--text);font-family:Inter}pre{background:transparent!important}a{&:hover{color:var(--secondaryText)}}h1{@media screen and (min-width:768px){font-size:34px}font-size:26px;font-weight:600}h2{@media screen and (min-width:768px){font-size:24px}font-size:20px;font-weight:600}h3{@media screen and (min-width:768px){font-size:18px}font-size:16px;font-weight:600}.thin-scrollbar{scrollbar-color:var(--scrollbar) transparent;scrollbar-width:thin;::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:transparent;border-radius:10px;margin-block:5px}::-webkit-scrollbar-thumb{border-radius:10px;opacity:.5}::-webkit-scrollbar-thumb,::-webkit-scrollbar-thumb:hover{background:var(--scrollbar)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer{animation:fadeIn .5s ease-out forwards,shimmer 2s linear infinite;animation-delay:0s,.5s;background:linear-gradient(to right,transparent 0,var(--shimmer) 25%,transparent 50%);background-size:200% 100%}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.left-3{left:.75rem}.top-0{top:0}.top-2{top:.5rem}.top-2\.5{top:.625rem}.z-10{z-index:10}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.my-8{margin-bottom:2rem;margin-top:2rem}.-ml-1{margin-left:-.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.box-border{box-sizing:border-box}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.table-cell{display:table-cell}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-12{height:3rem}.h-4{height:1rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[40px\]{height:40px}.h-\[55px\]{height:55px}.max-h-\[55px\]{max-height:55px}.max-h-screen{max-height:100vh}.min-h-\[200px\]{min-height:200px}.min-h-\[50px\]{min-height:50px}.min-h-\[55px\]{min-height:55px}.w-16{width:4rem}.w-4{width:1rem}.w-9{width:2.25rem}.w-full{width:100%}.min-w-\[20px\]{min-width:20px}.min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-desktop{max-width:1440px}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow-0{flex-grow:0}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.border-spacing-0{--tw-border-spacing-x:0px;--tw-border-spacing-y:0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-\[8px\]{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-border{border-color:var(--border)}.border-darkBlue{border-color:var(--darkBlue)}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-secondaryText{border-color:var(--secondaryText)}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}.border-text{border-color:var(--text)}.border-yellow-400{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity))}.bg-\[\#677DC9\]{--tw-bg-opacity:1;background-color:rgb(103 125 201/var(--tw-bg-opacity))}.bg-background{background-color:var(--background)}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-border{background-color:var(--border)}.bg-cardBg{background-color:var(--cardBg)}.bg-darkBlue{background-color:var(--darkBlue)}.bg-darker{background-color:var(--darker)}.bg-gray-400\/15{background-color:rgba(156,163,175,.15)}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.bg-redText{background-color:var(--redText)}.bg-secondaryBg{background-color:var(--secondaryBg)}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.bg-slate-100\/50{background-color:rgba(241,245,249,.5)}.bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity))}.bg-yellow-200\/20{background-color:hsla(53,98%,77%,.2)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-purple-500{--tw-gradient-from:#a855f7 var(--tw-gradient-from-position);--tw-gradient-to:rgba(168,85,247,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-purple-700{--tw-gradient-to:#7e22ce var(--tw-gradient-to-position)}.p-0{padding:0}.p-1{padding:.25rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.pl-8{padding-left:2rem}.pr-3{padding-right:.75rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:12px}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-grayTextPrimary{color:var(--grayTextPrimary)}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.text-primary{color:var(--primary)}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity))}.text-secondaryText{color:var(--secondaryText)}.text-slate-50{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.text-text{color:var(--text)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity))}.underline-offset-4{text-underline-offset:4px}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-colors{transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.react-flow__handle{opacity:0}[data-sonner-toast][data-styled=true] [data-button]{background:transparent!important}.react-syntax-highlighter-line-number{min-width:20px!important;padding-right:10px!important}.sso-button{background-color:#fff;border:1px solid var(--grey10);border-radius:10px;margin-bottom:10px;width:100%}.AccordionTrigger[data-state=open]>.AccordionChevron{transform:rotate(180deg)}.react-flow__attribution{display:none!important}::-webkit-calendar-picker-indicator{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 24 24"><path fill="%23bbbbbb" d="M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"/></svg>')}.react-grid-placeholder{background-color:var(--primary)!important;border-radius:8px}.react-grid-item.cssTransforms{transition-property:none!important}.customize-grid .react-grid-item.cssTransforms{transition-property:transform!important}@keyframes loading-dots{0%{opacity:.2}to{opacity:1}}.first\:rounded-l-xl:first-child{border-top-left-radius:.75rem}.first\:rounded-bl-xl:first-child,.first\:rounded-l-xl:first-child{border-bottom-left-radius:.75rem}.first\:rounded-tl-xl:first-child{border-top-left-radius:.75rem}.first\:pl-4:first-child{padding-left:1rem}.last\:rounded-r-xl:last-child{border-top-right-radius:.75rem}.last\:rounded-br-xl:last-child,.last\:rounded-r-xl:last-child{border-bottom-right-radius:.75rem}.last\:rounded-tr-xl:last-child{border-top-right-radius:.75rem}.last\:pr-4:last-child{padding-right:1rem}.hover\:scale-\[101\%\]:hover{--tw-scale-x:101%;--tw-scale-y:101%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-red-500\/90:hover{background-color:rgba(239,68,68,.9)}.hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.hover\:bg-slate-100\/80:hover{background-color:rgba(241,245,249,.8)}.hover\:bg-slate-900\/90:hover{background-color:rgba(15,23,42,.9)}.hover\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.hover\:text-secondaryText:hover{color:var(--secondaryText)}.hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-slate-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(2 6 23/var(--tw-ring-opacity))}.active\:scale-\[98\%\]:active{--tw-scale-x:98%;--tw-scale-y:98%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:bg-tableHover{background-color:var(--tableHover)}.data-\[state\=selected\]\:bg-slate-100[data-state=selected]{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.dark\:border-slate-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity))}.dark\:bg-red-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity))}.dark\:bg-slate-50:is(.dark *){--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.dark\:bg-slate-800\/50:is(.dark *){background-color:rgba(30,41,59,.5)}.dark\:bg-slate-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(2 6 23/var(--tw-bg-opacity))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.dark\:text-slate-50:is(.dark *){--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity))}.dark\:text-slate-900:is(.dark *){--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.dark\:hover\:bg-red-900\/90:hover:is(.dark *){background-color:rgba(127,29,29,.9)}.dark\:hover\:bg-slate-50\/90:hover:is(.dark *){background-color:rgba(248,250,252,.9)}.dark\:hover\:bg-slate-800:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.dark\:hover\:bg-slate-800\/80:hover:is(.dark *){background-color:rgba(30,41,59,.8)}.dark\:hover\:text-slate-50:hover:is(.dark *){--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity))}.dark\:focus-visible\:ring-slate-300:focus-visible:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(203 213 225/var(--tw-ring-opacity))}@media (min-width:1280px){.xl\:overflow-visible{overflow:visible}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>a\]\:text-primary>a{color:var(--primary)}.\[\&\>div\]\:w-full>div{width:100%}.\[\&\>p\]\:text-grayTextPrimary>p{color:var(--grayTextPrimary)}.\[\&\>p\]\:text-text>p{color:var(--text)}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "@vellumlabs/cexplorer-sdk",
3
+ "version": "1.0.0",
4
+ "description": "Cexplorer UI Component Library with theme system",
5
+ "author": "Vellum Labs",
6
+ "main": "dist/index.umd.js",
7
+ "module": "dist/index.es.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.es.js",
12
+ "require": "./dist/index.umd.js",
13
+ "types": "./dist/index.d.ts"
14
+ },
15
+ "./styles": "./dist/style.css"
16
+ },
17
+ "keywords": [
18
+ "react",
19
+ "ui",
20
+ "components",
21
+ "typescript",
22
+ "storybook"
23
+ ],
24
+ "license": "Apache-2.0",
25
+ "files": [
26
+ "dist",
27
+ "README.md",
28
+ "LICENSE"
29
+ ],
30
+ "dependencies": {
31
+ "lucide-react": "^0.544.0",
32
+ "tailwindcss-animate": "^1.0.7"
33
+ },
34
+ "devDependencies": {
35
+ "@rollup/plugin-terser": "^0.4.4",
36
+ "@storybook/addon-backgrounds": "^8.6.14",
37
+ "@storybook/addon-controls": "^8.6.14",
38
+ "@storybook/addon-docs": "^8.6.14",
39
+ "@storybook/addon-essentials": "^8.6.14",
40
+ "@storybook/addon-viewport": "^8.6.14",
41
+ "@storybook/manager-api": "^8.6.14",
42
+ "@storybook/react": "^8.6.14",
43
+ "@storybook/react-vite": "^8.6.14",
44
+ "@storybook/theming": "^8.6.14",
45
+ "@types/node": "^24.5.2",
46
+ "@types/react": "^18.0.0",
47
+ "@types/react-dom": "^18.0.0",
48
+ "@vitejs/plugin-react": "^4.0.0",
49
+ "autoprefixer": "^10.4.21",
50
+ "cssnano": "^7.1.1",
51
+ "postcss": "^8.5.6",
52
+ "prettier": "^3.6.2",
53
+ "prettier-plugin-tailwindcss": "^0.6.14",
54
+ "storybook": "8.6.14",
55
+ "tailwindcss": "3.4.4",
56
+ "typescript": "^5.0.0",
57
+ "vite": "^4.0.0",
58
+ "vite-plugin-dts": "^3.0.0"
59
+ },
60
+ "peerDependencies": {
61
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
62
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
63
+ },
64
+ "peerDependenciesMeta": {
65
+ "react": {
66
+ "optional": false
67
+ },
68
+ "react-dom": {
69
+ "optional": false
70
+ }
71
+ },
72
+ "repository": {
73
+ "type": "git",
74
+ "url": "https://github.com/vellum-labs/cexplorer-sdk"
75
+ },
76
+ "homepage": "https://beta.cexplorer.io",
77
+ "publishConfig": {
78
+ "access": "public"
79
+ },
80
+ "scripts": {
81
+ "build": "vite build",
82
+ "dev": "vite build --watch",
83
+ "type-check": "tsc --noEmit",
84
+ "storybook": "storybook dev -p 6006",
85
+ "build-storybook": "storybook build"
86
+ }
87
+ }