bkui-vue 0.0.1-beta.330 → 0.0.1-beta.332

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 (48) hide show
  1. package/dist/index.cjs.js +25 -25
  2. package/dist/index.esm.js +76 -33
  3. package/dist/index.umd.js +26 -26
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/alert/alert.css +4 -0
  7. package/lib/alert/alert.less +24 -19
  8. package/lib/alert/alert.variable.css +4 -0
  9. package/lib/checkbox/checkbox.css +10 -6
  10. package/lib/checkbox/checkbox.less +38 -32
  11. package/lib/checkbox/checkbox.variable.css +10 -6
  12. package/lib/checkbox/index.js +1 -1
  13. package/lib/dialog/dialog.css +9 -9
  14. package/lib/dialog/dialog.less +1 -1
  15. package/lib/dialog/dialog.variable.css +9 -9
  16. package/lib/form/form-item.d.ts +14 -3
  17. package/lib/form/form.css +13 -7
  18. package/lib/form/form.less +61 -52
  19. package/lib/form/form.variable.css +13 -7
  20. package/lib/form/index.d.ts +11 -2
  21. package/lib/form/index.js +1 -1
  22. package/lib/form/type.d.ts +1 -2
  23. package/lib/form/utils.d.ts +2 -0
  24. package/lib/info-box/info-box.css +8 -8
  25. package/lib/info-box/info-box.less +8 -8
  26. package/lib/info-box/info-box.variable.css +8 -8
  27. package/lib/input/input.css +5 -2
  28. package/lib/input/input.less +3 -2
  29. package/lib/input/input.variable.css +5 -2
  30. package/lib/message/message.css +1 -1
  31. package/lib/message/message.less +1 -1
  32. package/lib/message/message.variable.css +1 -1
  33. package/lib/modal/modal.css +8 -8
  34. package/lib/modal/modal.variable.css +8 -8
  35. package/lib/pagination/pagination.less +9 -7
  36. package/lib/radio/index.js +1 -1
  37. package/lib/radio/radio.css +60 -63
  38. package/lib/radio/radio.less +74 -78
  39. package/lib/radio/radio.variable.css +60 -63
  40. package/lib/select/index.js +1 -1
  41. package/lib/shared/index.js +1 -1
  42. package/lib/table/index.js +1 -1
  43. package/lib/table/table.css +13 -6
  44. package/lib/table/table.less +6 -0
  45. package/lib/table/table.variable.css +13 -6
  46. package/lib/tree/tree.css +10 -6
  47. package/lib/tree/tree.variable.css +10 -6
  48. package/package.json +1 -1
@@ -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,n.inject)(i,e.EMPTY_OBJ),s=!(0,e.isEmptyObj)(a),l=(0,n.ref)(!1),d=(0,n.computed)((function(){return!(!s||!a.props.disabled)||o.disabled}));return s?(0,n.watch)((function(){return a.props.modelValue}),(function(e){l.value=e===o.label}),{immediate:!0}):(0,n.watch)((function(){return o.modelValue}),(function(e){""!==e&&(l.value=e===o.label)}),{immediate:!0}),(0,n.onMounted)((function(){s&&a.register(t.proxy)})),(0,n.onBeforeUnmount)((function(){s&&a.unregister(t.proxy)})),{isChecked:l,isDisabled:d,setChecked:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];l.value=e},handleChange:function(e){if(!d.value){var i=e.target;l.value=i.checked;var u=l.value?o.label:"";r("change",u),r("update:modelValue",u),s&&a.handleChange(t.proxy),(0,n.nextTick)((function(){i.checked!==l.value&&(i.checked=l.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,withValidate:e.PropTypes.bool.def(!0)};const f=(0,n.defineComponent)({name:"RadioGroup",props:h,emits:["change","update:modelValue"],setup:function(t,o){var r=(0,e.useFormItem)(),a=[];return(0,n.provide)(i,{props:t,register:function(e){a.push(e)},unregister:function(e){var t=a.indexOf(e);t>-1&&a.splice(t,1)},handleChange:function(e){var t=e.label;a.forEach((function(t){t!==e&&t.setChecked(!1)})),o.emit("update:modelValue",t),o.emit("change",t)}}),(0,n.watch)((function(){return t.modelValue}),(function(){var e;t.withValidate&&(null===(e=null==r?void 0:r.validate)||void 0===e||e.call(r,"change"))})),(0,n.onMounted)((function(){""!==t.modelValue&&a.forEach((function(e){e.setChecked(e.label===t.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:()=>h,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=[],l=!0,i=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){i=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(i)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),l=Symbol("RadioGroup");function i(){var e=(0,n.ref)(!1);return[e,{blur:function(){e.value=!1},focus:function(){e.value=!0}}]}var s=function(){var t=(0,n.getCurrentInstance)(),o=t.props,r=t.emit,a=(0,n.inject)(l,e.EMPTY_OBJ),i=!(0,e.isEmptyObj)(a),s=(0,n.ref)(!1),u=(0,n.computed)((function(){return!(!i||!a.props.disabled)||o.disabled}));return i?(0,n.watch)((function(){return a.props.modelValue}),(function(e){s.value=e===o.label}),{immediate:!0}):(0,n.watch)((function(){return o.modelValue}),(function(e){""!==e&&(s.value=e===o.label)}),{immediate:!0}),(0,n.onMounted)((function(){i&&a.register(t.proxy)})),(0,n.onBeforeUnmount)((function(){i&&a.unregister(t.proxy)})),{isChecked:s,isDisabled:u,setChecked:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];s.value=e},handleChange:function(e){if(!u.value){var l=e.target;s.value=l.checked;var d=s.value?o.label:"";r("change",d),r("update:modelValue",d),i&&a.handleChange(t.proxy),(0,n.nextTick)((function(){l.checked!==s.value&&(l.checked=s.value)}))}}}},u={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 d=(0,n.defineComponent)({name:"Radio",props:u,emits:["change","update:modelValue"],setup:function(){var e=o(i(),2),t=e[0],n=e[1],r=n.blur,a=n.focus,l=s();return{isFocused:t,isChecked:l.isChecked,isDisabled:l.isDisabled,setChecked:l.setChecked,handleBlur:r,handleFocus:a,handleChange:l.handleChange}},render:function(){var t=this,o=(0,e.classes)({"bk-radio":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});return(0,n.createVNode)("label",{class:o,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),t.label||t.$slots.default?(0,n.createVNode)("span",{class:"bk-radio-label"},[t.$slots.default?t.$slots.default():t.label]):null])}});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(i(),2),t=e[0],n=e[1],r=n.blur,a=n.focus,l=s();return{isFocused:t,isChecked:l.isChecked,isDisabled:l.isDisabled,setChecked:l.setChecked,handleBlur:r,handleFocus:a,handleChange:l.handleChange}},render:function(){var t=this,o=(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:o,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),t.label||t.$slots.default?(0,n.createVNode)("span",{class:"bk-radio-label"},[t.$slots.default?t.$slots.default():t.label]):null])}});var f={name:e.PropTypes.string.def(""),modelValue:e.PropTypes.oneOfType([String,Number,Boolean]),disabled:e.PropTypes.bool,withValidate:e.PropTypes.bool.def(!0)};const h=(0,n.defineComponent)({name:"RadioGroup",props:f,emits:["change","update:modelValue"],setup:function(t,o){var r=(0,e.useFormItem)(),a=[];return(0,n.provide)(l,{props:t,register:function(e){a.push(e)},unregister:function(e){var t=a.indexOf(e);t>-1&&a.splice(t,1)},handleChange:function(e){var t=e.label;a.forEach((function(t){t!==e&&t.setChecked(!1)})),o.emit("update:modelValue",t),o.emit("change",t)}}),(0,n.watch)((function(){return t.modelValue}),(function(){var e;t.withValidate&&(null===(e=null==r?void 0:r.validate)||void 0===e||e.call(r,"change"))})),(0,n.onMounted)((function(){""!==t.modelValue&&a.forEach((function(e){e.setChecked(e.label===t.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)(d,{Group:h,Button:p});const v=b})(),a})()));
@@ -1,9 +1,12 @@
1
+ .bk-radio-group {
2
+ display: inline-block;
3
+ letter-spacing: normal;
4
+ }
1
5
  .bk-radio {
2
6
  display: inline-flex;
3
7
  align-items: center;
4
8
  font-size: 12px;
5
9
  font-weight: normal;
6
- line-height: 1;
7
10
  letter-spacing: normal;
8
11
  color: #63656e;
9
12
  white-space: nowrap;
@@ -14,34 +17,6 @@
14
17
  .bk-radio ~ .bk-radio {
15
18
  margin-left: 30px;
16
19
  }
17
- .bk-radio .bk-radio-text {
18
- font-size: 12px;
19
- font-style: normal;
20
- font-weight: normal;
21
- vertical-align: middle;
22
- cursor: pointer;
23
- }
24
- .bk-radio .bk-radio-input {
25
- position: relative;
26
- display: inline-block;
27
- width: 16px;
28
- height: 16px;
29
- margin: 0 5px 0 0;
30
- color: #fff;
31
- vertical-align: middle;
32
- cursor: pointer;
33
- background-color: #fff;
34
- border: 1px solid #c4c6cc;
35
- border-radius: 50%;
36
- outline: none;
37
- visibility: visible;
38
- transition: all 0.3s;
39
- background-clip: content-box;
40
- appearance: none;
41
- }
42
- .bk-radio .bk-radio-input:hover {
43
- border-color: #979ba5;
44
- }
45
20
  .bk-radio.is-checked .bk-radio-input {
46
21
  padding: 3px;
47
22
  color: #5594fa;
@@ -59,12 +34,40 @@
59
34
  cursor: not-allowed;
60
35
  border-color: #dcdee5;
61
36
  }
62
- .bk-radio.is-disabled .bk-radio-text {
37
+ .bk-radio.is-disabled .bk-radio-label {
63
38
  cursor: not-allowed;
64
39
  }
65
40
  .bk-radio.is-focused .bk-radio-input {
66
41
  border-color: #5594fa;
67
42
  }
43
+ .bk-radio-input {
44
+ position: relative;
45
+ display: inline-block;
46
+ width: 16px;
47
+ height: 16px;
48
+ color: #fff;
49
+ vertical-align: middle;
50
+ cursor: pointer;
51
+ background-color: #fff;
52
+ border: 1px solid #c4c6cc;
53
+ border-radius: 50%;
54
+ outline: none;
55
+ visibility: visible;
56
+ transition: all 0.3s;
57
+ background-clip: content-box;
58
+ appearance: none;
59
+ }
60
+ .bk-radio-input:hover {
61
+ border-color: #979ba5;
62
+ }
63
+ .bk-radio-label {
64
+ margin-left: 5px;
65
+ font-size: 12px;
66
+ font-style: normal;
67
+ font-weight: normal;
68
+ vertical-align: middle;
69
+ cursor: pointer;
70
+ }
68
71
  .bk-radio-button {
69
72
  position: relative;
70
73
  z-index: 1;
@@ -83,41 +86,18 @@
83
86
  .bk-radio-button:nth-child(n+2) {
84
87
  margin-left: -1px;
85
88
  }
86
- .bk-radio-button .bk-radio-button-input {
87
- position: absolute;
88
- z-index: -1;
89
- outline: none;
90
- opacity: 0;
91
- }
92
- .bk-radio-button .bk-radio-button-text {
93
- height: 32px;
94
- padding: 0 18px;
95
- font-size: 12px;
96
- font-style: normal;
97
- font-weight: normal;
98
- line-height: 32px;
99
- color: #63656e;
100
- text-align: center;
101
- vertical-align: middle;
102
- cursor: pointer;
103
- border: 1px solid #c4c6cc;
104
- transition: all 0.3s;
105
- }
106
- .bk-radio-button .bk-radio-button-text:hover {
107
- border-color: #979ba5;
108
- }
109
- .bk-radio-button:first-child .bk-radio-button-text {
89
+ .bk-radio-button:first-child .bk-radio-button-label {
110
90
  border-bottom-left-radius: 2px;
111
91
  border-top-left-radius: 2px;
112
92
  }
113
- .bk-radio-button:last-child .bk-radio-button-text {
93
+ .bk-radio-button:last-child .bk-radio-button-label {
114
94
  border-top-right-radius: 2px;
115
95
  border-bottom-right-radius: 2px;
116
96
  }
117
97
  .bk-radio-button.is-checked {
118
98
  z-index: 2;
119
99
  }
120
- .bk-radio-button.is-checked .bk-radio-button-text {
100
+ .bk-radio-button.is-checked .bk-radio-button-label {
121
101
  color: #5594fa;
122
102
  background: #e1ecff;
123
103
  border-color: #5594fa;
@@ -127,17 +107,34 @@
127
107
  color: #c4c6cc;
128
108
  cursor: not-allowed;
129
109
  }
130
- .bk-radio-button.is-disabled .bk-radio-button-text {
110
+ .bk-radio-button.is-disabled .bk-radio-button-label {
131
111
  cursor: not-allowed;
132
112
  background: #fafbfd;
133
113
  border-color: #dcdee5;
134
114
  }
135
- .bk-radio-button.is-focused .bk-radio-button-text {
115
+ .bk-radio-button.is-focused .bk-radio-button-label {
136
116
  border-color: #5594fa;
137
117
  }
138
- .bk-radio-group {
139
- display: inline-block;
140
- font-size: 0;
141
- line-height: 0;
142
- letter-spacing: normal;
118
+ .bk-radio-button-input {
119
+ position: absolute;
120
+ z-index: -1;
121
+ outline: none;
122
+ opacity: 0;
123
+ }
124
+ .bk-radio-button-label {
125
+ height: 32px;
126
+ padding: 0 18px;
127
+ font-size: 12px;
128
+ font-style: normal;
129
+ font-weight: normal;
130
+ line-height: 32px;
131
+ color: #63656e;
132
+ text-align: center;
133
+ vertical-align: middle;
134
+ cursor: pointer;
135
+ border: 1px solid #c4c6cc;
136
+ transition: all 0.3s;
137
+ }
138
+ .bk-radio-button-label:hover {
139
+ border-color: #979ba5;
143
140
  }
@@ -1,11 +1,15 @@
1
1
  @import '../styles/themes/themes.less';
2
2
 
3
- .bk-radio {
3
+ .@{bk-prefix}-radio-group {
4
+ display: inline-block;
5
+ letter-spacing: normal;
6
+ }
7
+
8
+ .@{bk-prefix}-radio {
4
9
  display: inline-flex;
5
10
  align-items: center;
6
11
  font-size: @font-size-base;
7
12
  font-weight: normal;
8
- line-height: 1;
9
13
  letter-spacing: normal;
10
14
  color: @radio-font-color;
11
15
  white-space: nowrap;
@@ -13,43 +17,12 @@
13
17
  outline: none;
14
18
  user-select: none;
15
19
 
16
- &~.bk-radio {
20
+ & ~ .@{bk-prefix}-radio {
17
21
  margin-left: 30px;
18
22
  }
19
23
 
20
- .bk-radio-text {
21
- font-size: 12px;
22
- font-style: normal;
23
- font-weight: normal;
24
- vertical-align: middle;
25
- cursor: pointer;
26
- }
27
-
28
- .bk-radio-input {
29
- position: relative;
30
- display: inline-block;
31
- width: @line-height-base;
32
- height: @line-height-base;
33
- margin: 0 5px 0 0;
34
- color: #fff;
35
- vertical-align: middle;
36
- cursor: pointer;
37
- background-color: #fff;
38
- border: @border-width-base @border-style-base @light-gray;
39
- border-radius: 50%;
40
- outline: none;
41
- visibility: visible;
42
- transition: all .3s;
43
- background-clip: content-box;
44
- appearance: none;
45
-
46
- &:hover {
47
- border-color: @radio-hover-border-color;
48
- }
49
- }
50
-
51
24
  &.is-checked {
52
- .bk-radio-input {
25
+ .@{bk-prefix}-radio-input {
53
26
  padding: 3px;
54
27
  color: @radio-active-color;
55
28
  background-color: @radio-active-color;
@@ -62,29 +35,60 @@
62
35
  cursor: not-allowed;
63
36
 
64
37
  &.is-checked {
65
- .bk-radio-input {
38
+ .@{bk-prefix}-radio-input {
66
39
  background-color: @radio-distable-checked-bg;
67
40
  }
68
41
  }
69
42
 
70
- .bk-radio-input {
43
+ .@{bk-prefix}-radio-input {
71
44
  cursor: not-allowed;
72
45
  border-color: @radio-disabled-border;
73
46
  }
74
47
 
75
- .bk-radio-text {
48
+ .@{bk-prefix}-radio-label {
76
49
  cursor: not-allowed;
77
50
  }
78
51
  }
79
52
 
80
53
  &.is-focused {
81
- .bk-radio-input {
54
+ .@{bk-prefix}-radio-input {
82
55
  border-color: @radio-active-color;
83
56
  }
84
57
  }
85
58
  }
86
59
 
87
- .bk-radio-button {
60
+ .@{bk-prefix}-radio-input {
61
+ position: relative;
62
+ display: inline-block;
63
+ width: @line-height-base;
64
+ height: @line-height-base;
65
+ color: #fff;
66
+ vertical-align: middle;
67
+ cursor: pointer;
68
+ background-color: #fff;
69
+ border: @border-width-base @border-style-base @light-gray;
70
+ border-radius: 50%;
71
+ outline: none;
72
+ visibility: visible;
73
+ transition: all .3s;
74
+ background-clip: content-box;
75
+ appearance: none;
76
+
77
+ &:hover {
78
+ border-color: @radio-hover-border-color;
79
+ }
80
+ }
81
+
82
+ .@{bk-prefix}-radio-label {
83
+ margin-left: 5px;
84
+ font-size: 12px;
85
+ font-style: normal;
86
+ font-weight: normal;
87
+ vertical-align: middle;
88
+ cursor: pointer;
89
+ }
90
+
91
+ .@{bk-prefix}-radio-button {
88
92
  position: relative;
89
93
  z-index: 1;
90
94
  display: inline-block;
@@ -103,41 +107,15 @@
103
107
  margin-left: -1px;
104
108
  }
105
109
 
106
- .bk-radio-button-input {
107
- position: absolute;
108
- z-index: -1;
109
- outline: none;
110
- opacity: 0;
111
- }
112
-
113
- .bk-radio-button-text {
114
- height: @component-size-base;
115
- padding: 0 18px;
116
- font-size: 12px;
117
- font-style: normal;
118
- font-weight: normal;
119
- line-height: @component-size-base;
120
- color: @default-color;
121
- text-align: center;
122
- vertical-align: middle;
123
- cursor: pointer;
124
- border: @border-width-base @border-style-base @light-gray;
125
- transition: all .3s;
126
-
127
- &:hover {
128
- border-color: @radio-hover-border-color;
129
- }
130
- }
131
-
132
110
  &:first-child {
133
- .bk-radio-button-text {
111
+ .@{bk-prefix}-radio-button-label {
134
112
  border-bottom-left-radius: @border-radius-base;
135
113
  border-top-left-radius: @border-radius-base;
136
114
  }
137
115
  }
138
116
 
139
117
  &:last-child {
140
- .bk-radio-button-text {
118
+ .@{bk-prefix}-radio-button-label {
141
119
  border-top-right-radius: @border-radius-base;
142
120
  border-bottom-right-radius: @border-radius-base;
143
121
  }
@@ -146,7 +124,7 @@
146
124
  &.is-checked {
147
125
  z-index: 2;
148
126
 
149
- .bk-radio-button-text {
127
+ .@{bk-prefix}-radio-button-label {
150
128
  color: @radio-active-color;
151
129
  background: @radio-button-checked-bg;
152
130
  border-color: @radio-active-color;
@@ -158,7 +136,7 @@
158
136
  color: @radio-disabled-font-color;
159
137
  cursor: not-allowed;
160
138
 
161
- .bk-radio-button-text {
139
+ .@{bk-prefix}-radio-button-label {
162
140
  cursor: not-allowed;
163
141
  background: @radio-distable-checked-bg;
164
142
  border-color: @radio-disabled-border;
@@ -166,17 +144,35 @@
166
144
  }
167
145
 
168
146
  &.is-focused {
169
- .bk-radio-button-text {
147
+ .@{bk-prefix}-radio-button-label {
170
148
  border-color: @radio-active-color;
171
149
  }
172
150
  }
151
+ }
173
152
 
174
-
153
+ .@{bk-prefix}-radio-button-input {
154
+ position: absolute;
155
+ z-index: -1;
156
+ outline: none;
157
+ opacity: 0;
158
+ }
159
+
160
+ .@{bk-prefix}-radio-button-label {
161
+ height: @component-size-base;
162
+ padding: 0 18px;
163
+ font-size: 12px;
164
+ font-style: normal;
165
+ font-weight: normal;
166
+ line-height: @component-size-base;
167
+ color: @default-color;
168
+ text-align: center;
169
+ vertical-align: middle;
170
+ cursor: pointer;
171
+ border: @border-width-base @border-style-base @light-gray;
172
+ transition: all .3s;
173
+
174
+ &:hover {
175
+ border-color: @radio-hover-border-color;
176
+ }
175
177
  }
176
178
 
177
- .bk-radio-group {
178
- display: inline-block;
179
- font-size: 0;
180
- line-height: 0;
181
- letter-spacing: normal;
182
- }
@@ -117,12 +117,15 @@
117
117
  --search-select-placeholder-color: var(--light-gray);
118
118
  --search-select-message-color: var(--danger-color);
119
119
  }
120
+ .bk-radio-group {
121
+ display: inline-block;
122
+ letter-spacing: normal;
123
+ }
120
124
  .bk-radio {
121
125
  display: inline-flex;
122
126
  align-items: center;
123
127
  font-size: var(--font-size-base);
124
128
  font-weight: normal;
125
- line-height: 1;
126
129
  letter-spacing: normal;
127
130
  color: var(--radio-font-color);
128
131
  white-space: nowrap;
@@ -133,34 +136,6 @@
133
136
  .bk-radio ~ .bk-radio {
134
137
  margin-left: 30px;
135
138
  }
136
- .bk-radio .bk-radio-text {
137
- font-size: 12px;
138
- font-style: normal;
139
- font-weight: normal;
140
- vertical-align: middle;
141
- cursor: pointer;
142
- }
143
- .bk-radio .bk-radio-input {
144
- position: relative;
145
- display: inline-block;
146
- width: var(--line-height-base);
147
- height: var(--line-height-base);
148
- margin: 0 5px 0 0;
149
- color: #fff;
150
- vertical-align: middle;
151
- cursor: pointer;
152
- background-color: #fff;
153
- border: var(--border-width-base) var(--border-style-base) var(--light-gray);
154
- border-radius: 50%;
155
- outline: none;
156
- visibility: visible;
157
- transition: all 0.3s;
158
- background-clip: content-box;
159
- appearance: none;
160
- }
161
- .bk-radio .bk-radio-input:hover {
162
- border-color: var(--radio-hover-border-color);
163
- }
164
139
  .bk-radio.is-checked .bk-radio-input {
165
140
  padding: 3px;
166
141
  color: var(--radio-active-color);
@@ -178,12 +153,40 @@
178
153
  cursor: not-allowed;
179
154
  border-color: var(--radio-disabled-border);
180
155
  }
181
- .bk-radio.is-disabled .bk-radio-text {
156
+ .bk-radio.is-disabled .bk-radio-label {
182
157
  cursor: not-allowed;
183
158
  }
184
159
  .bk-radio.is-focused .bk-radio-input {
185
160
  border-color: var(--radio-active-color);
186
161
  }
162
+ .bk-radio-input {
163
+ position: relative;
164
+ display: inline-block;
165
+ width: var(--line-height-base);
166
+ height: var(--line-height-base);
167
+ color: #fff;
168
+ vertical-align: middle;
169
+ cursor: pointer;
170
+ background-color: #fff;
171
+ border: var(--border-width-base) var(--border-style-base) var(--light-gray);
172
+ border-radius: 50%;
173
+ outline: none;
174
+ visibility: visible;
175
+ transition: all 0.3s;
176
+ background-clip: content-box;
177
+ appearance: none;
178
+ }
179
+ .bk-radio-input:hover {
180
+ border-color: var(--radio-hover-border-color);
181
+ }
182
+ .bk-radio-label {
183
+ margin-left: 5px;
184
+ font-size: 12px;
185
+ font-style: normal;
186
+ font-weight: normal;
187
+ vertical-align: middle;
188
+ cursor: pointer;
189
+ }
187
190
  .bk-radio-button {
188
191
  position: relative;
189
192
  z-index: 1;
@@ -202,41 +205,18 @@
202
205
  .bk-radio-button:nth-child(n+2) {
203
206
  margin-left: -1px;
204
207
  }
205
- .bk-radio-button .bk-radio-button-input {
206
- position: absolute;
207
- z-index: -1;
208
- outline: none;
209
- opacity: 0;
210
- }
211
- .bk-radio-button .bk-radio-button-text {
212
- height: var(--component-size-base);
213
- padding: 0 18px;
214
- font-size: 12px;
215
- font-style: normal;
216
- font-weight: normal;
217
- line-height: var(--component-size-base);
218
- color: var(--default-color);
219
- text-align: center;
220
- vertical-align: middle;
221
- cursor: pointer;
222
- border: var(--border-width-base) var(--border-style-base) var(--light-gray);
223
- transition: all 0.3s;
224
- }
225
- .bk-radio-button .bk-radio-button-text:hover {
226
- border-color: var(--radio-hover-border-color);
227
- }
228
- .bk-radio-button:first-child .bk-radio-button-text {
208
+ .bk-radio-button:first-child .bk-radio-button-label {
229
209
  border-bottom-left-radius: var(--border-radius-base);
230
210
  border-top-left-radius: var(--border-radius-base);
231
211
  }
232
- .bk-radio-button:last-child .bk-radio-button-text {
212
+ .bk-radio-button:last-child .bk-radio-button-label {
233
213
  border-top-right-radius: var(--border-radius-base);
234
214
  border-bottom-right-radius: var(--border-radius-base);
235
215
  }
236
216
  .bk-radio-button.is-checked {
237
217
  z-index: 2;
238
218
  }
239
- .bk-radio-button.is-checked .bk-radio-button-text {
219
+ .bk-radio-button.is-checked .bk-radio-button-label {
240
220
  color: var(--radio-active-color);
241
221
  background: var(--radio-button-checked-bg);
242
222
  border-color: var(--radio-active-color);
@@ -246,17 +226,34 @@
246
226
  color: var(--radio-disabled-font-color);
247
227
  cursor: not-allowed;
248
228
  }
249
- .bk-radio-button.is-disabled .bk-radio-button-text {
229
+ .bk-radio-button.is-disabled .bk-radio-button-label {
250
230
  cursor: not-allowed;
251
231
  background: var(--radio-distable-checked-bg);
252
232
  border-color: var(--radio-disabled-border);
253
233
  }
254
- .bk-radio-button.is-focused .bk-radio-button-text {
234
+ .bk-radio-button.is-focused .bk-radio-button-label {
255
235
  border-color: var(--radio-active-color);
256
236
  }
257
- .bk-radio-group {
258
- display: inline-block;
259
- font-size: 0;
260
- line-height: 0;
261
- letter-spacing: normal;
237
+ .bk-radio-button-input {
238
+ position: absolute;
239
+ z-index: -1;
240
+ outline: none;
241
+ opacity: 0;
242
+ }
243
+ .bk-radio-button-label {
244
+ height: var(--component-size-base);
245
+ padding: 0 18px;
246
+ font-size: 12px;
247
+ font-style: normal;
248
+ font-weight: normal;
249
+ line-height: var(--component-size-base);
250
+ color: var(--default-color);
251
+ text-align: center;
252
+ vertical-align: middle;
253
+ cursor: pointer;
254
+ border: var(--border-width-base) var(--border-style-base) var(--light-gray);
255
+ transition: all 0.3s;
256
+ }
257
+ .bk-radio-button-label:hover {
258
+ border-color: var(--radio-hover-border-color);
262
259
  }