@threadlabs/looma 0.13.1 → 0.13.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/components/ui-affordance-scope/ui-affordance-scope.html +9 -0
- package/components/ui-button/ui-button.html +18 -14
- package/components/ui-card/ui-card.html +8 -1
- package/components/ui-combobox/ui-combobox.html +1 -1
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +2 -2
- package/components/ui-icon-button/ui-icon-button.html +1 -1
- package/components/ui-nav-item/ui-nav-item.html +28 -18
- package/components/ui-sidebar/ui-sidebar.html +1 -1
- package/components/ui-text/ui-text.html +11 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/styles/ui-action-bar.css +1 -1
- package/styles/ui-affordance-scope.css +10 -2
- package/styles/ui-avatar-group.css +1 -1
- package/styles/ui-avatar.css +1 -1
- package/styles/ui-badge.css +1 -1
- package/styles/ui-breadcrumb-item.css +1 -1
- package/styles/ui-breadcrumbs.css +1 -1
- package/styles/ui-button.css +1 -1
- package/styles/ui-callout.css +1 -1
- package/styles/ui-card.css +1 -1
- package/styles/ui-checkbox.css +1 -1
- package/styles/ui-cluster.css +1 -1
- package/styles/ui-combobox.css +1 -1
- package/styles/ui-container.css +1 -1
- package/styles/ui-context-menu.css +1 -1
- package/styles/ui-cover.css +1 -1
- package/styles/ui-description-item.css +1 -1
- package/styles/ui-description-list.css +1 -1
- package/styles/ui-dialog.css +1 -1
- package/styles/ui-disclosure.css +1 -1
- package/styles/ui-editable.css +1 -1
- package/styles/ui-editor-insert-table-grid.css +1 -1
- package/styles/ui-editor-mention-menu.css +1 -1
- package/styles/ui-editor-slash-menu.css +1 -1
- package/styles/ui-editor-table-context-menu.css +1 -1
- package/styles/ui-editor-table-overlay.css +3 -3
- package/styles/ui-editor-table-toolbar.css +1 -1
- package/styles/ui-editor-toolbar.css +1 -1
- package/styles/ui-floating-action-button.css +1 -1
- package/styles/ui-form-field.css +1 -1
- package/styles/ui-grid.css +1 -1
- package/styles/ui-icon-button.css +2 -2
- package/styles/ui-icon.css +1 -1
- package/styles/ui-input-group.css +1 -1
- package/styles/ui-input.css +1 -1
- package/styles/ui-list-item.css +1 -1
- package/styles/ui-list.css +1 -1
- package/styles/ui-menu-item.css +1 -1
- package/styles/ui-menu.css +1 -1
- package/styles/ui-nav-item.css +1 -1
- package/styles/ui-page-header.css +1 -1
- package/styles/ui-popover.css +1 -1
- package/styles/ui-radio-group.css +1 -1
- package/styles/ui-radio.css +1 -1
- package/styles/ui-reel.css +1 -1
- package/styles/ui-scroll-area.css +1 -1
- package/styles/ui-search-result-row.css +1 -1
- package/styles/ui-search-shell.css +1 -1
- package/styles/ui-section.css +1 -1
- package/styles/ui-select.css +1 -1
- package/styles/ui-separator.css +1 -1
- package/styles/ui-sidebar.css +2 -2
- package/styles/ui-spinner.css +1 -1
- package/styles/ui-stack.css +1 -1
- package/styles/ui-status-message.css +1 -1
- package/styles/ui-switch.css +1 -1
- package/styles/ui-switcher.css +1 -1
- package/styles/ui-tabs.css +1 -1
- package/styles/ui-text.css +1 -1
- package/styles/ui-textarea.css +1 -1
- package/styles/ui-toast-region.css +1 -1
- package/styles/ui-tooltip.css +1 -1
- package/styles/ui-top-bar.css +1 -1
- package/styles/ui-tree-item.css +1 -1
- package/styles/ui-tree.css +1 -1
- package/vanilla/UiActionBar.d.ts +1 -1
- package/vanilla/UiActionBar.js +2 -2
- package/vanilla/UiAffordanceScope.d.ts +2 -1
- package/vanilla/UiAffordanceScope.js +3 -3
- package/vanilla/UiAvatar.d.ts +1 -1
- package/vanilla/UiAvatar.js +2 -2
- package/vanilla/UiAvatarGroup.d.ts +1 -1
- package/vanilla/UiAvatarGroup.js +2 -2
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +2 -2
- package/vanilla/UiBreadcrumbItem.d.ts +1 -1
- package/vanilla/UiBreadcrumbItem.js +2 -2
- package/vanilla/UiBreadcrumbs.d.ts +1 -1
- package/vanilla/UiBreadcrumbs.js +2 -2
- package/vanilla/UiButton.d.ts +3 -3
- package/vanilla/UiButton.js +46 -21
- package/vanilla/UiCallout.d.ts +1 -1
- package/vanilla/UiCallout.js +2 -2
- package/vanilla/UiCard.d.ts +3 -3
- package/vanilla/UiCard.js +67 -22
- package/vanilla/UiCheckbox.d.ts +1 -1
- package/vanilla/UiCheckbox.js +2 -2
- package/vanilla/UiCluster.d.ts +1 -1
- package/vanilla/UiCluster.js +2 -2
- package/vanilla/UiCombobox.d.ts +1 -1
- package/vanilla/UiCombobox.js +3 -3
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +2 -2
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +2 -2
- package/vanilla/UiCover.d.ts +1 -1
- package/vanilla/UiCover.js +2 -2
- package/vanilla/UiDescriptionItem.d.ts +1 -1
- package/vanilla/UiDescriptionItem.js +2 -2
- package/vanilla/UiDescriptionList.d.ts +1 -1
- package/vanilla/UiDescriptionList.js +2 -2
- package/vanilla/UiDialog.d.ts +1 -1
- package/vanilla/UiDialog.js +2 -2
- package/vanilla/UiDisclosure.d.ts +1 -1
- package/vanilla/UiDisclosure.js +2 -2
- package/vanilla/UiEditable.d.ts +1 -1
- package/vanilla/UiEditable.js +2 -2
- package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
- package/vanilla/UiEditorInsertTableGrid.js +2 -2
- package/vanilla/UiEditorMentionMenu.d.ts +1 -1
- package/vanilla/UiEditorMentionMenu.js +2 -2
- package/vanilla/UiEditorSlashMenu.d.ts +1 -1
- package/vanilla/UiEditorSlashMenu.js +2 -2
- package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +2 -2
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +2 -2
- package/vanilla/UiEditorTableToolbar.d.ts +1 -1
- package/vanilla/UiEditorTableToolbar.js +2 -2
- package/vanilla/UiEditorToolbar.d.ts +1 -1
- package/vanilla/UiEditorToolbar.js +2 -2
- package/vanilla/UiFloatingActionButton.d.ts +1 -1
- package/vanilla/UiFloatingActionButton.js +2 -2
- package/vanilla/UiFormField.d.ts +1 -1
- package/vanilla/UiFormField.js +2 -2
- package/vanilla/UiGrid.d.ts +1 -1
- package/vanilla/UiGrid.js +2 -2
- package/vanilla/UiIcon.d.ts +1 -1
- package/vanilla/UiIcon.js +2 -2
- package/vanilla/UiIconButton.d.ts +1 -1
- package/vanilla/UiIconButton.js +2 -2
- package/vanilla/UiInput.d.ts +1 -1
- package/vanilla/UiInput.js +2 -2
- package/vanilla/UiInputGroup.d.ts +1 -1
- package/vanilla/UiInputGroup.js +2 -2
- package/vanilla/UiList.d.ts +1 -1
- package/vanilla/UiList.js +2 -2
- package/vanilla/UiListItem.d.ts +1 -1
- package/vanilla/UiListItem.js +2 -2
- package/vanilla/UiMenu.d.ts +1 -1
- package/vanilla/UiMenu.js +2 -2
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +2 -2
- package/vanilla/UiNavItem.d.ts +3 -3
- package/vanilla/UiNavItem.js +106 -54
- package/vanilla/UiPageHeader.d.ts +1 -1
- package/vanilla/UiPageHeader.js +2 -2
- package/vanilla/UiPopover.d.ts +1 -1
- package/vanilla/UiPopover.js +2 -2
- package/vanilla/UiRadio.d.ts +1 -1
- package/vanilla/UiRadio.js +2 -2
- package/vanilla/UiRadioGroup.d.ts +1 -1
- package/vanilla/UiRadioGroup.js +2 -2
- package/vanilla/UiReel.d.ts +1 -1
- package/vanilla/UiReel.js +2 -2
- package/vanilla/UiScrollArea.d.ts +1 -1
- package/vanilla/UiScrollArea.js +2 -2
- package/vanilla/UiSearchResultRow.d.ts +1 -1
- package/vanilla/UiSearchResultRow.js +2 -2
- package/vanilla/UiSearchShell.d.ts +1 -1
- package/vanilla/UiSearchShell.js +2 -2
- package/vanilla/UiSection.d.ts +1 -1
- package/vanilla/UiSection.js +2 -2
- package/vanilla/UiSelect.d.ts +1 -1
- package/vanilla/UiSelect.js +2 -2
- package/vanilla/UiSeparator.d.ts +1 -1
- package/vanilla/UiSeparator.js +2 -2
- package/vanilla/UiSidebar.d.ts +1 -1
- package/vanilla/UiSidebar.js +2 -2
- package/vanilla/UiSpinner.d.ts +1 -1
- package/vanilla/UiSpinner.js +2 -2
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +2 -2
- package/vanilla/UiStatusMessage.d.ts +1 -1
- package/vanilla/UiStatusMessage.js +2 -2
- package/vanilla/UiSwitch.d.ts +1 -1
- package/vanilla/UiSwitch.js +2 -2
- package/vanilla/UiSwitcher.d.ts +1 -1
- package/vanilla/UiSwitcher.js +2 -2
- package/vanilla/UiTabs.d.ts +1 -1
- package/vanilla/UiTabs.js +2 -2
- package/vanilla/UiText.d.ts +3 -3
- package/vanilla/UiText.js +97 -28
- package/vanilla/UiTextarea.d.ts +1 -1
- package/vanilla/UiTextarea.js +2 -2
- package/vanilla/UiToastRegion.d.ts +1 -1
- package/vanilla/UiToastRegion.js +2 -2
- package/vanilla/UiTooltip.d.ts +1 -1
- package/vanilla/UiTooltip.js +2 -2
- package/vanilla/UiTopBar.d.ts +1 -1
- package/vanilla/UiTopBar.js +2 -2
- package/vanilla/UiTree.d.ts +1 -1
- package/vanilla/UiTree.js +2 -2
- package/vanilla/UiTreeItem.d.ts +1 -1
- package/vanilla/UiTreeItem.js +2 -2
- package/vue/UiActionBar.vue +1 -1
- package/vue/UiAffordanceScope.d.ts +2 -0
- package/vue/UiAffordanceScope.vue +10 -1
- package/vue/UiAvatar.vue +1 -1
- package/vue/UiAvatarGroup.vue +1 -1
- package/vue/UiBadge.vue +1 -1
- package/vue/UiBreadcrumbItem.vue +1 -1
- package/vue/UiBreadcrumbs.vue +1 -1
- package/vue/UiButton.d.ts +6 -4
- package/vue/UiButton.vue +14 -8
- package/vue/UiCallout.vue +1 -1
- package/vue/UiCard.d.ts +8 -2
- package/vue/UiCard.vue +27 -4
- package/vue/UiCheckbox.vue +1 -1
- package/vue/UiCluster.vue +1 -1
- package/vue/UiCombobox.vue +2 -2
- package/vue/UiContainer.vue +1 -1
- package/vue/UiContextMenu.vue +1 -1
- package/vue/UiCover.vue +1 -1
- package/vue/UiDescriptionItem.vue +1 -1
- package/vue/UiDescriptionList.vue +1 -1
- package/vue/UiDialog.vue +1 -1
- package/vue/UiDisclosure.vue +1 -1
- package/vue/UiEditable.vue +1 -1
- package/vue/UiEditorInsertTableGrid.vue +1 -1
- package/vue/UiEditorMentionMenu.vue +1 -1
- package/vue/UiEditorSlashMenu.vue +1 -1
- package/vue/UiEditorTableContextMenu.vue +1 -1
- package/vue/UiEditorTableOverlay.vue +3 -3
- package/vue/UiEditorTableToolbar.vue +1 -1
- package/vue/UiEditorToolbar.vue +1 -1
- package/vue/UiFloatingActionButton.vue +1 -1
- package/vue/UiFormField.vue +1 -1
- package/vue/UiGrid.vue +1 -1
- package/vue/UiIcon.vue +1 -1
- package/vue/UiIconButton.vue +2 -2
- package/vue/UiInput.vue +1 -1
- package/vue/UiInputGroup.vue +1 -1
- package/vue/UiList.vue +1 -1
- package/vue/UiListItem.vue +1 -1
- package/vue/UiMenu.vue +1 -1
- package/vue/UiMenuItem.vue +1 -1
- package/vue/UiNavItem.d.ts +10 -4
- package/vue/UiNavItem.vue +22 -5
- package/vue/UiPageHeader.vue +1 -1
- package/vue/UiPopover.vue +1 -1
- package/vue/UiRadio.vue +1 -1
- package/vue/UiRadioGroup.vue +1 -1
- package/vue/UiReel.vue +1 -1
- package/vue/UiScrollArea.vue +1 -1
- package/vue/UiSearchResultRow.vue +1 -1
- package/vue/UiSearchShell.vue +1 -1
- package/vue/UiSection.vue +1 -1
- package/vue/UiSelect.vue +1 -1
- package/vue/UiSeparator.vue +1 -1
- package/vue/UiSidebar.vue +2 -2
- package/vue/UiSpinner.vue +1 -1
- package/vue/UiStack.vue +1 -1
- package/vue/UiStatusMessage.vue +1 -1
- package/vue/UiSwitch.vue +1 -1
- package/vue/UiSwitcher.vue +1 -1
- package/vue/UiTabs.vue +1 -1
- package/vue/UiText.d.ts +14 -4
- package/vue/UiText.vue +37 -6
- package/vue/UiTextarea.vue +1 -1
- package/vue/UiToastRegion.vue +1 -1
- package/vue/UiTooltip.vue +1 -1
- package/vue/UiTopBar.vue +1 -1
- package/vue/UiTree.vue +1 -1
- package/vue/UiTreeItem.vue +1 -1
- package/vue/chunks/UiActionBar.js +1 -1
- package/vue/chunks/UiAffordanceScope.js +6 -3
- package/vue/chunks/UiAvatar.js +1 -1
- package/vue/chunks/UiAvatarGroup.js +1 -1
- package/vue/chunks/UiBadge.js +1 -1
- package/vue/chunks/UiBreadcrumbItem.js +1 -1
- package/vue/chunks/UiBreadcrumbs.js +1 -1
- package/vue/chunks/UiButton.js +28 -24
- package/vue/chunks/UiCallout.js +1 -1
- package/vue/chunks/UiCard.js +20 -6
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiCluster.js +1 -1
- package/vue/chunks/UiCombobox.js +2 -2
- package/vue/chunks/UiContainer.js +1 -1
- package/vue/chunks/UiContextMenu.js +1 -1
- package/vue/chunks/UiCover.js +1 -1
- package/vue/chunks/UiDescriptionItem.js +1 -1
- package/vue/chunks/UiDescriptionList.js +1 -1
- package/vue/chunks/UiDialog.js +1 -1
- package/vue/chunks/UiDisclosure.js +1 -1
- package/vue/chunks/UiEditable.js +1 -1
- package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
- package/vue/chunks/UiEditorMentionMenu.js +1 -1
- package/vue/chunks/UiEditorSlashMenu.js +1 -1
- package/vue/chunks/UiEditorTableContextMenu.js +1 -1
- package/vue/chunks/UiEditorTableOverlay.js +1 -1
- package/vue/chunks/UiEditorTableToolbar.js +1 -1
- package/vue/chunks/UiEditorToolbar.js +1 -1
- package/vue/chunks/UiFloatingActionButton.js +1 -1
- package/vue/chunks/UiFormField.js +1 -1
- package/vue/chunks/UiGrid.js +1 -1
- package/vue/chunks/UiIcon.js +1 -1
- package/vue/chunks/UiIconButton.js +1 -1
- package/vue/chunks/UiInput.js +1 -1
- package/vue/chunks/UiInputGroup.js +1 -1
- package/vue/chunks/UiList.js +1 -1
- package/vue/chunks/UiListItem.js +1 -1
- package/vue/chunks/UiMenu.js +1 -1
- package/vue/chunks/UiMenuItem.js +1 -1
- package/vue/chunks/UiNavItem.js +58 -28
- package/vue/chunks/UiPageHeader.js +1 -1
- package/vue/chunks/UiPopover.js +1 -1
- package/vue/chunks/UiRadio.js +1 -1
- package/vue/chunks/UiRadioGroup.js +1 -1
- package/vue/chunks/UiReel.js +1 -1
- package/vue/chunks/UiScrollArea.js +1 -1
- package/vue/chunks/UiSearchResultRow.js +1 -1
- package/vue/chunks/UiSearchShell.js +1 -1
- package/vue/chunks/UiSection.js +1 -1
- package/vue/chunks/UiSelect.js +1 -1
- package/vue/chunks/UiSeparator.js +1 -1
- package/vue/chunks/UiSidebar.js +1 -1
- package/vue/chunks/UiSpinner.js +1 -1
- package/vue/chunks/UiStack.js +1 -1
- package/vue/chunks/UiStatusMessage.js +1 -1
- package/vue/chunks/UiSwitch.js +1 -1
- package/vue/chunks/UiSwitcher.js +1 -1
- package/vue/chunks/UiTabs.js +1 -1
- package/vue/chunks/UiText.js +29 -7
- package/vue/chunks/UiTextarea.js +1 -1
- package/vue/chunks/UiToastRegion.js +1 -1
- package/vue/chunks/UiTooltip.js +1 -1
- package/vue/chunks/UiTopBar.js +1 -1
- package/vue/chunks/UiTree.js +1 -1
- package/vue/chunks/UiTreeItem.js +1 -1
- package/vue/components.css +918 -912
- package/vue/host.ts +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<template component="ui-affordance-scope" controller="./ui-affordance-scope.js">
|
|
2
2
|
<defs>
|
|
3
3
|
<prop name="nearRadius" type="number" default="16">How close, in pixels, the pointer must come to reveal an affordance.</prop>
|
|
4
|
+
<prop name="guide" type="dot | none" default="dot"
|
|
5
|
+
>What marks an anticipatory control at rest. dot shows a small guide dot where it will appear; none shows nothing until the pointer nears it, it is hovered,
|
|
6
|
+
or it takes focus. Every guide inside the scope follows it, including a sidebar's resize line and the editor table's handles.</prop>
|
|
4
7
|
<state name="engaged" :value="false"></state>
|
|
5
8
|
</defs>
|
|
6
9
|
<span><slot></slot></span>
|
|
@@ -8,12 +11,18 @@
|
|
|
8
11
|
:host {
|
|
9
12
|
display: contents;
|
|
10
13
|
--ui-affordance-scope-engaged: 0;
|
|
14
|
+
--ui-affordance-scope-guide: 1;
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
:host-state([engaged]) {
|
|
14
18
|
--ui-affordance-scope-engaged: 1;
|
|
15
19
|
}
|
|
16
20
|
|
|
21
|
+
/* Published to descendants: each guide multiplies its opacity by it, so none reaches them all. */
|
|
22
|
+
:host-state([guide="none"]) {
|
|
23
|
+
--ui-affordance-scope-guide: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
17
26
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
18
27
|
:host[hidden] {
|
|
19
28
|
display: none;
|
|
@@ -22,21 +22,25 @@
|
|
|
22
22
|
aria-disabled="true", so it cannot be followed.</prop>
|
|
23
23
|
<prop name="target" type="string">Where a link opens, as on a native link. Only meaningful with as="a".</prop>
|
|
24
24
|
<prop name="rel" type="string">The link's relationship to its destination, as on a native link. Only meaningful with as="a".</prop>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
<prop name="as" type="button | a" default="button">The native element the button renders: a button, or a link (a) that navigates to href.</prop>
|
|
26
|
+
<!-- Each root carries only its own attributes: a link has no type or disabled, and a disabled link
|
|
27
|
+
loses its href and states aria-disabled instead. The language has no conditional expression, so a
|
|
28
|
+
table keyed by a boolean's text picks each value, and null leaves the attribute off. -->
|
|
28
29
|
</defs>
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
<template $match>
|
|
31
|
+
<a
|
|
32
|
+
$when="as = 'a'"
|
|
33
|
+
:href="{ true: null, false: href }[format('%s', disabled)]"
|
|
34
|
+
:target="target"
|
|
35
|
+
:rel="rel"
|
|
36
|
+
:aria-disabled="{ true: 'true', false: null }[format('%s', disabled and href)]"
|
|
37
|
+
>
|
|
38
|
+
<slot></slot>
|
|
39
|
+
</a>
|
|
40
|
+
<button $else :type="type" :disabled="disabled">
|
|
41
|
+
<slot></slot>
|
|
42
|
+
</button>
|
|
43
|
+
</template>
|
|
40
44
|
<style>
|
|
41
45
|
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
42
46
|
@property --ui-button-active-surface {
|
|
@@ -6,8 +6,15 @@
|
|
|
6
6
|
<prop name="padding" type="sm | md | lg" default="md"
|
|
7
7
|
>The space inside the card: sm is snug (0.75rem), md is the default (1.5rem), and lg is roomy (2rem).</prop>
|
|
8
8
|
<prop name="tone" type="neutral | danger" default="neutral">danger draws an outlined card's border in the danger colour.</prop>
|
|
9
|
+
<prop name="as" type="div | section | article | aside" default="div"
|
|
10
|
+
>The native element the card renders. Choose the one that names the content: a section of a page, a self-contained article, or an aside.</prop>
|
|
9
11
|
</defs>
|
|
10
|
-
<
|
|
12
|
+
<template $match>
|
|
13
|
+
<section $when="as = 'section'"><slot></slot></section>
|
|
14
|
+
<article $when="as = 'article'"><slot></slot></article>
|
|
15
|
+
<aside $when="as = 'aside'"><slot></slot></aside>
|
|
16
|
+
<div $else><slot></slot></div>
|
|
17
|
+
</template>
|
|
11
18
|
<style>
|
|
12
19
|
/* A surface that groups content. Its children stack with even space between them, so a card
|
|
13
20
|
needs no layout of its own. */
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
</div>
|
|
233
233
|
<slot name="footer"></slot>
|
|
234
234
|
</div>
|
|
235
|
-
<div class="message" :id="format('%s-validation', uid)" :hidden="not validation.issues
|
|
235
|
+
<div class="message" :id="format('%s-validation', uid)" :hidden="not validation.issues.length">
|
|
236
236
|
<div $each="issue of validation.issues" $value="issue.message"></div>
|
|
237
237
|
</div>
|
|
238
238
|
<div class="sr-only" role="status" aria-live="polite" aria-atomic="true" $value="statusText"></div>
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
height: var(--ui-affordance-guide-size);
|
|
266
266
|
border-radius: var(--ui-radius-round);
|
|
267
267
|
background: var(--ui-affordance-guide-color, var(--ui-border-strong));
|
|
268
|
-
opacity: var(--ui-affordance-guide-opacity);
|
|
268
|
+
opacity: calc(var(--ui-affordance-guide-opacity) * var(--ui-affordance-scope-guide, 1));
|
|
269
269
|
transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
|
|
270
270
|
}
|
|
271
271
|
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
inset: 50% auto auto 50%;
|
|
355
355
|
border-radius: var(--ui-radius-round);
|
|
356
356
|
background: var(--ui-affordance-guide-color, var(--ui-border-strong));
|
|
357
|
-
opacity: var(--ui-affordance-guide-opacity);
|
|
357
|
+
opacity: calc(var(--ui-affordance-guide-opacity) * var(--ui-affordance-scope-guide, 1));
|
|
358
358
|
transform: translate(-50%, -50%);
|
|
359
359
|
transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
|
|
360
360
|
pointer-events: none;
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
block-size: var(--ui-affordance-guide-size);
|
|
113
113
|
border-radius: var(--ui-radius-round);
|
|
114
114
|
background: var(--ui-affordance-guide-color, var(--ui-border-strong));
|
|
115
|
-
opacity: var(--ui-affordance-guide-opacity);
|
|
115
|
+
opacity: calc(var(--ui-affordance-guide-opacity) * var(--ui-affordance-scope-guide, 1));
|
|
116
116
|
transform: translate(-50%, -50%);
|
|
117
117
|
transition: opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
|
|
118
118
|
pointer-events: none;
|
|
@@ -9,25 +9,35 @@
|
|
|
9
9
|
item is a button, for switching views inside the app.</prop>
|
|
10
10
|
<prop name="target" type="string">Where a link opens, as on a native link. Only meaningful with as="a".</prop>
|
|
11
11
|
<prop name="rel" type="string">The link's relationship to its destination, as on a native link. Only meaningful with as="a".</prop>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
<prop name="as" type="button | a" default="button">The native element the item renders: a button, or a link (a) that navigates to href.</prop>
|
|
13
|
+
<!-- A button or a link, as Button does. A button never submits a form; a link carries no type. The
|
|
14
|
+
language has no conditional expression, so a table keyed by a value's text picks each attribute,
|
|
15
|
+
and null leaves it off. -->
|
|
15
16
|
</defs>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
<template $match>
|
|
18
|
+
<a
|
|
19
|
+
$when="as = 'a'"
|
|
20
|
+
:href="href"
|
|
21
|
+
:target="target"
|
|
22
|
+
:rel="rel"
|
|
23
|
+
:aria-current="{ true: 'page', false: null, page: 'page', step: 'step', location: 'location' }[format('%s', current)]"
|
|
24
|
+
>
|
|
25
|
+
<span class="indicator" aria-hidden="true"></span>
|
|
26
|
+
<span class="leading"><slot name="leading"></slot></span>
|
|
27
|
+
<span class="content">
|
|
28
|
+
<span class="label"><slot></slot></span>
|
|
29
|
+
<span class="description"><slot name="description"></slot></span>
|
|
30
|
+
</span>
|
|
31
|
+
</a>
|
|
32
|
+
<button $else type="button" :aria-current="{ true: 'page', false: null, page: 'page', step: 'step', location: 'location' }[format('%s', current)]">
|
|
33
|
+
<span class="indicator" aria-hidden="true"></span>
|
|
34
|
+
<span class="leading"><slot name="leading"></slot></span>
|
|
35
|
+
<span class="content">
|
|
36
|
+
<span class="label"><slot></slot></span>
|
|
37
|
+
<span class="description"><slot name="description"></slot></span>
|
|
38
|
+
</span>
|
|
39
|
+
</button>
|
|
40
|
+
</template>
|
|
31
41
|
<style>
|
|
32
42
|
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
33
43
|
@property --ui-nav-item-current-surface {
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
inset-inline-start: 3px;
|
|
131
131
|
inline-size: 2px;
|
|
132
132
|
background: color-mix(in srgb, var(--ui-affordance-guide-color, var(--ui-border-strong)) 45%, transparent);
|
|
133
|
-
opacity: var(--ui-affordance-guide-opacity);
|
|
133
|
+
opacity: calc(var(--ui-affordance-guide-opacity) * var(--ui-affordance-scope-guide, 1));
|
|
134
134
|
transition:
|
|
135
135
|
background-color var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease),
|
|
136
136
|
opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);
|
|
@@ -13,8 +13,18 @@
|
|
|
13
13
|
exactly, such as an address, in the monospace face.</prop>
|
|
14
14
|
<prop name="truncate" type="boolean" default="false">Keeps the text on one line, ending in an ellipsis when it does not fit.</prop>
|
|
15
15
|
<prop name="align" type="start | center" default="start">Aligns the text within its line.</prop>
|
|
16
|
+
<prop name="as" type="p | span | div | small | strong | label" default="p"
|
|
17
|
+
>The native element the text renders: a paragraph by default, inline span, small, or strong within a line, a div for a block, or a label for a
|
|
18
|
+
control.</prop>
|
|
16
19
|
</defs>
|
|
17
|
-
<
|
|
20
|
+
<template $match>
|
|
21
|
+
<span $when="as = 'span'"><slot></slot></span>
|
|
22
|
+
<div $when="as = 'div'"><slot></slot></div>
|
|
23
|
+
<small $when="as = 'small'"><slot></slot></small>
|
|
24
|
+
<strong $when="as = 'strong'"><slot></slot></strong>
|
|
25
|
+
<label $when="as = 'label'"><slot></slot></label>
|
|
26
|
+
<p $else><slot></slot></p>
|
|
27
|
+
</template>
|
|
18
28
|
<style>
|
|
19
29
|
/* Running text, set on the type scale and in a tone that says what it is, so a view never styles
|
|
20
30
|
text of its own. The root is a paragraph unless as= names a span, div, small, strong, or label. */
|