solid-ui 3.1.0 → 3.1.1
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/README.md +22 -4
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/index.esm.js +546 -0
- package/dist/components/button/index.esm.js.map +1 -0
- package/dist/components/button/index.esm.min.js +268 -0
- package/dist/components/button/index.esm.min.js.map +1 -0
- package/dist/components/button/index.js +428 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button/index.min.js +257 -0
- package/dist/components/button/index.min.js.map +1 -0
- package/dist/components/combobox/index.d.ts +1 -0
- package/dist/components/combobox/index.esm.js +953 -0
- package/dist/components/combobox/index.esm.js.map +1 -0
- package/dist/components/combobox/index.esm.min.js +339 -0
- package/dist/components/combobox/index.esm.min.js.map +1 -0
- package/dist/components/combobox/index.js +782 -0
- package/dist/components/combobox/index.js.map +1 -0
- package/dist/components/combobox/index.min.js +328 -0
- package/dist/components/combobox/index.min.js.map +1 -0
- package/dist/components/footer/index.d.ts +1 -1
- package/dist/components/footer/index.esm.js +105 -63
- package/dist/components/footer/index.esm.js.map +1 -1
- package/dist/components/footer/index.esm.min.js +4 -4
- package/dist/components/footer/index.esm.min.js.map +1 -1
- package/dist/components/footer/index.js +103 -52
- package/dist/components/footer/index.js.map +1 -1
- package/dist/components/footer/index.min.js +8 -8
- package/dist/components/footer/index.min.js.map +1 -1
- package/dist/components/header/index.d.ts +1 -1
- package/dist/components/header/index.esm.js +1405 -1363
- package/dist/components/header/index.esm.js.map +1 -1
- package/dist/components/header/index.esm.min.js +857 -815
- package/dist/components/header/index.esm.min.js.map +1 -1
- package/dist/components/header/index.js +61 -19
- package/dist/components/header/index.js.map +1 -1
- package/dist/components/header/index.min.js +53 -11
- package/dist/components/header/index.min.js.map +1 -1
- package/dist/components/loginButton/index.d.ts +1 -1
- package/dist/components/loginButton/index.esm.js +50 -8
- package/dist/components/loginButton/index.esm.js.map +1 -1
- package/dist/components/loginButton/index.esm.min.js +60 -18
- package/dist/components/loginButton/index.esm.min.js.map +1 -1
- package/dist/components/loginButton/index.js +49 -7
- package/dist/components/loginButton/index.js.map +1 -1
- package/dist/components/loginButton/index.min.js +58 -16
- package/dist/components/loginButton/index.min.js.map +1 -1
- package/dist/components/photoCapture/index.d.ts +1 -0
- package/dist/components/photoCapture/index.esm.js +966 -0
- package/dist/components/photoCapture/index.esm.js.map +1 -0
- package/dist/components/photoCapture/index.esm.min.js +304 -0
- package/dist/components/photoCapture/index.esm.min.js.map +1 -0
- package/dist/components/photoCapture/index.js +848 -0
- package/dist/components/photoCapture/index.js.map +1 -0
- package/dist/components/photoCapture/index.min.js +293 -0
- package/dist/components/photoCapture/index.min.js.map +1 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/index.esm.js +939 -0
- package/dist/components/select/index.esm.js.map +1 -0
- package/dist/components/select/index.esm.min.js +370 -0
- package/dist/components/select/index.esm.min.js.map +1 -0
- package/dist/components/select/index.js +771 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/select/index.min.js +359 -0
- package/dist/components/select/index.min.js.map +1 -0
- package/dist/components/signupButton/index.d.ts +1 -1
- package/dist/components/signupButton/index.esm.js +2 -2
- package/dist/components/signupButton/index.esm.js.map +1 -1
- package/dist/components/signupButton/index.esm.min.js +2 -2
- package/dist/components/signupButton/index.esm.min.js.map +1 -1
- package/dist/components/signupButton/index.js +2 -2
- package/dist/components/signupButton/index.js.map +1 -1
- package/dist/components/signupButton/index.min.js.map +1 -1
- package/dist/login/login.d.ts.map +1 -1
- package/dist/login/login.js +12 -2
- package/dist/login/login.js.map +1 -1
- package/dist/matrix/matrix.js.map +1 -1
- package/dist/solid-ui.esm.js +103 -61
- package/dist/solid-ui.esm.js.map +1 -1
- package/dist/solid-ui.esm.min.js +6 -6
- package/dist/solid-ui.esm.min.js.map +1 -1
- package/dist/solid-ui.js +102 -51
- package/dist/solid-ui.js.map +1 -1
- package/dist/solid-ui.min.js +9 -9
- package/dist/solid-ui.min.js.map +1 -1
- package/dist/tabs.js +2 -2
- package/dist/tabs.js.map +1 -1
- package/dist/v2/components/actions/button/Button.d.ts +97 -0
- package/dist/v2/components/actions/button/Button.d.ts.map +1 -0
- package/dist/v2/components/actions/button/Button.js +325 -0
- package/dist/v2/components/actions/button/Button.js.map +1 -0
- package/dist/v2/components/actions/button/Button.test.d.ts +2 -0
- package/dist/v2/components/actions/button/Button.test.d.ts.map +1 -0
- package/dist/v2/components/actions/button/Button.test.js +117 -0
- package/dist/v2/components/actions/button/Button.test.js.map +1 -0
- package/dist/v2/components/actions/button/index.d.ts +8 -0
- package/dist/v2/components/actions/button/index.d.ts.map +1 -0
- package/dist/v2/components/actions/button/index.js +7 -0
- package/dist/v2/components/actions/button/index.js.map +1 -0
- package/dist/v2/components/auth/loginButton/LoginButton.d.ts.map +1 -0
- package/dist/v2/components/{loginButton → auth/loginButton}/LoginButton.js +46 -4
- package/dist/v2/components/auth/loginButton/LoginButton.js.map +1 -0
- package/dist/v2/components/auth/loginButton/LoginButton.test.d.ts.map +1 -0
- package/dist/v2/components/auth/loginButton/LoginButton.test.js.map +1 -0
- package/dist/v2/components/auth/loginButton/downArrow.d.ts.map +1 -0
- package/dist/v2/components/auth/loginButton/downArrow.js.map +1 -0
- package/dist/v2/components/auth/loginButton/index.d.ts.map +1 -0
- package/dist/v2/components/auth/loginButton/index.js.map +1 -0
- package/dist/v2/components/auth/signupButton/SignupButton.d.ts.map +1 -0
- package/dist/v2/components/auth/signupButton/SignupButton.js.map +1 -0
- package/dist/v2/components/auth/signupButton/SignupButton.test.d.ts.map +1 -0
- package/dist/v2/components/auth/signupButton/SignupButton.test.js.map +1 -0
- package/dist/v2/components/auth/signupButton/index.d.ts.map +1 -0
- package/dist/v2/components/auth/signupButton/index.js.map +1 -0
- package/dist/v2/components/forms/combobox/Combobox.d.ts +82 -0
- package/dist/v2/components/forms/combobox/Combobox.d.ts.map +1 -0
- package/dist/v2/components/forms/combobox/Combobox.js +506 -0
- package/dist/v2/components/forms/combobox/Combobox.js.map +1 -0
- package/dist/v2/components/forms/combobox/Combobox.test.d.ts +2 -0
- package/dist/v2/components/forms/combobox/Combobox.test.d.ts.map +1 -0
- package/dist/v2/components/forms/combobox/Combobox.test.js +201 -0
- package/dist/v2/components/forms/combobox/Combobox.test.js.map +1 -0
- package/dist/v2/components/forms/combobox/comboboxTypes.d.ts +6 -0
- package/dist/v2/components/forms/combobox/comboboxTypes.d.ts.map +1 -0
- package/dist/v2/components/forms/combobox/comboboxTypes.js +2 -0
- package/dist/v2/components/forms/combobox/comboboxTypes.js.map +1 -0
- package/dist/v2/components/forms/combobox/index.d.ts +3 -0
- package/dist/v2/components/forms/combobox/index.d.ts.map +1 -0
- package/dist/v2/components/forms/combobox/index.js +7 -0
- package/dist/v2/components/forms/combobox/index.js.map +1 -0
- package/dist/v2/components/forms/select/Select.d.ts +68 -0
- package/dist/v2/components/forms/select/Select.d.ts.map +1 -0
- package/dist/v2/components/forms/select/Select.js +499 -0
- package/dist/v2/components/forms/select/Select.js.map +1 -0
- package/dist/v2/components/forms/select/Select.test.d.ts +2 -0
- package/dist/v2/components/forms/select/Select.test.d.ts.map +1 -0
- package/dist/v2/components/forms/select/Select.test.js +168 -0
- package/dist/v2/components/forms/select/Select.test.js.map +1 -0
- package/dist/v2/components/forms/select/index.d.ts +3 -0
- package/dist/v2/components/forms/select/index.d.ts.map +1 -0
- package/dist/v2/components/forms/select/index.js +7 -0
- package/dist/v2/components/forms/select/index.js.map +1 -0
- package/dist/v2/components/forms/shared/downArrow.d.ts +2 -0
- package/dist/v2/components/forms/shared/downArrow.d.ts.map +1 -0
- package/dist/v2/components/forms/shared/downArrow.js +10 -0
- package/dist/v2/components/forms/shared/downArrow.js.map +1 -0
- package/dist/v2/components/forms/shared/keyboard.d.ts +7 -0
- package/dist/v2/components/forms/shared/keyboard.d.ts.map +1 -0
- package/dist/v2/components/forms/shared/keyboard.js +56 -0
- package/dist/v2/components/forms/shared/keyboard.js.map +1 -0
- package/dist/v2/components/forms/shared/listboxStyles.d.ts +2 -0
- package/dist/v2/components/forms/shared/listboxStyles.d.ts.map +1 -0
- package/dist/v2/components/forms/shared/listboxStyles.js +96 -0
- package/dist/v2/components/forms/shared/listboxStyles.js.map +1 -0
- package/dist/v2/components/forms/shared/listboxTemplate.d.ts +11 -0
- package/dist/v2/components/forms/shared/listboxTemplate.d.ts.map +1 -0
- package/dist/v2/components/forms/shared/listboxTemplate.js +37 -0
- package/dist/v2/components/forms/shared/listboxTemplate.js.map +1 -0
- package/dist/v2/components/forms/shared/optionTypes.d.ts +6 -0
- package/dist/v2/components/forms/shared/optionTypes.d.ts.map +1 -0
- package/dist/v2/components/forms/shared/optionTypes.js +2 -0
- package/dist/v2/components/forms/shared/optionTypes.js.map +1 -0
- package/dist/v2/components/layout/footer/Footer.d.ts.map +1 -0
- package/dist/v2/components/{footer → layout/footer}/Footer.js +1 -1
- package/dist/v2/components/layout/footer/Footer.js.map +1 -0
- package/dist/v2/components/layout/footer/Footer.test.d.ts.map +1 -0
- package/dist/v2/components/layout/footer/Footer.test.js.map +1 -0
- package/dist/v2/components/layout/footer/index.d.ts.map +1 -0
- package/dist/v2/components/layout/footer/index.js.map +1 -0
- package/dist/v2/components/{header → layout/header}/Header.d.ts +2 -2
- package/dist/v2/components/layout/header/Header.d.ts.map +1 -0
- package/dist/v2/components/{header → layout/header}/Header.js +5 -5
- package/dist/v2/components/layout/header/Header.js.map +1 -0
- package/dist/v2/components/layout/header/header.test.d.ts.map +1 -0
- package/dist/v2/components/layout/header/header.test.js.map +1 -0
- package/dist/v2/components/layout/header/index.d.ts.map +1 -0
- package/dist/v2/components/layout/header/index.js.map +1 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.d.ts +200 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.d.ts.map +1 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.js +723 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.js.map +1 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.test.d.ts +2 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.test.d.ts.map +1 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.test.js +157 -0
- package/dist/v2/components/media/photoCapture/PhotoCapture.test.js.map +1 -0
- package/dist/v2/components/media/photoCapture/index.d.ts +3 -0
- package/dist/v2/components/media/photoCapture/index.d.ts.map +1 -0
- package/dist/v2/components/media/photoCapture/index.js +7 -0
- package/dist/v2/components/media/photoCapture/index.js.map +1 -0
- package/dist/versionInfo.js +14 -14
- package/dist/widgets/buttons.d.ts +1 -0
- package/dist/widgets/buttons.d.ts.map +1 -1
- package/dist/widgets/buttons.js +15 -2
- package/dist/widgets/buttons.js.map +1 -1
- package/package.json +223 -157
- package/dist/v2/components/footer/Footer.d.ts.map +0 -1
- package/dist/v2/components/footer/Footer.js.map +0 -1
- package/dist/v2/components/footer/Footer.test.d.ts.map +0 -1
- package/dist/v2/components/footer/Footer.test.js.map +0 -1
- package/dist/v2/components/footer/index.d.ts.map +0 -1
- package/dist/v2/components/footer/index.js.map +0 -1
- package/dist/v2/components/header/Header.d.ts.map +0 -1
- package/dist/v2/components/header/Header.js.map +0 -1
- package/dist/v2/components/header/header.test.d.ts.map +0 -1
- package/dist/v2/components/header/header.test.js.map +0 -1
- package/dist/v2/components/header/index.d.ts.map +0 -1
- package/dist/v2/components/header/index.js.map +0 -1
- package/dist/v2/components/loginButton/LoginButton.d.ts.map +0 -1
- package/dist/v2/components/loginButton/LoginButton.js.map +0 -1
- package/dist/v2/components/loginButton/LoginButton.test.d.ts.map +0 -1
- package/dist/v2/components/loginButton/LoginButton.test.js.map +0 -1
- package/dist/v2/components/loginButton/downArrow.d.ts.map +0 -1
- package/dist/v2/components/loginButton/downArrow.js.map +0 -1
- package/dist/v2/components/loginButton/index.d.ts.map +0 -1
- package/dist/v2/components/loginButton/index.js.map +0 -1
- package/dist/v2/components/signupButton/SignupButton.d.ts.map +0 -1
- package/dist/v2/components/signupButton/SignupButton.js.map +0 -1
- package/dist/v2/components/signupButton/SignupButton.test.d.ts.map +0 -1
- package/dist/v2/components/signupButton/SignupButton.test.js.map +0 -1
- package/dist/v2/components/signupButton/index.d.ts.map +0 -1
- package/dist/v2/components/signupButton/index.js.map +0 -1
- /package/dist/v2/components/{loginButton → auth/loginButton}/LoginButton.d.ts +0 -0
- /package/dist/v2/components/{loginButton → auth/loginButton}/LoginButton.test.d.ts +0 -0
- /package/dist/v2/components/{loginButton → auth/loginButton}/LoginButton.test.js +0 -0
- /package/dist/v2/components/{loginButton → auth/loginButton}/downArrow.d.ts +0 -0
- /package/dist/v2/components/{loginButton → auth/loginButton}/downArrow.js +0 -0
- /package/dist/v2/components/{loginButton → auth/loginButton}/index.d.ts +0 -0
- /package/dist/v2/components/{loginButton → auth/loginButton}/index.js +0 -0
- /package/dist/v2/components/{signupButton → auth/signupButton}/SignupButton.d.ts +0 -0
- /package/dist/v2/components/{signupButton → auth/signupButton}/SignupButton.js +0 -0
- /package/dist/v2/components/{signupButton → auth/signupButton}/SignupButton.test.d.ts +0 -0
- /package/dist/v2/components/{signupButton → auth/signupButton}/SignupButton.test.js +0 -0
- /package/dist/v2/components/{signupButton → auth/signupButton}/index.d.ts +0 -0
- /package/dist/v2/components/{signupButton → auth/signupButton}/index.js +0 -0
- /package/dist/v2/components/{footer → layout/footer}/Footer.d.ts +0 -0
- /package/dist/v2/components/{footer → layout/footer}/Footer.test.d.ts +0 -0
- /package/dist/v2/components/{footer → layout/footer}/Footer.test.js +0 -0
- /package/dist/v2/components/{footer → layout/footer}/index.d.ts +0 -0
- /package/dist/v2/components/{footer → layout/footer}/index.js +0 -0
- /package/dist/v2/components/{header → layout/header}/header.test.d.ts +0 -0
- /package/dist/v2/components/{header → layout/header}/header.test.js +0 -0
- /package/dist/v2/components/{header → layout/header}/index.d.ts +0 -0
- /package/dist/v2/components/{header → layout/header}/index.js +0 -0
|
@@ -0,0 +1,953 @@
|
|
|
1
|
+
/******/ var __webpack_modules__ = ({
|
|
2
|
+
|
|
3
|
+
/***/ 1865
|
|
4
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
5
|
+
|
|
6
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7
|
+
/* harmony export */ G: () => (/* binding */ Combobox)
|
|
8
|
+
/* harmony export */ });
|
|
9
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6161);
|
|
10
|
+
/* harmony import */ var lit_html_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3380);
|
|
11
|
+
/* harmony import */ var _shared_downArrow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9239);
|
|
12
|
+
/* harmony import */ var _shared_listboxStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6457);
|
|
13
|
+
/* harmony import */ var _shared_keyboard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9757);
|
|
14
|
+
/* harmony import */ var _shared_listboxTemplate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3337);
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Combobox extends lit__WEBPACK_IMPORTED_MODULE_0__/* .LitElement */ .WF {
|
|
22
|
+
static _nextId = 0;
|
|
23
|
+
_popupPortalHost = null;
|
|
24
|
+
_popupPortalRoot = null;
|
|
25
|
+
_popupPortalContainer = null;
|
|
26
|
+
_handleDocumentPointerDown = event => {
|
|
27
|
+
const eventTarget = event.target;
|
|
28
|
+
if (!this._popupOpen || !(eventTarget instanceof Node)) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const eventPath = 'composedPath' in event ? event.composedPath() : [];
|
|
32
|
+
if (eventPath.includes(this)) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (this._popupPortalHost && eventPath.includes(this._popupPortalHost) || this._popupPortalRoot && eventPath.includes(this._popupPortalRoot)) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (!this.contains(eventTarget)) {
|
|
39
|
+
this._closePopup();
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
_handleViewportChange = () => {
|
|
43
|
+
if (!this._popupOpen) return;
|
|
44
|
+
this._updatePopupPosition();
|
|
45
|
+
};
|
|
46
|
+
suggestionProvider;
|
|
47
|
+
static properties = {
|
|
48
|
+
label: {
|
|
49
|
+
type: String,
|
|
50
|
+
reflect: true
|
|
51
|
+
},
|
|
52
|
+
placeholder: {
|
|
53
|
+
type: String,
|
|
54
|
+
reflect: true
|
|
55
|
+
},
|
|
56
|
+
theme: {
|
|
57
|
+
type: String,
|
|
58
|
+
reflect: true
|
|
59
|
+
},
|
|
60
|
+
layout: {
|
|
61
|
+
type: String,
|
|
62
|
+
reflect: true
|
|
63
|
+
},
|
|
64
|
+
value: {
|
|
65
|
+
type: String,
|
|
66
|
+
reflect: true
|
|
67
|
+
},
|
|
68
|
+
inputValue: {
|
|
69
|
+
type: String
|
|
70
|
+
},
|
|
71
|
+
options: {
|
|
72
|
+
type: Array,
|
|
73
|
+
attribute: false
|
|
74
|
+
},
|
|
75
|
+
_popupOpen: {
|
|
76
|
+
state: true
|
|
77
|
+
},
|
|
78
|
+
_activeIndex: {
|
|
79
|
+
state: true
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
static styles = [_shared_listboxStyles__WEBPACK_IMPORTED_MODULE_3__/* .listboxStyles */ .S, (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .css */ .AH)`
|
|
83
|
+
:host {
|
|
84
|
+
/* default theme */
|
|
85
|
+
display: block;
|
|
86
|
+
width: 100%;
|
|
87
|
+
min-width: 0;
|
|
88
|
+
max-width: 100%;
|
|
89
|
+
position: relative;
|
|
90
|
+
box-sizing: border-box;
|
|
91
|
+
--popup-background: var(--color-background, #F8F9FB);
|
|
92
|
+
--popup-text: var(--color-text, #1A1A1A);
|
|
93
|
+
--popup-border: var(--color-border, #E5E7EB);
|
|
94
|
+
--popup-shadow: var(--box-shadow-sm, 0 1px 4px rgba(124,77,255,0.12));
|
|
95
|
+
--input-background: var(--color-background, #F8F9FB);
|
|
96
|
+
--input-text: var(--color-text, #1A1A1A);
|
|
97
|
+
--input-border: var(--color-border-button-hover, var(--gray-400, #99A1AF));
|
|
98
|
+
--label-color: var(--grey-purple-700, #1A1A1A);
|
|
99
|
+
--placeholder-color: var(--grey-purple-700, #5e546d);
|
|
100
|
+
--combobox-input-height: var(--select-trigger-height, var(--min-touch-target, 44px));
|
|
101
|
+
--combobox-input-inline-padding: var(--select-trigger-inline-padding, var(--spacing-2xs, 0.625rem));
|
|
102
|
+
--combobox-input-block-padding: var(--spacing-xxs, 0.3125rem);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
:host([theme='dark']) {
|
|
106
|
+
display: block;
|
|
107
|
+
width: 100%;
|
|
108
|
+
min-width: 0;
|
|
109
|
+
max-width: 100%;
|
|
110
|
+
position: relative;
|
|
111
|
+
box-sizing: border-box;
|
|
112
|
+
--popup-background: var(--color-background, #F8F9FB);
|
|
113
|
+
--popup-text: var(--color-text, #1A1A1A);
|
|
114
|
+
--popup-border: var(--color-border, #E5E7EB);
|
|
115
|
+
--popup-shadow: var(--box-shadow-sm, 0 1px 4px rgba(124,77,255,0.12));
|
|
116
|
+
--input-background: var(--color-background, #F8F9FB);
|
|
117
|
+
--input-text: var(--color-text, #1A1A1A);
|
|
118
|
+
--input-border: var(--color-border-button-hover, var(--gray-400, #99A1AF));
|
|
119
|
+
--label-color: var(--grey-purple-700, #1A1A1A);
|
|
120
|
+
--placeholder-color: var(--grey-purple-700, #5e546d);
|
|
121
|
+
--combobox-input-height: var(--select-trigger-height, var(--min-touch-target, 44px));
|
|
122
|
+
--combobox-input-inline-padding: var(--select-trigger-inline-padding, var(--spacing-2xs, 0.625rem));
|
|
123
|
+
--combobox-input-block-padding: var(--spacing-xxs, 0.3125rem);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.popup-box {
|
|
127
|
+
position: absolute;
|
|
128
|
+
top: 0;
|
|
129
|
+
left: 0;
|
|
130
|
+
width: 100%;
|
|
131
|
+
background: var(--popup-background);
|
|
132
|
+
color: var(--popup-text);
|
|
133
|
+
box-shadow: var(--popup-shadow);
|
|
134
|
+
border: 1px solid var(--popup-border);
|
|
135
|
+
border-radius: var(--border-radius-md, 0.5rem);
|
|
136
|
+
min-width: 100%;
|
|
137
|
+
overflow: hidden;
|
|
138
|
+
box-sizing: border-box;
|
|
139
|
+
isolation: isolate;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.select-options-section {
|
|
143
|
+
position: relative;
|
|
144
|
+
background: var(--popup-background);
|
|
145
|
+
border-radius: inherit;
|
|
146
|
+
isolation: isolate;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.combobox-root {
|
|
150
|
+
display: flex;
|
|
151
|
+
flex-direction: column;
|
|
152
|
+
gap: 6px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.text-label {
|
|
156
|
+
color: var(--label-color);
|
|
157
|
+
margin-bottom: 6px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.input-field-row {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: row;
|
|
163
|
+
position: relative;
|
|
164
|
+
width: 100%;
|
|
165
|
+
min-width: 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.text-input {
|
|
169
|
+
display: block;
|
|
170
|
+
flex: 1;
|
|
171
|
+
width: 100%;
|
|
172
|
+
min-width: 0;
|
|
173
|
+
min-height: var(--combobox-input-height);
|
|
174
|
+
height: var(--combobox-input-height);
|
|
175
|
+
padding: var(--combobox-input-block-padding) calc(26px + (var(--combobox-input-inline-padding) * 2) + 6px) var(--combobox-input-block-padding) var(--combobox-input-inline-padding);
|
|
176
|
+
border: 1px solid var(--input-border);
|
|
177
|
+
border-radius: var(--border-radius-base, 0.3125rem);
|
|
178
|
+
background: var(--input-background);
|
|
179
|
+
color: var(--input-text);
|
|
180
|
+
font: inherit;
|
|
181
|
+
font-size: var(--font-size-sm, 0.875rem);
|
|
182
|
+
font-weight: var(--font-weight-md, 500);
|
|
183
|
+
line-height: normal;
|
|
184
|
+
appearance: none;
|
|
185
|
+
-webkit-appearance: none;
|
|
186
|
+
box-sizing: border-box;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.text-input::placeholder {
|
|
190
|
+
color: var(--placeholder-color);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.text-input:focus-visible {
|
|
194
|
+
outline: 2px solid var(--color-focus-ring, var(--color-primary, #7C4DFF));
|
|
195
|
+
outline-offset: 2px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.dropdown-toggle {
|
|
199
|
+
position: absolute;
|
|
200
|
+
right: 6px;
|
|
201
|
+
top: 50%;
|
|
202
|
+
transform: translateY(-50%);
|
|
203
|
+
width: 26px;
|
|
204
|
+
height: 26px;
|
|
205
|
+
padding: 0;
|
|
206
|
+
border: none;
|
|
207
|
+
background: transparent;
|
|
208
|
+
cursor: pointer;
|
|
209
|
+
display: flex;
|
|
210
|
+
align-items: center;
|
|
211
|
+
justify-content: center;
|
|
212
|
+
flex-shrink: 0;
|
|
213
|
+
border-radius: var(--border-radius-base, 0.3125rem);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.dropdown-toggle:hover {
|
|
217
|
+
background: var(--color-header-menu-item-hover, #e6dcff);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.input-field-row:focus-within .dropdown-toggle {
|
|
221
|
+
background: var(--color-header-menu-item-hover, #e6dcff);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.dropdown-toggle:focus-visible {
|
|
225
|
+
outline: 2px solid var(--color-focus-ring, var(--color-primary, #7C4DFF));
|
|
226
|
+
outline-offset: 2px;
|
|
227
|
+
background: var(--color-header-menu-item-hover, #e6dcff);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.dropdown-toggle svg {
|
|
231
|
+
width: 14px;
|
|
232
|
+
height: 14px;
|
|
233
|
+
display: block;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
`];
|
|
237
|
+
_inputId = `solid-ui-combobox-input-${Combobox._nextId++}`;
|
|
238
|
+
_listboxId = `solid-ui-combobox-listbox-${Combobox._nextId++}`;
|
|
239
|
+
_suggestionRequestId = 0;
|
|
240
|
+
constructor() {
|
|
241
|
+
super();
|
|
242
|
+
this.label = 'Select an option';
|
|
243
|
+
this.placeholder = 'Type to search';
|
|
244
|
+
this.theme = 'light';
|
|
245
|
+
this.layout = 'desktop';
|
|
246
|
+
this.options = [];
|
|
247
|
+
this.value = '';
|
|
248
|
+
this.inputValue = '';
|
|
249
|
+
this._popupOpen = false;
|
|
250
|
+
this._activeIndex = -1;
|
|
251
|
+
}
|
|
252
|
+
connectedCallback() {
|
|
253
|
+
super.connectedCallback();
|
|
254
|
+
document.addEventListener('pointerdown', this._handleDocumentPointerDown);
|
|
255
|
+
window.addEventListener('resize', this._handleViewportChange);
|
|
256
|
+
window.addEventListener('scroll', this._handleViewportChange, true);
|
|
257
|
+
}
|
|
258
|
+
disconnectedCallback() {
|
|
259
|
+
this._detachPopupPortal();
|
|
260
|
+
document.removeEventListener('pointerdown', this._handleDocumentPointerDown);
|
|
261
|
+
window.removeEventListener('resize', this._handleViewportChange);
|
|
262
|
+
window.removeEventListener('scroll', this._handleViewportChange, true);
|
|
263
|
+
super.disconnectedCallback();
|
|
264
|
+
}
|
|
265
|
+
_getPopupPortalContainer() {
|
|
266
|
+
return this.closest('dialog[open]') || document.body;
|
|
267
|
+
}
|
|
268
|
+
_ensurePopupPortal() {
|
|
269
|
+
const nextContainer = this._getPopupPortalContainer();
|
|
270
|
+
if (this._popupPortalHost && this._popupPortalRoot && this._popupPortalContainer === nextContainer) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
this._detachPopupPortal();
|
|
274
|
+
this._popupPortalHost = document.createElement('div');
|
|
275
|
+
this._popupPortalHost.setAttribute('data-solid-ui-combobox-portal', '');
|
|
276
|
+
this._popupPortalHost.style.position = 'fixed';
|
|
277
|
+
this._popupPortalHost.style.inset = '0 auto auto 0';
|
|
278
|
+
this._popupPortalHost.style.zIndex = '2147483647';
|
|
279
|
+
this._popupPortalHost.style.pointerEvents = 'none';
|
|
280
|
+
this._popupPortalHost.style.boxSizing = 'border-box';
|
|
281
|
+
this._popupPortalRoot = this._popupPortalHost.attachShadow({
|
|
282
|
+
mode: 'open'
|
|
283
|
+
});
|
|
284
|
+
const styleSheets = (Array.isArray(Combobox.styles) ? Combobox.styles : [Combobox.styles]).map(style => style?.styleSheet).filter(styleSheet => Boolean(styleSheet));
|
|
285
|
+
if (styleSheets.length > 0) {
|
|
286
|
+
this._popupPortalRoot.adoptedStyleSheets = styleSheets;
|
|
287
|
+
}
|
|
288
|
+
nextContainer.appendChild(this._popupPortalHost);
|
|
289
|
+
this._popupPortalContainer = nextContainer;
|
|
290
|
+
}
|
|
291
|
+
_detachPopupPortal() {
|
|
292
|
+
if (this._popupPortalRoot) {
|
|
293
|
+
(0,lit_html_js__WEBPACK_IMPORTED_MODULE_1__/* .render */ .XX)(null, this._popupPortalRoot);
|
|
294
|
+
}
|
|
295
|
+
if (this._popupPortalHost?.parentNode) {
|
|
296
|
+
this._popupPortalHost.parentNode.removeChild(this._popupPortalHost);
|
|
297
|
+
}
|
|
298
|
+
this._popupPortalHost = null;
|
|
299
|
+
this._popupPortalRoot = null;
|
|
300
|
+
this._popupPortalContainer = null;
|
|
301
|
+
}
|
|
302
|
+
_updatePopupPosition() {
|
|
303
|
+
this._ensurePopupPortal();
|
|
304
|
+
const rect = this.getBoundingClientRect();
|
|
305
|
+
const maxHeight = Math.min(288, Math.max(120, window.innerHeight - rect.bottom - 12));
|
|
306
|
+
if (this._popupPortalHost) {
|
|
307
|
+
this._popupPortalHost.style.top = `${Math.round(rect.bottom + 2)}px`;
|
|
308
|
+
this._popupPortalHost.style.left = `${Math.round(rect.left)}px`;
|
|
309
|
+
this._popupPortalHost.style.width = `${Math.round(rect.width)}px`;
|
|
310
|
+
this._popupPortalHost.style.maxHeight = `${Math.round(maxHeight)}px`;
|
|
311
|
+
this._popupPortalHost.style.height = '0px';
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
_openPopup() {
|
|
315
|
+
const popupOptions = this._getDisplayedOptions();
|
|
316
|
+
this._popupOpen = true;
|
|
317
|
+
this._updatePopupPosition();
|
|
318
|
+
this._activeIndex = (0,_shared_keyboard__WEBPACK_IMPORTED_MODULE_4__/* .findOptionIndexByValue */ .Dh)(popupOptions, this.value);
|
|
319
|
+
if (this._activeIndex < 0) {
|
|
320
|
+
this._activeIndex = (0,_shared_keyboard__WEBPACK_IMPORTED_MODULE_4__/* .getFirstEnabledIndex */ .AZ)(popupOptions);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
_closePopup() {
|
|
324
|
+
this._popupOpen = false;
|
|
325
|
+
if (this._popupPortalRoot) {
|
|
326
|
+
(0,lit_html_js__WEBPACK_IMPORTED_MODULE_1__/* .render */ .XX)(null, this._popupPortalRoot);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
updated(changedProperties) {
|
|
330
|
+
if (this._popupOpen) {
|
|
331
|
+
this._updatePopupPosition();
|
|
332
|
+
if (this._popupPortalRoot) {
|
|
333
|
+
(0,lit_html_js__WEBPACK_IMPORTED_MODULE_1__/* .render */ .XX)(this._renderPopup(), this._popupPortalRoot);
|
|
334
|
+
}
|
|
335
|
+
} else if (this._popupPortalRoot) {
|
|
336
|
+
(0,lit_html_js__WEBPACK_IMPORTED_MODULE_1__/* .render */ .XX)(null, this._popupPortalRoot);
|
|
337
|
+
}
|
|
338
|
+
if ((changedProperties.has('value') || changedProperties.has('options')) && this.value) {
|
|
339
|
+
const selectedOption = this.options.find(option => option.value === this.value);
|
|
340
|
+
if (selectedOption && this.inputValue !== selectedOption.label) {
|
|
341
|
+
this.inputValue = selectedOption.label;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
_getSelectedIndex() {
|
|
346
|
+
return (0,_shared_keyboard__WEBPACK_IMPORTED_MODULE_4__/* .findOptionIndexByValue */ .Dh)(this.options, this.value);
|
|
347
|
+
}
|
|
348
|
+
_getSelectedOption() {
|
|
349
|
+
const selectedIndex = this._getSelectedIndex();
|
|
350
|
+
if (selectedIndex >= 0) {
|
|
351
|
+
return this.options[selectedIndex];
|
|
352
|
+
}
|
|
353
|
+
return this.options[0];
|
|
354
|
+
}
|
|
355
|
+
_getDisplayedOptions() {
|
|
356
|
+
const selectedOption = this._getSelectedOption();
|
|
357
|
+
if (!selectedOption) {
|
|
358
|
+
return this.options;
|
|
359
|
+
}
|
|
360
|
+
return [selectedOption, ...this.options.filter(option => option.value !== selectedOption.value)];
|
|
361
|
+
}
|
|
362
|
+
_getActiveOption() {
|
|
363
|
+
const popupOptions = this._getDisplayedOptions();
|
|
364
|
+
if (this._activeIndex < 0) {
|
|
365
|
+
return undefined;
|
|
366
|
+
}
|
|
367
|
+
return popupOptions[this._activeIndex];
|
|
368
|
+
}
|
|
369
|
+
async _loadSuggestions(query) {
|
|
370
|
+
if (!this.suggestionProvider) {
|
|
371
|
+
this._openPopup();
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
const requestId = ++this._suggestionRequestId;
|
|
375
|
+
const suggestions = await this.suggestionProvider(query);
|
|
376
|
+
if (requestId !== this._suggestionRequestId) {
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
this.options = suggestions;
|
|
380
|
+
this._openPopup();
|
|
381
|
+
}
|
|
382
|
+
async _handleInputChange(e) {
|
|
383
|
+
const query = e.target.value;
|
|
384
|
+
this.inputValue = query;
|
|
385
|
+
this.value = '';
|
|
386
|
+
this.dispatchEvent(new CustomEvent('input', {
|
|
387
|
+
detail: {
|
|
388
|
+
value: query
|
|
389
|
+
},
|
|
390
|
+
bubbles: true,
|
|
391
|
+
composed: true
|
|
392
|
+
}));
|
|
393
|
+
await this._loadSuggestions(query);
|
|
394
|
+
}
|
|
395
|
+
_handleInputKeydown(e) {
|
|
396
|
+
if (e.key === ' ' || e.key === 'Spacebar') {
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
const popupOptions = this._getDisplayedOptions();
|
|
400
|
+
const action = (0,_shared_keyboard__WEBPACK_IMPORTED_MODULE_4__/* .getListboxActionFromKey */ .Hf)(e.key);
|
|
401
|
+
if (action === 'none') {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
e.preventDefault();
|
|
405
|
+
switch (action) {
|
|
406
|
+
case 'close':
|
|
407
|
+
this._closePopup();
|
|
408
|
+
break;
|
|
409
|
+
case 'first':
|
|
410
|
+
if (!this._popupOpen) {
|
|
411
|
+
this._openPopup();
|
|
412
|
+
}
|
|
413
|
+
this._activeIndex = (0,_shared_keyboard__WEBPACK_IMPORTED_MODULE_4__/* .getFirstEnabledIndex */ .AZ)(popupOptions);
|
|
414
|
+
break;
|
|
415
|
+
case 'last':
|
|
416
|
+
if (!this._popupOpen) {
|
|
417
|
+
this._openPopup();
|
|
418
|
+
}
|
|
419
|
+
this._activeIndex = (0,_shared_keyboard__WEBPACK_IMPORTED_MODULE_4__/* .getLastEnabledIndex */ .mY)(popupOptions);
|
|
420
|
+
break;
|
|
421
|
+
case 'next':
|
|
422
|
+
if (!this._popupOpen) {
|
|
423
|
+
this._openPopup();
|
|
424
|
+
break;
|
|
425
|
+
}
|
|
426
|
+
this._activeIndex = (0,_shared_keyboard__WEBPACK_IMPORTED_MODULE_4__/* .getNextEnabledIndex */ .Xx)(this._activeIndex, popupOptions, 1);
|
|
427
|
+
break;
|
|
428
|
+
case 'previous':
|
|
429
|
+
if (!this._popupOpen) {
|
|
430
|
+
this._openPopup();
|
|
431
|
+
break;
|
|
432
|
+
}
|
|
433
|
+
this._activeIndex = (0,_shared_keyboard__WEBPACK_IMPORTED_MODULE_4__/* .getNextEnabledIndex */ .Xx)(this._activeIndex, popupOptions, -1);
|
|
434
|
+
break;
|
|
435
|
+
case 'select':
|
|
436
|
+
if (!this._popupOpen) {
|
|
437
|
+
this._openPopup();
|
|
438
|
+
break;
|
|
439
|
+
}
|
|
440
|
+
this._selectActiveOption();
|
|
441
|
+
break;
|
|
442
|
+
default:
|
|
443
|
+
break;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
_getOptionId(option, index) {
|
|
447
|
+
return `${this._listboxId}-option-${index}-${option.value}`;
|
|
448
|
+
}
|
|
449
|
+
_selectValueFromDropdown(value) {
|
|
450
|
+
const selectedOption = this.options.find(option => option.value === value);
|
|
451
|
+
this.value = value;
|
|
452
|
+
this.inputValue = selectedOption?.label ?? value;
|
|
453
|
+
this.dispatchEvent(new CustomEvent('change', {
|
|
454
|
+
detail: {
|
|
455
|
+
value,
|
|
456
|
+
label: this.inputValue,
|
|
457
|
+
option: selectedOption
|
|
458
|
+
},
|
|
459
|
+
bubbles: true,
|
|
460
|
+
composed: true
|
|
461
|
+
}));
|
|
462
|
+
this._closePopup();
|
|
463
|
+
}
|
|
464
|
+
_selectActiveOption() {
|
|
465
|
+
const activeOption = this._getActiveOption();
|
|
466
|
+
if (activeOption && !activeOption.disabled) {
|
|
467
|
+
this._selectValueFromDropdown(activeOption.value);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
_renderPopup() {
|
|
471
|
+
const popupOptions = this._getDisplayedOptions();
|
|
472
|
+
const selectedOption = this._getSelectedOption();
|
|
473
|
+
const activeOption = this._activeIndex >= 0 ? popupOptions[this._activeIndex] : undefined;
|
|
474
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
475
|
+
<div class="popup-box" style="pointer-events: auto; max-height: inherit; overflow: auto;">
|
|
476
|
+
<div class="select-options-section">
|
|
477
|
+
${(0,_shared_listboxTemplate__WEBPACK_IMPORTED_MODULE_5__/* .renderListbox */ .M)({
|
|
478
|
+
selectedOption,
|
|
479
|
+
activeOption,
|
|
480
|
+
options: popupOptions,
|
|
481
|
+
listboxId: this._listboxId,
|
|
482
|
+
getOptionId: (option, index) => this._getOptionId(option, index),
|
|
483
|
+
onOptionSelect: option => this._selectValueFromDropdown(option.value)
|
|
484
|
+
})}
|
|
485
|
+
</div>
|
|
486
|
+
</div>
|
|
487
|
+
`;
|
|
488
|
+
}
|
|
489
|
+
render() {
|
|
490
|
+
const activeOption = this._getActiveOption();
|
|
491
|
+
const activeDescendant = this._popupOpen && activeOption ? this._getOptionId(activeOption, this._activeIndex) : undefined;
|
|
492
|
+
const ariaLabel = this.label ? lit__WEBPACK_IMPORTED_MODULE_0__/* .nothing */ .s6 : this.getAttribute('aria-label') || this.placeholder || 'Combobox';
|
|
493
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
494
|
+
<div class="combobox-root">
|
|
495
|
+
${this.label ? (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`<label class="text-label" for="${this._inputId}">${this.label}</label>` : null}
|
|
496
|
+
<div class="input-field-row">
|
|
497
|
+
<input
|
|
498
|
+
id="${this._inputId}"
|
|
499
|
+
class="text-input"
|
|
500
|
+
part="input"
|
|
501
|
+
type="text"
|
|
502
|
+
role="combobox"
|
|
503
|
+
aria-autocomplete="list"
|
|
504
|
+
aria-label="${ariaLabel}"
|
|
505
|
+
aria-expanded="${this._popupOpen}"
|
|
506
|
+
aria-controls="${this._listboxId}"
|
|
507
|
+
aria-activedescendant="${activeDescendant ?? ''}"
|
|
508
|
+
placeholder="${this.placeholder}"
|
|
509
|
+
.value="${this.inputValue}"
|
|
510
|
+
@focus="${() => this._openPopup()}"
|
|
511
|
+
@input="${this._handleInputChange}"
|
|
512
|
+
@keydown="${this._handleInputKeydown}"
|
|
513
|
+
/>
|
|
514
|
+
<button
|
|
515
|
+
class="dropdown-toggle"
|
|
516
|
+
type="button"
|
|
517
|
+
aria-label="Show options"
|
|
518
|
+
aria-expanded="${this._popupOpen}"
|
|
519
|
+
@click="${() => this._popupOpen ? this._closePopup() : this._openPopup()}"
|
|
520
|
+
>
|
|
521
|
+
${_shared_downArrow__WEBPACK_IMPORTED_MODULE_2__/* .downArrowIcon */ .n}
|
|
522
|
+
</button>
|
|
523
|
+
</div>
|
|
524
|
+
</div>
|
|
525
|
+
`;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/***/ },
|
|
530
|
+
|
|
531
|
+
/***/ 9239
|
|
532
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
533
|
+
|
|
534
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
535
|
+
/* harmony export */ n: () => (/* binding */ downArrowIcon)
|
|
536
|
+
/* harmony export */ });
|
|
537
|
+
/* harmony import */ var lit_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6752);
|
|
538
|
+
|
|
539
|
+
const downArrowIcon = (0,lit_html__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
540
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
541
|
+
viewBox="0 0 12 7"
|
|
542
|
+
fill="none"
|
|
543
|
+
>
|
|
544
|
+
<path d="M0.679688 0.678955L5.50729 5.50656L10.3349 0.678955" stroke="#6A7282" stroke-width="1.35776" stroke-linecap="round" stroke-linejoin="round"/>
|
|
545
|
+
</svg>
|
|
546
|
+
`;
|
|
547
|
+
|
|
548
|
+
/***/ },
|
|
549
|
+
|
|
550
|
+
/***/ 9757
|
|
551
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
552
|
+
|
|
553
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
554
|
+
/* harmony export */ AZ: () => (/* binding */ getFirstEnabledIndex),
|
|
555
|
+
/* harmony export */ Dh: () => (/* binding */ findOptionIndexByValue),
|
|
556
|
+
/* harmony export */ Hf: () => (/* binding */ getListboxActionFromKey),
|
|
557
|
+
/* harmony export */ Xx: () => (/* binding */ getNextEnabledIndex),
|
|
558
|
+
/* harmony export */ mY: () => (/* binding */ getLastEnabledIndex)
|
|
559
|
+
/* harmony export */ });
|
|
560
|
+
/* Move up or down, skip disabled options */
|
|
561
|
+
function getNextEnabledIndex(currentIndex, options, direction) {
|
|
562
|
+
if (!options.length) {
|
|
563
|
+
return -1;
|
|
564
|
+
}
|
|
565
|
+
if (options.every(option => option.disabled)) {
|
|
566
|
+
return -1;
|
|
567
|
+
}
|
|
568
|
+
const optionsCount = options.length;
|
|
569
|
+
let nextIndex = currentIndex;
|
|
570
|
+
do {
|
|
571
|
+
nextIndex = (nextIndex + direction + optionsCount) % optionsCount;
|
|
572
|
+
} while (options[nextIndex].disabled);
|
|
573
|
+
return nextIndex;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/* Handle 'Home' and 'End' keys and initial highlight */
|
|
577
|
+
function getFirstEnabledIndex(options) {
|
|
578
|
+
if (!options.length) {
|
|
579
|
+
return -1;
|
|
580
|
+
}
|
|
581
|
+
return getNextEnabledIndex(-1, options, 1);
|
|
582
|
+
}
|
|
583
|
+
function getLastEnabledIndex(options) {
|
|
584
|
+
if (!options.length) {
|
|
585
|
+
return -1;
|
|
586
|
+
}
|
|
587
|
+
return getNextEnabledIndex(options.length, options, -1);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/* Sync current value to active index */
|
|
591
|
+
function findOptionIndexByValue(options, value) {
|
|
592
|
+
if (value === undefined) {
|
|
593
|
+
return -1;
|
|
594
|
+
}
|
|
595
|
+
return options.findIndex(option => option.value === value);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/* Map keyboard events to actions */
|
|
599
|
+
function getListboxActionFromKey(key) {
|
|
600
|
+
switch (key) {
|
|
601
|
+
case 'ArrowDown':
|
|
602
|
+
return 'next';
|
|
603
|
+
case 'ArrowUp':
|
|
604
|
+
return 'previous';
|
|
605
|
+
case 'Home':
|
|
606
|
+
return 'first';
|
|
607
|
+
case 'End':
|
|
608
|
+
return 'last';
|
|
609
|
+
case 'Enter':
|
|
610
|
+
case ' ':
|
|
611
|
+
return 'select';
|
|
612
|
+
case 'Escape':
|
|
613
|
+
return 'close';
|
|
614
|
+
default:
|
|
615
|
+
return 'none';
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/***/ },
|
|
620
|
+
|
|
621
|
+
/***/ 6457
|
|
622
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
623
|
+
|
|
624
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
625
|
+
/* harmony export */ S: () => (/* binding */ listboxStyles)
|
|
626
|
+
/* harmony export */ });
|
|
627
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6161);
|
|
628
|
+
|
|
629
|
+
const listboxStyles = (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .css */ .AH)`
|
|
630
|
+
:host { /* default theme */
|
|
631
|
+
--input-background: var(--color-background, #F8F9FB);
|
|
632
|
+
--item-text: var(--color-text-heading, #000000);
|
|
633
|
+
--item-selected-text: var(--color-primary, #7c4dff);
|
|
634
|
+
--item-hover-background: var(--color-header-menu-item-hover, #e6dcff);
|
|
635
|
+
--item-selected-background: var(--color-header-menu-item-selected, #cbb9ff);
|
|
636
|
+
--listbox-z-index: 1;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
:host([theme='dark']) {
|
|
640
|
+
--input-background: var(--color-background, #1A1A1A);
|
|
641
|
+
--item-text: var(--color-text-heading, #F8F9FB);
|
|
642
|
+
--item-selected-text: var(--color-primary, #7c4dff);
|
|
643
|
+
--item-hover-background: var(--color-header-menu-item-hover, #e6dcff);
|
|
644
|
+
--item-selected-background: var(--color-header-menu-item-selected, #cbb9ff);
|
|
645
|
+
--listbox-z-index: 1;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
.listbox {
|
|
649
|
+
position: relative;
|
|
650
|
+
top: 0;
|
|
651
|
+
left: 0;
|
|
652
|
+
right: 0;
|
|
653
|
+
display: flex;
|
|
654
|
+
flex-direction: column;
|
|
655
|
+
gap: 0.0625rem;
|
|
656
|
+
margin: 0;
|
|
657
|
+
padding: 0;
|
|
658
|
+
list-style: none;
|
|
659
|
+
border: none;
|
|
660
|
+
border-radius: inherit;
|
|
661
|
+
background: var(--input-background);
|
|
662
|
+
background-color: var(--input-background);
|
|
663
|
+
opacity: 1;
|
|
664
|
+
overflow: hidden;
|
|
665
|
+
padding: 0.25rem;
|
|
666
|
+
z-index: var(--listbox-z-index);
|
|
667
|
+
box-shadow: 0 4px 12px rgba(124, 77, 255, 0.12);
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.listbox-item {
|
|
671
|
+
display: flex;
|
|
672
|
+
align-items: center;
|
|
673
|
+
gap: var(--spacing-2xs, 0.625rem);
|
|
674
|
+
width: 100%;
|
|
675
|
+
min-height: calc(var(--font-size-sm, 0.875rem) + 1rem);
|
|
676
|
+
padding: 0.5rem var(--spacing-xs, 0.75rem);
|
|
677
|
+
border: none;
|
|
678
|
+
border-radius: var(--border-radius-sm, 0.2rem);
|
|
679
|
+
background: transparent;
|
|
680
|
+
color: var(--item-text);
|
|
681
|
+
cursor: pointer;
|
|
682
|
+
font: inherit;
|
|
683
|
+
font-size: var(--font-size-sm, 0.875rem);
|
|
684
|
+
font-weight: var(--font-weight-normal, 400);
|
|
685
|
+
line-height: normal;
|
|
686
|
+
text-align: left;
|
|
687
|
+
text-decoration: none;
|
|
688
|
+
box-sizing: border-box;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.listbox-item:hover {
|
|
692
|
+
background: var(--item-hover-background);
|
|
693
|
+
border-radius: var(--border-radius-sm, 0.2rem);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.listbox-item:focus {
|
|
697
|
+
background: var(--item-hover-background);
|
|
698
|
+
border-radius: var(--border-radius-sm, 0.2rem);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.listbox-item-active {
|
|
702
|
+
background: var(--item-selected-background);
|
|
703
|
+
color: var(--item-selected-text);
|
|
704
|
+
border-radius: var(--border-radius-sm, 0.2rem);
|
|
705
|
+
outline: none;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
.listbox-item-active:hover,
|
|
709
|
+
.listbox-item-active:focus {
|
|
710
|
+
color: var(--item-text);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.listbox-item-disabled {
|
|
714
|
+
opacity: 0.55;
|
|
715
|
+
cursor: not-allowed;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.listbox-item-disabled:hover {
|
|
719
|
+
background: transparent;
|
|
720
|
+
border-radius: 0;
|
|
721
|
+
}
|
|
722
|
+
`;
|
|
723
|
+
|
|
724
|
+
/***/ },
|
|
725
|
+
|
|
726
|
+
/***/ 3337
|
|
727
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
728
|
+
|
|
729
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
730
|
+
/* harmony export */ M: () => (/* binding */ renderListbox)
|
|
731
|
+
/* harmony export */ });
|
|
732
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6161);
|
|
733
|
+
|
|
734
|
+
function renderListbox(args) {
|
|
735
|
+
const {
|
|
736
|
+
options,
|
|
737
|
+
selectedOption,
|
|
738
|
+
activeOption,
|
|
739
|
+
listboxId,
|
|
740
|
+
getOptionId,
|
|
741
|
+
onOptionSelect
|
|
742
|
+
} = args;
|
|
743
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
744
|
+
<ul
|
|
745
|
+
class="listbox"
|
|
746
|
+
id="${listboxId ?? ''}"
|
|
747
|
+
part="listbox"
|
|
748
|
+
role="listbox"
|
|
749
|
+
aria-orientation="vertical"
|
|
750
|
+
>
|
|
751
|
+
${options.map((option, index) => {
|
|
752
|
+
const isSelected = option.value === selectedOption?.value;
|
|
753
|
+
const isActive = option.value === activeOption?.value;
|
|
754
|
+
const optionId = getOptionId?.(option, index);
|
|
755
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__/* .html */ .qy)`
|
|
756
|
+
<li
|
|
757
|
+
id="${optionId ?? ''}"
|
|
758
|
+
class="listbox-item${isSelected ? ' listbox-item-selected' : ''}${isActive ? ' listbox-item-active' : ''}${option.disabled ? ' listbox-item-disabled' : ''}"
|
|
759
|
+
part="option${isSelected ? ' selected-option' : ''}${isActive ? ' active-option' : ''}${option.disabled ? ' disabled-option' : ''}"
|
|
760
|
+
role="option"
|
|
761
|
+
aria-selected="${isSelected}"
|
|
762
|
+
aria-disabled="${option.disabled ? 'true' : 'false'}"
|
|
763
|
+
@click="${() => {
|
|
764
|
+
if (!option.disabled) {
|
|
765
|
+
onOptionSelect(option);
|
|
766
|
+
}
|
|
767
|
+
}}"
|
|
768
|
+
>
|
|
769
|
+
${option.label}
|
|
770
|
+
</li>
|
|
771
|
+
`;
|
|
772
|
+
})}
|
|
773
|
+
</ul>
|
|
774
|
+
`;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
/***/ },
|
|
778
|
+
|
|
779
|
+
/***/ 3826
|
|
780
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
781
|
+
|
|
782
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
783
|
+
/* harmony export */ AH: () => (/* binding */ i),
|
|
784
|
+
/* harmony export */ Rf: () => (/* binding */ S),
|
|
785
|
+
/* harmony export */ sk: () => (/* binding */ c)
|
|
786
|
+
/* harmony export */ });
|
|
787
|
+
/* unused harmony exports CSSResult, supportsAdoptingStyleSheets, unsafeCSS */
|
|
788
|
+
/**
|
|
789
|
+
* @license
|
|
790
|
+
* Copyright 2019 Google LLC
|
|
791
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
792
|
+
*/
|
|
793
|
+
const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n("string"==typeof t?t:t+"",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1],t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),n=t.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;
|
|
794
|
+
//# sourceMappingURL=css-tag.js.map
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
/***/ },
|
|
798
|
+
|
|
799
|
+
/***/ 8760
|
|
800
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
801
|
+
|
|
802
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
803
|
+
/* harmony export */ AH: () => (/* reexport safe */ _css_tag_js__WEBPACK_IMPORTED_MODULE_0__.AH),
|
|
804
|
+
/* harmony export */ mN: () => (/* binding */ y)
|
|
805
|
+
/* harmony export */ });
|
|
806
|
+
/* unused harmony exports defaultConverter, notEqual */
|
|
807
|
+
/* harmony import */ var _css_tag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3826);
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* @license
|
|
811
|
+
* Copyright 2017 Google LLC
|
|
812
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
813
|
+
*/const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift((0,_css_tag_js__WEBPACK_IMPORTED_MODULE_0__/* .getCompatibleStyle */ .sk)(s))}else void 0!==s&&i.push((0,_css_tag_js__WEBPACK_IMPORTED_MODULE_0__/* .getCompatibleStyle */ .sk)(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return (0,_css_tag_js__WEBPACK_IMPORTED_MODULE_0__/* .adoptStyles */ .Rf)(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[d("elementProperties")]=new Map,y[d("finalized")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push("2.1.2");
|
|
814
|
+
//# sourceMappingURL=reactive-element.js.map
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
/***/ },
|
|
818
|
+
|
|
819
|
+
/***/ 5228
|
|
820
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
821
|
+
|
|
822
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
823
|
+
/* harmony export */ AH: () => (/* reexport safe */ _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__.AH),
|
|
824
|
+
/* harmony export */ WF: () => (/* binding */ i),
|
|
825
|
+
/* harmony export */ qy: () => (/* reexport safe */ lit_html__WEBPACK_IMPORTED_MODULE_1__.qy),
|
|
826
|
+
/* harmony export */ s6: () => (/* reexport safe */ lit_html__WEBPACK_IMPORTED_MODULE_1__.s6)
|
|
827
|
+
/* harmony export */ });
|
|
828
|
+
/* unused harmony export _$LE */
|
|
829
|
+
/* harmony import */ var _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8760);
|
|
830
|
+
/* harmony import */ var lit_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6752);
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* @license
|
|
834
|
+
* Copyright 2017 Google LLC
|
|
835
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
836
|
+
*/const s=globalThis;class i extends _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__/* .ReactiveElement */ .mN{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,lit_html__WEBPACK_IMPORTED_MODULE_1__/* .render */ .XX)(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return lit_html__WEBPACK_IMPORTED_MODULE_1__/* .noChange */ .c0}}i._$litElement$=!0,i["finalized"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push("4.2.2");
|
|
837
|
+
//# sourceMappingURL=lit-element.js.map
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
/***/ },
|
|
841
|
+
|
|
842
|
+
/***/ 6752
|
|
843
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
844
|
+
|
|
845
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
846
|
+
/* harmony export */ XX: () => (/* binding */ D),
|
|
847
|
+
/* harmony export */ c0: () => (/* binding */ E),
|
|
848
|
+
/* harmony export */ qy: () => (/* binding */ b),
|
|
849
|
+
/* harmony export */ s6: () => (/* binding */ A)
|
|
850
|
+
/* harmony export */ });
|
|
851
|
+
/* unused harmony exports _$LH, mathml, svg */
|
|
852
|
+
/**
|
|
853
|
+
* @license
|
|
854
|
+
* Copyright 2017 Google LLC
|
|
855
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
856
|
+
*/
|
|
857
|
+
const t=globalThis,i=t=>t,s=t.trustedTypes,e=s?s.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",o=`lit$${Math.random().toFixed(9).slice(2)}$`,n="?"+o,r=`<${n}>`,l=document,c=()=>l.createComment(""),a=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u=Array.isArray,d=t=>u(t)||"function"==typeof t?.[Symbol.iterator],f="[ \t\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),T=x(3),E=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?"<svg>":3===i?"<math>":"",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?"!--"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp("</"+u[2],"g")),c=p):void 0!==u[3]&&(c=p):c===p?">"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith("/>")?" ":"";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o+x):s+o+(-2===d?i:x)}return[V(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:"."===e[1]?I:"?"===e[1]?L:"@"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o),i=t.length-1;if(i>0){r.textContent=s?s.emptyScript:"";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)d.push({type:7,index:l}),t+=o.length-1}l++}}static createElement(t,i){const s=l.createElement("template");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=i(t).nextSibling;i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??"")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j={M:h,P:o,A:n,C:1,L:N,R,D:d,V:M,I:k,H,N:L,U:z,B:I,F:Z},B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push("3.3.2");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{})}return h._$AI(t),h};
|
|
858
|
+
//# sourceMappingURL=lit-html.js.map
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
/***/ },
|
|
862
|
+
|
|
863
|
+
/***/ 3380
|
|
864
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
865
|
+
|
|
866
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
867
|
+
/* harmony export */ XX: () => (/* reexport safe */ lit_html__WEBPACK_IMPORTED_MODULE_0__.XX)
|
|
868
|
+
/* harmony export */ });
|
|
869
|
+
/* harmony import */ var lit_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6752);
|
|
870
|
+
|
|
871
|
+
//# sourceMappingURL=html.js.map
|
|
872
|
+
|
|
873
|
+
|
|
874
|
+
/***/ },
|
|
875
|
+
|
|
876
|
+
/***/ 6161
|
|
877
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
878
|
+
|
|
879
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
880
|
+
/* harmony export */ AH: () => (/* reexport safe */ lit_element_lit_element_js__WEBPACK_IMPORTED_MODULE_2__.AH),
|
|
881
|
+
/* harmony export */ WF: () => (/* reexport safe */ lit_element_lit_element_js__WEBPACK_IMPORTED_MODULE_2__.WF),
|
|
882
|
+
/* harmony export */ qy: () => (/* reexport safe */ lit_element_lit_element_js__WEBPACK_IMPORTED_MODULE_2__.qy),
|
|
883
|
+
/* harmony export */ s6: () => (/* reexport safe */ lit_element_lit_element_js__WEBPACK_IMPORTED_MODULE_2__.s6)
|
|
884
|
+
/* harmony export */ });
|
|
885
|
+
/* harmony import */ var _lit_reactive_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8760);
|
|
886
|
+
/* harmony import */ var lit_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6752);
|
|
887
|
+
/* harmony import */ var lit_element_lit_element_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5228);
|
|
888
|
+
|
|
889
|
+
//# sourceMappingURL=index.js.map
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
/***/ }
|
|
893
|
+
|
|
894
|
+
/******/ });
|
|
895
|
+
/************************************************************************/
|
|
896
|
+
/******/ // The module cache
|
|
897
|
+
/******/ var __webpack_module_cache__ = {};
|
|
898
|
+
/******/
|
|
899
|
+
/******/ // The require function
|
|
900
|
+
/******/ function __webpack_require__(moduleId) {
|
|
901
|
+
/******/ // Check if module is in cache
|
|
902
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
903
|
+
/******/ if (cachedModule !== undefined) {
|
|
904
|
+
/******/ return cachedModule.exports;
|
|
905
|
+
/******/ }
|
|
906
|
+
/******/ // Create a new module (and put it into the cache)
|
|
907
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
908
|
+
/******/ // no module.id needed
|
|
909
|
+
/******/ // no module.loaded needed
|
|
910
|
+
/******/ exports: {}
|
|
911
|
+
/******/ };
|
|
912
|
+
/******/
|
|
913
|
+
/******/ // Execute the module function
|
|
914
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
915
|
+
/******/
|
|
916
|
+
/******/ // Return the exports of the module
|
|
917
|
+
/******/ return module.exports;
|
|
918
|
+
/******/ }
|
|
919
|
+
/******/
|
|
920
|
+
/************************************************************************/
|
|
921
|
+
/******/ /* webpack/runtime/define property getters */
|
|
922
|
+
/******/ (() => {
|
|
923
|
+
/******/ // define getter functions for harmony exports
|
|
924
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
925
|
+
/******/ for(var key in definition) {
|
|
926
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
927
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
928
|
+
/******/ }
|
|
929
|
+
/******/ }
|
|
930
|
+
/******/ };
|
|
931
|
+
/******/ })();
|
|
932
|
+
/******/
|
|
933
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
934
|
+
/******/ (() => {
|
|
935
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
936
|
+
/******/ })();
|
|
937
|
+
/******/
|
|
938
|
+
/************************************************************************/
|
|
939
|
+
var __webpack_exports__ = {};
|
|
940
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
941
|
+
/* harmony export */ G: () => (/* reexport safe */ _Combobox__WEBPACK_IMPORTED_MODULE_0__.G)
|
|
942
|
+
/* harmony export */ });
|
|
943
|
+
/* harmony import */ var _Combobox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1865);
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
const COMBOBOX_TAG_NAME = 'solid-ui-combobox';
|
|
947
|
+
if (!customElements.get(COMBOBOX_TAG_NAME)) {
|
|
948
|
+
customElements.define(COMBOBOX_TAG_NAME, _Combobox__WEBPACK_IMPORTED_MODULE_0__/* .Combobox */ .G);
|
|
949
|
+
}
|
|
950
|
+
const __webpack_exports__Combobox = __webpack_exports__.G;
|
|
951
|
+
export { __webpack_exports__Combobox as Combobox };
|
|
952
|
+
|
|
953
|
+
//# sourceMappingURL=index.esm.js.map
|