@threadlabs/looma 0.15.7 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/shared/icons.js +1 -0
- package/components/ui-badge/ui-badge.html +3 -8
- package/components/ui-dialog/ui-dialog.html +11 -4
- package/components/ui-dialog/ui-dialog.js +4 -2
- package/components/ui-icon/ui-icon.html +1 -0
- package/dist/index.js +1 -1
- package/editor/chunks/extensions.js +124 -4
- package/editor/extensions/chip.d.ts +26 -0
- package/editor/extensions/index.d.ts +1 -0
- package/editor/extensions/index.js +2 -2
- package/editor/extensions/slash-command.d.ts +2 -1
- package/editor/icons.d.ts +1 -0
- package/editor/index.js +4 -3
- package/package.json +1 -1
- package/styles/ui-badge.css +3 -8
- package/vanilla/UiDialog.d.ts +1 -0
- package/vanilla/UiDialog.js +1 -1
- package/vanilla/UiIcon.js +1 -1
- package/vue/UiBadge.vue +7 -8
- package/vue/UiDialog.d.ts +2 -1
- package/vue/UiDialog.vue +2 -1
- package/vue/UiIcon.vue +4 -0
- package/vue/UiSearchShell.d.ts +1 -1
- package/vue/chunks/UiBadge.js +1 -1
- package/vue/chunks/UiDialog.js +6 -2
- package/vue/chunks/UiIcon.js +11 -1
- package/vue/components.css +165 -63
- package/vue/editor/index.js +115 -2
|
@@ -56,6 +56,7 @@ export const icons = {
|
|
|
56
56
|
"split": [["path",{"d":"M16 3h5v5"}],["path",{"d":"M8 3H3v5"}],["path",{"d":"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3"}],["path",{"d":"m15 9 6-6"}]],
|
|
57
57
|
"strikethrough": [["path",{"d":"M16 4H9a3 3 0 0 0-2.83 4"}],["path",{"d":"M14 12a4 4 0 0 1 0 8H6"}],["line",{"x1":"4","x2":"20","y1":"12","y2":"12"}]],
|
|
58
58
|
"table": [["path",{"d":"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"}]],
|
|
59
|
+
"tag": [["path",{"d":"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"}],["circle",{"cx":"7.5","cy":"7.5","r":".5","fill":"currentColor"}]],
|
|
59
60
|
"trash": [["path",{"d":"M10 11v6"}],["path",{"d":"M14 11v6"}],["path",{"d":"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{"d":"M3 6h18"}],["path",{"d":"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]],
|
|
60
61
|
"triangle-alert": [["path",{"d":"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{"d":"M12 9v4"}],["path",{"d":"M12 17h.01"}]],
|
|
61
62
|
"truck": [["path",{"d":"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2"}],["path",{"d":"M15 18H9"}],["path",{"d":"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14"}],["circle",{"cx":"17","cy":"18","r":"2"}],["circle",{"cx":"7","cy":"18","r":"2"}]],
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
:host {
|
|
62
62
|
--_badge-surface: var(--ui-surface-subtle);
|
|
63
63
|
--_badge-text: var(--ui-text-secondary);
|
|
64
|
-
/*
|
|
65
|
-
--_badge-border: var(--
|
|
64
|
+
/* Sit between the soft fill and its stronger theme ink. */
|
|
65
|
+
--_badge-border: color-mix(in srgb, var(--_badge-surface) 75%, var(--_badge-text) 25%);
|
|
66
66
|
/* --ui-badge-color derives a wash and an ink from one colour, between the tone and the explicit
|
|
67
67
|
surface, text, and border hooks. Each value is invalid, so the tone shows, while it is unset. The
|
|
68
68
|
mixes keep 4.5:1 text contrast for any colour, in a light theme or a dark one. */
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
--_badge-color-wash: color-mix(in oklab, var(--_ui-badge-color) 15%, var(--ui-surface-default));
|
|
71
71
|
--_badge-color-ink: color-mix(in oklab, var(--_ui-badge-color) 35%, var(--ui-text-primary));
|
|
72
72
|
--_badge-color-surface: var(--_badge-color-wash);
|
|
73
|
-
--_badge-color-border: var(--_badge-color-wash);
|
|
73
|
+
--_badge-color-border: color-mix(in srgb, var(--_badge-color-wash) 75%, var(--_badge-color-ink) 25%);
|
|
74
74
|
--_badge-color-text: var(--_badge-color-ink);
|
|
75
75
|
--_badge-outline-surface: var(--ui-badge-surface, var(--_badge-color-surface, var(--_badge-surface)));
|
|
76
76
|
|
|
@@ -136,31 +136,26 @@
|
|
|
136
136
|
|
|
137
137
|
:host-state([variant="subtle"][tone="accent"]) {
|
|
138
138
|
--_badge-surface: var(--ui-accent-soft);
|
|
139
|
-
--_badge-border: var(--ui-accent-soft);
|
|
140
139
|
--_badge-text: var(--ui-accent-subtle-text, var(--ui-accent-solid));
|
|
141
140
|
}
|
|
142
141
|
|
|
143
142
|
:host-state([variant="subtle"][tone="danger"]) {
|
|
144
143
|
--_badge-surface: var(--ui-danger-soft);
|
|
145
|
-
--_badge-border: var(--ui-danger-soft);
|
|
146
144
|
--_badge-text: var(--ui-danger-subtle-text, var(--ui-danger-solid));
|
|
147
145
|
}
|
|
148
146
|
|
|
149
147
|
:host-state([variant="subtle"][tone="success"]) {
|
|
150
148
|
--_badge-surface: var(--ui-success-soft);
|
|
151
|
-
--_badge-border: var(--ui-success-soft);
|
|
152
149
|
--_badge-text: var(--ui-success-subtle-text, var(--ui-success-solid));
|
|
153
150
|
}
|
|
154
151
|
|
|
155
152
|
:host-state([variant="subtle"][tone="warning"]) {
|
|
156
153
|
--_badge-surface: var(--ui-warning-soft);
|
|
157
|
-
--_badge-border: var(--ui-warning-soft);
|
|
158
154
|
--_badge-text: var(--ui-warning-subtle-text, var(--ui-warning-solid));
|
|
159
155
|
}
|
|
160
156
|
|
|
161
157
|
:host-state([variant="subtle"][tone="info"]) {
|
|
162
158
|
--_badge-surface: var(--ui-info-soft);
|
|
163
|
-
--_badge-border: var(--ui-info-soft);
|
|
164
159
|
--_badge-text: var(--ui-info-subtle-text, var(--ui-info-solid));
|
|
165
160
|
}
|
|
166
161
|
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
<template component="ui-dialog" controller="./ui-dialog.js">
|
|
2
2
|
<defs>
|
|
3
3
|
<prop name="open" type="boolean" default="false">Whether the dialog is open initially or when set externally.</prop>
|
|
4
|
-
<prop name="
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<prop name="
|
|
4
|
+
<prop name="modal" type="boolean" default="false"
|
|
5
|
+
>Open in the top layer with a backdrop and make the rest of the page inert until it closes, like native showModal(). Without it the dialog is non-modal,
|
|
6
|
+
like native show().</prop>
|
|
7
|
+
<prop name="modeless" type="boolean" default="false"
|
|
8
|
+
>Deprecated: does nothing, since dialogs are non-modal unless modal is set. Accepted so markup written for 0.15 keeps working; modal wins when both are
|
|
9
|
+
set.</prop>
|
|
10
|
+
<prop name="closedby" type="any | closerequest | none"
|
|
11
|
+
>Which user close requests work: any includes outside presses, closerequest includes Escape, and none requires an action. Unset follows native dialog:
|
|
12
|
+
closerequest when modal, none when not.</prop>
|
|
13
|
+
<prop name="alert" type="boolean" default="false"
|
|
14
|
+
>Use alert dialog semantics and require an explicit action instead of the header close button. An alert dialog is always modal.</prop>
|
|
8
15
|
<prop name="size" type="sm | md | lg | fullscreen" default="md">Choose a compact, standard, wide, or viewport-filling dialog.</prop>
|
|
9
16
|
<prop name="label" type="string">Visible title in the dialog header; also its accessible name.</prop>
|
|
10
17
|
<prop name="for" type="string" default="">ID of the control that opens the dialog.</prop>
|
|
@@ -58,8 +58,10 @@ export default function controller(host) {
|
|
|
58
58
|
else dialog?.removeAttribute("role");
|
|
59
59
|
syncTrigger();
|
|
60
60
|
const open = Boolean(host.state.internalOpen);
|
|
61
|
-
|
|
62
|
-
const
|
|
61
|
+
// `modeless` is a deprecated no-op: non-modal is the default. An alert dialog is always modal (APG alertdialog).
|
|
62
|
+
const modal = Boolean(host.state.modal || host.state.alert);
|
|
63
|
+
// An unset or unknown closedby follows native <dialog>'s auto state: closerequest when modal, none otherwise.
|
|
64
|
+
const requestedClosedBy = ["any", "closerequest", "none"].includes(host.state.closedby) ? host.state.closedby : modal ? "closerequest" : "none";
|
|
63
65
|
const closedBy = host.state.alert && requestedClosedBy === "any" ? "closerequest" : requestedClosedBy;
|
|
64
66
|
trigger?.setAttribute("aria-expanded", String(open));
|
|
65
67
|
if (!dialog) return;
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
'split': [{ tag: 'path', d: 'M16 3h5v5' }, { tag: 'path', d: 'M8 3H3v5' }, { tag: 'path', d: 'M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3' }, { tag: 'path', d: 'm15 9 6-6' }],
|
|
64
64
|
'strikethrough': [{ tag: 'path', d: 'M16 4H9a3 3 0 0 0-2.83 4' }, { tag: 'path', d: 'M14 12a4 4 0 0 1 0 8H6' }, { tag: 'line', x1: '4', x2: '20', y1: '12', y2: '12' }],
|
|
65
65
|
'table': [{ tag: 'path', d: 'M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18' }],
|
|
66
|
+
'tag': [{ tag: 'path', d: 'M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z' }, { tag: 'circle', cx: '7.5', cy: '7.5', r: '.5', fill: 'currentColor' }],
|
|
66
67
|
'trash': [{ tag: 'path', d: 'M10 11v6' }, { tag: 'path', d: 'M14 11v6' }, { tag: 'path', d: 'M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6' }, { tag: 'path', d: 'M3 6h18' }, { tag: 'path', d: 'M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2' }],
|
|
67
68
|
'triangle-alert': [{ tag: 'path', d: 'm21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3' }, { tag: 'path', d: 'M12 9v4' }, { tag: 'path', d: 'M12 17h.01' }],
|
|
68
69
|
'truck': [{ tag: 'path', d: 'M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2' }, { tag: 'path', d: 'M15 18H9' }, { tag: 'path', d: 'M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14' }, { tag: 'circle', cx: '17', cy: '18', r: '2' }, { tag: 'circle', cx: '7', cy: '18', r: '2' }],
|