naive-ui 2.21.5 → 2.23.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.
- package/es/_internal/clear/src/styles/index.cssr.js +10 -10
- package/es/_internal/close/src/styles/index.cssr.js +8 -8
- package/es/_internal/icons/Close.js +1 -1
- package/es/_internal/scrollbar/src/ScrollBar.d.ts +10 -6
- package/es/_internal/scrollbar/src/ScrollBar.js +15 -11
- package/es/_internal/scrollbar/src/styles/index.cssr.js +15 -15
- package/es/_internal/select-menu/src/SelectMenu.d.ts +21 -21
- package/es/_internal/select-menu/src/SelectMenu.js +21 -21
- package/es/_internal/select-menu/src/styles/index.cssr.js +35 -35
- package/es/_internal/select-menu/styles/_common.js +1 -1
- package/es/_internal/selection/src/Selection.d.ts +44 -44
- package/es/_internal/selection/src/Selection.js +55 -53
- package/es/_internal/selection/src/styles/index.cssr.js +84 -80
- package/es/_mixins/common.d.ts +1 -0
- package/es/_mixins/common.js +1 -0
- package/es/_mixins/index.d.ts +1 -0
- package/es/_mixins/index.js +1 -0
- package/es/_mixins/use-css-vars-class.d.ts +2 -0
- package/es/_mixins/use-css-vars-class.js +22 -0
- package/es/_mixins/use-rtl.js +2 -0
- package/es/_mixins/use-style.js +3 -0
- package/es/_mixins/use-theme.js +3 -0
- package/es/_utils/composable/use-houdini.js +12 -9
- package/es/alert/src/Alert.d.ts +22 -22
- package/es/alert/src/Alert.js +22 -22
- package/es/alert/src/styles/index.cssr.js +45 -45
- package/es/anchor/src/AnchorAdapter.js +12 -12
- package/es/anchor/src/styles/index.cssr.js +41 -41
- package/es/auto-complete/src/AutoComplete.d.ts +2 -2
- package/es/auto-complete/src/AutoComplete.js +2 -2
- package/es/auto-complete/src/styles/index.cssr.js +4 -4
- package/es/avatar/index.d.ts +2 -0
- package/es/avatar/index.js +1 -0
- package/es/avatar/src/Avatar.d.ts +77 -36
- package/es/avatar/src/Avatar.js +46 -16
- package/es/avatar/src/AvatarGroup.d.ts +52 -0
- package/es/avatar/src/AvatarGroup.js +61 -0
- package/es/avatar/src/interface.d.ts +2 -0
- package/es/avatar/src/interface.js +1 -0
- package/es/avatar/src/styles/avatar-group.cssr.d.ts +2 -0
- package/es/avatar/src/styles/avatar-group.cssr.js +14 -0
- package/es/avatar/src/styles/index.cssr.js +21 -18
- package/es/avatar/styles/light.d.ts +3 -0
- package/es/avatar/styles/light.js +6 -2
- package/es/back-top/src/BackTop.d.ts +13 -13
- package/es/back-top/src/BackTop.js +13 -13
- package/es/back-top/src/styles/index.cssr.js +29 -29
- package/es/badge/src/Badge.d.ts +6 -6
- package/es/badge/src/Badge.js +6 -6
- package/es/badge/src/styles/index.cssr.js +15 -15
- package/es/breadcrumb/src/Breadcrumb.d.ts +8 -8
- package/es/breadcrumb/src/Breadcrumb.js +8 -8
- package/es/breadcrumb/src/styles/index.cssr.js +23 -23
- package/es/button/src/Button.d.ts +43 -38
- package/es/button/src/Button.js +124 -116
- package/es/button/src/styles/button.cssr.js +83 -80
- package/es/button/styles/light.js +1 -1
- package/es/calendar/src/Calendar.d.ts +23 -21
- package/es/calendar/src/Calendar.js +21 -21
- package/es/calendar/src/styles/index.cssr.js +57 -57
- package/es/card/src/Card.d.ts +28 -23
- package/es/card/src/Card.js +24 -23
- package/es/card/src/styles/index.cssr.js +71 -69
- package/es/carousel/src/Carousel.d.ts +5 -5
- package/es/carousel/src/Carousel.js +5 -5
- package/es/carousel/src/styles/index.cssr.js +10 -10
- package/es/cascader/src/Cascader.d.ts +160 -17
- package/es/cascader/src/Cascader.js +32 -24
- package/es/cascader/src/CascaderMenu.d.ts +345 -0
- package/es/cascader/src/CascaderMenu.js +7 -6
- package/es/cascader/src/CascaderOption.d.ts +18 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +18 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +18 -0
- package/es/cascader/src/styles/index.cssr.js +44 -44
- package/es/cascader/styles/dark.js +3 -1
- package/es/cascader/styles/light.d.ts +13 -0
- package/es/cascader/styles/light.js +4 -2
- package/es/checkbox/src/Checkbox.d.ts +23 -23
- package/es/checkbox/src/Checkbox.js +23 -23
- package/es/checkbox/src/styles/index.cssr.js +58 -58
- package/es/code/src/Code.d.ts +14 -14
- package/es/code/src/Code.js +26 -17
- package/es/code/src/styles/index.cssr.js +28 -28
- package/es/collapse/src/Collapse.d.ts +8 -8
- package/es/collapse/src/Collapse.js +8 -8
- package/es/collapse/src/styles/index.cssr.js +24 -24
- package/es/collapse-transition/src/CollapseTransition.d.ts +1 -1
- package/es/collapse-transition/src/CollapseTransition.js +1 -1
- package/es/color-picker/src/ColorPicker.d.ts +10 -10
- package/es/color-picker/src/ColorPicker.js +10 -10
- package/es/color-picker/src/styles/index.cssr.js +28 -28
- package/es/components.d.ts +2 -0
- package/es/components.js +2 -0
- package/es/config-provider/src/ConfigProvider.d.ts +6 -0
- package/es/countdown/index.d.ts +2 -0
- package/es/countdown/index.js +1 -0
- package/es/countdown/src/Countdown.d.ts +72 -0
- package/es/countdown/src/Countdown.js +126 -0
- package/es/countdown/src/utils.d.ts +0 -0
- package/es/countdown/src/utils.js +1 -0
- package/es/data-table/src/DataTable.d.ts +39 -39
- package/es/data-table/src/DataTable.js +49 -55
- package/es/data-table/src/MainTable.js +2 -3
- package/es/data-table/src/TableParts/Body.d.ts +15 -4
- package/es/data-table/src/TableParts/Body.js +82 -28
- package/es/data-table/src/TableParts/Cell.js +2 -3
- package/es/data-table/src/TableParts/Header.js +2 -2
- package/es/data-table/src/interface.d.ts +4 -1
- package/es/data-table/src/styles/index.cssr.js +133 -132
- package/es/data-table/src/use-check.js +6 -2
- package/es/data-table/src/use-scroll.d.ts +2 -0
- package/es/data-table/src/use-scroll.js +34 -4
- package/es/data-table/src/use-table-data.js +3 -1
- package/es/data-table/styles/_common.js +1 -1
- package/es/date-picker/src/DatePicker.d.ts +70 -46
- package/es/date-picker/src/DatePicker.js +61 -52
- package/es/date-picker/src/config.d.ts +1 -1
- package/es/date-picker/src/interface.d.ts +2 -1
- package/es/date-picker/src/panel/date.d.ts +13 -10
- package/es/date-picker/src/panel/date.js +2 -2
- package/es/date-picker/src/panel/daterange.d.ts +11 -9
- package/es/date-picker/src/panel/daterange.js +2 -2
- package/es/date-picker/src/panel/datetime.d.ts +13 -16
- package/es/date-picker/src/panel/datetime.js +2 -2
- package/es/date-picker/src/panel/datetimerange.d.ts +11 -9
- package/es/date-picker/src/panel/datetimerange.js +2 -2
- package/es/date-picker/src/panel/month.d.ts +17 -20
- package/es/date-picker/src/panel/month.js +23 -12
- package/es/date-picker/src/panel/use-calendar.d.ts +13 -39
- package/es/date-picker/src/panel/use-calendar.js +41 -23
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +9 -36
- package/es/date-picker/src/panel/use-dual-calendar.js +35 -21
- package/es/date-picker/src/panel/use-panel-common.d.ts +9 -32
- package/es/date-picker/src/panel/use-panel-common.js +4 -8
- package/es/date-picker/src/styles/index.cssr.js +115 -115
- package/es/date-picker/src/utils.d.ts +19 -3
- package/es/date-picker/src/utils.js +40 -5
- package/es/date-picker/styles/_common.d.ts +2 -0
- package/es/date-picker/styles/_common.js +3 -1
- package/es/date-picker/styles/light.d.ts +4 -0
- package/es/descriptions/src/Descriptions.d.ts +18 -18
- package/es/descriptions/src/Descriptions.js +19 -20
- package/es/descriptions/src/styles/index.cssr.js +61 -61
- package/es/dialog/src/Dialog.d.ts +24 -24
- package/es/dialog/src/Dialog.js +22 -22
- package/es/dialog/src/DialogEnvironment.d.ts +2 -2
- package/es/dialog/src/DialogProvider.d.ts +1 -1
- package/es/dialog/src/styles/index.cssr.js +45 -45
- package/es/divider/src/Divider.d.ts +4 -4
- package/es/divider/src/Divider.js +4 -4
- package/es/divider/src/styles/index.cssr.js +12 -12
- package/es/drawer/src/Drawer.d.ts +19 -19
- package/es/drawer/src/Drawer.js +19 -19
- package/es/drawer/src/styles/index.cssr.js +41 -40
- package/es/dropdown/src/Dropdown.js +34 -32
- package/es/dropdown/src/styles/index.cssr.js +59 -59
- package/es/dynamic-tags/src/DynamicTags.d.ts +1 -1
- package/es/dynamic-tags/src/DynamicTags.js +1 -1
- package/es/dynamic-tags/src/styles/index.cssr.js +1 -1
- package/es/empty/src/Empty.d.ts +19 -15
- package/es/empty/src/Empty.js +12 -12
- package/es/empty/src/styles/index.cssr.js +20 -19
- package/es/form/src/Form.d.ts +27 -27
- package/es/form/src/FormItem.d.ts +42 -42
- package/es/form/src/FormItem.js +15 -15
- package/es/form/src/FormItemCol.d.ts +33 -27
- package/es/form/src/FormItemCol.js +1 -0
- package/es/form/src/FormItemGridItem.d.ts +33 -27
- package/es/form/src/FormItemGridItem.js +1 -0
- package/es/form/src/FormItemRow.d.ts +33 -27
- package/es/form/src/FormItemRow.js +1 -0
- package/es/form/src/styles/form-item.cssr.js +37 -37
- package/es/form/styles/_common.d.ts +0 -3
- package/es/form/styles/_common.js +0 -3
- package/es/form/styles/light.d.ts +3 -3
- package/es/form/styles/light.js +2 -2
- package/es/gradient-text/src/GradientText.d.ts +5 -5
- package/es/gradient-text/src/GradientText.js +5 -5
- package/es/gradient-text/src/styles/index.cssr.js +9 -9
- package/es/icon/src/Icon.d.ts +6 -6
- package/es/icon/src/Icon.js +4 -4
- package/es/icon/src/styles/index.cssr.js +7 -7
- package/es/image/src/Image.js +8 -12
- package/es/image/src/ImagePreview.d.ts +2 -2
- package/es/image/src/ImagePreview.js +13 -12
- package/es/image/src/styles/index.cssr.js +5 -5
- package/es/input/src/Input.d.ts +52 -47
- package/es/input/src/Input.js +54 -49
- package/es/input/src/InputGroupLabel.d.ts +8 -8
- package/es/input/src/InputGroupLabel.js +8 -8
- package/es/input/src/styles/input-group-label.cssr.js +18 -18
- package/es/input/src/styles/input.cssr.js +108 -109
- package/es/input-number/src/InputNumber.d.ts +11 -0
- package/es/input-number/src/InputNumber.js +5 -2
- package/es/input-number/src/utils.js +2 -1
- package/es/layout/src/Layout.d.ts +6 -6
- package/es/layout/src/Layout.js +3 -3
- package/es/layout/src/LayoutContent.d.ts +3 -3
- package/es/layout/src/LayoutFooter.js +7 -7
- package/es/layout/src/LayoutHeader.js +7 -7
- package/es/layout/src/LayoutSider.js +13 -13
- package/es/layout/src/styles/layout-footer.cssr.js +11 -11
- package/es/layout/src/styles/layout-header.cssr.js +11 -11
- package/es/layout/src/styles/layout-sider.cssr.js +32 -32
- package/es/layout/src/styles/layout.cssr.js +8 -8
- package/es/list/src/List.d.ts +10 -10
- package/es/list/src/List.js +10 -10
- package/es/list/src/styles/index.cssr.js +30 -30
- package/es/loading-bar/src/LoadingBar.d.ts +3 -3
- package/es/loading-bar/src/LoadingBar.js +3 -3
- package/es/loading-bar/src/styles/index.cssr.js +7 -7
- package/es/locales/common/deDE.js +2 -0
- package/es/locales/common/enUS.d.ts +2 -0
- package/es/locales/common/enUS.js +2 -0
- package/es/locales/common/frFR.js +7 -5
- package/es/locales/common/idID.js +2 -0
- package/es/locales/common/jaJP.js +2 -0
- package/es/locales/common/nbNO.js +2 -0
- package/es/locales/common/ruRU.js +2 -0
- package/es/locales/common/ukUA.js +2 -0
- package/es/locales/common/zhCN.js +2 -0
- package/es/locales/common/zhTW.d.ts +3 -0
- package/es/locales/common/zhTW.js +100 -0
- package/es/locales/date/zhTW.d.ts +3 -0
- package/es/locales/date/zhTW.js +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.js +2 -0
- package/es/log/src/Log.d.ts +6 -6
- package/es/log/src/Log.js +6 -6
- package/es/log/src/styles/index.cssr.js +16 -18
- package/es/mention/src/Mention.d.ts +1 -1
- package/es/mention/src/Mention.js +1 -1
- package/es/mention/src/styles/index.cssr.js +2 -2
- package/es/menu/src/Menu.js +43 -40
- package/es/menu/src/styles/index.cssr.js +71 -71
- package/es/message/src/Message.d.ts +22 -22
- package/es/message/src/Message.js +22 -22
- package/es/message/src/styles/index.cssr.js +48 -48
- package/es/modal/src/BodyWrapper.d.ts +11 -2
- package/es/modal/src/BodyWrapper.js +23 -17
- package/es/modal/src/Modal.d.ts +14 -8
- package/es/modal/src/Modal.js +13 -7
- package/es/modal/src/presetProps.d.ts +2 -1
- package/es/modal/src/styles/index.cssr.js +8 -8
- package/es/notification/src/Notification.d.ts +24 -24
- package/es/notification/src/Notification.js +24 -24
- package/es/notification/src/styles/index.cssr.js +65 -65
- package/es/number-animation/index.d.ts +3 -0
- package/es/number-animation/index.js +1 -0
- package/es/number-animation/src/NumberAnimation.d.ts +79 -0
- package/es/number-animation/src/NumberAnimation.js +81 -0
- package/es/number-animation/src/utils.d.ts +8 -0
- package/es/number-animation/src/utils.js +17 -0
- package/es/page-header/src/PageHeader.d.ts +10 -10
- package/es/page-header/src/PageHeader.js +13 -13
- package/es/page-header/src/styles/index.cssr.js +25 -27
- package/es/pagination/src/Pagination.d.ts +42 -41
- package/es/pagination/src/Pagination.js +52 -45
- package/es/pagination/src/styles/index.cssr.js +81 -81
- package/es/popconfirm/src/Popconfirm.d.ts +2 -2
- package/es/popconfirm/src/PopconfirmPanel.d.ts +4 -4
- package/es/popconfirm/src/PopconfirmPanel.js +4 -4
- package/es/popconfirm/src/styles/index.cssr.js +8 -8
- package/es/popover/src/Popover.js +4 -1
- package/es/popover/src/PopoverBody.js +18 -18
- package/es/popover/src/styles/index.cssr.js +62 -62
- package/es/popselect/src/Popselect.d.ts +2 -11
- package/es/popselect/src/Popselect.js +2 -2
- package/es/popselect/src/PopselectPanel.d.ts +3 -11
- package/es/popselect/src/PopselectPanel.js +17 -11
- package/es/progress/src/Progress.d.ts +14 -14
- package/es/progress/src/Progress.js +14 -14
- package/es/progress/src/styles/index.cssr.js +53 -53
- package/es/radio/src/Radio.d.ts +15 -15
- package/es/radio/src/Radio.js +18 -18
- package/es/radio/src/RadioButton.js +4 -5
- package/es/radio/src/RadioGroup.d.ts +14 -14
- package/es/radio/src/RadioGroup.js +14 -14
- package/es/radio/src/styles/radio-group.cssr.js +51 -47
- package/es/radio/src/styles/radio.cssr.js +44 -40
- package/es/radio/src/use-radio.d.ts +0 -3
- package/es/radio/src/use-radio.js +1 -26
- package/es/rate/src/Rate.d.ts +4 -4
- package/es/rate/src/Rate.js +4 -4
- package/es/rate/src/styles/index.cssr.js +11 -11
- package/es/result/src/Result.d.ts +9 -9
- package/es/result/src/Result.js +9 -9
- package/es/result/src/styles/index.cssr.js +20 -20
- package/es/select/src/Select.d.ts +1 -1
- package/es/select/src/Select.js +1 -1
- package/es/select/src/styles/index.cssr.js +2 -2
- package/es/skeleton/src/Skeleton.d.ts +3 -3
- package/es/skeleton/src/Skeleton.js +3 -3
- package/es/skeleton/src/styles/index.cssr.js +12 -12
- package/es/slider/src/Slider.d.ts +29 -29
- package/es/slider/src/Slider.js +29 -29
- package/es/slider/src/styles/index.cssr.js +87 -87
- package/es/spin/src/Spin.d.ts +5 -5
- package/es/spin/src/Spin.js +5 -5
- package/es/spin/src/styles/index.cssr.js +15 -15
- package/es/statistic/src/Statistic.d.ts +25 -45
- package/es/statistic/src/Statistic.js +12 -19
- package/es/statistic/src/styles/index.cssr.js +19 -19
- package/es/steps/src/Step.d.ts +12 -12
- package/es/steps/src/Step.js +12 -12
- package/es/steps/src/styles/index.cssr.js +46 -46
- package/es/switch/src/Switch.d.ts +19 -19
- package/es/switch/src/Switch.js +26 -19
- package/es/switch/src/styles/index.cssr.js +59 -57
- package/es/table/src/Table.d.ts +21 -21
- package/es/table/src/Table.js +21 -21
- package/es/table/src/styles/index.cssr.js +55 -55
- package/es/tabs/src/styles/index.cssr.js +5 -1
- package/es/tabs/styles/light.js +1 -1
- package/es/tag/src/Tag.d.ts +27 -26
- package/es/tag/src/Tag.js +27 -26
- package/es/tag/src/styles/index.cssr.js +55 -55
- package/es/tag/src/styles/rtl.cssr.js +1 -1
- package/es/thing/src/Thing.js +5 -5
- package/es/thing/src/styles/index.cssr.js +11 -11
- package/es/time-picker/src/TimePicker.d.ts +19 -19
- package/es/time-picker/src/TimePicker.js +17 -17
- package/es/time-picker/src/styles/index.cssr.js +47 -47
- package/es/timeline/src/TimelineItem.d.ts +12 -12
- package/es/timeline/src/TimelineItem.js +12 -12
- package/es/timeline/src/styles/index.cssr.js +44 -44
- package/es/transfer/src/Transfer.d.ts +21 -21
- package/es/transfer/src/Transfer.js +21 -21
- package/es/transfer/src/TransferList.js +5 -7
- package/es/transfer/src/styles/index.cssr.js +47 -42
- package/es/tree/src/Tree.d.ts +11 -11
- package/es/tree/src/Tree.js +11 -11
- package/es/tree/src/dnd.js +2 -2
- package/es/tree/src/styles/index.cssr.js +33 -33
- package/es/tree-select/src/TreeSelect.d.ts +43 -6
- package/es/tree-select/src/TreeSelect.js +29 -14
- package/es/tree-select/src/styles/index.cssr.js +20 -11
- package/es/tree-select/styles/light.d.ts +6 -0
- package/es/tree-select/styles/light.js +5 -2
- package/es/typography/src/a.d.ts +2 -2
- package/es/typography/src/a.js +2 -2
- package/es/typography/src/blockquote.d.ts +5 -5
- package/es/typography/src/blockquote.js +5 -5
- package/es/typography/src/create-header.d.ts +8 -8
- package/es/typography/src/create-header.js +8 -8
- package/es/typography/src/headers.d.ts +48 -48
- package/es/typography/src/hr.d.ts +2 -1
- package/es/typography/src/hr.js +3 -1
- package/es/typography/src/ol.d.ts +7 -7
- package/es/typography/src/ol.js +7 -7
- package/es/typography/src/p.d.ts +5 -5
- package/es/typography/src/p.js +5 -5
- package/es/typography/src/styles/a.cssr.js +6 -6
- package/es/typography/src/styles/blockquote.cssr.js +11 -11
- package/es/typography/src/styles/header.cssr.js +19 -19
- package/es/typography/src/styles/hr.cssr.js +3 -3
- package/es/typography/src/styles/list.cssr.js +15 -15
- package/es/typography/src/styles/p.cssr.js +10 -10
- package/es/typography/src/styles/text.cssr.js +18 -18
- package/es/typography/src/text.d.ts +8 -7
- package/es/typography/src/text.js +9 -8
- package/es/typography/src/ul.d.ts +7 -7
- package/es/typography/src/ul.js +7 -7
- package/es/upload/src/Upload.d.ts +1 -1
- package/es/upload/src/Upload.js +16 -16
- package/es/upload/src/styles/index.cssr.js +36 -36
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/clear/src/styles/index.cssr.js +10 -10
- package/lib/_internal/close/src/styles/index.cssr.js +8 -8
- package/lib/_internal/icons/Close.js +1 -1
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +10 -6
- package/lib/_internal/scrollbar/src/ScrollBar.js +15 -11
- package/lib/_internal/scrollbar/src/styles/index.cssr.js +15 -15
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +21 -21
- package/lib/_internal/select-menu/src/SelectMenu.js +21 -21
- package/lib/_internal/select-menu/src/styles/index.cssr.js +35 -35
- package/lib/_internal/select-menu/styles/_common.js +1 -1
- package/lib/_internal/selection/src/Selection.d.ts +44 -44
- package/lib/_internal/selection/src/Selection.js +55 -53
- package/lib/_internal/selection/src/styles/index.cssr.js +84 -80
- package/lib/_mixins/common.d.ts +1 -0
- package/lib/_mixins/common.js +4 -0
- package/lib/_mixins/index.d.ts +1 -0
- package/lib/_mixins/index.js +3 -1
- package/lib/_mixins/use-css-vars-class.d.ts +2 -0
- package/lib/_mixins/use-css-vars-class.js +29 -0
- package/lib/_mixins/use-rtl.js +2 -0
- package/lib/_mixins/use-style.js +3 -0
- package/lib/_mixins/use-theme.js +3 -0
- package/lib/_utils/composable/use-houdini.js +12 -9
- package/lib/alert/src/Alert.d.ts +22 -22
- package/lib/alert/src/Alert.js +22 -22
- package/lib/alert/src/styles/index.cssr.js +45 -45
- package/lib/anchor/src/AnchorAdapter.js +12 -12
- package/lib/anchor/src/styles/index.cssr.js +41 -41
- package/lib/auto-complete/src/AutoComplete.d.ts +2 -2
- package/lib/auto-complete/src/AutoComplete.js +2 -2
- package/lib/auto-complete/src/styles/index.cssr.js +4 -4
- package/lib/avatar/index.d.ts +2 -0
- package/lib/avatar/index.js +3 -1
- package/lib/avatar/src/Avatar.d.ts +77 -36
- package/lib/avatar/src/Avatar.js +48 -17
- package/lib/avatar/src/AvatarGroup.d.ts +52 -0
- package/lib/avatar/src/AvatarGroup.js +67 -0
- package/lib/avatar/src/interface.d.ts +2 -0
- package/lib/avatar/src/interface.js +2 -0
- package/lib/avatar/src/styles/avatar-group.cssr.d.ts +2 -0
- package/lib/avatar/src/styles/avatar-group.cssr.js +21 -0
- package/lib/avatar/src/styles/index.cssr.js +20 -17
- package/lib/avatar/styles/light.d.ts +3 -0
- package/lib/avatar/styles/light.js +6 -2
- package/lib/back-top/src/BackTop.d.ts +13 -13
- package/lib/back-top/src/BackTop.js +13 -13
- package/lib/back-top/src/styles/index.cssr.js +29 -29
- package/lib/badge/src/Badge.d.ts +6 -6
- package/lib/badge/src/Badge.js +6 -6
- package/lib/badge/src/styles/index.cssr.js +15 -15
- package/lib/breadcrumb/src/Breadcrumb.d.ts +8 -8
- package/lib/breadcrumb/src/Breadcrumb.js +8 -8
- package/lib/breadcrumb/src/styles/index.cssr.js +23 -23
- package/lib/button/src/Button.d.ts +43 -38
- package/lib/button/src/Button.js +123 -115
- package/lib/button/src/styles/button.cssr.js +83 -80
- package/lib/button/styles/light.js +1 -1
- package/lib/calendar/src/Calendar.d.ts +23 -21
- package/lib/calendar/src/Calendar.js +21 -21
- package/lib/calendar/src/styles/index.cssr.js +57 -57
- package/lib/card/src/Card.d.ts +28 -23
- package/lib/card/src/Card.js +24 -23
- package/lib/card/src/styles/index.cssr.js +71 -69
- package/lib/carousel/src/Carousel.d.ts +5 -5
- package/lib/carousel/src/Carousel.js +5 -5
- package/lib/carousel/src/styles/index.cssr.js +10 -10
- package/lib/cascader/src/Cascader.d.ts +160 -17
- package/lib/cascader/src/Cascader.js +32 -24
- package/lib/cascader/src/CascaderMenu.d.ts +345 -0
- package/lib/cascader/src/CascaderMenu.js +7 -6
- package/lib/cascader/src/CascaderOption.d.ts +18 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +18 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +18 -0
- package/lib/cascader/src/styles/index.cssr.js +44 -44
- package/lib/cascader/styles/dark.js +3 -1
- package/lib/cascader/styles/light.d.ts +13 -0
- package/lib/cascader/styles/light.js +4 -2
- package/lib/checkbox/src/Checkbox.d.ts +23 -23
- package/lib/checkbox/src/Checkbox.js +23 -23
- package/lib/checkbox/src/styles/index.cssr.js +58 -58
- package/lib/code/src/Code.d.ts +14 -14
- package/lib/code/src/Code.js +26 -17
- package/lib/code/src/styles/index.cssr.js +28 -28
- package/lib/collapse/src/Collapse.d.ts +8 -8
- package/lib/collapse/src/Collapse.js +8 -8
- package/lib/collapse/src/styles/index.cssr.js +24 -24
- package/lib/collapse-transition/src/CollapseTransition.d.ts +1 -1
- package/lib/collapse-transition/src/CollapseTransition.js +1 -1
- package/lib/color-picker/src/ColorPicker.d.ts +10 -10
- package/lib/color-picker/src/ColorPicker.js +10 -10
- package/lib/color-picker/src/styles/index.cssr.js +28 -28
- package/lib/components.d.ts +2 -0
- package/lib/components.js +2 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +6 -0
- package/lib/countdown/index.d.ts +2 -0
- package/lib/countdown/index.js +8 -0
- package/lib/countdown/src/Countdown.d.ts +72 -0
- package/lib/countdown/src/Countdown.js +128 -0
- package/lib/countdown/src/utils.d.ts +0 -0
- package/lib/countdown/src/utils.js +1 -0
- package/lib/data-table/src/DataTable.d.ts +39 -39
- package/lib/data-table/src/DataTable.js +48 -54
- package/lib/data-table/src/MainTable.js +1 -2
- package/lib/data-table/src/TableParts/Body.d.ts +15 -4
- package/lib/data-table/src/TableParts/Body.js +80 -26
- package/lib/data-table/src/TableParts/Cell.js +2 -3
- package/lib/data-table/src/TableParts/Header.js +2 -2
- package/lib/data-table/src/interface.d.ts +4 -1
- package/lib/data-table/src/styles/index.cssr.js +133 -132
- package/lib/data-table/src/use-check.js +6 -2
- package/lib/data-table/src/use-scroll.d.ts +2 -0
- package/lib/data-table/src/use-scroll.js +34 -4
- package/lib/data-table/src/use-table-data.js +3 -1
- package/lib/data-table/styles/_common.js +1 -1
- package/lib/date-picker/src/DatePicker.d.ts +70 -46
- package/lib/date-picker/src/DatePicker.js +61 -52
- package/lib/date-picker/src/config.d.ts +1 -1
- package/lib/date-picker/src/interface.d.ts +2 -1
- package/lib/date-picker/src/panel/date.d.ts +13 -10
- package/lib/date-picker/src/panel/date.js +1 -1
- package/lib/date-picker/src/panel/daterange.d.ts +11 -9
- package/lib/date-picker/src/panel/daterange.js +1 -1
- package/lib/date-picker/src/panel/datetime.d.ts +13 -16
- package/lib/date-picker/src/panel/datetime.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +11 -9
- package/lib/date-picker/src/panel/datetimerange.js +2 -2
- package/lib/date-picker/src/panel/month.d.ts +17 -20
- package/lib/date-picker/src/panel/month.js +23 -12
- package/lib/date-picker/src/panel/use-calendar.d.ts +13 -39
- package/lib/date-picker/src/panel/use-calendar.js +40 -21
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +9 -36
- package/lib/date-picker/src/panel/use-dual-calendar.js +34 -19
- package/lib/date-picker/src/panel/use-panel-common.d.ts +9 -32
- package/lib/date-picker/src/panel/use-panel-common.js +5 -8
- package/lib/date-picker/src/styles/index.cssr.js +115 -115
- package/lib/date-picker/src/utils.d.ts +19 -3
- package/lib/date-picker/src/utils.js +41 -4
- package/lib/date-picker/styles/_common.d.ts +2 -0
- package/lib/date-picker/styles/_common.js +3 -1
- package/lib/date-picker/styles/light.d.ts +4 -0
- package/lib/descriptions/src/Descriptions.d.ts +18 -18
- package/lib/descriptions/src/Descriptions.js +19 -20
- package/lib/descriptions/src/styles/index.cssr.js +61 -61
- package/lib/dialog/src/Dialog.d.ts +24 -24
- package/lib/dialog/src/Dialog.js +22 -22
- package/lib/dialog/src/DialogEnvironment.d.ts +2 -2
- package/lib/dialog/src/DialogProvider.d.ts +1 -1
- package/lib/dialog/src/styles/index.cssr.js +45 -45
- package/lib/divider/src/Divider.d.ts +4 -4
- package/lib/divider/src/Divider.js +4 -4
- package/lib/divider/src/styles/index.cssr.js +12 -12
- package/lib/drawer/src/Drawer.d.ts +19 -19
- package/lib/drawer/src/Drawer.js +19 -19
- package/lib/drawer/src/styles/index.cssr.js +41 -40
- package/lib/dropdown/src/Dropdown.js +34 -32
- package/lib/dropdown/src/styles/index.cssr.js +59 -59
- package/lib/dynamic-tags/src/DynamicTags.d.ts +1 -1
- package/lib/dynamic-tags/src/DynamicTags.js +1 -1
- package/lib/dynamic-tags/src/styles/index.cssr.js +1 -1
- package/lib/empty/src/Empty.d.ts +19 -15
- package/lib/empty/src/Empty.js +12 -12
- package/lib/empty/src/styles/index.cssr.js +19 -18
- package/lib/form/src/Form.d.ts +27 -27
- package/lib/form/src/FormItem.d.ts +42 -42
- package/lib/form/src/FormItem.js +15 -15
- package/lib/form/src/FormItemCol.d.ts +33 -27
- package/lib/form/src/FormItemCol.js +1 -0
- package/lib/form/src/FormItemGridItem.d.ts +33 -27
- package/lib/form/src/FormItemGridItem.js +1 -0
- package/lib/form/src/FormItemRow.d.ts +33 -27
- package/lib/form/src/FormItemRow.js +1 -0
- package/lib/form/src/styles/form-item.cssr.js +37 -37
- package/lib/form/styles/_common.d.ts +0 -3
- package/lib/form/styles/_common.js +0 -3
- package/lib/form/styles/light.d.ts +3 -3
- package/lib/form/styles/light.js +2 -2
- package/lib/gradient-text/src/GradientText.d.ts +5 -5
- package/lib/gradient-text/src/GradientText.js +5 -5
- package/lib/gradient-text/src/styles/index.cssr.js +9 -9
- package/lib/icon/src/Icon.d.ts +6 -6
- package/lib/icon/src/Icon.js +4 -4
- package/lib/icon/src/styles/index.cssr.js +7 -7
- package/lib/image/src/Image.js +7 -11
- package/lib/image/src/ImagePreview.d.ts +2 -2
- package/lib/image/src/ImagePreview.js +12 -11
- package/lib/image/src/styles/index.cssr.js +5 -5
- package/lib/input/src/Input.d.ts +52 -47
- package/lib/input/src/Input.js +54 -49
- package/lib/input/src/InputGroupLabel.d.ts +8 -8
- package/lib/input/src/InputGroupLabel.js +8 -8
- package/lib/input/src/styles/input-group-label.cssr.js +18 -18
- package/lib/input/src/styles/input.cssr.js +108 -109
- package/lib/input-number/src/InputNumber.d.ts +11 -0
- package/lib/input-number/src/InputNumber.js +5 -2
- package/lib/input-number/src/utils.js +2 -1
- package/lib/layout/src/Layout.d.ts +6 -6
- package/lib/layout/src/Layout.js +3 -3
- package/lib/layout/src/LayoutContent.d.ts +3 -3
- package/lib/layout/src/LayoutFooter.js +7 -7
- package/lib/layout/src/LayoutHeader.js +7 -7
- package/lib/layout/src/LayoutSider.js +13 -13
- package/lib/layout/src/styles/layout-footer.cssr.js +11 -11
- package/lib/layout/src/styles/layout-header.cssr.js +11 -11
- package/lib/layout/src/styles/layout-sider.cssr.js +32 -32
- package/lib/layout/src/styles/layout.cssr.js +8 -8
- package/lib/list/src/List.d.ts +10 -10
- package/lib/list/src/List.js +10 -10
- package/lib/list/src/styles/index.cssr.js +30 -30
- package/lib/loading-bar/src/LoadingBar.d.ts +3 -3
- package/lib/loading-bar/src/LoadingBar.js +3 -3
- package/lib/loading-bar/src/styles/index.cssr.js +7 -7
- package/lib/locales/common/deDE.js +2 -0
- package/lib/locales/common/enUS.d.ts +2 -0
- package/lib/locales/common/enUS.js +2 -0
- package/lib/locales/common/frFR.js +7 -5
- package/lib/locales/common/idID.js +2 -0
- package/lib/locales/common/jaJP.js +2 -0
- package/lib/locales/common/nbNO.js +2 -0
- package/lib/locales/common/ruRU.js +2 -0
- package/lib/locales/common/ukUA.js +2 -0
- package/lib/locales/common/zhCN.js +2 -0
- package/lib/locales/common/zhTW.d.ts +3 -0
- package/lib/locales/common/zhTW.js +102 -0
- package/lib/locales/date/zhTW.d.ts +3 -0
- package/lib/locales/date/zhTW.js +11 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +5 -1
- package/lib/log/src/Log.d.ts +6 -6
- package/lib/log/src/Log.js +6 -6
- package/lib/log/src/styles/index.cssr.js +16 -18
- package/lib/mention/src/Mention.d.ts +1 -1
- package/lib/mention/src/Mention.js +1 -1
- package/lib/mention/src/styles/index.cssr.js +2 -2
- package/lib/menu/src/Menu.js +43 -40
- package/lib/menu/src/styles/index.cssr.js +71 -71
- package/lib/message/src/Message.d.ts +22 -22
- package/lib/message/src/Message.js +22 -22
- package/lib/message/src/styles/index.cssr.js +48 -48
- package/lib/modal/src/BodyWrapper.d.ts +11 -2
- package/lib/modal/src/BodyWrapper.js +23 -17
- package/lib/modal/src/Modal.d.ts +14 -8
- package/lib/modal/src/Modal.js +13 -7
- package/lib/modal/src/presetProps.d.ts +2 -1
- package/lib/modal/src/styles/index.cssr.js +8 -8
- package/lib/notification/src/Notification.d.ts +24 -24
- package/lib/notification/src/Notification.js +24 -24
- package/lib/notification/src/styles/index.cssr.js +65 -65
- package/lib/number-animation/index.d.ts +3 -0
- package/lib/number-animation/index.js +8 -0
- package/lib/number-animation/src/NumberAnimation.d.ts +79 -0
- package/lib/number-animation/src/NumberAnimation.js +83 -0
- package/lib/number-animation/src/utils.d.ts +8 -0
- package/lib/number-animation/src/utils.js +21 -0
- package/lib/page-header/src/PageHeader.d.ts +10 -10
- package/lib/page-header/src/PageHeader.js +13 -13
- package/lib/page-header/src/styles/index.cssr.js +25 -27
- package/lib/pagination/src/Pagination.d.ts +42 -41
- package/lib/pagination/src/Pagination.js +52 -45
- package/lib/pagination/src/styles/index.cssr.js +81 -81
- package/lib/popconfirm/src/Popconfirm.d.ts +2 -2
- package/lib/popconfirm/src/PopconfirmPanel.d.ts +4 -4
- package/lib/popconfirm/src/PopconfirmPanel.js +4 -4
- package/lib/popconfirm/src/styles/index.cssr.js +8 -8
- package/lib/popover/src/Popover.js +4 -1
- package/lib/popover/src/PopoverBody.js +18 -18
- package/lib/popover/src/styles/index.cssr.js +62 -62
- package/lib/popselect/src/Popselect.d.ts +2 -11
- package/lib/popselect/src/Popselect.js +2 -2
- package/lib/popselect/src/PopselectPanel.d.ts +3 -11
- package/lib/popselect/src/PopselectPanel.js +16 -10
- package/lib/progress/src/Progress.d.ts +14 -14
- package/lib/progress/src/Progress.js +14 -14
- package/lib/progress/src/styles/index.cssr.js +53 -53
- package/lib/radio/src/Radio.d.ts +15 -15
- package/lib/radio/src/Radio.js +18 -18
- package/lib/radio/src/RadioButton.js +4 -5
- package/lib/radio/src/RadioGroup.d.ts +14 -14
- package/lib/radio/src/RadioGroup.js +14 -14
- package/lib/radio/src/styles/radio-group.cssr.js +51 -47
- package/lib/radio/src/styles/radio.cssr.js +44 -40
- package/lib/radio/src/use-radio.d.ts +0 -3
- package/lib/radio/src/use-radio.js +1 -26
- package/lib/rate/src/Rate.d.ts +4 -4
- package/lib/rate/src/Rate.js +4 -4
- package/lib/rate/src/styles/index.cssr.js +11 -11
- package/lib/result/src/Result.d.ts +9 -9
- package/lib/result/src/Result.js +9 -9
- package/lib/result/src/styles/index.cssr.js +20 -20
- package/lib/select/src/Select.d.ts +1 -1
- package/lib/select/src/Select.js +1 -1
- package/lib/select/src/styles/index.cssr.js +2 -2
- package/lib/skeleton/src/Skeleton.d.ts +3 -3
- package/lib/skeleton/src/Skeleton.js +3 -3
- package/lib/skeleton/src/styles/index.cssr.js +12 -12
- package/lib/slider/src/Slider.d.ts +29 -29
- package/lib/slider/src/Slider.js +29 -29
- package/lib/slider/src/styles/index.cssr.js +87 -87
- package/lib/spin/src/Spin.d.ts +5 -5
- package/lib/spin/src/Spin.js +5 -5
- package/lib/spin/src/styles/index.cssr.js +15 -15
- package/lib/statistic/src/Statistic.d.ts +25 -45
- package/lib/statistic/src/Statistic.js +12 -19
- package/lib/statistic/src/styles/index.cssr.js +19 -19
- package/lib/steps/src/Step.d.ts +12 -12
- package/lib/steps/src/Step.js +12 -12
- package/lib/steps/src/styles/index.cssr.js +46 -46
- package/lib/switch/src/Switch.d.ts +19 -19
- package/lib/switch/src/Switch.js +26 -19
- package/lib/switch/src/styles/index.cssr.js +59 -57
- package/lib/table/src/Table.d.ts +21 -21
- package/lib/table/src/Table.js +21 -21
- package/lib/table/src/styles/index.cssr.js +55 -55
- package/lib/tabs/src/styles/index.cssr.js +5 -1
- package/lib/tabs/styles/light.js +1 -1
- package/lib/tag/src/Tag.d.ts +27 -26
- package/lib/tag/src/Tag.js +27 -26
- package/lib/tag/src/styles/index.cssr.js +55 -55
- package/lib/tag/src/styles/rtl.cssr.js +1 -1
- package/lib/thing/src/Thing.js +5 -5
- package/lib/thing/src/styles/index.cssr.js +11 -11
- package/lib/time-picker/src/TimePicker.d.ts +19 -19
- package/lib/time-picker/src/TimePicker.js +17 -17
- package/lib/time-picker/src/styles/index.cssr.js +47 -47
- package/lib/timeline/src/TimelineItem.d.ts +12 -12
- package/lib/timeline/src/TimelineItem.js +12 -12
- package/lib/timeline/src/styles/index.cssr.js +44 -44
- package/lib/transfer/src/Transfer.d.ts +21 -21
- package/lib/transfer/src/Transfer.js +21 -21
- package/lib/transfer/src/TransferList.js +5 -7
- package/lib/transfer/src/styles/index.cssr.js +47 -42
- package/lib/tree/src/Tree.d.ts +11 -11
- package/lib/tree/src/Tree.js +11 -11
- package/lib/tree/src/dnd.js +2 -2
- package/lib/tree/src/styles/index.cssr.js +33 -33
- package/lib/tree-select/src/TreeSelect.d.ts +43 -6
- package/lib/tree-select/src/TreeSelect.js +28 -13
- package/lib/tree-select/src/styles/index.cssr.js +20 -11
- package/lib/tree-select/styles/light.d.ts +6 -0
- package/lib/tree-select/styles/light.js +5 -2
- package/lib/typography/src/a.d.ts +2 -2
- package/lib/typography/src/a.js +2 -2
- package/lib/typography/src/blockquote.d.ts +5 -5
- package/lib/typography/src/blockquote.js +5 -5
- package/lib/typography/src/create-header.d.ts +8 -8
- package/lib/typography/src/create-header.js +8 -8
- package/lib/typography/src/headers.d.ts +48 -48
- package/lib/typography/src/hr.d.ts +2 -1
- package/lib/typography/src/hr.js +3 -1
- package/lib/typography/src/ol.d.ts +7 -7
- package/lib/typography/src/ol.js +7 -7
- package/lib/typography/src/p.d.ts +5 -5
- package/lib/typography/src/p.js +5 -5
- package/lib/typography/src/styles/a.cssr.js +6 -6
- package/lib/typography/src/styles/blockquote.cssr.js +11 -11
- package/lib/typography/src/styles/header.cssr.js +19 -19
- package/lib/typography/src/styles/hr.cssr.js +3 -3
- package/lib/typography/src/styles/list.cssr.js +15 -15
- package/lib/typography/src/styles/p.cssr.js +10 -10
- package/lib/typography/src/styles/text.cssr.js +18 -18
- package/lib/typography/src/text.d.ts +8 -7
- package/lib/typography/src/text.js +9 -8
- package/lib/typography/src/ul.d.ts +7 -7
- package/lib/typography/src/ul.js +7 -7
- package/lib/upload/src/Upload.d.ts +1 -1
- package/lib/upload/src/Upload.js +16 -16
- package/lib/upload/src/styles/index.cssr.js +36 -36
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +38 -36
- package/web-types.json +252 -11
|
@@ -1,93 +1,93 @@
|
|
|
1
1
|
import { c, cB, cE, cM, cNotM } from '../../../_utils/cssr';
|
|
2
2
|
import fadeInScaleUpTransition from '../../../_styles/transitions/fade-in-scale-up.cssr'; // vars:
|
|
3
|
-
// --bezier
|
|
4
|
-
// --icon-color
|
|
5
|
-
// --icon-color-disabled
|
|
6
|
-
// --panel-border-radius
|
|
7
|
-
// --panel-color
|
|
8
|
-
// --panel-box-shadow
|
|
9
|
-
// --panel-text-color
|
|
3
|
+
// --n-bezier
|
|
4
|
+
// --n-icon-color
|
|
5
|
+
// --n-icon-color-disabled
|
|
6
|
+
// --n-panel-border-radius
|
|
7
|
+
// --n-panel-color
|
|
8
|
+
// --n-panel-box-shadow
|
|
9
|
+
// --n-panel-text-color
|
|
10
10
|
// panel header
|
|
11
|
-
// --panel-header-padding
|
|
12
|
-
// --panel-header-divider-color
|
|
11
|
+
// --n-panel-header-padding
|
|
12
|
+
// --n-panel-header-divider-color
|
|
13
13
|
// panel calendar
|
|
14
|
-
// --calendar-left-padding
|
|
15
|
-
// --calendar-right-padding
|
|
16
|
-
// --calendar-title-height
|
|
17
|
-
// --calendar-title-padding
|
|
18
|
-
// --calendar-title-font-size
|
|
19
|
-
// --calendar-title-text-color
|
|
20
|
-
// --calendar-title-font-weight
|
|
21
|
-
// --calendar-title-grid-template-columns
|
|
22
|
-
// --calendar-days-height
|
|
23
|
-
// --calendar-days-divider-color
|
|
24
|
-
// --calendar-days-font-size
|
|
25
|
-
// --calendar-days-text-color
|
|
26
|
-
// --calendar-divider-color
|
|
14
|
+
// --n-calendar-left-padding
|
|
15
|
+
// --n-calendar-right-padding
|
|
16
|
+
// --n-calendar-title-height
|
|
17
|
+
// --n-calendar-title-padding
|
|
18
|
+
// --n-calendar-title-font-size
|
|
19
|
+
// --n-calendar-title-text-color
|
|
20
|
+
// --n-calendar-title-font-weight
|
|
21
|
+
// --n-calendar-title-grid-template-columns
|
|
22
|
+
// --n-calendar-days-height
|
|
23
|
+
// --n-calendar-days-divider-color
|
|
24
|
+
// --n-calendar-days-font-size
|
|
25
|
+
// --n-calendar-days-text-color
|
|
26
|
+
// --n-calendar-divider-color
|
|
27
27
|
// panel action
|
|
28
|
-
// --panel-action-padding
|
|
29
|
-
// --panel-action-divider-color
|
|
28
|
+
// --n-panel-action-padding
|
|
29
|
+
// --n-panel-action-divider-color
|
|
30
30
|
// panel item
|
|
31
|
-
// --item-border-radius
|
|
32
|
-
// --item-size
|
|
33
|
-
// --item-cell-width
|
|
34
|
-
// --item-cell-height
|
|
35
|
-
// --item-text-color
|
|
36
|
-
// --item-color-included
|
|
37
|
-
// --item-color-disabled
|
|
38
|
-
// --item-color-hover
|
|
39
|
-
// --item-color-active
|
|
40
|
-
// --item-font-size
|
|
41
|
-
// --item-text-color-disabled
|
|
42
|
-
// --item-text-color-active
|
|
31
|
+
// --n-item-border-radius
|
|
32
|
+
// --n-item-size
|
|
33
|
+
// --n-item-cell-width
|
|
34
|
+
// --n-item-cell-height
|
|
35
|
+
// --n-item-text-color
|
|
36
|
+
// --n-item-color-included
|
|
37
|
+
// --n-item-color-disabled
|
|
38
|
+
// --n-item-color-hover
|
|
39
|
+
// --n-item-color-active
|
|
40
|
+
// --n-item-font-size
|
|
41
|
+
// --n-item-text-color-disabled
|
|
42
|
+
// --n-item-text-color-active
|
|
43
43
|
// scroll item
|
|
44
|
-
// --scroll-item-width
|
|
45
|
-
// --scroll-item-height
|
|
46
|
-
// --scroll-item-border-radius
|
|
44
|
+
// --n-scroll-item-width
|
|
45
|
+
// --n-scroll-item-height
|
|
46
|
+
// --n-scroll-item-border-radius
|
|
47
47
|
// panel arrow
|
|
48
|
-
// --arrow-size
|
|
49
|
-
// --arrow-color
|
|
48
|
+
// --n-arrow-size
|
|
49
|
+
// --n-arrow-color
|
|
50
50
|
|
|
51
51
|
export default c([cB('date-picker', `
|
|
52
52
|
position: relative;
|
|
53
53
|
z-index: auto;
|
|
54
54
|
`, [cB('date-picker-icon', `
|
|
55
|
-
color: var(--icon-color);
|
|
56
|
-
transition: color .3s var(--bezier);
|
|
55
|
+
color: var(--n-icon-color);
|
|
56
|
+
transition: color .3s var(--n-bezier);
|
|
57
57
|
`), cM('disabled', [cB('date-picker-icon', `
|
|
58
|
-
color: var(--icon-color-disabled);
|
|
58
|
+
color: var(--n-icon-color-disabled);
|
|
59
59
|
`)])]), cB('date-panel', `
|
|
60
60
|
outline: none;
|
|
61
61
|
margin: 4px 0;
|
|
62
62
|
display: grid;
|
|
63
63
|
grid-template-columns: 0fr;
|
|
64
|
-
border-radius: var(--panel-border-radius);
|
|
65
|
-
background-color: var(--panel-color);
|
|
66
|
-
box-shadow: var(--panel-box-shadow);
|
|
67
|
-
color: var(--panel-text-color);
|
|
64
|
+
border-radius: var(--n-panel-border-radius);
|
|
65
|
+
background-color: var(--n-panel-color);
|
|
66
|
+
box-shadow: var(--n-panel-box-shadow);
|
|
67
|
+
color: var(--n-panel-text-color);
|
|
68
68
|
`, [fadeInScaleUpTransition(), cB('date-panel-calendar', {
|
|
69
|
-
padding: 'var(--calendar-left-padding)',
|
|
69
|
+
padding: 'var(--n-calendar-left-padding)',
|
|
70
70
|
display: 'grid',
|
|
71
71
|
gridTemplateColumns: '1fr',
|
|
72
72
|
gridArea: 'left-calendar'
|
|
73
73
|
}, [cM('end', {
|
|
74
|
-
padding: 'var(--calendar-right-padding)',
|
|
74
|
+
padding: 'var(--n-calendar-right-padding)',
|
|
75
75
|
gridArea: 'right-calendar'
|
|
76
76
|
})]), cB('date-panel-month-calendar', {
|
|
77
77
|
display: 'flex',
|
|
78
78
|
gridArea: 'left-calendar'
|
|
79
79
|
}, [cE('picker-col', `
|
|
80
|
-
min-width: var(--scroll-item-width);
|
|
81
|
-
height: calc(var(--scroll-item-height) * 6);
|
|
80
|
+
min-width: var(--n-scroll-item-width);
|
|
81
|
+
height: calc(var(--n-scroll-item-height) * 6);
|
|
82
82
|
user-select: none;
|
|
83
83
|
`, [c('&:first-child', `
|
|
84
|
-
min-width: calc(var(--scroll-item-width) + 4px);
|
|
84
|
+
min-width: calc(var(--n-scroll-item-width) + 4px);
|
|
85
85
|
`, [cE('picker-col-item', [c('&::before', 'left: 4px;')])]), cE('padding', `
|
|
86
|
-
height: calc(var(--scroll-item-height) * 5)
|
|
86
|
+
height: calc(var(--n-scroll-item-height) * 5)
|
|
87
87
|
`)]), cE('picker-col-item', `
|
|
88
88
|
z-index: 0;
|
|
89
89
|
cursor: pointer;
|
|
90
|
-
height: var(--scroll-item-height);
|
|
90
|
+
height: var(--n-scroll-item-height);
|
|
91
91
|
box-sizing: border-box;
|
|
92
92
|
padding-top: 4px;
|
|
93
93
|
display: flex;
|
|
@@ -95,10 +95,10 @@ export default c([cB('date-picker', `
|
|
|
95
95
|
justify-content: center;
|
|
96
96
|
position: relative;
|
|
97
97
|
transition:
|
|
98
|
-
color .3s var(--bezier),
|
|
99
|
-
background-color .3s var(--bezier);
|
|
98
|
+
color .3s var(--n-bezier),
|
|
99
|
+
background-color .3s var(--n-bezier);
|
|
100
100
|
background: #0000;
|
|
101
|
-
color: var(--item-text-color);
|
|
101
|
+
color: var(--n-item-text-color);
|
|
102
102
|
`, [c('&::before', `
|
|
103
103
|
z-index: -1;
|
|
104
104
|
content: "";
|
|
@@ -107,15 +107,15 @@ export default c([cB('date-picker', `
|
|
|
107
107
|
right: 4px;
|
|
108
108
|
top: 4px;
|
|
109
109
|
bottom: 0;
|
|
110
|
-
border-radius: var(--scroll-item-border-radius);
|
|
110
|
+
border-radius: var(--n-scroll-item-border-radius);
|
|
111
111
|
transition:
|
|
112
|
-
background-color .3s var(--bezier);
|
|
112
|
+
background-color .3s var(--n-bezier);
|
|
113
113
|
`), cNotM('disabled', [c('&:hover::before', `
|
|
114
|
-
background-color: var(--item-color-hover);
|
|
114
|
+
background-color: var(--n-item-color-hover);
|
|
115
115
|
`), cM('selected', `
|
|
116
|
-
color: var(--item-color-active);
|
|
117
|
-
`, [c('&::before', 'background-color: var(--item-color-hover);')])]), cM('disabled', `
|
|
118
|
-
background-color: var(--item-color-disabled);
|
|
116
|
+
color: var(--n-item-color-active);
|
|
117
|
+
`, [c('&::before', 'background-color: var(--n-item-color-hover);')])]), cM('disabled', `
|
|
118
|
+
background-color: var(--n-item-color-disabled);
|
|
119
119
|
cursor: not-allowed;
|
|
120
120
|
`)])]), cM('date', {
|
|
121
121
|
gridTemplateAreas: `
|
|
@@ -159,10 +159,10 @@ export default c([cB('date-picker', `
|
|
|
159
159
|
box-sizing: border-box;
|
|
160
160
|
width: 100%;
|
|
161
161
|
align-items: center;
|
|
162
|
-
padding: var(--panel-header-padding);
|
|
162
|
+
padding: var(--n-panel-header-padding);
|
|
163
163
|
display: flex;
|
|
164
164
|
justify-content: space-between;
|
|
165
|
-
border-bottom: 1px solid var(--panel-header-divider-color);
|
|
165
|
+
border-bottom: 1px solid var(--n-panel-header-divider-color);
|
|
166
166
|
`, [c('>', [c('*:not(:last-child)', {
|
|
167
167
|
marginRight: '10px'
|
|
168
168
|
}), c('*', {
|
|
@@ -173,62 +173,62 @@ export default c([cB('date-picker', `
|
|
|
173
173
|
})])]), cB('date-panel-month', `
|
|
174
174
|
box-sizing: border-box;
|
|
175
175
|
display: grid;
|
|
176
|
-
grid-template-columns: var(--calendar-title-grid-template-columns);
|
|
176
|
+
grid-template-columns: var(--n-calendar-title-grid-template-columns);
|
|
177
177
|
align-items: center;
|
|
178
178
|
justify-items: center;
|
|
179
|
-
padding: var(--calendar-title-padding);
|
|
180
|
-
height: var(--calendar-title-height);
|
|
179
|
+
padding: var(--n-calendar-title-padding);
|
|
180
|
+
height: var(--n-calendar-title-height);
|
|
181
181
|
`, [cE('prev, next, fast-prev, fast-next', `
|
|
182
182
|
line-height: 0;
|
|
183
183
|
cursor: pointer;
|
|
184
|
-
width: var(--arrow-size);
|
|
185
|
-
height: var(--arrow-size);
|
|
186
|
-
color: var(--arrow-color);
|
|
184
|
+
width: var(--n-arrow-size);
|
|
185
|
+
height: var(--n-arrow-size);
|
|
186
|
+
color: var(--n-arrow-color);
|
|
187
187
|
`), cE('month-year', `
|
|
188
|
-
font-size: var(--calendar-title-font-size);
|
|
189
|
-
font-weight: var(--calendar-title-font-weight);
|
|
188
|
+
font-size: var(--n-calendar-title-font-size);
|
|
189
|
+
font-weight: var(--n-calendar-title-font-weight);
|
|
190
190
|
line-height: 17px;
|
|
191
191
|
flex-grow: 1;
|
|
192
192
|
text-align: center;
|
|
193
|
-
color: var(--calendar-title-text-color);
|
|
193
|
+
color: var(--n-calendar-title-text-color);
|
|
194
194
|
`)]), cB('date-panel-weekdays', `
|
|
195
195
|
display: grid;
|
|
196
196
|
margin: auto;
|
|
197
|
-
grid-template-columns: repeat(7, var(--item-cell-width));
|
|
198
|
-
grid-template-rows: repeat(1, var(--item-cell-height));
|
|
197
|
+
grid-template-columns: repeat(7, var(--n-item-cell-width));
|
|
198
|
+
grid-template-rows: repeat(1, var(--n-item-cell-height));
|
|
199
199
|
align-items: center;
|
|
200
200
|
justify-items: center;
|
|
201
201
|
margin-bottom: 4px;
|
|
202
|
-
border-bottom: 1px solid var(--calendar-days-divider-color);
|
|
202
|
+
border-bottom: 1px solid var(--n-calendar-days-divider-color);
|
|
203
203
|
`, [cE('day', `
|
|
204
204
|
line-height: 15px;
|
|
205
|
-
width: var(--item-size);
|
|
205
|
+
width: var(--n-item-size);
|
|
206
206
|
text-align: center;
|
|
207
|
-
font-size: var(--calendar-days-font-size);
|
|
208
|
-
color: var(--item-text-color);
|
|
207
|
+
font-size: var(--n-calendar-days-font-size);
|
|
208
|
+
color: var(--n-item-text-color);
|
|
209
209
|
`)]), cB('date-panel-dates', `
|
|
210
210
|
margin: auto;
|
|
211
211
|
display: grid;
|
|
212
|
-
grid-template-columns: repeat(7, var(--item-cell-width));
|
|
213
|
-
grid-template-rows: repeat(6, var(--item-cell-height));
|
|
212
|
+
grid-template-columns: repeat(7, var(--n-item-cell-width));
|
|
213
|
+
grid-template-rows: repeat(6, var(--n-item-cell-height));
|
|
214
214
|
align-items: center;
|
|
215
215
|
justify-items: center;
|
|
216
216
|
flex-wrap: wrap;
|
|
217
217
|
`, [cB('date-panel-date', `
|
|
218
218
|
position: relative;
|
|
219
|
-
width: var(--item-size);
|
|
220
|
-
height: var(--item-size);
|
|
221
|
-
line-height: var(--item-size);
|
|
219
|
+
width: var(--n-item-size);
|
|
220
|
+
height: var(--n-item-size);
|
|
221
|
+
line-height: var(--n-item-size);
|
|
222
222
|
text-align: center;
|
|
223
|
-
font-size: var(--item-font-size);
|
|
224
|
-
border-radius: var(--item-border-radius);
|
|
223
|
+
font-size: var(--n-item-font-size);
|
|
224
|
+
border-radius: var(--n-item-border-radius);
|
|
225
225
|
z-index: 0;
|
|
226
226
|
cursor: pointer;
|
|
227
227
|
transition:
|
|
228
|
-
background-color .2s var(--bezier),
|
|
229
|
-
color .2s var(--bezier);
|
|
228
|
+
background-color .2s var(--n-bezier),
|
|
229
|
+
color .2s var(--n-bezier);
|
|
230
230
|
`, [cNotM('disabled', [cNotM('selected', [c('&:hover', {
|
|
231
|
-
backgroundColor: 'var(--item-color-hover)'
|
|
231
|
+
backgroundColor: 'var(--n-item-color-hover)'
|
|
232
232
|
})])]), cM('current', [cE('sup', `
|
|
233
233
|
position: absolute;
|
|
234
234
|
top: 2px;
|
|
@@ -237,9 +237,9 @@ export default c([cB('date-picker', `
|
|
|
237
237
|
height: 4px;
|
|
238
238
|
width: 4px;
|
|
239
239
|
border-radius: 2px;
|
|
240
|
-
background-color: var(--item-color-active);
|
|
240
|
+
background-color: var(--n-item-color-active);
|
|
241
241
|
transition:
|
|
242
|
-
background-color .2s var(--bezier);
|
|
242
|
+
background-color .2s var(--n-bezier);
|
|
243
243
|
`)]), c('&::after', `
|
|
244
244
|
content: "";
|
|
245
245
|
z-index: -1;
|
|
@@ -249,60 +249,60 @@ export default c([cB('date-picker', `
|
|
|
249
249
|
top: 0;
|
|
250
250
|
bottom: 0;
|
|
251
251
|
border-radius: inherit;
|
|
252
|
-
transition: background-color .3s var(--bezier);
|
|
252
|
+
transition: background-color .3s var(--n-bezier);
|
|
253
253
|
`), cM('covered, start, end', [cNotM('excluded', [c('&::before', `
|
|
254
254
|
content: "";
|
|
255
255
|
z-index: -2;
|
|
256
256
|
position: absolute;
|
|
257
|
-
left: calc((var(--item-size) - var(--item-cell-width)) / 2);
|
|
258
|
-
right: calc((var(--item-size) - var(--item-cell-width)) / 2);
|
|
257
|
+
left: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2);
|
|
258
|
+
right: calc((var(--n-item-size) - var(--n-item-cell-width)) / 2);
|
|
259
259
|
top: 0;
|
|
260
260
|
bottom: 0;
|
|
261
|
-
background-color: var(--item-color-included);
|
|
261
|
+
background-color: var(--n-item-color-included);
|
|
262
262
|
`), c('&:nth-child(7n + 1)::before', {
|
|
263
|
-
borderTopLeftRadius: 'var(--item-border-radius)',
|
|
264
|
-
borderBottomLeftRadius: 'var(--item-border-radius)'
|
|
263
|
+
borderTopLeftRadius: 'var(--n-item-border-radius)',
|
|
264
|
+
borderBottomLeftRadius: 'var(--n-item-border-radius)'
|
|
265
265
|
}), c('&:nth-child(7n + 7)::before', {
|
|
266
|
-
borderTopRightRadius: 'var(--item-border-radius)',
|
|
267
|
-
borderBottomRightRadius: 'var(--item-border-radius)'
|
|
266
|
+
borderTopRightRadius: 'var(--n-item-border-radius)',
|
|
267
|
+
borderBottomRightRadius: 'var(--n-item-border-radius)'
|
|
268
268
|
})])]), cM('selected', {
|
|
269
|
-
color: 'var(--item-text-color-active)'
|
|
269
|
+
color: 'var(--n-item-text-color-active)'
|
|
270
270
|
}, [c('&::after', {
|
|
271
|
-
backgroundColor: 'var(--item-color-active)'
|
|
271
|
+
backgroundColor: 'var(--n-item-color-active)'
|
|
272
272
|
}), cM('start', [c('&::before', {
|
|
273
273
|
left: '50%'
|
|
274
274
|
})]), cM('end', [c('&::before', {
|
|
275
275
|
right: '50%'
|
|
276
276
|
})]), cE('sup', {
|
|
277
|
-
backgroundColor: 'var(--panel-color)'
|
|
277
|
+
backgroundColor: 'var(--n-panel-color)'
|
|
278
278
|
})]), cM('excluded', {
|
|
279
|
-
color: 'var(--item-text-color-disabled)'
|
|
279
|
+
color: 'var(--n-item-text-color-disabled)'
|
|
280
280
|
}, [cM('selected', [c('&::after', {
|
|
281
|
-
backgroundColor: 'var(--item-color-disabled)'
|
|
281
|
+
backgroundColor: 'var(--n-item-color-disabled)'
|
|
282
282
|
})])]), cM('disabled', {
|
|
283
283
|
cursor: 'not-allowed',
|
|
284
|
-
color: 'var(--item-text-color-disabled)'
|
|
284
|
+
color: 'var(--n-item-text-color-disabled)'
|
|
285
285
|
}, [cM('covered', [c('&::before', {
|
|
286
|
-
backgroundColor: 'var(--item-color-disabled)'
|
|
286
|
+
backgroundColor: 'var(--n-item-color-disabled)'
|
|
287
287
|
})]), cM('selected', [c('&::before', {
|
|
288
|
-
backgroundColor: 'var(--item-color-disabled)'
|
|
288
|
+
backgroundColor: 'var(--n-item-color-disabled)'
|
|
289
289
|
}), c('&::after', {
|
|
290
|
-
backgroundColor: 'var(--item-color-disabled)'
|
|
290
|
+
backgroundColor: 'var(--n-item-color-disabled)'
|
|
291
291
|
})])])])]), cE('vertical-divider', `
|
|
292
292
|
grid-area: divider;
|
|
293
293
|
height: 100%;
|
|
294
294
|
width: 1px;
|
|
295
|
-
background-color: var(--calendar-divider-color);
|
|
295
|
+
background-color: var(--n-calendar-divider-color);
|
|
296
296
|
`), cB('date-panel-footer', {
|
|
297
|
-
borderTop: '1px solid var(--panel-action-divider-color)',
|
|
298
|
-
padding: 'var(--panel-extra-footer-padding)'
|
|
297
|
+
borderTop: '1px solid var(--n-panel-action-divider-color)',
|
|
298
|
+
padding: 'var(--n-panel-extra-footer-padding)'
|
|
299
299
|
}), cB('date-panel-actions', `
|
|
300
300
|
flex: 1;
|
|
301
|
-
padding: var(--panel-action-padding);
|
|
301
|
+
padding: var(--n-panel-action-padding);
|
|
302
302
|
display: flex;
|
|
303
303
|
align-items: center;
|
|
304
304
|
justify-content: space-between;
|
|
305
|
-
border-top: 1px solid var(--panel-action-divider-color);
|
|
305
|
+
border-top: 1px solid var(--n-panel-action-divider-color);
|
|
306
306
|
`, [cE('prefix, suffix', `
|
|
307
307
|
display: flex;
|
|
308
308
|
margin-bottom: -8px;
|
|
@@ -21,7 +21,7 @@ export interface MonthItem {
|
|
|
21
21
|
month: number;
|
|
22
22
|
year: number;
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
isCurrent: boolean;
|
|
25
25
|
selected: boolean;
|
|
26
26
|
ts: number;
|
|
27
27
|
}
|
|
@@ -30,7 +30,17 @@ export interface YearItem {
|
|
|
30
30
|
dateObject: {
|
|
31
31
|
year: number;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
isCurrent: boolean;
|
|
34
|
+
selected: boolean;
|
|
35
|
+
ts: number;
|
|
36
|
+
}
|
|
37
|
+
export interface QuarterItem {
|
|
38
|
+
type: 'quarter';
|
|
39
|
+
dateObject: {
|
|
40
|
+
quarter: number;
|
|
41
|
+
year: number;
|
|
42
|
+
};
|
|
43
|
+
isCurrent: boolean;
|
|
34
44
|
selected: boolean;
|
|
35
45
|
ts: number;
|
|
36
46
|
}
|
|
@@ -40,8 +50,14 @@ export interface YearItem {
|
|
|
40
50
|
*/
|
|
41
51
|
declare function dateArray(monthTs: number, valueTs: number | [number, number] | null, currentTs: number, startDay: 0 | 1 | 2 | 3 | 4 | 5 | 6, strip?: boolean): DateItem[];
|
|
42
52
|
declare function monthArray(monthTs: number, valueTs: number | [number, number] | null, currentTs: number): MonthItem[];
|
|
53
|
+
declare function quarterArray(quarterTs: number, valueTs: number | [number, number] | null, currentTs: number): QuarterItem[];
|
|
43
54
|
declare function yearArray(yearTs: number, valueTs: number | [number, number] | null, currentTs: number): YearItem[];
|
|
44
55
|
declare function strictParse(string: string, pattern: string, backup: Date, option: {
|
|
45
56
|
locale: Locale;
|
|
46
57
|
}): Date;
|
|
47
|
-
|
|
58
|
+
declare function getDefaultTime(timeValue: string | undefined): {
|
|
59
|
+
hours: number;
|
|
60
|
+
minutes: number;
|
|
61
|
+
seconds: number;
|
|
62
|
+
} | undefined;
|
|
63
|
+
export { dateArray, monthArray, yearArray, quarterArray, strictParse, getDerivedTimeFromKeyboardEvent, getDefaultTime };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isValid, isSameDay, getDate, getMonth, getYear, isSameMonth, isSameYear, getTime, startOfMonth, addDays, addMonths, addYears, getDay, parse, format, startOfYear } from 'date-fns';
|
|
1
|
+
import { isValid, isSameDay, getDate, getMonth, getYear, isSameMonth, isSameYear, getTime, startOfMonth, addDays, addMonths, addYears, addQuarters, getDay, parse, format, startOfYear, getQuarter, isSameQuarter } from 'date-fns';
|
|
2
2
|
import { START_YEAR } from './config';
|
|
3
3
|
function getDerivedTimeFromKeyboardEvent(prevValue, event) {
|
|
4
4
|
const now = getTime(Date.now());
|
|
@@ -19,7 +19,8 @@ function getDerivedTimeFromKeyboardEvent(prevValue, event) {
|
|
|
19
19
|
const matcherMap = {
|
|
20
20
|
date: isSameDay,
|
|
21
21
|
month: isSameMonth,
|
|
22
|
-
year: isSameYear
|
|
22
|
+
year: isSameYear,
|
|
23
|
+
quarter: isSameQuarter
|
|
23
24
|
};
|
|
24
25
|
function matchDate(sourceTime, patternTime, type = 'date') {
|
|
25
26
|
const matcher = matcherMap[type];
|
|
@@ -66,7 +67,7 @@ function monthItem(monthTs, valueTs, currentTs) {
|
|
|
66
67
|
month: getMonth(monthTs),
|
|
67
68
|
year: getYear(monthTs)
|
|
68
69
|
},
|
|
69
|
-
|
|
70
|
+
isCurrent: isSameMonth(currentTs, monthTs),
|
|
70
71
|
selected: valueTs !== null && matchDate(valueTs, monthTs, 'month'),
|
|
71
72
|
ts: getTime(monthTs)
|
|
72
73
|
};
|
|
@@ -77,11 +78,23 @@ function yearItem(yearTs, valueTs, currentTs) {
|
|
|
77
78
|
dateObject: {
|
|
78
79
|
year: getYear(yearTs)
|
|
79
80
|
},
|
|
80
|
-
|
|
81
|
+
isCurrent: isSameYear(currentTs, yearTs),
|
|
81
82
|
selected: valueTs !== null && matchDate(valueTs, yearTs, 'year'),
|
|
82
83
|
ts: getTime(yearTs)
|
|
83
84
|
};
|
|
84
85
|
}
|
|
86
|
+
function quarterItem(quarterTs, valueTs, currentTs) {
|
|
87
|
+
return {
|
|
88
|
+
type: 'quarter',
|
|
89
|
+
dateObject: {
|
|
90
|
+
quarter: getQuarter(quarterTs),
|
|
91
|
+
year: getYear(quarterTs)
|
|
92
|
+
},
|
|
93
|
+
isCurrent: isSameQuarter(currentTs, quarterTs),
|
|
94
|
+
selected: valueTs !== null && matchDate(valueTs, quarterTs, 'quarter'),
|
|
95
|
+
ts: getTime(quarterTs)
|
|
96
|
+
};
|
|
97
|
+
}
|
|
85
98
|
/**
|
|
86
99
|
* Given time to display calendar, given the selected time, given current time,
|
|
87
100
|
* return the date array of display time's month.
|
|
@@ -125,6 +138,14 @@ function monthArray(monthTs, valueTs, currentTs) {
|
|
|
125
138
|
}
|
|
126
139
|
return calendarMonths;
|
|
127
140
|
}
|
|
141
|
+
function quarterArray(quarterTs, valueTs, currentTs) {
|
|
142
|
+
const calendarQuarters = [];
|
|
143
|
+
const yearStart = startOfYear(quarterTs);
|
|
144
|
+
for (let i = 0; i < 4; i++) {
|
|
145
|
+
calendarQuarters.push(quarterItem(getTime(addQuarters(yearStart, i)), valueTs, currentTs));
|
|
146
|
+
}
|
|
147
|
+
return calendarQuarters;
|
|
148
|
+
}
|
|
128
149
|
function yearArray(yearTs, valueTs, currentTs) {
|
|
129
150
|
const calendarYears = [];
|
|
130
151
|
const time1900 = new Date(START_YEAR, 0, 1);
|
|
@@ -145,4 +166,18 @@ function strictParse(string, pattern, backup, option) {
|
|
|
145
166
|
else
|
|
146
167
|
return new Date(NaN);
|
|
147
168
|
}
|
|
148
|
-
|
|
169
|
+
function getDefaultTime(timeValue) {
|
|
170
|
+
if (timeValue === undefined) {
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
if (typeof timeValue === 'number') {
|
|
174
|
+
return timeValue;
|
|
175
|
+
}
|
|
176
|
+
const [hour, minute, second] = timeValue.split(':');
|
|
177
|
+
return {
|
|
178
|
+
hours: Number(hour),
|
|
179
|
+
minutes: Number(minute),
|
|
180
|
+
seconds: Number(second)
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
export { dateArray, monthArray, yearArray, quarterArray, strictParse, getDerivedTimeFromKeyboardEvent, getDefaultTime };
|
|
@@ -18,11 +18,13 @@ declare const _default: {
|
|
|
18
18
|
calendarLeftPaddingDatetimerange: string;
|
|
19
19
|
calendarLeftPaddingMonth: string;
|
|
20
20
|
calendarLeftPaddingYear: string;
|
|
21
|
+
calendarLeftPaddingQuarter: string;
|
|
21
22
|
calendarRightPaddingDate: string;
|
|
22
23
|
calendarRightPaddingDatetime: string;
|
|
23
24
|
calendarRightPaddingDaterange: string;
|
|
24
25
|
calendarRightPaddingDatetimerange: string;
|
|
25
26
|
calendarRightPaddingMonth: string;
|
|
26
27
|
calendarRightPaddingYear: string;
|
|
28
|
+
calendarRightPaddingQuarter: string;
|
|
27
29
|
};
|
|
28
30
|
export default _default;
|
|
@@ -19,10 +19,12 @@ export default {
|
|
|
19
19
|
calendarLeftPaddingDatetimerange: '4px 12px',
|
|
20
20
|
calendarLeftPaddingMonth: '0',
|
|
21
21
|
calendarLeftPaddingYear: '0',
|
|
22
|
+
calendarLeftPaddingQuarter: '0',
|
|
22
23
|
calendarRightPaddingDate: '6px 12px 4px 12px',
|
|
23
24
|
calendarRightPaddingDatetime: '4px 12px',
|
|
24
25
|
calendarRightPaddingDaterange: '6px 12px 4px 12px',
|
|
25
26
|
calendarRightPaddingDatetimerange: '4px 12px',
|
|
26
27
|
calendarRightPaddingMonth: '0',
|
|
27
|
-
calendarRightPaddingYear: '0'
|
|
28
|
+
calendarRightPaddingYear: '0',
|
|
29
|
+
calendarRightPaddingQuarter: '0'
|
|
28
30
|
};
|
|
@@ -46,12 +46,14 @@ export declare const self: (vars: ThemeCommonVars) => {
|
|
|
46
46
|
calendarLeftPaddingDatetimerange: string;
|
|
47
47
|
calendarLeftPaddingMonth: string;
|
|
48
48
|
calendarLeftPaddingYear: string;
|
|
49
|
+
calendarLeftPaddingQuarter: string;
|
|
49
50
|
calendarRightPaddingDate: string;
|
|
50
51
|
calendarRightPaddingDatetime: string;
|
|
51
52
|
calendarRightPaddingDaterange: string;
|
|
52
53
|
calendarRightPaddingDatetimerange: string;
|
|
53
54
|
calendarRightPaddingMonth: string;
|
|
54
55
|
calendarRightPaddingYear: string;
|
|
56
|
+
calendarRightPaddingQuarter: string;
|
|
55
57
|
};
|
|
56
58
|
export declare type DatePickerThemeVars = ReturnType<typeof self>;
|
|
57
59
|
declare const datePickerLight: import("../../_mixins").Theme<"DatePicker", {
|
|
@@ -101,12 +103,14 @@ declare const datePickerLight: import("../../_mixins").Theme<"DatePicker", {
|
|
|
101
103
|
calendarLeftPaddingDatetimerange: string;
|
|
102
104
|
calendarLeftPaddingMonth: string;
|
|
103
105
|
calendarLeftPaddingYear: string;
|
|
106
|
+
calendarLeftPaddingQuarter: string;
|
|
104
107
|
calendarRightPaddingDate: string;
|
|
105
108
|
calendarRightPaddingDatetime: string;
|
|
106
109
|
calendarRightPaddingDaterange: string;
|
|
107
110
|
calendarRightPaddingDatetimerange: string;
|
|
108
111
|
calendarRightPaddingMonth: string;
|
|
109
112
|
calendarRightPaddingYear: string;
|
|
113
|
+
calendarRightPaddingQuarter: string;
|
|
110
114
|
}, {
|
|
111
115
|
Input: import("../../_mixins").Theme<"Input", {
|
|
112
116
|
countTextColor: string;
|
|
@@ -243,24 +243,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
243
243
|
}, {
|
|
244
244
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
245
245
|
cssVars: import("vue").ComputedRef<{
|
|
246
|
-
'--th-padding': string;
|
|
247
|
-
'--td-padding': string;
|
|
248
|
-
'--font-size': string;
|
|
249
|
-
'--bezier': string;
|
|
250
|
-
'--th-font-weight': string;
|
|
251
|
-
'--line-height': string;
|
|
252
|
-
'--th-text-color': string;
|
|
253
|
-
'--td-text-color': string;
|
|
254
|
-
'--th-color': string;
|
|
255
|
-
'--th-color-modal': string;
|
|
256
|
-
'--th-color-popover': string;
|
|
257
|
-
'--td-color': string;
|
|
258
|
-
'--td-color-modal': string;
|
|
259
|
-
'--td-color-popover': string;
|
|
260
|
-
'--border-radius': string;
|
|
261
|
-
'--border-color': string;
|
|
262
|
-
'--border-color-modal': string;
|
|
263
|
-
'--border-color-popover': string;
|
|
246
|
+
'--n-th-padding': string;
|
|
247
|
+
'--n-td-padding': string;
|
|
248
|
+
'--n-font-size': string;
|
|
249
|
+
'--n-bezier': string;
|
|
250
|
+
'--n-th-font-weight': string;
|
|
251
|
+
'--n-line-height': string;
|
|
252
|
+
'--n-th-text-color': string;
|
|
253
|
+
'--n-td-text-color': string;
|
|
254
|
+
'--n-th-color': string;
|
|
255
|
+
'--n-th-color-modal': string;
|
|
256
|
+
'--n-th-color-popover': string;
|
|
257
|
+
'--n-td-color': string;
|
|
258
|
+
'--n-td-color-modal': string;
|
|
259
|
+
'--n-td-color-popover': string;
|
|
260
|
+
'--n-border-radius': string;
|
|
261
|
+
'--n-border-color': string;
|
|
262
|
+
'--n-border-color-modal': string;
|
|
263
|
+
'--n-border-color-popover': string;
|
|
264
264
|
}>;
|
|
265
265
|
compitableColumn: import("vue").ComputedRef<number>;
|
|
266
266
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
@@ -33,24 +33,24 @@ export default defineComponent({
|
|
|
33
33
|
const { size, bordered } = props;
|
|
34
34
|
const { common: { cubicBezierEaseInOut }, self: { thColor, thColorModal, thColorPopover, thTextColor, thFontWeight, tdTextColor, tdColor, tdColorModal, tdColorPopover, borderColor, borderColorModal, borderColorPopover, borderRadius, lineHeight, [createKey('fontSize', size)]: fontSize, [createKey(bordered ? 'thPaddingBordered' : 'thPadding', size)]: thPadding, [createKey(bordered ? 'tdPaddingBordered' : 'tdPadding', size)]: tdPadding } } = themeRef.value;
|
|
35
35
|
return {
|
|
36
|
-
'--th-padding': thPadding,
|
|
37
|
-
'--td-padding': tdPadding,
|
|
38
|
-
'--font-size': fontSize,
|
|
39
|
-
'--bezier': cubicBezierEaseInOut,
|
|
40
|
-
'--th-font-weight': thFontWeight,
|
|
41
|
-
'--line-height': lineHeight,
|
|
42
|
-
'--th-text-color': thTextColor,
|
|
43
|
-
'--td-text-color': tdTextColor,
|
|
44
|
-
'--th-color': thColor,
|
|
45
|
-
'--th-color-modal': thColorModal,
|
|
46
|
-
'--th-color-popover': thColorPopover,
|
|
47
|
-
'--td-color': tdColor,
|
|
48
|
-
'--td-color-modal': tdColorModal,
|
|
49
|
-
'--td-color-popover': tdColorPopover,
|
|
50
|
-
'--border-radius': borderRadius,
|
|
51
|
-
'--border-color': borderColor,
|
|
52
|
-
'--border-color-modal': borderColorModal,
|
|
53
|
-
'--border-color-popover': borderColorPopover
|
|
36
|
+
'--n-th-padding': thPadding,
|
|
37
|
+
'--n-td-padding': tdPadding,
|
|
38
|
+
'--n-font-size': fontSize,
|
|
39
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
40
|
+
'--n-th-font-weight': thFontWeight,
|
|
41
|
+
'--n-line-height': lineHeight,
|
|
42
|
+
'--n-th-text-color': thTextColor,
|
|
43
|
+
'--n-td-text-color': tdTextColor,
|
|
44
|
+
'--n-th-color': thColor,
|
|
45
|
+
'--n-th-color-modal': thColorModal,
|
|
46
|
+
'--n-th-color-popover': thColorPopover,
|
|
47
|
+
'--n-td-color': tdColor,
|
|
48
|
+
'--n-td-color-modal': tdColorModal,
|
|
49
|
+
'--n-td-color-popover': tdColorPopover,
|
|
50
|
+
'--n-border-radius': borderRadius,
|
|
51
|
+
'--n-border-color': borderColor,
|
|
52
|
+
'--n-border-color-modal': borderColorModal,
|
|
53
|
+
'--n-border-color-popover': borderColorPopover
|
|
54
54
|
};
|
|
55
55
|
}),
|
|
56
56
|
compitableColumn: useCompitable(props, ['columns', 'column'])
|
|
@@ -95,8 +95,7 @@ export default defineComponent({
|
|
|
95
95
|
: itemSpan * 2 },
|
|
96
96
|
h("span", { class: `${mergedClsPrefix}-descriptions-table-content__label`, style: labelStyle }, [
|
|
97
97
|
...itemLabel,
|
|
98
|
-
separator &&
|
|
99
|
-
h("span", { class: `${mergedClsPrefix}-descriptions-separator` }, separator)
|
|
98
|
+
separator && (h("span", { class: `${mergedClsPrefix}-descriptions-separator` }, separator))
|
|
100
99
|
]),
|
|
101
100
|
h("span", { class: `${mergedClsPrefix}-descriptions-table-content__content`, style: contentStyle }, itemChildren)));
|
|
102
101
|
}
|