se-design 0.0.114 → 0.0.116
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/checked-circle.svg +8 -0
- package/dist/assets/icons/chevron.svg +3 -0
- package/dist/assets/icons/file.svg +3 -0
- package/dist/assets/icons/folder.svg +1 -1
- package/dist/assets/icons/hamburger.svg +2 -4
- package/dist/assets/icons/kebab-menu.svg +3 -8
- package/dist/assets/icons/reset.svg +2 -2
- package/dist/assets/icons/rotate-left.svg +2 -2
- package/dist/assets/icons/rotate-right.svg +3 -3
- package/dist/assets/icons/search.svg +3 -3
- package/dist/assets/icons/shipment.svg +5 -0
- package/dist/assets/style.css +1 -1
- package/dist/components/BreadCrumbs/index.d.ts +12 -0
- package/dist/components/Button/index.d.ts +3 -2
- package/dist/components/KebabMenu/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index10.js +30 -22
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +1 -1
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +1 -1
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +2 -2
- 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 +2 -2
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +2 -2
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +2 -2
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +2 -2
- 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 +2 -2
- 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 +149 -2
- package/dist/index117.js.map +1 -1
- package/dist/{index129.js → index128.js} +1 -1
- package/dist/{index129.js.map → index128.js.map} +1 -1
- package/dist/index136.js +1236 -0
- package/dist/index136.js.map +1 -0
- package/dist/index137.js +9 -1232
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +9 -9
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +4 -9
- package/dist/index139.js.map +1 -1
- package/dist/index140.js +170 -5
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +11 -170
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +6 -11
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +5 -5
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +37 -5
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +2 -38
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +8 -2
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +326 -7
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +47 -324
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +2 -50
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +76 -2
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +82 -65
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +48 -89
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +7 -51
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +4 -7
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +51 -4
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +2 -52
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +2 -2
- package/dist/index19.js +3 -2
- package/dist/index19.js.map +1 -1
- package/dist/index23.js +13 -12
- package/dist/index23.js.map +1 -1
- package/dist/index24.js +45 -129
- package/dist/index24.js.map +1 -1
- package/dist/index3.js +28 -32
- package/dist/index3.js.map +1 -1
- package/dist/index34.js +1 -1
- package/dist/index34.js.map +1 -1
- package/dist/index37.js +1 -1
- package/dist/index39.js +24 -23
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +18 -18
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +24 -22
- package/dist/index41.js.map +1 -1
- package/dist/index43.js +2 -2
- package/dist/index43.js.map +1 -1
- package/dist/index47.js +43 -2
- 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/index5.js +131 -135
- package/dist/index5.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 +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 +2 -2
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +2 -2
- 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 +2 -2
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +2 -2
- 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 +1 -1
- 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 +2 -2
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +1 -1
- package/dist/index77.js.map +1 -1
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +1 -1
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +1 -1
- package/dist/index80.js.map +1 -1
- package/dist/index81.js.map +1 -1
- package/dist/index82.js.map +1 -1
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +1 -1
- 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 +2 -2
- 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 +2 -2
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +1 -1
- 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 +1 -1
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/icons/checked-circle-disabled.svg +0 -11
- package/dist/assets/icons/checked-circle-green.svg +0 -11
- package/dist/assets/icons/checked-circle-white.svg +0 -6
- package/dist/assets/icons/chevron-down.svg +0 -3
- package/dist/assets/icons/info-white.svg +0 -3
- package/dist/assets/icons/kebab-menu-blue.svg +0 -8
- package/dist/index118.js +0 -152
- package/dist/index118.js.map +0 -1
- package/dist/index158.js +0 -5
- package/dist/index158.js.map +0 -1
- /package/dist/assets/icons/{info-brown.svg → info.svg} +0 -0
package/dist/index155.js
CHANGED
@@ -1,8 +1,55 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
import { __require as E } from "./index153.js";
|
2
|
+
import { __require as _ } from "./index154.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;
|
4
51
|
}
|
5
52
|
export {
|
6
|
-
|
53
|
+
P as __require
|
7
54
|
};
|
8
55
|
//# sourceMappingURL=index155.js.map
|
package/dist/index155.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index155.js","sources":["../node_modules/prop-types/
|
1
|
+
{"version":3,"file":"index155.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/index156.js
CHANGED
@@ -1,55 +1,5 @@
|
|
1
|
-
|
2
|
-
import { __require as _ } from "./index155.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
|
-
}
|
1
|
+
var r = {};
|
52
2
|
export {
|
53
|
-
|
3
|
+
r as __exports
|
54
4
|
};
|
55
5
|
//# sourceMappingURL=index156.js.map
|
package/dist/index156.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index156.js","sources":[
|
1
|
+
{"version":3,"file":"index156.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index157.js
CHANGED
package/dist/index19.js
CHANGED
@@ -2,7 +2,7 @@ import e from "react";
|
|
2
2
|
import { Popover as c } from "./index17.js";
|
3
3
|
import { Icon as l } from "./index5.js";
|
4
4
|
const o = {
|
5
|
-
base: "se-design-hamburger-menu rounded-[6px] transition-all duration-300",
|
5
|
+
base: "se-design-hamburger-menu rounded-[6px] transition-all duration-300 p-1",
|
6
6
|
active: "bg-[var(--color-blue-450)]",
|
7
7
|
hover: "hover:bg-[var(--color-blue-450)]"
|
8
8
|
}, u = ({
|
@@ -20,7 +20,8 @@ const o = {
|
|
20
20
|
}) => /* @__PURE__ */ e.createElement("div", {
|
21
21
|
className: `${o.base} ${r ? o.active : ""} ${o.hover}`
|
22
22
|
}, /* @__PURE__ */ e.createElement(l, {
|
23
|
-
name: "hamburger"
|
23
|
+
name: "hamburger",
|
24
|
+
stroke: "var(--color-white)"
|
24
25
|
})),
|
25
26
|
renderPopoverContents: (r) => /* @__PURE__ */ e.createElement("div", {
|
26
27
|
className: "min-w-[212px]"
|
package/dist/index19.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index19.js","sources":["../src/components/HamburgerMenu/index.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { Popover } from 'src/components/Popover';\nimport { Icon } from 'src/components/Icon';\nexport interface HamburgerMenuProps {\n className?: string;\n automationId?: string;\n popoverContentAutomationId?: string;\n menuContent?: (data: any) => React.ReactNode;\n}\n\nconst menuClasses = {\n base: 'se-design-hamburger-menu rounded-[6px] transition-all duration-300',\n active: 'bg-[var(--color-blue-450)]',\n hover: 'hover:bg-[var(--color-blue-450)]'\n};\n\nexport const HamburgerMenu: FC<HamburgerMenuProps> = ({\n className = '',\n automationId = '',\n popoverContentAutomationId = '',\n menuContent\n}) => {\n\n return (\n <Popover\n className={className}\n position='bottom-left'\n automationId={automationId}\n popoverContentAutomationId={popoverContentAutomationId}\n renderPopoverSrcElement={({ displayPopover }) => (\n <div className={`${menuClasses.base} ${displayPopover ? menuClasses.active : ''} ${menuClasses.hover}`}>\n <Icon name='hamburger' />\n </div>\n )}\n renderPopoverContents={(data) => (\n <div className=\"min-w-[212px]\">\n {menuContent && <div className='menu-content'>{menuContent(data)}</div>}\n </div>\n )}\n />\n );\n};\n"],"names":["React__default","Popover","Icon","menuClasses","base","active","hover","HamburgerMenu","className","automationId","popoverContentAutomationId","menuContent","React","createElement","position","renderPopoverSrcElement","displayPopover","name","renderPopoverContents","data"],"mappings":"AAWA,OAAAA,OAAA;AAAA,SAAA,WAAAC,SAAA;AAAA,SAAA,QAAAC,SAAA;AAAA,MAAMC,IAAc;AAAA,EAClBC,MAAM;AAAA,EACNC,QAAQ;AAAA,EACRC,OAAO;AACT,GAEaC,IAAwCA,CAAC;AAAA,EACpDC,WAAAA,IAAY;AAAA,EACZC,cAAAA,IAAe;AAAA,EACfC,4BAAAA,IAA6B;AAAA,EAC7BC,aAAAA;AACF,MAGIC,gBAAAA,EAAAC,cAACZ,GAAO;AAAA,EACNO,WAAAA;AAAAA,EACAM,UAAS;AAAA,EACTL,cAAAA;AAAAA,EACAC,4BAAAA;AAAAA,EACAK,yBAAyBA,CAAC;AAAA,IAAEC,gBAAAA;AAAAA,EAAAA,MAC1BH,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IAAKL,WAAW,GAAGL,EAAYC,IAAI,IAAIY,IAAiBb,EAAYE,SAAS,EAAE,IAAIF,EAAYG,KAAK;AAAA,EAAA,GAClGO,gBAAAA,EAAAA,cAACX,GAAI;AAAA,IAACe,MAAK;AAAA,EAAA,
|
1
|
+
{"version":3,"file":"index19.js","sources":["../src/components/HamburgerMenu/index.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { Popover } from 'src/components/Popover';\nimport { Icon } from 'src/components/Icon';\nexport interface HamburgerMenuProps {\n className?: string;\n automationId?: string;\n popoverContentAutomationId?: string;\n menuContent?: (data: any) => React.ReactNode;\n}\n\nconst menuClasses = {\n base: 'se-design-hamburger-menu rounded-[6px] transition-all duration-300 p-1',\n active: 'bg-[var(--color-blue-450)]',\n hover: 'hover:bg-[var(--color-blue-450)]'\n};\n\nexport const HamburgerMenu: FC<HamburgerMenuProps> = ({\n className = '',\n automationId = '',\n popoverContentAutomationId = '',\n menuContent\n}) => {\n\n return (\n <Popover\n className={className}\n position='bottom-left'\n automationId={automationId}\n popoverContentAutomationId={popoverContentAutomationId}\n renderPopoverSrcElement={({ displayPopover }) => (\n <div className={`${menuClasses.base} ${displayPopover ? menuClasses.active : ''} ${menuClasses.hover}`}>\n <Icon name='hamburger' stroke={'var(--color-white)'} />\n </div>\n )}\n renderPopoverContents={(data) => (\n <div className=\"min-w-[212px]\">\n {menuContent && <div className='menu-content'>{menuContent(data)}</div>}\n </div>\n )}\n />\n );\n};\n"],"names":["React__default","Popover","Icon","menuClasses","base","active","hover","HamburgerMenu","className","automationId","popoverContentAutomationId","menuContent","React","createElement","position","renderPopoverSrcElement","displayPopover","name","stroke","renderPopoverContents","data"],"mappings":"AAWA,OAAAA,OAAA;AAAA,SAAA,WAAAC,SAAA;AAAA,SAAA,QAAAC,SAAA;AAAA,MAAMC,IAAc;AAAA,EAClBC,MAAM;AAAA,EACNC,QAAQ;AAAA,EACRC,OAAO;AACT,GAEaC,IAAwCA,CAAC;AAAA,EACpDC,WAAAA,IAAY;AAAA,EACZC,cAAAA,IAAe;AAAA,EACfC,4BAAAA,IAA6B;AAAA,EAC7BC,aAAAA;AACF,MAGIC,gBAAAA,EAAAC,cAACZ,GAAO;AAAA,EACNO,WAAAA;AAAAA,EACAM,UAAS;AAAA,EACTL,cAAAA;AAAAA,EACAC,4BAAAA;AAAAA,EACAK,yBAAyBA,CAAC;AAAA,IAAEC,gBAAAA;AAAAA,EAAAA,MAC1BH,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IAAKL,WAAW,GAAGL,EAAYC,IAAI,IAAIY,IAAiBb,EAAYE,SAAS,EAAE,IAAIF,EAAYG,KAAK;AAAA,EAAA,GAClGO,gBAAAA,EAAAA,cAACX,GAAI;AAAA,IAACe,MAAK;AAAA,IAAYC,QAAQ;AAAA,EAAA,CAAuB,CACnD;AAAA,EAEPC,uBAAwBC,CAAAA,MACtBP,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IAAKL,WAAU;AAAA,EACZG,GAAAA,KAAeE,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IAAKL,WAAU;AAAA,EAAA,GAAgBG,EAAYS,CAAI,CAAO,CACnE;AAAA,CAER;"}
|
package/dist/index23.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
var I = Object.defineProperty, O = Object.defineProperties;
|
2
2
|
var R = Object.getOwnPropertyDescriptors;
|
3
|
-
var
|
3
|
+
var w = Object.getOwnPropertySymbols;
|
4
4
|
var T = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
5
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
7
|
T.call(t, l) && C(e, l, t[l]);
|
8
|
-
if (
|
9
|
-
for (var l of
|
8
|
+
if (w)
|
9
|
+
for (var l of w(t))
|
10
10
|
_.call(t, l) && C(e, l, t[l]);
|
11
11
|
return e;
|
12
12
|
}, S = (e, t) => O(e, R(t));
|
@@ -29,7 +29,7 @@ const F = (e) => {
|
|
29
29
|
const N = (n) => {
|
30
30
|
var a, o;
|
31
31
|
f(n), (a = v.current) == null || a.togglePopover(), (o = e == null ? void 0 : e.onOptionClick) == null || o.call(e, n);
|
32
|
-
},
|
32
|
+
}, b = (n) => e != null && e.renderOptionChip ? e == null ? void 0 : e.renderOptionChip(n) : /* @__PURE__ */ c.createElement("span", {
|
33
33
|
className: "option-chip"
|
34
34
|
}, n[m] || y), k = (n) => {
|
35
35
|
const a = n[m], o = r[m] || y, P = d != null && d.length ? n[d] == r[d] : !0, u = h && a === o && P;
|
@@ -37,21 +37,22 @@ const F = (e) => {
|
|
37
37
|
key: `$drop-option-${a}`,
|
38
38
|
className: `option px-3 py-2 hover:bg-gray-100 cursor-pointer flex items-center justify-between ${u ? "selected" : ""}`,
|
39
39
|
onClick: () => N(n)
|
40
|
-
},
|
40
|
+
}, b(S(E({}, n), {
|
41
41
|
isOptionSelected: u
|
42
42
|
})), u && /* @__PURE__ */ c.createElement(D, {
|
43
43
|
name: "checkmark",
|
44
44
|
stroke: g
|
45
45
|
}));
|
46
|
-
},
|
46
|
+
}, V = () => /* @__PURE__ */ c.createElement("div", {
|
47
47
|
className: "dropdown-content dropdown-options"
|
48
|
-
}, i == null ? void 0 : i.map((n) => k(n))),
|
48
|
+
}, i == null ? void 0 : i.map((n) => k(n))), $ = () => {
|
49
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)]"} `;
|
50
50
|
return /* @__PURE__ */ c.createElement("div", {
|
51
51
|
className: a
|
52
|
-
},
|
53
|
-
name: "chevron
|
54
|
-
|
52
|
+
}, b(r), /* @__PURE__ */ c.createElement(D, {
|
53
|
+
name: "chevron",
|
54
|
+
rotation: t ? "180" : "0",
|
55
|
+
className: "ml-auto transition-transform",
|
55
56
|
stroke: g
|
56
57
|
}));
|
57
58
|
};
|
@@ -65,9 +66,9 @@ const F = (e) => {
|
|
65
66
|
className: `${s ? "bg-[var(--color-gray-200)] rounded-md cursor-not-allowed" : ""}`
|
66
67
|
}, /* @__PURE__ */ c.createElement(J, {
|
67
68
|
ref: v,
|
68
|
-
renderPopoverContents:
|
69
|
+
renderPopoverContents: V,
|
69
70
|
contentWidth: "full",
|
70
|
-
renderPopoverSrcElement:
|
71
|
+
renderPopoverSrcElement: $,
|
71
72
|
onPopoverToggle: (n) => l(n),
|
72
73
|
disabled: s
|
73
74
|
})));
|
package/dist/index23.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index23.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
|
1
|
+
{"version":3,"file":"index23.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'}\n rotation={isDropDownOpen ? '180' : '0'}\n className={`ml-auto 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\n style={props?.style}\n className={`${disabled ? 'bg-[var(--color-gray-200)] rounded-md cursor-not-allowed' : ''}`}\n >\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","rotation","style","label","ref","renderPopoverContents","contentWidth","renderPopoverSrcElement","onPopoverToggle","value"],"mappings":"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"}
|
package/dist/index24.js
CHANGED
@@ -1,145 +1,61 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
var
|
5
|
-
var
|
6
|
-
for (var r in
|
7
|
-
|
8
|
-
if (
|
9
|
-
for (var r of
|
10
|
-
k.call(
|
1
|
+
var d = Object.defineProperty, f = Object.defineProperties;
|
2
|
+
var v = Object.getOwnPropertyDescriptors;
|
3
|
+
var s = Object.getOwnPropertySymbols;
|
4
|
+
var g = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
|
5
|
+
var u = (n, e, r) => e in n ? d(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r, i = (n, e) => {
|
6
|
+
for (var r in e || (e = {}))
|
7
|
+
g.call(e, r) && u(n, r, e[r]);
|
8
|
+
if (s)
|
9
|
+
for (var r of s(e))
|
10
|
+
k.call(e, r) && u(n, r, e[r]);
|
11
11
|
return n;
|
12
|
-
},
|
13
|
-
import
|
14
|
-
import { Popover as
|
15
|
-
import { MenuList as
|
16
|
-
|
12
|
+
}, m = (n, e) => f(n, v(e));
|
13
|
+
import l from "react";
|
14
|
+
import { Popover as E } from "./index17.js";
|
15
|
+
import { MenuList as x } from "./index16.js";
|
16
|
+
import { Icon as y } from "./index5.js";
|
17
|
+
function c() {
|
18
|
+
return c = Object.assign ? Object.assign.bind() : function(n) {
|
19
|
+
for (var e = 1; e < arguments.length; e++) {
|
20
|
+
var r = arguments[e];
|
21
|
+
for (var o in r) ({}).hasOwnProperty.call(r, o) && (n[o] = r[o]);
|
22
|
+
}
|
23
|
+
return n;
|
24
|
+
}, c.apply(null, arguments);
|
25
|
+
}
|
26
|
+
const O = ({
|
17
27
|
menuItems: n,
|
18
|
-
variant:
|
28
|
+
variant: e = "primary",
|
19
29
|
className: r = "",
|
20
|
-
automationId:
|
30
|
+
automationId: o = ""
|
21
31
|
}) => {
|
22
|
-
const
|
23
|
-
switch (t) {
|
24
|
-
case "primary":
|
25
|
-
return /* @__PURE__ */ e.createElement("svg", {
|
26
|
-
xmlns: "http://www.w3.org/2000/svg",
|
27
|
-
width: "24",
|
28
|
-
height: "24",
|
29
|
-
viewBox: "0 0 24 24",
|
30
|
-
fill: "none"
|
31
|
-
}, /* @__PURE__ */ e.createElement("path", {
|
32
|
-
d: "M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",
|
33
|
-
fill: "#5E6673"
|
34
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
35
|
-
d: "M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",
|
36
|
-
fill: "#5E6673"
|
37
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
38
|
-
d: "M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",
|
39
|
-
fill: "#5E6673"
|
40
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
41
|
-
d: "M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",
|
42
|
-
stroke: "#5E6673",
|
43
|
-
"stroke-linecap": "round",
|
44
|
-
"stroke-linejoin": "round"
|
45
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
46
|
-
d: "M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",
|
47
|
-
stroke: "#5E6673",
|
48
|
-
"stroke-linecap": "round",
|
49
|
-
"stroke-linejoin": "round"
|
50
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
51
|
-
d: "M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",
|
52
|
-
stroke: "#5E6673",
|
53
|
-
"stroke-linecap": "round",
|
54
|
-
"stroke-linejoin": "round"
|
55
|
-
}));
|
56
|
-
case "secondary":
|
57
|
-
return /* @__PURE__ */ e.createElement("svg", {
|
58
|
-
xmlns: "http://www.w3.org/2000/svg",
|
59
|
-
width: "24",
|
60
|
-
height: "24",
|
61
|
-
viewBox: "0 0 24 24",
|
62
|
-
fill: "none"
|
63
|
-
}, /* @__PURE__ */ e.createElement("path", {
|
64
|
-
d: "M12 14C12.5523 14 13 13.5523 13 13C13 12.4477 12.5523 12 12 12C11.4477 12 11 12.4477 11 13C11 13.5523 11.4477 14 12 14Z",
|
65
|
-
fill: "#1088E7"
|
66
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
67
|
-
d: "M19 14C19.5523 14 20 13.5523 20 13C20 12.4477 19.5523 12 19 12C18.4477 12 18 12.4477 18 13C18 13.5523 18.4477 14 19 14Z",
|
68
|
-
fill: "#1088E7"
|
69
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
70
|
-
d: "M5 14C5.55228 14 6 13.5523 6 13C6 12.4477 5.55228 12 5 12C4.44772 12 4 12.4477 4 13C4 13.5523 4.44772 14 5 14Z",
|
71
|
-
fill: "#1088E7"
|
72
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
73
|
-
d: "M12 14C12.5523 14 13 13.5523 13 13C13 12.4477 12.5523 12 12 12C11.4477 12 11 12.4477 11 13C11 13.5523 11.4477 14 12 14Z",
|
74
|
-
stroke: "#1088E7",
|
75
|
-
strokeLinecap: "round",
|
76
|
-
strokeLinejoin: "round"
|
77
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
78
|
-
d: "M19 14C19.5523 14 20 13.5523 20 13C20 12.4477 19.5523 12 19 12C18.4477 12 18 12.4477 18 13C18 13.5523 18.4477 14 19 14Z",
|
79
|
-
stroke: "#1088E7",
|
80
|
-
strokeLinecap: "round",
|
81
|
-
strokeLinejoin: "round"
|
82
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
83
|
-
d: "M5 14C5.55228 14 6 13.5523 6 13C6 12.4477 5.55228 12 5 12C4.44772 12 4 12.4477 4 13C4 13.5523 4.44772 14 5 14Z",
|
84
|
-
stroke: "#1088E7",
|
85
|
-
strokeLinecap: "round",
|
86
|
-
strokeLinejoin: "round"
|
87
|
-
}));
|
88
|
-
default:
|
89
|
-
return /* @__PURE__ */ e.createElement("svg", {
|
90
|
-
xmlns: "http://www.w3.org/2000/svg",
|
91
|
-
width: "24",
|
92
|
-
height: "24",
|
93
|
-
viewBox: "0 0 24 24",
|
94
|
-
fill: "none"
|
95
|
-
}, /* @__PURE__ */ e.createElement("path", {
|
96
|
-
d: "M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",
|
97
|
-
fill: "#5E6673"
|
98
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
99
|
-
d: "M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",
|
100
|
-
fill: "#5E6673"
|
101
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
102
|
-
d: "M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",
|
103
|
-
fill: "#5E6673"
|
104
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
105
|
-
d: "M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",
|
106
|
-
stroke: "#5E6673",
|
107
|
-
"stroke-linecap": "round",
|
108
|
-
"stroke-linejoin": "round"
|
109
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
110
|
-
d: "M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",
|
111
|
-
stroke: "#5E6673",
|
112
|
-
"stroke-linecap": "round",
|
113
|
-
"stroke-linejoin": "round"
|
114
|
-
}), /* @__PURE__ */ e.createElement("path", {
|
115
|
-
d: "M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",
|
116
|
-
stroke: "#5E6673",
|
117
|
-
"stroke-linecap": "round",
|
118
|
-
"stroke-linejoin": "round"
|
119
|
-
}));
|
120
|
-
}
|
121
|
-
}, p = (o) => n.map((l) => s(i({}, l), {
|
32
|
+
const b = (t) => n.map((a) => m(i({}, a), {
|
122
33
|
onClick: () => {
|
123
|
-
|
34
|
+
a.onClick && a.onClick(a), t();
|
124
35
|
}
|
125
|
-
}))
|
126
|
-
|
36
|
+
})), p = () => e === "secondary" ? {
|
37
|
+
fill: "var(--color-blue-500)",
|
38
|
+
stroke: "var(--color-blue-500)"
|
39
|
+
} : {};
|
40
|
+
return /* @__PURE__ */ l.createElement(E, {
|
127
41
|
className: r,
|
128
42
|
position: "bottom-left",
|
129
|
-
automationId:
|
43
|
+
automationId: o,
|
130
44
|
renderPopoverSrcElement: ({
|
131
|
-
displayPopover:
|
132
|
-
}) => /* @__PURE__ */
|
133
|
-
className: `se-design-kebab-menu ${
|
134
|
-
}, c(
|
45
|
+
displayPopover: t
|
46
|
+
}) => /* @__PURE__ */ l.createElement("div", {
|
47
|
+
className: `se-design-kebab-menu ${t ? "bg-[var(--color-blue-100)]" : ""} hover:bg-[var(--color-blue-100)] rounded-[4px] transition-all duration-300 w-max p-1`
|
48
|
+
}, /* @__PURE__ */ l.createElement(y, c({
|
49
|
+
name: "kebab-menu"
|
50
|
+
}, p()))),
|
135
51
|
renderPopoverContents: ({
|
136
|
-
closePopoverCb:
|
137
|
-
}) => /* @__PURE__ */
|
138
|
-
items:
|
52
|
+
closePopoverCb: t
|
53
|
+
}) => /* @__PURE__ */ l.createElement(x, {
|
54
|
+
items: b(t)
|
139
55
|
})
|
140
56
|
});
|
141
57
|
};
|
142
58
|
export {
|
143
|
-
|
59
|
+
O as KebabMenu
|
144
60
|
};
|
145
61
|
//# sourceMappingURL=index24.js.map
|
package/dist/index24.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index24.js","sources":["../src/components/KebabMenu/index.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { Popover } from 'components/Popover';\nimport { MenuItemProps } from 'components/MenuItem';\nimport { MenuList } from 'components/MenuList';\n\nexport interface KebabMenuProps {\n className?: string;\n automationId?: string;\n menuItems: MenuItemProps[];\n variant?: 'primary' | 'secondary';\n}\n\nexport const KebabMenu: FC<KebabMenuProps> = ({ menuItems, variant = 'primary', className = '', automationId = '' }) => {\n
|
1
|
+
{"version":3,"file":"index24.js","sources":["../src/components/KebabMenu/index.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { Popover } from 'components/Popover';\nimport { MenuItemProps } from 'components/MenuItem';\nimport { MenuList } from 'components/MenuList';\nimport { Icon } from 'components/Icon';\n\nexport interface KebabMenuProps {\n className?: string;\n automationId?: string;\n menuItems: MenuItemProps[];\n variant?: 'primary' | 'secondary' | '';\n}\n\nexport const KebabMenu: FC<KebabMenuProps> = ({ menuItems, variant = 'primary', className = '', automationId = '' }) => {\n const getUpdatedMenuItems = (closePopoverCb: () => void) => {\n return menuItems.map((item) => ({\n ...item,\n onClick: () => {\n item.onClick && item.onClick(item);\n closePopoverCb();\n }\n }))\n }\n\n const getKebabIconVariant = () => {\n if(variant === 'secondary') {\n return {fill: 'var(--color-blue-500)', stroke: 'var(--color-blue-500)'}\n }\n return {}\n }\n\n return <Popover\n className={className}\n position='bottom-left'\n automationId={automationId}\n renderPopoverSrcElement={({ displayPopover }) => (\n <div className={`se-design-kebab-menu ${displayPopover ? 'bg-[var(--color-blue-100)]' : ''} hover:bg-[var(--color-blue-100)] rounded-[4px] transition-all duration-300 w-max p-1`}>\n <Icon name=\"kebab-menu\" {...getKebabIconVariant()} />\n </div>\n )}\n renderPopoverContents={({ closePopoverCb }) => (\n <MenuList items={getUpdatedMenuItems(closePopoverCb)} />\n )}\n />\n };\n"],"names":["KebabMenu","menuItems","variant","className","automationId","getUpdatedMenuItems","closePopoverCb","map","item","__spreadProps","__spreadValues","onClick","getKebabIconVariant","fill","stroke","React","createElement","Popover","position","renderPopoverSrcElement","displayPopover","Icon","_extends","name","renderPopoverContents","MenuList","items"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAcO,MAAMA,IAAgCA,CAAC;AAAA,EAAEC,WAAAA;AAAAA,EAAWC,SAAAA,IAAU;AAAA,EAAWC,WAAAA,IAAY;AAAA,EAAIC,cAAAA,IAAe;AAAG,MAAM;AAChHC,QAAAA,IAAsBA,CAACC,MACpBL,EAAUM,IAAKC,CAAUA,MAAAC,EAAAC,EAAA,IAC3BF,IAD2B;AAAA,IAE9BG,SAASA,MAAM;AACRA,MAAAA,EAAAA,WAAWH,EAAKG,QAAQH,CAAI,GAClBF,EAAA;AAAA,IAAA;AAAA,EACjB,EACA,GAGEM,IAAsBA,MACvBV,MAAY,cACN;AAAA,IAACW,MAAM;AAAA,IAAyBC,QAAQ;AAAA,EAAuB,IAEjE,CAAC;AAGHC,SAAAA,gBAAAA,EAAAC,cAACC,GAAO;AAAA,IACXd,WAAAA;AAAAA,IACAe,UAAS;AAAA,IACTd,cAAAA;AAAAA,IACAe,yBAAyBA,CAAC;AAAA,MAAEC,gBAAAA;AAAAA,IAAAA,MAC1BJ,gBAAAA,EAAAA,cAAA,OAAA;AAAA,MAAKb,WAAW,wBAAwBiB,IAAiB,+BAA+B,EAAE;AAAA,IACtFL,GAAAA,gBAAAA,EAAAC,cAACK,GAAIC,EAAA;AAAA,MAACC,MAAK;AAAA,IAAA,GAAiBX,EAAqB,CAAA,CAAG,CACnD;AAAA,IAEPY,uBAAuBA,CAAC;AAAA,MAAElB,gBAAAA;AAAAA,IAAAA,MACxBU,gBAAAA,EAAAA,cAACS,GAAQ;AAAA,MAACC,OAAOrB,EAAoBC,CAAc;AAAA,IAAI,CAAA;AAAA,EAAA,CAE1D;AACH;"}
|
package/dist/index3.js
CHANGED
@@ -1,30 +1,30 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
1
|
+
var b = Object.getOwnPropertySymbols;
|
2
|
+
var y = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
|
3
|
+
var d = (e, a) => {
|
4
4
|
var o = {};
|
5
5
|
for (var r in e)
|
6
|
-
|
7
|
-
if (e != null &&
|
8
|
-
for (var r of
|
9
|
-
a.indexOf(r) < 0 &&
|
6
|
+
y.call(e, r) && a.indexOf(r) < 0 && (o[r] = e[r]);
|
7
|
+
if (e != null && b)
|
8
|
+
for (var r of b(e))
|
9
|
+
a.indexOf(r) < 0 && x.call(e, r) && (o[r] = e[r]);
|
10
10
|
return o;
|
11
11
|
};
|
12
|
-
import
|
13
|
-
import { Icon as
|
14
|
-
function
|
15
|
-
return
|
12
|
+
import n from "react";
|
13
|
+
import { Icon as g } from "./index5.js";
|
14
|
+
function v() {
|
15
|
+
return v = Object.assign ? Object.assign.bind() : function(e) {
|
16
16
|
for (var a = 1; a < arguments.length; a++) {
|
17
17
|
var o = arguments[a];
|
18
18
|
for (var r in o) ({}).hasOwnProperty.call(o, r) && (e[r] = o[r]);
|
19
19
|
}
|
20
20
|
return e;
|
21
|
-
},
|
21
|
+
}, v.apply(null, arguments);
|
22
22
|
}
|
23
|
-
const l = "focus-visible:outline outline-2 outline-[var(--color-blue-400)] outline-offset-2",
|
23
|
+
const l = "focus-visible:outline outline-2 outline-[var(--color-blue-400)] outline-offset-2", f = {
|
24
24
|
primary: "bg-[var(--color-gray-200)] text-[var(--color-gray-600)] pointer-events-none cursor-not-allowed",
|
25
25
|
secondary: "text-[var(--color-gray-600)] border border-[var(--color-gray-300)] pointer-events-none cursor-not-allowed",
|
26
26
|
link: "text-[var(--color-gray-600)] pointer-events-none cursor-not-allowed"
|
27
|
-
},
|
27
|
+
}, s = {
|
28
28
|
primary: `bg-[var(--color-blue-500)] text-[var(--color-white)] hover:bg-[var(--color-blue-600)] ${l}`,
|
29
29
|
secondary: `bg-[var(--color-white)] text-[var(--color-gray-800)] hover:bg-[var(--color-gray-50)] border border-[var(--color-gray-400)] hover:border-[var(--color-gray-500)] ${l}`,
|
30
30
|
"secondary-blue": `bg-[var(--color-white)] border border-[var(--color-blue-500)] text-[var(--color-blue-500)] hover:bg-[var(--color-blue-100)] ${l}`,
|
@@ -36,35 +36,31 @@ const l = "focus-visible:outline outline-2 outline-[var(--color-blue-400)] outli
|
|
36
36
|
sm: "px-3 py-1",
|
37
37
|
md: "px-4 py-2",
|
38
38
|
smRow: "px-3 py-0.5"
|
39
|
-
}, k = (
|
40
|
-
var
|
39
|
+
}, k = (p) => {
|
40
|
+
var c = p, {
|
41
41
|
type: e = "primary",
|
42
42
|
size: a = "md",
|
43
43
|
label: o = "",
|
44
|
-
|
45
|
-
iconPosition: c = "left",
|
44
|
+
iconPosition: r = "left",
|
46
45
|
disabled: u = !1,
|
47
|
-
className:
|
48
|
-
|
46
|
+
className: m = "",
|
47
|
+
iconProps: t = {
|
48
|
+
name: ""
|
49
|
+
}
|
50
|
+
} = c, h = d(c, [
|
49
51
|
"type",
|
50
52
|
"size",
|
51
53
|
"label",
|
52
|
-
"icon",
|
53
54
|
"iconPosition",
|
54
55
|
"disabled",
|
55
|
-
"className"
|
56
|
+
"className",
|
57
|
+
"iconProps"
|
56
58
|
]);
|
57
|
-
const
|
58
|
-
return /* @__PURE__ */
|
59
|
+
const i = e !== "link" ? s[a] : "";
|
60
|
+
return /* @__PURE__ */ n.createElement("button", v({
|
59
61
|
type: "button",
|
60
|
-
className: `rounded-[6px] text-base font-normal flex gap-1 items-center min-w-fit ${
|
61
|
-
},
|
62
|
-
name: r,
|
63
|
-
className: ""
|
64
|
-
}), o, r && c === "right" && /* @__PURE__ */ t.createElement(d, {
|
65
|
-
name: r,
|
66
|
-
className: ""
|
67
|
-
}));
|
62
|
+
className: `rounded-[6px] text-base font-normal flex gap-1 items-center min-w-fit ${i} ${u ? f[e] : s[e]} ${m}`
|
63
|
+
}, h), (t == null ? void 0 : t.name) && r === "left" && /* @__PURE__ */ n.createElement(g, t), o, (t == null ? void 0 : t.name) && r === "right" && /* @__PURE__ */ n.createElement(g, t));
|
68
64
|
};
|
69
65
|
export {
|
70
66
|
k as Button
|