@giddaa-housing/ui 3.7.0 → 3.9.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/giddaa.css CHANGED
@@ -154,6 +154,12 @@
154
154
  --color-status-danger: var(--color-clay-500);
155
155
  --color-status-info: var(--color-moss-500);
156
156
 
157
+ /* Standalone colors that can be used across utility categories. */
158
+ --color-orphan-green: #1f7a5a;
159
+ --color-orphan-blue: #1d4e89;
160
+ --color-orphan-yellow: #9a5b13;
161
+ --color-orphan-purple: #6b2d6b;
162
+
157
163
  /*
158
164
  * Categorical chart palette — series colours assigned in fixed slot order,
159
165
  * never cycled. Each theme's steps were validated (lightness band, chroma
@@ -337,6 +343,11 @@
337
343
  --color-status-danger: var(--color-clay-500);
338
344
  --color-status-info: var(--color-moss-500);
339
345
 
346
+ --color-orphan-green: #1f7a5a;
347
+ --color-orphan-blue: #1d4e89;
348
+ --color-orphan-yellow: #9a5b13;
349
+ --color-orphan-purple: #6b2d6b;
350
+
340
351
  --color-chart-1: var(--color-forest-dark-600);
341
352
  --color-chart-2: var(--color-brass-400);
342
353
  --color-chart-3: var(--color-clay-400);
@@ -495,6 +506,11 @@
495
506
  --color-status-danger: var(--color-clay-300);
496
507
  --color-status-info: var(--color-moss-200);
497
508
 
509
+ --color-orphan-green: #4cb393;
510
+ --color-orphan-blue: #5a8ed1;
511
+ --color-orphan-yellow: #d4a253;
512
+ --color-orphan-purple: #b075b0;
513
+
498
514
  --color-chart-1: var(--color-forest-dark-400);
499
515
  --color-chart-2: var(--color-brass-400);
500
516
  --color-chart-3: var(--color-clay-400);
package/dist/button.js CHANGED
@@ -19,7 +19,7 @@ const buttonSizeVariants = {
19
19
  "icon-lg": "size-12.5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5",
20
20
  "icon-xl": "size-14 text-gdt-lg [&_svg:not([class*='size-'])]:size-5"
21
21
  };
22
- const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-full bg-clip-padding whitespace-nowrap font-bold transition-[background-color,color,border-color,box-shadow,scale,translate] duration-(--duration-motion-press) ease-gdt-out outline-none select-none focus-visible:border-line-focus focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)] active:not-aria-[haspopup]:translate-y-px motion-reduce:active:not-aria-[haspopup]:translate-y-0 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-invalid:border-line-danger aria-invalid:ring-3 aria-invalid:ring-line-danger/20 aria-invalid:focus-visible:border-line-danger aria-invalid:focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-danger)] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
22
+ const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-full bg-clip-padding whitespace-nowrap font-bold transition-[background-color,color,border-color,box-shadow,scale] duration-(--duration-motion-press) ease-gdt-out outline-none select-none focus-visible:border-line-focus focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)] active:not-aria-[haspopup]:scale-[0.97] motion-reduce:active:not-aria-[haspopup]:scale-100 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-invalid:border-line-danger aria-invalid:ring-3 aria-invalid:ring-line-danger/20 aria-invalid:focus-visible:border-line-danger aria-invalid:focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-danger)] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
23
23
  variants: {
24
24
  variant: {
25
25
  back: "border border-line bg-canvas text-fg-primary hover:border-line-strong hover:bg-surface active:border-line-strong active:bg-surface-raised data-focused:border-line-strong data-focused:bg-surface data-pressed:border-line-strong data-pressed:bg-surface-raised disabled:border-line-subtle disabled:text-fg-caption-placeholder disabled:opacity-100 aria-disabled:border-line-subtle aria-disabled:text-fg-caption-placeholder aria-disabled:opacity-100",
@@ -40,7 +40,7 @@ const buttonVariants = cva("group/button inline-flex shrink-0 items-center justi
40
40
  },
41
41
  compoundVariants: [{
42
42
  variant: ["link-brand", "link-neutral"],
43
- class: "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"
43
+ class: "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]:scale-100"
44
44
  }],
45
45
  defaultVariants: {
46
46
  variant: "primary",
@@ -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]:scale-100 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-D70DFHoM.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-Jfz8hryr.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
@@ -155,6 +206,40 @@ const comboboxChipVariants = cva("flex w-fit items-center justify-center gap-1 r
155
206
  } },
156
207
  defaultVariants: { size: "md" }
157
208
  });
209
+ const responsiveComboboxChipsSizes = {
210
+ base: {
211
+ sm: "min-h-8 px-2.5 py-1 text-gdt-xs has-data-[slot=combobox-chip]:px-1.5",
212
+ md: "min-h-10 px-3 py-1.5 text-gdt-sm has-data-[slot=combobox-chip]:px-2",
213
+ lg: "min-h-12 px-4 py-2 text-gdt-md has-data-[slot=combobox-chip]:px-2.5"
214
+ },
215
+ md: {
216
+ sm: "md:min-h-8 md:px-2.5 md:py-1 md:text-gdt-xs md:has-data-[slot=combobox-chip]:px-1.5",
217
+ md: "md:min-h-10 md:px-3 md:py-1.5 md:text-gdt-sm md:has-data-[slot=combobox-chip]:px-2",
218
+ lg: "md:min-h-12 md:px-4 md:py-2 md:text-gdt-md md:has-data-[slot=combobox-chip]:px-2.5"
219
+ },
220
+ lg: {
221
+ sm: "lg:min-h-8 lg:px-2.5 lg:py-1 lg:text-gdt-xs lg:has-data-[slot=combobox-chip]:px-1.5",
222
+ md: "lg:min-h-10 lg:px-3 lg:py-1.5 lg:text-gdt-sm lg:has-data-[slot=combobox-chip]:px-2",
223
+ lg: "lg:min-h-12 lg:px-4 lg:py-2 lg:text-gdt-md lg:has-data-[slot=combobox-chip]:px-2.5"
224
+ }
225
+ };
226
+ const responsiveComboboxChipSizes = {
227
+ base: {
228
+ sm: "h-5 px-1.5 text-gdt-xs",
229
+ md: "h-[calc(--spacing(5.25))] px-1.5 text-gdt-xs",
230
+ lg: "h-6 px-2 text-gdt-sm"
231
+ },
232
+ md: {
233
+ sm: "md:h-5 md:px-1.5 md:text-gdt-xs",
234
+ md: "md:h-[calc(--spacing(5.25))] md:px-1.5 md:text-gdt-xs",
235
+ lg: "md:h-6 md:px-2 md:text-gdt-sm"
236
+ },
237
+ lg: {
238
+ sm: "lg:h-5 lg:px-1.5 lg:text-gdt-xs",
239
+ md: "lg:h-[calc(--spacing(5.25))] lg:px-1.5 lg:text-gdt-xs",
240
+ lg: "lg:h-6 lg:px-2 lg:text-gdt-sm"
241
+ }
242
+ };
158
243
  function ComboboxValue({ ...props }) {
159
244
  return /* @__PURE__ */ jsx(Combobox.Value, {
160
245
  "data-slot": "combobox-value",
@@ -162,14 +247,14 @@ function ComboboxValue({ ...props }) {
162
247
  });
163
248
  }
164
249
  function ComboboxTrigger({ className, children, ...props }) {
165
- const resolvedSize = useComponentSize();
250
+ const resolvedSize = responsiveValueClasses(useComponentSizeValue(), responsiveComboboxTriggerSizes);
166
251
  const { ref, grown } = useGrown();
167
252
  return /* @__PURE__ */ jsxs(Combobox.Trigger, {
168
253
  ref,
169
254
  "data-slot": "combobox-trigger",
170
- "data-size": resolvedSize,
255
+ "data-size": resolvedSize.base,
171
256
  "data-grown": grown ? "true" : void 0,
172
- className: cn(comboboxTriggerVariants({ size: resolvedSize }), className),
257
+ className: cn(comboboxTriggerVariants({ size: null }), resolvedSize.className, className),
173
258
  ...props,
174
259
  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" }) })]
175
260
  });
@@ -187,7 +272,9 @@ function ComboboxClear({ className, ...props }) {
187
272
  });
188
273
  }
189
274
  function ComboboxInput({ className, children, disabled = false, showTrigger = true, showClear = false, ...props }) {
190
- const resolvedSize = useComponentSize();
275
+ const sizeValue = useComponentSizeValue();
276
+ const resolvedSize = responsiveValueClasses(sizeValue, responsiveComboboxInputSizes);
277
+ const popupSize = responsiveValueClasses(sizeValue, responsiveComboboxPopupInputSizes);
191
278
  const insidePopup = React.useContext(ComboboxPopupContext);
192
279
  const { ref, grown } = useGrown();
193
280
  const contents = /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -209,13 +296,13 @@ function ComboboxInput({ className, children, disabled = false, showTrigger = tr
209
296
  children
210
297
  ] });
211
298
  if (insidePopup) return /* @__PURE__ */ jsx(InputGroup, {
212
- className: cn(comboboxPopupInputVariants({ size: resolvedSize }), className),
299
+ className: cn(comboboxPopupInputVariants({ size: null }), popupSize.className, className),
213
300
  children: contents
214
301
  });
215
302
  return /* @__PURE__ */ jsx(Combobox.InputGroup, {
216
303
  ref,
217
304
  "data-grown": grown ? "true" : void 0,
218
- render: /* @__PURE__ */ jsx(InputGroup, { className: cn(comboboxInputVariants({ size: resolvedSize }), className) }),
305
+ render: /* @__PURE__ */ jsx(InputGroup, { className: cn(comboboxInputVariants({ size: null }), resolvedSize.className, className) }),
219
306
  children: contents
220
307
  });
221
308
  }
@@ -326,7 +413,7 @@ function ComboboxSeparator({ className, ...props }) {
326
413
  });
327
414
  }
328
415
  function ComboboxChips({ className, ref: refProp, ...props }) {
329
- const resolvedSize = useComponentSize();
416
+ const resolvedSize = responsiveValueClasses(useComponentSizeValue(), responsiveComboboxChipsSizes);
330
417
  const { ref, grown } = useGrown();
331
418
  return /* @__PURE__ */ jsx(Combobox.Chips, {
332
419
  ref: (element) => {
@@ -336,15 +423,15 @@ function ComboboxChips({ className, ref: refProp, ...props }) {
336
423
  },
337
424
  "data-slot": "combobox-chips",
338
425
  "data-grown": grown ? "true" : void 0,
339
- className: cn(comboboxChipsVariants({ size: resolvedSize }), className),
426
+ className: cn(comboboxChipsVariants({ size: null }), resolvedSize.className, className),
340
427
  ...props
341
428
  });
342
429
  }
343
430
  function ComboboxChip({ className, children, showRemove = true, ...props }) {
344
- const resolvedSize = useComponentSize();
431
+ const resolvedSize = responsiveValueClasses(useComponentSizeValue(), responsiveComboboxChipSizes);
345
432
  return /* @__PURE__ */ jsxs(Combobox.Chip, {
346
433
  "data-slot": "combobox-chip",
347
- className: cn(comboboxChipVariants({ size: resolvedSize }), className),
434
+ className: cn(comboboxChipVariants({ size: null }), resolvedSize.className, className),
348
435
  ...props,
349
436
  children: [children, showRemove && /* @__PURE__ */ jsx(Combobox.ChipRemove, {
350
437
  className: "-ml-1 opacity-50 hover:opacity-100",
@@ -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-D70DFHoM.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-Jfz8hryr.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/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/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 };
@@ -14,7 +14,7 @@ import { Dialog } from "@base-ui/react/dialog";
14
14
  * helpers. Both surfaces share this so the inline carousel and the fullscreen
15
15
  * viewer can stand alone — or stay in sync by sharing `index`/`onIndexChange`.
16
16
  */
17
- function useGalleryCarousel(index, onIndexChange) {
17
+ function useGalleryCarousel(index, onIndexChange, enabled = true) {
18
18
  const [api, setApi] = React.useState();
19
19
  const [selectedIndex, setSelectedIndex] = React.useState(index ?? 0);
20
20
  const initialIndexRef = React.useRef(index ?? 0);
@@ -23,7 +23,7 @@ function useGalleryCarousel(index, onIndexChange) {
23
23
  onIndexChangeRef.current = onIndexChange;
24
24
  });
25
25
  React.useEffect(() => {
26
- if (!api) return;
26
+ if (!api || !enabled) return;
27
27
  const onSelect = () => {
28
28
  const next = api.selectedScrollSnap();
29
29
  setSelectedIndex(next);
@@ -34,10 +34,21 @@ function useGalleryCarousel(index, onIndexChange) {
34
34
  return () => {
35
35
  api.off("select", onSelect).off("reInit", onSelect);
36
36
  };
37
- }, [api]);
37
+ }, [api, enabled]);
38
38
  React.useEffect(() => {
39
- if (api && index !== void 0 && index !== api.selectedScrollSnap()) api.scrollTo(index, false);
40
- }, [api, index]);
39
+ if (!enabled) {
40
+ setApi(void 0);
41
+ return;
42
+ }
43
+ setSelectedIndex(index ?? initialIndexRef.current);
44
+ }, [enabled, index]);
45
+ React.useEffect(() => {
46
+ if (enabled && api && index !== void 0 && index !== api.selectedScrollSnap()) api.scrollTo(index, false);
47
+ }, [
48
+ api,
49
+ enabled,
50
+ index
51
+ ]);
41
52
  const scrollTo = React.useCallback((i) => api?.scrollTo(i, false), [api]);
42
53
  const scrollPrev = React.useCallback(() => api?.scrollPrev(false), [api]);
43
54
  const scrollNext = React.useCallback(() => api?.scrollNext(false), [api]);
@@ -238,7 +249,7 @@ function PhotoGallery({ images, index, onIndexChange, onImageClick, className, .
238
249
  * `onOpenChange` and usable without the inline gallery.
239
250
  */
240
251
  function PhotoGalleryFullscreen({ images, open, onOpenChange, index, onIndexChange }) {
241
- const { setApi, selectedIndex, initialIndex, scrollTo, scrollPrev, scrollNext } = useGalleryCarousel(index, onIndexChange);
252
+ const { setApi, selectedIndex, initialIndex, scrollTo, scrollPrev, scrollNext } = useGalleryCarousel(index, onIndexChange, open);
242
253
  const hasMany = images.length > 1;
243
254
  const handleKeyDown = (event) => {
244
255
  if (event.defaultPrevented) return;
@@ -278,12 +289,12 @@ function PhotoGalleryFullscreen({ images, open, onOpenChange, index, onIndexChan
278
289
  children: /* @__PURE__ */ jsx(X, { className: "size-4 sm:size-5" })
279
290
  })]
280
291
  }),
281
- /* @__PURE__ */ jsxs(Carousel, {
292
+ open && /* @__PURE__ */ jsxs(Carousel, {
282
293
  imageSize: "full",
283
294
  setApi,
284
295
  opts: {
285
296
  loop: true,
286
- startIndex: initialIndex,
297
+ startIndex: index ?? initialIndex,
287
298
  watchDrag: hasMany
288
299
  },
289
300
  className: "min-h-0 flex-1 w-full rounded-xl bg-transparent",
@@ -1,5 +1,5 @@
1
1
  import "./input-size-context-BMhves-J.js";
2
- import { r as PopoverContent } from "./popover-CNymD33m.js";
2
+ import { r as PopoverContent } from "./popover-BMTZp3AQ.js";
3
3
  import "./icons-C9JXR5Xv.js";
4
4
  import * as React from "react";
5
5
  //#region src/lib/picker.d.ts
@@ -4,11 +4,11 @@ import { Popover } from "@base-ui/react/popover";
4
4
  //#region src/popover.d.ts
5
5
  declare function Popover$1({ ...props }: Popover.Root.Props): React.JSX.Element;
6
6
  declare function PopoverTrigger({ ...props }: Popover.Trigger.Props): React.JSX.Element;
7
- type PopoverContentProps = Popover.Popup.Props & Pick<Popover.Positioner.Props, "align" | "alignOffset" | "collisionAvoidance" | "side" | "sideOffset"> & {
7
+ type PopoverContentProps = Popover.Popup.Props & Pick<Popover.Positioner.Props, "align" | "alignOffset" | "collisionAvoidance" | "positionMethod" | "side" | "sideOffset"> & {
8
8
  showArrow?: boolean;
9
9
  size?: ComponentSize;
10
10
  };
11
- declare function PopoverContent({ className, align, alignOffset, collisionAvoidance, side, sideOffset, showArrow, size, children, ...props }: PopoverContentProps): React.JSX.Element;
11
+ declare function PopoverContent({ className, align, alignOffset, collisionAvoidance, positionMethod, side, sideOffset, showArrow, size, children, ...props }: PopoverContentProps): React.JSX.Element;
12
12
  declare function PopoverHeader({ className, border, ...props }: React.ComponentProps<"div"> & {
13
13
  border?: boolean;
14
14
  }): React.JSX.Element;
package/dist/popover.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as PopoverFooter, c as PopoverTrigger, i as PopoverDescription, n as PopoverBody, o as PopoverHeader, r as PopoverContent, s as PopoverTitle, t as Popover } from "./popover-CNymD33m.js";
1
+ import { a as PopoverFooter, c as PopoverTrigger, i as PopoverDescription, n as PopoverBody, o as PopoverHeader, r as PopoverContent, s as PopoverTitle, t as Popover } from "./popover-BMTZp3AQ.js";
2
2
  export { Popover, PopoverBody, PopoverContent, PopoverDescription, PopoverFooter, PopoverHeader, PopoverTitle, PopoverTrigger };
package/dist/popover.js CHANGED
@@ -16,11 +16,12 @@ function PopoverTrigger({ ...props }) {
16
16
  ...props
17
17
  });
18
18
  }
19
- function PopoverContent({ className, align = "center", alignOffset = 0, collisionAvoidance, side = "bottom", sideOffset = 6, showArrow = true, size = "md", children, ...props }) {
19
+ function PopoverContent({ className, align = "center", alignOffset = 0, collisionAvoidance, positionMethod = "fixed", side = "bottom", sideOffset = 6, showArrow = true, size = "md", children, ...props }) {
20
20
  return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
21
21
  align,
22
22
  alignOffset,
23
23
  collisionAvoidance,
24
+ positionMethod,
24
25
  side,
25
26
  sideOffset,
26
27
  className: "isolate z-50",
package/dist/sheet.js CHANGED
@@ -45,7 +45,7 @@ const sheetContentVariants = cva("group/sheet-content pointer-events-none fixed
45
45
  sm: "sm:[--sheet-padding-top:1.5rem] sm:[--sheet-padding-x:1.5rem] w-90 max-w-[calc(100vw-2.5rem)] [--sheet-title:var(--text-gdt-h5)]",
46
46
  md: "sm:[--sheet-padding-top:1.5rem] sm:[--sheet-padding-x:2rem] xl:[--sheet-padding-x:2.5rem] w-120 max-w-[calc(100vw-2.5rem)] [--sheet-title:var(--text-gdt-h4)]",
47
47
  lg: "sm:[--sheet-padding-top:1.5rem] sm:[--sheet-padding-x:2rem] xl:[--sheet-padding-x:2.5rem] w-160 max-w-[calc(100vw-2.5rem)] [--sheet-title:var(--text-gdt-h3)]",
48
- fullscreen: "sm:[--sheet-padding-top:2rem] sm:[--sheet-padding-x:2.5rem] xl:[--sheet-padding-x:5rem] [--sheet-title:var(--text-gdt-h2)] h-[calc(100lvh-3.5rem)] rounded:xl sm:rounded-2xl"
48
+ fullscreen: "sm:[--sheet-padding-top:2rem] sm:[--sheet-padding-x:2.5rem] xl:[--sheet-padding-x:5rem] [--sheet-title:var(--text-gdt-h2)] h-[calc(100dvh-3.5rem)] rounded:xl sm:rounded-2xl"
49
49
  } },
50
50
  defaultVariants: { size: "md" }
51
51
  });
@@ -1,4 +1,5 @@
1
+ import { useRender } from "@base-ui/react/use-render";
1
2
  //#region src/skeleton.d.ts
2
- declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
3
+ declare function Skeleton({ className, render, ...props }: useRender.ComponentProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
3
4
  //#endregion
4
5
  export { Skeleton };
package/dist/skeleton.js CHANGED
@@ -1,11 +1,17 @@
1
+ "use client";
1
2
  import { cn } from "./utils/cn.js";
2
- import { jsx } from "react/jsx-runtime";
3
+ import { mergeProps } from "@base-ui/react/merge-props";
4
+ import { useRender } from "@base-ui/react/use-render";
3
5
  //#region src/skeleton.tsx
4
- function Skeleton({ className, ...props }) {
5
- return /* @__PURE__ */ jsx("div", {
6
- "data-slot": "skeleton",
7
- className: cn("animate-pulse rounded-md bg-line motion-reduce:animate-none", className),
8
- ...props
6
+ function Skeleton({ className, render, ...props }) {
7
+ return useRender({
8
+ defaultTagName: "div",
9
+ props: mergeProps({
10
+ className: cn("animate-pulse rounded-md bg-line motion-reduce:animate-none", className),
11
+ "data-slot": "skeleton"
12
+ }, props),
13
+ render,
14
+ state: { slot: "skeleton" }
9
15
  });
10
16
  }
11
17
  //#endregion