@nexus-cross/design-system 1.1.0 → 1.1.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/cursor-rules/nexus-ui-api.mdc +127 -41
- package/cursor-rules/nexus-ui-decisions.mdc +6 -2
- package/dist/chunks/{chunk-G3RLK2HS.js → chunk-3SCSND6S.js} +1 -1
- package/dist/chunks/{chunk-56ZOOQFE.mjs → chunk-AG2UJPFX.mjs} +124 -17
- package/dist/chunks/{chunk-EILXBLEV.mjs → chunk-QWK4CLS2.mjs} +1 -1
- package/dist/chunks/{chunk-5ASTWFJW.js → chunk-RC2Y4UH7.js} +127 -17
- package/dist/combobox.js +15 -3
- package/dist/combobox.mjs +1 -1
- package/dist/components/Combobox.d.ts +53 -8
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -3
- package/dist/index.mjs +1 -1
- package/dist/schemas/_all.json +62 -17
- package/dist/schemas/combobox.d.ts +33 -10
- package/dist/schemas/combobox.d.ts.map +1 -1
- package/dist/schemas/combobox.json +6 -6
- package/dist/schemas/comboboxOption.json +16 -11
- package/dist/schemas/comboboxOptionDescription.json +20 -0
- package/dist/schemas/comboboxOptionMeta.json +20 -0
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas.js +74 -13
- package/dist/schemas.mjs +72 -13
- 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 +13 -0
- package/dist/styles.js +2 -2
- package/dist/styles.layered.css +13 -0
- package/dist/styles.mjs +1 -1
- package/package.json +2 -2
|
@@ -1,22 +1,45 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const comboboxOptionPropsSchema: z.ZodObject<{
|
|
3
3
|
value: z.ZodString;
|
|
4
|
-
label: z.ZodAny;
|
|
5
|
-
description: z.ZodOptional<z.ZodAny>;
|
|
6
4
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
textValue: z.ZodOptional<z.ZodString>;
|
|
6
|
+
className: z.ZodOptional<z.ZodString>;
|
|
7
|
+
children: z.ZodOptional<z.ZodAny>;
|
|
7
8
|
}, "strip", z.ZodTypeAny, {
|
|
8
9
|
value: string;
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
className?: string | undefined;
|
|
11
|
+
children?: any;
|
|
11
12
|
disabled?: boolean | undefined;
|
|
13
|
+
textValue?: string | undefined;
|
|
12
14
|
}, {
|
|
13
15
|
value: string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
className?: string | undefined;
|
|
17
|
+
children?: any;
|
|
16
18
|
disabled?: boolean | undefined;
|
|
19
|
+
textValue?: string | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const comboboxOptionDescriptionPropsSchema: z.ZodObject<{
|
|
22
|
+
children: z.ZodOptional<z.ZodAny>;
|
|
23
|
+
className: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
className?: string | undefined;
|
|
26
|
+
children?: any;
|
|
27
|
+
}, {
|
|
28
|
+
className?: string | undefined;
|
|
29
|
+
children?: any;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const comboboxOptionMetaPropsSchema: z.ZodObject<{
|
|
32
|
+
children: z.ZodOptional<z.ZodAny>;
|
|
33
|
+
className: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
className?: string | undefined;
|
|
36
|
+
children?: any;
|
|
37
|
+
}, {
|
|
38
|
+
className?: string | undefined;
|
|
39
|
+
children?: any;
|
|
17
40
|
}>;
|
|
18
41
|
export declare const comboboxPropsSchema: z.ZodObject<{
|
|
19
|
-
|
|
42
|
+
children: z.ZodAny;
|
|
20
43
|
value: z.ZodOptional<z.ZodAny>;
|
|
21
44
|
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
22
45
|
onValueChange: z.ZodOptional<z.ZodAny>;
|
|
@@ -45,9 +68,9 @@ export declare const comboboxPropsSchema: z.ZodObject<{
|
|
|
45
68
|
clearable: boolean;
|
|
46
69
|
autoOpenOnFocus: boolean;
|
|
47
70
|
className?: string | undefined;
|
|
71
|
+
children?: any;
|
|
48
72
|
error?: boolean | undefined;
|
|
49
73
|
filter?: any;
|
|
50
|
-
options?: any;
|
|
51
74
|
label?: any;
|
|
52
75
|
description?: any;
|
|
53
76
|
value?: any;
|
|
@@ -61,9 +84,9 @@ export declare const comboboxPropsSchema: z.ZodObject<{
|
|
|
61
84
|
popoverClassName?: string | undefined;
|
|
62
85
|
}, {
|
|
63
86
|
className?: string | undefined;
|
|
87
|
+
children?: any;
|
|
64
88
|
error?: boolean | undefined;
|
|
65
89
|
filter?: any;
|
|
66
|
-
options?: any;
|
|
67
90
|
label?: any;
|
|
68
91
|
loading?: boolean | undefined;
|
|
69
92
|
description?: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../src/schemas/combobox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../src/schemas/combobox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;EA0CnC,CAAC;AAEJ,eAAO,MAAM,oCAAoC;;;;;;;;;EAU9C,CAAC;AAEJ,eAAO,MAAM,6BAA6B;;;;;;;;;EAUvC,CAAC;AAEJ,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2G7B,CAAC"}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"comboboxPropsSchema": {
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
|
-
"
|
|
8
|
-
"description": "
|
|
7
|
+
"children": {
|
|
8
|
+
"description": "<Combobox.Option> elements (required). Other children are ignored with a dev-mode warning. Async-search consumers swap this list as `onSearch` results arrive."
|
|
9
9
|
},
|
|
10
10
|
"value": {
|
|
11
11
|
"description": "Selected value. string for single, string[] for multiple"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"description": "Multi-select mode. Selected values shown as chips inside input"
|
|
23
23
|
},
|
|
24
24
|
"onSearch": {
|
|
25
|
-
"description": "Async search callback. (query: string) => void. Triggers external data fetching with debounce"
|
|
25
|
+
"description": "Async search callback. (query: string) => void. Triggers external data fetching with debounce. When set, the built-in client filter is disabled — render whatever <Combobox.Option> children match the latest results."
|
|
26
26
|
},
|
|
27
27
|
"searchDebounce": {
|
|
28
28
|
"type": "number",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"loading": {
|
|
33
33
|
"type": "boolean",
|
|
34
34
|
"default": false,
|
|
35
|
-
"description": "Externally-controlled loading state. Shows spinner in input suffix"
|
|
35
|
+
"description": "Externally-controlled loading state. Shows spinner in input suffix and a status row inside the popover."
|
|
36
36
|
},
|
|
37
37
|
"filter": {
|
|
38
|
-
"description": "Custom client-side filter. (option, query) => boolean. Default: case-insensitive
|
|
38
|
+
"description": "Custom client-side filter. (option: { value, textValue, disabled }, query: string) => boolean. Default: case-insensitive textValue includes match. Ignored when onSearch is set."
|
|
39
39
|
},
|
|
40
40
|
"placeholder": {
|
|
41
41
|
"type": "string",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
"additionalProperties": false,
|
|
94
|
-
"description": "Searchable select. Text input + popover listbox. Single/multi-select. Sync (auto-filter) or async (onSearch + loading) modes.\n\nWHEN TO USE:\n • Options ≥ 7, OR labels are long, OR search/filter is needed → Combobox (not Select)\n • Multi-select form field → Combobox with multiple (chips render inside input)\n • Async data from server → set onSearch + loading\nFor ≤7 simple options use Select. For free-text tags use TagInput.\n\
|
|
94
|
+
"description": "Searchable select with compound option API. Text input + popover listbox. Single/multi-select. Sync (auto-filter) or async (onSearch + loading) modes.\n\nWHEN TO USE:\n • Options ≥ 7, OR labels are long, OR search/filter is needed → Combobox (not Select)\n • Multi-select form field → Combobox with multiple (chips render inside input)\n • Async data from server → set onSearch + loading\nFor ≤7 simple options use Select. For free-text tags use TagInput.\n\nCOMPOUND API:\n <Combobox value={v} onValueChange={setV} placeholder=\"…\">\n <Combobox.Option value=\"kr\">한국</Combobox.Option>\n <Combobox.Option value=\"jp\" disabled>\n 일본\n <Combobox.OptionDescription>품절</Combobox.OptionDescription>\n <Combobox.OptionMeta>JP</Combobox.OptionMeta>\n </Combobox.Option>\n </Combobox>\n\n • <Combobox.Option> requires unique `value` (dev mode warns on duplicates and drops the duplicate)\n • <Combobox.OptionDescription> = secondary line under label\n • <Combobox.OptionMeta> = right-aligned slot (price, shortcut, badge)\n • Both slots are excluded from textValue-based search\n\nASYNC PATTERN:\n <Combobox loading={isFetching} onSearch={(q) => mutate(q)}>\n {results.map((u) => (\n <Combobox.Option key={u.id} value={u.id}>{u.name}\n <Combobox.OptionDescription>{u.email}</Combobox.OptionDescription>\n </Combobox.Option>\n ))}\n </Combobox>\n — onSearch fires after searchDebounce (default 250ms). Do NOT clear input on result update; component preserves user's typing.\n\nIME (Korean/Japanese/Chinese): Enter during composition is ignored automatically — do not add custom keydown handlers.\n\nANTI-PATTERNS:\n ✗ <Select> with 20 options → <Combobox>\n ✗ Manual <input> + dropdown div + filter logic → <Combobox>\n ✗ Passing options through a prop array (legacy API removed) → use <Combobox.Option> children\n ✗ Wrapping options in extra elements (<div><Combobox.Option/></div>) → keep them as direct children\n ✗ Same `value` on two <Combobox.Option> — duplicates are warned + dropped in dev mode\n ✗ Setting value externally to clear input mid-typing → use onValueChange instead"
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$ref": "#/definitions/
|
|
2
|
+
"$ref": "#/definitions/comboboxOptionPropsSchema",
|
|
3
3
|
"definitions": {
|
|
4
|
-
"
|
|
4
|
+
"comboboxOptionPropsSchema": {
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"value": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"description": "
|
|
10
|
-
},
|
|
11
|
-
"label": {
|
|
12
|
-
"description": "Display label (string | ReactNode)"
|
|
13
|
-
},
|
|
14
|
-
"description": {
|
|
15
|
-
"description": "Secondary text below label (ReactNode)"
|
|
9
|
+
"description": "Unique value (string, required). Duplicate values within one Combobox produce a dev-mode console.error and the duplicate option is dropped."
|
|
16
10
|
},
|
|
17
11
|
"disabled": {
|
|
18
12
|
"type": "boolean",
|
|
19
|
-
"description": "
|
|
13
|
+
"description": "Disable selection. Skipped by keyboard navigation (Arrow Up/Down, Home/End)."
|
|
14
|
+
},
|
|
15
|
+
"textValue": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Text used for client-side filtering and the input display when this option is selected. If omitted, derived from `children` (string nodes only; OptionDescription / OptionMeta are excluded). Set this when label contains icons or non-text nodes you still want searchable (e.g. textValue=\"apple 사과 fruit\")."
|
|
18
|
+
},
|
|
19
|
+
"className": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Class merged onto the rendered <div role=\"option\">."
|
|
22
|
+
},
|
|
23
|
+
"children": {
|
|
24
|
+
"description": "Label content + optional <Combobox.OptionDescription> / <Combobox.OptionMeta> slots."
|
|
20
25
|
}
|
|
21
26
|
},
|
|
22
27
|
"required": [
|
|
23
28
|
"value"
|
|
24
29
|
],
|
|
25
30
|
"additionalProperties": false,
|
|
26
|
-
"description": "Single Combobox option."
|
|
31
|
+
"description": "Single Combobox option. Direct child of <Combobox> only.\n\nWHEN TO USE:\n • One per selectable item; `value` MUST be unique within the Combobox\n • Wrap rich content (icons, badges) directly as children — no escape hatch needed\n • Use textValue when label is non-text (e.g. <Combobox.Option value=\"apple\" textValue=\"사과 apple\">🍎</Combobox.Option>)\n\nANTI-PATTERNS:\n ✗ <Combobox><div><Combobox.Option/></div></Combobox> — Option must be a direct child\n ✗ Same value on two options → dev warning + silent drop; pick unique values\n ✗ Putting label text inside <Combobox.OptionDescription> — that slot is the secondary line below the label"
|
|
27
32
|
}
|
|
28
33
|
},
|
|
29
34
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/comboboxOptionDescriptionPropsSchema",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"comboboxOptionDescriptionPropsSchema": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"children": {
|
|
8
|
+
"description": "Secondary text below the label (ReactNode)."
|
|
9
|
+
},
|
|
10
|
+
"className": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Class for the description node."
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"description": "Secondary text shown below an option label. Use for hints like \"Republic of Korea\" beneath \"한국\". Excluded from textValue-based search."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/comboboxOptionMetaPropsSchema",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"comboboxOptionMetaPropsSchema": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"children": {
|
|
8
|
+
"description": "Right-aligned meta content (price, badge, shortcut, etc.)."
|
|
9
|
+
},
|
|
10
|
+
"className": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Class for the meta slot."
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"description": "Right-aligned slot inside an option. Use for prices, keyboard shortcuts, version tags, status badges. Excluded from textValue-based search."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
20
|
+
}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { buttonPropsSchema } from './button';
|
|
|
3
3
|
export { textInputPropsSchema } from './text-input';
|
|
4
4
|
export { textAreaPropsSchema } from './text-area';
|
|
5
5
|
export { selectPropsSchema, selectItemPropsSchema } from './select';
|
|
6
|
-
export { comboboxPropsSchema,
|
|
6
|
+
export { comboboxPropsSchema, comboboxOptionPropsSchema, comboboxOptionDescriptionPropsSchema, comboboxOptionMetaPropsSchema, } from './combobox';
|
|
7
7
|
export { dropdownMenuPropsSchema } from './dropdown-menu';
|
|
8
8
|
export { toggleGroupPropsSchema } from './toggle-group';
|
|
9
9
|
export { sliderPropsSchema } from './slider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OA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AAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/schemas.js
CHANGED
|
@@ -167,22 +167,57 @@ var selectItemPropsSchema = zod.z.object({
|
|
|
167
167
|
disabled: zod.z.boolean().optional().describe("Disabled"),
|
|
168
168
|
className: zod.z.string().optional().describe("Style override")
|
|
169
169
|
}).describe("Individual option within Select.");
|
|
170
|
-
var
|
|
171
|
-
value: zod.z.string().describe(
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
disabled: zod.z.boolean().optional().describe(
|
|
175
|
-
|
|
170
|
+
var comboboxOptionPropsSchema = zod.z.object({
|
|
171
|
+
value: zod.z.string().describe(
|
|
172
|
+
"Unique value (string, required). Duplicate values within one Combobox produce a dev-mode console.error and the duplicate option is dropped."
|
|
173
|
+
),
|
|
174
|
+
disabled: zod.z.boolean().optional().describe(
|
|
175
|
+
"Disable selection. Skipped by keyboard navigation (Arrow Up/Down, Home/End)."
|
|
176
|
+
),
|
|
177
|
+
textValue: zod.z.string().optional().describe(
|
|
178
|
+
'Text used for client-side filtering and the input display when this option is selected. If omitted, derived from `children` (string nodes only; OptionDescription / OptionMeta are excluded). Set this when label contains icons or non-text nodes you still want searchable (e.g. textValue="apple \uC0AC\uACFC fruit").'
|
|
179
|
+
),
|
|
180
|
+
className: zod.z.string().optional().describe('Class merged onto the rendered <div role="option">.'),
|
|
181
|
+
children: zod.z.any().optional().describe(
|
|
182
|
+
"Label content + optional <Combobox.OptionDescription> / <Combobox.OptionMeta> slots."
|
|
183
|
+
)
|
|
184
|
+
}).describe(
|
|
185
|
+
`Single Combobox option. Direct child of <Combobox> only.
|
|
186
|
+
|
|
187
|
+
WHEN TO USE:
|
|
188
|
+
\u2022 One per selectable item; \`value\` MUST be unique within the Combobox
|
|
189
|
+
\u2022 Wrap rich content (icons, badges) directly as children \u2014 no escape hatch needed
|
|
190
|
+
\u2022 Use textValue when label is non-text (e.g. <Combobox.Option value="apple" textValue="\uC0AC\uACFC apple">\u{1F34E}</Combobox.Option>)
|
|
191
|
+
|
|
192
|
+
ANTI-PATTERNS:
|
|
193
|
+
\u2717 <Combobox><div><Combobox.Option/></div></Combobox> \u2014 Option must be a direct child
|
|
194
|
+
\u2717 Same value on two options \u2192 dev warning + silent drop; pick unique values
|
|
195
|
+
\u2717 Putting label text inside <Combobox.OptionDescription> \u2014 that slot is the secondary line below the label`
|
|
196
|
+
);
|
|
197
|
+
var comboboxOptionDescriptionPropsSchema = zod.z.object({
|
|
198
|
+
children: zod.z.any().optional().describe("Secondary text below the label (ReactNode)."),
|
|
199
|
+
className: zod.z.string().optional().describe("Class for the description node.")
|
|
200
|
+
}).describe(
|
|
201
|
+
'Secondary text shown below an option label. Use for hints like "Republic of Korea" beneath "\uD55C\uAD6D". Excluded from textValue-based search.'
|
|
202
|
+
);
|
|
203
|
+
var comboboxOptionMetaPropsSchema = zod.z.object({
|
|
204
|
+
children: zod.z.any().optional().describe("Right-aligned meta content (price, badge, shortcut, etc.)."),
|
|
205
|
+
className: zod.z.string().optional().describe("Class for the meta slot.")
|
|
206
|
+
}).describe(
|
|
207
|
+
"Right-aligned slot inside an option. Use for prices, keyboard shortcuts, version tags, status badges. Excluded from textValue-based search."
|
|
208
|
+
);
|
|
176
209
|
var comboboxPropsSchema = zod.z.object({
|
|
177
|
-
|
|
210
|
+
children: zod.z.any().describe(
|
|
211
|
+
"<Combobox.Option> elements (required). Other children are ignored with a dev-mode warning. Async-search consumers swap this list as `onSearch` results arrive."
|
|
212
|
+
),
|
|
178
213
|
value: zod.z.any().optional().describe("Selected value. string for single, string[] for multiple"),
|
|
179
214
|
defaultValue: zod.z.any().optional().describe("Initial value (uncontrolled)"),
|
|
180
215
|
onValueChange: zod.z.any().optional().describe("Value change callback. (value: string | string[]) => void"),
|
|
181
216
|
multiple: zod.z.boolean().default(false).describe("Multi-select mode. Selected values shown as chips inside input"),
|
|
182
|
-
onSearch: zod.z.any().optional().describe("Async search callback. (query: string) => void. Triggers external data fetching with debounce"),
|
|
217
|
+
onSearch: zod.z.any().optional().describe("Async search callback. (query: string) => void. Triggers external data fetching with debounce. When set, the built-in client filter is disabled \u2014 render whatever <Combobox.Option> children match the latest results."),
|
|
183
218
|
searchDebounce: zod.z.number().default(250).describe("Debounce delay (ms) before onSearch fires"),
|
|
184
|
-
loading: zod.z.boolean().default(false).describe("Externally-controlled loading state. Shows spinner in input suffix"),
|
|
185
|
-
filter: zod.z.any().optional().describe("Custom client-side filter. (option, query) => boolean. Default: case-insensitive
|
|
219
|
+
loading: zod.z.boolean().default(false).describe("Externally-controlled loading state. Shows spinner in input suffix and a status row inside the popover."),
|
|
220
|
+
filter: zod.z.any().optional().describe("Custom client-side filter. (option: { value, textValue, disabled }, query: string) => boolean. Default: case-insensitive textValue includes match. Ignored when onSearch is set."),
|
|
186
221
|
placeholder: zod.z.string().optional().describe("Input placeholder"),
|
|
187
222
|
emptyMessage: zod.z.any().optional().describe('Message when no options match (string | ReactNode). Default: "\uAC80\uC0C9 \uACB0\uACFC \uC5C6\uC74C"'),
|
|
188
223
|
loadingMessage: zod.z.any().optional().describe('Message during loading state inside popover (string | ReactNode). Default: "\uAC80\uC0C9 \uC911\u2026"'),
|
|
@@ -196,7 +231,7 @@ var comboboxPropsSchema = zod.z.object({
|
|
|
196
231
|
className: zod.z.string().optional().describe("Wrapper className"),
|
|
197
232
|
popoverClassName: zod.z.string().optional().describe("Popover content className")
|
|
198
233
|
}).describe(
|
|
199
|
-
`Searchable select. Text input + popover listbox. Single/multi-select. Sync (auto-filter) or async (onSearch + loading) modes.
|
|
234
|
+
`Searchable select with compound option API. Text input + popover listbox. Single/multi-select. Sync (auto-filter) or async (onSearch + loading) modes.
|
|
200
235
|
|
|
201
236
|
WHEN TO USE:
|
|
202
237
|
\u2022 Options \u2265 7, OR labels are long, OR search/filter is needed \u2192 Combobox (not Select)
|
|
@@ -204,8 +239,29 @@ WHEN TO USE:
|
|
|
204
239
|
\u2022 Async data from server \u2192 set onSearch + loading
|
|
205
240
|
For \u22647 simple options use Select. For free-text tags use TagInput.
|
|
206
241
|
|
|
242
|
+
COMPOUND API:
|
|
243
|
+
<Combobox value={v} onValueChange={setV} placeholder="\u2026">
|
|
244
|
+
<Combobox.Option value="kr">\uD55C\uAD6D</Combobox.Option>
|
|
245
|
+
<Combobox.Option value="jp" disabled>
|
|
246
|
+
\uC77C\uBCF8
|
|
247
|
+
<Combobox.OptionDescription>\uD488\uC808</Combobox.OptionDescription>
|
|
248
|
+
<Combobox.OptionMeta>JP</Combobox.OptionMeta>
|
|
249
|
+
</Combobox.Option>
|
|
250
|
+
</Combobox>
|
|
251
|
+
|
|
252
|
+
\u2022 <Combobox.Option> requires unique \`value\` (dev mode warns on duplicates and drops the duplicate)
|
|
253
|
+
\u2022 <Combobox.OptionDescription> = secondary line under label
|
|
254
|
+
\u2022 <Combobox.OptionMeta> = right-aligned slot (price, shortcut, badge)
|
|
255
|
+
\u2022 Both slots are excluded from textValue-based search
|
|
256
|
+
|
|
207
257
|
ASYNC PATTERN:
|
|
208
|
-
<Combobox
|
|
258
|
+
<Combobox loading={isFetching} onSearch={(q) => mutate(q)}>
|
|
259
|
+
{results.map((u) => (
|
|
260
|
+
<Combobox.Option key={u.id} value={u.id}>{u.name}
|
|
261
|
+
<Combobox.OptionDescription>{u.email}</Combobox.OptionDescription>
|
|
262
|
+
</Combobox.Option>
|
|
263
|
+
))}
|
|
264
|
+
</Combobox>
|
|
209
265
|
\u2014 onSearch fires after searchDebounce (default 250ms). Do NOT clear input on result update; component preserves user's typing.
|
|
210
266
|
|
|
211
267
|
IME (Korean/Japanese/Chinese): Enter during composition is ignored automatically \u2014 do not add custom keydown handlers.
|
|
@@ -213,6 +269,9 @@ IME (Korean/Japanese/Chinese): Enter during composition is ignored automatically
|
|
|
213
269
|
ANTI-PATTERNS:
|
|
214
270
|
\u2717 <Select> with 20 options \u2192 <Combobox>
|
|
215
271
|
\u2717 Manual <input> + dropdown div + filter logic \u2192 <Combobox>
|
|
272
|
+
\u2717 Passing options through a prop array (legacy API removed) \u2192 use <Combobox.Option> children
|
|
273
|
+
\u2717 Wrapping options in extra elements (<div><Combobox.Option/></div>) \u2192 keep them as direct children
|
|
274
|
+
\u2717 Same \`value\` on two <Combobox.Option> \u2014 duplicates are warned + dropped in dev mode
|
|
216
275
|
\u2717 Setting value externally to clear input mid-typing \u2192 use onValueChange instead`
|
|
217
276
|
);
|
|
218
277
|
var dropdownMenuItemSchema = zod.z.object({
|
|
@@ -1611,7 +1670,9 @@ exports.carouselSlidePropsSchema = carouselSlidePropsSchema;
|
|
|
1611
1670
|
exports.checkBoxPropsSchema = checkBoxPropsSchema;
|
|
1612
1671
|
exports.chipPropsSchema = chipPropsSchema;
|
|
1613
1672
|
exports.clientOnlyPropsSchema = clientOnlyPropsSchema;
|
|
1614
|
-
exports.
|
|
1673
|
+
exports.comboboxOptionDescriptionPropsSchema = comboboxOptionDescriptionPropsSchema;
|
|
1674
|
+
exports.comboboxOptionMetaPropsSchema = comboboxOptionMetaPropsSchema;
|
|
1675
|
+
exports.comboboxOptionPropsSchema = comboboxOptionPropsSchema;
|
|
1615
1676
|
exports.comboboxPropsSchema = comboboxPropsSchema;
|
|
1616
1677
|
exports.countdownPropsSchema = countdownPropsSchema;
|
|
1617
1678
|
exports.counterPropsSchema = counterPropsSchema;
|
package/dist/schemas.mjs
CHANGED
|
@@ -165,22 +165,57 @@ var selectItemPropsSchema = z.object({
|
|
|
165
165
|
disabled: z.boolean().optional().describe("Disabled"),
|
|
166
166
|
className: z.string().optional().describe("Style override")
|
|
167
167
|
}).describe("Individual option within Select.");
|
|
168
|
-
var
|
|
169
|
-
value: z.string().describe(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
disabled: z.boolean().optional().describe(
|
|
173
|
-
|
|
168
|
+
var comboboxOptionPropsSchema = z.object({
|
|
169
|
+
value: z.string().describe(
|
|
170
|
+
"Unique value (string, required). Duplicate values within one Combobox produce a dev-mode console.error and the duplicate option is dropped."
|
|
171
|
+
),
|
|
172
|
+
disabled: z.boolean().optional().describe(
|
|
173
|
+
"Disable selection. Skipped by keyboard navigation (Arrow Up/Down, Home/End)."
|
|
174
|
+
),
|
|
175
|
+
textValue: z.string().optional().describe(
|
|
176
|
+
'Text used for client-side filtering and the input display when this option is selected. If omitted, derived from `children` (string nodes only; OptionDescription / OptionMeta are excluded). Set this when label contains icons or non-text nodes you still want searchable (e.g. textValue="apple \uC0AC\uACFC fruit").'
|
|
177
|
+
),
|
|
178
|
+
className: z.string().optional().describe('Class merged onto the rendered <div role="option">.'),
|
|
179
|
+
children: z.any().optional().describe(
|
|
180
|
+
"Label content + optional <Combobox.OptionDescription> / <Combobox.OptionMeta> slots."
|
|
181
|
+
)
|
|
182
|
+
}).describe(
|
|
183
|
+
`Single Combobox option. Direct child of <Combobox> only.
|
|
184
|
+
|
|
185
|
+
WHEN TO USE:
|
|
186
|
+
\u2022 One per selectable item; \`value\` MUST be unique within the Combobox
|
|
187
|
+
\u2022 Wrap rich content (icons, badges) directly as children \u2014 no escape hatch needed
|
|
188
|
+
\u2022 Use textValue when label is non-text (e.g. <Combobox.Option value="apple" textValue="\uC0AC\uACFC apple">\u{1F34E}</Combobox.Option>)
|
|
189
|
+
|
|
190
|
+
ANTI-PATTERNS:
|
|
191
|
+
\u2717 <Combobox><div><Combobox.Option/></div></Combobox> \u2014 Option must be a direct child
|
|
192
|
+
\u2717 Same value on two options \u2192 dev warning + silent drop; pick unique values
|
|
193
|
+
\u2717 Putting label text inside <Combobox.OptionDescription> \u2014 that slot is the secondary line below the label`
|
|
194
|
+
);
|
|
195
|
+
var comboboxOptionDescriptionPropsSchema = z.object({
|
|
196
|
+
children: z.any().optional().describe("Secondary text below the label (ReactNode)."),
|
|
197
|
+
className: z.string().optional().describe("Class for the description node.")
|
|
198
|
+
}).describe(
|
|
199
|
+
'Secondary text shown below an option label. Use for hints like "Republic of Korea" beneath "\uD55C\uAD6D". Excluded from textValue-based search.'
|
|
200
|
+
);
|
|
201
|
+
var comboboxOptionMetaPropsSchema = z.object({
|
|
202
|
+
children: z.any().optional().describe("Right-aligned meta content (price, badge, shortcut, etc.)."),
|
|
203
|
+
className: z.string().optional().describe("Class for the meta slot.")
|
|
204
|
+
}).describe(
|
|
205
|
+
"Right-aligned slot inside an option. Use for prices, keyboard shortcuts, version tags, status badges. Excluded from textValue-based search."
|
|
206
|
+
);
|
|
174
207
|
var comboboxPropsSchema = z.object({
|
|
175
|
-
|
|
208
|
+
children: z.any().describe(
|
|
209
|
+
"<Combobox.Option> elements (required). Other children are ignored with a dev-mode warning. Async-search consumers swap this list as `onSearch` results arrive."
|
|
210
|
+
),
|
|
176
211
|
value: z.any().optional().describe("Selected value. string for single, string[] for multiple"),
|
|
177
212
|
defaultValue: z.any().optional().describe("Initial value (uncontrolled)"),
|
|
178
213
|
onValueChange: z.any().optional().describe("Value change callback. (value: string | string[]) => void"),
|
|
179
214
|
multiple: z.boolean().default(false).describe("Multi-select mode. Selected values shown as chips inside input"),
|
|
180
|
-
onSearch: z.any().optional().describe("Async search callback. (query: string) => void. Triggers external data fetching with debounce"),
|
|
215
|
+
onSearch: z.any().optional().describe("Async search callback. (query: string) => void. Triggers external data fetching with debounce. When set, the built-in client filter is disabled \u2014 render whatever <Combobox.Option> children match the latest results."),
|
|
181
216
|
searchDebounce: z.number().default(250).describe("Debounce delay (ms) before onSearch fires"),
|
|
182
|
-
loading: z.boolean().default(false).describe("Externally-controlled loading state. Shows spinner in input suffix"),
|
|
183
|
-
filter: z.any().optional().describe("Custom client-side filter. (option, query) => boolean. Default: case-insensitive
|
|
217
|
+
loading: z.boolean().default(false).describe("Externally-controlled loading state. Shows spinner in input suffix and a status row inside the popover."),
|
|
218
|
+
filter: z.any().optional().describe("Custom client-side filter. (option: { value, textValue, disabled }, query: string) => boolean. Default: case-insensitive textValue includes match. Ignored when onSearch is set."),
|
|
184
219
|
placeholder: z.string().optional().describe("Input placeholder"),
|
|
185
220
|
emptyMessage: z.any().optional().describe('Message when no options match (string | ReactNode). Default: "\uAC80\uC0C9 \uACB0\uACFC \uC5C6\uC74C"'),
|
|
186
221
|
loadingMessage: z.any().optional().describe('Message during loading state inside popover (string | ReactNode). Default: "\uAC80\uC0C9 \uC911\u2026"'),
|
|
@@ -194,7 +229,7 @@ var comboboxPropsSchema = z.object({
|
|
|
194
229
|
className: z.string().optional().describe("Wrapper className"),
|
|
195
230
|
popoverClassName: z.string().optional().describe("Popover content className")
|
|
196
231
|
}).describe(
|
|
197
|
-
`Searchable select. Text input + popover listbox. Single/multi-select. Sync (auto-filter) or async (onSearch + loading) modes.
|
|
232
|
+
`Searchable select with compound option API. Text input + popover listbox. Single/multi-select. Sync (auto-filter) or async (onSearch + loading) modes.
|
|
198
233
|
|
|
199
234
|
WHEN TO USE:
|
|
200
235
|
\u2022 Options \u2265 7, OR labels are long, OR search/filter is needed \u2192 Combobox (not Select)
|
|
@@ -202,8 +237,29 @@ WHEN TO USE:
|
|
|
202
237
|
\u2022 Async data from server \u2192 set onSearch + loading
|
|
203
238
|
For \u22647 simple options use Select. For free-text tags use TagInput.
|
|
204
239
|
|
|
240
|
+
COMPOUND API:
|
|
241
|
+
<Combobox value={v} onValueChange={setV} placeholder="\u2026">
|
|
242
|
+
<Combobox.Option value="kr">\uD55C\uAD6D</Combobox.Option>
|
|
243
|
+
<Combobox.Option value="jp" disabled>
|
|
244
|
+
\uC77C\uBCF8
|
|
245
|
+
<Combobox.OptionDescription>\uD488\uC808</Combobox.OptionDescription>
|
|
246
|
+
<Combobox.OptionMeta>JP</Combobox.OptionMeta>
|
|
247
|
+
</Combobox.Option>
|
|
248
|
+
</Combobox>
|
|
249
|
+
|
|
250
|
+
\u2022 <Combobox.Option> requires unique \`value\` (dev mode warns on duplicates and drops the duplicate)
|
|
251
|
+
\u2022 <Combobox.OptionDescription> = secondary line under label
|
|
252
|
+
\u2022 <Combobox.OptionMeta> = right-aligned slot (price, shortcut, badge)
|
|
253
|
+
\u2022 Both slots are excluded from textValue-based search
|
|
254
|
+
|
|
205
255
|
ASYNC PATTERN:
|
|
206
|
-
<Combobox
|
|
256
|
+
<Combobox loading={isFetching} onSearch={(q) => mutate(q)}>
|
|
257
|
+
{results.map((u) => (
|
|
258
|
+
<Combobox.Option key={u.id} value={u.id}>{u.name}
|
|
259
|
+
<Combobox.OptionDescription>{u.email}</Combobox.OptionDescription>
|
|
260
|
+
</Combobox.Option>
|
|
261
|
+
))}
|
|
262
|
+
</Combobox>
|
|
207
263
|
\u2014 onSearch fires after searchDebounce (default 250ms). Do NOT clear input on result update; component preserves user's typing.
|
|
208
264
|
|
|
209
265
|
IME (Korean/Japanese/Chinese): Enter during composition is ignored automatically \u2014 do not add custom keydown handlers.
|
|
@@ -211,6 +267,9 @@ IME (Korean/Japanese/Chinese): Enter during composition is ignored automatically
|
|
|
211
267
|
ANTI-PATTERNS:
|
|
212
268
|
\u2717 <Select> with 20 options \u2192 <Combobox>
|
|
213
269
|
\u2717 Manual <input> + dropdown div + filter logic \u2192 <Combobox>
|
|
270
|
+
\u2717 Passing options through a prop array (legacy API removed) \u2192 use <Combobox.Option> children
|
|
271
|
+
\u2717 Wrapping options in extra elements (<div><Combobox.Option/></div>) \u2192 keep them as direct children
|
|
272
|
+
\u2717 Same \`value\` on two <Combobox.Option> \u2014 duplicates are warned + dropped in dev mode
|
|
214
273
|
\u2717 Setting value externally to clear input mid-typing \u2192 use onValueChange instead`
|
|
215
274
|
);
|
|
216
275
|
var dropdownMenuItemSchema = z.object({
|
|
@@ -1596,4 +1655,4 @@ ANTI-PATTERNS:
|
|
|
1596
1655
|
\u2717 Storing image as data-URL value (use File via onChange and upload to server)`
|
|
1597
1656
|
);
|
|
1598
1657
|
|
|
1599
|
-
export { accordionPropsSchema, alertPropsSchema, avatarPropsSchema, badgePropsSchema, breadcrumbPropsSchema, buttonPropsSchema, carouselButtonPropsSchema, carouselDotsPropsSchema, carouselPropsSchema, carouselSlidePropsSchema, checkBoxPropsSchema, chipPropsSchema, clientOnlyPropsSchema,
|
|
1658
|
+
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 };
|