@hipay/hipay-material-ui 2.3.0-rc.4 → 2.3.0-rc.PSYCHE-2530
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/HiAlertModal/HiAlertModal.js +18 -80
- package/HiAlertModal/index.js +1 -1
- package/HiAppBar/HiAppBar.js +12 -56
- package/HiAppBar/index.js +1 -1
- package/HiBadge/HiBadge.js +4 -32
- package/HiBadge/index.js +1 -1
- package/HiBreadcrumb/HiBreadcrumb.js +15 -46
- package/HiBreadcrumb/HiStep.js +17 -72
- package/HiBreadcrumb/HiStepConnector.js +18 -57
- package/HiBreadcrumb/HiStepContent.js +10 -20
- package/HiBreadcrumb/HiStepIcon.js +11 -34
- package/HiBreadcrumb/HiStepLabel.js +28 -80
- package/HiBreadcrumb/HiStepper.js +12 -28
- package/HiBreadcrumb/index.js +1 -1
- package/HiButton/HiButton.js +58 -205
- package/HiButton/index.js +6 -8
- package/HiCell/CellAddress.js +10 -51
- package/HiCell/CellDate.js +13 -43
- package/HiCell/CellIcon.js +10 -52
- package/HiCell/CellImage.js +10 -51
- package/HiCell/CellNumeric.js +10 -41
- package/HiCell/CellPinToAction.js +6 -25
- package/HiCell/CellRate.js +9 -47
- package/HiCell/CellSentinel.js +10 -20
- package/HiCell/CellSentinelScore.js +10 -16
- package/HiCell/CellText.js +12 -34
- package/HiCell/CellTextStyled.js +1 -39
- package/HiCell/index.js +1 -1
- package/HiCheckbox/HiCheckbox.js +16 -64
- package/HiCheckbox/index.js +1 -1
- package/HiChip/HiChip.js +15 -115
- package/HiChip/HiChipSwitch.js +22 -76
- package/HiChip/index.js +1 -1
- package/HiColoredLabel/HiColoredLabel.js +13 -55
- package/HiColoredLabel/index.js +1 -1
- package/HiDatePicker/Caption.js +3 -39
- package/HiDatePicker/HiDatePicker.js +56 -150
- package/HiDatePicker/HiDatePickerMobile.js +11 -32
- package/HiDatePicker/HiDateRangePicker.js +71 -226
- package/HiDatePicker/HiDateRangeSelector.js +57 -179
- package/HiDatePicker/ListPicker.js +13 -44
- package/HiDatePicker/NavBar.js +1 -49
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +7 -27
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +7 -27
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +15 -46
- package/HiDatePicker/Overlays/Overlay.js +5 -47
- package/HiDatePicker/Overlays/TimePickerOverlay.js +21 -55
- package/HiDatePicker/Overlays/YearPickerOverlay.js +15 -61
- package/HiDatePicker/Overlays/index.js +1 -1
- package/HiDatePicker/Weekday.js +1 -24
- package/HiDatePicker/index.js +15 -0
- package/HiDatePicker/stylesheet.js +6 -6
- package/HiDotsStepper/HiDot.js +12 -18
- package/HiDotsStepper/HiDotsStepper.js +15 -25
- package/HiDotsStepper/index.js +23 -0
- package/HiExpansionPanel/HiExpansionPanel.js +24 -73
- package/HiExpansionPanel/index.js +6 -8
- package/HiForm/HiAddressField.js +18 -41
- package/HiForm/HiEmailField.js +14 -47
- package/HiForm/HiFormControl.js +28 -125
- package/HiForm/HiFormLabel.js +15 -59
- package/HiForm/HiInput.js +29 -209
- package/HiForm/HiPasswordField.js +14 -26
- package/HiForm/HiSearchField.js +16 -46
- package/HiForm/HiSlider.js +15 -86
- package/HiForm/HiTextField.js +17 -156
- package/HiForm/HiUpload.js +29 -91
- package/HiForm/HiUploadField.js +12 -73
- package/HiForm/HiUploadInput.js +33 -113
- package/HiForm/index.js +1 -1
- package/HiIcon/HiIcon.js +36 -114
- package/HiIcon/index.js +1 -1
- package/HiIconButton/HiIconButton.js +4 -22
- package/HiIconButton/index.js +1 -1
- package/HiLoader/HiLoader.js +7 -27
- package/HiLoader/index.js +1 -1
- package/HiMap/HiMap.js +18 -39
- package/HiMap/HiMapExpand.js +15 -43
- package/HiMap/index.js +1 -1
- package/HiNotice/HiKPI.js +13 -83
- package/HiNotice/HiKPINotice.js +1 -29
- package/HiNotice/index.js +1 -1
- package/HiPaymentMeans/HiPaymentMeans.js +17 -112
- package/HiPaymentMeans/index.js +1 -1
- package/HiPdfReader/HiPdfReader.js +24 -48
- package/HiPdfReader/index.js +1 -1
- package/HiPin/HiPin.js +3 -16
- package/HiPin/index.js +1 -1
- package/HiRadio/HiRadio.js +1 -13
- package/HiRadio/index.js +1 -1
- package/HiSelect/HiDynamicSelect.js +28 -99
- package/HiSelect/HiDynamicSelectField.js +8 -56
- package/HiSelect/HiNestedSelect.js +33 -124
- package/HiSelect/HiNestedSelectContent.js +31 -109
- package/HiSelect/HiNestedSelectField.js +8 -56
- package/HiSelect/HiSelect.js +73 -275
- package/HiSelect/HiSelectContent.js +51 -176
- package/HiSelect/HiSelectField.js +8 -61
- package/HiSelect/HiSelectInput.js +29 -130
- package/HiSelect/HiSelectMobile.js +23 -54
- package/HiSelect/HiSuggestSelect.js +25 -105
- package/HiSelect/HiSuggestSelectField.js +8 -56
- package/HiSelect/index.js +2 -2
- package/HiSelectableList/HiSelectableList.js +24 -122
- package/HiSelectableList/HiSelectableListHierarchic.js +18 -78
- package/HiSelectableList/HiSelectableListItem.js +22 -161
- package/HiSelectableList/index.js +1 -1
- package/HiSwitch/HiSwitch.js +4 -40
- package/HiSwitch/HiSwitchState.js +2 -58
- package/HiSwitch/index.js +1 -1
- package/HiTable/HiCellBuilder.js +13 -34
- package/HiTable/HiTable.js +12 -66
- package/HiTable/HiTableBody.js +6 -34
- package/HiTable/HiTableHeader.js +13 -50
- package/HiTable/HiTableRow.js +12 -50
- package/HiTable/constants.js +2 -2
- package/HiTable/index.js +1 -1
- package/README.md +11 -38
- package/es/HiAlertModal/HiAlertModal.js +211 -220
- package/es/HiAlertModal/index.js +15 -1
- package/es/HiAppBar/HiAppBar.js +120 -118
- package/es/HiAppBar/index.js +15 -1
- package/es/HiBadge/HiBadge.js +85 -100
- package/es/HiBadge/index.js +15 -1
- package/es/HiBreadcrumb/HiBreadcrumb.js +98 -83
- package/es/HiBreadcrumb/HiStep.js +113 -113
- package/es/HiBreadcrumb/HiStepConnector.js +144 -137
- package/es/HiBreadcrumb/HiStepContent.js +90 -58
- package/es/HiBreadcrumb/HiStepIcon.js +144 -141
- package/es/HiBreadcrumb/HiStepLabel.js +161 -184
- package/es/HiBreadcrumb/HiStepper.js +73 -46
- package/es/HiBreadcrumb/index.js +15 -1
- package/es/HiButton/HiButton.js +77 -217
- package/es/HiButton/index.js +13 -1
- package/es/HiCell/CellAddress.js +85 -83
- package/es/HiCell/CellDate.js +87 -71
- package/es/HiCell/CellIcon.js +94 -96
- package/es/HiCell/CellImage.js +99 -98
- package/es/HiCell/CellNumeric.js +79 -68
- package/es/HiCell/CellPinToAction.js +61 -41
- package/es/HiCell/CellRate.js +137 -133
- package/es/HiCell/CellSentinel.js +75 -46
- package/es/HiCell/CellSentinelScore.js +69 -35
- package/es/HiCell/CellText.js +190 -160
- package/es/HiCell/CellTextStyled.js +37 -59
- package/es/HiCell/index.js +79 -9
- package/es/HiCheckbox/HiCheckbox.js +154 -162
- package/es/HiCheckbox/index.js +15 -1
- package/es/HiChip/HiChip.js +172 -245
- package/es/HiChip/HiChipSwitch.js +208 -223
- package/es/HiChip/index.js +23 -2
- package/es/HiColoredLabel/HiColoredLabel.js +157 -185
- package/es/HiColoredLabel/index.js +15 -1
- package/es/HiDatePicker/Caption.js +46 -61
- package/es/HiDatePicker/HiDatePicker.js +283 -323
- package/es/HiDatePicker/HiDatePickerMobile.js +104 -87
- package/es/HiDatePicker/HiDateRangePicker.js +500 -570
- package/es/HiDatePicker/HiDateRangeSelector.js +328 -375
- package/es/HiDatePicker/ListPicker.js +125 -101
- package/es/HiDatePicker/NavBar.js +94 -112
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +93 -96
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +86 -89
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +80 -75
- package/es/HiDatePicker/Overlays/Overlay.js +62 -87
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +202 -188
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +90 -95
- package/es/HiDatePicker/Overlays/index.js +47 -5
- package/es/HiDatePicker/Weekday.js +19 -32
- package/es/HiDatePicker/hiLocaleUtils.js +41 -28
- package/es/HiDatePicker/index.js +15 -0
- package/es/HiDatePicker/stylesheet.js +259 -244
- package/es/HiDotsStepper/HiDot.js +86 -50
- package/es/HiDotsStepper/HiDotsStepper.js +96 -58
- package/es/HiDotsStepper/index.js +23 -0
- package/es/HiExpansionPanel/HiExpansionPanel.js +198 -204
- package/es/HiExpansionPanel/index.js +13 -1
- package/es/HiForm/HiAddressField.js +125 -106
- package/es/HiForm/HiEmailField.js +69 -66
- package/es/HiForm/HiFormControl.js +266 -309
- package/es/HiForm/HiFormLabel.js +110 -112
- package/es/HiForm/HiInput.js +397 -530
- package/es/HiForm/HiPasswordField.js +101 -67
- package/es/HiForm/HiSearchField.js +130 -121
- package/es/HiForm/HiSlider.js +251 -272
- package/es/HiForm/HiTextField.js +145 -244
- package/es/HiForm/HiUpload.js +288 -300
- package/es/HiForm/HiUploadField.js +82 -109
- package/es/HiForm/HiUploadInput.js +295 -325
- package/es/HiForm/index.js +95 -11
- package/es/HiIcon/HiIcon.js +75 -132
- package/es/HiIcon/index.js +15 -1
- package/es/HiIconButton/HiIconButton.js +82 -80
- package/es/HiIconButton/index.js +15 -1
- package/es/HiLoader/HiLoader.js +30 -37
- package/es/HiLoader/index.js +15 -1
- package/es/HiMap/HiMap.js +281 -245
- package/es/HiMap/HiMapExpand.js +182 -162
- package/es/HiMap/index.js +23 -2
- package/es/HiNotice/HiKPI.js +173 -201
- package/es/HiNotice/HiKPINotice.js +42 -52
- package/es/HiNotice/index.js +23 -2
- package/es/HiPaymentMeans/HiPaymentMeans.js +453 -500
- package/es/HiPaymentMeans/index.js +15 -1
- package/es/HiPdfReader/HiPdfReader.js +215 -184
- package/es/HiPdfReader/index.js +15 -1
- package/es/HiPin/HiPin.js +82 -79
- package/es/HiPin/index.js +15 -1
- package/es/HiRadio/HiRadio.js +47 -40
- package/es/HiRadio/index.js +15 -1
- package/es/HiSelect/HiDynamicSelect.js +110 -146
- package/es/HiSelect/HiDynamicSelectField.js +91 -104
- package/es/HiSelect/HiNestedSelect.js +235 -260
- package/es/HiSelect/HiNestedSelectContent.js +186 -197
- package/es/HiSelect/HiNestedSelectField.js +91 -104
- package/es/HiSelect/HiSelect.js +564 -684
- package/es/HiSelect/HiSelectContent.js +283 -338
- package/es/HiSelect/HiSelectField.js +93 -111
- package/es/HiSelect/HiSelectInput.js +266 -321
- package/es/HiSelect/HiSelectMobile.js +118 -100
- package/es/HiSelect/HiSuggestSelect.js +237 -256
- package/es/HiSelect/HiSuggestSelectField.js +80 -93
- package/es/HiSelect/index.js +85 -8
- package/es/HiSelectableList/HiSelectableList.js +195 -219
- package/es/HiSelectableList/HiSelectableListHierarchic.js +148 -150
- package/es/HiSelectableList/HiSelectableListItem.js +378 -475
- package/es/HiSelectableList/index.js +31 -3
- package/es/HiSwitch/HiSwitch.js +172 -185
- package/es/HiSwitch/HiSwitchState.js +134 -171
- package/es/HiSwitch/index.js +23 -2
- package/es/HiTable/HiCellBuilder.js +106 -72
- package/es/HiTable/HiTable.js +92 -105
- package/es/HiTable/HiTableBody.js +59 -53
- package/es/HiTable/HiTableHeader.js +133 -116
- package/es/HiTable/HiTableRow.js +126 -110
- package/es/HiTable/constants.js +97 -138
- package/es/HiTable/index.js +15 -1
- package/es/hi-svg-icons/HiAccount.js +41 -21
- package/es/hi-svg-icons/HiActivity.js +40 -20
- package/es/hi-svg-icons/HiAll.js +44 -24
- package/es/hi-svg-icons/HiBilling.js +41 -21
- package/es/hi-svg-icons/HiBriefcaseRescue.js +29 -10
- package/es/hi-svg-icons/HiCatalog.js +41 -21
- package/es/hi-svg-icons/HiCustomer.js +41 -21
- package/es/hi-svg-icons/HiDownload.js +29 -12
- package/es/hi-svg-icons/HiFinance.js +41 -21
- package/es/hi-svg-icons/HiPermission.js +40 -20
- package/es/hi-svg-icons/HiRoute.js +41 -21
- package/es/hi-svg-icons/HiSettlement.js +41 -21
- package/es/hi-svg-icons/HiSizeLarge.js +28 -15
- package/es/hi-svg-icons/HiSizeMedium.js +26 -15
- package/es/hi-svg-icons/HiSizeSmall.js +26 -15
- package/es/hi-svg-icons/HiTransaction.js +41 -21
- package/es/hi-svg-icons/HiUser.js +41 -21
- package/es/hi-svg-icons/HiWidget.js +44 -24
- package/es/hi-svg-icons/index.js +151 -18
- package/es/hi-svg-icons/index.text.js +27 -17
- package/es/styleguide/Wrapper.js +51 -0
- package/es/styles/MuiThemeProvider.js +131 -111
- package/es/styles/colorManipulator.js +89 -52
- package/es/styles/createBreakpoints.js +48 -35
- package/es/styles/createGenerateClassName.js +34 -22
- package/es/styles/createMixins.js +31 -20
- package/es/styles/createMuiTheme.js +67 -44
- package/es/styles/createPalette.js +135 -102
- package/es/styles/createStyles.js +8 -1
- package/es/styles/createTypography.js +86 -75
- package/es/styles/getStylesCreator.js +31 -18
- package/es/styles/getThemeProps.js +11 -5
- package/es/styles/index.js +47 -7
- package/es/styles/jssPreset.js +25 -9
- package/es/styles/mergeClasses.js +28 -16
- package/es/styles/shadows.js +14 -7
- package/es/styles/shape.js +9 -2
- package/es/styles/spacing.js +13 -2
- package/es/styles/themeListener.js +22 -10
- package/es/styles/transitions.js +61 -31
- package/es/styles/zIndex.js +9 -2
- package/es/test-utils/createMount.js +31 -18
- package/es/test-utils/createRender.js +25 -12
- package/es/test-utils/createShallow.js +34 -19
- package/es/test-utils/getClasses.js +11 -2
- package/es/test-utils/index.js +47 -5
- package/es/test-utils/until.js +25 -12
- package/es/test-utils/unwrap.js +8 -1
- package/es/theme/palette.js +106 -0
- package/es/theme/typography.js +170 -0
- package/es/theme.js +22 -0
- package/es/transitions/utils.js +18 -6
- package/es/utils/helpers.js +99 -39
- package/es/withMobileDialog/index.js +15 -1
- package/es/withMobileDialog/withMobileDialog.js +32 -20
- package/hi-svg-icons/HiAccount.js +16 -10
- package/hi-svg-icons/HiActivity.js +16 -10
- package/hi-svg-icons/HiAll.js +16 -10
- package/hi-svg-icons/HiBilling.js +16 -10
- package/hi-svg-icons/HiBriefcaseRescue.js +15 -9
- package/hi-svg-icons/HiCatalog.js +16 -10
- package/hi-svg-icons/HiCustomer.js +16 -10
- package/hi-svg-icons/HiDownload.js +13 -5
- package/hi-svg-icons/HiFinance.js +16 -10
- package/hi-svg-icons/HiPermission.js +16 -10
- package/hi-svg-icons/HiRoute.js +16 -10
- package/hi-svg-icons/HiSettlement.js +16 -10
- package/hi-svg-icons/HiSizeLarge.js +5 -3
- package/hi-svg-icons/HiSizeMedium.js +3 -3
- package/hi-svg-icons/HiSizeSmall.js +3 -3
- package/hi-svg-icons/HiTransaction.js +16 -10
- package/hi-svg-icons/HiUser.js +16 -10
- package/hi-svg-icons/HiWidget.js +16 -10
- package/hi-svg-icons/index.js +1 -1
- package/hi-svg-icons/index.text.js +1 -1
- package/package.json +37 -57
- package/styleguide/Wrapper.js +51 -0
- package/styles/MuiThemeProvider.js +17 -44
- package/styles/colorManipulator.js +1 -1
- package/styles/createBreakpoints.js +4 -4
- package/styles/createGenerateClassName.js +1 -1
- package/styles/createMixins.js +6 -6
- package/styles/createMuiTheme.js +4 -4
- package/styles/createPalette.js +5 -5
- package/styles/createTypography.js +15 -15
- package/styles/getStylesCreator.js +4 -4
- package/styles/index.js +2 -18
- package/styles/jssPreset.js +1 -1
- package/styles/mergeClasses.js +3 -3
- package/styles/themeListener.js +2 -2
- package/styles/transitions.js +2 -2
- package/test-utils/createMount.js +5 -5
- package/test-utils/createRender.js +4 -4
- package/test-utils/createShallow.js +5 -5
- package/test-utils/index.js +1 -1
- package/test-utils/until.js +5 -5
- package/theme/palette.js +106 -0
- package/theme/typography.js +170 -0
- package/theme.js +22 -0
- package/utils/helpers.js +4 -4
- package/withMobileDialog/index.js +1 -1
- package/withMobileDialog/withMobileDialog.js +3 -8
- package/CHANGELOG.md +0 -8486
- package/LICENSE +0 -21
- package/es/index.js +0 -26
- package/es/styles/withStyles.js +0 -317
- package/es/styles/withTheme.js +0 -84
- package/es/utils/exactProp.js +0 -28
- package/es/utils/ownerDocument.js +0 -5
- package/es/utils/ownerWindow.js +0 -8
- package/es/utils/reactHelpers.js +0 -19
- package/es/utils/requirePropFactory.js +0 -20
- package/es/utils/unsupportedProp.js +0 -16
- package/index.es.js +0 -31
- package/index.js +0 -256
- package/styles/withStyles.js +0 -378
- package/styles/withTheme.js +0 -126
- package/utils/exactProp.js +0 -43
- package/utils/ownerDocument.js +0 -13
- package/utils/ownerWindow.js +0 -19
- package/utils/reactHelpers.js +0 -36
- package/utils/requirePropFactory.js +0 -32
- package/utils/unsupportedProp.js +0 -24
@@ -1,5 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.convertHexToRGB = convertHexToRGB;
|
9
|
+
exports.rgbToHex = rgbToHex;
|
10
|
+
exports.decomposeColor = decomposeColor;
|
11
|
+
exports.recomposeColor = recomposeColor;
|
12
|
+
exports.getContrastRatio = getContrastRatio;
|
13
|
+
exports.getLuminance = getLuminance;
|
14
|
+
exports.emphasize = emphasize;
|
15
|
+
exports.fade = fade;
|
16
|
+
exports.darken = darken;
|
17
|
+
exports.lighten = lighten;
|
18
|
+
|
19
|
+
var _warning = _interopRequireDefault(require("warning"));
|
20
|
+
|
1
21
|
/* eslint-disable no-use-before-define */
|
2
|
-
|
22
|
+
|
3
23
|
/**
|
4
24
|
* Returns a number whose value is limited to the given range.
|
5
25
|
*
|
@@ -8,9 +28,10 @@ import warning from 'warning';
|
|
8
28
|
* @param {number} max The upper boundary of the output range
|
9
29
|
* @returns {number} A number in the range [min, max]
|
10
30
|
*/
|
11
|
-
|
12
|
-
|
13
|
-
|
31
|
+
function clamp(value) {
|
32
|
+
var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
33
|
+
var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
34
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(value >= min && value <= max, "Material-UI: the value provided ".concat(value, " is out of range [").concat(min, ", ").concat(max, "].")) : void 0;
|
14
35
|
|
15
36
|
if (value < min) {
|
16
37
|
return min;
|
@@ -30,16 +51,20 @@ function clamp(value, min = 0, max = 1) {
|
|
30
51
|
*/
|
31
52
|
|
32
53
|
|
33
|
-
|
54
|
+
function convertHexToRGB(color) {
|
34
55
|
color = color.substr(1);
|
35
|
-
|
36
|
-
|
56
|
+
var re = new RegExp(".{1,".concat(color.length / 3, "}"), 'g');
|
57
|
+
var colors = color.match(re);
|
37
58
|
|
38
59
|
if (colors && colors[0].length === 1) {
|
39
|
-
colors = colors.map(
|
60
|
+
colors = colors.map(function (n) {
|
61
|
+
return n + n;
|
62
|
+
});
|
40
63
|
}
|
41
64
|
|
42
|
-
return colors ?
|
65
|
+
return colors ? "rgb(".concat(colors.map(function (n) {
|
66
|
+
return parseInt(n, 16);
|
67
|
+
}).join(', '), ")") : '';
|
43
68
|
}
|
44
69
|
/**
|
45
70
|
* Converts a color from CSS rgb format to CSS hex format.
|
@@ -48,22 +73,25 @@ export function convertHexToRGB(color) {
|
|
48
73
|
* @returns {string} A CSS rgb color string, i.e. #nnnnnn
|
49
74
|
*/
|
50
75
|
|
51
|
-
|
76
|
+
|
77
|
+
function rgbToHex(color) {
|
52
78
|
// Pass hex straight through
|
53
79
|
if (color.indexOf('#') === 0) {
|
54
80
|
return color;
|
55
81
|
}
|
56
82
|
|
57
83
|
function intToHex(c) {
|
58
|
-
|
59
|
-
return hex.length === 1 ?
|
84
|
+
var hex = c.toString(16);
|
85
|
+
return hex.length === 1 ? "0".concat(hex) : hex;
|
60
86
|
}
|
61
87
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
values = values.map(
|
66
|
-
|
88
|
+
var _decomposeColor = decomposeColor(color),
|
89
|
+
values = _decomposeColor.values;
|
90
|
+
|
91
|
+
values = values.map(function (n) {
|
92
|
+
return intToHex(n);
|
93
|
+
});
|
94
|
+
return "#".concat(values.join(''));
|
67
95
|
}
|
68
96
|
/**
|
69
97
|
* Returns an object with the type and values of a color.
|
@@ -74,25 +102,28 @@ export function rgbToHex(color) {
|
|
74
102
|
* @returns {object} - A MUI color object: {type: string, values: number[]}
|
75
103
|
*/
|
76
104
|
|
77
|
-
|
105
|
+
|
106
|
+
function decomposeColor(color) {
|
78
107
|
if (color.charAt(0) === '#') {
|
79
108
|
return decomposeColor(convertHexToRGB(color));
|
80
109
|
}
|
81
110
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
values = values.map(
|
111
|
+
var marker = color.indexOf('(');
|
112
|
+
var type = color.substring(0, marker);
|
113
|
+
var values = color.substring(marker + 1, color.length - 1).split(',');
|
114
|
+
values = values.map(function (value) {
|
115
|
+
return parseFloat(value);
|
116
|
+
});
|
86
117
|
|
87
118
|
if (process.env.NODE_ENV !== 'production') {
|
88
119
|
if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) {
|
89
|
-
throw new Error([
|
120
|
+
throw new Error(["Material-UI: unsupported `".concat(color, "` color."), 'We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla().'].join('\n'));
|
90
121
|
}
|
91
122
|
}
|
92
123
|
|
93
124
|
return {
|
94
|
-
type,
|
95
|
-
values
|
125
|
+
type: type,
|
126
|
+
values: values
|
96
127
|
};
|
97
128
|
}
|
98
129
|
/**
|
@@ -104,25 +135,24 @@ export function decomposeColor(color) {
|
|
104
135
|
* @returns {string} A CSS color string
|
105
136
|
*/
|
106
137
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
let {
|
112
|
-
values
|
113
|
-
} = color;
|
138
|
+
|
139
|
+
function recomposeColor(color) {
|
140
|
+
var type = color.type;
|
141
|
+
var values = color.values;
|
114
142
|
|
115
143
|
if (type.indexOf('rgb') !== -1) {
|
116
144
|
// Only convert the first 3 values to int (i.e. not alpha)
|
117
|
-
values = values.map((n, i)
|
145
|
+
values = values.map(function (n, i) {
|
146
|
+
return i < 3 ? parseInt(n, 10) : n;
|
147
|
+
});
|
118
148
|
}
|
119
149
|
|
120
150
|
if (type.indexOf('hsl') !== -1) {
|
121
|
-
values[1] =
|
122
|
-
values[2] =
|
151
|
+
values[1] = "".concat(values[1], "%");
|
152
|
+
values[2] = "".concat(values[2], "%");
|
123
153
|
}
|
124
154
|
|
125
|
-
return
|
155
|
+
return "".concat(color.type, "(").concat(values.join(', '), ")");
|
126
156
|
}
|
127
157
|
/**
|
128
158
|
* Calculates the contrast ratio between two colors.
|
@@ -134,9 +164,10 @@ export function recomposeColor(color) {
|
|
134
164
|
* @returns {number} A contrast ratio value in the range 0 - 21.
|
135
165
|
*/
|
136
166
|
|
137
|
-
|
138
|
-
|
139
|
-
|
167
|
+
|
168
|
+
function getContrastRatio(foreground, background) {
|
169
|
+
var lumA = getLuminance(foreground);
|
170
|
+
var lumB = getLuminance(background);
|
140
171
|
return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);
|
141
172
|
}
|
142
173
|
/**
|
@@ -149,14 +180,15 @@ export function getContrastRatio(foreground, background) {
|
|
149
180
|
* @returns {number} The relative brightness of the color in the range 0 - 1
|
150
181
|
*/
|
151
182
|
|
152
|
-
|
153
|
-
|
183
|
+
|
184
|
+
function getLuminance(color) {
|
185
|
+
var decomposedColor = decomposeColor(color);
|
154
186
|
|
155
187
|
if (decomposedColor.type.indexOf('rgb') !== -1) {
|
156
|
-
|
188
|
+
var rgb = decomposedColor.values.map(function (val) {
|
157
189
|
val /= 255; // normalized
|
158
190
|
|
159
|
-
return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055
|
191
|
+
return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);
|
160
192
|
}); // Truncate at 3 digits
|
161
193
|
|
162
194
|
return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));
|
@@ -174,7 +206,9 @@ export function getLuminance(color) {
|
|
174
206
|
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
175
207
|
*/
|
176
208
|
|
177
|
-
|
209
|
+
|
210
|
+
function emphasize(color) {
|
211
|
+
var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;
|
178
212
|
return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);
|
179
213
|
}
|
180
214
|
/**
|
@@ -186,8 +220,9 @@ export function emphasize(color, coefficient = 0.15) {
|
|
186
220
|
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
187
221
|
*/
|
188
222
|
|
189
|
-
|
190
|
-
|
223
|
+
|
224
|
+
function fade(color, value) {
|
225
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in fade(".concat(color, ", ").concat(value, ").")) : void 0;
|
191
226
|
if (!color) return color;
|
192
227
|
color = decomposeColor(color);
|
193
228
|
value = clamp(value);
|
@@ -207,8 +242,9 @@ export function fade(color, value) {
|
|
207
242
|
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
208
243
|
*/
|
209
244
|
|
210
|
-
|
211
|
-
|
245
|
+
|
246
|
+
function darken(color, coefficient) {
|
247
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in darken(".concat(color, ", ").concat(coefficient, ").")) : void 0;
|
212
248
|
if (!color) return color;
|
213
249
|
color = decomposeColor(color);
|
214
250
|
coefficient = clamp(coefficient);
|
@@ -216,7 +252,7 @@ export function darken(color, coefficient) {
|
|
216
252
|
if (color.type.indexOf('hsl') !== -1) {
|
217
253
|
color.values[2] *= 1 - coefficient;
|
218
254
|
} else if (color.type.indexOf('rgb') !== -1) {
|
219
|
-
for (
|
255
|
+
for (var i = 0; i < 3; i += 1) {
|
220
256
|
color.values[i] *= 1 - coefficient;
|
221
257
|
}
|
222
258
|
}
|
@@ -231,8 +267,9 @@ export function darken(color, coefficient) {
|
|
231
267
|
* @returns {string} A CSS color string. Hex input values are returned as rgb
|
232
268
|
*/
|
233
269
|
|
234
|
-
|
235
|
-
|
270
|
+
|
271
|
+
function lighten(color, coefficient) {
|
272
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(color, "Material-UI: missing color argument in lighten(".concat(color, ", ").concat(coefficient, ").")) : void 0;
|
236
273
|
if (!color) return color;
|
237
274
|
color = decomposeColor(color);
|
238
275
|
coefficient = clamp(coefficient);
|
@@ -240,7 +277,7 @@ export function lighten(color, coefficient) {
|
|
240
277
|
if (color.type.indexOf('hsl') !== -1) {
|
241
278
|
color.values[2] += (100 - color.values[2]) * coefficient;
|
242
279
|
} else if (color.type.indexOf('rgb') !== -1) {
|
243
|
-
for (
|
280
|
+
for (var i = 0; i < 3; i += 1) {
|
244
281
|
color.values[i] += (255 - color.values[i]) * coefficient;
|
245
282
|
}
|
246
283
|
}
|
@@ -1,51 +1,64 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = createBreakpoints;
|
9
|
+
exports.keys = void 0;
|
10
|
+
|
11
|
+
var _objectSpread2 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2"));
|
12
|
+
|
13
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties"));
|
14
|
+
|
3
15
|
// Sorted ASC by size. That's important.
|
4
16
|
// It can't be configured as it's used statically for propTypes.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
var keys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification.
|
18
|
+
|
19
|
+
exports.keys = keys;
|
20
|
+
|
21
|
+
function createBreakpoints(breakpoints) {
|
22
|
+
var _breakpoints$values = breakpoints.values,
|
23
|
+
values = _breakpoints$values === void 0 ? {
|
24
|
+
xs: 0,
|
25
|
+
sm: 600,
|
26
|
+
md: 960,
|
27
|
+
lg: 1280,
|
28
|
+
xl: 1920
|
29
|
+
} : _breakpoints$values,
|
30
|
+
_breakpoints$unit = breakpoints.unit,
|
31
|
+
unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,
|
32
|
+
_breakpoints$step = breakpoints.step,
|
33
|
+
step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,
|
34
|
+
other = (0, _objectWithoutProperties2.default)(breakpoints, ["values", "unit", "step"]);
|
22
35
|
|
23
36
|
function up(key) {
|
24
|
-
|
25
|
-
return
|
37
|
+
var value = typeof values[key] === 'number' ? values[key] : key;
|
38
|
+
return "@media (min-width:".concat(value).concat(unit, ")");
|
26
39
|
}
|
27
40
|
|
28
41
|
function down(key) {
|
29
|
-
|
30
|
-
|
42
|
+
var endIndex = keys.indexOf(key) + 1;
|
43
|
+
var upperbound = values[keys[endIndex]];
|
31
44
|
|
32
45
|
if (endIndex === keys.length) {
|
33
46
|
// xl down applies to all sizes
|
34
47
|
return up('xs');
|
35
48
|
}
|
36
49
|
|
37
|
-
|
38
|
-
return
|
50
|
+
var value = typeof upperbound === 'number' && endIndex > 0 ? upperbound : key;
|
51
|
+
return "@media (max-width:".concat(value - step / 100).concat(unit, ")");
|
39
52
|
}
|
40
53
|
|
41
54
|
function between(start, end) {
|
42
|
-
|
55
|
+
var endIndex = keys.indexOf(end) + 1;
|
43
56
|
|
44
57
|
if (endIndex === keys.length) {
|
45
58
|
return up(start);
|
46
59
|
}
|
47
60
|
|
48
|
-
return
|
61
|
+
return "@media (min-width:".concat(values[start]).concat(unit, ") and ") + "(max-width:".concat(values[keys[endIndex]] - step / 100).concat(unit, ")");
|
49
62
|
}
|
50
63
|
|
51
64
|
function only(key) {
|
@@ -56,13 +69,13 @@ export default function createBreakpoints(breakpoints) {
|
|
56
69
|
return values[key];
|
57
70
|
}
|
58
71
|
|
59
|
-
return
|
60
|
-
keys,
|
61
|
-
values,
|
62
|
-
up,
|
63
|
-
down,
|
64
|
-
between,
|
65
|
-
only,
|
66
|
-
width
|
72
|
+
return (0, _objectSpread2.default)({
|
73
|
+
keys: keys,
|
74
|
+
values: values,
|
75
|
+
up: up,
|
76
|
+
down: down,
|
77
|
+
between: between,
|
78
|
+
only: only,
|
79
|
+
width: width
|
67
80
|
}, other);
|
68
81
|
}
|
@@ -1,13 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = createGenerateClassName;
|
9
|
+
|
10
|
+
var _warning = _interopRequireDefault(require("warning"));
|
11
|
+
|
1
12
|
/* eslint-disable no-underscore-dangle */
|
2
|
-
|
13
|
+
// People might bundle this classname generator twice.
|
3
14
|
// We need to use a global.
|
4
|
-
|
5
15
|
global.__MUI_GENERATOR_COUNTER__ = 0;
|
6
|
-
|
16
|
+
var escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g;
|
7
17
|
|
8
18
|
function safePrefix(classNamePrefix) {
|
9
|
-
|
10
|
-
process.env.NODE_ENV !== "production" ?
|
19
|
+
var prefix = String(classNamePrefix);
|
20
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(prefix.length < 256, "Material-UI: the class name prefix is too long: ".concat(prefix, ".")) : void 0; // Sanitize the string as will be used to prefix the generated class name.
|
11
21
|
|
12
22
|
return prefix.replace(escapeRegex, '-');
|
13
23
|
} // Returns a function which generates unique class names based on counters.
|
@@ -18,12 +28,13 @@ function safePrefix(classNamePrefix) {
|
|
18
28
|
// https://github.com/cssinjs/jss/blob/4e6a05dd3f7b6572fdd3ab216861d9e446c20331/src/utils/createGenerateClassName.js
|
19
29
|
|
20
30
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
31
|
+
function createGenerateClassName() {
|
32
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
33
|
+
var _options$dangerouslyU = options.dangerouslyUseGlobalCSS,
|
34
|
+
dangerouslyUseGlobalCSS = _options$dangerouslyU === void 0 ? false : _options$dangerouslyU,
|
35
|
+
_options$productionPr = options.productionPrefix,
|
36
|
+
productionPrefix = _options$productionPr === void 0 ? 'jss' : _options$productionPr;
|
37
|
+
var ruleCounter = 0; // - HMR can lead to many class name generators being instantiated,
|
27
38
|
// so the warning is only triggered in production.
|
28
39
|
// - We expect a class name generator to be instantiated per new request on the server,
|
29
40
|
// so the warning is only triggered client side.
|
@@ -37,38 +48,39 @@ export default function createGenerateClassName(options = {}) {
|
|
37
48
|
}
|
38
49
|
}
|
39
50
|
|
40
|
-
return (rule, styleSheet)
|
51
|
+
return function (rule, styleSheet) {
|
41
52
|
ruleCounter += 1;
|
42
|
-
process.env.NODE_ENV !== "production" ?
|
53
|
+
process.env.NODE_ENV !== "production" ? (0, _warning.default)(ruleCounter < 1e10, ['Material-UI: you might have a memory leak.', 'The ruleCounter is not supposed to grow that much.'].join('')) : void 0; // Code branch the whole block at the expense of more code.
|
43
54
|
|
44
55
|
if (dangerouslyUseGlobalCSS) {
|
45
56
|
if (styleSheet) {
|
46
57
|
if (styleSheet.options.name) {
|
47
|
-
return
|
58
|
+
return "".concat(styleSheet.options.name, "-").concat(rule.key);
|
48
59
|
}
|
49
60
|
|
50
61
|
if (styleSheet.options.classNamePrefix && process.env.NODE_ENV !== 'production') {
|
51
|
-
|
52
|
-
return
|
62
|
+
var prefix = safePrefix(styleSheet.options.classNamePrefix);
|
63
|
+
return "".concat(prefix, "-").concat(rule.key, "-").concat(ruleCounter);
|
53
64
|
}
|
54
65
|
}
|
55
66
|
|
56
67
|
if (process.env.NODE_ENV === 'production') {
|
57
|
-
return
|
68
|
+
return "".concat(productionPrefix).concat(ruleCounter);
|
58
69
|
}
|
59
70
|
|
60
|
-
return
|
71
|
+
return "".concat(rule.key, "-").concat(ruleCounter);
|
61
72
|
}
|
62
73
|
|
63
74
|
if (process.env.NODE_ENV === 'production') {
|
64
|
-
return
|
75
|
+
return "".concat(productionPrefix).concat(ruleCounter);
|
65
76
|
}
|
66
77
|
|
67
78
|
if (styleSheet && styleSheet.options.classNamePrefix) {
|
68
|
-
|
69
|
-
|
79
|
+
var _prefix = safePrefix(styleSheet.options.classNamePrefix);
|
80
|
+
|
81
|
+
return "".concat(_prefix, "-").concat(rule.key, "-").concat(ruleCounter);
|
70
82
|
}
|
71
83
|
|
72
|
-
return
|
84
|
+
return "".concat(rule.key, "-").concat(ruleCounter);
|
73
85
|
};
|
74
86
|
}
|
@@ -1,25 +1,36 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.default = createMixins;
|
9
|
+
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/defineProperty"));
|
11
|
+
|
12
|
+
var _objectSpread3 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2"));
|
13
|
+
|
14
|
+
function createMixins(breakpoints, spacing, mixins) {
|
15
|
+
var _toolbar;
|
16
|
+
|
17
|
+
return (0, _objectSpread3.default)({
|
18
|
+
gutters: function gutters() {
|
19
|
+
var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
20
|
+
return (0, _objectSpread3.default)({
|
6
21
|
paddingLeft: spacing(4),
|
7
22
|
paddingRight: spacing(4)
|
8
|
-
}, styles, {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
}, styles[breakpoints.up('sm')])
|
13
|
-
});
|
23
|
+
}, styles, (0, _defineProperty2.default)({}, breakpoints.up('sm'), (0, _objectSpread3.default)({
|
24
|
+
paddingLeft: spacing(6),
|
25
|
+
paddingRight: spacing(6)
|
26
|
+
}, styles[breakpoints.up('sm')])));
|
14
27
|
},
|
15
|
-
toolbar: {
|
16
|
-
minHeight: 56
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
}
|
23
|
-
}
|
28
|
+
toolbar: (_toolbar = {
|
29
|
+
minHeight: 56
|
30
|
+
}, (0, _defineProperty2.default)(_toolbar, "".concat(breakpoints.up('xs'), " and (orientation: landscape)"), {
|
31
|
+
minHeight: 48
|
32
|
+
}), (0, _defineProperty2.default)(_toolbar, breakpoints.up('sm'), {
|
33
|
+
minHeight: 64
|
34
|
+
}), _toolbar)
|
24
35
|
}, mixins);
|
25
36
|
}
|