vueless 0.0.592 → 0.0.593
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/composables/useUI.ts +17 -15
- package/package.json +1 -1
- package/types.ts +2 -0
- package/ui.button/storybook/stories.ts +3 -1
- package/ui.button-link/storybook/stories.ts +3 -1
- package/ui.button-toggle/storybook/stories.ts +3 -1
- package/ui.button-toggle-item/storybook/stories.ts +3 -1
- package/ui.container-accordion/storybook/stories.ts +3 -1
- package/ui.container-card/storybook/stories.ts +3 -1
- package/ui.container-col/storybook/stories.ts +1 -1
- package/ui.container-divider/storybook/stories.ts +3 -1
- package/ui.container-group/storybook/stories.ts +1 -1
- package/ui.container-groups/storybook/stories.ts +1 -1
- package/ui.container-modal/storybook/stories.ts +1 -1
- package/ui.container-modal-confirm/storybook/stories.ts +1 -1
- package/ui.container-page/storybook/stories.ts +3 -1
- package/ui.container-row/storybook/stories.ts +3 -1
- package/ui.data-list/storybook/stories.ts +3 -1
- package/ui.data-table/storybook/stories.ts +3 -1
- package/ui.dropdown-badge/storybook/stories.ts +1 -1
- package/ui.dropdown-button/storybook/stories.ts +1 -1
- package/ui.dropdown-link/storybook/stories.ts +1 -1
- package/ui.dropdown-list/storybook/stories.ts +1 -1
- package/ui.dropdown-list/types.ts +1 -1
- package/ui.form-calendar/storybook/stories.ts +1 -1
- package/ui.form-checkbox/storybook/stories.ts +3 -1
- package/ui.form-checkbox-group/storybook/stories.ts +3 -1
- package/ui.form-checkbox-multi-state/storybook/stories.ts +3 -1
- package/ui.form-color-picker/storybook/stories.ts +3 -1
- package/ui.form-date-picker/storybook/stories.ts +1 -1
- package/ui.form-date-picker-range/storybook/stories.ts +3 -1
- package/ui.form-input/storybook/stories.ts +3 -1
- package/ui.form-input-file/storybook/stories.ts +3 -1
- package/ui.form-input-money/storybook/stories.ts +3 -1
- package/ui.form-input-number/storybook/stories.ts +3 -1
- package/ui.form-input-rating/storybook/stories.ts +3 -1
- package/ui.form-input-search/storybook/stories.ts +3 -1
- package/ui.form-label/ULabel.vue +1 -1
- package/ui.form-label/storybook/stories.ts +3 -1
- package/ui.form-radio/storybook/stories.ts +3 -1
- package/ui.form-radio-group/storybook/stories.ts +3 -1
- package/ui.form-select/USelect.vue +535 -682
- package/ui.form-select/{config.js → config.ts} +2 -1
- package/ui.form-select/{constants.js → constants.ts} +0 -5
- package/ui.form-select/storybook/Docs.mdx +2 -2
- package/ui.form-select/storybook/{stories.js → stories.ts} +23 -13
- package/ui.form-select/types.ts +134 -0
- package/ui.form-select/utilSelect.ts +122 -0
- package/ui.form-switch/storybook/stories.ts +3 -1
- package/ui.form-textarea/storybook/stories.ts +3 -1
- package/ui.image-avatar/storybook/stories.ts +3 -1
- package/ui.image-icon/storybook/stories.ts +3 -1
- package/ui.loader/storybook/stories.ts +3 -1
- package/ui.loader-overlay/storybook/stories.ts +1 -1
- package/ui.loader-progress/storybook/stories.ts +3 -1
- package/ui.navigation-progress/storybook/stories.ts +3 -1
- package/ui.navigation-tab/storybook/stories.ts +3 -1
- package/ui.navigation-tabs/storybook/stories.ts +3 -1
- package/ui.other-dot/storybook/stories.ts +3 -1
- package/ui.text-alert/storybook/stories.ts +3 -1
- package/ui.text-badge/storybook/stories.ts +3 -1
- package/ui.text-block/storybook/stories.ts +3 -1
- package/ui.text-empty/storybook/stories.ts +3 -1
- package/ui.text-file/storybook/stories.ts +3 -1
- package/ui.text-files/storybook/stories.ts +3 -1
- package/ui.text-header/storybook/stories.ts +3 -1
- package/ui.text-money/storybook/stories.ts +3 -1
- package/ui.text-notify/storybook/stories.ts +1 -1
- package/utils/storybook.ts +3 -5
- package/web-types.json +77 -35
- package/ui.form-select/utilSelect.js +0 -100
package/composables/useUI.ts
CHANGED
|
@@ -112,23 +112,25 @@ export default function useUI<T>(
|
|
|
112
112
|
const extendsKeys = getExtendsKeys(baseClasses);
|
|
113
113
|
|
|
114
114
|
if (extendsKeys.length) {
|
|
115
|
-
const extendsClasses = extendsKeys.map((key) => toValue(getClasses(key, mutatedProps)));
|
|
116
|
-
|
|
117
115
|
const keyAttrs = keysAttrs[`${key}Attrs`];
|
|
118
116
|
|
|
119
|
-
keysAttrs[`${key}Attrs`] = computed(() =>
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
keyAttrs.value
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
117
|
+
keysAttrs[`${key}Attrs`] = computed(() => {
|
|
118
|
+
const extendsClasses = extendsKeys.map((key) => toValue(getClasses(key, mutatedProps)));
|
|
119
|
+
|
|
120
|
+
return {
|
|
121
|
+
...keyAttrs.value,
|
|
122
|
+
class: cx([
|
|
123
|
+
...extendsClasses,
|
|
124
|
+
keyAttrs.value.class?.replaceAll(EXTENDS_PATTERN_REG_EXP, ""),
|
|
125
|
+
]),
|
|
126
|
+
// TODO: Add ability to merge array of keys
|
|
127
|
+
config: getMergedConfig({
|
|
128
|
+
defaultConfig: config.value[extendsKeys[0]],
|
|
129
|
+
globalConfig: keyAttrs.value.config,
|
|
130
|
+
propsConfig: propsConfig[extendsKeys[0]],
|
|
131
|
+
}),
|
|
132
|
+
};
|
|
133
|
+
}) as ComputedRef<KeyAttrsWithConfig<T>>;
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -54,6 +54,7 @@ import UInputSearchConfig from "./ui.form-input-search/config.ts";
|
|
|
54
54
|
import UInputFileConfig from "./ui.form-input-file/config.ts";
|
|
55
55
|
import UInputMoneyConfig from "./ui.form-input-money/config.ts";
|
|
56
56
|
import UDataListConfig from "./ui.data-list/config.ts";
|
|
57
|
+
import USelectConfig from "./ui.form-select/config.ts";
|
|
57
58
|
|
|
58
59
|
import type { ComputedRef, Ref, ComponentInternalInstance } from "vue";
|
|
59
60
|
import type { Props } from "tippy.js";
|
|
@@ -224,6 +225,7 @@ export interface Components {
|
|
|
224
225
|
UInputFile: Partial<typeof UInputFileConfig>;
|
|
225
226
|
UInputMoney: Partial<typeof UInputMoneyConfig>;
|
|
226
227
|
UDataList: Partial<typeof UDataListConfig>;
|
|
228
|
+
USelect: Partial<typeof USelectConfig>;
|
|
227
229
|
}
|
|
228
230
|
|
|
229
231
|
/* Make all config keys optional and allow to have string and object values. */
|
|
@@ -13,7 +13,7 @@ export interface BaseOption {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface Option extends BaseOption {
|
|
16
|
-
[key: string]: string | number | boolean | UnknownObject | OnClickOption | undefined;
|
|
16
|
+
[key: string]: string | number | boolean | UnknownObject | Option[] | OnClickOption | undefined;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export interface Props {
|
package/ui.form-label/ULabel.vue
CHANGED