@xjur-ui/react 1.0.0 → 1.0.2

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 (117) hide show
  1. package/.turbo/turbo-build.log +63 -57
  2. package/CHANGELOG.md +18 -0
  3. package/dist/components/avatar.d.ts +11 -0
  4. package/dist/components/avatar.js +58 -0
  5. package/dist/components/badge.d.ts +13 -0
  6. package/dist/components/{ui/input/message.js → badge.js} +30 -47
  7. package/dist/components/{ui/button.d.ts → button.d.ts} +2 -2
  8. package/dist/components/{ui/button.js → button.js} +9 -6
  9. package/dist/components/calendar.d.ts +11 -0
  10. package/dist/components/calendar.js +751 -0
  11. package/dist/components/checkbox.d.ts +8 -0
  12. package/dist/components/{ui/input/root.js → checkbox.js} +69 -79
  13. package/dist/components/chip.d.ts +24 -0
  14. package/dist/components/chip.js +255 -0
  15. package/dist/components/collapsible.d.ts +8 -0
  16. package/dist/components/collapsible.js +41 -0
  17. package/dist/components/date-picker.d.ts +20 -0
  18. package/dist/components/date-picker.js +232 -0
  19. package/dist/components/divider.d.ts +7 -0
  20. package/dist/components/divider.js +28 -0
  21. package/dist/components/dropdown-menu.d.ts +22 -0
  22. package/dist/components/dropdown-menu.js +294 -0
  23. package/dist/components/{resources/icons.d.ts → icon.d.ts} +11 -2
  24. package/dist/components/{ui/icon.js → icon.js} +20 -5
  25. package/dist/components/input.d.ts +32 -0
  26. package/dist/components/input.js +315 -0
  27. package/dist/components/list.d.ts +25 -0
  28. package/dist/components/{ui/input/content.js → list.js} +83 -87
  29. package/dist/components/{ui/logo.d.ts → logo.d.ts} +2 -2
  30. package/dist/components/{ui/logo.js → logo.js} +5 -5
  31. package/dist/components/{ui/otp-input.js → otp-input.js} +1 -1
  32. package/dist/components/radio.d.ts +10 -0
  33. package/dist/components/{ui/input/label.js → radio.js} +68 -77
  34. package/dist/components/search-input.d.ts +17 -0
  35. package/dist/components/search-input.js +274 -0
  36. package/dist/components/select.d.ts +33 -0
  37. package/dist/components/select.js +550 -0
  38. package/dist/components/sheet.d.ts +19 -0
  39. package/dist/components/sheet.js +251 -0
  40. package/dist/components/switch.d.ts +7 -0
  41. package/dist/components/switch.js +36 -0
  42. package/dist/components/tabs.d.ts +11 -0
  43. package/dist/components/tabs.js +54 -0
  44. package/dist/components/tag.d.ts +18 -0
  45. package/dist/components/tag.js +189 -0
  46. package/dist/components/{ui/typography.d.ts → typography.d.ts} +4 -4
  47. package/dist/components/{ui/typography.js → typography.js} +1 -1
  48. package/dist/index.css +1233 -62
  49. package/dist/index.d.ts +2 -17
  50. package/dist/index.js +0 -788
  51. package/eslint.config.js +8 -1
  52. package/package.json +41 -10
  53. package/src/components/avatar.tsx +53 -0
  54. package/src/components/badge.tsx +40 -0
  55. package/src/components/{ui/button.tsx → button.tsx} +7 -5
  56. package/src/components/calendar.tsx +123 -0
  57. package/src/components/checkbox.tsx +57 -0
  58. package/src/components/chip.tsx +109 -0
  59. package/src/components/collapsible.tsx +35 -0
  60. package/src/components/date-picker.tsx +160 -0
  61. package/src/components/divider.tsx +23 -0
  62. package/src/components/dropdown-menu.tsx +101 -0
  63. package/src/components/{ui/icon.tsx → icon.tsx} +1 -1
  64. package/src/components/input.tsx +256 -0
  65. package/src/components/list.tsx +111 -0
  66. package/src/components/radio.tsx +74 -0
  67. package/src/components/search-input.tsx +112 -0
  68. package/src/components/select.tsx +240 -0
  69. package/src/components/sheet.tsx +141 -0
  70. package/src/components/switch.tsx +31 -0
  71. package/src/components/tabs.tsx +53 -0
  72. package/src/components/tag.tsx +91 -0
  73. package/src/index.css +4 -1
  74. package/src/index.ts +0 -1
  75. package/src/{components/resources → resources}/icons.ts +16 -1
  76. package/src/resources/input-mask.ts +91 -0
  77. package/dist/components/resources/icons.js +0 -133
  78. package/dist/components/resources/logo/horizontal.d.ts +0 -12
  79. package/dist/components/resources/logo/horizontal.js +0 -107
  80. package/dist/components/resources/logo/icon.d.ts +0 -12
  81. package/dist/components/resources/logo/icon.js +0 -79
  82. package/dist/components/resources/logo/index.d.ts +0 -4
  83. package/dist/components/resources/logo/index.js +0 -291
  84. package/dist/components/resources/logo/vertical.d.ts +0 -12
  85. package/dist/components/resources/logo/vertical.js +0 -107
  86. package/dist/components/ui/accordion.d.ts +0 -5
  87. package/dist/components/ui/accordion.js +0 -8
  88. package/dist/components/ui/icon.d.ts +0 -12
  89. package/dist/components/ui/index.d.ts +0 -17
  90. package/dist/components/ui/index.js +0 -788
  91. package/dist/components/ui/input/content.d.ts +0 -9
  92. package/dist/components/ui/input/index.d.ts +0 -12
  93. package/dist/components/ui/input/index.js +0 -335
  94. package/dist/components/ui/input/label.d.ts +0 -12
  95. package/dist/components/ui/input/message.d.ts +0 -10
  96. package/dist/components/ui/input/root.d.ts +0 -18
  97. package/dist/components/ui/input/slot.d.ts +0 -10
  98. package/dist/components/ui/input/slot.js +0 -20
  99. package/dist/components/ui/input/text.d.ts +0 -10
  100. package/dist/components/ui/input/text.js +0 -195
  101. package/src/components/ui/accordion.tsx +0 -3
  102. package/src/components/ui/index.ts +0 -13
  103. package/src/components/ui/input/content.tsx +0 -59
  104. package/src/components/ui/input/index.ts +0 -6
  105. package/src/components/ui/input/label.tsx +0 -41
  106. package/src/components/ui/input/message.tsx +0 -37
  107. package/src/components/ui/input/root.tsx +0 -57
  108. package/src/components/ui/input/slot.tsx +0 -21
  109. package/src/components/ui/input/text.tsx +0 -69
  110. /package/dist/components/{ui/otp-input.d.ts → otp-input.d.ts} +0 -0
  111. /package/src/components/{ui/logo.tsx → logo.tsx} +0 -0
  112. /package/src/components/{ui/otp-input.tsx → otp-input.tsx} +0 -0
  113. /package/src/components/{ui/typography.tsx → typography.tsx} +0 -0
  114. /package/src/{components/resources → resources}/logo/horizontal.tsx +0 -0
  115. /package/src/{components/resources → resources}/logo/icon.tsx +0 -0
  116. /package/src/{components/resources → resources}/logo/index.ts +0 -0
  117. /package/src/{components/resources → resources}/logo/vertical.tsx +0 -0
@@ -0,0 +1,32 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ComponentProps } from 'react';
3
+ import { MaskOptions } from '@react-input/mask';
4
+ export { MaskOptions } from '@react-input/mask';
5
+ import { InputNumberFormatProps } from '@react-input/number-format';
6
+
7
+ type InputMaskType = 'cpf' | 'cnpj' | 'telefone' | 'cep' | 'numero-processo' | 'custom' | 'data' | 'hora' | 'data-hora';
8
+ declare function inputMask(type: InputMaskType, options?: MaskOptions): MaskOptions;
9
+
10
+ type InputProps = {
11
+ variant?: 'outlined' | 'filled';
12
+ };
13
+ declare function InputRoot({ className, children, variant, ...props }: ComponentProps<'div'> & InputProps): react_jsx_runtime.JSX.Element;
14
+ declare function InputContent({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
15
+ declare function InputLabel({ htmlFor, className, children, ...props }: ComponentProps<'label'> & {
16
+ htmlFor: string;
17
+ }): react_jsx_runtime.JSX.Element;
18
+ declare function InputText({ className, maskOptions, maskType, ...props }: ComponentProps<'input'> & {
19
+ maskOptions?: MaskOptions;
20
+ maskType?: InputMaskType;
21
+ }): react_jsx_runtime.JSX.Element;
22
+ declare function InputNumber({ className, locales, ...props }: InputNumberFormatProps): react_jsx_runtime.JSX.Element;
23
+ declare function InputLeftSlot({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
24
+ declare function InputRightSlot({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
25
+ declare function InputMessage({ className, ...props }: ComponentProps<'p'>): react_jsx_runtime.JSX.Element;
26
+ declare function InputContainer({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
27
+ declare function InputAction({ className, side, ...props }: ComponentProps<'div'> & {
28
+ side: 'left' | 'right';
29
+ }): react_jsx_runtime.JSX.Element;
30
+ declare function InputActionButton({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
31
+
32
+ export { InputAction, InputActionButton, InputContainer, InputContent, InputLabel, InputLeftSlot, type InputMaskType, InputMessage, InputNumber, type InputProps, InputRightSlot, InputRoot, InputText, inputMask };
@@ -0,0 +1,315 @@
1
+ // src/components/input.tsx
2
+ import { cva, cx } from "@xjur-ui/util";
3
+ import { createContext } from "react";
4
+ import { InputMask } from "@react-input/mask";
5
+ import {
6
+ InputNumberFormat
7
+ } from "@react-input/number-format";
8
+
9
+ // src/resources/input-mask.ts
10
+ function inputMask(type, options) {
11
+ switch (type) {
12
+ case "cpf":
13
+ return { ...options, ...CPF_MASK };
14
+ case "cnpj":
15
+ return { ...options, ...CNPJ_MASK };
16
+ case "telefone":
17
+ return { ...options, ...PHONE_MASK };
18
+ case "cep":
19
+ return { ...options, ...CEP_MASK };
20
+ case "numero-processo":
21
+ return { ...options, ...NUMERO_PROCESSO_MASK };
22
+ case "data":
23
+ return { ...options, ...DATE_MASK };
24
+ case "hora":
25
+ return { ...options, ...TIME_MASK };
26
+ case "data-hora":
27
+ return { ...options, ...DATETIME_MASK };
28
+ case "custom":
29
+ if (!options) {
30
+ throw new Error("Options are required for custom mask");
31
+ }
32
+ return options;
33
+ }
34
+ }
35
+ var CPF_MASK = {
36
+ mask: "###.###.###-##",
37
+ replacement: {
38
+ "#": /\d/
39
+ }
40
+ };
41
+ var CNPJ_MASK = {
42
+ mask: "##.###.###/####-##",
43
+ replacement: {
44
+ "#": /\d/
45
+ }
46
+ };
47
+ var PHONE_MASK = {
48
+ mask: "(##) #####-####",
49
+ replacement: {
50
+ "#": /\d/
51
+ }
52
+ };
53
+ var CEP_MASK = {
54
+ mask: "#####-###",
55
+ replacement: {
56
+ "#": /\d/
57
+ }
58
+ };
59
+ var NUMERO_PROCESSO_MASK = {
60
+ mask: "#######-##.####.#.##.####",
61
+ replacement: {
62
+ "#": /\d/
63
+ }
64
+ };
65
+ var DATE_MASK = {
66
+ mask: "##/##/####",
67
+ replacement: {
68
+ "#": /\d/
69
+ }
70
+ };
71
+ var TIME_MASK = {
72
+ mask: "##:##",
73
+ replacement: {
74
+ "#": /\d/
75
+ }
76
+ };
77
+ var DATETIME_MASK = {
78
+ mask: "##/##/#### ##:##",
79
+ replacement: {
80
+ "#": /\d/
81
+ }
82
+ };
83
+
84
+ // src/components/input.tsx
85
+ import { jsx } from "react/jsx-runtime";
86
+ var FieldContext = createContext({
87
+ variant: "filled"
88
+ });
89
+ function InputRoot({
90
+ className,
91
+ children,
92
+ variant = "filled",
93
+ ...props
94
+ }) {
95
+ return /* @__PURE__ */ jsx(FieldContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsx(
96
+ "div",
97
+ {
98
+ className: cx(
99
+ "group gap-small relative flex w-full flex-col",
100
+ className
101
+ ),
102
+ ...props,
103
+ children
104
+ }
105
+ ) });
106
+ }
107
+ function InputContent({ className, ...props }) {
108
+ const variants = cva(
109
+ [
110
+ "relative h-large-4x rounded-small-1x gap-small py-small_1x-alt px-small flex items-center w-full",
111
+ "focus-within:border-primary-idle focus-within:shadow-focus-primary focus-within:border",
112
+ "group-has-[div[data-slot=input-right-action-slot]]:rounded-r-none",
113
+ "group-has-[div[data-slot=input-left-action-slot]]:rounded-l-none"
114
+ ],
115
+ {
116
+ variants: {
117
+ variant: {
118
+ default: "",
119
+ outlined: "bg-layer-2-idle border-border-layer-2 border hover:group-has-[input:not(:focus-within)]:border-border-layer-3 has-[input:not(:placeholder-shown)]:border-primary-idle",
120
+ filled: "bg-layer-2-hover group-hover:border-border-layer-1 group-hover:border-1"
121
+ }
122
+ }
123
+ }
124
+ );
125
+ return /* @__PURE__ */ jsx(FieldContext.Consumer, { children: ({ variant }) => {
126
+ return /* @__PURE__ */ jsx("div", { className: cx(className, variants({ variant })), ...props });
127
+ } });
128
+ }
129
+ function InputLabel({
130
+ htmlFor,
131
+ className,
132
+ children,
133
+ ...props
134
+ }) {
135
+ return /* @__PURE__ */ jsx(FieldContext.Consumer, { children: ({ variant }) => {
136
+ return /* @__PURE__ */ jsx(
137
+ "label",
138
+ {
139
+ className: cx(
140
+ "group text-size-body-md text-neutral-dark inline-block max-w-full truncate text-left",
141
+ "ease animate-in left-small right-small pointer-events-none absolute top-1/2 -translate-y-1/2 transition-all duration-250",
142
+ // Filled
143
+ "group-focus-within:text-primary-idle group-focus-within:-top-[3px]",
144
+ "group-focus-within:text-size-label-sm-1x group-focus-within:font-medium",
145
+ "group-has-[input:not(:placeholder-shown)]:-top-[3px]",
146
+ "group-has-[input:not(:placeholder-shown)]:text-size-label-sm-1x",
147
+ "group-has-[input:not(:placeholder-shown)]:font-medium",
148
+ "data-[variant=outlined]:group-has-[input:not(:placeholder-shown)]:text-primary-idle",
149
+ // If has left slot
150
+ "group-has-[div[data-slot=input-left-slot]]:left-large-4x",
151
+ "group-has-[div[data-slot=input-left-slot]]:group-focus-within:left-small",
152
+ "group-has-[div[data-slot=input-left-slot]]:group-has-[input:not(:placeholder-shown)]:left-small",
153
+ // If has right slot
154
+ "group-has-[div[data-slot=input-right-slot]]:right-large-4x",
155
+ "group-has-[div[data-slot=input-right-slot]]:group-focus-within:right-small",
156
+ "group-has-[div[data-slot=input-right-slot]]:group-has-[input:not(:placeholder-shown)]:right-small",
157
+ // Animate
158
+ "group-focus-within:animate-in",
159
+ "group-has-[input:not(:placeholder-shown)]:animate-out",
160
+ className
161
+ ),
162
+ "data-variant": variant,
163
+ htmlFor,
164
+ ...props,
165
+ children: /* @__PURE__ */ jsx(
166
+ "span",
167
+ {
168
+ className: cx(
169
+ "rounded-small-1x max-w-full",
170
+ "group-data-[variant=outlined]:group-focus-within:bg-layer-2-idle group-data-[variant=filled]:group-focus-within:bg-layer-2-hover",
171
+ "group-data-[variant=outlined]:bg-layer-2-idle group-data-[variant=filled]:bg-layer-2-hover"
172
+ ),
173
+ children
174
+ }
175
+ )
176
+ }
177
+ );
178
+ } });
179
+ }
180
+ function InputText({
181
+ className,
182
+ maskOptions,
183
+ maskType,
184
+ ...props
185
+ }) {
186
+ const Component = maskOptions || maskType ? InputMask : "input";
187
+ return /* @__PURE__ */ jsx(
188
+ Component,
189
+ {
190
+ ...props,
191
+ ...maskType ? { ...inputMask(maskType) } : maskOptions && { ...maskOptions },
192
+ className: cx(
193
+ className,
194
+ "peer text-size-body-md text-neutral-dark flex-1 font-medium outline-none",
195
+ "group-has-[div[data-slot=input-left-slot]]:pl-large-1x ml-small-1x"
196
+ ),
197
+ placeholder: props.placeholder || " ",
198
+ ...maskOptions && { ...maskOptions }
199
+ }
200
+ );
201
+ }
202
+ function InputNumber({
203
+ className,
204
+ locales = "pt-BR",
205
+ ...props
206
+ }) {
207
+ return /* @__PURE__ */ jsx(
208
+ InputNumberFormat,
209
+ {
210
+ ...props,
211
+ className: cx(
212
+ className,
213
+ "peer text-size-body-md text-neutral-dark flex-1 font-medium outline-none",
214
+ "group-has-[div[data-slot=input-left-slot]]:pl-large-1x ml-small-1x"
215
+ ),
216
+ locales,
217
+ placeholder: props.placeholder || " "
218
+ }
219
+ );
220
+ }
221
+ function InputLeftSlot({ className, ...props }) {
222
+ return /* @__PURE__ */ jsx(
223
+ "div",
224
+ {
225
+ ...props,
226
+ className: cx(
227
+ className,
228
+ "left-small absolute top-1/2 flex -translate-y-1/2 items-center justify-center"
229
+ ),
230
+ "data-slot": "input-left-slot"
231
+ }
232
+ );
233
+ }
234
+ function InputRightSlot({ className, ...props }) {
235
+ return /* @__PURE__ */ jsx(
236
+ "div",
237
+ {
238
+ ...props,
239
+ className: cx(
240
+ className,
241
+ "right-small absolute top-1/2 flex -translate-y-1/2 items-center justify-center"
242
+ ),
243
+ "data-slot": "input-right-slot"
244
+ }
245
+ );
246
+ }
247
+ function InputMessage({ className, ...props }) {
248
+ return /* @__PURE__ */ jsx(
249
+ "p",
250
+ {
251
+ ...props,
252
+ className: cx(
253
+ "text-size-body-sm text-neutral-dark font-normal",
254
+ className
255
+ )
256
+ }
257
+ );
258
+ }
259
+ function InputContainer({ className, ...props }) {
260
+ return /* @__PURE__ */ jsx(
261
+ "div",
262
+ {
263
+ ...props,
264
+ className: cx(className, "flex items-center"),
265
+ "data-slot": "input-content"
266
+ }
267
+ );
268
+ }
269
+ function InputAction({
270
+ className,
271
+ side,
272
+ ...props
273
+ }) {
274
+ return /* @__PURE__ */ jsx(
275
+ "div",
276
+ {
277
+ ...props,
278
+ className: cx(
279
+ className,
280
+ "group h-large-4x flex items-center justify-center"
281
+ ),
282
+ "data-side": side,
283
+ "data-slot": `input-${side}-action-slot`
284
+ }
285
+ );
286
+ }
287
+ function InputActionButton({
288
+ className,
289
+ ...props
290
+ }) {
291
+ return /* @__PURE__ */ jsx(
292
+ "div",
293
+ {
294
+ ...props,
295
+ className: cx(
296
+ className,
297
+ "h-large-4x w-large-4x bg-layer-2-hover flex cursor-pointer items-center justify-center"
298
+ )
299
+ }
300
+ );
301
+ }
302
+ export {
303
+ InputAction,
304
+ InputActionButton,
305
+ InputContainer,
306
+ InputContent,
307
+ InputLabel,
308
+ InputLeftSlot,
309
+ InputMessage,
310
+ InputNumber,
311
+ InputRightSlot,
312
+ InputRoot,
313
+ InputText,
314
+ inputMask
315
+ };
@@ -0,0 +1,25 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { ClassVariantProps } from '@xjur-ui/util';
4
+ import { ComponentProps } from 'react';
5
+ import { TypographyProps } from './typography.js';
6
+
7
+ declare function ListRoot({ className, asChild, ...props }: ComponentProps<'div'> & {
8
+ asChild?: boolean;
9
+ }): react_jsx_runtime.JSX.Element;
10
+ declare function ListHeader({ className, asChild, ...props }: ComponentProps<'div'> & {
11
+ asChild?: boolean;
12
+ }): react_jsx_runtime.JSX.Element;
13
+ declare function ListHeaderTitle({ variant, size, weight, className, ...props }: TypographyProps): react_jsx_runtime.JSX.Element;
14
+ declare function ListContent({ className, asChild, ...props }: ComponentProps<'ul'> & {
15
+ asChild?: boolean;
16
+ }): react_jsx_runtime.JSX.Element;
17
+ declare const variants: (props?: ({
18
+ size?: "md" | "lg" | null | undefined;
19
+ isActive?: boolean | null | undefined;
20
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
21
+ declare function ListItem({ className, size, isActive, asChild, ...props }: ComponentProps<'li'> & ClassVariantProps<typeof variants> & {
22
+ asChild?: boolean;
23
+ }): react_jsx_runtime.JSX.Element;
24
+
25
+ export { ListContent, ListHeader, ListHeaderTitle, ListItem, ListRoot };
@@ -1,15 +1,8 @@
1
- // src/components/ui/input/content.tsx
2
- import { cx as cx3, cva as cva2 } from "@xjur-ui/util";
1
+ // src/components/list.tsx
2
+ import { Slot as Slot2 } from "@radix-ui/react-slot";
3
+ import { cx, cva as cva2 } from "@xjur-ui/util";
3
4
 
4
- // src/components/ui/input/root.tsx
5
- import { createContext, use } from "react";
6
- import { cx as cx2 } from "@xjur-ui/util";
7
-
8
- // src/components/ui/input/message.tsx
9
- import { memo as memo2 } from "react";
10
- import { cx } from "@xjur-ui/util";
11
-
12
- // src/components/ui/typography.tsx
5
+ // src/components/typography.tsx
13
6
  import { Slot } from "@radix-ui/react-slot";
14
7
  import { cva } from "@xjur-ui/util";
15
8
  import { memo } from "react";
@@ -85,99 +78,102 @@ var Typography = memo(
85
78
  );
86
79
  Typography.displayName = "Typography";
87
80
 
88
- // src/components/ui/input/message.tsx
81
+ // src/components/list.tsx
89
82
  import { jsx as jsx2 } from "react/jsx-runtime";
90
- var InputMessage = memo2(
91
- ({
92
- children,
93
- className,
94
- weight = "normal",
95
- variant = "body",
96
- size = "sm-1x",
97
- ...props
98
- }) => {
99
- const { errorMessage } = useInput();
100
- return /* @__PURE__ */ jsx2(
101
- Typography,
102
- {
103
- className: cx(
104
- "text-neutral-dark data-[error=true]:text-danger-idle",
105
- className
106
- ),
107
- "data-error": !!errorMessage,
108
- size,
109
- variant,
110
- weight,
111
- ...props,
112
- children
113
- }
114
- );
115
- }
116
- );
117
- InputMessage.displayName = "InputMessage";
118
-
119
- // src/components/ui/input/root.tsx
120
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
121
- var InputRootContext = createContext({});
122
- function useInput() {
123
- const context = use(InputRootContext);
124
- if (!context) {
125
- throw new Error(
126
- "useInput must be called within <Input.Root> or <Select.Root>"
127
- );
128
- }
129
- return context;
83
+ function ListRoot({
84
+ className,
85
+ asChild,
86
+ ...props
87
+ }) {
88
+ const Comp = asChild ? Slot2 : "div";
89
+ return /* @__PURE__ */ jsx2(
90
+ Comp,
91
+ {
92
+ ...props,
93
+ className: cx(
94
+ className,
95
+ "rounded-small scrollbar-hide bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-10 max-h-[400px] list-none overflow-y-auto border"
96
+ )
97
+ }
98
+ );
99
+ }
100
+ function ListHeader({
101
+ className,
102
+ asChild,
103
+ ...props
104
+ }) {
105
+ const Comp = asChild ? Slot2 : "div";
106
+ return /* @__PURE__ */ jsx2(Comp, { ...props, className: cx(className, "px-small pt-small-1x") });
107
+ }
108
+ function ListHeaderTitle({
109
+ variant = "label",
110
+ size = "sm",
111
+ weight = "medium",
112
+ className,
113
+ ...props
114
+ }) {
115
+ return /* @__PURE__ */ jsx2(
116
+ Typography,
117
+ {
118
+ className: cx(className, "text-neutral-placeholder"),
119
+ size,
120
+ variant,
121
+ weight,
122
+ ...props
123
+ }
124
+ );
125
+ }
126
+ function ListContent({
127
+ className,
128
+ asChild,
129
+ ...props
130
+ }) {
131
+ const Comp = asChild ? Slot2 : "ul";
132
+ return /* @__PURE__ */ jsx2(
133
+ Comp,
134
+ {
135
+ ...props,
136
+ className: cx("gap-small-1x p-small flex flex-col", className)
137
+ }
138
+ );
130
139
  }
131
-
132
- // src/components/ui/input/content.tsx
133
- import { jsx as jsx4 } from "react/jsx-runtime";
134
140
  var variants = cva2(
135
141
  [
136
- "flex items-center gap-small py-small_1x-alt px-small",
137
- "border-1 border-border-layer-2",
138
- "bg-layer-2-idle",
139
- "group-hover:border-border-layer-3",
140
- "transition-[border-color] duration-100 ease",
141
- "data-[disabled=true]:pointer-events-none",
142
- "has-[input[data-filled=true]]:bg-layer-2-hover"
142
+ "py-medium px-small flex items-center gap-small rounded-small-1x",
143
+ "bg-layer-2-idle text-neutral-dark",
144
+ "hover:bg-layer-2-hover transition-colors duration-100 ease-out",
145
+ "active:bg-layer-2-pressed"
143
146
  ],
144
147
  {
145
148
  variants: {
146
- isError: {
147
- true: "border-1 border-danger-idle focus-within:border-danger-idle focus-within:shadow-focus-danger group-hover:border-danger-idle",
148
- false: "focus-within:border-primary-idle focus-within:shadow-focus-primary"
149
+ size: {
150
+ md: "h-large-4x",
151
+ lg: "h-large-7x"
149
152
  },
150
- rounded: {
151
- true: "rounded-circle",
152
- false: "rounded-small-1x"
153
+ isActive: {
154
+ true: "bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed"
153
155
  }
154
156
  },
155
157
  defaultVariants: {
156
- rounded: false
158
+ size: "md",
159
+ isActive: false
157
160
  }
158
161
  }
159
162
  );
160
- function InputContent({
163
+ function ListItem({
161
164
  className,
162
- children,
165
+ size,
166
+ isActive,
167
+ asChild,
163
168
  ...props
164
169
  }) {
165
- const { errorMessage, rounded, disabled } = useInput();
166
- const classNames = variants({
167
- className,
168
- isError: !!errorMessage,
169
- rounded
170
- });
171
- return /* @__PURE__ */ jsx4(
172
- "div",
173
- {
174
- ...props,
175
- className: cx3("group", classNames),
176
- "data-disabled": disabled,
177
- children
178
- }
179
- );
170
+ const Comp = asChild ? Slot2 : "li";
171
+ return /* @__PURE__ */ jsx2(Comp, { ...props, className: cx(variants({ size, isActive }), className) });
180
172
  }
181
173
  export {
182
- InputContent
174
+ ListContent,
175
+ ListHeader,
176
+ ListHeaderTitle,
177
+ ListItem,
178
+ ListRoot
183
179
  };
@@ -1,10 +1,10 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
 
4
4
  interface LogoProps {
5
5
  mode?: 'horizontal' | 'vertical' | 'icon';
6
6
  variant?: 'colorful' | 'orange' | 'purple' | 'white' | 'gray';
7
7
  }
8
- declare const Logo: react.MemoExoticComponent<({ mode, variant }: LogoProps) => react_jsx_runtime.JSX.Element>;
8
+ declare const Logo: React.MemoExoticComponent<({ mode, variant }: LogoProps) => react_jsx_runtime.JSX.Element>;
9
9
 
10
10
  export { Logo, type LogoProps };
@@ -1,7 +1,7 @@
1
- // src/components/ui/logo.tsx
1
+ // src/components/logo.tsx
2
2
  import { memo } from "react";
3
3
 
4
- // src/components/resources/logo/horizontal.tsx
4
+ // src/resources/logo/horizontal.tsx
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  function LogoHorizontalSolid({ color }) {
7
7
  return /* @__PURE__ */ jsxs(
@@ -106,7 +106,7 @@ var Horizontal = {
106
106
  Colorful: LogoHorizontalColorful
107
107
  };
108
108
 
109
- // src/components/resources/logo/vertical.tsx
109
+ // src/resources/logo/vertical.tsx
110
110
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
111
111
  function LogoVerticalSolid({ color }) {
112
112
  return /* @__PURE__ */ jsxs2(
@@ -211,7 +211,7 @@ var Vertical = {
211
211
  Colorful: LogoVerticalColorful
212
212
  };
213
213
 
214
- // src/components/resources/logo/icon.tsx
214
+ // src/resources/logo/icon.tsx
215
215
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
216
216
  function LogoIconSolid({ color }) {
217
217
  return /* @__PURE__ */ jsxs3(
@@ -288,7 +288,7 @@ var Icon = {
288
288
  Colorful: LogoIconColorful
289
289
  };
290
290
 
291
- // src/components/ui/logo.tsx
291
+ // src/components/logo.tsx
292
292
  import { jsx as jsx4 } from "react/jsx-runtime";
293
293
  var Logo = memo(
294
294
  ({ mode = "horizontal", variant = "colorful" }) => {
@@ -1,4 +1,4 @@
1
- // src/components/ui/otp-input.tsx
1
+ // src/components/otp-input.tsx
2
2
  import * as OTPPasswordField from "@radix-ui/react-one-time-password-field";
3
3
  import { cx } from "@xjur-ui/util";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -0,0 +1,10 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
4
+
5
+ declare function RadioGroup({ className, orientation, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
+ declare function RadioItem({ className, id, label, disabled, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item> & {
7
+ label?: string;
8
+ }): react_jsx_runtime.JSX.Element;
9
+
10
+ export { RadioGroup, RadioItem };