baseui 0.0.0-next-2ebe581 → 0.0.0-next-03a6fdb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button/styled-components.js +1 -1
- package/button/styled-components.js.flow +4 -1
- package/datepicker/day.js +1 -0
- package/datepicker/day.js.flow +1 -0
- package/datepicker/index.d.ts +1 -0
- package/datepicker/types.js.flow +1 -0
- package/es/button/styled-components.js +1 -1
- package/es/datepicker/day.js +1 -0
- package/es/select/select-component.js +0 -1
- package/es/select/styled-components.js +34 -4
- package/esm/button/styled-components.js +1 -1
- package/esm/datepicker/day.js +1 -0
- package/esm/select/select-component.js +0 -1
- package/esm/select/styled-components.js +28 -4
- package/package.json +1 -1
- package/select/select-component.js +0 -1
- package/select/select-component.js.flow +0 -1
- package/select/styled-components.js +28 -4
- package/select/styled-components.js.flow +30 -2
|
@@ -48,7 +48,7 @@ var BaseButton = (0, _index.styled)('button', function (_ref) {
|
|
|
48
48
|
cursor: 'pointer',
|
|
49
49
|
':disabled': {
|
|
50
50
|
cursor: 'not-allowed',
|
|
51
|
-
backgroundColor: $theme.colors.buttonDisabledFill,
|
|
51
|
+
backgroundColor: $kind === _constants.KIND.minimal || $kind === _constants.KIND.tertiary ? 'transparent' : $theme.colors.buttonDisabledFill,
|
|
52
52
|
color: $theme.colors.buttonDisabledText
|
|
53
53
|
},
|
|
54
54
|
marginLeft: 0,
|
|
@@ -46,7 +46,10 @@ export const BaseButton = styled<SharedStylePropsT>(
|
|
|
46
46
|
cursor: 'pointer',
|
|
47
47
|
':disabled': {
|
|
48
48
|
cursor: 'not-allowed',
|
|
49
|
-
backgroundColor:
|
|
49
|
+
backgroundColor:
|
|
50
|
+
$kind === KIND.minimal || $kind === KIND.tertiary
|
|
51
|
+
? 'transparent'
|
|
52
|
+
: $theme.colors.buttonDisabledFill,
|
|
50
53
|
color: $theme.colors.buttonDisabledText,
|
|
51
54
|
},
|
|
52
55
|
marginLeft: 0,
|
package/datepicker/day.js
CHANGED
|
@@ -357,6 +357,7 @@ var Day = /*#__PURE__*/function (_React$Component) {
|
|
|
357
357
|
$isFocusVisible: this.state.isFocusVisible,
|
|
358
358
|
$startOfMonth: this.dateHelpers.isStartOfMonth(date),
|
|
359
359
|
$endOfMonth: this.dateHelpers.isEndOfMonth(date),
|
|
360
|
+
$month: this.getMonthProp(),
|
|
360
361
|
$outsideMonth: $outsideMonth,
|
|
361
362
|
$outsideMonthWithinRange: $outsideMonthWithinRange,
|
|
362
363
|
$peekNextMonth: this.props.peekNextMonth,
|
package/datepicker/day.js.flow
CHANGED
|
@@ -313,6 +313,7 @@ export default class Day<T = Date> extends React.Component<
|
|
|
313
313
|
$isFocusVisible: this.state.isFocusVisible,
|
|
314
314
|
$startOfMonth: this.dateHelpers.isStartOfMonth(date),
|
|
315
315
|
$endOfMonth: this.dateHelpers.isEndOfMonth(date),
|
|
316
|
+
$month: this.getMonthProp(),
|
|
316
317
|
$outsideMonth,
|
|
317
318
|
$outsideMonthWithinRange,
|
|
318
319
|
$peekNextMonth: this.props.peekNextMonth,
|
package/datepicker/index.d.ts
CHANGED
package/datepicker/types.js.flow
CHANGED
|
@@ -39,7 +39,7 @@ export const BaseButton = styled('button', ({
|
|
|
39
39
|
cursor: 'pointer',
|
|
40
40
|
':disabled': {
|
|
41
41
|
cursor: 'not-allowed',
|
|
42
|
-
backgroundColor: $theme.colors.buttonDisabledFill,
|
|
42
|
+
backgroundColor: $kind === KIND.minimal || $kind === KIND.tertiary ? 'transparent' : $theme.colors.buttonDisabledFill,
|
|
43
43
|
color: $theme.colors.buttonDisabledText
|
|
44
44
|
},
|
|
45
45
|
marginLeft: 0,
|
package/es/datepicker/day.js
CHANGED
|
@@ -292,6 +292,7 @@ export default class Day extends React.Component {
|
|
|
292
292
|
$isFocusVisible: this.state.isFocusVisible,
|
|
293
293
|
$startOfMonth: this.dateHelpers.isStartOfMonth(date),
|
|
294
294
|
$endOfMonth: this.dateHelpers.isEndOfMonth(date),
|
|
295
|
+
$month: this.getMonthProp(),
|
|
295
296
|
$outsideMonth,
|
|
296
297
|
$outsideMonthWithinRange,
|
|
297
298
|
$peekNextMonth: this.props.peekNextMonth,
|
|
@@ -797,7 +797,6 @@ class Select extends React.Component {
|
|
|
797
797
|
const [ClearIcon, clearIconProps] = getOverrides(overrides.ClearIcon, DeleteAlt);
|
|
798
798
|
const ariaLabel = this.props.multi ? 'Clear all' : 'Clear value';
|
|
799
799
|
return /*#__PURE__*/React.createElement(ClearIcon, _extends({
|
|
800
|
-
size: 16,
|
|
801
800
|
title: ariaLabel,
|
|
802
801
|
"aria-label": ariaLabel,
|
|
803
802
|
onClick: this.clearValue,
|
|
@@ -375,31 +375,61 @@ function getSvgStyles({
|
|
|
375
375
|
export const StyledSelectArrow = styled('svg', props => {
|
|
376
376
|
const {
|
|
377
377
|
$theme,
|
|
378
|
-
$disabled
|
|
378
|
+
$disabled,
|
|
379
|
+
$size
|
|
379
380
|
} = props;
|
|
380
381
|
const {
|
|
381
382
|
colors
|
|
382
383
|
} = $theme;
|
|
384
|
+
const sizes = {
|
|
385
|
+
[SIZE.mini]: 16,
|
|
386
|
+
[SIZE.compact]: 16,
|
|
387
|
+
[SIZE.default]: 20,
|
|
388
|
+
[SIZE.large]: 24
|
|
389
|
+
};
|
|
390
|
+
let size = sizes[SIZE.default];
|
|
391
|
+
|
|
392
|
+
if ($size) {
|
|
393
|
+
size = sizes[$size];
|
|
394
|
+
}
|
|
395
|
+
|
|
383
396
|
return { ...getSvgStyles({
|
|
384
397
|
$theme
|
|
385
398
|
}),
|
|
386
399
|
color: $disabled ? colors.inputTextDisabled : colors.contentPrimary,
|
|
387
|
-
cursor: $disabled ? 'not-allowed' : 'pointer'
|
|
400
|
+
cursor: $disabled ? 'not-allowed' : 'pointer',
|
|
401
|
+
height: `${size}px`,
|
|
402
|
+
width: `${size}px`
|
|
388
403
|
};
|
|
389
404
|
});
|
|
390
405
|
StyledSelectArrow.displayName = "StyledSelectArrow";
|
|
391
406
|
export const StyledClearIcon = styled('svg', props => {
|
|
392
407
|
const {
|
|
393
|
-
$theme
|
|
408
|
+
$theme,
|
|
409
|
+
$size
|
|
394
410
|
} = props;
|
|
395
411
|
const {
|
|
396
412
|
colors
|
|
397
413
|
} = $theme;
|
|
414
|
+
const sizes = {
|
|
415
|
+
[SIZE.mini]: 15,
|
|
416
|
+
[SIZE.compact]: 15,
|
|
417
|
+
[SIZE.default]: 18,
|
|
418
|
+
[SIZE.large]: 22
|
|
419
|
+
};
|
|
420
|
+
let size = sizes[SIZE.default];
|
|
421
|
+
|
|
422
|
+
if ($size) {
|
|
423
|
+
size = sizes[$size];
|
|
424
|
+
}
|
|
425
|
+
|
|
398
426
|
return { ...getSvgStyles({
|
|
399
427
|
$theme
|
|
400
428
|
}),
|
|
401
429
|
color: colors.contentPrimary,
|
|
402
|
-
cursor: 'pointer'
|
|
430
|
+
cursor: 'pointer',
|
|
431
|
+
height: `${size}px`,
|
|
432
|
+
width: `${size}px`
|
|
403
433
|
};
|
|
404
434
|
});
|
|
405
435
|
StyledClearIcon.displayName = "StyledClearIcon";
|
|
@@ -45,7 +45,7 @@ export var BaseButton = styled('button', function (_ref) {
|
|
|
45
45
|
cursor: 'pointer',
|
|
46
46
|
':disabled': {
|
|
47
47
|
cursor: 'not-allowed',
|
|
48
|
-
backgroundColor: $theme.colors.buttonDisabledFill,
|
|
48
|
+
backgroundColor: $kind === KIND.minimal || $kind === KIND.tertiary ? 'transparent' : $theme.colors.buttonDisabledFill,
|
|
49
49
|
color: $theme.colors.buttonDisabledText
|
|
50
50
|
},
|
|
51
51
|
marginLeft: 0,
|
package/esm/datepicker/day.js
CHANGED
|
@@ -344,6 +344,7 @@ var Day = /*#__PURE__*/function (_React$Component) {
|
|
|
344
344
|
$isFocusVisible: this.state.isFocusVisible,
|
|
345
345
|
$startOfMonth: this.dateHelpers.isStartOfMonth(date),
|
|
346
346
|
$endOfMonth: this.dateHelpers.isEndOfMonth(date),
|
|
347
|
+
$month: this.getMonthProp(),
|
|
347
348
|
$outsideMonth: $outsideMonth,
|
|
348
349
|
$outsideMonthWithinRange: $outsideMonthWithinRange,
|
|
349
350
|
$peekNextMonth: this.props.peekNextMonth,
|
|
@@ -926,7 +926,6 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
926
926
|
|
|
927
927
|
var ariaLabel = this.props.multi ? 'Clear all' : 'Clear value';
|
|
928
928
|
return /*#__PURE__*/React.createElement(ClearIcon, _extends({
|
|
929
|
-
size: 16,
|
|
930
929
|
title: ariaLabel,
|
|
931
930
|
"aria-label": ariaLabel,
|
|
932
931
|
onClick: this.clearValue,
|
|
@@ -326,25 +326,49 @@ function getSvgStyles(_ref4) {
|
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
export var StyledSelectArrow = styled('svg', function (props) {
|
|
329
|
+
var _sizes;
|
|
330
|
+
|
|
329
331
|
var $theme = props.$theme,
|
|
330
|
-
$disabled = props.$disabled
|
|
332
|
+
$disabled = props.$disabled,
|
|
333
|
+
$size = props.$size;
|
|
331
334
|
var colors = $theme.colors;
|
|
335
|
+
var sizes = (_sizes = {}, _defineProperty(_sizes, SIZE.mini, 16), _defineProperty(_sizes, SIZE.compact, 16), _defineProperty(_sizes, SIZE.default, 20), _defineProperty(_sizes, SIZE.large, 24), _sizes);
|
|
336
|
+
var size = sizes[SIZE.default];
|
|
337
|
+
|
|
338
|
+
if ($size) {
|
|
339
|
+
size = sizes[$size];
|
|
340
|
+
}
|
|
341
|
+
|
|
332
342
|
return _objectSpread(_objectSpread({}, getSvgStyles({
|
|
333
343
|
$theme: $theme
|
|
334
344
|
})), {}, {
|
|
335
345
|
color: $disabled ? colors.inputTextDisabled : colors.contentPrimary,
|
|
336
|
-
cursor: $disabled ? 'not-allowed' : 'pointer'
|
|
346
|
+
cursor: $disabled ? 'not-allowed' : 'pointer',
|
|
347
|
+
height: "".concat(size, "px"),
|
|
348
|
+
width: "".concat(size, "px")
|
|
337
349
|
});
|
|
338
350
|
});
|
|
339
351
|
StyledSelectArrow.displayName = "StyledSelectArrow";
|
|
340
352
|
export var StyledClearIcon = styled('svg', function (props) {
|
|
341
|
-
var
|
|
353
|
+
var _sizes2;
|
|
354
|
+
|
|
355
|
+
var $theme = props.$theme,
|
|
356
|
+
$size = props.$size;
|
|
342
357
|
var colors = $theme.colors;
|
|
358
|
+
var sizes = (_sizes2 = {}, _defineProperty(_sizes2, SIZE.mini, 15), _defineProperty(_sizes2, SIZE.compact, 15), _defineProperty(_sizes2, SIZE.default, 18), _defineProperty(_sizes2, SIZE.large, 22), _sizes2);
|
|
359
|
+
var size = sizes[SIZE.default];
|
|
360
|
+
|
|
361
|
+
if ($size) {
|
|
362
|
+
size = sizes[$size];
|
|
363
|
+
}
|
|
364
|
+
|
|
343
365
|
return _objectSpread(_objectSpread({}, getSvgStyles({
|
|
344
366
|
$theme: $theme
|
|
345
367
|
})), {}, {
|
|
346
368
|
color: colors.contentPrimary,
|
|
347
|
-
cursor: 'pointer'
|
|
369
|
+
cursor: 'pointer',
|
|
370
|
+
height: "".concat(size, "px"),
|
|
371
|
+
width: "".concat(size, "px")
|
|
348
372
|
});
|
|
349
373
|
});
|
|
350
374
|
StyledClearIcon.displayName = "StyledClearIcon";
|
package/package.json
CHANGED
|
@@ -947,7 +947,6 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
947
947
|
|
|
948
948
|
var ariaLabel = this.props.multi ? 'Clear all' : 'Clear value';
|
|
949
949
|
return /*#__PURE__*/React.createElement(ClearIcon, _extends({
|
|
950
|
-
size: 16,
|
|
951
950
|
title: ariaLabel,
|
|
952
951
|
"aria-label": ariaLabel,
|
|
953
952
|
onClick: this.clearValue,
|
|
@@ -342,26 +342,50 @@ function getSvgStyles(_ref4) {
|
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
var StyledSelectArrow = (0, _index.styled)('svg', function (props) {
|
|
345
|
+
var _sizes;
|
|
346
|
+
|
|
345
347
|
var $theme = props.$theme,
|
|
346
|
-
$disabled = props.$disabled
|
|
348
|
+
$disabled = props.$disabled,
|
|
349
|
+
$size = props.$size;
|
|
347
350
|
var colors = $theme.colors;
|
|
351
|
+
var sizes = (_sizes = {}, _defineProperty(_sizes, _constants.SIZE.mini, 16), _defineProperty(_sizes, _constants.SIZE.compact, 16), _defineProperty(_sizes, _constants.SIZE.default, 20), _defineProperty(_sizes, _constants.SIZE.large, 24), _sizes);
|
|
352
|
+
var size = sizes[_constants.SIZE.default];
|
|
353
|
+
|
|
354
|
+
if ($size) {
|
|
355
|
+
size = sizes[$size];
|
|
356
|
+
}
|
|
357
|
+
|
|
348
358
|
return _objectSpread(_objectSpread({}, getSvgStyles({
|
|
349
359
|
$theme: $theme
|
|
350
360
|
})), {}, {
|
|
351
361
|
color: $disabled ? colors.inputTextDisabled : colors.contentPrimary,
|
|
352
|
-
cursor: $disabled ? 'not-allowed' : 'pointer'
|
|
362
|
+
cursor: $disabled ? 'not-allowed' : 'pointer',
|
|
363
|
+
height: "".concat(size, "px"),
|
|
364
|
+
width: "".concat(size, "px")
|
|
353
365
|
});
|
|
354
366
|
});
|
|
355
367
|
exports.StyledSelectArrow = StyledSelectArrow;
|
|
356
368
|
StyledSelectArrow.displayName = "StyledSelectArrow";
|
|
357
369
|
var StyledClearIcon = (0, _index.styled)('svg', function (props) {
|
|
358
|
-
var
|
|
370
|
+
var _sizes2;
|
|
371
|
+
|
|
372
|
+
var $theme = props.$theme,
|
|
373
|
+
$size = props.$size;
|
|
359
374
|
var colors = $theme.colors;
|
|
375
|
+
var sizes = (_sizes2 = {}, _defineProperty(_sizes2, _constants.SIZE.mini, 15), _defineProperty(_sizes2, _constants.SIZE.compact, 15), _defineProperty(_sizes2, _constants.SIZE.default, 18), _defineProperty(_sizes2, _constants.SIZE.large, 22), _sizes2);
|
|
376
|
+
var size = sizes[_constants.SIZE.default];
|
|
377
|
+
|
|
378
|
+
if ($size) {
|
|
379
|
+
size = sizes[$size];
|
|
380
|
+
}
|
|
381
|
+
|
|
360
382
|
return _objectSpread(_objectSpread({}, getSvgStyles({
|
|
361
383
|
$theme: $theme
|
|
362
384
|
})), {}, {
|
|
363
385
|
color: colors.contentPrimary,
|
|
364
|
-
cursor: 'pointer'
|
|
386
|
+
cursor: 'pointer',
|
|
387
|
+
height: "".concat(size, "px"),
|
|
388
|
+
width: "".concat(size, "px")
|
|
365
389
|
});
|
|
366
390
|
});
|
|
367
391
|
exports.StyledClearIcon = StyledClearIcon;
|
|
@@ -425,22 +425,50 @@ function getSvgStyles({$theme}) {
|
|
|
425
425
|
}
|
|
426
426
|
|
|
427
427
|
export const StyledSelectArrow = styled<SharedStylePropsArgT>('svg', props => {
|
|
428
|
-
const {$theme, $disabled} = props;
|
|
428
|
+
const {$theme, $disabled, $size} = props;
|
|
429
429
|
const {colors} = $theme;
|
|
430
|
+
|
|
431
|
+
const sizes = {
|
|
432
|
+
[SIZE.mini]: 16,
|
|
433
|
+
[SIZE.compact]: 16,
|
|
434
|
+
[SIZE.default]: 20,
|
|
435
|
+
[SIZE.large]: 24,
|
|
436
|
+
};
|
|
437
|
+
let size = sizes[SIZE.default];
|
|
438
|
+
if ($size) {
|
|
439
|
+
size = sizes[$size];
|
|
440
|
+
}
|
|
441
|
+
|
|
430
442
|
return {
|
|
431
443
|
...getSvgStyles({$theme}),
|
|
432
444
|
color: $disabled ? colors.inputTextDisabled : colors.contentPrimary,
|
|
433
445
|
cursor: $disabled ? 'not-allowed' : 'pointer',
|
|
446
|
+
height: `${size}px`,
|
|
447
|
+
width: `${size}px`,
|
|
434
448
|
};
|
|
435
449
|
});
|
|
436
450
|
|
|
437
451
|
export const StyledClearIcon = styled<SharedStylePropsArgT>('svg', props => {
|
|
438
|
-
const {$theme} = props;
|
|
452
|
+
const {$theme, $size} = props;
|
|
439
453
|
const {colors} = $theme;
|
|
454
|
+
|
|
455
|
+
const sizes = {
|
|
456
|
+
[SIZE.mini]: 15,
|
|
457
|
+
[SIZE.compact]: 15,
|
|
458
|
+
[SIZE.default]: 18,
|
|
459
|
+
[SIZE.large]: 22,
|
|
460
|
+
};
|
|
461
|
+
let size = sizes[SIZE.default];
|
|
462
|
+
if ($size) {
|
|
463
|
+
size = sizes[$size];
|
|
464
|
+
}
|
|
465
|
+
|
|
440
466
|
return {
|
|
441
467
|
...getSvgStyles({$theme}),
|
|
442
468
|
color: colors.contentPrimary,
|
|
443
469
|
cursor: 'pointer',
|
|
470
|
+
height: `${size}px`,
|
|
471
|
+
width: `${size}px`,
|
|
444
472
|
};
|
|
445
473
|
});
|
|
446
474
|
|