@apple-pie/slice 0.1.5 → 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,9 +4,9 @@ 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"), IconButton = require("./IconButton-BXotgG2u.js"), sharedTypes = require("./sharedTypes-gCECyn2N.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_wrapper = "TabBar-module_wrapper__cyOR1 flexBox-module_rowStart__4tcxS", css_option = "TabBar-module_option__gYjDf flexBox-module_row__z24tF type-module_body-m-regular__LuQBA", css_icon = "TabBar-module_icon__JDgG3 flexBox-module_row__z24tF", css_close = "TabBar-module_close__bvSBh 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.TabBar-module_wrapper__cyOR1 {\n\tgap: var(--tab-bar-gap);\n\tborder-bottom: var(--tab-bar-border-bottom) solid var(--core-outline-primary);\n\theight: var(--tab-bar-height);\n\twidth: var(--tab-bar-width);\n\tcursor: pointer;\n}\n\n.TabBar-module_option__gYjDf {\n\tgap: var(--tab-bar-option-gap);\n\tcolor: var(--tab-bar-option-color);\n\tpadding: var(--tab-bar-option-padding) !important;\n\theight: 100%;\n\twidth: var(--tab-bar-option-width);\n\tflex: var(--tab-bar-option-flex);\n\twhite-space: nowrap;\n\tbox-shadow: 0 var(--tab-bar-option-border) 0 0 var(--core-text-special);\n\tcursor: var(--tab-bar-option-cursor);\n\t-webkit-user-select: none;\n\tuser-select: none;\n}\n\n.TabBar-module_icon__JDgG3 {\n\tmax-height: var(--tab-bar-icon-size);\n\tmin-height: var(--tab-bar-icon-size);\n\tmax-width: var(--tab-bar-icon-size);\n\tmin-width: var(--tab-bar-icon-size);\n}\n\n.TabBar-module_close__bvSBh {\n\theight: 100%;\n\tpadding: var(--tab-bar-close-padding) !important;\n\tborder-left: 1px solid var(--core-outline-primary);\n\twidth: min-content;\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.TabBar-module_wrapper__cyOR1 {\n\tgap: var(--tab-bar-gap);\n\tborder-bottom: var(--tab-bar-border-bottom) solid var(--core-outline-primary);\n\theight: var(--tab-bar-height);\n\twidth: var(--tab-bar-width);\n\tcursor: pointer;\n}\n\n.TabBar-module_option__gYjDf {\n\tgap: var(--tab-bar-option-gap);\n\tcolor: var(--tab-bar-option-color);\n\tpadding: var(--tab-bar-option-padding) !important;\n\theight: 100%;\n\twidth: var(--tab-bar-option-width);\n\tflex: var(--tab-bar-option-flex);\n\twhite-space: nowrap;\n\tbox-shadow: 0 var(--tab-bar-option-border) 0 0 var(--core-text-special);\n\tcursor: var(--tab-bar-option-cursor);\n\t-webkit-user-select: none;\n\tuser-select: none;\n\tappearance: none;\n\t-webkit-appearance: none;\n\tbackground-image: none;\n\tbackground-color: transparent;\n\tborder: 0;\n\toutline: none;\n\ttext-align: left;\n}\n\n.TabBar-module_icon__JDgG3 {\n\tmax-height: var(--tab-bar-icon-size);\n\tmin-height: var(--tab-bar-icon-size);\n\tmax-width: var(--tab-bar-icon-size);\n\tmin-width: var(--tab-bar-icon-size);\n}\n\n.TabBar-module_close__bvSBh {\n\theight: 100%;\n\tpadding: var(--tab-bar-close-padding) !important;\n\tborder-left: 1px solid var(--core-outline-primary);\n\twidth: min-content;\n}\n");
|
|
10
10
|
|
|
11
11
|
const placeholderOptions = [ {
|
|
12
12
|
name: "Option 1",
|
|
@@ -17,7 +17,7 @@ const placeholderOptions = [ {
|
|
|
17
17
|
value: "Option 2",
|
|
18
18
|
icon: "wallet"
|
|
19
19
|
} ], TabBar = React.memo(props => {
|
|
20
|
-
const {options: options = placeholderOptions, selected: selected = 0, border: border = !0, underline: underline = !0, height: height = "100%", width: width = "100%", tabWidth: tabWidth = "distribute", padding: padding = 8, iconSize: iconSize = 20, iconGap: iconGap = 8, tabGap: tabGap = 0, disabled: disabled = !1, hasClose: hasClose = !1, closeWidth: closeWidth = "auto", selectedValue: selectedValue = null, onChange: onChange = () => null, onTabChange: onTabChange = () => null, onClose: onClose = () => null, onToolTip: onToolTip = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "options", "selected", "border", "underline", "height", "width", "tabWidth", "padding", "iconSize", "iconGap", "tabGap", "disabled", "hasClose", "closeWidth", "selectedValue", "onChange", "onTabChange", "onClose", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [index, setIndex] = React.useState(selected);
|
|
20
|
+
const {options: options = placeholderOptions, selected: selected = 0, border: border = !0, underline: underline = !0, height: height = "100%", width: width = "100%", tabWidth: tabWidth = "distribute", padding: padding = 8, iconSize: iconSize = 20, iconGap: iconGap = 8, tabGap: tabGap = 0, disabled: disabled = !1, hasClose: hasClose = !1, closeWidth: closeWidth = "auto", selectedValue: selectedValue = null, onChange: onChange = () => null, onTabChange: onTabChange = () => null, onClose: onClose = () => null, onToolTip: onToolTip = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "options", "selected", "border", "underline", "height", "width", "tabWidth", "padding", "iconSize", "iconGap", "tabGap", "disabled", "hasClose", "closeWidth", "selectedValue", "onChange", "onTabChange", "onClose", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [index, setIndex] = React.useState(selected), optionRefs = React.useRef([]);
|
|
21
21
|
React.useEffect(() => {
|
|
22
22
|
let selectedIndex = 0;
|
|
23
23
|
selectedValue && options ? (selectedIndex = options.findIndex(option => option.value === selectedValue),
|
|
@@ -27,7 +27,32 @@ const placeholderOptions = [ {
|
|
|
27
27
|
setIndex(i), onChange(i), onTabChange(options[i]);
|
|
28
28
|
}, [ onChange, onTabChange, options ]), handleOptionClick = React.useCallback(i => {
|
|
29
29
|
onToolTip(null), handleClick(i);
|
|
30
|
-
}, [ onToolTip, handleClick ]),
|
|
30
|
+
}, [ onToolTip, handleClick ]), focusOption = React.useCallback(nextIndex => {
|
|
31
|
+
var _a;
|
|
32
|
+
null === (_a = optionRefs.current[nextIndex]) || void 0 === _a || _a.focus();
|
|
33
|
+
}, []), handleOptionKeyDown = React.useCallback((event, optionIndex) => {
|
|
34
|
+
if (options.length < 1) return;
|
|
35
|
+
let nextIndex = null;
|
|
36
|
+
switch (event.key) {
|
|
37
|
+
case "ArrowRight":
|
|
38
|
+
case "ArrowDown":
|
|
39
|
+
nextIndex = (optionIndex + 1) % options.length;
|
|
40
|
+
break;
|
|
41
|
+
|
|
42
|
+
case "ArrowLeft":
|
|
43
|
+
case "ArrowUp":
|
|
44
|
+
nextIndex = (optionIndex - 1 + options.length) % options.length;
|
|
45
|
+
break;
|
|
46
|
+
|
|
47
|
+
case "Home":
|
|
48
|
+
nextIndex = 0;
|
|
49
|
+
break;
|
|
50
|
+
|
|
51
|
+
case "End":
|
|
52
|
+
nextIndex = options.length - 1;
|
|
53
|
+
}
|
|
54
|
+
null !== nextIndex && (event.preventDefault(), handleOptionClick(nextIndex), focusOption(nextIndex));
|
|
55
|
+
}, [ options.length, handleOptionClick, focusOption ]), renderedOptions = React.useMemo(() => options.map((option, i) => jsxRuntime.jsx(Option, {
|
|
31
56
|
label: option.name,
|
|
32
57
|
value: i,
|
|
33
58
|
showToolTip: option.toolTip,
|
|
@@ -39,10 +64,14 @@ const placeholderOptions = [ {
|
|
|
39
64
|
disabled: disabled,
|
|
40
65
|
count: option.count,
|
|
41
66
|
onClick: handleOptionClick,
|
|
67
|
+
onKeyDown: handleOptionKeyDown,
|
|
42
68
|
onToolTip: onToolTip,
|
|
43
69
|
underline: underline,
|
|
44
|
-
tabWidth: tabWidth
|
|
45
|
-
|
|
70
|
+
tabWidth: tabWidth,
|
|
71
|
+
buttonRef: element => {
|
|
72
|
+
optionRefs.current[i] = element;
|
|
73
|
+
}
|
|
74
|
+
}, `${i}_option_${option.name}`)), [ options, index, padding, iconSize, iconGap, disabled, underline, tabWidth, onToolTip, handleOptionClick, handleOptionKeyDown ]), setStyle = React.useCallback(value => "string" == typeof value ? value : `${value}px`, []), cssVars = React.useMemo(() => ({
|
|
46
75
|
"--tab-bar-gap": `${tabGap}px`,
|
|
47
76
|
"--tab-bar-height": `${setStyle(height)}px`,
|
|
48
77
|
"--tab-bar-width": setStyle(width),
|
|
@@ -53,7 +82,9 @@ const placeholderOptions = [ {
|
|
|
53
82
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
54
83
|
id: divId,
|
|
55
84
|
className: `${css_wrapper}${divClass}`,
|
|
56
|
-
style: Object.assign(Object.assign({}, divStyle), cssVars)
|
|
85
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
86
|
+
role: "tablist",
|
|
87
|
+
"aria-orientation": "horizontal"
|
|
57
88
|
}, rest, {
|
|
58
89
|
children: [ renderedOptions, hasClose && jsxRuntime.jsx("div", {
|
|
59
90
|
className: css_close,
|
|
@@ -72,7 +103,7 @@ const placeholderOptions = [ {
|
|
|
72
103
|
TabBar.displayName = "TabBar";
|
|
73
104
|
|
|
74
105
|
const Option = React.memo(props => {
|
|
75
|
-
const theme = hooks_useTheme.useTheme(), {label: label = "Option", value: value = 0, icon: icon = null, selected: selected = !1, onClick: onClick = () => null, onToolTip: onToolTip = () => null, padding: padding = 8, iconSize: iconSize = 20, iconGap: iconGap = 6, disabled: disabled = !1, showToolTip: showToolTip = null, underline: underline = !0, tabWidth: tabWidth = "distribute", count: count = 0} = props, ref = React.useRef(null), strokeColor = React.useMemo(() => !disabled && selected ? theme.current.colors["core-text-special"] : disabled ? theme.current.colors["core-text-disabled"] : theme.current.colors["core-text-primary"], [ disabled, selected, theme ]), handleMouseOver = React.useCallback(e => {
|
|
106
|
+
const theme = hooks_useTheme.useTheme(), {label: label = "Option", value: value = 0, icon: icon = null, selected: selected = !1, onClick: onClick = () => null, onToolTip: onToolTip = () => null, padding: padding = 8, iconSize: iconSize = 20, iconGap: iconGap = 6, disabled: disabled = !1, showToolTip: showToolTip = null, underline: underline = !0, tabWidth: tabWidth = "distribute", count: count = 0, onKeyDown: onKeyDown = () => null, buttonRef: buttonRef} = props, ref = React.useRef(null), strokeColor = React.useMemo(() => !disabled && selected ? theme.current.colors["core-text-special"] : disabled ? theme.current.colors["core-text-disabled"] : theme.current.colors["core-text-primary"], [ disabled, selected, theme ]), handleMouseOver = React.useCallback(e => {
|
|
76
107
|
if (onToolTip(null), showToolTip && ref.current) {
|
|
77
108
|
const tip = {
|
|
78
109
|
type: sharedTypes.ToolTipType.button,
|
|
@@ -96,18 +127,23 @@ const Option = React.memo(props => {
|
|
|
96
127
|
"--tab-bar-option-width": setTabWidth,
|
|
97
128
|
"--tab-bar-option-flex": setTabFlex
|
|
98
129
|
}), [ padding, iconSize, disabled, textColor, iconGap, setTabFlex, setTabWidth, setUnderline ]);
|
|
99
|
-
return jsxRuntime.jsxs("
|
|
130
|
+
return jsxRuntime.jsxs("button", {
|
|
131
|
+
type: "button",
|
|
100
132
|
className: css_option,
|
|
101
133
|
style: cssVars,
|
|
102
|
-
ref:
|
|
134
|
+
ref: element => {
|
|
135
|
+
ref.current = element, null == buttonRef || buttonRef(element);
|
|
136
|
+
},
|
|
137
|
+
role: "tab",
|
|
103
138
|
"aria-selected": selected,
|
|
139
|
+
tabIndex: selected ? 0 : -1,
|
|
104
140
|
onMouseEnter: handleMouseOver,
|
|
105
141
|
onMouseLeave: handleMouseLeave,
|
|
106
142
|
onClick: () => onClick(value),
|
|
107
|
-
onKeyDown:
|
|
143
|
+
onKeyDown: e => onKeyDown(e, value),
|
|
108
144
|
children: [ icon && jsxRuntime.jsx("div", {
|
|
109
145
|
className: css_icon,
|
|
110
|
-
children: jsxRuntime.jsx(
|
|
146
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
111
147
|
name: icon,
|
|
112
148
|
size: iconSize,
|
|
113
149
|
strokeColor: strokeColor
|
|
@@ -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"), Button = require("./Button-
|
|
3
|
+
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), Button = require("./Button-D8_eyuOA.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_wrapper = "TextArea-module_wrapper__O0sWP flexBox-module_columnStart__C7P44", css_textarea = "TextArea-module_textarea__-R2n0", css_send = "TextArea-module_send__Cub13", css_s = "TextArea-module_s__Ac-fq type-module_body-s-regular__vRHSP", css_m = "TextArea-module_m__dod4R type-module_body-m-regular__LuQBA", css_l = "TextArea-module_l__-uLCG type-module_body-l-regular__lOYbg";
|
|
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}.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.TextArea-module_wrapper__O0sWP {\n\tposition: relative;\n\tpadding: var(--ta-padding) !important;\n\twidth: var(--ta-width);\n\theight: auto;\n\tborder-radius: var(--ta-border-radius);\n\tbackground-color: var(--ta-bg-color);\n\tbox-shadow: 0 0 0 1px var(--ta-border-color);\n\ttransition: all var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.TextArea-module_textarea__-R2n0 {\n\tborder: 0;\n\toutline: 0;\n\tpadding: 0 16px 0 0;\n\twidth: 100%;\n\theight: 100%;\n\tcolor: var(--core-text-primary);\n\tbackground-color: transparent;\n\tbox-sizing: border-box;\n\tresize: var(--ta-resize);\n\n\t&:disabled {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\n\t&::placeholder {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\n\toverflow-y: auto;\n\n\t&::-webkit-scrollbar {\n\t\tbackground-color: transparent;\n\t\twidth: 14px;\n\t}\n\n\t&::-webkit-scrollbar-track {\n\t\tbackground-color: transparent;\n\t}\n\n\t&::-webkit-scrollbar-thumb {\n\t\tbackground-color: var(--scroll-bar);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--core-surface-primary);\n\t}\n\n\t&::-webkit-scrollbar-thumb:hover {\n\t\tbackground-color: var(--scroll-bar);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--core-surface-primary);\n\t\tcursor: default;\n\t}\n}\n\n.TextArea-module_actions__yunQx {\n\twidth: 100%;\n\tmin-height: 30px;\n\tcolor: var(--core-text-disabled);\n\tgap: 16px;\n}\n\n.TextArea-module_option__2SFx5 {\n\tgap: 4px;\n\twhite-space: nowrap;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tcursor: default;\n}\n\n.TextArea-module_send__Cub13 {\n\tposition: absolute;\n\tbottom: var(--ta-send-icon-offset-bottom);\n\tright: var(--ta-send-icon-offset-right);\n}\n\n.TextArea-module_s__Ac-fq {\n}\n\n.TextArea-module_m__dod4R {\n}\n\n.TextArea-module_l__-uLCG {\n}\n");
|
|
6
6
|
|
|
@@ -4,18 +4,19 @@ 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 Button = require("./Button-
|
|
7
|
+
var Button = require("./Button-D8_eyuOA.js"), Icon = require("./Icon-N0YJuKQf.js"), IconButton = require("./IconButton-BXotgG2u.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css = {
|
|
8
8
|
wrapper: "TextField-module_wrapper__qZ-p- flexBox-module_rowStart__4tcxS",
|
|
9
9
|
container: "TextField-module_container__5U9yK flexBox-module_rowStart__4tcxS",
|
|
10
10
|
label: "TextField-module_label__jD8MR flexBox-module_rowStart__4tcxS",
|
|
11
11
|
input: "TextField-module_input__AkWBQ",
|
|
12
12
|
showPassword: "TextField-module_showPassword__4Ecfo flexBox-module_row__z24tF",
|
|
13
|
+
clearButton: "TextField-module_clearButton__O9ed3 flexBox-module_row__z24tF",
|
|
13
14
|
s: "TextField-module_s__0qm83 type-module_body-s-regular__vRHSP",
|
|
14
15
|
m: "TextField-module_m__M-tLl type-module_body-m-regular__LuQBA",
|
|
15
16
|
l: "TextField-module_l__gbNRz type-module_body-l-regular__lOYbg"
|
|
16
17
|
};
|
|
17
18
|
|
|
18
|
-
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.TextField-module_wrapper__qZ-p- {\n\tposition: relative;\n\tpadding: var(--tf-padding) !important;\n\tgap: 8px;\n\toverflow: visible;\n\twidth: var(--tf-width);\n\theight: var(--tf-height);\n\tborder-radius: var(--tf-border-radius);\n\tbackground: var(--tf-bg);\n\tbox-shadow: var(--tf-box-shadow);\n\ttransition: all var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.TextField-module_container__5U9yK {\n\tflex: 1;\n\theight: 100%;\n\tgap: 8px;\n}\n\n.TextField-module_label__jD8MR {\n\tcolor: var(--tf-label-color);\n\theight: auto;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.TextField-module_input__AkWBQ {\n\tcolor: var(--tf-text-color);\n\tbackground-color: transparent;\n\tbox-sizing: border-box;\n\toutline: none;\n\tborder: 0;\n\theight: 100%;\n\twidth:
|
|
19
|
+
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.TextField-module_wrapper__qZ-p- {\n\tposition: relative;\n\tpadding: var(--tf-padding) !important;\n\tgap: 8px;\n\toverflow: visible;\n\twidth: var(--tf-width);\n\theight: var(--tf-height);\n\tborder-radius: var(--tf-border-radius);\n\tbackground: var(--tf-bg);\n\tbox-shadow: var(--tf-box-shadow);\n\ttransition: all var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.TextField-module_container__5U9yK {\n\tflex: 1;\n\theight: 100%;\n\tgap: 8px;\n}\n\n.TextField-module_label__jD8MR {\n\tcolor: var(--tf-label-color);\n\theight: auto;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.TextField-module_input__AkWBQ {\n\tcolor: var(--tf-text-color);\n\tbackground-color: transparent;\n\tbox-sizing: border-box;\n\toutline: none;\n\tborder: 0;\n\theight: 100%;\n\twidth: var(--tf-input-width);\n\tfield-sizing: var(--tf-field-size);\n\ttext-align: var(--tf-text-align);\n\t&::placeholder {\n\t\tcolor: var(--tf-placeholder-color);\n\t}\n\t&:focus::placeholder {\n\t\tcolor: var(--tf-placeholder-color);\n\t}\n\t&:disabled {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\t&:-webkit-autofill,\n\t&:-webkit-autofill:hover,\n\t&:-webkit-autofill:focus,\n\t&:-webkit-autofill:active {\n\t\tbox-shadow: 0 0 0 50px var(--core-button-disabled) inset !important;\n\t\t-webkit-text-fill-color: var(--core-text-primary);\n\t}\n}\n\n.TextField-module_showPassword__4Ecfo {\n\tmin-height: 18px;\n\tmin-width: 18px;\n\tmax-height: 18px;\n\tmax-width: 18px;\n\topacity: var(--tf-show-opacity);\n\t&:hover {\n\t\topacity: var(--tf-show-opacity-hover);\n\t}\n}\n\n.TextField-module_clearButton__O9ed3 {\n\tposition: absolute;\n\tright: 8px;\n\ttop: 50%;\n\tborder: 0;\n\ttransform: translateY(-50%);\n\tbackground: transparent;\n\tappearance: none;\n\t-webkit-appearance: none;\n\toutline: none;\n\tcursor: pointer;\n\tz-index: 1;\n}\n\n.TextField-module_s__0qm83 {\n}\n\n.TextField-module_m__M-tLl {\n}\n\n.TextField-module_l__gbNRz {\n}\n");
|
|
19
20
|
|
|
20
21
|
const MOTION_CONFIG = {
|
|
21
22
|
variants: {
|
|
@@ -35,7 +36,7 @@ const MOTION_CONFIG = {
|
|
|
35
36
|
}
|
|
36
37
|
}, TextField = React.memo(props => {
|
|
37
38
|
const theme = hooks_useTheme.useTheme(), {name: name = "input_name", value: value = "", label: label = "", labelSize: labelSize = "m", textSize: textSize = "m", placeholder: placeholder = "placeholder", focused: focused = !1, onSubmit: onSubmit = () => null, onChange: onChange = () => null, onBlur: onBlur = () => null, onFocus: onFocus = () => null, onKeydown: onKeydown = () => null, onAction: onAction = () => null, onPaste: onPaste = () => null, onClear: onClear = () => null, onValidate: onValidate = () => null, actionButton: actionButton = !1, maxLength: maxLength, size: size = {
|
|
38
|
-
width: "
|
|
39
|
+
width: "auto",
|
|
39
40
|
height: "auto"
|
|
40
41
|
}, padding: padding = "8px 16px", borderRadius: borderRadius = 8, editable: editable = !0, textAlign: textAlign = "left", isValid: isValid = !0, inline: inline = !1, noShow: noShow = !1, borderType: borderType = "box", validate: validate = !0, borderColor: borderColor = {
|
|
41
42
|
focused: "var(--core-link-primary)",
|
|
@@ -101,6 +102,8 @@ const MOTION_CONFIG = {
|
|
|
101
102
|
}, [ isFocused, valid, color, validate ]), setTextAlign = React.useMemo(() => null != textAlign ? textAlign : "left", [ textAlign ]), setShowOpacity = React.useMemo(() => "password" !== inputType ? "0" : isFocused ? "1" : "0.5", [ inputType, isFocused ]), cssVars = React.useMemo(() => {
|
|
102
103
|
var _a;
|
|
103
104
|
return {
|
|
105
|
+
"--tf-input-width": "unset" !== size.width && "100%",
|
|
106
|
+
"--tf-field-size": "auto" === size.width ? "content" : "unset",
|
|
104
107
|
"--tf-width": setStyleValue(size.width),
|
|
105
108
|
"--tf-height": setStyleValue(size.height),
|
|
106
109
|
"--tf-padding": setStyleValue(padding),
|
|
@@ -127,7 +130,7 @@ const MOTION_CONFIG = {
|
|
|
127
130
|
className: css.container,
|
|
128
131
|
children: [ iconLeft && jsxRuntime.jsx("div", {
|
|
129
132
|
style: iconContainerStyle,
|
|
130
|
-
children: jsxRuntime.jsx(
|
|
133
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
131
134
|
name: iconLeft.name,
|
|
132
135
|
size: iconLeft.size,
|
|
133
136
|
strokeColor: iconStrokeColor
|
|
@@ -153,7 +156,9 @@ const MOTION_CONFIG = {
|
|
|
153
156
|
maxLength: maxLength
|
|
154
157
|
}), jsxRuntime.jsx(react.AnimatePresence, {
|
|
155
158
|
initial: !1,
|
|
156
|
-
children: isFocused && clearButton && "" !== text && jsxRuntime.jsx(react.motion.
|
|
159
|
+
children: isFocused && clearButton && "" !== text && jsxRuntime.jsx(react.motion.button, {
|
|
160
|
+
type: "button",
|
|
161
|
+
"aria-label": "Clear text",
|
|
157
162
|
className: css.clearButton,
|
|
158
163
|
style: clearButtonStyle,
|
|
159
164
|
variants: MOTION_CONFIG.variants,
|
|
@@ -162,7 +167,7 @@ const MOTION_CONFIG = {
|
|
|
162
167
|
exit: "exit",
|
|
163
168
|
transition: MOTION_CONFIG.transition,
|
|
164
169
|
onClick: handleClearTextField,
|
|
165
|
-
children: jsxRuntime.jsx(
|
|
170
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
166
171
|
name: "x",
|
|
167
172
|
size: clearButton.size,
|
|
168
173
|
strokeColor: theme.current.colors["core-icon-secondary"]
|
|
@@ -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("motion/react"), React = require("react"), misc = require("./misc-
|
|
3
|
+
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), misc = require("./misc-BTF7BCZW.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css = {
|
|
4
4
|
wrapper: "Tip-module_wrapper__D7ACT flexBox-module_rowStart__4tcxS",
|
|
5
5
|
s: "Tip-module_s__Wvz3q type-module_body-s-regular__vRHSP",
|
|
6
6
|
m: "Tip-module_m__9qJbB type-module_body-m-regular__LuQBA",
|
|
@@ -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 ToastType, misc = require("./misc-
|
|
7
|
+
var ToastType, misc = require("./misc-BTF7BCZW.js"), Icon = require("./Icon-N0YJuKQf.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css = {
|
|
8
8
|
wrapper: "Toast-module_wrapper__1uj9O flexBox-module_rowBetween__5FEvi",
|
|
9
9
|
close: "Toast-module_close__i10-s flexBox-module_row__z24tF",
|
|
10
10
|
s: "Toast-module_s__kc5Ef type-module_body-s-regular__vRHSP",
|
|
@@ -146,7 +146,7 @@ const ToastBase = React.forwardRef((props, ref) => {
|
|
|
146
146
|
"aria-label": "dismiss message",
|
|
147
147
|
onKeyDown: e => misc.accessibleKeyDown(e, handleClose),
|
|
148
148
|
onClick: handleClose,
|
|
149
|
-
children: jsxRuntime.jsx(
|
|
149
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
150
150
|
name: "x",
|
|
151
151
|
size: 20,
|
|
152
152
|
strokeColor: iconColor
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-
|
|
3
|
+
var jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-BTF7BCZW.js"), FileList = require("./FileList-tivoUJSP.js"), Icon = require("./Icon-N0YJuKQf.js"), ProgressIndicator = require("./ProgressIndicator-opbbADog.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css = {
|
|
4
4
|
wrapper: "UploadArea-module_wrapper__aircC flexBox-module_column__ezvMq",
|
|
5
5
|
icon: "UploadArea-module_icon__M7n-m flexBox-module_row__z24tF",
|
|
6
6
|
title: "UploadArea-module_title__VbNGq type-module_body-l-bold__Fh2dt",
|
|
@@ -24,11 +24,11 @@ var FileTypes;
|
|
|
24
24
|
}(FileTypes || (FileTypes = {}));
|
|
25
25
|
|
|
26
26
|
const UploadAreaBase = React.forwardRef((props, ref) => {
|
|
27
|
-
const {icon: icon = "upload", iconColor: iconColor = "var(--core-text-primary)", iconColorHover: iconColorHover = "var(--core-text-special)", title: title = "Upload Files", width: width = "100%", height: height = "auto", message: message = "Drag and drop files here or click to upload", busyMessage: busyMessage = "Uploading in progress", iconSize: iconSize = 24, textSize: textSize = "m", border: border = 1, borderStyle: borderStyle = "dashed", borderColor: borderColor = "var(--core-outline-primary)", borderColorHover: borderColorHover = "var(--core-outline-special)", radius: radius = 8, padding: padding = 32, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-surface-special)", acceptedTypes: acceptedTypes = allTypes, multiple: multiple = !0, busy: busy = !1, canRemove: canRemove = !0, showProgress: showProgress = !0, files: files = [], onUpload: onUpload} = props, [hovered, setHovered] = React.useState(!1), inputRef = React.useRef(null), dragDepth = React.useRef(0), handleClickUpload = React.useCallback(() => {
|
|
27
|
+
const {icon: icon = "upload", iconColor: iconColor = "var(--core-text-primary)", iconColorHover: iconColorHover = "var(--core-text-special)", title: title = "Upload Files", width: width = "100%", height: height = "auto", message: message = "Drag and drop files here or click to upload", busyMessage: busyMessage = "Uploading in progress", iconSize: iconSize = 24, textSize: textSize = "m", border: border = 1, borderStyle: borderStyle = "dashed", borderColor: borderColor = "var(--core-outline-primary)", borderColorHover: borderColorHover = "var(--core-outline-special)", radius: radius = 8, padding: padding = 32, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-surface-special)", acceptedTypes: acceptedTypes = allTypes, multiple: multiple = !0, busy: busy = !1, canRemove: canRemove = !0, showProgress: showProgress = !0, files: files = [], onUpload: onUpload} = props, [hovered, setHovered] = React.useState(!1), inputRef = React.useRef(null), dragDepth = React.useRef(0), inputId = React.useId(), titleId = React.useId(), messageId = React.useId(), isInteractive = !busy && files.length < 1, handleClickUpload = React.useCallback(() => {
|
|
28
28
|
var _a;
|
|
29
|
-
|
|
29
|
+
isInteractive && (null == inputRef ? void 0 : inputRef.current) && (inputRef.current.value = "",
|
|
30
30
|
null === (_a = inputRef.current) || void 0 === _a || _a.click());
|
|
31
|
-
}, [
|
|
31
|
+
}, [ isInteractive ]), handleFileInputChange = React.useCallback(e => {
|
|
32
32
|
busy || e.target.files && (null == onUpload || onUpload(Array.from(e.target.files)));
|
|
33
33
|
}, [ busy, onUpload ]), hasFilesInDrag = React.useCallback(e => {
|
|
34
34
|
var _a, _b;
|
|
@@ -60,11 +60,13 @@ const UploadAreaBase = React.forwardRef((props, ref) => {
|
|
|
60
60
|
className: css.wrapper,
|
|
61
61
|
style: cssVars,
|
|
62
62
|
ref: ref,
|
|
63
|
-
role: "button",
|
|
64
|
-
"aria-label": "Click to upload files",
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
role: isInteractive ? "button" : void 0,
|
|
64
|
+
"aria-label": isInteractive ? "Click to upload files" : void 0,
|
|
65
|
+
"aria-describedby": `${titleId} ${messageId}`,
|
|
66
|
+
"aria-disabled": !isInteractive,
|
|
67
|
+
tabIndex: isInteractive ? 0 : -1,
|
|
68
|
+
onClick: isInteractive ? handleClickUpload : void 0,
|
|
69
|
+
onKeyDown: isInteractive ? e => misc.accessibleKeyDown(e, () => handleClickUpload()) : void 0,
|
|
68
70
|
onDragEnter: handleDragEnter,
|
|
69
71
|
onDragOver: e => {
|
|
70
72
|
e.preventDefault();
|
|
@@ -73,16 +75,18 @@ const UploadAreaBase = React.forwardRef((props, ref) => {
|
|
|
73
75
|
onDrop: handleDrop,
|
|
74
76
|
children: [ jsxRuntime.jsx("div", {
|
|
75
77
|
className: css.icon,
|
|
76
|
-
children: jsxRuntime.jsx(
|
|
78
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
77
79
|
size: iconSize,
|
|
78
80
|
name: icon,
|
|
79
81
|
strokeColor: iconStrokeColor,
|
|
80
82
|
pointer: !1
|
|
81
83
|
})
|
|
82
84
|
}), jsxRuntime.jsx("div", {
|
|
85
|
+
id: titleId,
|
|
83
86
|
className: css.title,
|
|
84
87
|
children: title
|
|
85
88
|
}), jsxRuntime.jsxs("div", {
|
|
89
|
+
id: messageId,
|
|
86
90
|
className: `${css.message} ${css[textSize]}`,
|
|
87
91
|
children: [ busy && showProgress && jsxRuntime.jsx(ProgressIndicator.ProgressIndicator, {
|
|
88
92
|
show: !0,
|
|
@@ -103,6 +107,7 @@ const UploadAreaBase = React.forwardRef((props, ref) => {
|
|
|
103
107
|
canRemove: canRemove
|
|
104
108
|
})
|
|
105
109
|
}), jsxRuntime.jsx("input", {
|
|
110
|
+
id: inputId,
|
|
106
111
|
ref: inputRef,
|
|
107
112
|
type: "file",
|
|
108
113
|
hidden: !0,
|
|
@@ -2,20 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js");
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Manage a WebSocket connection with optional unified events, retries, and keep-alive pings.
|
|
7
|
+
*/ exports.WSConnection = class {
|
|
8
|
+
/**
|
|
9
|
+
* Report whether the underlying socket is currently open.
|
|
10
|
+
*/
|
|
6
11
|
get connected() {
|
|
7
12
|
var _a;
|
|
8
13
|
return (null === (_a = this.socket) || void 0 === _a ? void 0 : _a.readyState) === WebSocket.OPEN;
|
|
9
14
|
}
|
|
10
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Expose the underlying WebSocket instance.
|
|
17
|
+
*/ get connection() {
|
|
11
18
|
return this.socket;
|
|
12
19
|
}
|
|
13
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Initialize the socket connection and configure its runtime options.
|
|
22
|
+
*/ constructor(options) {
|
|
14
23
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
15
24
|
if (this.socket = null, this.keepAliveTimer = null, this.reconnectIntervalTimer = null,
|
|
16
25
|
this.reconnectAttemptsCount = 0, this.manuallyClosed = !1,
|
|
17
26
|
/**
|
|
18
|
-
*
|
|
27
|
+
* Initialize connection state after the socket opens.
|
|
19
28
|
*/
|
|
20
29
|
this.onOpen = event => tslib_es6.__awaiter(this, void 0, void 0, function*() {
|
|
21
30
|
var _a;
|
|
@@ -45,7 +54,7 @@ exports.WSConnection = class {
|
|
|
45
54
|
this.keepAlive && this.setKeepAlive();
|
|
46
55
|
}),
|
|
47
56
|
/**
|
|
48
|
-
*
|
|
57
|
+
* Parse and emit each incoming socket message.
|
|
49
58
|
*/
|
|
50
59
|
this.onMessage = event => {
|
|
51
60
|
const data = this.parseEventData(event.data);
|
|
@@ -56,7 +65,7 @@ exports.WSConnection = class {
|
|
|
56
65
|
}));
|
|
57
66
|
},
|
|
58
67
|
/**
|
|
59
|
-
*
|
|
68
|
+
* Clean up the socket and trigger reconnect logic after unexpected closes.
|
|
60
69
|
*/
|
|
61
70
|
this.onClose = event => {
|
|
62
71
|
var _a;
|
|
@@ -66,7 +75,7 @@ exports.WSConnection = class {
|
|
|
66
75
|
}), this.closeSocket(event), this.shouldReconnect(event) && this.reconnect();
|
|
67
76
|
},
|
|
68
77
|
/**
|
|
69
|
-
*
|
|
78
|
+
* Normalize socket errors before forwarding them to consumers.
|
|
70
79
|
*/
|
|
71
80
|
this.onError = event => {
|
|
72
81
|
const error = event instanceof ErrorEvent ? event : new ErrorEvent("websocket error", {
|
|
@@ -85,34 +94,34 @@ exports.WSConnection = class {
|
|
|
85
94
|
this.connect();
|
|
86
95
|
}
|
|
87
96
|
/**
|
|
88
|
-
*
|
|
97
|
+
* Send a string or JSON-serializable payload through the socket.
|
|
89
98
|
*/ send(message) {
|
|
90
99
|
var _a;
|
|
91
100
|
const data = "string" == typeof message ? message : JSON.stringify(message);
|
|
92
101
|
null === (_a = this.socket) || void 0 === _a || _a.send(data);
|
|
93
102
|
}
|
|
94
103
|
/**
|
|
95
|
-
*
|
|
104
|
+
* Close the socket intentionally and stop any reconnect attempts.
|
|
96
105
|
*/ close(closeEvent) {
|
|
97
106
|
this.manuallyClosed = !0, this.clearReconnectTimer(), this.reconnectAttemptsCount = 0,
|
|
98
107
|
this.closeSocket(closeEvent);
|
|
99
108
|
}
|
|
100
109
|
/**
|
|
101
|
-
* Emit
|
|
110
|
+
* Emit parsed message data when standard callback mode is enabled.
|
|
102
111
|
*/ emitParsedMessage(data) {
|
|
103
112
|
if (this.unifiedMessages) return;
|
|
104
113
|
const callback = this.onMessageCallback;
|
|
105
114
|
null == callback || callback(data);
|
|
106
115
|
}
|
|
107
116
|
/**
|
|
108
|
-
* Emit a unified
|
|
117
|
+
* Emit a unified event object when unified callback mode is enabled.
|
|
109
118
|
*/ emitUnifiedMessage(message) {
|
|
110
119
|
if (!this.unifiedMessages) return;
|
|
111
120
|
const callback = this.onMessageCallback;
|
|
112
121
|
null == callback || callback(message);
|
|
113
122
|
}
|
|
114
123
|
/**
|
|
115
|
-
*
|
|
124
|
+
* Forward an error event through both direct and unified callbacks.
|
|
116
125
|
*/ emitErrorEvent(error) {
|
|
117
126
|
var _a;
|
|
118
127
|
null === (_a = this.onErrorCallback) || void 0 === _a || _a.call(this, error), this.emitUnifiedMessage({
|
|
@@ -121,7 +130,7 @@ exports.WSConnection = class {
|
|
|
121
130
|
});
|
|
122
131
|
}
|
|
123
132
|
/**
|
|
124
|
-
*
|
|
133
|
+
* Parse incoming message data, falling back to raw socket payloads when needed.
|
|
125
134
|
*/ parseEventData(rawData) {
|
|
126
135
|
if (rawData instanceof Blob || rawData instanceof ArrayBuffer || "string" == typeof rawData) {
|
|
127
136
|
if ("string" != typeof rawData) return rawData;
|
|
@@ -136,13 +145,13 @@ exports.WSConnection = class {
|
|
|
136
145
|
}));
|
|
137
146
|
}
|
|
138
147
|
/**
|
|
139
|
-
* Attach
|
|
148
|
+
* Attach the connection lifecycle listeners to the current socket.
|
|
140
149
|
*/ attachEventListeners() {
|
|
141
150
|
this.socket && (this.socket.addEventListener("open", this.onOpen), this.socket.addEventListener("message", this.onMessage),
|
|
142
151
|
this.socket.addEventListener("close", this.onClose), this.socket.addEventListener("error", this.onError));
|
|
143
152
|
}
|
|
144
153
|
/**
|
|
145
|
-
*
|
|
154
|
+
* Start periodic ping messages to keep the socket active.
|
|
146
155
|
*/ setKeepAlive() {
|
|
147
156
|
this.socket && this.keepAlive && (this.keepAliveTimer && clearInterval(this.keepAliveTimer),
|
|
148
157
|
this.keepAliveTimer = setInterval(() => {
|
|
@@ -151,30 +160,30 @@ exports.WSConnection = class {
|
|
|
151
160
|
}, this.keepAliveInterval));
|
|
152
161
|
}
|
|
153
162
|
/**
|
|
154
|
-
*
|
|
163
|
+
* Stop the active keep-alive timer if one is running.
|
|
155
164
|
*/ clearKeepAliveTimer() {
|
|
156
165
|
this.keepAliveTimer && (clearInterval(this.keepAliveTimer), this.keepAliveTimer = null);
|
|
157
166
|
}
|
|
158
167
|
/**
|
|
159
|
-
*
|
|
168
|
+
* Stop the active reconnect timer if one is running.
|
|
160
169
|
*/ clearReconnectTimer() {
|
|
161
170
|
this.reconnectIntervalTimer && (clearTimeout(this.reconnectIntervalTimer), this.reconnectIntervalTimer = null);
|
|
162
171
|
}
|
|
163
172
|
/**
|
|
164
|
-
*
|
|
173
|
+
* Detach all lifecycle listeners from the current socket.
|
|
165
174
|
*/ detachEventListeners() {
|
|
166
175
|
this.socket && (this.socket.removeEventListener("open", this.onOpen), this.socket.removeEventListener("message", this.onMessage),
|
|
167
176
|
this.socket.removeEventListener("close", this.onClose), this.socket.removeEventListener("error", this.onError));
|
|
168
177
|
}
|
|
169
178
|
/**
|
|
170
|
-
*
|
|
179
|
+
* Open a new socket connection when one is not already active.
|
|
171
180
|
*/ connect() {
|
|
172
181
|
var _a, _b;
|
|
173
182
|
(null === (_a = this.socket) || void 0 === _a ? void 0 : _a.readyState) !== WebSocket.OPEN && (null === (_b = this.socket) || void 0 === _b ? void 0 : _b.readyState) !== WebSocket.CONNECTING && (this.socket = new WebSocket(this.url),
|
|
174
183
|
this.attachEventListeners());
|
|
175
184
|
}
|
|
176
185
|
/**
|
|
177
|
-
*
|
|
186
|
+
* Schedule the next reconnect attempt when reconnects are allowed.
|
|
178
187
|
*/ reconnect() {
|
|
179
188
|
if (!this.autoReconnect || this.manuallyClosed) return;
|
|
180
189
|
if (this.reconnectIntervalTimer) return;
|
|
@@ -187,18 +196,18 @@ exports.WSConnection = class {
|
|
|
187
196
|
}, delay);
|
|
188
197
|
}
|
|
189
198
|
/**
|
|
190
|
-
* Calculate reconnect delay
|
|
199
|
+
* Calculate the reconnect delay, optionally using exponential backoff.
|
|
191
200
|
*/ getReconnectDelay(attempt) {
|
|
192
201
|
return this.reconnectFalloff ? this.reconnectInterval * Math.pow(2, attempt - 1) : this.reconnectInterval;
|
|
193
202
|
}
|
|
194
203
|
/**
|
|
195
|
-
*
|
|
204
|
+
* Decide whether a close event should trigger a reconnect attempt.
|
|
196
205
|
*/ shouldReconnect(event) {
|
|
197
206
|
var _a, _b;
|
|
198
207
|
return (null === (_a = this.socket) || void 0 === _a ? void 0 : _a.readyState) !== WebSocket.CONNECTING && (null === (_b = this.socket) || void 0 === _b ? void 0 : _b.readyState) !== WebSocket.OPEN && (this.autoReconnect && !this.manuallyClosed && !event.wasClean);
|
|
199
208
|
}
|
|
200
209
|
/**
|
|
201
|
-
*
|
|
210
|
+
* Close the current socket instance and release its timers and listeners.
|
|
202
211
|
*/ closeSocket(closeEvent) {
|
|
203
212
|
this.socket && (this.clearKeepAliveTimer(), this.detachEventListeners(), this.socket.readyState !== WebSocket.CLOSED && this.socket.readyState !== WebSocket.CLOSING && this.socket.close(closeEvent.code || 1e3, closeEvent.reason || "Clean shutdown"),
|
|
204
213
|
this.socket = null, this.keepAliveTimer = null);
|