se-design 0.0.111 → 0.0.113
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/icons/edit-text.svg +3 -0
- package/dist/assets/icons/fields-create.svg +3 -0
- package/dist/assets/icons/fields-panel.svg +3 -0
- package/dist/assets/icons/fill-and-sign.svg +10 -0
- package/dist/assets/icons/image-field.svg +19 -0
- package/dist/assets/icons/reset.svg +3 -0
- package/dist/assets/icons/rotate-left.svg +3 -0
- package/dist/assets/icons/rotate-right.svg +3 -0
- package/dist/assets/icons/success-check.svg +12 -0
- package/dist/assets/style.css +1 -1
- package/dist/components/Banner/index.d.ts +4 -0
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/CustomAccordion/index.d.ts +2 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/LabelChip/index.d.ts +1 -0
- package/dist/components/NavigationBar/index.d.ts +14 -0
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/SearchBox/index.d.ts +13 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/ToastBar/index.d.ts +4 -3
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +37 -33
- package/dist/index.js.map +1 -1
- package/dist/index100.js +1 -1
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +2 -2
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +2 -149
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +5 -0
- package/dist/index103.js.map +1 -0
- package/dist/index104.js +5 -0
- package/dist/index104.js.map +1 -0
- package/dist/index105.js +5 -0
- package/dist/index105.js.map +1 -0
- package/dist/index106.js +5 -0
- package/dist/index106.js.map +1 -0
- package/dist/index107.js +5 -0
- package/dist/index107.js.map +1 -0
- package/dist/index108.js +5 -0
- package/dist/index108.js.map +1 -0
- package/dist/index109.js +5 -0
- package/dist/index109.js.map +1 -0
- package/dist/index110.js +5 -0
- package/dist/index110.js.map +1 -0
- package/dist/index111.js +5 -0
- package/dist/index111.js.map +1 -0
- package/dist/index112.js +5 -0
- package/dist/index112.js.map +1 -0
- package/dist/index113.js +152 -0
- package/dist/index113.js.map +1 -0
- package/dist/index124.js +11 -5
- package/dist/index124.js.map +1 -1
- package/dist/index132.js +1232 -75
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +9 -92
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +8 -50
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +4 -7
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +170 -5
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +11 -52
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +6 -2
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +6 -2
- package/dist/index139.js.map +1 -1
- package/dist/{index126.js → index140.js} +1 -1
- package/dist/{index126.js.map → index140.js.map} +1 -1
- package/dist/{index127.js → index141.js} +1 -1
- package/dist/index141.js.map +1 -0
- package/dist/index142.js +11 -0
- package/dist/{index128.js.map → index142.js.map} +1 -1
- package/dist/{index129.js → index143.js} +6 -6
- package/dist/{index129.js.map → index143.js.map} +1 -1
- package/dist/{index130.js → index144.js} +2 -2
- package/dist/{index130.js.map → index144.js.map} +1 -1
- package/dist/{index131.js → index145.js} +1 -1
- package/dist/index145.js.map +1 -0
- package/dist/index146.js +79 -0
- package/dist/index146.js.map +1 -0
- package/dist/index147.js +96 -0
- package/dist/index147.js.map +1 -0
- package/dist/index148.js +55 -0
- package/dist/index148.js.map +1 -0
- package/dist/index149.js +11 -0
- package/dist/index149.js.map +1 -0
- package/dist/index150.js +8 -0
- package/dist/index150.js.map +1 -0
- package/dist/index151.js +55 -0
- package/dist/index151.js.map +1 -0
- package/dist/index152.js +5 -0
- package/dist/index152.js.map +1 -0
- package/dist/index153.js +5 -0
- package/dist/index153.js.map +1 -0
- package/dist/index16.js +21 -19
- package/dist/index16.js.map +1 -1
- package/dist/index17.js +1 -1
- package/dist/index17.js.map +1 -1
- package/dist/index22.js +43 -37
- package/dist/index22.js.map +1 -1
- package/dist/index26.js +54 -22
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +34 -22
- package/dist/index27.js.map +1 -1
- package/dist/index29.js +3 -3
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +16 -15
- package/dist/index3.js.map +1 -1
- package/dist/index33.js +33 -23
- package/dist/index33.js.map +1 -1
- package/dist/index36.js +75 -31
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +26 -44
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +45 -64
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +63 -46
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +118 -94
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +61 -69
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +68 -81
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +84 -35
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +33 -24
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +30 -2
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +30 -2
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +1 -1
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +1 -1
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +1 -1
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +1 -1
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +1 -1
- 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 +2 -2
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +1 -1
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +1 -1
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +1 -1
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +1 -1
- 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 +1 -1
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +1 -1
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +19 -20
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +1 -1
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +1 -1
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +2 -2
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +2 -2
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +1 -1
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +1 -1
- 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 +2 -2
- package/dist/index89.js.map +1 -1
- package/dist/index90.js +2 -2
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +1 -1
- 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 +2 -2
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +1 -1
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +1 -1
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +1 -1
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +1 -1
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +2 -2
- package/dist/index99.js.map +1 -1
- package/dist/typographyMixin.scss +60 -21
- package/package.json +1 -1
- package/dist/index118.js +0 -1236
- package/dist/index118.js.map +0 -1
- package/dist/index119.js +0 -13
- package/dist/index119.js.map +0 -1
- package/dist/index120.js +0 -13
- package/dist/index120.js.map +0 -1
- package/dist/index121.js +0 -8
- package/dist/index121.js.map +0 -1
- package/dist/index122.js +0 -173
- package/dist/index122.js.map +0 -1
- package/dist/index123.js +0 -14
- package/dist/index123.js.map +0 -1
- package/dist/index125.js +0 -9
- package/dist/index125.js.map +0 -1
- package/dist/index127.js.map +0 -1
- package/dist/index128.js +0 -11
- package/dist/index131.js.map +0 -1
- /package/dist/assets/icons/{down.svg → chevron-down.svg} +0 -0
package/dist/index148.js
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
/*
|
2
|
+
object-assign
|
3
|
+
(c) Sindre Sorhus
|
4
|
+
@license MIT
|
5
|
+
*/
|
6
|
+
var f, i;
|
7
|
+
function p() {
|
8
|
+
if (i) return f;
|
9
|
+
i = 1;
|
10
|
+
var u = Object.getOwnPropertySymbols, b = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
|
11
|
+
function O(n) {
|
12
|
+
if (n == null)
|
13
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
14
|
+
return Object(n);
|
15
|
+
}
|
16
|
+
function j() {
|
17
|
+
try {
|
18
|
+
if (!Object.assign)
|
19
|
+
return !1;
|
20
|
+
var n = new String("abc");
|
21
|
+
if (n[5] = "de", Object.getOwnPropertyNames(n)[0] === "5")
|
22
|
+
return !1;
|
23
|
+
for (var s = {}, r = 0; r < 10; r++)
|
24
|
+
s["_" + String.fromCharCode(r)] = r;
|
25
|
+
var a = Object.getOwnPropertyNames(s).map(function(e) {
|
26
|
+
return s[e];
|
27
|
+
});
|
28
|
+
if (a.join("") !== "0123456789")
|
29
|
+
return !1;
|
30
|
+
var t = {};
|
31
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(e) {
|
32
|
+
t[e] = e;
|
33
|
+
}), Object.keys(Object.assign({}, t)).join("") === "abcdefghijklmnopqrst";
|
34
|
+
} catch (e) {
|
35
|
+
return !1;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
return f = j() ? Object.assign : function(n, s) {
|
39
|
+
for (var r, a = O(n), t, e = 1; e < arguments.length; e++) {
|
40
|
+
r = Object(arguments[e]);
|
41
|
+
for (var c in r)
|
42
|
+
b.call(r, c) && (a[c] = r[c]);
|
43
|
+
if (u) {
|
44
|
+
t = u(r);
|
45
|
+
for (var o = 0; o < t.length; o++)
|
46
|
+
l.call(r, t[o]) && (a[t[o]] = r[t[o]]);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
return a;
|
50
|
+
}, f;
|
51
|
+
}
|
52
|
+
export {
|
53
|
+
p as __require
|
54
|
+
};
|
55
|
+
//# sourceMappingURL=index148.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index148.js","sources":["../node_modules/object-assign/index.js"],"sourcesContent":["/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n"],"names":["getOwnPropertySymbols","hasOwnProperty","propIsEnumerable","toObject","val","shouldUseNative","test1","test2","i","order2","n","test3","letter","err","objectAssign","target","source","from","to","symbols","s","key"],"mappings":";;;;;;;;;AAQA,MAAIA,IAAwB,OAAO,uBAC/BC,IAAiB,OAAO,UAAU,gBAClCC,IAAmB,OAAO,UAAU;AAExC,WAASC,EAASC,GAAK;AACtB,QAAIA,KAAQ;AACX,YAAM,IAAI,UAAU,uDAAuD;AAG5E,WAAO,OAAOA,CAAG;AAAA;AAGlB,WAASC,IAAkB;AAC1B,QAAI;AACH,UAAI,CAAC,OAAO;AACX,eAAO;AAMR,UAAIC,IAAQ,IAAI,OAAO,KAAK;AAE5B,UADAA,EAAM,CAAC,IAAI,MACP,OAAO,oBAAoBA,CAAK,EAAE,CAAC,MAAM;AAC5C,eAAO;AAKR,eADIC,IAAQ,CAAE,GACLC,IAAI,GAAGA,IAAI,IAAIA;AACvB,QAAAD,EAAM,MAAM,OAAO,aAAaC,CAAC,CAAC,IAAIA;AAEvC,UAAIC,IAAS,OAAO,oBAAoBF,CAAK,EAAE,IAAI,SAAUG,GAAG;AAC/D,eAAOH,EAAMG,CAAC;AAAA,MACjB,CAAG;AACD,UAAID,EAAO,KAAK,EAAE,MAAM;AACvB,eAAO;AAIR,UAAIE,IAAQ,CAAE;AAId,aAHA,uBAAuB,MAAM,EAAE,EAAE,QAAQ,SAAUC,GAAQ;AAC1D,QAAAD,EAAMC,CAAM,IAAIA;AAAA,MACnB,CAAG,GACG,OAAO,KAAK,OAAO,OAAO,CAAE,GAAED,CAAK,CAAC,EAAE,KAAK,EAAE,MAC/C;AAAA,IAKF,SAAQE,GAAK;AAEb,aAAO;AAAA;;AAIT,SAAAC,IAAiBT,EAAe,IAAK,OAAO,SAAS,SAAUU,GAAQC,GAAQ;AAK9E,aAJIC,GACAC,IAAKf,EAASY,CAAM,GACpBI,GAEKC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AAC1C,MAAAH,IAAO,OAAO,UAAUG,CAAC,CAAC;AAE1B,eAASC,KAAOJ;AACf,QAAIhB,EAAe,KAAKgB,GAAMI,CAAG,MAChCH,EAAGG,CAAG,IAAIJ,EAAKI,CAAG;AAIpB,UAAIrB,GAAuB;AAC1B,QAAAmB,IAAUnB,EAAsBiB,CAAI;AACpC,iBAAST,IAAI,GAAGA,IAAIW,EAAQ,QAAQX;AACnC,UAAIN,EAAiB,KAAKe,GAAME,EAAQX,CAAC,CAAC,MACzCU,EAAGC,EAAQX,CAAC,CAAC,IAAIS,EAAKE,EAAQX,CAAC,CAAC;AAAA;;AAMpC,WAAOU;AAAA,EACP;;","x_google_ignoreList":[0]}
|
package/dist/index149.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index149.js","sources":["../node_modules/prop-types/lib/ReactPropTypesSecret.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 ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n"],"names":["ReactPropTypesSecret","ReactPropTypesSecret_1"],"mappings":";;;;AASA,MAAIA,IAAuB;AAE3B,SAAAC,IAAiBD;;","x_google_ignoreList":[0]}
|
package/dist/index150.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index150.js","sources":["../node_modules/prop-types/lib/has.js"],"sourcesContent":["module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n"],"names":["has"],"mappings":";;sBAAAA,IAAiB,SAAS,KAAK,KAAK,OAAO,UAAU,cAAc;;","x_google_ignoreList":[0]}
|
package/dist/index151.js
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
import { __require as E } from "./index149.js";
|
2
|
+
import { __require as _ } from "./index150.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
|
+
}
|
52
|
+
export {
|
53
|
+
P as __require
|
54
|
+
};
|
55
|
+
//# sourceMappingURL=index151.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index151.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,cA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":"index152.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index153.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index153.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index16.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
var
|
1
|
+
var I = Object.defineProperty;
|
2
2
|
var i = Object.getOwnPropertySymbols;
|
3
3
|
var w = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
|
4
|
-
var h = (e, o, t) => o in e ?
|
4
|
+
var h = (e, o, t) => o in e ? I(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, C = (e, o) => {
|
5
5
|
for (var t in o || (o = {}))
|
6
6
|
w.call(o, t) && h(e, t, o[t]);
|
7
7
|
if (i)
|
@@ -18,7 +18,7 @@ var P = (e, o) => {
|
|
18
18
|
o.indexOf(r) < 0 && y.call(e, r) && (t[r] = e[r]);
|
19
19
|
return t;
|
20
20
|
};
|
21
|
-
import k, { forwardRef as
|
21
|
+
import k, { forwardRef as N, useState as E, useRef as x, useEffect as R, useImperativeHandle as q } from "react";
|
22
22
|
function u() {
|
23
23
|
return u = Object.assign ? Object.assign.bind() : function(e) {
|
24
24
|
for (var o = 1; o < arguments.length; o++) {
|
@@ -28,8 +28,8 @@ function u() {
|
|
28
28
|
return e;
|
29
29
|
}, u.apply(null, arguments);
|
30
30
|
}
|
31
|
-
const
|
32
|
-
var m =
|
31
|
+
const K = /* @__PURE__ */ N((A, D) => {
|
32
|
+
var m = A, {
|
33
33
|
className: e = "",
|
34
34
|
automationId: o = "",
|
35
35
|
position: t = "bottom-center",
|
@@ -38,8 +38,9 @@ const J = /* @__PURE__ */ I((q, j) => {
|
|
38
38
|
renderPopoverContents: H,
|
39
39
|
renderPopoverSrcElement: L,
|
40
40
|
onPopoverToggle: d,
|
41
|
-
isPopoverOpen: a
|
42
|
-
|
41
|
+
isPopoverOpen: a,
|
42
|
+
disabled: _ = !1
|
43
|
+
} = m, j = P(m, [
|
43
44
|
"className",
|
44
45
|
"automationId",
|
45
46
|
"position",
|
@@ -48,31 +49,32 @@ const J = /* @__PURE__ */ I((q, j) => {
|
|
48
49
|
"renderPopoverContents",
|
49
50
|
"renderPopoverSrcElement",
|
50
51
|
"onPopoverToggle",
|
51
|
-
"isPopoverOpen"
|
52
|
+
"isPopoverOpen",
|
53
|
+
"disabled"
|
52
54
|
]);
|
53
|
-
const [l, c] = E(!1), [
|
55
|
+
const [l, c] = E(!1), [X, g] = E(t), p = x(null), f = x(null);
|
54
56
|
R(() => {
|
55
57
|
if (d && d(l), l)
|
56
|
-
return document.body.addEventListener("click", b),
|
58
|
+
return document.body.addEventListener("click", b), $(), () => document.body.removeEventListener("click", b);
|
57
59
|
}, [l]), R(() => {
|
58
60
|
c(a != null ? a : !1);
|
59
61
|
}, [a]);
|
60
|
-
const
|
62
|
+
const $ = () => {
|
61
63
|
if (!f.current) return;
|
62
64
|
const n = f.current.getBoundingClientRect(), s = window.innerHeight;
|
63
65
|
(n == null ? void 0 : n.bottom) > s ? g(t.includes("left") ? "top-left" : t.includes("right") ? "top-right" : "top-center") : (n == null ? void 0 : n.top) < 0 && g(t.includes("left") ? "bottom-left" : t.includes("right") ? "bottom-right" : "bottom-center");
|
64
66
|
}, b = (n) => {
|
65
67
|
const s = p.current;
|
66
68
|
if (!s) return;
|
67
|
-
const
|
68
|
-
s.contains(
|
69
|
+
const B = n.target;
|
70
|
+
s.contains(B) || c(!1);
|
69
71
|
}, v = () => {
|
70
72
|
c((n) => !n);
|
71
73
|
};
|
72
|
-
|
74
|
+
q(D, () => ({
|
73
75
|
togglePopover: v
|
74
76
|
}), []);
|
75
|
-
const
|
77
|
+
const z = {
|
76
78
|
"bottom-left": {
|
77
79
|
left: "0",
|
78
80
|
top: "100%"
|
@@ -101,11 +103,11 @@ const J = /* @__PURE__ */ I((q, j) => {
|
|
101
103
|
}
|
102
104
|
};
|
103
105
|
return /* @__PURE__ */ k.createElement("div", u({
|
104
|
-
className: "se-design-popover-wrapper cursor-pointer relative" + (e.length > 0 ? ` ${e}` : "") + (l ? " open" : ""),
|
106
|
+
className: "se-design-popover-wrapper cursor-pointer relative" + (e.length > 0 ? ` ${e}` : "") + (l ? " open" : "") + (_ ? " opacity-50 cursor-not-allowed pointer-events-none" : ""),
|
105
107
|
ref: p,
|
106
108
|
onClick: v,
|
107
109
|
"data-automation-id": o
|
108
|
-
},
|
110
|
+
}, j), L({
|
109
111
|
displayPopover: l
|
110
112
|
}), l && /* @__PURE__ */ k.createElement("div", {
|
111
113
|
className: `popover-content absolute shadow-md border rounded-md z-[1000] ${S == "full" ? "w-full" : "w-max"}`,
|
@@ -113,7 +115,7 @@ const J = /* @__PURE__ */ I((q, j) => {
|
|
113
115
|
borderColor: "var(--color-gray-200)",
|
114
116
|
color: "var(--color-gray-900)",
|
115
117
|
backgroundColor: "var(--color-white)"
|
116
|
-
},
|
118
|
+
}, z[X]),
|
117
119
|
onClick: (n) => n.stopPropagation(),
|
118
120
|
ref: f,
|
119
121
|
"data-automation-id": r
|
@@ -122,6 +124,6 @@ const J = /* @__PURE__ */ I((q, j) => {
|
|
122
124
|
})));
|
123
125
|
});
|
124
126
|
export {
|
125
|
-
|
127
|
+
K as Popover
|
126
128
|
};
|
127
129
|
//# sourceMappingURL=index16.js.map
|
package/dist/index16.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index16.js","sources":["../src/components/Popover/index.tsx"],"sourcesContent":["import React, { useState, useRef, ReactNode, useEffect, forwardRef, ForwardedRef, useImperativeHandle } from 'react';\n\nexport interface PopoverHandle {\n togglePopover: () => void;\n}\n\nexport interface PopoverProps {\n className?: string;\n automationId?: string;\n popoverContentAutomationId?: string;\n renderPopoverContents: (props: { closePopoverCb: () => void }) => ReactNode;\n renderPopoverSrcElement: (props: { displayPopover: boolean }) => ReactNode;\n position?: 'bottom-center' | 'bottom-left' | 'bottom-right' | 'top-center' | 'top-left' | 'top-right';\n onPopoverToggle?: (displayPopover: boolean) => void;\n contentWidth?: 'full' | 'max';\n isPopoverOpen?: boolean;\n}\n\nexport const Popover = forwardRef<PopoverHandle, PopoverProps>(\n (\n {\n className = '',\n automationId = '',\n position = 'bottom-center',\n popoverContentAutomationId = '',\n contentWidth = 'max',\n renderPopoverContents,\n renderPopoverSrcElement,\n onPopoverToggle,\n isPopoverOpen,\n ...props\n },\n ref: ForwardedRef<PopoverHandle>\n ) => {\n const [displayPopover, setDisplayPopover] = useState(false);\n const [popoverPosition, setPopoverPosition] = useState(position);\n const srcElementRef = useRef<HTMLDivElement>(null);\n const popoverContentRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (onPopoverToggle) {\n onPopoverToggle(displayPopover);\n }\n if (displayPopover) {\n document.body.addEventListener('click', clickListener);\n checkPopoverPosition();\n return () => document.body.removeEventListener('click', clickListener);\n }\n }, [displayPopover]);\n\n useEffect(() => {\n setDisplayPopover(isPopoverOpen ?? false);\n }, [isPopoverOpen]);\n\n //Function to check popover position\n const checkPopoverPosition = () => {\n if (!popoverContentRef.current) return;\n\n const popoverRect = popoverContentRef.current.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n\n if (popoverRect?.bottom > viewportHeight) {\n setPopoverPosition(\n position.includes('left') ? 'top-left' : position.includes('right') ? 'top-right' : 'top-center'\n );\n } else if (popoverRect?.top < 0) {\n // If popover extends beyond top of viewport, switch to bottom position\n setPopoverPosition(\n position.includes('left') ? 'bottom-left' : position.includes('right') ? 'bottom-right' : 'bottom-center'\n );\n }\n };\n\n const clickListener = (event: MouseEvent) => {\n const currentDropRef = srcElementRef.current;\n if (!currentDropRef) return;\n\n const target = event.target as Node;\n const isSourcePopover = currentDropRef.contains(target);\n // if clicked source is parent or the popover-content, do not toggle dropdown.\n if (!isSourcePopover) {\n setDisplayPopover(false);\n }\n };\n\n const togglePopover = () => {\n setDisplayPopover((displayPopover) => !displayPopover);\n };\n\n useImperativeHandle(ref, () => ({ togglePopover }), []);\n\n const popoverContentStyle = {\n 'bottom-left': { left: '0', top: '100%' },\n 'bottom-right': { right: '0', top: '100%' },\n 'bottom-center': { left: '50%', transform: 'translateX(-50%)', top: '100%' },\n 'top-left': { left: '0', bottom: '100%' },\n 'top-right': { right: '0', bottom: '100%' },\n 'top-center': { left: '50%', transform: 'translateX(-50%)', bottom: '100%' }\n };\n\n return (\n <div\n className={\n 'se-design-popover-wrapper cursor-pointer relative' +\n (className.length > 0 ? ` ${className}` : '') +\n (displayPopover ? ' open' : '')\n }\n ref={srcElementRef}\n onClick={togglePopover}\n data-automation-id={automationId}\n {...props}\n >\n {renderPopoverSrcElement({ displayPopover })}\n\n {displayPopover && (\n <div\n className={`popover-content absolute shadow-md border rounded-md z-[1000] ${contentWidth == 'full' ? 'w-full' : 'w-max'}`}\n style={{\n borderColor: 'var(--color-gray-200)',\n color: 'var(--color-gray-900)',\n backgroundColor: 'var(--color-white)',\n ...popoverContentStyle[popoverPosition]\n }}\n onClick={(e) => e.stopPropagation()}\n ref={popoverContentRef}\n data-automation-id={popoverContentAutomationId}\n >\n {renderPopoverContents({ closePopoverCb: () => setDisplayPopover(false) })}\n </div>\n )}\n </div>\n );\n }\n);\n"],"names":["Popover","_a","ref","_b","className","automationId","position","popoverContentAutomationId","contentWidth","renderPopoverContents","renderPopoverSrcElement","onPopoverToggle","isPopoverOpen","props","displayPopover","setDisplayPopover","useState","popoverPosition","setPopoverPosition","srcElementRef","useRef","popoverContentRef","useEffect","body","addEventListener","clickListener","checkPopoverPosition","document","removeEventListener","current","popoverRect","getBoundingClientRect","viewportHeight","window","innerHeight","bottom","includes","top","event","currentDropRef","target","contains","togglePopover","useImperativeHandle","popoverContentStyle","left","right","transform","React","createElement","_extends","length","onClick","style","__spreadValues","borderColor","color","backgroundColor","e","stopPropagation","closePopoverCb"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
1
|
+
{"version":3,"file":"index16.js","sources":["../src/components/Popover/index.tsx"],"sourcesContent":["import React, { useState, useRef, ReactNode, useEffect, forwardRef, ForwardedRef, useImperativeHandle } from 'react';\n\nexport interface PopoverHandle {\n togglePopover: () => void;\n}\n\nexport interface PopoverProps {\n className?: string;\n automationId?: string;\n popoverContentAutomationId?: string;\n renderPopoverContents: (props: { closePopoverCb: () => void }) => ReactNode;\n renderPopoverSrcElement: (props: { displayPopover: boolean }) => ReactNode;\n position?: 'bottom-center' | 'bottom-left' | 'bottom-right' | 'top-center' | 'top-left' | 'top-right';\n onPopoverToggle?: (displayPopover: boolean) => void;\n contentWidth?: 'full' | 'max';\n isPopoverOpen?: boolean;\n disabled?: boolean;\n}\n\nexport const Popover = forwardRef<PopoverHandle, PopoverProps>(\n (\n {\n className = '',\n automationId = '',\n position = 'bottom-center',\n popoverContentAutomationId = '',\n contentWidth = 'max',\n renderPopoverContents,\n renderPopoverSrcElement,\n onPopoverToggle,\n isPopoverOpen,\n disabled = false,\n ...props\n },\n ref: ForwardedRef<PopoverHandle>\n ) => {\n const [displayPopover, setDisplayPopover] = useState(false);\n const [popoverPosition, setPopoverPosition] = useState(position);\n const srcElementRef = useRef<HTMLDivElement>(null);\n const popoverContentRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (onPopoverToggle) {\n onPopoverToggle(displayPopover);\n }\n if (displayPopover) {\n document.body.addEventListener('click', clickListener);\n checkPopoverPosition();\n return () => document.body.removeEventListener('click', clickListener);\n }\n }, [displayPopover]);\n\n useEffect(() => {\n setDisplayPopover(isPopoverOpen ?? false);\n }, [isPopoverOpen]);\n\n //Function to check popover position\n const checkPopoverPosition = () => {\n if (!popoverContentRef.current) return;\n\n const popoverRect = popoverContentRef.current.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n\n if (popoverRect?.bottom > viewportHeight) {\n setPopoverPosition(\n position.includes('left') ? 'top-left' : position.includes('right') ? 'top-right' : 'top-center'\n );\n } else if (popoverRect?.top < 0) {\n // If popover extends beyond top of viewport, switch to bottom position\n setPopoverPosition(\n position.includes('left') ? 'bottom-left' : position.includes('right') ? 'bottom-right' : 'bottom-center'\n );\n }\n };\n\n const clickListener = (event: MouseEvent) => {\n const currentDropRef = srcElementRef.current;\n if (!currentDropRef) return;\n\n const target = event.target as Node;\n const isSourcePopover = currentDropRef.contains(target);\n // if clicked source is parent or the popover-content, do not toggle dropdown.\n if (!isSourcePopover) {\n setDisplayPopover(false);\n }\n };\n\n const togglePopover = () => {\n setDisplayPopover((displayPopover) => !displayPopover);\n };\n\n useImperativeHandle(ref, () => ({ togglePopover }), []);\n\n const popoverContentStyle = {\n 'bottom-left': { left: '0', top: '100%' },\n 'bottom-right': { right: '0', top: '100%' },\n 'bottom-center': { left: '50%', transform: 'translateX(-50%)', top: '100%' },\n 'top-left': { left: '0', bottom: '100%' },\n 'top-right': { right: '0', bottom: '100%' },\n 'top-center': { left: '50%', transform: 'translateX(-50%)', bottom: '100%' }\n };\n\n return (\n <div\n className={\n 'se-design-popover-wrapper cursor-pointer relative' +\n (className.length > 0 ? ` ${className}` : '') +\n (displayPopover ? ' open' : '') +\n (disabled ? ' opacity-50 cursor-not-allowed pointer-events-none' : '')\n }\n ref={srcElementRef}\n onClick={togglePopover}\n data-automation-id={automationId}\n {...props}\n >\n {renderPopoverSrcElement({ displayPopover })}\n\n {displayPopover && (\n <div\n className={`popover-content absolute shadow-md border rounded-md z-[1000] ${contentWidth == 'full' ? 'w-full' : 'w-max'}`}\n style={{\n borderColor: 'var(--color-gray-200)',\n color: 'var(--color-gray-900)',\n backgroundColor: 'var(--color-white)',\n ...popoverContentStyle[popoverPosition]\n }}\n onClick={(e) => e.stopPropagation()}\n ref={popoverContentRef}\n data-automation-id={popoverContentAutomationId}\n >\n {renderPopoverContents({ closePopoverCb: () => setDisplayPopover(false) })}\n </div>\n )}\n </div>\n );\n }\n);\n"],"names":["Popover","_a","ref","_b","className","automationId","position","popoverContentAutomationId","contentWidth","renderPopoverContents","renderPopoverSrcElement","onPopoverToggle","isPopoverOpen","disabled","props","displayPopover","setDisplayPopover","useState","popoverPosition","setPopoverPosition","srcElementRef","useRef","popoverContentRef","useEffect","body","addEventListener","clickListener","checkPopoverPosition","document","removeEventListener","current","popoverRect","getBoundingClientRect","viewportHeight","window","innerHeight","bottom","includes","top","event","currentDropRef","target","contains","togglePopover","useImperativeHandle","popoverContentStyle","left","right","transform","React","createElement","_extends","length","onClick","style","__spreadValues","borderColor","color","backgroundColor","e","stopPropagation","closePopoverCb"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBaA,MAAAA,sBACX,CACEC,GAaAC,MACG;AAdH,MAAAC,IAAAF,GACEG;AAAAA,eAAAA,IAAY;AAAA,IACZC,cAAAA,IAAe;AAAA,IACfC,UAAAA,IAAW;AAAA,IACXC,4BAAAA,IAA6B;AAAA,IAC7BC,cAAAA,IAAe;AAAA,IACfC,uBAAAA;AAAAA,IACAC,yBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,UAAAA,IAAW;AAAA,MAVbV,GAWKW,IAAAA,EAXLX,GAWKW;AAAAA,IAVHV;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA;AAKF,QAAM,CAACE,GAAgBC,CAAiB,IAAIC,EAAS,EAAK,GACpD,CAACC,GAAiBC,CAAkB,IAAIF,EAASX,CAAQ,GACzDc,IAAgBC,EAAuB,IAAI,GAC3CC,IAAoBD,EAAuB,IAAI;AAErDE,EAAAA,EAAU,MAAM;AAId,QAHIZ,KACFA,EAAgBI,CAAc,GAE5BA;AACOS,sBAAAA,KAAKC,iBAAiB,SAASC,CAAa,GAChCC,EAAA,GACd,MAAMC,SAASJ,KAAKK,oBAAoB,SAASH,CAAa;AAAA,EACvE,GACC,CAACX,CAAc,CAAC,GAEnBQ,EAAU,MAAM;AACdP,IAAAA,EAAkBJ,KAAAA,OAAAA,IAAi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AAA,MAAEU,MAAM;AAAA,MAAOE,WAAW;AAAA,MAAoBZ,QAAQ;AAAA,IAAA;AAAA,EACtE;AAGEa,SAAAA,gBAAAA,EAAAC,cAAA,OAAAC,EAAA;AAAA,IACE/C,WACE,uDACCA,EAAUgD,SAAS,IAAI,IAAIhD,CAAS,KAAK,OACzCW,IAAiB,UAAU,OAC3BF,IAAW,uDAAuD;AAAA,IAErEX,KAAKkB;AAAAA,IACLiC,SAASV;AAAAA,IACT,sBAAoBtC;AAAAA,EAAAA,GAChBS,CAAK,GAERJ,EAAwB;AAAA,IAAEK,gBAAAA;AAAAA,EAAgB,CAAA,GAE1CA,KACCkC,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IACE9C,WAAW,iEAAiEI,KAAgB,SAAS,WAAW,OAAO;AAAA,IACvH8C,OAAOC,EAAA;AAAA,MACLC,aAAa;AAAA,MACbC,OAAO;AAAA,MACPC,iBAAiB;AAAA,OACdb,EAAoB3B,CAAe;AAAA,IAExCmC,SAAUM,CAAMA,MAAAA,EAAEC,gBAAgB;AAAA,IAClC1D,KAAKoB;AAAAA,IACL,sBAAoBf;AAAAA,KAEnBE,EAAsB;AAAA,IAAEoD,gBAAgBA,MAAM7C,EAAkB,EAAK;AAAA,EAAG,CAAA,CACtE,CAEJ;AAET,CACF;"}
|
package/dist/index17.js
CHANGED
@@ -23,7 +23,7 @@ const s = (g) => {
|
|
23
23
|
"className"
|
24
24
|
]);
|
25
25
|
return /* @__PURE__ */ l.createElement("header", {
|
26
|
-
className: `se-design-header ${e} sticky top-0 h-[
|
26
|
+
className: `se-design-header ${e} sticky top-0 h-[40px] w-full z-[1000] bg-gradient-to-r from-[#3A91DA] to-[#2A5092] flex justify-between items-center ${(r == null ? void 0 : r.type) === "fixed" ? "fixed left-0 right-0 top-0" : ""}`
|
27
27
|
}, t && /* @__PURE__ */ l.createElement(l.Fragment, null, t), m && /* @__PURE__ */ l.createElement(l.Fragment, null, m), a && /* @__PURE__ */ l.createElement(l.Fragment, null, a));
|
28
28
|
};
|
29
29
|
export {
|
package/dist/index17.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index17.js","sources":["../src/components/Header/index.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nexport interface HeaderProps {\n leftContainer?: React.ReactNode;\n centerContainer?: React.ReactNode;\n rightContainer?: React.ReactNode;\n type?: string;\n className?: string;\n}\n\nexport const Header: FC<HeaderProps> = ({\n leftContainer,\n centerContainer,\n rightContainer,\n className,\n ...props\n}) => {\n return (\n <header className={`se-design-header ${className} sticky top-0 h-[
|
1
|
+
{"version":3,"file":"index17.js","sources":["../src/components/Header/index.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nexport interface HeaderProps {\n leftContainer?: React.ReactNode;\n centerContainer?: React.ReactNode;\n rightContainer?: React.ReactNode;\n type?: string;\n className?: string;\n}\n\nexport const Header: FC<HeaderProps> = ({\n leftContainer,\n centerContainer,\n rightContainer,\n className,\n ...props\n}) => {\n return (\n <header className={`se-design-header ${className} sticky top-0 h-[40px] w-full z-[1000] bg-gradient-to-r from-[#3A91DA] to-[#2A5092] flex justify-between items-center ${\n props?.type === 'fixed' ? 'fixed left-0 right-0 top-0' : ''\n }`}>\n {leftContainer && <>{leftContainer}</>}\n {centerContainer && <>{centerContainer}</>}\n {rightContainer && <>{rightContainer}</>}\n </header>\n );\n};\n"],"names":["Header","_a","_b","leftContainer","centerContainer","rightContainer","className","props","React","createElement","type","Fragment"],"mappings":";;;;;;;;;;;;AAUO,MAAMA,IAA0BA,CAACC,MAMlC;AANkC,MAAAC,IAAAD,GACtCE;AAAAA,mBAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,WAAAA;AAAAA,MAJsCJ,GAKnCK,IAAAA,EALmCL,GAKnCK;AAAAA,IAJHJ;AAAAA,IACAC;AAAAA,IACAC;AAAAA,IACAC;AAAAA;AAIEE,SAAAA,gBAAAA,EAAAC,cAAA,UAAA;AAAA,IAAQH,WAAW,oBAAoBA,CAAS,0HAC9CC,KAAAA,gBAAAA,EAAOG,UAAS,UAAU,+BAA+B,EAAE;AAAA,EAC1D,GACAP,KAAiBK,gBAAAA,EAAAC,cAAAD,EAAAG,UAAA,MAAGR,CAAgB,GACpCC,KAAmBK,gBAAAA,EAAAA,cAAAD,EAAAG,UAAGP,MAAAA,CAAkB,GACxCC,KAAkBG,gBAAAA,EAAAC,cAAAD,EAAAG,UAAGN,MAAAA,CAAiB,CACjC;AAEZ;"}
|
package/dist/index22.js
CHANGED
@@ -1,54 +1,58 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
var
|
5
|
-
var
|
1
|
+
var I = Object.defineProperty, O = Object.defineProperties;
|
2
|
+
var R = Object.getOwnPropertyDescriptors;
|
3
|
+
var b = Object.getOwnPropertySymbols;
|
4
|
+
var T = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
5
|
+
var C = (e, t, l) => t in e ? I(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, E = (e, t) => {
|
6
6
|
for (var l in t || (t = {}))
|
7
|
-
|
8
|
-
if (
|
9
|
-
for (var l of
|
10
|
-
|
7
|
+
T.call(t, l) && C(e, l, t[l]);
|
8
|
+
if (b)
|
9
|
+
for (var l of b(t))
|
10
|
+
_.call(t, l) && C(e, l, t[l]);
|
11
11
|
return e;
|
12
|
-
},
|
13
|
-
import c, { useState as x, useRef as
|
14
|
-
import { Popover as
|
15
|
-
import { Icon as
|
16
|
-
const
|
17
|
-
const [t, l] = x(!1), [r, f] = x(() => (e == null ? void 0 : e.defaultSelectedValue) || {}), v =
|
12
|
+
}, S = (e, t) => O(e, R(t));
|
13
|
+
import c, { useState as x, useRef as j, useEffect as B } from "react";
|
14
|
+
import { Popover as J } from "./index16.js";
|
15
|
+
import { Icon as D } from "./index4.js";
|
16
|
+
const F = (e) => {
|
17
|
+
const [t, l] = x(!1), [r, f] = x(() => (e == null ? void 0 : e.defaultSelectedValue) || {}), v = j(null), {
|
18
18
|
selectBy: m = "",
|
19
19
|
optionsUniqueBy: d = "",
|
20
|
-
displaySelected:
|
20
|
+
displaySelected: h = !1,
|
21
21
|
dropDownOptions: i,
|
22
|
-
defaultText: y = "Select"
|
22
|
+
defaultText: y = "Select",
|
23
|
+
iconColor: g = "var(--color-gray-700)",
|
24
|
+
disabled: s = !1
|
23
25
|
} = e;
|
24
|
-
|
26
|
+
B(() => {
|
25
27
|
f((e == null ? void 0 : e.defaultSelectedValue) || {});
|
26
28
|
}, [e == null ? void 0 : e.defaultSelectedValue]);
|
27
|
-
const
|
29
|
+
const N = (n) => {
|
28
30
|
var a, o;
|
29
31
|
f(n), (a = v.current) == null || a.togglePopover(), (o = e == null ? void 0 : e.onOptionClick) == null || o.call(e, n);
|
30
32
|
}, w = (n) => e != null && e.renderOptionChip ? e == null ? void 0 : e.renderOptionChip(n) : /* @__PURE__ */ c.createElement("span", {
|
31
33
|
className: "option-chip"
|
32
|
-
}, n[m] || y),
|
33
|
-
const a = n[m], o = r[m] || y,
|
34
|
+
}, n[m] || y), k = (n) => {
|
35
|
+
const a = n[m], o = r[m] || y, P = d != null && d.length ? n[d] == r[d] : !0, u = h && a === o && P;
|
34
36
|
return /* @__PURE__ */ c.createElement("div", {
|
35
37
|
key: `$drop-option-${a}`,
|
36
38
|
className: `option px-3 py-2 hover:bg-gray-100 cursor-pointer flex items-center justify-between ${u ? "selected" : ""}`,
|
37
|
-
onClick: () =>
|
38
|
-
}, w(
|
39
|
+
onClick: () => N(n)
|
40
|
+
}, w(S(E({}, n), {
|
39
41
|
isOptionSelected: u
|
40
|
-
})), u && /* @__PURE__ */ c.createElement(
|
41
|
-
name: "checkmark"
|
42
|
+
})), u && /* @__PURE__ */ c.createElement(D, {
|
43
|
+
name: "checkmark",
|
44
|
+
stroke: g
|
42
45
|
}));
|
43
|
-
},
|
46
|
+
}, $ = () => /* @__PURE__ */ c.createElement("div", {
|
44
47
|
className: "dropdown-content dropdown-options"
|
45
|
-
}, i == null ? void 0 : i.map((n) =>
|
46
|
-
const a = `dropdown-src-element flex px-3 py-2 border rounded-md ${t ? "border-[var(--color-gray-900)]" : "border-[var(--color-gray-200)]"}`;
|
48
|
+
}, i == null ? void 0 : i.map((n) => k(n))), V = () => {
|
49
|
+
const a = `dropdown-src-element flex px-3 py-2 border rounded-md ${t ? "border-[var(--color-gray-900)]" : "border-[var(--color-gray-200)]"} `;
|
47
50
|
return /* @__PURE__ */ c.createElement("div", {
|
48
51
|
className: a
|
49
|
-
}, w(r), /* @__PURE__ */ c.createElement(
|
50
|
-
name: "down",
|
51
|
-
className: `ml-auto ${t ? "rotate-180" : ""} transition-transform
|
52
|
+
}, w(r), /* @__PURE__ */ c.createElement(D, {
|
53
|
+
name: "chevron-down",
|
54
|
+
className: `ml-auto ${t ? "rotate-180" : ""} transition-transform`,
|
55
|
+
stroke: g
|
52
56
|
}));
|
53
57
|
};
|
54
58
|
return /* @__PURE__ */ c.createElement("div", {
|
@@ -57,16 +61,18 @@ const z = (e) => {
|
|
57
61
|
}, (e == null ? void 0 : e.label) && /* @__PURE__ */ c.createElement("div", {
|
58
62
|
className: "se-design-dropdown-label mb-[3px] text-[var(--color-gray-700)] text-sm"
|
59
63
|
}, e == null ? void 0 : e.label), /* @__PURE__ */ c.createElement("div", {
|
60
|
-
style: e == null ? void 0 : e.style
|
61
|
-
|
64
|
+
style: e == null ? void 0 : e.style,
|
65
|
+
className: `${s ? "bg-[var(--color-gray-200)] rounded-md cursor-not-allowed" : ""}`
|
66
|
+
}, /* @__PURE__ */ c.createElement(J, {
|
62
67
|
ref: v,
|
63
|
-
renderPopoverContents:
|
68
|
+
renderPopoverContents: $,
|
64
69
|
contentWidth: "full",
|
65
|
-
renderPopoverSrcElement:
|
66
|
-
onPopoverToggle: (n) => l(n)
|
70
|
+
renderPopoverSrcElement: V,
|
71
|
+
onPopoverToggle: (n) => l(n),
|
72
|
+
disabled: s
|
67
73
|
})));
|
68
74
|
};
|
69
75
|
export {
|
70
|
-
|
76
|
+
F as Dropdown
|
71
77
|
};
|
72
78
|
//# sourceMappingURL=index22.js.map
|
package/dist/index22.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index22.js","sources":["../src/components/Dropdown/index.tsx"],"sourcesContent":["import React, { FC, useState, useRef, useEffect } from 'react';\n\nimport { Popover, PopoverHandle } from 'src/components/Popover';\nimport { Icon } from 'components/Icon';\n\ntype DropdownValue = {\n [key: string]: any;\n};\n\ntype DropdownProps = {\n label?: string;\n type: 'select';\n dropDownOptions?: DropdownValue[];\n defaultText?: string;\n selectBy?: string;\n optionsUniqueBy?: string;\n displaySelected?: boolean;\n defaultSelectedValue?: DropdownValue;\n onOptionClick?: (selectedValue: DropdownValue) => void;\n style?: React.CSSProperties;\n renderOptionChip?: (option: DropdownValue) => React.ReactNode;\n className?: string;\n};\n\nexport const Dropdown: FC<DropdownProps> = (props) => {\n const [isDropDownOpen, setIsDropDownOpen] = useState(false);\n const [selectedDropDownValue, setSelectedDropDownValue] = useState<DropdownValue>(\n () => props?.defaultSelectedValue || {}\n );\n const popoverRef = useRef<HTMLDivElement & PopoverHandle>(null);\n\n const {\n selectBy = '',\n optionsUniqueBy = '',\n displaySelected = false,\n dropDownOptions,\n defaultText = 'Select'
|
1
|
+
{"version":3,"file":"index22.js","sources":["../src/components/Dropdown/index.tsx"],"sourcesContent":["import React, { FC, useState, useRef, useEffect } from 'react';\n\nimport { Popover, PopoverHandle } from 'src/components/Popover';\nimport { Icon } from 'components/Icon';\n\ntype DropdownValue = {\n [key: string]: any;\n};\n\ntype DropdownProps = {\n label?: string;\n type: 'select';\n dropDownOptions?: DropdownValue[];\n defaultText?: string;\n selectBy?: string;\n optionsUniqueBy?: string;\n displaySelected?: boolean;\n defaultSelectedValue?: DropdownValue;\n onOptionClick?: (selectedValue: DropdownValue) => void;\n style?: React.CSSProperties;\n renderOptionChip?: (option: DropdownValue) => React.ReactNode;\n className?: string;\n iconColor?: string;\n disabled?: boolean;\n};\n\nexport const Dropdown: FC<DropdownProps> = (props) => {\n const [isDropDownOpen, setIsDropDownOpen] = useState(false);\n const [selectedDropDownValue, setSelectedDropDownValue] = useState<DropdownValue>(\n () => props?.defaultSelectedValue || {}\n );\n const popoverRef = useRef<HTMLDivElement & PopoverHandle>(null);\n\n const {\n selectBy = '',\n optionsUniqueBy = '',\n displaySelected = false,\n dropDownOptions,\n defaultText = 'Select',\n iconColor = 'var(--color-gray-700)',\n disabled = false,\n } = props;\n\n useEffect(() => {\n setSelectedDropDownValue(props?.defaultSelectedValue || {});\n }, [props?.defaultSelectedValue]);\n\n const handleDropDownOptionClick = (dropDownOption: any) => {\n setSelectedDropDownValue(dropDownOption);\n popoverRef.current?.togglePopover();\n props?.onOptionClick?.(dropDownOption);\n };\n\n const optionChip = (option: DropdownValue) => {\n if (props?.renderOptionChip) {\n return props?.renderOptionChip(option);\n }\n return <span className={`option-chip`}>{option[selectBy] || defaultText}</span>;\n };\n\n const dropDownOptionJsx = (dropDownOption: DropdownValue) => {\n const optionTxt = dropDownOption[selectBy];\n const dropDownSelectedValue = selectedDropDownValue[selectBy] || defaultText;\n const selectByUniqueId = optionsUniqueBy?.length\n ? dropDownOption[optionsUniqueBy] == selectedDropDownValue[optionsUniqueBy]\n : true;\n const isOptionSelected = displaySelected && optionTxt === dropDownSelectedValue && selectByUniqueId;\n return (\n <div\n key={`$drop-option-${optionTxt}`}\n className={`option px-3 py-2 hover:bg-gray-100 cursor-pointer flex items-center justify-between ${isOptionSelected ? 'selected' : ''}`}\n onClick={() => handleDropDownOptionClick(dropDownOption)}\n >\n {optionChip({ ...dropDownOption, isOptionSelected })}\n {isOptionSelected && <Icon name=\"checkmark\" stroke={iconColor} />}\n </div>\n );\n };\n\n const renderDropdownContents = () => {\n return (\n <div className=\"dropdown-content dropdown-options\">\n {dropDownOptions?.map((dropDownOption) => dropDownOptionJsx(dropDownOption))}\n </div>\n );\n };\n\n const renderDropdownSelect = () => {\n const borderColor = isDropDownOpen ? 'border-[var(--color-gray-900)]' : 'border-[var(--color-gray-200)]';\n const dropDownSelectClass = `dropdown-src-element flex px-3 py-2 border rounded-md ${borderColor} `;\n\n return (\n <div className={dropDownSelectClass}>\n {optionChip(selectedDropDownValue)}\n <Icon\n name=\"chevron-down\"\n className={`ml-auto ${isDropDownOpen ? 'rotate-180' : ''} transition-transform`}\n stroke={iconColor}\n />\n </div>\n );\n };\n\n return (\n <div className={`se-design-dropdown-container ${props?.className}`} style={props?.style}>\n {props?.label && (\n <div className=\"se-design-dropdown-label mb-[3px] text-[var(--color-gray-700)] text-sm\">{props?.label}</div>\n )}\n <div style={props?.style} className={`${disabled ? 'bg-[var(--color-gray-200)] rounded-md cursor-not-allowed' : ''}`}>\n <Popover\n ref={popoverRef}\n renderPopoverContents={renderDropdownContents}\n contentWidth={'full'}\n renderPopoverSrcElement={renderDropdownSelect}\n onPopoverToggle={(value) => setIsDropDownOpen(value)}\n disabled={disabled}\n />\n </div>\n </div>\n );\n};\n"],"names":["React__default","useState","useRef","useEffect","Popover","Icon","Dropdown","props","isDropDownOpen","setIsDropDownOpen","selectedDropDownValue","setSelectedDropDownValue","defaultSelectedValue","popoverRef","selectBy","optionsUniqueBy","displaySelected","dropDownOptions","defaultText","iconColor","disabled","handleDropDownOptionClick","dropDownOption","_a","_b","current","togglePopover","onOptionClick","optionChip","option","renderOptionChip","React","createElement","className","dropDownOptionJsx","optionTxt","dropDownSelectedValue","selectByUniqueId","length","isOptionSelected","key","onClick","__spreadProps","__spreadValues","name","stroke","renderDropdownContents","map","renderDropdownSelect","dropDownSelectClass","style","label","ref","renderPopoverContents","contentWidth","renderPopoverSrcElement","onPopoverToggle","value"],"mappings":";;;;;;;;;;;;AA0BO,OAAAA,KAAA,YAAAC,GAAA,UAAAC,GAAA,aAAAC,SAAA;AAAA,SAAA,WAAAC,SAAA;AAAA,SAAA,QAAAC,SAAA;AAAA,MAAMC,IAA+BC,CAAUA,MAAA;AACpD,Q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GAAGb,IAAW,6DAA6D,EAAE;AAAA,EAAA,GAChHY,gBAAAA,EAAAA,cAAC5B,GAAO;AAAA,IACNgD,KAAKvC;AAAAA,IACLwC,uBAAuBP;AAAAA,IACvBQ,cAAc;AAAA,IACdC,yBAAyBP;AAAAA,IACzBQ,iBAAkBC,CAAUhD,MAAAA,EAAkBgD,CAAK;AAAA,IACnDrC,UAAAA;AAAAA,EACD,CAAA,CACE,CACF;AAET;"}
|
package/dist/index26.js
CHANGED
@@ -1,33 +1,65 @@
|
|
1
|
-
import r, { useState as
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
import r, { useState as g, useEffect as E } from "react";
|
2
|
+
import { Icon as k } from "./index4.js";
|
3
|
+
import { Dropdown as N } from "./index22.js";
|
4
|
+
/* empty css */
|
5
|
+
const b = ({
|
6
|
+
defaultActiveTab: c,
|
7
|
+
tabs: o,
|
8
|
+
onTabChange: n,
|
9
|
+
primaryTabCount: a = 0
|
6
10
|
}) => {
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
}, [
|
11
|
-
const
|
12
|
-
|
13
|
-
},
|
11
|
+
const x = c || (o[0] ? o[0].id : ""), [l, m] = g(x), [v, p] = g(!1), u = a || (o == null ? void 0 : o.length), w = o.slice(0, u), t = o.slice(u), s = t.find((e) => e.id === l);
|
12
|
+
E(() => {
|
13
|
+
m(c || "");
|
14
|
+
}, [c]);
|
15
|
+
const i = (e) => {
|
16
|
+
m(e == null ? void 0 : e.id), n == null || n(e == null ? void 0 : e.id);
|
17
|
+
}, f = (e, d) => e.id === d;
|
14
18
|
return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("div", {
|
15
|
-
className: "se-design-tabs flex items-center
|
16
|
-
},
|
17
|
-
const
|
19
|
+
className: "se-design-tabs flex items-center relative border rounded-md border-[var(--color-gray-200)] w-fit"
|
20
|
+
}, w.map((e) => {
|
21
|
+
const d = l === e.id, y = e.disabled;
|
18
22
|
return /* @__PURE__ */ r.createElement("div", {
|
19
23
|
key: e.label,
|
20
|
-
onClick: () => !
|
21
|
-
className: `text-base ${
|
24
|
+
onClick: () => !y && i(e),
|
25
|
+
className: `text-base px-3 py-0.5 border-l first:border-l-0 border-[var(--color-gray-200)] ${y ? "text-[var(--color-gray-400)] cursor-not-allowed" : d ? "text-[var(--color-blue-500)] bg-[var(--color-blue-100)] font-medium hover:cursor-pointer" : "text-[var(--color-gray-700)] font-normal hover:text-[var(--color-gray-900)] cursor-pointer"}`
|
22
26
|
}, e.label);
|
23
|
-
})
|
27
|
+
}), t.length > 0 && /* @__PURE__ */ r.createElement("div", {
|
28
|
+
className: "relative"
|
29
|
+
}, /* @__PURE__ */ r.createElement("div", {
|
30
|
+
className: `cursor-pointer text-base text-[var(--color-gray-700)] border-l border-[var(--color-gray-200)] py-0.5 px-1.5 ${s ? "bg-[var(--color-blue-100)]" : ""}`
|
31
|
+
}, s ? /* @__PURE__ */ r.createElement(N, {
|
32
|
+
defaultSelectedValue: s,
|
33
|
+
defaultText: "Select",
|
34
|
+
displaySelected: !0,
|
35
|
+
dropDownOptions: t,
|
36
|
+
optionsUniqueBy: "id",
|
37
|
+
selectBy: "label",
|
38
|
+
className: "se-design-tabs-dropdown",
|
39
|
+
type: "select",
|
40
|
+
onOptionClick: (e) => {
|
41
|
+
i(e);
|
42
|
+
},
|
43
|
+
iconColor: "var(--color-blue-500)"
|
44
|
+
}) : /* @__PURE__ */ r.createElement(k, {
|
45
|
+
name: "kebab-menu",
|
46
|
+
onClick: () => p(!v)
|
47
|
+
})), v && /* @__PURE__ */ r.createElement("div", {
|
48
|
+
className: "absolute top-full left-0 mt-1 bg-white border border-[var(--color-gray-200)] min-w-[165px] w-max shadow-lg rounded-md z-10"
|
49
|
+
}, t.map((e) => /* @__PURE__ */ r.createElement("div", {
|
50
|
+
key: e.label,
|
51
|
+
onClick: () => {
|
52
|
+
i(e), p(!1);
|
53
|
+
},
|
54
|
+
className: `px-4 py-2 cursor-pointer hover:bg-gray-100 ${l === e.id ? "text-[var(--color-gray-900)] font-bold" : "text-[var(--color-gray-700)]"}`
|
55
|
+
}, e.label))))), /* @__PURE__ */ r.createElement("div", {
|
24
56
|
className: "se-design-tabs-content"
|
25
|
-
},
|
57
|
+
}, o.map((e) => /* @__PURE__ */ r.createElement("div", {
|
26
58
|
key: e.id,
|
27
|
-
className: `tab-content ${
|
28
|
-
},
|
59
|
+
className: `tab-content ${f(e, l) ? "block" : "hidden"}`
|
60
|
+
}, f(e, l) && (e == null ? void 0 : e.renderTabContent) && (e == null ? void 0 : e.renderTabContent(e))))));
|
29
61
|
};
|
30
62
|
export {
|
31
|
-
|
63
|
+
b as Tabs
|
32
64
|
};
|
33
65
|
//# sourceMappingURL=index26.js.map
|