@threadlabs/looma 0.23.13 → 0.23.15
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-input/ui-input.html +6 -1
- package/components/ui-tree-item/ui-tree-item.html +50 -1
- package/components/ui-tree-item/ui-tree-item.js +2 -1
- package/dist/index.js +1 -1
- package/editor/chunks/extensions.js +5 -5
- package/editor/extensions/table-commands.d.ts +2 -2
- package/package.json +1 -1
- package/styles/ui-input.css +6 -1
- package/styles/ui-tree-item.css +54 -2
- package/vue/UiInput.vue +6 -1
- package/vue/UiTreeItem.vue +59 -1
- package/vue/chunks/UiInput.js +1 -1
- package/vue/chunks/UiTreeItem.js +1 -1
- package/vue/components.css +157 -104
- package/vue/editor/LoomaEditor.d.ts +3 -2
- package/vue/editor/index.js +2 -2
|
@@ -133,9 +133,14 @@
|
|
|
133
133
|
/* Under touch a small field is still a touch-sized target, as a small button is, and keeps
|
|
134
134
|
body-size text: below 16px, iOS zooms the page into the focused field. */
|
|
135
135
|
@media (pointer: coarse) {
|
|
136
|
+
:host,
|
|
137
|
+
:host-state([size="sm"]),
|
|
138
|
+
:host-state([size="lg"]) {
|
|
139
|
+
font-size: var(--ui-font-size-md);
|
|
140
|
+
}
|
|
141
|
+
|
|
136
142
|
:host-state([size="sm"]) {
|
|
137
143
|
min-block-size: var(--ui-input-min-block-size, var(--_ui-default-input-min-block-size, var(--ui-control-min-block-size)));
|
|
138
|
-
font-size: inherit;
|
|
139
144
|
}
|
|
140
145
|
}
|
|
141
146
|
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
/* Without hover there is no reveal, so the controls keep their own column. */
|
|
473
|
-
@media (hover: none) {
|
|
473
|
+
@media (hover: none), (pointer: coarse) {
|
|
474
474
|
.row {
|
|
475
475
|
grid-template-columns: var(--_tree-disclosure-size) auto minmax(0, 1fr) auto;
|
|
476
476
|
}
|
|
@@ -484,6 +484,37 @@
|
|
|
484
484
|
opacity: 1;
|
|
485
485
|
pointer-events: auto;
|
|
486
486
|
}
|
|
487
|
+
|
|
488
|
+
.row:is(:hover, :focus-within) > .label,
|
|
489
|
+
.row:is(:hover, :focus-within) > .label:dir(rtl),
|
|
490
|
+
:host[data-move-source] > .row > .label,
|
|
491
|
+
:host[data-move-source] > .row > .label:dir(rtl) {
|
|
492
|
+
mask-image: none;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.row[data-ui-marquee] > .label {
|
|
496
|
+
mask-image: linear-gradient(
|
|
497
|
+
to right,
|
|
498
|
+
transparent var(--_marquee-icon-width, 0px),
|
|
499
|
+
#000 calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2)))
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.row[data-ui-marquee] > .label:dir(rtl) {
|
|
504
|
+
mask-image: linear-gradient(
|
|
505
|
+
to left,
|
|
506
|
+
transparent var(--_marquee-icon-width, 0px),
|
|
507
|
+
#000 calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2)))
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
:host[data-selection-mode="multiple"] > .row {
|
|
512
|
+
grid-template-columns: var(--_tree-disclosure-size) 1.25rem auto minmax(0, 1fr) auto;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
:host[data-selection-mode="multiple"] > .row > .actions {
|
|
516
|
+
grid-column: 5;
|
|
517
|
+
}
|
|
487
518
|
}
|
|
488
519
|
|
|
489
520
|
/* The handle sits beside what it drags. A leaf row has no disclosure, so the handle takes that
|
|
@@ -625,6 +656,24 @@
|
|
|
625
656
|
grid-column: 5;
|
|
626
657
|
}
|
|
627
658
|
|
|
659
|
+
@media (hover: none), (pointer: coarse) {
|
|
660
|
+
html[data-ui-input-modality="touch"] :host .row {
|
|
661
|
+
grid-template-columns: 44px var(--_tree-disclosure-size) auto minmax(0, 1fr) auto;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
html[data-ui-input-modality="touch"] :host .actions {
|
|
665
|
+
grid-column: 5;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
html[data-ui-input-modality="touch"] :host[data-selection-mode="multiple"] > .row {
|
|
669
|
+
grid-template-columns: 44px var(--_tree-disclosure-size) 44px auto minmax(0, 1fr) auto;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
html[data-ui-input-modality="touch"] :host[data-selection-mode="multiple"] > .row > .actions {
|
|
673
|
+
grid-column: 6;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
628
677
|
@media (prefers-reduced-motion: reduce) {
|
|
629
678
|
.row,
|
|
630
679
|
.disclosure-icon,
|
|
@@ -143,7 +143,8 @@ export default function controller(host) {
|
|
|
143
143
|
labelText.style.flex = labelText.style.inlineSize = "";
|
|
144
144
|
const cell = label.getBoundingClientRect();
|
|
145
145
|
const icon = leading?.getBoundingClientRect();
|
|
146
|
-
const
|
|
146
|
+
const overlayActions = actions && getComputedStyle(actions).position === "absolute";
|
|
147
|
+
const stop = overlayActions ? actions.offsetWidth + parseFloat(getComputedStyle(label).columnGap) : 0;
|
|
147
148
|
const distance = Math.ceil(rightToLeft ? cell.left + stop - end : end - (cell.right - stop));
|
|
148
149
|
if (distance <= 0) return;
|
|
149
150
|
const lead = icon?.width ? (rightToLeft ? icon.right - cell.right : cell.left - icon.left) : 0;
|