snapflow-ui-kit 1.0.0 → 1.1.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/README.md +42 -0
- package/dist/{CloseIcon-BASungOx.js → ArrowDownIcon-DL5pXuXm.js} +17 -41
- package/dist/ArrowDownIcon-DL5pXuXm.js.map +1 -0
- package/dist/CloseIcon-CwhvW02e.js +30 -0
- package/dist/CloseIcon-CwhvW02e.js.map +1 -0
- package/dist/DatePicker-SCRr57u0.js +465 -0
- package/dist/DatePicker-SCRr57u0.js.map +1 -0
- package/dist/Radio-Dngy9qay.js +180 -0
- package/dist/Radio-Dngy9qay.js.map +1 -0
- package/dist/components/Button/Button.d.ts +2 -1
- package/dist/components/Button/Button.types.d.ts +4 -8
- package/dist/components/Label/Label.types.d.ts +1 -1
- package/dist/components/Textarea/Textarea.d.ts +1 -1
- package/dist/icons.js +11 -10
- package/dist/icons.js.map +1 -1
- package/dist/index.client.d.ts +5 -0
- package/dist/index.client.js +24 -0
- package/dist/index.client.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +20 -643
- package/dist/index.js.map +1 -1
- package/dist/index.server.d.ts +10 -0
- package/dist/index.server.js +15 -0
- package/dist/index.server.js.map +1 -0
- package/package.json +6 -1
- package/dist/CloseIcon-BASungOx.js.map +0 -1
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { jsxs as c, jsx as s, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import z, { clsx as _ } from "clsx";
|
|
3
|
+
import { forwardRef as $, useId as g } from "react";
|
|
4
|
+
import { C as j } from "./CloseIcon-CwhvW02e.js";
|
|
5
|
+
const S = "_button_dqki1_1", C = "_primary_dqki1_25", B = "_secondary_dqki1_48", E = "_outlined_dqki1_71", I = "_text_dqki1_97", T = "_icon_dqki1_117", x = {
|
|
6
|
+
button: S,
|
|
7
|
+
primary: C,
|
|
8
|
+
secondary: B,
|
|
9
|
+
outlined: E,
|
|
10
|
+
text: I,
|
|
11
|
+
icon: T
|
|
12
|
+
}, $t = (a) => {
|
|
13
|
+
const { as: t = "button", className: n, variant: o = "primary", icon: e, ...l } = a, r = _(x.button, x[o], n), { children: b, ...u } = l;
|
|
14
|
+
return /* @__PURE__ */ c(t, { className: r, ...u, children: [
|
|
15
|
+
e && /* @__PURE__ */ s("span", { className: x.icon, children: e }),
|
|
16
|
+
b
|
|
17
|
+
] });
|
|
18
|
+
}, O = "_textareaWrapper_ahoiy_1", W = "_label_ahoiy_7", R = "_disabled_ahoiy_14", A = "_textarea_ahoiy_1", F = "_errorState_ahoiy_46", L = "_errorMessage_ahoiy_52", w = "_required_ahoiy_59", i = {
|
|
19
|
+
textareaWrapper: O,
|
|
20
|
+
label: W,
|
|
21
|
+
disabled: R,
|
|
22
|
+
textarea: A,
|
|
23
|
+
errorState: F,
|
|
24
|
+
errorMessage: L,
|
|
25
|
+
required: w
|
|
26
|
+
}, P = $(
|
|
27
|
+
({ label: a, errorMessage: t, id: n, className: o, disabled: e, minHeight: l = 84, required: r, ...b }, u) => {
|
|
28
|
+
const k = g(), h = n ?? k, q = t ? `${h}-error` : void 0;
|
|
29
|
+
return /* @__PURE__ */ c("div", { className: _(i.textareaWrapper, o), children: [
|
|
30
|
+
a && /* @__PURE__ */ c("label", { htmlFor: h, className: _(i.label, { [i.disabled]: e }), children: [
|
|
31
|
+
a,
|
|
32
|
+
r && /* @__PURE__ */ s("sup", { className: i.required, children: " *" })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ s(
|
|
35
|
+
"textarea",
|
|
36
|
+
{
|
|
37
|
+
ref: u,
|
|
38
|
+
id: h,
|
|
39
|
+
className: _(i.textarea, { [i.errorState]: !!t }),
|
|
40
|
+
"aria-invalid": !!t,
|
|
41
|
+
"aria-describedby": q,
|
|
42
|
+
required: r,
|
|
43
|
+
disabled: e,
|
|
44
|
+
style: { minHeight: l },
|
|
45
|
+
...b
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
t && /* @__PURE__ */ s("span", { id: q, role: "alert", className: i.errorMessage, children: t })
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
P.displayName = "Textarea";
|
|
53
|
+
const D = "_alert_5jfpm_1", G = "_content_5jfpm_15", H = "_error_5jfpm_22", J = "_success_5jfpm_28", K = "_closeButton_5jfpm_33", M = "_message_5jfpm_39", Q = "_title_5jfpm_40", U = "_toastEnter_5jfpm_50", V = "_toastExit_5jfpm_54", d = {
|
|
54
|
+
alert: D,
|
|
55
|
+
content: G,
|
|
56
|
+
error: H,
|
|
57
|
+
success: J,
|
|
58
|
+
closeButton: K,
|
|
59
|
+
message: M,
|
|
60
|
+
title: Q,
|
|
61
|
+
toastEnter: U,
|
|
62
|
+
"fade-in": "_fade-in_5jfpm_1",
|
|
63
|
+
toastExit: V,
|
|
64
|
+
"fade-out": "_fade-out_5jfpm_1"
|
|
65
|
+
}, gt = ({
|
|
66
|
+
variant: a = "error",
|
|
67
|
+
title: t,
|
|
68
|
+
message: n,
|
|
69
|
+
className: o,
|
|
70
|
+
onClose: e
|
|
71
|
+
}) => /* @__PURE__ */ c("div", { className: z(d.alert, d[a], o), role: "alert", children: [
|
|
72
|
+
/* @__PURE__ */ c("div", { className: d.content, children: [
|
|
73
|
+
t && /* @__PURE__ */ s("div", { className: d.title, children: t }),
|
|
74
|
+
/* @__PURE__ */ s("div", { className: d.message, children: n })
|
|
75
|
+
] }),
|
|
76
|
+
e && /* @__PURE__ */ s("button", { type: "button", className: d.closeButton, onClick: e, "aria-label": "Close alert", children: /* @__PURE__ */ s(j, {}) })
|
|
77
|
+
] }), X = "_card_1ah7i_1", Y = {
|
|
78
|
+
card: X
|
|
79
|
+
}, jt = ({ className: a, children: t, ...n }) => /* @__PURE__ */ s("div", { className: _(Y.card, a), ...n, children: t }), Z = "_checkbox_1q28z_1", tt = "_input_1q28z_11", et = "_labelSpan_1q28z_16", at = "_control_1q28z_23", m = {
|
|
80
|
+
checkbox: Z,
|
|
81
|
+
input: tt,
|
|
82
|
+
labelSpan: et,
|
|
83
|
+
control: at
|
|
84
|
+
}, St = ({ children: a, className: t, checked: n, onChange: o, ...e }) => /* @__PURE__ */ c("label", { className: _(m.checkbox, t), children: [
|
|
85
|
+
/* @__PURE__ */ s("input", { type: "checkbox", className: m.input, checked: n, onChange: o, ...e }),
|
|
86
|
+
/* @__PURE__ */ s("span", { className: m.control }),
|
|
87
|
+
a && /* @__PURE__ */ s("span", { className: m.labelSpan, children: a })
|
|
88
|
+
] }), st = "_typography_11tbz_1", nt = "_icon_11tbz_8", ot = "_large_11tbz_14", rt = "_h1_11tbz_20", ct = "_h2_11tbz_26", lt = "_h3_11tbz_32", _t = "_small_11tbz_68", it = "_link_11tbz_80", y = {
|
|
89
|
+
typography: st,
|
|
90
|
+
icon: nt,
|
|
91
|
+
large: ot,
|
|
92
|
+
h1: rt,
|
|
93
|
+
h2: ct,
|
|
94
|
+
h3: lt,
|
|
95
|
+
"text-16": "_text-16_11tbz_38",
|
|
96
|
+
"text-16-bold": "_text-16-bold_11tbz_44",
|
|
97
|
+
"text-14": "_text-14_11tbz_50",
|
|
98
|
+
"text-14-bold": "_text-14-bold_11tbz_56",
|
|
99
|
+
"text-14-medium": "_text-14-medium_11tbz_62",
|
|
100
|
+
small: _t,
|
|
101
|
+
"small-semibold": "_small-semibold_11tbz_74",
|
|
102
|
+
link: it,
|
|
103
|
+
"small-link": "_small-link_11tbz_89"
|
|
104
|
+
}, dt = (a) => {
|
|
105
|
+
const { as: t = "span", children: n, className: o, icon: e, variant: l, ...r } = a;
|
|
106
|
+
return /* @__PURE__ */ c(t, { className: _(y.typography, y[l], o), ...r, children: [
|
|
107
|
+
e && /* @__PURE__ */ s("span", { className: y.icon, children: e }),
|
|
108
|
+
n
|
|
109
|
+
] });
|
|
110
|
+
}, mt = "_label_ndvr9_1", pt = "_required_ndvr9_5", bt = "_srOnly_ndvr9_10", N = {
|
|
111
|
+
label: mt,
|
|
112
|
+
required: pt,
|
|
113
|
+
srOnly: bt
|
|
114
|
+
}, Ct = ({
|
|
115
|
+
text: a,
|
|
116
|
+
textVariant: t = "text-14-medium",
|
|
117
|
+
required: n = !1,
|
|
118
|
+
color: o,
|
|
119
|
+
className: e,
|
|
120
|
+
htmlFor: l,
|
|
121
|
+
...r
|
|
122
|
+
}) => /* @__PURE__ */ c(
|
|
123
|
+
dt,
|
|
124
|
+
{
|
|
125
|
+
as: "label",
|
|
126
|
+
variant: t,
|
|
127
|
+
className: z(N.label, e),
|
|
128
|
+
htmlFor: l,
|
|
129
|
+
style: o ? { color: o } : void 0,
|
|
130
|
+
...r,
|
|
131
|
+
children: [
|
|
132
|
+
a,
|
|
133
|
+
n && /* @__PURE__ */ c(v, { children: [
|
|
134
|
+
/* @__PURE__ */ s("span", { className: N.required, "aria-hidden": "true", children: "*" }),
|
|
135
|
+
/* @__PURE__ */ s("span", { className: N.srOnly, children: " (required)" })
|
|
136
|
+
] })
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
), ut = "_tab_78cv0_1", ht = "_selected_78cv0_21", f = {
|
|
140
|
+
tab: ut,
|
|
141
|
+
selected: ht
|
|
142
|
+
}, Bt = (a) => {
|
|
143
|
+
const { children: t, selected: n = !1, className: o, disabled: e = !1, ...l } = a, r = _(f.tab, n && f.selected, e && f.disabled, o);
|
|
144
|
+
return /* @__PURE__ */ s(
|
|
145
|
+
"button",
|
|
146
|
+
{
|
|
147
|
+
type: "button",
|
|
148
|
+
role: "tab",
|
|
149
|
+
className: r,
|
|
150
|
+
disabled: e,
|
|
151
|
+
tabIndex: e ? -1 : 0,
|
|
152
|
+
"aria-selected": n,
|
|
153
|
+
"aria-disabled": e,
|
|
154
|
+
...l,
|
|
155
|
+
children: t
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
}, xt = "_radio_10hqy_1", yt = "_input_10hqy_12", Nt = "_labelSpan_10hqy_18", ft = "_control_10hqy_26", p = {
|
|
159
|
+
radio: xt,
|
|
160
|
+
input: yt,
|
|
161
|
+
labelSpan: Nt,
|
|
162
|
+
control: ft
|
|
163
|
+
}, Et = ({ children: a, className: t, checked: n, onChange: o, ...e }) => /* @__PURE__ */ c("label", { className: _(p.radio, t), children: [
|
|
164
|
+
/* @__PURE__ */ s("input", { type: "radio", className: p.input, checked: n, onChange: o, ...e }),
|
|
165
|
+
/* @__PURE__ */ s("span", { className: p.control }),
|
|
166
|
+
a && /* @__PURE__ */ s("span", { className: p.labelSpan, children: a })
|
|
167
|
+
] });
|
|
168
|
+
export {
|
|
169
|
+
gt as A,
|
|
170
|
+
$t as B,
|
|
171
|
+
jt as C,
|
|
172
|
+
Ct as L,
|
|
173
|
+
Et as R,
|
|
174
|
+
Bt as T,
|
|
175
|
+
St as a,
|
|
176
|
+
P as b,
|
|
177
|
+
dt as c,
|
|
178
|
+
d as s
|
|
179
|
+
};
|
|
180
|
+
//# sourceMappingURL=Radio-Dngy9qay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio-Dngy9qay.js","sources":["../src/components/Button/Button.tsx","../src/components/Textarea/Textarea.tsx","../src/components/Alert/Alert.tsx","../src/components/Card/Card.tsx","../src/components/Checkbox/Checkbox.tsx","../src/components/Typography/Typography.tsx","../src/components/Label/Label.tsx","../src/components/Tab/Tab.tsx","../src/components/Radio/Radio.tsx"],"sourcesContent":["import { ElementType } from 'react'\n\nimport { clsx } from 'clsx'\n\nimport s from './Button.module.css'\nimport { ButtonProps } from './Button.types'\n\nexport const Button = <T extends ElementType = 'button'>(props: ButtonProps<T>) => {\n const { as: Component = 'button', className, variant = 'primary', icon, ...rest } = props\n const classes = clsx(s.button, s[variant], className)\n const { children, ...componentProps } = rest\n\n return (\n <Component className={classes} {...componentProps}>\n {icon && <span className={s.icon}>{icon}</span>}\n {children}\n </Component>\n )\n}\n","'use client'\n\nimport { forwardRef, useId } from 'react'\nimport { clsx } from 'clsx'\n\nimport s from './Textarea.module.css'\nimport type { TextareaProps } from './Textarea.types'\n\nexport const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ label, errorMessage, id, className, disabled, minHeight = 84, required, ...rest }, ref) => {\n const generatedId = useId()\n const textareaId = id ?? generatedId\n const errorId = errorMessage ? `${textareaId}-error` : undefined\n\n return (\n <div className={clsx(s.textareaWrapper, className)}>\n {label && (\n <label htmlFor={textareaId} className={clsx(s.label, { [s.disabled]: disabled })}>\n {label}\n {required && <sup className={s.required}> *</sup>}\n </label>\n )}\n\n <textarea\n ref={ref}\n id={textareaId}\n className={clsx(s.textarea, { [s.errorState]: !!errorMessage })}\n aria-invalid={!!errorMessage}\n aria-describedby={errorId}\n required={required}\n disabled={disabled}\n style={{ minHeight }}\n {...rest}\n />\n\n {errorMessage && (\n <span id={errorId} role=\"alert\" className={s.errorMessage}>\n {errorMessage}\n </span>\n )}\n </div>\n )\n },\n)\n\nTextarea.displayName = 'Textarea'\n","import { FC } from 'react'\nimport clsx from 'clsx'\n\nimport s from './Alert.module.css'\nimport { CloseIcon } from '@/icons'\nimport type { AlertProps } from './Alert.types'\n\nexport const Alert: FC<AlertProps> = ({\n variant = 'error',\n title,\n message,\n className,\n onClose,\n}) => {\n return (\n <div className={clsx(s.alert, s[variant], className)} role=\"alert\">\n <div className={s.content}>\n {title && <div className={s.title}>{title}</div>}\n <div className={s.message}>{message}</div>\n </div>\n\n {onClose && (\n <button type=\"button\" className={s.closeButton} onClick={onClose} aria-label=\"Close alert\">\n <CloseIcon />\n </button>\n )}\n </div>\n )\n}\n","import { clsx } from 'clsx'\n\nimport s from './Card.module.css'\nimport { CardProps } from './Card.types'\n\nexport const Card = ({ className, children, ...rest }: CardProps) => {\n return (\n <div className={clsx(s.card, className)} {...rest}>\n {children}\n </div>\n )\n}\n","import { clsx } from 'clsx'\nimport s from './Checkbox.module.css'\nimport { CheckboxProps } from './Checkbox.types'\n\nexport const Checkbox = ({ children, className, checked, onChange, ...rest }: CheckboxProps) => {\n return (\n <label className={clsx(s.checkbox, className)}>\n <input type=\"checkbox\" className={s.input} checked={checked} onChange={onChange} {...rest} />\n\n <span className={s.control} />\n {children && <span className={s.labelSpan}>{children}</span>}\n </label>\n )\n}\n","import { ElementType } from 'react'\n\nimport { clsx } from 'clsx'\n\nimport s from './Typography.module.css'\nimport { TypographyProps } from './Typography.types'\n\nexport const Typography = <T extends ElementType = 'span'>(props: TypographyProps<T>) => {\n const { as: Component = 'span', children, className, icon, variant, ...rest } = props\n\n return (\n <Component className={clsx(s.typography, s[variant], className)} {...rest}>\n {icon && <span className={s.icon}>{icon}</span>}\n {children}\n </Component>\n )\n}\n","import clsx from 'clsx'\nimport { Typography } from '../Typography'\nimport s from './Label.module.css'\nimport { LabelProps } from './Label.types'\n\nexport const Label = ({\n text,\n textVariant = 'text-14-medium',\n required = false,\n color,\n className,\n htmlFor,\n ...rest\n}: LabelProps) => {\n return (\n <Typography\n as=\"label\"\n variant={textVariant}\n className={clsx(s.label, className)}\n htmlFor={htmlFor}\n style={color ? { color } : undefined}\n {...rest}\n >\n {text}\n {required && (\n <>\n <span className={s.required} aria-hidden=\"true\">\n *\n </span>\n <span className={s.srOnly}> (required)</span>\n </>\n )}\n </Typography>\n )\n}\n","import { clsx } from 'clsx'\n\nimport s from './Tab.module.css'\nimport type { TabProps } from './Tab.types'\n\nexport const Tab = (props: TabProps) => {\n const { children, selected = false, className, disabled = false, ...rest } = props\n\n const tabClasses = clsx(s.tab, selected && s.selected, disabled && s.disabled, className)\n\n return (\n <button\n type=\"button\"\n role=\"tab\"\n className={tabClasses}\n disabled={disabled}\n tabIndex={disabled ? -1 : 0}\n aria-selected={selected}\n aria-disabled={disabled}\n {...rest}\n >\n {children}\n </button>\n )\n}\n","import { clsx } from 'clsx'\nimport s from './Radio.module.css'\nimport { RadioProps } from './Radio.types'\n\nexport const Radio = ({ children, className, checked, onChange, ...rest }: RadioProps) => {\n return (\n <label className={clsx(s.radio, className)}>\n <input type=\"radio\" className={s.input} checked={checked} onChange={onChange} {...rest} />\n\n <span className={s.control} />\n {children && <span className={s.labelSpan}>{children}</span>}\n </label>\n )\n}\n"],"names":["Button","props","Component","className","variant","icon","rest","classes","clsx","s","children","componentProps","jsxs","jsx","Textarea","forwardRef","label","errorMessage","id","disabled","minHeight","required","ref","generatedId","useId","textareaId","errorId","Alert","title","message","onClose","CloseIcon","Card","Checkbox","checked","onChange","Typography","Label","text","textVariant","color","htmlFor","Fragment","Tab","selected","tabClasses","Radio"],"mappings":";;;;;;;;;;;GAOaA,KAAS,CAAmCC,MAA0B;AACjF,QAAM,EAAE,IAAIC,IAAY,UAAU,WAAAC,GAAW,SAAAC,IAAU,WAAW,MAAAC,GAAM,GAAGC,EAAA,IAASL,GAC9EM,IAAUC,EAAKC,EAAE,QAAQA,EAAEL,CAAO,GAAGD,CAAS,GAC9C,EAAE,UAAAO,GAAU,GAAGC,EAAA,IAAmBL;AAExC,SACE,gBAAAM,EAACV,GAAA,EAAU,WAAWK,GAAU,GAAGI,GAChC,UAAA;AAAA,IAAAN,KAAQ,gBAAAQ,EAAC,QAAA,EAAK,WAAWJ,EAAE,MAAO,UAAAJ,GAAK;AAAA,IACvCK;AAAA,EAAA,GACH;AAEJ;;;;;;;;GCVaI,IAAWC;AAAA,EACtB,CAAC,EAAE,OAAAC,GAAO,cAAAC,GAAc,IAAAC,GAAI,WAAAf,GAAW,UAAAgB,GAAU,WAAAC,IAAY,IAAI,UAAAC,GAAU,GAAGf,EAAA,GAAQgB,MAAQ;AAC5F,UAAMC,IAAcC,EAAA,GACdC,IAAaP,KAAMK,GACnBG,IAAUT,IAAe,GAAGQ,CAAU,WAAW;AAEvD,6BACG,OAAA,EAAI,WAAWjB,EAAKC,EAAE,iBAAiBN,CAAS,GAC9C,UAAA;AAAA,MAAAa,KACC,gBAAAJ,EAAC,SAAA,EAAM,SAASa,GAAY,WAAWjB,EAAKC,EAAE,OAAO,EAAE,CAACA,EAAE,QAAQ,GAAGU,EAAA,CAAU,GAC5E,UAAA;AAAA,QAAAH;AAAA,Q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,GAAqB,GAAG7B,EAAA,CAAM;AAAA,EAExF,gBAAAO,EAAC,QAAA,EAAK,WAAWJ,EAAE,QAAA,CAAS;AAAA,EAC3BC,KAAY,gBAAAG,EAAC,QAAA,EAAK,WAAWJ,EAAE,WAAY,UAAAC,EAAA,CAAS;AAAA,GACvD;"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { ElementType } from 'react';
|
|
1
2
|
import { ButtonProps } from './Button.types';
|
|
2
|
-
export declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const Button: <T extends ElementType = "button">(props: ButtonProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
|
|
2
2
|
export type ButtonVariant = 'primary' | 'secondary' | 'outlined' | 'text';
|
|
3
3
|
type CommonProps = {
|
|
4
4
|
variant?: ButtonVariant;
|
|
5
5
|
icon?: ReactNode;
|
|
6
6
|
};
|
|
7
|
-
type
|
|
8
|
-
|
|
9
|
-
} & CommonProps & ComponentPropsWithoutRef<'
|
|
10
|
-
type AsLinkProps = {
|
|
11
|
-
asLink: true;
|
|
12
|
-
} & CommonProps & ComponentPropsWithoutRef<'a'>;
|
|
13
|
-
export type ButtonProps = AsButtonProps | AsLinkProps;
|
|
7
|
+
export type ButtonProps<T extends ElementType = 'button'> = {
|
|
8
|
+
as?: T;
|
|
9
|
+
} & CommonProps & Omit<ComponentPropsWithoutRef<T>, 'as'>;
|
|
14
10
|
export {};
|
|
@@ -4,4 +4,4 @@ export declare const Textarea: import("react").ForwardRefExoticComponent<{
|
|
|
4
4
|
minHeight?: number;
|
|
5
5
|
value?: string;
|
|
6
6
|
onChange?: (e: import("react").ChangeEvent<HTMLTextAreaElement>) => void;
|
|
7
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "
|
|
7
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "defaultValue" | "value" | "onChange"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
package/dist/icons.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs as i, jsx as C, Fragment as n } from "react/jsx-runtime";
|
|
2
2
|
import { useId as h } from "react";
|
|
3
|
-
import { A as r1,
|
|
3
|
+
import { A as r1, C as n1, a as d1, E as c1 } from "./ArrowDownIcon-DL5pXuXm.js";
|
|
4
|
+
import { C as w1 } from "./CloseIcon-CwhvW02e.js";
|
|
4
5
|
const w = ({ type: t = "stroke", ...l }) => {
|
|
5
6
|
const e = h();
|
|
6
7
|
return /* @__PURE__ */ i(
|
|
@@ -1120,7 +1121,7 @@ const w = ({ type: t = "stroke", ...l }) => {
|
|
|
1120
1121
|
]
|
|
1121
1122
|
}
|
|
1122
1123
|
);
|
|
1123
|
-
},
|
|
1124
|
+
}, j = ({ type: t = "stroke", ...l }) => {
|
|
1124
1125
|
const e = h(), r = h();
|
|
1125
1126
|
return t === "stroke" ? /* @__PURE__ */ i(
|
|
1126
1127
|
"svg",
|
|
@@ -1172,7 +1173,7 @@ const w = ({ type: t = "stroke", ...l }) => {
|
|
|
1172
1173
|
]
|
|
1173
1174
|
}
|
|
1174
1175
|
);
|
|
1175
|
-
},
|
|
1176
|
+
}, D = ({ type: t = "stroke", ...l }) => {
|
|
1176
1177
|
const e = h(), r = h();
|
|
1177
1178
|
return t === "stroke" ? /* @__PURE__ */ i(
|
|
1178
1179
|
"svg",
|
|
@@ -1231,7 +1232,7 @@ const w = ({ type: t = "stroke", ...l }) => {
|
|
|
1231
1232
|
]
|
|
1232
1233
|
}
|
|
1233
1234
|
);
|
|
1234
|
-
},
|
|
1235
|
+
}, b = ({ type: t = "stroke", ...l }) => {
|
|
1235
1236
|
const e = h(), r = h();
|
|
1236
1237
|
return t === "stroke" ? /* @__PURE__ */ i(
|
|
1237
1238
|
"svg",
|
|
@@ -1949,15 +1950,15 @@ export {
|
|
|
1949
1950
|
w as BookMarkIcon,
|
|
1950
1951
|
n1 as CalendarIcon,
|
|
1951
1952
|
F as CheckmarkIcon,
|
|
1952
|
-
|
|
1953
|
+
w1 as CloseIcon,
|
|
1953
1954
|
S as ColorPalleteIcon,
|
|
1954
1955
|
K as CopyIcon,
|
|
1955
1956
|
E as CreditCardIcon,
|
|
1956
1957
|
y as EditIcon,
|
|
1957
1958
|
Q as EmailIcon,
|
|
1958
1959
|
G as ExpandIcon,
|
|
1959
|
-
|
|
1960
|
-
|
|
1960
|
+
d1 as EyeIcon,
|
|
1961
|
+
c1 as EyeOffIcon,
|
|
1961
1962
|
z as FacebookLogo,
|
|
1962
1963
|
X as FlagRussia,
|
|
1963
1964
|
q as FlagUK,
|
|
@@ -1968,18 +1969,18 @@ export {
|
|
|
1968
1969
|
L as LayersIcon,
|
|
1969
1970
|
g as LikeIcon,
|
|
1970
1971
|
p as LogOutIcon,
|
|
1971
|
-
|
|
1972
|
+
j as MaximizeIcon,
|
|
1972
1973
|
f as MessageIcon,
|
|
1973
1974
|
a as MicIcon,
|
|
1974
1975
|
H as MoreHozitontalIcon,
|
|
1975
1976
|
_ as PaidIcon,
|
|
1976
1977
|
M as PaperPlaneIcon,
|
|
1977
|
-
|
|
1978
|
+
D as PauseCircleIcon,
|
|
1978
1979
|
C1 as PayPalLogo,
|
|
1979
1980
|
Z as PersonAddIcon,
|
|
1980
1981
|
u as PersonIcon,
|
|
1981
1982
|
V as PersonRemoveIcon,
|
|
1982
|
-
|
|
1983
|
+
b as PinIcon,
|
|
1983
1984
|
U as PlayCircleIcon,
|
|
1984
1985
|
J as PlusCirceIcon,
|
|
1985
1986
|
v as PlusSquareIcon,
|