@giddaa-housing/ui 3.5.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.
Files changed (101) hide show
  1. package/css/components.css +13 -0
  2. package/css/generated/shared.css +1 -1
  3. package/dist/badge.d.ts +5 -1
  4. package/dist/badge.js +19 -5
  5. package/dist/bar-chart.d.ts +1 -1
  6. package/dist/bullet-chart.d.ts +1 -1
  7. package/dist/button-BS5KCibF.d.ts +33 -0
  8. package/dist/button-group.d.ts +1 -1
  9. package/dist/button.d.ts +1 -1
  10. package/dist/button.js +49 -21
  11. package/dist/calendar.js +1 -1
  12. package/dist/carousel.d.ts +4 -2
  13. package/dist/carousel.js +11 -14
  14. package/dist/chart.d.ts +1 -1
  15. package/dist/chat.d.ts +1 -1
  16. package/dist/checkbox.d.ts +2 -2
  17. package/dist/checkbox.js +20 -6
  18. package/dist/{combobox-B7cKFJ9V.js → combobox-CACVdp1R.js} +41 -9
  19. package/dist/combobox.d.ts +8 -3
  20. package/dist/combobox.js +2 -2
  21. package/dist/cta.d.ts +1 -1
  22. package/dist/data-table.d.ts +2 -2
  23. package/dist/date-picker.d.ts +3 -3
  24. package/dist/date-picker.js +1 -1
  25. package/dist/dialog.d.ts +3 -1
  26. package/dist/dialog.js +9 -5
  27. package/dist/dropdown-menu.d.ts +1 -1
  28. package/dist/field.d.ts +4 -1
  29. package/dist/field.js +28 -11
  30. package/dist/footer.d.ts +2 -2
  31. package/dist/funnel-chart.d.ts +1 -1
  32. package/dist/heatmap-chart.d.ts +1 -1
  33. package/dist/input-group.d.ts +6 -6
  34. package/dist/input-group.js +38 -13
  35. package/dist/input-otp.d.ts +2 -2
  36. package/dist/input-otp.js +31 -14
  37. package/dist/input-size-context-BMhves-J.d.ts +13 -0
  38. package/dist/input-size-context.d.ts +2 -2
  39. package/dist/input-size-context.js +9 -2
  40. package/dist/input.d.ts +20 -2
  41. package/dist/input.js +30 -11
  42. package/dist/line-chart.d.ts +1 -1
  43. package/dist/mask-input.d.ts +1 -1
  44. package/dist/match.d.ts +5 -2
  45. package/dist/match.js +182 -26
  46. package/dist/media-gallery-hero.js +9 -7
  47. package/dist/mobile-sidebar.js +1 -0
  48. package/dist/number-input.d.ts +2 -2
  49. package/dist/number-input.js +2 -2
  50. package/dist/pagination.d.ts +1 -1
  51. package/dist/phone-input.d.ts +2 -2
  52. package/dist/phone-input.js +5 -4
  53. package/dist/picker-BTXBrsl4.js +62 -0
  54. package/dist/{picker-CsnHtbe4.d.ts → picker-j3txxA5t.d.ts} +2 -2
  55. package/dist/pie-chart.d.ts +1 -1
  56. package/dist/{popover-DSlPeH7x.d.ts → popover-CNymD33m.d.ts} +1 -1
  57. package/dist/popover.d.ts +1 -1
  58. package/dist/property-listing-card.d.ts +7 -3
  59. package/dist/property-listing-card.js +25 -8
  60. package/dist/radar-chart.d.ts +1 -1
  61. package/dist/radio-group.d.ts +2 -2
  62. package/dist/radio-group.js +23 -9
  63. package/dist/rich-text-editor.d.ts +1 -1
  64. package/dist/scatter-chart.d.ts +1 -1
  65. package/dist/scroll-spy.d.ts +8 -2
  66. package/dist/scroll-spy.js +13 -13
  67. package/dist/section-jumper.d.ts +31 -0
  68. package/dist/section-jumper.js +276 -0
  69. package/dist/select.d.ts +9 -4
  70. package/dist/select.js +112 -19
  71. package/dist/sheet.d.ts +3 -1
  72. package/dist/sheet.js +9 -5
  73. package/dist/sidebar.d.ts +2 -2
  74. package/dist/sidebar.js +1 -0
  75. package/dist/size-context-BVhHduLi.d.ts +33 -0
  76. package/dist/size-context.d.ts +2 -2
  77. package/dist/size-context.js +30 -1
  78. package/dist/slider.d.ts +5 -3
  79. package/dist/slider.js +25 -10
  80. package/dist/sonar.d.ts +1 -1
  81. package/dist/sonar.js +1 -1
  82. package/dist/sparkline.d.ts +1 -1
  83. package/dist/styles.css +1576 -258
  84. package/dist/switch.d.ts +2 -2
  85. package/dist/switch.js +20 -6
  86. package/dist/tabs.d.ts +1 -1
  87. package/dist/tag.d.ts +1 -1
  88. package/dist/textarea.d.ts +17 -1
  89. package/dist/textarea.js +23 -9
  90. package/dist/time-picker.d.ts +3 -3
  91. package/dist/time-picker.js +1 -1
  92. package/dist/tree-map.d.ts +1 -1
  93. package/dist/video-player-dialog.js +3 -2
  94. package/dist/waterfall-chart.d.ts +1 -1
  95. package/package.json +5 -1
  96. package/dist/button-DW5OijoR.d.ts +0 -17
  97. package/dist/input-CfoEJ8A6.d.ts +0 -12
  98. package/dist/input-size-context-C-SFx9sx.d.ts +0 -10
  99. package/dist/picker-DmIiQKLJ.js +0 -45
  100. package/dist/size-context-BX6kAdVj.d.ts +0 -11
  101. package/dist/textarea-IS_D8pXf.d.ts +0 -11
package/dist/dialog.js CHANGED
@@ -42,7 +42,7 @@ function DialogOverlay({ className, ...props }) {
42
42
  ...props
43
43
  });
44
44
  }
45
- const dialogContentVariants = cva("group/dialog-content fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-5rem)] w-full max-w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 overflow-visible rounded-2xl border border-line-subtle bg-surface-overlay bg-clip-padding p-(--dialog-padding) text-fg-primary shadow-(--elevation-e2-shadow) outline-none [--dialog-padding:1.25rem] origin-center transition-[opacity,scale] duration-[var(--duration-motion-popup)] ease-gdt-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95 motion-reduce:data-starting-style:scale-100 motion-reduce:data-ending-style:scale-100 data-[nested-dialog-open]:scale-[0.96]", {
45
+ const dialogContentVariants = cva("group/dialog-content pointer-events-none fixed top-1/2 left-1/2 z-50 w-full max-w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 overflow-visible outline-none [--dialog-padding:1.25rem] origin-center transition-[opacity,scale] duration-[var(--duration-motion-popup)] ease-gdt-out data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95 motion-reduce:data-starting-style:scale-100 motion-reduce:data-ending-style:scale-100 data-[nested-dialog-open]:scale-[0.96]", {
46
46
  variants: { size: {
47
47
  sm: "sm:w-90 sm:[--dialog-padding:1.5rem]",
48
48
  md: "sm:w-105 sm:[--dialog-padding:1.5rem]",
@@ -69,20 +69,24 @@ const dialogIconVariants = cva("flex shrink-0 items-center justify-center [&_svg
69
69
  tone: "brand"
70
70
  }
71
71
  });
72
- function DialogContent({ className, children, size, showCloseButton = true, ...props }) {
72
+ function DialogContent({ className, children, size, showCloseButton = true, popupClassName, ...props }) {
73
73
  const resolvedSize = useComponentSize(size);
74
74
  return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsx(SizeProvider, {
75
75
  size: resolvedSize,
76
76
  children: /* @__PURE__ */ jsxs(Dialog$1.Popup, {
77
77
  "data-slot": "dialog-content",
78
78
  "data-size": resolvedSize,
79
- className: cn(dialogContentVariants({ size: resolvedSize }), className),
79
+ className: cn(dialogContentVariants({ size: resolvedSize }), popupClassName),
80
80
  ...props,
81
- children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
81
+ children: [/* @__PURE__ */ jsx("div", {
82
+ "data-slot": "dialog-surface",
83
+ className: cn("pointer-events-auto flex max-h-[calc(100dvh-5rem)] w-full flex-col gap-4 overflow-visible rounded-2xl border border-line-subtle bg-surface-overlay bg-clip-padding p-(--dialog-padding) text-fg-primary shadow-(--elevation-e2-shadow)", className),
84
+ children
85
+ }), showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
82
86
  "data-slot": "dialog-close",
83
87
  render: /* @__PURE__ */ jsxs(Button, {
84
88
  variant: "tertiary",
85
- className: "absolute -top-10 right-0 z-10 group-data-[nested-dialog-open]/dialog-content:hidden",
89
+ className: "pointer-events-auto absolute -top-10 right-0 z-10 group-data-[nested-dialog-open]/dialog-content:hidden",
86
90
  size: "icon-sm",
87
91
  children: [/* @__PURE__ */ jsx(X, {}), /* @__PURE__ */ jsx("span", {
88
92
  className: "sr-only",
@@ -1,4 +1,4 @@
1
- import { t as ComponentSize } from "./size-context-BX6kAdVj.js";
1
+ import { t as ComponentSize } from "./size-context-BVhHduLi.js";
2
2
  import * as React from "react";
3
3
  import { Menu } from "@base-ui/react/menu";
4
4
  //#region src/dropdown-menu.d.ts
package/dist/field.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { n as ComponentSizeValue } from "./size-context-BVhHduLi.js";
1
2
  import { Label } from "./label.js";
2
3
  import { VariantProps } from "class-variance-authority";
3
4
  //#region src/field.d.ts
@@ -10,7 +11,9 @@ declare const fieldVariants: (props?: ({
10
11
  orientation?: "horizontal" | "responsive" | "vertical" | null | undefined;
11
12
  size?: "lg" | "md" | "sm" | null | undefined;
12
13
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
- declare function Field({ className, orientation, size, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react").JSX.Element;
14
+ declare function Field({ className, orientation, size, ...props }: React.ComponentProps<"div"> & Omit<VariantProps<typeof fieldVariants>, "size"> & {
15
+ size?: ComponentSizeValue;
16
+ }): import("react").JSX.Element;
14
17
  declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
15
18
  declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react").JSX.Element;
16
19
  declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
package/dist/field.js CHANGED
@@ -1,12 +1,17 @@
1
1
  "use client";
2
2
  import { cn } from "./utils/cn.js";
3
- import { SizeProvider, useComponentSize } from "./size-context.js";
3
+ import { SizeProvider, responsiveValueClasses, useComponentSizeValue } from "./size-context.js";
4
4
  import { Separator } from "./separator.js";
5
5
  import { Label } from "./label.js";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { cva } from "class-variance-authority";
8
8
  import { useMemo } from "react";
9
9
  //#region src/field.tsx
10
+ const fieldSizeVariants = {
11
+ sm: "gap-1",
12
+ md: "gap-1.5",
13
+ lg: "gap-2"
14
+ };
10
15
  function FieldSet({ className, ...props }) {
11
16
  return /* @__PURE__ */ jsx("fieldset", {
12
17
  "data-slot": "field-set",
@@ -36,11 +41,7 @@ const fieldVariants = cva("group/field flex w-full", {
36
41
  horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio],[role=switch]]:mt-px data-[size=sm]:gap-1.5 data-[size=md]:gap-2.5 data-[size=lg]:gap-3",
37
42
  responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio],[role=switch]]:mt-px"
38
43
  },
39
- size: {
40
- sm: "gap-1",
41
- md: "gap-1.5",
42
- lg: "gap-2"
43
- }
44
+ size: fieldSizeVariants
44
45
  },
45
46
  defaultVariants: {
46
47
  orientation: "vertical",
@@ -48,22 +49,38 @@ const fieldVariants = cva("group/field flex w-full", {
48
49
  }
49
50
  });
50
51
  function Field({ className, orientation = "vertical", size, ...props }) {
51
- const resolvedSize = useComponentSize(size);
52
+ const sizeValue = useComponentSizeValue(size);
53
+ const resolvedSize = responsiveValueClasses(sizeValue, responsiveFieldSizes);
52
54
  return /* @__PURE__ */ jsx(SizeProvider, {
53
- size: resolvedSize,
55
+ size: sizeValue,
54
56
  children: /* @__PURE__ */ jsx("div", {
55
57
  role: "group",
56
58
  "data-slot": "field",
57
59
  "data-orientation": orientation,
58
- "data-size": resolvedSize,
60
+ "data-size": resolvedSize.base,
61
+ "data-size-md": resolvedSize.responsive ? resolvedSize.md : void 0,
62
+ "data-size-lg": resolvedSize.responsive ? resolvedSize.lg : void 0,
59
63
  className: cn(fieldVariants({
60
64
  orientation,
61
- size: resolvedSize
62
- }), className),
65
+ size: null
66
+ }), resolvedSize.className, className),
63
67
  ...props
64
68
  })
65
69
  });
66
70
  }
71
+ const responsiveFieldSizes = {
72
+ base: fieldSizeVariants,
73
+ md: {
74
+ sm: "md:gap-1",
75
+ md: "md:gap-1.5",
76
+ lg: "md:gap-2"
77
+ },
78
+ lg: {
79
+ sm: "lg:gap-1",
80
+ md: "lg:gap-1.5",
81
+ lg: "lg:gap-2"
82
+ }
83
+ };
67
84
  function FieldContent({ className, ...props }) {
68
85
  return /* @__PURE__ */ jsx("div", {
69
86
  "data-slot": "field-content",
package/dist/footer.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as InputSize } from "./input-CfoEJ8A6.js";
1
+ import { InputSizeValue } from "./input.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";
@@ -39,7 +39,7 @@ declare function FooterNewsletter({ className, ...props }: React.ComponentProps<
39
39
  declare function FooterNewsletterTitle({ className, ...props }: React.ComponentProps<"h3">): React.JSX.Element;
40
40
  declare function FooterNewsletterDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
41
41
  declare function FooterNewsletterControl({ className, children, size, ...props }: React.ComponentProps<"div"> & {
42
- size?: InputSize;
42
+ size?: InputSizeValue;
43
43
  }): React.JSX.Element;
44
44
  declare function FooterBottom({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
45
45
  declare function FooterLegalLinks({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { t as ComponentSize } from "./size-context-BX6kAdVj.js";
1
+ import { t as ComponentSize } from "./size-context-BVhHduLi.js";
2
2
  import { ChartCard, ChartValueType } from "./chart.js";
3
3
  import * as React from "react";
4
4
  //#region src/funnel-chart.d.ts
@@ -1,4 +1,4 @@
1
- import { t as ComponentSize } from "./size-context-BX6kAdVj.js";
1
+ import { t as ComponentSize } from "./size-context-BVhHduLi.js";
2
2
  import { ChartCard } from "./chart.js";
3
3
  import * as React from "react";
4
4
  //#region src/heatmap-chart.d.ts
@@ -1,11 +1,11 @@
1
- import { t as Button } from "./button-DW5OijoR.js";
2
- import { n as InputSize } from "./input-CfoEJ8A6.js";
3
- import { n as TextareaSize } from "./textarea-IS_D8pXf.js";
1
+ import { n as ComponentSizeValue } from "./size-context-BVhHduLi.js";
2
+ import { t as Button } from "./button-BS5KCibF.js";
3
+ import { n as InputComponentSizeValue } from "./input-size-context-BMhves-J.js";
4
4
  import { VariantProps } from "class-variance-authority";
5
5
  import * as React from "react";
6
6
  //#region src/input-group.d.ts
7
7
  declare function InputGroup({ className, size, ...props }: React.ComponentProps<"div"> & {
8
- size?: InputSize;
8
+ size?: InputComponentSizeValue;
9
9
  }): React.JSX.Element;
10
10
  declare const inputGroupAddonVariants: (props?: ({
11
11
  align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
@@ -19,10 +19,10 @@ declare function InputGroupButton({ className, type, variant, size, ...props }:
19
19
  }): React.JSX.Element;
20
20
  declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
21
21
  declare function InputGroupInput({ className, size, ...props }: Omit<React.ComponentProps<"input">, "size"> & {
22
- size?: InputSize;
22
+ size?: InputComponentSizeValue;
23
23
  }): React.JSX.Element;
24
24
  declare function InputGroupTextarea({ className, size, ...props }: Omit<React.ComponentProps<"textarea">, "size"> & {
25
- size?: TextareaSize;
25
+ size?: ComponentSizeValue;
26
26
  }): React.JSX.Element;
27
27
  //#endregion
28
28
  export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
@@ -1,38 +1,63 @@
1
1
  "use client";
2
2
  import { cn } from "./utils/cn.js";
3
- import { SizeProvider } from "./size-context.js";
3
+ import { SizeProvider, resolveResponsiveValue, responsiveValueClasses } from "./size-context.js";
4
4
  import { Button } from "./button.js";
5
- import { InputSizeProvider, useInputComponentSize } from "./input-size-context.js";
5
+ import { InputSizeProvider, useInputComponentSizeValue } from "./input-size-context.js";
6
6
  import { Input } from "./input.js";
7
7
  import { Textarea } from "./textarea.js";
8
8
  import { jsx } from "react/jsx-runtime";
9
9
  import { cva } from "class-variance-authority";
10
10
  //#region src/input-group.tsx
11
+ const inputGroupSizeVariants = {
12
+ sm: "h-8",
13
+ md: "h-10",
14
+ lg: "h-12",
15
+ xl: "h-14"
16
+ };
11
17
  const inputGroupVariants = cva("group/input-group relative flex w-full min-w-0 items-center overflow-hidden rounded-full has-[textarea]:rounded-xl has-data-[align=block-end]:rounded-xl has-data-[align=block-start]:rounded-xl border border-line bg-canvas transition-[background-color,border-color,box-shadow,color] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:border-line-subtle has-disabled:bg-surface has-disabled:text-fg-caption-placeholder focus-within:border-line-focus focus-within:inset-ring-1 focus-within:inset-ring-line-focus has-[[data-slot][aria-invalid=true]]:border-line-danger has-[[data-slot][aria-invalid=true]]:inset-shadow-none has-[[data-slot][aria-invalid=true]]:focus-within:border-line-danger has-[[data-slot][aria-invalid=true]]:focus-within:inset-ring-line-danger has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=sm]/input-group:pl-2 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=md]/input-group:pl-2.5 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=lg]/input-group:pl-3 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=xl]/input-group:pl-3 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=sm]/input-group:pr-2 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=md]/input-group:pr-2.5 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=lg]/input-group:pr-3 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=xl]/input-group:pr-3", {
12
- variants: { size: {
13
- sm: "h-8",
14
- md: "h-10",
15
- lg: "h-12",
16
- xl: "h-14"
17
- } },
18
+ variants: { size: inputGroupSizeVariants },
18
19
  defaultVariants: { size: "md" }
19
20
  });
20
21
  function InputGroup({ className, size, ...props }) {
21
- const resolvedSize = useInputComponentSize(size);
22
+ const sizeValue = useInputComponentSizeValue(size);
23
+ const resolvedSize = responsiveValueClasses(sizeValue, responsiveInputGroupSizes);
24
+ const inputSizes = resolveResponsiveValue(sizeValue);
25
+ const clamp = (value) => value === "xl" ? "lg" : value;
22
26
  return /* @__PURE__ */ jsx(SizeProvider, {
23
- size: resolvedSize === "xl" ? void 0 : resolvedSize,
27
+ size: resolvedSize.responsive ? {
28
+ base: clamp(inputSizes.base),
29
+ md: clamp(inputSizes.md),
30
+ lg: clamp(inputSizes.lg)
31
+ } : clamp(inputSizes.base),
24
32
  children: /* @__PURE__ */ jsx(InputSizeProvider, {
25
- size: resolvedSize,
33
+ size: sizeValue,
26
34
  children: /* @__PURE__ */ jsx("div", {
27
35
  "data-slot": "input-group",
28
- "data-size": resolvedSize,
36
+ "data-size": resolvedSize.base,
37
+ "data-size-md": resolvedSize.responsive ? resolvedSize.md : void 0,
38
+ "data-size-lg": resolvedSize.responsive ? resolvedSize.lg : void 0,
29
39
  role: "group",
30
- className: cn(inputGroupVariants({ size: resolvedSize }), className),
40
+ className: cn(inputGroupVariants({ size: null }), resolvedSize.className, className),
31
41
  ...props
32
42
  })
33
43
  })
34
44
  });
35
45
  }
46
+ const responsiveInputGroupSizes = {
47
+ base: inputGroupSizeVariants,
48
+ md: {
49
+ sm: "md:h-8",
50
+ md: "md:h-10",
51
+ lg: "md:h-12",
52
+ xl: "md:h-14"
53
+ },
54
+ lg: {
55
+ sm: "lg:h-8",
56
+ md: "lg:h-10",
57
+ lg: "lg:h-12",
58
+ xl: "lg:h-14"
59
+ }
60
+ };
36
61
  const inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-gdt-sm font-normal text-fg-secondary select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[size=lg]/input-group:[&>svg:not([class*='size-'])]:size-4.5 group-data-[size=xl]/input-group:[&>svg:not([class*='size-'])]:size-5 [&>svg:not([class*='size-'])]:size-4", {
37
62
  variants: { align: {
38
63
  "inline-start": "order-first group-data-[size=sm]/input-group:pl-3 group-data-[size=md]/input-group:pl-3.5 group-data-[size=lg]/input-group:pl-4 group-data-[size=xl]/input-group:pl-4.5 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
@@ -1,4 +1,4 @@
1
- import { n as InputSize } from "./input-CfoEJ8A6.js";
1
+ import { n as InputComponentSizeValue } from "./input-size-context-BMhves-J.js";
2
2
  import * as React from "react";
3
3
  import { OTPField } from "@base-ui/react/otp-field";
4
4
  //#region src/input-otp.d.ts
@@ -7,7 +7,7 @@ declare const inputOTPSlotVariants: (props?: ({
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  type InputOTPProps = Omit<OTPField.Root.Props, "className"> & {
9
9
  className?: string;
10
- size?: InputSize;
10
+ size?: InputComponentSizeValue;
11
11
  };
12
12
  declare function InputOTP({ className, size, ...props }: InputOTPProps): React.JSX.Element;
13
13
  declare function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
package/dist/input-otp.js CHANGED
@@ -1,27 +1,30 @@
1
1
  "use client";
2
2
  import { Minus } from "./icons.js";
3
3
  import { cn } from "./utils/cn.js";
4
- import { InputSizeProvider, useInputComponentSize } from "./input-size-context.js";
4
+ import { responsiveValueClasses } from "./size-context.js";
5
+ import { InputSizeProvider, useInputComponentSizeValue } from "./input-size-context.js";
5
6
  import { jsx } from "react/jsx-runtime";
6
7
  import { cva } from "class-variance-authority";
7
8
  import { OTPField } from "@base-ui/react/otp-field";
8
9
  //#region src/input-otp.tsx
10
+ const inputOTPSlotSizeVariants = {
11
+ sm: "size-8 text-gdt-xs",
12
+ md: "size-10 text-gdt-sm",
13
+ lg: "size-12 text-gdt-md",
14
+ xl: "size-14 text-gdt-lg"
15
+ };
9
16
  const inputOTPSlotVariants = cva("relative flex shrink-0 appearance-none items-center justify-center rounded-full border border-line bg-canvas text-center font-normal text-fg-primary caret-fg-primary outline-none transition-[background-color,border-color,box-shadow,color] placeholder:text-fg-caption-placeholder hover:border-line-strong focus:z-10 focus:border-line-focus focus:inset-ring-1 focus:inset-ring-line-focus 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 aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:focus:border-line-danger aria-invalid:focus:inset-ring-line-danger data-invalid:border-line-danger data-invalid:text-fg-danger data-invalid:focus:border-line-danger data-invalid:focus:inset-ring-line-danger group-aria-invalid/input-otp:border-line-danger group-aria-invalid/input-otp:text-fg-danger group-aria-invalid/input-otp:focus:border-line-danger group-aria-invalid/input-otp:focus:inset-ring-line-danger", {
10
- variants: { size: {
11
- sm: "size-8 text-gdt-xs",
12
- md: "size-10 text-gdt-sm",
13
- lg: "size-12 text-gdt-md",
14
- xl: "size-14 text-gdt-lg"
15
- } },
17
+ variants: { size: inputOTPSlotSizeVariants },
16
18
  defaultVariants: { size: "md" }
17
19
  });
18
20
  function InputOTP({ className, size, ...props }) {
19
- const resolvedSize = useInputComponentSize(size);
21
+ const sizeValue = useInputComponentSizeValue(size);
22
+ const resolvedSize = responsiveValueClasses(sizeValue, responsiveInputOTPSlotSizes);
20
23
  return /* @__PURE__ */ jsx(InputSizeProvider, {
21
- size: resolvedSize,
24
+ size: sizeValue,
22
25
  children: /* @__PURE__ */ jsx(OTPField.Root, {
23
26
  "data-slot": "input-otp",
24
- "data-size": resolvedSize,
27
+ "data-size": resolvedSize.base,
25
28
  className: cn("group/input-otp flex items-center gap-2 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
26
29
  ...props
27
30
  })
@@ -30,20 +33,34 @@ function InputOTP({ className, size, ...props }) {
30
33
  function InputOTPGroup({ className, ...props }) {
31
34
  return /* @__PURE__ */ jsx("div", {
32
35
  "data-slot": "input-otp-group",
33
- "data-size": useInputComponentSize(),
34
36
  className: cn("flex items-center rounded-full [&>[data-slot=input-otp-slot]:first-child]:rounded-l-full [&>[data-slot=input-otp-slot]:last-child]:rounded-r-full [&>[data-slot=input-otp-slot]:not(:first-child)]:-ml-px [&>[data-slot=input-otp-slot]]:rounded-none", className),
35
37
  ...props
36
38
  });
37
39
  }
38
40
  function InputOTPSlot({ className, ...props }) {
39
- const resolvedSize = useInputComponentSize();
41
+ const resolvedSize = responsiveValueClasses(useInputComponentSizeValue(), responsiveInputOTPSlotSizes);
40
42
  return /* @__PURE__ */ jsx(OTPField.Input, {
41
43
  "data-slot": "input-otp-slot",
42
- "data-size": resolvedSize,
43
- className: cn(inputOTPSlotVariants({ size: resolvedSize }), className),
44
+ "data-size": resolvedSize.base,
45
+ className: cn(inputOTPSlotVariants({ size: null }), resolvedSize.className, className),
44
46
  ...props
45
47
  });
46
48
  }
49
+ const responsiveInputOTPSlotSizes = {
50
+ base: inputOTPSlotSizeVariants,
51
+ md: {
52
+ sm: "md:size-8 md:text-gdt-xs",
53
+ md: "md:size-10 md:text-gdt-sm",
54
+ lg: "md:size-12 md:text-gdt-md",
55
+ xl: "md:size-14 md:text-gdt-lg"
56
+ },
57
+ lg: {
58
+ sm: "lg:size-8 lg:text-gdt-xs",
59
+ md: "lg:size-10 lg:text-gdt-sm",
60
+ lg: "lg:size-12 lg:text-gdt-md",
61
+ xl: "lg:size-14 lg:text-gdt-lg"
62
+ }
63
+ };
47
64
  function InputOTPSeparator({ children, className, ...props }) {
48
65
  return /* @__PURE__ */ jsx(OTPField.Separator, {
49
66
  "data-slot": "input-otp-separator",
@@ -0,0 +1,13 @@
1
+ import { a as ResponsiveValue } from "./size-context-BVhHduLi.js";
2
+ import { ReactNode } from "react";
3
+ //#region src/input-size-context.d.ts
4
+ type InputComponentSize = "sm" | "md" | "lg" | "xl";
5
+ type InputComponentSizeValue = InputComponentSize | ResponsiveValue<InputComponentSize>;
6
+ declare function InputSizeProvider({ children, size }: {
7
+ children: ReactNode;
8
+ size?: InputComponentSizeValue | null;
9
+ }): import("react").JSX.Element;
10
+ declare function useInputComponentSize(size?: InputComponentSize | null, fallback?: InputComponentSize): InputComponentSize;
11
+ declare function useInputComponentSizeValue(size?: InputComponentSizeValue | null, fallback?: InputComponentSize): ResponsiveValue<InputComponentSize> | InputComponentSize;
12
+ //#endregion
13
+ export { useInputComponentSizeValue as a, useInputComponentSize as i, InputComponentSizeValue as n, InputSizeProvider as r, InputComponentSize as t };
@@ -1,2 +1,2 @@
1
- import { n as InputSizeProvider, r as useInputComponentSize, t as InputComponentSize } from "./input-size-context-C-SFx9sx.js";
2
- export { type InputComponentSize, InputSizeProvider, useInputComponentSize };
1
+ import { a as useInputComponentSizeValue, i as useInputComponentSize, n as InputComponentSizeValue, r as InputSizeProvider, t as InputComponentSize } from "./input-size-context-BMhves-J.js";
2
+ export { type InputComponentSize, type InputComponentSizeValue, InputSizeProvider, useInputComponentSize, useInputComponentSizeValue };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { useInheritedComponentSize } from "./size-context.js";
2
+ import { resolveResponsiveValue, useInheritedComponentSize } from "./size-context.js";
3
3
  import { Fragment, jsx } from "react/jsx-runtime";
4
4
  import { createContext, useContext } from "react";
5
5
  //#region src/input-size-context.tsx
@@ -12,9 +12,16 @@ function InputSizeProvider({ children, size }) {
12
12
  });
13
13
  }
14
14
  function useInputComponentSize(size, fallback = "md") {
15
+ const inheritedInputSize = useContext(InputSizeContext);
16
+ const inheritedComponentSizeValue = useInheritedComponentSize();
17
+ const inheritedComponentSize = inheritedComponentSizeValue ? resolveResponsiveValue(inheritedComponentSizeValue).base : void 0;
18
+ const inheritedInputBase = inheritedInputSize ? resolveResponsiveValue(inheritedInputSize).base : void 0;
19
+ return size ?? inheritedInputBase ?? inheritedComponentSize ?? fallback;
20
+ }
21
+ function useInputComponentSizeValue(size, fallback = "md") {
15
22
  const inheritedInputSize = useContext(InputSizeContext);
16
23
  const inheritedComponentSize = useInheritedComponentSize();
17
24
  return size ?? inheritedInputSize ?? inheritedComponentSize ?? fallback;
18
25
  }
19
26
  //#endregion
20
- export { InputSizeProvider, useInputComponentSize };
27
+ export { InputSizeProvider, useInputComponentSize, useInputComponentSizeValue };
package/dist/input.d.ts CHANGED
@@ -1,2 +1,20 @@
1
- import { n as InputSize, r as inputVariants, t as Input } from "./input-CfoEJ8A6.js";
2
- export { Input, type InputSize, inputVariants };
1
+ import { n as InputComponentSizeValue } from "./input-size-context-BMhves-J.js";
2
+ import * as React from "react";
3
+ //#region src/input.d.ts
4
+ declare const inputSizeVariants: {
5
+ readonly sm: "h-8 px-3 text-gdt-xs font-normal file:text-gdt-xs";
6
+ readonly md: "h-10 px-3.5 text-gdt-sm font-normal file:text-gdt-sm";
7
+ readonly lg: "h-12 px-4 text-gdt-md font-normal file:text-gdt-md";
8
+ readonly xl: "h-14 px-4.5 text-gdt-lg font-normal file:text-gdt-lg";
9
+ };
10
+ declare const inputVariants: (props?: ({
11
+ size?: "lg" | "md" | "sm" | "xl" | null | undefined;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
+ type InputProps = Omit<React.ComponentProps<"input">, "size"> & {
14
+ size?: InputComponentSizeValue;
15
+ };
16
+ type InputSize = keyof typeof inputSizeVariants;
17
+ type InputSizeValue = InputComponentSizeValue;
18
+ declare function Input({ className, size, type, ...props }: InputProps): React.JSX.Element;
19
+ //#endregion
20
+ export { Input, type InputSize, type InputSizeValue, inputVariants };
package/dist/input.js CHANGED
@@ -1,28 +1,47 @@
1
1
  "use client";
2
2
  import { cn } from "./utils/cn.js";
3
- import { useInputComponentSize } from "./input-size-context.js";
3
+ import { responsiveValueClasses } from "./size-context.js";
4
+ import { useInputComponentSizeValue } from "./input-size-context.js";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  import { cva } from "class-variance-authority";
6
7
  import { Input as Input$1 } from "@base-ui/react/input";
7
8
  //#region src/input.tsx
8
- const inputVariants = cva("flex w-full min-w-0 rounded-full border border-line bg-canvas text-fg-primary transition-[background-color,border-color,box-shadow,color] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-normal file:text-fg-primary placeholder:text-fg-caption-placeholder hover:border-line-strong focus-visible:border-line-focus focus-visible:inset-ring-1 focus-visible:inset-ring-line-focus disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-line-subtle disabled:bg-surface disabled:text-fg-caption-placeholder disabled:placeholder:text-fg-caption-placeholder aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:placeholder:text-fg-danger aria-invalid:shadow-none aria-invalid:focus-visible:border-line-danger aria-invalid:focus-visible:inset-ring-line-danger autofill:border-line autofill:bg-canvas autofill:[-webkit-text-fill-color:var(--color-fg-primary)] autofill:[box-shadow:0_0_0_1000px_var(--color-canvas)_inset]", {
9
- variants: { size: {
10
- sm: "h-8 px-3 text-gdt-xs font-normal file:text-gdt-xs",
11
- md: "h-10 px-3.5 text-gdt-sm font-normal file:text-gdt-sm",
12
- lg: "h-12 px-4 text-gdt-md font-normal file:text-gdt-md",
13
- xl: "h-14 px-4.5 text-gdt-lg font-normal file:text-gdt-lg"
14
- } },
9
+ const inputSizeVariants = {
10
+ sm: "h-8 px-3 text-gdt-xs font-normal file:text-gdt-xs",
11
+ md: "h-10 px-3.5 text-gdt-sm font-normal file:text-gdt-sm",
12
+ lg: "h-12 px-4 text-gdt-md font-normal file:text-gdt-md",
13
+ xl: "h-14 px-4.5 text-gdt-lg font-normal file:text-gdt-lg"
14
+ };
15
+ const inputVariants = cva("gdt-input-autofill flex w-full min-w-0 rounded-full border border-line bg-canvas text-fg-primary transition-[background-color,border-color,box-shadow,color] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-normal file:text-fg-primary placeholder:text-fg-caption-placeholder hover:border-line-strong focus-visible:border-line-focus focus-visible:inset-ring-1 focus-visible:inset-ring-line-focus disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-line-subtle disabled:bg-surface disabled:text-fg-caption-placeholder disabled:placeholder:text-fg-caption-placeholder aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:placeholder:text-fg-danger aria-invalid:shadow-none aria-invalid:focus-visible:border-line-danger aria-invalid:focus-visible:inset-ring-line-danger", {
16
+ variants: { size: inputSizeVariants },
15
17
  defaultVariants: { size: "md" }
16
18
  });
17
19
  function Input({ className, size, type, ...props }) {
18
- const resolvedSize = useInputComponentSize(size);
20
+ const resolvedSize = responsiveValueClasses(useInputComponentSizeValue(size), responsiveInputSizes);
19
21
  return /* @__PURE__ */ jsx(Input$1, {
20
22
  type,
21
23
  "data-slot": "input",
22
- "data-size": resolvedSize,
23
- className: cn(inputVariants({ size: resolvedSize }), className),
24
+ "data-size": resolvedSize.base,
25
+ "data-size-md": resolvedSize.responsive ? resolvedSize.md : void 0,
26
+ "data-size-lg": resolvedSize.responsive ? resolvedSize.lg : void 0,
27
+ className: cn(inputVariants({ size: null }), resolvedSize.className, className),
24
28
  ...props
25
29
  });
26
30
  }
31
+ const responsiveInputSizes = {
32
+ base: inputSizeVariants,
33
+ md: {
34
+ sm: "md:h-8 md:px-3 md:text-gdt-xs md:file:text-gdt-xs",
35
+ md: "md:h-10 md:px-3.5 md:text-gdt-sm md:file:text-gdt-sm",
36
+ lg: "md:h-12 md:px-4 md:text-gdt-md md:file:text-gdt-md",
37
+ xl: "md:h-14 md:px-4.5 md:text-gdt-lg md:file:text-gdt-lg"
38
+ },
39
+ lg: {
40
+ sm: "lg:h-8 lg:px-3 lg:text-gdt-xs lg:file:text-gdt-xs",
41
+ md: "lg:h-10 lg:px-3.5 lg:text-gdt-sm lg:file:text-gdt-sm",
42
+ lg: "lg:h-12 lg:px-4 lg:text-gdt-md lg:file:text-gdt-md",
43
+ xl: "lg:h-14 lg:px-4.5 lg:text-gdt-lg lg:file:text-gdt-lg"
44
+ }
45
+ };
27
46
  //#endregion
28
47
  export { Input, inputVariants };
@@ -1,4 +1,4 @@
1
- import { t as ComponentSize } from "./size-context-BX6kAdVj.js";
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 { Area, AreaChart as AreaChart$1, CartesianGrid, Line, LineChart as LineChart$1, XAxis, YAxis } from "recharts";
@@ -1,4 +1,4 @@
1
- import { t as Input } from "./input-CfoEJ8A6.js";
1
+ import { Input } from "./input.js";
2
2
  import * as React from "react";
3
3
  //#region src/mask-input.d.ts
4
4
  type MaskToken = {
package/dist/match.d.ts CHANGED
@@ -1,15 +1,18 @@
1
+ import { n as ComponentSizeValue } from "./size-context-BVhHduLi.js";
1
2
  import { VariantProps } from "class-variance-authority";
2
3
  import * as React from "react";
3
4
  //#region src/match.d.ts
4
5
  declare const matchVariants: (props?: ({
5
6
  variant?: "bar" | "donut" | null | undefined;
7
+ size?: "lg" | "md" | "sm" | null | undefined;
6
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
9
  type MatchVariant = NonNullable<VariantProps<typeof matchVariants>["variant"]>;
8
- type MatchProps = Omit<React.ComponentProps<"button">, "children" | "value"> & VariantProps<typeof matchVariants> & {
10
+ type MatchProps = Omit<React.ComponentProps<"button">, "children" | "value"> & Omit<VariantProps<typeof matchVariants>, "size"> & {
9
11
  value: number;
12
+ size?: ComponentSizeValue;
10
13
  label?: string;
11
14
  showChevron?: boolean;
12
15
  };
13
- declare function Match({ className, value, variant, label, showChevron, type, "aria-label": ariaLabel, ...props }: MatchProps): React.JSX.Element;
16
+ declare function Match({ className, value, variant, size, label, showChevron, type, "aria-label": ariaLabel, ...props }: MatchProps): React.JSX.Element;
14
17
  //#endregion
15
18
  export { Match, type MatchProps, type MatchVariant, matchVariants };