@apple-pie/slice 0.1.6 → 0.1.7
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/chunks/{Avatar-YNcGDUzr.js → Avatar-8XLnVICd.js} +6 -4
- package/dist/cjs/chunks/{AvatarGroup-Dn5R1XIU.js → AvatarGroup-BhKZvX8M.js} +1 -1
- package/dist/cjs/chunks/{Button-Ck4syxwn.js → Button-D8_eyuOA.js} +9 -6
- package/dist/cjs/chunks/{ButtonBar-Cx9Xwddh.js → ButtonBar-DwMLfvi8.js} +11 -15
- package/dist/cjs/chunks/{Camera-BrLRwcw1.js → Camera-CxHdYGEa.js} +11 -8
- package/dist/cjs/chunks/{Card-CYDP4vAN.js → Card-D4YkmNC7.js} +5 -8
- package/dist/cjs/chunks/{CheckBox-DYG1fNWy.js → CheckBox-CmTQ6KW1.js} +9 -14
- package/dist/cjs/chunks/{Chip-CqOwsrmt.js → Chip-CwMJOnBV.js} +5 -5
- package/dist/cjs/chunks/{DivInput-C73sqUF3.js → DivInput-DdZA8S1k.js} +1 -1
- package/dist/cjs/chunks/{DocIcons-B5TcBqSH.js → DocIcons-BZI6JMyw.js} +1 -1
- package/dist/cjs/chunks/{DrggablePanel-BzvBBhS7.js → DrggablePanel-CkhCXqKv.js} +1 -1
- package/dist/cjs/chunks/{DropDown-Bo0bxkFk.js → DropDown-Ce8aU2va.js} +2 -2
- package/dist/cjs/chunks/{FileIcon-hYwcre20.js → FileIcon-CZLe2S2l.js} +3 -3
- package/dist/cjs/chunks/{FileList-bA8PoGOh.js → FileList-tivoUJSP.js} +11 -4
- package/dist/cjs/chunks/{Grouper-BszVihfB.js → Grouper-BbovOSYw.js} +8 -7
- package/dist/cjs/chunks/{_types-NyUTfBLR.js → Icon-N0YJuKQf.js} +68 -44
- package/dist/cjs/chunks/{IconButton-yWq-C437.js → IconButton-BXotgG2u.js} +9 -6
- package/dist/cjs/chunks/{Label-D15cIroT.js → Label-CZvJbATa.js} +16 -11
- package/dist/cjs/chunks/{Overlay-DL0EJDyk.js → Overlay-BX6vXX9F.js} +1 -1
- package/dist/cjs/chunks/{Pager-TUxcWbmn.js → Pager-Da9AqSFN.js} +1 -1
- package/dist/cjs/chunks/{ProgressIndicator-Dvq4eIWW.js → ProgressIndicator-opbbADog.js} +2 -2
- package/dist/cjs/chunks/{PromptInput-Hgh6995X.js → PromptInput-tA4fpOTk.js} +1 -1
- package/dist/cjs/chunks/{RadioButton-Cu-laBV5.js → RadioButton-B8GIKGm-.js} +9 -10
- package/dist/cjs/chunks/{RadioButtonList-COS7jfsC.js → RadioButtonList-3o1IvhdC.js} +11 -5
- package/dist/cjs/chunks/{SSEConnection-B_yE8cXz.js → SSEConnection-C-1OzEOp.js} +29 -15
- package/dist/cjs/chunks/{Slider-BeXrWjVx.js → Slider-CnXBacf-.js} +65 -36
- package/dist/cjs/chunks/{Switch-Xqf0vwul.js → Switch-BiTshVLM.js} +6 -3
- package/dist/cjs/chunks/{TabBar-DCRr3l9L.js → TabBar-DZ2y7owf.js} +48 -12
- package/dist/cjs/chunks/{TextArea-DM0aHGGt.js → TextArea-DXcMRUfI.js} +1 -1
- package/dist/cjs/chunks/{TextField-DQgpDpR1.js → TextField-CkfTNM6_.js} +11 -6
- package/dist/cjs/chunks/{Tip-ik8-p4_4.js → Tip-59T3TUN4.js} +1 -1
- package/dist/cjs/chunks/{Toast-D-Y1Ytnb.js → Toast-skIBuJ3b.js} +2 -2
- package/dist/cjs/chunks/{UploadArea-Y_B35qjZ.js → UploadArea-B8mJRc0a.js} +15 -10
- package/dist/cjs/chunks/{WSConnection-DCBuJGmb.js → WSConnection-DrOC8Z0R.js} +32 -23
- package/dist/cjs/chunks/_types-BD6txsj1.js +118 -0
- package/dist/cjs/chunks/{colors-uej0anrN.js → colors-njquvHkx.js} +1 -1
- package/dist/cjs/chunks/debounce-BF4i6uIC.js +18 -0
- package/dist/cjs/chunks/{misc-C-M6KKsH.js → misc-BTF7BCZW.js} +21 -12
- package/dist/cjs/chunks/{sseStore-CIIeshjm.js → sseStore-1OeJ9TRP.js} +1 -1
- package/dist/cjs/components/Avatar/index.js +2 -2
- package/dist/cjs/components/AvatarGroup/index.js +2 -2
- package/dist/cjs/components/Button/index.js +3 -3
- package/dist/cjs/components/ButtonBar/index.js +3 -3
- package/dist/cjs/components/Camera/index.js +4 -4
- package/dist/cjs/components/Card/index.js +5 -6
- package/dist/cjs/components/CheckBox/index.js +6 -7
- package/dist/cjs/components/Chip/index.js +2 -2
- package/dist/cjs/components/DivInput/index.js +2 -2
- package/dist/cjs/components/DocIcon/index.js +1 -1
- package/dist/cjs/components/DraggablePanel/index.js +2 -2
- package/dist/cjs/components/DropDown/index.js +2 -2
- package/dist/cjs/components/FileIcon/index.js +2 -2
- package/dist/cjs/components/FileList/index.js +4 -4
- package/dist/cjs/components/Grouper/index.js +3 -3
- package/dist/cjs/components/Icon/index.js +3 -8
- package/dist/cjs/components/IconButton/index.js +3 -3
- package/dist/cjs/components/Label/index.js +2 -2
- package/dist/cjs/components/Overlay/index.js +1 -1
- package/dist/cjs/components/Pager/index.js +2 -2
- package/dist/cjs/components/Progress/index.js +3 -3
- package/dist/cjs/components/PromptInput/index.js +6 -6
- package/dist/cjs/components/RadioButton/index.js +2 -2
- package/dist/cjs/components/RadioButtonList/index.js +7 -7
- package/dist/cjs/components/Slider/index.js +4 -3
- package/dist/cjs/components/Switch/index.js +1 -1
- package/dist/cjs/components/TabBar/index.js +3 -3
- package/dist/cjs/components/TextArea/index.js +6 -7
- package/dist/cjs/components/Textfield/index.js +5 -5
- package/dist/cjs/components/Tip/index.js +2 -2
- package/dist/cjs/components/Toast/index.js +2 -2
- package/dist/cjs/components/UploadArea/index.js +6 -6
- package/dist/cjs/hooks/useTrackRenders.js +1 -1
- package/dist/cjs/index.js +9 -14
- package/dist/cjs/stores/SSE.js +2 -2
- package/dist/cjs/stores/WS.js +1 -1
- package/dist/cjs/stores.js +2 -2
- package/dist/cjs/utils/index.js +4 -3
- package/dist/cjs/utils/objects/index.js +1 -1
- package/dist/esm/chunks/{Avatar-CDMV6f9w.mjs → Avatar-DGRMsHdO.mjs} +7 -5
- package/dist/esm/chunks/{AvatarGroup-BZ18GwhK.mjs → AvatarGroup-C9Ka1e9P.mjs} +1 -1
- package/dist/esm/chunks/{Button-DexmN81C.mjs → Button-DAvVj4YV.mjs} +8 -5
- package/dist/esm/chunks/{ButtonBar-C-LwBxlY.mjs → ButtonBar-Cw73kooJ.mjs} +11 -15
- package/dist/esm/chunks/{Camera-DdUBZi52.mjs → Camera-BrdJGlv6.mjs} +12 -9
- package/dist/esm/chunks/{Card-DUfnTA5v.mjs → Card-DGlv1PII.mjs} +4 -7
- package/dist/esm/chunks/{CheckBox-Bnd3UAt0.mjs → CheckBox-B7UCZvRv.mjs} +9 -14
- package/dist/esm/chunks/{Chip-BJS4oJBL.mjs → Chip-BPF7fBba.mjs} +5 -3
- package/dist/esm/chunks/{DivInput-B7BliU1p.mjs → DivInput-Ch9XjfWd.mjs} +1 -1
- package/dist/esm/chunks/{DocIcons-BxtcXsWI.mjs → DocIcons-B4xsPrXM.mjs} +1 -1
- package/dist/esm/chunks/{DrggablePanel-DvactFf5.mjs → DrggablePanel-Ddi0vPRp.mjs} +1 -1
- package/dist/esm/chunks/{DropDown-CbX16ETP.mjs → DropDown-Cvf2d_3u.mjs} +1 -1
- package/dist/esm/chunks/{FileIcon-CC_k5dUW.mjs → FileIcon-ePouoJpT.mjs} +3 -3
- package/dist/esm/chunks/{FileList-E5uvcN2J.mjs → FileList-BHCGzX_0.mjs} +11 -6
- package/dist/esm/chunks/{Grouper-X9OursiT.mjs → Grouper-B_FutfjV.mjs} +6 -5
- package/dist/esm/chunks/{_types-C8GP_aSD.mjs → Icon-C92f63Ib.mjs} +69 -46
- package/dist/esm/chunks/{IconButton-B5WEf-v5.mjs → IconButton-4O5S9S9G.mjs} +9 -6
- package/dist/esm/chunks/{Label-DOvquc82.mjs → Label-7ezP3eHw.mjs} +16 -11
- package/dist/esm/chunks/{Overlay-Cw9o1fHb.mjs → Overlay-TOzZXnwF.mjs} +1 -1
- package/dist/esm/chunks/{Pager-BX4TMwD_.mjs → Pager-BlLYeA2F.mjs} +1 -1
- package/dist/esm/chunks/{ProgressIndicator-DeLwB3Rb.mjs → ProgressIndicator-BVwQNOcV.mjs} +1 -1
- package/dist/esm/chunks/{PromptInput-BdMotrXA.mjs → PromptInput-pKwwzyAd.mjs} +2 -2
- package/dist/esm/chunks/{RadioButton-D6kP8p0n.mjs → RadioButton-COEnChNW.mjs} +9 -10
- package/dist/esm/chunks/{RadioButtonList-guQECpwi.mjs → RadioButtonList-De3rbLQb.mjs} +12 -6
- package/dist/esm/chunks/{SSEConnection-Dj9P0SWE.mjs → SSEConnection-DcA3wFsO.mjs} +29 -14
- package/dist/esm/chunks/{Slider-ZuSvETfo.mjs → Slider-DL2iuNlh.mjs} +69 -34
- package/dist/esm/chunks/{Switch-nWg2Ykea.mjs → Switch-Cv6LABsW.mjs} +6 -3
- package/dist/esm/chunks/{TabBar-BYtGaj_A.mjs → TabBar-qiozE5zA.mjs} +49 -13
- package/dist/esm/chunks/{TextArea-D88dZrXm.mjs → TextArea-yF2pGeel.mjs} +1 -1
- package/dist/esm/chunks/{TextField-DvTB_JoS.mjs → TextField-CgnPj6oK.mjs} +11 -6
- package/dist/esm/chunks/{Tip-B-cDOFvV.mjs → Tip-CroDIKO4.mjs} +1 -1
- package/dist/esm/chunks/{Toast-BdlopzJ6.mjs → Toast-CM493gMR.mjs} +2 -2
- package/dist/esm/chunks/{UploadArea--i-bbRIJ.mjs → UploadArea-BNf1y8Ep.mjs} +18 -13
- package/dist/esm/chunks/{WSConnection-DlYSitff.mjs → WSConnection-D9mpsVdc.mjs} +32 -23
- package/dist/esm/chunks/_types-C2C2Zwd0.mjs +118 -0
- package/dist/esm/chunks/{colors-DR9fLI5X.mjs → colors-FQ0uNQcW.mjs} +2 -2
- package/dist/esm/chunks/debounce-Bst1jxMS.mjs +19 -0
- package/dist/esm/chunks/{misc-cg9I7drO.mjs → misc-N8KLjOXc.mjs} +22 -12
- package/dist/esm/chunks/{sseStore-DdqmnAAf.mjs → sseStore-2JIpEKfz.mjs} +1 -1
- package/dist/esm/components/Avatar/index.mjs +2 -2
- package/dist/esm/components/AvatarGroup/index.mjs +3 -3
- package/dist/esm/components/Button/index.mjs +4 -4
- package/dist/esm/components/ButtonBar/index.mjs +4 -4
- package/dist/esm/components/Camera/index.mjs +5 -5
- package/dist/esm/components/Card/index.mjs +3 -3
- package/dist/esm/components/CheckBox/index.mjs +5 -5
- package/dist/esm/components/Chip/index.mjs +3 -3
- package/dist/esm/components/DivInput/index.mjs +2 -2
- package/dist/esm/components/DocIcon/index.mjs +1 -1
- package/dist/esm/components/DraggablePanel/index.mjs +2 -2
- package/dist/esm/components/DropDown/index.mjs +3 -3
- package/dist/esm/components/FileIcon/index.mjs +2 -2
- package/dist/esm/components/FileList/index.mjs +5 -5
- package/dist/esm/components/Grouper/index.mjs +3 -3
- package/dist/esm/components/Icon/index.mjs +4 -2
- package/dist/esm/components/IconButton/index.mjs +3 -3
- package/dist/esm/components/Label/index.mjs +2 -2
- package/dist/esm/components/Overlay/index.mjs +1 -1
- package/dist/esm/components/Pager/index.mjs +2 -2
- package/dist/esm/components/Progress/index.mjs +3 -3
- package/dist/esm/components/PromptInput/index.mjs +7 -7
- package/dist/esm/components/RadioButton/index.mjs +3 -3
- package/dist/esm/components/RadioButtonList/index.mjs +4 -4
- package/dist/esm/components/Slider/index.mjs +4 -2
- package/dist/esm/components/Switch/index.mjs +1 -1
- package/dist/esm/components/TabBar/index.mjs +4 -4
- package/dist/esm/components/TextArea/index.mjs +5 -5
- package/dist/esm/components/Textfield/index.mjs +6 -6
- package/dist/esm/components/Tip/index.mjs +2 -2
- package/dist/esm/components/Toast/index.mjs +3 -3
- package/dist/esm/components/UploadArea/index.mjs +6 -6
- package/dist/esm/hooks/useTrackRenders.mjs +1 -1
- package/dist/esm/index.mjs +38 -34
- package/dist/esm/stores/SSE.mjs +2 -2
- package/dist/esm/stores/WS.mjs +1 -1
- package/dist/esm/stores.mjs +2 -2
- package/dist/esm/utils/index.mjs +6 -4
- package/dist/esm/utils/objects/index.mjs +2 -2
- package/dist/types/components/Button/Button.d.ts +3 -3
- package/dist/types/components/Button/_types.d.ts +2 -2
- package/dist/types/components/Camera/_types.d.ts +1 -0
- package/dist/types/components/Card/_types.d.ts +1 -1
- package/dist/types/components/Chip/_types.d.ts +1 -2
- package/dist/types/components/Grouper/_types.d.ts +1 -1
- package/dist/types/components/Icon/_types.d.ts +116 -83
- package/dist/types/components/Icon/index.d.ts +1 -1
- package/dist/types/components/IconButton/_types.d.ts +2 -2
- package/dist/types/components/Label/_types.d.ts +1 -1
- package/dist/types/components/RadioButton/_types.d.ts +2 -1
- package/dist/types/components/Switch/_types.d.ts +1 -1
- package/dist/types/components/TabBar/_types.d.ts +2 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/functions/colors.d.ts +2 -2
- package/dist/types/utils/functions/debounce.d.ts +1 -2
- package/dist/types/utils/functions/files.d.ts +7 -1
- package/dist/types/utils/functions/misc.d.ts +19 -11
- package/dist/types/utils/index.d.ts +3 -2
- package/dist/types/utils/objects/SSEConnection/SSEConnection.d.ts +29 -8
- package/dist/types/utils/objects/WSConnection/WSConnection.d.ts +32 -20
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/
|
|
|
4
4
|
|
|
5
5
|
require("../theme/colors.js"), require("../hooks/useWindow.js");
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var Icon = require("./Icon-N0YJuKQf.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css = {
|
|
8
8
|
wrapper: "DropDown-module_wrapper__CyX0u flexBox-module_rowStart__4tcxS",
|
|
9
9
|
face: "DropDown-module_face__6gyF3 flexBox-module_rowStart__4tcxS",
|
|
10
10
|
small: "DropDown-module_small__5R9bM type-module_body-s-regular__vRHSP",
|
|
@@ -81,7 +81,7 @@ const DropDown = React.memo(props => {
|
|
|
81
81
|
children: displayText
|
|
82
82
|
}), jsxRuntime.jsx("div", {
|
|
83
83
|
className: css.chevron,
|
|
84
|
-
children: jsxRuntime.jsx(
|
|
84
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
85
85
|
name: "chevron down",
|
|
86
86
|
size: iconSize,
|
|
87
87
|
strokeColor: color
|
|
@@ -4,7 +4,7 @@ var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/
|
|
|
4
4
|
|
|
5
5
|
require("../theme/colors.js"), require("../hooks/useWindow.js");
|
|
6
6
|
|
|
7
|
-
var FileIconNames, misc = require("./misc-
|
|
7
|
+
var FileIconNames, misc = require("./misc-BTF7BCZW.js");
|
|
8
8
|
|
|
9
9
|
exports.FileIconNames = void 0, (FileIconNames = exports.FileIconNames || (exports.FileIconNames = {})).pdf = "pdf",
|
|
10
10
|
FileIconNames.text = "text", FileIconNames.sheet = "sheet", FileIconNames.preso = "preso",
|
|
@@ -186,7 +186,7 @@ const iconColorSchemes = {
|
|
|
186
186
|
}) ]
|
|
187
187
|
})
|
|
188
188
|
} ] ]), FileIcon = React.memo(props => {
|
|
189
|
-
const {name: name = "pdf", size: size = 24, pointer: pointer = !1, disabled: disabled = !1, onClick: onClick} = props, svgAttributes = tslib_es6.__rest(props, [ "name", "size", "pointer", "disabled", "onClick" ]), {id: svgId, className: className, style: style} = svgAttributes, rest = tslib_es6.__rest(svgAttributes, [ "id", "className", "style" ]),
|
|
189
|
+
const {isDark: isDark} = hooks_useTheme.useTheme(), {name: name = "pdf", size: size = 24, pointer: pointer = !1, disabled: disabled = !1, onClick: onClick} = props, svgAttributes = tslib_es6.__rest(props, [ "name", "size", "pointer", "disabled", "onClick" ]), {id: svgId, className: className, style: style} = svgAttributes, rest = tslib_es6.__rest(svgAttributes, [ "id", "className", "style" ]), svgStyle = null != style ? style : {}, cursor = React.useMemo(() => disabled ? "default" : pointer ? "pointer" : "inherit", [ disabled, pointer ]), iconStyle = React.useMemo(() => ({
|
|
190
190
|
cursor: cursor,
|
|
191
191
|
userSelect: "none",
|
|
192
192
|
WebkitUserSelect: "none",
|
|
@@ -203,7 +203,7 @@ const iconColorSchemes = {
|
|
|
203
203
|
width: size,
|
|
204
204
|
height: size,
|
|
205
205
|
viewBox: "0 0 20 20",
|
|
206
|
-
style: Object.assign(Object.assign({},
|
|
206
|
+
style: Object.assign(Object.assign({}, svgStyle), iconStyle),
|
|
207
207
|
onClick: handleClick,
|
|
208
208
|
role: pointer ? "button" : "img",
|
|
209
209
|
"aria-label": `${name} icon`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-
|
|
3
|
+
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-BTF7BCZW.js"), FileIcon = require("./FileIcon-CZLe2S2l.js"), Icon = require("./Icon-N0YJuKQf.js"), ProgressIndicator = require("./ProgressIndicator-opbbADog.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js");
|
|
4
4
|
|
|
5
5
|
var css = {
|
|
6
6
|
wrapper: "FileList-module_wrapper__9-rrl flexBox-module_rowStart__4tcxS",
|
|
@@ -33,14 +33,21 @@ styleInject_es.styleInject('.flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tju
|
|
|
33
33
|
|
|
34
34
|
const FileList = React.memo(props => {
|
|
35
35
|
const {files: files = [], onChange: onChange, onToolTip: onToolTip, maxWidth: maxWidth, minWidth: minWidth, direction: direction = "row", padding: padding, gap: gap = 10, size: size = "s", iconSize: iconSize = 24, bgColor: bgColor, canRemove: canRemove = !0} = props, divAttributes = tslib_es6.__rest(props, [ "files", "onChange", "onToolTip", "maxWidth", "minWidth", "direction", "padding", "gap", "size", "iconSize", "bgColor", "canRemove" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", fileNameToFileItem = React.useCallback(fileName => {
|
|
36
|
-
const {ext: ext, name: name} =
|
|
36
|
+
const {ext: ext, name: name} =
|
|
37
|
+
/**
|
|
38
|
+
* Split a file name into its display name and extension.
|
|
39
|
+
*/
|
|
40
|
+
function(fileName) {
|
|
37
41
|
var _a;
|
|
38
42
|
const ext = null !== (_a = fileName.split(".").pop()) && void 0 !== _a ? _a : "unknown";
|
|
39
43
|
return {
|
|
40
44
|
name: fileName,
|
|
41
45
|
ext: ext
|
|
42
46
|
};
|
|
43
|
-
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Map a file extension to the corresponding file icon name.
|
|
50
|
+
*/ (fileName);
|
|
44
51
|
return {
|
|
45
52
|
name: name,
|
|
46
53
|
ext: ext,
|
|
@@ -201,7 +208,7 @@ const FileList = React.memo(props => {
|
|
|
201
208
|
onClick: () => handleRemove(i.index),
|
|
202
209
|
onKeyDown: e => misc.accessibleKeyDown(e, () => handleRemove(i.index)),
|
|
203
210
|
tabIndex: 0,
|
|
204
|
-
children: jsxRuntime.jsx(
|
|
211
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
205
212
|
name: "x",
|
|
206
213
|
style: {
|
|
207
214
|
pointerEvents: "none"
|
|
@@ -4,12 +4,12 @@ var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/
|
|
|
4
4
|
|
|
5
5
|
require("../theme/colors.js"), require("../hooks/useWindow.js");
|
|
6
6
|
|
|
7
|
-
var Badge = require("./Badge-CY_DG6cD.js"),
|
|
7
|
+
var Badge = require("./Badge-CY_DG6cD.js"), Icon = require("./Icon-N0YJuKQf.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_header = "Grouper-module_header__D5fV0 flexBox-module_rowBetween__5FEvi", css_title = "Grouper-module_title__ZKqTP flexBox-module_rowBetween__5FEvi type-module_body-m-regular__LuQBA", css_content = "Grouper-module_content__Mof50 flexBox-module_rowBetween__5FEvi", css_icon = "Grouper-module_icon__14Jis flexBox-module_row__z24tF";
|
|
8
8
|
|
|
9
|
-
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Grouper-module_header__D5fV0 {\n\twidth: 100%;\n\tcursor: pointer;\n}\n\n.Grouper-module_title__ZKqTP {\n\tcolor: var(--core-text-primary);\n\tflex: 1;\n}\n\n.Grouper-module_content__Mof50 {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tpadding: 0 24px !important;\n\twidth: 100%;\n\tgap: 6px;\n\theight: var(--grouper-height);\n\tborder-top: var(--grouper-border) solid var(--core-outline-primary);\n}\n\n.Grouper-module_icon__14Jis {\n\tmin-height: var(--grouper-icon-size);\n\theight: var(--grouper-icon-size);\n\tmin-width: var(--grouper-icon-size);\n\twidth: var(--grouper-icon-size);\n}\n");
|
|
9
|
+
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Grouper-module_header__D5fV0 {\n\twidth: 100%;\n\tcursor: pointer;\n\tappearance: none;\n\t-webkit-appearance: none;\n\tbackground-image: none;\n\tbackground-color: transparent;\n\tborder: 0;\n\toutline: none;\n\tpadding: 0;\n}\n\n.Grouper-module_title__ZKqTP {\n\tcolor: var(--core-text-primary);\n\tflex: 1;\n}\n\n.Grouper-module_content__Mof50 {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tpadding: 0 24px !important;\n\twidth: 100%;\n\tgap: 6px;\n\theight: var(--grouper-height);\n\tborder-top: var(--grouper-border) solid var(--core-outline-primary);\n}\n\n.Grouper-module_icon__14Jis {\n\tmin-height: var(--grouper-icon-size);\n\theight: var(--grouper-icon-size);\n\tmin-width: var(--grouper-icon-size);\n\twidth: var(--grouper-icon-size);\n}\n");
|
|
10
10
|
|
|
11
11
|
const Grouper = React.memo(props => {
|
|
12
|
-
const {title: title = "Group Title", toggle: toggle = !0, open: open = !0, hasIcon: hasIcon = !0, iconName: iconName = "chevron down", iconSize: iconSize = 18, frameSize: frameSize = 64, border: border = 0, count: count = 0, unframed: unframed = !1, hideNull: hideNull = !0, showFilterBadge: showFilterBadge = !1, onChange: onChange = () => null, onClick: onClick = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "title", "toggle", "open", "hasIcon", "iconName", "iconSize", "frameSize", "border", "count", "unframed", "hideNull", "showFilterBadge", "onChange", "onClick" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "",
|
|
12
|
+
const theme = hooks_useTheme.useTheme(), {title: title = "Group Title", toggle: toggle = !0, open: open = !0, hasIcon: hasIcon = !0, iconName: iconName = "chevron down", iconSize: iconSize = 18, frameSize: frameSize = 64, border: border = 0, count: count = 0, unframed: unframed = !1, hideNull: hideNull = !0, showFilterBadge: showFilterBadge = !1, onChange: onChange = () => null, onClick: onClick = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "title", "toggle", "open", "hasIcon", "iconName", "iconSize", "frameSize", "border", "count", "unframed", "hideNull", "showFilterBadge", "onChange", "onClick" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [state, setState] = React.useState(open), [icon, animateIcon] = react.useAnimate();
|
|
13
13
|
React.useEffect(() => setState(open), [ open ]);
|
|
14
14
|
const animate = React.useCallback(state => {
|
|
15
15
|
const animation = {
|
|
@@ -26,12 +26,13 @@ const Grouper = React.memo(props => {
|
|
|
26
26
|
"--grouper-border": border ? `${border}px` : "0",
|
|
27
27
|
"--grouper-icon-size": `${iconSize}px`
|
|
28
28
|
}), [ frameSize, iconSize, border, unframed ]);
|
|
29
|
-
return jsxRuntime.jsx("
|
|
29
|
+
return jsxRuntime.jsx("button", Object.assign({
|
|
30
30
|
id: divId,
|
|
31
|
+
type: "button",
|
|
31
32
|
className: `${css_header}${divClass}`,
|
|
32
33
|
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
33
34
|
onClick: handleToggle,
|
|
34
|
-
|
|
35
|
+
"aria-expanded": state
|
|
35
36
|
}, rest, {
|
|
36
37
|
children: jsxRuntime.jsxs("div", {
|
|
37
38
|
className: css_content,
|
|
@@ -41,7 +42,7 @@ const Grouper = React.memo(props => {
|
|
|
41
42
|
hideNull: hideNull,
|
|
42
43
|
count: count,
|
|
43
44
|
variant: "light"
|
|
44
|
-
}), showFilterBadge && jsxRuntime.jsx(
|
|
45
|
+
}), showFilterBadge && jsxRuntime.jsx(Icon.Icon, {
|
|
45
46
|
name: "filter",
|
|
46
47
|
size: 16,
|
|
47
48
|
strokeColor: theme.current.colors["core-text-disabled"]
|
|
@@ -49,7 +50,7 @@ const Grouper = React.memo(props => {
|
|
|
49
50
|
}), hasIcon && jsxRuntime.jsx("div", {
|
|
50
51
|
ref: icon,
|
|
51
52
|
className: css_icon,
|
|
52
|
-
children: jsxRuntime.jsx(
|
|
53
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
53
54
|
name: iconName,
|
|
54
55
|
size: iconSize
|
|
55
56
|
})
|
|
@@ -4,7 +4,7 @@ var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/
|
|
|
4
4
|
|
|
5
5
|
require("../theme/colors.js"), require("../hooks/useWindow.js");
|
|
6
6
|
|
|
7
|
-
var misc = require("./misc-
|
|
7
|
+
var misc = require("./misc-BTF7BCZW.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_icon = "Icon-module_icon__szG-X";
|
|
8
8
|
|
|
9
9
|
styleInject_es.styleInject(".Icon-module_icon__szG-X {\n\tcursor: var(--cursor);\n\tuser-select: none;\n\t--webkit-user-select: none;\n\t-webkit-tap-highlight-color: transparent;\n\toutline: none;\n\tborder: 0;\n\ttransition: stroke, fill var(--motion-water-duration) var(--motion-water);\n}\n\npath,\ncircle,\nrect,\npolyline,\npolygon,\nline {\n\ttransition: stroke, fill var(--motion-water-duration) var(--motion-water);\n}\n");
|
|
10
10
|
|
|
@@ -552,9 +552,9 @@ const STATIC_ICON_REGISTRY = new Map([ [ "target", {
|
|
|
552
552
|
fill: strokeColor
|
|
553
553
|
})
|
|
554
554
|
} ], [ "linkedin", {
|
|
555
|
-
line:
|
|
555
|
+
line: ({strokeColor: strokeColor}) => jsxRuntime.jsx("path", {
|
|
556
556
|
d: "M 16.4 16.259 L 13.766 16.259 L 13.766 12.133 C 13.766 11.15 13.748 9.883 12.396 9.883 C 11.023 9.883 10.813 10.955 10.813 12.061 L 10.813 16.258 L 8.18 16.258 L 8.18 7.775 L 10.709 7.775 L 10.709 8.933 L 10.743 8.933 C 11.259 8.052 12.218 7.525 13.239 7.563 C 15.909 7.563 16.401 9.319 16.401 11.603 L 16.4 16.258 Z M 5.208 6.615 C 4.652 6.63 4.132 6.343 3.849 5.863 C 3.567 5.384 3.567 4.79 3.849 4.311 C 4.132 3.832 4.652 3.544 5.208 3.559 C 6.036 3.581 6.695 4.259 6.695 5.087 C 6.695 5.915 6.036 6.593 5.208 6.615 Z M 6.524 16.259 L 3.888 16.259 L 3.888 7.775 L 6.524 7.775 Z M 17.713 1.111 L 2.564 1.111 C 1.848 1.103 1.261 1.677 1.252 2.393 L 1.252 17.604 C 1.256 17.948 1.396 18.277 1.642 18.518 C 1.888 18.759 2.219 18.892 2.563 18.889 L 17.713 18.889 C 18.431 18.898 19.02 18.324 19.03 17.606 L 19.03 2.392 C 19.02 1.675 18.43 1.102 17.713 1.111",
|
|
557
|
-
fill:
|
|
557
|
+
fill: strokeColor
|
|
558
558
|
})
|
|
559
559
|
} ], [ "google", {
|
|
560
560
|
line: _props => jsxRuntime.jsxs("g", {
|
|
@@ -573,6 +573,23 @@ const STATIC_ICON_REGISTRY = new Map([ [ "target", {
|
|
|
573
573
|
fill: "rgb(66,128,239)"
|
|
574
574
|
}) ]
|
|
575
575
|
})
|
|
576
|
+
} ], [ "google mono", {
|
|
577
|
+
line: ({strokeColor: strokeColor}) => jsxRuntime.jsxs("g", {
|
|
578
|
+
transform: "translate(1.05 1.197)",
|
|
579
|
+
children: [ jsxRuntime.jsx("path", {
|
|
580
|
+
d: "M 8.995 3.569 C 10.269 3.549 11.524 4.039 12.446 4.922 L 15.014 2.334 C 13.387 0.804 11.23 -0.019 8.995 0 C 5.583 0 2.485 1.922 0.956 4.961 L 3.936 7.275 C 4.662 5.137 6.642 3.569 8.995 3.569 Z",
|
|
581
|
+
fill: strokeColor
|
|
582
|
+
}), jsxRuntime.jsx("path", {
|
|
583
|
+
d: "M 3.936 10.726 C 3.564 9.608 3.564 8.392 3.936 7.275 L 0.956 4.961 C -0.319 7.51 -0.319 10.51 0.956 13.039 Z",
|
|
584
|
+
fill: strokeColor
|
|
585
|
+
}), jsxRuntime.jsx("path", {
|
|
586
|
+
d: "M 8.995 18 C 11.426 18 13.465 17.196 14.956 15.824 L 12.054 13.588 C 11.25 14.137 10.211 14.451 8.995 14.451 C 6.642 14.451 4.662 12.863 3.936 10.745 L 0.956 13.039 C 2.485 16.078 5.583 18 8.995 18 Z",
|
|
587
|
+
fill: strokeColor
|
|
588
|
+
}), jsxRuntime.jsx("path", {
|
|
589
|
+
d: "M 17.642 9.216 C 17.642 8.608 17.583 7.981 17.485 7.392 L 8.995 7.392 L 8.995 10.863 L 13.858 10.863 C 13.662 11.981 13.014 12.961 12.054 13.588 L 14.956 15.843 C 16.661 14.255 17.642 11.941 17.642 9.216 Z",
|
|
590
|
+
fill: strokeColor
|
|
591
|
+
}) ]
|
|
592
|
+
})
|
|
576
593
|
} ], [ "dollar", {
|
|
577
594
|
line: ({strokeColor: strokeColor}) => jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
578
595
|
children: [ jsxRuntime.jsx("path", {
|
|
@@ -591,7 +608,7 @@ const STATIC_ICON_REGISTRY = new Map([ [ "target", {
|
|
|
591
608
|
d: "M 17 0.5 L 3 0.5 L 3 2 L 17 2 Z M 5.5 16.75 L 14.5 16.75 L 14.5 5.75 L 5.5 5.75 Z M 14.8 18.25 L 5.2 18.25 C 4.537 18.25 4 17.713 4 17.05 L 4 5.45 C 4 4.787 4.537 4.25 5.2 4.25 L 14.8 4.25 C 15.463 4.25 16 4.787 16 5.45 L 16 17.05 C 16 17.713 15.463 18.25 14.8 18.25 Z M 7.25 14.25 L 7.25 8.25 L 8.75 8.25 L 8.75 14.25 Z M 11.25 8.25 L 11.25 14.25 L 12.75 14.25 L 12.75 8.25 Z",
|
|
592
609
|
fill: strokeColor
|
|
593
610
|
})
|
|
594
|
-
} ], [ "recent
|
|
611
|
+
} ], [ "recent", {
|
|
595
612
|
line: ({strokeColor: strokeColor}) => jsxRuntime.jsx("path", {
|
|
596
613
|
d: "M 2 4.25 L 10 4.25 L 10 5.75 L 2 5.75 Z M 18 9.25 L 18 10.75 L 2 10.75 L 2 9.25 Z M 14 14.25 L 2 14.25 L 2 15.75 L 14 15.75 Z",
|
|
597
614
|
fill: strokeColor
|
|
@@ -610,7 +627,7 @@ const STATIC_ICON_REGISTRY = new Map([ [ "target", {
|
|
|
610
627
|
strokeMiterlimit: "10",
|
|
611
628
|
strokeDasharray: ""
|
|
612
629
|
})
|
|
613
|
-
} ], [ "navigate", {
|
|
630
|
+
} ], [ "navigate right", {
|
|
614
631
|
line: ({stroke: stroke, strokeColor: strokeColor}) => jsxRuntime.jsxs("g", {
|
|
615
632
|
transform: "translate(2 4)",
|
|
616
633
|
children: [ jsxRuntime.jsx("path", {
|
|
@@ -632,6 +649,28 @@ const STATIC_ICON_REGISTRY = new Map([ [ "target", {
|
|
|
632
649
|
strokeDasharray: ""
|
|
633
650
|
}) ]
|
|
634
651
|
})
|
|
652
|
+
} ], [ "navigate left", {
|
|
653
|
+
line: ({stroke: stroke, strokeColor: strokeColor}) => jsxRuntime.jsxs("g", {
|
|
654
|
+
transform: "translate(18 4) scale(-1 1)",
|
|
655
|
+
children: [ jsxRuntime.jsx("path", {
|
|
656
|
+
d: "M 0 0 L 16 0 L 16 11.207 L 0 11.207 Z",
|
|
657
|
+
fill: "transparent"
|
|
658
|
+
}), jsxRuntime.jsx("path", {
|
|
659
|
+
d: "M 14.113 4.78 L 6.176 4.78 C 3.227 4.78 0.838 7.28 0.838 10.369 L 0.838 11.179",
|
|
660
|
+
fill: "transparent",
|
|
661
|
+
strokeWidth: stroke,
|
|
662
|
+
stroke: strokeColor,
|
|
663
|
+
strokeMiterlimit: "10",
|
|
664
|
+
strokeDasharray: ""
|
|
665
|
+
}), jsxRuntime.jsx("path", {
|
|
666
|
+
d: "M 10.62 8.972 L 14.81 4.78 L 10.62 0.588",
|
|
667
|
+
fill: "transparent",
|
|
668
|
+
strokeWidth: stroke,
|
|
669
|
+
stroke: strokeColor,
|
|
670
|
+
strokeMiterlimit: "10",
|
|
671
|
+
strokeDasharray: ""
|
|
672
|
+
}) ]
|
|
673
|
+
})
|
|
635
674
|
} ], [ "arrow right", {
|
|
636
675
|
line: ({strokeColor: strokeColor}) => jsxRuntime.jsx("path", {
|
|
637
676
|
d: "M 10.53 3.469 L 16.53 9.469 L 17.06 9.999 L 16.53 10.529 L 10.53 16.529 L 9.47 15.469 L 14.19 10.749 L 4 10.749 L 4 9.249 L 14.19 9.249 L 9.47 4.53 L 10.53 3.47 Z",
|
|
@@ -652,6 +691,14 @@ const STATIC_ICON_REGISTRY = new Map([ [ "target", {
|
|
|
652
691
|
d: "M 16.53 9.47 L 10.53 3.47 L 10 2.94 L 9.469 3.47 L 3.469 9.47 L 4.529 10.53 L 9.249 5.81 L 9.249 16 L 10.749 16 L 10.749 5.81 L 15.469 10.53 L 16.529 9.47 Z",
|
|
653
692
|
fill: strokeColor
|
|
654
693
|
})
|
|
694
|
+
} ], [ "arrow down", {
|
|
695
|
+
line: ({strokeColor: strokeColor}) => jsxRuntime.jsx("g", {
|
|
696
|
+
transform: "translate(20 20) scale(-1 -1)",
|
|
697
|
+
children: jsxRuntime.jsx("path", {
|
|
698
|
+
d: "M 16.53 9.47 L 10.53 3.47 L 10 2.94 L 9.469 3.47 L 3.469 9.47 L 4.529 10.53 L 9.249 5.81 L 9.249 16 L 10.749 16 L 10.749 5.81 L 15.469 10.53 L 16.529 9.47 Z",
|
|
699
|
+
fill: strokeColor
|
|
700
|
+
})
|
|
701
|
+
})
|
|
655
702
|
} ], [ "notification", {
|
|
656
703
|
line: ({stroke: stroke, strokeColor: strokeColor}) => jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
657
704
|
children: [ jsxRuntime.jsx("path", {
|
|
@@ -680,11 +727,6 @@ const STATIC_ICON_REGISTRY = new Map([ [ "target", {
|
|
|
680
727
|
fill: "transparent"
|
|
681
728
|
}) ]
|
|
682
729
|
})
|
|
683
|
-
} ], [ "message", {
|
|
684
|
-
line: ({strokeColor: strokeColor}) => jsxRuntime.jsx("path", {
|
|
685
|
-
d: "M 17.75 5 C 17.75 2.929 16.071 1.25 14 1.25 L 6 1.25 C 3.929 1.25 2.25 2.929 2.25 5 L 2.25 19 L 3.75 19 C 3.75 17.757 4.757 16.75 6 16.75 L 14 16.75 C 16.071 16.75 17.75 15.071 17.75 13 Z M 3.75 16 L 3.75 5 C 3.75 3.757 4.757 2.75 6 2.75 L 14 2.75 C 15.243 2.75 16.25 3.757 16.25 5 L 16.25 13 C 16.25 14.243 15.243 15.25 14 15.25 L 6 15.25 C 5.156 15.25 4.377 15.529 3.75 16 Z",
|
|
686
|
-
fill: strokeColor
|
|
687
|
-
})
|
|
688
730
|
} ], [ "blank", {
|
|
689
731
|
line: _props => jsxRuntime.jsx(jsxRuntime.Fragment, {})
|
|
690
732
|
} ], [ "check", {
|
|
@@ -919,6 +961,17 @@ const STATIC_ICON_REGISTRY = new Map([ [ "target", {
|
|
|
919
961
|
})
|
|
920
962
|
}) ]
|
|
921
963
|
})
|
|
964
|
+
} ], [ "wand", {
|
|
965
|
+
line: ({strokeColor: strokeColor}) => jsxRuntime.jsxs("g", {
|
|
966
|
+
transform: "scale(0.833333)",
|
|
967
|
+
children: [ jsxRuntime.jsx("path", {
|
|
968
|
+
d: "M 0 0 L 24 0 L 24 24 L 0 24 Z",
|
|
969
|
+
fill: "transparent"
|
|
970
|
+
}), jsxRuntime.jsx("path", {
|
|
971
|
+
d: "M 8.599 9.902 C 8.429 9.902 8.303 9.775 8.276 9.594 C 7.972 7.018 7.846 6.954 5.256 6.528 C 5.059 6.491 4.934 6.392 4.934 6.201 C 4.934 6.011 5.059 5.902 5.221 5.875 C 7.828 5.376 7.972 5.385 8.276 2.808 C 8.303 2.627 8.429 2.5 8.599 2.5 C 8.778 2.5 8.904 2.627 8.922 2.799 C 9.253 5.412 9.343 5.494 11.978 5.875 C 12.139 5.893 12.264 6.02 12.264 6.201 C 12.264 6.383 12.139 6.491 11.978 6.528 C 9.343 7.036 9.262 7.036 8.922 9.612 C 8.904 9.775 8.778 9.902 8.599 9.902 Z M 5.265 21.187 C 4.862 21.604 4.181 21.604 3.796 21.187 C 3.401 20.761 3.401 20.108 3.796 19.699 L 12.847 10.51 C 13.25 10.102 13.931 10.102 14.317 10.51 C 14.72 10.936 14.711 11.599 14.317 12.007 Z M 17.794 18.157 C 17.659 18.157 17.588 18.066 17.552 17.949 C 17.229 16.116 17.22 16.007 15.302 15.663 C 15.168 15.644 15.087 15.554 15.087 15.418 C 15.087 15.282 15.177 15.209 15.302 15.173 C 17.211 14.846 17.22 14.728 17.552 12.896 C 17.579 12.769 17.659 12.678 17.794 12.678 C 17.928 12.678 18 12.778 18.036 12.896 C 18.358 14.728 18.367 14.837 20.285 15.173 C 20.41 15.2 20.5 15.282 20.5 15.418 C 20.5 15.554 20.401 15.635 20.285 15.663 C 18.376 15.998 18.367 16.116 18.036 17.949 C 18.009 18.076 17.928 18.157 17.794 18.157 Z M 17.794 8.941 C 17.659 8.941 17.588 8.841 17.552 8.723 C 17.229 6.891 17.22 6.782 15.302 6.446 C 15.177 6.419 15.087 6.337 15.087 6.201 C 15.087 6.065 15.186 5.983 15.302 5.956 C 17.211 5.621 17.22 5.503 17.552 3.67 C 17.579 3.543 17.659 3.462 17.794 3.462 C 17.928 3.462 18 3.552 18.036 3.67 C 18.358 5.503 18.367 5.611 20.285 5.956 C 20.41 5.974 20.5 6.065 20.5 6.201 C 20.5 6.337 20.401 6.41 20.285 6.446 C 18.376 6.773 18.367 6.891 18.036 8.723 C 18.009 8.85 17.928 8.941 17.794 8.941 Z",
|
|
972
|
+
fill: strokeColor
|
|
973
|
+
}) ]
|
|
974
|
+
})
|
|
922
975
|
} ], [ "wallet", {
|
|
923
976
|
line: ({stroke: stroke, strokeColor: strokeColor, coverUp: coverUp}) => jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
924
977
|
children: [ jsxRuntime.jsx("path", {
|
|
@@ -1023,9 +1076,9 @@ const STATIC_ICON_REGISTRY = new Map([ [ "target", {
|
|
|
1023
1076
|
})
|
|
1024
1077
|
} ] ]), Icon = React.memo(props => {
|
|
1025
1078
|
var _a;
|
|
1026
|
-
const theme = hooks_useTheme.useTheme(), {name: name = "home", size: size = 20, stroke: stroke = 1.5, strokeColor: strokeColor = theme.current.colors["core-icon-primary"], fillColor: fillColor = "transparent", coverUp: coverUp = theme.current.colors["core-surface-primary"], toggle: toggle = !1, pointer: pointer = !1, disabled: disabled = !1, onClick: onClick = () => null} = props, svgAttributes = tslib_es6.__rest(props, [ "name", "size", "stroke", "strokeColor", "fillColor", "coverUp", "toggle", "pointer", "disabled", "onClick" ]), {id: svgId, className: className, style: style} = svgAttributes, rest = tslib_es6.__rest(svgAttributes, [ "id", "className", "style" ]), cursor = React.useMemo(() => disabled ? "default" : pointer ? "pointer" : "inherit", [ disabled, pointer ]), iconStyle = React.useMemo(() => ({
|
|
1079
|
+
const theme = hooks_useTheme.useTheme(), {name: name = "home", size: size = 20, stroke: stroke = 1.5, strokeColor: strokeColor = theme.current.colors["core-icon-primary"], fillColor: fillColor = "transparent", coverUp: coverUp = theme.current.colors["core-surface-primary"], toggle: toggle = !1, pointer: pointer = !1, disabled: disabled = !1, onClick: onClick = () => null} = props, svgAttributes = tslib_es6.__rest(props, [ "name", "size", "stroke", "strokeColor", "fillColor", "coverUp", "toggle", "pointer", "disabled", "onClick" ]), {id: svgId, className: className, style: style} = svgAttributes, rest = tslib_es6.__rest(svgAttributes, [ "id", "className", "style" ]), svgStyle = null != style ? style : {}, variantKey = toggle ? "lineOn" : "line", iconVariant = STATIC_ICON_REGISTRY.get(name), shape = null !== (_a = null == iconVariant ? void 0 : iconVariant[variantKey]) && void 0 !== _a ? _a : null == iconVariant ? void 0 : iconVariant.line, cursor = React.useMemo(() => disabled ? "default" : pointer ? "pointer" : "inherit", [ disabled, pointer ]), iconStyle = React.useMemo(() => ({
|
|
1027
1080
|
"--cursor": cursor
|
|
1028
|
-
}), [ cursor ]),
|
|
1081
|
+
}), [ cursor ]), handleKeyActivate = React.useMemo(() => () => onClick(void 0), [ onClick ]);
|
|
1029
1082
|
return shape ? jsxRuntime.jsxs("svg", Object.assign({
|
|
1030
1083
|
id: svgId,
|
|
1031
1084
|
className: `${css_icon} ${className}`,
|
|
@@ -1033,13 +1086,13 @@ const STATIC_ICON_REGISTRY = new Map([ [ "target", {
|
|
|
1033
1086
|
width: size,
|
|
1034
1087
|
height: size,
|
|
1035
1088
|
viewBox: "0 0 20 20",
|
|
1036
|
-
style: Object.assign(Object.assign({},
|
|
1089
|
+
style: Object.assign(Object.assign({}, svgStyle), iconStyle),
|
|
1037
1090
|
onClick: e => onClick(e),
|
|
1038
1091
|
fill: fillColor,
|
|
1039
1092
|
role: "img",
|
|
1040
1093
|
"aria-label": `${name} icon`,
|
|
1041
1094
|
tabIndex: pointer && !disabled ? 0 : -1,
|
|
1042
|
-
onKeyDown: e => misc.accessibleKeyDown(e,
|
|
1095
|
+
onKeyDown: e => misc.accessibleKeyDown(e, handleKeyActivate),
|
|
1043
1096
|
opacity: disabled ? .5 : 1
|
|
1044
1097
|
}, rest, {
|
|
1045
1098
|
children: [ jsxRuntime.jsx("title", {}), shape({
|
|
@@ -1051,33 +1104,4 @@ const STATIC_ICON_REGISTRY = new Map([ [ "target", {
|
|
|
1051
1104
|
})) : null;
|
|
1052
1105
|
});
|
|
1053
1106
|
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
Icon.displayName = "Icon", exports.IconNames = void 0, (IconNames = exports.IconNames || (exports.IconNames = {})).target = "target",
|
|
1057
|
-
IconNames.video = "video", IconNames.mic = "mic", IconNames.micMuted = "mic muted",
|
|
1058
|
-
IconNames.camera = "camera", IconNames.videoOff = "video off", IconNames.home = "home",
|
|
1059
|
-
IconNames.inbox = "inbox", IconNames.sparkle = "sparkle", IconNames.people = "people",
|
|
1060
|
-
IconNames.wallet = "wallet", IconNames.invoice = "invoice", IconNames.payment = "payment",
|
|
1061
|
-
IconNames.heart = "heart", IconNames.clock = "clock", IconNames.book = "book", IconNames.search = "search",
|
|
1062
|
-
IconNames.filter = "filter", IconNames.more = "more", IconNames.checkbox = "checkbox",
|
|
1063
|
-
IconNames.checkboxChecked = "checkbox checked", IconNames.checkboxPartial = "checkbox partial",
|
|
1064
|
-
IconNames.chevronDown = "chevron down", IconNames.chevronUp = "chevron up", IconNames.plus = "plus",
|
|
1065
|
-
IconNames.plusCircle = "plus circle", IconNames.x = "x", IconNames.upload = "upload",
|
|
1066
|
-
IconNames.download = "download", IconNames.share = "share", IconNames.checkCircle = "check circle",
|
|
1067
|
-
IconNames.circle = "circle", IconNames.circleFill = "circle fill", IconNames.person = "person",
|
|
1068
|
-
IconNames.attach = "attach", IconNames.menu = "menu", IconNames.help = "help", IconNames.blank = "blank",
|
|
1069
|
-
IconNames.check = "check", IconNames.message = "message", IconNames.info = "info",
|
|
1070
|
-
IconNames.alert = "alert", IconNames.notification = "notification", IconNames.arrowUp = "arrow up",
|
|
1071
|
-
IconNames.arrowLeft = "arrow left", IconNames.arrowRight = "arrow right", IconNames.navigate = "navigate",
|
|
1072
|
-
IconNames.document = "document", IconNames.refresh = "refresh", IconNames.recentChats = "recent chats",
|
|
1073
|
-
IconNames.trashBin = "trash bin", IconNames.dollar = "dollar", IconNames.apple = "apple",
|
|
1074
|
-
IconNames.view = "view", IconNames.openCircle = "open circle", IconNames.expanded = "expanded",
|
|
1075
|
-
IconNames.concise = "concise", IconNames.moderate = "moderate", IconNames.mail = "mail",
|
|
1076
|
-
IconNames.textDocument = "text document", IconNames.edit = "edit", IconNames.characterBeam = "character beam",
|
|
1077
|
-
IconNames.undo = "undo", IconNames.chat = "chat", IconNames.exclamation = "exclamation",
|
|
1078
|
-
IconNames.chart = "chart", IconNames.lightBulb = "light bulb", IconNames.settings = "settings",
|
|
1079
|
-
IconNames.documentEditor = "document editor", IconNames.chartArrow = "chart arrow",
|
|
1080
|
-
IconNames.focus = "focus", IconNames.briefcase = "briefcase", IconNames.globeLocation = "globe location",
|
|
1081
|
-
IconNames.barChart = "bar chart", IconNames.fontSmaller = "font smaller", IconNames.fontLarger = "font larger",
|
|
1082
|
-
IconNames.copy = "copy", IconNames.stop = "stop", IconNames.like = "like", IconNames.unlike = "unlike",
|
|
1083
|
-
IconNames.highlight = "highlight", exports.Icon = Icon;
|
|
1107
|
+
Icon.displayName = "Icon", exports.Icon = Icon;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), Badge = require("./Badge-CY_DG6cD.js"), Dot = require("./Dot-_HCJ3qxd.js"),
|
|
3
|
+
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), Badge = require("./Badge-CY_DG6cD.js"), Dot = require("./Dot-_HCJ3qxd.js"), Icon = require("./Icon-N0YJuKQf.js"), sharedTypes = require("./sharedTypes-gCECyn2N.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_button = "IconButton-module_button__rziqa flexBox-module_row__z24tF", css_label = "IconButton-module_label__qWGFD flexBox-module_row__z24tF type-module_body-l-regular__lOYbg", css_icon = "IconButton-module_icon__2DDWy flexBox-module_row__z24tF", css_count = "IconButton-module_count__6r373 flexBox-module_row__z24tF";
|
|
4
4
|
|
|
5
|
-
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.IconButton-module_button__rziqa {\n\tposition: relative;\n\tbackground: var(--ib-bg);\n\tborder-radius: var(--ib-border-radius);\n\tborder: var(--ib-border) solid var(--core-outline-primary);\n\tgap: 6px;\n\tcursor: pointer;\n\t&:hover {\n\t\tbackground: var(--ib-bg-hover);\n\t}\n}\n\n.IconButton-module_label__qWGFD {\n\tcolor: var(--ib-color);\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tword-break: break-all;\n\tdisplay: -webkit-box;\n\t-webkit-line-clamp: 1;\n\t-webkit-box-orient: vertical;\n}\n\n.IconButton-module_icon__2DDWy {\n\tmin-height: var(--ib-icon-size);\n\theight: var(--ib-icon-size);\n\tmin-width: var(--ib-icon-size);\n\twidth: var(--ib-icon-size);\n}\n\n.IconButton-module_count__6r373 {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\ttransform: translateX(5px) translateY(-2px);\n}\n");
|
|
5
|
+
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.IconButton-module_button__rziqa {\n\tposition: relative;\n\tbackground: var(--ib-bg);\n\tborder-radius: var(--ib-border-radius);\n\tborder: var(--ib-border) solid var(--core-outline-primary);\n\tgap: 6px;\n\tcursor: pointer;\n\tappearance: none;\n\t-webkit-appearance: none;\n\tbackground-image: none;\n\toutline: none;\n\t&:hover {\n\t\tbackground: var(--ib-bg-hover);\n\t}\n}\n\n.IconButton-module_label__qWGFD {\n\tcolor: var(--ib-color);\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tword-break: break-all;\n\tdisplay: -webkit-box;\n\t-webkit-line-clamp: 1;\n\t-webkit-box-orient: vertical;\n}\n\n.IconButton-module_icon__2DDWy {\n\tmin-height: var(--ib-icon-size);\n\theight: var(--ib-icon-size);\n\tmin-width: var(--ib-icon-size);\n\twidth: var(--ib-icon-size);\n}\n\n.IconButton-module_count__6r373 {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\ttransform: translateX(5px) translateY(-2px);\n}\n");
|
|
6
6
|
|
|
7
7
|
const IconButton = React.memo(props => {
|
|
8
|
-
const {frameSize: frameSize = 36, iconSize: iconSize = 20, icon: icon = "more", borderRadius: borderRadius = 4, tooltip: tooltip, color: color, colorOn: colorOn, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-outline-primary)", bgColorOn: bgColorOn = "var(--core-outline-primary)", transition: transition, variants: variants, initial: initial, animate: animate, exit: exit, fillColor: fillColor, label: label, hover: hover, count: count = 0, toggle: toggle = !0, toggleIcon: toggleIcon = !1, isToggled: isToggled = !1, disabled: disabled = !1, showDot: showDot = !1, border: border = !1, onClick: onClick = () => null, onToolTip: onToolTip = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "frameSize", "iconSize", "icon", "borderRadius", "tooltip", "color", "colorOn", "bgColor", "bgColorHover", "bgColorOn", "transition", "variants", "initial", "animate", "exit", "fillColor", "label", "hover", "count", "toggle", "toggleIcon", "isToggled", "disabled", "showDot", "border", "onClick", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "",
|
|
8
|
+
const {frameSize: frameSize = 36, iconSize: iconSize = 20, icon: icon = "more", borderRadius: borderRadius = 4, tooltip: tooltip, color: color, colorOn: colorOn, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-outline-primary)", bgColorOn: bgColorOn = "var(--core-outline-primary)", transition: transition, variants: variants, initial: initial, animate: animate, exit: exit, fillColor: fillColor, label: label, hover: hover, count: count = 0, toggle: toggle = !0, toggleIcon: toggleIcon = !1, isToggled: isToggled = !1, disabled: disabled = !1, showDot: showDot = !1, border: border = !1, onClick: onClick = () => null, onToolTip: onToolTip = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "frameSize", "iconSize", "icon", "borderRadius", "tooltip", "color", "colorOn", "bgColor", "bgColorHover", "bgColorOn", "transition", "variants", "initial", "animate", "exit", "fillColor", "label", "hover", "count", "toggle", "toggleIcon", "isToggled", "disabled", "showDot", "border", "onClick", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", ref = React.useRef(null), [on, setOn] = React.useState(isToggled);
|
|
9
9
|
React.useEffect(() => setOn(isToggled), [ isToggled ]);
|
|
10
10
|
const handleClick = React.useCallback(e => {
|
|
11
11
|
disabled || (tooltip && onToolTip(null), setOn(!on), onClick(e));
|
|
@@ -30,11 +30,12 @@ const IconButton = React.memo(props => {
|
|
|
30
30
|
"--ib-border": border ? "1px" : 0,
|
|
31
31
|
"--ib-color": textColor
|
|
32
32
|
}), [ bgColorNormal, bgHoverColor, textColor, border, frameSize, borderRadius ]);
|
|
33
|
-
return jsxRuntime.jsxs(react.motion.
|
|
33
|
+
return jsxRuntime.jsxs(react.motion.button, Object.assign({
|
|
34
34
|
id: divId,
|
|
35
|
+
type: "button",
|
|
35
36
|
className: `${css_button}${divClass}`,
|
|
36
37
|
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
37
|
-
onClick: handleClick,
|
|
38
|
+
onClick: e => handleClick(e),
|
|
38
39
|
onMouseLeave: handleMouseLeave,
|
|
39
40
|
onMouseEnter: handleMouseEnter,
|
|
40
41
|
transition: transition,
|
|
@@ -42,6 +43,8 @@ const IconButton = React.memo(props => {
|
|
|
42
43
|
initial: initial,
|
|
43
44
|
animate: animate,
|
|
44
45
|
exit: exit,
|
|
46
|
+
disabled: disabled,
|
|
47
|
+
"aria-disabled": disabled,
|
|
45
48
|
ref: ref
|
|
46
49
|
}, rest, {
|
|
47
50
|
children: [ jsxRuntime.jsx("div", {
|
|
@@ -49,7 +52,7 @@ const IconButton = React.memo(props => {
|
|
|
49
52
|
style: {
|
|
50
53
|
opacity: disabled ? .3 : 1
|
|
51
54
|
},
|
|
52
|
-
children: jsxRuntime.jsx(
|
|
55
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
53
56
|
name: icon,
|
|
54
57
|
strokeColor: strokeColor,
|
|
55
58
|
fillColor: fillColor,
|
|
@@ -4,7 +4,7 @@ var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/
|
|
|
4
4
|
|
|
5
5
|
require("../theme/colors.js"), require("../hooks/useWindow.js");
|
|
6
6
|
|
|
7
|
-
var misc = require("./misc-
|
|
7
|
+
var misc = require("./misc-BTF7BCZW.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css = {
|
|
8
8
|
label: "Label-module_label__RaRvM flexBox-module_row__z24tF",
|
|
9
9
|
button: "Label-module_button__N8bcQ type-module_body-m-regular__LuQBA",
|
|
10
10
|
s: "Label-module_s__Zh8Gp type-module_body-s-regular__vRHSP",
|
|
@@ -19,11 +19,11 @@ var misc = require("./misc-C-M6KKsH.js"), styleInject_es = require("./style-inje
|
|
|
19
19
|
blue: "Label-module_blue__lqM0T"
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Label-module_label__RaRvM {\n\tdisplay: var(--label-inline) !important;\n\tline-height: 1em;\n\twhite-space: nowrap;\n\tpadding: var(--label-padding) !important;\n\twidth: min-content;\n\tcolor: var(--label-color);\n\tborder-radius: var(--label-border-radius);\n\tborder: var(--label-border-size) solid var(--core-outline-primary);\n\tcursor: var(--label-cursor);\n}\n\n.Label-module_button__N8bcQ {\n}\n\n.Label-module_s__Zh8Gp {\n}\n\n.Label-module_m__BJtGL {\n}\n\n.Label-module_l__t70tt {\n}\n\n.Label-module_red__yqrNW {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-light);\n\tborder-color: var(--label-border-color-red);\n}\n\n.Label-module_green__R6cDO {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-light);\n\tborder-color: var(--label-border-color-green);\n}\n\n.Label-module_yellow__IoDDg {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-primary);\n\tborder-color: var(--label-border-color-yellow);\n}\n\n.Label-module_grey__qIkSh {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-secondary);\n\tborder-color: var(--label-border-color-grey);\n}\n\n.Label-module_lightgrey__nZC6N {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-disabled);\n\tborder-color: var(--label-border-color-lightgrey);\n}\n\n.Label-module_white__OFwCs {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-primary);\n\tborder-color: var(--label-border-color-white);\n}\n\n.Label-module_blue__lqM0T {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-light);\n\tborder-color: var(--label-border-color-blue);\n}\n"),
|
|
22
|
+
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Label-module_label__RaRvM {\n\tdisplay: var(--label-inline) !important;\n\tline-height: 1em;\n\twhite-space: nowrap;\n\tpadding: var(--label-padding) !important;\n\twidth: min-content;\n\tcolor: var(--label-color);\n\tborder-radius: var(--label-border-radius);\n\tborder: var(--label-border-size) solid var(--core-outline-primary);\n\tcursor: var(--label-cursor);\n}\n\n.Label-module_button__N8bcQ {\n\tappearance: none;\n\t-webkit-appearance: none;\n\tbackground-image: none;\n\toutline: none;\n}\n\n.Label-module_s__Zh8Gp {\n}\n\n.Label-module_m__BJtGL {\n}\n\n.Label-module_l__t70tt {\n}\n\n.Label-module_red__yqrNW {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-light);\n\tborder-color: var(--label-border-color-red);\n}\n\n.Label-module_green__R6cDO {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-light);\n\tborder-color: var(--label-border-color-green);\n}\n\n.Label-module_yellow__IoDDg {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-primary);\n\tborder-color: var(--label-border-color-yellow);\n}\n\n.Label-module_grey__qIkSh {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-secondary);\n\tborder-color: var(--label-border-color-grey);\n}\n\n.Label-module_lightgrey__nZC6N {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-disabled);\n\tborder-color: var(--label-border-color-lightgrey);\n}\n\n.Label-module_white__OFwCs {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-primary);\n\tborder-color: var(--label-border-color-white);\n}\n\n.Label-module_blue__lqM0T {\n\tbackground: var(--label-background);\n\tcolor: var(--core-text-light);\n\tborder-color: var(--label-border-color-blue);\n}\n"),
|
|
23
23
|
exports.Label = function(props) {
|
|
24
|
-
const theme = hooks_useTheme.useTheme(), {children: children, state: state, noFill: noFill = !1, button: button = !1, round: round = !1, border: border = 1, padding: padding, color: color, inline: inline = !0, size: size = "m", onClick: onClick} = props, divAttributes = tslib_es6.__rest(props, [ "children", "state", "noFill", "button", "round", "border", "padding", "color", "inline", "size", "onClick" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", handleClick = React.useCallback(e => {
|
|
25
|
-
|
|
26
|
-
}, [
|
|
24
|
+
const theme = hooks_useTheme.useTheme(), {children: children, state: state, noFill: noFill = !1, button: button = !1, round: round = !1, border: border = 1, padding: padding, color: color, inline: inline = !0, size: size = "m", onClick: onClick} = props, divAttributes = tslib_es6.__rest(props, [ "children", "state", "noFill", "button", "round", "border", "padding", "color", "inline", "size", "onClick" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", isInteractive = Boolean(onClick), handleClick = React.useCallback(e => {
|
|
25
|
+
isInteractive && (null == onClick || onClick(e));
|
|
26
|
+
}, [ isInteractive, onClick ]), backgroundColor = React.useMemo(() => {
|
|
27
27
|
if (noFill) return "var(--core-surface-primary)";
|
|
28
28
|
switch (state) {
|
|
29
29
|
case "red":
|
|
@@ -98,15 +98,20 @@ exports.Label = function(props) {
|
|
|
98
98
|
"--label-border-color-white": borderColors.white,
|
|
99
99
|
"--label-border-color-blue": borderColors.blue,
|
|
100
100
|
"--label-inline": inline ? "inline-flex" : "flex"
|
|
101
|
-
}), [ button, border, round, backgroundColor, borderColors, setPadding, color, inline ]), classNames = [ css.label, button ? css.button : css.regular, state ? css[state] : "" ].filter(Boolean).join(" ");
|
|
102
|
-
return jsxRuntime.jsx("
|
|
101
|
+
}), [ button, border, round, backgroundColor, borderColors, setPadding, color, inline ]), classNames = [ css.label, button || isInteractive ? css.button : css.regular, state ? css[state] : "" ].filter(Boolean).join(" ");
|
|
102
|
+
return isInteractive ? jsxRuntime.jsx("button", Object.assign({
|
|
103
103
|
id: divId,
|
|
104
|
+
type: "button",
|
|
104
105
|
className: `${classNames} ${css[size]}${divClass}`,
|
|
105
106
|
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
"aria-label": "Label button",
|
|
108
|
+
onClick: e => handleClick(e)
|
|
109
|
+
}, rest, {
|
|
110
|
+
children: children
|
|
111
|
+
})) : jsxRuntime.jsx("span", Object.assign({
|
|
112
|
+
id: divId,
|
|
113
|
+
className: `${classNames} ${css[size]}${divClass}`,
|
|
114
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars)
|
|
110
115
|
}, rest, {
|
|
111
116
|
children: children
|
|
112
117
|
}));
|
|
@@ -5,7 +5,7 @@ var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/
|
|
|
5
5
|
styleInject_es.styleInject(".Overlay-module_overlay__EkbfA {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tbackground-color: var(--overlay-color);\n\tz-index: var(--elevation-overlay);\n}\n");
|
|
6
6
|
|
|
7
7
|
const Overlay = React.memo(props => {
|
|
8
|
-
const {
|
|
8
|
+
const {type: type = "clear", global: global = !1, overlay: overlay, color: color = "rgb(0,0,0)", opacity: opacity = 0, onClick: onClick = () => null, toggleOverlay: toggleOverlay = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "type", "global", "overlay", "color", "opacity", "onClick", "toggleOverlay" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", show = !global || global && overlay, computedOpacity = React.useMemo(() => "clear" === type ? 0 : void 0 !== opacity ? opacity : "dark" === type ? .8 : 0, [ type, opacity ]), handleClick = React.useCallback(() => {
|
|
9
9
|
global && toggleOverlay(!1), onClick();
|
|
10
10
|
}, [ global, toggleOverlay, onClick ]), handleContextMenu = React.useCallback(e => {
|
|
11
11
|
e.preventDefault();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-
|
|
3
|
+
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-BTF7BCZW.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_wrapper = "Pager-module_wrapper__eutVg flexBox-module_row__z24tF", css_bullet = "Pager-module_bullet__TxyR5 flexBox-module_row__z24tF", css_selected = "Pager-module_selected__C6xbR";
|
|
4
4
|
|
|
5
5
|
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.Pager-module_wrapper__eutVg {\n\tgap: var(--pager-gap);\n\twidth: 100%;\n\tz-index: var(--elevation-status);\n}\n\n.Pager-module_bullet__TxyR5 {\n\twidth: var(--pager-size);\n\theight: var(--pager-size);\n\tmax-width: var(--pager-size);\n\tmax-height: var(--pager-size);\n\tbackground: var(--pager-color);\n\tborder-radius: 100%;\n\tborder: 0;\n\tcursor: pointer;\n\ttransition: background var(--motion-water-duration) var(--motion-water) 0s;\n\t&:hover {\n\t\tbackground: var(--pager-colorHover);\n\t}\n}\n\n.Pager-module_selected__C6xbR {\n\tbackground: var(--pager-colorOn);\n\t&:hover {\n\t\tbackground: var(--pager-colorOn);\n\t}\n}\n");
|
|
6
6
|
|