@dgshahr/ui-kit 0.0.78 → 0.0.80
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/AccordionItem.d.ts +1 -0
- package/dist/Accordion/AccordionItem.d.ts.map +1 -1
- package/dist/Accordion/index.cjs +1 -1
- package/dist/Accordion/index.js +1 -1
- package/dist/AccordionItem-BYDG8XVW.cjs +1 -0
- package/dist/AccordionItem-DhYhZ3vW.js +85 -0
- package/dist/Alert/index.cjs +1 -1
- package/dist/Alert/index.js +1 -1
- package/dist/Breadcrumb/index.cjs +1 -1
- package/dist/Breadcrumb/index.d.ts.map +1 -1
- package/dist/Breadcrumb/index.js +1 -1
- package/dist/Drawer/index.cjs +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/FieldBottomInfo-7YeZbp0-.cjs +1 -0
- package/dist/FieldBottomInfo-B1n-gK3T.js +78 -0
- package/dist/Form/Common/FieldBottomInfo/FieldBottomInfo.d.ts +11 -0
- package/dist/Form/Common/FieldBottomInfo/FieldBottomInfo.d.ts.map +1 -0
- package/dist/Form/Common/FieldLabel/FieldLabel.d.ts +14 -0
- package/dist/Form/Common/FieldLabel/FieldLabel.d.ts.map +1 -0
- package/dist/Form/Datepicker/Days.d.ts.map +1 -1
- package/dist/Form/Datepicker/Header.d.ts.map +1 -1
- package/dist/Form/Datepicker/Months.d.ts.map +1 -1
- package/dist/Form/Datepicker/Years.d.ts.map +1 -1
- package/dist/Form/Datepicker/index.cjs +1 -1
- package/dist/Form/Datepicker/index.js +41 -37
- package/dist/Form/FileUploader/Input/FileInput.d.ts +8 -0
- package/dist/Form/FileUploader/Input/FileInput.d.ts.map +1 -0
- package/dist/Form/FileUploader/Input/FileInputIcon.d.ts +4 -0
- package/dist/Form/FileUploader/Input/FileInputIcon.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/FilePreview.d.ts +10 -0
- package/dist/Form/FileUploader/Preview/FilePreview.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/MultipleMode/Grid/GridTypePreview.d.ts +6 -0
- package/dist/Form/FileUploader/Preview/MultipleMode/Grid/GridTypePreview.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/MultipleMode/List/ListTypePreview.d.ts +6 -0
- package/dist/Form/FileUploader/Preview/MultipleMode/List/ListTypePreview.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/MultipleMode/MultipleModePreveiw.d.ts +6 -0
- package/dist/Form/FileUploader/Preview/MultipleMode/MultipleModePreveiw.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/SingleMode/SingleModePreview.d.ts +7 -0
- package/dist/Form/FileUploader/Preview/SingleMode/SingleModePreview.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/types.d.ts +5 -0
- package/dist/Form/FileUploader/Preview/types.d.ts.map +1 -0
- package/dist/Form/FileUploader/Preview/utils.d.ts +7 -0
- package/dist/Form/FileUploader/Preview/utils.d.ts.map +1 -0
- package/dist/Form/FileUploader/constants.d.ts +10 -0
- package/dist/Form/FileUploader/constants.d.ts.map +1 -0
- package/dist/Form/FileUploader/index.cjs +1 -0
- package/dist/Form/FileUploader/index.d.ts +5 -0
- package/dist/Form/FileUploader/index.d.ts.map +1 -0
- package/dist/Form/FileUploader/index.js +608 -0
- package/dist/Form/FileUploader/types.d.ts +51 -0
- package/dist/Form/FileUploader/types.d.ts.map +1 -0
- package/dist/Form/Input/index.cjs +1 -1
- package/dist/Form/Input/index.d.ts.map +1 -1
- package/dist/Form/Input/index.js +38 -62
- package/dist/Form/OtpInput/index.cjs +1 -1
- package/dist/Form/OtpInput/index.d.ts.map +1 -1
- package/dist/Form/OtpInput/index.js +9 -8
- package/dist/Form/Select/OptionItem.d.ts.map +1 -1
- package/dist/Form/Select/Options.d.ts.map +1 -1
- package/dist/Form/Select/index.cjs +1 -1
- package/dist/Form/Select/index.js +3 -1
- package/dist/Form/Textarea/index.cjs +1 -1
- package/dist/Form/Textarea/index.js +1 -1
- package/dist/Form/Wrappers/PickerWrapper/PickerWrapper.d.ts.map +1 -1
- package/dist/Form/Wrappers/TextFieldWrapper/TextFieldWrapper.d.ts +4 -13
- package/dist/Form/Wrappers/TextFieldWrapper/TextFieldWrapper.d.ts.map +1 -1
- package/dist/{ArrowDown2-CMeKw_vj.js → IconArrowDown2-7ddwV5IE.js} +1 -1
- package/dist/{ArrowDown2-O11Hxz6e.cjs → IconArrowDown2-C1dLVveG.cjs} +1 -1
- package/dist/{ArrowLeft2-B76dkC-C.cjs → IconArrowLeft2-CNA3H0xY.cjs} +1 -1
- package/dist/{ArrowLeft2-jP2w1vwt.js → IconArrowLeft2-cxcPyDqS.js} +1 -1
- package/dist/{ArrowRight2-CcHdxGRE.js → IconArrowRight2-BoXg0Gkw.js} +1 -1
- package/dist/{ArrowRight2-CYowPzS8.cjs → IconArrowRight2-CF_bdH81.cjs} +1 -1
- package/dist/{CloseRemove-BzqPxkjk.js → IconCloseRemove-BPEWBqGA.js} +1 -1
- package/dist/{CloseRemove-BUG0Hjfl.cjs → IconCloseRemove-DwCc4o3b.cjs} +1 -1
- package/dist/IconEye-DATABBb3.js +31 -0
- package/dist/IconEye-sBk4Mro2.cjs +1 -0
- package/dist/Pagination/index.cjs +1 -1
- package/dist/Pagination/index.js +8 -8
- package/dist/{PickerWrapper-EWtj7K7M.js → PickerWrapper-BrMn3Ldu.js} +25 -24
- package/dist/PickerWrapper-CoDy6coa.cjs +1 -0
- package/dist/Progress/Doughnut/index.cjs +1 -0
- package/dist/Progress/Doughnut/index.d.ts +5 -0
- package/dist/Progress/Doughnut/index.d.ts.map +1 -0
- package/dist/Progress/Doughnut/index.js +85 -0
- package/dist/Progress/Doughnut/types.d.ts +21 -0
- package/dist/Progress/Doughnut/types.d.ts.map +1 -0
- package/dist/Slide-BhtrgZAI.cjs +1 -0
- package/dist/{Slide-DsdG_6vc.js → Slide-CFSk8Dlg.js} +13 -13
- package/dist/Slider/index.cjs +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/Step-CcJeR_kj.cjs +1 -0
- package/dist/Step-pWxkk9vq.js +159 -0
- package/dist/Stepper/Horizontal/Step.d.ts +3 -0
- package/dist/Stepper/Horizontal/Step.d.ts.map +1 -1
- package/dist/Stepper/Horizontal/Stepper.d.ts +1 -0
- package/dist/Stepper/Horizontal/Stepper.d.ts.map +1 -1
- package/dist/Stepper/Horizontal/index.cjs +1 -1
- package/dist/Stepper/Horizontal/index.js +1 -1
- package/dist/TextFieldWrapper-44165bs_.js +106 -0
- package/dist/TextFieldWrapper-K0g1kAl1.cjs +1 -0
- package/dist/assets/styles.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -30
- package/package.json +21 -1
- package/dist/AccordionItem-249c_E9c.js +0 -85
- package/dist/AccordionItem-U3jVG5e6.cjs +0 -1
- package/dist/Form/Wrappers/TextFieldWrapper/FieldBottomInfo.d.ts +0 -9
- package/dist/Form/Wrappers/TextFieldWrapper/FieldBottomInfo.d.ts.map +0 -1
- package/dist/Form/Wrappers/TextFieldWrapper/FieldLabel.d.ts +0 -9
- package/dist/Form/Wrappers/TextFieldWrapper/FieldLabel.d.ts.map +0 -1
- package/dist/PickerWrapper-CY7PJM50.cjs +0 -1
- package/dist/Slide-aMCvZQnM.cjs +0 -1
- package/dist/Step-CZp-RQhJ.js +0 -129
- package/dist/Step-CtqJxQMY.cjs +0 -1
- package/dist/TextFieldWrapper-CmSiS8zD.cjs +0 -1
- package/dist/TextFieldWrapper-Crap8mNo.js +0 -178
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),g=require("../../clsx-C11secjj.cjs"),h=require("react"),k=require("../../omitObjects-CtiYo0hv.cjs"),C=require("../../TextFieldWrapper-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),g=require("../../clsx-C11secjj.cjs"),h=require("react"),k=require("../../IconEye-sBk4Mro2.cjs"),y=require("../../omitObjects-CtiYo0hv.cjs"),C=require("../../TextFieldWrapper-K0g1kAl1.cjs"),I=n=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...n,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"})]}),R=n=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...n,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=h.forwardRef(function(a,f){const{dir:i="rtl",placeholderDir:m=i,containerClassName:w,leftIcon:u,prefix:d,postfix:p,onClear:l,value:r,...t}=a,j=y.omitObject(t,["labelAddon","labelContent","link","rightIcon","isError","errorMessage","hintMessage","wrapperClassName","showMaxLength"]),[c,v]=h.useState(t.type);function x(){return e.jsx("button",{onClick:()=>{typeof l=="function"&&l()},children:e.jsx(I,{className:"dgs-ui-kit-text-gray-600",width:20,height:20})})}return e.jsxs(C.TextFieldWrapper,{...a,containerClassName:g.clsx("dgs-ui-kit-items-center",w),value:r,children:[d&&e.jsx("span",{className:"dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500",children:d}),typeof l=="function"&&r&&i==="ltr"&&x(),e.jsx("input",{...j,ref:f,className:g.clsx("dgs-ui-kit-bg-transparent focus:dgs-ui-kit-outline-none dgs-ui-kit-flex-1",i==="rtl"?"dgs-ui-kit-text-right":"!dgs-ui-kit-text-left",m==="rtl"?"placeholder:dgs-ui-kit-text-right":"placeholder:dgs-ui-kit-text-left",{ss02:t.type!="password"},a.className),...i==="ltr"?{style:{direction:"ltr"}}:{},value:r,type:c,onInput:o=>{if(typeof t.onInput=="function"&&t.onInput(o)||c!=="number")return;const s=o.currentTarget;s.value.length>s.maxLength&&(s.value=s.value.slice(0,s.maxLength))}}),typeof l=="function"&&r&&i==="rtl"&&x(),p&&e.jsx("span",{className:"dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500",children:p}),u&&e.jsx("div",{className:"dgs-ui-kit-text-gray-600",children:u}),t.type==="password"&&e.jsx("button",{type:"button",onClick:()=>v(o=>o==="text"?"password":"text"),className:"dgs-ui-kit-text-gray-600",children:c==="password"?e.jsx(k.IconEye,{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;AAM1F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAExF,MAAM,WAAW,UACf,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,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC;CACxE;AAED,QAAA,MAAM,KAAK,
|
|
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;AAM1F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AAExF,MAAM,WAAW,UACf,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,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC;CACxE;AAED,QAAA,MAAM,KAAK,yGA0GT,CAAC;AACH,eAAe,KAAK,CAAC"}
|
package/dist/Form/Input/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as h, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { c as f } from "../../clsx-OuTLNxxd.js";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
3
|
+
import { forwardRef as y, useState as C } from "react";
|
|
4
|
+
import { I } from "../../IconEye-DATABBb3.js";
|
|
5
|
+
import { o as N } from "../../omitObjects-CxFrrlkX.js";
|
|
6
|
+
import { T as R } from "../../TextFieldWrapper-44165bs_.js";
|
|
7
|
+
const b = (n) => /* @__PURE__ */ h(
|
|
7
8
|
"svg",
|
|
8
9
|
{
|
|
9
10
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11,7 +12,7 @@ const M = (e) => /* @__PURE__ */ d(
|
|
|
11
12
|
height: "1em",
|
|
12
13
|
fill: "none",
|
|
13
14
|
viewBox: "0 0 24 24",
|
|
14
|
-
...
|
|
15
|
+
...n,
|
|
15
16
|
children: [
|
|
16
17
|
/* @__PURE__ */ t(
|
|
17
18
|
"path",
|
|
@@ -42,7 +43,7 @@ const M = (e) => /* @__PURE__ */ d(
|
|
|
42
43
|
)
|
|
43
44
|
]
|
|
44
45
|
}
|
|
45
|
-
),
|
|
46
|
+
), M = (n) => /* @__PURE__ */ t(
|
|
46
47
|
"svg",
|
|
47
48
|
{
|
|
48
49
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -50,33 +51,7 @@ const M = (e) => /* @__PURE__ */ d(
|
|
|
50
51
|
height: "1em",
|
|
51
52
|
fill: "none",
|
|
52
53
|
viewBox: "0 0 24 24",
|
|
53
|
-
...
|
|
54
|
-
children: [
|
|
55
|
-
/* @__PURE__ */ t(
|
|
56
|
-
"path",
|
|
57
|
-
{
|
|
58
|
-
fill: "currentColor",
|
|
59
|
-
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"
|
|
60
|
-
}
|
|
61
|
-
),
|
|
62
|
-
/* @__PURE__ */ t(
|
|
63
|
-
"path",
|
|
64
|
-
{
|
|
65
|
-
fill: "currentColor",
|
|
66
|
-
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"
|
|
67
|
-
}
|
|
68
|
-
)
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
), b = (e) => /* @__PURE__ */ t(
|
|
72
|
-
"svg",
|
|
73
|
-
{
|
|
74
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
75
|
-
width: "1em",
|
|
76
|
-
height: "1em",
|
|
77
|
-
fill: "none",
|
|
78
|
-
viewBox: "0 0 24 24",
|
|
79
|
-
...e,
|
|
54
|
+
...n,
|
|
80
55
|
children: /* @__PURE__ */ t(
|
|
81
56
|
"path",
|
|
82
57
|
{
|
|
@@ -87,18 +62,18 @@ const M = (e) => /* @__PURE__ */ d(
|
|
|
87
62
|
}
|
|
88
63
|
)
|
|
89
64
|
}
|
|
90
|
-
),
|
|
65
|
+
), z = y(function(a, m) {
|
|
91
66
|
const {
|
|
92
|
-
dir:
|
|
93
|
-
placeholderDir: x =
|
|
67
|
+
dir: i = "rtl",
|
|
68
|
+
placeholderDir: x = i,
|
|
94
69
|
containerClassName: w,
|
|
95
|
-
leftIcon:
|
|
96
|
-
prefix:
|
|
97
|
-
postfix:
|
|
70
|
+
leftIcon: d,
|
|
71
|
+
prefix: u,
|
|
72
|
+
postfix: p,
|
|
98
73
|
onClear: r,
|
|
99
74
|
value: o,
|
|
100
|
-
...
|
|
101
|
-
} = a, v =
|
|
75
|
+
...e
|
|
76
|
+
} = a, v = N(e, [
|
|
102
77
|
"labelAddon",
|
|
103
78
|
"labelContent",
|
|
104
79
|
"link",
|
|
@@ -108,8 +83,8 @@ const M = (e) => /* @__PURE__ */ d(
|
|
|
108
83
|
"hintMessage",
|
|
109
84
|
"wrapperClassName",
|
|
110
85
|
"showMaxLength"
|
|
111
|
-
]), [c, k] =
|
|
112
|
-
function
|
|
86
|
+
]), [c, k] = C(e.type);
|
|
87
|
+
function g() {
|
|
113
88
|
return /* @__PURE__ */ t(
|
|
114
89
|
"button",
|
|
115
90
|
{
|
|
@@ -117,7 +92,7 @@ const M = (e) => /* @__PURE__ */ d(
|
|
|
117
92
|
typeof r == "function" && r();
|
|
118
93
|
},
|
|
119
94
|
children: /* @__PURE__ */ t(
|
|
120
|
-
|
|
95
|
+
b,
|
|
121
96
|
{
|
|
122
97
|
className: "dgs-ui-kit-text-gray-600",
|
|
123
98
|
width: 20,
|
|
@@ -127,15 +102,15 @@ const M = (e) => /* @__PURE__ */ d(
|
|
|
127
102
|
}
|
|
128
103
|
);
|
|
129
104
|
}
|
|
130
|
-
return /* @__PURE__ */
|
|
131
|
-
|
|
105
|
+
return /* @__PURE__ */ h(
|
|
106
|
+
R,
|
|
132
107
|
{
|
|
133
108
|
...a,
|
|
134
109
|
containerClassName: f("dgs-ui-kit-items-center", w),
|
|
135
110
|
value: o,
|
|
136
111
|
children: [
|
|
137
|
-
|
|
138
|
-
typeof r == "function" && o &&
|
|
112
|
+
u && /* @__PURE__ */ t("span", { className: "dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500", children: u }),
|
|
113
|
+
typeof r == "function" && o && i === "ltr" && g(),
|
|
139
114
|
/* @__PURE__ */ t(
|
|
140
115
|
"input",
|
|
141
116
|
{
|
|
@@ -143,39 +118,40 @@ const M = (e) => /* @__PURE__ */ d(
|
|
|
143
118
|
ref: m,
|
|
144
119
|
className: f(
|
|
145
120
|
"dgs-ui-kit-bg-transparent focus:dgs-ui-kit-outline-none dgs-ui-kit-flex-1",
|
|
146
|
-
|
|
121
|
+
i === "rtl" ? "dgs-ui-kit-text-right" : "!dgs-ui-kit-text-left",
|
|
147
122
|
x === "rtl" ? "placeholder:dgs-ui-kit-text-right" : "placeholder:dgs-ui-kit-text-left",
|
|
148
123
|
{
|
|
149
|
-
ss02:
|
|
124
|
+
ss02: e.type != "password"
|
|
150
125
|
},
|
|
151
126
|
a.className
|
|
152
127
|
),
|
|
153
|
-
...
|
|
128
|
+
...i === "ltr" ? { style: { direction: "ltr" } } : {},
|
|
154
129
|
value: o,
|
|
155
130
|
type: c,
|
|
156
131
|
onInput: (s) => {
|
|
157
|
-
if (typeof
|
|
158
|
-
const
|
|
159
|
-
|
|
132
|
+
if (typeof e.onInput == "function" && e.onInput(s) || c !== "number") return;
|
|
133
|
+
const l = s.currentTarget;
|
|
134
|
+
l.value.length > l.maxLength && (l.value = l.value.slice(0, l.maxLength));
|
|
160
135
|
}
|
|
161
136
|
}
|
|
162
137
|
),
|
|
163
|
-
typeof r == "function" && o &&
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
138
|
+
typeof r == "function" && o && i === "rtl" && g(),
|
|
139
|
+
p && /* @__PURE__ */ t("span", { className: "dgs-ui-kit-font-p1-regular dgs-ui-kit-text-gray-500", children: p }),
|
|
140
|
+
d && /* @__PURE__ */ t("div", { className: "dgs-ui-kit-text-gray-600", children: d }),
|
|
141
|
+
e.type === "password" && /* @__PURE__ */ t(
|
|
167
142
|
"button",
|
|
168
143
|
{
|
|
144
|
+
type: "button",
|
|
169
145
|
onClick: () => k((s) => s === "text" ? "password" : "text"),
|
|
170
146
|
className: "dgs-ui-kit-text-gray-600",
|
|
171
147
|
children: c === "password" ? /* @__PURE__ */ t(
|
|
172
|
-
|
|
148
|
+
I,
|
|
173
149
|
{
|
|
174
150
|
width: 20,
|
|
175
151
|
height: 20
|
|
176
152
|
}
|
|
177
153
|
) : /* @__PURE__ */ t(
|
|
178
|
-
|
|
154
|
+
M,
|
|
179
155
|
{
|
|
180
156
|
width: 20,
|
|
181
157
|
height: 20
|
|
@@ -188,5 +164,5 @@ const M = (e) => /* @__PURE__ */ d(
|
|
|
188
164
|
);
|
|
189
165
|
});
|
|
190
166
|
export {
|
|
191
|
-
|
|
167
|
+
z as default
|
|
192
168
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";require('../../assets/styles.css');const u=require("react/jsx-runtime"),m=require("../../clsx-C11secjj.cjs"),k=require("react"),
|
|
1
|
+
"use client";"use strict";require('../../assets/styles.css');const u=require("react/jsx-runtime"),m=require("../../clsx-C11secjj.cjs"),k=require("react"),q=require("../../FieldBottomInfo-7YeZbp0-.cjs"),v=require("../../TextFieldWrapper-K0g1kAl1.cjs"),w=require("../Input/index.cjs");;/* empty css */const F=o=>o.replace(/[۰-۹]/g,r=>String("۰۱۲۳۴۵۶۷۸۹".indexOf(r))),T=o=>{const{inputsNumber:r=4,onChange:a,onEnd:g,className:y,inputsContainerClassName:N,labelContent:p,hintMessage:d,errorMessage:c,isError:j,value:i,...x}=o,f=k.useRef(!1);function l(n){document.getElementById(`dgs-ui-kit-otp-input-${n}`)?.focus()}function C(n,t){const e=[n.code,n.key];if(e.includes("Backspace")||e.includes("Delete")){const s=i.split("");s[t]="",t!==0&&l(t-1),a(s.join(""))}else e.includes("ArrowLeft")?l(t-1):e.includes("ArrowRight")&&l(t+1)}function E(n,t){const e=F(n.currentTarget.value),s=i.split("");e.length>1?e.split("").forEach((I,h)=>{h<r&&(s[h]=I)}):s[t]=e,a(s.join("")),t+1!==r&&e&&l(t+1)}return k.useEffect(()=>{i.length===r&&f.current?(f.current=!1,typeof g=="function"&&g(i)):i.length<r&&(f.current=!0)},[i]),u.jsxs("div",{className:m.clsx("dgs-ui-kit-space-y-2",y),children:[p?u.jsx(v.FieldLabel,{labelContent:p}):null,u.jsx("div",{className:m.clsx("dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-2 [direction:ltr]",N),children:Array.from(Array(r).keys()).map((n,t)=>u.jsx(w,{containerClassName:"dgs-ui-kit-w-12 dgs-ui-kit-h-12 dgs-ui-kit-p-0",className:"dgs-ui-kit-w-full dgs-ui-kit-h-full !dgs-ui-kit-text-center placeholder:!dgs-ui-kit-text-center",placeholder:"-",autoFocus:t===0,onChange:e=>E(e,t),onKeyUp:e=>C(e,t),onFocus:e=>e.currentTarget.select(),id:`dgs-ui-kit-otp-input-${t}`,value:i[t]||"",showMaxLength:!1,isError:!!c||j,autoComplete:"off",maxLength:1,onPaste:e=>{const s=e.clipboardData.getData("text");Number(s)&&a(s)},onInput:e=>{const s=e.currentTarget;return!!(Number(s.value)&&s.value.length>1)},...x},n))}),c||d?u.jsx(q.FieldBottomInfo,{errorMessage:c,hintMessage:d}):null]})};module.exports=T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/OtpInput/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuC,KAAK,EAAE,EAAsB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/OtpInput/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuC,KAAK,EAAE,EAAsB,MAAM,OAAO,CAAC;AAIzF,OAAc,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,kBAAkB,CAAC;AAE1B,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,CAAC;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAoH/B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as I, jsx as u } from "react/jsx-runtime";
|
|
3
3
|
import { c as h } from "../../clsx-OuTLNxxd.js";
|
|
4
|
-
import { useRef as b, useEffect as
|
|
5
|
-
import F from "
|
|
6
|
-
import { F as j
|
|
4
|
+
import { useRef as b, useEffect as F } from "react";
|
|
5
|
+
import { F as T } from "../../FieldBottomInfo-B1n-gK3T.js";
|
|
6
|
+
import { F as j } from "../../TextFieldWrapper-44165bs_.js";
|
|
7
|
+
import A from "../Input/index.js";
|
|
7
8
|
import '../../assets/styles.css';/* empty css */
|
|
8
|
-
const B = (a) => a.replace(/[۰-۹]/g, (i) => String("۰۱۲۳۴۵۶۷۸۹".indexOf(i))),
|
|
9
|
+
const B = (a) => a.replace(/[۰-۹]/g, (i) => String("۰۱۲۳۴۵۶۷۸۹".indexOf(i))), U = (a) => {
|
|
9
10
|
const {
|
|
10
11
|
inputsNumber: i = 4,
|
|
11
12
|
onChange: l,
|
|
@@ -35,7 +36,7 @@ const B = (a) => a.replace(/[۰-۹]/g, (i) => String("۰۱۲۳۴۵۶۷۸۹".inde
|
|
|
35
36
|
d < i && (s[d] = w);
|
|
36
37
|
}) : s[t] = e, l(s.join("")), t + 1 !== i && e && o(t + 1);
|
|
37
38
|
}
|
|
38
|
-
return
|
|
39
|
+
return F(() => {
|
|
39
40
|
r.length === i && f.current ? (f.current = !1, typeof p == "function" && p(r)) : r.length < i && (f.current = !0);
|
|
40
41
|
}, [r]), /* @__PURE__ */ I("div", { className: h("dgs-ui-kit-space-y-2", k), children: [
|
|
41
42
|
g ? /* @__PURE__ */ u(j, { labelContent: g }) : null,
|
|
@@ -47,7 +48,7 @@ const B = (a) => a.replace(/[۰-۹]/g, (i) => String("۰۱۲۳۴۵۶۷۸۹".inde
|
|
|
47
48
|
y
|
|
48
49
|
),
|
|
49
50
|
children: Array.from(Array(i).keys()).map((n, t) => /* @__PURE__ */ u(
|
|
50
|
-
|
|
51
|
+
A,
|
|
51
52
|
{
|
|
52
53
|
containerClassName: "dgs-ui-kit-w-12 dgs-ui-kit-h-12 dgs-ui-kit-p-0",
|
|
53
54
|
className: "dgs-ui-kit-w-full dgs-ui-kit-h-full !dgs-ui-kit-text-center placeholder:!dgs-ui-kit-text-center",
|
|
@@ -77,7 +78,7 @@ const B = (a) => a.replace(/[۰-۹]/g, (i) => String("۰۱۲۳۴۵۶۷۸۹".inde
|
|
|
77
78
|
}
|
|
78
79
|
),
|
|
79
80
|
c || m ? /* @__PURE__ */ u(
|
|
80
|
-
|
|
81
|
+
T,
|
|
81
82
|
{
|
|
82
83
|
errorMessage: c,
|
|
83
84
|
hintMessage: m
|
|
@@ -86,5 +87,5 @@ const B = (a) => a.replace(/[۰-۹]/g, (i) => String("۰۱۲۳۴۵۶۷۸۹".inde
|
|
|
86
87
|
] });
|
|
87
88
|
};
|
|
88
89
|
export {
|
|
89
|
-
|
|
90
|
+
U as default
|
|
90
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionItem.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Select/OptionItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGnD,KAAK,eAAe,CAAC,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CACnB,CAAC;AAyBF,QAAA,MAAM,UAAU,GAAI,CAAC,SAAU,eAAe,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"OptionItem.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Select/OptionItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGnD,KAAK,eAAe,CAAC,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CACnB,CAAC;AAyBF,QAAA,MAAM,UAAU,GAAI,CAAC,SAAU,eAAe,CAAC,CAAC,CAAC,4CA+BhD,CAAC;wBAEiC,OAAO,UAAU;AAApD,wBAAqD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Options.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Select/Options.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAgD,MAAM,SAAS,CAAC;AAOzF,QAAA,MAAM,OAAO,GAAI,CAAC,SAAU,WAAW,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"Options.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Select/Options.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAgD,MAAM,SAAS,CAAC;AAOzF,QAAA,MAAM,OAAO,GAAI,CAAC,SAAU,WAAW,CAAC,CAAC,CAAC,4CAwLzC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('../../assets/styles.css');const s=require("react/jsx-runtime"),d=require("../../clsx-C11secjj.cjs"),o=require("react"),F=require("../Checkbox/index.cjs"),W=require("../../Button/index.cjs"),R=require("../Input/index.cjs"),M=require("../../PickerWrapper-
|
|
1
|
+
"use strict";require('../../assets/styles.css');const s=require("react/jsx-runtime"),d=require("../../clsx-C11secjj.cjs"),o=require("react"),F=require("../Checkbox/index.cjs"),W=require("../../Button/index.cjs"),R=require("../Input/index.cjs"),M=require("../../PickerWrapper-CoDy6coa.cjs");;/* empty css */const _=i=>s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...i,children:s.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M11.767 20.755a8.989 8.989 0 1 0 0-17.977 8.989 8.989 0 0 0 0 17.977M18.018 18.485 21.542 22"})});function H(i,r=100){if(!i)return;const t=document.createElement("input");t.style.position="absolute",t.style.top=`${i.offsetTop+7}px`,t.style.left=`${i.offsetLeft}px`,t.style.height="0px",t.style.opacity="0px",document.body.appendChild(t),t.focus(),setTimeout(()=>{i.focus(),i.click(),document.body.removeChild(t)},r)}function z({label:i,isMultiple:r,isActive:t,disabled:u}){return r?s.jsx(F,{checked:t,label:i,readOnly:!0,disabled:u}):i}const D=i=>{const{option:r,onClick:t,value:u,mode:n,optionCellClassName:g,optionCell:a}=i;function c(){return Array.isArray(u)?u.includes(r.value):r.value===u}return s.jsx("button",{type:"button",onClick:t,className:d.clsx("dgs-ui-kit-w-full dgs-ui-kit-text-start dgs-ui-kit-px-3 disabled:dgs-ui-kit-cursor-not-allowed dgs-ui-kit-py-3 dgs-ui-kit-font-p1-regular disabled:dgs-ui-kit-bg-gray-50 dgs-ui-kit-transition",c()?"dgs-ui-kit-bg-primary-50 dgs-ui-kit-text-primary-500":"dgs-ui-kit-text-gray-700 disabled:dgs-ui-kit-text-gray-400",g),disabled:r.disabled,children:a?a(r,c()):z({label:r.label,isMultiple:n==="multiple",isActive:c(),disabled:r.disabled??!1})})},T=o.memo(D),K=20,U=i=>{const{options:r,mode:t="single",afterOptions:u,beforOptions:n,onChange:g,searchable:a=!0,separateSelectedOptions:c=!0,optionsTitle:w="عنوانها",value:p,optionCellClassName:P,emptyContent:q="نتیجهای یافت نشد !",showClearButtonOnEmpty:A=!0}=i,[f,N]=o.useState(""),[k,L]=o.useState(0),m=o.useRef(null),{toggleWrapperVisibility:$}=M.usePickerWrapperContext(),O=d.clsx("dgs-ui-kit-border-t dgs-ui-kit-border-solid dgs-ui-kit-border-gray-100",(!a&&!n||t==="multiple"&&c)&&"first-of-type:dgs-ui-kit-border-t-0",!!u&&"last-of-type:dgs-ui-kit-border-b");let h;const b=a;typeof a=="boolean"?h=a:h=Object.keys(a).length>0;const y=o.useMemo(()=>f?r?.filter(e=>e.label.includes(f)):r,[f,r]),v=o.useMemo(()=>t==="multiple"&&c?r?.filter(e=>p.includes(e.value))??[]:[],[r,p]),I=o.useMemo(()=>{let e=y;t==="multiple"&&c&&(e=e?.filter(j=>!p.includes(j.value)));const l=Math.min(k+K,e?.length??0);return e?.slice(k,l)},[y,k,p]),x=m?.current?.children[0]?.clientHeight??50,B=(y?.length??0)*x,C=o.useCallback(()=>{const e=m?.current?.parentElement;if(!e)return;const l=e.scrollTop,j=m.current.offsetTop,S=Math.floor((l-j)/x);L(S>=0?S:0)},[x]);o.useEffect(()=>{const e=m.current?.parentElement;if(e)return e.addEventListener("scroll",C),()=>e.removeEventListener("scroll",C)},[C]),o.useEffect(()=>{h&&H(document.getElementById("search-input"),400)},[]);const E=o.useCallback(e=>{if(typeof g=="function")if(t==="multiple"){const l=[...p??[]];l.includes(e)?l.splice(l.indexOf(e),1):l.push(e),g(l)}else g(e),$()},[p]);return s.jsxs(s.Fragment,{children:[h&&s.jsx(R,{id:"search-input",wrapperClassName:d.clsx("dgs-ui-kit-sticky dgs-ui-kit-top-0 dgs-ui-kit-pt-3 dgs-ui-kit-right-0 dgs-ui-kit-bg-white dgs-ui-kit-z-10 dgs-ui-kit-px-3",n?"dgs-ui-kit-pb-2":"dgs-ui-kit-pb-3",b?.wrapperClassName),placeholder:b?.placeholder??"جستجوی عنوان",value:f,onChange:e=>N(e.currentTarget.value),rightIcon:b?.rightIcon??s.jsx(_,{width:20,height:20}),...typeof a=="object"?a:{}}),n,t==="multiple"&&c&&v.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"dgs-ui-kit-font-p2-regular dgs-ui-kit-text-gray-400 dgs-ui-kit-px-3 dgs-ui-kit-py-2",children:`${w}ی انتخاب شده`}),v.map(e=>s.jsx(T,{onClick:()=>E(e.value),option:e,optionCellClassName:d.clsx(O,P),...i},e.value))]}),s.jsxs(s.Fragment,{children:[t==="multiple"&&c&&s.jsx("p",{className:"dgs-ui-kit-font-p2-regular dgs-ui-kit-text-gray-400 dgs-ui-kit-px-3 dgs-ui-kit-py-2",children:w}),s.jsx("div",{ref:m,className:"dgs-ui-kit-relative",style:{height:B},children:I?.map((e,l)=>s.jsx("div",{className:d.clsx("dgs-ui-kit-absolute dgs-ui-kit-w-full",O),style:{top:`${(k+l)*x}px`},children:s.jsx(T,{onClick:()=>E(e.value),option:e,...i})},e.value))}),!I?.length&&!v.length&&s.jsxs("div",{className:"dgs-ui-kit-text-center dgs-ui-kit-flex dgs-ui-kit-flex-col dgs-ui-kit-items-center dgs-ui-kit-mt-2",children:[s.jsx("p",{className:"dgs-ui-kit-text-gray-500 dgs-ui-kit-font-p3-medium",children:q}),A&&s.jsx(W,{type:"button",className:"dgs-ui-kit-mt-1",variant:"text",size:"small",onClick:()=>N(""),children:"پاک کردن"})]})]}),u]})};function V(i,r){return Array.isArray(i)?r.filter(t=>i.includes(t.value)).map(t=>t.label).join(", "):r.find(t=>t.value===i)?.label??""}const G=i=>{const{searchable:r=!0,value:t,options:u}=i,n={...i};return n.dropdownType==="popover"&&!r&&(n.popoverClassName=d.clsx("dgs-ui-kit-pt-3",n.popoverClassName)),n.dropdownType==="drawer"&&(n.drawerProps={...n.drawerProps,containerClassName:d.clsx(r?"!dgs-ui-kit-pt-0":"!dgs-ui-kit-pt-3",n.drawerProps?.containerClassName)}),n.customInput||(n.inputProps={...n.inputProps,value:V(t,u)}),s.jsx(M.PickerWrapper,{...n,children:s.jsx(U,{...i})})};module.exports=G;
|
|
@@ -4,7 +4,7 @@ import { memo as D, useState as L, useRef as F, useMemo as O, useCallback as M,
|
|
|
4
4
|
import K from "../Checkbox/index.js";
|
|
5
5
|
import U from "../../Button/index.js";
|
|
6
6
|
import V from "../Input/index.js";
|
|
7
|
-
import { u as q, P as G } from "../../PickerWrapper-
|
|
7
|
+
import { u as q, P as G } from "../../PickerWrapper-BrMn3Ldu.js";
|
|
8
8
|
import '../../assets/styles.css';/* empty css */
|
|
9
9
|
const J = (i) => /* @__PURE__ */ n(
|
|
10
10
|
"svg",
|
|
@@ -58,6 +58,7 @@ const Y = (i) => {
|
|
|
58
58
|
return /* @__PURE__ */ n(
|
|
59
59
|
"button",
|
|
60
60
|
{
|
|
61
|
+
type: "button",
|
|
61
62
|
onClick: t,
|
|
62
63
|
className: d(
|
|
63
64
|
"dgs-ui-kit-w-full dgs-ui-kit-text-start dgs-ui-kit-px-3 disabled:dgs-ui-kit-cursor-not-allowed dgs-ui-kit-py-3 dgs-ui-kit-font-p1-regular disabled:dgs-ui-kit-bg-gray-50 dgs-ui-kit-transition",
|
|
@@ -192,6 +193,7 @@ const Y = (i) => {
|
|
|
192
193
|
H && /* @__PURE__ */ n(
|
|
193
194
|
U,
|
|
194
195
|
{
|
|
196
|
+
type: "button",
|
|
195
197
|
className: "dgs-ui-kit-mt-1",
|
|
196
198
|
variant: "text",
|
|
197
199
|
size: "small",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),o=require("../../clsx-C11secjj.cjs"),u=require("react"),c=require("../../omitObjects-CtiYo0hv.cjs"),d=require("../../TextFieldWrapper-
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),o=require("../../clsx-C11secjj.cjs"),u=require("react"),c=require("../../omitObjects-CtiYo0hv.cjs"),d=require("../../TextFieldWrapper-K0g1kAl1.cjs"),g=u.forwardRef(function(e,i){const{dir:t="rtl",placeholderDir:l=t,className:a,...r}=e,n=c.omitObject(r,["labelAddon","labelContent","link","rightIcon","isError","errorMessage","hintMessage","wrapperClassName","showMaxLength","containerClassName"]);return s.jsx(d.TextFieldWrapper,{...e,children:s.jsx("textarea",{...n,ref:i,className:o.clsx("dgs-ui-kit-bg-transparent dgs-ui-kit-leading-normal 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",t==="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",a),rows:r.rows??5})})});module.exports=g;
|
|
@@ -2,7 +2,7 @@ import { jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as n } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { forwardRef as d } from "react";
|
|
4
4
|
import { o as g } from "../../omitObjects-CxFrrlkX.js";
|
|
5
|
-
import { T as u } from "../../TextFieldWrapper-
|
|
5
|
+
import { T as u } from "../../TextFieldWrapper-44165bs_.js";
|
|
6
6
|
const h = d(function(t, s) {
|
|
7
7
|
const { dir: e = "rtl", placeholderDir: o = e, className: a, ...r } = t, l = g(r, [
|
|
8
8
|
"labelAddon",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PickerWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Wrappers/PickerWrapper/PickerWrapper.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAKlE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAGjD,OAAO,kBAAkB,CAAC;AAM1B,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"PickerWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Wrappers/PickerWrapper/PickerWrapper.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAKlE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAGjD,OAAO,kBAAkB,CAAC;AAM1B,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CA6H5D,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,26 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
link?: {
|
|
6
|
-
cnotent: string;
|
|
7
|
-
href: string;
|
|
8
|
-
};
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { FieldBottomInfoProps } from '../../Common/FieldBottomInfo/FieldBottomInfo';
|
|
3
|
+
import { FieldLabelProps } from '../../Common/FieldLabel/FieldLabel';
|
|
4
|
+
export interface TextFieldBaseProps extends FieldLabelProps, Omit<FieldBottomInfoProps, 'extraHelper'> {
|
|
9
5
|
containerClassName?: string;
|
|
10
6
|
rightIcon?: JSX.Element;
|
|
11
7
|
dir?: 'rtl' | 'ltr';
|
|
12
8
|
placeholderDir?: 'rtl' | 'ltr';
|
|
13
9
|
isError?: boolean;
|
|
14
|
-
errorMessage?: string;
|
|
15
|
-
hintMessage?: string;
|
|
16
10
|
wrapperClassName?: string;
|
|
17
11
|
showMaxLength?: boolean;
|
|
18
12
|
}
|
|
19
13
|
interface TextFieldWrapperProps extends TextFieldBaseProps {
|
|
20
|
-
required?: boolean;
|
|
21
|
-
disabled?: boolean;
|
|
22
14
|
maxLength?: number;
|
|
23
|
-
labelAddon?: React.ReactNode;
|
|
24
15
|
value?: string | number | readonly string[];
|
|
25
16
|
children: ReactNode;
|
|
26
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFieldWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Wrappers/TextFieldWrapper/TextFieldWrapper.tsx"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"TextFieldWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Wrappers/TextFieldWrapper/TextFieldWrapper.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAwB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,8CAA8C,CAAC;AACtD,OAAmB,EAAE,KAAK,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAEtF,OAAO,kBAAkB,CAAC;AAE1B,MAAM,WAAW,kBACf,SAAQ,eAAe,EACrB,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC;IAC3C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACxB,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACpB,cAAc,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,UAAU,qBAAsB,SAAQ,kBAAkB;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA2E/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),n=l=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...l,children:o.jsx("path",{fill:"currentColor",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"})});exports.
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),n=l=>o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...l,children:o.jsx("path",{fill:"currentColor",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"})});exports.IconArrowDown2=n;
|
|
@@ -1 +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.
|
|
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.IconArrowLeft2=l;
|
|
@@ -1 +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.
|
|
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.IconArrowRight2=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),o=l=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...l,children:e.jsx("path",{fill:"currentColor",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"})});exports.
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),o=l=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...l,children:e.jsx("path",{fill:"currentColor",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"})});exports.IconCloseRemove=o;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
const l = (r) => /* @__PURE__ */ t(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: "1em",
|
|
7
|
+
height: "1em",
|
|
8
|
+
fill: "none",
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
...r,
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ o(
|
|
13
|
+
"path",
|
|
14
|
+
{
|
|
15
|
+
fill: "currentColor",
|
|
16
|
+
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"
|
|
17
|
+
}
|
|
18
|
+
),
|
|
19
|
+
/* @__PURE__ */ o(
|
|
20
|
+
"path",
|
|
21
|
+
{
|
|
22
|
+
fill: "currentColor",
|
|
23
|
+
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"
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
export {
|
|
30
|
+
l as I
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),t=s=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24",...s,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"})]});exports.IconEye=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";require('../assets/styles.css');const o=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";require('../assets/styles.css');const o=require("react/jsx-runtime"),I=require("../clsx-C11secjj.cjs"),w=require("react"),y=require("../IconArrowLeft2-CNA3H0xY.cjs"),R=require("../IconArrowRight2-CF_bdH81.cjs"),P=require("../Button/index.cjs");;/* empty css */const h="...";function k(d,g){const n=g-d+1;return Array.from({length:n},(u,t)=>t+d)}function v({totalCount:d,pageSize:g,siblingCount:n,currentPage:u}){const t=Math.ceil(d/g);if(n+5>=t)return k(1,t);const e=Math.max(u-n,1),c=Math.min(u+n,t),l=e>2,s=c<t-1,f=1,a=t;if(!l&&s){let r=2+n;return e>1&&(r+=1),[...k(1,r),h,t]}if(l&&!s){let r=2+n;c<t&&(r+=1);const i=k(t-r+1,t);return[f,h,...i]}const x=k(e,c);return[f,h,...x,h,a]}const C=d=>{const{totalCount:g,pageSize:n,onPageChange:u,siblingCount:t=1,defaultCurrent:m=1,navigationButtonsWithText:e=!0,hideOnSinglePage:c,className:l}=d,[s,f]=w.useState(m),a=v({totalCount:g,pageSize:n,siblingCount:t,currentPage:s}),x=a[a.length-1];if(c&&a.length<2)return null;function r(i){typeof u=="function"&&u(i),f(i)}return o.jsxs("div",{className:I.clsx("dgs-ui-kit-flex dgs-ui-kit-justify-between dgs-ui-kit-w-full dgs-ui-kit-px-4 dgs-ui-kit-text-gray-600",l),children:[o.jsx(P,{disabled:s===1,onClick:()=>r(s-1),rightIcon:o.jsx(R.IconArrowRight2,{}),variant:e?"text":"secondary",size:e?"medium":"small",children:e&&"صفحه قبل"}),o.jsx("div",{className:"dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-x-1 md:dgs-ui-kit-gap-x-4",children:a.map((i,j)=>typeof i=="string"?o.jsx("div",{children:h},`${i}-${j}`):o.jsx("button",{className:I.clsx("ss02 dgs-ui-kit-w-9 dgs-ui-kit-h-9 md:dgs-ui-kit-w-11 md:dgs-ui-kit-h-11 dgs-ui-kit-flex dgs-ui-kit-justify-center dgs-ui-kit-items-center dgs-ui-kit-font-h6-bold md:dgs-ui-kit-font-h5-bold dgs-ui-kit-transition dgs-ui-kit-border dgs-ui-kit-border-solid dgs-ui-kit-border-transparent dgs-ui-kit-rounded-lg",i===s?"dgs-ui-kit-bg-primary-500 dgs-ui-kit-text-white":"hover:dgs-ui-kit-text-primary-500 hover:dgs-ui-kit-border-primary-200",l),onClick:()=>r(i),children:i},i))}),o.jsx(P,{disabled:s===x,onClick:()=>r(s+1),leftIcon:o.jsx(y.IconArrowLeft2,{}),variant:e?"text":"secondary",size:e?"medium":"small",children:e&&"صفحه بعد"})]})};module.exports=C;
|
package/dist/Pagination/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as y, jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import { c as p } from "../clsx-OuTLNxxd.js";
|
|
4
4
|
import { useState as w } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
5
|
+
import { I as v } from "../IconArrowLeft2-cxcPyDqS.js";
|
|
6
|
+
import { I as C } from "../IconArrowRight2-BoXg0Gkw.js";
|
|
7
|
+
import I from "../Button/index.js";
|
|
8
8
|
import '../assets/styles.css';/* empty css */
|
|
9
9
|
const f = "...";
|
|
10
10
|
function h(d, u) {
|
|
@@ -55,7 +55,7 @@ const B = (d) => {
|
|
|
55
55
|
function o(i) {
|
|
56
56
|
typeof a == "function" && a(i), m(i);
|
|
57
57
|
}
|
|
58
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ y(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
61
61
|
className: p(
|
|
@@ -64,7 +64,7 @@ const B = (d) => {
|
|
|
64
64
|
),
|
|
65
65
|
children: [
|
|
66
66
|
/* @__PURE__ */ r(
|
|
67
|
-
|
|
67
|
+
I,
|
|
68
68
|
{
|
|
69
69
|
disabled: s === 1,
|
|
70
70
|
onClick: () => o(s - 1),
|
|
@@ -74,7 +74,7 @@ const B = (d) => {
|
|
|
74
74
|
children: e && "صفحه قبل"
|
|
75
75
|
}
|
|
76
76
|
),
|
|
77
|
-
/* @__PURE__ */ r("div", { className: "dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-x-1 md:dgs-ui-kit-gap-x-4", children: g.map((i,
|
|
77
|
+
/* @__PURE__ */ r("div", { className: "dgs-ui-kit-flex dgs-ui-kit-items-center dgs-ui-kit-gap-x-1 md:dgs-ui-kit-gap-x-4", children: g.map((i, P) => typeof i == "string" ? /* @__PURE__ */ r("div", { children: f }, `${i}-${P}`) : /* @__PURE__ */ r(
|
|
78
78
|
"button",
|
|
79
79
|
{
|
|
80
80
|
className: p(
|
|
@@ -88,7 +88,7 @@ const B = (d) => {
|
|
|
88
88
|
i
|
|
89
89
|
)) }),
|
|
90
90
|
/* @__PURE__ */ r(
|
|
91
|
-
|
|
91
|
+
I,
|
|
92
92
|
{
|
|
93
93
|
disabled: s === k,
|
|
94
94
|
onClick: () => o(s + 1),
|