@threadlabs/looma 0.15.6 → 0.16.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.15.6",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "description": "Looma components as HTML, Vue, and plain DOM, with design tokens.",
6
6
  "license": "MIT",
@@ -256,27 +256,27 @@
256
256
  );
257
257
  }
258
258
 
259
- /* A hovered row reads its whole name: the label slides far enough to show the end, waits
260
- there, and comes back. Only when it actually overflows — the controller measures by how
259
+ /* A hovered row reads its whole name: the label slides far enough to show the end, rests
260
+ there, and starts again. Only when it actually overflows — the controller measures by how
261
261
  much — after the controls have taken their place over its end — and hands over the distance
262
262
  and a duration from it, so every name moves at the same speed. */
263
263
  .row[data-ui-marquee] > .label > .label-text {
264
- /* Once, and it stays at the end while the pointer is there: a name that keeps sliding back
265
- and forth under the pointer is harder to read than one that arrives and holds. */
264
+ /* Once per pass: the controller restarts it after a rest at the end, so the name holds still
265
+ long enough to read rather than sliding back and forth. */
266
266
  animation: ui-tree-item-marquee var(--_marquee-duration) linear 0.5s 1 normal forwards;
267
267
  will-change: transform;
268
268
  }
269
269
 
270
270
  /* This comes after the hover fade, which it replaces at the same specificity. While the name
271
271
  slides, the label reaches back under the icon (the controller measures how far) with its text
272
- where it was, and fades out across that stretch, gone by the icon's middle: the name slips
273
- under the icon rather than stopping at a hard edge beside it. */
272
+ where it was, and fades out across the gap before the icon, fully gone where the icon begins
273
+ to cover it: the name slips under the icon rather than stopping at a hard edge beside it. */
274
274
  .row[data-ui-marquee] > .label {
275
275
  margin-inline-start: calc(-1 * var(--_marquee-lead, 0px));
276
276
  padding-inline-start: calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2)));
277
277
  mask-image: linear-gradient(
278
278
  to right,
279
- transparent calc(var(--_marquee-lead, 0px) / 2),
279
+ transparent var(--_marquee-icon-width, 0px),
280
280
  #000 calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2))),
281
281
  #000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
282
282
  transparent calc(100% - var(--_tree-actions-width, 1.75rem))
@@ -286,7 +286,7 @@
286
286
  .row[data-ui-marquee] > .label:dir(rtl) {
287
287
  mask-image: linear-gradient(
288
288
  to left,
289
- transparent calc(var(--_marquee-lead, 0px) / 2),
289
+ transparent var(--_marquee-icon-width, 0px),
290
290
  #000 calc(var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2))),
291
291
  #000 calc(100% - var(--_tree-actions-width, 1.75rem) - var(--ui-space-3)),
292
292
  transparent calc(100% - var(--_tree-actions-width, 1.75rem))
@@ -520,15 +520,15 @@
520
520
  /* The controls sit over the label's end, so the text fades out where they begin. The fade is
521
521
  the truncation mark while it shows: an ellipsis under it would read as a second one. */
522
522
 
523
- /* A hovered row reads its whole name: the label slides far enough to show the end, waits
524
- there, and comes back. Only when it actually overflows — the controller measures by how
523
+ /* A hovered row reads its whole name: the label slides far enough to show the end, rests
524
+ there, and starts again. Only when it actually overflows — the controller measures by how
525
525
  much — after the controls have taken their place over its end — and hands over the distance
526
526
  and a duration from it, so every name moves at the same speed. */
527
527
 
528
528
  /* This comes after the hover fade, which it replaces at the same specificity. While the name
529
529
  slides, the label reaches back under the icon (the controller measures how far) with its text
530
- where it was, and fades out across that stretch, gone by the icon's middle: the name slips
531
- under the icon rather than stopping at a hard edge beside it. */
530
+ where it was, and fades out across the gap before the icon, fully gone where the icon begins
531
+ to cover it: the name slips under the icon rather than stopping at a hard edge beside it. */
532
532
 
533
533
  /* Reduced motion keeps the fade, which already says the name continues. */
534
534
  @media (prefers-reduced-motion: reduce) {
@@ -12,6 +12,7 @@ export interface UiDialogProps {
12
12
  closedby?: "any" | "closerequest" | "none" | null;
13
13
  for?: string | null;
14
14
  label?: string | null;
15
+ modal?: boolean | null;
15
16
  modeless?: boolean | null;
16
17
  open?: boolean | null;
17
18
  size?: "sm" | "md" | "lg" | "fullscreen" | null;
@@ -3,7 +3,7 @@ import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
3
3
  import * as controller from "../components/ui-dialog/ui-dialog.js";
4
4
  import "../styles/ui-dialog.css";
5
5
 
6
- const definition = {...{"contract":{"tag":"ui-dialog","props":{"alert":{"type":"boolean","required":false,"target":{"attribute":"alert"},"default":false},"closedby":{"type":{"enum":["any","closerequest","none"]},"required":false,"target":{"attribute":"closedby"},"default":"closerequest"},"for":{"type":"string","required":false,"target":{"attribute":"for"},"default":""},"label":{"type":"string","required":false,"target":{"attribute":"label"}},"modeless":{"type":"boolean","required":false,"target":{"attribute":"modeless"},"default":false},"open":{"type":"boolean","required":false,"target":{"attribute":"open"},"default":false},"size":{"type":{"enum":["sm","md","lg","fullscreen"]},"required":false,"target":{"attribute":"size"},"default":"md"}}},"template":{"kind":"element","name":"dialog","attributes":[{"kind":"attribute","name":"aria-label","expression":"accessibleLabel","expressionPlan":{"source":"accessibleLabel","ast":{"kind":"id","name":"accessibleLabel"},"dependencies":["accessibleLabel"]}}],"children":[{"kind":"element","name":"header","attributes":[],"children":[{"kind":"element","name":"h2","attributes":[{"kind":"literal","name":"class","value":"title"},{"kind":"directive","name":"value","expression":"label","expressionPlan":{"source":"label","ast":{"kind":"id","name":"label"},"dependencies":["label"]}}],"children":[],"flow":{"kind":"if","test":"label","testPlan":{"source":"label","ast":{"kind":"id","name":"label"},"dependencies":["label"]}}},{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"class","value":"close"},{"kind":"literal","name":"type","value":"button"},{"kind":"literal","name":"aria-label","value":"Close"}],"children":[],"ref":"close"}]},{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"class","value":"body"}],"children":[{"kind":"slot"}]},{"kind":"element","name":"footer","attributes":[],"children":[{"kind":"slot","fallback":[],"name":"actions"}]}]},"declarations":[{"kind":"state","name":"internalOpen","expression":{"source":"false","ast":{"kind":"literal","value":false},"dependencies":[]}},{"kind":"state","name":"accessibleLabel","expression":{"source":"'Dialog'","ast":{"kind":"literal","value":"Dialog"},"dependencies":[]}},{"kind":"event","name":"open","type":"object({ open: boolean, reason: action | programmatic, trigger: keyboard | pointer | programmatic })","bubbles":true,"composed":true,"cancelable":false},{"kind":"event","name":"close","type":"object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })","bubbles":true,"composed":true,"cancelable":false}],"root":{"kind":"native","element":"dialog","choices":["dialog"]}},source:{file:import.meta.url},css:""};
6
+ const definition = {...{"contract":{"tag":"ui-dialog","props":{"alert":{"type":"boolean","required":false,"target":{"attribute":"alert"},"default":false},"closedby":{"type":{"enum":["any","closerequest","none"]},"required":false,"target":{"attribute":"closedby"}},"for":{"type":"string","required":false,"target":{"attribute":"for"},"default":""},"label":{"type":"string","required":false,"target":{"attribute":"label"}},"modal":{"type":"boolean","required":false,"target":{"attribute":"modal"},"default":false},"modeless":{"type":"boolean","required":false,"target":{"attribute":"modeless"},"default":false},"open":{"type":"boolean","required":false,"target":{"attribute":"open"},"default":false},"size":{"type":{"enum":["sm","md","lg","fullscreen"]},"required":false,"target":{"attribute":"size"},"default":"md"}}},"template":{"kind":"element","name":"dialog","attributes":[{"kind":"attribute","name":"aria-label","expression":"accessibleLabel","expressionPlan":{"source":"accessibleLabel","ast":{"kind":"id","name":"accessibleLabel"},"dependencies":["accessibleLabel"]}}],"children":[{"kind":"element","name":"header","attributes":[],"children":[{"kind":"element","name":"h2","attributes":[{"kind":"literal","name":"class","value":"title"},{"kind":"directive","name":"value","expression":"label","expressionPlan":{"source":"label","ast":{"kind":"id","name":"label"},"dependencies":["label"]}}],"children":[],"flow":{"kind":"if","test":"label","testPlan":{"source":"label","ast":{"kind":"id","name":"label"},"dependencies":["label"]}}},{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"class","value":"close"},{"kind":"literal","name":"type","value":"button"},{"kind":"literal","name":"aria-label","value":"Close"}],"children":[],"ref":"close"}]},{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"class","value":"body"}],"children":[{"kind":"slot"}]},{"kind":"element","name":"footer","attributes":[],"children":[{"kind":"slot","fallback":[],"name":"actions"}]}]},"declarations":[{"kind":"state","name":"internalOpen","expression":{"source":"false","ast":{"kind":"literal","value":false},"dependencies":[]}},{"kind":"state","name":"accessibleLabel","expression":{"source":"'Dialog'","ast":{"kind":"literal","value":"Dialog"},"dependencies":[]}},{"kind":"event","name":"open","type":"object({ open: boolean, reason: action | programmatic, trigger: keyboard | pointer | programmatic })","bubbles":true,"composed":true,"cancelable":false},{"kind":"event","name":"close","type":"object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })","bubbles":true,"composed":true,"cancelable":false}],"root":{"kind":"native","element":"dialog","choices":["dialog"]}},source:{file:import.meta.url},css:""};
7
7
 
8
8
  export function createUiDialog(options = {}) {
9
9
  const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
package/vue/UiDialog.d.ts CHANGED
@@ -3,6 +3,7 @@ type __VLS_Props = {
3
3
  closedby?: 'any' | 'closerequest' | 'none';
4
4
  for?: string;
5
5
  label?: string;
6
+ modal?: boolean;
6
7
  modeless?: boolean;
7
8
  open?: boolean;
8
9
  size?: 'sm' | 'md' | 'lg' | 'fullscreen';
@@ -42,7 +43,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
42
43
  for: string;
43
44
  open: boolean;
44
45
  alert: boolean;
45
- closedby: "any" | "closerequest" | "none";
46
+ modal: boolean;
46
47
  modeless: boolean;
47
48
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
48
49
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
package/vue/UiDialog.vue CHANGED
@@ -12,14 +12,15 @@ const props = withDefaults(
12
12
  closedby?: 'any' | 'closerequest' | 'none'
13
13
  for?: string
14
14
  label?: string
15
+ modal?: boolean
15
16
  modeless?: boolean
16
17
  open?: boolean
17
18
  size?: 'sm' | 'md' | 'lg' | 'fullscreen'
18
19
  }>(),
19
20
  {
20
21
  alert: false,
21
- closedby: 'closerequest',
22
22
  for: '',
23
+ modal: false,
23
24
  modeless: false,
24
25
  open: false,
25
26
  size: 'md',
@@ -31,8 +31,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
31
31
  }>, {
32
32
  label: string;
33
33
  open: boolean;
34
- dismissible: boolean;
35
34
  modal: boolean;
35
+ dismissible: boolean;
36
36
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
37
37
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
38
38
  declare const _default: typeof __VLS_export;
@@ -449,21 +449,21 @@ useComponentHost(controllerModule.default, {
449
449
  );
450
450
  }
451
451
 
452
- /* A hovered row reads its whole name: the label slides far enough to show the end, waits
453
- there, and comes back. Only when it actually overflows — the controller measures by how
452
+ /* A hovered row reads its whole name: the label slides far enough to show the end, rests
453
+ there, and starts again. Only when it actually overflows — the controller measures by how
454
454
  much — after the controls have taken their place over its end — and hands over the distance
455
455
  and a duration from it, so every name moves at the same speed. */
456
456
  .row[data-ui-marquee] > .label > .label-text {
457
- /* Once, and it stays at the end while the pointer is there: a name that keeps sliding back
458
- and forth under the pointer is harder to read than one that arrives and holds. */
457
+ /* Once per pass: the controller restarts it after a rest at the end, so the name holds still
458
+ long enough to read rather than sliding back and forth. */
459
459
  animation: ui-tree-item-marquee var(--_marquee-duration) linear 0.5s 1 normal forwards;
460
460
  will-change: transform;
461
461
  }
462
462
 
463
463
  /* This comes after the hover fade, which it replaces at the same specificity. While the name
464
464
  slides, the label reaches back under the icon (the controller measures how far) with its text
465
- where it was, and fades out across that stretch, gone by the icon's middle: the name slips
466
- under the icon rather than stopping at a hard edge beside it. */
465
+ where it was, and fades out across the gap before the icon, fully gone where the icon begins
466
+ to cover it: the name slips under the icon rather than stopping at a hard edge beside it. */
467
467
  .row[data-ui-marquee] > .label {
468
468
  margin-inline-start: calc(-1 * var(--_marquee-lead, 0px));
469
469
  padding-inline-start: calc(
@@ -471,7 +471,7 @@ useComponentHost(controllerModule.default, {
471
471
  );
472
472
  mask-image: linear-gradient(
473
473
  to right,
474
- transparent calc(var(--_marquee-lead, 0px) / 2),
474
+ transparent var(--_marquee-icon-width, 0px),
475
475
  #000 calc(
476
476
  var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2))
477
477
  ),
@@ -483,7 +483,7 @@ useComponentHost(controllerModule.default, {
483
483
  .row[data-ui-marquee] > .label:dir(rtl) {
484
484
  mask-image: linear-gradient(
485
485
  to left,
486
- transparent calc(var(--_marquee-lead, 0px) / 2),
486
+ transparent var(--_marquee-icon-width, 0px),
487
487
  #000 calc(
488
488
  var(--_marquee-lead, 0px) + var(--_ui-tree-item-label-padding-inline, var(--ui-space-2))
489
489
  ),
@@ -25,9 +25,13 @@ var UiDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
25
25
  type: Boolean,
26
26
  default: false
27
27
  },
28
- closedby: { default: "closerequest" },
28
+ closedby: {},
29
29
  for: { default: "" },
30
30
  label: {},
31
+ modal: {
32
+ type: Boolean,
33
+ default: false
34
+ },
31
35
  modeless: {
32
36
  type: Boolean,
33
37
  default: false
@@ -92,6 +96,6 @@ var UiDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
92
96
  ], 16, _hoisted_1);
93
97
  };
94
98
  }
95
- }), [["__scopeId", "data-v-8d67e1e0"]]);
99
+ }), [["__scopeId", "data-v-ef5a672e"]]);
96
100
  //#endregion
97
101
  export { UiDialog_default as t };
@@ -252,6 +252,6 @@ var UiTreeItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
252
252
  ], 16, _hoisted_1);
253
253
  };
254
254
  }
255
- }), [["__scopeId", "data-v-ad0fbbba"]]);
255
+ }), [["__scopeId", "data-v-12522ec8"]]);
256
256
  //#endregion
257
257
  export { UiTreeItem_default as t };