@pibit.ai/cure-design-system 0.6.8 → 0.6.9
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/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +245 -233
- package/dist/patterns/accordion/accordion.d.ts +75 -0
- package/dist/patterns/accordion/accordion.d.ts.map +1 -0
- package/dist/patterns/accordion/accordion.js +151 -0
- package/dist/patterns/accordion/collapsible.d.ts +29 -0
- package/dist/patterns/accordion/collapsible.d.ts.map +1 -0
- package/dist/patterns/accordion/collapsible.js +30 -0
- package/dist/patterns/accordion/expandable-card.d.ts +30 -0
- package/dist/patterns/accordion/expandable-card.d.ts.map +1 -0
- package/dist/patterns/accordion/expandable-card.js +99 -0
- package/dist/patterns/accordion/index.d.ts +4 -0
- package/dist/patterns/accordion/index.d.ts.map +1 -0
- package/dist/primitives/textarea/index.d.ts +2 -0
- package/dist/primitives/textarea/index.d.ts.map +1 -0
- package/dist/primitives/textarea/textarea.d.ts +56 -0
- package/dist/primitives/textarea/textarea.d.ts.map +1 -0
- package/dist/primitives/textarea/textarea.js +107 -0
- package/dist/styles/components.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Hides any outer AccordionGroup from what is rendered inside it. React Aria joins every
|
|
4
|
+
* Disclosure to the nearest group, so without this an accordion (or a Collapsible) nested in
|
|
5
|
+
* another accordion's panel would become one more item of the outer group.
|
|
6
|
+
*/
|
|
7
|
+
export declare const IsolateFromAccordionGroup: ({ children }: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export interface AccordionProps {
|
|
11
|
+
/**
|
|
12
|
+
* Identifies the item inside an `AccordionGroup`, which then owns its open state
|
|
13
|
+
* (`defaultOpen` / `isOpen` are ignored). Without an id the accordion stays independent,
|
|
14
|
+
* even inside a group.
|
|
15
|
+
*/
|
|
16
|
+
id?: string;
|
|
17
|
+
title: string | ReactNode;
|
|
18
|
+
titleIcon?: ReactNode;
|
|
19
|
+
subtitle?: string;
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
/** Initial open state when uncontrolled. */
|
|
22
|
+
defaultOpen?: boolean;
|
|
23
|
+
/** Controlled open state (outside a group). */
|
|
24
|
+
isOpen?: boolean;
|
|
25
|
+
/** Called with the new open state whenever the header is pressed. */
|
|
26
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
27
|
+
isDisabled?: boolean;
|
|
28
|
+
/** Classes for the outer wrapper. */
|
|
29
|
+
className?: string;
|
|
30
|
+
/** Classes for the content wrapper (padding etc.). */
|
|
31
|
+
childrenClassName?: string;
|
|
32
|
+
/** Classes added to the header button while open. */
|
|
33
|
+
activeTitleClassName?: string;
|
|
34
|
+
/** Classes for the header row inside the button. */
|
|
35
|
+
headerClassName?: string;
|
|
36
|
+
/** Classes for the header button itself (e.g. to drop its bottom border). Applied open or closed. */
|
|
37
|
+
buttonClassName?: string;
|
|
38
|
+
/** `true` (default) shows a rotating chevron; `false` shows plus / minus. */
|
|
39
|
+
showToggle?: boolean;
|
|
40
|
+
/** Set false to hide the built-in chevron / plus-minus indicator entirely (caller renders its own). */
|
|
41
|
+
showIndicator?: boolean;
|
|
42
|
+
/** Rendered before the expand/collapse indicator (e.g. a row actions menu). Clicks do not toggle the accordion. */
|
|
43
|
+
headerActions?: ReactNode;
|
|
44
|
+
/** When true, content mounts only while open (and for the length of the close animation). */
|
|
45
|
+
lazyMount?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A collapsible section: a full-width header button over a panel that slides open
|
|
49
|
+
* (grid-rows 0fr → 1fr, 300ms) and fades in. Built on React Aria `Disclosure`, so the header
|
|
50
|
+
* is a real button with `aria-expanded` / `aria-controls`, and the panel is labelled by it.
|
|
51
|
+
*/
|
|
52
|
+
export declare const Accordion: ({ id, children, title, titleIcon, subtitle, defaultOpen, isOpen, onOpenChange, isDisabled, className, childrenClassName, activeTitleClassName, headerClassName, buttonClassName, showToggle, showIndicator, headerActions, lazyMount, }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export interface AccordionGroupProps {
|
|
54
|
+
/** Initially open item (single mode). */
|
|
55
|
+
defaultOpenId?: string;
|
|
56
|
+
/** Initially open items. In single mode only the first is used. */
|
|
57
|
+
defaultOpenIds?: string[];
|
|
58
|
+
/** Controlled open items. */
|
|
59
|
+
openIds?: string[];
|
|
60
|
+
/** Called with the new open items whenever one is opened or closed. */
|
|
61
|
+
onOpenIdsChange?: (openIds: string[]) => void;
|
|
62
|
+
/** Allow several items open at once. */
|
|
63
|
+
multiple?: boolean;
|
|
64
|
+
/** Allow closing an open item by pressing its header. Without it an open item stays open. */
|
|
65
|
+
collapsible?: boolean;
|
|
66
|
+
isDisabled?: boolean;
|
|
67
|
+
children: ReactNode;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Coordinates the `Accordion`s (with an `id`) rendered anywhere below it: single or multiple
|
|
71
|
+
* expansion, controlled (`openIds` + `onOpenIdsChange`) or uncontrolled. Renders no element
|
|
72
|
+
* of its own, so it can wrap items laid out by the parent.
|
|
73
|
+
*/
|
|
74
|
+
export declare function AccordionGroup({ defaultOpenId, defaultOpenIds, openIds: controlledOpenIds, onOpenIdsChange, multiple, collapsible, isDisabled, children, }: AccordionGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/patterns/accordion/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA8D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAenG;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CAE9E,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qDAAqD;IACrD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oDAAoD;IACpD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qGAAqG;IACrG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uGAAuG;IACvG,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mHAAmH;IACnH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,6FAA6F;IAC7F,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,yOAmBvB,cAAc,4CAoEhB,CAAC;AAiDF,MAAM,WAAW,mBAAmB;IAClC,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,uEAAuE;IACvE,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC9C,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6FAA6F;IAC7F,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC7B,aAAa,EACb,cAAc,EACd,OAAO,EAAE,iBAAiB,EAC1B,eAAe,EACf,QAAgB,EAChB,WAAmB,EACnB,UAAkB,EAClB,QAAQ,GACT,EAAE,mBAAmB,2CA6BrB"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { jsx as o, jsxs as w, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown as D, Minus as G, Plus as M } from "@untitledui/icons";
|
|
3
|
+
import { useControlledState as O } from "@react-stately/utils";
|
|
4
|
+
import { useContext as j, useMemo as q, useState as K, useEffect as W } from "react";
|
|
5
|
+
import { DisclosureGroupStateContext as S, Disclosure as F, Button as _, DisclosurePanel as b } from "react-aria-components";
|
|
6
|
+
import { cx as d } from "../../utils/cn.js";
|
|
7
|
+
const B = 300, I = ({ children: r }) => /* @__PURE__ */ o(S.Provider, { value: null, children: r }), U = ({
|
|
8
|
+
id: r,
|
|
9
|
+
children: t,
|
|
10
|
+
title: n,
|
|
11
|
+
titleIcon: u,
|
|
12
|
+
subtitle: e,
|
|
13
|
+
defaultOpen: s,
|
|
14
|
+
isOpen: a,
|
|
15
|
+
onOpenChange: x,
|
|
16
|
+
isDisabled: p,
|
|
17
|
+
className: i,
|
|
18
|
+
childrenClassName: l,
|
|
19
|
+
activeTitleClassName: N,
|
|
20
|
+
headerClassName: y,
|
|
21
|
+
buttonClassName: m,
|
|
22
|
+
showToggle: c = !0,
|
|
23
|
+
showIndicator: f = !0,
|
|
24
|
+
headerActions: h,
|
|
25
|
+
lazyMount: T = !1
|
|
26
|
+
}) => {
|
|
27
|
+
const P = j(S), g = P != null && r != null, k = /* @__PURE__ */ o(
|
|
28
|
+
F,
|
|
29
|
+
{
|
|
30
|
+
id: g ? r : void 0,
|
|
31
|
+
isExpanded: g ? void 0 : a,
|
|
32
|
+
defaultExpanded: g ? void 0 : s,
|
|
33
|
+
onExpandedChange: x,
|
|
34
|
+
isDisabled: p,
|
|
35
|
+
className: d("rounded-md", i),
|
|
36
|
+
children: ({ isExpanded: v }) => /* @__PURE__ */ w(A, { children: [
|
|
37
|
+
/* @__PURE__ */ o(
|
|
38
|
+
_,
|
|
39
|
+
{
|
|
40
|
+
slot: "trigger",
|
|
41
|
+
className: d(
|
|
42
|
+
"flex flex-col items-start w-full cursor-pointer gap-3 text-left border-b border-secondary",
|
|
43
|
+
m,
|
|
44
|
+
v && N
|
|
45
|
+
),
|
|
46
|
+
children: /* @__PURE__ */ w("div", { className: d("flex items-center w-full cursor-pointer py-3", y), children: [
|
|
47
|
+
/* @__PURE__ */ w("div", { className: "flex flex-1 gap-3 justify-start items-center", children: [
|
|
48
|
+
u,
|
|
49
|
+
typeof n == "string" ? /* @__PURE__ */ o("h4", { className: "text-[16px]", children: n }) : n,
|
|
50
|
+
e && /* @__PURE__ */ o("span", { className: "text-sm text-secondary", children: e })
|
|
51
|
+
] }),
|
|
52
|
+
h ? /* @__PURE__ */ o(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
className: "p-1.5 mx-2 flex shrink-0 items-center",
|
|
56
|
+
onClick: (C) => C.stopPropagation(),
|
|
57
|
+
onPointerDown: (C) => C.stopPropagation(),
|
|
58
|
+
children: h
|
|
59
|
+
}
|
|
60
|
+
) : null,
|
|
61
|
+
f ? c ? /* @__PURE__ */ o(
|
|
62
|
+
"span",
|
|
63
|
+
{
|
|
64
|
+
className: d(
|
|
65
|
+
"p-1 ml-auto shrink-0 transform transition-transform duration-300",
|
|
66
|
+
v ? "rotate-180" : "rotate-0"
|
|
67
|
+
),
|
|
68
|
+
children: /* @__PURE__ */ o(D, { strokeWidth: 1.25, color: "var(--color-fg-quaternary)" })
|
|
69
|
+
}
|
|
70
|
+
) : /* @__PURE__ */ w("span", { className: "ml-auto transform transition-transform duration-300", children: [
|
|
71
|
+
v ? /* @__PURE__ */ o(G, { size: 16, strokeWidth: 1.25, color: "var(--color-fg-quaternary)" }) : /* @__PURE__ */ o(M, { size: 16, strokeWidth: 1.25, color: "var(--color-fg-quaternary)" }),
|
|
72
|
+
" "
|
|
73
|
+
] }) : null
|
|
74
|
+
] })
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ o(R, { isExpanded: v, lazyMount: T, childrenClassName: l, children: t })
|
|
78
|
+
] })
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
return P != null && !g ? /* @__PURE__ */ o(I, { children: k }) : k;
|
|
82
|
+
}, R = ({
|
|
83
|
+
isExpanded: r,
|
|
84
|
+
lazyMount: t,
|
|
85
|
+
childrenClassName: n,
|
|
86
|
+
children: u
|
|
87
|
+
}) => {
|
|
88
|
+
const [e, s] = K(!t || r);
|
|
89
|
+
return W(() => {
|
|
90
|
+
if (!t) return;
|
|
91
|
+
if (r) {
|
|
92
|
+
s(!0);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const a = window.setTimeout(() => s(!1), B);
|
|
96
|
+
return () => window.clearTimeout(a);
|
|
97
|
+
}, [r, t]), /* @__PURE__ */ o(
|
|
98
|
+
b,
|
|
99
|
+
{
|
|
100
|
+
className: d(
|
|
101
|
+
"grid motion-safe:transition-[grid-template-rows] motion-safe:duration-300 motion-safe:ease-in-out will-change-[grid-template-rows]",
|
|
102
|
+
r ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
103
|
+
),
|
|
104
|
+
children: /* @__PURE__ */ o("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ o(
|
|
105
|
+
"div",
|
|
106
|
+
{
|
|
107
|
+
className: d(
|
|
108
|
+
"pt-4 pb-1 motion-safe:transition-opacity motion-safe:duration-200 motion-safe:ease-out",
|
|
109
|
+
r ? "opacity-100" : "opacity-0",
|
|
110
|
+
n
|
|
111
|
+
),
|
|
112
|
+
children: /* @__PURE__ */ o(I, { children: e && u })
|
|
113
|
+
}
|
|
114
|
+
) })
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
function V({
|
|
119
|
+
defaultOpenId: r,
|
|
120
|
+
defaultOpenIds: t,
|
|
121
|
+
openIds: n,
|
|
122
|
+
onOpenIdsChange: u,
|
|
123
|
+
multiple: e = !1,
|
|
124
|
+
collapsible: s = !1,
|
|
125
|
+
isDisabled: a = !1,
|
|
126
|
+
children: x
|
|
127
|
+
}) {
|
|
128
|
+
const p = t ?? (r != null ? [r] : []), [i, l] = O(
|
|
129
|
+
n,
|
|
130
|
+
e ? p : p.slice(0, 1),
|
|
131
|
+
u
|
|
132
|
+
), N = q(() => {
|
|
133
|
+
const y = (m) => {
|
|
134
|
+
const c = String(m), f = i.includes(c);
|
|
135
|
+
f && !s || l(e ? f ? i.filter((h) => h !== c) : [...i, c] : f ? [] : [c]);
|
|
136
|
+
};
|
|
137
|
+
return {
|
|
138
|
+
allowsMultipleExpanded: e,
|
|
139
|
+
isDisabled: a,
|
|
140
|
+
expandedKeys: new Set(i),
|
|
141
|
+
toggleKey: y,
|
|
142
|
+
setExpandedKeys: (m) => l(Array.from(m, String))
|
|
143
|
+
};
|
|
144
|
+
}, [s, a, e, i, l]);
|
|
145
|
+
return /* @__PURE__ */ o(S.Provider, { value: N, children: x });
|
|
146
|
+
}
|
|
147
|
+
export {
|
|
148
|
+
U as Accordion,
|
|
149
|
+
V as AccordionGroup,
|
|
150
|
+
I as IsolateFromAccordionGroup
|
|
151
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps as AriaButtonProps, DisclosurePanelProps, DisclosureProps } from 'react-aria-components';
|
|
3
|
+
export interface CollapsibleProps extends Omit<DisclosureProps, "isExpanded" | "defaultExpanded" | "onExpandedChange" | "id" | "className" | "children"> {
|
|
4
|
+
/** Controlled open state. */
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
/** Initial open state when uncontrolled. */
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Unstyled show / hide region: a `CollapsibleTrigger` button and a `CollapsibleContent`
|
|
14
|
+
* panel, with no animation. Built on React Aria `Disclosure`; for a styled, animated
|
|
15
|
+
* section use `Accordion`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function Collapsible({ isOpen, defaultOpen, onOpenChange, className, children, ...props }: CollapsibleProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export type CollapsibleTriggerProps = Omit<AriaButtonProps, "slot">;
|
|
19
|
+
/** The button that opens and closes its `Collapsible`. Unstyled; pass `className`. */
|
|
20
|
+
export declare function CollapsibleTrigger(props: CollapsibleTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export interface CollapsibleContentProps extends Omit<DisclosurePanelProps, "className" | "children"> {
|
|
22
|
+
className?: string;
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
/** Keep the children mounted while closed (they are hidden). By default they unmount. */
|
|
25
|
+
forceMount?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** The region a `Collapsible` shows and hides. Takes no space while closed. */
|
|
28
|
+
export declare function CollapsibleContent({ className, children, forceMount, ...props }: CollapsibleContentProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
//# sourceMappingURL=collapsible.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/patterns/accordion/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAKL,KAAK,WAAW,IAAI,eAAe,EACnC,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAI/B,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,eAAe,EACf,YAAY,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,IAAI,GAAG,WAAW,GAAG,UAAU,CACxF;IACC,6BAA6B;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAcjH;AAED,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;AAEpE,sFAAsF;AACtF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CAEhE;AAED,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,UAAU,CAAC;IACnG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,yFAAyF;IACzF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,2CAOhH"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as s } from "react";
|
|
3
|
+
import { Disclosure as d, Button as a, DisclosureStateContext as p, DisclosurePanel as u } from "react-aria-components";
|
|
4
|
+
import { cx as c } from "../../utils/cn.js";
|
|
5
|
+
import { IsolateFromAccordionGroup as m } from "./accordion.js";
|
|
6
|
+
function E({ isOpen: o, defaultOpen: n, onOpenChange: t, className: i, children: e, ...l }) {
|
|
7
|
+
return /* @__PURE__ */ r(m, { children: /* @__PURE__ */ r(
|
|
8
|
+
d,
|
|
9
|
+
{
|
|
10
|
+
...l,
|
|
11
|
+
isExpanded: o,
|
|
12
|
+
defaultExpanded: n,
|
|
13
|
+
onExpandedChange: t,
|
|
14
|
+
className: i,
|
|
15
|
+
children: e
|
|
16
|
+
}
|
|
17
|
+
) });
|
|
18
|
+
}
|
|
19
|
+
function b(o) {
|
|
20
|
+
return /* @__PURE__ */ r(a, { ...o, slot: "trigger" });
|
|
21
|
+
}
|
|
22
|
+
function D({ className: o, children: n, forceMount: t = !1, ...i }) {
|
|
23
|
+
const e = s(p);
|
|
24
|
+
return /* @__PURE__ */ r(u, { ...i, className: c("[&[hidden]]:hidden", o), children: t || e != null && e.isExpanded ? n : null });
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
E as Collapsible,
|
|
28
|
+
D as CollapsibleContent,
|
|
29
|
+
b as CollapsibleTrigger
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ExpandableCardProps {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
/** Rendered in a rounded 32px tile before the title. */
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
/** Background of the icon tile (any CSS colour). */
|
|
8
|
+
iconBgColor?: string;
|
|
9
|
+
/** Initial expanded state when uncontrolled. */
|
|
10
|
+
defaultExpanded?: boolean;
|
|
11
|
+
/** Controlled expanded state. */
|
|
12
|
+
isExpanded?: boolean;
|
|
13
|
+
onExpandedChange?: (isExpanded: boolean) => void;
|
|
14
|
+
/** Show the on/off switch in the header. */
|
|
15
|
+
showToggle?: boolean;
|
|
16
|
+
/** Initial switch state. */
|
|
17
|
+
defaultToggled?: boolean;
|
|
18
|
+
/** Called when the switch changes. Changing it never expands or collapses the card. */
|
|
19
|
+
onToggle?: (checked: boolean) => void;
|
|
20
|
+
isToggleDisabled?: boolean;
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A bordered card with an icon, title and description that expands to show its children,
|
|
26
|
+
* with an optional on/off switch in the header. Clicking anywhere on the header expands it;
|
|
27
|
+
* the chevron is the keyboard-accessible trigger.
|
|
28
|
+
*/
|
|
29
|
+
export declare const ExpandableCard: ({ showToggle, title, description, icon, iconBgColor, defaultExpanded, isExpanded, onExpandedChange, defaultToggled, onToggle, children, className, isToggleDisabled, }: ExpandableCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=expandable-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expandable-card.d.ts","sourceRoot":"","sources":["../../../src/patterns/accordion/expandable-card.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAO1E,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iCAAiC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,4CAA4C;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,wKAc5B,mBAAmB,4CAuFrB,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown as z } from "@untitledui/icons";
|
|
3
|
+
import { useState as D, useRef as j } from "react";
|
|
4
|
+
import { Disclosure as E, DisclosurePanel as F } from "react-aria-components";
|
|
5
|
+
import { cx as a } from "../../utils/cn.js";
|
|
6
|
+
import { IsolateFromAccordionGroup as I } from "./accordion.js";
|
|
7
|
+
import { Toggle as P } from "../../primitives/toggle/toggle.js";
|
|
8
|
+
import { ButtonUtility as R } from "../../primitives/button/button-utility.js";
|
|
9
|
+
const K = ({
|
|
10
|
+
showToggle: f = !0,
|
|
11
|
+
title: o,
|
|
12
|
+
description: x,
|
|
13
|
+
icon: n,
|
|
14
|
+
iconBgColor: g = "var(--color-bg-warning-secondary)",
|
|
15
|
+
defaultExpanded: p = !1,
|
|
16
|
+
isExpanded: u,
|
|
17
|
+
onExpandedChange: h,
|
|
18
|
+
defaultToggled: v = !0,
|
|
19
|
+
onToggle: i,
|
|
20
|
+
children: l,
|
|
21
|
+
className: b,
|
|
22
|
+
isToggleDisabled: N = !1
|
|
23
|
+
}) => {
|
|
24
|
+
const [d, y] = D(v), c = j(null), C = (r) => {
|
|
25
|
+
y(r), i == null || i(r);
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(
|
|
28
|
+
E,
|
|
29
|
+
{
|
|
30
|
+
isExpanded: u,
|
|
31
|
+
defaultExpanded: p,
|
|
32
|
+
onExpandedChange: h,
|
|
33
|
+
className: a("bg-white rounded-lg border border-[var(--color-border-secondary)]", b),
|
|
34
|
+
children: ({ isExpanded: r, state: w }) => /* @__PURE__ */ t(k, { children: [
|
|
35
|
+
/* @__PURE__ */ t(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: "flex items-center gap-4 p-3 cursor-pointer",
|
|
39
|
+
onClick: (s) => {
|
|
40
|
+
var m;
|
|
41
|
+
(m = c.current) != null && m.contains(s.target) || w.toggle();
|
|
42
|
+
},
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
45
|
+
n && /* @__PURE__ */ e(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
className: "flex items-center justify-center size-8 rounded-lg shrink-0",
|
|
49
|
+
style: { backgroundColor: g },
|
|
50
|
+
children: n
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col flex-1 min-w-0", children: [
|
|
54
|
+
/* @__PURE__ */ e("p", { className: "text-[var(--color-text-secondary)] text-md font-medium leading-6", children: o }),
|
|
55
|
+
/* @__PURE__ */ e("p", { className: "text-[var(--color-text-tertiary)] text-sm font-normal leading-5", children: x })
|
|
56
|
+
] })
|
|
57
|
+
] }),
|
|
58
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
59
|
+
f && /* @__PURE__ */ e("div", { onClick: (s) => s.stopPropagation(), children: /* @__PURE__ */ e(
|
|
60
|
+
P,
|
|
61
|
+
{
|
|
62
|
+
size: "sm",
|
|
63
|
+
isSelected: d,
|
|
64
|
+
onChange: C,
|
|
65
|
+
isDisabled: N,
|
|
66
|
+
disabledClasses: d ? "bg-brand-solid" : ""
|
|
67
|
+
}
|
|
68
|
+
) }),
|
|
69
|
+
/* @__PURE__ */ e("div", { ref: c, className: "contents", children: /* @__PURE__ */ e(
|
|
70
|
+
R,
|
|
71
|
+
{
|
|
72
|
+
slot: "trigger",
|
|
73
|
+
size: "xs",
|
|
74
|
+
color: "tertiary",
|
|
75
|
+
"aria-label": o,
|
|
76
|
+
icon: /* @__PURE__ */ e(
|
|
77
|
+
z,
|
|
78
|
+
{
|
|
79
|
+
size: 20,
|
|
80
|
+
className: a(
|
|
81
|
+
"text-[var(--color-text-quaternary)] transition-transform duration-200",
|
|
82
|
+
r && "rotate-180"
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
) })
|
|
88
|
+
] })
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
l && /* @__PURE__ */ e(F, { className: "[&[hidden]]:hidden", children: /* @__PURE__ */ e("div", { className: a("px-3 pb-3 pt-3", r && "animate-in fade-in duration-200"), children: l }) })
|
|
93
|
+
] })
|
|
94
|
+
}
|
|
95
|
+
) });
|
|
96
|
+
};
|
|
97
|
+
export {
|
|
98
|
+
K as ExpandableCard
|
|
99
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Accordion, AccordionGroup, type AccordionProps, type AccordionGroupProps } from './accordion';
|
|
2
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent, type CollapsibleProps, type CollapsibleTriggerProps, type CollapsibleContentProps, } from './collapsible';
|
|
3
|
+
export { ExpandableCard, type ExpandableCardProps } from './expandable-card';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/accordion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvG,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/primitives/textarea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ReactNode, Ref } from 'react';
|
|
2
|
+
import { TextAreaProps as AriaTextAreaProps, TextFieldProps as AriaTextFieldProps } from 'react-aria-components';
|
|
3
|
+
export interface TextAreaBaseProps extends AriaTextAreaProps {
|
|
4
|
+
ref?: Ref<HTMLTextAreaElement>;
|
|
5
|
+
/**
|
|
6
|
+
* TextArea size.
|
|
7
|
+
* @default "sm"
|
|
8
|
+
*/
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
}
|
|
11
|
+
/** The bare `<textarea>`, for use inside your own React Aria `TextField`. */
|
|
12
|
+
export declare const TextAreaBase: {
|
|
13
|
+
({ className, style, size, ...props }: TextAreaBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
export interface TextAreaProps extends AriaTextFieldProps {
|
|
17
|
+
/** Label text for the textarea. */
|
|
18
|
+
label?: string;
|
|
19
|
+
/** Helper text below the textarea. Shown as the error message when `isInvalid`. */
|
|
20
|
+
hint?: ReactNode;
|
|
21
|
+
/** Tooltip shown after the label. */
|
|
22
|
+
tooltip?: string;
|
|
23
|
+
/** Class name for the `<textarea>` itself (`className` styles the field wrapper). */
|
|
24
|
+
textAreaClassName?: TextAreaBaseProps["className"];
|
|
25
|
+
/** Ref for the field wrapper. */
|
|
26
|
+
ref?: Ref<HTMLDivElement>;
|
|
27
|
+
/** Ref for the `<textarea>`, e.g. to measure it for auto-grow. */
|
|
28
|
+
textAreaRef?: TextAreaBaseProps["ref"];
|
|
29
|
+
/** Hide the required asterisk on the label. */
|
|
30
|
+
hideRequiredIndicator?: boolean;
|
|
31
|
+
/** Placeholder text. */
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
/** Visible height in rows. */
|
|
34
|
+
rows?: number;
|
|
35
|
+
/** Visible width in columns. */
|
|
36
|
+
cols?: number;
|
|
37
|
+
/**
|
|
38
|
+
* TextArea size.
|
|
39
|
+
* @default "sm"
|
|
40
|
+
*/
|
|
41
|
+
size?: TextAreaBaseProps["size"];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A multi-line text field built on React Aria `TextField` + `TextArea`, with the
|
|
45
|
+
* same label and hint as `Input`. Validation goes through `isInvalid` + `hint`;
|
|
46
|
+
* a character count is the caller's to render.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* <TextArea label="Description" rows={4} value={value} onChange={setValue} />
|
|
50
|
+
* <TextArea label="Reason" isRequired isInvalid hint="Required" />
|
|
51
|
+
*/
|
|
52
|
+
export declare const TextArea: {
|
|
53
|
+
({ label, hint, tooltip, textAreaRef, hideRequiredIndicator, textAreaClassName, placeholder, className, rows, cols, size, ...props }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
displayName: string;
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/primitives/textarea/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EACV,aAAa,IAAI,iBAAiB,EAClC,cAAc,IAAI,kBAAkB,EACrC,MAAM,uBAAuB,CAAC;AA+C/B,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,GAAG,CAAC,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAC/B;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAED,6EAA6E;AAC7E,eAAO,MAAM,YAAY;2CAKtB,iBAAiB;;CAkCnB,CAAC;AAIF,MAAM,WAAW,aAAc,SAAQ,kBAAkB;IACvD,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qFAAqF;IACrF,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACnD,iCAAiC;IACjC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,kEAAkE;IAClE,WAAW,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACvC,+CAA+C;IAC/C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;CAClC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ;0IAalB,aAAa;;CAsCf,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsx as i, jsxs as h, Fragment as y } from "react/jsx-runtime";
|
|
2
|
+
import { TextField as w, TextArea as k } from "react-aria-components";
|
|
3
|
+
import { cx as x } from "../../utils/cn.js";
|
|
4
|
+
import { HintText as z } from "../input/hint-text.js";
|
|
5
|
+
import { Label as T } from "../input/label.js";
|
|
6
|
+
const n = (r) => `url(data:image/svg+xml;base64,${btoa(
|
|
7
|
+
`<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 2L2 10" stroke="${r}" stroke-linecap="round"/><path d="M11 7L7 11" stroke="${r}" stroke-linecap="round"/></svg>`
|
|
8
|
+
)})`, A = {
|
|
9
|
+
"--resize-handle-bg": n("#D5D7DA"),
|
|
10
|
+
"--resize-handle-bg-dark": n("#373A41")
|
|
11
|
+
}, v = {
|
|
12
|
+
sm: "text-xs",
|
|
13
|
+
md: "text-sm",
|
|
14
|
+
lg: "text-md"
|
|
15
|
+
}, D = {
|
|
16
|
+
sm: "text-xs",
|
|
17
|
+
md: "text-xs",
|
|
18
|
+
lg: "text-sm"
|
|
19
|
+
}, B = {
|
|
20
|
+
sm: "p-[7px]",
|
|
21
|
+
md: "py-2 px-3",
|
|
22
|
+
lg: "py-3 px-3.5"
|
|
23
|
+
}, m = ({
|
|
24
|
+
className: r,
|
|
25
|
+
style: t,
|
|
26
|
+
size: s = "sm",
|
|
27
|
+
...o
|
|
28
|
+
}) => /* @__PURE__ */ i(
|
|
29
|
+
k,
|
|
30
|
+
{
|
|
31
|
+
...o,
|
|
32
|
+
style: (e) => ({
|
|
33
|
+
...A,
|
|
34
|
+
...typeof t == "function" ? t(e) : t
|
|
35
|
+
}),
|
|
36
|
+
className: (e) => x(
|
|
37
|
+
"w-full scroll-py-3 rounded-lg bg-primary border border-secondary transition duration-100 ease-linear placeholder:text-placeholder_subtle autofill:rounded-lg autofill:text-primary focus:outline-hidden text-primary",
|
|
38
|
+
v[s],
|
|
39
|
+
B[s],
|
|
40
|
+
// Resize handle
|
|
41
|
+
"[&::-webkit-resizer]:bg-(image:--resize-handle-bg) [&::-webkit-resizer]:bg-contain dark:[&::-webkit-resizer]:bg-(image:--resize-handle-bg-dark)",
|
|
42
|
+
e.isFocused && !e.isDisabled && "border-brand",
|
|
43
|
+
e.isDisabled && "cursor-not-allowed bg-disabled_subtle text-disabled border-disabled",
|
|
44
|
+
// Frozen to platform-ui on purpose: an unfocused invalid textarea keeps its
|
|
45
|
+
// normal border, and the error shows in the hint text. The red ring only
|
|
46
|
+
// appears on focus. Unlike `Input`, there is no `border-error`. platform-ui
|
|
47
|
+
// callers that want a red border at rest (the inline-edit cells) pass
|
|
48
|
+
// `ring-2 ring-error` through `textAreaClassName`. Bringing this in line
|
|
49
|
+
// with `Input` is a visible change, so it is left for a design decision.
|
|
50
|
+
e.isInvalid && "ring-error_subtle",
|
|
51
|
+
e.isInvalid && e.isFocused && "ring-2 ring-error",
|
|
52
|
+
typeof r == "function" ? r(e) : r
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
m.displayName = "TextAreaBase";
|
|
57
|
+
const F = ({
|
|
58
|
+
label: r,
|
|
59
|
+
hint: t,
|
|
60
|
+
tooltip: s,
|
|
61
|
+
textAreaRef: o,
|
|
62
|
+
hideRequiredIndicator: e,
|
|
63
|
+
textAreaClassName: g,
|
|
64
|
+
placeholder: p,
|
|
65
|
+
className: l,
|
|
66
|
+
rows: b,
|
|
67
|
+
cols: c,
|
|
68
|
+
size: d = "sm",
|
|
69
|
+
...u
|
|
70
|
+
}) => /* @__PURE__ */ i(
|
|
71
|
+
w,
|
|
72
|
+
{
|
|
73
|
+
...u,
|
|
74
|
+
className: (a) => x(
|
|
75
|
+
"group flex h-max w-full flex-col items-start justify-start gap-1.5",
|
|
76
|
+
typeof l == "function" ? l(a) : l
|
|
77
|
+
),
|
|
78
|
+
children: ({ isInvalid: a, isRequired: f }) => /* @__PURE__ */ h(y, { children: [
|
|
79
|
+
r && /* @__PURE__ */ i(
|
|
80
|
+
T,
|
|
81
|
+
{
|
|
82
|
+
className: D[d],
|
|
83
|
+
isRequired: f && !e,
|
|
84
|
+
tooltip: s,
|
|
85
|
+
children: r
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ i(
|
|
89
|
+
m,
|
|
90
|
+
{
|
|
91
|
+
placeholder: p,
|
|
92
|
+
className: g,
|
|
93
|
+
ref: o,
|
|
94
|
+
rows: b,
|
|
95
|
+
cols: c,
|
|
96
|
+
size: d
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
t && /* @__PURE__ */ i(z, { isInvalid: a, children: t })
|
|
100
|
+
] })
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
F.displayName = "TextArea";
|
|
104
|
+
export {
|
|
105
|
+
F as TextArea,
|
|
106
|
+
m as TextAreaBase
|
|
107
|
+
};
|