@threadlabs/looma 0.39.5 → 0.40.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/components/ui-button/ui-button.html +8 -10
- package/components/ui-button/ui-button.js +5 -2
- package/components/ui-callout/ui-callout.html +1 -1
- package/components/ui-editor-link-card/ui-editor-link-card.html +0 -1
- package/components/ui-pagination/ui-pagination.html +3 -6
- package/dist/index.js +1 -1
- package/docs/card.html +1 -1
- package/docs/catalog.json +12 -36
- package/package.json +1 -1
- package/styles/ui-callout.css +1 -1
- package/vanilla/UiButton.d.ts +0 -1
- package/vanilla/UiButton.js +71 -71
- package/vanilla/UiEditorLinkCard.js +1 -1
- package/vanilla/UiPagination.js +44 -57
- package/vue/UiButton.d.ts +0 -6
- package/vue/UiButton.vue +8 -30
- package/vue/UiCallout.vue +1 -1
- package/vue/UiEditorLinkCard.vue +0 -1
- package/vue/UiPagination.vue +13 -15
- package/vue/chunks/UiButton.js +8 -36
- package/vue/chunks/UiCallout.js +1 -1
- package/vue/chunks/UiEditorLinkCard.js +0 -1
- package/vue/chunks/UiPagination.js +13 -27
- package/vue/components.css +2 -2
- package/vue/editor/index.js +107 -121
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
tone="danger" variant="outline" is a destructive secondary action. neutral is the quiet one, for a button that should not claim a colour. The field
|
|
30
30
|
variant always uses neutral field colors.</prop>
|
|
31
31
|
<prop name="disabled" type="boolean" default="false"
|
|
32
|
-
>Makes the button unavailable: it cannot be pressed, uses a flat neutral palette, and loses its raised look. A disabled link (
|
|
33
|
-
|
|
32
|
+
>Makes the button unavailable: it cannot be pressed, uses a flat neutral palette, and loses its raised look. A disabled link (with href) drops its href and
|
|
33
|
+
states aria-disabled="true" instead, because a link has no native disabled state.</prop>
|
|
34
34
|
<prop name="loading" type="boolean" default="false"
|
|
35
35
|
>Keeps the action focusable and its label visible while work is in progress. It shows a decorative spinner, states aria-disabled and aria-busy, and prevents
|
|
36
36
|
activation or form submission until cleared.</prop>
|
|
@@ -41,12 +41,10 @@
|
|
|
41
41
|
<prop name="type" type="keyword" values="button, submit, reset" default="button"
|
|
42
42
|
>The button's type, as on a native button. button by default, so it never submits a form by accident. A link has no type.</prop>
|
|
43
43
|
<prop name="href" type="string"
|
|
44
|
-
>The link's destination.
|
|
45
|
-
aria-disabled="true", so it cannot be followed.</prop>
|
|
46
|
-
<prop name="target" type="string">Where a link opens, as on a native link. Only meaningful with
|
|
47
|
-
<prop name="rel" type="string">The link's relationship to its destination, as on a native link. Only meaningful with
|
|
48
|
-
<prop name="as" type="keyword" values="button, a" default="button"
|
|
49
|
-
>The native element the button renders: a button, or a link (a) that navigates to href.</prop>
|
|
44
|
+
>The link's destination. Supplying href automatically renders a native link instead of a button, including an empty href for the current document. A
|
|
45
|
+
disabled link drops its href and states aria-disabled="true", so it cannot be followed.</prop>
|
|
46
|
+
<prop name="target" type="string">Where a link opens, as on a native link. Only meaningful with href.</prop>
|
|
47
|
+
<prop name="rel" type="string">The link's relationship to its destination, as on a native link. Only meaningful with href.</prop>
|
|
50
48
|
<!-- Each root carries only its own attributes: a link has no type or disabled, and a disabled link
|
|
51
49
|
loses its href and states aria-disabled instead. The language has no conditional expression, so a
|
|
52
50
|
table keyed by a boolean's text picks each value, and null leaves the attribute off. -->
|
|
@@ -55,7 +53,7 @@
|
|
|
55
53
|
<a
|
|
56
54
|
from:data-appearance="$appearance"
|
|
57
55
|
from:data-tone="$colorTone"
|
|
58
|
-
$when="$appearance = 'card' and $
|
|
56
|
+
$when="$appearance = 'card' and $href != null"
|
|
59
57
|
from:href="{ true: null, false: $href }[concat($disabled or $loading or $pending)]"
|
|
60
58
|
from:target="$target"
|
|
61
59
|
from:rel="$rel"
|
|
@@ -87,7 +85,7 @@
|
|
|
87
85
|
<a
|
|
88
86
|
from:data-appearance="$appearance"
|
|
89
87
|
from:data-tone="$colorTone"
|
|
90
|
-
$when="$
|
|
88
|
+
$when="$href != null"
|
|
91
89
|
from:href="{ true: null, false: $href }[concat($disabled or $loading or $pending)]"
|
|
92
90
|
from:target="$target"
|
|
93
91
|
from:rel="$rel"
|
|
@@ -5,6 +5,9 @@ export function connect(host) {
|
|
|
5
5
|
event.preventDefault();
|
|
6
6
|
event.stopImmediatePropagation();
|
|
7
7
|
};
|
|
8
|
-
host.
|
|
9
|
-
|
|
8
|
+
return host.effect(() => {
|
|
9
|
+
const element = host.element;
|
|
10
|
+
element.addEventListener("click", onClick, true);
|
|
11
|
+
return () => element.removeEventListener("click", onClick, true);
|
|
12
|
+
});
|
|
10
13
|
}
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
--_ui-callout-icon: var(--ui-callout-icon);
|
|
119
119
|
--_ui-callout-icon-size: var(--ui-callout-icon-size);
|
|
120
120
|
|
|
121
|
-
--_callout-surface:
|
|
121
|
+
--_callout-surface: oklch(from var(--_callout-border) l c h / 10%);
|
|
122
122
|
--_ui-selection-context-surface: light-dark(
|
|
123
123
|
oklch(from var(--ui-callout-surface, var(--_callout-surface)) calc(l - 0.045) calc(max(c, min(0.045, c * 3))) h),
|
|
124
124
|
oklch(from var(--ui-callout-surface, var(--_callout-surface)) calc(l + 0.045) calc(max(c, min(0.045, c * 3))) h)
|
|
@@ -37,8 +37,7 @@
|
|
|
37
37
|
tone="neutral"
|
|
38
38
|
from:size="$size"
|
|
39
39
|
from:disabled="$disabled or not $hasPrevious or $page <= 1"
|
|
40
|
-
from:
|
|
41
|
-
from:href="$previousHref"
|
|
40
|
+
from:href="{ true: $previousHref, false: null }[concat($previousHref != '')]"
|
|
42
41
|
from:aria-label="$previousLabel"
|
|
43
42
|
from:data-pagination-page="$page - 1"
|
|
44
43
|
><ui-icon name="chevron-left"></ui-icon></ui-button>
|
|
@@ -50,8 +49,7 @@
|
|
|
50
49
|
from:tone="{ true: 'accent', false: 'neutral' }[concat($item.value = $page)]"
|
|
51
50
|
from:size="$size"
|
|
52
51
|
from:disabled="$disabled"
|
|
53
|
-
from:
|
|
54
|
-
from:href="$item.href"
|
|
52
|
+
from:href="{ true: $item.href, false: null }[concat(default($item.href, '') != '')]"
|
|
55
53
|
from:data-pagination-page="$item.value"
|
|
56
54
|
from:aria-label="concat($pageLabel, ' ', format($item.value, 'number'))"
|
|
57
55
|
from:aria-current="{ true: 'page', false: null }[concat($item.value = $page)]"
|
|
@@ -63,8 +61,7 @@
|
|
|
63
61
|
tone="neutral"
|
|
64
62
|
from:size="$size"
|
|
65
63
|
from:disabled="$disabled or not $hasNext"
|
|
66
|
-
from:
|
|
67
|
-
from:href="$nextHref"
|
|
64
|
+
from:href="{ true: $nextHref, false: null }[concat($nextHref != '')]"
|
|
68
65
|
from:aria-label="$nextLabel"
|
|
69
66
|
from:data-pagination-page="$page + 1"
|
|
70
67
|
><ui-icon name="chevron-right"></ui-icon></ui-button>
|