@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
@@ -1,16 +1,25 @@
1
1
  import { PropsWithChildren } from "react";
2
2
  import { ToastVariant, type ToastProps } from "./Toast";
3
+ /** What you pass to `showToast`. Every `ToastProps` field except `onClose`, which the provider owns. */
3
4
  export type ShowToastProps = Omit<ToastProps, "onClose"> & {
5
+ /** Milliseconds before auto-dismiss. Pass `0` to make it stay. @default 3000 */
4
6
  timeout?: number;
7
+ /** Viewport offset. Toasts sharing the same four values stack together. */
5
8
  top?: number | string;
6
9
  left?: number | string;
7
10
  right?: number | string;
8
11
  bottom?: number | string;
9
12
  };
10
13
  export interface ToastContextProps {
14
+ /** Queue a toast. Returns its id, for dismissing it early via `hideToast`. */
11
15
  showToast: (options: ShowToastProps) => string;
16
+ /** Dismiss one toast by id, or every toast when called with no argument. */
12
17
  hideToast: (id?: string) => void;
13
18
  }
14
19
  export declare const ToastContext: import("react").Context<ToastContextProps | undefined>;
20
+ /**
21
+ * Owns the toast queue. Mount it once near the root, then call `showToast` from
22
+ * `useToast()` anywhere below. Handles stacking, timers and dismissal.
23
+ */
15
24
  export declare const ToastProvider: ({ children }: PropsWithChildren) => import("react").JSX.Element;
16
25
  export { ToastVariant };
@@ -16,6 +16,10 @@ var positionKey = (toast) => JSON.stringify([
16
16
  toast.bottom,
17
17
  toast.left
18
18
  ]);
19
+ /**
20
+ * Owns the toast queue. Mount it once near the root, then call `showToast` from
21
+ * `useToast()` anywhere below. Handles stacking, timers and dismissal.
22
+ */
19
23
  var ToastProvider = ({ children }) => {
20
24
  const [toasts, setToasts] = useState([]);
21
25
  const timeoutRefs = useRef(/* @__PURE__ */ new Map());
@@ -1 +1,8 @@
1
+ /**
2
+ * Returns `{ showToast, hideToast }`. `showToast` returns the new toast's id,
3
+ * which you can pass to `hideToast` to dismiss that one early — call it with no
4
+ * argument to clear them all.
5
+ *
6
+ * Throws when called outside a `ToastProvider`.
7
+ */
1
8
  export declare const useToast: () => import("./ToastProvider").ToastContextProps;
@@ -1,6 +1,13 @@
1
1
  import { ToastContext } from "./ToastProvider.js";
2
2
  import { useContext } from "react";
3
3
  //#region src/toast/useToast.ts
4
+ /**
5
+ * Returns `{ showToast, hideToast }`. `showToast` returns the new toast's id,
6
+ * which you can pass to `hideToast` to dismiss that one early — call it with no
7
+ * argument to clear them all.
8
+ *
9
+ * Throws when called outside a `ToastProvider`.
10
+ */
4
11
  var useToast = () => {
5
12
  const context = useContext(ToastContext);
6
13
  if (!context) throw new Error("useToast must be used within a ToastProvider");
@@ -1,4 +1,5 @@
1
1
  import type { PropsWithChildren } from "react";
2
+ /** Placement relative to the trigger. The `AUTO_*` values pick a side that fits. */
2
3
  export declare enum TooltipPosition {
3
4
  TOP = "top",
4
5
  BOTTOM = "bottom",
@@ -16,22 +17,39 @@ export declare enum TooltipPosition {
16
17
  AUTO_START = "auto-start",
17
18
  AUTO_END = "auto-end"
18
19
  }
20
+ /** Surface treatment of the tooltip bubble. */
19
21
  export declare enum TooltipVariant {
20
22
  BASE = "BASE",
21
23
  PRIMARY = "PRIMARY",
22
24
  SECONDARY = "SECONDARY",
23
25
  TERTIARY = "TERTIARY"
24
26
  }
25
- interface TooltipProps {
27
+ export interface TooltipProps {
28
+ /** Tooltip content. A string is wrapped in `Text`; a node renders as-is. */
26
29
  body: string | React.ReactNode;
30
+ /** @default TooltipVariant.SECONDARY */
27
31
  variant?: TooltipVariant;
32
+ /** @default TooltipPosition.TOP */
28
33
  position?: TooltipPosition;
34
+ /** Milliseconds to hover before it appears. @default 0 */
29
35
  delay?: number;
36
+ /** `[skidding, distance]` in px from the trigger. @default [0, 4] */
30
37
  offset?: [number, number];
38
+ /** Keep it open while the pointer is over it, so links inside stay reachable. */
31
39
  isInteractive?: boolean;
40
+ /** Drop the 8px inset — for tooltips that host their own layout. */
32
41
  noPadding?: boolean;
42
+ /** Drop the hairline border. */
33
43
  noBorder?: boolean;
44
+ /** Render children bare, with no tooltip at all. */
34
45
  isDisabled?: boolean;
35
46
  }
47
+ /**
48
+ * Wraps a trigger and shows `body` on hover or keyboard focus. Children are the
49
+ * trigger, wrapped in an inline-block span.
50
+ *
51
+ * Sits at z-index 10000, above modals and drawers. Set `isInteractive` if the
52
+ * body contains anything clickable.
53
+ */
36
54
  declare const Tooltip: ({ children, variant, body, position, delay, offset, isInteractive, noPadding, noBorder, isDisabled, }: PropsWithChildren<TooltipProps>) => string | number | boolean | Iterable<import("react").ReactNode> | import("react").JSX.Element | null | undefined;
37
55
  export default Tooltip;
@@ -6,6 +6,7 @@ import { match } from "ts-pattern";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  import Tippy from "@tippyjs/react";
8
8
  //#region src/tooltip/Tooltip.tsx
9
+ /** Placement relative to the trigger. The `AUTO_*` values pick a side that fits. */
9
10
  var TooltipPosition = /* @__PURE__ */ function(TooltipPosition) {
10
11
  TooltipPosition["TOP"] = "top";
11
12
  TooltipPosition["BOTTOM"] = "bottom";
@@ -24,6 +25,7 @@ var TooltipPosition = /* @__PURE__ */ function(TooltipPosition) {
24
25
  TooltipPosition["AUTO_END"] = "auto-end";
25
26
  return TooltipPosition;
26
27
  }({});
28
+ /** Surface treatment of the tooltip bubble. */
27
29
  var TooltipVariant = /* @__PURE__ */ function(TooltipVariant) {
28
30
  TooltipVariant["BASE"] = "BASE";
29
31
  TooltipVariant["PRIMARY"] = "PRIMARY";
@@ -54,6 +56,13 @@ var TooltipContent = withTheme(/*#__PURE__*/ styled("span")({
54
56
  "tjda4tq-2": [_exp3()]
55
57
  }
56
58
  }));
59
+ /**
60
+ * Wraps a trigger and shows `body` on hover or keyboard focus. Children are the
61
+ * trigger, wrapped in an inline-block span.
62
+ *
63
+ * Sits at z-index 10000, above modals and drawers. Set `isInteractive` if the
64
+ * body contains anything clickable.
65
+ */
57
66
  var Tooltip = ({ children, variant = "SECONDARY", body, position = "top", delay = 0, offset = [0, 4], isInteractive = false, noPadding = false, noBorder = false, isDisabled = false }) => {
58
67
  if (isDisabled) return children;
59
68
  return /* @__PURE__ */ jsx(Tippy, {
@@ -1,6 +1,13 @@
1
1
  import type { PropsWithChildren } from "react";
2
2
  export interface FadeProps {
3
+ /** Seconds to wait before starting. @default 0 */
3
4
  delay?: number;
4
5
  }
6
+ /**
7
+ * Fades children in on mount and out on unmount, over 200ms.
8
+ *
9
+ * The exit half only runs inside a framer-motion `AnimatePresence`. Fills its
10
+ * parent (100% × 100%).
11
+ */
5
12
  declare const Fade: ({ children, delay }: PropsWithChildren<FadeProps>) => import("react").JSX.Element;
6
13
  export default Fade;
@@ -1,6 +1,12 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { motion } from "framer-motion";
3
3
  //#region src/transform/Fade.tsx
4
+ /**
5
+ * Fades children in on mount and out on unmount, over 200ms.
6
+ *
7
+ * The exit half only runs inside a framer-motion `AnimatePresence`. Fills its
8
+ * parent (100% × 100%).
9
+ */
4
10
  var Fade = ({ children, delay = 0 }) => {
5
11
  return /* @__PURE__ */ jsx(motion.div, {
6
12
  initial: { opacity: 0 },
@@ -1,3 +1,7 @@
1
1
  import { PropsWithChildren } from "react";
2
+ /**
3
+ * Pulses children between full and 40% opacity, forever, on a 1s cycle.
4
+ * Signals "in progress" — pair it with a real completion state.
5
+ */
2
6
  declare const Flash: ({ children }: PropsWithChildren) => import("react").JSX.Element;
3
7
  export default Flash;
@@ -7,6 +7,10 @@ var StyledFlash = /*#__PURE__*/ styled("span")({
7
7
  class: "s18o9ih0",
8
8
  propsAsIs: false
9
9
  });
10
+ /**
11
+ * Pulses children between full and 40% opacity, forever, on a 1s cycle.
12
+ * Signals "in progress" — pair it with a real completion state.
13
+ */
10
14
  var Flash = ({ children }) => {
11
15
  return /* @__PURE__ */ jsx(StyledFlash, { children });
12
16
  };
@@ -1,8 +1,15 @@
1
1
  import type { PropsWithChildren } from "react";
2
2
  export interface RotateProps {
3
+ /** Rotated to `deg` when true, back to 0 when false. */
3
4
  isRotated: boolean;
5
+ /** Angle in degrees at the rotated end. @default 180 */
4
6
  deg?: number;
7
+ /** Transition duration in seconds. @default 0.075 */
5
8
  speed?: number;
6
9
  }
10
+ /**
11
+ * Tweens children between 0° and `deg` as `isRotated` flips. State-driven, not
12
+ * looping — the usual case is a chevron on an expand/collapse toggle.
13
+ */
7
14
  declare const Rotate: ({ children, isRotated, deg, speed }: PropsWithChildren<RotateProps>) => import("react").JSX.Element;
8
15
  export default Rotate;
@@ -16,6 +16,10 @@ var RotateWrapper = /*#__PURE__*/ styled("div")({
16
16
  "r530s5l-1": [_exp2()]
17
17
  }
18
18
  });
19
+ /**
20
+ * Tweens children between 0° and `deg` as `isRotated` flips. State-driven, not
21
+ * looping — the usual case is a chevron on an expand/collapse toggle.
22
+ */
19
23
  var Rotate = ({ children, isRotated, deg = 180, speed }) => {
20
24
  return /* @__PURE__ */ jsx(RotateWrapper, {
21
25
  $isRotated: isRotated,
@@ -1,6 +1,13 @@
1
1
  import type { PropsWithChildren } from "react";
2
2
  export interface ScaleFadeProps {
3
+ /** Seconds to wait before starting. @default 0 */
3
4
  delay?: number;
4
5
  }
6
+ /**
7
+ * Fades children in while scaling from 95% to 100%, over 200ms. The entrance for
8
+ * things that pop: menus, popovers, toasts.
9
+ *
10
+ * The exit half only runs inside a framer-motion `AnimatePresence`.
11
+ */
5
12
  declare const ScaleFade: ({ children, delay }: PropsWithChildren<ScaleFadeProps>) => import("react").JSX.Element;
6
13
  export default ScaleFade;
@@ -1,6 +1,12 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { motion } from "framer-motion";
3
3
  //#region src/transform/ScaleFade.tsx
4
+ /**
5
+ * Fades children in while scaling from 95% to 100%, over 200ms. The entrance for
6
+ * things that pop: menus, popovers, toasts.
7
+ *
8
+ * The exit half only runs inside a framer-motion `AnimatePresence`.
9
+ */
4
10
  var ScaleFade = ({ children, delay = 0 }) => {
5
11
  return /* @__PURE__ */ jsx(motion.div, {
6
12
  initial: {
@@ -1,7 +1,14 @@
1
1
  import type { PropsWithChildren } from "react";
2
2
  export interface SpinProps {
3
+ /** Rotations per second. Higher is faster. @default 1 */
3
4
  speed?: number;
5
+ /** @default true */
4
6
  isSpinning?: boolean;
5
7
  }
8
+ /**
9
+ * Rotates children continuously — the loading spinner, usually wrapping an
10
+ * `Icon`. When `isSpinning` is false the children render bare, with no wrapper
11
+ * element, so toggling it does not shift layout.
12
+ */
6
13
  declare const Spin: ({ children, speed, isSpinning }: PropsWithChildren<SpinProps>) => import("react").JSX.Element;
7
14
  export default Spin;
@@ -9,6 +9,11 @@ var StyledSpin = /*#__PURE__*/ styled("div")({
9
9
  propsAsIs: false,
10
10
  vars: { "sonzivr-0": [_exp(), "s"] }
11
11
  });
12
+ /**
13
+ * Rotates children continuously — the loading spinner, usually wrapping an
14
+ * `Icon`. When `isSpinning` is false the children render bare, with no wrapper
15
+ * element, so toggling it does not shift layout.
16
+ */
12
17
  var Spin = ({ children, speed = 1, isSpinning = true }) => {
13
18
  if (isSpinning) return /* @__PURE__ */ jsx(StyledSpin, {
14
19
  $speed: speed,
@@ -1,4 +1,5 @@
1
1
  import type { PropsWithChildren } from "react";
2
+ /** Surface treatment — how much the card separates from the page behind it. */
2
3
  export declare enum WidgetVariant {
3
4
  BASE = "BASE",
4
5
  PRIMARY = "PRIMARY",
@@ -19,22 +20,38 @@ export declare enum WidgetVariant {
19
20
  PURPLE = "PURPLE",
20
21
  PINK = "PINK"
21
22
  }
22
- interface WidgetProps {
23
+ export interface WidgetProps {
24
+ /** Not implemented — the component ignores it. Render your own header child. */
23
25
  header?: string;
26
+ /** A number is px. */
24
27
  minWidth?: number | string;
25
28
  maxWidth?: number | string;
26
29
  minHeight?: number | string;
27
30
  maxHeight?: number | string;
31
+ /** `width: 100%`. */
28
32
  fillWidth?: boolean;
33
+ /** `height: 100%`. */
29
34
  fillHeight?: boolean;
35
+ /** Overrides the default 12px inset. */
30
36
  padding?: React.CSSProperties["padding"];
37
+ /** Collapse padding to 0. Ignored when `padding` is set. */
31
38
  noPadding?: boolean;
39
+ /** Suppress the hover treatment even when `onClick` is set. */
32
40
  noHover?: boolean;
41
+ /** Drop the hairline border. */
33
42
  noBorder?: boolean;
43
+ /** Not implemented — the component ignores it. */
34
44
  isGradient?: boolean;
45
+ /** Selected styling — border picks up the Galaxy blue. */
35
46
  isSelected?: boolean;
47
+ /** @default WidgetVariant.PRIMARY */
36
48
  variant?: WidgetVariant;
49
+ /** Also flips the cursor to `pointer` and enables the hover treatment. */
37
50
  onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
38
51
  }
52
+ /**
53
+ * The card primitive — a bordered, padded surface that groups related content.
54
+ * Hairline border, no shadow. Compose the inside with `FlexWrapper`.
55
+ */
39
56
  declare const Widget: ({ children, minHeight, maxHeight, minWidth, maxWidth, fillWidth, fillHeight, padding, noPadding, noHover, noBorder, isSelected, variant, onClick, }: PropsWithChildren<WidgetProps>) => import("react").JSX.Element;
40
57
  export default Widget;
@@ -5,6 +5,7 @@ import { styled } from "@linaria/react";
5
5
  import { match } from "ts-pattern";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  //#region src/widget/Widget.tsx
8
+ /** Surface treatment — how much the card separates from the page behind it. */
8
9
  var WidgetVariant = /* @__PURE__ */ function(WidgetVariant) {
9
10
  WidgetVariant["BASE"] = "BASE";
10
11
  WidgetVariant["PRIMARY"] = "PRIMARY";
@@ -89,6 +90,10 @@ var StyledWidget = withTheme(/*#__PURE__*/ styled("div")({
89
90
  "sx1o0cd-11": [_exp10()]
90
91
  }
91
92
  }));
93
+ /**
94
+ * The card primitive — a bordered, padded surface that groups related content.
95
+ * Hairline border, no shadow. Compose the inside with `FlexWrapper`.
96
+ */
92
97
  var Widget = ({ children, minHeight, maxHeight, minWidth, maxWidth, fillWidth, fillHeight, padding, noPadding, noHover, noBorder, isSelected, variant = "PRIMARY", onClick }) => {
93
98
  return /* @__PURE__ */ jsx(StyledWidget, {
94
99
  $minWidth: minWidth,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galaxy-io/dls",
3
- "version": "1.4.10",
3
+ "version": "1.4.12",
4
4
  "description": "Galaxy Design Language System",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",