@v1nt1248/3nclient-lib 0.2.33 → 0.2.35

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 (53) hide show
  1. package/README.md +5 -0
  2. package/dist/components/ui3n-dialog/types.d.ts +1 -1
  3. package/dist/components/ui3n-editable/types.d.ts +1 -1
  4. package/dist/components/ui3n-editable/ui3n-editable.vue.d.ts +1 -1
  5. package/dist/components/ui3n-editable/useContentEditable.d.ts +1 -1
  6. package/dist/composables/index.d.ts +1 -0
  7. package/dist/composables/useDblClickHandler.d.ts +3 -0
  8. package/dist/directives/index.d.ts +2 -1
  9. package/dist/directives/ui3n-long-press.d.ts +27 -0
  10. package/dist/index.d.ts +3 -2
  11. package/dist/style.css +1 -1
  12. package/dist/types/directives.types.d.ts +7 -0
  13. package/dist/types/index.d.ts +3 -0
  14. package/dist/ui3n-components.d.ts +4 -1
  15. package/dist/ui3n-components.js +4879 -4810
  16. package/dist/ui3n-plugins.d.ts +1 -2
  17. package/dist/ui3n-plugins.js +2 -2
  18. package/dist/ui3n-utils.js +154 -144
  19. package/dist/utils/files/create-video-thumbnail.d.ts +1 -1
  20. package/dist/utils/for-vue/try-on-scope-dispose.d.ts +2 -0
  21. package/dist/utils/for-vue/unref-element.d.ts +2 -0
  22. package/dist/utils/index.d.ts +3 -1
  23. package/package.json +18 -13
  24. package/src/components/ui3n-autocomplete/ui3n-autocomplete.vue +32 -9
  25. package/src/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue +14 -14
  26. package/src/components/ui3n-button/ui3n-button.vue +229 -226
  27. package/src/components/ui3n-checkbox/ui3n-checkbox.vue +30 -7
  28. package/src/components/ui3n-chip/ui3n-chip.vue +113 -109
  29. package/src/components/ui3n-dialog/types.ts +1 -1
  30. package/src/components/ui3n-dialog/ui3n-dialog.vue +7 -8
  31. package/src/components/ui3n-editable/types.ts +1 -1
  32. package/src/components/ui3n-editable/ui3n-editable.vue +34 -12
  33. package/src/components/ui3n-editable/useContentEditable.ts +6 -3
  34. package/src/components/ui3n-icon/ui3n-icon.vue +1 -1
  35. package/src/components/ui3n-input/ui3n-input.vue +272 -273
  36. package/src/components/ui3n-input-file/ui3n-input-file.vue +2 -2
  37. package/src/components/ui3n-list/ui3n-list.vue +70 -60
  38. package/src/components/ui3n-menu/ui3n-menu.vue +1 -1
  39. package/src/components/ui3n-notification/ui3n-notification.vue +4 -1
  40. package/src/components/ui3n-progress/ui3n-progress-circular.vue +168 -147
  41. package/src/components/ui3n-progress/ui3n-progress-linear.vue +77 -73
  42. package/src/components/ui3n-radio-group/ui3n-radio.vue +178 -177
  43. package/src/components/ui3n-step-line-bar/ui3n-step-line-bar.vue +50 -46
  44. package/src/components/ui3n-switch/ui3n-switch.vue +114 -116
  45. package/src/components/ui3n-table/composables/useTable.ts +17 -9
  46. package/src/components/ui3n-table/ui3n-table-sort-icon.vue +9 -6
  47. package/src/components/ui3n-table/ui3n-table.vue +7 -5
  48. package/src/components/ui3n-text/ui3n-text.vue +157 -215
  49. package/src/components/ui3n-tooltip/ui3n-tooltip.vue +4 -5
  50. package/src/components/types/index.ts +0 -15
  51. /package/dist/{components/types/index.d.ts → types/components.types.d.ts} +0 -0
  52. /package/dist/{plugins/types.d.ts → types/plugins.types.d.ts} +0 -0
  53. /package/dist/utils/{for-we3n.d.ts → for-web3n.d.ts} +0 -0
@@ -1,29 +1,29 @@
1
1
  <script lang="ts" setup>
2
- import { computed } from 'vue';
3
- import { toNumber } from 'lodash';
4
- import type { Ui3nProgressLinearProps } from './types';
2
+ import { computed } from 'vue';
3
+ import { toNumber } from 'lodash';
4
+ import type { Ui3nProgressLinearProps } from './types';
5
5
 
6
- const thresholdHeight = 12;
7
- const thresholdValue = 5;
6
+ const thresholdHeight = 12;
7
+ const thresholdValue = 5;
8
8
 
9
- const props = withDefaults(
10
- defineProps<Ui3nProgressLinearProps>(),
11
- {
12
- value: 0,
13
- height: 2,
14
- bgColor: 'var(--color-bg-control-primary-default)',
15
- color: 'var(--color-bg-control-accent-default)',
16
- },
17
- );
9
+ const props = withDefaults(
10
+ defineProps<Ui3nProgressLinearProps>(),
11
+ {
12
+ value: 0,
13
+ height: 2,
14
+ bgColor: 'var(--color-bg-control-primary-default)',
15
+ color: 'var(--color-bg-control-accent-default)',
16
+ },
17
+ );
18
18
 
19
- const isValueShown = computed(() => props.withText && !props.indeterminate);
20
- const innerHeight = computed(() => toNumber(props.height));
21
- const cssHeight = computed(() => `${innerHeight.value}px`);
22
- const innerValue = computed(() => toNumber(props.value));
23
- const displayValue = computed(() => props.indeterminate
24
- ? `20%`
25
- : `${Math.min(innerValue.value, 100)}%`,
26
- );
19
+ const isValueShown = computed(() => props.withText && !props.indeterminate);
20
+ const innerHeight = computed(() => toNumber(props.height));
21
+ const cssHeight = computed(() => `${innerHeight.value}px`);
22
+ const innerValue = computed(() => toNumber(props.value));
23
+ const displayValue = computed(() => props.indeterminate
24
+ ? `20%`
25
+ : `${Math.min(innerValue.value, 100)}%`,
26
+ );
27
27
  </script>
28
28
 
29
29
  <template>
@@ -36,7 +36,10 @@ const displayValue = computed(() => props.indeterminate
36
36
  </div>
37
37
 
38
38
  <div :class="$style.body">
39
- <div :class="$style.value" :style="{ width: displayValue }">
39
+ <div
40
+ :class="$style.value"
41
+ :style="{ width: displayValue }"
42
+ >
40
43
  <div
41
44
  v-if="isValueShown && innerHeight >= thresholdHeight && innerValue >= thresholdValue"
42
45
  :class="$style.text"
@@ -49,63 +52,64 @@ const displayValue = computed(() => props.indeterminate
49
52
  </template>
50
53
 
51
54
  <style lang="scss" module>
52
- .ui3nProgressLinear {
53
- --ui3n-progress-linear-height: v-bind(cssHeight);
54
- --ui3n-progress-linear-bg: v-bind(bgColor);
55
- --ui3n-progress-linear-color: v-bind(color);
55
+ .ui3nProgressLinear {
56
+ --ui3n-progress-linear-height: v-bind(cssHeight);
57
+ --ui3n-progress-linear-bg: v-bind(bgColor);
58
+ --ui3n-progress-linear-color: v-bind(color);
56
59
 
57
- position: relative;
58
- width: 100%;
59
- }
60
-
61
- .body {
62
- position: relative;
63
- width: 100%;
64
- height: var(--ui3n-progress-linear-height);
65
- border-radius: calc(var(--ui3n-progress-linear-height) - 2px);
66
- background-color: var(--ui3n-progress-linear-bg);
67
- overflow-x: hidden;
68
- }
60
+ position: relative;
61
+ width: 100%;
62
+ }
69
63
 
70
- .value {
71
- display: flex;
72
- justify-content: center;
73
- align-items: center;
74
- position: absolute;
75
- left: 0;
76
- height: var(--ui3n-progress-linear-height);
77
- border-radius: calc(var(--ui3n-progress-linear-height) - 2px);
78
- background-color: var(--ui3n-progress-linear-color);
79
- }
64
+ .body {
65
+ position: relative;
66
+ width: 100%;
67
+ height: var(--ui3n-progress-linear-height);
68
+ border-radius: calc(var(--ui3n-progress-linear-height) - 2px);
69
+ background-color: var(--ui3n-progress-linear-bg);
70
+ overflow-x: hidden;
71
+ }
80
72
 
81
- .text {
82
- font-size: calc(var(--ui3n-progress-linear-height) - 2px);
83
- font-weight: 500;
84
- line-height: var(--ui3n-progress-linear-height);
85
- color: var(--ui3n-progress-linear-bg);
86
- }
73
+ .value {
74
+ display: flex;
75
+ justify-content: center;
76
+ align-items: center;
77
+ position: absolute;
78
+ left: 0;
79
+ height: var(--ui3n-progress-linear-height);
80
+ border-radius: calc(var(--ui3n-progress-linear-height) - 2px);
81
+ background-color: var(--ui3n-progress-linear-color);
82
+ }
87
83
 
88
- .above {
89
- position: relative;
90
- width: 100%;
91
- text-align: center;
92
- font-size: var(--font-14);
93
- line-height: var(--font-16);
94
- color: var(--color-bg-control-accent-default);
95
- }
84
+ .text {
85
+ font-size: calc(var(--ui3n-progress-linear-height) - 2px);
86
+ font-weight: 500;
87
+ line-height: var(--ui3n-progress-linear-height);
88
+ color: var(--ui3n-progress-linear-bg);
89
+ }
96
90
 
97
- .indeterminate {
98
- .value {
99
- animation: 1s linear 0s infinite normal move;
91
+ .above {
92
+ position: relative;
93
+ width: 100%;
94
+ text-align: center;
95
+ font-size: var(--font-14);
96
+ line-height: var(--font-16);
97
+ color: var(--color-bg-control-accent-default);
100
98
  }
101
- }
102
99
 
103
- @keyframes move {
104
- from {
105
- left: -22%
100
+ .indeterminate {
101
+ .value {
102
+ animation: 1s linear 0s infinite normal move;
103
+ }
106
104
  }
107
- to {
108
- left: 122%
105
+
106
+ @keyframes move {
107
+ from {
108
+ left: -22%
109
+ }
110
+
111
+ to {
112
+ left: 122%
113
+ }
109
114
  }
110
- }
111
115
  </style>
@@ -1,124 +1,124 @@
1
1
  <script lang="ts" setup>
2
- import { computed, getCurrentInstance, inject, onBeforeMount, onMounted, ref, useSlots, watch } from 'vue';
3
- import type { Ref } from 'vue';
4
- import type { Nullable } from '../types';
5
- import type { Ui3nRadioEmits, Ui3nRadioProps, Ui3nRadioSlots, Ui3nRadioValue } from './types';
6
-
7
- const props = withDefaults(defineProps<Ui3nRadioProps>(), {
8
- modelValue: false,
9
- checkedValue: true,
10
- uncheckedValue: false,
11
- size: '16',
12
- color: 'var(--color-icon-control-accent-default)',
13
- disabled: false,
14
- });
15
- const emits = defineEmits<Ui3nRadioEmits>();
16
- defineSlots<Ui3nRadioSlots>();
17
-
18
- const slots = useSlots();
19
-
20
- const instance = getCurrentInstance();
21
- const isComponentPartOfGroup =
22
- instance?.parent?.type.__name === 'Ui3nRadioGroup' || instance?.parent?.type.__name === 'ui3n-radio-group';
23
- const groupName = isComponentPartOfGroup ? instance?.parent?.props.name : '';
24
-
25
- const radioEl = ref<HTMLDivElement | null>(null);
26
-
27
- const {
28
- groupValue,
29
- updateGroupValue,
30
- }: {
31
- groupValue: Nullable<Ref<Ui3nRadioValue>>;
32
- updateGroupValue: Nullable<(value: Ui3nRadioValue) => void>;
33
- } = groupName
34
- ? inject(`radio-group-${groupName}`)!
35
- : {
36
- groupValue: null,
37
- updateGroupValue: null,
38
- };
39
-
40
- const val = ref<Ui3nRadioValue>(groupName ? groupValue!.value : props.modelValue);
41
-
42
- const isOn = computed(() => val.value === props.checkedValue);
43
-
44
- function change(ev: Event) {
45
- ev.preventDefault();
46
-
47
- if (!groupName) {
48
- val.value = isOn.value ? props.uncheckedValue : props.checkedValue;
49
- emits('change', val.value);
50
- emits('update:modelValue', val.value);
51
- return;
52
- }
2
+ import { computed, getCurrentInstance, inject, onBeforeMount, onMounted, ref, useSlots, watch } from 'vue';
3
+ import type { Ref } from 'vue';
4
+ import type { Nullable } from '../../types';
5
+ import type { Ui3nRadioEmits, Ui3nRadioProps, Ui3nRadioSlots, Ui3nRadioValue } from './types';
6
+
7
+ const props = withDefaults(defineProps<Ui3nRadioProps>(), {
8
+ modelValue: false,
9
+ checkedValue: true,
10
+ uncheckedValue: false,
11
+ size: '16',
12
+ color: 'var(--color-icon-control-accent-default)',
13
+ disabled: false,
14
+ });
15
+ const emits = defineEmits<Ui3nRadioEmits>();
16
+ defineSlots<Ui3nRadioSlots>();
17
+
18
+ const slots = useSlots();
19
+
20
+ const instance = getCurrentInstance();
21
+ const isComponentPartOfGroup =
22
+ instance?.parent?.type.__name === 'Ui3nRadioGroup' || instance?.parent?.type.__name === 'ui3n-radio-group';
23
+ const groupName = isComponentPartOfGroup ? instance?.parent?.props.name : '';
24
+
25
+ const radioEl = ref<HTMLDivElement | null>(null);
26
+
27
+ const {
28
+ groupValue,
29
+ updateGroupValue,
30
+ }: {
31
+ groupValue: Nullable<Ref<Ui3nRadioValue>>;
32
+ updateGroupValue: Nullable<(value: Ui3nRadioValue) => void>;
33
+ } = groupName
34
+ ? inject(`radio-group-${groupName}`)!
35
+ : {
36
+ groupValue: null,
37
+ updateGroupValue: null,
38
+ };
39
+
40
+ const val = ref<Ui3nRadioValue>(groupName ? groupValue!.value : props.modelValue);
41
+
42
+ const isOn = computed(() => val.value === props.checkedValue);
43
+
44
+ function change(ev: Event) {
45
+ ev.preventDefault();
46
+
47
+ if (!groupName) {
48
+ val.value = isOn.value ? props.uncheckedValue : props.checkedValue;
49
+ emits('change', val.value);
50
+ emits('update:modelValue', val.value);
51
+ return;
52
+ }
53
53
 
54
- if (isOn.value) {
55
- return;
56
- }
54
+ if (isOn.value) {
55
+ return;
56
+ }
57
57
 
58
- val.value = props.checkedValue;
59
- updateGroupValue!(val.value);
60
-
61
- // if (groupName) {
62
- // isOn.value && updateGroupValue!(val.value);
63
- // } else {
64
- // emits('change', val.value);
65
- // emits('update:modelValue', val.value);
66
- // }
67
- }
68
-
69
- onBeforeMount(() => {
70
- if (
71
- // @ts-ignore
72
- (slots.checkedIcon && !slots.uncheckedIcon) ||
73
- // @ts-ignore
74
- (!slots.checkedIcon && slots.uncheckedIcon)
75
- ) {
76
- throw Error('[Ui3nRadio] Both checkedIcon and uncheckedIcon slots must have values ​​defined.');
77
- }
78
- });
58
+ val.value = props.checkedValue;
59
+ updateGroupValue!(val.value);
79
60
 
80
- onMounted(() => {
81
- if (radioEl.value) {
82
- radioEl.value.style.setProperty('--ui3n-radio-size', `${props.size}px`);
83
- radioEl.value.style.setProperty('--ui3n-radio-color', props.color);
61
+ // if (groupName) {
62
+ // isOn.value && updateGroupValue!(val.value);
63
+ // } else {
64
+ // emits('change', val.value);
65
+ // emits('update:modelValue', val.value);
66
+ // }
84
67
  }
85
- });
86
68
 
87
- watch(
88
- () => props.modelValue,
89
- newValue => {
90
- if (newValue !== val.value) {
91
- val.value = newValue;
69
+ onBeforeMount(() => {
70
+ if (
71
+ // @ts-ignore
72
+ (slots.checkedIcon && !slots.uncheckedIcon) ||
73
+ // @ts-ignore
74
+ (!slots.checkedIcon && slots.uncheckedIcon)
75
+ ) {
76
+ throw Error('[Ui3nRadio] Both checkedIcon and uncheckedIcon slots must have values ​​defined.');
92
77
  }
93
- },
94
- );
78
+ });
95
79
 
96
- watch(
97
- () => props.size,
98
- newValue => {
80
+ onMounted(() => {
99
81
  if (radioEl.value) {
100
- radioEl.value.style.setProperty('--ui3n-radio-size', `${newValue}px`);
82
+ radioEl.value.style.setProperty('--ui3n-radio-size', `${props.size}px`);
83
+ radioEl.value.style.setProperty('--ui3n-radio-color', props.color);
101
84
  }
102
- },
103
- );
104
-
105
- watch(
106
- () => props.color,
107
- newValue => {
108
- if (radioEl.value) {
109
- radioEl.value.style.setProperty('--ui3n-radio-color', newValue);
110
- }
111
- },
112
- );
113
-
114
- watch(
115
- () => groupValue?.value,
116
- newVal => {
117
- if (groupName) {
118
- val.value = newVal === props.checkedValue ? props.checkedValue : props.uncheckedValue;
119
- }
120
- },
121
- );
85
+ });
86
+
87
+ watch(
88
+ () => props.modelValue,
89
+ newValue => {
90
+ if (newValue !== val.value) {
91
+ val.value = newValue;
92
+ }
93
+ },
94
+ );
95
+
96
+ watch(
97
+ () => props.size,
98
+ newValue => {
99
+ if (radioEl.value) {
100
+ radioEl.value.style.setProperty('--ui3n-radio-size', `${newValue}px`);
101
+ }
102
+ },
103
+ );
104
+
105
+ watch(
106
+ () => props.color,
107
+ newValue => {
108
+ if (radioEl.value) {
109
+ radioEl.value.style.setProperty('--ui3n-radio-color', newValue);
110
+ }
111
+ },
112
+ );
113
+
114
+ watch(
115
+ () => groupValue?.value,
116
+ newVal => {
117
+ if (groupName) {
118
+ val.value = newVal === props.checkedValue ? props.checkedValue : props.uncheckedValue;
119
+ }
120
+ },
121
+ );
122
122
  </script>
123
123
 
124
124
  <template>
@@ -178,74 +178,75 @@ watch(
178
178
  </template>
179
179
 
180
180
  <style lang="scss" module>
181
- @use '../../assets/styles/mixins' as mixins;
182
-
183
- .ui3nRadio {
184
- --ui3n-radio-size: 16px;
185
- --ui3n-radio-color: var(--color-icon-control-accent-default);
186
- --ui3n-radio-text-size: 12px;
187
- --ui3n-radio-text-color: var(--color-text-control-primary-default);
188
- --ui3n-radio-text-weight: 500;
189
-
190
- position: relative;
191
- display: flex;
192
- justify-content: flex-start;
193
- align-items: center;
194
- min-height: var(--spacing-vl);
195
- gap: var(--spacing-s);
196
-
197
- &.disabled {
198
- --ui3n-radio-color: var(--color-icon-control-primary-disabled) !important;
199
- pointer-events: none;
200
- cursor: default;
201
-
202
- .label {
203
- opacity: 0.7;
181
+ @use '../../assets/styles/mixins' as mixins;
182
+
183
+ .ui3nRadio {
184
+ --ui3n-radio-size: 16px;
185
+ --ui3n-radio-color: var(--color-icon-control-accent-default);
186
+ --ui3n-radio-text-size: 12px;
187
+ --ui3n-radio-text-color: var(--color-text-control-primary-default);
188
+ --ui3n-radio-text-weight: 500;
189
+
190
+ position: relative;
191
+ display: flex;
192
+ justify-content: flex-start;
193
+ align-items: center;
194
+ min-height: var(--spacing-vl);
195
+ gap: var(--spacing-s);
196
+
197
+ &.disabled {
198
+ --ui3n-radio-color: var(--color-icon-control-primary-disabled) !important;
199
+
200
+ pointer-events: none;
201
+ cursor: default;
202
+
203
+ .label {
204
+ opacity: 0.7;
205
+ }
204
206
  }
205
207
  }
206
- }
207
-
208
- .noLabel {
209
- gap: 0;
210
- }
211
-
212
- .body {
213
- position: relative;
214
- display: flex;
215
- width: var(--ui3n-radio-size);
216
- min-width: var(--ui3n-radio-size);
217
- height: var(--ui3n-radio-size);
218
- min-height: var(--ui3n-radio-size);
219
- justify-content: center;
220
- align-items: center;
221
- border-radius: 50%;
222
-
223
- &:hover {
208
+
209
+ .noLabel {
210
+ gap: 0;
211
+ }
212
+
213
+ .body {
214
+ position: relative;
215
+ display: flex;
216
+ width: var(--ui3n-radio-size);
217
+ min-width: var(--ui3n-radio-size);
218
+ height: var(--ui3n-radio-size);
219
+ min-height: var(--ui3n-radio-size);
220
+ justify-content: center;
221
+ align-items: center;
222
+ border-radius: 50%;
223
+
224
+ &:hover {
225
+ cursor: pointer;
226
+ background-color: hsl(from transparent h s calc(l - 10));
227
+ @include mixins.ripple(hsl(from transparent h s calc(l - 10)));
228
+ }
229
+ }
230
+
231
+ .label {
232
+ font-size: var(--ui3n-radio-text-size);
233
+ font-weight: var(--ui3n-radio-text-weight);
234
+ color: var(--ui3n-radio-text-color);
235
+ user-select: none;
236
+ }
237
+
238
+ .icon {
239
+ color: var(--ui3n-radio-color);
240
+ min-height: calc(var(--ui3n-radion-size) - 2px);
241
+ height: calc(var(--ui3n-radion-size) - 2px);
242
+ min-width: calc(var(--ui3n-checkbox-size) - 2px);
243
+ width: calc(var(--ui3n-radion-size) - 2px);
224
244
  cursor: pointer;
225
- background-color: hsl(from transparent h s calc(l - 10));
226
- @include mixins.ripple(hsl(from transparent h s calc(l - 10)));
227
245
  }
228
- }
229
-
230
- .label {
231
- font-size: var(--ui3n-radio-text-size);
232
- font-weight: var(--ui3n-radio-text-weight);
233
- color: var(--ui3n-radio-text-color);
234
- user-select: none;
235
- }
236
-
237
- .icon {
238
- color: var(--ui3n-radio-color);
239
- min-height: calc(var(--ui3n-radion-size) - 2px);
240
- height: calc(var(--ui3n-radion-size) - 2px);
241
- min-width: calc(var(--ui3n-checkbox-size) - 2px);
242
- width: calc(var(--ui3n-radion-size) - 2px);
243
- cursor: pointer;
244
- }
245
-
246
- .bodyDisabled,
247
- .iconDisabled {
248
- filter: grayscale(1);
249
- opacity: 0.5;
250
- }
246
+
247
+ .bodyDisabled,
248
+ .iconDisabled {
249
+ filter: grayscale(1);
250
+ opacity: 0.5;
251
+ }
251
252
  </style>
@@ -1,12 +1,12 @@
1
1
  <script lang="ts" setup>
2
- import type { Ui3nStepLineBarProps } from './types';
3
-
4
- withDefaults(
5
- defineProps<Ui3nStepLineBarProps>(),
6
- {
7
- current: 1,
8
- },
9
- );
2
+ import type { Ui3nStepLineBarProps } from './types';
3
+
4
+ withDefaults(
5
+ defineProps<Ui3nStepLineBarProps>(),
6
+ {
7
+ current: 1,
8
+ },
9
+ );
10
10
  </script>
11
11
 
12
12
  <template>
@@ -16,47 +16,51 @@ withDefaults(
16
16
  </div>
17
17
 
18
18
  <div :class="$style.body">
19
- <div v-for="step in steps" :class="[$style.step, step <= current && $style.active]" />
19
+ <div
20
+ v-for="step in steps"
21
+ :key="step"
22
+ :class="[$style.step, step <= current && $style.active]"
23
+ />
20
24
  </div>
21
25
  </div>
22
26
  </template>
23
27
 
24
28
  <style lang="scss" module>
25
- .ui3nStepLineBar {
26
- --ui3n-step-line-bar-steps: v-bind(steps);
27
-
28
- position: relative;
29
- width: 100%;
30
- }
31
-
32
- .label {
33
- position: relative;
34
- width: 100%;
35
- text-align: center;
36
- font-size: var(--font-14);
37
- font-weight: 500;
38
- line-height: var(--font-20);
39
- color: var(--color-text-block-accent-default);
40
- margin-bottom: var(--spacing-m);
41
- }
42
-
43
- .body {
44
- display: flex;
45
- width: 100%;
46
- justify-content: space-between;
47
- align-items: center;
48
- gap: var(--spacing-s);
49
- }
50
-
51
- .step {
52
- position: relative;
53
- width: calc((100% - (calc(var(--ui3n-step-line-bar-steps) - 1) * var(--spacing-s))) / var(--ui3n-step-line-bar-steps));
54
- height: var(--spacing-xs);
55
- border-radius: var(--spacing-xs);
56
- background-color: var(--color-bg-control-secondary-default);
57
- }
58
-
59
- .active {
60
- background-color: var(--color-bg-control-accent-default);
61
- }
29
+ .ui3nStepLineBar {
30
+ --ui3n-step-line-bar-steps: v-bind(steps);
31
+
32
+ position: relative;
33
+ width: 100%;
34
+ }
35
+
36
+ .label {
37
+ position: relative;
38
+ width: 100%;
39
+ text-align: center;
40
+ font-size: var(--font-14);
41
+ font-weight: 500;
42
+ line-height: var(--font-20);
43
+ color: var(--color-text-block-accent-default);
44
+ margin-bottom: var(--spacing-m);
45
+ }
46
+
47
+ .body {
48
+ display: flex;
49
+ width: 100%;
50
+ justify-content: space-between;
51
+ align-items: center;
52
+ gap: var(--spacing-s);
53
+ }
54
+
55
+ .step {
56
+ position: relative;
57
+ width: calc((100% - (calc(var(--ui3n-step-line-bar-steps) - 1) * var(--spacing-s))) / var(--ui3n-step-line-bar-steps));
58
+ height: var(--spacing-xs);
59
+ border-radius: var(--spacing-xs);
60
+ background-color: var(--color-bg-control-secondary-default);
61
+ }
62
+
63
+ .active {
64
+ background-color: var(--color-bg-control-accent-default);
65
+ }
62
66
  </style>