@pelatform/ui 1.5.9 → 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 (104) hide show
  1. package/css/source.css +20 -0
  2. package/css/theme.css +1 -2
  3. package/dist/animation.d.ts +4 -379
  4. package/dist/animation.js +2 -1752
  5. package/dist/aria.d.ts +1 -31
  6. package/dist/aria.js +2 -139
  7. package/dist/base.d.ts +1 -651
  8. package/dist/base.js +2 -5559
  9. package/dist/chunk-UEVIEY7W.js +51 -0
  10. package/dist/{components.cjs → chunk-VZEE3GOC.js} +81 -2344
  11. package/dist/components.d.ts +224 -181
  12. package/dist/components.js +364 -765
  13. package/dist/default.d.ts +1 -1322
  14. package/dist/default.js +2 -8931
  15. package/dist/hooks.d.ts +4 -1087
  16. package/dist/hooks.js +5 -662
  17. package/dist/index.d.ts +58 -308
  18. package/dist/index.js +5 -226
  19. package/package.json +29 -109
  20. package/dist/animation.cjs +0 -1752
  21. package/dist/animation.d.cts +0 -379
  22. package/dist/aria.cjs +0 -139
  23. package/dist/aria.d.cts +0 -31
  24. package/dist/badge-BtI4BMea.d.cts +0 -33
  25. package/dist/badge-BtI4BMea.d.ts +0 -33
  26. package/dist/base.cjs +0 -5559
  27. package/dist/base.d.cts +0 -651
  28. package/dist/chunk-3N75YA6Q.cjs +0 -60
  29. package/dist/chunk-7472NIIL.cjs +0 -40
  30. package/dist/chunk-BXUKTDPN.cjs +0 -576
  31. package/dist/chunk-CD2BCCQU.js +0 -180
  32. package/dist/chunk-CJXIPSTG.cjs +0 -10
  33. package/dist/chunk-CTHRAJQZ.js +0 -1522
  34. package/dist/chunk-D373YKDA.js +0 -196
  35. package/dist/chunk-EZW5GNS4.js +0 -6
  36. package/dist/chunk-HILACSFA.cjs +0 -1522
  37. package/dist/chunk-HR3R6KKM.js +0 -40
  38. package/dist/chunk-HW52LCWN.js +0 -22
  39. package/dist/chunk-I46SELBA.cjs +0 -22
  40. package/dist/chunk-J4JGE3U5.cjs +0 -180
  41. package/dist/chunk-RQHJBTEU.js +0 -10
  42. package/dist/chunk-SK6SSJHC.js +0 -9
  43. package/dist/chunk-T74DBLYY.js +0 -60
  44. package/dist/chunk-TB6DU23O.js +0 -576
  45. package/dist/chunk-UP53DCYH.cjs +0 -6
  46. package/dist/chunk-ZBO5IAMA.cjs +0 -196
  47. package/dist/chunk-ZDR3OZ7Z.cjs +0 -9
  48. package/dist/colors-CUDWvz1g.d.cts +0 -42
  49. package/dist/colors-CUDWvz1g.d.ts +0 -42
  50. package/dist/components-CidsRcc3.d.cts +0 -46
  51. package/dist/components-CidsRcc3.d.ts +0 -46
  52. package/dist/components.d.cts +0 -2944
  53. package/dist/default.cjs +0 -8931
  54. package/dist/default.d.cts +0 -1322
  55. package/dist/hooks.cjs +0 -666
  56. package/dist/hooks.d.cts +0 -1176
  57. package/dist/index.cjs +0 -230
  58. package/dist/index.d.cts +0 -318
  59. package/dist/input-AwYIskrX.d.cts +0 -22
  60. package/dist/input-AwYIskrX.d.ts +0 -22
  61. package/dist/menu-GmSRfRGB.d.cts +0 -43
  62. package/dist/menu-GmSRfRGB.d.ts +0 -43
  63. package/dist/metafile-cjs.json +0 -1
  64. package/dist/metafile-esm.json +0 -1
  65. package/dist/re-export/cva.cjs +0 -6
  66. package/dist/re-export/cva.d.cts +0 -10
  67. package/dist/re-export/cva.d.ts +0 -10
  68. package/dist/re-export/cva.js +0 -6
  69. package/dist/re-export/motion.cjs +0 -2
  70. package/dist/re-export/motion.d.cts +0 -1
  71. package/dist/re-export/motion.d.ts +0 -1
  72. package/dist/re-export/motion.js +0 -2
  73. package/dist/re-export/next-themes.cjs +0 -2
  74. package/dist/re-export/next-themes.d.cts +0 -1
  75. package/dist/re-export/next-themes.d.ts +0 -1
  76. package/dist/re-export/next-themes.js +0 -2
  77. package/dist/re-export/react-day-picker.cjs +0 -2
  78. package/dist/re-export/react-day-picker.d.cts +0 -1
  79. package/dist/re-export/react-day-picker.d.ts +0 -1
  80. package/dist/re-export/react-day-picker.js +0 -2
  81. package/dist/re-export/react-hook-form.cjs +0 -2
  82. package/dist/re-export/react-hook-form.d.cts +0 -1
  83. package/dist/re-export/react-hook-form.d.ts +0 -1
  84. package/dist/re-export/react-hook-form.js +0 -2
  85. package/dist/re-export/resolver.cjs +0 -2
  86. package/dist/re-export/resolver.d.cts +0 -1
  87. package/dist/re-export/resolver.d.ts +0 -1
  88. package/dist/re-export/resolver.js +0 -2
  89. package/dist/re-export/sonner.cjs +0 -2
  90. package/dist/re-export/sonner.d.cts +0 -1
  91. package/dist/re-export/sonner.d.ts +0 -1
  92. package/dist/re-export/sonner.js +0 -2
  93. package/dist/re-export/tanstack-query.cjs +0 -2
  94. package/dist/re-export/tanstack-query.d.cts +0 -1
  95. package/dist/re-export/tanstack-query.d.ts +0 -1
  96. package/dist/re-export/tanstack-query.js +0 -2
  97. package/dist/re-export/tanstack-table.cjs +0 -2
  98. package/dist/re-export/tanstack-table.d.cts +0 -1
  99. package/dist/re-export/tanstack-table.d.ts +0 -1
  100. package/dist/re-export/tanstack-table.js +0 -2
  101. package/dist/re-export/zod.cjs +0 -2
  102. package/dist/re-export/zod.d.cts +0 -1
  103. package/dist/re-export/zod.d.ts +0 -1
  104. package/dist/re-export/zod.js +0 -2
@@ -1,379 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
3
- import React__default, { ComponentPropsWithoutRef, ReactNode, ElementType } from 'react';
4
- import { UseInViewOptions, SpringOptions, HTMLMotionProps, Transition, MotionProps } from 'motion/react';
5
- import * as class_variance_authority_types from 'class-variance-authority/types';
6
- import { VariantProps } from 'class-variance-authority';
7
-
8
- type AnimationType = 'default' | 'flip' | 'reveal';
9
- interface AvatarGroupProps {
10
- children: React.ReactNode;
11
- className?: string;
12
- tooltipClassName?: string;
13
- animation?: AnimationType;
14
- }
15
- interface AvatarGroupItemProps {
16
- children: React.ReactNode;
17
- className?: string;
18
- tooltipClassName?: string;
19
- animation?: AnimationType;
20
- }
21
- interface AvatarGroupTooltipProps {
22
- children: React.ReactNode;
23
- className?: string;
24
- }
25
- declare function AvatarGroup({ children, className, tooltipClassName, animation, }: AvatarGroupProps): react_jsx_runtime.JSX.Element;
26
- declare function AvatarGroupItem({ children, className, tooltipClassName, animation: itemAnimation, }: AvatarGroupItemProps): react_jsx_runtime.JSX.Element;
27
- declare function AvatarGroupTooltip({ children, className }: AvatarGroupTooltipProps): react_jsx_runtime.JSX.Element;
28
-
29
- interface CountingNumberProps {
30
- from?: number;
31
- to?: number;
32
- duration?: number;
33
- delay?: number;
34
- className?: string;
35
- startOnView?: boolean;
36
- once?: boolean;
37
- inViewMargin?: UseInViewOptions['margin'];
38
- onComplete?: () => void;
39
- format?: (value: number) => string;
40
- }
41
- declare function CountingNumber({ from, to, duration, delay, className, startOnView, once, inViewMargin, onComplete, format, ...props }: CountingNumberProps): react_jsx_runtime.JSX.Element;
42
-
43
- declare const githubButtonVariants: (props?: ({
44
- variant?: "default" | "outline" | null | undefined;
45
- size?: "default" | "sm" | "lg" | null | undefined;
46
- } & class_variance_authority_types.ClassProp) | undefined) => string;
47
- interface GithubButtonProps extends React__default.ComponentProps<'button'>, VariantProps<typeof githubButtonVariants> {
48
- /** Whether to round stars */
49
- roundStars?: boolean;
50
- /** Whether to show Github icon */
51
- fixedWidth?: boolean;
52
- /** Initial number of stars */
53
- initialStars?: number;
54
- /** Class for stars */
55
- starsClass?: string;
56
- /** Target number of stars to animate to */
57
- targetStars?: number;
58
- /** Animation duration in seconds */
59
- animationDuration?: number;
60
- /** Animation delay in seconds */
61
- animationDelay?: number;
62
- /** Whether to start animation automatically */
63
- autoAnimate?: boolean;
64
- /** Callback when animation completes */
65
- onAnimationComplete?: () => void;
66
- /** Whether to show Github icon */
67
- showGithubIcon?: boolean;
68
- /** Whether to show star icon */
69
- showStarIcon?: boolean;
70
- /** Whether to show separator */
71
- separator?: boolean;
72
- /** Whether stars should be filled */
73
- filled?: boolean;
74
- /** Repository URL for actual Github integration */
75
- repoUrl?: string;
76
- /** Button text label */
77
- label?: string;
78
- /** Use in-view detection to trigger animation */
79
- useInViewTrigger?: boolean;
80
- /** In-view options */
81
- inViewOptions?: UseInViewOptions;
82
- /** Spring transition options */
83
- transition?: SpringOptions;
84
- }
85
- declare function GithubButton({ initialStars, targetStars, starsClass, fixedWidth, animationDuration, animationDelay, autoAnimate, className, variant, size, showGithubIcon, showStarIcon, roundStars, separator, filled, repoUrl, onClick, label, useInViewTrigger, inViewOptions, transition, ...props }: GithubButtonProps): react_jsx_runtime.JSX.Element;
86
-
87
- type GradientBackgroundProps = HTMLMotionProps<'div'> & {
88
- transition?: Transition;
89
- };
90
- declare function GradientBackground({ className, transition, ...props }: GradientBackgroundProps): react_jsx_runtime.JSX.Element;
91
-
92
- type GridSize = '4:4' | '5:5' | '6:6' | '6:8' | '8:8' | '8:12' | '10:10' | '12:12' | '12:16' | '16:16';
93
- type GridBackgroundProps = HTMLMotionProps<'div'> & {
94
- children?: React.ReactNode;
95
- gridSize?: GridSize;
96
- colors?: {
97
- background?: string;
98
- borderColor?: string;
99
- borderSize?: string;
100
- borderStyle?: 'solid' | 'dashed' | 'dotted';
101
- };
102
- beams?: {
103
- count?: number;
104
- colors?: string[];
105
- size?: string;
106
- shadow?: string;
107
- speed?: number;
108
- };
109
- };
110
- declare function GridBackground({ className, children, gridSize, colors, beams, ...props }: GridBackgroundProps): react_jsx_runtime.JSX.Element;
111
-
112
- type HoverBackgroundProps = HTMLMotionProps<'div'> & {
113
- objectCount?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
114
- children?: React.ReactNode;
115
- colors?: {
116
- background?: string;
117
- objects?: string[];
118
- glow?: string;
119
- };
120
- };
121
- declare function HoverBackground({ className, objectCount, children, colors, ...props }: HoverBackgroundProps): react_jsx_runtime.JSX.Element;
122
-
123
- interface MarqueeProps extends ComponentPropsWithoutRef<'div'> {
124
- /**
125
- * Optional CSS class name to apply custom styles
126
- */
127
- className?: string;
128
- /**
129
- * Whether to reverse the animation direction
130
- * @default false
131
- */
132
- reverse?: boolean;
133
- /**
134
- * Whether to pause the animation on hover
135
- * @default false
136
- */
137
- pauseOnHover?: boolean;
138
- /**
139
- * Content to be displayed in the marquee
140
- */
141
- children: React__default.ReactNode;
142
- /**
143
- * Whether to animate vertically instead of horizontally
144
- * @default false
145
- */
146
- vertical?: boolean;
147
- /**
148
- * Number of times to repeat the content
149
- * @default 4
150
- */
151
- repeat?: number;
152
- /**
153
- * If true, automatically repeats children enough to fill the visible area
154
- */
155
- autoFill?: boolean;
156
- /**
157
- * ARIA label for accessibility
158
- */
159
- ariaLabel?: string;
160
- /**
161
- * ARIA live region politeness
162
- */
163
- ariaLive?: 'off' | 'polite' | 'assertive';
164
- /**
165
- * ARIA role
166
- */
167
- ariaRole?: string;
168
- }
169
- declare function Marquee({ className, reverse, pauseOnHover, children, vertical, repeat, ariaLabel, ariaLive, ariaRole, ...props }: MarqueeProps): react_jsx_runtime.JSX.Element;
170
-
171
- interface ShimmeringTextProps {
172
- /** Text to display with shimmer effect */
173
- text: string;
174
- /** Animation duration in seconds */
175
- duration?: number;
176
- /** Delay before starting animation */
177
- delay?: number;
178
- /** Whether to repeat the animation */
179
- repeat?: boolean;
180
- /** Pause duration between repeats in seconds */
181
- repeatDelay?: number;
182
- /** Custom className */
183
- className?: string;
184
- /** Whether to start animation when component enters viewport */
185
- startOnView?: boolean;
186
- /** Whether to animate only once */
187
- once?: boolean;
188
- /** Margin for in-view detection (rootMargin) */
189
- inViewMargin?: UseInViewOptions['margin'];
190
- /** Shimmer spread multiplier */
191
- spread?: number;
192
- /** Base text color */
193
- color?: string;
194
- /** Shimmer gradient color */
195
- shimmerColor?: string;
196
- }
197
- declare function ShimmeringText({ text, duration, delay, repeat, repeatDelay, className, startOnView, once, inViewMargin, spread, color, shimmerColor, }: ShimmeringTextProps): react_jsx_runtime.JSX.Element;
198
-
199
- interface SlidingNumberProps {
200
- from: number;
201
- to: number;
202
- duration?: number;
203
- delay?: number;
204
- startOnView?: boolean;
205
- once?: boolean;
206
- className?: string;
207
- onComplete?: () => void;
208
- digitHeight?: number;
209
- }
210
- declare function SlidingNumber({ from, to, duration, delay, startOnView, once, className, onComplete, digitHeight, }: SlidingNumberProps): react_jsx_runtime.JSX.Element;
211
-
212
- interface SvgTextProps {
213
- /**
214
- * The SVG content to display inside the text
215
- */
216
- svg: ReactNode;
217
- /**
218
- * The content to display (will have the SVG "inside" it)
219
- */
220
- children: ReactNode;
221
- /**
222
- * Additional className for the container
223
- */
224
- className?: string;
225
- /**
226
- * Font size for the text mask (in viewport width units or CSS units)
227
- * @default "20vw"
228
- */
229
- fontSize?: string | number;
230
- /**
231
- * Font weight for the text mask
232
- * @default "bold"
233
- */
234
- fontWeight?: string | number;
235
- /**
236
- * The element type to render for the container
237
- * @default "div"
238
- */
239
- as?: ElementType;
240
- }
241
- /**
242
- * SvgText displays content with an SVG background fill effect.
243
- * The SVG is masked by the content, creating a dynamic text look.
244
- */
245
- declare function SvgText({ svg, children, className, fontSize, fontWeight, as: Component, }: SvgTextProps): react_jsx_runtime.JSX.Element;
246
-
247
- type RevealVariant = 'fade' | 'slideUp' | 'slideDown' | 'slideLeft' | 'slideRight' | 'scale' | 'blur' | 'typewriter' | 'wave' | 'stagger' | 'rotate' | 'elastic';
248
- interface TextRevealProps {
249
- children: string;
250
- variant?: RevealVariant;
251
- className?: string;
252
- style?: React__default.CSSProperties;
253
- delay?: number;
254
- duration?: number;
255
- staggerDelay?: number;
256
- once?: boolean;
257
- startOnView?: boolean;
258
- wordLevel?: boolean;
259
- onComplete?: () => void;
260
- }
261
- declare function TextReveal({ children, variant, className, style, delay, duration, staggerDelay, once, startOnView, wordLevel, }: TextRevealProps): react_jsx_runtime.JSX.Element;
262
-
263
- type AnimationVariant = 'fadeIn' | 'blurIn' | 'blurInUp' | 'blurInDown' | 'slideUp' | 'slideDown' | 'slideLeft' | 'slideRight' | 'scaleUp' | 'scaleDown';
264
- interface TypingTextProps extends Omit<MotionProps, 'children'> {
265
- /** Text to animate */
266
- text?: string;
267
- /** Array of texts to cycle through */
268
- texts?: string[];
269
- /** Typing speed in milliseconds */
270
- speed?: number;
271
- /** Delay before starting animation */
272
- delay?: number;
273
- /** Whether to show cursor */
274
- showCursor?: boolean;
275
- /** Cursor character */
276
- cursor?: string;
277
- /** Cursor className */
278
- cursorClassName?: string;
279
- /** Whether to loop through texts */
280
- loop?: boolean;
281
- /** Pause duration between loops */
282
- pauseDuration?: number;
283
- /** Custom className */
284
- className?: string;
285
- /** Callback when typing completes */
286
- onComplete?: () => void;
287
- /** Whether to start animation when component enters viewport */
288
- startOnView?: boolean;
289
- /** Whether to animate only once */
290
- once?: boolean;
291
- /** The animation preset to use */
292
- animation?: AnimationVariant;
293
- /** Margin for in-view detection (rootMargin) */
294
- inViewMargin?: UseInViewOptions['margin'];
295
- }
296
- declare function TypingText({ text, texts, speed, delay, showCursor, cursorClassName, cursor, loop, pauseDuration, className, onComplete, startOnView, once, inViewMargin, ...props }: TypingTextProps): react_jsx_runtime.JSX.Element;
297
-
298
- interface VideoTextProps {
299
- /**
300
- * The video source URL or array of sources for multiple formats
301
- */
302
- src: string | string[];
303
- /**
304
- * The content to display (will have the video "inside" it)
305
- */
306
- children: ReactNode;
307
- /**
308
- * Additional className for the container
309
- */
310
- className?: string;
311
- /**
312
- * Whether to autoplay the video
313
- * @default true
314
- */
315
- autoPlay?: boolean;
316
- /**
317
- * Whether to mute the video
318
- * @default true
319
- */
320
- muted?: boolean;
321
- /**
322
- * Whether to loop the video
323
- * @default true
324
- */
325
- loop?: boolean;
326
- /**
327
- * Whether to preload the video
328
- * @default "auto"
329
- */
330
- preload?: 'auto' | 'metadata' | 'none';
331
- /**
332
- * Font size for the text mask (in viewport width units or CSS units)
333
- * @default "20vw"
334
- */
335
- fontSize?: string | number;
336
- /**
337
- * Font weight for the text mask
338
- * @default "bold"
339
- */
340
- fontWeight?: string | number;
341
- /**
342
- * The element type to render for the container
343
- * @default "div"
344
- */
345
- as?: ElementType;
346
- /**
347
- * Callback when video starts playing
348
- */
349
- onPlay?: () => void;
350
- /**
351
- * Callback when video is paused
352
- */
353
- onPause?: () => void;
354
- /**
355
- * Callback when video ends
356
- */
357
- onEnded?: () => void;
358
- }
359
- /**
360
- * VideoText displays content with a background video fill effect.
361
- * The video is masked by the content, creating a dynamic animated text look.
362
- */
363
- declare function VideoText({ src, children, className, autoPlay, muted, loop, preload, fontSize, fontWeight, as: Component, onPlay, onPause, onEnded, }: VideoTextProps): react_jsx_runtime.JSX.Element;
364
-
365
- interface WordRotateProps extends Omit<MotionProps, 'children'> {
366
- words: string[];
367
- duration?: number;
368
- animationStyle?: 'fade' | 'slide-up' | 'slide-down' | 'scale' | 'flip';
369
- loop?: boolean;
370
- pauseDuration?: number;
371
- className?: string;
372
- containerClassName?: string;
373
- startOnView?: boolean;
374
- once?: boolean;
375
- inViewMargin?: UseInViewOptions['margin'];
376
- }
377
- declare function WordRotate({ words, duration, animationStyle, loop, className, containerClassName, pauseDuration, startOnView, once, inViewMargin, ...props }: WordRotateProps): react_jsx_runtime.JSX.Element;
378
-
379
- export { AvatarGroup, AvatarGroupItem, AvatarGroupTooltip, CountingNumber, GithubButton, type GithubButtonProps, GradientBackground, type GradientBackgroundProps, GridBackground, type GridBackgroundProps, HoverBackground, type HoverBackgroundProps, Marquee, ShimmeringText, SlidingNumber, SvgText, type SvgTextProps, TextReveal, TypingText, VideoText, type VideoTextProps, WordRotate, githubButtonVariants };
package/dist/aria.cjs DELETED
@@ -1,139 +0,0 @@
1
- "use client";
2
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});'use client';
3
-
4
-
5
-
6
-
7
- var _chunkBXUKTDPNcjs = require('./chunk-BXUKTDPN.cjs');
8
-
9
-
10
- var _chunkCJXIPSTGcjs = require('./chunk-CJXIPSTG.cjs');
11
-
12
- // src/ui/aria/datefield.tsx
13
-
14
-
15
-
16
-
17
-
18
-
19
- var _reactariacomponents = require('react-aria-components');
20
- var _jsxruntime = require('react/jsx-runtime');
21
- function DateField({ className, children, ...props }) {
22
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
23
- _reactariacomponents.DateField,
24
- {
25
- className: _reactariacomponents.composeRenderProps.call(void 0, className, (className2) => _chunkCJXIPSTGcjs.cn.call(void 0, className2)),
26
- "data-slot": "datefield",
27
- ...props,
28
- children
29
- }
30
- );
31
- }
32
- function TimeField({ className, children, ...props }) {
33
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
34
- _reactariacomponents.TimeField,
35
- {
36
- className: _reactariacomponents.composeRenderProps.call(void 0, className, (className2) => _chunkCJXIPSTGcjs.cn.call(void 0, className2)),
37
- "data-slot": "datefield",
38
- ...props,
39
- children
40
- }
41
- );
42
- }
43
- function DateSegment({ className, ...props }) {
44
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
45
- _reactariacomponents.DateSegment,
46
- {
47
- className: _reactariacomponents.composeRenderProps.call(void 0,
48
- className,
49
- (className2) => _chunkCJXIPSTGcjs.cn.call(void 0,
50
- `inline-flex rounded px-0.5 text-foreground caret-transparent outline-hidden data-invalid:data-focused:bg-destructive data-focused:data-placeholder:text-foreground data-invalid:data-focused:text-destructive-foreground data-invalid:data-placeholder:text-destructive data-disabled:cursor-not-allowed data-focused:bg-accent data-[type=literal]:px-0 data-[type=literal]:text-muted-foreground/70 data-focused:text-foreground data-invalid:data-focused:data-placeholder:text-destructive-foreground data-invalid:text-destructive data-placeholder:text-muted-foreground/70 data-disabled:opacity-50`,
51
- className2
52
- )
53
- ),
54
- ...props,
55
- "data-invalid": true
56
- }
57
- );
58
- }
59
- var dateInputStyles = `
60
- relative inline-flex items-center overflow-hidden whitespace-nowrap
61
- data-focus-within:ring-ring/30 data-focus-within:border-ring data-focus-within:outline-none data-focus-within:ring-[3px]
62
- data-focus-within:has-aria-invalid:ring-destructive/20 dark:data-focus-within:has-aria-invalid:ring-destructive/40 data-focus-within:has-aria-invalid:border-destructive
63
- `;
64
- function DateInput({ className, variant = "md", ...props }) {
65
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
66
- _reactariacomponents.DateInput,
67
- {
68
- "data-slot": "input",
69
- className: _reactariacomponents.composeRenderProps.call(void 0,
70
- className,
71
- (className2) => _chunkCJXIPSTGcjs.cn.call(void 0, _chunkBXUKTDPNcjs.inputVariants.call(void 0, { variant }), dateInputStyles, className2)
72
- ),
73
- ...props,
74
- children: (segment) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DateSegment, { segment })
75
- }
76
- );
77
- }
78
-
79
- // src/ui/aria/show-more.tsx
80
- var _classvarianceauthority = require('class-variance-authority');
81
-
82
-
83
- var showMoreStyles = _classvarianceauthority.cva.call(void 0, "text-sm leading-6 before:border-border after:border-border", {
84
- variants: {
85
- orientation: {
86
- vertical: "mx-1 h-auto self-stretch",
87
- horizontal: "my-0.5 h-px w-full self-stretch"
88
- }
89
- },
90
- compoundVariants: [
91
- {
92
- orientation: "vertical",
93
- className: "mx-2 flex flex-col items-center before:mb-2 before:flex-1 before:border-l after:mt-2 after:flex-1 after:border-r"
94
- },
95
- {
96
- orientation: "horizontal",
97
- className: "my-2 flex items-center self-stretch before:mr-2 before:flex-1 before:border-t after:ml-2 after:flex-1 after:border-t"
98
- }
99
- ],
100
- defaultVariants: {
101
- orientation: "horizontal"
102
- }
103
- });
104
- var ShowMore = ({
105
- as = "button",
106
- children,
107
- orientation = "horizontal",
108
- className,
109
- ...props
110
- }) => {
111
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkCJXIPSTGcjs.cn.call(void 0, showMoreStyles({ orientation }), className), children: as === "button" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
112
- _reactariacomponents.ToggleButton,
113
- {
114
- ...props,
115
- className: _chunkBXUKTDPNcjs.buttonVariants.call(void 0, {
116
- variant: "outline",
117
- size: "sm"
118
- }),
119
- children: _reactariacomponents.composeRenderProps.call(void 0, children, (children2) => children2)
120
- }
121
- ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactariacomponents.Text, { slot: "description", children: props.text }) });
122
- };
123
-
124
- // src/ui/aria/visually-hidden.tsx
125
- var _reactaria = require('react-aria');
126
-
127
- var VisuallyHidden = ({ children }) => {
128
- const { visuallyHiddenProps } = _reactaria.useVisuallyHidden.call(void 0, );
129
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { ...visuallyHiddenProps, children });
130
- };
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
- exports.DateField = DateField; exports.DateInput = DateInput; exports.DateSegment = DateSegment; exports.ShowMore = ShowMore; exports.TimeField = TimeField; exports.VisuallyHidden = VisuallyHidden; exports.dateInputStyles = dateInputStyles;
package/dist/aria.d.cts DELETED
@@ -1,31 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { VariantProps } from 'class-variance-authority';
3
- import { DateValue, DateFieldProps, DateInputProps as DateInputProps$1, DateSegmentProps, TimeValue, TimeFieldProps, ToggleButton } from 'react-aria-components';
4
- import { i as inputVariants } from './input-AwYIskrX.cjs';
5
- import { ReactNode } from 'react';
6
- import 'class-variance-authority/types';
7
-
8
- declare function DateField<T extends DateValue>({ className, children, ...props }: DateFieldProps<T>): react_jsx_runtime.JSX.Element;
9
- declare function TimeField<T extends TimeValue>({ className, children, ...props }: TimeFieldProps<T>): react_jsx_runtime.JSX.Element;
10
- declare function DateSegment({ className, ...props }: DateSegmentProps): react_jsx_runtime.JSX.Element;
11
- declare const dateInputStyles = "\n relative inline-flex items-center overflow-hidden whitespace-nowrap\n data-focus-within:ring-ring/30 data-focus-within:border-ring data-focus-within:outline-none data-focus-within:ring-[3px] \n data-focus-within:has-aria-invalid:ring-destructive/20 dark:data-focus-within:has-aria-invalid:ring-destructive/40 data-focus-within:has-aria-invalid:border-destructive\n";
12
- interface DateInputProps extends DateInputProps$1, VariantProps<typeof inputVariants> {
13
- className?: string;
14
- variant?: VariantProps<typeof inputVariants>['variant'];
15
- }
16
- declare function DateInput({ className, variant, ...props }: Omit<DateInputProps, 'children'>): react_jsx_runtime.JSX.Element;
17
-
18
- interface ShowMoreProps extends React.ComponentProps<typeof ToggleButton> {
19
- className?: string;
20
- orientation?: 'horizontal' | 'vertical';
21
- as?: 'text' | 'button';
22
- text?: string;
23
- }
24
- declare const ShowMore: ({ as, children, orientation, className, ...props }: ShowMoreProps) => react_jsx_runtime.JSX.Element;
25
-
26
- type VisuallyHiddenSpanProps = {
27
- children: ReactNode;
28
- };
29
- declare const VisuallyHidden: ({ children }: VisuallyHiddenSpanProps) => react_jsx_runtime.JSX.Element;
30
-
31
- export { DateField, DateInput, type DateInputProps, DateSegment, ShowMore, type ShowMoreProps, TimeField, VisuallyHidden, dateInputStyles };
@@ -1,33 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as class_variance_authority_types from 'class-variance-authority/types';
3
- import * as React from 'react';
4
- import { VariantProps } from 'class-variance-authority';
5
-
6
- interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
- asChild?: boolean;
8
- dotClassName?: string;
9
- disabled?: boolean;
10
- }
11
- interface BadgeButtonProps extends React.ButtonHTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeButtonVariants> {
12
- asChild?: boolean;
13
- }
14
- type BadgeDotProps = React.HTMLAttributes<HTMLSpanElement>;
15
- declare const badgeVariants: (props?: ({
16
- variant?: "primary" | "destructive" | "secondary" | "outline" | "success" | "warning" | "info" | null | undefined;
17
- appearance?: "default" | "outline" | "ghost" | "light" | null | undefined;
18
- disabled?: boolean | null | undefined;
19
- size?: "lg" | "md" | "sm" | "xs" | null | undefined;
20
- shape?: "default" | "circle" | null | undefined;
21
- } & class_variance_authority_types.ClassProp) | undefined) => string;
22
- declare const badgeButtonVariants: (props?: ({
23
- variant?: "default" | null | undefined;
24
- } & class_variance_authority_types.ClassProp) | undefined) => string;
25
- declare function Badge({ className, variant, size, appearance, shape, asChild, disabled, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
26
- asChild?: boolean;
27
- }): react_jsx_runtime.JSX.Element;
28
- declare function BadgeButton({ className, variant, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof badgeButtonVariants> & {
29
- asChild?: boolean;
30
- }): react_jsx_runtime.JSX.Element;
31
- declare function BadgeDot({ className, ...props }: React.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
32
-
33
- export { Badge as B, BadgeButton as a, badgeVariants as b, BadgeDot as c, type BadgeProps as d, type BadgeButtonProps as e, type BadgeDotProps as f };
@@ -1,33 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as class_variance_authority_types from 'class-variance-authority/types';
3
- import * as React from 'react';
4
- import { VariantProps } from 'class-variance-authority';
5
-
6
- interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
- asChild?: boolean;
8
- dotClassName?: string;
9
- disabled?: boolean;
10
- }
11
- interface BadgeButtonProps extends React.ButtonHTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeButtonVariants> {
12
- asChild?: boolean;
13
- }
14
- type BadgeDotProps = React.HTMLAttributes<HTMLSpanElement>;
15
- declare const badgeVariants: (props?: ({
16
- variant?: "primary" | "destructive" | "secondary" | "outline" | "success" | "warning" | "info" | null | undefined;
17
- appearance?: "default" | "outline" | "ghost" | "light" | null | undefined;
18
- disabled?: boolean | null | undefined;
19
- size?: "lg" | "md" | "sm" | "xs" | null | undefined;
20
- shape?: "default" | "circle" | null | undefined;
21
- } & class_variance_authority_types.ClassProp) | undefined) => string;
22
- declare const badgeButtonVariants: (props?: ({
23
- variant?: "default" | null | undefined;
24
- } & class_variance_authority_types.ClassProp) | undefined) => string;
25
- declare function Badge({ className, variant, size, appearance, shape, asChild, disabled, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
26
- asChild?: boolean;
27
- }): react_jsx_runtime.JSX.Element;
28
- declare function BadgeButton({ className, variant, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof badgeButtonVariants> & {
29
- asChild?: boolean;
30
- }): react_jsx_runtime.JSX.Element;
31
- declare function BadgeDot({ className, ...props }: React.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
32
-
33
- export { Badge as B, BadgeButton as a, badgeVariants as b, BadgeDot as c, type BadgeProps as d, type BadgeButtonProps as e, type BadgeDotProps as f };