@box-kite/react 2.2.5 → 2.2.7
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/box-kite-rules.md +5 -1
- package/.claude/skills/box-kite/SKILL.md +5 -1
- package/.claude/skills/box-kite/references/components.md +34 -0
- package/.claude/skills/box-kite/references/extending.md +10 -0
- package/.claude/skills/box-kite/references/styling.md +3 -2
- package/.cursor/rules/box-kite.mdc +5 -1
- package/AGENTS.md +5 -1
- package/BOX_AI_CONTEXT.md +147 -7
- package/BOX_KITE_AI_CONTEXT.md +147 -7
- package/box.cjs +1 -1
- package/box.d.ts +5 -0
- package/box.mjs +7 -7
- package/catalog.cjs +1 -1
- package/catalog.mjs +521 -0
- package/client.cjs +1 -1
- package/client.mjs +136 -117
- package/components/calendar.cjs +1 -0
- package/components/calendar.d.ts +77 -0
- package/components/calendar.mjs +483 -0
- package/components/dataGrid/components/dataGridBooleanValue.d.ts +11 -0
- package/components/dataGrid/components/dataGridDateParts.d.ts +40 -0
- package/components/dataGrid/components/dataGridDateValue.d.ts +14 -0
- package/components/dataGrid/contracts/dataGridContract.d.ts +38 -11
- package/components/dataGrid/models/columnModel.d.ts +3 -1
- package/components/dataGrid/models/editModel.d.ts +3 -1
- package/components/dataGrid/models/headerCellModel.d.ts +1 -0
- package/components/dataGrid/models/localeText.d.ts +4 -0
- package/components/dataGrid/useDateParts.d.ts +17 -0
- package/components/dataGrid.cjs +3 -3
- package/components/dataGrid.mjs +824 -690
- package/components/dateField.cjs +1 -0
- package/components/dateField.d.ts +78 -0
- package/components/dateField.mjs +313 -0
- package/components/datePicker.cjs +1 -0
- package/components/datePicker.d.ts +120 -0
- package/components/datePicker.mjs +529 -0
- package/components/dateTime.cjs +1 -0
- package/components/dateTime.d.ts +23 -0
- package/components/dateTime.mjs +34 -0
- package/components/dialog.cjs +1 -1
- package/components/dialog.mjs +87 -75
- package/components/overlay.cjs +1 -1
- package/components/overlay.mjs +1 -1
- package/components/semantics.d.ts +29 -29
- package/components/timeZoneSelect.cjs +1 -0
- package/components/timeZoneSelect.d.ts +52 -0
- package/components/timeZoneSelect.mjs +74 -0
- package/components/toaster.cjs +1 -1
- package/components/toaster.mjs +1 -1
- package/create/src/index.d.ts +1 -0
- package/create/src/options.d.ts +27 -0
- package/create/src/options.test.d.ts +1 -0
- package/create/src/packageManager.d.ts +5 -0
- package/create/src/project.d.ts +25 -0
- package/create/src/project.test.d.ts +1 -0
- package/create/templates/ts/designs/azure.d.ts +5 -0
- package/create/templates/ts/designs/ember.d.ts +5 -0
- package/create/templates/ts/designs/mono.d.ts +5 -0
- package/create/templates/ts/src/App.d.ts +2 -0
- package/create/templates/ts/src/design.d.ts +5 -0
- package/create/templates/ts/src/main.d.ts +0 -0
- package/dataGridDateParts.cjs +1 -0
- package/dataGridDateParts.mjs +223 -0
- package/dataGridList.cjs +1 -1
- package/dataGridList.mjs +335 -372
- package/dataGridListLayout.cjs +1 -0
- package/dataGridListLayout.mjs +49 -0
- package/date-environment.cjs +1 -0
- package/date-environment.mjs +29 -0
- package/date-input.cjs +1 -0
- package/date-input.mjs +346 -0
- package/date-math.cjs +1 -0
- package/date-math.mjs +317 -0
- package/date.cjs +1 -0
- package/date.d.ts +40 -0
- package/date.mjs +4 -0
- package/dates.cjs +1 -0
- package/dates.mjs +689 -0
- package/docs/components.md +6 -1
- package/docs/props.md +19 -19
- package/package.json +124 -27
- package/react/boxComponent.d.ts +1 -1
- package/react/date/dateChange.d.ts +18 -0
- package/react/date/dateEnvironment.d.ts +34 -0
- package/react/theme/theme.d.ts +9 -0
- package/react/theme/themeContext.d.ts +2 -0
- package/react-shared.cjs +1 -1
- package/react-shared.mjs +1 -1
- package/rsc.cjs +1 -1
- package/rsc.d.ts +3 -0
- package/rsc.mjs +1 -1
- package/ssg.cjs +1 -1
- package/ssg.mjs +1 -1
- package/utils/date/calendar.d.ts +44 -0
- package/utils/date/calendarModel.d.ts +46 -0
- package/utils/date/dateTime.d.ts +144 -0
- package/utils/date/fieldModel.d.ts +74 -0
- package/utils/date/format.d.ts +39 -0
- package/utils/date/iso.d.ts +40 -0
- package/utils/date/locale.d.ts +17 -0
- package/utils/date/parse.d.ts +20 -0
- package/utils/date/settings.d.ts +26 -0
- package/utils/date/value.d.ts +43 -0
- package/utils/date/zoneOptions.d.ts +19 -0
- package/utils/date/zones.d.ts +32 -0
package/catalog.mjs
CHANGED
|
@@ -2171,6 +2171,527 @@ var a = i, o = {
|
|
|
2171
2171
|
required: [],
|
|
2172
2172
|
styled: !0
|
|
2173
2173
|
},
|
|
2174
|
+
DateField: {
|
|
2175
|
+
description: "A date, a time or both, typed one segment at a time — in the order and with the separators the reader's locale writes them, so `19.10.2026` in Moldova and `10/19/2026` in the US with nothing to configure and nothing to parse.",
|
|
2176
|
+
import: "import DateField from '@box-kite/react/components/dateField';",
|
|
2177
|
+
slots: ["label", "end"],
|
|
2178
|
+
events: ["onValueChange", "isDateUnavailable"],
|
|
2179
|
+
props: {
|
|
2180
|
+
type: {
|
|
2181
|
+
type: "string",
|
|
2182
|
+
enum: [
|
|
2183
|
+
"date",
|
|
2184
|
+
"time",
|
|
2185
|
+
"datetime"
|
|
2186
|
+
],
|
|
2187
|
+
description: "What it edits: a day (`'date'`, default), a time of day (`'time'`), or both (`'datetime'`)."
|
|
2188
|
+
},
|
|
2189
|
+
value: {
|
|
2190
|
+
anyOf: [{ type: "string" }],
|
|
2191
|
+
description: "Controlled value, an ISO string of the field's kind: `2026-10-19`, `14:30:00`, or for a date-time an instant with its offset (`2026-10-19T14:30:00+03:00`), `…Z` in UTC, or a wall clock with `zone=\"none\"`."
|
|
2192
|
+
},
|
|
2193
|
+
defaultValue: {
|
|
2194
|
+
anyOf: [{ type: "string" }],
|
|
2195
|
+
description: "The value it starts with when the field owns its state."
|
|
2196
|
+
},
|
|
2197
|
+
locale: {
|
|
2198
|
+
type: "string",
|
|
2199
|
+
description: "The language the segments are ordered and named in."
|
|
2200
|
+
},
|
|
2201
|
+
hourCycle: {
|
|
2202
|
+
type: "number",
|
|
2203
|
+
enum: [12, 24],
|
|
2204
|
+
description: "A 12- or 24-hour clock."
|
|
2205
|
+
},
|
|
2206
|
+
granularity: {
|
|
2207
|
+
type: "string",
|
|
2208
|
+
enum: ["minute", "second"],
|
|
2209
|
+
description: "Whether a time is edited to the minute (default) or the second."
|
|
2210
|
+
},
|
|
2211
|
+
min: {
|
|
2212
|
+
anyOf: [{ type: "string" }],
|
|
2213
|
+
description: "The earliest value that is valid."
|
|
2214
|
+
},
|
|
2215
|
+
max: {
|
|
2216
|
+
anyOf: [{ type: "string" }],
|
|
2217
|
+
description: "The latest value that is valid."
|
|
2218
|
+
},
|
|
2219
|
+
disabled: {
|
|
2220
|
+
type: "boolean",
|
|
2221
|
+
description: "Not editable and not focusable, and read out as such."
|
|
2222
|
+
},
|
|
2223
|
+
readOnly: {
|
|
2224
|
+
type: "boolean",
|
|
2225
|
+
description: "Focusable and read out, but not editable."
|
|
2226
|
+
},
|
|
2227
|
+
required: {
|
|
2228
|
+
type: "boolean",
|
|
2229
|
+
description: "The form is not valid until it is filled in — the browser's own check, announced and translated for free."
|
|
2230
|
+
},
|
|
2231
|
+
invalid: {
|
|
2232
|
+
type: "boolean",
|
|
2233
|
+
description: "Marks the value invalid whatever the bounds say."
|
|
2234
|
+
},
|
|
2235
|
+
name: {
|
|
2236
|
+
type: "string",
|
|
2237
|
+
description: "What the value posts under in a form: the canonical string, or nothing while empty."
|
|
2238
|
+
},
|
|
2239
|
+
labelledBy: {
|
|
2240
|
+
type: "string",
|
|
2241
|
+
description: "Names the field after an element already on the page, instead of `label`."
|
|
2242
|
+
},
|
|
2243
|
+
describedBy: {
|
|
2244
|
+
type: "string",
|
|
2245
|
+
description: "An element that describes the field — a hint, an error."
|
|
2246
|
+
},
|
|
2247
|
+
placeholderValue: {
|
|
2248
|
+
type: "string",
|
|
2249
|
+
description: "What an empty segment starts from on an arrow key."
|
|
2250
|
+
},
|
|
2251
|
+
disambiguation: {
|
|
2252
|
+
type: "string",
|
|
2253
|
+
enum: [
|
|
2254
|
+
"compatible",
|
|
2255
|
+
"earlier",
|
|
2256
|
+
"later",
|
|
2257
|
+
"reject"
|
|
2258
|
+
],
|
|
2259
|
+
description: "What a wall-clock time a zone skips or repeats means."
|
|
2260
|
+
},
|
|
2261
|
+
showZone: {
|
|
2262
|
+
type: "boolean",
|
|
2263
|
+
description: "Whether a date-time names its zone after the time."
|
|
2264
|
+
},
|
|
2265
|
+
autoFocus: {
|
|
2266
|
+
type: "boolean",
|
|
2267
|
+
description: "Focus the first segment on mount."
|
|
2268
|
+
},
|
|
2269
|
+
emptyText: {
|
|
2270
|
+
type: "string",
|
|
2271
|
+
description: "What an empty segment is read out as."
|
|
2272
|
+
},
|
|
2273
|
+
tabIndex: {
|
|
2274
|
+
type: "number",
|
|
2275
|
+
description: "Every segment's tab index."
|
|
2276
|
+
}
|
|
2277
|
+
},
|
|
2278
|
+
required: [],
|
|
2279
|
+
styled: !0
|
|
2280
|
+
},
|
|
2281
|
+
Calendar: {
|
|
2282
|
+
description: "A month of days to pick from, on APG's grid keys — one day or, with `mode=\"range\"`, a start and an end.",
|
|
2283
|
+
import: "import Calendar from '@box-kite/react/components/calendar';",
|
|
2284
|
+
slots: ["default"],
|
|
2285
|
+
events: ["isDateUnavailable", "onFocusedDateChange"],
|
|
2286
|
+
props: {
|
|
2287
|
+
min: {
|
|
2288
|
+
anyOf: [{ type: "string" }],
|
|
2289
|
+
description: "The earliest day that can be chosen, `YYYY-MM-DD`."
|
|
2290
|
+
},
|
|
2291
|
+
max: {
|
|
2292
|
+
anyOf: [{ type: "string" }],
|
|
2293
|
+
description: "The latest day that can be chosen."
|
|
2294
|
+
},
|
|
2295
|
+
locale: {
|
|
2296
|
+
type: "string",
|
|
2297
|
+
description: "The language of the month and weekday names, and whose week it is."
|
|
2298
|
+
},
|
|
2299
|
+
firstDayOfWeek: {
|
|
2300
|
+
type: "number",
|
|
2301
|
+
description: "The day the week starts on, 0 for Sunday."
|
|
2302
|
+
},
|
|
2303
|
+
months: {
|
|
2304
|
+
type: "number",
|
|
2305
|
+
enum: [
|
|
2306
|
+
1,
|
|
2307
|
+
2,
|
|
2308
|
+
3
|
|
2309
|
+
],
|
|
2310
|
+
description: "How many months side by side."
|
|
2311
|
+
},
|
|
2312
|
+
weekNumbers: {
|
|
2313
|
+
type: "boolean",
|
|
2314
|
+
description: "A leading column of ISO week numbers."
|
|
2315
|
+
},
|
|
2316
|
+
showOutsideDays: {
|
|
2317
|
+
type: "boolean",
|
|
2318
|
+
description: "Whether the days that complete the first and last weeks are drawn."
|
|
2319
|
+
},
|
|
2320
|
+
focusedDate: {
|
|
2321
|
+
type: "string",
|
|
2322
|
+
description: "The day the keyboard is on, which decides the month on show."
|
|
2323
|
+
},
|
|
2324
|
+
defaultFocusedDate: {
|
|
2325
|
+
type: "string",
|
|
2326
|
+
description: "Where the keyboard starts when the calendar owns it."
|
|
2327
|
+
},
|
|
2328
|
+
disabled: {
|
|
2329
|
+
type: "boolean",
|
|
2330
|
+
description: "Nothing can be chosen and nothing is focusable."
|
|
2331
|
+
},
|
|
2332
|
+
readOnly: {
|
|
2333
|
+
type: "boolean",
|
|
2334
|
+
description: "Can be read and navigated, but not chosen in."
|
|
2335
|
+
},
|
|
2336
|
+
autoFocus: {
|
|
2337
|
+
type: "boolean",
|
|
2338
|
+
description: "Focus the day the keyboard is on, on mount — what a picker's panel wants."
|
|
2339
|
+
},
|
|
2340
|
+
label: {
|
|
2341
|
+
type: "string",
|
|
2342
|
+
description: "The calendar's accessible name, which a screen reader hears before the month."
|
|
2343
|
+
},
|
|
2344
|
+
previousLabel: {
|
|
2345
|
+
type: "string",
|
|
2346
|
+
description: "The previous-page button's name."
|
|
2347
|
+
},
|
|
2348
|
+
nextLabel: {
|
|
2349
|
+
type: "string",
|
|
2350
|
+
description: "The next-page button's name."
|
|
2351
|
+
}
|
|
2352
|
+
},
|
|
2353
|
+
required: [],
|
|
2354
|
+
styled: !0
|
|
2355
|
+
},
|
|
2356
|
+
DatePicker: {
|
|
2357
|
+
description: "A field with a calendar, a list of times, or both, behind a button inside it — type the value or pick it.",
|
|
2358
|
+
import: "import DatePicker from '@box-kite/react/components/datePicker';",
|
|
2359
|
+
slots: ["label"],
|
|
2360
|
+
events: [
|
|
2361
|
+
"onValueChange",
|
|
2362
|
+
"isDateUnavailable",
|
|
2363
|
+
"onOpenChange"
|
|
2364
|
+
],
|
|
2365
|
+
props: {
|
|
2366
|
+
type: {
|
|
2367
|
+
type: "string",
|
|
2368
|
+
enum: [
|
|
2369
|
+
"date",
|
|
2370
|
+
"time",
|
|
2371
|
+
"datetime"
|
|
2372
|
+
],
|
|
2373
|
+
description: "A day (`'date'`, default), a time of day (`'time'`), or both (`'datetime'`)."
|
|
2374
|
+
},
|
|
2375
|
+
value: {
|
|
2376
|
+
anyOf: [{ type: "string" }],
|
|
2377
|
+
description: "Controlled value, an ISO string of the picker's kind — see `DateField`."
|
|
2378
|
+
},
|
|
2379
|
+
defaultValue: {
|
|
2380
|
+
anyOf: [{ type: "string" }],
|
|
2381
|
+
description: "The value it starts with when the picker owns its state."
|
|
2382
|
+
},
|
|
2383
|
+
hourCycle: {
|
|
2384
|
+
type: "number",
|
|
2385
|
+
enum: [12, 24],
|
|
2386
|
+
description: "A 12- or 24-hour clock, in the field and the list of times."
|
|
2387
|
+
},
|
|
2388
|
+
granularity: {
|
|
2389
|
+
type: "string",
|
|
2390
|
+
enum: ["minute", "second"],
|
|
2391
|
+
description: "Whether a time is edited to the minute (default) or the second."
|
|
2392
|
+
},
|
|
2393
|
+
disambiguation: {
|
|
2394
|
+
type: "string",
|
|
2395
|
+
enum: [
|
|
2396
|
+
"compatible",
|
|
2397
|
+
"earlier",
|
|
2398
|
+
"later",
|
|
2399
|
+
"reject"
|
|
2400
|
+
],
|
|
2401
|
+
description: "What a wall-clock time a zone skips or repeats means."
|
|
2402
|
+
},
|
|
2403
|
+
name: {
|
|
2404
|
+
type: "string",
|
|
2405
|
+
description: "What the value posts under in a form."
|
|
2406
|
+
},
|
|
2407
|
+
step: {
|
|
2408
|
+
type: "number",
|
|
2409
|
+
description: "Minutes between the times the list offers."
|
|
2410
|
+
},
|
|
2411
|
+
defaultTime: {
|
|
2412
|
+
type: "string",
|
|
2413
|
+
description: "The time a day picked before any time takes."
|
|
2414
|
+
},
|
|
2415
|
+
showZone: {
|
|
2416
|
+
type: "boolean",
|
|
2417
|
+
description: "Whether a date-time names its zone after the time."
|
|
2418
|
+
},
|
|
2419
|
+
locale: {
|
|
2420
|
+
type: "string",
|
|
2421
|
+
description: "The language of the field, the calendar and the times."
|
|
2422
|
+
},
|
|
2423
|
+
min: {
|
|
2424
|
+
anyOf: [{ type: "string" }],
|
|
2425
|
+
description: "The earliest value that is valid, and the first day the calendar offers."
|
|
2426
|
+
},
|
|
2427
|
+
max: {
|
|
2428
|
+
anyOf: [{ type: "string" }],
|
|
2429
|
+
description: "The latest."
|
|
2430
|
+
},
|
|
2431
|
+
disabled: {
|
|
2432
|
+
type: "boolean",
|
|
2433
|
+
description: "Not editable, not focusable and not openable."
|
|
2434
|
+
},
|
|
2435
|
+
readOnly: {
|
|
2436
|
+
type: "boolean",
|
|
2437
|
+
description: "Focusable and read out, but not editable, and the button does not open."
|
|
2438
|
+
},
|
|
2439
|
+
required: {
|
|
2440
|
+
type: "boolean",
|
|
2441
|
+
description: "The form is not valid until it is filled in — the browser's own check."
|
|
2442
|
+
},
|
|
2443
|
+
invalid: {
|
|
2444
|
+
type: "boolean",
|
|
2445
|
+
description: "Marks the value invalid whatever the bounds say."
|
|
2446
|
+
},
|
|
2447
|
+
labelledBy: {
|
|
2448
|
+
type: "string",
|
|
2449
|
+
description: "Names the field after an element already on the page, instead of `label`."
|
|
2450
|
+
},
|
|
2451
|
+
describedBy: {
|
|
2452
|
+
type: "string",
|
|
2453
|
+
description: "An element that describes the field — a hint, an error."
|
|
2454
|
+
},
|
|
2455
|
+
open: {
|
|
2456
|
+
type: "boolean",
|
|
2457
|
+
description: "Whether the panel is open."
|
|
2458
|
+
},
|
|
2459
|
+
defaultOpen: {
|
|
2460
|
+
type: "boolean",
|
|
2461
|
+
description: "Whether it starts open, when the picker owns that itself."
|
|
2462
|
+
},
|
|
2463
|
+
closeOnSelect: {
|
|
2464
|
+
type: "boolean",
|
|
2465
|
+
description: "Whether choosing closes the panel."
|
|
2466
|
+
},
|
|
2467
|
+
firstDayOfWeek: {
|
|
2468
|
+
type: "number",
|
|
2469
|
+
description: "The day the week starts on, 0 for Sunday."
|
|
2470
|
+
},
|
|
2471
|
+
weekNumbers: {
|
|
2472
|
+
type: "boolean",
|
|
2473
|
+
description: "ISO week numbers down the calendar's side."
|
|
2474
|
+
},
|
|
2475
|
+
side: {
|
|
2476
|
+
type: "string",
|
|
2477
|
+
enum: [
|
|
2478
|
+
"top",
|
|
2479
|
+
"bottom",
|
|
2480
|
+
"start",
|
|
2481
|
+
"end"
|
|
2482
|
+
],
|
|
2483
|
+
description: "Which side of the field the panel opens on."
|
|
2484
|
+
},
|
|
2485
|
+
align: {
|
|
2486
|
+
type: "string",
|
|
2487
|
+
enum: [
|
|
2488
|
+
"start",
|
|
2489
|
+
"center",
|
|
2490
|
+
"end"
|
|
2491
|
+
],
|
|
2492
|
+
description: "Which of the field's edges it lines up with."
|
|
2493
|
+
},
|
|
2494
|
+
clearable: {
|
|
2495
|
+
type: "boolean",
|
|
2496
|
+
description: "A button inside the field that empties it."
|
|
2497
|
+
},
|
|
2498
|
+
triggerLabel: {
|
|
2499
|
+
type: "string",
|
|
2500
|
+
description: "The calendar button's name."
|
|
2501
|
+
},
|
|
2502
|
+
clearLabel: {
|
|
2503
|
+
type: "string",
|
|
2504
|
+
description: "The clear button's name."
|
|
2505
|
+
},
|
|
2506
|
+
tabIndex: {
|
|
2507
|
+
type: "number",
|
|
2508
|
+
description: "Every segment's and button's tab index."
|
|
2509
|
+
}
|
|
2510
|
+
},
|
|
2511
|
+
required: [],
|
|
2512
|
+
styled: !0
|
|
2513
|
+
},
|
|
2514
|
+
DateRangePicker: {
|
|
2515
|
+
description: "Two dates that make a span — a stay, a reporting period — typed into two fields or picked on a range calendar.",
|
|
2516
|
+
import: "import { DateRangePicker } from '@box-kite/react/components/datePicker';",
|
|
2517
|
+
slots: ["label"],
|
|
2518
|
+
events: [
|
|
2519
|
+
"onValueChange",
|
|
2520
|
+
"isDateUnavailable",
|
|
2521
|
+
"onOpenChange"
|
|
2522
|
+
],
|
|
2523
|
+
props: {
|
|
2524
|
+
startName: {
|
|
2525
|
+
type: "string",
|
|
2526
|
+
description: "What the start posts under in a form."
|
|
2527
|
+
},
|
|
2528
|
+
endName: {
|
|
2529
|
+
type: "string",
|
|
2530
|
+
description: "What the end posts under."
|
|
2531
|
+
},
|
|
2532
|
+
startLabel: {
|
|
2533
|
+
type: "string",
|
|
2534
|
+
description: "The names a screen reader gives the two fields."
|
|
2535
|
+
},
|
|
2536
|
+
endLabel: {
|
|
2537
|
+
type: "string",
|
|
2538
|
+
description: "The end field's name."
|
|
2539
|
+
},
|
|
2540
|
+
months: {
|
|
2541
|
+
type: "number",
|
|
2542
|
+
enum: [
|
|
2543
|
+
1,
|
|
2544
|
+
2,
|
|
2545
|
+
3
|
|
2546
|
+
],
|
|
2547
|
+
description: "Months side by side in the panel."
|
|
2548
|
+
},
|
|
2549
|
+
locale: {
|
|
2550
|
+
type: "string",
|
|
2551
|
+
description: "The language of the field, the calendar and the times."
|
|
2552
|
+
},
|
|
2553
|
+
min: {
|
|
2554
|
+
anyOf: [{ type: "string" }],
|
|
2555
|
+
description: "The earliest value that is valid, and the first day the calendar offers."
|
|
2556
|
+
},
|
|
2557
|
+
max: {
|
|
2558
|
+
anyOf: [{ type: "string" }],
|
|
2559
|
+
description: "The latest."
|
|
2560
|
+
},
|
|
2561
|
+
disabled: {
|
|
2562
|
+
type: "boolean",
|
|
2563
|
+
description: "Not editable, not focusable and not openable."
|
|
2564
|
+
},
|
|
2565
|
+
readOnly: {
|
|
2566
|
+
type: "boolean",
|
|
2567
|
+
description: "Focusable and read out, but not editable, and the button does not open."
|
|
2568
|
+
},
|
|
2569
|
+
required: {
|
|
2570
|
+
type: "boolean",
|
|
2571
|
+
description: "The form is not valid until it is filled in — the browser's own check."
|
|
2572
|
+
},
|
|
2573
|
+
invalid: {
|
|
2574
|
+
type: "boolean",
|
|
2575
|
+
description: "Marks the value invalid whatever the bounds say."
|
|
2576
|
+
},
|
|
2577
|
+
labelledBy: {
|
|
2578
|
+
type: "string",
|
|
2579
|
+
description: "Names the field after an element already on the page, instead of `label`."
|
|
2580
|
+
},
|
|
2581
|
+
describedBy: {
|
|
2582
|
+
type: "string",
|
|
2583
|
+
description: "An element that describes the field — a hint, an error."
|
|
2584
|
+
},
|
|
2585
|
+
open: {
|
|
2586
|
+
type: "boolean",
|
|
2587
|
+
description: "Whether the panel is open."
|
|
2588
|
+
},
|
|
2589
|
+
defaultOpen: {
|
|
2590
|
+
type: "boolean",
|
|
2591
|
+
description: "Whether it starts open, when the picker owns that itself."
|
|
2592
|
+
},
|
|
2593
|
+
closeOnSelect: {
|
|
2594
|
+
type: "boolean",
|
|
2595
|
+
description: "Whether choosing closes the panel."
|
|
2596
|
+
},
|
|
2597
|
+
firstDayOfWeek: {
|
|
2598
|
+
type: "number",
|
|
2599
|
+
description: "The day the week starts on, 0 for Sunday."
|
|
2600
|
+
},
|
|
2601
|
+
weekNumbers: {
|
|
2602
|
+
type: "boolean",
|
|
2603
|
+
description: "ISO week numbers down the calendar's side."
|
|
2604
|
+
},
|
|
2605
|
+
side: {
|
|
2606
|
+
type: "string",
|
|
2607
|
+
enum: [
|
|
2608
|
+
"top",
|
|
2609
|
+
"bottom",
|
|
2610
|
+
"start",
|
|
2611
|
+
"end"
|
|
2612
|
+
],
|
|
2613
|
+
description: "Which side of the field the panel opens on."
|
|
2614
|
+
},
|
|
2615
|
+
align: {
|
|
2616
|
+
type: "string",
|
|
2617
|
+
enum: [
|
|
2618
|
+
"start",
|
|
2619
|
+
"center",
|
|
2620
|
+
"end"
|
|
2621
|
+
],
|
|
2622
|
+
description: "Which of the field's edges it lines up with."
|
|
2623
|
+
},
|
|
2624
|
+
clearable: {
|
|
2625
|
+
type: "boolean",
|
|
2626
|
+
description: "A button inside the field that empties it."
|
|
2627
|
+
},
|
|
2628
|
+
triggerLabel: {
|
|
2629
|
+
type: "string",
|
|
2630
|
+
description: "The calendar button's name."
|
|
2631
|
+
},
|
|
2632
|
+
clearLabel: {
|
|
2633
|
+
type: "string",
|
|
2634
|
+
description: "The clear button's name."
|
|
2635
|
+
},
|
|
2636
|
+
tabIndex: {
|
|
2637
|
+
type: "number",
|
|
2638
|
+
description: "Every segment's and button's tab index."
|
|
2639
|
+
}
|
|
2640
|
+
},
|
|
2641
|
+
required: [],
|
|
2642
|
+
styled: !0
|
|
2643
|
+
},
|
|
2644
|
+
TimeZoneSelect: {
|
|
2645
|
+
description: "Picks a time zone by place, region or offset — `chis`, `europe` and `+3` all find Chisinau — out of every zone the runtime knows, each with the offset it is at now.",
|
|
2646
|
+
import: "import TimeZoneSelect from '@box-kite/react/components/timeZoneSelect';",
|
|
2647
|
+
slots: ["label", "emptyText"],
|
|
2648
|
+
events: ["onValueChange"],
|
|
2649
|
+
props: {
|
|
2650
|
+
value: {
|
|
2651
|
+
anyOf: [{ type: "string" }],
|
|
2652
|
+
description: "The chosen IANA zone (`Europe/Chisinau`, `UTC`), or `null`."
|
|
2653
|
+
},
|
|
2654
|
+
defaultValue: {
|
|
2655
|
+
anyOf: [{ type: "string" }],
|
|
2656
|
+
description: "The zone it starts with when it owns its state."
|
|
2657
|
+
},
|
|
2658
|
+
zones: {
|
|
2659
|
+
type: "array",
|
|
2660
|
+
items: { type: "string" },
|
|
2661
|
+
description: "Only these zones, in IANA names."
|
|
2662
|
+
},
|
|
2663
|
+
placeholder: {
|
|
2664
|
+
type: "string",
|
|
2665
|
+
description: "The field's placeholder."
|
|
2666
|
+
},
|
|
2667
|
+
name: {
|
|
2668
|
+
type: "string",
|
|
2669
|
+
description: "What the zone posts under in a form."
|
|
2670
|
+
},
|
|
2671
|
+
disabled: {
|
|
2672
|
+
type: "boolean",
|
|
2673
|
+
description: "Not editable and not openable, but still read out."
|
|
2674
|
+
},
|
|
2675
|
+
props: {
|
|
2676
|
+
type: "object",
|
|
2677
|
+
description: "Attributes for the `<input>` itself — an `aria-label`, an `id`."
|
|
2678
|
+
}
|
|
2679
|
+
},
|
|
2680
|
+
required: [],
|
|
2681
|
+
styled: !0
|
|
2682
|
+
},
|
|
2683
|
+
DateTime: {
|
|
2684
|
+
description: "A date or a time, written for whoever is reading: in their language and on their wall clock, inside a real `<time datetime>` that keeps the exact value for a machine.",
|
|
2685
|
+
import: "import DateTime from '@box-kite/react/components/dateTime';",
|
|
2686
|
+
slots: ["default"],
|
|
2687
|
+
events: [],
|
|
2688
|
+
props: { locale: {
|
|
2689
|
+
type: "string",
|
|
2690
|
+
description: "The reader's language."
|
|
2691
|
+
} },
|
|
2692
|
+
required: [],
|
|
2693
|
+
styled: !0
|
|
2694
|
+
},
|
|
2174
2695
|
Combobox: {
|
|
2175
2696
|
description: "The APG editable combobox over a list of your own rows: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/",
|
|
2176
2697
|
import: "import Combobox from '@box-kite/react/components/combobox';",
|
package/client.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime.cjs"),t=require("./react-shared.cjs"),n=require("./platform.cjs"),r=require("./effects.cjs"),i=require("./box.cjs");let a=require("react");a=e.t(a,1);let o=require("@box-kite/core"),s=require("react/jsx-runtime"),c=require("react-dom");var l=`[box-kite] The client build was loaded into a React Server Component graph, where React has no createContext. Import '@box-kite/react' by its package name — the react-server condition resolves it to a Box that renders on the server — and import the components that hold state (Dropdown, Tooltip, DataGrid, Checkbox, Select, Form) from a 'use client' module. See https://github.com/box-kite/box-kite#react-server-components-react-19`;function u(e){if(typeof e.createContext!=`function`)throw Error(l)}u(a.default);var d=a.default.createContext(void 0);function f({value:e,children:t}){return(0,s.jsx)(d.Provider,{value:e,children:t})}function p(e){let{node:t=null,event:r=`click`,hideOnScroll:i=!1,hideOnResize:o=!1,hideOnEscape:s=!0}=e??{},[c,l]=(0,a.useState)(!1),u=(0,a.useRef)(null);return(0,a.useEffect)(()=>{function e(e){let r=t??u.current;r&&!n.u(e,[r])&&l(!1)}function a(){l(!1)}function d(e){e.key===`Escape`&&l(!1)}let f=new AbortController;return c&&(window.addEventListener(r,e,f),s&&window.addEventListener(`keydown`,d,f),o&&window.addEventListener(`resize`,a,f),i&&window.addEventListener(`scroll`,e,{signal:f.signal,capture:!0})),()=>{f.abort()}},[t,c,r,s,o,i]),[c,l,u]}var m=r.t;function h(e,n){let{classNames:r,signature:i,styleElements:s}=t.l(e,n,(0,a.useContext)(d));return m(()=>{(0,o.getDefaultEngine)().flushSync()},[i??e]),{classNames:r,styleElements:s}}function g(e,n){let r=e?(0,o.getDefaultEngine)().addGlobalStyles(e,n):void 0;return m(()=>{(0,o.getDefaultEngine)().flushSync()},[e,n]),t.u(r)}var _;(function(e){function t(){(0,o.getDefaultEngine)().flushSync()}e.flushSync=t;function n(){(0,o.getDefaultEngine)().clear()}e.clear=n;function r(){return(0,o.getDefaultEngine)().getStyles()}e.getStyles=r;function i(){return(0,o.getDefaultEngine)().getStyleTag()}e.getStyleTag=i;function a(){return(0,o.getDefaultEngine)().styleElementId}e.styleElementId=a;function s(e){(0,o.getDefaultEngine)().configure(e)}e.configure=s})(_||={}),u(a.default);var v=a.default.createContext({theme:``,setTheme:()=>{}});function y(e){let{theme:t,use:n=`local`,storageKey:l,globalStyles:u,viewTransition:d,components:p}=e,
|
|
1
|
+
const e=require("./rolldown-runtime.cjs"),t=require("./react-shared.cjs"),n=require("./platform.cjs"),r=require("./effects.cjs"),i=require("./box.cjs");let a=require("react");a=e.t(a,1);let o=require("@box-kite/core"),s=require("react/jsx-runtime"),c=require("react-dom");var l=`[box-kite] The client build was loaded into a React Server Component graph, where React has no createContext. Import '@box-kite/react' by its package name — the react-server condition resolves it to a Box that renders on the server — and import the components that hold state (Dropdown, Tooltip, DataGrid, Checkbox, Select, Form) from a 'use client' module. See https://github.com/box-kite/box-kite#react-server-components-react-19`;function u(e){if(typeof e.createContext!=`function`)throw Error(l)}u(a.default);var d=a.default.createContext(void 0);function f({value:e,children:t}){return(0,s.jsx)(d.Provider,{value:e,children:t})}function p(e){let{node:t=null,event:r=`click`,hideOnScroll:i=!1,hideOnResize:o=!1,hideOnEscape:s=!0}=e??{},[c,l]=(0,a.useState)(!1),u=(0,a.useRef)(null);return(0,a.useEffect)(()=>{function e(e){let r=t??u.current;r&&!n.u(e,[r])&&l(!1)}function a(){l(!1)}function d(e){e.key===`Escape`&&l(!1)}let f=new AbortController;return c&&(window.addEventListener(r,e,f),s&&window.addEventListener(`keydown`,d,f),o&&window.addEventListener(`resize`,a,f),i&&window.addEventListener(`scroll`,e,{signal:f.signal,capture:!0})),()=>{f.abort()}},[t,c,r,s,o,i]),[c,l,u]}var m=r.t;function h(e,n){let{classNames:r,signature:i,styleElements:s}=t.l(e,n,(0,a.useContext)(d));return m(()=>{(0,o.getDefaultEngine)().flushSync()},[i??e]),{classNames:r,styleElements:s}}function g(e,n){let r=e?(0,o.getDefaultEngine)().addGlobalStyles(e,n):void 0;return m(()=>{(0,o.getDefaultEngine)().flushSync()},[e,n]),t.u(r)}var _;(function(e){function t(){(0,o.getDefaultEngine)().flushSync()}e.flushSync=t;function n(){(0,o.getDefaultEngine)().clear()}e.clear=n;function r(){return(0,o.getDefaultEngine)().getStyles()}e.getStyles=r;function i(){return(0,o.getDefaultEngine)().getStyleTag()}e.getStyleTag=i;function a(){return(0,o.getDefaultEngine)().styleElementId}e.styleElementId=a;function s(e){(0,o.getDefaultEngine)().configure(e)}e.configure=s})(_||={}),u(a.default);var v=a.default.createContext({theme:``,setTheme:()=>{},setDesign:()=>{}});function y(e){let{theme:t,use:n=`local`,storageKey:l,globalStyles:u,viewTransition:d,components:p,design:m,designStorageKey:h}=e,_=p?(0,s.jsx)(f,{value:p,children:e.children}):e.children,y=g(n===`global`?u:void 0,`html`),[b,x]=(0,a.useState)(t??o.defaultThemeName),[S,C]=(0,a.useState)(t!==void 0),w=(0,a.useRef)(null),T=(0,a.useRef)(b),E=(0,a.useRef)(null),D=(0,a.useRef)(null),O=(0,a.useRef)(void 0),k=(0,a.useCallback)(e=>{if(!d)return e();let t=(0,o.transitionTheme)(()=>(0,c.flushSync)(e),d===`reveal`?`reveal`:`fade`);O.current=t.finished,t.finished.then(()=>O.current=void 0,()=>O.current=void 0)},[d]),A=(0,a.useCallback)(e=>k(()=>{e===null?(l&&(0,o.clearStoredTheme)(l),C(!1)):(l&&(0,o.writeStoredTheme)(l,e),x(e),C(!0))}),[l,k]),[j,M]=(0,a.useState)(m),[N,P]=(0,a.useState)(m);m!==N&&(P(m),M(m));let F=(0,a.useCallback)(e=>k(()=>{D.current??=(0,o.pauseTransitions)(),h&&(e===null?o.clearStoredTheme:o.writeStoredTheme)(h,e),M(e??m)}),[m,h,k]),I=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{let e=h?(0,o.readStoredTheme)(h):null;e&&(I.current=e,M(e))},[h]),(0,a.useLayoutEffect)(()=>{if(I.current!==null&&I.current!==j)return;I.current=null;let e=n===`global`&&j?(0,o.documentRoot)():null,t=e?(0,o.applyDesignToElement)(e,j):void 0;return D.current?.(O.current),D.current=null,t},[j,n]);let L=d===`reveal`;(0,a.useEffect)(()=>L?(0,o.prepareReveal)():void 0,[L]);let[R,z]=(0,a.useState)(t);t!==R&&(z(t),t===void 0?C(!1):(x(t),C(!0))),(0,a.useLayoutEffect)(()=>{if(S)return;let e=l?(0,o.readStoredTheme)(l):null,t=e??(0,o.getSystemTheme)();if(t!==T.current&&(w.current=t),x(t),e){C(!0);return}return(0,o.watchSystemTheme)(x)},[S,l]),r.t(()=>{b!==T.current&&(E.current??=(0,o.pauseTransitions)())},[b]),(0,a.useLayoutEffect)(()=>{if(T.current=b,w.current!==null&&w.current!==b)return;w.current=null;let e=E.current;E.current=null;let t=n===`global`?(0,o.documentRoot)():null,r=t?(0,o.applyThemeToElement)(t,b):void 0;return e?.(O.current),r},[b,n]);let B=(0,a.useMemo)(()=>({theme:b,setTheme:A,design:j,setDesign:F}),[b,A,j,F]);return n===`local`?(0,s.jsxs)(v.Provider,{value:B,children:[y,(0,s.jsx)(i.default,{className:b,props:{"data-theme":b,"data-design":j},children:_})]}):(0,s.jsxs)(v.Provider,{value:B,children:[y,_]})}(function(e){function t(){let{theme:e,setTheme:t}=(0,a.useContext)(v);return[e,t]}e.useTheme=t;function n(){let{design:e,setDesign:t}=(0,a.useContext)(v);return[e,t]}e.useDesign=n})(y||={});var b=y,x=new WeakMap;function S(e){let t=x.get(e);return t||(t=new Map,x.set(e,t)),t}function C(e=!0){let[t]=b.useTheme(),r=(0,a.useMemo)(()=>{if(!e)return null;let t=n.t();if(!t)return null;let r=`box-kite-portal`,i=t.getElementById(r);return i||(i=document.createElement(`div`),i.id=r,document.body.appendChild(i)),i},[e]);return(0,a.useLayoutEffect)(()=>{if(!t||!r)return;let e=S(r),n=e.get(t)??0;return e.set(t,n+1),n===0&&r.classList.add(t),()=>{let n=(e.get(t)??1)-1;n<=0?(e.delete(t),r.classList.remove(t)):e.set(t,n)}},[r,t]),r}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return C}});
|