@threadlabs/looma 0.37.5 → 0.38.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 (56) hide show
  1. package/components/ui-button/ui-button.html +20 -5
  2. package/components/ui-combobox/ui-combobox.html +24 -3
  3. package/components/ui-combobox/ui-combobox.js +18 -3
  4. package/components/ui-icon-button/ui-icon-button.html +17 -8
  5. package/components/ui-menu-item/ui-menu-item.html +6 -1
  6. package/components/ui-select/ui-select.html +12 -0
  7. package/components/ui-skeleton/ui-skeleton.html +91 -0
  8. package/dist/index.js +1 -1
  9. package/docs/README.md +23 -10
  10. package/docs/catalog.json +246 -31
  11. package/docs/customizer-render.mjs +36 -20
  12. package/docs/customizer.js +76 -25
  13. package/docs/documentation.css +2 -0
  14. package/docs/palette.mjs +3 -3
  15. package/docs/site.mjs +1 -1
  16. package/docs/theme-session.mjs +1 -0
  17. package/docs/theme.mjs +11 -10
  18. package/package.json +2 -2
  19. package/styles/ui-button.css +19 -9
  20. package/styles/ui-combobox.css +40 -2
  21. package/styles/ui-icon-button.css +12 -2
  22. package/styles/ui-menu-item.css +6 -1
  23. package/styles/ui-select.css +9 -0
  24. package/styles/ui-skeleton.css +91 -0
  25. package/theme-system.css +7 -2
  26. package/vanilla/UiButton.js +1 -1
  27. package/vanilla/UiCombobox.d.ts +1 -0
  28. package/vanilla/UiCombobox.js +38 -37
  29. package/vanilla/UiIconButton.d.ts +1 -1
  30. package/vanilla/UiIconButton.js +1 -1
  31. package/vanilla/UiSelect.d.ts +1 -0
  32. package/vanilla/UiSelect.js +7 -7
  33. package/vanilla/UiSkeleton.d.ts +26 -0
  34. package/vanilla/UiSkeleton.js +42 -0
  35. package/vanilla/index.js +1 -0
  36. package/vue/UiButton.vue +30 -12
  37. package/vue/UiCombobox.d.ts +6 -0
  38. package/vue/UiCombobox.vue +70 -6
  39. package/vue/UiIconButton.d.ts +2 -2
  40. package/vue/UiIconButton.vue +23 -18
  41. package/vue/UiMenuItem.vue +6 -1
  42. package/vue/UiSelect.d.ts +6 -0
  43. package/vue/UiSelect.vue +30 -1
  44. package/vue/UiSkeleton.d.ts +37 -0
  45. package/vue/UiSkeleton.js +2 -0
  46. package/vue/UiSkeleton.vue +235 -0
  47. package/vue/chunks/UiButton.js +4 -4
  48. package/vue/chunks/UiCombobox.js +72 -46
  49. package/vue/chunks/UiIconButton.js +6 -7
  50. package/vue/chunks/UiMenuItem.js +1 -1
  51. package/vue/chunks/UiSelect.js +27 -2
  52. package/vue/chunks/UiSkeleton.js +151 -0
  53. package/vue/components.css +197 -25
  54. package/vue/editor/index.js +2 -3
  55. package/vue/index.d.ts +1 -0
  56. package/vue/index.js +2 -1
@@ -182,9 +182,8 @@ var UiIconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
182
182
  },
183
183
  required: false,
184
184
  target: { attribute: "tone" },
185
- description: "Colour for every variant. auto preserves the existing variant-specific default. When omitted, ghost and outline keep their neutral appearance and solid\n keeps its accent fill. Set accent for a coloured action or neutral for a quiet one. danger, success, warning and info share Button's intent colors. Native\n aria-pressed=\"true\" keeps an outline toggle visibly pressed; the consumer owns that state.",
185
+ description: "Colour for every variant. The default neutral shares the quiet control family with fields and text buttons. Choose accent explicitly for a coloured action,\n or primary for solid accent. danger, success, warning and info share Button's intent colors. Native aria-pressed=\"true\" keeps an outline toggle visibly\n pressed; the consumer owns that state.",
186
186
  values: [
187
- "auto",
188
187
  "accent",
189
188
  "neutral",
190
189
  "danger",
@@ -192,7 +191,7 @@ var UiIconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
192
191
  "warning",
193
192
  "info"
194
193
  ],
195
- default: "auto"
194
+ default: "neutral"
196
195
  },
197
196
  variant: {
198
197
  type: {
@@ -201,7 +200,7 @@ var UiIconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
201
200
  },
202
201
  required: false,
203
202
  target: { attribute: "variant" },
204
- description: "Emphasis. ghost shows only the icon until it is hovered, for toolbars and dense rows; outline adds a border on the default surface; solid fills with the\n accent colour, for the one primary action in a group.",
203
+ description: "Emphasis. ghost shows only the icon until it is hovered, for toolbars and dense rows; outline adds a border on the default surface; solid fills with its\n chosen tone.",
205
204
  values: [
206
205
  "ghost",
207
206
  "outline",
@@ -223,7 +222,7 @@ var UiIconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
223
222
  revealed: false,
224
223
  round: false,
225
224
  size: "md",
226
- tone: "auto",
225
+ tone: "neutral",
227
226
  variant: "ghost"
228
227
  }, {
229
228
  anticipatory: false,
@@ -236,7 +235,7 @@ var UiIconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
236
235
  revealed: false,
237
236
  round: false,
238
237
  size: "md",
239
- tone: "auto",
238
+ tone: "neutral",
240
239
  variant: "ghost"
241
240
  }, (name, value, source, values) => {
242
241
  switch (name) {
@@ -463,6 +462,6 @@ var UiIconButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
463
462
  }]]);
464
463
  };
465
464
  }
466
- }), [["__scopeId", "data-v-4981b6fa"]]);
465
+ }), [["__scopeId", "data-v-d48cf3c9"]]);
467
466
  //#endregion
468
467
  export { UiIconButton_default as t };
@@ -369,6 +369,6 @@ var UiMenuItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
369
369
  }]]);
370
370
  };
371
371
  }
372
- }), [["__scopeId", "data-v-5302324a"]]);
372
+ }), [["__scopeId", "data-v-467d3ba0"]]);
373
373
  //#endregion
374
374
  export { UiMenuItem_default as t };
@@ -9,6 +9,7 @@ var _hoisted_1 = [
9
9
  "aria-invalid",
10
10
  "data-ui-select-prop-disabled",
11
11
  "data-ui-select-prop-invalid",
12
+ "data-ui-select-prop-muted",
12
13
  "data-ui-select-prop-required",
13
14
  "data-ui-select-prop-size",
14
15
  "data-ui-select-prop-value",
@@ -22,6 +23,7 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
22
23
  props: {
23
24
  disabled: { type: null },
24
25
  invalid: { type: null },
26
+ muted: { type: null },
25
27
  required: { type: null },
26
28
  size: { type: null },
27
29
  value: { type: null },
@@ -51,6 +53,16 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
51
53
  description: "Exposes invalid state to assistive technology and styling.",
52
54
  default: false
53
55
  },
56
+ muted: {
57
+ type: {
58
+ kind: "terminal",
59
+ name: "boolean"
60
+ },
61
+ required: false,
62
+ target: { attribute: "muted" },
63
+ description: "Shows the selected value with supporting-text emphasis, for an inherited or default choice. The select remains interactive and its options retain normal\n emphasis.",
64
+ default: false
65
+ },
54
66
  required: {
55
67
  type: {
56
68
  kind: "terminal",
@@ -90,6 +102,7 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
90
102
  const acceptedProps = {
91
103
  disabled: false,
92
104
  invalid: false,
105
+ muted: false,
93
106
  required: false,
94
107
  size: "md",
95
108
  value: null
@@ -97,6 +110,7 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
97
110
  const inputTracking = vuePropInputs(acceptedProps, {
98
111
  disabled: false,
99
112
  invalid: false,
113
+ muted: false,
100
114
  required: false,
101
115
  size: "md"
102
116
  }, (name, value, source, values) => {
@@ -109,6 +123,10 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
109
123
  kind: "terminal",
110
124
  name: "boolean"
111
125
  }, true, true);
126
+ case "muted": return checkPropInput(value, {
127
+ kind: "terminal",
128
+ name: "boolean"
129
+ }, true, true);
112
130
  case "required": return checkPropInput(value, {
113
131
  kind: "terminal",
114
132
  name: "boolean"
@@ -132,6 +150,7 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
132
150
  return {
133
151
  disabled: propInputs.value("disabled", props["disabled"], props[BINDING_INPUTS_PROP]),
134
152
  invalid: propInputs.value("invalid", props["invalid"], props[BINDING_INPUTS_PROP]),
153
+ muted: propInputs.value("muted", props["muted"], props[BINDING_INPUTS_PROP]),
135
154
  required: propInputs.value("required", props["required"], props[BINDING_INPUTS_PROP]),
136
155
  size: propInputs.value("size", props["size"], props[BINDING_INPUTS_PROP]),
137
156
  value: propInputs.value("value", props["value"], props[BINDING_INPUTS_PROP]),
@@ -155,7 +174,11 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
155
174
  const root = ref(null);
156
175
  checkHydratedRoot("select", "ui-select");
157
176
  /** The values the styles' :host() and :state() rules test. */
158
- const hostState = computed(() => [checkedProps.value.size && "size", checkedProps.value.size != null && `size=${encodeURIComponent(checkedProps.value.size)}`].filter(Boolean).join(" "));
177
+ const hostState = computed(() => [
178
+ checkedProps.value.muted && "muted",
179
+ checkedProps.value.size && "size",
180
+ checkedProps.value.size != null && `size=${encodeURIComponent(checkedProps.value.size)}`
181
+ ].filter(Boolean).join(" "));
159
182
  const dispatch = createDispatch(root);
160
183
  useComponentHost(() => import("@threadlabs/looma/components/ui-select/ui-select.js"), {
161
184
  root,
@@ -176,6 +199,7 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
176
199
  propNames: [
177
200
  "disabled",
178
201
  "invalid",
202
+ "muted",
179
203
  "required",
180
204
  "size",
181
205
  "value"
@@ -194,6 +218,7 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
194
218
  "aria-invalid": checkedProps.value.invalid ?? void 0,
195
219
  "data-ui-select-prop-disabled": unref(reflectedProp)("disabled", "disabled", checkedProps.value.disabled, void 0, false),
196
220
  "data-ui-select-prop-invalid": unref(reflectedProp)("invalid", "invalid", checkedProps.value.invalid, void 0, false),
221
+ "data-ui-select-prop-muted": unref(reflectedProp)("muted", "muted", checkedProps.value.muted, void 0, false),
197
222
  "data-ui-select-prop-required": unref(reflectedProp)("required", "required", checkedProps.value.required, void 0, false),
198
223
  "data-ui-select-prop-size": unref(reflectedProp)("size", "size", checkedProps.value.size, void 0, false),
199
224
  "data-ui-select-prop-value": unref(reflectedProp)("value", "value", checkedProps.value.value, void 0, false),
@@ -221,6 +246,6 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
221
246
  }]]);
222
247
  };
223
248
  }
224
- }), [["__scopeId", "data-v-b5f523b2"]]);
249
+ }), [["__scopeId", "data-v-988e4463"]]);
225
250
  //#endregion
226
251
  export { UiSelect_default as t };
@@ -0,0 +1,151 @@
1
+ import { C as useReflectedProp, _ as nativeAttrs, a as checkHydratedRoot, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
2
+ import { h as vuePropInputs, i as checkPropInput, m as vPropValidity, t as BINDING_INPUTS_PROP } from "./props.js";
3
+ import { computed, createElementBlock, defineComponent, mergeProps, openBlock, unref, watchSyncEffect, withDirectives } from "vue";
4
+ //#region .build/vue/UiSkeleton.vue?vue&type=script&setup=true&lang.ts
5
+ var _hoisted_1 = [
6
+ "data-ui-skeleton-prop-animated",
7
+ "data-ui-skeleton-prop-height",
8
+ "data-ui-skeleton-prop-shape",
9
+ "data-ui-skeleton-prop-width",
10
+ "data-ui-skeleton-state"
11
+ ];
12
+ //#endregion
13
+ //#region .build/vue/UiSkeleton.vue
14
+ var UiSkeleton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
15
+ inheritAttrs: false,
16
+ __name: "UiSkeleton",
17
+ props: {
18
+ animated: { type: null },
19
+ height: { type: null },
20
+ shape: { type: null },
21
+ width: { type: null },
22
+ [BINDING_INPUTS_PROP]: { type: null }
23
+ },
24
+ setup(__props) {
25
+ const propValidityContract = { props: {
26
+ animated: {
27
+ type: {
28
+ kind: "terminal",
29
+ name: "boolean"
30
+ },
31
+ required: false,
32
+ target: { attribute: "animated" },
33
+ description: "Gently pulses the placeholder. Off by default, and always still when the reader requests reduced motion.",
34
+ default: false
35
+ },
36
+ height: {
37
+ type: {
38
+ kind: "terminal",
39
+ name: "string"
40
+ },
41
+ required: false,
42
+ target: { attribute: "height" },
43
+ description: "Block size as a CSS length. Empty reserves one line for text, a square for circles, or 8rem for rectangles. Set only width to keep a circle square.",
44
+ default: ""
45
+ },
46
+ shape: {
47
+ type: {
48
+ kind: "terminal",
49
+ name: "keyword"
50
+ },
51
+ required: false,
52
+ target: { attribute: "shape" },
53
+ description: "The content's silhouette. text reserves one inherited line box with a shorter bar inside it; circle matches a medium Avatar; rectangle reserves a media\n area.",
54
+ values: [
55
+ "text",
56
+ "circle",
57
+ "rectangle"
58
+ ],
59
+ default: "text"
60
+ },
61
+ width: {
62
+ type: {
63
+ kind: "terminal",
64
+ name: "string"
65
+ },
66
+ required: false,
67
+ target: { attribute: "width" },
68
+ description: "Inline size as a CSS length or percentage, constrained to the container. Empty fills the available width for text and rectangles, or matches a medium\n Avatar's outer size for circles.",
69
+ default: ""
70
+ }
71
+ } };
72
+ const props = __props;
73
+ const inputTracking = vuePropInputs({
74
+ animated: false,
75
+ height: "",
76
+ shape: "text",
77
+ width: ""
78
+ }, {
79
+ animated: false,
80
+ height: "",
81
+ shape: "text",
82
+ width: ""
83
+ }, (name, value, source, values) => {
84
+ switch (name) {
85
+ case "animated": return checkPropInput(value, {
86
+ kind: "terminal",
87
+ name: "boolean"
88
+ }, true, true);
89
+ case "height": return checkPropInput(value, {
90
+ kind: "terminal",
91
+ name: "string"
92
+ }, true, true);
93
+ case "shape": return checkPropInput(value, {
94
+ kind: "terminal",
95
+ name: "keyword"
96
+ }, true, true);
97
+ case "width": return checkPropInput(value, {
98
+ kind: "terminal",
99
+ name: "string"
100
+ }, true, true);
101
+ default: return { ok: false };
102
+ }
103
+ }, () => {
104
+ checkedProps.value;
105
+ });
106
+ const propInputs = inputTracking.inputs;
107
+ const checkedProps = computed(() => {
108
+ inputTracking.version.value;
109
+ return {
110
+ animated: propInputs.value("animated", props["animated"], props[BINDING_INPUTS_PROP]),
111
+ height: propInputs.value("height", props["height"], props[BINDING_INPUTS_PROP]),
112
+ shape: propInputs.value("shape", props["shape"], props[BINDING_INPUTS_PROP]),
113
+ width: propInputs.value("width", props["width"], props[BINDING_INPUTS_PROP])
114
+ };
115
+ });
116
+ checkedProps.value;
117
+ watchSyncEffect(() => {
118
+ checkedProps.value;
119
+ });
120
+ const reflectedProp = useReflectedProp();
121
+ checkHydratedRoot("span", "ui-skeleton");
122
+ /** The values the styles' :host() and :state() rules test. */
123
+ const hostState = computed(() => [
124
+ checkedProps.value.shape && "shape",
125
+ checkedProps.value.shape != null && `shape=${encodeURIComponent(checkedProps.value.shape)}`,
126
+ checkedProps.value.animated && "animated"
127
+ ].filter(Boolean).join(" "));
128
+ return (_ctx, _cache) => {
129
+ return withDirectives((openBlock(), createElementBlock("span", mergeProps({
130
+ class: "ui-skeleton",
131
+ "aria-hidden": "true"
132
+ }, unref(nativeAttrs)(_ctx.$attrs), {
133
+ "data-hn": "",
134
+ style: {
135
+ "--ui-skeleton-width": checkedProps.value.width ?? void 0,
136
+ "--ui-skeleton-height": checkedProps.value.height ?? void 0
137
+ },
138
+ "data-ui-skeleton-prop-animated": unref(reflectedProp)("animated", "animated", checkedProps.value.animated, void 0, false),
139
+ "data-ui-skeleton-prop-height": unref(reflectedProp)("height", "height", checkedProps.value.height, void 0, false),
140
+ "data-ui-skeleton-prop-shape": unref(reflectedProp)("shape", "shape", checkedProps.value.shape, void 0, false),
141
+ "data-ui-skeleton-prop-width": unref(reflectedProp)("width", "width", checkedProps.value.width, void 0, false),
142
+ "data-ui-skeleton-state": hostState.value || void 0
143
+ }), null, 16, _hoisted_1)), [[unref(vPropValidity), {
144
+ contract: propValidityContract,
145
+ values: { ...props }
146
+ }]]);
147
+ };
148
+ }
149
+ }), [["__scopeId", "data-v-ee40410c"]]);
150
+ //#endregion
151
+ export { UiSkeleton_default as t };