se-design 0.0.125 → 0.0.126
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/assets/style.css +1 -1
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/InputWithIcon/index.d.ts +27 -0
- package/dist/components/InputWithTags/index.d.ts +4 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +22 -20
- package/dist/index.js.map +1 -1
- package/dist/index100.js +2 -2
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +1 -1
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +1 -1
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +1 -1
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +1 -1
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +1 -1
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +1 -1
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +1 -1
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +1 -1
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +1 -1
- package/dist/index109.js.map +1 -1
- package/dist/index110.js +1 -1
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +1 -1
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +1 -1
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +1 -1
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +1 -1
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +2 -2
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +2 -2
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +1 -1
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +1 -1
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +2 -2
- package/dist/index119.js.map +1 -1
- package/dist/index120.js +2 -2
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +1 -1
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +1 -1
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +1 -1
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +1 -1
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -2
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +2 -2
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +2 -2
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +2 -149
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +152 -0
- package/dist/index129.js.map +1 -0
- package/dist/{index140.js → index141.js} +1 -1
- package/dist/{index140.js.map → index141.js.map} +1 -1
- package/dist/{index148.js → index149.js} +1 -1
- package/dist/{index148.js.map → index149.js.map} +1 -1
- package/dist/index152.js +9 -4
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +10 -170
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +5 -11
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +170 -6
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +11 -6
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +5 -37
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +6 -2
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +37 -7
- package/dist/index159.js.map +1 -1
- package/dist/index160.js +2 -327
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +7 -49
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +327 -2
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +45 -71
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +2 -93
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +72 -48
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +92 -7
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +51 -4
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +7 -51
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +5 -2
- package/dist/index169.js.map +1 -1
- package/dist/index170.js +52 -2
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +5 -0
- package/dist/index171.js.map +1 -0
- package/dist/index172.js +5 -0
- package/dist/index172.js.map +1 -0
- package/dist/index21.js +28 -27
- package/dist/index21.js.map +1 -1
- package/dist/index35.js +34 -25
- package/dist/index35.js.map +1 -1
- package/dist/index38.js +1 -1
- package/dist/index44.js +1 -1
- package/dist/index5.js +79 -79
- package/dist/index50.js +55 -2
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +1 -1
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +1 -1
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +1 -1
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +1 -1
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +1 -1
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +1 -1
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +1 -1
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +1 -1
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +1 -1
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +1 -1
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +1 -1
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +1 -1
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +1 -1
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +1 -1
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +1 -1
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +1 -1
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +1 -1
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +1 -1
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +2 -2
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +2 -2
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +1 -1
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +1 -1
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +2 -2
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +2 -2
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +1 -1
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +1 -1
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +1 -1
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +2 -2
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +1 -1
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +2 -2
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +1 -1
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +1 -1
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +1 -1
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +2 -2
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +2 -2
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +1 -1
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +1 -1
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +1 -1
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +1 -1
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +1 -1
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +2 -2
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +2 -2
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +1 -1
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +1 -1
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +2 -2
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +1 -1
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +2 -2
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +2 -2
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +2 -2
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
- package/dist/index150.js +0 -13
- package/dist/index150.js.map +0 -1
- package/dist/index151.js +0 -13
- package/dist/index151.js.map +0 -1
package/dist/index170.js
CHANGED
@@ -1,5 +1,55 @@
|
|
1
|
-
|
1
|
+
import { __require as E } from "./index168.js";
|
2
|
+
import { __require as _ } from "./index169.js";
|
3
|
+
var f, v;
|
4
|
+
function P() {
|
5
|
+
if (v) return f;
|
6
|
+
v = 1;
|
7
|
+
var o = function() {
|
8
|
+
};
|
9
|
+
if (process.env.NODE_ENV !== "production") {
|
10
|
+
var y = E(), t = {}, d = _();
|
11
|
+
o = function(n) {
|
12
|
+
var a = "Warning: " + n;
|
13
|
+
typeof console != "undefined" && console.error(a);
|
14
|
+
try {
|
15
|
+
throw new Error(a);
|
16
|
+
} catch (i) {
|
17
|
+
}
|
18
|
+
};
|
19
|
+
}
|
20
|
+
function u(n, a, i, s, c) {
|
21
|
+
if (process.env.NODE_ENV !== "production") {
|
22
|
+
for (var e in n)
|
23
|
+
if (d(n, e)) {
|
24
|
+
var r;
|
25
|
+
try {
|
26
|
+
if (typeof n[e] != "function") {
|
27
|
+
var h = Error(
|
28
|
+
(s || "React class") + ": " + i + " type `" + e + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[e] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
29
|
+
);
|
30
|
+
throw h.name = "Invariant Violation", h;
|
31
|
+
}
|
32
|
+
r = n[e](a, e, s, i, null, y);
|
33
|
+
} catch (l) {
|
34
|
+
r = l;
|
35
|
+
}
|
36
|
+
if (r && !(r instanceof Error) && o(
|
37
|
+
(s || "React class") + ": type specification of " + i + " `" + e + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof r + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
38
|
+
), r instanceof Error && !(r.message in t)) {
|
39
|
+
t[r.message] = !0;
|
40
|
+
var p = c ? c() : "";
|
41
|
+
o(
|
42
|
+
"Failed " + i + " type: " + r.message + (p != null ? p : "")
|
43
|
+
);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
return u.resetWarningCache = function() {
|
49
|
+
process.env.NODE_ENV !== "production" && (t = {});
|
50
|
+
}, f = u, f;
|
51
|
+
}
|
2
52
|
export {
|
3
|
-
|
53
|
+
P as __require
|
4
54
|
};
|
5
55
|
//# sourceMappingURL=index170.js.map
|
package/dist/index170.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index170.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
1
|
+
{"version":3,"file":"index170.js","sources":["../node_modules/prop-types/checkPropTypes.js"],"sourcesContent":["/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n"],"names":["printWarning","ReactPropTypesSecret","require$$0","loggedTypeFailures","has","require$$1","text","message","x","checkPropTypes","typeSpecs","values","location","componentName","getStack","typeSpecName","error","err","ex","stack","checkPropTypes_1"],"mappings":";;;;;;AASA,MAAIA,IAAe,WAAW;AAAA,EAAE;AAEhC,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,QAAIC,IAAuBC,EAAqC,GAC5DC,IAAqB,CAAE,GACvBC,IAAMC,EAAoB;AAE9B,IAAAL,IAAe,SAASM,GAAM;AAC5B,UAAIC,IAAU,cAAcD;AAC5B,MAAI,OAAO,WAAY,eACrB,QAAQ,MAAMC,CAAO;AAEvB,UAAI;AAIF,cAAM,IAAI,MAAMA,CAAO;AAAA,MACxB,SAAQC,GAAG;AAAA,MAAA;AAAA,IACb;AAAA;AAcH,WAASC,EAAeC,GAAWC,GAAQC,GAAUC,GAAeC,GAAU;AAC5E,QAAI,QAAQ,IAAI,aAAa;AAC3B,eAASC,KAAgBL;AACvB,YAAIN,EAAIM,GAAWK,CAAY,GAAG;AAChC,cAAIC;AAIJ,cAAI;AAGF,gBAAI,OAAON,EAAUK,CAAY,KAAM,YAAY;AACjD,kBAAIE,IAAM;AAAA,iBACPJ,KAAiB,iBAAiB,OAAOD,IAAW,YAAYG,IAAe,+FACC,OAAOL,EAAUK,CAAY,IAAI;AAAA,cAEnH;AACD,oBAAAE,EAAI,OAAO,uBACLA;AAAA;AAER,YAAAD,IAAQN,EAAUK,CAAY,EAAEJ,GAAQI,GAAcF,GAAeD,GAAU,MAAMX,CAAoB;AAAA,UAC1G,SAAQiB,GAAI;AACX,YAAAF,IAAQE;AAAA;AAYV,cAVIF,KAAS,EAAEA,aAAiB,UAC9BhB;AAAA,aACGa,KAAiB,iBAAiB,6BACnCD,IAAW,OAAOG,IAAe,6FAC6B,OAAOC,IAAQ;AAAA,UAI9E,GAECA,aAAiB,SAAS,EAAEA,EAAM,WAAWb,IAAqB;AAGpE,YAAAA,EAAmBa,EAAM,OAAO,IAAI;AAEpC,gBAAIG,IAAQL,IAAWA,EAAQ,IAAK;AAEpC,YAAAd;AAAA,cACE,YAAYY,IAAW,YAAYI,EAAM,WAAWG,KAAS,OAAOA,IAAQ;AAAA,YAC7E;AAAA;;;;AAYX,SAAAV,EAAe,oBAAoB,WAAW;AAC5C,IAAI,QAAQ,IAAI,aAAa,iBAC3BN,IAAqB,CAAE;AAAA,KAI3BiB,IAAiBX;;","x_google_ignoreList":[0]}
|
package/dist/index171.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index171.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index172.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index172.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index21.js
CHANGED
@@ -1,42 +1,43 @@
|
|
1
|
-
import
|
1
|
+
import n, { useState as h, useEffect as d } from "react";
|
2
2
|
/* empty css */
|
3
|
-
const
|
3
|
+
const $ = ({
|
4
4
|
className: u = "",
|
5
5
|
automationId: a = "",
|
6
6
|
defaultChecked: o = !1,
|
7
|
-
disabled:
|
7
|
+
disabled: t = !1,
|
8
8
|
onChange: i,
|
9
|
-
checkMarkType:
|
10
|
-
label:
|
9
|
+
checkMarkType: s = "",
|
10
|
+
label: m = "",
|
11
|
+
disabledLabel: l = ""
|
11
12
|
}) => {
|
12
|
-
const [
|
13
|
-
|
14
|
-
|
13
|
+
const [e, r] = h(o);
|
14
|
+
d(() => {
|
15
|
+
r(o);
|
15
16
|
}, [o]);
|
16
|
-
const
|
17
|
-
|
18
|
-
},
|
19
|
-
const
|
20
|
-
return
|
21
|
-
};
|
22
|
-
return /* @__PURE__ */
|
17
|
+
const b = () => {
|
18
|
+
t || (r((c) => !c), i == null || i(!e));
|
19
|
+
}, x = () => {
|
20
|
+
const c = "focus-visible:outline outline-2 outline-[var(--color-blue-400)] outline-offset-2 rounded";
|
21
|
+
return t ? e && s === "tick" ? "disabled-tick" : e && s === "minus-checkbox" ? "disabled-minus-checkbox" : e && !s ? "disabled-tick" : "disabled" : s === "minus-checkbox" && e ? `minus-checkbox ${c}` : e ? `checked ${c}` : `unchecked ${c}`;
|
22
|
+
}, f = () => t ? "checkbox-label-disabled" : "checkbox-label", k = () => t && l ? l : m;
|
23
|
+
return /* @__PURE__ */ n.createElement("div", {
|
23
24
|
className: "se-design-checkbox-ctn"
|
24
|
-
}, /* @__PURE__ */
|
25
|
-
className: `se-design-checkbox ${u} ${
|
25
|
+
}, /* @__PURE__ */ n.createElement("label", {
|
26
|
+
className: `se-design-checkbox ${u} ${x()}`,
|
26
27
|
"data-automation-id": a,
|
27
|
-
tabIndex:
|
28
|
-
}, /* @__PURE__ */
|
28
|
+
tabIndex: t ? -1 : 0
|
29
|
+
}, /* @__PURE__ */ n.createElement("input", {
|
29
30
|
type: "checkbox",
|
30
|
-
checked:
|
31
|
-
onChange:
|
32
|
-
disabled:
|
33
|
-
}), /* @__PURE__ */
|
31
|
+
checked: e,
|
32
|
+
onChange: b,
|
33
|
+
disabled: t
|
34
|
+
}), /* @__PURE__ */ n.createElement("span", {
|
34
35
|
className: "checkbox-item"
|
35
|
-
})), /* @__PURE__ */
|
36
|
-
className:
|
37
|
-
},
|
36
|
+
})), /* @__PURE__ */ n.createElement("label", {
|
37
|
+
className: f()
|
38
|
+
}, k()));
|
38
39
|
};
|
39
40
|
export {
|
40
|
-
|
41
|
+
$ as Checkbox
|
41
42
|
};
|
42
43
|
//# sourceMappingURL=index21.js.map
|
package/dist/index21.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index21.js","sources":["../src/components/Checkbox/index.tsx"],"sourcesContent":["import React, { FC, useState, useEffect } from 'react';\nimport \"./style.scss\";\n\nexport interface CheckboxProps {\n className?: string;\n automationId?: string;\n defaultChecked?: boolean;\n onChange?: (checked: boolean) => void;\n disabled?: boolean;\n checkMarkType?: \"tick\" | \"minus-checkbox\" | \"\";\n label?: string;\n}\n\nexport const Checkbox: FC<CheckboxProps> = ({\n className = '',\n automationId = '',\n defaultChecked = false,\n disabled = false,\n onChange,\n checkMarkType = '',\n label = '',\n}) => {\n \n const [isChecked, setIsChecked] = useState(defaultChecked);\n\n useEffect(() => {\n setIsChecked(defaultChecked);\n }, [defaultChecked]);\n\n const handleClick = () => {\n if (disabled) return;\n setIsChecked((prev) => (checkMarkType === \"minus-checkbox\" ? !prev : !prev));\n onChange?.(!isChecked);\n };\n\n const getCheckBoxClassName = () => { \n const focusClass = 'focus-visible:outline outline-2 outline-[var(--color-blue-400)] outline-offset-2 rounded';\n
|
1
|
+
{"version":3,"file":"index21.js","sources":["../src/components/Checkbox/index.tsx"],"sourcesContent":["import React, { FC, useState, useEffect } from 'react';\nimport \"./style.scss\";\n\nexport interface CheckboxProps {\n className?: string;\n automationId?: string;\n defaultChecked?: boolean;\n onChange?: (checked: boolean) => void;\n disabled?: boolean;\n checkMarkType?: \"tick\" | \"minus-checkbox\" | \"\";\n label?: string;\n disabledLabel?: string;\n}\n\nexport const Checkbox: FC<CheckboxProps> = ({\n className = '',\n automationId = '',\n defaultChecked = false,\n disabled = false,\n onChange,\n checkMarkType = '',\n label = '',\n disabledLabel = '',\n}) => {\n \n const [isChecked, setIsChecked] = useState(defaultChecked);\n\n useEffect(() => {\n setIsChecked(defaultChecked);\n }, [defaultChecked]);\n\n const handleClick = () => {\n if (disabled) return;\n setIsChecked((prev) => (checkMarkType === \"minus-checkbox\" ? !prev : !prev));\n onChange?.(!isChecked);\n };\n\n const getCheckBoxClassName = () => { \n const focusClass = 'focus-visible:outline outline-2 outline-[var(--color-blue-400)] outline-offset-2 rounded';\n \n // Handle disabled states with proper checked status\n if (disabled) {\n if (isChecked && checkMarkType === \"tick\") return 'disabled-tick';\n if (isChecked && checkMarkType === \"minus-checkbox\") return 'disabled-minus-checkbox';\n if (isChecked && !checkMarkType) return 'disabled-tick'; // Default to tick for checked disabled\n return 'disabled'; // Unchecked disabled\n }\n \n // Handle enabled states\n if (checkMarkType === \"minus-checkbox\" && isChecked) return `minus-checkbox ${focusClass}`;\n return isChecked ? `checked ${focusClass}` : `unchecked ${focusClass}`;\n };\n\n const getLabelClassName = () => {\n return disabled ? 'checkbox-label-disabled' : 'checkbox-label';\n };\n\n const getLabelText = () => {\n if (disabled && disabledLabel) {\n return disabledLabel;\n }\n return label;\n };\n\n return (\n <div className=\"se-design-checkbox-ctn\">\n <label className={`se-design-checkbox ${className} ${getCheckBoxClassName()}`} data-automation-id={automationId} tabIndex={disabled ? -1 : 0}>\n <input \n type=\"checkbox\" \n checked={isChecked} \n onChange={handleClick} \n disabled={disabled}\n />\n <span className=\"checkbox-item\"></span>\n </label>\n <label className={getLabelClassName()}>{getLabelText()}</label>\n </div>\n );\n};\n"],"names":["Checkbox","className","automationId","defaultChecked","disabled","onChange","checkMarkType","label","disabledLabel","isChecked","setIsChecked","useState","useEffect","handleClick","prev","getCheckBoxClassName","focusClass","getLabelClassName","getLabelText","React","createElement","tabIndex","type","checked"],"mappings":";;AAcO,MAAMA,IAA8BA,CAAC;AAAA,EAC1CC,WAAAA,IAAY;AAAA,EACZC,cAAAA,IAAe;AAAA,EACfC,gBAAAA,IAAiB;AAAA,EACjBC,UAAAA,IAAW;AAAA,EACXC,UAAAA;AAAAA,EACAC,eAAAA,IAAgB;AAAA,EAChBC,OAAAA,IAAQ;AAAA,EACRC,eAAAA,IAAgB;AAClB,MAAM;AAEJ,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAASR,CAAc;AAEzDS,EAAAA,EAAU,MAAM;AACdF,IAAAA,EAAaP,CAAc;AAAA,EAAA,GAC1B,CAACA,CAAc,CAAC;AAEnB,QAAMU,IAAcA,MAAM;AACxB,IAAIT,MACJM,EAAcI,OAA+C,CAACA,CAAa,GAC3ET,KAAAA,QAAAA,EAAW,CAACI;AAAAA,EACd,GAEMM,IAAuBA,MAAM;AACjC,UAAMC,IAAa;AAGnB,WAAIZ,IACEK,KAAaH,MAAkB,SAAe,kBAC9CG,KAAaH,MAAkB,mBAAyB,4BACxDG,KAAa,CAACH,IAAsB,kBACjC,aAILA,MAAkB,oBAAoBG,IAAkB,kBAAkBO,CAAU,KACjFP,IAAY,WAAWO,CAAU,KAAK,aAAaA,CAAU;AAAA,EACtE,GAEMC,IAAoBA,MACjBb,IAAW,4BAA4B,kBAG1Cc,IAAeA,MACfd,KAAYI,IACPA,IAEFD;AAIPY,SAAAA,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKnB,WAAU;AAAA,EAAA,GACbmB,gBAAAA,EAAAA,cAAA,SAAA;AAAA,IAAOnB,WAAW,sBAAsBA,CAAS,IAAIc,EAAsB,CAAA;AAAA,IAAI,sBAAoBb;AAAAA,IAAcmB,UAAUjB,IAAW,KAAK;AAAA,EAAA,GACzIgB,gBAAAA,EAAAA,cAAA,SAAA;AAAA,IACEE,MAAK;AAAA,IACLC,SAASd;AAAAA,IACTJ,UAAUQ;AAAAA,IACVT,UAAAA;AAAAA,EAAAA,CACD,GACDgB,gBAAAA,EAAAA,cAAA,QAAA;AAAA,IAAMnB,WAAU;AAAA,EAAsB,CAAA,CACjC,GACPkB,gBAAAA,EAAAC,cAAA,SAAA;AAAA,IAAOnB,WAAWgB,EAAkB;AAAA,EAAA,GAAIC,EAAsB,CAAA,CAC3D;AAET;"}
|
package/dist/index35.js
CHANGED
@@ -1,51 +1,60 @@
|
|
1
|
-
import
|
1
|
+
import a, { useState as o, useRef as d } from "react";
|
2
2
|
/* empty css */
|
3
3
|
import { Icon as T } from "./index5.js";
|
4
|
-
function
|
5
|
-
value:
|
4
|
+
function _({
|
5
|
+
value: f,
|
6
6
|
onChange: e,
|
7
|
-
placeholder:
|
8
|
-
className:
|
7
|
+
placeholder: w,
|
8
|
+
className: E,
|
9
|
+
error: n,
|
10
|
+
errorMessage: v,
|
11
|
+
label: r
|
9
12
|
}) {
|
10
|
-
const [
|
11
|
-
if (t.key === "Enter" &&
|
13
|
+
const [i, l] = o([...f]), [c, m] = o(""), u = d(null), N = (t) => {
|
14
|
+
if (t.key === "Enter" && c.trim()) {
|
12
15
|
t.preventDefault();
|
13
|
-
const s = [...
|
14
|
-
l(s),
|
15
|
-
} else if (t.key === "Backspace" &&
|
16
|
-
const s =
|
16
|
+
const s = [...i, c.trim()];
|
17
|
+
l(s), m(""), e == null || e(s);
|
18
|
+
} else if (t.key === "Backspace" && c === "" && i.length > 0) {
|
19
|
+
const s = i.slice(0, -1);
|
17
20
|
l(s), e == null || e(s);
|
18
21
|
}
|
19
22
|
};
|
20
|
-
return /* @__PURE__ */
|
21
|
-
className:
|
23
|
+
return /* @__PURE__ */ a.createElement("div", {
|
24
|
+
className: "input-with-tags-main-container"
|
25
|
+
}, r && /* @__PURE__ */ a.createElement("div", {
|
26
|
+
className: "label-container"
|
27
|
+
}, r), /* @__PURE__ */ a.createElement("div", {
|
28
|
+
className: `input-with-tags-container ${n ? "input-with-tags-error" : ""} ${E}`,
|
22
29
|
onClick: () => {
|
23
30
|
var t;
|
24
31
|
return (t = u.current) == null ? void 0 : t.focus();
|
25
32
|
}
|
26
|
-
},
|
33
|
+
}, i.map((t, s) => /* @__PURE__ */ a.createElement("span", {
|
27
34
|
key: s,
|
28
35
|
className: "tag-in-inputwithtags"
|
29
|
-
}, t, /* @__PURE__ */
|
36
|
+
}, t, /* @__PURE__ */ a.createElement("span", {
|
30
37
|
className: "close-icon-in-inputwithtags",
|
31
38
|
onClick: (k) => {
|
32
39
|
k.stopPropagation();
|
33
|
-
const
|
34
|
-
l(
|
40
|
+
const p = i.filter((g, y) => y !== s);
|
41
|
+
l(p), e == null || e(p);
|
35
42
|
}
|
36
|
-
}, /* @__PURE__ */
|
43
|
+
}, /* @__PURE__ */ a.createElement(T, {
|
37
44
|
name: "close"
|
38
|
-
})))), /* @__PURE__ */
|
45
|
+
})))), /* @__PURE__ */ a.createElement("input", {
|
39
46
|
className: "input-with-tags-input",
|
40
47
|
ref: u,
|
41
48
|
type: "text",
|
42
|
-
value:
|
43
|
-
onChange: (t) =>
|
44
|
-
onKeyDown:
|
45
|
-
placeholder:
|
46
|
-
}))
|
49
|
+
value: c,
|
50
|
+
onChange: (t) => m(t.target.value),
|
51
|
+
onKeyDown: N,
|
52
|
+
placeholder: w
|
53
|
+
})), n && /* @__PURE__ */ a.createElement("div", {
|
54
|
+
className: "error-message"
|
55
|
+
}, v));
|
47
56
|
}
|
48
57
|
export {
|
49
|
-
|
58
|
+
_ as InputWithTags
|
50
59
|
};
|
51
60
|
//# sourceMappingURL=index35.js.map
|
package/dist/index35.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index35.js","sources":["../src/components/InputWithTags/index.tsx"],"sourcesContent":["import React, { useState, KeyboardEvent, useRef } from \"react\";\nimport './styles.scss';\nimport { Icon } from '../Icon';\nexport interface InputWithTagsProps {\n value: string[];\n onChange?: (tags: string[]) => void;\n placeholder?: string;\n className?: string;\n}\n\nexport function InputWithTags({ value, onChange, placeholder, className }: InputWithTagsProps) {\n const [tags, setTags] = useState<string[]>([...value]);\n const [inputValue, setInputValue] = useState('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter' && inputValue.trim()) {\n e.preventDefault();\n const newTags = [...tags, inputValue.trim()];\n setTags(newTags);\n setInputValue(\"\");\n onChange?.(newTags);\n } else if (e.key === 'Backspace' && inputValue === \"\" && tags.length > 0) {\n // Remove the last tag when backspace is pressed on empty input\n const newTags = tags.slice(0, -1);\n setTags(newTags);\n onChange?.(newTags);\n }\n };\n\n return (\n <div className={`input-with-tags-container ${className}`} onClick={() => inputRef.current?.focus()}
|
1
|
+
{"version":3,"file":"index35.js","sources":["../src/components/InputWithTags/index.tsx"],"sourcesContent":["import React, { useState, KeyboardEvent, useRef } from \"react\";\nimport './styles.scss';\nimport { Icon } from '../Icon';\n\nexport interface InputWithTagsProps {\n value: string[];\n onChange?: (tags: string[]) => void;\n placeholder?: string;\n className?: string;\n error?: boolean;\n errorMessage?: string;\n label?: string;\n}\n\nexport function InputWithTags({ \n value, \n onChange, \n placeholder, \n className, \n error, \n errorMessage, \n label \n}: InputWithTagsProps) {\n const [tags, setTags] = useState<string[]>([...value]);\n const [inputValue, setInputValue] = useState('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter' && inputValue.trim()) {\n e.preventDefault();\n const newTags = [...tags, inputValue.trim()];\n setTags(newTags);\n setInputValue(\"\");\n onChange?.(newTags);\n } else if (e.key === 'Backspace' && inputValue === \"\" && tags.length > 0) {\n // Remove the last tag when backspace is pressed on empty input\n const newTags = tags.slice(0, -1);\n setTags(newTags);\n onChange?.(newTags);\n }\n };\n\n return (\n <div className=\"input-with-tags-main-container\">\n {label && <div className=\"label-container\">{label}</div>}\n <div \n className={`input-with-tags-container ${error ? 'input-with-tags-error' : ''} ${className}`} \n onClick={() => inputRef.current?.focus()}\n >\n {tags.map((tag, index) => (\n <span key={index} className=\"tag-in-inputwithtags\">\n {tag} \n <span\n className=\"close-icon-in-inputwithtags\"\n onClick={(e) => {\n e.stopPropagation();\n const newTags = tags.filter((_, i) => i !== index);\n setTags(newTags);\n onChange?.(newTags);\n }}\n >\n <Icon name=\"close\" />\n </span>\n </span>\n ))}\n <input\n className=\"input-with-tags-input\"\n ref={inputRef}\n type=\"text\"\n value={inputValue}\n onChange={(e) => setInputValue(e.target.value)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n />\n </div>\n {error && <div className=\"error-message\">{errorMessage}</div>}\n </div>\n );\n}"],"names":["React__default","useState","useRef","Icon","InputWithTags","value","onChange","placeholder","className","error","errorMessage","label","tags","setTags","inputValue","setInputValue","inputRef","handleKeyDown","e","key","trim","preventDefault","newTags","length","slice","React","createElement","onClick","_a","current","focus","map","tag","index","stopPropagation","filter","_","i","name","ref","type","target","onKeyDown"],"mappings":"AAcO,OAAAA,KAAA,YAAAC,GAAA,UAAAC,SAAA;AAAA,OAAA;AAAA,SAAA,QAAAC,SAAA;AAAA,SAASC,EAAc;AAAA,EAC1BC,OAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,aAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,OAAAA;AACgB,GAAG;AACb,QAAA,CAACC,GAAMC,CAAO,IAAIZ,EAAmB,CAAC,GAAGI,CAAK,CAAC,GAC/C,CAACS,GAAYC,CAAa,IAAId,EAAS,EAAE,GACzCe,IAAWd,EAAyB,IAAI,GAExCe,IAAgBA,CAACC,MAAuC;AAC1D,QAAIA,EAAEC,QAAQ,WAAWL,EAAWM,QAAQ;AACxCF,MAAAA,EAAEG,eAAe;AACjB,YAAMC,IAAU,CAAC,GAAGV,GAAME,EAAWM,MAAM;AAC3CP,MAAAA,EAAQS,CAAO,GACfP,EAAc,EAAE,GAChBT,KAAAA,QAAAA,EAAWgB;AAAAA,IAAO,WACXJ,EAAEC,QAAQ,eAAeL,MAAe,MAAMF,EAAKW,SAAS,GAAG;AAEtE,YAAMD,IAAUV,EAAKY,MAAM,GAAG,EAAE;AAChCX,MAAAA,EAAQS,CAAO,GACfhB,KAAAA,QAAAA,EAAWgB;AAAAA,IAAO;AAAA,EAE1B;AAGIG,SAAAA,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKlB,WAAU;AAAA,EACVG,GAAAA,KAASe,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IAAKlB,WAAU;AAAA,EAAmBG,GAAAA,CAAW,GACvDc,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IACIlB,WAAW,6BAA6BC,IAAQ,0BAA0B,EAAE,IAAID,CAAS;AAAA,IACzFmB,SAASA,MAAAA;AAjClB,UAAAC;AAiCwBZ,cAAAA,IAAAA,EAASa,YAATb,gBAAAA,EAAkBc;AAAAA;AAAAA,EAAM,GAEtClB,EAAKmB,IAAI,CAACC,GAAKC,MACZR,gBAAAA,EAAAC,cAAA,QAAA;AAAA,IAAMP,KAAKc;AAAAA,IAAOzB,WAAU;AAAA,EACvBwB,GAAAA,GACDN,gBAAAA,EAAAA,cAAA,QAAA;AAAA,IACAlB,WAAU;AAAA,IACVmB,SAAUT,CAAMA,MAAA;AACZA,MAAAA,EAAEgB,gBAAgB;AAClB,YAAMZ,IAAUV,EAAKuB,OAAO,CAACC,GAAGC,MAAMA,MAAMJ,CAAK;AACjDpB,MAAAA,EAAQS,CAAO,GACfhB,KAAAA,QAAAA,EAAWgB;AAAAA,IAAO;AAAA,EACtB,GAEII,gBAAAA,EAAAA,cAACvB,GAAI;AAAA,IAACmC,MAAK;AAAA,EAAS,CAAA,CAClB,CACJ,CACT,GACDb,gBAAAA,EAAAC,cAAA,SAAA;AAAA,IACIlB,WAAU;AAAA,IACV+B,KAAKvB;AAAAA,IACLwB,MAAK;AAAA,IACLnC,OAAOS;AAAAA,IACPR,UAAWY,CAAAA,MAAMH,EAAcG,EAAEuB,OAAOpC,KAAK;AAAA,IAC7CqC,WAAWzB;AAAAA,IACXV,aAAAA;AAAAA,EACH,CAAA,CACA,GACJE,KAASgB,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKlB,WAAU;AAAA,EAAe,GAAEE,CAAkB,CAC3D;AAEb;"}
|
package/dist/index38.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import n, { useState as b, useRef as $, useEffect as s, useMemo as z } from "react";
|
2
2
|
import { Icon as N } from "./index5.js";
|
3
3
|
import { LabelChip as D } from "./index9.js";
|
4
|
-
import { debounce as F } from "./
|
4
|
+
import { debounce as F } from "./index141.js";
|
5
5
|
/* empty css */
|
6
6
|
function q(o) {
|
7
7
|
const {
|
package/dist/index44.js
CHANGED
package/dist/index5.js
CHANGED
@@ -1,83 +1,83 @@
|
|
1
|
-
import f from "./
|
2
|
-
import b from "./
|
3
|
-
import p from "./
|
4
|
-
import d from "./
|
5
|
-
import h from "./
|
6
|
-
import u from "./
|
7
|
-
import k from "./
|
8
|
-
import x from "./
|
9
|
-
import A from "./
|
10
|
-
import w from "./
|
11
|
-
import I from "./
|
12
|
-
import S from "./
|
13
|
-
import E from "./
|
14
|
-
import N from "./
|
15
|
-
import P from "./
|
16
|
-
import $ from "./
|
17
|
-
import C from "./
|
18
|
-
import F from "./
|
19
|
-
import O from "./
|
20
|
-
import R from "./
|
21
|
-
import j from "./
|
22
|
-
import y from "./
|
23
|
-
import M from "./
|
24
|
-
import G from "./
|
25
|
-
import T from "./
|
26
|
-
import V from "./
|
27
|
-
import q from "./
|
28
|
-
import B from "./
|
29
|
-
import D from "./
|
30
|
-
import H from "./
|
31
|
-
import J from "./
|
32
|
-
import K from "./
|
33
|
-
import L from "./
|
34
|
-
import Q from "./
|
35
|
-
import U from "./
|
36
|
-
import W from "./
|
37
|
-
import X from "./
|
38
|
-
import Y from "./
|
39
|
-
import Z from "./
|
40
|
-
import z from "./
|
41
|
-
import ss from "./
|
42
|
-
import os from "./
|
43
|
-
import _s from "./
|
44
|
-
import ts from "./
|
45
|
-
import is from "./
|
46
|
-
import rs from "./
|
47
|
-
import es from "./
|
48
|
-
import cs from "./
|
49
|
-
import gs from "./
|
50
|
-
import ms from "./
|
51
|
-
import vs from "./
|
52
|
-
import as from "./
|
53
|
-
import ls from "./
|
54
|
-
import ns from "./
|
55
|
-
import fs from "./
|
56
|
-
import bs from "./
|
57
|
-
import ps from "./
|
58
|
-
import ds from "./
|
59
|
-
import hs from "./
|
60
|
-
import us from "./
|
61
|
-
import ks from "./
|
62
|
-
import xs from "./
|
63
|
-
import As from "./
|
64
|
-
import ws from "./
|
65
|
-
import Is from "./
|
66
|
-
import Ss from "./
|
67
|
-
import Es from "./
|
68
|
-
import Ns from "./
|
69
|
-
import Ps from "./
|
70
|
-
import $s from "./
|
71
|
-
import Cs from "./
|
72
|
-
import Fs from "./
|
73
|
-
import Os from "./
|
74
|
-
import Rs from "./
|
75
|
-
import js from "./
|
76
|
-
import ys from "./
|
77
|
-
import Ms from "./
|
78
|
-
import Gs from "./
|
1
|
+
import f from "./index51.js";
|
2
|
+
import b from "./index52.js";
|
3
|
+
import p from "./index53.js";
|
4
|
+
import d from "./index54.js";
|
5
|
+
import h from "./index55.js";
|
6
|
+
import u from "./index56.js";
|
7
|
+
import k from "./index57.js";
|
8
|
+
import x from "./index58.js";
|
9
|
+
import A from "./index59.js";
|
10
|
+
import w from "./index60.js";
|
11
|
+
import I from "./index61.js";
|
12
|
+
import S from "./index62.js";
|
13
|
+
import E from "./index63.js";
|
14
|
+
import N from "./index64.js";
|
15
|
+
import P from "./index65.js";
|
16
|
+
import $ from "./index66.js";
|
17
|
+
import C from "./index67.js";
|
18
|
+
import F from "./index68.js";
|
19
|
+
import O from "./index69.js";
|
20
|
+
import R from "./index70.js";
|
21
|
+
import j from "./index71.js";
|
22
|
+
import y from "./index72.js";
|
23
|
+
import M from "./index73.js";
|
24
|
+
import G from "./index74.js";
|
25
|
+
import T from "./index75.js";
|
26
|
+
import V from "./index76.js";
|
27
|
+
import q from "./index77.js";
|
28
|
+
import B from "./index78.js";
|
29
|
+
import D from "./index79.js";
|
30
|
+
import H from "./index80.js";
|
31
|
+
import J from "./index81.js";
|
32
|
+
import K from "./index82.js";
|
33
|
+
import L from "./index83.js";
|
34
|
+
import Q from "./index84.js";
|
35
|
+
import U from "./index85.js";
|
36
|
+
import W from "./index86.js";
|
37
|
+
import X from "./index87.js";
|
38
|
+
import Y from "./index88.js";
|
39
|
+
import Z from "./index89.js";
|
40
|
+
import z from "./index90.js";
|
41
|
+
import ss from "./index91.js";
|
42
|
+
import os from "./index92.js";
|
43
|
+
import _s from "./index93.js";
|
44
|
+
import ts from "./index94.js";
|
45
|
+
import is from "./index95.js";
|
46
|
+
import rs from "./index96.js";
|
47
|
+
import es from "./index97.js";
|
48
|
+
import cs from "./index98.js";
|
49
|
+
import gs from "./index99.js";
|
50
|
+
import ms from "./index100.js";
|
51
|
+
import vs from "./index101.js";
|
52
|
+
import as from "./index102.js";
|
53
|
+
import ls from "./index103.js";
|
54
|
+
import ns from "./index104.js";
|
55
|
+
import fs from "./index105.js";
|
56
|
+
import bs from "./index106.js";
|
57
|
+
import ps from "./index107.js";
|
58
|
+
import ds from "./index108.js";
|
59
|
+
import hs from "./index109.js";
|
60
|
+
import us from "./index110.js";
|
61
|
+
import ks from "./index111.js";
|
62
|
+
import xs from "./index112.js";
|
63
|
+
import As from "./index113.js";
|
64
|
+
import ws from "./index114.js";
|
65
|
+
import Is from "./index115.js";
|
66
|
+
import Ss from "./index116.js";
|
67
|
+
import Es from "./index117.js";
|
68
|
+
import Ns from "./index118.js";
|
69
|
+
import Ps from "./index119.js";
|
70
|
+
import $s from "./index120.js";
|
71
|
+
import Cs from "./index121.js";
|
72
|
+
import Fs from "./index122.js";
|
73
|
+
import Os from "./index123.js";
|
74
|
+
import Rs from "./index124.js";
|
75
|
+
import js from "./index125.js";
|
76
|
+
import ys from "./index126.js";
|
77
|
+
import Ms from "./index127.js";
|
78
|
+
import Gs from "./index128.js";
|
79
79
|
import c from "react";
|
80
|
-
import { ReactSVG as Ts } from "./
|
80
|
+
import { ReactSVG as Ts } from "./index129.js";
|
81
81
|
const Vs = /* @__PURE__ */ Object.assign({
|
82
82
|
"/src/assets/icons/all-space.svg": f,
|
83
83
|
"/src/assets/icons/attachment.svg": b,
|
package/dist/index50.js
CHANGED
@@ -1,5 +1,58 @@
|
|
1
|
-
|
1
|
+
import t from "react";
|
2
|
+
import { Icon as I } from "./index5.js";
|
3
|
+
/* empty css */
|
4
|
+
function g({
|
5
|
+
disabled: a,
|
6
|
+
error: c,
|
7
|
+
errorMessage: d,
|
8
|
+
inputStyle: u,
|
9
|
+
label: r,
|
10
|
+
leftIcon: o,
|
11
|
+
maxLength: n,
|
12
|
+
onChange: h,
|
13
|
+
placeholder: w,
|
14
|
+
rightIcon: s,
|
15
|
+
style: p,
|
16
|
+
tag: E,
|
17
|
+
type: f = "text",
|
18
|
+
value: i
|
19
|
+
}) {
|
20
|
+
const N = E || "input", l = (e) => {
|
21
|
+
if (!e) return null;
|
22
|
+
const m = a || e.disabled;
|
23
|
+
return /* @__PURE__ */ t.createElement("div", {
|
24
|
+
className: `input-with-icon-icon input-with-icon-icon-${e.position} ${e.className || ""} ${m ? "disabled" : ""} ${e.disableHover ? "no-hover" : ""}`,
|
25
|
+
style: e.style,
|
26
|
+
onClick: m ? void 0 : e.onClick
|
27
|
+
}, /* @__PURE__ */ t.createElement(I, {
|
28
|
+
name: e.name
|
29
|
+
}));
|
30
|
+
}, $ = !!o, v = !!s;
|
31
|
+
return /* @__PURE__ */ t.createElement("div", {
|
32
|
+
className: "input-with-icon-main-container",
|
33
|
+
style: p
|
34
|
+
}, r && /* @__PURE__ */ t.createElement("div", {
|
35
|
+
className: "label-container"
|
36
|
+
}, r), /* @__PURE__ */ t.createElement("div", {
|
37
|
+
className: `input-with-icon-wrapper ${$ ? "has-left-icon" : ""} ${v ? "has-right-icon" : ""}`
|
38
|
+
}, l(o), /* @__PURE__ */ t.createElement(N, {
|
39
|
+
value: i,
|
40
|
+
onChange: (e) => h(e.target.value),
|
41
|
+
disabled: a,
|
42
|
+
type: f,
|
43
|
+
className: `input-with-icon-element ${c ? "input-with-icon-container-error" : "input-with-icon-container-default"} ${a ? "input-with-icon-container-disabled" : ""}`,
|
44
|
+
maxLength: n || void 0,
|
45
|
+
placeholder: w,
|
46
|
+
style: u
|
47
|
+
}), l(s)), /* @__PURE__ */ t.createElement("div", {
|
48
|
+
className: `${c ? "error-and-max-word" : "max-word-container"}`
|
49
|
+
}, c && /* @__PURE__ */ t.createElement("div", {
|
50
|
+
className: "error-message"
|
51
|
+
}, d), n && /* @__PURE__ */ t.createElement("div", {
|
52
|
+
className: "max-word"
|
53
|
+
}, n && (i == null ? void 0 : i.length) + "/" + n)));
|
54
|
+
}
|
2
55
|
export {
|
3
|
-
|
56
|
+
g as InputWithIcon
|
4
57
|
};
|
5
58
|
//# sourceMappingURL=index50.js.map
|
package/dist/index50.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index50.js","sources":["../src/
|
1
|
+
{"version":3,"file":"index50.js","sources":["../src/components/InputWithIcon/index.tsx"],"sourcesContent":["import React from 'react';\nimport { Icon } from '../Icon';\nimport './styles.scss';\n\nexport interface InputIconProps {\n className?: string;\n disabled?: boolean;\n disableHover?: boolean;\n name: string;\n onClick?: () => void;\n position: 'left' | 'right';\n style?: React.CSSProperties;\n}\n\nexport interface InputWithIconProps {\n disabled?: boolean;\n error?: boolean;\n errorMessage?: string;\n inputStyle?: React.CSSProperties;\n label?: string;\n leftIcon?: InputIconProps;\n maxLength?: number | undefined;\n onChange: (value: string) => void;\n placeholder?: string;\n rightIcon?: InputIconProps;\n style?: React.CSSProperties;\n tag?: string;\n type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'search';\n value: string;\n}\n\nexport function InputWithIcon({\n disabled,\n error,\n errorMessage,\n inputStyle,\n label,\n leftIcon,\n maxLength,\n onChange,\n placeholder,\n rightIcon,\n style,\n tag,\n type = 'text',\n value\n}: InputWithIconProps) {\n const Element = tag || 'input';\n\n const renderIcon = (iconProps: InputIconProps) => {\n if (!iconProps) return null;\n \n const isIconDisabled = disabled || iconProps.disabled;\n \n return (\n <div \n className={`input-with-icon-icon input-with-icon-icon-${iconProps.position} ${iconProps.className || ''} ${isIconDisabled ? 'disabled' : ''} ${iconProps.disableHover ? 'no-hover' : ''}`}\n style={iconProps.style}\n onClick={isIconDisabled ? undefined : iconProps.onClick}\n >\n <Icon name={iconProps.name} />\n </div>\n );\n };\n\n const hasLeftIcon = !!leftIcon;\n const hasRightIcon = !!rightIcon;\n\n return (\n <div className=\"input-with-icon-main-container\" style={style}>\n {label && <div className=\"label-container\">{label}</div>}\n <div className={`input-with-icon-wrapper ${hasLeftIcon ? 'has-left-icon' : ''} ${hasRightIcon ? 'has-right-icon' : ''}`}>\n {renderIcon(leftIcon!)}\n {React.createElement(Element, {\n value,\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => onChange(e.target.value),\n disabled,\n type,\n className: `input-with-icon-element ${error ? 'input-with-icon-container-error' : 'input-with-icon-container-default'} ${disabled ? 'input-with-icon-container-disabled' : ''}`,\n maxLength: maxLength ? maxLength : undefined,\n placeholder: placeholder,\n style: inputStyle\n })}\n {renderIcon(rightIcon!)}\n </div>\n <div className={`${error ? 'error-and-max-word' : 'max-word-container'}`}>\n {error && <div className=\"error-message\">{errorMessage}</div>}\n {maxLength && <div className=\"max-word\">{maxLength && value?.length + '/' + maxLength}</div>}\n </div>\n </div>\n );\n}\n"],"names":["React__default","Icon","InputWithIcon","disabled","error","errorMessage","inputStyle","label","leftIcon","maxLength","onChange","placeholder","rightIcon","style","tag","type","value","Element","renderIcon","iconProps","isIconDisabled","React","createElement","className","position","disableHover","onClick","undefined","name","hasLeftIcon","hasRightIcon","e","target","length"],"mappings":"AA+BO,OAAAA,OAAA;AAAA,SAAA,QAAAC,SAAA;AAAA,OAAA;AAAA,SAASC,EAAc;AAAA,EAC5BC,UAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,YAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,aAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,KAAAA;AAAAA,EACAC,MAAAA,IAAO;AAAA,EACPC,OAAAA;AACkB,GAAG;AACrB,QAAMC,IAAUH,KAAO,SAEjBI,IAAaA,CAACC,MAA8B;AAC5C,QAAA,CAACA,EAAkB,QAAA;AAEjBC,UAAAA,IAAiBjB,KAAYgB,EAAUhB;AAG3CkB,WAAAA,gBAAAA,EAAAC,cAAA,OAAA;AAAA,MACEC,WAAW,6CAA6CJ,EAAUK,QAAQ,IAAIL,EAAUI,aAAa,EAAE,IAAIH,IAAiB,aAAa,EAAE,IAAID,EAAUM,eAAe,aAAa,EAAE;AAAA,MACvLZ,OAAOM,EAAUN;AAAAA,MACjBa,SAASN,IAAiBO,SAAYR,EAAUO;AAAAA,IAAAA,GAEhDJ,gBAAAA,EAAAA,cAACrB,GAAI;AAAA,MAAC2B,MAAMT,EAAUS;AAAAA,IAAAA,CAAO,CAC1B;AAAA,EAET,GAEMC,IAAc,CAAC,CAACrB,GAChBsB,IAAe,CAAC,CAAClB;AAGrBS,SAAAA,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKC,WAAU;AAAA,IAAiCV,OAAAA;AAAAA,EAC7CN,GAAAA,KAASe,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IAAKC,WAAU;AAAA,EAAmBhB,GAAAA,CAAW,GACvDc,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKC,WAAW,2BAA2BM,IAAc,kBAAkB,EAAE,IAAIC,IAAe,mBAAmB,EAAE;AAAA,KAClHZ,EAAWV,CAAS,GACpBa,gBAAAA,EAAMC,cAAcL,GAAS;AAAA,IAC5BD,OAAAA;AAAAA,IACAN,UAAUA,CAACqB,MAA2CrB,EAASqB,EAAEC,OAAOhB,KAAK;AAAA,IAC7Eb,UAAAA;AAAAA,IACAY,MAAAA;AAAAA,IACAQ,WAAW,2BAA2BnB,IAAQ,oCAAoC,mCAAmC,IAAID,IAAW,uCAAuC,EAAE;AAAA,IAC7KM,WAAWA,KAAwBkB;AAAAA,IACnChB,aAAAA;AAAAA,IACAE,OAAOP;AAAAA,EAAAA,CACR,GACAY,EAAWN,CAAU,CACnB,GACLS,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKC,WAAW,GAAGnB,IAAQ,uBAAuB,oBAAoB;AAAA,EACnEA,GAAAA,KAASkB,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IAAKC,WAAU;AAAA,KAAiBlB,CAAkB,GAC3DI,KAAaY,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKC,WAAU;AAAA,EAAA,GAAYd,MAAaO,KAAAA,gBAAAA,EAAOiB,UAAS,MAAMxB,CAAe,CACxF,CACF;AAET;"}
|
package/dist/index51.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const e = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%
|
1
|
+
const e = "data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_5121_25308)'%3e%3cpath%20d='M6.77349%2010.3359H1.71958C1.3912%2010.3359%201.125%2010.6021%201.125%2010.9305V15.9844C1.125%2016.3128%201.3912%2016.579%201.71958%2016.579H6.77349C7.10186%2016.579%207.36806%2016.3128%207.36806%2015.9844V10.9305C7.36806%2010.6021%207.10186%2010.3359%206.77349%2010.3359Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.9888%2010.3359H10.9349C10.6065%2010.3359%2010.3403%2010.6021%2010.3403%2010.9305V15.9844C10.3403%2016.3128%2010.6065%2016.579%2010.9349%2016.579H15.9888C16.3171%2016.579%2016.5834%2016.3128%2016.5834%2015.9844V10.9305C16.5834%2010.6021%2016.3171%2010.3359%2015.9888%2010.3359Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.3921%201.125H6.33823C6.00986%201.125%205.74365%201.3912%205.74365%201.71958V6.77349C5.74365%207.10186%206.00986%207.36806%206.33823%207.36806H11.3921C11.7205%207.36806%2011.9867%207.10186%2011.9867%206.77349V1.71958C11.9867%201.3912%2011.7205%201.125%2011.3921%201.125Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5121_25308'%3e%3crect%20width='18'%20height='18'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
2
2
|
export {
|
3
3
|
e as default
|
4
4
|
};
|
package/dist/index51.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index51.js","sources":["../src/assets/icons/
|
1
|
+
{"version":3,"file":"index51.js","sources":["../src/assets/icons/all-space.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_5121_25308)'%3e%3cpath%20d='M6.77349%2010.3359H1.71958C1.3912%2010.3359%201.125%2010.6021%201.125%2010.9305V15.9844C1.125%2016.3128%201.3912%2016.579%201.71958%2016.579H6.77349C7.10186%2016.579%207.36806%2016.3128%207.36806%2015.9844V10.9305C7.36806%2010.6021%207.10186%2010.3359%206.77349%2010.3359Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.9888%2010.3359H10.9349C10.6065%2010.3359%2010.3403%2010.6021%2010.3403%2010.9305V15.9844C10.3403%2016.3128%2010.6065%2016.579%2010.9349%2016.579H15.9888C16.3171%2016.579%2016.5834%2016.3128%2016.5834%2015.9844V10.9305C16.5834%2010.6021%2016.3171%2010.3359%2015.9888%2010.3359Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.3921%201.125H6.33823C6.00986%201.125%205.74365%201.3912%205.74365%201.71958V6.77349C5.74365%207.10186%206.00986%207.36806%206.33823%207.36806H11.3921C11.7205%207.36806%2011.9867%207.10186%2011.9867%206.77349V1.71958C11.9867%201.3912%2011.7205%201.125%2011.3921%201.125Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5121_25308'%3e%3crect%20width='18'%20height='18'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\""],"names":["__vite_glob_0_0"],"mappings":"AAAA,MAAeA,IAAA;"}
|
package/dist/index52.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const e = "data:image/svg+xml,%3csvg%20width='
|
1
|
+
const e = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='8'%20height='11'%20viewBox='0%200%208%2011'%20fill='none'%3e%3cpath%20d='M5.2%207.9359L5.2%203.32051C5.2%202.75407%204.66274%202.29487%204%202.29487C3.33726%202.29487%202.8%202.75407%202.8%203.32051L2.8%208.70513C2.8%209.69641%203.7402%2010.5%204.9%2010.5C6.0598%2010.5%207%209.69641%207%208.70513L7%203.0641C7%201.64799%205.65685%200.5%204%200.5C2.34315%200.5%201%201.64799%201%203.0641L1%207.9359'%20stroke='%23415575'%20stroke-width='0.8'%20stroke-linecap='round'/%3e%3c/svg%3e";
|
2
2
|
export {
|
3
3
|
e as default
|
4
4
|
};
|