naive-ui 2.21.2 → 2.22.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/close/src/styles/index.cssr.js +6 -5
- package/es/_internal/scrollbar/src/ScrollBar.d.ts +15 -0
- package/es/_internal/scrollbar/src/ScrollBar.js +13 -7
- package/es/_internal/selection/src/Selection.js +11 -9
- package/es/_internal/selection/src/styles/index.cssr.js +6 -2
- package/es/alert/src/Alert.d.ts +20 -20
- package/es/alert/src/Alert.js +22 -22
- package/es/alert/src/styles/index.cssr.js +45 -45
- package/es/anchor/src/AnchorAdapter.js +12 -12
- package/es/anchor/src/styles/index.cssr.js +41 -41
- package/es/avatar/src/Avatar.d.ts +5 -3
- package/es/avatar/src/Avatar.js +7 -5
- package/es/avatar/src/styles/index.cssr.js +3 -5
- package/es/button/src/Button.d.ts +60 -60
- package/es/button/src/Button.js +107 -106
- package/es/button/src/styles/button.cssr.js +83 -80
- package/es/button/styles/dark.js +3 -3
- package/es/button/styles/light.d.ts +3 -3
- package/es/button/styles/light.js +1 -1
- package/es/calendar/src/Calendar.d.ts +37 -30
- package/es/calendar/styles/light.d.ts +3 -3
- package/es/cascader/src/Cascader.d.ts +135 -0
- package/es/cascader/src/Cascader.js +2 -4
- package/es/cascader/src/CascaderMenu.d.ts +345 -0
- package/es/cascader/src/CascaderMenu.js +6 -5
- package/es/cascader/src/CascaderOption.d.ts +18 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +18 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +18 -0
- package/es/cascader/styles/dark.js +3 -1
- package/es/cascader/styles/light.d.ts +13 -0
- package/es/cascader/styles/light.js +3 -1
- package/es/color-picker/src/ColorInputUnit.d.ts +3 -3
- package/es/color-picker/src/ColorPicker.d.ts +27 -27
- package/es/color-picker/styles/light.d.ts +3 -3
- package/es/config-provider/src/ConfigProvider.d.ts +21 -0
- package/es/data-table/src/DataTable.d.ts +30 -30
- package/es/data-table/src/DataTable.js +7 -14
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +3 -3
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +3 -3
- package/es/data-table/src/MainTable.js +2 -3
- package/es/data-table/src/TableParts/Body.d.ts +18 -7
- package/es/data-table/src/TableParts/Body.js +80 -28
- package/es/data-table/src/TableParts/Cell.d.ts +6 -6
- package/es/data-table/src/TableParts/Header.d.ts +3 -3
- package/es/data-table/src/TableParts/Header.js +1 -1
- package/es/data-table/src/interface.d.ts +4 -1
- package/es/data-table/src/styles/index.cssr.js +9 -12
- package/es/data-table/src/use-check.js +6 -2
- package/es/data-table/src/use-scroll.d.ts +2 -0
- package/es/data-table/src/use-scroll.js +34 -4
- package/es/data-table/src/use-table-data.js +4 -1
- package/es/data-table/styles/_common.js +1 -1
- package/es/data-table/styles/light.d.ts +3 -3
- package/es/date-picker/src/DatePicker.d.ts +94 -69
- package/es/date-picker/src/DatePicker.js +47 -20
- package/es/date-picker/src/config.d.ts +1 -9
- package/es/date-picker/src/config.js +0 -8
- package/es/date-picker/src/interface.d.ts +2 -1
- package/es/date-picker/src/panel/date.d.ts +23 -10
- package/es/date-picker/src/panel/date.js +2 -2
- package/es/date-picker/src/panel/daterange.d.ts +21 -9
- package/es/date-picker/src/panel/daterange.js +2 -2
- package/es/date-picker/src/panel/datetime.d.ts +23 -16
- package/es/date-picker/src/panel/datetime.js +2 -2
- package/es/date-picker/src/panel/datetimerange.d.ts +21 -9
- package/es/date-picker/src/panel/datetimerange.js +2 -2
- package/es/date-picker/src/panel/month.d.ts +27 -20
- package/es/date-picker/src/panel/month.js +23 -12
- package/es/date-picker/src/panel/use-calendar.d.ts +25 -43
- package/es/date-picker/src/panel/use-calendar.js +35 -18
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +21 -40
- package/es/date-picker/src/panel/use-dual-calendar.js +23 -8
- package/es/date-picker/src/panel/use-panel-common.d.ts +21 -36
- package/es/date-picker/src/panel/use-panel-common.js +2 -2
- package/es/date-picker/src/utils.d.ts +19 -3
- package/es/date-picker/src/utils.js +40 -5
- package/es/date-picker/styles/_common.d.ts +2 -0
- package/es/date-picker/styles/_common.js +3 -1
- package/es/date-picker/styles/light.d.ts +10 -6
- package/es/dialog/src/Dialog.d.ts +21 -21
- package/es/dialog/src/styles/index.cssr.js +1 -0
- package/es/dialog/styles/light.d.ts +3 -3
- package/es/dynamic-input/src/DynamicInput.d.ts +30 -30
- package/es/dynamic-input/src/InputPreset.d.ts +3 -3
- package/es/dynamic-input/src/PairPreset.d.ts +3 -3
- package/es/dynamic-input/styles/light.d.ts +3 -3
- package/es/dynamic-tags/src/DynamicTags.d.ts +30 -30
- package/es/dynamic-tags/styles/light.d.ts +3 -3
- package/es/element/index.d.ts +1 -0
- package/es/element/index.js +1 -0
- package/es/form/src/interface.d.ts +5 -4
- package/es/image/src/Image.d.ts +25 -16
- package/es/image/src/Image.js +35 -11
- package/es/image/src/ImageGroup.js +2 -2
- package/es/image/src/styles/index.cssr.js +4 -3
- package/es/input/src/Input.js +2 -0
- package/es/input/src/styles/input.cssr.js +2 -1
- package/es/input-number/src/InputNumber.d.ts +30 -30
- package/es/input-number/src/InputNumber.js +10 -5
- package/es/input-number/src/utils.d.ts +1 -0
- package/es/input-number/src/utils.js +4 -0
- package/es/input-number/styles/light.d.ts +3 -3
- package/es/locales/common/deDE.js +8 -0
- package/es/locales/common/enUS.d.ts +7 -0
- package/es/locales/common/enUS.js +8 -1
- package/es/locales/common/frFR.d.ts +3 -0
- package/es/locales/common/frFR.js +101 -0
- package/es/locales/common/idID.d.ts +2 -93
- package/es/locales/common/idID.js +8 -0
- package/es/locales/common/jaJP.js +8 -0
- package/es/locales/common/nbNO.js +8 -0
- package/es/locales/common/ruRU.js +8 -0
- package/es/locales/common/ukUA.js +8 -0
- package/es/locales/common/zhCN.js +7 -0
- package/es/locales/common/zhTW.d.ts +3 -0
- package/es/locales/common/zhTW.js +100 -0
- package/es/locales/date/frFR.d.ts +3 -0
- package/es/locales/date/frFR.js +6 -0
- package/es/locales/date/idID.d.ts +1 -6
- package/es/locales/date/zhTW.d.ts +3 -0
- package/es/locales/date/zhTW.js +6 -0
- package/es/locales/index.d.ts +4 -0
- package/es/locales/index.js +4 -0
- package/es/modal/src/BodyWrapper.d.ts +6 -6
- package/es/modal/src/Modal.d.ts +36 -36
- package/es/modal/styles/light.d.ts +3 -3
- package/es/page-header/src/PageHeader.js +3 -3
- package/es/page-header/src/styles/index.cssr.js +2 -4
- package/es/popconfirm/src/Popconfirm.d.ts +30 -30
- package/es/popconfirm/styles/light.d.ts +3 -3
- package/es/popover/src/Popover.js +4 -1
- package/es/popover/src/PopoverBody.js +3 -3
- package/es/popselect/src/Popselect.d.ts +2 -11
- package/es/popselect/src/Popselect.js +2 -2
- package/es/popselect/src/PopselectPanel.d.ts +3 -11
- package/es/popselect/src/PopselectPanel.js +17 -11
- package/es/radio/src/Radio.js +3 -3
- package/es/radio/src/RadioButton.js +4 -5
- package/es/radio/src/styles/radio-group.cssr.js +8 -4
- package/es/radio/src/styles/radio.cssr.js +8 -4
- package/es/radio/src/use-radio.d.ts +0 -3
- package/es/radio/src/use-radio.js +1 -26
- package/es/switch/src/Switch.d.ts +16 -1
- package/es/switch/src/Switch.js +17 -4
- package/es/switch/src/styles/index.cssr.js +1 -1
- package/es/tabs/src/styles/index.cssr.js +1 -0
- package/es/tag/src/styles/index.cssr.js +1 -1
- package/es/theme-editor/src/ThemeEditor.js +9 -2
- package/es/time-picker/src/Panel.d.ts +3 -3
- package/es/time-picker/src/TimePicker.d.ts +30 -30
- package/es/time-picker/styles/light.d.ts +3 -3
- package/es/transfer/src/Transfer.d.ts +30 -30
- package/es/transfer/src/TransferFilter.d.ts +3 -3
- package/es/transfer/src/TransferList.d.ts +3 -3
- package/es/transfer/src/TransferListItem.d.ts +3 -3
- package/es/transfer/styles/light.d.ts +3 -3
- package/es/tree/src/Tree.d.ts +8 -4
- package/es/tree/src/Tree.js +32 -6
- package/es/tree-select/src/TreeSelect.d.ts +38 -1
- package/es/tree-select/src/TreeSelect.js +25 -10
- package/es/tree-select/src/styles/index.cssr.js +11 -2
- package/es/tree-select/styles/light.d.ts +6 -0
- package/es/tree-select/styles/light.js +5 -2
- package/es/upload/src/Upload.d.ts +41 -30
- package/es/upload/src/Upload.js +33 -23
- package/es/upload/src/UploadFile.d.ts +4 -4
- package/es/upload/src/UploadFileList.js +4 -2
- package/es/upload/src/UploadProgress.d.ts +3 -3
- package/es/upload/src/interface.d.ts +1 -0
- package/es/upload/src/styles/index.cssr.js +2 -3
- package/es/upload/styles/light.d.ts +3 -3
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/close/src/styles/index.cssr.js +6 -5
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +15 -0
- package/lib/_internal/scrollbar/src/ScrollBar.js +13 -7
- package/lib/_internal/selection/src/Selection.js +11 -9
- package/lib/_internal/selection/src/styles/index.cssr.js +6 -2
- package/lib/alert/src/Alert.d.ts +20 -20
- package/lib/alert/src/Alert.js +22 -22
- package/lib/alert/src/styles/index.cssr.js +45 -45
- package/lib/anchor/src/AnchorAdapter.js +12 -12
- package/lib/anchor/src/styles/index.cssr.js +41 -41
- package/lib/avatar/src/Avatar.d.ts +5 -3
- package/lib/avatar/src/Avatar.js +7 -5
- package/lib/avatar/src/styles/index.cssr.js +3 -5
- package/lib/button/src/Button.d.ts +60 -60
- package/lib/button/src/Button.js +107 -106
- package/lib/button/src/styles/button.cssr.js +83 -80
- package/lib/button/styles/dark.js +3 -3
- package/lib/button/styles/light.d.ts +3 -3
- package/lib/button/styles/light.js +1 -1
- package/lib/calendar/src/Calendar.d.ts +37 -30
- package/lib/calendar/styles/light.d.ts +3 -3
- package/lib/cascader/src/Cascader.d.ts +135 -0
- package/lib/cascader/src/Cascader.js +2 -4
- package/lib/cascader/src/CascaderMenu.d.ts +345 -0
- package/lib/cascader/src/CascaderMenu.js +6 -5
- package/lib/cascader/src/CascaderOption.d.ts +18 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +18 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +18 -0
- package/lib/cascader/styles/dark.js +3 -1
- package/lib/cascader/styles/light.d.ts +13 -0
- package/lib/cascader/styles/light.js +3 -1
- package/lib/color-picker/src/ColorInputUnit.d.ts +3 -3
- package/lib/color-picker/src/ColorPicker.d.ts +27 -27
- package/lib/color-picker/styles/light.d.ts +3 -3
- package/lib/config-provider/src/ConfigProvider.d.ts +21 -0
- package/lib/data-table/src/DataTable.d.ts +30 -30
- package/lib/data-table/src/DataTable.js +6 -13
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +3 -3
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +3 -3
- package/lib/data-table/src/MainTable.js +1 -2
- package/lib/data-table/src/TableParts/Body.d.ts +18 -7
- package/lib/data-table/src/TableParts/Body.js +78 -26
- package/lib/data-table/src/TableParts/Cell.d.ts +6 -6
- package/lib/data-table/src/TableParts/Header.d.ts +3 -3
- package/lib/data-table/src/TableParts/Header.js +1 -1
- package/lib/data-table/src/interface.d.ts +4 -1
- package/lib/data-table/src/styles/index.cssr.js +9 -12
- package/lib/data-table/src/use-check.js +6 -2
- package/lib/data-table/src/use-scroll.d.ts +2 -0
- package/lib/data-table/src/use-scroll.js +34 -4
- package/lib/data-table/src/use-table-data.js +4 -1
- package/lib/data-table/styles/_common.js +1 -1
- package/lib/data-table/styles/light.d.ts +3 -3
- package/lib/date-picker/src/DatePicker.d.ts +94 -69
- package/lib/date-picker/src/DatePicker.js +46 -19
- package/lib/date-picker/src/config.d.ts +1 -9
- package/lib/date-picker/src/config.js +1 -9
- package/lib/date-picker/src/interface.d.ts +2 -1
- package/lib/date-picker/src/panel/date.d.ts +23 -10
- package/lib/date-picker/src/panel/date.js +1 -1
- package/lib/date-picker/src/panel/daterange.d.ts +21 -9
- package/lib/date-picker/src/panel/daterange.js +1 -1
- package/lib/date-picker/src/panel/datetime.d.ts +23 -16
- package/lib/date-picker/src/panel/datetime.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +21 -9
- package/lib/date-picker/src/panel/datetimerange.js +2 -2
- package/lib/date-picker/src/panel/month.d.ts +27 -20
- package/lib/date-picker/src/panel/month.js +23 -12
- package/lib/date-picker/src/panel/use-calendar.d.ts +25 -43
- package/lib/date-picker/src/panel/use-calendar.js +34 -16
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +21 -40
- package/lib/date-picker/src/panel/use-dual-calendar.js +22 -6
- package/lib/date-picker/src/panel/use-panel-common.d.ts +21 -36
- package/lib/date-picker/src/panel/use-panel-common.js +3 -2
- package/lib/date-picker/src/utils.d.ts +19 -3
- package/lib/date-picker/src/utils.js +41 -4
- package/lib/date-picker/styles/_common.d.ts +2 -0
- package/lib/date-picker/styles/_common.js +3 -1
- package/lib/date-picker/styles/light.d.ts +10 -6
- package/lib/dialog/src/Dialog.d.ts +21 -21
- package/lib/dialog/src/styles/index.cssr.js +1 -0
- package/lib/dialog/styles/light.d.ts +3 -3
- package/lib/dynamic-input/src/DynamicInput.d.ts +30 -30
- package/lib/dynamic-input/src/InputPreset.d.ts +3 -3
- package/lib/dynamic-input/src/PairPreset.d.ts +3 -3
- package/lib/dynamic-input/styles/light.d.ts +3 -3
- package/lib/dynamic-tags/src/DynamicTags.d.ts +30 -30
- package/lib/dynamic-tags/styles/light.d.ts +3 -3
- package/lib/element/index.d.ts +1 -0
- package/lib/element/index.js +3 -1
- package/lib/form/src/interface.d.ts +5 -4
- package/lib/image/src/Image.d.ts +25 -16
- package/lib/image/src/Image.js +34 -10
- package/lib/image/src/ImageGroup.js +2 -2
- package/lib/image/src/styles/index.cssr.js +3 -2
- package/lib/input/src/Input.js +2 -0
- package/lib/input/src/styles/input.cssr.js +2 -1
- package/lib/input-number/src/InputNumber.d.ts +30 -30
- package/lib/input-number/src/InputNumber.js +9 -4
- package/lib/input-number/src/utils.d.ts +1 -0
- package/lib/input-number/src/utils.js +6 -1
- package/lib/input-number/styles/light.d.ts +3 -3
- package/lib/locales/common/deDE.js +8 -0
- package/lib/locales/common/enUS.d.ts +7 -0
- package/lib/locales/common/enUS.js +8 -1
- package/lib/locales/common/frFR.d.ts +3 -0
- package/lib/locales/common/frFR.js +103 -0
- package/lib/locales/common/idID.d.ts +2 -93
- package/lib/locales/common/idID.js +8 -0
- package/lib/locales/common/jaJP.js +8 -0
- package/lib/locales/common/nbNO.js +8 -0
- package/lib/locales/common/ruRU.js +8 -0
- package/lib/locales/common/ukUA.js +8 -0
- package/lib/locales/common/zhCN.js +7 -0
- package/lib/locales/common/zhTW.d.ts +3 -0
- package/lib/locales/common/zhTW.js +102 -0
- package/lib/locales/date/frFR.d.ts +3 -0
- package/lib/locales/date/frFR.js +11 -0
- package/lib/locales/date/idID.d.ts +1 -6
- package/lib/locales/date/zhTW.d.ts +3 -0
- package/lib/locales/date/zhTW.js +11 -0
- package/lib/locales/index.d.ts +4 -0
- package/lib/locales/index.js +9 -1
- package/lib/modal/src/BodyWrapper.d.ts +6 -6
- package/lib/modal/src/Modal.d.ts +36 -36
- package/lib/modal/styles/light.d.ts +3 -3
- package/lib/page-header/src/PageHeader.js +3 -3
- package/lib/page-header/src/styles/index.cssr.js +2 -4
- package/lib/popconfirm/src/Popconfirm.d.ts +30 -30
- package/lib/popconfirm/styles/light.d.ts +3 -3
- package/lib/popover/src/Popover.js +4 -1
- package/lib/popover/src/PopoverBody.js +3 -3
- package/lib/popselect/src/Popselect.d.ts +2 -11
- package/lib/popselect/src/Popselect.js +2 -2
- package/lib/popselect/src/PopselectPanel.d.ts +3 -11
- package/lib/popselect/src/PopselectPanel.js +16 -10
- package/lib/radio/src/Radio.js +3 -3
- package/lib/radio/src/RadioButton.js +4 -5
- package/lib/radio/src/styles/radio-group.cssr.js +8 -4
- package/lib/radio/src/styles/radio.cssr.js +8 -4
- package/lib/radio/src/use-radio.d.ts +0 -3
- package/lib/radio/src/use-radio.js +1 -26
- package/lib/switch/src/Switch.d.ts +16 -1
- package/lib/switch/src/Switch.js +17 -4
- package/lib/switch/src/styles/index.cssr.js +1 -1
- package/lib/tabs/src/styles/index.cssr.js +1 -0
- package/lib/tag/src/styles/index.cssr.js +1 -1
- package/lib/theme-editor/src/ThemeEditor.js +9 -2
- package/lib/time-picker/src/Panel.d.ts +3 -3
- package/lib/time-picker/src/TimePicker.d.ts +30 -30
- package/lib/time-picker/styles/light.d.ts +3 -3
- package/lib/transfer/src/Transfer.d.ts +30 -30
- package/lib/transfer/src/TransferFilter.d.ts +3 -3
- package/lib/transfer/src/TransferList.d.ts +3 -3
- package/lib/transfer/src/TransferListItem.d.ts +3 -3
- package/lib/transfer/styles/light.d.ts +3 -3
- package/lib/tree/src/Tree.d.ts +8 -4
- package/lib/tree/src/Tree.js +32 -6
- package/lib/tree-select/src/TreeSelect.d.ts +38 -1
- package/lib/tree-select/src/TreeSelect.js +24 -9
- package/lib/tree-select/src/styles/index.cssr.js +11 -2
- package/lib/tree-select/styles/light.d.ts +6 -0
- package/lib/tree-select/styles/light.js +5 -2
- package/lib/upload/src/Upload.d.ts +41 -30
- package/lib/upload/src/Upload.js +33 -23
- package/lib/upload/src/UploadFile.d.ts +4 -4
- package/lib/upload/src/UploadFileList.js +4 -2
- package/lib/upload/src/UploadProgress.d.ts +3 -3
- package/lib/upload/src/interface.d.ts +1 -0
- package/lib/upload/src/styles/index.cssr.js +2 -3
- package/lib/upload/styles/light.d.ts +3 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +5 -4
- package/web-types.json +99 -7
|
@@ -5,24 +5,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
|
|
7
7
|
const cssr_1 = require("../../../_utils/cssr"); // vars:
|
|
8
|
-
// --link-color
|
|
9
|
-
// --link-font-size
|
|
10
|
-
// --link-text-color
|
|
11
|
-
// --link-text-color-hover
|
|
12
|
-
// --link-text-color-active
|
|
13
|
-
// --link-text-color-pressed
|
|
14
|
-
// --bezier
|
|
15
|
-
// --rail-color
|
|
16
|
-
// --rail-color-active
|
|
17
|
-
// --rail-width
|
|
18
|
-
// --link-padding
|
|
19
|
-
// --link-border-radius
|
|
8
|
+
// --n-link-color
|
|
9
|
+
// --n-link-font-size
|
|
10
|
+
// --n-link-text-color
|
|
11
|
+
// --n-link-text-color-hover
|
|
12
|
+
// --n-link-text-color-active
|
|
13
|
+
// --n-link-text-color-pressed
|
|
14
|
+
// --n-bezier
|
|
15
|
+
// --n-rail-color
|
|
16
|
+
// --n-rail-color-active
|
|
17
|
+
// --n-rail-width
|
|
18
|
+
// --n-link-padding
|
|
19
|
+
// --n-link-border-radius
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
exports.default = (0, cssr_1.cB)('anchor', `
|
|
23
23
|
position: relative;
|
|
24
24
|
`, [(0, cssr_1.cNotM)('block', `
|
|
25
|
-
padding-left: var(--rail-width);
|
|
25
|
+
padding-left: var(--n-rail-width);
|
|
26
26
|
`, [(0, cssr_1.cB)('anchor-link', [(0, cssr_1.c)('+, >', [(0, cssr_1.cB)('anchor-link', `
|
|
27
27
|
margin-top: .5em;
|
|
28
28
|
`)])]), (0, cssr_1.cB)('anchor-link-background', `
|
|
@@ -32,56 +32,52 @@ exports.default = (0, cssr_1.cB)('anchor', `
|
|
|
32
32
|
`), (0, cssr_1.cNotM)('show-rail', [(0, cssr_1.c)('>', [(0, cssr_1.cB)('anchor-link', 'padding-left: 0;')])])]), (0, cssr_1.cM)('block', [(0, cssr_1.cB)('anchor-link', `
|
|
33
33
|
margin-bottom: 4px;
|
|
34
34
|
padding: 2px 8px;
|
|
35
|
-
transition: background-color .3s var(--bezier);
|
|
35
|
+
transition: background-color .3s var(--n-bezier);
|
|
36
36
|
background-color: transparent;
|
|
37
|
-
border-radius: var(--link-border-radius);
|
|
37
|
+
border-radius: var(--n-link-border-radius);
|
|
38
38
|
`, [(0, cssr_1.cM)('active', `
|
|
39
|
-
background-color: var(--link-color);
|
|
39
|
+
background-color: var(--n-link-color);
|
|
40
40
|
`)])]), (0, cssr_1.cB)('anchor-link-background', `
|
|
41
41
|
position: absolute;
|
|
42
|
-
left: calc(var(--rail-width) / 2);
|
|
42
|
+
left: calc(var(--n-rail-width) / 2);
|
|
43
43
|
width: 100%;
|
|
44
|
-
background-color: var(--link-color);
|
|
44
|
+
background-color: var(--n-link-color);
|
|
45
45
|
transition:
|
|
46
|
-
top .15s var(--bezier),
|
|
47
|
-
max-width .15s var(--bezier),
|
|
48
|
-
background-color .3s var(--bezier);
|
|
46
|
+
top .15s var(--n-bezier),
|
|
47
|
+
max-width .15s var(--n-bezier),
|
|
48
|
+
background-color .3s var(--n-bezier);
|
|
49
49
|
`), (0, cssr_1.cB)('anchor-rail', `
|
|
50
50
|
position: absolute;
|
|
51
51
|
left: 0;
|
|
52
52
|
top: 0;
|
|
53
53
|
bottom: 0;
|
|
54
|
-
width: var(--rail-width);
|
|
55
|
-
border-radius: calc(var(--rail-width) / 2);
|
|
54
|
+
width: var(--n-rail-width);
|
|
55
|
+
border-radius: calc(var(--n-rail-width) / 2);
|
|
56
56
|
overflow: hidden;
|
|
57
|
-
transition: background-color .3s var(--bezier);
|
|
58
|
-
background-color: var(--rail-color);
|
|
57
|
+
transition: background-color .3s var(--n-bezier);
|
|
58
|
+
background-color: var(--n-rail-color);
|
|
59
59
|
`, [(0, cssr_1.cE)('bar', `
|
|
60
60
|
position: absolute;
|
|
61
61
|
left: 0;
|
|
62
|
-
width: var(--rail-width);
|
|
62
|
+
width: var(--n-rail-width);
|
|
63
63
|
height: 21px;
|
|
64
64
|
background-color: #0000;
|
|
65
65
|
transition:
|
|
66
|
-
top .15s var(--bezier),
|
|
67
|
-
background-color .3s var(--bezier);
|
|
66
|
+
top .15s var(--n-bezier),
|
|
67
|
+
background-color .3s var(--n-bezier);
|
|
68
68
|
`, [(0, cssr_1.cM)('active', {
|
|
69
|
-
backgroundColor: 'var(--rail-color-active)'
|
|
69
|
+
backgroundColor: 'var(--n-rail-color-active)'
|
|
70
70
|
})])]), (0, cssr_1.cB)('anchor-link', `
|
|
71
|
-
padding: var(--link-padding);
|
|
71
|
+
padding: var(--n-link-padding);
|
|
72
72
|
position: relative;
|
|
73
73
|
line-height: 1.5;
|
|
74
|
-
font-size: var(--link-font-size);
|
|
74
|
+
font-size: var(--n-link-font-size);
|
|
75
75
|
min-height: 1.5em;
|
|
76
76
|
display: flex;
|
|
77
77
|
flex-direction: column;
|
|
78
|
-
`, [(0, cssr_1.cM)('active', [(0, cssr_1.cE)('title', `
|
|
79
|
-
color: var(--link-text-color-active);
|
|
80
|
-
`)])
|
|
81
|
-
color: var(--link-text-color-hover);
|
|
82
|
-
`)]), (0, cssr_1.c)('&:active', [(0, cssr_1.cE)('title', `
|
|
83
|
-
color: var(--link-text-color-pressed);
|
|
84
|
-
`)]), (0, cssr_1.cE)('title', `
|
|
78
|
+
`, [(0, cssr_1.cM)('active', [(0, cssr_1.c)('>', [(0, cssr_1.cE)('title', `
|
|
79
|
+
color: var(--n-link-text-color-active);
|
|
80
|
+
`)])]), (0, cssr_1.cE)('title', `
|
|
85
81
|
outline: none;
|
|
86
82
|
max-width: 100%;
|
|
87
83
|
text-decoration: none;
|
|
@@ -91,6 +87,10 @@ exports.default = (0, cssr_1.cB)('anchor', `
|
|
|
91
87
|
cursor: pointer;
|
|
92
88
|
display: inline-block;
|
|
93
89
|
padding-right: 16px;
|
|
94
|
-
transition: color .3s var(--bezier);
|
|
95
|
-
color: var(--link-text-color);
|
|
96
|
-
`
|
|
90
|
+
transition: color .3s var(--n-bezier);
|
|
91
|
+
color: var(--n-link-text-color);
|
|
92
|
+
`, [(0, cssr_1.c)('&:hover, &:focus', `
|
|
93
|
+
color: var(--n-link-text-color-hover);
|
|
94
|
+
`), (0, cssr_1.c)('&:active', `
|
|
95
|
+
color: var(--n-link-text-color-pressed);
|
|
96
|
+
`)])])]);
|
|
@@ -7,7 +7,6 @@ declare const avatarProps: {
|
|
|
7
7
|
};
|
|
8
8
|
readonly src: StringConstructor;
|
|
9
9
|
readonly circle: BooleanConstructor;
|
|
10
|
-
readonly color: StringConstructor;
|
|
11
10
|
readonly objectFit: {
|
|
12
11
|
readonly type: PropType<"fill" | "none" | "contain" | "cover" | "scale-down">;
|
|
13
12
|
readonly default: "fill";
|
|
@@ -15,6 +14,8 @@ declare const avatarProps: {
|
|
|
15
14
|
readonly round: BooleanConstructor;
|
|
16
15
|
readonly onError: PropType<(e: Event) => void>;
|
|
17
16
|
readonly fallbackSrc: StringConstructor;
|
|
17
|
+
/** @deprecated */
|
|
18
|
+
readonly color: StringConstructor;
|
|
18
19
|
readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
|
|
19
20
|
borderRadius: string;
|
|
20
21
|
fontSize: string;
|
|
@@ -54,7 +55,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
55
|
};
|
|
55
56
|
readonly src: StringConstructor;
|
|
56
57
|
readonly circle: BooleanConstructor;
|
|
57
|
-
readonly color: StringConstructor;
|
|
58
58
|
readonly objectFit: {
|
|
59
59
|
readonly type: PropType<"fill" | "none" | "contain" | "cover" | "scale-down">;
|
|
60
60
|
readonly default: "fill";
|
|
@@ -62,6 +62,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
62
62
|
readonly round: BooleanConstructor;
|
|
63
63
|
readonly onError: PropType<(e: Event) => void>;
|
|
64
64
|
readonly fallbackSrc: StringConstructor;
|
|
65
|
+
/** @deprecated */
|
|
66
|
+
readonly color: StringConstructor;
|
|
65
67
|
readonly theme: PropType<import("../../_mixins").Theme<"Avatar", {
|
|
66
68
|
borderRadius: string;
|
|
67
69
|
fontSize: string;
|
|
@@ -111,11 +113,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
111
113
|
readonly size?: unknown;
|
|
112
114
|
readonly src?: unknown;
|
|
113
115
|
readonly circle?: unknown;
|
|
114
|
-
readonly color?: unknown;
|
|
115
116
|
readonly objectFit?: unknown;
|
|
116
117
|
readonly round?: unknown;
|
|
117
118
|
readonly onError?: unknown;
|
|
118
119
|
readonly fallbackSrc?: unknown;
|
|
120
|
+
readonly color?: unknown;
|
|
119
121
|
readonly theme?: unknown;
|
|
120
122
|
readonly themeOverrides?: unknown;
|
|
121
123
|
readonly builtinThemeOverrides?: unknown;
|
package/lib/avatar/src/Avatar.js
CHANGED
|
@@ -13,10 +13,12 @@ const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
|
13
13
|
const avatarProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { size: {
|
|
14
14
|
type: [String, Number],
|
|
15
15
|
default: 'medium'
|
|
16
|
-
}, src: String, circle: Boolean,
|
|
16
|
+
}, src: String, circle: Boolean, objectFit: {
|
|
17
17
|
type: String,
|
|
18
18
|
default: 'fill'
|
|
19
|
-
}, round: Boolean, onError: Function, fallbackSrc: String
|
|
19
|
+
}, round: Boolean, onError: Function, fallbackSrc: String,
|
|
20
|
+
/** @deprecated */
|
|
21
|
+
color: String });
|
|
20
22
|
exports.default = (0, vue_1.defineComponent)({
|
|
21
23
|
name: 'Avatar',
|
|
22
24
|
props: avatarProps,
|
|
@@ -67,7 +69,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
67
69
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
68
70
|
fitTextTransform,
|
|
69
71
|
cssVars: (0, vue_1.computed)(() => {
|
|
70
|
-
const { size } = props;
|
|
72
|
+
const { size, color: propColor } = props;
|
|
71
73
|
const { self: { borderRadius, fontSize, color }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
72
74
|
let height;
|
|
73
75
|
if (typeof size === 'number') {
|
|
@@ -79,7 +81,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
79
81
|
return {
|
|
80
82
|
'--font-size': fontSize,
|
|
81
83
|
'--border-radius': mergedRoundRef.value ? '50%' : borderRadius,
|
|
82
|
-
'--color': color,
|
|
84
|
+
'--color': propColor || color,
|
|
83
85
|
'--bezier': cubicBezierEaseInOut,
|
|
84
86
|
'--merged-size': `var(--avatar-size-override, ${height})`
|
|
85
87
|
};
|
|
@@ -96,7 +98,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
96
98
|
}
|
|
97
99
|
else if (!(!$slots.default && src)) {
|
|
98
100
|
img = ((0, vue_1.h)(vueuc_1.VResizeObserver, { onResize: this.fitTextTransform }, {
|
|
99
|
-
default: () => ((0, vue_1.h)("span", { ref: "textRef", class: `${mergedClsPrefix}-avatar__text
|
|
101
|
+
default: () => ((0, vue_1.h)("span", { ref: "textRef", class: `${mergedClsPrefix}-avatar__text` }, $slots))
|
|
100
102
|
}));
|
|
101
103
|
}
|
|
102
104
|
else {
|
|
@@ -9,7 +9,7 @@ const cssr_1 = require("../../../_utils/cssr"); // vars:
|
|
|
9
9
|
// --border-radius
|
|
10
10
|
// --color
|
|
11
11
|
// --bezier
|
|
12
|
-
// --size
|
|
12
|
+
// --merged-size
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
exports.default = (0, cssr_1.cB)('avatar', `
|
|
@@ -37,7 +37,5 @@ exports.default = (0, cssr_1.cB)('avatar', `
|
|
|
37
37
|
top: 50%;
|
|
38
38
|
`), (0, cssr_1.cB)('icon', `
|
|
39
39
|
vertical-align: bottom;
|
|
40
|
-
font-size: var(--size);
|
|
41
|
-
`), (0, cssr_1.cE)('text',
|
|
42
|
-
lineHeight: 1.25
|
|
43
|
-
})]);
|
|
40
|
+
font-size: calc(var(--merged-size) - 6px);
|
|
41
|
+
`), (0, cssr_1.cE)('text', 'line-height: 1.25')]);
|
|
@@ -60,9 +60,9 @@ declare const buttonProps: {
|
|
|
60
60
|
fontSizeMedium: string;
|
|
61
61
|
fontSizeLarge: string;
|
|
62
62
|
opacityDisabled: string;
|
|
63
|
-
colorOpacitySecondary:
|
|
64
|
-
colorOpacitySecondaryHover:
|
|
65
|
-
colorOpacitySecondaryPressed:
|
|
63
|
+
colorOpacitySecondary: string;
|
|
64
|
+
colorOpacitySecondaryHover: string;
|
|
65
|
+
colorOpacitySecondaryPressed: string;
|
|
66
66
|
colorSecondary: string;
|
|
67
67
|
colorSecondaryHover: string;
|
|
68
68
|
colorSecondaryPressed: string;
|
|
@@ -264,9 +264,9 @@ declare const buttonProps: {
|
|
|
264
264
|
fontSizeMedium: string;
|
|
265
265
|
fontSizeLarge: string;
|
|
266
266
|
opacityDisabled: string;
|
|
267
|
-
colorOpacitySecondary:
|
|
268
|
-
colorOpacitySecondaryHover:
|
|
269
|
-
colorOpacitySecondaryPressed:
|
|
267
|
+
colorOpacitySecondary: string;
|
|
268
|
+
colorOpacitySecondaryHover: string;
|
|
269
|
+
colorOpacitySecondaryPressed: string;
|
|
270
270
|
colorSecondary: string;
|
|
271
271
|
colorSecondaryHover: string;
|
|
272
272
|
colorSecondaryPressed: string;
|
|
@@ -468,9 +468,9 @@ declare const buttonProps: {
|
|
|
468
468
|
fontSizeMedium: string;
|
|
469
469
|
fontSizeLarge: string;
|
|
470
470
|
opacityDisabled: string;
|
|
471
|
-
colorOpacitySecondary:
|
|
472
|
-
colorOpacitySecondaryHover:
|
|
473
|
-
colorOpacitySecondaryPressed:
|
|
471
|
+
colorOpacitySecondary: string;
|
|
472
|
+
colorOpacitySecondaryHover: string;
|
|
473
|
+
colorOpacitySecondaryPressed: string;
|
|
474
474
|
colorSecondary: string;
|
|
475
475
|
colorSecondaryHover: string;
|
|
476
476
|
colorSecondaryPressed: string;
|
|
@@ -719,9 +719,9 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
719
719
|
fontSizeMedium: string;
|
|
720
720
|
fontSizeLarge: string;
|
|
721
721
|
opacityDisabled: string;
|
|
722
|
-
colorOpacitySecondary:
|
|
723
|
-
colorOpacitySecondaryHover:
|
|
724
|
-
colorOpacitySecondaryPressed:
|
|
722
|
+
colorOpacitySecondary: string;
|
|
723
|
+
colorOpacitySecondaryHover: string;
|
|
724
|
+
colorOpacitySecondaryPressed: string;
|
|
725
725
|
colorSecondary: string;
|
|
726
726
|
colorSecondaryHover: string;
|
|
727
727
|
colorSecondaryPressed: string;
|
|
@@ -923,9 +923,9 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
923
923
|
fontSizeMedium: string;
|
|
924
924
|
fontSizeLarge: string;
|
|
925
925
|
opacityDisabled: string;
|
|
926
|
-
colorOpacitySecondary:
|
|
927
|
-
colorOpacitySecondaryHover:
|
|
928
|
-
colorOpacitySecondaryPressed:
|
|
926
|
+
colorOpacitySecondary: string;
|
|
927
|
+
colorOpacitySecondaryHover: string;
|
|
928
|
+
colorOpacitySecondaryPressed: string;
|
|
929
929
|
colorSecondary: string;
|
|
930
930
|
colorSecondaryHover: string;
|
|
931
931
|
colorSecondaryPressed: string;
|
|
@@ -1127,9 +1127,9 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
1127
1127
|
fontSizeMedium: string;
|
|
1128
1128
|
fontSizeLarge: string;
|
|
1129
1129
|
opacityDisabled: string;
|
|
1130
|
-
colorOpacitySecondary:
|
|
1131
|
-
colorOpacitySecondaryHover:
|
|
1132
|
-
colorOpacitySecondaryPressed:
|
|
1130
|
+
colorOpacitySecondary: string;
|
|
1131
|
+
colorOpacitySecondaryHover: string;
|
|
1132
|
+
colorOpacitySecondaryPressed: string;
|
|
1133
1133
|
colorSecondary: string;
|
|
1134
1134
|
colorSecondaryHover: string;
|
|
1135
1135
|
colorSecondaryPressed: string;
|
|
@@ -1334,42 +1334,42 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
1334
1334
|
handleKeyup: (e: KeyboardEvent) => void;
|
|
1335
1335
|
handleClick: (e: MouseEvent) => void;
|
|
1336
1336
|
customColorCssVars: import("vue").ComputedRef<{
|
|
1337
|
-
'--border-color': string;
|
|
1338
|
-
'--border-color-hover': string;
|
|
1339
|
-
'--border-color-pressed': string;
|
|
1340
|
-
'--border-color-focus': string;
|
|
1341
|
-
'--border-color-disabled': string;
|
|
1337
|
+
'--n-border-color': string;
|
|
1338
|
+
'--n-border-color-hover': string;
|
|
1339
|
+
'--n-border-color-pressed': string;
|
|
1340
|
+
'--n-border-color-focus': string;
|
|
1341
|
+
'--n-border-color-disabled': string;
|
|
1342
1342
|
} | null>;
|
|
1343
1343
|
cssVars: import("vue").ComputedRef<{
|
|
1344
|
-
'--width': string;
|
|
1345
|
-
'--height': string;
|
|
1346
|
-
'--font-size': string;
|
|
1347
|
-
'--padding': string;
|
|
1348
|
-
'--icon-size': string;
|
|
1349
|
-
'--icon-margin': string;
|
|
1350
|
-
'--border-radius': string;
|
|
1351
|
-
'--border': string;
|
|
1352
|
-
'--border-hover': string;
|
|
1353
|
-
'--border-pressed': string;
|
|
1354
|
-
'--border-focus': string;
|
|
1355
|
-
'--border-disabled': string;
|
|
1356
|
-
'--color': string;
|
|
1357
|
-
'--color-hover': string;
|
|
1358
|
-
'--color-pressed': string;
|
|
1359
|
-
'--color-focus': string;
|
|
1360
|
-
'--color-disabled': string;
|
|
1361
|
-
'--ripple-color': string;
|
|
1362
|
-
'--text-color': string;
|
|
1363
|
-
'--text-color-hover': string;
|
|
1364
|
-
'--text-color-pressed': string;
|
|
1365
|
-
'--text-color-focus': string;
|
|
1366
|
-
'--text-color-disabled': string;
|
|
1344
|
+
'--n-width': string;
|
|
1345
|
+
'--n-height': string;
|
|
1346
|
+
'--n-font-size': string;
|
|
1347
|
+
'--n-padding': string;
|
|
1348
|
+
'--n-icon-size': string;
|
|
1349
|
+
'--n-icon-margin': string;
|
|
1350
|
+
'--n-border-radius': string;
|
|
1351
|
+
'--n-border': string;
|
|
1352
|
+
'--n-border-hover': string;
|
|
1353
|
+
'--n-border-pressed': string;
|
|
1354
|
+
'--n-border-focus': string;
|
|
1355
|
+
'--n-border-disabled': string;
|
|
1356
|
+
'--n-color': string;
|
|
1357
|
+
'--n-color-hover': string;
|
|
1358
|
+
'--n-color-pressed': string;
|
|
1359
|
+
'--n-color-focus': string;
|
|
1360
|
+
'--n-color-disabled': string;
|
|
1361
|
+
'--n-ripple-color': string;
|
|
1362
|
+
'--n-text-color': string;
|
|
1363
|
+
'--n-text-color-hover': string;
|
|
1364
|
+
'--n-text-color-pressed': string;
|
|
1365
|
+
'--n-text-color-focus': string;
|
|
1366
|
+
'--n-text-color-disabled': string;
|
|
1367
1367
|
fontWeight: string;
|
|
1368
|
-
'--bezier': string;
|
|
1369
|
-
'--bezier-ease-out': string;
|
|
1370
|
-
'--ripple-duration': string;
|
|
1371
|
-
'--opacity-disabled': string;
|
|
1372
|
-
'--wave-opacity': string;
|
|
1368
|
+
'--n-bezier': string;
|
|
1369
|
+
'--n-bezier-ease-out': string;
|
|
1370
|
+
'--n-ripple-duration': string;
|
|
1371
|
+
'--n-opacity-disabled': string;
|
|
1372
|
+
'--n-wave-opacity': string;
|
|
1373
1373
|
}>;
|
|
1374
1374
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
1375
1375
|
readonly color?: unknown;
|
|
@@ -1436,9 +1436,9 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
1436
1436
|
fontSizeMedium: string;
|
|
1437
1437
|
fontSizeLarge: string;
|
|
1438
1438
|
opacityDisabled: string;
|
|
1439
|
-
colorOpacitySecondary:
|
|
1440
|
-
colorOpacitySecondaryHover:
|
|
1441
|
-
colorOpacitySecondaryPressed:
|
|
1439
|
+
colorOpacitySecondary: string;
|
|
1440
|
+
colorOpacitySecondaryHover: string;
|
|
1441
|
+
colorOpacitySecondaryPressed: string;
|
|
1442
1442
|
colorSecondary: string;
|
|
1443
1443
|
colorSecondaryHover: string;
|
|
1444
1444
|
colorSecondaryPressed: string;
|
|
@@ -1640,9 +1640,9 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
1640
1640
|
fontSizeMedium: string;
|
|
1641
1641
|
fontSizeLarge: string;
|
|
1642
1642
|
opacityDisabled: string;
|
|
1643
|
-
colorOpacitySecondary:
|
|
1644
|
-
colorOpacitySecondaryHover:
|
|
1645
|
-
colorOpacitySecondaryPressed:
|
|
1643
|
+
colorOpacitySecondary: string;
|
|
1644
|
+
colorOpacitySecondaryHover: string;
|
|
1645
|
+
colorOpacitySecondaryPressed: string;
|
|
1646
1646
|
colorSecondary: string;
|
|
1647
1647
|
colorSecondaryHover: string;
|
|
1648
1648
|
colorSecondaryPressed: string;
|
|
@@ -1844,9 +1844,9 @@ declare const Button: import("vue").DefineComponent<{
|
|
|
1844
1844
|
fontSizeMedium: string;
|
|
1845
1845
|
fontSizeLarge: string;
|
|
1846
1846
|
opacityDisabled: string;
|
|
1847
|
-
colorOpacitySecondary:
|
|
1848
|
-
colorOpacitySecondaryHover:
|
|
1849
|
-
colorOpacitySecondaryPressed:
|
|
1847
|
+
colorOpacitySecondary: string;
|
|
1848
|
+
colorOpacitySecondaryHover: string;
|
|
1849
|
+
colorOpacitySecondaryPressed: string;
|
|
1850
1850
|
colorSecondary: string;
|
|
1851
1851
|
colorSecondaryHover: string;
|
|
1852
1852
|
colorSecondaryPressed: string;
|