@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/switch.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { VariantProps } from "class-variance-authority";
1
+ import { n as ComponentSizeValue } from "./size-context-BVhHduLi.js";
2
2
  import { Switch as Switch$1 } from "@base-ui/react/switch";
3
3
  //#region src/switch.d.ts
4
4
  declare const switchVariants: (props?: ({
5
5
  size?: "lg" | "md" | "sm" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
- type SwitchSize = NonNullable<VariantProps<typeof switchVariants>["size"]>;
7
+ type SwitchSize = ComponentSizeValue;
8
8
  type SwitchProps = Omit<Switch$1.Root.Props, "children"> & {
9
9
  loading?: boolean;
10
10
  size?: SwitchSize;
package/dist/switch.js CHANGED
@@ -1,15 +1,16 @@
1
1
  "use client";
2
2
  import { cn } from "./utils/cn.js";
3
- import { useComponentSize } from "./size-context.js";
3
+ import { responsiveValueClasses, useComponentSizeValue } from "./size-context.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { cva } from "class-variance-authority";
6
6
  import { Switch as Switch$1 } from "@base-ui/react/switch";
7
7
  //#region src/switch.tsx
8
- const switchVariants = cva("peer group/switch relative inline-flex shrink-0 items-center rounded-full border bg-clip-padding p-0.5 transition-[background-color,border-color,box-shadow,opacity,scale] duration-[var(--duration-motion-press)] ease-gdt-out active:scale-[0.97] motion-reduce:active:scale-100 outline-none 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)] data-checked:border-action-primary data-checked:bg-action-primary data-unchecked:border-line data-unchecked:bg-transparent data-[loading=true]:border-action-primary data-[loading=true]:bg-action-primary data-disabled:border-line-subtle! data-disabled:bg-transparent! data-disabled:cursor-not-allowed data-disabled:opacity-60 data-disabled:active:scale-100 h-6 w-10 [--switch-spinner-size:0.75rem] [--switch-thumb-size:18px] [--switch-track-width:2.5rem] group-data-[size=sm]/field:h-5 group-data-[size=sm]/field:w-8 group-data-[size=sm]/field:[--switch-spinner-size:0.625rem] group-data-[size=sm]/field:[--switch-thumb-size:14px] group-data-[size=sm]/field:[--switch-track-width:2rem] group-data-[size=md]/field:h-6 group-data-[size=md]/field:w-10 group-data-[size=md]/field:[--switch-spinner-size:0.75rem] group-data-[size=md]/field:[--switch-thumb-size:18px] group-data-[size=md]/field:[--switch-track-width:2.5rem] group-data-[size=lg]/field:h-7 group-data-[size=lg]/field:w-12 group-data-[size=lg]/field:[--switch-spinner-size:0.875rem] group-data-[size=lg]/field:[--switch-thumb-size:22px] group-data-[size=lg]/field:[--switch-track-width:3rem]", { variants: { size: {
8
+ const switchSizeVariants = {
9
9
  sm: "h-5 w-8 [--switch-spinner-size:0.625rem] [--switch-thumb-size:14px] [--switch-track-width:2rem]",
10
10
  md: "h-6 w-10 [--switch-spinner-size:0.75rem] [--switch-thumb-size:18px] [--switch-track-width:2.5rem]",
11
11
  lg: "h-7 w-12 [--switch-spinner-size:0.875rem] [--switch-thumb-size:22px] [--switch-track-width:3rem]"
12
- } } });
12
+ };
13
+ const switchVariants = cva("peer group/switch relative inline-flex shrink-0 items-center rounded-full border bg-clip-padding p-0.5 transition-[background-color,border-color,box-shadow,opacity,scale] duration-[var(--duration-motion-press)] ease-gdt-out active:scale-[0.97] motion-reduce:active:scale-100 outline-none 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)] data-checked:border-action-primary data-checked:bg-action-primary data-unchecked:border-line data-unchecked:bg-transparent data-[loading=true]:border-action-primary data-[loading=true]:bg-action-primary data-disabled:border-line-subtle! data-disabled:bg-transparent! data-disabled:cursor-not-allowed data-disabled:opacity-60 data-disabled:active:scale-100", { variants: { size: switchSizeVariants } });
13
14
  /**
14
15
  * Compose with the shared field primitives for label and helper text.
15
16
  *
@@ -24,17 +25,17 @@ const switchVariants = cva("peer group/switch relative inline-flex shrink-0 item
24
25
  * ```
25
26
  */
26
27
  function Switch({ className, disabled = false, loading = false, readOnly = false, size, ...props }) {
27
- const resolvedSize = useComponentSize(size);
28
+ const resolvedSize = responsiveValueClasses(useComponentSizeValue(size), responsiveSwitchSizes);
28
29
  const isDisabled = disabled;
29
30
  const isReadOnly = readOnly || loading;
30
31
  return /* @__PURE__ */ jsx(Switch$1.Root, {
31
32
  "aria-busy": loading || void 0,
32
33
  "data-slot": "switch",
33
34
  "data-loading": loading,
34
- "data-size": resolvedSize,
35
+ "data-size": resolvedSize.base,
35
36
  disabled: isDisabled,
36
37
  readOnly: isReadOnly,
37
- className: cn(switchVariants({ size: resolvedSize }), className),
38
+ className: cn(switchVariants({ size: null }), resolvedSize.className, className),
38
39
  ...props,
39
40
  children: /* @__PURE__ */ jsx(Switch$1.Thumb, {
40
41
  "data-slot": "switch-thumb",
@@ -47,5 +48,18 @@ function Switch({ className, disabled = false, loading = false, readOnly = false
47
48
  })
48
49
  });
49
50
  }
51
+ const responsiveSwitchSizes = {
52
+ base: switchSizeVariants,
53
+ md: {
54
+ sm: "md:h-5 md:w-8 md:[--switch-spinner-size:0.625rem] md:[--switch-thumb-size:14px] md:[--switch-track-width:2rem]",
55
+ md: "md:h-6 md:w-10 md:[--switch-spinner-size:0.75rem] md:[--switch-thumb-size:18px] md:[--switch-track-width:2.5rem]",
56
+ lg: "md:h-7 md:w-12 md:[--switch-spinner-size:0.875rem] md:[--switch-thumb-size:22px] md:[--switch-track-width:3rem]"
57
+ },
58
+ lg: {
59
+ sm: "lg:h-5 lg:w-8 lg:[--switch-spinner-size:0.625rem] lg:[--switch-thumb-size:14px] lg:[--switch-track-width:2rem]",
60
+ md: "lg:h-6 lg:w-10 lg:[--switch-spinner-size:0.75rem] lg:[--switch-thumb-size:18px] lg:[--switch-track-width:2.5rem]",
61
+ lg: "lg:h-7 lg:w-12 lg:[--switch-spinner-size:0.875rem] lg:[--switch-thumb-size:22px] lg:[--switch-track-width:3rem]"
62
+ }
63
+ };
50
64
  //#endregion
51
65
  export { Switch, switchVariants };
package/dist/tabs.d.ts CHANGED
@@ -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 { ComponentPropsWithoutRef } from "react";
3
3
  import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
4
4
  //#region src/tabs.d.ts
package/dist/tag.d.ts CHANGED
@@ -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 { ButtonHTMLAttributes, MouseEvent, ReactNode } from "react";
3
3
  //#region src/tag.d.ts
4
4
  declare const tagVariants: (props?: ({
@@ -1,2 +1,18 @@
1
- import { n as TextareaSize, r as textareaVariants, t as Textarea } from "./textarea-IS_D8pXf.js";
1
+ import { n as ComponentSizeValue } from "./size-context-BVhHduLi.js";
2
+ import * as React from "react";
3
+ //#region src/textarea.d.ts
4
+ declare const textareaSizeVariants: {
5
+ readonly sm: "min-h-22 px-3 py-2 text-gdt-xs";
6
+ readonly md: "min-h-26 px-3.5 py-2.5 text-gdt-sm";
7
+ readonly lg: "min-h-31 px-4 py-3 text-gdt-md";
8
+ };
9
+ declare const textareaVariants: (props?: ({
10
+ size?: "lg" | "md" | "sm" | null | undefined;
11
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
+ type TextareaProps = Omit<React.ComponentProps<"textarea">, "size"> & {
13
+ size?: ComponentSizeValue;
14
+ };
15
+ type TextareaSize = keyof typeof textareaSizeVariants;
16
+ declare function Textarea({ className, size, ...props }: TextareaProps): React.JSX.Element;
17
+ //#endregion
2
18
  export { Textarea, type TextareaSize, textareaVariants };
package/dist/textarea.js CHANGED
@@ -1,25 +1,39 @@
1
1
  "use client";
2
2
  import { cn } from "./utils/cn.js";
3
- import { useComponentSize } from "./size-context.js";
3
+ import { responsiveValueClasses, useComponentSizeValue } from "./size-context.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { cva } from "class-variance-authority";
6
6
  //#region src/textarea.tsx
7
+ const textareaSizeVariants = {
8
+ sm: "min-h-22 px-3 py-2 text-gdt-xs",
9
+ md: "min-h-26 px-3.5 py-2.5 text-gdt-sm",
10
+ lg: "min-h-31 px-4 py-3 text-gdt-md"
11
+ };
7
12
  const textareaVariants = cva("flex field-sizing-content w-full min-w-0 resize-y rounded-xl border border-line bg-canvas text-fg-primary transition-[background-color,border-color,box-shadow,color] outline-none 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", {
8
- variants: { size: {
9
- sm: "min-h-22 px-3 py-2 text-gdt-xs",
10
- md: "min-h-26 px-3.5 py-2.5 text-gdt-sm",
11
- lg: "min-h-31 px-4 py-3 text-gdt-md"
12
- } },
13
+ variants: { size: textareaSizeVariants },
13
14
  defaultVariants: { size: "md" }
14
15
  });
15
16
  function Textarea({ className, size, ...props }) {
16
- const resolvedSize = useComponentSize(size);
17
+ const resolvedSize = responsiveValueClasses(useComponentSizeValue(size), responsiveTextareaSizes);
17
18
  return /* @__PURE__ */ jsx("textarea", {
18
19
  "data-slot": "textarea",
19
- "data-size": resolvedSize,
20
- className: cn(textareaVariants({ size: resolvedSize }), className),
20
+ "data-size": resolvedSize.base,
21
+ className: cn(textareaVariants({ size: null }), resolvedSize.className, className),
21
22
  ...props
22
23
  });
23
24
  }
25
+ const responsiveTextareaSizes = {
26
+ base: textareaSizeVariants,
27
+ md: {
28
+ sm: "md:min-h-22 md:px-3 md:py-2 md:text-gdt-xs",
29
+ md: "md:min-h-26 md:px-3.5 md:py-2.5 md:text-gdt-sm",
30
+ lg: "md:min-h-31 md:px-4 md:py-3 md:text-gdt-md"
31
+ },
32
+ lg: {
33
+ sm: "lg:min-h-22 lg:px-3 lg:py-2 lg:text-gdt-xs",
34
+ md: "lg:min-h-26 lg:px-3.5 lg:py-2.5 lg:text-gdt-sm",
35
+ lg: "lg:min-h-31 lg:px-4 lg:py-3 lg:text-gdt-md"
36
+ }
37
+ };
24
38
  //#endregion
25
39
  export { Textarea, textareaVariants };
@@ -1,5 +1,5 @@
1
- import { n as InputSize } from "./input-CfoEJ8A6.js";
2
- import { t as PickerPlacementProps } from "./picker-CsnHtbe4.js";
1
+ import { InputSizeValue } from "./input.js";
2
+ import { t as PickerPlacementProps } from "./picker-j3txxA5t.js";
3
3
  import * as React from "react";
4
4
  //#region src/time-picker.d.ts
5
5
  interface TimePickerProps extends PickerPlacementProps {
@@ -8,7 +8,7 @@ interface TimePickerProps extends PickerPlacementProps {
8
8
  format?: "12h" | "24h";
9
9
  disabled?: boolean;
10
10
  /** Controls the trigger size. The time selection panel is not resized. */
11
- size?: InputSize;
11
+ size?: InputSizeValue;
12
12
  placeholder?: string;
13
13
  className?: string;
14
14
  }
@@ -3,7 +3,7 @@ import { Clock } from "./icons.js";
3
3
  import { cn } from "./utils/cn.js";
4
4
  import { useReducedMotion } from "./utils/use-reduced-motion.js";
5
5
  import { Popover, PopoverContent } from "./popover.js";
6
- import { n as PickerTrigger, t as PickerFooter } from "./picker-DmIiQKLJ.js";
6
+ import { n as PickerTrigger, t as PickerFooter } from "./picker-BTXBrsl4.js";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import * as React from "react";
9
9
  //#region src/lib/time-picker-paint.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, ChartValueType } from "./chart.js";
3
3
  import * as React from "react";
4
4
  //#region src/tree-map.d.ts
@@ -57,13 +57,14 @@ function VideoPlayerDialogContent({ size = "md", theme = "light", showCloseButto
57
57
  "data-size": size,
58
58
  "data-slot": "video-player-dialog-content",
59
59
  "data-theme": theme,
60
- className: cn("inset-0 m-auto h-fit max-h-none translate-x-0 translate-y-0 gap-0 overflow-visible border-0 bg-transparent p-0 shadow-none sm:w-full [--dialog-padding:0px]", WIDTHS[size], className),
60
+ popupClassName: cn("inset-0 m-auto h-fit max-h-none w-[calc(100%-2rem)] translate-x-0 translate-y-0 gap-0 overflow-visible border-0 bg-transparent p-0 shadow-none sm:w-full [--dialog-padding:0px]", WIDTHS[size]),
61
+ className: cn("max-h-none gap-0 border-0 bg-transparent p-0 shadow-none", className),
61
62
  ...props,
62
63
  children: /* @__PURE__ */ jsx(VideoPlayerDialogContext.Provider, {
63
64
  value: context,
64
65
  children: /* @__PURE__ */ jsx("div", {
65
66
  "data-slot": "video-player-dialog-surface",
66
- className: cn("max-h-[calc(100dvh-4rem)] overflow-y-auto overscroll-contain", videoPlayerDialogSurfaceVariants({
67
+ className: cn("max-h-[calc(100dvh-6rem)] overflow-y-auto overscroll-contain", videoPlayerDialogSurfaceVariants({
67
68
  size,
68
69
  theme
69
70
  }), surfaceClassName),
@@ -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/waterfall-chart.d.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giddaa-housing/ui",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "description": "Giddaa reusable UI component library.",
5
5
  "type": "module",
6
6
  "private": false,
@@ -329,6 +329,10 @@
329
329
  "types": "./dist/scroll-spy.d.ts",
330
330
  "import": "./dist/scroll-spy.js"
331
331
  },
332
+ "./section-jumper": {
333
+ "types": "./dist/section-jumper.d.ts",
334
+ "import": "./dist/section-jumper.js"
335
+ },
332
336
  "./search-input": {
333
337
  "types": "./dist/search-input.d.ts",
334
338
  "import": "./dist/search-input.js"
@@ -1,17 +0,0 @@
1
- import { useRender } from "@base-ui/react/use-render";
2
- import { VariantProps } from "class-variance-authority";
3
- import { Button } from "@base-ui/react/button";
4
- //#region src/button.d.ts
5
- declare const buttonVariants: (props?: ({
6
- variant?: "back" | "danger" | "ghost" | "glass-overlay" | "link-brand" | "link-neutral" | "primary" | "primary-outline" | "secondary" | "secondary-outline" | "tertiary" | "tertiary-outline" | "whatsapp" | null | undefined;
7
- size?: "icon" | "icon-lg" | "icon-sm" | "icon-xl" | "icon-xs" | "lg" | "md" | "sm" | "xl" | null | undefined;
8
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
- declare function Button$1({ className, variant, size, isLoading, children, disabled, ...props }: Button.Props & VariantProps<typeof buttonVariants> & {
10
- isLoading?: boolean;
11
- }): import("react").JSX.Element;
12
- type ButtonLinkProps = useRender.ComponentProps<"a"> & VariantProps<typeof buttonVariants> & {
13
- disabled?: boolean;
14
- };
15
- declare function ButtonLink({ className, render, variant, size, disabled, onClick, children, ...props }: ButtonLinkProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
16
- //#endregion
17
- export { ButtonLink as n, buttonVariants as r, Button$1 as t };
@@ -1,12 +0,0 @@
1
- import { t as InputComponentSize } from "./input-size-context-C-SFx9sx.js";
2
- import { VariantProps } from "class-variance-authority";
3
- import * as React from "react";
4
- //#region src/input.d.ts
5
- declare const inputVariants: (props?: ({
6
- size?: "lg" | "md" | "sm" | "xl" | null | undefined;
7
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
- type InputProps = Omit<React.ComponentProps<"input">, "size"> & VariantProps<typeof inputVariants>;
9
- type InputSize = InputComponentSize;
10
- declare function Input({ className, size, type, ...props }: InputProps): React.JSX.Element;
11
- //#endregion
12
- export { InputSize as n, inputVariants as r, Input as t };
@@ -1,10 +0,0 @@
1
- import { ReactNode } from "react";
2
- //#region src/input-size-context.d.ts
3
- type InputComponentSize = "sm" | "md" | "lg" | "xl";
4
- declare function InputSizeProvider({ children, size }: {
5
- children: ReactNode;
6
- size?: InputComponentSize | null;
7
- }): import("react").JSX.Element;
8
- declare function useInputComponentSize(size?: InputComponentSize | null, fallback?: InputComponentSize): InputComponentSize;
9
- //#endregion
10
- export { InputSizeProvider as n, useInputComponentSize as r, InputComponentSize as t };
@@ -1,45 +0,0 @@
1
- import { cn } from "./utils/cn.js";
2
- import { Button } from "./button.js";
3
- import { useInputComponentSize } from "./input-size-context.js";
4
- import { PopoverTrigger } from "./popover.js";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- import { cva } from "class-variance-authority";
7
- //#region src/lib/picker.tsx
8
- const pickerTriggerVariants = cva("flex w-full items-center justify-between rounded-full border transition-[border-color,box-shadow] outline-none", {
9
- variants: { size: {
10
- sm: "h-8 px-3 text-gdt-xs [&_svg]:size-3.5",
11
- md: "h-10 px-3.5 text-gdt-sm [&_svg]:size-4",
12
- lg: "h-12 px-4 text-gdt-md [&_svg]:size-4.5",
13
- xl: "h-14 px-4.5 text-gdt-lg [&_svg]:size-5"
14
- } },
15
- defaultVariants: { size: "md" }
16
- });
17
- function PickerTrigger({ icon: Icon, displayValue, placeholder, disabled, open, size, className }) {
18
- const resolvedSize = useInputComponentSize(size);
19
- return /* @__PURE__ */ jsxs(PopoverTrigger, {
20
- disabled,
21
- "data-size": resolvedSize,
22
- className: cn(pickerTriggerVariants({ size: resolvedSize }), disabled ? "cursor-not-allowed border-line-subtle bg-surface text-fg-caption-placeholder" : open ? "border-line-focus bg-canvas text-fg-primary inset-ring-1 inset-ring-line-focus" : "border-line bg-canvas text-fg-primary hover:border-line-strong", className),
23
- children: [/* @__PURE__ */ jsx("span", {
24
- className: cn("min-w-0 truncate", !displayValue && "text-fg-caption-placeholder"),
25
- children: displayValue || placeholder
26
- }), /* @__PURE__ */ jsx(Icon, { className: cn("ml-2 shrink-0", disabled ? "text-fg-caption-placeholder" : "text-fg-secondary") })]
27
- });
28
- }
29
- function PickerFooter({ secondaryLabel, onSecondary, onApply }) {
30
- return /* @__PURE__ */ jsxs("div", {
31
- className: "flex w-full items-center justify-between border-t border-line-subtle px-4 py-3",
32
- children: [/* @__PURE__ */ jsx(Button, {
33
- variant: "tertiary-outline",
34
- size: "sm",
35
- onClick: onSecondary,
36
- children: secondaryLabel
37
- }), /* @__PURE__ */ jsx(Button, {
38
- size: "sm",
39
- onClick: onApply,
40
- children: "Apply"
41
- })]
42
- });
43
- }
44
- //#endregion
45
- export { PickerTrigger as n, PickerFooter as t };
@@ -1,11 +0,0 @@
1
- import { ReactNode } from "react";
2
- //#region src/size-context.d.ts
3
- type ComponentSize = "sm" | "md" | "lg";
4
- declare function useInheritedComponentSize(): ComponentSize | undefined;
5
- declare function SizeProvider({ children, size }: {
6
- children: ReactNode;
7
- size?: ComponentSize | null;
8
- }): import("react").JSX.Element;
9
- declare function useComponentSize(size?: ComponentSize | null, fallback?: ComponentSize): ComponentSize;
10
- //#endregion
11
- export { useInheritedComponentSize as i, SizeProvider as n, useComponentSize as r, ComponentSize as t };
@@ -1,11 +0,0 @@
1
- import { VariantProps } from "class-variance-authority";
2
- import * as React from "react";
3
- //#region src/textarea.d.ts
4
- declare const textareaVariants: (props?: ({
5
- size?: "lg" | "md" | "sm" | null | undefined;
6
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
- type TextareaProps = Omit<React.ComponentProps<"textarea">, "size"> & VariantProps<typeof textareaVariants>;
8
- type TextareaSize = NonNullable<VariantProps<typeof textareaVariants>["size"]>;
9
- declare function Textarea({ className, size, ...props }: TextareaProps): React.JSX.Element;
10
- //#endregion
11
- export { TextareaSize as n, textareaVariants as r, Textarea as t };