@unsource/ui 1.9.7 → 1.9.9

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.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unsource-ui",
3
3
  "configKey": "unsourceUi",
4
- "version": "1.9.7",
4
+ "version": "1.9.9",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,5 +1,4 @@
1
- import type { CardItem } from './UnCard.vue.js';
2
- import type { CardCustomClass } from "./UnCard.vue.js";
1
+ import type { CardItem, CardCustomClass } from './UnCard.vue.js';
3
2
  export type CheckboxCustomInput = Partial<Record<'box' | 'innerBox' | 'card', string>> & {
4
3
  item?: CardCustomClass;
5
4
  };
@@ -14,7 +14,12 @@
14
14
  :class="[customClass.innerBox, customClass[selected ? 'selected' : 'notSelected']?.innerBox, selected ? '!h-10px' : '!h-1px']"
15
15
  />
16
16
  </div>
17
- <UnCard :class="[customClass.card, customClass[selected ? 'selected' : 'notSelected']?.card]" :custom-class="_mergeWith(customClass.item, customClass[selected ? 'selected' : 'notSelected']?.item, merge)" :item/>
17
+ <UnCard
18
+ class="!bg-transparent"
19
+ :class="[customClass.card, customClass[selected ? 'selected' : 'notSelected']?.card]"
20
+ :custom-class="_mergeWith(customClass.item, customClass[selected ? 'selected' : 'notSelected']?.item, merge)"
21
+ :item
22
+ />
18
23
  </div>
19
24
  </template>
20
25
 
@@ -1,5 +1,4 @@
1
- import type { CardItem } from './UnCard.vue.js';
2
- import type { CardCustomClass } from "./UnCard.vue.js";
1
+ import type { CardItem, CardCustomClass } from './UnCard.vue.js';
3
2
  export type CheckboxCustomInput = Partial<Record<'box' | 'innerBox' | 'card', string>> & {
4
3
  item?: CardCustomClass;
5
4
  };
@@ -13,6 +13,8 @@ type __VLS_Props = {
13
13
  customClass?: Partial<Record<'header' | 'icon' | 'label' | 'arrowIcon' | 'wrapper' | 'innerWrapper' | 'search' | 'list' | 'radio' | 'checkbox' | 'checkboxButton', unknown>> & {
14
14
  radioItem?: RadioCustomClass;
15
15
  checkboxItem?: CheckboxCustomClass;
16
+ selected: Partial<Record<'radio' | 'checkbox', string>>;
17
+ notSelected: Partial<Record<'radio' | 'checkbox', string>>;
16
18
  };
17
19
  };
18
20
  type __VLS_ModelProps = {
@@ -64,7 +64,7 @@
64
64
  <div
65
65
  name="list"
66
66
  :class="customClass.list"
67
- class="divide-y divide-border min-w-fit divide-dashed divide-solid flex flex-col items-stretch overflow-y-auto scrollbar-width-thin !children:b-x-0"
67
+ class="min-w-fit divide-(y dashed border) flex flex-col items-stretch overflow-y-auto scrollbar-width-thin !children:b-x-0"
68
68
  >
69
69
  <template v-if="multi">
70
70
  <UnCheckboxItem
@@ -72,7 +72,7 @@
72
72
  :key="Value(option)"
73
73
  :value="Value(option)"
74
74
  :item="Label(option)"
75
- :class="customClass.checkbox"
75
+ :class="[customClass.checkbox, customClass[value?.includes(Value(option)) ? 'selected' : 'notSelected']?.checkbox]"
76
76
  :custom-class="customClass.checkboxItem"
77
77
  :selected="value?.includes(Value(option))"
78
78
  @click="handleSelect(option)"
@@ -92,7 +92,7 @@
92
92
  :key="Value(option)"
93
93
  :value="Value(option)"
94
94
  :item="Label(option)"
95
- :class="customClass.radio"
95
+ :class="[customClass.radio, customClass[isEqual(Value(option), value) ? 'selected' : 'notSelected']?.radio]"
96
96
  :custom-class="customClass.radioItem"
97
97
  :selected="isEqual(Value(option), value)"
98
98
  class="!min-w-60"
@@ -133,7 +133,7 @@ const close = () => {
133
133
  show.value = false;
134
134
  };
135
135
  const dropdownStyles = ref({});
136
- const Value = (option) => _get(option, valueKey || "value", option) || option;
136
+ const Value = (option) => valueKey ? _get(option, valueKey, option) : option;
137
137
  const Label = (option) => typeof option === "string" ? { title: option } : option;
138
138
  const Selected = computed(() => items.find((o) => isEqual(Value(o), value.value)));
139
139
  const IsSelected = (v) => items.find((o) => isEqual(Value(o), v));
@@ -13,6 +13,8 @@ type __VLS_Props = {
13
13
  customClass?: Partial<Record<'header' | 'icon' | 'label' | 'arrowIcon' | 'wrapper' | 'innerWrapper' | 'search' | 'list' | 'radio' | 'checkbox' | 'checkboxButton', unknown>> & {
14
14
  radioItem?: RadioCustomClass;
15
15
  checkboxItem?: CheckboxCustomClass;
16
+ selected: Partial<Record<'radio' | 'checkbox', string>>;
17
+ notSelected: Partial<Record<'radio' | 'checkbox', string>>;
16
18
  };
17
19
  };
18
20
  type __VLS_ModelProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unsource/ui",
3
- "version": "1.9.7",
3
+ "version": "1.9.9",
4
4
  "private": false,
5
5
  "description": "nuxt ui kit for unsource env",
6
6
  "repository": "https://github.com/alisa2142/unsource-ui",