@threadlabs/looma 0.10.11 → 0.10.12
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-list/ui-list.html +33 -0
- package/components/ui-list-item/ui-list-item.html +146 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-list-item.css +146 -0
- package/styles/ui-list.css +33 -0
- package/vanilla/UiList.d.ts +14 -0
- package/vanilla/UiList.js +29 -0
- package/vanilla/UiListItem.d.ts +15 -0
- package/vanilla/UiListItem.js +77 -0
- package/vanilla/index.js +2 -0
- package/vue/UiList.d.ts +18 -0
- package/vue/UiList.js +2 -0
- package/vue/UiList.vue +60 -0
- package/vue/UiListItem.d.ts +26 -0
- package/vue/UiListItem.js +2 -0
- package/vue/UiListItem.vue +171 -0
- package/vue/chunks/UiList.js +24 -0
- package/vue/chunks/UiListItem.js +39 -0
- package/vue/components.css +140 -0
- package/vue/index.d.ts +2 -0
- package/vue/index.js +3 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { computed, createElementBlock, createElementVNode, defineComponent, mergeProps, openBlock, renderSlot } from "vue";
|
|
3
|
+
//#region .build/vue/UiListItem.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _hoisted_1 = ["aria-current", "data-ui-list-item-state"];
|
|
5
|
+
var _hoisted_2 = { class: "leading" };
|
|
6
|
+
var _hoisted_3 = { class: "content" };
|
|
7
|
+
var _hoisted_4 = { class: "title" };
|
|
8
|
+
var _hoisted_5 = { class: "description" };
|
|
9
|
+
var _hoisted_6 = { class: "trailing" };
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region .build/vue/UiListItem.vue
|
|
12
|
+
var UiListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
13
|
+
inheritAttrs: false,
|
|
14
|
+
__name: "UiListItem",
|
|
15
|
+
props: {
|
|
16
|
+
current: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
variant: { default: "row" }
|
|
21
|
+
},
|
|
22
|
+
setup(__props) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
/** The values the styles' :host-state() rules test. */
|
|
25
|
+
const hostState = computed(() => [props.variant && `variant variant=${props.variant}`, props.current && "current"].filter(Boolean).join(" "));
|
|
26
|
+
return (_ctx, _cache) => {
|
|
27
|
+
return openBlock(), createElementBlock("li", mergeProps({ "data-component": "ui-list-item" }, _ctx.$attrs, {
|
|
28
|
+
"aria-current": __props.current,
|
|
29
|
+
"data-ui-list-item-state": hostState.value || void 0
|
|
30
|
+
}), [
|
|
31
|
+
createElementVNode("span", _hoisted_2, [renderSlot(_ctx.$slots, "leading")]),
|
|
32
|
+
createElementVNode("span", _hoisted_3, [createElementVNode("span", _hoisted_4, [renderSlot(_ctx.$slots, "default")]), createElementVNode("span", _hoisted_5, [renderSlot(_ctx.$slots, "description")])]),
|
|
33
|
+
createElementVNode("span", _hoisted_6, [renderSlot(_ctx.$slots, "trailing")])
|
|
34
|
+
], 16, _hoisted_1);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}), [["__scopeId", "data-v-d61daf46"]]);
|
|
38
|
+
//#endregion
|
|
39
|
+
export { UiListItem_default as t };
|
package/vue/components.css
CHANGED
|
@@ -2945,6 +2945,146 @@ svg[data-v-bcedd63e-s] {
|
|
|
2945
2945
|
display: none;
|
|
2946
2946
|
}
|
|
2947
2947
|
|
|
2948
|
+
/* A list of items (ui-list-item). It owns the spacing between them, so a view never sets it. The
|
|
2949
|
+
explicit list role keeps the list announced as one: some browsers drop it from a list with no
|
|
2950
|
+
markers. */
|
|
2951
|
+
[data-component~="ui-list"][data-v-935b1197] {
|
|
2952
|
+
display: flex;
|
|
2953
|
+
flex-direction: column;
|
|
2954
|
+
gap: var(--ui-list-gap, var(--ui-space-1));
|
|
2955
|
+
min-inline-size: 0;
|
|
2956
|
+
margin: 0;
|
|
2957
|
+
padding: 0;
|
|
2958
|
+
list-style: none;
|
|
2959
|
+
}
|
|
2960
|
+
[data-component~="ui-list"][data-ui-list-state~="layout=grid"][data-v-935b1197] {
|
|
2961
|
+
display: grid;
|
|
2962
|
+
grid-template-columns:
|
|
2963
|
+
repeat(auto-fill, minmax(min(100%, var(--ui-list-min-item-width, 14rem)), 1fr));
|
|
2964
|
+
gap: var(--ui-list-gap, var(--ui-space-3));
|
|
2965
|
+
}
|
|
2966
|
+
|
|
2967
|
+
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
2968
|
+
[data-component~="ui-list"][hidden][data-v-935b1197] {
|
|
2969
|
+
display: none;
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2972
|
+
/* One entry in a list: something to recognise (leading, usually an icon), its name (the default
|
|
2973
|
+
slot), one line about it (description), and what it offers (trailing, such as a button or a
|
|
2974
|
+
badge). The title and description are one line each and end in an ellipsis, so every item in a
|
|
2975
|
+
list has the same height.
|
|
2976
|
+
|
|
2977
|
+
A link in the title is the whole item: its hit area stretches over the item, so the icon and the
|
|
2978
|
+
padding follow it too, and the item takes the link's focus ring. The link stays a real link, so
|
|
2979
|
+
a router, a modified click, and "open in new tab" all work. Trailing controls sit above it and
|
|
2980
|
+
stay their own. */
|
|
2981
|
+
[data-component~="ui-list-item"][data-v-d61daf46] {
|
|
2982
|
+
position: relative;
|
|
2983
|
+
box-sizing: border-box;
|
|
2984
|
+
display: flex;
|
|
2985
|
+
align-items: center;
|
|
2986
|
+
gap: var(--ui-list-item-gap, var(--ui-space-3));
|
|
2987
|
+
min-inline-size: 0;
|
|
2988
|
+
min-block-size: var(--ui-control-size, 2.5rem);
|
|
2989
|
+
padding-block: var(--ui-list-item-padding-block, var(--ui-space-2));
|
|
2990
|
+
padding-inline: var(--ui-list-item-padding-inline, var(--ui-space-3));
|
|
2991
|
+
border-radius: var(--ui-radius-md);
|
|
2992
|
+
color: var(--ui-text-primary);
|
|
2993
|
+
transition:
|
|
2994
|
+
background-color var(--ui-motion-fast) var(--ui-motion-ease),
|
|
2995
|
+
border-color var(--ui-motion-fast) var(--ui-motion-ease);
|
|
2996
|
+
}
|
|
2997
|
+
[data-component~="ui-list-item"][data-ui-list-item-state~="variant=card"][data-v-d61daf46] {
|
|
2998
|
+
padding-block: var(--ui-list-item-padding-block, var(--ui-space-3));
|
|
2999
|
+
padding-inline: var(--ui-list-item-padding-inline, var(--ui-space-4));
|
|
3000
|
+
border: 1px solid var(--ui-border-default);
|
|
3001
|
+
border-radius: var(--ui-radius-lg);
|
|
3002
|
+
background: var(--ui-surface-raised);
|
|
3003
|
+
}
|
|
3004
|
+
[data-component~="ui-list-item"][data-v-d61daf46]:has(.title a[href]:hover) {
|
|
3005
|
+
background: var(--ui-surface-hover);
|
|
3006
|
+
}
|
|
3007
|
+
[data-component~="ui-list-item"][data-ui-list-item-state~="variant=card"][data-v-d61daf46]:has(.title
|
|
3008
|
+
a[href]:hover) {
|
|
3009
|
+
border-color: var(--ui-border-strong);
|
|
3010
|
+
}
|
|
3011
|
+
[data-component~="ui-list-item"][data-ui-list-item-state~="current"][data-v-d61daf46] {
|
|
3012
|
+
background: var(--ui-surface-hover);
|
|
3013
|
+
}
|
|
3014
|
+
[data-component~="ui-list-item"][data-v-d61daf46]:has(.title a[href]:focus-visible) {
|
|
3015
|
+
box-shadow: 0 0 0 2px var(--ui-focus-ring);
|
|
3016
|
+
}
|
|
3017
|
+
.leading[data-v-d61daf46],
|
|
3018
|
+
.trailing[data-v-d61daf46] {
|
|
3019
|
+
display: inline-flex;
|
|
3020
|
+
flex: none;
|
|
3021
|
+
align-items: center;
|
|
3022
|
+
gap: var(--ui-space-2);
|
|
3023
|
+
}
|
|
3024
|
+
.leading[data-v-d61daf46] {
|
|
3025
|
+
color: var(--ui-text-muted);
|
|
3026
|
+
font-size: var(--ui-list-item-icon-size, var(--ui-font-size-lg));
|
|
3027
|
+
}
|
|
3028
|
+
|
|
3029
|
+
/* Trailing controls take their own clicks, above the title link's stretched hit area. */
|
|
3030
|
+
.trailing[data-v-d61daf46] {
|
|
3031
|
+
position: relative;
|
|
3032
|
+
z-index: 1;
|
|
3033
|
+
color: var(--ui-text-muted);
|
|
3034
|
+
font-size: var(--ui-font-size-sm);
|
|
3035
|
+
}
|
|
3036
|
+
.content[data-v-d61daf46] {
|
|
3037
|
+
display: flex;
|
|
3038
|
+
flex: 1;
|
|
3039
|
+
flex-direction: column;
|
|
3040
|
+
gap: var(--ui-space-0-5, 2px);
|
|
3041
|
+
min-inline-size: 0;
|
|
3042
|
+
}
|
|
3043
|
+
.title[data-v-d61daf46],
|
|
3044
|
+
.description[data-v-d61daf46] {
|
|
3045
|
+
display: block;
|
|
3046
|
+
min-inline-size: 0;
|
|
3047
|
+
overflow: hidden;
|
|
3048
|
+
text-overflow: ellipsis;
|
|
3049
|
+
white-space: nowrap;
|
|
3050
|
+
}
|
|
3051
|
+
.title[data-v-d61daf46] {
|
|
3052
|
+
font-size: var(--ui-font-size-md);
|
|
3053
|
+
font-weight: var(--ui-font-medium);
|
|
3054
|
+
line-height: var(--ui-line-height-tight);
|
|
3055
|
+
}
|
|
3056
|
+
.description[data-v-d61daf46] {
|
|
3057
|
+
color: var(--ui-text-muted);
|
|
3058
|
+
font-size: var(--ui-font-size-sm);
|
|
3059
|
+
line-height: var(--ui-line-height-tight);
|
|
3060
|
+
}
|
|
3061
|
+
.title > a[data-v-d61daf46-s] {
|
|
3062
|
+
color: inherit;
|
|
3063
|
+
text-decoration: none;
|
|
3064
|
+
}
|
|
3065
|
+
.title > a[data-v-d61daf46-s]:focus-visible {
|
|
3066
|
+
outline: none;
|
|
3067
|
+
box-shadow: none;
|
|
3068
|
+
}
|
|
3069
|
+
.title > a[href][data-v-d61daf46-s]::after {
|
|
3070
|
+
position: absolute;
|
|
3071
|
+
inset: 0;
|
|
3072
|
+
border-radius: inherit;
|
|
3073
|
+
content: "";
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
/* An unused region takes no space. */
|
|
3077
|
+
.leading[data-v-d61daf46]:empty,
|
|
3078
|
+
.description[data-v-d61daf46]:empty,
|
|
3079
|
+
.trailing[data-v-d61daf46]:empty {
|
|
3080
|
+
display: none;
|
|
3081
|
+
}
|
|
3082
|
+
|
|
3083
|
+
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
3084
|
+
[data-component~="ui-list-item"][hidden][data-v-d61daf46] {
|
|
3085
|
+
display: none;
|
|
3086
|
+
}
|
|
3087
|
+
|
|
2948
3088
|
/* Compact sets the part tokens its items read, so nothing has to rescale a global. */
|
|
2949
3089
|
[data-component~="ui-menu"][data-ui-menu-state~="density=compact"][data-v-ad1dce95] {
|
|
2950
3090
|
--ui-menu-item-padding-block: var(--ui-space-1);
|
package/vue/index.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ export { default as Grid } from "./UiGrid.js";
|
|
|
25
25
|
export { default as Icon } from "./UiIcon.js";
|
|
26
26
|
export { default as IconButton } from "./UiIconButton.js";
|
|
27
27
|
export { default as Input } from "./UiInput.js";
|
|
28
|
+
export { default as List } from "./UiList.js";
|
|
29
|
+
export { default as ListItem } from "./UiListItem.js";
|
|
28
30
|
export { default as Menu } from "./UiMenu.js";
|
|
29
31
|
export { default as MenuItem } from "./UiMenuItem.js";
|
|
30
32
|
export { default as Popover } from "./UiPopover.js";
|
package/vue/index.js
CHANGED
|
@@ -26,6 +26,8 @@ import { t as UiFormField_default } from "./chunks/UiFormField.js";
|
|
|
26
26
|
import { t as UiGrid_default } from "./chunks/UiGrid.js";
|
|
27
27
|
import { t as UiIconButton_default } from "./chunks/UiIconButton.js";
|
|
28
28
|
import { t as UiInput_default } from "./chunks/UiInput.js";
|
|
29
|
+
import { t as UiList_default } from "./chunks/UiList.js";
|
|
30
|
+
import { t as UiListItem_default } from "./chunks/UiListItem.js";
|
|
29
31
|
import { t as UiMenu_default } from "./chunks/UiMenu.js";
|
|
30
32
|
import { t as UiMenuItem_default } from "./chunks/UiMenuItem.js";
|
|
31
33
|
import { t as UiPopover_default } from "./chunks/UiPopover.js";
|
|
@@ -48,4 +50,4 @@ import { t as UiTopBar_default } from "./chunks/UiTopBar.js";
|
|
|
48
50
|
import { t as UiTree_default } from "./chunks/UiTree.js";
|
|
49
51
|
import { t as UiTreeItem_default } from "./chunks/UiTreeItem.js";
|
|
50
52
|
import { trackInputModality } from "@threadlabs/looma/components/shared/input-modality.js";
|
|
51
|
-
export { UiAffordanceScope_default as AffordanceScope, UiAvatar_default as Avatar, UiAvatarGroup_default as AvatarGroup, UiBadge_default as Badge, UiButton_default as Button, UiCallout_default as Callout, UiCheckbox_default as Checkbox, UiCluster_default as Cluster, UiCombobox_default as Combobox, UiContainer_default as Container, UiContextMenu_default as ContextMenu, UiDialog_default as Dialog, UiDisclosure_default as Disclosure, UiEditable_default as Editable, UiEditorInsertTableGrid_default as EditorInsertTableGrid, UiEditorMentionMenu_default as EditorMentionMenu, UiEditorSlashMenu_default as EditorSlashMenu, UiEditorTableContextMenu_default as EditorTableContextMenu, UiEditorTableOverlay_default as EditorTableOverlay, UiEditorTableToolbar_default as EditorTableToolbar, UiEditorToolbar_default as EditorToolbar, UiFloatingActionButton_default as FloatingActionButton, UiFormField_default as FormField, UiGrid_default as Grid, UiIcon_default as Icon, UiIconButton_default as IconButton, UiInput_default as Input, UiMenu_default as Menu, UiMenuItem_default as MenuItem, UiPopover_default as Popover, UiRadio_default as Radio, UiRadioGroup_default as RadioGroup, UiReel_default as Reel, UiScrollArea_default as ScrollArea, UiSearchResultRow_default as SearchResultRow, UiSearchShell_default as SearchShell, UiSelect_default as Select, UiSeparator_default as Separator, UiSidebar_default as Sidebar, UiStack_default as Stack, UiSwitch_default as Switch, UiSwitcher_default as Switcher, UiTabs_default as Tabs, UiTextarea_default as Textarea, UiToastRegion_default as ToastRegion, UiTooltip_default as Tooltip, UiTopBar_default as TopBar, UiTree_default as Tree, UiTreeItem_default as TreeItem, trackInputModality };
|
|
53
|
+
export { UiAffordanceScope_default as AffordanceScope, UiAvatar_default as Avatar, UiAvatarGroup_default as AvatarGroup, UiBadge_default as Badge, UiButton_default as Button, UiCallout_default as Callout, UiCheckbox_default as Checkbox, UiCluster_default as Cluster, UiCombobox_default as Combobox, UiContainer_default as Container, UiContextMenu_default as ContextMenu, UiDialog_default as Dialog, UiDisclosure_default as Disclosure, UiEditable_default as Editable, UiEditorInsertTableGrid_default as EditorInsertTableGrid, UiEditorMentionMenu_default as EditorMentionMenu, UiEditorSlashMenu_default as EditorSlashMenu, UiEditorTableContextMenu_default as EditorTableContextMenu, UiEditorTableOverlay_default as EditorTableOverlay, UiEditorTableToolbar_default as EditorTableToolbar, UiEditorToolbar_default as EditorToolbar, UiFloatingActionButton_default as FloatingActionButton, UiFormField_default as FormField, UiGrid_default as Grid, UiIcon_default as Icon, UiIconButton_default as IconButton, UiInput_default as Input, UiList_default as List, UiListItem_default as ListItem, UiMenu_default as Menu, UiMenuItem_default as MenuItem, UiPopover_default as Popover, UiRadio_default as Radio, UiRadioGroup_default as RadioGroup, UiReel_default as Reel, UiScrollArea_default as ScrollArea, UiSearchResultRow_default as SearchResultRow, UiSearchShell_default as SearchShell, UiSelect_default as Select, UiSeparator_default as Separator, UiSidebar_default as Sidebar, UiStack_default as Stack, UiSwitch_default as Switch, UiSwitcher_default as Switcher, UiTabs_default as Tabs, UiTextarea_default as Textarea, UiToastRegion_default as ToastRegion, UiTooltip_default as Tooltip, UiTopBar_default as TopBar, UiTree_default as Tree, UiTreeItem_default as TreeItem, trackInputModality };
|