naive-ui 2.21.5 → 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.
Files changed (214) hide show
  1. package/es/_internal/close/src/styles/index.cssr.js +6 -5
  2. package/es/_internal/scrollbar/src/ScrollBar.d.ts +15 -0
  3. package/es/_internal/scrollbar/src/ScrollBar.js +13 -7
  4. package/es/_internal/selection/src/Selection.js +11 -9
  5. package/es/_internal/selection/src/styles/index.cssr.js +6 -2
  6. package/es/alert/src/Alert.d.ts +20 -20
  7. package/es/alert/src/Alert.js +22 -22
  8. package/es/alert/src/styles/index.cssr.js +45 -45
  9. package/es/anchor/src/AnchorAdapter.js +12 -12
  10. package/es/anchor/src/styles/index.cssr.js +41 -41
  11. package/es/avatar/src/Avatar.d.ts +5 -3
  12. package/es/avatar/src/Avatar.js +7 -5
  13. package/es/avatar/src/styles/index.cssr.js +3 -5
  14. package/es/button/src/Button.d.ts +33 -33
  15. package/es/button/src/Button.js +103 -102
  16. package/es/button/src/styles/button.cssr.js +83 -80
  17. package/es/button/styles/light.js +1 -1
  18. package/es/calendar/src/Calendar.d.ts +2 -0
  19. package/es/cascader/src/Cascader.d.ts +135 -0
  20. package/es/cascader/src/Cascader.js +2 -4
  21. package/es/cascader/src/CascaderMenu.d.ts +345 -0
  22. package/es/cascader/src/CascaderMenu.js +6 -5
  23. package/es/cascader/src/CascaderOption.d.ts +18 -0
  24. package/es/cascader/src/CascaderSelectMenu.d.ts +18 -0
  25. package/es/cascader/src/CascaderSubmenu.d.ts +18 -0
  26. package/es/cascader/styles/dark.js +3 -1
  27. package/es/cascader/styles/light.d.ts +13 -0
  28. package/es/cascader/styles/light.js +3 -1
  29. package/es/config-provider/src/ConfigProvider.d.ts +6 -0
  30. package/es/data-table/src/DataTable.js +7 -13
  31. package/es/data-table/src/MainTable.js +2 -3
  32. package/es/data-table/src/TableParts/Body.d.ts +15 -4
  33. package/es/data-table/src/TableParts/Body.js +80 -28
  34. package/es/data-table/src/TableParts/Header.js +1 -1
  35. package/es/data-table/src/interface.d.ts +4 -1
  36. package/es/data-table/src/styles/index.cssr.js +4 -3
  37. package/es/data-table/src/use-check.js +6 -2
  38. package/es/data-table/src/use-scroll.d.ts +2 -0
  39. package/es/data-table/src/use-scroll.js +34 -4
  40. package/es/data-table/src/use-table-data.js +3 -1
  41. package/es/data-table/styles/_common.js +1 -1
  42. package/es/date-picker/src/DatePicker.d.ts +25 -1
  43. package/es/date-picker/src/DatePicker.js +16 -7
  44. package/es/date-picker/src/config.d.ts +1 -1
  45. package/es/date-picker/src/interface.d.ts +2 -1
  46. package/es/date-picker/src/panel/date.d.ts +9 -1
  47. package/es/date-picker/src/panel/date.js +2 -2
  48. package/es/date-picker/src/panel/daterange.d.ts +7 -0
  49. package/es/date-picker/src/panel/daterange.js +2 -2
  50. package/es/date-picker/src/panel/datetime.d.ts +9 -7
  51. package/es/date-picker/src/panel/datetime.js +2 -2
  52. package/es/date-picker/src/panel/datetimerange.d.ts +7 -0
  53. package/es/date-picker/src/panel/datetimerange.js +2 -2
  54. package/es/date-picker/src/panel/month.d.ts +13 -11
  55. package/es/date-picker/src/panel/month.js +23 -12
  56. package/es/date-picker/src/panel/use-calendar.d.ts +11 -34
  57. package/es/date-picker/src/panel/use-calendar.js +35 -18
  58. package/es/date-picker/src/panel/use-dual-calendar.d.ts +7 -31
  59. package/es/date-picker/src/panel/use-dual-calendar.js +23 -8
  60. package/es/date-picker/src/panel/use-panel-common.d.ts +7 -27
  61. package/es/date-picker/src/panel/use-panel-common.js +2 -2
  62. package/es/date-picker/src/utils.d.ts +19 -3
  63. package/es/date-picker/src/utils.js +40 -5
  64. package/es/date-picker/styles/_common.d.ts +2 -0
  65. package/es/date-picker/styles/_common.js +3 -1
  66. package/es/date-picker/styles/light.d.ts +4 -0
  67. package/es/image/src/Image.js +8 -12
  68. package/es/locales/common/deDE.js +2 -0
  69. package/es/locales/common/enUS.d.ts +2 -0
  70. package/es/locales/common/enUS.js +2 -0
  71. package/es/locales/common/frFR.js +3 -0
  72. package/es/locales/common/idID.js +2 -0
  73. package/es/locales/common/jaJP.js +2 -0
  74. package/es/locales/common/nbNO.js +2 -0
  75. package/es/locales/common/ruRU.js +2 -0
  76. package/es/locales/common/ukUA.js +2 -0
  77. package/es/locales/common/zhCN.js +2 -0
  78. package/es/locales/common/zhTW.d.ts +3 -0
  79. package/es/locales/common/zhTW.js +100 -0
  80. package/es/locales/date/zhTW.d.ts +3 -0
  81. package/es/locales/date/zhTW.js +6 -0
  82. package/es/locales/index.d.ts +2 -0
  83. package/es/locales/index.js +2 -0
  84. package/es/page-header/src/PageHeader.js +3 -3
  85. package/es/page-header/src/styles/index.cssr.js +2 -4
  86. package/es/popover/src/Popover.js +4 -1
  87. package/es/popover/src/PopoverBody.js +3 -3
  88. package/es/popselect/src/Popselect.d.ts +2 -11
  89. package/es/popselect/src/Popselect.js +2 -2
  90. package/es/popselect/src/PopselectPanel.d.ts +3 -11
  91. package/es/popselect/src/PopselectPanel.js +17 -11
  92. package/es/radio/src/Radio.js +3 -3
  93. package/es/radio/src/RadioButton.js +4 -5
  94. package/es/radio/src/styles/radio-group.cssr.js +8 -4
  95. package/es/radio/src/styles/radio.cssr.js +8 -4
  96. package/es/radio/src/use-radio.d.ts +0 -3
  97. package/es/radio/src/use-radio.js +1 -26
  98. package/es/tabs/src/styles/index.cssr.js +1 -0
  99. package/es/tag/src/styles/index.cssr.js +1 -1
  100. package/es/tree-select/src/TreeSelect.d.ts +38 -1
  101. package/es/tree-select/src/TreeSelect.js +25 -10
  102. package/es/tree-select/src/styles/index.cssr.js +11 -2
  103. package/es/tree-select/styles/light.d.ts +6 -0
  104. package/es/tree-select/styles/light.js +5 -2
  105. package/es/version.d.ts +1 -1
  106. package/es/version.js +1 -1
  107. package/lib/_internal/close/src/styles/index.cssr.js +6 -5
  108. package/lib/_internal/scrollbar/src/ScrollBar.d.ts +15 -0
  109. package/lib/_internal/scrollbar/src/ScrollBar.js +13 -7
  110. package/lib/_internal/selection/src/Selection.js +11 -9
  111. package/lib/_internal/selection/src/styles/index.cssr.js +6 -2
  112. package/lib/alert/src/Alert.d.ts +20 -20
  113. package/lib/alert/src/Alert.js +22 -22
  114. package/lib/alert/src/styles/index.cssr.js +45 -45
  115. package/lib/anchor/src/AnchorAdapter.js +12 -12
  116. package/lib/anchor/src/styles/index.cssr.js +41 -41
  117. package/lib/avatar/src/Avatar.d.ts +5 -3
  118. package/lib/avatar/src/Avatar.js +7 -5
  119. package/lib/avatar/src/styles/index.cssr.js +3 -5
  120. package/lib/button/src/Button.d.ts +33 -33
  121. package/lib/button/src/Button.js +103 -102
  122. package/lib/button/src/styles/button.cssr.js +83 -80
  123. package/lib/button/styles/light.js +1 -1
  124. package/lib/calendar/src/Calendar.d.ts +2 -0
  125. package/lib/cascader/src/Cascader.d.ts +135 -0
  126. package/lib/cascader/src/Cascader.js +2 -4
  127. package/lib/cascader/src/CascaderMenu.d.ts +345 -0
  128. package/lib/cascader/src/CascaderMenu.js +6 -5
  129. package/lib/cascader/src/CascaderOption.d.ts +18 -0
  130. package/lib/cascader/src/CascaderSelectMenu.d.ts +18 -0
  131. package/lib/cascader/src/CascaderSubmenu.d.ts +18 -0
  132. package/lib/cascader/styles/dark.js +3 -1
  133. package/lib/cascader/styles/light.d.ts +13 -0
  134. package/lib/cascader/styles/light.js +3 -1
  135. package/lib/config-provider/src/ConfigProvider.d.ts +6 -0
  136. package/lib/data-table/src/DataTable.js +6 -12
  137. package/lib/data-table/src/MainTable.js +1 -2
  138. package/lib/data-table/src/TableParts/Body.d.ts +15 -4
  139. package/lib/data-table/src/TableParts/Body.js +78 -26
  140. package/lib/data-table/src/TableParts/Header.js +1 -1
  141. package/lib/data-table/src/interface.d.ts +4 -1
  142. package/lib/data-table/src/styles/index.cssr.js +4 -3
  143. package/lib/data-table/src/use-check.js +6 -2
  144. package/lib/data-table/src/use-scroll.d.ts +2 -0
  145. package/lib/data-table/src/use-scroll.js +34 -4
  146. package/lib/data-table/src/use-table-data.js +3 -1
  147. package/lib/data-table/styles/_common.js +1 -1
  148. package/lib/date-picker/src/DatePicker.d.ts +25 -1
  149. package/lib/date-picker/src/DatePicker.js +16 -7
  150. package/lib/date-picker/src/config.d.ts +1 -1
  151. package/lib/date-picker/src/interface.d.ts +2 -1
  152. package/lib/date-picker/src/panel/date.d.ts +9 -1
  153. package/lib/date-picker/src/panel/date.js +1 -1
  154. package/lib/date-picker/src/panel/daterange.d.ts +7 -0
  155. package/lib/date-picker/src/panel/daterange.js +1 -1
  156. package/lib/date-picker/src/panel/datetime.d.ts +9 -7
  157. package/lib/date-picker/src/panel/datetime.js +1 -1
  158. package/lib/date-picker/src/panel/datetimerange.d.ts +7 -0
  159. package/lib/date-picker/src/panel/datetimerange.js +2 -2
  160. package/lib/date-picker/src/panel/month.d.ts +13 -11
  161. package/lib/date-picker/src/panel/month.js +23 -12
  162. package/lib/date-picker/src/panel/use-calendar.d.ts +11 -34
  163. package/lib/date-picker/src/panel/use-calendar.js +34 -16
  164. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +7 -31
  165. package/lib/date-picker/src/panel/use-dual-calendar.js +22 -6
  166. package/lib/date-picker/src/panel/use-panel-common.d.ts +7 -27
  167. package/lib/date-picker/src/panel/use-panel-common.js +3 -2
  168. package/lib/date-picker/src/utils.d.ts +19 -3
  169. package/lib/date-picker/src/utils.js +41 -4
  170. package/lib/date-picker/styles/_common.d.ts +2 -0
  171. package/lib/date-picker/styles/_common.js +3 -1
  172. package/lib/date-picker/styles/light.d.ts +4 -0
  173. package/lib/image/src/Image.js +7 -11
  174. package/lib/locales/common/deDE.js +2 -0
  175. package/lib/locales/common/enUS.d.ts +2 -0
  176. package/lib/locales/common/enUS.js +2 -0
  177. package/lib/locales/common/frFR.js +3 -0
  178. package/lib/locales/common/idID.js +2 -0
  179. package/lib/locales/common/jaJP.js +2 -0
  180. package/lib/locales/common/nbNO.js +2 -0
  181. package/lib/locales/common/ruRU.js +2 -0
  182. package/lib/locales/common/ukUA.js +2 -0
  183. package/lib/locales/common/zhCN.js +2 -0
  184. package/lib/locales/common/zhTW.d.ts +3 -0
  185. package/lib/locales/common/zhTW.js +102 -0
  186. package/lib/locales/date/zhTW.d.ts +3 -0
  187. package/lib/locales/date/zhTW.js +11 -0
  188. package/lib/locales/index.d.ts +2 -0
  189. package/lib/locales/index.js +5 -1
  190. package/lib/page-header/src/PageHeader.js +3 -3
  191. package/lib/page-header/src/styles/index.cssr.js +2 -4
  192. package/lib/popover/src/Popover.js +4 -1
  193. package/lib/popover/src/PopoverBody.js +3 -3
  194. package/lib/popselect/src/Popselect.d.ts +2 -11
  195. package/lib/popselect/src/Popselect.js +2 -2
  196. package/lib/popselect/src/PopselectPanel.d.ts +3 -11
  197. package/lib/popselect/src/PopselectPanel.js +16 -10
  198. package/lib/radio/src/Radio.js +3 -3
  199. package/lib/radio/src/RadioButton.js +4 -5
  200. package/lib/radio/src/styles/radio-group.cssr.js +8 -4
  201. package/lib/radio/src/styles/radio.cssr.js +8 -4
  202. package/lib/radio/src/use-radio.d.ts +0 -3
  203. package/lib/radio/src/use-radio.js +1 -26
  204. package/lib/tabs/src/styles/index.cssr.js +1 -0
  205. package/lib/tag/src/styles/index.cssr.js +1 -1
  206. package/lib/tree-select/src/TreeSelect.d.ts +38 -1
  207. package/lib/tree-select/src/TreeSelect.js +24 -9
  208. package/lib/tree-select/src/styles/index.cssr.js +11 -2
  209. package/lib/tree-select/styles/light.d.ts +6 -0
  210. package/lib/tree-select/styles/light.js +5 -2
  211. package/lib/version.d.ts +1 -1
  212. package/lib/version.js +1 -1
  213. package/package.json +4 -3
  214. package/web-types.json +25 -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: `${mergedClsPrefix}-scrollbar-container`, style: this.containerStyle, onScroll: this.handleScroll, onWheel: this.onWheel },
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" }, renderTag
495
- ? renderTag({
496
- option: this.selectedOption,
497
- handleClose: () => { }
498
- })
499
- : renderLabel
500
- ? renderLabel(this.selectedOption, true)
501
- : render(this.label, this.selectedOption, true))),
502
- showPlaceholder ? (h("div", { class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay`, key: "placeholder" }, this.filterablePlaceholder)) : null,
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
- `), cB('base-selection-placeholder', `
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;
@@ -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;
@@ -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 !== undefined && (h("div", { class: `${mergedClsPrefix}-alert-body__title` }, renderSlot($slots, 'header', undefined, () => [
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
- `)]), c('&:hover, &:focus', [cE('title', `
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;