@nexus-cross/design-system 2.0.0-beta.1 → 2.0.1
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/README.md +375 -0
- package/claude-rules/nexus/CLAUDE.md +68 -0
- package/cursor-rules/nexus-project-setup.mdc +50 -3
- package/cursor-rules/nexus-ui-api.mdc +374 -9
- package/dist/chunks/{chunk-2T7RUYEK.js → chunk-2BINGHGR.js} +11 -3
- package/dist/chunks/{chunk-QOREDNWO.mjs → chunk-53BHDUID.mjs} +2 -1
- package/dist/chunks/{chunk-QZ4QR3XV.mjs → chunk-ATZE57ZO.mjs} +11 -3
- package/dist/chunks/{chunk-OX5MEJ7B.js → chunk-HU6E2R2T.js} +2 -1
- package/dist/chunks/chunk-KT2WKVF7.mjs +5 -0
- package/dist/chunks/{chunk-5J63FUAS.mjs → chunk-LNC3TV6N.mjs} +53 -2
- package/dist/chunks/{chunk-NZHK76R3.js → chunk-LYPBQI3Y.js} +31 -6
- package/dist/chunks/chunk-MWWQMVXJ.js +7 -0
- package/dist/chunks/{chunk-BJM3NDT2.mjs → chunk-RL5UAEGQ.mjs} +11 -3
- package/dist/chunks/{chunk-LAGQ7J5A.js → chunk-VCN7DMCQ.js} +53 -2
- package/dist/chunks/{chunk-2ZXDXO4I.js → chunk-VDEB5BMT.js} +11 -3
- package/dist/chunks/{chunk-6BWOKTVQ.mjs → chunk-WZFKTTVX.mjs} +31 -6
- package/dist/components/ImageUpload.d.ts +14 -0
- package/dist/components/ImageUpload.d.ts.map +1 -1
- package/dist/components/NumberInput.d.ts +20 -1
- package/dist/components/NumberInput.d.ts.map +1 -1
- package/dist/components/NxImage.d.ts.map +1 -1
- package/dist/components/Select.d.ts +5 -1
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/components/Tab.d.ts +12 -1
- package/dist/components/Tab.d.ts.map +1 -1
- package/dist/image-upload.js +3 -3
- package/dist/image-upload.mjs +1 -1
- package/dist/index.js +18 -18
- package/dist/index.mjs +5 -5
- package/dist/number-input.js +4 -4
- package/dist/number-input.mjs +1 -1
- package/dist/nx-image.js +2 -2
- package/dist/nx-image.mjs +1 -1
- package/dist/schemas/_all.json +48 -10
- package/dist/schemas/image-upload.d.ts +6 -0
- package/dist/schemas/image-upload.d.ts.map +1 -1
- package/dist/schemas/imageUpload.json +19 -1
- package/dist/schemas/number-input.d.ts +9 -3
- package/dist/schemas/number-input.d.ts.map +1 -1
- package/dist/schemas/numberInput.json +10 -3
- package/dist/schemas/spinner.json +2 -2
- package/dist/schemas/tab.d.ts +11 -0
- package/dist/schemas/tab.d.ts.map +1 -1
- package/dist/schemas/tab.json +17 -4
- package/dist/schemas.js +48 -10
- package/dist/schemas.mjs +48 -10
- package/dist/select.js +5 -5
- package/dist/select.mjs +1 -1
- package/dist/styles/.generated/built.d.ts +1 -1
- package/dist/styles/.generated/built.d.ts.map +1 -1
- package/dist/styles/layer.js +2 -2
- package/dist/styles/layer.mjs +1 -1
- package/dist/styles.css +185 -44
- package/dist/styles.js +2 -2
- package/dist/styles.layered.css +185 -44
- package/dist/styles.mjs +1 -1
- package/dist/tab.js +4 -4
- package/dist/tab.mjs +1 -1
- package/dist/tokens/TOKENS.md +13 -0
- package/dist/tokens/company.css +21 -1
- package/dist/tokens/css.css +21 -1
- package/dist/tokens/data/color.json +32 -0
- package/dist/tokens/data/space.json +1 -1
- package/dist/tokens/data/typography.json +55 -1
- package/dist/tokens-domains/data/gamehub/domain.json +258 -0
- package/dist/tokens-domains/data/index.ts +3 -1
- package/dist/tokens-domains/data/prediction/domain.json +0 -12
- package/dist/tokens-domains/gamehub.md +62 -0
- package/dist/tokens-domains/prediction-vars.css +1 -5
- package/dist/tokens-domains/prediction.css +1 -5
- package/dist/tokens-domains/prediction.md +0 -1
- package/package.json +3 -3
- package/dist/chunks/chunk-3SCSND6S.js +0 -7
- package/dist/chunks/chunk-QWK4CLS2.mjs +0 -5
|
@@ -70,13 +70,31 @@
|
|
|
70
70
|
"default": "md",
|
|
71
71
|
"description": "Upload area size"
|
|
72
72
|
},
|
|
73
|
+
"previewMode": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"enum": [
|
|
76
|
+
"card",
|
|
77
|
+
"cover"
|
|
78
|
+
],
|
|
79
|
+
"default": "card",
|
|
80
|
+
"description": "Preview layout after upload. \"card\" = small thumbnail + change button beside it (default). \"cover\" = image fills the entire box (banner / thumbnail slot UX). In cover mode, click the box to change, click the X in the top-right to remove. Box dimensions follow size or className (h-64, aspect-video, etc.)"
|
|
81
|
+
},
|
|
82
|
+
"previewFit": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"enum": [
|
|
85
|
+
"cover",
|
|
86
|
+
"contain"
|
|
87
|
+
],
|
|
88
|
+
"default": "cover",
|
|
89
|
+
"description": "Object-fit for previewMode=\"cover\". \"cover\" fills the box (may crop), \"contain\" fits entirely inside (may letterbox)."
|
|
90
|
+
},
|
|
73
91
|
"className": {
|
|
74
92
|
"type": "string",
|
|
75
93
|
"description": "Style override"
|
|
76
94
|
}
|
|
77
95
|
},
|
|
78
96
|
"additionalProperties": false,
|
|
79
|
-
"description": "ImageUpload — drag-and-drop image upload with preview, file-type/size validation, label/description.\n\nWHEN TO USE:\n • Single image upload: avatar, cover, KYC document, post thumbnail\n • Multiple files / non-image → not yet supported; build custom or use a file dropzone\n • Inline image picker without preview → custom <input type=\"file\">\n\naccept whitelist + maxSize together cover validation. onError fires with i18n-ready string.\n\nANTI-PATTERNS:\n ✗ <input type=\"file\"> + manual preview → ImageUpload (handles drag, validation, preview)\n ✗ ImageUpload without onError handler → silent failure on validation reject\n ✗ Storing image as data-URL value (use File via onChange and upload to server)"
|
|
97
|
+
"description": "ImageUpload — drag-and-drop image upload with preview, file-type/size validation, label/description.\n\nWHEN TO USE:\n • Single image upload: avatar, cover, KYC document, post thumbnail\n • Banner / hero / thumbnail slot where the picked image should fill the box → previewMode=\"cover\"\n • Multiple files / non-image → not yet supported; build custom or use a file dropzone\n • Inline image picker without preview → custom <input type=\"file\">\n\naccept whitelist + maxSize together cover validation. onError fires with i18n-ready string.\n\nPREVIEW MODES:\n • card (default) — 작은 썸네일 + 우측에 \"이미지 변경\" 버튼 + 포맷 텍스트. form 필드용.\n • cover — 빈 상태 박스를 그대로 유지하고 이미지가 전체를 가득 채움. 클릭 시 변경, 우측 상단 X로 삭제.\n 크기/비율은 className(h-64, aspect-video, w-full 등) 또는 size prop으로 조정.\n\nANTI-PATTERNS:\n ✗ <input type=\"file\"> + manual preview → ImageUpload (handles drag, validation, preview)\n ✗ ImageUpload without onError handler → silent failure on validation reject\n ✗ Storing image as data-URL value (use File via onChange and upload to server)\n ✗ card 모드에서 작은 썸네일이 어색한 배너/카드 슬롯 → previewMode=\"cover\""
|
|
80
98
|
}
|
|
81
99
|
},
|
|
82
100
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -2,8 +2,10 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const numberInputPropsSchema: z.ZodObject<{
|
|
3
3
|
variant: z.ZodDefault<z.ZodEnum<["basic", "bind"]>>;
|
|
4
4
|
value: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
5
|
-
size: z.ZodDefault<z.ZodEnum<["lg", "xl"]>>;
|
|
5
|
+
size: z.ZodDefault<z.ZodEnum<["md", "lg", "xl"]>>;
|
|
6
6
|
error: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
prefixIcon: z.ZodOptional<z.ZodAny>;
|
|
8
|
+
suffixIcon: z.ZodOptional<z.ZodAny>;
|
|
7
9
|
min: z.ZodOptional<z.ZodNumber>;
|
|
8
10
|
max: z.ZodOptional<z.ZodNumber>;
|
|
9
11
|
step: z.ZodDefault<z.ZodNumber>;
|
|
@@ -23,7 +25,7 @@ export declare const numberInputPropsSchema: z.ZodObject<{
|
|
|
23
25
|
onFocus: z.ZodOptional<z.ZodAny>;
|
|
24
26
|
className: z.ZodOptional<z.ZodString>;
|
|
25
27
|
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
size: "xl" | "lg";
|
|
28
|
+
size: "xl" | "lg" | "md";
|
|
27
29
|
variant: "basic" | "bind";
|
|
28
30
|
step: number;
|
|
29
31
|
digit: number;
|
|
@@ -44,6 +46,8 @@ export declare const numberInputPropsSchema: z.ZodObject<{
|
|
|
44
46
|
onValueChange?: any;
|
|
45
47
|
placeholder?: string | undefined;
|
|
46
48
|
readOnly?: boolean | undefined;
|
|
49
|
+
prefixIcon?: any;
|
|
50
|
+
suffixIcon?: any;
|
|
47
51
|
showMax?: boolean | undefined;
|
|
48
52
|
}, {
|
|
49
53
|
name?: string | undefined;
|
|
@@ -53,7 +57,7 @@ export declare const numberInputPropsSchema: z.ZodObject<{
|
|
|
53
57
|
label?: string | undefined;
|
|
54
58
|
description?: string | undefined;
|
|
55
59
|
value?: string | number | undefined;
|
|
56
|
-
size?: "xl" | "lg" | undefined;
|
|
60
|
+
size?: "xl" | "lg" | "md" | undefined;
|
|
57
61
|
disabled?: boolean | undefined;
|
|
58
62
|
variant?: "basic" | "bind" | undefined;
|
|
59
63
|
autoFocus?: boolean | undefined;
|
|
@@ -65,6 +69,8 @@ export declare const numberInputPropsSchema: z.ZodObject<{
|
|
|
65
69
|
placeholder?: string | undefined;
|
|
66
70
|
step?: number | undefined;
|
|
67
71
|
readOnly?: boolean | undefined;
|
|
72
|
+
prefixIcon?: any;
|
|
73
|
+
suffixIcon?: any;
|
|
68
74
|
digit?: number | undefined;
|
|
69
75
|
showMax?: boolean | undefined;
|
|
70
76
|
hideButtons?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-input.d.ts","sourceRoot":"","sources":["../../src/schemas/number-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"number-input.d.ts","sourceRoot":"","sources":["../../src/schemas/number-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0EhC,CAAC"}
|
|
@@ -23,16 +23,23 @@
|
|
|
23
23
|
"size": {
|
|
24
24
|
"type": "string",
|
|
25
25
|
"enum": [
|
|
26
|
+
"md",
|
|
26
27
|
"lg",
|
|
27
28
|
"xl"
|
|
28
29
|
],
|
|
29
|
-
"default": "
|
|
30
|
-
"description": "Size"
|
|
30
|
+
"default": "md",
|
|
31
|
+
"description": "Size (matches TextInput scale)"
|
|
31
32
|
},
|
|
32
33
|
"error": {
|
|
33
34
|
"type": "boolean",
|
|
34
35
|
"description": "Error state"
|
|
35
36
|
},
|
|
37
|
+
"prefixIcon": {
|
|
38
|
+
"description": "Prefix node — currency symbol, unit, or icon (ReactNode)"
|
|
39
|
+
},
|
|
40
|
+
"suffixIcon": {
|
|
41
|
+
"description": "Suffix node — unit (%, kg, 원...) or icon. Pair with hideButtons or variant=\"bind\" so it does not collide with arrow buttons"
|
|
42
|
+
},
|
|
36
43
|
"min": {
|
|
37
44
|
"type": "number",
|
|
38
45
|
"description": "Minimum value"
|
|
@@ -107,7 +114,7 @@
|
|
|
107
114
|
}
|
|
108
115
|
},
|
|
109
116
|
"additionalProperties": false,
|
|
110
|
-
"description": "Number input with two variants: basic (chevron arrows) and bind (+/- buttons). Supports label, description, max display (click to fill), accelerated increment on long press. numberInputBind(ref, direction) binds acceleration to external buttons.\n\nWHEN TO USE:\n • Any numeric field — quantity, score, age, count\n • Currency with thousand separators → PriceInput instead\n • Date / time → DatePicker instead\n\nANTI-PATTERNS:\n ✗ <TextInput type=\"number\"> → <NumberInput> (loses keyboard ↑↓, step, accelerated long-press, max click)\n ✗ Custom +/- buttons + <input> → variant=\"bind\" (or numberInputBind for external)\n ✗ Manual thousand separators for currency → PriceInput"
|
|
117
|
+
"description": "Number input with two variants: basic (chevron arrows) and bind (+/- buttons). Supports label, description, max display (click to fill), accelerated increment on long press. numberInputBind(ref, direction) binds acceleration to external buttons.\n\nWHEN TO USE:\n • Any numeric field — quantity, score, age, count\n • Currency with thousand separators → PriceInput instead\n • Date / time → DatePicker instead\n\nANTI-PATTERNS:\n ✗ <TextInput type=\"number\"> → <NumberInput> (loses keyboard ↑↓, step, accelerated long-press, max click)\n ✗ Custom +/- buttons + <input> → variant=\"bind\" (or numberInputBind for external)\n ✗ Manual thousand separators for currency → PriceInput\n ✗ Inline unit text inside label/description → use prefixIcon/suffixIcon (e.g. suffixIcon=\"%\")"
|
|
111
118
|
}
|
|
112
119
|
},
|
|
113
120
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"color": {
|
|
13
13
|
"type": "string",
|
|
14
|
-
"description": "Color (CSS color value
|
|
14
|
+
"description": "Color (CSS color value). Default: brand primary (--color-accent-primary)"
|
|
15
15
|
},
|
|
16
16
|
"aria-label": {
|
|
17
17
|
"type": "string",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"className": {
|
|
25
25
|
"type": "string",
|
|
26
|
-
"description": "Color override
|
|
26
|
+
"description": "Color override (e.g. text-text-muted) — utility class wins over the default primary"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"additionalProperties": false,
|
package/dist/schemas/tab.d.ts
CHANGED
|
@@ -5,13 +5,16 @@ export declare const tabPropsSchema: z.ZodObject<{
|
|
|
5
5
|
label: z.ZodAny;
|
|
6
6
|
children: z.ZodOptional<z.ZodAny>;
|
|
7
7
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
className: z.ZodOptional<z.ZodString>;
|
|
8
9
|
}, "strip", z.ZodTypeAny, {
|
|
9
10
|
key: string;
|
|
11
|
+
className?: string | undefined;
|
|
10
12
|
children?: any;
|
|
11
13
|
label?: any;
|
|
12
14
|
disabled?: boolean | undefined;
|
|
13
15
|
}, {
|
|
14
16
|
key: string;
|
|
17
|
+
className?: string | undefined;
|
|
15
18
|
children?: any;
|
|
16
19
|
label?: any;
|
|
17
20
|
disabled?: boolean | undefined;
|
|
@@ -20,30 +23,36 @@ export declare const tabPropsSchema: z.ZodObject<{
|
|
|
20
23
|
defaultActiveKey: z.ZodOptional<z.ZodString>;
|
|
21
24
|
variant: z.ZodDefault<z.ZodEnum<["line", "pill"]>>;
|
|
22
25
|
size: z.ZodDefault<z.ZodEnum<["sm", "md"]>>;
|
|
26
|
+
fullWidth: z.ZodDefault<z.ZodBoolean>;
|
|
23
27
|
destroyInactive: z.ZodDefault<z.ZodBoolean>;
|
|
24
28
|
onTabChange: z.ZodOptional<z.ZodAny>;
|
|
25
29
|
className: z.ZodOptional<z.ZodString>;
|
|
26
30
|
tabListClassName: z.ZodOptional<z.ZodString>;
|
|
31
|
+
tabItemClassName: z.ZodOptional<z.ZodString>;
|
|
27
32
|
tabPanelClassName: z.ZodOptional<z.ZodString>;
|
|
28
33
|
}, "strip", z.ZodTypeAny, {
|
|
29
34
|
size: "md" | "sm";
|
|
30
35
|
variant: "line" | "pill";
|
|
31
36
|
items: {
|
|
32
37
|
key: string;
|
|
38
|
+
className?: string | undefined;
|
|
33
39
|
children?: any;
|
|
34
40
|
label?: any;
|
|
35
41
|
disabled?: boolean | undefined;
|
|
36
42
|
}[];
|
|
43
|
+
fullWidth: boolean;
|
|
37
44
|
destroyInactive: boolean;
|
|
38
45
|
className?: string | undefined;
|
|
39
46
|
activeKey?: string | undefined;
|
|
40
47
|
defaultActiveKey?: string | undefined;
|
|
41
48
|
onTabChange?: any;
|
|
42
49
|
tabListClassName?: string | undefined;
|
|
50
|
+
tabItemClassName?: string | undefined;
|
|
43
51
|
tabPanelClassName?: string | undefined;
|
|
44
52
|
}, {
|
|
45
53
|
items: {
|
|
46
54
|
key: string;
|
|
55
|
+
className?: string | undefined;
|
|
47
56
|
children?: any;
|
|
48
57
|
label?: any;
|
|
49
58
|
disabled?: boolean | undefined;
|
|
@@ -51,11 +60,13 @@ export declare const tabPropsSchema: z.ZodObject<{
|
|
|
51
60
|
className?: string | undefined;
|
|
52
61
|
size?: "md" | "sm" | undefined;
|
|
53
62
|
variant?: "line" | "pill" | undefined;
|
|
63
|
+
fullWidth?: boolean | undefined;
|
|
54
64
|
activeKey?: string | undefined;
|
|
55
65
|
defaultActiveKey?: string | undefined;
|
|
56
66
|
destroyInactive?: boolean | undefined;
|
|
57
67
|
onTabChange?: any;
|
|
58
68
|
tabListClassName?: string | undefined;
|
|
69
|
+
tabItemClassName?: string | undefined;
|
|
59
70
|
tabPanelClassName?: string | undefined;
|
|
60
71
|
}>;
|
|
61
72
|
//# sourceMappingURL=tab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../src/schemas/tab.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../src/schemas/tab.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2DxB,CAAC"}
|
package/dist/schemas/tab.json
CHANGED
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
"disabled": {
|
|
23
23
|
"type": "boolean",
|
|
24
24
|
"description": "Disabled"
|
|
25
|
+
},
|
|
26
|
+
"className": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Per-item className applied to that single trigger <button>. Use for one-off width/padding overrides; for \"all triggers same style\" use top-level `tabItemClassName`."
|
|
25
29
|
}
|
|
26
30
|
},
|
|
27
31
|
"required": [
|
|
@@ -57,6 +61,11 @@
|
|
|
57
61
|
"default": "md",
|
|
58
62
|
"description": "Size"
|
|
59
63
|
},
|
|
64
|
+
"fullWidth": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"default": false,
|
|
67
|
+
"description": "Stretch all triggers to evenly fill the tab list width (`flex: 1`) and set the list to `width: 100%`. Use for top-level navigation tabs that should span the container. Defaults to false (each trigger sizes to its content)."
|
|
68
|
+
},
|
|
60
69
|
"destroyInactive": {
|
|
61
70
|
"type": "boolean",
|
|
62
71
|
"default": false,
|
|
@@ -67,22 +76,26 @@
|
|
|
67
76
|
},
|
|
68
77
|
"className": {
|
|
69
78
|
"type": "string",
|
|
70
|
-
"description": "Root
|
|
79
|
+
"description": "Root wrapper className"
|
|
71
80
|
},
|
|
72
81
|
"tabListClassName": {
|
|
73
82
|
"type": "string",
|
|
74
|
-
"description": "
|
|
83
|
+
"description": "className for the tab list (the row of triggers). Width utilities (`w-full`, `max-w-md`, etc.) apply here. Note: `w-full` alone does NOT stretch individual triggers — combine with `fullWidth=true` for that."
|
|
84
|
+
},
|
|
85
|
+
"tabItemClassName": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "className applied to EVERY tab trigger <button>. Combine with `fullWidth` for equal-width tabs, or pass spacing/typography utilities to restyle all triggers at once. For per-item overrides use `items[].className`."
|
|
75
88
|
},
|
|
76
89
|
"tabPanelClassName": {
|
|
77
90
|
"type": "string",
|
|
78
|
-
"description": "
|
|
91
|
+
"description": "className for each panel <div>"
|
|
79
92
|
}
|
|
80
93
|
},
|
|
81
94
|
"required": [
|
|
82
95
|
"items"
|
|
83
96
|
],
|
|
84
97
|
"additionalProperties": false,
|
|
85
|
-
"description": "Tab navigation — switch between content panels (settings sections, profile views).\n\nWHEN TO USE:\n • Page area swap where only one panel is visible at a time\n • Mutually exclusive content with stable section labels\n • Form field selection → RadioGroup (semantics: not navigation)\n • Immediate filter/option toggle → ToggleGroup\n • Stacked collapsible sections → Accordion\n\ndestroyInactive=true unmounts hidden panels (saves memory but loses state).\n\nANTI-PATTERNS:\n ✗ Tab with 1 item — just render the panel\n ✗ Tab with 8+ items — consider sub-routing or DropdownMenu\n ✗ Using Tab for form value selection → RadioGroup\n ✗ Custom <button> + onClick + state → Tab (a11y, keyboard, focus management)"
|
|
98
|
+
"description": "Tab navigation — switch between content panels (settings sections, profile views).\n\nWHEN TO USE:\n • Page area swap where only one panel is visible at a time\n • Mutually exclusive content with stable section labels\n • Form field selection → RadioGroup (semantics: not navigation)\n • Immediate filter/option toggle → ToggleGroup\n • Stacked collapsible sections → Accordion\n\nWIDTH BEHAVIOR (commonly misunderstood):\n • Default: each trigger sizes to its label content; the list is as wide as the sum of triggers\n • Want all triggers to evenly fill a parent? → set `fullWidth` (NOT just `tabListClassName=\"w-full\"`)\n `tabListClassName=\"w-full\"` only widens the list; triggers stay content-width because flex children\n default to `flex: 0 1 auto`. `fullWidth` adds `flex: 1` to every trigger.\n • Want one specific trigger wider? → use `items[i].className=\"flex-2\"` (or any flex utility)\n • Want all triggers wider but not equal? → use `tabItemClassName=\"min-w-[120px]\"` etc.\n\ndestroyInactive=true unmounts hidden panels (saves memory but loses state).\n\nANTI-PATTERNS:\n ✗ Tab with 1 item — just render the panel\n ✗ Tab with 8+ items — consider sub-routing or DropdownMenu\n ✗ Using Tab for form value selection → RadioGroup\n ✗ Custom <button> + onClick + state → Tab (a11y, keyboard, focus management)\n ✗ `tabListClassName=\"w-full\"` expecting triggers to stretch → use `fullWidth` prop"
|
|
86
99
|
}
|
|
87
100
|
},
|
|
88
101
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
package/dist/schemas.js
CHANGED
|
@@ -587,10 +587,10 @@ ANTI-PATTERNS:
|
|
|
587
587
|
);
|
|
588
588
|
var spinnerPropsSchema = zod.z.object({
|
|
589
589
|
size: zod.z.number().default(20).describe("Size in px"),
|
|
590
|
-
color: zod.z.string().optional().describe("Color (CSS color value
|
|
590
|
+
color: zod.z.string().optional().describe("Color (CSS color value). Default: brand primary (--color-accent-primary)"),
|
|
591
591
|
"aria-label": zod.z.string().default("Loading").describe("Accessibility label"),
|
|
592
592
|
style: zod.z.any().optional().describe("Inline style (CSSProperties)"),
|
|
593
|
-
className: zod.z.string().optional().describe("Color override
|
|
593
|
+
className: zod.z.string().optional().describe("Color override (e.g. text-text-muted) \u2014 utility class wins over the default primary")
|
|
594
594
|
}).describe(
|
|
595
595
|
`Loading indicator (spinner). SVG-based. role="status" + aria-label built-in.
|
|
596
596
|
|
|
@@ -822,7 +822,10 @@ var tabItem = zod.z.object({
|
|
|
822
822
|
key: zod.z.string().describe("Tab unique key"),
|
|
823
823
|
label: zod.z.any().describe("Tab label (ReactNode)"),
|
|
824
824
|
children: zod.z.any().optional().describe("Tab panel content (ReactNode)"),
|
|
825
|
-
disabled: zod.z.boolean().optional().describe("Disabled")
|
|
825
|
+
disabled: zod.z.boolean().optional().describe("Disabled"),
|
|
826
|
+
className: zod.z.string().optional().describe(
|
|
827
|
+
'Per-item className applied to that single trigger <button>. Use for one-off width/padding overrides; for "all triggers same style" use top-level `tabItemClassName`.'
|
|
828
|
+
)
|
|
826
829
|
});
|
|
827
830
|
var tabPropsSchema = zod.z.object({
|
|
828
831
|
items: zod.z.array(tabItem).describe("Tab item array (required)"),
|
|
@@ -830,11 +833,19 @@ var tabPropsSchema = zod.z.object({
|
|
|
830
833
|
defaultActiveKey: zod.z.string().optional().describe("Uncontrolled initial key"),
|
|
831
834
|
variant: zod.z.enum(["line", "pill"]).default("line").describe("Style"),
|
|
832
835
|
size: zod.z.enum(["sm", "md"]).default("md").describe("Size"),
|
|
836
|
+
fullWidth: zod.z.boolean().default(false).describe(
|
|
837
|
+
"Stretch all triggers to evenly fill the tab list width (`flex: 1`) and set the list to `width: 100%`. Use for top-level navigation tabs that should span the container. Defaults to false (each trigger sizes to its content)."
|
|
838
|
+
),
|
|
833
839
|
destroyInactive: zod.z.boolean().default(false).describe("Unmount inactive panels"),
|
|
834
840
|
onTabChange: zod.z.any().optional().describe("Tab change callback (key: string) => void"),
|
|
835
|
-
className: zod.z.string().optional().describe("Root
|
|
836
|
-
tabListClassName: zod.z.string().optional().describe(
|
|
837
|
-
|
|
841
|
+
className: zod.z.string().optional().describe("Root wrapper className"),
|
|
842
|
+
tabListClassName: zod.z.string().optional().describe(
|
|
843
|
+
"className for the tab list (the row of triggers). Width utilities (`w-full`, `max-w-md`, etc.) apply here. Note: `w-full` alone does NOT stretch individual triggers \u2014 combine with `fullWidth=true` for that."
|
|
844
|
+
),
|
|
845
|
+
tabItemClassName: zod.z.string().optional().describe(
|
|
846
|
+
"className applied to EVERY tab trigger <button>. Combine with `fullWidth` for equal-width tabs, or pass spacing/typography utilities to restyle all triggers at once. For per-item overrides use `items[].className`."
|
|
847
|
+
),
|
|
848
|
+
tabPanelClassName: zod.z.string().optional().describe("className for each panel <div>")
|
|
838
849
|
}).describe(
|
|
839
850
|
`Tab navigation \u2014 switch between content panels (settings sections, profile views).
|
|
840
851
|
|
|
@@ -845,13 +856,22 @@ WHEN TO USE:
|
|
|
845
856
|
\u2022 Immediate filter/option toggle \u2192 ToggleGroup
|
|
846
857
|
\u2022 Stacked collapsible sections \u2192 Accordion
|
|
847
858
|
|
|
859
|
+
WIDTH BEHAVIOR (commonly misunderstood):
|
|
860
|
+
\u2022 Default: each trigger sizes to its label content; the list is as wide as the sum of triggers
|
|
861
|
+
\u2022 Want all triggers to evenly fill a parent? \u2192 set \`fullWidth\` (NOT just \`tabListClassName="w-full"\`)
|
|
862
|
+
\`tabListClassName="w-full"\` only widens the list; triggers stay content-width because flex children
|
|
863
|
+
default to \`flex: 0 1 auto\`. \`fullWidth\` adds \`flex: 1\` to every trigger.
|
|
864
|
+
\u2022 Want one specific trigger wider? \u2192 use \`items[i].className="flex-2"\` (or any flex utility)
|
|
865
|
+
\u2022 Want all triggers wider but not equal? \u2192 use \`tabItemClassName="min-w-[120px]"\` etc.
|
|
866
|
+
|
|
848
867
|
destroyInactive=true unmounts hidden panels (saves memory but loses state).
|
|
849
868
|
|
|
850
869
|
ANTI-PATTERNS:
|
|
851
870
|
\u2717 Tab with 1 item \u2014 just render the panel
|
|
852
871
|
\u2717 Tab with 8+ items \u2014 consider sub-routing or DropdownMenu
|
|
853
872
|
\u2717 Using Tab for form value selection \u2192 RadioGroup
|
|
854
|
-
\u2717 Custom <button> + onClick + state \u2192 Tab (a11y, keyboard, focus management)
|
|
873
|
+
\u2717 Custom <button> + onClick + state \u2192 Tab (a11y, keyboard, focus management)
|
|
874
|
+
\u2717 \`tabListClassName="w-full"\` expecting triggers to stretch \u2192 use \`fullWidth\` prop`
|
|
855
875
|
);
|
|
856
876
|
var carouselPropsSchema = zod.z.object({
|
|
857
877
|
opts: zod.z.record(zod.z.any()).optional().describe("Embla options (loop, align, etc.)"),
|
|
@@ -1147,8 +1167,12 @@ ANTI-PATTERNS:
|
|
|
1147
1167
|
var numberInputPropsSchema = zod.z.object({
|
|
1148
1168
|
variant: zod.z.enum(["basic", "bind"]).default("basic").describe("Variant: basic (right chevron arrows) or bind (left/right +/- buttons)"),
|
|
1149
1169
|
value: zod.z.union([zod.z.number(), zod.z.string()]).optional().describe("Current value"),
|
|
1150
|
-
size: zod.z.enum(["lg", "xl"]).default("
|
|
1170
|
+
size: zod.z.enum(["md", "lg", "xl"]).default("md").describe("Size (matches TextInput scale)"),
|
|
1151
1171
|
error: zod.z.boolean().optional().describe("Error state"),
|
|
1172
|
+
prefixIcon: zod.z.any().optional().describe("Prefix node \u2014 currency symbol, unit, or icon (ReactNode)"),
|
|
1173
|
+
suffixIcon: zod.z.any().optional().describe(
|
|
1174
|
+
'Suffix node \u2014 unit (%, kg, \uC6D0...) or icon. Pair with hideButtons or variant="bind" so it does not collide with arrow buttons'
|
|
1175
|
+
),
|
|
1152
1176
|
min: zod.z.number().optional().describe("Minimum value"),
|
|
1153
1177
|
max: zod.z.number().optional().describe('Maximum value. When set, "Max {value}" is displayed in the header. Clicking it fills the input with the max value'),
|
|
1154
1178
|
step: zod.z.number().default(1).describe("Step increment"),
|
|
@@ -1180,7 +1204,8 @@ WHEN TO USE:
|
|
|
1180
1204
|
ANTI-PATTERNS:
|
|
1181
1205
|
\u2717 <TextInput type="number"> \u2192 <NumberInput> (loses keyboard \u2191\u2193, step, accelerated long-press, max click)
|
|
1182
1206
|
\u2717 Custom +/- buttons + <input> \u2192 variant="bind" (or numberInputBind for external)
|
|
1183
|
-
\u2717 Manual thousand separators for currency \u2192 PriceInput
|
|
1207
|
+
\u2717 Manual thousand separators for currency \u2192 PriceInput
|
|
1208
|
+
\u2717 Inline unit text inside label/description \u2192 use prefixIcon/suffixIcon (e.g. suffixIcon="%")`
|
|
1184
1209
|
);
|
|
1185
1210
|
var priceInputPropsSchema = zod.z.object({
|
|
1186
1211
|
size: zod.z.enum(["md", "lg", "xl"]).default("md").describe("Size"),
|
|
@@ -1640,21 +1665,34 @@ var imageUploadPropsSchema = zod.z.object({
|
|
|
1640
1665
|
description: zod.z.any().optional().describe("Field description below the upload area (ReactNode)"),
|
|
1641
1666
|
disabled: zod.z.boolean().default(false).describe("Disabled state"),
|
|
1642
1667
|
size: zod.z.enum(["sm", "md", "lg"]).default("md").describe("Upload area size"),
|
|
1668
|
+
previewMode: zod.z.enum(["card", "cover"]).default("card").describe(
|
|
1669
|
+
'Preview layout after upload. "card" = small thumbnail + change button beside it (default). "cover" = image fills the entire box (banner / thumbnail slot UX). In cover mode, click the box to change, click the X in the top-right to remove. Box dimensions follow size or className (h-64, aspect-video, etc.)'
|
|
1670
|
+
),
|
|
1671
|
+
previewFit: zod.z.enum(["cover", "contain"]).default("cover").describe(
|
|
1672
|
+
'Object-fit for previewMode="cover". "cover" fills the box (may crop), "contain" fits entirely inside (may letterbox).'
|
|
1673
|
+
),
|
|
1643
1674
|
className: zod.z.string().optional().describe("Style override")
|
|
1644
1675
|
}).describe(
|
|
1645
1676
|
`ImageUpload \u2014 drag-and-drop image upload with preview, file-type/size validation, label/description.
|
|
1646
1677
|
|
|
1647
1678
|
WHEN TO USE:
|
|
1648
1679
|
\u2022 Single image upload: avatar, cover, KYC document, post thumbnail
|
|
1680
|
+
\u2022 Banner / hero / thumbnail slot where the picked image should fill the box \u2192 previewMode="cover"
|
|
1649
1681
|
\u2022 Multiple files / non-image \u2192 not yet supported; build custom or use a file dropzone
|
|
1650
1682
|
\u2022 Inline image picker without preview \u2192 custom <input type="file">
|
|
1651
1683
|
|
|
1652
1684
|
accept whitelist + maxSize together cover validation. onError fires with i18n-ready string.
|
|
1653
1685
|
|
|
1686
|
+
PREVIEW MODES:
|
|
1687
|
+
\u2022 card (default) \u2014 \uC791\uC740 \uC378\uB124\uC77C + \uC6B0\uCE21\uC5D0 "\uC774\uBBF8\uC9C0 \uBCC0\uACBD" \uBC84\uD2BC + \uD3EC\uB9F7 \uD14D\uC2A4\uD2B8. form \uD544\uB4DC\uC6A9.
|
|
1688
|
+
\u2022 cover \u2014 \uBE48 \uC0C1\uD0DC \uBC15\uC2A4\uB97C \uADF8\uB300\uB85C \uC720\uC9C0\uD558\uACE0 \uC774\uBBF8\uC9C0\uAC00 \uC804\uCCB4\uB97C \uAC00\uB4DD \uCC44\uC6C0. \uD074\uB9AD \uC2DC \uBCC0\uACBD, \uC6B0\uCE21 \uC0C1\uB2E8 X\uB85C \uC0AD\uC81C.
|
|
1689
|
+
\uD06C\uAE30/\uBE44\uC728\uC740 className(h-64, aspect-video, w-full \uB4F1) \uB610\uB294 size prop\uC73C\uB85C \uC870\uC815.
|
|
1690
|
+
|
|
1654
1691
|
ANTI-PATTERNS:
|
|
1655
1692
|
\u2717 <input type="file"> + manual preview \u2192 ImageUpload (handles drag, validation, preview)
|
|
1656
1693
|
\u2717 ImageUpload without onError handler \u2192 silent failure on validation reject
|
|
1657
|
-
\u2717 Storing image as data-URL value (use File via onChange and upload to server)
|
|
1694
|
+
\u2717 Storing image as data-URL value (use File via onChange and upload to server)
|
|
1695
|
+
\u2717 card \uBAA8\uB4DC\uC5D0\uC11C \uC791\uC740 \uC378\uB124\uC77C\uC774 \uC5B4\uC0C9\uD55C \uBC30\uB108/\uCE74\uB4DC \uC2AC\uB86F \u2192 previewMode="cover"`
|
|
1658
1696
|
);
|
|
1659
1697
|
|
|
1660
1698
|
exports.accordionPropsSchema = accordionPropsSchema;
|
package/dist/schemas.mjs
CHANGED
|
@@ -585,10 +585,10 @@ ANTI-PATTERNS:
|
|
|
585
585
|
);
|
|
586
586
|
var spinnerPropsSchema = z.object({
|
|
587
587
|
size: z.number().default(20).describe("Size in px"),
|
|
588
|
-
color: z.string().optional().describe("Color (CSS color value
|
|
588
|
+
color: z.string().optional().describe("Color (CSS color value). Default: brand primary (--color-accent-primary)"),
|
|
589
589
|
"aria-label": z.string().default("Loading").describe("Accessibility label"),
|
|
590
590
|
style: z.any().optional().describe("Inline style (CSSProperties)"),
|
|
591
|
-
className: z.string().optional().describe("Color override
|
|
591
|
+
className: z.string().optional().describe("Color override (e.g. text-text-muted) \u2014 utility class wins over the default primary")
|
|
592
592
|
}).describe(
|
|
593
593
|
`Loading indicator (spinner). SVG-based. role="status" + aria-label built-in.
|
|
594
594
|
|
|
@@ -820,7 +820,10 @@ var tabItem = z.object({
|
|
|
820
820
|
key: z.string().describe("Tab unique key"),
|
|
821
821
|
label: z.any().describe("Tab label (ReactNode)"),
|
|
822
822
|
children: z.any().optional().describe("Tab panel content (ReactNode)"),
|
|
823
|
-
disabled: z.boolean().optional().describe("Disabled")
|
|
823
|
+
disabled: z.boolean().optional().describe("Disabled"),
|
|
824
|
+
className: z.string().optional().describe(
|
|
825
|
+
'Per-item className applied to that single trigger <button>. Use for one-off width/padding overrides; for "all triggers same style" use top-level `tabItemClassName`.'
|
|
826
|
+
)
|
|
824
827
|
});
|
|
825
828
|
var tabPropsSchema = z.object({
|
|
826
829
|
items: z.array(tabItem).describe("Tab item array (required)"),
|
|
@@ -828,11 +831,19 @@ var tabPropsSchema = z.object({
|
|
|
828
831
|
defaultActiveKey: z.string().optional().describe("Uncontrolled initial key"),
|
|
829
832
|
variant: z.enum(["line", "pill"]).default("line").describe("Style"),
|
|
830
833
|
size: z.enum(["sm", "md"]).default("md").describe("Size"),
|
|
834
|
+
fullWidth: z.boolean().default(false).describe(
|
|
835
|
+
"Stretch all triggers to evenly fill the tab list width (`flex: 1`) and set the list to `width: 100%`. Use for top-level navigation tabs that should span the container. Defaults to false (each trigger sizes to its content)."
|
|
836
|
+
),
|
|
831
837
|
destroyInactive: z.boolean().default(false).describe("Unmount inactive panels"),
|
|
832
838
|
onTabChange: z.any().optional().describe("Tab change callback (key: string) => void"),
|
|
833
|
-
className: z.string().optional().describe("Root
|
|
834
|
-
tabListClassName: z.string().optional().describe(
|
|
835
|
-
|
|
839
|
+
className: z.string().optional().describe("Root wrapper className"),
|
|
840
|
+
tabListClassName: z.string().optional().describe(
|
|
841
|
+
"className for the tab list (the row of triggers). Width utilities (`w-full`, `max-w-md`, etc.) apply here. Note: `w-full` alone does NOT stretch individual triggers \u2014 combine with `fullWidth=true` for that."
|
|
842
|
+
),
|
|
843
|
+
tabItemClassName: z.string().optional().describe(
|
|
844
|
+
"className applied to EVERY tab trigger <button>. Combine with `fullWidth` for equal-width tabs, or pass spacing/typography utilities to restyle all triggers at once. For per-item overrides use `items[].className`."
|
|
845
|
+
),
|
|
846
|
+
tabPanelClassName: z.string().optional().describe("className for each panel <div>")
|
|
836
847
|
}).describe(
|
|
837
848
|
`Tab navigation \u2014 switch between content panels (settings sections, profile views).
|
|
838
849
|
|
|
@@ -843,13 +854,22 @@ WHEN TO USE:
|
|
|
843
854
|
\u2022 Immediate filter/option toggle \u2192 ToggleGroup
|
|
844
855
|
\u2022 Stacked collapsible sections \u2192 Accordion
|
|
845
856
|
|
|
857
|
+
WIDTH BEHAVIOR (commonly misunderstood):
|
|
858
|
+
\u2022 Default: each trigger sizes to its label content; the list is as wide as the sum of triggers
|
|
859
|
+
\u2022 Want all triggers to evenly fill a parent? \u2192 set \`fullWidth\` (NOT just \`tabListClassName="w-full"\`)
|
|
860
|
+
\`tabListClassName="w-full"\` only widens the list; triggers stay content-width because flex children
|
|
861
|
+
default to \`flex: 0 1 auto\`. \`fullWidth\` adds \`flex: 1\` to every trigger.
|
|
862
|
+
\u2022 Want one specific trigger wider? \u2192 use \`items[i].className="flex-2"\` (or any flex utility)
|
|
863
|
+
\u2022 Want all triggers wider but not equal? \u2192 use \`tabItemClassName="min-w-[120px]"\` etc.
|
|
864
|
+
|
|
846
865
|
destroyInactive=true unmounts hidden panels (saves memory but loses state).
|
|
847
866
|
|
|
848
867
|
ANTI-PATTERNS:
|
|
849
868
|
\u2717 Tab with 1 item \u2014 just render the panel
|
|
850
869
|
\u2717 Tab with 8+ items \u2014 consider sub-routing or DropdownMenu
|
|
851
870
|
\u2717 Using Tab for form value selection \u2192 RadioGroup
|
|
852
|
-
\u2717 Custom <button> + onClick + state \u2192 Tab (a11y, keyboard, focus management)
|
|
871
|
+
\u2717 Custom <button> + onClick + state \u2192 Tab (a11y, keyboard, focus management)
|
|
872
|
+
\u2717 \`tabListClassName="w-full"\` expecting triggers to stretch \u2192 use \`fullWidth\` prop`
|
|
853
873
|
);
|
|
854
874
|
var carouselPropsSchema = z.object({
|
|
855
875
|
opts: z.record(z.any()).optional().describe("Embla options (loop, align, etc.)"),
|
|
@@ -1145,8 +1165,12 @@ ANTI-PATTERNS:
|
|
|
1145
1165
|
var numberInputPropsSchema = z.object({
|
|
1146
1166
|
variant: z.enum(["basic", "bind"]).default("basic").describe("Variant: basic (right chevron arrows) or bind (left/right +/- buttons)"),
|
|
1147
1167
|
value: z.union([z.number(), z.string()]).optional().describe("Current value"),
|
|
1148
|
-
size: z.enum(["lg", "xl"]).default("
|
|
1168
|
+
size: z.enum(["md", "lg", "xl"]).default("md").describe("Size (matches TextInput scale)"),
|
|
1149
1169
|
error: z.boolean().optional().describe("Error state"),
|
|
1170
|
+
prefixIcon: z.any().optional().describe("Prefix node \u2014 currency symbol, unit, or icon (ReactNode)"),
|
|
1171
|
+
suffixIcon: z.any().optional().describe(
|
|
1172
|
+
'Suffix node \u2014 unit (%, kg, \uC6D0...) or icon. Pair with hideButtons or variant="bind" so it does not collide with arrow buttons'
|
|
1173
|
+
),
|
|
1150
1174
|
min: z.number().optional().describe("Minimum value"),
|
|
1151
1175
|
max: z.number().optional().describe('Maximum value. When set, "Max {value}" is displayed in the header. Clicking it fills the input with the max value'),
|
|
1152
1176
|
step: z.number().default(1).describe("Step increment"),
|
|
@@ -1178,7 +1202,8 @@ WHEN TO USE:
|
|
|
1178
1202
|
ANTI-PATTERNS:
|
|
1179
1203
|
\u2717 <TextInput type="number"> \u2192 <NumberInput> (loses keyboard \u2191\u2193, step, accelerated long-press, max click)
|
|
1180
1204
|
\u2717 Custom +/- buttons + <input> \u2192 variant="bind" (or numberInputBind for external)
|
|
1181
|
-
\u2717 Manual thousand separators for currency \u2192 PriceInput
|
|
1205
|
+
\u2717 Manual thousand separators for currency \u2192 PriceInput
|
|
1206
|
+
\u2717 Inline unit text inside label/description \u2192 use prefixIcon/suffixIcon (e.g. suffixIcon="%")`
|
|
1182
1207
|
);
|
|
1183
1208
|
var priceInputPropsSchema = z.object({
|
|
1184
1209
|
size: z.enum(["md", "lg", "xl"]).default("md").describe("Size"),
|
|
@@ -1638,21 +1663,34 @@ var imageUploadPropsSchema = z.object({
|
|
|
1638
1663
|
description: z.any().optional().describe("Field description below the upload area (ReactNode)"),
|
|
1639
1664
|
disabled: z.boolean().default(false).describe("Disabled state"),
|
|
1640
1665
|
size: z.enum(["sm", "md", "lg"]).default("md").describe("Upload area size"),
|
|
1666
|
+
previewMode: z.enum(["card", "cover"]).default("card").describe(
|
|
1667
|
+
'Preview layout after upload. "card" = small thumbnail + change button beside it (default). "cover" = image fills the entire box (banner / thumbnail slot UX). In cover mode, click the box to change, click the X in the top-right to remove. Box dimensions follow size or className (h-64, aspect-video, etc.)'
|
|
1668
|
+
),
|
|
1669
|
+
previewFit: z.enum(["cover", "contain"]).default("cover").describe(
|
|
1670
|
+
'Object-fit for previewMode="cover". "cover" fills the box (may crop), "contain" fits entirely inside (may letterbox).'
|
|
1671
|
+
),
|
|
1641
1672
|
className: z.string().optional().describe("Style override")
|
|
1642
1673
|
}).describe(
|
|
1643
1674
|
`ImageUpload \u2014 drag-and-drop image upload with preview, file-type/size validation, label/description.
|
|
1644
1675
|
|
|
1645
1676
|
WHEN TO USE:
|
|
1646
1677
|
\u2022 Single image upload: avatar, cover, KYC document, post thumbnail
|
|
1678
|
+
\u2022 Banner / hero / thumbnail slot where the picked image should fill the box \u2192 previewMode="cover"
|
|
1647
1679
|
\u2022 Multiple files / non-image \u2192 not yet supported; build custom or use a file dropzone
|
|
1648
1680
|
\u2022 Inline image picker without preview \u2192 custom <input type="file">
|
|
1649
1681
|
|
|
1650
1682
|
accept whitelist + maxSize together cover validation. onError fires with i18n-ready string.
|
|
1651
1683
|
|
|
1684
|
+
PREVIEW MODES:
|
|
1685
|
+
\u2022 card (default) \u2014 \uC791\uC740 \uC378\uB124\uC77C + \uC6B0\uCE21\uC5D0 "\uC774\uBBF8\uC9C0 \uBCC0\uACBD" \uBC84\uD2BC + \uD3EC\uB9F7 \uD14D\uC2A4\uD2B8. form \uD544\uB4DC\uC6A9.
|
|
1686
|
+
\u2022 cover \u2014 \uBE48 \uC0C1\uD0DC \uBC15\uC2A4\uB97C \uADF8\uB300\uB85C \uC720\uC9C0\uD558\uACE0 \uC774\uBBF8\uC9C0\uAC00 \uC804\uCCB4\uB97C \uAC00\uB4DD \uCC44\uC6C0. \uD074\uB9AD \uC2DC \uBCC0\uACBD, \uC6B0\uCE21 \uC0C1\uB2E8 X\uB85C \uC0AD\uC81C.
|
|
1687
|
+
\uD06C\uAE30/\uBE44\uC728\uC740 className(h-64, aspect-video, w-full \uB4F1) \uB610\uB294 size prop\uC73C\uB85C \uC870\uC815.
|
|
1688
|
+
|
|
1652
1689
|
ANTI-PATTERNS:
|
|
1653
1690
|
\u2717 <input type="file"> + manual preview \u2192 ImageUpload (handles drag, validation, preview)
|
|
1654
1691
|
\u2717 ImageUpload without onError handler \u2192 silent failure on validation reject
|
|
1655
|
-
\u2717 Storing image as data-URL value (use File via onChange and upload to server)
|
|
1692
|
+
\u2717 Storing image as data-URL value (use File via onChange and upload to server)
|
|
1693
|
+
\u2717 card \uBAA8\uB4DC\uC5D0\uC11C \uC791\uC740 \uC378\uB124\uC77C\uC774 \uC5B4\uC0C9\uD55C \uBC30\uB108/\uCE74\uB4DC \uC2AC\uB86F \u2192 previewMode="cover"`
|
|
1656
1694
|
);
|
|
1657
1695
|
|
|
1658
1696
|
export { accordionPropsSchema, alertPropsSchema, avatarPropsSchema, badgePropsSchema, breadcrumbPropsSchema, buttonPropsSchema, carouselButtonPropsSchema, carouselDotsPropsSchema, carouselPropsSchema, carouselSlidePropsSchema, checkBoxPropsSchema, chipPropsSchema, clientOnlyPropsSchema, comboboxOptionDescriptionPropsSchema, comboboxOptionMetaPropsSchema, comboboxOptionPropsSchema, comboboxPropsSchema, countdownPropsSchema, counterPropsSchema, dataGridPropsSchema, dataListPropsSchema, datePickerPropsSchema, dividerPropsSchema, drawerClosePropsSchema, drawerContentPropsSchema, drawerDescriptionPropsSchema, drawerPropsSchema, drawerTitlePropsSchema, drawerTriggerPropsSchema, dropdownMenuPropsSchema, ellipsisPropsSchema, emptyStatePropsSchema, errorBoundaryPropsSchema, imageUploadPropsSchema, infiniteScrollPropsSchema, marqueePropsSchema, modalCallSchema, modalTemplatePropsSchema, numberInputPropsSchema, nxImagePropsSchema, paginationPropsSchema, popoverPropsSchema, priceInputPropsSchema, progressPropsSchema, radioGroupPropsSchema, radioItemPropsSchema, selectItemPropsSchema, selectPropsSchema, skeletonPropsSchema, sliderPropsSchema, spinnerPropsSchema, stepperPropsSchema, switchPropsSchema, tabPropsSchema, tablePropsSchema, tableRowPropsSchema, tagInputPropsSchema, tdColumnPropsSchema, textAreaPropsSchema, textInputPropsSchema, toastOptionsSchema, toasterPropsSchema, toggleGroupPropsSchema, tooltipPropsSchema, virtualGridPropsSchema, virtualListPropsSchema };
|
package/dist/select.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHU6E2R2T_js = require('./chunks/chunk-HU6E2R2T.js');
|
|
4
4
|
require('./chunks/chunk-CZC76ZD5.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "Select", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkHU6E2R2T_js.Select; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "SelectItem", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkHU6E2R2T_js.SelectItem; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "selectContentVariants", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkHU6E2R2T_js.selectContentVariants; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "selectTriggerVariants", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkHU6E2R2T_js.selectTriggerVariants; }
|
|
23
23
|
});
|
package/dist/select.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Select, SelectItem, selectContentVariants, selectTriggerVariants } from './chunks/chunk-
|
|
1
|
+
export { Select, SelectItem, selectContentVariants, selectTriggerVariants } from './chunks/chunk-53BHDUID.mjs';
|
|
2
2
|
import './chunks/chunk-MCKOWMLS.mjs';
|