@milaboratories/uikit 2.2.73 → 2.2.75

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 (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/pl-uikit.js +99 -94
  3. package/dist/pl-uikit.js.map +1 -1
  4. package/dist/pl-uikit.umd.cjs +8 -8
  5. package/dist/pl-uikit.umd.cjs.map +1 -1
  6. package/dist/src/components/PlCheckbox/PlCheckbox.vue.d.ts +8 -0
  7. package/dist/src/components/PlCheckbox/PlCheckbox.vue.d.ts.map +1 -1
  8. package/dist/src/components/PlCheckbox/PlCheckboxBase.vue.d.ts +1 -0
  9. package/dist/src/components/PlCheckbox/PlCheckboxBase.vue.d.ts.map +1 -1
  10. package/dist/style.css +1 -1
  11. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  12. package/package.json +3 -3
  13. package/src/assets/dropdown-list-item.scss +2 -2
  14. package/src/assets/images/24_checkbox-dark-disabled-checked.svg +4 -0
  15. package/src/assets/images/24_checkbox-dark-disabled-indeterminate.svg +4 -0
  16. package/src/assets/images/{24_checkbox-base-dark.svg → 24_checkbox-dark-disabled-unchecked.svg} +1 -1
  17. package/src/assets/images/24_checkbox-dark-enabled-checked.svg +4 -0
  18. package/src/assets/images/24_checkbox-dark-enabled-indeterminate.svg +4 -0
  19. package/src/assets/images/24_checkbox-dark-enabled-unchecked.svg +3 -0
  20. package/src/assets/images/24_checkbox-light-disabled-checked.svg +4 -0
  21. package/src/assets/images/24_checkbox-light-disabled-indeterminate.svg +4 -0
  22. package/src/assets/images/24_checkbox-light-disabled-unchecked.svg +3 -0
  23. package/src/assets/images/24_checkbox-light-enabled-checked.svg +4 -0
  24. package/src/assets/images/24_checkbox-light-enabled-indeterminate.svg +4 -0
  25. package/src/components/DropdownListItem.vue +2 -2
  26. package/src/components/PlCheckbox/PlCheckbox.vue +4 -0
  27. package/src/components/PlCheckbox/PlCheckboxBase.vue +8 -5
  28. package/src/components/PlCheckbox/pl-checkbox-base.scss +27 -14
  29. package/src/components/PlCheckbox/pl-checkbox.scss +0 -38
  30. package/src/components/PlDropdownMulti/pl-dropdown-multi.scss +4 -4
  31. package/src/assets/images/24_checkbox-checked-dark.svg +0 -4
  32. package/src/assets/images/24_checkbox-checked.svg +0 -4
  33. package/src/assets/images/24_checkbox-disabled-checked.svg +0 -6
  34. package/src/assets/images/24_checkbox-disabled-dark.svg +0 -3
  35. package/src/assets/images/24_checkbox-disabled.svg +0 -4
  36. /package/src/assets/images/{24_checkbox-base.svg → 24_checkbox-light-enabled-unchecked.svg} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/uikit",
3
- "version": "2.2.73",
3
+ "version": "2.2.75",
4
4
  "type": "module",
5
5
  "main": "dist/pl-uikit.umd.js",
6
6
  "module": "dist/pl-uikit.js",
@@ -35,8 +35,8 @@
35
35
  "svgo": "^3.3.2",
36
36
  "@types/d3": "^7.4.3",
37
37
  "@milaboratories/eslint-config": "^1.0.4",
38
- "@milaboratories/helpers": "^1.6.11",
39
- "@platforma-sdk/model": "^1.30.11"
38
+ "@platforma-sdk/model": "^1.30.21",
39
+ "@milaboratories/helpers": "^1.6.11"
40
40
  },
41
41
  "scripts": {
42
42
  "dev": "vite",
@@ -52,13 +52,13 @@
52
52
  &__checkbox {
53
53
  margin-right: 8px;
54
54
  background-color: var(--control-mask-fill);
55
- @include mask(url(./images/24_checkbox-base-dark.svg), 24px);
55
+ @include mask(url(./images/24_checkbox-dark-enabled-unchecked.svg), 24px);
56
56
  }
57
57
 
58
58
  &__checkbox.checked {
59
59
  margin-right: 8px;
60
60
  background-color: red;
61
- @include mask(url(./images/24_checkbox-checked-dark.svg), 24px);
61
+ @include mask(url(./images/24_checkbox-dark-enabled-checked.svg), 24px);
62
62
  }
63
63
 
64
64
  &__description {
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="3" y="3" width="18" height="18" rx="2" fill="#3D3D42"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M17.5431 8.51739L10.3333 16.0877L6.45691 12.0174L7.54312 10.9829L10.3333 13.9127L16.4569 7.48291L17.5431 8.51739Z" fill="#1B1B1F"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="3" y="3" width="18" height="18" rx="2" fill="#3D3D42"/>
3
+ <path d="M7 12H17" stroke="#1B1B1F" stroke-width="1.5"/>
4
+ </svg>
@@ -1,3 +1,3 @@
1
1
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 4.5H4.5L4.5 19.5H19.5V4.5ZM4.5 3C3.67157 3 3 3.67157 3 4.5V19.5C3 20.3284 3.67157 21 4.5 21H19.5C20.3284 21 21 20.3284 21 19.5V4.5C21 3.67157 20.3284 3 19.5 3H4.5Z" fill="#DFE0E6"/>
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 4.5H4.5L4.5 19.5H19.5V4.5ZM4.5 3C3.67157 3 3 3.67157 3 4.5V19.5C3 20.3284 3.67157 21 4.5 21H19.5C20.3284 21 21 20.3284 21 19.5V4.5C21 3.67157 20.3284 3 19.5 3H4.5Z" fill="#3D3D42"/>
3
3
  </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="3" y="3" width="18" height="18" rx="2" fill="white"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M17.5431 8.51739L10.3333 16.0877L6.45691 12.0174L7.54312 10.9829L10.3333 13.9127L16.4569 7.48291L17.5431 8.51739Z" fill="#110529"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="3" y="3" width="18" height="18" rx="2" fill="white"/>
3
+ <path d="M7 12H17" stroke="#110529" stroke-width="1.5"/>
4
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 4.5H4.5L4.5 19.5H19.5V4.5ZM4.5 3C3.67157 3 3 3.67157 3 4.5V19.5C3 20.3284 3.67157 21 4.5 21H19.5C20.3284 21 21 20.3284 21 19.5V4.5C21 3.67157 20.3284 3 19.5 3H4.5Z" fill="white"/>
3
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="3" y="3" width="18" height="18" rx="2" fill="#CFD1DB"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M17.5431 8.51739L10.3333 16.0877L6.45691 12.0174L7.54312 10.9829L10.3333 13.9127L16.4569 7.48291L17.5431 8.51739Z" fill="white"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="3" y="3" width="18" height="18" rx="2" fill="#CFD1DB"/>
3
+ <path d="M7 12H17" stroke="white" stroke-width="1.5"/>
4
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 4.5H4.5L4.5 19.5H19.5V4.5ZM4.5 3C3.67157 3 3 3.67157 3 4.5V19.5C3 20.3284 3.67157 21 4.5 21H19.5C20.3284 21 21 20.3284 21 19.5V4.5C21 3.67157 20.3284 3 19.5 3H4.5Z" fill="#CFD1DB"/>
3
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="3" y="3" width="18" height="18" rx="2" fill="#110529"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M17.5431 8.51739L10.3333 16.0877L6.45691 12.0174L7.54312 10.9829L10.3333 13.9127L16.4569 7.48291L17.5431 8.51739Z" fill="white"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="3" y="3" width="18" height="18" rx="2" fill="#110529"/>
3
+ <path d="M7 12H17" stroke="white" stroke-width="1.5"/>
4
+ </svg>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue';
3
- import CheckboxUncheckedSvg from '@/assets/images/24_checkbox-base.svg?raw';
4
- import CheckboxCheckedSvg from '@/assets/images/24_checkbox-checked.svg?raw';
3
+ import CheckboxUncheckedSvg from '@/assets/images/24_checkbox-light-enabled-unchecked.svg?raw';
4
+ import CheckboxCheckedSvg from '@/assets/images/24_checkbox-light-enabled-checked.svg?raw';
5
5
  import type { ListOptionNormalized } from '@/types';
6
6
 
7
7
  const props = withDefaults(
@@ -26,6 +26,10 @@ const props = defineProps<{
26
26
  * If `true`, the checkbox is disabled and cannot be interacted with.
27
27
  */
28
28
  disabled?: boolean;
29
+ /**
30
+ * If `true`, the checkbox is indeterminate (doesn't affect the model value).
31
+ */
32
+ indeterminate?: boolean;
29
33
  }>();
30
34
 
31
35
  const slots = useSlots();
@@ -1,23 +1,26 @@
1
1
  <script lang="ts" setup>
2
2
  import './pl-checkbox-base.scss';
3
- import { computed } from 'vue';
4
3
 
5
4
  defineEmits(['update:modelValue']);
6
5
 
7
6
  const props = defineProps<{
8
7
  modelValue: boolean;
9
8
  disabled?: boolean;
9
+ indeterminate?: boolean;
10
10
  }>();
11
-
12
- const checked = computed(() => props.modelValue);
13
11
  </script>
14
12
 
15
13
  <template>
16
14
  <div
17
15
  tabindex="0"
18
16
  class="pl-checkbox-base"
19
- :class="{ checked, disabled }"
17
+ :class="{
18
+ ...(props.indeterminate
19
+ ? { indeterminate: true }
20
+ : { checked: props.modelValue }),
21
+ disabled,
22
+ }"
20
23
  @click="$emit('update:modelValue', !modelValue)"
21
- @keydown.enter="$emit('update:modelValue', !modelValue)"
24
+ @keydown.space.prevent="$emit('update:modelValue', !modelValue)"
22
25
  />
23
26
  </template>
@@ -1,23 +1,33 @@
1
- @use "@/assets/mixins" as *;
2
-
3
1
  .pl-checkbox-base {
4
- --base-icon: url('@/assets/images/24_checkbox-base.svg');
5
- --checked-icon: url('@/assets/images/24_checkbox-checked.svg');
6
- --disabled-icon: url('@/assets/images/24_checkbox-disabled.svg');
7
- background-color: red;
2
+ --enabled-unchecked-icon: url('@/assets/images/24_checkbox-light-enabled-unchecked.svg');
3
+ --enabled-checked-icon: url('@/assets/images/24_checkbox-light-enabled-checked.svg');
4
+ --enabled-indeterminate-icon: url('@/assets/images/24_checkbox-light-enabled-indeterminate.svg');
5
+ --disabled-unchecked-icon: url('@/assets/images/24_checkbox-light-disabled-unchecked.svg');
6
+ --disabled-checked-icon: url('@/assets/images/24_checkbox-light-disabled-checked.svg');
7
+ --disabled-indeterminate-icon: url('@/assets/images/24_checkbox-light-disabled-indeterminate.svg');
8
+
8
9
  cursor: pointer;
9
10
  outline: none;
10
11
  border-radius: 4px;
11
- @include icon(var(--base-icon), 24px);
12
- min-width: 24px;
13
- min-height: 24px;
12
+ min-block-size: 24px;
13
+ min-inline-size: 24px;
14
+ background: var(--enabled-unchecked-icon) no-repeat center;
14
15
 
15
16
  &.checked {
16
- @include icon(var(--checked-icon), 24px);
17
+ background-image: var(--enabled-checked-icon);
18
+ }
19
+
20
+ &.indeterminate {
21
+ background-image: var(--enabled-indeterminate-icon);
17
22
  }
18
23
 
19
24
  &.disabled {
20
- @include icon(var(--disabled-icon), 24px);
25
+ background-image: var(--disabled-unchecked-icon);
26
+ pointer-events: none;
27
+ }
28
+
29
+ &.disabled:is(.checked) {
30
+ background-image: var(--disabled-checked-icon);
21
31
  pointer-events: none;
22
32
  }
23
33
 
@@ -26,8 +36,11 @@
26
36
  }
27
37
 
28
38
  [data-theme="dark"] & {
29
- --base-icon: url('@/assets/images/24_checkbox-base-dark.svg');
30
- --checked-icon: url('@/assets/images/24_checkbox-checked-dark.svg');
31
- --disabled-icon: url('@/assets/images/24_checkbox-disabled-dark.svg');
39
+ --enabled-unchecked-icon: url('@/assets/images/24_checkbox-dark-enabled-unchecked.svg');
40
+ --enabled-checked-icon: url('@/assets/images/24_checkbox-dark-enabled-checked.svg');
41
+ --enabled-indeterminate-icon: url('@/assets/images/24_checkbox-dark-enabled-indeterminate.svg');
42
+ --disabled-unchecked-icon: url('@/assets/images/24_checkbox-dark-disabled-unchecked.svg');
43
+ --disabled-checked-icon: url('@/assets/images/24_checkbox-dark-disabled-checked.svg');
44
+ --disabled-indeterminate-icon: url('@/assets/images/24_checkbox-dark-disabled-indeterminate.svg');
32
45
  }
33
46
  }
@@ -1,41 +1,3 @@
1
- @use "@/assets/mixins" as *;
2
-
3
- .pl-checkbox-base {
4
- --base-icon: url('@/assets/images/24_checkbox-base.svg');
5
- --checked-icon: url('@/assets/images/24_checkbox-checked.svg');
6
- --disabled-icon: url('@/assets/images/24_checkbox-disabled.svg');
7
- --disabled-checked-icon: url('@/assets/images/24_checkbox-disabled-checked.svg');
8
-
9
- cursor: pointer;
10
- outline: none;
11
- border-radius: 4px;
12
- @include icon(var(--base-icon), 24px);
13
-
14
- &.checked {
15
- @include icon(var(--checked-icon), 24px);
16
- }
17
-
18
- &.disabled {
19
- @include icon(var(--disabled-icon), 24px);
20
- pointer-events: none;
21
- }
22
-
23
- &.disabled:is(.checked) {
24
- @include icon(var(--disabled-checked-icon), 24px);
25
- pointer-events: none;
26
- }
27
-
28
- &:focus-visible {
29
- box-shadow: 0 0 0 2px var(--border-color-focus);
30
- }
31
-
32
- [data-theme="dark"] & {
33
- --base-icon: url('@/assets/images/24_checkbox-base-dark.svg');
34
- --checked-icon: url('@/assets/images/24_checkbox-checked-dark.svg');
35
- --disabled-icon: url('@/assets/images/24_checkbox-disabled-dark.svg');
36
- }
37
- }
38
-
39
1
  .pl-checkbox {
40
2
  --color-label: var(--color-text);
41
3
  --cursor-label: pointer;
@@ -83,8 +83,8 @@
83
83
  align-items: center;
84
84
  gap: 12px;
85
85
 
86
- --base-icon: url('@/assets/images/24_checkbox-base.svg');
87
- --checked-icon: url('@/assets/images/24_checkbox-checked.svg');
86
+ --base-icon: url('@/assets/images/24_checkbox-light-enabled-unchecked.svg');
87
+ --checked-icon: url('@/assets/images/24_checkbox-light-enabled-checked.svg');
88
88
 
89
89
  .pl-dropdown-multi__checkmark {
90
90
  cursor: pointer;
@@ -93,8 +93,8 @@
93
93
  @include icon(var(--base-icon), 24px);
94
94
 
95
95
  [data-theme="dark"] & {
96
- --base-icon: url('@/assets/images/24_checkbox-base-dark.svg');
97
- --checked-icon: url('@/assets/images/24_checkbox-checked-dark.svg');
96
+ --base-icon: url('@/assets/images/24_checkbox-dark-enabled-unchecked.svg');
97
+ --checked-icon: url('@/assets/images/24_checkbox-dark-enabled-checked.svg');
98
98
  }
99
99
  }
100
100
 
@@ -1,4 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect x="3" y="3" width="18" height="18" rx="2" fill="#DFE0E6"/>
3
- <path fill-rule="evenodd" clip-rule="evenodd" d="M17.5431 8.51724L10.3333 16.0875L6.45691 12.0172L7.54312 10.9828L10.3333 13.9125L16.4569 7.48276L17.5431 8.51724Z" fill="black"/>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect x="3" y="3" width="18" height="18" rx="2" fill="#110529"/>
3
- <path fill-rule="evenodd" clip-rule="evenodd" d="M17.5431 8.51724L10.3333 16.0875L6.45691 12.0172L7.54312 10.9828L10.3333 13.9125L16.4569 7.48276L17.5431 8.51724Z" fill="white"/>
4
- </svg>
@@ -1,6 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="24_checkbox">
3
- <rect id="Vector" x="3" y="3" width="18" height="18" rx="2" fill="#CFD1DB"/>
4
- <path id="Vector_51_(Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M17.543 8.51739L10.3332 16.0877L6.45679 12.0174L7.54299 10.9829L10.3332 13.9127L16.4568 7.48291L17.543 8.51739Z" fill="white"/>
5
- </g>
6
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 4.5H4.5L4.5 19.5H19.5V4.5ZM4.5 3C3.67157 3 3 3.67157 3 4.5V19.5C3 20.3284 3.67157 21 4.5 21H19.5C20.3284 21 21 20.3284 21 19.5V4.5C21 3.67157 20.3284 3 19.5 3H4.5Z" fill="#38383D"/>
3
- </svg>
@@ -1,4 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 4.5H4.5L4.5 19.5H19.5V4.5ZM4.5 3C3.67157 3 3 3.67157 3 4.5V19.5C3 20.3284 3.67157 21 4.5 21H19.5C20.3284 21 21 20.3284 21 19.5V4.5C21 3.67157 20.3284 3 19.5 3H4.5Z" fill="#CFD1DB"/>
3
- </svg>
4
-