@dgshahr/ui-kit 0.0.5 → 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 (73) hide show
  1. package/dist/Accordion/AccordionItem.d.ts.map +1 -1
  2. package/dist/Accordion/index.cjs +1 -11
  3. package/dist/Accordion/index.js +5 -1
  4. package/dist/AccordionItem-eMnIUJ1V.cjs +1 -0
  5. package/dist/AccordionItem-tKSPLNKs.js +91 -0
  6. package/dist/Alert/index.cjs +1 -242
  7. package/dist/Alert/index.d.ts.map +1 -1
  8. package/dist/Alert/index.js +141 -144
  9. package/dist/ArrowLeft2-B76dkC-C.cjs +1 -0
  10. package/dist/{ArrowLeft2-BURhvXT2.js → ArrowLeft2-jP2w1vwt.js} +7 -7
  11. package/dist/ArrowRight2-CYowPzS8.cjs +1 -0
  12. package/dist/{ArrowRight2-DCxJPvNC.js → ArrowRight2-CcHdxGRE.js} +7 -7
  13. package/dist/Badge/index.cjs +1 -72
  14. package/dist/Badge/index.d.ts.map +1 -1
  15. package/dist/Badge/index.js +46 -52
  16. package/dist/Breadcrumb/index.cjs +1 -34
  17. package/dist/Breadcrumb/index.d.ts.map +1 -1
  18. package/dist/Breadcrumb/index.js +39 -30
  19. package/dist/Button/index.cjs +1 -119
  20. package/dist/Button/index.d.ts.map +1 -1
  21. package/dist/Button/index.js +97 -104
  22. package/dist/Button/variants.d.ts.map +1 -1
  23. package/dist/Divider/index.cjs +1 -25
  24. package/dist/Divider/index.js +12 -16
  25. package/dist/Form/Checkbox/index.cjs +1 -72
  26. package/dist/Form/Checkbox/index.js +22 -26
  27. package/dist/Form/Input/index.cjs +1 -182
  28. package/dist/Form/Input/index.d.ts.map +1 -1
  29. package/dist/Form/Input/index.js +63 -71
  30. package/dist/Form/RadioButton/index.cjs +1 -22
  31. package/dist/Form/RadioButton/index.js +13 -13
  32. package/dist/Form/Textarea/index.cjs +1 -27
  33. package/dist/Form/Textarea/index.d.ts.map +1 -1
  34. package/dist/Form/Textarea/index.js +19 -19
  35. package/dist/Form/Wrappers/SelectableInputWrapper/SelectableInputWrapper.d.ts.map +1 -1
  36. package/dist/Pagination/index.cjs +1 -119
  37. package/dist/Pagination/index.d.ts.map +1 -1
  38. package/dist/Pagination/index.js +96 -107
  39. package/dist/SelectableInputWrapper-B3ylMTsl.js +76 -0
  40. package/dist/SelectableInputWrapper-C9x3IShC.cjs +1 -0
  41. package/dist/Slide-C506y48c.js +233 -0
  42. package/dist/Slide-Zmb0vKbn.cjs +1 -0
  43. package/dist/Slider/Navigation.d.ts +9 -0
  44. package/dist/Slider/Navigation.d.ts.map +1 -0
  45. package/dist/Slider/NavigationDot.d.ts +0 -3
  46. package/dist/Slider/NavigationDot.d.ts.map +1 -1
  47. package/dist/Slider/Slider.d.ts +2 -1
  48. package/dist/Slider/Slider.d.ts.map +1 -1
  49. package/dist/Slider/context.d.ts +3 -7
  50. package/dist/Slider/context.d.ts.map +1 -1
  51. package/dist/Slider/index.cjs +1 -11
  52. package/dist/Slider/index.js +5 -1
  53. package/dist/TextFieldWrapper-Cg4f8_zY.js +151 -0
  54. package/dist/TextFieldWrapper-Ci0-vx4J.cjs +1 -0
  55. package/dist/assets/Button.css +1 -1681
  56. package/dist/assets/styles.css +1 -1617
  57. package/dist/clsx-C11secjj.cjs +1 -0
  58. package/dist/clsx-OuTLNxxd.js +16 -0
  59. package/dist/index.cjs +1 -34
  60. package/dist/index.js +28 -12
  61. package/package.json +5 -4
  62. package/dist/AccordionItem-DN7bi5kw.js +0 -103
  63. package/dist/AccordionItem-lq6ehxKe.cjs +0 -106
  64. package/dist/ArrowLeft2-iZ0Au6Fn.cjs +0 -24
  65. package/dist/ArrowRight2-DTuru_sP.cjs +0 -27
  66. package/dist/SelectableInputWrapper-D2aYQb9J.cjs +0 -71
  67. package/dist/SelectableInputWrapper-DAj8v1nv.js +0 -69
  68. package/dist/Slide-BDD1_RXD.js +0 -215
  69. package/dist/Slide-Q5_7SCZR.cjs +0 -218
  70. package/dist/TextFieldWrapper--hxpmYuz.js +0 -167
  71. package/dist/TextFieldWrapper-DaoZxs1E.cjs +0 -169
  72. package/dist/clsx-BtxeOLZW.cjs +0 -5
  73. package/dist/clsx-ChV9xqsO.js +0 -3
@@ -1,8 +1,7 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { c as clsx } from '../../clsx-ChV9xqsO.js';
3
- import { S as SelectableInputWrapper } from '../../SelectableInputWrapper-DAj8v1nv.js';
4
-
5
- const CheckmarkIcon = (props) => /* @__PURE__ */ jsx(
1
+ import { jsx as e, jsxs as o, Fragment as h } from "react/jsx-runtime";
2
+ import { c as a } from "../../clsx-OuTLNxxd.js";
3
+ import { S as c } from "../../SelectableInputWrapper-B3ylMTsl.js";
4
+ const m = (t) => /* @__PURE__ */ e(
6
5
  "svg",
7
6
  {
8
7
  xmlns: "http://www.w3.org/2000/svg",
@@ -10,8 +9,8 @@ const CheckmarkIcon = (props) => /* @__PURE__ */ jsx(
10
9
  height: "1em",
11
10
  fill: "none",
12
11
  viewBox: "0 0 24 24",
13
- ...props,
14
- children: /* @__PURE__ */ jsx(
12
+ ...t,
13
+ children: /* @__PURE__ */ e(
15
14
  "path",
16
15
  {
17
16
  fill: "currentColor",
@@ -19,9 +18,7 @@ const CheckmarkIcon = (props) => /* @__PURE__ */ jsx(
19
18
  }
20
19
  )
21
20
  }
22
- );
23
-
24
- const Minus4Icon = (props) => /* @__PURE__ */ jsx(
21
+ ), d = (t) => /* @__PURE__ */ e(
25
22
  "svg",
26
23
  {
27
24
  xmlns: "http://www.w3.org/2000/svg",
@@ -29,8 +26,8 @@ const Minus4Icon = (props) => /* @__PURE__ */ jsx(
29
26
  height: "1em",
30
27
  fill: "none",
31
28
  viewBox: "0 0 24 24",
32
- ...props,
33
- children: /* @__PURE__ */ jsx(
29
+ ...t,
30
+ children: /* @__PURE__ */ e(
34
31
  "path",
35
32
  {
36
33
  fill: "currentColor",
@@ -38,27 +35,25 @@ const Minus4Icon = (props) => /* @__PURE__ */ jsx(
38
35
  }
39
36
  )
40
37
  }
41
- );
42
-
43
- const Checkbox = (props) => {
44
- const { className, isIndeterminate, ...rest } = props;
45
- return /* @__PURE__ */ jsx(SelectableInputWrapper, { ...rest, children: ({ inputClassName, checkedInputClassName }) => /* @__PURE__ */ jsxs(Fragment, { children: [
46
- /* @__PURE__ */ jsx(
38
+ ), x = (t) => {
39
+ const { className: r, isIndeterminate: l, ...i } = t;
40
+ return /* @__PURE__ */ e(c, { ...i, children: ({ inputClassName: n, checkedInputClassName: s }) => /* @__PURE__ */ o(h, { children: [
41
+ /* @__PURE__ */ e(
47
42
  "input",
48
43
  {
49
44
  type: "checkbox",
50
- className: clsx("rounded", inputClassName, className),
51
- ...rest
45
+ className: a("dgs-ui-kit-rounded", n, r),
46
+ ...i
52
47
  }
53
48
  ),
54
- /* @__PURE__ */ jsx("div", { className: checkedInputClassName, children: isIndeterminate ? /* @__PURE__ */ jsx(
55
- Minus4Icon,
49
+ /* @__PURE__ */ e("div", { className: s, children: l ? /* @__PURE__ */ e(
50
+ d,
56
51
  {
57
52
  width: 16,
58
53
  height: 16
59
54
  }
60
- ) : /* @__PURE__ */ jsx(
61
- CheckmarkIcon,
55
+ ) : /* @__PURE__ */ e(
56
+ m,
62
57
  {
63
58
  width: 16,
64
59
  height: 16
@@ -66,5 +61,6 @@ const Checkbox = (props) => {
66
61
  ) })
67
62
  ] }) });
68
63
  };
69
-
70
- export { Checkbox as default };
64
+ export {
65
+ x as default
66
+ };
@@ -1,182 +1 @@
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 TextFieldWrapper = require('../../TextFieldWrapper-DaoZxs1E.cjs');
7
-
8
- const CloseSquareIcon = (props) => /* @__PURE__ */ jsxRuntime.jsxs(
9
- "svg",
10
- {
11
- xmlns: "http://www.w3.org/2000/svg",
12
- width: "1em",
13
- height: "1em",
14
- fill: "none",
15
- viewBox: "0 0 24 24",
16
- ...props,
17
- children: [
18
- /* @__PURE__ */ jsxRuntime.jsx(
19
- "path",
20
- {
21
- fill: "currentColor",
22
- fillRule: "evenodd",
23
- d: "m15.456 9.595-5.852 5.852-1.061-1.06 5.853-5.853z",
24
- clipRule: "evenodd"
25
- }
26
- ),
27
- /* @__PURE__ */ jsxRuntime.jsx(
28
- "path",
29
- {
30
- fill: "currentColor",
31
- fillRule: "evenodd",
32
- d: "m9.6 8.532 5.856 5.858-1.06 1.06-5.857-5.857z",
33
- clipRule: "evenodd"
34
- }
35
- ),
36
- /* @__PURE__ */ jsxRuntime.jsx(
37
- "path",
38
- {
39
- fill: "currentColor",
40
- fillRule: "evenodd",
41
- d: "M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12m10-8.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17",
42
- clipRule: "evenodd"
43
- }
44
- )
45
- ]
46
- }
47
- );
48
-
49
- const EyeIcon = (props) => /* @__PURE__ */ jsxRuntime.jsxs(
50
- "svg",
51
- {
52
- xmlns: "http://www.w3.org/2000/svg",
53
- width: "1em",
54
- height: "1em",
55
- fill: "none",
56
- viewBox: "0 0 24 24",
57
- ...props,
58
- children: [
59
- /* @__PURE__ */ jsxRuntime.jsx(
60
- "path",
61
- {
62
- fill: "currentColor",
63
- d: "M12.247 20.812c-4.033 0-7.654-2.828-9.686-7.558a.75.75 0 0 1 0-.592c2.034-4.732 5.655-7.557 9.687-7.557s7.657 2.825 9.69 7.557a.75.75 0 0 1 0 .592c-2.032 4.73-5.653 7.554-9.685 7.557zm-8.182-7.853c1.806 3.983 4.846 6.352 8.18 6.352 3.334.002 6.373-2.369 8.18-6.352-1.808-3.986-4.848-6.354-8.182-6.354s-6.37 2.368-8.176 6.354z"
64
- }
65
- ),
66
- /* @__PURE__ */ jsxRuntime.jsx(
67
- "path",
68
- {
69
- fill: "currentColor",
70
- d: "M12.247 16.789a3.825 3.825 0 1 1 0-7.651 3.825 3.825 0 0 1 0 7.65m0-6.152a2.326 2.326 0 1 0 0 4.651 2.326 2.326 0 0 0 0-4.651"
71
- }
72
- )
73
- ]
74
- }
75
- );
76
-
77
- const HideIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
78
- "svg",
79
- {
80
- xmlns: "http://www.w3.org/2000/svg",
81
- width: "1em",
82
- height: "1em",
83
- fill: "none",
84
- viewBox: "0 0 24 24",
85
- ...props,
86
- children: /* @__PURE__ */ jsxRuntime.jsx(
87
- "path",
88
- {
89
- fill: "currentColor",
90
- fillRule: "evenodd",
91
- d: "M20.417 3.22a.75.75 0 0 1 0 1.06L4.643 20.055a.744.744 0 0 1-1.06 0 .75.75 0 0 1 0-1.06l1.972-1.971c-1.413-1.293-2.613-3.036-3.493-5.089a.75.75 0 0 1 0-.593C3.082 8.977 4.52 7.02 6.22 5.683c3.292-2.606 7.621-2.744 11.048-.375l2.088-2.088a.75.75 0 0 1 1.06 0m-.37 4.82c.724.962 1.36 2.073 1.891 3.299a.74.74 0 0 1 0 .595C19.842 16.79 16.128 19.69 12 19.69a8.8 8.8 0 0 1-2.769-.451.75.75 0 0 1 .474-1.424A7.3 7.3 0 0 0 12 18.19c3.428 0 6.561-2.442 8.43-6.553a14.5 14.5 0 0 0-1.58-2.694.75.75 0 0 1 1.197-.902M7.15 6.862c-1.437 1.13-2.67 2.776-3.58 4.778.794 1.752 1.836 3.23 3.047 4.322l2.138-2.138a3.87 3.87 0 0 1-.67-2.184A3.92 3.92 0 0 1 12 7.722a3.9 3.9 0 0 1 2.187.669l2.001-2.002c-2.853-1.844-6.325-1.676-9.038.472m8.088 4.6a.75.75 0 0 1 .606.872 3.92 3.92 0 0 1-3.141 3.147.75.75 0 0 1-.268-1.476 2.41 2.41 0 0 0 1.932-1.937.754.754 0 0 1 .87-.606M12 9.221a2.418 2.418 0 0 0-2.152 3.509l3.245-3.246A2.4 2.4 0 0 0 12 9.222",
92
- clipRule: "evenodd"
93
- }
94
- )
95
- }
96
- );
97
-
98
- const Input = react.forwardRef(function Input2(props, ref) {
99
- const {
100
- dir = "rtl",
101
- placeholderDir = dir,
102
- containerClassName,
103
- leftIcon,
104
- prefix,
105
- postfix,
106
- isClearOption,
107
- onClear,
108
- ...restProps
109
- } = props;
110
- const [type, setType] = react.useState(restProps.type);
111
- return /* @__PURE__ */ jsxRuntime.jsx(
112
- TextFieldWrapper.TextFieldWrapper,
113
- {
114
- ...props,
115
- containerClassName: clsx.clsx("items-center", containerClassName),
116
- children: ({ handleChangeField, value, setValue }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
117
- prefix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-p1-regular text-gray-500", children: prefix }),
118
- /* @__PURE__ */ jsxRuntime.jsx(
119
- "input",
120
- {
121
- ...restProps,
122
- ref,
123
- className: clsx.clsx(
124
- "bg-transparent focus:outline-none flex-1",
125
- dir === "rtl" ? "text-right" : "!text-left",
126
- placeholderDir === "rtl" ? "placeholder:text-right" : "placeholder:text-left",
127
- {
128
- ss02: restProps.type != "password"
129
- },
130
- props.className
131
- ),
132
- ...dir === "ltr" ? { style: { direction: "ltr" } } : {},
133
- value,
134
- onChange: handleChangeField,
135
- type
136
- }
137
- ),
138
- isClearOption && value && value.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
139
- "button",
140
- {
141
- onClick: () => {
142
- setValue("");
143
- if (typeof onClear === "function") onClear();
144
- },
145
- children: /* @__PURE__ */ jsxRuntime.jsx(
146
- CloseSquareIcon,
147
- {
148
- className: "text-gray-600",
149
- width: 20,
150
- height: 20
151
- }
152
- )
153
- }
154
- ),
155
- postfix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-p1-regular text-gray-500", children: postfix }),
156
- leftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-gray-600", children: leftIcon }),
157
- restProps.type === "password" && /* @__PURE__ */ jsxRuntime.jsx(
158
- "button",
159
- {
160
- onClick: () => setType((prv) => prv === "text" ? "password" : "text"),
161
- className: "text-gray-600",
162
- children: type === "password" ? /* @__PURE__ */ jsxRuntime.jsx(
163
- EyeIcon,
164
- {
165
- width: 20,
166
- height: 20
167
- }
168
- ) : /* @__PURE__ */ jsxRuntime.jsx(
169
- HideIcon,
170
- {
171
- width: 20,
172
- height: 20
173
- }
174
- )
175
- }
176
- )
177
- ] })
178
- }
179
- );
180
- });
181
-
182
- module.exports = Input;
1
+ "use strict";const e=require("react/jsx-runtime"),u=require("../../clsx-C11secjj.cjs"),x=require("react"),C=require("../../TextFieldWrapper-Ci0-vx4J.cjs"),v=t=>e.jsxs("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",fillRule:"evenodd",d:"m15.456 9.595-5.852 5.852-1.061-1.06 5.853-5.853z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m9.6 8.532 5.856 5.858-1.06 1.06-5.857-5.857z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12m10-8.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17",clipRule:"evenodd"})]}),y=t=>e.jsxs("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:"M12.247 20.812c-4.033 0-7.654-2.828-9.686-7.558a.75.75 0 0 1 0-.592c2.034-4.732 5.655-7.557 9.687-7.557s7.657 2.825 9.69 7.557a.75.75 0 0 1 0 .592c-2.032 4.73-5.653 7.554-9.685 7.557zm-8.182-7.853c1.806 3.983 4.846 6.352 8.18 6.352 3.334.002 6.373-2.369 8.18-6.352-1.808-3.986-4.848-6.354-8.182-6.354s-6.37 2.368-8.176 6.354z"}),e.jsx("path",{fill:"currentColor",d:"M12.247 16.789a3.825 3.825 0 1 1 0-7.651 3.825 3.825 0 0 1 0 7.65m0-6.152a2.326 2.326 0 1 0 0 4.651 2.326 2.326 0 0 0 0-4.651"})]}),R=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",fillRule:"evenodd",d:"M20.417 3.22a.75.75 0 0 1 0 1.06L4.643 20.055a.744.744 0 0 1-1.06 0 .75.75 0 0 1 0-1.06l1.972-1.971c-1.413-1.293-2.613-3.036-3.493-5.089a.75.75 0 0 1 0-.593C3.082 8.977 4.52 7.02 6.22 5.683c3.292-2.606 7.621-2.744 11.048-.375l2.088-2.088a.75.75 0 0 1 1.06 0m-.37 4.82c.724.962 1.36 2.073 1.891 3.299a.74.74 0 0 1 0 .595C19.842 16.79 16.128 19.69 12 19.69a8.8 8.8 0 0 1-2.769-.451.75.75 0 0 1 .474-1.424A7.3 7.3 0 0 0 12 18.19c3.428 0 6.561-2.442 8.43-6.553a14.5 14.5 0 0 0-1.58-2.694.75.75 0 0 1 1.197-.902M7.15 6.862c-1.437 1.13-2.67 2.776-3.58 4.778.794 1.752 1.836 3.23 3.047 4.322l2.138-2.138a3.87 3.87 0 0 1-.67-2.184A3.92 3.92 0 0 1 12 7.722a3.9 3.9 0 0 1 2.187.669l2.001-2.002c-2.853-1.844-6.325-1.676-9.038.472m8.088 4.6a.75.75 0 0 1 .606.872 3.92 3.92 0 0 1-3.141 3.147.75.75 0 0 1-.268-1.476 2.41 2.41 0 0 0 1.932-1.937.754.754 0 0 1 .87-.606M12 9.221a2.418 2.418 0 0 0-2.152 3.509l3.245-3.246A2.4 2.4 0 0 0 12 9.222",clipRule:"evenodd"})}),N=x.forwardRef(function(i,h){const{dir:l="rtl",placeholderDir:g=l,containerClassName:p,leftIcon:n,prefix:o,postfix:a,isClearOption:f,onClear:c,...s}=i,[d,m]=x.useState(s.type);return e.jsx(C.TextFieldWrapper,{...i,containerClassName:u.clsx("dgs-ui-kit-items-center",p),children:({handleChangeField:w,value:r,setValue:j})=>e.jsxs(e.Fragment,{children:[o&&e.jsx("span",{className:"dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500",children:o}),e.jsx("input",{...s,ref:h,className:u.clsx("dgs-ui-kit-bg-transparent focus:dgs-ui-kit-outline-none dgs-ui-kit-flex-1",l==="rtl"?"dgs-ui-kit-text-right":"!dgs-ui-kit-text-left",g==="rtl"?"placeholder:dgs-ui-kit-text-right":"placeholder:dgs-ui-kit-text-left",{ss02:s.type!="password"},i.className),...l==="ltr"?{style:{direction:"ltr"}}:{},value:r,onChange:w,type:d}),f&&r&&r.length>0&&e.jsx("button",{onClick:()=>{j(""),typeof c=="function"&&c()},children:e.jsx(v,{className:"dgs-ui-kit-text-gray-600",width:20,height:20})}),a&&e.jsx("span",{className:"dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500",children:a}),n&&e.jsx("div",{className:"dgs-ui-kit-text-gray-600",children:n}),s.type==="password"&&e.jsx("button",{onClick:()=>m(k=>k==="text"?"password":"text"),className:"dgs-ui-kit-text-gray-600",children:d==="password"?e.jsx(y,{width:20,height:20}):e.jsx(R,{width:20,height:20})})]})})});module.exports=N;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Input/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,mBAAmB,EAAwB,MAAM,OAAO,CAAC;AAK1F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAExF,UAAU,UACR,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,EACxD,kBAAkB;IACpB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,KAAK,yGA8ET,CAAC;AACH,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Input/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,mBAAmB,EAAwB,MAAM,OAAO,CAAC;AAK1F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAExF,UAAU,UACR,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,EACxD,kBAAkB;IACpB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,KAAK,yGAoFT,CAAC;AACH,eAAe,KAAK,CAAC"}
@@ -1,9 +1,8 @@
1
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { c as clsx } from '../../clsx-ChV9xqsO.js';
3
- import { forwardRef, useState } from 'react';
4
- import { T as TextFieldWrapper } from '../../TextFieldWrapper--hxpmYuz.js';
5
-
6
- const CloseSquareIcon = (props) => /* @__PURE__ */ jsxs(
1
+ import { jsxs as n, jsx as e, Fragment as v } from "react/jsx-runtime";
2
+ import { c as g } from "../../clsx-OuTLNxxd.js";
3
+ import { forwardRef as y, useState as N } from "react";
4
+ import { T as R } from "../../TextFieldWrapper-Cg4f8_zY.js";
5
+ const I = (t) => /* @__PURE__ */ n(
7
6
  "svg",
8
7
  {
9
8
  xmlns: "http://www.w3.org/2000/svg",
@@ -11,9 +10,9 @@ const CloseSquareIcon = (props) => /* @__PURE__ */ jsxs(
11
10
  height: "1em",
12
11
  fill: "none",
13
12
  viewBox: "0 0 24 24",
14
- ...props,
13
+ ...t,
15
14
  children: [
16
- /* @__PURE__ */ jsx(
15
+ /* @__PURE__ */ e(
17
16
  "path",
18
17
  {
19
18
  fill: "currentColor",
@@ -22,7 +21,7 @@ const CloseSquareIcon = (props) => /* @__PURE__ */ jsxs(
22
21
  clipRule: "evenodd"
23
22
  }
24
23
  ),
25
- /* @__PURE__ */ jsx(
24
+ /* @__PURE__ */ e(
26
25
  "path",
27
26
  {
28
27
  fill: "currentColor",
@@ -31,7 +30,7 @@ const CloseSquareIcon = (props) => /* @__PURE__ */ jsxs(
31
30
  clipRule: "evenodd"
32
31
  }
33
32
  ),
34
- /* @__PURE__ */ jsx(
33
+ /* @__PURE__ */ e(
35
34
  "path",
36
35
  {
37
36
  fill: "currentColor",
@@ -42,9 +41,7 @@ const CloseSquareIcon = (props) => /* @__PURE__ */ jsxs(
42
41
  )
43
42
  ]
44
43
  }
45
- );
46
-
47
- const EyeIcon = (props) => /* @__PURE__ */ jsxs(
44
+ ), M = (t) => /* @__PURE__ */ n(
48
45
  "svg",
49
46
  {
50
47
  xmlns: "http://www.w3.org/2000/svg",
@@ -52,16 +49,16 @@ const EyeIcon = (props) => /* @__PURE__ */ jsxs(
52
49
  height: "1em",
53
50
  fill: "none",
54
51
  viewBox: "0 0 24 24",
55
- ...props,
52
+ ...t,
56
53
  children: [
57
- /* @__PURE__ */ jsx(
54
+ /* @__PURE__ */ e(
58
55
  "path",
59
56
  {
60
57
  fill: "currentColor",
61
58
  d: "M12.247 20.812c-4.033 0-7.654-2.828-9.686-7.558a.75.75 0 0 1 0-.592c2.034-4.732 5.655-7.557 9.687-7.557s7.657 2.825 9.69 7.557a.75.75 0 0 1 0 .592c-2.032 4.73-5.653 7.554-9.685 7.557zm-8.182-7.853c1.806 3.983 4.846 6.352 8.18 6.352 3.334.002 6.373-2.369 8.18-6.352-1.808-3.986-4.848-6.354-8.182-6.354s-6.37 2.368-8.176 6.354z"
62
59
  }
63
60
  ),
64
- /* @__PURE__ */ jsx(
61
+ /* @__PURE__ */ e(
65
62
  "path",
66
63
  {
67
64
  fill: "currentColor",
@@ -70,9 +67,7 @@ const EyeIcon = (props) => /* @__PURE__ */ jsxs(
70
67
  )
71
68
  ]
72
69
  }
73
- );
74
-
75
- const HideIcon = (props) => /* @__PURE__ */ jsx(
70
+ ), z = (t) => /* @__PURE__ */ e(
76
71
  "svg",
77
72
  {
78
73
  xmlns: "http://www.w3.org/2000/svg",
@@ -80,8 +75,8 @@ const HideIcon = (props) => /* @__PURE__ */ jsx(
80
75
  height: "1em",
81
76
  fill: "none",
82
77
  viewBox: "0 0 24 24",
83
- ...props,
84
- children: /* @__PURE__ */ jsx(
78
+ ...t,
79
+ children: /* @__PURE__ */ e(
85
80
  "path",
86
81
  {
87
82
  fill: "currentColor",
@@ -91,80 +86,76 @@ const HideIcon = (props) => /* @__PURE__ */ jsx(
91
86
  }
92
87
  )
93
88
  }
94
- );
95
-
96
- const Input = forwardRef(function Input2(props, ref) {
89
+ ), T = y(function(l, u) {
97
90
  const {
98
- dir = "rtl",
99
- placeholderDir = dir,
100
- containerClassName,
101
- leftIcon,
102
- prefix,
103
- postfix,
104
- isClearOption,
105
- onClear,
106
- ...restProps
107
- } = props;
108
- const [type, setType] = useState(restProps.type);
109
- return /* @__PURE__ */ jsx(
110
- TextFieldWrapper,
91
+ dir: r = "rtl",
92
+ placeholderDir: p = r,
93
+ containerClassName: m,
94
+ leftIcon: o,
95
+ prefix: a,
96
+ postfix: d,
97
+ isClearOption: f,
98
+ onClear: c,
99
+ ...i
100
+ } = l, [h, w] = N(i.type);
101
+ return /* @__PURE__ */ e(
102
+ R,
111
103
  {
112
- ...props,
113
- containerClassName: clsx("items-center", containerClassName),
114
- children: ({ handleChangeField, value, setValue }) => /* @__PURE__ */ jsxs(Fragment, { children: [
115
- prefix && /* @__PURE__ */ jsx("span", { className: "font-p1-regular text-gray-500", children: prefix }),
116
- /* @__PURE__ */ jsx(
104
+ ...l,
105
+ containerClassName: g("dgs-ui-kit-items-center", m),
106
+ children: ({ handleChangeField: x, value: s, setValue: k }) => /* @__PURE__ */ n(v, { children: [
107
+ a && /* @__PURE__ */ e("span", { className: "dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500", children: a }),
108
+ /* @__PURE__ */ e(
117
109
  "input",
118
110
  {
119
- ...restProps,
120
- ref,
121
- className: clsx(
122
- "bg-transparent focus:outline-none flex-1",
123
- dir === "rtl" ? "text-right" : "!text-left",
124
- placeholderDir === "rtl" ? "placeholder:text-right" : "placeholder:text-left",
111
+ ...i,
112
+ ref: u,
113
+ className: g(
114
+ "dgs-ui-kit-bg-transparent focus:dgs-ui-kit-outline-none dgs-ui-kit-flex-1",
115
+ r === "rtl" ? "dgs-ui-kit-text-right" : "!dgs-ui-kit-text-left",
116
+ p === "rtl" ? "placeholder:dgs-ui-kit-text-right" : "placeholder:dgs-ui-kit-text-left",
125
117
  {
126
- ss02: restProps.type != "password"
118
+ ss02: i.type != "password"
127
119
  },
128
- props.className
120
+ l.className
129
121
  ),
130
- ...dir === "ltr" ? { style: { direction: "ltr" } } : {},
131
- value,
132
- onChange: handleChangeField,
133
- type
122
+ ...r === "ltr" ? { style: { direction: "ltr" } } : {},
123
+ value: s,
124
+ onChange: x,
125
+ type: h
134
126
  }
135
127
  ),
136
- isClearOption && value && value.length > 0 && /* @__PURE__ */ jsx(
128
+ f && s && s.length > 0 && /* @__PURE__ */ e(
137
129
  "button",
138
130
  {
139
131
  onClick: () => {
140
- setValue("");
141
- if (typeof onClear === "function") onClear();
132
+ k(""), typeof c == "function" && c();
142
133
  },
143
- children: /* @__PURE__ */ jsx(
144
- CloseSquareIcon,
134
+ children: /* @__PURE__ */ e(
135
+ I,
145
136
  {
146
- className: "text-gray-600",
137
+ className: "dgs-ui-kit-text-gray-600",
147
138
  width: 20,
148
139
  height: 20
149
140
  }
150
141
  )
151
142
  }
152
143
  ),
153
- postfix && /* @__PURE__ */ jsx("span", { className: "font-p1-regular text-gray-500", children: postfix }),
154
- leftIcon && /* @__PURE__ */ jsx("div", { className: "text-gray-600", children: leftIcon }),
155
- restProps.type === "password" && /* @__PURE__ */ jsx(
144
+ d && /* @__PURE__ */ e("span", { className: "dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500", children: d }),
145
+ o && /* @__PURE__ */ e("div", { className: "dgs-ui-kit-text-gray-600", children: o }),
146
+ i.type === "password" && /* @__PURE__ */ e(
156
147
  "button",
157
148
  {
158
- onClick: () => setType((prv) => prv === "text" ? "password" : "text"),
159
- className: "text-gray-600",
160
- children: type === "password" ? /* @__PURE__ */ jsx(
161
- EyeIcon,
149
+ onClick: () => w((C) => C === "text" ? "password" : "text"),
150
+ className: "dgs-ui-kit-text-gray-600",
151
+ children: h === "password" ? /* @__PURE__ */ e(
152
+ M,
162
153
  {
163
154
  width: 20,
164
155
  height: 20
165
156
  }
166
- ) : /* @__PURE__ */ jsx(
167
- HideIcon,
157
+ ) : /* @__PURE__ */ e(
158
+ z,
168
159
  {
169
160
  width: 20,
170
161
  height: 20
@@ -176,5 +167,6 @@ const Input = forwardRef(function Input2(props, ref) {
176
167
  }
177
168
  );
178
169
  });
179
-
180
- export { Input as default };
170
+ export {
171
+ T as default
172
+ };
@@ -1,22 +1 @@
1
- 'use strict';
2
-
3
- const jsxRuntime = require('react/jsx-runtime');
4
- const clsx = require('../../clsx-BtxeOLZW.cjs');
5
- const SelectableInputWrapper = require('../../SelectableInputWrapper-D2aYQb9J.cjs');
6
-
7
- const RadioButton = (props) => {
8
- const { className, ...rest } = props;
9
- return /* @__PURE__ */ jsxRuntime.jsx(SelectableInputWrapper.SelectableInputWrapper, { ...rest, children: ({ inputClassName, checkedInputClassName }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
10
- /* @__PURE__ */ jsxRuntime.jsx(
11
- "input",
12
- {
13
- type: "radio",
14
- className: clsx.clsx("rounded-full", inputClassName, className),
15
- ...rest
16
- }
17
- ),
18
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: checkedInputClassName, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white rounded-full w-2 h-2" }) })
19
- ] }) });
20
- };
21
-
22
- module.exports = RadioButton;
1
+ "use strict";const e=require("react/jsx-runtime"),c=require("../../clsx-C11secjj.cjs"),l=require("../../SelectableInputWrapper-C9x3IShC.cjs"),n=t=>{const{className:i,...s}=t;return e.jsx(l.SelectableInputWrapper,{...s,children:({inputClassName:r,checkedInputClassName:u})=>e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"radio",className:c.clsx("dgs-ui-kit-rounded-full",r,i),...s}),e.jsx("div",{className:u,children:e.jsx("div",{className:"dgs-ui-kit-bg-white dgs-ui-kit-rounded-full dgs-ui-kit-w-2 dgs-ui-kit-h-2"})})]})})};module.exports=n;
@@ -1,20 +1,20 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { c as clsx } from '../../clsx-ChV9xqsO.js';
3
- import { S as SelectableInputWrapper } from '../../SelectableInputWrapper-DAj8v1nv.js';
4
-
5
- const RadioButton = (props) => {
6
- const { className, ...rest } = props;
7
- return /* @__PURE__ */ jsx(SelectableInputWrapper, { ...rest, children: ({ inputClassName, checkedInputClassName }) => /* @__PURE__ */ jsxs(Fragment, { children: [
8
- /* @__PURE__ */ jsx(
1
+ import { jsx as s, jsxs as d, Fragment as l } from "react/jsx-runtime";
2
+ import { c as o } from "../../clsx-OuTLNxxd.js";
3
+ import { S as u } from "../../SelectableInputWrapper-B3ylMTsl.js";
4
+ const p = (t) => {
5
+ const { className: e, ...i } = t;
6
+ return /* @__PURE__ */ s(u, { ...i, children: ({ inputClassName: r, checkedInputClassName: a }) => /* @__PURE__ */ d(l, { children: [
7
+ /* @__PURE__ */ s(
9
8
  "input",
10
9
  {
11
10
  type: "radio",
12
- className: clsx("rounded-full", inputClassName, className),
13
- ...rest
11
+ className: o("dgs-ui-kit-rounded-full", r, e),
12
+ ...i
14
13
  }
15
14
  ),
16
- /* @__PURE__ */ jsx("div", { className: checkedInputClassName, children: /* @__PURE__ */ jsx("div", { className: "bg-white rounded-full w-2 h-2" }) })
15
+ /* @__PURE__ */ s("div", { className: a, children: /* @__PURE__ */ s("div", { className: "dgs-ui-kit-bg-white dgs-ui-kit-rounded-full dgs-ui-kit-w-2 dgs-ui-kit-h-2" }) })
17
16
  ] }) });
18
17
  };
19
-
20
- export { RadioButton as default };
18
+ export {
19
+ p as default
20
+ };
@@ -1,27 +1 @@
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 TextFieldWrapper = require('../../TextFieldWrapper-DaoZxs1E.cjs');
7
-
8
- const Textarea = react.forwardRef(function Textarea2(props, ref) {
9
- const { dir = "rtl", placeholderDir = dir, ...restProps } = props;
10
- return /* @__PURE__ */ jsxRuntime.jsx(TextFieldWrapper.TextFieldWrapper, { ...props, children: ({ handleChangeField }) => /* @__PURE__ */ jsxRuntime.jsx(
11
- "textarea",
12
- {
13
- ...restProps,
14
- ref,
15
- className: clsx.clsx(
16
- "text-gray-800 bg-transparent w-full h-full focus:outline-none ss02 flex-1 resize-none",
17
- dir === "rtl" ? "text-right" : "!text-left",
18
- placeholderDir === "rtl" ? "placeholder:text-right" : "placeholder:text-left",
19
- restProps.className
20
- ),
21
- onChange: handleChangeField,
22
- rows: restProps.rows ?? 5
23
- }
24
- ) });
25
- });
26
-
27
- module.exports = Textarea;
1
+ "use strict";const i=require("react/jsx-runtime"),a=require("../../clsx-C11secjj.cjs"),n=require("react"),d=require("../../TextFieldWrapper-Ci0-vx4J.cjs"),o=n.forwardRef(function(t,s){const{dir:r="rtl",placeholderDir:l=r,...e}=t;return i.jsx(d.TextFieldWrapper,{...t,children:({handleChangeField:u})=>i.jsx("textarea",{...e,ref:s,className:a.clsx("dgs-ui-kit-text-gray-800 dgs-ui-kit-bg-transparent dgs-ui-kit-w-full dgs-ui-kit-h-full focus:dgs-ui-kit-outline-none ss02 dgs-ui-kit-flex-1 dgs-ui-kit-resize-none",r==="rtl"?"dgs-ui-kit-text-right":"!dgs-ui-kit-text-left",l==="rtl"?"placeholder:dgs-ui-kit-text-right":"placeholder:dgs-ui-kit-text-left",e.className),onChange:u,rows:e.rows??5})})});module.exports=o;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Textarea/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,iBAAiB,EAEtB,KAAK,sBAAsB,EAC5B,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAGxF,UAAU,aACR,SAAQ,IAAI,CACR,iBAAiB,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC,EACnF,KAAK,CACN,EACD,kBAAkB;CAAG;AAEzB,QAAA,MAAM,QAAQ,4HAwBZ,CAAC;AAEH,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Textarea/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,iBAAiB,EAEtB,KAAK,sBAAsB,EAC5B,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAGxF,UAAU,aACR,SAAQ,IAAI,CACR,iBAAiB,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC,EACnF,KAAK,CACN,EACD,kBAAkB;CAAG;AAEzB,QAAA,MAAM,QAAQ,4HA0BZ,CAAC;AAEH,eAAe,QAAQ,CAAC"}