@giddaa-housing/ui 3.4.0 → 3.6.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/dist/accordion.js +1 -1
- package/dist/activity-timeline.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/auth-layout.js +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +5 -1
- package/dist/badge.js +20 -6
- package/dist/bar-chart.d.ts +1 -1
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/bullet-chart.d.ts +1 -1
- package/dist/bullet-chart.js +1 -1
- package/dist/button-BS5KCibF.d.ts +33 -0
- package/dist/button-group.d.ts +1 -1
- package/dist/button-group.js +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/button.js +50 -22
- package/dist/calendar.js +2 -2
- package/dist/call-card.js +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.d.ts +4 -2
- package/dist/carousel.js +13 -16
- package/dist/chart.d.ts +1 -1
- package/dist/chart.js +1 -1
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +1 -1
- package/dist/checkbox.d.ts +2 -2
- package/dist/checkbox.js +21 -7
- package/dist/collapsible.js +1 -1
- package/dist/combobox-CACVdp1R.js +430 -0
- package/dist/combobox.d.ts +9 -4
- package/dist/combobox.js +2 -309
- package/dist/cta.d.ts +1 -1
- package/dist/cta.js +1 -1
- package/dist/currency-selector.js +2 -2
- package/dist/data-table.d.ts +2 -2
- package/dist/data-table.js +1 -1
- package/dist/date-picker.d.ts +6 -5
- package/dist/date-picker.js +7 -17
- package/dist/details-card.js +1 -1
- package/dist/dialog.d.ts +3 -1
- package/dist/dialog.js +10 -6
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/dropzone.js +1 -1
- package/dist/editorial-card.js +2 -4
- package/dist/empty-state.js +1 -1
- package/dist/field.d.ts +4 -1
- package/dist/field.js +29 -12
- package/dist/file-upload.js +1 -1
- package/dist/filter.js +1 -1
- package/dist/footer.d.ts +2 -2
- package/dist/footer.js +1 -1
- package/dist/funnel-chart.d.ts +1 -1
- package/dist/funnel-chart.js +1 -1
- package/dist/gallery-indicator.js +1 -1
- package/dist/heatmap-chart.d.ts +1 -1
- package/dist/icons-C9JXR5Xv.d.ts +111 -0
- package/dist/icons.d.ts +2 -93
- package/dist/icons.js +37 -1
- package/dist/image.d.ts +59 -0
- package/dist/image.js +53 -0
- package/dist/infinite-scroll.js +3 -29
- package/dist/infotip.js +1 -1
- package/dist/input-group.d.ts +6 -6
- package/dist/input-group.js +39 -14
- package/dist/input-otp.d.ts +2 -2
- package/dist/input-otp.js +32 -15
- 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 +31 -12
- package/dist/item.js +1 -1
- package/dist/kpi-card.js +1 -1
- package/dist/label.js +1 -1
- package/dist/line-chart.d.ts +1 -1
- package/dist/line-chart.js +1 -1
- package/dist/list-item.js +1 -1
- package/dist/map-indicator.js +1 -1
- package/dist/mask-input.d.ts +1 -1
- package/dist/match.d.ts +5 -2
- package/dist/match.js +183 -27
- package/dist/media-gallery-hero.js +15 -10
- package/dist/media-player.js +5 -13
- package/dist/message.js +2 -12
- package/dist/mobile-sidebar.js +2 -1
- package/dist/multi-step-form.js +2 -2
- package/dist/number-input.d.ts +2 -2
- package/dist/number-input.js +3 -3
- package/dist/page-header.js +1 -1
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +1 -1
- package/dist/password-input.js +1 -1
- package/dist/phone-input.d.ts +2 -2
- package/dist/phone-input.js +16 -21
- package/dist/photo-gallery.js +6 -3
- package/dist/picker-BTXBrsl4.js +62 -0
- package/dist/picker-j3txxA5t.d.ts +14 -0
- package/dist/pie-chart.d.ts +1 -1
- package/dist/pie-chart.js +1 -1
- package/dist/popover-CNymD33m.d.ts +20 -0
- package/dist/popover.d.ts +1 -19
- package/dist/popover.js +1 -1
- package/dist/price-tag.d.ts +1 -1
- package/dist/price-tag.js +50 -22
- package/dist/progress.js +1 -1
- package/dist/property-listing-card.d.ts +68 -2
- package/dist/property-listing-card.js +115 -29
- package/dist/purchase-option-card.js +1 -1
- package/dist/radar-chart.d.ts +1 -1
- package/dist/radar-chart.js +1 -1
- package/dist/radio-group.d.ts +2 -2
- package/dist/radio-group.js +24 -10
- package/dist/review-block.js +1 -1
- package/dist/rich-text-editor.d.ts +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/scatter-chart.d.ts +1 -1
- package/dist/scatter-chart.js +1 -1
- package/dist/scroll-spy.d.ts +8 -2
- package/dist/scroll-spy.js +16 -16
- package/dist/search-input.js +1 -1
- 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 +113 -20
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +3 -1
- package/dist/sheet.js +10 -6
- package/dist/sidebar.d.ts +2 -2
- package/dist/sidebar.js +4 -16
- 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/skeleton.js +1 -1
- package/dist/slider.d.ts +5 -3
- package/dist/slider.js +26 -11
- package/dist/sonar.d.ts +1 -1
- package/dist/sonar.js +2 -2
- package/dist/sparkline.d.ts +1 -1
- package/dist/sparkline.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/styles.css +1622 -264
- package/dist/switch.d.ts +2 -2
- package/dist/switch.js +21 -7
- package/dist/table-card.js +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.d.ts +1 -1
- package/dist/tag.js +1 -1
- package/dist/testimonial-block.js +1 -1
- package/dist/textarea.d.ts +17 -1
- package/dist/textarea.js +24 -10
- package/dist/theme-switcher.js +1 -1
- package/dist/time-picker.d.ts +5 -4
- package/dist/time-picker.js +5 -7
- package/dist/toast.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/top-navbar.js +1 -1
- package/dist/tree-map.d.ts +1 -1
- package/dist/tree-map.js +1 -1
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/cn.js +33 -0
- package/dist/utils/format.d.ts +45 -0
- package/dist/utils/format.js +70 -0
- package/dist/utils/phone.d.ts +98 -0
- package/dist/utils/phone.js +93 -0
- package/dist/utils/use-intersection.d.ts +9 -0
- package/dist/utils/use-intersection.js +29 -0
- package/dist/utils/use-is-mobile.d.ts +5 -0
- package/dist/utils/use-is-mobile.js +16 -0
- package/dist/utils/use-reduced-motion.d.ts +5 -0
- package/dist/{use-reduced-motion-BDvOK14x.js → utils/use-reduced-motion.js} +2 -2
- package/dist/utils/use-uncontrolled.d.ts +11 -0
- package/dist/{use-uncontrolled-CLfM1XbB.js → utils/use-uncontrolled.js} +2 -2
- package/dist/video-player-dialog.d.ts +12 -2
- package/dist/video-player-dialog.js +50 -9
- package/dist/waterfall-chart.d.ts +1 -1
- package/dist/waterfall-chart.js +1 -1
- package/package.json +13 -1
- package/dist/button-DW5OijoR.d.ts +0 -17
- package/dist/cn-BI_4DMBf.js +0 -23
- package/dist/input-CfoEJ8A6.d.ts +0 -12
- package/dist/input-size-context-C-SFx9sx.d.ts +0 -10
- package/dist/picker-xSTzeYhc.js +0 -50
- package/dist/size-context-BX6kAdVj.d.ts +0 -11
- package/dist/textarea-IS_D8pXf.d.ts +0 -11
package/dist/accordion.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ChevronRight } from "./icons.js";
|
|
3
|
-
import {
|
|
3
|
+
import { cn } from "./utils/cn.js";
|
|
4
4
|
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/accordion.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ChevronRight } from "./icons.js";
|
|
3
|
-
import {
|
|
3
|
+
import { cn } from "./utils/cn.js";
|
|
4
4
|
import { Avatar, AvatarFallback, AvatarImage } from "./avatar.js";
|
|
5
5
|
import { Badge } from "./badge.js";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
package/dist/alert.js
CHANGED
package/dist/auth-layout.js
CHANGED
package/dist/avatar.js
CHANGED
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
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { cn } from "./utils/cn.js";
|
|
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/bar-chart.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { cn } from "./utils/cn.js";
|
|
3
3
|
import { SizeProvider, useComponentSize } from "./size-context.js";
|
|
4
4
|
import { ChartContainer, cartesianAxisProps } from "./chart.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
package/dist/breadcrumb.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ChevronRight, MoreHorizontal } from "./icons.js";
|
|
3
|
-
import {
|
|
3
|
+
import { cn } from "./utils/cn.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
6
6
|
import { useRender } from "@base-ui/react/use-render";
|
package/dist/bullet-chart.d.ts
CHANGED
package/dist/bullet-chart.js
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-group.js
CHANGED
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
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { cn } from "./utils/cn.js";
|
|
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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ChevronLeft, ChevronRight } from "./icons.js";
|
|
3
|
-
import {
|
|
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-CACVdp1R.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/call-card.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Maximize2, Mic, MicOff, Minimize2, Phone, User } from "./icons.js";
|
|
3
|
-
import {
|
|
3
|
+
import { cn } from "./utils/cn.js";
|
|
4
4
|
import { Avatar, AvatarFallback, AvatarImage } from "./avatar.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
package/dist/card.js
CHANGED
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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ChevronLeft, ChevronRight } from "./icons.js";
|
|
3
|
-
import {
|
|
3
|
+
import { cn } from "./utils/cn.js";
|
|
4
4
|
import { useComponentSize } from "./size-context.js";
|
|
5
|
-
import {
|
|
5
|
+
import { useReducedMotion } from "./utils/use-reduced-motion.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
8
8
|
import * as React from "react";
|
|
@@ -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/chart.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ArrowDown, ArrowUp } from "./icons.js";
|
|
3
|
-
import {
|
|
3
|
+
import { cn } from "./utils/cn.js";
|
|
4
4
|
import { SizeProvider, useComponentSize } from "./size-context.js";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
package/dist/chat.d.ts
CHANGED
package/dist/chat.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { FileText, Image, Plus, Send, Video } from "./icons.js";
|
|
3
|
-
import {
|
|
3
|
+
import { cn } from "./utils/cn.js";
|
|
4
4
|
import { Button } from "./button.js";
|
|
5
5
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.js";
|
|
6
6
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "./dropdown-menu.js";
|
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
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { cn } from "./utils/cn.js";
|
|
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 };
|
package/dist/collapsible.js
CHANGED