@webitel/ui-sdk 25.8.42 → 25.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "25.8.42",
3
+ "version": "25.8.43",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run lint:fix || true) && npm run publish-lib",
@@ -56,7 +56,7 @@
56
56
  "@vuepic/vue-datepicker": "^4.5.1",
57
57
  "@vueuse/components": "^13.0.0",
58
58
  "@webitel/api-services": "^0.0.33",
59
- "@webitel/styleguide": "^24.12.47",
59
+ "@webitel/styleguide": "^24.12.49",
60
60
  "autosize": "^6.0.1",
61
61
  "axios": "^1.8.3",
62
62
  "clipboard-copy": "^4.0.1",
@@ -1,4 +1,3 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd"
3
- d="M18.1213 7.29289C18.5118 7.68342 18.5118 8.31658 18.1213 8.70711L11.1213 15.7071C10.3403 16.4882 9.07394 16.4882 8.29289 15.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929C5.68342 10.9024 6.31658 10.9024 6.70711 11.2929L9.35355 13.9393C9.54882 14.1346 9.8654 14.1346 10.0607 13.9393L16.7071 7.29289C17.0976 6.90237 17.7308 6.90237 18.1213 7.29289Z"/>
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M13.6943 2.31518C14.1019 2.73542 14.1019 3.41676 13.6943 3.837L6.38863 11.3696C5.57348 12.2101 4.25185 12.2101 3.43669 11.3696L0.305684 8.14137C-0.101895 7.72113 -0.101895 7.03978 0.305684 6.61954C0.713262 6.19931 1.37408 6.19931 1.78165 6.61954L4.54367 9.46736C4.74746 9.67748 5.07787 9.67748 5.28166 9.46736L12.2183 2.31518C12.6259 1.89494 13.2867 1.89494 13.6943 2.31518Z" style="fill-opacity:1;"/>
4
3
  </svg>
@@ -8,7 +8,16 @@
8
8
  :disabled="disabled"
9
9
  :value="value"
10
10
  :binary="isSingle"
11
- />
11
+ >
12
+ <template #icon>
13
+ <span class="wt-checkbox__checkmark">
14
+ <wt-icon
15
+ :color="iconColor"
16
+ :icon="checkboxIcon"
17
+ />
18
+ </span>
19
+ </template>
20
+ </p-checkbox>
12
21
  <wt-label
13
22
  v-if="label"
14
23
  :for="checkboxId"
@@ -57,6 +66,16 @@ const isChecked = computed(() => {
57
66
  }
58
67
  return model.value.includes(props.value);
59
68
  });
69
+
70
+ const checkboxIcon = computed(() => {
71
+ return isChecked.value ? 'tick' : '';
72
+ })
73
+
74
+ const iconColor = computed(() => {
75
+ if (props.disabled) return 'disabled';
76
+ if (isChecked.value) return 'active';
77
+ return null;
78
+ })
60
79
  </script>
61
80
 
62
81
  <style lang="scss">
@@ -71,6 +90,10 @@ const isChecked = computed(() => {
71
90
  user-select: none;
72
91
  }
73
92
 
93
+ .wt-checkbox__checkmark {
94
+ display: inline-flex;
95
+ }
96
+
74
97
  .wt-checkbox__label {
75
98
  transition: var(--transition);
76
99
  cursor: pointer;
@@ -3,6 +3,30 @@ import { CheckboxScheme } from "@webitel/styleguide/component-schemes";
3
3
  const checkbox = {
4
4
  ...CheckboxScheme.sizes,
5
5
  colorScheme: CheckboxScheme.colorScheme,
6
+
7
+ css: ({ dt }) => `
8
+ .p-checkbox-box .wt-icon__icon {
9
+ color: ${dt('checkbox.icon.color')};
10
+ width: ${dt('checkbox.icon.size')};
11
+ height: ${dt('checkbox.icon.size')};
12
+ }
13
+
14
+ .p-checkbox-box .wt-icon--color-active .wt-icon__icon {
15
+ color: ${dt('checkbox.icon.checkedColor')};
16
+ }
17
+
18
+ .p-checkbox-box .wt-icon--color-disabled .wt-icon__icon {
19
+ color: ${dt('checkbox.icon.disabledColor')};
20
+ }
21
+
22
+ .p-checkbox:hover .wt-icon--color-active .wt-icon__icon {
23
+ color: ${dt('checkbox.icon.checkedHoverColor')};
24
+ }
25
+
26
+ .wt-checkbox:has(.wt-label:hover) .wt-icon--color-active .wt-icon__icon {
27
+ color: ${dt('checkbox.icon.checkedHoverColor')};
28
+ }
29
+ `,
6
30
  };
7
31
 
8
32
  export default checkbox;
@@ -9,23 +9,27 @@ declare const model: import("vue").ModelRef<boolean | string[], string, boolean
9
9
  declare const checkboxId: string;
10
10
  declare const isSingle: import("vue").ComputedRef<boolean>;
11
11
  declare const isChecked: import("vue").ComputedRef<any>;
12
+ declare const checkboxIcon: import("vue").ComputedRef<"" | "tick">;
13
+ declare const iconColor: import("vue").ComputedRef<"active" | "disabled">;
12
14
  type __VLS_PublicProps = __VLS_Props & {
13
15
  'selected': boolean | string[];
14
16
  };
15
17
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
16
- declare var __VLS_9: {
18
+ declare var __VLS_13: {
17
19
  label: string;
18
20
  isChecked: any;
19
21
  disabled: boolean;
20
22
  };
21
23
  type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
22
- label?: (props: typeof __VLS_9) => any;
24
+ label?: (props: typeof __VLS_13) => any;
23
25
  }>;
24
26
  declare const __VLS_self: import("vue").DefineComponent<__VLS_PublicProps, {
25
27
  model: typeof model;
26
28
  checkboxId: typeof checkboxId;
27
29
  isSingle: typeof isSingle;
28
30
  isChecked: typeof isChecked;
31
+ checkboxIcon: typeof checkboxIcon;
32
+ iconColor: typeof iconColor;
29
33
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
34
  "update:selected": (value: boolean | string[]) => any;
31
35
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
@@ -60,6 +60,9 @@ declare const checkbox: {
60
60
  };
61
61
  };
62
62
  };
63
+ css: ({ dt }: {
64
+ dt: any;
65
+ }) => string;
63
66
  root: {
64
67
  borderRadius: string;
65
68
  width: string;