@threadlabs/looma 0.37.0 → 0.37.2
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 +3 -0
- package/components/ui-button/ui-button.html +3 -12
- package/components/ui-card/ui-card.html +5 -5
- package/components/ui-checkbox/ui-checkbox.html +1 -7
- package/components/ui-color-picker/ui-color-picker.html +0 -9
- package/components/ui-combobox/ui-combobox.html +2 -14
- package/components/ui-cycle-button/ui-cycle-button.html +41 -0
- package/components/ui-cycle-button/ui-cycle-button.js +19 -0
- package/components/ui-dialog/ui-dialog.html +1 -1
- package/components/ui-icon/ui-icon.html +3 -0
- package/components/ui-icon-button/ui-icon-button.html +10 -14
- package/components/ui-input/ui-input.html +4 -19
- package/components/ui-input-group/ui-input-group.html +0 -10
- package/components/ui-menu/ui-menu.html +1 -1
- package/components/ui-popover/ui-popover.html +1 -1
- package/components/ui-radio/ui-radio.html +1 -7
- package/components/ui-select/ui-select.html +4 -10
- package/components/ui-switch/ui-switch.html +1 -7
- package/components/ui-tooltip/ui-tooltip.html +1 -1
- package/dist/index.js +47 -46
- package/docs/README.md +48 -7
- package/docs/card.html +2 -1
- package/docs/catalog.json +224 -49
- package/docs/customizer-render.mjs +7 -6
- package/docs/customizer.js +13 -19
- package/docs/theme.mjs +3 -3
- package/editor/icons.d.ts +3 -0
- package/editor/index.js +4 -1
- package/package.json +2 -2
- package/styles/ui-button.css +2 -14
- package/styles/ui-card.css +1 -1
- package/styles/ui-checkbox.css +0 -9
- package/styles/ui-color-picker.css +0 -13
- package/styles/ui-combobox.css +2 -28
- package/styles/ui-cycle-button.css +36 -0
- package/styles/ui-dialog.css +2 -2
- package/styles/ui-icon-button.css +6 -13
- package/styles/ui-input-group.css +0 -13
- package/styles/ui-input.css +2 -18
- package/styles/ui-menu.css +1 -1
- package/styles/ui-popover.css +1 -1
- package/styles/ui-radio.css +0 -9
- package/styles/ui-select.css +3 -10
- package/styles/ui-switch.css +0 -9
- package/styles/ui-tooltip.css +1 -1
- package/theme-system.css +14 -14
- package/tokens.css +2 -10
- package/vanilla/UiCycleButton.d.ts +29 -0
- package/vanilla/UiCycleButton.js +85 -0
- package/vanilla/UiIcon.js +1 -1
- package/vanilla/index.js +1 -0
- package/vue/UiButton.vue +2 -11
- package/vue/UiCard.vue +5 -3
- package/vue/UiCheckbox.vue +1 -7
- package/vue/UiColorPicker.vue +0 -9
- package/vue/UiCombobox.vue +3 -27
- package/vue/UiCycleButton.d.ts +69 -0
- package/vue/UiCycleButton.js +2 -0
- package/vue/UiCycleButton.vue +403 -0
- package/vue/UiDialog.vue +6 -2
- package/vue/UiIcon.vue +22 -0
- package/vue/UiIconButton.vue +2 -16
- package/vue/UiInput.vue +2 -23
- package/vue/UiInputGroup.vue +0 -10
- package/vue/UiMenu.vue +3 -1
- package/vue/UiPopover.vue +3 -1
- package/vue/UiRadio.vue +1 -7
- package/vue/UiSelect.vue +3 -9
- package/vue/UiSwitch.vue +1 -7
- package/vue/UiTooltip.vue +3 -1
- package/vue/chunks/UiAffordanceScope.js +1 -1
- 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 +3 -3
- package/vue/chunks/UiCallout.js +1 -1
- package/vue/chunks/UiCard.js +4 -4
- package/vue/chunks/UiCheckbox.js +3 -3
- package/vue/chunks/UiCluster.js +1 -1
- package/vue/chunks/UiColorPicker.js +2 -2
- package/vue/chunks/UiCombobox.js +3 -3
- package/vue/chunks/UiContainer.js +1 -1
- package/vue/chunks/UiContextMenu.js +1 -1
- package/vue/chunks/UiCover.js +1 -1
- package/vue/chunks/UiCurveEditor.js +1 -1
- package/vue/chunks/UiCycleButton.js +352 -0
- package/vue/chunks/UiDescriptionItem.js +1 -1
- package/vue/chunks/UiDescriptionList.js +1 -1
- package/vue/chunks/UiDialog.js +2 -2
- package/vue/chunks/UiDisclosure.js +1 -1
- package/vue/chunks/UiEditable.js +1 -1
- package/vue/chunks/UiEditorBlockActions.js +1 -1
- package/vue/chunks/UiEditorChipEditor.js +1 -1
- package/vue/chunks/UiEditorCodeLanguage.js +1 -1
- package/vue/chunks/UiEditorFootnoteEditor.js +1 -1
- package/vue/chunks/UiEditorImageToolbar.js +1 -1
- package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
- package/vue/chunks/UiEditorLinkCard.js +1 -1
- package/vue/chunks/UiEditorLinkForm.js +1 -1
- package/vue/chunks/UiEditorMentionMenu.js +1 -1
- package/vue/chunks/UiEditorMentionMenuItem.js +1 -1
- package/vue/chunks/UiEditorSlashMenu.js +1 -1
- package/vue/chunks/UiEditorSlashMenuGroup.js +1 -1
- package/vue/chunks/UiEditorSlashMenuItem.js +1 -1
- package/vue/chunks/UiEditorSurface.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 +70 -2
- package/vue/chunks/UiIconButton.js +4 -4
- package/vue/chunks/UiImage.js +1 -1
- package/vue/chunks/UiInput.js +3 -3
- package/vue/chunks/UiInputGroup.js +2 -2
- package/vue/chunks/UiLightEditor.js +1 -1
- package/vue/chunks/UiList.js +1 -1
- package/vue/chunks/UiListItem.js +1 -1
- package/vue/chunks/UiListbox.js +1 -1
- package/vue/chunks/UiMenu.js +2 -2
- package/vue/chunks/UiMenuGroup.js +1 -1
- package/vue/chunks/UiMenuItem.js +1 -1
- package/vue/chunks/UiMeter.js +1 -1
- package/vue/chunks/UiNavItem.js +1 -1
- package/vue/chunks/UiNumberInput.js +1 -1
- package/vue/chunks/UiPageHeader.js +1 -1
- package/vue/chunks/UiPopover.js +2 -2
- package/vue/chunks/UiRadio.js +3 -3
- 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 +3 -3
- package/vue/chunks/UiSeparator.js +1 -1
- package/vue/chunks/UiSidebar.js +1 -1
- package/vue/chunks/UiSlider.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/UiSwatch.js +1 -1
- package/vue/chunks/UiSwitch.js +3 -3
- package/vue/chunks/UiSwitcher.js +1 -1
- package/vue/chunks/UiTable.js +1 -1
- package/vue/chunks/UiTabs.js +1 -1
- package/vue/chunks/UiText.js +1 -1
- package/vue/chunks/UiTextarea.js +1 -1
- package/vue/chunks/UiToast.js +1 -1
- package/vue/chunks/UiToastRegion.js +1 -1
- package/vue/chunks/UiTooltip.js +2 -2
- package/vue/chunks/UiTree.js +1 -1
- package/vue/chunks/UiTreeItem.js +1 -1
- package/vue/chunks/props.js +12 -1
- package/vue/components.css +74 -179
- package/vue/editor/index.js +68 -0
- package/vue/index.d.ts +1 -0
- package/vue/index.js +2 -1
package/styles/ui-select.css
CHANGED
|
@@ -143,16 +143,10 @@
|
|
|
143
143
|
font-size: var(--ui-font-size-md);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
/*
|
|
147
|
-
body-size text: below 16px, iOS zooms the page into the focused field. */
|
|
146
|
+
/* Touch may use body-size text in a small native field to avoid focus zoom; this does not impose a larger visible control height. */
|
|
148
147
|
@media (pointer: coarse) {
|
|
149
|
-
:scope:where([data-component~="ui-select"]) {
|
|
150
|
-
min-block-size: max(var(--ui-control-size-md), var(--ui-control-min-block-size));
|
|
151
|
-
}
|
|
152
|
-
|
|
153
148
|
:scope:where([data-component~="ui-select"])[data-ui-select-state~="size=sm"] {
|
|
154
|
-
|
|
155
|
-
font-size: inherit;
|
|
149
|
+
font-size: var(--ui-font-size-md);
|
|
156
150
|
}
|
|
157
151
|
}
|
|
158
152
|
|
|
@@ -169,8 +163,7 @@
|
|
|
169
163
|
|
|
170
164
|
/* The app's invalid flag, or the browser's own verdict once the user has left an invalid field. */
|
|
171
165
|
|
|
172
|
-
/*
|
|
173
|
-
body-size text: below 16px, iOS zooms the page into the focused field. */
|
|
166
|
+
/* Touch may use body-size text in a small native field to avoid focus zoom; this does not impose a larger visible control height. */
|
|
174
167
|
@media (pointer: coarse) {
|
|
175
168
|
}
|
|
176
169
|
|
package/styles/ui-switch.css
CHANGED
|
@@ -166,12 +166,6 @@
|
|
|
166
166
|
padding-block: max(0px, calc((var(--_row) - max(var(--_line), var(--_ui-switch-track-height, 1.5rem))) / 2)) !important;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
@media (pointer: coarse) {
|
|
170
|
-
:scope:where([data-component~="ui-switch"])[data-ui-switch-state~="size=sm"] {
|
|
171
|
-
--_row: var(--ui-control-min-block-size);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
169
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
176
170
|
:scope:where([data-component~="ui-switch"])[hidden] {
|
|
177
171
|
display: none !important;
|
|
@@ -189,8 +183,5 @@
|
|
|
189
183
|
and the first line centres in that control height, so the label shares a row's baseline.
|
|
190
184
|
Multi-line labels and descriptions still grow downward from that first line. */
|
|
191
185
|
|
|
192
|
-
@media (pointer: coarse) {
|
|
193
|
-
}
|
|
194
|
-
|
|
195
186
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
196
187
|
}
|
package/styles/ui-tooltip.css
CHANGED
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
/* Purpose and measured size shape one shared separation lever. The content plane stays opaque;
|
|
107
107
|
transparency, saturation and edge light belong to the surrounding decorative material. */
|
|
108
108
|
.surface {
|
|
109
|
-
--_ui-material-glassiness: clamp(0, var(--ui-glassiness, 0), 1);
|
|
109
|
+
--_ui-material-glassiness: calc(clamp(0, var(--ui-glassiness, 0), 1) + 2 * pow(clamp(0, var(--ui-glassiness, 0), 1), 4));
|
|
110
110
|
--_ui-material-separation: clamp(0, var(--ui-surface-separation, 0), 1);
|
|
111
111
|
--_ui-material-active: clamp(0, calc((var(--_ui-material-glassiness) + var(--_ui-material-separation)) * 100000), 1);
|
|
112
112
|
--_ui-material-rim: calc((var(--_ui-material-separation) + var(--_ui-material-glassiness) * 0.25) * var(--_ui-material-scale, 0.08) * 8px);
|
package/theme-system.css
CHANGED
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
--ui-control-inset-block-md: max(0px, calc((var(--ui-control-size-md) - var(--ui-font-size-md) * var(--ui-line-height-tight) - 2 * var(--ui-border-width)) / 2));
|
|
56
56
|
--ui-control-inset-block-lg: max(0px, calc((var(--ui-control-size-lg) - var(--ui-font-size-md) * var(--ui-line-height-tight) - 2 * var(--ui-border-width)) / 2));
|
|
57
57
|
--ui-font-size-xs: max(12px, calc(1rem * 0.75));
|
|
58
|
-
--ui-action-inset-sm: var(--ui-space-2);
|
|
59
|
-
--ui-action-inset-md: var(--ui-space-3);
|
|
60
|
-
--ui-action-inset-lg: var(--ui-space-4);
|
|
58
|
+
--ui-action-inset-sm: max(var(--ui-space-2), var(--ui-control-inset-block-sm));
|
|
59
|
+
--ui-action-inset-md: max(var(--ui-space-3), var(--ui-control-inset-block-md));
|
|
60
|
+
--ui-action-inset-lg: max(var(--ui-space-4), var(--ui-control-inset-block-lg));
|
|
61
61
|
|
|
62
62
|
--ui-radius-sm: calc(var(--ui-radius-md) * 0.5);
|
|
63
63
|
--ui-radius-lg: calc(var(--ui-radius-md) * 1.5);
|
|
@@ -74,7 +74,8 @@
|
|
|
74
74
|
--_ui-shadow-x: calc((0.5 - var(--ui-light-x)) * 2);
|
|
75
75
|
--_ui-shadow-y: calc((0.5 - var(--ui-light-y)) * 2);
|
|
76
76
|
--_ui-light-block: calc((0.5 - var(--ui-light-y)) * 2px);
|
|
77
|
-
|
|
77
|
+
/* Catch light at the silhouette, not as a second frame inside the border. */
|
|
78
|
+
--_ui-theme-edge-paint: calc(-1 * var(--_ui-light-inline)) calc(-1 * var(--_ui-light-block)) 0 rgb(255 255 255 / calc(var(--_ui-theme-edge) * var(--ui-light-strength) * 0.3)), var(--_ui-light-inline) var(--_ui-light-block) 0 rgb(0 0 0 / calc(var(--_ui-theme-edge) * 0.1));
|
|
78
79
|
--ui-action-edge: var(--_ui-theme-edge-paint);
|
|
79
80
|
--ui-shadow-xs: calc(1px * var(--_ui-theme-outer) * var(--_ui-shadow-x)) calc(1px * var(--_ui-theme-outer) * var(--_ui-shadow-y)) calc(2px * var(--_ui-theme-outer)) rgb(0 0 0 / 0.08);
|
|
80
81
|
--ui-shadow-sm: calc(1px * var(--_ui-theme-outer) * var(--_ui-shadow-x)) calc(1px * var(--_ui-theme-outer) * var(--_ui-shadow-y)) calc(3px * var(--_ui-theme-outer)) rgb(0 0 0 / 0.12), calc(4px * var(--_ui-theme-outer) * var(--_ui-shadow-x)) calc(4px * var(--_ui-theme-outer) * var(--_ui-shadow-y)) calc(12px * var(--_ui-theme-outer)) rgb(0 0 0 / 0.06);
|
|
@@ -103,13 +104,15 @@
|
|
|
103
104
|
--ui-success-highlight: radial-gradient(ellipse calc(35% + var(--ui-light-spread) * 165%) calc(55% + var(--ui-light-spread) * 200%) at calc(var(--ui-light-x) * 100%) calc(var(--ui-light-y) * 100%), color-mix(in srgb, var(--ui-success-reflection, var(--ui-surface-raised)) calc(var(--ui-finish) * var(--ui-light-strength) * 100%), transparent), transparent 85%);
|
|
104
105
|
--ui-warning-highlight: radial-gradient(ellipse calc(35% + var(--ui-light-spread) * 165%) calc(55% + var(--ui-light-spread) * 200%) at calc(var(--ui-light-x) * 100%) calc(var(--ui-light-y) * 100%), color-mix(in srgb, var(--ui-warning-reflection, var(--ui-surface-raised)) calc(var(--ui-finish) * var(--ui-light-strength) * 100%), transparent), transparent 85%);
|
|
105
106
|
--ui-info-highlight: radial-gradient(ellipse calc(35% + var(--ui-light-spread) * 165%) calc(55% + var(--ui-light-spread) * 200%) at calc(var(--ui-light-x) * 100%) calc(var(--ui-light-y) * 100%), color-mix(in srgb, var(--ui-info-reflection, var(--ui-surface-raised)) calc(var(--ui-finish) * var(--ui-light-strength) * 100%), transparent), transparent 85%);
|
|
106
|
-
|
|
107
|
-
--
|
|
108
|
-
--ui-
|
|
109
|
-
--ui-
|
|
110
|
-
--ui-
|
|
111
|
-
--ui-
|
|
112
|
-
--ui-
|
|
107
|
+
/* Keep the low end gentle; the upper range deliberately reaches beyond restrained ornament. */
|
|
108
|
+
--_ui-theme-glow: calc(clamp(0, var(--ui-glow), 1) + 2 * pow(clamp(0, var(--ui-glow), 1), 4));
|
|
109
|
+
--ui-material-glow: 0 0 calc(18px * var(--_ui-theme-glow)) color-mix(in srgb, var(--ui-accent) calc(var(--_ui-theme-glow) * var(--ui-light-strength) * 18%), transparent);
|
|
110
|
+
--ui-neutral-glow: 0 0 calc(18px * var(--_ui-theme-glow)) color-mix(in srgb, var(--ui-text) calc(var(--_ui-theme-glow) * var(--ui-light-strength) * 18%), transparent);
|
|
111
|
+
--ui-accent-glow: 0 0 calc(18px * var(--_ui-theme-glow)) color-mix(in srgb, var(--ui-accent) calc(var(--_ui-theme-glow) * var(--ui-light-strength) * 18%), transparent);
|
|
112
|
+
--ui-danger-glow: 0 0 calc(18px * var(--_ui-theme-glow)) color-mix(in srgb, var(--ui-danger) calc(var(--_ui-theme-glow) * var(--ui-light-strength) * 18%), transparent);
|
|
113
|
+
--ui-success-glow: 0 0 calc(18px * var(--_ui-theme-glow)) color-mix(in srgb, var(--ui-success) calc(var(--_ui-theme-glow) * var(--ui-light-strength) * 18%), transparent);
|
|
114
|
+
--ui-warning-glow: 0 0 calc(18px * var(--_ui-theme-glow)) color-mix(in srgb, var(--ui-warning) calc(var(--_ui-theme-glow) * var(--ui-light-strength) * 18%), transparent);
|
|
115
|
+
--ui-info-glow: 0 0 calc(18px * var(--_ui-theme-glow)) color-mix(in srgb, var(--ui-info) calc(var(--_ui-theme-glow) * var(--ui-light-strength) * 18%), transparent);
|
|
113
116
|
--ui-raised-highlight: var(--ui-surface-highlight);
|
|
114
117
|
|
|
115
118
|
/* Existing timing and easing names stay canonical. */
|
|
@@ -121,9 +124,6 @@
|
|
|
121
124
|
|
|
122
125
|
@media (pointer: coarse) {
|
|
123
126
|
:where(:root, [data-theme], [data-contrast]) {
|
|
124
|
-
--ui-control-size-sm: max(calc(var(--ui-control-size) / var(--_ui-theme-ratio)), var(--ui-control-min-block-size));
|
|
125
|
-
--ui-control-size-md: calc(var(--ui-control-size-sm) * var(--_ui-theme-ratio));
|
|
126
|
-
--ui-control-size-lg: calc(var(--ui-control-size-md) * var(--_ui-theme-ratio));
|
|
127
127
|
/* Small native fields use body-size text on touch to avoid focus zoom. */
|
|
128
128
|
--ui-control-inset-block-sm: max(0px, calc((var(--ui-control-size-sm) - var(--ui-font-size-md) * var(--ui-line-height-tight) - 2 * var(--ui-border-width)) / 2));
|
|
129
129
|
}
|
package/tokens.css
CHANGED
|
@@ -78,8 +78,7 @@
|
|
|
78
78
|
/* Controls: the contract every button and field shares. */
|
|
79
79
|
--ui-control-size: 2.5rem;
|
|
80
80
|
--ui-control-size-sm: 2rem;
|
|
81
|
-
/*
|
|
82
|
-
a touch target below 44. */
|
|
81
|
+
/* Adjustable comfort preference for expanded targets, independent of visible control size. */
|
|
83
82
|
--ui-control-min-block-size: 44px;
|
|
84
83
|
}
|
|
85
84
|
|
|
@@ -286,14 +285,7 @@
|
|
|
286
285
|
--ui-motion-fast: 0ms;
|
|
287
286
|
}
|
|
288
287
|
}
|
|
289
|
-
|
|
290
|
-
@media (pointer: coarse) {
|
|
291
|
-
:root, :where([data-theme], [data-contrast]) {
|
|
292
|
-
--ui-control-size-sm: max(calc(var(--ui-control-size) / 1.2), var(--ui-control-min-block-size));
|
|
293
|
-
--ui-control-size-md: calc(var(--ui-control-size-sm) * 1.2);
|
|
294
|
-
--ui-control-size-lg: calc(var(--ui-control-size-md) * 1.2);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
288
|
+
|
|
297
289
|
|
|
298
290
|
}
|
|
299
291
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.69 for Vanilla DOM. Do not edit.
|
|
2
|
+
export interface UiCycleButtonEventMap {
|
|
3
|
+
change: CustomEvent<{ readonly value: string; readonly index: number }>;
|
|
4
|
+
}
|
|
5
|
+
export interface UiCycleButtonElement extends HTMLSpanElement {
|
|
6
|
+
addEventListener<K extends keyof UiCycleButtonEventMap>(type: K, listener: (this: UiCycleButtonElement, event: UiCycleButtonEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
7
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: UiCycleButtonElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
8
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
9
|
+
removeEventListener<K extends keyof UiCycleButtonEventMap>(type: K, listener: (this: UiCycleButtonElement, event: UiCycleButtonEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
10
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: UiCycleButtonElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
11
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
12
|
+
}
|
|
13
|
+
export interface UiCycleButtonProps {
|
|
14
|
+
disabled?: boolean | null;
|
|
15
|
+
index?: number | null;
|
|
16
|
+
items: readonly ({ readonly value: string; readonly label: string; readonly icon: string })[];
|
|
17
|
+
label?: string | null;
|
|
18
|
+
size?: "sm" | "md" | "lg" | null;
|
|
19
|
+
variant?: "ghost" | "outline" | "solid" | null;
|
|
20
|
+
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
21
|
+
children?: readonly (string | Node)[];
|
|
22
|
+
slots?: Readonly<Record<string, readonly (string | Node)[]>>;
|
|
23
|
+
}
|
|
24
|
+
export declare function createUiCycleButton(props: UiCycleButtonProps): UiCycleButtonElement;
|
|
25
|
+
declare global {
|
|
26
|
+
interface ComponentTagMap {
|
|
27
|
+
"ui-cycle-button": { element: UiCycleButtonElement; props: Omit<UiCycleButtonProps, "attributes" | "children" | "slots"> };
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.69 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, stateInitializers, binaryValue, buildTemplate, checkReference, defaultValue, NONCONFORMING, readDeclared, readFailing, readIndex, readMember, textCall, toAttribute, truthy, writeAttribute, computedCycle, dispatchDeclared, detailCheck, formatOf, keywordFormat, acceptProps, manageProps, generatedInputs, awaitInput, evaluateInput, inputRead, inputDefault, READY_INPUT, UNRESOLVED_INPUT, notifyPropertySet, ABSENT, readonlyView, checkBoolean, checkFormat, checkList, checkNumber, checkObject, checkString, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
|
+
import * as controller from "../components/ui-cycle-button/ui-cycle-button.js";
|
|
4
|
+
import "../styles/ui-cycle-button.css";
|
|
5
|
+
|
|
6
|
+
const T0 = ["",[],["ui-icon-button",["tone","neutral","aria-description","Activate to choose the next state."],["ui-icon",[]]]];
|
|
7
|
+
let P0;
|
|
8
|
+
const S = { n: ["current","selected"], t: ["n","?"], f: import.meta.url, g: "ui-cycle-button", k: 1, d: { "change": [detailCheck(checkObject([["value", checkString, false], ["index", checkNumber, false]], false)), true, true, false] }, x: dispatchDeclared, r: readonlyView, a: (host, I) => C(host, I), b: generatedInputs };
|
|
9
|
+
const D = { g: "ui-cycle-button", props: { "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "index": { "required":false,"default":0, c: checkNumber, t: "number", j: 0, m: "n" }, "items": { "required":true, c: checkList(checkObject([["value", checkString, false], ["label", checkString, false], ["icon", checkString, false]], false)), j: 1, m: ["l",["o",["value","s","label","s","icon","s"]]] }, "label": { "required":false,"default":"State", c: checkString, t: "string", j: 0, m: "s" }, "size": { "required":false,"values":["sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["ghost","outline","solid"],"default":"outline", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
|
|
10
|
+
const C = (host) => activateModule(controller, host);
|
|
11
|
+
|
|
12
|
+
export function createUiCycleButton(options, html) {
|
|
13
|
+
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
14
|
+
const element = document.createElement("span");
|
|
15
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
16
|
+
if (value === null || value === undefined || value === false) continue;
|
|
17
|
+
element.setAttribute(name, value === true ? "" : String(value));
|
|
18
|
+
}
|
|
19
|
+
element.setAttribute("data-component", "ui-cycle-button");
|
|
20
|
+
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
21
|
+
const v = [null, undefined, null, null, null, null, null, null];
|
|
22
|
+
const B = acceptProps(element, D, S.n, v, componentProps, [], html);
|
|
23
|
+
const CS = [];
|
|
24
|
+
const inputStatus = (j) => { if (j === 0) return E.status(j); if (j >= 1 && j < 2) { g(j); return CS[j] ?? UNRESOLVED_INPUT; } if (j === 2) return awaitInput(B, "disabled", true); if (j === 3) return awaitInput(B, "index", true); if (j === 4) return awaitInput(B, "items", true); if (j === 5) return awaitInput(B, "label", true); if (j === 6) return awaitInput(B, "size", true); if (j === 7) return awaitInput(B, "variant", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
|
|
25
|
+
const X = { e: 0, g: (j) => g(j), w: new Set(), a: CS, i: inputStatus };
|
|
26
|
+
const ke = [];
|
|
27
|
+
const K = [() => (checkReference(S, v[0], "n", "expression:default($items[default($current, 0)], $items[0]):current", "Reference `current` must satisfy number.") && checkReference(S, readDeclared(v[4], ["0"]), ["o",["value","s","label","s","icon","s"]], "expression:default($items[default($current, 0)], $items[0]):items.0", "Reference `items.0` must satisfy object({ value: string, label: string, icon: string }).") ? inputDefault(() => readIndex(inputRead(v[4], inputStatus(4)), inputDefault(() => inputRead(E.read(0), inputStatus(0)), () => 0, ABSENT)), () => readIndex(inputRead(v[4], inputStatus(4)), 0), ABSENT) : NONCONFORMING)];
|
|
28
|
+
const g = (j) => {
|
|
29
|
+
const i = j - 1;
|
|
30
|
+
if (ke[i] === X.e) return v[j];
|
|
31
|
+
if (ke[i] === -1) computedCycle();
|
|
32
|
+
ke[i] = -1;
|
|
33
|
+
let next;
|
|
34
|
+
try { const result = evaluateInput(K[i], CS[j], NONCONFORMING), previousStatus = CS[j]; CS[j] = result.status; notifyPropertySet(CS, j, previousStatus, result.status, undefined); next = !result.status.ready ? null : result.value === NONCONFORMING ? v[j] : result.value; } catch (error) { ke[i] = undefined; throw error; }
|
|
35
|
+
ke[i] = X.e;
|
|
36
|
+
const previous = v[j];
|
|
37
|
+
if (!Object.is(previous, next)) { v[j] = next; X.n?.(j, previous, next); }
|
|
38
|
+
return next;
|
|
39
|
+
};
|
|
40
|
+
const E = stateInitializers(S, v, X, { 0: () => inputRead(v[3], inputStatus(3)) });
|
|
41
|
+
const p0 = (r, c, d) => {
|
|
42
|
+
if (c & 1073741873) {
|
|
43
|
+
const x0 = textCall("concat", [v[5], ": ", defaultValue(readFailing(g(1), "label"), "No choices")]);
|
|
44
|
+
if (x0 !== NONCONFORMING) {
|
|
45
|
+
const s0 = toAttribute(x0, "label");
|
|
46
|
+
if (s0 !== r.v0) writeAttribute(r.a0, "label", r.v0 = s0);
|
|
47
|
+
}
|
|
48
|
+
if (x0 !== NONCONFORMING) {
|
|
49
|
+
const s1 = toAttribute(x0, "title");
|
|
50
|
+
if (s1 !== r.v1) writeAttribute(r.a0, "title", r.v1 = s1);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (c & 1073741888) {
|
|
54
|
+
const x1 = v[6];
|
|
55
|
+
const s2 = toAttribute(x1, "size");
|
|
56
|
+
if (s2 !== r.v2) writeAttribute(r.a0, "size", r.v2 = s2);
|
|
57
|
+
}
|
|
58
|
+
if (c & 1073741952) {
|
|
59
|
+
const x2 = v[7];
|
|
60
|
+
const s3 = toAttribute(x2, "variant");
|
|
61
|
+
if (s3 !== r.v3) writeAttribute(r.a0, "variant", r.v3 = s3);
|
|
62
|
+
}
|
|
63
|
+
if (c & 1073741844) {
|
|
64
|
+
const x3 = (truthy(v[2]) || truthy(binaryValue("<", readMember(v[4], "length"), 2)));
|
|
65
|
+
const s4 = toAttribute(x3, "disabled");
|
|
66
|
+
if (s4 !== r.v4) writeAttribute(r.a0, "disabled", r.v4 = s4);
|
|
67
|
+
}
|
|
68
|
+
if (c & 1073741841) {
|
|
69
|
+
const x4 = defaultValue(readFailing(g(1), "icon"), "");
|
|
70
|
+
if (x4 !== NONCONFORMING) {
|
|
71
|
+
const s5 = toAttribute(x4, "name");
|
|
72
|
+
if (s5 !== r.v5) writeAttribute(r.a1, "name", r.v5 = s5);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const t0 = element.firstChild;
|
|
77
|
+
const t1 = t0.firstChild;
|
|
78
|
+
const R = { a0: t0, a1: t1, v0: null, v1: null, v2: null, v3: null, v4: null, v5: null };
|
|
79
|
+
const I = { B, U: E };
|
|
80
|
+
I.R = new Set();
|
|
81
|
+
attachGeneratedController(element, S, v, (c, d) => { ((c, d) => p0(R, c, d))(c, d); for (const f of I.R) f(c, d); }, undefined, X, I);
|
|
82
|
+
manageProps(I);
|
|
83
|
+
return element;
|
|
84
|
+
}
|
|
85
|
+
defineComponent("ui-cycle-button", createUiCycleButton, ["disabled","index","items","label","size","variant"]);
|
package/vanilla/UiIcon.js
CHANGED
|
@@ -29,7 +29,7 @@ export function createUiIcon(options = {}, html) {
|
|
|
29
29
|
const inputStatus = (j) => { if (j >= 0 && j < 1) { g(j); return CS[j] ?? UNRESOLVED_INPUT; } if (j === 1) return awaitInput(B, "name", true); if (j === 2) return awaitInput(B, "tone", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
|
|
30
30
|
const X = { e: 0, g: (j) => g(j), w: new Set(), a: CS, i: inputStatus };
|
|
31
31
|
const ke = [];
|
|
32
|
-
const K = [() => readIndex({ "align-center": [{ "tag": "path", "d": "M21 5H3" }, { "tag": "path", "d": "M17 12H7" }, { "tag": "path", "d": "M19 19H5" }], "align-left": [{ "tag": "path", "d": "M21 5H3" }, { "tag": "path", "d": "M15 12H3" }, { "tag": "path", "d": "M17 19H3" }], "align-right": [{ "tag": "path", "d": "M21 5H3" }, { "tag": "path", "d": "M21 12H9" }, { "tag": "path", "d": "M21 19H7" }], "arrow-left": [{ "tag": "path", "d": "m12 19-7-7 7-7" }, { "tag": "path", "d": "M19 12H5" }], "bell": [{ "tag": "path", "d": "M10.268 21a2 2 0 0 0 3.464 0" }, { "tag": "path", "d": "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }], "bold": [{ "tag": "path", "d": "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" }], "book-user": [{ "tag": "path", "d": "M15 13a3 3 0 1 0-6 0" }, { "tag": "path", "d": "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }, { "tag": "circle", "cx": "12", "cy": "8", "r": "2" }], "braces": [{ "tag": "path", "d": "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1" }, { "tag": "path", "d": "M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1" }], "calculator": [{ "tag": "rect", "width": "16", "height": "20", "x": "4", "y": "2", "rx": "2" }, { "tag": "line", "x1": "8", "x2": "16", "y1": "6", "y2": "6" }, { "tag": "line", "x1": "16", "x2": "16", "y1": "14", "y2": "18" }, { "tag": "path", "d": "M16 10h.01" }, { "tag": "path", "d": "M12 10h.01" }, { "tag": "path", "d": "M8 10h.01" }, { "tag": "path", "d": "M12 14h.01" }, { "tag": "path", "d": "M8 14h.01" }, { "tag": "path", "d": "M12 18h.01" }, { "tag": "path", "d": "M8 18h.01" }], "check": [{ "tag": "path", "d": "M20 6 9 17l-5-5" }], "chevron-down": [{ "tag": "path", "d": "m6 9 6 6 6-6" }], "chevron-left": [{ "tag": "path", "d": "m15 18-6-6 6-6" }], "chevron-right": [{ "tag": "path", "d": "m9 18 6-6-6-6" }], "circle-check": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "m9 12 2 2 4-4" }], "circle-dot": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "circle", "cx": "12", "cy": "12", "r": "1" }], "circle-x": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "m15 9-6 6" }, { "tag": "path", "d": "m9 9 6 6" }], "code-xml": [{ "tag": "path", "d": "m18 16 4-4-4-4" }, { "tag": "path", "d": "m6 8-4 4 4 4" }, { "tag": "path", "d": "m14.5 4-5 16" }], "columns": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M9 3v18" }, { "tag": "path", "d": "M15 3v18" }], "compass": [{ "tag": "path", "d": "m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" }, { "tag": "circle", "cx": "12", "cy": "12", "r": "10" }], "credit-card": [{ "tag": "rect", "width": "20", "height": "14", "x": "2", "y": "5", "rx": "2" }, { "tag": "line", "x1": "2", "x2": "22", "y1": "10", "y2": "10" }], "ellipsis": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "19", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "5", "cy": "12", "r": "1" }], "eraser": [{ "tag": "path", "d": "M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21" }, { "tag": "path", "d": "m5.082 11.09 8.828 8.828" }], "external-link": [{ "tag": "path", "d": "M15 3h6v6" }, { "tag": "path", "d": "M10 14 21 3" }, { "tag": "path", "d": "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }], "file-text": [{ "tag": "path", "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }, { "tag": "path", "d": "M14 2v5a1 1 0 0 0 1 1h5" }, { "tag": "path", "d": "M10 9H8" }, { "tag": "path", "d": "M16 13H8" }, { "tag": "path", "d": "M16 17H8" }], "folder": [{ "tag": "path", "d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }], "grip-horizontal": [{ "tag": "circle", "cx": "12", "cy": "9", "r": "1" }, { "tag": "circle", "cx": "19", "cy": "9", "r": "1" }, { "tag": "circle", "cx": "5", "cy": "9", "r": "1" }, { "tag": "circle", "cx": "12", "cy": "15", "r": "1" }, { "tag": "circle", "cx": "19", "cy": "15", "r": "1" }, { "tag": "circle", "cx": "5", "cy": "15", "r": "1" }], "grip-vertical": [{ "tag": "circle", "cx": "9", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "9", "cy": "5", "r": "1" }, { "tag": "circle", "cx": "9", "cy": "19", "r": "1" }, { "tag": "circle", "cx": "15", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "15", "cy": "5", "r": "1" }, { "tag": "circle", "cx": "15", "cy": "19", "r": "1" }], "heading-1": [{ "tag": "path", "d": "M4 12h8" }, { "tag": "path", "d": "M4 18V6" }, { "tag": "path", "d": "M12 18V6" }, { "tag": "path", "d": "m17 12 3-2v8" }], "heading-2": [{ "tag": "path", "d": "M4 12h8" }, { "tag": "path", "d": "M4 18V6" }, { "tag": "path", "d": "M12 18V6" }, { "tag": "path", "d": "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" }], "heading-3": [{ "tag": "path", "d": "M4 12h8" }, { "tag": "path", "d": "M4 18V6" }, { "tag": "path", "d": "M12 18V6" }, { "tag": "path", "d": "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" }, { "tag": "path", "d": "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }], "help": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }, { "tag": "path", "d": "M12 17h.01" }], "highlighter": [{ "tag": "path", "d": "m9 11-6 6v3h9l3-3" }, { "tag": "path", "d": "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4" }], "history": [{ "tag": "path", "d": "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }, { "tag": "path", "d": "M3 3v5h5" }, { "tag": "path", "d": "M12 7v5l4 2" }], "image": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2", "ry": "2" }, { "tag": "circle", "cx": "9", "cy": "9", "r": "2" }, { "tag": "path", "d": "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }], "info": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "M12 16v-4" }, { "tag": "path", "d": "M12 8h.01" }], "italic": [{ "tag": "line", "x1": "19", "x2": "10", "y1": "4", "y2": "4" }, { "tag": "line", "x1": "14", "x2": "5", "y1": "20", "y2": "20" }, { "tag": "line", "x1": "15", "x2": "9", "y1": "4", "y2": "20" }], "layout-dashboard": [{ "tag": "rect", "width": "7", "height": "9", "x": "3", "y": "3", "rx": "1" }, { "tag": "rect", "width": "7", "height": "5", "x": "14", "y": "3", "rx": "1" }, { "tag": "rect", "width": "7", "height": "9", "x": "14", "y": "12", "rx": "1" }, { "tag": "rect", "width": "7", "height": "5", "x": "3", "y": "16", "rx": "1" }], "lightbulb": [{ "tag": "path", "d": "M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" }, { "tag": "path", "d": "M9 18h6" }, { "tag": "path", "d": "M10 22h4" }], "link": [{ "tag": "path", "d": "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }, { "tag": "path", "d": "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" }], "list": [{ "tag": "path", "d": "M3 5h.01" }, { "tag": "path", "d": "M3 12h.01" }, { "tag": "path", "d": "M3 19h.01" }, { "tag": "path", "d": "M8 5h13" }, { "tag": "path", "d": "M8 12h13" }, { "tag": "path", "d": "M8 19h13" }], "list-ordered": [{ "tag": "path", "d": "M11 5h10" }, { "tag": "path", "d": "M11 12h10" }, { "tag": "path", "d": "M11 19h10" }, { "tag": "path", "d": "M4 4h1v5" }, { "tag": "path", "d": "M4 9h2" }, { "tag": "path", "d": "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" }], "list-todo": [{ "tag": "path", "d": "M13 5h8" }, { "tag": "path", "d": "M13 12h8" }, { "tag": "path", "d": "M13 19h8" }, { "tag": "path", "d": "m3 17 2 2 4-4" }, { "tag": "rect", "x": "3", "y": "4", "width": "6", "height": "6", "rx": "1" }], "loader": [{ "tag": "path", "d": "M21 12a9 9 0 1 1-6.219-8.56" }], "merge": [{ "tag": "path", "d": "m8 6 4-4 4 4" }, { "tag": "path", "d": "M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22" }, { "tag": "path", "d": "m20 22-5-5" }], "message-square-warning": [{ "tag": "path", "d": "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }, { "tag": "path", "d": "M12 15h.01" }, { "tag": "path", "d": "M12 7v4" }], "minus": [{ "tag": "path", "d": "M5 12h14" }], "notebook-pen": [{ "tag": "path", "d": "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4" }, { "tag": "path", "d": "M2 6h4" }, { "tag": "path", "d": "M2 10h4" }, { "tag": "path", "d": "M2 14h4" }, { "tag": "path", "d": "M2 18h4" }, { "tag": "path", "d": "M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }], "paint-bucket": [{ "tag": "path", "d": "m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z" }, { "tag": "path", "d": "m5 2 5 5" }, { "tag": "path", "d": "M2 13h15" }, { "tag": "path", "d": "M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z" }], "panel-bottom": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M3 15h18" }], "panel-left": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M9 3v18" }], "panel-right": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M15 3v18" }], "panel-top": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M3 9h18" }], "paperclip": [{ "tag": "path", "d": "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }], "pencil": [{ "tag": "path", "d": "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, { "tag": "path", "d": "m15 5 4 4" }], "pilcrow": [{ "tag": "path", "d": "M13 4v16" }, { "tag": "path", "d": "M17 4v16" }, { "tag": "path", "d": "M19 4H9.5a4.5 4.5 0 0 0 0 9H13" }], "plus": [{ "tag": "path", "d": "M5 12h14" }, { "tag": "path", "d": "M12 5v14" }], "quote": [{ "tag": "path", "d": "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" }, { "tag": "path", "d": "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" }], "receipt": [{ "tag": "path", "d": "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" }, { "tag": "path", "d": "M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8" }, { "tag": "path", "d": "M12 17.5v-11" }], "redo": [{ "tag": "path", "d": "m15 14 5-5-5-5" }, { "tag": "path", "d": "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" }], "rows": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M21 9H3" }, { "tag": "path", "d": "M21 15H3" }], "search": [{ "tag": "path", "d": "m21 21-4.34-4.34" }, { "tag": "circle", "cx": "11", "cy": "11", "r": "8" }], "settings": [{ "tag": "path", "d": "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }, { "tag": "circle", "cx": "12", "cy": "12", "r": "3" }], "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" }], "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" }], "superscript": [{ "tag": "path", "d": "m4 19 8-8" }, { "tag": "path", "d": "m12 19-8-8" }, { "tag": "path", "d": "M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06" }], "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" }], "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" }], "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" }], "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" }], "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" }], "underline": [{ "tag": "path", "d": "M6 4v6a6 6 0 0 0 12 0V4" }, { "tag": "line", "x1": "4", "x2": "20", "y1": "20", "y2": "20" }], "undo": [{ "tag": "path", "d": "M9 14 4 9l5-5" }, { "tag": "path", "d": "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" }], "unlink": [{ "tag": "path", "d": "m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71" }, { "tag": "path", "d": "m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71" }, { "tag": "line", "x1": "8", "x2": "8", "y1": "2", "y2": "5" }, { "tag": "line", "x1": "2", "x2": "5", "y1": "8", "y2": "8" }, { "tag": "line", "x1": "16", "x2": "16", "y1": "19", "y2": "22" }, { "tag": "line", "x1": "19", "x2": "22", "y1": "16", "y2": "16" }], "user-round": [{ "tag": "circle", "cx": "12", "cy": "8", "r": "5" }, { "tag": "path", "d": "M20 21a8 8 0 0 0-16 0" }], "users": [{ "tag": "path", "d": "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }, { "tag": "path", "d": "M16 3.128a4 4 0 0 1 0 7.744" }, { "tag": "path", "d": "M22 21v-2a4 4 0 0 0-3-3.87" }, { "tag": "circle", "cx": "9", "cy": "7", "r": "4" }], "x": [{ "tag": "path", "d": "M18 6 6 18" }, { "tag": "path", "d": "m6 6 12 12" }] }, inputRead(v[1], inputStatus(1)))];
|
|
32
|
+
const K = [() => readIndex({ "align-center": [{ "tag": "path", "d": "M21 5H3" }, { "tag": "path", "d": "M17 12H7" }, { "tag": "path", "d": "M19 19H5" }], "align-left": [{ "tag": "path", "d": "M21 5H3" }, { "tag": "path", "d": "M15 12H3" }, { "tag": "path", "d": "M17 19H3" }], "align-right": [{ "tag": "path", "d": "M21 5H3" }, { "tag": "path", "d": "M21 12H9" }, { "tag": "path", "d": "M21 19H7" }], "arrow-left": [{ "tag": "path", "d": "m12 19-7-7 7-7" }, { "tag": "path", "d": "M19 12H5" }], "bell": [{ "tag": "path", "d": "M10.268 21a2 2 0 0 0 3.464 0" }, { "tag": "path", "d": "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }], "bold": [{ "tag": "path", "d": "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" }], "book-user": [{ "tag": "path", "d": "M15 13a3 3 0 1 0-6 0" }, { "tag": "path", "d": "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }, { "tag": "circle", "cx": "12", "cy": "8", "r": "2" }], "braces": [{ "tag": "path", "d": "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1" }, { "tag": "path", "d": "M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1" }], "calculator": [{ "tag": "rect", "width": "16", "height": "20", "x": "4", "y": "2", "rx": "2" }, { "tag": "line", "x1": "8", "x2": "16", "y1": "6", "y2": "6" }, { "tag": "line", "x1": "16", "x2": "16", "y1": "14", "y2": "18" }, { "tag": "path", "d": "M16 10h.01" }, { "tag": "path", "d": "M12 10h.01" }, { "tag": "path", "d": "M8 10h.01" }, { "tag": "path", "d": "M12 14h.01" }, { "tag": "path", "d": "M8 14h.01" }, { "tag": "path", "d": "M12 18h.01" }, { "tag": "path", "d": "M8 18h.01" }], "check": [{ "tag": "path", "d": "M20 6 9 17l-5-5" }], "chevron-down": [{ "tag": "path", "d": "m6 9 6 6 6-6" }], "chevron-left": [{ "tag": "path", "d": "m15 18-6-6 6-6" }], "chevron-right": [{ "tag": "path", "d": "m9 18 6-6-6-6" }], "circle-check": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "m9 12 2 2 4-4" }], "circle-dot": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "circle", "cx": "12", "cy": "12", "r": "1" }], "circle-x": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "m15 9-6 6" }, { "tag": "path", "d": "m9 9 6 6" }], "code-xml": [{ "tag": "path", "d": "m18 16 4-4-4-4" }, { "tag": "path", "d": "m6 8-4 4 4 4" }, { "tag": "path", "d": "m14.5 4-5 16" }], "columns": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M9 3v18" }, { "tag": "path", "d": "M15 3v18" }], "compass": [{ "tag": "path", "d": "m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" }, { "tag": "circle", "cx": "12", "cy": "12", "r": "10" }], "credit-card": [{ "tag": "rect", "width": "20", "height": "14", "x": "2", "y": "5", "rx": "2" }, { "tag": "line", "x1": "2", "x2": "22", "y1": "10", "y2": "10" }], "ellipsis": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "19", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "5", "cy": "12", "r": "1" }], "eraser": [{ "tag": "path", "d": "M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21" }, { "tag": "path", "d": "m5.082 11.09 8.828 8.828" }], "external-link": [{ "tag": "path", "d": "M15 3h6v6" }, { "tag": "path", "d": "M10 14 21 3" }, { "tag": "path", "d": "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }], "file-text": [{ "tag": "path", "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }, { "tag": "path", "d": "M14 2v5a1 1 0 0 0 1 1h5" }, { "tag": "path", "d": "M10 9H8" }, { "tag": "path", "d": "M16 13H8" }, { "tag": "path", "d": "M16 17H8" }], "folder": [{ "tag": "path", "d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }], "grip-horizontal": [{ "tag": "circle", "cx": "12", "cy": "9", "r": "1" }, { "tag": "circle", "cx": "19", "cy": "9", "r": "1" }, { "tag": "circle", "cx": "5", "cy": "9", "r": "1" }, { "tag": "circle", "cx": "12", "cy": "15", "r": "1" }, { "tag": "circle", "cx": "19", "cy": "15", "r": "1" }, { "tag": "circle", "cx": "5", "cy": "15", "r": "1" }], "grip-vertical": [{ "tag": "circle", "cx": "9", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "9", "cy": "5", "r": "1" }, { "tag": "circle", "cx": "9", "cy": "19", "r": "1" }, { "tag": "circle", "cx": "15", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "15", "cy": "5", "r": "1" }, { "tag": "circle", "cx": "15", "cy": "19", "r": "1" }], "heading-1": [{ "tag": "path", "d": "M4 12h8" }, { "tag": "path", "d": "M4 18V6" }, { "tag": "path", "d": "M12 18V6" }, { "tag": "path", "d": "m17 12 3-2v8" }], "heading-2": [{ "tag": "path", "d": "M4 12h8" }, { "tag": "path", "d": "M4 18V6" }, { "tag": "path", "d": "M12 18V6" }, { "tag": "path", "d": "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" }], "heading-3": [{ "tag": "path", "d": "M4 12h8" }, { "tag": "path", "d": "M4 18V6" }, { "tag": "path", "d": "M12 18V6" }, { "tag": "path", "d": "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" }, { "tag": "path", "d": "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }], "help": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }, { "tag": "path", "d": "M12 17h.01" }], "highlighter": [{ "tag": "path", "d": "m9 11-6 6v3h9l3-3" }, { "tag": "path", "d": "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4" }], "history": [{ "tag": "path", "d": "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }, { "tag": "path", "d": "M3 3v5h5" }, { "tag": "path", "d": "M12 7v5l4 2" }], "image": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2", "ry": "2" }, { "tag": "circle", "cx": "9", "cy": "9", "r": "2" }, { "tag": "path", "d": "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }], "info": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "M12 16v-4" }, { "tag": "path", "d": "M12 8h.01" }], "italic": [{ "tag": "line", "x1": "19", "x2": "10", "y1": "4", "y2": "4" }, { "tag": "line", "x1": "14", "x2": "5", "y1": "20", "y2": "20" }, { "tag": "line", "x1": "15", "x2": "9", "y1": "4", "y2": "20" }], "layout-dashboard": [{ "tag": "rect", "width": "7", "height": "9", "x": "3", "y": "3", "rx": "1" }, { "tag": "rect", "width": "7", "height": "5", "x": "14", "y": "3", "rx": "1" }, { "tag": "rect", "width": "7", "height": "9", "x": "14", "y": "12", "rx": "1" }, { "tag": "rect", "width": "7", "height": "5", "x": "3", "y": "16", "rx": "1" }], "lightbulb": [{ "tag": "path", "d": "M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" }, { "tag": "path", "d": "M9 18h6" }, { "tag": "path", "d": "M10 22h4" }], "link": [{ "tag": "path", "d": "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }, { "tag": "path", "d": "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" }], "list": [{ "tag": "path", "d": "M3 5h.01" }, { "tag": "path", "d": "M3 12h.01" }, { "tag": "path", "d": "M3 19h.01" }, { "tag": "path", "d": "M8 5h13" }, { "tag": "path", "d": "M8 12h13" }, { "tag": "path", "d": "M8 19h13" }], "list-ordered": [{ "tag": "path", "d": "M11 5h10" }, { "tag": "path", "d": "M11 12h10" }, { "tag": "path", "d": "M11 19h10" }, { "tag": "path", "d": "M4 4h1v5" }, { "tag": "path", "d": "M4 9h2" }, { "tag": "path", "d": "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" }], "list-todo": [{ "tag": "path", "d": "M13 5h8" }, { "tag": "path", "d": "M13 12h8" }, { "tag": "path", "d": "M13 19h8" }, { "tag": "path", "d": "m3 17 2 2 4-4" }, { "tag": "rect", "x": "3", "y": "4", "width": "6", "height": "6", "rx": "1" }], "loader": [{ "tag": "path", "d": "M21 12a9 9 0 1 1-6.219-8.56" }], "merge": [{ "tag": "path", "d": "m8 6 4-4 4 4" }, { "tag": "path", "d": "M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22" }, { "tag": "path", "d": "m20 22-5-5" }], "message-square-warning": [{ "tag": "path", "d": "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }, { "tag": "path", "d": "M12 15h.01" }, { "tag": "path", "d": "M12 7v4" }], "minus": [{ "tag": "path", "d": "M5 12h14" }], "monitor": [{ "tag": "rect", "width": "20", "height": "14", "x": "2", "y": "3", "rx": "2" }, { "tag": "line", "x1": "8", "x2": "16", "y1": "21", "y2": "21" }, { "tag": "line", "x1": "12", "x2": "12", "y1": "17", "y2": "21" }], "moon": [{ "tag": "path", "d": "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" }], "notebook-pen": [{ "tag": "path", "d": "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4" }, { "tag": "path", "d": "M2 6h4" }, { "tag": "path", "d": "M2 10h4" }, { "tag": "path", "d": "M2 14h4" }, { "tag": "path", "d": "M2 18h4" }, { "tag": "path", "d": "M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }], "paint-bucket": [{ "tag": "path", "d": "m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z" }, { "tag": "path", "d": "m5 2 5 5" }, { "tag": "path", "d": "M2 13h15" }, { "tag": "path", "d": "M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z" }], "panel-bottom": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M3 15h18" }], "panel-left": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M9 3v18" }], "panel-right": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M15 3v18" }], "panel-top": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M3 9h18" }], "paperclip": [{ "tag": "path", "d": "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" }], "pencil": [{ "tag": "path", "d": "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, { "tag": "path", "d": "m15 5 4 4" }], "pilcrow": [{ "tag": "path", "d": "M13 4v16" }, { "tag": "path", "d": "M17 4v16" }, { "tag": "path", "d": "M19 4H9.5a4.5 4.5 0 0 0 0 9H13" }], "plus": [{ "tag": "path", "d": "M5 12h14" }, { "tag": "path", "d": "M12 5v14" }], "quote": [{ "tag": "path", "d": "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" }, { "tag": "path", "d": "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" }], "receipt": [{ "tag": "path", "d": "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" }, { "tag": "path", "d": "M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8" }, { "tag": "path", "d": "M12 17.5v-11" }], "redo": [{ "tag": "path", "d": "m15 14 5-5-5-5" }, { "tag": "path", "d": "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" }], "rows": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M21 9H3" }, { "tag": "path", "d": "M21 15H3" }], "search": [{ "tag": "path", "d": "m21 21-4.34-4.34" }, { "tag": "circle", "cx": "11", "cy": "11", "r": "8" }], "settings": [{ "tag": "path", "d": "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }, { "tag": "circle", "cx": "12", "cy": "12", "r": "3" }], "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" }], "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" }], "sun": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "4" }, { "tag": "path", "d": "M12 2v2" }, { "tag": "path", "d": "M12 20v2" }, { "tag": "path", "d": "m4.93 4.93 1.41 1.41" }, { "tag": "path", "d": "m17.66 17.66 1.41 1.41" }, { "tag": "path", "d": "M2 12h2" }, { "tag": "path", "d": "M20 12h2" }, { "tag": "path", "d": "m6.34 17.66-1.41 1.41" }, { "tag": "path", "d": "m19.07 4.93-1.41 1.41" }], "superscript": [{ "tag": "path", "d": "m4 19 8-8" }, { "tag": "path", "d": "m12 19-8-8" }, { "tag": "path", "d": "M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06" }], "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" }], "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" }], "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" }], "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" }], "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" }], "underline": [{ "tag": "path", "d": "M6 4v6a6 6 0 0 0 12 0V4" }, { "tag": "line", "x1": "4", "x2": "20", "y1": "20", "y2": "20" }], "undo": [{ "tag": "path", "d": "M9 14 4 9l5-5" }, { "tag": "path", "d": "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" }], "unlink": [{ "tag": "path", "d": "m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71" }, { "tag": "path", "d": "m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71" }, { "tag": "line", "x1": "8", "x2": "8", "y1": "2", "y2": "5" }, { "tag": "line", "x1": "2", "x2": "5", "y1": "8", "y2": "8" }, { "tag": "line", "x1": "16", "x2": "16", "y1": "19", "y2": "22" }, { "tag": "line", "x1": "19", "x2": "22", "y1": "16", "y2": "16" }], "user-round": [{ "tag": "circle", "cx": "12", "cy": "8", "r": "5" }, { "tag": "path", "d": "M20 21a8 8 0 0 0-16 0" }], "users": [{ "tag": "path", "d": "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }, { "tag": "path", "d": "M16 3.128a4 4 0 0 1 0 7.744" }, { "tag": "path", "d": "M22 21v-2a4 4 0 0 0-3-3.87" }, { "tag": "circle", "cx": "9", "cy": "7", "r": "4" }], "x": [{ "tag": "path", "d": "M18 6 6 18" }, { "tag": "path", "d": "m6 6 12 12" }] }, inputRead(v[1], inputStatus(1)))];
|
|
33
33
|
const g = (j) => {
|
|
34
34
|
const i = j - 0;
|
|
35
35
|
if (ke[i] === X.e) return v[j];
|
package/vanilla/index.js
CHANGED
|
@@ -16,6 +16,7 @@ export * from "./UiContainer.js";
|
|
|
16
16
|
export * from "./UiContextMenu.js";
|
|
17
17
|
export * from "./UiCover.js";
|
|
18
18
|
export * from "./UiCurveEditor.js";
|
|
19
|
+
export * from "./UiCycleButton.js";
|
|
19
20
|
export * from "./UiDescriptionItem.js";
|
|
20
21
|
export * from "./UiDescriptionList.js";
|
|
21
22
|
export * from "./UiDialog.js";
|
package/vue/UiButton.vue
CHANGED
|
@@ -113,7 +113,7 @@ const propValidityContract = {
|
|
|
113
113
|
required: false,
|
|
114
114
|
target: { attribute: 'size' },
|
|
115
115
|
description:
|
|
116
|
-
'Height, padding, and type size. xs is 1.5rem with the smallest text, for a control inside a line of small text; sm is the small control height (2rem by\n default) with tighter padding and smaller text, md is the standard control height (2.5rem), and lg is taller (3rem) with roomier padding.
|
|
116
|
+
'Height, padding, and type size. xs is 1.5rem with the smallest text, for a control inside a line of small text; sm is the small control height (2rem by\n default) with tighter padding and smaller text, md is the standard control height (2.5rem), and lg is taller (3rem) with roomier padding. Visible sizes\n stay the same on touch. Inline xs and link actions can gain an adjustable invisible hit area.',
|
|
117
117
|
values: ['xs', 'sm', 'md', 'lg'],
|
|
118
118
|
default: 'md',
|
|
119
119
|
},
|
|
@@ -1037,8 +1037,7 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1037
1037
|
/* The size states outrank :host, so sm is named too, or a small button would stay small. */
|
|
1038
1038
|
|
|
1039
1039
|
/* Under touch, a link-style button's press lands within the control minimum: an invisible hit
|
|
1040
|
-
area, centred on it, like IconButton's. A
|
|
1041
|
-
a link-style one keeps its text size, so a standalone one ("See all" under a list) needs the
|
|
1040
|
+
area, centred on it, like IconButton's. A link-style action keeps its text size, so a standalone one ("See all" under a list) needs the
|
|
1042
1041
|
area. xs sits inside a line of text the same way, so it keeps its size and gains the area too.
|
|
1043
1042
|
Only these need it: a hit area on every button would reach over its neighbours. */
|
|
1044
1043
|
|
|
@@ -1411,14 +1410,6 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1411
1410
|
background-color: var(--ui-disabled-surface);
|
|
1412
1411
|
border-color: transparent;
|
|
1413
1412
|
}
|
|
1414
|
-
@media (pointer: coarse) {
|
|
1415
|
-
:global(:scope:where([data-hn-ui-button])) {
|
|
1416
|
-
min-block-size: max(var(--ui-control-size-md), var(--ui-control-min-block-size));
|
|
1417
|
-
}
|
|
1418
|
-
:global(:scope[data-ui-button-state~="size=sm"]:where([data-hn-ui-button])) {
|
|
1419
|
-
min-block-size: max(var(--ui-control-size-sm), var(--ui-control-min-block-size));
|
|
1420
|
-
}
|
|
1421
|
-
}
|
|
1422
1413
|
:global(html[data-ui-input-modality="touch"]
|
|
1423
1414
|
:scope[data-appearance="link"]:where([data-hn-ui-button])),
|
|
1424
1415
|
:global(html[data-ui-input-modality="touch"]
|
package/vue/UiCard.vue
CHANGED
|
@@ -51,7 +51,7 @@ const propValidityContract = {
|
|
|
51
51
|
required: false,
|
|
52
52
|
target: { attribute: 'tone' },
|
|
53
53
|
description:
|
|
54
|
-
'accent, info, success, warning and danger add a quiet semantic surface without changing card geometry. Row highlights follow the
|
|
54
|
+
'accent, info, success, warning and danger add a quiet semantic surface without changing card geometry. Row highlights follow the surface hue; action\n controls retain their own intent.',
|
|
55
55
|
values: ['neutral', 'accent', 'info', 'success', 'warning', 'danger'],
|
|
56
56
|
default: 'neutral',
|
|
57
57
|
},
|
|
@@ -60,7 +60,7 @@ const propValidityContract = {
|
|
|
60
60
|
required: false,
|
|
61
61
|
target: { attribute: 'treatment' },
|
|
62
62
|
description:
|
|
63
|
-
'How much of the theme\'s decorative material the surface expresses. standard preserves its restrained treatment; expressive uses the full material
|
|
63
|
+
'How much of the theme\'s decorative material the surface expresses. standard preserves its restrained treatment; expressive uses the full material\n treatment. This does not add elevation or require glass.',
|
|
64
64
|
values: ['standard', 'expressive'],
|
|
65
65
|
default: 'standard',
|
|
66
66
|
},
|
|
@@ -329,7 +329,9 @@ const hostState = computed(() =>
|
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
:global(:scope[data-ui-card-state~="treatment=expressive"]:where([data-hn-ui-card])) {
|
|
332
|
-
--_ui-panel-glass:
|
|
332
|
+
--_ui-panel-glass: calc(
|
|
333
|
+
clamp(0, var(--ui-glassiness, 0), 1) + 2 * pow(clamp(0, var(--ui-glassiness, 0), 1), 4)
|
|
334
|
+
);
|
|
333
335
|
--_ui-panel-separation: clamp(0, var(--ui-surface-separation, 0), 1);
|
|
334
336
|
--_ui-panel-rim: calc(
|
|
335
337
|
(var(--_ui-panel-separation) + var(--_ui-panel-glass) * 0.25) * 0.65 * 8px
|
package/vue/UiCheckbox.vue
CHANGED
|
@@ -88,7 +88,7 @@ const propValidityContract = {
|
|
|
88
88
|
required: false,
|
|
89
89
|
target: { attribute: 'size' },
|
|
90
90
|
description:
|
|
91
|
-
'Aligns the checkbox with fields and buttons of the same size. It keeps its box size; the label takes that size\'s field type size and its first line centres\n in that control height (sm 2rem, lg 3rem by default), so in a row of inputs, selects, and buttons of one size it shares their height and their text\n baseline.
|
|
91
|
+
'Aligns the checkbox with fields and buttons of the same size. It keeps its box size; the label takes that size\'s field type size and its first line centres\n in that control height (sm 2rem, lg 3rem by default), so in a row of inputs, selects, and buttons of one size it shares their height and their text\n baseline. Touch input keeps the same visible alignment. md is the standard layout.',
|
|
92
92
|
values: ['sm', 'md', 'lg'],
|
|
93
93
|
default: 'md',
|
|
94
94
|
},
|
|
@@ -574,12 +574,6 @@ useComponentHost(() => import('../components/ui-checkbox/ui-checkbox.js'), {
|
|
|
574
574
|
calc((var(--_row) - max(var(--_line), var(--_ui-checkbox-size, 1.125rem))) / 2)
|
|
575
575
|
) !important;
|
|
576
576
|
}
|
|
577
|
-
|
|
578
|
-
@media (pointer: coarse) {
|
|
579
|
-
:global(:scope[data-ui-checkbox-state~="size=sm"]:where([data-hn-ui-checkbox])) {
|
|
580
|
-
--_row: var(--ui-control-min-block-size);
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
577
|
:global(:scope[hidden]:where([data-hn-ui-checkbox])) {
|
|
584
578
|
display: none !important;
|
|
585
579
|
}
|
package/vue/UiColorPicker.vue
CHANGED
|
@@ -409,14 +409,5 @@ useComponentHost(() => import('../components/ui-color-picker/ui-color-picker.js'
|
|
|
409
409
|
padding: 0 !important;
|
|
410
410
|
accent-color: var(--ui-accent-solid);
|
|
411
411
|
}
|
|
412
|
-
@media (pointer: coarse) {
|
|
413
|
-
:global(:scope) {
|
|
414
|
-
--_size: max(var(--ui-control-size-md), var(--ui-control-min-block-size));
|
|
415
|
-
}
|
|
416
|
-
:global(:scope[data-ui-color-picker-state~="size=sm"]) {
|
|
417
|
-
--_size: max(var(--ui-control-size-sm), var(--ui-control-min-block-size));
|
|
418
|
-
--_font: var(--ui-font-size-md);
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
412
|
}
|
|
422
413
|
</style>
|
package/vue/UiCombobox.vue
CHANGED
|
@@ -258,7 +258,7 @@ const propValidityContract = {
|
|
|
258
258
|
required: false,
|
|
259
259
|
target: { attribute: 'size' },
|
|
260
260
|
description:
|
|
261
|
-
'Field height, padding, and type size, matching Button\'s sizes so a field and a button of one size share a row. sm is the small control height (2rem by\n default) with smaller text, for compact rows such as a table row or a filter bar; md is the standard control height; lg is taller with roomier padding.\n
|
|
261
|
+
'Field height, padding, and type size, matching Button\'s sizes so a field and a button of one size share a row. sm is the small control height (2rem by\n default) with smaller text, for compact rows such as a table row or a filter bar; md is the standard control height; lg is taller with roomier padding.\n Touch input keeps body-size field text without inflating the visible size ladder. The label keeps its size.',
|
|
262
262
|
values: ['sm', 'md', 'lg'],
|
|
263
263
|
default: 'md',
|
|
264
264
|
},
|
|
@@ -2378,20 +2378,8 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
|
|
|
2378
2378
|
white-space: nowrap;
|
|
2379
2379
|
}
|
|
2380
2380
|
@media (pointer: coarse) {
|
|
2381
|
-
:global(:scope:where([data-hn-ui-combobox])) {
|
|
2382
|
-
--_row: max(var(--ui-control-size-md), var(--ui-control-min-block-size));
|
|
2383
|
-
}
|
|
2384
|
-
:global(button:where([data-hn-ui-combobox])) {
|
|
2385
|
-
min-inline-size: 2.75rem;
|
|
2386
|
-
min-block-size: calc(var(--_row) - 2 * var(--ui-border-width));
|
|
2387
|
-
}
|
|
2388
|
-
/* Under touch a small field is still a touch-sized target, as a small button is, and keeps
|
|
2389
|
-
body-size text: below 16px, iOS zooms the page into the focused field. */
|
|
2390
|
-
:global(:scope[data-ui-combobox-state~="size=sm"]:where([data-hn-ui-combobox])) {
|
|
2391
|
-
--_row: max(var(--ui-control-size-sm), var(--ui-control-min-block-size));
|
|
2392
|
-
}
|
|
2393
2381
|
:global(:scope[data-ui-combobox-state~="size=sm"] input:where([data-hn-ui-combobox])) {
|
|
2394
|
-
font-size:
|
|
2382
|
+
font-size: var(--ui-font-size-md);
|
|
2395
2383
|
}
|
|
2396
2384
|
}
|
|
2397
2385
|
@media (forced-colors: active) {
|
|
@@ -2729,21 +2717,9 @@ useComponentHost(() => import('../components/ui-combobox/ui-combobox.js'), {
|
|
|
2729
2717
|
white-space: nowrap;
|
|
2730
2718
|
}
|
|
2731
2719
|
@media (pointer: coarse) {
|
|
2732
|
-
:global(:where(.ui-combobox):where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-combobox"]))):where([data-hn-ui-combobox])) {
|
|
2733
|
-
--_row: max(var(--ui-control-size-md), var(--ui-control-min-block-size));
|
|
2734
|
-
}
|
|
2735
|
-
:global(button:where(:scope, :scope *):where([data-hn-ui-combobox])) {
|
|
2736
|
-
min-inline-size: 2.75rem;
|
|
2737
|
-
min-block-size: calc(var(--_row) - 2 * var(--ui-border-width));
|
|
2738
|
-
}
|
|
2739
|
-
/* Under touch a small field is still a touch-sized target, as a small button is, and keeps
|
|
2740
|
-
body-size text: below 16px, iOS zooms the page into the focused field. */
|
|
2741
|
-
:global(:where(.ui-combobox)[data-ui-combobox-state~="size=sm"]:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-combobox"]))):where([data-hn-ui-combobox])) {
|
|
2742
|
-
--_row: max(var(--ui-control-size-sm), var(--ui-control-min-block-size));
|
|
2743
|
-
}
|
|
2744
2720
|
:global(:where(.ui-combobox)[data-ui-combobox-state~="size=sm"]
|
|
2745
2721
|
input:where(:scope, :not([data-hn], [data-slotted]:not([data-slotted~="ui-combobox"]))):where([data-hn-ui-combobox])) {
|
|
2746
|
-
font-size:
|
|
2722
|
+
font-size: var(--ui-font-size-md);
|
|
2747
2723
|
}
|
|
2748
2724
|
}
|
|
2749
2725
|
@media (forced-colors: active) {
|