cx 26.3.8 → 26.3.10

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.
@@ -82,7 +82,6 @@ export interface WheelComponentProps {
82
82
 
83
83
  interface WheelComponentState {
84
84
  wheelHeight?: number;
85
- wheelWidth?: number;
86
85
  }
87
86
 
88
87
  export class WheelComponent extends VDOM.Component<WheelComponentProps, WheelComponentState> {
@@ -145,9 +144,6 @@ export class WheelComponent extends VDOM.Component<WheelComponentProps, WheelCom
145
144
  >
146
145
  <div
147
146
  className={CSS.element(baseClass, "clip")}
148
- style={{
149
- width: this.state.wheelWidth,
150
- }}
151
147
  onMouseDown={onMouseDown}
152
148
  >
153
149
  <div
@@ -220,7 +216,6 @@ export class WheelComponent extends VDOM.Component<WheelComponentProps, WheelCom
220
216
  this.setState(
221
217
  {
222
218
  wheelHeight: this.wheelEl.offsetHeight,
223
- wheelWidth: this.wheelEl.offsetWidth,
224
219
  },
225
220
  () => {
226
221
  if (this.state.wheelHeight !== undefined) {
@@ -28,6 +28,7 @@ $cx-default-wheel-clip-background-color: #fff !default;
28
28
  $cx-default-wheel-clip-border-width: 1px !default;
29
29
  $cx-default-wheel-clip-border-radius: 0 !default;
30
30
  $cx-default-wheel-clip-border-color: #d3d3d3 !default;
31
+ $cx-default-wheel-option-padding: 5px 15px !default;
31
32
 
32
33
  $cx-wheel-selection-state-style-map: (
33
34
  default: (
@@ -80,7 +80,12 @@
80
80
  }
81
81
 
82
82
  &.#{$state}icon {
83
- padding-left: cx-calc($icon-size);
83
+ padding-left: cx-calc(
84
+ max(1lh, $icon-size),
85
+ cx-top($value),
86
+ cx-top($value),
87
+ cx-multiply(cx-left($value), -1)
88
+ );
84
89
  }
85
90
 
86
91
  &.#{$state}empty {
@@ -92,7 +97,7 @@
92
97
  }
93
98
 
94
99
  & > .#{$element}#{$name}-button {
95
- width: cx-calc(cx-left($value), $icon-size);
100
+ left: cx-calc(cx-top($value), 0.5lh, cx-multiply($icon-size, -0.5));
96
101
  }
97
102
  }
98
103
  }
@@ -112,9 +117,9 @@
112
117
 
113
118
  .#{$element}#{$name}-button {
114
119
  position: absolute;
115
- left: 0;
116
120
  top: 0;
117
121
  bottom: 0;
122
+ width: max($icon-size, 1lh);
118
123
  }
119
124
 
120
125
  .#{$element}#{$name}-baseline {
@@ -305,8 +305,8 @@ class MenuItemComponent extends VDOM.Component<MenuItemComponentProps, MenuItemC
305
305
  onClick={this.onClick.bind(this)}
306
306
  onBlur={this.onBlur.bind(this)}
307
307
  >
308
- {children}
309
308
  {icon}
309
+ {children}
310
310
  {arrow}
311
311
  {dropdown}
312
312
  </div>