@nexus-cross/design-system 1.1.0 → 2.0.0-beta.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/claude-rules/nexus/CLAUDE.md +34 -6
- package/cursor-rules/CLAUDE.md +38 -9
- package/cursor-rules/nexus-project-setup.mdc +30 -16
- 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 +35 -24
- package/dist/index.mjs +4 -5
- package/dist/modal/index.js +11 -11
- package/dist/modal/index.mjs +2 -2
- 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/dist/tailwind-v4.css +19 -0
- package/dist/tokens/TOKENS.md +426 -0
- package/dist/tokens/company.css +410 -0
- package/dist/tokens/css.css +405 -0
- package/dist/tokens/data/borderWidth.json +38 -0
- package/dist/tokens/data/breakpoint.json +23 -0
- package/dist/tokens/data/color.json +973 -0
- package/dist/tokens/data/index.ts +63 -0
- package/dist/tokens/data/motion.json +64 -0
- package/dist/tokens/data/opacity.json +65 -0
- package/dist/tokens/data/radius.json +25 -0
- package/dist/tokens/data/shadow.json +76 -0
- package/dist/tokens/data/size.json +46 -0
- package/dist/tokens/data/space.json +86 -0
- package/dist/tokens/data/typography.json +626 -0
- package/dist/tokens/data/zIndex.json +22 -0
- package/dist/tokens/index.d.ts +11 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +12 -0
- package/dist/tokens/index.mjs +1 -0
- package/dist/tokens/tailwind.js +260 -0
- package/dist/tokens-domains/data/index.ts +16 -0
- package/dist/tokens-domains/data/prediction/domain.json +324 -0
- package/dist/tokens-domains/index.d.ts +12 -0
- package/dist/tokens-domains/index.d.ts.map +1 -0
- package/dist/tokens-domains/index.js +12 -0
- package/dist/tokens-domains/index.mjs +1 -0
- package/dist/tokens-domains/prediction-vars.css +154 -0
- package/dist/tokens-domains/prediction.css +153 -0
- package/dist/tokens-domains/prediction.md +70 -0
- package/dist/tokens-domains/tailwind.js +59 -0
- package/package.json +27 -6
- package/dist/chunks/{chunk-5ZVPTIL3.mjs → chunk-3VFBPFZF.mjs} +1 -1
- package/dist/chunks/{chunk-7F4SOLAC.js → chunk-U53UA76K.js} +1 -1
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 };
|