@commercetools-uikit/calendar-utils 15.13.1 → 15.14.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.
|
@@ -288,13 +288,25 @@ var getInputFontColor = function getInputFontColor(props) {
|
|
|
288
288
|
return designSystem.designTokens.fontColorForInput;
|
|
289
289
|
};
|
|
290
290
|
|
|
291
|
+
var getInputContainerBackgroundColor = function getInputContainerBackgroundColor(props) {
|
|
292
|
+
if (props.isDisabled) {
|
|
293
|
+
return designSystem.designTokens.backgroundColorForInputWhenDisabled;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (props.isReadOnly) {
|
|
297
|
+
return designSystem.designTokens.backgroundColorForInputWhenReadonly;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
return designSystem.designTokens.backgroundColorForInput;
|
|
301
|
+
};
|
|
302
|
+
|
|
291
303
|
var getInputContainerStyles = function getInputContainerStyles(props, state, isNewTheme) {
|
|
292
|
-
return [/*#__PURE__*/react.css("appearance:none;background-color:", props
|
|
304
|
+
return [/*#__PURE__*/react.css("appearance:none;background-color:", getInputContainerBackgroundColor(props), ";border:1px solid ", getInputBorderColor(props, state), ";border-radius:", designSystem.designTokens.borderRadiusForInput, ";box-sizing:border-box;color:", getInputFontColor(props), ";cursor:", props.isDisabled ? 'not-allowed' : 'default', ";width:100%;height:", designSystem.designTokens.heightForInput, ";align-items:center;display:flex;font-size:", designSystem.designTokens.fontSizeForInput, ";font-family:inherit;min-width:", designSystem.designTokens.constraint5, ";transition:border-color ", designSystem.designTokens.transitionStandard, ",box-shadow ", designSystem.designTokens.transitionStandard, ";&:hover:not(:focus){background-color:", !props.isDisabled && !props.isReadOnly ? designSystem.designTokens.backgroundColorForInputWhenHovered : null, ";}&:focus{border-color:", props.isDisabled || props.hasError || props.hasWarning || props.isReadOnly || (props.isOpen || state.isFocused) && !props.isReadOnly ? '' : designSystem.designTokens.borderColorForInputWhenFocused, ";}" + ("" ), "" ), !props.isReadOnly && /*#__PURE__*/react.css("&:focus-within{border-color:", designSystem.designTokens.borderColorForInputWhenFocused, ";box-shadow:", designSystem.designTokens.boxShadowForDatetimeInputWhenHovered, " ", designSystem.designTokens.borderColorForInputWhenFocused, ";&:hover{background-color:", designSystem.designTokens.colorSurface, ";}}" + ("" ), "" ), !isNewTheme && /*#__PURE__*/react.css("&:hover,&:hover>button,&:focus>button{border-color:", props.isDisabled || props.hasError || props.hasWarning || props.isReadOnly || (props.isOpen || state.isFocused) && !props.isReadOnly ? '' : designSystem.designTokens.borderColorForInputWhenFocused, ";}" + ("" ), "" ), isNewTheme && (props.hasError || props.hasWarning) && /*#__PURE__*/react.css("box-shadow:", designSystem.designTokens.boxShadowForDatetimeInputWhenHovered, ";" + ("" ), "" )];
|
|
293
305
|
};
|
|
294
306
|
|
|
295
307
|
var _ref$2 = {
|
|
296
|
-
name: "
|
|
297
|
-
styles: "border:none;background:none!important;&,&:focus{box-shadow:none;}"
|
|
308
|
+
name: "1wj7icd",
|
|
309
|
+
styles: "border:none;background:none!important;&,&:focus:not(:read-only){box-shadow:none;}"
|
|
298
310
|
} ;
|
|
299
311
|
|
|
300
312
|
var getDateTimeInputStyles = function getDateTimeInputStyles(props) {
|
|
@@ -539,9 +551,8 @@ var CalendarHeader = function CalendarHeader(props) {
|
|
|
539
551
|
children: jsxRuntime.jsx(SecondaryIconButton__default["default"], {
|
|
540
552
|
label: "show prev month",
|
|
541
553
|
onClick: props.onPrevMonthClick,
|
|
542
|
-
icon: jsxRuntime.jsx(icons.AngleLeftIcon, {
|
|
543
|
-
|
|
544
|
-
})
|
|
554
|
+
icon: jsxRuntime.jsx(icons.AngleLeftIcon, {}),
|
|
555
|
+
size: "medium"
|
|
545
556
|
})
|
|
546
557
|
}), jsxRuntime.jsx(Tooltip__default["default"], {
|
|
547
558
|
title: intl.formatMessage(messages.todayTooltip),
|
|
@@ -551,9 +562,8 @@ var CalendarHeader = function CalendarHeader(props) {
|
|
|
551
562
|
children: jsxRuntime.jsx(SecondaryIconButton__default["default"], {
|
|
552
563
|
label: "show today",
|
|
553
564
|
onClick: props.onTodayClick,
|
|
554
|
-
icon: jsxRuntime.jsx(icons.CircleIcon, {
|
|
555
|
-
|
|
556
|
-
})
|
|
565
|
+
icon: jsxRuntime.jsx(icons.CircleIcon, {}),
|
|
566
|
+
size: "medium"
|
|
557
567
|
})
|
|
558
568
|
}), jsxRuntime.jsx(Tooltip__default["default"], {
|
|
559
569
|
title: intl.formatMessage(messages.nextMonthTooltip),
|
|
@@ -563,9 +573,8 @@ var CalendarHeader = function CalendarHeader(props) {
|
|
|
563
573
|
children: jsxRuntime.jsx(SecondaryIconButton__default["default"], {
|
|
564
574
|
label: "show next month",
|
|
565
575
|
onClick: props.onNextMonthClick,
|
|
566
|
-
icon: jsxRuntime.jsx(icons.AngleRightIcon, {
|
|
567
|
-
|
|
568
|
-
})
|
|
576
|
+
icon: jsxRuntime.jsx(icons.AngleRightIcon, {}),
|
|
577
|
+
size: "medium"
|
|
569
578
|
})
|
|
570
579
|
}), jsxRuntime.jsx(Text__default["default"].Body, {
|
|
571
580
|
as: "span",
|
|
@@ -583,9 +592,8 @@ var CalendarHeader = function CalendarHeader(props) {
|
|
|
583
592
|
children: jsxRuntime.jsx(SecondaryIconButton__default["default"], {
|
|
584
593
|
label: "show prev year",
|
|
585
594
|
onClick: props.onPrevYearClick,
|
|
586
|
-
icon: jsxRuntime.jsx(icons.AngleLeftIcon, {
|
|
587
|
-
|
|
588
|
-
})
|
|
595
|
+
icon: jsxRuntime.jsx(icons.AngleLeftIcon, {}),
|
|
596
|
+
size: "medium"
|
|
589
597
|
})
|
|
590
598
|
}), jsxRuntime.jsx(Text__default["default"].Body, {
|
|
591
599
|
isBold: true,
|
|
@@ -598,9 +606,8 @@ var CalendarHeader = function CalendarHeader(props) {
|
|
|
598
606
|
children: jsxRuntime.jsx(SecondaryIconButton__default["default"], {
|
|
599
607
|
label: "show next year",
|
|
600
608
|
onClick: props.onNextYearClick,
|
|
601
|
-
icon: jsxRuntime.jsx(icons.AngleRightIcon, {
|
|
602
|
-
|
|
603
|
-
})
|
|
609
|
+
icon: jsxRuntime.jsx(icons.AngleRightIcon, {}),
|
|
610
|
+
size: "medium"
|
|
604
611
|
})
|
|
605
612
|
})]
|
|
606
613
|
})]
|
|
@@ -647,7 +654,7 @@ var CalendarMenu = /*#__PURE__*/function (_Component) {
|
|
|
647
654
|
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
648
655
|
|
|
649
656
|
return jsxRuntime.jsxs("div", _objectSpread(_objectSpread({}, rest), {}, {
|
|
650
|
-
css: [/*#__PURE__*/react.css("overflow-y:scroll;color:", designSystem.designTokens.colorSolid, ";font-family:inherit;border:
|
|
657
|
+
css: [/*#__PURE__*/react.css("overflow-y:scroll;color:", designSystem.designTokens.colorSolid, ";font-family:inherit;border:", designSystem.designTokens.borderForCalendarMenuWhenFocused, ";box-shadow:", designSystem.designTokens.boxShadowForCalendarMenuWhenFocused, ";border-radius:", designSystem.designTokens.borderRadiusForInput, ";margin-top:", designSystem.designTokens.spacing10, ";font-size:", designSystem.designTokens.fontSizeDefault, ";position:absolute;box-sizing:border-box;width:100%;background-color:", designSystem.designTokens.colorSurface, ";min-width:", designSystem.designTokens.constraint5, ";z-index:99999;" + ("" ), "" ), !hasFooter && _ref, hasError && /*#__PURE__*/react.css("border-color:", designSystem.designTokens.borderColorForInputWhenError, ";" + ("" ), "" ), hasWarning && /*#__PURE__*/react.css("border-color:", designSystem.designTokens.borderColorForInputWhenWarning, ";" + ("" ), "" ), "" , "" ],
|
|
651
658
|
children: [this.props.children, this.props.footer]
|
|
652
659
|
}));
|
|
653
660
|
}
|
|
@@ -660,7 +667,7 @@ CalendarMenu.displayName = 'CalendarMenu';
|
|
|
660
667
|
CalendarMenu.propTypes = {};
|
|
661
668
|
|
|
662
669
|
// NOTE: This string will be replaced on build time with the package version.
|
|
663
|
-
var version = "15.
|
|
670
|
+
var version = "15.14.0";
|
|
664
671
|
|
|
665
672
|
exports.CalendarBody = CalendarBody$1;
|
|
666
673
|
exports.CalendarContent = CalendarContent$1;
|