@flytedan/flytebot-design-system 0.49.2 → 0.50.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/index.cjs +1777 -1714
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -8
- package/dist/index.d.ts +25 -8
- package/dist/index.js +1777 -1714
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +99 -40
package/dist/index.d.cts
CHANGED
|
@@ -704,9 +704,10 @@ interface AppShellProps {
|
|
|
704
704
|
trailingPanel?: (ctx: {
|
|
705
705
|
overlay: boolean;
|
|
706
706
|
}) => React.ReactNode;
|
|
707
|
-
/** Max width
|
|
708
|
-
*
|
|
709
|
-
|
|
707
|
+
/** Max width of the centered content column: a px number, or `"none"` for a
|
|
708
|
+
* full-width app whose pages fill the space beside the sidebar (SMS-50). Default
|
|
709
|
+
* 1440 — the value most flytedesk app shells use. */
|
|
710
|
+
contentMaxWidth?: number | "none";
|
|
710
711
|
/** The shell's own height. Default `"100vh"`, correct for the real, top-level use
|
|
711
712
|
* every app mounts this at. A demo or preview embedding AppShell inside a bounded
|
|
712
713
|
* container (this package's own docs site) passes e.g. `"100%"` instead. */
|
|
@@ -883,6 +884,11 @@ interface TagProps {
|
|
|
883
884
|
* in components.css) has visually truncated with an ellipsis. Harmless, and invisible,
|
|
884
885
|
* on a chip nobody truncates. */
|
|
885
886
|
title?: string;
|
|
887
|
+
/** The chip's accessible name, when its painted text is not a faithful name for it. FilterBar
|
|
888
|
+
* sets it to the chip's whole text: the painted text is split into a shrinkable head and a
|
|
889
|
+
* fixed tail (MiddleEllipsis), and a browser computing a name from content puts a space between
|
|
890
|
+
* two block-level flex items, reading "Pol itical" — an explicit name is the whole value. */
|
|
891
|
+
"aria-label"?: string;
|
|
886
892
|
className?: string;
|
|
887
893
|
}
|
|
888
894
|
declare function Tag({ children, icon, selected, tone, onRemove, onClick, className, ...rest }: TagProps): React.JSX.Element;
|
|
@@ -952,7 +958,8 @@ interface TrendChartProps {
|
|
|
952
958
|
label: string;
|
|
953
959
|
/** Value formatter for axis ticks, point tooltips and the data table. */
|
|
954
960
|
valueFormat?: (n: number) => string;
|
|
955
|
-
/**
|
|
961
|
+
/** Plot height in px. Width is always fluid (100% of the container); the SVG is drawn in
|
|
962
|
+
* real pixels at the container's measured width, so text never scales with the card. */
|
|
956
963
|
height?: number;
|
|
957
964
|
/** Number of horizontal gridlines (excluding the zero baseline). */
|
|
958
965
|
yTicks?: number;
|
|
@@ -1324,8 +1331,14 @@ interface FilterBarProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "on
|
|
|
1324
1331
|
* clearFilter(id). Apply it synchronously, exactly like onFilterChange. */
|
|
1325
1332
|
onFilterRemove: (key: string) => void;
|
|
1326
1333
|
/** Which edge the "add filter" popover aligns to. Default "left" — the trigger sits
|
|
1327
|
-
*
|
|
1334
|
+
* in the leading column, left of the chips, so its menu opens under its left edge. */
|
|
1328
1335
|
align?: "left" | "right";
|
|
1336
|
+
/** Controls that sit at the bar's right edge, in a column of their own: a date range, an
|
|
1337
|
+
* export button. They are laid out beside the Filter button and the chips and stay put
|
|
1338
|
+
* however many chips wrap (they top-align to the Filter button, never to the chips), and
|
|
1339
|
+
* drop below the chips on a row of their own, still right-aligned, when the bar is too
|
|
1340
|
+
* narrow to hold them all on one line. */
|
|
1341
|
+
actions?: React.ReactNode;
|
|
1329
1342
|
className?: string;
|
|
1330
1343
|
}
|
|
1331
1344
|
type FilterValidation = {
|
|
@@ -1377,7 +1390,7 @@ declare function validateFilterValue(field: FilterField, value: unknown): Filter
|
|
|
1377
1390
|
* string value; multiSelect/range/date each read/write a small typed object of their own
|
|
1378
1391
|
* (see FilterValue).
|
|
1379
1392
|
*/
|
|
1380
|
-
declare function FilterBar({ fields, filters, onFilterChange, onFilterRemove, align, className, ...rest }: FilterBarProps): React.JSX.Element;
|
|
1393
|
+
declare function FilterBar({ fields, filters, onFilterChange, onFilterRemove, align, actions, className, ...rest }: FilterBarProps): React.JSX.Element;
|
|
1381
1394
|
|
|
1382
1395
|
/**
|
|
1383
1396
|
* A flat figure tile — no shadow, no background color, never more than four in a row.
|
|
@@ -2437,6 +2450,8 @@ interface SelectProps {
|
|
|
2437
2450
|
label?: string;
|
|
2438
2451
|
help?: string;
|
|
2439
2452
|
error?: string;
|
|
2453
|
+
/** Names the field when it has no visible `label` (the trigger is then named "<aria-label> <selected option>"). */
|
|
2454
|
+
"aria-label"?: string;
|
|
2440
2455
|
options: Array<string | SelectOption>;
|
|
2441
2456
|
placeholder?: string;
|
|
2442
2457
|
required?: boolean;
|
|
@@ -2462,13 +2477,15 @@ interface SelectProps {
|
|
|
2462
2477
|
* from it. Generated when omitted, so `label` names the trigger either way. */
|
|
2463
2478
|
id?: string;
|
|
2464
2479
|
}
|
|
2465
|
-
declare function Select({ label, help, error, options, placeholder, required, disabled, loading, value, onChange, searchable, clearable, multiple, summary, id, className, style }: SelectProps): React.JSX.Element;
|
|
2480
|
+
declare function Select({ label, help, error, options, placeholder, required, disabled, loading, value, onChange, searchable, clearable, multiple, summary, id, className, style, "aria-label": hiddenLabel }: SelectProps): React.JSX.Element;
|
|
2466
2481
|
|
|
2467
2482
|
/** Calendar popover date field. Click the title to drill month -> year; range mode picks start then end with live hover preview. Values are ISO strings ("2026-03-01"). */
|
|
2468
2483
|
interface DatePickerProps {
|
|
2469
2484
|
label?: string;
|
|
2470
2485
|
help?: string;
|
|
2471
2486
|
error?: string;
|
|
2487
|
+
/** Names the field when it has no visible `label` (the trigger is then named "<aria-label> <what it displays>"). */
|
|
2488
|
+
"aria-label"?: string;
|
|
2472
2489
|
required?: boolean;
|
|
2473
2490
|
disabled?: boolean;
|
|
2474
2491
|
/** false: value is "YYYY-MM-DD". true: value is {start, end}. */
|
|
@@ -2492,7 +2509,7 @@ interface CalendarProps {
|
|
|
2492
2509
|
months?: number;
|
|
2493
2510
|
}
|
|
2494
2511
|
declare function Calendar({ value, range, onPick, initialMonth, months }: CalendarProps): React.JSX.Element;
|
|
2495
|
-
declare function DatePicker({ label, help, error, required, disabled, range, value, onChange, placeholder, id, className, style, ...rest }: DatePickerProps): React.JSX.Element;
|
|
2512
|
+
declare function DatePicker({ label, help, error, required, disabled, range, value, onChange, placeholder, id, className, style, "aria-label": hiddenLabel, ...rest }: DatePickerProps): React.JSX.Element;
|
|
2496
2513
|
|
|
2497
2514
|
/** Analog clock-face time field: tap or drag the hand to set the hour, auto-advances to minutes; AM/PM chips; "Now" shortcut. Value is 24h "HH:MM". */
|
|
2498
2515
|
interface TimePickerProps {
|
package/dist/index.d.ts
CHANGED
|
@@ -704,9 +704,10 @@ interface AppShellProps {
|
|
|
704
704
|
trailingPanel?: (ctx: {
|
|
705
705
|
overlay: boolean;
|
|
706
706
|
}) => React.ReactNode;
|
|
707
|
-
/** Max width
|
|
708
|
-
*
|
|
709
|
-
|
|
707
|
+
/** Max width of the centered content column: a px number, or `"none"` for a
|
|
708
|
+
* full-width app whose pages fill the space beside the sidebar (SMS-50). Default
|
|
709
|
+
* 1440 — the value most flytedesk app shells use. */
|
|
710
|
+
contentMaxWidth?: number | "none";
|
|
710
711
|
/** The shell's own height. Default `"100vh"`, correct for the real, top-level use
|
|
711
712
|
* every app mounts this at. A demo or preview embedding AppShell inside a bounded
|
|
712
713
|
* container (this package's own docs site) passes e.g. `"100%"` instead. */
|
|
@@ -883,6 +884,11 @@ interface TagProps {
|
|
|
883
884
|
* in components.css) has visually truncated with an ellipsis. Harmless, and invisible,
|
|
884
885
|
* on a chip nobody truncates. */
|
|
885
886
|
title?: string;
|
|
887
|
+
/** The chip's accessible name, when its painted text is not a faithful name for it. FilterBar
|
|
888
|
+
* sets it to the chip's whole text: the painted text is split into a shrinkable head and a
|
|
889
|
+
* fixed tail (MiddleEllipsis), and a browser computing a name from content puts a space between
|
|
890
|
+
* two block-level flex items, reading "Pol itical" — an explicit name is the whole value. */
|
|
891
|
+
"aria-label"?: string;
|
|
886
892
|
className?: string;
|
|
887
893
|
}
|
|
888
894
|
declare function Tag({ children, icon, selected, tone, onRemove, onClick, className, ...rest }: TagProps): React.JSX.Element;
|
|
@@ -952,7 +958,8 @@ interface TrendChartProps {
|
|
|
952
958
|
label: string;
|
|
953
959
|
/** Value formatter for axis ticks, point tooltips and the data table. */
|
|
954
960
|
valueFormat?: (n: number) => string;
|
|
955
|
-
/**
|
|
961
|
+
/** Plot height in px. Width is always fluid (100% of the container); the SVG is drawn in
|
|
962
|
+
* real pixels at the container's measured width, so text never scales with the card. */
|
|
956
963
|
height?: number;
|
|
957
964
|
/** Number of horizontal gridlines (excluding the zero baseline). */
|
|
958
965
|
yTicks?: number;
|
|
@@ -1324,8 +1331,14 @@ interface FilterBarProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "on
|
|
|
1324
1331
|
* clearFilter(id). Apply it synchronously, exactly like onFilterChange. */
|
|
1325
1332
|
onFilterRemove: (key: string) => void;
|
|
1326
1333
|
/** Which edge the "add filter" popover aligns to. Default "left" — the trigger sits
|
|
1327
|
-
*
|
|
1334
|
+
* in the leading column, left of the chips, so its menu opens under its left edge. */
|
|
1328
1335
|
align?: "left" | "right";
|
|
1336
|
+
/** Controls that sit at the bar's right edge, in a column of their own: a date range, an
|
|
1337
|
+
* export button. They are laid out beside the Filter button and the chips and stay put
|
|
1338
|
+
* however many chips wrap (they top-align to the Filter button, never to the chips), and
|
|
1339
|
+
* drop below the chips on a row of their own, still right-aligned, when the bar is too
|
|
1340
|
+
* narrow to hold them all on one line. */
|
|
1341
|
+
actions?: React.ReactNode;
|
|
1329
1342
|
className?: string;
|
|
1330
1343
|
}
|
|
1331
1344
|
type FilterValidation = {
|
|
@@ -1377,7 +1390,7 @@ declare function validateFilterValue(field: FilterField, value: unknown): Filter
|
|
|
1377
1390
|
* string value; multiSelect/range/date each read/write a small typed object of their own
|
|
1378
1391
|
* (see FilterValue).
|
|
1379
1392
|
*/
|
|
1380
|
-
declare function FilterBar({ fields, filters, onFilterChange, onFilterRemove, align, className, ...rest }: FilterBarProps): React.JSX.Element;
|
|
1393
|
+
declare function FilterBar({ fields, filters, onFilterChange, onFilterRemove, align, actions, className, ...rest }: FilterBarProps): React.JSX.Element;
|
|
1381
1394
|
|
|
1382
1395
|
/**
|
|
1383
1396
|
* A flat figure tile — no shadow, no background color, never more than four in a row.
|
|
@@ -2437,6 +2450,8 @@ interface SelectProps {
|
|
|
2437
2450
|
label?: string;
|
|
2438
2451
|
help?: string;
|
|
2439
2452
|
error?: string;
|
|
2453
|
+
/** Names the field when it has no visible `label` (the trigger is then named "<aria-label> <selected option>"). */
|
|
2454
|
+
"aria-label"?: string;
|
|
2440
2455
|
options: Array<string | SelectOption>;
|
|
2441
2456
|
placeholder?: string;
|
|
2442
2457
|
required?: boolean;
|
|
@@ -2462,13 +2477,15 @@ interface SelectProps {
|
|
|
2462
2477
|
* from it. Generated when omitted, so `label` names the trigger either way. */
|
|
2463
2478
|
id?: string;
|
|
2464
2479
|
}
|
|
2465
|
-
declare function Select({ label, help, error, options, placeholder, required, disabled, loading, value, onChange, searchable, clearable, multiple, summary, id, className, style }: SelectProps): React.JSX.Element;
|
|
2480
|
+
declare function Select({ label, help, error, options, placeholder, required, disabled, loading, value, onChange, searchable, clearable, multiple, summary, id, className, style, "aria-label": hiddenLabel }: SelectProps): React.JSX.Element;
|
|
2466
2481
|
|
|
2467
2482
|
/** Calendar popover date field. Click the title to drill month -> year; range mode picks start then end with live hover preview. Values are ISO strings ("2026-03-01"). */
|
|
2468
2483
|
interface DatePickerProps {
|
|
2469
2484
|
label?: string;
|
|
2470
2485
|
help?: string;
|
|
2471
2486
|
error?: string;
|
|
2487
|
+
/** Names the field when it has no visible `label` (the trigger is then named "<aria-label> <what it displays>"). */
|
|
2488
|
+
"aria-label"?: string;
|
|
2472
2489
|
required?: boolean;
|
|
2473
2490
|
disabled?: boolean;
|
|
2474
2491
|
/** false: value is "YYYY-MM-DD". true: value is {start, end}. */
|
|
@@ -2492,7 +2509,7 @@ interface CalendarProps {
|
|
|
2492
2509
|
months?: number;
|
|
2493
2510
|
}
|
|
2494
2511
|
declare function Calendar({ value, range, onPick, initialMonth, months }: CalendarProps): React.JSX.Element;
|
|
2495
|
-
declare function DatePicker({ label, help, error, required, disabled, range, value, onChange, placeholder, id, className, style, ...rest }: DatePickerProps): React.JSX.Element;
|
|
2512
|
+
declare function DatePicker({ label, help, error, required, disabled, range, value, onChange, placeholder, id, className, style, "aria-label": hiddenLabel, ...rest }: DatePickerProps): React.JSX.Element;
|
|
2496
2513
|
|
|
2497
2514
|
/** Analog clock-face time field: tap or drag the hand to set the hour, auto-advances to minutes; AM/PM chips; "Now" shortcut. Value is 24h "HH:MM". */
|
|
2498
2515
|
interface TimePickerProps {
|