bkui-vue 0.0.1-beta.127 → 0.0.1-beta.128

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 (138) hide show
  1. package/dist/index.cjs.js +31 -145
  2. package/dist/index.esm.js +471 -3573
  3. package/dist/index.umd.js +31 -145
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/affix/affix.variable.css +2 -2
  7. package/lib/affix/index.d.ts +22 -118
  8. package/lib/alert/alert.variable.css +2 -2
  9. package/lib/alert/index.d.ts +28 -146
  10. package/lib/animate-number/index.d.ts +14 -84
  11. package/lib/backtop/backtop.variable.css +2 -2
  12. package/lib/backtop/index.d.ts +29 -135
  13. package/lib/badge/badge.variable.css +2 -2
  14. package/lib/badge/index.d.ts +46 -211
  15. package/lib/breadcrumb/breadcrumb.css +0 -43
  16. package/lib/breadcrumb/breadcrumb.variable.css +2 -45
  17. package/lib/button/button.css +0 -4
  18. package/lib/button/button.less +7 -13
  19. package/lib/button/button.variable.css +2 -6
  20. package/lib/card/card.css +0 -43
  21. package/lib/card/card.variable.css +2 -45
  22. package/lib/card/index.d.ts +50 -223
  23. package/lib/cascader/cascader.variable.css +2 -2
  24. package/lib/checkbox/checkbox.css +2 -4
  25. package/lib/checkbox/checkbox.less +2 -4
  26. package/lib/checkbox/checkbox.variable.css +4 -6
  27. package/lib/code-diff/code-diff.variable.css +2 -2
  28. package/lib/code-diff/index.d.ts +23 -123
  29. package/lib/collapse/collapse.variable.css +2 -2
  30. package/lib/collapse/index.d.ts +28 -147
  31. package/lib/components.d.ts +0 -1
  32. package/lib/components.js +1 -1
  33. package/lib/container/container.css +0 -43
  34. package/lib/container/container.variable.css +2 -45
  35. package/lib/date-picker/date-picker.variable.css +2 -2
  36. package/lib/date-picker/index.d.ts +124 -566
  37. package/lib/dialog/index.d.ts +140 -557
  38. package/lib/divider/divider.variable.css +2 -2
  39. package/lib/divider/index.d.ts +23 -117
  40. package/lib/dropdown/dropdown.variable.css +2 -2
  41. package/lib/exception/exception.variable.css +2 -2
  42. package/lib/exception/index.d.ts +13 -83
  43. package/lib/fixed-navbar/fixed-navbar.variable.css +2 -2
  44. package/lib/fixed-navbar/index.d.ts +22 -121
  45. package/lib/form/form.variable.css +2 -2
  46. package/lib/input/index.d.ts +92 -408
  47. package/lib/input/index.js +1 -1
  48. package/lib/input/input.css +5 -56
  49. package/lib/input/input.less +2 -12
  50. package/lib/input/input.variable.css +4 -55
  51. package/lib/link/index.d.ts +28 -134
  52. package/lib/link/link.variable.css +2 -2
  53. package/lib/loading/loading.css +2 -43
  54. package/lib/loading/loading.less +2 -2
  55. package/lib/loading/loading.variable.css +4 -45
  56. package/lib/menu/menu.css +0 -43
  57. package/lib/menu/menu.variable.css +2 -45
  58. package/lib/menu/submenu.variable.css +2 -2
  59. package/lib/message/message.variable.css +2 -2
  60. package/lib/navigation/index.d.ts +51 -244
  61. package/lib/navigation/navigation.variable.css +2 -2
  62. package/lib/notify/notify.variable.css +2 -2
  63. package/lib/pagination/index.d.ts +68 -305
  64. package/lib/pagination/pagination.variable.css +2 -2
  65. package/lib/popover/index.d.ts +76 -298
  66. package/lib/popover/popover.variable.css +2 -2
  67. package/lib/popover2/index.d.ts +92 -378
  68. package/lib/popover2/index.js +1 -1
  69. package/lib/popover2/popover2.variable.css +2 -2
  70. package/lib/process/index.d.ts +35 -166
  71. package/lib/process/process.variable.css +2 -2
  72. package/lib/progress/index.d.ts +76 -306
  73. package/lib/progress/progress.css +0 -43
  74. package/lib/progress/progress.variable.css +2 -45
  75. package/lib/radio/index.d.ts +2 -2
  76. package/lib/radio/index.js +1 -1
  77. package/lib/radio/radio-button.d.ts +4 -3
  78. package/lib/radio/radio.css +5 -4
  79. package/lib/radio/radio.less +5 -4
  80. package/lib/radio/radio.variable.css +7 -6
  81. package/lib/rate/index.d.ts +15 -96
  82. package/lib/resize-layout/index.d.ts +52 -261
  83. package/lib/resize-layout/resize-layout.variable.css +2 -2
  84. package/lib/select/select.css +23 -23
  85. package/lib/select/select.less +122 -126
  86. package/lib/select/select.variable.css +25 -25
  87. package/lib/shared/index.d.ts +3 -3
  88. package/lib/sideslider/index.d.ts +91 -369
  89. package/lib/sideslider/sideslider.variable.css +2 -2
  90. package/lib/slider/index.d.ts +78 -319
  91. package/lib/slider/slider.variable.css +2 -2
  92. package/lib/steps/index.d.ts +43 -198
  93. package/lib/steps/steps.variable.css +2 -2
  94. package/lib/styles/mixins/mixins.css +0 -43
  95. package/lib/styles/mixins/mixins.less +0 -1
  96. package/lib/styles/mixins/mixins.variable.css +0 -43
  97. package/lib/styles/mixins/scroll.variable.css +2 -2
  98. package/lib/styles/themes/themes.less +2 -2
  99. package/lib/swiper/index.d.ts +30 -146
  100. package/lib/switcher/index.d.ts +50 -223
  101. package/lib/switcher/switcher.css +0 -43
  102. package/lib/switcher/switcher.variable.css +2 -45
  103. package/lib/tab/tab.variable.css +2 -2
  104. package/lib/table/const.d.ts +0 -5
  105. package/lib/table/index.d.ts +101 -419
  106. package/lib/table/index.js +1 -1
  107. package/lib/table/plugins/head-filter.variable.css +2 -2
  108. package/lib/table/plugins/head-sort.variable.css +2 -2
  109. package/lib/table/plugins/settings.css +4 -23
  110. package/lib/table/plugins/settings.less +4 -25
  111. package/lib/table/plugins/settings.variable.css +6 -25
  112. package/lib/table/props.d.ts +0 -1
  113. package/lib/table/table.css +5 -668
  114. package/lib/table/table.less +1 -7
  115. package/lib/table/table.variable.css +7 -670
  116. package/lib/table/use-common.d.ts +1 -16
  117. package/lib/table/utils.d.ts +1 -1
  118. package/lib/tag/index.d.ts +38 -183
  119. package/lib/tag/tag.variable.css +2 -2
  120. package/lib/tag-input/index.d.ts +145 -666
  121. package/lib/tag-input/tag-input.variable.css +2 -2
  122. package/lib/timeline/index.d.ts +19 -109
  123. package/lib/timeline/timeline.variable.css +2 -2
  124. package/lib/transfer/index.d.ts +59 -264
  125. package/lib/transfer/transfer.variable.css +2 -2
  126. package/lib/tree/index.d.ts +103 -401
  127. package/lib/tree/index.js +1 -1
  128. package/lib/tree/tree.css +0 -107
  129. package/lib/tree/tree.less +0 -2
  130. package/lib/tree/tree.variable.css +2 -109
  131. package/lib/tree/use-node-action.d.ts +1 -1
  132. package/lib/tree/use-node-attribute.d.ts +0 -1
  133. package/lib/upload/upload.css +0 -43
  134. package/lib/upload/upload.variable.css +2 -45
  135. package/lib/virtual-render/index.d.ts +109 -433
  136. package/lib/virtual-render/virtual-render.variable.css +2 -2
  137. package/package.json +1 -1
  138. package/lib/popover2/use-platform.d.ts +0 -30
@@ -19,7 +19,7 @@
19
19
  --line-height-large: 18px;
20
20
  --component-size-small: 26px;
21
21
  --component-size-base: 32px;
22
- --component-size-large: 40px;
22
+ --component-size-large: 38px;
23
23
  --border-width-base: 1px;
24
24
  --border-style-base: solid;
25
25
  --border-radius-base: 2px;
@@ -34,7 +34,7 @@
34
34
  --input-horizontal-padding: 10px;
35
35
  --input-block-color: #f5f7fa;
36
36
  --input-block-hover-color: #eaebf0;
37
- --input-icon-size: var(--font-size-medium);
37
+ --input-icon-size: var(--font-size-large);
38
38
  --input-maxlength-color: #979ba5;
39
39
  --button-primary-hover-color: #5594fa;
40
40
  --button-danger-hover-color: #ff5656;
@@ -129,49 +129,6 @@
129
129
  content: '';
130
130
  visibility: hidden;
131
131
  }
132
- .bk-popper {
133
- display: none;
134
- padding: 7px 14px;
135
- font-size: 12px;
136
- color: #fff;
137
- background: #333;
138
- border-radius: 4px;
139
- }
140
- .bk-popper.light {
141
- color: #63656e;
142
- background: #fff;
143
- box-shadow: #dcdee5 0px 0px 6px 0px;
144
- }
145
- .bk-popper .bk-popper-arrow,
146
- .bk-popper .bk-popper-arrow::before {
147
- position: absolute;
148
- width: 8px;
149
- height: 8px;
150
- background: inherit;
151
- }
152
- .bk-popper .bk-popper-arrow {
153
- visibility: hidden;
154
- }
155
- .bk-popper .bk-popper-arrow::before {
156
- content: '';
157
- visibility: visible;
158
- transform: rotate(45deg);
159
- }
160
- .bk-popper[data-show] {
161
- display: block;
162
- }
163
- .bk-popper[data-popper-placement^='top'] > .bk-popper-arrow {
164
- bottom: -4px;
165
- }
166
- .bk-popper[data-popper-placement^='bottom'] > .bk-popper-arrow {
167
- top: -4px;
168
- }
169
- .bk-popper[data-popper-placement^='left'] > .bk-popper-arrow {
170
- right: -4px;
171
- }
172
- .bk-popper[data-popper-placement^='right'] > .bk-popper-arrow {
173
- left: -4px;
174
- }
175
132
  .bk-progress {
176
133
  display: inline-block;
177
134
  }
@@ -231,7 +231,7 @@ declare const BkRadio: {
231
231
  } & {
232
232
  default: boolean;
233
233
  };
234
- size: import("vue-types").VueTypeDef<string>;
234
+ size: typeof import("@bkui-vue/shared").PropTypes.size;
235
235
  }, {
236
236
  isFocused: import("vue").Ref<boolean>;
237
237
  isChecked: import("vue").Ref<boolean>;
@@ -262,7 +262,7 @@ declare const BkRadio: {
262
262
  } & {
263
263
  default: boolean;
264
264
  };
265
- size: import("vue-types").VueTypeDef<string>;
265
+ size: typeof import("@bkui-vue/shared").PropTypes.size;
266
266
  }>> & {
267
267
  onChange?: (...args: any[]) => any;
268
268
  "onUpdate:modelValue"?: (...args: any[]) => any;
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"));else if("function"==typeof define&&define.amd)define(["../shared","vue"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue")):t(e["../shared"],e.vue);for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,((e,t)=>(()=>{"use strict";var o={4212:t=>{t.exports=e},748:e=>{e.exports=t}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return o[e](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{r.r(a),r.d(a,{BkRadio:()=>b,BkRadioButton:()=>p,BkRadioGroup:()=>f,default:()=>v});var e=r(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function o(e,o){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],i=!0,s=!1;try{for(o=o.call(e);!(i=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,r=e}finally{try{i||null==o.return||o.return()}finally{if(s)throw r}}return a}}(e,o)||function(e,o){if(e){if("string"==typeof e)return t(e,o);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,o):void 0}}(e,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var n=r(748),i=Symbol("RadioGroup");function s(){var e=(0,n.ref)(!1);return[e,{blur:function(){e.value=!1},focus:function(){e.value=!0}}]}var l=function(){var t=(0,n.getCurrentInstance)(),o=t.props,r=t.emit,a=(0,e.useFormItem)(),s=(0,n.inject)(i,e.EMPTY_OBJ),l=!(0,e.isEmptyObj)(s),d=(0,n.ref)(!1),u=(0,n.computed)((function(){return!(!l||!s.props.disabled)||o.disabled}));return l?(0,n.watch)((function(){return s.props.modelValue}),(function(e){d.value=e===o.label}),{immediate:!0}):(0,n.watch)((function(){return o.modelValue}),(function(e){""!==e&&(d.value=e===o.label)}),{immediate:!0}),(0,n.onMounted)((function(){l&&s.register(t.proxy)})),(0,n.onBeforeUnmount)((function(){l&&s.unregister(t.proxy)})),{isChecked:d,isDisabled:u,setChecked:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];d.value=e},handleChange:function(e){var i;if(!u.value){var c=e.target;d.value=c.checked;var p=d.value?o.label:"";r("change",p),r("update:modelValue",p),l&&s.handleChange(t.proxy),null===(i=null==a?void 0:a.validate)||void 0===i||i.call(a,"change"),(0,n.nextTick)((function(){c.checked!==d.value&&(c.checked=d.value)}))}}}},d={name:e.PropTypes.string.def(""),label:e.PropTypes.oneOfType([String,Number,Boolean]).isRequired,modelValue:e.PropTypes.oneOfType([String,Number,Boolean]).def(""),checked:e.PropTypes.bool.def(!1),disabled:e.PropTypes.bool.def(!1)};const u=(0,n.defineComponent)({name:"Radio",props:d,emits:["change","update:modelValue"],setup:function(){var e=o(s(),2),t=e[0],n=e[1],r=n.blur,a=n.focus,i=l();return{isFocused:t,isChecked:i.isChecked,isDisabled:i.isDisabled,setChecked:i.setChecked,handleBlur:r,handleFocus:a,handleChange:i.handleChange}},render:function(){var t=(0,e.classes)({"bk-radio":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});return(0,n.createVNode)("label",{class:t,tabindex:"0"},[(0,n.createVNode)("input",{class:"bk-radio-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),(0,n.createVNode)("span",{class:"bk-radio-text"},[this.$slots.default?this.$slots.default():this.label])])}});var c={name:e.PropTypes.string.def(""),label:e.PropTypes.oneOfType([String,Number,Boolean]).isRequired,modelValue:e.PropTypes.oneOfType([String,Number,Boolean]).def(""),checked:e.PropTypes.bool.def(!1),disabled:e.PropTypes.bool.def(!1),size:e.PropTypes.size()};const p=(0,n.defineComponent)({name:"RadioButton",props:c,emits:["change","update:modelValue"],setup:function(){var e=o(s(),2),t=e[0],n=e[1],r=n.blur,a=n.focus,i=l();return{isFocused:t,isChecked:i.isChecked,isDisabled:i.isDisabled,setChecked:i.setChecked,handleBlur:r,handleFocus:a,handleChange:i.handleChange}},render:function(){var t=(0,e.classes)({"bk-radio-button":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});return(0,n.createVNode)("label",{class:t,tabindex:"0"},[(0,n.createVNode)("input",{class:"bk-radio-button-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),(0,n.createVNode)("div",{class:"bk-radio-button-text"},[this.$slots.default?this.$slots.default():this.label])])}});var h={name:e.PropTypes.string.def(""),modelValue:e.PropTypes.oneOfType([String,Number,Boolean]),disabled:e.PropTypes.bool};const f=(0,n.defineComponent)({name:"RadioGroup",props:h,emits:["change","update:modelValue"],setup:function(e,t){var o=[];return(0,n.provide)(i,{props:e,register:function(e){o.push(e)},unregister:function(e){var t=o.indexOf(e);t>-1&&o.splice(t,1)},handleChange:function(e){var n=e.label;o.forEach((function(t){t!==e&&t.setChecked(!1)})),t.emit("update:modelValue",n),t.emit("change",n)}}),(0,n.onMounted)((function(){""!==e.modelValue&&o.forEach((function(t){t.setChecked(t.label===e.modelValue)}))})),{}},render:function(){var e;return(0,n.createVNode)("div",{class:"bk-radio-group"},[null===(e=this.$slots)||void 0===e?void 0:e.default()])}});var b=(0,e.withInstallProps)(u,{Group:f,Button:p});const v=b})(),a})()));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"));else if("function"==typeof define&&define.amd)define(["../shared","vue"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue")):t(e["../shared"],e.vue);for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(self,((e,t)=>(()=>{"use strict";var o={4212:t=>{t.exports=e},748:e=>{e.exports=t}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return o[e](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{r.r(a),r.d(a,{BkRadio:()=>b,BkRadioButton:()=>p,BkRadioGroup:()=>f,default:()=>v});var e=r(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function o(e,o){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],i=!0,s=!1;try{for(o=o.call(e);!(i=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,r=e}finally{try{i||null==o.return||o.return()}finally{if(s)throw r}}return a}}(e,o)||function(e,o){if(e){if("string"==typeof e)return t(e,o);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,o):void 0}}(e,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var n=r(748),i=Symbol("RadioGroup");function s(){var e=(0,n.ref)(!1);return[e,{blur:function(){e.value=!1},focus:function(){e.value=!0}}]}var l=function(){var t=(0,n.getCurrentInstance)(),o=t.props,r=t.emit,a=(0,e.useFormItem)(),s=(0,n.inject)(i,e.EMPTY_OBJ),l=!(0,e.isEmptyObj)(s),d=(0,n.ref)(!1),u=(0,n.computed)((function(){return!(!l||!s.props.disabled)||o.disabled}));return l?(0,n.watch)((function(){return s.props.modelValue}),(function(e){d.value=e===o.label}),{immediate:!0}):(0,n.watch)((function(){return o.modelValue}),(function(e){""!==e&&(d.value=e===o.label)}),{immediate:!0}),(0,n.onMounted)((function(){l&&s.register(t.proxy)})),(0,n.onBeforeUnmount)((function(){l&&s.unregister(t.proxy)})),{isChecked:d,isDisabled:u,setChecked:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];d.value=e},handleChange:function(e){var i;if(!u.value){var c=e.target;d.value=c.checked;var p=d.value?o.label:"";r("change",p),r("update:modelValue",p),l&&s.handleChange(t.proxy),null===(i=null==a?void 0:a.validate)||void 0===i||i.call(a,"change"),(0,n.nextTick)((function(){c.checked!==d.value&&(c.checked=d.value)}))}}}},d={name:e.PropTypes.string.def(""),label:e.PropTypes.oneOfType([String,Number,Boolean]).isRequired,modelValue:e.PropTypes.oneOfType([String,Number,Boolean]).def(""),checked:e.PropTypes.bool.def(!1),disabled:e.PropTypes.bool.def(!1)};const u=(0,n.defineComponent)({name:"Radio",props:d,emits:["change","update:modelValue"],setup:function(){var e=o(s(),2),t=e[0],n=e[1],r=n.blur,a=n.focus,i=l();return{isFocused:t,isChecked:i.isChecked,isDisabled:i.isDisabled,setChecked:i.setChecked,handleBlur:r,handleFocus:a,handleChange:i.handleChange}},render:function(){var t=(0,e.classes)({"bk-radio":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});return(0,n.createVNode)("label",{class:t,tabindex:"0"},[(0,n.createVNode)("input",{class:"bk-radio-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),(0,n.createVNode)("span",{class:"bk-radio-text"},[this.$slots.default?this.$slots.default():this.label])])}});var c={name:e.PropTypes.string.def(""),label:e.PropTypes.oneOfType([String,Number,Boolean]).isRequired,modelValue:e.PropTypes.oneOfType([String,Number,Boolean]).def(""),checked:e.PropTypes.bool.def(!1),disabled:e.PropTypes.bool.def(!1),size:e.PropTypes.size};const p=(0,n.defineComponent)({name:"RadioButton",props:c,emits:["change","update:modelValue"],setup:function(){var e=o(s(),2),t=e[0],n=e[1],r=n.blur,a=n.focus,i=l();return{isFocused:t,isChecked:i.isChecked,isDisabled:i.isDisabled,setChecked:i.setChecked,handleBlur:r,handleFocus:a,handleChange:i.handleChange}},render:function(){var t=(0,e.classes)({"bk-radio-button":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});return(0,n.createVNode)("label",{class:t,tabindex:"0"},[(0,n.createVNode)("input",{class:"bk-radio-button-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),(0,n.createVNode)("div",{class:"bk-radio-button-text"},[this.$slots.default?this.$slots.default():this.label])])}});var h={name:e.PropTypes.string.def(""),modelValue:e.PropTypes.oneOfType([String,Number,Boolean]),disabled:e.PropTypes.bool};const f=(0,n.defineComponent)({name:"RadioGroup",props:h,emits:["change","update:modelValue"],setup:function(e,t){var o=[];return(0,n.provide)(i,{props:e,register:function(e){o.push(e)},unregister:function(e){var t=o.indexOf(e);t>-1&&o.splice(t,1)},handleChange:function(e){var n=e.label;o.forEach((function(t){t!==e&&t.setChecked(!1)})),t.emit("update:modelValue",n),t.emit("change",n)}}),(0,n.onMounted)((function(){""!==e.modelValue&&o.forEach((function(t){t.setChecked(t.label===e.modelValue)}))})),{}},render:function(){var e;return(0,n.createVNode)("div",{class:"bk-radio-group"},[null===(e=this.$slots)||void 0===e?void 0:e.default()])}});var b=(0,e.withInstallProps)(u,{Group:f,Button:p});const v=b})(),a})()));
@@ -1,4 +1,5 @@
1
1
  import type { ExtractPropTypes } from 'vue';
2
+ import { PropTypes } from '@bkui-vue/shared';
2
3
  declare const radioButtonProps: {
3
4
  name: import("vue-types").VueTypeValidableDef<string> & {
4
5
  default: string;
@@ -21,7 +22,7 @@ declare const radioButtonProps: {
21
22
  } & {
22
23
  default: boolean;
23
24
  };
24
- size: import("vue-types").VueTypeDef<string>;
25
+ size: typeof PropTypes.size;
25
26
  };
26
27
  export declare type RadioButtonProps = Readonly<ExtractPropTypes<typeof radioButtonProps>>;
27
28
  declare const _default: import("vue").DefineComponent<{
@@ -46,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
46
47
  } & {
47
48
  default: boolean;
48
49
  };
49
- size: import("vue-types").VueTypeDef<string>;
50
+ size: typeof PropTypes.size;
50
51
  }, {
51
52
  isFocused: import("vue").Ref<boolean>;
52
53
  isChecked: import("vue").Ref<boolean>;
@@ -77,7 +78,7 @@ declare const _default: import("vue").DefineComponent<{
77
78
  } & {
78
79
  default: boolean;
79
80
  };
80
- size: import("vue-types").VueTypeDef<string>;
81
+ size: typeof PropTypes.size;
81
82
  }>> & {
82
83
  onChange?: (...args: any[]) => any;
83
84
  "onUpdate:modelValue"?: (...args: any[]) => any;
@@ -1,6 +1,7 @@
1
1
  .bk-radio {
2
2
  display: inline-flex;
3
3
  align-items: center;
4
+ margin-right: 30px;
4
5
  font-size: 12px;
5
6
  font-weight: normal;
6
7
  line-height: 1;
@@ -11,8 +12,8 @@
11
12
  outline: none;
12
13
  user-select: none;
13
14
  }
14
- .bk-radio ~ .bk-radio {
15
- margin-left: 30px;
15
+ .bk-radio:last-child {
16
+ margin-right: 0;
16
17
  }
17
18
  .bk-radio.is-checked .bk-radio-input {
18
19
  padding: 3px;
@@ -92,8 +93,8 @@
92
93
  z-index: 2;
93
94
  }
94
95
  .bk-radio-button.is-checked .bk-radio-button-text {
95
- color: #3a84ff;
96
- background: #e1ecff;
96
+ color: #fff;
97
+ background: #3a84ff;
97
98
  border-color: #3a84ff;
98
99
  }
99
100
  .bk-radio-button.is-disabled {
@@ -3,6 +3,7 @@
3
3
  .bk-radio {
4
4
  display: inline-flex;
5
5
  align-items: center;
6
+ margin-right: 30px;
6
7
  font-size: @font-size-base;
7
8
  font-weight: normal;
8
9
  line-height: 1;
@@ -13,8 +14,8 @@
13
14
  outline: none;
14
15
  user-select: none;
15
16
 
16
- &~.bk-radio {
17
- margin-left: 30px;
17
+ &:last-child {
18
+ margin-right: 0;
18
19
  }
19
20
 
20
21
  &.is-checked {
@@ -117,8 +118,8 @@
117
118
  z-index: 2;
118
119
 
119
120
  .bk-radio-button-text {
120
- color: @primary-color;
121
- background: #e1ecff;
121
+ color: #fff;
122
+ background: @primary-color;
122
123
  border-color: @primary-color;
123
124
  }
124
125
  }
@@ -19,7 +19,7 @@
19
19
  --line-height-large: 18px;
20
20
  --component-size-small: 26px;
21
21
  --component-size-base: 32px;
22
- --component-size-large: 40px;
22
+ --component-size-large: 38px;
23
23
  --border-width-base: 1px;
24
24
  --border-style-base: solid;
25
25
  --border-radius-base: 2px;
@@ -34,7 +34,7 @@
34
34
  --input-horizontal-padding: 10px;
35
35
  --input-block-color: #f5f7fa;
36
36
  --input-block-hover-color: #eaebf0;
37
- --input-icon-size: var(--font-size-medium);
37
+ --input-icon-size: var(--font-size-large);
38
38
  --input-maxlength-color: #979ba5;
39
39
  --button-primary-hover-color: #5594fa;
40
40
  --button-danger-hover-color: #ff5656;
@@ -103,6 +103,7 @@
103
103
  .bk-radio {
104
104
  display: inline-flex;
105
105
  align-items: center;
106
+ margin-right: 30px;
106
107
  font-size: var(--font-size-base);
107
108
  font-weight: normal;
108
109
  line-height: 1;
@@ -113,8 +114,8 @@
113
114
  outline: none;
114
115
  user-select: none;
115
116
  }
116
- .bk-radio ~ .bk-radio {
117
- margin-left: 30px;
117
+ .bk-radio:last-child {
118
+ margin-right: 0;
118
119
  }
119
120
  .bk-radio.is-checked .bk-radio-input {
120
121
  padding: 3px;
@@ -194,8 +195,8 @@
194
195
  z-index: 2;
195
196
  }
196
197
  .bk-radio-button.is-checked .bk-radio-button-text {
197
- color: var(--primary-color);
198
- background: #e1ecff;
198
+ color: #fff;
199
+ background: var(--primary-color);
199
200
  border-color: var(--primary-color);
200
201
  }
201
202
  .bk-radio-button.is-disabled {
@@ -1,97 +1,16 @@
1
- declare const BkRate: {
2
- new (...args: any[]): {
3
- $: import("vue").ComponentInternalInstance;
4
- $data: {};
5
- $props: Partial<{
6
- modelValue: number;
7
- editable: boolean;
8
- }> & Omit<Readonly<import("vue").ExtractPropTypes<{
9
- modelValue: import("vue-types").VueTypeValidableDef<number> & {
10
- default: number;
11
- } & {
12
- default: number;
13
- };
14
- size: import("vue-types").VueTypeDef<string>;
15
- editable: import("vue-types").VueTypeValidableDef<boolean> & {
16
- default: boolean;
17
- } & {
18
- default: boolean;
19
- };
20
- }>> & {
21
- onChange?: (...args: any[]) => any;
22
- "onUpdate:modelValue"?: (...args: any[]) => any;
23
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "modelValue" | "editable">;
24
- $attrs: {
25
- [x: string]: unknown;
26
- };
27
- $refs: {
28
- [x: string]: unknown;
29
- };
30
- $slots: Readonly<{
31
- [name: string]: import("vue").Slot;
32
- }>;
33
- $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
34
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
35
- $emit: (event: "change" | "update:modelValue", ...args: any[]) => void;
36
- $el: any;
37
- $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
38
- modelValue: import("vue-types").VueTypeValidableDef<number> & {
39
- default: number;
40
- } & {
41
- default: number;
42
- };
43
- size: import("vue-types").VueTypeDef<string>;
44
- editable: import("vue-types").VueTypeValidableDef<boolean> & {
45
- default: boolean;
46
- } & {
47
- default: boolean;
48
- };
49
- }>> & {
50
- onChange?: (...args: any[]) => any;
51
- "onUpdate:modelValue"?: (...args: any[]) => any;
52
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], string, {
53
- modelValue: number;
54
- editable: boolean;
55
- }> & {
56
- beforeCreate?: (() => void) | (() => void)[];
57
- created?: (() => void) | (() => void)[];
58
- beforeMount?: (() => void) | (() => void)[];
59
- mounted?: (() => void) | (() => void)[];
60
- beforeUpdate?: (() => void) | (() => void)[];
61
- updated?: (() => void) | (() => void)[];
62
- activated?: (() => void) | (() => void)[];
63
- deactivated?: (() => void) | (() => void)[];
64
- beforeDestroy?: (() => void) | (() => void)[];
65
- beforeUnmount?: (() => void) | (() => void)[];
66
- destroyed?: (() => void) | (() => void)[];
67
- unmounted?: (() => void) | (() => void)[];
68
- renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
69
- renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
70
- errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>, info: string) => boolean | void)[];
71
- };
72
- $forceUpdate: () => void;
73
- $nextTick: typeof import("vue").nextTick;
74
- $watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
75
- } & Readonly<import("vue").ExtractPropTypes<{
76
- modelValue: import("vue-types").VueTypeValidableDef<number> & {
77
- default: number;
78
- } & {
79
- default: number;
80
- };
81
- size: import("vue-types").VueTypeDef<string>;
82
- editable: import("vue-types").VueTypeValidableDef<boolean> & {
83
- default: boolean;
84
- } & {
85
- default: boolean;
86
- };
87
- }>> & {
88
- onChange?: (...args: any[]) => any;
89
- "onUpdate:modelValue"?: (...args: any[]) => any;
90
- } & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & {} & import("vue").ComponentCustomProperties;
91
- __isFragment?: never;
92
- __isTeleport?: never;
93
- __isSuspense?: never;
94
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
1
+ declare const BkRate: import("vue").DefineComponent<{
2
+ modelValue: import("vue-types").VueTypeValidableDef<number> & {
3
+ default: number;
4
+ } & {
5
+ default: number;
6
+ };
7
+ size: import("vue-types").VueTypeDef<string>;
8
+ editable: import("vue-types").VueTypeValidableDef<boolean> & {
9
+ default: boolean;
10
+ } & {
11
+ default: boolean;
12
+ };
13
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
95
14
  modelValue: import("vue-types").VueTypeValidableDef<number> & {
96
15
  default: number;
97
16
  } & {
@@ -106,8 +25,8 @@ declare const BkRate: {
106
25
  }>> & {
107
26
  onChange?: (...args: any[]) => any;
108
27
  "onUpdate:modelValue"?: (...args: any[]) => any;
109
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", {
28
+ }, {
110
29
  modelValue: number;
111
30
  editable: boolean;
112
- }> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin;
31
+ }>;
113
32
  export default BkRate;