@xjur-ui/react 1.0.0 → 1.0.1

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 (115) hide show
  1. package/.turbo/turbo-build.log +61 -57
  2. package/CHANGELOG.md +11 -0
  3. package/dist/components/avatar.d.ts +11 -0
  4. package/dist/components/avatar.js +58 -0
  5. package/dist/components/{ui/button.d.ts → button.d.ts} +2 -2
  6. package/dist/components/{ui/button.js → button.js} +9 -6
  7. package/dist/components/calendar.d.ts +11 -0
  8. package/dist/components/calendar.js +751 -0
  9. package/dist/components/checkbox.d.ts +8 -0
  10. package/dist/components/{ui/input/root.js → checkbox.js} +69 -79
  11. package/dist/components/chip.d.ts +24 -0
  12. package/dist/components/chip.js +255 -0
  13. package/dist/components/collapsible.d.ts +8 -0
  14. package/dist/components/collapsible.js +41 -0
  15. package/dist/components/date-picker.d.ts +20 -0
  16. package/dist/components/date-picker.js +230 -0
  17. package/dist/components/divider.d.ts +7 -0
  18. package/dist/components/divider.js +28 -0
  19. package/dist/components/dropdown-menu.d.ts +22 -0
  20. package/dist/components/dropdown-menu.js +294 -0
  21. package/dist/components/{resources/icons.d.ts → icon.d.ts} +11 -2
  22. package/dist/components/{ui/icon.js → icon.js} +18 -5
  23. package/dist/components/input.d.ts +32 -0
  24. package/dist/components/input.js +299 -0
  25. package/dist/components/list.d.ts +25 -0
  26. package/dist/components/{ui/input/content.js → list.js} +83 -87
  27. package/dist/components/{ui/logo.d.ts → logo.d.ts} +2 -2
  28. package/dist/components/{ui/logo.js → logo.js} +5 -5
  29. package/dist/components/{ui/otp-input.js → otp-input.js} +1 -1
  30. package/dist/components/radio.d.ts +10 -0
  31. package/dist/components/{ui/input/label.js → radio.js} +68 -77
  32. package/dist/components/search-input.d.ts +17 -0
  33. package/dist/components/search-input.js +274 -0
  34. package/dist/components/select.d.ts +33 -0
  35. package/dist/components/select.js +548 -0
  36. package/dist/components/sheet.d.ts +19 -0
  37. package/dist/components/sheet.js +251 -0
  38. package/dist/components/switch.d.ts +7 -0
  39. package/dist/components/switch.js +36 -0
  40. package/dist/components/tabs.d.ts +11 -0
  41. package/dist/components/tabs.js +54 -0
  42. package/dist/components/tag.d.ts +18 -0
  43. package/dist/components/tag.js +189 -0
  44. package/dist/components/{ui/typography.d.ts → typography.d.ts} +3 -3
  45. package/dist/components/{ui/typography.js → typography.js} +1 -1
  46. package/dist/index.css +1156 -62
  47. package/dist/index.d.ts +2 -17
  48. package/dist/index.js +0 -788
  49. package/eslint.config.js +8 -1
  50. package/package.json +40 -10
  51. package/src/components/avatar.tsx +53 -0
  52. package/src/components/{ui/button.tsx → button.tsx} +7 -5
  53. package/src/components/calendar.tsx +123 -0
  54. package/src/components/checkbox.tsx +57 -0
  55. package/src/components/chip.tsx +109 -0
  56. package/src/components/collapsible.tsx +35 -0
  57. package/src/components/date-picker.tsx +154 -0
  58. package/src/components/divider.tsx +23 -0
  59. package/src/components/dropdown-menu.tsx +101 -0
  60. package/src/components/{ui/icon.tsx → icon.tsx} +1 -1
  61. package/src/components/input.tsx +241 -0
  62. package/src/components/list.tsx +111 -0
  63. package/src/components/radio.tsx +74 -0
  64. package/src/components/search-input.tsx +112 -0
  65. package/src/components/select.tsx +234 -0
  66. package/src/components/sheet.tsx +141 -0
  67. package/src/components/switch.tsx +31 -0
  68. package/src/components/tabs.tsx +53 -0
  69. package/src/components/tag.tsx +91 -0
  70. package/src/index.css +4 -1
  71. package/src/index.ts +0 -1
  72. package/src/{components/resources → resources}/icons.ts +14 -1
  73. package/src/resources/input-mask.ts +91 -0
  74. package/dist/components/resources/icons.js +0 -133
  75. package/dist/components/resources/logo/horizontal.d.ts +0 -12
  76. package/dist/components/resources/logo/horizontal.js +0 -107
  77. package/dist/components/resources/logo/icon.d.ts +0 -12
  78. package/dist/components/resources/logo/icon.js +0 -79
  79. package/dist/components/resources/logo/index.d.ts +0 -4
  80. package/dist/components/resources/logo/index.js +0 -291
  81. package/dist/components/resources/logo/vertical.d.ts +0 -12
  82. package/dist/components/resources/logo/vertical.js +0 -107
  83. package/dist/components/ui/accordion.d.ts +0 -5
  84. package/dist/components/ui/accordion.js +0 -8
  85. package/dist/components/ui/icon.d.ts +0 -12
  86. package/dist/components/ui/index.d.ts +0 -17
  87. package/dist/components/ui/index.js +0 -788
  88. package/dist/components/ui/input/content.d.ts +0 -9
  89. package/dist/components/ui/input/index.d.ts +0 -12
  90. package/dist/components/ui/input/index.js +0 -335
  91. package/dist/components/ui/input/label.d.ts +0 -12
  92. package/dist/components/ui/input/message.d.ts +0 -10
  93. package/dist/components/ui/input/message.js +0 -128
  94. package/dist/components/ui/input/root.d.ts +0 -18
  95. package/dist/components/ui/input/slot.d.ts +0 -10
  96. package/dist/components/ui/input/slot.js +0 -20
  97. package/dist/components/ui/input/text.d.ts +0 -10
  98. package/dist/components/ui/input/text.js +0 -195
  99. package/src/components/ui/accordion.tsx +0 -3
  100. package/src/components/ui/index.ts +0 -13
  101. package/src/components/ui/input/content.tsx +0 -59
  102. package/src/components/ui/input/index.ts +0 -6
  103. package/src/components/ui/input/label.tsx +0 -41
  104. package/src/components/ui/input/message.tsx +0 -37
  105. package/src/components/ui/input/root.tsx +0 -57
  106. package/src/components/ui/input/slot.tsx +0 -21
  107. package/src/components/ui/input/text.tsx +0 -69
  108. /package/dist/components/{ui/otp-input.d.ts → otp-input.d.ts} +0 -0
  109. /package/src/components/{ui/logo.tsx → logo.tsx} +0 -0
  110. /package/src/components/{ui/otp-input.tsx → otp-input.tsx} +0 -0
  111. /package/src/components/{ui/typography.tsx → typography.tsx} +0 -0
  112. /package/src/{components/resources → resources}/logo/horizontal.tsx +0 -0
  113. /package/src/{components/resources → resources}/logo/icon.tsx +0 -0
  114. /package/src/{components/resources → resources}/logo/index.ts +0 -0
  115. /package/src/{components/resources → resources}/logo/vertical.tsx +0 -0
@@ -0,0 +1,299 @@
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: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
+ ...props
133
+ }) {
134
+ return /* @__PURE__ */ jsx(FieldContext.Consumer, { children: ({ variant }) => {
135
+ return /* @__PURE__ */ jsx(
136
+ "label",
137
+ {
138
+ className: cx(
139
+ "rounded-small-1x text-size-body-md text-neutral-dark data-[variant=outlined]:bg-layer-2-idle bg-layer-2-hover w-fit font-normal",
140
+ "ease animate-in pointer-events-none absolute top-1/2 left-auto -translate-y-1/2 transition-all duration-250",
141
+ // Filled
142
+ "group-focus-within:text-primary-idle group-focus-within:bg-layer-2-hover data-[variant=outlined]:group-focus-within:bg-layer-2-idle group-focus-within:-top-[3px]",
143
+ "group-focus-within:text-size-label-sm-1x group-focus-within:font-medium",
144
+ "group-has-[input:not(:placeholder-shown)]:-top-[3px]",
145
+ "group-has-[input:not(:placeholder-shown)]:text-size-label-sm-1x",
146
+ "group-has-[input:not(:placeholder-shown)]:font-medium",
147
+ "data-[variant=outlined]:group-has-[input:not(:placeholder-shown)]:text-primary-idle",
148
+ // If has left slot
149
+ "group-has-[div[data-slot=input-left-slot]]:left-large-4x",
150
+ "group-has-[div[data-slot=input-left-slot]]:group-focus-within:left-auto",
151
+ "group-has-[div[data-slot=input-left-slot]]:group-has-[input:not(:placeholder-shown)]:left-auto",
152
+ // Animate
153
+ "group-focus-within:animate-in",
154
+ "group-has-[input:not(:placeholder-shown)]:animate-out",
155
+ className
156
+ ),
157
+ "data-variant": variant,
158
+ htmlFor,
159
+ ...props
160
+ }
161
+ );
162
+ } });
163
+ }
164
+ function InputText({
165
+ className,
166
+ maskOptions,
167
+ maskType,
168
+ ...props
169
+ }) {
170
+ const Component = maskOptions || maskType ? InputMask : "input";
171
+ return /* @__PURE__ */ jsx(
172
+ Component,
173
+ {
174
+ ...props,
175
+ ...maskType ? { ...inputMask(maskType) } : maskOptions && { ...maskOptions },
176
+ className: cx(
177
+ className,
178
+ "peer text-size-body-md text-neutral-dark flex-1 font-medium outline-none",
179
+ "group-has-[div[data-slot=input-left-slot]]:pl-large-1x ml-small-1x"
180
+ ),
181
+ placeholder: props.placeholder || " ",
182
+ ...maskOptions && { ...maskOptions }
183
+ }
184
+ );
185
+ }
186
+ function InputNumber({
187
+ className,
188
+ locales = "pt-BR",
189
+ ...props
190
+ }) {
191
+ return /* @__PURE__ */ jsx(
192
+ InputNumberFormat,
193
+ {
194
+ ...props,
195
+ className: cx(
196
+ className,
197
+ "peer text-size-body-md text-neutral-dark flex-1 font-medium outline-none",
198
+ "group-has-[div[data-slot=input-left-slot]]:pl-large-1x ml-small-1x"
199
+ ),
200
+ locales,
201
+ placeholder: props.placeholder || " "
202
+ }
203
+ );
204
+ }
205
+ function InputLeftSlot({ className, ...props }) {
206
+ return /* @__PURE__ */ jsx(
207
+ "div",
208
+ {
209
+ ...props,
210
+ className: cx(
211
+ className,
212
+ "left-small absolute top-1/2 flex -translate-y-1/2 items-center justify-center"
213
+ ),
214
+ "data-slot": "input-left-slot"
215
+ }
216
+ );
217
+ }
218
+ function InputRightSlot({ className, ...props }) {
219
+ return /* @__PURE__ */ jsx(
220
+ "div",
221
+ {
222
+ ...props,
223
+ className: cx(
224
+ className,
225
+ "right-small absolute top-1/2 flex -translate-y-1/2 items-center justify-center"
226
+ ),
227
+ "data-slot": "input-right-slot"
228
+ }
229
+ );
230
+ }
231
+ function InputMessage({ className, ...props }) {
232
+ return /* @__PURE__ */ jsx(
233
+ "p",
234
+ {
235
+ ...props,
236
+ className: cx(
237
+ "text-size-body-sm text-neutral-dark font-normal",
238
+ className
239
+ )
240
+ }
241
+ );
242
+ }
243
+ function InputContainer({ className, ...props }) {
244
+ return /* @__PURE__ */ jsx(
245
+ "div",
246
+ {
247
+ ...props,
248
+ className: cx(className, "flex items-center"),
249
+ "data-slot": "input-content"
250
+ }
251
+ );
252
+ }
253
+ function InputAction({
254
+ className,
255
+ side,
256
+ ...props
257
+ }) {
258
+ return /* @__PURE__ */ jsx(
259
+ "div",
260
+ {
261
+ ...props,
262
+ className: cx(
263
+ className,
264
+ "group h-large-4x flex items-center justify-center"
265
+ ),
266
+ "data-side": side,
267
+ "data-slot": `input-${side}-action-slot`
268
+ }
269
+ );
270
+ }
271
+ function InputActionButton({
272
+ className,
273
+ ...props
274
+ }) {
275
+ return /* @__PURE__ */ jsx(
276
+ "div",
277
+ {
278
+ ...props,
279
+ className: cx(
280
+ className,
281
+ "h-large-4x w-large-4x bg-layer-2-hover flex cursor-pointer items-center justify-center"
282
+ )
283
+ }
284
+ );
285
+ }
286
+ export {
287
+ InputAction,
288
+ InputActionButton,
289
+ InputContainer,
290
+ InputContent,
291
+ InputLabel,
292
+ InputLeftSlot,
293
+ InputMessage,
294
+ InputNumber,
295
+ InputRightSlot,
296
+ InputRoot,
297
+ InputText,
298
+ inputMask
299
+ };
@@ -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 };