@threadlabs/looma 0.51.5 → 0.51.6

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/docs/catalog.json CHANGED
@@ -533,7 +533,7 @@
533
533
  ],
534
534
  "schemaVersion": 1,
535
535
  "package": "@threadlabs/looma",
536
- "version": "0.51.5",
536
+ "version": "0.51.6",
537
537
  "groups": [
538
538
  {
539
539
  "id": "layout",
@@ -6085,6 +6085,17 @@
6085
6085
  "aside"
6086
6086
  ]
6087
6087
  },
6088
+ {
6089
+ "name": "fill",
6090
+ "property": "fill",
6091
+ "description": "In a bounded flex column, grows into the remaining height. Put a filling Scroll Area in the body when its content needs to scroll independently.",
6092
+ "type": "boolean",
6093
+ "valueType": {
6094
+ "kind": "terminal",
6095
+ "name": "boolean"
6096
+ },
6097
+ "default": false
6098
+ },
6088
6099
  {
6089
6100
  "name": "padding",
6090
6101
  "property": "padding",
@@ -6185,6 +6196,12 @@
6185
6196
  "aside"
6186
6197
  ]
6187
6198
  },
6199
+ {
6200
+ "name": "fill",
6201
+ "description": "In a bounded flex column, grows into the remaining height. Put a filling Scroll Area in the body when its content needs to scroll independently.",
6202
+ "type": "boolean",
6203
+ "default": false
6204
+ },
6188
6205
  {
6189
6206
  "name": "padding",
6190
6207
  "description": "The space inside the card: xs is compact (0.5rem), sm is snug (0.75rem), md is the default (1.5rem), and lg is roomy (2rem).",
@@ -6323,6 +6340,16 @@
6323
6340
  "resizable": false,
6324
6341
  "bindings": "",
6325
6342
  "frameworks": {}
6343
+ },
6344
+ {
6345
+ "id": "@threadlabs/looma/ui-card/05-fill",
6346
+ "name": "05-fill",
6347
+ "title": "Fill a bounded column",
6348
+ "description": "Place this stack in a bounded-height parent. The surface fills the remaining space while its body scrolls independently.",
6349
+ "markup": "<ui-stack fill gap=\"s\">\n <ui-text weight=\"semibold\">Reference panel</ui-text>\n <ui-card fill variant=\"subtle\" tone=\"accent\" padding=\"xs\">\n <ui-scroll-area fill>\n <ui-stack gap=\"s\">\n <ui-text>A short list still has a full-height surface.</ui-text>\n <ui-text>Longer content scrolls inside this panel.</ui-text>\n </ui-stack>\n </ui-scroll-area>\n </ui-card>\n <ui-text size=\"sm\" tone=\"secondary\">Persistent controls stay below the panel.</ui-text>\n</ui-stack>",
6350
+ "resizable": false,
6351
+ "bindings": "",
6352
+ "frameworks": {}
6326
6353
  }
6327
6354
  ]
6328
6355
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.51.5",
3
+ "version": "0.51.6",
4
4
  "type": "module",
5
5
  "description": "HTML Next UI components, native DOM support and design tokens.",
6
6
  "license": "MIT",
@@ -46,6 +46,11 @@
46
46
  --_ui-card-group-region-layout: initial;
47
47
  }
48
48
 
49
+ :scope:where([data-component~="ui-card"])[data-ui-card-state~="fill"] {
50
+ flex: 1;
51
+ min-block-size: 0;
52
+ }
53
+
49
54
  .header:empty {
50
55
  display: none !important;
51
56
  }
@@ -11,6 +11,7 @@ export interface UiCardElement extends HTMLElement {
11
11
  }
12
12
  export interface UiCardProps {
13
13
  as?: "div" | "section" | "article" | "aside" | null;
14
+ fill?: boolean | null;
14
15
  padding?: "xs" | "sm" | "md" | "lg" | null;
15
16
  size?: "content" | "sm" | "md" | "lg" | null;
16
17
  tone?: "neutral" | "accent" | "accent-secondary" | "accent-tertiary" | "info" | "success" | "warning" | "danger" | null;
package/vanilla/UiCard.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // Generated by HTML Next 1.0.0-alpha.79 for Vanilla DOM. Do not edit.
2
- import { attachGeneratedController, buildTemplate, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, armElement, replaceRoot, checkFormat, defineComponent } from "@nextwebwg/html-next/generated-runtime";
2
+ import { attachGeneratedController, buildTemplate, writeAttribute, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, armElement, replaceRoot, checkBoolean, checkFormat, defineComponent } from "@nextwebwg/html-next/generated-runtime";
3
3
  import "../styles/ui-card.css";
4
4
 
5
5
  const T0 = ["",[],"\n ",["div",["class","header"],4],"\n ",["div",["class","content"],4],"\n ",["div",["class","actions"],4],"\n "];
@@ -20,13 +20,13 @@ const T14 = ["",[]];
20
20
  const T15 = ["",[]];
21
21
  let P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15;
22
22
  const S = { n: [], t: [], f: import.meta.url, g: "ui-card", b: generatedInputs };
23
- const A = [["section",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-treatment","data-ui-card-prop-variant"]],["article",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-treatment","data-ui-card-prop-variant"]],["aside",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-treatment","data-ui-card-prop-variant"]],["div",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-treatment","data-ui-card-prop-variant"]]];
23
+ const A = [["section",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-fill","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-treatment","data-ui-card-prop-variant"]],["article",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-fill","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-treatment","data-ui-card-prop-variant"]],["aside",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-fill","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-treatment","data-ui-card-prop-variant"]],["div",{},[],"",[],["data-ui-card-state","data-ui-card-prop-as","data-ui-card-prop-fill","data-ui-card-prop-padding","data-ui-card-prop-size","data-ui-card-prop-tone","data-ui-card-prop-treatment","data-ui-card-prop-variant"]]];
24
24
  const Q = [[],[],[],[]];
25
- const D = { g: "ui-card", props: { "as": { "required":false,"values":["div","section","article","aside"],"default":"div", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "padding": { "required":false,"values":["xs","sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "size": { "required":false,"values":["content","sm","md","lg"],"default":"content", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "tone": { "required":false,"values":["neutral","accent","accent-secondary","accent-tertiary","info","success","warning","danger"],"default":"neutral", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "treatment": { "required":false,"values":["standard","expressive"],"default":"standard", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["outlined","subtle","elevated"],"default":"outlined", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
25
+ const D = { g: "ui-card", props: { "as": { "required":false,"values":["div","section","article","aside"],"default":"div", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "fill": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "padding": { "required":false,"values":["xs","sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "size": { "required":false,"values":["content","sm","md","lg"],"default":"content", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "tone": { "required":false,"values":["neutral","accent","accent-secondary","accent-tertiary","info","success","warning","danger"],"default":"neutral", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "treatment": { "required":false,"values":["standard","expressive"],"default":"standard", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["outlined","subtle","elevated"],"default":"outlined", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
26
26
 
27
27
  export function createUiCard(options = {}, html) {
28
28
  const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
29
- const v = [null, null, null, null, null, null];
29
+ const v = [null, null, null, null, null, null, null];
30
30
  let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
31
31
  let a = ((v[0] === "section") ? 0 : (v[0] === "article") ? 1 : (v[0] === "aside") ? 2 : 3);
32
32
  let element;
@@ -168,8 +168,8 @@ export function createUiCard(options = {}, html) {
168
168
  return r;
169
169
  };
170
170
  const p0 = (r, c, d) => {
171
- if (c & 62) {
172
- const x0 = hostState(["padding","variant","treatment","tone","size"], [v[1], v[5], v[4], v[3], v[2]]);
171
+ if (c & 126) {
172
+ const x0 = hostState(["fill","padding","variant","treatment","tone","size"], [v[1], v[2], v[6], v[5], v[4], v[3]]);
173
173
  const s0 = x0;
174
174
  if (s0 !== r.v0) writeAttribute(r.n, "data-ui-card-state", (r.v0 = s0) === "" ? null : s0);
175
175
  }
@@ -195,8 +195,8 @@ export function createUiCard(options = {}, html) {
195
195
  return r;
196
196
  };
197
197
  const p4 = (r, c, d) => {
198
- if (c & 62) {
199
- const x0 = hostState(["padding","variant","treatment","tone","size"], [v[1], v[5], v[4], v[3], v[2]]);
198
+ if (c & 126) {
199
+ const x0 = hostState(["fill","padding","variant","treatment","tone","size"], [v[1], v[2], v[6], v[5], v[4], v[3]]);
200
200
  const s0 = x0;
201
201
  if (s0 !== r.v0) writeAttribute(r.n, "data-ui-card-state", (r.v0 = s0) === "" ? null : s0);
202
202
  }
@@ -222,8 +222,8 @@ export function createUiCard(options = {}, html) {
222
222
  return r;
223
223
  };
224
224
  const p8 = (r, c, d) => {
225
- if (c & 62) {
226
- const x0 = hostState(["padding","variant","treatment","tone","size"], [v[1], v[5], v[4], v[3], v[2]]);
225
+ if (c & 126) {
226
+ const x0 = hostState(["fill","padding","variant","treatment","tone","size"], [v[1], v[2], v[6], v[5], v[4], v[3]]);
227
227
  const s0 = x0;
228
228
  if (s0 !== r.v0) writeAttribute(r.n, "data-ui-card-state", (r.v0 = s0) === "" ? null : s0);
229
229
  }
@@ -249,8 +249,8 @@ export function createUiCard(options = {}, html) {
249
249
  return r;
250
250
  };
251
251
  const p12 = (r, c, d) => {
252
- if (c & 62) {
253
- const x0 = hostState(["padding","variant","treatment","tone","size"], [v[1], v[5], v[4], v[3], v[2]]);
252
+ if (c & 126) {
253
+ const x0 = hostState(["fill","padding","variant","treatment","tone","size"], [v[1], v[2], v[6], v[5], v[4], v[3]]);
254
254
  const s0 = x0;
255
255
  if (s0 !== r.v0) writeAttribute(r.n, "data-ui-card-state", (r.v0 = s0) === "" ? null : s0);
256
256
  }
@@ -291,4 +291,4 @@ export function createUiCard(options = {}, html) {
291
291
  manageProps(I);
292
292
  return element;
293
293
  }
294
- defineComponent("ui-card", createUiCard, ["as","padding","size","tone","treatment","variant"]);
294
+ defineComponent("ui-card", createUiCard, ["as","fill","padding","size","tone","treatment","variant"]);