@v1nt1248/3nclient-lib 0.2.69 → 0.2.71

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@v1nt1248/3nclient-lib",
3
3
  "license": "AGPL-3.0-or-later",
4
4
  "author": "v1nt1248",
5
- "version": "0.2.69",
5
+ "version": "0.2.71",
6
6
  "description": "Library for 3NWeb clients",
7
7
  "type": "module",
8
8
  "files": [
@@ -233,7 +233,7 @@
233
233
  }
234
234
 
235
235
  .icon {
236
- --ui3n-button-icon-bg-color: hsl(from var(--ui3n-button-bg-color-custom) h s calc(l - 10));
236
+ --ui3n-button-icon-bg-color: oklch(from var(--ui3n-button-bg-color-custom) calc(l - 0.1) c h);
237
237
 
238
238
  background: var(--ui3n-button-bg-color-custom);
239
239
  color: var(--ui3n-button-text-color-custom);
@@ -256,7 +256,7 @@
256
256
  }
257
257
 
258
258
  &:focus {
259
- outline: 1px solid hsl(from var(--ui3n-button-icon-bg-color) h s calc(l - 10));
259
+ outline: 1px solid oklch(from var(--ui3n-button-icon-bg-color) calc(l - 0.1) c h);
260
260
  }
261
261
 
262
262
  &[disabled] {
@@ -266,7 +266,7 @@
266
266
  }
267
267
 
268
268
  .custom {
269
- --ui3n-button-custom-bg-color: hsl(from var(--ui3n-button-bg-color-custom) h s calc(l - 10));
269
+ --ui3n-button-custom-bg-color: oklch(from var(--ui3n-button-bg-color-custom) calc(l - 0.1) c h);
270
270
 
271
271
  background: var(--ui3n-button-bg-color-custom);
272
272
  color: var(--ui3n-button-text-color-custom);
@@ -276,7 +276,7 @@
276
276
  }
277
277
 
278
278
  &:focus {
279
- outline: 1px solid hsl(from var(--ui3n-button-custom-bg-color) h s calc(l - 10));
279
+ outline: 1px solid oklch(from var(--ui3n-button-custom-bg-color) calc(l - 0.1) c h);
280
280
  }
281
281
 
282
282
  &[disabled] {
@@ -238,17 +238,17 @@
238
238
  background-color: var(--ui3n-checkbox-color);
239
239
 
240
240
  &:hover {
241
- border-color: hsl(from var(--ui3n-checkbox-color) h s calc(l - 10));
242
- background-color: hsl(from var(--ui3n-checkbox-color) h s calc(l - 10));
243
- @include mixins.ripple(hsl(from var(--ui3n-checkbox-color) h s calc(l - 10)));
241
+ border-color: oklch(from var(--ui3n-checkbox-color) calc(l - 0.1) c h);
242
+ background-color: oklch(from var(--ui3n-checkbox-color) calc(l - 0.1) c h);
243
+ @include mixins.ripple(oklch(from var(--ui3n-checkbox-color) calc(l - 0.1) c h));
244
244
  }
245
245
  }
246
246
 
247
247
  .unfilled {
248
248
  &:hover {
249
- border-color: hsl(from var(--ui3n-checkbox-color) h s calc(l - 10));
250
- background-color: hsl(from transparent h s calc(l - 10));
251
- @include mixins.ripple(hsl(from transparent h s calc(l - 10)));
249
+ border-color: oklch(from var(--ui3n-checkbox-color) calc(l - 0.1) c h);
250
+ background-color: oklch(from transparent calc(l - 0.1) c h);
251
+ @include mixins.ripple(oklch(from transparent calc(l - 0.1) c h));
252
252
  }
253
253
  }
254
254
 
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { computed, onMounted, useTemplateRef, watch } from 'vue';
2
+ import { computed } from 'vue';
3
3
  import type { Ui3nIconEmits, Ui3nIconProps } from './types';
4
4
 
5
5
  const props = withDefaults(
@@ -12,8 +12,6 @@ const props = withDefaults(
12
12
  );
13
13
  const emits = defineEmits<Ui3nIconEmits>();
14
14
 
15
- const iconEl = useTemplateRef('icon');
16
-
17
15
  const widthVal = computed(() => props.size || props.width || 16);
18
16
  const heightVal = computed(() => props.size || props.height || 16);
19
17
  const widthCss = computed(() => `${widthVal.value}px`);
@@ -35,29 +33,12 @@ const iconStyle = computed(() => {
35
33
  function onClick(ev: Event) {
36
34
  emits('click', ev);
37
35
  }
38
-
39
- onMounted(() => {
40
- if (iconEl.value) {
41
- iconEl.value.classList.add(`ui3n-icon__${props.icon}`);
42
- }
43
- });
44
-
45
- watch(
46
- () => props.icon,
47
- (val, oldVal) => {
48
- if (val && val !== oldVal) {
49
- iconEl.value?.classList.remove(`ui3n-icon__${oldVal}`);
50
- iconEl.value?.classList.add(`ui3n-icon__${val}`);
51
- }
52
- }
53
- )
54
36
  </script>
55
37
 
56
38
  <template>
57
39
  <div
58
- ref="icon"
59
- class="ui3n-icon"
60
- :class="$style.icon"
40
+ :class="$style.ui3nIcon"
41
+ :data-icon="icon"
61
42
  :title="title"
62
43
  :style="iconStyle"
63
44
  @click="onClick"
@@ -65,9 +46,10 @@ watch(
65
46
  </template>
66
47
 
67
48
  <style lang="scss" module>
68
- .icon {
49
+ .ui3nIcon {
69
50
  --ui3n-icon-color: v-bind(color);
70
51
 
52
+ display: block;
71
53
  min-width: v-bind(widthCss);
72
54
  width: v-bind(widthCss);
73
55
  max-width: v-bind(widthCss);
@@ -76,6 +58,10 @@ watch(
76
58
  max-height: v-bind(heightCss);
77
59
  flex-grow: 0;
78
60
  flex-shrink: 0;
61
+ background-color: currentcolor;
79
62
  color: var(--ui3n-icon-color);
63
+ mask-image: var(--svg);
64
+ mask-repeat: no-repeat;
65
+ mask-size: 100% 100%;
80
66
  }
81
67
  </style>
@@ -223,8 +223,8 @@
223
223
 
224
224
  &:hover {
225
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)));
226
+ background-color: oklch(from transparent calc(l - 0.1) c h);
227
+ @include mixins.ripple(oklch(from transparent calc(l - 0.1) c h));
228
228
  }
229
229
  }
230
230
 
@@ -343,36 +343,6 @@
343
343
  z-index: 3;
344
344
  }
345
345
 
346
- //.pointer {
347
- // position: absolute;
348
- // top: 0;
349
- // width: var(--ui3n-slider-thumb-size);
350
- // height: var(--ui3n-slider-thumb-size);
351
- // border-radius: 50%;
352
- // background-color: var(--ui3n-slider-thumb-color);
353
- // cursor: pointer;
354
- // touch-action: none;
355
- // z-index: 3;
356
- //
357
- // &:hover {
358
- // background-color: hsl(from var(--ui3n-slider-thumb-color) h s calc(l + 5));
359
- // }
360
- //
361
- // &.selected::before {
362
- // position: absolute;
363
- // content: '';
364
- // width: calc(var(--ui3n-slider-thumb-size) * 2);
365
- // height: calc(var(--ui3n-slider-thumb-size) * 2);
366
- // left: 50%;
367
- // top: 50%;
368
- // transform: translate(-50%, -50%);
369
- // border-radius: 50%;
370
- // opacity: 0.2;
371
- // transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
372
- // background-color: var(--ui3n-slider-thumb-color);
373
- // }
374
- //}
375
-
376
346
  .pointer {
377
347
  position: relative;
378
348
  width: 100%;
@@ -383,7 +353,7 @@
383
353
  z-index: 5;
384
354
 
385
355
  &:hover {
386
- background-color: hsl(from var(--ui3n-slider-thumb-color) h s calc(l + 5));
356
+ background-color: oklch(from var(--ui3n-slider-thumb-color) calc(l + 0.1) c h);
387
357
  }
388
358
 
389
359
  &.selected::before {