@galaxy-io/dls 1.4.10 → 1.4.12

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 (184) 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.d.ts +4 -1
  20. package/dist/charts/BarChart.js +17 -8
  21. package/dist/charts/ChartCategoryTargets.d.ts +5 -12
  22. package/dist/charts/ChartCategoryTargets.js +1 -2
  23. package/dist/charts/ChartFrame.d.ts +3 -4
  24. package/dist/charts/ChartFrame.js +10 -25
  25. package/dist/charts/ChartLegend.js +26 -23
  26. package/dist/charts/ChartPrimitives.d.ts +38 -17
  27. package/dist/charts/ChartPrimitives.js +74 -73
  28. package/dist/charts/DashboardProvider.d.ts +57 -0
  29. package/dist/charts/DashboardProvider.js +30 -0
  30. package/dist/charts/LineChart.js +2 -1
  31. package/dist/charts/PieChart.js +1 -1
  32. package/dist/charts/ProgressBar.d.ts +13 -1
  33. package/dist/charts/ProgressBar.js +7 -0
  34. package/dist/charts/StatChart.d.ts +10 -1
  35. package/dist/charts/StatChart.js +5 -0
  36. package/dist/charts/constants.d.ts +20 -24
  37. package/dist/charts/constants.js +21 -25
  38. package/dist/charts/types.d.ts +10 -2
  39. package/dist/charts/types.js +9 -1
  40. package/dist/charts/useChartInteraction.d.ts +37 -10
  41. package/dist/charts/useChartInteraction.js +72 -12
  42. package/dist/chips/Chip.d.ts +20 -1
  43. package/dist/chips/Chip.js +9 -1
  44. package/dist/containers/FlexItem.d.ts +14 -12
  45. package/dist/containers/FlexItem.js +4 -0
  46. package/dist/containers/FlexWrapper.d.ts +29 -96
  47. package/dist/containers/FlexWrapper.js +12 -0
  48. package/dist/containers/GridWrapper.d.ts +25 -66
  49. package/dist/containers/GridWrapper.js +8 -0
  50. package/dist/containers/Spacing.d.ts +10 -0
  51. package/dist/containers/Spacing.js +7 -0
  52. package/dist/containers/Wrapper.d.ts +11 -1
  53. package/dist/containers/Wrapper.js +4 -0
  54. package/dist/dividers/HorizontalDivider.d.ts +2 -0
  55. package/dist/dividers/HorizontalDivider.js +1 -0
  56. package/dist/dividers/VerticalDivider.d.ts +4 -0
  57. package/dist/dividers/VerticalDivider.js +4 -0
  58. package/dist/drawer/Drawer.d.ts +11 -4
  59. package/dist/drawer/Drawer.js +7 -0
  60. package/dist/dropdown/Dropdown.d.ts +24 -0
  61. package/dist/dropdown/Dropdown.js +9 -0
  62. package/dist/editor/CodeEditor.d.ts +23 -42
  63. package/dist/editor/CodeEditor.js +9 -1
  64. package/dist/hooks/useDismiss.d.ts +6 -0
  65. package/dist/hooks/useDismiss.js +6 -0
  66. package/dist/hooks/useElementClientSize.d.ts +2 -2
  67. package/dist/hooks/useResize.d.ts +5 -2
  68. package/dist/icons/GalaxyLogomark.d.ts +9 -1
  69. package/dist/icons/GalaxyLogomark.js +7 -1
  70. package/dist/icons/GalaxyLogomark3D.d.ts +15 -0
  71. package/dist/icons/GalaxyLogomark3D.js +9 -0
  72. package/dist/icons/GalaxyLogomarkAnimation.d.ts +10 -0
  73. package/dist/icons/GalaxyLogomarkAnimation.js +7 -1
  74. package/dist/icons/GalaxyWordmark.d.ts +7 -1
  75. package/dist/icons/GalaxyWordmark.js +5 -1
  76. package/dist/icons/Icon.d.ts +10 -0
  77. package/dist/icons/Icon.js +5 -0
  78. package/dist/inputs/CheckboxInput.d.ts +13 -0
  79. package/dist/inputs/CheckboxInput.js +8 -0
  80. package/dist/inputs/ColorInput.d.ts +15 -0
  81. package/dist/inputs/ColorInput.js +6 -0
  82. package/dist/inputs/CopyInput.d.ts +9 -0
  83. package/dist/inputs/CopyInput.js +4 -0
  84. package/dist/inputs/DateInput.d.ts +13 -0
  85. package/dist/inputs/DateInput.js +5 -0
  86. package/dist/inputs/Input.d.ts +37 -0
  87. package/dist/inputs/Input.js +13 -0
  88. package/dist/inputs/MultiSelectInput.d.ts +26 -0
  89. package/dist/inputs/MultiSelectInput.js +6 -0
  90. package/dist/inputs/MultiTextInput.d.ts +16 -0
  91. package/dist/inputs/MultiTextInput.js +9 -0
  92. package/dist/inputs/NumberInput.d.ts +7 -1
  93. package/dist/inputs/NumberInput.js +5 -0
  94. package/dist/inputs/PasswordInput.d.ts +9 -1
  95. package/dist/inputs/PasswordInput.js +4 -0
  96. package/dist/inputs/RadioInput.d.ts +13 -0
  97. package/dist/inputs/RadioInput.js +8 -0
  98. package/dist/inputs/SelectInput.d.ts +30 -0
  99. package/dist/inputs/SelectInput.js +8 -0
  100. package/dist/inputs/SliderInput.d.ts +15 -0
  101. package/dist/inputs/SliderInput.js +6 -0
  102. package/dist/inputs/SwitcherInput.d.ts +10 -1
  103. package/dist/inputs/SwitcherInput.js +4 -0
  104. package/dist/inputs/TextAreaInput.d.ts +24 -0
  105. package/dist/inputs/TextAreaInput.js +9 -0
  106. package/dist/inputs/TextInput.d.ts +8 -1
  107. package/dist/inputs/TextInput.js +6 -0
  108. package/dist/inputs/ToggleInput.d.ts +11 -0
  109. package/dist/inputs/ToggleInput.js +6 -0
  110. package/dist/lists/BulletedList.d.ts +4 -0
  111. package/dist/lists/BulletedList.js +2 -0
  112. package/dist/modal/Modal.d.ts +8 -0
  113. package/dist/modal/Modal.js +6 -0
  114. package/dist/overlay/OverlayProvider.d.ts +11 -0
  115. package/dist/overlay/OverlayProvider.js +7 -0
  116. package/dist/overlay/constants.d.ts +1 -0
  117. package/dist/overlay/constants.js +1 -0
  118. package/dist/overlay/useOverlay.d.ts +11 -0
  119. package/dist/overlay/useOverlay.js +9 -0
  120. package/dist/resizable/HorizontalResizeHandle.d.ts +8 -1
  121. package/dist/resizable/HorizontalResizeHandle.js +6 -0
  122. package/dist/resizable/VerticalResizeHandle.d.ts +8 -1
  123. package/dist/resizable/VerticalResizeHandle.js +6 -0
  124. package/dist/shapes/Circle.d.ts +4 -1
  125. package/dist/shapes/Circle.js +1 -0
  126. package/dist/shapes/Square.d.ts +4 -1
  127. package/dist/shapes/Square.js +1 -0
  128. package/dist/styles.css +14 -14
  129. package/dist/table/InfiniteSpreadsheet.d.ts +7 -0
  130. package/dist/table/InfiniteSpreadsheet.js +7 -0
  131. package/dist/table/InfiniteTable.d.ts +8 -0
  132. package/dist/table/InfiniteTable.js +8 -0
  133. package/dist/table/VirtualizedInfiniteTable.d.ts +7 -0
  134. package/dist/table/VirtualizedInfiniteTable.js +7 -0
  135. package/dist/text/Bold.d.ts +4 -0
  136. package/dist/text/Bold.js +4 -0
  137. package/dist/text/Code.d.ts +4 -0
  138. package/dist/text/Code.js +4 -0
  139. package/dist/text/EditableText.d.ts +10 -1
  140. package/dist/text/EditableText.js +7 -0
  141. package/dist/text/Ellipsis.d.ts +6 -4
  142. package/dist/text/Ellipsis.js +4 -0
  143. package/dist/text/HotKeys.d.ts +10 -0
  144. package/dist/text/HotKeys.js +6 -0
  145. package/dist/text/MarkdownText.d.ts +9 -1
  146. package/dist/text/MarkdownText.js +6 -0
  147. package/dist/text/Paragraph.d.ts +17 -0
  148. package/dist/text/Paragraph.js +7 -0
  149. package/dist/text/RequiredMarker.d.ts +3 -1
  150. package/dist/text/RequiredMarker.js +1 -0
  151. package/dist/text/Selectable.d.ts +4 -0
  152. package/dist/text/Selectable.js +4 -0
  153. package/dist/text/Text.d.ts +19 -0
  154. package/dist/text/Text.js +10 -0
  155. package/dist/text/TextShimmer.d.ts +7 -0
  156. package/dist/text/TextShimmer.js +4 -0
  157. package/dist/theme/GalaxyTheme.d.ts +35 -4
  158. package/dist/theme/GalaxyTheme.js +13 -1
  159. package/dist/theme/constants.d.ts +1 -6
  160. package/dist/theme/constants.js +10 -15
  161. package/dist/theme/index.js +2 -1
  162. package/dist/theme/types.d.ts +21 -0
  163. package/dist/theme/types.js +10 -0
  164. package/dist/toast/Toast.d.ts +11 -0
  165. package/dist/toast/Toast.js +5 -0
  166. package/dist/toast/ToastProvider.d.ts +9 -0
  167. package/dist/toast/ToastProvider.js +4 -0
  168. package/dist/toast/useToast.d.ts +7 -0
  169. package/dist/toast/useToast.js +7 -0
  170. package/dist/tooltip/Tooltip.d.ts +19 -1
  171. package/dist/tooltip/Tooltip.js +9 -0
  172. package/dist/transform/Fade.d.ts +7 -0
  173. package/dist/transform/Fade.js +6 -0
  174. package/dist/transform/Flash.d.ts +4 -0
  175. package/dist/transform/Flash.js +4 -0
  176. package/dist/transform/Rotate.d.ts +7 -0
  177. package/dist/transform/Rotate.js +4 -0
  178. package/dist/transform/ScaleFade.d.ts +7 -0
  179. package/dist/transform/ScaleFade.js +6 -0
  180. package/dist/transform/Spin.d.ts +7 -0
  181. package/dist/transform/Spin.js +5 -0
  182. package/dist/widget/Widget.d.ts +18 -1
  183. package/dist/widget/Widget.js +5 -0
  184. package/package.json +1 -1
@@ -10,12 +10,14 @@ import { match } from "ts-pattern";
10
10
  import { forwardRef, useState } from "react";
11
11
  import { jsx, jsxs } from "react/jsx-runtime";
12
12
  //#region src/inputs/TextAreaInput.tsx
13
+ /** Text size and inset density. Row count comes from `lines`, not from this. */
13
14
  var TextAreaSize = /* @__PURE__ */ function(TextAreaSize) {
14
15
  TextAreaSize["SMALL"] = "SMALL";
15
16
  TextAreaSize["MEDIUM"] = "MEDIUM";
16
17
  TextAreaSize["LARGE"] = "LARGE";
17
18
  return TextAreaSize;
18
19
  }({});
20
+ /** Background treatment. `TRANSPARENT` is for embedding in an existing surface. */
19
21
  var TextAreaVariant = /* @__PURE__ */ function(TextAreaVariant) {
20
22
  TextAreaVariant["TRANSPARENT"] = "TRANSPARENT";
21
23
  TextAreaVariant["BASE"] = "BASE";
@@ -146,6 +148,13 @@ var TEXTAREA_SIZE_TO_SHIMMER_HEIGHT_MAP = {
146
148
  ["MEDIUM"]: 14,
147
149
  ["LARGE"]: 16
148
150
  };
151
+ /**
152
+ * A multi-line text field. Not resizable by the user — size it with `lines`,
153
+ * `height`, or `fillHeight`.
154
+ *
155
+ * Note this one takes `required`/`disabled` rather than the `isRequired`/
156
+ * `isDisabled` the other inputs use.
157
+ */
149
158
  var TextAreaInput = forwardRef(({ variant = "PRIMARY", size = "MEDIUM", lines = 3, value, min, max, placeholder, label, labelTooltip, error, required, disabled, autoFocus, onChange, onKeyDown, onBlur, onFocus, width, height, fillWidth, fillHeight, noBorder, noPadding, isLoading }, ref) => {
150
159
  const [state, setState] = useState(DEFAULT_STATE);
151
160
  const handleFocus = (e) => {
@@ -1,4 +1,11 @@
1
1
  import { type InputProps } from "./Input";
2
- type TextInputProps = Omit<InputProps<string>, "type" | "parse">;
2
+ /** Every `InputProps` field except `type` and `parse`, which are fixed to text. */
3
+ export type TextInputProps = Omit<InputProps<string>, "type" | "parse">;
4
+ /**
5
+ * A single-line text field. The default input.
6
+ *
7
+ * `min`/`max` bound the *character count*, not a numeric range — the field
8
+ * validates length on blur and shows its own error. A `error` you pass wins.
9
+ */
3
10
  declare const TextInput: import("react").ForwardRefExoticComponent<TextInputProps & import("react").RefAttributes<HTMLInputElement>>;
4
11
  export default TextInput;
@@ -3,6 +3,12 @@ import { forwardRef, useState } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/inputs/TextInput.tsx
5
5
  var DEFAULT_STATE = { error: "" };
6
+ /**
7
+ * A single-line text field. The default input.
8
+ *
9
+ * `min`/`max` bound the *character count*, not a numeric range — the field
10
+ * validates length on blur and shows its own error. A `error` you pass wins.
11
+ */
6
12
  var TextInput = forwardRef(({ size, value, min, max, placeholder, label, labelTooltip, leading, trailing, error, isRequired, isDisabled, autoFocus, onChange, onKeyDown, onBlur, fillWidth, width, isMonospace }, ref) => {
7
13
  const [state, setState] = useState(DEFAULT_STATE);
8
14
  const handleFocus = () => {
@@ -1,11 +1,22 @@
1
1
  export interface ToggleInputProps {
2
+ /** Label rendered above the switch, like the other inputs. */
2
3
  label?: string;
4
+ /** Adds an info icon beside the label with this content on hover. */
3
5
  labelTooltip?: string | React.ReactNode;
6
+ /** Controlled state. The switch holds none of its own. */
4
7
  value: boolean;
5
8
  onChange: (value: boolean) => void;
6
9
  isDisabled?: boolean;
10
+ /** A number is px. Ignored when `fillWidth` is set. */
7
11
  width?: number | string;
12
+ /** Stretch to the parent's width, pushing the switch to the right edge. */
8
13
  fillWidth?: boolean;
9
14
  }
15
+ /**
16
+ * An on/off switch. Fully controlled — you own `value`.
17
+ *
18
+ * Use it for settings that apply immediately. For something that only takes
19
+ * effect on submit, a `CheckboxInput` reads more honestly.
20
+ */
10
21
  declare const ToggleInput: ({ label, labelTooltip, value, onChange, isDisabled, width, fillWidth, }: ToggleInputProps) => import("react").JSX.Element;
11
22
  export default ToggleInput;
@@ -44,6 +44,12 @@ var HiddenInput = /*#__PURE__*/ styled("input")({
44
44
  class: "h1smouvb",
45
45
  propsAsIs: false
46
46
  });
47
+ /**
48
+ * An on/off switch. Fully controlled — you own `value`.
49
+ *
50
+ * Use it for settings that apply immediately. For something that only takes
51
+ * effect on submit, a `CheckboxInput` reads more honestly.
52
+ */
47
53
  var ToggleInput = ({ label, labelTooltip, value, onChange, isDisabled = false, width, fillWidth }) => {
48
54
  const handleClick = useCallback(() => {
49
55
  if (!isDisabled) onChange(!value);
@@ -1,11 +1,15 @@
1
+ /** Item text size — maps onto the matching `TextSize` step. */
1
2
  export declare enum BulletedListSize {
2
3
  SMALL = "SMALL",
3
4
  MEDIUM = "MEDIUM",
4
5
  LARGE = "LARGE"
5
6
  }
6
7
  export interface BulletedListProps {
8
+ /** One string per bullet. Plain text only — no nesting, no rich content. */
7
9
  items: string[];
10
+ /** @default BulletedListSize.MEDIUM */
8
11
  size?: BulletedListSize;
9
12
  }
13
+ /** An unordered list of plain strings, each rendered through `Text`. */
10
14
  declare const BulletedList: ({ items, size }: BulletedListProps) => import("react").JSX.Element;
11
15
  export default BulletedList;
@@ -20,6 +20,7 @@ var StyledBulletedListItem = /*#__PURE__*/ styled("li")({
20
20
  class: "s13x8jj4",
21
21
  propsAsIs: false
22
22
  });
23
+ /** Item text size — maps onto the matching `TextSize` step. */
23
24
  var BulletedListSize = /* @__PURE__ */ function(BulletedListSize) {
24
25
  BulletedListSize["SMALL"] = "SMALL";
25
26
  BulletedListSize["MEDIUM"] = "MEDIUM";
@@ -31,6 +32,7 @@ var BULLETED_LIST_SIZE_TO_TEXT_SIZE_MAP = {
31
32
  ["MEDIUM"]: TextSize.BODY_MD,
32
33
  ["LARGE"]: TextSize.BODY_LG
33
34
  };
35
+ /** An unordered list of plain strings, each rendered through `Text`. */
34
36
  var BulletedList = ({ items, size = "MEDIUM" }) => {
35
37
  return /* @__PURE__ */ jsx(StyledBulletedList, { children: items.map((item, index) => /* @__PURE__ */ jsx(StyledBulletedListItem, { children: /* @__PURE__ */ jsx(Text, {
36
38
  size: BULLETED_LIST_SIZE_TO_TEXT_SIZE_MAP[size],
@@ -1,7 +1,15 @@
1
1
  import { type PropsWithChildren } from "react";
2
2
  export interface ModalProps {
3
+ /** Controlled visibility. The modal has no open state of its own. */
3
4
  open: boolean;
5
+ /** Called on Escape and on backdrop click. */
4
6
  onClose: () => void;
5
7
  }
8
+ /**
9
+ * A centered dialog over a dimmed backdrop. Fully controlled — you own `open`.
10
+ *
11
+ * Stacking and Escape handling come from `OverlayProvider`, so only the topmost
12
+ * overlay closes on Escape. Wrap your app in that provider.
13
+ */
6
14
  declare const Modal: ({ open, onClose, children }: PropsWithChildren<ModalProps>) => import("react").ReactPortal;
7
15
  export default Modal;
@@ -28,6 +28,12 @@ var ModalContentWrapper = /*#__PURE__*/ styled("div")({
28
28
  class: "m1jgo9vf",
29
29
  propsAsIs: false
30
30
  });
31
+ /**
32
+ * A centered dialog over a dimmed backdrop. Fully controlled — you own `open`.
33
+ *
34
+ * Stacking and Escape handling come from `OverlayProvider`, so only the topmost
35
+ * overlay closes on Escape. Wrap your app in that provider.
36
+ */
31
37
  var Modal = ({ open, onClose, children }) => {
32
38
  const { zIndex, isTopmost } = useOverlay(onClose, open, { layer: OverlayLayer.MODAL });
33
39
  const handleContentClick = useCallback((e) => {
@@ -1,5 +1,6 @@
1
1
  import { type PropsWithChildren } from "react";
2
2
  import { OverlayLayer } from "./constants";
3
+ /** One registered overlay in the stack. */
3
4
  export interface OverlayEntry {
4
5
  id: string;
5
6
  onDismiss: () => void;
@@ -7,8 +8,11 @@ export interface OverlayEntry {
7
8
  dismissOnOverlayClick: boolean;
8
9
  zIndex: number;
9
10
  }
11
+ /** Options for `useOverlay`'s third argument. */
10
12
  export interface OverlayRegisterOptions {
13
+ /** Stacking tier. Modals always sit above drawers. @default OverlayLayer.MODAL */
11
14
  layer?: OverlayLayer;
15
+ /** Call `onDismiss` when the shared backdrop is clicked. */
12
16
  dismissOnOverlayClick?: boolean;
13
17
  }
14
18
  export interface OverlayInfo {
@@ -21,6 +25,13 @@ export interface OverlayContextValue {
21
25
  overlays: OverlayEntry[];
22
26
  }
23
27
  export declare const OverlayContext: import("react").Context<OverlayContextValue | null>;
28
+ /**
29
+ * Coordinates every `Modal` and `Drawer` on the page. Mount it once near the
30
+ * root, above anything that opens an overlay.
31
+ *
32
+ * Renders one shared backdrop for the whole stack and routes Escape to the
33
+ * topmost overlay only, so nesting a modal over a drawer behaves.
34
+ */
24
35
  export declare const OverlayProvider: ({ children }: PropsWithChildren) => import("react").JSX.Element;
25
36
  export default OverlayProvider;
26
37
  export { getOverlayZIndex, OVERLAY_LAYER_PRIORITY, OVERLAY_Z_INDEX, OVERLAY_Z_INDEX_BASE, OVERLAY_Z_INDEX_STEP, OverlayLayer, } from "./constants";
@@ -28,6 +28,13 @@ var SharedOverlay = withTheme(/*#__PURE__*/ styled("div")({
28
28
  "s1hpu3t7-6": [_exp7()]
29
29
  }
30
30
  }));
31
+ /**
32
+ * Coordinates every `Modal` and `Drawer` on the page. Mount it once near the
33
+ * root, above anything that opens an overlay.
34
+ *
35
+ * Renders one shared backdrop for the whole stack and routes Escape to the
36
+ * topmost overlay only, so nesting a modal over a drawer behaves.
37
+ */
31
38
  var OverlayProvider = ({ children }) => {
32
39
  const [overlays, setOverlays] = useState([]);
33
40
  const zIndexCounterRef = useRef(0);
@@ -1,3 +1,4 @@
1
+ /** Which stacking tier an overlay belongs to. Modals always sit above drawers. */
1
2
  export declare enum OverlayLayer {
2
3
  DRAWER = "DRAWER",
3
4
  MODAL = "MODAL"
@@ -1,4 +1,5 @@
1
1
  //#region src/overlay/constants.ts
2
+ /** Which stacking tier an overlay belongs to. Modals always sit above drawers. */
2
3
  var OverlayLayer = /* @__PURE__ */ function(OverlayLayer) {
3
4
  OverlayLayer["DRAWER"] = "DRAWER";
4
5
  OverlayLayer["MODAL"] = "MODAL";
@@ -1,7 +1,18 @@
1
1
  import { type OverlayRegisterOptions } from "./OverlayProvider";
2
2
  export interface UseOverlayReturn {
3
+ /** The z-index to render this overlay at. Assigned by its position in the stack. */
3
4
  zIndex: number;
5
+ /** True when nothing is stacked above. Only the topmost overlay should act on Escape. */
4
6
  isTopmost: boolean;
5
7
  }
8
+ /**
9
+ * Registers an overlay in the global stack and returns its z-index and whether
10
+ * it's on top. `Modal` and `Drawer` use it internally — reach for it only when
11
+ * building your own overlay that must interleave correctly with theirs.
12
+ *
13
+ * Registration follows `enabled`, so pass your `open` flag straight through.
14
+ * Falls back to a computed top-of-stack z-index when there's no
15
+ * `OverlayProvider`, so it degrades rather than throwing.
16
+ */
6
17
  export declare const useOverlay: (onDismiss: () => void, enabled: boolean, options?: OverlayRegisterOptions) => UseOverlayReturn;
7
18
  export default useOverlay;
@@ -2,6 +2,15 @@ import { OVERLAY_Z_INDEX_BASE } from "./constants.js";
2
2
  import { OverlayContext } from "./OverlayProvider.js";
3
3
  import { useContext, useEffect, useId } from "react";
4
4
  //#region src/overlay/useOverlay.ts
5
+ /**
6
+ * Registers an overlay in the global stack and returns its z-index and whether
7
+ * it's on top. `Modal` and `Drawer` use it internally — reach for it only when
8
+ * building your own overlay that must interleave correctly with theirs.
9
+ *
10
+ * Registration follows `enabled`, so pass your `open` flag straight through.
11
+ * Falls back to a computed top-of-stack z-index when there's no
12
+ * `OverlayProvider`, so it degrades rather than throwing.
13
+ */
5
14
  var useOverlay = (onDismiss, enabled, options) => {
6
15
  const context = useContext(OverlayContext);
7
16
  const id = useId();
@@ -1,10 +1,17 @@
1
1
  import type { Icon as PhosphorIcon } from "@phosphor-icons/react";
2
- interface HorizontalResizeHandleProps {
2
+ export interface HorizontalResizeHandleProps {
3
+ /** Not implemented — the component ignores it. */
3
4
  icon?: PhosphorIcon;
4
5
  onMouseDown?: (e: React.MouseEvent<HTMLDivElement>) => void;
5
6
  onMouseUp?: (e: React.MouseEvent<HTMLDivElement>) => void;
6
7
  onMouseMove?: (e: React.MouseEvent<HTMLDivElement>) => void;
7
8
  onMouseEnter?: (e: React.MouseEvent<HTMLDivElement>) => void;
8
9
  }
10
+ /**
11
+ * The grab bar for resizing a pane vertically (it spans horizontally, dragging
12
+ * up and down). Absolutely positioned — give it a `position: relative` parent.
13
+ *
14
+ * Presentation only: wire the handlers to `useResize` to move anything.
15
+ */
9
16
  declare const HorizontalResizeHandle: ({ onMouseDown, onMouseUp, onMouseMove, onMouseEnter, }: HorizontalResizeHandleProps) => import("react").JSX.Element;
10
17
  export default HorizontalResizeHandle;
@@ -20,6 +20,12 @@ var HorizontalResizeHandleStyled = withTheme(/*#__PURE__*/ styled("div")({
20
20
  "hvnpu6g-4": [_exp5()]
21
21
  }
22
22
  }));
23
+ /**
24
+ * The grab bar for resizing a pane vertically (it spans horizontally, dragging
25
+ * up and down). Absolutely positioned — give it a `position: relative` parent.
26
+ *
27
+ * Presentation only: wire the handlers to `useResize` to move anything.
28
+ */
23
29
  var HorizontalResizeHandle = ({ onMouseDown, onMouseUp, onMouseMove, onMouseEnter }) => {
24
30
  return /* @__PURE__ */ jsx(HorizontalResizeHandleStyled, {
25
31
  onMouseDown,
@@ -1,5 +1,6 @@
1
1
  import type { Icon as PhosphorIcon } from "@phosphor-icons/react";
2
- interface VerticalResizeHandleProps {
2
+ export interface VerticalResizeHandleProps {
3
+ /** Not implemented — the component ignores it. */
3
4
  icon?: PhosphorIcon;
4
5
  onMouseDown?: (e: React.MouseEvent<HTMLDivElement>) => void;
5
6
  onMouseUp?: (e: React.MouseEvent<HTMLDivElement>) => void;
@@ -7,5 +8,11 @@ interface VerticalResizeHandleProps {
7
8
  onMouseEnter?: (e: React.MouseEvent<HTMLDivElement>) => void;
8
9
  onMouseLeave?: (e: React.MouseEvent<HTMLDivElement>) => void;
9
10
  }
11
+ /**
12
+ * The grab bar for resizing a pane horizontally (it spans vertically, dragging
13
+ * left and right). Absolutely positioned — give it a `position: relative` parent.
14
+ *
15
+ * Presentation only: wire the handlers to `useResize` to move anything.
16
+ */
10
17
  declare const VerticalResizeHandle: ({ onMouseDown, onMouseUp, onMouseMove, onMouseEnter, onMouseLeave, }: VerticalResizeHandleProps) => import("react").JSX.Element;
11
18
  export default VerticalResizeHandle;
@@ -20,6 +20,12 @@ var VerticalResizeHandleStyled = withTheme(/*#__PURE__*/ styled("div")({
20
20
  "v1ha5e5c-4": [_exp5()]
21
21
  }
22
22
  }));
23
+ /**
24
+ * The grab bar for resizing a pane horizontally (it spans vertically, dragging
25
+ * left and right). Absolutely positioned — give it a `position: relative` parent.
26
+ *
27
+ * Presentation only: wire the handlers to `useResize` to move anything.
28
+ */
23
29
  var VerticalResizeHandle = ({ onMouseDown, onMouseUp, onMouseMove, onMouseEnter, onMouseLeave }) => {
24
30
  return /* @__PURE__ */ jsx(VerticalResizeHandleStyled, {
25
31
  onMouseDown,
@@ -1,6 +1,9 @@
1
- interface CircleProps {
1
+ export interface CircleProps {
2
+ /** Diameter. A number is px. */
2
3
  size: number | string;
4
+ /** Fill color. @default theme.color.text.tertiary */
3
5
  hex?: string;
4
6
  }
7
+ /** A filled dot. Used for status indicators and legend swatches. */
5
8
  declare const Circle: ({ size, hex }: CircleProps) => import("react").JSX.Element;
6
9
  export default Circle;
@@ -15,6 +15,7 @@ var CircleWrapper = withTheme(/*#__PURE__*/ styled("div")({
15
15
  "cmbdg2q-1": [_exp3()]
16
16
  }
17
17
  }));
18
+ /** A filled dot. Used for status indicators and legend swatches. */
18
19
  var Circle = ({ size, hex }) => {
19
20
  return /* @__PURE__ */ jsx(CircleWrapper, {
20
21
  $size: size,
@@ -1,6 +1,9 @@
1
- interface SquareProps {
1
+ export interface SquareProps {
2
+ /** Side length. A number is px. */
2
3
  size: number | string;
4
+ /** Fill color. @default theme.color.text.tertiary */
3
5
  hex?: string;
4
6
  }
7
+ /** A filled square. Used for legend swatches and color chips. */
5
8
  declare const Square: ({ size, hex }: SquareProps) => import("react").JSX.Element;
6
9
  export default Square;
@@ -15,6 +15,7 @@ var SquareWrapper = withTheme(/*#__PURE__*/ styled("div")({
15
15
  "s1ibzzfh-1": [_exp3()]
16
16
  }
17
17
  }));
18
+ /** A filled square. Used for legend swatches and color chips. */
18
19
  var Square = ({ size, hex }) => {
19
20
  return /* @__PURE__ */ jsx(SquareWrapper, {
20
21
  $size: size,
package/dist/styles.css CHANGED
@@ -24,16 +24,16 @@
24
24
  .c1hcga6s{position:relative;display:var(--c1hcga6s-0);-webkit-flex-direction:var(--c1hcga6s-1);-ms-flex-direction:var(--c1hcga6s-1);flex-direction:var(--c1hcga6s-1);-webkit-align-items:var(--c1hcga6s-2);-webkit-box-align:var(--c1hcga6s-2);-ms-flex-align:var(--c1hcga6s-2);align-items:var(--c1hcga6s-2);-webkit-box-pack:var(--c1hcga6s-3);-ms-flex-pack:var(--c1hcga6s-3);-webkit-justify-content:var(--c1hcga6s-3);justify-content:var(--c1hcga6s-3);width:var(--c1hcga6s-4);min-width:0;height:var(--c1hcga6s-5);min-height:0;}
25
25
  .c1fvbgkp{position:relative;width:var(--c1fvbgkp-0);min-width:0;aspect-ratio:var(--c1fvbgkp-1);height:var(--c1fvbgkp-2);-webkit-flex:var(--c1fvbgkp-3);-ms-flex:var(--c1fvbgkp-3);flex:var(--c1fvbgkp-3);min-height:var(--c1fvbgkp-4);}
26
26
  .c10uj5yt{display:block;overflow:visible;}
27
- .cyuty3o[data-active="true"] rect,.cyuty3o[data-active="true"] path,.cyuty3o[data-active="true"] circle{transition-delay:0ms;}
28
- .c1ob2op2{opacity:1;-webkit-transition:opacity 100ms ease-in-out 200ms;transition:opacity 100ms ease-in-out 200ms;}.c1ob2op2[data-state="muted"]{opacity:0.1;}@media (prefers-reduced-motion: reduce){.c1ob2op2{-webkit-transition:none;transition:none;}}
29
- .c8c506o{fill:none;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;opacity:1;-webkit-transition:opacity 100ms ease-in-out 200ms;transition:opacity 100ms ease-in-out 200ms;}.c8c506o[data-state="muted"]{opacity:0.1;}@media (prefers-reduced-motion: reduce){.c8c506o{-webkit-transition:none;transition:none;}}
30
- .ceqlpek{stroke:none;pointer-events:none;opacity:1;-webkit-transition:opacity 100ms ease-in-out 200ms;transition:opacity 100ms ease-in-out 200ms;}.ceqlpek[data-state="muted"]{opacity:0.1;}@media (prefers-reduced-motion: reduce){.ceqlpek{-webkit-transition:none;transition:none;}}
31
- .c1fcbddl{pointer-events:none;opacity:1;-webkit-transition:opacity 100ms ease-in-out 200ms;transition:opacity 100ms ease-in-out 200ms;}.c1fcbddl[data-state="muted"]{opacity:0.1;}@media (prefers-reduced-motion: reduce){.c1fcbddl{-webkit-transition:none;transition:none;}}
32
- .cpcxr59{opacity:1;-webkit-transition:opacity 100ms ease-in-out 200ms;transition:opacity 100ms ease-in-out 200ms;}.cpcxr59[data-state="muted"]{opacity:0.1;}@media (prefers-reduced-motion: reduce){.cpcxr59{-webkit-transition:none;transition:none;}}
27
+ .cyuty3o{opacity:1;}.cyuty3o[data-state="muted"]{opacity:0.1;}.cyuty3o[data-state="dimmed"]{opacity:0.4;}
28
+ .c1ob2op2{fill:none;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;opacity:1;}.c1ob2op2[data-state="muted"]{opacity:0.1;}.c1ob2op2[data-state="dimmed"]{opacity:0.4;}
29
+ .c8c506o{stroke:none;pointer-events:none;opacity:1;}.c8c506o[data-state="muted"]{opacity:0.1;}.c8c506o[data-state="dimmed"]{opacity:0.4;}
30
+ .ceqlpek{pointer-events:none;opacity:1;}.ceqlpek[data-state="muted"]{opacity:0.1;}.ceqlpek[data-state="dimmed"]{opacity:0.4;}
31
+ .c1fcbddl{opacity:1;}.c1fcbddl[data-state="muted"]{opacity:0.1;}.c1fcbddl[data-state="dimmed"]{opacity:0.4;}
32
+ .cpcxr59{fill:transparent;outline:none;}
33
33
  .c1wvzvu4{fill:transparent;outline:none;}
34
- .c17guewt{fill:transparent;outline:none;}
35
- .cblgiyf{stroke:var(--cblgiyf-0);shape-rendering:crispEdges;}
36
- .c1lr03cc{stroke:var(--c1lr03cc-0);pointer-events:none;}
34
+ .c17guewt{stroke:var(--c17guewt-0);shape-rendering:crispEdges;}
35
+ .cblgiyf{stroke:var(--cblgiyf-0);pointer-events:none;}
36
+ .c1lr03cc{fill:var(--c1lr03cc-0);pointer-events:none;}
37
37
  .cizy1s8{overflow:visible;pointer-events:none;}
38
38
  .c1ukq11d{position:absolute;z-index:10;pointer-events:none;left:var(--c1ukq11d-0);top:var(--c1ukq11d-1);min-width:168px;max-width:320px;padding:10px 12px;border:0.5px solid var(--c1ukq11d-2);border-radius:6px;background-color:var(--c1ukq11d-3);opacity:var(--c1ukq11d-4);-webkit-transition:opacity 100ms ease-in-out,left 100ms ease-out,top 100ms ease-out;transition:opacity 100ms ease-in-out,left 100ms ease-out,top 100ms ease-out;}@media (prefers-reduced-motion: reduce){.c1ukq11d{-webkit-transition:none;transition:none;}}
39
39
  .cwcko2m{display:-ms-grid;display:grid;-ms-grid-columns:minmax(0, 1fr) auto;grid-template-columns:minmax(0, 1fr) auto;-webkit-column-gap:16px;column-gap:16px;row-gap:6px;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;}
@@ -41,11 +41,11 @@
41
41
  .c1iaray{text-align:right;white-space:nowrap;}
42
42
  .cz6jod1{position:absolute;left:var(--cz6jod1-0);top:var(--cz6jod1-1);width:var(--cz6jod1-2);height:var(--cz6jod1-2);-webkit-transform:translate(-50%, -50%);-moz-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);transform:translate(-50%, -50%);pointer-events:none;text-align:center;}
43
43
  .c1de5mqk{position:absolute;top:38%;left:50%;-webkit-transform:translate(-50%, -50%);-moz-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);transform:translate(-50%, -50%);max-width:60%;padding:6px 8px;border:0.5px solid var(--c1de5mqk-0);border-radius:6px;background-color:var(--c1de5mqk-1);pointer-events:none;text-align:center;}
44
- .cjirv6a{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:var(--cjirv6a-0);-ms-flex-direction:var(--cjirv6a-0);flex-direction:var(--cjirv6a-0);-webkit-box-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-align-items:var(--cjirv6a-1);-webkit-box-align:var(--cjirv6a-1);-ms-flex-align:var(--cjirv6a-1);align-items:var(--cjirv6a-1);-webkit-box-pack:var(--cjirv6a-2);-ms-flex-pack:var(--cjirv6a-2);-webkit-justify-content:var(--cjirv6a-2);justify-content:var(--cjirv6a-2);gap:var(--cjirv6a-3);width:var(--cjirv6a-4);min-width:var(--cjirv6a-5);height:var(--cjirv6a-6);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;padding-top:var(--cjirv6a-7);padding-left:var(--cjirv6a-8);}.cjirv6a[data-active="true"] [data-state]{transition-delay:0ms;}
45
- .c1armna5{position:absolute;visibility:hidden;pointer-events:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:var(--c1armna5-0);-ms-flex-direction:var(--c1armna5-0);flex-direction:var(--c1armna5-0);-webkit-box-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-align-items:var(--c1armna5-1);-webkit-box-align:var(--c1armna5-1);-ms-flex-align:var(--c1armna5-1);align-items:var(--c1armna5-1);gap:var(--c1armna5-2);width:-webkit-max-content;width:-moz-max-content;width:max-content;height:-webkit-max-content;height:-moz-max-content;height:max-content;white-space:nowrap;}
46
- .cgd77rv{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;gap:8px;max-height:208px;overflow-y:auto;}.cgd77rv[data-active="true"] [data-state]{transition-delay:0ms;}
47
- .cutidpi{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;cursor:default;border-radius:2px;opacity:1;-webkit-transition:opacity 100ms ease-in-out 200ms;transition:opacity 100ms ease-in-out 200ms;}.cutidpi[data-state="muted"]{opacity:0.1;}@media (prefers-reduced-motion: reduce){.cutidpi{-webkit-transition:none;transition:none;}}.cutidpi:focus-visible{outline:1.5px solid currentColor;outline-offset:2px;}
48
- .ccpczg{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;opacity:1;-webkit-transition:opacity 100ms ease-in-out 200ms;transition:opacity 100ms ease-in-out 200ms;}.ccpczg[data-state="muted"]{opacity:0.1;}@media (prefers-reduced-motion: reduce){.ccpczg{-webkit-transition:none;transition:none;}}
44
+ .cjirv6a{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:var(--cjirv6a-0);-ms-flex-direction:var(--cjirv6a-0);flex-direction:var(--cjirv6a-0);-webkit-box-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-align-items:var(--cjirv6a-1);-webkit-box-align:var(--cjirv6a-1);-ms-flex-align:var(--cjirv6a-1);align-items:var(--cjirv6a-1);-webkit-box-pack:var(--cjirv6a-2);-ms-flex-pack:var(--cjirv6a-2);-webkit-justify-content:var(--cjirv6a-2);justify-content:var(--cjirv6a-2);width:var(--cjirv6a-3);min-width:var(--cjirv6a-4);height:var(--cjirv6a-5);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;padding-top:var(--cjirv6a-6);padding-left:var(--cjirv6a-7);}
45
+ .c1armna5{position:absolute;visibility:hidden;pointer-events:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:var(--c1armna5-0);-ms-flex-direction:var(--c1armna5-0);flex-direction:var(--c1armna5-0);-webkit-box-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-align-items:var(--c1armna5-1);-webkit-box-align:var(--c1armna5-1);-ms-flex-align:var(--c1armna5-1);align-items:var(--c1armna5-1);width:-webkit-max-content;width:-moz-max-content;width:max-content;height:-webkit-max-content;height:-moz-max-content;height:max-content;white-space:nowrap;}
46
+ .cgd77rv{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;max-height:208px;overflow-y:auto;}
47
+ .cutidpi{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:none;border:0;padding:var(--cutidpi-0);margin:0;font:inherit;color:inherit;cursor:default;border-radius:2px;opacity:1;}.cutidpi[data-state="muted"]{opacity:0.1;}.cutidpi[data-state="dimmed"]{opacity:0.4;}.cutidpi:focus-visible{outline:1.5px solid currentColor;outline-offset:2px;}
48
+ .ccpczg{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:6px;padding:var(--ccpczg-0);opacity:1;}.ccpczg[data-state="muted"]{opacity:0.1;}.ccpczg[data-state="dimmed"]{opacity:0.4;}
49
49
  .cmbdg2q{width:var(--cmbdg2q-0);height:var(--cmbdg2q-0);border-radius:50%;background-color:var(--cmbdg2q-1);}
50
50
  .tbnx4ok{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
51
51
  .tjda4tq{display:inline-block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content;padding:var(--tjda4tq-0);background-color:var(--tjda4tq-1);border:var(--tjda4tq-2);border-radius:5px;}
@@ -2,5 +2,12 @@ import { type InfiniteSpreadsheetProps } from "./types";
2
2
  export { ColumnAlign, ColumnPin, ColumnResizeMode, TableDensity, TableVariant } from "./types";
3
3
  export type { ColumnSizingState, EditingCell, InfiniteSpreadsheetProps, Row, SpreadsheetColumnAction, SpreadsheetColumnDef, SpreadsheetHeaderAction, SpreadsheetRowAction, SpreadsheetRowsContext, } from "./types";
4
4
  export { CellEnrichmentStatus, SpreadsheetCellType } from "./types";
5
+ /**
6
+ * An editable grid — cell-level editing, keyboard navigation between cells, and
7
+ * per-row actions, over the same infinite-scroll machinery as `InfiniteTable`.
8
+ *
9
+ * Reach for this when cells are inputs. When the data is read-only, the tables
10
+ * are lighter.
11
+ */
5
12
  declare function InfiniteSpreadsheet<TData>(props: InfiniteSpreadsheetProps<TData>): import("react").JSX.Element;
6
13
  export default InfiniteSpreadsheet;
@@ -18,6 +18,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
18
18
  import { PlusIcon } from "@phosphor-icons/react";
19
19
  import { useVirtualizer } from "@tanstack/react-virtual";
20
20
  //#region src/table/InfiniteSpreadsheet.tsx
21
+ /**
22
+ * An editable grid — cell-level editing, keyboard navigation between cells, and
23
+ * per-row actions, over the same infinite-scroll machinery as `InfiniteTable`.
24
+ *
25
+ * Reach for this when cells are inputs. When the data is read-only, the tables
26
+ * are lighter.
27
+ */
21
28
  function InfiniteSpreadsheet(props) {
22
29
  const { columns, totalRowCount, getRowData, getRowId, height, width, fillWidth, fillHeight, density = TableDensity.MEDIUM, variant = TableVariant.PRIMARY, estimateRowHeight, overscan = 25, hasNextPage, isFetchingNextPage, fetchNextPage, isLoading = false, isError = false, error, loadingRowCount = 5, contentWhenEmpty, contentWhenError, noHeader = false, noLastRowBorder = false, noLastRowPadding = false, enableColumnResizing = true, columnSizing, defaultColumnSizing, onColumnSizingChange, columnResizeMode = ColumnResizeMode.ON_CHANGE, ariaLabel, ariaLabelledBy, onAddColumn, addColumnAriaLabel = "Add column", rowActions, getRowActionsAriaLabel, editingCell: controlledEditingCell, onEditingCellChange, enableRowFocus = true } = props;
23
30
  const scrollContainerRef = useRef(null);
@@ -4,6 +4,14 @@ import { type InfiniteTableProps } from "./types";
4
4
  export { ColumnAlign, ColumnPin, ColumnResizeMode, TableDensity, TableVariant } from "./types";
5
5
  export type { ColumnDef, ColumnSizingState, EstimateColumnWidthOptions, InfiniteTableProps, Row, } from "./types";
6
6
  export { estimateColumnWidth } from "./utils";
7
+ /**
8
+ * A data table with infinite scroll, sorting, row selection, expandable rows and
9
+ * resizable columns. Define the shape with `ColumnDef[]`; `TData` is inferred
10
+ * from your row type.
11
+ *
12
+ * Renders every loaded row. Past a few thousand rows reach for
13
+ * `VirtualizedInfiniteTable`, which shares the same column and row API.
14
+ */
7
15
  declare function InfiniteTable<TData>(props: InfiniteTableProps<TData>): React.JSX.Element;
8
16
  export default InfiniteTable;
9
17
  export type { TanstackTable as Table };
@@ -18,6 +18,14 @@ import React, { useCallback, useEffect, useId, useMemo, useRef } from "react";
18
18
  import { jsx, jsxs } from "react/jsx-runtime";
19
19
  import { flexRender, getCoreRowModel, getExpandedRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
20
20
  //#region src/table/InfiniteTable.tsx
21
+ /**
22
+ * A data table with infinite scroll, sorting, row selection, expandable rows and
23
+ * resizable columns. Define the shape with `ColumnDef[]`; `TData` is inferred
24
+ * from your row type.
25
+ *
26
+ * Renders every loaded row. Past a few thousand rows reach for
27
+ * `VirtualizedInfiniteTable`, which shares the same column and row API.
28
+ */
21
29
  function InfiniteTable(props) {
22
30
  const { columns, data, getRowId, height, width, fillWidth, fillHeight, density = TableDensity.MEDIUM, variant = TableVariant.PRIMARY, hasNextPage, isFetchingNextPage, fetchNextPage, enableRowSelection, enableMultiRowSelection = true, rowSelection, defaultRowSelection, onRowSelectionChange, onSelectedRowsChange, showSelectionColumn = false, selectionColumnPin = ColumnPin.LEFT, enableSelectAll, enableSelectionRange = true, selectAllAriaLabel = "Select all rows", getRowSelectAriaLabel, enableSorting = false, enableMultiSort = false, sorting, onSortingChange, manualSorting = false, isLoading = false, isError = false, error, loadingRowCount = 5, contentWhenEmpty, contentWhenError, noHeader = false, noLastRowBorder = false, noLastRowPadding = false, onRowClick, onRowDoubleClick, onRowActivate, onRowExpand, expandedRowIds, defaultExpandedRowIds, onExpandedChange, getRowCanExpand, enableMultiRowExpansion = true, showExpandColumn = true, expandColumnPin = ColumnPin.LEFT, enableColumnResizing = false, columnSizing, defaultColumnSizing, onColumnSizingChange, columnResizeMode = ColumnResizeMode.ON_CHANGE, ariaLabel, ariaLabelledBy, getRowAriaLabel, enableRowFocus, onTableReady } = props;
23
31
  const instanceId = useId();
@@ -8,5 +8,12 @@ export type { ColumnDef, ColumnSizingState, Row, VirtualizedInfiniteTableProps }
8
8
  * resolves.
9
9
  */
10
10
  export type InfiniteTableProps<TData> = VirtualizedInfiniteTableProps<TData>;
11
+ /**
12
+ * `InfiniteTable` with row virtualization — only the visible window is in the
13
+ * DOM, so it stays responsive at tens of thousands of rows.
14
+ *
15
+ * The trade is a fixed row height and no natural content sizing. Prefer plain
16
+ * `InfiniteTable` until row count actually becomes the problem.
17
+ */
11
18
  declare function VirtualizedInfiniteTable<TData>(props: VirtualizedInfiniteTableProps<TData>): React.JSX.Element;
12
19
  export default VirtualizedInfiniteTable;
@@ -42,6 +42,13 @@ function VirtualizedRowInner({ rowData, rowIndex, translateY, rowHeight, density
42
42
  });
43
43
  }
44
44
  var VirtualizedRow = React.memo(VirtualizedRowInner);
45
+ /**
46
+ * `InfiniteTable` with row virtualization — only the visible window is in the
47
+ * DOM, so it stays responsive at tens of thousands of rows.
48
+ *
49
+ * The trade is a fixed row height and no natural content sizing. Prefer plain
50
+ * `InfiniteTable` until row count actually becomes the problem.
51
+ */
45
52
  function VirtualizedInfiniteTable(props) {
46
53
  const { columns, totalRowCount, getRowData, getRowId, height, width, fillWidth, fillHeight, density = TableDensity.MEDIUM, variant = TableVariant.PRIMARY, estimateRowHeight, overscan = 25, hasNextPage, isFetchingNextPage, fetchNextPage, isLoading = false, isError = false, error, loadingRowCount = 5, contentWhenEmpty, contentWhenError, noHeader = false, noLastRowBorder = false, noLastRowPadding = false, enableColumnResizing = false, columnSizing, defaultColumnSizing, onColumnSizingChange, columnResizeMode = ColumnResizeMode.ON_CHANGE, ariaLabel, ariaLabelledBy, onRowClick } = props;
47
54
  const scrollContainerRef = useRef(null);
@@ -1,3 +1,7 @@
1
1
  import type { PropsWithChildren } from "react";
2
+ /**
3
+ * Bumps its children to the medium weight. Nest it inside a `Text` to emphasize
4
+ * part of a string — DLS has only two weights, so this is as bold as type gets.
5
+ */
2
6
  declare const Bold: ({ children }: PropsWithChildren) => import("react").JSX.Element;
3
7
  export default Bold;
package/dist/text/Bold.js CHANGED
@@ -10,6 +10,10 @@ var StyledBoldText = withTheme(/*#__PURE__*/ styled("span")({
10
10
  propsAsIs: false,
11
11
  vars: { "s10i74tu-0": [_exp()] }
12
12
  }));
13
+ /**
14
+ * Bumps its children to the medium weight. Nest it inside a `Text` to emphasize
15
+ * part of a string — DLS has only two weights, so this is as bold as type gets.
16
+ */
13
17
  var Bold = ({ children }) => {
14
18
  return /* @__PURE__ */ jsx(StyledBoldText, { children });
15
19
  };
@@ -1,3 +1,7 @@
1
1
  import type { PropsWithChildren } from "react";
2
+ /**
3
+ * Inline code — mono family on a tinted, hairline-bordered chip. Nest it inside
4
+ * a `Text` for identifiers and literals in prose.
5
+ */
2
6
  declare const Code: ({ children }: PropsWithChildren) => import("react").JSX.Element;
3
7
  export default Code;
package/dist/text/Code.js CHANGED
@@ -20,6 +20,10 @@ var StyledCodeText = withTheme(/*#__PURE__*/ styled("span")({
20
20
  "sdpyy92-4": [_exp5()]
21
21
  }
22
22
  }));
23
+ /**
24
+ * Inline code — mono family on a tinted, hairline-bordered chip. Nest it inside
25
+ * a `Text` for identifiers and literals in prose.
26
+ */
23
27
  var Code = ({ children }) => {
24
28
  return /* @__PURE__ */ jsx(StyledCodeText, { children });
25
29
  };
@@ -1,7 +1,16 @@
1
1
  import { type TextProps } from "./Text";
2
- type EditableTextProps = TextProps & {
2
+ export type EditableTextProps = TextProps & {
3
+ /** Current text. Also the value the field resets to on cancel. */
3
4
  label: string;
5
+ /** Called with the new text when the edit is committed. */
4
6
  onSave: (text: string) => void;
5
7
  };
8
+ /**
9
+ * Click-to-edit text. Renders as `Text` until clicked, then swaps to an inline
10
+ * input. Accepts every `TextProps` styling prop on top of its own.
11
+ *
12
+ * Holds the draft internally and only calls `onSave` on commit, so it works as
13
+ * an uncontrolled field — `label` is the starting value, not a bound one.
14
+ */
6
15
  declare const EditableText: ({ label, onSave, size, variant, weight, align, isMonospace, ...textProps }: EditableTextProps) => import("react").JSX.Element;
7
16
  export default EditableText;
@@ -50,6 +50,13 @@ var EditableTextText = withTheme(/*#__PURE__*/ styled("span")({
50
50
  propsAsIs: false,
51
51
  vars: { "e1j2x5d3-0": [_exp9()] }
52
52
  }));
53
+ /**
54
+ * Click-to-edit text. Renders as `Text` until clicked, then swaps to an inline
55
+ * input. Accepts every `TextProps` styling prop on top of its own.
56
+ *
57
+ * Holds the draft internally and only calls `onSave` on commit, so it works as
58
+ * an uncontrolled field — `label` is the starting value, not a bound one.
59
+ */
53
60
  var EditableText = ({ label, onSave, size = TextSize.BODY_MD, variant = TextVariant.PRIMARY, weight = TextWeight.REGULAR, align = "left", isMonospace = false, ...textProps }) => {
54
61
  const [state, setState] = useState(() => ({
55
62
  localLabel: label,
@@ -1,10 +1,12 @@
1
1
  export interface EllipsisProps {
2
+ /** Animate the dots. Static when false. */
2
3
  isPulse?: boolean;
3
- /**
4
- * The speed of the pulse animation in seconds.
5
- * @default 1.4
6
- */
4
+ /** Duration of one pulse cycle in seconds. @default 1 */
7
5
  speed?: number;
8
6
  }
7
+ /**
8
+ * Three dots that pulse in sequence — the "…thinking" affordance. Renders the
9
+ * literal characters, so it aligns with adjacent text rather than a spinner.
10
+ */
9
11
  declare const Ellipsis: ({ isPulse, speed }: EllipsisProps) => import("react").JSX.Element;
10
12
  export default Ellipsis;
@@ -13,6 +13,10 @@ var StyledEllipsis = /*#__PURE__*/ styled("span")({
13
13
  "szfsuud-1": [_exp2()]
14
14
  }
15
15
  });
16
+ /**
17
+ * Three dots that pulse in sequence — the "…thinking" affordance. Renders the
18
+ * literal characters, so it aligns with adjacent text rather than a spinner.
19
+ */
16
20
  var Ellipsis = ({ isPulse = false, speed = 1 }) => {
17
21
  return /* @__PURE__ */ jsxs(StyledEllipsis, {
18
22
  $isPulse: isPulse,