@x15ventures/x15-ui-library 3.16.0 → 3.17.0
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/cjs/autoGenerated/libraryThemes.js +12 -12
- package/dist/cjs/autoGenerated/libraryThemes.js.map +1 -1
- package/dist/cjs/autoGenerated/libraryThemes.json +12 -12
- package/dist/cjs/components/design/dialog/Dialog.js +3 -1
- package/dist/cjs/components/design/dialog/Dialog.js.map +1 -1
- package/dist/cjs/components/design/dialog/dialog.css +5 -0
- package/dist/cjs/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.js +88 -0
- package/dist/cjs/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.js.map +1 -0
- package/dist/cjs/components/design/progressIndicators/circularProgressIndicator/circularProgressIndicator.css +301 -0
- package/dist/cjs/components/design/skeleton/skeleton.css +17 -12
- package/dist/cjs/components/design/tooltip/Tooltip.js +42 -5
- package/dist/cjs/components/design/tooltip/Tooltip.js.map +1 -1
- package/dist/cjs/components/design/tooltip/index.js +6 -0
- package/dist/cjs/components/design/tooltip/index.js.map +1 -1
- package/dist/cjs/components/design/tooltip/tooltip.css +18 -7
- package/dist/cjs/components/index.js +7 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/hooks/InteractiveHostFocus.js +62 -0
- package/dist/cjs/hooks/InteractiveHostFocus.js.map +1 -0
- package/dist/cjs/hooks/index.js +7 -0
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/index.js +22 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/styles/index.css +7 -3
- package/dist/cjs/styles/variables/cssVars/_darkModeVariables.css +2 -0
- package/dist/cjs/styles/variables/cssVars/_designVariables.css +5 -3
- package/dist/cjs/widgets/index.js +14 -0
- package/dist/cjs/widgets/index.js.map +1 -0
- package/dist/cjs/widgets/processLauncher/ProcessLauncher.js +278 -0
- package/dist/cjs/widgets/processLauncher/ProcessLauncher.js.map +1 -0
- package/dist/cjs/widgets/processLauncher/index.js +13 -0
- package/dist/cjs/widgets/processLauncher/index.js.map +1 -0
- package/dist/cjs/widgets/processLauncher/processLauncher.interfaces.js +6 -0
- package/dist/cjs/widgets/processLauncher/processLauncher.interfaces.js.map +1 -0
- package/dist/components/design/dialog/Dialog.d.ts.map +1 -1
- package/dist/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.d.ts +17 -0
- package/dist/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.d.ts.map +1 -0
- package/dist/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.test.d.ts +5 -0
- package/dist/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.test.d.ts.map +1 -0
- package/dist/components/design/tooltip/Tooltip.d.ts +13 -0
- package/dist/components/design/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/design/tooltip/Tooltip.test.d.ts +1 -1
- package/dist/components/design/tooltip/Tooltip.test.d.ts.map +1 -1
- package/dist/components/design/tooltip/index.d.ts +1 -1
- package/dist/components/design/tooltip/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/esm/autoGenerated/libraryThemes.js +12 -12
- package/dist/esm/autoGenerated/libraryThemes.js.map +1 -1
- package/dist/esm/autoGenerated/libraryThemes.json +12 -12
- package/dist/esm/components/design/dialog/Dialog.js +3 -1
- package/dist/esm/components/design/dialog/Dialog.js.map +1 -1
- package/dist/esm/components/design/dialog/dialog.css +5 -0
- package/dist/esm/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.js +81 -0
- package/dist/esm/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.js.map +1 -0
- package/dist/esm/components/design/progressIndicators/circularProgressIndicator/circularProgressIndicator.css +301 -0
- package/dist/esm/components/design/skeleton/skeleton.css +17 -12
- package/dist/esm/components/design/tooltip/Tooltip.js +40 -4
- package/dist/esm/components/design/tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/design/tooltip/index.js +1 -1
- package/dist/esm/components/design/tooltip/index.js.map +1 -1
- package/dist/esm/components/design/tooltip/tooltip.css +18 -7
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/hooks/InteractiveHostFocus.js +56 -0
- package/dist/esm/hooks/InteractiveHostFocus.js.map +1 -0
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/styles/index.css +7 -3
- package/dist/esm/styles/variables/cssVars/_darkModeVariables.css +2 -0
- package/dist/esm/styles/variables/cssVars/_designVariables.css +5 -3
- package/dist/esm/widgets/index.js +4 -0
- package/dist/esm/widgets/index.js.map +1 -0
- package/dist/esm/widgets/processLauncher/ProcessLauncher.js +269 -0
- package/dist/esm/widgets/processLauncher/ProcessLauncher.js.map +1 -0
- package/dist/esm/widgets/processLauncher/index.js +2 -0
- package/dist/esm/widgets/processLauncher/index.js.map +1 -0
- package/dist/esm/widgets/processLauncher/processLauncher.interfaces.js +2 -0
- package/dist/esm/widgets/processLauncher/processLauncher.interfaces.js.map +1 -0
- package/dist/hooks/InteractiveHostFocus.d.ts +12 -0
- package/dist/hooks/InteractiveHostFocus.d.ts.map +1 -0
- package/dist/hooks/InteractiveHostFocus.test.d.ts +5 -0
- package/dist/hooks/InteractiveHostFocus.test.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/package.json +1 -1
- package/dist/widgets/index.d.ts +3 -0
- package/dist/widgets/index.d.ts.map +1 -0
- package/dist/widgets/processLauncher/ProcessLauncher.d.ts +21 -0
- package/dist/widgets/processLauncher/ProcessLauncher.d.ts.map +1 -0
- package/dist/widgets/processLauncher/ProcessLauncher.test.d.ts +5 -0
- package/dist/widgets/processLauncher/ProcessLauncher.test.d.ts.map +1 -0
- package/dist/widgets/processLauncher/index.d.ts +4 -0
- package/dist/widgets/processLauncher/index.d.ts.map +1 -0
- package/dist/widgets/processLauncher/processLauncher.interfaces.d.ts +45 -0
- package/dist/widgets/processLauncher/processLauncher.interfaces.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -17,8 +17,8 @@ const libraryThemes = exports.libraryThemes = {
|
|
|
17
17
|
"map": "index.min.css.map"
|
|
18
18
|
},
|
|
19
19
|
"versioned": {
|
|
20
|
-
"css": "index.min.3.
|
|
21
|
-
"map": "index.min.3.
|
|
20
|
+
"css": "index.min.3.17.0.css",
|
|
21
|
+
"map": "index.min.3.17.0.css.map"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"cba": {
|
|
@@ -32,8 +32,8 @@ const libraryThemes = exports.libraryThemes = {
|
|
|
32
32
|
"map": "cba.min.css.map"
|
|
33
33
|
},
|
|
34
34
|
"versioned": {
|
|
35
|
-
"css": "cba.min.3.
|
|
36
|
-
"map": "cba.min.3.
|
|
35
|
+
"css": "cba.min.3.17.0.css",
|
|
36
|
+
"map": "cba.min.3.17.0.css.map"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"creditSavvy": {
|
|
@@ -47,8 +47,8 @@ const libraryThemes = exports.libraryThemes = {
|
|
|
47
47
|
"map": "creditSavvy.min.css.map"
|
|
48
48
|
},
|
|
49
49
|
"versioned": {
|
|
50
|
-
"css": "creditSavvy.min.3.
|
|
51
|
-
"map": "creditSavvy.min.3.
|
|
50
|
+
"css": "creditSavvy.min.3.17.0.css",
|
|
51
|
+
"map": "creditSavvy.min.3.17.0.css.map"
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"doshii": {
|
|
@@ -62,8 +62,8 @@ const libraryThemes = exports.libraryThemes = {
|
|
|
62
62
|
"map": "doshii.min.css.map"
|
|
63
63
|
},
|
|
64
64
|
"versioned": {
|
|
65
|
-
"css": "doshii.min.3.
|
|
66
|
-
"map": "doshii.min.3.
|
|
65
|
+
"css": "doshii.min.3.17.0.css",
|
|
66
|
+
"map": "doshii.min.3.17.0.css.map"
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
"homeIn": {
|
|
@@ -77,8 +77,8 @@ const libraryThemes = exports.libraryThemes = {
|
|
|
77
77
|
"map": "homeIn.min.css.map"
|
|
78
78
|
},
|
|
79
79
|
"versioned": {
|
|
80
|
-
"css": "homeIn.min.3.
|
|
81
|
-
"map": "homeIn.min.3.
|
|
80
|
+
"css": "homeIn.min.3.17.0.css",
|
|
81
|
+
"map": "homeIn.min.3.17.0.css.map"
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
"x15Core": {
|
|
@@ -92,8 +92,8 @@ const libraryThemes = exports.libraryThemes = {
|
|
|
92
92
|
"map": "x15Core.min.css.map"
|
|
93
93
|
},
|
|
94
94
|
"versioned": {
|
|
95
|
-
"css": "x15Core.min.3.
|
|
96
|
-
"map": "x15Core.min.3.
|
|
95
|
+
"css": "x15Core.min.3.17.0.css",
|
|
96
|
+
"map": "x15Core.min.3.17.0.css.map"
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libraryThemes.js","names":["libraryThemes","exports","_default","default"],"sources":["../../../src/autoGenerated/libraryThemes.ts"],"sourcesContent":["/* eslint-disable */\nexport const libraryThemes = {\n \"base\": {\n \"buildPath\": \"styles\",\n \"dev\": {\n \"css\": \"index.css\",\n \"map\": \"index.css.map\"\n },\n \"min\": {\n \"css\": \"index.min.css\",\n \"map\": \"index.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"index.min.3.
|
|
1
|
+
{"version":3,"file":"libraryThemes.js","names":["libraryThemes","exports","_default","default"],"sources":["../../../src/autoGenerated/libraryThemes.ts"],"sourcesContent":["/* eslint-disable */\nexport const libraryThemes = {\n \"base\": {\n \"buildPath\": \"styles\",\n \"dev\": {\n \"css\": \"index.css\",\n \"map\": \"index.css.map\"\n },\n \"min\": {\n \"css\": \"index.min.css\",\n \"map\": \"index.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"index.min.3.17.0.css\",\n \"map\": \"index.min.3.17.0.css.map\"\n }\n },\n \"cba\": {\n \"buildPath\": \"styles/themes/cba\",\n \"dev\": {\n \"css\": \"cba.css\",\n \"map\": \"cba.css.map\"\n },\n \"min\": {\n \"css\": \"cba.min.css\",\n \"map\": \"cba.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"cba.min.3.17.0.css\",\n \"map\": \"cba.min.3.17.0.css.map\"\n }\n },\n \"creditSavvy\": {\n \"buildPath\": \"styles/themes/creditSavvy\",\n \"dev\": {\n \"css\": \"creditSavvy.css\",\n \"map\": \"creditSavvy.css.map\"\n },\n \"min\": {\n \"css\": \"creditSavvy.min.css\",\n \"map\": \"creditSavvy.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"creditSavvy.min.3.17.0.css\",\n \"map\": \"creditSavvy.min.3.17.0.css.map\"\n }\n },\n \"doshii\": {\n \"buildPath\": \"styles/themes/doshii\",\n \"dev\": {\n \"css\": \"doshii.css\",\n \"map\": \"doshii.css.map\"\n },\n \"min\": {\n \"css\": \"doshii.min.css\",\n \"map\": \"doshii.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"doshii.min.3.17.0.css\",\n \"map\": \"doshii.min.3.17.0.css.map\"\n }\n },\n \"homeIn\": {\n \"buildPath\": \"styles/themes/homeIn\",\n \"dev\": {\n \"css\": \"homeIn.css\",\n \"map\": \"homeIn.css.map\"\n },\n \"min\": {\n \"css\": \"homeIn.min.css\",\n \"map\": \"homeIn.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"homeIn.min.3.17.0.css\",\n \"map\": \"homeIn.min.3.17.0.css.map\"\n }\n },\n \"x15Core\": {\n \"buildPath\": \"styles/themes/x15Core\",\n \"dev\": {\n \"css\": \"x15Core.css\",\n \"map\": \"x15Core.css.map\"\n },\n \"min\": {\n \"css\": \"x15Core.min.css\",\n \"map\": \"x15Core.min.css.map\"\n },\n \"versioned\": {\n \"css\": \"x15Core.min.3.17.0.css\",\n \"map\": \"x15Core.min.3.17.0.css.map\"\n }\n }\n}; export default libraryThemes;"],"mappings":";;;;;;AAAA;AACO,MAAMA,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC3B,MAAM,EAAE;IACN,WAAW,EAAE,QAAQ;IACrB,KAAK,EAAE;MACL,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE;IACT,CAAC;IACD,KAAK,EAAE;MACL,KAAK,EAAE,eAAe;MACtB,KAAK,EAAE;IACT,CAAC;IACD,WAAW,EAAE;MACX,KAAK,EAAE,sBAAsB;MAC7B,KAAK,EAAE;IACT;EACF,CAAC;EACD,KAAK,EAAE;IACL,WAAW,EAAE,mBAAmB;IAChC,KAAK,EAAE;MACL,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE;IACT,CAAC;IACD,KAAK,EAAE;MACL,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE;IACT,CAAC;IACD,WAAW,EAAE;MACX,KAAK,EAAE,oBAAoB;MAC3B,KAAK,EAAE;IACT;EACF,CAAC;EACD,aAAa,EAAE;IACb,WAAW,EAAE,2BAA2B;IACxC,KAAK,EAAE;MACL,KAAK,EAAE,iBAAiB;MACxB,KAAK,EAAE;IACT,CAAC;IACD,KAAK,EAAE;MACL,KAAK,EAAE,qBAAqB;MAC5B,KAAK,EAAE;IACT,CAAC;IACD,WAAW,EAAE;MACX,KAAK,EAAE,4BAA4B;MACnC,KAAK,EAAE;IACT;EACF,CAAC;EACD,QAAQ,EAAE;IACR,WAAW,EAAE,sBAAsB;IACnC,KAAK,EAAE;MACL,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE;IACT,CAAC;IACD,KAAK,EAAE;MACL,KAAK,EAAE,gBAAgB;MACvB,KAAK,EAAE;IACT,CAAC;IACD,WAAW,EAAE;MACX,KAAK,EAAE,uBAAuB;MAC9B,KAAK,EAAE;IACT;EACF,CAAC;EACD,QAAQ,EAAE;IACR,WAAW,EAAE,sBAAsB;IACnC,KAAK,EAAE;MACL,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE;IACT,CAAC;IACD,KAAK,EAAE;MACL,KAAK,EAAE,gBAAgB;MACvB,KAAK,EAAE;IACT,CAAC;IACD,WAAW,EAAE;MACX,KAAK,EAAE,uBAAuB;MAC9B,KAAK,EAAE;IACT;EACF,CAAC;EACD,SAAS,EAAE;IACT,WAAW,EAAE,uBAAuB;IACpC,KAAK,EAAE;MACL,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE;IACT,CAAC;IACD,KAAK,EAAE;MACL,KAAK,EAAE,iBAAiB;MACxB,KAAK,EAAE;IACT,CAAC;IACD,WAAW,EAAE;MACX,KAAK,EAAE,wBAAwB;MAC/B,KAAK,EAAE;IACT;EACF;AACF,CAAC;AAAC,IAAAE,QAAA,GAAAD,OAAA,CAAAE,OAAA,GAAgBH,aAAa","ignoreList":[]}
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"map": "index.min.css.map"
|
|
11
11
|
},
|
|
12
12
|
"versioned": {
|
|
13
|
-
"css": "base.min.3.
|
|
14
|
-
"map": "base.min.3.
|
|
13
|
+
"css": "base.min.3.17.0.css",
|
|
14
|
+
"map": "base.min.3.17.0.css.map"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"cba": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"map": "cba.min.css.map"
|
|
26
26
|
},
|
|
27
27
|
"versioned": {
|
|
28
|
-
"css": "cba.min.3.
|
|
29
|
-
"map": "cba.min.3.
|
|
28
|
+
"css": "cba.min.3.17.0.css",
|
|
29
|
+
"map": "cba.min.3.17.0.css.map"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"creditSavvy": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"map": "creditSavvy.min.css.map"
|
|
41
41
|
},
|
|
42
42
|
"versioned": {
|
|
43
|
-
"css": "creditSavvy.min.3.
|
|
44
|
-
"map": "creditSavvy.min.3.
|
|
43
|
+
"css": "creditSavvy.min.3.17.0.css",
|
|
44
|
+
"map": "creditSavvy.min.3.17.0.css.map"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"doshii": {
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"map": "doshii.min.css.map"
|
|
56
56
|
},
|
|
57
57
|
"versioned": {
|
|
58
|
-
"css": "doshii.min.3.
|
|
59
|
-
"map": "doshii.min.3.
|
|
58
|
+
"css": "doshii.min.3.17.0.css",
|
|
59
|
+
"map": "doshii.min.3.17.0.css.map"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"homeIn": {
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"map": "homeIn.min.css.map"
|
|
71
71
|
},
|
|
72
72
|
"versioned": {
|
|
73
|
-
"css": "homeIn.min.3.
|
|
74
|
-
"map": "homeIn.min.3.
|
|
73
|
+
"css": "homeIn.min.3.17.0.css",
|
|
74
|
+
"map": "homeIn.min.3.17.0.css.map"
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"x15Core": {
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"map": "x15Core.min.css.map"
|
|
86
86
|
},
|
|
87
87
|
"versioned": {
|
|
88
|
-
"css": "x15Core.min.3.
|
|
89
|
-
"map": "x15Core.min.3.
|
|
88
|
+
"css": "x15Core.min.3.17.0.css",
|
|
89
|
+
"map": "x15Core.min.3.17.0.css.map"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -70,7 +70,9 @@ const Dialog = ({
|
|
|
70
70
|
} else {
|
|
71
71
|
HandleClose();
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
// customCssClasses is intentionally excluded: it isn't read here, and including it (as a
|
|
74
|
+
// fresh object reference on every parent render) re-ran this effect and stole focus on each keystroke.
|
|
75
|
+
}, [createOverlay, open, isOpen, HandleOpen, HandleClose, dialogHeaderElement]);
|
|
74
76
|
const DialogCloseButton = () => /*#__PURE__*/_react.default.createElement("button", {
|
|
75
77
|
ref: dialogCloseButton,
|
|
76
78
|
className: "dialogClose",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","names":["Object","defineProperty","exports","value","Dialog","_react","_interopRequireWildcard","require","_index","_SvgIcon","_tooltip","_DialogOverlay","_FocusTrap","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","getOwnPropertyDescriptor","id","size","position","animation","scrollBehaviour","onClose","open","overlay","header","footer","children","screenReaderInstruction","customCssClasses","showFocusOutline","isOpen","setIsOpen","useState","dialogElement","useRef","dialogHeaderElement","TOGGLE_TEXT","dialogCloseButton","createOverlay","removeOverlay","useDialogOverlay","useFocusTrap","HandleClose","dialogCssClass","useMemo","dialog","useCallback","HandleOpen","dialogOverlay","showOverlay","useEffect","current","focus","DialogCloseButton","createElement","ref","className","title","type","onClick","SvgIcon","svgDefinition","xmarkLarge","role","tabIndex","EllipsisTooltip","lineClamp","tooltipProps","customCssClass","content"],"sources":["../../../../../src/components/design/dialog/Dialog.tsx"],"sourcesContent":["/* eslint-disable jsxA11y/no-noninteractive-tabindex */\n'use client';\n\nimport React, { ReactNode, useCallback, useEffect, useRef, useState, useMemo } from 'react';\nimport { xmarkLarge } from '@x15ventures/x15-ui-library-icons/iconDefinitions/index';\nimport { SvgIcon } from '@x15ventures/x15-ui-library-icons/svgIcon/SvgIcon';\nimport { EllipsisTooltip } from '../tooltip';\nimport { GenericFunction } from '../../../interfaces';\nimport { useDialogOverlay } from '../../../hooks/DialogOverlay';\nimport { useFocusTrap } from '../../../hooks/FocusTrap';\n\nimport './dialog.scss';\n\nexport interface DialogInterface {\n id: string;\n size?: 'xs' | 's' | 'm' | 'l' | 'xl' | 'dynamic';\n position?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright';\n animation?: 'none' | 'grow' | 'reveal';\n scrollBehaviour?: 'contentOnly' | 'contentAndFooter' | 'all';\n onClose: GenericFunction;\n open?: boolean;\n overlay?: {\n parentNode?: HTMLElement;\n customCssClass?: string;\n };\n header: string | ReactNode;\n footer?: string | ReactNode;\n children: ReactNode;\n screenReaderInstruction?: string;\n showFocusOutline?: boolean;\n customCssClasses?: {\n dialog?: string;\n content?: string;\n header?: string;\n footer?: string;\n };\n}\n\nexport const Dialog: React.FC<DialogInterface> = ({\n id,\n size = 'm',\n position = 'center',\n animation = 'none',\n scrollBehaviour = 'contentOnly',\n onClose = () => {},\n open = false,\n overlay,\n header,\n footer,\n children,\n screenReaderInstruction = `The following content is in a dialog. \n You can press the Tab key to navigate through the elements, and press Escape to close the dialog.`,\n customCssClasses,\n showFocusOutline = false,\n}) => {\n const [isOpen, setIsOpen] = useState<boolean>(open);\n const dialogElement = useRef<HTMLDivElement>(null);\n const dialogHeaderElement = useRef<HTMLDivElement>(null);\n\n const TOGGLE_TEXT = 'Open and close dialog';\n const dialogCloseButton = useRef(null);\n\n const { createOverlay, removeOverlay } = useDialogOverlay(overlay || {});\n useFocusTrap(dialogElement, () => HandleClose());\n\n const dialogCssClass = useMemo(() => {\n return `dialog \n ${ isOpen || open ? 'isOpen' : '' }\n dialogSize_${ size }\n dialogPosition_${ position }\n dialogAnimation_${ animation }\n dialogScrollBehaviour_${ scrollBehaviour }\n ${ size === 'dynamic' ? 'dialogSize_dynamic' : '' }\n ${ customCssClasses?.dialog || '' }\n ${ showFocusOutline ? 'showFocusOutline' : '' }`;\n }, [open, isOpen, size, position, animation, scrollBehaviour, customCssClasses, showFocusOutline]);\n\n const HandleClose = useCallback(() => {\n setIsOpen(false);\n removeOverlay();\n onClose();\n }, [onClose, removeOverlay]);\n\n const HandleOpen = useCallback(() => {\n const dialogOverlay = createOverlay();\n dialogOverlay.showOverlay();\n }, [createOverlay]);\n\n useEffect(() => {\n if (open || isOpen) {\n if (dialogHeaderElement.current) {\n dialogHeaderElement.current.focus();\n }\n HandleOpen();\n } else {\n HandleClose();\n }\n }, [customCssClasses, createOverlay, open, isOpen, HandleOpen, HandleClose, dialogHeaderElement]);\n\n const DialogCloseButton: React.FC = () => (\n <button\n ref={ dialogCloseButton }\n className=\"dialogClose\"\n title={ TOGGLE_TEXT }\n type=\"button\"\n onClick={ () => HandleClose() }\n >\n <SvgIcon svgDefinition={ xmarkLarge } />\n <span className=\"sr-only\">Close dialog</span>\n </button>\n );\n\n return (\n <div\n className={ dialogCssClass }\n role=\"dialog\"\n aria-labelledby={ `dialogHeader_${ id }` }\n tabIndex={ 0 }\n aria-describedby={ `dialogSRInstruction_${ id }` }\n aria-modal=\"true\"\n ref={ dialogElement }\n >\n <div className=\"dialogFullScroller\">\n <div\n ref={ dialogHeaderElement }\n id={ `dialogHeader_${ id }` }\n className={ `dialogHeader ${ customCssClasses?.header || '' }` }\n tabIndex={ 0 }\n >\n <span id={ `dialogSRInstruction_${ id }` } className=\"sr-only\">\n { screenReaderInstruction }\n </span>\n <div className=\"dialogHeaderTextWrapper\">\n <EllipsisTooltip \n lineClamp={ 2 } \n tooltipProps={ { \n customCssClass: 'shiftDown large dialogEllipsisTooltip'\n } }\n >\n { typeof header === 'string' ? <span className=\"dialogHeaderText\">{ header }</span> : header }\n </EllipsisTooltip>\n </div>\n <DialogCloseButton />\n </div>\n\n <div className=\"dialogContentAndFooterScroller\">\n <section className={ `dialogContent ${ customCssClasses?.content || '' }` } tabIndex={ 0 }>\n { children }\n </section>\n\n {\n footer && (\n <div className={ `dialogFooter ${ customCssClasses?.footer || '' }` } tabIndex={ 0 }>\n { typeof footer === 'string' ? <span className=\"dialogFooterText\">{ footer }</span> : footer }\n </div>\n )\n }\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";AAAA;AACA,YAAY;;AAACA,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAA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AAA,CAAAkB,OAAA,CAAA6C,aAAA;IAASE,SAAS,EAAG,iBAAkB5B,gBAAgB,EAAEyC,OAAO,IAAI,EAAE,EAAK;IAACL,QAAQ,EAAG;EAAG,GACtFtC,QACK,CAAC,EAGRD,MAAM,iBACJlC,MAAA,CAAAkB,OAAA,CAAA6C,aAAA;IAAKE,SAAS,EAAG,gBAAiB5B,gBAAgB,EAAEH,MAAM,IAAI,EAAE,EAAK;IAACuC,QAAQ,EAAG;EAAG,GAChF,OAAOvC,MAAM,KAAK,QAAQ,gBAAGlC,MAAA,CAAAkB,OAAA,CAAA6C,aAAA;IAAME,SAAS,EAAC;EAAkB,GAAG/B,MAAc,CAAC,GAAGA,MACnF,CAGN,CACF,CACF,CAAC;AAEV,CAAC;AAACrC,OAAA,CAAAE,MAAA,GAAAA,MAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Dialog.js","names":["Object","defineProperty","exports","value","Dialog","_react","_interopRequireWildcard","require","_index","_SvgIcon","_tooltip","_DialogOverlay","_FocusTrap","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","getOwnPropertyDescriptor","id","size","position","animation","scrollBehaviour","onClose","open","overlay","header","footer","children","screenReaderInstruction","customCssClasses","showFocusOutline","isOpen","setIsOpen","useState","dialogElement","useRef","dialogHeaderElement","TOGGLE_TEXT","dialogCloseButton","createOverlay","removeOverlay","useDialogOverlay","useFocusTrap","HandleClose","dialogCssClass","useMemo","dialog","useCallback","HandleOpen","dialogOverlay","showOverlay","useEffect","current","focus","DialogCloseButton","createElement","ref","className","title","type","onClick","SvgIcon","svgDefinition","xmarkLarge","role","tabIndex","EllipsisTooltip","lineClamp","tooltipProps","customCssClass","content"],"sources":["../../../../../src/components/design/dialog/Dialog.tsx"],"sourcesContent":["/* eslint-disable jsxA11y/no-noninteractive-tabindex */\n'use client';\n\nimport React, { ReactNode, useCallback, useEffect, useRef, useState, useMemo } from 'react';\nimport { xmarkLarge } from '@x15ventures/x15-ui-library-icons/iconDefinitions/index';\nimport { SvgIcon } from '@x15ventures/x15-ui-library-icons/svgIcon/SvgIcon';\nimport { EllipsisTooltip } from '../tooltip';\nimport { GenericFunction } from '../../../interfaces';\nimport { useDialogOverlay } from '../../../hooks/DialogOverlay';\nimport { useFocusTrap } from '../../../hooks/FocusTrap';\n\nimport './dialog.scss';\n\nexport interface DialogInterface {\n id: string;\n size?: 'xs' | 's' | 'm' | 'l' | 'xl' | 'dynamic';\n position?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright';\n animation?: 'none' | 'grow' | 'reveal';\n scrollBehaviour?: 'contentOnly' | 'contentAndFooter' | 'all';\n onClose: GenericFunction;\n open?: boolean;\n overlay?: {\n parentNode?: HTMLElement;\n customCssClass?: string;\n };\n header: string | ReactNode;\n footer?: string | ReactNode;\n children: ReactNode;\n screenReaderInstruction?: string;\n showFocusOutline?: boolean;\n customCssClasses?: {\n dialog?: string;\n content?: string;\n header?: string;\n footer?: string;\n };\n}\n\nexport const Dialog: React.FC<DialogInterface> = ({\n id,\n size = 'm',\n position = 'center',\n animation = 'none',\n scrollBehaviour = 'contentOnly',\n onClose = () => {},\n open = false,\n overlay,\n header,\n footer,\n children,\n screenReaderInstruction = `The following content is in a dialog. \n You can press the Tab key to navigate through the elements, and press Escape to close the dialog.`,\n customCssClasses,\n showFocusOutline = false,\n}) => {\n const [isOpen, setIsOpen] = useState<boolean>(open);\n const dialogElement = useRef<HTMLDivElement>(null);\n const dialogHeaderElement = useRef<HTMLDivElement>(null);\n\n const TOGGLE_TEXT = 'Open and close dialog';\n const dialogCloseButton = useRef(null);\n\n const { createOverlay, removeOverlay } = useDialogOverlay(overlay || {});\n useFocusTrap(dialogElement, () => HandleClose());\n\n const dialogCssClass = useMemo(() => {\n return `dialog \n ${ isOpen || open ? 'isOpen' : '' }\n dialogSize_${ size }\n dialogPosition_${ position }\n dialogAnimation_${ animation }\n dialogScrollBehaviour_${ scrollBehaviour }\n ${ size === 'dynamic' ? 'dialogSize_dynamic' : '' }\n ${ customCssClasses?.dialog || '' }\n ${ showFocusOutline ? 'showFocusOutline' : '' }`;\n }, [open, isOpen, size, position, animation, scrollBehaviour, customCssClasses, showFocusOutline]);\n\n const HandleClose = useCallback(() => {\n setIsOpen(false);\n removeOverlay();\n onClose();\n }, [onClose, removeOverlay]);\n\n const HandleOpen = useCallback(() => {\n const dialogOverlay = createOverlay();\n dialogOverlay.showOverlay();\n }, [createOverlay]);\n\n useEffect(() => {\n if (open || isOpen) {\n if (dialogHeaderElement.current) {\n dialogHeaderElement.current.focus();\n }\n HandleOpen();\n } else {\n HandleClose();\n }\n // customCssClasses is intentionally excluded: it isn't read here, and including it (as a\n // fresh object reference on every parent render) re-ran this effect and stole focus on each keystroke.\n }, [createOverlay, open, isOpen, HandleOpen, HandleClose, dialogHeaderElement]);\n\n const DialogCloseButton: React.FC = () => (\n <button\n ref={ dialogCloseButton }\n className=\"dialogClose\"\n title={ TOGGLE_TEXT }\n type=\"button\"\n onClick={ () => HandleClose() }\n >\n <SvgIcon svgDefinition={ xmarkLarge } />\n <span className=\"sr-only\">Close dialog</span>\n </button>\n );\n\n return (\n <div\n className={ dialogCssClass }\n role=\"dialog\"\n aria-labelledby={ `dialogHeader_${ id }` }\n tabIndex={ 0 }\n aria-describedby={ `dialogSRInstruction_${ id }` }\n aria-modal=\"true\"\n ref={ dialogElement }\n >\n <div className=\"dialogFullScroller\">\n <div\n ref={ dialogHeaderElement }\n id={ `dialogHeader_${ id }` }\n className={ `dialogHeader ${ customCssClasses?.header || '' }` }\n tabIndex={ 0 }\n >\n <span id={ `dialogSRInstruction_${ id }` } className=\"sr-only\">\n { screenReaderInstruction }\n </span>\n <div className=\"dialogHeaderTextWrapper\">\n <EllipsisTooltip \n lineClamp={ 2 } \n tooltipProps={ { \n customCssClass: 'shiftDown large dialogEllipsisTooltip'\n } }\n >\n { typeof header === 'string' ? <span className=\"dialogHeaderText\">{ header }</span> : header }\n </EllipsisTooltip>\n </div>\n <DialogCloseButton />\n </div>\n\n <div className=\"dialogContentAndFooterScroller\">\n <section className={ `dialogContent ${ customCssClasses?.content || '' }` } tabIndex={ 0 }>\n { children }\n </section>\n\n {\n footer && (\n <div className={ `dialogFooter ${ customCssClasses?.footer || '' }` } tabIndex={ 0 }>\n { typeof footer === 'string' ? <span className=\"dialogFooterText\">{ footer }</span> : footer }\n </div>\n )\n }\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";AAAA;AACA,YAAY;;AAACA,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,MAAA;AAEb,IAAAC,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAEA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAEAA,OAAA;AAAuB,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,c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AAe;IACdC,SAAS,EAAG,CAAG;IACfC,YAAY,EAAG;MACbC,cAAc,EAAE;IAClB;EAAG,GAED,OAAO5C,MAAM,KAAK,QAAQ,gBAAGjC,MAAA,CAAAkB,OAAA,CAAA6C,aAAA;IAAME,SAAS,EAAC;EAAkB,GAAGhC,MAAc,CAAC,GAAGA,MACvE,CACd,CAAC,eACNjC,MAAA,CAAAkB,OAAA,CAAA6C,aAAA,CAACD,iBAAiB,MAAE,CACjB,CAAC,eAEN9D,MAAA,CAAAkB,OAAA,CAAA6C,aAAA;IAAKE,SAAS,EAAC;EAAgC,gBAC7CjE,MAAA,CAAAkB,OAAA,CAAA6C,aAAA;IAASE,SAAS,EAAG,iBAAkB5B,gBAAgB,EAAEyC,OAAO,IAAI,EAAE,EAAK;IAACL,QAAQ,EAAG;EAAG,GACtFtC,QACK,CAAC,EAGRD,MAAM,iBACJlC,MAAA,CAAAkB,OAAA,CAAA6C,aAAA;IAAKE,SAAS,EAAG,gBAAiB5B,gBAAgB,EAAEH,MAAM,IAAI,EAAE,EAAK;IAACuC,QAAQ,EAAG;EAAG,GAChF,OAAOvC,MAAM,KAAK,QAAQ,gBAAGlC,MAAA,CAAAkB,OAAA,CAAA6C,aAAA;IAAME,SAAS,EAAC;EAAkB,GAAG/B,MAAc,CAAC,GAAGA,MACnF,CAGN,CACF,CACF,CAAC;AAEV,CAAC;AAACrC,OAAA,CAAAE,MAAA,GAAAA,MAAA","ignoreList":[]}
|
|
@@ -129,6 +129,11 @@
|
|
|
129
129
|
justify-content: flex-start;
|
|
130
130
|
min-height: var(--dialogFooterHeight, 50px);
|
|
131
131
|
}
|
|
132
|
+
.dialog .dialogFooter .actionButtons {
|
|
133
|
+
display: flex;
|
|
134
|
+
width: 100%;
|
|
135
|
+
justify-content: space-between;
|
|
136
|
+
}
|
|
132
137
|
.dialog .dialogFullScroller {
|
|
133
138
|
flex: 1;
|
|
134
139
|
box-sizing: border-box;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.CircularProgressIndicator = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _Tooltip = require("../../tooltip/Tooltip");
|
|
12
|
+
require("./circularProgressIndicator.css");
|
|
13
|
+
const CircularProgressIndicator = ({
|
|
14
|
+
name,
|
|
15
|
+
progress,
|
|
16
|
+
description = '',
|
|
17
|
+
statusMessage = '',
|
|
18
|
+
icon = null,
|
|
19
|
+
hideLabel = false,
|
|
20
|
+
id,
|
|
21
|
+
mode = 'default',
|
|
22
|
+
onClickHandler,
|
|
23
|
+
size = 'default'
|
|
24
|
+
}) => {
|
|
25
|
+
const clampedProgress = Math.min(100, Math.max(0, progress));
|
|
26
|
+
const progressCopy = `${clampedProgress}% complete`;
|
|
27
|
+
const progressSummary = `${progressCopy}${description ? ` ${description}` : ''}`;
|
|
28
|
+
const hasStatus = mode !== 'default';
|
|
29
|
+
const statusTooltipId = `${id}_status`;
|
|
30
|
+
const isActionable = typeof onClickHandler === 'function';
|
|
31
|
+
const getTitle = () => {
|
|
32
|
+
if (statusMessage) {
|
|
33
|
+
return statusMessage;
|
|
34
|
+
}
|
|
35
|
+
return progressSummary;
|
|
36
|
+
};
|
|
37
|
+
const modeIconsMap = {
|
|
38
|
+
default: '',
|
|
39
|
+
warning: 'warning',
|
|
40
|
+
error: 'notification',
|
|
41
|
+
success: 'checkmark'
|
|
42
|
+
};
|
|
43
|
+
const progressIndicatorContent = /*#__PURE__*/_react.default.createElement("span", {
|
|
44
|
+
className: "progressIndicator"
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
46
|
+
className: "glowRing"
|
|
47
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
48
|
+
className: "progressRing"
|
|
49
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
50
|
+
className: "actionIcon"
|
|
51
|
+
}, icon, /*#__PURE__*/_react.default.createElement("span", {
|
|
52
|
+
className: `labelText ${hideLabel || size === 'xsmall' ? 'sr-only' : ''}`
|
|
53
|
+
}, name)), hasStatus && /*#__PURE__*/_react.default.createElement("span", {
|
|
54
|
+
className: "statusIndicator"
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
|
|
56
|
+
passiveTrigger: true,
|
|
57
|
+
triggerId: statusTooltipId,
|
|
58
|
+
customCssClass: "statusIcon",
|
|
59
|
+
icon: modeIconsMap[mode]
|
|
60
|
+
}, getTitle())));
|
|
61
|
+
const sharedProps = {
|
|
62
|
+
className: `circularProgressIndicator ${mode}Mode ${size}`,
|
|
63
|
+
id,
|
|
64
|
+
style: {
|
|
65
|
+
'--progress': `${clampedProgress}%`
|
|
66
|
+
},
|
|
67
|
+
title: hasStatus ? '' : getTitle(),
|
|
68
|
+
'aria-label': progressSummary,
|
|
69
|
+
...(hasStatus ? {
|
|
70
|
+
'aria-describedby': statusTooltipId + '_content'
|
|
71
|
+
} : {})
|
|
72
|
+
};
|
|
73
|
+
if (isActionable) {
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement("button", (0, _extends2.default)({}, sharedProps, {
|
|
75
|
+
type: "button",
|
|
76
|
+
onClick: onClickHandler
|
|
77
|
+
}), progressIndicatorContent);
|
|
78
|
+
}
|
|
79
|
+
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, sharedProps, {
|
|
80
|
+
role: "progressbar",
|
|
81
|
+
"aria-valuemin": 0,
|
|
82
|
+
"aria-valuemax": 100,
|
|
83
|
+
"aria-valuenow": clampedProgress
|
|
84
|
+
}), progressIndicatorContent);
|
|
85
|
+
};
|
|
86
|
+
exports.CircularProgressIndicator = CircularProgressIndicator;
|
|
87
|
+
var _default = exports.default = CircularProgressIndicator;
|
|
88
|
+
//# sourceMappingURL=CircularProgressIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CircularProgressIndicator.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","default","CircularProgressIndicator","_extends2","_react","_Tooltip","name","progress","description","statusMessage","icon","hideLabel","id","mode","onClickHandler","size","clampedProgress","Math","min","max","progressCopy","progressSummary","hasStatus","statusTooltipId","isActionable","getTitle","modeIconsMap","warning","error","success","progressIndicatorContent","createElement","className","Tooltip","passiveTrigger","triggerId","customCssClass","sharedProps","style","title","type","onClick","role","_default"],"sources":["../../../../../../src/components/design/progressIndicators/circularProgressIndicator/CircularProgressIndicator.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { Tooltip } from '../../tooltip/Tooltip';\n\nimport './circularProgressIndicator.scss';\n\nexport interface CircularProgressIndicatorProps {\n name: string;\n progress: number; // 0 - 100\n description?: string;\n statusMessage?: string;\n icon?: React.ReactNode;\n hideLabel?: boolean;\n id: string;\n onClickHandler?: () => void;\n mode?: 'default' | 'warning' | 'error' | 'success';\n size?: 'xsmall' | 'small' | 'default' | 'large' | 'xlarge';\n}\n\nexport const CircularProgressIndicator: React.FC<CircularProgressIndicatorProps> = (\n {\n name,\n progress,\n description = '',\n statusMessage = '',\n icon = null,\n hideLabel = false,\n id,\n mode = 'default',\n onClickHandler,\n size = 'default',\n }\n) => {\n const clampedProgress = Math.min(100, Math.max(0, progress));\n const progressCopy = `${ clampedProgress }% complete`;\n const progressSummary = `${ progressCopy }${ description ? ` ${ description }` : '' }`;\n const hasStatus = mode !== 'default';\n const statusTooltipId = `${ id }_status`;\n const isActionable = typeof onClickHandler === 'function';\n \n const getTitle = () => {\n if (statusMessage) {\n return statusMessage;\n }\n return progressSummary;\n };\n\n const modeIconsMap = {\n default: '',\n warning: 'warning',\n error: 'notification',\n success: 'checkmark',\n };\n\n const progressIndicatorContent = (\n <span className=\"progressIndicator\">\n <span className=\"glowRing\" />\n <span className=\"progressRing\" />\n <span className=\"actionIcon\">\n { icon }\n <span className={ `labelText ${ hideLabel || size === 'xsmall' ? 'sr-only' : '' }` }>{ name }</span>\n </span>\n\n { hasStatus &&\n <span className=\"statusIndicator\">\n <Tooltip\n passiveTrigger\n triggerId={ statusTooltipId }\n customCssClass=\"statusIcon\"\n icon={ modeIconsMap[mode] }\n >\n { getTitle() }\n </Tooltip>\n </span>\n }\n </span>\n );\n\n const sharedProps = {\n className: `circularProgressIndicator ${ mode }Mode ${ size }`,\n id,\n style: {\n '--progress': `${ clampedProgress }%`,\n } as React.CSSProperties,\n title: hasStatus ? '' : getTitle(),\n 'aria-label': progressSummary,\n ...(hasStatus ? { 'aria-describedby': statusTooltipId + '_content' } : {}),\n };\n\n if (isActionable) {\n return (\n <button\n { ...sharedProps }\n type=\"button\"\n onClick={ onClickHandler }\n >\n { progressIndicatorContent }\n </button>\n );\n }\n\n return (\n <div\n { ...sharedProps }\n role=\"progressbar\"\n aria-valuemin={ 0 }\n aria-valuemax={ 100 }\n aria-valuenow={ clampedProgress }\n >\n { progressIndicatorContent }\n </div>\n );\n};\n\nexport default CircularProgressIndicator;"],"mappings":";AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,OAAA,GAAAF,OAAA,CAAAG,yBAAA;AAAA,IAAAC,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AAEb,IAAAQ,MAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAEAA,OAAA;AAeO,MAAMM,yBAAmE,GAAGA,CACjF;EACEI,IAAI;EACJC,QAAQ;EACRC,WAAW,GAAG,EAAE;EAChBC,aAAa,GAAG,EAAE;EAClBC,IAAI,GAAG,IAAI;EACXC,SAAS,GAAG,KAAK;EACjBC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ndicator {
|
|
2
|
+
--progress: 0%; /* Overwrite the progress value to set the progress (0% to 100%) */
|
|
3
|
+
--progressIndicatorSize: 100px;
|
|
4
|
+
--progressIndicatorBgColor: #f0f0f0;
|
|
5
|
+
--glowRingThickness: 5%;
|
|
6
|
+
--progressRingSize: 90%;
|
|
7
|
+
--progressRingThickness: 10%;
|
|
8
|
+
--glowRingColor: #ec008c;
|
|
9
|
+
--glowRingColorHighlight: #fff;
|
|
10
|
+
--glowRingColorShade: #B02568;
|
|
11
|
+
--errorColor: #ff0000;
|
|
12
|
+
--errorColorShade: #cc0000;
|
|
13
|
+
--warnColor: #ffcc00;
|
|
14
|
+
--warnColorShade: #ff9900;
|
|
15
|
+
--successColor: #009900;
|
|
16
|
+
--successColorShade: #006600;
|
|
17
|
+
--progressRingColor: #ec008c;
|
|
18
|
+
--progressRingColorHighlight: #fff;
|
|
19
|
+
--progressRingColorShade: #B02568;
|
|
20
|
+
--progressStartAngle: -45deg;
|
|
21
|
+
border: 0;
|
|
22
|
+
background: transparent;
|
|
23
|
+
}
|
|
24
|
+
.circularProgressIndicator.xsmall {
|
|
25
|
+
--progressIndicatorSize: 40px;
|
|
26
|
+
--glowRingThickness: 5px;
|
|
27
|
+
}
|
|
28
|
+
.circularProgressIndicator.xsmall .statusIndicator {
|
|
29
|
+
width: 16px;
|
|
30
|
+
height: 16px;
|
|
31
|
+
top: 5%;
|
|
32
|
+
right: 5%;
|
|
33
|
+
border: none;
|
|
34
|
+
}
|
|
35
|
+
.circularProgressIndicator.xsmall .statusIndicator .statusIcon .icon {
|
|
36
|
+
font-size: 11px;
|
|
37
|
+
}
|
|
38
|
+
.circularProgressIndicator.xsmall .statusIndicator .statusIcon .icon.icon-warning {
|
|
39
|
+
position: relative;
|
|
40
|
+
top: -1px;
|
|
41
|
+
}
|
|
42
|
+
.circularProgressIndicator.small {
|
|
43
|
+
--progressIndicatorSize: 75px;
|
|
44
|
+
}
|
|
45
|
+
.circularProgressIndicator.small .actionIcon .labelText {
|
|
46
|
+
font-size: 11px;
|
|
47
|
+
}
|
|
48
|
+
.circularProgressIndicator.small .statusIndicator {
|
|
49
|
+
width: 18px;
|
|
50
|
+
height: 18px;
|
|
51
|
+
top: 5%;
|
|
52
|
+
right: 5%;
|
|
53
|
+
border-width: 1px;
|
|
54
|
+
}
|
|
55
|
+
.circularProgressIndicator.small .statusIndicator .statusIcon .icon {
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
}
|
|
58
|
+
.circularProgressIndicator.small .statusIndicator .statusIcon .icon.icon-warning {
|
|
59
|
+
position: relative;
|
|
60
|
+
top: -1px;
|
|
61
|
+
}
|
|
62
|
+
.circularProgressIndicator.large {
|
|
63
|
+
--progressIndicatorSize: 150px;
|
|
64
|
+
}
|
|
65
|
+
.circularProgressIndicator.large .actionIcon .icon {
|
|
66
|
+
height: 30px;
|
|
67
|
+
font-size: 20px;
|
|
68
|
+
}
|
|
69
|
+
.circularProgressIndicator.large .actionIcon .labelText {
|
|
70
|
+
font-size: 16px;
|
|
71
|
+
}
|
|
72
|
+
.circularProgressIndicator.large .actionIcon .iconSvg {
|
|
73
|
+
height: 50px;
|
|
74
|
+
width: 50px;
|
|
75
|
+
}
|
|
76
|
+
.circularProgressIndicator.large .actionIcon .iconSvg path {
|
|
77
|
+
stroke-width: 1px;
|
|
78
|
+
}
|
|
79
|
+
.circularProgressIndicator.large .statusIndicator {
|
|
80
|
+
width: 30px;
|
|
81
|
+
height: 30px;
|
|
82
|
+
}
|
|
83
|
+
.circularProgressIndicator.large .statusIndicator .statusIcon .icon {
|
|
84
|
+
font-size: 16px;
|
|
85
|
+
}
|
|
86
|
+
.circularProgressIndicator.large .statusIndicator .statusIcon .icon.icon-warning {
|
|
87
|
+
position: relative;
|
|
88
|
+
top: -1px;
|
|
89
|
+
}
|
|
90
|
+
.circularProgressIndicator.xlarge {
|
|
91
|
+
--progressIndicatorSize: 200px;
|
|
92
|
+
}
|
|
93
|
+
.circularProgressIndicator.xlarge .actionIcon .icon {
|
|
94
|
+
height: 40px;
|
|
95
|
+
font-size: 30px;
|
|
96
|
+
}
|
|
97
|
+
.circularProgressIndicator.xlarge .actionIcon .labelText {
|
|
98
|
+
font-size: 16px;
|
|
99
|
+
}
|
|
100
|
+
.circularProgressIndicator.xlarge .actionIcon .iconSvg {
|
|
101
|
+
height: 75px;
|
|
102
|
+
width: 75px;
|
|
103
|
+
}
|
|
104
|
+
.circularProgressIndicator.xlarge .actionIcon .iconSvg path {
|
|
105
|
+
stroke-width: 1px;
|
|
106
|
+
}
|
|
107
|
+
.circularProgressIndicator.xlarge .statusIndicator {
|
|
108
|
+
width: 40px;
|
|
109
|
+
height: 40px;
|
|
110
|
+
}
|
|
111
|
+
.circularProgressIndicator.xlarge .statusIndicator .statusIcon .icon {
|
|
112
|
+
font-size: 18px;
|
|
113
|
+
}
|
|
114
|
+
.circularProgressIndicator.xlarge .statusIndicator .statusIcon .icon.icon-warning {
|
|
115
|
+
position: relative;
|
|
116
|
+
top: -1px;
|
|
117
|
+
}
|
|
118
|
+
.circularProgressIndicator.errorMode {
|
|
119
|
+
--glowRingColor: var(--errorColor);
|
|
120
|
+
--glowRingColorHighlight: var(--errorColor);
|
|
121
|
+
--glowRingColorShade: var(--errorColorShade);
|
|
122
|
+
--progressRingColor: var(--errorColor);
|
|
123
|
+
--progressRingColorShade: var(--errorColorShade);
|
|
124
|
+
}
|
|
125
|
+
.circularProgressIndicator.errorMode .statusIndicator {
|
|
126
|
+
color: var(--errorColor);
|
|
127
|
+
border-color: var(--errorColorShade);
|
|
128
|
+
}
|
|
129
|
+
.circularProgressIndicator.errorMode .statusIndicator .icon {
|
|
130
|
+
color: var(--errorColor);
|
|
131
|
+
}
|
|
132
|
+
.circularProgressIndicator.warningMode {
|
|
133
|
+
--glowRingColor: var(--warnColor);
|
|
134
|
+
--glowRingColorHighlight: var(--warnColor);
|
|
135
|
+
--glowRingColorShade: var(--warnColorShade);
|
|
136
|
+
--progressRingColor: var(--warnColor);
|
|
137
|
+
--progressRingColorShade: var(--warnColorShade);
|
|
138
|
+
}
|
|
139
|
+
.circularProgressIndicator.warningMode .statusIndicator {
|
|
140
|
+
color: var(--warnColorShade);
|
|
141
|
+
border-color: var(--warnColorShade);
|
|
142
|
+
}
|
|
143
|
+
.circularProgressIndicator.warningMode .statusIndicator .icon {
|
|
144
|
+
color: var(--warnColorShade);
|
|
145
|
+
}
|
|
146
|
+
.circularProgressIndicator.successMode {
|
|
147
|
+
--glowRingColor: var(--successColor);
|
|
148
|
+
--glowRingColorHighlight: var(--successColor);
|
|
149
|
+
--glowRingColorShade: var(--successColorShade);
|
|
150
|
+
--progressRingColor: var(--successColor);
|
|
151
|
+
--progressRingColorShade: var(--successColorShade);
|
|
152
|
+
}
|
|
153
|
+
.circularProgressIndicator.successMode .statusIndicator {
|
|
154
|
+
color: var(--successColorShade);
|
|
155
|
+
border-color: var(--successColorShade);
|
|
156
|
+
}
|
|
157
|
+
.circularProgressIndicator.successMode .statusIndicator .icon {
|
|
158
|
+
color: var(--successColorShade);
|
|
159
|
+
}
|
|
160
|
+
.circularProgressIndicator .progressIndicator {
|
|
161
|
+
display: block;
|
|
162
|
+
position: relative;
|
|
163
|
+
width: var(--progressIndicatorSize);
|
|
164
|
+
height: var(--progressIndicatorSize);
|
|
165
|
+
}
|
|
166
|
+
.circularProgressIndicator .progressIndicator .glowRing {
|
|
167
|
+
width: 100%;
|
|
168
|
+
height: 100%;
|
|
169
|
+
position: absolute;
|
|
170
|
+
border-radius: 50%;
|
|
171
|
+
top: 0;
|
|
172
|
+
left: 0;
|
|
173
|
+
background-image: conic-gradient(from var(--progressStartAngle), var(--glowRingColorHighlight) 0%, var(--glowRingColor) 20%, var(--glowRingColorShade) 50%, var(--glowRingColor) 80%, var(--glowRingColorHighlight) 95%);
|
|
174
|
+
box-shadow: 0 0 10px 0 var(--glowRingColor);
|
|
175
|
+
}
|
|
176
|
+
.circularProgressIndicator .progressIndicator .glowRing:before {
|
|
177
|
+
content: "";
|
|
178
|
+
position: absolute;
|
|
179
|
+
top: calc(var(--glowRingThickness) / 2);
|
|
180
|
+
left: calc(var(--glowRingThickness) / 2);
|
|
181
|
+
width: calc(100% - var(--glowRingThickness));
|
|
182
|
+
height: calc(100% - var(--glowRingThickness));
|
|
183
|
+
border-radius: 50%;
|
|
184
|
+
box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
|
|
185
|
+
background-color: var(--progressIndicatorBgColor);
|
|
186
|
+
}
|
|
187
|
+
.circularProgressIndicator .progressRing {
|
|
188
|
+
width: var(--progressRingSize);
|
|
189
|
+
height: var(--progressRingSize);
|
|
190
|
+
border-radius: 50%;
|
|
191
|
+
background-image: conic-gradient(from var(--progressStartAngle), var(--progressRingColorHighlight) 0%, var(--progressRingColor) 30%, var(--progressRingColorShade) 50%, var(--progressRingColor) 80%, var(--progressRingColorHighlight) 95%);
|
|
192
|
+
position: absolute;
|
|
193
|
+
top: 50%;
|
|
194
|
+
left: 50%;
|
|
195
|
+
transform: translate(-50%, -50%);
|
|
196
|
+
}
|
|
197
|
+
.circularProgressIndicator .progressRing:before, .circularProgressIndicator .progressRing:after {
|
|
198
|
+
content: "";
|
|
199
|
+
position: absolute;
|
|
200
|
+
border-radius: 50%;
|
|
201
|
+
top: 50%;
|
|
202
|
+
left: 50%;
|
|
203
|
+
transform: translate(-50%, -50%);
|
|
204
|
+
}
|
|
205
|
+
.circularProgressIndicator .progressRing {
|
|
206
|
+
/* Mask the progress ring to show only the progress portion */
|
|
207
|
+
}
|
|
208
|
+
.circularProgressIndicator .progressRing:before {
|
|
209
|
+
width: calc(var(--progressRingSize) + var(--progressRingThickness) + 2px);
|
|
210
|
+
height: calc(var(--progressRingSize) + var(--progressRingThickness) + 2px);
|
|
211
|
+
border: 1px solid #fff;
|
|
212
|
+
z-index: 1;
|
|
213
|
+
/* This css is correct. Ignore VSCode warning. */
|
|
214
|
+
background-image: conic-gradient(from var(--progressStartAngle), transparent 0 calc(var(--progress) - 0.2%), var(--progressIndicatorBgColor) calc(var(--progress) + 0.2%));
|
|
215
|
+
}
|
|
216
|
+
.circularProgressIndicator .progressRing:after {
|
|
217
|
+
z-index: 2;
|
|
218
|
+
width: calc(var(--progressRingSize) - var(--progressRingThickness));
|
|
219
|
+
height: calc(var(--progressRingSize) - var(--progressRingThickness));
|
|
220
|
+
background-color: var(--progressIndicatorBgColor);
|
|
221
|
+
box-shadow: inset 1px 1px 10px 1px rgba(0, 0, 0, 0.15), inset -2px -2px 5px 1px rgba(0, 0, 0, 0.15);
|
|
222
|
+
}
|
|
223
|
+
.circularProgressIndicator .actionIcon {
|
|
224
|
+
position: absolute;
|
|
225
|
+
top: 50%;
|
|
226
|
+
left: 50%;
|
|
227
|
+
transform: translate(-50%, -50%);
|
|
228
|
+
width: 50%;
|
|
229
|
+
height: 50%;
|
|
230
|
+
display: flex;
|
|
231
|
+
flex-direction: column;
|
|
232
|
+
align-items: center;
|
|
233
|
+
text-align: center;
|
|
234
|
+
justify-content: center;
|
|
235
|
+
}
|
|
236
|
+
.circularProgressIndicator .actionIcon .icon {
|
|
237
|
+
height: 24px;
|
|
238
|
+
font-size: 24px;
|
|
239
|
+
line-height: 1;
|
|
240
|
+
}
|
|
241
|
+
.circularProgressIndicator .actionIcon .labelText {
|
|
242
|
+
font-size: 13px;
|
|
243
|
+
line-height: 1;
|
|
244
|
+
}
|
|
245
|
+
.circularProgressIndicator .actionIcon .iconSvg {
|
|
246
|
+
fill: none;
|
|
247
|
+
stroke-width: 1.5;
|
|
248
|
+
stroke-linecap: round;
|
|
249
|
+
stroke-linejoin: round;
|
|
250
|
+
height: 24px;
|
|
251
|
+
}
|
|
252
|
+
.circularProgressIndicator .actionIcon .iconSvg .svgIconColor_1 {
|
|
253
|
+
stroke: #000;
|
|
254
|
+
}
|
|
255
|
+
.circularProgressIndicator .actionIcon .iconSvg .svgIconColor_2 {
|
|
256
|
+
stroke: #000;
|
|
257
|
+
}
|
|
258
|
+
.circularProgressIndicator .actionIcon .iconSvg .svgIconFill_1 {
|
|
259
|
+
fill: var(--progressRingColor);
|
|
260
|
+
}
|
|
261
|
+
.circularProgressIndicator .statusIndicator {
|
|
262
|
+
position: absolute;
|
|
263
|
+
top: 9%;
|
|
264
|
+
right: 9%;
|
|
265
|
+
width: 20px;
|
|
266
|
+
height: 20px;
|
|
267
|
+
border-radius: 50%;
|
|
268
|
+
border: 2px solid;
|
|
269
|
+
font-size: 20px;
|
|
270
|
+
font-weight: bold;
|
|
271
|
+
background: #fff;
|
|
272
|
+
display: flex;
|
|
273
|
+
justify-content: center;
|
|
274
|
+
align-items: center;
|
|
275
|
+
text-align: center;
|
|
276
|
+
}
|
|
277
|
+
.circularProgressIndicator .statusIndicator .tooltip {
|
|
278
|
+
margin: 0;
|
|
279
|
+
width: 100%;
|
|
280
|
+
}
|
|
281
|
+
.circularProgressIndicator .statusIndicator .tooltip > span.icon_only { /* Non-button passive tooltip version */
|
|
282
|
+
left: 0;
|
|
283
|
+
top: 0;
|
|
284
|
+
min-width: auto;
|
|
285
|
+
min-height: auto;
|
|
286
|
+
width: 100%;
|
|
287
|
+
height: 100%;
|
|
288
|
+
}
|
|
289
|
+
.circularProgressIndicator .statusIndicator .tooltip > span.icon_only .icon,
|
|
290
|
+
.circularProgressIndicator .statusIndicator .tooltip > span.icon_only .svgIcon {
|
|
291
|
+
width: 100%;
|
|
292
|
+
height: 100%;
|
|
293
|
+
}
|
|
294
|
+
.circularProgressIndicator .statusIndicator .statusIcon .icon {
|
|
295
|
+
font-size: 14px;
|
|
296
|
+
background: none;
|
|
297
|
+
}
|
|
298
|
+
.circularProgressIndicator .statusIndicator .statusIcon .icon.icon-warning {
|
|
299
|
+
position: relative;
|
|
300
|
+
top: -1px;
|
|
301
|
+
}
|