@fuf-stack/pixels 0.43.10 → 0.44.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 (49) hide show
  1. package/dist/Alert/index.cjs +2 -2
  2. package/dist/Alert/index.js +1 -1
  3. package/dist/Button/index.cjs +2 -2
  4. package/dist/Button/index.d.cts +2 -2
  5. package/dist/Button/index.d.ts +2 -2
  6. package/dist/Button/index.js +1 -1
  7. package/dist/{Button-DykH6Lmz.d.cts → Button-BNrJYJDH.d.cts} +3 -1
  8. package/dist/{Button-DykH6Lmz.d.ts → Button-BNrJYJDH.d.ts} +3 -1
  9. package/dist/Json/index.cjs +3 -3
  10. package/dist/Json/index.js +2 -2
  11. package/dist/Label/index.cjs +2 -2
  12. package/dist/Label/index.d.cts +2 -2
  13. package/dist/Label/index.d.ts +2 -2
  14. package/dist/Label/index.js +1 -1
  15. package/dist/Label-B1a1krk8.d.cts +432 -0
  16. package/dist/Label-B1a1krk8.d.ts +432 -0
  17. package/dist/Popover/index.d.cts +3 -3
  18. package/dist/Popover/index.d.ts +3 -3
  19. package/dist/{Popover-Bxe50qlw.d.cts → Popover-Czc5-4V1.d.cts} +1 -1
  20. package/dist/{Popover-DhF3bXJE.d.ts → Popover-Dm_Dsjqw.d.ts} +1 -1
  21. package/dist/{chunk-RELR2OCI.js → chunk-6XNLMOET.js} +7 -5
  22. package/dist/chunk-6XNLMOET.js.map +1 -0
  23. package/dist/{chunk-OXXSHHVG.js → chunk-DBVM5SIA.js} +5 -5
  24. package/dist/{chunk-OXXSHHVG.js.map → chunk-DBVM5SIA.js.map} +1 -1
  25. package/dist/{chunk-PYXJNORH.cjs → chunk-J44KQ3VW.cjs} +3 -3
  26. package/dist/{chunk-PYXJNORH.cjs.map → chunk-J44KQ3VW.cjs.map} +1 -1
  27. package/dist/{chunk-AN7A66NS.cjs → chunk-K6UF4AGX.cjs} +7 -5
  28. package/dist/chunk-K6UF4AGX.cjs.map +1 -0
  29. package/dist/{chunk-Q2SVN66A.cjs → chunk-KWSGA623.cjs} +5 -5
  30. package/dist/chunk-KWSGA623.cjs.map +1 -0
  31. package/dist/{chunk-PLJWIGRS.cjs → chunk-PHQVYJS2.cjs} +62 -6
  32. package/dist/chunk-PHQVYJS2.cjs.map +1 -0
  33. package/dist/{chunk-5BUCFDWR.js → chunk-PUMF3NYY.js} +2 -2
  34. package/dist/chunk-X6JZFO33.js +127 -0
  35. package/dist/chunk-X6JZFO33.js.map +1 -0
  36. package/dist/index.cjs +5 -5
  37. package/dist/index.d.cts +3 -3
  38. package/dist/index.d.ts +3 -3
  39. package/dist/index.js +4 -4
  40. package/package.json +2 -2
  41. package/dist/Label-Bp9WZiDB.d.cts +0 -152
  42. package/dist/Label-Bp9WZiDB.d.ts +0 -152
  43. package/dist/chunk-AN7A66NS.cjs.map +0 -1
  44. package/dist/chunk-KIRRQFSZ.js +0 -71
  45. package/dist/chunk-KIRRQFSZ.js.map +0 -1
  46. package/dist/chunk-PLJWIGRS.cjs.map +0 -1
  47. package/dist/chunk-Q2SVN66A.cjs.map +0 -1
  48. package/dist/chunk-RELR2OCI.js.map +0 -1
  49. /package/dist/{chunk-5BUCFDWR.js.map → chunk-PUMF3NYY.js.map} +0 -0
@@ -0,0 +1,432 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as tailwind_variants from 'tailwind-variants';
3
+ import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
4
+ import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
5
+ import { ChipProps } from '@heroui/chip';
6
+ import { ReactNode } from 'react';
7
+
8
+ declare const labelVariants: tailwind_variants.TVReturnType<{
9
+ color: {
10
+ default: {
11
+ dot: string;
12
+ };
13
+ primary: {
14
+ dot: string;
15
+ };
16
+ secondary: {
17
+ dot: string;
18
+ };
19
+ success: {
20
+ dot: string;
21
+ };
22
+ warning: {
23
+ dot: string;
24
+ };
25
+ danger: {
26
+ dot: string;
27
+ };
28
+ info: {
29
+ dot: string;
30
+ };
31
+ };
32
+ isIconOnly: {
33
+ true: {
34
+ content: string;
35
+ };
36
+ false: {
37
+ content: string;
38
+ };
39
+ };
40
+ hasEndContent: {
41
+ true: {
42
+ base: string;
43
+ };
44
+ };
45
+ variant: {
46
+ solid: {};
47
+ bordered: {
48
+ base: string;
49
+ };
50
+ light: {
51
+ base: string;
52
+ };
53
+ flat: {};
54
+ faded: {
55
+ base: string;
56
+ };
57
+ shadow: {};
58
+ dot: {
59
+ base: string;
60
+ };
61
+ };
62
+ }, {
63
+ base: string;
64
+ closeButton: string;
65
+ content: string;
66
+ dot: string;
67
+ icon: string;
68
+ }, undefined, tailwind_variants_dist_config_js.TVConfig<{
69
+ color: {
70
+ default: {
71
+ dot: string;
72
+ };
73
+ primary: {
74
+ dot: string;
75
+ };
76
+ secondary: {
77
+ dot: string;
78
+ };
79
+ success: {
80
+ dot: string;
81
+ };
82
+ warning: {
83
+ dot: string;
84
+ };
85
+ danger: {
86
+ dot: string;
87
+ };
88
+ info: {
89
+ dot: string;
90
+ };
91
+ };
92
+ isIconOnly: {
93
+ true: {
94
+ content: string;
95
+ };
96
+ false: {
97
+ content: string;
98
+ };
99
+ };
100
+ hasEndContent: {
101
+ true: {
102
+ base: string;
103
+ };
104
+ };
105
+ variant: {
106
+ solid: {};
107
+ bordered: {
108
+ base: string;
109
+ };
110
+ light: {
111
+ base: string;
112
+ };
113
+ flat: {};
114
+ faded: {
115
+ base: string;
116
+ };
117
+ shadow: {};
118
+ dot: {
119
+ base: string;
120
+ };
121
+ };
122
+ }, {
123
+ color: {
124
+ default: {
125
+ dot: string;
126
+ };
127
+ primary: {
128
+ dot: string;
129
+ };
130
+ secondary: {
131
+ dot: string;
132
+ };
133
+ success: {
134
+ dot: string;
135
+ };
136
+ warning: {
137
+ dot: string;
138
+ };
139
+ danger: {
140
+ dot: string;
141
+ };
142
+ info: {
143
+ dot: string;
144
+ };
145
+ };
146
+ isIconOnly: {
147
+ true: {
148
+ content: string;
149
+ };
150
+ false: {
151
+ content: string;
152
+ };
153
+ };
154
+ hasEndContent: {
155
+ true: {
156
+ base: string;
157
+ };
158
+ };
159
+ variant: {
160
+ solid: {};
161
+ bordered: {
162
+ base: string;
163
+ };
164
+ light: {
165
+ base: string;
166
+ };
167
+ flat: {};
168
+ faded: {
169
+ base: string;
170
+ };
171
+ shadow: {};
172
+ dot: {
173
+ base: string;
174
+ };
175
+ };
176
+ }>, {
177
+ color: {
178
+ default: {
179
+ dot: string;
180
+ };
181
+ primary: {
182
+ dot: string;
183
+ };
184
+ secondary: {
185
+ dot: string;
186
+ };
187
+ success: {
188
+ dot: string;
189
+ };
190
+ warning: {
191
+ dot: string;
192
+ };
193
+ danger: {
194
+ dot: string;
195
+ };
196
+ info: {
197
+ dot: string;
198
+ };
199
+ };
200
+ isIconOnly: {
201
+ true: {
202
+ content: string;
203
+ };
204
+ false: {
205
+ content: string;
206
+ };
207
+ };
208
+ hasEndContent: {
209
+ true: {
210
+ base: string;
211
+ };
212
+ };
213
+ variant: {
214
+ solid: {};
215
+ bordered: {
216
+ base: string;
217
+ };
218
+ light: {
219
+ base: string;
220
+ };
221
+ flat: {};
222
+ faded: {
223
+ base: string;
224
+ };
225
+ shadow: {};
226
+ dot: {
227
+ base: string;
228
+ };
229
+ };
230
+ }, {
231
+ base: string;
232
+ closeButton: string;
233
+ content: string;
234
+ dot: string;
235
+ icon: string;
236
+ }, tailwind_variants.TVReturnType<{
237
+ color: {
238
+ default: {
239
+ dot: string;
240
+ };
241
+ primary: {
242
+ dot: string;
243
+ };
244
+ secondary: {
245
+ dot: string;
246
+ };
247
+ success: {
248
+ dot: string;
249
+ };
250
+ warning: {
251
+ dot: string;
252
+ };
253
+ danger: {
254
+ dot: string;
255
+ };
256
+ info: {
257
+ dot: string;
258
+ };
259
+ };
260
+ isIconOnly: {
261
+ true: {
262
+ content: string;
263
+ };
264
+ false: {
265
+ content: string;
266
+ };
267
+ };
268
+ hasEndContent: {
269
+ true: {
270
+ base: string;
271
+ };
272
+ };
273
+ variant: {
274
+ solid: {};
275
+ bordered: {
276
+ base: string;
277
+ };
278
+ light: {
279
+ base: string;
280
+ };
281
+ flat: {};
282
+ faded: {
283
+ base: string;
284
+ };
285
+ shadow: {};
286
+ dot: {
287
+ base: string;
288
+ };
289
+ };
290
+ }, {
291
+ base: string;
292
+ closeButton: string;
293
+ content: string;
294
+ dot: string;
295
+ icon: string;
296
+ }, undefined, tailwind_variants_dist_config_js.TVConfig<{
297
+ color: {
298
+ default: {
299
+ dot: string;
300
+ };
301
+ primary: {
302
+ dot: string;
303
+ };
304
+ secondary: {
305
+ dot: string;
306
+ };
307
+ success: {
308
+ dot: string;
309
+ };
310
+ warning: {
311
+ dot: string;
312
+ };
313
+ danger: {
314
+ dot: string;
315
+ };
316
+ info: {
317
+ dot: string;
318
+ };
319
+ };
320
+ isIconOnly: {
321
+ true: {
322
+ content: string;
323
+ };
324
+ false: {
325
+ content: string;
326
+ };
327
+ };
328
+ hasEndContent: {
329
+ true: {
330
+ base: string;
331
+ };
332
+ };
333
+ variant: {
334
+ solid: {};
335
+ bordered: {
336
+ base: string;
337
+ };
338
+ light: {
339
+ base: string;
340
+ };
341
+ flat: {};
342
+ faded: {
343
+ base: string;
344
+ };
345
+ shadow: {};
346
+ dot: {
347
+ base: string;
348
+ };
349
+ };
350
+ }, {
351
+ color: {
352
+ default: {
353
+ dot: string;
354
+ };
355
+ primary: {
356
+ dot: string;
357
+ };
358
+ secondary: {
359
+ dot: string;
360
+ };
361
+ success: {
362
+ dot: string;
363
+ };
364
+ warning: {
365
+ dot: string;
366
+ };
367
+ danger: {
368
+ dot: string;
369
+ };
370
+ info: {
371
+ dot: string;
372
+ };
373
+ };
374
+ isIconOnly: {
375
+ true: {
376
+ content: string;
377
+ };
378
+ false: {
379
+ content: string;
380
+ };
381
+ };
382
+ hasEndContent: {
383
+ true: {
384
+ base: string;
385
+ };
386
+ };
387
+ variant: {
388
+ solid: {};
389
+ bordered: {
390
+ base: string;
391
+ };
392
+ light: {
393
+ base: string;
394
+ };
395
+ flat: {};
396
+ faded: {
397
+ base: string;
398
+ };
399
+ shadow: {};
400
+ dot: {
401
+ base: string;
402
+ };
403
+ };
404
+ }>, unknown, unknown, undefined>>;
405
+ type VariantProps = TVProps<typeof labelVariants>;
406
+ type ClassName = TVClassName<typeof labelVariants>;
407
+ interface LabelProps extends VariantProps {
408
+ /** content of the label */
409
+ children?: ReactNode;
410
+ /** CSS class name */
411
+ className?: ClassName;
412
+ /** color of the label */
413
+ color?: VariantProps['color'];
414
+ /** element to be rendered in the right side of the label */
415
+ endContent?: ChipProps['endContent'];
416
+ /** optional label icon, when only icon provided without children and endContent */
417
+ icon?: ReactNode;
418
+ /** add close button to endContent */
419
+ onClose?: ChipProps['onClose'];
420
+ /** radius of the label */
421
+ radius?: ChipProps['radius'];
422
+ /** size of the label */
423
+ size?: ChipProps['size'];
424
+ /** style variant of the label */
425
+ variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';
426
+ }
427
+ /**
428
+ * Label component based on [HeroUI Chip](https://www.heroui.com//docs/components/chip)
429
+ */
430
+ declare const Label: ({ children, className: _className, color, endContent, icon, onClose, radius, size, variant, }: LabelProps) => react_jsx_runtime.JSX.Element;
431
+
432
+ export { Label as L, type LabelProps as a, labelVariants as l };
@@ -1,12 +1,12 @@
1
- import { _ as _default } from '../Popover-Bxe50qlw.cjs';
2
- export { P as PopoverProps } from '../Popover-Bxe50qlw.cjs';
1
+ import { _ as _default } from '../Popover-Czc5-4V1.cjs';
2
+ export { P as PopoverProps } from '../Popover-Czc5-4V1.cjs';
3
3
  import 'react/jsx-runtime';
4
4
  import 'tailwind-variants/dist/config.js';
5
5
  import 'tailwind-variants';
6
6
  import '@fuf-stack/pixel-utils';
7
7
  import '@heroui/popover';
8
8
  import 'react';
9
- import '../Button-DykH6Lmz.cjs';
9
+ import '../Button-BNrJYJDH.cjs';
10
10
  import '@heroui/button';
11
11
 
12
12
 
@@ -1,12 +1,12 @@
1
- import { _ as _default } from '../Popover-DhF3bXJE.js';
2
- export { P as PopoverProps } from '../Popover-DhF3bXJE.js';
1
+ import { _ as _default } from '../Popover-Dm_Dsjqw.js';
2
+ export { P as PopoverProps } from '../Popover-Dm_Dsjqw.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'tailwind-variants/dist/config.js';
5
5
  import 'tailwind-variants';
6
6
  import '@fuf-stack/pixel-utils';
7
7
  import '@heroui/popover';
8
8
  import 'react';
9
- import '../Button-DykH6Lmz.js';
9
+ import '../Button-BNrJYJDH.js';
10
10
  import '@heroui/button';
11
11
 
12
12
 
@@ -4,7 +4,7 @@ import * as tailwind_variants from 'tailwind-variants';
4
4
  import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
5
5
  import { PopoverProps as PopoverProps$1 } from '@heroui/popover';
6
6
  import { ReactNode } from 'react';
7
- import { a as ButtonProps } from './Button-DykH6Lmz.cjs';
7
+ import { a as ButtonProps } from './Button-BNrJYJDH.cjs';
8
8
 
9
9
  declare const popoverVariants: tailwind_variants.TVReturnType<{
10
10
  [key: string]: {
@@ -4,7 +4,7 @@ import * as tailwind_variants from 'tailwind-variants';
4
4
  import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
5
5
  import { PopoverProps as PopoverProps$1 } from '@heroui/popover';
6
6
  import { ReactNode } from 'react';
7
- import { a as ButtonProps } from './Button-DykH6Lmz.js';
7
+ import { a as ButtonProps } from './Button-BNrJYJDH.js';
8
8
 
9
9
  declare const popoverVariants: tailwind_variants.TVReturnType<{
10
10
  [key: string]: {
@@ -46,10 +46,11 @@ var buttonVariants = tv({
46
46
  base: "",
47
47
  variants: {
48
48
  color: __spreadValues({
49
+ // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/button.ts
49
50
  info: ""
50
51
  }, heroButtonVariants.variants.color),
51
- variant: __spreadValues({}, heroButtonVariants.variants.variant),
52
- size: __spreadValues({}, heroButtonVariants.variants.size)
52
+ variant: heroButtonVariants.variants.variant,
53
+ size: heroButtonVariants.variants.size
53
54
  },
54
55
  compoundVariants: [
55
56
  // white text on solid / shadow success button
@@ -106,12 +107,13 @@ var Button = ({
106
107
  children = void 0,
107
108
  className = void 0,
108
109
  color = "default",
109
- disabled = false,
110
110
  disableAnimation = false,
111
+ disabled = false,
111
112
  icon = void 0,
112
113
  loading = false,
113
114
  onClick = void 0,
114
115
  radius = void 0,
116
+ ripple = false,
115
117
  size = void 0,
116
118
  testId = void 0,
117
119
  type = void 0,
@@ -125,7 +127,7 @@ var Button = ({
125
127
  color,
126
128
  "data-testid": testId,
127
129
  disableAnimation,
128
- disableRipple: disableAnimation,
130
+ disableRipple: disableAnimation || !ripple,
129
131
  isDisabled: disabled,
130
132
  isIconOnly: !!(icon && !children),
131
133
  isLoading: loading,
@@ -152,4 +154,4 @@ export {
152
154
  Button_default,
153
155
  Button_default2
154
156
  };
155
- //# sourceMappingURL=chunk-RELR2OCI.js.map
157
+ //# sourceMappingURL=chunk-6XNLMOET.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Button/Button.tsx","../src/Button/subcomponents/LoadingSpinner.tsx","../src/Button/index.ts"],"sourcesContent":["import type { TVProps } from '@fuf-stack/pixel-utils';\nimport type { ButtonProps as HeroButtonProps } from '@heroui/button';\nimport type { ReactNode } from 'react';\n\nimport { Button as HeroButton } from '@heroui/button';\nimport { button as heroButtonVariants } from '@heroui/theme';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\nexport const buttonVariants = tv({\n base: '',\n variants: {\n color: {\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/button.ts\n info: '',\n ...heroButtonVariants.variants.color,\n },\n variant: heroButtonVariants.variants.variant,\n size: heroButtonVariants.variants.size,\n },\n compoundVariants: [\n // white text on solid / shadow success button\n {\n color: 'success',\n variant: ['solid', 'shadow'],\n class: 'text-white',\n },\n // white text on solid / shadow warning button\n {\n color: 'warning',\n variant: ['solid', 'shadow'],\n class: 'text-white',\n },\n {\n color: 'info',\n variant: 'solid',\n class: 'bg-info text-info-foreground',\n },\n {\n color: 'info',\n variant: 'shadow',\n class: 'text-info-foreground\" bg-info shadow-lg shadow-info/40',\n },\n {\n color: 'info',\n variant: 'bordered',\n class: 'border-medium border-info bg-transparent text-info',\n },\n {\n color: 'info',\n variant: 'flat',\n class: 'bg-info/20 text-info-600',\n },\n {\n color: 'info',\n variant: 'faded',\n class: 'border-default bg-default-100 text-info',\n },\n {\n color: 'info',\n variant: 'light',\n class: 'bg-transparent text-info data-[hover=true]:bg-info-100',\n },\n {\n color: 'info',\n variant: 'ghost',\n class:\n 'border-info text-info data-[hover=true]:!bg-info data-[hover=true]:!text-info-foreground',\n },\n ],\n});\n\ntype VariantProps = TVProps<typeof buttonVariants>;\n\nexport interface ButtonProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** content of the button */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** color of the button */\n color?: HeroButtonProps['color'];\n /** disables the button */\n disabled?: boolean;\n /** disables all animations */\n disableAnimation?: boolean;\n /** shows loading animation */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** click event handler */\n onClick?: HeroButtonProps['onPress'];\n /** border radius size */\n radius?: HeroButtonProps['radius'];\n /** enable ripple animation effect on click */\n ripple?: boolean;\n /** size options */\n size?: HeroButtonProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** HTML button type attribute */\n type?: 'button' | 'submit' | 'reset' | undefined;\n /** visual style variant */\n variant?: HeroButtonProps['variant'];\n}\n\n/**\n * Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)\n */\nconst Button = ({\n ariaLabel = undefined,\n children = undefined,\n className = undefined,\n color = 'default',\n disableAnimation = false,\n disabled = false,\n icon = undefined,\n loading = false,\n onClick = undefined,\n radius = undefined,\n ripple = false,\n size = undefined,\n testId = undefined,\n type = undefined,\n variant = 'solid',\n}: ButtonProps) => {\n return (\n <HeroButton\n aria-label={ariaLabel}\n className={buttonVariants({ color, variant, className })}\n color={color}\n data-testid={testId}\n disableAnimation={disableAnimation}\n disableRipple={disableAnimation || !ripple}\n isDisabled={disabled}\n isIconOnly={!!(icon && !children)}\n isLoading={loading}\n onPress={onClick}\n radius={radius}\n size={size}\n spinner={<LoadingSpinner />}\n type={type}\n variant={variant}\n >\n {icon}\n {children}\n </HeroButton>\n );\n};\n\nexport default Button;\n","/**\n * svg loading spinner for button\n * @see https://www.heroui.com//docs/components/button#loading\n * */\nexport default () => (\n <svg\n className=\"h-5 w-5 animate-spin text-current\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import Button, { buttonVariants } from './Button';\n\nexport type { ButtonProps } from './Button';\n\nexport { Button, buttonVariants };\n\nexport default Button;\n"],"mappings":";;;;;AAIA,SAAS,UAAU,kBAAkB;AACrC,SAAS,UAAU,0BAA0B;AAE7C,SAAS,UAAU;;;ACFjB,SAME,KANF;AADF,IAAO,yBAAQ,MACb;AAAA,EAAC;AAAA;AAAA,IACC,WAAU;AAAA,IACV,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,OAAM;AAAA,IAEN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,IAAG;AAAA,UACH,IAAG;AAAA,UACH,GAAE;AAAA,UACF,QAAO;AAAA,UACP,aAAY;AAAA;AAAA,MACd;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV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ACV,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AACZ,MAAmB;AACjB,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,cAAY;AAAA,MACZ,WAAW,eAAe,EAAE,OAAO,SAAS,UAAU,CAAC;AAAA,MACvD;AAAA,MACA,eAAa;AAAA,MACb;AAAA,MACA,eAAe,oBAAoB,CAAC;AAAA,MACpC,YAAY;AAAA,MACZ,YAAY,CAAC,EAAE,QAAQ,CAAC;AAAA,MACxB,WAAW;AAAA,MACX,SAAS;AAAA,MACT;AAAA,MACA;AAAA,MACA,SAAS,gBAAAD,KAAC,0BAAe;AAAA,MACzB;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,QACA;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,iBAAQ;;;AEnJf,IAAOE,kBAAQ;","names":["jsx","jsxs","Button_default"]}
@@ -101,15 +101,15 @@ var Alert = ({
101
101
  variant,
102
102
  sizeLimit
103
103
  });
104
- const isHeroUIColor = Object.keys(heroAlertVariants.variants.color).includes(
105
- color
106
- );
107
104
  const classNames = variantsToClassNames(variants, className, "base");
105
+ const heroColor = Object.keys(heroAlertVariants.variants.color).includes(
106
+ color
107
+ ) ? color : void 0;
108
108
  return /* @__PURE__ */ jsx(
109
109
  HeroAlert,
110
110
  {
111
111
  classNames,
112
- color: isHeroUIColor ? color : void 0,
112
+ color: heroColor,
113
113
  "data-testid": testId,
114
114
  description: title ? children : void 0,
115
115
  endContent,
@@ -132,4 +132,4 @@ export {
132
132
  Alert_default,
133
133
  Alert_default2
134
134
  };
135
- //# sourceMappingURL=chunk-OXXSHHVG.js.map
135
+ //# sourceMappingURL=chunk-DBVM5SIA.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Alert/Alert.tsx","../src/Alert/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { AlertProps as HeroAlertProps } from '@heroui/alert';\nimport type { ReactNode } from 'react';\n\nimport { Alert as HeroAlert } from '@heroui/alert';\nimport { alert as heroAlertVariants } from '@heroui/theme';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nexport const alertVariants = tv({\n slots: {\n base: '',\n title: '',\n description: '',\n mainWrapper: '',\n closeButton: '',\n iconWrapper: '',\n alertIcon: '',\n },\n variants: {\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/alert.ts\n color: {\n info: {\n mainWrapper: 'text-inherit',\n title: 'text-inherit',\n description: 'text-inherit',\n },\n ...heroAlertVariants.variants.color,\n },\n variant: {\n ...heroAlertVariants.variants.variant,\n },\n sizeLimit: {\n height: {\n base: 'max-h-[150px] overflow-y-auto overflow-x-hidden',\n },\n width: {\n base: 'max-w-[480px] overflow-x-auto overflow-y-hidden',\n },\n both: {\n base: 'max-h-[150px] max-w-[480px] overflow-y-auto overflow-x-hidden',\n },\n },\n },\n compoundVariants: [\n ...heroAlertVariants.compoundVariants,\n {\n color: 'info',\n variant: 'solid',\n className: {\n base: 'bg-info text-info-foreground',\n alertIcon: 'text-info-foreground',\n closeButton: 'text-inherit',\n },\n },\n {\n color: 'info',\n variant: 'flat',\n className: {\n alertIcon: 'fill-current',\n base: 'bg-info-50 text-info-600 dark:bg-info-50/50',\n closeButton: 'text-info-500 data-[hover]:bg-info-200',\n iconWrapper: 'border-info-100 bg-info-50 dark:bg-info-100',\n },\n },\n {\n color: 'info',\n variant: 'faded',\n className: {\n alertIcon: 'fill-current',\n base: 'border-small border-info-200 bg-info-50 text-info-600 dark:border-info-100 dark:bg-info-50/50',\n closeButton: 'text-info-500 data-[hover]:bg-info-200',\n iconWrapper: 'border-info-100 bg-info-50 dark:bg-info-100',\n },\n },\n {\n color: 'info',\n variant: 'bordered',\n className: {\n alertIcon: 'fill-current',\n base: 'border-small border-info text-info',\n closeButton: 'text-info-500 data-[hover]:bg-info-200',\n iconWrapper: 'bg-info-100 dark:bg-info-50',\n },\n },\n ],\n});\n\nexport type VariantProps = TVProps<typeof alertVariants>;\ntype ClassName = TVClassName<typeof alertVariants>;\n\nexport interface AlertProps extends VariantProps {\n /** Content displayed inside the Alert if no description is given! */\n children?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** Color scheme of the Alert */\n color?: VariantProps['color'];\n /** Content displayed at the end of the Alert */\n endContent?: ReactNode;\n /** Icon displayed at the start of the Alert */\n icon?: ReactNode;\n /** Whether the Alert can be closed */\n isClosable?: boolean;\n /** Callback fired when the close button is clicked */\n onClose?: () => void | undefined;\n /** Whether to show the icon at the start */\n showIcon?: boolean;\n /** limit height to 150px or width to 480px or both */\n sizeLimit?: VariantProps['sizeLimit'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Title displayed in the Alert above the content */\n title?: ReactNode;\n /** Style variant of the Alert */\n variant?: VariantProps['variant'];\n}\n\n/**\n * Alert component based on [HeroUI Alert](https://www.heroui.com//docs/components/alert)\n */\nconst Alert = ({\n children = undefined,\n className = undefined,\n color = 'primary',\n endContent = undefined,\n icon = undefined,\n isClosable = false,\n onClose = undefined,\n sizeLimit = undefined,\n showIcon = true,\n testId = undefined,\n title = undefined,\n variant = 'solid',\n}: AlertProps) => {\n const variants = alertVariants({\n color,\n variant,\n sizeLimit,\n });\n const isHeroUIColor = Object.keys(heroAlertVariants.variants.color).includes(\n color,\n );\n const classNames = variantsToClassNames(variants, className, 'base');\n\n return (\n <HeroAlert\n classNames={classNames}\n color={isHeroUIColor ? (color as HeroAlertProps['color']) : undefined}\n data-testid={testId}\n description={title ? children : undefined}\n endContent={endContent}\n hideIcon={!showIcon}\n icon={icon}\n isClosable={isClosable}\n onClose={onClose}\n title={(title || children) as string}\n variant={variant}\n />\n );\n};\n\nexport default Alert;\n","import Alert, { alertVariants } from './Alert';\n\nexport type { AlertProps } from './Alert';\n\nexport { Alert, alertVariants };\n\nexport default Alert;\n"],"mappings":";;;;;AA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a;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACF,CAAC;AAmCD,IAAM,QAAQ,CAAC;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,OAAO;AAAA,EACP,aAAa;AAAA,EACb,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AACZ,MAAkB;AAChB,QAAM,WAAW,cAAc;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,gBAAgB,OAAO,KAAK,kBAAkB,SAAS,KAAK,EAAE;AAAA,IAClE;AAAA,EACF;AACA,QAAM,aAAa,qBAAqB,UAAU,WAAW,MAAM;AAEnE,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO,gBAAiB,QAAoC;AAAA,MAC5D,eAAa;AAAA,MACb,aAAa,QAAQ,WAAW;AAAA,MAChC;AAAA,MACA,UAAU,CAAC;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAQ,SAAS;AAAA,MACjB;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,gBAAQ;;;AC5Jf,IAAOA,iBAAQ;","names":["Alert_default"]}
1
+ {"version":3,"sources":["../src/Alert/Alert.tsx","../src/Alert/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { AlertProps as HeroAlertProps } from '@heroui/alert';\nimport type { ReactNode } from 'react';\n\nimport { Alert as HeroAlert } from '@heroui/alert';\nimport { alert as heroAlertVariants } from '@heroui/theme';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nexport const alertVariants = tv({\n slots: {\n base: '',\n title: '',\n description: '',\n mainWrapper: '',\n closeButton: '',\n iconWrapper: '',\n alertIcon: '',\n },\n variants: {\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/alert.ts\n color: {\n info: {\n mainWrapper: 'text-inherit',\n title: 'text-inherit',\n description: 'text-inherit',\n },\n ...heroAlertVariants.variants.color,\n },\n variant: {\n ...heroAlertVariants.variants.variant,\n },\n sizeLimit: {\n height: {\n base: 'max-h-[150px] overflow-y-auto overflow-x-hidden',\n },\n width: {\n base: 'max-w-[480px] overflow-x-auto overflow-y-hidden',\n },\n both: {\n base: 'max-h-[150px] max-w-[480px] overflow-y-auto overflow-x-hidden',\n },\n },\n },\n compoundVariants: [\n ...heroAlertVariants.compoundVariants,\n {\n color: 'info',\n variant: 'solid',\n className: {\n base: 'bg-info text-info-foreground',\n alertIcon: 'text-info-foreground',\n closeButton: 'text-inherit',\n },\n },\n {\n color: 'info',\n variant: 'flat',\n className: {\n alertIcon: 'fill-current',\n base: 'bg-info-50 text-info-600 dark:bg-info-50/50',\n closeButton: 'text-info-500 data-[hover]:bg-info-200',\n iconWrapper: 'border-info-100 bg-info-50 dark:bg-info-100',\n },\n },\n {\n color: 'info',\n variant: 'faded',\n className: {\n alertIcon: 'fill-current',\n base: 'border-small border-info-200 bg-info-50 text-info-600 dark:border-info-100 dark:bg-info-50/50',\n closeButton: 'text-info-500 data-[hover]:bg-info-200',\n iconWrapper: 'border-info-100 bg-info-50 dark:bg-info-100',\n },\n },\n {\n color: 'info',\n variant: 'bordered',\n className: {\n alertIcon: 'fill-current',\n base: 'border-small border-info text-info',\n closeButton: 'text-info-500 data-[hover]:bg-info-200',\n iconWrapper: 'bg-info-100 dark:bg-info-50',\n },\n },\n ],\n});\n\nexport type VariantProps = TVProps<typeof alertVariants>;\ntype ClassName = TVClassName<typeof alertVariants>;\n\nexport interface AlertProps extends VariantProps {\n /** Content displayed inside the Alert if no description is given! */\n children?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** Color scheme of the Alert */\n color?: VariantProps['color'];\n /** Content displayed at the end of the Alert */\n endContent?: ReactNode;\n /** Icon displayed at the start of the Alert */\n icon?: ReactNode;\n /** Whether the Alert can be closed */\n isClosable?: boolean;\n /** Callback fired when the close button is clicked */\n onClose?: () => void | undefined;\n /** Whether to show the icon at the start */\n showIcon?: boolean;\n /** limit height to 150px or width to 480px or both */\n sizeLimit?: VariantProps['sizeLimit'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Title displayed in the Alert above the content */\n title?: ReactNode;\n /** Style variant of the Alert */\n variant?: VariantProps['variant'];\n}\n\n/**\n * Alert component based on [HeroUI Alert](https://www.heroui.com//docs/components/alert)\n */\nconst Alert = ({\n children = undefined,\n className = undefined,\n color = 'primary',\n endContent = undefined,\n icon = undefined,\n isClosable = false,\n onClose = undefined,\n sizeLimit = undefined,\n showIcon = true,\n testId = undefined,\n title = undefined,\n variant = 'solid',\n}: AlertProps) => {\n const variants = alertVariants({\n color,\n variant,\n sizeLimit,\n });\n const classNames = variantsToClassNames(variants, className, 'base');\n\n // pass color prop for heroui colors\n const heroColor = Object.keys(heroAlertVariants.variants.color).includes(\n color,\n )\n ? (color as HeroAlertProps['color'])\n : undefined;\n\n return (\n <HeroAlert\n classNames={classNames}\n color={heroColor}\n data-testid={testId}\n description={title ? children : undefined}\n endContent={endContent}\n hideIcon={!showIcon}\n icon={icon}\n isClosable={isClosable}\n onClose={onClose}\n title={(title || children) as string}\n variant={variant}\n />\n );\n};\n\nexport default Alert;\n","import Alert, { alertVariants } from './Alert';\n\nexport type { AlertProps } from './Alert';\n\nexport { Alert, alertVariants };\n\nexport default Alert;\n"],"mappings":";;;;;AAIA,SAAS,SAAS,iBAAiB;AACnC,SAAS,SAAS,yBAAyB;AAE3C,SAAS,IAAI,4BAA4B;AA+IrC;AA7IG,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,IACb,aAAa;AAAA,IACb,aAAa;AAAA,IACb,aAAa;AAAA,IACb,WAAW;AAAA,EACb;AAAA,EACA,UAAU;AAAA;AAAA,IAER,OAAO;AAAA,MACL,M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c;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,aAAa,qBAAqB,UAAU,WAAW,MAAM;AAGnE,QAAM,YAAY,OAAO,KAAK,kBAAkB,SAAS,KAAK,EAAE;AAAA,IAC9D;AAAA,EACF,IACK,QACD;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO;AAAA,MACP,eAAa;AAAA,MACb,aAAa,QAAQ,WAAW;AAAA,MAChC;AAAA,MACA,UAAU,CAAC;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAQ,SAAS;AAAA,MACjB;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,gBAAQ;;;AChKf,IAAOA,iBAAQ;","names":["Alert_default"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunkAN7A66NScjs = require('./chunk-AN7A66NS.cjs');
3
+ var _chunkK6UF4AGXcjs = require('./chunk-K6UF4AGX.cjs');
4
4
 
5
5
 
6
6
 
@@ -2594,7 +2594,7 @@ var ErrorRenderer = ({
2594
2594
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium", children: "Failed to parse JSON data" })
2595
2595
  ] }),
2596
2596
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2597
- _chunkAN7A66NScjs.Button_default,
2597
+ _chunkK6UF4AGXcjs.Button_default,
2598
2598
  {
2599
2599
  color: "danger",
2600
2600
  size: "sm",
@@ -2713,4 +2713,4 @@ var Json_default2 = Json_default;
2713
2713
 
2714
2714
 
2715
2715
  exports.Json_default = Json_default; exports.Json_default2 = Json_default2;
2716
- //# sourceMappingURL=chunk-PYXJNORH.cjs.map
2716
+ //# sourceMappingURL=chunk-J44KQ3VW.cjs.map