@v-c/picker 0.0.1
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 +21 -0
- package/dist/PickerInput/Popup/Footer.cjs +115 -0
- package/dist/PickerInput/Popup/Footer.d.ts +19 -0
- package/dist/PickerInput/Popup/Footer.js +109 -0
- package/dist/PickerInput/Popup/PopupPanel.cjs +413 -0
- package/dist/PickerInput/Popup/PopupPanel.d.ts +11 -0
- package/dist/PickerInput/Popup/PopupPanel.js +407 -0
- package/dist/PickerInput/Popup/PresetPanel.cjs +54 -0
- package/dist/PickerInput/Popup/PresetPanel.d.ts +16 -0
- package/dist/PickerInput/Popup/PresetPanel.js +48 -0
- package/dist/PickerInput/Popup/index.cjs +528 -0
- package/dist/PickerInput/Popup/index.d.ts +37 -0
- package/dist/PickerInput/Popup/index.js +522 -0
- package/dist/PickerInput/RangePicker.cjs +1910 -0
- package/dist/PickerInput/RangePicker.d.ts +57 -0
- package/dist/PickerInput/RangePicker.js +1901 -0
- package/dist/PickerInput/Selector/Icon.cjs +89 -0
- package/dist/PickerInput/Selector/Icon.d.ts +11 -0
- package/dist/PickerInput/Selector/Icon.js +83 -0
- package/dist/PickerInput/Selector/Input.cjs +376 -0
- package/dist/PickerInput/Selector/Input.d.ts +9 -0
- package/dist/PickerInput/Selector/Input.js +370 -0
- package/dist/PickerInput/Selector/MaskFormat.cjs +72 -0
- package/dist/PickerInput/Selector/MaskFormat.d.ts +22 -0
- package/dist/PickerInput/Selector/MaskFormat.js +68 -0
- package/dist/PickerInput/Selector/RangeSelector.cjs +1390 -0
- package/dist/PickerInput/Selector/RangeSelector.d.ts +28 -0
- package/dist/PickerInput/Selector/RangeSelector.js +1383 -0
- package/dist/PickerInput/Selector/SingleSelector/MultipleDates.cjs +110 -0
- package/dist/PickerInput/Selector/SingleSelector/MultipleDates.d.ts +13 -0
- package/dist/PickerInput/Selector/SingleSelector/MultipleDates.js +103 -0
- package/dist/PickerInput/Selector/SingleSelector/index.cjs +1358 -0
- package/dist/PickerInput/Selector/SingleSelector/index.d.ts +21 -0
- package/dist/PickerInput/Selector/SingleSelector/index.js +1352 -0
- package/dist/PickerInput/Selector/hooks/useClearIcon.cjs +17 -0
- package/dist/PickerInput/Selector/hooks/useClearIcon.d.ts +17 -0
- package/dist/PickerInput/Selector/hooks/useClearIcon.js +11 -0
- package/dist/PickerInput/Selector/hooks/useInputHooks.cjs +125 -0
- package/dist/PickerInput/Selector/hooks/useInputHooks.d.ts +56 -0
- package/dist/PickerInput/Selector/hooks/useInputHooks.js +120 -0
- package/dist/PickerInput/Selector/hooks/useRootProps.cjs +14 -0
- package/dist/PickerInput/Selector/hooks/useRootProps.d.ts +2 -0
- package/dist/PickerInput/Selector/hooks/useRootProps.js +9 -0
- package/dist/PickerInput/Selector/util.cjs +32 -0
- package/dist/PickerInput/Selector/util.d.ts +5 -0
- package/dist/PickerInput/Selector/util.js +30 -0
- package/dist/PickerInput/SinglePicker.cjs +1881 -0
- package/dist/PickerInput/SinglePicker.d.ts +46 -0
- package/dist/PickerInput/SinglePicker.js +1873 -0
- package/dist/PickerInput/context.cjs +12 -0
- package/dist/PickerInput/context.d.ts +16 -0
- package/dist/PickerInput/context.js +9 -0
- package/dist/PickerInput/hooks/useCellRender.cjs +25 -0
- package/dist/PickerInput/hooks/useCellRender.d.ts +3 -0
- package/dist/PickerInput/hooks/useCellRender.js +20 -0
- package/dist/PickerInput/hooks/useDelayState.cjs +34 -0
- package/dist/PickerInput/hooks/useDelayState.d.ts +2 -0
- package/dist/PickerInput/hooks/useDelayState.js +29 -0
- package/dist/PickerInput/hooks/useDisabledBoundary.cjs +15 -0
- package/dist/PickerInput/hooks/useDisabledBoundary.d.ts +8 -0
- package/dist/PickerInput/hooks/useDisabledBoundary.js +11 -0
- package/dist/PickerInput/hooks/useFieldFormat.cjs +17 -0
- package/dist/PickerInput/hooks/useFieldFormat.d.ts +3 -0
- package/dist/PickerInput/hooks/useFieldFormat.js +15 -0
- package/dist/PickerInput/hooks/useFieldsInvalidate.cjs +24 -0
- package/dist/PickerInput/hooks/useFieldsInvalidate.d.ts +6 -0
- package/dist/PickerInput/hooks/useFieldsInvalidate.js +19 -0
- package/dist/PickerInput/hooks/useFilledProps.cjs +103 -0
- package/dist/PickerInput/hooks/useFilledProps.d.ts +33 -0
- package/dist/PickerInput/hooks/useFilledProps.js +98 -0
- package/dist/PickerInput/hooks/useInputReadOnly.cjs +13 -0
- package/dist/PickerInput/hooks/useInputReadOnly.d.ts +3 -0
- package/dist/PickerInput/hooks/useInputReadOnly.js +8 -0
- package/dist/PickerInput/hooks/useInvalidate.cjs +34 -0
- package/dist/PickerInput/hooks/useInvalidate.d.ts +10 -0
- package/dist/PickerInput/hooks/useInvalidate.js +30 -0
- package/dist/PickerInput/hooks/useLockEffect.cjs +16 -0
- package/dist/PickerInput/hooks/useLockEffect.d.ts +6 -0
- package/dist/PickerInput/hooks/useLockEffect.js +11 -0
- package/dist/PickerInput/hooks/useOpen.cjs +15 -0
- package/dist/PickerInput/hooks/useOpen.d.ts +7 -0
- package/dist/PickerInput/hooks/useOpen.js +10 -0
- package/dist/PickerInput/hooks/usePresets.cjs +21 -0
- package/dist/PickerInput/hooks/usePresets.d.ts +3 -0
- package/dist/PickerInput/hooks/usePresets.js +16 -0
- package/dist/PickerInput/hooks/useRangeActive.cjs +57 -0
- package/dist/PickerInput/hooks/useRangeActive.d.ts +9 -0
- package/dist/PickerInput/hooks/useRangeActive.js +52 -0
- package/dist/PickerInput/hooks/useRangeDisabledDate.cjs +21 -0
- package/dist/PickerInput/hooks/useRangeDisabledDate.d.ts +9 -0
- package/dist/PickerInput/hooks/useRangeDisabledDate.js +17 -0
- package/dist/PickerInput/hooks/useRangePickerValue.cjs +100 -0
- package/dist/PickerInput/hooks/useRangePickerValue.d.ts +5 -0
- package/dist/PickerInput/hooks/useRangePickerValue.js +94 -0
- package/dist/PickerInput/hooks/useRangeValue.cjs +134 -0
- package/dist/PickerInput/hooks/useRangeValue.d.ts +21 -0
- package/dist/PickerInput/hooks/useRangeValue.js +128 -0
- package/dist/PickerInput/hooks/useShowNow.cjs +15 -0
- package/dist/PickerInput/hooks/useShowNow.d.ts +3 -0
- package/dist/PickerInput/hooks/useShowNow.js +10 -0
- package/dist/PickerPanel/DatePanel/index.cjs +294 -0
- package/dist/PickerPanel/DatePanel/index.d.ts +9 -0
- package/dist/PickerPanel/DatePanel/index.js +288 -0
- package/dist/PickerPanel/DateTimePanel/index.cjs +180 -0
- package/dist/PickerPanel/DateTimePanel/index.d.ts +3 -0
- package/dist/PickerPanel/DateTimePanel/index.js +174 -0
- package/dist/PickerPanel/DecadePanel/index.cjs +230 -0
- package/dist/PickerPanel/DecadePanel/index.d.ts +3 -0
- package/dist/PickerPanel/DecadePanel/index.js +224 -0
- package/dist/PickerPanel/MonthPanel/index.cjs +219 -0
- package/dist/PickerPanel/MonthPanel/index.d.ts +3 -0
- package/dist/PickerPanel/MonthPanel/index.js +213 -0
- package/dist/PickerPanel/PanelBody.cjs +157 -0
- package/dist/PickerPanel/PanelBody.d.ts +17 -0
- package/dist/PickerPanel/PanelBody.js +151 -0
- package/dist/PickerPanel/PanelHeader.cjs +132 -0
- package/dist/PickerPanel/PanelHeader.d.ts +9 -0
- package/dist/PickerPanel/PanelHeader.js +126 -0
- package/dist/PickerPanel/QuarterPanel/index.cjs +211 -0
- package/dist/PickerPanel/QuarterPanel/index.d.ts +3 -0
- package/dist/PickerPanel/QuarterPanel/index.js +205 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/TimeColumn.cjs +145 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/TimeColumn.d.ts +17 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/TimeColumn.js +139 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/index.cjs +286 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/index.d.ts +3 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/index.js +280 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/useScrollTo.cjs +65 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/useScrollTo.d.ts +1 -0
- package/dist/PickerPanel/TimePanel/TimePanelBody/useScrollTo.js +60 -0
- package/dist/PickerPanel/TimePanel/index.cjs +173 -0
- package/dist/PickerPanel/TimePanel/index.d.ts +3 -0
- package/dist/PickerPanel/TimePanel/index.js +167 -0
- package/dist/PickerPanel/WeekPanel/index.cjs +179 -0
- package/dist/PickerPanel/WeekPanel/index.d.ts +3 -0
- package/dist/PickerPanel/WeekPanel/index.js +173 -0
- package/dist/PickerPanel/YearPanel/index.cjs +239 -0
- package/dist/PickerPanel/YearPanel/index.d.ts +3 -0
- package/dist/PickerPanel/YearPanel/index.js +233 -0
- package/dist/PickerPanel/context.cjs +61 -0
- package/dist/PickerPanel/context.d.ts +26 -0
- package/dist/PickerPanel/context.js +53 -0
- package/dist/PickerPanel/index.cjs +473 -0
- package/dist/PickerPanel/index.d.ts +65 -0
- package/dist/PickerPanel/index.js +467 -0
- package/dist/PickerTrigger/index.cjs +137 -0
- package/dist/PickerTrigger/index.d.ts +18 -0
- package/dist/PickerTrigger/index.js +130 -0
- package/dist/PickerTrigger/util.cjs +13 -0
- package/dist/PickerTrigger/util.d.ts +2 -0
- package/dist/PickerTrigger/util.js +12 -0
- package/dist/_virtual/rolldown_runtime.cjs +21 -0
- package/dist/generate/dateFns.cjs +80 -0
- package/dist/generate/dateFns.d.ts +3 -0
- package/dist/generate/dateFns.js +73 -0
- package/dist/generate/dayjs.cjs +117 -0
- package/dist/generate/dayjs.d.ts +4 -0
- package/dist/generate/dayjs.js +104 -0
- package/dist/generate/index.cjs +1 -0
- package/dist/generate/index.d.ts +37 -0
- package/dist/generate/index.js +0 -0
- package/dist/generate/luxon.cjs +75 -0
- package/dist/generate/luxon.d.ts +4 -0
- package/dist/generate/luxon.js +69 -0
- package/dist/generate/moment.cjs +107 -0
- package/dist/generate/moment.d.ts +4 -0
- package/dist/generate/moment.js +100 -0
- package/dist/hooks/useLocale.cjs +45 -0
- package/dist/hooks/useLocale.d.ts +9 -0
- package/dist/hooks/useLocale.js +39 -0
- package/dist/hooks/useSemantic.cjs +18 -0
- package/dist/hooks/useSemantic.d.ts +14 -0
- package/dist/hooks/useSemantic.js +13 -0
- package/dist/hooks/useSyncState.cjs +29 -0
- package/dist/hooks/useSyncState.d.ts +7 -0
- package/dist/hooks/useSyncState.js +24 -0
- package/dist/hooks/useTimeConfig.cjs +161 -0
- package/dist/hooks/useTimeConfig.d.ts +18 -0
- package/dist/hooks/useTimeConfig.js +159 -0
- package/dist/hooks/useTimeInfo.cjs +113 -0
- package/dist/hooks/useTimeInfo.d.ts +12 -0
- package/dist/hooks/useTimeInfo.js +108 -0
- package/dist/hooks/useToggleDates.cjs +16 -0
- package/dist/hooks/useToggleDates.d.ts +9 -0
- package/dist/hooks/useToggleDates.js +12 -0
- package/dist/index.cjs +12 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +5 -0
- package/dist/interface.cjs +1 -0
- package/dist/interface.d.ts +379 -0
- package/dist/interface.js +0 -0
- package/dist/locale/am_ET.cjs +34 -0
- package/dist/locale/am_ET.d.ts +3 -0
- package/dist/locale/am_ET.js +29 -0
- package/dist/locale/ar_EG.cjs +32 -0
- package/dist/locale/ar_EG.d.ts +3 -0
- package/dist/locale/ar_EG.js +27 -0
- package/dist/locale/az_AZ.cjs +33 -0
- package/dist/locale/az_AZ.d.ts +3 -0
- package/dist/locale/az_AZ.js +28 -0
- package/dist/locale/bg_BG.cjs +32 -0
- package/dist/locale/bg_BG.d.ts +3 -0
- package/dist/locale/bg_BG.js +27 -0
- package/dist/locale/bn_BD.cjs +33 -0
- package/dist/locale/bn_BD.d.ts +3 -0
- package/dist/locale/bn_BD.js +28 -0
- package/dist/locale/by_BY.cjs +33 -0
- package/dist/locale/by_BY.d.ts +3 -0
- package/dist/locale/by_BY.js +28 -0
- package/dist/locale/ca_ES.cjs +32 -0
- package/dist/locale/ca_ES.d.ts +3 -0
- package/dist/locale/ca_ES.js +27 -0
- package/dist/locale/common.cjs +8 -0
- package/dist/locale/common.d.ts +2 -0
- package/dist/locale/common.js +7 -0
- package/dist/locale/cs_CZ.cjs +32 -0
- package/dist/locale/cs_CZ.d.ts +3 -0
- package/dist/locale/cs_CZ.js +27 -0
- package/dist/locale/da_DK.cjs +32 -0
- package/dist/locale/da_DK.d.ts +3 -0
- package/dist/locale/da_DK.js +27 -0
- package/dist/locale/de_DE.cjs +32 -0
- package/dist/locale/de_DE.d.ts +3 -0
- package/dist/locale/de_DE.js +27 -0
- package/dist/locale/el_GR.cjs +32 -0
- package/dist/locale/el_GR.d.ts +3 -0
- package/dist/locale/el_GR.js +27 -0
- package/dist/locale/en_GB.cjs +32 -0
- package/dist/locale/en_GB.d.ts +3 -0
- package/dist/locale/en_GB.js +27 -0
- package/dist/locale/en_US.cjs +33 -0
- package/dist/locale/en_US.d.ts +3 -0
- package/dist/locale/en_US.js +28 -0
- package/dist/locale/es_ES.cjs +32 -0
- package/dist/locale/es_ES.d.ts +3 -0
- package/dist/locale/es_ES.js +27 -0
- package/dist/locale/es_MX.cjs +33 -0
- package/dist/locale/es_MX.d.ts +3 -0
- package/dist/locale/es_MX.js +28 -0
- package/dist/locale/et_EE.cjs +32 -0
- package/dist/locale/et_EE.d.ts +3 -0
- package/dist/locale/et_EE.js +27 -0
- package/dist/locale/eu_ES.cjs +34 -0
- package/dist/locale/eu_ES.d.ts +3 -0
- package/dist/locale/eu_ES.js +29 -0
- package/dist/locale/fa_IR.cjs +32 -0
- package/dist/locale/fa_IR.d.ts +3 -0
- package/dist/locale/fa_IR.js +27 -0
- package/dist/locale/fi_FI.cjs +32 -0
- package/dist/locale/fi_FI.d.ts +3 -0
- package/dist/locale/fi_FI.js +27 -0
- package/dist/locale/fr_BE.cjs +32 -0
- package/dist/locale/fr_BE.d.ts +3 -0
- package/dist/locale/fr_BE.js +27 -0
- package/dist/locale/fr_CA.cjs +33 -0
- package/dist/locale/fr_CA.d.ts +3 -0
- package/dist/locale/fr_CA.js +28 -0
- package/dist/locale/fr_FR.cjs +33 -0
- package/dist/locale/fr_FR.d.ts +3 -0
- package/dist/locale/fr_FR.js +28 -0
- package/dist/locale/ga_IE.cjs +33 -0
- package/dist/locale/ga_IE.d.ts +3 -0
- package/dist/locale/ga_IE.js +28 -0
- package/dist/locale/gl_ES.cjs +32 -0
- package/dist/locale/gl_ES.d.ts +3 -0
- package/dist/locale/gl_ES.js +27 -0
- package/dist/locale/he_IL.cjs +33 -0
- package/dist/locale/he_IL.d.ts +3 -0
- package/dist/locale/he_IL.js +28 -0
- package/dist/locale/hi_IN.cjs +33 -0
- package/dist/locale/hi_IN.d.ts +3 -0
- package/dist/locale/hi_IN.js +28 -0
- package/dist/locale/hr_HR.cjs +33 -0
- package/dist/locale/hr_HR.d.ts +3 -0
- package/dist/locale/hr_HR.js +28 -0
- package/dist/locale/hu_HU.cjs +33 -0
- package/dist/locale/hu_HU.d.ts +3 -0
- package/dist/locale/hu_HU.js +28 -0
- package/dist/locale/id_ID.cjs +33 -0
- package/dist/locale/id_ID.d.ts +3 -0
- package/dist/locale/id_ID.js +28 -0
- package/dist/locale/is_IS.cjs +32 -0
- package/dist/locale/is_IS.d.ts +3 -0
- package/dist/locale/is_IS.js +27 -0
- package/dist/locale/it_IT.cjs +55 -0
- package/dist/locale/it_IT.d.ts +3 -0
- package/dist/locale/it_IT.js +50 -0
- package/dist/locale/ja_JP.cjs +35 -0
- package/dist/locale/ja_JP.d.ts +3 -0
- package/dist/locale/ja_JP.js +30 -0
- package/dist/locale/ka_GE.cjs +33 -0
- package/dist/locale/ka_GE.d.ts +3 -0
- package/dist/locale/ka_GE.js +28 -0
- package/dist/locale/kk_KZ.cjs +32 -0
- package/dist/locale/kk_KZ.d.ts +3 -0
- package/dist/locale/kk_KZ.js +27 -0
- package/dist/locale/km_KH.cjs +34 -0
- package/dist/locale/km_KH.d.ts +3 -0
- package/dist/locale/km_KH.js +29 -0
- package/dist/locale/kmr_IQ.cjs +32 -0
- package/dist/locale/kmr_IQ.d.ts +3 -0
- package/dist/locale/kmr_IQ.js +27 -0
- package/dist/locale/kn_IN.cjs +33 -0
- package/dist/locale/kn_IN.d.ts +3 -0
- package/dist/locale/kn_IN.js +28 -0
- package/dist/locale/ko_KR.cjs +34 -0
- package/dist/locale/ko_KR.d.ts +3 -0
- package/dist/locale/ko_KR.js +29 -0
- package/dist/locale/lt_LT.cjs +34 -0
- package/dist/locale/lt_LT.d.ts +3 -0
- package/dist/locale/lt_LT.js +29 -0
- package/dist/locale/lv_LV.cjs +32 -0
- package/dist/locale/lv_LV.d.ts +3 -0
- package/dist/locale/lv_LV.js +27 -0
- package/dist/locale/mk_MK.cjs +32 -0
- package/dist/locale/mk_MK.d.ts +3 -0
- package/dist/locale/mk_MK.js +27 -0
- package/dist/locale/ml_IN.cjs +33 -0
- package/dist/locale/ml_IN.d.ts +3 -0
- package/dist/locale/ml_IN.js +28 -0
- package/dist/locale/mn_MN.cjs +34 -0
- package/dist/locale/mn_MN.d.ts +3 -0
- package/dist/locale/mn_MN.js +29 -0
- package/dist/locale/mr_IN.cjs +59 -0
- package/dist/locale/mr_IN.d.ts +3 -0
- package/dist/locale/mr_IN.js +54 -0
- package/dist/locale/ms_MY.cjs +34 -0
- package/dist/locale/ms_MY.d.ts +3 -0
- package/dist/locale/ms_MY.js +29 -0
- package/dist/locale/my_MM.cjs +33 -0
- package/dist/locale/my_MM.d.ts +3 -0
- package/dist/locale/my_MM.js +28 -0
- package/dist/locale/nb_NO.cjs +34 -0
- package/dist/locale/nb_NO.d.ts +3 -0
- package/dist/locale/nb_NO.js +29 -0
- package/dist/locale/ne_NP.cjs +33 -0
- package/dist/locale/ne_NP.d.ts +3 -0
- package/dist/locale/ne_NP.js +28 -0
- package/dist/locale/nl_BE.cjs +32 -0
- package/dist/locale/nl_BE.d.ts +3 -0
- package/dist/locale/nl_BE.js +27 -0
- package/dist/locale/nl_NL.cjs +32 -0
- package/dist/locale/nl_NL.d.ts +3 -0
- package/dist/locale/nl_NL.js +27 -0
- package/dist/locale/pl_PL.cjs +32 -0
- package/dist/locale/pl_PL.d.ts +3 -0
- package/dist/locale/pl_PL.js +27 -0
- package/dist/locale/pt_BR.cjs +56 -0
- package/dist/locale/pt_BR.d.ts +3 -0
- package/dist/locale/pt_BR.js +51 -0
- package/dist/locale/pt_PT.cjs +55 -0
- package/dist/locale/pt_PT.d.ts +3 -0
- package/dist/locale/pt_PT.js +50 -0
- package/dist/locale/ro_RO.cjs +33 -0
- package/dist/locale/ro_RO.d.ts +3 -0
- package/dist/locale/ro_RO.js +28 -0
- package/dist/locale/ru_RU.cjs +32 -0
- package/dist/locale/ru_RU.d.ts +3 -0
- package/dist/locale/ru_RU.js +27 -0
- package/dist/locale/si_LK.cjs +34 -0
- package/dist/locale/si_LK.d.ts +3 -0
- package/dist/locale/si_LK.js +29 -0
- package/dist/locale/sk_SK.cjs +32 -0
- package/dist/locale/sk_SK.d.ts +3 -0
- package/dist/locale/sk_SK.js +27 -0
- package/dist/locale/sl_SI.cjs +32 -0
- package/dist/locale/sl_SI.d.ts +3 -0
- package/dist/locale/sl_SI.js +27 -0
- package/dist/locale/sr_Cyrl_RS.cjs +32 -0
- package/dist/locale/sr_Cyrl_RS.d.ts +3 -0
- package/dist/locale/sr_Cyrl_RS.js +27 -0
- package/dist/locale/sr_RS.cjs +32 -0
- package/dist/locale/sr_RS.d.ts +3 -0
- package/dist/locale/sr_RS.js +27 -0
- package/dist/locale/sv_SE.cjs +32 -0
- package/dist/locale/sv_SE.d.ts +3 -0
- package/dist/locale/sv_SE.js +27 -0
- package/dist/locale/ta_IN.cjs +33 -0
- package/dist/locale/ta_IN.d.ts +3 -0
- package/dist/locale/ta_IN.js +28 -0
- package/dist/locale/te_IN.cjs +33 -0
- package/dist/locale/te_IN.d.ts +3 -0
- package/dist/locale/te_IN.js +28 -0
- package/dist/locale/th_TH.cjs +32 -0
- package/dist/locale/th_TH.d.ts +3 -0
- package/dist/locale/th_TH.js +27 -0
- package/dist/locale/tk_TK.cjs +32 -0
- package/dist/locale/tk_TK.d.ts +3 -0
- package/dist/locale/tk_TK.js +27 -0
- package/dist/locale/tr_TR.cjs +55 -0
- package/dist/locale/tr_TR.d.ts +3 -0
- package/dist/locale/tr_TR.js +50 -0
- package/dist/locale/ug_CN.cjs +35 -0
- package/dist/locale/ug_CN.d.ts +3 -0
- package/dist/locale/ug_CN.js +30 -0
- package/dist/locale/uk_UA.cjs +32 -0
- package/dist/locale/uk_UA.d.ts +3 -0
- package/dist/locale/uk_UA.js +27 -0
- package/dist/locale/ur_PK.cjs +33 -0
- package/dist/locale/ur_PK.d.ts +3 -0
- package/dist/locale/ur_PK.js +28 -0
- package/dist/locale/uz_UZ.cjs +33 -0
- package/dist/locale/uz_UZ.d.ts +3 -0
- package/dist/locale/uz_UZ.js +28 -0
- package/dist/locale/vi_VN.cjs +33 -0
- package/dist/locale/vi_VN.d.ts +3 -0
- package/dist/locale/vi_VN.js +28 -0
- package/dist/locale/zh_CN.cjs +36 -0
- package/dist/locale/zh_CN.d.ts +3 -0
- package/dist/locale/zh_CN.js +31 -0
- package/dist/locale/zh_TW.cjs +36 -0
- package/dist/locale/zh_TW.d.ts +3 -0
- package/dist/locale/zh_TW.js +31 -0
- package/dist/utils/dateUtil.cjs +105 -0
- package/dist/utils/dateUtil.d.ts +29 -0
- package/dist/utils/dateUtil.js +89 -0
- package/dist/utils/getClearIcon.cjs +7 -0
- package/dist/utils/getClearIcon.d.ts +6 -0
- package/dist/utils/getClearIcon.js +5 -0
- package/dist/utils/miscUtil.cjs +46 -0
- package/dist/utils/miscUtil.d.ts +14 -0
- package/dist/utils/miscUtil.js +40 -0
- package/dist/utils/uiUtil.cjs +6 -0
- package/dist/utils/uiUtil.d.ts +1 -0
- package/dist/utils/uiUtil.js +5 -0
- package/dist/utils/warnUtil.cjs +8 -0
- package/dist/utils/warnUtil.d.ts +5 -0
- package/dist/utils/warnUtil.js +6 -0
- package/package.json +82 -0
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
import { usePickerContext } from "../PickerInput/context.js";
|
|
2
|
+
import { pickProps, toArray } from "../utils/miscUtil.js";
|
|
3
|
+
import useCellRender from "../PickerInput/hooks/useCellRender.js";
|
|
4
|
+
import en_US_default from "../locale/en_US.js";
|
|
5
|
+
import useLocale from "../hooks/useLocale.js";
|
|
6
|
+
import { fillShowTimeConfig, getTimeProps } from "../hooks/useTimeConfig.js";
|
|
7
|
+
import { isSame } from "../utils/dateUtil.js";
|
|
8
|
+
import useToggleDates from "../hooks/useToggleDates.js";
|
|
9
|
+
import { providePickerHackContext, provideSharedPanelContext, usePickerHackContext } from "./context.js";
|
|
10
|
+
import DatePanel_default from "./DatePanel/index.js";
|
|
11
|
+
import TimePanel_default from "./TimePanel/index.js";
|
|
12
|
+
import DateTimePanel_default from "./DateTimePanel/index.js";
|
|
13
|
+
import DecadePanel_default from "./DecadePanel/index.js";
|
|
14
|
+
import MonthPanel_default from "./MonthPanel/index.js";
|
|
15
|
+
import QuarterPanel_default from "./QuarterPanel/index.js";
|
|
16
|
+
import WeekPanel_default from "./WeekPanel/index.js";
|
|
17
|
+
import YearPanel_default from "./YearPanel/index.js";
|
|
18
|
+
import { computed, createVNode, defineComponent, mergeProps, ref, toRef, watch } from "vue";
|
|
19
|
+
import { clsx, warning } from "@v-c/util";
|
|
20
|
+
var DefaultComponents = {
|
|
21
|
+
date: DatePanel_default,
|
|
22
|
+
datetime: DateTimePanel_default,
|
|
23
|
+
week: WeekPanel_default,
|
|
24
|
+
month: MonthPanel_default,
|
|
25
|
+
quarter: QuarterPanel_default,
|
|
26
|
+
year: YearPanel_default,
|
|
27
|
+
decade: DecadePanel_default,
|
|
28
|
+
time: TimePanel_default
|
|
29
|
+
};
|
|
30
|
+
var PickerPanel_default = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
31
|
+
const pickerContext = usePickerContext();
|
|
32
|
+
const rootRef = ref();
|
|
33
|
+
const mergedPrefixCls = computed(() => pickerContext.value.prefixCls || props.prefixCls || "vc-picker");
|
|
34
|
+
const mergedGenerateConfig = computed(() => props.generateConfig || pickerContext.value.generateConfig);
|
|
35
|
+
const mergedLocale = computed(() => props.locale || pickerContext.value.locale || en_US_default);
|
|
36
|
+
const timePropsInfo = computed(() => getTimeProps({
|
|
37
|
+
...props,
|
|
38
|
+
locale: mergedLocale.value,
|
|
39
|
+
format: void 0,
|
|
40
|
+
picker: props.picker
|
|
41
|
+
}));
|
|
42
|
+
const localeTimeProps = computed(() => timePropsInfo.value[1]);
|
|
43
|
+
const showTimeFormat = computed(() => timePropsInfo.value[2]);
|
|
44
|
+
const propFormat = computed(() => timePropsInfo.value[3]);
|
|
45
|
+
const timeProps = computed(() => timePropsInfo.value[0]);
|
|
46
|
+
const filledLocale = useLocale(mergedLocale, localeTimeProps);
|
|
47
|
+
const internalPicker = computed(() => {
|
|
48
|
+
if (props.picker === "date" && props.showTime) return "datetime";
|
|
49
|
+
return props.picker || "date";
|
|
50
|
+
});
|
|
51
|
+
const mergedShowTime = computed(() => fillShowTimeConfig(internalPicker.value, showTimeFormat.value, propFormat.value, timeProps.value, filledLocale.value));
|
|
52
|
+
const now = computed(() => mergedGenerateConfig.value?.getNow?.());
|
|
53
|
+
const internalModeState = ref(props.picker || "date");
|
|
54
|
+
const mergedMode = computed(() => props.mode || internalModeState.value);
|
|
55
|
+
const setMergedMode = (m) => {
|
|
56
|
+
internalModeState.value = m;
|
|
57
|
+
};
|
|
58
|
+
const internalMode = computed(() => mergedMode.value === "date" && mergedShowTime.value ? "datetime" : mergedMode.value);
|
|
59
|
+
const toggleDates = useToggleDates(mergedGenerateConfig, filledLocale, internalPicker);
|
|
60
|
+
const internalValueState = ref(props.defaultValue);
|
|
61
|
+
const innerValue = computed(() => props.value !== void 0 ? props.value : internalValueState.value);
|
|
62
|
+
const setMergedValue = (val) => {
|
|
63
|
+
internalValueState.value = val;
|
|
64
|
+
};
|
|
65
|
+
const mergedValue = computed(() => {
|
|
66
|
+
const vals = toArray(innerValue.value).filter((val) => val);
|
|
67
|
+
return props.multiple ? vals : vals.slice(0, 1);
|
|
68
|
+
});
|
|
69
|
+
const triggerChange = (nextValue) => {
|
|
70
|
+
setMergedValue(nextValue);
|
|
71
|
+
if (props.onChange && (nextValue === null || mergedValue.value.length !== nextValue.length || mergedValue.value.some((ori, index) => !isSame(mergedGenerateConfig.value, filledLocale.value, ori, nextValue[index], internalPicker.value)))) props.onChange(props.multiple ? nextValue : nextValue?.[0]);
|
|
72
|
+
};
|
|
73
|
+
const onInternalSelect = (newDate) => {
|
|
74
|
+
props.onSelect?.(newDate);
|
|
75
|
+
if (mergedMode.value === props.picker) triggerChange(props.multiple ? toggleDates(mergedValue.value, newDate) : [newDate]);
|
|
76
|
+
};
|
|
77
|
+
const internalPickerValueState = ref(props.defaultPickerValue || mergedValue.value[0] || now.value);
|
|
78
|
+
const mergedPickerValue = computed(() => props.pickerValue !== void 0 ? props.pickerValue : internalPickerValueState.value);
|
|
79
|
+
const setInternalPickerValue = (val) => {
|
|
80
|
+
internalPickerValueState.value = val;
|
|
81
|
+
};
|
|
82
|
+
watch(() => mergedValue.value[0], (val) => {
|
|
83
|
+
if (val && props.pickerValue === void 0) setInternalPickerValue(val);
|
|
84
|
+
});
|
|
85
|
+
const triggerPanelChange = (viewDate, nextMode) => {
|
|
86
|
+
props.onPanelChange?.(viewDate || mergedPickerValue.value, nextMode || mergedMode.value);
|
|
87
|
+
};
|
|
88
|
+
const setPickerValue = (nextPickerValue, triggerPanelEvent = false) => {
|
|
89
|
+
setInternalPickerValue(nextPickerValue);
|
|
90
|
+
props.onPickerValueChange?.(nextPickerValue);
|
|
91
|
+
if (triggerPanelEvent) triggerPanelChange(nextPickerValue);
|
|
92
|
+
};
|
|
93
|
+
const triggerModeChange = (nextMode, viewDate) => {
|
|
94
|
+
setMergedMode(nextMode);
|
|
95
|
+
if (viewDate) setPickerValue(viewDate);
|
|
96
|
+
triggerPanelChange(viewDate, nextMode);
|
|
97
|
+
};
|
|
98
|
+
const onPanelValueSelect = (nextValue) => {
|
|
99
|
+
onInternalSelect(nextValue);
|
|
100
|
+
setPickerValue(nextValue);
|
|
101
|
+
if (mergedMode.value !== props.picker) {
|
|
102
|
+
const decadeYearQueue = ["decade", "year"];
|
|
103
|
+
const decadeYearMonthQueue = [...decadeYearQueue, "month"];
|
|
104
|
+
const queue = {
|
|
105
|
+
quarter: [...decadeYearQueue, "quarter"],
|
|
106
|
+
week: [...decadeYearMonthQueue, "week"],
|
|
107
|
+
date: [...decadeYearMonthQueue, "date"]
|
|
108
|
+
}[props.picker || "date"] || decadeYearMonthQueue;
|
|
109
|
+
const nextMode = queue[queue.indexOf(mergedMode.value) + 1];
|
|
110
|
+
if (nextMode) triggerModeChange(nextMode, nextValue);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const hoverRangeDate = computed(() => {
|
|
114
|
+
let start;
|
|
115
|
+
let end;
|
|
116
|
+
if (Array.isArray(props.hoverRangeValue)) [start, end] = props.hoverRangeValue;
|
|
117
|
+
else start = props.hoverRangeValue;
|
|
118
|
+
if (!start && !end) return null;
|
|
119
|
+
start = start || end;
|
|
120
|
+
end = end || start;
|
|
121
|
+
return mergedGenerateConfig.value.isAfter(start, end) ? [end, start] : [start, end];
|
|
122
|
+
});
|
|
123
|
+
const onInternalCellRender = useCellRender(toRef(props, "cellRender"), toRef(props, "dateRender"), toRef(props, "monthCellRender"));
|
|
124
|
+
provideSharedPanelContext(computed(() => ({
|
|
125
|
+
classNames: pickerContext.value.classNames?.popup ?? props.classNames ?? {},
|
|
126
|
+
styles: pickerContext.value.styles?.popup ?? props.styles ?? {}
|
|
127
|
+
})));
|
|
128
|
+
const parentHackContext = usePickerHackContext();
|
|
129
|
+
providePickerHackContext(computed(() => ({
|
|
130
|
+
...parentHackContext?.value || {},
|
|
131
|
+
hideHeader: props.hideHeader
|
|
132
|
+
})));
|
|
133
|
+
if (process.env.NODE_ENV !== "production") warning(!mergedValue.value || mergedValue.value.every((val) => mergedGenerateConfig.value.isValidate(val)), "Invalidate date pass to `value` or `defaultValue`.");
|
|
134
|
+
return () => {
|
|
135
|
+
const PanelComponent = props.components?.[internalMode.value] || DefaultComponents[internalMode.value] || DatePanel_default;
|
|
136
|
+
const panelCls = `${mergedPrefixCls.value}-panel`;
|
|
137
|
+
const panelProps = pickProps(props, [
|
|
138
|
+
"showWeek",
|
|
139
|
+
"prevIcon",
|
|
140
|
+
"nextIcon",
|
|
141
|
+
"superPrevIcon",
|
|
142
|
+
"superNextIcon",
|
|
143
|
+
"disabledDate",
|
|
144
|
+
"minDate",
|
|
145
|
+
"maxDate",
|
|
146
|
+
"onHover"
|
|
147
|
+
]);
|
|
148
|
+
return createVNode("div", mergeProps({
|
|
149
|
+
"ref": rootRef,
|
|
150
|
+
"tabindex": props.tabindex,
|
|
151
|
+
"class": clsx(panelCls, { [`${panelCls}-rtl`]: props.direction === "rtl" })
|
|
152
|
+
}, attrs), [createVNode(PanelComponent, mergeProps(panelProps, {
|
|
153
|
+
"showTime": mergedShowTime.value,
|
|
154
|
+
"prefixCls": mergedPrefixCls.value,
|
|
155
|
+
"locale": filledLocale.value,
|
|
156
|
+
"generateConfig": mergedGenerateConfig.value,
|
|
157
|
+
"onModeChange": triggerModeChange,
|
|
158
|
+
"pickerValue": mergedPickerValue.value,
|
|
159
|
+
"onPickerValueChange": (nextPickerValue) => {
|
|
160
|
+
setPickerValue(nextPickerValue, true);
|
|
161
|
+
},
|
|
162
|
+
"value": mergedValue.value[0],
|
|
163
|
+
"onSelect": onPanelValueSelect,
|
|
164
|
+
"values": mergedValue.value,
|
|
165
|
+
"cellRender": onInternalCellRender,
|
|
166
|
+
"hoverRangeValue": hoverRangeDate.value,
|
|
167
|
+
"hoverValue": props.hoverValue
|
|
168
|
+
}), null)]);
|
|
169
|
+
};
|
|
170
|
+
}, {
|
|
171
|
+
props: {
|
|
172
|
+
prefixCls: {
|
|
173
|
+
type: String,
|
|
174
|
+
required: false,
|
|
175
|
+
default: void 0
|
|
176
|
+
},
|
|
177
|
+
direction: {
|
|
178
|
+
type: String,
|
|
179
|
+
required: false,
|
|
180
|
+
default: void 0
|
|
181
|
+
},
|
|
182
|
+
onSelect: {
|
|
183
|
+
type: Function,
|
|
184
|
+
required: false,
|
|
185
|
+
default: void 0
|
|
186
|
+
},
|
|
187
|
+
defaultPickerValue: {
|
|
188
|
+
required: false,
|
|
189
|
+
default: void 0
|
|
190
|
+
},
|
|
191
|
+
pickerValue: {
|
|
192
|
+
required: false,
|
|
193
|
+
default: void 0
|
|
194
|
+
},
|
|
195
|
+
onPickerValueChange: {
|
|
196
|
+
type: Function,
|
|
197
|
+
required: false,
|
|
198
|
+
default: void 0
|
|
199
|
+
},
|
|
200
|
+
mode: {
|
|
201
|
+
type: String,
|
|
202
|
+
required: false,
|
|
203
|
+
default: void 0
|
|
204
|
+
},
|
|
205
|
+
onPanelChange: {
|
|
206
|
+
type: Function,
|
|
207
|
+
required: false,
|
|
208
|
+
default: void 0
|
|
209
|
+
},
|
|
210
|
+
picker: {
|
|
211
|
+
type: String,
|
|
212
|
+
required: false,
|
|
213
|
+
default: void 0
|
|
214
|
+
},
|
|
215
|
+
showTime: {
|
|
216
|
+
type: [Boolean, Object],
|
|
217
|
+
required: false,
|
|
218
|
+
default: void 0
|
|
219
|
+
},
|
|
220
|
+
showWeek: {
|
|
221
|
+
type: Boolean,
|
|
222
|
+
required: false,
|
|
223
|
+
default: void 0
|
|
224
|
+
},
|
|
225
|
+
cellRender: {
|
|
226
|
+
type: Function,
|
|
227
|
+
required: false,
|
|
228
|
+
default: void 0
|
|
229
|
+
},
|
|
230
|
+
dateRender: {
|
|
231
|
+
type: Function,
|
|
232
|
+
required: false,
|
|
233
|
+
default: void 0
|
|
234
|
+
},
|
|
235
|
+
monthCellRender: {
|
|
236
|
+
type: Function,
|
|
237
|
+
required: false,
|
|
238
|
+
default: void 0
|
|
239
|
+
},
|
|
240
|
+
hoverValue: {
|
|
241
|
+
type: Array,
|
|
242
|
+
required: false,
|
|
243
|
+
default: void 0
|
|
244
|
+
},
|
|
245
|
+
hoverRangeValue: {
|
|
246
|
+
type: Array,
|
|
247
|
+
required: false,
|
|
248
|
+
default: void 0
|
|
249
|
+
},
|
|
250
|
+
onHover: {
|
|
251
|
+
type: Function,
|
|
252
|
+
required: false,
|
|
253
|
+
default: void 0
|
|
254
|
+
},
|
|
255
|
+
components: {
|
|
256
|
+
type: Object,
|
|
257
|
+
required: false,
|
|
258
|
+
default: void 0
|
|
259
|
+
},
|
|
260
|
+
hideHeader: {
|
|
261
|
+
type: Boolean,
|
|
262
|
+
required: false,
|
|
263
|
+
default: void 0
|
|
264
|
+
},
|
|
265
|
+
locale: {
|
|
266
|
+
type: Object,
|
|
267
|
+
required: false,
|
|
268
|
+
default: void 0
|
|
269
|
+
},
|
|
270
|
+
generateConfig: {
|
|
271
|
+
type: Object,
|
|
272
|
+
required: false,
|
|
273
|
+
default: void 0
|
|
274
|
+
},
|
|
275
|
+
disabledDate: {
|
|
276
|
+
type: Function,
|
|
277
|
+
required: false,
|
|
278
|
+
default: void 0
|
|
279
|
+
},
|
|
280
|
+
minDate: {
|
|
281
|
+
required: false,
|
|
282
|
+
default: void 0
|
|
283
|
+
},
|
|
284
|
+
maxDate: {
|
|
285
|
+
required: false,
|
|
286
|
+
default: void 0
|
|
287
|
+
},
|
|
288
|
+
prevIcon: {
|
|
289
|
+
type: [
|
|
290
|
+
Object,
|
|
291
|
+
Function,
|
|
292
|
+
String,
|
|
293
|
+
Number,
|
|
294
|
+
null,
|
|
295
|
+
Boolean,
|
|
296
|
+
Array
|
|
297
|
+
],
|
|
298
|
+
required: false,
|
|
299
|
+
default: void 0
|
|
300
|
+
},
|
|
301
|
+
nextIcon: {
|
|
302
|
+
type: [
|
|
303
|
+
Object,
|
|
304
|
+
Function,
|
|
305
|
+
String,
|
|
306
|
+
Number,
|
|
307
|
+
null,
|
|
308
|
+
Boolean,
|
|
309
|
+
Array
|
|
310
|
+
],
|
|
311
|
+
required: false,
|
|
312
|
+
default: void 0
|
|
313
|
+
},
|
|
314
|
+
superPrevIcon: {
|
|
315
|
+
type: [
|
|
316
|
+
Object,
|
|
317
|
+
Function,
|
|
318
|
+
String,
|
|
319
|
+
Number,
|
|
320
|
+
null,
|
|
321
|
+
Boolean,
|
|
322
|
+
Array
|
|
323
|
+
],
|
|
324
|
+
required: false,
|
|
325
|
+
default: void 0
|
|
326
|
+
},
|
|
327
|
+
superNextIcon: {
|
|
328
|
+
type: [
|
|
329
|
+
Object,
|
|
330
|
+
Function,
|
|
331
|
+
String,
|
|
332
|
+
Number,
|
|
333
|
+
null,
|
|
334
|
+
Boolean,
|
|
335
|
+
Array
|
|
336
|
+
],
|
|
337
|
+
required: false,
|
|
338
|
+
default: void 0
|
|
339
|
+
},
|
|
340
|
+
format: {
|
|
341
|
+
type: String,
|
|
342
|
+
required: false,
|
|
343
|
+
default: void 0
|
|
344
|
+
},
|
|
345
|
+
showNow: {
|
|
346
|
+
type: Boolean,
|
|
347
|
+
required: false,
|
|
348
|
+
default: void 0
|
|
349
|
+
},
|
|
350
|
+
showHour: {
|
|
351
|
+
type: Boolean,
|
|
352
|
+
required: false,
|
|
353
|
+
default: void 0
|
|
354
|
+
},
|
|
355
|
+
showMinute: {
|
|
356
|
+
type: Boolean,
|
|
357
|
+
required: false,
|
|
358
|
+
default: void 0
|
|
359
|
+
},
|
|
360
|
+
showSecond: {
|
|
361
|
+
type: Boolean,
|
|
362
|
+
required: false,
|
|
363
|
+
default: void 0
|
|
364
|
+
},
|
|
365
|
+
showMillisecond: {
|
|
366
|
+
type: Boolean,
|
|
367
|
+
required: false,
|
|
368
|
+
default: void 0
|
|
369
|
+
},
|
|
370
|
+
use12Hours: {
|
|
371
|
+
type: Boolean,
|
|
372
|
+
required: false,
|
|
373
|
+
default: void 0
|
|
374
|
+
},
|
|
375
|
+
hourStep: {
|
|
376
|
+
required: false,
|
|
377
|
+
default: void 0
|
|
378
|
+
},
|
|
379
|
+
minuteStep: {
|
|
380
|
+
required: false,
|
|
381
|
+
default: void 0
|
|
382
|
+
},
|
|
383
|
+
secondStep: {
|
|
384
|
+
required: false,
|
|
385
|
+
default: void 0
|
|
386
|
+
},
|
|
387
|
+
millisecondStep: {
|
|
388
|
+
required: false,
|
|
389
|
+
default: void 0
|
|
390
|
+
},
|
|
391
|
+
hideDisabledOptions: {
|
|
392
|
+
type: Boolean,
|
|
393
|
+
required: false,
|
|
394
|
+
default: void 0
|
|
395
|
+
},
|
|
396
|
+
defaultValue: {
|
|
397
|
+
type: [Array, null],
|
|
398
|
+
required: false,
|
|
399
|
+
default: void 0
|
|
400
|
+
},
|
|
401
|
+
defaultOpenValue: {
|
|
402
|
+
required: false,
|
|
403
|
+
default: void 0
|
|
404
|
+
},
|
|
405
|
+
disabledHours: {
|
|
406
|
+
type: Function,
|
|
407
|
+
required: false,
|
|
408
|
+
default: void 0
|
|
409
|
+
},
|
|
410
|
+
disabledMinutes: {
|
|
411
|
+
type: Function,
|
|
412
|
+
required: false,
|
|
413
|
+
default: void 0
|
|
414
|
+
},
|
|
415
|
+
disabledSeconds: {
|
|
416
|
+
type: Function,
|
|
417
|
+
required: false,
|
|
418
|
+
default: void 0
|
|
419
|
+
},
|
|
420
|
+
disabledTime: {
|
|
421
|
+
type: Function,
|
|
422
|
+
required: false,
|
|
423
|
+
default: void 0
|
|
424
|
+
},
|
|
425
|
+
changeOnScroll: {
|
|
426
|
+
type: Boolean,
|
|
427
|
+
required: false,
|
|
428
|
+
default: void 0
|
|
429
|
+
},
|
|
430
|
+
tabindex: {
|
|
431
|
+
type: [
|
|
432
|
+
Number,
|
|
433
|
+
String,
|
|
434
|
+
null
|
|
435
|
+
],
|
|
436
|
+
required: false,
|
|
437
|
+
default: void 0
|
|
438
|
+
},
|
|
439
|
+
multiple: {
|
|
440
|
+
type: Boolean,
|
|
441
|
+
required: false,
|
|
442
|
+
default: void 0
|
|
443
|
+
},
|
|
444
|
+
value: {
|
|
445
|
+
required: false,
|
|
446
|
+
default: void 0
|
|
447
|
+
},
|
|
448
|
+
onChange: {
|
|
449
|
+
type: Function,
|
|
450
|
+
required: false,
|
|
451
|
+
default: void 0
|
|
452
|
+
},
|
|
453
|
+
styles: {
|
|
454
|
+
type: Object,
|
|
455
|
+
required: false,
|
|
456
|
+
default: void 0
|
|
457
|
+
},
|
|
458
|
+
classNames: {
|
|
459
|
+
type: Object,
|
|
460
|
+
required: false,
|
|
461
|
+
default: void 0
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
name: "PickerPanel",
|
|
465
|
+
inheritAttrs: false
|
|
466
|
+
});
|
|
467
|
+
export { PickerPanel_default as default };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
6
|
+
const require_context = require("../PickerInput/context.cjs");
|
|
7
|
+
const require_uiUtil = require("../utils/uiUtil.cjs");
|
|
8
|
+
let vue = require("vue");
|
|
9
|
+
let _v_c_util = require("@v-c/util");
|
|
10
|
+
let _v_c_trigger = require("@v-c/trigger");
|
|
11
|
+
_v_c_trigger = require_rolldown_runtime.__toESM(_v_c_trigger);
|
|
12
|
+
var BUILT_IN_PLACEMENTS = {
|
|
13
|
+
bottomLeft: {
|
|
14
|
+
points: ["tl", "bl"],
|
|
15
|
+
offset: [0, 4],
|
|
16
|
+
overflow: {
|
|
17
|
+
adjustX: 1,
|
|
18
|
+
adjustY: 1
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
bottomRight: {
|
|
22
|
+
points: ["tr", "br"],
|
|
23
|
+
offset: [0, 4],
|
|
24
|
+
overflow: {
|
|
25
|
+
adjustX: 1,
|
|
26
|
+
adjustY: 1
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
topLeft: {
|
|
30
|
+
points: ["bl", "tl"],
|
|
31
|
+
offset: [0, -4],
|
|
32
|
+
overflow: {
|
|
33
|
+
adjustX: 0,
|
|
34
|
+
adjustY: 1
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
topRight: {
|
|
38
|
+
points: ["br", "tr"],
|
|
39
|
+
offset: [0, -4],
|
|
40
|
+
overflow: {
|
|
41
|
+
adjustX: 0,
|
|
42
|
+
adjustY: 1
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
var PickerTrigger = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots }) => {
|
|
47
|
+
const ctx = require_context.usePickerContext();
|
|
48
|
+
const dropdownPrefixCls = (0, vue.computed)(() => `${ctx.value.prefixCls}-dropdown`);
|
|
49
|
+
const realPlacement = (0, vue.computed)(() => require_uiUtil.getRealPlacement(props.placement, props.direction === "rtl"));
|
|
50
|
+
return () => (0, vue.createVNode)(_v_c_trigger.default, {
|
|
51
|
+
"showAction": [],
|
|
52
|
+
"hideAction": ["click"],
|
|
53
|
+
"popupPlacement": realPlacement.value,
|
|
54
|
+
"builtinPlacements": props.builtinPlacements || BUILT_IN_PLACEMENTS,
|
|
55
|
+
"prefixCls": dropdownPrefixCls.value,
|
|
56
|
+
"popupMotion": props.transitionName ? { motionName: props.transitionName } : void 0,
|
|
57
|
+
"popup": props.popupElement,
|
|
58
|
+
"popupAlign": props.popupAlign,
|
|
59
|
+
"popupVisible": props.visible,
|
|
60
|
+
"popupClassName": (0, _v_c_util.clsx)(props.popupClassName, {
|
|
61
|
+
[`${dropdownPrefixCls.value}-range`]: props.range,
|
|
62
|
+
[`${dropdownPrefixCls.value}-rtl`]: props.direction === "rtl"
|
|
63
|
+
}),
|
|
64
|
+
"popupStyle": props.popupStyle,
|
|
65
|
+
"stretch": "minWidth",
|
|
66
|
+
"getPopupContainer": props.getPopupContainer,
|
|
67
|
+
"onPopupVisibleChange": (nextVisible) => {
|
|
68
|
+
if (!nextVisible) props.onClose?.();
|
|
69
|
+
}
|
|
70
|
+
}, { default: () => [slots.default?.()] });
|
|
71
|
+
}, {
|
|
72
|
+
props: {
|
|
73
|
+
popupElement: {
|
|
74
|
+
required: false,
|
|
75
|
+
default: void 0
|
|
76
|
+
},
|
|
77
|
+
popupStyle: {
|
|
78
|
+
type: Object,
|
|
79
|
+
required: false,
|
|
80
|
+
default: void 0
|
|
81
|
+
},
|
|
82
|
+
transitionName: {
|
|
83
|
+
type: String,
|
|
84
|
+
required: false,
|
|
85
|
+
default: void 0
|
|
86
|
+
},
|
|
87
|
+
getPopupContainer: {
|
|
88
|
+
type: Function,
|
|
89
|
+
required: false,
|
|
90
|
+
default: void 0
|
|
91
|
+
},
|
|
92
|
+
popupAlign: {
|
|
93
|
+
type: Object,
|
|
94
|
+
required: false,
|
|
95
|
+
default: void 0
|
|
96
|
+
},
|
|
97
|
+
range: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
required: false,
|
|
100
|
+
default: void 0
|
|
101
|
+
},
|
|
102
|
+
popupClassName: {
|
|
103
|
+
type: String,
|
|
104
|
+
required: false,
|
|
105
|
+
default: void 0
|
|
106
|
+
},
|
|
107
|
+
placement: {
|
|
108
|
+
type: String,
|
|
109
|
+
required: false,
|
|
110
|
+
default: void 0
|
|
111
|
+
},
|
|
112
|
+
builtinPlacements: {
|
|
113
|
+
type: Object,
|
|
114
|
+
required: false,
|
|
115
|
+
default: void 0
|
|
116
|
+
},
|
|
117
|
+
direction: {
|
|
118
|
+
type: String,
|
|
119
|
+
required: false,
|
|
120
|
+
default: void 0
|
|
121
|
+
},
|
|
122
|
+
visible: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
required: false,
|
|
125
|
+
default: void 0
|
|
126
|
+
},
|
|
127
|
+
onClose: {
|
|
128
|
+
type: Function,
|
|
129
|
+
required: false,
|
|
130
|
+
default: void 0
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
name: "PickerTrigger",
|
|
134
|
+
inheritAttrs: false
|
|
135
|
+
});
|
|
136
|
+
var PickerTrigger_default = PickerTrigger;
|
|
137
|
+
exports.default = PickerTrigger_default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AlignType, BuildInPlacements } from '../../../trigger/src';
|
|
2
|
+
import { CSSProperties } from 'vue';
|
|
3
|
+
export interface PickerTriggerProps {
|
|
4
|
+
popupElement?: any;
|
|
5
|
+
popupStyle?: CSSProperties;
|
|
6
|
+
transitionName?: string;
|
|
7
|
+
getPopupContainer?: (node: HTMLElement) => HTMLElement;
|
|
8
|
+
popupAlign?: AlignType;
|
|
9
|
+
range?: boolean;
|
|
10
|
+
popupClassName?: string;
|
|
11
|
+
placement?: string;
|
|
12
|
+
builtinPlacements?: BuildInPlacements;
|
|
13
|
+
direction?: 'ltr' | 'rtl';
|
|
14
|
+
visible?: boolean;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
}
|
|
17
|
+
declare const PickerTrigger: import('vue').DefineSetupFnComponent<PickerTriggerProps, {}, {}, PickerTriggerProps & {}, import('vue').PublicProps>;
|
|
18
|
+
export default PickerTrigger;
|