@giddaa-housing/ui 3.6.0 → 3.8.0

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.
package/css/theme.css CHANGED
@@ -283,20 +283,23 @@
283
283
  }
284
284
  }
285
285
 
286
- /* Drives `Sonar`. Spread rather than `transform: scale()` on purpose: spread
287
- grows the ring by the same number of pixels on every side and traces the
288
- element's own border-radius, so one keyframe fits a 8px dot and a wide
289
- button alike. Scaling would expand a wide element far more horizontally
290
- than vertically which is why sonar-glow above needs its per-axis
291
- --sonar-glow-scale-x/y knobs. */
286
+ /* Drives `Sonar`. Transform and opacity only, because they are the two
287
+ properties a browser can animate on the compositor: this grew the ring's
288
+ box-shadow spread instead until it turned out to repaint the ring and resize
289
+ its layer on every frame, which iOS Safari visibly stutters and flashes
290
+ through. The ring is now painted once at its full spread — still tracing the
291
+ element's own border-radius, still growing by the same number of pixels on
292
+ every side — and scaled back to the child's edge to start from. Per-axis,
293
+ like sonar-glow above, so a wide element's ring doesn't travel further
294
+ sideways than vertically; `sonar.tsx` measures the child and sets the two. */
292
295
  @keyframes sonar-wave {
293
296
  from {
294
- box-shadow: 0 0 0 0 currentColor;
297
+ transform: scale(var(--sonar-scale-x, 0.5), var(--sonar-scale-y, 0.5));
295
298
  opacity: 0.55;
296
299
  }
297
300
 
298
301
  to {
299
- box-shadow: 0 0 0 var(--sonar-spread, 0.625rem) currentColor;
302
+ transform: scale(1, 1);
300
303
  opacity: 0;
301
304
  }
302
305
  }
package/dist/button.js CHANGED
@@ -76,15 +76,17 @@ function useResolvedButtonSize(size) {
76
76
  const inherited = useComponentSizeValue();
77
77
  return responsiveValueClasses(size ?? inherited, responsiveButtonSizeClasses);
78
78
  }
79
+ const responsiveLinkReset = "h-auto min-h-0 w-auto min-w-0 shrink justify-start rounded-none px-0 py-0 text-left whitespace-normal underline-offset-4 active:not-aria-[haspopup]:translate-y-0 md:h-auto md:min-h-0 md:w-auto md:min-w-0 md:px-0 md:py-0 lg:h-auto lg:min-h-0 lg:w-auto lg:min-w-0 lg:px-0 lg:py-0";
79
80
  function Button({ className, variant = "primary", size, isLoading = false, children, disabled = false, ...props }) {
80
81
  const resolvedSize = useResolvedButtonSize(size);
81
82
  const _disabled = disabled || isLoading;
83
+ const isLinkVariant = variant === "link-brand" || variant === "link-neutral";
82
84
  return /* @__PURE__ */ jsxs(Button$1, {
83
85
  "data-slot": "button",
84
86
  className: cn(buttonVariants({
85
87
  variant,
86
88
  size: null
87
- }), resolvedSize.className, className),
89
+ }), resolvedSize.className, isLinkVariant && responsiveLinkReset, className),
88
90
  disabled: _disabled,
89
91
  ...props,
90
92
  children: [
@@ -103,7 +105,7 @@ function ButtonLink({ className, render, variant = "primary", size, disabled = f
103
105
  className: cn(buttonVariants({
104
106
  variant,
105
107
  size: null
106
- }), resolvedSize.className, isLinkVariant && "md:h-auto md:min-h-0 md:w-auto md:min-w-0 md:px-0 md:py-0 lg:h-auto lg:min-h-0 lg:w-auto lg:min-w-0 lg:px-0 lg:py-0", className),
108
+ }), resolvedSize.className, isLinkVariant && responsiveLinkReset, className),
107
109
  children
108
110
  }, {
109
111
  ...props,
package/dist/calendar.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { ChevronLeft, ChevronRight } from "./icons.js";
3
3
  import { cn } from "./utils/cn.js";
4
4
  import { Button } from "./button.js";
5
- import { _ as ComboboxValue, d as ComboboxInput, f as ComboboxItem, g as ComboboxTrigger, m as ComboboxList, o as ComboboxContent, s as ComboboxEmpty, t as Combobox } from "./combobox-CACVdp1R.js";
5
+ import { _ as ComboboxValue, d as ComboboxInput, f as ComboboxItem, g as ComboboxTrigger, m as ComboboxList, o as ComboboxContent, s as ComboboxEmpty, t as Combobox } from "./combobox-D7QdQzN8.js";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import * as React from "react";
8
8
  import { DayPicker, getDefaultClassNames } from "react-day-picker";
@@ -1,6 +1,6 @@
1
1
  import { Check, ChevronDown, X } from "./icons.js";
2
2
  import { cn } from "./utils/cn.js";
3
- import { SizeProvider, useComponentSize } from "./size-context.js";
3
+ import { SizeProvider, responsiveValueClasses, useComponentSize, useComponentSizeValue } from "./size-context.js";
4
4
  import { Button } from "./button.js";
5
5
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.js";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -90,6 +90,57 @@ const comboboxInputVariants = cva("w-auto data-[grown=true]:rounded-2xl has-data
90
90
  } },
91
91
  defaultVariants: { size: "md" }
92
92
  });
93
+ const responsiveComboboxTriggerSizes = {
94
+ base: {
95
+ sm: "h-8 min-h-8 gap-2 px-3 text-gdt-xs [&_svg:not([class*='size-'])]:size-3.5",
96
+ md: "h-10 min-h-10 gap-2 px-3.5 text-gdt-sm [&_svg:not([class*='size-'])]:size-4",
97
+ lg: "h-12 min-h-12 gap-2.5 px-4 pr-5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5"
98
+ },
99
+ md: {
100
+ sm: "md:h-8 md:min-h-8 md:gap-2 md:px-3 md:text-gdt-xs md:[&_svg:not([class*='size-'])]:size-3.5",
101
+ md: "md:h-10 md:min-h-10 md:gap-2 md:px-3.5 md:text-gdt-sm md:[&_svg:not([class*='size-'])]:size-4",
102
+ lg: "md:h-12 md:min-h-12 md:gap-2.5 md:px-4 md:pr-5 md:text-gdt-md md:[&_svg:not([class*='size-'])]:size-4.5"
103
+ },
104
+ lg: {
105
+ sm: "lg:h-8 lg:min-h-8 lg:gap-2 lg:px-3 lg:text-gdt-xs lg:[&_svg:not([class*='size-'])]:size-3.5",
106
+ md: "lg:h-10 lg:min-h-10 lg:gap-2 lg:px-3.5 lg:text-gdt-sm lg:[&_svg:not([class*='size-'])]:size-4",
107
+ lg: "lg:h-12 lg:min-h-12 lg:gap-2.5 lg:px-4 lg:pr-5 lg:text-gdt-md lg:[&_svg:not([class*='size-'])]:size-4.5"
108
+ }
109
+ };
110
+ const responsiveComboboxInputSizes = {
111
+ base: {
112
+ sm: "min-h-8",
113
+ md: "min-h-10",
114
+ lg: "min-h-12"
115
+ },
116
+ md: {
117
+ sm: "md:min-h-8",
118
+ md: "md:min-h-10",
119
+ lg: "md:min-h-12"
120
+ },
121
+ lg: {
122
+ sm: "lg:min-h-8",
123
+ md: "lg:min-h-10",
124
+ lg: "lg:min-h-12"
125
+ }
126
+ };
127
+ const responsiveComboboxPopupInputSizes = {
128
+ base: {
129
+ sm: "rounded-md",
130
+ md: "rounded-lg",
131
+ lg: "rounded-lg"
132
+ },
133
+ md: {
134
+ sm: "md:rounded-md",
135
+ md: "md:rounded-lg",
136
+ lg: "md:rounded-lg"
137
+ },
138
+ lg: {
139
+ sm: "lg:rounded-md",
140
+ md: "lg:rounded-lg",
141
+ lg: "lg:rounded-lg"
142
+ }
143
+ };
93
144
  /**
94
145
  * The same field, standing in the popup as its search box. It is inside the
95
146
  * open popup rather than being the thing that opened it, so none of the
@@ -121,6 +172,16 @@ const comboboxContentBodyVariants = cva("flex min-h-0 flex-1 flex-col overflow-h
121
172
  } },
122
173
  defaultVariants: { size: "md" }
123
174
  });
175
+ const comboboxEdgeSizes = {
176
+ sm: "px-4",
177
+ md: "px-5.5",
178
+ lg: "px-6"
179
+ };
180
+ const comboboxLabelSizes = {
181
+ sm: "px-3",
182
+ md: "px-4",
183
+ lg: "px-4"
184
+ };
124
185
  const comboboxItemVariants = cva("group/combobox-item relative flex w-full cursor-pointer items-center font-normal text-fg-primary outline-none select-none data-highlighted:bg-surface data-disabled:pointer-events-none data-disabled:text-fg-caption-placeholder [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
125
186
  variants: { size: {
126
187
  sm: "gap-1.5 rounded-md px-3 py-1.5 text-gdt-xs",
@@ -152,14 +213,14 @@ function ComboboxValue({ ...props }) {
152
213
  });
153
214
  }
154
215
  function ComboboxTrigger({ className, children, ...props }) {
155
- const resolvedSize = useComponentSize();
216
+ const resolvedSize = responsiveValueClasses(useComponentSizeValue(), responsiveComboboxTriggerSizes);
156
217
  const { ref, grown } = useGrown();
157
218
  return /* @__PURE__ */ jsxs(Combobox.Trigger, {
158
219
  ref,
159
220
  "data-slot": "combobox-trigger",
160
- "data-size": resolvedSize,
221
+ "data-size": resolvedSize.base,
161
222
  "data-grown": grown ? "true" : void 0,
162
- className: cn(comboboxTriggerVariants({ size: resolvedSize }), className),
223
+ className: cn(comboboxTriggerVariants({ size: null }), resolvedSize.className, className),
163
224
  ...props,
164
225
  children: [children, /* @__PURE__ */ jsx(Combobox.Icon, { render: /* @__PURE__ */ jsx(ChevronDown, { className: "text-line-strong transition-transform group-data-disabled/combobox-trigger:text-fg-caption-placeholder group-data-popup-open/combobox-trigger:rotate-180" }) })]
165
226
  });
@@ -177,7 +238,9 @@ function ComboboxClear({ className, ...props }) {
177
238
  });
178
239
  }
179
240
  function ComboboxInput({ className, children, disabled = false, showTrigger = true, showClear = false, ...props }) {
180
- const resolvedSize = useComponentSize();
241
+ const sizeValue = useComponentSizeValue();
242
+ const resolvedSize = responsiveValueClasses(sizeValue, responsiveComboboxInputSizes);
243
+ const popupSize = responsiveValueClasses(sizeValue, responsiveComboboxPopupInputSizes);
181
244
  const insidePopup = React.useContext(ComboboxPopupContext);
182
245
  const { ref, grown } = useGrown();
183
246
  const contents = /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -199,13 +262,13 @@ function ComboboxInput({ className, children, disabled = false, showTrigger = tr
199
262
  children
200
263
  ] });
201
264
  if (insidePopup) return /* @__PURE__ */ jsx(InputGroup, {
202
- className: cn(comboboxPopupInputVariants({ size: resolvedSize }), className),
265
+ className: cn(comboboxPopupInputVariants({ size: null }), popupSize.className, className),
203
266
  children: contents
204
267
  });
205
268
  return /* @__PURE__ */ jsx(Combobox.InputGroup, {
206
269
  ref,
207
270
  "data-grown": grown ? "true" : void 0,
208
- render: /* @__PURE__ */ jsx(InputGroup, { className: cn(comboboxInputVariants({ size: resolvedSize }), className) }),
271
+ render: /* @__PURE__ */ jsx(InputGroup, { className: cn(comboboxInputVariants({ size: null }), resolvedSize.className, className) }),
209
272
  children: contents
210
273
  });
211
274
  }
@@ -239,18 +302,20 @@ function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "
239
302
  }) });
240
303
  }
241
304
  function ComboboxHeader({ className, type = "button", ...props }) {
305
+ const resolvedSize = useComponentSize();
242
306
  return /* @__PURE__ */ jsx("button", {
243
307
  type,
244
308
  "data-slot": "combobox-header",
245
- className: cn("relative z-20 flex min-h-9 w-full shrink-0 cursor-pointer items-center gap-2 rounded-none rounded-t-[inherit] border-line-subtle border-b bg-canvas px-3 py-2 text-left text-gdt-sm font-bold text-fg-brand outline-none transition-colors hover:bg-surface-brand-subtle focus-visible:bg-surface-brand-subtle focus-visible:inset-ring-2 focus-visible:inset-ring-line-focus active:bg-surface-brand-subtle disabled:pointer-events-none disabled:text-fg-caption-placeholder", "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className),
309
+ className: cn("relative z-20 flex min-h-9 w-full shrink-0 cursor-pointer items-center gap-2 rounded-none rounded-t-[inherit] border-line-subtle border-b bg-canvas py-2 text-left text-gdt-sm font-bold text-fg-brand outline-none transition-colors hover:bg-surface-brand-subtle focus-visible:bg-surface-brand-subtle focus-visible:inset-ring-2 focus-visible:inset-ring-line-focus active:bg-surface-brand-subtle disabled:pointer-events-none disabled:text-fg-caption-placeholder", "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", comboboxEdgeSizes[resolvedSize], className),
246
310
  ...props
247
311
  });
248
312
  }
249
313
  function ComboboxFooter({ className, type = "button", ...props }) {
314
+ const resolvedSize = useComponentSize();
250
315
  return /* @__PURE__ */ jsx("button", {
251
316
  type,
252
317
  "data-slot": "combobox-footer",
253
- className: cn("relative z-20 flex min-h-9 w-full shrink-0 cursor-pointer items-center gap-2 rounded-none rounded-b-[inherit] border-line-subtle border-t bg-canvas px-3 py-2 text-left text-gdt-sm font-semibold text-fg-secondary outline-none transition-colors hover:bg-surface focus-visible:bg-surface focus-visible:inset-ring-2 focus-visible:inset-ring-line-focus active:bg-surface-raised disabled:pointer-events-none disabled:text-fg-caption-placeholder", "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className),
318
+ className: cn("relative z-20 flex min-h-9 w-full shrink-0 cursor-pointer items-center gap-2 rounded-none rounded-b-[inherit] border-line-subtle border-t bg-canvas py-2 text-left text-gdt-sm font-semibold text-fg-secondary outline-none transition-colors hover:bg-surface focus-visible:bg-surface focus-visible:inset-ring-2 focus-visible:inset-ring-line-focus active:bg-surface-raised disabled:pointer-events-none disabled:text-fg-caption-placeholder", "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", comboboxEdgeSizes[resolvedSize], className),
254
319
  ...props
255
320
  });
256
321
  }
@@ -286,9 +351,10 @@ function ComboboxGroup({ className, ...props }) {
286
351
  });
287
352
  }
288
353
  function ComboboxLabel({ className, ...props }) {
354
+ const resolvedSize = useComponentSize();
289
355
  return /* @__PURE__ */ jsx(Combobox.GroupLabel, {
290
356
  "data-slot": "combobox-label",
291
- className: cn("px-3 py-1 text-gdt-xs text-fg-secondary", className),
357
+ className: cn("py-1 text-gdt-xs text-fg-secondary", comboboxLabelSizes[resolvedSize], className),
292
358
  ...props
293
359
  });
294
360
  }
@@ -1,9 +1,9 @@
1
- import { t as ComponentSize } from "./size-context-BVhHduLi.js";
1
+ import { n as ComponentSizeValue } from "./size-context-BVhHduLi.js";
2
2
  import * as React from "react";
3
3
  import { Combobox as Combobox$1 } from "@base-ui/react";
4
4
  import { Virtualizer } from "@tanstack/react-virtual";
5
5
  //#region src/combobox.d.ts
6
- type ComboboxSize = ComponentSize;
6
+ type ComboboxSize = ComponentSizeValue;
7
7
  declare function Combobox<Value, Multiple extends boolean | undefined = false>({ multiple, children, size, ...props }: Combobox$1.Root.Props<Value, Multiple> & {
8
8
  size?: ComboboxSize;
9
9
  }): React.JSX.Element;
package/dist/combobox.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { _ as ComboboxValue, a as ComboboxCollection, b as useComboboxVirtualizer, c as ComboboxFooter, d as ComboboxInput, f as ComboboxItem, g as ComboboxTrigger, h as ComboboxSeparator, i as ComboboxChipsInput, l as ComboboxGroup, m as ComboboxList, n as ComboboxChip, o as ComboboxContent, p as ComboboxLabel, r as ComboboxChips, s as ComboboxEmpty, t as Combobox, u as ComboboxHeader, v as ComboboxVirtualizedList, y as useComboboxAnchor } from "./combobox-CACVdp1R.js";
2
+ import { _ as ComboboxValue, a as ComboboxCollection, b as useComboboxVirtualizer, c as ComboboxFooter, d as ComboboxInput, f as ComboboxItem, g as ComboboxTrigger, h as ComboboxSeparator, i as ComboboxChipsInput, l as ComboboxGroup, m as ComboboxList, n as ComboboxChip, o as ComboboxContent, p as ComboboxLabel, r as ComboboxChips, s as ComboboxEmpty, t as Combobox, u as ComboboxHeader, v as ComboboxVirtualizedList, y as useComboboxAnchor } from "./combobox-D7QdQzN8.js";
3
3
  export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxFooter, ComboboxGroup, ComboboxHeader, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, ComboboxVirtualizedList, useComboboxAnchor, useComboboxVirtualizer };
@@ -2,7 +2,7 @@ import { t as Button } from "./button-BS5KCibF.js";
2
2
  import { Empty } from "./empty-state.js";
3
3
  import { FilterApplyButtonProps, FilterContentProps, FilterProps, FilterResetButtonProps } from "./filter.js";
4
4
  import { Pagination } from "./pagination.js";
5
- import { a as PopoverFooter, n as PopoverBody, o as PopoverHeader, r as PopoverContent } from "./popover-CNymD33m.js";
5
+ import { a as PopoverFooter, n as PopoverBody, o as PopoverHeader, r as PopoverContent } from "./popover-BMTZp3AQ.js";
6
6
  import { Table as Table$1 } from "./table.js";
7
7
  import * as React from "react";
8
8
  import { ColumnDef, Row, Table, TableOptions } from "@tanstack/react-table";
@@ -1,5 +1,5 @@
1
1
  import { InputSizeValue } from "./input.js";
2
- import { t as PickerPlacementProps } from "./picker-j3txxA5t.js";
2
+ import { t as PickerPlacementProps } from "./picker-qxWi9wZ1.js";
3
3
  import * as React from "react";
4
4
  import { DateRange, Matcher } from "react-day-picker";
5
5
  //#region src/date-picker.d.ts
package/dist/dialog.d.ts CHANGED
@@ -4,7 +4,7 @@ import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
4
4
  //#region src/dialog.d.ts
5
5
  declare function Dialog({ ...props }: Dialog$1.Root.Props): React.JSX.Element;
6
6
  declare function DialogTrigger({ ...props }: Dialog$1.Trigger.Props): React.JSX.Element;
7
- declare function DialogPortal({ ...props }: Dialog$1.Portal.Props): React.JSX.Element;
7
+ declare function DialogPortal({ className, ...props }: Dialog$1.Portal.Props): React.JSX.Element;
8
8
  declare function DialogClose({ ...props }: Dialog$1.Close.Props): React.JSX.Element;
9
9
  declare function DialogOverlay({ className, ...props }: Dialog$1.Backdrop.Props): React.JSX.Element;
10
10
  declare const dialogContentVariants: (props?: ({
@@ -16,10 +16,12 @@ declare const dialogIconVariants: (props?: ({
16
16
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
17
17
  type DialogContentProps = Dialog$1.Popup.Props & VariantProps<typeof dialogContentVariants> & {
18
18
  showCloseButton?: boolean;
19
+ /** Controls the visual response when this surface participates in a nested dialog stack. */
20
+ nestingEffect?: "stack" | "none";
19
21
  /** @internal Positions specialized popup shells without changing the surface. */
20
22
  popupClassName?: string;
21
23
  };
22
- declare function DialogContent({ className, children, size, showCloseButton, popupClassName, ...props }: DialogContentProps): React.JSX.Element;
24
+ declare function DialogContent({ className, children, size, showCloseButton, nestingEffect, popupClassName, ...props }: DialogContentProps): React.JSX.Element;
23
25
  declare function DialogIcon({ className, size, tone, ...props }: React.ComponentProps<"div"> & VariantProps<typeof dialogIconVariants>): React.JSX.Element;
24
26
  declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
25
27
  declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
package/dist/dialog.js CHANGED
@@ -3,16 +3,15 @@ import { X } from "./icons.js";
3
3
  import { cn } from "./utils/cn.js";
4
4
  import { SizeProvider, useComponentSize } from "./size-context.js";
5
5
  import { Button } from "./button.js";
6
- import { DialogNestingProvider, useDialogNestingDepth } from "./dialog-nesting.js";
7
6
  import { jsx, jsxs } from "react/jsx-runtime";
8
7
  import { cva } from "class-variance-authority";
9
8
  import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
10
9
  //#region src/dialog.tsx
11
10
  function Dialog({ ...props }) {
12
- return /* @__PURE__ */ jsx(DialogNestingProvider, { children: /* @__PURE__ */ jsx(Dialog$1.Root, {
11
+ return /* @__PURE__ */ jsx(Dialog$1.Root, {
13
12
  "data-slot": "dialog",
14
13
  ...props
15
- }) });
14
+ });
16
15
  }
17
16
  function DialogTrigger({ ...props }) {
18
17
  return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
@@ -20,9 +19,10 @@ function DialogTrigger({ ...props }) {
20
19
  ...props
21
20
  });
22
21
  }
23
- function DialogPortal({ ...props }) {
22
+ function DialogPortal({ className, ...props }) {
24
23
  return /* @__PURE__ */ jsx(Dialog$1.Portal, {
25
24
  "data-slot": "dialog-portal",
25
+ className: (state) => cn("group/dialog-portal", typeof className === "function" ? className(state) : className),
26
26
  ...props
27
27
  });
28
28
  }
@@ -33,16 +33,14 @@ function DialogClose({ ...props }) {
33
33
  });
34
34
  }
35
35
  function DialogOverlay({ className, ...props }) {
36
- const nested = useDialogNestingDepth() > 1;
37
36
  return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
38
37
  forceRender: true,
39
38
  "data-slot": "dialog-overlay",
40
- "data-nested": nested || void 0,
41
- className: cn("fixed inset-0 z-50 transition-opacity duration-150 ease-gdt-out data-closed:opacity-0 data-open:opacity-100", nested ? "bg-black/25" : "bg-black/55 supports-backdrop-filter:backdrop-blur-xl", className),
39
+ className: cn("fixed inset-0 z-50 bg-black/55 transition-opacity duration-150 ease-gdt-out data-closed:opacity-0 data-open:opacity-100 supports-backdrop-filter:backdrop-blur-xl group-has-[>.is-nested-dialog]/dialog-portal:bg-black/25 supports-backdrop-filter:group-has-[>.is-nested-dialog]/dialog-portal:backdrop-blur-none", className),
42
40
  ...props
43
41
  });
44
42
  }
45
- const dialogContentVariants = cva("group/dialog-content pointer-events-none fixed top-1/2 left-1/2 z-50 w-full max-w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 overflow-visible outline-none [--dialog-padding:1.25rem] origin-center transition-[opacity,scale] duration-[var(--duration-motion-popup)] ease-gdt-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95 motion-reduce:data-starting-style:scale-100 motion-reduce:data-ending-style:scale-100 data-[nested-dialog-open]:scale-[0.96]", {
43
+ const dialogContentVariants = cva("group/dialog-content pointer-events-none fixed top-1/2 left-1/2 z-50 w-full max-w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 overflow-visible outline-none [--dialog-padding:1.25rem] origin-center transition-[opacity,scale] duration-[var(--duration-motion-popup)] ease-gdt-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95 motion-reduce:data-starting-style:scale-100 motion-reduce:data-ending-style:scale-100", {
46
44
  variants: { size: {
47
45
  sm: "sm:w-90 sm:[--dialog-padding:1.5rem]",
48
46
  md: "sm:w-105 sm:[--dialog-padding:1.5rem]",
@@ -69,14 +67,15 @@ const dialogIconVariants = cva("flex shrink-0 items-center justify-center [&_svg
69
67
  tone: "brand"
70
68
  }
71
69
  });
72
- function DialogContent({ className, children, size, showCloseButton = true, popupClassName, ...props }) {
70
+ function DialogContent({ className, children, size, showCloseButton = true, nestingEffect = "stack", popupClassName, ...props }) {
73
71
  const resolvedSize = useComponentSize(size);
74
72
  return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsx(SizeProvider, {
75
73
  size: resolvedSize,
76
74
  children: /* @__PURE__ */ jsxs(Dialog$1.Popup, {
77
75
  "data-slot": "dialog-content",
78
76
  "data-size": resolvedSize,
79
- className: cn(dialogContentVariants({ size: resolvedSize }), popupClassName),
77
+ "data-nesting-effect": nestingEffect,
78
+ className: (state) => cn(dialogContentVariants({ size: resolvedSize }), nestingEffect === "stack" && state.nested && "is-nested-dialog", nestingEffect === "stack" && "data-[nested-dialog-open]:scale-[0.96]", popupClassName),
80
79
  ...props,
81
80
  children: [/* @__PURE__ */ jsx("div", {
82
81
  "data-slot": "dialog-surface",
@@ -86,7 +85,7 @@ function DialogContent({ className, children, size, showCloseButton = true, popu
86
85
  "data-slot": "dialog-close",
87
86
  render: /* @__PURE__ */ jsxs(Button, {
88
87
  variant: "tertiary",
89
- className: "pointer-events-auto absolute -top-10 right-0 z-10 group-data-[nested-dialog-open]/dialog-content:hidden",
88
+ className: cn("pointer-events-auto absolute -top-10 right-0 z-10", nestingEffect === "stack" && "group-data-[nested-dialog-open]/dialog-content:hidden"),
90
89
  size: "icon-sm",
91
90
  children: [/* @__PURE__ */ jsx(X, {}), /* @__PURE__ */ jsx("span", {
92
91
  className: "sr-only",
package/dist/field.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as ComponentSizeValue } from "./size-context-BVhHduLi.js";
2
- import { Label } from "./label.js";
2
+ import { Label, LabelSupplement } from "./label.js";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  //#region src/field.d.ts
5
5
  declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react").JSX.Element;
@@ -16,6 +16,7 @@ declare function Field({ className, orientation, size, ...props }: React.Compone
16
16
  }): import("react").JSX.Element;
17
17
  declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
18
18
  declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react").JSX.Element;
19
+ declare function FieldLabelSupplement({ className, ...props }: React.ComponentProps<typeof LabelSupplement>): import("react").JSX.Element;
19
20
  declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
20
21
  declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): import("react").JSX.Element;
21
22
  declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
@@ -27,4 +28,4 @@ declare function FieldError({ className, children, errors, ...props }: React.Com
27
28
  } | undefined>;
28
29
  }): import("react").JSX.Element | null;
29
30
  //#endregion
30
- export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
31
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLabelSupplement, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
package/dist/field.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { cn } from "./utils/cn.js";
3
3
  import { SizeProvider, responsiveValueClasses, useComponentSizeValue } from "./size-context.js";
4
4
  import { Separator } from "./separator.js";
5
- import { Label } from "./label.js";
5
+ import { Label, LabelSupplement } from "./label.js";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { cva } from "class-variance-authority";
8
8
  import { useMemo } from "react";
@@ -95,6 +95,13 @@ function FieldLabel({ className, ...props }) {
95
95
  ...props
96
96
  });
97
97
  }
98
+ function FieldLabelSupplement({ className, ...props }) {
99
+ return /* @__PURE__ */ jsx(LabelSupplement, {
100
+ "data-slot": "field-label-supplement",
101
+ className: cn("shrink font-normal", className),
102
+ ...props
103
+ });
104
+ }
98
105
  function FieldTitle({ className, ...props }) {
99
106
  return /* @__PURE__ */ jsx("div", {
100
107
  "data-slot": "field-label",
@@ -143,4 +150,4 @@ function FieldError({ className, children, errors, ...props }) {
143
150
  });
144
151
  }
145
152
  //#endregion
146
- export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
153
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLabelSupplement, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
package/dist/infotip.js CHANGED
@@ -11,7 +11,6 @@ function Infotip({ ...props }) {
11
11
  }
12
12
  function InfotipTrigger({ ...props }) {
13
13
  return /* @__PURE__ */ jsx(Popover.Trigger, {
14
- nativeButton: false,
15
14
  "data-slot": "infotip-trigger",
16
15
  openOnHover: true,
17
16
  delay: 100,
@@ -80,12 +80,12 @@ function InputGroupAddon({ className, align = "inline-start", ...props }) {
80
80
  ...props
81
81
  });
82
82
  }
83
- const inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none rounded-full", {
83
+ const inputGroupButtonVariants = cva("flex items-center gap-2 shadow-none rounded-full", {
84
84
  variants: { size: {
85
- xs: "h-6 gap-1 px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
86
- sm: "",
87
- "icon-xs": "size-6 p-0 has-[>svg]:p-0",
88
- "icon-sm": "size-8 p-0 has-[>svg]:p-0"
85
+ xs: "h-6 gap-1 px-1.5 text-gdt-xs [&_svg:not([class*='size-'])]:size-3.5",
86
+ sm: "text-gdt-sm",
87
+ "icon-xs": "size-6 min-w-0 gap-0 p-0 text-gdt-xs has-[>svg]:p-0 [&_svg:not([class*='size-'])]:size-3.5",
88
+ "icon-sm": "size-8 min-w-0 gap-0 p-0 text-gdt-sm has-[>svg]:p-0 [&_svg:not([class*='size-'])]:size-4"
89
89
  } },
90
90
  defaultVariants: { size: "xs" }
91
91
  });
package/dist/label.d.ts CHANGED
@@ -4,5 +4,6 @@ declare function Label({ className, children, withAsterisk, showOptionalText, ..
4
4
  withAsterisk?: boolean;
5
5
  showOptionalText?: boolean;
6
6
  }): React.JSX.Element;
7
+ declare function LabelSupplement({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
7
8
  //#endregion
8
- export { Label };
9
+ export { Label, LabelSupplement };
package/dist/label.js CHANGED
@@ -3,39 +3,27 @@ import { cn } from "./utils/cn.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/label.tsx
5
5
  function Label({ className, children, withAsterisk = false, showOptionalText = false, ...props }) {
6
- const labelClassName = cn("flex w-fit max-w-full items-center gap-1 text-gdt-sm leading-none font-semibold text-fg-primary select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className);
7
- if (withAsterisk) return /* @__PURE__ */ jsxs("label", {
6
+ return /* @__PURE__ */ jsxs("label", {
8
7
  "data-slot": "label",
9
- className: labelClassName,
8
+ className: cn("flex w-fit max-w-full flex-wrap items-baseline gap-x-1 gap-y-0.5 text-gdt-sm leading-none font-semibold text-fg-primary select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
10
9
  ...props,
11
10
  children: [
12
- /* @__PURE__ */ jsx("div", {
13
- className: "inline-flex",
14
- children
15
- }),
11
+ children,
12
+ showOptionalText && /* @__PURE__ */ jsx(LabelSupplement, { children: "(optional)" }),
16
13
  withAsterisk && /* @__PURE__ */ jsx("span", {
14
+ "aria-hidden": "true",
17
15
  className: "inline-flex shrink-0 text-fg-danger",
18
16
  children: "*"
19
- }),
20
- showOptionalText && /* @__PURE__ */ jsx("span", {
21
- className: "text-gdt-xs font-normal italic",
22
- children: "(optional)"
23
17
  })
24
18
  ]
25
19
  });
26
- return /* @__PURE__ */ jsx("label", {
27
- "data-slot": "label",
28
- className: labelClassName,
29
- ...props,
30
- children: /* @__PURE__ */ jsxs("div", { children: [
31
- children,
32
- " ",
33
- showOptionalText && /* @__PURE__ */ jsx("span", {
34
- className: "text-gdt-xs font-normal italic",
35
- children: "(optional)"
36
- })
37
- ] })
20
+ }
21
+ function LabelSupplement({ className, ...props }) {
22
+ return /* @__PURE__ */ jsx("span", {
23
+ "data-slot": "label-supplement",
24
+ className: cn("font-normal italic text-fg-secondary", className),
25
+ ...props
38
26
  });
39
27
  }
40
28
  //#endregion
41
- export { Label };
29
+ export { Label, LabelSupplement };
package/dist/match.d.ts CHANGED
@@ -7,12 +7,21 @@ declare const matchVariants: (props?: ({
7
7
  size?: "lg" | "md" | "sm" | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  type MatchVariant = NonNullable<VariantProps<typeof matchVariants>["variant"]>;
10
- type MatchProps = Omit<React.ComponentProps<"button">, "children" | "value"> & Omit<VariantProps<typeof matchVariants>, "size"> & {
10
+ type MatchProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> & Omit<VariantProps<typeof matchVariants>, "size"> & {
11
11
  value: number;
12
12
  size?: ComponentSizeValue;
13
13
  label?: string;
14
14
  showChevron?: boolean;
15
+ /**
16
+ * Forces the read-only presentation on (`true`) or off (`false`). Left
17
+ * unset, a `Match` is read-only unless it is given an `onClick` — a score
18
+ * with nothing behind it should not read as a control.
19
+ */
20
+ readOnly?: boolean;
21
+ disabled?: boolean;
22
+ type?: "button" | "submit" | "reset";
23
+ ref?: React.Ref<HTMLElement>;
15
24
  };
16
- declare function Match({ className, value, variant, size, label, showChevron, type, "aria-label": ariaLabel, ...props }: MatchProps): React.JSX.Element;
25
+ declare function Match({ className, value, variant, size, label, showChevron, readOnly, type, disabled, onClick, ref, "aria-label": ariaLabel, ...props }: MatchProps): React.JSX.Element;
17
26
  //#endregion
18
27
  export { Match, type MatchProps, type MatchVariant, matchVariants };