naive-ui 2.24.4 → 2.25.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/es/_internal/clear/src/Clear.js +3 -2
- package/es/_internal/close/src/Close.js +1 -1
- package/es/_internal/icon/src/Icon.js +1 -1
- package/es/_internal/icons/ArrowUp.d.ts +2 -0
- package/es/_internal/icons/ArrowUp.js +9 -0
- package/es/_internal/icons/index.d.ts +1 -0
- package/es/_internal/icons/index.js +1 -0
- package/es/_internal/loading/src/Loading.js +1 -1
- package/es/_internal/menu-mask/src/MenuMask.js +1 -1
- package/es/_internal/scrollbar/src/ScrollBar.js +1 -1
- package/es/_internal/select-menu/src/SelectMenu.d.ts +5 -5
- package/es/_internal/select-menu/src/SelectMenu.js +32 -16
- package/es/_internal/selection/src/Selection.d.ts +13 -5
- package/es/_internal/selection/src/Selection.js +24 -15
- package/es/_internal/selection/src/interface.d.ts +2 -2
- package/es/_internal/selection/src/styles/index.cssr.js +16 -31
- package/es/_internal/slot-machine/src/SlotMachine.js +1 -1
- package/es/_internal/wave/src/Wave.js +1 -1
- package/es/_mixins/use-config.js +1 -1
- package/es/_mixins/use-css-vars-class.d.ts +4 -2
- package/es/_mixins/use-css-vars-class.js +26 -11
- package/es/_mixins/use-form-item.d.ts +4 -0
- package/es/_mixins/use-form-item.js +7 -0
- package/es/_mixins/use-hljs.js +1 -1
- package/es/_mixins/use-locale.js +1 -1
- package/es/_mixins/use-style.js +1 -1
- package/es/_mixins/use-theme.d.ts +1 -1
- package/es/_mixins/use-theme.js +2 -2
- package/es/_utils/cssr/index.d.ts +1 -2
- package/es/_utils/cssr/index.js +1 -14
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.js +1 -1
- package/es/_utils/vue/index.d.ts +1 -1
- package/es/_utils/vue/index.js +1 -1
- package/es/_utils/vue/resolve-slot.d.ts +8 -2
- package/es/_utils/vue/resolve-slot.js +18 -1
- package/es/affix/src/Affix.js +1 -1
- package/es/alert/src/Alert.d.ts +4 -4
- package/es/alert/src/Alert.js +1 -1
- package/es/anchor/src/AnchorAdapter.js +1 -1
- package/es/auto-complete/src/AutoComplete.d.ts +17 -2
- package/es/auto-complete/src/AutoComplete.js +9 -5
- package/es/avatar/src/Avatar.js +2 -2
- package/es/avatar/src/AvatarGroup.d.ts +0 -1
- package/es/avatar/src/AvatarGroup.js +2 -3
- package/es/avatar/src/context.d.ts +2 -0
- package/es/avatar/src/context.js +2 -0
- package/es/back-top/src/BackTop.js +1 -1
- package/es/badge/src/Badge.d.ts +4 -4
- package/es/badge/src/Badge.js +1 -1
- package/es/breadcrumb/src/Breadcrumb.js +1 -1
- package/es/button/src/Button.d.ts +4 -3
- package/es/button/src/Button.js +265 -229
- package/es/button/src/ButtonGroup.js +1 -1
- package/es/button/src/styles/button.cssr.js +1 -0
- package/es/calendar/src/Calendar.js +1 -1
- package/es/card/src/Card.d.ts +5 -1
- package/es/card/src/Card.js +3 -2
- package/es/carousel/src/Carousel.js +4 -1
- package/es/carousel/src/CarouselArrow.js +6 -9
- package/es/carousel/src/styles/index.cssr.js +59 -48
- package/es/carousel/styles/light.js +2 -2
- package/es/cascader/src/Cascader.d.ts +6 -4
- package/es/cascader/src/Cascader.js +6 -6
- package/es/checkbox/src/Checkbox.js +1 -1
- package/es/code/src/Code.js +1 -1
- package/es/collapse/src/Collapse.js +1 -1
- package/es/collapse-transition/src/CollapseTransition.js +1 -1
- package/es/color-picker/src/ColorInputUnit.js +1 -1
- package/es/color-picker/src/ColorPicker.d.ts +37 -16
- package/es/color-picker/src/ColorPicker.js +14 -7
- package/es/color-picker/src/ColorPickerTrigger.d.ts +3 -0
- package/es/color-picker/src/ColorPickerTrigger.js +7 -3
- package/es/color-picker/src/context.d.ts +9 -0
- package/es/color-picker/src/context.js +2 -0
- package/es/color-picker/src/styles/index.cssr.js +2 -1
- package/es/components.d.ts +2 -1
- package/es/components.js +2 -1
- package/es/composables/use-theme-vars.js +1 -1
- package/es/config-provider/src/ConfigProvider.d.ts +15 -3
- package/es/config-provider/src/ConfigProvider.js +29 -3
- package/es/config-provider/src/context.d.ts +2 -0
- package/es/config-provider/src/context.js +2 -0
- package/es/config-provider/src/interface.d.ts +2 -1
- package/es/config-provider/src/internal-interface.d.ts +4 -0
- package/es/data-table/src/DataTable.d.ts +1 -1
- package/es/data-table/src/DataTable.js +1 -1
- package/es/data-table/src/interface.d.ts +2 -2
- package/es/data-table/src/use-check.d.ts +2 -2
- package/es/data-table/src/use-group-header.d.ts +1 -1
- package/es/data-table/src/use-scroll.d.ts +1 -1
- package/es/data-table/src/use-scroll.js +3 -3
- package/es/data-table/src/use-sorter.d.ts +1 -1
- package/es/data-table/src/use-table-data.d.ts +1 -1
- package/es/data-table/src/utils.d.ts +2 -1
- package/es/data-table/src/utils.js +13 -3
- package/es/date-picker/src/DatePicker.d.ts +13 -1
- package/es/date-picker/src/DatePicker.js +8 -7
- package/es/date-picker/src/panel/date.d.ts +1 -0
- package/es/date-picker/src/panel/daterange.d.ts +1 -0
- package/es/date-picker/src/panel/datetime.d.ts +1 -0
- package/es/date-picker/src/panel/datetimerange.d.ts +1 -0
- package/es/date-picker/src/panel/month.d.ts +1 -0
- package/es/date-picker/src/panel/panelHeader.d.ts +2 -0
- package/es/date-picker/src/panel/panelHeader.js +7 -3
- package/es/date-picker/src/panel/use-calendar.d.ts +1 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +1 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +1 -0
- package/es/date-picker/src/styles/index.cssr.js +13 -2
- package/es/date-picker/styles/light.d.ts +2 -0
- package/es/date-picker/styles/light.js +1 -1
- package/es/descriptions/src/Descriptions.d.ts +2 -2
- package/es/descriptions/src/Descriptions.js +1 -1
- package/es/dialog/index.d.ts +3 -3
- package/es/dialog/index.js +2 -2
- package/es/dialog/src/Dialog.d.ts +28 -61
- package/es/dialog/src/Dialog.js +4 -32
- package/es/dialog/src/DialogEnvironment.d.ts +12 -13
- package/es/dialog/src/DialogEnvironment.js +3 -2
- package/es/dialog/src/DialogProvider.d.ts +4 -6
- package/es/dialog/src/DialogProvider.js +5 -6
- package/es/dialog/src/context.d.ts +3 -0
- package/es/dialog/src/context.js +3 -0
- package/es/dialog/src/dialogProps.d.ts +32 -0
- package/es/dialog/src/dialogProps.js +29 -0
- package/es/dialog/src/use-dialog.js +1 -1
- package/es/divider/src/Divider.js +1 -1
- package/es/drawer/index.d.ts +1 -0
- package/es/drawer/src/Drawer.js +1 -1
- package/es/dropdown/src/Dropdown.d.ts +17 -5
- package/es/dropdown/src/Dropdown.js +6 -5
- package/es/dropdown/src/DropdownGroup.js +1 -0
- package/es/dropdown/src/DropdownGroupHeader.js +1 -2
- package/es/dropdown/src/DropdownMenu.d.ts +0 -1
- package/es/dropdown/src/DropdownMenu.js +4 -4
- package/es/dropdown/src/DropdownOption.d.ts +3 -0
- package/es/dropdown/src/DropdownOption.js +4 -4
- package/es/dropdown/src/context.d.ts +6 -0
- package/es/dropdown/src/context.js +4 -0
- package/es/dropdown/src/interface.d.ts +1 -1
- package/es/dynamic-input/src/DynamicInput.d.ts +16 -33
- package/es/dynamic-input/src/DynamicInput.js +73 -36
- package/es/dynamic-tags/src/DynamicTags.d.ts +11 -20
- package/es/dynamic-tags/src/DynamicTags.js +14 -16
- package/es/element/src/Element.js +1 -1
- package/es/ellipsis/src/Ellipsis.js +1 -1
- package/es/empty/src/Empty.js +2 -2
- package/es/form/src/Form.d.ts +1 -1
- package/es/form/src/Form.js +2 -2
- package/es/form/src/FormItem.d.ts +5 -5
- package/es/form/src/FormItem.js +3 -2
- package/es/form/src/FormItemCol.d.ts +4 -4
- package/es/form/src/FormItemGridItem.d.ts +5 -5
- package/es/form/src/FormItemRow.d.ts +3 -3
- package/es/form/src/context.d.ts +3 -0
- package/es/form/src/context.js +3 -0
- package/es/form/src/interface.d.ts +4 -3
- package/es/form/src/interface.js +1 -3
- package/es/form/src/styles/form-item.cssr.js +6 -5
- package/es/form/src/utils.d.ts +1 -1
- package/es/form/src/utils.js +1 -1
- package/es/global-style/src/GlobalStyle.js +1 -1
- package/es/gradient-text/src/GradientText.d.ts +5 -5
- package/es/gradient-text/src/GradientText.js +1 -1
- package/es/grid/src/Grid.d.ts +0 -1
- package/es/grid/src/Grid.js +2 -3
- package/es/grid/src/GridItem.js +1 -1
- package/es/grid/src/config.d.ts +3 -0
- package/es/grid/src/config.js +3 -0
- package/es/icon/index.d.ts +1 -1
- package/es/icon/index.js +1 -1
- package/es/icon/src/Icon.d.ts +4 -3
- package/es/icon/src/Icon.js +6 -6
- package/es/icon-wrapper/index.d.ts +1 -0
- package/es/icon-wrapper/index.js +1 -0
- package/es/icon-wrapper/src/IconWrapper.d.ts +50 -0
- package/es/icon-wrapper/src/IconWrapper.js +48 -0
- package/es/icon-wrapper/src/styles/index.cssr.d.ts +2 -0
- package/es/icon-wrapper/src/styles/index.cssr.js +16 -0
- package/es/icon-wrapper/styles/dark.d.ts +3 -0
- package/es/icon-wrapper/styles/dark.js +8 -0
- package/es/icon-wrapper/styles/index.d.ts +3 -0
- package/es/icon-wrapper/styles/index.js +2 -0
- package/es/icon-wrapper/styles/light.d.ts +10 -0
- package/es/icon-wrapper/styles/light.js +14 -0
- package/es/image/src/ImagePreview.js +1 -1
- package/es/input/src/Input.d.ts +7 -2
- package/es/input/src/Input.js +21 -17
- package/es/input/src/InputGroup.js +1 -1
- package/es/input/src/InputGroupLabel.js +1 -1
- package/es/input/src/WordCount.js +9 -8
- package/es/input/src/styles/input.cssr.js +6 -5
- package/es/input-number/src/InputNumber.d.ts +3 -2
- package/es/input-number/src/InputNumber.js +23 -21
- package/es/layout/src/Layout.js +1 -1
- package/es/layout/src/LayoutFooter.js +1 -1
- package/es/layout/src/LayoutHeader.js +1 -1
- package/es/layout/src/LayoutSider.js +1 -1
- package/es/legacy-grid/src/Col.js +0 -3
- package/es/legacy-grid/src/Row.js +1 -1
- package/es/list/src/List.js +1 -1
- package/es/loading-bar/src/LoadingBar.js +2 -2
- package/es/loading-bar/src/LoadingBarProvider.d.ts +3 -8
- package/es/loading-bar/src/LoadingBarProvider.js +1 -3
- package/es/loading-bar/src/context.d.ts +7 -0
- package/es/loading-bar/src/context.js +3 -0
- package/es/loading-bar/src/use-loading-bar.js +1 -1
- package/es/locales/common/jaJP.js +12 -14
- package/es/log/index.d.ts +1 -1
- package/es/log/src/Log.d.ts +17 -12
- package/es/log/src/Log.js +10 -17
- package/es/log/src/LogLine.js +1 -1
- package/es/log/src/context.d.ts +2 -0
- package/es/log/src/context.js +2 -0
- package/es/log/src/styles/index.cssr.js +2 -3
- package/es/mention/src/Mention.d.ts +17 -2
- package/es/mention/src/Mention.js +7 -3
- package/es/menu/src/Menu.d.ts +2 -4
- package/es/menu/src/Menu.js +3 -3
- package/es/menu/src/MenuDivider.js +1 -1
- package/es/menu/src/MenuOption.d.ts +1 -2
- package/es/menu/src/MenuOption.js +1 -1
- package/es/menu/src/MenuOptionContent.js +1 -1
- package/es/menu/src/MenuOptionGroup.d.ts +1 -4
- package/es/menu/src/MenuOptionGroup.js +4 -5
- package/es/menu/src/Submenu.d.ts +1 -4
- package/es/menu/src/Submenu.js +3 -4
- package/es/menu/src/context.d.ts +4 -0
- package/es/menu/src/context.js +4 -0
- package/es/menu/src/use-menu-child.js +1 -3
- package/es/menu/src/useCheckDeprecated.d.ts +1 -1
- package/es/menu/src/utils.d.ts +1 -1
- package/es/menu/src/utils.js +5 -3
- package/es/message/src/Message.d.ts +2 -158
- package/es/message/src/Message.js +2 -2
- package/es/message/src/MessageProvider.d.ts +4 -9
- package/es/message/src/MessageProvider.js +2 -3
- package/es/message/src/context.d.ts +7 -0
- package/es/message/src/context.js +3 -0
- package/es/message/src/types.d.ts +1 -1
- package/es/message/src/use-message.js +1 -1
- package/es/modal/src/BodyWrapper.d.ts +6 -4
- package/es/modal/src/BodyWrapper.js +2 -2
- package/es/modal/src/Modal.d.ts +8 -5
- package/es/modal/src/Modal.js +2 -2
- package/es/modal/src/presetProps.d.ts +3 -2
- package/es/modal/src/presetProps.js +1 -1
- package/es/notification/index.d.ts +1 -1
- package/es/notification/src/Notification.d.ts +5 -6
- package/es/notification/src/Notification.js +3 -5
- package/es/notification/src/NotificationContainer.d.ts +1 -2
- package/es/notification/src/NotificationContainer.js +2 -2
- package/es/notification/src/NotificationEnvironment.d.ts +7 -8
- package/es/notification/src/NotificationEnvironment.js +3 -3
- package/es/notification/src/NotificationProvider.d.ts +11 -7
- package/es/notification/src/NotificationProvider.js +6 -6
- package/es/notification/src/context.d.ts +2 -0
- package/es/notification/src/context.js +2 -0
- package/es/page-header/src/PageHeader.js +1 -1
- package/es/pagination/src/Pagination.js +1 -1
- package/es/popconfirm/src/Popconfirm.d.ts +21 -8
- package/es/popconfirm/src/Popconfirm.js +1 -1
- package/es/popover/index.d.ts +1 -0
- package/es/popover/src/Popover.d.ts +21 -4
- package/es/popover/src/Popover.js +9 -2
- package/es/popover/src/PopoverBody.d.ts +4 -0
- package/es/popover/src/PopoverBody.js +13 -11
- package/es/popover/src/styles/index.cssr.js +2 -2
- package/es/popselect/src/Popselect.d.ts +31 -8
- package/es/popselect/src/Popselect.js +8 -6
- package/es/popselect/src/PopselectPanel.d.ts +2 -5
- package/es/popselect/src/PopselectPanel.js +4 -2
- package/es/progress/src/Progress.d.ts +1 -1
- package/es/progress/src/Progress.js +1 -1
- package/es/radio/src/Radio.js +1 -1
- package/es/radio/src/RadioGroup.js +1 -1
- package/es/rate/src/Rate.js +1 -1
- package/es/result/src/Result.d.ts +4 -4
- package/es/result/src/Result.js +1 -1
- package/es/select/index.d.ts +2 -0
- package/es/select/src/Select.d.ts +27 -24
- package/es/select/src/Select.js +71 -41
- package/es/select/src/interface.d.ts +2 -0
- package/es/skeleton/src/Skeleton.js +1 -1
- package/es/slider/src/Slider.js +1 -1
- package/es/space/src/Space.js +1 -1
- package/es/spin/src/Spin.js +1 -1
- package/es/statistic/src/Statistic.js +1 -1
- package/es/steps/src/Steps.js +1 -1
- package/es/switch/src/Switch.js +1 -1
- package/es/table/src/Table.js +1 -1
- package/es/tabs/src/Tabs.d.ts +7 -4
- package/es/tabs/src/Tabs.js +12 -4
- package/es/tag/src/Tag.d.ts +4 -4
- package/es/tag/src/Tag.js +1 -1
- package/es/tag/src/common-props.d.ts +1 -1
- package/es/tag/src/styles/index.cssr.js +5 -17
- package/es/theme-editor/src/ThemeEditor.js +1 -1
- package/es/themes/dark.js +3 -0
- package/es/themes/light.js +3 -0
- package/es/themes/utils.d.ts +2 -1
- package/es/themes/utils.js +16 -4
- package/es/thing/src/Thing.js +1 -1
- package/es/time-picker/src/TimePicker.d.ts +7 -5
- package/es/time-picker/src/TimePicker.js +5 -5
- package/es/timeline/src/Timeline.js +1 -1
- package/es/timeline/src/TimelineItem.d.ts +4 -4
- package/es/tooltip/src/Tooltip.d.ts +20 -7
- package/es/tooltip/src/Tooltip.js +1 -1
- package/es/transfer/src/Transfer.d.ts +1 -1
- package/es/transfer/src/Transfer.js +1 -1
- package/es/tree/src/Tree.d.ts +6 -2
- package/es/tree/src/Tree.js +15 -8
- package/es/tree/src/TreeNode.d.ts +2 -0
- package/es/tree/src/TreeNode.js +37 -10
- package/es/tree/src/TreeNodeContent.d.ts +3 -1
- package/es/tree/src/TreeNodeContent.js +4 -3
- package/es/tree/src/interface.d.ts +5 -1
- package/es/tree-select/src/TreeSelect.d.ts +16 -14
- package/es/tree-select/src/TreeSelect.js +8 -5
- package/es/typography/src/a.js +1 -1
- package/es/typography/src/blockquote.js +1 -1
- package/es/typography/src/create-header.d.ts +4 -4
- package/es/typography/src/create-header.js +1 -1
- package/es/typography/src/headers.d.ts +18 -18
- package/es/typography/src/hr.js +1 -1
- package/es/typography/src/ol.js +1 -1
- package/es/typography/src/p.js +1 -1
- package/es/typography/src/text.js +1 -1
- package/es/typography/src/ul.js +1 -1
- package/es/upload/src/Upload.js +1 -1
- package/es/upload/src/UploadFile.d.ts +1 -1
- package/es/upload/src/UploadProgress.d.ts +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/clear/src/Clear.js +3 -2
- package/lib/_internal/close/src/Close.js +1 -1
- package/lib/_internal/icon/src/Icon.js +1 -1
- package/lib/_internal/icons/ArrowUp.d.ts +2 -0
- package/lib/_internal/icons/ArrowUp.js +11 -0
- package/lib/_internal/icons/index.d.ts +1 -0
- package/lib/_internal/icons/index.js +3 -1
- package/lib/_internal/loading/src/Loading.js +1 -1
- package/lib/_internal/menu-mask/src/MenuMask.js +1 -1
- package/lib/_internal/scrollbar/src/ScrollBar.js +1 -1
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +5 -5
- package/lib/_internal/select-menu/src/SelectMenu.js +31 -15
- package/lib/_internal/selection/src/Selection.d.ts +13 -5
- package/lib/_internal/selection/src/Selection.js +24 -15
- package/lib/_internal/selection/src/interface.d.ts +2 -2
- package/lib/_internal/selection/src/styles/index.cssr.js +15 -30
- package/lib/_internal/slot-machine/src/SlotMachine.js +1 -1
- package/lib/_internal/wave/src/Wave.js +1 -1
- package/lib/_mixins/use-config.js +2 -2
- package/lib/_mixins/use-css-vars-class.d.ts +4 -2
- package/lib/_mixins/use-css-vars-class.js +25 -13
- package/lib/_mixins/use-form-item.d.ts +4 -0
- package/lib/_mixins/use-form-item.js +7 -0
- package/lib/_mixins/use-hljs.js +2 -2
- package/lib/_mixins/use-locale.js +2 -2
- package/lib/_mixins/use-style.js +1 -1
- package/lib/_mixins/use-theme.d.ts +1 -1
- package/lib/_mixins/use-theme.js +3 -3
- package/lib/_utils/cssr/index.d.ts +1 -2
- package/lib/_utils/cssr/index.js +1 -15
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +5 -1
- package/lib/_utils/vue/index.d.ts +1 -1
- package/lib/_utils/vue/index.js +4 -1
- package/lib/_utils/vue/resolve-slot.d.ts +8 -2
- package/lib/_utils/vue/resolve-slot.js +22 -2
- package/lib/affix/src/Affix.js +1 -1
- package/lib/alert/src/Alert.d.ts +4 -4
- package/lib/alert/src/Alert.js +1 -1
- package/lib/anchor/src/AnchorAdapter.js +1 -1
- package/lib/auto-complete/src/AutoComplete.d.ts +17 -2
- package/lib/auto-complete/src/AutoComplete.js +9 -5
- package/lib/avatar/src/Avatar.js +3 -3
- package/lib/avatar/src/AvatarGroup.d.ts +0 -1
- package/lib/avatar/src/AvatarGroup.js +3 -5
- package/lib/avatar/src/context.d.ts +2 -0
- package/lib/avatar/src/context.js +5 -0
- package/lib/back-top/src/BackTop.js +1 -1
- package/lib/badge/src/Badge.d.ts +4 -4
- package/lib/badge/src/Badge.js +1 -1
- package/lib/breadcrumb/src/Breadcrumb.js +1 -1
- package/lib/button/src/Button.d.ts +4 -3
- package/lib/button/src/Button.js +264 -228
- package/lib/button/src/ButtonGroup.js +1 -1
- package/lib/button/src/styles/button.cssr.js +1 -0
- package/lib/calendar/src/Calendar.js +1 -1
- package/lib/card/src/Card.d.ts +5 -1
- package/lib/card/src/Card.js +3 -2
- package/lib/carousel/src/Carousel.js +4 -1
- package/lib/carousel/src/CarouselArrow.js +5 -8
- package/lib/carousel/src/styles/index.cssr.js +59 -48
- package/lib/carousel/styles/light.js +2 -2
- package/lib/cascader/src/Cascader.d.ts +6 -4
- package/lib/cascader/src/Cascader.js +6 -6
- package/lib/checkbox/src/Checkbox.js +1 -1
- package/lib/code/src/Code.js +1 -1
- package/lib/collapse/src/Collapse.js +1 -1
- package/lib/collapse-transition/src/CollapseTransition.js +1 -1
- package/lib/color-picker/src/ColorInputUnit.js +2 -2
- package/lib/color-picker/src/ColorPicker.d.ts +37 -16
- package/lib/color-picker/src/ColorPicker.js +15 -8
- package/lib/color-picker/src/ColorPickerTrigger.d.ts +3 -0
- package/lib/color-picker/src/ColorPickerTrigger.js +8 -4
- package/lib/color-picker/src/context.d.ts +9 -0
- package/lib/color-picker/src/context.js +5 -0
- package/lib/color-picker/src/styles/index.cssr.js +2 -1
- package/lib/components.d.ts +2 -1
- package/lib/components.js +2 -1
- package/lib/composables/use-theme-vars.js +2 -2
- package/lib/config-provider/src/ConfigProvider.d.ts +15 -3
- package/lib/config-provider/src/ConfigProvider.js +31 -5
- package/lib/config-provider/src/context.d.ts +2 -0
- package/lib/config-provider/src/context.js +5 -0
- package/lib/config-provider/src/interface.d.ts +2 -1
- package/lib/config-provider/src/internal-interface.d.ts +4 -0
- package/lib/data-table/src/DataTable.d.ts +1 -1
- package/lib/data-table/src/DataTable.js +1 -1
- package/lib/data-table/src/interface.d.ts +2 -2
- package/lib/data-table/src/use-check.d.ts +2 -2
- package/lib/data-table/src/use-group-header.d.ts +1 -1
- package/lib/data-table/src/use-scroll.d.ts +1 -1
- package/lib/data-table/src/use-scroll.js +2 -2
- package/lib/data-table/src/use-sorter.d.ts +1 -1
- package/lib/data-table/src/use-table-data.d.ts +1 -1
- package/lib/data-table/src/utils.d.ts +2 -1
- package/lib/data-table/src/utils.js +15 -4
- package/lib/date-picker/src/DatePicker.d.ts +13 -1
- package/lib/date-picker/src/DatePicker.js +8 -7
- package/lib/date-picker/src/panel/date.d.ts +1 -0
- package/lib/date-picker/src/panel/daterange.d.ts +1 -0
- package/lib/date-picker/src/panel/datetime.d.ts +1 -0
- package/lib/date-picker/src/panel/datetimerange.d.ts +1 -0
- package/lib/date-picker/src/panel/month.d.ts +1 -0
- package/lib/date-picker/src/panel/panelHeader.d.ts +2 -0
- package/lib/date-picker/src/panel/panelHeader.js +7 -3
- package/lib/date-picker/src/panel/use-calendar.d.ts +1 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +1 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +1 -0
- package/lib/date-picker/src/styles/index.cssr.js +13 -2
- package/lib/date-picker/styles/light.d.ts +2 -0
- package/lib/date-picker/styles/light.js +1 -1
- package/lib/descriptions/src/Descriptions.d.ts +2 -2
- package/lib/descriptions/src/Descriptions.js +1 -1
- package/lib/dialog/index.d.ts +3 -3
- package/lib/dialog/index.js +2 -5
- package/lib/dialog/src/Dialog.d.ts +28 -61
- package/lib/dialog/src/Dialog.js +5 -33
- package/lib/dialog/src/DialogEnvironment.d.ts +12 -13
- package/lib/dialog/src/DialogEnvironment.js +6 -24
- package/lib/dialog/src/DialogProvider.d.ts +4 -6
- package/lib/dialog/src/DialogProvider.js +8 -12
- package/lib/dialog/src/context.d.ts +3 -0
- package/lib/dialog/src/context.js +6 -0
- package/lib/dialog/src/dialogProps.d.ts +32 -0
- package/lib/dialog/src/dialogProps.js +32 -0
- package/lib/dialog/src/use-dialog.js +2 -2
- package/lib/divider/src/Divider.js +1 -1
- package/lib/drawer/index.d.ts +1 -0
- package/lib/drawer/src/Drawer.js +1 -1
- package/lib/dropdown/src/Dropdown.d.ts +17 -5
- package/lib/dropdown/src/Dropdown.js +6 -6
- package/lib/dropdown/src/DropdownGroup.js +1 -0
- package/lib/dropdown/src/DropdownGroupHeader.js +3 -4
- package/lib/dropdown/src/DropdownMenu.d.ts +0 -1
- package/lib/dropdown/src/DropdownMenu.js +6 -7
- package/lib/dropdown/src/DropdownOption.d.ts +3 -0
- package/lib/dropdown/src/DropdownOption.js +9 -25
- package/lib/dropdown/src/context.d.ts +6 -0
- package/lib/dropdown/src/context.js +7 -0
- package/lib/dropdown/src/interface.d.ts +1 -1
- package/lib/dynamic-input/src/DynamicInput.d.ts +16 -33
- package/lib/dynamic-input/src/DynamicInput.js +70 -33
- package/lib/dynamic-tags/src/DynamicTags.d.ts +11 -20
- package/lib/dynamic-tags/src/DynamicTags.js +12 -14
- package/lib/element/src/Element.js +1 -1
- package/lib/ellipsis/src/Ellipsis.js +1 -1
- package/lib/empty/src/Empty.js +3 -3
- package/lib/form/src/Form.d.ts +1 -1
- package/lib/form/src/Form.js +4 -4
- package/lib/form/src/FormItem.d.ts +5 -5
- package/lib/form/src/FormItem.js +5 -4
- package/lib/form/src/FormItemCol.d.ts +4 -4
- package/lib/form/src/FormItemGridItem.d.ts +5 -5
- package/lib/form/src/FormItemRow.d.ts +3 -3
- package/lib/form/src/context.d.ts +3 -0
- package/lib/form/src/context.js +6 -0
- package/lib/form/src/interface.d.ts +4 -3
- package/lib/form/src/interface.js +0 -4
- package/lib/form/src/styles/form-item.cssr.js +3 -2
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/form/src/utils.js +4 -4
- package/lib/global-style/src/GlobalStyle.js +2 -2
- package/lib/gradient-text/src/GradientText.d.ts +5 -5
- package/lib/gradient-text/src/GradientText.js +1 -1
- package/lib/grid/src/Grid.d.ts +0 -1
- package/lib/grid/src/Grid.js +4 -6
- package/lib/grid/src/GridItem.js +2 -2
- package/lib/grid/src/config.d.ts +3 -0
- package/lib/grid/src/config.js +6 -0
- package/lib/icon/index.d.ts +1 -1
- package/lib/icon/index.js +1 -4
- package/lib/icon/src/Icon.d.ts +4 -3
- package/lib/icon/src/Icon.js +6 -5
- package/lib/icon-wrapper/index.d.ts +1 -0
- package/lib/icon-wrapper/index.js +5 -0
- package/lib/icon-wrapper/src/IconWrapper.d.ts +50 -0
- package/lib/icon-wrapper/src/IconWrapper.js +54 -0
- package/lib/icon-wrapper/src/styles/index.cssr.d.ts +2 -0
- package/lib/icon-wrapper/src/styles/index.cssr.js +23 -0
- package/lib/icon-wrapper/styles/dark.d.ts +3 -0
- package/lib/icon-wrapper/styles/dark.js +10 -0
- package/lib/icon-wrapper/styles/index.d.ts +3 -0
- package/lib/icon-wrapper/styles/index.js +10 -0
- package/lib/icon-wrapper/styles/light.d.ts +10 -0
- package/lib/icon-wrapper/styles/light.js +18 -0
- package/lib/image/src/ImagePreview.js +1 -1
- package/lib/input/src/Input.d.ts +7 -2
- package/lib/input/src/Input.js +20 -16
- package/lib/input/src/InputGroup.js +1 -1
- package/lib/input/src/InputGroupLabel.js +1 -1
- package/lib/input/src/WordCount.js +9 -8
- package/lib/input/src/styles/input.cssr.js +5 -4
- package/lib/input-number/src/InputNumber.d.ts +3 -2
- package/lib/input-number/src/InputNumber.js +23 -21
- package/lib/layout/src/Layout.js +1 -1
- package/lib/layout/src/LayoutFooter.js +1 -1
- package/lib/layout/src/LayoutHeader.js +1 -1
- package/lib/layout/src/LayoutSider.js +1 -1
- package/lib/legacy-grid/src/Col.js +0 -6
- package/lib/legacy-grid/src/Row.js +1 -1
- package/lib/list/src/List.js +1 -1
- package/lib/loading-bar/src/LoadingBar.js +3 -3
- package/lib/loading-bar/src/LoadingBarProvider.d.ts +3 -8
- package/lib/loading-bar/src/LoadingBarProvider.js +3 -6
- package/lib/loading-bar/src/context.d.ts +7 -0
- package/lib/loading-bar/src/context.js +6 -0
- package/lib/loading-bar/src/use-loading-bar.js +2 -2
- package/lib/locales/common/jaJP.js +12 -14
- package/lib/log/index.d.ts +1 -1
- package/lib/log/src/Log.d.ts +17 -12
- package/lib/log/src/Log.js +10 -18
- package/lib/log/src/LogLine.js +2 -2
- package/lib/log/src/context.d.ts +2 -0
- package/lib/log/src/context.js +5 -0
- package/lib/log/src/styles/index.cssr.js +2 -3
- package/lib/mention/src/Mention.d.ts +17 -2
- package/lib/mention/src/Mention.js +7 -3
- package/lib/menu/src/Menu.d.ts +2 -4
- package/lib/menu/src/Menu.js +3 -4
- package/lib/menu/src/MenuDivider.js +2 -2
- package/lib/menu/src/MenuOption.d.ts +1 -2
- package/lib/menu/src/MenuOption.js +2 -2
- package/lib/menu/src/MenuOptionContent.js +2 -2
- package/lib/menu/src/MenuOptionGroup.d.ts +1 -4
- package/lib/menu/src/MenuOptionGroup.js +7 -8
- package/lib/menu/src/Submenu.d.ts +1 -4
- package/lib/menu/src/Submenu.js +6 -7
- package/lib/menu/src/context.d.ts +4 -0
- package/lib/menu/src/context.js +7 -0
- package/lib/menu/src/use-menu-child.js +4 -6
- package/lib/menu/src/useCheckDeprecated.d.ts +1 -1
- package/lib/menu/src/utils.d.ts +1 -1
- package/lib/menu/src/utils.js +8 -25
- package/lib/message/src/Message.d.ts +2 -158
- package/lib/message/src/Message.js +3 -3
- package/lib/message/src/MessageProvider.d.ts +4 -9
- package/lib/message/src/MessageProvider.js +3 -5
- package/lib/message/src/context.d.ts +7 -0
- package/lib/message/src/context.js +6 -0
- package/lib/message/src/types.d.ts +1 -1
- package/lib/message/src/use-message.js +2 -2
- package/lib/modal/src/BodyWrapper.d.ts +6 -4
- package/lib/modal/src/BodyWrapper.js +3 -3
- package/lib/modal/src/Modal.d.ts +8 -5
- package/lib/modal/src/Modal.js +3 -3
- package/lib/modal/src/presetProps.d.ts +3 -2
- package/lib/modal/src/presetProps.js +2 -2
- package/lib/notification/index.d.ts +1 -1
- package/lib/notification/src/Notification.d.ts +5 -6
- package/lib/notification/src/Notification.js +5 -7
- package/lib/notification/src/NotificationContainer.d.ts +1 -2
- package/lib/notification/src/NotificationContainer.js +4 -3
- package/lib/notification/src/NotificationEnvironment.d.ts +7 -8
- package/lib/notification/src/NotificationEnvironment.js +4 -23
- package/lib/notification/src/NotificationProvider.d.ts +11 -7
- package/lib/notification/src/NotificationProvider.js +9 -9
- package/lib/notification/src/context.d.ts +2 -0
- package/lib/notification/src/context.js +5 -0
- package/lib/page-header/src/PageHeader.js +1 -1
- package/lib/pagination/src/Pagination.js +1 -1
- package/lib/popconfirm/src/Popconfirm.d.ts +21 -8
- package/lib/popconfirm/src/Popconfirm.js +1 -1
- package/lib/popover/index.d.ts +1 -0
- package/lib/popover/src/Popover.d.ts +21 -4
- package/lib/popover/src/Popover.js +9 -2
- package/lib/popover/src/PopoverBody.d.ts +4 -0
- package/lib/popover/src/PopoverBody.js +11 -9
- package/lib/popover/src/styles/index.cssr.js +2 -2
- package/lib/popselect/src/Popselect.d.ts +31 -8
- package/lib/popselect/src/Popselect.js +8 -6
- package/lib/popselect/src/PopselectPanel.d.ts +2 -5
- package/lib/popselect/src/PopselectPanel.js +4 -2
- package/lib/progress/src/Progress.d.ts +1 -1
- package/lib/progress/src/Progress.js +1 -1
- package/lib/radio/src/Radio.js +1 -1
- package/lib/radio/src/RadioGroup.js +1 -1
- package/lib/rate/src/Rate.js +1 -1
- package/lib/result/src/Result.d.ts +4 -4
- package/lib/result/src/Result.js +1 -1
- package/lib/select/index.d.ts +2 -0
- package/lib/select/src/Select.d.ts +27 -24
- package/lib/select/src/Select.js +71 -41
- package/lib/select/src/interface.d.ts +2 -0
- package/lib/skeleton/src/Skeleton.js +1 -1
- package/lib/slider/src/Slider.js +1 -1
- package/lib/space/src/Space.js +1 -1
- package/lib/spin/src/Spin.js +1 -1
- package/lib/statistic/src/Statistic.js +1 -1
- package/lib/steps/src/Steps.js +1 -1
- package/lib/switch/src/Switch.js +1 -1
- package/lib/table/src/Table.js +1 -1
- package/lib/tabs/src/Tabs.d.ts +7 -4
- package/lib/tabs/src/Tabs.js +12 -4
- package/lib/tag/src/Tag.d.ts +4 -4
- package/lib/tag/src/Tag.js +1 -1
- package/lib/tag/src/common-props.d.ts +1 -1
- package/lib/tag/src/styles/index.cssr.js +5 -17
- package/lib/theme-editor/src/ThemeEditor.js +1 -1
- package/lib/themes/dark.js +87 -84
- package/lib/themes/light.js +87 -84
- package/lib/themes/utils.d.ts +2 -1
- package/lib/themes/utils.js +16 -4
- package/lib/thing/src/Thing.js +1 -1
- package/lib/time-picker/src/TimePicker.d.ts +7 -5
- package/lib/time-picker/src/TimePicker.js +5 -5
- package/lib/timeline/src/Timeline.js +1 -1
- package/lib/timeline/src/TimelineItem.d.ts +4 -4
- package/lib/tooltip/src/Tooltip.d.ts +20 -7
- package/lib/tooltip/src/Tooltip.js +1 -1
- package/lib/transfer/src/Transfer.d.ts +1 -1
- package/lib/transfer/src/Transfer.js +1 -1
- package/lib/tree/src/Tree.d.ts +6 -2
- package/lib/tree/src/Tree.js +15 -8
- package/lib/tree/src/TreeNode.d.ts +2 -0
- package/lib/tree/src/TreeNode.js +37 -10
- package/lib/tree/src/TreeNodeContent.d.ts +3 -1
- package/lib/tree/src/TreeNodeContent.js +4 -3
- package/lib/tree/src/interface.d.ts +5 -1
- package/lib/tree-select/src/TreeSelect.d.ts +16 -14
- package/lib/tree-select/src/TreeSelect.js +8 -5
- package/lib/typography/src/a.js +1 -1
- package/lib/typography/src/blockquote.js +1 -1
- package/lib/typography/src/create-header.d.ts +4 -4
- package/lib/typography/src/create-header.js +1 -1
- package/lib/typography/src/headers.d.ts +18 -18
- package/lib/typography/src/hr.js +1 -1
- package/lib/typography/src/ol.js +1 -1
- package/lib/typography/src/p.js +1 -1
- package/lib/typography/src/text.js +1 -1
- package/lib/typography/src/ul.js +1 -1
- package/lib/upload/src/Upload.js +1 -1
- package/lib/upload/src/UploadFile.d.ts +1 -1
- package/lib/upload/src/UploadProgress.d.ts +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +11 -12
- package/volar.d.ts +1 -0
- package/web-types.json +443 -220
package/lib/grid/src/Grid.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.gridInjectionKey = void 0;
|
|
4
3
|
const vue_1 = require("vue");
|
|
5
4
|
const vooks_1 = require("vooks");
|
|
6
5
|
const vueuc_1 = require("vueuc");
|
|
@@ -8,7 +7,7 @@ const seemly_1 = require("seemly");
|
|
|
8
7
|
const config_1 = require("../../config-provider/src/config");
|
|
9
8
|
const _mixins_1 = require("../../_mixins");
|
|
10
9
|
const _utils_1 = require("../../_utils");
|
|
11
|
-
const
|
|
10
|
+
const config_2 = require("./config");
|
|
12
11
|
const defaultCols = 24;
|
|
13
12
|
const gridProps = {
|
|
14
13
|
responsive: {
|
|
@@ -36,7 +35,6 @@ const gridProps = {
|
|
|
36
35
|
default: 0
|
|
37
36
|
}
|
|
38
37
|
};
|
|
39
|
-
exports.gridInjectionKey = (0, _utils_1.createInjectionKey)('n-grid');
|
|
40
38
|
exports.default = (0, vue_1.defineComponent)({
|
|
41
39
|
name: 'Grid',
|
|
42
40
|
inheritAttrs: false,
|
|
@@ -81,7 +79,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
81
79
|
}
|
|
82
80
|
return undefined;
|
|
83
81
|
});
|
|
84
|
-
(0, vue_1.provide)(
|
|
82
|
+
(0, vue_1.provide)(config_2.gridInjectionKey, {
|
|
85
83
|
itemStyleRef: (0, vue_1.toRef)(props, 'itemStyle'),
|
|
86
84
|
xGapRef: responsiveXGapRef,
|
|
87
85
|
overflowRef
|
|
@@ -118,7 +116,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
118
116
|
if (((_a = child === null || child === void 0 ? void 0 : child.type) === null || _a === void 0 ? void 0 : _a.__GRID_ITEM__) !== true)
|
|
119
117
|
return;
|
|
120
118
|
const clonedChild = (0, vue_1.cloneVNode)(child);
|
|
121
|
-
const rawChildSpan = Number((_c = (0, seemly_1.parseResponsivePropValue)((_b = clonedChild.props) === null || _b === void 0 ? void 0 : _b.span, responsiveQuery)) !== null && _c !== void 0 ? _c :
|
|
119
|
+
const rawChildSpan = Number((_c = (0, seemly_1.parseResponsivePropValue)((_b = clonedChild.props) === null || _b === void 0 ? void 0 : _b.span, responsiveQuery)) !== null && _c !== void 0 ? _c : config_2.defaultSpan);
|
|
122
120
|
if (rawChildSpan === 0)
|
|
123
121
|
return;
|
|
124
122
|
childrenAndRawSpan.push({
|
|
@@ -131,7 +129,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
131
129
|
if (maybeSuffixNode === null || maybeSuffixNode === void 0 ? void 0 : maybeSuffixNode.props) {
|
|
132
130
|
const suffixPropValue = (_b = maybeSuffixNode.props) === null || _b === void 0 ? void 0 : _b.suffix;
|
|
133
131
|
if (suffixPropValue !== undefined && suffixPropValue !== false) {
|
|
134
|
-
suffixSpan = (_d = (_c = maybeSuffixNode.props) === null || _c === void 0 ? void 0 : _c.span) !== null && _d !== void 0 ? _d :
|
|
132
|
+
suffixSpan = (_d = (_c = maybeSuffixNode.props) === null || _c === void 0 ? void 0 : _c.span) !== null && _d !== void 0 ? _d : config_2.defaultSpan;
|
|
135
133
|
maybeSuffixNode.props.privateSpan = suffixSpan;
|
|
136
134
|
maybeSuffixNode.props.privateColStart =
|
|
137
135
|
responsiveCols + 1 - suffixSpan;
|
package/lib/grid/src/GridItem.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.gridItemPropKeys = exports.gridItemProps = exports.defaultSpan = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const seemly_1 = require("seemly");
|
|
6
|
-
const Grid_1 = require("./Grid");
|
|
7
6
|
const _utils_1 = require("../../_utils");
|
|
7
|
+
const config_1 = require("./config");
|
|
8
8
|
exports.defaultSpan = 1;
|
|
9
9
|
exports.gridItemProps = {
|
|
10
10
|
span: {
|
|
@@ -34,7 +34,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
34
34
|
setup() {
|
|
35
35
|
const { xGapRef, itemStyleRef, overflowRef
|
|
36
36
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
37
|
-
} = (0, vue_1.inject)(
|
|
37
|
+
} = (0, vue_1.inject)(config_1.gridInjectionKey);
|
|
38
38
|
const self = (0, vue_1.getCurrentInstance)();
|
|
39
39
|
return {
|
|
40
40
|
overflow: overflowRef,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gridInjectionKey = exports.defaultSpan = void 0;
|
|
4
|
+
const _utils_1 = require("../../_utils");
|
|
5
|
+
exports.defaultSpan = 1;
|
|
6
|
+
exports.gridInjectionKey = (0, _utils_1.createInjectionKey)('n-grid');
|
package/lib/icon/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { NIcon } from './src/Icon';
|
package/lib/icon/index.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.NIcon = void 0;
|
|
7
4
|
/* istanbul ignore file */
|
|
8
5
|
var Icon_1 = require("./src/Icon");
|
|
9
|
-
Object.defineProperty(exports, "NIcon", { enumerable: true, get: function () { return
|
|
6
|
+
Object.defineProperty(exports, "NIcon", { enumerable: true, get: function () { return Icon_1.NIcon; } });
|
package/lib/icon/src/Icon.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
1
|
+
import { Component, PropType } from 'vue';
|
|
2
2
|
export declare type Depth = 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5' | undefined;
|
|
3
|
-
declare const
|
|
3
|
+
export declare const NIcon: import("vue").DefineComponent<{
|
|
4
4
|
depth: PropType<Depth>;
|
|
5
5
|
size: (StringConstructor | NumberConstructor)[];
|
|
6
6
|
color: StringConstructor;
|
|
7
|
+
component: PropType<Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
|
|
7
8
|
theme: PropType<import("../../_mixins").Theme<"Icon", {
|
|
8
9
|
color: string;
|
|
9
10
|
opacity1Depth: string;
|
|
@@ -47,6 +48,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
47
48
|
depth: PropType<Depth>;
|
|
48
49
|
size: (StringConstructor | NumberConstructor)[];
|
|
49
50
|
color: StringConstructor;
|
|
51
|
+
component: PropType<Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
|
|
50
52
|
theme: PropType<import("../../_mixins").Theme<"Icon", {
|
|
51
53
|
color: string;
|
|
52
54
|
opacity1Depth: string;
|
|
@@ -72,4 +74,3 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
72
74
|
opacity5Depth: string;
|
|
73
75
|
}, any>>>;
|
|
74
76
|
}>>, {}>;
|
|
75
|
-
export default _default;
|
package/lib/icon/src/Icon.js
CHANGED
|
@@ -3,19 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NIcon = void 0;
|
|
6
7
|
const vue_1 = require("vue");
|
|
7
8
|
const _mixins_1 = require("../../_mixins");
|
|
8
9
|
const _utils_1 = require("../../_utils");
|
|
9
10
|
const styles_1 = require("../styles");
|
|
10
11
|
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
11
|
-
exports.
|
|
12
|
+
exports.NIcon = (0, vue_1.defineComponent)({
|
|
12
13
|
_n_icon__: true,
|
|
13
14
|
name: 'Icon',
|
|
14
15
|
inheritAttrs: false,
|
|
15
|
-
props: Object.assign(Object.assign({}, _mixins_1.useTheme.props), { depth: [String, Number], size: [Number, String], color: String }),
|
|
16
|
+
props: Object.assign(Object.assign({}, _mixins_1.useTheme.props), { depth: [String, Number], size: [Number, String], color: String, component: Object }),
|
|
16
17
|
setup(props) {
|
|
17
18
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
18
|
-
const themeRef = (0, _mixins_1.useTheme)('Icon', '
|
|
19
|
+
const themeRef = (0, _mixins_1.useTheme)('Icon', '-icon', index_cssr_1.default, styles_1.iconLight, props, mergedClsPrefixRef);
|
|
19
20
|
return {
|
|
20
21
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
21
22
|
mergedStyle: (0, vue_1.computed)(() => {
|
|
@@ -44,7 +45,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
44
45
|
},
|
|
45
46
|
render() {
|
|
46
47
|
var _a;
|
|
47
|
-
const { $parent, depth, mergedClsPrefix } = this;
|
|
48
|
+
const { $parent, depth, mergedClsPrefix, component } = this;
|
|
48
49
|
if ((_a = $parent === null || $parent === void 0 ? void 0 : $parent.$options) === null || _a === void 0 ? void 0 : _a._n_icon__) {
|
|
49
50
|
(0, _utils_1.warn)('icon', "don't wrap `n-icon` inside `n-icon`");
|
|
50
51
|
}
|
|
@@ -58,6 +59,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
58
59
|
}
|
|
59
60
|
],
|
|
60
61
|
style: Object.assign(this.cssVars, this.mergedStyle)
|
|
61
|
-
}), this.$slots);
|
|
62
|
+
}), component ? (0, vue_1.h)(component) : this.$slots);
|
|
62
63
|
}
|
|
63
64
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NIconWrapper } from './src/IconWrapper';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NIconWrapper = void 0;
|
|
4
|
+
var IconWrapper_1 = require("./src/IconWrapper");
|
|
5
|
+
Object.defineProperty(exports, "NIconWrapper", { enumerable: true, get: function () { return IconWrapper_1.NIconWrapper; } });
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const NIconWrapper: import("vue").DefineComponent<{
|
|
2
|
+
readonly size: {
|
|
3
|
+
readonly type: NumberConstructor;
|
|
4
|
+
readonly default: 24;
|
|
5
|
+
};
|
|
6
|
+
readonly borderRadius: {
|
|
7
|
+
readonly type: NumberConstructor;
|
|
8
|
+
readonly default: 6;
|
|
9
|
+
};
|
|
10
|
+
readonly color: StringConstructor;
|
|
11
|
+
readonly iconColor: StringConstructor;
|
|
12
|
+
readonly theme: import("vue").PropType<import("../../_mixins").Theme<"IconWrapper", {
|
|
13
|
+
color: string;
|
|
14
|
+
iconColor: string;
|
|
15
|
+
}, any>>;
|
|
16
|
+
readonly themeOverrides: import("vue").PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
17
|
+
color: string;
|
|
18
|
+
iconColor: string;
|
|
19
|
+
}, any>>>;
|
|
20
|
+
readonly builtinThemeOverrides: import("vue").PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
21
|
+
color: string;
|
|
22
|
+
iconColor: string;
|
|
23
|
+
}, any>>>;
|
|
24
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
readonly size: {
|
|
26
|
+
readonly type: NumberConstructor;
|
|
27
|
+
readonly default: 24;
|
|
28
|
+
};
|
|
29
|
+
readonly borderRadius: {
|
|
30
|
+
readonly type: NumberConstructor;
|
|
31
|
+
readonly default: 6;
|
|
32
|
+
};
|
|
33
|
+
readonly color: StringConstructor;
|
|
34
|
+
readonly iconColor: StringConstructor;
|
|
35
|
+
readonly theme: import("vue").PropType<import("../../_mixins").Theme<"IconWrapper", {
|
|
36
|
+
color: string;
|
|
37
|
+
iconColor: string;
|
|
38
|
+
}, any>>;
|
|
39
|
+
readonly themeOverrides: import("vue").PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
40
|
+
color: string;
|
|
41
|
+
iconColor: string;
|
|
42
|
+
}, any>>>;
|
|
43
|
+
readonly builtinThemeOverrides: import("vue").PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
44
|
+
color: string;
|
|
45
|
+
iconColor: string;
|
|
46
|
+
}, any>>>;
|
|
47
|
+
}>>, {
|
|
48
|
+
size: number;
|
|
49
|
+
borderRadius: number;
|
|
50
|
+
}>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NIconWrapper = void 0;
|
|
7
|
+
const vue_1 = require("vue");
|
|
8
|
+
const _mixins_1 = require("../../_mixins");
|
|
9
|
+
const _utils_1 = require("../../_utils");
|
|
10
|
+
const styles_1 = require("../styles");
|
|
11
|
+
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
12
|
+
const iconWrapperProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { size: {
|
|
13
|
+
type: Number,
|
|
14
|
+
default: 24
|
|
15
|
+
}, borderRadius: {
|
|
16
|
+
type: Number,
|
|
17
|
+
default: 6
|
|
18
|
+
}, color: String, iconColor: String });
|
|
19
|
+
exports.NIconWrapper = (0, vue_1.defineComponent)({
|
|
20
|
+
name: 'IconWrapper',
|
|
21
|
+
props: iconWrapperProps,
|
|
22
|
+
setup(props, { slots }) {
|
|
23
|
+
const themeRef = (0, _mixins_1.useTheme)('IconWrapper', '-icon-wrapper', index_cssr_1.default, styles_1.iconWrapperLight, props);
|
|
24
|
+
const { mergedClsPrefixRef, NConfigProvider } = (0, _mixins_1.useConfig)(props);
|
|
25
|
+
const { disableInlineTheme } = NConfigProvider || {};
|
|
26
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
27
|
+
const { common: { cubicBezierEaseInOut }, self: { color, iconColor } } = themeRef.value;
|
|
28
|
+
return {
|
|
29
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
30
|
+
'--n-color': color,
|
|
31
|
+
'--n-icon-color': iconColor
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
const cssVarsClassRef = disableInlineTheme
|
|
35
|
+
? (0, _mixins_1.useCssVarsClass)('icon-wrapper', undefined, cssVarsRef, props)
|
|
36
|
+
: undefined;
|
|
37
|
+
return () => {
|
|
38
|
+
const size = (0, _utils_1.formatLength)(props.size);
|
|
39
|
+
return ((0, vue_1.h)("div", { class: [
|
|
40
|
+
`${mergedClsPrefixRef.value}-icon-wrapper`,
|
|
41
|
+
cssVarsClassRef === null || cssVarsClassRef === void 0 ? void 0 : cssVarsClassRef.value
|
|
42
|
+
], style: [
|
|
43
|
+
cssVarsRef === null || cssVarsRef === void 0 ? void 0 : cssVarsRef.value,
|
|
44
|
+
{
|
|
45
|
+
height: size,
|
|
46
|
+
width: size,
|
|
47
|
+
borderRadius: (0, _utils_1.formatLength)(props.borderRadius),
|
|
48
|
+
backgroundColor: props.color,
|
|
49
|
+
color: props.iconColor
|
|
50
|
+
}
|
|
51
|
+
] }, slots));
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const cssr_1 = require("../../../_utils/cssr"); // vars:
|
|
8
|
+
// --n-bezier
|
|
9
|
+
// --n-border-radius
|
|
10
|
+
// --n-color
|
|
11
|
+
// --n-icon-color
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.default = (0, cssr_1.cB)('icon-wrapper', `
|
|
15
|
+
transition:
|
|
16
|
+
color .3s var(--n-bezier),
|
|
17
|
+
background-color .3s var(--n-bezier);
|
|
18
|
+
background-color: var(--n-color);
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
color: var(--n-icon-color);
|
|
23
|
+
`);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const common_1 = require("../../_styles/common");
|
|
4
|
+
const light_1 = require("./light");
|
|
5
|
+
const iconDark = {
|
|
6
|
+
name: 'IconWrapper',
|
|
7
|
+
common: common_1.commonDark,
|
|
8
|
+
self: light_1.self
|
|
9
|
+
};
|
|
10
|
+
exports.default = iconDark;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.iconWrapperLight = exports.iconWrapperDark = void 0;
|
|
7
|
+
var dark_1 = require("./dark");
|
|
8
|
+
Object.defineProperty(exports, "iconWrapperDark", { enumerable: true, get: function () { return __importDefault(dark_1).default; } });
|
|
9
|
+
var light_1 = require("./light");
|
|
10
|
+
Object.defineProperty(exports, "iconWrapperLight", { enumerable: true, get: function () { return __importDefault(light_1).default; } });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ThemeCommonVars } from '../../_styles/common';
|
|
2
|
+
import type { Theme } from '../../_mixins';
|
|
3
|
+
export declare const self: (vars: ThemeCommonVars) => {
|
|
4
|
+
color: string;
|
|
5
|
+
iconColor: string;
|
|
6
|
+
};
|
|
7
|
+
export declare type IconWrapperThemeVars = ReturnType<typeof self>;
|
|
8
|
+
declare const iconWrapperLight: Theme<'IconWrapper', IconWrapperThemeVars>;
|
|
9
|
+
export default iconWrapperLight;
|
|
10
|
+
export declare type IconWrapperTheme = typeof iconWrapperLight;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.self = void 0;
|
|
4
|
+
const common_1 = require("../../_styles/common");
|
|
5
|
+
const self = (vars) => {
|
|
6
|
+
const { primaryColor, baseColor } = vars;
|
|
7
|
+
return {
|
|
8
|
+
color: primaryColor,
|
|
9
|
+
iconColor: baseColor
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
exports.self = self;
|
|
13
|
+
const iconWrapperLight = {
|
|
14
|
+
name: 'IconWrapper',
|
|
15
|
+
common: common_1.commonLight,
|
|
16
|
+
self: exports.self
|
|
17
|
+
};
|
|
18
|
+
exports.default = iconWrapperLight;
|
|
@@ -24,7 +24,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
24
24
|
required: true
|
|
25
25
|
} }),
|
|
26
26
|
setup(props) {
|
|
27
|
-
const themeRef = (0, _mixins_1.useTheme)('Image', '
|
|
27
|
+
const themeRef = (0, _mixins_1.useTheme)('Image', '-image', index_cssr_1.default, styles_1.imageLight, props, (0, vue_1.toRef)(props, 'clsPrefix'));
|
|
28
28
|
let thumbnailEl = null;
|
|
29
29
|
const previewRef = (0, vue_1.ref)(null);
|
|
30
30
|
const previewWrapperRef = (0, vue_1.ref)(null);
|
package/lib/input/src/Input.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropType, InputHTMLAttributes, TextareaHTMLAttributes } from 'vue';
|
|
2
|
+
import type { FormValidationStatus } from '../../form/src/interface';
|
|
2
3
|
import { ExtractPublicPropTypes } from '../../_utils';
|
|
3
4
|
import type { MaybeArray } from '../../_utils';
|
|
4
5
|
import type { OnUpdateValue, Size } from './interface';
|
|
@@ -69,6 +70,7 @@ declare const inputProps: {
|
|
|
69
70
|
onClick: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
70
71
|
onChange: PropType<OnUpdateValue>;
|
|
71
72
|
onClear: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
73
|
+
status: PropType<FormValidationStatus>;
|
|
72
74
|
'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
|
|
73
75
|
onUpdateValue: PropType<MaybeArray<OnUpdateValue>>;
|
|
74
76
|
/** private */
|
|
@@ -337,6 +339,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
337
339
|
onClick: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
338
340
|
onChange: PropType<OnUpdateValue>;
|
|
339
341
|
onClear: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
342
|
+
status: PropType<FormValidationStatus>;
|
|
340
343
|
'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
|
|
341
344
|
onUpdateValue: PropType<MaybeArray<OnUpdateValue>>;
|
|
342
345
|
/** private */
|
|
@@ -574,6 +577,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
574
577
|
placeholderStyle: import("vue").Ref<{
|
|
575
578
|
top: string;
|
|
576
579
|
}>;
|
|
580
|
+
mergedStatus: import("vue").ComputedRef<FormValidationStatus | undefined>;
|
|
577
581
|
handleTextAreaScroll: (e: Event) => void;
|
|
578
582
|
handleCompositionStart: () => void;
|
|
579
583
|
handleCompositionEnd: (e: CompositionEvent) => void;
|
|
@@ -629,7 +633,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
629
633
|
iconColorDisabled: string;
|
|
630
634
|
opacity1: string;
|
|
631
635
|
opacity2: string;
|
|
632
|
-
opacity3: string;
|
|
636
|
+
opacity3: string; /** private */
|
|
633
637
|
opacity4: string;
|
|
634
638
|
opacity5: string;
|
|
635
639
|
dividerColor: string;
|
|
@@ -884,6 +888,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
884
888
|
onClick: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
885
889
|
onChange: PropType<OnUpdateValue>;
|
|
886
890
|
onClear: PropType<MaybeArray<(e: MouseEvent) => void>>;
|
|
891
|
+
status: PropType<FormValidationStatus>;
|
|
887
892
|
'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
|
|
888
893
|
onUpdateValue: PropType<MaybeArray<OnUpdateValue>>;
|
|
889
894
|
/** private */
|
|
@@ -1093,8 +1098,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1093
1098
|
minRows?: number | undefined;
|
|
1094
1099
|
maxRows?: number | undefined;
|
|
1095
1100
|
};
|
|
1096
|
-
loading: boolean;
|
|
1097
1101
|
bordered: boolean | undefined;
|
|
1102
|
+
loading: boolean;
|
|
1098
1103
|
clearable: boolean;
|
|
1099
1104
|
defaultValue: string | [string, string] | null;
|
|
1100
1105
|
resizable: boolean;
|
package/lib/input/src/Input.js
CHANGED
|
@@ -47,7 +47,7 @@ const inputProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), {
|
|
|
47
47
|
}, showCount: Boolean, loading: {
|
|
48
48
|
type: Boolean,
|
|
49
49
|
default: undefined
|
|
50
|
-
}, onMousedown: Function, onKeydown: Function, onKeyup: Function, onInput: [Function, Array], onFocus: [Function, Array], onBlur: [Function, Array], onClick: [Function, Array], onChange: [Function, Array], onClear: [Function, Array], 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array],
|
|
50
|
+
}, 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],
|
|
51
51
|
/** private */
|
|
52
52
|
textDecoration: [String, Array], attrSize: {
|
|
53
53
|
type: Number,
|
|
@@ -67,7 +67,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
const { mergedClsPrefixRef, mergedBorderedRef } = (0, _mixins_1.useConfig)(props);
|
|
70
|
-
const themeRef = (0, _mixins_1.useTheme)('Input', '
|
|
70
|
+
const themeRef = (0, _mixins_1.useTheme)('Input', '-input', input_cssr_1.default, styles_1.inputLight, props, mergedClsPrefixRef);
|
|
71
71
|
// dom refs
|
|
72
72
|
const wrapperElRef = (0, vue_1.ref)(null);
|
|
73
73
|
const textareaElRef = (0, vue_1.ref)(null);
|
|
@@ -84,7 +84,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
84
84
|
const mergedValueRef = (0, vooks_1.useMergedState)(controlledValueRef, uncontrolledValueRef);
|
|
85
85
|
// form-item
|
|
86
86
|
const formItem = (0, _mixins_1.useFormItem)(props);
|
|
87
|
-
const { mergedSizeRef, mergedDisabledRef } = formItem;
|
|
87
|
+
const { mergedSizeRef, mergedDisabledRef, mergedStatusRef } = formItem;
|
|
88
88
|
// states
|
|
89
89
|
const focusedRef = (0, vue_1.ref)(false);
|
|
90
90
|
const hoverRef = (0, vue_1.ref)(false);
|
|
@@ -335,7 +335,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
335
335
|
}
|
|
336
336
|
// force update to sync input's view with value
|
|
337
337
|
// if not set, after input, input value won't sync with dom input value
|
|
338
|
-
;
|
|
339
338
|
vm.$forceUpdate();
|
|
340
339
|
}
|
|
341
340
|
function handleInputBlur(e) {
|
|
@@ -644,7 +643,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
644
643
|
textareaMirrorElRef,
|
|
645
644
|
textareaScrollbarInstRef,
|
|
646
645
|
// value
|
|
647
|
-
uncontrolledValue: uncontrolledValueRef, mergedValue: mergedValueRef, passwordVisible: passwordVisibleRef, mergedPlaceholder: mergedPlaceholderRef, showPlaceholder1: showPlaceholder1Ref, showPlaceholder2: showPlaceholder2Ref, mergedFocus: mergedFocusRef, isComposing: isComposingRef, activated: activatedRef, showClearButton, mergedSize: mergedSizeRef, mergedDisabled: mergedDisabledRef, textDecorationStyle: textDecorationStyleRef, mergedClsPrefix: mergedClsPrefixRef, mergedBordered: mergedBorderedRef, mergedShowPasswordOn: mergedShowPasswordOnRef, placeholderStyle: placeholderStyleRef,
|
|
646
|
+
uncontrolledValue: uncontrolledValueRef, mergedValue: mergedValueRef, passwordVisible: passwordVisibleRef, mergedPlaceholder: mergedPlaceholderRef, showPlaceholder1: showPlaceholder1Ref, showPlaceholder2: showPlaceholder2Ref, mergedFocus: mergedFocusRef, isComposing: isComposingRef, activated: activatedRef, showClearButton, mergedSize: mergedSizeRef, mergedDisabled: mergedDisabledRef, textDecorationStyle: textDecorationStyleRef, mergedClsPrefix: mergedClsPrefixRef, mergedBordered: mergedBorderedRef, mergedShowPasswordOn: mergedShowPasswordOnRef, placeholderStyle: placeholderStyleRef, mergedStatus: mergedStatusRef,
|
|
648
647
|
// methods
|
|
649
648
|
handleTextAreaScroll,
|
|
650
649
|
handleCompositionStart,
|
|
@@ -724,10 +723,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
724
723
|
}) });
|
|
725
724
|
},
|
|
726
725
|
render() {
|
|
727
|
-
var _a, _b, _c
|
|
728
|
-
const { mergedClsPrefix, $slots } = this;
|
|
726
|
+
var _a, _b, _c;
|
|
727
|
+
const { mergedClsPrefix, mergedStatus, $slots } = this;
|
|
729
728
|
return ((0, vue_1.h)("div", { ref: "wrapperElRef", class: [
|
|
730
729
|
`${mergedClsPrefix}-input`,
|
|
730
|
+
mergedStatus && `${mergedClsPrefix}-input--${mergedStatus}-status`,
|
|
731
731
|
{
|
|
732
732
|
[`${mergedClsPrefix}-input--disabled`]: this.mergedDisabled,
|
|
733
733
|
[`${mergedClsPrefix}-input--textarea`]: this.type === 'textarea',
|
|
@@ -742,7 +742,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
742
742
|
? 0
|
|
743
743
|
: undefined, onFocus: this.handleWrapperFocus, onBlur: this.handleWrapperBlur, onClick: this.handleClick, onMousedown: this.handleMouseDown, onMouseenter: this.handleMouseEnter, onMouseleave: this.handleMouseLeave, onCompositionstart: this.handleCompositionStart, onCompositionend: this.handleCompositionEnd, onKeyup: this.onKeyup, onKeydown: this.handleWrapperKeyDown },
|
|
744
744
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-input-wrapper` },
|
|
745
|
-
|
|
745
|
+
(0, _utils_1.resolveWrappedSlot)($slots.prefix, (children) => [
|
|
746
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__prefix` }, children)
|
|
747
|
+
]),
|
|
746
748
|
this.type === 'textarea' ? ((0, vue_1.h)(_internal_1.NScrollbar, { ref: "textareaScrollbarInstRef", class: `${mergedClsPrefix}-input__textarea`, container: this.getTextareaScrollContainer, triggerDisplayManually: true, useUnifiedContainer: true }, {
|
|
747
749
|
default: () => {
|
|
748
750
|
return ((0, vue_1.h)(vue_1.Fragment, null,
|
|
@@ -771,16 +773,18 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
771
773
|
this.showCount ||
|
|
772
774
|
this.mergedShowPasswordOn ||
|
|
773
775
|
this.loading !== undefined) ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__suffix` }, [
|
|
774
|
-
this.clearable || $slots.clear ? ((0, vue_1.h)(_internal_1.NBaseClear, { clsPrefix: mergedClsPrefix, show: this.showClearButton, onClear: this.handleClear }, { default: $slots.clear })) : null,
|
|
775
|
-
!this.internalLoadingBeforeSuffix ? (
|
|
776
|
+
this.clearable || $slots.clear ? ((0, vue_1.h)(_internal_1.NBaseClear, { clsPrefix: mergedClsPrefix, show: this.showClearButton, onClear: this.handleClear }, { default: () => { var _a; return (_a = $slots.clear) === null || _a === void 0 ? void 0 : _a.call($slots); } })) : null,
|
|
777
|
+
!this.internalLoadingBeforeSuffix ? (_a = $slots.suffix) === null || _a === void 0 ? void 0 : _a.call($slots) : null,
|
|
776
778
|
this.loading !== undefined ? ((0, vue_1.h)(_internal_1.NBaseSuffix, { clsPrefix: mergedClsPrefix, loading: this.loading, showArrow: false, showClear: false, style: this.cssVars })) : null,
|
|
777
|
-
this.internalLoadingBeforeSuffix ? (
|
|
778
|
-
this.showCount && this.type !== 'textarea' ? ((0, vue_1.h)(WordCount_1.default, null, {
|
|
779
|
+
this.internalLoadingBeforeSuffix ? (_b = $slots.suffix) === null || _b === void 0 ? void 0 : _b.call($slots) : null,
|
|
780
|
+
this.showCount && this.type !== 'textarea' ? ((0, vue_1.h)(WordCount_1.default, null, {
|
|
781
|
+
default: (props) => { var _a; return (_a = $slots.count) === null || _a === void 0 ? void 0 : _a.call($slots, props); }
|
|
782
|
+
})) : null,
|
|
779
783
|
this.mergedShowPasswordOn && this.type === 'password' ? ((0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-input__eye`, onMousedown: this.handlePasswordToggleMousedown, onClick: this.handlePasswordToggleClick }, {
|
|
780
784
|
default: () => this.passwordVisible ? (0, vue_1.h)(icons_1.EyeIcon, null) : (0, vue_1.h)(icons_1.EyeOffIcon, null)
|
|
781
785
|
})) : null
|
|
782
786
|
])) : null),
|
|
783
|
-
this.pair ? ((0, vue_1.h)("span", { class: `${mergedClsPrefix}-input__separator` }, $slots.separator
|
|
787
|
+
this.pair ? ((0, vue_1.h)("span", { class: `${mergedClsPrefix}-input__separator` }, (0, _utils_1.resolveSlot)($slots.separator, () => [this.separator]))) : null,
|
|
784
788
|
this.pair ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input-wrapper` },
|
|
785
789
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__input` },
|
|
786
790
|
(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)
|
|
@@ -789,11 +793,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
789
793
|
this.showPlaceholder2 ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__placeholder` },
|
|
790
794
|
(0, vue_1.h)("span", null, this.mergedPlaceholder[1]))) : null),
|
|
791
795
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__suffix` }, [
|
|
792
|
-
this.clearable
|
|
793
|
-
(
|
|
796
|
+
this.clearable && ((0, vue_1.h)(_internal_1.NBaseClear, { clsPrefix: mergedClsPrefix, show: this.showClearButton, onClear: this.handleClear }, { default: () => { var _a; return (_a = $slots.clear) === null || _a === void 0 ? void 0 : _a.call($slots); } })),
|
|
797
|
+
(_c = $slots.suffix) === null || _c === void 0 ? void 0 : _c.call($slots)
|
|
794
798
|
]))) : null,
|
|
795
799
|
this.mergedBordered ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__border` })) : null,
|
|
796
800
|
this.mergedBordered ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-input__state-border` })) : null,
|
|
797
|
-
this.showCount && this.type === 'textarea' ? ((0, vue_1.h)(WordCount_1.default, null, { default: $slots.count })) : null));
|
|
801
|
+
this.showCount && this.type === 'textarea' ? ((0, vue_1.h)(WordCount_1.default, null, { default: (props) => { var _a; return (_a = $slots.count) === null || _a === void 0 ? void 0 : _a.call($slots, props); } })) : null));
|
|
798
802
|
}
|
|
799
803
|
});
|
|
@@ -12,7 +12,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
12
12
|
props: inputGroupProps,
|
|
13
13
|
setup(props) {
|
|
14
14
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
15
|
-
(0, _mixins_1.useStyle)('
|
|
15
|
+
(0, _mixins_1.useStyle)('-input-group', input_group_cssr_1.default, mergedClsPrefixRef);
|
|
16
16
|
return {
|
|
17
17
|
mergedClsPrefix: mergedClsPrefixRef
|
|
18
18
|
};
|
|
@@ -20,7 +20,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
20
20
|
props: inputGroupLabelProps,
|
|
21
21
|
setup(props) {
|
|
22
22
|
const { mergedBorderedRef, mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
23
|
-
const themeRef = (0, _mixins_1.useTheme)('Input', '
|
|
23
|
+
const themeRef = (0, _mixins_1.useTheme)('Input', '-input-group-label', input_group_label_cssr_1.default, styles_1.inputLight, props, mergedClsPrefixRef);
|
|
24
24
|
return {
|
|
25
25
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
26
26
|
mergedBordered: mergedBorderedRef,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const vue_1 = require("vue");
|
|
4
|
+
const _utils_1 = require("../../_utils");
|
|
4
5
|
const interface_1 = require("./interface");
|
|
5
6
|
const utils_1 = require("./utils");
|
|
6
7
|
exports.default = (0, vue_1.defineComponent)({
|
|
@@ -18,15 +19,15 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
18
19
|
return () => {
|
|
19
20
|
const { value: maxlength } = maxlengthRef;
|
|
20
21
|
const { value: mergedValue } = mergedValueRef;
|
|
21
|
-
return ((0, vue_1.h)("span", { class: `${mergedClsPrefixRef.value}-input-word-count` }, slots.default
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
: maxlength === undefined
|
|
22
|
+
return ((0, vue_1.h)("span", { class: `${mergedClsPrefixRef.value}-input-word-count` }, (0, _utils_1.resolveSlotWithProps)(slots.default, {
|
|
23
|
+
value: mergedValue === null || Array.isArray(mergedValue)
|
|
24
|
+
? ''
|
|
25
|
+
: mergedValue
|
|
26
|
+
}, () => [
|
|
27
|
+
maxlength === undefined
|
|
28
28
|
? wordCountRef.value
|
|
29
|
-
: `${wordCountRef.value} / ${maxlength}`
|
|
29
|
+
: `${wordCountRef.value} / ${maxlength}`
|
|
30
|
+
])));
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
33
|
});
|