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
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { cB, cM, c } from '../../../../_utils/cssr'; // vars
|
|
1
|
+
import { cB, cM, c } from '../../../../_utils/cssr'; // Note: non-prefixed color should be removed after css vars prefix migration
|
|
2
|
+
// vars:
|
|
2
3
|
// --close-color
|
|
3
4
|
// --close-color-hover
|
|
4
5
|
// --close-color-pressed
|
|
@@ -6,12 +7,12 @@ import { cB, cM, c } from '../../../../_utils/cssr'; // vars:
|
|
|
6
7
|
|
|
7
8
|
export default cB('base-close', `
|
|
8
9
|
cursor: pointer;
|
|
9
|
-
color: var(--close-color);
|
|
10
|
+
color: var(--close-color, var(--n-close-color));
|
|
10
11
|
`, [c('&:hover', {
|
|
11
|
-
color: 'var(--close-color-hover)'
|
|
12
|
+
color: 'var(--close-color-hover, var(--n-close-color))'
|
|
12
13
|
}), c('&:active', {
|
|
13
|
-
color: 'var(--close-color-pressed)'
|
|
14
|
+
color: 'var(--close-color-pressed, var(--n-close-color-pressed))'
|
|
14
15
|
}), cM('disabled', {
|
|
15
16
|
cursor: 'not-allowed!important',
|
|
16
|
-
color: 'var(--close-color-disabled)'
|
|
17
|
+
color: 'var(--close-color-disabled, var(--n-close-color-disabled))'
|
|
17
18
|
})]);
|
|
@@ -49,8 +49,13 @@ declare const scrollbarProps: {
|
|
|
49
49
|
readonly type: BooleanConstructor;
|
|
50
50
|
readonly default: false;
|
|
51
51
|
};
|
|
52
|
+
readonly showScrollbar: {
|
|
53
|
+
readonly type: BooleanConstructor;
|
|
54
|
+
readonly default: true;
|
|
55
|
+
};
|
|
52
56
|
readonly container: PropType<() => HTMLElement | null | undefined>;
|
|
53
57
|
readonly content: PropType<() => HTMLElement | null | undefined>;
|
|
58
|
+
readonly containerClass: StringConstructor;
|
|
54
59
|
readonly containerStyle: PropType<string | CSSProperties>;
|
|
55
60
|
readonly contentClass: StringConstructor;
|
|
56
61
|
readonly contentStyle: PropType<string | CSSProperties>;
|
|
@@ -92,8 +97,13 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
92
97
|
readonly type: BooleanConstructor;
|
|
93
98
|
readonly default: false;
|
|
94
99
|
};
|
|
100
|
+
readonly showScrollbar: {
|
|
101
|
+
readonly type: BooleanConstructor;
|
|
102
|
+
readonly default: true;
|
|
103
|
+
};
|
|
95
104
|
readonly container: PropType<() => HTMLElement | null | undefined>;
|
|
96
105
|
readonly content: PropType<() => HTMLElement | null | undefined>;
|
|
106
|
+
readonly containerClass: StringConstructor;
|
|
97
107
|
readonly containerStyle: PropType<string | CSSProperties>;
|
|
98
108
|
readonly contentClass: StringConstructor;
|
|
99
109
|
readonly contentStyle: PropType<string | CSSProperties>;
|
|
@@ -154,8 +164,10 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
154
164
|
readonly duration?: unknown;
|
|
155
165
|
readonly scrollable?: unknown;
|
|
156
166
|
readonly xScrollable?: unknown;
|
|
167
|
+
readonly showScrollbar?: unknown;
|
|
157
168
|
readonly container?: unknown;
|
|
158
169
|
readonly content?: unknown;
|
|
170
|
+
readonly containerClass?: unknown;
|
|
159
171
|
readonly containerStyle?: unknown;
|
|
160
172
|
readonly contentClass?: unknown;
|
|
161
173
|
readonly contentStyle?: unknown;
|
|
@@ -171,6 +183,7 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
171
183
|
} & {
|
|
172
184
|
size: number;
|
|
173
185
|
duration: number;
|
|
186
|
+
showScrollbar: boolean;
|
|
174
187
|
scrollable: boolean;
|
|
175
188
|
xScrollable: boolean;
|
|
176
189
|
} & {
|
|
@@ -189,6 +202,7 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
189
202
|
color: string;
|
|
190
203
|
colorHover: string;
|
|
191
204
|
}, any>> | undefined;
|
|
205
|
+
containerClass?: string | undefined;
|
|
192
206
|
onResize?: ((e: ResizeObserverEntry) => void) | undefined;
|
|
193
207
|
container?: (() => HTMLElement | null | undefined) | undefined;
|
|
194
208
|
containerStyle?: string | CSSProperties | undefined;
|
|
@@ -200,6 +214,7 @@ declare const Scrollbar: import("vue").DefineComponent<{
|
|
|
200
214
|
}>, {
|
|
201
215
|
size: number;
|
|
202
216
|
duration: number;
|
|
217
|
+
showScrollbar: boolean;
|
|
203
218
|
scrollable: boolean;
|
|
204
219
|
xScrollable: boolean;
|
|
205
220
|
}>;
|
|
@@ -17,9 +17,12 @@ const scrollbarProps = Object.assign(Object.assign({}, useTheme.props), { size:
|
|
|
17
17
|
}, xScrollable: {
|
|
18
18
|
type: Boolean,
|
|
19
19
|
default: false
|
|
20
|
+
}, showScrollbar: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: true
|
|
20
23
|
},
|
|
21
24
|
// If container is set, resize observer won't not attached
|
|
22
|
-
container: Function, content: Function, containerStyle: [String, Object], contentClass: String, contentStyle: [String, Object], horizontalRailStyle: [String, Object], verticalRailStyle: [String, Object], onScroll: Function, onWheel: Function, onResize: Function, internalOnUpdateScrollLeft: Function });
|
|
25
|
+
container: Function, content: Function, containerClass: String, containerStyle: [String, Object], contentClass: String, contentStyle: [String, Object], horizontalRailStyle: [String, Object], verticalRailStyle: [String, Object], onScroll: Function, onWheel: Function, onResize: Function, internalOnUpdateScrollLeft: Function });
|
|
23
26
|
const Scrollbar = defineComponent({
|
|
24
27
|
name: 'Scrollbar',
|
|
25
28
|
props: scrollbarProps,
|
|
@@ -470,7 +473,7 @@ const Scrollbar = defineComponent({
|
|
|
470
473
|
};
|
|
471
474
|
},
|
|
472
475
|
render() {
|
|
473
|
-
const { $slots, mergedClsPrefix } = this;
|
|
476
|
+
const { $slots, mergedClsPrefix, showScrollbar } = this;
|
|
474
477
|
if (!this.scrollable)
|
|
475
478
|
return renderSlot($slots, 'default');
|
|
476
479
|
const createChildren = () => h('div', mergeProps(this.$attrs, {
|
|
@@ -480,7 +483,10 @@ const Scrollbar = defineComponent({
|
|
|
480
483
|
onMouseenter: this.handleMouseEnterWrapper,
|
|
481
484
|
onMouseleave: this.handleMouseLeaveWrapper
|
|
482
485
|
}), [
|
|
483
|
-
this.container ? (renderSlot($slots, 'default')) : (h("div", { ref: "containerRef", class:
|
|
486
|
+
this.container ? (renderSlot($slots, 'default')) : (h("div", { ref: "containerRef", class: [
|
|
487
|
+
`${mergedClsPrefix}-scrollbar-container`,
|
|
488
|
+
this.containerClass
|
|
489
|
+
], style: this.containerStyle, onScroll: this.handleScroll, onWheel: this.onWheel },
|
|
484
490
|
h(VResizeObserver, { onResize: this.handleContentResize }, {
|
|
485
491
|
default: () => (h("div", { ref: "contentRef", style: [
|
|
486
492
|
{
|
|
@@ -492,20 +498,20 @@ const Scrollbar = defineComponent({
|
|
|
492
498
|
this.contentClass
|
|
493
499
|
] }, $slots))
|
|
494
500
|
}))),
|
|
495
|
-
h("div", { ref: "yRailRef", class: `${mergedClsPrefix}-scrollbar-rail ${mergedClsPrefix}-scrollbar-rail--vertical`, style: [this.horizontalRailStyle] },
|
|
501
|
+
showScrollbar && (h("div", { ref: "yRailRef", class: `${mergedClsPrefix}-scrollbar-rail ${mergedClsPrefix}-scrollbar-rail--vertical`, style: [this.horizontalRailStyle] },
|
|
496
502
|
h(Transition, { name: "fade-in-transition" }, {
|
|
497
503
|
default: () => this.needYBar && this.isShowYBar && !this.isIos ? (h("div", { class: `${mergedClsPrefix}-scrollbar-rail__scrollbar`, style: {
|
|
498
504
|
height: this.yBarSizePx,
|
|
499
505
|
top: this.yBarTopPx
|
|
500
506
|
}, onMousedown: this.handleYScrollMouseDown })) : null
|
|
501
|
-
})),
|
|
502
|
-
h("div", { ref: "xRailRef", class: `${mergedClsPrefix}-scrollbar-rail ${mergedClsPrefix}-scrollbar-rail--horizontal`, style: [this.verticalRailStyle] },
|
|
507
|
+
}))),
|
|
508
|
+
showScrollbar && (h("div", { ref: "xRailRef", class: `${mergedClsPrefix}-scrollbar-rail ${mergedClsPrefix}-scrollbar-rail--horizontal`, style: [this.verticalRailStyle] },
|
|
503
509
|
h(Transition, { name: "fade-in-transition" }, {
|
|
504
510
|
default: () => this.needXBar && this.isShowXBar && !this.isIos ? (h("div", { class: `${mergedClsPrefix}-scrollbar-rail__scrollbar`, style: {
|
|
505
511
|
width: this.xBarSizePx,
|
|
506
512
|
left: this.xBarLeftPx
|
|
507
513
|
}, onMousedown: this.handleXScrollMouseDown })) : null
|
|
508
|
-
}))
|
|
514
|
+
})))
|
|
509
515
|
]);
|
|
510
516
|
return this.container ? (createChildren()) : (h(VResizeObserver, { onResize: this.handleContainerResize }, {
|
|
511
517
|
default: createChildren
|
|
@@ -491,15 +491,17 @@ export default defineComponent({
|
|
|
491
491
|
body = (h("div", { ref: "patternInputWrapperRef", class: `${clsPrefix}-base-selection-label` },
|
|
492
492
|
h("input", Object.assign({}, this.inputProps, { ref: "patternInputRef", class: `${clsPrefix}-base-selection-input`, value: this.patternInputFocused && this.active ? this.pattern : '', placeholder: "", readonly: disabled, disabled: disabled, tabindex: -1, autofocus: this.autofocus, onFocus: this.handlePatternInputFocus, onBlur: this.handlePatternInputBlur, onInput: this.handlePatternInputInput, onCompositionstart: this.handleCompositionStart, onCompositionend: this.handleCompositionEnd })),
|
|
493
493
|
showPlaceholder ? null : this.patternInputFocused &&
|
|
494
|
-
this.active ? null : (h("div", { class: `${clsPrefix}-base-selection-label__render-label ${clsPrefix}-base-selection-overlay`, key: "input" },
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
494
|
+
this.active ? null : (h("div", { class: `${clsPrefix}-base-selection-label__render-label ${clsPrefix}-base-selection-overlay`, key: "input" },
|
|
495
|
+
h("div", { class: `${clsPrefix}-base-selection-overlay__wrapper` }, renderTag
|
|
496
|
+
? renderTag({
|
|
497
|
+
option: this.selectedOption,
|
|
498
|
+
handleClose: () => { }
|
|
499
|
+
})
|
|
500
|
+
: renderLabel
|
|
501
|
+
? renderLabel(this.selectedOption, true)
|
|
502
|
+
: render(this.label, this.selectedOption, true)))),
|
|
503
|
+
showPlaceholder ? (h("div", { class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay`, key: "placeholder" },
|
|
504
|
+
h("div", { class: `${clsPrefix}-base-selection-overlay__wrapper` }, this.filterablePlaceholder))) : null,
|
|
503
505
|
suffix));
|
|
504
506
|
}
|
|
505
507
|
else {
|
|
@@ -70,7 +70,6 @@ export default c([cB('base-selection', `
|
|
|
70
70
|
display: flex;
|
|
71
71
|
align-items: center;
|
|
72
72
|
white-space: nowrap;
|
|
73
|
-
overflow: hidden;
|
|
74
73
|
pointer-events: none;
|
|
75
74
|
position: absolute;
|
|
76
75
|
top: 0;
|
|
@@ -79,7 +78,12 @@ export default c([cB('base-selection', `
|
|
|
79
78
|
left: 0;
|
|
80
79
|
padding: var(--padding-single);
|
|
81
80
|
transition: color .3s var(--bezier);
|
|
82
|
-
|
|
81
|
+
`, [cE('wrapper', `
|
|
82
|
+
flex-basis: 0;
|
|
83
|
+
flex-grow: 1;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
text-overflow: ellipsis;
|
|
86
|
+
`)]), cB('base-selection-placeholder', `
|
|
83
87
|
color: var(--placeholder-color);
|
|
84
88
|
`), cB('base-selection-tags', `
|
|
85
89
|
cursor: pointer;
|
package/es/alert/src/Alert.d.ts
CHANGED
|
@@ -528,26 +528,26 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
528
528
|
};
|
|
529
529
|
}>;
|
|
530
530
|
cssVars: import("vue").ComputedRef<{
|
|
531
|
-
'--bezier': string;
|
|
532
|
-
'--color': string;
|
|
533
|
-
'--close-color': string;
|
|
534
|
-
'--close-color-hover': string;
|
|
535
|
-
'--close-color-pressed': string;
|
|
536
|
-
'--icon-color': string;
|
|
537
|
-
'--border': string;
|
|
538
|
-
'--title-text-color': string;
|
|
539
|
-
'--content-text-color': string;
|
|
540
|
-
'--line-height': string;
|
|
541
|
-
'--border-radius': string;
|
|
542
|
-
'--font-size': string;
|
|
543
|
-
'--title-font-weight': string;
|
|
544
|
-
'--icon-size': string;
|
|
545
|
-
'--icon-margin': string;
|
|
546
|
-
'--close-size': string;
|
|
547
|
-
'--close-margin': string;
|
|
548
|
-
'--padding': string;
|
|
549
|
-
'--icon-margin-left': string;
|
|
550
|
-
'--icon-margin-right': string;
|
|
531
|
+
'--n-bezier': string;
|
|
532
|
+
'--n-color': string;
|
|
533
|
+
'--n-close-color': string;
|
|
534
|
+
'--n-close-color-hover': string;
|
|
535
|
+
'--n-close-color-pressed': string;
|
|
536
|
+
'--n-icon-color': string;
|
|
537
|
+
'--n-border': string;
|
|
538
|
+
'--n-title-text-color': string;
|
|
539
|
+
'--n-content-text-color': string;
|
|
540
|
+
'--n-line-height': string;
|
|
541
|
+
'--n-border-radius': string;
|
|
542
|
+
'--n-font-size': string;
|
|
543
|
+
'--n-title-font-weight': string;
|
|
544
|
+
'--n-icon-size': string;
|
|
545
|
+
'--n-icon-margin': string;
|
|
546
|
+
'--n-close-size': string;
|
|
547
|
+
'--n-close-margin': string;
|
|
548
|
+
'--n-padding': string;
|
|
549
|
+
'--n-icon-margin-left': string;
|
|
550
|
+
'--n-icon-margin-right': string;
|
|
551
551
|
}>;
|
|
552
552
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
553
553
|
title?: unknown;
|
package/es/alert/src/Alert.js
CHANGED
|
@@ -44,26 +44,26 @@ export default defineComponent({
|
|
|
44
44
|
const { type } = props;
|
|
45
45
|
const { left, right } = getMargin(iconMargin);
|
|
46
46
|
return {
|
|
47
|
-
'--bezier': cubicBezierEaseInOut,
|
|
48
|
-
'--color': self[createKey('color', type)],
|
|
49
|
-
'--close-color': self[createKey('closeColor', type)],
|
|
50
|
-
'--close-color-hover': self[createKey('closeColorHover', type)],
|
|
51
|
-
'--close-color-pressed': self[createKey('closeColorPressed', type)],
|
|
52
|
-
'--icon-color': self[createKey('iconColor', type)],
|
|
53
|
-
'--border': self[createKey('border', type)],
|
|
54
|
-
'--title-text-color': self[createKey('titleTextColor', type)],
|
|
55
|
-
'--content-text-color': self[createKey('contentTextColor', type)],
|
|
56
|
-
'--line-height': lineHeight,
|
|
57
|
-
'--border-radius': borderRadius,
|
|
58
|
-
'--font-size': fontSize,
|
|
59
|
-
'--title-font-weight': titleFontWeight,
|
|
60
|
-
'--icon-size': iconSize,
|
|
61
|
-
'--icon-margin': iconMargin,
|
|
62
|
-
'--close-size': closeSize,
|
|
63
|
-
'--close-margin': closeMargin,
|
|
64
|
-
'--padding': padding,
|
|
65
|
-
'--icon-margin-left': left,
|
|
66
|
-
'--icon-margin-right': right
|
|
47
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
48
|
+
'--n-color': self[createKey('color', type)],
|
|
49
|
+
'--n-close-color': self[createKey('closeColor', type)],
|
|
50
|
+
'--n-close-color-hover': self[createKey('closeColorHover', type)],
|
|
51
|
+
'--n-close-color-pressed': self[createKey('closeColorPressed', type)],
|
|
52
|
+
'--n-icon-color': self[createKey('iconColor', type)],
|
|
53
|
+
'--n-border': self[createKey('border', type)],
|
|
54
|
+
'--n-title-text-color': self[createKey('titleTextColor', type)],
|
|
55
|
+
'--n-content-text-color': self[createKey('contentTextColor', type)],
|
|
56
|
+
'--n-line-height': lineHeight,
|
|
57
|
+
'--n-border-radius': borderRadius,
|
|
58
|
+
'--n-font-size': fontSize,
|
|
59
|
+
'--n-title-font-weight': titleFontWeight,
|
|
60
|
+
'--n-icon-size': iconSize,
|
|
61
|
+
'--n-icon-margin': iconMargin,
|
|
62
|
+
'--n-close-size': closeSize,
|
|
63
|
+
'--n-close-margin': closeMargin,
|
|
64
|
+
'--n-padding': padding,
|
|
65
|
+
'--n-icon-margin-left': left,
|
|
66
|
+
'--n-icon-margin-right': right
|
|
67
67
|
};
|
|
68
68
|
});
|
|
69
69
|
const visibleRef = ref(true);
|
|
@@ -126,9 +126,9 @@ export default defineComponent({
|
|
|
126
126
|
}
|
|
127
127
|
})))),
|
|
128
128
|
h("div", { class: `${mergedClsPrefix}-alert-body` },
|
|
129
|
-
this.title
|
|
129
|
+
this.title || $slots.header ? (h("div", { class: `${mergedClsPrefix}-alert-body__title` }, renderSlot($slots, 'header', undefined, () => [
|
|
130
130
|
this.title
|
|
131
|
-
]))),
|
|
131
|
+
]))) : null,
|
|
132
132
|
$slots.default && (h("div", { class: `${mergedClsPrefix}-alert-body__content` }, $slots))))) : null;
|
|
133
133
|
}
|
|
134
134
|
}));
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { c, cB, cE, cM } from '../../../_utils/cssr';
|
|
2
2
|
import fadeInHeightExpandTranstion from '../../../_styles/transitions/fade-in-height-expand.cssr'; // vars:
|
|
3
|
-
// --bezier
|
|
4
|
-
// --color
|
|
5
|
-
// --close-color
|
|
6
|
-
// --close-color-hover
|
|
7
|
-
// --close-color-pressed
|
|
8
|
-
// --icon-color
|
|
9
|
-
// --border
|
|
10
|
-
// --title-text-color
|
|
11
|
-
// --content-text-color
|
|
12
|
-
// --line-height
|
|
13
|
-
// --border-radius
|
|
14
|
-
// --font-size
|
|
15
|
-
// --title-font-weight
|
|
16
|
-
// --icon-size
|
|
17
|
-
// --icon-margin
|
|
18
|
-
// --close-size
|
|
19
|
-
// --close-margin
|
|
20
|
-
// --padding
|
|
21
|
-
// --icon-margin-left
|
|
22
|
-
// --icon-margin-right
|
|
3
|
+
// --n-bezier
|
|
4
|
+
// --n-color
|
|
5
|
+
// --n-close-color
|
|
6
|
+
// --n-close-color-hover
|
|
7
|
+
// --n-close-color-pressed
|
|
8
|
+
// --n-icon-color
|
|
9
|
+
// --n-border
|
|
10
|
+
// --n-title-text-color
|
|
11
|
+
// --n-content-text-color
|
|
12
|
+
// --n-line-height
|
|
13
|
+
// --n-border-radius
|
|
14
|
+
// --n-font-size
|
|
15
|
+
// --n-title-font-weight
|
|
16
|
+
// --n-icon-size
|
|
17
|
+
// --n-icon-margin
|
|
18
|
+
// --n-close-size
|
|
19
|
+
// --n-close-margin
|
|
20
|
+
// --n-padding
|
|
21
|
+
// --n-icon-margin-left
|
|
22
|
+
// --n-icon-margin-right
|
|
23
23
|
|
|
24
24
|
export default cB('alert', `
|
|
25
|
-
line-height: var(--line-height);
|
|
26
|
-
border-radius: var(--border-radius);
|
|
25
|
+
line-height: var(--n-line-height);
|
|
26
|
+
border-radius: var(--n-border-radius);
|
|
27
27
|
position: relative;
|
|
28
|
-
transition: background-color .3s var(--bezier);
|
|
29
|
-
background-color: var(--color);
|
|
28
|
+
transition: background-color .3s var(--n-bezier);
|
|
29
|
+
background-color: var(--n-color);
|
|
30
30
|
text-align: start;
|
|
31
31
|
`, [cE('icon', {
|
|
32
|
-
color: 'var(--icon-color)'
|
|
32
|
+
color: 'var(--n-icon-color)'
|
|
33
33
|
}), cB('alert-body', {
|
|
34
|
-
border: 'var(--border)',
|
|
35
|
-
padding: 'var(--padding)'
|
|
34
|
+
border: 'var(--n-border)',
|
|
35
|
+
padding: 'var(--n-padding)'
|
|
36
36
|
}, [cE('title', {
|
|
37
|
-
color: 'var(--title-text-color)'
|
|
37
|
+
color: 'var(--n-title-text-color)'
|
|
38
38
|
}), cE('content', {
|
|
39
|
-
color: 'var(--content-text-color)'
|
|
39
|
+
color: 'var(--n-content-text-color)'
|
|
40
40
|
})]), fadeInHeightExpandTranstion({
|
|
41
|
-
originalTransition: 'transform .3s var(--bezier)',
|
|
41
|
+
originalTransition: 'transform .3s var(--n-bezier)',
|
|
42
42
|
enterToProps: {
|
|
43
43
|
transform: 'scale(1)'
|
|
44
44
|
},
|
|
@@ -52,32 +52,32 @@ export default cB('alert', `
|
|
|
52
52
|
align-items: center;
|
|
53
53
|
justify-content: center;
|
|
54
54
|
display: flex;
|
|
55
|
-
width: var(--icon-size);
|
|
56
|
-
height: var(--icon-size);
|
|
57
|
-
font-size: var(--icon-size);
|
|
58
|
-
margin: var(--icon-margin);
|
|
55
|
+
width: var(--n-icon-size);
|
|
56
|
+
height: var(--n-icon-size);
|
|
57
|
+
font-size: var(--n-icon-size);
|
|
58
|
+
margin: var(--n-icon-margin);
|
|
59
59
|
`), cE('close', `
|
|
60
|
-
transition: color .3s var(--bezier);
|
|
60
|
+
transition: color .3s var(--n-bezier);
|
|
61
61
|
position: absolute;
|
|
62
62
|
right: 0;
|
|
63
63
|
top: 0;
|
|
64
|
-
margin: var(--close-margin);
|
|
65
|
-
font-size: var(--close-size);
|
|
64
|
+
margin: var(--n-close-margin);
|
|
65
|
+
font-size: var(--n-close-size);
|
|
66
66
|
`), cM('show-icon', [cB('alert-body', {
|
|
67
|
-
paddingLeft: 'calc(var(--icon-margin-left) + var(--icon-size) + var(--icon-margin-right))'
|
|
67
|
+
paddingLeft: 'calc(var(--n-icon-margin-left) + var(--n-icon-size) + var(--n-icon-margin-right))'
|
|
68
68
|
})]), cB('alert-body', `
|
|
69
|
-
border-radius: var(--border-radius);
|
|
70
|
-
transition: border-color .3s var(--bezier);
|
|
69
|
+
border-radius: var(--n-border-radius);
|
|
70
|
+
transition: border-color .3s var(--n-bezier);
|
|
71
71
|
`, [cE('title', `
|
|
72
|
-
transition: color .3s var(--bezier);
|
|
72
|
+
transition: color .3s var(--n-bezier);
|
|
73
73
|
font-size: 16px;
|
|
74
74
|
line-height: 19px;
|
|
75
|
-
font-weight: var(--title-font-weight);
|
|
75
|
+
font-weight: var(--n-title-font-weight);
|
|
76
76
|
`, [c('& +', [cE('content', {
|
|
77
77
|
marginTop: '9px'
|
|
78
78
|
})])]), cE('content', {
|
|
79
|
-
transition: 'color .3s var(--bezier)',
|
|
80
|
-
fontSize: 'var(--font-size)'
|
|
79
|
+
transition: 'color .3s var(--n-bezier)',
|
|
80
|
+
fontSize: 'var(--n-font-size)'
|
|
81
81
|
})]), cE('icon', {
|
|
82
|
-
transition: 'color .3s var(--bezier)'
|
|
82
|
+
transition: 'color .3s var(--n-bezier)'
|
|
83
83
|
})]);
|
|
@@ -17,18 +17,18 @@ export default defineComponent({
|
|
|
17
17
|
const cssVarsRef = computed(() => {
|
|
18
18
|
const { self: { railColor, linkColor, railColorActive, linkTextColor, linkTextColorHover, linkTextColorPressed, linkTextColorActive, linkFontSize, railWidth, linkPadding, borderRadius }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
19
19
|
return {
|
|
20
|
-
'--link-border-radius': borderRadius,
|
|
21
|
-
'--link-color': linkColor,
|
|
22
|
-
'--link-font-size': linkFontSize,
|
|
23
|
-
'--link-text-color': linkTextColor,
|
|
24
|
-
'--link-text-color-hover': linkTextColorHover,
|
|
25
|
-
'--link-text-color-active': linkTextColorActive,
|
|
26
|
-
'--link-text-color-pressed': linkTextColorPressed,
|
|
27
|
-
'--link-padding': linkPadding,
|
|
28
|
-
'--bezier': cubicBezierEaseInOut,
|
|
29
|
-
'--rail-color': railColor,
|
|
30
|
-
'--rail-color-active': railColorActive,
|
|
31
|
-
'--rail-width': railWidth
|
|
20
|
+
'--n-link-border-radius': borderRadius,
|
|
21
|
+
'--n-link-color': linkColor,
|
|
22
|
+
'--n-link-font-size': linkFontSize,
|
|
23
|
+
'--n-link-text-color': linkTextColor,
|
|
24
|
+
'--n-link-text-color-hover': linkTextColorHover,
|
|
25
|
+
'--n-link-text-color-active': linkTextColorActive,
|
|
26
|
+
'--n-link-text-color-pressed': linkTextColorPressed,
|
|
27
|
+
'--n-link-padding': linkPadding,
|
|
28
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
29
|
+
'--n-rail-color': railColor,
|
|
30
|
+
'--n-rail-color-active': railColorActive,
|
|
31
|
+
'--n-rail-width': railWidth
|
|
32
32
|
};
|
|
33
33
|
});
|
|
34
34
|
return {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { c, cE, cB, cM, cNotM } from '../../../_utils/cssr'; // vars:
|
|
2
|
-
// --link-color
|
|
3
|
-
// --link-font-size
|
|
4
|
-
// --link-text-color
|
|
5
|
-
// --link-text-color-hover
|
|
6
|
-
// --link-text-color-active
|
|
7
|
-
// --link-text-color-pressed
|
|
8
|
-
// --bezier
|
|
9
|
-
// --rail-color
|
|
10
|
-
// --rail-color-active
|
|
11
|
-
// --rail-width
|
|
12
|
-
// --link-padding
|
|
13
|
-
// --link-border-radius
|
|
2
|
+
// --n-link-color
|
|
3
|
+
// --n-link-font-size
|
|
4
|
+
// --n-link-text-color
|
|
5
|
+
// --n-link-text-color-hover
|
|
6
|
+
// --n-link-text-color-active
|
|
7
|
+
// --n-link-text-color-pressed
|
|
8
|
+
// --n-bezier
|
|
9
|
+
// --n-rail-color
|
|
10
|
+
// --n-rail-color-active
|
|
11
|
+
// --n-rail-width
|
|
12
|
+
// --n-link-padding
|
|
13
|
+
// --n-link-border-radius
|
|
14
14
|
|
|
15
15
|
export default cB('anchor', `
|
|
16
16
|
position: relative;
|
|
17
17
|
`, [cNotM('block', `
|
|
18
|
-
padding-left: var(--rail-width);
|
|
18
|
+
padding-left: var(--n-rail-width);
|
|
19
19
|
`, [cB('anchor-link', [c('+, >', [cB('anchor-link', `
|
|
20
20
|
margin-top: .5em;
|
|
21
21
|
`)])]), cB('anchor-link-background', `
|
|
@@ -25,56 +25,52 @@ export default cB('anchor', `
|
|
|
25
25
|
`), cNotM('show-rail', [c('>', [cB('anchor-link', 'padding-left: 0;')])])]), cM('block', [cB('anchor-link', `
|
|
26
26
|
margin-bottom: 4px;
|
|
27
27
|
padding: 2px 8px;
|
|
28
|
-
transition: background-color .3s var(--bezier);
|
|
28
|
+
transition: background-color .3s var(--n-bezier);
|
|
29
29
|
background-color: transparent;
|
|
30
|
-
border-radius: var(--link-border-radius);
|
|
30
|
+
border-radius: var(--n-link-border-radius);
|
|
31
31
|
`, [cM('active', `
|
|
32
|
-
background-color: var(--link-color);
|
|
32
|
+
background-color: var(--n-link-color);
|
|
33
33
|
`)])]), cB('anchor-link-background', `
|
|
34
34
|
position: absolute;
|
|
35
|
-
left: calc(var(--rail-width) / 2);
|
|
35
|
+
left: calc(var(--n-rail-width) / 2);
|
|
36
36
|
width: 100%;
|
|
37
|
-
background-color: var(--link-color);
|
|
37
|
+
background-color: var(--n-link-color);
|
|
38
38
|
transition:
|
|
39
|
-
top .15s var(--bezier),
|
|
40
|
-
max-width .15s var(--bezier),
|
|
41
|
-
background-color .3s var(--bezier);
|
|
39
|
+
top .15s var(--n-bezier),
|
|
40
|
+
max-width .15s var(--n-bezier),
|
|
41
|
+
background-color .3s var(--n-bezier);
|
|
42
42
|
`), cB('anchor-rail', `
|
|
43
43
|
position: absolute;
|
|
44
44
|
left: 0;
|
|
45
45
|
top: 0;
|
|
46
46
|
bottom: 0;
|
|
47
|
-
width: var(--rail-width);
|
|
48
|
-
border-radius: calc(var(--rail-width) / 2);
|
|
47
|
+
width: var(--n-rail-width);
|
|
48
|
+
border-radius: calc(var(--n-rail-width) / 2);
|
|
49
49
|
overflow: hidden;
|
|
50
|
-
transition: background-color .3s var(--bezier);
|
|
51
|
-
background-color: var(--rail-color);
|
|
50
|
+
transition: background-color .3s var(--n-bezier);
|
|
51
|
+
background-color: var(--n-rail-color);
|
|
52
52
|
`, [cE('bar', `
|
|
53
53
|
position: absolute;
|
|
54
54
|
left: 0;
|
|
55
|
-
width: var(--rail-width);
|
|
55
|
+
width: var(--n-rail-width);
|
|
56
56
|
height: 21px;
|
|
57
57
|
background-color: #0000;
|
|
58
58
|
transition:
|
|
59
|
-
top .15s var(--bezier),
|
|
60
|
-
background-color .3s var(--bezier);
|
|
59
|
+
top .15s var(--n-bezier),
|
|
60
|
+
background-color .3s var(--n-bezier);
|
|
61
61
|
`, [cM('active', {
|
|
62
|
-
backgroundColor: 'var(--rail-color-active)'
|
|
62
|
+
backgroundColor: 'var(--n-rail-color-active)'
|
|
63
63
|
})])]), cB('anchor-link', `
|
|
64
|
-
padding: var(--link-padding);
|
|
64
|
+
padding: var(--n-link-padding);
|
|
65
65
|
position: relative;
|
|
66
66
|
line-height: 1.5;
|
|
67
|
-
font-size: var(--link-font-size);
|
|
67
|
+
font-size: var(--n-link-font-size);
|
|
68
68
|
min-height: 1.5em;
|
|
69
69
|
display: flex;
|
|
70
70
|
flex-direction: column;
|
|
71
|
-
`, [cM('active', [cE('title', `
|
|
72
|
-
color: var(--link-text-color-active);
|
|
73
|
-
`)]),
|
|
74
|
-
color: var(--link-text-color-hover);
|
|
75
|
-
`)]), c('&:active', [cE('title', `
|
|
76
|
-
color: var(--link-text-color-pressed);
|
|
77
|
-
`)]), cE('title', `
|
|
71
|
+
`, [cM('active', [c('>', [cE('title', `
|
|
72
|
+
color: var(--n-link-text-color-active);
|
|
73
|
+
`)])]), cE('title', `
|
|
78
74
|
outline: none;
|
|
79
75
|
max-width: 100%;
|
|
80
76
|
text-decoration: none;
|
|
@@ -84,6 +80,10 @@ export default cB('anchor', `
|
|
|
84
80
|
cursor: pointer;
|
|
85
81
|
display: inline-block;
|
|
86
82
|
padding-right: 16px;
|
|
87
|
-
transition: color .3s var(--bezier);
|
|
88
|
-
color: var(--link-text-color);
|
|
89
|
-
`
|
|
83
|
+
transition: color .3s var(--n-bezier);
|
|
84
|
+
color: var(--n-link-text-color);
|
|
85
|
+
`, [c('&:hover, &:focus', `
|
|
86
|
+
color: var(--n-link-text-color-hover);
|
|
87
|
+
`), c('&:active', `
|
|
88
|
+
color: var(--n-link-text-color-pressed);
|
|
89
|
+
`)])])]);
|
|
@@ -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;
|