@pelatform/ui 1.6.0 → 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 -5556
  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 -1083
  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 +25 -105
  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 -5556
  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 -1172
  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
package/dist/aria.d.ts CHANGED
@@ -1,31 +1 @@
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.js';
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
+ export * from '@pelatform/ui.aria';
package/dist/aria.js CHANGED
@@ -1,139 +1,2 @@
1
- "use client";
2
- 'use client';
3
-
4
- import {
5
- buttonVariants,
6
- inputVariants
7
- } from "./chunk-TB6DU23O.js";
8
- import {
9
- cn
10
- } from "./chunk-RQHJBTEU.js";
11
-
12
- // src/ui/aria/datefield.tsx
13
- import {
14
- composeRenderProps,
15
- DateField as DateFieldRa,
16
- DateInput as DateInputRa,
17
- DateSegment as DateSegmentRa,
18
- TimeField as TimeFieldRa
19
- } from "react-aria-components";
20
- import { jsx } from "react/jsx-runtime";
21
- function DateField({ className, children, ...props }) {
22
- return /* @__PURE__ */ jsx(
23
- DateFieldRa,
24
- {
25
- className: composeRenderProps(className, (className2) => cn(className2)),
26
- "data-slot": "datefield",
27
- ...props,
28
- children
29
- }
30
- );
31
- }
32
- function TimeField({ className, children, ...props }) {
33
- return /* @__PURE__ */ jsx(
34
- TimeFieldRa,
35
- {
36
- className: composeRenderProps(className, (className2) => cn(className2)),
37
- "data-slot": "datefield",
38
- ...props,
39
- children
40
- }
41
- );
42
- }
43
- function DateSegment({ className, ...props }) {
44
- return /* @__PURE__ */ jsx(
45
- DateSegmentRa,
46
- {
47
- className: composeRenderProps(
48
- className,
49
- (className2) => cn(
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__ */ jsx(
66
- DateInputRa,
67
- {
68
- "data-slot": "input",
69
- className: composeRenderProps(
70
- className,
71
- (className2) => cn(inputVariants({ variant }), dateInputStyles, className2)
72
- ),
73
- ...props,
74
- children: (segment) => /* @__PURE__ */ jsx(DateSegment, { segment })
75
- }
76
- );
77
- }
78
-
79
- // src/ui/aria/show-more.tsx
80
- import { cva } from "class-variance-authority";
81
- import { composeRenderProps as composeRenderProps2, Text, ToggleButton } from "react-aria-components";
82
- import { jsx as jsx2 } from "react/jsx-runtime";
83
- var showMoreStyles = cva("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__ */ jsx2("div", { className: cn(showMoreStyles({ orientation }), className), children: as === "button" ? /* @__PURE__ */ jsx2(
112
- ToggleButton,
113
- {
114
- ...props,
115
- className: buttonVariants({
116
- variant: "outline",
117
- size: "sm"
118
- }),
119
- children: composeRenderProps2(children, (children2) => children2)
120
- }
121
- ) : /* @__PURE__ */ jsx2(Text, { slot: "description", children: props.text }) });
122
- };
123
-
124
- // src/ui/aria/visually-hidden.tsx
125
- import { useVisuallyHidden } from "react-aria";
126
- import { jsx as jsx3 } from "react/jsx-runtime";
127
- var VisuallyHidden = ({ children }) => {
128
- const { visuallyHiddenProps } = useVisuallyHidden();
129
- return /* @__PURE__ */ jsx3("span", { ...visuallyHiddenProps, children });
130
- };
131
- export {
132
- DateField,
133
- DateInput,
134
- DateSegment,
135
- ShowMore,
136
- TimeField,
137
- VisuallyHidden,
138
- dateInputStyles
139
- };
1
+ // src/aria.ts
2
+ export * from "@pelatform/ui.aria";