@giddaa-housing/ui 3.4.0 → 3.5.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.
Files changed (131) hide show
  1. package/css/generated/shared.css +1 -1
  2. package/dist/accordion.js +1 -1
  3. package/dist/activity-timeline.js +1 -1
  4. package/dist/alert.js +1 -1
  5. package/dist/auth-layout.js +1 -1
  6. package/dist/avatar.js +1 -1
  7. package/dist/badge.js +1 -1
  8. package/dist/bar-chart.js +1 -1
  9. package/dist/breadcrumb.js +1 -1
  10. package/dist/bullet-chart.js +1 -1
  11. package/dist/button-group.js +1 -1
  12. package/dist/button.js +1 -1
  13. package/dist/calendar.js +2 -2
  14. package/dist/call-card.js +1 -1
  15. package/dist/card.js +1 -1
  16. package/dist/carousel.js +2 -2
  17. package/dist/chart.js +1 -1
  18. package/dist/chat.js +1 -1
  19. package/dist/checkbox.js +1 -1
  20. package/dist/collapsible.js +1 -1
  21. package/dist/combobox-B7cKFJ9V.js +398 -0
  22. package/dist/combobox.d.ts +2 -2
  23. package/dist/combobox.js +1 -308
  24. package/dist/cta.js +1 -1
  25. package/dist/currency-selector.js +2 -2
  26. package/dist/data-table.d.ts +1 -1
  27. package/dist/data-table.js +1 -1
  28. package/dist/date-picker.d.ts +4 -3
  29. package/dist/date-picker.js +7 -17
  30. package/dist/details-card.js +1 -1
  31. package/dist/dialog.js +1 -1
  32. package/dist/dropdown-menu.js +1 -1
  33. package/dist/dropzone.js +1 -1
  34. package/dist/editorial-card.js +2 -4
  35. package/dist/empty-state.js +1 -1
  36. package/dist/field.js +1 -1
  37. package/dist/file-upload.js +1 -1
  38. package/dist/filter.js +1 -1
  39. package/dist/footer.js +1 -1
  40. package/dist/funnel-chart.js +1 -1
  41. package/dist/gallery-indicator.js +1 -1
  42. package/dist/icons-C9JXR5Xv.d.ts +111 -0
  43. package/dist/icons.d.ts +2 -93
  44. package/dist/icons.js +37 -1
  45. package/dist/image.d.ts +59 -0
  46. package/dist/image.js +53 -0
  47. package/dist/infinite-scroll.js +3 -29
  48. package/dist/infotip.js +1 -1
  49. package/dist/input-group.js +1 -1
  50. package/dist/input-otp.js +1 -1
  51. package/dist/input.js +1 -1
  52. package/dist/item.js +1 -1
  53. package/dist/kpi-card.js +1 -1
  54. package/dist/label.js +1 -1
  55. package/dist/line-chart.js +1 -1
  56. package/dist/list-item.js +1 -1
  57. package/dist/map-indicator.js +1 -1
  58. package/dist/match.js +1 -1
  59. package/dist/media-gallery-hero.js +6 -3
  60. package/dist/media-player.js +5 -13
  61. package/dist/message.js +2 -12
  62. package/dist/mobile-sidebar.js +1 -1
  63. package/dist/multi-step-form.js +2 -2
  64. package/dist/number-input.js +1 -1
  65. package/dist/page-header.js +1 -1
  66. package/dist/pagination.js +1 -1
  67. package/dist/password-input.js +1 -1
  68. package/dist/phone-input.js +11 -17
  69. package/dist/photo-gallery.js +6 -3
  70. package/dist/picker-CsnHtbe4.d.ts +14 -0
  71. package/dist/{picker-xSTzeYhc.js → picker-DmIiQKLJ.js} +2 -7
  72. package/dist/pie-chart.js +1 -1
  73. package/dist/popover-DSlPeH7x.d.ts +20 -0
  74. package/dist/popover.d.ts +1 -19
  75. package/dist/popover.js +1 -1
  76. package/dist/price-tag.d.ts +1 -1
  77. package/dist/price-tag.js +50 -22
  78. package/dist/progress.js +1 -1
  79. package/dist/property-listing-card.d.ts +63 -1
  80. package/dist/property-listing-card.js +97 -28
  81. package/dist/purchase-option-card.js +1 -1
  82. package/dist/radar-chart.js +1 -1
  83. package/dist/radio-group.js +1 -1
  84. package/dist/review-block.js +1 -1
  85. package/dist/rich-text-editor.js +1 -1
  86. package/dist/scatter-chart.js +1 -1
  87. package/dist/scroll-spy.js +3 -3
  88. package/dist/search-input.js +1 -1
  89. package/dist/select.js +1 -1
  90. package/dist/separator.js +1 -1
  91. package/dist/sheet.js +1 -1
  92. package/dist/sidebar.js +3 -16
  93. package/dist/skeleton.js +1 -1
  94. package/dist/slider.js +1 -1
  95. package/dist/sonar.js +1 -1
  96. package/dist/sparkline.js +1 -1
  97. package/dist/stepper.js +1 -1
  98. package/dist/styles.css +42 -2
  99. package/dist/switch.js +1 -1
  100. package/dist/table-card.js +1 -1
  101. package/dist/table.js +1 -1
  102. package/dist/tabs.js +1 -1
  103. package/dist/tag.js +1 -1
  104. package/dist/testimonial-block.js +1 -1
  105. package/dist/textarea.js +1 -1
  106. package/dist/theme-switcher.js +1 -1
  107. package/dist/time-picker.d.ts +3 -2
  108. package/dist/time-picker.js +5 -7
  109. package/dist/toast.js +1 -1
  110. package/dist/tooltip.js +1 -1
  111. package/dist/top-navbar.js +1 -1
  112. package/dist/tree-map.js +1 -1
  113. package/dist/utils/cn.d.ts +5 -0
  114. package/dist/utils/cn.js +33 -0
  115. package/dist/utils/format.d.ts +45 -0
  116. package/dist/utils/format.js +70 -0
  117. package/dist/utils/phone.d.ts +98 -0
  118. package/dist/utils/phone.js +93 -0
  119. package/dist/utils/use-intersection.d.ts +9 -0
  120. package/dist/utils/use-intersection.js +29 -0
  121. package/dist/utils/use-is-mobile.d.ts +5 -0
  122. package/dist/utils/use-is-mobile.js +16 -0
  123. package/dist/utils/use-reduced-motion.d.ts +5 -0
  124. package/dist/{use-reduced-motion-BDvOK14x.js → utils/use-reduced-motion.js} +2 -2
  125. package/dist/utils/use-uncontrolled.d.ts +11 -0
  126. package/dist/{use-uncontrolled-CLfM1XbB.js → utils/use-uncontrolled.js} +2 -2
  127. package/dist/video-player-dialog.d.ts +12 -2
  128. package/dist/video-player-dialog.js +47 -7
  129. package/dist/waterfall-chart.js +1 -1
  130. package/package.json +9 -1
  131. package/dist/cn-BI_4DMBf.js +0 -23
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { Check } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
4
- import { t as useUncontrolled } from "./use-uncontrolled-CLfM1XbB.js";
3
+ import { cn } from "./utils/cn.js";
5
4
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select.js";
5
+ import { useUncontrolled } from "./utils/use-uncontrolled.js";
6
6
  import { Progress, ProgressIndicator, ProgressTrack } from "./progress.js";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import * as React from "react";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { Minus, Plus } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { cn } from "./utils/cn.js";
4
4
  import { SizeProvider, useComponentSize } from "./size-context.js";
5
5
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.js";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { t as cn } from "./cn-BI_4DMBf.js";
1
+ import { cn } from "./utils/cn.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/page-header.tsx
4
4
  function DashboardHeader({ hideBorder = false, className, ...props }) {
@@ -1,5 +1,5 @@
1
1
  import { ChevronLeft, ChevronRight, MoreHorizontal } from "./icons.js";
2
- import { t as cn } from "./cn-BI_4DMBf.js";
2
+ import { cn } from "./utils/cn.js";
3
3
  import { Button, ButtonLink } from "./button.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { cva } from "class-variance-authority";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { Eye, EyeOff } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { cn } from "./utils/cn.js";
4
4
  import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import * as React from "react";
@@ -1,21 +1,17 @@
1
1
  "use client";
2
2
  import { Check, ChevronDown, Search } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { cn } from "./utils/cn.js";
4
4
  import { useComponentSize } from "./size-context.js";
5
5
  import { Separator } from "./separator.js";
6
6
  import { InputGroup, InputGroupAddon, InputGroupInput } from "./input-group.js";
7
7
  import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
8
+ import { getPhoneCountries } from "./utils/phone.js";
8
9
  import { jsx, jsxs } from "react/jsx-runtime";
9
10
  import * as React from "react";
10
- import { AsYouType, getCountries, getCountryCallingCode, parsePhoneNumber } from "libphonenumber-js";
11
+ import { AsYouType, getCountryCallingCode, parsePhoneNumberFromString } from "libphonenumber-js";
11
12
  import flags from "react-phone-number-input/flags";
12
13
  //#region src/phone-input.tsx
13
- const regionNames = typeof Intl !== "undefined" && "DisplayNames" in Intl ? new Intl.DisplayNames(["en"], { type: "region" }) : void 0;
14
- const COUNTRIES = getCountries().map((code) => ({
15
- code,
16
- name: regionNames?.of(code) ?? code,
17
- calling: getCountryCallingCode(code)
18
- })).sort((a, b) => a.name.localeCompare(b.name));
14
+ const COUNTRIES = getPhoneCountries();
19
15
  function getNationalDigits(value) {
20
16
  return value.replace(/\D/g, "");
21
17
  }
@@ -29,13 +25,11 @@ function toE164(digits, country) {
29
25
  }
30
26
  function parseValue(value) {
31
27
  if (!value) return { digits: "" };
32
- try {
33
- const parsed = parsePhoneNumber(value);
34
- if (parsed?.nationalNumber) return {
35
- country: parsed.country,
36
- digits: parsed.nationalNumber
37
- };
38
- } catch {}
28
+ const parsed = parsePhoneNumberFromString(value);
29
+ if (parsed?.nationalNumber) return {
30
+ country: parsed.country,
31
+ digits: parsed.nationalNumber
32
+ };
39
33
  return { digits: "" };
40
34
  }
41
35
  const flagSizeVariants = {
@@ -107,7 +101,7 @@ function CountryList({ items, country, onSelect }) {
107
101
  }),
108
102
  /* @__PURE__ */ jsxs("span", {
109
103
  className: "shrink-0 text-fg-secondary",
110
- children: ["+", entry.calling]
104
+ children: ["+", entry.callingCode]
111
105
  }),
112
106
  selected && /* @__PURE__ */ jsx(Check, { className: "size-4 shrink-0 text-fg-brand" })
113
107
  ]
@@ -124,7 +118,7 @@ function CountrySelect({ country, size, disabled, onSelect, finalFocusRef }) {
124
118
  const q = query.trim().toLowerCase();
125
119
  if (!q) return COUNTRIES;
126
120
  const normalized = q.replace(/^\+/, "");
127
- return COUNTRIES.filter((entry) => entry.name.toLowerCase().includes(q) || entry.calling.includes(normalized) || entry.code.toLowerCase().includes(q));
121
+ return COUNTRIES.filter((entry) => entry.name.toLowerCase().includes(q) || entry.callingCode.includes(normalized) || entry.code.toLowerCase().includes(q));
128
122
  }, [query]);
129
123
  function handleOpenChange(next) {
130
124
  setOpen(next);
@@ -1,8 +1,9 @@
1
1
  "use client";
2
2
  import { ChevronLeft, ChevronRight, Fullscreen, X } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { cn } from "./utils/cn.js";
4
4
  import { Button } from "./button.js";
5
5
  import { Carousel, CarouselContent, CarouselItem } from "./carousel.js";
6
+ import { Image } from "./image.js";
6
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
8
  import * as React from "react";
8
9
  import { Dialog } from "@base-ui/react/dialog";
@@ -60,7 +61,8 @@ function GalleryFrame({ image, fit = "cover", className }) {
60
61
  return /* @__PURE__ */ jsx("div", {
61
62
  "data-slot": "photo-gallery-frame",
62
63
  className: cn("relative flex size-full items-center justify-center overflow-hidden", className),
63
- children: image?.src ? /* @__PURE__ */ jsx("img", {
64
+ children: image?.src ? /* @__PURE__ */ jsx(Image, {
65
+ slot: "photo-gallery-image",
64
66
  src: image.src,
65
67
  alt: image.alt ?? "Property image",
66
68
  className: cn(fit === "contain" ? "max-h-full max-w-full rounded-lg object-contain" : "size-full object-cover"),
@@ -168,7 +170,8 @@ function GalleryThumbnails({ images, selectedIndex, onSelect, colsClassName, cla
168
170
  onClick: () => onSelect(index),
169
171
  style: { width: "calc((100% - (var(--gallery-cols) - 1) * var(--gallery-gap)) / var(--gallery-cols))" },
170
172
  className: cn("relative aspect-4/3 shrink-0 overflow-hidden rounded-lg border-2 bg-surface-raised transition-[border-color,opacity] outline-none focus-visible:border-line-focus focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)]", isActive ? "border-line-focus" : "border-transparent opacity-80 hover:opacity-100"),
171
- children: image.src ? /* @__PURE__ */ jsx("img", {
173
+ children: image.src ? /* @__PURE__ */ jsx(Image, {
174
+ slot: "photo-gallery-thumbnail-image",
172
175
  src: image.src,
173
176
  alt: image.alt ?? `Property image ${index + 1}`,
174
177
  className: "size-full object-cover",
@@ -0,0 +1,14 @@
1
+ import "./input-size-context-C-SFx9sx.js";
2
+ import { r as PopoverContent } from "./popover-DSlPeH7x.js";
3
+ import "./icons-C9JXR5Xv.js";
4
+ import * as React from "react";
5
+ //#region src/lib/picker.d.ts
6
+ /**
7
+ * Where a picker's panel goes. Every one of these is a preference the
8
+ * positioner is free to overrule when the panel would otherwise overflow —
9
+ * which is the point, a calendar being tall enough that the room below a
10
+ * trigger often isn't the room it needs.
11
+ */
12
+ type PickerPlacementProps = Pick<React.ComponentProps<typeof PopoverContent>, "side" | "sideOffset" | "align" | "alignOffset" | "collisionAvoidance">;
13
+ //#endregion
14
+ export { PickerPlacementProps as t };
@@ -1,15 +1,10 @@
1
- import { t as cn } from "./cn-BI_4DMBf.js";
1
+ import { cn } from "./utils/cn.js";
2
2
  import { Button } from "./button.js";
3
3
  import { useInputComponentSize } from "./input-size-context.js";
4
4
  import { PopoverTrigger } from "./popover.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { cva } from "class-variance-authority";
7
7
  //#region src/lib/picker.tsx
8
- const PICKER_COLLISION_AVOIDANCE = {
9
- side: "flip",
10
- align: "shift",
11
- fallbackAxisSide: "none"
12
- };
13
8
  const pickerTriggerVariants = cva("flex w-full items-center justify-between rounded-full border transition-[border-color,box-shadow] outline-none", {
14
9
  variants: { size: {
15
10
  sm: "h-8 px-3 text-gdt-xs [&_svg]:size-3.5",
@@ -47,4 +42,4 @@ function PickerFooter({ secondaryLabel, onSecondary, onApply }) {
47
42
  });
48
43
  }
49
44
  //#endregion
50
- export { PickerFooter as n, PickerTrigger as r, PICKER_COLLISION_AVOIDANCE as t };
45
+ export { PickerTrigger as n, PickerFooter as t };
package/dist/pie-chart.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as cn } from "./cn-BI_4DMBf.js";
2
+ import { cn } from "./utils/cn.js";
3
3
  import { SizeProvider, useComponentSize } from "./size-context.js";
4
4
  import { ChartContainer } from "./chart.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -0,0 +1,20 @@
1
+ import { t as ComponentSize } from "./size-context-BX6kAdVj.js";
2
+ import * as React from "react";
3
+ import { Popover } from "@base-ui/react/popover";
4
+ //#region src/popover.d.ts
5
+ declare function Popover$1({ ...props }: Popover.Root.Props): React.JSX.Element;
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"> & {
8
+ showArrow?: boolean;
9
+ size?: ComponentSize;
10
+ };
11
+ declare function PopoverContent({ className, align, alignOffset, collisionAvoidance, side, sideOffset, showArrow, size, children, ...props }: PopoverContentProps): React.JSX.Element;
12
+ declare function PopoverHeader({ className, border, ...props }: React.ComponentProps<"div"> & {
13
+ border?: boolean;
14
+ }): React.JSX.Element;
15
+ declare function PopoverBody({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
16
+ declare function PopoverFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
17
+ declare function PopoverTitle({ className, ...props }: Popover.Title.Props): React.JSX.Element;
18
+ declare function PopoverDescription({ className, ...props }: Popover.Description.Props): React.JSX.Element;
19
+ //#endregion
20
+ export { PopoverFooter as a, PopoverTrigger as c, PopoverDescription as i, PopoverBody as n, PopoverHeader as o, PopoverContent as r, PopoverTitle as s, Popover$1 as t };
package/dist/popover.d.ts CHANGED
@@ -1,20 +1,2 @@
1
- import { t as ComponentSize } from "./size-context-BX6kAdVj.js";
2
- import * as React from "react";
3
- import { Popover as Popover$1 } from "@base-ui/react/popover";
4
- //#region src/popover.d.ts
5
- declare function Popover({ ...props }: Popover$1.Root.Props): React.JSX.Element;
6
- declare function PopoverTrigger({ ...props }: Popover$1.Trigger.Props): React.JSX.Element;
7
- type PopoverContentProps = Popover$1.Popup.Props & Pick<Popover$1.Positioner.Props, "align" | "alignOffset" | "collisionAvoidance" | "side" | "sideOffset"> & {
8
- showArrow?: boolean;
9
- size?: ComponentSize;
10
- };
11
- declare function PopoverContent({ className, align, alignOffset, collisionAvoidance, side, sideOffset, showArrow, size, children, ...props }: PopoverContentProps): React.JSX.Element;
12
- declare function PopoverHeader({ className, border, ...props }: React.ComponentProps<"div"> & {
13
- border?: boolean;
14
- }): React.JSX.Element;
15
- declare function PopoverBody({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
16
- declare function PopoverFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
17
- declare function PopoverTitle({ className, ...props }: Popover$1.Title.Props): React.JSX.Element;
18
- declare function PopoverDescription({ className, ...props }: Popover$1.Description.Props): React.JSX.Element;
19
- //#endregion
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-DSlPeH7x.js";
20
2
  export { Popover, PopoverBody, PopoverContent, PopoverDescription, PopoverFooter, PopoverHeader, PopoverTitle, PopoverTrigger };
package/dist/popover.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as cn } from "./cn-BI_4DMBf.js";
2
+ import { cn } from "./utils/cn.js";
3
3
  import { SizeProvider } from "./size-context.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { Popover as Popover$1 } from "@base-ui/react/popover";
@@ -85,7 +85,7 @@ type PriceTagProps<TOption extends PriceTagCurrencyOption = PriceTagCurrencyOpti
85
85
  monthlyPaymentLabel?: string;
86
86
  };
87
87
  /**
88
- * Pill-shaped price display, optionally a trigger for a currency dropdown.
88
+ * Rounded-box price display, optionally a trigger for a currency dropdown.
89
89
  *
90
90
  * Display only: it prints `value` and `description` as given and never
91
91
  * composes a sentence, picks a format, or decides that a line is too small to
package/dist/price-tag.js CHANGED
@@ -1,18 +1,18 @@
1
1
  "use client";
2
2
  import { Check, ChevronDown } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { cn } from "./utils/cn.js";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { cva } from "class-variance-authority";
6
6
  import { Popover } from "@base-ui/react/popover";
7
7
  //#region src/price-tag.tsx
8
- const priceTagVariants = cva("group/price-tag inline-flex w-fit shrink-0 items-center justify-center rounded-4xl bg-surface-brand font-bold leading-none whitespace-nowrap text-fg-on-brand shadow-none transition-[background-color,box-shadow] outline-none data-[interactive=true]:cursor-pointer data-[interactive=true]:hover:bg-action-primary-hover data-[interactive=true]:focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)] data-[interactive=true]:active:bg-action-primary-pressed", {
8
+ const priceTagVariants = cva("group/price-tag inline-flex w-fit shrink-0 items-center justify-center bg-surface-brand font-bold whitespace-nowrap text-fg-on-brand shadow-none transition-[background-color,box-shadow] outline-none data-[interactive=true]:cursor-pointer data-[interactive=true]:hover:bg-action-primary-hover data-[interactive=true]:focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)] data-[interactive=true]:active:bg-action-primary-pressed", {
9
9
  variants: {
10
10
  size: {
11
- xxs: "min-h-7 gap-1 px-2.5 py-0.75 text-gdt-subtext [&>svg]:size-3",
12
- xs: "min-h-7.5 gap-1 px-3 py-1 text-gdt-xs [&>svg]:size-3.5",
13
- sm: "min-h-9 gap-1.5 px-4 py-1.5 text-gdt-sm [&>svg]:size-3.5",
14
- md: "min-h-10.5 gap-1.5 px-5 py-2 text-gdt-md [&>svg]:size-4",
15
- lg: "min-h-13 gap-2 px-7 py-3 text-gdt-lg [&>svg]:size-4.5"
11
+ xxs: "min-h-7 gap-1 rounded-lg px-2.5 py-0.75 text-gdt-subtext leading-none [&_svg]:size-3",
12
+ xs: "min-h-7.5 gap-1 rounded-lg px-3 py-1 text-gdt-xs leading-none [&_svg]:size-3.5",
13
+ sm: "min-h-9 gap-1.5 rounded-xl px-4 py-1.5 text-gdt-sm leading-none [&_svg]:size-3.5",
14
+ md: "min-h-10.5 gap-1.5 rounded-xl px-5 py-2 text-gdt-md leading-none [&_svg]:size-4",
15
+ lg: "min-h-13 gap-2 rounded-2xl px-7 py-3 text-gdt-lg leading-none [&_svg]:size-4.5"
16
16
  },
17
17
  /** Two lines sit top-aligned against the chevron rather than centred. */
18
18
  hasDescription: {
@@ -30,13 +30,35 @@ const priceTagVariants = cva("group/price-tag inline-flex w-fit shrink-0 items-c
30
30
  hasDescription: false
31
31
  }
32
32
  });
33
- /** The description is quieter than the price, and quietest at the largest size. */
33
+ /** The space between the price and its description, 4px through 12px. */
34
+ const lineGapClassName = {
35
+ xxs: "gap-1",
36
+ xs: "gap-1",
37
+ sm: "gap-1.5",
38
+ md: "gap-2",
39
+ lg: "gap-3"
40
+ };
41
+ /**
42
+ * The least space the chevron will sit at from the price. It is usually pushed
43
+ * further out than this, to the trailing edge of the wider description.
44
+ */
45
+ const chevronGapClassName = {
46
+ xxs: "gap-2",
47
+ xs: "gap-2",
48
+ sm: "gap-3",
49
+ md: "gap-3",
50
+ lg: "gap-4"
51
+ };
52
+ /**
53
+ * The description is quieter than the price, and quietest at the largest size.
54
+ * `leading-none` trails the text size here for the same reason it does above.
55
+ */
34
56
  const descriptionSizeClassName = {
35
- xxs: "text-gdt-subtext",
36
- xs: "text-gdt-subtext",
37
- sm: "text-gdt-subtext",
38
- md: "text-gdt-subtext",
39
- lg: "text-gdt-xs"
57
+ xxs: "text-gdt-subtext leading-none",
58
+ xs: "text-gdt-subtext leading-none",
59
+ sm: "text-gdt-subtext leading-none",
60
+ md: "text-gdt-subtext leading-none",
61
+ lg: "text-gdt-xs leading-none"
40
62
  };
41
63
  function getDisplayAmount({ amount, shortAmount, format }) {
42
64
  return format === "shortened" && shortAmount ? shortAmount : amount;
@@ -84,7 +106,7 @@ function DefaultMenuOption({ option }) {
84
106
  ] });
85
107
  }
86
108
  /**
87
- * Pill-shaped price display, optionally a trigger for a currency dropdown.
109
+ * Rounded-box price display, optionally a trigger for a currency dropdown.
88
110
  *
89
111
  * Display only: it prints `value` and `description` as given and never
90
112
  * composes a sentence, picks a format, or decides that a line is too small to
@@ -106,9 +128,18 @@ function PriceTag({ value, description, size = "md", currencies, selectedCurrenc
106
128
  const legacyDescription = monthlyPayment && (size === "md" || size === "lg") ? `${monthlyPaymentLabel} ${monthlyPayment} monthly` : void 0;
107
129
  const resolvedDescription = description ?? legacyDescription;
108
130
  const pill = /* @__PURE__ */ jsxs("span", {
109
- className: "flex min-w-0 flex-col gap-1",
110
- children: [/* @__PURE__ */ jsx("span", { children: resolvedValue }), resolvedDescription ? /* @__PURE__ */ jsx("span", {
111
- className: cn("font-medium leading-none opacity-90", descriptionSizeClassName[size]),
131
+ className: cn("flex min-w-0 flex-col text-start", lineGapClassName[size]),
132
+ children: [/* @__PURE__ */ jsxs("span", {
133
+ className: cn("flex items-center justify-between", chevronGapClassName[size]),
134
+ children: [/* @__PURE__ */ jsx("span", {
135
+ className: "min-w-0",
136
+ children: resolvedValue
137
+ }), hasDropdown ? /* @__PURE__ */ jsx(ChevronDown, {
138
+ "aria-hidden": "true",
139
+ className: "shrink-0 transition-transform group-data-popup-open/price-tag:rotate-180"
140
+ }) : null]
141
+ }), resolvedDescription ? /* @__PURE__ */ jsx("span", {
142
+ className: cn("font-medium opacity-90", descriptionSizeClassName[size]),
112
143
  children: resolvedDescription
113
144
  }) : null]
114
145
  });
@@ -127,16 +158,13 @@ function PriceTag({ value, description, size = "md", currencies, selectedCurrenc
127
158
  open,
128
159
  defaultOpen,
129
160
  onOpenChange,
130
- children: [/* @__PURE__ */ jsxs(Popover.Trigger, {
161
+ children: [/* @__PURE__ */ jsx(Popover.Trigger, {
131
162
  "data-slot": "price-tag",
132
163
  "data-interactive": "true",
133
164
  type,
134
165
  className: pillClassName,
135
166
  ...props,
136
- children: [pill, /* @__PURE__ */ jsx(ChevronDown, {
137
- "aria-hidden": "true",
138
- className: "transition-transform group-data-popup-open/price-tag:rotate-180"
139
- })]
167
+ children: pill
140
168
  }), /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
141
169
  sideOffset: 10,
142
170
  align: "start",
package/dist/progress.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as cn } from "./cn-BI_4DMBf.js";
2
+ import { cn } from "./utils/cn.js";
3
3
  import { SizeProvider, useComponentSize } from "./size-context.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { cva } from "class-variance-authority";
@@ -1,4 +1,6 @@
1
1
  import { n as ButtonLink, t as Button } from "./button-DW5OijoR.js";
2
+ import { Carousel, CarouselIndicator, CarouselItem } from "./carousel.js";
3
+ import { ImageProps } from "./image.js";
2
4
  import { useRender } from "@base-ui/react/use-render";
3
5
  import { VariantProps } from "class-variance-authority";
4
6
  import * as React from "react";
@@ -6,6 +8,10 @@ import * as React from "react";
6
8
  declare const propertyListingCardVariants: (props?: ({
7
9
  variant?: "default" | "elevated" | null | undefined;
8
10
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
+ /**
12
+ * @deprecated Render `PropertyListingCardImage` yourself, which takes `src`,
13
+ * `alt` and every other image prop directly. Removed in the next major.
14
+ */
9
15
  type PropertyListingImage = {
10
16
  id?: string;
11
17
  src?: string;
@@ -13,9 +19,65 @@ type PropertyListingImage = {
13
19
  };
14
20
  interface PropertyListingCardProps extends React.ComponentProps<"article">, VariantProps<typeof propertyListingCardVariants> {}
15
21
  declare function PropertyListingCard({ className, variant, ...props }: PropertyListingCardProps): React.JSX.Element;
22
+ /**
23
+ * The media well: a positioned box the backdrop and the overlays share. The
24
+ * backdrop — one image, a carousel of them, or the placeholder — sits at
25
+ * `-z-10`; everything else stacks above it.
26
+ *
27
+ * Compose the backdrop as children and it stays yours to arrange:
28
+ *
29
+ * ```tsx
30
+ * <PropertyListingCardMedia>
31
+ * <PropertyListingCardCarousel>
32
+ * <CarouselContent>
33
+ * {images.map((image) => (
34
+ * <PropertyListingCardCarouselItem key={image.id}>
35
+ * <PropertyListingCardImage src={image.src} alt={image.alt} loading="lazy" />
36
+ * </PropertyListingCardCarouselItem>
37
+ * ))}
38
+ * </CarouselContent>
39
+ * <PropertyListingCardCarouselIndicator className="bottom-20" />
40
+ * </PropertyListingCardCarousel>
41
+ * <PropertyListingCardMediaTop>…</PropertyListingCardMediaTop>
42
+ * </PropertyListingCardMedia>
43
+ * ```
44
+ */
16
45
  declare function PropertyListingCardMedia({ className, images, children, ...props }: React.ComponentProps<"div"> & {
46
+ /**
47
+ * @deprecated Compose the backdrop from `PropertyListingCardCarousel`,
48
+ * `PropertyListingCardImage` and `PropertyListingCardImagePlaceholder`
49
+ * instead. Building it from a list left no way to lazy-load a photo, move
50
+ * the indicator off the options bar, or hand the images to a framework's
51
+ * own image component. Removed in the next major.
52
+ */
17
53
  images?: PropertyListingImage[];
18
54
  }): React.JSX.Element;
55
+ /**
56
+ * The carousel, sized to fill the media well and sunk behind the overlays.
57
+ * Fill it with `CarouselContent` from `@giddaa-housing/ui/carousel` — every
58
+ * carousel part works here, including `CarouselPrevious`/`CarouselNext`.
59
+ */
60
+ declare function PropertyListingCardCarousel({ className, opts, ...props }: React.ComponentProps<typeof Carousel>): React.JSX.Element;
61
+ declare function PropertyListingCardCarouselItem({ className, ...props }: React.ComponentProps<typeof CarouselItem>): React.JSX.Element;
62
+ /**
63
+ * The indicator, lifted clear of the options bar by default. That bar is
64
+ * `min-h-9.5` and the media may carry a price tag above it, so the offset is
65
+ * a starting point rather than a rule — `className="bottom-20"` or any other
66
+ * `bottom-*` moves it.
67
+ */
68
+ declare function PropertyListingCardCarouselIndicator({ className, size, ...props }: React.ComponentProps<typeof CarouselIndicator>): React.JSX.Element;
69
+ /**
70
+ * A listing photo. Takes everything an `<img>` does — `loading="lazy"`,
71
+ * `fetchPriority`, `sizes`, `srcSet` — and `render` swaps the element for a
72
+ * framework's image component. `ImageProvider` does the same for every image
73
+ * in the tree at once.
74
+ */
75
+ declare function PropertyListingCardImage({ image, alt, src, className, ...props }: ImageProps & {
76
+ /** @deprecated Pass `src` and `alt` directly. Removed in the next major. */
77
+ image?: PropertyListingImage;
78
+ }): React.JSX.Element;
79
+ /** Stands in for a listing with no photo, filling the well behind the overlays. */
80
+ declare function PropertyListingCardImagePlaceholder({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element;
19
81
  declare function PropertyListingCardMediaTop({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
20
82
  declare function PropertyListingCardOptionsBar({ className, render, ...props }: useRender.ComponentProps<"a">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
21
83
  declare function PropertyListingCardDetails({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
@@ -26,4 +88,4 @@ declare function PropertyListingCardActions({ className, ...props }: React.Compo
26
88
  declare function PropertyListingCardActionButton({ className, type, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
27
89
  declare function PropertyListingCardActionButtonLink({ className, ...props }: React.ComponentProps<typeof ButtonLink>): React.JSX.Element;
28
90
  //#endregion
29
- export { PropertyListingCard, PropertyListingCardActionButton, PropertyListingCardActionButtonLink, PropertyListingCardActions, PropertyListingCardBadges, PropertyListingCardDetails, PropertyListingCardMedia, PropertyListingCardMediaTop, PropertyListingCardOptionsBar, PropertyListingCardOverview, type PropertyListingCardProps, PropertyListingCardTitle, type PropertyListingImage, propertyListingCardVariants };
91
+ export { PropertyListingCard, PropertyListingCardActionButton, PropertyListingCardActionButtonLink, PropertyListingCardActions, PropertyListingCardBadges, PropertyListingCardCarousel, PropertyListingCardCarouselIndicator, PropertyListingCardCarouselItem, PropertyListingCardDetails, PropertyListingCardImage, PropertyListingCardImagePlaceholder, PropertyListingCardMedia, PropertyListingCardMediaTop, PropertyListingCardOptionsBar, PropertyListingCardOverview, type PropertyListingCardProps, PropertyListingCardTitle, type PropertyListingImage, propertyListingCardVariants };
@@ -1,7 +1,8 @@
1
1
  "use client";
2
- import { t as cn } from "./cn-BI_4DMBf.js";
2
+ import { cn } from "./utils/cn.js";
3
3
  import { Button, ButtonLink } from "./button.js";
4
4
  import { Carousel, CarouselContent, CarouselIndicator, CarouselItem } from "./carousel.js";
5
+ import { Image } from "./image.js";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
7
  import { mergeProps } from "@base-ui/react/merge-props";
7
8
  import { useRender } from "@base-ui/react/use-render";
@@ -20,39 +21,107 @@ function PropertyListingCard({ className, variant, ...props }) {
20
21
  ...props
21
22
  });
22
23
  }
23
- function PropertyListingCardMedia({ className, images = [], children, ...props }) {
24
- const hasMultipleImages = images.length > 1;
24
+ /**
25
+ * The media well: a positioned box the backdrop and the overlays share. The
26
+ * backdrop — one image, a carousel of them, or the placeholder — sits at
27
+ * `-z-10`; everything else stacks above it.
28
+ *
29
+ * Compose the backdrop as children and it stays yours to arrange:
30
+ *
31
+ * ```tsx
32
+ * <PropertyListingCardMedia>
33
+ * <PropertyListingCardCarousel>
34
+ * <CarouselContent>
35
+ * {images.map((image) => (
36
+ * <PropertyListingCardCarouselItem key={image.id}>
37
+ * <PropertyListingCardImage src={image.src} alt={image.alt} loading="lazy" />
38
+ * </PropertyListingCardCarouselItem>
39
+ * ))}
40
+ * </CarouselContent>
41
+ * <PropertyListingCardCarouselIndicator className="bottom-20" />
42
+ * </PropertyListingCardCarousel>
43
+ * <PropertyListingCardMediaTop>…</PropertyListingCardMediaTop>
44
+ * </PropertyListingCardMedia>
45
+ * ```
46
+ */
47
+ function PropertyListingCardMedia({ className, images, children, ...props }) {
25
48
  return /* @__PURE__ */ jsxs("div", {
26
49
  className: cn("relative isolate min-h-70 overflow-hidden rounded-t-2xl bg-surface text-fg-primary", className),
27
50
  ...props,
28
- children: [hasMultipleImages ? /* @__PURE__ */ jsxs(Carousel, {
29
- imageSize: "full",
30
- opts: { loop: true },
31
- className: "absolute inset-0 -z-10 size-full rounded-none bg-surface",
32
- children: [/* @__PURE__ */ jsx(CarouselContent, { children: images.map((carouselImage, index) => /* @__PURE__ */ jsx(CarouselItem, {
33
- className: "relative h-full",
34
- children: /* @__PURE__ */ jsx(PropertyListingCardImage, { image: carouselImage })
35
- }, carouselImage.id ?? carouselImage.src ?? carouselImage.alt ?? index)) }), /* @__PURE__ */ jsx(CarouselIndicator, {
36
- size: "sm",
37
- className: "bottom-16"
38
- })]
39
- }) : images[0]?.src ? /* @__PURE__ */ jsx(PropertyListingCardImage, {
40
- image: images[0],
41
- className: "absolute inset-0 -z-10"
42
- }) : /* @__PURE__ */ jsx("div", {
43
- className: "absolute inset-0 -z-10 grid place-items-center bg-surface-raised text-gdt-sm font-bold text-fg-caption-placeholder",
44
- children: "Property Image"
45
- }), children]
46
- });
47
- }
48
- function PropertyListingCardImage({ image, className, ...props }) {
49
- return /* @__PURE__ */ jsx("img", {
50
- src: image.src,
51
- alt: image.alt ?? "Property image",
51
+ children: [images ? /* @__PURE__ */ jsx(PropertyListingCardMediaBackdrop, { images }) : null, children]
52
+ });
53
+ }
54
+ /** The backdrop the deprecated `images` prop builds, unchanged. */
55
+ function PropertyListingCardMediaBackdrop({ images }) {
56
+ if (images.length > 1) return /* @__PURE__ */ jsxs(PropertyListingCardCarousel, { children: [/* @__PURE__ */ jsx(CarouselContent, { children: images.map((carouselImage, index) => /* @__PURE__ */ jsx(PropertyListingCardCarouselItem, { children: /* @__PURE__ */ jsx(PropertyListingCardImage, { image: carouselImage }) }, carouselImage.id ?? carouselImage.src ?? carouselImage.alt ?? index)) }), /* @__PURE__ */ jsx(PropertyListingCardCarouselIndicator, {})] });
57
+ if (images[0]?.src) return /* @__PURE__ */ jsx(PropertyListingCardImage, {
58
+ image: images[0],
59
+ className: "absolute inset-0 -z-10"
60
+ });
61
+ return /* @__PURE__ */ jsx(PropertyListingCardImagePlaceholder, {});
62
+ }
63
+ /**
64
+ * The carousel, sized to fill the media well and sunk behind the overlays.
65
+ * Fill it with `CarouselContent` from `@giddaa-housing/ui/carousel` — every
66
+ * carousel part works here, including `CarouselPrevious`/`CarouselNext`.
67
+ */
68
+ function PropertyListingCardCarousel({ className, opts, ...props }) {
69
+ return /* @__PURE__ */ jsx(Carousel, {
70
+ "data-slot": "property-listing-card-carousel",
71
+ imageSize: "full",
72
+ opts: {
73
+ loop: true,
74
+ ...opts
75
+ },
76
+ className: cn("absolute inset-0 -z-10 size-full rounded-none bg-surface", className),
77
+ ...props
78
+ });
79
+ }
80
+ function PropertyListingCardCarouselItem({ className, ...props }) {
81
+ return /* @__PURE__ */ jsx(CarouselItem, {
82
+ "data-slot": "property-listing-card-carousel-item",
83
+ className: cn("relative h-full", className),
84
+ ...props
85
+ });
86
+ }
87
+ /**
88
+ * The indicator, lifted clear of the options bar by default. That bar is
89
+ * `min-h-9.5` and the media may carry a price tag above it, so the offset is
90
+ * a starting point rather than a rule — `className="bottom-20"` or any other
91
+ * `bottom-*` moves it.
92
+ */
93
+ function PropertyListingCardCarouselIndicator({ className, size = "sm", ...props }) {
94
+ return /* @__PURE__ */ jsx(CarouselIndicator, {
95
+ "data-slot": "property-listing-card-carousel-indicator",
96
+ size,
97
+ className: cn("bottom-16", className),
98
+ ...props
99
+ });
100
+ }
101
+ /**
102
+ * A listing photo. Takes everything an `<img>` does — `loading="lazy"`,
103
+ * `fetchPriority`, `sizes`, `srcSet` — and `render` swaps the element for a
104
+ * framework's image component. `ImageProvider` does the same for every image
105
+ * in the tree at once.
106
+ */
107
+ function PropertyListingCardImage({ image, alt, src, className, ...props }) {
108
+ return /* @__PURE__ */ jsx(Image, {
109
+ slot: "property-listing-card-image",
110
+ src: src ?? image?.src,
111
+ alt: alt ?? image?.alt ?? "Property image",
52
112
  className: cn("size-full object-cover", className),
53
113
  ...props
54
114
  });
55
115
  }
116
+ /** Stands in for a listing with no photo, filling the well behind the overlays. */
117
+ function PropertyListingCardImagePlaceholder({ className, children = "Property Image", ...props }) {
118
+ return /* @__PURE__ */ jsx("div", {
119
+ "data-slot": "property-listing-card-image-placeholder",
120
+ className: cn("absolute inset-0 -z-10 grid place-items-center bg-surface-raised text-gdt-sm font-bold text-fg-caption-placeholder", className),
121
+ ...props,
122
+ children
123
+ });
124
+ }
56
125
  function PropertyListingCardMediaTop({ className, ...props }) {
57
126
  return /* @__PURE__ */ jsx("div", {
58
127
  className: cn("absolute inset-x-2 top-2 z-10 flex items-start justify-between gap-3", className),
@@ -115,4 +184,4 @@ function PropertyListingCardActionButtonLink({ className, ...props }) {
115
184
  });
116
185
  }
117
186
  //#endregion
118
- export { PropertyListingCard, PropertyListingCardActionButton, PropertyListingCardActionButtonLink, PropertyListingCardActions, PropertyListingCardBadges, PropertyListingCardDetails, PropertyListingCardMedia, PropertyListingCardMediaTop, PropertyListingCardOptionsBar, PropertyListingCardOverview, PropertyListingCardTitle, propertyListingCardVariants };
187
+ export { PropertyListingCard, PropertyListingCardActionButton, PropertyListingCardActionButtonLink, PropertyListingCardActions, PropertyListingCardBadges, PropertyListingCardCarousel, PropertyListingCardCarouselIndicator, PropertyListingCardCarouselItem, PropertyListingCardDetails, PropertyListingCardImage, PropertyListingCardImagePlaceholder, PropertyListingCardMedia, PropertyListingCardMediaTop, PropertyListingCardOptionsBar, PropertyListingCardOverview, PropertyListingCardTitle, propertyListingCardVariants };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as cn } from "./cn-BI_4DMBf.js";
2
+ import { cn } from "./utils/cn.js";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  import { mergeProps } from "@base-ui/react/merge-props";
5
5
  import { useRender } from "@base-ui/react/use-render";
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as cn } from "./cn-BI_4DMBf.js";
2
+ import { cn } from "./utils/cn.js";
3
3
  import { SizeProvider, useComponentSize } from "./size-context.js";
4
4
  import { ChartContainer } from "./chart.js";
5
5
  import { jsx } from "react/jsx-runtime";