@flytedan/flytebot-design-system 0.9.0 → 0.10.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 +1109 -1091
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -7
- package/dist/index.d.ts +37 -7
- package/dist/index.js +1109 -1091
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +12 -3
package/dist/index.d.cts
CHANGED
|
@@ -165,6 +165,15 @@ interface SegmentedControlProps {
|
|
|
165
165
|
}>;
|
|
166
166
|
value?: string;
|
|
167
167
|
onChange?: (value: string) => void;
|
|
168
|
+
/** Names the group. Each button already names itself from its own text, so the
|
|
169
|
+
* buttons were never the gap — the GROUP was: two segmented controls in one
|
|
170
|
+
* toolbar both announce as an unnamed group of buttons. There is no visible
|
|
171
|
+
* `label` prop because this control is used inline next to the thing it
|
|
172
|
+
* switches (a density toggle beside a table, a range toggle beside a chart),
|
|
173
|
+
* where a stacked field label would be wrong; aria-label is what names it.
|
|
174
|
+
* The rest spread below already forwarded this to the DOM — what was missing
|
|
175
|
+
* was any typed way for a caller to pass it. */
|
|
176
|
+
"aria-label"?: string;
|
|
168
177
|
className?: string;
|
|
169
178
|
}
|
|
170
179
|
declare function SegmentedControl({ options, value, onChange, className, ...rest }: SegmentedControlProps): React.JSX.Element;
|
|
@@ -1564,6 +1573,14 @@ interface NumberInputProps {
|
|
|
1564
1573
|
label?: string;
|
|
1565
1574
|
help?: string;
|
|
1566
1575
|
error?: string;
|
|
1576
|
+
/** Element id — lands on the <input> and on the label's `for`. Generated when
|
|
1577
|
+
* omitted, so `label` is always the input's accessible name either way. */
|
|
1578
|
+
id?: string;
|
|
1579
|
+
/** Names an instance that has no visible `label` — a bare bound inside a range
|
|
1580
|
+
* row whose heading lives elsewhere. Do not set both: aria-label OUTRANKS the
|
|
1581
|
+
* associated <label>, so a field carrying both is announced as something other
|
|
1582
|
+
* than what it visibly says. */
|
|
1583
|
+
"aria-label"?: string;
|
|
1567
1584
|
prefix?: string;
|
|
1568
1585
|
suffix?: string;
|
|
1569
1586
|
required?: boolean;
|
|
@@ -1582,7 +1599,7 @@ interface NumberInputProps {
|
|
|
1582
1599
|
style?: any;
|
|
1583
1600
|
className?: string;
|
|
1584
1601
|
}
|
|
1585
|
-
declare function NumberInput({ label, help, error, prefix, suffix, required, disabled, min, max, step, bigStep, value, onChange, format, className, style, placeholder }: NumberInputProps): React.JSX.Element;
|
|
1602
|
+
declare function NumberInput({ label, help, error, prefix, suffix, required, disabled, min, max, step, bigStep, value, onChange, format, className, style, placeholder, id, "aria-label": ariaLabel }: NumberInputProps): React.JSX.Element;
|
|
1586
1603
|
|
|
1587
1604
|
/** Rich popover select: animated listbox, keyboard nav + type-ahead, search over 8 options, option icons, descriptions, meta and groups. API-compatible with the old native select. */
|
|
1588
1605
|
interface SelectOption {
|
|
@@ -1616,14 +1633,14 @@ interface SelectProps {
|
|
|
1616
1633
|
value?: string | string[];
|
|
1617
1634
|
/** Called with {target:{value}} like a native select — an array when `multiple`. */
|
|
1618
1635
|
onChange?: (e: any) => void;
|
|
1619
|
-
name?: string;
|
|
1620
1636
|
/** Applied to the outer .fd-field element — this is where width belongs. */
|
|
1621
1637
|
style?: any;
|
|
1622
1638
|
className?: string;
|
|
1623
|
-
/** Element id —
|
|
1639
|
+
/** Element id — lands on the trigger button, with the label's own id derived
|
|
1640
|
+
* from it. Generated when omitted, so `label` names the trigger either way. */
|
|
1624
1641
|
id?: string;
|
|
1625
1642
|
}
|
|
1626
|
-
declare function Select({ label, help, error, options, placeholder, required, disabled, loading, value, onChange, searchable, clearable, multiple, summary, id, className, style
|
|
1643
|
+
declare function Select({ label, help, error, options, placeholder, required, disabled, loading, value, onChange, searchable, clearable, multiple, summary, id, className, style }: SelectProps): React.JSX.Element;
|
|
1627
1644
|
|
|
1628
1645
|
/** 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"). */
|
|
1629
1646
|
interface DatePickerProps {
|
|
@@ -1638,6 +1655,9 @@ interface DatePickerProps {
|
|
|
1638
1655
|
/** Called with {target:{value}} — string, or {start,end} in range mode. */
|
|
1639
1656
|
onChange?: (e: any) => void;
|
|
1640
1657
|
placeholder?: string;
|
|
1658
|
+
/** Element id — lands on the trigger button, with the label's own id derived
|
|
1659
|
+
* from it. Generated when omitted, so `label` names the trigger either way. */
|
|
1660
|
+
id?: string;
|
|
1641
1661
|
style?: any;
|
|
1642
1662
|
className?: string;
|
|
1643
1663
|
}
|
|
@@ -1650,7 +1670,7 @@ interface CalendarProps {
|
|
|
1650
1670
|
months?: number;
|
|
1651
1671
|
}
|
|
1652
1672
|
declare function Calendar({ value, range, onPick, initialMonth, months }: CalendarProps): React.JSX.Element;
|
|
1653
|
-
declare function DatePicker({ label, help, error, required, disabled, range, value, onChange, placeholder, className, style, ...rest }: DatePickerProps): React.JSX.Element;
|
|
1673
|
+
declare function DatePicker({ label, help, error, required, disabled, range, value, onChange, placeholder, id, className, style, ...rest }: DatePickerProps): React.JSX.Element;
|
|
1654
1674
|
|
|
1655
1675
|
/** 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". */
|
|
1656
1676
|
interface TimePickerProps {
|
|
@@ -1664,6 +1684,9 @@ interface TimePickerProps {
|
|
|
1664
1684
|
/** Called with {target:{value}}. */
|
|
1665
1685
|
onChange?: (e: any) => void;
|
|
1666
1686
|
placeholder?: string;
|
|
1687
|
+
/** Element id — lands on the trigger button, with the label's own id derived
|
|
1688
|
+
* from it. Generated when omitted, so `label` names the trigger either way. */
|
|
1689
|
+
id?: string;
|
|
1667
1690
|
style?: any;
|
|
1668
1691
|
className?: string;
|
|
1669
1692
|
}
|
|
@@ -1673,7 +1696,7 @@ interface ClockFaceProps {
|
|
|
1673
1696
|
onChange: (v: string) => void;
|
|
1674
1697
|
}
|
|
1675
1698
|
declare function ClockFace({ value, onChange }: ClockFaceProps): React.JSX.Element;
|
|
1676
|
-
declare function TimePicker({ label, help, error, required, disabled, value, onChange, placeholder, className, style }: TimePickerProps): React.JSX.Element;
|
|
1699
|
+
declare function TimePicker({ label, help, error, required, disabled, value, onChange, placeholder, id, className, style }: TimePickerProps): React.JSX.Element;
|
|
1677
1700
|
|
|
1678
1701
|
/**
|
|
1679
1702
|
* Continuous value control. In the media planner this is the reallocation slider:
|
|
@@ -1690,9 +1713,16 @@ interface SliderProps {
|
|
|
1690
1713
|
format?: (value: number) => string;
|
|
1691
1714
|
showChip?: boolean;
|
|
1692
1715
|
help?: string;
|
|
1716
|
+
/** Element id — lands on the range input and on the label's `for`. Generated
|
|
1717
|
+
* when omitted, so `label` is always the slider's accessible name. */
|
|
1718
|
+
id?: string;
|
|
1719
|
+
/** Names an instance that has no visible `label`. Do not set both: aria-label
|
|
1720
|
+
* OUTRANKS the associated <label>, so a slider carrying both is announced as
|
|
1721
|
+
* something other than what it visibly says. */
|
|
1722
|
+
"aria-label"?: string;
|
|
1693
1723
|
className?: string;
|
|
1694
1724
|
}
|
|
1695
|
-
declare function Slider({ label, min, max, step, value, onChange, format, showChip, help, className, ...rest }: SliderProps): React.JSX.Element;
|
|
1725
|
+
declare function Slider({ label, min, max, step, value, onChange, format, showChip, help, id, "aria-label": ariaLabel, className, ...rest }: SliderProps): React.JSX.Element;
|
|
1696
1726
|
|
|
1697
1727
|
/** Dual-thumb range slider: drag either thumb or the rail, value bubbles while dragging or focused, tick marks with labels, optional magnetic snap, keyboard (arrows, shift for 10%, Home/End). */
|
|
1698
1728
|
interface RangeSliderProps {
|
package/dist/index.d.ts
CHANGED
|
@@ -165,6 +165,15 @@ interface SegmentedControlProps {
|
|
|
165
165
|
}>;
|
|
166
166
|
value?: string;
|
|
167
167
|
onChange?: (value: string) => void;
|
|
168
|
+
/** Names the group. Each button already names itself from its own text, so the
|
|
169
|
+
* buttons were never the gap — the GROUP was: two segmented controls in one
|
|
170
|
+
* toolbar both announce as an unnamed group of buttons. There is no visible
|
|
171
|
+
* `label` prop because this control is used inline next to the thing it
|
|
172
|
+
* switches (a density toggle beside a table, a range toggle beside a chart),
|
|
173
|
+
* where a stacked field label would be wrong; aria-label is what names it.
|
|
174
|
+
* The rest spread below already forwarded this to the DOM — what was missing
|
|
175
|
+
* was any typed way for a caller to pass it. */
|
|
176
|
+
"aria-label"?: string;
|
|
168
177
|
className?: string;
|
|
169
178
|
}
|
|
170
179
|
declare function SegmentedControl({ options, value, onChange, className, ...rest }: SegmentedControlProps): React.JSX.Element;
|
|
@@ -1564,6 +1573,14 @@ interface NumberInputProps {
|
|
|
1564
1573
|
label?: string;
|
|
1565
1574
|
help?: string;
|
|
1566
1575
|
error?: string;
|
|
1576
|
+
/** Element id — lands on the <input> and on the label's `for`. Generated when
|
|
1577
|
+
* omitted, so `label` is always the input's accessible name either way. */
|
|
1578
|
+
id?: string;
|
|
1579
|
+
/** Names an instance that has no visible `label` — a bare bound inside a range
|
|
1580
|
+
* row whose heading lives elsewhere. Do not set both: aria-label OUTRANKS the
|
|
1581
|
+
* associated <label>, so a field carrying both is announced as something other
|
|
1582
|
+
* than what it visibly says. */
|
|
1583
|
+
"aria-label"?: string;
|
|
1567
1584
|
prefix?: string;
|
|
1568
1585
|
suffix?: string;
|
|
1569
1586
|
required?: boolean;
|
|
@@ -1582,7 +1599,7 @@ interface NumberInputProps {
|
|
|
1582
1599
|
style?: any;
|
|
1583
1600
|
className?: string;
|
|
1584
1601
|
}
|
|
1585
|
-
declare function NumberInput({ label, help, error, prefix, suffix, required, disabled, min, max, step, bigStep, value, onChange, format, className, style, placeholder }: NumberInputProps): React.JSX.Element;
|
|
1602
|
+
declare function NumberInput({ label, help, error, prefix, suffix, required, disabled, min, max, step, bigStep, value, onChange, format, className, style, placeholder, id, "aria-label": ariaLabel }: NumberInputProps): React.JSX.Element;
|
|
1586
1603
|
|
|
1587
1604
|
/** Rich popover select: animated listbox, keyboard nav + type-ahead, search over 8 options, option icons, descriptions, meta and groups. API-compatible with the old native select. */
|
|
1588
1605
|
interface SelectOption {
|
|
@@ -1616,14 +1633,14 @@ interface SelectProps {
|
|
|
1616
1633
|
value?: string | string[];
|
|
1617
1634
|
/** Called with {target:{value}} like a native select — an array when `multiple`. */
|
|
1618
1635
|
onChange?: (e: any) => void;
|
|
1619
|
-
name?: string;
|
|
1620
1636
|
/** Applied to the outer .fd-field element — this is where width belongs. */
|
|
1621
1637
|
style?: any;
|
|
1622
1638
|
className?: string;
|
|
1623
|
-
/** Element id —
|
|
1639
|
+
/** Element id — lands on the trigger button, with the label's own id derived
|
|
1640
|
+
* from it. Generated when omitted, so `label` names the trigger either way. */
|
|
1624
1641
|
id?: string;
|
|
1625
1642
|
}
|
|
1626
|
-
declare function Select({ label, help, error, options, placeholder, required, disabled, loading, value, onChange, searchable, clearable, multiple, summary, id, className, style
|
|
1643
|
+
declare function Select({ label, help, error, options, placeholder, required, disabled, loading, value, onChange, searchable, clearable, multiple, summary, id, className, style }: SelectProps): React.JSX.Element;
|
|
1627
1644
|
|
|
1628
1645
|
/** 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"). */
|
|
1629
1646
|
interface DatePickerProps {
|
|
@@ -1638,6 +1655,9 @@ interface DatePickerProps {
|
|
|
1638
1655
|
/** Called with {target:{value}} — string, or {start,end} in range mode. */
|
|
1639
1656
|
onChange?: (e: any) => void;
|
|
1640
1657
|
placeholder?: string;
|
|
1658
|
+
/** Element id — lands on the trigger button, with the label's own id derived
|
|
1659
|
+
* from it. Generated when omitted, so `label` names the trigger either way. */
|
|
1660
|
+
id?: string;
|
|
1641
1661
|
style?: any;
|
|
1642
1662
|
className?: string;
|
|
1643
1663
|
}
|
|
@@ -1650,7 +1670,7 @@ interface CalendarProps {
|
|
|
1650
1670
|
months?: number;
|
|
1651
1671
|
}
|
|
1652
1672
|
declare function Calendar({ value, range, onPick, initialMonth, months }: CalendarProps): React.JSX.Element;
|
|
1653
|
-
declare function DatePicker({ label, help, error, required, disabled, range, value, onChange, placeholder, className, style, ...rest }: DatePickerProps): React.JSX.Element;
|
|
1673
|
+
declare function DatePicker({ label, help, error, required, disabled, range, value, onChange, placeholder, id, className, style, ...rest }: DatePickerProps): React.JSX.Element;
|
|
1654
1674
|
|
|
1655
1675
|
/** 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". */
|
|
1656
1676
|
interface TimePickerProps {
|
|
@@ -1664,6 +1684,9 @@ interface TimePickerProps {
|
|
|
1664
1684
|
/** Called with {target:{value}}. */
|
|
1665
1685
|
onChange?: (e: any) => void;
|
|
1666
1686
|
placeholder?: string;
|
|
1687
|
+
/** Element id — lands on the trigger button, with the label's own id derived
|
|
1688
|
+
* from it. Generated when omitted, so `label` names the trigger either way. */
|
|
1689
|
+
id?: string;
|
|
1667
1690
|
style?: any;
|
|
1668
1691
|
className?: string;
|
|
1669
1692
|
}
|
|
@@ -1673,7 +1696,7 @@ interface ClockFaceProps {
|
|
|
1673
1696
|
onChange: (v: string) => void;
|
|
1674
1697
|
}
|
|
1675
1698
|
declare function ClockFace({ value, onChange }: ClockFaceProps): React.JSX.Element;
|
|
1676
|
-
declare function TimePicker({ label, help, error, required, disabled, value, onChange, placeholder, className, style }: TimePickerProps): React.JSX.Element;
|
|
1699
|
+
declare function TimePicker({ label, help, error, required, disabled, value, onChange, placeholder, id, className, style }: TimePickerProps): React.JSX.Element;
|
|
1677
1700
|
|
|
1678
1701
|
/**
|
|
1679
1702
|
* Continuous value control. In the media planner this is the reallocation slider:
|
|
@@ -1690,9 +1713,16 @@ interface SliderProps {
|
|
|
1690
1713
|
format?: (value: number) => string;
|
|
1691
1714
|
showChip?: boolean;
|
|
1692
1715
|
help?: string;
|
|
1716
|
+
/** Element id — lands on the range input and on the label's `for`. Generated
|
|
1717
|
+
* when omitted, so `label` is always the slider's accessible name. */
|
|
1718
|
+
id?: string;
|
|
1719
|
+
/** Names an instance that has no visible `label`. Do not set both: aria-label
|
|
1720
|
+
* OUTRANKS the associated <label>, so a slider carrying both is announced as
|
|
1721
|
+
* something other than what it visibly says. */
|
|
1722
|
+
"aria-label"?: string;
|
|
1693
1723
|
className?: string;
|
|
1694
1724
|
}
|
|
1695
|
-
declare function Slider({ label, min, max, step, value, onChange, format, showChip, help, className, ...rest }: SliderProps): React.JSX.Element;
|
|
1725
|
+
declare function Slider({ label, min, max, step, value, onChange, format, showChip, help, id, "aria-label": ariaLabel, className, ...rest }: SliderProps): React.JSX.Element;
|
|
1696
1726
|
|
|
1697
1727
|
/** Dual-thumb range slider: drag either thumb or the rail, value bubbles while dragging or focused, tick marks with labels, optional magnetic snap, keyboard (arrows, shift for 10%, Home/End). */
|
|
1698
1728
|
interface RangeSliderProps {
|