@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
@@ -7,6 +7,7 @@ import { useState } from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import Tippy from "@tippyjs/react";
9
9
  //#region src/dropdown/Dropdown.tsx
10
+ /** Surface treatment of the dropdown panel. */
10
11
  var DropdownVariant = /* @__PURE__ */ function(DropdownVariant) {
11
12
  DropdownVariant["TRANSPARENT"] = "TRANSPARENT";
12
13
  DropdownVariant["BASE"] = "BASE";
@@ -15,6 +16,7 @@ var DropdownVariant = /* @__PURE__ */ function(DropdownVariant) {
15
16
  DropdownVariant["TERTIARY"] = "TERTIARY";
16
17
  return DropdownVariant;
17
18
  }({});
19
+ /** Placement relative to the trigger. The `AUTO_*` values pick a side that fits. */
18
20
  var DropdownPosition = /* @__PURE__ */ function(DropdownPosition) {
19
21
  DropdownPosition["TOP"] = "top";
20
22
  DropdownPosition["BOTTOM"] = "bottom";
@@ -33,6 +35,7 @@ var DropdownPosition = /* @__PURE__ */ function(DropdownPosition) {
33
35
  DropdownPosition["AUTO_END"] = "auto-end";
34
36
  return DropdownPosition;
35
37
  }({});
38
+ /** What opens the panel. `MANUAL` hands control entirely to `isOpen`. */
36
39
  var DropdownTrigger = /* @__PURE__ */ function(DropdownTrigger) {
37
40
  DropdownTrigger["CLICK"] = "click";
38
41
  DropdownTrigger["HOVER"] = "hover";
@@ -79,6 +82,12 @@ var DropdownTriggerWrapper = /*#__PURE__*/ styled("span")({
79
82
  "dfdzgmt-2": [_exp0()]
80
83
  }
81
84
  });
85
+ /**
86
+ * A panel anchored to a trigger. Children are the trigger.
87
+ *
88
+ * Uncontrolled by default. Pass `isOpen` *and* `onClose` to drive it yourself —
89
+ * useful when a selection inside the body should close it.
90
+ */
82
91
  var Dropdown = ({ children, variant = "BASE", header, body, footer, position = "bottom-start", offset = [0, 6], minWidth, maxWidth, isOpen: controlledIsOpen, onClose, noPadding = false, noBorder = false, fillWidth = false, isDisabled = false }) => {
83
92
  const [internalIsOpen, setInternalIsOpen] = useState(false);
84
93
  const isControlled = controlledIsOpen !== void 0;
@@ -1,68 +1,49 @@
1
1
  import { Extension } from "@codemirror/state";
2
2
  import { LanguageName } from "@uiw/codemirror-extensions-langs";
3
- import { GalaxyTheme } from "../theme/constants";
4
- import { Theme } from "../theme/types";
3
+ import { GalaxyTheme, Theme } from "../theme/types";
4
+ /** Background treatment of the editor surface. */
5
5
  export declare enum CodeEditorVariant {
6
6
  BASE = "BASE",
7
7
  PRIMARY = "PRIMARY",
8
8
  SECONDARY = "SECONDARY",
9
9
  TERTIARY = "TERTIARY"
10
10
  }
11
+ /** A CodeMirror language name — "sql", "json", "python", … */
11
12
  export type CodeEditorLanguage = LanguageName;
12
- type CodeEditorProps = {
13
- /**
14
- * The content of the code editor.
15
- */
13
+ export type CodeEditorProps = {
14
+ /** Editor contents. Controlled — pair it with `onChange`. */
16
15
  content: string;
17
- /**
18
- * The placeholder of the code editor.
19
- */
16
+ /** Shown when `content` is empty. */
20
17
  placeholder?: string;
21
- /**
22
- * The content type of the code editor.
23
- */
18
+ /** Syntax highlighting mode. Plain text when unset. */
24
19
  lang?: CodeEditorLanguage;
25
- /**
26
- * Whether the code editor is read only.
27
- */
20
+ /** Render contents without allowing edits. */
28
21
  isReadOnly?: boolean;
29
- /**
30
- * Whether to show line numbers.
31
- */
22
+ /** Hide the line-number gutter. */
32
23
  noLineNumbers?: boolean;
33
- /**
34
- * Custom CodeMirror extensions to add to the editor.
35
- * Use this for template decorations, custom keymaps, etc.
36
- */
24
+ /** Extra CodeMirror extensions — decorations, keymaps, autocomplete sources. */
37
25
  customExtensions?: Extension[];
38
- /**
39
- * Callback fired when the content changes.
40
- */
26
+ /** Called with the full document on every keystroke. */
41
27
  onChange?: (value: string) => void;
42
- /**
43
- * Callback fired when Cmd/Ctrl+Enter is pressed.
44
- */
28
+ /** Called on Cmd/Ctrl+Enter — the "run this" shortcut. */
45
29
  onExecute?: () => void;
46
- /**
47
- * Border radius for the editor wrapper.
48
- */
30
+ /** A number is px. */
49
31
  borderRadius?: string | number;
50
- /**
51
- * Whether to show a border around the editor.
52
- */
32
+ /** Drop the hairline border. */
53
33
  noBorder?: boolean;
54
- /**
55
- * Sets the padding inside the code editor content area.
56
- * Can be a number (for pixels) or a string (for other units).
57
- */
34
+ /** Inset around the content area. A number is px. */
58
35
  padding?: React.CSSProperties["padding"];
59
- /**
60
- * The background color variant of the code editor.
61
- * Defaults to PRIMARY.
62
- */
36
+ /** @default CodeEditorVariant.PRIMARY */
63
37
  variant?: CodeEditorVariant;
64
38
  };
65
39
  export declare function createSearchPanelThemeExtension(theme: Theme): Extension;
66
40
  export declare function createCodeMirrorThemeExtension(theme: Theme, activeTheme: Exclude<GalaxyTheme, GalaxyTheme.SYSTEM>, variant: CodeEditorVariant, isReadOnly?: boolean): Extension;
41
+ /**
42
+ * A CodeMirror 6 editor themed to match DLS — Berkeley Mono, theme-aware syntax
43
+ * colors, hairline border.
44
+ *
45
+ * Controlled: `content` is the document and `onChange` fires per keystroke.
46
+ * Extend it through `customExtensions` rather than forking the component.
47
+ */
67
48
  declare const CodeEditor: ({ content, placeholder, lang, customExtensions, onChange, onExecute, borderRadius, noBorder, isReadOnly, noLineNumbers, padding, variant, }: CodeEditorProps) => import("react").JSX.Element;
68
49
  export default CodeEditor;
@@ -1,4 +1,4 @@
1
- import { GalaxyTheme } from "../theme/constants.js";
1
+ import { GalaxyTheme } from "../theme/types.js";
2
2
  import { useGalaxyTheme, withTheme } from "../theme/GalaxyTheme.js";
3
3
  import { getCssSizeValue } from "../utils/linaria.js";
4
4
  /* empty css */
@@ -12,6 +12,7 @@ import { langs, loadLanguage } from "@uiw/codemirror-extensions-langs";
12
12
  import { createTheme } from "@uiw/codemirror-themes";
13
13
  import CodeMirror from "@uiw/react-codemirror";
14
14
  //#region src/editor/CodeEditor.tsx
15
+ /** Background treatment of the editor surface. */
15
16
  var CodeEditorVariant = /* @__PURE__ */ function(CodeEditorVariant) {
16
17
  CodeEditorVariant["BASE"] = "BASE";
17
18
  CodeEditorVariant["PRIMARY"] = "PRIMARY";
@@ -365,6 +366,13 @@ function createCodeMirrorThemeExtension(theme, activeTheme, variant, isReadOnly)
365
366
  ]
366
367
  });
367
368
  }
369
+ /**
370
+ * A CodeMirror 6 editor themed to match DLS — Berkeley Mono, theme-aware syntax
371
+ * colors, hairline border.
372
+ *
373
+ * Controlled: `content` is the document and `onChange` fires per keystroke.
374
+ * Extend it through `customExtensions` rather than forking the component.
375
+ */
368
376
  var CodeEditor = ({ content, placeholder, lang, customExtensions = [], onChange, onExecute, borderRadius, noBorder, isReadOnly, noLineNumbers, padding, variant = "PRIMARY" }) => {
369
377
  const { theme, activeTheme } = useGalaxyTheme();
370
378
  const codeMirrorTheme = useMemo(() => createCodeMirrorThemeExtension(theme, activeTheme, variant, isReadOnly), [
@@ -24,4 +24,10 @@ export interface UseDismissOptions {
24
24
  */
25
25
  onDismiss?: () => void;
26
26
  }
27
+ /**
28
+ * Closes a floating element on Escape or a click outside it. Returns the ref to
29
+ * attach to the element you want to keep open.
30
+ *
31
+ * Accepts either a bare handler or an options object as the first argument.
32
+ */
27
33
  export declare const useDismiss: <T extends HTMLElement = HTMLElement>(handlerOrOptions: (() => void) | UseDismissOptions, options?: UseDismissOptions) => RefObject<T>;
@@ -1,6 +1,12 @@
1
1
  import { useEffect, useRef } from "react";
2
2
  import { useHotkeys } from "react-hotkeys-hook";
3
3
  //#region src/hooks/useDismiss.ts
4
+ /**
5
+ * Closes a floating element on Escape or a click outside it. Returns the ref to
6
+ * attach to the element you want to keep open.
7
+ *
8
+ * Accepts either a bare handler or an options object as the first argument.
9
+ */
4
10
  var useDismiss = (handlerOrOptions, options) => {
5
11
  const isOptionsOnly = typeof handlerOrOptions !== "function";
6
12
  const handler = isOptionsOnly ? void 0 : handlerOrOptions;
@@ -1,4 +1,5 @@
1
- interface ElementClientSize {
1
+ /** Measured client size. Both fields are `undefined` before the first measurement. */
2
+ export interface ElementClientSize {
2
3
  width: number | undefined;
3
4
  height: number | undefined;
4
5
  }
@@ -17,4 +18,3 @@ interface ElementClientSize {
17
18
  * first measurement
18
19
  */
19
20
  export declare const useElementClientSize: (ref: React.RefObject<HTMLElement | null>) => ElementClientSize;
20
- export {};
@@ -1,5 +1,9 @@
1
+ /**
2
+ * Which edge or corner stays put while dragging. Edge anchors resize one
3
+ * dimension; corner anchors resize both.
4
+ */
1
5
  export type ResizeAnchor = "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
2
- interface UseResizeProps {
6
+ export interface UseResizeProps {
3
7
  /**
4
8
  * Current width of the element
5
9
  */
@@ -80,4 +84,3 @@ interface UseResizeProps {
80
84
  * });
81
85
  */
82
86
  export declare const useResize: ({ currentWidth, currentHeight, onWidthChange, onHeightChange, onSizeChange, minWidth, maxWidth, minHeight, maxHeight, anchor, }: UseResizeProps) => (e: React.MouseEvent) => void;
83
- export {};
@@ -1,5 +1,13 @@
1
- declare const GalaxyLogomark: ({ height, isDark }: {
1
+ /**
2
+ * The Galaxy mark, in the variant that reads against the active theme.
3
+ *
4
+ * `isDark` pins it to the dark-surface artwork regardless of theme — for a
5
+ * mark sitting on a surface that doesn't follow the theme.
6
+ */
7
+ declare const GalaxyLogomark: ({ height, isDark, }: {
8
+ /** Rendered height in px. Width follows the aspect ratio. */
2
9
  height: number;
10
+ /** Force the dark-surface artwork instead of following the theme. */
3
11
  isDark?: boolean;
4
12
  }) => import("react").JSX.Element;
5
13
  export default GalaxyLogomark;
@@ -1,4 +1,4 @@
1
- import { GalaxyTheme } from "../theme/constants.js";
1
+ import { GalaxyTheme } from "../theme/types.js";
2
2
  import { useGalaxyTheme } from "../theme/GalaxyTheme.js";
3
3
  import SvgGalaxyLogomarkDark from "../assets/components/GalaxyLogomarkDark.js";
4
4
  import SvgGalaxyLogomarkLight from "../assets/components/GalaxyLogomarkLight.js";
@@ -6,6 +6,12 @@ import { match } from "ts-pattern";
6
6
  import { useMemo } from "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/icons/GalaxyLogomark.tsx
9
+ /**
10
+ * The Galaxy mark, in the variant that reads against the active theme.
11
+ *
12
+ * `isDark` pins it to the dark-surface artwork regardless of theme — for a
13
+ * mark sitting on a surface that doesn't follow the theme.
14
+ */
9
15
  var GalaxyLogomark = ({ height, isDark }) => {
10
16
  const { activeTheme } = useGalaxyTheme();
11
17
  return useMemo(() => {
@@ -17,11 +17,17 @@ export interface MaterialConfig {
17
17
  sheenColor?: string;
18
18
  }
19
19
  interface GalaxyLogomark3DProps {
20
+ /** Square canvas size. A number is px. */
20
21
  height: number | string;
22
+ /** Force the dark-surface material instead of following the theme. */
21
23
  isDark?: boolean;
24
+ /** Spin continuously. */
22
25
  isAutoRotate?: boolean;
26
+ /** Let the user drag to orbit the mesh. */
23
27
  isInteractive?: boolean;
28
+ /** React to hover. */
24
29
  isHoverable?: boolean;
30
+ /** Rotation rate. */
25
31
  speed?: number;
26
32
  /** Backlight configuration (enables dramatic mode when provided) */
27
33
  backlight?: LightConfig;
@@ -36,6 +42,15 @@ interface GalaxyLogomark3DProps {
36
42
  /** Environment preset (default: 'studio', or 'night' in dramatic mode) */
37
43
  environmentPreset?: PresetsType;
38
44
  }
45
+ /**
46
+ * The Galaxy mark as an interactive 3D mesh, rendered with react-three-fiber.
47
+ *
48
+ * The heaviest thing in the library — it pulls in three.js and a ~3MB model.
49
+ * Reserve it for hero moments; use `GalaxyLogomark` everywhere else.
50
+ *
51
+ * Passing any of `backlight`, `spotlight` or `fillLight` switches it into the
52
+ * dramatic lighting preset.
53
+ */
39
54
  declare const GalaxyLogomark3D: ({ height, isDark, isAutoRotate, isInteractive, isHoverable, speed, backlight, spotlight, fillLight, material, color: colorOverride, environmentPreset, }: GalaxyLogomark3DProps) => import("react").JSX.Element;
40
55
  export default GalaxyLogomark3D;
41
56
  export type { GalaxyLogomark3DProps };
@@ -252,6 +252,15 @@ function Scene({ color, isDark, isAutoRotate, isInteractive, isHoverable, isHove
252
252
  })
253
253
  ] });
254
254
  }
255
+ /**
256
+ * The Galaxy mark as an interactive 3D mesh, rendered with react-three-fiber.
257
+ *
258
+ * The heaviest thing in the library — it pulls in three.js and a ~3MB model.
259
+ * Reserve it for hero moments; use `GalaxyLogomark` everywhere else.
260
+ *
261
+ * Passing any of `backlight`, `spotlight` or `fillLight` switches it into the
262
+ * dramatic lighting preset.
263
+ */
255
264
  var GalaxyLogomark3D = ({ height, isDark = false, isAutoRotate = false, isInteractive = false, isHoverable = false, speed = 2, backlight, spotlight, fillLight, material, color: colorOverride, environmentPreset }) => {
256
265
  const [isHovered, setIsHovered] = useState(false);
257
266
  const { theme } = useGalaxyTheme();
@@ -1,8 +1,18 @@
1
1
  export interface GalaxyLogomarkAnimationProps {
2
+ /** Square size. A number is px. @default 32 */
2
3
  height?: number | string;
4
+ /** Force the dark-surface fill instead of following the theme. */
3
5
  isDark?: boolean;
6
+ /** Freeze on the first frame. Also stops it looping. @default false */
4
7
  isPaused?: boolean;
8
+ /** Playback rate. @default 1 */
5
9
  speed?: number;
6
10
  }
11
+ /**
12
+ * The Galaxy mark as a looping Lottie animation, tinted from the theme.
13
+ *
14
+ * Ships a ~700kB animation payload — reach for the static `GalaxyLogomark` for
15
+ * ordinary chrome and save this for splash and loading moments.
16
+ */
7
17
  declare const GalaxyLogomarkAnimation: ({ height, isDark, isPaused, speed, }: GalaxyLogomarkAnimationProps) => import("react").JSX.Element;
8
18
  export default GalaxyLogomarkAnimation;
@@ -1,4 +1,4 @@
1
- import { GalaxyTheme } from "../theme/constants.js";
1
+ import { GalaxyTheme } from "../theme/types.js";
2
2
  import { useGalaxyTheme } from "../theme/GalaxyTheme.js";
3
3
  import { getCssSizeValue } from "../utils/linaria.js";
4
4
  import galaxy_animation_default from "../assets/models/galaxy-animation.js";
@@ -20,6 +20,12 @@ var GalaxyLogomarkAnimationWrapper = /*#__PURE__*/ styled("div")({
20
20
  "gm80o9u-1": [_exp3()]
21
21
  }
22
22
  });
23
+ /**
24
+ * The Galaxy mark as a looping Lottie animation, tinted from the theme.
25
+ *
26
+ * Ships a ~700kB animation payload — reach for the static `GalaxyLogomark` for
27
+ * ordinary chrome and save this for splash and loading moments.
28
+ */
23
29
  var GalaxyLogomarkAnimation = ({ height = 32, isDark, isPaused = false, speed = 1 }) => {
24
30
  const lottieRef = useRef(null);
25
31
  const { theme, activeTheme } = useGalaxyTheme();
@@ -1,5 +1,11 @@
1
- declare const GalaxyWordmark: ({ height, isDark }: {
1
+ /**
2
+ * The Galaxy wordmark, in the variant that reads against the active theme.
3
+ * Use `GalaxyLogomark` when you need just the mark without the word.
4
+ */
5
+ declare const GalaxyWordmark: ({ height, isDark, }: {
6
+ /** Rendered height in px. Width follows the aspect ratio. */
2
7
  height: number;
8
+ /** Force the light artwork instead of following the theme. */
3
9
  isDark?: boolean;
4
10
  }) => import("react").JSX.Element;
5
11
  export default GalaxyWordmark;
@@ -1,4 +1,4 @@
1
- import { GalaxyTheme } from "../theme/constants.js";
1
+ import { GalaxyTheme } from "../theme/types.js";
2
2
  import { useGalaxyTheme } from "../theme/GalaxyTheme.js";
3
3
  import SvgGalaxyWordmarkDark from "../assets/components/GalaxyWordmarkDark.js";
4
4
  import SvgGalaxyWordmarkLight from "../assets/components/GalaxyWordmarkLight.js";
@@ -6,6 +6,10 @@ import { match } from "ts-pattern";
6
6
  import { useMemo } from "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/icons/GalaxyWordmark.tsx
9
+ /**
10
+ * The Galaxy wordmark, in the variant that reads against the active theme.
11
+ * Use `GalaxyLogomark` when you need just the mark without the word.
12
+ */
9
13
  var GalaxyWordmark = ({ height, isDark }) => {
10
14
  const { activeTheme } = useGalaxyTheme();
11
15
  return useMemo(() => {
@@ -1,4 +1,5 @@
1
1
  import type { Icon as PhosphorIcon, IconWeight as PhosphorIconWeight } from "@phosphor-icons/react";
2
+ /** Icon color role. Resolves to a `theme.color.icon.*` token in both themes. */
2
3
  export declare enum IconVariant {
3
4
  PRIMARY = "PRIMARY",
4
5
  PRIMARY_ALT = "PRIMARY_ALT",
@@ -31,11 +32,20 @@ export declare enum IconWeight {
31
32
  DUOTONE = "duotone"
32
33
  }
33
34
  export interface IconProps {
35
+ /** Phosphor icon *component* — pass `PlusIcon`, not `<PlusIcon />`. */
34
36
  component: PhosphorIcon;
37
+ /** Square size in px. @default 16 */
35
38
  size?: number;
39
+ /** Stroke weight. @default IconWeight.BOLD */
36
40
  weight?: PhosphorIconWeight;
41
+ /** Color role. @default IconVariant.PRIMARY */
37
42
  variant?: IconVariant;
43
+ /** Accessible label. Set it when the icon is the only content. */
38
44
  alt?: string;
39
45
  }
46
+ /**
47
+ * Wraps a Phosphor icon so its color comes from a theme token rather than a
48
+ * hardcoded `color` prop. Never render a Phosphor icon bare.
49
+ */
40
50
  declare const Icon: ({ component: IconComponent, variant, size, weight, alt, }: IconProps) => import("react").JSX.Element;
41
51
  export default Icon;
@@ -2,6 +2,7 @@ import { useGalaxyTheme } from "../theme/GalaxyTheme.js";
2
2
  import { match } from "ts-pattern";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/icons/Icon.tsx
5
+ /** Icon color role. Resolves to a `theme.color.icon.*` token in both themes. */
5
6
  var IconVariant = /* @__PURE__ */ function(IconVariant) {
6
7
  IconVariant["PRIMARY"] = "PRIMARY";
7
8
  IconVariant["PRIMARY_ALT"] = "PRIMARY_ALT";
@@ -38,6 +39,10 @@ var IconWeight = /* @__PURE__ */ function(IconWeight) {
38
39
  function getIconColor(variant, theme) {
39
40
  return match(variant).with("PRIMARY", () => theme.color.icon.primary).with("PRIMARY_ALT", () => theme.color.icon.primaryAlt).with("SECONDARY", () => theme.color.icon.secondary).with("SECONDARY_ALT", () => theme.color.icon.secondaryAlt).with("TERTIARY", () => theme.color.icon.tertiary).with("TERTIARY_ALT", () => theme.color.icon.tertiaryAlt).with("SUCCESS", () => theme.color.icon.success).with("ERROR", () => theme.color.icon.error).with("WARNING", () => theme.color.icon.warning).with("LOADING", () => theme.color.icon.primary).with("LIME", () => theme.color.icon.lime).with("BLUE", () => theme.color.icon.blue).with("TEAL", () => theme.color.icon.teal).with("YELLOW", () => theme.color.icon.yellow).with("ORANGE", () => theme.color.icon.orange).with("PURPLE", () => theme.color.icon.purple).with("PINK", () => theme.color.icon.pink).with("DISABLED", () => theme.color.text.disabled).with(void 0, () => theme.color.icon.primary).exhaustive();
40
41
  }
42
+ /**
43
+ * Wraps a Phosphor icon so its color comes from a theme token rather than a
44
+ * hardcoded `color` prop. Never render a Phosphor icon bare.
45
+ */
41
46
  var Icon = ({ component: IconComponent, variant = "PRIMARY", size = 16, weight = "bold", alt }) => {
42
47
  const { theme } = useGalaxyTheme();
43
48
  return /* @__PURE__ */ jsx(IconComponent, {
@@ -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,