@threadlabs/looma 0.15.0 → 0.15.1
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-cluster/ui-cluster.html +7 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-cluster.css +3 -0
- package/vanilla/UiCluster.d.ts +1 -0
- package/vanilla/UiCluster.js +2 -0
- package/vue/UiCluster.d.ts +1 -0
- package/vue/UiCluster.vue +5 -0
- package/vue/chunks/UiCluster.js +5 -3
- package/vue/components.css +16 -13
package/package.json
CHANGED
package/styles/ui-cluster.css
CHANGED
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
:scope[data-ui-cluster-state~="justify=between"] {
|
|
51
51
|
justify-content: space-between;
|
|
52
52
|
}
|
|
53
|
+
:scope[data-ui-cluster-state~="wrap=nowrap"] {
|
|
54
|
+
flex-wrap: nowrap;
|
|
55
|
+
}
|
|
53
56
|
|
|
54
57
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
55
58
|
:scope[hidden] {
|
package/vanilla/UiCluster.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface UiClusterProps {
|
|
|
9
9
|
align?: "start" | "center" | "end" | "stretch" | null;
|
|
10
10
|
gap?: "xs" | "s" | "m" | "l" | "xl" | null;
|
|
11
11
|
justify?: "start" | "center" | "end" | "between" | null;
|
|
12
|
+
wrap?: "wrap" | "nowrap" | null;
|
|
12
13
|
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
13
14
|
children?: readonly (string | Node)[];
|
|
14
15
|
slots?: Readonly<Record<string, readonly (string | Node)[]>>;
|
package/vanilla/UiCluster.js
CHANGED
|
@@ -8,6 +8,7 @@ export function createUiCluster(options = {}) {
|
|
|
8
8
|
const prop0 = componentProps["align"] === undefined ? undefined : componentProps["align"];
|
|
9
9
|
const prop1 = componentProps["gap"] === undefined ? undefined : componentProps["gap"];
|
|
10
10
|
const prop2 = componentProps["justify"] === undefined ? undefined : componentProps["justify"];
|
|
11
|
+
const prop3 = componentProps["wrap"] === undefined ? undefined : componentProps["wrap"];
|
|
11
12
|
const element = document.createElement("div");
|
|
12
13
|
for (const [name, value] of Object.entries(attributes)) {
|
|
13
14
|
if (value === null || value === undefined || value === false) continue;
|
|
@@ -26,6 +27,7 @@ export function createUiCluster(options = {}) {
|
|
|
26
27
|
{ name: "align", attribute: "data-align", value: componentProps["align"], type: ["start","center","end","stretch"], required: false },
|
|
27
28
|
{ name: "gap", attribute: "data-gap", value: componentProps["gap"], type: ["xs","s","m","l","xl"], required: false },
|
|
28
29
|
{ name: "justify", attribute: "data-justify", value: componentProps["justify"], type: ["start","center","end","between"], required: false },
|
|
30
|
+
{ name: "wrap", attribute: "data-wrap", value: componentProps["wrap"], type: ["wrap","nowrap"], required: false },
|
|
29
31
|
]);
|
|
30
32
|
return element;
|
|
31
33
|
}
|
package/vue/UiCluster.d.ts
CHANGED
package/vue/UiCluster.vue
CHANGED
|
@@ -8,6 +8,7 @@ const props = defineProps<{
|
|
|
8
8
|
align?: 'start' | 'center' | 'end' | 'stretch'
|
|
9
9
|
gap?: 'xs' | 's' | 'm' | 'l' | 'xl'
|
|
10
10
|
justify?: 'start' | 'center' | 'end' | 'between'
|
|
11
|
+
wrap?: 'wrap' | 'nowrap'
|
|
11
12
|
}>()
|
|
12
13
|
|
|
13
14
|
/** The values the styles' :host-state() rules test. */
|
|
@@ -16,6 +17,7 @@ const hostState = computed(() =>
|
|
|
16
17
|
props.gap && `gap gap=${props.gap}`,
|
|
17
18
|
props.align && `align align=${props.align}`,
|
|
18
19
|
props.justify && `justify justify=${props.justify}`,
|
|
20
|
+
props.wrap && `wrap wrap=${props.wrap}`,
|
|
19
21
|
].filter(Boolean).join(' ')
|
|
20
22
|
)
|
|
21
23
|
</script>
|
|
@@ -77,6 +79,9 @@ const hostState = computed(() =>
|
|
|
77
79
|
[data-component~="ui-cluster"][data-ui-cluster-state~="justify=between"] {
|
|
78
80
|
justify-content: space-between;
|
|
79
81
|
}
|
|
82
|
+
[data-component~="ui-cluster"][data-ui-cluster-state~="wrap=nowrap"] {
|
|
83
|
+
flex-wrap: nowrap;
|
|
84
|
+
}
|
|
80
85
|
|
|
81
86
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
82
87
|
[data-component~="ui-cluster"][hidden] {
|
package/vue/chunks/UiCluster.js
CHANGED
|
@@ -10,7 +10,8 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
10
10
|
props: {
|
|
11
11
|
align: {},
|
|
12
12
|
gap: {},
|
|
13
|
-
justify: {}
|
|
13
|
+
justify: {},
|
|
14
|
+
wrap: {}
|
|
14
15
|
},
|
|
15
16
|
setup(__props) {
|
|
16
17
|
const props = __props;
|
|
@@ -18,12 +19,13 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
18
19
|
const hostState = computed(() => [
|
|
19
20
|
props.gap && `gap gap=${props.gap}`,
|
|
20
21
|
props.align && `align align=${props.align}`,
|
|
21
|
-
props.justify && `justify justify=${props.justify}
|
|
22
|
+
props.justify && `justify justify=${props.justify}`,
|
|
23
|
+
props.wrap && `wrap wrap=${props.wrap}`
|
|
22
24
|
].filter(Boolean).join(" "));
|
|
23
25
|
return (_ctx, _cache) => {
|
|
24
26
|
return openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-cluster" }, _ctx.$attrs, { "data-ui-cluster-state": hostState.value || void 0 }), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1);
|
|
25
27
|
};
|
|
26
28
|
}
|
|
27
|
-
}), [["__scopeId", "data-v-
|
|
29
|
+
}), [["__scopeId", "data-v-b98d575c"]]);
|
|
28
30
|
//#endregion
|
|
29
31
|
export { UiCluster_default as t };
|
package/vue/components.css
CHANGED
|
@@ -1240,7 +1240,7 @@ input[data-v-5e151d99]:focus-visible {
|
|
|
1240
1240
|
syntax: "*";
|
|
1241
1241
|
inherits: false;
|
|
1242
1242
|
}
|
|
1243
|
-
[data-component~="ui-cluster"][data-v-
|
|
1243
|
+
[data-component~="ui-cluster"][data-v-b98d575c] {
|
|
1244
1244
|
--_layout-gap: var(--ui-space-3);
|
|
1245
1245
|
display: flex;
|
|
1246
1246
|
flex-wrap: wrap;
|
|
@@ -1250,42 +1250,45 @@ input[data-v-5e151d99]:focus-visible {
|
|
|
1250
1250
|
max-inline-size: 100%;
|
|
1251
1251
|
margin: 0;
|
|
1252
1252
|
}
|
|
1253
|
-
[data-component~="ui-cluster"][data-ui-cluster-state~="gap=xs"][data-v-
|
|
1253
|
+
[data-component~="ui-cluster"][data-ui-cluster-state~="gap=xs"][data-v-b98d575c] {
|
|
1254
1254
|
--_layout-gap: var(--ui-space-2);
|
|
1255
1255
|
}
|
|
1256
|
-
[data-component~="ui-cluster"][data-ui-cluster-state~="gap=s"][data-v-
|
|
1256
|
+
[data-component~="ui-cluster"][data-ui-cluster-state~="gap=s"][data-v-b98d575c] {
|
|
1257
1257
|
--_layout-gap: var(--ui-space-3);
|
|
1258
1258
|
}
|
|
1259
|
-
[data-component~="ui-cluster"][data-ui-cluster-state~="gap=m"][data-v-
|
|
1259
|
+
[data-component~="ui-cluster"][data-ui-cluster-state~="gap=m"][data-v-b98d575c] {
|
|
1260
1260
|
--_layout-gap: var(--ui-space-4);
|
|
1261
1261
|
}
|
|
1262
|
-
[data-component~="ui-cluster"][data-ui-cluster-state~="gap=l"][data-v-
|
|
1262
|
+
[data-component~="ui-cluster"][data-ui-cluster-state~="gap=l"][data-v-b98d575c] {
|
|
1263
1263
|
--_layout-gap: var(--ui-space-5);
|
|
1264
1264
|
}
|
|
1265
|
-
[data-component~="ui-cluster"][data-ui-cluster-state~="gap=xl"][data-v-
|
|
1265
|
+
[data-component~="ui-cluster"][data-ui-cluster-state~="gap=xl"][data-v-b98d575c] {
|
|
1266
1266
|
--_layout-gap: var(--ui-space-6);
|
|
1267
1267
|
}
|
|
1268
|
-
[data-component~="ui-cluster"][data-ui-cluster-state~="align=start"][data-v-
|
|
1268
|
+
[data-component~="ui-cluster"][data-ui-cluster-state~="align=start"][data-v-b98d575c] {
|
|
1269
1269
|
align-items: flex-start;
|
|
1270
1270
|
}
|
|
1271
|
-
[data-component~="ui-cluster"][data-ui-cluster-state~="align=end"][data-v-
|
|
1271
|
+
[data-component~="ui-cluster"][data-ui-cluster-state~="align=end"][data-v-b98d575c] {
|
|
1272
1272
|
align-items: flex-end;
|
|
1273
1273
|
}
|
|
1274
|
-
[data-component~="ui-cluster"][data-ui-cluster-state~="align=stretch"][data-v-
|
|
1274
|
+
[data-component~="ui-cluster"][data-ui-cluster-state~="align=stretch"][data-v-b98d575c] {
|
|
1275
1275
|
align-items: stretch;
|
|
1276
1276
|
}
|
|
1277
|
-
[data-component~="ui-cluster"][data-ui-cluster-state~="justify=center"][data-v-
|
|
1277
|
+
[data-component~="ui-cluster"][data-ui-cluster-state~="justify=center"][data-v-b98d575c] {
|
|
1278
1278
|
justify-content: center;
|
|
1279
1279
|
}
|
|
1280
|
-
[data-component~="ui-cluster"][data-ui-cluster-state~="justify=end"][data-v-
|
|
1280
|
+
[data-component~="ui-cluster"][data-ui-cluster-state~="justify=end"][data-v-b98d575c] {
|
|
1281
1281
|
justify-content: flex-end;
|
|
1282
1282
|
}
|
|
1283
|
-
[data-component~="ui-cluster"][data-ui-cluster-state~="justify=between"][data-v-
|
|
1283
|
+
[data-component~="ui-cluster"][data-ui-cluster-state~="justify=between"][data-v-b98d575c] {
|
|
1284
1284
|
justify-content: space-between;
|
|
1285
1285
|
}
|
|
1286
|
+
[data-component~="ui-cluster"][data-ui-cluster-state~="wrap=nowrap"][data-v-b98d575c] {
|
|
1287
|
+
flex-wrap: nowrap;
|
|
1288
|
+
}
|
|
1286
1289
|
|
|
1287
1290
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
1288
|
-
[data-component~="ui-cluster"][hidden][data-v-
|
|
1291
|
+
[data-component~="ui-cluster"][hidden][data-v-b98d575c] {
|
|
1289
1292
|
display: none;
|
|
1290
1293
|
}
|
|
1291
1294
|
|