naive-ui 2.33.4 → 2.34.0
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/dist/index.js +3517 -6061
- package/dist/index.prod.js +2 -2
- package/es/_internal/clear/src/styles/index.cssr.js +2 -2
- package/es/_internal/close/src/styles/index.cssr.js +2 -2
- package/es/_internal/index.d.ts +1 -0
- package/es/_internal/loading/index.d.ts +1 -0
- package/es/_internal/loading/src/Loading.d.ts +26 -14
- package/es/_internal/loading/src/Loading.js +17 -20
- package/es/_internal/scrollbar/src/styles/index.cssr.js +2 -2
- package/es/_internal/select-menu/src/styles/index.cssr.js +2 -2
- package/es/_internal/selection/src/Selection.js +5 -5
- package/es/_internal/selection/src/styles/index.cssr.js +2 -2
- package/es/_internal/slot-machine/src/styles/index.cssr.js +4 -3
- package/es/_styles/global/index.cssr.js +2 -2
- package/es/alert/src/styles/index.cssr.js +2 -2
- package/es/anchor/src/styles/index.cssr.js +2 -2
- package/es/auto-complete/src/styles/index.cssr.js +2 -2
- package/es/avatar/src/Avatar.d.ts +4 -1
- package/es/avatar/src/Avatar.js +12 -13
- package/es/avatar/src/styles/index.cssr.js +2 -2
- package/es/avatar-group/index.d.ts +1 -1
- package/es/avatar-group/src/AvatarGroup.d.ts +7 -7
- package/es/avatar-group/src/styles/avatar-group-rtl.cssr.js +2 -2
- package/es/avatar-group/src/styles/avatar-group.cssr.js +2 -2
- package/es/back-top/src/styles/index.cssr.js +2 -2
- package/es/badge/src/styles/index.cssr.js +2 -2
- package/es/breadcrumb/src/styles/index.cssr.js +2 -2
- package/es/button/src/Button.d.ts +4 -1
- package/es/button/src/Button.js +3 -3
- package/es/button/src/styles/index.cssr.js +2 -2
- package/es/button-group/src/styles/index.cssr.js +0 -3
- package/es/button-group/src/styles/rtl.cssr.js +0 -2
- package/es/calendar/src/styles/index.cssr.js +2 -2
- package/es/card/src/styles/index.cssr.js +4 -3
- package/es/carousel/src/styles/index.cssr.js +2 -2
- package/es/cascader/src/Cascader.d.ts +8 -0
- package/es/cascader/src/Cascader.js +41 -2
- package/es/cascader/src/CascaderOption.d.ts +1 -1
- package/es/cascader/src/CascaderOption.js +1 -7
- package/es/cascader/src/CascaderSelectMenu.d.ts +3 -0
- package/es/cascader/src/CascaderSelectMenu.js +8 -4
- package/es/cascader/src/interface.d.ts +11 -1
- package/es/cascader/src/styles/index.cssr.js +2 -2
- package/es/checkbox/src/styles/index.cssr.js +8 -5
- package/es/code/src/Code.d.ts +1 -1
- package/es/code/src/styles/index.cssr.js +2 -2
- package/es/collapse/src/styles/index.cssr.js +2 -2
- package/es/color-picker/src/ColorPicker.d.ts +5 -5
- package/es/color-picker/src/ColorPicker.js +7 -1
- package/es/color-picker/src/styles/index.cssr.js +2 -2
- package/es/color-picker/src/utils.d.ts +1 -1
- package/es/components.d.ts +1 -0
- package/es/components.js +1 -0
- package/es/config-provider/src/ConfigProvider.d.ts +6 -0
- package/es/config-provider/src/ConfigProvider.js +7 -0
- package/es/config-provider/src/internal-interface.d.ts +4 -0
- package/es/data-table/src/DataTable.d.ts +11 -0
- package/es/data-table/src/DataTable.js +7 -3
- package/es/data-table/src/TableParts/Body.d.ts +1 -0
- package/es/data-table/src/TableParts/Body.js +14 -6
- package/es/data-table/src/TableParts/Header.js +7 -5
- package/es/data-table/src/interface.d.ts +10 -2
- package/es/data-table/src/interface.js +1 -1
- package/es/data-table/src/styles/index.cssr.js +21 -9
- package/es/date-picker/src/DatePicker.js +5 -0
- package/es/date-picker/src/panel/panelHeader.d.ts +6 -6
- package/es/date-picker/src/styles/index.cssr.js +2 -2
- package/es/descriptions/src/styles/index.cssr.js +2 -2
- package/es/dialog/src/DialogEnvironment.d.ts +3 -0
- package/es/dialog/src/DialogEnvironment.js +2 -2
- package/es/dialog/src/DialogProvider.d.ts +3 -0
- package/es/dialog/src/styles/index.cssr.js +2 -2
- package/es/divider/src/styles/index.cssr.js +2 -2
- package/es/drawer/src/styles/index.cssr.js +2 -2
- package/es/dropdown/src/styles/index.cssr.js +2 -2
- package/es/dynamic-input/src/styles/index.cssr.js +2 -2
- package/es/dynamic-tags/src/styles/index.cssr.js +2 -2
- package/es/empty/src/styles/index.cssr.js +2 -2
- package/es/equation/index.d.ts +1 -0
- package/es/equation/index.js +1 -0
- package/es/equation/src/Equation.d.ts +18 -0
- package/es/equation/src/Equation.js +29 -0
- package/es/equation/styles/dark.d.ts +3 -0
- package/es/equation/styles/dark.js +8 -0
- package/es/equation/styles/index.d.ts +3 -0
- package/es/equation/styles/index.js +2 -0
- package/es/equation/styles/light.d.ts +6 -0
- package/es/equation/styles/light.js +8 -0
- package/es/form/src/FormItem.d.ts +3 -2
- package/es/form/src/FormItem.js +24 -7
- package/es/form/src/styles/form-item.cssr.js +5 -3
- package/es/gradient-text/src/styles/index.cssr.js +2 -2
- package/es/icon/src/styles/index.cssr.js +2 -2
- package/es/icon-wrapper/src/styles/index.cssr.js +2 -2
- package/es/image/src/Image.d.ts +4 -1
- package/es/image/src/Image.js +13 -7
- package/es/image/src/ImagePreview.d.ts +3 -2
- package/es/image/src/ImagePreview.js +41 -8
- package/es/image/src/interface.d.ts +5 -0
- package/es/image/src/interface.js +2 -0
- package/es/image/src/styles/index.cssr.js +2 -2
- package/es/input/src/Input.d.ts +3 -0
- package/es/input/src/Input.js +25 -6
- package/es/input/src/WordCount.js +2 -2
- package/es/input/src/interface.d.ts +1 -0
- package/es/input/src/styles/input-group-label.cssr.js +2 -2
- package/es/input/src/styles/input.cssr.js +11 -7
- package/es/layout/src/styles/layout-footer.cssr.js +2 -2
- package/es/layout/src/styles/layout-header.cssr.js +2 -2
- package/es/layout/src/styles/layout-sider.cssr.js +2 -2
- package/es/layout/src/styles/layout.cssr.js +2 -2
- package/es/list/src/styles/index.cssr.js +2 -2
- package/es/loading-bar/src/styles/index.cssr.js +2 -2
- package/es/locales/common/arDZ.d.ts +3 -0
- package/es/locales/common/arDZ.js +120 -0
- package/es/locales/common/deDE.js +2 -1
- package/es/locales/common/enGB.js +2 -1
- package/es/locales/common/enUS.d.ts +1 -0
- package/es/locales/common/enUS.js +2 -1
- package/es/locales/common/eo.js +2 -1
- package/es/locales/common/esAR.js +2 -1
- package/es/locales/common/frFR.js +2 -1
- package/es/locales/common/idID.js +2 -1
- package/es/locales/common/itIT.js +2 -1
- package/es/locales/common/jaJP.js +2 -1
- package/es/locales/common/koKR.js +2 -1
- package/es/locales/common/nbNO.js +2 -1
- package/es/locales/common/nlNL.js +2 -1
- package/es/locales/common/plPL.js +2 -1
- package/es/locales/common/ptBR.js +2 -1
- package/es/locales/common/ruRU.js +2 -1
- package/es/locales/common/skSK.js +2 -1
- package/es/locales/common/thTH.js +2 -1
- package/es/locales/common/trTR.d.ts +3 -0
- package/es/locales/common/trTR.js +121 -0
- package/es/locales/common/ukUA.js +2 -1
- package/es/locales/common/viVN.js +2 -1
- package/es/locales/common/zhCN.js +2 -1
- package/es/locales/common/zhTW.js +2 -1
- package/es/locales/date/arDZ.d.ts +3 -0
- package/es/locales/date/arDZ.js +6 -0
- package/es/locales/date/trTR.d.ts +3 -0
- package/es/locales/date/trTR.js +6 -0
- package/es/locales/index.d.ts +4 -0
- package/es/locales/index.js +4 -0
- package/es/log/src/styles/index.cssr.js +2 -2
- package/es/mention/src/Mention.d.ts +6 -0
- package/es/mention/src/Mention.js +6 -1
- package/es/mention/src/styles/index.cssr.js +2 -2
- package/es/menu/src/styles/index.cssr.js +2 -3
- package/es/message/src/styles/index.cssr.js +2 -2
- package/es/modal/src/BodyWrapper.d.ts +1 -1
- package/es/modal/src/styles/index.cssr.js +2 -2
- package/es/notification/src/styles/index.cssr.js +2 -3
- package/es/page-header/src/styles/index.cssr.js +2 -2
- package/es/pagination/src/Pagination.js +1 -1
- package/es/pagination/src/styles/index.cssr.js +2 -2
- package/es/popconfirm/src/styles/index.cssr.js +2 -2
- package/es/popover/src/styles/index.cssr.js +5 -5
- package/es/popselect/src/styles/index.cssr.js +2 -2
- package/es/progress/src/styles/index.cssr.js +2 -2
- package/es/radio/src/styles/radio-group.cssr.js +2 -2
- package/es/radio/src/styles/radio.cssr.js +2 -2
- package/es/rate/src/styles/index.cssr.js +2 -2
- package/es/result/src/styles/index.cssr.js +2 -2
- package/es/select/src/Select.js +1 -0
- package/es/select/src/styles/index.cssr.js +2 -2
- package/es/skeleton/src/styles/index.cssr.js +2 -2
- package/es/slider/src/styles/index.cssr.js +2 -2
- package/es/spin/src/styles/index.cssr.js +2 -2
- package/es/statistic/src/styles/index.cssr.js +2 -2
- package/es/steps/src/styles/index.cssr.js +2 -2
- package/es/switch/src/styles/index.cssr.js +2 -2
- package/es/table/src/styles/index.cssr.js +2 -2
- package/es/tabs/src/Tabs.d.ts +7 -7
- package/es/tabs/src/styles/index.cssr.js +2 -2
- package/es/tag/src/styles/index.cssr.js +2 -2
- package/es/themes/dark.js +2 -0
- package/es/themes/light.js +2 -0
- package/es/thing/src/styles/index.cssr.js +2 -2
- package/es/time-picker/src/styles/index.cssr.js +2 -2
- package/es/timeline/src/styles/index.cssr.js +6 -3
- package/es/transfer/src/Transfer.d.ts +13 -0
- package/es/transfer/src/Transfer.js +6 -2
- package/es/transfer/src/TransferListItem.d.ts +2 -1
- package/es/transfer/src/TransferListItem.js +5 -4
- package/es/transfer/src/interface.d.ts +1 -0
- package/es/transfer/src/styles/index.cssr.js +2 -2
- package/es/transfer/src/use-transfer-data.d.ts +1 -0
- package/es/transfer/src/use-transfer-data.js +13 -4
- package/es/tree/src/Tree.d.ts +60 -30
- package/es/tree/src/Tree.js +70 -24
- package/es/tree/src/TreeNode.d.ts +1 -1
- package/es/tree/src/TreeNode.js +1 -1
- package/es/tree/src/TreeNodeSwitcher.d.ts +3 -0
- package/es/tree/src/TreeNodeSwitcher.js +7 -5
- package/es/tree/src/interface.d.ts +12 -1
- package/es/tree/src/styles/index.cssr.js +3 -2
- package/es/tree/src/utils.d.ts +6 -0
- package/es/tree/src/utils.js +4 -0
- package/es/tree-select/index.d.ts +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +38 -19
- package/es/tree-select/src/TreeSelect.js +75 -48
- package/es/tree-select/src/interface.d.ts +33 -2
- package/es/tree-select/src/styles/index.cssr.js +2 -2
- package/es/typography/src/styles/a.cssr.js +2 -2
- package/es/typography/src/styles/blockquote.cssr.js +2 -2
- package/es/typography/src/styles/header.cssr.js +2 -2
- package/es/typography/src/styles/hr.cssr.js +2 -2
- package/es/typography/src/styles/list.cssr.js +2 -2
- package/es/typography/src/styles/p.cssr.js +2 -2
- package/es/typography/src/styles/text.cssr.js +2 -2
- package/es/upload/index.d.ts +1 -1
- package/es/upload/src/Upload.d.ts +77 -1
- package/es/upload/src/Upload.js +28 -11
- package/es/upload/src/UploadFile.d.ts +2 -0
- package/es/upload/src/UploadFile.js +9 -10
- package/es/upload/src/interface.d.ts +7 -3
- package/es/upload/src/utils.d.ts +2 -2
- package/es/upload/src/utils.js +2 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/clear/src/styles/index.cssr.js +2 -5
- package/lib/_internal/close/src/styles/index.cssr.js +2 -4
- package/lib/_internal/icon/src/styles/index.cssr.js +0 -2
- package/lib/_internal/index.d.ts +1 -0
- package/lib/_internal/loading/index.d.ts +1 -0
- package/lib/_internal/loading/src/Loading.d.ts +26 -14
- package/lib/_internal/loading/src/Loading.js +17 -20
- package/lib/_internal/loading/src/styles/index.cssr.js +0 -3
- package/lib/_internal/menu-mask/src/styles/index.cssr.js +0 -3
- package/lib/_internal/scrollbar/src/styles/index.cssr.js +2 -5
- package/lib/_internal/scrollbar/src/styles/rtl.cssr.js +0 -2
- package/lib/_internal/select-menu/src/styles/index.cssr.js +2 -5
- package/lib/_internal/selection/src/Selection.js +5 -5
- package/lib/_internal/selection/src/styles/index.cssr.js +2 -4
- package/lib/_internal/slot-machine/src/styles/index.cssr.js +4 -7
- package/lib/_internal/wave/src/styles/index.cssr.js +0 -2
- package/lib/_styles/global/index.cssr.js +2 -6
- package/lib/_styles/transitions/fade-down.cssr.js +0 -6
- package/lib/_styles/transitions/fade-in-height-expand.cssr.js +0 -6
- package/lib/_styles/transitions/fade-in-scale-up.cssr.js +0 -6
- package/lib/_styles/transitions/fade-in-width-expand.cssr.js +0 -6
- package/lib/_styles/transitions/fade-in.cssr.js +0 -6
- package/lib/_styles/transitions/fade-up-width-expand.cssr.js +0 -6
- package/lib/_styles/transitions/icon-switch.cssr.js +0 -6
- package/lib/affix/src/styles/index.cssr.js +0 -2
- package/lib/alert/src/styles/index.cssr.js +2 -5
- package/lib/alert/src/styles/rtl.cssr.js +0 -2
- package/lib/anchor/src/styles/index.cssr.js +2 -4
- package/lib/auto-complete/src/styles/index.cssr.js +2 -5
- package/lib/avatar/src/Avatar.d.ts +4 -1
- package/lib/avatar/src/Avatar.js +12 -13
- package/lib/avatar/src/styles/index.cssr.js +2 -4
- package/lib/avatar-group/index.d.ts +1 -1
- package/lib/avatar-group/src/AvatarGroup.d.ts +7 -7
- package/lib/avatar-group/src/styles/avatar-group-rtl.cssr.js +2 -4
- package/lib/avatar-group/src/styles/avatar-group.cssr.js +2 -4
- package/lib/back-top/src/styles/index.cssr.js +2 -5
- package/lib/badge/src/styles/index.cssr.js +2 -5
- package/lib/badge/src/styles/rtl.cssr.js +0 -2
- package/lib/breadcrumb/src/styles/index.cssr.js +2 -4
- package/lib/button/src/Button.d.ts +4 -1
- package/lib/button/src/Button.js +3 -3
- package/lib/button/src/styles/index.cssr.js +2 -7
- package/lib/button/src/styles/rtl.cssr.js +0 -2
- package/lib/button-group/src/styles/index.cssr.js +0 -5
- package/lib/button-group/src/styles/rtl.cssr.js +0 -4
- package/lib/calendar/src/styles/index.cssr.js +2 -4
- package/lib/card/src/styles/index.cssr.js +4 -5
- package/lib/card/src/styles/rtl.cssr.js +0 -2
- package/lib/carousel/src/styles/index.cssr.js +2 -4
- package/lib/cascader/src/Cascader.d.ts +8 -0
- package/lib/cascader/src/Cascader.js +41 -2
- package/lib/cascader/src/CascaderOption.d.ts +1 -1
- package/lib/cascader/src/CascaderOption.js +1 -7
- package/lib/cascader/src/CascaderSelectMenu.d.ts +3 -0
- package/lib/cascader/src/CascaderSelectMenu.js +8 -4
- package/lib/cascader/src/interface.d.ts +11 -1
- package/lib/cascader/src/styles/index.cssr.js +2 -5
- package/lib/checkbox/src/styles/index.cssr.js +8 -8
- package/lib/checkbox/src/styles/rtl.cssr.js +0 -2
- package/lib/code/src/Code.d.ts +1 -1
- package/lib/code/src/styles/index.cssr.js +2 -4
- package/lib/collapse/src/styles/index.cssr.js +2 -5
- package/lib/collapse/src/styles/rtl.cssr.js +0 -2
- package/lib/collapse-transition/src/styles/index.cssr.js +0 -3
- package/lib/collapse-transition/src/styles/rtl.cssr.js +0 -2
- package/lib/color-picker/src/ColorPicker.d.ts +5 -5
- package/lib/color-picker/src/ColorPicker.js +7 -1
- package/lib/color-picker/src/styles/index.cssr.js +2 -5
- package/lib/color-picker/src/utils.d.ts +1 -1
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +6 -0
- package/lib/config-provider/src/ConfigProvider.js +7 -0
- package/lib/config-provider/src/internal-interface.d.ts +4 -0
- package/lib/data-table/src/DataTable.d.ts +11 -0
- package/lib/data-table/src/DataTable.js +6 -2
- package/lib/data-table/src/TableParts/Body.d.ts +1 -0
- package/lib/data-table/src/TableParts/Body.js +13 -5
- package/lib/data-table/src/TableParts/Header.js +7 -5
- package/lib/data-table/src/interface.d.ts +10 -2
- package/lib/data-table/src/interface.js +1 -1
- package/lib/data-table/src/styles/index.cssr.js +21 -13
- package/lib/date-picker/src/DatePicker.js +5 -0
- package/lib/date-picker/src/panel/panelHeader.d.ts +6 -6
- package/lib/date-picker/src/styles/index.cssr.js +2 -5
- package/lib/descriptions/src/styles/index.cssr.js +2 -4
- package/lib/dialog/src/DialogEnvironment.d.ts +3 -0
- package/lib/dialog/src/DialogEnvironment.js +2 -2
- package/lib/dialog/src/DialogProvider.d.ts +3 -0
- package/lib/dialog/src/styles/index.cssr.js +2 -4
- package/lib/divider/src/styles/index.cssr.js +2 -4
- package/lib/drawer/src/styles/index.cssr.js +2 -9
- package/lib/drawer/src/styles/rtl.cssr.js +0 -2
- package/lib/dropdown/src/styles/index.cssr.js +2 -5
- package/lib/dynamic-input/src/styles/index.cssr.js +2 -4
- package/lib/dynamic-input/src/styles/rtl.cssr.js +0 -2
- package/lib/dynamic-tags/src/styles/index.cssr.js +2 -4
- package/lib/ellipsis/src/styles/index.cssr.js +0 -2
- package/lib/empty/src/styles/index.cssr.js +2 -4
- package/lib/equation/index.d.ts +1 -0
- package/lib/equation/index.js +6 -0
- package/lib/equation/src/Equation.d.ts +18 -0
- package/lib/equation/src/Equation.js +32 -0
- package/lib/equation/styles/dark.d.ts +3 -0
- package/lib/equation/styles/dark.js +10 -0
- package/lib/equation/styles/index.d.ts +3 -0
- package/lib/equation/styles/index.js +10 -0
- package/lib/equation/styles/light.d.ts +6 -0
- package/lib/equation/styles/light.js +12 -0
- package/lib/form/src/FormItem.d.ts +3 -2
- package/lib/form/src/FormItem.js +24 -7
- package/lib/form/src/styles/form-item.cssr.js +5 -6
- package/lib/form/src/styles/form.cssr.js +0 -2
- package/lib/gradient-text/src/styles/index.cssr.js +2 -4
- package/lib/icon/src/styles/index.cssr.js +2 -4
- package/lib/icon-wrapper/src/styles/index.cssr.js +2 -4
- package/lib/image/src/Image.d.ts +4 -1
- package/lib/image/src/Image.js +11 -5
- package/lib/image/src/ImagePreview.d.ts +3 -2
- package/lib/image/src/ImagePreview.js +39 -6
- package/lib/image/src/interface.d.ts +5 -0
- package/lib/image/src/interface.js +3 -1
- package/lib/image/src/styles/index.cssr.js +2 -6
- package/lib/input/src/Input.d.ts +3 -0
- package/lib/input/src/Input.js +25 -6
- package/lib/input/src/WordCount.js +2 -2
- package/lib/input/src/interface.d.ts +1 -0
- package/lib/input/src/styles/input-group-label.cssr.js +2 -4
- package/lib/input/src/styles/input-group.cssr.js +0 -2
- package/lib/input/src/styles/input.cssr.js +11 -9
- package/lib/input/src/styles/rtl.cssr.js +0 -2
- package/lib/input-number/src/styles/input-number.cssr.js +0 -2
- package/lib/input-number/src/styles/rtl.cssr.js +0 -2
- package/lib/layout/src/styles/layout-footer.cssr.js +2 -4
- package/lib/layout/src/styles/layout-header.cssr.js +2 -4
- package/lib/layout/src/styles/layout-sider.cssr.js +2 -4
- package/lib/layout/src/styles/layout.cssr.js +2 -4
- package/lib/legacy-grid/src/styles/index.cssr.js +0 -2
- package/lib/legacy-grid/src/styles/rtl.cssr.js +0 -2
- package/lib/legacy-transfer/src/styles/index.cssr.js +0 -3
- package/lib/list/src/styles/index.cssr.js +2 -4
- package/lib/list/src/styles/rtl.cssr.js +0 -2
- package/lib/loading-bar/src/styles/index.cssr.js +2 -5
- package/lib/locales/common/arDZ.d.ts +3 -0
- package/lib/locales/common/arDZ.js +122 -0
- package/lib/locales/common/deDE.js +2 -1
- package/lib/locales/common/enGB.js +2 -1
- package/lib/locales/common/enUS.d.ts +1 -0
- package/lib/locales/common/enUS.js +2 -1
- package/lib/locales/common/eo.js +2 -1
- package/lib/locales/common/esAR.js +2 -1
- package/lib/locales/common/frFR.js +2 -1
- package/lib/locales/common/idID.js +2 -1
- package/lib/locales/common/itIT.js +2 -1
- package/lib/locales/common/jaJP.js +2 -1
- package/lib/locales/common/koKR.js +2 -1
- package/lib/locales/common/nbNO.js +2 -1
- package/lib/locales/common/nlNL.js +2 -1
- package/lib/locales/common/plPL.js +2 -1
- package/lib/locales/common/ptBR.js +2 -1
- package/lib/locales/common/ruRU.js +2 -1
- package/lib/locales/common/skSK.js +2 -1
- package/lib/locales/common/thTH.js +2 -1
- package/lib/locales/common/trTR.d.ts +3 -0
- package/lib/locales/common/trTR.js +123 -0
- package/lib/locales/common/ukUA.js +2 -1
- package/lib/locales/common/viVN.js +2 -1
- package/lib/locales/common/zhCN.js +2 -1
- package/lib/locales/common/zhTW.js +2 -1
- package/lib/locales/date/arDZ.d.ts +3 -0
- package/lib/locales/date/arDZ.js +11 -0
- package/lib/locales/date/trTR.d.ts +3 -0
- package/lib/locales/date/trTR.js +11 -0
- package/lib/locales/index.d.ts +4 -0
- package/lib/locales/index.js +9 -1
- package/lib/log/src/styles/index.cssr.js +2 -5
- package/lib/mention/src/Mention.d.ts +6 -0
- package/lib/mention/src/Mention.js +6 -1
- package/lib/mention/src/styles/index.cssr.js +2 -5
- package/lib/menu/src/styles/index.cssr.js +2 -6
- package/lib/message/src/styles/index.cssr.js +2 -6
- package/lib/message/src/styles/rtl.cssr.js +0 -2
- package/lib/modal/src/BodyWrapper.d.ts +1 -1
- package/lib/modal/src/styles/index.cssr.js +2 -6
- package/lib/notification/src/styles/index.cssr.js +2 -5
- package/lib/notification/src/styles/rtl.cssr.js +0 -2
- package/lib/page-header/src/styles/index.cssr.js +2 -4
- package/lib/page-header/src/styles/rtl.cssr.js +0 -2
- package/lib/pagination/src/Pagination.js +1 -1
- package/lib/pagination/src/styles/index.cssr.js +2 -4
- package/lib/pagination/src/styles/rtl.cssr.js +0 -2
- package/lib/popconfirm/src/styles/index.cssr.js +2 -4
- package/lib/popover/src/styles/index.cssr.js +5 -8
- package/lib/popselect/src/styles/index.cssr.js +2 -4
- package/lib/progress/src/styles/index.cssr.js +2 -4
- package/lib/radio/src/styles/radio-group.cssr.js +2 -4
- package/lib/radio/src/styles/radio.cssr.js +2 -4
- package/lib/radio/src/styles/rtl.cssr.js +0 -2
- package/lib/rate/src/styles/index.cssr.js +2 -4
- package/lib/result/src/styles/index.cssr.js +2 -4
- package/lib/select/src/Select.js +1 -0
- package/lib/select/src/styles/index.cssr.js +2 -5
- package/lib/skeleton/src/styles/index.cssr.js +2 -4
- package/lib/slider/src/styles/index.cssr.js +2 -5
- package/lib/space/src/styles/rtl.cssr.js +0 -2
- package/lib/spin/src/styles/index.cssr.js +2 -5
- package/lib/statistic/src/styles/index.cssr.js +2 -4
- package/lib/statistic/src/styles/rtl.cssr.js +0 -2
- package/lib/steps/src/styles/index.cssr.js +2 -5
- package/lib/steps/src/styles/rtl.cssr.js +0 -2
- package/lib/switch/src/styles/index.cssr.js +2 -5
- package/lib/table/src/styles/index.cssr.js +2 -4
- package/lib/table/src/styles/rtl.cssr.js +0 -2
- package/lib/tabs/src/Tabs.d.ts +7 -7
- package/lib/tabs/src/styles/index.cssr.js +2 -4
- package/lib/tag/src/styles/index.cssr.js +2 -4
- package/lib/tag/src/styles/rtl.cssr.js +0 -2
- package/lib/themes/dark.js +100 -98
- package/lib/themes/light.js +100 -98
- package/lib/thing/src/styles/index.cssr.js +2 -4
- package/lib/thing/src/styles/rtl.cssr.js +0 -2
- package/lib/time-picker/src/styles/index.cssr.js +2 -5
- package/lib/timeline/src/styles/index.cssr.js +6 -5
- package/lib/transfer/src/Transfer.d.ts +13 -0
- package/lib/transfer/src/Transfer.js +6 -2
- package/lib/transfer/src/TransferListItem.d.ts +2 -1
- package/lib/transfer/src/TransferListItem.js +5 -4
- package/lib/transfer/src/interface.d.ts +1 -0
- package/lib/transfer/src/styles/index.cssr.js +2 -4
- package/lib/transfer/src/use-transfer-data.d.ts +1 -0
- package/lib/transfer/src/use-transfer-data.js +13 -4
- package/lib/tree/src/Tree.d.ts +60 -30
- package/lib/tree/src/Tree.js +69 -23
- package/lib/tree/src/TreeNode.d.ts +1 -1
- package/lib/tree/src/TreeNode.js +1 -1
- package/lib/tree/src/TreeNodeSwitcher.d.ts +3 -0
- package/lib/tree/src/TreeNodeSwitcher.js +7 -5
- package/lib/tree/src/interface.d.ts +12 -1
- package/lib/tree/src/styles/index.cssr.js +3 -6
- package/lib/tree/src/styles/rtl.cssr.js +0 -2
- package/lib/tree/src/utils.d.ts +6 -0
- package/lib/tree/src/utils.js +6 -1
- package/lib/tree-select/index.d.ts +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +38 -19
- package/lib/tree-select/src/TreeSelect.js +75 -48
- package/lib/tree-select/src/interface.d.ts +33 -2
- package/lib/tree-select/src/styles/index.cssr.js +2 -5
- package/lib/typography/src/styles/a.cssr.js +2 -4
- package/lib/typography/src/styles/blockquote.cssr.js +2 -4
- package/lib/typography/src/styles/header.cssr.js +2 -4
- package/lib/typography/src/styles/hr.cssr.js +2 -4
- package/lib/typography/src/styles/list.cssr.js +2 -4
- package/lib/typography/src/styles/p.cssr.js +2 -4
- package/lib/typography/src/styles/text.cssr.js +2 -4
- package/lib/upload/index.d.ts +1 -1
- package/lib/upload/src/Upload.d.ts +77 -1
- package/lib/upload/src/Upload.js +27 -10
- package/lib/upload/src/UploadFile.d.ts +2 -0
- package/lib/upload/src/UploadFile.js +8 -9
- package/lib/upload/src/interface.d.ts +7 -3
- package/lib/upload/src/styles/index.cssr.js +0 -4
- package/lib/upload/src/utils.d.ts +2 -2
- package/lib/upload/src/utils.js +2 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/watermark/src/styles/index.cssr.js +0 -2
- package/package.json +13 -10
- package/volar.d.ts +1 -0
- package/web-types.json +236 -57
package/lib/form/src/FormItem.js
CHANGED
|
@@ -81,7 +81,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
81
81
|
const { validationErrored: validationErroredRef } = formItemMiscRefs;
|
|
82
82
|
const { mergedRequired: mergedRequiredRef, mergedRules: mergedRulesRef } = (0, utils_1.formItemRule)(props);
|
|
83
83
|
const { mergedSize: mergedSizeRef } = formItemSizeRefs;
|
|
84
|
-
const { mergedLabelPlacement: labelPlacementRef, mergedLabelAlign: labelTextAlignRef } = formItemMiscRefs;
|
|
84
|
+
const { mergedLabelPlacement: labelPlacementRef, mergedLabelAlign: labelTextAlignRef, mergedRequireMarkPlacement: mergedRequireMarkPlacementRef } = formItemMiscRefs;
|
|
85
85
|
const renderExplainsRef = (0, vue_1.ref)([]);
|
|
86
86
|
const feedbackIdRef = (0, vue_1.ref)((0, seemly_1.createId)());
|
|
87
87
|
const mergedDisabledRef = NForm
|
|
@@ -296,11 +296,26 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
296
296
|
};
|
|
297
297
|
return cssVars;
|
|
298
298
|
});
|
|
299
|
-
const themeClassHandle =
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
299
|
+
const themeClassHandle = inlineThemeDisabled
|
|
300
|
+
? (0, _mixins_1.useThemeClass)('form-item', (0, vue_1.computed)(() => {
|
|
301
|
+
var _a;
|
|
302
|
+
return `${mergedSizeRef.value[0]}${labelPlacementRef.value[0]}${((_a = labelTextAlignRef.value) === null || _a === void 0 ? void 0 : _a[0]) || ''}`;
|
|
303
|
+
}), cssVarsRef, props)
|
|
304
|
+
: undefined;
|
|
305
|
+
const reverseColSpaceRef = (0, vue_1.computed)(() => {
|
|
306
|
+
// label placement left
|
|
307
|
+
// require-mark-placement | label align | areas (1fr auto)
|
|
308
|
+
// left | left | mark text (need reverse)
|
|
309
|
+
// left | right | mark text (okay)
|
|
310
|
+
// right | left | mark text (okay)
|
|
311
|
+
// right | right | mark text (okay)
|
|
312
|
+
// right-hanging | left | text mark (okay)
|
|
313
|
+
// right-hanging | right | text mark (okay)
|
|
314
|
+
return (labelPlacementRef.value === 'left' &&
|
|
315
|
+
mergedRequireMarkPlacementRef.value === 'left' &&
|
|
316
|
+
labelTextAlignRef.value === 'left');
|
|
317
|
+
});
|
|
318
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({ labelElementRef, mergedClsPrefix: mergedClsPrefixRef, mergedRequired: mergedRequiredRef, feedbackId: feedbackIdRef, renderExplains: renderExplainsRef, reverseColSpace: reverseColSpaceRef }, formItemMiscRefs), formItemSizeRefs), exposedRef), { cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender });
|
|
304
319
|
},
|
|
305
320
|
render() {
|
|
306
321
|
const { $slots, mergedClsPrefix, mergedShowLabel, mergedShowRequireMark, mergedRequireMarkPlacement, onRender } = this;
|
|
@@ -318,7 +333,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
318
333
|
return ((0, vue_1.h)("label", Object.assign({}, labelProps, { class: [
|
|
319
334
|
labelProps === null || labelProps === void 0 ? void 0 : labelProps.class,
|
|
320
335
|
`${mergedClsPrefix}-form-item-label`,
|
|
321
|
-
`${mergedClsPrefix}-form-item-label--${mergedRequireMarkPlacement}-mark
|
|
336
|
+
`${mergedClsPrefix}-form-item-label--${mergedRequireMarkPlacement}-mark`,
|
|
337
|
+
this.reverseColSpace &&
|
|
338
|
+
`${mergedClsPrefix}-form-item-label--reverse-columns-space`
|
|
322
339
|
], style: this.mergedLabelStyle, ref: "labelElementRef" }), mergedRequireMarkPlacement === 'left'
|
|
323
340
|
? [markNode, textNode]
|
|
324
341
|
: [textNode, markNode]));
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
const cssr_1 = require("../../../_utils/cssr");
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const fade_down_cssr_1 = require("../../../_styles/transitions/fade-down.cssr");
|
|
8
|
+
// vars:
|
|
10
9
|
// --n-line-height
|
|
11
10
|
// --n-blank-height
|
|
12
11
|
// --n-feedback-padding
|
|
@@ -23,8 +22,6 @@ const fade_down_cssr_1 = require("../../../_styles/transitions/fade-down.cssr");
|
|
|
23
22
|
// --n-feedback-text-color-error
|
|
24
23
|
// --n-label-text-align
|
|
25
24
|
// --n-label-padding
|
|
26
|
-
|
|
27
|
-
|
|
28
25
|
exports.default = (0, cssr_1.cB)('form-item', `
|
|
29
26
|
display: grid;
|
|
30
27
|
line-height: var(--n-line-height);
|
|
@@ -68,7 +65,9 @@ exports.default = (0, cssr_1.cB)('form-item', `
|
|
|
68
65
|
box-sizing: border-box;
|
|
69
66
|
flex-shrink: 0;
|
|
70
67
|
flex-grow: 0;
|
|
71
|
-
`, [(0, cssr_1.cM)('
|
|
68
|
+
`, [(0, cssr_1.cM)('reverse-columns-space', `
|
|
69
|
+
grid-template-columns: auto 1fr;
|
|
70
|
+
`), (0, cssr_1.cM)('left-mark', `
|
|
72
71
|
grid-template-areas:
|
|
73
72
|
"mark text"
|
|
74
73
|
". text";
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const cssr_1 = require("../../../_utils/cssr");
|
|
7
|
+
// vars:
|
|
8
8
|
// --n-font-weight
|
|
9
9
|
// --n-rotate
|
|
10
10
|
// --n-bezier
|
|
11
11
|
// --n-color-start
|
|
12
12
|
// --n-color-end
|
|
13
|
-
|
|
14
|
-
|
|
15
13
|
exports.default = (0, cssr_1.cB)('gradient-text', `
|
|
16
14
|
display: inline-block;
|
|
17
15
|
font-weight: var(--n-font-weight);
|
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const cssr_1 = require("../../../_utils/cssr");
|
|
7
|
+
// vars:
|
|
8
8
|
// --n-bezier
|
|
9
9
|
// --n-color
|
|
10
10
|
// --n-opacity
|
|
11
|
-
|
|
12
|
-
|
|
13
11
|
exports.default = (0, cssr_1.cB)('icon', `
|
|
14
12
|
height: 1em;
|
|
15
13
|
width: 1em;
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const cssr_1 = require("../../../_utils/cssr");
|
|
7
|
+
// vars:
|
|
8
8
|
// --n-bezier
|
|
9
9
|
// --n-border-radius
|
|
10
10
|
// --n-color
|
|
11
11
|
// --n-icon-color
|
|
12
|
-
|
|
13
|
-
|
|
14
12
|
exports.default = (0, cssr_1.cB)('icon-wrapper', `
|
|
15
13
|
transition:
|
|
16
14
|
color .3s var(--n-bezier),
|
package/lib/image/src/Image.d.ts
CHANGED
|
@@ -100,6 +100,7 @@ export declare const imageProps: {
|
|
|
100
100
|
alt: StringConstructor;
|
|
101
101
|
height: PropType<string | number>;
|
|
102
102
|
imgProps: PropType<ImgHTMLAttributes>;
|
|
103
|
+
previewedImgProps: PropType<ImgHTMLAttributes>;
|
|
103
104
|
lazy: BooleanConstructor;
|
|
104
105
|
intersectionObserverOptions: PropType<IntersectionObserverOptions>;
|
|
105
106
|
objectFit: {
|
|
@@ -212,6 +213,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
212
213
|
alt: StringConstructor;
|
|
213
214
|
height: PropType<string | number>;
|
|
214
215
|
imgProps: PropType<ImgHTMLAttributes>;
|
|
216
|
+
previewedImgProps: PropType<ImgHTMLAttributes>;
|
|
215
217
|
lazy: BooleanConstructor;
|
|
216
218
|
intersectionObserverOptions: PropType<IntersectionObserverOptions>;
|
|
217
219
|
objectFit: {
|
|
@@ -236,10 +238,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
236
238
|
toggleShow: () => void;
|
|
237
239
|
} | null>;
|
|
238
240
|
imageRef: import("vue").Ref<HTMLImageElement | null>;
|
|
239
|
-
imgProps: import("vue").Ref<ImgHTMLAttributes | undefined>;
|
|
240
241
|
showError: import("vue").Ref<boolean>;
|
|
241
242
|
shouldStartLoading: import("vue").Ref<boolean>;
|
|
242
243
|
loaded: import("vue").Ref<boolean>;
|
|
244
|
+
mergedOnClick: (e: MouseEvent) => void;
|
|
243
245
|
mergedOnError: (e: Event) => void;
|
|
244
246
|
mergedOnLoad: (e: Event) => void;
|
|
245
247
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -338,6 +340,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
338
340
|
alt: StringConstructor;
|
|
339
341
|
height: PropType<string | number>;
|
|
340
342
|
imgProps: PropType<ImgHTMLAttributes>;
|
|
343
|
+
previewedImgProps: PropType<ImgHTMLAttributes>;
|
|
341
344
|
lazy: BooleanConstructor;
|
|
342
345
|
intersectionObserverOptions: PropType<IntersectionObserverOptions>;
|
|
343
346
|
objectFit: {
|
package/lib/image/src/Image.js
CHANGED
|
@@ -11,7 +11,7 @@ const interface_1 = require("./interface");
|
|
|
11
11
|
const utils_1 = require("./utils");
|
|
12
12
|
const ImageGroup_1 = require("./ImageGroup");
|
|
13
13
|
const ImagePreview_1 = __importDefault(require("./ImagePreview"));
|
|
14
|
-
exports.imageProps = Object.assign({ alt: String, height: [String, Number], imgProps: Object, lazy: Boolean, intersectionObserverOptions: Object, objectFit: {
|
|
14
|
+
exports.imageProps = Object.assign({ alt: String, height: [String, Number], imgProps: Object, previewedImgProps: Object, lazy: Boolean, intersectionObserverOptions: Object, objectFit: {
|
|
15
15
|
type: String,
|
|
16
16
|
default: 'fill'
|
|
17
17
|
}, previewSrc: String, fallbackSrc: String, width: [String, Number], src: String, previewDisabled: Boolean, loadDescription: String, onError: Function, onLoad: Function }, interface_1.imagePreviewSharedProps);
|
|
@@ -22,7 +22,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
22
22
|
setup(props) {
|
|
23
23
|
const imageRef = (0, vue_1.ref)(null);
|
|
24
24
|
const showErrorRef = (0, vue_1.ref)(false);
|
|
25
|
-
const imgPropsRef = (0, vue_1.toRef)(props, 'imgProps');
|
|
26
25
|
const previewInstRef = (0, vue_1.ref)(null);
|
|
27
26
|
const imageGroupHandle = (0, vue_1.inject)(ImageGroup_1.imageGroupInjectionKey, null);
|
|
28
27
|
const { mergedClsPrefixRef } = imageGroupHandle || (0, _mixins_1.useConfig)(props);
|
|
@@ -74,8 +73,15 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
74
73
|
showErrorRef.value = false;
|
|
75
74
|
});
|
|
76
75
|
const loadedRef = (0, vue_1.ref)(false);
|
|
76
|
+
(0, vue_1.provide)(interface_1.imageContextKey, {
|
|
77
|
+
previewedImgPropsRef: (0, vue_1.toRef)(props, 'previewedImgProps')
|
|
78
|
+
});
|
|
77
79
|
return Object.assign({ mergedClsPrefix: mergedClsPrefixRef, groupId: imageGroupHandle === null || imageGroupHandle === void 0 ? void 0 : imageGroupHandle.groupId, previewInstRef,
|
|
78
|
-
imageRef,
|
|
80
|
+
imageRef, showError: showErrorRef, shouldStartLoading: shouldStartLoadingRef, loaded: loadedRef, mergedOnClick: (e) => {
|
|
81
|
+
var _a, _b;
|
|
82
|
+
exposedMethods.click();
|
|
83
|
+
(_b = (_a = props.imgProps) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
84
|
+
}, mergedOnError: (e) => {
|
|
79
85
|
if (!shouldStartLoadingRef.value)
|
|
80
86
|
return;
|
|
81
87
|
showErrorRef.value = true;
|
|
@@ -94,13 +100,13 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
94
100
|
const { mergedClsPrefix, imgProps = {}, loaded, $attrs, lazy } = this;
|
|
95
101
|
const placeholderNode = (_b = (_a = this.$slots).placeholder) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
96
102
|
const loadSrc = this.src || imgProps.src || '';
|
|
97
|
-
const imgNode = (0, vue_1.h)('img', Object.assign(Object.assign({}, imgProps), {
|
|
103
|
+
const imgNode = (0, vue_1.h)('img', Object.assign(Object.assign({}, imgProps), { ref: 'imageRef', width: this.width || imgProps.width, height: this.height || imgProps.height, src: is_native_lazy_load_1.isImageSupportNativeLazy
|
|
98
104
|
? loadSrc
|
|
99
105
|
: this.showError
|
|
100
106
|
? this.fallbackSrc
|
|
101
107
|
: this.shouldStartLoading
|
|
102
108
|
? loadSrc
|
|
103
|
-
: undefined, alt: this.alt || imgProps.alt, 'aria-label': this.alt || imgProps.alt, onClick: this.
|
|
109
|
+
: undefined, alt: this.alt || imgProps.alt, 'aria-label': this.alt || imgProps.alt, onClick: this.mergedOnClick, onError: this.mergedOnError, onLoad: this.mergedOnLoad, loading: lazy ? 'lazy' : 'eager', style: [
|
|
104
110
|
imgProps.style || '',
|
|
105
111
|
placeholderNode && !loaded
|
|
106
112
|
? { height: '0', width: '0', visibility: 'hidden' }
|
|
@@ -113,12 +113,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
113
113
|
show: import("vue").Ref<boolean>;
|
|
114
114
|
appear: Readonly<import("vue").Ref<boolean>>;
|
|
115
115
|
displayed: import("vue").Ref<boolean>;
|
|
116
|
+
previewedImgProps: import("vue").Ref<import("vue").ImgHTMLAttributes> | undefined;
|
|
116
117
|
handleWheel(e: WheelEvent): void;
|
|
117
118
|
handlePreviewMousedown: (e: MouseEvent) => void;
|
|
118
|
-
handlePreviewDblclick: () => void;
|
|
119
|
+
handlePreviewDblclick: (e: MouseEvent) => void;
|
|
119
120
|
syncTransformOrigin: () => void;
|
|
120
121
|
handleAfterLeave: () => void;
|
|
121
|
-
handleDragStart: (e:
|
|
122
|
+
handleDragStart: (e: DragEvent) => void;
|
|
122
123
|
zoomIn: () => void;
|
|
123
124
|
zoomOut: () => void;
|
|
124
125
|
rotateCounterclockwise: () => void;
|
|
@@ -9,6 +9,7 @@ const vooks_1 = require("vooks");
|
|
|
9
9
|
const vueuc_1 = require("vueuc");
|
|
10
10
|
const evtd_1 = require("evtd");
|
|
11
11
|
const seemly_1 = require("seemly");
|
|
12
|
+
const lodash_1 = require("lodash");
|
|
12
13
|
const icons_1 = require("../../_internal/icons");
|
|
13
14
|
const _mixins_1 = require("../../_mixins");
|
|
14
15
|
const _internal_1 = require("../../_internal");
|
|
@@ -46,6 +47,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
46
47
|
function handleKeydown(e) {
|
|
47
48
|
var _a, _b;
|
|
48
49
|
switch (e.key) {
|
|
50
|
+
case ' ':
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
break;
|
|
49
53
|
case 'ArrowLeft':
|
|
50
54
|
(_a = props.onPrev) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
51
55
|
break;
|
|
@@ -155,7 +159,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
155
159
|
offsetY = offset.offsetY;
|
|
156
160
|
derivePreviewStyle();
|
|
157
161
|
}
|
|
162
|
+
const imageContext = (0, vue_1.inject)(interface_1.imageContextKey, null);
|
|
158
163
|
function handlePreviewMousedown(e) {
|
|
164
|
+
var _a, _b;
|
|
165
|
+
(_b = imageContext === null || imageContext === void 0 ? void 0 : (_a = imageContext.previewedImgPropsRef.value).onMousedown) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
166
|
+
if (e.button !== 0)
|
|
167
|
+
return;
|
|
159
168
|
const { clientX, clientY } = e;
|
|
160
169
|
dragging = true;
|
|
161
170
|
startX = clientX - offsetX;
|
|
@@ -168,7 +177,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
168
177
|
(0, evtd_1.on)('mousemove', document, handleMouseMove);
|
|
169
178
|
(0, evtd_1.on)('mouseup', document, handleMouseUp);
|
|
170
179
|
}
|
|
171
|
-
function handlePreviewDblclick() {
|
|
180
|
+
function handlePreviewDblclick(e) {
|
|
181
|
+
var _a, _b;
|
|
182
|
+
(_b = imageContext === null || imageContext === void 0 ? void 0 : (_a = imageContext.previewedImgPropsRef.value).onDblclick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
172
183
|
const originalImageSizeScale = getOrignalImageSizeScale();
|
|
173
184
|
scale = scale === originalImageSizeScale ? 1 : originalImageSizeScale;
|
|
174
185
|
derivePreviewStyle();
|
|
@@ -251,13 +262,27 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
251
262
|
if (!preview)
|
|
252
263
|
return;
|
|
253
264
|
const { style } = preview;
|
|
265
|
+
const controlledStyle = (0, vue_1.normalizeStyle)(imageContext === null || imageContext === void 0 ? void 0 : imageContext.previewedImgPropsRef.value.style);
|
|
266
|
+
let controlledStyleString = '';
|
|
267
|
+
if (typeof controlledStyle === 'string') {
|
|
268
|
+
controlledStyleString = controlledStyle + ';';
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
for (const key in controlledStyle) {
|
|
272
|
+
controlledStyleString += `${(0, lodash_1.kebabCase)(key)}: ${controlledStyle[key]};`;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
254
275
|
const transformStyle = `transform-origin: center; transform: translateX(${offsetX}px) translateY(${offsetY}px) rotate(${rotate}deg) scale(${scale});`;
|
|
255
276
|
if (dragging) {
|
|
256
|
-
style.cssText =
|
|
277
|
+
style.cssText =
|
|
278
|
+
controlledStyleString +
|
|
279
|
+
'cursor: grabbing; transition: none;' +
|
|
280
|
+
transformStyle;
|
|
257
281
|
}
|
|
258
282
|
else {
|
|
259
283
|
style.cssText =
|
|
260
|
-
|
|
284
|
+
controlledStyleString +
|
|
285
|
+
'cursor: grab;' +
|
|
261
286
|
transformStyle +
|
|
262
287
|
(transition ? '' : 'transition: none;');
|
|
263
288
|
}
|
|
@@ -314,7 +339,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
314
339
|
? (0, _mixins_1.useThemeClass)('image-preview', undefined, cssVarsRef, props)
|
|
315
340
|
: undefined;
|
|
316
341
|
return Object.assign({ previewRef,
|
|
317
|
-
previewWrapperRef, previewSrc: previewSrcRef, show: showRef, appear: (0, vooks_1.useIsMounted)(), displayed: displayedRef, handleWheel(e) {
|
|
342
|
+
previewWrapperRef, previewSrc: previewSrcRef, show: showRef, appear: (0, vooks_1.useIsMounted)(), displayed: displayedRef, previewedImgProps: imageContext === null || imageContext === void 0 ? void 0 : imageContext.previewedImgPropsRef, handleWheel(e) {
|
|
318
343
|
e.preventDefault();
|
|
319
344
|
},
|
|
320
345
|
handlePreviewMousedown,
|
|
@@ -324,6 +349,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
324
349
|
rotate = 0;
|
|
325
350
|
displayedRef.value = false;
|
|
326
351
|
}, handleDragStart: (e) => {
|
|
352
|
+
var _a, _b;
|
|
353
|
+
(_b = imageContext === null || imageContext === void 0 ? void 0 : (_a = imageContext.previewedImgPropsRef.value).onDragstart) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
327
354
|
e.preventDefault();
|
|
328
355
|
}, zoomIn,
|
|
329
356
|
zoomOut,
|
|
@@ -383,8 +410,14 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
383
410
|
// onEnter will be called twice, I don't know why
|
|
384
411
|
// Maybe it is a bug of vue
|
|
385
412
|
onEnter: this.syncTransformOrigin, onBeforeLeave: this.syncTransformOrigin }, {
|
|
386
|
-
default: () =>
|
|
387
|
-
|
|
413
|
+
default: () => {
|
|
414
|
+
const { previewedImgProps = {} } = this;
|
|
415
|
+
return (0, vue_1.withDirectives)((0, vue_1.h)("div", { class: `${clsPrefix}-image-preview-wrapper`, ref: "previewWrapperRef" },
|
|
416
|
+
(0, vue_1.h)("img", Object.assign({}, previewedImgProps, { draggable: false, onMousedown: this.handlePreviewMousedown, onDblclick: this.handlePreviewDblclick, class: [
|
|
417
|
+
`${clsPrefix}-image-preview`,
|
|
418
|
+
previewedImgProps.class
|
|
419
|
+
], key: this.previewSrc, src: this.previewSrc, ref: "previewRef", onDragstart: this.handleDragStart }))), [[vue_1.vShow, this.show]]);
|
|
420
|
+
}
|
|
388
421
|
})), [[vdirs_1.zindexable, { enabled: this.show }]]);
|
|
389
422
|
}
|
|
390
423
|
})));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ImgHTMLAttributes, Ref } from 'vue';
|
|
1
2
|
export interface MoveStrategy {
|
|
2
3
|
moveVerticalDirection: 'verticalTop' | 'verticalBottom';
|
|
3
4
|
moveHorizontalDirection: 'horizontalLeft' | 'horizontalRight';
|
|
@@ -98,3 +99,7 @@ export declare const imagePreviewSharedProps: {
|
|
|
98
99
|
}>;
|
|
99
100
|
}>>>;
|
|
100
101
|
};
|
|
102
|
+
export interface ImageContext {
|
|
103
|
+
previewedImgPropsRef: Ref<ImgHTMLAttributes>;
|
|
104
|
+
}
|
|
105
|
+
export declare const imageContextKey: import("vue").InjectionKey<ImageContext>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.imagePreviewSharedProps = void 0;
|
|
3
|
+
exports.imageContextKey = exports.imagePreviewSharedProps = void 0;
|
|
4
4
|
const _mixins_1 = require("../../_mixins");
|
|
5
|
+
const _utils_1 = require("../../_utils");
|
|
5
6
|
exports.imagePreviewSharedProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { showToolbar: { type: Boolean, default: true }, showToolbarTooltip: Boolean });
|
|
7
|
+
exports.imageContextKey = (0, _utils_1.createInjectionKey)('n-image');
|
|
@@ -3,19 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
const cssr_1 = require("../../../_utils/cssr");
|
|
8
|
-
|
|
9
7
|
const fade_in_cssr_1 = require("../../../_styles/transitions/fade-in.cssr");
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const fade_in_scale_up_cssr_1 = require("../../../_styles/transitions/fade-in-scale-up.cssr");
|
|
9
|
+
// vars:
|
|
12
10
|
// --n-toolbar-icon-color
|
|
13
11
|
// --n-toolbar-color
|
|
14
12
|
// --n-toolbar-border-radius
|
|
15
13
|
// --n-toolbar-box-shadow
|
|
16
14
|
// --n-bezier
|
|
17
|
-
|
|
18
|
-
|
|
19
15
|
exports.default = (0, cssr_1.c)([(0, cssr_1.c)('body >', [(0, cssr_1.cB)('image-container', 'position: fixed;')]), (0, cssr_1.cB)('image-preview-container', `
|
|
20
16
|
position: fixed;
|
|
21
17
|
left: 0;
|
package/lib/input/src/Input.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ export declare const inputProps: {
|
|
|
74
74
|
onClick: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
75
75
|
onChange: PropType<OnUpdateValue>;
|
|
76
76
|
onClear: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
77
|
+
countGraphemes: PropType<(value: string) => number>;
|
|
77
78
|
status: PropType<FormValidationStatus>;
|
|
78
79
|
'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
|
|
79
80
|
onUpdateValue: PropType<MaybeArray<OnUpdateValue>>;
|
|
@@ -350,6 +351,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
350
351
|
onClick: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
351
352
|
onChange: PropType<OnUpdateValue>;
|
|
352
353
|
onClear: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
354
|
+
countGraphemes: PropType<(value: string) => number>;
|
|
353
355
|
status: PropType<FormValidationStatus>;
|
|
354
356
|
'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
|
|
355
357
|
onUpdateValue: PropType<MaybeArray<OnUpdateValue>>;
|
|
@@ -917,6 +919,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
917
919
|
onClick: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
918
920
|
onChange: PropType<OnUpdateValue>;
|
|
919
921
|
onClear: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
922
|
+
countGraphemes: PropType<(value: string) => number>;
|
|
920
923
|
status: PropType<FormValidationStatus>;
|
|
921
924
|
'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
|
|
922
925
|
onUpdateValue: PropType<MaybeArray<OnUpdateValue>>;
|
package/lib/input/src/Input.js
CHANGED
|
@@ -73,7 +73,7 @@ exports.inputProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props),
|
|
|
73
73
|
}, showCount: Boolean, loading: {
|
|
74
74
|
type: Boolean,
|
|
75
75
|
default: undefined
|
|
76
|
-
}, allowInput: Function, renderCount: Function, onMousedown: Function, onKeydown: Function, onKeyup: Function, onInput: [Function, Array], onFocus: [Function, Array], onBlur: [Function, Array], onClick: [Function, Array], onChange: [Function, Array], onClear: [Function, Array], status: String, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array],
|
|
76
|
+
}, allowInput: Function, renderCount: Function, onMousedown: Function, onKeydown: Function, onKeyup: Function, onInput: [Function, Array], onFocus: [Function, Array], onBlur: [Function, Array], onClick: [Function, Array], onChange: [Function, Array], onClear: [Function, Array], countGraphemes: Function, status: String, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array],
|
|
77
77
|
/** private */
|
|
78
78
|
textDecoration: [String, Array], attrSize: {
|
|
79
79
|
type: Number,
|
|
@@ -384,6 +384,24 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
function allowInput(value) {
|
|
387
|
+
const { countGraphemes, maxlength, minlength } = props;
|
|
388
|
+
if (countGraphemes) {
|
|
389
|
+
let graphemesCount;
|
|
390
|
+
if (maxlength !== undefined) {
|
|
391
|
+
if (graphemesCount === undefined) {
|
|
392
|
+
graphemesCount = countGraphemes(value);
|
|
393
|
+
}
|
|
394
|
+
if (graphemesCount > Number(maxlength))
|
|
395
|
+
return false;
|
|
396
|
+
}
|
|
397
|
+
if (minlength !== undefined) {
|
|
398
|
+
if (graphemesCount === undefined) {
|
|
399
|
+
graphemesCount = countGraphemes(value);
|
|
400
|
+
}
|
|
401
|
+
if (graphemesCount < Number(maxlength))
|
|
402
|
+
return false;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
387
405
|
const { allowInput } = props;
|
|
388
406
|
if (typeof allowInput === 'function') {
|
|
389
407
|
return allowInput(value);
|
|
@@ -692,7 +710,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
692
710
|
(0, vue_1.provide)(interface_1.inputInjectionKey, {
|
|
693
711
|
mergedValueRef,
|
|
694
712
|
maxlengthRef,
|
|
695
|
-
mergedClsPrefixRef
|
|
713
|
+
mergedClsPrefixRef,
|
|
714
|
+
countGraphemesRef: (0, vue_1.toRef)(props, 'countGraphemes')
|
|
696
715
|
});
|
|
697
716
|
const exposedProps = {
|
|
698
717
|
wrapperElRef,
|
|
@@ -806,7 +825,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
806
825
|
},
|
|
807
826
|
render() {
|
|
808
827
|
var _a, _b;
|
|
809
|
-
const { mergedClsPrefix, mergedStatus, themeClass, type, onRender } = this;
|
|
828
|
+
const { mergedClsPrefix, mergedStatus, themeClass, type, countGraphemes, onRender } = this;
|
|
810
829
|
const $slots = this.$slots;
|
|
811
830
|
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
812
831
|
return ((0, vue_1.h)("div", { ref: "wrapperElRef", class: [
|
|
@@ -842,7 +861,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
842
861
|
(0, vue_1.h)("textarea", Object.assign({}, this.inputProps, { ref: "textareaElRef", class: [
|
|
843
862
|
`${mergedClsPrefix}-input__textarea-el`,
|
|
844
863
|
(_a = this.inputProps) === null || _a === void 0 ? void 0 : _a.class
|
|
845
|
-
], autofocus: this.autofocus, rows: Number(this.rows), placeholder: this.placeholder, value: this.mergedValue, disabled: this.mergedDisabled, maxlength: this.maxlength, minlength: this.minlength, readonly: this.readonly, tabindex: this.passivelyActivated && !this.activated
|
|
864
|
+
], autofocus: this.autofocus, rows: Number(this.rows), placeholder: this.placeholder, value: this.mergedValue, disabled: this.mergedDisabled, maxlength: countGraphemes ? undefined : this.maxlength, minlength: countGraphemes ? undefined : this.minlength, readonly: this.readonly, tabindex: this.passivelyActivated && !this.activated
|
|
846
865
|
? -1
|
|
847
866
|
: undefined, style: [
|
|
848
867
|
this.textDecorationStyle[0],
|
|
@@ -868,7 +887,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
868
887
|
], style: [
|
|
869
888
|
this.textDecorationStyle[0],
|
|
870
889
|
(_b = this.inputProps) === null || _b === void 0 ? void 0 : _b.style
|
|
871
|
-
], tabindex: this.passivelyActivated && !this.activated ? -1 : undefined, placeholder: this.mergedPlaceholder[0], disabled: this.mergedDisabled, maxlength: this.maxlength, minlength: this.minlength, value: Array.isArray(this.mergedValue)
|
|
890
|
+
], tabindex: this.passivelyActivated && !this.activated ? -1 : undefined, placeholder: this.mergedPlaceholder[0], disabled: this.mergedDisabled, maxlength: countGraphemes ? undefined : this.maxlength, minlength: countGraphemes ? undefined : this.minlength, value: Array.isArray(this.mergedValue)
|
|
872
891
|
? this.mergedValue[0]
|
|
873
892
|
: this.mergedValue, readonly: this.readonly, autofocus: this.autofocus, size: this.attrSize, onBlur: this.handleInputBlur, onFocus: (e) => this.handleInputFocus(e, 0), onInput: (e) => this.handleInput(e, 0), onChange: (e) => this.handleChange(e, 0) })),
|
|
874
893
|
this.showPlaceholder1 ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__placeholder` },
|
|
@@ -905,7 +924,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
905
924
|
this.pair ? ((0, vue_1.h)("span", { class: `${mergedClsPrefix}-input__separator` }, (0, _utils_1.resolveSlot)($slots.separator, () => [this.separator]))) : null,
|
|
906
925
|
this.pair ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input-wrapper` },
|
|
907
926
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__input` },
|
|
908
|
-
(0, vue_1.h)("input", { ref: "inputEl2Ref", type: this.type, class: `${mergedClsPrefix}-input__input-el`, tabindex: this.passivelyActivated && !this.activated ? -1 : undefined, placeholder: this.mergedPlaceholder[1], disabled: this.mergedDisabled, maxlength: this.maxlength, minlength: this.minlength, value: Array.isArray(this.mergedValue)
|
|
927
|
+
(0, vue_1.h)("input", { ref: "inputEl2Ref", type: this.type, class: `${mergedClsPrefix}-input__input-el`, tabindex: this.passivelyActivated && !this.activated ? -1 : undefined, placeholder: this.mergedPlaceholder[1], disabled: this.mergedDisabled, maxlength: countGraphemes ? undefined : this.maxlength, minlength: countGraphemes ? undefined : this.minlength, value: Array.isArray(this.mergedValue)
|
|
909
928
|
? this.mergedValue[1]
|
|
910
929
|
: undefined, readonly: this.readonly, style: this.textDecorationStyle[1], onBlur: this.handleInputBlur, onFocus: (e) => this.handleInputFocus(e, 1), onInput: (e) => this.handleInput(e, 1), onChange: (e) => this.handleChange(e, 1) }),
|
|
911
930
|
this.showPlaceholder2 ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__placeholder` },
|
|
@@ -7,14 +7,14 @@ const utils_1 = require("./utils");
|
|
|
7
7
|
exports.default = (0, vue_1.defineComponent)({
|
|
8
8
|
name: 'InputWordCount',
|
|
9
9
|
setup(_, { slots }) {
|
|
10
|
-
const { mergedValueRef, maxlengthRef, mergedClsPrefixRef } =
|
|
10
|
+
const { mergedValueRef, maxlengthRef, mergedClsPrefixRef, countGraphemesRef } =
|
|
11
11
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
12
12
|
(0, vue_1.inject)(interface_1.inputInjectionKey);
|
|
13
13
|
const wordCountRef = (0, vue_1.computed)(() => {
|
|
14
14
|
const { value: mergedValue } = mergedValueRef;
|
|
15
15
|
if (mergedValue === null || Array.isArray(mergedValue))
|
|
16
16
|
return 0;
|
|
17
|
-
return (
|
|
17
|
+
return (countGraphemesRef.value || utils_1.len)(mergedValue);
|
|
18
18
|
});
|
|
19
19
|
return () => {
|
|
20
20
|
const { value: maxlength } = maxlengthRef;
|
|
@@ -16,6 +16,7 @@ export interface InputWrappedRef {
|
|
|
16
16
|
}
|
|
17
17
|
export declare type InputInst = UnwrapRef<InputWrappedRef>;
|
|
18
18
|
export declare const inputInjectionKey: import("vue").InjectionKey<{
|
|
19
|
+
countGraphemesRef: Ref<((input: string) => number) | undefined>;
|
|
19
20
|
mergedValueRef: Ref<string | [string, string] | null>;
|
|
20
21
|
maxlengthRef: Ref<number | undefined>;
|
|
21
22
|
mergedClsPrefixRef: Ref<string>;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const cssr_1 = require("../../../_utils/cssr");
|
|
7
|
+
// vars:
|
|
8
8
|
// --n-bezier
|
|
9
9
|
// --n-group-label-color
|
|
10
10
|
// --n-border-radius
|
|
@@ -12,8 +12,6 @@ const cssr_1 = require("../../../_utils/cssr"); // vars:
|
|
|
12
12
|
// --n-font-size
|
|
13
13
|
// --n-height
|
|
14
14
|
// --n-group-label-border
|
|
15
|
-
|
|
16
|
-
|
|
17
15
|
exports.default = (0, cssr_1.cB)('input-group-label', `
|
|
18
16
|
position: relative;
|
|
19
17
|
user-select: none;
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.safariStyle = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const cssr_1 = require("../../../_utils/cssr");
|
|
8
|
+
// vars:
|
|
9
9
|
// --n-bezier
|
|
10
10
|
// --n-color
|
|
11
11
|
// --n-font-size
|
|
@@ -40,8 +40,6 @@ const cssr_1 = require("../../../_utils/cssr"); // vars:
|
|
|
40
40
|
// --n-count-text-color-disabled
|
|
41
41
|
// --n-loading-color
|
|
42
42
|
// ...form item vars
|
|
43
|
-
|
|
44
|
-
|
|
45
43
|
exports.default = (0, cssr_1.cB)('input', `
|
|
46
44
|
max-width: 100%;
|
|
47
45
|
cursor: text;
|
|
@@ -56,7 +54,8 @@ exports.default = (0, cssr_1.cB)('input', `
|
|
|
56
54
|
transition: background-color .3s var(--n-bezier);
|
|
57
55
|
font-size: var(--n-font-size);
|
|
58
56
|
--n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);
|
|
59
|
-
`, [
|
|
57
|
+
`, [
|
|
58
|
+
// common
|
|
60
59
|
(0, cssr_1.cE)('input, textarea', `
|
|
61
60
|
overflow: hidden;
|
|
62
61
|
flex-grow: 1;
|
|
@@ -108,7 +107,8 @@ exports.default = (0, cssr_1.cB)('input', `
|
|
|
108
107
|
top: 0;
|
|
109
108
|
left: 0;
|
|
110
109
|
height: 100%;
|
|
111
|
-
`)]),
|
|
110
|
+
`)]),
|
|
111
|
+
// input
|
|
112
112
|
(0, cssr_1.cB)('input-wrapper', `
|
|
113
113
|
overflow: hidden;
|
|
114
114
|
display: inline-flex;
|
|
@@ -122,7 +122,7 @@ exports.default = (0, cssr_1.cB)('input', `
|
|
|
122
122
|
overflow: hidden;
|
|
123
123
|
visibility: hidden;
|
|
124
124
|
position: static;
|
|
125
|
-
white-space:
|
|
125
|
+
white-space: pre;
|
|
126
126
|
pointer-events: none;
|
|
127
127
|
`), (0, cssr_1.cE)('input-el', `
|
|
128
128
|
padding: 0;
|
|
@@ -133,7 +133,8 @@ exports.default = (0, cssr_1.cB)('input', `
|
|
|
133
133
|
align-items: center;
|
|
134
134
|
`)])]), (0, cssr_1.cNotM)('textarea', [(0, cssr_1.cE)('placeholder', 'white-space: nowrap;')]), (0, cssr_1.cE)('eye', `
|
|
135
135
|
transition: color .3s var(--n-bezier);
|
|
136
|
-
`),
|
|
136
|
+
`),
|
|
137
|
+
// textarea
|
|
137
138
|
(0, cssr_1.cM)('textarea', 'width: 100%;', [(0, cssr_1.cB)('input-word-count', `
|
|
138
139
|
position: absolute;
|
|
139
140
|
right: var(--n-padding-right);
|
|
@@ -163,7 +164,8 @@ exports.default = (0, cssr_1.cB)('input', `
|
|
|
163
164
|
position: static;
|
|
164
165
|
white-space: pre-wrap;
|
|
165
166
|
overflow-wrap: break-word;
|
|
166
|
-
`)]),
|
|
167
|
+
`)]),
|
|
168
|
+
// pair
|
|
167
169
|
(0, cssr_1.cM)('pair', [(0, cssr_1.cE)('input-el, placeholder', 'text-align: center;'), (0, cssr_1.cE)('separator', `
|
|
168
170
|
display: flex;
|
|
169
171
|
align-items: center;
|