@xjur-ui/react 1.0.6 → 2.0.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 (115) hide show
  1. package/.turbo/turbo-build.log +97 -45
  2. package/CHANGELOG.md +44 -0
  3. package/README.md +146 -0
  4. package/dist/chunk-CBFC4QME.js +2 -0
  5. package/dist/chunk-CBFC4QME.js.map +1 -0
  6. package/dist/chunk-EIG6CBTQ.js +2 -0
  7. package/dist/chunk-EIG6CBTQ.js.map +1 -0
  8. package/dist/chunk-FASEHVMD.js +2 -0
  9. package/dist/chunk-FASEHVMD.js.map +1 -0
  10. package/dist/chunk-KIFR5VIE.js +2 -0
  11. package/dist/chunk-KIFR5VIE.js.map +1 -0
  12. package/dist/chunk-KS6WGBHQ.js +2 -0
  13. package/dist/chunk-KS6WGBHQ.js.map +1 -0
  14. package/dist/chunk-NELCN6E2.js +2 -0
  15. package/dist/chunk-NELCN6E2.js.map +1 -0
  16. package/dist/chunk-NPTLORW5.js +2 -0
  17. package/dist/chunk-NPTLORW5.js.map +1 -0
  18. package/dist/chunk-RWMV7APX.js +2 -0
  19. package/dist/chunk-RWMV7APX.js.map +1 -0
  20. package/dist/chunk-SHHXKVVR.js +2 -0
  21. package/dist/chunk-SHHXKVVR.js.map +1 -0
  22. package/dist/chunk-TB6KI6CL.js +2 -0
  23. package/dist/chunk-TB6KI6CL.js.map +1 -0
  24. package/dist/components/avatar-group.js +2 -179
  25. package/dist/components/avatar-group.js.map +1 -0
  26. package/dist/components/avatar.js +2 -59
  27. package/dist/components/avatar.js.map +1 -0
  28. package/dist/components/badge.js +2 -111
  29. package/dist/components/badge.js.map +1 -0
  30. package/dist/components/button.js +2 -98
  31. package/dist/components/button.js.map +1 -0
  32. package/dist/components/calendar.js +2 -751
  33. package/dist/components/calendar.js.map +1 -0
  34. package/dist/components/checkbox.js +2 -153
  35. package/dist/components/checkbox.js.map +1 -0
  36. package/dist/components/chip.d.ts +3 -1
  37. package/dist/components/chip.js +2 -256
  38. package/dist/components/chip.js.map +1 -0
  39. package/dist/components/collapsible.js +2 -41
  40. package/dist/components/collapsible.js.map +1 -0
  41. package/dist/components/date-picker.d.ts +8 -3
  42. package/dist/components/date-picker.js +2 -232
  43. package/dist/components/date-picker.js.map +1 -0
  44. package/dist/components/divider.js +2 -29
  45. package/dist/components/divider.js.map +1 -0
  46. package/dist/components/dropdown-menu.js +2 -295
  47. package/dist/components/dropdown-menu.js.map +1 -0
  48. package/dist/components/icon.js +2 -177
  49. package/dist/components/icon.js.map +1 -0
  50. package/dist/components/input.d.ts +9 -4
  51. package/dist/components/input.js +2 -315
  52. package/dist/components/input.js.map +1 -0
  53. package/dist/components/list.js +2 -179
  54. package/dist/components/list.js.map +1 -0
  55. package/dist/components/logo.js +2 -324
  56. package/dist/components/logo.js.map +1 -0
  57. package/dist/components/otp-input.js +2 -47
  58. package/dist/components/otp-input.js.map +1 -0
  59. package/dist/components/radio.js +2 -156
  60. package/dist/components/radio.js.map +1 -0
  61. package/dist/components/rich-editor.d.ts +2 -1
  62. package/dist/components/rich-editor.js +2 -723
  63. package/dist/components/rich-editor.js.map +1 -0
  64. package/dist/components/search-input.js +2 -274
  65. package/dist/components/search-input.js.map +1 -0
  66. package/dist/components/select.d.ts +6 -3
  67. package/dist/components/select.js +2 -550
  68. package/dist/components/select.js.map +1 -0
  69. package/dist/components/sheet.js +2 -251
  70. package/dist/components/sheet.js.map +1 -0
  71. package/dist/components/skeleton.js +2 -16
  72. package/dist/components/skeleton.js.map +1 -0
  73. package/dist/components/status.js +2 -111
  74. package/dist/components/status.js.map +1 -0
  75. package/dist/components/switch.js +2 -36
  76. package/dist/components/switch.js.map +1 -0
  77. package/dist/components/table.js +2 -196
  78. package/dist/components/table.js.map +1 -0
  79. package/dist/components/tabs.d.ts +9 -6
  80. package/dist/components/tabs.js +2 -54
  81. package/dist/components/tabs.js.map +1 -0
  82. package/dist/components/tag.d.ts +3 -1
  83. package/dist/components/tag.js +2 -189
  84. package/dist/components/tag.js.map +1 -0
  85. package/dist/components/tooltip.js +2 -58
  86. package/dist/components/tooltip.js.map +1 -0
  87. package/dist/components/typography.js +2 -78
  88. package/dist/components/typography.js.map +1 -0
  89. package/dist/hooks/index.d.ts +7 -0
  90. package/dist/hooks/index.js +2 -0
  91. package/dist/hooks/index.js.map +1 -0
  92. package/dist/index.css +2 -2322
  93. package/dist/index.css.map +1 -0
  94. package/dist/logo-PQRZORCS.js +3 -0
  95. package/dist/logo-PQRZORCS.js.map +1 -0
  96. package/package.json +41 -8
  97. package/src/components/calendar.tsx +7 -6
  98. package/src/components/chip.tsx +11 -3
  99. package/src/components/date-picker.tsx +125 -22
  100. package/src/components/icon.tsx +1 -1
  101. package/src/components/input.tsx +124 -60
  102. package/src/components/logo.tsx +25 -20
  103. package/src/components/rich-editor.tsx +4 -3
  104. package/src/components/select.tsx +104 -26
  105. package/src/components/tabs.tsx +56 -37
  106. package/src/components/tag.tsx +11 -3
  107. package/src/index.css +2 -2
  108. package/src/resources/logo/index.tsx +33 -0
  109. package/tsup.config.ts +23 -5
  110. package/dist/components/test.d.ts +0 -5
  111. package/dist/components/test.js +0 -8
  112. package/dist/index.js +0 -0
  113. package/src/components/test.tsx +0 -3
  114. package/src/index.ts +0 -1
  115. package/src/resources/logo/index.ts +0 -3
@@ -1,6 +1,6 @@
1
- import type { ComponentProps } from 'react'
1
+ import { createContext, useContext, type ComponentProps } from 'react'
2
2
  import * as RadixPopover from '@radix-ui/react-popover'
3
- import { cx } from '@xjur-ui/util'
3
+ import { tv, twMerge } from '@xjur-ui/util'
4
4
  import {
5
5
  ListContent,
6
6
  ListItem,
@@ -17,25 +17,57 @@ import {
17
17
  import { Icon } from './icon'
18
18
  import { Typography, type TypographyProps } from './typography'
19
19
 
20
- export function SelectRoot(props: ComponentProps<typeof RadixPopover.Root>) {
21
- return <RadixPopover.Root {...props} />
20
+ const SelectContext = createContext({
21
+ disabled: false,
22
+ hasError: false
23
+ })
24
+
25
+ function useSelect() {
26
+ const context = useContext(SelectContext)
27
+
28
+ if (!context) {
29
+ throw new Error('useSelect must be used within a SelectRoot')
30
+ }
31
+
32
+ return context
33
+ }
34
+
35
+ export function SelectRoot({
36
+ disabled = false,
37
+ hasError = false,
38
+ ...props
39
+ }: ComponentProps<typeof RadixPopover.Root> & {
40
+ disabled?: boolean
41
+ hasError?: boolean
42
+ }) {
43
+ return (
44
+ <SelectContext.Provider value={{ disabled, hasError }}>
45
+ <RadixPopover.Root {...props} />
46
+ </SelectContext.Provider>
47
+ )
22
48
  }
23
49
 
24
50
  export function SelectTrigger({
25
51
  className,
26
52
  ...props
27
53
  }: ComponentProps<typeof RadixPopover.Trigger>) {
54
+ const { disabled, hasError } = useSelect()
55
+
28
56
  return (
29
57
  <RadixPopover.Trigger
30
- className={cx(
58
+ className={twMerge(
31
59
  className,
32
60
  'group h-large-4x rounded-small-1x gap-small py-small_1x-alt px-small relative flex w-full cursor-pointer items-center',
33
61
  'bg-layer-2-idle border-border-layer-2 hover:border-border-layer-3 border',
34
- 'data-[state=open]:border-primary-idle',
35
- 'has-[input:not(:placeholder-shown)]:text-primary-idle',
36
- 'has-[input:not(:placeholder-shown)]:border-primary-idle'
62
+ 'data-[state=open]:border-primary-idle data-[state=open]:data-[has-error=true]:border-danger-label-active',
63
+ 'has-[input:not(:placeholder-shown)]:text-primary-idle has-[input:not(:placeholder-shown)]:data-[has-error=true]:text-danger-label-active',
64
+ 'has-[input:not(:placeholder-shown)]:border-primary-idle has-[input:not(:placeholder-shown)]:data-[has-error=true]:border-danger-label-active',
65
+ 'disabled:bg-layer-2-idle disabled:cursor-text disabled:border-none disabled:select-text',
66
+ 'data-[has-error=true]:border-danger-idle data-[has-error=true]:hover:border-danger-idle'
37
67
  )}
38
68
  {...props}
69
+ data-has-error={hasError}
70
+ disabled={disabled}
39
71
  />
40
72
  )
41
73
  }
@@ -52,7 +84,7 @@ export function SelectContent({
52
84
  <RadixPopover.Portal>
53
85
  <RadixPopover.Content
54
86
  align={align}
55
- className={cx(
87
+ className={twMerge(
56
88
  className,
57
89
  'group z-10 max-h-[var(--radix-popover-content-available-height)] max-w-[var(--radix-popover-content-available-width)] min-w-[var(--radix-popover-trigger-width)]'
58
90
  )}
@@ -74,7 +106,14 @@ export function SelectValue({
74
106
  return (
75
107
  <>
76
108
  {!!displayValue && (
77
- <Typography className="text-neutral-dark group-has-[div[data-slot=select-left-slot]]:pl-large-1x">
109
+ <Typography
110
+ className={twMerge(
111
+ className,
112
+ 'text-neutral-dark',
113
+ // if has left slot, add the left slot padding
114
+ 'group-has-[div[data-slot=select-left-slot]]:pl-large-1x'
115
+ )}
116
+ >
78
117
  {displayValue}
79
118
  </Typography>
80
119
  )}
@@ -82,7 +121,7 @@ export function SelectValue({
82
121
  <input
83
122
  {...props}
84
123
  aria-readonly={true}
85
- className={cx(className, 'pointer-events-none')}
124
+ className={twMerge(className, 'pointer-events-none')}
86
125
  hidden={true}
87
126
  placeholder={props.placeholder ?? ' '}
88
127
  readOnly={true}
@@ -99,9 +138,13 @@ export function SelectMultiValue({
99
138
  }: ComponentProps<'div'> & { values: string[] }) {
100
139
  return (
101
140
  <div
102
- className={cx(
141
+ className={twMerge(
103
142
  className,
104
- 'gap-small-1x scrollbar-hide group-has-[div[data-slot=select-left-slot]]:pl-large-1x overflow-x-small flex'
143
+ 'gap-small-1x scrollbar-hide overflow-x-small flex',
144
+ // if has left slot, add the left slot padding
145
+ 'group-has-[div[data-slot=select-left-slot]]:pl-large-1x',
146
+ // if the trigger is disabled, remove the left slot padding
147
+ 'group-disabled:!pl-0'
105
148
  )}
106
149
  {...props}
107
150
  >
@@ -109,7 +152,7 @@ export function SelectMultiValue({
109
152
 
110
153
  <input
111
154
  aria-readonly={true}
112
- className={cx(className, 'pointer-events-none')}
155
+ className={twMerge(className, 'pointer-events-none')}
113
156
  hidden={true}
114
157
  placeholder={' '}
115
158
  readOnly={true}
@@ -125,20 +168,22 @@ export function SelectLabel({
125
168
  children,
126
169
  ...props
127
170
  }: TypographyProps & { htmlFor?: string }) {
171
+ const { hasError } = useSelect()
172
+
128
173
  return (
129
174
  <Typography
130
175
  asChild={true}
131
- className={cx(
176
+ className={twMerge(
132
177
  'inline-block max-w-full truncate text-left font-normal',
133
178
  'left-small right-small pointer-events-none absolute top-1/2 -translate-y-1/2',
134
179
  'ease transition-all duration-250',
135
180
  // Content Open
136
- 'group-data-[state=open]:text-primary-idle',
181
+ 'group-data-[state=open]:!text-primary-idle group-data-[state=open]:data-[has-error=true]:!text-danger-label-active',
137
182
  'group-data-[state=open]:-top-[3px]',
138
183
  'group-data-[state=open]:text-size-label-sm-1x',
139
184
  'group-data-[state=open]:font-medium',
140
185
  // Filled
141
- 'group-has-[input:not(:placeholder-shown)]:text-primary-idle',
186
+ 'group-has-[input:not(:placeholder-shown)]:!text-primary-idle group-has-[input:not(:placeholder-shown)]:data-[has-error=true]:!text-danger-label-active',
142
187
  'group-has-[input:not(:placeholder-shown)]:-top-[3px]',
143
188
  'group-has-[input:not(:placeholder-shown)]:text-size-label-sm-1x',
144
189
  'group-has-[input:not(:placeholder-shown)]:font-medium',
@@ -154,9 +199,10 @@ export function SelectLabel({
154
199
  'group-data-[state=open]:animate-in',
155
200
  'group-data-[state=closed]:animate-out',
156
201
  'group-has-[input:not(:placeholder-shown)]:animate-out',
202
+ 'group-disabled:hidden',
157
203
  className
158
204
  )}
159
- weight="medium"
205
+ data-has-error={hasError}
160
206
  {...props}
161
207
  >
162
208
  <label htmlFor={htmlFor}>
@@ -176,7 +222,9 @@ export function SelectOption({
176
222
  className,
177
223
  ...props
178
224
  }: ComponentProps<typeof ListItem>) {
179
- return <ListItem className={cx(className, 'cursor-pointer')} {...props} />
225
+ return (
226
+ <ListItem className={twMerge(className, 'cursor-pointer')} {...props} />
227
+ )
180
228
  }
181
229
 
182
230
  export function SelectOptionText(props: ComponentProps<typeof Typography>) {
@@ -193,15 +241,11 @@ export function SelectHeaderTitle(
193
241
  return <ListHeaderTitle {...props} />
194
242
  }
195
243
 
196
- export function SelectDropdown(props: ComponentProps<'div'>) {
197
- return <div {...props} />
198
- }
199
-
200
244
  export function SelectLeftSlot({ className, ...props }: ComponentProps<'div'>) {
201
245
  return (
202
246
  <div
203
247
  {...props}
204
- className={cx(
248
+ className={twMerge(
205
249
  className,
206
250
  'left-small absolute top-1/2 flex -translate-y-1/2 items-center justify-center'
207
251
  )}
@@ -217,9 +261,10 @@ export function SelectRightSlot({
217
261
  return (
218
262
  <div
219
263
  {...props}
220
- className={cx(
264
+ className={twMerge(
221
265
  className,
222
- 'right-small absolute top-1/2 flex -translate-y-1/2 items-center justify-center'
266
+ 'right-small absolute top-1/2 flex -translate-y-1/2 items-center justify-center',
267
+ 'group-disabled:hidden'
223
268
  )}
224
269
  data-slot="select-right-slot"
225
270
  />
@@ -238,3 +283,36 @@ export function SelectSearch(props: ComponentProps<typeof SearchInputText>) {
238
283
  </SearchInputRoot>
239
284
  )
240
285
  }
286
+
287
+ export function SelectCaption({
288
+ className,
289
+ variant = 'body',
290
+ size = 'sm',
291
+ weight = 'normal',
292
+ ...props
293
+ }: ComponentProps<typeof Typography>) {
294
+ const { hasError } = useSelect()
295
+
296
+ const caption = tv({
297
+ base: 'text-size-body-sm mt-small-1x font-normal',
298
+ variants: {
299
+ state: {
300
+ error: 'text-danger-label-active',
301
+ idle: 'text-neutral-dark'
302
+ }
303
+ }
304
+ })
305
+
306
+ return (
307
+ <Typography
308
+ className={caption({
309
+ state: hasError ? 'error' : 'idle',
310
+ className
311
+ })}
312
+ size={size}
313
+ variant={variant}
314
+ weight={weight}
315
+ {...props}
316
+ />
317
+ )
318
+ }
@@ -1,53 +1,72 @@
1
+ import * as React from 'react'
1
2
  import * as TabsPrimitive from '@radix-ui/react-tabs'
2
- import { cva, cx } from '@xjur-ui/util'
3
+ import { tv } from '@xjur-ui/util'
3
4
 
4
- export function TabsRoot({
5
- ...props
6
- }: React.ComponentProps<typeof TabsPrimitive.Tabs>) {
5
+ const tabsStyles = tv({
6
+ slots: {
7
+ list: 'flex items-center gap-0',
8
+ trigger:
9
+ 'inline-flex items-center justify-center gap-small px-small py-small_1x-alt h-large-4x ' +
10
+ 'font-medium cursor-pointer transition-colors !text-size-label-md ' +
11
+ 'disabled:opacity-38 disabled:pointer-events-none',
12
+ content: ''
13
+ },
14
+ variants: {
15
+ variant: {
16
+ line: {
17
+ trigger:
18
+ 'rounded-small-1x text-neutral-dark border-b-[3px] border-b-transparent ' +
19
+ 'hover:bg-layer-2-hover ' +
20
+ 'data-[state=active]:text-primary-active ' +
21
+ 'data-[state=active]:border-b-primary-active ' +
22
+ 'data-[state=active]:rounded-none data-[state=active]:bg-transparent'
23
+ },
24
+ button: {
25
+ trigger:
26
+ 'rounded-tl-small-1x rounded-tr-small-1x rounded-bl-none rounded-br-none px-large ' +
27
+ 'bg-primary-idle text-neutral-label ' +
28
+ 'hover:bg-primary-hover ' +
29
+ 'data-[state=active]:bg-layer-2-idle data-[state=active]:text-primary-active'
30
+ }
31
+ }
32
+ },
33
+ defaultVariants: {
34
+ variant: 'button'
35
+ }
36
+ })
37
+
38
+ export function TabsRoot(
39
+ props: React.ComponentProps<typeof TabsPrimitive.Tabs>
40
+ ) {
7
41
  return <TabsPrimitive.Tabs {...props} />
8
42
  }
9
43
 
10
- export function TabsList({
11
- ...props
12
- }: React.ComponentProps<typeof TabsPrimitive.TabsList>) {
13
- return <TabsPrimitive.TabsList {...props} />
44
+ export type TabsListProps = React.ComponentProps<typeof TabsPrimitive.TabsList>
45
+
46
+ export function TabsList({ className, ...props }: TabsListProps) {
47
+ const { list } = tabsStyles({})
48
+ return <TabsPrimitive.TabsList className={list({ className })} {...props} />
49
+ }
50
+
51
+ export interface TabsTriggerProps
52
+ extends React.ComponentProps<typeof TabsPrimitive.TabsTrigger> {
53
+ variant?: 'line' | 'button'
14
54
  }
15
55
 
16
56
  export function TabsTrigger({
17
57
  variant,
18
58
  className,
19
59
  ...props
20
- }: React.ComponentProps<typeof TabsPrimitive.TabsTrigger> & {
21
- variant?: 'line' | 'button'
22
- }) {
23
- const variants = cva(
24
- [
25
- 'rounded-small-1x h-large-4x cursor-pointer text-size-label-md text-neutral-dark'
26
- ],
27
- {
28
- variants: {
29
- variant: {
30
- line: 'py-small_1x-alt px-small data-[state=active]:border-b-[3px] data-[state=active]:border-b-primary-active data-[state=active]:rounded-none hover:bg-layer-2-hover',
31
- button:
32
- 'rounded-br-none rounded-bl-none py-small_1x-alt px-large bg-primary-idle text-neutral-label hover:bg-primary-hover data-[state=active]:bg-layer-2-idle data-[state=active]:text-primary-label-active'
33
- }
34
- },
35
- defaultVariants: {
36
- variant: 'button'
37
- }
38
- }
39
- )
40
-
60
+ }: TabsTriggerProps) {
61
+ const { trigger } = tabsStyles({ variant })
41
62
  return (
42
- <TabsPrimitive.TabsTrigger
43
- className={cx(className, variants({ variant }))}
44
- {...props}
45
- />
63
+ <TabsPrimitive.TabsTrigger className={trigger({ className })} {...props} />
46
64
  )
47
65
  }
48
66
 
49
- export function TabsContent({
50
- ...props
51
- }: React.ComponentProps<typeof TabsPrimitive.TabsContent>) {
52
- return <TabsPrimitive.TabsContent {...props} />
67
+ export function TabsContent(
68
+ props: React.ComponentProps<typeof TabsPrimitive.TabsContent>
69
+ ) {
70
+ const { content } = tabsStyles()
71
+ return <TabsPrimitive.TabsContent className={content()} {...props} />
53
72
  }
@@ -27,9 +27,17 @@ const tagVariants = cva(
27
27
  export function TagRoot({
28
28
  className,
29
29
  variant = 'primary',
30
+ disabled = false,
30
31
  ...props
31
- }: ComponentProps<'div'> & ClassVariantProps<typeof tagVariants>) {
32
- return <div className={cx(tagVariants({ variant }), className)} {...props} />
32
+ }: ComponentProps<'div'> &
33
+ ClassVariantProps<typeof tagVariants> & { disabled?: boolean }) {
34
+ return (
35
+ <div
36
+ className={cx(tagVariants({ variant }), className)}
37
+ data-disabled={disabled}
38
+ {...props}
39
+ />
40
+ )
33
41
  }
34
42
 
35
43
  export function TagText({
@@ -77,7 +85,7 @@ export function TagClose({
77
85
  className={cx(
78
86
  className,
79
87
  'cursor-pointer bg-inherit',
80
- 'invisible items-center justify-center group-hover/tag:visible',
88
+ 'invisible items-center justify-center group-hover/tag:data-[disabled=false]:visible',
81
89
  'absolute top-0 right-0',
82
90
  'h-large-2x w-large-2x rounded-circle',
83
91
  'transition-[visibility] duration-200'
package/src/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  @import "tailwindcss";
2
2
  @import "@xjur-ui/styles/theme.css";
3
3
  @import "tw-animate-css";
4
- @plugin "tailwind-scrollbar-hide";
5
- @plugin "tailwind-scrollbar";
4
+ @plugin "tailwind-scrollbar";
5
+ @plugin "tailwind-scrollbar-hide";
@@ -0,0 +1,33 @@
1
+ import { Horizontal } from './horizontal'
2
+ import { Vertical } from './vertical'
3
+ import { Icon } from './icon'
4
+
5
+ interface LogoWrapperProps {
6
+ mode: 'horizontal' | 'vertical' | 'icon'
7
+ variant: 'colorful' | 'orange' | 'purple' | 'white' | 'gray'
8
+ color?: string
9
+ }
10
+
11
+ export default function LogoWrapper({
12
+ mode,
13
+ variant,
14
+ color
15
+ }: LogoWrapperProps) {
16
+ switch (mode) {
17
+ case 'icon':
18
+ if (variant === 'colorful' || !color) {
19
+ return <Icon.Colorful />
20
+ }
21
+ return <Icon.Solid color={color} />
22
+ case 'vertical':
23
+ if (variant === 'colorful' || !color) {
24
+ return <Vertical.Colorful />
25
+ }
26
+ return <Vertical.Solid color={color} />
27
+ case 'horizontal':
28
+ if (variant === 'colorful' || !color) {
29
+ return <Horizontal.Colorful />
30
+ }
31
+ return <Horizontal.Solid color={color} />
32
+ }
33
+ }
package/tsup.config.ts CHANGED
@@ -1,12 +1,30 @@
1
1
  import { defineConfig } from 'tsup'
2
2
 
3
3
  export default defineConfig({
4
- // all js and ts
5
- entry: ['src/index.ts', 'src/components/**/*.ts', 'src/components/**/*.tsx'],
4
+ entry: [
5
+ 'src/index.ts',
6
+ 'src/components/**/*.ts',
7
+ 'src/components/**/*.tsx',
8
+ 'src/hooks/index.ts',
9
+ 'src/index.css'
10
+ ],
6
11
  format: ['esm'],
7
12
  outDir: 'dist',
8
- external: ['react', 'react-dom'],
13
+ external: [
14
+ 'react',
15
+ 'react-dom',
16
+ 'react/jsx-runtime',
17
+ '@radix-ui/**',
18
+ '@tiptap/**',
19
+ 'react-day-picker',
20
+ '@react-input/**'
21
+ ],
9
22
  dts: true,
10
- splitting: false,
11
- clean: true
23
+ splitting: true,
24
+ treeshake: true,
25
+ minify: true,
26
+ sourcemap: true,
27
+ clean: true,
28
+ target: 'esnext',
29
+ platform: 'browser'
12
30
  })
@@ -1,5 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare function Test(): react_jsx_runtime.JSX.Element;
4
-
5
- export { Test };
@@ -1,8 +0,0 @@
1
- // src/components/test.tsx
2
- import { jsx } from "react/jsx-runtime";
3
- function Test() {
4
- return /* @__PURE__ */ jsx("div", { children: "Test" });
5
- }
6
- export {
7
- Test
8
- };
package/dist/index.js DELETED
File without changes
@@ -1,3 +0,0 @@
1
- export function Test() {
2
- return <div>Test</div>
3
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- import './index.css'
@@ -1,3 +0,0 @@
1
- export { Horizontal } from './horizontal'
2
- export { Vertical } from './vertical'
3
- export { Icon } from './icon'