gridsmith-ui 0.17.2 → 0.17.3
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/charts.d.ts +88 -24
- package/dist/charts.js +1043 -398
- package/dist/charts.js.map +1 -1
- package/dist/index.d.ts +41 -7
- package/dist/index.js +307 -200
- package/dist/index.js.map +1 -1
- package/dist/roots.css +14 -0
- package/package.json +1 -1
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,20 @@ 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 table renders as before.
|
|
686
|
+
*/
|
|
687
|
+
title?: string;
|
|
688
|
+
/** A line under the title, which also describes the `<table>` (aria-describedby). Needs `title`. */
|
|
689
|
+
description?: string;
|
|
690
|
+
/** The table's buttons, at the end of the title band as in a CardHeader. Needs `title`. */
|
|
691
|
+
actions?: ReactNode;
|
|
664
692
|
ref?: Ref<HTMLDivElement>;
|
|
665
693
|
}
|
|
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;
|
|
694
|
+
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, ref, }: TableProps): react_jsx_runtime.JSX.Element;
|
|
667
695
|
|
|
668
696
|
interface CalendarEvent {
|
|
669
697
|
id: string;
|
|
@@ -1931,8 +1959,10 @@ interface SettingsLayoutProps {
|
|
|
1931
1959
|
/** Width of the rail in px (sidebar layout). */
|
|
1932
1960
|
railWidth?: number;
|
|
1933
1961
|
/**
|
|
1934
|
-
* Below this width of the layout itself (not the viewport) the rail becomes a Dropdown. Default: the rail
|
|
1935
|
-
* usable panel (railWidth +
|
|
1962
|
+
* Below this width of the layout itself (not the viewport) the rail becomes a Dropdown. Default: the rail, the gap
|
|
1963
|
+
* beside it and a usable panel (railWidth + gap + 560). Measured on the layout, so a narrow PageContainer or a
|
|
1964
|
+
* sidebar shell counts. A narrow page holding the rail is wider by the rail and its gap, so the panel keeps the narrow
|
|
1965
|
+
* width (roots.css, Sprint 25.9).
|
|
1936
1966
|
*/
|
|
1937
1967
|
collapseBelow?: number;
|
|
1938
1968
|
/** Accessible name of the section navigation. */
|
|
@@ -1953,7 +1983,7 @@ interface SettingsLayoutProps {
|
|
|
1953
1983
|
* The rail is a Tabs (vertical) styled by the theme's in-page vertical style;
|
|
1954
1984
|
* the page assembles the sections' contents and nothing else.
|
|
1955
1985
|
*/
|
|
1956
|
-
declare function SettingsLayout({ sections, value, onChange, layout: layoutProp, railWidth, collapseBelow, "aria-label": ariaLabel, children, className, }: SettingsLayoutProps): react_jsx_runtime.JSX.Element;
|
|
1986
|
+
declare function SettingsLayout({ sections, value, onChange, layout: layoutProp, railWidth, collapseBelow: collapseBelowProp, "aria-label": ariaLabel, children, className, }: SettingsLayoutProps): react_jsx_runtime.JSX.Element;
|
|
1957
1987
|
|
|
1958
1988
|
interface BreadcrumbItem$1 {
|
|
1959
1989
|
label: string;
|
|
@@ -3016,7 +3046,10 @@ type PageContainerWidth = "constrained" | "full" | "narrow";
|
|
|
3016
3046
|
type Padding = "none" | "default" | "wide";
|
|
3017
3047
|
type VerticalPadding = "none" | "default" | "spacious";
|
|
3018
3048
|
interface PageContainerProps {
|
|
3019
|
-
/**
|
|
3049
|
+
/**
|
|
3050
|
+
* Semantic width — maps to maxWidth internally. Takes precedence over maxWidth when both are set. A narrow page that
|
|
3051
|
+
* holds a SettingsLayout rail is wider by the rail and its gap, so the panel keeps the narrow width (Sprint 25.9).
|
|
3052
|
+
*/
|
|
3020
3053
|
width?: PageContainerWidth;
|
|
3021
3054
|
/** Lower-level max-width escape hatch. Use `width` for standard cases. */
|
|
3022
3055
|
maxWidth?: MaxWidth;
|
|
@@ -3062,6 +3095,7 @@ declare function useContentWidth(width: PageContainerWidth): void;
|
|
|
3062
3095
|
declare const PageContainer: react.ForwardRefExoticComponent<PageContainerProps & react.RefAttributes<HTMLDivElement>>;
|
|
3063
3096
|
|
|
3064
3097
|
interface SectionHeadingProps {
|
|
3098
|
+
/** Wraps onto more lines rather than being cut (an insight above a chart); a pane's title keeps one line. */
|
|
3065
3099
|
title: string;
|
|
3066
3100
|
description?: string;
|
|
3067
3101
|
/** The section's buttons. Below sm they sit under the title, like PageHeader's actions. */
|