@threadlabs/looma 0.6.3 → 0.6.4
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-tree-item/ui-tree-item.html +68 -12
- package/components/ui-tree-item/ui-tree-item.js +9 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-tree-item.css +74 -11
- package/vanilla/UiTreeItem.js +1 -1
- package/vue/UiTreeItem.vue +72 -12
- package/vue/chunks/UiTreeItem.js +10 -3
- package/vue/components.css +108 -56
package/vue/components.css
CHANGED
|
@@ -4001,18 +4001,19 @@ to {
|
|
|
4001
4001
|
display: none;
|
|
4002
4002
|
}
|
|
4003
4003
|
|
|
4004
|
-
[data-component~="ui-tree-item"][data-v-
|
|
4004
|
+
[data-component~="ui-tree-item"][data-v-07ef6009] {
|
|
4005
4005
|
--_tree-row-min-height: 32px;
|
|
4006
|
+
--_tree-disclosure-size: 16px;
|
|
4006
4007
|
|
|
4007
4008
|
position: relative;
|
|
4008
4009
|
display: block;
|
|
4009
4010
|
min-inline-size: 0;
|
|
4010
4011
|
margin-inline-start: calc(var(--ui-tree-item-depth, 0) * var(--ui-tree-indent, 16px));
|
|
4011
4012
|
}
|
|
4012
|
-
.row[data-v-
|
|
4013
|
+
.row[data-v-07ef6009] {
|
|
4013
4014
|
position: relative;
|
|
4014
4015
|
display: grid;
|
|
4015
|
-
grid-template-columns:
|
|
4016
|
+
grid-template-columns: var(--_tree-disclosure-size) auto minmax(0, 1fr);
|
|
4016
4017
|
align-items: center;
|
|
4017
4018
|
min-block-size: var(--ui-tree-item-min-block-size, var(--_tree-row-min-height));
|
|
4018
4019
|
min-inline-size: 0;
|
|
@@ -4026,40 +4027,41 @@ to {
|
|
|
4026
4027
|
box-shadow var(--ui-motion-fast) var(--ui-motion-ease),
|
|
4027
4028
|
min-block-size var(--ui-motion-base) var(--ui-motion-ease);
|
|
4028
4029
|
}
|
|
4029
|
-
.row[data-v-
|
|
4030
|
-
[data-component~="ui-tree-item"][data-ui-tree-item-state~="selected"] .row[data-v-
|
|
4031
|
-
.row[data-v-
|
|
4030
|
+
.row[data-v-07ef6009]:hover,
|
|
4031
|
+
[data-component~="ui-tree-item"][data-ui-tree-item-state~="selected"] .row[data-v-07ef6009],
|
|
4032
|
+
.row[data-v-07ef6009]:focus-within {
|
|
4032
4033
|
color: var(--ui-text-primary);
|
|
4033
4034
|
background: var(--ui-surface-muted);
|
|
4034
4035
|
}
|
|
4035
|
-
[data-component~="ui-tree-item"][data-ui-tree-item-state~="disabled"] .row[data-v-
|
|
4036
|
+
[data-component~="ui-tree-item"][data-ui-tree-item-state~="disabled"] .row[data-v-07ef6009] {
|
|
4036
4037
|
opacity: 0.55;
|
|
4037
4038
|
}
|
|
4038
|
-
[data-component~="ui-tree-item"][data-dragging] .row[data-v-
|
|
4039
|
+
[data-component~="ui-tree-item"][data-dragging] .row[data-v-07ef6009] {
|
|
4039
4040
|
opacity: 0.42;
|
|
4040
4041
|
}
|
|
4041
|
-
[data-component~="ui-tree-item"][data-v-
|
|
4042
|
+
[data-component~="ui-tree-item"][data-v-07ef6009]:focus {
|
|
4042
4043
|
outline: none;
|
|
4043
4044
|
}
|
|
4044
|
-
[data-component~="ui-tree-item"]:focus-visible .row[data-v-
|
|
4045
|
+
[data-component~="ui-tree-item"]:focus-visible .row[data-v-07ef6009] {
|
|
4045
4046
|
box-shadow: 0 0 0 2px var(--ui-focus-ring);
|
|
4046
4047
|
}
|
|
4047
4048
|
|
|
4048
4049
|
/* Child combinators: drop feedback belongs to this item's own row, not the rows nested in it. */
|
|
4049
|
-
[data-component~="ui-tree-item"][data-drop-position="inside"] > .row[data-v-
|
|
4050
|
+
[data-component~="ui-tree-item"][data-drop-position="inside"] > .row[data-v-07ef6009] {
|
|
4050
4051
|
background: var(--ui-accent-subtle);
|
|
4051
4052
|
box-shadow: inset 0 0 0 1px var(--ui-tree-drop-color, var(--ui-accent-solid));
|
|
4052
4053
|
}
|
|
4053
|
-
.disclosure[data-v-
|
|
4054
|
-
.disclosure-spacer[data-v-
|
|
4054
|
+
.disclosure[data-v-07ef6009],
|
|
4055
|
+
.disclosure-spacer[data-v-07ef6009] {
|
|
4055
4056
|
grid-column: 1;
|
|
4056
4057
|
grid-row: 1;
|
|
4057
|
-
inline-size:
|
|
4058
|
+
inline-size: var(--_tree-disclosure-size);
|
|
4058
4059
|
block-size: 28px;
|
|
4059
4060
|
}
|
|
4060
|
-
.disclosure[data-v-
|
|
4061
|
+
.disclosure[data-v-07ef6009] {
|
|
4061
4062
|
display: grid;
|
|
4062
|
-
|
|
4063
|
+
/* Start-aligned: the chevron's ink, not its hit area, aligns with the content above it. */
|
|
4064
|
+
place-items: center start;
|
|
4063
4065
|
padding: 0;
|
|
4064
4066
|
color: var(--ui-text-muted);
|
|
4065
4067
|
background: transparent;
|
|
@@ -4067,44 +4069,44 @@ to {
|
|
|
4067
4069
|
border-radius: var(--ui-radius-sm);
|
|
4068
4070
|
cursor: pointer;
|
|
4069
4071
|
}
|
|
4070
|
-
.disclosure[hidden][data-v-
|
|
4072
|
+
.disclosure[hidden][data-v-07ef6009] {
|
|
4071
4073
|
display: none;
|
|
4072
4074
|
}
|
|
4073
|
-
.disclosure[data-v-
|
|
4075
|
+
.disclosure[data-v-07ef6009]:hover {
|
|
4074
4076
|
color: var(--ui-text-primary);
|
|
4075
4077
|
background: var(--ui-surface-elevated);
|
|
4076
4078
|
}
|
|
4077
|
-
.disclosure-icon[data-v-
|
|
4079
|
+
.disclosure-icon[data-v-07ef6009] {
|
|
4078
4080
|
display: grid;
|
|
4079
4081
|
place-items: center;
|
|
4080
|
-
inline-size:
|
|
4081
|
-
block-size:
|
|
4082
|
+
inline-size: 12px;
|
|
4083
|
+
block-size: 12px;
|
|
4082
4084
|
transform: rotate(-90deg);
|
|
4083
4085
|
transition: transform var(--ui-motion-fast) var(--ui-motion-ease);
|
|
4084
4086
|
}
|
|
4085
|
-
.disclosure-icon[data-v-
|
|
4087
|
+
.disclosure-icon[data-v-07ef6009]::before {
|
|
4086
4088
|
display: block;
|
|
4087
|
-
inline-size: 0.
|
|
4088
|
-
block-size: 0.
|
|
4089
|
-
border-inline-end:
|
|
4090
|
-
border-block-end:
|
|
4089
|
+
inline-size: 0.375rem;
|
|
4090
|
+
block-size: 0.375rem;
|
|
4091
|
+
border-inline-end: 1.5px solid currentColor;
|
|
4092
|
+
border-block-end: 1.5px solid currentColor;
|
|
4091
4093
|
content: "";
|
|
4092
4094
|
/* A chevron's ink sits below its box centre; lift it so it centres optically (in either rotation). */
|
|
4093
4095
|
transform: translateY(-20%) rotate(45deg);
|
|
4094
4096
|
}
|
|
4095
|
-
[data-component~="ui-tree-item"][aria-expanded="true"] .disclosure-icon[data-v-
|
|
4097
|
+
[data-component~="ui-tree-item"][aria-expanded="true"] .disclosure-icon[data-v-07ef6009] {
|
|
4096
4098
|
transform: rotate(0deg);
|
|
4097
4099
|
}
|
|
4098
4100
|
|
|
4099
4101
|
/* Lucide grip-vertical, filling the handle as in Looma 0.2. */
|
|
4100
|
-
.drag-handle svg[data-v-
|
|
4102
|
+
.drag-handle svg[data-v-07ef6009] {
|
|
4101
4103
|
display: block;
|
|
4102
4104
|
inline-size: 100%;
|
|
4103
4105
|
block-size: 100%;
|
|
4104
4106
|
}
|
|
4105
4107
|
|
|
4106
4108
|
/* Slotted content is outside this scope, so :has() cannot see it; hide only a truly empty slot. */
|
|
4107
|
-
.leading[data-v-
|
|
4109
|
+
.leading[data-v-07ef6009] {
|
|
4108
4110
|
display: inline-grid;
|
|
4109
4111
|
place-items: center;
|
|
4110
4112
|
grid-column: 2;
|
|
@@ -4114,12 +4116,12 @@ to {
|
|
|
4114
4116
|
margin-inline-start: var(--ui-space-1);
|
|
4115
4117
|
color: var(--ui-text-muted);
|
|
4116
4118
|
}
|
|
4117
|
-
.leading[data-v-
|
|
4119
|
+
.leading[data-v-07ef6009]:empty {
|
|
4118
4120
|
display: none;
|
|
4119
4121
|
}
|
|
4120
4122
|
|
|
4121
4123
|
/* Icons match the label's size (as in Knit's tree): an unsized SVG would otherwise render 300×150. */
|
|
4122
|
-
svg[data-v-
|
|
4124
|
+
svg[data-v-07ef6009-s],img[data-v-07ef6009-s] {
|
|
4123
4125
|
display: block;
|
|
4124
4126
|
inline-size: 1em;
|
|
4125
4127
|
block-size: 1em;
|
|
@@ -4128,7 +4130,7 @@ svg[data-v-b57a29c6-s],img[data-v-b57a29c6-s] {
|
|
|
4128
4130
|
|
|
4129
4131
|
/* The label spans the row's height and centres its content, so slotted content (a link) can
|
|
4130
4132
|
stretch to fill the row as its own hit area; the padding tokens remove the inset. */
|
|
4131
|
-
.label[data-v-
|
|
4133
|
+
.label[data-v-07ef6009] {
|
|
4132
4134
|
grid-column: 3;
|
|
4133
4135
|
grid-row: 1;
|
|
4134
4136
|
align-self: stretch;
|
|
@@ -4141,18 +4143,68 @@ svg[data-v-b57a29c6-s],img[data-v-b57a29c6-s] {
|
|
|
4141
4143
|
|
|
4142
4144
|
/* Slotted label content fills the cell, so a link is the row's hit area rather than sizing to
|
|
4143
4145
|
its own text and reading as overflow. */
|
|
4144
|
-
.label > [data-v-
|
|
4146
|
+
.label > [data-v-07ef6009-s] {
|
|
4145
4147
|
flex: 1 1 auto;
|
|
4146
4148
|
min-inline-size: 0;
|
|
4147
4149
|
}
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4150
|
+
|
|
4151
|
+
/* The controls sit over the label's end, so the text fades out where they begin. The fade is
|
|
4152
|
+
the truncation mark while it shows: an ellipsis under it would read as a second one. */
|
|
4153
|
+
.row:hover > .label[data-v-07ef6009],
|
|
4154
|
+
.row:focus-within > .label[data-v-07ef6009] {
|
|
4155
|
+
text-overflow: clip;
|
|
4156
|
+
mask-image: linear-gradient(
|
|
4157
|
+
to right,
|
|
4158
|
+
#000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
|
|
4159
|
+
transparent calc(100% - var(--_tree-actions-width, 1.75rem))
|
|
4160
|
+
);
|
|
4161
|
+
}
|
|
4162
|
+
.row:hover > .label[data-v-07ef6009]:dir(rtl),
|
|
4163
|
+
.row:focus-within > .label[data-v-07ef6009]:dir(rtl) {
|
|
4164
|
+
mask-image: linear-gradient(
|
|
4165
|
+
to left,
|
|
4166
|
+
#000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
|
|
4167
|
+
transparent calc(100% - var(--_tree-actions-width, 1.75rem))
|
|
4168
|
+
);
|
|
4169
|
+
}
|
|
4170
|
+
.row:hover > .label > [data-v-07ef6009-s],
|
|
4171
|
+
.row:focus-within > .label > [data-v-07ef6009-s] {
|
|
4172
|
+
text-overflow: clip;
|
|
4173
|
+
}
|
|
4174
|
+
.actions[data-v-07ef6009] {
|
|
4175
|
+
position: absolute;
|
|
4176
|
+
z-index: 1;
|
|
4177
|
+
inset-block: 0;
|
|
4178
|
+
inset-inline-end: 0;
|
|
4151
4179
|
display: inline-flex;
|
|
4152
4180
|
align-items: center;
|
|
4153
4181
|
min-inline-size: 0;
|
|
4182
|
+
opacity: 0;
|
|
4183
|
+
pointer-events: none;
|
|
4184
|
+
transition: opacity var(--ui-motion-fast) var(--ui-motion-ease);
|
|
4185
|
+
}
|
|
4186
|
+
.row:hover > .actions[data-v-07ef6009],
|
|
4187
|
+
.row:focus-within > .actions[data-v-07ef6009] {
|
|
4188
|
+
opacity: 1;
|
|
4189
|
+
pointer-events: auto;
|
|
4190
|
+
}
|
|
4191
|
+
|
|
4192
|
+
/* Without hover there is no reveal, so the controls keep their own column. */
|
|
4193
|
+
@media (hover: none) {
|
|
4194
|
+
.row[data-v-07ef6009] {
|
|
4195
|
+
grid-template-columns: var(--_tree-disclosure-size) auto minmax(0, 1fr) auto;
|
|
4196
|
+
}
|
|
4197
|
+
.actions[data-v-07ef6009] {
|
|
4198
|
+
position: static;
|
|
4199
|
+
grid-column: 4;
|
|
4200
|
+
grid-row: 1;
|
|
4201
|
+
padding-inline-start: 0;
|
|
4202
|
+
background: none;
|
|
4203
|
+
opacity: 1;
|
|
4204
|
+
pointer-events: auto;
|
|
4205
|
+
}
|
|
4154
4206
|
}
|
|
4155
|
-
.drag-handle[data-v-
|
|
4207
|
+
.drag-handle[data-v-07ef6009] {
|
|
4156
4208
|
position: absolute;
|
|
4157
4209
|
z-index: 2;
|
|
4158
4210
|
inset-block-start: 50%;
|
|
@@ -4173,16 +4225,16 @@ svg[data-v-b57a29c6-s],img[data-v-b57a29c6-s] {
|
|
|
4173
4225
|
transform: translateY(-50%);
|
|
4174
4226
|
transition: opacity var(--ui-motion-fast) var(--ui-motion-ease);
|
|
4175
4227
|
}
|
|
4176
|
-
.row:hover .drag-handle[data-v-
|
|
4177
|
-
.drag-handle[data-v-
|
|
4178
|
-
.drag-handle[data-v-
|
|
4179
|
-
[data-component~="ui-tree-item"][data-dragging] > .row > .drag-handle[data-v-
|
|
4228
|
+
.row:hover .drag-handle[data-v-07ef6009],
|
|
4229
|
+
.drag-handle[data-v-07ef6009]:hover,
|
|
4230
|
+
.drag-handle[data-v-07ef6009]:focus-visible,
|
|
4231
|
+
[data-component~="ui-tree-item"][data-dragging] > .row > .drag-handle[data-v-07ef6009] {
|
|
4180
4232
|
opacity: 1;
|
|
4181
4233
|
}
|
|
4182
|
-
.drag-handle[data-v-
|
|
4234
|
+
.drag-handle[data-v-07ef6009]:active {
|
|
4183
4235
|
cursor: grabbing;
|
|
4184
4236
|
}
|
|
4185
|
-
.drop-indicator[data-v-
|
|
4237
|
+
.drop-indicator[data-v-07ef6009] {
|
|
4186
4238
|
position: absolute;
|
|
4187
4239
|
z-index: 3;
|
|
4188
4240
|
inset-inline: 1px;
|
|
@@ -4192,8 +4244,8 @@ svg[data-v-b57a29c6-s],img[data-v-b57a29c6-s] {
|
|
|
4192
4244
|
background: var(--ui-tree-drop-color, var(--ui-accent-solid));
|
|
4193
4245
|
pointer-events: none;
|
|
4194
4246
|
}
|
|
4195
|
-
.drop-indicator[data-v-
|
|
4196
|
-
.drop-indicator[data-v-
|
|
4247
|
+
.drop-indicator[data-v-07ef6009]::before,
|
|
4248
|
+
.drop-indicator[data-v-07ef6009]::after {
|
|
4197
4249
|
content: "";
|
|
4198
4250
|
position: absolute;
|
|
4199
4251
|
inset-block-start: 50%;
|
|
@@ -4204,39 +4256,39 @@ svg[data-v-b57a29c6-s],img[data-v-b57a29c6-s] {
|
|
|
4204
4256
|
background: var(--ui-surface-elevated);
|
|
4205
4257
|
transform: translateY(-50%);
|
|
4206
4258
|
}
|
|
4207
|
-
.drop-indicator[data-v-
|
|
4259
|
+
.drop-indicator[data-v-07ef6009]::before {
|
|
4208
4260
|
inset-inline-start: -1px;
|
|
4209
4261
|
}
|
|
4210
|
-
.drop-indicator[data-v-
|
|
4262
|
+
.drop-indicator[data-v-07ef6009]::after {
|
|
4211
4263
|
inset-inline-end: -1px;
|
|
4212
4264
|
}
|
|
4213
|
-
[data-component~="ui-tree-item"][data-drop-position="before"] > .row > .row-drop-indicator[data-v-
|
|
4265
|
+
[data-component~="ui-tree-item"][data-drop-position="before"] > .row > .row-drop-indicator[data-v-07ef6009] {
|
|
4214
4266
|
display: block;
|
|
4215
4267
|
inset-block-start: -1px;
|
|
4216
4268
|
}
|
|
4217
|
-
[data-component~="ui-tree-item"][data-drop-position="after"] > .subtree-drop-indicator[data-v-
|
|
4269
|
+
[data-component~="ui-tree-item"][data-drop-position="after"] > .subtree-drop-indicator[data-v-07ef6009] {
|
|
4218
4270
|
display: block;
|
|
4219
4271
|
inset-block-end: -1px;
|
|
4220
4272
|
}
|
|
4221
|
-
.children[hidden][data-v-
|
|
4273
|
+
.children[hidden][data-v-07ef6009] {
|
|
4222
4274
|
display: none;
|
|
4223
4275
|
}
|
|
4224
|
-
html[data-ui-input-modality="touch"] [data-component~="ui-tree-item"][data-v-
|
|
4276
|
+
html[data-ui-input-modality="touch"] [data-component~="ui-tree-item"][data-v-07ef6009] {
|
|
4225
4277
|
--_tree-row-min-height: 44px;
|
|
4226
4278
|
}
|
|
4227
|
-
html[data-ui-input-modality="touch"] [data-component~="ui-tree-item"] .drag-handle[data-v-
|
|
4279
|
+
html[data-ui-input-modality="touch"] [data-component~="ui-tree-item"] .drag-handle[data-v-07ef6009] {
|
|
4228
4280
|
display: none;
|
|
4229
4281
|
}
|
|
4230
4282
|
@media (prefers-reduced-motion: reduce) {
|
|
4231
|
-
.row[data-v-
|
|
4232
|
-
.disclosure-icon[data-v-
|
|
4233
|
-
.drag-handle[data-v-
|
|
4283
|
+
.row[data-v-07ef6009],
|
|
4284
|
+
.disclosure-icon[data-v-07ef6009],
|
|
4285
|
+
.drag-handle[data-v-07ef6009] {
|
|
4234
4286
|
transition: none;
|
|
4235
4287
|
}
|
|
4236
4288
|
}
|
|
4237
4289
|
|
|
4238
4290
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
4239
|
-
[data-component~="ui-tree-item"][hidden][data-v-
|
|
4291
|
+
[data-component~="ui-tree-item"][hidden][data-v-07ef6009] {
|
|
4240
4292
|
display: none;
|
|
4241
4293
|
}
|
|
4242
4294
|
/**
|