@threadlabs/looma 0.11.0 → 0.11.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.
Files changed (49) hide show
  1. package/components/ui-action-bar/ui-action-bar.html +72 -0
  2. package/dist/index.js +1 -1
  3. package/package.json +1 -1
  4. package/styles/ui-action-bar.css +77 -0
  5. package/vanilla/UiActionBar.d.ts +13 -0
  6. package/vanilla/UiActionBar.js +59 -0
  7. package/vanilla/index.js +1 -0
  8. package/vue/UiActionBar.d.ts +19 -0
  9. package/vue/UiActionBar.js +2 -0
  10. package/vue/UiActionBar.vue +77 -0
  11. package/vue/UiCombobox.d.ts +1 -1
  12. package/vue/UiRadioGroup.d.ts +1 -1
  13. package/vue/chunks/UiActionBar.js +24 -0
  14. package/vue/chunks/UiAffordanceScope.js +1 -1
  15. package/vue/chunks/UiAvatar.js +1 -1
  16. package/vue/chunks/UiAvatarGroup.js +1 -1
  17. package/vue/chunks/UiCheckbox.js +1 -1
  18. package/vue/chunks/UiCombobox.js +1 -1
  19. package/vue/chunks/UiContextMenu.js +1 -1
  20. package/vue/chunks/UiDialog.js +1 -1
  21. package/vue/chunks/UiDisclosure.js +1 -1
  22. package/vue/chunks/UiEditable.js +1 -1
  23. package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
  24. package/vue/chunks/UiEditorMentionMenu.js +1 -1
  25. package/vue/chunks/UiEditorSlashMenu.js +1 -1
  26. package/vue/chunks/UiEditorTableContextMenu.js +1 -1
  27. package/vue/chunks/UiEditorTableOverlay.js +1 -1
  28. package/vue/chunks/UiEditorTableToolbar.js +1 -1
  29. package/vue/chunks/UiFormField.js +1 -1
  30. package/vue/chunks/UiIcon.js +1 -1
  31. package/vue/chunks/UiIconButton.js +1 -1
  32. package/vue/chunks/UiInput.js +1 -1
  33. package/vue/chunks/UiMenu.js +1 -1
  34. package/vue/chunks/UiPopover.js +1 -1
  35. package/vue/chunks/UiRadio.js +1 -1
  36. package/vue/chunks/UiRadioGroup.js +1 -1
  37. package/vue/chunks/UiSearchShell.js +1 -1
  38. package/vue/chunks/UiSelect.js +1 -1
  39. package/vue/chunks/UiSidebar.js +1 -1
  40. package/vue/chunks/UiSwitch.js +1 -1
  41. package/vue/chunks/UiTabs.js +1 -1
  42. package/vue/chunks/UiTextarea.js +1 -1
  43. package/vue/chunks/UiToastRegion.js +1 -1
  44. package/vue/chunks/UiTooltip.js +1 -1
  45. package/vue/chunks/UiTree.js +1 -1
  46. package/vue/chunks/UiTreeItem.js +1 -1
  47. package/vue/components.css +56 -0
  48. package/vue/index.d.ts +1 -0
  49. package/vue/index.js +2 -1
@@ -0,0 +1,72 @@
1
+ <template component="ui-action-bar">
2
+ <div>
3
+ <!-- Source order is tertiary, secondary, primary: the order the row reads in, so reading and focus
4
+ order match what a wide bar shows (WCAG 1.3.2, 2.4.3), and they stay the same at every width. -->
5
+ <div class="bar">
6
+ <span class="tertiary"><slot name="tertiary"></slot></span>
7
+ <span class="secondary"><slot name="secondary"></slot><slot></slot></span>
8
+ <span class="primary"><slot name="primary"></slot></span>
9
+ </div>
10
+ </div>
11
+ <style>
12
+ /* The action row of a form or dialog. Tertiary actions (Back, Cancel, Discard) sit at the start
13
+ edge; secondary actions (Save as draft, Preview) sit just before the primary one, which ends the
14
+ row. The bar arranges its actions and leaves their look to them. */
15
+ :host {
16
+ --_gap: var(--ui-space-2);
17
+ display: block;
18
+ /* A size container sizes itself from its container, never its content. */
19
+ container-type: inline-size;
20
+ inline-size: 100%;
21
+ min-inline-size: 0;
22
+ }
23
+
24
+ .bar,
25
+ .tertiary,
26
+ .secondary,
27
+ .primary {
28
+ display: flex;
29
+ flex-wrap: wrap;
30
+ align-items: center;
31
+ gap: var(--ui-action-bar-gap, var(--_gap));
32
+ }
33
+
34
+ /* The tertiary group takes the spare space, pushing the rest to the end edge; without it, the
35
+ rest still ends the row. */
36
+ .bar {
37
+ justify-content: flex-end;
38
+ }
39
+
40
+ .tertiary {
41
+ flex: 1 1 auto;
42
+ }
43
+
44
+ .tertiary:empty,
45
+ .secondary:empty,
46
+ .primary:empty {
47
+ display: none;
48
+ }
49
+
50
+ /* A narrow container stacks the actions full width, primary on top: the row turned on its end,
51
+ read from its end edge. Container queries cannot read custom properties, so the width is fixed. */
52
+ @container (inline-size < 24rem) {
53
+ .bar,
54
+ .tertiary,
55
+ .secondary,
56
+ .primary {
57
+ flex-direction: column-reverse;
58
+ flex-wrap: nowrap;
59
+ align-items: stretch;
60
+ }
61
+
62
+ .tertiary {
63
+ flex: none;
64
+ }
65
+ }
66
+
67
+ /* A component that sets its display still honours the hidden attribute on its root. */
68
+ :host[hidden] {
69
+ display: none;
70
+ }
71
+ </style>
72
+ </template>