@threadlabs/looma 0.29.16 → 0.29.18
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/ui-editor-link-card/ui-editor-link-card.html +5 -5
- package/components/ui-icon/ui-icon.html +10 -0
- package/components/ui-icon-button/ui-icon-button.html +5 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-icon-button.css +3 -3
- package/styles/ui-icon.css +8 -0
- package/vanilla/UiEditorLinkCard.js +3 -3
- package/vanilla/UiIcon.d.ts +1 -0
- package/vanilla/UiIcon.js +9 -4
- package/vanilla/UiIconButton.d.ts +1 -0
- package/vanilla/UiIconButton.js +4 -4
- package/vue/UiBadge.d.ts +1 -1
- package/vue/UiButton.d.ts +1 -1
- package/vue/UiEditorLinkCard.vue +5 -4
- package/vue/UiIcon.d.ts +9 -0
- package/vue/UiIcon.vue +39 -1
- package/vue/UiIconButton.d.ts +9 -0
- package/vue/UiIconButton.vue +23 -3
- package/vue/UiText.d.ts +1 -1
- package/vue/chunks/UiEditorLinkCard.js +18 -22
- package/vue/chunks/UiIcon.js +61 -21
- package/vue/chunks/UiIconButton.js +24 -1
- package/vue/components.css +74 -7
- package/vue/editor/index.js +3074 -2814
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
<event name="remove" type="object">Requests removing this link.</event>
|
|
23
23
|
</defs>
|
|
24
24
|
<div>
|
|
25
|
-
<ui-card variant="elevated" padding="xs" size="
|
|
25
|
+
<ui-card variant="elevated" padding="xs" size="sm">
|
|
26
26
|
<ui-cluster gap="xs" wrap="nowrap" role="group" aria-label="Link actions">
|
|
27
27
|
<ui-icon from:name="{ true: 'file-text', false: 'link' }[concat($resolved)]"></ui-icon>
|
|
28
|
-
<ui-stack gap="none" from:title="$href" from:aria-label="concat({ true: $targetLabel, false: 'URL' }[concat($resolved)], ': ', $shown)">
|
|
29
|
-
<ui-text as="strong" size="sm" weight="medium" font="sans"
|
|
30
|
-
<ui-text $if="$detail != ''" as="small" size="xs" tone="secondary" font="sans">{$detail}</ui-text>
|
|
28
|
+
<ui-stack gap="none" fill from:title="$href" from:aria-label="concat({ true: $targetLabel, false: 'URL' }[concat($resolved)], ': ', $shown)">
|
|
29
|
+
<ui-text as="strong" size="sm" weight="medium" font="sans" truncate>{$shown}</ui-text>
|
|
30
|
+
<ui-text $if="$detail != ''" as="small" size="xs" tone="secondary" font="sans" truncate>{$detail}</ui-text>
|
|
31
31
|
</ui-stack>
|
|
32
32
|
<template $if="$openHref != ''">
|
|
33
33
|
<ui-button
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
target="_blank"
|
|
41
41
|
rel="noopener noreferrer"
|
|
42
42
|
aria-label="Open link"
|
|
43
|
-
><ui-
|
|
43
|
+
><ui-icon name="external-link"></ui-icon></ui-button>
|
|
44
44
|
<ui-tooltip from:for="concat($base, '-open')">Open link</ui-tooltip>
|
|
45
45
|
</template>
|
|
46
46
|
<ui-icon-button from:id="concat($base, '-edit')" label="Edit link" variant="ghost" size="sm" data-link-action="edit"><ui-icon
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<template component="ui-icon">
|
|
2
2
|
<defs>
|
|
3
|
+
<prop name="tone" type="keyword" values="inherit, secondary, muted" default="inherit"
|
|
4
|
+
>Icon colour. inherit follows its control; secondary and muted keep a supporting icon quiet without a text wrapper.</prop>
|
|
3
5
|
<prop name="name" type="string" default=""
|
|
4
6
|
>Which icon to draw, by its name in Looma's icon set (LOOMA_ICONS), such as "align-left". An unknown or empty name draws nothing. The icon is hidden from
|
|
5
7
|
assistive technology, so name the control it sits in.</prop>
|
|
@@ -125,6 +127,14 @@
|
|
|
125
127
|
block-size: var(--ui-icon-size, var(--_ui-default-icon-size, 1em));
|
|
126
128
|
}
|
|
127
129
|
|
|
130
|
+
:host([tone="secondary"]) {
|
|
131
|
+
color: var(--ui-text-secondary);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:host([tone="muted"]) {
|
|
135
|
+
color: var(--ui-text-muted);
|
|
136
|
+
}
|
|
137
|
+
|
|
128
138
|
svg {
|
|
129
139
|
inline-size: 100%;
|
|
130
140
|
block-size: 100%;
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
<prop name="guide" type="keyword" values="dot, bar" default="dot"
|
|
27
27
|
>The idle marker of an anticipatory button: dot for contextual actions, or a slim neutral rounded bar for a panel-edge control. The icon appears on hover or
|
|
28
28
|
keyboard focus; touch always shows the icon.</prop>
|
|
29
|
+
<prop name="revealed" type="boolean" default="false"
|
|
30
|
+
>Keeps an anticipatory button visible while its context is active, such as a selected block or an open popup. It does not imply a pressed or expanded state.</prop>
|
|
29
31
|
<prop name="round" type="boolean" default="false">Use a fully circular shape.</prop>
|
|
30
32
|
</defs>
|
|
31
33
|
<button
|
|
@@ -195,13 +197,13 @@
|
|
|
195
197
|
}
|
|
196
198
|
|
|
197
199
|
@media (hover: hover) and (pointer: fine) {
|
|
198
|
-
:host([anticipatory]):not(:host([variant="solid"]), :host([loading]), :host([pending]), :disabled, [aria-pressed="true"], [data-ui-proximity="near"], :hover, :focus-visible) {
|
|
200
|
+
:host([anticipatory]):not(:host([revealed]), :host([variant="solid"]), :host([loading]), :host([pending]), :disabled, [aria-pressed="true"], [data-ui-proximity="near"], :hover, :focus-visible) {
|
|
199
201
|
border-color: transparent;
|
|
200
202
|
background-color: transparent;
|
|
201
203
|
box-shadow: none;
|
|
202
204
|
}
|
|
203
205
|
|
|
204
|
-
:host([anticipatory]):not(:host([variant="solid"]), :host([loading]), :host([pending]), :disabled, [aria-pressed="true"], [data-ui-proximity="near"], :hover, :focus-visible)
|
|
206
|
+
:host([anticipatory]):not(:host([revealed]), :host([variant="solid"]), :host([loading]), :host([pending]), :disabled, [aria-pressed="true"], [data-ui-proximity="near"], :hover, :focus-visible)
|
|
205
207
|
.content {
|
|
206
208
|
opacity: 0;
|
|
207
209
|
transform: scale(0.65);
|
|
@@ -209,7 +211,7 @@
|
|
|
209
211
|
}
|
|
210
212
|
}
|
|
211
213
|
|
|
212
|
-
:host([anticipatory]):is(:host([variant="solid"]), [aria-pressed="true"], [data-ui-proximity="near"], :hover, :focus-visible)::before {
|
|
214
|
+
:host([anticipatory]):is(:host([revealed]), :host([variant="solid"]), [aria-pressed="true"], [data-ui-proximity="near"], :hover, :focus-visible)::before {
|
|
213
215
|
opacity: 0;
|
|
214
216
|
}
|
|
215
217
|
|