@threadlabs/looma 0.27.3 → 0.27.5
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-badge/ui-badge.html +3 -3
- package/components/ui-callout/ui-callout.html +47 -6
- package/components/ui-tabs/ui-tabs.html +3 -0
- package/components/ui-tabs/ui-tabs.js +37 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-badge.css +3 -3
- package/styles/ui-callout.css +18 -1
- package/vanilla/UiCallout.d.ts +2 -1
- package/vanilla/UiCallout.js +93 -26
- package/vanilla/UiTabs.d.ts +1 -0
- package/vanilla/UiTabs.js +8 -8
- package/vue/UiBadge.vue +3 -3
- package/vue/UiCallout.d.ts +12 -3
- package/vue/UiCallout.vue +102 -12
- package/vue/UiStatusMessage.d.ts +1 -1
- package/vue/UiTabs.d.ts +9 -0
- package/vue/UiTabs.vue +19 -1
- package/vue/chunks/UiBadge.js +2 -2
- package/vue/chunks/UiCallout.js +101 -34
- package/vue/chunks/UiTabs.js +23 -1
- package/vue/components.css +117 -102
package/vue/UiTabs.vue
CHANGED
|
@@ -36,6 +36,14 @@ const propValidityContract = {
|
|
|
36
36
|
values: ['comfortable', 'compact'],
|
|
37
37
|
default: 'comfortable',
|
|
38
38
|
},
|
|
39
|
+
group: {
|
|
40
|
+
type: { kind: 'terminal', name: 'string' },
|
|
41
|
+
required: false,
|
|
42
|
+
target: { attribute: 'group' },
|
|
43
|
+
description:
|
|
44
|
+
'Tabs with the same nonempty group share one selection: choosing a tab selects the tab with the same label in every other Tabs of that group in the\n document, and the choice is remembered for the next visit. Use it for alternatives a reader picks once, such as a package manager or language.',
|
|
45
|
+
default: '',
|
|
46
|
+
},
|
|
39
47
|
label: {
|
|
40
48
|
type: { kind: 'terminal', name: 'string' },
|
|
41
49
|
required: false,
|
|
@@ -77,6 +85,7 @@ const props = defineProps({
|
|
|
77
85
|
type: null as unknown as PropType<'comfortable' | 'compact' | null>,
|
|
78
86
|
default: 'comfortable',
|
|
79
87
|
},
|
|
88
|
+
group: { type: null as unknown as PropType<string | null>, default: '' },
|
|
80
89
|
label: { type: null as unknown as PropType<string | null>, default: 'Tabs' },
|
|
81
90
|
orientation: {
|
|
82
91
|
type: null as unknown as PropType<'horizontal' | 'vertical' | null>,
|
|
@@ -88,6 +97,7 @@ const props = defineProps({
|
|
|
88
97
|
const acceptedProps: Record<string, unknown> = {
|
|
89
98
|
activation: 'auto',
|
|
90
99
|
density: 'comfortable',
|
|
100
|
+
group: '',
|
|
91
101
|
label: 'Tabs',
|
|
92
102
|
orientation: 'horizontal',
|
|
93
103
|
stretch: false,
|
|
@@ -108,6 +118,13 @@ const checkedProps = computed(() => ({
|
|
|
108
118
|
'density',
|
|
109
119
|
acceptedProps,
|
|
110
120
|
) as 'comfortable' | 'compact',
|
|
121
|
+
group: checkedProp<string>(
|
|
122
|
+
props['group'],
|
|
123
|
+
{ kind: 'terminal', name: 'string' },
|
|
124
|
+
false,
|
|
125
|
+
'group',
|
|
126
|
+
acceptedProps,
|
|
127
|
+
) as string,
|
|
111
128
|
label: checkedProp<string>(
|
|
112
129
|
props['label'],
|
|
113
130
|
{ kind: 'terminal', name: 'string' },
|
|
@@ -300,7 +317,7 @@ useComponentHost(() => import('../components/ui-tabs/ui-tabs.js'), {
|
|
|
300
317
|
? (incoming[name] ?? incoming[kebab] ?? null)
|
|
301
318
|
: null
|
|
302
319
|
},
|
|
303
|
-
propNames: ['activation', 'density', 'label', 'orientation', 'stretch', 'value'],
|
|
320
|
+
propNames: ['activation', 'density', 'group', 'label', 'orientation', 'stretch', 'value'],
|
|
304
321
|
propValidity: (name: string) =>
|
|
305
322
|
propValidityState({ contract: propValidityContract, values: { ...props } }, name),
|
|
306
323
|
refs: { list: listElement, panels: panelsElement },
|
|
@@ -366,6 +383,7 @@ function uniqueKeys<T>(
|
|
|
366
383
|
v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
|
|
367
384
|
:data-activation="reflectedProp('activation', 'activation', checkedProps.activation, undefined, false)"
|
|
368
385
|
:data-density="reflectedProp('density', 'density', checkedProps.density, undefined, false)"
|
|
386
|
+
:data-group="reflectedProp('group', 'group', checkedProps.group, undefined, false)"
|
|
369
387
|
:data-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
|
|
370
388
|
:data-orientation="reflectedProp('orientation', 'orientation', checkedProps.orientation, undefined, false)"
|
|
371
389
|
:data-stretch="reflectedProp('stretch', 'stretch', checkedProps.stretch, undefined, false)"
|
package/vue/chunks/UiBadge.js
CHANGED
|
@@ -97,7 +97,7 @@ var UiBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
97
97
|
},
|
|
98
98
|
required: false,
|
|
99
99
|
target: { attribute: "variant" },
|
|
100
|
-
description: "Emphasis. subtle sets toned text over a soft wash; solid fills with the tone and uses contrasting text; outline keeps the surface with a toned edge.\n inverse uses a translucent contrasting surface and toned ink for a count or label on a filled control of that tone. Neutral looks the same in solid and\n subtle. overlay inherits the containing filled control's text colour on a faint translucent fill,
|
|
100
|
+
description: "Emphasis. subtle sets toned text over a soft wash; solid fills with the tone and uses contrasting text; outline keeps the surface with a toned edge.\n inverse uses a translucent contrasting surface and toned ink for a count or label on a filled control of that tone. Neutral looks the same in solid and\n subtle. overlay inherits the containing filled control's text colour on a faint translucent fill, with a quiet single-pixel boundary and no shadow. Its small circle is\n 20px. When space is constrained, the label truncates with an ellipsis while its full text remains available.",
|
|
101
101
|
values: [
|
|
102
102
|
"solid",
|
|
103
103
|
"subtle",
|
|
@@ -181,6 +181,6 @@ var UiBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
181
181
|
}]]);
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
}), [["__scopeId", "data-v-
|
|
184
|
+
}), [["__scopeId", "data-v-9a500035"]]);
|
|
185
185
|
//#endregion
|
|
186
186
|
export { UiBadge_default as t };
|
package/vue/chunks/UiCallout.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
2
|
import { a as vPropValidity, n as checkedProp } from "./props.js";
|
|
3
|
-
import { computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, renderSlot, unref, watchSyncEffect, withDirectives } from "vue";
|
|
3
|
+
import { computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, renderSlot, toDisplayString, unref, watchSyncEffect, withDirectives } from "vue";
|
|
4
4
|
//#region .build/vue/UiCallout.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var _hoisted_1 = [
|
|
5
|
+
var _hoisted_1 = [
|
|
6
|
+
"data-heading",
|
|
7
|
+
"data-tone",
|
|
8
|
+
"data-ui-callout-state"
|
|
9
|
+
];
|
|
6
10
|
var _hoisted_2 = {
|
|
7
11
|
class: "icon",
|
|
8
12
|
"aria-hidden": "true"
|
|
@@ -52,41 +56,93 @@ var _hoisted_7 = {
|
|
|
52
56
|
"stroke-linecap": "round",
|
|
53
57
|
"stroke-linejoin": "round"
|
|
54
58
|
};
|
|
55
|
-
var _hoisted_8 = {
|
|
59
|
+
var _hoisted_8 = {
|
|
60
|
+
key: 5,
|
|
61
|
+
viewBox: "0 0 24 24",
|
|
62
|
+
fill: "none",
|
|
63
|
+
stroke: "currentColor",
|
|
64
|
+
"stroke-width": "2",
|
|
65
|
+
"stroke-linecap": "round",
|
|
66
|
+
"stroke-linejoin": "round"
|
|
67
|
+
};
|
|
68
|
+
var _hoisted_9 = {
|
|
69
|
+
key: 6,
|
|
70
|
+
viewBox: "0 0 24 24",
|
|
71
|
+
fill: "none",
|
|
72
|
+
stroke: "currentColor",
|
|
73
|
+
"stroke-width": "2",
|
|
74
|
+
"stroke-linecap": "round",
|
|
75
|
+
"stroke-linejoin": "round"
|
|
76
|
+
};
|
|
77
|
+
var _hoisted_10 = { class: "content" };
|
|
78
|
+
var _hoisted_11 = {
|
|
79
|
+
key: 0,
|
|
80
|
+
class: "heading"
|
|
81
|
+
};
|
|
56
82
|
//#endregion
|
|
57
83
|
//#region .build/vue/UiCallout.vue
|
|
58
84
|
var UiCallout_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
59
85
|
inheritAttrs: false,
|
|
60
86
|
__name: "UiCallout",
|
|
61
|
-
props: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
87
|
+
props: {
|
|
88
|
+
heading: {
|
|
89
|
+
type: null,
|
|
90
|
+
default: ""
|
|
91
|
+
},
|
|
92
|
+
tone: {
|
|
93
|
+
type: null,
|
|
94
|
+
default: "info"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
65
97
|
setup(__props) {
|
|
66
|
-
const propValidityContract = { props: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
98
|
+
const propValidityContract = { props: {
|
|
99
|
+
heading: {
|
|
100
|
+
type: {
|
|
101
|
+
kind: "terminal",
|
|
102
|
+
name: "string"
|
|
103
|
+
},
|
|
104
|
+
required: false,
|
|
105
|
+
target: { attribute: "heading" },
|
|
106
|
+
description: "A short heading above the message, such as \"Before you upgrade\". Optional; without it the message stands alone.",
|
|
107
|
+
default: ""
|
|
70
108
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"
|
|
78
|
-
"warning",
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
109
|
+
tone: {
|
|
110
|
+
type: {
|
|
111
|
+
kind: "terminal",
|
|
112
|
+
name: "keyword"
|
|
113
|
+
},
|
|
114
|
+
required: false,
|
|
115
|
+
target: { attribute: "tone" },
|
|
116
|
+
description: "Which kind of message the callout carries, shown by its icon and colour: info (the default) for information, note or neutral for a muted aside, tip for\n advice, important for something the reader must not miss, warning for a caution, danger (or its alias caution) for a harmful consequence, and success for\n a confirmation. These are the tones of VitePress, Docusaurus and GitHub alerts.",
|
|
117
|
+
values: [
|
|
118
|
+
"info",
|
|
119
|
+
"neutral",
|
|
120
|
+
"note",
|
|
121
|
+
"tip",
|
|
122
|
+
"important",
|
|
123
|
+
"warning",
|
|
124
|
+
"caution",
|
|
125
|
+
"success",
|
|
126
|
+
"danger"
|
|
127
|
+
],
|
|
128
|
+
default: "info"
|
|
129
|
+
}
|
|
130
|
+
} };
|
|
84
131
|
const props = __props;
|
|
85
|
-
const acceptedProps = {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
132
|
+
const acceptedProps = {
|
|
133
|
+
heading: "",
|
|
134
|
+
tone: "info"
|
|
135
|
+
};
|
|
136
|
+
const checkedProps = computed(() => ({
|
|
137
|
+
heading: checkedProp(props["heading"], {
|
|
138
|
+
kind: "terminal",
|
|
139
|
+
name: "string"
|
|
140
|
+
}, false, "heading", acceptedProps),
|
|
141
|
+
tone: checkedProp(props["tone"], {
|
|
142
|
+
kind: "terminal",
|
|
143
|
+
name: "keyword"
|
|
144
|
+
}, false, "tone", acceptedProps)
|
|
145
|
+
}));
|
|
90
146
|
checkedProps.value;
|
|
91
147
|
watchSyncEffect(() => {
|
|
92
148
|
checkedProps.value;
|
|
@@ -118,6 +174,7 @@ var UiCallout_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
118
174
|
"data-component": "ui-callout",
|
|
119
175
|
role: "note"
|
|
120
176
|
}, nativeAttrs(_ctx.$attrs), {
|
|
177
|
+
"data-heading": reflectedProp("heading", "heading", checkedProps.value.heading, void 0, false),
|
|
121
178
|
"data-tone": reflectedProp("tone", "tone", checkedProps.value.tone, void 0, false),
|
|
122
179
|
"data-ui-callout-state": hostState.value || void 0
|
|
123
180
|
}), [createElementVNode("span", _hoisted_2, [
|
|
@@ -135,17 +192,27 @@ var UiCallout_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
135
192
|
createElementVNode("path", { d: "M13 2v7h7" }, null, -1),
|
|
136
193
|
createElementVNode("path", { d: "m9.5 17.5 4-4 2 2-4 4H9.5v-2Z" }, null, -1)
|
|
137
194
|
])])) : createCommentVNode("v-if", true),
|
|
138
|
-
checkedProps.value.tone === "
|
|
195
|
+
checkedProps.value.tone === "tip" ? (openBlock(), createElementBlock("svg", _hoisted_5, [..._cache[2] || (_cache[2] = [
|
|
196
|
+
createElementVNode("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" }, null, -1),
|
|
197
|
+
createElementVNode("path", { d: "M9 18h6" }, null, -1),
|
|
198
|
+
createElementVNode("path", { d: "M10 22h4" }, null, -1)
|
|
199
|
+
])])) : createCommentVNode("v-if", true),
|
|
200
|
+
checkedProps.value.tone === "important" ? (openBlock(), createElementBlock("svg", _hoisted_6, [..._cache[3] || (_cache[3] = [
|
|
201
|
+
createElementVNode("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" }, null, -1),
|
|
202
|
+
createElementVNode("path", { d: "M12 15h.01" }, null, -1),
|
|
203
|
+
createElementVNode("path", { d: "M12 7v4" }, null, -1)
|
|
204
|
+
])])) : createCommentVNode("v-if", true),
|
|
205
|
+
checkedProps.value.tone === "warning" ? (openBlock(), createElementBlock("svg", _hoisted_7, [..._cache[4] || (_cache[4] = [
|
|
139
206
|
createElementVNode("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }, null, -1),
|
|
140
207
|
createElementVNode("path", { d: "M12 9v4" }, null, -1),
|
|
141
208
|
createElementVNode("path", { d: "M12 17h.01" }, null, -1)
|
|
142
209
|
])])) : createCommentVNode("v-if", true),
|
|
143
|
-
checkedProps.value.tone === "success" ? (openBlock(), createElementBlock("svg",
|
|
210
|
+
checkedProps.value.tone === "success" ? (openBlock(), createElementBlock("svg", _hoisted_8, [..._cache[5] || (_cache[5] = [createElementVNode("circle", {
|
|
144
211
|
cx: "12",
|
|
145
212
|
cy: "12",
|
|
146
213
|
r: "10"
|
|
147
214
|
}, null, -1), createElementVNode("path", { d: "m9 12 2 2 4-4" }, null, -1)])])) : createCommentVNode("v-if", true),
|
|
148
|
-
checkedProps.value.tone === "danger" ? (openBlock(), createElementBlock("svg",
|
|
215
|
+
checkedProps.value.tone === "danger" || checkedProps.value.tone === "caution" ? (openBlock(), createElementBlock("svg", _hoisted_9, [..._cache[6] || (_cache[6] = [
|
|
149
216
|
createElementVNode("circle", {
|
|
150
217
|
cx: "12",
|
|
151
218
|
cy: "12",
|
|
@@ -154,12 +221,12 @@ var UiCallout_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
154
221
|
createElementVNode("path", { d: "m15 9-6 6" }, null, -1),
|
|
155
222
|
createElementVNode("path", { d: "m9 9 6 6" }, null, -1)
|
|
156
223
|
])])) : createCommentVNode("v-if", true)
|
|
157
|
-
]), createElementVNode("div",
|
|
224
|
+
]), createElementVNode("div", _hoisted_10, [checkedProps.value.heading ? (openBlock(), createElementBlock("strong", _hoisted_11, toDisplayString(checkedProps.value.heading), 1)) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")])], 16, _hoisted_1)), [[unref(vPropValidity), {
|
|
158
225
|
contract: propValidityContract,
|
|
159
226
|
values: { ...props }
|
|
160
227
|
}]]);
|
|
161
228
|
};
|
|
162
229
|
}
|
|
163
|
-
}), [["__scopeId", "data-v-
|
|
230
|
+
}), [["__scopeId", "data-v-492ee9df"]]);
|
|
164
231
|
//#endregion
|
|
165
232
|
export { UiCallout_default as t };
|
package/vue/chunks/UiTabs.js
CHANGED
|
@@ -6,6 +6,7 @@ import { Fragment, computed, createElementBlock, createElementVNode, createVNode
|
|
|
6
6
|
var _hoisted_1 = [
|
|
7
7
|
"data-activation",
|
|
8
8
|
"data-density",
|
|
9
|
+
"data-group",
|
|
9
10
|
"data-label",
|
|
10
11
|
"data-orientation",
|
|
11
12
|
"data-stretch",
|
|
@@ -33,6 +34,10 @@ var UiTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
33
34
|
type: null,
|
|
34
35
|
default: "comfortable"
|
|
35
36
|
},
|
|
37
|
+
group: {
|
|
38
|
+
type: null,
|
|
39
|
+
default: ""
|
|
40
|
+
},
|
|
36
41
|
label: {
|
|
37
42
|
type: null,
|
|
38
43
|
default: "Tabs"
|
|
@@ -75,6 +80,16 @@ var UiTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
75
80
|
values: ["comfortable", "compact"],
|
|
76
81
|
default: "comfortable"
|
|
77
82
|
},
|
|
83
|
+
group: {
|
|
84
|
+
type: {
|
|
85
|
+
kind: "terminal",
|
|
86
|
+
name: "string"
|
|
87
|
+
},
|
|
88
|
+
required: false,
|
|
89
|
+
target: { attribute: "group" },
|
|
90
|
+
description: "Tabs with the same nonempty group share one selection: choosing a tab selects the tab with the same label in every other Tabs of that group in the\n document, and the choice is remembered for the next visit. Use it for alternatives a reader picks once, such as a package manager or language.",
|
|
91
|
+
default: ""
|
|
92
|
+
},
|
|
78
93
|
label: {
|
|
79
94
|
type: {
|
|
80
95
|
kind: "terminal",
|
|
@@ -121,6 +136,7 @@ var UiTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
121
136
|
const acceptedProps = {
|
|
122
137
|
activation: "auto",
|
|
123
138
|
density: "comfortable",
|
|
139
|
+
group: "",
|
|
124
140
|
label: "Tabs",
|
|
125
141
|
orientation: "horizontal",
|
|
126
142
|
stretch: false,
|
|
@@ -135,6 +151,10 @@ var UiTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
135
151
|
kind: "terminal",
|
|
136
152
|
name: "keyword"
|
|
137
153
|
}, false, "density", acceptedProps),
|
|
154
|
+
group: checkedProp(props["group"], {
|
|
155
|
+
kind: "terminal",
|
|
156
|
+
name: "string"
|
|
157
|
+
}, false, "group", acceptedProps),
|
|
138
158
|
label: checkedProp(props["label"], {
|
|
139
159
|
kind: "terminal",
|
|
140
160
|
name: "string"
|
|
@@ -270,6 +290,7 @@ var UiTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
270
290
|
propNames: [
|
|
271
291
|
"activation",
|
|
272
292
|
"density",
|
|
293
|
+
"group",
|
|
273
294
|
"label",
|
|
274
295
|
"orientation",
|
|
275
296
|
"stretch",
|
|
@@ -325,6 +346,7 @@ var UiTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
325
346
|
return withDirectives((openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-tabs" }, nativeAttrs(_ctx.$attrs), {
|
|
326
347
|
"data-activation": reflectedProp("activation", "activation", checkedProps.value.activation, void 0, false),
|
|
327
348
|
"data-density": reflectedProp("density", "density", checkedProps.value.density, void 0, false),
|
|
349
|
+
"data-group": reflectedProp("group", "group", checkedProps.value.group, void 0, false),
|
|
328
350
|
"data-label": reflectedProp("label", "label", checkedProps.value.label, void 0, false),
|
|
329
351
|
"data-orientation": reflectedProp("orientation", "orientation", checkedProps.value.orientation, void 0, false),
|
|
330
352
|
"data-stretch": reflectedProp("stretch", "stretch", checkedProps.value.stretch, void 0, false),
|
|
@@ -362,6 +384,6 @@ var UiTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
362
384
|
}]]);
|
|
363
385
|
};
|
|
364
386
|
}
|
|
365
|
-
}), [["__scopeId", "data-v-
|
|
387
|
+
}), [["__scopeId", "data-v-f10f6ffb"]]);
|
|
366
388
|
//#endregion
|
|
367
389
|
export { UiTabs_default as t };
|