@threadlabs/looma 0.10.11 → 0.11.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.
Files changed (128) hide show
  1. package/components/shared/editor.js +2 -26
  2. package/components/shared/icons.js +53 -0
  3. package/components/ui-avatar-group/ui-avatar-group.html +6 -6
  4. package/components/ui-avatar-group/ui-avatar-group.js +1 -1
  5. package/components/ui-breadcrumb-item/ui-breadcrumb-item.html +60 -0
  6. package/components/ui-breadcrumbs/ui-breadcrumbs.html +31 -0
  7. package/components/ui-card/ui-card.html +55 -0
  8. package/components/ui-combobox/ui-combobox.js +2 -2
  9. package/components/ui-context-menu/ui-context-menu.js +4 -4
  10. package/components/ui-cover/ui-cover.html +36 -0
  11. package/components/ui-description-item/ui-description-item.html +46 -0
  12. package/components/ui-description-list/ui-description-list.html +37 -0
  13. package/components/ui-icon/ui-icon.js +1 -1
  14. package/components/ui-list/ui-list.html +33 -0
  15. package/components/ui-list-item/ui-list-item.html +146 -0
  16. package/components/ui-menu/ui-menu.js +3 -3
  17. package/components/ui-page-header/ui-page-header.html +97 -0
  18. package/components/ui-radio/ui-radio.js +1 -1
  19. package/components/ui-radio-group/ui-radio-group.js +1 -1
  20. package/components/ui-section/ui-section.html +108 -0
  21. package/components/ui-spinner/ui-spinner.html +48 -0
  22. package/components/ui-status-message/ui-status-message.html +84 -0
  23. package/components/ui-text/ui-text.html +96 -0
  24. package/components/ui-tree/ui-tree.js +2 -2
  25. package/components/ui-tree-item/ui-tree-item.js +3 -3
  26. package/dist/index.js +1 -1
  27. package/editor/icons.d.ts +5 -0
  28. package/editor/index.js +6 -1
  29. package/package.json +1 -1
  30. package/styles/ui-avatar-group.css +6 -6
  31. package/styles/ui-breadcrumb-item.css +57 -0
  32. package/styles/ui-breadcrumbs.css +32 -0
  33. package/styles/ui-card.css +51 -0
  34. package/styles/ui-cover.css +35 -0
  35. package/styles/ui-description-item.css +43 -0
  36. package/styles/ui-description-list.css +38 -0
  37. package/styles/ui-list-item.css +146 -0
  38. package/styles/ui-list.css +33 -0
  39. package/styles/ui-page-header.css +89 -0
  40. package/styles/ui-section.css +94 -0
  41. package/styles/ui-spinner.css +42 -0
  42. package/styles/ui-status-message.css +72 -0
  43. package/styles/ui-text.css +85 -0
  44. package/vanilla/UiBreadcrumbItem.d.ts +14 -0
  45. package/vanilla/UiBreadcrumbItem.js +38 -0
  46. package/vanilla/UiBreadcrumbs.d.ts +14 -0
  47. package/vanilla/UiBreadcrumbs.js +39 -0
  48. package/vanilla/UiCard.d.ts +17 -0
  49. package/vanilla/UiCard.js +32 -0
  50. package/vanilla/UiCover.d.ts +14 -0
  51. package/vanilla/UiCover.js +28 -0
  52. package/vanilla/UiDescriptionItem.d.ts +14 -0
  53. package/vanilla/UiDescriptionItem.js +39 -0
  54. package/vanilla/UiDescriptionList.d.ts +14 -0
  55. package/vanilla/UiDescriptionList.js +28 -0
  56. package/vanilla/UiList.d.ts +14 -0
  57. package/vanilla/UiList.js +29 -0
  58. package/vanilla/UiListItem.d.ts +15 -0
  59. package/vanilla/UiListItem.js +77 -0
  60. package/vanilla/UiPageHeader.d.ts +14 -0
  61. package/vanilla/UiPageHeader.js +78 -0
  62. package/vanilla/UiSection.d.ts +16 -0
  63. package/vanilla/UiSection.js +64 -0
  64. package/vanilla/UiSpinner.d.ts +15 -0
  65. package/vanilla/UiSpinner.js +23 -0
  66. package/vanilla/UiStatusMessage.d.ts +16 -0
  67. package/vanilla/UiStatusMessage.js +53 -0
  68. package/vanilla/UiText.d.ts +20 -0
  69. package/vanilla/UiText.js +38 -0
  70. package/vanilla/index.js +13 -0
  71. package/vue/UiAvatarGroup.vue +6 -6
  72. package/vue/UiBreadcrumbItem.d.ts +18 -0
  73. package/vue/UiBreadcrumbItem.js +2 -0
  74. package/vue/UiBreadcrumbItem.vue +101 -0
  75. package/vue/UiBreadcrumbs.d.ts +18 -0
  76. package/vue/UiBreadcrumbs.js +2 -0
  77. package/vue/UiBreadcrumbs.vue +45 -0
  78. package/vue/UiCard.d.ts +24 -0
  79. package/vue/UiCard.js +2 -0
  80. package/vue/UiCard.vue +82 -0
  81. package/vue/UiCover.d.ts +18 -0
  82. package/vue/UiCover.js +2 -0
  83. package/vue/UiCover.vue +57 -0
  84. package/vue/UiDescriptionItem.d.ts +18 -0
  85. package/vue/UiDescriptionItem.js +2 -0
  86. package/vue/UiDescriptionItem.vue +58 -0
  87. package/vue/UiDescriptionList.d.ts +18 -0
  88. package/vue/UiDescriptionList.js +2 -0
  89. package/vue/UiDescriptionList.vue +62 -0
  90. package/vue/UiIconButton.d.ts +1 -1
  91. package/vue/UiList.d.ts +18 -0
  92. package/vue/UiList.js +2 -0
  93. package/vue/UiList.vue +60 -0
  94. package/vue/UiListItem.d.ts +26 -0
  95. package/vue/UiListItem.js +2 -0
  96. package/vue/UiListItem.vue +171 -0
  97. package/vue/UiPageHeader.d.ts +26 -0
  98. package/vue/UiPageHeader.js +2 -0
  99. package/vue/UiPageHeader.vue +118 -0
  100. package/vue/UiSection.d.ts +26 -0
  101. package/vue/UiSection.js +2 -0
  102. package/vue/UiSection.vue +128 -0
  103. package/vue/UiSpinner.d.ts +10 -0
  104. package/vue/UiSpinner.js +2 -0
  105. package/vue/UiSpinner.vue +87 -0
  106. package/vue/UiStatusMessage.d.ts +24 -0
  107. package/vue/UiStatusMessage.js +2 -0
  108. package/vue/UiStatusMessage.vue +121 -0
  109. package/vue/UiText.d.ts +30 -0
  110. package/vue/UiText.js +2 -0
  111. package/vue/UiText.vue +125 -0
  112. package/vue/chunks/UiAvatarGroup.js +1 -1
  113. package/vue/chunks/UiBreadcrumbItem.js +50 -0
  114. package/vue/chunks/UiBreadcrumbs.js +19 -0
  115. package/vue/chunks/UiCard.js +31 -0
  116. package/vue/chunks/UiCover.js +21 -0
  117. package/vue/chunks/UiDescriptionItem.js +16 -0
  118. package/vue/chunks/UiDescriptionList.js +21 -0
  119. package/vue/chunks/UiList.js +24 -0
  120. package/vue/chunks/UiListItem.js +39 -0
  121. package/vue/chunks/UiPageHeader.js +35 -0
  122. package/vue/chunks/UiSection.js +34 -0
  123. package/vue/chunks/UiSpinner.js +64 -0
  124. package/vue/chunks/UiStatusMessage.js +54 -0
  125. package/vue/chunks/UiText.js +40 -0
  126. package/vue/components.css +661 -29
  127. package/vue/index.d.ts +13 -0
  128. package/vue/index.js +15 -2
@@ -0,0 +1,171 @@
1
+ <!-- Generated by HTML Next 1.0.0-alpha.5 for Vue 3.5. Do not edit. -->
2
+ <script setup lang="ts">
3
+ import { computed } from 'vue'
4
+
5
+ defineOptions({ inheritAttrs: false })
6
+
7
+ const props = withDefaults(
8
+ defineProps<{
9
+ current?: boolean
10
+ variant?: 'row' | 'card'
11
+ }>(),
12
+ {
13
+ current: false,
14
+ variant: 'row',
15
+ },
16
+ )
17
+
18
+ /** The values the styles' :host-state() rules test. */
19
+ const hostState = computed(() =>
20
+ [
21
+ props.variant && `variant variant=${props.variant}`,
22
+ props.current && 'current',
23
+ ].filter(Boolean).join(' ')
24
+ )
25
+ </script>
26
+
27
+ <template>
28
+ <li
29
+ data-component="ui-list-item"
30
+ v-bind="$attrs"
31
+ :aria-current="current"
32
+ :data-ui-list-item-state="hostState || undefined"
33
+ >
34
+ <span class="leading"><slot name="leading" /></span>
35
+ <span class="content"><span class="title"><slot /></span>
36
+ <span class="description"><slot name="description" /></span></span>
37
+ <span class="trailing"><slot name="trailing" /></span>
38
+ </li>
39
+ </template>
40
+
41
+ <style scoped>
42
+ /* One entry in a list: something to recognise (leading, usually an icon), its name (the default
43
+ slot), one line about it (description), and what it offers (trailing, such as a button or a
44
+ badge). The title and description are one line each and end in an ellipsis, so every item in a
45
+ list has the same height.
46
+
47
+ A link in the title is the whole item: its hit area stretches over the item, so the icon and the
48
+ padding follow it too, and the item takes the link's focus ring. The link stays a real link, so
49
+ a router, a modified click, and "open in new tab" all work. Trailing controls sit above it and
50
+ stay their own. */
51
+ [data-component~="ui-list-item"] {
52
+ position: relative;
53
+ box-sizing: border-box;
54
+ display: flex;
55
+ align-items: center;
56
+ gap: var(--ui-list-item-gap, var(--ui-space-3));
57
+ min-inline-size: 0;
58
+ min-block-size: var(--ui-control-size, 2.5rem);
59
+ padding-block: var(--ui-list-item-padding-block, var(--ui-space-2));
60
+ padding-inline: var(--ui-list-item-padding-inline, var(--ui-space-3));
61
+ border-radius: var(--ui-radius-md);
62
+ color: var(--ui-text-primary);
63
+ transition:
64
+ background-color var(--ui-motion-fast) var(--ui-motion-ease),
65
+ border-color var(--ui-motion-fast) var(--ui-motion-ease);
66
+ }
67
+
68
+ [data-component~="ui-list-item"][data-ui-list-item-state~="variant=card"] {
69
+ padding-block: var(--ui-list-item-padding-block, var(--ui-space-3));
70
+ padding-inline: var(--ui-list-item-padding-inline, var(--ui-space-4));
71
+ border: 1px solid var(--ui-border-default);
72
+ border-radius: var(--ui-radius-lg);
73
+ background: var(--ui-surface-raised);
74
+ }
75
+
76
+ [data-component~="ui-list-item"]:has(.title a[href]:hover) {
77
+ background: var(--ui-surface-hover);
78
+ }
79
+
80
+ [data-component~="ui-list-item"][data-ui-list-item-state~="variant=card"]:has(.title
81
+ a[href]:hover) {
82
+ border-color: var(--ui-border-strong);
83
+ }
84
+
85
+ [data-component~="ui-list-item"][data-ui-list-item-state~="current"] {
86
+ background: var(--ui-surface-hover);
87
+ }
88
+
89
+ [data-component~="ui-list-item"]:has(.title a[href]:focus-visible) {
90
+ box-shadow: 0 0 0 2px var(--ui-focus-ring);
91
+ }
92
+
93
+ .leading,
94
+ .trailing {
95
+ display: inline-flex;
96
+ flex: none;
97
+ align-items: center;
98
+ gap: var(--ui-space-2);
99
+ }
100
+
101
+ .leading {
102
+ color: var(--ui-text-muted);
103
+ font-size: var(--ui-list-item-icon-size, var(--ui-font-size-lg));
104
+ }
105
+
106
+ /* Trailing controls take their own clicks, above the title link's stretched hit area. */
107
+ .trailing {
108
+ position: relative;
109
+ z-index: 1;
110
+ color: var(--ui-text-muted);
111
+ font-size: var(--ui-font-size-sm);
112
+ }
113
+
114
+ .content {
115
+ display: flex;
116
+ flex: 1;
117
+ flex-direction: column;
118
+ gap: var(--ui-space-0-5, 2px);
119
+ min-inline-size: 0;
120
+ }
121
+
122
+ .title,
123
+ .description {
124
+ display: block;
125
+ min-inline-size: 0;
126
+ overflow: hidden;
127
+ text-overflow: ellipsis;
128
+ white-space: nowrap;
129
+ }
130
+
131
+ .title {
132
+ font-size: var(--ui-font-size-md);
133
+ font-weight: var(--ui-font-medium);
134
+ line-height: var(--ui-line-height-tight);
135
+ }
136
+
137
+ .description {
138
+ color: var(--ui-text-muted);
139
+ font-size: var(--ui-font-size-sm);
140
+ line-height: var(--ui-line-height-tight);
141
+ }
142
+
143
+ .title > :slotted(a) {
144
+ color: inherit;
145
+ text-decoration: none;
146
+ }
147
+
148
+ .title > :slotted(a:focus-visible) {
149
+ outline: none;
150
+ box-shadow: none;
151
+ }
152
+
153
+ .title > :slotted(a[href])::after {
154
+ position: absolute;
155
+ inset: 0;
156
+ border-radius: inherit;
157
+ content: "";
158
+ }
159
+
160
+ /* An unused region takes no space. */
161
+ .leading:empty,
162
+ .description:empty,
163
+ .trailing:empty {
164
+ display: none;
165
+ }
166
+
167
+ /* A component that sets its display still honours the hidden attribute on its root. */
168
+ [data-component~="ui-list-item"][hidden] {
169
+ display: none;
170
+ }
171
+ </style>
@@ -0,0 +1,26 @@
1
+ type __VLS_Props = {
2
+ align?: 'start' | 'center';
3
+ };
4
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {};
5
+ type __VLS_Slots = {} & {
6
+ leading?: (props: typeof __VLS_1) => any;
7
+ } & {
8
+ eyebrow?: (props: typeof __VLS_3) => any;
9
+ } & {
10
+ default?: (props: typeof __VLS_5) => any;
11
+ } & {
12
+ description?: (props: typeof __VLS_7) => any;
13
+ } & {
14
+ actions?: (props: typeof __VLS_9) => any;
15
+ };
16
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
17
+ align: "start" | "center";
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,2 @@
1
+ import { t as UiPageHeader_default } from "./chunks/UiPageHeader.js";
2
+ export { UiPageHeader_default as default };
@@ -0,0 +1,118 @@
1
+ <!-- Generated by HTML Next 1.0.0-alpha.5 for Vue 3.5. Do not edit. -->
2
+ <script setup lang="ts">
3
+ import { computed } from 'vue'
4
+
5
+ defineOptions({ inheritAttrs: false })
6
+
7
+ const props = withDefaults(
8
+ defineProps<{
9
+ align?: 'start' | 'center'
10
+ }>(),
11
+ {
12
+ align: 'start',
13
+ },
14
+ )
15
+
16
+ /** The values the styles' :host-state() rules test. */
17
+ const hostState = computed(() =>
18
+ [
19
+ props.align && `align align=${props.align}`,
20
+ ].filter(Boolean).join(' ')
21
+ )
22
+ </script>
23
+
24
+ <template>
25
+ <header
26
+ data-component="ui-page-header"
27
+ v-bind="$attrs"
28
+ :data-ui-page-header-state="hostState || undefined"
29
+ >
30
+ <span class="leading"><slot name="leading" /></span>
31
+ <span class="copy"><span class="eyebrow"><slot name="eyebrow" /></span>
32
+ <h1 class="title"><slot /></h1>
33
+ <span class="description"><slot name="description" /></span></span>
34
+ <span class="actions"><slot name="actions" /></span>
35
+ </header>
36
+ </template>
37
+
38
+ <style scoped>
39
+ /* The top of a view: its title (the page's one h1), with an optional icon or mark before it, a
40
+ short eyebrow above it, a line or two of description under it, and the view's own actions at
41
+ the end. Every view titles itself the same way, at the same size. */
42
+ [data-component~="ui-page-header"] {
43
+ display: flex;
44
+ flex-wrap: wrap;
45
+ align-items: center;
46
+ gap: var(--ui-space-3) var(--ui-space-4);
47
+ min-inline-size: 0;
48
+ }
49
+
50
+ .leading {
51
+ display: inline-flex;
52
+ flex: none;
53
+ align-self: center;
54
+ color: var(--ui-text-muted);
55
+ font-size: var(--ui-font-size-2xl);
56
+ }
57
+
58
+ .copy {
59
+ display: flex;
60
+ flex: 1 1 16rem;
61
+ flex-direction: column;
62
+ gap: var(--ui-space-1);
63
+ min-inline-size: 0;
64
+ }
65
+
66
+ .eyebrow {
67
+ color: var(--ui-text-muted);
68
+ font-size: var(--ui-font-size-xs);
69
+ font-weight: var(--ui-font-semibold);
70
+ letter-spacing: 0.06em;
71
+ text-transform: uppercase;
72
+ }
73
+
74
+ .title {
75
+ margin: 0;
76
+ color: var(--ui-text-primary);
77
+ font-size: var(--ui-font-size-2xl);
78
+ font-weight: var(--ui-font-bold, 700);
79
+ line-height: var(--ui-line-height-tight);
80
+ overflow-wrap: anywhere;
81
+ }
82
+
83
+ .description {
84
+ color: var(--ui-text-secondary);
85
+ font-size: var(--ui-font-size-md);
86
+ line-height: var(--ui-line-height);
87
+ }
88
+
89
+ .actions {
90
+ display: inline-flex;
91
+ flex: none;
92
+ flex-wrap: wrap;
93
+ align-items: center;
94
+ gap: var(--ui-space-2);
95
+ }
96
+
97
+ [data-component~="ui-page-header"][data-ui-page-header-state~="align=center"] {
98
+ flex-direction: column;
99
+ text-align: center;
100
+ }
101
+
102
+ [data-component~="ui-page-header"][data-ui-page-header-state~="align=center"] .copy {
103
+ align-items: center;
104
+ flex-basis: auto;
105
+ }
106
+
107
+ .leading:empty,
108
+ .eyebrow:empty,
109
+ .description:empty,
110
+ .actions:empty {
111
+ display: none;
112
+ }
113
+
114
+ /* A component that sets its display still honours the hidden attribute on its root. */
115
+ [data-component~="ui-page-header"][hidden] {
116
+ display: none;
117
+ }
118
+ </style>
@@ -0,0 +1,26 @@
1
+ type __VLS_Props = {
2
+ heading?: string;
3
+ tone?: 'neutral' | 'danger';
4
+ variant?: 'plain' | 'card' | 'divided';
5
+ };
6
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
7
+ type __VLS_Slots = {} & {
8
+ description?: (props: typeof __VLS_1) => any;
9
+ } & {
10
+ actions?: (props: typeof __VLS_3) => any;
11
+ } & {
12
+ default?: (props: typeof __VLS_5) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
15
+ tone: "neutral" | "danger";
16
+ variant: "plain" | "card" | "divided";
17
+ heading: string;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,2 @@
1
+ import { t as UiSection_default } from "./chunks/UiSection.js";
2
+ export { UiSection_default as default };
@@ -0,0 +1,128 @@
1
+ <!-- Generated by HTML Next 1.0.0-alpha.5 for Vue 3.5. Do not edit. -->
2
+ <script setup lang="ts">
3
+ import { computed } from 'vue'
4
+
5
+ defineOptions({ inheritAttrs: false })
6
+
7
+ const props = withDefaults(
8
+ defineProps<{
9
+ heading?: string
10
+ tone?: 'neutral' | 'danger'
11
+ variant?: 'plain' | 'card' | 'divided'
12
+ }>(),
13
+ {
14
+ heading: '',
15
+ tone: 'neutral',
16
+ variant: 'plain',
17
+ },
18
+ )
19
+
20
+ /** The values the styles' :host-state() rules test. */
21
+ const hostState = computed(() =>
22
+ [
23
+ props.variant && `variant variant=${props.variant}`,
24
+ props.tone && `tone tone=${props.tone}`,
25
+ ].filter(Boolean).join(' ')
26
+ )
27
+ </script>
28
+
29
+ <template>
30
+ <section
31
+ data-component="ui-section"
32
+ v-bind="$attrs"
33
+ :data-ui-section-state="hostState || undefined"
34
+ >
35
+ <span class="head"><span class="copy"><h2 class="heading" :hidden="!heading">{{ heading }}</h2>
36
+ <span class="description"><slot name="description" /></span></span>
37
+ <span class="actions"><slot name="actions" /></span></span>
38
+ <span class="body"><slot /></span>
39
+ </section>
40
+ </template>
41
+
42
+ <style scoped>
43
+ /* A part of a view: a heading, an optional line under it, actions for the whole section at its
44
+ end, and the content. Sections space themselves out through the Stack around them. */
45
+ [data-component~="ui-section"] {
46
+ display: flex;
47
+ flex-direction: column;
48
+ gap: var(--ui-space-4);
49
+ min-inline-size: 0;
50
+ }
51
+
52
+ [data-component~="ui-section"][data-ui-section-state~="variant=card"] {
53
+ padding: var(--ui-space-5);
54
+ border: 1px solid var(--ui-border-default);
55
+ border-radius: var(--ui-radius-lg);
56
+ background: var(--ui-surface-raised);
57
+ }
58
+
59
+ [data-component~="ui-section"][data-ui-section-state~="variant=divided"] {
60
+ padding-block-start: var(--ui-space-6);
61
+ border-block-start: 1px solid var(--ui-border-default);
62
+ }
63
+
64
+ [data-component~="ui-section"][data-ui-section-state~="variant=card"][data-ui-section-state~="tone=danger"] {
65
+ border-color: var(--ui-danger);
66
+ }
67
+
68
+ .head {
69
+ display: flex;
70
+ flex-wrap: wrap;
71
+ align-items: flex-start;
72
+ justify-content: space-between;
73
+ gap: var(--ui-space-2) var(--ui-space-4);
74
+ }
75
+
76
+ .copy {
77
+ display: flex;
78
+ flex: 1 1 16rem;
79
+ flex-direction: column;
80
+ gap: var(--ui-space-1);
81
+ min-inline-size: 0;
82
+ }
83
+
84
+ .heading {
85
+ margin: 0;
86
+ color: var(--ui-text-primary);
87
+ font-size: var(--ui-font-size-lg);
88
+ font-weight: var(--ui-font-semibold);
89
+ line-height: var(--ui-line-height-tight);
90
+ }
91
+
92
+ [data-component~="ui-section"][data-ui-section-state~="tone=danger"] .heading {
93
+ color: var(--ui-danger);
94
+ }
95
+
96
+ .description {
97
+ color: var(--ui-text-secondary);
98
+ font-size: var(--ui-font-size-sm);
99
+ line-height: var(--ui-line-height);
100
+ }
101
+
102
+ .actions {
103
+ display: inline-flex;
104
+ flex-wrap: wrap;
105
+ gap: var(--ui-space-2);
106
+ }
107
+
108
+ .body {
109
+ display: flex;
110
+ flex-direction: column;
111
+ gap: var(--ui-space-4);
112
+ min-inline-size: 0;
113
+ }
114
+
115
+ .description:empty,
116
+ .actions:empty {
117
+ display: none;
118
+ }
119
+
120
+ .head:has(.heading[hidden]):has(.description:empty):has(.actions:empty) {
121
+ display: none;
122
+ }
123
+
124
+ /* A component that sets its display still honours the hidden attribute on its root. */
125
+ [data-component~="ui-section"][hidden] {
126
+ display: none;
127
+ }
128
+ </style>
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ label?: string;
3
+ size?: 'sm' | 'md';
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ label: string;
7
+ size: "sm" | "md";
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { t as UiSpinner_default } from "./chunks/UiSpinner.js";
2
+ export { UiSpinner_default as default };
@@ -0,0 +1,87 @@
1
+ <!-- Generated by HTML Next 1.0.0-alpha.5 for Vue 3.5. Do not edit. -->
2
+ <script setup lang="ts">
3
+ import { computed } from 'vue'
4
+ import UiIcon from './UiIcon.vue'
5
+
6
+ defineOptions({ inheritAttrs: false })
7
+
8
+ const props = withDefaults(
9
+ defineProps<{
10
+ label?: string
11
+ size?: 'sm' | 'md'
12
+ }>(),
13
+ {
14
+ label: '',
15
+ size: 'md',
16
+ },
17
+ )
18
+
19
+ /** The values the styles' :host-state() rules test. */
20
+ const hostState = computed(() =>
21
+ [
22
+ props.size && `size size=${props.size}`,
23
+ ].filter(Boolean).join(' ')
24
+ )
25
+
26
+ function text(value: unknown): string {
27
+ if (Array.isArray(value)) return value.map(text).join(' ')
28
+ return value === null || value === undefined || typeof value === 'object' ? '' : String(value)
29
+ }
30
+
31
+ function attribute(value: unknown): any {
32
+ if (
33
+ value === null || value === undefined || value === false
34
+ || (typeof value === 'object' && !Array.isArray(value))
35
+ ) return undefined
36
+ return value === true ? '' : text(value)
37
+ }
38
+ </script>
39
+
40
+ <template>
41
+ <span
42
+ data-component="ui-spinner"
43
+ v-bind="$attrs"
44
+ :role="attribute(({ true: 'status', false: null })[`${label !== ''}`])"
45
+ :aria-label="typeof (({ true: label, false: null })[`${label !== ''}`]) === 'boolean'
46
+ ? String(({ true: label, false: null })[`${label !== ''}`])
47
+ : attribute(({ true: label, false: null })[`${label !== ''}`])"
48
+ :aria-hidden="typeof (({ true: null, false: 'true' })[`${label !== ''}`]) === 'boolean'
49
+ ? String(({ true: null, false: 'true' })[`${label !== ''}`])
50
+ : attribute(({ true: null, false: 'true' })[`${label !== ''}`])"
51
+ :data-ui-spinner-state="hostState || undefined"
52
+ ><UiIcon name="loader" /></span>
53
+ </template>
54
+
55
+ <style scoped>
56
+ /* Something is on its way. It turns in the current text colour; with reduced motion it holds still,
57
+ and the label (or the text beside it) still says what is happening. */
58
+ [data-component~="ui-spinner"] {
59
+ display: inline-flex;
60
+ flex: none;
61
+ color: currentColor;
62
+ font-size: var(--ui-font-size-lg);
63
+ line-height: 1;
64
+ animation: ui-spinner-turn 0.8s linear infinite;
65
+ }
66
+
67
+ [data-component~="ui-spinner"][data-ui-spinner-state~="size=sm"] {
68
+ font-size: var(--ui-font-size-md);
69
+ }
70
+
71
+ @keyframes ui-spinner-turn {
72
+ to {
73
+ transform: rotate(1turn);
74
+ }
75
+ }
76
+
77
+ @media (prefers-reduced-motion: reduce) {
78
+ [data-component~="ui-spinner"] {
79
+ animation: none;
80
+ }
81
+ }
82
+
83
+ /* A component that sets its display still honours the hidden attribute on its root. */
84
+ [data-component~="ui-spinner"][hidden] {
85
+ display: none;
86
+ }
87
+ </style>
@@ -0,0 +1,24 @@
1
+ type __VLS_Props = {
2
+ heading?: string;
3
+ kind?: 'empty' | 'loading' | 'error';
4
+ layout?: 'inline' | 'panel' | 'fill';
5
+ };
6
+ declare var __VLS_6: {}, __VLS_8: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_6) => any;
9
+ } & {
10
+ action?: (props: typeof __VLS_8) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
+ kind: "empty" | "loading" | "error";
14
+ layout: "inline" | "panel" | "fill";
15
+ heading: string;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,2 @@
1
+ import { t as UiStatusMessage_default } from "./chunks/UiStatusMessage.js";
2
+ export { UiStatusMessage_default as default };