vueless 1.2.15-beta.2 → 1.2.15-beta.4
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/bin/commands/copy.js +1 -1
- package/composables/tests/useUI.test.ts +1 -1
- package/composables/useBreakpoint.ts +1 -1
- package/composables/useUI.ts +1 -5
- package/constants.d.ts +1 -1
- package/constants.js +1 -1
- package/index.d.ts +3 -3
- package/index.ts +3 -3
- package/locales/en.json +1 -1
- package/package.json +1 -1
- package/types.ts +2 -2
- package/ui.boilerplate/UBoilerplate.vue +1 -1
- package/ui.button/UButton.vue +1 -1
- package/ui.button-link/ULink.vue +1 -1
- package/ui.button-toggle/UToggle.vue +1 -1
- package/ui.container-accordion/UAccordion.vue +1 -1
- package/ui.container-accordion-item/UAccordionItem.vue +2 -6
- package/ui.container-accordion-item/tests/UAccordionItem.test.ts +5 -5
- package/ui.container-card/UCard.vue +1 -1
- package/ui.container-col/UCol.vue +1 -1
- package/ui.container-divider/UDivider.vue +1 -1
- package/ui.container-drawer/UDrawer.vue +1 -1
- package/ui.container-group/UGroup.vue +1 -1
- package/ui.container-groups/UGroups.vue +1 -1
- package/ui.container-modal/UModal.vue +1 -1
- package/ui.container-modal-confirm/UModalConfirm.vue +1 -1
- package/ui.container-page/UPage.vue +1 -1
- package/ui.container-page/config.ts +3 -3
- package/ui.container-row/URow.vue +1 -1
- package/ui.data-list/UDataList.vue +1 -1
- package/ui.data-list/config.ts +1 -1
- package/ui.data-table/UTable.vue +1 -1
- package/ui.data-table/UTableRow.vue +1 -1
- package/ui.data-table/config.ts +2 -0
- package/ui.data-table/storybook/stories.ts +3 -1
- package/ui.dropdown-badge/UDropdownBadge.vue +1 -1
- package/ui.dropdown-button/UDropdownButton.vue +1 -1
- package/ui.dropdown-link/UDropdownLink.vue +1 -1
- package/ui.form-calendar/UCalendar.vue +5 -1
- package/ui.form-calendar/UCalendarDayView.vue +1 -1
- package/ui.form-calendar/UCalendarMonthView.vue +1 -1
- package/ui.form-calendar/UCalendarYearView.vue +1 -1
- package/ui.form-calendar/config.ts +5 -0
- package/ui.form-checkbox/UCheckbox.vue +24 -5
- package/ui.form-checkbox/config.ts +4 -0
- package/ui.form-checkbox/tests/UCheckbox.test.ts +1 -1
- package/ui.form-checkbox-group/UCheckboxGroup.vue +1 -1
- package/ui.form-checkbox-multi-state/UCheckboxMultiState.vue +1 -1
- package/{ui.form-color-picker/UColorPicker.vue → ui.form-color-toggle/UColorToggle.vue} +1 -1
- package/{ui.form-color-picker → ui.form-color-toggle}/constants.ts +1 -1
- package/{ui.form-color-picker → ui.form-color-toggle}/storybook/stories.ts +14 -14
- package/{ui.form-color-picker/tests/UColorPicker.test.ts → ui.form-color-toggle/tests/UColorToggle.test.ts} +8 -8
- package/ui.form-date-picker/UDatePicker.vue +1 -1
- package/ui.form-date-picker/config.ts +5 -0
- package/ui.form-date-picker-range/UDatePickerRange.vue +1 -1
- package/ui.form-input/UInput.vue +10 -4
- package/ui.form-input-counter/UInputCounter.vue +10 -1
- package/ui.form-input-counter/config.ts +5 -0
- package/ui.form-input-file/UInputFile.vue +1 -1
- package/ui.form-input-number/UInputNumber.vue +1 -1
- package/ui.form-input-password/UInputPassword.vue +12 -13
- package/ui.form-input-password/tests/UInputPassword.test.ts +2 -2
- package/ui.form-input-rating/UInputRating.vue +1 -1
- package/ui.form-input-search/UInputSearch.vue +1 -1
- package/ui.form-label/ULabel.vue +6 -2
- package/ui.form-label/types.ts +5 -0
- package/ui.form-listbox/UListbox.vue +38 -12
- package/ui.form-radio/URadio.vue +1 -1
- package/ui.form-radio-group/URadioGroup.vue +1 -1
- package/ui.form-select/USelect.vue +38 -3
- package/ui.form-select/tests/USelect.test.ts +3 -1
- package/ui.form-switch/USwitch.vue +21 -8
- package/ui.form-switch/config.ts +2 -0
- package/ui.form-switch/tests/USwitch.test.ts +6 -4
- package/ui.form-textarea/UTextarea.vue +16 -6
- package/ui.form-textarea/tests/UTextarea.test.ts +1 -1
- package/ui.image-avatar/UAvatar.vue +1 -1
- package/ui.image-icon/UIcon.vue +1 -1
- package/ui.loader/ULoader.vue +1 -1
- package/ui.loader-overlay/ULoaderOverlay.vue +1 -1
- package/ui.loader-progress/ULoaderProgress.vue +1 -1
- package/ui.navigation-breadcrumbs/UBreadcrumbs.vue +1 -1
- package/ui.navigation-pagination/UPagination.vue +15 -1
- package/ui.navigation-pagination/config.ts +9 -0
- package/ui.navigation-progress/UProgress.vue +1 -1
- package/ui.navigation-progress/UStepperProgress.vue +1 -1
- package/ui.navigation-tab/UTab.vue +1 -1
- package/ui.navigation-tabs/UTabs.vue +1 -1
- package/ui.other-chip/UChip.vue +1 -1
- package/ui.other-dot/UDot.vue +1 -1
- package/ui.other-theme-color-toggle/UThemeColorToggle.vue +4 -4
- package/ui.other-theme-color-toggle/config.ts +2 -2
- package/ui.other-theme-color-toggle/tests/UThemeColorToggle.test.ts +10 -10
- package/ui.skeleton/USkeleton.vue +1 -1
- package/ui.skeleton-choice/USkeletonChoice.vue +1 -1
- package/ui.skeleton-input/USkeletonInput.vue +1 -1
- package/ui.skeleton-text/USkeletonText.vue +1 -1
- package/ui.text-alert/UAlert.vue +9 -1
- package/ui.text-alert/config.ts +4 -0
- package/ui.text-badge/UBadge.vue +1 -1
- package/ui.text-block/UText.vue +1 -1
- package/ui.text-block/config.ts +5 -4
- package/ui.text-empty/UEmpty.vue +1 -1
- package/ui.text-file/UFile.vue +1 -1
- package/ui.text-files/UFiles.vue +1 -1
- package/ui.text-header/UHeader.vue +1 -1
- package/ui.text-notify/UNotify.vue +1 -1
- package/ui.text-number/UNumber.vue +1 -1
- /package/{ui.form-color-picker → ui.form-color-toggle}/config.ts +0 -0
- /package/{ui.form-color-picker → ui.form-color-toggle}/storybook/docs.mdx +0 -0
- /package/{ui.form-color-picker → ui.form-color-toggle}/types.ts +0 -0
package/bin/commands/copy.js
CHANGED
|
@@ -44,7 +44,6 @@ export async function copyVuelessComponent(options) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
const absoluteSourcePath = path.join(cwd(), VUELESS_PACKAGE_DIR, COMPONENTS[componentName]);
|
|
47
|
-
|
|
48
47
|
const absoluteDestPath = path.join(cwd(), VUELESS_USER_COMPONENTS_DIR, newComponentName);
|
|
49
48
|
|
|
50
49
|
if (existsSync(absoluteDestPath)) {
|
|
@@ -119,6 +118,7 @@ async function modifyCreatedComponent(destPath, componentName, newComponentName)
|
|
|
119
118
|
// saving indexes
|
|
120
119
|
const storyIdIndex = getStoryMetaKeyIndex(fileContent, "id");
|
|
121
120
|
const storyTitleIndex = getStoryMetaKeyIndex(fileContent, "title");
|
|
121
|
+
|
|
122
122
|
const componentImportIndex = lines.findIndex(
|
|
123
123
|
(line) => line.includes(componentName) && line.includes("import"),
|
|
124
124
|
);
|
|
@@ -53,7 +53,7 @@ vi.mock("vue", async () => {
|
|
|
53
53
|
};
|
|
54
54
|
});
|
|
55
55
|
|
|
56
|
-
import useUI from "../useUI";
|
|
56
|
+
import { useUI } from "../useUI";
|
|
57
57
|
import * as uiUtils from "../../utils/ui";
|
|
58
58
|
import { getCurrentInstance, useAttrs } from "vue";
|
|
59
59
|
import type { UnknownObject } from "../../types";
|
package/composables/useUI.ts
CHANGED
|
@@ -32,11 +32,7 @@ import type {
|
|
|
32
32
|
* 3. Component config (:config="{...}" props)
|
|
33
33
|
* 4. Component classes (class="...")
|
|
34
34
|
*/
|
|
35
|
-
export
|
|
36
|
-
defaultConfig: T,
|
|
37
|
-
mutatedProps?: MutatedProps,
|
|
38
|
-
topLevelClassKey?: string,
|
|
39
|
-
) {
|
|
35
|
+
export function useUI<T>(defaultConfig: T, mutatedProps?: MutatedProps, topLevelClassKey?: string) {
|
|
40
36
|
const { type, props, parent } = getCurrentInstance() as VuelessComponentInstance;
|
|
41
37
|
|
|
42
38
|
const componentName = type?.internal
|
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
|
@@ -272,7 +272,7 @@ export const COMPONENTS = {
|
|
|
272
272
|
UCalendar: "ui.form-calendar",
|
|
273
273
|
UDatePicker: "ui.form-date-picker",
|
|
274
274
|
UDatePickerRange: "ui.form-date-picker-range",
|
|
275
|
-
|
|
275
|
+
UColorToggle: "ui.form-color-toggle",
|
|
276
276
|
ULabel: "ui.form-label",
|
|
277
277
|
|
|
278
278
|
/* Text & Content */
|
package/index.d.ts
CHANGED
|
@@ -26,10 +26,10 @@ export { createVuelessAdapter } from "./adapter.locale/vueless";
|
|
|
26
26
|
export { createVueI18nAdapter } from "./adapter.locale/vue-i18n";
|
|
27
27
|
/* composables */
|
|
28
28
|
export { useLocale } from "./composables/useLocale";
|
|
29
|
-
export {
|
|
29
|
+
export { useUI } from "./composables/useUI";
|
|
30
30
|
export { useDarkMode } from "./composables/useDarkMode";
|
|
31
31
|
export { useRequestQueue } from "./composables/useRequestQueue";
|
|
32
|
-
export {
|
|
32
|
+
export { useBreakpoint } from "./composables/useBreakpoint";
|
|
33
33
|
export { useLoaderOverlay } from "./ui.loader-overlay/useLoaderOverlay";
|
|
34
34
|
export { useLoaderProgress } from "./ui.loader-progress/useLoaderProgress";
|
|
35
35
|
export { useMutationObserver } from "./composables/useMutationObserver";
|
|
@@ -81,7 +81,7 @@ export { default as URadioGroup } from "./ui.form-radio-group/URadioGroup.vue";
|
|
|
81
81
|
export { default as UCalendar } from "./ui.form-calendar/UCalendar.vue";
|
|
82
82
|
export { default as UDatePicker } from "./ui.form-date-picker/UDatePicker.vue";
|
|
83
83
|
export { default as UDatePickerRange } from "./ui.form-date-picker-range/UDatePickerRange.vue";
|
|
84
|
-
export { default as
|
|
84
|
+
export { default as UColorToggle } from "./ui.form-color-toggle/UColorToggle.vue";
|
|
85
85
|
export { default as ULabel } from "./ui.form-label/ULabel.vue";
|
|
86
86
|
/* Text & Content */
|
|
87
87
|
export { default as UHeader } from "./ui.text-header/UHeader.vue";
|
package/index.ts
CHANGED
|
@@ -32,10 +32,10 @@ export { createVuelessAdapter } from "./adapter.locale/vueless";
|
|
|
32
32
|
export { createVueI18nAdapter } from "./adapter.locale/vue-i18n";
|
|
33
33
|
/* composables */
|
|
34
34
|
export { useLocale } from "./composables/useLocale";
|
|
35
|
-
export {
|
|
35
|
+
export { useUI } from "./composables/useUI";
|
|
36
36
|
export { useDarkMode } from "./composables/useDarkMode";
|
|
37
37
|
export { useRequestQueue } from "./composables/useRequestQueue";
|
|
38
|
-
export {
|
|
38
|
+
export { useBreakpoint } from "./composables/useBreakpoint";
|
|
39
39
|
export { useLoaderOverlay } from "./ui.loader-overlay/useLoaderOverlay";
|
|
40
40
|
export { useLoaderProgress } from "./ui.loader-progress/useLoaderProgress";
|
|
41
41
|
export { useMutationObserver } from "./composables/useMutationObserver";
|
|
@@ -87,7 +87,7 @@ export { default as URadioGroup } from "./ui.form-radio-group/URadioGroup.vue";
|
|
|
87
87
|
export { default as UCalendar } from "./ui.form-calendar/UCalendar.vue";
|
|
88
88
|
export { default as UDatePicker } from "./ui.form-date-picker/UDatePicker.vue";
|
|
89
89
|
export { default as UDatePickerRange } from "./ui.form-date-picker-range/UDatePickerRange.vue";
|
|
90
|
-
export { default as
|
|
90
|
+
export { default as UColorToggle } from "./ui.form-color-toggle/UColorToggle.vue";
|
|
91
91
|
export { default as ULabel } from "./ui.form-label/ULabel.vue";
|
|
92
92
|
/* Text & Content */
|
|
93
93
|
export { default as UHeader } from "./ui.text-header/UHeader.vue";
|
package/locales/en.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"USelect":{"listIsEmpty":"List is empty.","noDataToShow":"No data to show.","clear":"clear","addMore":"Add more..."},"USwitch":{"inactive":"Off","active":"On"},"UInputFile":{"sizeError":"File size is too big.","formatError":"Format is not supported.","noFile":"No file selected","uploadFile":"Choose file"},"UListbox":{"noDataToShow":"No data to show.","add":"Add","search":"Search..."},"UModalConfirm":{"confirm":"Confirm","cancel":"Cancel"},"UTable":{"noData":"There is no data in the table."},"UCalendar":{"today":"Today","yesterday":"Yesterday","tomorrow":"Tomorrow","weekdays":{"shorthand":{"sunday":"Sun","monday":"Mon","tuesday":"Tue","wednesday":"Wed","thursday":"Thu","friday":"Fri","saturday":"Sat"},"longhand":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"},"userFormat":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"}},"months":{"shorthand":{"january":"Jan","february":"Feb","march":"Mar","april":"Apr","may":"May","june":"Jun","july":"Jul","august":"Aug","september":"Sep","october":"Oct","november":"Nov","december":"Dec"},"longhand":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"},"userFormat":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"}},"timeLabel":"Time","okLabel":"Ok"},"UDatePicker":{"today":"Today","yesterday":"Yesterday","tomorrow":"Tomorrow","weekdays":{"shorthand":{"sunday":"Sun","monday":"Mon","tuesday":"Tue","wednesday":"Wed","thursday":"Thu","friday":"Fri","saturday":"Sat"},"longhand":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"},"userFormat":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"}},"months":{"shorthand":{"january":"Jan","february":"Feb","march":"Mar","april":"Apr","may":"May","june":"Jun","july":"Jul","august":"Aug","september":"Sep","october":"Oct","november":"Nov","december":"Dec"},"longhand":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"},"userFormat":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"}},"timeLabel":"Time","okLabel":"Ok"},"UDatePickerRange":{"ownRange":"Own range","week":"Week","month":"Month","quarter":"Quarter","year":"Year","dateFormatWithDot":"The date should be in format 'dd.mm.yyyy'.","notCorrectMonthNumber":"Wrong month number.","notCorrectDayNumber":"Wrong day in month.","fromDateGraterThanSecond":"The 'from' date should be less than the 'to' date.","toDateSmallerThanFirst":"The 'to' date should be greater than the 'from' date.","today":"Today","yesterday":"Yesterday","tomorrow":"Tomorrow","weekdays":{"shorthand":{"sunday":"Sun","monday":"Mon","tuesday":"Tue","wednesday":"Wed","thursday":"Thu","friday":"Fri","saturday":"Sat"},"longhand":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"},"userFormat":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"}},"months":{"shorthand":{"january":"Jan","february":"Feb","march":"Mar","april":"Apr","may":"May","june":"Jun","july":"Jul","august":"Aug","september":"Sep","october":"Oct","november":"Nov","december":"Dec"},"longhand":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"},"userFormat":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"}}},"UDataList":{"emptyTitle":"","emptyDescription":"There is no data in the list."},"UNotify":{"success":{"default":"Operation successful."},"warning":{"default":"Operation warning."},"error":{"default":"Operation error."}}}
|
|
1
|
+
{"USelect":{"listIsEmpty":"List is empty.","noDataToShow":"No data to show.","clear":"clear","addMore":"Add more..."},"USwitch":{"switch":"Switch","inactive":"Off","active":"On"},"UInputFile":{"sizeError":"File size is too big.","formatError":"Format is not supported.","noFile":"No file selected","uploadFile":"Choose file"},"UListbox":{"noDataToShow":"No data to show.","add":"Add","search":"Search..."},"UModalConfirm":{"confirm":"Confirm","cancel":"Cancel"},"UTable":{"noData":"There is no data in the table.","checkbox":"Checkbox"},"UCalendar":{"today":"Today","yesterday":"Yesterday","tomorrow":"Tomorrow","weekdays":{"shorthand":{"sunday":"Sun","monday":"Mon","tuesday":"Tue","wednesday":"Wed","thursday":"Thu","friday":"Fri","saturday":"Sat"},"longhand":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"},"userFormat":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"}},"months":{"shorthand":{"january":"Jan","february":"Feb","march":"Mar","april":"Apr","may":"May","june":"Jun","july":"Jul","august":"Aug","september":"Sep","october":"Oct","november":"Nov","december":"Dec"},"longhand":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"},"userFormat":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"}},"timeLabel":"Time","okLabel":"Ok","previousYear":"Previous Year","nextYear":"Next Year","previousMonth":"Previous Month","nextMonth":"Next Month"},"UDatePicker":{"today":"Today","yesterday":"Yesterday","tomorrow":"Tomorrow","weekdays":{"shorthand":{"sunday":"Sun","monday":"Mon","tuesday":"Tue","wednesday":"Wed","thursday":"Thu","friday":"Fri","saturday":"Sat"},"longhand":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"},"userFormat":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"}},"months":{"shorthand":{"january":"Jan","february":"Feb","march":"Mar","april":"Apr","may":"May","june":"Jun","july":"Jul","august":"Aug","september":"Sep","october":"Oct","november":"Nov","december":"Dec"},"longhand":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"},"userFormat":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"}},"timeLabel":"Time","okLabel":"Ok","previousYear":"Previous Year","nextYear":"Next Year","previousMonth":"Previous Month","nextMonth":"Next Month"},"UDatePickerRange":{"ownRange":"Own range","week":"Week","month":"Month","quarter":"Quarter","year":"Year","dateFormatWithDot":"The date should be in format 'dd.mm.yyyy'.","notCorrectMonthNumber":"Wrong month number.","notCorrectDayNumber":"Wrong day in month.","fromDateGraterThanSecond":"The 'from' date should be less than the 'to' date.","toDateSmallerThanFirst":"The 'to' date should be greater than the 'from' date.","today":"Today","yesterday":"Yesterday","tomorrow":"Tomorrow","weekdays":{"shorthand":{"sunday":"Sun","monday":"Mon","tuesday":"Tue","wednesday":"Wed","thursday":"Thu","friday":"Fri","saturday":"Sat"},"longhand":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"},"userFormat":{"sunday":"Sunday","monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday"}},"months":{"shorthand":{"january":"Jan","february":"Feb","march":"Mar","april":"Apr","may":"May","june":"Jun","july":"Jul","august":"Aug","september":"Sep","october":"Oct","november":"Nov","december":"Dec"},"longhand":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"},"userFormat":{"january":"January","february":"February","march":"March","april":"April","may":"May","june":"June","july":"July","august":"August","september":"September","october":"October","november":"November","december":"December"}}},"UDataList":{"emptyTitle":"","emptyDescription":"There is no data in the list."},"UNotify":{"success":{"default":"Operation successful."},"warning":{"default":"Operation warning."},"error":{"default":"Operation error."}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "1.2.15-beta.
|
|
3
|
+
"version": "1.2.15-beta.4",
|
|
4
4
|
"description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
|
|
5
5
|
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
6
6
|
"homepage": "https://vueless.com",
|
package/types.ts
CHANGED
|
@@ -48,7 +48,7 @@ import URadioGroupConfig from "./ui.form-radio-group/config";
|
|
|
48
48
|
import USwitchConfig from "./ui.form-switch/config";
|
|
49
49
|
import UTextareaConfig from "./ui.form-textarea/config";
|
|
50
50
|
import ULabelConfig from "./ui.form-label/config";
|
|
51
|
-
import
|
|
51
|
+
import UColorToggleConfig from "./ui.form-color-toggle/config";
|
|
52
52
|
import UInputConfig from "./ui.form-input/config";
|
|
53
53
|
import UInputCounterConfig from "./ui.form-input-counter/config";
|
|
54
54
|
import UInputPasswordConfig from "./ui.form-input-password/config";
|
|
@@ -315,7 +315,7 @@ export interface Components {
|
|
|
315
315
|
USwitch: Partial<typeof USwitchConfig>;
|
|
316
316
|
UTextarea: Partial<typeof UTextareaConfig>;
|
|
317
317
|
ULabel: Partial<typeof ULabelConfig>;
|
|
318
|
-
|
|
318
|
+
UColorToggle: Partial<typeof UColorToggleConfig>;
|
|
319
319
|
UInput: Partial<typeof UInputConfig>;
|
|
320
320
|
UInputCounter: Partial<typeof UInputCounterConfig>;
|
|
321
321
|
UInputPassword: Partial<typeof UInputPasswordConfig>;
|
package/ui.button/UButton.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, ref, watchEffect, useId, watch, useSlots, useTemplateRef } from "vue";
|
|
3
3
|
|
|
4
|
-
import useUI from "../composables/useUI";
|
|
4
|
+
import { useUI } from "../composables/useUI";
|
|
5
5
|
import { hasSlotContent } from "../utils/helper";
|
|
6
6
|
import { getDefaults } from "../utils/ui";
|
|
7
7
|
|
package/ui.button-link/ULink.vue
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { computed, useSlots, useTemplateRef } from "vue";
|
|
3
3
|
import { RouterLink } from "vue-router";
|
|
4
4
|
|
|
5
|
-
import useUI from "../composables/useUI";
|
|
5
|
+
import { useUI } from "../composables/useUI";
|
|
6
6
|
import { hasSlotContent } from "../utils/helper";
|
|
7
7
|
import { getDefaults } from "../utils/ui";
|
|
8
8
|
|
|
@@ -3,7 +3,7 @@ import { computed, ref, useId, useTemplateRef } from "vue";
|
|
|
3
3
|
|
|
4
4
|
import UButton from "../ui.button/UButton.vue";
|
|
5
5
|
|
|
6
|
-
import useUI from "../composables/useUI";
|
|
6
|
+
import { useUI } from "../composables/useUI";
|
|
7
7
|
import { getDefaults } from "../utils/ui";
|
|
8
8
|
|
|
9
9
|
import defaultConfig from "./config";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, provide, useTemplateRef, ref, watch, onMounted } from "vue";
|
|
3
3
|
|
|
4
|
-
import useUI from "../composables/useUI";
|
|
4
|
+
import { useUI } from "../composables/useUI";
|
|
5
5
|
import { getDefaults } from "../utils/ui";
|
|
6
6
|
|
|
7
7
|
import UAccordionItem from "../ui.container-accordion-item/UAccordionItem.vue";
|
|
@@ -3,7 +3,7 @@ import { computed, ref, inject, useId, useSlots, useTemplateRef, toValue, watchE
|
|
|
3
3
|
|
|
4
4
|
import { isEqual } from "lodash-es";
|
|
5
5
|
|
|
6
|
-
import useUI from "../composables/useUI";
|
|
6
|
+
import { useUI } from "../composables/useUI";
|
|
7
7
|
import { getDefaults } from "../utils/ui";
|
|
8
8
|
import { hasSlotContent } from "../utils/helper";
|
|
9
9
|
|
|
@@ -145,11 +145,7 @@ const {
|
|
|
145
145
|
</slot>
|
|
146
146
|
</div>
|
|
147
147
|
|
|
148
|
-
<div
|
|
149
|
-
v-if="description || hasSlotContent(slots['description'])"
|
|
150
|
-
:id="`description-${elementId}`"
|
|
151
|
-
v-bind="descriptionAttrs"
|
|
152
|
-
>
|
|
148
|
+
<div v-if="description || hasSlotContent(slots['description'])" v-bind="descriptionAttrs">
|
|
153
149
|
<!--
|
|
154
150
|
@slot Use it to add custom description content.
|
|
155
151
|
@binding {string} description
|
|
@@ -91,7 +91,7 @@ describe("UAccordionItem", () => {
|
|
|
91
91
|
},
|
|
92
92
|
});
|
|
93
93
|
|
|
94
|
-
expect(component.find(`[
|
|
94
|
+
expect(component.find(`[vl-key='description']`).exists()).toBe(true);
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
// DataTest prop
|
|
@@ -381,13 +381,13 @@ describe("UAccordionItem", () => {
|
|
|
381
381
|
},
|
|
382
382
|
});
|
|
383
383
|
|
|
384
|
-
expect(component.find("[
|
|
384
|
+
expect(component.find("[vl-key='description']").classes()).not.toContain("opacity-100");
|
|
385
385
|
|
|
386
386
|
await component.find(`.${slotClass}`).trigger("click");
|
|
387
|
-
expect(component.find("[
|
|
387
|
+
expect(component.find("[vl-key='description']").classes()).toContain("opacity-100");
|
|
388
388
|
|
|
389
389
|
await component.find(`.${slotClass}`).trigger("click");
|
|
390
|
-
expect(component.find("[
|
|
390
|
+
expect(component.find("[vl-key='description']").classes()).not.toContain("opacity-100");
|
|
391
391
|
});
|
|
392
392
|
|
|
393
393
|
it("description slot content is always visible when slot is provided", () => {
|
|
@@ -461,7 +461,7 @@ describe("UAccordionItem", () => {
|
|
|
461
461
|
},
|
|
462
462
|
});
|
|
463
463
|
|
|
464
|
-
const descriptionElement = component.find("[
|
|
464
|
+
const descriptionElement = component.find("[vl-key='description']");
|
|
465
465
|
|
|
466
466
|
// Initially not opened
|
|
467
467
|
expect(descriptionElement.classes()).not.toContain(openedClass);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, useSlots, useTemplateRef } from "vue";
|
|
3
3
|
|
|
4
|
-
import useUI from "../composables/useUI";
|
|
4
|
+
import { useUI } from "../composables/useUI";
|
|
5
5
|
import { hasSlotContent } from "../utils/helper";
|
|
6
6
|
import { getDefaults } from "../utils/ui";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, useSlots, watch, useId, useTemplateRef, nextTick, ref } from "vue";
|
|
3
3
|
|
|
4
|
-
import useUI from "../composables/useUI";
|
|
4
|
+
import { useUI } from "../composables/useUI";
|
|
5
5
|
import { getDefaults } from "../utils/ui";
|
|
6
6
|
import { hasSlotContent } from "../utils/helper";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, useSlots, watch, useId, useTemplateRef, nextTick, ref } from "vue";
|
|
3
3
|
|
|
4
|
-
import useUI from "../composables/useUI";
|
|
4
|
+
import { useUI } from "../composables/useUI";
|
|
5
5
|
import { getDefaults } from "../utils/ui";
|
|
6
6
|
import { hasSlotContent } from "../utils/helper";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, watch, useTemplateRef } from "vue";
|
|
3
3
|
|
|
4
|
-
import useUI from "../composables/useUI";
|
|
4
|
+
import { useUI } from "../composables/useUI";
|
|
5
5
|
import { getDefaults } from "../utils/ui";
|
|
6
6
|
import { hasSlotContent } from "../utils/helper";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, useSlots, onMounted, useTemplateRef } from "vue";
|
|
3
3
|
|
|
4
|
-
import useUI from "../composables/useUI";
|
|
4
|
+
import { useUI } from "../composables/useUI";
|
|
5
5
|
import { getDefaults } from "../utils/ui";
|
|
6
6
|
import { hasSlotContent } from "../utils/helper";
|
|
7
7
|
|
|
@@ -64,9 +64,9 @@ export default /*tw*/ {
|
|
|
64
64
|
description: "mt-1.5 text-large font-normal text-lifted",
|
|
65
65
|
actions: "",
|
|
66
66
|
body: "",
|
|
67
|
-
footer: "mb-0 mt-14 justify-between pt-8 md:flex
|
|
68
|
-
footerLeft: "md:flex
|
|
69
|
-
footerRight: "md:flex
|
|
67
|
+
footer: "mb-0 mt-14 justify-between pt-8 md:flex gap-4 md:gap-0 md:items-baseline border-t border-muted",
|
|
68
|
+
footerLeft: "md:flex gap-4",
|
|
69
|
+
footerRight: "md:flex gap-4",
|
|
70
70
|
defaults: {
|
|
71
71
|
variant: "solid",
|
|
72
72
|
size: "wide",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useTemplateRef } from "vue";
|
|
3
3
|
import draggable from "vuedraggable/src/vuedraggable";
|
|
4
4
|
|
|
5
|
-
import useUI from "../composables/useUI";
|
|
5
|
+
import { useUI } from "../composables/useUI";
|
|
6
6
|
import { getDefaults } from "../utils/ui";
|
|
7
7
|
import { hasSlotContent } from "../utils/helper";
|
|
8
8
|
|
package/ui.data-list/config.ts
CHANGED
|
@@ -42,7 +42,7 @@ export default /*tw*/ {
|
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
labelCrossed: "{>label} line-through",
|
|
45
|
-
customActions: "
|
|
45
|
+
customActions: "flex items-center gap-5 opacity-50 md:opacity-0 group-hover/item:opacity-100",
|
|
46
46
|
divider: "{UDivider}",
|
|
47
47
|
empty: "{UEmpty}",
|
|
48
48
|
nested: "{UDataList} group/nested ml-6",
|
package/ui.data-table/UTable.vue
CHANGED
|
@@ -18,7 +18,7 @@ import ULoaderProgress from "../ui.loader-progress/ULoaderProgress.vue";
|
|
|
18
18
|
import UTableRow from "./UTableRow.vue";
|
|
19
19
|
import UDivider from "../ui.container-divider/UDivider.vue";
|
|
20
20
|
|
|
21
|
-
import useUI from "../composables/useUI";
|
|
21
|
+
import { useUI } from "../composables/useUI";
|
|
22
22
|
import { getDefaults, cx, getMergedConfig } from "../utils/ui";
|
|
23
23
|
import { hasSlotContent } from "../utils/helper";
|
|
24
24
|
import { useComponentLocaleMessages } from "../composables/useComponentLocaleMassages";
|
|
@@ -7,7 +7,7 @@ import { PX_IN_REM } from "../constants";
|
|
|
7
7
|
import { mapRowColumns } from "./utilTable";
|
|
8
8
|
|
|
9
9
|
import { useMutationObserver } from "../composables/useMutationObserver";
|
|
10
|
-
import useUI from "../composables/useUI";
|
|
10
|
+
import { useUI } from "../composables/useUI";
|
|
11
11
|
|
|
12
12
|
import UIcon from "../ui.image-icon/UIcon.vue";
|
|
13
13
|
import UCheckbox from "../ui.form-checkbox/UCheckbox.vue";
|
package/ui.data-table/config.ts
CHANGED
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
} from "../../utils/storybook";
|
|
8
8
|
import { getRandomId } from "../../utils/helper";
|
|
9
9
|
|
|
10
|
+
import defaultConfig from "../config";
|
|
11
|
+
|
|
10
12
|
import UTable from "../UTable.vue";
|
|
11
13
|
import UButton from "../../ui.button/UButton.vue";
|
|
12
14
|
import ULink from "../../ui.button-link/ULink.vue";
|
|
@@ -731,7 +733,7 @@ export const EmptyStateSlot = DefaultTemplate.bind({});
|
|
|
731
733
|
EmptyStateSlot.args = {
|
|
732
734
|
rows: [],
|
|
733
735
|
config: {
|
|
734
|
-
i18n: { noData: "Fetching data..." },
|
|
736
|
+
i18n: { ...defaultConfig.i18n, noData: "Fetching data..." },
|
|
735
737
|
bodyEmptyStateCell: "py-10",
|
|
736
738
|
},
|
|
737
739
|
slotTemplate: `
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ref, computed, nextTick, useId, useTemplateRef } from "vue";
|
|
3
3
|
import { isEqual } from "lodash-es";
|
|
4
4
|
|
|
5
|
-
import useUI from "../composables/useUI";
|
|
5
|
+
import { useUI } from "../composables/useUI";
|
|
6
6
|
import { getDefaults } from "../utils/ui";
|
|
7
7
|
|
|
8
8
|
import UIcon from "../ui.image-icon/UIcon.vue";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { nextTick, computed, ref, useId, useTemplateRef } from "vue";
|
|
3
3
|
import { isEqual } from "lodash-es";
|
|
4
4
|
|
|
5
|
-
import useUI from "../composables/useUI";
|
|
5
|
+
import { useUI } from "../composables/useUI";
|
|
6
6
|
import { getDefaults } from "../utils/ui";
|
|
7
7
|
|
|
8
8
|
import UIcon from "../ui.image-icon/UIcon.vue";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { nextTick, computed, ref, useId, useTemplateRef } from "vue";
|
|
3
3
|
import { isEqual } from "lodash-es";
|
|
4
4
|
|
|
5
|
-
import useUI from "../composables/useUI";
|
|
5
|
+
import { useUI } from "../composables/useUI";
|
|
6
6
|
import { getDefaults } from "../utils/ui";
|
|
7
7
|
|
|
8
8
|
import UIcon from "../ui.image-icon/UIcon.vue";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts" generic="TModelValue extends DateValue">
|
|
2
2
|
import { computed, ref, watch, useTemplateRef, nextTick, onMounted } from "vue";
|
|
3
3
|
|
|
4
|
-
import useUI from "../composables/useUI";
|
|
4
|
+
import { useUI } from "../composables/useUI";
|
|
5
5
|
import { getDefaults } from "../utils/ui";
|
|
6
6
|
import { isRangeDate } from "./types";
|
|
7
7
|
|
|
@@ -829,6 +829,7 @@ const {
|
|
|
829
829
|
color="grayscale"
|
|
830
830
|
variant="ghost"
|
|
831
831
|
:icon="config.defaults.prevYearIcon"
|
|
832
|
+
:aria-label="localeMessages.previousYear"
|
|
832
833
|
v-bind="nextPrevButtonAttrs"
|
|
833
834
|
:data-test="getDataTest('prev-year')"
|
|
834
835
|
@mousedown.prevent.capture
|
|
@@ -841,6 +842,7 @@ const {
|
|
|
841
842
|
color="grayscale"
|
|
842
843
|
variant="ghost"
|
|
843
844
|
:icon="config.defaults.prevIcon"
|
|
845
|
+
:aria-label="localeMessages.previousMonth"
|
|
844
846
|
v-bind="nextPrevButtonAttrs"
|
|
845
847
|
:data-test="getDataTest('prev')"
|
|
846
848
|
@mousedown.prevent.capture
|
|
@@ -866,6 +868,7 @@ const {
|
|
|
866
868
|
color="grayscale"
|
|
867
869
|
variant="ghost"
|
|
868
870
|
:icon="config.defaults.nextIcon"
|
|
871
|
+
:aria-label="localeMessages.nextMonth"
|
|
869
872
|
v-bind="nextPrevButtonAttrs"
|
|
870
873
|
:data-test="getDataTest('next')"
|
|
871
874
|
@mousedown.prevent.capture
|
|
@@ -879,6 +882,7 @@ const {
|
|
|
879
882
|
color="grayscale"
|
|
880
883
|
variant="ghost"
|
|
881
884
|
:icon="config.defaults.nextYearIcon"
|
|
885
|
+
:aria-label="localeMessages.nextYear"
|
|
882
886
|
v-bind="nextPrevButtonAttrs"
|
|
883
887
|
:data-test="getDataTest('next-year')"
|
|
884
888
|
@mousedown.prevent.capture
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
|
|
4
|
-
import useUI from "../composables/useUI";
|
|
4
|
+
import { useUI } from "../composables/useUI";
|
|
5
5
|
|
|
6
6
|
import { formatDate, dateIsOutOfRange } from "./utilCalendar";
|
|
7
7
|
import { isSameMonth, isCurrentMonth } from "./utilDate";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { ref, watch } from "vue";
|
|
3
3
|
|
|
4
|
-
import useUI from "../composables/useUI";
|
|
4
|
+
import { useUI } from "../composables/useUI";
|
|
5
5
|
|
|
6
6
|
import { formatDate, dateIsOutOfRange } from "./utilCalendar";
|
|
7
7
|
import { isSameMonth, isCurrentYear } from "./utilDate";
|
|
@@ -144,6 +144,11 @@ export default /*tw*/ {
|
|
|
144
144
|
},
|
|
145
145
|
timeLabel: "Time",
|
|
146
146
|
okLabel: "Ok",
|
|
147
|
+
/* These are used for a11y. */
|
|
148
|
+
previousYear: "Previous Year",
|
|
149
|
+
nextYear: "Next Year",
|
|
150
|
+
previousMonth: "Previous Month",
|
|
151
|
+
nextMonth: "Next Month",
|
|
147
152
|
},
|
|
148
153
|
defaults: {
|
|
149
154
|
userDateFormat: "j F, Y",
|