@xwiki/cristal-electron-renderer 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +17 -17
- package/dist/AttachmentPreview-DNQ6Ebkw.css +0 -1
- package/dist/AttachmentPreview-DmcUO34d.js +0 -2
- package/dist/AttachmentPreview-DmcUO34d.js.map +0 -1
- package/dist/AuthServiceBanner-BArubXdu.css +0 -1
- package/dist/AuthServiceBanner-ChdElfqx.js +0 -2
- package/dist/AuthServiceBanner-ChdElfqx.js.map +0 -1
- package/dist/DeletePage-ttlY0HjN.js +0 -2
- package/dist/DeletePage-ttlY0HjN.js.map +0 -1
- package/dist/GitHubLoginMenu-Csiodp6I.js +0 -2
- package/dist/GitHubLoginMenu-Csiodp6I.js.map +0 -1
- package/dist/LoggedInMenu-DWOuONhZ.js +0 -2
- package/dist/LoggedInMenu-DWOuONhZ.js.map +0 -1
- package/dist/LoginMenu-Bwz_qtz_.js +0 -2
- package/dist/LoginMenu-Bwz_qtz_.js.map +0 -1
- package/dist/MovePage-B-6I8pRk.js +0 -2
- package/dist/MovePage-B-6I8pRk.js.map +0 -1
- package/dist/MovePage-BHS998Jm.css +0 -1
- package/dist/NextcloudLoginMenu-DGCgMCya.css +0 -1
- package/dist/NextcloudLoginMenu-DxWXKyFo.js +0 -2
- package/dist/NextcloudLoginMenu-DxWXKyFo.js.map +0 -1
- package/dist/RenamePage-Db1fLUHy.js +0 -2
- package/dist/RenamePage-Db1fLUHy.js.map +0 -1
- package/dist/SettingsConfigurations-B9GWI5mw.css +0 -1
- package/dist/SettingsConfigurations-DKf33rjI.js +0 -2
- package/dist/SettingsConfigurations-DKf33rjI.js.map +0 -1
- package/dist/c-config-menu-BGV5XXU8.css +0 -1
- package/dist/c-config-menu-CmcdRZXV.js +0 -2
- package/dist/c-config-menu-CmcdRZXV.js.map +0 -1
- package/dist/c-edit-blocknote-DwSRLR1x.js +0 -259
- package/dist/c-edit-blocknote-DwSRLR1x.js.map +0 -1
- package/dist/c-edit-blocknote-xpE8qhtQ.css +0 -1
- package/dist/chunk.24ZZSBUF-BmQPh48m.js +0 -89
- package/dist/chunk.24ZZSBUF-BmQPh48m.js.map +0 -1
- package/dist/chunk.36O46B5H-Cv2poSyf.js +0 -64
- package/dist/chunk.36O46B5H-Cv2poSyf.js.map +0 -1
- package/dist/chunk.3LWOA5DF-D8Va5Pmw.js +0 -77
- package/dist/chunk.3LWOA5DF-D8Va5Pmw.js.map +0 -1
- package/dist/chunk.3RPBFEDE-DI7eSlIl.js +0 -2
- package/dist/chunk.3RPBFEDE-DI7eSlIl.js.map +0 -1
- package/dist/chunk.4TUIT776-BvlNwMXD.js +0 -18
- package/dist/chunk.4TUIT776-BvlNwMXD.js.map +0 -1
- package/dist/chunk.6CTB5ZDJ-9Su7bEUQ.js +0 -2
- package/dist/chunk.6CTB5ZDJ-9Su7bEUQ.js.map +0 -1
- package/dist/chunk.7E4JTYWU-Ci99jpyG.js +0 -75
- package/dist/chunk.7E4JTYWU-Ci99jpyG.js.map +0 -1
- package/dist/chunk.AJ3ENQ5C-zot94vv9.js +0 -2
- package/dist/chunk.AJ3ENQ5C-zot94vv9.js.map +0 -1
- package/dist/chunk.B4BZKR24-B0iVuGLD.js +0 -2
- package/dist/chunk.B4BZKR24-B0iVuGLD.js.map +0 -1
- package/dist/chunk.D5YQDJ7X-_UyNui_V.js +0 -2
- package/dist/chunk.D5YQDJ7X-_UyNui_V.js.map +0 -1
- package/dist/chunk.DFHYNK3F-bS0lNIuO.js +0 -86
- package/dist/chunk.DFHYNK3F-bS0lNIuO.js.map +0 -1
- package/dist/chunk.GMYPQTFK-BT1AAYXJ.js +0 -2
- package/dist/chunk.GMYPQTFK-BT1AAYXJ.js.map +0 -1
- package/dist/chunk.J5ZM7LIC-n6gjp3-L.js +0 -244
- package/dist/chunk.J5ZM7LIC-n6gjp3-L.js.map +0 -1
- package/dist/chunk.JCXLDPQF-BOaK9AtU.js +0 -622
- package/dist/chunk.JCXLDPQF-BOaK9AtU.js.map +0 -1
- package/dist/chunk.JHOXTQXA-CWkZ1weQ.js +0 -24
- package/dist/chunk.JHOXTQXA-CWkZ1weQ.js.map +0 -1
- package/dist/chunk.JQBT7BOV-BKSO0Hfn.js +0 -3378
- package/dist/chunk.JQBT7BOV-BKSO0Hfn.js.map +0 -1
- package/dist/chunk.JXOKFADN-DpK3Q_uU.js +0 -785
- package/dist/chunk.JXOKFADN-DpK3Q_uU.js.map +0 -1
- package/dist/chunk.KPLQLAWP-DUYDfZ7-.js +0 -163
- package/dist/chunk.KPLQLAWP-DUYDfZ7-.js.map +0 -1
- package/dist/chunk.LD4M4QGE-cX1_6HT7.js +0 -2
- package/dist/chunk.LD4M4QGE-cX1_6HT7.js.map +0 -1
- package/dist/chunk.NYIIDP5N-AHr3eTN0.js +0 -2
- package/dist/chunk.NYIIDP5N-AHr3eTN0.js.map +0 -1
- package/dist/chunk.R45OWEVP-WMyXo-Fn.js +0 -181
- package/dist/chunk.R45OWEVP-WMyXo-Fn.js.map +0 -1
- package/dist/chunk.RWUUFNUL-BJhNq5wM.js +0 -2
- package/dist/chunk.RWUUFNUL-BJhNq5wM.js.map +0 -1
- package/dist/chunk.RY756JLP-BUknFjxa.js +0 -22
- package/dist/chunk.RY756JLP-BUknFjxa.js.map +0 -1
- package/dist/chunk.SI4ACBFK-BB831ml8.js +0 -58
- package/dist/chunk.SI4ACBFK-BB831ml8.js.map +0 -1
- package/dist/chunk.TRHSUYII-DFnBKJNh.js +0 -140
- package/dist/chunk.TRHSUYII-DFnBKJNh.js.map +0 -1
- package/dist/chunk.XA43ZQPC-maNlqVLX.js +0 -395
- package/dist/chunk.XA43ZQPC-maNlqVLX.js.map +0 -1
- package/dist/chunk.XSFJLY2D-ldEKWtxN.js +0 -178
- package/dist/chunk.XSFJLY2D-ldEKWtxN.js.map +0 -1
- package/dist/chunk.YHLNUJ7P-BGNuPG1R.js +0 -109
- package/dist/chunk.YHLNUJ7P-BGNuPG1R.js.map +0 -1
- package/dist/chunk.ZGGPD2XJ-DD1S3h7C.js +0 -2
- package/dist/chunk.ZGGPD2XJ-DD1S3h7C.js.map +0 -1
- package/dist/chunk.ZH2AND3P-CzagA8cz.js +0 -288
- package/dist/chunk.ZH2AND3P-CzagA8cz.js.map +0 -1
- package/dist/class-map-DmaCJs8c.js +0 -2
- package/dist/class-map-DmaCJs8c.js.map +0 -1
- package/dist/filesystem-internal-link-serializer-BOne-ZvI.js +0 -2
- package/dist/filesystem-internal-link-serializer-BOne-ZvI.js.map +0 -1
- package/dist/floating-ui.dom-1S43Ew4Q.js +0 -2
- package/dist/floating-ui.dom-1S43Ew4Q.js.map +0 -1
- package/dist/github-CGNzogjY.js +0 -3
- package/dist/github-CGNzogjY.js.map +0 -1
- package/dist/github-internal-link-serializer-BGkdMYJI.js +0 -2
- package/dist/github-internal-link-serializer-BGkdMYJI.js.map +0 -1
- package/dist/hocuspocus-provider.esm-DpwNtHpL.js +0 -2
- package/dist/hocuspocus-provider.esm-DpwNtHpL.js.map +0 -1
- package/dist/if-defined-O-hFrvt0.js +0 -2
- package/dist/if-defined-O-hFrvt0.js.map +0 -1
- package/dist/index-B7HOg_tC.js +0 -254
- package/dist/index-B7HOg_tC.js.map +0 -1
- package/dist/index-BgL5UHSB.css +0 -1
- package/dist/index-DTmXfR9q.js +0 -3
- package/dist/index-DTmXfR9q.js.map +0 -1
- package/dist/index-DWPjg9z3.js +0 -2
- package/dist/index-DWPjg9z3.js.map +0 -1
- package/dist/index.html +0 -13
- package/dist/live-z5w0O4st.js +0 -2
- package/dist/live-z5w0O4st.js.map +0 -1
- package/dist/module-RjUF93sV.js +0 -717
- package/dist/module-RjUF93sV.js.map +0 -1
- package/dist/native-48B9X9Wg.js +0 -2
- package/dist/native-48B9X9Wg.js.map +0 -1
- package/dist/nextcloud-CQ2JbCvQ.js +0 -31
- package/dist/nextcloud-CQ2JbCvQ.js.map +0 -1
- package/dist/nextcloud-internal-link-serializer-qLagTAdg.js +0 -7
- package/dist/nextcloud-internal-link-serializer-qLagTAdg.js.map +0 -1
- package/dist/offline-lGzDTw-r.js +0 -4
- package/dist/offline-lGzDTw-r.js.map +0 -1
- package/dist/query-x48B6FB_.js +0 -2
- package/dist/query-x48B6FB_.js.map +0 -1
- package/dist/shoelace-fOJMLOCp.js +0 -3
- package/dist/shoelace-fOJMLOCp.js.map +0 -1
- package/dist/static-Dm20cmTz.js +0 -3
- package/dist/static-Dm20cmTz.js.map +0 -1
- package/dist/staticBuild-BOgweg16.js +0 -2
- package/dist/staticBuild-BOgweg16.js.map +0 -1
- package/dist/translations-D5nOIu3x.js +0 -2
- package/dist/translations-D5nOIu3x.js.map +0 -1
- package/dist/translations-Ds9OkLNv.js +0 -2
- package/dist/translations-Ds9OkLNv.js.map +0 -1
- package/dist/vuetify-CJV1Jf0o.js +0 -21
- package/dist/vuetify-CJV1Jf0o.js.map +0 -1
- package/dist/vuetify-yTaAqVoQ.css +0 -1
- package/dist/worker-C267fLfn.js +0 -202
- package/dist/worker-C267fLfn.js.map +0 -1
- package/dist/x-alert-BhErtBtU.css +0 -1
- package/dist/x-alert-Bo-c4sd8.js +0 -2
- package/dist/x-alert-Bo-c4sd8.js.map +0 -1
- package/dist/x-alert-DfYpLdml.css +0 -1
- package/dist/x-alert-iPDEBtQL.js +0 -2
- package/dist/x-alert-iPDEBtQL.js.map +0 -1
- package/dist/x-avatar-2efH4gNX.css +0 -1
- package/dist/x-avatar-CBx0PT77.js +0 -2
- package/dist/x-avatar-CBx0PT77.js.map +0 -1
- package/dist/x-avatar-Do0uzcGf.js +0 -2
- package/dist/x-avatar-Do0uzcGf.js.map +0 -1
- package/dist/x-breadcrumb-BMSNlvvi.css +0 -1
- package/dist/x-breadcrumb-HTdiGdCL.js +0 -2
- package/dist/x-breadcrumb-HTdiGdCL.js.map +0 -1
- package/dist/x-breadcrumb-zrKcaFfC.js +0 -2
- package/dist/x-breadcrumb-zrKcaFfC.js.map +0 -1
- package/dist/x-btn-C6CLTqa7.js +0 -2
- package/dist/x-btn-C6CLTqa7.js.map +0 -1
- package/dist/x-btn-DPGq6Sd-.css +0 -1
- package/dist/x-btn-TXMfg-5G.js +0 -2
- package/dist/x-btn-TXMfg-5G.js.map +0 -1
- package/dist/x-btn.vue_vue_type_script_setup_true_lang-CARXp5Xp.js +0 -2
- package/dist/x-btn.vue_vue_type_script_setup_true_lang-CARXp5Xp.js.map +0 -1
- package/dist/x-card-CJQtO6wd.js +0 -2
- package/dist/x-card-CJQtO6wd.js.map +0 -1
- package/dist/x-card-DZkGTPkV.js +0 -2
- package/dist/x-card-DZkGTPkV.js.map +0 -1
- package/dist/x-checkbox-BoqoQxdA.css +0 -1
- package/dist/x-checkbox-COxu3htb.js +0 -2
- package/dist/x-checkbox-COxu3htb.js.map +0 -1
- package/dist/x-checkbox-DykPAWbI.js +0 -2
- package/dist/x-checkbox-DykPAWbI.js.map +0 -1
- package/dist/x-col-Cr4ppY2u.js +0 -2
- package/dist/x-col-Cr4ppY2u.js.map +0 -1
- package/dist/x-container-D1TcVPe4.js +0 -2
- package/dist/x-container-D1TcVPe4.js.map +0 -1
- package/dist/x-dialog-Bk9LE0HR.css +0 -1
- package/dist/x-dialog-DpDwSqtj.js +0 -2
- package/dist/x-dialog-DpDwSqtj.js.map +0 -1
- package/dist/x-dialog-VzzVz38L.css +0 -1
- package/dist/x-dialog-o95lWpug.js +0 -2
- package/dist/x-dialog-o95lWpug.js.map +0 -1
- package/dist/x-divider-BfvWE9xx.js +0 -2
- package/dist/x-divider-BfvWE9xx.js.map +0 -1
- package/dist/x-divider-CyQQBVg0.js +0 -2
- package/dist/x-divider-CyQQBVg0.js.map +0 -1
- package/dist/x-dropdown-BPYmh0ED.js +0 -2
- package/dist/x-dropdown-BPYmh0ED.js.map +0 -1
- package/dist/x-dropdown-C0eWLs8m.js +0 -2
- package/dist/x-dropdown-C0eWLs8m.js.map +0 -1
- package/dist/x-dropdown-CxWpPIwn.css +0 -1
- package/dist/x-dropdown-GNs7ILlc.css +0 -1
- package/dist/x-file-input-BSstA5LD.css +0 -1
- package/dist/x-file-input-C3zWnjnM.js +0 -2
- package/dist/x-file-input-C3zWnjnM.js.map +0 -1
- package/dist/x-file-input-I5f_Xur8.js +0 -2
- package/dist/x-file-input-I5f_Xur8.js.map +0 -1
- package/dist/x-form-CK24VrXN.css +0 -1
- package/dist/x-form-CUJhQDpC.js +0 -2
- package/dist/x-form-CUJhQDpC.js.map +0 -1
- package/dist/x-form-DGUS5Veh.css +0 -1
- package/dist/x-form-DvYxiGYI.js +0 -2
- package/dist/x-form-DvYxiGYI.js.map +0 -1
- package/dist/x-img-B3bwcipR.js +0 -2
- package/dist/x-img-B3bwcipR.js.map +0 -1
- package/dist/x-img-Bmlsvg1a.js +0 -2
- package/dist/x-img-Bmlsvg1a.js.map +0 -1
- package/dist/x-load-BlPeW_ej.css +0 -1
- package/dist/x-load-BsACA7Yh.css +0 -1
- package/dist/x-load-CBeg_T3j.js +0 -2
- package/dist/x-load-CBeg_T3j.js.map +0 -1
- package/dist/x-load-DP6QIpju.js +0 -2
- package/dist/x-load-DP6QIpju.js.map +0 -1
- package/dist/x-menu-BmuGyRjl.css +0 -1
- package/dist/x-menu-fzYlqJyV.js +0 -2
- package/dist/x-menu-fzYlqJyV.js.map +0 -1
- package/dist/x-menu-item-CTnQPDyU.js +0 -2
- package/dist/x-menu-item-CTnQPDyU.js.map +0 -1
- package/dist/x-menu-item-DLbqVWzS.js +0 -2
- package/dist/x-menu-item-DLbqVWzS.js.map +0 -1
- package/dist/x-menu-j6yX563A.js +0 -2
- package/dist/x-menu-j6yX563A.js.map +0 -1
- package/dist/x-menu-label-BLmtnk8J.js +0 -2
- package/dist/x-menu-label-BLmtnk8J.js.map +0 -1
- package/dist/x-menu-label-DXnUzNu1.js +0 -2
- package/dist/x-menu-label-DXnUzNu1.js.map +0 -1
- package/dist/x-menu-label-DhRAj-fk.css +0 -1
- package/dist/x-row-Cr4ppY2u.js +0 -2
- package/dist/x-row-Cr4ppY2u.js.map +0 -1
- package/dist/x-search-B99zXUrg.js +0 -2
- package/dist/x-search-B99zXUrg.js.map +0 -1
- package/dist/x-search-CVyiz17E.js +0 -2
- package/dist/x-search-CVyiz17E.js.map +0 -1
- package/dist/x-select-DpGG8AuD.js +0 -2
- package/dist/x-select-DpGG8AuD.js.map +0 -1
- package/dist/x-select-DrHr7Shp.js +0 -2
- package/dist/x-select-DrHr7Shp.js.map +0 -1
- package/dist/x-tab-c-e3rymA.js +0 -2
- package/dist/x-tab-c-e3rymA.js.map +0 -1
- package/dist/x-tab-grZhQqAi.js +0 -2
- package/dist/x-tab-grZhQqAi.js.map +0 -1
- package/dist/x-tab-group-BwvoSXDb.js +0 -2
- package/dist/x-tab-group-BwvoSXDb.js.map +0 -1
- package/dist/x-tab-group-DKKRxIP0.js +0 -2
- package/dist/x-tab-group-DKKRxIP0.js.map +0 -1
- package/dist/x-tab-panel-BkaSuvQL.js +0 -2
- package/dist/x-tab-panel-BkaSuvQL.js.map +0 -1
- package/dist/x-tab-panel-DIMNu54Y.js +0 -2
- package/dist/x-tab-panel-DIMNu54Y.js.map +0 -1
- package/dist/x-text-field-BdKCeID0.js +0 -2
- package/dist/x-text-field-BdKCeID0.js.map +0 -1
- package/dist/x-text-field-C8txfmgG.js +0 -2
- package/dist/x-text-field-C8txfmgG.js.map +0 -1
- package/dist/x-tree-Ct89gjKs.js +0 -2
- package/dist/x-tree-Ct89gjKs.js.map +0 -1
- package/dist/x-tree-D0WG-8EM.css +0 -1
- package/dist/x-tree-DZgepjwE.js +0 -2
- package/dist/x-tree-DZgepjwE.js.map +0 -1
- package/dist/x-tree-OLo4IKf9.css +0 -1
- package/dist/xwiki-OgNiU9fx.js +0 -4
- package/dist/xwiki-OgNiU9fx.js.map +0 -1
- package/dist/xwiki-internal-link-serializer-Cd8xorru-BvcqTQNz.js +0 -2
- package/dist/xwiki-internal-link-serializer-Cd8xorru-BvcqTQNz.js.map +0 -1
- package/dist/xwiki-logo-color-DZ9bdNW4.svg +0 -18
- package/dist/yjs-VtUl3AlT.js +0 -6
- package/dist/yjs-VtUl3AlT.js.map +0 -1
|
@@ -1,785 +0,0 @@
|
|
|
1
|
-
import{i as k,c as z,_ as i,n as l,S,d as R,a as M,b as h,A as T,E as j}from"./chunk.4TUIT776-BvlNwMXD.js";import{S as q}from"./chunk.7E4JTYWU-Ci99jpyG.js";import{L as O}from"./chunk.6CTB5ZDJ-9Su7bEUQ.js";import{e as _,i as K,t as U,a as W}from"./class-map-DmaCJs8c.js";import{s as X}from"./chunk.RWUUFNUL-BJhNq5wM.js";import{f as Y}from"./chunk.SI4ACBFK-BB831ml8.js";import{i as G,a as J,o as Q,s as I,f as Z,b as ee,c as te,p as E,d as ie}from"./floating-ui.dom-1S43Ew4Q.js";import{e as b}from"./query-x48B6FB_.js";import{F as se}from"./chunk.3RPBFEDE-DI7eSlIl.js";import{s as F,a as B,g as L,b as H}from"./chunk.AJ3ENQ5C-zot94vv9.js";import{w as V}from"./chunk.B4BZKR24-B0iVuGLD.js";import{H as le}from"./chunk.NYIIDP5N-AHr3eTN0.js";import{S as N,r as f}from"./chunk.YHLNUJ7P-BGNuPG1R.js";import{w as x}from"./chunk.GMYPQTFK-BT1AAYXJ.js";var oe=k`
|
|
2
|
-
:host {
|
|
3
|
-
--arrow-color: var(--sl-color-neutral-1000);
|
|
4
|
-
--arrow-size: 6px;
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
* These properties are computed to account for the arrow's dimensions after being rotated 45º. The constant
|
|
8
|
-
* 0.7071 is derived from sin(45), which is the diagonal size of the arrow's container after rotating.
|
|
9
|
-
*/
|
|
10
|
-
--arrow-size-diagonal: calc(var(--arrow-size) * 0.7071);
|
|
11
|
-
--arrow-padding-offset: calc(var(--arrow-size-diagonal) - var(--arrow-size));
|
|
12
|
-
|
|
13
|
-
display: contents;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.popup {
|
|
17
|
-
position: absolute;
|
|
18
|
-
isolation: isolate;
|
|
19
|
-
max-width: var(--auto-size-available-width, none);
|
|
20
|
-
max-height: var(--auto-size-available-height, none);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.popup--fixed {
|
|
24
|
-
position: fixed;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.popup:not(.popup--active) {
|
|
28
|
-
display: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.popup__arrow {
|
|
32
|
-
position: absolute;
|
|
33
|
-
width: calc(var(--arrow-size-diagonal) * 2);
|
|
34
|
-
height: calc(var(--arrow-size-diagonal) * 2);
|
|
35
|
-
rotate: 45deg;
|
|
36
|
-
background: var(--arrow-color);
|
|
37
|
-
z-index: -1;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/* Hover bridge */
|
|
41
|
-
.popup-hover-bridge:not(.popup-hover-bridge--visible) {
|
|
42
|
-
display: none;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.popup-hover-bridge {
|
|
46
|
-
position: fixed;
|
|
47
|
-
z-index: calc(var(--sl-z-index-dropdown) - 1);
|
|
48
|
-
top: 0;
|
|
49
|
-
right: 0;
|
|
50
|
-
bottom: 0;
|
|
51
|
-
left: 0;
|
|
52
|
-
clip-path: polygon(
|
|
53
|
-
var(--hover-bridge-top-left-x, 0) var(--hover-bridge-top-left-y, 0),
|
|
54
|
-
var(--hover-bridge-top-right-x, 0) var(--hover-bridge-top-right-y, 0),
|
|
55
|
-
var(--hover-bridge-bottom-right-x, 0) var(--hover-bridge-bottom-right-y, 0),
|
|
56
|
-
var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0)
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
`;function ae(e){return re(e)}function P(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function re(e){for(let t=e;t;t=P(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=P(e);t;t=P(t)){if(!(t instanceof Element))continue;const s=getComputedStyle(t);if(s.display!=="contents"&&(s.position!=="static"||G(s)||t.tagName==="BODY"))return t}return null}function ne(e){return e!==null&&typeof e=="object"&&"getBoundingClientRect"in e&&("contextElement"in e?e.contextElement instanceof Element:!0)}var p=class extends S{constructor(){super(...arguments),this.localize=new O(this),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const e=this.anchorEl.getBoundingClientRect(),t=this.popup.getBoundingClientRect(),s=this.placement.includes("top")||this.placement.includes("bottom");let a=0,n=0,r=0,c=0,v=0,u=0,g=0,m=0;s?e.top<t.top?(a=e.left,n=e.bottom,r=e.right,c=e.bottom,v=t.left,u=t.top,g=t.right,m=t.top):(a=t.left,n=t.bottom,r=t.right,c=t.bottom,v=e.left,u=e.top,g=e.right,m=e.top):e.left<t.left?(a=e.right,n=e.top,r=t.left,c=t.top,v=e.right,u=e.bottom,g=t.left,m=t.bottom):(a=t.right,n=t.top,r=e.left,c=e.top,v=t.right,u=t.bottom,g=e.left,m=e.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${a}px`),this.style.setProperty("--hover-bridge-top-left-y",`${n}px`),this.style.setProperty("--hover-bridge-top-right-x",`${r}px`),this.style.setProperty("--hover-bridge-top-right-y",`${c}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${v}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${u}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${g}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${m}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(e){super.updated(e),e.has("active")&&(this.active?this.start():this.stop()),e.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){const e=this.getRootNode();this.anchorEl=e.getElementById(this.anchor)}else this.anchor instanceof Element||ne(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.active&&this.start()}start(){!this.anchorEl||!this.active||(this.cleanup=J(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(e=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>e())):e()})}reposition(){if(!this.active||!this.anchorEl)return;const e=[Q({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?e.push(I({apply:({rects:s})=>{const a=this.sync==="width"||this.sync==="both",n=this.sync==="height"||this.sync==="both";this.popup.style.width=a?`${s.reference.width}px`:"",this.popup.style.height=n?`${s.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&e.push(Z({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&e.push(ee({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?e.push(I({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:s,availableHeight:a})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${a}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${s}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&e.push(te({element:this.arrowEl,padding:this.arrowPadding}));const t=this.strategy==="absolute"?s=>E.getOffsetParent(s,ae):E.getOffsetParent;ie(this.anchorEl,this.popup,{placement:this.placement,middleware:e,strategy:this.strategy,platform:R(M({},E),{getOffsetParent:t})}).then(({x:s,y:a,middlewareData:n,placement:r})=>{const c=this.localize.dir()==="rtl",v={top:"bottom",right:"left",bottom:"top",left:"right"}[r.split("-")[0]];if(this.setAttribute("data-current-placement",r),Object.assign(this.popup.style,{left:`${s}px`,top:`${a}px`}),this.arrow){const u=n.arrow.x,g=n.arrow.y;let m="",$="",A="",w="";if(this.arrowPlacement==="start"){const C=typeof u=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";m=typeof g=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",$=c?C:"",w=c?"":C}else if(this.arrowPlacement==="end"){const C=typeof u=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";$=c?"":C,w=c?C:"",A=typeof g=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(w=typeof u=="number"?"calc(50% - var(--arrow-size-diagonal))":"",m=typeof g=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(w=typeof u=="number"?`${u}px`:"",m=typeof g=="number"?`${g}px`:"");Object.assign(this.arrowEl.style,{top:m,right:$,bottom:A,left:w,[v]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge()),this.emit("sl-reposition")}render(){return h`
|
|
60
|
-
<slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>
|
|
61
|
-
|
|
62
|
-
<span
|
|
63
|
-
part="hover-bridge"
|
|
64
|
-
class=${_({"popup-hover-bridge":!0,"popup-hover-bridge--visible":this.hoverBridge&&this.active})}
|
|
65
|
-
></span>
|
|
66
|
-
|
|
67
|
-
<div
|
|
68
|
-
part="popup"
|
|
69
|
-
class=${_({popup:!0,"popup--active":this.active,"popup--fixed":this.strategy==="fixed","popup--has-arrow":this.arrow})}
|
|
70
|
-
>
|
|
71
|
-
<slot></slot>
|
|
72
|
-
${this.arrow?h`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}
|
|
73
|
-
</div>
|
|
74
|
-
`}};p.styles=[z,oe];i([b(".popup")],p.prototype,"popup",2);i([b(".popup__arrow")],p.prototype,"arrowEl",2);i([l()],p.prototype,"anchor",2);i([l({type:Boolean,reflect:!0})],p.prototype,"active",2);i([l({reflect:!0})],p.prototype,"placement",2);i([l({reflect:!0})],p.prototype,"strategy",2);i([l({type:Number})],p.prototype,"distance",2);i([l({type:Number})],p.prototype,"skidding",2);i([l({type:Boolean})],p.prototype,"arrow",2);i([l({attribute:"arrow-placement"})],p.prototype,"arrowPlacement",2);i([l({attribute:"arrow-padding",type:Number})],p.prototype,"arrowPadding",2);i([l({type:Boolean})],p.prototype,"flip",2);i([l({attribute:"flip-fallback-placements",converter:{fromAttribute:e=>e.split(" ").map(t=>t.trim()).filter(t=>t!==""),toAttribute:e=>e.join(" ")}})],p.prototype,"flipFallbackPlacements",2);i([l({attribute:"flip-fallback-strategy"})],p.prototype,"flipFallbackStrategy",2);i([l({type:Object})],p.prototype,"flipBoundary",2);i([l({attribute:"flip-padding",type:Number})],p.prototype,"flipPadding",2);i([l({type:Boolean})],p.prototype,"shift",2);i([l({type:Object})],p.prototype,"shiftBoundary",2);i([l({attribute:"shift-padding",type:Number})],p.prototype,"shiftPadding",2);i([l({attribute:"auto-size"})],p.prototype,"autoSize",2);i([l()],p.prototype,"sync",2);i([l({type:Object})],p.prototype,"autoSizeBoundary",2);i([l({attribute:"auto-size-padding",type:Number})],p.prototype,"autoSizePadding",2);i([l({attribute:"hover-bridge",type:Boolean})],p.prototype,"hoverBridge",2);var pe=k`
|
|
75
|
-
:host {
|
|
76
|
-
display: inline-block;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.tag {
|
|
80
|
-
display: flex;
|
|
81
|
-
align-items: center;
|
|
82
|
-
border: solid 1px;
|
|
83
|
-
line-height: 1;
|
|
84
|
-
white-space: nowrap;
|
|
85
|
-
user-select: none;
|
|
86
|
-
-webkit-user-select: none;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.tag__remove::part(base) {
|
|
90
|
-
color: inherit;
|
|
91
|
-
padding: 0;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/*
|
|
95
|
-
* Variant modifiers
|
|
96
|
-
*/
|
|
97
|
-
|
|
98
|
-
.tag--primary {
|
|
99
|
-
background-color: var(--sl-color-primary-50);
|
|
100
|
-
border-color: var(--sl-color-primary-200);
|
|
101
|
-
color: var(--sl-color-primary-800);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.tag--primary:active > sl-icon-button {
|
|
105
|
-
color: var(--sl-color-primary-600);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.tag--success {
|
|
109
|
-
background-color: var(--sl-color-success-50);
|
|
110
|
-
border-color: var(--sl-color-success-200);
|
|
111
|
-
color: var(--sl-color-success-800);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.tag--success:active > sl-icon-button {
|
|
115
|
-
color: var(--sl-color-success-600);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.tag--neutral {
|
|
119
|
-
background-color: var(--sl-color-neutral-50);
|
|
120
|
-
border-color: var(--sl-color-neutral-200);
|
|
121
|
-
color: var(--sl-color-neutral-800);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.tag--neutral:active > sl-icon-button {
|
|
125
|
-
color: var(--sl-color-neutral-600);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.tag--warning {
|
|
129
|
-
background-color: var(--sl-color-warning-50);
|
|
130
|
-
border-color: var(--sl-color-warning-200);
|
|
131
|
-
color: var(--sl-color-warning-800);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.tag--warning:active > sl-icon-button {
|
|
135
|
-
color: var(--sl-color-warning-600);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.tag--danger {
|
|
139
|
-
background-color: var(--sl-color-danger-50);
|
|
140
|
-
border-color: var(--sl-color-danger-200);
|
|
141
|
-
color: var(--sl-color-danger-800);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.tag--danger:active > sl-icon-button {
|
|
145
|
-
color: var(--sl-color-danger-600);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/*
|
|
149
|
-
* Size modifiers
|
|
150
|
-
*/
|
|
151
|
-
|
|
152
|
-
.tag--small {
|
|
153
|
-
font-size: var(--sl-button-font-size-small);
|
|
154
|
-
height: calc(var(--sl-input-height-small) * 0.8);
|
|
155
|
-
line-height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2);
|
|
156
|
-
border-radius: var(--sl-input-border-radius-small);
|
|
157
|
-
padding: 0 var(--sl-spacing-x-small);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.tag--medium {
|
|
161
|
-
font-size: var(--sl-button-font-size-medium);
|
|
162
|
-
height: calc(var(--sl-input-height-medium) * 0.8);
|
|
163
|
-
line-height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2);
|
|
164
|
-
border-radius: var(--sl-input-border-radius-medium);
|
|
165
|
-
padding: 0 var(--sl-spacing-small);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.tag--large {
|
|
169
|
-
font-size: var(--sl-button-font-size-large);
|
|
170
|
-
height: calc(var(--sl-input-height-large) * 0.8);
|
|
171
|
-
line-height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2);
|
|
172
|
-
border-radius: var(--sl-input-border-radius-large);
|
|
173
|
-
padding: 0 var(--sl-spacing-medium);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.tag__remove {
|
|
177
|
-
margin-inline-start: var(--sl-spacing-x-small);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/*
|
|
181
|
-
* Pill modifier
|
|
182
|
-
*/
|
|
183
|
-
|
|
184
|
-
.tag--pill {
|
|
185
|
-
border-radius: var(--sl-border-radius-pill);
|
|
186
|
-
}
|
|
187
|
-
`,y=class extends S{constructor(){super(...arguments),this.localize=new O(this),this.variant="neutral",this.size="medium",this.pill=!1,this.removable=!1}handleRemoveClick(){this.emit("sl-remove")}render(){return h`
|
|
188
|
-
<span
|
|
189
|
-
part="base"
|
|
190
|
-
class=${_({tag:!0,"tag--primary":this.variant==="primary","tag--success":this.variant==="success","tag--neutral":this.variant==="neutral","tag--warning":this.variant==="warning","tag--danger":this.variant==="danger","tag--text":this.variant==="text","tag--small":this.size==="small","tag--medium":this.size==="medium","tag--large":this.size==="large","tag--pill":this.pill,"tag--removable":this.removable})}
|
|
191
|
-
>
|
|
192
|
-
<slot part="content" class="tag__content"></slot>
|
|
193
|
-
|
|
194
|
-
${this.removable?h`
|
|
195
|
-
<sl-icon-button
|
|
196
|
-
part="remove-button"
|
|
197
|
-
exportparts="base:remove-button__base"
|
|
198
|
-
name="x-lg"
|
|
199
|
-
library="system"
|
|
200
|
-
label=${this.localize.term("remove")}
|
|
201
|
-
class="tag__remove"
|
|
202
|
-
@click=${this.handleRemoveClick}
|
|
203
|
-
tabindex="-1"
|
|
204
|
-
></sl-icon-button>
|
|
205
|
-
`:""}
|
|
206
|
-
</span>
|
|
207
|
-
`}};y.styles=[z,pe];y.dependencies={"sl-icon-button":q};i([l({reflect:!0})],y.prototype,"variant",2);i([l({reflect:!0})],y.prototype,"size",2);i([l({type:Boolean,reflect:!0})],y.prototype,"pill",2);i([l({type:Boolean})],y.prototype,"removable",2);var ce=k`
|
|
208
|
-
:host {
|
|
209
|
-
display: block;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/** The popup */
|
|
213
|
-
.select {
|
|
214
|
-
flex: 1 1 auto;
|
|
215
|
-
display: inline-flex;
|
|
216
|
-
width: 100%;
|
|
217
|
-
position: relative;
|
|
218
|
-
vertical-align: middle;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.select::part(popup) {
|
|
222
|
-
z-index: var(--sl-z-index-dropdown);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.select[data-current-placement^='top']::part(popup) {
|
|
226
|
-
transform-origin: bottom;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.select[data-current-placement^='bottom']::part(popup) {
|
|
230
|
-
transform-origin: top;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/* Combobox */
|
|
234
|
-
.select__combobox {
|
|
235
|
-
flex: 1;
|
|
236
|
-
display: flex;
|
|
237
|
-
width: 100%;
|
|
238
|
-
min-width: 0;
|
|
239
|
-
position: relative;
|
|
240
|
-
align-items: center;
|
|
241
|
-
justify-content: start;
|
|
242
|
-
font-family: var(--sl-input-font-family);
|
|
243
|
-
font-weight: var(--sl-input-font-weight);
|
|
244
|
-
letter-spacing: var(--sl-input-letter-spacing);
|
|
245
|
-
vertical-align: middle;
|
|
246
|
-
overflow: hidden;
|
|
247
|
-
cursor: pointer;
|
|
248
|
-
transition:
|
|
249
|
-
var(--sl-transition-fast) color,
|
|
250
|
-
var(--sl-transition-fast) border,
|
|
251
|
-
var(--sl-transition-fast) box-shadow,
|
|
252
|
-
var(--sl-transition-fast) background-color;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.select__display-input {
|
|
256
|
-
position: relative;
|
|
257
|
-
width: 100%;
|
|
258
|
-
font: inherit;
|
|
259
|
-
border: none;
|
|
260
|
-
background: none;
|
|
261
|
-
color: var(--sl-input-color);
|
|
262
|
-
cursor: inherit;
|
|
263
|
-
overflow: hidden;
|
|
264
|
-
padding: 0;
|
|
265
|
-
margin: 0;
|
|
266
|
-
-webkit-appearance: none;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.select__display-input::placeholder {
|
|
270
|
-
color: var(--sl-input-placeholder-color);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.select:not(.select--disabled):hover .select__display-input {
|
|
274
|
-
color: var(--sl-input-color-hover);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.select__display-input:focus {
|
|
278
|
-
outline: none;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/* Visually hide the display input when multiple is enabled */
|
|
282
|
-
.select--multiple:not(.select--placeholder-visible) .select__display-input {
|
|
283
|
-
position: absolute;
|
|
284
|
-
z-index: -1;
|
|
285
|
-
top: 0;
|
|
286
|
-
left: 0;
|
|
287
|
-
width: 100%;
|
|
288
|
-
height: 100%;
|
|
289
|
-
opacity: 0;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.select__value-input {
|
|
293
|
-
position: absolute;
|
|
294
|
-
top: 0;
|
|
295
|
-
left: 0;
|
|
296
|
-
width: 100%;
|
|
297
|
-
height: 100%;
|
|
298
|
-
padding: 0;
|
|
299
|
-
margin: 0;
|
|
300
|
-
opacity: 0;
|
|
301
|
-
z-index: -1;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
.select__tags {
|
|
305
|
-
display: flex;
|
|
306
|
-
flex: 1;
|
|
307
|
-
align-items: center;
|
|
308
|
-
flex-wrap: wrap;
|
|
309
|
-
margin-inline-start: var(--sl-spacing-2x-small);
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
.select__tags::slotted(sl-tag) {
|
|
313
|
-
cursor: pointer !important;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
.select--disabled .select__tags,
|
|
317
|
-
.select--disabled .select__tags::slotted(sl-tag) {
|
|
318
|
-
cursor: not-allowed !important;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/* Standard selects */
|
|
322
|
-
.select--standard .select__combobox {
|
|
323
|
-
background-color: var(--sl-input-background-color);
|
|
324
|
-
border: solid var(--sl-input-border-width) var(--sl-input-border-color);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
.select--standard.select--disabled .select__combobox {
|
|
328
|
-
background-color: var(--sl-input-background-color-disabled);
|
|
329
|
-
border-color: var(--sl-input-border-color-disabled);
|
|
330
|
-
color: var(--sl-input-color-disabled);
|
|
331
|
-
opacity: 0.5;
|
|
332
|
-
cursor: not-allowed;
|
|
333
|
-
outline: none;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.select--standard:not(.select--disabled).select--open .select__combobox,
|
|
337
|
-
.select--standard:not(.select--disabled).select--focused .select__combobox {
|
|
338
|
-
background-color: var(--sl-input-background-color-focus);
|
|
339
|
-
border-color: var(--sl-input-border-color-focus);
|
|
340
|
-
box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color);
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
/* Filled selects */
|
|
344
|
-
.select--filled .select__combobox {
|
|
345
|
-
border: none;
|
|
346
|
-
background-color: var(--sl-input-filled-background-color);
|
|
347
|
-
color: var(--sl-input-color);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.select--filled:hover:not(.select--disabled) .select__combobox {
|
|
351
|
-
background-color: var(--sl-input-filled-background-color-hover);
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
.select--filled.select--disabled .select__combobox {
|
|
355
|
-
background-color: var(--sl-input-filled-background-color-disabled);
|
|
356
|
-
opacity: 0.5;
|
|
357
|
-
cursor: not-allowed;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
.select--filled:not(.select--disabled).select--open .select__combobox,
|
|
361
|
-
.select--filled:not(.select--disabled).select--focused .select__combobox {
|
|
362
|
-
background-color: var(--sl-input-filled-background-color-focus);
|
|
363
|
-
outline: var(--sl-focus-ring);
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/* Sizes */
|
|
367
|
-
.select--small .select__combobox {
|
|
368
|
-
border-radius: var(--sl-input-border-radius-small);
|
|
369
|
-
font-size: var(--sl-input-font-size-small);
|
|
370
|
-
min-height: var(--sl-input-height-small);
|
|
371
|
-
padding-block: 0;
|
|
372
|
-
padding-inline: var(--sl-input-spacing-small);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.select--small .select__clear {
|
|
376
|
-
margin-inline-start: var(--sl-input-spacing-small);
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
.select--small .select__prefix::slotted(*) {
|
|
380
|
-
margin-inline-end: var(--sl-input-spacing-small);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.select--small.select--multiple:not(.select--placeholder-visible) .select__prefix::slotted(*) {
|
|
384
|
-
margin-inline-start: var(--sl-input-spacing-small);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
.select--small.select--multiple:not(.select--placeholder-visible) .select__combobox {
|
|
388
|
-
padding-block: 2px;
|
|
389
|
-
padding-inline-start: 0;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
.select--small .select__tags {
|
|
393
|
-
gap: 2px;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.select--medium .select__combobox {
|
|
397
|
-
border-radius: var(--sl-input-border-radius-medium);
|
|
398
|
-
font-size: var(--sl-input-font-size-medium);
|
|
399
|
-
min-height: var(--sl-input-height-medium);
|
|
400
|
-
padding-block: 0;
|
|
401
|
-
padding-inline: var(--sl-input-spacing-medium);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.select--medium .select__clear {
|
|
405
|
-
margin-inline-start: var(--sl-input-spacing-medium);
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.select--medium .select__prefix::slotted(*) {
|
|
409
|
-
margin-inline-end: var(--sl-input-spacing-medium);
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
.select--medium.select--multiple:not(.select--placeholder-visible) .select__prefix::slotted(*) {
|
|
413
|
-
margin-inline-start: var(--sl-input-spacing-medium);
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.select--medium.select--multiple:not(.select--placeholder-visible) .select__combobox {
|
|
417
|
-
padding-inline-start: 0;
|
|
418
|
-
padding-block: 3px;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
.select--medium .select__tags {
|
|
422
|
-
gap: 3px;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
.select--large .select__combobox {
|
|
426
|
-
border-radius: var(--sl-input-border-radius-large);
|
|
427
|
-
font-size: var(--sl-input-font-size-large);
|
|
428
|
-
min-height: var(--sl-input-height-large);
|
|
429
|
-
padding-block: 0;
|
|
430
|
-
padding-inline: var(--sl-input-spacing-large);
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.select--large .select__clear {
|
|
434
|
-
margin-inline-start: var(--sl-input-spacing-large);
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.select--large .select__prefix::slotted(*) {
|
|
438
|
-
margin-inline-end: var(--sl-input-spacing-large);
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.select--large.select--multiple:not(.select--placeholder-visible) .select__prefix::slotted(*) {
|
|
442
|
-
margin-inline-start: var(--sl-input-spacing-large);
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.select--large.select--multiple:not(.select--placeholder-visible) .select__combobox {
|
|
446
|
-
padding-inline-start: 0;
|
|
447
|
-
padding-block: 4px;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
.select--large .select__tags {
|
|
451
|
-
gap: 4px;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
/* Pills */
|
|
455
|
-
.select--pill.select--small .select__combobox {
|
|
456
|
-
border-radius: var(--sl-input-height-small);
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
.select--pill.select--medium .select__combobox {
|
|
460
|
-
border-radius: var(--sl-input-height-medium);
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
.select--pill.select--large .select__combobox {
|
|
464
|
-
border-radius: var(--sl-input-height-large);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
/* Prefix and Suffix */
|
|
468
|
-
.select__prefix,
|
|
469
|
-
.select__suffix {
|
|
470
|
-
flex: 0;
|
|
471
|
-
display: inline-flex;
|
|
472
|
-
align-items: center;
|
|
473
|
-
color: var(--sl-input-placeholder-color);
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.select__suffix::slotted(*) {
|
|
477
|
-
margin-inline-start: var(--sl-spacing-small);
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
/* Clear button */
|
|
481
|
-
.select__clear {
|
|
482
|
-
display: inline-flex;
|
|
483
|
-
align-items: center;
|
|
484
|
-
justify-content: center;
|
|
485
|
-
font-size: inherit;
|
|
486
|
-
color: var(--sl-input-icon-color);
|
|
487
|
-
border: none;
|
|
488
|
-
background: none;
|
|
489
|
-
padding: 0;
|
|
490
|
-
transition: var(--sl-transition-fast) color;
|
|
491
|
-
cursor: pointer;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
.select__clear:hover {
|
|
495
|
-
color: var(--sl-input-icon-color-hover);
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
.select__clear:focus {
|
|
499
|
-
outline: none;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
/* Expand icon */
|
|
503
|
-
.select__expand-icon {
|
|
504
|
-
flex: 0 0 auto;
|
|
505
|
-
display: flex;
|
|
506
|
-
align-items: center;
|
|
507
|
-
transition: var(--sl-transition-medium) rotate ease;
|
|
508
|
-
rotate: 0;
|
|
509
|
-
margin-inline-start: var(--sl-spacing-small);
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
.select--open .select__expand-icon {
|
|
513
|
-
rotate: -180deg;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
/* Listbox */
|
|
517
|
-
.select__listbox {
|
|
518
|
-
display: block;
|
|
519
|
-
position: relative;
|
|
520
|
-
font-family: var(--sl-font-sans);
|
|
521
|
-
font-size: var(--sl-font-size-medium);
|
|
522
|
-
font-weight: var(--sl-font-weight-normal);
|
|
523
|
-
box-shadow: var(--sl-shadow-large);
|
|
524
|
-
background: var(--sl-panel-background-color);
|
|
525
|
-
border: solid var(--sl-panel-border-width) var(--sl-panel-border-color);
|
|
526
|
-
border-radius: var(--sl-border-radius-medium);
|
|
527
|
-
padding-block: var(--sl-spacing-x-small);
|
|
528
|
-
padding-inline: 0;
|
|
529
|
-
overflow: auto;
|
|
530
|
-
overscroll-behavior: none;
|
|
531
|
-
|
|
532
|
-
/* Make sure it adheres to the popup's auto size */
|
|
533
|
-
max-width: var(--auto-size-available-width);
|
|
534
|
-
max-height: var(--auto-size-available-height);
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.select__listbox ::slotted(sl-divider) {
|
|
538
|
-
--spacing: var(--sl-spacing-x-small);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
.select__listbox ::slotted(small) {
|
|
542
|
-
display: block;
|
|
543
|
-
font-size: var(--sl-font-size-small);
|
|
544
|
-
font-weight: var(--sl-font-weight-semibold);
|
|
545
|
-
color: var(--sl-color-neutral-500);
|
|
546
|
-
padding-block: var(--sl-spacing-2x-small);
|
|
547
|
-
padding-inline: var(--sl-spacing-x-large);
|
|
548
|
-
}
|
|
549
|
-
`;class D extends K{constructor(t){if(super(t),this.it=T,t.type!==U.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===T||t==null)return this._t=void 0,this.it=t;if(t===j)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const s=[t];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}D.directiveName="unsafeHTML",D.resultType=1;const he=W(D);var o=class extends S{constructor(){super(...arguments),this.formControlController=new se(this,{assumeInteractionOn:["sl-blur","sl-input"]}),this.hasSlotController=new le(this,"help-text","label"),this.localize=new O(this),this.typeToSelectString="",this.hasFocus=!1,this.displayLabel="",this.selectedOptions=[],this.valueHasChanged=!1,this.name="",this._value="",this.defaultValue="",this.size="medium",this.placeholder="",this.multiple=!1,this.maxOptionsVisible=3,this.disabled=!1,this.clearable=!1,this.open=!1,this.hoist=!1,this.filled=!1,this.pill=!1,this.label="",this.placement="bottom",this.helpText="",this.form="",this.required=!1,this.getTag=e=>h`
|
|
550
|
-
<sl-tag
|
|
551
|
-
part="tag"
|
|
552
|
-
exportparts="
|
|
553
|
-
base:tag__base,
|
|
554
|
-
content:tag__content,
|
|
555
|
-
remove-button:tag__remove-button,
|
|
556
|
-
remove-button__base:tag__remove-button__base
|
|
557
|
-
"
|
|
558
|
-
?pill=${this.pill}
|
|
559
|
-
size=${this.size}
|
|
560
|
-
removable
|
|
561
|
-
@sl-remove=${t=>this.handleTagRemove(t,e)}
|
|
562
|
-
>
|
|
563
|
-
${e.getTextLabel()}
|
|
564
|
-
</sl-tag>
|
|
565
|
-
`,this.handleDocumentFocusIn=e=>{const t=e.composedPath();this&&!t.includes(this)&&this.hide()},this.handleDocumentKeyDown=e=>{const t=e.target,s=t.closest(".select__clear")!==null,a=t.closest("sl-icon-button")!==null;if(!(s||a)){if(e.key==="Escape"&&this.open&&!this.closeWatcher&&(e.preventDefault(),e.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),e.key==="Enter"||e.key===" "&&this.typeToSelectString===""){if(e.preventDefault(),e.stopImmediatePropagation(),!this.open){this.show();return}this.currentOption&&!this.currentOption.disabled&&(this.valueHasChanged=!0,this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("sl-input"),this.emit("sl-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})));return}if(["ArrowUp","ArrowDown","Home","End"].includes(e.key)){const n=this.getAllOptions(),r=n.indexOf(this.currentOption);let c=Math.max(0,r);if(e.preventDefault(),!this.open&&(this.show(),this.currentOption))return;e.key==="ArrowDown"?(c=r+1,c>n.length-1&&(c=0)):e.key==="ArrowUp"?(c=r-1,c<0&&(c=n.length-1)):e.key==="Home"?c=0:e.key==="End"&&(c=n.length-1),this.setCurrentOption(n[c])}if(e.key&&e.key.length===1||e.key==="Backspace"){const n=this.getAllOptions();if(e.metaKey||e.ctrlKey||e.altKey)return;if(!this.open){if(e.key==="Backspace")return;this.show()}e.stopPropagation(),e.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout(()=>this.typeToSelectString="",1e3),e.key==="Backspace"?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=e.key.toLowerCase();for(const r of n)if(r.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(r);break}}}},this.handleDocumentMouseDown=e=>{const t=e.composedPath();this&&!t.includes(this)&&this.hide()}}get value(){return this._value}set value(e){this.multiple?e=Array.isArray(e)?e:e.split(" "):e=Array.isArray(e)?e.join(" "):e,this._value!==e&&(this.valueHasChanged=!0,this._value=e)}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),setTimeout(()=>{this.handleDefaultSlotChange()}),this.open=!1}addOpenListeners(){var e;document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn),"CloseWatcher"in window&&((e=this.closeWatcher)==null||e.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.open&&(this.hide(),this.displayInput.focus({preventScroll:!0}))})}removeOpenListeners(){var e;document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn),(e=this.closeWatcher)==null||e.destroy()}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sl-focus")}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(e){const s=e.composedPath().some(a=>a instanceof Element&&a.tagName.toLowerCase()==="sl-icon-button");this.disabled||s||(e.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(e){e.key!=="Tab"&&(e.stopPropagation(),this.handleDocumentKeyDown(e))}handleClearClick(e){e.stopPropagation(),this.valueHasChanged=!0,this.value!==""&&(this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sl-clear"),this.emit("sl-input"),this.emit("sl-change")}))}handleClearMouseDown(e){e.stopPropagation(),e.preventDefault()}handleOptionClick(e){const s=e.target.closest("sl-option"),a=this.value;s&&!s.disabled&&(this.valueHasChanged=!0,this.multiple?this.toggleOptionSelection(s):this.setSelectedOptions(s),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})),this.value!==a&&this.updateComplete.then(()=>{this.emit("sl-input"),this.emit("sl-change")}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}handleDefaultSlotChange(){customElements.get("sl-option")||customElements.whenDefined("sl-option").then(()=>this.handleDefaultSlotChange());const e=this.getAllOptions(),t=this.valueHasChanged?this.value:this.defaultValue,s=Array.isArray(t)?t:[t],a=[];e.forEach(n=>a.push(n.value)),this.setSelectedOptions(e.filter(n=>s.includes(n.value)))}handleTagRemove(e,t){e.stopPropagation(),this.valueHasChanged=!0,this.disabled||(this.toggleOptionSelection(t,!1),this.updateComplete.then(()=>{this.emit("sl-input"),this.emit("sl-change")}))}getAllOptions(){return[...this.querySelectorAll("sl-option")]}getFirstOption(){return this.querySelector("sl-option")}setCurrentOption(e){this.getAllOptions().forEach(s=>{s.current=!1,s.tabIndex=-1}),e&&(this.currentOption=e,e.current=!0,e.tabIndex=0,e.focus())}setSelectedOptions(e){const t=this.getAllOptions(),s=Array.isArray(e)?e:[e];t.forEach(a=>a.selected=!1),s.length&&s.forEach(a=>a.selected=!0),this.selectionChanged()}toggleOptionSelection(e,t){t===!0||t===!1?e.selected=t:e.selected=!e.selected,this.selectionChanged()}selectionChanged(){var e,t,s;const a=this.getAllOptions();this.selectedOptions=a.filter(r=>r.selected);const n=this.valueHasChanged;if(this.multiple)this.value=this.selectedOptions.map(r=>r.value),this.placeholder&&this.value.length===0?this.displayLabel="":this.displayLabel=this.localize.term("numOptionsSelected",this.selectedOptions.length);else{const r=this.selectedOptions[0];this.value=(e=r?.value)!=null?e:"",this.displayLabel=(s=(t=r?.getTextLabel)==null?void 0:t.call(r))!=null?s:""}this.valueHasChanged=n,this.updateComplete.then(()=>{this.formControlController.updateValidity()})}get tags(){return this.selectedOptions.map((e,t)=>{if(t<this.maxOptionsVisible||this.maxOptionsVisible<=0){const s=this.getTag(e,t);return h`<div @sl-remove=${a=>this.handleTagRemove(a,e)}>
|
|
566
|
-
${typeof s=="string"?he(s):s}
|
|
567
|
-
</div>`}else if(t===this.maxOptionsVisible)return h`<sl-tag size=${this.size}>+${this.selectedOptions.length-t}</sl-tag>`;return h``})}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}attributeChangedCallback(e,t,s){if(super.attributeChangedCallback(e,t,s),e==="value"){const a=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=a}}handleValueChange(){if(!this.valueHasChanged){const s=this.valueHasChanged;this.value=this.defaultValue,this.valueHasChanged=s}const e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(e.filter(s=>t.includes(s.value)))}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sl-show"),this.addOpenListeners(),await B(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});const{keyframes:e,options:t}=L(this,"select.show",{dir:this.localize.dir()});await H(this.popup.popup,e,t),this.currentOption&&X(this.currentOption,this.listbox,"vertical","auto"),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),await B(this);const{keyframes:e,options:t}=L(this,"select.hide",{dir:this.localize.dir()});await H(this.popup.popup,e,t),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sl-after-hide")}}async show(){if(this.open||this.disabled){this.open=!1;return}return this.open=!0,V(this,"sl-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,V(this,"sl-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.valueInput.reportValidity()}setCustomValidity(e){this.valueInput.setCustomValidity(e),this.formControlController.updateValidity()}focus(e){this.displayInput.focus(e)}blur(){this.displayInput.blur()}render(){const e=this.hasSlotController.test("label"),t=this.hasSlotController.test("help-text"),s=this.label?!0:!!e,a=this.helpText?!0:!!t,n=this.clearable&&!this.disabled&&this.value.length>0,r=this.placeholder&&this.value&&this.value.length<=0;return h`
|
|
568
|
-
<div
|
|
569
|
-
part="form-control"
|
|
570
|
-
class=${_({"form-control":!0,"form-control--small":this.size==="small","form-control--medium":this.size==="medium","form-control--large":this.size==="large","form-control--has-label":s,"form-control--has-help-text":a})}
|
|
571
|
-
>
|
|
572
|
-
<label
|
|
573
|
-
id="label"
|
|
574
|
-
part="form-control-label"
|
|
575
|
-
class="form-control__label"
|
|
576
|
-
aria-hidden=${s?"false":"true"}
|
|
577
|
-
@click=${this.handleLabelClick}
|
|
578
|
-
>
|
|
579
|
-
<slot name="label">${this.label}</slot>
|
|
580
|
-
</label>
|
|
581
|
-
|
|
582
|
-
<div part="form-control-input" class="form-control-input">
|
|
583
|
-
<sl-popup
|
|
584
|
-
class=${_({select:!0,"select--standard":!0,"select--filled":this.filled,"select--pill":this.pill,"select--open":this.open,"select--disabled":this.disabled,"select--multiple":this.multiple,"select--focused":this.hasFocus,"select--placeholder-visible":r,"select--top":this.placement==="top","select--bottom":this.placement==="bottom","select--small":this.size==="small","select--medium":this.size==="medium","select--large":this.size==="large"})}
|
|
585
|
-
placement=${this.placement}
|
|
586
|
-
strategy=${this.hoist?"fixed":"absolute"}
|
|
587
|
-
flip
|
|
588
|
-
shift
|
|
589
|
-
sync="width"
|
|
590
|
-
auto-size="vertical"
|
|
591
|
-
auto-size-padding="10"
|
|
592
|
-
>
|
|
593
|
-
<div
|
|
594
|
-
part="combobox"
|
|
595
|
-
class="select__combobox"
|
|
596
|
-
slot="anchor"
|
|
597
|
-
@keydown=${this.handleComboboxKeyDown}
|
|
598
|
-
@mousedown=${this.handleComboboxMouseDown}
|
|
599
|
-
>
|
|
600
|
-
<slot part="prefix" name="prefix" class="select__prefix"></slot>
|
|
601
|
-
|
|
602
|
-
<input
|
|
603
|
-
part="display-input"
|
|
604
|
-
class="select__display-input"
|
|
605
|
-
type="text"
|
|
606
|
-
placeholder=${this.placeholder}
|
|
607
|
-
.disabled=${this.disabled}
|
|
608
|
-
.value=${this.displayLabel}
|
|
609
|
-
autocomplete="off"
|
|
610
|
-
spellcheck="false"
|
|
611
|
-
autocapitalize="off"
|
|
612
|
-
readonly
|
|
613
|
-
aria-controls="listbox"
|
|
614
|
-
aria-expanded=${this.open?"true":"false"}
|
|
615
|
-
aria-haspopup="listbox"
|
|
616
|
-
aria-labelledby="label"
|
|
617
|
-
aria-disabled=${this.disabled?"true":"false"}
|
|
618
|
-
aria-describedby="help-text"
|
|
619
|
-
role="combobox"
|
|
620
|
-
tabindex="0"
|
|
621
|
-
@focus=${this.handleFocus}
|
|
622
|
-
@blur=${this.handleBlur}
|
|
623
|
-
/>
|
|
624
|
-
|
|
625
|
-
${this.multiple?h`<div part="tags" class="select__tags">${this.tags}</div>`:""}
|
|
626
|
-
|
|
627
|
-
<input
|
|
628
|
-
class="select__value-input"
|
|
629
|
-
type="text"
|
|
630
|
-
?disabled=${this.disabled}
|
|
631
|
-
?required=${this.required}
|
|
632
|
-
.value=${Array.isArray(this.value)?this.value.join(", "):this.value}
|
|
633
|
-
tabindex="-1"
|
|
634
|
-
aria-hidden="true"
|
|
635
|
-
@focus=${()=>this.focus()}
|
|
636
|
-
@invalid=${this.handleInvalid}
|
|
637
|
-
/>
|
|
638
|
-
|
|
639
|
-
${n?h`
|
|
640
|
-
<button
|
|
641
|
-
part="clear-button"
|
|
642
|
-
class="select__clear"
|
|
643
|
-
type="button"
|
|
644
|
-
aria-label=${this.localize.term("clearEntry")}
|
|
645
|
-
@mousedown=${this.handleClearMouseDown}
|
|
646
|
-
@click=${this.handleClearClick}
|
|
647
|
-
tabindex="-1"
|
|
648
|
-
>
|
|
649
|
-
<slot name="clear-icon">
|
|
650
|
-
<sl-icon name="x-circle-fill" library="system"></sl-icon>
|
|
651
|
-
</slot>
|
|
652
|
-
</button>
|
|
653
|
-
`:""}
|
|
654
|
-
|
|
655
|
-
<slot name="suffix" part="suffix" class="select__suffix"></slot>
|
|
656
|
-
|
|
657
|
-
<slot name="expand-icon" part="expand-icon" class="select__expand-icon">
|
|
658
|
-
<sl-icon library="system" name="chevron-down"></sl-icon>
|
|
659
|
-
</slot>
|
|
660
|
-
</div>
|
|
661
|
-
|
|
662
|
-
<div
|
|
663
|
-
id="listbox"
|
|
664
|
-
role="listbox"
|
|
665
|
-
aria-expanded=${this.open?"true":"false"}
|
|
666
|
-
aria-multiselectable=${this.multiple?"true":"false"}
|
|
667
|
-
aria-labelledby="label"
|
|
668
|
-
part="listbox"
|
|
669
|
-
class="select__listbox"
|
|
670
|
-
tabindex="-1"
|
|
671
|
-
@mouseup=${this.handleOptionClick}
|
|
672
|
-
@slotchange=${this.handleDefaultSlotChange}
|
|
673
|
-
>
|
|
674
|
-
<slot></slot>
|
|
675
|
-
</div>
|
|
676
|
-
</sl-popup>
|
|
677
|
-
</div>
|
|
678
|
-
|
|
679
|
-
<div
|
|
680
|
-
part="form-control-help-text"
|
|
681
|
-
id="help-text"
|
|
682
|
-
class="form-control__help-text"
|
|
683
|
-
aria-hidden=${a?"false":"true"}
|
|
684
|
-
>
|
|
685
|
-
<slot name="help-text">${this.helpText}</slot>
|
|
686
|
-
</div>
|
|
687
|
-
</div>
|
|
688
|
-
`}};o.styles=[z,Y,ce];o.dependencies={"sl-icon":N,"sl-popup":p,"sl-tag":y};i([b(".select")],o.prototype,"popup",2);i([b(".select__combobox")],o.prototype,"combobox",2);i([b(".select__display-input")],o.prototype,"displayInput",2);i([b(".select__value-input")],o.prototype,"valueInput",2);i([b(".select__listbox")],o.prototype,"listbox",2);i([f()],o.prototype,"hasFocus",2);i([f()],o.prototype,"displayLabel",2);i([f()],o.prototype,"currentOption",2);i([f()],o.prototype,"selectedOptions",2);i([f()],o.prototype,"valueHasChanged",2);i([l()],o.prototype,"name",2);i([f()],o.prototype,"value",1);i([l({attribute:"value"})],o.prototype,"defaultValue",2);i([l({reflect:!0})],o.prototype,"size",2);i([l()],o.prototype,"placeholder",2);i([l({type:Boolean,reflect:!0})],o.prototype,"multiple",2);i([l({attribute:"max-options-visible",type:Number})],o.prototype,"maxOptionsVisible",2);i([l({type:Boolean,reflect:!0})],o.prototype,"disabled",2);i([l({type:Boolean})],o.prototype,"clearable",2);i([l({type:Boolean,reflect:!0})],o.prototype,"open",2);i([l({type:Boolean})],o.prototype,"hoist",2);i([l({type:Boolean,reflect:!0})],o.prototype,"filled",2);i([l({type:Boolean,reflect:!0})],o.prototype,"pill",2);i([l()],o.prototype,"label",2);i([l({reflect:!0})],o.prototype,"placement",2);i([l({attribute:"help-text"})],o.prototype,"helpText",2);i([l({reflect:!0})],o.prototype,"form",2);i([l({type:Boolean,reflect:!0})],o.prototype,"required",2);i([l()],o.prototype,"getTag",2);i([x("disabled",{waitUntilFirstUpdate:!0})],o.prototype,"handleDisabledChange",1);i([x(["defaultValue","value"],{waitUntilFirstUpdate:!0})],o.prototype,"handleValueChange",1);i([x("open",{waitUntilFirstUpdate:!0})],o.prototype,"handleOpenChange",1);F("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}});F("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});o.define("sl-select");var de=k`
|
|
689
|
-
:host {
|
|
690
|
-
display: block;
|
|
691
|
-
user-select: none;
|
|
692
|
-
-webkit-user-select: none;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
:host(:focus) {
|
|
696
|
-
outline: none;
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
.option {
|
|
700
|
-
position: relative;
|
|
701
|
-
display: flex;
|
|
702
|
-
align-items: center;
|
|
703
|
-
font-family: var(--sl-font-sans);
|
|
704
|
-
font-size: var(--sl-font-size-medium);
|
|
705
|
-
font-weight: var(--sl-font-weight-normal);
|
|
706
|
-
line-height: var(--sl-line-height-normal);
|
|
707
|
-
letter-spacing: var(--sl-letter-spacing-normal);
|
|
708
|
-
color: var(--sl-color-neutral-700);
|
|
709
|
-
padding: var(--sl-spacing-x-small) var(--sl-spacing-medium) var(--sl-spacing-x-small) var(--sl-spacing-x-small);
|
|
710
|
-
transition: var(--sl-transition-fast) fill;
|
|
711
|
-
cursor: pointer;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
.option--hover:not(.option--current):not(.option--disabled) {
|
|
715
|
-
background-color: var(--sl-color-neutral-100);
|
|
716
|
-
color: var(--sl-color-neutral-1000);
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
.option--current,
|
|
720
|
-
.option--current.option--disabled {
|
|
721
|
-
background-color: var(--sl-color-primary-600);
|
|
722
|
-
color: var(--sl-color-neutral-0);
|
|
723
|
-
opacity: 1;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
.option--disabled {
|
|
727
|
-
outline: none;
|
|
728
|
-
opacity: 0.5;
|
|
729
|
-
cursor: not-allowed;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
.option__label {
|
|
733
|
-
flex: 1 1 auto;
|
|
734
|
-
display: inline-block;
|
|
735
|
-
line-height: var(--sl-line-height-dense);
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
.option .option__check {
|
|
739
|
-
flex: 0 0 auto;
|
|
740
|
-
display: flex;
|
|
741
|
-
align-items: center;
|
|
742
|
-
justify-content: center;
|
|
743
|
-
visibility: hidden;
|
|
744
|
-
padding-inline-end: var(--sl-spacing-2x-small);
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
.option--selected .option__check {
|
|
748
|
-
visibility: visible;
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
.option__prefix,
|
|
752
|
-
.option__suffix {
|
|
753
|
-
flex: 0 0 auto;
|
|
754
|
-
display: flex;
|
|
755
|
-
align-items: center;
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
.option__prefix::slotted(*) {
|
|
759
|
-
margin-inline-end: var(--sl-spacing-x-small);
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
.option__suffix::slotted(*) {
|
|
763
|
-
margin-inline-start: var(--sl-spacing-x-small);
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
@media (forced-colors: active) {
|
|
767
|
-
:host(:hover:not([aria-disabled='true'])) .option {
|
|
768
|
-
outline: dashed 1px SelectedItem;
|
|
769
|
-
outline-offset: -1px;
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
`,d=class extends S{constructor(){super(...arguments),this.localize=new O(this),this.isInitialized=!1,this.current=!1,this.selected=!1,this.hasHover=!1,this.value="",this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){this.isInitialized?customElements.whenDefined("sl-select").then(()=>{const e=this.closest("sl-select");e&&e.handleDefaultSlotChange()}):this.isInitialized=!0}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){typeof this.value!="string"&&(this.value=String(this.value)),this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){const e=this.childNodes;let t="";return[...e].forEach(s=>{s.nodeType===Node.ELEMENT_NODE&&(s.hasAttribute("slot")||(t+=s.textContent)),s.nodeType===Node.TEXT_NODE&&(t+=s.textContent)}),t.trim()}render(){return h`
|
|
773
|
-
<div
|
|
774
|
-
part="base"
|
|
775
|
-
class=${_({option:!0,"option--current":this.current,"option--disabled":this.disabled,"option--selected":this.selected,"option--hover":this.hasHover})}
|
|
776
|
-
@mouseenter=${this.handleMouseEnter}
|
|
777
|
-
@mouseleave=${this.handleMouseLeave}
|
|
778
|
-
>
|
|
779
|
-
<sl-icon part="checked-icon" class="option__check" name="check" library="system" aria-hidden="true"></sl-icon>
|
|
780
|
-
<slot part="prefix" name="prefix" class="option__prefix"></slot>
|
|
781
|
-
<slot part="label" class="option__label" @slotchange=${this.handleDefaultSlotChange}></slot>
|
|
782
|
-
<slot part="suffix" name="suffix" class="option__suffix"></slot>
|
|
783
|
-
</div>
|
|
784
|
-
`}};d.styles=[z,de];d.dependencies={"sl-icon":N};i([b(".option__label")],d.prototype,"defaultSlot",2);i([f()],d.prototype,"current",2);i([f()],d.prototype,"selected",2);i([f()],d.prototype,"hasHover",2);i([l({reflect:!0})],d.prototype,"value",2);i([l({type:Boolean,reflect:!0})],d.prototype,"disabled",2);i([x("disabled")],d.prototype,"handleDisabledChange",1);i([x("selected")],d.prototype,"handleSelectedChange",1);i([x("value")],d.prototype,"handleValueChange",1);d.define("sl-option");export{p as S,y as a,he as o};
|
|
785
|
-
//# sourceMappingURL=chunk.JXOKFADN-DpK3Q_uU.js.map
|