gridsmith-ui 0.17.2 → 0.18.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/README.md +19 -13
- package/dist/charts.d.ts +88 -24
- package/dist/charts.js +1043 -398
- package/dist/charts.js.map +1 -1
- package/dist/index.d.ts +48 -7
- package/dist/index.js +425 -230
- package/dist/index.js.map +1 -1
- package/dist/roots.css +14 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -294,8 +294,13 @@ interface SliderRangeProps {
|
|
|
294
294
|
* accent fill is hidden so the custom track stays fully visible.
|
|
295
295
|
*/
|
|
296
296
|
trackStyle?: CSSProperties;
|
|
297
|
+
/**
|
|
298
|
+
* The value in words, for a slider whose number alone means nothing ("Weekly" for 2): each thumb's aria-valuetext and
|
|
299
|
+
* the value shown beside the label (Sprint 25.9, A7; APG slider pattern). Leave it out and the number is shown and read.
|
|
300
|
+
*/
|
|
301
|
+
formatValue?: (value: number) => string;
|
|
297
302
|
}
|
|
298
|
-
declare function SliderRange({ value, onChange, min, max, step, disabled, showValue, className, ref, error, label, "aria-label": ariaLabel, "aria-describedby": describedByProp, trackStyle }: SliderRangeProps): react_jsx_runtime.JSX.Element;
|
|
303
|
+
declare function SliderRange({ value, onChange, min, max, step, disabled, showValue, className, ref, error, label, "aria-label": ariaLabel, "aria-describedby": describedByProp, trackStyle, formatValue }: SliderRangeProps): react_jsx_runtime.JSX.Element;
|
|
299
304
|
|
|
300
305
|
interface TimePickerProps {
|
|
301
306
|
value: string;
|
|
@@ -422,6 +427,9 @@ interface FieldProps {
|
|
|
422
427
|
* (aria-describedby), that the control is marked invalid, and that the error
|
|
423
428
|
* sits directly below the field (forms-002/006/009/010). Use one Field per
|
|
424
429
|
* control; do not add a separate <Label> or a label prop on the child.
|
|
430
|
+
*
|
|
431
|
+
* In a SettingsLayout panel a Field keeps the narrow page's reading width however wide the page is (the panel's
|
|
432
|
+
* --ds-form-max, Sprint 25.9); a `max-w-*` class of your own wins.
|
|
425
433
|
*/
|
|
426
434
|
declare function Field({ label, children, hint, error, required, labelAction, id: idProp, className }: FieldProps): react_jsx_runtime.JSX.Element;
|
|
427
435
|
|
|
@@ -469,6 +477,10 @@ interface FormWrapperProps {
|
|
|
469
477
|
* A function renders your own from the list.
|
|
470
478
|
*/
|
|
471
479
|
errorSummary?: boolean | ((errors: FormFieldError[]) => ReactNode);
|
|
480
|
+
/**
|
|
481
|
+
* Classes for the form. In a SettingsLayout panel the form keeps the narrow page's reading width however wide the
|
|
482
|
+
* page is (the panel's --ds-form-max, Sprint 25.9); a `max-w-*` class here wins.
|
|
483
|
+
*/
|
|
472
484
|
className?: string;
|
|
473
485
|
ref?: React.Ref<HTMLFormElement>;
|
|
474
486
|
}
|
|
@@ -588,7 +600,12 @@ interface DescriptionListProps {
|
|
|
588
600
|
columns?: 1 | 2 | 3 | 4;
|
|
589
601
|
size?: DescriptionListSize;
|
|
590
602
|
dividers?: boolean;
|
|
591
|
-
/**
|
|
603
|
+
/**
|
|
604
|
+
* A multi-column list re-flows by its own width (Sprint 25.9, A5): a column never gets narrower than a pair needs
|
|
605
|
+
* (20rem beside, 8rem stacked), so in a drawer, a pane or a settings panel it shows fewer columns, and one when a
|
|
606
|
+
* second will not fit. `stackBelow` adds a viewport rule on top: below this breakpoint the list is one column.
|
|
607
|
+
* Default "sm" when columns > 1 (a phone never shows two columns of pairs); "none" keeps the columns at every width.
|
|
608
|
+
*/
|
|
592
609
|
stackBelow?: "sm" | "md" | "lg" | "none";
|
|
593
610
|
className?: string;
|
|
594
611
|
}
|
|
@@ -661,9 +678,27 @@ interface TableProps {
|
|
|
661
678
|
onRowClick?: (row: Record<string, string | number | ReactNode>, index: number) => void;
|
|
662
679
|
/** Breakpoint at which the table switches to card layout. Defaults to "md" (768px). */
|
|
663
680
|
mobileBreakpoint?: BreakpointKey;
|
|
681
|
+
/**
|
|
682
|
+
* The table's title inside its frame (Sprint 25.9, A1): a heading in CardTitle's style at CardHeader's inset, in a band
|
|
683
|
+
* above the scroll area that never scrolls sideways, and the `<table>`'s name. Title a table this way or with a
|
|
684
|
+
* SectionHeading above it — the same way as the blocks beside it (page_composition#45). In card mode, and while it
|
|
685
|
+
* loads or is empty there, the same heading sits above the cards. Without a title the frame holds the scroll area
|
|
686
|
+
* alone.
|
|
687
|
+
*/
|
|
688
|
+
title?: string;
|
|
689
|
+
/** A line under the title, which also describes the `<table>` (aria-describedby). Needs `title`. */
|
|
690
|
+
description?: string;
|
|
691
|
+
/** The table's buttons, at the end of the title band as in a CardHeader. Needs `title`. */
|
|
692
|
+
actions?: ReactNode;
|
|
693
|
+
/**
|
|
694
|
+
* The table's name for assistive tech when it has no title (a title names a titled one): the `<table>`'s label, and
|
|
695
|
+
* its scroll region's while it scrolls, which is otherwise "Table". Two untitled tables on one page need a name each,
|
|
696
|
+
* or their regions share one (Sprint 25.10 review).
|
|
697
|
+
*/
|
|
698
|
+
"aria-label"?: string;
|
|
664
699
|
ref?: Ref<HTMLDivElement>;
|
|
665
700
|
}
|
|
666
|
-
declare function Table({ columns, data, className, sortable, sortKey: controlledSortKey, sortDir: controlledSortDir, onSortChange, selectable, selectedRows, onSelectionChange, expandable, renderExpanded, density, stickyHeader, striped, loading, emptyState, onRowClick, mobileBreakpoint: mobileBreakpointProp, ref, }: TableProps): react_jsx_runtime.JSX.Element;
|
|
701
|
+
declare function Table({ columns, data, className, sortable, sortKey: controlledSortKey, sortDir: controlledSortDir, onSortChange, selectable, selectedRows, onSelectionChange, expandable, renderExpanded, density, stickyHeader, striped, loading, emptyState, onRowClick, mobileBreakpoint: mobileBreakpointProp, title, description, actions, "aria-label": ariaLabel, ref, }: TableProps): react_jsx_runtime.JSX.Element;
|
|
667
702
|
|
|
668
703
|
interface CalendarEvent {
|
|
669
704
|
id: string;
|
|
@@ -1931,8 +1966,10 @@ interface SettingsLayoutProps {
|
|
|
1931
1966
|
/** Width of the rail in px (sidebar layout). */
|
|
1932
1967
|
railWidth?: number;
|
|
1933
1968
|
/**
|
|
1934
|
-
* Below this width of the layout itself (not the viewport) the rail becomes a Dropdown. Default: the rail
|
|
1935
|
-
* usable panel (railWidth +
|
|
1969
|
+
* Below this width of the layout itself (not the viewport) the rail becomes a Dropdown. Default: the rail, the gap
|
|
1970
|
+
* beside it and a usable panel (railWidth + gap + 560). Measured on the layout, so a narrow PageContainer or a
|
|
1971
|
+
* sidebar shell counts. A narrow page holding the rail is wider by the rail and its gap, so the panel keeps the narrow
|
|
1972
|
+
* width (roots.css, Sprint 25.9).
|
|
1936
1973
|
*/
|
|
1937
1974
|
collapseBelow?: number;
|
|
1938
1975
|
/** Accessible name of the section navigation. */
|
|
@@ -1953,7 +1990,7 @@ interface SettingsLayoutProps {
|
|
|
1953
1990
|
* The rail is a Tabs (vertical) styled by the theme's in-page vertical style;
|
|
1954
1991
|
* the page assembles the sections' contents and nothing else.
|
|
1955
1992
|
*/
|
|
1956
|
-
declare function SettingsLayout({ sections, value, onChange, layout: layoutProp, railWidth, collapseBelow, "aria-label": ariaLabel, children, className, }: SettingsLayoutProps): react_jsx_runtime.JSX.Element;
|
|
1993
|
+
declare function SettingsLayout({ sections, value, onChange, layout: layoutProp, railWidth, collapseBelow: collapseBelowProp, "aria-label": ariaLabel, children, className, }: SettingsLayoutProps): react_jsx_runtime.JSX.Element;
|
|
1957
1994
|
|
|
1958
1995
|
interface BreadcrumbItem$1 {
|
|
1959
1996
|
label: string;
|
|
@@ -3016,7 +3053,10 @@ type PageContainerWidth = "constrained" | "full" | "narrow";
|
|
|
3016
3053
|
type Padding = "none" | "default" | "wide";
|
|
3017
3054
|
type VerticalPadding = "none" | "default" | "spacious";
|
|
3018
3055
|
interface PageContainerProps {
|
|
3019
|
-
/**
|
|
3056
|
+
/**
|
|
3057
|
+
* Semantic width — maps to maxWidth internally. Takes precedence over maxWidth when both are set. A narrow page that
|
|
3058
|
+
* holds a SettingsLayout rail is wider by the rail and its gap, so the panel keeps the narrow width (Sprint 25.9).
|
|
3059
|
+
*/
|
|
3020
3060
|
width?: PageContainerWidth;
|
|
3021
3061
|
/** Lower-level max-width escape hatch. Use `width` for standard cases. */
|
|
3022
3062
|
maxWidth?: MaxWidth;
|
|
@@ -3062,6 +3102,7 @@ declare function useContentWidth(width: PageContainerWidth): void;
|
|
|
3062
3102
|
declare const PageContainer: react.ForwardRefExoticComponent<PageContainerProps & react.RefAttributes<HTMLDivElement>>;
|
|
3063
3103
|
|
|
3064
3104
|
interface SectionHeadingProps {
|
|
3105
|
+
/** Wraps onto more lines rather than being cut (an insight above a chart); a pane's title keeps one line. */
|
|
3065
3106
|
title: string;
|
|
3066
3107
|
description?: string;
|
|
3067
3108
|
/** The section's buttons. Below sm they sit under the title, like PageHeader's actions. */
|