naive-ui 2.24.6 → 2.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_internal/clear/src/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 +11 -6
- package/es/_internal/select-menu/src/SelectMenu.js +49 -24
- package/es/_internal/selection/src/Selection.d.ts +42 -29
- package/es/_internal/selection/src/Selection.js +100 -93
- package/es/_internal/selection/src/interface.d.ts +2 -2
- package/es/_internal/selection/src/styles/index.cssr.js +16 -31
- package/es/_internal/selection/styles/dark.js +3 -3
- package/es/_internal/selection/styles/light.d.ts +6 -6
- package/es/_internal/selection/styles/light.js +3 -3
- package/es/_internal/slot-machine/src/SlotMachine.js +1 -1
- package/es/_internal/wave/src/Wave.js +1 -1
- package/es/_mixins/index.d.ts +1 -1
- package/es/_mixins/index.js +1 -1
- package/es/_mixins/use-config.js +1 -1
- package/es/_mixins/use-css-vars-class.d.ts +11 -2
- package/es/_mixins/use-css-vars-class.js +49 -18
- 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/css/color-to-class.d.ts +1 -0
- package/es/_utils/css/color-to-class.js +3 -0
- package/es/_utils/css/format-length.d.ts +2 -2
- package/es/_utils/css/format-length.js +1 -2
- package/es/_utils/css/index.d.ts +2 -1
- package/es/_utils/css/index.js +2 -1
- package/es/_utils/cssr/index.d.ts +1 -2
- package/es/_utils/cssr/index.js +1 -14
- package/es/_utils/index.d.ts +2 -2
- package/es/_utils/index.js +2 -2
- 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 +17 -1
- package/es/affix/src/Affix.js +1 -1
- package/es/alert/src/Alert.js +1 -1
- package/es/anchor/src/AnchorAdapter.js +1 -1
- package/es/auto-complete/src/AutoComplete.d.ts +16 -1
- 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.js +1 -1
- package/es/breadcrumb/src/Breadcrumb.js +1 -1
- package/es/button/src/Button.d.ts +4 -2
- package/es/button/src/Button.js +270 -245
- package/es/button/src/ButtonGroup.js +1 -1
- package/es/button/src/styles/button.cssr.js +1 -0
- package/es/button/styles/index.d.ts +1 -1
- package/es/button/styles/index.js +1 -1
- package/es/button/styles/rtl.d.ts +2 -5
- package/es/button/styles/rtl.js +1 -1
- package/es/calendar/src/Calendar.js +1 -1
- package/es/card/src/Card.d.ts +8 -2
- package/es/card/src/Card.js +44 -40
- package/es/card/styles/index.d.ts +1 -1
- package/es/card/styles/index.js +1 -1
- package/es/card/styles/rtl.d.ts +2 -5
- package/es/card/styles/rtl.js +1 -1
- 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 +36 -34
- package/es/cascader/src/Cascader.js +6 -6
- package/es/cascader/src/CascaderMenu.d.ts +3 -3
- package/es/cascader/src/CascaderOption.d.ts +3 -3
- package/es/cascader/src/CascaderSelectMenu.d.ts +3 -3
- package/es/cascader/src/CascaderSubmenu.d.ts +3 -3
- package/es/cascader/styles/light.d.ts +3 -3
- package/es/checkbox/src/Checkbox.js +1 -1
- package/es/checkbox/src/styles/index.cssr.js +12 -12
- 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 +24 -17
- package/es/color-picker/src/ColorPicker.js +7 -4
- package/es/color-picker/src/ColorPickerTrigger.js +1 -1
- 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 +1 -0
- 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 +33 -33
- package/es/data-table/src/DataTable.js +1 -1
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
- package/es/data-table/src/TableParts/Body.d.ts +6 -6
- package/es/data-table/src/TableParts/Cell.d.ts +12 -12
- package/es/data-table/src/TableParts/Header.d.ts +6 -6
- 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/data-table/styles/light.d.ts +3 -3
- package/es/date-picker/src/DatePicker.d.ts +2 -1
- package/es/date-picker/src/DatePicker.js +6 -6
- package/es/descriptions/src/Descriptions.d.ts +1 -1
- 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 +27 -60
- package/es/dialog/src/Dialog.js +4 -31
- package/es/dialog/src/DialogEnvironment.d.ts +8 -9
- package/es/dialog/src/DialogEnvironment.js +3 -2
- package/es/dialog/src/DialogProvider.d.ts +3 -5
- 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 +10 -1
- package/es/dynamic-input/src/DynamicInput.js +61 -18
- package/es/dynamic-tags/src/DynamicTags.d.ts +7 -16
- 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 +1 -1
- package/es/form/src/FormItem.js +3 -2
- package/es/form/src/FormItemCol.d.ts +1 -1
- package/es/form/src/FormItemGridItem.d.ts +1 -1
- 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.js +1 -1
- package/es/global-style/src/GlobalStyle.js +1 -1
- 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 +1 -2
- package/es/icon/src/Icon.js +2 -2
- 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 +50 -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/Image.d.ts +1 -1
- package/es/image/src/ImagePreview.js +1 -1
- package/es/input/src/Input.d.ts +6 -1
- 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 +5 -5
- package/es/input-number/src/InputNumber.d.ts +2 -1
- 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/deDE.js +13 -15
- package/es/locales/common/enGB.d.ts +109 -0
- package/es/locales/common/enGB.js +109 -0
- package/es/locales/common/eo.d.ts +109 -0
- package/es/locales/common/eo.js +109 -0
- package/es/locales/common/jaJP.js +12 -14
- package/es/locales/common/plPL.d.ts +3 -0
- package/es/locales/common/plPL.js +109 -0
- package/es/locales/date/enGB.d.ts +3 -0
- package/es/locales/date/enGB.js +6 -0
- package/es/locales/date/eo.d.ts +3 -0
- package/es/locales/date/eo.js +6 -0
- package/es/locales/date/plPL.d.ts +3 -0
- package/es/locales/date/plPL.js +6 -0
- package/es/locales/index.d.ts +6 -0
- package/es/locales/index.js +6 -0
- 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 +16 -1
- package/es/mention/src/Mention.js +7 -3
- package/es/menu/src/Menu.d.ts +3 -5
- 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 +5 -3
- package/es/modal/src/BodyWrapper.js +2 -2
- package/es/modal/src/Modal.d.ts +7 -4
- package/es/modal/src/Modal.js +2 -2
- package/es/modal/src/presetProps.d.ts +2 -1
- package/es/modal/src/presetProps.js +1 -1
- package/es/notification/index.d.ts +1 -1
- package/es/notification/src/Notification.d.ts +1 -2
- 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 +3 -4
- package/es/notification/src/NotificationEnvironment.js +3 -3
- package/es/notification/src/NotificationProvider.d.ts +10 -6
- 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.d.ts +33 -33
- package/es/pagination/src/Pagination.js +1 -1
- package/es/pagination/styles/light.d.ts +3 -3
- 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/Circle.d.ts +19 -3
- package/es/progress/src/Circle.js +41 -22
- package/es/progress/src/Progress.d.ts +15 -6
- package/es/progress/src/Progress.js +44 -30
- package/es/progress/src/styles/index.cssr.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.js +1 -1
- package/es/select/index.d.ts +2 -0
- package/es/select/src/Select.d.ts +71 -54
- package/es/select/src/Select.js +82 -47
- package/es/select/src/interface.d.ts +2 -0
- package/es/select/styles/light.d.ts +3 -3
- 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 +3 -1
- package/es/tag/src/Tag.js +61 -41
- package/es/tag/src/styles/index.cssr.js +5 -17
- package/es/tag/styles/index.d.ts +1 -1
- package/es/tag/styles/index.js +1 -1
- package/es/tag/styles/rtl.d.ts +2 -5
- package/es/tag/styles/rtl.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/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/src/utils.js +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +46 -44
- package/es/tree-select/src/TreeSelect.js +8 -5
- package/es/tree-select/styles/light.d.ts +3 -3
- package/es/typography/src/a.js +1 -1
- package/es/typography/src/blockquote.js +1 -1
- package/es/typography/src/create-header.js +1 -1
- 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/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 +11 -6
- package/lib/_internal/select-menu/src/SelectMenu.js +47 -22
- package/lib/_internal/selection/src/Selection.d.ts +42 -29
- package/lib/_internal/selection/src/Selection.js +99 -92
- package/lib/_internal/selection/src/interface.d.ts +2 -2
- package/lib/_internal/selection/src/styles/index.cssr.js +15 -30
- package/lib/_internal/selection/styles/dark.js +3 -3
- package/lib/_internal/selection/styles/light.d.ts +6 -6
- package/lib/_internal/selection/styles/light.js +3 -3
- package/lib/_internal/slot-machine/src/SlotMachine.js +1 -1
- package/lib/_internal/wave/src/Wave.js +1 -1
- package/lib/_mixins/index.d.ts +1 -1
- package/lib/_mixins/index.js +3 -2
- package/lib/_mixins/use-config.js +2 -2
- package/lib/_mixins/use-css-vars-class.d.ts +11 -2
- package/lib/_mixins/use-css-vars-class.js +50 -22
- 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/css/color-to-class.d.ts +1 -0
- package/lib/_utils/css/color-to-class.js +7 -0
- package/lib/_utils/css/format-length.d.ts +2 -2
- package/lib/_utils/css/format-length.js +2 -1
- package/lib/_utils/css/index.d.ts +2 -1
- package/lib/_utils/css/index.js +4 -5
- package/lib/_utils/cssr/index.d.ts +1 -2
- package/lib/_utils/cssr/index.js +1 -15
- package/lib/_utils/index.d.ts +2 -2
- package/lib/_utils/index.js +6 -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 +21 -2
- package/lib/affix/src/Affix.js +1 -1
- package/lib/alert/src/Alert.js +1 -1
- package/lib/anchor/src/AnchorAdapter.js +1 -1
- package/lib/auto-complete/src/AutoComplete.d.ts +16 -1
- 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.js +1 -1
- package/lib/breadcrumb/src/Breadcrumb.js +1 -1
- package/lib/button/src/Button.d.ts +4 -2
- package/lib/button/src/Button.js +268 -243
- package/lib/button/src/ButtonGroup.js +1 -1
- package/lib/button/src/styles/button.cssr.js +1 -0
- package/lib/button/styles/index.d.ts +1 -1
- package/lib/button/styles/index.js +1 -1
- package/lib/button/styles/rtl.d.ts +2 -5
- package/lib/button/styles/rtl.js +2 -1
- package/lib/calendar/src/Calendar.js +1 -1
- package/lib/card/src/Card.d.ts +8 -2
- package/lib/card/src/Card.js +43 -39
- package/lib/card/styles/index.d.ts +1 -1
- package/lib/card/styles/index.js +1 -1
- package/lib/card/styles/rtl.d.ts +2 -5
- package/lib/card/styles/rtl.js +2 -1
- 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 +36 -34
- package/lib/cascader/src/Cascader.js +6 -6
- package/lib/cascader/src/CascaderMenu.d.ts +3 -3
- package/lib/cascader/src/CascaderOption.d.ts +3 -3
- package/lib/cascader/src/CascaderSelectMenu.d.ts +3 -3
- package/lib/cascader/src/CascaderSubmenu.d.ts +3 -3
- package/lib/cascader/styles/light.d.ts +3 -3
- package/lib/checkbox/src/Checkbox.js +1 -1
- package/lib/checkbox/src/styles/index.cssr.js +12 -12
- 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 +24 -17
- package/lib/color-picker/src/ColorPicker.js +8 -5
- package/lib/color-picker/src/ColorPickerTrigger.js +2 -2
- 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 +1 -0
- 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 +33 -33
- package/lib/data-table/src/DataTable.js +1 -1
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +6 -6
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +6 -6
- package/lib/data-table/src/TableParts/Body.d.ts +6 -6
- package/lib/data-table/src/TableParts/Cell.d.ts +12 -12
- package/lib/data-table/src/TableParts/Header.d.ts +6 -6
- 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/data-table/styles/light.d.ts +3 -3
- package/lib/date-picker/src/DatePicker.d.ts +2 -1
- package/lib/date-picker/src/DatePicker.js +6 -6
- package/lib/descriptions/src/Descriptions.d.ts +1 -1
- 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 +27 -60
- package/lib/dialog/src/Dialog.js +5 -32
- package/lib/dialog/src/DialogEnvironment.d.ts +8 -9
- package/lib/dialog/src/DialogEnvironment.js +6 -24
- package/lib/dialog/src/DialogProvider.d.ts +3 -5
- 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 +10 -1
- package/lib/dynamic-input/src/DynamicInput.js +59 -16
- package/lib/dynamic-tags/src/DynamicTags.d.ts +7 -16
- 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 +1 -1
- package/lib/form/src/FormItem.js +5 -4
- package/lib/form/src/FormItemCol.d.ts +1 -1
- package/lib/form/src/FormItemGridItem.d.ts +1 -1
- 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.js +4 -4
- package/lib/global-style/src/GlobalStyle.js +2 -2
- 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 +1 -2
- package/lib/icon/src/Icon.js +3 -2
- 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 +56 -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/Image.d.ts +1 -1
- package/lib/image/src/ImagePreview.js +1 -1
- package/lib/input/src/Input.d.ts +6 -1
- 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 +4 -4
- package/lib/input-number/src/InputNumber.d.ts +2 -1
- 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/deDE.js +13 -15
- package/lib/locales/common/enGB.d.ts +109 -0
- package/lib/locales/common/enGB.js +111 -0
- package/lib/locales/common/eo.d.ts +109 -0
- package/lib/locales/common/eo.js +111 -0
- package/lib/locales/common/jaJP.js +12 -14
- package/lib/locales/common/plPL.d.ts +3 -0
- package/lib/locales/common/plPL.js +111 -0
- package/lib/locales/date/enGB.d.ts +3 -0
- package/lib/locales/date/enGB.js +11 -0
- package/lib/locales/date/eo.d.ts +3 -0
- package/lib/locales/date/eo.js +11 -0
- package/lib/locales/date/plPL.d.ts +3 -0
- package/lib/locales/date/plPL.js +11 -0
- package/lib/locales/index.d.ts +6 -0
- package/lib/locales/index.js +13 -1
- 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 +16 -1
- package/lib/mention/src/Mention.js +7 -3
- package/lib/menu/src/Menu.d.ts +3 -5
- 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 +5 -3
- package/lib/modal/src/BodyWrapper.js +3 -3
- package/lib/modal/src/Modal.d.ts +7 -4
- package/lib/modal/src/Modal.js +3 -3
- package/lib/modal/src/presetProps.d.ts +2 -1
- package/lib/modal/src/presetProps.js +2 -2
- package/lib/notification/index.d.ts +1 -1
- package/lib/notification/src/Notification.d.ts +1 -2
- 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 +3 -4
- package/lib/notification/src/NotificationEnvironment.js +4 -23
- package/lib/notification/src/NotificationProvider.d.ts +10 -6
- 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.d.ts +33 -33
- package/lib/pagination/src/Pagination.js +1 -1
- package/lib/pagination/styles/light.d.ts +3 -3
- 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/Circle.d.ts +19 -3
- package/lib/progress/src/Circle.js +40 -21
- package/lib/progress/src/Progress.d.ts +15 -6
- package/lib/progress/src/Progress.js +43 -29
- package/lib/progress/src/styles/index.cssr.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.js +1 -1
- package/lib/select/index.d.ts +2 -0
- package/lib/select/src/Select.d.ts +71 -54
- package/lib/select/src/Select.js +82 -47
- package/lib/select/src/interface.d.ts +2 -0
- package/lib/select/styles/light.d.ts +3 -3
- 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 +3 -1
- package/lib/tag/src/Tag.js +59 -39
- package/lib/tag/src/styles/index.cssr.js +5 -17
- package/lib/tag/styles/index.d.ts +1 -1
- package/lib/tag/styles/index.js +1 -1
- package/lib/tag/styles/rtl.d.ts +2 -5
- package/lib/tag/styles/rtl.js +2 -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/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/src/utils.js +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +46 -44
- package/lib/tree-select/src/TreeSelect.js +8 -5
- package/lib/tree-select/styles/light.d.ts +3 -3
- package/lib/typography/src/a.js +1 -1
- package/lib/typography/src/blockquote.js +1 -1
- package/lib/typography/src/create-header.js +1 -1
- 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/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +8 -9
- package/volar.d.ts +1 -0
- package/web-types.json +452 -220
package/lib/button/src/Button.js
CHANGED
|
@@ -136,23 +136,274 @@ const Button = (0, vue_1.defineComponent)({
|
|
|
136
136
|
enterPressedRef.value = false;
|
|
137
137
|
};
|
|
138
138
|
const { mergedClsPrefixRef, NConfigProvider } = (0, _mixins_1.useConfig)(props);
|
|
139
|
-
const themeRef = (0, _mixins_1.useTheme)('Button', '
|
|
139
|
+
const themeRef = (0, _mixins_1.useTheme)('Button', '-button', button_cssr_1.default, styles_1.buttonLight, props, mergedClsPrefixRef);
|
|
140
140
|
const rtlEnabledRef = (0, use_rtl_1.default)('Button', NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef, mergedClsPrefixRef);
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
141
|
+
const disableInlineTheme = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.disableInlineTheme;
|
|
142
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
143
|
+
const theme = themeRef.value;
|
|
144
|
+
const { common: { cubicBezierEaseInOut, cubicBezierEaseOut }, self } = theme;
|
|
145
|
+
const { rippleDuration, opacityDisabled, fontWeight, fontWeightStrong } = self;
|
|
146
|
+
const size = mergedSizeRef.value;
|
|
147
|
+
const { dashed, type, ghost, text, color, round, circle, textColor, secondary, tertiary, quaternary, strong } = props;
|
|
148
|
+
// font
|
|
149
|
+
const fontProps = {
|
|
150
|
+
'font-weight': strong ? fontWeightStrong : fontWeight
|
|
151
|
+
};
|
|
152
|
+
// color
|
|
153
|
+
let colorProps = {
|
|
154
|
+
'--n-color': 'initial',
|
|
155
|
+
'--n-color-hover': 'initial',
|
|
156
|
+
'--n-color-pressed': 'initial',
|
|
157
|
+
'--n-color-focus': 'initial',
|
|
158
|
+
'--n-color-disabled': 'initial',
|
|
159
|
+
'--n-ripple-color': 'initial',
|
|
160
|
+
'--n-text-color': 'initial',
|
|
161
|
+
'--n-text-color-hover': 'initial',
|
|
162
|
+
'--n-text-color-pressed': 'initial',
|
|
163
|
+
'--n-text-color-focus': 'initial',
|
|
164
|
+
'--n-text-color-disabled': 'initial'
|
|
165
|
+
};
|
|
166
|
+
const typeIsTertiary = type === 'tertiary';
|
|
167
|
+
const typeIsDefault = type === 'default';
|
|
168
|
+
const mergedType = typeIsTertiary ? 'default' : type;
|
|
169
|
+
if (text) {
|
|
170
|
+
const propTextColor = textColor || color;
|
|
171
|
+
const mergedTextColor = propTextColor || self[(0, _utils_1.createKey)('textColorText', mergedType)];
|
|
172
|
+
colorProps = {
|
|
173
|
+
'--n-color': '#0000',
|
|
174
|
+
'--n-color-hover': '#0000',
|
|
175
|
+
'--n-color-pressed': '#0000',
|
|
176
|
+
'--n-color-focus': '#0000',
|
|
177
|
+
'--n-color-disabled': '#0000',
|
|
178
|
+
'--n-ripple-color': '#0000',
|
|
179
|
+
'--n-text-color': mergedTextColor,
|
|
180
|
+
'--n-text-color-hover': propTextColor
|
|
181
|
+
? (0, index_1.createHoverColor)(propTextColor)
|
|
182
|
+
: self[(0, _utils_1.createKey)('textColorTextHover', mergedType)],
|
|
183
|
+
'--n-text-color-pressed': propTextColor
|
|
184
|
+
? (0, index_1.createPressedColor)(propTextColor)
|
|
185
|
+
: self[(0, _utils_1.createKey)('textColorTextPressed', mergedType)],
|
|
186
|
+
'--n-text-color-focus': propTextColor
|
|
187
|
+
? (0, index_1.createHoverColor)(propTextColor)
|
|
188
|
+
: self[(0, _utils_1.createKey)('textColorTextHover', mergedType)],
|
|
189
|
+
'--n-text-color-disabled': propTextColor ||
|
|
190
|
+
self[(0, _utils_1.createKey)('textColorTextDisabled', mergedType)]
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
else if (ghost || dashed) {
|
|
194
|
+
const mergedTextColor = textColor || color;
|
|
195
|
+
colorProps = {
|
|
196
|
+
'--n-color': '#0000',
|
|
197
|
+
'--n-color-hover': '#0000',
|
|
198
|
+
'--n-color-pressed': '#0000',
|
|
199
|
+
'--n-color-focus': '#0000',
|
|
200
|
+
'--n-color-disabled': '#0000',
|
|
201
|
+
'--n-ripple-color': color || self[(0, _utils_1.createKey)('rippleColor', mergedType)],
|
|
202
|
+
'--n-text-color': mergedTextColor || self[(0, _utils_1.createKey)('textColorGhost', mergedType)],
|
|
203
|
+
'--n-text-color-hover': mergedTextColor
|
|
204
|
+
? (0, index_1.createHoverColor)(mergedTextColor)
|
|
205
|
+
: self[(0, _utils_1.createKey)('textColorGhostHover', mergedType)],
|
|
206
|
+
'--n-text-color-pressed': mergedTextColor
|
|
207
|
+
? (0, index_1.createPressedColor)(mergedTextColor)
|
|
208
|
+
: self[(0, _utils_1.createKey)('textColorGhostPressed', mergedType)],
|
|
209
|
+
'--n-text-color-focus': mergedTextColor
|
|
210
|
+
? (0, index_1.createHoverColor)(mergedTextColor)
|
|
211
|
+
: self[(0, _utils_1.createKey)('textColorGhostHover', mergedType)],
|
|
212
|
+
'--n-text-color-disabled': mergedTextColor ||
|
|
213
|
+
self[(0, _utils_1.createKey)('textColorGhostDisabled', mergedType)]
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
else if (secondary) {
|
|
217
|
+
const typeTextColor = typeIsDefault
|
|
218
|
+
? self.textColor
|
|
219
|
+
: typeIsTertiary
|
|
220
|
+
? self.textColorTertiary
|
|
221
|
+
: self[(0, _utils_1.createKey)('color', mergedType)];
|
|
222
|
+
const mergedTextColor = color || typeTextColor;
|
|
223
|
+
const isColoredType = type !== 'default' && type !== 'tertiary';
|
|
224
|
+
colorProps = {
|
|
225
|
+
'--n-color': isColoredType
|
|
226
|
+
? (0, seemly_1.changeColor)(mergedTextColor, {
|
|
227
|
+
alpha: Number(self.colorOpacitySecondary)
|
|
228
|
+
})
|
|
229
|
+
: self.colorSecondary,
|
|
230
|
+
'--n-color-hover': isColoredType
|
|
231
|
+
? (0, seemly_1.changeColor)(mergedTextColor, {
|
|
232
|
+
alpha: Number(self.colorOpacitySecondaryHover)
|
|
233
|
+
})
|
|
234
|
+
: self.colorSecondaryHover,
|
|
235
|
+
'--n-color-pressed': isColoredType
|
|
236
|
+
? (0, seemly_1.changeColor)(mergedTextColor, {
|
|
237
|
+
alpha: Number(self.colorOpacitySecondaryPressed)
|
|
238
|
+
})
|
|
239
|
+
: self.colorSecondaryPressed,
|
|
240
|
+
'--n-color-focus': isColoredType
|
|
241
|
+
? (0, seemly_1.changeColor)(mergedTextColor, {
|
|
242
|
+
alpha: Number(self.colorOpacitySecondaryHover)
|
|
243
|
+
})
|
|
244
|
+
: self.colorSecondaryHover,
|
|
245
|
+
'--n-color-disabled': self.colorSecondary,
|
|
246
|
+
'--n-ripple-color': '#0000',
|
|
247
|
+
'--n-text-color': mergedTextColor,
|
|
248
|
+
'--n-text-color-hover': mergedTextColor,
|
|
249
|
+
'--n-text-color-pressed': mergedTextColor,
|
|
250
|
+
'--n-text-color-focus': mergedTextColor,
|
|
251
|
+
'--n-text-color-disabled': mergedTextColor
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
else if (tertiary || quaternary) {
|
|
255
|
+
const typeColor = typeIsDefault
|
|
256
|
+
? self.textColor
|
|
257
|
+
: typeIsTertiary
|
|
258
|
+
? self.textColorTertiary
|
|
259
|
+
: self[(0, _utils_1.createKey)('color', mergedType)];
|
|
260
|
+
const mergedColor = color || typeColor;
|
|
261
|
+
if (tertiary) {
|
|
262
|
+
colorProps['--n-color'] = self.colorTertiary;
|
|
263
|
+
colorProps['--n-color-hover'] = self.colorTertiaryHover;
|
|
264
|
+
colorProps['--n-color-pressed'] = self.colorTertiaryPressed;
|
|
265
|
+
colorProps['--n-color-focus'] = self.colorSecondaryHover;
|
|
266
|
+
colorProps['--n-color-disabled'] = self.colorTertiary;
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
colorProps['--n-color'] = self.colorQuaternary;
|
|
270
|
+
colorProps['--n-color-hover'] = self.colorQuaternaryHover;
|
|
271
|
+
colorProps['--n-color-pressed'] = self.colorQuaternaryPressed;
|
|
272
|
+
colorProps['--n-color-focus'] = self.colorQuaternaryHover;
|
|
273
|
+
colorProps['--n-color-disabled'] = self.colorQuaternary;
|
|
274
|
+
}
|
|
275
|
+
colorProps['--n-ripple-color'] = '#0000';
|
|
276
|
+
colorProps['--n-text-color'] = mergedColor;
|
|
277
|
+
colorProps['--n-text-color-hover'] = mergedColor;
|
|
278
|
+
colorProps['--n-text-color-pressed'] = mergedColor;
|
|
279
|
+
colorProps['--n-text-color-focus'] = mergedColor;
|
|
280
|
+
colorProps['--n-text-color-disabled'] = mergedColor;
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
colorProps = {
|
|
284
|
+
'--n-color': color || self[(0, _utils_1.createKey)('color', mergedType)],
|
|
285
|
+
'--n-color-hover': color
|
|
286
|
+
? (0, index_1.createHoverColor)(color)
|
|
287
|
+
: self[(0, _utils_1.createKey)('colorHover', mergedType)],
|
|
288
|
+
'--n-color-pressed': color
|
|
289
|
+
? (0, index_1.createPressedColor)(color)
|
|
290
|
+
: self[(0, _utils_1.createKey)('colorPressed', mergedType)],
|
|
291
|
+
'--n-color-focus': color
|
|
292
|
+
? (0, index_1.createHoverColor)(color)
|
|
293
|
+
: self[(0, _utils_1.createKey)('colorFocus', mergedType)],
|
|
294
|
+
'--n-color-disabled': color || self[(0, _utils_1.createKey)('colorDisabled', mergedType)],
|
|
295
|
+
'--n-ripple-color': color || self[(0, _utils_1.createKey)('rippleColor', mergedType)],
|
|
296
|
+
'--n-text-color': textColor ||
|
|
297
|
+
(color
|
|
298
|
+
? self.textColorPrimary
|
|
299
|
+
: typeIsTertiary
|
|
300
|
+
? self.textColorTertiary
|
|
301
|
+
: self[(0, _utils_1.createKey)('textColor', mergedType)]),
|
|
302
|
+
'--n-text-color-hover': textColor ||
|
|
303
|
+
(color
|
|
304
|
+
? self.textColorHoverPrimary
|
|
305
|
+
: self[(0, _utils_1.createKey)('textColorHover', mergedType)]),
|
|
306
|
+
'--n-text-color-pressed': textColor ||
|
|
307
|
+
(color
|
|
308
|
+
? self.textColorPressedPrimary
|
|
309
|
+
: self[(0, _utils_1.createKey)('textColorPressed', mergedType)]),
|
|
310
|
+
'--n-text-color-focus': textColor ||
|
|
311
|
+
(color
|
|
312
|
+
? self.textColorFocusPrimary
|
|
313
|
+
: self[(0, _utils_1.createKey)('textColorFocus', mergedType)]),
|
|
314
|
+
'--n-text-color-disabled': textColor ||
|
|
315
|
+
(color
|
|
316
|
+
? self.textColorDisabledPrimary
|
|
317
|
+
: self[(0, _utils_1.createKey)('textColorDisabled', mergedType)])
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
// border
|
|
321
|
+
let borderProps = {
|
|
322
|
+
'--n-border': 'initial',
|
|
323
|
+
'--n-border-hover': 'initial',
|
|
324
|
+
'--n-border-pressed': 'initial',
|
|
325
|
+
'--n-border-focus': 'initial',
|
|
326
|
+
'--n-border-disabled': 'initial'
|
|
327
|
+
};
|
|
328
|
+
if (text) {
|
|
329
|
+
borderProps = {
|
|
330
|
+
'--n-border': 'none',
|
|
331
|
+
'--n-border-hover': 'none',
|
|
332
|
+
'--n-border-pressed': 'none',
|
|
333
|
+
'--n-border-focus': 'none',
|
|
334
|
+
'--n-border-disabled': 'none'
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
borderProps = {
|
|
339
|
+
'--n-border': self[(0, _utils_1.createKey)('border', mergedType)],
|
|
340
|
+
'--n-border-hover': self[(0, _utils_1.createKey)('borderHover', mergedType)],
|
|
341
|
+
'--n-border-pressed': self[(0, _utils_1.createKey)('borderPressed', mergedType)],
|
|
342
|
+
'--n-border-focus': self[(0, _utils_1.createKey)('borderFocus', mergedType)],
|
|
343
|
+
'--n-border-disabled': self[(0, _utils_1.createKey)('borderDisabled', mergedType)]
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
// size
|
|
347
|
+
const { [(0, _utils_1.createKey)('height', size)]: height, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, [(0, _utils_1.createKey)('padding', size)]: padding, [(0, _utils_1.createKey)('paddingRound', size)]: paddingRound, [(0, _utils_1.createKey)('iconSize', size)]: iconSize, [(0, _utils_1.createKey)('borderRadius', size)]: borderRadius, [(0, _utils_1.createKey)('iconMargin', size)]: iconMargin, waveOpacity } = self;
|
|
348
|
+
const sizeProps = {
|
|
349
|
+
'--n-width': circle && !text ? height : 'initial',
|
|
350
|
+
'--n-height': text ? 'initial' : height,
|
|
351
|
+
'--n-font-size': fontSize,
|
|
352
|
+
'--n-padding': circle
|
|
353
|
+
? 'initial'
|
|
354
|
+
: text
|
|
355
|
+
? 'initial'
|
|
356
|
+
: round
|
|
357
|
+
? paddingRound
|
|
358
|
+
: padding,
|
|
359
|
+
'--n-icon-size': iconSize,
|
|
360
|
+
'--n-icon-margin': iconMargin,
|
|
361
|
+
'--n-border-radius': text
|
|
362
|
+
? 'initial'
|
|
363
|
+
: circle || round
|
|
364
|
+
? height
|
|
365
|
+
: borderRadius
|
|
366
|
+
};
|
|
367
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({ '--n-bezier': cubicBezierEaseInOut, '--n-bezier-ease-out': cubicBezierEaseOut, '--n-ripple-duration': rippleDuration, '--n-opacity-disabled': opacityDisabled, '--n-wave-opacity': waveOpacity }, fontProps), colorProps), borderProps), sizeProps);
|
|
368
|
+
});
|
|
369
|
+
const themeClassHandle = disableInlineTheme
|
|
370
|
+
? (0, _mixins_1.useThemeClass)('button', (0, vue_1.computed)(() => {
|
|
371
|
+
let hash = '';
|
|
372
|
+
const { dashed, type, ghost, text, color, round, circle, textColor, secondary, tertiary, quaternary, strong } = props;
|
|
373
|
+
if (dashed)
|
|
374
|
+
hash += 'a';
|
|
375
|
+
if (ghost)
|
|
376
|
+
hash += 'b';
|
|
377
|
+
if (text)
|
|
378
|
+
hash += 'c';
|
|
379
|
+
if (round)
|
|
380
|
+
hash += 'd';
|
|
381
|
+
if (circle)
|
|
382
|
+
hash += 'e';
|
|
383
|
+
if (secondary)
|
|
384
|
+
hash += 'f';
|
|
385
|
+
if (tertiary)
|
|
386
|
+
hash += 'g';
|
|
387
|
+
if (quaternary)
|
|
388
|
+
hash += 'h';
|
|
389
|
+
if (strong)
|
|
390
|
+
hash += 'i';
|
|
391
|
+
if (color)
|
|
392
|
+
hash += 'j' + (0, _utils_1.color2Class)(color);
|
|
393
|
+
if (textColor)
|
|
394
|
+
hash += 'k' + (0, _utils_1.color2Class)(textColor);
|
|
395
|
+
const { value: size } = mergedSizeRef;
|
|
396
|
+
hash += 'l' + size[0];
|
|
397
|
+
hash += 'm' + type[0];
|
|
398
|
+
return hash;
|
|
399
|
+
}), cssVarsRef, props)
|
|
400
|
+
: _mixins_1.emptyThemeClassHandle;
|
|
401
|
+
return Object.assign({ selfElRef,
|
|
402
|
+
waveElRef, mergedClsPrefix: mergedClsPrefixRef, mergedFocusable: mergedFocusableRef, mergedSize: mergedSizeRef, showBorder: showBorderRef, enterPressed: enterPressedRef, rtlEnabled: rtlEnabledRef, handleMousedown,
|
|
151
403
|
handleKeydown,
|
|
152
404
|
handleBlur,
|
|
153
405
|
handleKeyup,
|
|
154
|
-
handleClick,
|
|
155
|
-
customColorCssVars: (0, vue_1.computed)(() => {
|
|
406
|
+
handleClick, customColorCssVars: (0, vue_1.computed)(() => {
|
|
156
407
|
const { color } = props;
|
|
157
408
|
if (!color)
|
|
158
409
|
return null;
|
|
@@ -164,239 +415,13 @@ const Button = (0, vue_1.defineComponent)({
|
|
|
164
415
|
'--n-border-color-focus': hoverColor,
|
|
165
416
|
'--n-border-color-disabled': color
|
|
166
417
|
};
|
|
167
|
-
}),
|
|
168
|
-
cssVars: (0, vue_1.computed)(() => {
|
|
169
|
-
const theme = themeRef.value;
|
|
170
|
-
const { common: { cubicBezierEaseInOut, cubicBezierEaseOut }, self } = theme;
|
|
171
|
-
const { rippleDuration, opacityDisabled, fontWeight, fontWeightStrong } = self;
|
|
172
|
-
const size = mergedSizeRef.value;
|
|
173
|
-
const { dashed, type, ghost, text, color, round, circle, textColor, secondary, tertiary, quaternary, strong } = props;
|
|
174
|
-
// font
|
|
175
|
-
const fontProps = {
|
|
176
|
-
fontWeight: strong ? fontWeightStrong : fontWeight
|
|
177
|
-
};
|
|
178
|
-
// color
|
|
179
|
-
let colorProps = {
|
|
180
|
-
'--n-color': 'initial',
|
|
181
|
-
'--n-color-hover': 'initial',
|
|
182
|
-
'--n-color-pressed': 'initial',
|
|
183
|
-
'--n-color-focus': 'initial',
|
|
184
|
-
'--n-color-disabled': 'initial',
|
|
185
|
-
'--n-ripple-color': 'initial',
|
|
186
|
-
'--n-text-color': 'initial',
|
|
187
|
-
'--n-text-color-hover': 'initial',
|
|
188
|
-
'--n-text-color-pressed': 'initial',
|
|
189
|
-
'--n-text-color-focus': 'initial',
|
|
190
|
-
'--n-text-color-disabled': 'initial'
|
|
191
|
-
};
|
|
192
|
-
const typeIsTertiary = type === 'tertiary';
|
|
193
|
-
const typeIsDefault = type === 'default';
|
|
194
|
-
const mergedType = typeIsTertiary ? 'default' : type;
|
|
195
|
-
if (text) {
|
|
196
|
-
const propTextColor = textColor || color;
|
|
197
|
-
const mergedTextColor = propTextColor || self[(0, _utils_1.createKey)('textColorText', mergedType)];
|
|
198
|
-
colorProps = {
|
|
199
|
-
'--n-color': '#0000',
|
|
200
|
-
'--n-color-hover': '#0000',
|
|
201
|
-
'--n-color-pressed': '#0000',
|
|
202
|
-
'--n-color-focus': '#0000',
|
|
203
|
-
'--n-color-disabled': '#0000',
|
|
204
|
-
'--n-ripple-color': '#0000',
|
|
205
|
-
'--n-text-color': mergedTextColor,
|
|
206
|
-
'--n-text-color-hover': propTextColor
|
|
207
|
-
? (0, index_1.createHoverColor)(propTextColor)
|
|
208
|
-
: self[(0, _utils_1.createKey)('textColorTextHover', mergedType)],
|
|
209
|
-
'--n-text-color-pressed': propTextColor
|
|
210
|
-
? (0, index_1.createPressedColor)(propTextColor)
|
|
211
|
-
: self[(0, _utils_1.createKey)('textColorTextPressed', mergedType)],
|
|
212
|
-
'--n-text-color-focus': propTextColor
|
|
213
|
-
? (0, index_1.createHoverColor)(propTextColor)
|
|
214
|
-
: self[(0, _utils_1.createKey)('textColorTextHover', mergedType)],
|
|
215
|
-
'--n-text-color-disabled': propTextColor ||
|
|
216
|
-
self[(0, _utils_1.createKey)('textColorTextDisabled', mergedType)]
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
else if (ghost || dashed) {
|
|
220
|
-
const mergedTextColor = textColor || color;
|
|
221
|
-
colorProps = {
|
|
222
|
-
'--n-color': '#0000',
|
|
223
|
-
'--n-color-hover': '#0000',
|
|
224
|
-
'--n-color-pressed': '#0000',
|
|
225
|
-
'--n-color-focus': '#0000',
|
|
226
|
-
'--n-color-disabled': '#0000',
|
|
227
|
-
'--n-ripple-color': color || self[(0, _utils_1.createKey)('rippleColor', mergedType)],
|
|
228
|
-
'--n-text-color': mergedTextColor || self[(0, _utils_1.createKey)('textColorGhost', mergedType)],
|
|
229
|
-
'--n-text-color-hover': mergedTextColor
|
|
230
|
-
? (0, index_1.createHoverColor)(mergedTextColor)
|
|
231
|
-
: self[(0, _utils_1.createKey)('textColorGhostHover', mergedType)],
|
|
232
|
-
'--n-text-color-pressed': mergedTextColor
|
|
233
|
-
? (0, index_1.createPressedColor)(mergedTextColor)
|
|
234
|
-
: self[(0, _utils_1.createKey)('textColorGhostPressed', mergedType)],
|
|
235
|
-
'--n-text-color-focus': mergedTextColor
|
|
236
|
-
? (0, index_1.createHoverColor)(mergedTextColor)
|
|
237
|
-
: self[(0, _utils_1.createKey)('textColorGhostHover', mergedType)],
|
|
238
|
-
'--n-text-color-disabled': mergedTextColor ||
|
|
239
|
-
self[(0, _utils_1.createKey)('textColorGhostDisabled', mergedType)]
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
else if (secondary) {
|
|
243
|
-
const typeTextColor = typeIsDefault
|
|
244
|
-
? self.textColor
|
|
245
|
-
: typeIsTertiary
|
|
246
|
-
? self.textColorTertiary
|
|
247
|
-
: self[(0, _utils_1.createKey)('color', mergedType)];
|
|
248
|
-
const mergedTextColor = color || typeTextColor;
|
|
249
|
-
const isColoredType = type !== 'default' && type !== 'tertiary';
|
|
250
|
-
colorProps = {
|
|
251
|
-
'--n-color': isColoredType
|
|
252
|
-
? (0, seemly_1.changeColor)(mergedTextColor, {
|
|
253
|
-
alpha: Number(self.colorOpacitySecondary)
|
|
254
|
-
})
|
|
255
|
-
: self.colorSecondary,
|
|
256
|
-
'--n-color-hover': isColoredType
|
|
257
|
-
? (0, seemly_1.changeColor)(mergedTextColor, {
|
|
258
|
-
alpha: Number(self.colorOpacitySecondaryHover)
|
|
259
|
-
})
|
|
260
|
-
: self.colorSecondaryHover,
|
|
261
|
-
'--n-color-pressed': isColoredType
|
|
262
|
-
? (0, seemly_1.changeColor)(mergedTextColor, {
|
|
263
|
-
alpha: Number(self.colorOpacitySecondaryPressed)
|
|
264
|
-
})
|
|
265
|
-
: self.colorSecondaryPressed,
|
|
266
|
-
'--n-color-focus': isColoredType
|
|
267
|
-
? (0, seemly_1.changeColor)(mergedTextColor, {
|
|
268
|
-
alpha: Number(self.colorOpacitySecondaryHover)
|
|
269
|
-
})
|
|
270
|
-
: self.colorSecondaryHover,
|
|
271
|
-
'--n-color-disabled': self.colorSecondary,
|
|
272
|
-
'--n-ripple-color': '#0000',
|
|
273
|
-
'--n-text-color': mergedTextColor,
|
|
274
|
-
'--n-text-color-hover': mergedTextColor,
|
|
275
|
-
'--n-text-color-pressed': mergedTextColor,
|
|
276
|
-
'--n-text-color-focus': mergedTextColor,
|
|
277
|
-
'--n-text-color-disabled': mergedTextColor
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
else if (tertiary || quaternary) {
|
|
281
|
-
const typeColor = typeIsDefault
|
|
282
|
-
? self.textColor
|
|
283
|
-
: typeIsTertiary
|
|
284
|
-
? self.textColorTertiary
|
|
285
|
-
: self[(0, _utils_1.createKey)('color', mergedType)];
|
|
286
|
-
const mergedColor = color || typeColor;
|
|
287
|
-
if (tertiary) {
|
|
288
|
-
colorProps['--n-color'] = self.colorTertiary;
|
|
289
|
-
colorProps['--n-color-hover'] = self.colorTertiaryHover;
|
|
290
|
-
colorProps['--n-color-pressed'] = self.colorTertiaryPressed;
|
|
291
|
-
colorProps['--n-color-focus'] = self.colorSecondaryHover;
|
|
292
|
-
colorProps['--n-color-disabled'] = self.colorTertiary;
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
colorProps['--n-color'] = self.colorQuaternary;
|
|
296
|
-
colorProps['--n-color-hover'] = self.colorQuaternaryHover;
|
|
297
|
-
colorProps['--n-color-pressed'] = self.colorQuaternaryPressed;
|
|
298
|
-
colorProps['--n-color-focus'] = self.colorQuaternaryHover;
|
|
299
|
-
colorProps['--n-color-disabled'] = self.colorQuaternary;
|
|
300
|
-
}
|
|
301
|
-
colorProps['--n-ripple-color'] = '#0000';
|
|
302
|
-
colorProps['--n-text-color'] = mergedColor;
|
|
303
|
-
colorProps['--n-text-color-hover'] = mergedColor;
|
|
304
|
-
colorProps['--n-text-color-pressed'] = mergedColor;
|
|
305
|
-
colorProps['--n-text-color-focus'] = mergedColor;
|
|
306
|
-
colorProps['--n-text-color-disabled'] = mergedColor;
|
|
307
|
-
}
|
|
308
|
-
else {
|
|
309
|
-
colorProps = {
|
|
310
|
-
'--n-color': color || self[(0, _utils_1.createKey)('color', mergedType)],
|
|
311
|
-
'--n-color-hover': color
|
|
312
|
-
? (0, index_1.createHoverColor)(color)
|
|
313
|
-
: self[(0, _utils_1.createKey)('colorHover', mergedType)],
|
|
314
|
-
'--n-color-pressed': color
|
|
315
|
-
? (0, index_1.createPressedColor)(color)
|
|
316
|
-
: self[(0, _utils_1.createKey)('colorPressed', mergedType)],
|
|
317
|
-
'--n-color-focus': color
|
|
318
|
-
? (0, index_1.createHoverColor)(color)
|
|
319
|
-
: self[(0, _utils_1.createKey)('colorFocus', mergedType)],
|
|
320
|
-
'--n-color-disabled': color || self[(0, _utils_1.createKey)('colorDisabled', mergedType)],
|
|
321
|
-
'--n-ripple-color': color || self[(0, _utils_1.createKey)('rippleColor', mergedType)],
|
|
322
|
-
'--n-text-color': textColor ||
|
|
323
|
-
(color
|
|
324
|
-
? self.textColorPrimary
|
|
325
|
-
: typeIsTertiary
|
|
326
|
-
? self.textColorTertiary
|
|
327
|
-
: self[(0, _utils_1.createKey)('textColor', mergedType)]),
|
|
328
|
-
'--n-text-color-hover': textColor ||
|
|
329
|
-
(color
|
|
330
|
-
? self.textColorHoverPrimary
|
|
331
|
-
: self[(0, _utils_1.createKey)('textColorHover', mergedType)]),
|
|
332
|
-
'--n-text-color-pressed': textColor ||
|
|
333
|
-
(color
|
|
334
|
-
? self.textColorPressedPrimary
|
|
335
|
-
: self[(0, _utils_1.createKey)('textColorPressed', mergedType)]),
|
|
336
|
-
'--n-text-color-focus': textColor ||
|
|
337
|
-
(color
|
|
338
|
-
? self.textColorFocusPrimary
|
|
339
|
-
: self[(0, _utils_1.createKey)('textColorFocus', mergedType)]),
|
|
340
|
-
'--n-text-color-disabled': textColor ||
|
|
341
|
-
(color
|
|
342
|
-
? self.textColorDisabledPrimary
|
|
343
|
-
: self[(0, _utils_1.createKey)('textColorDisabled', mergedType)])
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
|
-
// border
|
|
347
|
-
let borderProps = {
|
|
348
|
-
'--n-border': 'initial',
|
|
349
|
-
'--n-border-hover': 'initial',
|
|
350
|
-
'--n-border-pressed': 'initial',
|
|
351
|
-
'--n-border-focus': 'initial',
|
|
352
|
-
'--n-border-disabled': 'initial'
|
|
353
|
-
};
|
|
354
|
-
if (text) {
|
|
355
|
-
borderProps = {
|
|
356
|
-
'--n-border': 'none',
|
|
357
|
-
'--n-border-hover': 'none',
|
|
358
|
-
'--n-border-pressed': 'none',
|
|
359
|
-
'--n-border-focus': 'none',
|
|
360
|
-
'--n-border-disabled': 'none'
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
else {
|
|
364
|
-
borderProps = {
|
|
365
|
-
'--n-border': self[(0, _utils_1.createKey)('border', mergedType)],
|
|
366
|
-
'--n-border-hover': self[(0, _utils_1.createKey)('borderHover', mergedType)],
|
|
367
|
-
'--n-border-pressed': self[(0, _utils_1.createKey)('borderPressed', mergedType)],
|
|
368
|
-
'--n-border-focus': self[(0, _utils_1.createKey)('borderFocus', mergedType)],
|
|
369
|
-
'--n-border-disabled': self[(0, _utils_1.createKey)('borderDisabled', mergedType)]
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
// size
|
|
373
|
-
const { [(0, _utils_1.createKey)('height', size)]: height, [(0, _utils_1.createKey)('fontSize', size)]: fontSize, [(0, _utils_1.createKey)('padding', size)]: padding, [(0, _utils_1.createKey)('paddingRound', size)]: paddingRound, [(0, _utils_1.createKey)('iconSize', size)]: iconSize, [(0, _utils_1.createKey)('borderRadius', size)]: borderRadius, [(0, _utils_1.createKey)('iconMargin', size)]: iconMargin, waveOpacity } = self;
|
|
374
|
-
const sizeProps = {
|
|
375
|
-
'--n-width': circle && !text ? height : 'initial',
|
|
376
|
-
'--n-height': text ? 'initial' : height,
|
|
377
|
-
'--n-font-size': fontSize,
|
|
378
|
-
'--n-padding': circle
|
|
379
|
-
? 'initial'
|
|
380
|
-
: text
|
|
381
|
-
? 'initial'
|
|
382
|
-
: round
|
|
383
|
-
? paddingRound
|
|
384
|
-
: padding,
|
|
385
|
-
'--n-icon-size': iconSize,
|
|
386
|
-
'--n-icon-margin': iconMargin,
|
|
387
|
-
'--n-border-radius': text
|
|
388
|
-
? 'initial'
|
|
389
|
-
: circle || round
|
|
390
|
-
? height
|
|
391
|
-
: borderRadius
|
|
392
|
-
};
|
|
393
|
-
return Object.assign(Object.assign(Object.assign(Object.assign({ '--n-bezier': cubicBezierEaseInOut, '--n-bezier-ease-out': cubicBezierEaseOut, '--n-ripple-duration': rippleDuration, '--n-opacity-disabled': opacityDisabled, '--n-wave-opacity': waveOpacity }, fontProps), colorProps), borderProps), sizeProps);
|
|
394
|
-
})
|
|
395
|
-
};
|
|
418
|
+
}), cssVars: disableInlineTheme ? undefined : cssVarsRef }, themeClassHandle);
|
|
396
419
|
},
|
|
397
420
|
render() {
|
|
398
|
-
const { $slots, mergedClsPrefix, tag: Component } = this;
|
|
421
|
+
const { $slots, mergedClsPrefix, tag: Component, onRender } = this;
|
|
422
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
399
423
|
return ((0, vue_1.h)(Component, { ref: "selfElRef", class: [
|
|
424
|
+
this.themeClass,
|
|
400
425
|
`${mergedClsPrefix}-button`,
|
|
401
426
|
`${mergedClsPrefix}-button--${this.type}-type`,
|
|
402
427
|
`${mergedClsPrefix}-button--${this.mergedSize}-type`,
|
|
@@ -21,7 +21,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
21
21
|
props: buttonGroupProps,
|
|
22
22
|
setup(props) {
|
|
23
23
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
24
|
-
(0, _mixins_1.useStyle)('
|
|
24
|
+
(0, _mixins_1.useStyle)('-button-group', button_group_cssr_1.default, mergedClsPrefixRef);
|
|
25
25
|
(0, vue_1.provide)(exports.buttonGroupInjectionKey, props);
|
|
26
26
|
return {
|
|
27
27
|
mergedClsPrefix: mergedClsPrefixRef
|
|
@@ -9,4 +9,4 @@ Object.defineProperty(exports, "buttonDark", { enumerable: true, get: function (
|
|
|
9
9
|
var light_1 = require("./light");
|
|
10
10
|
Object.defineProperty(exports, "buttonLight", { enumerable: true, get: function () { return __importDefault(light_1).default; } });
|
|
11
11
|
var rtl_1 = require("./rtl");
|
|
12
|
-
Object.defineProperty(exports, "buttonRtl", { enumerable: true, get: function () { return
|
|
12
|
+
Object.defineProperty(exports, "buttonRtl", { enumerable: true, get: function () { return rtl_1.buttonRtl; } });
|
package/lib/button/styles/rtl.js
CHANGED
|
@@ -3,8 +3,9 @@ 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.buttonRtl = void 0;
|
|
6
7
|
const button_rtl_cssr_1 = __importDefault(require("../src/styles/button-rtl.cssr"));
|
|
7
|
-
exports.
|
|
8
|
+
exports.buttonRtl = {
|
|
8
9
|
name: 'Button',
|
|
9
10
|
style: button_rtl_cssr_1.default
|
|
10
11
|
};
|
|
@@ -23,7 +23,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
23
23
|
props: calendarProps,
|
|
24
24
|
setup(props) {
|
|
25
25
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
26
|
-
const themeRef = (0, _mixins_1.useTheme)('Calendar', '
|
|
26
|
+
const themeRef = (0, _mixins_1.useTheme)('Calendar', '-calendar', index_cssr_1.default, styles_1.calendarLight, props, mergedClsPrefixRef);
|
|
27
27
|
const { localeRef, dateLocaleRef } = (0, _mixins_1.useLocale)('DatePicker');
|
|
28
28
|
const now = Date.now();
|
|
29
29
|
// ts => timestamp
|
package/lib/card/src/Card.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare const cardBaseProps: {
|
|
|
9
9
|
readonly title: StringConstructor;
|
|
10
10
|
readonly contentStyle: PropType<string | CSSProperties>;
|
|
11
11
|
readonly headerStyle: PropType<string | CSSProperties>;
|
|
12
|
+
readonly headerExtraStyle: PropType<string | CSSProperties>;
|
|
12
13
|
readonly footerStyle: PropType<string | CSSProperties>;
|
|
13
14
|
readonly embedded: BooleanConstructor;
|
|
14
15
|
readonly segmented: {
|
|
@@ -31,11 +32,12 @@ export declare const cardBaseProps: {
|
|
|
31
32
|
readonly role: StringConstructor;
|
|
32
33
|
readonly onClose: PropType<MaybeArray<() => void>>;
|
|
33
34
|
};
|
|
34
|
-
export declare const cardBasePropKeys: ("size" | "title" | "role" | "bordered" | "contentStyle" | "onClose" | "closable" | "hoverable" | "headerStyle" | "footerStyle" | "embedded" | "segmented")[];
|
|
35
|
+
export declare const cardBasePropKeys: ("size" | "title" | "role" | "bordered" | "contentStyle" | "onClose" | "closable" | "hoverable" | "headerStyle" | "headerExtraStyle" | "footerStyle" | "embedded" | "segmented")[];
|
|
35
36
|
declare const cardProps: {
|
|
36
37
|
title: StringConstructor;
|
|
37
38
|
contentStyle: PropType<string | CSSProperties>;
|
|
38
39
|
headerStyle: PropType<string | CSSProperties>;
|
|
40
|
+
headerExtraStyle: PropType<string | CSSProperties>;
|
|
39
41
|
footerStyle: PropType<string | CSSProperties>;
|
|
40
42
|
embedded: BooleanConstructor;
|
|
41
43
|
segmented: {
|
|
@@ -156,6 +158,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
156
158
|
title: StringConstructor;
|
|
157
159
|
contentStyle: PropType<string | CSSProperties>;
|
|
158
160
|
headerStyle: PropType<string | CSSProperties>;
|
|
161
|
+
headerExtraStyle: PropType<string | CSSProperties>;
|
|
159
162
|
footerStyle: PropType<string | CSSProperties>;
|
|
160
163
|
embedded: BooleanConstructor;
|
|
161
164
|
segmented: {
|
|
@@ -271,6 +274,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
271
274
|
closeSize: string;
|
|
272
275
|
}, any>>>;
|
|
273
276
|
}, {
|
|
277
|
+
themeClass?: import("vue").Ref<string> | undefined;
|
|
278
|
+
onRender?: (() => void) | undefined;
|
|
274
279
|
rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
275
280
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
276
281
|
mergedTheme: import("vue").ComputedRef<{
|
|
@@ -437,11 +442,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
437
442
|
'--n-font-size': string;
|
|
438
443
|
'--n-title-font-size': string;
|
|
439
444
|
'--n-close-size': string;
|
|
440
|
-
}
|
|
445
|
+
}> | undefined;
|
|
441
446
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
442
447
|
title: StringConstructor;
|
|
443
448
|
contentStyle: PropType<string | CSSProperties>;
|
|
444
449
|
headerStyle: PropType<string | CSSProperties>;
|
|
450
|
+
headerExtraStyle: PropType<string | CSSProperties>;
|
|
445
451
|
footerStyle: PropType<string | CSSProperties>;
|
|
446
452
|
embedded: BooleanConstructor;
|
|
447
453
|
segmented: {
|