@galaxy-io/dls 1.4.10 → 1.4.11

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.
Files changed (177) hide show
  1. package/dist/accordion/Accordion.d.ts +19 -2
  2. package/dist/accordion/Accordion.js +8 -0
  3. package/dist/avatar/Avatar.d.ts +9 -0
  4. package/dist/avatar/Avatar.js +4 -0
  5. package/dist/avatar/AvatarShimmer.d.ts +2 -0
  6. package/dist/avatar/AvatarShimmer.js +1 -0
  7. package/dist/backgrounds/CellGridBackground.d.ts +12 -1
  8. package/dist/backgrounds/CellGridBackground.js +5 -0
  9. package/dist/backgrounds/CrossGridBackground.d.ts +13 -1
  10. package/dist/backgrounds/CrossGridBackground.js +4 -0
  11. package/dist/backgrounds/DotGridBackground.d.ts +12 -1
  12. package/dist/backgrounds/DotGridBackground.js +4 -0
  13. package/dist/badge/Badge.d.ts +12 -0
  14. package/dist/badge/Badge.js +7 -0
  15. package/dist/beacons/Beacon.d.ts +7 -13
  16. package/dist/beacons/Beacon.js +3 -0
  17. package/dist/buttons/Button.d.ts +18 -0
  18. package/dist/buttons/Button.js +10 -1
  19. package/dist/charts/BarChart.js +3 -1
  20. package/dist/charts/ChartFrame.js +5 -7
  21. package/dist/charts/ChartLegend.js +1 -5
  22. package/dist/charts/ChartPrimitives.d.ts +1 -14
  23. package/dist/charts/ChartPrimitives.js +50 -69
  24. package/dist/charts/DashboardProvider.d.ts +47 -0
  25. package/dist/charts/DashboardProvider.js +52 -0
  26. package/dist/charts/LineChart.js +1 -0
  27. package/dist/charts/ProgressBar.d.ts +13 -1
  28. package/dist/charts/ProgressBar.js +7 -0
  29. package/dist/charts/StatChart.d.ts +10 -1
  30. package/dist/charts/StatChart.js +5 -0
  31. package/dist/charts/constants.d.ts +4 -18
  32. package/dist/charts/constants.js +5 -19
  33. package/dist/charts/useChartInteraction.d.ts +25 -8
  34. package/dist/charts/useChartInteraction.js +61 -6
  35. package/dist/chips/Chip.d.ts +20 -1
  36. package/dist/chips/Chip.js +9 -1
  37. package/dist/containers/FlexItem.d.ts +14 -12
  38. package/dist/containers/FlexItem.js +4 -0
  39. package/dist/containers/FlexWrapper.d.ts +29 -96
  40. package/dist/containers/FlexWrapper.js +12 -0
  41. package/dist/containers/GridWrapper.d.ts +25 -66
  42. package/dist/containers/GridWrapper.js +8 -0
  43. package/dist/containers/Spacing.d.ts +10 -0
  44. package/dist/containers/Spacing.js +7 -0
  45. package/dist/containers/Wrapper.d.ts +11 -1
  46. package/dist/containers/Wrapper.js +4 -0
  47. package/dist/dividers/HorizontalDivider.d.ts +2 -0
  48. package/dist/dividers/HorizontalDivider.js +1 -0
  49. package/dist/dividers/VerticalDivider.d.ts +4 -0
  50. package/dist/dividers/VerticalDivider.js +4 -0
  51. package/dist/drawer/Drawer.d.ts +11 -4
  52. package/dist/drawer/Drawer.js +7 -0
  53. package/dist/dropdown/Dropdown.d.ts +24 -0
  54. package/dist/dropdown/Dropdown.js +9 -0
  55. package/dist/editor/CodeEditor.d.ts +23 -42
  56. package/dist/editor/CodeEditor.js +9 -1
  57. package/dist/hooks/useDismiss.d.ts +6 -0
  58. package/dist/hooks/useDismiss.js +6 -0
  59. package/dist/hooks/useElementClientSize.d.ts +2 -2
  60. package/dist/hooks/useResize.d.ts +5 -2
  61. package/dist/icons/GalaxyLogomark.d.ts +9 -1
  62. package/dist/icons/GalaxyLogomark.js +7 -1
  63. package/dist/icons/GalaxyLogomark3D.d.ts +15 -0
  64. package/dist/icons/GalaxyLogomark3D.js +9 -0
  65. package/dist/icons/GalaxyLogomarkAnimation.d.ts +10 -0
  66. package/dist/icons/GalaxyLogomarkAnimation.js +7 -1
  67. package/dist/icons/GalaxyWordmark.d.ts +7 -1
  68. package/dist/icons/GalaxyWordmark.js +5 -1
  69. package/dist/icons/Icon.d.ts +10 -0
  70. package/dist/icons/Icon.js +5 -0
  71. package/dist/inputs/CheckboxInput.d.ts +13 -0
  72. package/dist/inputs/CheckboxInput.js +8 -0
  73. package/dist/inputs/ColorInput.d.ts +15 -0
  74. package/dist/inputs/ColorInput.js +6 -0
  75. package/dist/inputs/CopyInput.d.ts +9 -0
  76. package/dist/inputs/CopyInput.js +4 -0
  77. package/dist/inputs/DateInput.d.ts +13 -0
  78. package/dist/inputs/DateInput.js +5 -0
  79. package/dist/inputs/Input.d.ts +37 -0
  80. package/dist/inputs/Input.js +13 -0
  81. package/dist/inputs/MultiSelectInput.d.ts +26 -0
  82. package/dist/inputs/MultiSelectInput.js +6 -0
  83. package/dist/inputs/MultiTextInput.d.ts +16 -0
  84. package/dist/inputs/MultiTextInput.js +9 -0
  85. package/dist/inputs/NumberInput.d.ts +7 -1
  86. package/dist/inputs/NumberInput.js +5 -0
  87. package/dist/inputs/PasswordInput.d.ts +9 -1
  88. package/dist/inputs/PasswordInput.js +4 -0
  89. package/dist/inputs/RadioInput.d.ts +13 -0
  90. package/dist/inputs/RadioInput.js +8 -0
  91. package/dist/inputs/SelectInput.d.ts +30 -0
  92. package/dist/inputs/SelectInput.js +8 -0
  93. package/dist/inputs/SliderInput.d.ts +15 -0
  94. package/dist/inputs/SliderInput.js +6 -0
  95. package/dist/inputs/SwitcherInput.d.ts +10 -1
  96. package/dist/inputs/SwitcherInput.js +4 -0
  97. package/dist/inputs/TextAreaInput.d.ts +24 -0
  98. package/dist/inputs/TextAreaInput.js +9 -0
  99. package/dist/inputs/TextInput.d.ts +8 -1
  100. package/dist/inputs/TextInput.js +6 -0
  101. package/dist/inputs/ToggleInput.d.ts +11 -0
  102. package/dist/inputs/ToggleInput.js +6 -0
  103. package/dist/lists/BulletedList.d.ts +4 -0
  104. package/dist/lists/BulletedList.js +2 -0
  105. package/dist/modal/Modal.d.ts +8 -0
  106. package/dist/modal/Modal.js +6 -0
  107. package/dist/overlay/OverlayProvider.d.ts +11 -0
  108. package/dist/overlay/OverlayProvider.js +7 -0
  109. package/dist/overlay/constants.d.ts +1 -0
  110. package/dist/overlay/constants.js +1 -0
  111. package/dist/overlay/useOverlay.d.ts +11 -0
  112. package/dist/overlay/useOverlay.js +9 -0
  113. package/dist/resizable/HorizontalResizeHandle.d.ts +8 -1
  114. package/dist/resizable/HorizontalResizeHandle.js +6 -0
  115. package/dist/resizable/VerticalResizeHandle.d.ts +8 -1
  116. package/dist/resizable/VerticalResizeHandle.js +6 -0
  117. package/dist/shapes/Circle.d.ts +4 -1
  118. package/dist/shapes/Circle.js +1 -0
  119. package/dist/shapes/Square.d.ts +4 -1
  120. package/dist/shapes/Square.js +1 -0
  121. package/dist/styles.css +20 -21
  122. package/dist/table/InfiniteSpreadsheet.d.ts +7 -0
  123. package/dist/table/InfiniteSpreadsheet.js +7 -0
  124. package/dist/table/InfiniteTable.d.ts +8 -0
  125. package/dist/table/InfiniteTable.js +8 -0
  126. package/dist/table/VirtualizedInfiniteTable.d.ts +7 -0
  127. package/dist/table/VirtualizedInfiniteTable.js +7 -0
  128. package/dist/text/Bold.d.ts +4 -0
  129. package/dist/text/Bold.js +4 -0
  130. package/dist/text/Code.d.ts +4 -0
  131. package/dist/text/Code.js +4 -0
  132. package/dist/text/EditableText.d.ts +10 -1
  133. package/dist/text/EditableText.js +7 -0
  134. package/dist/text/Ellipsis.d.ts +6 -4
  135. package/dist/text/Ellipsis.js +4 -0
  136. package/dist/text/HotKeys.d.ts +10 -0
  137. package/dist/text/HotKeys.js +6 -0
  138. package/dist/text/MarkdownText.d.ts +9 -1
  139. package/dist/text/MarkdownText.js +6 -0
  140. package/dist/text/Paragraph.d.ts +17 -0
  141. package/dist/text/Paragraph.js +7 -0
  142. package/dist/text/RequiredMarker.d.ts +3 -1
  143. package/dist/text/RequiredMarker.js +1 -0
  144. package/dist/text/Selectable.d.ts +4 -0
  145. package/dist/text/Selectable.js +4 -0
  146. package/dist/text/Text.d.ts +19 -0
  147. package/dist/text/Text.js +10 -0
  148. package/dist/text/TextShimmer.d.ts +7 -0
  149. package/dist/text/TextShimmer.js +4 -0
  150. package/dist/theme/GalaxyTheme.d.ts +35 -4
  151. package/dist/theme/GalaxyTheme.js +13 -1
  152. package/dist/theme/constants.d.ts +1 -6
  153. package/dist/theme/constants.js +10 -15
  154. package/dist/theme/index.js +2 -1
  155. package/dist/theme/types.d.ts +21 -0
  156. package/dist/theme/types.js +10 -0
  157. package/dist/toast/Toast.d.ts +11 -0
  158. package/dist/toast/Toast.js +5 -0
  159. package/dist/toast/ToastProvider.d.ts +9 -0
  160. package/dist/toast/ToastProvider.js +4 -0
  161. package/dist/toast/useToast.d.ts +7 -0
  162. package/dist/toast/useToast.js +7 -0
  163. package/dist/tooltip/Tooltip.d.ts +19 -1
  164. package/dist/tooltip/Tooltip.js +9 -0
  165. package/dist/transform/Fade.d.ts +7 -0
  166. package/dist/transform/Fade.js +6 -0
  167. package/dist/transform/Flash.d.ts +4 -0
  168. package/dist/transform/Flash.js +4 -0
  169. package/dist/transform/Rotate.d.ts +7 -0
  170. package/dist/transform/Rotate.js +4 -0
  171. package/dist/transform/ScaleFade.d.ts +7 -0
  172. package/dist/transform/ScaleFade.js +6 -0
  173. package/dist/transform/Spin.d.ts +7 -0
  174. package/dist/transform/Spin.js +5 -0
  175. package/dist/widget/Widget.d.ts +18 -1
  176. package/dist/widget/Widget.js +5 -0
  177. package/package.json +1 -1
@@ -1,16 +1,23 @@
1
+ /** Fill color when checked. */
1
2
  export declare enum CheckboxInputVariant {
2
3
  PRIMARY = "PRIMARY",
3
4
  SECONDARY = "SECONDARY"
4
5
  }
6
+ /** Box size. Two steps only — this is a hit target, not a type scale. */
5
7
  export declare enum CheckboxInputSize {
6
8
  SMALL = "SMALL",
7
9
  MEDIUM = "MEDIUM"
8
10
  }
9
11
  export interface CheckboxInputProps {
12
+ /** @default CheckboxInputVariant.PRIMARY */
10
13
  variant?: CheckboxInputVariant;
14
+ /** @default CheckboxInputSize.MEDIUM */
11
15
  size?: CheckboxInputSize;
16
+ /** Controlled state. The checkbox holds none of its own. */
12
17
  isChecked: boolean;
18
+ /** Draw a dash instead of a tick — for a partially-selected group. */
13
19
  isIndeterminate?: boolean;
20
+ /** Text beside the box. Omit it and set `ariaLabel` instead. */
14
21
  label?: string;
15
22
  isRequired?: boolean;
16
23
  isDisabled?: boolean;
@@ -21,5 +28,11 @@ export interface CheckboxInputProps {
21
28
  /** Stops the click from bubbling, e.g. into a clickable table row. */
22
29
  stopClickPropagation?: boolean;
23
30
  }
31
+ /**
32
+ * A checkbox with an optional label. Fully controlled — you own `isChecked`.
33
+ *
34
+ * `isIndeterminate` is purely visual and does not change what `onChange`
35
+ * reports; the callback still flips against `isChecked`.
36
+ */
24
37
  declare const CheckboxInput: ({ variant, size, isChecked, isIndeterminate, label, isRequired, isDisabled, onChange, ariaLabel, stopClickPropagation, }: CheckboxInputProps) => import("react").JSX.Element;
25
38
  export default CheckboxInput;
@@ -9,11 +9,13 @@ import { match } from "ts-pattern";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import { CheckIcon, MinusIcon } from "@phosphor-icons/react";
11
11
  //#region src/inputs/CheckboxInput.tsx
12
+ /** Fill color when checked. */
12
13
  var CheckboxInputVariant = /* @__PURE__ */ function(CheckboxInputVariant) {
13
14
  CheckboxInputVariant["PRIMARY"] = "PRIMARY";
14
15
  CheckboxInputVariant["SECONDARY"] = "SECONDARY";
15
16
  return CheckboxInputVariant;
16
17
  }({});
18
+ /** Box size. Two steps only — this is a hit target, not a type scale. */
17
19
  var CheckboxInputSize = /* @__PURE__ */ function(CheckboxInputSize) {
18
20
  CheckboxInputSize["SMALL"] = "SMALL";
19
21
  CheckboxInputSize["MEDIUM"] = "MEDIUM";
@@ -55,6 +57,12 @@ var CHECKBOX_INPUT_SIZE_TO_ICON_SIZE_MAP = {
55
57
  ["SMALL"]: 10,
56
58
  ["MEDIUM"]: 12
57
59
  };
60
+ /**
61
+ * A checkbox with an optional label. Fully controlled — you own `isChecked`.
62
+ *
63
+ * `isIndeterminate` is purely visual and does not change what `onChange`
64
+ * reports; the callback still flips against `isChecked`.
65
+ */
58
66
  var CheckboxInput = ({ variant = "PRIMARY", size = "MEDIUM", isChecked, isIndeterminate = false, label, isRequired = false, isDisabled = false, onChange, ariaLabel, stopClickPropagation = false }) => {
59
67
  const handleClick = (event) => {
60
68
  if (stopClickPropagation) event.stopPropagation();
@@ -1,20 +1,35 @@
1
1
  import { InputSize } from "./Input";
2
2
  export interface ColorInputProps {
3
3
  label?: string;
4
+ /** @default InputSize.MEDIUM */
4
5
  size?: InputSize;
6
+ /** Controlled hex value, e.g. `"#1a1a1a"`. */
5
7
  value?: string | null;
6
8
  placeholder?: string;
9
+ /** Called once the choice is committed. */
7
10
  onChange?: (value: string | null) => void;
11
+ /** Called continuously while the user drags in the picker — for live preview. */
8
12
  onPreviewChange?: (value: string | null) => void;
13
+ /** A number is px. */
9
14
  width?: number | string;
10
15
  fillWidth?: boolean;
11
16
  isDisabled?: boolean;
12
17
  isRequired?: boolean;
18
+ /** Message under the field; also switches the border to the error color. */
13
19
  error?: string;
20
+ /** Preset swatches shown above the picker. */
14
21
  pinnedHex?: string[];
22
+ /** Controlled open state. Pair it with `onOpenChange`. */
15
23
  isOpen?: boolean;
16
24
  onOpenChange?: (isOpen: boolean) => void;
25
+ /** Replaces the default trigger. The picker still opens on click. */
17
26
  children?: React.ReactNode;
18
27
  }
28
+ /**
29
+ * A hex color field with a picker popover. Fully controlled.
30
+ *
31
+ * `onPreviewChange` fires throughout the drag while `onChange` fires on commit —
32
+ * drive a live preview from the first and persist from the second.
33
+ */
19
34
  declare const ColorInput: ({ label, size, value, placeholder, onChange, onPreviewChange, width, fillWidth, isDisabled, isRequired, error, pinnedHex, isOpen: controlledIsOpen, onOpenChange, children, }: ColorInputProps) => import("react").JSX.Element;
20
35
  export default ColorInput;
@@ -133,6 +133,12 @@ var COLOR_INPUT_SIZE_TO_ICON_SIZE = {
133
133
  [InputSize.MEDIUM]: 16,
134
134
  [InputSize.LARGE]: 18
135
135
  };
136
+ /**
137
+ * A hex color field with a picker popover. Fully controlled.
138
+ *
139
+ * `onPreviewChange` fires throughout the drag while `onChange` fires on commit —
140
+ * drive a live preview from the first and persist from the second.
141
+ */
136
142
  var ColorInput = ({ label, size = InputSize.MEDIUM, value, placeholder = "Select color...", onChange, onPreviewChange, width, fillWidth = false, isDisabled = false, isRequired = false, error, pinnedHex = [], isOpen: controlledIsOpen, onOpenChange, children }) => {
137
143
  const [localState, setLocalState] = useState({
138
144
  isOpen: false,
@@ -1,13 +1,22 @@
1
1
  import { InputSize } from "./Input";
2
2
  export interface CopyInputProps {
3
+ /** The text shown and copied. Read-only — there is no `onChange`. */
3
4
  value: string;
4
5
  label?: string;
6
+ /** Adds an info icon beside the label with this content on hover. */
5
7
  labelTooltip?: string | React.ReactNode;
8
+ /** @default InputSize.MEDIUM */
6
9
  size?: InputSize;
10
+ /** A number is px. */
7
11
  width?: number | string;
8
12
  fillWidth?: boolean;
13
+ /** Render the value in the mono family — usually right for keys and IDs. */
9
14
  isMonospace?: boolean;
10
15
  }
16
+ /**
17
+ * A read-only field with a copy-to-clipboard button — API keys, IDs, share links.
18
+ * The trailing button confirms the copy itself, so you don't need to.
19
+ */
11
20
  declare const CopyInput: {
12
21
  ({ value, label, labelTooltip, size, width, fillWidth, isMonospace, }: CopyInputProps): import("react").JSX.Element;
13
22
  displayName: string;
@@ -11,6 +11,10 @@ var INPUT_SIZE_TO_BUTTON_SIZE = {
11
11
  [InputSize.MEDIUM]: ButtonSize.MEDIUM,
12
12
  [InputSize.LARGE]: ButtonSize.LARGE
13
13
  };
14
+ /**
15
+ * A read-only field with a copy-to-clipboard button — API keys, IDs, share links.
16
+ * The trailing button confirms the copy itself, so you don't need to.
17
+ */
14
18
  var CopyInput = ({ value, label, labelTooltip, size = InputSize.MEDIUM, width, fillWidth, isMonospace = false }) => {
15
19
  const [copied, setCopied] = useState(false);
16
20
  const inputRef = useRef(null);
@@ -1,19 +1,32 @@
1
1
  import { InputSize } from "./Input";
2
2
  export interface DateInputProps {
3
3
  label?: string;
4
+ /** @default InputSize.MEDIUM */
4
5
  size?: InputSize;
6
+ /** Controlled value. `null` shows the placeholder. */
5
7
  value?: Date | null;
6
8
  placeholder?: string;
9
+ /** Called with `null` when the selection is cleared. */
7
10
  onChange?: (value: Date | null) => void;
11
+ /** A number is px. */
8
12
  width?: number | string;
9
13
  fillWidth?: boolean;
10
14
  isDisabled?: boolean;
11
15
  isRequired?: boolean;
16
+ /** Message under the field; also switches the border to the error color. */
12
17
  error?: string;
18
+ /** Dates before this are not selectable. */
13
19
  minDate?: Date;
20
+ /** Dates after this are not selectable. */
14
21
  maxDate?: Date;
22
+ /** Override how the selected date reads in the trigger. */
15
23
  format?: (date: Date) => string;
16
24
  }
17
25
  export declare function defaultDateFormat(date: Date): string;
26
+ /**
27
+ * A date field with a calendar popover. Fully controlled — you own `value`.
28
+ *
29
+ * Works in `Date` objects throughout; there is no string parsing to get wrong.
30
+ */
18
31
  declare const DateInput: ({ label, size, value, placeholder, onChange, width, fillWidth, isDisabled, isRequired, error, minDate, maxDate, format, }: DateInputProps) => import("react").JSX.Element;
19
32
  export default DateInput;
@@ -152,6 +152,11 @@ function defaultDateFormat(date) {
152
152
  var getInitialViewDate = (value) => {
153
153
  return value || /* @__PURE__ */ new Date();
154
154
  };
155
+ /**
156
+ * A date field with a calendar popover. Fully controlled — you own `value`.
157
+ *
158
+ * Works in `Date` objects throughout; there is no string parsing to get wrong.
159
+ */
155
160
  var DateInput = ({ label, size = InputSize.MEDIUM, value, placeholder = "Select date...", onChange, width, fillWidth = false, isDisabled = false, isRequired = false, error, minDate = new Date(1970, 0, 1), maxDate = DEFAULT_MAX_DATE, format = defaultDateFormat }) => {
156
161
  const [state, setState] = useState({
157
162
  isOpen: false,
@@ -2,10 +2,17 @@ import { type Ref } from "react";
2
2
  import { type Icon as PhosphorIcon } from "@phosphor-icons/react";
3
3
  export interface InputLabelProps {
4
4
  label: string;
5
+ /** Adds an info icon beside the label with this content on hover. */
5
6
  labelTooltip?: string | React.ReactNode;
7
+ /** Appends the red required asterisk. */
6
8
  isRequired?: boolean;
7
9
  }
10
+ /**
11
+ * The label row every input renders above itself. Exported for building custom
12
+ * inputs that should match — the stock inputs render it from their own props.
13
+ */
8
14
  export declare const InputLabel: ({ label, labelTooltip, isRequired }: InputLabelProps) => import("react").JSX.Element;
15
+ /** Field height — 24 / 28 / 32px, matching `ButtonSize` so they line up in a row. */
9
16
  export declare enum InputSize {
10
17
  SMALL = "SMALL",
11
18
  MEDIUM = "MEDIUM",
@@ -55,39 +62,69 @@ export declare const StyledInput: import("react").ComponentType<Pick<import("rea
55
62
  } & {
56
63
  as?: React.ElementType;
57
64
  }>, {}>;
65
+ /** What an `Input` can hold. Narrowed by each wrapper — `string`, `number`, … */
58
66
  export type InputValue = string | number | readonly string[] | undefined;
67
+ /**
68
+ * The shared prop surface for every text-like input. The concrete wrappers
69
+ * (`TextInput`, `PasswordInput`, `NumberInput`, …) are `Omit`s of this, so their
70
+ * props are documented here.
71
+ */
59
72
  export interface InputProps<T> {
73
+ /** Coerces the raw string from the DOM into `T` before `onChange`. Wrappers set it. */
60
74
  parse: (value: T) => T;
75
+ /** Called with the parsed value on every keystroke. */
61
76
  onChange: (value: T) => void;
77
+ /** @default InputSize.MEDIUM */
62
78
  size?: InputSize;
79
+ /** The underlying `<input type>`. Wrappers set it. */
63
80
  type: HTMLInputElement["type"];
81
+ /** Controlled value. */
64
82
  value?: T;
65
83
  placeholder?: string;
84
+ /** Decorative icon inside the left edge. Give it `onClick` to make it a button. */
66
85
  leading?: {
67
86
  icon: PhosphorIcon;
68
87
  onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
69
88
  };
89
+ /** Action button inside the right edge — clear, reveal, copy. */
70
90
  trailing?: {
71
91
  icon: PhosphorIcon;
72
92
  onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
73
93
  isDisabled?: boolean;
74
94
  };
95
+ /** Label rendered above the field. */
75
96
  label?: string;
97
+ /** Adds an info icon beside the label with this content on hover. */
76
98
  labelTooltip?: string | React.ReactNode;
99
+ /** Message shown under the field; also switches the border to the error color. */
77
100
  error?: string;
101
+ /** Appends the red required asterisk to the label. */
78
102
  isRequired?: boolean;
79
103
  isDisabled?: boolean;
80
104
  autoFocus?: boolean;
105
+ /** Numeric bounds — only meaningful when `type` is "number". */
81
106
  min?: number;
82
107
  max?: number;
108
+ /** Stepper increment. Only meaningful when `type` is "number". */
83
109
  step?: number;
84
110
  onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
85
111
  onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
86
112
  onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
113
+ /** A number is px. Ignored when `fillWidth` is set. */
87
114
  width?: number | string;
115
+ /** Stretch to the parent's width. */
88
116
  fillWidth?: boolean;
117
+ /** Render the value in the mono family — for IDs, keys, and code. */
89
118
  isMonospace?: boolean;
90
119
  }
120
+ /**
121
+ * The generic text field every typed input wraps. Renders the label, the field,
122
+ * the leading/trailing affordances and the error line.
123
+ *
124
+ * Prefer a concrete wrapper — `TextInput`, `PasswordInput`, `NumberInput` — which
125
+ * pin `type` and `parse` for you. Use this directly only for a value type none of
126
+ * them cover.
127
+ */
91
128
  declare const Input: <T extends InputValue>(props: InputProps<T> & {
92
129
  ref?: Ref<HTMLInputElement>;
93
130
  }) => React.ReactElement;
@@ -13,6 +13,10 @@ import { forwardRef } from "react";
13
13
  import { jsx, jsxs } from "react/jsx-runtime";
14
14
  import { InfoIcon } from "@phosphor-icons/react";
15
15
  //#region src/inputs/Input.tsx
16
+ /**
17
+ * The label row every input renders above itself. Exported for building custom
18
+ * inputs that should match — the stock inputs render it from their own props.
19
+ */
16
20
  var InputLabel = ({ label, labelTooltip, isRequired }) => {
17
21
  return /* @__PURE__ */ jsxs(FlexWrapper, {
18
22
  alignItems: AlignItems.CENTER,
@@ -38,6 +42,7 @@ var InputLabel = ({ label, labelTooltip, isRequired }) => {
38
42
  ]
39
43
  });
40
44
  };
45
+ /** Field height — 24 / 28 / 32px, matching `ButtonSize` so they line up in a row. */
41
46
  var InputSize = /* @__PURE__ */ function(InputSize) {
42
47
  InputSize["SMALL"] = "SMALL";
43
48
  InputSize["MEDIUM"] = "MEDIUM";
@@ -127,6 +132,14 @@ var INPUT_SIZE_TO_ICON_SIZE_MAP = {
127
132
  ["MEDIUM"]: 14,
128
133
  ["LARGE"]: 14
129
134
  };
135
+ /**
136
+ * The generic text field every typed input wraps. Renders the label, the field,
137
+ * the leading/trailing affordances and the error line.
138
+ *
139
+ * Prefer a concrete wrapper — `TextInput`, `PasswordInput`, `NumberInput` — which
140
+ * pin `type` and `parse` for you. Use this directly only for a value type none of
141
+ * them cover.
142
+ */
130
143
  var Input = forwardRef(({ parse, onChange, size = "MEDIUM", type, value, label, labelTooltip, error, placeholder, leading, trailing, isRequired, isDisabled, autoFocus, min, max, step, onFocus, onBlur, onKeyDown, width, fillWidth, isMonospace }, ref) => {
131
144
  const handleChange = (e) => {
132
145
  onChange(parse(e.target.value));
@@ -6,34 +6,60 @@ import { SelectInputVariant, type SelectInputOption } from "./SelectInput";
6
6
  export interface PinnedOptions {
7
7
  id: string;
8
8
  label: string;
9
+ /** The `SelectInputOption.id`s this shortcut selects, all at once. */
9
10
  optionIds: string[];
10
11
  }
11
12
  export interface MultiSelectInputProps {
12
13
  label?: string;
14
+ /** Phosphor icon *component* on the trigger. */
13
15
  icon?: PhosphorIcon;
16
+ /** @default SelectInputVariant.PRIMARY */
14
17
  variant?: SelectInputVariant;
18
+ /** @default InputSize.MEDIUM */
15
19
  size?: InputSize;
20
+ /** Every choice. Order is preserved. */
16
21
  options: SelectInputOption[];
22
+ /** Controlled selection. Empty array shows the placeholder. */
17
23
  value: SelectInputOption[];
18
24
  placeholder?: string;
25
+ /** Trigger width. A number is px. */
19
26
  width?: number | string;
20
27
  fillWidth?: boolean;
28
+ /** Panel width. Defaults to matching the trigger. */
21
29
  dropdownWidth?: number | string;
30
+ /** Where the panel opens relative to the trigger. */
22
31
  dropdownPlacement?: DropdownPosition;
32
+ /** Called with the full next selection, not a delta. */
23
33
  onChange?: (value: SelectInputOption[]) => void;
24
34
  isDisabled?: boolean;
25
35
  isRequired?: boolean;
36
+ /** Controlled open state. Pair it with `onOpenChange`. */
26
37
  isOpen?: boolean;
38
+ /** Render `icon` after the label instead of before. */
27
39
  isIconTrailing?: boolean;
28
40
  onOpenChange?: (isOpen: boolean) => void;
41
+ /** Adds a clear button to the trigger. */
29
42
  onReset?: () => void;
43
+ /** Shortcut rows that select several options at once. */
30
44
  pinnedOptions?: PinnedOptions[];
45
+ /** How many selections to name before collapsing to "+N more". */
31
46
  maxDisplayItems?: number;
47
+ /** Replace the trigger's summary string. */
32
48
  renderSelectedText?: (selectedOptions: SelectInputOption[], placeholder: string) => string;
49
+ /** Replace the trigger's summary entirely — chips, avatars, whatever. */
33
50
  renderSelectedContent?: (selectedOptions: SelectInputOption[], placeholder: string) => ReactNode;
51
+ /** Message under the field; also switches the border to the error color. */
34
52
  error?: string;
53
+ /** Supplying this turns the trigger into a search box. Return the filtered list. */
35
54
  onSearch?: (searchTerm: string, options: SelectInputOption[]) => SelectInputOption[];
55
+ /** Debounce before `onSearch` fires, in ms. @default 300 */
36
56
  debounceMs?: number;
37
57
  }
58
+ /**
59
+ * Multi-choice dropdown. Same option shape and search contract as `SelectInput`,
60
+ * but the panel stays open across picks and the trigger summarizes what's chosen.
61
+ *
62
+ * Controlled: `onChange` hands back the complete next selection, not a delta.
63
+ */
38
64
  declare const MultiSelectInput: ({ label, icon, variant, size, options, value, placeholder, onChange, width, fillWidth, dropdownWidth, dropdownPlacement, isDisabled, isRequired, isOpen: controlledIsOpen, isIconTrailing, onOpenChange, onReset, pinnedOptions, maxDisplayItems, renderSelectedText, renderSelectedContent, error, onSearch, debounceMs, }: MultiSelectInputProps) => import("react").JSX.Element;
39
65
  export default MultiSelectInput;
@@ -131,6 +131,12 @@ var SELECT_INPUT_VARIANT_TO_CHECKBOX_INPUT_VARIANT = {
131
131
  [SelectInputVariant.SECONDARY]: CheckboxInputVariant.SECONDARY,
132
132
  [SelectInputVariant.TERTIARY]: CheckboxInputVariant.PRIMARY
133
133
  };
134
+ /**
135
+ * Multi-choice dropdown. Same option shape and search contract as `SelectInput`,
136
+ * but the panel stays open across picks and the trigger summarizes what's chosen.
137
+ *
138
+ * Controlled: `onChange` hands back the complete next selection, not a delta.
139
+ */
134
140
  var MultiSelectInput = ({ label, icon, variant = SelectInputVariant.PRIMARY, size = InputSize.MEDIUM, options, value, placeholder = "Select options...", onChange, width, fillWidth, dropdownWidth, dropdownPlacement = DropdownPosition.BOTTOM_START, isDisabled = false, isRequired = false, isOpen: controlledIsOpen, isIconTrailing, onOpenChange, onReset, pinnedOptions = [], maxDisplayItems = 3, renderSelectedText, renderSelectedContent, error, onSearch, debounceMs = 300 }) => {
135
141
  const isSearchable = !!onSearch;
136
142
  const [isHovered, setIsHovered] = useState(false);
@@ -1,27 +1,43 @@
1
+ /** Field height. */
1
2
  export declare enum MultiTextInputSize {
2
3
  SMALL = "SMALL",
3
4
  MEDIUM = "MEDIUM",
4
5
  LARGE = "LARGE"
5
6
  }
7
+ /** Color of the chips created from entered values. */
6
8
  export declare enum MultiTextInputVariant {
7
9
  PRIMARY = "PRIMARY",
8
10
  SECONDARY = "SECONDARY",
9
11
  TERTIARY = "TERTIARY"
10
12
  }
11
13
  export interface MultiTextInputProps {
14
+ /** Controlled list of entered values, one chip each. */
12
15
  value: string[];
16
+ /** Called with the full next list, not a delta. */
13
17
  onChange: (value: string[]) => void;
18
+ /** @default MultiTextInputVariant.PRIMARY */
14
19
  variant?: MultiTextInputVariant;
20
+ /** @default MultiTextInputSize.MEDIUM */
15
21
  size?: MultiTextInputSize;
16
22
  placeholder?: string;
17
23
  label?: string;
24
+ /** Message under the field; also switches the border to the error color. */
18
25
  error?: string;
19
26
  isRequired?: boolean;
20
27
  isDisabled?: boolean;
21
28
  autoFocus?: boolean;
29
+ /** A number is px. Ignored when `fillWidth` is set. */
22
30
  width?: number | string;
23
31
  fillWidth?: boolean;
32
+ /** Typing this character commits the draft as a chip. @default "," */
24
33
  separator?: string;
25
34
  }
35
+ /**
36
+ * A free-text field that turns each entry into a removable chip — tags, emails,
37
+ * arbitrary lists. Commit with Enter or the `separator` character.
38
+ *
39
+ * The in-progress draft is internal state and is *not* part of `value`; it only
40
+ * lands there once committed.
41
+ */
26
42
  declare const MultiTextInput: import("react").ForwardRefExoticComponent<MultiTextInputProps & import("react").RefAttributes<HTMLInputElement>>;
27
43
  export default MultiTextInput;
@@ -10,12 +10,14 @@ import { match } from "ts-pattern";
10
10
  import { forwardRef, useCallback, useRef, useState } from "react";
11
11
  import { jsx, jsxs } from "react/jsx-runtime";
12
12
  //#region src/inputs/MultiTextInput.tsx
13
+ /** Field height. */
13
14
  var MultiTextInputSize = /* @__PURE__ */ function(MultiTextInputSize) {
14
15
  MultiTextInputSize["SMALL"] = "SMALL";
15
16
  MultiTextInputSize["MEDIUM"] = "MEDIUM";
16
17
  MultiTextInputSize["LARGE"] = "LARGE";
17
18
  return MultiTextInputSize;
18
19
  }({});
20
+ /** Color of the chips created from entered values. */
19
21
  var MultiTextInputVariant = /* @__PURE__ */ function(MultiTextInputVariant) {
20
22
  MultiTextInputVariant["PRIMARY"] = "PRIMARY";
21
23
  MultiTextInputVariant["SECONDARY"] = "SECONDARY";
@@ -76,6 +78,13 @@ var StyledInput = withTheme(/*#__PURE__*/ styled("input")({
76
78
  "s190irv4-5": [_exp12()]
77
79
  }
78
80
  }));
81
+ /**
82
+ * A free-text field that turns each entry into a removable chip — tags, emails,
83
+ * arbitrary lists. Commit with Enter or the `separator` character.
84
+ *
85
+ * The in-progress draft is internal state and is *not* part of `value`; it only
86
+ * lands there once committed.
87
+ */
79
88
  var MultiTextInput = forwardRef(({ value, onChange, variant = "PRIMARY", size = "MEDIUM", placeholder, label, error, isRequired, isDisabled, autoFocus, width, fillWidth, separator = "," }, ref) => {
80
89
  const [inputValue, setInputValue] = useState("");
81
90
  const [isFocused, setIsFocused] = useState(false);
@@ -1,4 +1,10 @@
1
1
  import { type InputProps } from "./Input";
2
- type NumberInputProps = Omit<InputProps<number>, "type" | "parse">;
2
+ /** Every `InputProps` field except `type` and `parse`, which are fixed to number. */
3
+ export type NumberInputProps = Omit<InputProps<number>, "type" | "parse">;
4
+ /**
5
+ * A numeric field. `min`/`max` are a real numeric range here (unlike `TextInput`,
6
+ * where they bound character count) and values outside it are clamped, not
7
+ * rejected — `onChange` only ever sees an in-range number.
8
+ */
3
9
  declare const NumberInput: ({ value, placeholder, label, size, leading, trailing, isRequired, isDisabled, min, max, step, onChange, width, fillWidth, }: NumberInputProps) => import("react").JSX.Element;
4
10
  export default NumberInput;
@@ -2,6 +2,11 @@ import Input from "./Input.js";
2
2
  import { useCallback } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/inputs/NumberInput.tsx
5
+ /**
6
+ * A numeric field. `min`/`max` are a real numeric range here (unlike `TextInput`,
7
+ * where they bound character count) and values outside it are clamped, not
8
+ * rejected — `onChange` only ever sees an in-range number.
9
+ */
5
10
  var NumberInput = ({ value, placeholder, label, size, leading, trailing, isRequired, isDisabled, min, max, step, onChange, width, fillWidth }) => {
6
11
  return /* @__PURE__ */ jsx(Input, {
7
12
  type: "number",
@@ -1,4 +1,12 @@
1
1
  import { type InputProps } from "./Input";
2
- type PasswordInputProps = Omit<InputProps<string>, "type" | "parse" | "action">;
2
+ /**
3
+ * Every `InputProps` field except `type` and `parse`, which are fixed. The
4
+ * trailing slot is used by the reveal toggle, so passing `trailing` has no effect.
5
+ */
6
+ export type PasswordInputProps = Omit<InputProps<string>, "type" | "parse" | "action">;
7
+ /**
8
+ * A masked text field with a built-in reveal toggle in the trailing slot.
9
+ * Toggling only flips the DOM `type` — the value is never transformed.
10
+ */
3
11
  declare const PasswordInput: import("react").ForwardRefExoticComponent<PasswordInputProps & import("react").RefAttributes<HTMLInputElement>>;
4
12
  export default PasswordInput;
@@ -4,6 +4,10 @@ import { jsx } from "react/jsx-runtime";
4
4
  import { EyeIcon, EyeSlashIcon } from "@phosphor-icons/react";
5
5
  //#region src/inputs/PasswordInput.tsx
6
6
  var DEFAULT_STATE = { showPassword: false };
7
+ /**
8
+ * A masked text field with a built-in reveal toggle in the trailing slot.
9
+ * Toggling only flips the DOM `type` — the value is never transformed.
10
+ */
7
11
  var PasswordInput = forwardRef(({ size = InputSize.MEDIUM, value, placeholder, label, leading, error, isRequired, isDisabled, autoFocus, onChange, width, fillWidth, onKeyDown, onBlur, onFocus }, ref) => {
8
12
  const [state, setState] = useState(DEFAULT_STATE);
9
13
  return /* @__PURE__ */ jsx(Input, {
@@ -1,20 +1,33 @@
1
+ /** Fill color of the dot when selected. */
1
2
  export declare enum RadioInputVariant {
2
3
  PRIMARY = "PRIMARY",
3
4
  SECONDARY = "SECONDARY"
4
5
  }
6
+ /** Circle size. Two steps only — this is a hit target, not a type scale. */
5
7
  export declare enum RadioInputSize {
6
8
  SMALL = "SMALL",
7
9
  MEDIUM = "MEDIUM"
8
10
  }
9
11
  export interface RadioInputProps {
12
+ /** @default RadioInputVariant.PRIMARY */
10
13
  variant?: RadioInputVariant;
14
+ /** @default RadioInputSize.MEDIUM */
11
15
  size?: RadioInputSize;
16
+ /** Controlled state. The radio holds none of its own. */
12
17
  isSelected: boolean;
18
+ /** Text beside the circle. */
13
19
  label?: string;
20
+ /** Adds an info icon beside the label with this content on hover. */
14
21
  labelTooltip?: string | React.ReactNode;
15
22
  isRequired?: boolean;
16
23
  isDisabled?: boolean;
17
24
  onChange: (selected: boolean) => void;
18
25
  }
26
+ /**
27
+ * A single radio button with an optional label. Fully controlled.
28
+ *
29
+ * There is no group component — render several and enforce single-selection in
30
+ * your own state.
31
+ */
19
32
  declare const RadioInput: ({ variant, size, isSelected, label, labelTooltip, isRequired, isDisabled, onChange, }: RadioInputProps) => import("react").JSX.Element;
20
33
  export default RadioInput;
@@ -11,11 +11,13 @@ import { match } from "ts-pattern";
11
11
  import { jsx, jsxs } from "react/jsx-runtime";
12
12
  import { InfoIcon } from "@phosphor-icons/react";
13
13
  //#region src/inputs/RadioInput.tsx
14
+ /** Fill color of the dot when selected. */
14
15
  var RadioInputVariant = /* @__PURE__ */ function(RadioInputVariant) {
15
16
  RadioInputVariant["PRIMARY"] = "PRIMARY";
16
17
  RadioInputVariant["SECONDARY"] = "SECONDARY";
17
18
  return RadioInputVariant;
18
19
  }({});
20
+ /** Circle size. Two steps only — this is a hit target, not a type scale. */
19
21
  var RadioInputSize = /* @__PURE__ */ function(RadioInputSize) {
20
22
  RadioInputSize["SMALL"] = "SMALL";
21
23
  RadioInputSize["MEDIUM"] = "MEDIUM";
@@ -68,6 +70,12 @@ var RadioDot = withTheme(/*#__PURE__*/ styled("div")({
68
70
  "r137y8ev-3": [_exp10()]
69
71
  }
70
72
  }));
73
+ /**
74
+ * A single radio button with an optional label. Fully controlled.
75
+ *
76
+ * There is no group component — render several and enforce single-selection in
77
+ * your own state.
78
+ */
71
79
  var RadioInput = ({ variant = "PRIMARY", size = "MEDIUM", isSelected, label, labelTooltip, isRequired = false, isDisabled = false, onChange }) => {
72
80
  const handleClick = () => {
73
81
  if (!isDisabled) onChange(!isSelected);