@de-kit/st-ui 0.0.0-stage → 0.1.1
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 +73 -2
- package/dist/components/button/button.cjs +47 -0
- package/dist/components/button/button.cjs.map +1 -0
- package/dist/components/button/button.d.cts +21 -0
- package/dist/components/button/button.d.ts +21 -0
- package/dist/components/button/button.js +47 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/button.scss +93 -0
- package/dist/components/button/index.d.cts +2 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/checkbox/checkbox.cjs +27 -0
- package/dist/components/checkbox/checkbox.cjs.map +1 -0
- package/dist/components/checkbox/checkbox.d.cts +8 -0
- package/dist/components/checkbox/checkbox.d.ts +8 -0
- package/dist/components/checkbox/checkbox.js +27 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/checkbox/checkbox.scss +108 -0
- package/dist/components/checkbox/index.d.cts +2 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/input/index.d.cts +2 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/input.cjs +18 -0
- package/dist/components/input/input.cjs.map +1 -0
- package/dist/components/input/input.d.cts +7 -0
- package/dist/components/input/input.d.ts +7 -0
- package/dist/components/input/input.js +18 -0
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/input/input.scss +64 -0
- package/dist/components/radio/index.d.cts +2 -0
- package/dist/components/radio/index.d.ts +2 -0
- package/dist/components/radio/radio.cjs +27 -0
- package/dist/components/radio/radio.cjs.map +1 -0
- package/dist/components/radio/radio.d.cts +7 -0
- package/dist/components/radio/radio.d.ts +7 -0
- package/dist/components/radio/radio.js +27 -0
- package/dist/components/radio/radio.js.map +1 -0
- package/dist/components/radio/radio.scss +109 -0
- package/dist/components/spinner/index.d.cts +2 -0
- package/dist/components/spinner/index.d.ts +2 -0
- package/dist/components/spinner/spinner.cjs +54 -0
- package/dist/components/spinner/spinner.cjs.map +1 -0
- package/dist/components/spinner/spinner.d.cts +13 -0
- package/dist/components/spinner/spinner.d.ts +13 -0
- package/dist/components/spinner/spinner.js +54 -0
- package/dist/components/spinner/spinner.js.map +1 -0
- package/dist/components/spinner/spinner.scss +12 -0
- package/dist/components/textarea/index.d.cts +2 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/textarea.cjs +28 -0
- package/dist/components/textarea/textarea.cjs.map +1 -0
- package/dist/components/textarea/textarea.d.cts +9 -0
- package/dist/components/textarea/textarea.d.ts +9 -0
- package/dist/components/textarea/textarea.js +28 -0
- package/dist/components/textarea/textarea.js.map +1 -0
- package/dist/components/textarea/textarea.scss +58 -0
- package/dist/index.cjs +14 -0
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +8 -0
- package/dist/lib/cn.cjs +25 -0
- package/dist/lib/cn.cjs.map +1 -0
- package/dist/lib/cn.js +24 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/styles/global.scss +195 -0
- package/dist/styles/mixins.scss +186 -0
- package/dist/styles/vars.scss +36 -0
- package/package.json +91 -3
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.input {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
width: 100%;
|
|
6
|
+
padding: 9px 14px;
|
|
7
|
+
font-size: 14px;
|
|
8
|
+
line-height: 20px;
|
|
9
|
+
background-color: transparent;
|
|
10
|
+
color: var(--color-black);
|
|
11
|
+
border-radius: var(--radius-sm);
|
|
12
|
+
appearance: none;
|
|
13
|
+
font-family: var(--font-sans);
|
|
14
|
+
border: 1px solid var(--color-input);
|
|
15
|
+
outline: none;
|
|
16
|
+
transition:
|
|
17
|
+
background 0.3s,
|
|
18
|
+
border-color 0.3s,
|
|
19
|
+
box-shadow 0.2s;
|
|
20
|
+
|
|
21
|
+
&:-webkit-autofill,
|
|
22
|
+
&:-webkit-autofill:hover,
|
|
23
|
+
&:-webkit-autofill:focus,
|
|
24
|
+
&:-webkit-autofill:active {
|
|
25
|
+
-webkit-box-shadow: 0 0 0 30px white inset;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&[type='number']::-webkit-outer-spin-button,
|
|
29
|
+
&[type='number']::-webkit-inner-spin-button {
|
|
30
|
+
-webkit-appearance: none;
|
|
31
|
+
margin: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&[type='number'] {
|
|
35
|
+
-moz-appearance: textfield;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&[type='date'] {
|
|
39
|
+
height: 40px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&::-webkit-date-and-time-value {
|
|
43
|
+
text-align: left;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:focus {
|
|
47
|
+
border-color: var(--color-black);
|
|
48
|
+
box-shadow: 0 0 0 1px var(--color-black);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:disabled {
|
|
52
|
+
background-color: var(--color-neutral-200);
|
|
53
|
+
color: var(--color-neutral-500);
|
|
54
|
+
fill: var(--color-neutral-500);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&--recommended {
|
|
58
|
+
background-color: color-mix(in srgb, var(--color-yellow) 10%, transparent);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&--error {
|
|
62
|
+
border-color: color-mix(in srgb, var(--color-red) 50%, transparent);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const require_cn = require("../../lib/cn.cjs");
|
|
2
|
+
let react = require("react");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
require("./radio.scss");
|
|
5
|
+
// src/components/radio/radio.tsx
|
|
6
|
+
const RadioInput = (0, react.forwardRef)(function RadioInput({ id, className, title, error, disabled, ...props }, ref) {
|
|
7
|
+
const autoId = (0, react.useId)();
|
|
8
|
+
const inputId = id ?? autoId;
|
|
9
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
10
|
+
className: require_cn.cn("radio", className, require_cn.when(error, "radio--error")),
|
|
11
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
12
|
+
ref,
|
|
13
|
+
type: "radio",
|
|
14
|
+
id: inputId,
|
|
15
|
+
disabled,
|
|
16
|
+
className: "radio__input",
|
|
17
|
+
...props
|
|
18
|
+
}), title ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
19
|
+
className: "radio__label",
|
|
20
|
+
htmlFor: inputId,
|
|
21
|
+
children: title
|
|
22
|
+
}) : null]
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
exports.RadioInput = RadioInput;
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=radio.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio.cjs","names":["forwardRef","useId","cn","when"],"sources":["../../../src/components/radio/radio.tsx"],"sourcesContent":["import { forwardRef, useId, type InputHTMLAttributes } from 'react';\n\nimport { cn, when } from '../../lib/cn';\nimport './radio.scss';\n\nexport interface RadioInputProps extends InputHTMLAttributes<HTMLInputElement> {\n title?: string;\n error?: boolean;\n}\n\nexport const RadioInput = forwardRef<HTMLInputElement, RadioInputProps>(\n function RadioInput(\n { id, className, title, error, disabled, ...props },\n ref,\n ) {\n const autoId = useId();\n const inputId = id ?? autoId;\n\n return (\n <div className={cn('radio', className, when(error, 'radio--error'))}>\n <input\n ref={ref}\n type=\"radio\"\n id={inputId}\n disabled={disabled}\n className=\"radio__input\"\n {...props}\n />\n {title ? (\n <label className=\"radio__label\" htmlFor={inputId}>\n {title}\n </label>\n ) : null}\n </div>\n );\n },\n);\n"],"mappings":";;;;;AAUA,MAAa,cAAA,GAAaA,MAAAA,WAAAA,CACxB,SAAS,WACP,EAAE,IAAI,WAAW,OAAO,OAAO,UAAU,GAAG,SAC5C,KACA;CACA,MAAM,UAAA,GAASC,MAAAA,MAAAA,CAAM;CACrB,MAAM,UAAU,MAAM;CAEtB,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAWC,WAAAA,GAAG,SAAS,WAAWC,WAAAA,KAAK,OAAO,cAAc,CAAC;EAAlE,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD;GACO;GACL,MAAK;GACL,IAAI;GACM;GACV,WAAU;GACV,GAAI;EACL,CAAA,GACA,QACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD;GAAO,WAAU;GAAe,SAAS;GACtC,UAAA;EACI,CAAA,IACL,IACD;;AAET,CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from "react";
|
|
2
|
+
export interface RadioInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
title?: string;
|
|
4
|
+
error?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const RadioInput: import("react").ForwardRefExoticComponent<RadioInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
7
|
+
//# sourceMappingURL=radio.d.cts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from "react";
|
|
2
|
+
export interface RadioInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
title?: string;
|
|
4
|
+
error?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const RadioInput: import("react").ForwardRefExoticComponent<RadioInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
7
|
+
//# sourceMappingURL=radio.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { cn, when } from "../../lib/cn.js";
|
|
2
|
+
import { forwardRef, useId } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import "./radio.scss";
|
|
5
|
+
// src/components/radio/radio.tsx
|
|
6
|
+
const RadioInput = forwardRef(function RadioInput({ id, className, title, error, disabled, ...props }, ref) {
|
|
7
|
+
const autoId = useId();
|
|
8
|
+
const inputId = id ?? autoId;
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
+
className: cn("radio", className, when(error, "radio--error")),
|
|
11
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
12
|
+
ref,
|
|
13
|
+
type: "radio",
|
|
14
|
+
id: inputId,
|
|
15
|
+
disabled,
|
|
16
|
+
className: "radio__input",
|
|
17
|
+
...props
|
|
18
|
+
}), title ? /* @__PURE__ */ jsx("label", {
|
|
19
|
+
className: "radio__label",
|
|
20
|
+
htmlFor: inputId,
|
|
21
|
+
children: title
|
|
22
|
+
}) : null]
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
export { RadioInput };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=radio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio.js","names":[],"sources":["../../../src/components/radio/radio.tsx"],"sourcesContent":["import { forwardRef, useId, type InputHTMLAttributes } from 'react';\n\nimport { cn, when } from '../../lib/cn';\nimport './radio.scss';\n\nexport interface RadioInputProps extends InputHTMLAttributes<HTMLInputElement> {\n title?: string;\n error?: boolean;\n}\n\nexport const RadioInput = forwardRef<HTMLInputElement, RadioInputProps>(\n function RadioInput(\n { id, className, title, error, disabled, ...props },\n ref,\n ) {\n const autoId = useId();\n const inputId = id ?? autoId;\n\n return (\n <div className={cn('radio', className, when(error, 'radio--error'))}>\n <input\n ref={ref}\n type=\"radio\"\n id={inputId}\n disabled={disabled}\n className=\"radio__input\"\n {...props}\n />\n {title ? (\n <label className=\"radio__label\" htmlFor={inputId}>\n {title}\n </label>\n ) : null}\n </div>\n );\n },\n);\n"],"mappings":";;;;;AAUA,MAAa,aAAa,WACxB,SAAS,WACP,EAAE,IAAI,WAAW,OAAO,OAAO,UAAU,GAAG,SAC5C,KACA;CACA,MAAM,SAAS,MAAM;CACrB,MAAM,UAAU,MAAM;CAEtB,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,SAAS,WAAW,KAAK,OAAO,cAAc,CAAC;EAAlE,UAAA,CACE,oBAAC,SAAD;GACO;GACL,MAAK;GACL,IAAI;GACM;GACV,WAAU;GACV,GAAI;EACL,CAAA,GACA,QACC,oBAAC,SAAD;GAAO,WAAU;GAAe,SAAS;GACtC,UAAA;EACI,CAAA,IACL,IACD;;AAET,CACF"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
.radio__label {
|
|
2
|
+
font-size: 14px;
|
|
3
|
+
line-height: 20px;
|
|
4
|
+
display: inline-block;
|
|
5
|
+
vertical-align: top;
|
|
6
|
+
padding-left: 5px;
|
|
7
|
+
user-select: none;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.radio__input {
|
|
12
|
+
--active: #000;
|
|
13
|
+
--active-inner: #fff;
|
|
14
|
+
--border: #e5e5e5;
|
|
15
|
+
--border-hover: #000;
|
|
16
|
+
--background: #fff;
|
|
17
|
+
--disabled: #e5e5e5;
|
|
18
|
+
--disabled-inner: #e5e5e5;
|
|
19
|
+
--disabled-after-inner: #727272;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
appearance: none;
|
|
22
|
+
width: 19px;
|
|
23
|
+
height: 19px;
|
|
24
|
+
outline: none;
|
|
25
|
+
display: inline-block;
|
|
26
|
+
vertical-align: top;
|
|
27
|
+
position: relative;
|
|
28
|
+
margin: 0;
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
border: 1px solid var(--bc, var(--border));
|
|
32
|
+
background: var(--b, var(--background));
|
|
33
|
+
border-radius: 50%;
|
|
34
|
+
transition:
|
|
35
|
+
background 0.3s,
|
|
36
|
+
border-color 0.3s,
|
|
37
|
+
box-shadow 0.2s;
|
|
38
|
+
|
|
39
|
+
&::after {
|
|
40
|
+
content: '';
|
|
41
|
+
display: block;
|
|
42
|
+
width: 6px;
|
|
43
|
+
height: 6px;
|
|
44
|
+
left: 50%;
|
|
45
|
+
top: 50%;
|
|
46
|
+
border-radius: 50%;
|
|
47
|
+
background: var(--active-inner);
|
|
48
|
+
position: absolute;
|
|
49
|
+
opacity: var(--o, 0);
|
|
50
|
+
transform: translate(-50%, -50%);
|
|
51
|
+
transition:
|
|
52
|
+
transform var(--d-t, 0.3s) var(--d-t-e, ease),
|
|
53
|
+
opacity var(--d-o, 0.2s);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:checked {
|
|
57
|
+
--b: var(--active);
|
|
58
|
+
--bc: var(--active);
|
|
59
|
+
--o: 1;
|
|
60
|
+
--d-o: 0.3s;
|
|
61
|
+
--d-t: 0.6s;
|
|
62
|
+
--d-t-e: cubic-bezier(0.2, 0.85, 0.32, 1.2);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:hover:not(:checked):not(:disabled) {
|
|
66
|
+
border-width: 2px;
|
|
67
|
+
--bc: var(--active);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:hover:not(:disabled) {
|
|
71
|
+
border-color: var(--border-hover);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:focus {
|
|
75
|
+
border: 1px solid var(--border-hover);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:disabled {
|
|
79
|
+
--b: var(--disabled);
|
|
80
|
+
cursor: not-allowed;
|
|
81
|
+
opacity: 1;
|
|
82
|
+
|
|
83
|
+
&:checked {
|
|
84
|
+
--b: var(--disabled-inner);
|
|
85
|
+
--bc: var(--border);
|
|
86
|
+
|
|
87
|
+
&::after {
|
|
88
|
+
background: var(--disabled-after-inner);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
& + .radio__label {
|
|
93
|
+
color: var(--color-gray);
|
|
94
|
+
cursor: not-allowed;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Модификатор ошибки после .radio__input: иначе shorthand border затрёт border-color.
|
|
100
|
+
.radio {
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: flex-start;
|
|
103
|
+
|
|
104
|
+
&--error {
|
|
105
|
+
.radio__input {
|
|
106
|
+
border-color: color-mix(in srgb, var(--color-red) 50%, transparent);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const require_cn = require("../../lib/cn.cjs");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
require("./spinner.scss");
|
|
4
|
+
// src/components/spinner/spinner.tsx
|
|
5
|
+
const spinnerPosition = {
|
|
6
|
+
top: "top",
|
|
7
|
+
center: "center"
|
|
8
|
+
};
|
|
9
|
+
const dotDelays = [
|
|
10
|
+
"0s",
|
|
11
|
+
"0.125s",
|
|
12
|
+
"0.25s",
|
|
13
|
+
"0.375s",
|
|
14
|
+
"0.5s",
|
|
15
|
+
"0.625s",
|
|
16
|
+
"0.75s",
|
|
17
|
+
"0.875s"
|
|
18
|
+
];
|
|
19
|
+
const Dot = ({ begin, rotate }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
20
|
+
transform: `rotate(${rotate} 16 16)`,
|
|
21
|
+
cx: "16",
|
|
22
|
+
cy: "3",
|
|
23
|
+
r: "0",
|
|
24
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
|
|
25
|
+
attributeName: "r",
|
|
26
|
+
values: "0;3;0;0",
|
|
27
|
+
dur: "1s",
|
|
28
|
+
repeatCount: "indefinite",
|
|
29
|
+
begin,
|
|
30
|
+
keySplines: "0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",
|
|
31
|
+
calcMode: "spline"
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
const svgProps = {
|
|
35
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
36
|
+
"viewBox": "0 0 32 32",
|
|
37
|
+
"width": 64,
|
|
38
|
+
"height": 64,
|
|
39
|
+
"fill": "#ecebeb",
|
|
40
|
+
"aria-hidden": true
|
|
41
|
+
};
|
|
42
|
+
const Spinner = ({ className, position = spinnerPosition.center }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
43
|
+
className: require_cn.cn("spinner", className, require_cn.when(position === spinnerPosition.top, "spinner--top")),
|
|
44
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
45
|
+
...svgProps,
|
|
46
|
+
children: dotDelays.map((begin, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Dot, {
|
|
47
|
+
begin,
|
|
48
|
+
rotate: index * 45
|
|
49
|
+
}, begin))
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
exports.Spinner = Spinner;
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=spinner.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.cjs","names":["cn","when"],"sources":["../../../src/components/spinner/spinner.tsx"],"sourcesContent":["import type { FC, SVGProps } from 'react';\n\nimport { cn, when } from '../../lib/cn';\nimport './spinner.scss';\n\nconst spinnerPosition = {\n top: 'top',\n center: 'center',\n} as const;\n\nexport type SpinnerPosition =\n (typeof spinnerPosition)[keyof typeof spinnerPosition];\n\nexport interface SpinnerProps {\n className?: string;\n position?: SpinnerPosition;\n}\n\nconst dotDelays = [\n '0s',\n '0.125s',\n '0.25s',\n '0.375s',\n '0.5s',\n '0.625s',\n '0.75s',\n '0.875s',\n] as const;\n\nconst Dot = ({ begin, rotate }: { begin: string; rotate: number }) => (\n <circle transform={`rotate(${rotate} 16 16)`} cx=\"16\" cy=\"3\" r=\"0\">\n <animate\n attributeName=\"r\"\n values=\"0;3;0;0\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n begin={begin}\n keySplines=\"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8\"\n calcMode=\"spline\"\n />\n </circle>\n);\n\nconst svgProps: SVGProps<SVGSVGElement> = {\n 'xmlns': 'http://www.w3.org/2000/svg',\n 'viewBox': '0 0 32 32',\n 'width': 64,\n 'height': 64,\n 'fill': '#ecebeb',\n 'aria-hidden': true,\n};\n\nexport const Spinner: FC<SpinnerProps> = ({\n className,\n position = spinnerPosition.center,\n}) => (\n <div\n className={cn(\n 'spinner',\n className,\n when(position === spinnerPosition.top, 'spinner--top'),\n )}\n >\n <svg {...svgProps}>\n {dotDelays.map((begin, index) => (\n <Dot key={begin} begin={begin} rotate={index * 45} />\n ))}\n </svg>\n </div>\n);\n"],"mappings":";;;;AAKA,MAAM,kBAAkB;CACtB,KAAK;CACL,QAAQ;AACV;AAUA,MAAM,YAAY;CAChB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,OAAO,EAAE,OAAO,aACpB,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;CAAQ,WAAW,UAAU,OAAO;CAAU,IAAG;CAAK,IAAG;CAAI,GAAE;CAC7D,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EACE,eAAc;EACd,QAAO;EACP,KAAI;EACJ,aAAY;EACL;EACP,YAAW;EACX,UAAS;CACV,CAAA;AACK,CAAA;AAGV,MAAM,WAAoC;CACxC,SAAS;CACT,WAAW;CACX,SAAS;CACT,UAAU;CACV,QAAQ;CACR,eAAe;AACjB;AAEA,MAAa,WAA6B,EACxC,WACA,WAAW,gBAAgB,aAE3B,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;CACE,WAAWA,WAAAA,GACT,WACA,WACAC,WAAAA,KAAK,aAAa,gBAAgB,KAAK,cAAc,CACvD;CAEA,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,GAAI;EACN,UAAA,UAAU,KAAK,OAAO,UACrB,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;GAAwB;GAAO,QAAQ,QAAQ;EAAK,GAA1C,KAA0C,CACrD;CACE,CAAA;AACF,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
declare const spinnerPosition: {
|
|
3
|
+
readonly top: "top";
|
|
4
|
+
readonly center: "center";
|
|
5
|
+
};
|
|
6
|
+
export type SpinnerPosition = (typeof spinnerPosition)[keyof typeof spinnerPosition];
|
|
7
|
+
export interface SpinnerProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
position?: SpinnerPosition;
|
|
10
|
+
}
|
|
11
|
+
export declare const Spinner: FC<SpinnerProps>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=spinner.d.cts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
declare const spinnerPosition: {
|
|
3
|
+
readonly top: "top";
|
|
4
|
+
readonly center: "center";
|
|
5
|
+
};
|
|
6
|
+
export type SpinnerPosition = (typeof spinnerPosition)[keyof typeof spinnerPosition];
|
|
7
|
+
export interface SpinnerProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
position?: SpinnerPosition;
|
|
10
|
+
}
|
|
11
|
+
export declare const Spinner: FC<SpinnerProps>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { cn, when } from "../../lib/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import "./spinner.scss";
|
|
4
|
+
// src/components/spinner/spinner.tsx
|
|
5
|
+
const spinnerPosition = {
|
|
6
|
+
top: "top",
|
|
7
|
+
center: "center"
|
|
8
|
+
};
|
|
9
|
+
const dotDelays = [
|
|
10
|
+
"0s",
|
|
11
|
+
"0.125s",
|
|
12
|
+
"0.25s",
|
|
13
|
+
"0.375s",
|
|
14
|
+
"0.5s",
|
|
15
|
+
"0.625s",
|
|
16
|
+
"0.75s",
|
|
17
|
+
"0.875s"
|
|
18
|
+
];
|
|
19
|
+
const Dot = ({ begin, rotate }) => /* @__PURE__ */ jsx("circle", {
|
|
20
|
+
transform: `rotate(${rotate} 16 16)`,
|
|
21
|
+
cx: "16",
|
|
22
|
+
cy: "3",
|
|
23
|
+
r: "0",
|
|
24
|
+
children: /* @__PURE__ */ jsx("animate", {
|
|
25
|
+
attributeName: "r",
|
|
26
|
+
values: "0;3;0;0",
|
|
27
|
+
dur: "1s",
|
|
28
|
+
repeatCount: "indefinite",
|
|
29
|
+
begin,
|
|
30
|
+
keySplines: "0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",
|
|
31
|
+
calcMode: "spline"
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
const svgProps = {
|
|
35
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
36
|
+
"viewBox": "0 0 32 32",
|
|
37
|
+
"width": 64,
|
|
38
|
+
"height": 64,
|
|
39
|
+
"fill": "#ecebeb",
|
|
40
|
+
"aria-hidden": true
|
|
41
|
+
};
|
|
42
|
+
const Spinner = ({ className, position = spinnerPosition.center }) => /* @__PURE__ */ jsx("div", {
|
|
43
|
+
className: cn("spinner", className, when(position === spinnerPosition.top, "spinner--top")),
|
|
44
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
45
|
+
...svgProps,
|
|
46
|
+
children: dotDelays.map((begin, index) => /* @__PURE__ */ jsx(Dot, {
|
|
47
|
+
begin,
|
|
48
|
+
rotate: index * 45
|
|
49
|
+
}, begin))
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
export { Spinner };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.js","names":[],"sources":["../../../src/components/spinner/spinner.tsx"],"sourcesContent":["import type { FC, SVGProps } from 'react';\n\nimport { cn, when } from '../../lib/cn';\nimport './spinner.scss';\n\nconst spinnerPosition = {\n top: 'top',\n center: 'center',\n} as const;\n\nexport type SpinnerPosition =\n (typeof spinnerPosition)[keyof typeof spinnerPosition];\n\nexport interface SpinnerProps {\n className?: string;\n position?: SpinnerPosition;\n}\n\nconst dotDelays = [\n '0s',\n '0.125s',\n '0.25s',\n '0.375s',\n '0.5s',\n '0.625s',\n '0.75s',\n '0.875s',\n] as const;\n\nconst Dot = ({ begin, rotate }: { begin: string; rotate: number }) => (\n <circle transform={`rotate(${rotate} 16 16)`} cx=\"16\" cy=\"3\" r=\"0\">\n <animate\n attributeName=\"r\"\n values=\"0;3;0;0\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n begin={begin}\n keySplines=\"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8\"\n calcMode=\"spline\"\n />\n </circle>\n);\n\nconst svgProps: SVGProps<SVGSVGElement> = {\n 'xmlns': 'http://www.w3.org/2000/svg',\n 'viewBox': '0 0 32 32',\n 'width': 64,\n 'height': 64,\n 'fill': '#ecebeb',\n 'aria-hidden': true,\n};\n\nexport const Spinner: FC<SpinnerProps> = ({\n className,\n position = spinnerPosition.center,\n}) => (\n <div\n className={cn(\n 'spinner',\n className,\n when(position === spinnerPosition.top, 'spinner--top'),\n )}\n >\n <svg {...svgProps}>\n {dotDelays.map((begin, index) => (\n <Dot key={begin} begin={begin} rotate={index * 45} />\n ))}\n </svg>\n </div>\n);\n"],"mappings":";;;;AAKA,MAAM,kBAAkB;CACtB,KAAK;CACL,QAAQ;AACV;AAUA,MAAM,YAAY;CAChB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,OAAO,EAAE,OAAO,aACpB,oBAAC,UAAD;CAAQ,WAAW,UAAU,OAAO;CAAU,IAAG;CAAK,IAAG;CAAI,GAAE;CAC7D,UAAA,oBAAC,WAAD;EACE,eAAc;EACd,QAAO;EACP,KAAI;EACJ,aAAY;EACL;EACP,YAAW;EACX,UAAS;CACV,CAAA;AACK,CAAA;AAGV,MAAM,WAAoC;CACxC,SAAS;CACT,WAAW;CACX,SAAS;CACT,UAAU;CACV,QAAQ;CACR,eAAe;AACjB;AAEA,MAAa,WAA6B,EACxC,WACA,WAAW,gBAAgB,aAE3B,oBAAC,OAAD;CACE,WAAW,GACT,WACA,WACA,KAAK,aAAa,gBAAgB,KAAK,cAAc,CACvD;CAEA,UAAA,oBAAC,OAAD;EAAK,GAAI;EACN,UAAA,UAAU,KAAK,OAAO,UACrB,oBAAC,KAAD;GAAwB;GAAO,QAAQ,QAAQ;EAAK,GAA1C,KAA0C,CACrD;CACE,CAAA;AACF,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const require_cn = require("../../lib/cn.cjs");
|
|
2
|
+
let react = require("react");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
require("./textarea.scss");
|
|
5
|
+
// src/components/textarea/textarea.tsx
|
|
6
|
+
const TextArea = (0, react.forwardRef)(function TextArea({ maxLength, value = "", recommended, error, hideCounter = false, className, ...props }, ref) {
|
|
7
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8
|
+
className: "textarea__wrap",
|
|
9
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
10
|
+
ref,
|
|
11
|
+
className: require_cn.cn("textarea", className, require_cn.when(recommended, "textarea--recommended"), require_cn.when(error, "textarea--error")),
|
|
12
|
+
value,
|
|
13
|
+
maxLength,
|
|
14
|
+
"aria-invalid": error || void 0,
|
|
15
|
+
...props
|
|
16
|
+
}), maxLength && !hideCounter ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
17
|
+
className: "textarea__counter",
|
|
18
|
+
children: [
|
|
19
|
+
"Максимум ",
|
|
20
|
+
maxLength,
|
|
21
|
+
" символов"
|
|
22
|
+
]
|
|
23
|
+
}) : null]
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
exports.TextArea = TextArea;
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=textarea.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.cjs","names":["forwardRef","cn","when"],"sources":["../../../src/components/textarea/textarea.tsx"],"sourcesContent":["import { forwardRef, type TextareaHTMLAttributes } from 'react';\n\nimport { cn, when } from '../../lib/cn';\nimport './textarea.scss';\n\nexport interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {\n recommended?: boolean;\n error?: boolean;\n /** В приложении проп называется `noMaxMoty`. */\n hideCounter?: boolean;\n}\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n maxLength,\n value = '',\n recommended,\n error,\n hideCounter = false,\n className,\n ...props\n },\n ref,\n ) {\n return (\n <div className=\"textarea__wrap\">\n <textarea\n ref={ref}\n className={cn(\n 'textarea',\n className,\n when(recommended, 'textarea--recommended'),\n when(error, 'textarea--error'),\n )}\n value={value}\n maxLength={maxLength}\n aria-invalid={error || undefined}\n {...props}\n />\n {maxLength && !hideCounter ? (\n <span className=\"textarea__counter\">\n Максимум {maxLength} символов\n </span>\n ) : null}\n </div>\n );\n },\n);\n"],"mappings":";;;;;AAYA,MAAa,YAAA,GAAWA,MAAAA,WAAAA,CACtB,SAAS,SACP,EACE,WACA,QAAQ,IACR,aACA,OACA,cAAc,OACd,WACA,GAAG,SAEL,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAD;GACO;GACL,WAAWC,WAAAA,GACT,YACA,WACAC,WAAAA,KAAK,aAAa,uBAAuB,GACzCA,WAAAA,KAAK,OAAO,iBAAiB,CAC/B;GACO;GACI;GACX,gBAAc,SAAS,KAAA;GACvB,GAAI;EACL,CAAA,GACA,aAAa,CAAC,cACb,iBAAA,GAAA,kBAAA,KAAA,CAAC,QAAD;GAAM,WAAU;GAAhB,UAAA;IAAoC;IACxB;IAAU;GAChB;EACJ,CAAA,IAAA,IACD;;AAET,CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TextareaHTMLAttributes } from "react";
|
|
2
|
+
export interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
recommended?: boolean;
|
|
4
|
+
error?: boolean;
|
|
5
|
+
/** В приложении проп называется `noMaxMoty`. */
|
|
6
|
+
hideCounter?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
9
|
+
//# sourceMappingURL=textarea.d.cts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TextareaHTMLAttributes } from "react";
|
|
2
|
+
export interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
recommended?: boolean;
|
|
4
|
+
error?: boolean;
|
|
5
|
+
/** В приложении проп называется `noMaxMoty`. */
|
|
6
|
+
hideCounter?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
9
|
+
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { cn, when } from "../../lib/cn.js";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import "./textarea.scss";
|
|
5
|
+
// src/components/textarea/textarea.tsx
|
|
6
|
+
const TextArea = forwardRef(function TextArea({ maxLength, value = "", recommended, error, hideCounter = false, className, ...props }, ref) {
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
8
|
+
className: "textarea__wrap",
|
|
9
|
+
children: [/* @__PURE__ */ jsx("textarea", {
|
|
10
|
+
ref,
|
|
11
|
+
className: cn("textarea", className, when(recommended, "textarea--recommended"), when(error, "textarea--error")),
|
|
12
|
+
value,
|
|
13
|
+
maxLength,
|
|
14
|
+
"aria-invalid": error || void 0,
|
|
15
|
+
...props
|
|
16
|
+
}), maxLength && !hideCounter ? /* @__PURE__ */ jsxs("span", {
|
|
17
|
+
className: "textarea__counter",
|
|
18
|
+
children: [
|
|
19
|
+
"Максимум ",
|
|
20
|
+
maxLength,
|
|
21
|
+
" символов"
|
|
22
|
+
]
|
|
23
|
+
}) : null]
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
export { TextArea };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.js","names":[],"sources":["../../../src/components/textarea/textarea.tsx"],"sourcesContent":["import { forwardRef, type TextareaHTMLAttributes } from 'react';\n\nimport { cn, when } from '../../lib/cn';\nimport './textarea.scss';\n\nexport interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {\n recommended?: boolean;\n error?: boolean;\n /** В приложении проп называется `noMaxMoty`. */\n hideCounter?: boolean;\n}\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n maxLength,\n value = '',\n recommended,\n error,\n hideCounter = false,\n className,\n ...props\n },\n ref,\n ) {\n return (\n <div className=\"textarea__wrap\">\n <textarea\n ref={ref}\n className={cn(\n 'textarea',\n className,\n when(recommended, 'textarea--recommended'),\n when(error, 'textarea--error'),\n )}\n value={value}\n maxLength={maxLength}\n aria-invalid={error || undefined}\n {...props}\n />\n {maxLength && !hideCounter ? (\n <span className=\"textarea__counter\">\n Максимум {maxLength} символов\n </span>\n ) : null}\n </div>\n );\n },\n);\n"],"mappings":";;;;;AAYA,MAAa,WAAW,WACtB,SAAS,SACP,EACE,WACA,QAAQ,IACR,aACA,OACA,cAAc,OACd,WACA,GAAG,SAEL,KACA;CACA,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,YAAD;GACO;GACL,WAAW,GACT,YACA,WACA,KAAK,aAAa,uBAAuB,GACzC,KAAK,OAAO,iBAAiB,CAC/B;GACO;GACI;GACX,gBAAc,SAAS,KAAA;GACvB,GAAI;EACL,CAAA,GACA,aAAa,CAAC,cACb,qBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA;IAAoC;IACxB;IAAU;GAChB;EACJ,CAAA,IAAA,IACD;;AAET,CACF"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.textarea__wrap {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.textarea {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
width: 100%;
|
|
8
|
+
min-height: 160px;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
padding: 10px 15px;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
line-height: 20px;
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
color: var(--color-black);
|
|
16
|
+
border-radius: var(--radius-sm);
|
|
17
|
+
resize: none;
|
|
18
|
+
font-family: var(--font-sans);
|
|
19
|
+
border: 1px solid var(--color-input);
|
|
20
|
+
outline: 1px solid transparent;
|
|
21
|
+
transition:
|
|
22
|
+
background 0.3s,
|
|
23
|
+
border-color 0.3s,
|
|
24
|
+
box-shadow 0.2s;
|
|
25
|
+
|
|
26
|
+
&:focus {
|
|
27
|
+
border-color: var(--color-black);
|
|
28
|
+
outline: 1px solid var(--color-black);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:disabled {
|
|
32
|
+
background-color: var(--color-neutral-200);
|
|
33
|
+
border-color: var(--color-neutral-200);
|
|
34
|
+
color: color-mix(in srgb, var(--color-black) 50%, transparent);
|
|
35
|
+
fill: var(--color-neutral-500);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (min-width: 680px) {
|
|
39
|
+
min-height: 80px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&--recommended {
|
|
43
|
+
background-color: color-mix(in srgb, var(--color-yellow) 10%, transparent);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&--error {
|
|
47
|
+
border-color: color-mix(in srgb, var(--color-red) 50%, transparent);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.textarea__counter {
|
|
52
|
+
display: block;
|
|
53
|
+
margin-top: 5px;
|
|
54
|
+
font-size: 11px;
|
|
55
|
+
line-height: 20px;
|
|
56
|
+
color: color-mix(in srgb, var(--color-black) 50%, transparent);
|
|
57
|
+
text-align: left;
|
|
58
|
+
}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_button = require("./components/button/button.cjs");
|
|
3
|
+
const require_checkbox = require("./components/checkbox/checkbox.cjs");
|
|
4
|
+
const require_input = require("./components/input/input.cjs");
|
|
5
|
+
const require_radio = require("./components/radio/radio.cjs");
|
|
6
|
+
const require_spinner = require("./components/spinner/spinner.cjs");
|
|
7
|
+
const require_textarea = require("./components/textarea/textarea.cjs");
|
|
8
|
+
require("./styles/vars.scss");
|
|
9
|
+
exports.Button = require_button.Button;
|
|
10
|
+
exports.CheckboxInput = require_checkbox.CheckboxInput;
|
|
11
|
+
exports.Input = require_input.Input;
|
|
12
|
+
exports.RadioInput = require_radio.RadioInput;
|
|
13
|
+
exports.Spinner = require_spinner.Spinner;
|
|
14
|
+
exports.TextArea = require_textarea.TextArea;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Button, ButtonComponentProps, ButtonLinkProps, ButtonProps } from "./components/button/button.cjs";
|
|
2
|
+
import "./components/button/index.cjs";
|
|
3
|
+
import { CheckboxInput, CheckboxInputProps } from "./components/checkbox/checkbox.cjs";
|
|
4
|
+
import "./components/checkbox/index.cjs";
|
|
5
|
+
import { Input, InputProps } from "./components/input/input.cjs";
|
|
6
|
+
import "./components/input/index.cjs";
|
|
7
|
+
import { RadioInput, RadioInputProps } from "./components/radio/radio.cjs";
|
|
8
|
+
import "./components/radio/index.cjs";
|
|
9
|
+
import { Spinner, SpinnerPosition, SpinnerProps } from "./components/spinner/spinner.cjs";
|
|
10
|
+
import "./components/spinner/index.cjs";
|
|
11
|
+
import { TextArea, TextAreaProps } from "./components/textarea/textarea.cjs";
|
|
12
|
+
import "./components/textarea/index.cjs";
|
|
13
|
+
export { Button, type ButtonComponentProps, type ButtonLinkProps, type ButtonProps, CheckboxInput, type CheckboxInputProps, Input, type InputProps, RadioInput, type RadioInputProps, Spinner, type SpinnerPosition, type SpinnerProps, TextArea, type TextAreaProps };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Button, ButtonComponentProps, ButtonLinkProps, ButtonProps } from "./components/button/button.js";
|
|
2
|
+
import "./components/button/index.js";
|
|
3
|
+
import { CheckboxInput, CheckboxInputProps } from "./components/checkbox/checkbox.js";
|
|
4
|
+
import "./components/checkbox/index.js";
|
|
5
|
+
import { Input, InputProps } from "./components/input/input.js";
|
|
6
|
+
import "./components/input/index.js";
|
|
7
|
+
import { RadioInput, RadioInputProps } from "./components/radio/radio.js";
|
|
8
|
+
import "./components/radio/index.js";
|
|
9
|
+
import { Spinner, SpinnerPosition, SpinnerProps } from "./components/spinner/spinner.js";
|
|
10
|
+
import "./components/spinner/index.js";
|
|
11
|
+
import { TextArea, TextAreaProps } from "./components/textarea/textarea.js";
|
|
12
|
+
import "./components/textarea/index.js";
|
|
13
|
+
export { Button, type ButtonComponentProps, type ButtonLinkProps, type ButtonProps, CheckboxInput, type CheckboxInputProps, Input, type InputProps, RadioInput, type RadioInputProps, Spinner, type SpinnerPosition, type SpinnerProps, TextArea, type TextAreaProps };
|