se-design 1.0.92 → 1.0.93
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/share.svg +6 -0
- package/dist/components/OnboardingTour/index.d.ts +3 -0
- package/dist/index12.js +2 -2
- package/dist/index13.js +2 -2
- package/dist/index16.js +1 -1
- package/dist/index183.js +1 -1
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +1 -1
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +1 -1
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +1 -1
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +1 -1
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +1 -1
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +1 -1
- package/dist/index189.js.map +1 -1
- package/dist/index19.js +1 -1
- package/dist/index190.js +1 -1
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +2 -2
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +2 -2
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +1 -1
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +1 -1
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +2 -2
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +2 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +1 -1
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +1 -1
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +1 -1
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +1 -1
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +1 -1
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +1 -1
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +1 -1
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +1 -1
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +1 -1
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +2 -2
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +2 -2
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -2
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +2 -149
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +149 -9
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +8 -5
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +5 -42
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +40 -18
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +24 -0
- package/dist/index214.js.map +1 -0
- package/dist/index221.js +24 -68
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +75 -0
- package/dist/index222.js.map +1 -0
- package/dist/{index228.js → index229.js} +1 -1
- package/dist/{index228.js.map → index229.js.map} +1 -1
- package/dist/{index230.js → index231.js} +1 -1
- package/dist/{index230.js.map → index231.js.map} +1 -1
- package/dist/{index238.js → index239.js} +1 -1
- package/dist/{index238.js.map → index239.js.map} +1 -1
- package/dist/index24.js +1 -1
- package/dist/{index241.js → index242.js} +1 -1
- package/dist/{index241.js.map → index242.js.map} +1 -1
- package/dist/index251.js +169 -3
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +7 -0
- package/dist/index252.js.map +1 -0
- package/dist/index254.js +18 -9
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +9 -9
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +9 -4
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +5 -170
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +170 -11
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +11 -6
- package/dist/index259.js.map +1 -1
- package/dist/index26.js +1 -1
- package/dist/index260.js +5 -5
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +5 -37
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +38 -2
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +2 -8
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +7 -326
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +324 -47
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +50 -2
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +2 -76
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +65 -82
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +89 -48
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +51 -7
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +7 -4
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +4 -51
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +52 -2
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +2 -2
- package/dist/index275.js +5 -0
- package/dist/index275.js.map +1 -0
- package/dist/index29.js +2 -2
- package/dist/index30.js +1 -1
- package/dist/index31.js +1 -1
- package/dist/index34.js +1 -1
- package/dist/index36.js +1 -1
- package/dist/index37.js +1 -1
- package/dist/index38.js +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.js +2 -2
- package/dist/index41.js +1 -1
- package/dist/index44.js +1 -1
- package/dist/index46.js +1 -1
- package/dist/index51.js +2 -2
- package/dist/index54.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index57.js +1 -1
- package/dist/index58.js +1 -1
- package/dist/index6.js +39 -37
- package/dist/index6.js.map +1 -1
- package/dist/index62.js +1 -1
- package/dist/index66.js +1 -1
- package/dist/index67.js +32 -31
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +1 -1
- package/dist/index7.js +1 -1
- package/dist/index70.js +1 -1
- package/dist/index84.js +1 -1
- package/dist/index86.js +1 -1
- package/dist/index9.js +1 -1
- package/package.json +1 -1
- package/dist/index220.js +0 -31
- package/dist/index220.js.map +0 -1
- package/dist/index250.js +0 -173
- package/dist/index250.js.map +0 -1
- package/dist/index253.js +0 -22
- package/dist/index253.js.map +0 -1
package/dist/index273.js
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
|
-
|
|
1
|
+
import { __require as E } from "./index271.js";
|
|
2
|
+
import { __require as _ } from "./index272.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 < "u" && console.error(a);
|
|
14
|
+
try {
|
|
15
|
+
throw new Error(a);
|
|
16
|
+
} catch {
|
|
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 ?? "")
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return u.resetWarningCache = function() {
|
|
49
|
+
process.env.NODE_ENV !== "production" && (t = {});
|
|
50
|
+
}, f = u, f;
|
|
51
|
+
}
|
|
2
52
|
export {
|
|
3
|
-
|
|
53
|
+
P as __require
|
|
4
54
|
};
|
|
5
55
|
//# sourceMappingURL=index273.js.map
|
package/dist/index273.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index273.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index273.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","checkPropTypes","typeSpecs","values","location","componentName","getStack","typeSpecName","error","err","ex","stack","checkPropTypes_1"],"mappings":";;;;;;AASA,MAAIA,IAAe,WAAW;AAAA,EAAA;AAE9B,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,QAAIC,IAAuBC,EAAA,GACvBC,IAAqB,CAAA,GACrBC,IAAMC,EAAA;AAEV,IAAAL,IAAe,SAASM,GAAM;AAC5B,UAAIC,IAAU,cAAc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/dist/index275.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index275.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index29.js
CHANGED
|
@@ -2,8 +2,8 @@ import m, { useMemo as ue, useRef as h, useEffect as f, useCallback as me, useSt
|
|
|
2
2
|
import { Icon as fe } from "./index6.js";
|
|
3
3
|
import { getA11yNameAttributes as ye } from "./index86.js";
|
|
4
4
|
import { useFocusTrap as be } from "./index77.js";
|
|
5
|
-
import { useDismissOnEscape as pe } from "./
|
|
6
|
-
import { useFocusSentinel as he } from "./
|
|
5
|
+
import { useDismissOnEscape as pe } from "./index221.js";
|
|
6
|
+
import { useFocusSentinel as he } from "./index222.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
function E() {
|
|
9
9
|
return E = Object.assign ? Object.assign.bind() : function(g) {
|
package/dist/index30.js
CHANGED
|
@@ -2,7 +2,7 @@ import t, { useState as L, useMemo as z, useRef as O, useEffect as H } from "rea
|
|
|
2
2
|
import { Icon as A } from "./index6.js";
|
|
3
3
|
import { Popover as U } from "./index19.js";
|
|
4
4
|
import { MenuList as V } from "./index18.js";
|
|
5
|
-
import { useStableId as q } from "./
|
|
5
|
+
import { useStableId as q } from "./index212.js";
|
|
6
6
|
import "./index77.js";
|
|
7
7
|
import { useTabsA11y as G, getPanelId as J } from "./index78.js";
|
|
8
8
|
/* empty css */
|
package/dist/index31.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e, { forwardRef as K } from "react";
|
|
2
2
|
import { Icon as M } from "./index6.js";
|
|
3
3
|
import { Button as d } from "./index4.js";
|
|
4
|
-
import { useStableId as B } from "./
|
|
4
|
+
import { useStableId as B } from "./index212.js";
|
|
5
5
|
import { getRegionAttributes as Q } from "./index71.js";
|
|
6
6
|
import { useAccessiblePress as U } from "./index72.js";
|
|
7
7
|
import "./index77.js";
|
package/dist/index34.js
CHANGED
package/dist/index36.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e, { useState as h, useEffect as E } from "react";
|
|
2
2
|
import { Icon as N } from "./index6.js";
|
|
3
|
-
import { useStableId as $ } from "./
|
|
3
|
+
import { useStableId as $ } from "./index212.js";
|
|
4
4
|
import { getRegionAttributes as I } from "./index71.js";
|
|
5
5
|
import { useAccessiblePress as _ } from "./index72.js";
|
|
6
6
|
import "./index77.js";
|
package/dist/index37.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e, { useState as k, useEffect as w } from "react";
|
|
2
2
|
import { Icon as x } from "./index6.js";
|
|
3
|
-
import { useStableId as F } from "./
|
|
3
|
+
import { useStableId as F } from "./index212.js";
|
|
4
4
|
import { getA11yNameAttributes as P } from "./index86.js";
|
|
5
5
|
import { getRegionAttributes as V } from "./index71.js";
|
|
6
6
|
import { useAccessiblePress as q } from "./index72.js";
|
package/dist/index38.js
CHANGED
|
@@ -3,7 +3,7 @@ import a, { useState as w, useRef as $ } from "react";
|
|
|
3
3
|
import { Icon as A } from "./index6.js";
|
|
4
4
|
import { getA11yNameAttributes as B } from "./index86.js";
|
|
5
5
|
import "./index77.js";
|
|
6
|
-
import { useStableId as D } from "./
|
|
6
|
+
import { useStableId as D } from "./index212.js";
|
|
7
7
|
function c() {
|
|
8
8
|
return c = Object.assign ? Object.assign.bind() : function(r) {
|
|
9
9
|
for (var n = 1; n < arguments.length; n++) {
|
package/dist/index39.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Button as ee } from "./index4.js";
|
|
|
6
6
|
import { getA11yNameAttributes as Oe } from "./index86.js";
|
|
7
7
|
import "./index77.js";
|
|
8
8
|
import { useCombobox as Ae } from "./index73.js";
|
|
9
|
-
import { useStableId as te } from "./
|
|
9
|
+
import { useStableId as te } from "./index212.js";
|
|
10
10
|
import { announce as Re } from "./index80.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
function d() {
|
package/dist/index40.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "react";
|
|
2
|
-
import { useStableId as P } from "./
|
|
3
|
-
import { mergeIds as _ } from "./
|
|
2
|
+
import { useStableId as P } from "./index212.js";
|
|
3
|
+
import { mergeIds as _ } from "./index229.js";
|
|
4
4
|
import { getA11yNameAttributes as k } from "./index86.js";
|
|
5
5
|
import "./index77.js";
|
|
6
6
|
/* empty css */
|
package/dist/index41.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import a, { useState as d, useRef as $, useEffect as r, useMemo as D } from "react";
|
|
2
2
|
import { Icon as g } from "./index6.js";
|
|
3
3
|
import { LabelChip as F } from "./index11.js";
|
|
4
|
-
import { debounce as L } from "./
|
|
4
|
+
import { debounce as L } from "./index231.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
function z(p) {
|
|
7
7
|
const {
|
package/dist/index44.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import t, { useState as $, useRef as T } from "react";
|
|
2
2
|
import "./index77.js";
|
|
3
|
-
import { useDismissOnEscape as j } from "./
|
|
3
|
+
import { useDismissOnEscape as j } from "./index221.js";
|
|
4
4
|
import { Icon as g } from "./index6.js";
|
|
5
5
|
import { Button as A } from "./index4.js";
|
|
6
6
|
/* empty css */
|
package/dist/index46.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e, { useState as k, useRef as S, useCallback as P, useEffect as Y } from "react";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { Icon as x } from "./index6.js";
|
|
4
|
-
import { useStableId as Z } from "./
|
|
4
|
+
import { useStableId as Z } from "./index212.js";
|
|
5
5
|
import { getA11yNameAttributes as ee } from "./index86.js";
|
|
6
6
|
import "./index77.js";
|
|
7
7
|
import { useCombobox as te } from "./index73.js";
|
package/dist/index51.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import t, { useState as h, useRef as f, useCallback as g, useEffect as P } from "react";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import C from "./
|
|
3
|
+
import C from "./index239.js";
|
|
4
4
|
import { Icon as H } from "./index6.js";
|
|
5
|
-
import { useStableId as b } from "./
|
|
5
|
+
import { useStableId as b } from "./index212.js";
|
|
6
6
|
import { getA11yNameAttributes as J } from "./index86.js";
|
|
7
7
|
import "./index77.js";
|
|
8
8
|
import { useCombobox as le } from "./index73.js";
|
package/dist/index54.js
CHANGED
package/dist/index56.js
CHANGED
|
@@ -2,7 +2,7 @@ import r, { useState as S } from "react";
|
|
|
2
2
|
import { Button as z } from "./index4.js";
|
|
3
3
|
import { Icon as _ } from "./index6.js";
|
|
4
4
|
import { Dropdown as te } from "./index26.js";
|
|
5
|
-
import { useDatePickerA11y as Fe, formatDateId as Pe, getCellAriaLabel as Ce } from "./
|
|
5
|
+
import { useDatePickerA11y as Fe, formatDateId as Pe, getCellAriaLabel as Ce } from "./index251.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
function T() {
|
|
8
8
|
return T = Object.assign ? Object.assign.bind() : function(p) {
|
package/dist/index57.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import t from "react";
|
|
2
2
|
import { Icon as W } from "./index6.js";
|
|
3
|
-
import { useStableId as j } from "./
|
|
3
|
+
import { useStableId as j } from "./index212.js";
|
|
4
4
|
import { getA11yNameAttributes as q } from "./index86.js";
|
|
5
5
|
import "./index77.js";
|
|
6
6
|
/* empty css */
|
package/dist/index58.js
CHANGED
package/dist/index6.js
CHANGED
|
@@ -119,10 +119,11 @@ import Jo from "./index205.js";
|
|
|
119
119
|
import Ko from "./index206.js";
|
|
120
120
|
import Qo from "./index207.js";
|
|
121
121
|
import Uo from "./index208.js";
|
|
122
|
+
import Wo from "./index209.js";
|
|
122
123
|
import a from "react";
|
|
123
|
-
import { ReactSVG as
|
|
124
|
-
import { getA11yNameAttributes as
|
|
125
|
-
import { useAccessiblePress as
|
|
124
|
+
import { ReactSVG as Xo } from "./index210.js";
|
|
125
|
+
import { getA11yNameAttributes as Yo } from "./index86.js";
|
|
126
|
+
import { useAccessiblePress as Zo } from "./index72.js";
|
|
126
127
|
import "./index77.js";
|
|
127
128
|
function m() {
|
|
128
129
|
return m = Object.assign ? Object.assign.bind() : function(s) {
|
|
@@ -133,7 +134,7 @@ function m() {
|
|
|
133
134
|
return s;
|
|
134
135
|
}, m.apply(null, arguments);
|
|
135
136
|
}
|
|
136
|
-
const
|
|
137
|
+
const zo = /* @__PURE__ */ Object.assign({
|
|
137
138
|
"/src/assets/icons/ai-off.svg": L,
|
|
138
139
|
"/src/assets/icons/ai-re-run.svg": R,
|
|
139
140
|
"/src/assets/icons/ai-search.svg": F,
|
|
@@ -229,37 +230,38 @@ const Zo = /* @__PURE__ */ Object.assign({
|
|
|
229
230
|
"/src/assets/icons/rounded-plus.svg": ko,
|
|
230
231
|
"/src/assets/icons/search.svg": xo,
|
|
231
232
|
"/src/assets/icons/select-files.svg": Ao,
|
|
232
|
-
"/src/assets/icons/
|
|
233
|
-
"/src/assets/icons/shield.svg": wo,
|
|
234
|
-
"/src/assets/icons/
|
|
235
|
-
"/src/assets/icons/shipment.svg": Po,
|
|
236
|
-
"/src/assets/icons/
|
|
237
|
-
"/src/assets/icons/
|
|
238
|
-
"/src/assets/icons/
|
|
239
|
-
"/src/assets/icons/
|
|
240
|
-
"/src/assets/icons/
|
|
241
|
-
"/src/assets/icons/
|
|
242
|
-
"/src/assets/icons/sort-
|
|
243
|
-
"/src/assets/icons/sort.svg": jo,
|
|
244
|
-
"/src/assets/icons/
|
|
245
|
-
"/src/assets/icons/
|
|
246
|
-
"/src/assets/icons/
|
|
247
|
-
"/src/assets/icons/
|
|
248
|
-
"/src/assets/icons/
|
|
249
|
-
"/src/assets/icons/
|
|
250
|
-
"/src/assets/icons/
|
|
251
|
-
"/src/assets/icons/
|
|
252
|
-
"/src/assets/icons/
|
|
253
|
-
"/src/assets/icons/
|
|
254
|
-
"/src/assets/icons/
|
|
255
|
-
"/src/assets/icons/
|
|
256
|
-
"/src/assets/icons/
|
|
257
|
-
"/src/assets/icons/
|
|
233
|
+
"/src/assets/icons/share.svg": Io,
|
|
234
|
+
"/src/assets/icons/shield-with-tick.svg": wo,
|
|
235
|
+
"/src/assets/icons/shield.svg": yo,
|
|
236
|
+
"/src/assets/icons/shipment-private.svg": Po,
|
|
237
|
+
"/src/assets/icons/shipment.svg": No,
|
|
238
|
+
"/src/assets/icons/sidebar.svg": Co,
|
|
239
|
+
"/src/assets/icons/signature-field.svg": Oo,
|
|
240
|
+
"/src/assets/icons/signer.svg": $o,
|
|
241
|
+
"/src/assets/icons/slideout.svg": Eo,
|
|
242
|
+
"/src/assets/icons/sms.svg": So,
|
|
243
|
+
"/src/assets/icons/sort-asc.svg": To,
|
|
244
|
+
"/src/assets/icons/sort-desc.svg": jo,
|
|
245
|
+
"/src/assets/icons/sort.svg": Lo,
|
|
246
|
+
"/src/assets/icons/space.svg": Ro,
|
|
247
|
+
"/src/assets/icons/stamp-field.svg": Fo,
|
|
248
|
+
"/src/assets/icons/stop.svg": Bo,
|
|
249
|
+
"/src/assets/icons/success-check.svg": Do,
|
|
250
|
+
"/src/assets/icons/tag.svg": Mo,
|
|
251
|
+
"/src/assets/icons/text-field.svg": qo,
|
|
252
|
+
"/src/assets/icons/tick.svg": Go,
|
|
253
|
+
"/src/assets/icons/title-field.svg": Vo,
|
|
254
|
+
"/src/assets/icons/upload-csv.svg": Ho,
|
|
255
|
+
"/src/assets/icons/views.svg": Jo,
|
|
256
|
+
"/src/assets/icons/warning.svg": Ko,
|
|
257
|
+
"/src/assets/icons/webinar-widget.svg": Qo,
|
|
258
|
+
"/src/assets/icons/white-close.svg": Uo,
|
|
259
|
+
"/src/assets/icons/widget-demo-image.svg": Wo
|
|
258
260
|
}), l = (s, t, o, _) => {
|
|
259
261
|
t && s.hasAttribute("fill") && s.getAttribute("fill") !== "none" && s.setAttribute("fill", t), o && s.hasAttribute("stroke") && s.setAttribute("stroke", o), _ && s.hasAttribute("width") && s.setAttribute("width", _.toString()), _ && s.hasAttribute("height") && s.setAttribute("height", _.toString()), Array.from(s.children).forEach((e) => {
|
|
260
262
|
l(e, t, o);
|
|
261
263
|
});
|
|
262
|
-
},
|
|
264
|
+
}, s_ = /* @__PURE__ */ a.forwardRef((s, t) => {
|
|
263
265
|
const {
|
|
264
266
|
name: o = "",
|
|
265
267
|
id: _,
|
|
@@ -287,7 +289,7 @@ const Zo = /* @__PURE__ */ Object.assign({
|
|
|
287
289
|
225: "rotate-[225deg]",
|
|
288
290
|
270: "-rotate-90",
|
|
289
291
|
315: "-rotate-45"
|
|
290
|
-
}, v =
|
|
292
|
+
}, v = zo[`/src/assets/icons/${o}.svg`];
|
|
291
293
|
if (!v)
|
|
292
294
|
return console.error(`Icon "${o}" not found in ICON_MAP.`), null;
|
|
293
295
|
const i = typeof g == "function", C = f || o, c = s.tabIndex !== void 0, {
|
|
@@ -295,13 +297,13 @@ const Zo = /* @__PURE__ */ Object.assign({
|
|
|
295
297
|
role: $,
|
|
296
298
|
tabIndex: E,
|
|
297
299
|
isDisabled: S
|
|
298
|
-
} =
|
|
300
|
+
} = Zo({
|
|
299
301
|
isNative: !1,
|
|
300
302
|
onClick: i ? (r) => g?.(r) : void 0,
|
|
301
303
|
disabled: i ? y : !1,
|
|
302
304
|
tabIndex: s.tabIndex ?? 0,
|
|
303
305
|
stopPropagation: w
|
|
304
|
-
}), n =
|
|
306
|
+
}), n = Yo({
|
|
305
307
|
ariaLabel: C,
|
|
306
308
|
ariaLabelledBy: b,
|
|
307
309
|
ariaDescribedBy: p
|
|
@@ -325,7 +327,7 @@ const Zo = /* @__PURE__ */ Object.assign({
|
|
|
325
327
|
...n
|
|
326
328
|
}, {
|
|
327
329
|
"data-automation-id": s?.automationId
|
|
328
|
-
}), /* @__PURE__ */ a.createElement(
|
|
330
|
+
}), /* @__PURE__ */ a.createElement(Xo, {
|
|
329
331
|
src: v,
|
|
330
332
|
wrapper: "span",
|
|
331
333
|
beforeInjection: (r) => {
|
|
@@ -333,8 +335,8 @@ const Zo = /* @__PURE__ */ Object.assign({
|
|
|
333
335
|
}
|
|
334
336
|
}));
|
|
335
337
|
});
|
|
336
|
-
|
|
338
|
+
s_.displayName = "Icon";
|
|
337
339
|
export {
|
|
338
|
-
|
|
340
|
+
s_ as Icon
|
|
339
341
|
};
|
|
340
342
|
//# sourceMappingURL=index6.js.map
|
package/dist/index6.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index6.js","sources":["../src/components/Icon/index.tsx"],"sourcesContent":["// TODO: `applyAttributesToElement` recursion drops `size` for nested elements (pre-existing).\nimport React from 'react';\nimport { ReactSVG } from 'react-svg';\nimport { getA11yNameAttributes, useAccessiblePress } from '../../utils/a11y';\n\n// Dynamically import icons using Vite's asset handling\nconst ICON_MAP: Record<string, string> = (import.meta as any).glob('/src/assets/icons/*.svg', {\n eager: true,\n query: '?url',\n import: 'default'\n});\n\nexport type RotationTypes = '0' | '45' | '90' | '135' | '180' | '225' | '270' | '315';\n\nexport type IconProps = {\n name: string;\n id?: string;\n className?: string;\n onClick?: (e?: React.MouseEvent<HTMLElement>) => void;\n /**\n * Accessible name when Icon is interactive (onClick is provided).\n * If omitted, we fall back to `name` and warn in development.\n */\n ariaLabel?: string;\n /**\n * ID(s) of visible element(s) that label this Icon when interactive.\n * Preferred over ariaLabel when a visible label exists (keeps SR and visual text in sync).\n */\n ariaLabelledBy?: string;\n /**\n * ID(s) of element(s) that describe this Icon when interactive (additional context).\n */\n ariaDescribedBy?: string;\n /**\n * Toggle state when Icon is used as a button (e.g., show/hide sidebar).\n * Only applies when `onClick` is provided (interactive icon).\n */\n ariaPressed?: boolean;\n /**\n * Expansion state when Icon controls a collapsible region/panel.\n * Only applies when `onClick` is provided (interactive icon).\n */\n ariaExpanded?: boolean;\n /**\n * ID of the element controlled by this Icon (for aria-controls).\n * Only applies when `onClick` is provided (interactive icon).\n */\n ariaControls?: string;\n fill?: string;\n stroke?: string;\n rotation?: RotationTypes;\n size?: number;\n shouldStopPropagation?: boolean;\n automationId?: string;\n /**\n * Disables the icon interaction while keeping it visible to AT with aria-disabled=\"true\".\n * Only applies when `onClick` is provided (interactive icon).\n */\n disabled?: boolean;\n /**\n * Native HTML title attribute — renders as a browser tooltip on hover.\n * For mouse users only; does not replace ariaLabel for screen readers.\n */\n htmlTitle?: string;\n /**\n * Override tab order. Pass tabIndex={0} to make a non-interactive or disabled icon\n * focusable (e.g. for tooltip access). Overrides the hook's default when provided.\n */\n tabIndex?: number;\n};\n\nconst applyAttributesToElement = (element: Element, fill?: string, stroke?: string, size?: number) => {\n // Only modify existing attributes\n if (fill && element.hasAttribute('fill')) {\n const currentFill = element.getAttribute('fill');\n // Only update if the current fill is not \"none\"\n if (currentFill !== 'none') {\n element.setAttribute('fill', fill);\n }\n }\n\n if (stroke && element.hasAttribute('stroke')) {\n element.setAttribute('stroke', stroke);\n }\n\n if (size && element.hasAttribute('width')) {\n element.setAttribute('width', size.toString());\n }\n\n if (size && element.hasAttribute('height')) {\n element.setAttribute('height', size.toString());\n }\n\n // Recursively apply to all child elements\n Array.from(element.children).forEach((child) => {\n applyAttributesToElement(child, fill, stroke);\n });\n};\n\nexport const Icon = React.forwardRef<HTMLDivElement, IconProps>((props, ref) => {\n const {\n name = '',\n id,\n className = '',\n onClick,\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n ariaPressed,\n ariaExpanded,\n ariaControls,\n fill,\n stroke,\n rotation = '0',\n size,\n shouldStopPropagation = false,\n disabled = false,\n htmlTitle\n } = props;\n const iconRotationClasses = {\n '0': 'rotate-0',\n '45': 'rotate-45',\n '90': 'rotate-90',\n '135': 'rotate-[135deg]',\n '180': 'rotate-180',\n '225': 'rotate-[225deg]',\n '270': '-rotate-90',\n '315': '-rotate-45'\n };\n const src = ICON_MAP[`/src/assets/icons/${name}.svg`];\n\n if (!src) {\n console.error(`Icon \"${name}\" not found in ICON_MAP.`);\n return null;\n }\n\n const isInteractive = typeof onClick === 'function';\n const computedAriaLabel = ariaLabel || name;\n\n if (isInteractive && !ariaLabel && (import.meta as { env?: { DEV?: boolean } }).env?.DEV) {\n // eslint-disable-next-line no-console\n console.warn(\n `[se-design/Icon] Missing ariaLabel for clickable icon \"${name}\". ` +\n `Falling back to aria-label=\"${computedAriaLabel}\".`\n );\n }\n\n const hasTabIndex = props.tabIndex !== undefined;\n const { pressProps, role, tabIndex: hookTabIndex, isDisabled } = useAccessiblePress({\n isNative: false,\n onClick: isInteractive ? (e: React.MouseEvent<HTMLElement>) => onClick?.(e) : undefined,\n disabled: isInteractive ? disabled : false,\n tabIndex: props.tabIndex ?? 0,\n stopPropagation: shouldStopPropagation\n });\n\n // Compute accessible name/description props with correct precedence (aligns with Button/Link).\n const accessibleNameProps = getA11yNameAttributes({\n ariaLabel: computedAriaLabel,\n ariaLabelledBy,\n ariaDescribedBy\n });\n\n const finalTabIndex = hasTabIndex ? props.tabIndex : hookTabIndex;\n const interactiveProps = isInteractive\n ? {\n ...pressProps,\n role,\n tabIndex: finalTabIndex,\n ...accessibleNameProps,\n 'aria-pressed': ariaPressed,\n 'aria-expanded': ariaExpanded,\n 'aria-controls': ariaControls || undefined\n }\n : undefined;\n\n return (\n <div\n ref={ref}\n id={id}\n className={`se-design-svg-wrapper transition-transform duration-250 ease-linear rounded-[3px] ${\n isInteractive ? `${isDisabled ? 'opacity-50 cursor-default' : 'cursor-pointer focus-outline'}` : ''\n } ${className} ${iconRotationClasses[rotation]}`}\n aria-hidden={!isInteractive && !hasTabIndex ? 'true' : undefined}\n title={htmlTitle}\n {...interactiveProps}\n {...(!isInteractive && hasTabIndex && { tabIndex: props.tabIndex, ...accessibleNameProps })}\n data-automation-id={props?.automationId}\n >\n <ReactSVG\n src={src}\n wrapper=\"span\"\n beforeInjection={(svg) => {\n svg.setAttribute('aria-hidden', 'true');\n svg.setAttribute('role', 'none');\n applyAttributesToElement(svg, fill, stroke, size);\n }}\n />\n </div>\n );\n});\n\nIcon.displayName = 'Icon';\n"],"names":["ICON_MAP","import","applyAttributesToElement","element","fill","stroke","size","hasAttribute","getAttribute","setAttribute","toString","Array","from","children","forEach","child","Icon","React","forwardRef","props","ref","name","id","className","onClick","ariaLabel","ariaLabelledBy","ariaDescribedBy","ariaPressed","ariaExpanded","ariaControls","rotation","shouldStopPropagation","disabled","htmlTitle","iconRotationClasses","src","console","error","isInteractive","computedAriaLabel","hasTabIndex","tabIndex","undefined","pressProps","role","hookTabIndex","isDisabled","useAccessiblePress","isNative","e","stopPropagation","accessibleNameProps","getA11yNameAttributes","finalTabIndex","interactiveProps","createElement","_extends","title","automationId","ReactSVG","wrapper","beforeInjection","svg","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAMA,KAAoCC,uBAAAA,OAAAA;AAAAA,EAAAA,gCAAAA;AAAAA,EAAAA,mCAAAA;AAAAA,EAAAA,mCAAAA;AAAAA,EAAAA,kCAAAA;AAAAA,EAAAA,4BAAAA;AAAAA,EAAAA,mCAAAA;AAAAA,EAAAA,oCAAAA;AAAAA,EAAAA,oCAAAA;AAAAA,EAAAA,8BAAAA;AAAAA,EAAAA,yCAAAA;AAAAA,EAAAA,2CAAAA;AAAAA,EAAAA,8BAAAA;AAAAA,EAAAA,sCAAAA;AAAAA,EAAAA,8BAAAA;AAAAA,EAAAA,iDAAAA;AAAAA,EAAAA,gDAAAA;AAAAA,EAAAA,2CAAAA;AAAAA,EAAAA,wCAAAA;AAAAA,EAAAA,uCAAAA;AAAAA,EAAAA,6CAAAA;AAAAA,EAAAA,8CAAAA;AAAAA,EAAAA,6CAAAA;AAAAA,EAAAA,wCAAAA;AAAAA,EAAAA,uCAAAA;AAAAA,EAAAA,wCAAAA;AAAAA,EAAAA,mCAAAA;AAAAA,EAAAA,iCAAAA;AAAAA,EAAAA,+BAAAA;AAAAA,EAAAA,+BAAAA;AAAA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c;"}
|
|
1
|
+
{"version":3,"file":"index6.js","sources":["../src/components/Icon/index.tsx"],"sourcesContent":["// TODO: `applyAttributesToElement` recursion drops `size` for nested elements (pre-existing).\nimport React from 'react';\nimport { ReactSVG } from 'react-svg';\nimport { getA11yNameAttributes, useAccessiblePress } from '../../utils/a11y';\n\n// Dynamically import icons using Vite's asset handling\nconst ICON_MAP: Record<string, string> = (import.meta as any).glob('/src/assets/icons/*.svg', {\n eager: true,\n query: '?url',\n import: 'default'\n});\n\nexport type RotationTypes = '0' | '45' | '90' | '135' | '180' | '225' | '270' | '315';\n\nexport type IconProps = {\n name: string;\n id?: string;\n className?: string;\n onClick?: (e?: React.MouseEvent<HTMLElement>) => void;\n /**\n * Accessible name when Icon is interactive (onClick is provided).\n * If omitted, we fall back to `name` and warn in development.\n */\n ariaLabel?: string;\n /**\n * ID(s) of visible element(s) that label this Icon when interactive.\n * Preferred over ariaLabel when a visible label exists (keeps SR and visual text in sync).\n */\n ariaLabelledBy?: string;\n /**\n * ID(s) of element(s) that describe this Icon when interactive (additional context).\n */\n ariaDescribedBy?: string;\n /**\n * Toggle state when Icon is used as a button (e.g., show/hide sidebar).\n * Only applies when `onClick` is provided (interactive icon).\n */\n ariaPressed?: boolean;\n /**\n * Expansion state when Icon controls a collapsible region/panel.\n * Only applies when `onClick` is provided (interactive icon).\n */\n ariaExpanded?: boolean;\n /**\n * ID of the element controlled by this Icon (for aria-controls).\n * Only applies when `onClick` is provided (interactive icon).\n */\n ariaControls?: string;\n fill?: string;\n stroke?: string;\n rotation?: RotationTypes;\n size?: number;\n shouldStopPropagation?: boolean;\n automationId?: string;\n /**\n * Disables the icon interaction while keeping it visible to AT with aria-disabled=\"true\".\n * Only applies when `onClick` is provided (interactive icon).\n */\n disabled?: boolean;\n /**\n * Native HTML title attribute — renders as a browser tooltip on hover.\n * For mouse users only; does not replace ariaLabel for screen readers.\n */\n htmlTitle?: string;\n /**\n * Override tab order. Pass tabIndex={0} to make a non-interactive or disabled icon\n * focusable (e.g. for tooltip access). Overrides the hook's default when provided.\n */\n tabIndex?: number;\n};\n\nconst applyAttributesToElement = (element: Element, fill?: string, stroke?: string, size?: number) => {\n // Only modify existing attributes\n if (fill && element.hasAttribute('fill')) {\n const currentFill = element.getAttribute('fill');\n // Only update if the current fill is not \"none\"\n if (currentFill !== 'none') {\n element.setAttribute('fill', fill);\n }\n }\n\n if (stroke && element.hasAttribute('stroke')) {\n element.setAttribute('stroke', stroke);\n }\n\n if (size && element.hasAttribute('width')) {\n element.setAttribute('width', size.toString());\n }\n\n if (size && element.hasAttribute('height')) {\n element.setAttribute('height', size.toString());\n }\n\n // Recursively apply to all child elements\n Array.from(element.children).forEach((child) => {\n applyAttributesToElement(child, fill, stroke);\n });\n};\n\nexport const Icon = React.forwardRef<HTMLDivElement, IconProps>((props, ref) => {\n const {\n name = '',\n id,\n className = '',\n onClick,\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n ariaPressed,\n ariaExpanded,\n ariaControls,\n fill,\n stroke,\n rotation = '0',\n size,\n shouldStopPropagation = false,\n disabled = false,\n htmlTitle\n } = props;\n const iconRotationClasses = {\n '0': 'rotate-0',\n '45': 'rotate-45',\n '90': 'rotate-90',\n '135': 'rotate-[135deg]',\n '180': 'rotate-180',\n '225': 'rotate-[225deg]',\n '270': '-rotate-90',\n '315': '-rotate-45'\n };\n const src = ICON_MAP[`/src/assets/icons/${name}.svg`];\n\n if (!src) {\n console.error(`Icon \"${name}\" not found in ICON_MAP.`);\n return null;\n }\n\n const isInteractive = typeof onClick === 'function';\n const computedAriaLabel = ariaLabel || name;\n\n if (isInteractive && !ariaLabel && (import.meta as { env?: { DEV?: boolean } }).env?.DEV) {\n // eslint-disable-next-line no-console\n console.warn(\n `[se-design/Icon] Missing ariaLabel for clickable icon \"${name}\". ` +\n `Falling back to aria-label=\"${computedAriaLabel}\".`\n );\n }\n\n const hasTabIndex = props.tabIndex !== undefined;\n const { pressProps, role, tabIndex: hookTabIndex, isDisabled } = useAccessiblePress({\n isNative: false,\n onClick: isInteractive ? (e: React.MouseEvent<HTMLElement>) => onClick?.(e) : undefined,\n disabled: isInteractive ? disabled : false,\n tabIndex: props.tabIndex ?? 0,\n stopPropagation: shouldStopPropagation\n });\n\n // Compute accessible name/description props with correct precedence (aligns with Button/Link).\n const accessibleNameProps = getA11yNameAttributes({\n ariaLabel: computedAriaLabel,\n ariaLabelledBy,\n ariaDescribedBy\n });\n\n const finalTabIndex = hasTabIndex ? props.tabIndex : hookTabIndex;\n const interactiveProps = isInteractive\n ? {\n ...pressProps,\n role,\n tabIndex: finalTabIndex,\n ...accessibleNameProps,\n 'aria-pressed': ariaPressed,\n 'aria-expanded': ariaExpanded,\n 'aria-controls': ariaControls || undefined\n }\n : undefined;\n\n return (\n <div\n ref={ref}\n id={id}\n className={`se-design-svg-wrapper transition-transform duration-250 ease-linear rounded-[3px] ${\n isInteractive ? `${isDisabled ? 'opacity-50 cursor-default' : 'cursor-pointer focus-outline'}` : ''\n } ${className} ${iconRotationClasses[rotation]}`}\n aria-hidden={!isInteractive && !hasTabIndex ? 'true' : undefined}\n title={htmlTitle}\n {...interactiveProps}\n {...(!isInteractive && hasTabIndex && { tabIndex: props.tabIndex, ...accessibleNameProps })}\n data-automation-id={props?.automationId}\n >\n <ReactSVG\n src={src}\n wrapper=\"span\"\n beforeInjection={(svg) => {\n svg.setAttribute('aria-hidden', 'true');\n svg.setAttribute('role', 'none');\n applyAttributesToElement(svg, fill, stroke, size);\n }}\n />\n </div>\n );\n});\n\nIcon.displayName = 'Icon';\n"],"names":["ICON_MAP","import","applyAttributesToElement","element","fill","stroke","size","hasAttribute","getAttribute","setAttribute","toString","Array","from","children","forEach","child","Icon","React","forwardRef","props","ref","name","id","className","onClick","ariaLabel","ariaLabelledBy","ariaDescribedBy","ariaPressed","ariaExpanded","ariaControls","rotation","shouldStopPropagation","disabled","htmlTitle","iconRotationClasses","src","console","error","isInteractive","computedAriaLabel","hasTabIndex","tabIndex","undefined","pressProps","role","hookTabIndex","isDisabled","useAccessiblePress","isNative","e","stopPropagation","accessibleNameProps","getA11yNameAttributes","finalTabIndex","interactiveProps","createElement","_extends","title","automationId","ReactSVG","wrapper","beforeInjection","svg","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAMA,KAAoCC,uBAAAA,OAAAA;AAAAA,EAAAA,gCAAAA;AAAAA,EAAAA,mCAAAA;AAAAA,EAAAA,mCAAAA;AAAAA,EAAAA,kCAAAA;AAAAA,EAAAA,4BAAAA;AAAAA,EAAAA,mCAAAA;AAAAA,EAAAA,oCAAAA;AAAAA,EAAAA,oCAAAA;AAAAA,EAAAA,8BAAAA;AAAAA,EAAAA,yCAAAA;AAAAA,EAAAA,2CAAAA;AAAAA,EAAAA,8BAAAA;AAAAA,EAAAA,sCAAAA;AAAAA,EAAAA,8BAAAA;AAAAA,EAAAA,iDAAAA;AAAAA,EAAAA,gDAAAA;AAAAA,EAAAA,2CAAAA;AAAAA,EAAAA,wCAAAA;AAAAA,EAAAA,uCAAAA;AAAAA,EAAAA,6CAAAA;AAAAA,EAAAA,8CAAAA;AAAAA,EAAAA,6CAAAA;AAAAA,EAAAA,wCAAAA;AAAAA,EAAAA,uCAAAA;AAAAA,EAAAA,wCAAAA;AAAAA,EAAAA,mCAAAA;AAAAA,EAAAA,iCAAAA;AAAAA,EAAAA,+BAAAA;AAAAA,EAAAA,+BAAAA;AAAAA,EAAAA,qCAAAA;AAAAA,EAAAA,wCAAAA;AAAAA,EAAAA,iCAAAA;AAAAA,EAAAA,kCAAAA;AAAAA,EAAAA,6BAAAA;AAAAA,EAAAA,oCAAAA;AAAAA,EAAAA,gCAAAA;AAAAA,EAAAA,kCAAAA;AAAAA,EAAAA,iCAAAA;AAAAA,EAAAA,kCAA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AC,iBAAAA;AAAAA,EAAAA,CACD,GAEK2B,IAAgBb,IAActB,EAAMuB,WAAWI,GAC/CS,IAAmBhB,IACrB;AAAA,IACE,GAAGK;AAAAA,IACHC,MAAAA;AAAAA,IACAH,UAAUY;AAAAA,IACV,GAAGF;AAAAA,IACH,gBAAgBxB;AAAAA,IAChB,iBAAiBC;AAAAA,IACjB,iBAAiBC,KAAgBa;AAAAA,EAAAA,IAEnCA;AAEJ,SACE1B,gBAAAA,EAAAuC,cAAA,OAAAC,EAAA;AAAA,IACErC,KAAAA;AAAAA,IACAE,IAAAA;AAAAA,IACAC,WAAW,qFACTgB,IAAgB,GAAGQ,IAAa,8BAA8B,8BAA8B,KAAK,EAAE,IACjGxB,CAAS,IAAIY,EAAoBJ,CAAQ,CAAC;AAAA,IAC9C,eAAa,CAACQ,KAAiB,CAACE,IAAc,SAASE;AAAAA,IACvDe,OAAOxB;AAAAA,EAAAA,GACHqB,GACC,CAAChB,KAAiBE,KAAe;AAAA,IAAEC,UAAUvB,EAAMuB;AAAAA,IAAU,GAAGU;AAAAA,EAAAA,GAAqB;AAAA,IAC1F,sBAAoBjC,GAAOwC;AAAAA,EAAAA,CAAa,GAExC1C,gBAAAA,EAAAuC,cAACI,IAAQ;AAAA,IACPxB,KAAAA;AAAAA,IACAyB,SAAQ;AAAA,IACRC,iBAAkBC,CAAAA,MAAQ;AACxBA,MAAAA,EAAItD,aAAa,eAAe,MAAM,GACtCsD,EAAItD,aAAa,QAAQ,MAAM,GAC/BP,EAAyB6D,GAAK3D,GAAMC,GAAQC,CAAI;AAAA,IAClD;AAAA,EAAA,CACD,CACE;AAET,CAAC;AAEDU,GAAKgD,cAAc;"}
|
package/dist/index62.js
CHANGED
package/dist/index66.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import n, { useState as u, useCallback as y, useEffect as P } from "react";
|
|
2
2
|
import { Popover as I } from "./index19.js";
|
|
3
|
-
import { useStableId as k } from "./
|
|
3
|
+
import { useStableId as k } from "./index212.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
function p() {
|
|
6
6
|
return p = Object.assign ? Object.assign.bind() : function(r) {
|
package/dist/index67.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import o, { useState as
|
|
1
|
+
import o, { useState as D, useRef as _, useCallback as m, useEffect as p } from "react";
|
|
2
2
|
import { Button as L } from "./index4.js";
|
|
3
|
-
import { Tooltip as
|
|
3
|
+
import { Tooltip as U } from "./index16.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
const u = {
|
|
6
6
|
gotIt: "got_it",
|
|
7
7
|
finish: "finish",
|
|
8
8
|
next: "next",
|
|
9
9
|
back: "back"
|
|
10
|
-
},
|
|
10
|
+
}, X = ({
|
|
11
11
|
steps: e = [],
|
|
12
12
|
screenBaseElementSelector: T = "",
|
|
13
13
|
handleCloseProductTour: d,
|
|
14
14
|
tourType: g = "",
|
|
15
15
|
automationId: f = "onboarding-tour",
|
|
16
16
|
highlightBorderRadius: E = 6,
|
|
17
|
-
|
|
17
|
+
customClassName: A = "",
|
|
18
|
+
labels: H
|
|
18
19
|
}) => {
|
|
19
|
-
const [t, k] =
|
|
20
|
-
next:
|
|
21
|
-
gotIt:
|
|
22
|
-
finish:
|
|
23
|
-
skip:
|
|
24
|
-
stepInfo:
|
|
25
|
-
} =
|
|
20
|
+
const [t, k] = D(0), c = _(null), l = _(null), {
|
|
21
|
+
next: P = "Next",
|
|
22
|
+
gotIt: M = "Got It",
|
|
23
|
+
finish: W = "Finish",
|
|
24
|
+
skip: O = "Skip tour",
|
|
25
|
+
stepInfo: V = "Step {step} of {total}"
|
|
26
|
+
} = H || {}, s = document.querySelector(T), y = m(() => {
|
|
26
27
|
let n;
|
|
27
28
|
if (t >= e.length)
|
|
28
29
|
return n;
|
|
@@ -40,24 +41,24 @@ const u = {
|
|
|
40
41
|
const x = document.querySelector(e[t]?.targetElementSelector);
|
|
41
42
|
if (!x || !c.current || !l.current)
|
|
42
43
|
return;
|
|
43
|
-
const a = x.getBoundingClientRect(),
|
|
44
|
-
c.current.style.height = `${
|
|
44
|
+
const a = x.getBoundingClientRect(), w = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
|
|
45
|
+
c.current.style.height = `${w}px`;
|
|
45
46
|
const h = e[t]?.targetElementGap || {
|
|
46
47
|
horizontal: 0,
|
|
47
48
|
vertical: 0
|
|
48
|
-
}, S = E * 2,
|
|
49
|
-
<svg width="${
|
|
49
|
+
}, S = E * 2, N = a.left - h.horizontal, I = a.top + window.scrollY - h.vertical, F = a.right + h.horizontal, G = a.bottom + window.scrollY + h.vertical, q = F - N, B = G - I, C = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth), R = encodeURIComponent(`
|
|
50
|
+
<svg width="${C}" height="${w}" xmlns="http://www.w3.org/2000/svg">
|
|
50
51
|
<defs>
|
|
51
52
|
<mask id="highlight-mask-${t}">
|
|
52
|
-
<rect x="0" y="0" width="${
|
|
53
|
-
<rect x="${
|
|
53
|
+
<rect x="0" y="0" width="${C}" height="${w}" fill="white"/>
|
|
54
|
+
<rect x="${N}" y="${I}" width="${q}" height="${B}" rx="${S}" ry="${S}" fill="black"/>
|
|
54
55
|
</mask>
|
|
55
56
|
</defs>
|
|
56
57
|
</svg>
|
|
57
58
|
`);
|
|
58
|
-
c.current.style.maskImage = `url("data:image/svg+xml,${
|
|
59
|
+
c.current.style.maskImage = `url("data:image/svg+xml,${R}#highlight-mask-${t}")`, c.current.style.webkitMaskImage = `url("data:image/svg+xml,${R}#highlight-mask-${t}")`, l.current.style.top = `${a.top}px`, l.current.style.left = `${a.left}px`, l.current.style.width = `${a.width}px`, l.current.style.height = `${a.height}px`, l.current.style.borderRadius = `${E}px`;
|
|
59
60
|
}, 50), n;
|
|
60
|
-
}, [t, e]),
|
|
61
|
+
}, [t, e]), z = m(() => {
|
|
61
62
|
d(), s && s.scrollTo({
|
|
62
63
|
top: 0,
|
|
63
64
|
behavior: "smooth"
|
|
@@ -78,14 +79,14 @@ const u = {
|
|
|
78
79
|
}, [t, e, g]), b = m((n) => {
|
|
79
80
|
(n.keyCode === 37 || n.key === "ArrowLeft") && t > 0 && $(), (n.keyCode === 39 || n.key === "ArrowRight") && v();
|
|
80
81
|
}, [t, v, $]);
|
|
81
|
-
return
|
|
82
|
+
return p(() => (window.addEventListener("keydown", b), () => {
|
|
82
83
|
window.removeEventListener("keydown", b);
|
|
83
|
-
}), [b]),
|
|
84
|
+
}), [b]), p(() => {
|
|
84
85
|
let n;
|
|
85
86
|
return t < e.length && (n = y()), () => {
|
|
86
87
|
n && clearTimeout(n);
|
|
87
88
|
};
|
|
88
|
-
}, [t, e, y]),
|
|
89
|
+
}, [t, e, y]), p(() => {
|
|
89
90
|
if (t < e.length && c.current) {
|
|
90
91
|
const n = c.current, i = (r) => {
|
|
91
92
|
r.preventDefault(), r.stopPropagation();
|
|
@@ -104,9 +105,9 @@ const u = {
|
|
|
104
105
|
className: "se-design-onboarding-tour-overlay",
|
|
105
106
|
ref: c,
|
|
106
107
|
"data-automation-id": `${f}-overlay`
|
|
107
|
-
}), /* @__PURE__ */ o.createElement(
|
|
108
|
+
}), /* @__PURE__ */ o.createElement(U, {
|
|
108
109
|
content: /* @__PURE__ */ o.createElement("div", {
|
|
109
|
-
className:
|
|
110
|
+
className: `se-design-onboarding-tour-tooltip-content ${A}`
|
|
110
111
|
}, e[t]?.content?.illustration && /* @__PURE__ */ o.createElement("img", {
|
|
111
112
|
src: e[t].content.illustration,
|
|
112
113
|
className: "se-design-onboarding-tour-illustration",
|
|
@@ -114,26 +115,26 @@ const u = {
|
|
|
114
115
|
}), /* @__PURE__ */ o.createElement("div", {
|
|
115
116
|
className: "se-design-onboarding-tour-content"
|
|
116
117
|
}, e[t]?.content?.title && /* @__PURE__ */ o.createElement("p", {
|
|
117
|
-
className:
|
|
118
|
+
className: `se-design-onboarding-tour-title ${e[t].content.titleClassName || ""}`
|
|
118
119
|
}, e[t].content.title), e[t]?.content?.description && /* @__PURE__ */ o.createElement("p", {
|
|
119
|
-
className:
|
|
120
|
+
className: `se-design-onboarding-tour-description ${e[t].content.descriptionClassName || ""}`
|
|
120
121
|
}, e[t].content.description)), /* @__PURE__ */ o.createElement("div", {
|
|
121
122
|
className: "se-design-onboarding-tour-actions"
|
|
122
123
|
}, e.length > 1 && /* @__PURE__ */ o.createElement("span", {
|
|
123
124
|
className: "steps"
|
|
124
|
-
},
|
|
125
|
+
}, V.replace("{step}", `${t + 1}`).replace("{total}", `${e.length}`)), /* @__PURE__ */ o.createElement("div", {
|
|
125
126
|
className: "btns-container"
|
|
126
127
|
}, t !== e.length - 1 && /* @__PURE__ */ o.createElement(L, {
|
|
127
128
|
theme: "white",
|
|
128
129
|
type: "link",
|
|
129
|
-
label:
|
|
130
|
+
label: O,
|
|
130
131
|
automationId: `${f}-skip-button`,
|
|
131
|
-
onClick:
|
|
132
|
+
onClick: z
|
|
132
133
|
}), /* @__PURE__ */ o.createElement(L, {
|
|
133
134
|
theme: "white",
|
|
134
135
|
type: "primary",
|
|
135
136
|
size: "sm",
|
|
136
|
-
label: t === e.length - 1 ? e.length === 1 ?
|
|
137
|
+
label: t === e.length - 1 ? e.length === 1 ? M : W : P,
|
|
137
138
|
automationId: `${f}-next-button`,
|
|
138
139
|
onClick: v
|
|
139
140
|
})))),
|
|
@@ -150,6 +151,6 @@ const u = {
|
|
|
150
151
|
}));
|
|
151
152
|
};
|
|
152
153
|
export {
|
|
153
|
-
|
|
154
|
+
X as OnboardingTour
|
|
154
155
|
};
|
|
155
156
|
//# sourceMappingURL=index67.js.map
|