@colletdev/vue 0.1.8 → 0.1.9

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/dist/text.d.ts CHANGED
@@ -3,7 +3,7 @@ export declare const Text: import("vue").DefineComponent<import("vue").ExtractPr
3
3
  id: {
4
4
  type: StringConstructor;
5
5
  };
6
- role: {
6
+ textRole: {
7
7
  type: PropType<"display" | "h1" | "h2" | "h3" | "label-lg" | "label-md" | "label-sm" | "body-lg" | "body-md" | "body-sm" | "overline" | "caption" | "code">;
8
8
  };
9
9
  align: {
@@ -48,7 +48,7 @@ export declare const Text: import("vue").DefineComponent<import("vue").ExtractPr
48
48
  id: {
49
49
  type: StringConstructor;
50
50
  };
51
- role: {
51
+ textRole: {
52
52
  type: PropType<"display" | "h1" | "h2" | "h3" | "label-lg" | "label-md" | "label-sm" | "body-lg" | "body-md" | "body-sm" | "overline" | "caption" | "code">;
53
53
  };
54
54
  align: {
package/dist/text.js CHANGED
@@ -5,7 +5,7 @@ export const Text = defineComponent({
5
5
  name: 'Text',
6
6
  props: {
7
7
  id: { type: String },
8
- role: { type: String },
8
+ textRole: { type: String },
9
9
  align: { type: String },
10
10
  color: { type: String },
11
11
  muted: { type: Boolean },
@@ -26,14 +26,6 @@ export const Text = defineComponent({
26
26
  onMounted(() => {
27
27
  if (!el.value)
28
28
  return;
29
- watch(() => props.role, (val) => {
30
- if (!el.value)
31
- return;
32
- if (val != null)
33
- el.value.setAttribute('role', String(val));
34
- else
35
- el.value.removeAttribute('role');
36
- }, { immediate: true });
37
29
  watch(() => props.align, (val) => {
38
30
  if (!el.value)
39
31
  return;
@@ -60,6 +52,8 @@ export const Text = defineComponent({
60
52
  const attrs = {};
61
53
  if (props.id != null)
62
54
  attrs['id'] = typeof props.id === 'object' ? JSON.stringify(props.id) : String(props.id);
55
+ if (props.textRole != null)
56
+ attrs['text-role'] = typeof props.textRole === 'object' ? JSON.stringify(props.textRole) : String(props.textRole);
63
57
  if (props.muted)
64
58
  attrs['muted'] = '';
65
59
  if (props.strong)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colletdev/vue",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Vue 3 wrappers for Collet Rust/WASM UI components",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",