@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,9 +1,11 @@
1
+ /** Main-axis direction of the flex container. */
1
2
  export declare enum FlexDirection {
2
3
  ROW = "row",
3
4
  COLUMN = "column",
4
5
  ROW_REVERSE = "row-reverse",
5
6
  COLUMN_REVERSE = "column-reverse"
6
7
  }
8
+ /** Cross-axis alignment of children (`align-items`). */
7
9
  export declare enum AlignItems {
8
10
  START = "start",
9
11
  CENTER = "center",
@@ -11,6 +13,7 @@ export declare enum AlignItems {
11
13
  BASELINE = "baseline",
12
14
  STRETCH = "stretch"
13
15
  }
16
+ /** Main-axis distribution of children (`justify-content`). */
14
17
  export declare enum JustifyContent {
15
18
  START = "start",
16
19
  CENTER = "center",
@@ -19,11 +22,13 @@ export declare enum JustifyContent {
19
22
  SPACE_AROUND = "space-around",
20
23
  SPACE_EVENLY = "space-evenly"
21
24
  }
25
+ /** Wrapping behavior when children overflow the main axis. */
22
26
  export declare enum FlexWrap {
23
27
  NOWRAP = "nowrap",
24
28
  WRAP = "wrap",
25
29
  WRAP_REVERSE = "wrap-reverse"
26
30
  }
31
+ /** Named steps on the spacing scale. `gap` also accepts a raw number of px. */
27
32
  export declare enum FlexGap {
28
33
  NONE = "0",
29
34
  XXSMALL = "2px",
@@ -34,129 +39,57 @@ export declare enum FlexGap {
34
39
  XLARGE = "24px",
35
40
  XXLARGE = "32px"
36
41
  }
37
- interface FlexWrapperProps {
38
- /**
39
- * Sets the direction of the flex container
40
- * - ROW: Items are placed in a row (default)
41
- * - COLUMN: Items are placed in a column
42
- * - ROW_REVERSE: Items are placed in a row, from right to left
43
- * - COLUMN_REVERSE: Items are placed in a column, from bottom to top
44
- */
42
+ export interface FlexWrapperProps {
43
+ /** @default FlexDirection.ROW */
45
44
  direction?: FlexDirection;
46
- /**
47
- * Defines how flex items are aligned along the cross axis
48
- * - START: Items are aligned at the start (default)
49
- * - CENTER: Items are centered
50
- * - END: Items are aligned at the end
51
- * - BASELINE: Items are aligned at their baselines
52
- * - STRETCH: Items are stretched to fill the container
53
- */
45
+ /** @default AlignItems.START */
54
46
  alignItems?: AlignItems;
55
- /**
56
- * Defines how flex items are aligned along the main axis
57
- * - START: Items are aligned at the start (default)
58
- * - CENTER: Items are centered
59
- * - END: Items are aligned at the end
60
- * - SPACE_BETWEEN: Items are evenly distributed with equal space between them
61
- * - SPACE_AROUND: Items are evenly distributed with equal space around them
62
- * - SPACE_EVENLY: Items are evenly distributed with equal space between and around them
63
- */
47
+ /** @default JustifyContent.START */
64
48
  justifyContent?: JustifyContent;
65
- /**
66
- * Controls whether flex items should wrap when there isn't enough space
67
- * - NOWRAP: Items will not wrap (default)
68
- * - WRAP: Items will wrap onto multiple lines if needed
69
- * - WRAP_REVERSE: Items will wrap onto multiple lines in reverse order
70
- */
49
+ /** @default FlexWrap.NOWRAP */
71
50
  wrap?: FlexWrap;
72
- /**
73
- * Sets the gap between flex items in pixels or string (for other units)
74
- */
51
+ /** Space between children. A number is px; use `FlexGap` for the scale. */
75
52
  gap?: number | string;
76
53
  /**
77
- * flex-grow of this wrapper when it is itself a child of a flex container.
78
- * Defaults to the CSS initial value (0). Saves wrapping in a FlexItem just
79
- * to control how the wrapper flexes.
54
+ * flex-grow / -shrink / -basis of the wrapper itself, for when it is also a
55
+ * child of another flex container. Saves nesting it in a FlexItem.
80
56
  */
81
57
  grow?: number;
82
- /**
83
- * flex-shrink of this wrapper when it is itself a child of a flex container.
84
- * Defaults to the CSS initial value (1).
85
- */
86
58
  shrink?: number;
87
- /**
88
- * flex-basis of this wrapper when it is itself a child of a flex container.
89
- * Defaults to the CSS initial value (auto).
90
- */
91
59
  basis?: number | string;
92
- /**
93
- * Sets the width of the flex container in pixels
94
- */
60
+ /** A number is px. @default "auto" */
95
61
  width?: number | string;
96
- /**
97
- * Sets the height of the flex container in pixels
98
- */
62
+ /** A number is px. @default "auto" */
99
63
  height?: number | string;
100
- /**
101
- * Sets the minimum width of the flex container in pixels
102
- */
64
+ /** Pass `0` to let this shrink below its content so nested text can ellipsize. */
103
65
  minWidth?: number | string;
104
- /**
105
- * Sets the maximum width of the flex container in pixels
106
- */
107
66
  maxWidth?: number | string;
108
- /**
109
- * Sets the minimum height of the flex container in pixels
110
- */
111
67
  minHeight?: number | string;
112
- /**
113
- * Sets the maximum height of the flex container in pixels
114
- */
115
68
  maxHeight?: number | string;
116
- /**
117
- * When true, the container will fill its parent's width (equivalent to width: 100%)
118
- */
69
+ /** `width: 100%`. Takes precedence over `width`. */
119
70
  fillWidth?: boolean;
120
- /**
121
- * When true, the container will fill its parent's height (equivalent to height: 100%)
122
- */
71
+ /** `height: 100%`. Takes precedence over `height`. */
123
72
  fillHeight?: boolean;
124
- /**
125
- * Controls how content that overflows the container should be handled
126
- * Default is 'visible'
127
- */
73
+ /** @default "visible" */
128
74
  overflow?: React.CSSProperties["overflow"];
129
- /**
130
- * Sets the padding inside the container
131
- * Can be a number (for pixels) or a string (for other units)
132
- */
75
+ /** Inner spacing. Use this rather than `margin` — DLS spaces with gap and padding. */
133
76
  padding?: React.CSSProperties["padding"];
134
- /**
135
- * Sets the margin inside the container
136
- * Can be a number (for pixels) or a string (for other units)
137
- */
77
+ /** Escape hatch. DLS spaces with `gap` and `padding` — reach for those first. */
138
78
  margin?: React.CSSProperties["margin"];
139
- /**
140
- * Optional click handler for the flex container
141
- */
79
+ /** Also flips the cursor to `pointer`. */
142
80
  onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
143
- /**
144
- * Optional mousedown handler for the flex container
145
- */
146
81
  onMouseDown?: (event: React.MouseEvent<HTMLDivElement>) => void;
147
- /**
148
- * Optional mouseenter handler for the flex container
149
- */
150
82
  onMouseEnter?: (event: React.MouseEvent<HTMLDivElement>) => void;
151
- /**
152
- * Optional mouseleave handler for the flex container
153
- */
154
83
  onMouseLeave?: (event: React.MouseEvent<HTMLDivElement>) => void;
155
- /**
156
- * Optional scroll handler for the flex container
157
- */
158
84
  onScroll?: (event: React.UIEvent<HTMLDivElement>) => void;
159
85
  }
86
+ /**
87
+ * The layout workhorse — a `display: flex` div with every flex and sizing knob
88
+ * as a prop. Compose UI out of these plus whitespace rather than decorating.
89
+ *
90
+ * Sizing props respect an explicit `0`, so `minWidth={0}` works as the standard
91
+ * fix for letting a flex child shrink enough for nested text to ellipsize.
92
+ */
160
93
  declare const FlexWrapper: import("react").ForwardRefExoticComponent<FlexWrapperProps & {
161
94
  children?: import("react").ReactNode | undefined;
162
95
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -4,6 +4,7 @@ import { styled } from "@linaria/react";
4
4
  import { forwardRef } from "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region src/containers/FlexWrapper.tsx
7
+ /** Main-axis direction of the flex container. */
7
8
  var FlexDirection = /* @__PURE__ */ function(FlexDirection) {
8
9
  FlexDirection["ROW"] = "row";
9
10
  FlexDirection["COLUMN"] = "column";
@@ -11,6 +12,7 @@ var FlexDirection = /* @__PURE__ */ function(FlexDirection) {
11
12
  FlexDirection["COLUMN_REVERSE"] = "column-reverse";
12
13
  return FlexDirection;
13
14
  }({});
15
+ /** Cross-axis alignment of children (`align-items`). */
14
16
  var AlignItems = /* @__PURE__ */ function(AlignItems) {
15
17
  AlignItems["START"] = "start";
16
18
  AlignItems["CENTER"] = "center";
@@ -19,6 +21,7 @@ var AlignItems = /* @__PURE__ */ function(AlignItems) {
19
21
  AlignItems["STRETCH"] = "stretch";
20
22
  return AlignItems;
21
23
  }({});
24
+ /** Main-axis distribution of children (`justify-content`). */
22
25
  var JustifyContent = /* @__PURE__ */ function(JustifyContent) {
23
26
  JustifyContent["START"] = "start";
24
27
  JustifyContent["CENTER"] = "center";
@@ -28,12 +31,14 @@ var JustifyContent = /* @__PURE__ */ function(JustifyContent) {
28
31
  JustifyContent["SPACE_EVENLY"] = "space-evenly";
29
32
  return JustifyContent;
30
33
  }({});
34
+ /** Wrapping behavior when children overflow the main axis. */
31
35
  var FlexWrap = /* @__PURE__ */ function(FlexWrap) {
32
36
  FlexWrap["NOWRAP"] = "nowrap";
33
37
  FlexWrap["WRAP"] = "wrap";
34
38
  FlexWrap["WRAP_REVERSE"] = "wrap-reverse";
35
39
  return FlexWrap;
36
40
  }({});
41
+ /** Named steps on the spacing scale. `gap` also accepts a raw number of px. */
37
42
  var FlexGap = /* @__PURE__ */ function(FlexGap) {
38
43
  FlexGap["NONE"] = "0";
39
44
  FlexGap["XXSMALL"] = "2px";
@@ -96,6 +101,13 @@ var StyledFlexWrapper = /*#__PURE__*/ styled("div")({
96
101
  "s12krdms-17": [_exp16()]
97
102
  }
98
103
  });
104
+ /**
105
+ * The layout workhorse — a `display: flex` div with every flex and sizing knob
106
+ * as a prop. Compose UI out of these plus whitespace rather than decorating.
107
+ *
108
+ * Sizing props respect an explicit `0`, so `minWidth={0}` works as the standard
109
+ * fix for letting a flex child shrink enough for nested text to ellipsize.
110
+ */
99
111
  var FlexWrapper = forwardRef(({ children, direction, alignItems, justifyContent, wrap, gap, grow, shrink, basis, width, height, minWidth, maxWidth, minHeight, maxHeight, fillWidth = false, fillHeight = false, overflow, padding, margin, onClick, onMouseDown, onMouseEnter, onMouseLeave, onScroll }, ref) => {
100
112
  return /* @__PURE__ */ jsx(StyledFlexWrapper, {
101
113
  ref,
@@ -1,16 +1,19 @@
1
1
  import type { PropsWithChildren } from "react";
2
+ /** Block-axis alignment of each item inside its own grid area (`align-items`). */
2
3
  export declare enum GridAlignItems {
3
4
  START = "START",
4
5
  CENTER = "CENTER",
5
6
  END = "END",
6
7
  STRETCH = "STRETCH"
7
8
  }
9
+ /** Inline-axis alignment of each item inside its own grid area (`justify-items`). */
8
10
  export declare enum GridJustifyItems {
9
11
  START = "START",
10
12
  CENTER = "CENTER",
11
13
  END = "END",
12
14
  STRETCH = "STRETCH"
13
15
  }
16
+ /** Inline-axis distribution of the whole grid when it's narrower than its container. */
14
17
  export declare enum GridJustifyContent {
15
18
  START = "START",
16
19
  CENTER = "CENTER",
@@ -20,6 +23,7 @@ export declare enum GridJustifyContent {
20
23
  SPACE_EVENLY = "SPACE_EVENLY",
21
24
  STRETCH = "STRETCH"
22
25
  }
26
+ /** Block-axis distribution of the whole grid when it's shorter than its container. */
23
27
  export declare enum GridAlignContent {
24
28
  START = "START",
25
29
  CENTER = "CENTER",
@@ -29,92 +33,47 @@ export declare enum GridAlignContent {
29
33
  SPACE_EVENLY = "SPACE_EVENLY",
30
34
  STRETCH = "STRETCH"
31
35
  }
32
- interface GridWrapperProps {
33
- /**
34
- * Number of columns in the grid, or a custom grid-template-columns value
35
- * - number: Creates that many equal-width columns using repeat(n, 1fr)
36
- * - string: Used directly as grid-template-columns value (e.g., "200px 1fr 1fr")
37
- */
36
+ export interface GridWrapperProps {
37
+ /** A number becomes `repeat(n, 1fr)`; a string is used as-is ("200px 1fr"). @default 1 */
38
38
  columns?: number | string;
39
- /**
40
- * Number of rows in the grid, or a custom grid-template-rows value
41
- * - number: Creates that many equal-height rows using repeat(n, 1fr)
42
- * - string: Used directly as grid-template-rows value
43
- */
39
+ /** A number becomes `repeat(n, 1fr)`; a string is used as-is. @default "auto" */
44
40
  rows?: number | string;
45
- /**
46
- * Gap between grid items (both row and column gap)
47
- * Can be a number (pixels) or string (e.g., "1rem")
48
- */
41
+ /** Space between items on both axes. A number is px. */
49
42
  gap?: number | string;
50
- /**
51
- * Gap between rows only
52
- */
43
+ /** Overrides `gap` on the row axis only. */
53
44
  rowGap?: number | string;
54
- /**
55
- * Gap between columns only
56
- */
45
+ /** Overrides `gap` on the column axis only. */
57
46
  columnGap?: number | string;
58
- /**
59
- * Aligns grid items along the block (column) axis within their grid area
60
- */
47
+ /** @default GridAlignItems.STRETCH */
61
48
  alignItems?: GridAlignItems;
62
- /**
63
- * Aligns grid items along the inline (row) axis within their grid area
64
- */
49
+ /** @default GridJustifyItems.STRETCH */
65
50
  justifyItems?: GridJustifyItems;
66
- /**
67
- * Aligns the grid along the block (column) axis when grid is smaller than container
68
- */
51
+ /** @default GridAlignContent.START */
69
52
  alignContent?: GridAlignContent;
70
- /**
71
- * Aligns the grid along the inline (row) axis when grid is smaller than container
72
- */
53
+ /** @default GridJustifyContent.START */
73
54
  justifyContent?: GridJustifyContent;
74
- /**
75
- * Sets the width of the grid container
76
- */
55
+ /** A number is px. @default "auto" */
77
56
  width?: number | string;
78
- /**
79
- * Sets the height of the grid container
80
- */
57
+ /** A number is px. @default "auto" */
81
58
  height?: number | string;
82
- /**
83
- * Sets the minimum width of the grid container
84
- */
85
59
  minWidth?: number | string;
86
- /**
87
- * Sets the maximum width of the grid container
88
- */
89
60
  maxWidth?: number | string;
90
- /**
91
- * Sets the minimum height of the grid container
92
- */
93
61
  minHeight?: number | string;
94
- /**
95
- * Sets the maximum height of the grid container
96
- */
97
62
  maxHeight?: number | string;
98
- /**
99
- * When true, the container will fill its parent's width (width: 100%)
100
- */
63
+ /** `width: 100%`. Takes precedence over `width`. */
101
64
  fillWidth?: boolean;
102
- /**
103
- * When true, the container will fill its parent's height (height: 100%)
104
- */
65
+ /** `height: 100%`. Takes precedence over `height`. */
105
66
  fillHeight?: boolean;
106
- /**
107
- * Sets the padding inside the container
108
- */
67
+ /** Inner spacing. A number is px. */
109
68
  padding?: number | string;
110
- /**
111
- * Sets the margin outside the container
112
- */
69
+ /** Escape hatch. DLS spaces with `gap` and `padding` — reach for those first. */
113
70
  margin?: number | string;
114
- /**
115
- * Controls overflow behavior
116
- */
71
+ /** @default "visible" */
117
72
  overflow?: React.CSSProperties["overflow"];
118
73
  }
74
+ /**
75
+ * A `display: grid` container. Use it when children need to line up across both
76
+ * axes; for a single row or column `FlexWrapper` is the lighter choice.
77
+ */
119
78
  declare const GridWrapper: ({ children, columns, rows, gap, rowGap, columnGap, alignItems, justifyItems, alignContent, justifyContent, width, height, minWidth, maxWidth, minHeight, maxHeight, fillWidth, fillHeight, padding, margin, overflow, }: PropsWithChildren<GridWrapperProps>) => import("react").JSX.Element;
120
79
  export default GridWrapper;
@@ -3,6 +3,7 @@ import { getCssSizeValue } from "../utils/linaria.js";
3
3
  import { styled } from "@linaria/react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/containers/GridWrapper.tsx
6
+ /** Block-axis alignment of each item inside its own grid area (`align-items`). */
6
7
  var GridAlignItems = /* @__PURE__ */ function(GridAlignItems) {
7
8
  GridAlignItems["START"] = "START";
8
9
  GridAlignItems["CENTER"] = "CENTER";
@@ -10,6 +11,7 @@ var GridAlignItems = /* @__PURE__ */ function(GridAlignItems) {
10
11
  GridAlignItems["STRETCH"] = "STRETCH";
11
12
  return GridAlignItems;
12
13
  }({});
14
+ /** Inline-axis alignment of each item inside its own grid area (`justify-items`). */
13
15
  var GridJustifyItems = /* @__PURE__ */ function(GridJustifyItems) {
14
16
  GridJustifyItems["START"] = "START";
15
17
  GridJustifyItems["CENTER"] = "CENTER";
@@ -17,6 +19,7 @@ var GridJustifyItems = /* @__PURE__ */ function(GridJustifyItems) {
17
19
  GridJustifyItems["STRETCH"] = "STRETCH";
18
20
  return GridJustifyItems;
19
21
  }({});
22
+ /** Inline-axis distribution of the whole grid when it's narrower than its container. */
20
23
  var GridJustifyContent = /* @__PURE__ */ function(GridJustifyContent) {
21
24
  GridJustifyContent["START"] = "START";
22
25
  GridJustifyContent["CENTER"] = "CENTER";
@@ -27,6 +30,7 @@ var GridJustifyContent = /* @__PURE__ */ function(GridJustifyContent) {
27
30
  GridJustifyContent["STRETCH"] = "STRETCH";
28
31
  return GridJustifyContent;
29
32
  }({});
33
+ /** Block-axis distribution of the whole grid when it's shorter than its container. */
30
34
  var GridAlignContent = /* @__PURE__ */ function(GridAlignContent) {
31
35
  GridAlignContent["START"] = "START";
32
36
  GridAlignContent["CENTER"] = "CENTER";
@@ -88,6 +92,10 @@ var StyledGridWrapper = /*#__PURE__*/ styled("div")({
88
92
  "s40bxfr-17": [_exp16()]
89
93
  }
90
94
  });
95
+ /**
96
+ * A `display: grid` container. Use it when children need to line up across both
97
+ * axes; for a single row or column `FlexWrapper` is the lighter choice.
98
+ */
91
99
  var GridWrapper = ({ children, columns, rows, gap, rowGap, columnGap, alignItems, justifyItems, alignContent, justifyContent, width, height, minWidth, maxWidth, minHeight, maxHeight, fillWidth = false, fillHeight = false, padding, margin, overflow }) => {
92
100
  return /* @__PURE__ */ jsx(StyledGridWrapper, {
93
101
  columns,
@@ -1,7 +1,10 @@
1
1
  import type { PropsWithChildren } from "react";
2
+ /** A length. A number is px; a string is used as-is ("1rem", "auto"). */
2
3
  export type SpacingSize = string | number;
3
4
  export interface SpacingProps {
5
+ /** CSS margin shorthand. An array joins with spaces: `[8, 16]` → `8px 16px`. */
4
6
  margin?: SpacingSize | SpacingSize[];
7
+ /** Single-side margin. Ignored when `margin` is set. */
5
8
  top?: SpacingSize;
6
9
  right?: SpacingSize;
7
10
  bottom?: SpacingSize;
@@ -9,5 +12,12 @@ export interface SpacingProps {
9
12
  fillWidth?: boolean;
10
13
  fillHeight?: boolean;
11
14
  }
15
+ /**
16
+ * Applies margin to its children. Legacy escape hatch — DLS layouts space with
17
+ * `gap` and `padding`, so prefer `FlexWrapper`/`GridWrapper` for new work.
18
+ *
19
+ * `margin` and the per-side props are mutually exclusive: setting `margin` makes
20
+ * `top`/`right`/`bottom`/`left` no-ops.
21
+ */
12
22
  declare const Spacing: ({ children, margin, top, right, bottom, left, fillWidth, fillHeight, }: PropsWithChildren<SpacingProps>) => import("react").JSX.Element;
13
23
  export default Spacing;
@@ -31,6 +31,13 @@ var StyledSpacing = /*#__PURE__*/ styled("div")({
31
31
  "s2h3guw-6": [_exp7()]
32
32
  }
33
33
  });
34
+ /**
35
+ * Applies margin to its children. Legacy escape hatch — DLS layouts space with
36
+ * `gap` and `padding`, so prefer `FlexWrapper`/`GridWrapper` for new work.
37
+ *
38
+ * `margin` and the per-side props are mutually exclusive: setting `margin` makes
39
+ * `top`/`right`/`bottom`/`left` no-ops.
40
+ */
34
41
  var Spacing = ({ children, margin, top, right, bottom, left, fillWidth, fillHeight }) => {
35
42
  if (margin !== void 0) return /* @__PURE__ */ jsx(StyledSpacing, {
36
43
  $margin: getSpacingSizeValueFromShorthand(margin),
@@ -1,16 +1,26 @@
1
1
  import type { PropsWithChildren } from "react";
2
- interface WrapperProps {
2
+ export interface WrapperProps {
3
+ /** @default "static" */
3
4
  position?: React.CSSProperties["position"];
4
5
  minWidth?: number | string;
6
+ /** Doubles as the width when `fillWidth` is off. A number is px. */
5
7
  maxWidth?: number | string;
8
+ /** `width: 100%`. Takes precedence over `maxWidth`. */
6
9
  fillWidth?: boolean;
10
+ /** `height: 100%`. */
7
11
  fillHeight?: boolean;
12
+ /** @default "visible" */
8
13
  overflow?: React.CSSProperties["overflow"];
9
14
  padding?: React.CSSProperties["padding"];
15
+ /** Offset — only applies once `position` is not `static`. */
10
16
  top?: React.CSSProperties["top"];
11
17
  right?: React.CSSProperties["right"];
12
18
  bottom?: React.CSSProperties["bottom"];
13
19
  left?: React.CSSProperties["left"];
14
20
  }
21
+ /**
22
+ * A plain `div` with positioning and sizing props — the escape hatch for when
23
+ * you need a positioned box without flex or grid layout on it.
24
+ */
15
25
  declare const Wrapper: ({ children, position, minWidth, maxWidth, fillWidth, fillHeight, overflow, padding, top, right, bottom, left, }: PropsWithChildren<WrapperProps>) => import("react").JSX.Element;
16
26
  export default Wrapper;
@@ -30,6 +30,10 @@ var StyledWrapper = /*#__PURE__*/ styled("div")({
30
30
  "sck44b4-9": [_exp0()]
31
31
  }
32
32
  });
33
+ /**
34
+ * A plain `div` with positioning and sizing props — the escape hatch for when
35
+ * you need a positioned box without flex or grid layout on it.
36
+ */
33
37
  var Wrapper = ({ children, position, minWidth, maxWidth, fillWidth, fillHeight, overflow, padding, top, right, bottom, left }) => {
34
38
  return /* @__PURE__ */ jsx(StyledWrapper, {
35
39
  $position: position,
@@ -1,5 +1,7 @@
1
1
  export interface HorizontalDividerProps {
2
+ /** Caption centered in a break in the rule. Omit for an unbroken line. */
2
3
  label?: string;
3
4
  }
5
+ /** A full-width 0.5px hairline rule. Borders, not shadows — this is the separator. */
4
6
  declare const HorizontalDivider: ({ label }: HorizontalDividerProps) => import("react").JSX.Element;
5
7
  export default HorizontalDivider;
@@ -22,6 +22,7 @@ var LabeledDividerWrapper = /*#__PURE__*/ styled("div")({
22
22
  class: "l44ah51",
23
23
  propsAsIs: false
24
24
  });
25
+ /** A full-width 0.5px hairline rule. Borders, not shadows — this is the separator. */
25
26
  var HorizontalDivider = ({ label }) => {
26
27
  if (!label) return /* @__PURE__ */ jsx(HorizontalDividerLine, {});
27
28
  return /* @__PURE__ */ jsxs(LabeledDividerWrapper, { children: [
@@ -1,2 +1,6 @@
1
+ /**
2
+ * A 0.5px hairline rule for separating items in a row. Stretches to the height
3
+ * of its flex parent, so it needs one — it has no height of its own.
4
+ */
1
5
  declare const VerticalDivider: () => import("react").JSX.Element;
2
6
  export default VerticalDivider;
@@ -10,6 +10,10 @@ var VerticalDividerWrapper = withTheme(/*#__PURE__*/ styled("div")({
10
10
  propsAsIs: false,
11
11
  vars: { "v1f76t13-0": [_exp()] }
12
12
  }));
13
+ /**
14
+ * A 0.5px hairline rule for separating items in a row. Stretches to the height
15
+ * of its flex parent, so it needs one — it has no height of its own.
16
+ */
13
17
  var VerticalDivider = () => {
14
18
  return /* @__PURE__ */ jsx(VerticalDividerWrapper, {});
15
19
  };
@@ -1,13 +1,20 @@
1
1
  import { type PropsWithChildren } from "react";
2
2
  export interface DrawerProps {
3
+ /** Controlled visibility. The drawer has no open state of its own. */
3
4
  open: boolean;
5
+ /** Called on Escape, and on backdrop click when `closeOnClickOutside` is set. */
4
6
  onClose: () => void;
7
+ /** Panel width. A number is px. @default "60%" */
5
8
  width?: number | string;
6
- /**
7
- * Whether clicking outside the drawer should close it
8
- * @default false
9
- */
9
+ /** Close when the backdrop is clicked. @default false */
10
10
  closeOnClickOutside?: boolean;
11
11
  }
12
+ /**
13
+ * A panel that slides in from the right over a dimmed backdrop. Fully
14
+ * controlled — you own `open`.
15
+ *
16
+ * Stacking and Escape handling come from `OverlayProvider`, so only the topmost
17
+ * overlay closes on Escape. Wrap your app in that provider.
18
+ */
12
19
  declare const Drawer: ({ open, onClose, width, closeOnClickOutside, children, }: PropsWithChildren<DrawerProps>) => import("react").ReactPortal;
13
20
  export default Drawer;
@@ -43,6 +43,13 @@ var DrawerWrapperContentBody = withTheme(/*#__PURE__*/ styled("div")({
43
43
  "d410s14-2": [_exp5()]
44
44
  }
45
45
  }));
46
+ /**
47
+ * A panel that slides in from the right over a dimmed backdrop. Fully
48
+ * controlled — you own `open`.
49
+ *
50
+ * Stacking and Escape handling come from `OverlayProvider`, so only the topmost
51
+ * overlay closes on Escape. Wrap your app in that provider.
52
+ */
46
53
  var Drawer = ({ open, onClose, width, closeOnClickOutside = false, children }) => {
47
54
  const { zIndex, isTopmost } = useOverlay(onClose, open, { layer: OverlayLayer.DRAWER });
48
55
  const handleContentClick = useCallback((e) => {
@@ -1,4 +1,5 @@
1
1
  import { type PropsWithChildren, type ReactNode } from "react";
2
+ /** Surface treatment of the dropdown panel. */
2
3
  export declare enum DropdownVariant {
3
4
  TRANSPARENT = "TRANSPARENT",
4
5
  BASE = "BASE",
@@ -6,6 +7,7 @@ export declare enum DropdownVariant {
6
7
  SECONDARY = "SECONDARY",
7
8
  TERTIARY = "TERTIARY"
8
9
  }
10
+ /** Placement relative to the trigger. The `AUTO_*` values pick a side that fits. */
9
11
  export declare enum DropdownPosition {
10
12
  TOP = "top",
11
13
  BOTTOM = "bottom",
@@ -23,6 +25,7 @@ export declare enum DropdownPosition {
23
25
  AUTO_START = "auto-start",
24
26
  AUTO_END = "auto-end"
25
27
  }
28
+ /** What opens the panel. `MANUAL` hands control entirely to `isOpen`. */
26
29
  export declare enum DropdownTrigger {
27
30
  CLICK = "click",
28
31
  HOVER = "hover",
@@ -30,22 +33,43 @@ export declare enum DropdownTrigger {
30
33
  MANUAL = "manual"
31
34
  }
32
35
  export interface DropdownProps {
36
+ /** @default DropdownVariant.BASE */
33
37
  variant?: DropdownVariant;
38
+ /** Pinned above the scrolling body. */
34
39
  header?: ReactNode;
40
+ /** Panel content. */
35
41
  body: ReactNode;
42
+ /** Pinned below the scrolling body. */
36
43
  footer?: ReactNode;
44
+ /** @default DropdownPosition.BOTTOM_START */
37
45
  position?: DropdownPosition;
46
+ /** `[skidding, distance]` in px from the trigger. @default [0, 6] */
38
47
  offset?: [number, number];
48
+ /** @default DropdownTrigger.CLICK */
39
49
  trigger?: DropdownTrigger;
50
+ /** A number is px. */
40
51
  width?: number | string;
52
+ /** Controlled open state. Pass it together with `onClose`. */
41
53
  isOpen?: boolean;
54
+ /** Called when the panel dismisses itself — Escape, or a click outside. */
42
55
  onClose?: () => void;
43
56
  minWidth?: number | string;
57
+ /** Also clips overflowing content. A number is px. */
44
58
  maxWidth?: number | string;
59
+ /** Stretch the trigger wrapper to the parent's width. */
45
60
  fillWidth?: boolean;
61
+ /** Drop the 4px inset — for panels that host their own layout. */
46
62
  noPadding?: boolean;
63
+ /** Drop the hairline border. */
47
64
  noBorder?: boolean;
65
+ /** Render children bare, with no dropdown at all. */
48
66
  isDisabled?: boolean;
49
67
  }
68
+ /**
69
+ * A panel anchored to a trigger. Children are the trigger.
70
+ *
71
+ * Uncontrolled by default. Pass `isOpen` *and* `onClose` to drive it yourself —
72
+ * useful when a selection inside the body should close it.
73
+ */
50
74
  declare const Dropdown: ({ children, variant, header, body, footer, position, offset, minWidth, maxWidth, isOpen: controlledIsOpen, onClose, noPadding, noBorder, fillWidth, isDisabled, }: PropsWithChildren<DropdownProps>) => import("react").JSX.Element;
51
75
  export default Dropdown;