@dss-kit/ui-kit 0.3.5 → 0.3.7
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/components/builders/Modal/Modal.js +57 -51
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.js +27 -27
- package/dist/components/builders/Modal/styles.d.ts +0 -1
- package/dist/components/builders/Modal/styles.js +6 -12
- package/dist/components/builders/Table/Table.js +101 -95
- package/dist/components/builders/Table/Table.types.d.ts +7 -1
- package/dist/components/builders/Table/TablePagination/TablePagination.js +1 -1
- package/dist/components/controls/Button/Button.js +6 -6
- package/dist/components/controls/IconButton/IconButton.d.ts +17 -2
- package/dist/components/controls/IconButton/IconButton.js +17 -24
- package/dist/components/controls/IconButton/index.d.ts +2 -2
- package/dist/components/controls/Input/Input.js +147 -133
- package/dist/components/controls/Input/styles.d.ts +2 -0
- package/dist/components/controls/Input/styles.js +36 -28
- package/dist/components/controls/MarkdownTextEditor/MarkdownTextEditor.js +6 -6
- package/dist/components/controls/MarkdownTextEditor/components/EditorToolbar/ActionMenuButton/ActionMenuButton.js +8 -8
- package/dist/components/shared/MarkdownText/MarkdownText.js +10 -10
- package/dist/ui-kit.cjs +8 -8
- package/dist/utils/theme/spacing.d.ts +15 -0
- package/dist/utils/theme/spacing.js +15 -0
- package/package.json +1 -1
- package/dist/components/controls/IconButton/IconButton.types.d.ts +0 -11
|
@@ -9,7 +9,13 @@ export type { TablePaginationLabels, TablePaginationProps, TablePaginationVarian
|
|
|
9
9
|
export interface TableProps<TData> {
|
|
10
10
|
/** Данные для отображения в таблице */
|
|
11
11
|
data: TData[];
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Определения колонок.
|
|
14
|
+
*
|
|
15
|
+
* Сортировка по колонке по умолчанию выключена: чтобы включить её,
|
|
16
|
+
* укажите у колонки `enableSorting: true` (при этом `enableSorting`
|
|
17
|
+
* таблицы тоже должен быть включён).
|
|
18
|
+
*/
|
|
13
19
|
columns: ColumnDef<TData, any>[];
|
|
14
20
|
/** Показывать ли границы */
|
|
15
21
|
/** @default true */
|
|
@@ -6,10 +6,10 @@ import B from "../../../../assets/svg/table/chevron-right.svg.js";
|
|
|
6
6
|
import U from "../../../../assets/svg/table/dots.svg.js";
|
|
7
7
|
import { getPageNumbers as X } from "./TablePagination.utils.js";
|
|
8
8
|
import { Button as M } from "../../../controls/Button/Button.js";
|
|
9
|
+
import { IconButton as j } from "../../../controls/IconButton/IconButton.js";
|
|
9
10
|
import { Box as r } from "../../Box/Box.js";
|
|
10
11
|
import { Select as Y } from "../../../controls/Select/Select.js";
|
|
11
12
|
import { theme as Z } from "../../../../utils/theme/index.js";
|
|
12
|
-
import { IconButton as j } from "../../../controls/IconButton/IconButton.js";
|
|
13
13
|
import { Text as _ } from "../../Text/Text.js";
|
|
14
14
|
const { color: i, cornerRadius: tt, spacing: b } = Z, bt = ({
|
|
15
15
|
pageIndex: o,
|
|
@@ -5,10 +5,10 @@ import { useMemo as o } from "react";
|
|
|
5
5
|
import { cornerRadiusValues as u, baseButton as D, getVariantStyles as E, typeStyles as G, sizeValues as H } from "./styles.js";
|
|
6
6
|
import { Loader as I } from "../../builders/Loader/Loader.js";
|
|
7
7
|
import { AnimatedText as J } from "../../builders/Text/Text.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
const { color: m } =
|
|
8
|
+
import { theme as K } from "../../../utils/theme/index.js";
|
|
9
|
+
import { Box as P } from "../../builders/Box/Box.js";
|
|
10
|
+
import { Ripple as Q } from "../../builders/Ripple/Ripple.js";
|
|
11
|
+
const { color: m } = K, ue = ({
|
|
12
12
|
disabled: n,
|
|
13
13
|
loading: l,
|
|
14
14
|
className: g,
|
|
@@ -95,7 +95,7 @@ const { color: m } = P, ue = ({
|
|
|
95
95
|
}
|
|
96
96
|
}, [s]);
|
|
97
97
|
return /* @__PURE__ */ a(
|
|
98
|
-
|
|
98
|
+
P,
|
|
99
99
|
{
|
|
100
100
|
className: y(S, g),
|
|
101
101
|
w: h,
|
|
@@ -131,7 +131,7 @@ const { color: m } = P, ue = ({
|
|
|
131
131
|
),
|
|
132
132
|
R
|
|
133
133
|
] }),
|
|
134
|
-
/* @__PURE__ */ a(
|
|
134
|
+
/* @__PURE__ */ a(Q, {})
|
|
135
135
|
]
|
|
136
136
|
}
|
|
137
137
|
)
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { CustomType, NegativeType, NeutralType, PositiveType, PrimaryType, SecondaryType, Size, TransferType, WarningType } from '../../../types/tokens.types';
|
|
3
|
+
export type IconButtonSize = Extract<Size, "xs" | "sm" | "md"> | CustomType;
|
|
4
|
+
export type IconButtonColor = PrimaryType | SecondaryType | NegativeType | PositiveType | WarningType | TransferType | NeutralType | CustomType | "neutral-white" | "no-bg";
|
|
5
|
+
export interface IconButtonProps extends ComponentProps<"button"> {
|
|
6
|
+
/**
|
|
7
|
+
* Размер кнопки.
|
|
8
|
+
* @default "md"
|
|
9
|
+
*/
|
|
10
|
+
size?: IconButtonSize;
|
|
11
|
+
/**
|
|
12
|
+
* Цветовая схема (токен).
|
|
13
|
+
* @default "primary"
|
|
14
|
+
*/
|
|
15
|
+
color?: IconButtonColor;
|
|
16
|
+
}
|
|
17
|
+
export declare function IconButton({ children, className, type, color, size, ...rest }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,35 +1,28 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import p from "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
type: s = "button",
|
|
1
|
+
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { cx as p } from "@emotion/css";
|
|
3
|
+
import { styles as l, sizeStyles as c, colorStyles as f } from "./styles.js";
|
|
4
|
+
import { Ripple as u } from "../../builders/Ripple/Ripple.js";
|
|
5
|
+
function d({
|
|
6
|
+
children: o,
|
|
7
|
+
className: t,
|
|
8
|
+
type: r = "button",
|
|
10
9
|
color: m = "primary",
|
|
11
|
-
size:
|
|
12
|
-
...
|
|
10
|
+
size: s = "md",
|
|
11
|
+
...e
|
|
13
12
|
}) {
|
|
14
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ i(
|
|
15
14
|
"button",
|
|
16
15
|
{
|
|
17
|
-
...
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
className: p(
|
|
21
|
-
a,
|
|
22
|
-
f[e],
|
|
23
|
-
u[m],
|
|
24
|
-
r
|
|
25
|
-
),
|
|
16
|
+
...e,
|
|
17
|
+
type: r,
|
|
18
|
+
className: p(l, c[s], f[m], t),
|
|
26
19
|
children: [
|
|
27
|
-
/* @__PURE__ */ n(
|
|
28
|
-
|
|
20
|
+
/* @__PURE__ */ n(u, {}),
|
|
21
|
+
o
|
|
29
22
|
]
|
|
30
23
|
}
|
|
31
24
|
);
|
|
32
25
|
}
|
|
33
26
|
export {
|
|
34
|
-
|
|
27
|
+
d as IconButton
|
|
35
28
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type { IconButtonColor, IconButtonProps, IconButtonSize, } from './IconButton';
|
|
2
|
+
export { IconButton } from './IconButton';
|
|
@@ -1,204 +1,218 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cx as
|
|
3
|
-
import { useMergeRefs as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import
|
|
6
|
-
import { styles as
|
|
7
|
-
import { useControlled as
|
|
8
|
-
import { Box as
|
|
9
|
-
import { theme as
|
|
10
|
-
import { Text as
|
|
11
|
-
const { spacing:
|
|
12
|
-
function
|
|
1
|
+
import { jsxs as N, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { cx as w } from "@emotion/css";
|
|
3
|
+
import { useMergeRefs as k } from "@floating-ui/react";
|
|
4
|
+
import { forwardRef as Y, useRef as R, useEffect as Z, useMemo as ee } from "react";
|
|
5
|
+
import te from "../../../assets/svg/shared/close-circle.svg.js";
|
|
6
|
+
import { styles as e } from "./styles.js";
|
|
7
|
+
import { useControlled as ne } from "../../../utils/hooks/useControlled.js";
|
|
8
|
+
import { Box as u } from "../../builders/Box/Box.js";
|
|
9
|
+
import { theme as re } from "../../../utils/theme/index.js";
|
|
10
|
+
import { Text as y } from "../../builders/Text/Text.js";
|
|
11
|
+
const { spacing: j } = re;
|
|
12
|
+
function F(t) {
|
|
13
13
|
return {
|
|
14
14
|
...new Event("input", { bubbles: !0 }),
|
|
15
|
-
target:
|
|
16
|
-
currentTarget:
|
|
15
|
+
target: t,
|
|
16
|
+
currentTarget: t
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const ae = Y((t, v) => {
|
|
20
20
|
const {
|
|
21
|
-
label:
|
|
22
|
-
prompt:
|
|
23
|
-
error:
|
|
24
|
-
errorText:
|
|
25
|
-
size:
|
|
26
|
-
prefix:
|
|
21
|
+
label: d,
|
|
22
|
+
prompt: h,
|
|
23
|
+
error: I,
|
|
24
|
+
errorText: E,
|
|
25
|
+
size: M = "md",
|
|
26
|
+
prefix: O,
|
|
27
27
|
suffix: _,
|
|
28
|
-
background:
|
|
29
|
-
showClearButton:
|
|
30
|
-
disabled:
|
|
31
|
-
value:
|
|
32
|
-
defaultValue:
|
|
33
|
-
className:
|
|
34
|
-
wrapperClassName:
|
|
35
|
-
labelClassName:
|
|
36
|
-
fieldContainerClassName:
|
|
37
|
-
promptClassName:
|
|
38
|
-
errorClassName:
|
|
39
|
-
textAlign:
|
|
28
|
+
background: x = "primary",
|
|
29
|
+
showClearButton: W,
|
|
30
|
+
disabled: l,
|
|
31
|
+
value: p,
|
|
32
|
+
defaultValue: m,
|
|
33
|
+
className: B,
|
|
34
|
+
wrapperClassName: A,
|
|
35
|
+
labelClassName: H,
|
|
36
|
+
fieldContainerClassName: P,
|
|
37
|
+
promptClassName: q,
|
|
38
|
+
errorClassName: G,
|
|
39
|
+
textAlign: C = "left",
|
|
40
40
|
...T
|
|
41
|
-
} =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
} = t, o = t.multiline === !0, i = !!t.readOnly, $ = (r) => {
|
|
42
|
+
i && r.preventDefault();
|
|
43
|
+
}, z = R(null), c = R(null), J = k([
|
|
44
|
+
z,
|
|
45
|
+
v
|
|
46
|
+
]), K = k([
|
|
47
|
+
c,
|
|
48
|
+
v
|
|
49
|
+
]), { current: D } = R(p !== void 0), [f, S] = ne(
|
|
50
|
+
typeof p == "string" || typeof p == "number" ? String(p) : void 0,
|
|
51
|
+
typeof m == "string" || typeof m == "number" ? String(m) : ""
|
|
52
|
+
), V = (r) => {
|
|
53
|
+
if (S(r.target.value), o) {
|
|
54
|
+
const a = t.onChange;
|
|
55
|
+
a?.(r);
|
|
54
56
|
} else {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
+
const a = t.onChange;
|
|
58
|
+
a?.(r);
|
|
57
59
|
}
|
|
58
60
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, [
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
61
|
+
Z(() => {
|
|
62
|
+
o && t.autoResize && c.current && (c.current.style.height = "auto", c.current.style.height = `${c.current.scrollHeight}px`);
|
|
63
|
+
}, [f, o, t.autoResize]);
|
|
64
|
+
const Q = () => {
|
|
65
|
+
if (S(""), !o) {
|
|
66
|
+
const a = z.current;
|
|
67
|
+
if (a) {
|
|
68
|
+
a.value = "";
|
|
69
|
+
const s = F(a), g = t.onChange;
|
|
70
|
+
g?.(s);
|
|
69
71
|
}
|
|
70
72
|
return;
|
|
71
73
|
}
|
|
72
|
-
const
|
|
73
|
-
if (
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
|
|
74
|
+
const r = c.current;
|
|
75
|
+
if (r) {
|
|
76
|
+
r.value = "";
|
|
77
|
+
const a = F(r), s = t.onChange;
|
|
78
|
+
s?.(a);
|
|
77
79
|
}
|
|
78
|
-
},
|
|
79
|
-
if (
|
|
80
|
+
}, U = () => {
|
|
81
|
+
if (o) {
|
|
80
82
|
const {
|
|
81
|
-
rows:
|
|
82
|
-
autoResize:
|
|
83
|
-
onChange:
|
|
84
|
-
multiline:
|
|
85
|
-
...
|
|
83
|
+
rows: g,
|
|
84
|
+
autoResize: oe,
|
|
85
|
+
onChange: le,
|
|
86
|
+
multiline: ie,
|
|
87
|
+
...b
|
|
86
88
|
} = T;
|
|
87
89
|
return /* @__PURE__ */ n(
|
|
88
90
|
"textarea",
|
|
89
91
|
{
|
|
90
|
-
ref:
|
|
91
|
-
rows:
|
|
92
|
-
className:
|
|
93
|
-
[
|
|
94
|
-
[
|
|
92
|
+
ref: K,
|
|
93
|
+
rows: t.rows ?? 3,
|
|
94
|
+
className: w(e.input, B, {
|
|
95
|
+
[e.disabled]: l,
|
|
96
|
+
[e.readOnly]: i,
|
|
97
|
+
[e[`input-text-align_${C}`]]: !!C
|
|
95
98
|
}),
|
|
96
|
-
disabled:
|
|
97
|
-
maxLength:
|
|
98
|
-
...
|
|
99
|
-
...
|
|
100
|
-
onChange:
|
|
99
|
+
disabled: l,
|
|
100
|
+
maxLength: t.maxLength,
|
|
101
|
+
...b,
|
|
102
|
+
...D ? { value: f } : { defaultValue: String(m ?? "") },
|
|
103
|
+
onChange: V,
|
|
104
|
+
tabIndex: i ? -1 : b.tabIndex,
|
|
105
|
+
onMouseDown: (L) => {
|
|
106
|
+
$(L), b.onMouseDown?.(L);
|
|
107
|
+
}
|
|
101
108
|
}
|
|
102
109
|
);
|
|
103
110
|
}
|
|
104
111
|
const {
|
|
105
|
-
onChange:
|
|
106
|
-
multiline:
|
|
107
|
-
...
|
|
112
|
+
onChange: r,
|
|
113
|
+
multiline: a,
|
|
114
|
+
...s
|
|
108
115
|
} = T;
|
|
109
116
|
return /* @__PURE__ */ n(
|
|
110
117
|
"input",
|
|
111
118
|
{
|
|
112
|
-
...
|
|
113
|
-
ref:
|
|
114
|
-
className:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
...s,
|
|
120
|
+
ref: J,
|
|
121
|
+
className: w(
|
|
122
|
+
e.input,
|
|
123
|
+
e[`input-text-size_${M}`],
|
|
124
|
+
B,
|
|
118
125
|
{
|
|
119
|
-
[
|
|
120
|
-
[
|
|
126
|
+
[e.disabled]: l,
|
|
127
|
+
[e.readOnly]: i,
|
|
128
|
+
[e[`input-text-align_${C}`]]: !!C
|
|
121
129
|
}
|
|
122
130
|
),
|
|
123
|
-
disabled:
|
|
124
|
-
type:
|
|
125
|
-
...
|
|
126
|
-
onChange:
|
|
131
|
+
disabled: l,
|
|
132
|
+
type: t.type ?? "text",
|
|
133
|
+
...D ? { value: f } : { defaultValue: String(m ?? "") },
|
|
134
|
+
onChange: V,
|
|
135
|
+
tabIndex: i ? -1 : s.tabIndex,
|
|
136
|
+
onMouseDown: (g) => {
|
|
137
|
+
$(g), s.onMouseDown?.(g);
|
|
138
|
+
}
|
|
127
139
|
}
|
|
128
140
|
);
|
|
129
|
-
},
|
|
130
|
-
return /* @__PURE__ */
|
|
131
|
-
typeof
|
|
132
|
-
|
|
141
|
+
}, X = ee(() => x === "white" ? e.primary : x === "gray" ? e.secondary : e[x], [x]);
|
|
142
|
+
return /* @__PURE__ */ N(u, { w: "full", gap: j.sm, className: A, children: [
|
|
143
|
+
typeof d == "string" ? /* @__PURE__ */ n(
|
|
144
|
+
y,
|
|
133
145
|
{
|
|
134
146
|
variant: "body-2",
|
|
135
147
|
fontWeight: "regular",
|
|
136
148
|
colorName: "tertiary",
|
|
137
|
-
className:
|
|
138
|
-
children:
|
|
149
|
+
className: H,
|
|
150
|
+
children: d
|
|
139
151
|
}
|
|
140
|
-
) :
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
|
|
152
|
+
) : d,
|
|
153
|
+
/* @__PURE__ */ N(
|
|
154
|
+
u,
|
|
143
155
|
{
|
|
144
156
|
row: !0,
|
|
145
|
-
alignItems:
|
|
157
|
+
alignItems: o ? "flex-start" : "center",
|
|
146
158
|
w: "full",
|
|
147
|
-
gap:
|
|
148
|
-
className:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
159
|
+
gap: j.md,
|
|
160
|
+
className: w(
|
|
161
|
+
e["input-container"],
|
|
162
|
+
X,
|
|
163
|
+
e[M],
|
|
152
164
|
{
|
|
153
|
-
[
|
|
154
|
-
[
|
|
155
|
-
[
|
|
165
|
+
[e.error]: I,
|
|
166
|
+
[e.disabled]: l,
|
|
167
|
+
[e.multiline]: o,
|
|
168
|
+
[e.readOnly]: i,
|
|
169
|
+
[e["container-hover"]]: !l && !i
|
|
156
170
|
},
|
|
157
|
-
|
|
171
|
+
P
|
|
158
172
|
),
|
|
159
173
|
children: [
|
|
160
|
-
|
|
161
|
-
/* @__PURE__ */ n(
|
|
162
|
-
|
|
163
|
-
_ && /* @__PURE__ */ n(
|
|
174
|
+
O && /* @__PURE__ */ n(u, { flex: "none", children: O }),
|
|
175
|
+
/* @__PURE__ */ n(u, { flex: "1", children: U() }),
|
|
176
|
+
W && f && !l && /* @__PURE__ */ n(u, { flex: "none", children: /* @__PURE__ */ n("span", { className: e["clear-button"], onClick: Q, children: /* @__PURE__ */ n(te, {}) }) }),
|
|
177
|
+
_ && /* @__PURE__ */ n(u, { flex: "none", children: _ })
|
|
164
178
|
]
|
|
165
179
|
}
|
|
166
180
|
),
|
|
167
|
-
(
|
|
168
|
-
typeof
|
|
169
|
-
|
|
181
|
+
(h || o) && /* @__PURE__ */ N(u, { row: !0, gap: 10, w: "full", children: [
|
|
182
|
+
typeof h == "string" ? /* @__PURE__ */ n(
|
|
183
|
+
y,
|
|
170
184
|
{
|
|
171
185
|
variant: "caption-1",
|
|
172
186
|
colorName: "tertiary",
|
|
173
|
-
className:
|
|
174
|
-
children:
|
|
187
|
+
className: q,
|
|
188
|
+
children: h
|
|
175
189
|
}
|
|
176
|
-
) :
|
|
177
|
-
|
|
178
|
-
|
|
190
|
+
) : h,
|
|
191
|
+
o && t.maxLength && /* @__PURE__ */ n(
|
|
192
|
+
y,
|
|
179
193
|
{
|
|
180
194
|
right: !0,
|
|
181
195
|
ml: "auto",
|
|
182
196
|
flex: "none",
|
|
183
197
|
variant: "caption-1",
|
|
184
198
|
colorName: "tertiary",
|
|
185
|
-
children: `${
|
|
199
|
+
children: `${f.length}/${t.maxLength}`
|
|
186
200
|
}
|
|
187
201
|
)
|
|
188
202
|
] }),
|
|
189
|
-
|
|
190
|
-
|
|
203
|
+
E && I && /* @__PURE__ */ n(
|
|
204
|
+
y,
|
|
191
205
|
{
|
|
192
206
|
variant: "body-2",
|
|
193
207
|
colorName: "negative",
|
|
194
208
|
fontWeight: "regular",
|
|
195
|
-
className:
|
|
196
|
-
children:
|
|
209
|
+
className: G,
|
|
210
|
+
children: E
|
|
197
211
|
}
|
|
198
212
|
)
|
|
199
213
|
] });
|
|
200
214
|
});
|
|
201
|
-
|
|
215
|
+
ae.displayName = "Input";
|
|
202
216
|
export {
|
|
203
|
-
|
|
217
|
+
ae as Input
|
|
204
218
|
};
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { css as r } from "@emotion/css";
|
|
2
|
-
import { typography as
|
|
3
|
-
import { theme as
|
|
4
|
-
const { color:
|
|
2
|
+
import { typography as t } from "../../../styles/utils/typography.js";
|
|
3
|
+
import { theme as i } from "../../../utils/theme/index.js";
|
|
4
|
+
const { color: o, spacing: e } = i, a = r({
|
|
5
5
|
opacity: 0.6,
|
|
6
6
|
cursor: "not-allowed"
|
|
7
|
-
}),
|
|
7
|
+
}), n = r({
|
|
8
|
+
cursor: "default",
|
|
9
|
+
"&:hover": {
|
|
10
|
+
cursor: "default"
|
|
11
|
+
}
|
|
12
|
+
}), l = r({
|
|
13
|
+
"&:hover": {
|
|
14
|
+
backgroundColor: o.fill.neutralPrimaryHover
|
|
15
|
+
}
|
|
16
|
+
}), g = {
|
|
8
17
|
"input-container": r({
|
|
9
|
-
backgroundColor:
|
|
10
|
-
border: `1px solid ${
|
|
11
|
-
padding: `${
|
|
18
|
+
backgroundColor: o.fill.accentSecondary,
|
|
19
|
+
border: `1px solid ${o.border.neutralAlphaBasic}`,
|
|
20
|
+
padding: `${e.md} ${e.lg}`,
|
|
12
21
|
borderRadius: 12,
|
|
13
22
|
minHeight: 40,
|
|
14
23
|
width: "100%",
|
|
@@ -16,62 +25,61 @@ const { color: t, spacing: o } = n, i = r({
|
|
|
16
25
|
"& textarea": {
|
|
17
26
|
resize: "none"
|
|
18
27
|
},
|
|
19
|
-
[`&:not(.${i}):hover`]: {
|
|
20
|
-
backgroundColor: t.fill.neutralPrimaryHover
|
|
21
|
-
},
|
|
22
28
|
"&:focus-within": {
|
|
23
|
-
borderColor:
|
|
24
|
-
|
|
25
|
-
borderColor:
|
|
29
|
+
borderColor: o.border.accentPrimary,
|
|
30
|
+
"&:hover": {
|
|
31
|
+
borderColor: o.border.accentPrimary
|
|
26
32
|
}
|
|
27
33
|
}
|
|
28
34
|
}),
|
|
29
35
|
input: r({
|
|
30
|
-
...
|
|
31
|
-
...
|
|
36
|
+
...t.common,
|
|
37
|
+
...t.body1,
|
|
32
38
|
background: "transparent",
|
|
33
39
|
width: "100%",
|
|
34
|
-
color:
|
|
40
|
+
color: o.text.primary,
|
|
35
41
|
"&::placeholder": {
|
|
36
|
-
color:
|
|
42
|
+
color: o.text.tertiary,
|
|
37
43
|
textOverflow: "ellipsis"
|
|
38
44
|
}
|
|
39
45
|
}),
|
|
40
|
-
"input-text-size_sm": r({ ...
|
|
41
|
-
"input-text-size_md": r({ ...
|
|
46
|
+
"input-text-size_sm": r({ ...t.body2 }),
|
|
47
|
+
"input-text-size_md": r({ ...t.body2 }),
|
|
42
48
|
"input-text-align_left": r({ textAlign: "left" }),
|
|
43
49
|
"input-text-align_center": r({ textAlign: "center" }),
|
|
44
50
|
"input-text-align_right": r({ textAlign: "right" }),
|
|
45
51
|
sm: r({
|
|
46
52
|
height: 40,
|
|
47
|
-
padding:
|
|
53
|
+
padding: e.md
|
|
48
54
|
}),
|
|
49
55
|
md: r({
|
|
50
56
|
height: 48,
|
|
51
|
-
padding: `14px ${
|
|
57
|
+
padding: `14px ${e.lg} 14px ${e.lg}`
|
|
52
58
|
}),
|
|
53
59
|
error: r({
|
|
54
|
-
borderColor:
|
|
60
|
+
borderColor: o.border.negativePrimary
|
|
55
61
|
}),
|
|
56
|
-
disabled:
|
|
62
|
+
disabled: a,
|
|
63
|
+
readOnly: n,
|
|
64
|
+
"container-hover": l,
|
|
57
65
|
multiline: r({
|
|
58
66
|
height: "auto"
|
|
59
67
|
}),
|
|
60
68
|
primary: r({
|
|
61
|
-
background:
|
|
69
|
+
background: o.fill.bgPrimary
|
|
62
70
|
}),
|
|
63
71
|
secondary: r({
|
|
64
|
-
background:
|
|
72
|
+
background: o.fill.bgSecondary
|
|
65
73
|
}),
|
|
66
74
|
"clear-button": r({
|
|
67
75
|
cursor: "pointer",
|
|
68
|
-
color:
|
|
76
|
+
color: o.text.tertiary,
|
|
69
77
|
height: 20,
|
|
70
78
|
"&:hover": {
|
|
71
|
-
color:
|
|
79
|
+
color: o.text.primary
|
|
72
80
|
}
|
|
73
81
|
})
|
|
74
82
|
};
|
|
75
83
|
export {
|
|
76
|
-
|
|
84
|
+
g as styles
|
|
77
85
|
};
|