@particle-network/ui-react 0.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 (109) hide show
  1. package/README.md +23 -0
  2. package/dist/components/ProgressWrapper/index.d.ts +34 -0
  3. package/dist/components/ProgressWrapper/index.js +102 -0
  4. package/dist/components/UXButton/button-group-context.d.ts +2 -0
  5. package/dist/components/UXButton/button-group-context.js +6 -0
  6. package/dist/components/UXButton/button-group.d.ts +4 -0
  7. package/dist/components/UXButton/button-group.js +22 -0
  8. package/dist/components/UXButton/button-theme.d.ts +236 -0
  9. package/dist/components/UXButton/button-theme.js +626 -0
  10. package/dist/components/UXButton/button.d.ts +4 -0
  11. package/dist/components/UXButton/button.js +31 -0
  12. package/dist/components/UXButton/index.d.ts +8 -0
  13. package/dist/components/UXButton/index.js +6 -0
  14. package/dist/components/UXButton/use-button-group.d.ts +37 -0
  15. package/dist/components/UXButton/use-button-group.js +55 -0
  16. package/dist/components/UXButton/use-button.d.ts +65 -0
  17. package/dist/components/UXButton/use-button.js +136 -0
  18. package/dist/components/UXCheckbox/checkbox.extend.d.ts +7 -0
  19. package/dist/components/UXCheckbox/checkbox.extend.js +151 -0
  20. package/dist/components/UXCheckbox/checkbox.icon.d.ts +6 -0
  21. package/dist/components/UXCheckbox/checkbox.icon.js +46 -0
  22. package/dist/components/UXCheckbox/index.d.ts +10 -0
  23. package/dist/components/UXCheckbox/index.js +17 -0
  24. package/dist/components/UXChip/chip.extend.d.ts +299 -0
  25. package/dist/components/UXChip/chip.extend.js +236 -0
  26. package/dist/components/UXChip/index.d.ts +302 -0
  27. package/dist/components/UXChip/index.js +10 -0
  28. package/dist/components/UXDivider/divider.extend.d.ts +286 -0
  29. package/dist/components/UXDivider/divider.extend.js +15 -0
  30. package/dist/components/UXDivider/index.d.ts +4 -0
  31. package/dist/components/UXDivider/index.js +10 -0
  32. package/dist/components/UXDropdown/dropdown-item.d.ts +3 -0
  33. package/dist/components/UXDropdown/dropdown-item.js +306 -0
  34. package/dist/components/UXDropdown/dropdown-menu.d.ts +3 -0
  35. package/dist/components/UXDropdown/dropdown-menu.js +25 -0
  36. package/dist/components/UXDropdown/dropdown-section.d.ts +1 -0
  37. package/dist/components/UXDropdown/dropdown-section.js +2 -0
  38. package/dist/components/UXDropdown/dropdown.d.ts +4 -0
  39. package/dist/components/UXDropdown/dropdown.js +21 -0
  40. package/dist/components/UXDropdown/index.d.ts +6 -0
  41. package/dist/components/UXDropdown/index.js +6 -0
  42. package/dist/components/UXHint/index.d.ts +8 -0
  43. package/dist/components/UXHint/index.js +22 -0
  44. package/dist/components/UXInput/index.d.ts +346 -0
  45. package/dist/components/UXInput/index.js +10 -0
  46. package/dist/components/UXInput/input.extend.d.ts +343 -0
  47. package/dist/components/UXInput/input.extend.js +6 -0
  48. package/dist/components/UXModal/index.d.ts +10 -0
  49. package/dist/components/UXModal/index.js +89 -0
  50. package/dist/components/UXNumberInput/index.d.ts +5 -0
  51. package/dist/components/UXNumberInput/index.js +10 -0
  52. package/dist/components/UXNumberInput/number-input.extend.d.ts +8 -0
  53. package/dist/components/UXNumberInput/number-input.extend.js +6 -0
  54. package/dist/components/UXPopover/index.d.ts +6 -0
  55. package/dist/components/UXPopover/index.js +10 -0
  56. package/dist/components/UXPopover/popover.extend.d.ts +7 -0
  57. package/dist/components/UXPopover/popover.extend.js +26 -0
  58. package/dist/components/UXRadio/index.d.ts +10 -0
  59. package/dist/components/UXRadio/index.js +12 -0
  60. package/dist/components/UXRadio/radio.extend.d.ts +7 -0
  61. package/dist/components/UXRadio/radio.extend.js +97 -0
  62. package/dist/components/UXSelect/index.d.ts +6 -0
  63. package/dist/components/UXSelect/index.js +51 -0
  64. package/dist/components/UXSwitch/index.d.ts +331 -0
  65. package/dist/components/UXSwitch/index.js +10 -0
  66. package/dist/components/UXSwitch/switch.extend.d.ts +328 -0
  67. package/dist/components/UXSwitch/switch.extend.js +117 -0
  68. package/dist/components/UXTabs/index.d.ts +9 -0
  69. package/dist/components/UXTabs/index.js +11 -0
  70. package/dist/components/UXTabs/tabs.classes.d.ts +210 -0
  71. package/dist/components/UXTabs/tabs.classes.js +530 -0
  72. package/dist/components/UXTabs/tabs.extend.d.ts +8 -0
  73. package/dist/components/UXTabs/tabs.extend.js +6 -0
  74. package/dist/components/UXTooltip/index.d.ts +5 -0
  75. package/dist/components/UXTooltip/index.js +23 -0
  76. package/dist/components/UXTooltip/tooltip.extend.d.ts +314 -0
  77. package/dist/components/UXTooltip/tooltip.extend.js +27 -0
  78. package/dist/components/index.d.ts +44 -0
  79. package/dist/components/index.js +31 -0
  80. package/dist/components/layout/Center.d.ts +4 -0
  81. package/dist/components/layout/Center.js +11 -0
  82. package/dist/components/layout/Circle.d.ts +6 -0
  83. package/dist/components/layout/Circle.js +12 -0
  84. package/dist/components/layout/Flex.d.ts +29 -0
  85. package/dist/components/layout/Flex.js +24 -0
  86. package/dist/components/layout/HStack.d.ts +4 -0
  87. package/dist/components/layout/HStack.js +12 -0
  88. package/dist/components/layout/Square.d.ts +8 -0
  89. package/dist/components/layout/Square.js +13 -0
  90. package/dist/components/layout/VStack.d.ts +4 -0
  91. package/dist/components/layout/VStack.js +12 -0
  92. package/dist/components/typography/Text.d.ts +3 -0
  93. package/dist/components/typography/Text.js +12 -0
  94. package/dist/components/typography/Text.type.d.ts +103 -0
  95. package/dist/components/typography/Text.type.js +47 -0
  96. package/dist/icons/index.d.ts +6 -0
  97. package/dist/icons/index.js +58 -0
  98. package/dist/index.d.ts +2 -0
  99. package/dist/index.js +2 -0
  100. package/dist/utils/classes.d.ts +35 -0
  101. package/dist/utils/classes.js +87 -0
  102. package/dist/utils/index.d.ts +3 -0
  103. package/dist/utils/index.js +4 -0
  104. package/dist/utils/input-classes.d.ts +427 -0
  105. package/dist/utils/input-classes.js +568 -0
  106. package/dist/utils/variants.d.ts +91 -0
  107. package/dist/utils/variants.js +100 -0
  108. package/package.json +42 -0
  109. package/tailwind-preset.js +298 -0
@@ -0,0 +1,3 @@
1
+ import { DropdownItem } from '@heroui/dropdown';
2
+ declare const UXDropdownItem: typeof DropdownItem;
3
+ export default UXDropdownItem;
@@ -0,0 +1,306 @@
1
+ import { DropdownItem } from "@heroui/dropdown";
2
+ import { extendVariants } from "@heroui/system-rsc";
3
+ const classes = {
4
+ variants: {
5
+ variant: {
6
+ solid: {
7
+ base: ''
8
+ },
9
+ bordered: {
10
+ base: 'border-medium border-transparent bg-transparent'
11
+ },
12
+ light: {
13
+ base: 'bg-transparent'
14
+ },
15
+ faded: {
16
+ base: 'border-small border-transparent hover:border-default data-[hover=true]:bg-default-100'
17
+ },
18
+ flat: {
19
+ base: '!outline-none min-h-8 px-md rounded-small text-foreground-300 !outline-none data-[selected=true]:text-foreground gap-1',
20
+ title: 'text-tiny font-medium',
21
+ selectedIcon: '[&>svg>polyline]:stroke-2'
22
+ },
23
+ shadow: {
24
+ base: 'data-[hover=true]:shadow-lg'
25
+ }
26
+ },
27
+ color: {
28
+ default: {},
29
+ primary: {},
30
+ secondary: {},
31
+ success: {},
32
+ warning: {},
33
+ danger: {}
34
+ },
35
+ isDisabled: {
36
+ true: {
37
+ base: 'opacity-disabled pointer-events-none'
38
+ }
39
+ },
40
+ disableAnimation: {
41
+ true: {},
42
+ false: {}
43
+ }
44
+ },
45
+ defaultVariants: {
46
+ variant: 'flat',
47
+ color: 'default'
48
+ },
49
+ compoundVariants: [
50
+ {
51
+ variant: 'solid',
52
+ color: 'default',
53
+ class: {
54
+ base: 'data-[hover=true]:bg-default data-[hover=true]:text-default-foreground'
55
+ }
56
+ },
57
+ {
58
+ variant: 'solid',
59
+ color: 'primary',
60
+ class: {
61
+ base: 'data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground'
62
+ }
63
+ },
64
+ {
65
+ variant: 'solid',
66
+ color: 'secondary',
67
+ class: {
68
+ base: 'data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground'
69
+ }
70
+ },
71
+ {
72
+ variant: 'solid',
73
+ color: 'success',
74
+ class: {
75
+ base: 'data-[hover=true]:bg-success data-[hover=true]:text-success-foreground'
76
+ }
77
+ },
78
+ {
79
+ variant: 'solid',
80
+ color: 'warning',
81
+ class: {
82
+ base: 'data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground'
83
+ }
84
+ },
85
+ {
86
+ variant: 'solid',
87
+ color: 'danger',
88
+ class: {
89
+ base: 'data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground'
90
+ }
91
+ },
92
+ {
93
+ variant: 'shadow',
94
+ color: 'default',
95
+ class: {
96
+ base: 'data-[hover=true]:shadow-default/50 data-[hover=true]:bg-default data-[hover=true]:text-default-foreground'
97
+ }
98
+ },
99
+ {
100
+ variant: 'shadow',
101
+ color: 'primary',
102
+ class: {
103
+ base: 'data-[hover=true]:shadow-primary/30 data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground'
104
+ }
105
+ },
106
+ {
107
+ variant: 'shadow',
108
+ color: 'secondary',
109
+ class: {
110
+ base: 'data-[hover=true]:shadow-secondary/30 data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground'
111
+ }
112
+ },
113
+ {
114
+ variant: 'shadow',
115
+ color: 'success',
116
+ class: {
117
+ base: 'data-[hover=true]:shadow-success/30 data-[hover=true]:bg-success data-[hover=true]:text-success-foreground'
118
+ }
119
+ },
120
+ {
121
+ variant: 'shadow',
122
+ color: 'warning',
123
+ class: {
124
+ base: 'data-[hover=true]:shadow-warning/30 data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground'
125
+ }
126
+ },
127
+ {
128
+ variant: 'shadow',
129
+ color: 'danger',
130
+ class: {
131
+ base: 'data-[hover=true]:shadow-danger/30 data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground'
132
+ }
133
+ },
134
+ {
135
+ variant: 'bordered',
136
+ color: 'default',
137
+ class: {
138
+ base: 'data-[hover=true]:border-default'
139
+ }
140
+ },
141
+ {
142
+ variant: 'bordered',
143
+ color: 'primary',
144
+ class: {
145
+ base: 'data-[hover=true]:border-primary data-[hover=true]:text-primary'
146
+ }
147
+ },
148
+ {
149
+ variant: 'bordered',
150
+ color: 'secondary',
151
+ class: {
152
+ base: 'data-[hover=true]:border-secondary data-[hover=true]:text-secondary'
153
+ }
154
+ },
155
+ {
156
+ variant: 'bordered',
157
+ color: 'success',
158
+ class: {
159
+ base: 'data-[hover=true]:border-success data-[hover=true]:text-success'
160
+ }
161
+ },
162
+ {
163
+ variant: 'bordered',
164
+ color: 'warning',
165
+ class: {
166
+ base: 'data-[hover=true]:border-warning data-[hover=true]:text-warning'
167
+ }
168
+ },
169
+ {
170
+ variant: 'bordered',
171
+ color: 'danger',
172
+ class: {
173
+ base: 'data-[hover=true]:border-danger data-[hover=true]:text-danger'
174
+ }
175
+ },
176
+ {
177
+ variant: 'flat',
178
+ color: 'default',
179
+ class: {
180
+ base: 'data-[hover=true]:bg-background-200 data-[hover=true]:text-default-foreground'
181
+ }
182
+ },
183
+ {
184
+ variant: 'flat',
185
+ color: 'primary',
186
+ class: {
187
+ base: 'data-[hover=true]:bg-primary/20 data-[hover=true]:text-primary'
188
+ }
189
+ },
190
+ {
191
+ variant: 'flat',
192
+ color: 'secondary',
193
+ class: {
194
+ base: 'data-[hover=true]:bg-secondary/20 data-[hover=true]:text-secondary'
195
+ }
196
+ },
197
+ {
198
+ variant: 'flat',
199
+ color: 'success',
200
+ class: {
201
+ base: 'data-[hover=true]:bg-success/20 data-[hover=true]:text-success '
202
+ }
203
+ },
204
+ {
205
+ variant: 'flat',
206
+ color: 'warning',
207
+ class: {
208
+ base: 'data-[hover=true]:bg-warning/20 data-[hover=true]:text-warning'
209
+ }
210
+ },
211
+ {
212
+ variant: 'flat',
213
+ color: 'danger',
214
+ class: {
215
+ base: 'data-[hover=true]:bg-danger/20 data-[hover=true]:text-danger'
216
+ }
217
+ },
218
+ {
219
+ variant: 'faded',
220
+ color: 'default',
221
+ class: {
222
+ base: 'data-[hover=true]:text-default-foreground'
223
+ }
224
+ },
225
+ {
226
+ variant: 'faded',
227
+ color: 'primary',
228
+ class: {
229
+ base: 'data-[hover=true]:text-primary'
230
+ }
231
+ },
232
+ {
233
+ variant: 'faded',
234
+ color: 'secondary',
235
+ class: {
236
+ base: 'data-[hover=true]:text-secondary'
237
+ }
238
+ },
239
+ {
240
+ variant: 'faded',
241
+ color: 'success',
242
+ class: {
243
+ base: 'data-[hover=true]:text-success'
244
+ }
245
+ },
246
+ {
247
+ variant: 'faded',
248
+ color: 'warning',
249
+ class: {
250
+ base: 'data-[hover=true]:text-warning'
251
+ }
252
+ },
253
+ {
254
+ variant: 'faded',
255
+ color: 'danger',
256
+ class: {
257
+ base: 'data-[hover=true]:text-danger'
258
+ }
259
+ },
260
+ {
261
+ variant: 'light',
262
+ color: 'default',
263
+ class: {
264
+ base: 'data-[hover=true]:text-default-500'
265
+ }
266
+ },
267
+ {
268
+ variant: 'light',
269
+ color: 'primary',
270
+ class: {
271
+ base: 'data-[hover=true]:text-primary'
272
+ }
273
+ },
274
+ {
275
+ variant: 'light',
276
+ color: 'secondary',
277
+ class: {
278
+ base: 'data-[hover=true]:text-secondary'
279
+ }
280
+ },
281
+ {
282
+ variant: 'light',
283
+ color: 'success',
284
+ class: {
285
+ base: 'data-[hover=true]:text-success'
286
+ }
287
+ },
288
+ {
289
+ variant: 'light',
290
+ color: 'warning',
291
+ class: {
292
+ base: 'data-[hover=true]:text-warning'
293
+ }
294
+ },
295
+ {
296
+ variant: 'light',
297
+ color: 'danger',
298
+ class: {
299
+ base: 'data-[hover=true]:text-danger'
300
+ }
301
+ }
302
+ ]
303
+ };
304
+ const UXDropdownItem = extendVariants(DropdownItem, classes);
305
+ const dropdown_item = UXDropdownItem;
306
+ export { dropdown_item as default };
@@ -0,0 +1,3 @@
1
+ import { type DropdownMenuProps } from '@heroui/dropdown';
2
+ declare const UXDropdownMenu: import("react").ForwardRefExoticComponent<Omit<DropdownMenuProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
3
+ export default UXDropdownMenu;
@@ -0,0 +1,25 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { DropdownMenu } from "@heroui/dropdown";
4
+ const UXDropdownMenu = /*#__PURE__*/ forwardRef((props, ref)=>{
5
+ const { classNames = {}, ...restProps } = props;
6
+ const { base, list, ...restClassNames } = classNames;
7
+ return /*#__PURE__*/ jsx(DropdownMenu, {
8
+ ref: ref,
9
+ classNames: {
10
+ base: [
11
+ 'p-0 gap-0 max-h-[400px] overflow-y-auto no-scrollbar',
12
+ base
13
+ ],
14
+ list: [
15
+ 'gap-0 [&_[data-slot="heading"]]:text-small [&_[data-slot="heading"]]:font-medium',
16
+ list
17
+ ],
18
+ ...restClassNames
19
+ },
20
+ ...restProps
21
+ });
22
+ });
23
+ UXDropdownMenu.displayName = 'UX.DropdownMenu';
24
+ const dropdown_menu = UXDropdownMenu;
25
+ export { dropdown_menu as default };
@@ -0,0 +1 @@
1
+ export { DropdownSection as UXDropdownSection, type DropdownSectionProps as UXDropdownSectionProps, } from '@heroui/dropdown';
@@ -0,0 +1,2 @@
1
+ import { DropdownSection } from "@heroui/dropdown";
2
+ export { DropdownSection as UXDropdownSection };
@@ -0,0 +1,4 @@
1
+ import { type DropdownProps } from '@heroui/dropdown';
2
+ export type UXDropdownProps = DropdownProps;
3
+ declare const UXDropdown: import("react").ForwardRefExoticComponent<Omit<DropdownProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
4
+ export default UXDropdown;
@@ -0,0 +1,21 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { Dropdown } from "@heroui/dropdown";
4
+ const UXDropdown = /*#__PURE__*/ forwardRef((props, ref)=>{
5
+ const { classNames = {}, ...restProps } = props;
6
+ const { content, ...restClassNames } = classNames;
7
+ return /*#__PURE__*/ jsx(Dropdown, {
8
+ ref: ref,
9
+ classNames: {
10
+ content: [
11
+ 'text-tiny p-2.5 text-foreground-300 rounded-medium no-scrollbar',
12
+ content
13
+ ],
14
+ ...restClassNames
15
+ },
16
+ ...restProps
17
+ });
18
+ });
19
+ UXDropdown.displayName = 'UX.Dropdown';
20
+ const dropdown = UXDropdown;
21
+ export { dropdown as default };
@@ -0,0 +1,6 @@
1
+ export type { UXDropdownProps } from './dropdown';
2
+ export { default as UXDropdown } from './dropdown';
3
+ export { default as UXDropdownItem } from './dropdown-item';
4
+ export { default as UXDropdownMenu } from './dropdown-menu';
5
+ export * from './dropdown-section';
6
+ export { DropdownTrigger as UXDropdownTrigger } from '@heroui/dropdown';
@@ -0,0 +1,6 @@
1
+ import dropdown from "./dropdown.js";
2
+ import dropdown_item from "./dropdown-item.js";
3
+ import dropdown_menu from "./dropdown-menu.js";
4
+ import { DropdownTrigger } from "@heroui/dropdown";
5
+ export * from "./dropdown-section.js";
6
+ export { dropdown as UXDropdown, dropdown_item as UXDropdownItem, dropdown_menu as UXDropdownMenu, DropdownTrigger as UXDropdownTrigger };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { type UXTooltipProps } from '..';
3
+ export type UXHintProps = UXTooltipProps & {
4
+ buttonClassName?: string;
5
+ iconClassName?: string;
6
+ };
7
+ declare const UXHint: React.FC<UXHintProps>;
8
+ export default UXHint;
@@ -0,0 +1,22 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import "react";
3
+ import { UXButton, UXTooltip } from "../index.js";
4
+ import { QuestionIcon } from "../../icons/index.js";
5
+ const UXHint_UXHint = (props)=>{
6
+ const { content, children, buttonClassName, iconClassName, ...restProps } = props;
7
+ return /*#__PURE__*/ jsx(UXTooltip, {
8
+ content: content || children,
9
+ ...restProps,
10
+ children: /*#__PURE__*/ jsx(UXButton, {
11
+ variant: "text",
12
+ color: "secondary",
13
+ className: buttonClassName,
14
+ children: /*#__PURE__*/ jsx(QuestionIcon, {
15
+ className: iconClassName
16
+ })
17
+ })
18
+ });
19
+ };
20
+ UXHint_UXHint.displayName = 'UX.Hint';
21
+ const UXHint = UXHint_UXHint;
22
+ export { UXHint as default };