@nexus-cross/design-system 1.0.6-beta.2 → 1.0.6
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/DESIGN.md +185 -0
- package/cursor-rules/nexus-ui-api.mdc +223 -7
- package/cursor-rules/nexus-ui-components.mdc +44 -17
- package/dist/alert.d.mts +17 -0
- package/dist/alert.d.ts +17 -0
- package/dist/alert.js +16 -0
- package/dist/alert.mjs +3 -0
- package/dist/badge.d.mts +18 -0
- package/dist/badge.d.ts +18 -0
- package/dist/badge.js +16 -0
- package/dist/badge.mjs +3 -0
- package/dist/breadcrumb.d.mts +15 -0
- package/dist/breadcrumb.d.ts +15 -0
- package/dist/breadcrumb.js +12 -0
- package/dist/breadcrumb.mjs +3 -0
- package/dist/chunks/chunk-2N2EPBO4.js +120 -0
- package/dist/chunks/{chunk-AFSEYJZT.js → chunk-2T7RUYEK.js} +175 -50
- package/dist/chunks/chunk-2UPGFY6E.mjs +76 -0
- package/dist/chunks/chunk-3ZWN66YH.js +53 -0
- package/dist/chunks/chunk-5PQ3UCKF.js +99 -0
- package/dist/chunks/chunk-6BWOKTVQ.mjs +87 -0
- package/dist/chunks/chunk-6DBRL6NA.mjs +81 -0
- package/dist/chunks/chunk-B5O6W3Z4.mjs +73 -0
- package/dist/chunks/chunk-BJM3NDT2.mjs +368 -0
- package/dist/chunks/chunk-C2DSAJTL.js +109 -0
- package/dist/chunks/chunk-CUTMLBC3.mjs +86 -0
- package/dist/chunks/chunk-CV4GMFWP.js +174 -0
- package/dist/chunks/chunk-DICN6GKE.js +99 -0
- package/dist/chunks/chunk-DYPPVXQF.js +143 -0
- package/dist/chunks/chunk-EJY7IVSK.mjs +31 -0
- package/dist/chunks/chunk-FUIBYZZ4.mjs +98 -0
- package/dist/chunks/{chunk-HNLI646G.mjs → chunk-GN6X27QI.mjs} +9 -2
- package/dist/chunks/chunk-H2G5FMRN.mjs +75 -0
- package/dist/chunks/chunk-H2V7RHYV.mjs +120 -0
- package/dist/chunks/chunk-MMCA33FW.mjs +85 -0
- package/dist/chunks/chunk-NZHK76R3.js +109 -0
- package/dist/chunks/chunk-P73MEU7N.mjs +150 -0
- package/dist/chunks/chunk-PDJTSQOC.js +59 -0
- package/dist/chunks/chunk-PXBZEAZQ.mjs +5 -0
- package/dist/chunks/chunk-QRNHFOLG.js +7 -0
- package/dist/chunks/chunk-S2GMEC43.js +109 -0
- package/dist/chunks/{chunk-VGO4Z2WH.js → chunk-SUIT4XKB.js} +8 -1
- package/dist/chunks/chunk-X3CTJ7TD.js +108 -0
- package/dist/chunks/chunk-XGIJZ3NZ.js +160 -0
- package/dist/chunks/chunk-YO5MSDPX.mjs +36 -0
- package/dist/chunks/chunk-ZI4LN2B2.js +96 -0
- package/dist/chunks/chunk-ZU4AWAFT.mjs +137 -0
- package/dist/date-picker.d.mts +17 -0
- package/dist/date-picker.d.ts +17 -0
- package/dist/date-picker.js +12 -0
- package/dist/date-picker.mjs +3 -0
- package/dist/dropdown-menu.d.mts +30 -0
- package/dist/dropdown-menu.d.ts +30 -0
- package/dist/dropdown-menu.js +32 -0
- package/dist/dropdown-menu.mjs +3 -0
- package/dist/empty-state.d.mts +16 -0
- package/dist/empty-state.d.ts +16 -0
- package/dist/empty-state.js +16 -0
- package/dist/empty-state.mjs +3 -0
- package/dist/index.d.mts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +269 -157
- package/dist/index.mjs +30 -18
- package/dist/modal/index.js +12 -12
- package/dist/modal/index.mjs +3 -3
- package/dist/number-input.d.mts +5 -6
- package/dist/number-input.d.ts +5 -6
- package/dist/number-input.js +4 -4
- package/dist/number-input.mjs +1 -1
- package/dist/nx-image.d.mts +13 -0
- package/dist/nx-image.d.ts +13 -0
- package/dist/nx-image.js +12 -0
- package/dist/nx-image.mjs +3 -0
- package/dist/progress.d.mts +18 -0
- package/dist/progress.d.ts +18 -0
- package/dist/progress.js +16 -0
- package/dist/progress.mjs +3 -0
- package/dist/schemas/_all.json +840 -13
- package/dist/schemas/alert.json +49 -0
- package/dist/schemas/badge.json +76 -0
- package/dist/schemas/breadcrumb.json +47 -0
- package/dist/schemas/datePicker.json +56 -0
- package/dist/schemas/dropdownMenu.json +83 -0
- package/dist/schemas/emptyState.json +44 -0
- package/dist/schemas/numberInput.json +27 -8
- package/dist/schemas/nxImage.json +56 -0
- package/dist/schemas/progress.json +63 -0
- package/dist/schemas/slider.json +78 -0
- package/dist/schemas/stepper.json +73 -0
- package/dist/schemas/tagInput.json +70 -0
- package/dist/schemas/textArea.json +26 -1
- package/dist/schemas/toggleGroup.json +88 -0
- package/dist/schemas.d.mts +628 -144
- package/dist/schemas.d.ts +628 -144
- package/dist/schemas.js +177 -7
- package/dist/schemas.mjs +166 -8
- package/dist/slider.d.mts +20 -0
- package/dist/slider.d.ts +20 -0
- package/dist/slider.js +16 -0
- package/dist/slider.mjs +3 -0
- package/dist/stepper.d.mts +20 -0
- package/dist/stepper.d.ts +20 -0
- package/dist/stepper.js +16 -0
- package/dist/stepper.mjs +3 -0
- package/dist/styles/layer.js +2 -2
- package/dist/styles/layer.mjs +1 -1
- package/dist/styles.css +1615 -185
- package/dist/styles.js +2 -2
- package/dist/styles.layered.css +1615 -185
- package/dist/styles.mjs +1 -1
- package/dist/table.d.mts +40 -25
- package/dist/table.d.ts +40 -25
- package/dist/table.js +7 -7
- package/dist/table.mjs +1 -1
- package/dist/tag-input.d.mts +21 -0
- package/dist/tag-input.d.ts +21 -0
- package/dist/tag-input.js +16 -0
- package/dist/tag-input.mjs +3 -0
- package/dist/text-area.d.mts +5 -1
- package/dist/text-area.d.ts +5 -1
- package/dist/text-area.js +3 -3
- package/dist/text-area.mjs +1 -1
- package/dist/toggle-group.d.mts +36 -0
- package/dist/toggle-group.d.ts +36 -0
- package/dist/toggle-group.js +16 -0
- package/dist/toggle-group.mjs +3 -0
- package/package.json +69 -3
- package/scripts/setup-cursor-rules.cjs +15 -1
- package/dist/chunks/chunk-26BUGBOY.mjs +0 -57
- package/dist/chunks/chunk-CLGH2RTS.js +0 -7
- package/dist/chunks/chunk-ECVAVQUY.mjs +0 -243
- package/dist/chunks/chunk-UPCWJWXR.mjs +0 -5
- package/dist/chunks/chunk-WR55D4ZS.js +0 -80
- package/dist/chunks/{chunk-3VFBPFZF.mjs → chunk-CWMLTXOH.mjs} +2 -2
- package/dist/chunks/{chunk-U53UA76K.js → chunk-HFBTS42N.js} +2 -2
package/dist/styles.mjs
CHANGED
package/dist/table.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ReactElement, ReactNode, MouseEvent } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
5
|
import { VariantProps } from 'class-variance-authority';
|
|
5
6
|
|
|
@@ -28,6 +29,29 @@ type ChildrenFuncParamsType<T> = {
|
|
|
28
29
|
item: T extends (infer R)[] ? R : never;
|
|
29
30
|
};
|
|
30
31
|
|
|
32
|
+
type TdColumnProps = TableThRowDataType & {
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
textOverflow?: 'auto' | 'truncate' | 'wrap' | 'break-all';
|
|
35
|
+
highlightKey?: string | null;
|
|
36
|
+
};
|
|
37
|
+
declare const TdColumn: {
|
|
38
|
+
({ className, children, fieldId, size, colSpan, rowSpan, align, textOverflow, highlightKey, }: TdColumnProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
displayName: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
declare const tableRowVariants: (props?: ({
|
|
43
|
+
variant?: "default" | "accent" | null | undefined;
|
|
44
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
45
|
+
type TableRowProps = VariantProps<typeof tableRowVariants> & {
|
|
46
|
+
className?: string;
|
|
47
|
+
children: ReactNode | string;
|
|
48
|
+
onClick?: (e: MouseEvent<HTMLTableRowElement>) => void;
|
|
49
|
+
};
|
|
50
|
+
declare const TableRow: {
|
|
51
|
+
({ className, children, onClick, variant }: TableRowProps): react_jsx_runtime.JSX.Element;
|
|
52
|
+
displayName: string;
|
|
53
|
+
};
|
|
54
|
+
|
|
31
55
|
interface TableProps<T extends TableData[]> {
|
|
32
56
|
className?: string;
|
|
33
57
|
theadClassName?: string;
|
|
@@ -43,30 +67,7 @@ interface TableProps<T extends TableData[]> {
|
|
|
43
67
|
skeletonCount?: number;
|
|
44
68
|
children: (obj: ChildrenFuncParamsType<T>) => ReactNode;
|
|
45
69
|
}
|
|
46
|
-
declare function Table<T extends TableData[]>({ className, theadClassName, list, children, loadingElement, noDataMsg, hideThead, sortUpElement, sortDownElement, loadingType, loading, skeletonCount, notification, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
47
|
-
|
|
48
|
-
declare const tableRowVariants: (props?: ({
|
|
49
|
-
variant?: "default" | "accent" | null | undefined;
|
|
50
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
51
|
-
type TableRowProps = VariantProps<typeof tableRowVariants> & {
|
|
52
|
-
className?: string;
|
|
53
|
-
children: ReactNode | string;
|
|
54
|
-
onClick?: (e: MouseEvent<HTMLTableRowElement>) => void;
|
|
55
|
-
};
|
|
56
|
-
declare const TableRow: {
|
|
57
|
-
({ className, children, onClick, variant }: TableRowProps): react_jsx_runtime.JSX.Element;
|
|
58
|
-
displayName: string;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
type TdColumnProps = TableThRowDataType & {
|
|
62
|
-
children: ReactNode;
|
|
63
|
-
textOverflow?: 'auto' | 'truncate' | 'wrap' | 'break-all';
|
|
64
|
-
highlightKey?: string | null;
|
|
65
|
-
};
|
|
66
|
-
declare const TdColumn: {
|
|
67
|
-
({ className, children, fieldId, size, colSpan, rowSpan, align, textOverflow, highlightKey, }: TdColumnProps): react_jsx_runtime.JSX.Element;
|
|
68
|
-
displayName: string;
|
|
69
|
-
};
|
|
70
|
+
declare function Table$1<T extends TableData[]>({ className, theadClassName, list, children, loadingElement, noDataMsg, hideThead, sortUpElement, sortDownElement, loadingType, loading, skeletonCount, notification, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
70
71
|
|
|
71
72
|
type TableHighlightContextType = {
|
|
72
73
|
highlightValue: string | null;
|
|
@@ -77,4 +78,18 @@ declare const TableHighlightProvider: ({ children }: {
|
|
|
77
78
|
children: ReactNode;
|
|
78
79
|
}) => react_jsx_runtime.JSX.Element;
|
|
79
80
|
|
|
81
|
+
declare const Table: typeof Table$1 & {
|
|
82
|
+
Row: {
|
|
83
|
+
({ className, children, onClick, variant }: TableRowProps): react_jsx_runtime.JSX.Element;
|
|
84
|
+
displayName: string;
|
|
85
|
+
};
|
|
86
|
+
Column: {
|
|
87
|
+
({ className, children, fieldId, size, colSpan, rowSpan, align, textOverflow, highlightKey, }: TdColumnProps): react_jsx_runtime.JSX.Element;
|
|
88
|
+
displayName: string;
|
|
89
|
+
};
|
|
90
|
+
HighlightProvider: ({ children }: {
|
|
91
|
+
children: React.ReactNode;
|
|
92
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
93
|
+
};
|
|
94
|
+
|
|
80
95
|
export { type ChildrenFuncParamsType, Table, type TableData, TableHighlightProvider, type TableProps, TableRow, type TableRowProps, type TableThRowDataType, TdColumn, type TdColumnProps, tableRowVariants, useTableHighlight };
|
package/dist/table.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ReactElement, ReactNode, MouseEvent } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
5
|
import { VariantProps } from 'class-variance-authority';
|
|
5
6
|
|
|
@@ -28,6 +29,29 @@ type ChildrenFuncParamsType<T> = {
|
|
|
28
29
|
item: T extends (infer R)[] ? R : never;
|
|
29
30
|
};
|
|
30
31
|
|
|
32
|
+
type TdColumnProps = TableThRowDataType & {
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
textOverflow?: 'auto' | 'truncate' | 'wrap' | 'break-all';
|
|
35
|
+
highlightKey?: string | null;
|
|
36
|
+
};
|
|
37
|
+
declare const TdColumn: {
|
|
38
|
+
({ className, children, fieldId, size, colSpan, rowSpan, align, textOverflow, highlightKey, }: TdColumnProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
displayName: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
declare const tableRowVariants: (props?: ({
|
|
43
|
+
variant?: "default" | "accent" | null | undefined;
|
|
44
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
45
|
+
type TableRowProps = VariantProps<typeof tableRowVariants> & {
|
|
46
|
+
className?: string;
|
|
47
|
+
children: ReactNode | string;
|
|
48
|
+
onClick?: (e: MouseEvent<HTMLTableRowElement>) => void;
|
|
49
|
+
};
|
|
50
|
+
declare const TableRow: {
|
|
51
|
+
({ className, children, onClick, variant }: TableRowProps): react_jsx_runtime.JSX.Element;
|
|
52
|
+
displayName: string;
|
|
53
|
+
};
|
|
54
|
+
|
|
31
55
|
interface TableProps<T extends TableData[]> {
|
|
32
56
|
className?: string;
|
|
33
57
|
theadClassName?: string;
|
|
@@ -43,30 +67,7 @@ interface TableProps<T extends TableData[]> {
|
|
|
43
67
|
skeletonCount?: number;
|
|
44
68
|
children: (obj: ChildrenFuncParamsType<T>) => ReactNode;
|
|
45
69
|
}
|
|
46
|
-
declare function Table<T extends TableData[]>({ className, theadClassName, list, children, loadingElement, noDataMsg, hideThead, sortUpElement, sortDownElement, loadingType, loading, skeletonCount, notification, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
47
|
-
|
|
48
|
-
declare const tableRowVariants: (props?: ({
|
|
49
|
-
variant?: "default" | "accent" | null | undefined;
|
|
50
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
51
|
-
type TableRowProps = VariantProps<typeof tableRowVariants> & {
|
|
52
|
-
className?: string;
|
|
53
|
-
children: ReactNode | string;
|
|
54
|
-
onClick?: (e: MouseEvent<HTMLTableRowElement>) => void;
|
|
55
|
-
};
|
|
56
|
-
declare const TableRow: {
|
|
57
|
-
({ className, children, onClick, variant }: TableRowProps): react_jsx_runtime.JSX.Element;
|
|
58
|
-
displayName: string;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
type TdColumnProps = TableThRowDataType & {
|
|
62
|
-
children: ReactNode;
|
|
63
|
-
textOverflow?: 'auto' | 'truncate' | 'wrap' | 'break-all';
|
|
64
|
-
highlightKey?: string | null;
|
|
65
|
-
};
|
|
66
|
-
declare const TdColumn: {
|
|
67
|
-
({ className, children, fieldId, size, colSpan, rowSpan, align, textOverflow, highlightKey, }: TdColumnProps): react_jsx_runtime.JSX.Element;
|
|
68
|
-
displayName: string;
|
|
69
|
-
};
|
|
70
|
+
declare function Table$1<T extends TableData[]>({ className, theadClassName, list, children, loadingElement, noDataMsg, hideThead, sortUpElement, sortDownElement, loadingType, loading, skeletonCount, notification, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
70
71
|
|
|
71
72
|
type TableHighlightContextType = {
|
|
72
73
|
highlightValue: string | null;
|
|
@@ -77,4 +78,18 @@ declare const TableHighlightProvider: ({ children }: {
|
|
|
77
78
|
children: ReactNode;
|
|
78
79
|
}) => react_jsx_runtime.JSX.Element;
|
|
79
80
|
|
|
81
|
+
declare const Table: typeof Table$1 & {
|
|
82
|
+
Row: {
|
|
83
|
+
({ className, children, onClick, variant }: TableRowProps): react_jsx_runtime.JSX.Element;
|
|
84
|
+
displayName: string;
|
|
85
|
+
};
|
|
86
|
+
Column: {
|
|
87
|
+
({ className, children, fieldId, size, colSpan, rowSpan, align, textOverflow, highlightKey, }: TdColumnProps): react_jsx_runtime.JSX.Element;
|
|
88
|
+
displayName: string;
|
|
89
|
+
};
|
|
90
|
+
HighlightProvider: ({ children }: {
|
|
91
|
+
children: React.ReactNode;
|
|
92
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
93
|
+
};
|
|
94
|
+
|
|
80
95
|
export { type ChildrenFuncParamsType, Table, type TableData, TableHighlightProvider, type TableProps, TableRow, type TableRowProps, type TableThRowDataType, TdColumn, type TdColumnProps, tableRowVariants, useTableHighlight };
|
package/dist/table.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkSUIT4XKB_js = require('./chunks/chunk-SUIT4XKB.js');
|
|
4
4
|
require('./chunks/chunk-BLGQHR3M.js');
|
|
5
5
|
require('./chunks/chunk-CZC76ZD5.js');
|
|
6
6
|
require('./chunks/chunk-JNMCYWGY.js');
|
|
@@ -9,25 +9,25 @@ require('./chunks/chunk-JNMCYWGY.js');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "Table", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkSUIT4XKB_js.Table; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "TableHighlightProvider", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkSUIT4XKB_js.TableHighlightProvider; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "TableRow", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkSUIT4XKB_js.TableRow; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "TdColumn", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkSUIT4XKB_js.TdColumn; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "tableRowVariants", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkSUIT4XKB_js.tableRowVariants; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "useTableHighlight", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkSUIT4XKB_js.useTableHighlight; }
|
|
33
33
|
});
|
package/dist/table.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Table, TableHighlightProvider, TableRow, TdColumn, tableRowVariants, useTableHighlight } from './chunks/chunk-
|
|
1
|
+
export { Table, TableHighlightProvider, TableRow, TdColumn, tableRowVariants, useTableHighlight } from './chunks/chunk-GN6X27QI.mjs';
|
|
2
2
|
import './chunks/chunk-P2T72N62.mjs';
|
|
3
3
|
import './chunks/chunk-MCKOWMLS.mjs';
|
|
4
4
|
import './chunks/chunk-CVYXRSXT.mjs';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const tagInputVariants: (props?: ({
|
|
6
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
interface TagInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>, VariantProps<typeof tagInputVariants> {
|
|
9
|
+
value?: string[];
|
|
10
|
+
defaultValue?: string[];
|
|
11
|
+
onChange?: (tags: string[]) => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
max?: number;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
allowDuplicates?: boolean;
|
|
16
|
+
label?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const TagInput: React.ForwardRefExoticComponent<TagInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
|
|
21
|
+
export { TagInput, type TagInputProps, tagInputVariants };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const tagInputVariants: (props?: ({
|
|
6
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
interface TagInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>, VariantProps<typeof tagInputVariants> {
|
|
9
|
+
value?: string[];
|
|
10
|
+
defaultValue?: string[];
|
|
11
|
+
onChange?: (tags: string[]) => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
max?: number;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
allowDuplicates?: boolean;
|
|
16
|
+
label?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const TagInput: React.ForwardRefExoticComponent<TagInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
|
|
21
|
+
export { TagInput, type TagInputProps, tagInputVariants };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkDYPPVXQF_js = require('./chunks/chunk-DYPPVXQF.js');
|
|
4
|
+
require('./chunks/chunk-CZC76ZD5.js');
|
|
5
|
+
require('./chunks/chunk-JNMCYWGY.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "TagInput", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkDYPPVXQF_js.TagInput; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "tagInputVariants", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkDYPPVXQF_js.tagInputVariants; }
|
|
16
|
+
});
|
package/dist/text-area.d.mts
CHANGED
|
@@ -3,11 +3,15 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const textAreaVariants: (props?: ({
|
|
6
|
+
size?: "lg" | "md" | null | undefined;
|
|
6
7
|
state?: "error" | "default" | null | undefined;
|
|
7
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
-
interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textAreaVariants> {
|
|
9
|
+
interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>, VariantProps<typeof textAreaVariants> {
|
|
9
10
|
error?: boolean;
|
|
11
|
+
label?: React.ReactNode;
|
|
12
|
+
description?: React.ReactNode;
|
|
10
13
|
showCount?: boolean;
|
|
14
|
+
resize?: 'default' | 'auto' | 'none';
|
|
11
15
|
onValueChange?: (value: string) => void;
|
|
12
16
|
}
|
|
13
17
|
declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
package/dist/text-area.d.ts
CHANGED
|
@@ -3,11 +3,15 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const textAreaVariants: (props?: ({
|
|
6
|
+
size?: "lg" | "md" | null | undefined;
|
|
6
7
|
state?: "error" | "default" | null | undefined;
|
|
7
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
-
interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textAreaVariants> {
|
|
9
|
+
interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'>, VariantProps<typeof textAreaVariants> {
|
|
9
10
|
error?: boolean;
|
|
11
|
+
label?: React.ReactNode;
|
|
12
|
+
description?: React.ReactNode;
|
|
10
13
|
showCount?: boolean;
|
|
14
|
+
resize?: 'default' | 'auto' | 'none';
|
|
11
15
|
onValueChange?: (value: string) => void;
|
|
12
16
|
}
|
|
13
17
|
declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
package/dist/text-area.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXGIJZ3NZ_js = require('./chunks/chunk-XGIJZ3NZ.js');
|
|
4
4
|
require('./chunks/chunk-CZC76ZD5.js');
|
|
5
5
|
require('./chunks/chunk-JNMCYWGY.js');
|
|
6
6
|
|
|
@@ -8,9 +8,9 @@ require('./chunks/chunk-JNMCYWGY.js');
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "TextArea", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkXGIJZ3NZ_js.TextArea; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "textAreaVariants", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkXGIJZ3NZ_js.textAreaVariants; }
|
|
16
16
|
});
|
package/dist/text-area.mjs
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const toggleGroupVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "outline" | null | undefined;
|
|
7
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
interface ToggleGroupItem {
|
|
10
|
+
value: string;
|
|
11
|
+
label: React.ReactNode;
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface ToggleGroupSingleProps extends VariantProps<typeof toggleGroupVariants> {
|
|
16
|
+
type?: 'single';
|
|
17
|
+
value?: string;
|
|
18
|
+
defaultValue?: string;
|
|
19
|
+
onValueChange?: (value: string) => void;
|
|
20
|
+
items: ToggleGroupItem[];
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
interface ToggleGroupMultipleProps extends VariantProps<typeof toggleGroupVariants> {
|
|
25
|
+
type: 'multiple';
|
|
26
|
+
value?: string[];
|
|
27
|
+
defaultValue?: string[];
|
|
28
|
+
onValueChange?: (value: string[]) => void;
|
|
29
|
+
items: ToggleGroupItem[];
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
type ToggleGroupProps = ToggleGroupSingleProps | ToggleGroupMultipleProps;
|
|
34
|
+
declare const ToggleGroup: React.ForwardRefExoticComponent<ToggleGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
|
|
36
|
+
export { ToggleGroup, type ToggleGroupItem, type ToggleGroupProps, toggleGroupVariants };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const toggleGroupVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "outline" | null | undefined;
|
|
7
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
interface ToggleGroupItem {
|
|
10
|
+
value: string;
|
|
11
|
+
label: React.ReactNode;
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface ToggleGroupSingleProps extends VariantProps<typeof toggleGroupVariants> {
|
|
16
|
+
type?: 'single';
|
|
17
|
+
value?: string;
|
|
18
|
+
defaultValue?: string;
|
|
19
|
+
onValueChange?: (value: string) => void;
|
|
20
|
+
items: ToggleGroupItem[];
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
interface ToggleGroupMultipleProps extends VariantProps<typeof toggleGroupVariants> {
|
|
25
|
+
type: 'multiple';
|
|
26
|
+
value?: string[];
|
|
27
|
+
defaultValue?: string[];
|
|
28
|
+
onValueChange?: (value: string[]) => void;
|
|
29
|
+
items: ToggleGroupItem[];
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
type ToggleGroupProps = ToggleGroupSingleProps | ToggleGroupMultipleProps;
|
|
34
|
+
declare const ToggleGroup: React.ForwardRefExoticComponent<ToggleGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
|
|
36
|
+
export { ToggleGroup, type ToggleGroupItem, type ToggleGroupProps, toggleGroupVariants };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkCV4GMFWP_js = require('./chunks/chunk-CV4GMFWP.js');
|
|
4
|
+
require('./chunks/chunk-CZC76ZD5.js');
|
|
5
|
+
require('./chunks/chunk-JNMCYWGY.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "ToggleGroup", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkCV4GMFWP_js.ToggleGroup; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "toggleGroupVariants", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkCV4GMFWP_js.toggleGroupVariants; }
|
|
16
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexus-cross/design-system",
|
|
3
|
-
"version": "1.0.6
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "NEXUS Design System UI Components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -36,6 +36,21 @@
|
|
|
36
36
|
"import": "./dist/chip.mjs",
|
|
37
37
|
"require": "./dist/chip.js"
|
|
38
38
|
},
|
|
39
|
+
"./badge": {
|
|
40
|
+
"types": "./dist/badge.d.ts",
|
|
41
|
+
"import": "./dist/badge.mjs",
|
|
42
|
+
"require": "./dist/badge.js"
|
|
43
|
+
},
|
|
44
|
+
"./progress": {
|
|
45
|
+
"types": "./dist/progress.d.ts",
|
|
46
|
+
"import": "./dist/progress.mjs",
|
|
47
|
+
"require": "./dist/progress.js"
|
|
48
|
+
},
|
|
49
|
+
"./alert": {
|
|
50
|
+
"types": "./dist/alert.d.ts",
|
|
51
|
+
"import": "./dist/alert.mjs",
|
|
52
|
+
"require": "./dist/alert.js"
|
|
53
|
+
},
|
|
39
54
|
"./checkbox": {
|
|
40
55
|
"types": "./dist/checkbox.d.ts",
|
|
41
56
|
"import": "./dist/checkbox.mjs",
|
|
@@ -166,6 +181,51 @@
|
|
|
166
181
|
"import": "./dist/data-list.mjs",
|
|
167
182
|
"require": "./dist/data-list.js"
|
|
168
183
|
},
|
|
184
|
+
"./empty-state": {
|
|
185
|
+
"types": "./dist/empty-state.d.ts",
|
|
186
|
+
"import": "./dist/empty-state.mjs",
|
|
187
|
+
"require": "./dist/empty-state.js"
|
|
188
|
+
},
|
|
189
|
+
"./breadcrumb": {
|
|
190
|
+
"types": "./dist/breadcrumb.d.ts",
|
|
191
|
+
"import": "./dist/breadcrumb.mjs",
|
|
192
|
+
"require": "./dist/breadcrumb.js"
|
|
193
|
+
},
|
|
194
|
+
"./stepper": {
|
|
195
|
+
"types": "./dist/stepper.d.ts",
|
|
196
|
+
"import": "./dist/stepper.mjs",
|
|
197
|
+
"require": "./dist/stepper.js"
|
|
198
|
+
},
|
|
199
|
+
"./dropdown-menu": {
|
|
200
|
+
"types": "./dist/dropdown-menu.d.ts",
|
|
201
|
+
"import": "./dist/dropdown-menu.mjs",
|
|
202
|
+
"require": "./dist/dropdown-menu.js"
|
|
203
|
+
},
|
|
204
|
+
"./toggle-group": {
|
|
205
|
+
"types": "./dist/toggle-group.d.ts",
|
|
206
|
+
"import": "./dist/toggle-group.mjs",
|
|
207
|
+
"require": "./dist/toggle-group.js"
|
|
208
|
+
},
|
|
209
|
+
"./slider": {
|
|
210
|
+
"types": "./dist/slider.d.ts",
|
|
211
|
+
"import": "./dist/slider.mjs",
|
|
212
|
+
"require": "./dist/slider.js"
|
|
213
|
+
},
|
|
214
|
+
"./tag-input": {
|
|
215
|
+
"types": "./dist/tag-input.d.ts",
|
|
216
|
+
"import": "./dist/tag-input.mjs",
|
|
217
|
+
"require": "./dist/tag-input.js"
|
|
218
|
+
},
|
|
219
|
+
"./nx-image": {
|
|
220
|
+
"types": "./dist/nx-image.d.ts",
|
|
221
|
+
"import": "./dist/nx-image.mjs",
|
|
222
|
+
"require": "./dist/nx-image.js"
|
|
223
|
+
},
|
|
224
|
+
"./date-picker": {
|
|
225
|
+
"types": "./dist/date-picker.d.ts",
|
|
226
|
+
"import": "./dist/date-picker.mjs",
|
|
227
|
+
"require": "./dist/date-picker.js"
|
|
228
|
+
},
|
|
169
229
|
"./client-only": {
|
|
170
230
|
"types": "./dist/client-only.d.ts",
|
|
171
231
|
"import": "./dist/client-only.mjs",
|
|
@@ -232,7 +292,8 @@
|
|
|
232
292
|
"files": [
|
|
233
293
|
"dist",
|
|
234
294
|
"cursor-rules",
|
|
235
|
-
"scripts/setup-cursor-rules.cjs"
|
|
295
|
+
"scripts/setup-cursor-rules.cjs",
|
|
296
|
+
"DESIGN.md"
|
|
236
297
|
],
|
|
237
298
|
"bin": {
|
|
238
299
|
"nexus-ds-setup": "./scripts/setup-cursor-rules.cjs"
|
|
@@ -257,16 +318,21 @@
|
|
|
257
318
|
"dependencies": {
|
|
258
319
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
259
320
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
321
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
260
322
|
"@radix-ui/react-popover": "^1.1.15",
|
|
261
323
|
"@radix-ui/react-select": "^2.2.6",
|
|
324
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
262
325
|
"@radix-ui/react-slot": "^1.2.4",
|
|
326
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
263
327
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
264
328
|
"@tanstack/react-virtual": "^3.13.23",
|
|
265
329
|
"class-variance-authority": "^0.7.1",
|
|
266
330
|
"clsx": "^2.1.1",
|
|
331
|
+
"date-fns": "^4.1.0",
|
|
267
332
|
"embla-carousel-autoplay": "^8.6.0",
|
|
268
333
|
"embla-carousel-react": "^8.6.0",
|
|
269
334
|
"lodash-es": "^4.17.21",
|
|
335
|
+
"react-day-picker": "^9.14.0",
|
|
270
336
|
"sonner": "^2.0.7",
|
|
271
337
|
"vaul": "^1.1.2",
|
|
272
338
|
"zod": "^3.25.76"
|
|
@@ -282,7 +348,7 @@
|
|
|
282
348
|
"typescript": "^5.0.0",
|
|
283
349
|
"vitest": "^1.6.1",
|
|
284
350
|
"zod-to-json-schema": "^3.25.2",
|
|
285
|
-
"@nexus-cross/tokens": "1.0.6
|
|
351
|
+
"@nexus-cross/tokens": "1.0.6"
|
|
286
352
|
},
|
|
287
353
|
"scripts": {
|
|
288
354
|
"postinstall": "node scripts/setup-cursor-rules.cjs",
|
|
@@ -82,10 +82,24 @@ function run() {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
// DESIGN.md → project root
|
|
86
|
+
const designMdSrc = path.resolve(__dirname, '..', 'DESIGN.md');
|
|
87
|
+
if (fs.existsSync(designMdSrc)) {
|
|
88
|
+
const dest = path.join(projectRoot, 'DESIGN.md');
|
|
89
|
+
const srcContent = fs.readFileSync(designMdSrc, 'utf-8');
|
|
90
|
+
const destExists = fs.existsSync(dest);
|
|
91
|
+
const destContent = destExists ? fs.readFileSync(dest, 'utf-8') : '';
|
|
92
|
+
if (!destExists || srcContent !== destContent) {
|
|
93
|
+
fs.writeFileSync(dest, srcContent, 'utf-8');
|
|
94
|
+
installed++;
|
|
95
|
+
console.log(`[@nexus-cross/design-system] ${destExists ? 'updated' : 'installed'}: DESIGN.md`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
85
99
|
if (installed === 0) {
|
|
86
100
|
console.log('[@nexus-cross] Cursor rules are already up to date.');
|
|
87
101
|
} else {
|
|
88
|
-
console.log(`[@nexus-cross] ${installed}
|
|
102
|
+
console.log(`[@nexus-cross] ${installed} file(s) installed.`);
|
|
89
103
|
}
|
|
90
104
|
}
|
|
91
105
|
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-MCKOWMLS.mjs';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { cva } from 'class-variance-authority';
|
|
4
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
var textAreaVariants = cva("nexus-textarea", {
|
|
7
|
-
variants: {
|
|
8
|
-
state: {
|
|
9
|
-
default: "nexus-textarea--default",
|
|
10
|
-
error: "nexus-textarea--error"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
defaultVariants: { state: "default" }
|
|
14
|
-
});
|
|
15
|
-
var TextArea = React.forwardRef(
|
|
16
|
-
({ className, error, showCount, maxLength, onValueChange, onChange, ...props }, ref) => {
|
|
17
|
-
const state = error ? "error" : "default";
|
|
18
|
-
const [count, setCount] = React.useState(0);
|
|
19
|
-
const handleChange = React.useCallback(
|
|
20
|
-
(e) => {
|
|
21
|
-
setCount(e.target.value.length);
|
|
22
|
-
onValueChange?.(e.target.value);
|
|
23
|
-
onChange?.(e);
|
|
24
|
-
},
|
|
25
|
-
[onValueChange, onChange]
|
|
26
|
-
);
|
|
27
|
-
return /* @__PURE__ */ jsxs("div", { className: "nexus-textarea-wrap", children: [
|
|
28
|
-
/* @__PURE__ */ jsx(
|
|
29
|
-
"textarea",
|
|
30
|
-
{
|
|
31
|
-
ref,
|
|
32
|
-
className: cn(textAreaVariants({ state }), className),
|
|
33
|
-
maxLength,
|
|
34
|
-
"aria-invalid": error || void 0,
|
|
35
|
-
onChange: handleChange,
|
|
36
|
-
...props
|
|
37
|
-
}
|
|
38
|
-
),
|
|
39
|
-
showCount && maxLength && /* @__PURE__ */ jsxs(
|
|
40
|
-
"p",
|
|
41
|
-
{
|
|
42
|
-
className: "nexus-textarea-count",
|
|
43
|
-
"aria-live": "polite",
|
|
44
|
-
"aria-atomic": "true",
|
|
45
|
-
children: [
|
|
46
|
-
/* @__PURE__ */ jsx("span", { className: "nexus-textarea-count__current", children: count.toLocaleString() }),
|
|
47
|
-
"/",
|
|
48
|
-
maxLength.toLocaleString()
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
)
|
|
52
|
-
] });
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
TextArea.displayName = "TextArea";
|
|
56
|
-
|
|
57
|
-
export { TextArea, textAreaVariants };
|