@giddaa-housing/ui 3.5.0 → 3.7.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/components.css +13 -0
- package/css/generated/shared.css +1 -1
- package/css/theme.css +11 -8
- package/dist/badge.d.ts +5 -1
- package/dist/badge.js +19 -5
- package/dist/bar-chart.d.ts +1 -1
- package/dist/bullet-chart.d.ts +1 -1
- package/dist/button-BS5KCibF.d.ts +33 -0
- package/dist/button-group.d.ts +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/button.js +49 -21
- package/dist/calendar.js +1 -1
- package/dist/carousel.d.ts +4 -2
- package/dist/carousel.js +11 -14
- package/dist/chart.d.ts +1 -1
- package/dist/chat.d.ts +1 -1
- package/dist/checkbox.d.ts +2 -2
- package/dist/checkbox.js +20 -6
- package/dist/{combobox-B7cKFJ9V.js → combobox-D70DFHoM.js} +55 -10
- package/dist/combobox.d.ts +8 -3
- package/dist/combobox.js +2 -2
- package/dist/cta.d.ts +1 -1
- package/dist/data-table.d.ts +2 -2
- package/dist/date-picker.d.ts +3 -3
- package/dist/date-picker.js +1 -1
- package/dist/dialog.d.ts +6 -2
- package/dist/dialog.js +15 -12
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/field.d.ts +4 -1
- package/dist/field.js +28 -11
- package/dist/footer.d.ts +2 -2
- package/dist/funnel-chart.d.ts +1 -1
- package/dist/heatmap-chart.d.ts +1 -1
- package/dist/infotip.js +0 -1
- package/dist/input-group.d.ts +6 -6
- package/dist/input-group.js +43 -18
- package/dist/input-otp.d.ts +2 -2
- package/dist/input-otp.js +31 -14
- package/dist/input-size-context-BMhves-J.d.ts +13 -0
- package/dist/input-size-context.d.ts +2 -2
- package/dist/input-size-context.js +9 -2
- package/dist/input.d.ts +20 -2
- package/dist/input.js +30 -11
- package/dist/line-chart.d.ts +1 -1
- package/dist/mask-input.d.ts +1 -1
- package/dist/match.d.ts +14 -2
- package/dist/match.js +221 -48
- package/dist/media-gallery-hero.js +9 -7
- package/dist/media-player.js +3 -3
- package/dist/mobile-sidebar.js +7 -6
- package/dist/number-input.d.ts +2 -2
- package/dist/number-input.js +2 -2
- package/dist/pagination.d.ts +1 -1
- package/dist/phone-input.d.ts +20 -3
- package/dist/phone-input.js +137 -67
- package/dist/picker-BTXBrsl4.js +62 -0
- package/dist/{picker-CsnHtbe4.d.ts → picker-j3txxA5t.d.ts} +2 -2
- package/dist/pie-chart.d.ts +1 -1
- package/dist/{popover-DSlPeH7x.d.ts → popover-CNymD33m.d.ts} +1 -1
- package/dist/popover.d.ts +1 -1
- package/dist/property-listing-card.d.ts +7 -3
- package/dist/property-listing-card.js +25 -8
- package/dist/radar-chart.d.ts +1 -1
- package/dist/radio-group.d.ts +2 -2
- package/dist/radio-group.js +23 -9
- package/dist/rating.d.ts +60 -0
- package/dist/rating.js +187 -0
- package/dist/rich-text-editor.d.ts +1 -1
- package/dist/scatter-chart.d.ts +1 -1
- package/dist/scroll-spy.d.ts +8 -2
- package/dist/scroll-spy.js +13 -13
- package/dist/section-jumper.d.ts +31 -0
- package/dist/section-jumper.js +276 -0
- package/dist/select.d.ts +9 -4
- package/dist/select.js +148 -20
- package/dist/sheet.d.ts +5 -1
- package/dist/sheet.js +15 -12
- package/dist/sidebar.d.ts +2 -2
- package/dist/sidebar.js +1 -0
- package/dist/size-context-BVhHduLi.d.ts +33 -0
- package/dist/size-context.d.ts +2 -2
- package/dist/size-context.js +30 -1
- package/dist/slider.d.ts +5 -3
- package/dist/slider.js +25 -10
- package/dist/sonar.d.ts +4 -2
- package/dist/sonar.js +116 -28
- package/dist/sparkline.d.ts +1 -1
- package/dist/styles.css +1674 -252
- package/dist/switch.d.ts +2 -2
- package/dist/switch.js +20 -6
- package/dist/tabs.d.ts +1 -1
- package/dist/tag.d.ts +1 -1
- package/dist/textarea.d.ts +17 -1
- package/dist/textarea.js +23 -9
- package/dist/time-picker.d.ts +3 -3
- package/dist/time-picker.js +1 -1
- package/dist/tree-map.d.ts +1 -1
- package/dist/video-player-dialog.js +4 -3
- package/dist/waterfall-chart.d.ts +1 -1
- package/package.json +9 -1
- package/dist/button-DW5OijoR.d.ts +0 -17
- package/dist/dialog-nesting.d.ts +0 -9
- package/dist/dialog-nesting.js +0 -27
- package/dist/input-CfoEJ8A6.d.ts +0 -12
- package/dist/input-size-context-C-SFx9sx.d.ts +0 -10
- package/dist/picker-DmIiQKLJ.js +0 -45
- package/dist/size-context-BX6kAdVj.d.ts +0 -11
- package/dist/textarea-IS_D8pXf.d.ts +0 -11
package/css/theme.css
CHANGED
|
@@ -283,20 +283,23 @@
|
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
/* Drives `Sonar`.
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
286
|
+
/* Drives `Sonar`. Transform and opacity only, because they are the two
|
|
287
|
+
properties a browser can animate on the compositor: this grew the ring's
|
|
288
|
+
box-shadow spread instead until it turned out to repaint the ring and resize
|
|
289
|
+
its layer on every frame, which iOS Safari visibly stutters and flashes
|
|
290
|
+
through. The ring is now painted once at its full spread — still tracing the
|
|
291
|
+
element's own border-radius, still growing by the same number of pixels on
|
|
292
|
+
every side — and scaled back to the child's edge to start from. Per-axis,
|
|
293
|
+
like sonar-glow above, so a wide element's ring doesn't travel further
|
|
294
|
+
sideways than vertically; `sonar.tsx` measures the child and sets the two. */
|
|
292
295
|
@keyframes sonar-wave {
|
|
293
296
|
from {
|
|
294
|
-
|
|
297
|
+
transform: scale(var(--sonar-scale-x, 0.5), var(--sonar-scale-y, 0.5));
|
|
295
298
|
opacity: 0.55;
|
|
296
299
|
}
|
|
297
300
|
|
|
298
301
|
to {
|
|
299
|
-
|
|
302
|
+
transform: scale(1, 1);
|
|
300
303
|
opacity: 0;
|
|
301
304
|
}
|
|
302
305
|
}
|
package/dist/badge.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as ComponentSizeValue } from "./size-context-BVhHduLi.js";
|
|
1
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
2
3
|
import { VariantProps } from "class-variance-authority";
|
|
3
4
|
//#region src/badge.d.ts
|
|
@@ -8,6 +9,9 @@ declare const badgeVariants: (props?: ({
|
|
|
8
9
|
border?: boolean | null | undefined;
|
|
9
10
|
iconOnly?: boolean | null | undefined;
|
|
10
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
-
|
|
12
|
+
type BadgeProps = useRender.ComponentProps<"span"> & Omit<VariantProps<typeof badgeVariants>, "size"> & {
|
|
13
|
+
size?: ComponentSizeValue;
|
|
14
|
+
};
|
|
15
|
+
declare function Badge({ className, variant, size, shape, border, iconOnly, render, children, ...props }: BadgeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
12
16
|
//#endregion
|
|
13
17
|
export { Badge, badgeVariants };
|
package/dist/badge.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "./utils/cn.js";
|
|
3
|
-
import {
|
|
3
|
+
import { resolveResponsiveComponentSize, useComponentSizeValue } from "./size-context.js";
|
|
4
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
@@ -48,25 +48,39 @@ const badgeVariants = cva("group/badge inline-flex w-fit shrink-0 items-center j
|
|
|
48
48
|
border: true
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
+
const responsiveBadgeSizeClasses = {
|
|
52
|
+
md: {
|
|
53
|
+
sm: "md:min-h-7 md:min-w-7 md:gap-1 md:px-2.5 md:py-1 md:text-gdt-xs md:[&>svg]:size-3",
|
|
54
|
+
md: "md:min-h-9 md:min-w-9 md:gap-1.5 md:px-3 md:py-1.5 md:text-gdt-sm md:[&>svg]:size-3.5",
|
|
55
|
+
lg: "md:min-h-10.5 md:min-w-10.5 md:gap-2 md:px-4 md:py-2 md:text-gdt-md md:[&>svg]:size-4"
|
|
56
|
+
},
|
|
57
|
+
lg: {
|
|
58
|
+
sm: "lg:min-h-7 lg:min-w-7 lg:gap-1 lg:px-2.5 lg:py-1 lg:text-gdt-xs lg:[&>svg]:size-3",
|
|
59
|
+
md: "lg:min-h-9 lg:min-w-9 lg:gap-1.5 lg:px-3 lg:py-1.5 lg:text-gdt-sm lg:[&>svg]:size-3.5",
|
|
60
|
+
lg: "lg:min-h-10.5 lg:min-w-10.5 lg:gap-2 lg:px-4 lg:py-2 lg:text-gdt-md lg:[&>svg]:size-4"
|
|
61
|
+
}
|
|
62
|
+
};
|
|
51
63
|
function Badge({ className, variant = "default", size, shape = "round", border = false, iconOnly = false, render, children, ...props }) {
|
|
52
|
-
const
|
|
64
|
+
const sizeValue = useComponentSizeValue(size);
|
|
65
|
+
const resolvedSize = resolveResponsiveComponentSize(sizeValue);
|
|
66
|
+
const responsive = typeof sizeValue !== "string";
|
|
53
67
|
return useRender({
|
|
54
68
|
defaultTagName: "span",
|
|
55
69
|
props: mergeProps({
|
|
56
70
|
className: cn(badgeVariants({
|
|
57
71
|
variant,
|
|
58
|
-
size: resolvedSize,
|
|
72
|
+
size: resolvedSize.base,
|
|
59
73
|
shape,
|
|
60
74
|
border,
|
|
61
75
|
iconOnly
|
|
62
|
-
}), className),
|
|
76
|
+
}), responsive && responsiveBadgeSizeClasses.md[resolvedSize.md], responsive && responsiveBadgeSizeClasses.lg[resolvedSize.lg], className),
|
|
63
77
|
children
|
|
64
78
|
}, props),
|
|
65
79
|
render,
|
|
66
80
|
state: {
|
|
67
81
|
slot: "badge",
|
|
68
82
|
variant,
|
|
69
|
-
size: resolvedSize,
|
|
83
|
+
size: resolvedSize.base,
|
|
70
84
|
shape,
|
|
71
85
|
border,
|
|
72
86
|
iconOnly
|
package/dist/bar-chart.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ComponentSize } from "./size-context-
|
|
1
|
+
import { t as ComponentSize } from "./size-context-BVhHduLi.js";
|
|
2
2
|
import { ChartConfig } from "./chart.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Bar, BarChart as BarChart$1, CartesianGrid, XAxis, YAxis } from "recharts";
|
package/dist/bullet-chart.d.ts
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { a as ResponsiveValue } from "./size-context-BVhHduLi.js";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import { Button } from "@base-ui/react/button";
|
|
5
|
+
//#region src/button.d.ts
|
|
6
|
+
declare const buttonSizeVariants: {
|
|
7
|
+
readonly sm: "h-8 min-w-8 gap-2 px-3.5 text-gdt-xs [&_svg:not([class*='size-'])]:size-4";
|
|
8
|
+
readonly md: "h-10 min-w-10 gap-2 px-4.5 text-gdt-sm [&_svg:not([class*='size-'])]:size-4.5";
|
|
9
|
+
readonly lg: "h-12 min-w-12 gap-2.5 px-5.5 text-gdt-md [&_svg:not([class*='size-'])]:size-6";
|
|
10
|
+
readonly xl: "h-14 min-w-14 gap-3 px-6.5 text-gdt-lg [&_svg:not([class*='size-'])]:size-6";
|
|
11
|
+
readonly icon: "size-10";
|
|
12
|
+
readonly "icon-xs": "size-6 text-gdt-xs [&_svg:not([class*='size-'])]:size-3";
|
|
13
|
+
readonly "icon-sm": "size-8 text-gdt-sm [&_svg:not([class*='size-'])]:size-3.5";
|
|
14
|
+
readonly "icon-lg": "size-12.5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5";
|
|
15
|
+
readonly "icon-xl": "size-14 text-gdt-lg [&_svg:not([class*='size-'])]:size-5";
|
|
16
|
+
};
|
|
17
|
+
declare const buttonVariants: (props?: ({
|
|
18
|
+
variant?: "back" | "danger" | "ghost" | "glass-overlay" | "link-brand" | "link-neutral" | "primary" | "primary-outline" | "secondary" | "secondary-outline" | "tertiary" | "tertiary-outline" | "whatsapp" | null | undefined;
|
|
19
|
+
size?: "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
20
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
|
+
type ButtonSize = keyof typeof buttonSizeVariants;
|
|
22
|
+
type ResponsiveButtonSize = ButtonSize | ResponsiveValue<ButtonSize>;
|
|
23
|
+
declare function Button$1({ className, variant, size, isLoading, children, disabled, ...props }: Button.Props & Omit<VariantProps<typeof buttonVariants>, "size"> & {
|
|
24
|
+
isLoading?: boolean;
|
|
25
|
+
size?: ResponsiveButtonSize;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
type ButtonLinkProps = useRender.ComponentProps<"a"> & Omit<VariantProps<typeof buttonVariants>, "size"> & {
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
size?: ResponsiveButtonSize;
|
|
30
|
+
};
|
|
31
|
+
declare function ButtonLink({ className, render, variant, size, disabled, onClick, children, ...props }: ButtonLinkProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { ButtonLink as n, buttonVariants as r, Button$1 as t };
|
package/dist/button-group.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ComponentSize } from "./size-context-
|
|
1
|
+
import { t as ComponentSize } from "./size-context-BVhHduLi.js";
|
|
2
2
|
import { Separator } from "./separator.js";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
package/dist/button.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ButtonLink, r as buttonVariants, t as Button } from "./button-
|
|
1
|
+
import { n as ButtonLink, r as buttonVariants, t as Button } from "./button-BS5KCibF.js";
|
|
2
2
|
export { Button, ButtonLink, buttonVariants };
|
package/dist/button.js
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Loader } from "./icons.js";
|
|
3
3
|
import { cn } from "./utils/cn.js";
|
|
4
|
-
import {
|
|
4
|
+
import { responsiveValueClasses, useComponentSizeValue } from "./size-context.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
7
7
|
import { useRender } from "@base-ui/react/use-render";
|
|
8
8
|
import { cva } from "class-variance-authority";
|
|
9
9
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
10
10
|
//#region src/button.tsx
|
|
11
|
+
const buttonSizeVariants = {
|
|
12
|
+
sm: "h-8 min-w-8 gap-2 px-3.5 text-gdt-xs [&_svg:not([class*='size-'])]:size-4",
|
|
13
|
+
md: "h-10 min-w-10 gap-2 px-4.5 text-gdt-sm [&_svg:not([class*='size-'])]:size-4.5",
|
|
14
|
+
lg: "h-12 min-w-12 gap-2.5 px-5.5 text-gdt-md [&_svg:not([class*='size-'])]:size-6",
|
|
15
|
+
xl: "h-14 min-w-14 gap-3 px-6.5 text-gdt-lg [&_svg:not([class*='size-'])]:size-6",
|
|
16
|
+
icon: "size-10",
|
|
17
|
+
"icon-xs": "size-6 text-gdt-xs [&_svg:not([class*='size-'])]:size-3",
|
|
18
|
+
"icon-sm": "size-8 text-gdt-sm [&_svg:not([class*='size-'])]:size-3.5",
|
|
19
|
+
"icon-lg": "size-12.5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5",
|
|
20
|
+
"icon-xl": "size-14 text-gdt-lg [&_svg:not([class*='size-'])]:size-5"
|
|
21
|
+
};
|
|
11
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", {
|
|
12
23
|
variants: {
|
|
13
24
|
variant: {
|
|
@@ -25,17 +36,7 @@ const buttonVariants = cva("group/button inline-flex shrink-0 items-center justi
|
|
|
25
36
|
"link-brand": "border-transparent bg-transparent text-fg-brand hover:underline active:underline active:opacity-70",
|
|
26
37
|
"link-neutral": "border-transparent bg-transparent text-fg-secondary hover:underline active:underline active:opacity-70"
|
|
27
38
|
},
|
|
28
|
-
size:
|
|
29
|
-
sm: "h-8 min-w-8 gap-2 px-3.5 text-gdt-xs [&_svg:not([class*='size-'])]:size-4",
|
|
30
|
-
md: "h-10 min-w-10 gap-2 px-4.5 text-gdt-sm [&_svg:not([class*='size-'])]:size-4.5",
|
|
31
|
-
lg: "h-12 min-w-12 gap-2.5 px-5.5 text-gdt-md [&_svg:not([class*='size-'])]:size-6",
|
|
32
|
-
xl: "h-14 min-w-14 gap-3 px-6.5 text-gdt-lg [&_svg:not([class*='size-'])]:size-6",
|
|
33
|
-
icon: "size-10",
|
|
34
|
-
"icon-xs": "size-6 text-gdt-xs [&_svg:not([class*='size-'])]:size-3",
|
|
35
|
-
"icon-sm": "size-8 text-gdt-sm [&_svg:not([class*='size-'])]:size-3.5",
|
|
36
|
-
"icon-lg": "size-12.5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5",
|
|
37
|
-
"icon-xl": "size-14 text-gdt-lg [&_svg:not([class*='size-'])]:size-5"
|
|
38
|
-
}
|
|
39
|
+
size: buttonSizeVariants
|
|
39
40
|
},
|
|
40
41
|
compoundVariants: [{
|
|
41
42
|
variant: ["link-brand", "link-neutral"],
|
|
@@ -46,17 +47,44 @@ const buttonVariants = cva("group/button inline-flex shrink-0 items-center justi
|
|
|
46
47
|
size: "md"
|
|
47
48
|
}
|
|
48
49
|
});
|
|
50
|
+
const responsiveButtonSizeClasses = {
|
|
51
|
+
base: { ...buttonSizeVariants },
|
|
52
|
+
md: {
|
|
53
|
+
sm: "md:h-8 md:min-w-8 md:gap-2 md:px-3.5 md:text-gdt-xs md:[&_svg:not([class*='size-'])]:size-4",
|
|
54
|
+
md: "md:h-10 md:min-w-10 md:gap-2 md:px-4.5 md:text-gdt-sm md:[&_svg:not([class*='size-'])]:size-4.5",
|
|
55
|
+
lg: "md:h-12 md:min-w-12 md:gap-2.5 md:px-5.5 md:text-gdt-md md:[&_svg:not([class*='size-'])]:size-6",
|
|
56
|
+
xl: "md:h-14 md:min-w-14 md:gap-3 md:px-6.5 md:text-gdt-lg md:[&_svg:not([class*='size-'])]:size-6",
|
|
57
|
+
icon: "md:size-10",
|
|
58
|
+
"icon-xs": "md:size-6 md:text-gdt-xs md:[&_svg:not([class*='size-'])]:size-3",
|
|
59
|
+
"icon-sm": "md:size-8 md:text-gdt-sm md:[&_svg:not([class*='size-'])]:size-3.5",
|
|
60
|
+
"icon-lg": "md:size-12.5 md:text-gdt-md md:[&_svg:not([class*='size-'])]:size-4.5",
|
|
61
|
+
"icon-xl": "md:size-14 md:text-gdt-lg md:[&_svg:not([class*='size-'])]:size-5"
|
|
62
|
+
},
|
|
63
|
+
lg: {
|
|
64
|
+
sm: "lg:h-8 lg:min-w-8 lg:gap-2 lg:px-3.5 lg:text-gdt-xs lg:[&_svg:not([class*='size-'])]:size-4",
|
|
65
|
+
md: "lg:h-10 lg:min-w-10 lg:gap-2 lg:px-4.5 lg:text-gdt-sm lg:[&_svg:not([class*='size-'])]:size-4.5",
|
|
66
|
+
lg: "lg:h-12 lg:min-w-12 lg:gap-2.5 lg:px-5.5 lg:text-gdt-md lg:[&_svg:not([class*='size-'])]:size-6",
|
|
67
|
+
xl: "lg:h-14 lg:min-w-14 lg:gap-3 lg:px-6.5 lg:text-gdt-lg lg:[&_svg:not([class*='size-'])]:size-6",
|
|
68
|
+
icon: "lg:size-10",
|
|
69
|
+
"icon-xs": "lg:size-6 lg:text-gdt-xs lg:[&_svg:not([class*='size-'])]:size-3",
|
|
70
|
+
"icon-sm": "lg:size-8 lg:text-gdt-sm lg:[&_svg:not([class*='size-'])]:size-3.5",
|
|
71
|
+
"icon-lg": "lg:size-12.5 lg:text-gdt-md lg:[&_svg:not([class*='size-'])]:size-4.5",
|
|
72
|
+
"icon-xl": "lg:size-14 lg:text-gdt-lg lg:[&_svg:not([class*='size-'])]:size-5"
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
function useResolvedButtonSize(size) {
|
|
76
|
+
const inherited = useComponentSizeValue();
|
|
77
|
+
return responsiveValueClasses(size ?? inherited, responsiveButtonSizeClasses);
|
|
78
|
+
}
|
|
49
79
|
function Button({ className, variant = "primary", size, isLoading = false, children, disabled = false, ...props }) {
|
|
50
|
-
const
|
|
51
|
-
const resolvedSize = size ?? inheritedSize;
|
|
80
|
+
const resolvedSize = useResolvedButtonSize(size);
|
|
52
81
|
const _disabled = disabled || isLoading;
|
|
53
82
|
return /* @__PURE__ */ jsxs(Button$1, {
|
|
54
83
|
"data-slot": "button",
|
|
55
84
|
className: cn(buttonVariants({
|
|
56
85
|
variant,
|
|
57
|
-
size:
|
|
58
|
-
|
|
59
|
-
})),
|
|
86
|
+
size: null
|
|
87
|
+
}), resolvedSize.className, className),
|
|
60
88
|
disabled: _disabled,
|
|
61
89
|
...props,
|
|
62
90
|
children: [
|
|
@@ -67,15 +95,15 @@ function Button({ className, variant = "primary", size, isLoading = false, child
|
|
|
67
95
|
});
|
|
68
96
|
}
|
|
69
97
|
function ButtonLink({ className, render, variant = "primary", size, disabled = false, onClick, children, ...props }) {
|
|
70
|
-
const
|
|
98
|
+
const resolvedSize = useResolvedButtonSize(size);
|
|
99
|
+
const isLinkVariant = variant === "link-brand" || variant === "link-neutral";
|
|
71
100
|
return useRender({
|
|
72
101
|
defaultTagName: "a",
|
|
73
102
|
props: mergeProps({
|
|
74
103
|
className: cn(buttonVariants({
|
|
75
104
|
variant,
|
|
76
|
-
size:
|
|
77
|
-
|
|
78
|
-
})),
|
|
105
|
+
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),
|
|
79
107
|
children
|
|
80
108
|
}, {
|
|
81
109
|
...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 {
|
|
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";
|
|
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";
|
package/dist/carousel.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ComponentSize } from "./size-context-
|
|
1
|
+
import { t as ComponentSize } from "./size-context-BVhHduLi.js";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import useEmblaCarousel, { UseEmblaCarouselType } from "embla-carousel-react";
|
|
@@ -44,9 +44,11 @@ type CarouselIndicatorProps = Omit<React.ComponentProps<"div">, "children" | "on
|
|
|
44
44
|
selected?: number;
|
|
45
45
|
/** Override the inherited carousel size. */
|
|
46
46
|
size?: ComponentSize;
|
|
47
|
+
/** Maximum dots visible before the indicator becomes a sliding window. */
|
|
48
|
+
maxVisible?: number;
|
|
47
49
|
/** Jump to a slide when a dot is activated. Defaults to the carousel API. */
|
|
48
50
|
onSelect?: (index: number) => void;
|
|
49
51
|
};
|
|
50
|
-
declare function CarouselIndicator({ className, count: countProp, selected: selectedProp, size: sizeProp, onSelect, ...props }: CarouselIndicatorProps): React.JSX.Element | null;
|
|
52
|
+
declare function CarouselIndicator({ className, count: countProp, selected: selectedProp, size: sizeProp, maxVisible, onSelect, ...props }: CarouselIndicatorProps): React.JSX.Element | null;
|
|
51
53
|
//#endregion
|
|
52
54
|
export { Carousel, type CarouselApi, CarouselContent, CarouselIndicator, CarouselItem, CarouselNext, CarouselPrevious, useCarousel };
|
package/dist/carousel.js
CHANGED
|
@@ -225,20 +225,16 @@ function CarouselNext({ className, ...props }) {
|
|
|
225
225
|
})]
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
|
-
/**
|
|
229
|
-
* Past this many items the indicator switches from "show every dot" to the
|
|
230
|
-
* Airbnb-style windowed mode: at most `MANY_WINDOW` dots, the active one kept
|
|
231
|
-
* near the centre, and dots at a clipped edge faded down to imply more beyond.
|
|
232
|
-
*/
|
|
233
|
-
const MANY_THRESHOLD = 5;
|
|
228
|
+
/** Default visible-dot limit before the indicator becomes a sliding window. */
|
|
234
229
|
const MANY_WINDOW = 5;
|
|
235
230
|
/**
|
|
236
231
|
* Returns the dots to render plus the window start, so the determinate and
|
|
237
232
|
* windowed ("many") cases share one render path. The dot strip is always the
|
|
238
233
|
* full list; `start` drives the translate that slides it under the viewport.
|
|
239
234
|
*/
|
|
240
|
-
function getIndicatorWindow(count, selected) {
|
|
241
|
-
|
|
235
|
+
function getIndicatorWindow(count, selected, maxVisible) {
|
|
236
|
+
const visibleLimit = Number.isFinite(maxVisible) ? Math.max(1, Math.floor(maxVisible)) : MANY_WINDOW;
|
|
237
|
+
if (count <= visibleLimit) return {
|
|
242
238
|
dots: Array.from({ length: count }, (_, index) => ({
|
|
243
239
|
index,
|
|
244
240
|
faded: false
|
|
@@ -246,8 +242,9 @@ function getIndicatorWindow(count, selected) {
|
|
|
246
242
|
start: 0,
|
|
247
243
|
visible: count
|
|
248
244
|
};
|
|
249
|
-
const
|
|
250
|
-
const
|
|
245
|
+
const half = Math.floor(visibleLimit / 2);
|
|
246
|
+
const start = Math.max(0, Math.min(selected - half, count - visibleLimit));
|
|
247
|
+
const end = start + visibleLimit - 1;
|
|
251
248
|
const overflowLeft = start > 0;
|
|
252
249
|
const overflowRight = end < count - 1;
|
|
253
250
|
return {
|
|
@@ -256,7 +253,7 @@ function getIndicatorWindow(count, selected) {
|
|
|
256
253
|
faded: overflowLeft && index === start || overflowRight && index === end
|
|
257
254
|
})),
|
|
258
255
|
start,
|
|
259
|
-
visible:
|
|
256
|
+
visible: visibleLimit
|
|
260
257
|
};
|
|
261
258
|
}
|
|
262
259
|
/** Dot diameter, gap, and pill padding per size — in px to keep them crisp. */
|
|
@@ -286,7 +283,7 @@ const INDICATOR_OFFSET = {
|
|
|
286
283
|
md: "bottom-[18px]",
|
|
287
284
|
lg: "bottom-6"
|
|
288
285
|
};
|
|
289
|
-
function CarouselIndicator({ className, count: countProp, selected: selectedProp, size: sizeProp, onSelect, ...props }) {
|
|
286
|
+
function CarouselIndicator({ className, count: countProp, selected: selectedProp, size: sizeProp, maxVisible = MANY_WINDOW, onSelect, ...props }) {
|
|
290
287
|
const ctx = React.useContext(CarouselContext);
|
|
291
288
|
const inheritedSize = useComponentSize(sizeProp);
|
|
292
289
|
const reducedMotion = useReducedMotion();
|
|
@@ -296,7 +293,7 @@ function CarouselIndicator({ className, count: countProp, selected: selectedProp
|
|
|
296
293
|
const handleSelect = onSelect ?? ctx?.scrollTo;
|
|
297
294
|
if (count <= 1) return null;
|
|
298
295
|
const { dot, gap, padX, padY } = INDICATOR_SIZES[size];
|
|
299
|
-
const { dots, start, visible } = getIndicatorWindow(count, selected);
|
|
296
|
+
const { dots, start, visible } = getIndicatorWindow(count, selected, maxVisible);
|
|
300
297
|
const step = dot + gap;
|
|
301
298
|
const viewportWidth = visible * step - gap;
|
|
302
299
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -327,7 +324,7 @@ function CarouselIndicator({ className, count: countProp, selected: selectedProp
|
|
|
327
324
|
style: {
|
|
328
325
|
width: dot,
|
|
329
326
|
height: dot,
|
|
330
|
-
opacity:
|
|
327
|
+
opacity: isActive ? 1 : faded ? .3 : .55,
|
|
331
328
|
transform: !reducedMotion && faded ? "scale(0.6)" : "scale(1)"
|
|
332
329
|
}
|
|
333
330
|
}, index);
|
package/dist/chart.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ComponentSize } from "./size-context-
|
|
1
|
+
import { t as ComponentSize } from "./size-context-BVhHduLi.js";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import * as RechartsPrimitive from "recharts";
|
package/dist/chat.d.ts
CHANGED
package/dist/checkbox.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as ComponentSizeValue } from "./size-context-BVhHduLi.js";
|
|
2
2
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
3
3
|
import { CheckboxGroup } from "@base-ui/react/checkbox-group";
|
|
4
4
|
//#region src/checkbox.d.ts
|
|
5
5
|
declare const checkboxVariants: (props?: ({
|
|
6
6
|
size?: "lg" | "md" | "sm" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
-
type CheckboxSize =
|
|
8
|
+
type CheckboxSize = ComponentSizeValue;
|
|
9
9
|
type CheckboxProps = Checkbox$1.Root.Props & {
|
|
10
10
|
size?: CheckboxSize;
|
|
11
11
|
};
|
package/dist/checkbox.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Check } from "./icons.js";
|
|
3
3
|
import { cn } from "./utils/cn.js";
|
|
4
|
-
import {
|
|
4
|
+
import { responsiveValueClasses, useComponentSizeValue } from "./size-context.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
8
8
|
import { CheckboxGroup } from "@base-ui/react/checkbox-group";
|
|
9
9
|
//#region src/checkbox.tsx
|
|
10
|
-
const
|
|
10
|
+
const checkboxSizeVariants = {
|
|
11
11
|
sm: "size-4 [--checkbox-icon-size:0.625rem]",
|
|
12
12
|
md: "size-5 [--checkbox-icon-size:0.75rem]",
|
|
13
13
|
lg: "size-6 [--checkbox-icon-size:0.875rem]"
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
|
+
const checkboxVariants = cva("peer group/checkbox relative flex shrink-0 items-center justify-center rounded-sm border bg-canvas text-transparent outline-none transition-[background-color,border-color,box-shadow,color,scale] duration-[var(--duration-motion-press)] ease-gdt-out active:scale-[0.97] motion-reduce:active:scale-100 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-line-focus focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)] 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)] border-line data-unchecked:hover:border-line-focus data-unchecked:hover:bg-surface-brand-subtle data-checked:border-action-primary data-checked:bg-action-primary data-checked:text-fg-on-brand data-disabled:cursor-not-allowed data-disabled:border-line-subtle data-disabled:bg-surface data-disabled:text-fg-caption-placeholder data-disabled:active:scale-100", { variants: { size: checkboxSizeVariants } });
|
|
15
16
|
/**
|
|
16
17
|
* Compose with the shared field primitives for label and helper text.
|
|
17
18
|
*
|
|
@@ -70,11 +71,11 @@ const checkboxVariants = cva("peer group/checkbox relative flex shrink-0 items-c
|
|
|
70
71
|
* ```
|
|
71
72
|
*/
|
|
72
73
|
function Checkbox({ className, size, ...props }) {
|
|
73
|
-
const resolvedSize =
|
|
74
|
+
const resolvedSize = responsiveValueClasses(useComponentSizeValue(size), responsiveCheckboxSizes);
|
|
74
75
|
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
75
76
|
"data-slot": "checkbox",
|
|
76
|
-
"data-size": resolvedSize,
|
|
77
|
-
className: cn(checkboxVariants({ size:
|
|
77
|
+
"data-size": resolvedSize.base,
|
|
78
|
+
className: cn(checkboxVariants({ size: null }), resolvedSize.className, className),
|
|
78
79
|
...props,
|
|
79
80
|
children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
|
|
80
81
|
"data-slot": "checkbox-indicator",
|
|
@@ -83,5 +84,18 @@ function Checkbox({ className, size, ...props }) {
|
|
|
83
84
|
})
|
|
84
85
|
});
|
|
85
86
|
}
|
|
87
|
+
const responsiveCheckboxSizes = {
|
|
88
|
+
base: checkboxSizeVariants,
|
|
89
|
+
md: {
|
|
90
|
+
sm: "md:size-4 md:[--checkbox-icon-size:0.625rem]",
|
|
91
|
+
md: "md:size-5 md:[--checkbox-icon-size:0.75rem]",
|
|
92
|
+
lg: "md:size-6 md:[--checkbox-icon-size:0.875rem]"
|
|
93
|
+
},
|
|
94
|
+
lg: {
|
|
95
|
+
sm: "lg:size-4 lg:[--checkbox-icon-size:0.625rem]",
|
|
96
|
+
md: "lg:size-5 lg:[--checkbox-icon-size:0.75rem]",
|
|
97
|
+
lg: "lg:size-6 lg:[--checkbox-icon-size:0.875rem]"
|
|
98
|
+
}
|
|
99
|
+
};
|
|
86
100
|
//#endregion
|
|
87
101
|
export { Checkbox, CheckboxGroup, checkboxVariants };
|
|
@@ -107,12 +107,30 @@ const comboboxPopupInputVariants = cva("w-auto", {
|
|
|
107
107
|
});
|
|
108
108
|
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", {
|
|
109
109
|
variants: { size: {
|
|
110
|
-
sm: "rounded-lg
|
|
111
|
-
md: "rounded-xl
|
|
112
|
-
lg: "rounded-[18px]
|
|
110
|
+
sm: "rounded-lg",
|
|
111
|
+
md: "rounded-xl",
|
|
112
|
+
lg: "rounded-[18px]"
|
|
113
113
|
} },
|
|
114
114
|
defaultVariants: { size: "md" }
|
|
115
115
|
});
|
|
116
|
+
const comboboxContentBodyVariants = cva("flex min-h-0 flex-1 flex-col overflow-hidden", {
|
|
117
|
+
variants: { size: {
|
|
118
|
+
sm: "p-1",
|
|
119
|
+
md: "p-1.5",
|
|
120
|
+
lg: "p-2"
|
|
121
|
+
} },
|
|
122
|
+
defaultVariants: { size: "md" }
|
|
123
|
+
});
|
|
124
|
+
const comboboxEdgeSizes = {
|
|
125
|
+
sm: "px-4",
|
|
126
|
+
md: "px-5.5",
|
|
127
|
+
lg: "px-6"
|
|
128
|
+
};
|
|
129
|
+
const comboboxLabelSizes = {
|
|
130
|
+
sm: "px-3",
|
|
131
|
+
md: "px-4",
|
|
132
|
+
lg: "px-4"
|
|
133
|
+
};
|
|
116
134
|
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", {
|
|
117
135
|
variants: { size: {
|
|
118
136
|
sm: "gap-1.5 rounded-md px-3 py-1.5 text-gdt-xs",
|
|
@@ -201,7 +219,7 @@ function ComboboxInput({ className, children, disabled = false, showTrigger = tr
|
|
|
201
219
|
children: contents
|
|
202
220
|
});
|
|
203
221
|
}
|
|
204
|
-
function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, children, ...props }) {
|
|
222
|
+
function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, children, header, footer, ...props }) {
|
|
205
223
|
const resolvedSize = useComponentSize();
|
|
206
224
|
return /* @__PURE__ */ jsx(Combobox.Portal, { children: /* @__PURE__ */ jsx(Combobox.Positioner, {
|
|
207
225
|
side,
|
|
@@ -213,19 +231,45 @@ function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "
|
|
|
213
231
|
children: /* @__PURE__ */ jsx(Combobox.Popup, {
|
|
214
232
|
"data-slot": "combobox-content",
|
|
215
233
|
"data-chips": !!anchor,
|
|
216
|
-
className: cn("group/combobox-content", comboboxContentVariants({ size: resolvedSize }), "has-data-[slot=combobox-virtualized]:max-h-none", className),
|
|
234
|
+
className: cn("group/combobox-content flex flex-col", comboboxContentVariants({ size: resolvedSize }), "has-data-[slot=combobox-virtualized]:max-h-none", className),
|
|
217
235
|
...props,
|
|
218
|
-
children: /* @__PURE__ */
|
|
236
|
+
children: /* @__PURE__ */ jsxs(ComboboxPopupContext.Provider, {
|
|
219
237
|
value: true,
|
|
220
|
-
children
|
|
238
|
+
children: [
|
|
239
|
+
header,
|
|
240
|
+
/* @__PURE__ */ jsx("div", {
|
|
241
|
+
"data-slot": "combobox-content-body",
|
|
242
|
+
className: comboboxContentBodyVariants({ size: resolvedSize }),
|
|
243
|
+
children
|
|
244
|
+
}),
|
|
245
|
+
footer
|
|
246
|
+
]
|
|
221
247
|
})
|
|
222
248
|
})
|
|
223
249
|
}) });
|
|
224
250
|
}
|
|
251
|
+
function ComboboxHeader({ className, type = "button", ...props }) {
|
|
252
|
+
const resolvedSize = useComponentSize();
|
|
253
|
+
return /* @__PURE__ */ jsx("button", {
|
|
254
|
+
type,
|
|
255
|
+
"data-slot": "combobox-header",
|
|
256
|
+
className: cn("relative z-20 flex min-h-9 w-full shrink-0 cursor-pointer items-center gap-2 rounded-none rounded-t-[inherit] border-line-subtle border-b bg-canvas py-2 text-left text-gdt-sm font-bold text-fg-brand outline-none transition-colors hover:bg-surface-brand-subtle focus-visible:bg-surface-brand-subtle focus-visible:inset-ring-2 focus-visible:inset-ring-line-focus active:bg-surface-brand-subtle disabled:pointer-events-none disabled:text-fg-caption-placeholder", "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", comboboxEdgeSizes[resolvedSize], className),
|
|
257
|
+
...props
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
function ComboboxFooter({ className, type = "button", ...props }) {
|
|
261
|
+
const resolvedSize = useComponentSize();
|
|
262
|
+
return /* @__PURE__ */ jsx("button", {
|
|
263
|
+
type,
|
|
264
|
+
"data-slot": "combobox-footer",
|
|
265
|
+
className: cn("relative z-20 flex min-h-9 w-full shrink-0 cursor-pointer items-center gap-2 rounded-none rounded-b-[inherit] border-line-subtle border-t bg-canvas py-2 text-left text-gdt-sm font-semibold text-fg-secondary outline-none transition-colors hover:bg-surface focus-visible:bg-surface focus-visible:inset-ring-2 focus-visible:inset-ring-line-focus active:bg-surface-raised disabled:pointer-events-none disabled:text-fg-caption-placeholder", "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", comboboxEdgeSizes[resolvedSize], className),
|
|
266
|
+
...props
|
|
267
|
+
});
|
|
268
|
+
}
|
|
225
269
|
function ComboboxList({ className, ...props }) {
|
|
226
270
|
return /* @__PURE__ */ jsx(Combobox.List, {
|
|
227
271
|
"data-slot": "combobox-list",
|
|
228
|
-
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),
|
|
272
|
+
className: cn("no-scrollbar min-h-0 max-h-(--available-height) flex-1 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),
|
|
229
273
|
...props
|
|
230
274
|
});
|
|
231
275
|
}
|
|
@@ -254,9 +298,10 @@ function ComboboxGroup({ className, ...props }) {
|
|
|
254
298
|
});
|
|
255
299
|
}
|
|
256
300
|
function ComboboxLabel({ className, ...props }) {
|
|
301
|
+
const resolvedSize = useComponentSize();
|
|
257
302
|
return /* @__PURE__ */ jsx(Combobox.GroupLabel, {
|
|
258
303
|
"data-slot": "combobox-label",
|
|
259
|
-
className: cn("
|
|
304
|
+
className: cn("py-1 text-gdt-xs text-fg-secondary", comboboxLabelSizes[resolvedSize], className),
|
|
260
305
|
...props
|
|
261
306
|
});
|
|
262
307
|
}
|
|
@@ -395,4 +440,4 @@ function ComboboxVirtualizedList({ virtualizerRef, estimateSize = 40, overscan =
|
|
|
395
440
|
});
|
|
396
441
|
}
|
|
397
442
|
//#endregion
|
|
398
|
-
export {
|
|
443
|
+
export { ComboboxValue as _, ComboboxCollection as a, useComboboxVirtualizer as b, ComboboxFooter as c, ComboboxInput as d, ComboboxItem as f, ComboboxTrigger as g, ComboboxSeparator as h, ComboboxChipsInput as i, ComboboxGroup as l, ComboboxList as m, ComboboxChip as n, ComboboxContent as o, ComboboxLabel as p, ComboboxChips as r, ComboboxEmpty as s, Combobox$1 as t, ComboboxHeader as u, ComboboxVirtualizedList as v, useComboboxAnchor as y };
|
package/dist/combobox.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ComponentSize } from "./size-context-
|
|
1
|
+
import { t as ComponentSize } 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";
|
|
@@ -13,7 +13,12 @@ declare function ComboboxInput({ className, children, disabled, showTrigger, sho
|
|
|
13
13
|
showTrigger?: boolean;
|
|
14
14
|
showClear?: boolean;
|
|
15
15
|
}): React.JSX.Element;
|
|
16
|
-
declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, anchor, children, ...props }: Combobox$1.Popup.Props & Pick<Combobox$1.Positioner.Props, "side" | "align" | "sideOffset" | "alignOffset" | "anchor">
|
|
16
|
+
declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, anchor, children, header, footer, ...props }: Combobox$1.Popup.Props & Pick<Combobox$1.Positioner.Props, "side" | "align" | "sideOffset" | "alignOffset" | "anchor"> & {
|
|
17
|
+
header?: React.ReactNode;
|
|
18
|
+
footer?: React.ReactNode;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
declare function ComboboxHeader({ className, type, ...props }: React.ComponentProps<"button">): React.JSX.Element;
|
|
21
|
+
declare function ComboboxFooter({ className, type, ...props }: React.ComponentProps<"button">): React.JSX.Element;
|
|
17
22
|
declare function ComboboxList({ className, ...props }: Combobox$1.List.Props): React.JSX.Element;
|
|
18
23
|
declare function ComboboxItem({ className, children, ...props }: Combobox$1.Item.Props): React.JSX.Element;
|
|
19
24
|
declare function ComboboxGroup({ className, ...props }: Combobox$1.Group.Props): React.JSX.Element;
|
|
@@ -74,4 +79,4 @@ declare function ComboboxVirtualizedList<Item>({ virtualizerRef, estimateSize, o
|
|
|
74
79
|
children: (item: Item, props: ComboboxVirtualItemProps) => React.ReactNode;
|
|
75
80
|
}): React.JSX.Element | null;
|
|
76
81
|
//#endregion
|
|
77
|
-
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, type ComboboxSize, ComboboxTrigger, ComboboxValue, type ComboboxVirtualItemProps, ComboboxVirtualizedList, type ComboboxVirtualizer, useComboboxAnchor, useComboboxVirtualizer };
|
|
82
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxFooter, ComboboxGroup, ComboboxHeader, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, type ComboboxSize, ComboboxTrigger, ComboboxValue, type ComboboxVirtualItemProps, ComboboxVirtualizedList, type ComboboxVirtualizer, useComboboxAnchor, useComboboxVirtualizer };
|
package/dist/combobox.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { _ as
|
|
3
|
-
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, ComboboxVirtualizedList, useComboboxAnchor, useComboboxVirtualizer };
|
|
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";
|
|
3
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxFooter, ComboboxGroup, ComboboxHeader, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, ComboboxVirtualizedList, useComboboxAnchor, useComboboxVirtualizer };
|
package/dist/cta.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ButtonLink, t as Button } from "./button-
|
|
1
|
+
import { n as ButtonLink, t as Button } from "./button-BS5KCibF.js";
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import * as React from "react";
|