@godxjp/ui 21.0.0 → 22.0.0
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/dist/app/app-provider.js +2 -1
- package/dist/components/data-display/badge.d.ts +28 -1
- package/dist/components/data-display/badge.js +2 -0
- package/dist/components/data-display/data-table.d.ts +18 -2
- package/dist/components/data-display/data-table.js +4 -0
- package/dist/components/data-display/index.d.ts +1 -1
- package/dist/components/data-display/popover.d.ts +19 -1
- package/dist/components/data-display/popover.js +9 -1
- package/dist/components/data-display/progress.d.ts +37 -0
- package/dist/components/data-display/progress.js +57 -5
- package/dist/components/data-entry/date-picker.d.ts +10 -3
- package/dist/components/data-entry/date-picker.js +503 -238
- package/dist/components/data-entry/form-field.d.ts +1 -1
- package/dist/components/data-entry/form-field.js +4 -1
- package/dist/components/data-entry/form.js +10 -1
- package/dist/components/data-entry/index.d.ts +0 -6
- package/dist/components/data-entry/index.js +0 -6
- package/dist/components/data-entry/label.d.ts +14 -1
- package/dist/components/data-entry/label.js +6 -1
- package/dist/components/data-entry/radio.d.ts +27 -6
- package/dist/components/data-entry/radio.js +88 -43
- package/dist/components/data-entry/search-select.js +8 -1
- package/dist/components/data-entry/select.js +2 -0
- package/dist/components/data-entry/switch.d.ts +6 -3
- package/dist/components/data-entry/switch.js +34 -11
- package/dist/components/layout/mobile-shell.d.ts +1 -1
- package/dist/components/layout/mobile-shell.js +2 -0
- package/dist/components/navigation/menubar.d.ts +10 -3
- package/dist/components/navigation/steps.d.ts +1 -1
- package/dist/components/navigation/steps.js +3 -1
- package/dist/components/navigation/tabs-scroll.d.ts +27 -0
- package/dist/components/navigation/tabs-scroll.js +52 -1
- package/dist/components/navigation/tabs.d.ts +2 -2
- package/dist/components/navigation/tabs.js +88 -23
- package/dist/components/ui/index.d.ts +0 -1
- package/dist/components/ui/index.js +0 -1
- package/dist/components/ui/segmented.d.ts +15 -1
- package/dist/components/ui/segmented.js +13 -6
- package/dist/i18n/messages/en.json +3 -2
- package/dist/i18n/messages/ja.json +3 -2
- package/dist/i18n/messages/vi.json +3 -2
- package/dist/lib/datetime/picker-format.d.ts +18 -0
- package/dist/lib/datetime/picker-format.js +35 -1
- package/dist/lib/field-a11y.d.ts +12 -0
- package/dist/lib/field-a11y.js +14 -1
- package/dist/props/components/data-display.prop.d.ts +7 -0
- package/dist/props/components/data-entry.prop.d.ts +180 -99
- package/dist/props/components/index.d.ts +1 -1
- package/dist/props/components/layout.prop.d.ts +12 -1
- package/dist/props/components/navigation.prop.d.ts +76 -1
- package/dist/props/registry.d.ts +16 -16
- package/dist/props/registry.js +16 -15
- package/dist/props/vocabulary/data.prop.d.ts +12 -0
- package/dist/props/vocabulary/index.d.ts +2 -2
- package/dist/props/vocabulary/layout.prop.d.ts +11 -0
- package/dist/styles/badge-layout.css +4 -0
- package/dist/styles/card-layout.css +6 -6
- package/dist/styles/control.css +15 -6
- package/dist/styles/data-display-layout.css +76 -13
- package/dist/styles/focus-ring.css +4 -2
- package/dist/styles/navigation-layout.css +25 -0
- package/dist/styles/shell-layout.css +5 -0
- package/dist/styles/table-layout.css +34 -0
- package/dist/tokens/components/data-display.css +9 -0
- package/dist/tokens/components/navigation.css +6 -0
- package/dist/tokens/components/segmented.css +0 -2
- package/dist/tokens/components/shell.css +2 -0
- package/dist/tokens/components/table.css +3 -0
- package/dist/tokens/foundation.css +7 -0
- package/docs/COMPONENTS.md +14 -14
- package/docs/CONSUMER-RULES.md +24 -1
- package/docs/FRAME-COVERAGE-REPORT.md +3 -6
- package/docs/TOKENS.md +65 -0
- package/docs/data-display/badge.tsx +37 -0
- package/docs/data-display/data-table/index.tsx +18 -0
- package/docs/data-display/popover.tsx +41 -1
- package/docs/data-display/progress.tsx +28 -0
- package/docs/data-entry/calendar.tsx +2 -2
- package/docs/data-entry/date-picker.tsx +143 -3
- package/docs/data-entry/form/examples/invoice-form.tsx +2 -2
- package/docs/data-entry/form-field/examples/a11y-contract.tsx +3 -5
- package/docs/data-entry/form.tsx +4 -4
- package/docs/data-entry/number-input.tsx +31 -0
- package/docs/data-entry/segmented.tsx +103 -1
- package/docs/layout/mobile-shell.tsx +5 -0
- package/docs/navigation/tabs.tsx +149 -0
- package/docs/roadmap/antd-parity.md +35 -34
- package/docs/roadmap/parity-audit-data-entry.md +178 -165
- package/docs/roadmap/parity-backlog.md +6 -7
- package/docs/showcase/acme-portal.tsx +7 -0
- package/package.json +11 -23
- package/scripts/ui-audit.mjs +17 -4
- package/dist/components/data-entry/date-range-picker.d.ts +0 -11
- package/dist/components/data-entry/date-range-picker.js +0 -349
- package/dist/components/data-entry/month-picker.d.ts +0 -10
- package/dist/components/data-entry/month-picker.js +0 -241
- package/dist/components/data-entry/month-range-picker.d.ts +0 -10
- package/dist/components/data-entry/month-range-picker.js +0 -301
- package/dist/components/ui/date-range-picker.d.ts +0 -1
- package/dist/components/ui/date-range-picker.js +0 -2
- package/docs/data-entry/date-range-picker.tsx +0 -175
- package/docs/data-entry/month-picker.tsx +0 -101
- package/docs/data-entry/month-range-picker.tsx +0 -115
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/** Data Entry component prop types — @see docs/COMPONENTS.md#data-entry */
|
|
2
|
-
import type * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
|
-
import type * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
4
2
|
import type * as SliderPrimitive from "@radix-ui/react-slider";
|
|
5
|
-
import type * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
6
3
|
import type { RenderProps as InputOTPRenderProps } from "input-otp";
|
|
7
4
|
import type { DayPickerProps } from "react-day-picker";
|
|
8
5
|
import type { DateRange } from "react-day-picker";
|
|
@@ -285,6 +282,22 @@ export type FormFieldProp = {
|
|
|
285
282
|
label: LabelProp;
|
|
286
283
|
required?: RequiredProp;
|
|
287
284
|
helper?: HelperProp;
|
|
285
|
+
/**
|
|
286
|
+
* Which side of the control the helper line sits on — `after` (default, under the input) or
|
|
287
|
+
* `before` (between the label and the input).
|
|
288
|
+
*
|
|
289
|
+
* `before` is for a helper the reader needs BEFORE they answer rather than after: the
|
|
290
|
+
* secondary language of a bilingual form, a unit or format note, a pick-one-of-these
|
|
291
|
+
* preamble. `labelAddon` cannot carry that — it is an inline row beside the label with no
|
|
292
|
+
* wrap, sized for a chip or a help button, so a full sentence squeezes the label instead of
|
|
293
|
+
* taking its own line. Putting the second line inside `label` does work, but costs the
|
|
294
|
+
* string-label fallbacks (`aria-label`, `FieldNameContext`), which fire only when `label` is
|
|
295
|
+
* a plain string.
|
|
296
|
+
*
|
|
297
|
+
* Paint only: the helper keeps its id and stays on the control's `aria-describedby`, so this
|
|
298
|
+
* never changes what a screen reader reads or the order it reads it in.
|
|
299
|
+
*/
|
|
300
|
+
helperPlacement?: "before" | "after";
|
|
288
301
|
error?: ErrorProp;
|
|
289
302
|
validateStatus?: "success" | "warning" | "error" | "validating";
|
|
290
303
|
hasFeedback?: boolean;
|
|
@@ -316,6 +329,22 @@ export type FormFieldProp = {
|
|
|
316
329
|
label: LabelProp;
|
|
317
330
|
required?: RequiredProp;
|
|
318
331
|
helper?: HelperProp;
|
|
332
|
+
/**
|
|
333
|
+
* Which side of the control the helper line sits on — `after` (default, under the input) or
|
|
334
|
+
* `before` (between the label and the input).
|
|
335
|
+
*
|
|
336
|
+
* `before` is for a helper the reader needs BEFORE they answer rather than after: the
|
|
337
|
+
* secondary language of a bilingual form, a unit or format note, a pick-one-of-these
|
|
338
|
+
* preamble. `labelAddon` cannot carry that — it is an inline row beside the label with no
|
|
339
|
+
* wrap, sized for a chip or a help button, so a full sentence squeezes the label instead of
|
|
340
|
+
* taking its own line. Putting the second line inside `label` does work, but costs the
|
|
341
|
+
* string-label fallbacks (`aria-label`, `FieldNameContext`), which fire only when `label` is
|
|
342
|
+
* a plain string.
|
|
343
|
+
*
|
|
344
|
+
* Paint only: the helper keeps its id and stays on the control's `aria-describedby`, so this
|
|
345
|
+
* never changes what a screen reader reads or the order it reads it in.
|
|
346
|
+
*/
|
|
347
|
+
helperPlacement?: "before" | "after";
|
|
319
348
|
error?: ErrorProp;
|
|
320
349
|
validateStatus?: "success" | "warning" | "error" | "validating";
|
|
321
350
|
hasFeedback?: boolean;
|
|
@@ -386,8 +415,20 @@ export type SearchInputProp = FieldA11yProps & {
|
|
|
386
415
|
/** Chrome level — antd `variant`. Default `outlined`. */
|
|
387
416
|
variant?: ControlVariantProp;
|
|
388
417
|
};
|
|
389
|
-
/**
|
|
390
|
-
|
|
418
|
+
/**
|
|
419
|
+
* @see Checkbox
|
|
420
|
+
*
|
|
421
|
+
* Public shape unchanged from the @radix-ui/react-checkbox era — `checked` / `defaultChecked` take
|
|
422
|
+
* the tri-state `"indeterminate"`, `onCheckedChange` reports it back, and `disabled` / `required`
|
|
423
|
+
* keep their HTML spelling. checkbox.tsx translates all of it to react-aria's `isSelected` /
|
|
424
|
+
* `isIndeterminate` / `onChange` / `isDisabled`; none of those names reach a consumer. Written out
|
|
425
|
+
* here rather than derived from a primitive that the component no longer uses.
|
|
426
|
+
*/
|
|
427
|
+
export type CheckboxProp = Omit<React.ComponentPropsWithoutRef<"button">, "checked" | "defaultChecked" | "onChange"> & {
|
|
428
|
+
checked?: boolean | "indeterminate";
|
|
429
|
+
defaultChecked?: boolean | "indeterminate";
|
|
430
|
+
onCheckedChange?: (checked: boolean | "indeterminate") => void;
|
|
431
|
+
required?: boolean;
|
|
391
432
|
/**
|
|
392
433
|
* antd `indeterminate` — paint the PARTIAL mark (a dash) without changing `checked`. Radix
|
|
393
434
|
* spells the same state as `checked="indeterminate"`; this is the antd spelling of it, and the
|
|
@@ -442,10 +483,30 @@ export type RadioGroupProp = FieldA11yProps & {
|
|
|
442
483
|
export type RadioOptionTypeProp = "default" | "button";
|
|
443
484
|
/** antd `RadioGroupButtonStyle` — the selected button is outlined, or filled with the brand. */
|
|
444
485
|
export type RadioButtonStyleProp = "outline" | "solid";
|
|
445
|
-
/**
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
486
|
+
/**
|
|
487
|
+
* @see Radio.Item
|
|
488
|
+
*
|
|
489
|
+
* Public shape unchanged from the @radix-ui/react-radio-group era — `value` / `disabled` keep
|
|
490
|
+
* their HTML spelling; react-aria's `isDisabled` never reaches a consumer.
|
|
491
|
+
*/
|
|
492
|
+
export type RadioProp = Omit<React.ComponentPropsWithoutRef<"button">, "value"> & {
|
|
493
|
+
value: string;
|
|
494
|
+
};
|
|
495
|
+
/**
|
|
496
|
+
* @see Switch
|
|
497
|
+
*
|
|
498
|
+
* The PUBLIC shape is unchanged from the @radix-ui/react-switch era — `checked` /
|
|
499
|
+
* `defaultChecked` / `onCheckedChange` / `disabled` / `required` keep their HTML spelling.
|
|
500
|
+
* react-aria-components spells the same five `isSelected` / `defaultSelected` / `onChange` /
|
|
501
|
+
* `isDisabled`, and that translation happens inside `switch.tsx`; none of those names reach a
|
|
502
|
+
* consumer. Written out here rather than derived from a primitive so the surface stops moving
|
|
503
|
+
* whenever the base does.
|
|
504
|
+
*/
|
|
505
|
+
export type SwitchProp = Omit<React.ComponentPropsWithoutRef<"button">, "checked" | "defaultChecked" | "onChange" | "value"> & {
|
|
506
|
+
checked?: boolean;
|
|
507
|
+
defaultChecked?: boolean;
|
|
508
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
509
|
+
required?: boolean;
|
|
449
510
|
size?: "sm" | "md";
|
|
450
511
|
/**
|
|
451
512
|
* antd `loading` — the toggle is mid-flight: a spinner replaces the thumb glyph and the control
|
|
@@ -579,28 +640,90 @@ export type PickerChromeProp = {
|
|
|
579
640
|
};
|
|
580
641
|
/** date-fns pattern, Intl options (including Japanese era), or a display function. */
|
|
581
642
|
export type PickerDateFormatProp = string | Intl.DateTimeFormatOptions | ((date: Date) => string);
|
|
582
|
-
/**
|
|
643
|
+
/**
|
|
644
|
+
* @see DatePicker — ONE date control for every date-shaped question this library used to ask with
|
|
645
|
+
* four components (`DatePicker`, `DateRangePicker`, `MonthPicker`, `MonthRangePicker`).
|
|
646
|
+
*
|
|
647
|
+
* Two axes, both antd's: `picker` chooses the GRANULARITY of a selection, `range` chooses its
|
|
648
|
+
* CARDINALITY. Everything else — bounds, disabling, formatting, clearing, the open triad, the
|
|
649
|
+
* chrome ladder — is written once and therefore behaves the same on all eight combinations.
|
|
650
|
+
*
|
|
651
|
+
* ON THE NAME `picker`. It is antd's own prop name for this axis, and it already shipped here with
|
|
652
|
+
* exactly this union, so keeping it renames nothing and breaks no call site. (`granularity` is
|
|
653
|
+
* react-aria's spelling; this cluster is not on react-aria.) The house rule stated on `TreeProp` —
|
|
654
|
+
* map Ant's KEY-SHAPED names onto this package's controlled vocabulary and do not re-spell the
|
|
655
|
+
* rest — is what the surrounding props already do: `showTime`, `needConfirm`, `allowClear`,
|
|
656
|
+
* `cellRender`, `disabledDate`, `inputReadOnly`, `preserveInvalidOnBlur`, `renderExtraFooter`,
|
|
657
|
+
* `presets`, `order`, `minDate`/`maxDate` are all spelled antd's way, while selection is spelled
|
|
658
|
+
* `value`/`defaultValue`/`onValueChange` rather than antd's `onChange`.
|
|
659
|
+
*/
|
|
583
660
|
export type DatePickerBaseProp = FieldA11yProps & PickerChromeProp & {
|
|
584
661
|
/** Display format; native submission remains ISO. */
|
|
585
662
|
format?: PickerDateFormatProp;
|
|
586
663
|
/** Parser for a custom display function or Intl era display; ISO always remains accepted. */
|
|
587
664
|
parseFormat?: (text: string) => Date | undefined;
|
|
665
|
+
/**
|
|
666
|
+
* Selectable bounds, inclusive, at day precision (antd `minDate`/`maxDate`).
|
|
667
|
+
*
|
|
668
|
+
* These are the ONLY bounds props. `MonthPicker`/`MonthRangePicker` used to take
|
|
669
|
+
* `fromYear`/`toYear` numbers instead, which expressed strictly less (a whole year is the
|
|
670
|
+
* smallest thing they could say) and — measurably — clamped nothing: they only greyed the
|
|
671
|
+
* grid's year chevrons, while both routes into the value, the grid cells and the typed text,
|
|
672
|
+
* ignored them. `minDate`/`maxDate` are enforced on BOTH routes for every `picker`, so the
|
|
673
|
+
* keyboard is not a way around the rule the mouse obeys. Migration is mechanical:
|
|
674
|
+
* `fromYear={2024}` → `minDate={new Date(2024, 0, 1)}`, `toYear={2027}` →
|
|
675
|
+
* `maxDate={new Date(2027, 11, 31)}`.
|
|
676
|
+
*/
|
|
588
677
|
minDate?: Date;
|
|
589
678
|
maxDate?: Date;
|
|
590
679
|
showWeek?: boolean;
|
|
591
680
|
needConfirm?: boolean;
|
|
681
|
+
/**
|
|
682
|
+
* Which period the PANEL opens on, independently of the value (antd `defaultPickerValue`, and
|
|
683
|
+
* like antd's it is RE-APPLIED every time the panel opens rather than only at mount).
|
|
684
|
+
*
|
|
685
|
+
* Without it a panel can only open on the value or on today, so "open on the fiscal year's
|
|
686
|
+
* start month" and "open on the month of the row being edited" have no expression — the two
|
|
687
|
+
* cases the parity audit files as P1. Only the period matters; the day is ignored.
|
|
688
|
+
*/
|
|
689
|
+
defaultPickerValue?: Date;
|
|
690
|
+
/** Controlled panel period (antd `pickerValue`) — wins over `defaultPickerValue` and over the value. */
|
|
691
|
+
pickerValue?: Date;
|
|
692
|
+
/**
|
|
693
|
+
* GRANULARITY of one selection (antd `picker`). `date` picks a day from a month grid; `week`
|
|
694
|
+
* picks a day and normalises it to the locale's week start; `month`, `quarter` and `year` swap
|
|
695
|
+
* the day grid for a period grid and normalise to the period's first day.
|
|
696
|
+
*
|
|
697
|
+
* The emitted value is always a `Date` at the START of the chosen period, so a coarse
|
|
698
|
+
* selection interoperates with a fine one and with `DateRange`.
|
|
699
|
+
*/
|
|
592
700
|
picker?: "date" | "week" | "month" | "quarter" | "year";
|
|
701
|
+
/**
|
|
702
|
+
* Normalise the selection into ascending order (antd `order`; default `true`).
|
|
703
|
+
*
|
|
704
|
+
* ONE rule, applied to whichever value shape is in play: a `range` whose endpoints were picked
|
|
705
|
+
* backwards is SWAPPED, and a `multiple` selection is SORTED. The four split components spelled
|
|
706
|
+
* this two ways — `DatePicker.order` sorted an array, `DateRangePicker.order` swapped a pair,
|
|
707
|
+
* `MonthRangePicker` swapped unconditionally with no prop at all — which read as a collision
|
|
708
|
+
* but is one invariant seen through three value shapes. Set `false` to keep pick order.
|
|
709
|
+
*/
|
|
593
710
|
order?: boolean;
|
|
594
711
|
showTime?: boolean | Pick<TimePickerProp, "hourStep" | "minuteStep" | "secondStep" | "showSeconds" | "use12Hours" | "disabledTime">;
|
|
595
|
-
presets?: {
|
|
596
|
-
label: React.ReactNode;
|
|
597
|
-
value: Date | (() => Date);
|
|
598
|
-
}[];
|
|
599
712
|
placeholder?: PlaceholderProp;
|
|
600
|
-
|
|
713
|
+
/**
|
|
714
|
+
* Inert control. With `range`, the TUPLE form `[from, to]` locks one endpoint and leaves the
|
|
715
|
+
* other editable (antd's RangePicker `disabled`) — "the start date is fixed by the contract,
|
|
716
|
+
* only the end is negotiable" is a real screen that a scalar cannot say. The tuple is
|
|
717
|
+
* meaningless without `range` and is ignored there.
|
|
718
|
+
*/
|
|
719
|
+
disabled?: DisabledProp | [boolean, boolean];
|
|
601
720
|
className?: ClassNameProp;
|
|
602
721
|
id?: IdProp;
|
|
603
|
-
/**
|
|
722
|
+
/**
|
|
723
|
+
* Form field name. Submits ISO-8601 at the precision `picker` selects — `2026-03-01` for
|
|
724
|
+
* `date`/`week`, `2026-03` for `month` and `quarter` (the period's first month), `2026` for
|
|
725
|
+
* `year`. With `range`, the pair submits as `${name}_from` / `${name}_to`.
|
|
726
|
+
*/
|
|
604
727
|
name?: NameProp;
|
|
605
728
|
locale?: DayPickerProps["locale"];
|
|
606
729
|
fromDate?: Date;
|
|
@@ -608,11 +731,11 @@ export type DatePickerBaseProp = FieldA11yProps & PickerChromeProp & {
|
|
|
608
731
|
/** Decorate a day cell — 祝日, a booked day, a deadline. @see CalendarCellRenderProp */
|
|
609
732
|
cellRender?: CalendarCellRenderProp;
|
|
610
733
|
/**
|
|
611
|
-
* Forbid individual dates by predicate — the rule `
|
|
734
|
+
* Forbid individual dates by predicate — the rule `minDate`/`maxDate` cannot express, because a
|
|
612
735
|
* business calendar is rarely one contiguous range: 土日, a closed accounting period, a 祝日, a
|
|
613
736
|
* day already fully booked.
|
|
614
737
|
*
|
|
615
|
-
* Applies to BOTH routes into the value. The
|
|
738
|
+
* Applies to BOTH routes into the value. The grid greys the cell out, and a date typed into
|
|
616
739
|
* the field is rejected the same way an unparseable one is — otherwise the keyboard becomes a
|
|
617
740
|
* way around the rule the mouse obeys.
|
|
618
741
|
*/
|
|
@@ -623,104 +746,50 @@ export type DatePickerBaseProp = FieldA11yProps & PickerChromeProp & {
|
|
|
623
746
|
*/
|
|
624
747
|
allowClear?: AllowClearProp;
|
|
625
748
|
} & Pick<CalendarFooterProp, "showToday" | "showClose">;
|
|
626
|
-
/**
|
|
749
|
+
/**
|
|
750
|
+
* CARDINALITY. One `Date`, an array of them, or a `DateRange` — each keeps its own callback type,
|
|
751
|
+
* so a consumer never has to narrow what it gets back.
|
|
752
|
+
*/
|
|
627
753
|
export type DatePickerProp = DatePickerBaseProp & ({
|
|
754
|
+
range?: false;
|
|
628
755
|
multiple?: false;
|
|
629
756
|
value?: Date;
|
|
630
757
|
defaultValue?: Date;
|
|
631
758
|
onValueChange?: (value: Date | undefined) => void;
|
|
759
|
+
presets?: {
|
|
760
|
+
label: React.ReactNode;
|
|
761
|
+
value: Date | (() => Date);
|
|
762
|
+
}[];
|
|
632
763
|
} | {
|
|
764
|
+
range?: false;
|
|
633
765
|
multiple: true;
|
|
634
766
|
value?: Date[];
|
|
635
767
|
defaultValue?: Date[];
|
|
636
768
|
onValueChange?: (value: Date[] | undefined) => void;
|
|
637
769
|
showTime?: false;
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
onValueChange?: OnValueChangeProp<Date | undefined>;
|
|
644
|
-
placeholder?: PlaceholderProp;
|
|
645
|
-
disabled?: DisabledProp;
|
|
646
|
-
className?: ClassNameProp;
|
|
647
|
-
id?: IdProp;
|
|
648
|
-
/** Form field name — submits the display text (`yyyy/MM`). */
|
|
649
|
-
name?: NameProp;
|
|
650
|
-
/** Clamp the year navigation (inclusive). */
|
|
651
|
-
fromYear?: number;
|
|
652
|
-
toYear?: number;
|
|
653
|
-
/**
|
|
654
|
-
* Show an inline ✕ to clear the value when one is set (default true). The OBJECT form
|
|
655
|
-
* additionally replaces the icon and/or the accessible label (antd `allowClear`).
|
|
656
|
-
*/
|
|
657
|
-
allowClear?: AllowClearProp;
|
|
658
|
-
/** Node appended below the month grid (antd `renderExtraFooter`). */
|
|
659
|
-
renderExtraFooter?: () => React.ReactNode;
|
|
660
|
-
};
|
|
661
|
-
/**
|
|
662
|
-
* @see MonthRangePicker — both edges are normalized to the FIRST day of their month
|
|
663
|
-
* (the `DateRange` shape is shared with DateRangePicker so ranges interop).
|
|
664
|
-
*/
|
|
665
|
-
export type MonthRangePickerProp = FieldA11yProps & PickerChromeProp & {
|
|
666
|
-
value?: ValueProp<DateRange>;
|
|
667
|
-
defaultValue?: DefaultValueProp<DateRange | undefined>;
|
|
668
|
-
onValueChange?: OnValueChangeProp<DateRange | undefined>;
|
|
669
|
-
placeholder?: PlaceholderProp;
|
|
670
|
-
disabled?: DisabledProp;
|
|
671
|
-
className?: ClassNameProp;
|
|
672
|
-
id?: IdProp;
|
|
673
|
-
/** Form field name — emits the range as `${name}_from` / `${name}_to` `yyyy/MM` fields. */
|
|
674
|
-
name?: NameProp;
|
|
675
|
-
/** Clamp the year navigation (inclusive). */
|
|
676
|
-
fromYear?: number;
|
|
677
|
-
toYear?: number;
|
|
770
|
+
presets?: {
|
|
771
|
+
label: React.ReactNode;
|
|
772
|
+
value: Date | (() => Date);
|
|
773
|
+
}[];
|
|
774
|
+
} | {
|
|
678
775
|
/**
|
|
679
|
-
*
|
|
680
|
-
*
|
|
776
|
+
* Two endpoints in one field — antd's `DatePicker.RangePicker`, which this library used to
|
|
777
|
+
* ship as two separate components (`DateRangePicker`, `MonthRangePicker`). It composes with
|
|
778
|
+
* `picker`, so a month range is `<DatePicker range picker="month" />`.
|
|
681
779
|
*/
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
/**
|
|
689
|
-
|
|
690
|
-
/** Parser for a custom display function or Intl era display; ISO always remains accepted. */
|
|
691
|
-
parseFormat?: (text: string) => Date | undefined;
|
|
692
|
-
minDate?: Date;
|
|
693
|
-
maxDate?: Date;
|
|
694
|
-
showWeek?: boolean;
|
|
695
|
-
needConfirm?: boolean;
|
|
780
|
+
range: true;
|
|
781
|
+
multiple?: false;
|
|
782
|
+
value?: DateRange;
|
|
783
|
+
defaultValue?: DateRange;
|
|
784
|
+
onValueChange?: (value: DateRange | undefined) => void;
|
|
785
|
+
showTime?: false;
|
|
786
|
+
/** Which endpoints may stay empty (antd `allowEmpty`), as `[from, to]`. */
|
|
787
|
+
allowEmpty?: [boolean, boolean];
|
|
696
788
|
presets?: {
|
|
697
789
|
label: React.ReactNode;
|
|
698
790
|
value: DateRange | (() => DateRange);
|
|
699
791
|
}[];
|
|
700
|
-
|
|
701
|
-
order?: boolean;
|
|
702
|
-
value?: ValueProp<DateRange>;
|
|
703
|
-
defaultValue?: DefaultValueProp<DateRange | undefined>;
|
|
704
|
-
onValueChange?: OnValueChangeProp<DateRange | undefined>;
|
|
705
|
-
placeholder?: PlaceholderProp;
|
|
706
|
-
disabled?: DisabledProp;
|
|
707
|
-
className?: ClassNameProp;
|
|
708
|
-
id?: IdProp;
|
|
709
|
-
/** Form field name — emits the range as `${name}_from` / `${name}_to` ISO `yyyy-MM-dd` fields. */
|
|
710
|
-
name?: NameProp;
|
|
711
|
-
locale?: DayPickerProps["locale"];
|
|
712
|
-
fromDate?: Date;
|
|
713
|
-
toDate?: Date;
|
|
714
|
-
/** Decorate a day cell — see `CalendarCellRenderProp`. */
|
|
715
|
-
cellRender?: CalendarCellRenderProp;
|
|
716
|
-
/** Forbid individual dates by predicate — see `DatePickerProp.disabledDate`. */
|
|
717
|
-
disabledDate?: (date: Date) => boolean;
|
|
718
|
-
/**
|
|
719
|
-
* antd `allowClear` — an inline ✕ that clears the range when one is set (default true). The
|
|
720
|
-
* OBJECT form additionally replaces the icon and/or the accessible label.
|
|
721
|
-
*/
|
|
722
|
-
allowClear?: AllowClearProp;
|
|
723
|
-
} & Pick<CalendarFooterProp, "showToday" | "showClose">;
|
|
792
|
+
});
|
|
724
793
|
/**
|
|
725
794
|
* Which times a TimePicker refuses, in antd's shape: one call returns the two predicates, so a
|
|
726
795
|
* consumer computing them from the same source (a start time, a shift window) does that work once
|
|
@@ -889,6 +958,18 @@ export type SearchSelectBaseProp = {
|
|
|
889
958
|
readOnly?: boolean;
|
|
890
959
|
/** Trigger height tier — forwarded to the underlying Button. Default matches Button's own default. */
|
|
891
960
|
size?: SizeProp;
|
|
961
|
+
/**
|
|
962
|
+
* Trigger width, the SAME axis `SelectTrigger` carries on the compound API — `full` (default,
|
|
963
|
+
* the width a field wants), `auto` (the width the current label wants), `bounded` (one width
|
|
964
|
+
* from `--control-bounded-width`, for a trigger whose value varies in length).
|
|
965
|
+
*
|
|
966
|
+
* It exists here because the two APIs are one component to a caller: `docs/CONSUMER-RULES.md`
|
|
967
|
+
* rule 5 tells everyone that "a Select outside a form takes `width=\"auto\"`", and until this
|
|
968
|
+
* prop existed that sentence was false for the `options` form — a filter bar with two of them
|
|
969
|
+
* stretched each to full width and stacked them, and the only way out was to wrap each in a
|
|
970
|
+
* `<Flex width={280}>`.
|
|
971
|
+
*/
|
|
972
|
+
width?: ControlWidthProp;
|
|
892
973
|
/**
|
|
893
974
|
* Validation status (antd `status`). `error` recolours the trigger AND sets `aria-invalid`;
|
|
894
975
|
* `warning` recolours only. A `status` set here never overrides an `aria-invalid` arriving from
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { AppLauncherApp, AppLauncherGroup, AppLauncherLabels, AppLauncherProp, AppShellProp, AuthFooterProp, AuthIdentityProp, OrgSwitcherLabels, OrgSwitcherOrganization, OrgSwitcherProp, PageContainerProp, PageInsetProp, SidebarItemProp, SidebarProductProp, SidebarProp, SidebarSectionProp, TopbarProp, } from "./layout.prop.js";
|
|
2
2
|
export type { ButtonProp } from "./general.prop.js";
|
|
3
|
-
export type { InputProp, TextareaProp, FormFieldProp, SearchInputProp, CheckboxProp, CheckboxGroupProp, ChoiceOptionProp, RadioProp, RadioGroupProp, SwitchProp, SliderProp, CalendarProp, DatePickerProp,
|
|
3
|
+
export type { InputProp, TextareaProp, FormFieldProp, SearchInputProp, CheckboxProp, CheckboxGroupProp, ChoiceOptionProp, RadioProp, RadioGroupProp, SwitchProp, SliderProp, CalendarProp, DatePickerProp, TimePickerProp, ColorPickerProp, UploadProp, UploadFileItemProp, UploadVariantProp, TreeOptionProp, TreeFieldNamesProp, CascaderProp, TreeSelectProp, ShowCheckedStrategyProp, TransferProp, TransferItemProp, } from "./data-entry.prop.js";
|
|
4
4
|
export type { AvatarProp, EmptyStateProp, DescriptionsProp, DescriptionsItemProp, BadgeProp, DataTableProp, QrCodeProp, } from "./data-display.prop.js";
|
|
5
5
|
export type { ChartDatum, ChartSeriesProp, LineChartProp, BarChartProp, AreaChartProp, PieChartProp, } from "./charts.prop.js";
|
|
6
6
|
export type { AlertQueryErrorProp, AlertProp, AlertTitleProp, AlertContentProp, AlertDescriptionProp, AlertActionsProp, SheetResponsiveProp, SkeletonRowsProp, } from "./feedback.prop.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Layout component prop types — @see docs/COMPONENTS.md#layout */
|
|
2
2
|
import type * as React from "react";
|
|
3
3
|
import type { ComponentType, ReactNode, SVGProps } from "react";
|
|
4
|
-
import type { BreadcrumbProp, TitleProp, SubtitleProp, StatusProp, ExtraProp, FooterProp, PageDensityProp, PageContainerVariantProp, CenteredShellWidthProp, CenteredShellAlignProp, CenteredShellPresetProp, ErrorSurfaceModeProp, ErrorSurfaceStatusProp, AuthShellPresetProp, MobileShellHeightProp, OrientationProp, TextAlignProp, TextToneProp, BreakpointProp, GapProp, PadProp, PadRawProp, ClassNameProp, ChildrenProp, IdProp, DisabledProp, DescriptionProp, ActionProp, IconProp, HeadingLevelProp, ToneProp, WidthProp } from "../vocabulary/index.js";
|
|
4
|
+
import type { BreadcrumbProp, TitleProp, SubtitleProp, StatusProp, ExtraProp, FooterProp, PageDensityProp, PageContainerVariantProp, CenteredShellWidthProp, CenteredShellAlignProp, CenteredShellPresetProp, ErrorSurfaceModeProp, ErrorSurfaceStatusProp, AuthShellPresetProp, MobileShellHeightProp, MobileShellWidthProp, OrientationProp, TextAlignProp, TextToneProp, BreakpointProp, GapProp, PadProp, PadRawProp, ClassNameProp, ChildrenProp, IdProp, DisabledProp, DescriptionProp, ActionProp, IconProp, HeadingLevelProp, ToneProp, WidthProp } from "../vocabulary/index.js";
|
|
5
5
|
import type { EmptyStateToneProp } from "./data-display.prop.js";
|
|
6
6
|
/**
|
|
7
7
|
* Arrangement of the page header's title band and its `extra` slot below the 640px step.
|
|
@@ -505,6 +505,17 @@ export type MobileShellProp = {
|
|
|
505
505
|
* device-frame preview, a phone view embedded in a wider page).
|
|
506
506
|
*/
|
|
507
507
|
height?: MobileShellHeightProp;
|
|
508
|
+
/**
|
|
509
|
+
* How wide the shell is allowed to get. `"fill"` (default) takes the whole inline size it is
|
|
510
|
+
* given — a real handheld, where that IS the phone. `"phone"` caps it at
|
|
511
|
+
* `--mobile-shell-max-inline-size` and centres the column, for the case `height="fill"` already
|
|
512
|
+
* names on the other axis: a handheld screen rendered on a viewport wider than a handheld.
|
|
513
|
+
*
|
|
514
|
+
* Measured at a 1280px viewport before this axis existed: `max-inline-size: none`, shell 1232px
|
|
515
|
+
* wide, a four-destination tab bar spread across the whole screen. `height` had two named values
|
|
516
|
+
* for exactly these two contexts and `width` had none — the asymmetry was the bug.
|
|
517
|
+
*/
|
|
518
|
+
width?: MobileShellWidthProp;
|
|
508
519
|
className?: ClassNameProp;
|
|
509
520
|
};
|
|
510
521
|
/**
|
|
@@ -190,7 +190,19 @@ export type StepItemProp = {
|
|
|
190
190
|
*/
|
|
191
191
|
export type StepsTypeProp = "default" | "dot" | "inline" | "navigation";
|
|
192
192
|
/** @see Steps */
|
|
193
|
-
|
|
193
|
+
/**
|
|
194
|
+
* The rest of a native `<ol>`'s attributes ride through to the list element.
|
|
195
|
+
*
|
|
196
|
+
* Not a convenience: without them a consumer had no supported handle on the rendered list at all,
|
|
197
|
+
* so its browser test bound to `.ui-steps-list > li[data-status]` — an INTERNAL class and an
|
|
198
|
+
* internal data attribute, both of which this package is free to rename. A `data-testid` or an
|
|
199
|
+
* `id` on the component is what that test wanted, and every sibling primitive already forwards
|
|
200
|
+
* them.
|
|
201
|
+
*
|
|
202
|
+
* `aria-label` is the one exception: the list names itself from the locale, and a caller-supplied
|
|
203
|
+
* name wins — the same contract Progress and Toolbar follow.
|
|
204
|
+
*/
|
|
205
|
+
export type StepsProp = Omit<React.OlHTMLAttributes<HTMLOListElement>, "onChange" | "defaultValue" | "children" | "type"> & {
|
|
194
206
|
items?: StepItemProp[];
|
|
195
207
|
value?: number;
|
|
196
208
|
defaultValue?: number;
|
|
@@ -235,6 +247,17 @@ export type TabItemProp = {
|
|
|
235
247
|
closable?: boolean;
|
|
236
248
|
/** Ant Design `Tab.closeIcon` — replaces the default × on this item's remove button. */
|
|
237
249
|
closeIcon?: React.ReactNode;
|
|
250
|
+
/**
|
|
251
|
+
* Ant Design `Tab.forceRender`. Mounts THIS panel up front and keeps it mounted while another
|
|
252
|
+
* tab is selected, without turning that on for the whole strip the way `destroyOnHidden={false}`
|
|
253
|
+
* does — so the one panel holding a live chart, a scroll position or an unsent draft survives a
|
|
254
|
+
* tab switch while the rest are still destroyed.
|
|
255
|
+
*
|
|
256
|
+
* antd 5.25 also grew a per-item `destroyOnHidden`. It is NOT offered here: on this component
|
|
257
|
+
* "kept mounted" is a single state, so an item-level `destroyOnHidden: false` would be a second
|
|
258
|
+
* prop spelling exactly what `forceRender: true` already says (cardinal rule #32).
|
|
259
|
+
*/
|
|
260
|
+
forceRender?: boolean;
|
|
238
261
|
};
|
|
239
262
|
/**
|
|
240
263
|
* @see Tabs — trigger-strip appearance. This is Ant Design's `type` spelled in the library's own
|
|
@@ -264,6 +287,32 @@ export type TabsExtraProp = React.ReactNode | {
|
|
|
264
287
|
* commas, and an inline `(target, action) => void` leaks its second PARAMETER as a phantom prop.
|
|
265
288
|
*/
|
|
266
289
|
export type TabsOnEditProp = (target: string | React.MouseEvent<HTMLButtonElement>, action: "add" | "remove") => void;
|
|
290
|
+
/**
|
|
291
|
+
* @see Tabs — what the trigger strip does when there are more tabs than fit its container.
|
|
292
|
+
*
|
|
293
|
+
* This is Ant Design's `more`, mapped onto the `overflow` vocabulary this package already uses
|
|
294
|
+
* for the same question (`FilterBarOverflowProp` on Toolbar) rather than re-spelled: antd names
|
|
295
|
+
* the AFFORDANCE it happens to draw, this library names the BEHAVIOUR and owns the affordance.
|
|
296
|
+
*
|
|
297
|
+
* `scroll` (the default, and what every strip does today) keeps one bounded row that scrolls its
|
|
298
|
+
* own inline overflow, with `TabsList` re-pinning the active — or, under manual activation, the
|
|
299
|
+
* focused — trigger. `menu` keeps all of that AND puts a real button beside the strip listing the
|
|
300
|
+
* tabs currently outside the scrollport.
|
|
301
|
+
*
|
|
302
|
+
* WHERE THIS DELIBERATELY DIVERGES FROM ANTD, and why: antd REMOVES the overflowing tabs from the
|
|
303
|
+
* bar and re-homes them in the dropdown. The WAI-ARIA APG tab pattern requires the tablist to own
|
|
304
|
+
* every tab, and a tab hidden with `display: none` cannot take roving focus — so removing them
|
|
305
|
+
* would make the keyboard route to those tabs disappear along with the pixels. Here the strip
|
|
306
|
+
* still holds and still scrolls to every tab; the menu is an ADDITIONAL pointer route to the ones
|
|
307
|
+
* a mouse user cannot currently see. The APG wins; the affordance is kept.
|
|
308
|
+
*/
|
|
309
|
+
export type TabsOverflowProp = "scroll" | "menu";
|
|
310
|
+
/**
|
|
311
|
+
* @see Tabs — Ant Design `onTabClick`. A NAMED alias rather than an inline signature for the same
|
|
312
|
+
* reason as `TabsOnEditProp`: the catalog-sync guard splits an object type on top-level commas,
|
|
313
|
+
* so an inline `(value, event) => void` leaks its second PARAMETER as a phantom prop.
|
|
314
|
+
*/
|
|
315
|
+
export type TabsOnTabClickProp = (value: string, event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
267
316
|
/** @see Tabs — high-level tabs with optional `items` array. */
|
|
268
317
|
export type TabsProp = {
|
|
269
318
|
items?: TabItemProp[];
|
|
@@ -292,6 +341,32 @@ export type TabsProp = {
|
|
|
292
341
|
addIcon?: React.ReactNode;
|
|
293
342
|
/** Ant Design `hideAdd` — keep `editable-card`'s remove buttons but drop the add button. */
|
|
294
343
|
hideAdd?: boolean;
|
|
344
|
+
/**
|
|
345
|
+
* Ant Design `removeIcon` — the strip-wide default glyph on `editable-card`'s remove shortcut.
|
|
346
|
+
* A `TabItemProp.closeIcon` on one item still wins over it, which is antd's own precedence.
|
|
347
|
+
*/
|
|
348
|
+
closeIcon?: React.ReactNode;
|
|
349
|
+
/**
|
|
350
|
+
* Ant Design `more`. Default `scroll` — the behaviour every strip has today, unchanged.
|
|
351
|
+
* @see TabsOverflowProp for what `menu` adds and where it parts company with antd.
|
|
352
|
+
*
|
|
353
|
+
* The default is deliberately NOT `menu`: switching it would change the rendered bar for every
|
|
354
|
+
* existing consumer at once, and which of the two a dense strip wants is a service decision, not
|
|
355
|
+
* a library one.
|
|
356
|
+
*/
|
|
357
|
+
overflow?: TabsOverflowProp;
|
|
358
|
+
/**
|
|
359
|
+
* Ant Design `onTabClick`. Fires on EVERY pointer activation of a trigger — including a click on
|
|
360
|
+
* the tab that is already selected, where `onValueChange` is silent by design. That is the whole
|
|
361
|
+
* reason it is a separate prop and not a re-spelling of `onValueChange` (cardinal rule #32):
|
|
362
|
+
* "the user asked for this tab again" (re-fetch, close a drawer, scroll a panel back to the top)
|
|
363
|
+
* is a different event from "the selection changed".
|
|
364
|
+
*
|
|
365
|
+
* Keyboard activation is NOT routed here, and that is the APG winning over antd: under
|
|
366
|
+
* `activationMode="manual"` the arrow keys move focus without activating, so a key-driven
|
|
367
|
+
* "click" would be a fiction. Use `onValueChange` for selection, whatever moved it.
|
|
368
|
+
*/
|
|
369
|
+
onTabClick?: TabsOnTabClickProp;
|
|
295
370
|
className?: ClassNameProp;
|
|
296
371
|
listClassName?: ClassNameProp;
|
|
297
372
|
contentClassName?: ClassNameProp;
|
package/dist/props/registry.d.ts
CHANGED
|
@@ -244,6 +244,11 @@ export declare const VOCABULARY_REGISTRY: {
|
|
|
244
244
|
readonly category: "layout";
|
|
245
245
|
readonly description: "MobileShell block-size contract — viewport (100dvh root, the real app) | fill (fills a bounded parent, e.g. a device-frame preview)";
|
|
246
246
|
};
|
|
247
|
+
readonly MobileShellWidthProp: {
|
|
248
|
+
readonly file: "vocabulary/layout.prop.ts";
|
|
249
|
+
readonly category: "layout";
|
|
250
|
+
readonly description: "MobileShell inline-size contract — fill (takes the whole inline size, the default) | phone (caps at the handheld measure and centres, for a handheld screen on a wider viewport)";
|
|
251
|
+
};
|
|
247
252
|
readonly CenteredShellPresetProp: {
|
|
248
253
|
readonly file: "vocabulary/layout.prop.ts";
|
|
249
254
|
readonly category: "layout";
|
|
@@ -841,7 +846,7 @@ export declare const COMPONENT_PROP_REGISTRY: {
|
|
|
841
846
|
readonly MobileShellProp: {
|
|
842
847
|
readonly group: "layout";
|
|
843
848
|
readonly file: "components/layout.prop.ts";
|
|
844
|
-
readonly vocabulary: readonly ["ChildrenProp", "ClassNameProp", "ActionProp", "MobileShellHeightProp", {
|
|
849
|
+
readonly vocabulary: readonly ["ChildrenProp", "ClassNameProp", "ActionProp", "MobileShellHeightProp", "MobileShellWidthProp", {
|
|
845
850
|
readonly field: "header";
|
|
846
851
|
readonly local: true;
|
|
847
852
|
readonly reason: "MobileShell app-bar band — the screen title row; it absorbs the top safe-area inset when no statusBar precedes it.";
|
|
@@ -1304,21 +1309,6 @@ export declare const COMPONENT_PROP_REGISTRY: {
|
|
|
1304
1309
|
readonly file: "components/data-entry.prop.ts";
|
|
1305
1310
|
readonly vocabulary: readonly ["ValueProp", "OnValueChangeProp", "PlaceholderProp", "DisabledProp", "IdProp"];
|
|
1306
1311
|
};
|
|
1307
|
-
readonly MonthPickerProp: {
|
|
1308
|
-
readonly group: "data-entry";
|
|
1309
|
-
readonly file: "components/data-entry.prop.ts";
|
|
1310
|
-
readonly vocabulary: readonly ["ValueProp", "OnValueChangeProp", "PlaceholderProp", "DisabledProp", "IdProp"];
|
|
1311
|
-
};
|
|
1312
|
-
readonly MonthRangePickerProp: {
|
|
1313
|
-
readonly group: "data-entry";
|
|
1314
|
-
readonly file: "components/data-entry.prop.ts";
|
|
1315
|
-
readonly vocabulary: readonly ["ValueProp", "OnValueChangeProp", "PlaceholderProp", "DisabledProp", "IdProp"];
|
|
1316
|
-
};
|
|
1317
|
-
readonly DateRangePickerProp: {
|
|
1318
|
-
readonly group: "data-entry";
|
|
1319
|
-
readonly file: "components/data-entry.prop.ts";
|
|
1320
|
-
readonly vocabulary: readonly ["ValueProp", "OnValueChangeProp", "PlaceholderProp", "DisabledProp", "IdProp"];
|
|
1321
|
-
};
|
|
1322
1312
|
readonly CalendarCellRenderProp: {
|
|
1323
1313
|
readonly group: "data-entry";
|
|
1324
1314
|
readonly file: "components/data-entry.prop.ts";
|
|
@@ -2012,6 +2002,16 @@ export declare const COMPONENT_PROP_REGISTRY: {
|
|
|
2012
2002
|
readonly file: "components/navigation.prop.ts";
|
|
2013
2003
|
readonly vocabulary: readonly ["HandlerProp"];
|
|
2014
2004
|
};
|
|
2005
|
+
readonly TabsOnTabClickProp: {
|
|
2006
|
+
readonly group: "navigation";
|
|
2007
|
+
readonly file: "components/navigation.prop.ts";
|
|
2008
|
+
readonly vocabulary: readonly ["HandlerProp"];
|
|
2009
|
+
};
|
|
2010
|
+
readonly TabsOverflowProp: {
|
|
2011
|
+
readonly group: "navigation";
|
|
2012
|
+
readonly file: "components/navigation.prop.ts";
|
|
2013
|
+
readonly vocabulary: readonly [];
|
|
2014
|
+
};
|
|
2015
2015
|
readonly TabItemProp: {
|
|
2016
2016
|
readonly group: "navigation";
|
|
2017
2017
|
readonly file: "components/navigation.prop.ts";
|
package/dist/props/registry.js
CHANGED
|
@@ -242,6 +242,11 @@ const VOCABULARY_REGISTRY = {
|
|
|
242
242
|
category: "layout",
|
|
243
243
|
description: "MobileShell block-size contract \u2014 viewport (100dvh root, the real app) | fill (fills a bounded parent, e.g. a device-frame preview)"
|
|
244
244
|
},
|
|
245
|
+
MobileShellWidthProp: {
|
|
246
|
+
file: "vocabulary/layout.prop.ts",
|
|
247
|
+
category: "layout",
|
|
248
|
+
description: "MobileShell inline-size contract \u2014 fill (takes the whole inline size, the default) | phone (caps at the handheld measure and centres, for a handheld screen on a wider viewport)"
|
|
249
|
+
},
|
|
245
250
|
CenteredShellPresetProp: {
|
|
246
251
|
file: "vocabulary/layout.prop.ts",
|
|
247
252
|
category: "layout",
|
|
@@ -861,6 +866,7 @@ const COMPONENT_PROP_REGISTRY = {
|
|
|
861
866
|
"ClassNameProp",
|
|
862
867
|
"ActionProp",
|
|
863
868
|
"MobileShellHeightProp",
|
|
869
|
+
"MobileShellWidthProp",
|
|
864
870
|
{
|
|
865
871
|
field: "header",
|
|
866
872
|
local: true,
|
|
@@ -1472,21 +1478,6 @@ const COMPONENT_PROP_REGISTRY = {
|
|
|
1472
1478
|
file: "components/data-entry.prop.ts",
|
|
1473
1479
|
vocabulary: ["ValueProp", "OnValueChangeProp", "PlaceholderProp", "DisabledProp", "IdProp"]
|
|
1474
1480
|
},
|
|
1475
|
-
MonthPickerProp: {
|
|
1476
|
-
group: "data-entry",
|
|
1477
|
-
file: "components/data-entry.prop.ts",
|
|
1478
|
-
vocabulary: ["ValueProp", "OnValueChangeProp", "PlaceholderProp", "DisabledProp", "IdProp"]
|
|
1479
|
-
},
|
|
1480
|
-
MonthRangePickerProp: {
|
|
1481
|
-
group: "data-entry",
|
|
1482
|
-
file: "components/data-entry.prop.ts",
|
|
1483
|
-
vocabulary: ["ValueProp", "OnValueChangeProp", "PlaceholderProp", "DisabledProp", "IdProp"]
|
|
1484
|
-
},
|
|
1485
|
-
DateRangePickerProp: {
|
|
1486
|
-
group: "data-entry",
|
|
1487
|
-
file: "components/data-entry.prop.ts",
|
|
1488
|
-
vocabulary: ["ValueProp", "OnValueChangeProp", "PlaceholderProp", "DisabledProp", "IdProp"]
|
|
1489
|
-
},
|
|
1490
1481
|
CalendarCellRenderProp: {
|
|
1491
1482
|
group: "data-entry",
|
|
1492
1483
|
file: "components/data-entry.prop.ts",
|
|
@@ -2316,6 +2307,16 @@ const COMPONENT_PROP_REGISTRY = {
|
|
|
2316
2307
|
file: "components/navigation.prop.ts",
|
|
2317
2308
|
vocabulary: ["HandlerProp"]
|
|
2318
2309
|
},
|
|
2310
|
+
TabsOnTabClickProp: {
|
|
2311
|
+
group: "navigation",
|
|
2312
|
+
file: "components/navigation.prop.ts",
|
|
2313
|
+
vocabulary: ["HandlerProp"]
|
|
2314
|
+
},
|
|
2315
|
+
TabsOverflowProp: {
|
|
2316
|
+
group: "navigation",
|
|
2317
|
+
file: "components/navigation.prop.ts",
|
|
2318
|
+
vocabulary: []
|
|
2319
|
+
},
|
|
2319
2320
|
TabItemProp: {
|
|
2320
2321
|
group: "navigation",
|
|
2321
2322
|
file: "components/navigation.prop.ts",
|
|
@@ -100,6 +100,18 @@ export type SelectedIdsProp = Set<string>;
|
|
|
100
100
|
export type OnSelectChangeProp = (next: Set<string>) => void;
|
|
101
101
|
/** Table density change callback. */
|
|
102
102
|
export type OnTableDensityChangeProp = (density: TableDensityProp) => void;
|
|
103
|
+
/**
|
|
104
|
+
* A row's STATE, drawn as a leading-edge rail plus a wash — the same six tones, with the same
|
|
105
|
+
* names and the same meanings, that `Card accent` already carries. A row that needs attention and
|
|
106
|
+
* a card that needs attention should not be two vocabularies.
|
|
107
|
+
*
|
|
108
|
+
* It is a state, never a category: colour is not the only signal a row may carry (WCAG 1.4.1), so
|
|
109
|
+
* the reason still belongs in a cell — a Badge, a status column, an icon with a label. The rail
|
|
110
|
+
* is what makes that cell findable in a long table, not a replacement for it.
|
|
111
|
+
*/
|
|
112
|
+
export type TableRowToneProp = "primary" | "success" | "warning" | "info" | "attention" | "destructive";
|
|
113
|
+
/** Per-row tone resolver — return `undefined` for a row in the ordinary state. */
|
|
114
|
+
export type RowToneProp<T> = (row: T) => TableRowToneProp | undefined;
|
|
103
115
|
/** Sort change callback — undefined clears sort. */
|
|
104
116
|
export type OnSortChangeProp = (sort: {
|
|
105
117
|
key: string;
|