@volverjs/ui-vue 0.0.10-beta.3 → 0.0.10-beta.31
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/LICENSE +1 -1
- package/README.md +106 -10
- package/auto-imports.d.ts +7 -2
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +22 -15
- package/dist/Volver.d.ts +1 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +192 -103
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +160 -8
- package/dist/components/VvAccordion/index.d.ts +8 -9
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +451 -172
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +58 -13
- package/dist/components/VvAccordionGroup/index.d.ts +14 -6
- package/dist/components/VvAction/VvAction.es.js +78 -27
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +57 -22
- package/dist/components/VvAction/index.d.ts +25 -9
- package/dist/components/VvAlert/VvAlert.es.js +204 -171
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +24 -14
- package/dist/components/VvAlert/index.d.ts +17 -9
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +250 -188
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +16 -9
- package/dist/components/VvAlertGroup/index.d.ts +6 -14
- package/dist/components/VvAvatar/VvAvatar.es.js +61 -21
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +12 -4
- package/dist/components/VvAvatar/index.d.ts +4 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +118 -48
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +10 -3
- package/dist/components/VvAvatarGroup/index.d.ts +4 -1
- package/dist/components/VvBadge/VvBadge.es.js +78 -28
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +12 -4
- package/dist/components/VvBadge/index.d.ts +4 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +276 -60
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +27 -7
- package/dist/components/VvBreadcrumb/index.d.ts +6 -10
- package/dist/components/VvButton/VvButton.es.js +291 -252
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +94 -40
- package/dist/components/VvButton/index.d.ts +51 -29
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +81 -40
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +24 -11
- package/dist/components/VvButtonGroup/index.d.ts +8 -2
- package/dist/components/VvCard/VvCard.es.js +86 -36
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +12 -4
- package/dist/components/VvCard/index.d.ts +4 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +177 -120
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +105 -33
- package/dist/components/VvCheckbox/index.d.ts +47 -14
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -107
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +101 -30
- package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
- package/dist/components/VvCombobox/VvCombobox.es.js +806 -581
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +171 -104
- package/dist/components/VvCombobox/index.d.ts +62 -26
- package/dist/components/VvDialog/VvDialog.es.js +140 -153
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdown.es.js +138 -71
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +101 -75
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +66 -25
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +13 -1
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +35 -7
- package/dist/components/VvDropdown/index.d.ts +52 -10
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +152 -39
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +335 -8
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +63 -20
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +188 -80
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +23 -96
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
- package/dist/components/VvIcon/index.d.ts +33 -48
- package/dist/components/VvInputFile/VvInputFile.es.js +1777 -0
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +359 -0
- package/dist/components/VvInputFile/index.d.ts +200 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +7 -5
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
- package/dist/components/VvInputText/VvInputStepAction.d.ts +2 -2
- package/dist/components/VvInputText/VvInputText.es.js +1237 -324
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +207 -57
- package/dist/components/VvInputText/index.d.ts +99 -29
- package/dist/components/VvNav/VvNav.es.js +135 -56
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +32 -9
- package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
- package/dist/components/VvNav/index.d.ts +5 -2
- package/dist/components/VvNavItem/VvNavItem.es.js +91 -33
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.es.js +72 -26
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +10 -3
- package/dist/components/VvProgress/index.d.ts +4 -1
- package/dist/components/VvRadio/VvRadio.es.js +160 -103
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +103 -31
- package/dist/components/VvRadio/index.d.ts +50 -17
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -107
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +101 -30
- package/dist/components/VvRadioGroup/index.d.ts +45 -12
- package/dist/components/VvSelect/VvSelect.es.js +251 -238
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +117 -44
- package/dist/components/VvSelect/index.d.ts +48 -14
- package/dist/components/VvTab/VvTab.es.js +191 -75
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +31 -7
- package/dist/components/VvTab/index.d.ts +4 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +232 -224
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +156 -49
- package/dist/components/VvTextarea/index.d.ts +68 -19
- package/dist/components/VvTooltip/VvTooltip.es.js +79 -29
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +13 -6
- package/dist/components/VvTooltip/index.d.ts +5 -2
- package/dist/components/common/HintSlot.d.ts +1 -1
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.es.js +3534 -1650
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +99 -4
- package/dist/composables/alert/useInjectAlert.d.ts +1 -6
- package/dist/composables/dropdown/useInjectDropdown.d.ts +3 -23
- package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -4
- package/dist/composables/group/useInjectedGroupState.d.ts +4 -5
- package/dist/composables/group/useProvideGroupState.d.ts +3 -3
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.es.js +92 -3
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/useBlurhash.d.ts +7 -0
- package/dist/composables/useComponentIcon.d.ts +9 -8
- package/dist/composables/usePersistence.d.ts +2 -0
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/constants.d.ts +34 -32
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +99 -43
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +97 -38
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +267 -267
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +90 -16
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +272 -81
- package/dist/resolvers/unplugin.d.ts +6 -1
- package/dist/resolvers/unplugin.es.js +87 -10
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +143 -89
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1075 -492
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
- package/dist/stories/Button/Button.settings.d.ts +0 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
- package/dist/stories/Icon/Icon.settings.d.ts +1 -0
- package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
- package/dist/stories/InputFile/InputFile.stories.d.ts +12 -0
- package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
- package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
- package/dist/stories/Tab/Tab.settings.d.ts +2 -15
- package/dist/test/expect.d.ts +1 -1
- package/dist/types/alert.d.ts +9 -7
- package/dist/types/blurhash.d.ts +12 -0
- package/dist/types/generic.d.ts +1 -2
- package/dist/types/group.d.ts +37 -15
- package/dist/types/index.d.ts +7 -0
- package/dist/types/input-file.d.ts +16 -0
- package/dist/types/nav.d.ts +2 -2
- package/dist/utils/ObjectUtilities.d.ts +0 -1
- package/dist/workers/blurhash.d.ts +1 -0
- package/package.json +78 -78
- package/src/Volver.ts +31 -20
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +121 -58
- package/src/components/VvAccordion/index.ts +8 -23
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +164 -47
- package/src/components/VvAccordionGroup/index.ts +6 -6
- package/src/components/VvAction/VvAction.vue +17 -5
- package/src/components/VvAlert/index.ts +14 -9
- package/src/components/VvAlertGroup/index.ts +3 -15
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
- package/src/components/VvBreadcrumb/index.ts +2 -8
- package/src/components/VvButton/VvButton.vue +17 -7
- package/src/components/VvButton/index.ts +9 -16
- package/src/components/VvButtonGroup/VvButtonGroup.vue +1 -2
- package/src/components/VvCheckbox/index.ts +2 -2
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +1 -2
- package/src/components/VvCombobox/VvCombobox.vue +15 -12
- package/src/components/VvCombobox/index.ts +4 -0
- package/src/components/VvDropdown/VvDropdown.vue +11 -2
- package/src/components/VvDropdown/VvDropdownItem.vue +4 -1
- package/src/components/VvDropdown/VvDropdownOption.vue +4 -21
- package/src/components/VvDropdown/index.ts +35 -1
- package/src/components/VvIcon/VvIcon.vue +2 -2
- package/src/components/VvIcon/index.ts +35 -48
- package/src/components/VvInputFile/VvInputFile.vue +395 -0
- package/src/components/VvInputFile/index.ts +135 -0
- package/src/components/VvInputText/VvInputClearAction.ts +10 -6
- package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
- package/src/components/VvInputText/VvInputText.vue +141 -33
- package/src/components/VvInputText/index.ts +31 -16
- package/src/components/VvNav/VvNav.vue +4 -2
- package/src/components/VvRadio/index.ts +5 -5
- package/src/components/VvRadioGroup/VvRadioGroup.vue +1 -2
- package/src/components/VvSelect/VvSelect.vue +5 -8
- package/src/components/VvTab/VvTab.vue +5 -1
- package/src/components/VvTextarea/VvTextarea.vue +6 -9
- package/src/components/index.ts +10 -0
- package/src/composables/alert/useAlert.ts +12 -9
- package/src/composables/dropdown/useProvideDropdown.ts +4 -4
- package/src/composables/group/useInjectedGroupState.ts +20 -16
- package/src/composables/group/useProvideGroupState.ts +10 -15
- package/src/composables/index.ts +1 -0
- package/src/composables/useBlurhash.ts +76 -0
- package/src/composables/useComponentIcon.ts +15 -14
- package/src/composables/usePersistence.ts +76 -0
- package/src/composables/useUniqueId.ts +2 -2
- package/src/constants.ts +47 -32
- package/src/directives/index.ts +3 -6
- package/src/directives/v-tooltip.ts +19 -10
- package/src/index.ts +3 -1
- package/src/props/index.ts +108 -31
- package/src/resolvers/unplugin.ts +24 -14
- package/src/stories/Accordion/Accordion.test.ts +1 -1
- package/src/stories/AccordionGroup/AccordionGroup.settings.ts +2 -2
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +17 -11
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +1 -1
- package/src/stories/Alert/Alert.test.ts +1 -1
- package/src/stories/AlertGroup/AlertGroup.test.ts +1 -1
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
- package/src/stories/Avatar/Avatar.test.ts +1 -1
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
- package/src/stories/Badge/Badge.test.ts +1 -1
- package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
- package/src/stories/Button/Button.settings.ts +1 -4
- package/src/stories/Button/Button.test.ts +1 -1
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
- package/src/stories/Card/Card.test.ts +1 -1
- package/src/stories/Checkbox/Checkbox.test.ts +1 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +1 -1
- package/src/stories/Combobox/Combobox.settings.ts +8 -0
- package/src/stories/Combobox/Combobox.test.ts +1 -1
- package/src/stories/Dialog/Dialog.test.ts +2 -2
- package/src/stories/Dropdown/Dropdown.test.ts +1 -1
- package/src/stories/Icon/Icon.settings.ts +3 -3
- package/src/stories/InputFile/InputFile.settings.ts +36 -0
- package/src/stories/InputFile/InputFile.stories.ts +89 -0
- package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
- package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
- package/src/stories/InputText/InputText.test.ts +1 -1
- package/src/stories/Nav/Nav.test.ts +1 -1
- package/src/stories/Progress/Progress.test.ts +1 -1
- package/src/stories/Radio/Radio.test.ts +1 -1
- package/src/stories/RadioGroup/RadioGroup.test.ts +1 -1
- package/src/stories/Select/Select.test.ts +1 -1
- package/src/stories/Tab/Tab.settings.ts +2 -2
- package/src/stories/Tab/Tab.test.ts +1 -1
- package/src/stories/Textarea/Textarea.test.ts +1 -1
- package/src/stories/Tooltip/Tooltip.test.ts +1 -1
- package/src/stories/argTypes.ts +1 -1
- package/src/test/expect.ts +2 -4
- package/src/types/alert.ts +11 -7
- package/src/types/blurhash.ts +21 -0
- package/src/types/generic.ts +3 -3
- package/src/types/group.ts +22 -14
- package/src/types/index.ts +7 -0
- package/src/types/input-file.ts +18 -0
- package/src/types/nav.ts +2 -3
- package/src/utils/ObjectUtilities.ts +0 -11
- package/src/workers/blurhash.ts +9 -0
|
@@ -22,6 +22,11 @@ export interface VolverResolverOptions {
|
|
|
22
22
|
* @default undefined
|
|
23
23
|
*/
|
|
24
24
|
ignore?: string[];
|
|
25
|
+
/**
|
|
26
|
+
* cherry pick components from named exports
|
|
27
|
+
* @default undefined
|
|
28
|
+
*/
|
|
29
|
+
cherryPick?: boolean;
|
|
25
30
|
}
|
|
26
31
|
export declare const getStyleNames: (kebabName: string) => string[] | undefined;
|
|
27
32
|
/**
|
|
@@ -29,5 +34,5 @@ export declare const getStyleNames: (kebabName: string) => string[] | undefined;
|
|
|
29
34
|
*
|
|
30
35
|
* @link https://github.com/volverjs/ui-vue
|
|
31
36
|
*/
|
|
32
|
-
export declare function VolverResolver({ prefix, importStyle, directives, ignore, }?: VolverResolverOptions): ComponentResolver[];
|
|
37
|
+
export declare function VolverResolver({ prefix, importStyle, directives, ignore, cherryPick, }?: VolverResolverOptions): ComponentResolver[];
|
|
33
38
|
export {};
|
|
@@ -1,11 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const SPLIT_LOWER_UPPER_RE = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu");
|
|
2
|
+
const SPLIT_UPPER_UPPER_RE = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu");
|
|
3
|
+
const SPLIT_SEPARATE_NUMBER_RE = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u");
|
|
4
|
+
const DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
|
|
5
|
+
const SPLIT_REPLACE_VALUE = "$1\0$2";
|
|
6
|
+
const DEFAULT_PREFIX_SUFFIX_CHARACTERS = "";
|
|
7
|
+
function split(value) {
|
|
8
|
+
let result = value.trim();
|
|
9
|
+
result = result.replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);
|
|
10
|
+
result = result.replace(DEFAULT_STRIP_REGEXP, "\0");
|
|
11
|
+
let start = 0;
|
|
12
|
+
let end = result.length;
|
|
13
|
+
while (result.charAt(start) === "\0")
|
|
14
|
+
start++;
|
|
15
|
+
if (start === end)
|
|
16
|
+
return [];
|
|
17
|
+
while (result.charAt(end - 1) === "\0")
|
|
18
|
+
end--;
|
|
19
|
+
return result.slice(start, end).split(/\0/g);
|
|
20
|
+
}
|
|
21
|
+
function splitSeparateNumbers(value) {
|
|
22
|
+
const words = split(value);
|
|
23
|
+
for (let i = 0; i < words.length; i++) {
|
|
24
|
+
const word = words[i];
|
|
25
|
+
const match = SPLIT_SEPARATE_NUMBER_RE.exec(word);
|
|
26
|
+
if (match) {
|
|
27
|
+
const offset = match.index + (match[1] ?? match[2]).length;
|
|
28
|
+
words.splice(i, 1, word.slice(0, offset), word.slice(offset));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return words;
|
|
32
|
+
}
|
|
33
|
+
function noCase(input, options) {
|
|
34
|
+
const [prefix, words, suffix] = splitPrefixSuffix(input, options);
|
|
35
|
+
return prefix + words.map(lowerFactory(options == null ? void 0 : options.locale)).join((options == null ? void 0 : options.delimiter) ?? " ") + suffix;
|
|
36
|
+
}
|
|
37
|
+
function kebabCase(input, options) {
|
|
38
|
+
return noCase(input, { delimiter: "-", ...options });
|
|
39
|
+
}
|
|
40
|
+
function lowerFactory(locale) {
|
|
41
|
+
return locale === false ? (input) => input.toLowerCase() : (input) => input.toLocaleLowerCase(locale);
|
|
42
|
+
}
|
|
43
|
+
function splitPrefixSuffix(input, options = {}) {
|
|
44
|
+
const splitFn = options.split ?? (options.separateNumbers ? splitSeparateNumbers : split);
|
|
45
|
+
const prefixCharacters = options.prefixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
|
|
46
|
+
const suffixCharacters = options.suffixCharacters ?? DEFAULT_PREFIX_SUFFIX_CHARACTERS;
|
|
47
|
+
let prefixIndex = 0;
|
|
48
|
+
let suffixIndex = input.length;
|
|
49
|
+
while (prefixIndex < input.length) {
|
|
50
|
+
const char = input.charAt(prefixIndex);
|
|
51
|
+
if (!prefixCharacters.includes(char))
|
|
52
|
+
break;
|
|
53
|
+
prefixIndex++;
|
|
54
|
+
}
|
|
55
|
+
while (suffixIndex > prefixIndex) {
|
|
56
|
+
const index = suffixIndex - 1;
|
|
57
|
+
const char = input.charAt(index);
|
|
58
|
+
if (!suffixCharacters.includes(char))
|
|
59
|
+
break;
|
|
60
|
+
suffixIndex = index;
|
|
61
|
+
}
|
|
62
|
+
return [
|
|
63
|
+
input.slice(0, prefixIndex),
|
|
64
|
+
splitFn(input.slice(prefixIndex, suffixIndex)),
|
|
65
|
+
input.slice(suffixIndex)
|
|
66
|
+
];
|
|
5
67
|
}
|
|
6
68
|
const STYLE_EXCLUDE = ["vv-icon", "vv-action"];
|
|
7
69
|
const VOLVER_PREFIX = "vv";
|
|
8
|
-
const DIRECTIVES = ["v-tooltip"];
|
|
70
|
+
const DIRECTIVES = ["v-tooltip", "v-contextmenu"];
|
|
9
71
|
const getStyleNames = function(kebabName) {
|
|
10
72
|
if (STYLE_EXCLUDE.includes(kebabName)) {
|
|
11
73
|
return void 0;
|
|
@@ -61,7 +123,8 @@ function VolverResolver({
|
|
|
61
123
|
prefix = VOLVER_PREFIX,
|
|
62
124
|
importStyle,
|
|
63
125
|
directives,
|
|
64
|
-
ignore
|
|
126
|
+
ignore,
|
|
127
|
+
cherryPick
|
|
65
128
|
} = {}) {
|
|
66
129
|
return [
|
|
67
130
|
{
|
|
@@ -77,9 +140,16 @@ function VolverResolver({
|
|
|
77
140
|
if (ignore && ignore.includes(kebabName)) {
|
|
78
141
|
return;
|
|
79
142
|
}
|
|
143
|
+
if (cherryPick) {
|
|
144
|
+
return {
|
|
145
|
+
from: `@volverjs/ui-vue/${kebabName}`,
|
|
146
|
+
sideEffects: getSideEffects(kebabName, importStyle)
|
|
147
|
+
};
|
|
148
|
+
}
|
|
80
149
|
return {
|
|
81
|
-
from:
|
|
82
|
-
sideEffects: getSideEffects(kebabName, importStyle)
|
|
150
|
+
from: "@volverjs/ui-vue/components",
|
|
151
|
+
sideEffects: getSideEffects(kebabName, importStyle),
|
|
152
|
+
name
|
|
83
153
|
};
|
|
84
154
|
}
|
|
85
155
|
},
|
|
@@ -96,9 +166,16 @@ function VolverResolver({
|
|
|
96
166
|
if (ignore && ignore.includes(kebabName)) {
|
|
97
167
|
return;
|
|
98
168
|
}
|
|
169
|
+
if (cherryPick) {
|
|
170
|
+
return {
|
|
171
|
+
from: `@volverjs/ui-vue/${kebabName}`,
|
|
172
|
+
sideEffects: getSideEffects(kebabName, importStyle)
|
|
173
|
+
};
|
|
174
|
+
}
|
|
99
175
|
return {
|
|
100
|
-
from:
|
|
101
|
-
sideEffects: getSideEffects(kebabName, importStyle)
|
|
176
|
+
from: "@volverjs/ui-vue/directives",
|
|
177
|
+
sideEffects: getSideEffects(kebabName, importStyle),
|
|
178
|
+
name: `v${name}`
|
|
102
179
|
};
|
|
103
180
|
}
|
|
104
181
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(o
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).components={})}(this,(function(e){"use strict";const o=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),t=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),r=new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d","u"),n=/[^\p{L}\d]+/giu,i="$1\0$2",v="";function c(e){let r=e.trim();r=r.replace(o,i).replace(t,i),r=r.replace(n,"\0");let v=0,c=r.length;for(;"\0"===r.charAt(v);)v++;if(v===c)return[];for(;"\0"===r.charAt(c-1);)c--;return r.slice(v,c).split(/\0/g)}function s(e){const o=c(e);for(let t=0;t<o.length;t++){const e=o[t],n=r.exec(e);if(n){const r=n.index+(n[1]??n[2]).length;o.splice(t,1,e.slice(0,r),e.slice(r))}}return o}function u(e,o){const[t,r,n]=function(e,o={}){const t=o.split??(o.separateNumbers?s:c),r=o.prefixCharacters??v,n=o.suffixCharacters??v;let i=0,u=e.length;for(;i<e.length;){const o=e.charAt(i);if(!r.includes(o))break;i++}for(;u>i;){const o=u-1,t=e.charAt(o);if(!n.includes(t))break;u=o}return[e.slice(0,i),t(e.slice(i,u)),e.slice(u)]}(e,o);return t+r.map((i=null==o?void 0:o.locale,!1===i?e=>e.toLowerCase():e=>e.toLocaleLowerCase(i))).join((null==o?void 0:o.delimiter)??" ")+n;var i}function l(e,o){return u(e,{delimiter:"-",...o})}const p=["vv-icon","vv-action"],d=["v-tooltip","v-contextmenu"],f=function(e){if(!p.includes(e))return"vv-dropdown"===e?["vv-dropdown","vv-dropdown-option","vv-dropdown-action"]:"vv-combobox"===e?["vv-select","vv-dropdown-option","vv-dropdown-optgroup","vv-dropdown","vv-dropdown-action"]:"vv-button-group"===e?["vv-button","vv-button-group"]:"vv-accordion-group"===e?["vv-accordion","vv-accordion-group"]:"vv-checkbox-group"===e?["vv-checkbox","vv-checkbox-group"]:"vv-radio-group"===e?["vv-radio","vv-radio-group"]:"vv-alert-group"===e?["vv-alert","vv-alert-group"]:"v-tooltip"===e?["vv-tooltip"]:[e]},a=function(e,o){const t=[];if(!o)return t;const r=f(e);return r&&r.forEach((e=>{t.push(`@volverjs/style/${"scss"===o?"scss/":""}components/${e}`)})),t};e.VolverResolver=function({prefix:e="vv",importStyle:o,directives:t,ignore:r,cherryPick:n}={}){return[{type:"component",resolve:t=>{if(!e||!t.toLowerCase().startsWith(e.toLowerCase()))return;const i=l(t).replace(`${e}-`,"vv-");return r&&r.includes(i)?void 0:n?{from:`@volverjs/ui-vue/${i}`,sideEffects:a(i,o)}:{from:"@volverjs/ui-vue/components",sideEffects:a(i,o),name:t}}},{type:"directive",resolve:e=>{if(!t)return;const i=`v-${l(e)}`;return!d.includes(i)||r&&r.includes(i)?void 0:n?{from:`@volverjs/ui-vue/${i}`,sideEffects:a(i,o)}:{from:"@volverjs/ui-vue/directives",sideEffects:a(i,o),name:`v${e}`}}}]},e.getStyleNames=f,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -1,84 +1,85 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
2
2
|
import VvAccordionGroup from '@/components/VvAccordionGroup/VvAccordionGroup.vue';
|
|
3
3
|
declare const _default: Meta<{
|
|
4
|
-
new (...args: any[]): {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
9
|
-
disabled?: boolean | undefined;
|
|
10
|
-
collapse?: boolean | undefined;
|
|
11
|
-
not?: boolean | undefined;
|
|
12
|
-
items?: import("../../components/VvAccordionGroup").VvAccordionGroupItem[] | undefined;
|
|
13
|
-
itemModifiers?: string | string[] | undefined;
|
|
14
|
-
key?: string | number | symbol | undefined;
|
|
15
|
-
readonly modelValue?: string | unknown[] | undefined;
|
|
16
|
-
readonly modifiers?: string | string[] | undefined;
|
|
17
|
-
ref?: import("vue").VNodeRef | undefined;
|
|
18
|
-
style?: unknown;
|
|
19
|
-
class?: unknown;
|
|
20
|
-
ref_for?: boolean | undefined;
|
|
21
|
-
ref_key?: string | undefined;
|
|
22
|
-
readonly storeKey?: string | undefined;
|
|
4
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<globalThis.ExtractPropTypes<{
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: globalThis.PropType<string | string[] | undefined>;
|
|
7
|
+
default: undefined;
|
|
23
8
|
};
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
items: {
|
|
10
|
+
type: globalThis.PropType<import("../../components/VvAccordionGroup").VvAccordionGroupItem[]>;
|
|
11
|
+
default: () => never[];
|
|
12
|
+
};
|
|
13
|
+
collapse: BooleanConstructor;
|
|
14
|
+
itemModifiers: {
|
|
15
|
+
type: globalThis.PropType<string | string[]>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
disabled: BooleanConstructor;
|
|
19
|
+
not: BooleanConstructor;
|
|
20
|
+
storageType: {
|
|
21
|
+
type: globalThis.PropType<"local" | "session">;
|
|
22
|
+
default: import("../../constants").StorageType;
|
|
23
|
+
validator: (value: import("../../constants").StorageType) => boolean;
|
|
24
|
+
};
|
|
25
|
+
storageKey: StringConstructor;
|
|
26
|
+
modifiers: {
|
|
27
|
+
type: globalThis.PropType<string | string[]>;
|
|
28
|
+
default: undefined;
|
|
29
|
+
};
|
|
30
|
+
}>>, {
|
|
31
|
+
expandedAccordions: globalThis.WritableComputedRef<Set<string>>;
|
|
32
|
+
expand: (name?: string | string[] | undefined) => void;
|
|
33
|
+
collapse: (name?: string | string[] | undefined) => void;
|
|
34
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
[x: string]: (...args: any[]) => void;
|
|
36
|
+
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<globalThis.ExtractPropTypes<{
|
|
37
|
+
modelValue: {
|
|
38
|
+
type: globalThis.PropType<string | string[] | undefined>;
|
|
39
|
+
default: undefined;
|
|
40
|
+
};
|
|
41
|
+
items: {
|
|
42
|
+
type: globalThis.PropType<import("../../components/VvAccordionGroup").VvAccordionGroupItem[]>;
|
|
43
|
+
default: () => never[];
|
|
26
44
|
};
|
|
27
|
-
|
|
28
|
-
|
|
45
|
+
collapse: BooleanConstructor;
|
|
46
|
+
itemModifiers: {
|
|
47
|
+
type: globalThis.PropType<string | string[]>;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
disabled: BooleanConstructor;
|
|
51
|
+
not: BooleanConstructor;
|
|
52
|
+
storageType: {
|
|
53
|
+
type: globalThis.PropType<"local" | "session">;
|
|
54
|
+
default: import("../../constants").StorageType;
|
|
55
|
+
validator: (value: import("../../constants").StorageType) => boolean;
|
|
56
|
+
};
|
|
57
|
+
storageKey: StringConstructor;
|
|
58
|
+
modifiers: {
|
|
59
|
+
type: globalThis.PropType<string | string[]>;
|
|
60
|
+
default: undefined;
|
|
29
61
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
storeKey: StringConstructor;
|
|
51
|
-
modifiers: globalThis.PropType<string | string[]>;
|
|
52
|
-
}>> & {
|
|
53
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
54
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, {
|
|
55
|
-
disabled: boolean;
|
|
56
|
-
collapse: boolean;
|
|
57
|
-
not: boolean;
|
|
58
|
-
items: import("../../components/VvAccordionGroup").VvAccordionGroupItem[];
|
|
59
|
-
itemModifiers: string | string[];
|
|
60
|
-
}, {}, string, {}> & {
|
|
61
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
62
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
63
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
64
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
65
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
66
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
67
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
68
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
69
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
70
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
71
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
72
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
73
|
-
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
74
|
-
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
75
|
-
errorCaptured?: (((err: unknown, instance: globalThis.ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: globalThis.ComponentPublicInstance | null, info: string) => boolean | void)[]) | undefined;
|
|
62
|
+
}>>, {
|
|
63
|
+
collapse: boolean;
|
|
64
|
+
disabled: boolean;
|
|
65
|
+
modelValue: string | string[] | undefined;
|
|
66
|
+
not: boolean;
|
|
67
|
+
modifiers: string | string[];
|
|
68
|
+
items: import("../../components/VvAccordionGroup").VvAccordionGroupItem[];
|
|
69
|
+
itemModifiers: string | string[];
|
|
70
|
+
storageType: "local" | "session";
|
|
71
|
+
}, true, {}, {}, {
|
|
72
|
+
P: {};
|
|
73
|
+
B: {};
|
|
74
|
+
D: {};
|
|
75
|
+
C: {};
|
|
76
|
+
M: {};
|
|
77
|
+
Defaults: {};
|
|
78
|
+
}, Readonly<globalThis.ExtractPropTypes<{
|
|
79
|
+
modelValue: {
|
|
80
|
+
type: globalThis.PropType<string | string[] | undefined>;
|
|
81
|
+
default: undefined;
|
|
76
82
|
};
|
|
77
|
-
$forceUpdate: () => void;
|
|
78
|
-
$nextTick: typeof import("vue").nextTick;
|
|
79
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
80
|
-
} & Readonly<import("vue").ExtractPropTypes<{
|
|
81
|
-
modelValue: (ArrayConstructor | StringConstructor)[];
|
|
82
83
|
items: {
|
|
83
84
|
type: globalThis.PropType<import("../../components/VvAccordionGroup").VvAccordionGroupItem[]>;
|
|
84
85
|
default: () => never[];
|
|
@@ -90,16 +91,38 @@ declare const _default: Meta<{
|
|
|
90
91
|
};
|
|
91
92
|
disabled: BooleanConstructor;
|
|
92
93
|
not: BooleanConstructor;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
storageType: {
|
|
95
|
+
type: globalThis.PropType<"local" | "session">;
|
|
96
|
+
default: import("../../constants").StorageType;
|
|
97
|
+
validator: (value: import("../../constants").StorageType) => boolean;
|
|
98
|
+
};
|
|
99
|
+
storageKey: StringConstructor;
|
|
100
|
+
modifiers: {
|
|
101
|
+
type: globalThis.PropType<string | string[]>;
|
|
102
|
+
default: undefined;
|
|
103
|
+
};
|
|
104
|
+
}>>, {
|
|
105
|
+
expandedAccordions: globalThis.WritableComputedRef<Set<string>>;
|
|
106
|
+
expand: (name?: string | string[] | undefined) => void;
|
|
107
|
+
collapse: (name?: string | string[] | undefined) => void;
|
|
108
|
+
}, {}, {}, {}, {
|
|
109
|
+
collapse: boolean;
|
|
110
|
+
disabled: boolean;
|
|
111
|
+
modelValue: string | string[] | undefined;
|
|
112
|
+
not: boolean;
|
|
113
|
+
modifiers: string | string[];
|
|
114
|
+
items: import("../../components/VvAccordionGroup").VvAccordionGroupItem[];
|
|
115
|
+
itemModifiers: string | string[];
|
|
116
|
+
storageType: "local" | "session";
|
|
117
|
+
}>;
|
|
98
118
|
__isFragment?: undefined;
|
|
99
119
|
__isTeleport?: undefined;
|
|
100
120
|
__isSuspense?: undefined;
|
|
101
|
-
} & import("vue").ComponentOptionsBase<Readonly<
|
|
102
|
-
modelValue:
|
|
121
|
+
} & import("vue").ComponentOptionsBase<Readonly<globalThis.ExtractPropTypes<{
|
|
122
|
+
modelValue: {
|
|
123
|
+
type: globalThis.PropType<string | string[] | undefined>;
|
|
124
|
+
default: undefined;
|
|
125
|
+
};
|
|
103
126
|
items: {
|
|
104
127
|
type: globalThis.PropType<import("../../components/VvAccordionGroup").VvAccordionGroupItem[]>;
|
|
105
128
|
default: () => never[];
|
|
@@ -111,19 +134,50 @@ declare const _default: Meta<{
|
|
|
111
134
|
};
|
|
112
135
|
disabled: BooleanConstructor;
|
|
113
136
|
not: BooleanConstructor;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
|
|
137
|
+
storageType: {
|
|
138
|
+
type: globalThis.PropType<"local" | "session">;
|
|
139
|
+
default: import("../../constants").StorageType;
|
|
140
|
+
validator: (value: import("../../constants").StorageType) => boolean;
|
|
141
|
+
};
|
|
142
|
+
storageKey: StringConstructor;
|
|
143
|
+
modifiers: {
|
|
144
|
+
type: globalThis.PropType<string | string[]>;
|
|
145
|
+
default: undefined;
|
|
146
|
+
};
|
|
147
|
+
}>>, {
|
|
148
|
+
expandedAccordions: globalThis.WritableComputedRef<Set<string>>;
|
|
149
|
+
expand: (name?: string | string[] | undefined) => void;
|
|
150
|
+
collapse: (name?: string | string[] | undefined) => void;
|
|
151
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
152
|
+
[x: string]: (...args: any[]) => void;
|
|
153
|
+
}, string, {
|
|
120
154
|
collapse: boolean;
|
|
155
|
+
disabled: boolean;
|
|
156
|
+
modelValue: string | string[] | undefined;
|
|
121
157
|
not: boolean;
|
|
158
|
+
modifiers: string | string[];
|
|
122
159
|
items: import("../../components/VvAccordionGroup").VvAccordionGroupItem[];
|
|
123
160
|
itemModifiers: string | string[];
|
|
161
|
+
storageType: "local" | "session";
|
|
124
162
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
125
|
-
$slots: Partial<Record
|
|
126
|
-
|
|
163
|
+
$slots: Partial<Record<`summary::${string}`, (_: {
|
|
164
|
+
isExpanded: boolean;
|
|
165
|
+
expand: () => void;
|
|
166
|
+
collapse: () => void;
|
|
167
|
+
groupExpand: (name?: string | string[] | undefined) => void;
|
|
168
|
+
groupCollapse: (name?: string | string[] | undefined) => void;
|
|
169
|
+
}) => any>> & Partial<Record<`content::${string}`, (_: {
|
|
170
|
+
isExpanded: boolean;
|
|
171
|
+
expand: () => void;
|
|
172
|
+
collapse: () => void;
|
|
173
|
+
groupExpand: (name?: string | string[] | undefined) => void;
|
|
174
|
+
groupCollapse: (name?: string | string[] | undefined) => void;
|
|
175
|
+
}) => any>> & {
|
|
176
|
+
default?(_: {
|
|
177
|
+
expandedAccordions: Set<string>;
|
|
178
|
+
expand: (name?: string | string[] | undefined) => void;
|
|
179
|
+
collapse: (name?: string | string[] | undefined) => void;
|
|
180
|
+
}): any;
|
|
127
181
|
};
|
|
128
182
|
})>;
|
|
129
183
|
export default _default;
|