@giddaa-housing/ui 3.3.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 (134) hide show
  1. package/css/generated/shared.css +1 -1
  2. package/css/theme.css +20 -0
  3. package/dist/accordion.js +1 -1
  4. package/dist/activity-timeline.js +1 -1
  5. package/dist/alert.js +1 -1
  6. package/dist/auth-layout.js +1 -1
  7. package/dist/avatar.js +1 -1
  8. package/dist/badge.js +6 -1
  9. package/dist/bar-chart.js +1 -1
  10. package/dist/breadcrumb.js +1 -1
  11. package/dist/bullet-chart.js +1 -1
  12. package/dist/button-group.js +1 -1
  13. package/dist/button.js +1 -1
  14. package/dist/calendar.js +2 -2
  15. package/dist/call-card.js +1 -1
  16. package/dist/card.js +1 -1
  17. package/dist/carousel.js +2 -2
  18. package/dist/chart.js +1 -1
  19. package/dist/chat.js +1 -1
  20. package/dist/checkbox.js +1 -1
  21. package/dist/collapsible.js +1 -1
  22. package/dist/combobox-B7cKFJ9V.js +398 -0
  23. package/dist/combobox.d.ts +2 -2
  24. package/dist/combobox.js +1 -308
  25. package/dist/cta.js +1 -1
  26. package/dist/currency-selector.js +2 -2
  27. package/dist/data-table.d.ts +1 -1
  28. package/dist/data-table.js +1 -1
  29. package/dist/date-picker.d.ts +4 -3
  30. package/dist/date-picker.js +7 -17
  31. package/dist/details-card.js +1 -1
  32. package/dist/dialog.js +1 -1
  33. package/dist/dropdown-menu.js +1 -1
  34. package/dist/dropzone.js +1 -1
  35. package/dist/editorial-card.js +2 -4
  36. package/dist/empty-state.js +1 -1
  37. package/dist/field.js +1 -1
  38. package/dist/file-upload.js +1 -1
  39. package/dist/filter.js +1 -1
  40. package/dist/footer.js +1 -1
  41. package/dist/funnel-chart.js +1 -1
  42. package/dist/gallery-indicator.js +1 -1
  43. package/dist/icons-C9JXR5Xv.d.ts +111 -0
  44. package/dist/icons.d.ts +2 -93
  45. package/dist/icons.js +37 -1
  46. package/dist/image.d.ts +59 -0
  47. package/dist/image.js +53 -0
  48. package/dist/infinite-scroll.js +3 -29
  49. package/dist/infotip.js +1 -1
  50. package/dist/input-group.js +1 -1
  51. package/dist/input-otp.js +1 -1
  52. package/dist/input.js +1 -1
  53. package/dist/item.js +1 -1
  54. package/dist/kpi-card.js +1 -1
  55. package/dist/label.js +1 -1
  56. package/dist/line-chart.js +1 -1
  57. package/dist/list-item.js +1 -1
  58. package/dist/map-indicator.js +1 -1
  59. package/dist/match.js +1 -1
  60. package/dist/media-gallery-hero.js +6 -3
  61. package/dist/media-player.js +5 -13
  62. package/dist/message.js +2 -12
  63. package/dist/mobile-sidebar.js +1 -1
  64. package/dist/multi-step-form.js +2 -2
  65. package/dist/number-input.js +1 -1
  66. package/dist/page-header.js +1 -1
  67. package/dist/pagination.js +1 -1
  68. package/dist/password-input.js +1 -1
  69. package/dist/phone-input.js +11 -17
  70. package/dist/photo-gallery.js +6 -3
  71. package/dist/picker-CsnHtbe4.d.ts +14 -0
  72. package/dist/{picker-xSTzeYhc.js → picker-DmIiQKLJ.js} +2 -7
  73. package/dist/pie-chart.js +1 -1
  74. package/dist/popover-DSlPeH7x.d.ts +20 -0
  75. package/dist/popover.d.ts +1 -19
  76. package/dist/popover.js +1 -1
  77. package/dist/price-tag.d.ts +80 -12
  78. package/dist/price-tag.js +139 -70
  79. package/dist/progress.js +1 -1
  80. package/dist/property-listing-card.d.ts +63 -1
  81. package/dist/property-listing-card.js +97 -28
  82. package/dist/purchase-option-card.js +1 -1
  83. package/dist/radar-chart.js +1 -1
  84. package/dist/radio-group.js +1 -1
  85. package/dist/review-block.js +1 -1
  86. package/dist/rich-text-editor.js +1 -1
  87. package/dist/scatter-chart.js +1 -1
  88. package/dist/scroll-spy.d.ts +16 -1
  89. package/dist/scroll-spy.js +28 -5
  90. package/dist/search-input.js +1 -1
  91. package/dist/select.js +1 -1
  92. package/dist/separator.js +1 -1
  93. package/dist/sheet.js +1 -1
  94. package/dist/sidebar.js +3 -16
  95. package/dist/skeleton.js +1 -1
  96. package/dist/slider.js +1 -1
  97. package/dist/sonar.d.ts +51 -0
  98. package/dist/sonar.js +117 -0
  99. package/dist/sparkline.js +1 -1
  100. package/dist/stepper.js +1 -1
  101. package/dist/styles.css +85 -2
  102. package/dist/switch.js +1 -1
  103. package/dist/table-card.js +1 -1
  104. package/dist/table.js +1 -1
  105. package/dist/tabs.js +1 -1
  106. package/dist/tag.js +1 -1
  107. package/dist/testimonial-block.js +1 -1
  108. package/dist/textarea.js +1 -1
  109. package/dist/theme-switcher.js +1 -1
  110. package/dist/time-picker.d.ts +3 -2
  111. package/dist/time-picker.js +5 -7
  112. package/dist/toast.js +1 -1
  113. package/dist/tooltip.js +1 -1
  114. package/dist/top-navbar.js +1 -1
  115. package/dist/tree-map.js +1 -1
  116. package/dist/utils/cn.d.ts +5 -0
  117. package/dist/utils/cn.js +33 -0
  118. package/dist/utils/format.d.ts +45 -0
  119. package/dist/utils/format.js +70 -0
  120. package/dist/utils/phone.d.ts +98 -0
  121. package/dist/utils/phone.js +93 -0
  122. package/dist/utils/use-intersection.d.ts +9 -0
  123. package/dist/utils/use-intersection.js +29 -0
  124. package/dist/utils/use-is-mobile.d.ts +5 -0
  125. package/dist/utils/use-is-mobile.js +16 -0
  126. package/dist/utils/use-reduced-motion.d.ts +5 -0
  127. package/dist/{use-reduced-motion-BDvOK14x.js → utils/use-reduced-motion.js} +2 -2
  128. package/dist/utils/use-uncontrolled.d.ts +11 -0
  129. package/dist/{use-uncontrolled-CLfM1XbB.js → utils/use-uncontrolled.js} +2 -2
  130. package/dist/video-player-dialog.d.ts +12 -2
  131. package/dist/video-player-dialog.js +47 -7
  132. package/dist/waterfall-chart.js +1 -1
  133. package/package.json +13 -1
  134. package/dist/cn-BI_4DMBf.js +0 -23
package/dist/combobox.js CHANGED
@@ -1,310 +1,3 @@
1
1
  "use client";
2
- import { Check, ChevronDown, X } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
4
- import { SizeProvider, useComponentSize } from "./size-context.js";
5
- import { Button } from "./button.js";
6
- import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.js";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
- import { cva } from "class-variance-authority";
9
- import * as React from "react";
10
- import { Combobox as Combobox$1 } from "@base-ui/react";
11
- import { useVirtualizer } from "@tanstack/react-virtual";
12
- //#region src/combobox.tsx
13
- const ComboboxSelectionContext = React.createContext({ multiple: false });
14
- function Combobox({ multiple, children, size, ...props }) {
15
- return /* @__PURE__ */ jsx(SizeProvider, {
16
- size,
17
- children: /* @__PURE__ */ jsx(ComboboxSelectionContext.Provider, {
18
- value: { multiple: multiple === true },
19
- children: /* @__PURE__ */ jsx(Combobox$1.Root, {
20
- multiple,
21
- ...props,
22
- children
23
- })
24
- })
25
- });
26
- }
27
- const comboboxTriggerVariants = cva("group/combobox-trigger flex w-fit min-w-0 items-center justify-between rounded-full border border-line bg-canvas text-left font-normal whitespace-nowrap text-fg-primary shadow-none outline-none transition-[background-color,border-color,border-radius,box-shadow,color] select-none hover:border-line-strong focus-visible:border-line-focus focus-visible:inset-ring-1 focus-visible:inset-ring-line-focus data-focused:border-line-focus data-focused:inset-ring-1 data-focused:inset-ring-line-focus data-popup-open:rounded-2xl data-popup-open:border-line-focus data-popup-open:inset-ring-1 data-popup-open:inset-ring-line-focus disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-line-subtle disabled:bg-surface disabled:text-fg-caption-placeholder data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:border-line-subtle data-disabled:bg-surface data-disabled:text-fg-caption-placeholder data-placeholder:text-fg-caption-placeholder aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:shadow-none data-[invalid=true]:border-line-danger data-[invalid=true]:text-fg-danger *:data-[slot=combobox-value]:line-clamp-1 *:data-[slot=combobox-value]:flex *:data-[slot=combobox-value]:min-w-0 *:data-[slot=combobox-value]:items-center *:data-[slot=combobox-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
28
- variants: { size: {
29
- sm: "h-8 gap-2 px-3 text-gdt-xs [&_svg:not([class*='size-'])]:size-3.5",
30
- md: "h-10 gap-2 px-3.5 text-gdt-sm [&_svg:not([class*='size-'])]:size-4",
31
- lg: "h-12 gap-2.5 px-4 pr-5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5"
32
- } },
33
- defaultVariants: { size: "md" }
34
- });
35
- const comboboxInputVariants = cva("w-auto has-data-popup-open:rounded-2xl has-data-popup-open:border-line-focus has-data-popup-open:inset-ring-1 has-data-popup-open:inset-ring-line-focus", {
36
- variants: { size: {
37
- sm: "",
38
- md: "",
39
- lg: ""
40
- } },
41
- defaultVariants: { size: "md" }
42
- });
43
- const comboboxContentVariants = cva("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width))] origin-(--transform-origin) overflow-hidden border border-line-subtle bg-canvas text-fg-primary shadow-(--elevation-e1-shadow) transition-[opacity,scale,translate] duration-[var(--duration-motion-popup)] ease-gdt-out data-[chips=true]:min-w-(--anchor-width) data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95 data-[side=bottom]:data-starting-style:translate-y-2 data-[side=bottom]:data-ending-style:translate-y-2 data-[side=top]:data-starting-style:-translate-y-2 data-[side=top]:data-ending-style:-translate-y-2 data-[side=left]:data-starting-style:translate-x-2 data-[side=left]:data-ending-style:translate-x-2 data-[side=right]:data-starting-style:-translate-x-2 data-[side=right]:data-ending-style:-translate-x-2 data-[side=inline-end]:data-starting-style:-translate-x-2 data-[side=inline-end]:data-ending-style:-translate-x-2 data-[side=inline-start]:data-starting-style:translate-x-2 data-[side=inline-start]:data-ending-style:translate-x-2 motion-reduce:data-starting-style:scale-100 motion-reduce:data-ending-style:scale-100 motion-reduce:data-[side=bottom]:data-starting-style:translate-y-0 motion-reduce:data-[side=bottom]:data-ending-style:translate-y-0 motion-reduce:data-[side=top]:data-starting-style:translate-y-0 motion-reduce:data-[side=top]:data-ending-style:translate-y-0 motion-reduce:data-[side=left]:data-starting-style:translate-x-0 motion-reduce:data-[side=left]:data-ending-style:translate-x-0 motion-reduce:data-[side=right]:data-starting-style:translate-x-0 motion-reduce:data-[side=right]:data-ending-style:translate-x-0 motion-reduce:data-[side=inline-end]:data-starting-style:translate-x-0 motion-reduce:data-[side=inline-end]:data-ending-style:translate-x-0 motion-reduce:data-[side=inline-start]:data-starting-style:translate-x-0 motion-reduce:data-[side=inline-start]:data-ending-style:translate-x-0 *:data-[slot=input-group]:mb-1", {
44
- variants: { size: {
45
- sm: "rounded-lg p-1",
46
- md: "rounded-xl p-1.5",
47
- lg: "rounded-[18px] p-2"
48
- } },
49
- defaultVariants: { size: "md" }
50
- });
51
- 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", {
52
- variants: { size: {
53
- sm: "gap-1.5 rounded-md px-3 py-1.5 text-gdt-xs",
54
- md: "gap-2 rounded-md px-4 py-2 text-gdt-sm",
55
- lg: "gap-2.5 rounded-md px-4 py-2.5 text-gdt-md"
56
- } },
57
- defaultVariants: { size: "md" }
58
- });
59
- const comboboxChipsVariants = cva("flex flex-wrap items-center gap-1 rounded-full border border-line bg-canvas bg-clip-padding text-fg-primary transition-[background-color,border-color,box-shadow,color] focus-within:border-line-focus focus-within:inset-ring-1 focus-within:inset-ring-line-focus has-aria-invalid:border-line-danger has-aria-invalid:text-fg-danger has-aria-invalid:shadow-none has-data-[slot=combobox-chip]:px-1 has-data-popup-open:rounded-2xl has-data-popup-open:border-line-focus has-data-popup-open:inset-ring-1 has-data-popup-open:inset-ring-line-focus", {
60
- variants: { size: {
61
- sm: "min-h-8 px-2.5 py-1 text-gdt-xs",
62
- md: "min-h-10 px-3 py-1.5 text-gdt-sm",
63
- lg: "min-h-12 px-4 py-2 text-gdt-md"
64
- } },
65
- defaultVariants: { size: "md" }
66
- });
67
- const comboboxChipVariants = cva("flex w-fit items-center justify-center gap-1 rounded-sm bg-surface font-medium whitespace-nowrap text-fg-primary has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", {
68
- variants: { size: {
69
- sm: "h-5 px-1.5 text-gdt-xs",
70
- md: "h-[calc(--spacing(5.25))] px-1.5 text-gdt-xs",
71
- lg: "h-6 px-2 text-gdt-sm"
72
- } },
73
- defaultVariants: { size: "md" }
74
- });
75
- function ComboboxValue({ ...props }) {
76
- return /* @__PURE__ */ jsx(Combobox$1.Value, {
77
- "data-slot": "combobox-value",
78
- ...props
79
- });
80
- }
81
- function ComboboxTrigger({ className, children, ...props }) {
82
- const resolvedSize = useComponentSize();
83
- return /* @__PURE__ */ jsxs(Combobox$1.Trigger, {
84
- "data-slot": "combobox-trigger",
85
- "data-size": resolvedSize,
86
- className: cn(comboboxTriggerVariants({ size: resolvedSize }), className),
87
- ...props,
88
- children: [children, /* @__PURE__ */ jsx(Combobox$1.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" }) })]
89
- });
90
- }
91
- function ComboboxClear({ className, ...props }) {
92
- return /* @__PURE__ */ jsx(Combobox$1.Clear, {
93
- "data-slot": "combobox-clear",
94
- className: cn(className),
95
- ...props,
96
- render: /* @__PURE__ */ jsx(InputGroupButton, {
97
- variant: "ghost",
98
- size: "icon-xs",
99
- children: /* @__PURE__ */ jsx(X, { className: "pointer-events-none" })
100
- })
101
- });
102
- }
103
- function ComboboxInput({ className, children, disabled = false, showTrigger = true, showClear = false, ...props }) {
104
- const resolvedSize = useComponentSize();
105
- return /* @__PURE__ */ jsxs(InputGroup, {
106
- className: cn(comboboxInputVariants({ size: resolvedSize }), className),
107
- children: [
108
- /* @__PURE__ */ jsx(Combobox$1.Input, {
109
- render: /* @__PURE__ */ jsx(InputGroupInput, { disabled }),
110
- ...props
111
- }),
112
- /* @__PURE__ */ jsxs(InputGroupAddon, {
113
- align: "inline-end",
114
- children: [showTrigger && /* @__PURE__ */ jsx(InputGroupButton, {
115
- size: "icon-xs",
116
- variant: "ghost",
117
- render: /* @__PURE__ */ jsx(ComboboxTrigger, {}),
118
- "data-slot": "input-group-button",
119
- className: "border-0 bg-transparent p-0 shadow-none inset-ring-0 group-has-data-[slot=combobox-clear]/input-group:hidden hover:border-transparent focus-visible:border-transparent focus-visible:inset-ring-0 data-popup-open:border-transparent data-popup-open:bg-transparent data-popup-open:inset-ring-0 data-pressed:bg-transparent",
120
- disabled
121
- }), showClear && /* @__PURE__ */ jsx(ComboboxClear, { disabled })]
122
- }),
123
- children
124
- ]
125
- });
126
- }
127
- function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props }) {
128
- const resolvedSize = useComponentSize();
129
- return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
130
- side,
131
- sideOffset,
132
- align,
133
- alignOffset,
134
- anchor,
135
- className: "isolate z-50",
136
- children: /* @__PURE__ */ jsx(Combobox$1.Popup, {
137
- "data-slot": "combobox-content",
138
- "data-chips": !!anchor,
139
- className: cn("group/combobox-content", comboboxContentVariants({ size: resolvedSize }), "has-data-[slot=combobox-virtualized]:max-h-none", className),
140
- ...props
141
- })
142
- }) });
143
- }
144
- function ComboboxList({ className, ...props }) {
145
- return /* @__PURE__ */ jsx(Combobox$1.List, {
146
- "data-slot": "combobox-list",
147
- className: cn("no-scrollbar max-h-(--available-height) space-y-0.5 scroll-py-1 overflow-y-auto overscroll-contain data-empty:p-0 has-data-[slot=combobox-virtualized]:max-h-none has-data-[slot=combobox-virtualized]:space-y-0 has-data-[slot=combobox-virtualized]:overflow-hidden", className),
148
- ...props
149
- });
150
- }
151
- function ComboboxItem({ className, children, ...props }) {
152
- const { multiple } = React.useContext(ComboboxSelectionContext);
153
- const resolvedSize = useComponentSize();
154
- return /* @__PURE__ */ jsxs(Combobox$1.Item, {
155
- "data-slot": "combobox-item",
156
- className: cn(comboboxItemVariants({ size: resolvedSize }), !multiple && "data-selected:bg-surface-brand-subtle data-selected:font-medium data-selected:text-fg-brand", className),
157
- ...props,
158
- children: [multiple ? /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, {
159
- keepMounted: true,
160
- className: "flex size-5 shrink-0 items-center justify-center rounded-sm border border-line bg-canvas text-transparent transition-[background-color,border-color,color] group-data-selected/combobox-item:border-action-primary group-data-selected/combobox-item:bg-action-primary group-data-selected/combobox-item:text-fg-on-brand group-data-disabled/combobox-item:border-line-subtle group-data-disabled/combobox-item:bg-surface group-data-disabled/combobox-item:text-fg-caption-placeholder [&>svg]:size-3",
161
- children: /* @__PURE__ */ jsx(Check, {})
162
- }) : null, /* @__PURE__ */ jsx("span", {
163
- className: "flex min-w-0 flex-1 shrink-0 items-center gap-2",
164
- children
165
- })]
166
- });
167
- }
168
- function ComboboxGroup({ className, ...props }) {
169
- return /* @__PURE__ */ jsx(Combobox$1.Group, {
170
- "data-slot": "combobox-group",
171
- className: cn("scroll-my-1 space-y-0.5", className),
172
- ...props
173
- });
174
- }
175
- function ComboboxLabel({ className, ...props }) {
176
- return /* @__PURE__ */ jsx(Combobox$1.GroupLabel, {
177
- "data-slot": "combobox-label",
178
- className: cn("px-3 py-1 text-gdt-xs text-fg-secondary", className),
179
- ...props
180
- });
181
- }
182
- function ComboboxCollection({ ...props }) {
183
- return /* @__PURE__ */ jsx(Combobox$1.Collection, {
184
- "data-slot": "combobox-collection",
185
- ...props
186
- });
187
- }
188
- function ComboboxEmpty({ className, ...props }) {
189
- return /* @__PURE__ */ jsx(Combobox$1.Empty, {
190
- "data-slot": "combobox-empty",
191
- className: cn("hidden w-full justify-center py-2 text-center text-gdt-sm text-fg-secondary group-data-empty/combobox-content:flex", className),
192
- ...props
193
- });
194
- }
195
- function ComboboxSeparator({ className, ...props }) {
196
- return /* @__PURE__ */ jsx(Combobox$1.Separator, {
197
- "data-slot": "combobox-separator",
198
- className: cn("pointer-events-none my-1 h-px bg-line-subtle", className),
199
- ...props
200
- });
201
- }
202
- function ComboboxChips({ className, ...props }) {
203
- const resolvedSize = useComponentSize();
204
- return /* @__PURE__ */ jsx(Combobox$1.Chips, {
205
- "data-slot": "combobox-chips",
206
- className: cn(comboboxChipsVariants({ size: resolvedSize }), className),
207
- ...props
208
- });
209
- }
210
- function ComboboxChip({ className, children, showRemove = true, ...props }) {
211
- const resolvedSize = useComponentSize();
212
- return /* @__PURE__ */ jsxs(Combobox$1.Chip, {
213
- "data-slot": "combobox-chip",
214
- className: cn(comboboxChipVariants({ size: resolvedSize }), className),
215
- ...props,
216
- children: [children, showRemove && /* @__PURE__ */ jsx(Combobox$1.ChipRemove, {
217
- className: "-ml-1 opacity-50 hover:opacity-100",
218
- "data-slot": "combobox-chip-remove",
219
- render: /* @__PURE__ */ jsx(Button, {
220
- variant: "ghost",
221
- size: "icon-xs",
222
- children: /* @__PURE__ */ jsx(X, { className: "pointer-events-none" })
223
- })
224
- })]
225
- });
226
- }
227
- function ComboboxChipsInput({ className, ...props }) {
228
- return /* @__PURE__ */ jsx(Combobox$1.Input, {
229
- "data-slot": "combobox-chip-input",
230
- className: cn("min-w-16 flex-1 bg-transparent text-fg-primary outline-none placeholder:text-fg-caption-placeholder", className),
231
- ...props
232
- });
233
- }
234
- function useComboboxAnchor() {
235
- return React.useRef(null);
236
- }
237
- /**
238
- * Wires up an external virtualizer for a large `Combobox`. Spread the returned
239
- * `onItemHighlighted` onto `<Combobox virtualized items={...}>` and pass
240
- * `virtualizerRef` to `<ComboboxVirtualizedList>`. Keeps keyboard navigation in
241
- * sync by scrolling the highlighted (off-screen) item into view.
242
- */
243
- function useComboboxVirtualizer() {
244
- const virtualizerRef = React.useRef(null);
245
- return {
246
- virtualizerRef,
247
- onItemHighlighted: React.useCallback((item, { reason, index }) => {
248
- const virtualizer = virtualizerRef.current;
249
- if (item == null || !virtualizer || index < 0) return;
250
- const isStart = index === 0;
251
- const isEnd = index === virtualizer.options.count - 1;
252
- if (reason === "none" || reason === "keyboard" && (isStart || isEnd)) queueMicrotask(() => {
253
- virtualizer.scrollToIndex(index, { align: isEnd ? "start" : "end" });
254
- });
255
- }, [])
256
- };
257
- }
258
- function ComboboxVirtualizedList({ virtualizerRef, estimateSize = 40, overscan = 20, paddingStart = 4, paddingEnd = 4, maxHeight = "22rem", className, children }) {
259
- const filteredItems = Combobox$1.useFilteredItems();
260
- const scrollElementRef = React.useRef(null);
261
- const virtualizer = useVirtualizer({
262
- count: filteredItems.length,
263
- getScrollElement: () => scrollElementRef.current,
264
- estimateSize: typeof estimateSize === "function" ? estimateSize : () => estimateSize,
265
- overscan,
266
- paddingStart,
267
- paddingEnd,
268
- scrollPaddingStart: paddingStart,
269
- scrollPaddingEnd: paddingEnd
270
- });
271
- React.useImperativeHandle(virtualizerRef, () => virtualizer, [virtualizer]);
272
- const handleScrollElementRef = React.useCallback((element) => {
273
- scrollElementRef.current = element;
274
- if (element) virtualizer.measure();
275
- }, [virtualizer]);
276
- const totalSize = virtualizer.getTotalSize();
277
- if (!filteredItems.length) return null;
278
- return /* @__PURE__ */ jsx("div", {
279
- role: "presentation",
280
- ref: handleScrollElementRef,
281
- "data-slot": "combobox-virtualized",
282
- style: { maxHeight },
283
- className: cn("no-scrollbar overflow-y-auto overscroll-contain", className),
284
- children: /* @__PURE__ */ jsx("div", {
285
- role: "presentation",
286
- className: "relative w-full",
287
- style: { height: totalSize },
288
- children: virtualizer.getVirtualItems().map((virtualItem) => {
289
- const item = filteredItems[virtualItem.index];
290
- if (item == null) return null;
291
- return /* @__PURE__ */ jsx(React.Fragment, { children: children(item, {
292
- index: virtualItem.index,
293
- "data-index": virtualItem.index,
294
- "aria-setsize": filteredItems.length,
295
- "aria-posinset": virtualItem.index + 1,
296
- style: {
297
- position: "absolute",
298
- top: 0,
299
- left: 0,
300
- width: "100%",
301
- height: virtualItem.size,
302
- transform: `translateY(${virtualItem.start}px)`
303
- }
304
- }) }, virtualItem.key);
305
- })
306
- })
307
- });
308
- }
309
- //#endregion
2
+ import { _ as useComboboxAnchor, a as ComboboxCollection, c as ComboboxGroup, d as ComboboxLabel, f as ComboboxList, g as ComboboxVirtualizedList, h as ComboboxValue, i as ComboboxChipsInput, l as ComboboxInput, m as ComboboxTrigger, n as ComboboxChip, o as ComboboxContent, p as ComboboxSeparator, r as ComboboxChips, s as ComboboxEmpty, t as Combobox, u as ComboboxItem, v as useComboboxVirtualizer } from "./combobox-B7cKFJ9V.js";
310
3
  export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, ComboboxVirtualizedList, useComboboxAnchor, useComboboxVirtualizer };
package/dist/cta.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 { Button, ButtonLink } from "./button.js";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { mergeProps } from "@base-ui/react/merge-props";
@@ -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 { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  import { cva } from "class-variance-authority";
8
8
  //#region src/lib/country-flags.tsx
@@ -2,7 +2,7 @@ import { t as Button } from "./button-DW5OijoR.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 { PopoverBody, PopoverContent, PopoverFooter, PopoverHeader } from "./popover.js";
5
+ import { a as PopoverFooter, n as PopoverBody, o as PopoverHeader, r as PopoverContent } from "./popover-DSlPeH7x.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,6 +1,6 @@
1
1
  "use client";
2
2
  import { ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsUpDown, Pin, SearchX, SlidersHorizontal } 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 { Input } from "./input.js";
6
6
  import { Checkbox } from "./checkbox.js";
@@ -1,9 +1,10 @@
1
1
  import { n as InputSize } from "./input-CfoEJ8A6.js";
2
+ import { t as PickerPlacementProps } from "./picker-CsnHtbe4.js";
2
3
  import * as React from "react";
3
4
  import { DateRange, Matcher } from "react-day-picker";
4
5
  //#region src/date-picker.d.ts
5
6
  type CaptionLayout = "label" | "dropdown" | "dropdown-months" | "dropdown-years";
6
- interface DatePickerBaseProps {
7
+ interface DatePickerBaseProps extends PickerPlacementProps {
7
8
  disabled?: boolean;
8
9
  /** Controls the trigger size. The calendar panel is not resized. */
9
10
  size?: InputSize;
@@ -22,11 +23,11 @@ interface DatePickerProps extends DatePickerBaseProps {
22
23
  value?: Date;
23
24
  onChange?: (date: Date | undefined) => void;
24
25
  }
25
- declare function DatePicker({ value, onChange, disabled, size, placeholder, className, captionLayout, startMonth, endMonth, disabledDates }: DatePickerProps): React.JSX.Element;
26
+ declare function DatePicker({ value, onChange, disabled, size, placeholder, className, captionLayout, startMonth, endMonth, disabledDates, ...placement }: DatePickerProps): React.JSX.Element;
26
27
  interface DateRangePickerProps extends DatePickerBaseProps {
27
28
  value?: DateRange;
28
29
  onChange?: (range: DateRange | undefined) => void;
29
30
  }
30
- declare function DateRangePicker({ value, onChange, disabled, size, placeholder, className, captionLayout, startMonth, endMonth, disabledDates }: DateRangePickerProps): React.JSX.Element;
31
+ declare function DateRangePicker({ value, onChange, disabled, size, placeholder, className, captionLayout, startMonth, endMonth, disabledDates, ...placement }: DateRangePickerProps): React.JSX.Element;
31
32
  //#endregion
32
33
  export { DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps };
@@ -1,19 +1,13 @@
1
1
  "use client";
2
2
  import { Calendar } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { cn } from "./utils/cn.js";
4
4
  import { Calendar as Calendar$1 } from "./calendar.js";
5
5
  import { Popover, PopoverContent } from "./popover.js";
6
- import { n as PickerFooter, r as PickerTrigger, t as PICKER_COLLISION_AVOIDANCE } from "./picker-xSTzeYhc.js";
6
+ import { n as PickerTrigger, t as PickerFooter } from "./picker-DmIiQKLJ.js";
7
+ import { formatDate } from "./utils/format.js";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
8
9
  import * as React from "react";
9
10
  //#region src/date-picker.tsx
10
- function formatDate(date) {
11
- return date.toLocaleDateString("en-GB", {
12
- day: "2-digit",
13
- month: "long",
14
- year: "numeric"
15
- });
16
- }
17
11
  const PANEL_CLASSES = "flex min-w-(--anchor-width) flex-col items-center gap-0 overflow-hidden rounded-2xl p-0 border border-line-subtle";
18
12
  function defaultStartMonth() {
19
13
  return new Date((/* @__PURE__ */ new Date()).getFullYear() - 100, 0);
@@ -21,7 +15,7 @@ function defaultStartMonth() {
21
15
  function defaultEndMonth() {
22
16
  return new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 11);
23
17
  }
24
- function DatePicker({ value, onChange, disabled = false, size, placeholder = "Select date", className, captionLayout = "dropdown", startMonth, endMonth, disabledDates }) {
18
+ function DatePicker({ value, onChange, disabled = false, size, placeholder = "Select date", className, captionLayout = "dropdown", startMonth, endMonth, disabledDates, ...placement }) {
25
19
  const [open, setOpen] = React.useState(false);
26
20
  const [pending, setPending] = React.useState(value);
27
21
  const [month, setMonth] = React.useState(() => value ?? /* @__PURE__ */ new Date());
@@ -45,10 +39,8 @@ function DatePicker({ value, onChange, disabled = false, size, placeholder = "Se
45
39
  className
46
40
  }), /* @__PURE__ */ jsxs(PopoverContent, {
47
41
  showArrow: false,
48
- align: "center",
49
- side: "bottom",
50
- collisionAvoidance: PICKER_COLLISION_AVOIDANCE,
51
42
  className: PANEL_CLASSES,
43
+ ...placement,
52
44
  children: [/* @__PURE__ */ jsx(Calendar$1, {
53
45
  mode: "single",
54
46
  selected: pending,
@@ -74,7 +66,7 @@ function DatePicker({ value, onChange, disabled = false, size, placeholder = "Se
74
66
  })]
75
67
  });
76
68
  }
77
- function DateRangePicker({ value, onChange, disabled = false, size, placeholder = "Select date range", className, captionLayout = "dropdown", startMonth, endMonth, disabledDates }) {
69
+ function DateRangePicker({ value, onChange, disabled = false, size, placeholder = "Select date range", className, captionLayout = "dropdown", startMonth, endMonth, disabledDates, ...placement }) {
78
70
  const [open, setOpen] = React.useState(false);
79
71
  const [pending, setPending] = React.useState(value);
80
72
  const [month, setMonth] = React.useState(() => value?.from ?? /* @__PURE__ */ new Date());
@@ -102,10 +94,8 @@ function DateRangePicker({ value, onChange, disabled = false, size, placeholder
102
94
  className
103
95
  }), /* @__PURE__ */ jsxs(PopoverContent, {
104
96
  showArrow: false,
105
- align: "center",
106
- side: "bottom",
107
- collisionAvoidance: PICKER_COLLISION_AVOIDANCE,
108
97
  className: cn(PANEL_CLASSES, "w-auto"),
98
+ ...placement,
109
99
  children: [/* @__PURE__ */ jsx(Calendar$1, {
110
100
  mode: "range",
111
101
  selected: pending,
@@ -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 { jsx } from "react/jsx-runtime";
4
4
  import { mergeProps } from "@base-ui/react/merge-props";
5
5
  import { useRender } from "@base-ui/react/use-render";
package/dist/dialog.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { X } 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 { Button } from "./button.js";
6
6
  import { DialogNestingProvider, useDialogNestingDepth } from "./dialog-nesting.js";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { Check, ChevronRight } 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 { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { cva } from "class-variance-authority";
package/dist/dropzone.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { UploadCloud } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { cn } from "./utils/cn.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { createContext, use, useCallback, useRef, useState } from "react";
6
6
  //#region src/lib/use-file-picker.ts
@@ -1,8 +1,9 @@
1
1
  "use client";
2
2
  import { ArrowRight, Play, Star } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { cn } from "./utils/cn.js";
4
4
  import { Avatar, AvatarFallback, AvatarImage } from "./avatar.js";
5
5
  import { buttonVariants } from "./button.js";
6
+ import { getInitials } from "./utils/format.js";
6
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
8
  import { mergeProps } from "@base-ui/react/merge-props";
8
9
  import { useRender } from "@base-ui/react/use-render";
@@ -42,9 +43,6 @@ function EditorialCardHeader({ className, render, ...props }) {
42
43
  state: { slot: "editorial-card-header" }
43
44
  });
44
45
  }
45
- function getInitials(name) {
46
- return name.trim().split(/\s+/).slice(0, 2).map((part) => part[0]?.toUpperCase()).join("");
47
- }
48
46
  function EditorialCardMeta({ className, render, ...props }) {
49
47
  return useRender({
50
48
  defaultTagName: "p",
@@ -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
  import { cva } from "class-variance-authority";
4
4
  //#region src/empty-state.tsx
package/dist/field.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 { Separator } from "./separator.js";
5
5
  import { Label } from "./label.js";
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { File, X } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { cn } from "./utils/cn.js";
4
4
  import { CircularProgress, Progress, ProgressValue } from "./progress.js";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { createContext, useContext } from "react";
package/dist/filter.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { Plus, 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 { Input } from "./input.js";
6
6
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select.js";
package/dist/footer.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { ChevronRight } 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 { Input } from "./input.js";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -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 { useComponentSize } from "./size-context.js";
4
4
  import { ChartCard, ChartContainer, ChartDescription, ChartHeader, ChartTitle, ChartTooltip, ChartTooltipContent } from "./chart.js";
5
5
  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, jsxs } from "react/jsx-runtime";
3
3
  import { cva } from "class-variance-authority";
4
4
  //#region src/gallery-indicator.tsx