@threadlabs/looma 0.1.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/LICENSE +21 -0
- package/README.md +21 -0
- package/dist/chunk-G53JEAQK.js +94 -0
- package/dist/chunk-OF57X5AR.js +10 -0
- package/dist/chunk-UL7UIUJZ.js +20 -0
- package/dist/chunk-YK4MTZGJ.js +1580 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/events-TcQIzpNv.js +19 -0
- package/dist/cjs/id-CYbKpaYr.js +9 -0
- package/dist/cjs/index-D07f6BOw.js +1569 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/looma.cjs.js +25 -0
- package/dist/cjs/manager-BOpVXb92.js +93 -0
- package/dist/cjs/ui-avatar-group.cjs.entry.js +51 -0
- package/dist/cjs/ui-avatar.cjs.entry.js +50 -0
- package/dist/cjs/ui-badge.cjs.entry.js +19 -0
- package/dist/cjs/ui-button.cjs.entry.js +62 -0
- package/dist/cjs/ui-checkbox.cjs.entry.js +91 -0
- package/dist/cjs/ui-context-menu.cjs.entry.js +201 -0
- package/dist/cjs/ui-dialog.cjs.entry.js +93 -0
- package/dist/cjs/ui-disclosure.cjs.entry.js +109 -0
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +20 -0
- package/dist/cjs/ui-form-field.cjs.entry.js +59 -0
- package/dist/cjs/ui-icon-button.cjs.entry.js +21 -0
- package/dist/cjs/ui-input.cjs.entry.js +101 -0
- package/dist/cjs/ui-menu-item.cjs.entry.js +19 -0
- package/dist/cjs/ui-menu.cjs.entry.js +96 -0
- package/dist/cjs/ui-popover.cjs.entry.js +92 -0
- package/dist/cjs/ui-radio-group.cjs.entry.js +134 -0
- package/dist/cjs/ui-radio.cjs.entry.js +85 -0
- package/dist/cjs/ui-search-result-row.cjs.entry.js +47 -0
- package/dist/cjs/ui-search-shell.cjs.entry.js +39 -0
- package/dist/cjs/ui-select.cjs.entry.js +100 -0
- package/dist/cjs/ui-switch.cjs.entry.js +65 -0
- package/dist/cjs/ui-tabs.cjs.entry.js +117 -0
- package/dist/cjs/ui-textarea.cjs.entry.js +106 -0
- package/dist/cjs/ui-toast-region.cjs.entry.js +67 -0
- package/dist/cjs/ui-tooltip.cjs.entry.js +133 -0
- package/dist/cjs/ui-top-bar.cjs.entry.js +43 -0
- package/dist/collection/collection-manifest.json +38 -0
- package/dist/collection/components/ui-avatar/ui-avatar.css +35 -0
- package/dist/collection/components/ui-avatar/ui-avatar.js +130 -0
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +32 -0
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +103 -0
- package/dist/collection/components/ui-badge/ui-badge.css +74 -0
- package/dist/collection/components/ui-badge/ui-badge.js +62 -0
- package/dist/collection/components/ui-button/ui-button.css +101 -0
- package/dist/collection/components/ui-button/ui-button.js +127 -0
- package/dist/collection/components/ui-checkbox/ui-checkbox.css +24 -0
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +223 -0
- package/dist/collection/components/ui-context-menu/ui-context-menu.css +17 -0
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +272 -0
- package/dist/collection/components/ui-dialog/ui-dialog.css +65 -0
- package/dist/collection/components/ui-dialog/ui-dialog.js +185 -0
- package/dist/collection/components/ui-disclosure/ui-disclosure.css +7 -0
- package/dist/collection/components/ui-disclosure/ui-disclosure.js +182 -0
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.css +70 -0
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +85 -0
- package/dist/collection/components/ui-form-field/ui-form-field.css +21 -0
- package/dist/collection/components/ui-form-field/ui-form-field.js +125 -0
- package/dist/collection/components/ui-icon-button/ui-icon-button.css +92 -0
- package/dist/collection/components/ui-icon-button/ui-icon-button.js +106 -0
- package/dist/collection/components/ui-input/ui-input.css +46 -0
- package/dist/collection/components/ui-input/ui-input.js +213 -0
- package/dist/collection/components/ui-menu/ui-menu.css +37 -0
- package/dist/collection/components/ui-menu/ui-menu.js +149 -0
- package/dist/collection/components/ui-menu-item/ui-menu-item.css +26 -0
- package/dist/collection/components/ui-menu-item/ui-menu-item.js +64 -0
- package/dist/collection/components/ui-popover/ui-popover.css +8 -0
- package/dist/collection/components/ui-popover/ui-popover.js +144 -0
- package/dist/collection/components/ui-radio/ui-radio.css +22 -0
- package/dist/collection/components/ui-radio/ui-radio.js +213 -0
- package/dist/collection/components/ui-radio-group/ui-radio-group.css +10 -0
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +247 -0
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.css +80 -0
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +100 -0
- package/dist/collection/components/ui-search-shell/ui-search-shell.css +61 -0
- package/dist/collection/components/ui-search-shell/ui-search-shell.js +46 -0
- package/dist/collection/components/ui-select/ui-select.css +62 -0
- package/dist/collection/components/ui-select/ui-select.js +212 -0
- package/dist/collection/components/ui-switch/ui-switch.css +63 -0
- package/dist/collection/components/ui-switch/ui-switch.js +177 -0
- package/dist/collection/components/ui-tabs/ui-tabs.css +65 -0
- package/dist/collection/components/ui-tabs/ui-tabs.js +190 -0
- package/dist/collection/components/ui-textarea/ui-textarea.css +48 -0
- package/dist/collection/components/ui-textarea/ui-textarea.js +238 -0
- package/dist/collection/components/ui-toast-region/ui-toast-region.css +52 -0
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +100 -0
- package/dist/collection/components/ui-tooltip/ui-tooltip.css +14 -0
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +205 -0
- package/dist/collection/components/ui-top-bar/ui-top-bar.css +43 -0
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +52 -0
- package/dist/collection/overlay/manager.js +90 -0
- package/dist/collection/utils/events.js +13 -0
- package/dist/collection/utils/id.js +5 -0
- package/dist/collection/utils/initials.js +11 -0
- package/dist/components/index.d.ts +88 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-CIA4RyEp.js +1 -0
- package/dist/components/p-CR7f2MQC.js +1 -0
- package/dist/components/p-JwSoedEO.js +1 -0
- package/dist/components/p-WvL4iAhX.js +1 -0
- package/dist/components/p-hgBUJRDa.js +1 -0
- package/dist/components/ui-avatar-group.d.ts +11 -0
- package/dist/components/ui-avatar-group.js +1 -0
- package/dist/components/ui-avatar.d.ts +11 -0
- package/dist/components/ui-avatar.js +1 -0
- package/dist/components/ui-badge.d.ts +11 -0
- package/dist/components/ui-badge.js +1 -0
- package/dist/components/ui-button.d.ts +11 -0
- package/dist/components/ui-button.js +1 -0
- package/dist/components/ui-checkbox.d.ts +11 -0
- package/dist/components/ui-checkbox.js +1 -0
- package/dist/components/ui-context-menu.d.ts +11 -0
- package/dist/components/ui-context-menu.js +1 -0
- package/dist/components/ui-dialog.d.ts +11 -0
- package/dist/components/ui-dialog.js +1 -0
- package/dist/components/ui-disclosure.d.ts +11 -0
- package/dist/components/ui-disclosure.js +1 -0
- package/dist/components/ui-floating-action-button.d.ts +11 -0
- package/dist/components/ui-floating-action-button.js +1 -0
- package/dist/components/ui-form-field.d.ts +11 -0
- package/dist/components/ui-form-field.js +1 -0
- package/dist/components/ui-icon-button.d.ts +11 -0
- package/dist/components/ui-icon-button.js +1 -0
- package/dist/components/ui-input.d.ts +11 -0
- package/dist/components/ui-input.js +1 -0
- package/dist/components/ui-menu-item.d.ts +11 -0
- package/dist/components/ui-menu-item.js +1 -0
- package/dist/components/ui-menu.d.ts +11 -0
- package/dist/components/ui-menu.js +1 -0
- package/dist/components/ui-popover.d.ts +11 -0
- package/dist/components/ui-popover.js +1 -0
- package/dist/components/ui-radio-group.d.ts +11 -0
- package/dist/components/ui-radio-group.js +1 -0
- package/dist/components/ui-radio.d.ts +11 -0
- package/dist/components/ui-radio.js +1 -0
- package/dist/components/ui-search-result-row.d.ts +11 -0
- package/dist/components/ui-search-result-row.js +1 -0
- package/dist/components/ui-search-shell.d.ts +11 -0
- package/dist/components/ui-search-shell.js +1 -0
- package/dist/components/ui-select.d.ts +11 -0
- package/dist/components/ui-select.js +1 -0
- package/dist/components/ui-switch.d.ts +11 -0
- package/dist/components/ui-switch.js +1 -0
- package/dist/components/ui-tabs.d.ts +11 -0
- package/dist/components/ui-tabs.js +1 -0
- package/dist/components/ui-textarea.d.ts +11 -0
- package/dist/components/ui-textarea.js +1 -0
- package/dist/components/ui-toast-region.d.ts +11 -0
- package/dist/components/ui-toast-region.js +1 -0
- package/dist/components/ui-tooltip.d.ts +11 -0
- package/dist/components/ui-tooltip.js +1 -0
- package/dist/components/ui-top-bar.d.ts +11 -0
- package/dist/components/ui-top-bar.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/events-JwSoedEO.js +15 -0
- package/dist/esm/id-hgBUJRDa.js +7 -0
- package/dist/esm/index-CEeiinfk.js +1561 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/looma.js +21 -0
- package/dist/esm/manager-CR7f2MQC.js +89 -0
- package/dist/esm/ui-avatar-group.entry.js +49 -0
- package/dist/esm/ui-avatar.entry.js +48 -0
- package/dist/esm/ui-badge.entry.js +17 -0
- package/dist/esm/ui-button.entry.js +60 -0
- package/dist/esm/ui-checkbox.entry.js +89 -0
- package/dist/esm/ui-context-menu.entry.js +199 -0
- package/dist/esm/ui-dialog.entry.js +91 -0
- package/dist/esm/ui-disclosure.entry.js +107 -0
- package/dist/esm/ui-floating-action-button.entry.js +18 -0
- package/dist/esm/ui-form-field.entry.js +57 -0
- package/dist/esm/ui-icon-button.entry.js +19 -0
- package/dist/esm/ui-input.entry.js +99 -0
- package/dist/esm/ui-menu-item.entry.js +17 -0
- package/dist/esm/ui-menu.entry.js +94 -0
- package/dist/esm/ui-popover.entry.js +90 -0
- package/dist/esm/ui-radio-group.entry.js +132 -0
- package/dist/esm/ui-radio.entry.js +83 -0
- package/dist/esm/ui-search-result-row.entry.js +45 -0
- package/dist/esm/ui-search-shell.entry.js +37 -0
- package/dist/esm/ui-select.entry.js +98 -0
- package/dist/esm/ui-switch.entry.js +63 -0
- package/dist/esm/ui-tabs.entry.js +115 -0
- package/dist/esm/ui-textarea.entry.js +104 -0
- package/dist/esm/ui-toast-region.entry.js +65 -0
- package/dist/esm/ui-tooltip.entry.js +131 -0
- package/dist/esm/ui-top-bar.entry.js +41 -0
- package/dist/index.cjs +4062 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.d.cts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +129 -0
- package/dist/looma/index.esm.js +0 -0
- package/dist/looma/looma.esm.js +1 -0
- package/dist/looma/p-03f0594b.entry.js +1 -0
- package/dist/looma/p-15e619fd.entry.js +1 -0
- package/dist/looma/p-201243dc.entry.js +1 -0
- package/dist/looma/p-24d7aa5b.entry.js +1 -0
- package/dist/looma/p-341ba64a.entry.js +1 -0
- package/dist/looma/p-41d62a83.entry.js +1 -0
- package/dist/looma/p-4742e6b4.entry.js +1 -0
- package/dist/looma/p-4c54d489.entry.js +1 -0
- package/dist/looma/p-52c537fa.entry.js +1 -0
- package/dist/looma/p-5a645647.entry.js +1 -0
- package/dist/looma/p-610b2eca.entry.js +1 -0
- package/dist/looma/p-649dad92.entry.js +1 -0
- package/dist/looma/p-66a203a1.entry.js +1 -0
- package/dist/looma/p-754cfff3.entry.js +1 -0
- package/dist/looma/p-93ce1c62.entry.js +1 -0
- package/dist/looma/p-955fb814.entry.js +1 -0
- package/dist/looma/p-96de71ad.entry.js +1 -0
- package/dist/looma/p-CEeiinfk.js +2 -0
- package/dist/looma/p-CR7f2MQC.js +1 -0
- package/dist/looma/p-DQuL1Twl.js +1 -0
- package/dist/looma/p-JwSoedEO.js +1 -0
- package/dist/looma/p-ab4151d5.entry.js +1 -0
- package/dist/looma/p-c14233bc.entry.js +1 -0
- package/dist/looma/p-dc857ed4.entry.js +1 -0
- package/dist/looma/p-dfcb2cca.entry.js +1 -0
- package/dist/looma/p-dff144bd.entry.js +1 -0
- package/dist/looma/p-ebb74106.entry.js +1 -0
- package/dist/looma/p-ecb5739b.entry.js +1 -0
- package/dist/looma/p-ee31c7b4.entry.js +1 -0
- package/dist/looma/p-fa4659c4.entry.js +1 -0
- package/dist/looma/p-hgBUJRDa.js +1 -0
- package/dist/types/components/ui-avatar/ui-avatar.d.ts +11 -0
- package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +12 -0
- package/dist/types/components/ui-badge/ui-badge.d.ts +5 -0
- package/dist/types/components/ui-button/ui-button.d.ts +13 -0
- package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +19 -0
- package/dist/types/components/ui-context-menu/ui-context-menu.d.ts +37 -0
- package/dist/types/components/ui-dialog/ui-dialog.d.ts +19 -0
- package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +20 -0
- package/dist/types/components/ui-floating-action-button/ui-floating-action-button.d.ts +6 -0
- package/dist/types/components/ui-form-field/ui-form-field.d.ts +10 -0
- package/dist/types/components/ui-icon-button/ui-icon-button.d.ts +7 -0
- package/dist/types/components/ui-input/ui-input.d.ts +19 -0
- package/dist/types/components/ui-menu/ui-menu.d.ts +14 -0
- package/dist/types/components/ui-menu-item/ui-menu-item.d.ts +5 -0
- package/dist/types/components/ui-popover/ui-popover.d.ts +16 -0
- package/dist/types/components/ui-radio/ui-radio.d.ts +17 -0
- package/dist/types/components/ui-radio-group/ui-radio-group.d.ts +21 -0
- package/dist/types/components/ui-search-result-row/ui-search-result-row.d.ts +15 -0
- package/dist/types/components/ui-search-shell/ui-search-shell.d.ts +9 -0
- package/dist/types/components/ui-select/ui-select.d.ts +19 -0
- package/dist/types/components/ui-switch/ui-switch.d.ts +15 -0
- package/dist/types/components/ui-tabs/ui-tabs.d.ts +17 -0
- package/dist/types/components/ui-textarea/ui-textarea.d.ts +20 -0
- package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +12 -0
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +24 -0
- package/dist/types/components/ui-top-bar/ui-top-bar.d.ts +12 -0
- package/dist/types/components.d.ts +1148 -0
- package/dist/types/overlay/manager.d.ts +14 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/utils/events.d.ts +4 -0
- package/dist/types/utils/id.d.ts +1 -0
- package/dist/types/utils/initials.d.ts +1 -0
- package/dist/ui-avatar-group.entry-BZGXBOSE.js +59 -0
- package/dist/ui-avatar.entry-S2O2W5SA.js +51 -0
- package/dist/ui-badge.entry-CVJDISCR.js +22 -0
- package/dist/ui-button.entry-LNJBEJFE.js +72 -0
- package/dist/ui-checkbox.entry-5RA2CB43.js +102 -0
- package/dist/ui-context-menu.entry-UUOCT75F.js +211 -0
- package/dist/ui-dialog.entry-OEPJTEES.js +106 -0
- package/dist/ui-disclosure.entry-LRRISGUD.js +120 -0
- package/dist/ui-floating-action-button.entry-7TSAZRXP.js +23 -0
- package/dist/ui-form-field.entry-73YOVICF.js +67 -0
- package/dist/ui-icon-button.entry-MNXGPG36.js +24 -0
- package/dist/ui-input.entry-UWRVAOSW.js +112 -0
- package/dist/ui-menu-item.entry-5AOJO5MP.js +22 -0
- package/dist/ui-menu.entry-YDS6UMB5.js +98 -0
- package/dist/ui-popover.entry-PGWDCQIX.js +104 -0
- package/dist/ui-radio-group.entry-RHP5GNWU.js +142 -0
- package/dist/ui-radio.entry-5WRWPSTK.js +96 -0
- package/dist/ui-search-result-row.entry-IKJB2SJJ.js +50 -0
- package/dist/ui-search-shell.entry-ZIWF4ZHH.js +41 -0
- package/dist/ui-select.entry-N5TIKHR7.js +111 -0
- package/dist/ui-switch.entry-WUSZTXIR.js +75 -0
- package/dist/ui-tabs.entry-UFAVAQIF.js +124 -0
- package/dist/ui-textarea.entry-BYT47RAQ.js +117 -0
- package/dist/ui-toast-region.entry-6UYR3ZU2.js +78 -0
- package/dist/ui-tooltip.entry-YS7UX4FS.js +145 -0
- package/dist/ui-top-bar.entry-V27H6NFO.js +49 -0
- package/editor/chunk-JKRA4D4W.js +435 -0
- package/editor/chunk-NOOV344H.js +783 -0
- package/editor/extensions/index.d.ts +78 -0
- package/editor/extensions/index.js +28 -0
- package/editor/index.d.ts +7 -0
- package/editor/index.js +29 -0
- package/editor/table-overlay-DTr3KC9e.d.ts +12 -0
- package/editor/ui.d.ts +48 -0
- package/editor/ui.js +1 -0
- package/editor.css +662 -0
- package/layout/index.cjs +207 -0
- package/layout/index.css +166 -0
- package/layout/index.d.cts +3 -0
- package/layout/index.d.ts +3 -0
- package/layout/index.js +182 -0
- package/layout.css +124 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +244 -0
- package/styles.css +899 -0
- package/theme-dark.css +59 -0
- package/theme-high-contrast.css +21 -0
- package/theme-light.css +30 -0
- package/tokens.css +148 -0
- package/vue/chunk-J4UBEIIL.js +83 -0
- package/vue/editor/index.d.ts +89 -0
- package/vue/editor/index.js +125 -0
- package/vue/index.d.ts +167 -0
- package/vue/index.js +113 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { eventToTrigger } from "../../utils/events";
|
|
3
|
+
import { dispatchDetail } from "../../utils/events";
|
|
4
|
+
export class UIRadioGroup {
|
|
5
|
+
host;
|
|
6
|
+
value = '';
|
|
7
|
+
name = '';
|
|
8
|
+
orientation = 'horizontal';
|
|
9
|
+
disabled = false;
|
|
10
|
+
required = false;
|
|
11
|
+
internalValue = '';
|
|
12
|
+
syncFromProp() {
|
|
13
|
+
this.internalValue = this.value;
|
|
14
|
+
}
|
|
15
|
+
syncToRadios() {
|
|
16
|
+
const radios = this.getRadios();
|
|
17
|
+
radios.forEach((radio) => {
|
|
18
|
+
radio.checked =
|
|
19
|
+
(radio.getAttribute('value') ?? '') === this.internalValue;
|
|
20
|
+
radio.name = this.name || this.groupId;
|
|
21
|
+
if (this.disabled) {
|
|
22
|
+
radio.setAttribute('aria-disabled', 'true');
|
|
23
|
+
radio.setAttribute('data-disabled', 'true');
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
radio.removeAttribute('aria-disabled');
|
|
27
|
+
radio.removeAttribute('data-disabled');
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
this.updateRovingTabindex();
|
|
31
|
+
}
|
|
32
|
+
groupId = `ui-radio-group-${Math.random().toString(36).slice(2, 9)}`;
|
|
33
|
+
componentDidLoad() {
|
|
34
|
+
this.syncFromProp();
|
|
35
|
+
this.syncToRadios();
|
|
36
|
+
this.host.addEventListener('change', this.onRadioChange);
|
|
37
|
+
this.host.addEventListener('keydown', this.onKeydown);
|
|
38
|
+
}
|
|
39
|
+
disconnectedCallback() {
|
|
40
|
+
this.host.removeEventListener('change', this.onRadioChange);
|
|
41
|
+
this.host.removeEventListener('keydown', this.onKeydown);
|
|
42
|
+
}
|
|
43
|
+
componentDidUpdate() {
|
|
44
|
+
this.syncToRadios();
|
|
45
|
+
}
|
|
46
|
+
getRadios() {
|
|
47
|
+
return Array.from(this.host.querySelectorAll('ui-radio'));
|
|
48
|
+
}
|
|
49
|
+
updateRovingTabindex() {
|
|
50
|
+
const radios = this.getRadios();
|
|
51
|
+
const currentIndex = radios.findIndex((r) => (r.getAttribute('value') ?? '') === this.internalValue);
|
|
52
|
+
radios.forEach((r, i) => {
|
|
53
|
+
const input = r.querySelector('input[type="radio"]');
|
|
54
|
+
if (input) {
|
|
55
|
+
input.tabIndex = i === (currentIndex >= 0 ? currentIndex : 0) ? 0 : -1;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
setValue(newValue, trigger) {
|
|
60
|
+
const prev = this.internalValue;
|
|
61
|
+
this.internalValue = newValue;
|
|
62
|
+
this.syncToRadios();
|
|
63
|
+
dispatchDetail(this.host, 'select', { value: newValue, previousValue: prev, trigger });
|
|
64
|
+
dispatchDetail(this.host, 'change', {
|
|
65
|
+
checked: true,
|
|
66
|
+
value: newValue,
|
|
67
|
+
trigger,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
onRadioChange = (e) => {
|
|
71
|
+
const target = e.target.closest?.('ui-radio');
|
|
72
|
+
if (!target || target.getRootNode() !== this.host.getRootNode())
|
|
73
|
+
return;
|
|
74
|
+
const value = target.getAttribute('value') ?? '';
|
|
75
|
+
if (value && value !== this.internalValue) {
|
|
76
|
+
this.setValue(value, eventToTrigger(e));
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
onKeydown = (e) => {
|
|
80
|
+
const radios = this.getRadios();
|
|
81
|
+
if (radios.length === 0)
|
|
82
|
+
return;
|
|
83
|
+
const currentIndex = radios.findIndex((r) => (r.getAttribute('value') ?? '') === this.internalValue);
|
|
84
|
+
const axis = this.orientation === 'vertical' ? 'vertical' : 'horizontal';
|
|
85
|
+
const isPrev = axis === 'horizontal' ? e.key === 'ArrowLeft' : e.key === 'ArrowUp';
|
|
86
|
+
const isNext = axis === 'horizontal' ? e.key === 'ArrowRight' : e.key === 'ArrowDown';
|
|
87
|
+
if (!isPrev && !isNext)
|
|
88
|
+
return;
|
|
89
|
+
e.preventDefault();
|
|
90
|
+
let nextIndex;
|
|
91
|
+
if (isNext) {
|
|
92
|
+
nextIndex = currentIndex < 0 ? 0 : Math.min(currentIndex + 1, radios.length - 1);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
nextIndex = currentIndex <= 0 ? radios.length - 1 : currentIndex - 1;
|
|
96
|
+
}
|
|
97
|
+
const nextRadio = radios[nextIndex];
|
|
98
|
+
const nextValue = nextRadio?.getAttribute('value') ?? '';
|
|
99
|
+
if (nextValue) {
|
|
100
|
+
this.setValue(nextValue, 'keyboard');
|
|
101
|
+
nextRadio?.querySelector('input[type="radio"]')?.focus();
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
render() {
|
|
105
|
+
return (h(Host, { key: '5182efff607bcf9add3f0981ce2af3a42bd356b8', role: "radiogroup", "aria-orientation": this.orientation, "data-orientation": this.orientation, "data-disabled": this.disabled ? '' : undefined }, h("slot", { key: '2889bc2abecddf3e7cf81cd54053bdd608559dfc' })));
|
|
106
|
+
}
|
|
107
|
+
static get is() { return "ui-radio-group"; }
|
|
108
|
+
static get encapsulation() { return "shadow"; }
|
|
109
|
+
static get originalStyleUrls() {
|
|
110
|
+
return {
|
|
111
|
+
"$": ["ui-radio-group.css"]
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
static get styleUrls() {
|
|
115
|
+
return {
|
|
116
|
+
"$": ["ui-radio-group.css"]
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
static get properties() {
|
|
120
|
+
return {
|
|
121
|
+
"value": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"mutable": false,
|
|
124
|
+
"complexType": {
|
|
125
|
+
"original": "string",
|
|
126
|
+
"resolved": "string",
|
|
127
|
+
"references": {}
|
|
128
|
+
},
|
|
129
|
+
"required": false,
|
|
130
|
+
"optional": false,
|
|
131
|
+
"docs": {
|
|
132
|
+
"tags": [],
|
|
133
|
+
"text": ""
|
|
134
|
+
},
|
|
135
|
+
"getter": false,
|
|
136
|
+
"setter": false,
|
|
137
|
+
"reflect": false,
|
|
138
|
+
"attribute": "value",
|
|
139
|
+
"defaultValue": "''"
|
|
140
|
+
},
|
|
141
|
+
"name": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"mutable": false,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "string",
|
|
146
|
+
"resolved": "string",
|
|
147
|
+
"references": {}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": false,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": ""
|
|
154
|
+
},
|
|
155
|
+
"getter": false,
|
|
156
|
+
"setter": false,
|
|
157
|
+
"reflect": false,
|
|
158
|
+
"attribute": "name",
|
|
159
|
+
"defaultValue": "''"
|
|
160
|
+
},
|
|
161
|
+
"orientation": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"mutable": false,
|
|
164
|
+
"complexType": {
|
|
165
|
+
"original": "'horizontal' | 'vertical'",
|
|
166
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
167
|
+
"references": {}
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": false,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": ""
|
|
174
|
+
},
|
|
175
|
+
"getter": false,
|
|
176
|
+
"setter": false,
|
|
177
|
+
"reflect": false,
|
|
178
|
+
"attribute": "orientation",
|
|
179
|
+
"defaultValue": "'horizontal'"
|
|
180
|
+
},
|
|
181
|
+
"disabled": {
|
|
182
|
+
"type": "boolean",
|
|
183
|
+
"mutable": false,
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "boolean",
|
|
186
|
+
"resolved": "boolean",
|
|
187
|
+
"references": {}
|
|
188
|
+
},
|
|
189
|
+
"required": false,
|
|
190
|
+
"optional": false,
|
|
191
|
+
"docs": {
|
|
192
|
+
"tags": [],
|
|
193
|
+
"text": ""
|
|
194
|
+
},
|
|
195
|
+
"getter": false,
|
|
196
|
+
"setter": false,
|
|
197
|
+
"reflect": false,
|
|
198
|
+
"attribute": "disabled",
|
|
199
|
+
"defaultValue": "false"
|
|
200
|
+
},
|
|
201
|
+
"required": {
|
|
202
|
+
"type": "boolean",
|
|
203
|
+
"mutable": false,
|
|
204
|
+
"complexType": {
|
|
205
|
+
"original": "boolean",
|
|
206
|
+
"resolved": "boolean",
|
|
207
|
+
"references": {}
|
|
208
|
+
},
|
|
209
|
+
"required": false,
|
|
210
|
+
"optional": false,
|
|
211
|
+
"docs": {
|
|
212
|
+
"tags": [],
|
|
213
|
+
"text": ""
|
|
214
|
+
},
|
|
215
|
+
"getter": false,
|
|
216
|
+
"setter": false,
|
|
217
|
+
"reflect": false,
|
|
218
|
+
"attribute": "required",
|
|
219
|
+
"defaultValue": "false"
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
static get states() {
|
|
224
|
+
return {
|
|
225
|
+
"internalValue": {}
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
static get elementRef() { return "host"; }
|
|
229
|
+
static get watchers() {
|
|
230
|
+
return [{
|
|
231
|
+
"propName": "value",
|
|
232
|
+
"methodName": "syncFromProp"
|
|
233
|
+
}, {
|
|
234
|
+
"propName": "internalValue",
|
|
235
|
+
"methodName": "syncToRadios"
|
|
236
|
+
}, {
|
|
237
|
+
"propName": "name",
|
|
238
|
+
"methodName": "syncToRadios"
|
|
239
|
+
}, {
|
|
240
|
+
"propName": "orientation",
|
|
241
|
+
"methodName": "syncToRadios"
|
|
242
|
+
}, {
|
|
243
|
+
"propName": "disabled",
|
|
244
|
+
"methodName": "syncToRadios"
|
|
245
|
+
}];
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.search-result-row {
|
|
6
|
+
appearance: none;
|
|
7
|
+
inline-size: 100%;
|
|
8
|
+
min-block-size: var(--ui-search-result-row-min-height, 56px);
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding-block: var(--ui-search-result-row-padding-block, var(--ui-space-3, 0.75rem));
|
|
11
|
+
padding-inline: var(--ui-search-result-row-padding-inline, var(--ui-space-4, 1rem));
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
gap: var(--ui-search-result-row-gap, var(--ui-space-3, 0.75rem));
|
|
15
|
+
background: var(--ui-search-result-row-bg, transparent);
|
|
16
|
+
border: none;
|
|
17
|
+
border-block-end: 1px solid var(--ui-search-result-row-border, var(--ui-border, #e5e7eb));
|
|
18
|
+
color: inherit;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
text-align: left;
|
|
21
|
+
transition: background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host(:last-child) .search-result-row {
|
|
25
|
+
border-block-end: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.search-result-row:hover:enabled {
|
|
29
|
+
background: var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host([selected]) .search-result-row {
|
|
33
|
+
background: var(
|
|
34
|
+
--ui-search-result-row-selected-bg,
|
|
35
|
+
var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%))
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.search-result-row:focus-visible {
|
|
40
|
+
outline: 2px solid var(--ui-focus-ring, #2563eb);
|
|
41
|
+
outline-offset: -2px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.search-result-row:disabled,
|
|
45
|
+
:host([disabled]) .search-result-row {
|
|
46
|
+
opacity: 0.6;
|
|
47
|
+
cursor: not-allowed;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.search-result-row__leading,
|
|
51
|
+
.search-result-row__trailing {
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: flex-start;
|
|
54
|
+
flex-shrink: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.search-result-row__content {
|
|
58
|
+
min-inline-size: 0;
|
|
59
|
+
flex: 1;
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.search-result-row__title,
|
|
65
|
+
.search-result-row__meta,
|
|
66
|
+
.search-result-row__excerpt {
|
|
67
|
+
display: block;
|
|
68
|
+
min-inline-size: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[hidden] {
|
|
72
|
+
display: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
::slotted([slot='title']),
|
|
76
|
+
::slotted([slot='meta']),
|
|
77
|
+
::slotted([slot='excerpt']) {
|
|
78
|
+
display: block;
|
|
79
|
+
margin: 0;
|
|
80
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
function slotHasContent(slot) {
|
|
3
|
+
if (!slot) {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
return slot.assignedNodes({ flatten: true }).some((node) => {
|
|
7
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
8
|
+
return Boolean(node.textContent?.trim());
|
|
9
|
+
}
|
|
10
|
+
return true;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export class UISearchResultRow {
|
|
14
|
+
disabled = false;
|
|
15
|
+
selected = false;
|
|
16
|
+
hasLeading = false;
|
|
17
|
+
hasMeta = false;
|
|
18
|
+
hasExcerpt = false;
|
|
19
|
+
hasTrailing = false;
|
|
20
|
+
leadingSlot;
|
|
21
|
+
metaSlot;
|
|
22
|
+
excerptSlot;
|
|
23
|
+
trailingSlot;
|
|
24
|
+
componentDidLoad() {
|
|
25
|
+
this.syncSlots();
|
|
26
|
+
}
|
|
27
|
+
syncSlots = () => {
|
|
28
|
+
this.hasLeading = slotHasContent(this.leadingSlot);
|
|
29
|
+
this.hasMeta = slotHasContent(this.metaSlot);
|
|
30
|
+
this.hasExcerpt = slotHasContent(this.excerptSlot);
|
|
31
|
+
this.hasTrailing = slotHasContent(this.trailingSlot);
|
|
32
|
+
};
|
|
33
|
+
render() {
|
|
34
|
+
return (h(Host, { key: 'abd055ed3b7a9140f024181377fd6c0e9b270578' }, h("button", { key: 'af6758ec890a63d11e11180f3cccfd94112b9804', class: "search-result-row", type: "button", disabled: this.disabled, part: "button" }, h("span", { key: 'e7321d522ac45566e836382d525463825c855afc', class: "search-result-row__leading", part: "leading", hidden: !this.hasLeading }, h("slot", { key: '90f578306f8b9c321128f705369531b64d54cca2', name: "leading", ref: (el) => (this.leadingSlot = el), onSlotchange: this.syncSlots })), h("span", { key: '37a8ab0b4b19215d1a4c79d92646b18e010be8a0', class: "search-result-row__content", part: "content" }, h("span", { key: '1728598d9e9578cf6f04f13c1691e333b7d5ca25', class: "search-result-row__title", part: "title" }, h("slot", { key: '556b9da285b7e64298527870a970ef8c02e71988', name: "title" })), h("span", { key: 'ed47e52ad83968ca763e01ae7d9d3d66d444145a', class: "search-result-row__meta", part: "meta", hidden: !this.hasMeta }, h("slot", { key: 'c374d6328951530227892eec688edd60514e7e04', name: "meta", ref: (el) => (this.metaSlot = el), onSlotchange: this.syncSlots })), h("span", { key: '17965c7934d9256ce243a1d3a3e880716fcd42e1', class: "search-result-row__excerpt", part: "excerpt", hidden: !this.hasExcerpt }, h("slot", { key: '67cad2d2ea2310944cdf5a7685a1f4e3f537e683', name: "excerpt", ref: (el) => (this.excerptSlot = el), onSlotchange: this.syncSlots }))), h("span", { key: '43cb13c90187851fc30cc0c29847658f9f4cb069', class: "search-result-row__trailing", part: "trailing", hidden: !this.hasTrailing }, h("slot", { key: '2b262ad21cb605daea5e4ade8c377a60820a1f11', name: "trailing", ref: (el) => (this.trailingSlot = el), onSlotchange: this.syncSlots })))));
|
|
35
|
+
}
|
|
36
|
+
static get is() { return "ui-search-result-row"; }
|
|
37
|
+
static get encapsulation() { return "shadow"; }
|
|
38
|
+
static get originalStyleUrls() {
|
|
39
|
+
return {
|
|
40
|
+
"$": ["ui-search-result-row.css"]
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
static get styleUrls() {
|
|
44
|
+
return {
|
|
45
|
+
"$": ["ui-search-result-row.css"]
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
static get properties() {
|
|
49
|
+
return {
|
|
50
|
+
"disabled": {
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"mutable": false,
|
|
53
|
+
"complexType": {
|
|
54
|
+
"original": "boolean",
|
|
55
|
+
"resolved": "boolean",
|
|
56
|
+
"references": {}
|
|
57
|
+
},
|
|
58
|
+
"required": false,
|
|
59
|
+
"optional": false,
|
|
60
|
+
"docs": {
|
|
61
|
+
"tags": [],
|
|
62
|
+
"text": ""
|
|
63
|
+
},
|
|
64
|
+
"getter": false,
|
|
65
|
+
"setter": false,
|
|
66
|
+
"reflect": true,
|
|
67
|
+
"attribute": "disabled",
|
|
68
|
+
"defaultValue": "false"
|
|
69
|
+
},
|
|
70
|
+
"selected": {
|
|
71
|
+
"type": "boolean",
|
|
72
|
+
"mutable": false,
|
|
73
|
+
"complexType": {
|
|
74
|
+
"original": "boolean",
|
|
75
|
+
"resolved": "boolean",
|
|
76
|
+
"references": {}
|
|
77
|
+
},
|
|
78
|
+
"required": false,
|
|
79
|
+
"optional": false,
|
|
80
|
+
"docs": {
|
|
81
|
+
"tags": [],
|
|
82
|
+
"text": ""
|
|
83
|
+
},
|
|
84
|
+
"getter": false,
|
|
85
|
+
"setter": false,
|
|
86
|
+
"reflect": true,
|
|
87
|
+
"attribute": "selected",
|
|
88
|
+
"defaultValue": "false"
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
static get states() {
|
|
93
|
+
return {
|
|
94
|
+
"hasLeading": {},
|
|
95
|
+
"hasMeta": {},
|
|
96
|
+
"hasExcerpt": {},
|
|
97
|
+
"hasTrailing": {}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
position: fixed;
|
|
3
|
+
inset: 0;
|
|
4
|
+
z-index: var(--ui-search-shell-z-index, 400);
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.search-shell {
|
|
9
|
+
position: absolute;
|
|
10
|
+
inset: 0;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
padding-block-start: var(--ui-search-shell-padding-top, 10vh);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.search-shell__panel {
|
|
18
|
+
position: relative;
|
|
19
|
+
inline-size: min(
|
|
20
|
+
calc(100% - (var(--ui-search-shell-margin-inline, var(--ui-space-4, 1rem)) * 2)),
|
|
21
|
+
var(--ui-search-shell-max-width, 640px)
|
|
22
|
+
);
|
|
23
|
+
max-block-size: var(--ui-search-shell-max-height, 80vh);
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
background: var(--ui-search-shell-bg, var(--ui-surface, #ffffff));
|
|
28
|
+
border: 1px solid var(--ui-search-shell-border, var(--ui-border, #e5e7eb));
|
|
29
|
+
border-radius: var(--ui-search-shell-radius, var(--ui-radius-xl, 1rem));
|
|
30
|
+
box-shadow: var(--ui-search-shell-shadow, var(--ui-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12)));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.search-shell__search,
|
|
34
|
+
.search-shell__status,
|
|
35
|
+
.search-shell__footer {
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.search-shell__body {
|
|
40
|
+
flex: 1;
|
|
41
|
+
min-block-size: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[hidden] {
|
|
45
|
+
display: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (max-width: 767px) {
|
|
49
|
+
.search-shell {
|
|
50
|
+
padding-block-start: 0;
|
|
51
|
+
align-items: stretch;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.search-shell__panel {
|
|
55
|
+
inline-size: 100%;
|
|
56
|
+
max-block-size: 100dvh;
|
|
57
|
+
border-radius: 0;
|
|
58
|
+
border-inline: none;
|
|
59
|
+
border-block-start: none;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
function slotHasContent(slot) {
|
|
3
|
+
if (!slot) {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
return slot.assignedNodes({ flatten: true }).some((node) => {
|
|
7
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
8
|
+
return Boolean(node.textContent?.trim());
|
|
9
|
+
}
|
|
10
|
+
return true;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export class UISearchShell {
|
|
14
|
+
hasStatus = false;
|
|
15
|
+
hasFooter = false;
|
|
16
|
+
statusSlot;
|
|
17
|
+
footerSlot;
|
|
18
|
+
componentDidLoad() {
|
|
19
|
+
this.syncSlots();
|
|
20
|
+
}
|
|
21
|
+
syncSlots = () => {
|
|
22
|
+
this.hasStatus = slotHasContent(this.statusSlot);
|
|
23
|
+
this.hasFooter = slotHasContent(this.footerSlot);
|
|
24
|
+
};
|
|
25
|
+
render() {
|
|
26
|
+
return (h("div", { key: '3e8fb4f419a588c441abd5bd137093ba2f730b76', class: "search-shell", part: "base" }, h("slot", { key: '4772932f9e077b0e4f68c50657945f3ea30afb8d', name: "backdrop" }), h("div", { key: 'c7877bb3ade588797d8419b3c7efc0680ac32b78', class: "search-shell__panel", part: "panel" }, h("div", { key: 'd1e7c16a031896187550181be63a1ca14a04b127', class: "search-shell__search", part: "search" }, h("slot", { key: 'b61475159d7e18a623246a2872d4897e1ff8388a', name: "search" })), h("div", { key: '877a9847bb453d026b5e6c117ffa8ad44562195a', class: "search-shell__status", part: "status", hidden: !this.hasStatus }, h("slot", { key: '6b46e668586fa97a30e2d02fc7d46d53483ecdb5', name: "status", ref: (el) => (this.statusSlot = el), onSlotchange: this.syncSlots })), h("div", { key: '41622e5fe3b02d8c842a6d07b66119ac68f22bc0', class: "search-shell__body", part: "body" }, h("slot", { key: 'f36dc433657d95bb7afa1191351bbbbeaed4f6ed', name: "body" })), h("div", { key: 'bcbf35d5e37c0fe48b29dde935745ea792722646', class: "search-shell__footer", part: "footer", hidden: !this.hasFooter }, h("slot", { key: '02f99e3442476dbefc57b3a38dc5a4ad0f3e9f00', name: "footer", ref: (el) => (this.footerSlot = el), onSlotchange: this.syncSlots })))));
|
|
27
|
+
}
|
|
28
|
+
static get is() { return "ui-search-shell"; }
|
|
29
|
+
static get encapsulation() { return "shadow"; }
|
|
30
|
+
static get originalStyleUrls() {
|
|
31
|
+
return {
|
|
32
|
+
"$": ["ui-search-shell.css"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static get styleUrls() {
|
|
36
|
+
return {
|
|
37
|
+
"$": ["ui-search-shell.css"]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static get states() {
|
|
41
|
+
return {
|
|
42
|
+
"hasStatus": {},
|
|
43
|
+
"hasFooter": {}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
color: var(--ui-text-primary);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
::slotted(select) {
|
|
7
|
+
width: 100%;
|
|
8
|
+
appearance: none;
|
|
9
|
+
border: 1px solid var(--ui-border-default);
|
|
10
|
+
border-radius: var(--ui-radius-2);
|
|
11
|
+
background-color: var(--ui-surface-default);
|
|
12
|
+
color: inherit;
|
|
13
|
+
font: inherit;
|
|
14
|
+
line-height: var(--ui-line-height-md);
|
|
15
|
+
padding-block: var(--ui-select-padding-block, var(--ui-space-2));
|
|
16
|
+
padding-inline-start: var(--ui-select-padding-inline-start, var(--ui-space-3));
|
|
17
|
+
padding-inline-end: var(--ui-select-padding-inline-end, calc(var(--ui-space-6) + var(--ui-space-3)));
|
|
18
|
+
margin: 0;
|
|
19
|
+
background-image:
|
|
20
|
+
linear-gradient(45deg, transparent 50%, currentColor 50%),
|
|
21
|
+
linear-gradient(135deg, currentColor 50%, transparent 50%);
|
|
22
|
+
background-position:
|
|
23
|
+
calc(100% - 1rem) calc(50% - 2px),
|
|
24
|
+
calc(100% - 0.7rem) calc(50% - 2px);
|
|
25
|
+
background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
|
|
26
|
+
background-repeat: no-repeat;
|
|
27
|
+
transition:
|
|
28
|
+
border-color var(--ui-motion-fast) var(--ui-motion-ease),
|
|
29
|
+
box-shadow var(--ui-motion-fast) var(--ui-motion-ease),
|
|
30
|
+
background-color var(--ui-motion-fast) var(--ui-motion-ease);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
::slotted(select:hover:not(:focus):not(:disabled)) {
|
|
34
|
+
border-color: var(--ui-border-strong);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
::slotted(select:focus) {
|
|
38
|
+
border-color: var(--ui-focus-ring);
|
|
39
|
+
box-shadow: 0 0 0 3px var(--ui-accent-soft);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([data-invalid='true'])::slotted(select),
|
|
43
|
+
::slotted(select[aria-invalid='true']) {
|
|
44
|
+
border-color: var(--ui-accent-active);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
::slotted(select:disabled) {
|
|
48
|
+
background-color: var(--ui-surface-muted);
|
|
49
|
+
color: var(--ui-text-muted);
|
|
50
|
+
cursor: not-allowed;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
::slotted(select:focus-visible) {
|
|
54
|
+
outline: 2px solid var(--ui-focus-ring);
|
|
55
|
+
outline-offset: 2px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
::slotted(select[multiple]),
|
|
59
|
+
::slotted(select[size]:not([size='1'])) {
|
|
60
|
+
background-image: none;
|
|
61
|
+
padding-inline-end: var(--ui-select-padding-inline-start, var(--ui-space-3));
|
|
62
|
+
}
|