@dgshahr/ui-kit 0.0.6 → 0.0.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/Accordion/index.cjs +1 -11
- package/dist/Accordion/index.js +5 -1
- package/dist/AccordionItem-eMnIUJ1V.cjs +1 -0
- package/dist/AccordionItem-tKSPLNKs.js +91 -0
- package/dist/Alert/index.cjs +1 -254
- package/dist/Alert/index.js +108 -123
- package/dist/ArrowLeft2-B76dkC-C.cjs +1 -0
- package/dist/{ArrowLeft2-BURhvXT2.js → ArrowLeft2-jP2w1vwt.js} +7 -7
- package/dist/ArrowRight2-CYowPzS8.cjs +1 -0
- package/dist/{ArrowRight2-DCxJPvNC.js → ArrowRight2-CcHdxGRE.js} +7 -7
- package/dist/Badge/index.cjs +1 -72
- package/dist/Badge/index.js +28 -34
- package/dist/Breadcrumb/index.cjs +1 -43
- package/dist/Breadcrumb/index.js +20 -20
- package/dist/Button/index.cjs +1 -119
- package/dist/Button/index.js +71 -78
- package/dist/Divider/index.cjs +1 -25
- package/dist/Divider/index.js +8 -12
- package/dist/Form/Checkbox/index.cjs +1 -72
- package/dist/Form/Checkbox/index.js +22 -26
- package/dist/Form/Input/index.cjs +1 -182
- package/dist/Form/Input/index.js +60 -68
- package/dist/Form/RadioButton/index.cjs +1 -22
- package/dist/Form/RadioButton/index.js +13 -13
- package/dist/Form/Textarea/index.cjs +1 -27
- package/dist/Form/Textarea/index.js +18 -18
- package/dist/Pagination/index.cjs +1 -128
- package/dist/Pagination/index.js +82 -102
- package/dist/{SelectableInputWrapper-BIBVazbq.js → SelectableInputWrapper-B3ylMTsl.js} +37 -38
- package/dist/SelectableInputWrapper-C9x3IShC.cjs +1 -0
- package/dist/Slide-C506y48c.js +233 -0
- package/dist/Slide-Zmb0vKbn.cjs +1 -0
- package/dist/Slider/Navigation.d.ts +9 -0
- package/dist/Slider/Navigation.d.ts.map +1 -0
- package/dist/Slider/NavigationDot.d.ts +0 -3
- package/dist/Slider/NavigationDot.d.ts.map +1 -1
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/context.d.ts +3 -7
- package/dist/Slider/context.d.ts.map +1 -1
- package/dist/Slider/index.cjs +1 -11
- package/dist/Slider/index.js +5 -1
- package/dist/TextFieldWrapper-Cg4f8_zY.js +151 -0
- package/dist/TextFieldWrapper-Ci0-vx4J.cjs +1 -0
- package/dist/assets/Button.css +1 -1713
- package/dist/assets/styles.css +1 -1649
- package/dist/clsx-C11secjj.cjs +1 -0
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/index.cjs +1 -34
- package/dist/index.js +28 -12
- package/package.json +1 -1
- package/dist/AccordionItem-BFDuboYi.js +0 -103
- package/dist/AccordionItem-C3MiOBH7.cjs +0 -106
- package/dist/ArrowLeft2-iZ0Au6Fn.cjs +0 -24
- package/dist/ArrowRight2-DTuru_sP.cjs +0 -27
- package/dist/SelectableInputWrapper-g7YtIiBW.cjs +0 -79
- package/dist/Slide-BhWFQV8r.js +0 -234
- package/dist/Slide-BzXDEkqH.cjs +0 -237
- package/dist/TextFieldWrapper-BkoKcbvs.js +0 -167
- package/dist/TextFieldWrapper-D-DH5_DG.cjs +0 -169
- package/dist/clsx-BtxeOLZW.cjs +0 -5
- package/dist/clsx-ChV9xqsO.js +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(r){var f,n,t="";if(typeof r=="string"||typeof r=="number")t+=r;else if(typeof r=="object")if(Array.isArray(r)){var s=r.length;for(f=0;f<s;f++)r[f]&&(n=i(r[f]))&&(t&&(t+=" "),t+=n)}else for(n in r)r[n]&&(t&&(t+=" "),t+=n);return t}function o(){for(var r,f,n=0,t="",s=arguments.length;n<s;n++)(r=arguments[n])&&(f=i(r))&&(t&&(t+=" "),t+=f);return t}exports.clsx=o;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function a(r) {
|
|
2
|
+
var f, n, t = "";
|
|
3
|
+
if (typeof r == "string" || typeof r == "number") t += r;
|
|
4
|
+
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
5
|
+
var o = r.length;
|
|
6
|
+
for (f = 0; f < o; f++) r[f] && (n = a(r[f])) && (t && (t += " "), t += n);
|
|
7
|
+
} else for (n in r) r[n] && (t && (t += " "), t += n);
|
|
8
|
+
return t;
|
|
9
|
+
}
|
|
10
|
+
function i() {
|
|
11
|
+
for (var r, f, n = 0, t = "", o = arguments.length; n < o; n++) (r = arguments[n]) && (f = a(r)) && (t && (t += " "), t += f);
|
|
12
|
+
return t;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
i as c
|
|
16
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -1,34 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
require('./assets/styles.css');;/* empty css */
|
|
6
|
-
const AccordionItem = require('./AccordionItem-C3MiOBH7.cjs');
|
|
7
|
-
const Alert = require('./Alert/index.cjs');
|
|
8
|
-
const Badge = require('./Badge/index.cjs');
|
|
9
|
-
const Breadcrumb = require('./Breadcrumb/index.cjs');
|
|
10
|
-
const Button = require('./Button/index.cjs');
|
|
11
|
-
const Divider = require('./Divider/index.cjs');
|
|
12
|
-
const Form_Checkbox = require('./Form/Checkbox/index.cjs');
|
|
13
|
-
const Form_Input = require('./Form/Input/index.cjs');
|
|
14
|
-
const Form_RadioButton = require('./Form/RadioButton/index.cjs');
|
|
15
|
-
const Form_Textarea = require('./Form/Textarea/index.cjs');
|
|
16
|
-
const Pagination = require('./Pagination/index.cjs');
|
|
17
|
-
const Slide = require('./Slide-BzXDEkqH.cjs');
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
exports.AccordionGroup = AccordionItem.AccordionGroup;
|
|
22
|
-
exports.AccordionItem = AccordionItem.AccordionItem;
|
|
23
|
-
exports.Alert = Alert;
|
|
24
|
-
exports.Badge = Badge;
|
|
25
|
-
exports.Breadcrumb = Breadcrumb;
|
|
26
|
-
exports.Button = Button;
|
|
27
|
-
exports.Divider = Divider;
|
|
28
|
-
exports.Checkbox = Form_Checkbox;
|
|
29
|
-
exports.Input = Form_Input;
|
|
30
|
-
exports.RadioButton = Form_RadioButton;
|
|
31
|
-
exports.Textarea = Form_Textarea;
|
|
32
|
-
exports.Pagination = Pagination;
|
|
33
|
-
exports.Slide = Slide.Slide;
|
|
34
|
-
exports.Slider = Slide.Slider;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/styles.css');;/* empty css */const e=require("./AccordionItem-eMnIUJ1V.cjs"),o=require("./Alert/index.cjs"),t=require("./Badge/index.cjs"),i=require("./Breadcrumb/index.cjs"),n=require("./Button/index.cjs"),c=require("./Divider/index.cjs"),u=require("./Form/Checkbox/index.cjs"),d=require("./Form/Input/index.cjs"),a=require("./Form/RadioButton/index.cjs"),s=require("./Form/Textarea/index.cjs"),q=require("./Pagination/index.cjs"),r=require("./Slide-Zmb0vKbn.cjs");exports.AccordionGroup=e.AccordionGroup;exports.AccordionItem=e.AccordionItem;exports.Alert=o;exports.Badge=t;exports.Breadcrumb=i;exports.Button=n;exports.Divider=c;exports.Checkbox=u;exports.Input=d;exports.RadioButton=a;exports.Textarea=s;exports.Pagination=q;exports.Slide=r.Slide;exports.Slider=r.Slider;
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
import './assets/styles.css';/* empty css */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
import { A as e, a as t } from "./AccordionItem-tKSPLNKs.js";
|
|
3
|
+
import { default as d } from "./Alert/index.js";
|
|
4
|
+
import { default as p } from "./Badge/index.js";
|
|
5
|
+
import { default as s } from "./Breadcrumb/index.js";
|
|
6
|
+
import { default as l } from "./Button/index.js";
|
|
7
|
+
import { default as n } from "./Divider/index.js";
|
|
8
|
+
import { default as A } from "./Form/Checkbox/index.js";
|
|
9
|
+
import { default as S } from "./Form/Input/index.js";
|
|
10
|
+
import { default as g } from "./Form/RadioButton/index.js";
|
|
11
|
+
import { default as h } from "./Form/Textarea/index.js";
|
|
12
|
+
import { default as v } from "./Pagination/index.js";
|
|
13
|
+
import { a as D, S as G } from "./Slide-C506y48c.js";
|
|
14
|
+
export {
|
|
15
|
+
e as AccordionGroup,
|
|
16
|
+
t as AccordionItem,
|
|
17
|
+
d as Alert,
|
|
18
|
+
p as Badge,
|
|
19
|
+
s as Breadcrumb,
|
|
20
|
+
l as Button,
|
|
21
|
+
A as Checkbox,
|
|
22
|
+
n as Divider,
|
|
23
|
+
S as Input,
|
|
24
|
+
v as Pagination,
|
|
25
|
+
g as RadioButton,
|
|
26
|
+
D as Slide,
|
|
27
|
+
G as Slider,
|
|
28
|
+
h as Textarea
|
|
29
|
+
};
|
package/package.json
CHANGED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { c as clsx } from './clsx-ChV9xqsO.js';
|
|
3
|
-
import { createContext, useContext, useState, useId } from 'react';
|
|
4
|
-
import Divider from './Divider/index.js';
|
|
5
|
-
|
|
6
|
-
const accordionContext = createContext({
|
|
7
|
-
activeKey: null,
|
|
8
|
-
setActiveKey: () => {
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const useAccordionData = () => useContext(accordionContext);
|
|
12
|
-
|
|
13
|
-
const AccordionGroup = (props) => {
|
|
14
|
-
const { defaultActiveKey = null, className, children } = props;
|
|
15
|
-
const [activeKey, setActiveKey] = useState(defaultActiveKey);
|
|
16
|
-
return /* @__PURE__ */ jsx("div", { className: clsx("dgs-ui-kit-flex dgs-ui-kit-flex-col", className), children: /* @__PURE__ */ jsx(
|
|
17
|
-
accordionContext.Provider,
|
|
18
|
-
{
|
|
19
|
-
value: {
|
|
20
|
-
activeKey,
|
|
21
|
-
setActiveKey
|
|
22
|
-
},
|
|
23
|
-
children
|
|
24
|
-
}
|
|
25
|
-
) });
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const ArrowDown2Icon = (props) => /* @__PURE__ */ jsx(
|
|
29
|
-
"svg",
|
|
30
|
-
{
|
|
31
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
32
|
-
width: "1em",
|
|
33
|
-
height: "1em",
|
|
34
|
-
fill: "none",
|
|
35
|
-
viewBox: "0 0 24 24",
|
|
36
|
-
...props,
|
|
37
|
-
children: /* @__PURE__ */ jsx(
|
|
38
|
-
"path",
|
|
39
|
-
{
|
|
40
|
-
fill: "currentColor",
|
|
41
|
-
d: "M4.47 7.97a.75.75 0 0 1 .976-.073l.084.073L12 14.439l6.47-6.47a.75.75 0 0 1 .976-.072l.084.073a.75.75 0 0 1 .073.976l-.073.084-7 7a.75.75 0 0 1-.976.073l-.084-.073-7-7a.75.75 0 0 1 0-1.06"
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
const AccordionItem = (props) => {
|
|
48
|
-
const { children, title, accordionKey, className, contentClassName } = props;
|
|
49
|
-
const { activeKey, setActiveKey } = useAccordionData();
|
|
50
|
-
const reactUseId = useId();
|
|
51
|
-
const accordionItemKey = accordionKey ?? reactUseId;
|
|
52
|
-
const isItemActive = accordionItemKey === activeKey;
|
|
53
|
-
return /* @__PURE__ */ jsxs("div", { className: clsx("dgs-ui-kit-bg-white dgs-ui-kit-px-4 dgs-ui-kit-pt-4", className), children: [
|
|
54
|
-
/* @__PURE__ */ jsxs(
|
|
55
|
-
"button",
|
|
56
|
-
{
|
|
57
|
-
className: clsx(
|
|
58
|
-
"dgs-ui-kit-flex dgs-ui-kit-justify-between dgs-ui-kit-items-center dgs-ui-kit-w-full",
|
|
59
|
-
isItemActive ? "dgs-ui-kit-text-primary-500" : "dgs-ui-kit-text-gray-600"
|
|
60
|
-
),
|
|
61
|
-
onClick: () => {
|
|
62
|
-
if (isItemActive) setActiveKey(null);
|
|
63
|
-
else setActiveKey(accordionItemKey);
|
|
64
|
-
},
|
|
65
|
-
children: [
|
|
66
|
-
/* @__PURE__ */ jsx("div", { className: isItemActive ? "dgs-ui-kit-font-h5-bold" : "dgs-ui-kit-font-p1-medium", children: title }),
|
|
67
|
-
/* @__PURE__ */ jsx(
|
|
68
|
-
ArrowDown2Icon,
|
|
69
|
-
{
|
|
70
|
-
className: clsx(
|
|
71
|
-
"dgs-ui-kit-transition dgs-ui-kit-duration-300 dgs-ui-kit-ease-in-out dgs-ui-kit-shrink-0 dgs-ui-kit-w-auto dgs-ui-kit-h-auto",
|
|
72
|
-
isItemActive && "dgs-ui-kit-rotate-180"
|
|
73
|
-
),
|
|
74
|
-
width: 20,
|
|
75
|
-
height: 20
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
/* @__PURE__ */ jsx(
|
|
82
|
-
"div",
|
|
83
|
-
{
|
|
84
|
-
className: clsx(
|
|
85
|
-
"dgs-ui-kit-grid dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-600 dgs-ui-kit-overflow-hidden dgs-ui-kit-transition-all dgs-ui-kit-duration-300 dgs-ui-kit-ease-in-out",
|
|
86
|
-
isItemActive ? "dgs-ui-kit-grid-rows-[1fr] dgs-ui-kit-opacity-100 dgs-ui-kit-mt-3" : "dgs-ui-kit-grid-rows-[0fr] dgs-ui-kit-opacity-0",
|
|
87
|
-
contentClassName
|
|
88
|
-
),
|
|
89
|
-
children: /* @__PURE__ */ jsx("div", { className: "dgs-ui-kit-overflow-hidden", children })
|
|
90
|
-
}
|
|
91
|
-
),
|
|
92
|
-
/* @__PURE__ */ jsx(
|
|
93
|
-
Divider,
|
|
94
|
-
{
|
|
95
|
-
type: "horizontal",
|
|
96
|
-
color: "white",
|
|
97
|
-
className: "dgs-ui-kit-mt-4"
|
|
98
|
-
}
|
|
99
|
-
)
|
|
100
|
-
] });
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
export { AccordionGroup as A, AccordionItem as a };
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
const clsx = require('./clsx-BtxeOLZW.cjs');
|
|
5
|
-
const react = require('react');
|
|
6
|
-
const Divider = require('./Divider/index.cjs');
|
|
7
|
-
|
|
8
|
-
const accordionContext = react.createContext({
|
|
9
|
-
activeKey: null,
|
|
10
|
-
setActiveKey: () => {
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
const useAccordionData = () => react.useContext(accordionContext);
|
|
14
|
-
|
|
15
|
-
const AccordionGroup = (props) => {
|
|
16
|
-
const { defaultActiveKey = null, className, children } = props;
|
|
17
|
-
const [activeKey, setActiveKey] = react.useState(defaultActiveKey);
|
|
18
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx.clsx("dgs-ui-kit-flex dgs-ui-kit-flex-col", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
19
|
-
accordionContext.Provider,
|
|
20
|
-
{
|
|
21
|
-
value: {
|
|
22
|
-
activeKey,
|
|
23
|
-
setActiveKey
|
|
24
|
-
},
|
|
25
|
-
children
|
|
26
|
-
}
|
|
27
|
-
) });
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const ArrowDown2Icon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
31
|
-
"svg",
|
|
32
|
-
{
|
|
33
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
34
|
-
width: "1em",
|
|
35
|
-
height: "1em",
|
|
36
|
-
fill: "none",
|
|
37
|
-
viewBox: "0 0 24 24",
|
|
38
|
-
...props,
|
|
39
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
-
"path",
|
|
41
|
-
{
|
|
42
|
-
fill: "currentColor",
|
|
43
|
-
d: "M4.47 7.97a.75.75 0 0 1 .976-.073l.084.073L12 14.439l6.47-6.47a.75.75 0 0 1 .976-.072l.084.073a.75.75 0 0 1 .073.976l-.073.084-7 7a.75.75 0 0 1-.976.073l-.084-.073-7-7a.75.75 0 0 1 0-1.06"
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
const AccordionItem = (props) => {
|
|
50
|
-
const { children, title, accordionKey, className, contentClassName } = props;
|
|
51
|
-
const { activeKey, setActiveKey } = useAccordionData();
|
|
52
|
-
const reactUseId = react.useId();
|
|
53
|
-
const accordionItemKey = accordionKey ?? reactUseId;
|
|
54
|
-
const isItemActive = accordionItemKey === activeKey;
|
|
55
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx.clsx("dgs-ui-kit-bg-white dgs-ui-kit-px-4 dgs-ui-kit-pt-4", className), children: [
|
|
56
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
57
|
-
"button",
|
|
58
|
-
{
|
|
59
|
-
className: clsx.clsx(
|
|
60
|
-
"dgs-ui-kit-flex dgs-ui-kit-justify-between dgs-ui-kit-items-center dgs-ui-kit-w-full",
|
|
61
|
-
isItemActive ? "dgs-ui-kit-text-primary-500" : "dgs-ui-kit-text-gray-600"
|
|
62
|
-
),
|
|
63
|
-
onClick: () => {
|
|
64
|
-
if (isItemActive) setActiveKey(null);
|
|
65
|
-
else setActiveKey(accordionItemKey);
|
|
66
|
-
},
|
|
67
|
-
children: [
|
|
68
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: isItemActive ? "dgs-ui-kit-font-h5-bold" : "dgs-ui-kit-font-p1-medium", children: title }),
|
|
69
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
70
|
-
ArrowDown2Icon,
|
|
71
|
-
{
|
|
72
|
-
className: clsx.clsx(
|
|
73
|
-
"dgs-ui-kit-transition dgs-ui-kit-duration-300 dgs-ui-kit-ease-in-out dgs-ui-kit-shrink-0 dgs-ui-kit-w-auto dgs-ui-kit-h-auto",
|
|
74
|
-
isItemActive && "dgs-ui-kit-rotate-180"
|
|
75
|
-
),
|
|
76
|
-
width: 20,
|
|
77
|
-
height: 20
|
|
78
|
-
}
|
|
79
|
-
)
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
84
|
-
"div",
|
|
85
|
-
{
|
|
86
|
-
className: clsx.clsx(
|
|
87
|
-
"dgs-ui-kit-grid dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-600 dgs-ui-kit-overflow-hidden dgs-ui-kit-transition-all dgs-ui-kit-duration-300 dgs-ui-kit-ease-in-out",
|
|
88
|
-
isItemActive ? "dgs-ui-kit-grid-rows-[1fr] dgs-ui-kit-opacity-100 dgs-ui-kit-mt-3" : "dgs-ui-kit-grid-rows-[0fr] dgs-ui-kit-opacity-0",
|
|
89
|
-
contentClassName
|
|
90
|
-
),
|
|
91
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "dgs-ui-kit-overflow-hidden", children })
|
|
92
|
-
}
|
|
93
|
-
),
|
|
94
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
95
|
-
Divider,
|
|
96
|
-
{
|
|
97
|
-
type: "horizontal",
|
|
98
|
-
color: "white",
|
|
99
|
-
className: "dgs-ui-kit-mt-4"
|
|
100
|
-
}
|
|
101
|
-
)
|
|
102
|
-
] });
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
exports.AccordionGroup = AccordionGroup;
|
|
106
|
-
exports.AccordionItem = AccordionItem;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
|
|
5
|
-
const ArrowLeft2Icon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6
|
-
"svg",
|
|
7
|
-
{
|
|
8
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
-
width: "1em",
|
|
10
|
-
height: "1em",
|
|
11
|
-
fill: "none",
|
|
12
|
-
viewBox: "0 0 24 24",
|
|
13
|
-
...props,
|
|
14
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15
|
-
"path",
|
|
16
|
-
{
|
|
17
|
-
fill: "currentColor",
|
|
18
|
-
d: "M16.28 4.47a.75.75 0 0 1 .073.976l-.073.084L9.811 12l6.47 6.47a.75.75 0 0 1 .072.976l-.073.084a.75.75 0 0 1-.976.073l-.084-.073-7-7a.75.75 0 0 1-.073-.976l.073-.084 7-7a.75.75 0 0 1 1.06 0"
|
|
19
|
-
}
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
exports.ArrowLeft2Icon = ArrowLeft2Icon;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
|
|
5
|
-
const ArrowRight2Icon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6
|
-
"svg",
|
|
7
|
-
{
|
|
8
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
-
width: "1em",
|
|
10
|
-
height: "1em",
|
|
11
|
-
fill: "none",
|
|
12
|
-
viewBox: "0 0 24 24",
|
|
13
|
-
...props,
|
|
14
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15
|
-
"path",
|
|
16
|
-
{
|
|
17
|
-
stroke: "currentColor",
|
|
18
|
-
strokeLinecap: "round",
|
|
19
|
-
strokeLinejoin: "round",
|
|
20
|
-
strokeWidth: 1.5,
|
|
21
|
-
d: "m8.5 5 7 7-7 7"
|
|
22
|
-
}
|
|
23
|
-
)
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
exports.ArrowRight2Icon = ArrowRight2Icon;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('./assets/styles.css');const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
const clsx = require('./clsx-BtxeOLZW.cjs');
|
|
5
|
-
;/* empty css */
|
|
6
|
-
|
|
7
|
-
const SelectableInputWrapper = (props) => {
|
|
8
|
-
const {
|
|
9
|
-
children,
|
|
10
|
-
containerClassName,
|
|
11
|
-
errorMessage,
|
|
12
|
-
helperMessage,
|
|
13
|
-
isError,
|
|
14
|
-
label,
|
|
15
|
-
variant = "default"
|
|
16
|
-
} = props;
|
|
17
|
-
const icon = props.icon;
|
|
18
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19
|
-
"label",
|
|
20
|
-
{
|
|
21
|
-
className: clsx.clsx(
|
|
22
|
-
"dgs-ui-kit-flex dgs-ui-kit-w-fit dgs-ui-kit-justify-between dgs-ui-kit-items-center dgs-ui-kit-group has-[:disabled]:dgs-ui-kit-opacity-40 has-[:disabled]:dgs-ui-kit-cursor-not-allowed dgs-ui-kit-transition",
|
|
23
|
-
{
|
|
24
|
-
"dgs-ui-kit-p-3 dgs-ui-kit-border dgs-ui-kit-w-full dgs-ui-kit-border-solid dgs-ui-kit-rounded-xl dgs-ui-kit-bg-white has-[:checked]:dgs-ui-kit-bg-primary-50": variant === "bordered",
|
|
25
|
-
"has-[:checked]:dgs-ui-kit-border-primary-500 dgs-ui-kit-border-gray-200 hover:dgs-ui-kit-ring-4 hover:dgs-ui-kit-ring-gray-100 has-[:focus]:ring has-[:focus]:dgs-ui-kit-ring-primary-300 has-[:focus]:dgs-ui-kit-ring-offset-1 has-[:focus]:dgs-ui-kit-ring-offset-white": variant === "bordered" && !isError,
|
|
26
|
-
"dgs-ui-kit-border-error-500 hover:dgs-ui-kit-ring-4 hover:dgs-ui-kit-ring-error-50 has-[:focus]:ring has-[:focus]:dgs-ui-kit-ring-error-300 has-[:focus]:dgs-ui-kit-ring-offset-1 has-[:focus]:dgs-ui-kit-ring-offset-white": variant === "bordered" && isError
|
|
27
|
-
},
|
|
28
|
-
containerClassName
|
|
29
|
-
),
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
className: clsx.clsx(
|
|
35
|
-
"dgs-ui-kit-flex dgs-ui-kit-space-x-2 dgs-ui-kit-space-x-reverse",
|
|
36
|
-
errorMessage ?? helperMessage ? "dgs-ui-kit-items-start" : "dgs-ui-kit-items-center"
|
|
37
|
-
),
|
|
38
|
-
children: [
|
|
39
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
-
"div",
|
|
41
|
-
{
|
|
42
|
-
className: clsx.clsx("dgs-ui-kit-relative dgs-ui-kit-h-[18px] dgs-ui-kit-w-[18px]", {
|
|
43
|
-
"dgs-ui-kit-mt-1": label
|
|
44
|
-
}),
|
|
45
|
-
children: children({
|
|
46
|
-
inputClassName: clsx.clsx(
|
|
47
|
-
"dgs-ui-kit-peer dgs-ui-kit-w-full dgs-ui-kit-h-full disabled:dgs-ui-kit-bg-gray-200 dgs-ui-kit-appearance-none dgs-ui-kit-border dgs-ui-kit-border-gray-300 group-hover:dgs-ui-kit-border-primary-500 checked:dgs-ui-kit-bg-primary-500 checked:dgs-ui-kit-border-transparent dgs-ui-kit-transition-all",
|
|
48
|
-
{
|
|
49
|
-
"group-hover:dgs-ui-kit-ring-4 group-hover:dgs-ui-kit-ring-gray-100 focus:!dgs-ui-kit-ring focus:!dgs-ui-kit-ring-primary-300 focus:dgs-ui-kit-ring-offset-1 focus:dgs-ui-kit-ring-offset-white": variant !== "bordered" && !isError,
|
|
50
|
-
"!dgs-ui-kit-border-error-500 group-hover:dgs-ui-kit-ring-4 group-hover:dgs-ui-kit-ring-error-50 focus:!dgs-ui-kit-ring focus:!dgs-ui-kit-ring-error-300 focus:dgs-ui-kit-ring-offset-1 focus:dgs-ui-kit-ring-offset-white": variant !== "bordered" && isError
|
|
51
|
-
}
|
|
52
|
-
),
|
|
53
|
-
checkedInputClassName: "dgs-ui-kit-absolute dgs-ui-kit-top-0 dgs-ui-kit-left-0 dgs-ui-kit-w-full dgs-ui-kit-h-full dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-justify-center dgs-ui-kit-text-white dgs-ui-kit-opacity-0 peer-checked:dgs-ui-kit-opacity-100 dgs-ui-kit-transition-opacity"
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
),
|
|
57
|
-
Boolean(label) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "dgs-ui-kit-space-y-1", children: [
|
|
58
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "dgs-ui-kit-font-p2-medium dgs-ui-kit-text-gray-700 dgs-ui-kit-transition group-hover:dgs-ui-kit-text-primary-500", children: label }),
|
|
59
|
-
Boolean(errorMessage ?? helperMessage) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
-
"div",
|
|
61
|
-
{
|
|
62
|
-
className: clsx.clsx(
|
|
63
|
-
"dgs-ui-kit-font-p3-regular",
|
|
64
|
-
errorMessage && isError ? "dgs-ui-kit-text-error-500" : "dgs-ui-kit-text-gray-500"
|
|
65
|
-
),
|
|
66
|
-
children: isError && errorMessage ? errorMessage : helperMessage
|
|
67
|
-
}
|
|
68
|
-
)
|
|
69
|
-
] })
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
),
|
|
73
|
-
variant === "bordered" && icon ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "dgs-ui-kit-text-gray-600 group-hover:dgs-ui-kit-text-primary-500 group-checked:dgs-ui-kit-text-primary-500", children: icon }) : null
|
|
74
|
-
]
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
exports.SelectableInputWrapper = SelectableInputWrapper;
|