@community-release/nx-ui 0.0.41 → 0.0.43

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/module.d.mts CHANGED
@@ -75,7 +75,10 @@ var defaultStyle = {
75
75
  "bs-3": "0 0.4px 0.6px rgba(13,72,177, 0.019), 0 1px 1.6px rgba(13,72,177, 0.027), 0 2.1px 3.2px rgba(13,72,177, 0.033), 4.4px 6.6px rgba(13,72,177, 0.041), 0 12px 18px rgba(13,72,177, 0.06)",
76
76
  // Animation
77
77
  "ani-time": "0.3s",
78
- "ani-ease": "ease"
78
+ "ani-ease": "ease",
79
+ // A11y
80
+ "outline": "2px solid var(--ui-color-primary)",
81
+ "outline-offset": "2px"
79
82
  };
80
83
 
81
84
  var generateStyle = (options) => {
package/dist/module.d.ts CHANGED
@@ -75,7 +75,10 @@ var defaultStyle = {
75
75
  "bs-3": "0 0.4px 0.6px rgba(13,72,177, 0.019), 0 1px 1.6px rgba(13,72,177, 0.027), 0 2.1px 3.2px rgba(13,72,177, 0.033), 4.4px 6.6px rgba(13,72,177, 0.041), 0 12px 18px rgba(13,72,177, 0.06)",
76
76
  // Animation
77
77
  "ani-time": "0.3s",
78
- "ani-ease": "ease"
78
+ "ani-ease": "ease",
79
+ // A11y
80
+ "outline": "2px solid var(--ui-color-primary)",
81
+ "outline-offset": "2px"
79
82
  };
80
83
 
81
84
  var generateStyle = (options) => {
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "ui",
3
3
  "configKey": "ui",
4
- "version": "0.0.41"
4
+ "version": "0.0.43"
5
5
  }
package/dist/module.mjs CHANGED
@@ -75,7 +75,10 @@ const defaultStyle = {
75
75
  "bs-3": "0 0.4px 0.6px rgba(13,72,177, 0.019), 0 1px 1.6px rgba(13,72,177, 0.027), 0 2.1px 3.2px rgba(13,72,177, 0.033), 4.4px 6.6px rgba(13,72,177, 0.041), 0 12px 18px rgba(13,72,177, 0.06)",
76
76
  // Animation
77
77
  "ani-time": "0.3s",
78
- "ani-ease": "ease"
78
+ "ani-ease": "ease",
79
+ // A11y
80
+ "outline": "2px solid var(--ui-color-primary)",
81
+ "outline-offset": "2px"
79
82
  };
80
83
 
81
84
  const generateStyle = (options) => {
@@ -79,7 +79,7 @@ export default {
79
79
  },
80
80
  computed: {
81
81
  computedType() {
82
- return this.type !== '' ? this.type : (this.href !== '' ? 'a' : 'span');
82
+ return this.type !== '' ? this.type : (this.href !== '' ? 'a' : 'button');
83
83
  },
84
84
  classes() {
85
85
  let ar = [];
@@ -108,7 +108,7 @@ export default {
108
108
 
109
109
  return {
110
110
  background,
111
- color
111
+ color,
112
112
  };
113
113
  },
114
114
  buttonBgStyle() {
@@ -348,12 +348,21 @@ export default {
348
348
 
349
349
  @media (hover: hover) {
350
350
  .component-ui-button {
351
+ // Ally
352
+ @com-outline: var(--ui-outline);
353
+ @com-outline-offset: var(--ui-outline-offset);
354
+
351
355
  &:hover {
352
356
  text-decoration: none;
353
357
  color: var(--button-hover-color) !important;
354
358
 
355
359
  .button-bg { opacity: 1; }
356
360
  }
361
+
362
+ &:focus {
363
+ outline: @com-outline;
364
+ outline-offset: @com-outline-offset;
365
+ }
357
366
  }
358
367
  }
359
368
  </style>
@@ -1,4 +1,4 @@
1
- declare const _default: import("vue").DefineComponent<{
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  color: {
3
3
  type: StringConstructor;
4
4
  default: any;
@@ -35,7 +35,7 @@ declare const _default: import("vue").DefineComponent<{
35
35
  type: (BooleanConstructor | NumberConstructor)[];
36
36
  default: boolean;
37
37
  };
38
- }, any, {
38
+ }>, {}, {
39
39
  impulse: boolean;
40
40
  }, {
41
41
  computedType(): any;
@@ -87,15 +87,67 @@ declare const _default: import("vue").DefineComponent<{
87
87
  type: (BooleanConstructor | NumberConstructor)[];
88
88
  default: boolean;
89
89
  };
90
- }>>, {
90
+ }>> & Readonly<{}>, {
91
91
  type: string;
92
- loading: boolean;
93
92
  color: string;
94
93
  size: string;
95
94
  variant: string;
96
95
  shape: string;
97
96
  href: string;
98
97
  block: boolean;
98
+ loading: boolean;
99
99
  disabled: number | boolean;
100
- }, {}>;
100
+ }, {}, {
101
+ UiImpulseIndicator: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
102
+ impulse: {
103
+ type: (ObjectConstructor | BooleanConstructor)[];
104
+ default: boolean;
105
+ };
106
+ }>, {}, {
107
+ impulseArray: never[];
108
+ }, {}, {
109
+ addImpulse(options: any): void;
110
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
111
+ impulse: {
112
+ type: (ObjectConstructor | BooleanConstructor)[];
113
+ default: boolean;
114
+ };
115
+ }>> & Readonly<{}>, {
116
+ impulse: boolean | Record<string, any>;
117
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
118
+ UiLoading: {
119
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
120
+ active: boolean;
121
+ $props: {
122
+ readonly active?: boolean | undefined;
123
+ };
124
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {
125
+ progress: (typeof __VLS_nativeElements)["circle"];
126
+ }, HTMLElement, import("vue").ComponentProvideOptions, {
127
+ P: {};
128
+ B: {};
129
+ D: {};
130
+ C: {};
131
+ M: {};
132
+ Defaults: {};
133
+ }, Readonly<{}> & Readonly<{}>, {
134
+ active: boolean;
135
+ $props: {
136
+ readonly active?: boolean | undefined;
137
+ };
138
+ }, {}, {}, {}, {}>;
139
+ __isFragment?: never;
140
+ __isTeleport?: never;
141
+ __isSuspense?: never;
142
+ } & import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
143
+ active: boolean;
144
+ $props: {
145
+ readonly active?: boolean | undefined;
146
+ };
147
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
148
+ $slots: {
149
+ default?: ((props: {}) => any) | undefined;
150
+ };
151
+ });
152
+ }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
101
153
  export default _default;
@@ -8,10 +8,12 @@
8
8
  :checked="isChecked"
9
9
  :disabled="disabled"
10
10
  @change="updateValue($event.target.checked)"
11
+ @blur="focus = false"
12
+ @focus="focus = true"
11
13
  autocomplete="off"
12
14
  />
13
15
 
14
- <i></i>
16
+ <i :aria-label="ariaLabel"></i>
15
17
 
16
18
  <span>
17
19
  <slot></slot>
@@ -22,7 +24,10 @@
22
24
 
23
25
  <script setup>
24
26
  // Imports
25
- import { computed } from 'vue';
27
+ import { ref, computed, useSlots } from 'vue';
28
+
29
+ // Misc
30
+ const slots = useSlots();
26
31
 
27
32
  //
28
33
  const props = defineProps({
@@ -53,12 +58,18 @@
53
58
 
54
59
  const emit = defineEmits(['change', 'onchange', 'update:modelValue']);
55
60
 
61
+ const focus = ref(false);
62
+ const ariaLabel = computed(() => {
63
+ return (slots.default ? slots.default()[0]?.children || '' : '').trim();
64
+ });
65
+
56
66
  const classes = computed(() => {
57
67
  const ar = [];
58
68
 
59
69
  if (props.haveError) ar.push('tag-error');
60
70
  if (props.disabled) ar.push('tag-disabled');
61
71
  if (props.required) ar.push('tag-required');
72
+ if (focus.value) ar.push('tag-focus');
62
73
 
63
74
  return ar;
64
75
  });
@@ -215,4 +226,17 @@
215
226
  > label { color: @com-color-error-text; }
216
227
  }
217
228
  }
229
+
230
+ @media (hover: hover) {
231
+ .component-ui-checkbox.tag-focus {
232
+ // Ally
233
+ @com-outline: var(--ui-outline);
234
+ @com-outline-offset: var(--ui-outline-offset);
235
+
236
+ i {
237
+ outline: @com-outline;
238
+ outline-offset: @com-outline-offset;
239
+ }
240
+ }
241
+ }
218
242
  </style>
@@ -1,4 +1,4 @@
1
- declare const _default: import("vue").DefineComponent<{
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  textAlign: {
3
3
  type: StringConstructor;
4
4
  default: string;
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
19
19
  type: (StringConstructor | BooleanConstructor)[];
20
20
  default: boolean;
21
21
  };
22
- }, any, {
22
+ }>, {}, {
23
23
  timeout: null;
24
24
  windowWidth: number;
25
25
  }, {
@@ -57,11 +57,11 @@ declare const _default: import("vue").DefineComponent<{
57
57
  type: (StringConstructor | BooleanConstructor)[];
58
58
  default: boolean;
59
59
  };
60
- }>>, {
60
+ }>> & Readonly<{}>, {
61
61
  textAlign: string;
62
62
  gap: string | Record<string, any>;
63
63
  gridTemplateColumns: string | Record<string, any>;
64
64
  gapTop: string | boolean;
65
65
  gapBottom: string | boolean;
66
- }, {}>;
66
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
67
67
  export default _default;
@@ -1,9 +1,9 @@
1
- declare const _default: import("vue").DefineComponent<{
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
2
  impulse: {
3
3
  type: (ObjectConstructor | BooleanConstructor)[];
4
4
  default: boolean;
5
5
  };
6
- }, any, {
6
+ }>, {}, {
7
7
  impulseArray: never[];
8
8
  }, {}, {
9
9
  addImpulse(options: any): void;
@@ -12,7 +12,7 @@ declare const _default: import("vue").DefineComponent<{
12
12
  type: (ObjectConstructor | BooleanConstructor)[];
13
13
  default: boolean;
14
14
  };
15
- }>>, {
15
+ }>> & Readonly<{}>, {
16
16
  impulse: boolean | Record<string, any>;
17
- }, {}>;
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
18
18
  export default _default;
@@ -144,6 +144,9 @@
144
144
  @com-text-small: var(--ui-text-small);
145
145
  @com-text-mini: var(--ui-text-mini);
146
146
 
147
+ // Ally
148
+ @com-outline: var(--ui-outline);
149
+
147
150
  .component-ui-input {
148
151
  overflow: hidden;
149
152
  position: relative;
@@ -224,8 +227,8 @@
224
227
 
225
228
  // Focus
226
229
  &.tag-focus {
227
- border-color: @com-color-primary;
228
- outline: 1px solid @com-color-primary;
230
+ border-color: transparent;
231
+ outline: @com-outline;
229
232
  }
230
233
 
231
234
  // Disabled
@@ -104,8 +104,6 @@
104
104
  store.setCoord(nearest.coord, 1500);
105
105
  store.setZoom(nearest?.zoom ? nearest.zoom : 14, 1500);
106
106
  } catch (err) {
107
- console.log('handleClick err', err);
108
-
109
107
  emit('error', 'error-geo-not-enabled-on-device');
110
108
  }
111
109
 
@@ -8,11 +8,13 @@
8
8
  :value="value"
9
9
  :name="name"
10
10
  :disabled="disabled"
11
+ @blur="focus = false"
12
+ @focus="focus = true"
11
13
  autocomplete="off"
12
14
  @change="handleUpdate($event.target.value)"
13
15
  />
14
16
 
15
- <i></i>
17
+ <i :aria-label="ariaLabel"></i>
16
18
 
17
19
  <span>
18
20
  <slot></slot>
@@ -22,50 +24,63 @@
22
24
  </template>
23
25
 
24
26
  <script setup>
25
- import { computed } from 'vue';
26
-
27
- const props = defineProps({
28
- name: {
29
- required: false,
30
- default: 'rd'
31
- },
32
- value: {
33
- required: true,
34
- },
35
- modelValue: { default: '' },
36
- haveError: {
37
- type: Boolean,
38
- default: false
39
- },
40
- required: {
41
- type: Boolean,
42
- default: false
43
- },
44
- disabled: {
45
- type: Boolean,
46
- default: false
47
- }
48
- })
27
+ // Imports
28
+ import { ref, computed, useSlots } from 'vue';
29
+
30
+ // Misc
31
+ const slots = useSlots();
32
+
33
+ // Data
34
+ const props = defineProps({
35
+ name: {
36
+ required: false,
37
+ default: 'rd'
38
+ },
39
+ value: {
40
+ required: true,
41
+ },
42
+ modelValue: { default: '' },
43
+ haveError: {
44
+ type: Boolean,
45
+ default: false
46
+ },
47
+ required: {
48
+ type: Boolean,
49
+ default: false
50
+ },
51
+ disabled: {
52
+ type: Boolean,
53
+ default: false
54
+ }
55
+ })
56
+
57
+ const emit = defineEmits(['update:modelValue']);
49
58
 
50
- const emit = defineEmits(['update:modelValue'])
59
+
60
+ const focus = ref(false);
61
+ const ariaLabel = computed(() => {
62
+ return (slots.default ? slots.default()[0]?.children || '' : '').trim();
63
+ });
51
64
 
52
- const classes = computed(() => {
53
- const ar = [];
65
+ const classes = computed(() => {
66
+ const ar = [];
54
67
 
55
- if (props.value !== '') ar.push('tag-not-empty');
56
- if (props.haveError) ar.push('tag-error');
57
- if (props.text) ar.push('tag-text');
58
- if (props.disabled) ar.push('tag-disabled');
59
- if (props.required) ar.push('tag-required');
68
+ if (props.value !== '') ar.push('tag-not-empty');
69
+ if (props.haveError) ar.push('tag-error');
70
+ if (props.text) ar.push('tag-text');
71
+ if (props.disabled) ar.push('tag-disabled');
72
+ if (props.required) ar.push('tag-required');
73
+ if (focus.value) ar.push('tag-focus');
60
74
 
61
- return ar;
62
- });
75
+ return ar;
76
+ });
63
77
 
64
- const isChecked = computed(() => props.modelValue == props.value);
78
+ const isChecked = computed(() => props.modelValue == props.value);
65
79
 
66
- function handleUpdate(v) {
67
- emit('update:modelValue', v);
68
- }
80
+ // Methods
81
+ function handleUpdate(v) {
82
+ emit('update:modelValue', v);
83
+ }
69
84
  </script>
70
85
 
71
86
  <style lang="less">
@@ -212,4 +227,17 @@ function handleUpdate(v) {
212
227
  > label { color: @com-color-error; }
213
228
  }
214
229
  }
230
+
231
+ @media (hover: hover) {
232
+ .component-ui-radio.tag-focus {
233
+ // Ally
234
+ @com-outline: var(--ui-outline);
235
+ @com-outline-offset: var(--ui-outline-offset);
236
+
237
+ i {
238
+ outline: @com-outline;
239
+ outline-offset: @com-outline-offset;
240
+ }
241
+ }
242
+ }
215
243
  </style>
@@ -168,6 +168,9 @@ onMounted(() => {
168
168
  @com-border-radius-default: var(--ui-border-radius-default);
169
169
  @com-bs-1: var(--ui-bs-1);
170
170
 
171
+ // Ally
172
+ @com-outline: var(--ui-outline);
173
+
171
174
  .component-ui-select {
172
175
  position: relative;
173
176
  text-align: left;
@@ -276,7 +279,8 @@ onMounted(() => {
276
279
 
277
280
  &.tag-focus {
278
281
  .value {
279
- border-color: @com-color-primary;
282
+ border-color: transparent;
283
+ outline: @com-outline;
280
284
  }
281
285
  }
282
286
  }
@@ -113,6 +113,9 @@
113
113
  @com-text-default: var(--ui-text-default);
114
114
  @com-text-small: var(--ui-text-small);
115
115
 
116
+ // Ally
117
+ @com-outline: var(--ui-outline);
118
+
116
119
  .component-ui-textarea {
117
120
  position: relative;
118
121
  cursor: text;
@@ -158,9 +161,11 @@
158
161
  }
159
162
 
160
163
  // Focus
161
- &.tag-focus textarea {
162
- border-color: @com-color-primary;
163
- outline: 1px solid @com-color-primary;
164
+ &.tag-focus {
165
+ textarea {
166
+ border-color: transparent;
167
+ outline: @com-outline;
168
+ }
164
169
  }
165
170
  }
166
171
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@community-release/nx-ui",
3
- "version": "0.0.41",
3
+ "version": "0.0.43",
4
4
  "description": "nx-ui - Nuxt UI library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,20 +19,20 @@
19
19
  "dist"
20
20
  ],
21
21
  "dependencies": {
22
- "@nuxt/kit": "^3.12.1",
23
- "@nuxtjs/color-mode": "^3.4.2",
24
- "@nuxtjs/i18n": "^8.3.1",
25
- "@pinia/nuxt": "^0.5.1",
22
+ "@nuxt/kit": "^3.15.4",
23
+ "@nuxtjs/color-mode": "^3.5.2",
24
+ "@nuxtjs/i18n": "^9.2.0",
25
+ "@pinia/nuxt": "^0.10.1",
26
+ "pinia": "^3.0.1",
26
27
  "ol": "^9.1.0",
27
- "pinia": "^2.1.7",
28
- "vue": "^3.4.31"
28
+ "vue": "^3.5.13"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@nuxt/devtools": "latest",
32
32
  "@nuxt/module-builder": "^0.5.5",
33
33
  "@nuxt/schema": "^3.11.2",
34
34
  "@nuxt/test-utils": "^3.12.0",
35
- "@vitejs/plugin-vue": "^5.0.5",
35
+ "@vitejs/plugin-vue": "^5.2.1",
36
36
  "@vue/test-utils": "^2.4.6",
37
37
  "@vuedoc/md": "^4.0.0-beta8",
38
38
  "@vuedoc/parser": "^4.0.0-beta14",
@@ -41,7 +41,7 @@
41
41
  "happy-dom": "^14.12.0",
42
42
  "less": "^3.9.0",
43
43
  "less-loader": "^5.0.0",
44
- "nuxt": "^3.12.1",
44
+ "nuxt": "^3.15.4",
45
45
  "vite-raw-plugin": "^1.0.2",
46
46
  "vitest": "^1.6.0",
47
47
  "vue-docgen-cli": "^4.79.0",