@threadlabs/looma 0.1.22 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-NIPNHZ5W.js → chunk-GDMQKT5F.js} +63 -31
- package/dist/{chunk-SZJQ3NPX.js → chunk-TL4FIE7X.js} +4 -8
- package/dist/cjs/{index-D07f6BOw.js → index-BHG9Rpil.js} +33 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/looma.cjs.js +2 -2
- package/dist/cjs/{manager-C9j3HZay.js → manager-Ce25WRtl.js} +6 -7
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +1 -1
- package/dist/cjs/ui-avatar-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-avatar.cjs.entry.js +1 -1
- package/dist/cjs/ui-badge.cjs.entry.js +1 -1
- package/dist/cjs/ui-button.cjs.entry.js +16 -5
- package/dist/cjs/ui-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ui-combobox.cjs.entry.js +541 -0
- package/dist/cjs/ui-context-menu.cjs.entry.js +3 -3
- package/dist/cjs/ui-dialog.cjs.entry.js +3 -3
- package/dist/cjs/ui-disclosure.cjs.entry.js +2 -2
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +2 -2
- package/dist/cjs/ui-form-field.cjs.entry.js +3 -3
- package/dist/cjs/ui-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/ui-input.cjs.entry.js +11 -6
- package/dist/cjs/ui-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/ui-menu.cjs.entry.js +3 -3
- package/dist/cjs/ui-popover.cjs.entry.js +3 -3
- package/dist/cjs/ui-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/ui-radio.cjs.entry.js +3 -3
- package/dist/cjs/ui-search-result-row.cjs.entry.js +2 -2
- package/dist/cjs/ui-search-shell.cjs.entry.js +2 -2
- package/dist/cjs/ui-select.cjs.entry.js +15 -7
- package/dist/cjs/ui-switch.cjs.entry.js +3 -3
- package/dist/cjs/ui-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ui-textarea.cjs.entry.js +10 -6
- package/dist/cjs/ui-toast-region.cjs.entry.js +2 -2
- package/dist/cjs/ui-tooltip.cjs.entry.js +52 -16
- package/dist/cjs/ui-top-bar.cjs.entry.js +2 -2
- package/dist/cjs/ui-tree-item.cjs.entry.js +7 -3
- package/dist/cjs/ui-tree.cjs.entry.js +81 -9
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ui-button/ui-button.css +36 -26
- package/dist/collection/components/ui-button/ui-button.js +14 -3
- package/dist/collection/components/ui-combobox/ui-combobox.css +24 -0
- package/dist/collection/components/ui-combobox/ui-combobox.js +973 -0
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
- package/dist/collection/components/ui-dialog/ui-dialog.js +1 -1
- package/dist/collection/components/ui-disclosure/ui-disclosure.js +1 -1
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +1 -1
- package/dist/collection/components/ui-form-field/ui-form-field.css +4 -0
- package/dist/collection/components/ui-form-field/ui-form-field.js +1 -1
- package/dist/collection/components/ui-icon-button/ui-icon-button.js +1 -1
- package/dist/collection/components/ui-input/ui-input.css +8 -6
- package/dist/collection/components/ui-input/ui-input.js +11 -7
- package/dist/collection/components/ui-menu/ui-menu.js +1 -1
- package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
- package/dist/collection/components/ui-popover/ui-popover.js +1 -1
- package/dist/collection/components/ui-radio/ui-radio.js +2 -2
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +1 -1
- package/dist/collection/components/ui-search-shell/ui-search-shell.js +1 -1
- package/dist/collection/components/ui-select/ui-select.css +8 -6
- package/dist/collection/components/ui-select/ui-select.js +17 -11
- package/dist/collection/components/ui-switch/ui-switch.js +2 -2
- package/dist/collection/components/ui-tabs/ui-tabs.js +1 -1
- package/dist/collection/components/ui-textarea/ui-textarea.css +7 -6
- package/dist/collection/components/ui-textarea/ui-textarea.js +10 -7
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +1 -1
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +102 -15
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
- package/dist/collection/components/ui-tree/ui-tree.js +100 -8
- package/dist/collection/components/ui-tree-item/ui-tree-item.js +44 -2
- package/dist/collection/field/combobox.js +4 -0
- package/dist/collection/field/valibot.js +5 -0
- package/dist/collection/field/validation.js +62 -0
- package/dist/collection/overlay/manager.js +6 -7
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-Bh_1GxOD.js +1 -0
- package/dist/components/p-C-0syqXZ.js +1 -0
- package/dist/components/p-CaietZcq.js +1 -0
- package/dist/components/p-DHd18bK7.js +1 -0
- package/dist/components/ui-affordance-scope.js +1 -1
- package/dist/components/ui-avatar-group.js +1 -1
- package/dist/components/ui-avatar.js +1 -1
- package/dist/components/ui-badge.js +1 -1
- package/dist/components/ui-button.js +1 -1
- package/dist/components/ui-checkbox.js +1 -1
- package/dist/components/ui-combobox.d.ts +11 -0
- package/dist/components/ui-combobox.js +1 -0
- package/dist/components/ui-context-menu.js +1 -1
- package/dist/components/ui-dialog.js +1 -1
- package/dist/components/ui-disclosure.js +1 -1
- package/dist/components/ui-floating-action-button.js +1 -1
- package/dist/components/ui-form-field.js +1 -1
- package/dist/components/ui-icon-button.js +1 -1
- package/dist/components/ui-input.js +1 -1
- package/dist/components/ui-menu-item.js +1 -1
- package/dist/components/ui-menu.js +1 -1
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-radio-group.js +1 -1
- package/dist/components/ui-radio.js +1 -1
- package/dist/components/ui-search-result-row.js +1 -1
- package/dist/components/ui-search-shell.js +1 -1
- package/dist/components/ui-select.js +1 -1
- package/dist/components/ui-switch.js +1 -1
- package/dist/components/ui-tabs.js +1 -1
- package/dist/components/ui-textarea.js +1 -1
- package/dist/components/ui-toast-region.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/components/ui-top-bar.js +1 -1
- package/dist/components/ui-tree-item.js +2 -2
- package/dist/components/ui-tree.js +1 -1
- package/dist/esm/{index-CEeiinfk.js → index-8BGiMGQ0.js} +33 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/looma.js +3 -3
- package/dist/esm/{manager-PM9a74r7.js → manager-C-0syqXZ.js} +6 -7
- package/dist/esm/ui-affordance-scope.entry.js +1 -1
- package/dist/esm/ui-avatar-group.entry.js +1 -1
- package/dist/esm/ui-avatar.entry.js +1 -1
- package/dist/esm/ui-badge.entry.js +1 -1
- package/dist/esm/ui-button.entry.js +16 -5
- package/dist/esm/ui-checkbox.entry.js +1 -1
- package/dist/esm/ui-combobox.entry.js +539 -0
- package/dist/esm/ui-context-menu.entry.js +3 -3
- package/dist/esm/ui-dialog.entry.js +3 -3
- package/dist/esm/ui-disclosure.entry.js +2 -2
- package/dist/esm/ui-floating-action-button.entry.js +2 -2
- package/dist/esm/ui-form-field.entry.js +3 -3
- package/dist/esm/ui-icon-button.entry.js +2 -2
- package/dist/esm/ui-input.entry.js +11 -6
- package/dist/esm/ui-menu-item.entry.js +2 -2
- package/dist/esm/ui-menu.entry.js +3 -3
- package/dist/esm/ui-popover.entry.js +3 -3
- package/dist/esm/ui-radio-group.entry.js +2 -2
- package/dist/esm/ui-radio.entry.js +3 -3
- package/dist/esm/ui-search-result-row.entry.js +2 -2
- package/dist/esm/ui-search-shell.entry.js +2 -2
- package/dist/esm/ui-select.entry.js +15 -7
- package/dist/esm/ui-switch.entry.js +3 -3
- package/dist/esm/ui-tabs.entry.js +2 -2
- package/dist/esm/ui-textarea.entry.js +10 -6
- package/dist/esm/ui-toast-region.entry.js +2 -2
- package/dist/esm/ui-tooltip.entry.js +52 -16
- package/dist/esm/ui-top-bar.entry.js +2 -2
- package/dist/esm/ui-tree-item.entry.js +7 -3
- package/dist/esm/ui-tree.entry.js +81 -9
- package/dist/index.cjs +883 -123
- package/dist/index.d.cts +104 -1
- package/dist/index.d.ts +104 -1
- package/dist/index.js +62 -8
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/{p-0198bb21.entry.js → p-13347631.entry.js} +1 -1
- package/dist/looma/p-14c081cf.entry.js +1 -0
- package/dist/looma/{p-0f45c5f0.entry.js → p-25366205.entry.js} +1 -1
- package/dist/looma/{p-a9f46811.entry.js → p-2e3aa869.entry.js} +1 -1
- package/dist/looma/p-40fe7fee.entry.js +1 -0
- package/dist/looma/p-446cda76.entry.js +1 -0
- package/dist/looma/p-4fc1b005.entry.js +13 -0
- package/dist/looma/p-582973b5.entry.js +1 -0
- package/dist/looma/{p-d273b857.entry.js → p-5a87b59d.entry.js} +1 -1
- package/dist/looma/{p-2ed7e241.entry.js → p-5da09f47.entry.js} +1 -1
- package/dist/looma/{p-7e94d90d.entry.js → p-69a5557b.entry.js} +1 -1
- package/dist/looma/p-6a8a4736.entry.js +1 -0
- package/dist/looma/{p-caa8fc7b.entry.js → p-6bf4038b.entry.js} +1 -1
- package/dist/looma/p-7e0bb7f6.entry.js +1 -0
- package/dist/looma/{p-ed5abf6d.entry.js → p-8204fee6.entry.js} +1 -1
- package/dist/looma/{p-5ba9d496.entry.js → p-8238e0dc.entry.js} +1 -1
- package/dist/looma/p-8BGiMGQ0.js +2 -0
- package/dist/looma/{p-051f578c.entry.js → p-8b8840b8.entry.js} +1 -1
- package/dist/looma/{p-1674cda4.entry.js → p-99d88efb.entry.js} +1 -1
- package/dist/looma/p-C-0syqXZ.js +1 -0
- package/dist/looma/p-a27669b1.entry.js +1 -0
- package/dist/looma/{p-11083743.entry.js → p-a6ee76b7.entry.js} +1 -1
- package/dist/looma/p-a90d2821.entry.js +1 -0
- package/dist/looma/{p-2e6f791e.entry.js → p-add36e74.entry.js} +1 -1
- package/dist/looma/{p-0584a051.entry.js → p-b6398a6b.entry.js} +1 -1
- package/dist/looma/{p-078f9fb8.entry.js → p-d50faaff.entry.js} +1 -1
- package/dist/looma/{p-b7aa4488.entry.js → p-d77278ce.entry.js} +1 -1
- package/dist/looma/p-d9ec13b7.entry.js +1 -0
- package/dist/looma/{p-1681b218.entry.js → p-ecf8005f.entry.js} +1 -1
- package/dist/looma/p-ed368426.entry.js +1 -0
- package/dist/looma/{p-063f5a89.entry.js → p-f0487ff3.entry.js} +1 -1
- package/dist/looma/p-f74e5546.entry.js +1 -0
- package/dist/types/components/ui-combobox/ui-combobox.d.ts +93 -0
- package/dist/types/components/ui-input/ui-input.d.ts +1 -1
- package/dist/types/components/ui-select/ui-select.d.ts +3 -2
- package/dist/types/components/ui-textarea/ui-textarea.d.ts +1 -1
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +18 -1
- package/dist/types/components/ui-tree/ui-tree.d.ts +9 -1
- package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +4 -0
- package/dist/types/components.d.ts +260 -28
- package/dist/types/field/combobox.d.ts +46 -0
- package/dist/types/field/valibot.d.ts +7 -0
- package/dist/types/field/validation.d.ts +56 -0
- package/dist/{ui-affordance-scope.entry-L533MECG.js → ui-affordance-scope.entry-VO4C2MZX.js} +1 -1
- package/dist/{ui-avatar-group.entry-BWS7E2CM.js → ui-avatar-group.entry-TAXJRIIU.js} +1 -1
- package/dist/{ui-avatar.entry-3INAY3XP.js → ui-avatar.entry-T6FU6ZYM.js} +1 -1
- package/dist/{ui-badge.entry-2WOBVOYP.js → ui-badge.entry-MZFYNBMJ.js} +1 -1
- package/dist/ui-button.entry-7UXMUGHN.js +80 -0
- package/dist/{ui-checkbox.entry-2PTBHSCQ.js → ui-checkbox.entry-DMZJB3RE.js} +1 -1
- package/dist/ui-combobox.entry-ZCTPXEES.js +553 -0
- package/dist/{ui-context-menu.entry-AYDDCIZS.js → ui-context-menu.entry-2WMCBGCP.js} +6 -6
- package/dist/{ui-dialog.entry-I2XI3ZTZ.js → ui-dialog.entry-WO23XOSW.js} +6 -6
- package/dist/{ui-disclosure.entry-5LY2BT7B.js → ui-disclosure.entry-USX7OUEW.js} +2 -2
- package/dist/{ui-floating-action-button.entry-EJAMR5AM.js → ui-floating-action-button.entry-MXDIN7MV.js} +2 -2
- package/dist/{ui-form-field.entry-SJ6NNFXB.js → ui-form-field.entry-7ZCMEHPY.js} +3 -3
- package/dist/{ui-icon-button.entry-7SD2LVXE.js → ui-icon-button.entry-MJUNXHBU.js} +2 -2
- package/dist/{ui-input.entry-7MM7GEQW.js → ui-input.entry-AWG63YIG.js} +8 -6
- package/dist/{ui-menu-item.entry-V3HIMR75.js → ui-menu-item.entry-HFTWG62N.js} +2 -2
- package/dist/{ui-menu.entry-R4WK5QSX.js → ui-menu.entry-IT3GW5TL.js} +7 -7
- package/dist/{ui-popover.entry-ZRJRTXA7.js → ui-popover.entry-ZQQB4N6E.js} +6 -6
- package/dist/{ui-radio-group.entry-S6RXHFSN.js → ui-radio-group.entry-V7PCTS7I.js} +2 -2
- package/dist/{ui-radio.entry-B73QZK2M.js → ui-radio.entry-JYH6TQBI.js} +3 -3
- package/dist/{ui-search-result-row.entry-DR2Y5S7P.js → ui-search-result-row.entry-JBNYXXUN.js} +2 -2
- package/dist/{ui-search-shell.entry-ST5IKJBC.js → ui-search-shell.entry-TEAWE76O.js} +2 -2
- package/dist/{ui-select.entry-7GPRFV67.js → ui-select.entry-F3A6TE2U.js} +13 -7
- package/dist/{ui-switch.entry-XQ5IRJRH.js → ui-switch.entry-MJIICMP2.js} +3 -3
- package/dist/{ui-tabs.entry-HPW5L5CY.js → ui-tabs.entry-6REFIUHV.js} +2 -2
- package/dist/{ui-textarea.entry-W2PSRYVS.js → ui-textarea.entry-OJTXCED7.js} +8 -6
- package/dist/{ui-toast-region.entry-FJUHFXKZ.js → ui-toast-region.entry-NOFXLKPS.js} +5 -5
- package/dist/{ui-tooltip.entry-G5WHQW7K.js → ui-tooltip.entry-COWTWVHX.js} +57 -21
- package/dist/{ui-top-bar.entry-3NCHFC4Y.js → ui-top-bar.entry-PIAWXJNV.js} +2 -2
- package/dist/{ui-tree-item.entry-45RR3CMP.js → ui-tree-item.entry-BSEWNL2O.js} +7 -3
- package/dist/{ui-tree.entry-SZW4Q5PY.js → ui-tree.entry-XYI3ZFAZ.js} +77 -8
- package/dist/valibot.d.ts +52 -0
- package/dist/valibot.js +7 -0
- package/package.json +11 -3
- package/styles.css +36 -20
- package/theme-high-contrast.css +12 -0
- package/tokens.css +23 -0
- package/vue/{chunk-5KWCMTXB.js → chunk-JLW23USW.js} +88 -1
- package/vue/editor/index.js +1 -1
- package/vue/index.d.ts +123 -1
- package/vue/index.js +3 -1
- package/dist/components/p-CEYIKqYc.js +0 -1
- package/dist/components/p-CIA4RyEp.js +0 -1
- package/dist/components/p-PM9a74r7.js +0 -1
- package/dist/looma/p-34417499.entry.js +0 -1
- package/dist/looma/p-4b422d40.entry.js +0 -1
- package/dist/looma/p-54722713.entry.js +0 -13
- package/dist/looma/p-54c41576.entry.js +0 -1
- package/dist/looma/p-5d4713a6.entry.js +0 -1
- package/dist/looma/p-624ba086.entry.js +0 -1
- package/dist/looma/p-8d5adb17.entry.js +0 -1
- package/dist/looma/p-9194a99d.entry.js +0 -1
- package/dist/looma/p-CEeiinfk.js +0 -2
- package/dist/looma/p-PM9a74r7.js +0 -1
- package/dist/looma/p-a33522a2.entry.js +0 -1
- package/dist/looma/p-a5127c7d.entry.js +0 -1
- package/dist/looma/p-e3f99a24.entry.js +0 -1
- package/dist/ui-button.entry-VCGSEONK.js +0 -71
|
@@ -212,7 +212,7 @@ export class UIContextMenu {
|
|
|
212
212
|
this.closeMenu('action', 'pointer');
|
|
213
213
|
};
|
|
214
214
|
render() {
|
|
215
|
-
return (h(Host, { key: '
|
|
215
|
+
return (h(Host, { key: '641dd3aba6120cf4187f4503c64029eaf307dc4f', "data-open": this.internalOpen ? '' : undefined, "data-focus-trigger": this.internalOpen ? this.focusTrigger : undefined, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: '3f550349f9537b951b50a8c291f1951dd5a3b723', name: "trigger" }), h("div", { key: 'a612523f054986122638722340d8135c44a85399', class: "menu", "data-open": this.internalOpen ? '' : undefined }, h("ui-menu", { key: '0711879d09900183e938d8942abb8b9032812a5f', open: this.internalOpen }, h("slot", { key: '8e088dd20a48d8fb81126f2dd020abb886e86e22' })))));
|
|
216
216
|
}
|
|
217
217
|
static get is() { return "ui-context-menu"; }
|
|
218
218
|
static get encapsulation() { return "shadow"; }
|
|
@@ -71,7 +71,7 @@ export class UIDialog {
|
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
render() {
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: '6e88afd3a595ab0eed3d82a046ffb15e1e167cdb', "data-open": this.internalOpen ? '' : undefined, onKeyDown: this.onKeydown }, h("dialog", { key: '420e4d8de66245a5818a1284adb23a536ebcd907', ref: (el) => (this.dialogRef = el), open: this.internalOpen, "aria-label": this.label }, h("slot", { key: '10604688504f013f79b7a6ed5f9ed36bc9c6b48b' }))));
|
|
75
75
|
}
|
|
76
76
|
static get is() { return "ui-dialog"; }
|
|
77
77
|
static get encapsulation() { return "shadow"; }
|
|
@@ -85,7 +85,7 @@ export class UIDisclosure {
|
|
|
85
85
|
this.setOpen(!this.internalOpen, { reason: 'action', trigger: 'keyboard' });
|
|
86
86
|
};
|
|
87
87
|
render() {
|
|
88
|
-
return (h(Host, { key: '
|
|
88
|
+
return (h(Host, { key: '3905d2d78a2d3d4ef36b582ba0f426be8e5e0f5e' }, h("slot", { key: '18547ff56457b73319264bba981f994fb947dffb' })));
|
|
89
89
|
}
|
|
90
90
|
static get is() { return "ui-disclosure"; }
|
|
91
91
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,7 +4,7 @@ export class UIFloatingActionButton {
|
|
|
4
4
|
mobileOnly = false;
|
|
5
5
|
label = '';
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: 'c9a7d8c9b6d6608566b21621a73d939f372c830d', "data-disabled": this.disabled ? '' : undefined }, h("button", { key: '8eddccaf6be2f028bc02df967038843120045b84', type: "button", "aria-label": this.label || undefined, disabled: this.disabled }, h("slot", { key: '0ea12efb9cb8ecec06238066827a734fb3b01e1e' }))));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "ui-floating-action-button"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: grid;
|
|
3
3
|
gap: var(--ui-space-2);
|
|
4
|
+
min-inline-size: 0;
|
|
5
|
+
align-content: start;
|
|
4
6
|
color: var(--ui-text-primary);
|
|
5
7
|
}
|
|
6
8
|
|
|
@@ -10,8 +12,10 @@
|
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
::slotted([data-slot='help']) {
|
|
15
|
+
min-block-size: var(--ui-form-field-help-min-block-size, 0);
|
|
13
16
|
color: var(--ui-text-muted);
|
|
14
17
|
font-size: 0.875rem;
|
|
18
|
+
line-height: var(--ui-line-height-md);
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
::slotted([data-slot='error']),
|
|
@@ -43,7 +43,7 @@ export class UIFormField {
|
|
|
43
43
|
input.setAttribute('aria-invalid', this.invalid ? 'true' : 'false');
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: 'cdd06c6b16ac56f3547e64e7888d8766243392db', "data-invalid": this.invalid ? '' : undefined, "data-disabled": this.disabled ? '' : undefined, "data-required": this.required ? '' : undefined }, h("slot", { key: '7d545673a3485f8beee01b13ab56185b98ba8856' })));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "ui-form-field"; }
|
|
49
49
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,7 +7,7 @@ export class UIIconButton {
|
|
|
7
7
|
/** Reveals this control through a surrounding ui-affordance-scope. */
|
|
8
8
|
anticipatory = false;
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '8616d7e52a03a7a42738b11f4cabed3eb38c8640', "data-disabled": this.disabled ? '' : undefined, "data-ui-affordance": this.anticipatory ? 'button' : undefined }, h("button", { key: 'fae1362a50a0d80e2fcb3ab41f63ff21cf5d939a', type: "button", "aria-label": this.label || undefined, disabled: this.disabled }, h("slot", { key: 'e548fc504e3b26e85263fe3fc8faac0887fee16b' }))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "ui-icon-button"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: inline-flex;
|
|
3
|
+
min-inline-size: 0;
|
|
3
4
|
color: var(--ui-text-primary);
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
::slotted(input) {
|
|
7
8
|
width: 100%;
|
|
8
9
|
appearance: none;
|
|
9
|
-
|
|
10
|
+
min-block-size: var(--ui-control-min-block-size, 2.75rem);
|
|
11
|
+
border: 1px solid var(--ui-control-border, var(--ui-border-default));
|
|
10
12
|
border-radius: var(--ui-radius-2);
|
|
11
|
-
background: var(--ui-surface-default);
|
|
13
|
+
background: var(--ui-control-surface, var(--ui-surface-default));
|
|
12
14
|
color: inherit;
|
|
13
15
|
font: inherit;
|
|
14
16
|
line-height: var(--ui-line-height-md);
|
|
@@ -21,12 +23,12 @@
|
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
::slotted(input:hover:not(:focus):not(:disabled)) {
|
|
24
|
-
border-color: var(--ui-border-strong);
|
|
26
|
+
border-color: var(--ui-control-border-hover, var(--ui-border-strong));
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
::slotted(input:focus) {
|
|
28
|
-
border-color: var(--ui-focus-ring);
|
|
29
|
-
box-shadow: 0 0 0 3px var(--ui-accent-soft);
|
|
30
|
+
border-color: var(--ui-control-focus, var(--ui-focus-ring));
|
|
31
|
+
box-shadow: 0 0 0 3px var(--ui-control-focus-halo, var(--ui-accent-soft));
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
:host([data-invalid='true'])::slotted(input),
|
|
@@ -35,7 +37,7 @@
|
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
::slotted(input:disabled) {
|
|
38
|
-
background: var(--ui-surface-muted);
|
|
40
|
+
background: var(--ui-control-surface-disabled, var(--ui-surface-muted));
|
|
39
41
|
color: var(--ui-text-muted);
|
|
40
42
|
cursor: not-allowed;
|
|
41
43
|
}
|
|
@@ -2,7 +2,7 @@ import { Host, h } from "@stencil/core";
|
|
|
2
2
|
import { eventToTrigger, dispatchDetail } from "../../utils/events";
|
|
3
3
|
export class UIInput {
|
|
4
4
|
host;
|
|
5
|
-
value
|
|
5
|
+
value;
|
|
6
6
|
defaultValue = '';
|
|
7
7
|
disabled = false;
|
|
8
8
|
invalid = false;
|
|
@@ -10,14 +10,19 @@ export class UIInput {
|
|
|
10
10
|
internalValue = '';
|
|
11
11
|
slotRef;
|
|
12
12
|
syncFromProp() {
|
|
13
|
-
this.
|
|
13
|
+
if (this.value !== undefined)
|
|
14
|
+
this.internalValue = this.value;
|
|
14
15
|
}
|
|
15
16
|
syncToInput() {
|
|
16
17
|
const input = this.getInput();
|
|
17
18
|
if (!input)
|
|
18
19
|
return;
|
|
19
20
|
this.host.dataset.invalid = this.invalid ? 'true' : '';
|
|
20
|
-
|
|
21
|
+
// When the host has no value prop, the slotted native control is
|
|
22
|
+
// intentionally uncontrolled. Frameworks such as Vue can then own its
|
|
23
|
+
// value without Looma resetting it during hydration or unrelated updates.
|
|
24
|
+
if (this.value !== undefined)
|
|
25
|
+
input.value = this.internalValue;
|
|
21
26
|
input.defaultValue = this.defaultValue;
|
|
22
27
|
input.disabled = this.disabled;
|
|
23
28
|
input.readOnly = this.readOnly;
|
|
@@ -65,7 +70,7 @@ export class UIInput {
|
|
|
65
70
|
});
|
|
66
71
|
};
|
|
67
72
|
render() {
|
|
68
|
-
return (h(Host, { key: '
|
|
73
|
+
return (h(Host, { key: 'a2f2c108144a7acae0dfb1bef6ea1f38a4dcca9c', "data-invalid": this.invalid ? '' : undefined }, h("slot", { key: '04284765a12089a8a1045056d72551a3494f00fc', ref: (el) => (this.slotRef = el) })));
|
|
69
74
|
}
|
|
70
75
|
static get is() { return "ui-input"; }
|
|
71
76
|
static get encapsulation() { return "shadow"; }
|
|
@@ -90,7 +95,7 @@ export class UIInput {
|
|
|
90
95
|
"references": {}
|
|
91
96
|
},
|
|
92
97
|
"required": false,
|
|
93
|
-
"optional":
|
|
98
|
+
"optional": true,
|
|
94
99
|
"docs": {
|
|
95
100
|
"tags": [],
|
|
96
101
|
"text": ""
|
|
@@ -98,8 +103,7 @@ export class UIInput {
|
|
|
98
103
|
"getter": false,
|
|
99
104
|
"setter": false,
|
|
100
105
|
"reflect": false,
|
|
101
|
-
"attribute": "value"
|
|
102
|
-
"defaultValue": "''"
|
|
106
|
+
"attribute": "value"
|
|
103
107
|
},
|
|
104
108
|
"defaultValue": {
|
|
105
109
|
"type": "string",
|
|
@@ -148,7 +148,7 @@ export class UIMenu {
|
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
150
|
render() {
|
|
151
|
-
return (h(Host, { key: '
|
|
151
|
+
return (h(Host, { key: '25ae79e914820dfc470fa03d8c843646c3c060d9', role: "menu", "aria-orientation": "vertical", "data-open": this.internalOpen ? '' : undefined }, h("slot", { key: 'b3a8b130e55610d948bc3e4603dede59dd560d05' })));
|
|
152
152
|
}
|
|
153
153
|
static get is() { return "ui-menu"; }
|
|
154
154
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3,7 +3,7 @@ export class UIMenuItem {
|
|
|
3
3
|
disabled = false;
|
|
4
4
|
value = '';
|
|
5
5
|
render() {
|
|
6
|
-
return (h(Host, { key: '
|
|
6
|
+
return (h(Host, { key: 'ebd7c5aa5c8fdce2d2349aef7f1a4505b9190852', role: "menuitem", tabIndex: this.disabled ? -1 : 0, "aria-disabled": this.disabled ? 'true' : undefined, "data-value": this.value || undefined }, h("slot", { key: '7b55a8545034b055f8cbd047a0f16ea729af097e' })));
|
|
7
7
|
}
|
|
8
8
|
static get is() { return "ui-menu-item"; }
|
|
9
9
|
static get encapsulation() { return "shadow"; }
|
|
@@ -102,7 +102,7 @@ export class UIPopover {
|
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
render() {
|
|
105
|
-
return (h(Host, { key: '
|
|
105
|
+
return (h(Host, { key: 'cd957cb9fd5d1c05da7729a16d4cb229bc1deffa', "data-open": this.internalOpen ? '' : undefined, onKeyDown: this.onKeydown }, h("slot", { key: 'd14960a1471948120f7173e18adae8d86e4fabb7' })));
|
|
106
106
|
}
|
|
107
107
|
static get is() { return "ui-popover"; }
|
|
108
108
|
static get encapsulation() { return "shadow"; }
|
|
@@ -14,7 +14,7 @@ export class UIRadio {
|
|
|
14
14
|
const input = this.getInput();
|
|
15
15
|
if (!input)
|
|
16
16
|
return;
|
|
17
|
-
this.host.
|
|
17
|
+
this.host.toggleAttribute('data-disabled', this.disabled);
|
|
18
18
|
input.checked = this.checked;
|
|
19
19
|
input.disabled = this.disabled;
|
|
20
20
|
input.name = this.name;
|
|
@@ -53,7 +53,7 @@ export class UIRadio {
|
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
55
|
render() {
|
|
56
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: '898869b84429366e43c075723e884f34da6fc6df', role: "radio", "aria-checked": String(this.checked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? '' : undefined }, h("slot", { key: '3f3b881175f25d439807ec9f8f0dd59a1acd6a90', ref: (el) => (this.slotRef = el) })));
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "ui-radio"; }
|
|
59
59
|
static get encapsulation() { return "shadow"; }
|
|
@@ -102,7 +102,7 @@ export class UIRadioGroup {
|
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
render() {
|
|
105
|
-
return (h(Host, { key: '
|
|
105
|
+
return (h(Host, { key: 'e80e01600d499d1b8e3410060433dac2bb8cf38a', role: "radiogroup", "aria-orientation": this.orientation, "data-orientation": this.orientation, "data-disabled": this.disabled ? '' : undefined }, h("slot", { key: 'e60dcfa1b174b1a4c9092567e6ec4d9f5bcd9ffe' })));
|
|
106
106
|
}
|
|
107
107
|
static get is() { return "ui-radio-group"; }
|
|
108
108
|
static get encapsulation() { return "shadow"; }
|
|
@@ -31,7 +31,7 @@ export class UISearchResultRow {
|
|
|
31
31
|
this.hasTrailing = slotHasContent(this.trailingSlot);
|
|
32
32
|
};
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '8ef897782b50f1ecb129a51a25631d3d2bafe1e3' }, h("button", { key: '5b4fb4ac4968551a191e80bde7b991391d931220', class: "search-result-row", type: "button", disabled: this.disabled, part: "button" }, h("span", { key: '5f5988d87bcf754d8a521e19e0e2a490dd868bd2', class: "search-result-row__leading", part: "leading", hidden: !this.hasLeading }, h("slot", { key: 'a7671c75c28d71ab843dcbb1fcdd9f4d0e0f7361', name: "leading", ref: (el) => (this.leadingSlot = el), onSlotchange: this.syncSlots })), h("span", { key: '4ed60057e10ade9d7771812ad28aa25a017d34d8', class: "search-result-row__content", part: "content" }, h("span", { key: '37fa74ef4980ffd0b576ff824532d1267420461c', class: "search-result-row__title", part: "title" }, h("slot", { key: '187df950b39702723fa456b09e220e2b7587f00a', name: "title" })), h("span", { key: '6d2476c57d7c9c7530c3796a723f47f5f4859d71', class: "search-result-row__meta", part: "meta", hidden: !this.hasMeta }, h("slot", { key: 'd53329dd6865bbda005b0d25a2b9bc7b7a597452', name: "meta", ref: (el) => (this.metaSlot = el), onSlotchange: this.syncSlots })), h("span", { key: '8846c9669c0f65a739b770f41a93ddd4bef3f6bd', class: "search-result-row__excerpt", part: "excerpt", hidden: !this.hasExcerpt }, h("slot", { key: 'b63f70371538901aaff481a9e524bf817883cee6', name: "excerpt", ref: (el) => (this.excerptSlot = el), onSlotchange: this.syncSlots }))), h("span", { key: '1e8f94c3d83c3f649595c2843522b0973590a8d5', class: "search-result-row__trailing", part: "trailing", hidden: !this.hasTrailing }, h("slot", { key: 'cfba9301ad97c1130a01f78c16052fc26e249f4b', name: "trailing", ref: (el) => (this.trailingSlot = el), onSlotchange: this.syncSlots })))));
|
|
35
35
|
}
|
|
36
36
|
static get is() { return "ui-search-result-row"; }
|
|
37
37
|
static get encapsulation() { return "shadow"; }
|
|
@@ -23,7 +23,7 @@ export class UISearchShell {
|
|
|
23
23
|
this.hasFooter = slotHasContent(this.footerSlot);
|
|
24
24
|
};
|
|
25
25
|
render() {
|
|
26
|
-
return (h("div", { key: '
|
|
26
|
+
return (h("div", { key: '2a09e1ee81d04c0af5420887a9fa0dfb8057040c', class: "search-shell", part: "base" }, h("slot", { key: '9124af2e3e73b686a73b11c7fe8c9d40986e98c1', name: "backdrop" }), h("div", { key: 'cec39a8cbbfe99b7bbeb37ce32655a88cee2bec3', class: "search-shell__panel", part: "panel" }, h("div", { key: '8168eda720e031daf350800ac48dcf445be0c417', class: "search-shell__search", part: "search" }, h("slot", { key: 'b220c9670a6a53cd93fa434dc97dc9d2582bec08', name: "search" })), h("div", { key: '24386da67dd8ab5e865519e5b0b70fe9c8924010', class: "search-shell__status", part: "status", hidden: !this.hasStatus }, h("slot", { key: '7a0dfada13aca3275961667dadc9623729fbf644', name: "status", ref: (el) => (this.statusSlot = el), onSlotchange: this.syncSlots })), h("div", { key: 'e06b7da6219c7a71d69662c5bdcc24e6baa52aa9', class: "search-shell__body", part: "body" }, h("slot", { key: 'fabdea16cf443b57a826fc748b24342ff214b918', name: "body" })), h("div", { key: 'd38662a77f19fd59315b1882cda0a55680cc5a0b', class: "search-shell__footer", part: "footer", hidden: !this.hasFooter }, h("slot", { key: '56eb386e22ae033939cdbdf3c6b6edf68594ceb5', name: "footer", ref: (el) => (this.footerSlot = el), onSlotchange: this.syncSlots })))));
|
|
27
27
|
}
|
|
28
28
|
static get is() { return "ui-search-shell"; }
|
|
29
29
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: inline-flex;
|
|
3
|
+
min-inline-size: 0;
|
|
3
4
|
color: var(--ui-text-primary);
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
::slotted(select) {
|
|
7
8
|
width: 100%;
|
|
8
9
|
appearance: none;
|
|
9
|
-
|
|
10
|
+
min-block-size: var(--ui-control-min-block-size, 2.75rem);
|
|
11
|
+
border: 1px solid var(--ui-control-border, var(--ui-border-default));
|
|
10
12
|
border-radius: var(--ui-radius-2);
|
|
11
|
-
background-color: var(--ui-surface-default);
|
|
13
|
+
background-color: var(--ui-control-surface, var(--ui-surface-default));
|
|
12
14
|
color: inherit;
|
|
13
15
|
font: inherit;
|
|
14
16
|
line-height: var(--ui-line-height-md);
|
|
@@ -31,12 +33,12 @@
|
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
::slotted(select:hover:not(:focus):not(:disabled)) {
|
|
34
|
-
border-color: var(--ui-border-strong);
|
|
36
|
+
border-color: var(--ui-control-border-hover, var(--ui-border-strong));
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
::slotted(select:focus) {
|
|
38
|
-
border-color: var(--ui-focus-ring);
|
|
39
|
-
box-shadow: 0 0 0 3px var(--ui-accent-soft);
|
|
40
|
+
border-color: var(--ui-control-focus, var(--ui-focus-ring));
|
|
41
|
+
box-shadow: 0 0 0 3px var(--ui-control-focus-halo, var(--ui-accent-soft));
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
:host([data-invalid='true'])::slotted(select),
|
|
@@ -45,7 +47,7 @@
|
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
::slotted(select:disabled) {
|
|
48
|
-
background-color: var(--ui-surface-muted);
|
|
50
|
+
background-color: var(--ui-control-surface-disabled, var(--ui-surface-muted));
|
|
49
51
|
color: var(--ui-text-muted);
|
|
50
52
|
cursor: not-allowed;
|
|
51
53
|
}
|
|
@@ -2,22 +2,30 @@ import { Host, h } from "@stencil/core";
|
|
|
2
2
|
import { dispatchDetail, eventToTrigger } from "../../utils/events";
|
|
3
3
|
export class UISelect {
|
|
4
4
|
host;
|
|
5
|
-
value
|
|
6
|
-
defaultValue
|
|
5
|
+
value;
|
|
6
|
+
defaultValue;
|
|
7
7
|
disabled = false;
|
|
8
8
|
invalid = false;
|
|
9
9
|
required = false;
|
|
10
10
|
internalValue = '';
|
|
11
11
|
slotRef;
|
|
12
|
+
initialized = false;
|
|
12
13
|
syncFromProp() {
|
|
13
|
-
this.
|
|
14
|
+
if (this.value !== undefined)
|
|
15
|
+
this.internalValue = this.value;
|
|
14
16
|
}
|
|
15
17
|
syncToSelect() {
|
|
16
18
|
const select = this.getSelect();
|
|
17
19
|
if (!select)
|
|
18
20
|
return;
|
|
19
21
|
this.host.dataset.invalid = this.invalid ? 'true' : '';
|
|
20
|
-
select
|
|
22
|
+
// A native select automatically selects its first option. Apply the host
|
|
23
|
+
// default once regardless, then leave subsequent native/framework edits alone.
|
|
24
|
+
if (this.value !== undefined)
|
|
25
|
+
select.value = this.internalValue;
|
|
26
|
+
else if (!this.initialized && this.defaultValue !== undefined)
|
|
27
|
+
select.value = this.defaultValue;
|
|
28
|
+
this.initialized = true;
|
|
21
29
|
select.disabled = this.disabled;
|
|
22
30
|
select.required = this.required;
|
|
23
31
|
select.setAttribute('aria-invalid', this.invalid ? 'true' : 'false');
|
|
@@ -64,7 +72,7 @@ export class UISelect {
|
|
|
64
72
|
});
|
|
65
73
|
};
|
|
66
74
|
render() {
|
|
67
|
-
return (h(Host, { key: '
|
|
75
|
+
return (h(Host, { key: '5ac54353f467b70e94fce0ae661dc86c305befe7', "data-invalid": this.invalid ? '' : undefined }, h("slot", { key: '1386f3e4912720ab597f4567112e9c8b4166bcc6', ref: (el) => (this.slotRef = el) })));
|
|
68
76
|
}
|
|
69
77
|
static get is() { return "ui-select"; }
|
|
70
78
|
static get encapsulation() { return "shadow"; }
|
|
@@ -89,7 +97,7 @@ export class UISelect {
|
|
|
89
97
|
"references": {}
|
|
90
98
|
},
|
|
91
99
|
"required": false,
|
|
92
|
-
"optional":
|
|
100
|
+
"optional": true,
|
|
93
101
|
"docs": {
|
|
94
102
|
"tags": [],
|
|
95
103
|
"text": ""
|
|
@@ -97,8 +105,7 @@ export class UISelect {
|
|
|
97
105
|
"getter": false,
|
|
98
106
|
"setter": false,
|
|
99
107
|
"reflect": false,
|
|
100
|
-
"attribute": "value"
|
|
101
|
-
"defaultValue": "''"
|
|
108
|
+
"attribute": "value"
|
|
102
109
|
},
|
|
103
110
|
"defaultValue": {
|
|
104
111
|
"type": "string",
|
|
@@ -109,7 +116,7 @@ export class UISelect {
|
|
|
109
116
|
"references": {}
|
|
110
117
|
},
|
|
111
118
|
"required": false,
|
|
112
|
-
"optional":
|
|
119
|
+
"optional": true,
|
|
113
120
|
"docs": {
|
|
114
121
|
"tags": [],
|
|
115
122
|
"text": ""
|
|
@@ -117,8 +124,7 @@ export class UISelect {
|
|
|
117
124
|
"getter": false,
|
|
118
125
|
"setter": false,
|
|
119
126
|
"reflect": false,
|
|
120
|
-
"attribute": "default-value"
|
|
121
|
-
"defaultValue": "''"
|
|
127
|
+
"attribute": "default-value"
|
|
122
128
|
},
|
|
123
129
|
"disabled": {
|
|
124
130
|
"type": "boolean",
|
|
@@ -37,14 +37,14 @@ export class UISwitch {
|
|
|
37
37
|
this.toggle('pointer');
|
|
38
38
|
};
|
|
39
39
|
render() {
|
|
40
|
-
return (h(Host, { key: '
|
|
40
|
+
return (h(Host, { key: '14205d2856f8fb49b72d69d40f10ac1473a80c04', role: "switch", "aria-checked": String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? '' : undefined, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.onKeydown, onClick: this.onClick }, h("input", { key: '974f8e487c8bf9196c05420e1817139dd6b4138c', type: "checkbox", checked: this.internalChecked, disabled: this.disabled, required: this.required, value: this.value, "aria-hidden": "true", tabIndex: -1, onChange: (e) => {
|
|
41
41
|
this.internalChecked = e.target.checked;
|
|
42
42
|
dispatchDetail(this.host, 'change', {
|
|
43
43
|
checked: this.internalChecked,
|
|
44
44
|
value: this.value,
|
|
45
45
|
trigger: 'pointer',
|
|
46
46
|
});
|
|
47
|
-
} }), h("slot", { key: '
|
|
47
|
+
} }), h("slot", { key: 'd1cd89aa2d5312cff8845364cdee64821977cb44' })));
|
|
48
48
|
}
|
|
49
49
|
static get is() { return "ui-switch"; }
|
|
50
50
|
static get encapsulation() { return "shadow"; }
|
|
@@ -91,7 +91,7 @@ export class UITabs {
|
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
render() {
|
|
94
|
-
return (h(Host, { key: '
|
|
94
|
+
return (h(Host, { key: 'ca8671f06914de2bd6b412caf11e385d67ae722b', orientation: this.orientation, "data-orientation": this.orientation }, h("slot", { key: '49beb3783c8f6a330d25164c82933c2bf6345b1e' })));
|
|
95
95
|
}
|
|
96
96
|
static get is() { return "ui-tabs"; }
|
|
97
97
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: inline-flex;
|
|
3
|
+
min-inline-size: 0;
|
|
3
4
|
color: var(--ui-text-primary);
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
::slotted(textarea) {
|
|
7
8
|
width: 100%;
|
|
8
9
|
appearance: none;
|
|
9
|
-
border: 1px solid var(--ui-border-default);
|
|
10
|
+
border: 1px solid var(--ui-control-border, var(--ui-border-default));
|
|
10
11
|
border-radius: var(--ui-radius-2);
|
|
11
|
-
background: var(--ui-surface-default);
|
|
12
|
+
background: var(--ui-control-surface, var(--ui-surface-default));
|
|
12
13
|
color: inherit;
|
|
13
14
|
font: inherit;
|
|
14
15
|
line-height: var(--ui-line-height-md);
|
|
@@ -23,12 +24,12 @@
|
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
::slotted(textarea:hover:not(:focus):not(:disabled)) {
|
|
26
|
-
border-color: var(--ui-border-strong);
|
|
27
|
+
border-color: var(--ui-control-border-hover, var(--ui-border-strong));
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
::slotted(textarea:focus) {
|
|
30
|
-
border-color: var(--ui-focus-ring);
|
|
31
|
-
box-shadow: 0 0 0 3px var(--ui-accent-soft);
|
|
31
|
+
border-color: var(--ui-control-focus, var(--ui-focus-ring));
|
|
32
|
+
box-shadow: 0 0 0 3px var(--ui-control-focus-halo, var(--ui-accent-soft));
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
:host([data-invalid='true'])::slotted(textarea),
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
::slotted(textarea:disabled) {
|
|
40
|
-
background: var(--ui-surface-muted);
|
|
41
|
+
background: var(--ui-control-surface-disabled, var(--ui-surface-muted));
|
|
41
42
|
color: var(--ui-text-muted);
|
|
42
43
|
cursor: not-allowed;
|
|
43
44
|
}
|
|
@@ -2,7 +2,7 @@ import { Host, h } from "@stencil/core";
|
|
|
2
2
|
import { dispatchDetail, eventToTrigger } from "../../utils/events";
|
|
3
3
|
export class UITextarea {
|
|
4
4
|
host;
|
|
5
|
-
value
|
|
5
|
+
value;
|
|
6
6
|
defaultValue = '';
|
|
7
7
|
disabled = false;
|
|
8
8
|
invalid = false;
|
|
@@ -11,14 +11,18 @@ export class UITextarea {
|
|
|
11
11
|
internalValue = '';
|
|
12
12
|
slotRef;
|
|
13
13
|
syncFromProp() {
|
|
14
|
-
this.
|
|
14
|
+
if (this.value !== undefined)
|
|
15
|
+
this.internalValue = this.value;
|
|
15
16
|
}
|
|
16
17
|
syncToTextarea() {
|
|
17
18
|
const textarea = this.getTextarea();
|
|
18
19
|
if (!textarea)
|
|
19
20
|
return;
|
|
20
21
|
this.host.dataset.invalid = this.invalid ? 'true' : '';
|
|
21
|
-
|
|
22
|
+
// An omitted host value leaves the slotted textarea under framework or
|
|
23
|
+
// native-form control instead of resetting it during component updates.
|
|
24
|
+
if (this.value !== undefined)
|
|
25
|
+
textarea.value = this.internalValue;
|
|
22
26
|
textarea.defaultValue = this.defaultValue;
|
|
23
27
|
textarea.disabled = this.disabled;
|
|
24
28
|
textarea.readOnly = this.readOnly;
|
|
@@ -67,7 +71,7 @@ export class UITextarea {
|
|
|
67
71
|
});
|
|
68
72
|
};
|
|
69
73
|
render() {
|
|
70
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: '9ccc0464bca55b3364645ea90df3890f9ed9d697', "data-invalid": this.invalid ? '' : undefined }, h("slot", { key: '81c4df31064d4dcd2b2e27dfcf3141cc9f18f54e', ref: (el) => (this.slotRef = el) })));
|
|
71
75
|
}
|
|
72
76
|
static get is() { return "ui-textarea"; }
|
|
73
77
|
static get encapsulation() { return "shadow"; }
|
|
@@ -92,7 +96,7 @@ export class UITextarea {
|
|
|
92
96
|
"references": {}
|
|
93
97
|
},
|
|
94
98
|
"required": false,
|
|
95
|
-
"optional":
|
|
99
|
+
"optional": true,
|
|
96
100
|
"docs": {
|
|
97
101
|
"tags": [],
|
|
98
102
|
"text": ""
|
|
@@ -100,8 +104,7 @@ export class UITextarea {
|
|
|
100
104
|
"getter": false,
|
|
101
105
|
"setter": false,
|
|
102
106
|
"reflect": false,
|
|
103
|
-
"attribute": "value"
|
|
104
|
-
"defaultValue": "''"
|
|
107
|
+
"attribute": "value"
|
|
105
108
|
},
|
|
106
109
|
"defaultValue": {
|
|
107
110
|
"type": "string",
|
|
@@ -59,7 +59,7 @@ export class UIToastRegion {
|
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
render() {
|
|
62
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: '9ec1cc51ecc4e7a256be5d89a09a10788e46db53', role: "region", "aria-label": "Notifications", "data-open": this.internalOpen ? '' : undefined }, h("slot", { key: '7b08656f3745a02f8e9f0935e47d6f2cffd88f9b' })));
|
|
63
63
|
}
|
|
64
64
|
static get is() { return "ui-toast-region"; }
|
|
65
65
|
static get encapsulation() { return "shadow"; }
|