@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.
- package/css/source.css +20 -0
- package/css/theme.css +1 -2
- package/dist/animation.d.ts +4 -379
- package/dist/animation.js +2 -1752
- package/dist/aria.d.ts +1 -31
- package/dist/aria.js +2 -139
- package/dist/base.d.ts +1 -651
- package/dist/base.js +2 -5556
- package/dist/chunk-UEVIEY7W.js +51 -0
- package/dist/{components.cjs → chunk-VZEE3GOC.js} +81 -2344
- package/dist/components.d.ts +224 -181
- package/dist/components.js +364 -765
- package/dist/default.d.ts +1 -1322
- package/dist/default.js +2 -8931
- package/dist/hooks.d.ts +4 -1083
- package/dist/hooks.js +5 -662
- package/dist/index.d.ts +58 -308
- package/dist/index.js +5 -226
- package/package.json +25 -105
- package/dist/animation.cjs +0 -1752
- package/dist/animation.d.cts +0 -379
- package/dist/aria.cjs +0 -139
- package/dist/aria.d.cts +0 -31
- package/dist/badge-BtI4BMea.d.cts +0 -33
- package/dist/badge-BtI4BMea.d.ts +0 -33
- package/dist/base.cjs +0 -5556
- package/dist/base.d.cts +0 -651
- package/dist/chunk-3N75YA6Q.cjs +0 -60
- package/dist/chunk-7472NIIL.cjs +0 -40
- package/dist/chunk-BXUKTDPN.cjs +0 -576
- package/dist/chunk-CD2BCCQU.js +0 -180
- package/dist/chunk-CJXIPSTG.cjs +0 -10
- package/dist/chunk-CTHRAJQZ.js +0 -1522
- package/dist/chunk-D373YKDA.js +0 -196
- package/dist/chunk-EZW5GNS4.js +0 -6
- package/dist/chunk-HILACSFA.cjs +0 -1522
- package/dist/chunk-HR3R6KKM.js +0 -40
- package/dist/chunk-HW52LCWN.js +0 -22
- package/dist/chunk-I46SELBA.cjs +0 -22
- package/dist/chunk-J4JGE3U5.cjs +0 -180
- package/dist/chunk-RQHJBTEU.js +0 -10
- package/dist/chunk-SK6SSJHC.js +0 -9
- package/dist/chunk-T74DBLYY.js +0 -60
- package/dist/chunk-TB6DU23O.js +0 -576
- package/dist/chunk-UP53DCYH.cjs +0 -6
- package/dist/chunk-ZBO5IAMA.cjs +0 -196
- package/dist/chunk-ZDR3OZ7Z.cjs +0 -9
- package/dist/colors-CUDWvz1g.d.cts +0 -42
- package/dist/colors-CUDWvz1g.d.ts +0 -42
- package/dist/components-CidsRcc3.d.cts +0 -46
- package/dist/components-CidsRcc3.d.ts +0 -46
- package/dist/components.d.cts +0 -2944
- package/dist/default.cjs +0 -8931
- package/dist/default.d.cts +0 -1322
- package/dist/hooks.cjs +0 -666
- package/dist/hooks.d.cts +0 -1172
- package/dist/index.cjs +0 -230
- package/dist/index.d.cts +0 -318
- package/dist/input-AwYIskrX.d.cts +0 -22
- package/dist/input-AwYIskrX.d.ts +0 -22
- package/dist/menu-GmSRfRGB.d.cts +0 -43
- package/dist/menu-GmSRfRGB.d.ts +0 -43
- package/dist/metafile-cjs.json +0 -1
- package/dist/metafile-esm.json +0 -1
- package/dist/re-export/cva.cjs +0 -6
- package/dist/re-export/cva.d.cts +0 -10
- package/dist/re-export/cva.d.ts +0 -10
- package/dist/re-export/cva.js +0 -6
- package/dist/re-export/motion.cjs +0 -2
- package/dist/re-export/motion.d.cts +0 -1
- package/dist/re-export/motion.d.ts +0 -1
- package/dist/re-export/motion.js +0 -2
- package/dist/re-export/next-themes.cjs +0 -2
- package/dist/re-export/next-themes.d.cts +0 -1
- package/dist/re-export/next-themes.d.ts +0 -1
- package/dist/re-export/next-themes.js +0 -2
- package/dist/re-export/react-day-picker.cjs +0 -2
- package/dist/re-export/react-day-picker.d.cts +0 -1
- package/dist/re-export/react-day-picker.d.ts +0 -1
- package/dist/re-export/react-day-picker.js +0 -2
- package/dist/re-export/react-hook-form.cjs +0 -2
- package/dist/re-export/react-hook-form.d.cts +0 -1
- package/dist/re-export/react-hook-form.d.ts +0 -1
- package/dist/re-export/react-hook-form.js +0 -2
- package/dist/re-export/resolver.cjs +0 -2
- package/dist/re-export/resolver.d.cts +0 -1
- package/dist/re-export/resolver.d.ts +0 -1
- package/dist/re-export/resolver.js +0 -2
- package/dist/re-export/sonner.cjs +0 -2
- package/dist/re-export/sonner.d.cts +0 -1
- package/dist/re-export/sonner.d.ts +0 -1
- package/dist/re-export/sonner.js +0 -2
- package/dist/re-export/tanstack-query.cjs +0 -2
- package/dist/re-export/tanstack-query.d.cts +0 -1
- package/dist/re-export/tanstack-query.d.ts +0 -1
- package/dist/re-export/tanstack-query.js +0 -2
- package/dist/re-export/tanstack-table.cjs +0 -2
- package/dist/re-export/tanstack-table.d.cts +0 -1
- package/dist/re-export/tanstack-table.d.ts +0 -1
- package/dist/re-export/tanstack-table.js +0 -2
- package/dist/re-export/zod.cjs +0 -2
- package/dist/re-export/zod.d.cts +0 -1
- package/dist/re-export/zod.d.ts +0 -1
- package/dist/re-export/zod.js +0 -2
package/dist/aria.d.ts
CHANGED
|
@@ -1,31 +1 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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";
|