@dgshahr/ui-kit 0.0.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/dist/Accordion/AccordionGroup.d.ts +8 -0
- package/dist/Accordion/AccordionGroup.d.ts.map +1 -0
- package/dist/Accordion/AccordionItem.d.ts +10 -0
- package/dist/Accordion/AccordionItem.d.ts.map +1 -0
- package/dist/Accordion/context.d.ts +8 -0
- package/dist/Accordion/context.d.ts.map +1 -0
- package/dist/Accordion/index.cjs +11 -0
- package/dist/Accordion/index.d.ts +3 -0
- package/dist/Accordion/index.d.ts.map +1 -0
- package/dist/Accordion/index.js +2 -0
- package/dist/AccordionItem-BBbE__nk.js +103 -0
- package/dist/AccordionItem-BOXOB5GK.cjs +106 -0
- package/dist/Alert/index.cjs +242 -0
- package/dist/Alert/index.d.ts +17 -0
- package/dist/Alert/index.d.ts.map +1 -0
- package/dist/Alert/index.js +240 -0
- package/dist/Alert/variants.d.ts +14 -0
- package/dist/Alert/variants.d.ts.map +1 -0
- package/dist/ArrowLeft2-BURhvXT2.js +22 -0
- package/dist/ArrowLeft2-iZ0Au6Fn.cjs +24 -0
- package/dist/ArrowRight2-DCxJPvNC.js +25 -0
- package/dist/ArrowRight2-DTuru_sP.cjs +27 -0
- package/dist/Badge/index.cjs +72 -0
- package/dist/Badge/index.d.ts +21 -0
- package/dist/Badge/index.d.ts.map +1 -0
- package/dist/Badge/index.js +70 -0
- package/dist/Breadcrumb/index.cjs +34 -0
- package/dist/Breadcrumb/index.d.ts +13 -0
- package/dist/Breadcrumb/index.d.ts.map +1 -0
- package/dist/Breadcrumb/index.js +32 -0
- package/dist/Button/index.cjs +119 -0
- package/dist/Button/index.d.ts +13 -0
- package/dist/Button/index.d.ts.map +1 -0
- package/dist/Button/index.js +117 -0
- package/dist/Button/variants.d.ts +5 -0
- package/dist/Button/variants.d.ts.map +1 -0
- package/dist/Divider/index.cjs +25 -0
- package/dist/Divider/index.d.ts +9 -0
- package/dist/Divider/index.d.ts.map +1 -0
- package/dist/Divider/index.js +23 -0
- package/dist/Form/Checkbox/index.cjs +72 -0
- package/dist/Form/Checkbox/index.d.ts +8 -0
- package/dist/Form/Checkbox/index.d.ts.map +1 -0
- package/dist/Form/Checkbox/index.js +70 -0
- package/dist/Form/Input/index.cjs +182 -0
- package/dist/Form/Input/index.d.ts +12 -0
- package/dist/Form/Input/index.d.ts.map +1 -0
- package/dist/Form/Input/index.js +180 -0
- package/dist/Form/RadioButton/index.cjs +22 -0
- package/dist/Form/RadioButton/index.d.ts +6 -0
- package/dist/Form/RadioButton/index.d.ts.map +1 -0
- package/dist/Form/RadioButton/index.js +20 -0
- package/dist/Form/Textarea/index.cjs +27 -0
- package/dist/Form/Textarea/index.d.ts +7 -0
- package/dist/Form/Textarea/index.d.ts.map +1 -0
- package/dist/Form/Textarea/index.js +25 -0
- package/dist/Pagination/index.cjs +119 -0
- package/dist/Pagination/index.d.ts +13 -0
- package/dist/Pagination/index.d.ts.map +1 -0
- package/dist/Pagination/index.js +117 -0
- package/dist/Pagination/utils.d.ts +8 -0
- package/dist/Pagination/utils.d.ts.map +1 -0
- package/dist/SelectableInputWrapper-D2aYQb9J.cjs +71 -0
- package/dist/SelectableInputWrapper-DAj8v1nv.js +69 -0
- package/dist/Slide-6SD8mElS.js +198 -0
- package/dist/Slide-BiCQh7AV.cjs +201 -0
- package/dist/Slider/NavigationDot.d.ts +11 -0
- package/dist/Slider/NavigationDot.d.ts.map +1 -0
- package/dist/Slider/Slide.d.ts +7 -0
- package/dist/Slider/Slide.d.ts.map +1 -0
- package/dist/Slider/Slider.d.ts +25 -0
- package/dist/Slider/Slider.d.ts.map +1 -0
- package/dist/Slider/context.d.ts +8 -0
- package/dist/Slider/context.d.ts.map +1 -0
- package/dist/Slider/index.cjs +11 -0
- package/dist/Slider/index.d.ts +3 -0
- package/dist/Slider/index.d.ts.map +1 -0
- package/dist/Slider/index.js +2 -0
- package/dist/TextFieldWrapper-C80myx6j.cjs +169 -0
- package/dist/TextFieldWrapper-D3oaEPmc.js +167 -0
- package/dist/assets/Button.css +1675 -0
- package/dist/assets/styles.css +1611 -0
- package/dist/clsx-BtxeOLZW.cjs +5 -0
- package/dist/clsx-ChV9xqsO.js +3 -0
- package/dist/index.cjs +34 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/package.json +83 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { c as clsx } from '../clsx-ChV9xqsO.js';
|
|
3
|
+
import Button from '../Button/index.js';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import '../assets/styles.css';/* empty css */
|
|
6
|
+
|
|
7
|
+
const alertVariantClassNames = {
|
|
8
|
+
container: {
|
|
9
|
+
warning: "bg-warning-50 border-warning-200",
|
|
10
|
+
primary: "bg-primary-50 border-primary-100",
|
|
11
|
+
error: "bg-error-50 border-error-200",
|
|
12
|
+
success: "bg-success-50 border-success-200",
|
|
13
|
+
gray: "bg-gray-50 border-gray-200"
|
|
14
|
+
},
|
|
15
|
+
icon: {
|
|
16
|
+
warning: "text-warning-700",
|
|
17
|
+
primary: "text-primary-400",
|
|
18
|
+
error: "text-error-600",
|
|
19
|
+
success: "text-success-600",
|
|
20
|
+
gray: "text-gray-600"
|
|
21
|
+
},
|
|
22
|
+
title: {
|
|
23
|
+
warning: "text-warning-800",
|
|
24
|
+
primary: "text-primary-700",
|
|
25
|
+
error: "text-error-700",
|
|
26
|
+
success: "text-success-800",
|
|
27
|
+
gray: "text-gray-800"
|
|
28
|
+
},
|
|
29
|
+
close: {
|
|
30
|
+
warning: "text-warning-800",
|
|
31
|
+
primary: "text-primary-600",
|
|
32
|
+
error: "text-error-600",
|
|
33
|
+
success: "text-success-800",
|
|
34
|
+
gray: "text-gray-800"
|
|
35
|
+
},
|
|
36
|
+
text: {
|
|
37
|
+
warning: "text-warning-800",
|
|
38
|
+
primary: "text-primary-600",
|
|
39
|
+
error: "text-error-600",
|
|
40
|
+
success: "text-success-800",
|
|
41
|
+
gray: "text-gray-700"
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const alertSizeClassNames = {
|
|
45
|
+
container: {
|
|
46
|
+
large: "p-4",
|
|
47
|
+
small: "p-3"
|
|
48
|
+
},
|
|
49
|
+
icon: {
|
|
50
|
+
large: 24,
|
|
51
|
+
small: 20
|
|
52
|
+
},
|
|
53
|
+
title: {
|
|
54
|
+
large: "font-h5-bold mb-2",
|
|
55
|
+
small: "font-h6-bold mb-1"
|
|
56
|
+
},
|
|
57
|
+
close: {
|
|
58
|
+
large: 20,
|
|
59
|
+
small: 20
|
|
60
|
+
},
|
|
61
|
+
text: {
|
|
62
|
+
large: "font-p2-regular",
|
|
63
|
+
small: "font-p3-regular"
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const DangerBoldIcon = (props) => /* @__PURE__ */ jsx(
|
|
68
|
+
"svg",
|
|
69
|
+
{
|
|
70
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
71
|
+
width: "1em",
|
|
72
|
+
height: "1em",
|
|
73
|
+
fill: "none",
|
|
74
|
+
viewBox: "0 0 24 24",
|
|
75
|
+
...props,
|
|
76
|
+
children: /* @__PURE__ */ jsx(
|
|
77
|
+
"path",
|
|
78
|
+
{
|
|
79
|
+
fill: "currentColor",
|
|
80
|
+
d: "M10.628 3.353a2.85 2.85 0 0 1 3.85 1.09l7.268 12.614c.16.377.23.683.25 1.001a2.76 2.76 0 0 1-.73 2.021c-.51.554-1.2.881-1.95.921H4.68c-.31-.019-.62-.09-.91-.198-1.45-.585-2.15-2.23-1.56-3.656L9.53 4.433a2.73 2.73 0 0 1 1.099-1.08m1.37 11.92c-.48 0-.88.396-.88.873 0 .474.4.872.88.872s.87-.398.87-.883a.867.867 0 0 0-.87-.862m0-6.183c-.48 0-.88.386-.88.862v2.804c0 .475.4.873.88.873s.87-.398.87-.873V9.952a.866.866 0 0 0-.87-.862"
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
const InfoCircleBoldIcon = (props) => /* @__PURE__ */ jsx(
|
|
87
|
+
"svg",
|
|
88
|
+
{
|
|
89
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
90
|
+
width: "1em",
|
|
91
|
+
height: "1em",
|
|
92
|
+
fill: "none",
|
|
93
|
+
viewBox: "0 0 24 24",
|
|
94
|
+
...props,
|
|
95
|
+
children: /* @__PURE__ */ jsx(
|
|
96
|
+
"path",
|
|
97
|
+
{
|
|
98
|
+
fill: "currentColor",
|
|
99
|
+
fillRule: "evenodd",
|
|
100
|
+
d: "M12.756 15.693a.75.75 0 0 1-1.5 0v-4.299a.75.75 0 0 1 1.5 0zM11.25 8.291a.75.75 0 0 1 1.5 0c0 .414-.336.782-.75.782s-.75-.305-.75-.719zM12 2.5c-5.238 0-9.5 4.261-9.5 9.5s4.262 9.5 9.5 9.5 9.5-4.262 9.5-9.5-4.262-9.5-9.5-9.5",
|
|
101
|
+
clipRule: "evenodd"
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
const CheckCircleBoldIcon = (props) => /* @__PURE__ */ jsx(
|
|
108
|
+
"svg",
|
|
109
|
+
{
|
|
110
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
111
|
+
width: "1em",
|
|
112
|
+
height: "1em",
|
|
113
|
+
fill: "none",
|
|
114
|
+
viewBox: "0 0 24 24",
|
|
115
|
+
...props,
|
|
116
|
+
children: /* @__PURE__ */ jsx(
|
|
117
|
+
"path",
|
|
118
|
+
{
|
|
119
|
+
fill: "currentColor",
|
|
120
|
+
fillRule: "evenodd",
|
|
121
|
+
d: "m15.993 10.222-4.618 4.618a.746.746 0 0 1-1.061 0l-2.309-2.309a.75.75 0 0 1 1.06-1.061l1.78 1.779 4.087-4.088a.75.75 0 1 1 1.061 1.061M12 2.5c-5.238 0-9.5 4.262-9.5 9.5s4.262 9.5 9.5 9.5 9.5-4.261 9.5-9.5-4.262-9.5-9.5-9.5",
|
|
122
|
+
clipRule: "evenodd"
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
const CloseRemoveIcon = (props) => /* @__PURE__ */ jsx(
|
|
129
|
+
"svg",
|
|
130
|
+
{
|
|
131
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
132
|
+
width: "1em",
|
|
133
|
+
height: "1em",
|
|
134
|
+
fill: "none",
|
|
135
|
+
viewBox: "0 0 24 24",
|
|
136
|
+
...props,
|
|
137
|
+
children: /* @__PURE__ */ jsx(
|
|
138
|
+
"path",
|
|
139
|
+
{
|
|
140
|
+
fill: "currentColor",
|
|
141
|
+
d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06l5.47 5.47-5.47 5.47a.75.75 0 1 0 1.06 1.06l5.47-5.47 5.47 5.47a.75.75 0 1 0 1.06-1.06l-5.47-5.47 5.47-5.47a.75.75 0 0 0-1.06-1.06l-5.47 5.47z"
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
function getAlertIcon(variant, size) {
|
|
148
|
+
let IconComponent = InfoCircleBoldIcon;
|
|
149
|
+
if (variant === "error") IconComponent = DangerBoldIcon;
|
|
150
|
+
else if (variant === "success") IconComponent = CheckCircleBoldIcon;
|
|
151
|
+
return /* @__PURE__ */ jsx(
|
|
152
|
+
IconComponent,
|
|
153
|
+
{
|
|
154
|
+
className: clsx("shrink-0 my-[2px]", alertVariantClassNames.icon[variant]),
|
|
155
|
+
width: alertSizeClassNames.icon[size],
|
|
156
|
+
height: alertSizeClassNames.icon[size]
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
const Alert = (props) => {
|
|
161
|
+
const {
|
|
162
|
+
variant = "primary",
|
|
163
|
+
size = "small",
|
|
164
|
+
title,
|
|
165
|
+
text,
|
|
166
|
+
primaryButton,
|
|
167
|
+
outlineButton,
|
|
168
|
+
closable,
|
|
169
|
+
className
|
|
170
|
+
} = props;
|
|
171
|
+
const [show, setShow] = useState(true);
|
|
172
|
+
if (show)
|
|
173
|
+
return /* @__PURE__ */ jsxs(
|
|
174
|
+
"div",
|
|
175
|
+
{
|
|
176
|
+
className: clsx(
|
|
177
|
+
"w-full flex gap-x-3 rounded-xl border border-solid",
|
|
178
|
+
alertVariantClassNames.container[variant],
|
|
179
|
+
alertSizeClassNames.container[size],
|
|
180
|
+
className
|
|
181
|
+
),
|
|
182
|
+
children: [
|
|
183
|
+
getAlertIcon(variant, size),
|
|
184
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1", children: [
|
|
185
|
+
Boolean(title) && /* @__PURE__ */ jsx(
|
|
186
|
+
"div",
|
|
187
|
+
{
|
|
188
|
+
className: clsx(
|
|
189
|
+
alertVariantClassNames.title[variant],
|
|
190
|
+
alertSizeClassNames.title[size]
|
|
191
|
+
),
|
|
192
|
+
children: title
|
|
193
|
+
}
|
|
194
|
+
),
|
|
195
|
+
/* @__PURE__ */ jsx("p", { className: clsx(alertVariantClassNames.text[variant], alertSizeClassNames.text[size]), children: text }),
|
|
196
|
+
(Boolean(primaryButton?.text) || Boolean(outlineButton?.text)) && /* @__PURE__ */ jsxs("div", { className: clsx("flex gap-x-2 items-center", size === "large" ? "mt-4" : "mt-3"), children: [
|
|
197
|
+
Boolean(primaryButton?.text) && /* @__PURE__ */ jsx(
|
|
198
|
+
Button,
|
|
199
|
+
{
|
|
200
|
+
variant: "primary",
|
|
201
|
+
color: variant,
|
|
202
|
+
size: "small",
|
|
203
|
+
...primaryButton,
|
|
204
|
+
children: primaryButton?.text
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
Boolean(outlineButton?.text) && /* @__PURE__ */ jsx(
|
|
208
|
+
Button,
|
|
209
|
+
{
|
|
210
|
+
variant: "outline",
|
|
211
|
+
color: variant,
|
|
212
|
+
size: "small",
|
|
213
|
+
...outlineButton,
|
|
214
|
+
children: outlineButton?.text
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
] })
|
|
218
|
+
] }),
|
|
219
|
+
closable && /* @__PURE__ */ jsx(
|
|
220
|
+
"button",
|
|
221
|
+
{
|
|
222
|
+
className: "shrink-0 my-[2px] h-fit",
|
|
223
|
+
onClick: () => setShow(false),
|
|
224
|
+
children: /* @__PURE__ */ jsx(
|
|
225
|
+
CloseRemoveIcon,
|
|
226
|
+
{
|
|
227
|
+
className: clsx(alertVariantClassNames.close[variant]),
|
|
228
|
+
width: alertSizeClassNames.close[size],
|
|
229
|
+
height: alertSizeClassNames.close[size]
|
|
230
|
+
}
|
|
231
|
+
)
|
|
232
|
+
}
|
|
233
|
+
)
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
);
|
|
237
|
+
return null;
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
export { Alert as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AlertProps } from '.';
|
|
2
|
+
type AlertVariantRecords = Record<Required<AlertProps>['variant'], string>;
|
|
3
|
+
type AlertSizeRecords = Record<Required<AlertProps>['size'], string | number>;
|
|
4
|
+
interface SectionRecords<T extends AlertVariantRecords | AlertSizeRecords> {
|
|
5
|
+
container: T;
|
|
6
|
+
icon: T;
|
|
7
|
+
title: T;
|
|
8
|
+
close: T;
|
|
9
|
+
text: T;
|
|
10
|
+
}
|
|
11
|
+
export declare const alertVariantClassNames: SectionRecords<AlertVariantRecords>;
|
|
12
|
+
export declare const alertSizeClassNames: SectionRecords<AlertSizeRecords>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../src/components/Alert/variants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAEpC,KAAK,mBAAmB,GAAG,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;AAC3E,KAAK,gBAAgB,GAAG,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAE9E,UAAU,cAAc,CAAC,CAAC,SAAS,mBAAmB,GAAG,gBAAgB;IACvE,SAAS,EAAE,CAAC,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,CAAC,CAAC;IACT,IAAI,EAAE,CAAC,CAAC;CACT;AAED,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAC,mBAAmB,CAoCtE,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,cAAc,CAAC,gBAAgB,CAqBhE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
const ArrowLeft2Icon = (props) => /* @__PURE__ */ jsx(
|
|
4
|
+
"svg",
|
|
5
|
+
{
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
width: "1em",
|
|
8
|
+
height: "1em",
|
|
9
|
+
fill: "none",
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
...props,
|
|
12
|
+
children: /* @__PURE__ */ jsx(
|
|
13
|
+
"path",
|
|
14
|
+
{
|
|
15
|
+
fill: "currentColor",
|
|
16
|
+
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"
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export { ArrowLeft2Icon as A };
|
|
@@ -0,0 +1,24 @@
|
|
|
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;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
const ArrowRight2Icon = (props) => /* @__PURE__ */ jsx(
|
|
4
|
+
"svg",
|
|
5
|
+
{
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
width: "1em",
|
|
8
|
+
height: "1em",
|
|
9
|
+
fill: "none",
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
...props,
|
|
12
|
+
children: /* @__PURE__ */ jsx(
|
|
13
|
+
"path",
|
|
14
|
+
{
|
|
15
|
+
stroke: "currentColor",
|
|
16
|
+
strokeLinecap: "round",
|
|
17
|
+
strokeLinejoin: "round",
|
|
18
|
+
strokeWidth: 1.5,
|
|
19
|
+
d: "m8.5 5 7 7-7 7"
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export { ArrowRight2Icon as A };
|
|
@@ -0,0 +1,27 @@
|
|
|
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;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('../assets/styles.css');const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
;/* empty css */
|
|
5
|
+
|
|
6
|
+
function styleBadge(options) {
|
|
7
|
+
const defaultClassName = "inline-flex items-center justify-center rounded-[20px]";
|
|
8
|
+
const typeClassName = {
|
|
9
|
+
twoTone: {
|
|
10
|
+
primary: "bg-primary-50 text-primary-600",
|
|
11
|
+
secondary: "bg-secondary-100 text-secondary-700",
|
|
12
|
+
gray: "bg-gray-100 text-gray-600",
|
|
13
|
+
success: "bg-success-50 text-success-800",
|
|
14
|
+
error: "bg-error-50 text-error-600",
|
|
15
|
+
warning: "bg-warning-50 text-warning-700"
|
|
16
|
+
},
|
|
17
|
+
solid: {
|
|
18
|
+
primary: "bg-primary-500 text-white",
|
|
19
|
+
secondary: "bg-secondary-600 text-white",
|
|
20
|
+
gray: "bg-gray-600 text-white",
|
|
21
|
+
success: "bg-success-600 text-white",
|
|
22
|
+
error: "bg-error-500 text-white",
|
|
23
|
+
warning: "bg-warning-500 text-black"
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const textSizeClassName = {
|
|
27
|
+
small: "font-oveline-demibold py-1 px-2 gap-[2px]",
|
|
28
|
+
medium: "font-caption-demibold py-1 px-[10px] gap-1",
|
|
29
|
+
large: "font-button-small py-2 px-4 gap-[6px]"
|
|
30
|
+
};
|
|
31
|
+
const numberSizeClassName = {
|
|
32
|
+
small: "font-caption-demibold py-[2px] px-[6px] min-w-5",
|
|
33
|
+
medium: "font-p3-medium px-[6px] min-w-6",
|
|
34
|
+
large: "font-h5-bold py-[2px] px-2 min-w-8"
|
|
35
|
+
};
|
|
36
|
+
return [
|
|
37
|
+
defaultClassName,
|
|
38
|
+
typeClassName[options.type][options.color],
|
|
39
|
+
options.valueType === "text" ? textSizeClassName[options.size] : numberSizeClassName[options.size],
|
|
40
|
+
options.className.length > 0 ? options.className : ""
|
|
41
|
+
].slice().join(" ");
|
|
42
|
+
}
|
|
43
|
+
function getIconSize(badgSize) {
|
|
44
|
+
if (badgSize === "small") return "w-3 h-3";
|
|
45
|
+
if (badgSize === "medium") return "w-[14px] h-[14px]";
|
|
46
|
+
return "w-4 h-4";
|
|
47
|
+
}
|
|
48
|
+
const Badge = (props) => {
|
|
49
|
+
const {
|
|
50
|
+
type = "solid",
|
|
51
|
+
color = "primary",
|
|
52
|
+
size = "medium",
|
|
53
|
+
valueType = "text",
|
|
54
|
+
value,
|
|
55
|
+
width,
|
|
56
|
+
className = ""
|
|
57
|
+
} = props;
|
|
58
|
+
const icon = props.icon;
|
|
59
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: styleBadge({ type, color, size, valueType, className }),
|
|
63
|
+
style: { width: width ?? "auto" },
|
|
64
|
+
children: [
|
|
65
|
+
icon && valueType === "text" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: getIconSize(size), children: icon }),
|
|
66
|
+
value
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
module.exports = Badge;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface BadgePropsBase {
|
|
3
|
+
type?: 'twoTone' | 'solid';
|
|
4
|
+
color?: 'primary' | 'secondary' | 'gray' | 'success' | 'error' | 'warning';
|
|
5
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
|
+
valueType?: 'text' | 'number';
|
|
7
|
+
value: string | number;
|
|
8
|
+
width?: string | number;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
interface BadgePropsWithIcon extends BadgePropsBase {
|
|
12
|
+
valueType?: 'text';
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
interface BadgePropsWithoutIcon extends Omit<BadgePropsBase, 'icon'> {
|
|
16
|
+
valueType: 'number';
|
|
17
|
+
}
|
|
18
|
+
type BadgeProps = BadgePropsWithIcon | BadgePropsWithoutIcon;
|
|
19
|
+
declare const Badge: (props: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default Badge;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/Badge/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,kBAAkB,CAAC;AAE1B,UAAU,cAAc;IACtB,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC3E,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC9B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,kBAAmB,SAAQ,cAAc;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,UAAU,qBAAsB,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC;IAClE,SAAS,EAAE,QAAQ,CAAC;CACrB;AAED,KAAK,UAAU,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;AAyD7D,QAAA,MAAM,KAAK,UAAW,UAAU,4CAsB/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import '../assets/styles.css';/* empty css */
|
|
3
|
+
|
|
4
|
+
function styleBadge(options) {
|
|
5
|
+
const defaultClassName = "inline-flex items-center justify-center rounded-[20px]";
|
|
6
|
+
const typeClassName = {
|
|
7
|
+
twoTone: {
|
|
8
|
+
primary: "bg-primary-50 text-primary-600",
|
|
9
|
+
secondary: "bg-secondary-100 text-secondary-700",
|
|
10
|
+
gray: "bg-gray-100 text-gray-600",
|
|
11
|
+
success: "bg-success-50 text-success-800",
|
|
12
|
+
error: "bg-error-50 text-error-600",
|
|
13
|
+
warning: "bg-warning-50 text-warning-700"
|
|
14
|
+
},
|
|
15
|
+
solid: {
|
|
16
|
+
primary: "bg-primary-500 text-white",
|
|
17
|
+
secondary: "bg-secondary-600 text-white",
|
|
18
|
+
gray: "bg-gray-600 text-white",
|
|
19
|
+
success: "bg-success-600 text-white",
|
|
20
|
+
error: "bg-error-500 text-white",
|
|
21
|
+
warning: "bg-warning-500 text-black"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const textSizeClassName = {
|
|
25
|
+
small: "font-oveline-demibold py-1 px-2 gap-[2px]",
|
|
26
|
+
medium: "font-caption-demibold py-1 px-[10px] gap-1",
|
|
27
|
+
large: "font-button-small py-2 px-4 gap-[6px]"
|
|
28
|
+
};
|
|
29
|
+
const numberSizeClassName = {
|
|
30
|
+
small: "font-caption-demibold py-[2px] px-[6px] min-w-5",
|
|
31
|
+
medium: "font-p3-medium px-[6px] min-w-6",
|
|
32
|
+
large: "font-h5-bold py-[2px] px-2 min-w-8"
|
|
33
|
+
};
|
|
34
|
+
return [
|
|
35
|
+
defaultClassName,
|
|
36
|
+
typeClassName[options.type][options.color],
|
|
37
|
+
options.valueType === "text" ? textSizeClassName[options.size] : numberSizeClassName[options.size],
|
|
38
|
+
options.className.length > 0 ? options.className : ""
|
|
39
|
+
].slice().join(" ");
|
|
40
|
+
}
|
|
41
|
+
function getIconSize(badgSize) {
|
|
42
|
+
if (badgSize === "small") return "w-3 h-3";
|
|
43
|
+
if (badgSize === "medium") return "w-[14px] h-[14px]";
|
|
44
|
+
return "w-4 h-4";
|
|
45
|
+
}
|
|
46
|
+
const Badge = (props) => {
|
|
47
|
+
const {
|
|
48
|
+
type = "solid",
|
|
49
|
+
color = "primary",
|
|
50
|
+
size = "medium",
|
|
51
|
+
valueType = "text",
|
|
52
|
+
value,
|
|
53
|
+
width,
|
|
54
|
+
className = ""
|
|
55
|
+
} = props;
|
|
56
|
+
const icon = props.icon;
|
|
57
|
+
return /* @__PURE__ */ jsxs(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: styleBadge({ type, color, size, valueType, className }),
|
|
61
|
+
style: { width: width ?? "auto" },
|
|
62
|
+
children: [
|
|
63
|
+
icon && valueType === "text" && /* @__PURE__ */ jsx("span", { className: getIconSize(size), children: icon }),
|
|
64
|
+
value
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export { Badge as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('../assets/styles.css');const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
const ArrowLeft2 = require('../ArrowLeft2-iZ0Au6Fn.cjs');
|
|
5
|
+
const clsx = require('../clsx-BtxeOLZW.cjs');
|
|
6
|
+
;/* empty css */
|
|
7
|
+
|
|
8
|
+
const Breadcrumb = (props) => {
|
|
9
|
+
const { items, pageTitle, className } = props;
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx.clsx("bg-gray-100 overflow-x-hidden w-full", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-x-1 w-full py-3 container", children: [
|
|
11
|
+
items.map((breadcrumbItem) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12
|
+
"a",
|
|
13
|
+
{
|
|
14
|
+
href: breadcrumbItem.link,
|
|
15
|
+
className: "transition flex items-center gap-x-1 text-gray-500 hover:text-primary-500",
|
|
16
|
+
children: [
|
|
17
|
+
breadcrumbItem.icon && breadcrumbItem.icon,
|
|
18
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-caption-demibold", children: breadcrumbItem.title }),
|
|
19
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20
|
+
ArrowLeft2.ArrowLeft2Icon,
|
|
21
|
+
{
|
|
22
|
+
width: 16,
|
|
23
|
+
height: 16
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
breadcrumbItem.link
|
|
29
|
+
)),
|
|
30
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-gray-500 font-caption-regular", children: pageTitle })
|
|
31
|
+
] }) });
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
module.exports = Breadcrumb;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface BreadcrumbProps {
|
|
3
|
+
items: {
|
|
4
|
+
link: string;
|
|
5
|
+
title: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
}[];
|
|
8
|
+
pageTitle: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const Breadcrumb: (props: BreadcrumbProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default Breadcrumb;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/Breadcrumb/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,kBAAkB,CAAC;AAE1B,UAAU,eAAe;IACvB,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,SAAS,CAAC;KAClB,EAAE,CAAC;IACJ,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,UAAU,UAAW,eAAe,4CAwBzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { A as ArrowLeft2Icon } from '../ArrowLeft2-BURhvXT2.js';
|
|
3
|
+
import { c as clsx } from '../clsx-ChV9xqsO.js';
|
|
4
|
+
import '../assets/styles.css';/* empty css */
|
|
5
|
+
|
|
6
|
+
const Breadcrumb = (props) => {
|
|
7
|
+
const { items, pageTitle, className } = props;
|
|
8
|
+
return /* @__PURE__ */ jsx("div", { className: clsx("bg-gray-100 overflow-x-hidden w-full", className), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-1 w-full py-3 container", children: [
|
|
9
|
+
items.map((breadcrumbItem) => /* @__PURE__ */ jsxs(
|
|
10
|
+
"a",
|
|
11
|
+
{
|
|
12
|
+
href: breadcrumbItem.link,
|
|
13
|
+
className: "transition flex items-center gap-x-1 text-gray-500 hover:text-primary-500",
|
|
14
|
+
children: [
|
|
15
|
+
breadcrumbItem.icon && breadcrumbItem.icon,
|
|
16
|
+
/* @__PURE__ */ jsx("div", { className: "font-caption-demibold", children: breadcrumbItem.title }),
|
|
17
|
+
/* @__PURE__ */ jsx(
|
|
18
|
+
ArrowLeft2Icon,
|
|
19
|
+
{
|
|
20
|
+
width: 16,
|
|
21
|
+
height: 16
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
breadcrumbItem.link
|
|
27
|
+
)),
|
|
28
|
+
/* @__PURE__ */ jsx("div", { className: "text-gray-500 font-caption-regular", children: pageTitle })
|
|
29
|
+
] }) });
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { Breadcrumb as default };
|