@threadlabs/looma 0.1.1 → 0.1.3
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-YK4MTZGJ.js → chunk-UDP2LUZ2.js} +26 -26
- package/dist/cjs/ui-button.cjs.entry.js +3 -4
- package/dist/collection/components/ui-button/ui-button.css +22 -12
- package/dist/collection/components/ui-button/ui-button.js +7 -7
- package/dist/components/ui-button.js +1 -1
- package/dist/esm/ui-button.entry.js +3 -4
- package/dist/index.cjs +3 -4
- package/dist/index.js +1 -1
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/p-5717a4c4.entry.js +1 -0
- package/dist/types/components/ui-button/ui-button.d.ts +1 -1
- package/dist/types/components.d.ts +9 -3
- package/dist/{ui-avatar-group.entry-BZGXBOSE.js → ui-avatar-group.entry-VDMJ7TD3.js} +1 -1
- package/dist/{ui-avatar.entry-S2O2W5SA.js → ui-avatar.entry-OV25NM66.js} +1 -1
- package/dist/{ui-badge.entry-CVJDISCR.js → ui-badge.entry-MX66BWUJ.js} +1 -1
- package/dist/ui-button.entry-UCVR22M7.js +71 -0
- package/dist/{ui-checkbox.entry-5RA2CB43.js → ui-checkbox.entry-KL47EXSZ.js} +1 -1
- package/dist/{ui-context-menu.entry-UUOCT75F.js → ui-context-menu.entry-677NGG3Q.js} +1 -1
- package/dist/{ui-dialog.entry-OEPJTEES.js → ui-dialog.entry-WZIIRD4O.js} +1 -1
- package/dist/{ui-disclosure.entry-LRRISGUD.js → ui-disclosure.entry-Z7LSLWFL.js} +1 -1
- package/dist/{ui-floating-action-button.entry-7TSAZRXP.js → ui-floating-action-button.entry-ZDMXBJVC.js} +1 -1
- package/dist/{ui-form-field.entry-73YOVICF.js → ui-form-field.entry-DZSNUUXG.js} +1 -1
- package/dist/{ui-icon-button.entry-MNXGPG36.js → ui-icon-button.entry-QKEQNOKJ.js} +1 -1
- package/dist/{ui-input.entry-UWRVAOSW.js → ui-input.entry-BI74QOJP.js} +1 -1
- package/dist/{ui-menu-item.entry-5AOJO5MP.js → ui-menu-item.entry-GB462MWK.js} +1 -1
- package/dist/{ui-menu.entry-YDS6UMB5.js → ui-menu.entry-RUJ5XZ7Y.js} +1 -1
- package/dist/{ui-popover.entry-PGWDCQIX.js → ui-popover.entry-QW26NSSB.js} +1 -1
- package/dist/{ui-radio-group.entry-RHP5GNWU.js → ui-radio-group.entry-LC2BSS35.js} +1 -1
- package/dist/{ui-radio.entry-5WRWPSTK.js → ui-radio.entry-2RQD4K5L.js} +1 -1
- package/dist/{ui-search-result-row.entry-IKJB2SJJ.js → ui-search-result-row.entry-BAHYKCAZ.js} +1 -1
- package/dist/{ui-search-shell.entry-ZIWF4ZHH.js → ui-search-shell.entry-PW2AF6HX.js} +1 -1
- package/dist/{ui-select.entry-N5TIKHR7.js → ui-select.entry-NHWCGJQH.js} +1 -1
- package/dist/{ui-switch.entry-WUSZTXIR.js → ui-switch.entry-76KOUHCH.js} +1 -1
- package/dist/{ui-tabs.entry-UFAVAQIF.js → ui-tabs.entry-5PZGTNKM.js} +1 -1
- package/dist/{ui-textarea.entry-BYT47RAQ.js → ui-textarea.entry-IQHQHO3L.js} +1 -1
- package/dist/{ui-toast-region.entry-6UYR3ZU2.js → ui-toast-region.entry-2LT2RTPJ.js} +1 -1
- package/dist/{ui-tooltip.entry-YS7UX4FS.js → ui-tooltip.entry-42V5BSUT.js} +1 -1
- package/dist/{ui-top-bar.entry-V27H6NFO.js → ui-top-bar.entry-UZTSRNFZ.js} +1 -1
- package/editor/{chunk-NOOV344H.js → chunk-CWCXYQMT.js} +32 -4
- package/editor/index.js +1 -1
- package/editor/ui.js +1 -1
- package/editor.css +68 -24
- package/package.json +1 -1
- package/styles.css +18 -13
- package/theme-dark.css +6 -6
- package/theme-light.css +3 -3
- package/tokens.css +16 -16
- package/vue/{chunk-J4UBEIIL.js → chunk-P72L3GWE.js} +1 -0
- package/vue/editor/index.js +1 -1
- package/vue/index.js +1 -1
- package/dist/looma/p-fa4659c4.entry.js +0 -1
- package/dist/ui-button.entry-LNJBEJFE.js +0 -72
package/tokens.css
CHANGED
|
@@ -86,16 +86,16 @@
|
|
|
86
86
|
--ui-border-subtle: #ecece8;
|
|
87
87
|
--ui-border-default: #e4e4e0;
|
|
88
88
|
--ui-border-strong: #c8c8c4;
|
|
89
|
-
--ui-focus-ring: #
|
|
89
|
+
--ui-focus-ring: #5b55d6;
|
|
90
90
|
|
|
91
|
-
--ui-accent-solid: #
|
|
92
|
-
--ui-accent-hover: #
|
|
93
|
-
--ui-accent-active: #
|
|
94
|
-
--ui-accent-soft: #
|
|
91
|
+
--ui-accent-solid: #5b55d6;
|
|
92
|
+
--ui-accent-hover: #4b45bd;
|
|
93
|
+
--ui-accent-active: #3e399e;
|
|
94
|
+
--ui-accent-soft: #efeffc;
|
|
95
95
|
|
|
96
|
-
--ui-danger-solid: #
|
|
97
|
-
--ui-danger-hover: #
|
|
98
|
-
--ui-danger-soft: #
|
|
96
|
+
--ui-danger-solid: #b4233f;
|
|
97
|
+
--ui-danger-hover: #941d35;
|
|
98
|
+
--ui-danger-soft: #fceef1;
|
|
99
99
|
--ui-success-solid: #007a33;
|
|
100
100
|
--ui-success-soft: #edf7f1;
|
|
101
101
|
--ui-warning-solid: #cc8800;
|
|
@@ -120,16 +120,16 @@
|
|
|
120
120
|
--ui-border-subtle: oklch(0.9 0.01 250);
|
|
121
121
|
--ui-border-default: oklch(0.84 0.01 250);
|
|
122
122
|
--ui-border-strong: oklch(0.7 0.02 250);
|
|
123
|
-
--ui-focus-ring: oklch(0.
|
|
123
|
+
--ui-focus-ring: oklch(0.57 0.17 285);
|
|
124
124
|
|
|
125
|
-
--ui-accent-solid: oklch(0.
|
|
126
|
-
--ui-accent-hover: oklch(0.
|
|
127
|
-
--ui-accent-active: oklch(0.
|
|
128
|
-
--ui-accent-soft: oklch(0.
|
|
125
|
+
--ui-accent-solid: oklch(0.57 0.17 285);
|
|
126
|
+
--ui-accent-hover: oklch(0.52 0.18 285);
|
|
127
|
+
--ui-accent-active: oklch(0.46 0.16 285);
|
|
128
|
+
--ui-accent-soft: oklch(0.96 0.025 285);
|
|
129
129
|
|
|
130
|
-
--ui-danger-solid: oklch(0.
|
|
131
|
-
--ui-danger-hover: oklch(0.
|
|
132
|
-
--ui-danger-soft: oklch(0.97 0.
|
|
130
|
+
--ui-danger-solid: oklch(0.5 0.17 18);
|
|
131
|
+
--ui-danger-hover: oklch(0.44 0.16 18);
|
|
132
|
+
--ui-danger-soft: oklch(0.97 0.025 18);
|
|
133
133
|
--ui-success-solid: oklch(0.5 0.15 145);
|
|
134
134
|
--ui-success-soft: oklch(0.96 0.03 145);
|
|
135
135
|
--ui-warning-solid: oklch(0.7 0.15 85);
|
|
@@ -65,6 +65,7 @@ function createAdapterComponent(tagName, displayName, additionalEventBindings =
|
|
|
65
65
|
return h(
|
|
66
66
|
tagName,
|
|
67
67
|
{
|
|
68
|
+
"data-allow-mismatch": forwardedAttrs["data-allow-mismatch"] ?? "class",
|
|
68
69
|
...forwardedAttrs,
|
|
69
70
|
ref: (value) => {
|
|
70
71
|
elementRef.value = toHTMLElement(value);
|
package/vue/editor/index.js
CHANGED
package/vue/index.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,g as o,h as a,H as r}from"./p-CEeiinfk.js";import{i as e}from"./p-JwSoedEO.js";const i=class{constructor(o){t(this,o)}get host(){return o(this)}variant;size;disabled=!1;slotRef;syncToButton(){const t=this.getButton();t&&(this.host.dataset.variant=this.variant||"",this.host.dataset.size=this.size||"",this.host.dataset.disabled=this.disabled?"true":"",t.disabled=this.disabled)}componentDidLoad(){this.slotRef?.addEventListener("slotchange",(()=>this.syncToButton())),this.syncToButton()}componentDidUpdate(){this.syncToButton()}getButton(){const t=this.host.shadowRoot?.querySelector("slot");return(t?.assignedElements()??Array.from(this.host.children)).find((t=>"BUTTON"===t.tagName))??null}onKeydown=t=>{this.getButton()||this.disabled||!e(t)||(t.preventDefault(),this.host.click())};render(){return a(r,{key:"01011aa13228b9e8d10ed11b99c95ef1df91326d","data-variant":this.variant||void 0,"data-size":this.size||void 0,"data-disabled":this.disabled?"":void 0,onKeyDown:this.onKeydown},a("slot",{key:"2bf0274d2732ea46fdf016a46d85bbe6e0d96bba",ref:t=>this.slotRef=t}))}static get watchers(){return{variant:[{syncToButton:0}],size:[{syncToButton:0}],disabled:[{syncToButton:0}]}}};i.style=":host{display:inline-flex;vertical-align:middle;color:var(--ui-text-primary)}::slotted(button){appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm'])::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg'])::slotted(button){padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:var(--ui-border-strong)}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([data-variant='solid'])::slotted(button){border-color:var(--ui-accent-solid);background:var(--ui-accent-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-shadow-xs)}:host([data-variant='solid'])::slotted(button:hover:enabled){background:var(--ui-accent-hover);border-color:var(--ui-accent-hover);box-shadow:var(--ui-shadow-sm)}:host([data-variant='solid'])::slotted(button:active:enabled){background:var(--ui-accent-active);border-color:var(--ui-accent-active);box-shadow:none}:host([data-variant='destructive'])::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-shadow-xs)}:host([data-variant='destructive'])::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm)}:host([data-variant='ghost'])::slotted(button){border-color:transparent;background:transparent}:host([data-variant='ghost'])::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([data-variant='ghost'])::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(button:disabled),:host([data-disabled]){opacity:0.6;cursor:not-allowed}";export{i as ui_button}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isActivationKey
|
|
3
|
-
} from "./chunk-UL7UIUJZ.js";
|
|
4
|
-
import {
|
|
5
|
-
Host,
|
|
6
|
-
getElement,
|
|
7
|
-
h,
|
|
8
|
-
registerInstance
|
|
9
|
-
} from "./chunk-YK4MTZGJ.js";
|
|
10
|
-
|
|
11
|
-
// dist/esm/ui-button.entry.js
|
|
12
|
-
var uiButtonCss = () => `:host{display:inline-flex;vertical-align:middle;color:var(--ui-text-primary)}::slotted(button){appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm'])::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg'])::slotted(button){padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:var(--ui-border-strong)}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([data-variant='solid'])::slotted(button){border-color:var(--ui-accent-solid);background:var(--ui-accent-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-shadow-xs)}:host([data-variant='solid'])::slotted(button:hover:enabled){background:var(--ui-accent-hover);border-color:var(--ui-accent-hover);box-shadow:var(--ui-shadow-sm)}:host([data-variant='solid'])::slotted(button:active:enabled){background:var(--ui-accent-active);border-color:var(--ui-accent-active);box-shadow:none}:host([data-variant='destructive'])::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-shadow-xs)}:host([data-variant='destructive'])::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm)}:host([data-variant='ghost'])::slotted(button){border-color:transparent;background:transparent}:host([data-variant='ghost'])::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([data-variant='ghost'])::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(button:disabled),:host([data-disabled]){opacity:0.6;cursor:not-allowed}`;
|
|
13
|
-
var UIButton = class {
|
|
14
|
-
constructor(hostRef) {
|
|
15
|
-
registerInstance(this, hostRef);
|
|
16
|
-
}
|
|
17
|
-
get host() {
|
|
18
|
-
return getElement(this);
|
|
19
|
-
}
|
|
20
|
-
variant;
|
|
21
|
-
size;
|
|
22
|
-
disabled = false;
|
|
23
|
-
slotRef;
|
|
24
|
-
syncToButton() {
|
|
25
|
-
const btn = this.getButton();
|
|
26
|
-
if (!btn)
|
|
27
|
-
return;
|
|
28
|
-
this.host.dataset.variant = this.variant || "";
|
|
29
|
-
this.host.dataset.size = this.size || "";
|
|
30
|
-
this.host.dataset.disabled = this.disabled ? "true" : "";
|
|
31
|
-
btn.disabled = this.disabled;
|
|
32
|
-
}
|
|
33
|
-
componentDidLoad() {
|
|
34
|
-
this.slotRef?.addEventListener("slotchange", () => this.syncToButton());
|
|
35
|
-
this.syncToButton();
|
|
36
|
-
}
|
|
37
|
-
componentDidUpdate() {
|
|
38
|
-
this.syncToButton();
|
|
39
|
-
}
|
|
40
|
-
getButton() {
|
|
41
|
-
const slot = this.host.shadowRoot?.querySelector("slot");
|
|
42
|
-
const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
|
|
43
|
-
return nodes.find((el) => el.tagName === "BUTTON") ?? null;
|
|
44
|
-
}
|
|
45
|
-
onKeydown = (e) => {
|
|
46
|
-
const btn = this.getButton();
|
|
47
|
-
if (btn || this.disabled || !isActivationKey(e))
|
|
48
|
-
return;
|
|
49
|
-
e.preventDefault();
|
|
50
|
-
this.host.click();
|
|
51
|
-
};
|
|
52
|
-
render() {
|
|
53
|
-
return h(Host, { key: "01011aa13228b9e8d10ed11b99c95ef1df91326d", "data-variant": this.variant || void 0, "data-size": this.size || void 0, "data-disabled": this.disabled ? "" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "2bf0274d2732ea46fdf016a46d85bbe6e0d96bba", ref: (el) => this.slotRef = el }));
|
|
54
|
-
}
|
|
55
|
-
static get watchers() {
|
|
56
|
-
return {
|
|
57
|
-
"variant": [{
|
|
58
|
-
"syncToButton": 0
|
|
59
|
-
}],
|
|
60
|
-
"size": [{
|
|
61
|
-
"syncToButton": 0
|
|
62
|
-
}],
|
|
63
|
-
"disabled": [{
|
|
64
|
-
"syncToButton": 0
|
|
65
|
-
}]
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
UIButton.style = uiButtonCss();
|
|
70
|
-
export {
|
|
71
|
-
UIButton as ui_button
|
|
72
|
-
};
|