@giddaa-housing/ui 0.1.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 (248) hide show
  1. package/README.md +41 -0
  2. package/dist/accordion.d.ts +11 -0
  3. package/dist/accordion.js +124 -0
  4. package/dist/accordion.js.map +1 -0
  5. package/dist/alert.d.ts +18 -0
  6. package/dist/alert.js +152 -0
  7. package/dist/alert.js.map +1 -0
  8. package/dist/avatar.d.ts +14 -0
  9. package/dist/avatar.js +152 -0
  10. package/dist/avatar.js.map +1 -0
  11. package/dist/badge.d.ts +14 -0
  12. package/dist/badge.js +119 -0
  13. package/dist/badge.js.map +1 -0
  14. package/dist/bar-chart.d.ts +136 -0
  15. package/dist/bar-chart.js +302 -0
  16. package/dist/bar-chart.js.map +1 -0
  17. package/dist/base.css +32 -0
  18. package/dist/breadcrumb.d.ts +12 -0
  19. package/dist/breadcrumb.js +161 -0
  20. package/dist/breadcrumb.js.map +1 -0
  21. package/dist/bullet-chart.d.ts +98 -0
  22. package/dist/bullet-chart.js +189 -0
  23. package/dist/bullet-chart.js.map +1 -0
  24. package/dist/button-group.d.ts +18 -0
  25. package/dist/button-group.js +170 -0
  26. package/dist/button-group.js.map +1 -0
  27. package/dist/button.d.ts +19 -0
  28. package/dist/button.js +146 -0
  29. package/dist/button.js.map +1 -0
  30. package/dist/calendar.d.ts +9 -0
  31. package/dist/calendar.js +293 -0
  32. package/dist/calendar.js.map +1 -0
  33. package/dist/card.d.ts +18 -0
  34. package/dist/card.js +186 -0
  35. package/dist/card.js.map +1 -0
  36. package/dist/carousel.d.ts +53 -0
  37. package/dist/carousel.js +396 -0
  38. package/dist/carousel.js.map +1 -0
  39. package/dist/chart.d.ts +122 -0
  40. package/dist/chart.js +494 -0
  41. package/dist/chart.js.map +1 -0
  42. package/dist/checkbox.d.ts +73 -0
  43. package/dist/checkbox.js +87 -0
  44. package/dist/checkbox.js.map +1 -0
  45. package/dist/collapsible.d.ts +8 -0
  46. package/dist/collapsible.js +82 -0
  47. package/dist/collapsible.js.map +1 -0
  48. package/dist/combobox.d.ts +30 -0
  49. package/dist/combobox.js +713 -0
  50. package/dist/combobox.js.map +1 -0
  51. package/dist/date-picker.d.ts +22 -0
  52. package/dist/date-picker.js +528 -0
  53. package/dist/date-picker.js.map +1 -0
  54. package/dist/dialog.d.ts +30 -0
  55. package/dist/dialog.js +339 -0
  56. package/dist/dialog.js.map +1 -0
  57. package/dist/dropdown-menu.d.ts +35 -0
  58. package/dist/dropdown-menu.js +376 -0
  59. package/dist/dropdown-menu.js.map +1 -0
  60. package/dist/dropzone.d.ts +128 -0
  61. package/dist/dropzone.js +490 -0
  62. package/dist/dropzone.js.map +1 -0
  63. package/dist/empty-state.d.ts +17 -0
  64. package/dist/empty-state.js +146 -0
  65. package/dist/empty-state.js.map +1 -0
  66. package/dist/field.d.ts +29 -0
  67. package/dist/field.js +345 -0
  68. package/dist/field.js.map +1 -0
  69. package/dist/files/red-hat-display-latin-300-italic.woff +0 -0
  70. package/dist/files/red-hat-display-latin-300-italic.woff2 +0 -0
  71. package/dist/files/red-hat-display-latin-300-normal.woff +0 -0
  72. package/dist/files/red-hat-display-latin-300-normal.woff2 +0 -0
  73. package/dist/files/red-hat-display-latin-400-italic.woff +0 -0
  74. package/dist/files/red-hat-display-latin-400-italic.woff2 +0 -0
  75. package/dist/files/red-hat-display-latin-400-normal.woff +0 -0
  76. package/dist/files/red-hat-display-latin-400-normal.woff2 +0 -0
  77. package/dist/files/red-hat-display-latin-500-italic.woff +0 -0
  78. package/dist/files/red-hat-display-latin-500-italic.woff2 +0 -0
  79. package/dist/files/red-hat-display-latin-500-normal.woff +0 -0
  80. package/dist/files/red-hat-display-latin-500-normal.woff2 +0 -0
  81. package/dist/files/red-hat-display-latin-600-italic.woff +0 -0
  82. package/dist/files/red-hat-display-latin-600-italic.woff2 +0 -0
  83. package/dist/files/red-hat-display-latin-600-normal.woff +0 -0
  84. package/dist/files/red-hat-display-latin-600-normal.woff2 +0 -0
  85. package/dist/files/red-hat-display-latin-700-italic.woff +0 -0
  86. package/dist/files/red-hat-display-latin-700-italic.woff2 +0 -0
  87. package/dist/files/red-hat-display-latin-700-normal.woff +0 -0
  88. package/dist/files/red-hat-display-latin-700-normal.woff2 +0 -0
  89. package/dist/files/red-hat-display-latin-800-italic.woff +0 -0
  90. package/dist/files/red-hat-display-latin-800-italic.woff2 +0 -0
  91. package/dist/files/red-hat-display-latin-800-normal.woff +0 -0
  92. package/dist/files/red-hat-display-latin-800-normal.woff2 +0 -0
  93. package/dist/files/red-hat-display-latin-900-italic.woff +0 -0
  94. package/dist/files/red-hat-display-latin-900-italic.woff2 +0 -0
  95. package/dist/files/red-hat-display-latin-900-normal.woff +0 -0
  96. package/dist/files/red-hat-display-latin-900-normal.woff2 +0 -0
  97. package/dist/files/red-hat-display-latin-ext-300-italic.woff +0 -0
  98. package/dist/files/red-hat-display-latin-ext-300-italic.woff2 +0 -0
  99. package/dist/files/red-hat-display-latin-ext-300-normal.woff +0 -0
  100. package/dist/files/red-hat-display-latin-ext-300-normal.woff2 +0 -0
  101. package/dist/files/red-hat-display-latin-ext-400-italic.woff +0 -0
  102. package/dist/files/red-hat-display-latin-ext-400-italic.woff2 +0 -0
  103. package/dist/files/red-hat-display-latin-ext-400-normal.woff +0 -0
  104. package/dist/files/red-hat-display-latin-ext-400-normal.woff2 +0 -0
  105. package/dist/files/red-hat-display-latin-ext-500-italic.woff +0 -0
  106. package/dist/files/red-hat-display-latin-ext-500-italic.woff2 +0 -0
  107. package/dist/files/red-hat-display-latin-ext-500-normal.woff +0 -0
  108. package/dist/files/red-hat-display-latin-ext-500-normal.woff2 +0 -0
  109. package/dist/files/red-hat-display-latin-ext-600-italic.woff +0 -0
  110. package/dist/files/red-hat-display-latin-ext-600-italic.woff2 +0 -0
  111. package/dist/files/red-hat-display-latin-ext-600-normal.woff +0 -0
  112. package/dist/files/red-hat-display-latin-ext-600-normal.woff2 +0 -0
  113. package/dist/files/red-hat-display-latin-ext-700-italic.woff +0 -0
  114. package/dist/files/red-hat-display-latin-ext-700-italic.woff2 +0 -0
  115. package/dist/files/red-hat-display-latin-ext-700-normal.woff +0 -0
  116. package/dist/files/red-hat-display-latin-ext-700-normal.woff2 +0 -0
  117. package/dist/files/red-hat-display-latin-ext-800-italic.woff +0 -0
  118. package/dist/files/red-hat-display-latin-ext-800-italic.woff2 +0 -0
  119. package/dist/files/red-hat-display-latin-ext-800-normal.woff +0 -0
  120. package/dist/files/red-hat-display-latin-ext-800-normal.woff2 +0 -0
  121. package/dist/files/red-hat-display-latin-ext-900-italic.woff +0 -0
  122. package/dist/files/red-hat-display-latin-ext-900-italic.woff2 +0 -0
  123. package/dist/files/red-hat-display-latin-ext-900-normal.woff +0 -0
  124. package/dist/files/red-hat-display-latin-ext-900-normal.woff2 +0 -0
  125. package/dist/funnel-chart.d.ts +84 -0
  126. package/dist/funnel-chart.js +569 -0
  127. package/dist/funnel-chart.js.map +1 -0
  128. package/dist/index.d.ts +87 -0
  129. package/dist/index.js +10448 -0
  130. package/dist/index.js.map +1 -0
  131. package/dist/input-group.d.ts +31 -0
  132. package/dist/input-group.js +380 -0
  133. package/dist/input-group.js.map +1 -0
  134. package/dist/input-size-context.d.ts +11 -0
  135. package/dist/input-size-context.js +24 -0
  136. package/dist/input-size-context.js.map +1 -0
  137. package/dist/input.d.ts +13 -0
  138. package/dist/input.js +83 -0
  139. package/dist/input.js.map +1 -0
  140. package/dist/item.d.ts +8 -0
  141. package/dist/item.js +93 -0
  142. package/dist/item.js.map +1 -0
  143. package/dist/kpi-card.d.ts +24 -0
  144. package/dist/kpi-card.js +243 -0
  145. package/dist/kpi-card.js.map +1 -0
  146. package/dist/label.d.ts +8 -0
  147. package/dist/label.js +68 -0
  148. package/dist/label.js.map +1 -0
  149. package/dist/line-chart.d.ts +155 -0
  150. package/dist/line-chart.js +269 -0
  151. package/dist/line-chart.js.map +1 -0
  152. package/dist/logo.d.ts +6 -0
  153. package/dist/logo.js +146 -0
  154. package/dist/logo.js.map +1 -0
  155. package/dist/number-input.d.ts +41 -0
  156. package/dist/number-input.js +418 -0
  157. package/dist/number-input.js.map +1 -0
  158. package/dist/page-header.d.ts +13 -0
  159. package/dist/page-header.js +113 -0
  160. package/dist/page-header.js.map +1 -0
  161. package/dist/pagination.d.ts +35 -0
  162. package/dist/pagination.js +352 -0
  163. package/dist/pagination.js.map +1 -0
  164. package/dist/password-input.d.ts +13 -0
  165. package/dist/password-input.js +356 -0
  166. package/dist/password-input.js.map +1 -0
  167. package/dist/phone-input.d.ts +21 -0
  168. package/dist/phone-input.js +573 -0
  169. package/dist/phone-input.js.map +1 -0
  170. package/dist/photo-gallery.d.ts +42 -0
  171. package/dist/photo-gallery.js +756 -0
  172. package/dist/photo-gallery.js.map +1 -0
  173. package/dist/pie-chart.d.ts +125 -0
  174. package/dist/pie-chart.js +192 -0
  175. package/dist/pie-chart.js.map +1 -0
  176. package/dist/popover.d.ts +20 -0
  177. package/dist/popover.js +169 -0
  178. package/dist/popover.js.map +1 -0
  179. package/dist/progress.d.ts +28 -0
  180. package/dist/progress.js +315 -0
  181. package/dist/progress.js.map +1 -0
  182. package/dist/radio-group.d.ts +32 -0
  183. package/dist/radio-group.js +100 -0
  184. package/dist/radio-group.js.map +1 -0
  185. package/dist/red-hat-display.css +2 -0
  186. package/dist/rich-text-editor.d.ts +16 -0
  187. package/dist/rich-text-editor.js +1000 -0
  188. package/dist/rich-text-editor.js.map +1 -0
  189. package/dist/search-input.d.ts +19 -0
  190. package/dist/search-input.js +411 -0
  191. package/dist/search-input.js.map +1 -0
  192. package/dist/select.d.ts +21 -0
  193. package/dist/select.js +305 -0
  194. package/dist/select.js.map +1 -0
  195. package/dist/separator.d.ts +10 -0
  196. package/dist/separator.js +72 -0
  197. package/dist/separator.js.map +1 -0
  198. package/dist/sheet.d.ts +24 -0
  199. package/dist/sheet.js +282 -0
  200. package/dist/sheet.js.map +1 -0
  201. package/dist/sidebar.d.ts +70 -0
  202. package/dist/sidebar.js +1078 -0
  203. package/dist/sidebar.js.map +1 -0
  204. package/dist/size-context.d.ts +11 -0
  205. package/dist/size-context.js +22 -0
  206. package/dist/size-context.js.map +1 -0
  207. package/dist/skeleton.d.ts +5 -0
  208. package/dist/skeleton.js +48 -0
  209. package/dist/skeleton.js.map +1 -0
  210. package/dist/sparkline.d.ts +94 -0
  211. package/dist/sparkline.js +568 -0
  212. package/dist/sparkline.js.map +1 -0
  213. package/dist/stepper.d.ts +43 -0
  214. package/dist/stepper.js +296 -0
  215. package/dist/stepper.js.map +1 -0
  216. package/dist/styles.css +2 -0
  217. package/dist/switch.d.ts +29 -0
  218. package/dist/switch.js +108 -0
  219. package/dist/switch.js.map +1 -0
  220. package/dist/tab-list.d.ts +38 -0
  221. package/dist/tab-list.js +394 -0
  222. package/dist/tab-list.js.map +1 -0
  223. package/dist/table.d.ts +69 -0
  224. package/dist/table.js +197 -0
  225. package/dist/table.js.map +1 -0
  226. package/dist/tabs.d.ts +18 -0
  227. package/dist/tabs.js +159 -0
  228. package/dist/tabs.js.map +1 -0
  229. package/dist/tag.d.ts +25 -0
  230. package/dist/tag.js +160 -0
  231. package/dist/tag.js.map +1 -0
  232. package/dist/textarea.d.ts +12 -0
  233. package/dist/textarea.js +78 -0
  234. package/dist/textarea.js.map +1 -0
  235. package/dist/theme/giddaa.css +2 -0
  236. package/dist/time-picker.d.ts +13 -0
  237. package/dist/time-picker.js +472 -0
  238. package/dist/time-picker.js.map +1 -0
  239. package/dist/toast.d.ts +23 -0
  240. package/dist/toast.js +330 -0
  241. package/dist/toast.js.map +1 -0
  242. package/dist/tooltip.d.ts +11 -0
  243. package/dist/tooltip.js +96 -0
  244. package/dist/tooltip.js.map +1 -0
  245. package/dist/tree-map.d.ts +127 -0
  246. package/dist/tree-map.js +652 -0
  247. package/dist/tree-map.js.map +1 -0
  248. package/package.json +328 -0
@@ -0,0 +1,31 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import * as React from 'react';
4
+ import { Button } from './button.js';
5
+ import { InputSize } from './input.js';
6
+ import { TextareaSize } from './textarea.js';
7
+ import '@base-ui/react/button';
8
+ import './input-size-context.js';
9
+
10
+ declare function InputGroup({ className, size, ...props }: React.ComponentProps<"div"> & {
11
+ size?: InputSize;
12
+ }): React.JSX.Element;
13
+ declare const inputGroupAddonVariants: (props?: ({
14
+ align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
15
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
16
+ declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
17
+ declare const inputGroupButtonVariants: (props?: ({
18
+ size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
19
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
20
+ declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size" | "type"> & VariantProps<typeof inputGroupButtonVariants> & {
21
+ type?: "button" | "submit" | "reset";
22
+ }): React.JSX.Element;
23
+ declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
24
+ declare function InputGroupInput({ className, size, ...props }: Omit<React.ComponentProps<"input">, "size"> & {
25
+ size?: InputSize;
26
+ }): React.JSX.Element;
27
+ declare function InputGroupTextarea({ className, size, ...props }: Omit<React.ComponentProps<"textarea">, "size"> & {
28
+ size?: TextareaSize;
29
+ }): React.JSX.Element;
30
+
31
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
@@ -0,0 +1,380 @@
1
+ // src/components/ui/input-group.tsx
2
+ import { cva as cva4 } from "class-variance-authority";
3
+
4
+ // src/lib/cn.ts
5
+ import { clsx } from "clsx";
6
+ import { extendTailwindMerge } from "tailwind-merge";
7
+ var twMerge = extendTailwindMerge({
8
+ extend: {
9
+ classGroups: {
10
+ "font-size": [
11
+ {
12
+ text: [
13
+ "gdt-display",
14
+ "gdt-h1",
15
+ "gdt-h2",
16
+ "gdt-h3",
17
+ "gdt-h4",
18
+ "gdt-h5",
19
+ "gdt-xl",
20
+ "gdt-lg",
21
+ "gdt-md",
22
+ "gdt-sm",
23
+ "gdt-xs",
24
+ "gdt-subtext",
25
+ "gdt-capitalized"
26
+ ]
27
+ }
28
+ ]
29
+ }
30
+ }
31
+ });
32
+ function cn(...inputs) {
33
+ return twMerge(clsx(inputs));
34
+ }
35
+
36
+ // src/components/ui/button.tsx
37
+ import { Button as ButtonPrimitive } from "@base-ui/react/button";
38
+ import { cva } from "class-variance-authority";
39
+ import { Loader } from "lucide-react";
40
+
41
+ // src/components/ui/size-context.tsx
42
+ import { createContext, useContext } from "react";
43
+ import { Fragment, jsx } from "react/jsx-runtime";
44
+ var SizeContext = createContext(void 0);
45
+ function SizeProvider({
46
+ children,
47
+ size
48
+ }) {
49
+ if (!size) {
50
+ return /* @__PURE__ */ jsx(Fragment, { children });
51
+ }
52
+ return /* @__PURE__ */ jsx(SizeContext.Provider, { value: size, children });
53
+ }
54
+ function useComponentSize(size, fallback = "md") {
55
+ const inheritedSize = useContext(SizeContext);
56
+ return size ?? inheritedSize ?? fallback;
57
+ }
58
+
59
+ // src/components/ui/button.tsx
60
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
61
+ var buttonVariants = cva(
62
+ "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,transform] 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 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-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
63
+ {
64
+ variants: {
65
+ variant: {
66
+ primary: "bg-action-primary text-fg-on-brand hover:bg-action-primary-hover active:bg-action-primary-pressed",
67
+ "primary-outline": "border-2 border-action-primary bg-transparent text-fg-brand hover:bg-surface-brand-subtle active:bg-surface-brand-subtle data-focused:bg-surface-brand-subtle data-pressed:bg-surface-brand-subtle",
68
+ secondary: "bg-surface-brand-subtle text-fg-brand hover:bg-action-primary-hover hover:text-fg-on-brand active:bg-action-primary-pressed active:text-fg-on-brand data-focused:bg-action-primary-hover data-pressed:bg-action-primary-pressed data-focused:text-fg-on-brand data-pressed:text-fg-on-brand",
69
+ "secondary-outline": "border-2 border-action-secondary bg-transparent text-fg-brand hover:bg-surface-brand-subtle active:bg-surface-brand-subtle data-focused:bg-surface-brand-subtle data-pressed:bg-surface-brand-subtle",
70
+ tertiary: "bg-action-tertiary text-fg-primary hover:bg-action-tertiary-hover active:bg-action-tertiary-pressed data-focused:bg-action-tertiary-hover data-pressed:bg-action-tertiary-pressed",
71
+ "tertiary-outline": "border border-line-strong bg-transparent text-fg-primary hover:bg-surface active:bg-surface-raised data-focused:bg-surface data-pressed:bg-surface-raised",
72
+ ghost: "bg-transparent text-fg-primary hover:bg-surface active:bg-surface-raised data-focused:bg-surface data-pressed:bg-surface-raised",
73
+ danger: "bg-action-danger text-fg-on-brand hover:bg-action-danger-hover active:bg-action-danger-pressed data-focused:bg-action-danger-hover data-pressed:bg-action-danger-pressed",
74
+ "glass-overlay": "bg-surface-glass-overlay-button text-fg-on-brand",
75
+ "link-brand": "border-transparent bg-transparent px-0 text-fg-brand hover:underline active:underline active:opacity-70",
76
+ "link-neutral": "border-transparent bg-transparent px-0 text-fg-secondary hover:underline active:underline active:opacity-70"
77
+ },
78
+ size: {
79
+ sm: "h-8 gap-2 px-3.5 text-gdt-xs has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3 [&_svg:not([class*='size-'])]:size-3.5",
80
+ md: "h-10 gap-2 px-4.5 text-gdt-sm has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
81
+ lg: "h-12.5 gap-2.5 px-5.5 text-gdt-md has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5 [&_svg:not([class*='size-'])]:size-4.5",
82
+ xl: "h-14 gap-3 px-6.5 text-gdt-lg has-data-[icon=inline-end]:pr-6 has-data-[icon=inline-start]:pl-6 [&_svg:not([class*='size-'])]:size-5",
83
+ icon: "size-10",
84
+ "icon-xs": "size-6 text-gdt-xs [&_svg:not([class*='size-'])]:size-3",
85
+ "icon-sm": "size-8 text-gdt-sm [&_svg:not([class*='size-'])]:size-3.5",
86
+ "icon-lg": "size-12.5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5",
87
+ "icon-xl": "size-14 text-gdt-lg [&_svg:not([class*='size-'])]:size-5"
88
+ }
89
+ },
90
+ defaultVariants: {
91
+ variant: "primary",
92
+ size: "md"
93
+ }
94
+ }
95
+ );
96
+ function Button({
97
+ className,
98
+ variant = "primary",
99
+ size,
100
+ isLoading = false,
101
+ children,
102
+ disabled = false,
103
+ ...props
104
+ }) {
105
+ const inheritedSize = useComponentSize();
106
+ const resolvedSize = size ?? inheritedSize;
107
+ const _disabled = disabled || isLoading;
108
+ return /* @__PURE__ */ jsxs(
109
+ ButtonPrimitive,
110
+ {
111
+ "data-slot": "button",
112
+ className: cn(buttonVariants({ variant, size: resolvedSize, className })),
113
+ disabled: _disabled,
114
+ ...props,
115
+ children: [
116
+ isLoading && /* @__PURE__ */ jsx2(Loader, { className: "size-4 animate-spin" }),
117
+ " ",
118
+ children
119
+ ]
120
+ }
121
+ );
122
+ }
123
+
124
+ // src/components/ui/input.tsx
125
+ import { Input as InputPrimitive } from "@base-ui/react/input";
126
+ import { cva as cva2 } from "class-variance-authority";
127
+
128
+ // src/components/ui/input-size-context.tsx
129
+ import { createContext as createContext2, useContext as useContext2 } from "react";
130
+ import { Fragment as Fragment2, jsx as jsx3 } from "react/jsx-runtime";
131
+ var InputSizeContext = createContext2(
132
+ void 0
133
+ );
134
+ function InputSizeProvider({
135
+ children,
136
+ size
137
+ }) {
138
+ if (!size) {
139
+ return /* @__PURE__ */ jsx3(Fragment2, { children });
140
+ }
141
+ return /* @__PURE__ */ jsx3(InputSizeContext.Provider, { value: size, children });
142
+ }
143
+ function useInputComponentSize(size, fallback = "md") {
144
+ const inheritedSize = useContext2(InputSizeContext);
145
+ return size ?? inheritedSize ?? fallback;
146
+ }
147
+
148
+ // src/components/ui/input.tsx
149
+ import { jsx as jsx4 } from "react/jsx-runtime";
150
+ var inputVariants = cva2(
151
+ "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-muted hover:border-line-strong focus-visible:border-line-focus focus-visible:inset-ring-1 inset-ring-line-focus disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-line-subtle disabled:bg-surface disabled:text-fg-muted disabled:placeholder:text-fg-muted aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:placeholder:text-fg-danger aria-invalid:shadow-none",
152
+ {
153
+ variants: {
154
+ size: {
155
+ sm: "h-8 px-3 text-gdt-xs font-normal file:text-gdt-xs",
156
+ md: "h-10 px-3.5 text-gdt-sm font-normal file:text-gdt-sm",
157
+ lg: "h-12 px-4 text-gdt-md font-normal file:text-gdt-md",
158
+ xl: "h-14 px-4.5 text-gdt-lg font-normal file:text-gdt-lg"
159
+ }
160
+ },
161
+ defaultVariants: {
162
+ size: "md"
163
+ }
164
+ }
165
+ );
166
+ function Input({ className, size, type, ...props }) {
167
+ const resolvedSize = useInputComponentSize(size);
168
+ return /* @__PURE__ */ jsx4(
169
+ InputPrimitive,
170
+ {
171
+ type,
172
+ "data-slot": "input",
173
+ "data-size": resolvedSize,
174
+ className: cn(inputVariants({ size: resolvedSize }), className),
175
+ ...props
176
+ }
177
+ );
178
+ }
179
+
180
+ // src/components/ui/textarea.tsx
181
+ import { cva as cva3 } from "class-variance-authority";
182
+ import { jsx as jsx5 } from "react/jsx-runtime";
183
+ var textareaVariants = cva3(
184
+ "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 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",
185
+ {
186
+ variants: {
187
+ size: {
188
+ sm: "min-h-22 px-3 py-2 text-gdt-xs",
189
+ md: "min-h-26 px-3.5 py-2.5 text-gdt-sm",
190
+ lg: "min-h-31 px-4 py-3 text-gdt-md"
191
+ }
192
+ },
193
+ defaultVariants: {
194
+ size: "md"
195
+ }
196
+ }
197
+ );
198
+ function Textarea({ className, size, ...props }) {
199
+ const resolvedSize = useComponentSize(size);
200
+ return /* @__PURE__ */ jsx5(
201
+ "textarea",
202
+ {
203
+ "data-slot": "textarea",
204
+ "data-size": resolvedSize,
205
+ className: cn(textareaVariants({ size: resolvedSize }), className),
206
+ ...props
207
+ }
208
+ );
209
+ }
210
+
211
+ // src/components/ui/input-group.tsx
212
+ import { jsx as jsx6 } from "react/jsx-runtime";
213
+ var inputGroupVariants = cva4(
214
+ "group/input-group relative flex w-full min-w-0 items-center 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-muted focus-within:border-line-focus focus-within:inset-ring-1 inset-ring-line-focus has-[[data-slot][aria-invalid=true]]:border-line-danger has-[[data-slot][aria-invalid=true]]:inset-shadow-none 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",
215
+ {
216
+ variants: {
217
+ size: {
218
+ sm: "h-8",
219
+ md: "h-10",
220
+ lg: "h-12",
221
+ xl: "h-14"
222
+ }
223
+ },
224
+ defaultVariants: {
225
+ size: "md"
226
+ }
227
+ }
228
+ );
229
+ function InputGroup({
230
+ className,
231
+ size,
232
+ ...props
233
+ }) {
234
+ const inheritedSize = useComponentSize();
235
+ const resolvedSize = size ?? inheritedSize;
236
+ const componentSize = resolvedSize === "xl" ? void 0 : resolvedSize;
237
+ return /* @__PURE__ */ jsx6(SizeProvider, { size: componentSize, children: /* @__PURE__ */ jsx6(InputSizeProvider, { size: resolvedSize, children: /* @__PURE__ */ jsx6(
238
+ "div",
239
+ {
240
+ "data-slot": "input-group",
241
+ "data-size": resolvedSize,
242
+ role: "group",
243
+ className: cn(inputGroupVariants({ size: resolvedSize }), className),
244
+ ...props
245
+ }
246
+ ) }) });
247
+ }
248
+ var inputGroupAddonVariants = cva4(
249
+ "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",
250
+ {
251
+ variants: {
252
+ align: {
253
+ "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]",
254
+ "inline-end": "order-last group-data-[size=sm]/input-group:pr-3 group-data-[size=md]/input-group:pr-3.5 group-data-[size=lg]/input-group:pr-4 group-data-[size=xl]/input-group:pr-4.5 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
255
+ "block-start": "order-first w-full justify-start px-3 group-data-[size=md]/input-group:px-3.5 group-data-[size=lg]/input-group:px-4 group-data-[size=xl]/input-group:px-4.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
256
+ "block-end": "order-last w-full justify-start px-3 group-data-[size=md]/input-group:px-3.5 group-data-[size=lg]/input-group:px-4 group-data-[size=xl]/input-group:px-4.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
257
+ }
258
+ },
259
+ defaultVariants: {
260
+ align: "inline-start"
261
+ }
262
+ }
263
+ );
264
+ function InputGroupAddon({
265
+ className,
266
+ align = "inline-start",
267
+ ...props
268
+ }) {
269
+ return (
270
+ // biome-ignore lint/a11y/useSemanticElements: addon is a structural wrapper for grouped input affordances.
271
+ // biome-ignore lint/a11y/useKeyWithClickEvents: click only forwards focus to the sibling input and is not a standalone action target.
272
+ /* @__PURE__ */ jsx6(
273
+ "div",
274
+ {
275
+ role: "group",
276
+ "data-slot": "input-group-addon",
277
+ "data-align": align,
278
+ className: cn(inputGroupAddonVariants({ align }), className),
279
+ onClick: (e) => {
280
+ if (e.target.closest("button")) {
281
+ return;
282
+ }
283
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
284
+ },
285
+ ...props
286
+ }
287
+ )
288
+ );
289
+ }
290
+ var inputGroupButtonVariants = cva4(
291
+ "flex items-center gap-2 text-sm shadow-none rounded-full",
292
+ {
293
+ variants: {
294
+ size: {
295
+ xs: "h-6 gap-1 px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
296
+ sm: "",
297
+ "icon-xs": "size-6 p-0 has-[>svg]:p-0",
298
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
299
+ }
300
+ },
301
+ defaultVariants: {
302
+ size: "xs"
303
+ }
304
+ }
305
+ );
306
+ function InputGroupButton({
307
+ className,
308
+ type = "button",
309
+ variant = "ghost",
310
+ size = "xs",
311
+ ...props
312
+ }) {
313
+ return /* @__PURE__ */ jsx6(
314
+ Button,
315
+ {
316
+ type,
317
+ "data-size": size,
318
+ variant,
319
+ className: cn(inputGroupButtonVariants({ size }), className),
320
+ ...props
321
+ }
322
+ );
323
+ }
324
+ function InputGroupText({ className, ...props }) {
325
+ return /* @__PURE__ */ jsx6(
326
+ "span",
327
+ {
328
+ className: cn(
329
+ "flex items-center gap-2 text-gdt-sm text-fg-secondary [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
330
+ className
331
+ ),
332
+ ...props
333
+ }
334
+ );
335
+ }
336
+ function InputGroupInput({
337
+ className,
338
+ size,
339
+ ...props
340
+ }) {
341
+ return /* @__PURE__ */ jsx6(
342
+ Input,
343
+ {
344
+ "data-slot": "input-group-control",
345
+ size,
346
+ className: cn(
347
+ "flex-1 rounded-none border-0 bg-transparent shadow-none inset-shadow-none inset-ring-0 focus:border-transparent focus:shadow-none focus:inset-shadow-none focus-visible:border-transparent focus-visible:shadow-none focus-visible:ring-0 focus-visible:inset-ring-0 focus-visible:inset-shadow-none disabled:bg-transparent aria-invalid:ring-0 aria-invalid:inset-ring-0 dark:bg-transparent dark:disabled:bg-transparent",
348
+ className
349
+ ),
350
+ ...props
351
+ }
352
+ );
353
+ }
354
+ function InputGroupTextarea({
355
+ className,
356
+ size,
357
+ ...props
358
+ }) {
359
+ return /* @__PURE__ */ jsx6(
360
+ Textarea,
361
+ {
362
+ "data-slot": "input-group-control",
363
+ size,
364
+ className: cn(
365
+ "flex-1 resize-none rounded-none border-0 bg-transparent shadow-none inset-shadow-none inset-ring-0 focus:border-transparent focus:shadow-none focus:inset-shadow-none focus-visible:border-transparent focus-visible:shadow-none focus-visible:ring-0 focus-visible:inset-ring-0 focus-visible:inset-shadow-none disabled:bg-transparent aria-invalid:ring-0 aria-invalid:inset-ring-0 dark:bg-transparent dark:disabled:bg-transparent",
366
+ className
367
+ ),
368
+ ...props
369
+ }
370
+ );
371
+ }
372
+ export {
373
+ InputGroup,
374
+ InputGroupAddon,
375
+ InputGroupButton,
376
+ InputGroupInput,
377
+ InputGroupText,
378
+ InputGroupTextarea
379
+ };
380
+ //# sourceMappingURL=input-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/input-group.tsx","../src/lib/cn.ts","../src/components/ui/button.tsx","../src/components/ui/size-context.tsx","../src/components/ui/input.tsx","../src/components/ui/input-size-context.tsx","../src/components/ui/textarea.tsx"],"sourcesContent":["\"use client\";\n\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\nimport { cn } from \"../../lib/cn\";\nimport { Button } from \"./button\";\nimport { Input, type InputSize } from \"./input\";\nimport { InputSizeProvider } from \"./input-size-context\";\nimport {\n\ttype ComponentSize,\n\tSizeProvider,\n\tuseComponentSize,\n} from \"./size-context\";\nimport { Textarea, type TextareaSize } from \"./textarea\";\n\nconst inputGroupVariants = cva(\n\t\"group/input-group relative flex w-full min-w-0 items-center 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-muted focus-within:border-line-focus focus-within:inset-ring-1 inset-ring-line-focus has-[[data-slot][aria-invalid=true]]:border-line-danger has-[[data-slot][aria-invalid=true]]:inset-shadow-none 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\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"h-8\",\n\t\t\t\tmd: \"h-10\",\n\t\t\t\tlg: \"h-12\",\n\t\t\t\txl: \"h-14\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\nfunction InputGroup({\n\tclassName,\n\tsize,\n\t...props\n}: React.ComponentProps<\"div\"> & { size?: InputSize }) {\n\tconst inheritedSize = useComponentSize();\n\tconst resolvedSize = size ?? inheritedSize;\n\tconst componentSize: ComponentSize | undefined =\n\t\tresolvedSize === \"xl\" ? undefined : resolvedSize;\n\n\treturn (\n\t\t<SizeProvider size={componentSize}>\n\t\t\t<InputSizeProvider size={resolvedSize}>\n\t\t\t\t{/* biome-ignore lint/a11y/useSemanticElements: this primitive groups composite controls without forcing fieldset semantics. */}\n\t\t\t\t<div\n\t\t\t\t\tdata-slot=\"input-group\"\n\t\t\t\t\tdata-size={resolvedSize}\n\t\t\t\t\trole=\"group\"\n\t\t\t\t\tclassName={cn(inputGroupVariants({ size: resolvedSize }), className)}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t</InputSizeProvider>\n\t\t</SizeProvider>\n\t);\n}\n\nconst inputGroupAddonVariants = cva(\n\t\"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\",\n\t{\n\t\tvariants: {\n\t\t\talign: {\n\t\t\t\t\"inline-start\":\n\t\t\t\t\t\"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]\",\n\t\t\t\t\"inline-end\":\n\t\t\t\t\t\"order-last group-data-[size=sm]/input-group:pr-3 group-data-[size=md]/input-group:pr-3.5 group-data-[size=lg]/input-group:pr-4 group-data-[size=xl]/input-group:pr-4.5 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]\",\n\t\t\t\t\"block-start\":\n\t\t\t\t\t\"order-first w-full justify-start px-3 group-data-[size=md]/input-group:px-3.5 group-data-[size=lg]/input-group:px-4 group-data-[size=xl]/input-group:px-4.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2\",\n\t\t\t\t\"block-end\":\n\t\t\t\t\t\"order-last w-full justify-start px-3 group-data-[size=md]/input-group:px-3.5 group-data-[size=lg]/input-group:px-4 group-data-[size=xl]/input-group:px-4.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\talign: \"inline-start\",\n\t\t},\n\t},\n);\n\nfunction InputGroupAddon({\n\tclassName,\n\talign = \"inline-start\",\n\t...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n\treturn (\n\t\t// biome-ignore lint/a11y/useSemanticElements: addon is a structural wrapper for grouped input affordances.\n\t\t// biome-ignore lint/a11y/useKeyWithClickEvents: click only forwards focus to the sibling input and is not a standalone action target.\n\t\t<div\n\t\t\trole=\"group\"\n\t\t\tdata-slot=\"input-group-addon\"\n\t\t\tdata-align={align}\n\t\t\tclassName={cn(inputGroupAddonVariants({ align }), className)}\n\t\t\tonClick={(e) => {\n\t\t\t\tif ((e.target as HTMLElement).closest(\"button\")) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\te.currentTarget.parentElement?.querySelector(\"input\")?.focus();\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst inputGroupButtonVariants = cva(\n\t\"flex items-center gap-2 text-sm shadow-none rounded-full\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\txs: \"h-6 gap-1 px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n\t\t\t\tsm: \"\",\n\t\t\t\t\"icon-xs\": \"size-6 p-0 has-[>svg]:p-0\",\n\t\t\t\t\"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"xs\",\n\t\t},\n\t},\n);\n\nfunction InputGroupButton({\n\tclassName,\n\ttype = \"button\",\n\tvariant = \"ghost\",\n\tsize = \"xs\",\n\t...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\" | \"type\"> &\n\tVariantProps<typeof inputGroupButtonVariants> & {\n\t\ttype?: \"button\" | \"submit\" | \"reset\";\n\t}) {\n\treturn (\n\t\t<Button\n\t\t\ttype={type}\n\t\t\tdata-size={size}\n\t\t\tvariant={variant}\n\t\t\tclassName={cn(inputGroupButtonVariants({ size }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\n\t\t\t\t\"flex items-center gap-2 text-gdt-sm text-fg-secondary [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction InputGroupInput({\n\tclassName,\n\tsize,\n\t...props\n}: Omit<React.ComponentProps<\"input\">, \"size\"> & { size?: InputSize }) {\n\treturn (\n\t\t<Input\n\t\t\tdata-slot=\"input-group-control\"\n\t\t\tsize={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex-1 rounded-none border-0 bg-transparent shadow-none inset-shadow-none inset-ring-0 focus:border-transparent focus:shadow-none focus:inset-shadow-none focus-visible:border-transparent focus-visible:shadow-none focus-visible:ring-0 focus-visible:inset-ring-0 focus-visible:inset-shadow-none disabled:bg-transparent aria-invalid:ring-0 aria-invalid:inset-ring-0 dark:bg-transparent dark:disabled:bg-transparent\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction InputGroupTextarea({\n\tclassName,\n\tsize,\n\t...props\n}: Omit<React.ComponentProps<\"textarea\">, \"size\"> & { size?: TextareaSize }) {\n\treturn (\n\t\t<Textarea\n\t\t\tdata-slot=\"input-group-control\"\n\t\t\tsize={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex-1 resize-none rounded-none border-0 bg-transparent shadow-none inset-shadow-none inset-ring-0 focus:border-transparent focus:shadow-none focus:inset-shadow-none focus-visible:border-transparent focus-visible:shadow-none focus-visible:ring-0 focus-visible:inset-ring-0 focus-visible:inset-shadow-none disabled:bg-transparent aria-invalid:ring-0 aria-invalid:inset-ring-0 dark:bg-transparent dark:disabled:bg-transparent\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tInputGroup,\n\tInputGroupAddon,\n\tInputGroupButton,\n\tInputGroupText,\n\tInputGroupInput,\n\tInputGroupTextarea,\n};\n","import { type ClassValue, clsx } from \"clsx\";\nimport { extendTailwindMerge } from \"tailwind-merge\";\n\nconst twMerge = extendTailwindMerge({\n\textend: {\n\t\tclassGroups: {\n\t\t\t\"font-size\": [\n\t\t\t\t{\n\t\t\t\t\ttext: [\n\t\t\t\t\t\t\"gdt-display\",\n\t\t\t\t\t\t\"gdt-h1\",\n\t\t\t\t\t\t\"gdt-h2\",\n\t\t\t\t\t\t\"gdt-h3\",\n\t\t\t\t\t\t\"gdt-h4\",\n\t\t\t\t\t\t\"gdt-h5\",\n\t\t\t\t\t\t\"gdt-xl\",\n\t\t\t\t\t\t\"gdt-lg\",\n\t\t\t\t\t\t\"gdt-md\",\n\t\t\t\t\t\t\"gdt-sm\",\n\t\t\t\t\t\t\"gdt-xs\",\n\t\t\t\t\t\t\"gdt-subtext\",\n\t\t\t\t\t\t\"gdt-capitalized\",\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n});\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","import { Button as ButtonPrimitive } from \"@base-ui/react/button\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Loader } from \"lucide-react\";\nimport type * as React from \"react\";\nimport { cn } from \"../../lib/cn\";\nimport { useComponentSize } from \"./size-context\";\n\nconst buttonVariants = cva(\n\t\"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,transform] 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 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-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tprimary:\n\t\t\t\t\t\"bg-action-primary text-fg-on-brand hover:bg-action-primary-hover active:bg-action-primary-pressed\",\n\t\t\t\t\"primary-outline\":\n\t\t\t\t\t\"border-2 border-action-primary bg-transparent text-fg-brand hover:bg-surface-brand-subtle active:bg-surface-brand-subtle data-focused:bg-surface-brand-subtle data-pressed:bg-surface-brand-subtle\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"bg-surface-brand-subtle text-fg-brand hover:bg-action-primary-hover hover:text-fg-on-brand active:bg-action-primary-pressed active:text-fg-on-brand data-focused:bg-action-primary-hover data-pressed:bg-action-primary-pressed data-focused:text-fg-on-brand data-pressed:text-fg-on-brand\",\n\t\t\t\t\"secondary-outline\":\n\t\t\t\t\t\"border-2 border-action-secondary bg-transparent text-fg-brand hover:bg-surface-brand-subtle active:bg-surface-brand-subtle data-focused:bg-surface-brand-subtle data-pressed:bg-surface-brand-subtle\",\n\t\t\t\ttertiary:\n\t\t\t\t\t\"bg-action-tertiary text-fg-primary hover:bg-action-tertiary-hover active:bg-action-tertiary-pressed data-focused:bg-action-tertiary-hover data-pressed:bg-action-tertiary-pressed\",\n\t\t\t\t\"tertiary-outline\":\n\t\t\t\t\t\"border border-line-strong bg-transparent text-fg-primary hover:bg-surface active:bg-surface-raised data-focused:bg-surface data-pressed:bg-surface-raised\",\n\t\t\t\tghost:\n\t\t\t\t\t\"bg-transparent text-fg-primary hover:bg-surface active:bg-surface-raised data-focused:bg-surface data-pressed:bg-surface-raised\",\n\t\t\t\tdanger:\n\t\t\t\t\t\"bg-action-danger text-fg-on-brand hover:bg-action-danger-hover active:bg-action-danger-pressed data-focused:bg-action-danger-hover data-pressed:bg-action-danger-pressed\",\n\t\t\t\t\"glass-overlay\": \"bg-surface-glass-overlay-button text-fg-on-brand\",\n\t\t\t\t\"link-brand\":\n\t\t\t\t\t\"border-transparent bg-transparent px-0 text-fg-brand hover:underline active:underline active:opacity-70\",\n\t\t\t\t\"link-neutral\":\n\t\t\t\t\t\"border-transparent bg-transparent px-0 text-fg-secondary hover:underline active:underline active:opacity-70\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tsm: \"h-8 gap-2 px-3.5 text-gdt-xs has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3 [&_svg:not([class*='size-'])]:size-3.5\",\n\t\t\t\tmd: \"h-10 gap-2 px-4.5 text-gdt-sm has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4\",\n\t\t\t\tlg: \"h-12.5 gap-2.5 px-5.5 text-gdt-md has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5 [&_svg:not([class*='size-'])]:size-4.5\",\n\t\t\t\txl: \"h-14 gap-3 px-6.5 text-gdt-lg has-data-[icon=inline-end]:pr-6 has-data-[icon=inline-start]:pl-6 [&_svg:not([class*='size-'])]:size-5\",\n\t\t\t\ticon: \"size-10\",\n\t\t\t\t\"icon-xs\": \"size-6 text-gdt-xs [&_svg:not([class*='size-'])]:size-3\",\n\t\t\t\t\"icon-sm\": \"size-8 text-gdt-sm [&_svg:not([class*='size-'])]:size-3.5\",\n\t\t\t\t\"icon-lg\":\n\t\t\t\t\t\"size-12.5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5\",\n\t\t\t\t\"icon-xl\": \"size-14 text-gdt-lg [&_svg:not([class*='size-'])]:size-5\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"primary\",\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\ntype ButtonSize = NonNullable<VariantProps<typeof buttonVariants>[\"size\"]>;\n\nfunction Button({\n\tclassName,\n\tvariant = \"primary\",\n\tsize,\n\tisLoading = false,\n\tchildren,\n\tdisabled = false,\n\t...props\n}: ButtonPrimitive.Props &\n\tVariantProps<typeof buttonVariants> & { isLoading?: boolean }) {\n\tconst inheritedSize = useComponentSize();\n\tconst resolvedSize = size ?? inheritedSize;\n\tconst _disabled = disabled || isLoading;\n\treturn (\n\t\t<ButtonPrimitive\n\t\t\tdata-slot=\"button\"\n\t\t\tclassName={cn(buttonVariants({ variant, size: resolvedSize, className }))}\n\t\t\tdisabled={_disabled}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isLoading && <Loader className=\"size-4 animate-spin\" />} {children}\n\t\t</ButtonPrimitive>\n\t);\n}\n\ntype ButtonLinkProps = Omit<React.ComponentProps<\"a\">, \"href\"> &\n\tVariantProps<typeof buttonVariants> & {\n\t\tdisabled?: boolean;\n\t\thref: string;\n\t};\n\nfunction ButtonLink({\n\tclassName,\n\thref,\n\tvariant = \"primary\",\n\tsize,\n\tdisabled = false,\n\tonClick,\n\t...props\n}: ButtonLinkProps) {\n\tconst inheritedSize = useComponentSize();\n\tconst resolvedSize: ButtonSize = size ?? inheritedSize;\n\n\treturn (\n\t\t<a\n\t\t\tdata-slot=\"button-link\"\n\t\t\thref={href}\n\t\t\taria-disabled={disabled}\n\t\t\ttabIndex={disabled ? -1 : props.tabIndex}\n\t\t\tclassName={cn(buttonVariants({ variant, size: resolvedSize, className }))}\n\t\t\tonClick={(event) => {\n\t\t\t\tif (disabled) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tonClick?.(event);\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Button, ButtonLink, buttonVariants };\n","\"use client\";\n\nimport { createContext, type ReactNode, useContext } from \"react\";\n\ntype ComponentSize = \"sm\" | \"md\" | \"lg\";\n\nconst SizeContext = createContext<ComponentSize | undefined>(undefined);\n\nfunction SizeProvider({\n\tchildren,\n\tsize,\n}: {\n\tchildren: ReactNode;\n\tsize?: ComponentSize | null;\n}) {\n\tif (!size) {\n\t\treturn <>{children}</>;\n\t}\n\n\treturn <SizeContext.Provider value={size}>{children}</SizeContext.Provider>;\n}\n\nfunction useComponentSize(\n\tsize?: ComponentSize | null,\n\tfallback: ComponentSize = \"md\",\n) {\n\tconst inheritedSize = useContext(SizeContext);\n\treturn size ?? inheritedSize ?? fallback;\n}\n\nexport { SizeProvider, useComponentSize, type ComponentSize };\n","import { Input as InputPrimitive } from \"@base-ui/react/input\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../lib/cn\";\nimport {\n\ttype InputComponentSize,\n\tuseInputComponentSize,\n} from \"./input-size-context\";\n\nconst inputVariants = cva(\n\t\"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-muted hover:border-line-strong focus-visible:border-line-focus focus-visible:inset-ring-1 inset-ring-line-focus disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-line-subtle disabled:bg-surface disabled:text-fg-muted disabled:placeholder:text-fg-muted aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:placeholder:text-fg-danger aria-invalid:shadow-none\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"h-8 px-3 text-gdt-xs font-normal file:text-gdt-xs\",\n\t\t\t\tmd: \"h-10 px-3.5 text-gdt-sm font-normal file:text-gdt-sm\",\n\t\t\t\tlg: \"h-12 px-4 text-gdt-md font-normal file:text-gdt-md\",\n\t\t\t\txl: \"h-14 px-4.5 text-gdt-lg font-normal file:text-gdt-lg\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\ntype InputProps = Omit<React.ComponentProps<\"input\">, \"size\"> &\n\tVariantProps<typeof inputVariants>;\n\ntype InputSize = InputComponentSize;\n\nfunction Input({ className, size, type, ...props }: InputProps) {\n\tconst resolvedSize = useInputComponentSize(size);\n\n\treturn (\n\t\t<InputPrimitive\n\t\t\ttype={type}\n\t\t\tdata-slot=\"input\"\n\t\t\tdata-size={resolvedSize}\n\t\t\tclassName={cn(inputVariants({ size: resolvedSize }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Input, inputVariants, type InputSize };\n","\"use client\";\n\nimport { createContext, type ReactNode, useContext } from \"react\";\n\ntype InputComponentSize = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\nconst InputSizeContext = createContext<InputComponentSize | undefined>(\n\tundefined,\n);\n\nfunction InputSizeProvider({\n\tchildren,\n\tsize,\n}: {\n\tchildren: ReactNode;\n\tsize?: InputComponentSize | null;\n}) {\n\tif (!size) {\n\t\treturn <>{children}</>;\n\t}\n\n\treturn (\n\t\t<InputSizeContext.Provider value={size}>\n\t\t\t{children}\n\t\t</InputSizeContext.Provider>\n\t);\n}\n\nfunction useInputComponentSize(\n\tsize?: InputComponentSize | null,\n\tfallback: InputComponentSize = \"md\",\n) {\n\tconst inheritedSize = useContext(InputSizeContext);\n\treturn size ?? inheritedSize ?? fallback;\n}\n\nexport { InputSizeProvider, useInputComponentSize, type InputComponentSize };\n","import { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../lib/cn\";\nimport { useComponentSize } from \"./size-context\";\n\nconst textareaVariants = cva(\n\t\"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 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\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"min-h-22 px-3 py-2 text-gdt-xs\",\n\t\t\t\tmd: \"min-h-26 px-3.5 py-2.5 text-gdt-sm\",\n\t\t\t\tlg: \"min-h-31 px-4 py-3 text-gdt-md\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\ntype TextareaProps = Omit<React.ComponentProps<\"textarea\">, \"size\"> &\n\tVariantProps<typeof textareaVariants>;\n\ntype TextareaSize = NonNullable<VariantProps<typeof textareaVariants>[\"size\"]>;\n\nfunction Textarea({ className, size, ...props }: TextareaProps) {\n\tconst resolvedSize = useComponentSize(size);\n\n\treturn (\n\t\t<textarea\n\t\t\tdata-slot=\"textarea\"\n\t\t\tdata-size={resolvedSize}\n\t\t\tclassName={cn(textareaVariants({ size: resolvedSize }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Textarea, textareaVariants, type TextareaSize };\n"],"mappings":";AAEA,SAAS,OAAAA,YAA8B;;;ACFvC,SAA0B,YAAY;AACtC,SAAS,2BAA2B;AAEpC,IAAM,UAAU,oBAAoB;AAAA,EACnC,QAAQ;AAAA,IACP,aAAa;AAAA,MACZ,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,YACL;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,E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;AAAA,MACA,WAAW,GAAG,yBAAyB,EAAE,KAAK,CAAC,GAAG,SAAS;AAAA,MAC1D,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,MAAM,GAAiC;AAC9E,SACC,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACA,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,gBAAgB;AAAA,EACxB;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAuE;AACtE,SACC,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV;AAAA,MACA,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;AAEA,SAAS,mBAAmB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAA6E;AAC5E,SACC,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACA,aAAU;AAAA,MACV;AAAA,MACA,WAAW;AAAA,QACV;AAAA,QACA;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACL;AAEF;","names":["cva","jsx","cva","createContext","useContext","Fragment","jsx","jsx","cva","cva","jsx","cva","jsx","cva"]}
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { ReactNode } from 'react';
3
+
4
+ type InputComponentSize = "sm" | "md" | "lg" | "xl";
5
+ declare function InputSizeProvider({ children, size, }: {
6
+ children: ReactNode;
7
+ size?: InputComponentSize | null;
8
+ }): React.JSX.Element;
9
+ declare function useInputComponentSize(size?: InputComponentSize | null, fallback?: InputComponentSize): InputComponentSize;
10
+
11
+ export { type InputComponentSize, InputSizeProvider, useInputComponentSize };
@@ -0,0 +1,24 @@
1
+ // src/components/ui/input-size-context.tsx
2
+ import { createContext, useContext } from "react";
3
+ import { Fragment, jsx } from "react/jsx-runtime";
4
+ var InputSizeContext = createContext(
5
+ void 0
6
+ );
7
+ function InputSizeProvider({
8
+ children,
9
+ size
10
+ }) {
11
+ if (!size) {
12
+ return /* @__PURE__ */ jsx(Fragment, { children });
13
+ }
14
+ return /* @__PURE__ */ jsx(InputSizeContext.Provider, { value: size, children });
15
+ }
16
+ function useInputComponentSize(size, fallback = "md") {
17
+ const inheritedSize = useContext(InputSizeContext);
18
+ return size ?? inheritedSize ?? fallback;
19
+ }
20
+ export {
21
+ InputSizeProvider,
22
+ useInputComponentSize
23
+ };
24
+ //# sourceMappingURL=input-size-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/input-size-context.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, type ReactNode, useContext } from \"react\";\n\ntype InputComponentSize = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\nconst InputSizeContext = createContext<InputComponentSize | undefined>(\n\tundefined,\n);\n\nfunction InputSizeProvider({\n\tchildren,\n\tsize,\n}: {\n\tchildren: ReactNode;\n\tsize?: InputComponentSize | null;\n}) {\n\tif (!size) {\n\t\treturn <>{children}</>;\n\t}\n\n\treturn (\n\t\t<InputSizeContext.Provider value={size}>\n\t\t\t{children}\n\t\t</InputSizeContext.Provider>\n\t);\n}\n\nfunction useInputComponentSize(\n\tsize?: InputComponentSize | null,\n\tfallback: InputComponentSize = \"md\",\n) {\n\tconst inheritedSize = useContext(InputSizeContext);\n\treturn size ?? inheritedSize ?? fallback;\n}\n\nexport { InputSizeProvider, useInputComponentSize, type InputComponentSize };\n"],"mappings":";AAEA,SAAS,eAA+B,kBAAkB;AAgBjD;AAZT,IAAM,mBAAmB;AAAA,EACxB;AACD;AAEA,SAAS,kBAAkB;AAAA,EAC1B;AAAA,EACA;AACD,GAGG;AACF,MAAI,CAAC,MAAM;AACV,WAAO,gCAAG,UAAS;AAAA,EACpB;AAEA,SACC,oBAAC,iBAAiB,UAAjB,EAA0B,OAAO,MAChC,UACF;AAEF;AAEA,SAAS,sBACR,MACA,WAA+B,MAC9B;AACD,QAAM,gBAAgB,WAAW,gBAAgB;AACjD,SAAO,QAAQ,iBAAiB;AACjC;","names":[]}
@@ -0,0 +1,13 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import * as React from 'react';
4
+ import { InputComponentSize } from './input-size-context.js';
5
+
6
+ declare const inputVariants: (props?: ({
7
+ size?: "sm" | "md" | "lg" | "xl" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ type InputProps = Omit<React.ComponentProps<"input">, "size"> & VariantProps<typeof inputVariants>;
10
+ type InputSize = InputComponentSize;
11
+ declare function Input({ className, size, type, ...props }: InputProps): React.JSX.Element;
12
+
13
+ export { Input, type InputSize, inputVariants };
package/dist/input.js ADDED
@@ -0,0 +1,83 @@
1
+ // src/components/ui/input.tsx
2
+ import { Input as InputPrimitive } from "@base-ui/react/input";
3
+ import { cva } from "class-variance-authority";
4
+
5
+ // src/lib/cn.ts
6
+ import { clsx } from "clsx";
7
+ import { extendTailwindMerge } from "tailwind-merge";
8
+ var twMerge = extendTailwindMerge({
9
+ extend: {
10
+ classGroups: {
11
+ "font-size": [
12
+ {
13
+ text: [
14
+ "gdt-display",
15
+ "gdt-h1",
16
+ "gdt-h2",
17
+ "gdt-h3",
18
+ "gdt-h4",
19
+ "gdt-h5",
20
+ "gdt-xl",
21
+ "gdt-lg",
22
+ "gdt-md",
23
+ "gdt-sm",
24
+ "gdt-xs",
25
+ "gdt-subtext",
26
+ "gdt-capitalized"
27
+ ]
28
+ }
29
+ ]
30
+ }
31
+ }
32
+ });
33
+ function cn(...inputs) {
34
+ return twMerge(clsx(inputs));
35
+ }
36
+
37
+ // src/components/ui/input-size-context.tsx
38
+ import { createContext, useContext } from "react";
39
+ import { Fragment, jsx } from "react/jsx-runtime";
40
+ var InputSizeContext = createContext(
41
+ void 0
42
+ );
43
+ function useInputComponentSize(size, fallback = "md") {
44
+ const inheritedSize = useContext(InputSizeContext);
45
+ return size ?? inheritedSize ?? fallback;
46
+ }
47
+
48
+ // src/components/ui/input.tsx
49
+ import { jsx as jsx2 } from "react/jsx-runtime";
50
+ var inputVariants = cva(
51
+ "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-muted hover:border-line-strong focus-visible:border-line-focus focus-visible:inset-ring-1 inset-ring-line-focus disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-line-subtle disabled:bg-surface disabled:text-fg-muted disabled:placeholder:text-fg-muted aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:placeholder:text-fg-danger aria-invalid:shadow-none",
52
+ {
53
+ variants: {
54
+ size: {
55
+ sm: "h-8 px-3 text-gdt-xs font-normal file:text-gdt-xs",
56
+ md: "h-10 px-3.5 text-gdt-sm font-normal file:text-gdt-sm",
57
+ lg: "h-12 px-4 text-gdt-md font-normal file:text-gdt-md",
58
+ xl: "h-14 px-4.5 text-gdt-lg font-normal file:text-gdt-lg"
59
+ }
60
+ },
61
+ defaultVariants: {
62
+ size: "md"
63
+ }
64
+ }
65
+ );
66
+ function Input({ className, size, type, ...props }) {
67
+ const resolvedSize = useInputComponentSize(size);
68
+ return /* @__PURE__ */ jsx2(
69
+ InputPrimitive,
70
+ {
71
+ type,
72
+ "data-slot": "input",
73
+ "data-size": resolvedSize,
74
+ className: cn(inputVariants({ size: resolvedSize }), className),
75
+ ...props
76
+ }
77
+ );
78
+ }
79
+ export {
80
+ Input,
81
+ inputVariants
82
+ };
83
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/input.tsx","../src/lib/cn.ts","../src/components/ui/input-size-context.tsx"],"sourcesContent":["import { Input as InputPrimitive } from \"@base-ui/react/input\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../lib/cn\";\nimport {\n\ttype InputComponentSize,\n\tuseInputComponentSize,\n} from \"./input-size-context\";\n\nconst inputVariants = cva(\n\t\"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-muted hover:border-line-strong focus-visible:border-line-focus focus-visible:inset-ring-1 inset-ring-line-focus disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-line-subtle disabled:bg-surface disabled:text-fg-muted disabled:placeholder:text-fg-muted aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:placeholder:text-fg-danger aria-invalid:shadow-none\",\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: \"h-8 px-3 text-gdt-xs font-normal file:text-gdt-xs\",\n\t\t\t\tmd: \"h-10 px-3.5 text-gdt-sm font-normal file:text-gdt-sm\",\n\t\t\t\tlg: \"h-12 px-4 text-gdt-md font-normal file:text-gdt-md\",\n\t\t\t\txl: \"h-14 px-4.5 text-gdt-lg font-normal file:text-gdt-lg\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\ntype InputProps = Omit<React.ComponentProps<\"input\">, \"size\"> &\n\tVariantProps<typeof inputVariants>;\n\ntype InputSize = InputComponentSize;\n\nfunction Input({ className, size, type, ...props }: InputProps) {\n\tconst resolvedSize = useInputComponentSize(size);\n\n\treturn (\n\t\t<InputPrimitive\n\t\t\ttype={type}\n\t\t\tdata-slot=\"input\"\n\t\t\tdata-size={resolvedSize}\n\t\t\tclassName={cn(inputVariants({ size: resolvedSize }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Input, inputVariants, type InputSize };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { extendTailwindMerge } from \"tailwind-merge\";\n\nconst twMerge = extendTailwindMerge({\n\textend: {\n\t\tclassGroups: {\n\t\t\t\"font-size\": [\n\t\t\t\t{\n\t\t\t\t\ttext: [\n\t\t\t\t\t\t\"gdt-display\",\n\t\t\t\t\t\t\"gdt-h1\",\n\t\t\t\t\t\t\"gdt-h2\",\n\t\t\t\t\t\t\"gdt-h3\",\n\t\t\t\t\t\t\"gdt-h4\",\n\t\t\t\t\t\t\"gdt-h5\",\n\t\t\t\t\t\t\"gdt-xl\",\n\t\t\t\t\t\t\"gdt-lg\",\n\t\t\t\t\t\t\"gdt-md\",\n\t\t\t\t\t\t\"gdt-sm\",\n\t\t\t\t\t\t\"gdt-xs\",\n\t\t\t\t\t\t\"gdt-subtext\",\n\t\t\t\t\t\t\"gdt-capitalized\",\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n});\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport { createContext, type ReactNode, useContext } from \"react\";\n\ntype InputComponentSize = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\nconst InputSizeContext = createContext<InputComponentSize | undefined>(\n\tundefined,\n);\n\nfunction InputSizeProvider({\n\tchildren,\n\tsize,\n}: {\n\tchildren: ReactNode;\n\tsize?: InputComponentSize | null;\n}) {\n\tif (!size) {\n\t\treturn <>{children}</>;\n\t}\n\n\treturn (\n\t\t<InputSizeContext.Provider value={size}>\n\t\t\t{children}\n\t\t</InputSizeContext.Provider>\n\t);\n}\n\nfunction useInputComponentSize(\n\tsize?: InputComponentSize | null,\n\tfallback: InputComponentSize = \"md\",\n) {\n\tconst inheritedSize = useContext(InputSizeContext);\n\treturn size ?? inheritedSize ?? fallback;\n}\n\nexport { InputSizeProvider, useInputComponentSize, type InputComponentSize };\n"],"mappings":";AAAA,SAAS,SAAS,sBAAsB;AACxC,SAAS,WAA8B;;;ACDvC,SAA0B,YAAY;AACtC,SAAS,2BAA2B;AAEpC,IAAM,UAAU,oBAAoB;AAAA,EACnC,QAAQ;AAAA,IACP,aAAa;AAAA,MACZ,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,YACL;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD,CAAC;AAEM,SAAS,MAAM,QAAsB;AAC3C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC5B;;;AC7BA,SAAS,eAA+B,kBAAkB;AAgBjD;AAZT,IAAM,mBAAmB;AAAA,EACxB;AACD;AAoBA,SAAS,sBACR,MACA,WAA+B,MAC9B;AACD,QAAM,gBAAgB,WAAW,gBAAgB;AACjD,SAAO,QAAQ,iBAAiB;AACjC;;;AFEE,gBAAAA,YAAA;AA1BF,IAAM,gBAAgB;AAAA,EACrB;AAAA,EACA;AAAA,IACC,UAAU;AAAA,MACT,MAAM;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,IACD;AAAA,IACA,iBAAiB;AAAA,MAChB,MAAM;AAAA,IACP;AAAA,EACD;AACD;AAOA,SAAS,MAAM,EAAE,WAAW,MAAM,MAAM,GAAG,MAAM,GAAe;AAC/D,QAAM,eAAe,sBAAsB,IAAI;AAE/C,SACC,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,aAAU;AAAA,MACV,aAAW;AAAA,MACX,WAAW,GAAG,cAAc,EAAE,MAAM,aAAa,CAAC,GAAG,SAAS;AAAA,MAC7D,GAAG;AAAA;AAAA,EACL;AAEF;","names":["jsx"]}
package/dist/item.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react';
3
+
4
+ declare function Item({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
5
+ declare function ItemLabel({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
6
+ declare function ItemValue({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
7
+
8
+ export { Item, ItemLabel, ItemValue };