@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.
Files changed (61) hide show
  1. package/dist/Accordion/index.cjs +1 -11
  2. package/dist/Accordion/index.js +5 -1
  3. package/dist/AccordionItem-eMnIUJ1V.cjs +1 -0
  4. package/dist/AccordionItem-tKSPLNKs.js +91 -0
  5. package/dist/Alert/index.cjs +1 -254
  6. package/dist/Alert/index.js +108 -123
  7. package/dist/ArrowLeft2-B76dkC-C.cjs +1 -0
  8. package/dist/{ArrowLeft2-BURhvXT2.js → ArrowLeft2-jP2w1vwt.js} +7 -7
  9. package/dist/ArrowRight2-CYowPzS8.cjs +1 -0
  10. package/dist/{ArrowRight2-DCxJPvNC.js → ArrowRight2-CcHdxGRE.js} +7 -7
  11. package/dist/Badge/index.cjs +1 -72
  12. package/dist/Badge/index.js +28 -34
  13. package/dist/Breadcrumb/index.cjs +1 -43
  14. package/dist/Breadcrumb/index.js +20 -20
  15. package/dist/Button/index.cjs +1 -119
  16. package/dist/Button/index.js +71 -78
  17. package/dist/Divider/index.cjs +1 -25
  18. package/dist/Divider/index.js +8 -12
  19. package/dist/Form/Checkbox/index.cjs +1 -72
  20. package/dist/Form/Checkbox/index.js +22 -26
  21. package/dist/Form/Input/index.cjs +1 -182
  22. package/dist/Form/Input/index.js +60 -68
  23. package/dist/Form/RadioButton/index.cjs +1 -22
  24. package/dist/Form/RadioButton/index.js +13 -13
  25. package/dist/Form/Textarea/index.cjs +1 -27
  26. package/dist/Form/Textarea/index.js +18 -18
  27. package/dist/Pagination/index.cjs +1 -128
  28. package/dist/Pagination/index.js +82 -102
  29. package/dist/{SelectableInputWrapper-BIBVazbq.js → SelectableInputWrapper-B3ylMTsl.js} +37 -38
  30. package/dist/SelectableInputWrapper-C9x3IShC.cjs +1 -0
  31. package/dist/Slide-C506y48c.js +233 -0
  32. package/dist/Slide-Zmb0vKbn.cjs +1 -0
  33. package/dist/Slider/Navigation.d.ts +9 -0
  34. package/dist/Slider/Navigation.d.ts.map +1 -0
  35. package/dist/Slider/NavigationDot.d.ts +0 -3
  36. package/dist/Slider/NavigationDot.d.ts.map +1 -1
  37. package/dist/Slider/Slider.d.ts.map +1 -1
  38. package/dist/Slider/context.d.ts +3 -7
  39. package/dist/Slider/context.d.ts.map +1 -1
  40. package/dist/Slider/index.cjs +1 -11
  41. package/dist/Slider/index.js +5 -1
  42. package/dist/TextFieldWrapper-Cg4f8_zY.js +151 -0
  43. package/dist/TextFieldWrapper-Ci0-vx4J.cjs +1 -0
  44. package/dist/assets/Button.css +1 -1713
  45. package/dist/assets/styles.css +1 -1649
  46. package/dist/clsx-C11secjj.cjs +1 -0
  47. package/dist/clsx-OuTLNxxd.js +16 -0
  48. package/dist/index.cjs +1 -34
  49. package/dist/index.js +28 -12
  50. package/package.json +1 -1
  51. package/dist/AccordionItem-BFDuboYi.js +0 -103
  52. package/dist/AccordionItem-C3MiOBH7.cjs +0 -106
  53. package/dist/ArrowLeft2-iZ0Au6Fn.cjs +0 -24
  54. package/dist/ArrowRight2-DTuru_sP.cjs +0 -27
  55. package/dist/SelectableInputWrapper-g7YtIiBW.cjs +0 -79
  56. package/dist/Slide-BhWFQV8r.js +0 -234
  57. package/dist/Slide-BzXDEkqH.cjs +0 -237
  58. package/dist/TextFieldWrapper-BkoKcbvs.js +0 -167
  59. package/dist/TextFieldWrapper-D-DH5_DG.cjs +0 -169
  60. package/dist/clsx-BtxeOLZW.cjs +0 -5
  61. package/dist/clsx-ChV9xqsO.js +0 -3
@@ -1,10 +1,9 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { c as clsx } from '../clsx-ChV9xqsO.js';
3
- import { useState } from 'react';
4
- import Button from '../Button/index.js';
1
+ import { jsx as i, jsxs as g } from "react/jsx-runtime";
2
+ import { c as l } from "../clsx-OuTLNxxd.js";
3
+ import { useState as p } from "react";
4
+ import c from "../Button/index.js";
5
5
  import '../assets/styles.css';/* empty css */
6
-
7
- const CheckCircleBoldIcon = (props) => /* @__PURE__ */ jsx(
6
+ const w = (t) => /* @__PURE__ */ i(
8
7
  "svg",
9
8
  {
10
9
  xmlns: "http://www.w3.org/2000/svg",
@@ -12,8 +11,8 @@ const CheckCircleBoldIcon = (props) => /* @__PURE__ */ jsx(
12
11
  height: "1em",
13
12
  fill: "none",
14
13
  viewBox: "0 0 24 24",
15
- ...props,
16
- children: /* @__PURE__ */ jsx(
14
+ ...t,
15
+ children: /* @__PURE__ */ i(
17
16
  "path",
18
17
  {
19
18
  fill: "currentColor",
@@ -23,9 +22,7 @@ const CheckCircleBoldIcon = (props) => /* @__PURE__ */ jsx(
23
22
  }
24
23
  )
25
24
  }
26
- );
27
-
28
- const CloseRemoveIcon = (props) => /* @__PURE__ */ jsx(
25
+ ), f = (t) => /* @__PURE__ */ i(
29
26
  "svg",
30
27
  {
31
28
  xmlns: "http://www.w3.org/2000/svg",
@@ -33,8 +30,8 @@ const CloseRemoveIcon = (props) => /* @__PURE__ */ jsx(
33
30
  height: "1em",
34
31
  fill: "none",
35
32
  viewBox: "0 0 24 24",
36
- ...props,
37
- children: /* @__PURE__ */ jsx(
33
+ ...t,
34
+ children: /* @__PURE__ */ i(
38
35
  "path",
39
36
  {
40
37
  fill: "currentColor",
@@ -42,9 +39,7 @@ const CloseRemoveIcon = (props) => /* @__PURE__ */ jsx(
42
39
  }
43
40
  )
44
41
  }
45
- );
46
-
47
- const DangerBoldIcon = (props) => /* @__PURE__ */ jsx(
42
+ ), y = (t) => /* @__PURE__ */ i(
48
43
  "svg",
49
44
  {
50
45
  xmlns: "http://www.w3.org/2000/svg",
@@ -52,8 +47,8 @@ const DangerBoldIcon = (props) => /* @__PURE__ */ jsx(
52
47
  height: "1em",
53
48
  fill: "none",
54
49
  viewBox: "0 0 24 24",
55
- ...props,
56
- children: /* @__PURE__ */ jsx(
50
+ ...t,
51
+ children: /* @__PURE__ */ i(
57
52
  "path",
58
53
  {
59
54
  fill: "currentColor",
@@ -61,9 +56,7 @@ const DangerBoldIcon = (props) => /* @__PURE__ */ jsx(
61
56
  }
62
57
  )
63
58
  }
64
- );
65
-
66
- const InfoCircleBoldIcon = (props) => /* @__PURE__ */ jsx(
59
+ ), v = (t) => /* @__PURE__ */ i(
67
60
  "svg",
68
61
  {
69
62
  xmlns: "http://www.w3.org/2000/svg",
@@ -71,8 +64,8 @@ const InfoCircleBoldIcon = (props) => /* @__PURE__ */ jsx(
71
64
  height: "1em",
72
65
  fill: "none",
73
66
  viewBox: "0 0 24 24",
74
- ...props,
75
- children: /* @__PURE__ */ jsx(
67
+ ...t,
68
+ children: /* @__PURE__ */ i(
76
69
  "path",
77
70
  {
78
71
  fill: "currentColor",
@@ -82,9 +75,7 @@ const InfoCircleBoldIcon = (props) => /* @__PURE__ */ jsx(
82
75
  }
83
76
  )
84
77
  }
85
- );
86
-
87
- const alertVariantClassNames = {
78
+ ), o = {
88
79
  container: {
89
80
  warning: "dgs-ui-kit-bg-warning-50 dgs-ui-kit-border-warning-200",
90
81
  primary: "dgs-ui-kit-bg-primary-50 dgs-ui-kit-border-primary-100",
@@ -120,8 +111,7 @@ const alertVariantClassNames = {
120
111
  success: "dgs-ui-kit-text-success-800",
121
112
  gray: "dgs-ui-kit-text-gray-700"
122
113
  }
123
- };
124
- const alertSizeClassNames = {
114
+ }, s = {
125
115
  container: {
126
116
  large: "dgs-ui-kit-p-4",
127
117
  small: "dgs-ui-kit-p-3"
@@ -143,110 +133,105 @@ const alertSizeClassNames = {
143
133
  small: "dgs-ui-kit-font-p3-regular"
144
134
  }
145
135
  };
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,
136
+ function b(t, r) {
137
+ let e = v;
138
+ return t === "error" ? e = y : t === "success" && (e = w), /* @__PURE__ */ i(
139
+ e,
153
140
  {
154
- className: clsx(
141
+ className: l(
155
142
  "dgs-ui-kit-shrink-0 dgs-ui-kit-my-[2px]",
156
- alertVariantClassNames.icon[variant]
143
+ o.icon[t]
157
144
  ),
158
- width: alertSizeClassNames.icon[size],
159
- height: alertSizeClassNames.icon[size]
145
+ width: s.icon[r],
146
+ height: s.icon[r]
160
147
  }
161
148
  );
162
149
  }
163
- const Alert = (props) => {
150
+ const M = (t) => {
164
151
  const {
165
- variant = "primary",
166
- size = "small",
167
- title,
168
- text,
169
- primaryButton,
170
- outlineButton,
171
- closable,
172
- className
173
- } = props;
174
- const [show, setShow] = useState(true);
175
- if (show)
176
- return /* @__PURE__ */ jsxs(
177
- "div",
178
- {
179
- className: clsx(
180
- "dgs-ui-kit-w-full dgs-ui-kit-flex dgs-ui-kit-gap-x-3 dgs-ui-kit-rounded-xl dgs-ui-kit-border dgs-ui-kit-border-solid",
181
- alertVariantClassNames.container[variant],
182
- alertSizeClassNames.container[size],
183
- className
184
- ),
185
- children: [
186
- getAlertIcon(variant, size),
187
- /* @__PURE__ */ jsxs("div", { className: "dgs-ui-kit-flex dgs-ui-kit-flex-col dgs-ui-kit-flex-1", children: [
188
- Boolean(title) && /* @__PURE__ */ jsx(
189
- "div",
190
- {
191
- className: clsx(
192
- alertVariantClassNames.title[variant],
193
- alertSizeClassNames.title[size]
152
+ variant: r = "primary",
153
+ size: e = "small",
154
+ title: d,
155
+ text: u,
156
+ primaryButton: a,
157
+ outlineButton: n,
158
+ closable: m,
159
+ className: k
160
+ } = t, [x, h] = p(!0);
161
+ return x ? /* @__PURE__ */ g(
162
+ "div",
163
+ {
164
+ className: l(
165
+ "dgs-ui-kit-w-full dgs-ui-kit-flex dgs-ui-kit-gap-x-3 dgs-ui-kit-rounded-xl dgs-ui-kit-border dgs-ui-kit-border-solid",
166
+ o.container[r],
167
+ s.container[e],
168
+ k
169
+ ),
170
+ children: [
171
+ b(r, e),
172
+ /* @__PURE__ */ g("div", { className: "dgs-ui-kit-flex dgs-ui-kit-flex-col dgs-ui-kit-flex-1", children: [
173
+ !!d && /* @__PURE__ */ i(
174
+ "div",
175
+ {
176
+ className: l(
177
+ o.title[r],
178
+ s.title[e]
179
+ ),
180
+ children: d
181
+ }
182
+ ),
183
+ /* @__PURE__ */ i("p", { className: l(o.text[r], s.text[e]), children: u }),
184
+ (!!a?.text || !!n?.text) && /* @__PURE__ */ g(
185
+ "div",
186
+ {
187
+ className: l(
188
+ "dgs-ui-kit-flex dgs-ui-kit-gap-x-2 dgs-ui-kit-items-center",
189
+ e === "large" ? "dgs-ui-kit-mt-4" : "dgs-ui-kit-mt-3"
190
+ ),
191
+ children: [
192
+ !!a?.text && /* @__PURE__ */ i(
193
+ c,
194
+ {
195
+ variant: "primary",
196
+ color: r,
197
+ size: "small",
198
+ ...a,
199
+ children: a?.text
200
+ }
194
201
  ),
195
- children: title
196
- }
197
- ),
198
- /* @__PURE__ */ jsx("p", { className: clsx(alertVariantClassNames.text[variant], alertSizeClassNames.text[size]), children: text }),
199
- (Boolean(primaryButton?.text) || Boolean(outlineButton?.text)) && /* @__PURE__ */ jsxs(
200
- "div",
202
+ !!n?.text && /* @__PURE__ */ i(
203
+ c,
204
+ {
205
+ variant: "outline",
206
+ color: r,
207
+ size: "small",
208
+ ...n,
209
+ children: n?.text
210
+ }
211
+ )
212
+ ]
213
+ }
214
+ )
215
+ ] }),
216
+ m && /* @__PURE__ */ i(
217
+ "button",
218
+ {
219
+ className: "dgs-ui-kit-shrink-0 dgs-ui-kit-my-[2px] dgs-ui-kit-h-fit",
220
+ onClick: () => h(!1),
221
+ children: /* @__PURE__ */ i(
222
+ f,
201
223
  {
202
- className: clsx(
203
- "dgs-ui-kit-flex dgs-ui-kit-gap-x-2 dgs-ui-kit-items-center",
204
- size === "large" ? "dgs-ui-kit-mt-4" : "dgs-ui-kit-mt-3"
205
- ),
206
- children: [
207
- Boolean(primaryButton?.text) && /* @__PURE__ */ jsx(
208
- Button,
209
- {
210
- variant: "primary",
211
- color: variant,
212
- size: "small",
213
- ...primaryButton,
214
- children: primaryButton?.text
215
- }
216
- ),
217
- Boolean(outlineButton?.text) && /* @__PURE__ */ jsx(
218
- Button,
219
- {
220
- variant: "outline",
221
- color: variant,
222
- size: "small",
223
- ...outlineButton,
224
- children: outlineButton?.text
225
- }
226
- )
227
- ]
224
+ className: l(o.close[r]),
225
+ width: s.close[e],
226
+ height: s.close[e]
228
227
  }
229
228
  )
230
- ] }),
231
- closable && /* @__PURE__ */ jsx(
232
- "button",
233
- {
234
- className: "dgs-ui-kit-shrink-0 dgs-ui-kit-my-[2px] dgs-ui-kit-h-fit",
235
- onClick: () => setShow(false),
236
- children: /* @__PURE__ */ jsx(
237
- CloseRemoveIcon,
238
- {
239
- className: clsx(alertVariantClassNames.close[variant]),
240
- width: alertSizeClassNames.close[size],
241
- height: alertSizeClassNames.close[size]
242
- }
243
- )
244
- }
245
- )
246
- ]
247
- }
248
- );
249
- return null;
229
+ }
230
+ )
231
+ ]
232
+ }
233
+ ) : null;
234
+ };
235
+ export {
236
+ M as default
250
237
  };
251
-
252
- export { Alert as default };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),l=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...t,children:e.jsx("path",{fill:"currentColor",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"})});exports.ArrowLeft2Icon=l;
@@ -1,6 +1,5 @@
1
- import { jsx } from 'react/jsx-runtime';
2
-
3
- const ArrowLeft2Icon = (props) => /* @__PURE__ */ jsx(
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ const t = (o) => /* @__PURE__ */ l(
4
3
  "svg",
5
4
  {
6
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -8,8 +7,8 @@ const ArrowLeft2Icon = (props) => /* @__PURE__ */ jsx(
8
7
  height: "1em",
9
8
  fill: "none",
10
9
  viewBox: "0 0 24 24",
11
- ...props,
12
- children: /* @__PURE__ */ jsx(
10
+ ...o,
11
+ children: /* @__PURE__ */ l(
13
12
  "path",
14
13
  {
15
14
  fill: "currentColor",
@@ -18,5 +17,6 @@ const ArrowLeft2Icon = (props) => /* @__PURE__ */ jsx(
18
17
  )
19
18
  }
20
19
  );
21
-
22
- export { ArrowLeft2Icon as A };
20
+ export {
21
+ t as A
22
+ };
@@ -0,0 +1 @@
1
+ "use strict";const o=require("react/jsx-runtime"),t=r=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...r,children:o.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m8.5 5 7 7-7 7"})});exports.ArrowRight2Icon=t;
@@ -1,6 +1,5 @@
1
- import { jsx } from 'react/jsx-runtime';
2
-
3
- const ArrowRight2Icon = (props) => /* @__PURE__ */ jsx(
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ const e = (r) => /* @__PURE__ */ o(
4
3
  "svg",
5
4
  {
6
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -8,8 +7,8 @@ const ArrowRight2Icon = (props) => /* @__PURE__ */ jsx(
8
7
  height: "1em",
9
8
  fill: "none",
10
9
  viewBox: "0 0 24 24",
11
- ...props,
12
- children: /* @__PURE__ */ jsx(
10
+ ...r,
11
+ children: /* @__PURE__ */ o(
13
12
  "path",
14
13
  {
15
14
  stroke: "currentColor",
@@ -21,5 +20,6 @@ const ArrowRight2Icon = (props) => /* @__PURE__ */ jsx(
21
20
  )
22
21
  }
23
22
  );
24
-
25
- export { ArrowRight2Icon as A };
23
+ export {
24
+ e as A
25
+ };
@@ -1,72 +1 @@
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 = "dgs-ui-kit-inline-flex dgs-ui-kit-items-center dgs-ui-kit-justify-center dgs-ui-kit-rounded-[20px]";
8
- const typeClassName = {
9
- twoTone: {
10
- primary: "dgs-ui-kit-bg-primary-50 dgs-ui-kit-text-primary-600",
11
- secondary: "dgs-ui-kit-bg-secondary-100 dgs-ui-kit-text-secondary-700",
12
- gray: "dgs-ui-kit-bg-gray-100 dgs-ui-kit-text-gray-600",
13
- success: "dgs-ui-kit-bg-success-50 dgs-ui-kit-text-success-800",
14
- error: "dgs-ui-kit-bg-error-50 dgs-ui-kit-text-error-600",
15
- warning: "dgs-ui-kit-bg-warning-50 dgs-ui-kit-text-warning-700"
16
- },
17
- solid: {
18
- primary: "dgs-ui-kit-bg-primary-500 dgs-ui-kit-text-white",
19
- secondary: "dgs-ui-kit-bg-secondary-600 dgs-ui-kit-text-white",
20
- gray: "dgs-ui-kit-bg-gray-600 dgs-ui-kit-text-white",
21
- success: "dgs-ui-kit-bg-success-600 dgs-ui-kit-text-white",
22
- error: "dgs-ui-kit-bg-error-500 dgs-ui-kit-text-white",
23
- warning: "dgs-ui-kit-bg-warning-500 dgs-ui-kit-text-black"
24
- }
25
- };
26
- const textSizeClassName = {
27
- small: "dgs-ui-kit-font-oveline-demibold dgs-ui-kit-py-1 dgs-ui-kit-px-2 dgs-ui-kit-gap-[2px]",
28
- medium: "dgs-ui-kit-font-caption-demibold dgs-ui-kit-py-1 dgs-ui-kit-px-[10px] dgs-ui-kit-gap-1",
29
- large: "dgs-ui-kit-font-button-small dgs-ui-kit-py-2 dgs-ui-kit-px-4 dgs-ui-kit-gap-[6px]"
30
- };
31
- const numberSizeClassName = {
32
- small: "dgs-ui-kit-font-caption-demibold dgs-ui-kit-py-[2px] dgs-ui-kit-px-[6px] dgs-ui-kit-min-w-5",
33
- medium: "dgs-ui-kit-font-p3-medium dgs-ui-kit-px-[6px] dgs-ui-kit-min-w-6",
34
- large: "dgs-ui-kit-font-h5-bold dgs-ui-kit-py-[2px] dgs-ui-kit-px-2 dgs-ui-kit-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 "dgs-ui-kit-w-3 dgs-ui-kit-h-3";
45
- if (badgSize === "medium") return "dgs-ui-kit-w-[14px] dgs-ui-kit-h-[14px]";
46
- return "dgs-ui-kit-w-4 dgs-ui-kit-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;
1
+ "use strict";require('../assets/styles.css');const d=require("react/jsx-runtime");;/* empty css */function n(i){const e="dgs-ui-kit-inline-flex dgs-ui-kit-items-center dgs-ui-kit-justify-center dgs-ui-kit-rounded-[20px]",g={twoTone:{primary:"dgs-ui-kit-bg-primary-50 dgs-ui-kit-text-primary-600",secondary:"dgs-ui-kit-bg-secondary-100 dgs-ui-kit-text-secondary-700",gray:"dgs-ui-kit-bg-gray-100 dgs-ui-kit-text-gray-600",success:"dgs-ui-kit-bg-success-50 dgs-ui-kit-text-success-800",error:"dgs-ui-kit-bg-error-50 dgs-ui-kit-text-error-600",warning:"dgs-ui-kit-bg-warning-50 dgs-ui-kit-text-warning-700"},solid:{primary:"dgs-ui-kit-bg-primary-500 dgs-ui-kit-text-white",secondary:"dgs-ui-kit-bg-secondary-600 dgs-ui-kit-text-white",gray:"dgs-ui-kit-bg-gray-600 dgs-ui-kit-text-white",success:"dgs-ui-kit-bg-success-600 dgs-ui-kit-text-white",error:"dgs-ui-kit-bg-error-500 dgs-ui-kit-text-white",warning:"dgs-ui-kit-bg-warning-500 dgs-ui-kit-text-black"}},t={small:"dgs-ui-kit-font-oveline-demibold dgs-ui-kit-py-1 dgs-ui-kit-px-2 dgs-ui-kit-gap-[2px]",medium:"dgs-ui-kit-font-caption-demibold dgs-ui-kit-py-1 dgs-ui-kit-px-[10px] dgs-ui-kit-gap-1",large:"dgs-ui-kit-font-button-small dgs-ui-kit-py-2 dgs-ui-kit-px-4 dgs-ui-kit-gap-[6px]"},s={small:"dgs-ui-kit-font-caption-demibold dgs-ui-kit-py-[2px] dgs-ui-kit-px-[6px] dgs-ui-kit-min-w-5",medium:"dgs-ui-kit-font-p3-medium dgs-ui-kit-px-[6px] dgs-ui-kit-min-w-6",large:"dgs-ui-kit-font-h5-bold dgs-ui-kit-py-[2px] dgs-ui-kit-px-2 dgs-ui-kit-min-w-8"};return[e,g[i.type][i.color],i.valueType==="text"?t[i.size]:s[i.size],i.className.length>0?i.className:""].slice().join(" ")}function c(i){return i==="small"?"dgs-ui-kit-w-3 dgs-ui-kit-h-3":i==="medium"?"dgs-ui-kit-w-[14px] dgs-ui-kit-h-[14px]":"dgs-ui-kit-w-4 dgs-ui-kit-h-4"}const l=i=>{const{type:e="solid",color:g="primary",size:t="medium",valueType:s="text",value:r,width:a,className:k=""}=i,u=i.icon;return d.jsxs("div",{className:n({type:e,color:g,size:t,valueType:s,className:k}),style:{width:a??"auto"},children:[u&&s==="text"&&d.jsx("span",{className:c(t),children:u}),r]})};module.exports=l;
@@ -1,9 +1,7 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import { jsxs as k, jsx as n } from "react/jsx-runtime";
2
2
  import '../assets/styles.css';/* empty css */
3
-
4
- function styleBadge(options) {
5
- const defaultClassName = "dgs-ui-kit-inline-flex dgs-ui-kit-items-center dgs-ui-kit-justify-center dgs-ui-kit-rounded-[20px]";
6
- const typeClassName = {
3
+ function c(i) {
4
+ const e = "dgs-ui-kit-inline-flex dgs-ui-kit-items-center dgs-ui-kit-justify-center dgs-ui-kit-rounded-[20px]", g = {
7
5
  twoTone: {
8
6
  primary: "dgs-ui-kit-bg-primary-50 dgs-ui-kit-text-primary-600",
9
7
  secondary: "dgs-ui-kit-bg-secondary-100 dgs-ui-kit-text-secondary-700",
@@ -20,51 +18,47 @@ function styleBadge(options) {
20
18
  error: "dgs-ui-kit-bg-error-500 dgs-ui-kit-text-white",
21
19
  warning: "dgs-ui-kit-bg-warning-500 dgs-ui-kit-text-black"
22
20
  }
23
- };
24
- const textSizeClassName = {
21
+ }, t = {
25
22
  small: "dgs-ui-kit-font-oveline-demibold dgs-ui-kit-py-1 dgs-ui-kit-px-2 dgs-ui-kit-gap-[2px]",
26
23
  medium: "dgs-ui-kit-font-caption-demibold dgs-ui-kit-py-1 dgs-ui-kit-px-[10px] dgs-ui-kit-gap-1",
27
24
  large: "dgs-ui-kit-font-button-small dgs-ui-kit-py-2 dgs-ui-kit-px-4 dgs-ui-kit-gap-[6px]"
28
- };
29
- const numberSizeClassName = {
25
+ }, s = {
30
26
  small: "dgs-ui-kit-font-caption-demibold dgs-ui-kit-py-[2px] dgs-ui-kit-px-[6px] dgs-ui-kit-min-w-5",
31
27
  medium: "dgs-ui-kit-font-p3-medium dgs-ui-kit-px-[6px] dgs-ui-kit-min-w-6",
32
28
  large: "dgs-ui-kit-font-h5-bold dgs-ui-kit-py-[2px] dgs-ui-kit-px-2 dgs-ui-kit-min-w-8"
33
29
  };
34
30
  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 : ""
31
+ e,
32
+ g[i.type][i.color],
33
+ i.valueType === "text" ? t[i.size] : s[i.size],
34
+ i.className.length > 0 ? i.className : ""
39
35
  ].slice().join(" ");
40
36
  }
41
- function getIconSize(badgSize) {
42
- if (badgSize === "small") return "dgs-ui-kit-w-3 dgs-ui-kit-h-3";
43
- if (badgSize === "medium") return "dgs-ui-kit-w-[14px] dgs-ui-kit-h-[14px]";
44
- return "dgs-ui-kit-w-4 dgs-ui-kit-h-4";
37
+ function l(i) {
38
+ return i === "small" ? "dgs-ui-kit-w-3 dgs-ui-kit-h-3" : i === "medium" ? "dgs-ui-kit-w-[14px] dgs-ui-kit-h-[14px]" : "dgs-ui-kit-w-4 dgs-ui-kit-h-4";
45
39
  }
46
- const Badge = (props) => {
40
+ const x = (i) => {
47
41
  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(
42
+ type: e = "solid",
43
+ color: g = "primary",
44
+ size: t = "medium",
45
+ valueType: s = "text",
46
+ value: u,
47
+ width: r,
48
+ className: a = ""
49
+ } = i, d = i.icon;
50
+ return /* @__PURE__ */ k(
58
51
  "div",
59
52
  {
60
- className: styleBadge({ type, color, size, valueType, className }),
61
- style: { width: width ?? "auto" },
53
+ className: c({ type: e, color: g, size: t, valueType: s, className: a }),
54
+ style: { width: r ?? "auto" },
62
55
  children: [
63
- icon && valueType === "text" && /* @__PURE__ */ jsx("span", { className: getIconSize(size), children: icon }),
64
- value
56
+ d && s === "text" && /* @__PURE__ */ n("span", { className: l(t), children: d }),
57
+ u
65
58
  ]
66
59
  }
67
60
  );
68
61
  };
69
-
70
- export { Badge as default };
62
+ export {
63
+ x as default
64
+ };
@@ -1,43 +1 @@
1
- 'use strict';
2
-
3
- require('../assets/styles.css');const jsxRuntime = require('react/jsx-runtime');
4
- const clsx = require('../clsx-BtxeOLZW.cjs');
5
- const ArrowLeft2 = require('../ArrowLeft2-iZ0Au6Fn.cjs');
6
- ;/* empty css */
7
-
8
- const Breadcrumb = (props) => {
9
- const { items, pageTitle, className } = props;
10
- return /* @__PURE__ */ jsxRuntime.jsx(
11
- "div",
12
- {
13
- className: clsx.clsx(
14
- "dgs-ui-kit-bg-gray-100 dgs-ui-kit-overflow-x-hidden dgs-ui-kit-w-full",
15
- className
16
- ),
17
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-x-1 dgs-ui-kit-w-full dgs-ui-kit-py-3 dgs-ui-kit-container", children: [
18
- items.map((breadcrumbItem) => /* @__PURE__ */ jsxRuntime.jsxs(
19
- "a",
20
- {
21
- href: breadcrumbItem.link,
22
- className: "dgs-ui-kit-transition dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-x-1 dgs-ui-kit-text-gray-500 hover:dgs-ui-kit-text-primary-500",
23
- children: [
24
- breadcrumbItem.icon && breadcrumbItem.icon,
25
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "dgs-ui-kit-font-caption-demibold", children: breadcrumbItem.title }),
26
- /* @__PURE__ */ jsxRuntime.jsx(
27
- ArrowLeft2.ArrowLeft2Icon,
28
- {
29
- width: 16,
30
- height: 16
31
- }
32
- )
33
- ]
34
- },
35
- breadcrumbItem.link
36
- )),
37
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "dgs-ui-kit-text-gray-500 dgs-ui-kit-font-caption-regular", children: pageTitle })
38
- ] })
39
- }
40
- );
41
- };
42
-
43
- module.exports = Breadcrumb;
1
+ "use strict";require('../assets/styles.css');const i=require("react/jsx-runtime"),n=require("../clsx-C11secjj.cjs"),g=require("../ArrowLeft2-B76dkC-C.cjs");;/* empty css */const l=t=>{const{items:e,pageTitle:d,className:r}=t;return i.jsx("div",{className:n.clsx("dgs-ui-kit-bg-gray-100 dgs-ui-kit-overflow-x-hidden dgs-ui-kit-w-full",r),children:i.jsxs("div",{className:"dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-x-1 dgs-ui-kit-w-full dgs-ui-kit-py-3 dgs-ui-kit-container",children:[e.map(s=>i.jsxs("a",{href:s.link,className:"dgs-ui-kit-transition dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-x-1 dgs-ui-kit-text-gray-500 hover:dgs-ui-kit-text-primary-500",children:[s.icon&&s.icon,i.jsx("div",{className:"dgs-ui-kit-font-caption-demibold",children:s.title}),i.jsx(g.ArrowLeft2Icon,{width:16,height:16})]},s.link)),i.jsx("div",{className:"dgs-ui-kit-text-gray-500 dgs-ui-kit-font-caption-regular",children:d})]})})};module.exports=l;
@@ -1,28 +1,27 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { c as clsx } from '../clsx-ChV9xqsO.js';
3
- import { A as ArrowLeft2Icon } from '../ArrowLeft2-BURhvXT2.js';
1
+ import { jsx as t, jsxs as s } from "react/jsx-runtime";
2
+ import { c as l } from "../clsx-OuTLNxxd.js";
3
+ import { A as r } from "../ArrowLeft2-jP2w1vwt.js";
4
4
  import '../assets/styles.css';/* empty css */
5
-
6
- const Breadcrumb = (props) => {
7
- const { items, pageTitle, className } = props;
8
- return /* @__PURE__ */ jsx(
5
+ const u = (e) => {
6
+ const { items: d, pageTitle: a, className: g } = e;
7
+ return /* @__PURE__ */ t(
9
8
  "div",
10
9
  {
11
- className: clsx(
10
+ className: l(
12
11
  "dgs-ui-kit-bg-gray-100 dgs-ui-kit-overflow-x-hidden dgs-ui-kit-w-full",
13
- className
12
+ g
14
13
  ),
15
- children: /* @__PURE__ */ jsxs("div", { className: "dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-x-1 dgs-ui-kit-w-full dgs-ui-kit-py-3 dgs-ui-kit-container", children: [
16
- items.map((breadcrumbItem) => /* @__PURE__ */ jsxs(
14
+ children: /* @__PURE__ */ s("div", { className: "dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-x-1 dgs-ui-kit-w-full dgs-ui-kit-py-3 dgs-ui-kit-container", children: [
15
+ d.map((i) => /* @__PURE__ */ s(
17
16
  "a",
18
17
  {
19
- href: breadcrumbItem.link,
18
+ href: i.link,
20
19
  className: "dgs-ui-kit-transition dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-x-1 dgs-ui-kit-text-gray-500 hover:dgs-ui-kit-text-primary-500",
21
20
  children: [
22
- breadcrumbItem.icon && breadcrumbItem.icon,
23
- /* @__PURE__ */ jsx("div", { className: "dgs-ui-kit-font-caption-demibold", children: breadcrumbItem.title }),
24
- /* @__PURE__ */ jsx(
25
- ArrowLeft2Icon,
21
+ i.icon && i.icon,
22
+ /* @__PURE__ */ t("div", { className: "dgs-ui-kit-font-caption-demibold", children: i.title }),
23
+ /* @__PURE__ */ t(
24
+ r,
26
25
  {
27
26
  width: 16,
28
27
  height: 16
@@ -30,12 +29,13 @@ const Breadcrumb = (props) => {
30
29
  )
31
30
  ]
32
31
  },
33
- breadcrumbItem.link
32
+ i.link
34
33
  )),
35
- /* @__PURE__ */ jsx("div", { className: "dgs-ui-kit-text-gray-500 dgs-ui-kit-font-caption-regular", children: pageTitle })
34
+ /* @__PURE__ */ t("div", { className: "dgs-ui-kit-text-gray-500 dgs-ui-kit-font-caption-regular", children: a })
36
35
  ] })
37
36
  }
38
37
  );
39
38
  };
40
-
41
- export { Breadcrumb as default };
39
+ export {
40
+ u as default
41
+ };