@v-c/picker 1.0.4 → 1.1.0-rc.2

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 (147) hide show
  1. package/dist/PickerInput/Popup/Footer.js +12 -18
  2. package/dist/PickerInput/Popup/PopupPanel.js +14 -18
  3. package/dist/PickerInput/Popup/PresetPanel.js +8 -10
  4. package/dist/PickerInput/Popup/index.js +19 -29
  5. package/dist/PickerInput/RangePicker.js +25 -17
  6. package/dist/PickerInput/Selector/Icon.js +6 -9
  7. package/dist/PickerInput/Selector/Input.js +13 -14
  8. package/dist/PickerInput/Selector/MaskFormat.js +5 -1
  9. package/dist/PickerInput/Selector/RangeSelector.js +29 -53
  10. package/dist/PickerInput/Selector/SingleSelector/MultipleDates.d.ts +7 -0
  11. package/dist/PickerInput/Selector/SingleSelector/MultipleDates.js +22 -12
  12. package/dist/PickerInput/Selector/SingleSelector/index.d.ts +7 -0
  13. package/dist/PickerInput/Selector/SingleSelector/index.js +34 -48
  14. package/dist/PickerInput/Selector/hooks/useClearIcon.js +2 -0
  15. package/dist/PickerInput/Selector/hooks/useInputHooks.js +2 -0
  16. package/dist/PickerInput/Selector/hooks/useRootProps.js +2 -0
  17. package/dist/PickerInput/Selector/util.js +2 -0
  18. package/dist/PickerInput/SinglePicker.d.ts +9 -0
  19. package/dist/PickerInput/SinglePicker.js +24 -14
  20. package/dist/PickerInput/context.js +2 -0
  21. package/dist/PickerInput/hooks/useCellRender.js +2 -0
  22. package/dist/PickerInput/hooks/useDelayState.js +2 -0
  23. package/dist/PickerInput/hooks/useDisabledBoundary.js +5 -0
  24. package/dist/PickerInput/hooks/useFieldFormat.js +2 -0
  25. package/dist/PickerInput/hooks/useFieldsInvalidate.js +5 -0
  26. package/dist/PickerInput/hooks/useFilledProps.js +10 -0
  27. package/dist/PickerInput/hooks/useInputReadOnly.js +2 -0
  28. package/dist/PickerInput/hooks/useInvalidate.js +5 -0
  29. package/dist/PickerInput/hooks/useLockEffect.js +6 -0
  30. package/dist/PickerInput/hooks/useOpen.js +6 -0
  31. package/dist/PickerInput/hooks/usePresets.js +2 -0
  32. package/dist/PickerInput/hooks/useRangeActive.js +7 -0
  33. package/dist/PickerInput/hooks/useRangeDisabledDate.js +6 -0
  34. package/dist/PickerInput/hooks/useRangePickerValue.js +2 -0
  35. package/dist/PickerInput/hooks/useRangeValue.d.ts +9 -2
  36. package/dist/PickerInput/hooks/useRangeValue.js +8 -2
  37. package/dist/PickerInput/hooks/useShowNow.js +2 -0
  38. package/dist/PickerPanel/DatePanel/index.js +15 -21
  39. package/dist/PickerPanel/DateTimePanel/index.js +13 -19
  40. package/dist/PickerPanel/DecadePanel/index.js +14 -20
  41. package/dist/PickerPanel/MonthPanel/index.js +14 -20
  42. package/dist/PickerPanel/PanelBody.js +10 -16
  43. package/dist/PickerPanel/PanelHeader.js +4 -2
  44. package/dist/PickerPanel/QuarterPanel/index.js +14 -20
  45. package/dist/PickerPanel/TimePanel/TimePanelBody/TimeColumn.js +8 -10
  46. package/dist/PickerPanel/TimePanel/TimePanelBody/index.js +10 -8
  47. package/dist/PickerPanel/TimePanel/TimePanelBody/useScrollTo.js +2 -0
  48. package/dist/PickerPanel/TimePanel/index.js +14 -20
  49. package/dist/PickerPanel/WeekPanel/index.js +12 -18
  50. package/dist/PickerPanel/YearPanel/index.js +14 -20
  51. package/dist/PickerPanel/context.js +2 -0
  52. package/dist/PickerPanel/index.js +23 -21
  53. package/dist/PickerTrigger/index.js +4 -2
  54. package/dist/PickerTrigger/util.js +2 -0
  55. package/dist/generate/dateFns.js +23 -10
  56. package/dist/generate/dayjs.js +4 -2
  57. package/dist/generate/luxon.js +29 -2
  58. package/dist/generate/moment.js +4 -2
  59. package/dist/hooks/useLocale.js +8 -3
  60. package/dist/hooks/useSemantic.js +5 -0
  61. package/dist/hooks/useSyncState.js +7 -0
  62. package/dist/hooks/useTimeConfig.js +11 -0
  63. package/dist/hooks/useTimeInfo.js +10 -2
  64. package/dist/hooks/useToggleDates.js +7 -0
  65. package/dist/index.d.ts +2 -2
  66. package/dist/index.js +7 -5
  67. package/dist/locale/am_ET.js +4 -2
  68. package/dist/locale/ar_EG.js +4 -2
  69. package/dist/locale/az_AZ.js +4 -2
  70. package/dist/locale/bg_BG.js +4 -2
  71. package/dist/locale/bn_BD.js +4 -2
  72. package/dist/locale/by_BY.js +4 -2
  73. package/dist/locale/ca_ES.js +4 -2
  74. package/dist/locale/common.js +3 -1
  75. package/dist/locale/cs_CZ.js +4 -2
  76. package/dist/locale/da_DK.js +4 -2
  77. package/dist/locale/de_DE.js +4 -2
  78. package/dist/locale/el_GR.js +4 -2
  79. package/dist/locale/en_GB.js +4 -2
  80. package/dist/locale/en_US.js +4 -2
  81. package/dist/locale/es_ES.js +4 -2
  82. package/dist/locale/es_MX.js +4 -2
  83. package/dist/locale/et_EE.js +4 -2
  84. package/dist/locale/eu_ES.js +4 -2
  85. package/dist/locale/fa_IR.js +4 -2
  86. package/dist/locale/fi_FI.js +4 -2
  87. package/dist/locale/fr_BE.js +4 -2
  88. package/dist/locale/fr_CA.js +4 -2
  89. package/dist/locale/fr_FR.js +4 -2
  90. package/dist/locale/ga_IE.js +4 -2
  91. package/dist/locale/gl_ES.js +4 -2
  92. package/dist/locale/he_IL.js +4 -2
  93. package/dist/locale/hi_IN.js +4 -2
  94. package/dist/locale/hr_HR.js +4 -2
  95. package/dist/locale/hu_HU.js +4 -2
  96. package/dist/locale/id_ID.js +4 -2
  97. package/dist/locale/is_IS.js +4 -2
  98. package/dist/locale/it_IT.js +4 -2
  99. package/dist/locale/ja_JP.js +4 -2
  100. package/dist/locale/ka_GE.js +4 -2
  101. package/dist/locale/kk_KZ.js +4 -2
  102. package/dist/locale/km_KH.js +4 -2
  103. package/dist/locale/kmr_IQ.js +4 -2
  104. package/dist/locale/kn_IN.js +4 -2
  105. package/dist/locale/ko_KR.js +4 -2
  106. package/dist/locale/lt_LT.js +4 -2
  107. package/dist/locale/lv_LV.js +4 -2
  108. package/dist/locale/mk_MK.js +4 -2
  109. package/dist/locale/ml_IN.js +4 -2
  110. package/dist/locale/mn_MN.js +4 -2
  111. package/dist/locale/mr_IN.js +4 -2
  112. package/dist/locale/ms_MY.js +4 -2
  113. package/dist/locale/my_MM.js +4 -2
  114. package/dist/locale/nb_NO.js +4 -2
  115. package/dist/locale/ne_NP.js +4 -2
  116. package/dist/locale/nl_BE.js +4 -2
  117. package/dist/locale/nl_NL.js +4 -2
  118. package/dist/locale/pl_PL.js +4 -2
  119. package/dist/locale/pt_BR.js +4 -2
  120. package/dist/locale/pt_PT.js +4 -2
  121. package/dist/locale/ro_RO.js +4 -2
  122. package/dist/locale/ru_RU.js +4 -2
  123. package/dist/locale/si_LK.js +4 -2
  124. package/dist/locale/sk_SK.js +4 -2
  125. package/dist/locale/sl_SI.js +4 -2
  126. package/dist/locale/sr_Cyrl_RS.js +4 -2
  127. package/dist/locale/sr_RS.js +4 -2
  128. package/dist/locale/sv_SE.js +4 -2
  129. package/dist/locale/ta_IN.js +4 -2
  130. package/dist/locale/te_IN.js +4 -2
  131. package/dist/locale/th_TH.js +4 -2
  132. package/dist/locale/tk_TK.js +4 -2
  133. package/dist/locale/tr_TR.js +4 -2
  134. package/dist/locale/ug_CN.js +4 -2
  135. package/dist/locale/uk_UA.js +4 -2
  136. package/dist/locale/ur_PK.js +4 -2
  137. package/dist/locale/uz_UZ.js +4 -2
  138. package/dist/locale/vi_VN.js +4 -2
  139. package/dist/locale/zh_CN.js +4 -2
  140. package/dist/locale/zh_TW.js +4 -2
  141. package/dist/utils/dateUtil.js +17 -1
  142. package/dist/utils/getClearIcon.js +2 -0
  143. package/dist/utils/miscUtil.js +6 -0
  144. package/dist/utils/uiUtil.js +2 -0
  145. package/dist/utils/valueUtil.js +2 -0
  146. package/dist/utils/warnUtil.js +2 -0
  147. package/package.json +4 -4
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var nb_NO_default = {
2
+ //#region src/locale/nb_NO.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "nb_NO",
5
6
  today: "I dag",
@@ -26,4 +27,5 @@ var nb_NO_default = {
26
27
  previousCentury: "Forrige århundre",
27
28
  nextCentury: "Neste århundre"
28
29
  };
29
- export { nb_NO_default as default };
30
+ //#endregion
31
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var ne_NP_default = {
2
+ //#region src/locale/ne_NP.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "ne_NP",
5
6
  today: "आज",
@@ -25,4 +26,5 @@ var ne_NP_default = {
25
26
  previousCentury: "पछिल्लो शताब्दी",
26
27
  nextCentury: "अर्को शताब्दी"
27
28
  };
28
- export { ne_NP_default as default };
29
+ //#endregion
30
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var nl_BE_default = {
2
+ //#region src/locale/nl_BE.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "nl_BE",
5
6
  today: "Vandaag",
@@ -24,4 +25,5 @@ var nl_BE_default = {
24
25
  previousCentury: "Vorige eeuw",
25
26
  nextCentury: "Volgende eeuw"
26
27
  };
27
- export { nl_BE_default as default };
28
+ //#endregion
29
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var nl_NL_default = {
2
+ //#region src/locale/nl_NL.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "nl_NL",
5
6
  today: "Vandaag",
@@ -24,4 +25,5 @@ var nl_NL_default = {
24
25
  previousCentury: "Vorige eeuw",
25
26
  nextCentury: "Volgende eeuw"
26
27
  };
27
- export { nl_NL_default as default };
28
+ //#endregion
29
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var pl_PL_default = {
2
+ //#region src/locale/pl_PL.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "pl_PL",
5
6
  today: "Dzisiaj",
@@ -24,4 +25,5 @@ var pl_PL_default = {
24
25
  previousCentury: "Ostatni wiek",
25
26
  nextCentury: "Następny wiek"
26
27
  };
27
- export { pl_PL_default as default };
28
+ //#endregion
29
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var pt_BR_default = {
2
+ //#region src/locale/pt_BR.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "pt_BR",
5
6
  today: "Hoje",
@@ -48,4 +49,5 @@ var pt_BR_default = {
48
49
  "Dez"
49
50
  ]
50
51
  };
51
- export { pt_BR_default as default };
52
+ //#endregion
53
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var pt_PT_default = {
2
+ //#region src/locale/pt_PT.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "pt_PT",
5
6
  today: "Hoje",
@@ -47,4 +48,5 @@ var pt_PT_default = {
47
48
  "Dez"
48
49
  ]
49
50
  };
50
- export { pt_PT_default as default };
51
+ //#endregion
52
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var ro_RO_default = {
2
+ //#region src/locale/ro_RO.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "ro_RO",
5
6
  today: "Azi",
@@ -25,4 +26,5 @@ var ro_RO_default = {
25
26
  previousCentury: "Secolul anterior",
26
27
  nextCentury: "Secolul următor"
27
28
  };
28
- export { ro_RO_default as default };
29
+ //#endregion
30
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var ru_RU_default = {
2
+ //#region src/locale/ru_RU.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "ru_RU",
5
6
  today: "Сегодня",
@@ -24,4 +25,5 @@ var ru_RU_default = {
24
25
  previousCentury: "Предыдущий век",
25
26
  nextCentury: "Следующий век"
26
27
  };
27
- export { ru_RU_default as default };
28
+ //#endregion
29
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var si_LK_default = {
2
+ //#region src/locale/si_LK.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "si_LK",
5
6
  today: "අද",
@@ -26,4 +27,5 @@ var si_LK_default = {
26
27
  previousCentury: "පසුගිය සියවස",
27
28
  nextCentury: "ඊළඟ සියවස"
28
29
  };
29
- export { si_LK_default as default };
30
+ //#endregion
31
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var sk_SK_default = {
2
+ //#region src/locale/sk_SK.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "sk_SK",
5
6
  today: "Dnes",
@@ -24,4 +25,5 @@ var sk_SK_default = {
24
25
  previousCentury: "Predchádzajúce storočie",
25
26
  nextCentury: "Nasledujúce storočie"
26
27
  };
27
- export { sk_SK_default as default };
28
+ //#endregion
29
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var sl_SI_default = {
2
+ //#region src/locale/sl_SI.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "sl_SI",
5
6
  today: "Danes",
@@ -24,4 +25,5 @@ var sl_SI_default = {
24
25
  previousCentury: "Prejšnje stoletje",
25
26
  nextCentury: "Naslednje stoletje"
26
27
  };
27
- export { sl_SI_default as default };
28
+ //#endregion
29
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var sr_Cyrl_RS_default = {
2
+ //#region src/locale/sr_Cyrl_RS.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "sr_Cyrl_RS",
5
6
  today: "Данас",
@@ -24,4 +25,5 @@ var sr_Cyrl_RS_default = {
24
25
  previousCentury: "Претходни век",
25
26
  nextCentury: "Следећи век"
26
27
  };
27
- export { sr_Cyrl_RS_default as default };
28
+ //#endregion
29
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var sr_RS_default = {
2
+ //#region src/locale/sr_RS.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "sr_RS",
5
6
  today: "Danas",
@@ -24,4 +25,5 @@ var sr_RS_default = {
24
25
  previousCentury: "Prethodni vek",
25
26
  nextCentury: "Sledeći vek"
26
27
  };
27
- export { sr_RS_default as default };
28
+ //#endregion
29
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var sv_SE_default = {
2
+ //#region src/locale/sv_SE.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "sv_SE",
5
6
  today: "I dag",
@@ -24,4 +25,5 @@ var sv_SE_default = {
24
25
  previousCentury: "Föreg århundrade",
25
26
  nextCentury: "Nästa århundrade"
26
27
  };
27
- export { sv_SE_default as default };
28
+ //#endregion
29
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var ta_IN_default = {
2
+ //#region src/locale/ta_IN.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "ta_IN",
5
6
  today: "இன்று",
@@ -25,4 +26,5 @@ var ta_IN_default = {
25
26
  previousCentury: "முந்தைய நூற்றாண்டு",
26
27
  nextCentury: "அடுத்த நூற்றாண்டு"
27
28
  };
28
- export { ta_IN_default as default };
29
+ //#endregion
30
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var te_IN_default = {
2
+ //#region src/locale/te_IN.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "te_IN",
5
6
  today: "నేడు",
@@ -25,4 +26,5 @@ var te_IN_default = {
25
26
  previousCentury: "మునుపటి శతాబ్దం",
26
27
  nextCentury: "తదుపరి శతాబ్దం"
27
28
  };
28
- export { te_IN_default as default };
29
+ //#endregion
30
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var th_TH_default = {
2
+ //#region src/locale/th_TH.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "th_TH",
5
6
  today: "วันนี้",
@@ -24,4 +25,5 @@ var th_TH_default = {
24
25
  previousCentury: "ศตวรรษก่อนหน้า",
25
26
  nextCentury: "ศตวรรษถัดไป"
26
27
  };
27
- export { th_TH_default as default };
28
+ //#endregion
29
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var tk_TK_default = {
2
+ //#region src/locale/tk_TK.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "tk_TK",
5
6
  today: "Şugün",
@@ -24,4 +25,5 @@ var tk_TK_default = {
24
25
  previousCentury: "Öňki asyr",
25
26
  nextCentury: "Soňky asyr"
26
27
  };
27
- export { tk_TK_default as default };
28
+ //#endregion
29
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var tr_TR_default = {
2
+ //#region src/locale/tr_TR.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "tr_TR",
5
6
  today: "Bugün",
@@ -47,4 +48,5 @@ var tr_TR_default = {
47
48
  "Ara"
48
49
  ]
49
50
  };
50
- export { tr_TR_default as default };
51
+ //#endregion
52
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var ug_CN_default = {
2
+ //#region src/locale/ug_CN.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "ug_CN",
5
6
  today: "بۈگۈن",
@@ -27,4 +28,5 @@ var ug_CN_default = {
27
28
  nextCentury: "كېيىنكى ئەسىر",
28
29
  monthBeforeYear: false
29
30
  };
30
- export { ug_CN_default as default };
31
+ //#endregion
32
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var uk_UA_default = {
2
+ //#region src/locale/uk_UA.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "uk_UA",
5
6
  today: "Сьогодні",
@@ -24,4 +25,5 @@ var uk_UA_default = {
24
25
  previousCentury: "Попереднє століття",
25
26
  nextCentury: "Наступне століття"
26
27
  };
27
- export { uk_UA_default as default };
28
+ //#endregion
29
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var ur_PK_default = {
2
+ //#region src/locale/ur_PK.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "ur_PK",
5
6
  today: "آج",
@@ -25,4 +26,5 @@ var ur_PK_default = {
25
26
  previousCentury: "پچھلی صدی",
26
27
  nextCentury: "اگلی صدی"
27
28
  };
28
- export { ur_PK_default as default };
29
+ //#endregion
30
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var uz_UZ_default = {
2
+ //#region src/locale/uz_UZ.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "uz_UZ",
5
6
  today: "Bugun",
@@ -25,4 +26,5 @@ var uz_UZ_default = {
25
26
  previousCentury: "O'tgan asr",
26
27
  nextCentury: "Keyingi asr"
27
28
  };
28
- export { uz_UZ_default as default };
29
+ //#endregion
30
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var vi_VN_default = {
2
+ //#region src/locale/vi_VN.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "vi_VN",
5
6
  today: "Hôm nay",
@@ -25,4 +26,5 @@ var vi_VN_default = {
25
26
  previousCentury: "Thế kỷ trước",
26
27
  nextCentury: "Thế kỷ sau"
27
28
  };
28
- export { vi_VN_default as default };
29
+ //#endregion
30
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var zh_CN_default = {
2
+ //#region src/locale/zh_CN.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "zh_CN",
5
6
  today: "今天",
@@ -28,4 +29,5 @@ var zh_CN_default = {
28
29
  cellDateFormat: "D",
29
30
  monthBeforeYear: false
30
31
  };
31
- export { zh_CN_default as default };
32
+ //#endregion
33
+ export { locale as default };
@@ -1,5 +1,6 @@
1
1
  import { commonLocale } from "./common.js";
2
- var zh_TW_default = {
2
+ //#region src/locale/zh_TW.ts
3
+ var locale = {
3
4
  ...commonLocale,
4
5
  locale: "zh_TW",
5
6
  today: "今天",
@@ -28,4 +29,5 @@ var zh_TW_default = {
28
29
  cellDateFormat: "D",
29
30
  monthBeforeYear: false
30
31
  };
31
- export { zh_TW_default as default };
32
+ //#endregion
33
+ export { locale as default };
@@ -1,4 +1,12 @@
1
- const WEEK_DAY_COUNT = 7;
1
+ //#region src/utils/dateUtil.ts
2
+ var WEEK_DAY_COUNT = 7;
3
+ /**
4
+ * Wrap the compare logic.
5
+ * This will compare the each of value is empty first.
6
+ * 1. All is empty, return true.
7
+ * 2. One is empty, return false.
8
+ * 3. return customize compare logic.
9
+ */
2
10
  function nullableCompare(value1, value2, oriCompareFn) {
3
11
  if (!value1 && !value2 || value1 === value2) return true;
4
12
  if (!value1 || !value2) return false;
@@ -27,6 +35,9 @@ function isSameDate(generateConfig, date1, date2) {
27
35
  function isSameTime(generateConfig, time1, time2) {
28
36
  return nullableCompare(time1, time2, () => generateConfig.getHour(time1) === generateConfig.getHour(time2) && generateConfig.getMinute(time1) === generateConfig.getMinute(time2) && generateConfig.getSecond(time1) === generateConfig.getSecond(time2));
29
37
  }
38
+ /**
39
+ * Check if the Date is all the same of timestamp
40
+ */
30
41
  function isSameTimestamp(generateConfig, time1, time2) {
31
42
  return nullableCompare(time1, time2, () => isSameDate(generateConfig, time1, time2) && isSameTime(generateConfig, time1, time2) && generateConfig.getMillisecond(time1) === generateConfig.getMillisecond(time2));
32
43
  }
@@ -47,6 +58,7 @@ function isSame(generateConfig, locale, source, target, type) {
47
58
  default: return isSameTimestamp(generateConfig, source, target);
48
59
  }
49
60
  }
61
+ /** Between in date but not equal of date */
50
62
  function isInRange(generateConfig, startDate, endDate, current) {
51
63
  if (!startDate || !endDate || !current) return false;
52
64
  return generateConfig.isAfter(current, startDate) && generateConfig.isAfter(endDate, current);
@@ -67,6 +79,9 @@ function formatValue(value, { generateConfig, locale, format }) {
67
79
  if (!value) return "";
68
80
  return typeof format === "function" ? format(value) : generateConfig.locale.format(locale.locale, value, format);
69
81
  }
82
+ /**
83
+ * Fill the time info into Date if provided.
84
+ */
70
85
  function fillTime(generateConfig, date, time) {
71
86
  let tmpDate = date;
72
87
  const getFn = [
@@ -86,4 +101,5 @@ function fillTime(generateConfig, date, time) {
86
101
  });
87
102
  return tmpDate;
88
103
  }
104
+ //#endregion
89
105
  export { WEEK_DAY_COUNT, fillTime, formatValue, getQuarter, getWeekStartDate, isInRange, isSame, isSameDate, isSameDecade, isSameMonth, isSameOrAfter, isSameQuarter, isSameTime, isSameTimestamp, isSameWeek, isSameYear };
@@ -1,5 +1,7 @@
1
1
  import { createVNode } from "vue";
2
+ //#region src/utils/getClearIcon.tsx
2
3
  function getClearIcon(prefixCls, allowClear, clearIcon) {
3
4
  return (typeof allowClear === "object" ? allowClear.clearIcon : clearIcon) || createVNode("span", { "class": `${prefixCls}-clear-btn` }, null);
4
5
  }
6
+ //#endregion
5
7
  export { getClearIcon };
@@ -1,8 +1,12 @@
1
+ //#region src/utils/miscUtil.ts
1
2
  function leftPad(str, length, fill = "0") {
2
3
  let current = String(str);
3
4
  while (current.length < length) current = `${fill}${current}`;
4
5
  return current;
5
6
  }
7
+ /**
8
+ * Convert `value` to array. Will provide `[]` if is null or undefined.
9
+ */
6
10
  function toArray(val) {
7
11
  if (val === null || val === void 0) return [];
8
12
  return Array.isArray(val) ? val : [val];
@@ -12,6 +16,7 @@ function fillIndex(ori, index, value) {
12
16
  clone[index] = value;
13
17
  return clone;
14
18
  }
19
+ /** Pick props from the key list. Will filter empty value */
15
20
  function pickProps(props, keys) {
16
21
  const clone = {};
17
22
  const mergedKeys = keys || Object.keys(props);
@@ -37,4 +42,5 @@ function getFromDate(calendarValues, activeIndexList, activeIndex) {
37
42
  const firstValuedIndex = activeIndexList.find((index) => calendarValues[index]);
38
43
  return mergedActiveIndex !== firstValuedIndex ? calendarValues[firstValuedIndex] : void 0;
39
44
  }
45
+ //#endregion
40
46
  export { fillIndex, getFromDate, getRowFormat, leftPad, pickProps, toArray };
@@ -1,5 +1,7 @@
1
+ //#region src/utils/uiUtil.ts
1
2
  function getRealPlacement(placement, rtl) {
2
3
  if (placement === void 0) return rtl ? "bottomRight" : "bottomLeft";
3
4
  return placement;
4
5
  }
6
+ //#endregion
5
7
  export { getRealPlacement };
@@ -1,3 +1,4 @@
1
+ //#region src/utils/valueUtil.ts
1
2
  function parseValue(value, config) {
2
3
  const { valueFormat, generateConfig, locale } = config;
3
4
  if (!valueFormat || typeof value !== "string") return value;
@@ -18,4 +19,5 @@ function formatValues(values, config) {
18
19
  if (!values) return values;
19
20
  return values.map((value) => formatValue(value, config));
20
21
  }
22
+ //#endregion
21
23
  export { formatValue, formatValues, parseValue, parseValues };
@@ -1,6 +1,8 @@
1
1
  import { warning } from "@v-c/util";
2
+ //#region src/utils/warnUtil.ts
2
3
  function legacyPropsWarning(props) {
3
4
  const { picker, disabledHours, disabledMinutes, disabledSeconds } = props;
4
5
  if (picker === "time" && (disabledHours || disabledMinutes || disabledSeconds)) warning(false, `'disabledHours', 'disabledMinutes', 'disabledSeconds' will be removed in the next major version, please use 'disabledTime' instead.`);
5
6
  }
7
+ //#endregion
6
8
  export { legacyPropsWarning };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@v-c/picker",
3
3
  "type": "module",
4
- "version": "1.0.4",
4
+ "version": "1.1.0-rc.2",
5
5
  "description": "picker ui component for vue",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -72,10 +72,10 @@
72
72
  }
73
73
  },
74
74
  "dependencies": {
75
- "@v-c/overflow": "^1.0.3",
75
+ "@v-c/overflow": "^1.0.5",
76
+ "@v-c/trigger": "^1.0.14",
76
77
  "@v-c/resize-observer": "^1.0.8",
77
- "@v-c/util": "^1.0.14",
78
- "@v-c/trigger": "^1.0.11"
78
+ "@v-c/util": "^1.0.19"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@types/luxon": "^3.7.1"