@varlet/ui 3.13.0 → 3.14.0-alpha.1772307023035

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 (37) hide show
  1. package/README.md +0 -10
  2. package/es/bottom-navigation/BottomNavigation.mjs +2 -0
  3. package/es/bottom-navigation/props.mjs +4 -0
  4. package/es/bottom-navigation-item/BottomNavigationItem.mjs +11 -2
  5. package/es/bottom-navigation-item/bottomNavigationItem.css +1 -1
  6. package/es/field-decorator/fieldDecorator.css +1 -1
  7. package/es/index.bundle.mjs +1 -1
  8. package/es/index.mjs +1 -1
  9. package/es/locale/en-US.mjs +3 -1
  10. package/es/locale/fa-IR.mjs +3 -1
  11. package/es/locale/ja-JP.mjs +3 -1
  12. package/es/locale/zh-CN.mjs +3 -1
  13. package/es/locale/zh-TW.mjs +3 -1
  14. package/es/option/Option.mjs +31 -2
  15. package/es/select/Select.mjs +263 -42
  16. package/es/select/SelectFilter.mjs +61 -0
  17. package/es/select/props.mjs +4 -0
  18. package/es/select/select.css +1 -1
  19. package/es/select/useSelectFilterSize.mjs +27 -0
  20. package/es/themes/dark/fieldDecorator.mjs +1 -1
  21. package/es/themes/dark/select.mjs +4 -1
  22. package/es/themes/md3-dark/fieldDecorator.mjs +1 -1
  23. package/es/themes/md3-dark/select.mjs +4 -1
  24. package/es/themes/md3-light/fieldDecorator.mjs +1 -1
  25. package/es/themes/md3-light/select.mjs +4 -1
  26. package/es/varlet.css +1 -1
  27. package/es/varlet.esm.js +8834 -8550
  28. package/highlight/web-types.en-US.json +32 -1
  29. package/lib/varlet.cjs.js +2191 -1830
  30. package/lib/varlet.css +1 -1
  31. package/package.json +7 -7
  32. package/types/bottomNavigation.d.ts +1 -0
  33. package/types/index.d.ts +2 -2
  34. package/types/select.d.ts +5 -0
  35. package/types/styleVars.d.ts +3 -0
  36. package/umd/varlet.js +8 -8
  37. package/highlight/web-types.zh-CN.json +0 -9167
@@ -0,0 +1,27 @@
1
+ import { computed, nextTick, ref, shallowRef, unref, watch } from "vue";
2
+ const MINIMUM_FILTER_WIDTH = 11;
3
+ function useSelectFilterSize(value) {
4
+ const calculatorRef = shallowRef();
5
+ const calculatorWidth = ref(0);
6
+ const filterStyle = computed(() => ({
7
+ minWidth: `${Math.max(calculatorWidth.value, MINIMUM_FILTER_WIDTH)}px`
8
+ }));
9
+ const resize = () => {
10
+ var _a, _b;
11
+ calculatorWidth.value = (_b = (_a = calculatorRef.value) == null ? void 0 : _a.getBoundingClientRect().width) != null ? _b : 0;
12
+ };
13
+ watch(
14
+ () => unref(value),
15
+ () => {
16
+ nextTick(resize);
17
+ }
18
+ );
19
+ return {
20
+ calculatorRef,
21
+ filterStyle,
22
+ resize
23
+ };
24
+ }
25
+ export {
26
+ useSelectFilterSize
27
+ };
@@ -15,7 +15,7 @@ var stdin_default = {
15
15
  "--field-decorator-standard-normal-icon-margin-bottom": "4px",
16
16
  "--field-decorator-standard-normal-non-hint-margin-top": "4px",
17
17
  "--field-decorator-standard-small-margin-top": "18px",
18
- "--field-decorator-standard-small-margin-bottom": "4px",
18
+ "--field-decorator-standard-small-margin-bottom": "0",
19
19
  "--field-decorator-standard-small-icon-margin-top": "18px",
20
20
  "--field-decorator-standard-small-icon-margin-bottom": "4px",
21
21
  "--field-decorator-standard-small-non-hint-margin-top": "2px",
@@ -9,7 +9,10 @@ var stdin_default = {
9
9
  "--select-chip-background-color": "#555",
10
10
  "--select-arrow-size": "20px",
11
11
  "--select-standard-menu-margin": `calc(var(--field-decorator-placeholder-size) * 0.75 + 12px) 0 0 0`,
12
- "--select-label-font-size": "16px"
12
+ "--select-label-font-size": "16px",
13
+ "--select-empty-text-color": "#aaaaaa",
14
+ "--select-empty-height": "38px",
15
+ "--select-empty-font-size": "14px"
13
16
  };
14
17
  export {
15
18
  stdin_default as default
@@ -15,7 +15,7 @@ var stdin_default = {
15
15
  "--field-decorator-standard-normal-icon-margin-bottom": "4px",
16
16
  "--field-decorator-standard-normal-non-hint-margin-top": "4px",
17
17
  "--field-decorator-standard-small-margin-top": "18px",
18
- "--field-decorator-standard-small-margin-bottom": "4px",
18
+ "--field-decorator-standard-small-margin-bottom": "0",
19
19
  "--field-decorator-standard-small-icon-margin-top": "18px",
20
20
  "--field-decorator-standard-small-icon-margin-bottom": "4px",
21
21
  "--field-decorator-standard-small-non-hint-margin-top": "2px",
@@ -9,7 +9,10 @@ var stdin_default = {
9
9
  "--select-chip-background-color": "var(--color-surface-container-highest)",
10
10
  "--select-arrow-size": "20px",
11
11
  "--select-standard-menu-margin": `calc(var(--field-decorator-placeholder-size) * 0.75 + 12px) 0 0 0`,
12
- "--select-label-font-size": "16px"
12
+ "--select-label-font-size": "16px",
13
+ "--select-empty-text-color": "var(--color-on-surface-variant)",
14
+ "--select-empty-height": "38px",
15
+ "--select-empty-font-size": "14px"
13
16
  };
14
17
  export {
15
18
  stdin_default as default
@@ -15,7 +15,7 @@ var stdin_default = {
15
15
  "--field-decorator-standard-normal-icon-margin-bottom": "4px",
16
16
  "--field-decorator-standard-normal-non-hint-margin-top": "4px",
17
17
  "--field-decorator-standard-small-margin-top": "18px",
18
- "--field-decorator-standard-small-margin-bottom": "4px",
18
+ "--field-decorator-standard-small-margin-bottom": "0",
19
19
  "--field-decorator-standard-small-icon-margin-top": "18px",
20
20
  "--field-decorator-standard-small-icon-margin-bottom": "4px",
21
21
  "--field-decorator-standard-small-non-hint-margin-top": "2px",
@@ -9,7 +9,10 @@ var stdin_default = {
9
9
  "--select-chip-background-color": "rgb(218, 212, 219)",
10
10
  "--select-arrow-size": "20px",
11
11
  "--select-standard-menu-margin": `calc(var(--field-decorator-placeholder-size) * 0.75 + 12px) 0 0 0`,
12
- "--select-label-font-size": "16px"
12
+ "--select-label-font-size": "16px",
13
+ "--select-empty-text-color": "var(--color-on-surface-variant)",
14
+ "--select-empty-height": "38px",
15
+ "--select-empty-font-size": "14px"
13
16
  };
14
17
  export {
15
18
  stdin_default as default