@telefonica/mistica 10.14.2 → 10.18.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.
Files changed (98) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/button.js +16 -26
  3. package/dist/card.d.ts +10 -1
  4. package/dist/card.js +4 -1
  5. package/dist/card.js.flow +16 -1
  6. package/dist/checkbox.js +11 -7
  7. package/dist/credit-card-expiration-field.js +2 -7
  8. package/dist/credit-card-number-field.js +2 -2
  9. package/dist/cvv-field.js +2 -2
  10. package/dist/date-field.js +2 -2
  11. package/dist/date-time-field.js +2 -2
  12. package/dist/date-time-picker.js +12 -6
  13. package/dist/decimal-field.js +2 -7
  14. package/dist/email-field.js +2 -7
  15. package/dist/feedback.js +5 -8
  16. package/dist/iban-field.js +2 -7
  17. package/dist/image.d.ts +25 -4
  18. package/dist/image.js +64 -7
  19. package/dist/image.js.flow +30 -4
  20. package/dist/index.d.ts +3 -1
  21. package/dist/index.js +20 -0
  22. package/dist/index.js.flow +3 -1
  23. package/dist/integer-field.js +2 -7
  24. package/dist/list.d.ts +1 -0
  25. package/dist/list.js +63 -26
  26. package/dist/list.js.flow +1 -0
  27. package/dist/menu.d.ts +1 -1
  28. package/dist/menu.js +34 -27
  29. package/dist/menu.js.flow +1 -1
  30. package/dist/month-field.js +2 -2
  31. package/dist/package-version.js +1 -1
  32. package/dist/password-field.js +2 -2
  33. package/dist/phone-number-field.js +2 -7
  34. package/dist/radio-button.js +13 -9
  35. package/dist/search-field.js +2 -2
  36. package/dist/select.js +7 -18
  37. package/dist/skins/blau.js +0 -24
  38. package/dist/skins/movistar.js +0 -23
  39. package/dist/skins/o2-classic.js +0 -24
  40. package/dist/skins/o2.js +0 -23
  41. package/dist/skins/types.d.ts +0 -12
  42. package/dist/skins/types.js.flow +0 -12
  43. package/dist/skins/vivo.js +0 -23
  44. package/dist/switch-component.js +12 -9
  45. package/dist/text-field-base.d.ts +3 -2
  46. package/dist/text-field-base.js +15 -33
  47. package/dist/text-field-base.js.flow +6 -2
  48. package/dist/text-field-components.d.ts +0 -1
  49. package/dist/text-field-components.js +8 -15
  50. package/dist/text-field-components.js.flow +0 -1
  51. package/dist/text-field.d.ts +2 -1
  52. package/dist/text-field.js +10 -16
  53. package/dist/text-field.js.flow +5 -1
  54. package/dist/text-link.d.ts +1 -0
  55. package/dist/text-link.js +16 -9
  56. package/dist/text-link.js.flow +1 -0
  57. package/dist/touchable.js +2 -3
  58. package/dist/video.d.ts +32 -0
  59. package/dist/video.js +161 -0
  60. package/dist/video.js.flow +50 -0
  61. package/dist-es/button.js +16 -26
  62. package/dist-es/card.js +4 -1
  63. package/dist-es/checkbox.js +11 -7
  64. package/dist-es/credit-card-expiration-field.js +2 -2
  65. package/dist-es/credit-card-number-field.js +2 -2
  66. package/dist-es/cvv-field.js +2 -2
  67. package/dist-es/date-field.js +2 -2
  68. package/dist-es/date-time-field.js +2 -2
  69. package/dist-es/date-time-picker.js +12 -6
  70. package/dist-es/decimal-field.js +2 -2
  71. package/dist-es/email-field.js +2 -2
  72. package/dist-es/feedback.js +5 -8
  73. package/dist-es/iban-field.js +2 -2
  74. package/dist-es/image.js +38 -6
  75. package/dist-es/index.js +3 -1
  76. package/dist-es/integer-field.js +2 -2
  77. package/dist-es/list.js +63 -26
  78. package/dist-es/menu.js +35 -28
  79. package/dist-es/month-field.js +2 -2
  80. package/dist-es/package-version.js +1 -1
  81. package/dist-es/password-field.js +2 -2
  82. package/dist-es/phone-number-field.js +2 -2
  83. package/dist-es/radio-button.js +13 -9
  84. package/dist-es/search-field.js +2 -2
  85. package/dist-es/select.js +7 -18
  86. package/dist-es/skins/blau.js +0 -24
  87. package/dist-es/skins/movistar.js +0 -23
  88. package/dist-es/skins/o2-classic.js +0 -24
  89. package/dist-es/skins/o2.js +0 -23
  90. package/dist-es/skins/vivo.js +0 -23
  91. package/dist-es/switch-component.js +12 -9
  92. package/dist-es/text-field-base.js +15 -32
  93. package/dist-es/text-field-components.js +8 -15
  94. package/dist-es/text-field.js +9 -12
  95. package/dist-es/text-link.js +14 -8
  96. package/dist-es/touchable.js +2 -3
  97. package/dist-es/video.js +123 -0
  98. package/package.json +2 -2
package/dist-es/select.js CHANGED
@@ -5,7 +5,7 @@ import { useAriaId, useTheme } from './hooks';
5
5
  import { DOWN, ENTER, ESC, SPACE, TAB, UP } from './utils/key-codes';
6
6
  import { FieldContainer, HelperText, Label } from './text-field-components';
7
7
  import ChevronDownRegular from './generated/mistica-icons/icon-chevron-down-regular';
8
- import TextFieldBase from './text-field-base';
8
+ import { TextFieldBaseAutosuggest } from './text-field-base';
9
9
  import Overlay from './overlay';
10
10
  import classNames from 'classnames';
11
11
  import { isAndroid, isIos } from './utils/platform';
@@ -77,10 +77,6 @@ var _obj, _obj1;
77
77
  var useStyles = createUseStyles(function(theme) {
78
78
  return {
79
79
  selectContainer: (_obj = {
80
- cursor: function(param) {
81
- var disabled = param.disabled;
82
- return disabled ? 'auto' : 'pointer';
83
- },
84
80
  position: 'relative',
85
81
  outline: 0
86
82
  }, _defineProperty(_obj, theme.mq.tabletOrSmaller, {
@@ -111,24 +107,17 @@ var useStyles = createUseStyles(function(theme) {
111
107
  width: '100%',
112
108
  height: '100%',
113
109
  textOverflow: 'ellipsis',
114
- '&:disabled': {
115
- color: theme.colors.textDisabled
116
- },
117
110
  appearance: 'none',
118
111
  cursor: function(param) {
119
112
  var disabled = param.disabled;
120
- return disabled ? 'inherit' : 'pointer';
113
+ return disabled ? 'default' : 'pointer';
121
114
  }
122
115
  },
123
116
  arrowDown: {
124
117
  position: 'absolute',
125
118
  right: 16,
126
119
  top: 'calc(50% - 10px)',
127
- pointerEvents: 'none',
128
- opacity: function(param) {
129
- var disabled = param.disabled;
130
- return disabled ? 0.3 : 1;
131
- }
120
+ pointerEvents: 'none'
132
121
  },
133
122
  selectText: {
134
123
  position: 'absolute',
@@ -141,9 +130,10 @@ var useStyles = createUseStyles(function(theme) {
141
130
  return label ? 27 : 17;
142
131
  },
143
132
  fontSize: 16,
144
- color: function(param) {
133
+ color: theme.colors.textPrimary,
134
+ opacity: function(param) {
145
135
  var disabled = param.disabled;
146
- return disabled ? theme.colors.textDisabled : theme.colors.textPrimary;
136
+ return disabled ? 0.5 : 1;
147
137
  },
148
138
  maxWidth: '100%',
149
139
  textOverflow: 'ellipsis',
@@ -451,7 +441,6 @@ var Select = function(param) {
451
441
  error: error,
452
442
  forId: inputId,
453
443
  inputState: isFocused ? 'focused' : ((ref15 = value !== null && value !== void 0 ? value : valueState) !== null && ref15 !== void 0 ? ref15 : (ref11 = inputRef.current) === null || ref11 === void 0 ? void 0 : ref11.value) ? 'filled' : 'default',
454
- disabled: disabled,
455
444
  optional: optional,
456
445
  children: label
457
446
  }),
@@ -526,7 +515,7 @@ var Select = function(param) {
526
515
  ref: focusableRef
527
516
  }, !disabled && containerActiveProps, {
528
517
  children: [
529
- /*#__PURE__*/ _jsx(TextFieldBase, {
518
+ /*#__PURE__*/ _jsx(TextFieldBaseAutosuggest, {
530
519
  style: {
531
520
  visibility: 'hidden'
532
521
  },
@@ -59,40 +59,29 @@ export var getBlauSkin = function() {
59
59
  borderSelected: palette.blauBlueSecondary60,
60
60
  // BUTTONS
61
61
  buttonDangerBackground: palette.blauRed,
62
- buttonDangerBackgroundDisabled: palette.blauRed20,
63
62
  buttonDangerBackgroundSelected: palette.blauRed70,
64
63
  buttonDangerBackgroundHover: palette.blauRed70,
65
64
  buttonLinkBackgroundSelected: palette.blauPurple10,
66
65
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.3),
67
66
  buttonPrimaryBackground: palette.blauBlueSecondary,
68
- buttonPrimaryBackgroundDisabled: palette.blauBlueSecondary20,
69
- buttonPrimaryBackgroundDisabledInverse: palette.blauBlueSecondary30,
70
67
  buttonPrimaryBackgroundInverse: palette.white,
71
68
  buttonPrimaryBackgroundSelected: palette.blauBlueSecondary60,
72
69
  buttonPrimaryBackgroundHover: palette.blauBlueSecondary60,
73
70
  buttonPrimaryBackgroundSelectedInverse: palette.blauBluePrimary30,
74
71
  buttonSecondaryBackground: palette.blauBlueSecondary,
75
- buttonSecondaryBackgroundDisabled: palette.blauBlueSecondary20,
76
72
  buttonSecondaryBackgroundSelected: palette.blauBlueSecondary60,
77
- buttonSecondaryBorderDisabledInverse: palette.blauBlueSecondary20,
78
73
  buttonSecondaryBorderInverse: palette.white,
79
74
  buttonSecondaryBorderSelectedInverse: palette.blauBluePrimary30,
80
75
  textButtonPrimary: palette.white,
81
- textButtonPrimaryDisabled: palette.white,
82
76
  textButtonPrimaryInverse: palette.blauBlueSecondary,
83
- textButtonPrimaryInverseDisabled: palette.blauBluePrimary10,
84
77
  textButtonPrimaryInverseSelected: palette.blauBlueSecondary60,
85
78
  textButtonSecondary: palette.blauBlueSecondary,
86
- textButtonSecondaryDisabled: palette.blauBlueSecondary30,
87
79
  textButtonSecondarySelected: palette.blauBlueSecondary60,
88
80
  textButtonSecondaryInverse: palette.white,
89
- textButtonSecondaryInverseDisabled: palette.blauBlueSecondary20,
90
81
  textButtonSecondaryInverseSelected: palette.white,
91
82
  textLink: palette.blauPurple,
92
83
  textLinkInverse: palette.white,
93
84
  textLinkDanger: palette.blauRed,
94
- textLinkDangerDisabled: palette.blauRed20,
95
- textLinkDisabled: palette.blauPurple30,
96
85
  textLinkSnackbar: palette.blauPurple30,
97
86
  // CONTROLS
98
87
  control: palette.grey2,
@@ -124,7 +113,6 @@ export var getBlauSkin = function() {
124
113
  textPrimaryInverse: palette.white,
125
114
  textSecondary: palette.grey5,
126
115
  textSecondaryInverse: palette.white,
127
- textDisabled: palette.grey3,
128
116
  textAmount: palette.blauBlueSecondary,
129
117
  // STATES
130
118
  error: palette.blauRed,
@@ -157,32 +145,21 @@ export var getBlauSkin = function() {
157
145
  borderLight: palette.darkModeBlack,
158
146
  border: palette.darkModeGrey,
159
147
  // BUTTONS
160
- buttonDangerBackgroundDisabled: palette.darkModeGrey,
161
148
  buttonLinkBackgroundSelected: applyAlpha(palette.blauPurple, 0.3),
162
149
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.blauPurple, 0.3),
163
- buttonPrimaryBackgroundDisabled: palette.darkModeGrey,
164
- buttonPrimaryBackgroundDisabledInverse: palette.darkModeGrey,
165
150
  buttonPrimaryBackgroundInverse: palette.blauBlueSecondary,
166
151
  buttonPrimaryBackgroundSelected: palette.blauBlueSecondary60,
167
- buttonSecondaryBackgroundDisabled: palette.darkModeGrey,
168
- buttonSecondaryBorderDisabledInverse: palette.darkModeGrey,
169
152
  buttonSecondaryBorderInverse: palette.blauBluePrimary,
170
153
  buttonSecondaryBorderSelectedInverse: palette.blauBlueSecondary60,
171
154
  textButtonPrimary: palette.grey2,
172
- textButtonPrimaryDisabled: palette.grey5,
173
155
  textButtonPrimaryInverse: palette.grey2,
174
- textButtonPrimaryInverseDisabled: palette.grey5,
175
156
  textButtonPrimaryInverseSelected: palette.grey2,
176
157
  textButtonSecondary: palette.grey2,
177
- textButtonSecondaryDisabled: palette.grey5,
178
158
  textButtonSecondarySelected: palette.blauBlueSecondary60,
179
159
  textButtonSecondaryInverse: palette.grey2,
180
- textButtonSecondaryInverseDisabled: palette.grey5,
181
160
  textButtonSecondaryInverseSelected: palette.blauBlueSecondary60,
182
161
  textLink: palette.blauPurple30,
183
162
  textLinkInverse: palette.blauPurple30,
184
- textLinkDisabled: palette.grey5,
185
- textLinkDangerDisabled: palette.grey5,
186
163
  // CONTROLS
187
164
  control: palette.darkModeGrey,
188
165
  loadingBar: palette.blauBluePrimary,
@@ -205,7 +182,6 @@ export var getBlauSkin = function() {
205
182
  textPrimaryInverse: palette.grey2,
206
183
  textSecondary: palette.grey4,
207
184
  textSecondaryInverse: palette.grey4,
208
- textDisabled: palette.grey5,
209
185
  textAmount: palette.blauBlueSecondary,
210
186
  textNavigationBarPrimary: palette.grey2,
211
187
  textNavigationBarSecondary: palette.grey4,
@@ -57,40 +57,29 @@ export var getMovistarSkin = function(variant) {
57
57
  borderSelected: palette.movistarGreen,
58
58
  // BUTTONS
59
59
  buttonDangerBackground: palette.pepper,
60
- buttonDangerBackgroundDisabled: palette.pepperLight30,
61
60
  buttonDangerBackgroundSelected: palette.pepperDark,
62
61
  buttonDangerBackgroundHover: palette.pepperDark,
63
62
  buttonLinkBackgroundSelected: palette.movistarBlueLight10,
64
63
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.2),
65
64
  buttonPrimaryBackground: palette.movistarGreen,
66
- buttonPrimaryBackgroundDisabled: palette.movistarGreenLight50,
67
- buttonPrimaryBackgroundDisabledInverse: palette.movistarBlueLight50,
68
65
  buttonPrimaryBackgroundInverse: palette.white,
69
66
  buttonPrimaryBackgroundSelected: palette.movistarGreenDark,
70
67
  buttonPrimaryBackgroundHover: palette.movistarGreenDark,
71
68
  buttonPrimaryBackgroundSelectedInverse: palette.movistarBlueLight50,
72
69
  buttonSecondaryBackground: palette.movistarGreen,
73
- buttonSecondaryBackgroundDisabled: palette.movistarGreenLight50,
74
70
  buttonSecondaryBackgroundSelected: palette.movistarGreenDark,
75
- buttonSecondaryBorderDisabledInverse: palette.movistarBlueLight50,
76
71
  buttonSecondaryBorderInverse: palette.white,
77
72
  buttonSecondaryBorderSelectedInverse: palette.movistarBlueLight50,
78
73
  textButtonPrimary: palette.white,
79
- textButtonPrimaryDisabled: palette.white,
80
74
  textButtonPrimaryInverse: palette.movistarBlue,
81
- textButtonPrimaryInverseDisabled: palette.movistarBlueLight30,
82
75
  textButtonPrimaryInverseSelected: palette.movistarBlue,
83
76
  textButtonSecondary: palette.movistarGreen,
84
- textButtonSecondaryDisabled: palette.movistarGreenLight50,
85
77
  textButtonSecondarySelected: palette.movistarGreenDark,
86
78
  textButtonSecondaryInverse: palette.white,
87
- textButtonSecondaryInverseDisabled: palette.movistarBlueLight50,
88
79
  textButtonSecondaryInverseSelected: palette.white,
89
80
  textLink: palette.movistarBlue,
90
81
  textLinkInverse: palette.white,
91
82
  textLinkDanger: palette.pepper,
92
- textLinkDangerDisabled: palette.pepperLight30,
93
- textLinkDisabled: palette.movistarBlueLight50,
94
83
  textLinkSnackbar: palette.movistarBlueLight50,
95
84
  // CONTROLS
96
85
  control: palette.grey3,
@@ -122,7 +111,6 @@ export var getMovistarSkin = function(variant) {
122
111
  textPrimaryInverse: palette.white,
123
112
  textSecondary: palette.grey5,
124
113
  textSecondaryInverse: palette.white,
125
- textDisabled: palette.grey4,
126
114
  textAmount: palette.movistarBlue,
127
115
  // STATES
128
116
  error: palette.pepper,
@@ -151,36 +139,26 @@ export var getMovistarSkin = function(variant) {
151
139
  skeletonWave: palette.grey5,
152
140
  borderLight: palette.darkModeBlack,
153
141
  border: palette.darkModeGrey,
154
- buttonDangerBackgroundDisabled: applyAlpha(palette.white, 0.05),
155
142
  buttonLinkBackgroundSelected: applyAlpha(palette.white, 0.05),
156
143
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.05),
157
144
  buttonPrimaryBackground: palette.movistarGreen,
158
- buttonPrimaryBackgroundDisabled: applyAlpha(palette.white, 0.05),
159
- buttonPrimaryBackgroundDisabledInverse: applyAlpha(palette.white, 0.05),
160
145
  buttonPrimaryBackgroundInverse: palette.movistarGreen,
161
146
  buttonPrimaryBackgroundSelected: palette.movistarGreenDark,
162
147
  buttonPrimaryBackgroundHover: palette.movistarGreenDark,
163
148
  buttonPrimaryBackgroundSelectedInverse: palette.movistarGreenDark,
164
149
  buttonSecondaryBackground: palette.movistarGreen,
165
- buttonSecondaryBackgroundDisabled: applyAlpha(palette.white, 0.05),
166
150
  buttonSecondaryBackgroundSelected: palette.movistarGreenDark,
167
- buttonSecondaryBorderDisabledInverse: applyAlpha(palette.white, 0.05),
168
151
  buttonSecondaryBorderInverse: palette.movistarGreen,
169
152
  buttonSecondaryBorderSelectedInverse: palette.movistarGreenDark,
170
153
  textButtonPrimary: palette.grey2,
171
- textButtonPrimaryDisabled: palette.grey5,
172
154
  textButtonPrimaryInverse: palette.grey2,
173
- textButtonPrimaryInverseDisabled: palette.grey5,
174
155
  textButtonPrimaryInverseSelected: palette.grey2,
175
156
  textButtonSecondary: palette.grey2,
176
- textButtonSecondaryDisabled: palette.grey5,
177
157
  textButtonSecondarySelected: palette.grey4,
178
158
  textButtonSecondaryInverse: palette.grey2,
179
- textButtonSecondaryInverseDisabled: palette.grey5,
180
159
  textButtonSecondaryInverseSelected: palette.grey4,
181
160
  textLink: palette.movistarBlue,
182
161
  textLinkInverse: palette.movistarBlue,
183
- textLinkDisabled: palette.grey6,
184
162
  control: palette.grey6,
185
163
  controlActivated: palette.movistarBlue,
186
164
  loadingBar: palette.movistarBlue,
@@ -200,7 +178,6 @@ export var getMovistarSkin = function(variant) {
200
178
  textPrimaryInverse: palette.grey2,
201
179
  textSecondary: palette.grey4,
202
180
  textSecondaryInverse: palette.grey4,
203
- textDisabled: palette.grey5,
204
181
  textAmount: palette.movistarBlueLight50,
205
182
  textNavigationBarPrimary: palette.grey2,
206
183
  textNavigationBarSecondary: palette.grey4,
@@ -63,40 +63,29 @@ export var getO2ClassicSkin = function() {
63
63
  borderSelected: palette.o2Gem,
64
64
  // BUTTONS
65
65
  buttonDangerBackground: palette.pepper,
66
- buttonDangerBackgroundDisabled: palette.pepperLight30,
67
66
  buttonDangerBackgroundSelected: palette.pepperDark,
68
67
  buttonDangerBackgroundHover: palette.pepperDark,
69
68
  buttonLinkBackgroundSelected: palette.o2SkyBlueLight10,
70
69
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.2),
71
70
  buttonPrimaryBackground: palette.o2SkyBlue,
72
- buttonPrimaryBackgroundDisabled: palette.o2SkyBlueLight50,
73
- buttonPrimaryBackgroundDisabledInverse: palette.o2SkyBlueLight50,
74
71
  buttonPrimaryBackgroundInverse: palette.white,
75
72
  buttonPrimaryBackgroundSelected: palette.o2SkyBlueDark,
76
73
  buttonPrimaryBackgroundHover: palette.o2SkyBlueDark,
77
74
  buttonPrimaryBackgroundSelectedInverse: palette.o2SkyBlueLight50,
78
75
  buttonSecondaryBackground: palette.o2SkyBlue,
79
- buttonSecondaryBackgroundDisabled: palette.o2SkyBlueLight50,
80
76
  buttonSecondaryBackgroundSelected: palette.o2SkyBlueDark,
81
- buttonSecondaryBorderDisabledInverse: palette.o2SkyBlueLight50,
82
77
  buttonSecondaryBorderInverse: palette.white,
83
78
  buttonSecondaryBorderSelectedInverse: palette.o2SkyBlueLight50,
84
79
  textButtonPrimary: palette.white,
85
- textButtonPrimaryDisabled: palette.white,
86
80
  textButtonPrimaryInverse: palette.o2SkyBlue,
87
- textButtonPrimaryInverseDisabled: palette.o2SkyBlueLight30,
88
81
  textButtonPrimaryInverseSelected: palette.o2SkyBlue,
89
82
  textButtonSecondary: palette.o2SkyBlue,
90
- textButtonSecondaryDisabled: palette.o2SkyBlueLight50,
91
83
  textButtonSecondarySelected: palette.o2SkyBlueDark,
92
84
  textButtonSecondaryInverse: palette.white,
93
- textButtonSecondaryInverseDisabled: palette.o2SkyBlueLight50,
94
85
  textButtonSecondaryInverseSelected: palette.white,
95
86
  textLink: palette.o2SkyBlue,
96
87
  textLinkInverse: palette.white,
97
88
  textLinkDanger: palette.pepper,
98
- textLinkDangerDisabled: palette.pepperLight30,
99
- textLinkDisabled: palette.o2SkyBlueLight,
100
89
  textLinkSnackbar: palette.o2SkyBlueLight,
101
90
  // CONTROLS
102
91
  control: palette.grey3,
@@ -130,7 +119,6 @@ export var getO2ClassicSkin = function() {
130
119
  textPrimaryInverse: palette.white,
131
120
  textSecondary: palette.grey5,
132
121
  textSecondaryInverse: palette.white,
133
- textDisabled: palette.grey4,
134
122
  textAmount: palette.o2SkyBlue,
135
123
  // STATES
136
124
  error: palette.pepper,
@@ -160,32 +148,21 @@ export var getO2ClassicSkin = function() {
160
148
  border: palette.darkModeGrey,
161
149
  borderDark: palette.grey5,
162
150
  borderSelected: palette.o2Gem,
163
- buttonDangerBackgroundDisabled: applyAlpha(palette.white, 0.05),
164
151
  buttonLinkBackgroundSelected: applyAlpha(palette.white, 0.05),
165
152
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.05),
166
- buttonPrimaryBackgroundDisabled: applyAlpha(palette.white, 0.05),
167
- buttonPrimaryBackgroundDisabledInverse: applyAlpha(palette.white, 0.05),
168
153
  buttonPrimaryBackgroundInverse: palette.o2SkyBlue,
169
154
  buttonPrimaryBackgroundSelectedInverse: palette.o2SkyBlueDark,
170
- buttonSecondaryBackgroundDisabled: applyAlpha(palette.white, 0.05),
171
- buttonSecondaryBorderDisabledInverse: applyAlpha(palette.white, 0.05),
172
155
  buttonSecondaryBorderInverse: palette.o2SkyBlue,
173
156
  buttonSecondaryBorderSelectedInverse: palette.o2SkyBlueDark,
174
157
  textButtonPrimary: palette.grey2,
175
- textButtonPrimaryDisabled: palette.grey5,
176
158
  textButtonPrimaryInverse: palette.grey2,
177
- textButtonPrimaryInverseDisabled: palette.grey5,
178
159
  textButtonPrimaryInverseSelected: palette.grey2,
179
160
  textButtonSecondary: palette.grey2,
180
- textButtonSecondaryDisabled: palette.grey5,
181
161
  textButtonSecondarySelected: palette.grey4,
182
162
  textButtonSecondaryInverse: palette.grey2,
183
- textButtonSecondaryInverseDisabled: palette.grey5,
184
163
  textButtonSecondaryInverseSelected: palette.grey4,
185
164
  textLink: palette.o2SkyBlueLight,
186
165
  textLinkInverse: palette.o2SkyBlueLight,
187
- textLinkDangerDisabled: palette.grey5,
188
- textLinkDisabled: palette.darkModeGrey6,
189
166
  textLinkSnackbar: palette.o2SkyBlueLight,
190
167
  control: palette.darkModeGrey6,
191
168
  controlActivated: palette.o2Gem,
@@ -210,7 +187,6 @@ export var getO2ClassicSkin = function() {
210
187
  textPrimaryInverse: palette.grey2,
211
188
  textSecondary: palette.grey4,
212
189
  textSecondaryInverse: palette.grey4,
213
- textDisabled: palette.grey5,
214
190
  textAmount: palette.o2SkyBlueLight50,
215
191
  textNavigationBarPrimary: palette.grey2,
216
192
  textNavigationBarSecondary: palette.grey4,
@@ -63,40 +63,29 @@ export var getO2Skin = function() {
63
63
  borderSelected: palette.o2BluePrimary,
64
64
  // BUTTONS
65
65
  buttonDangerBackground: palette.pepper,
66
- buttonDangerBackgroundDisabled: palette.pepperLight30,
67
66
  buttonDangerBackgroundSelected: palette.pepperDark,
68
67
  buttonDangerBackgroundHover: palette.pepperDark,
69
68
  buttonLinkBackgroundSelected: palette.o2BluePrimaryLight10,
70
69
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.2),
71
70
  buttonPrimaryBackground: palette.o2BluePrimary,
72
- buttonPrimaryBackgroundDisabled: palette.o2BluePrimaryLight10,
73
- buttonPrimaryBackgroundDisabledInverse: palette.o2BluePrimaryLight50,
74
71
  buttonPrimaryBackgroundInverse: palette.white,
75
72
  buttonPrimaryBackgroundSelected: palette.o2BluePrimaryDark,
76
73
  buttonPrimaryBackgroundHover: palette.o2BluePrimaryDark,
77
74
  buttonPrimaryBackgroundSelectedInverse: palette.o2BluePrimaryLight50,
78
75
  buttonSecondaryBackground: palette.o2BluePrimary,
79
- buttonSecondaryBackgroundDisabled: palette.o2BluePrimaryLight10,
80
76
  buttonSecondaryBackgroundSelected: palette.o2BluePrimaryDark,
81
- buttonSecondaryBorderDisabledInverse: palette.o2BluePrimaryLight50,
82
77
  buttonSecondaryBorderInverse: palette.white,
83
78
  buttonSecondaryBorderSelectedInverse: palette.o2BluePrimaryLight50,
84
79
  textButtonPrimary: palette.white,
85
- textButtonPrimaryDisabled: palette.white,
86
80
  textButtonPrimaryInverse: palette.o2BluePrimary,
87
- textButtonPrimaryInverseDisabled: palette.o2BluePrimaryLight10,
88
81
  textButtonPrimaryInverseSelected: palette.o2BluePrimaryDark,
89
82
  textButtonSecondary: palette.o2BluePrimary,
90
- textButtonSecondaryDisabled: palette.o2BluePrimaryLight10,
91
83
  textButtonSecondarySelected: palette.o2BluePrimaryDark,
92
84
  textButtonSecondaryInverse: palette.white,
93
- textButtonSecondaryInverseDisabled: palette.o2BluePrimaryLight50,
94
85
  textButtonSecondaryInverseSelected: palette.white,
95
86
  textLink: palette.o2BluePrimary,
96
87
  textLinkInverse: palette.white,
97
88
  textLinkDanger: palette.pepper,
98
- textLinkDangerDisabled: palette.pepperLight30,
99
- textLinkDisabled: palette.o2BluePrimaryLight50,
100
89
  textLinkSnackbar: palette.o2BluePrimaryLight50,
101
90
  // CONTROLS
102
91
  control: palette.grey3,
@@ -130,7 +119,6 @@ export var getO2Skin = function() {
130
119
  textPrimaryInverse: palette.white,
131
120
  textSecondary: palette.grey5,
132
121
  textSecondaryInverse: palette.white,
133
- textDisabled: palette.grey4,
134
122
  textAmount: palette.o2BluePrimary,
135
123
  // STATES
136
124
  error: palette.pepper,
@@ -160,36 +148,26 @@ export var getO2Skin = function() {
160
148
  border: palette.darkModeGrey,
161
149
  borderDark: palette.grey5,
162
150
  borderSelected: palette.darkModeO2BluePrimary,
163
- buttonDangerBackgroundDisabled: applyAlpha(palette.white, 0.05),
164
151
  buttonLinkBackgroundSelected: applyAlpha(palette.white, 0.05),
165
152
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.05),
166
153
  buttonPrimaryBackground: palette.darkModeO2BluePrimary,
167
- buttonPrimaryBackgroundDisabled: applyAlpha(palette.white, 0.05),
168
- buttonPrimaryBackgroundDisabledInverse: applyAlpha(palette.white, 0.05),
169
154
  buttonPrimaryBackgroundInverse: palette.darkModeO2BluePrimary,
170
155
  buttonPrimaryBackgroundSelected: palette.darkModeO2BluePrimaryDark,
171
156
  buttonPrimaryBackgroundHover: palette.darkModeO2BluePrimaryDark,
172
157
  buttonPrimaryBackgroundSelectedInverse: palette.darkModeO2BluePrimaryDark,
173
158
  buttonSecondaryBackground: palette.darkModeO2BluePrimary,
174
- buttonSecondaryBackgroundDisabled: applyAlpha(palette.white, 0.05),
175
159
  buttonSecondaryBackgroundSelected: palette.darkModeO2BluePrimaryDark,
176
- buttonSecondaryBorderDisabledInverse: applyAlpha(palette.white, 0.05),
177
160
  buttonSecondaryBorderInverse: palette.darkModeO2BluePrimary,
178
161
  buttonSecondaryBorderSelectedInverse: palette.darkModeO2BluePrimaryDark,
179
162
  textButtonPrimary: palette.grey2,
180
- textButtonPrimaryDisabled: palette.grey5,
181
163
  textButtonPrimaryInverse: palette.grey2,
182
- textButtonPrimaryInverseDisabled: palette.grey5,
183
164
  textButtonPrimaryInverseSelected: palette.grey2,
184
165
  textButtonSecondary: palette.grey2,
185
- textButtonSecondaryDisabled: palette.grey5,
186
166
  textButtonSecondarySelected: palette.grey4,
187
167
  textButtonSecondaryInverse: palette.grey2,
188
- textButtonSecondaryInverseDisabled: palette.grey5,
189
168
  textButtonSecondaryInverseSelected: palette.grey4,
190
169
  textLink: palette.o2BluePrimaryLight50,
191
170
  textLinkInverse: palette.o2BluePrimaryLight50,
192
- textLinkDisabled: palette.darkModeGrey6,
193
171
  control: palette.darkModeGrey6,
194
172
  controlActivated: palette.o2BluePrimaryLight50,
195
173
  loadingBar: palette.darkModeO2BluePrimary,
@@ -213,7 +191,6 @@ export var getO2Skin = function() {
213
191
  textPrimaryInverse: palette.grey2,
214
192
  textSecondary: palette.grey4,
215
193
  textSecondaryInverse: palette.grey4,
216
- textDisabled: palette.grey5,
217
194
  textAmount: palette.o2BluePrimaryLight10,
218
195
  textNavigationBarPrimary: palette.grey2,
219
196
  textNavigationBarSecondary: palette.grey4,
@@ -54,40 +54,29 @@ export var getVivoSkin = function() {
54
54
  borderSelected: palette.vivoPurple,
55
55
  // BUTTONS
56
56
  buttonDangerBackground: palette.pepper,
57
- buttonDangerBackgroundDisabled: palette.pepperLight30,
58
57
  buttonDangerBackgroundSelected: palette.pepperDark,
59
58
  buttonDangerBackgroundHover: palette.pepperDark,
60
59
  buttonLinkBackgroundSelected: palette.vivoPurpleLight10,
61
60
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.2),
62
61
  buttonPrimaryBackground: palette.vivoPurple,
63
- buttonPrimaryBackgroundDisabled: palette.vivoPurpleLight20,
64
- buttonPrimaryBackgroundDisabledInverse: palette.vivoPurpleLight50,
65
62
  buttonPrimaryBackgroundInverse: palette.white,
66
63
  buttonPrimaryBackgroundSelected: palette.vivoPurpleDark,
67
64
  buttonPrimaryBackgroundHover: palette.vivoPurpleDark,
68
65
  buttonPrimaryBackgroundSelectedInverse: palette.vivoPurpleLight50,
69
66
  buttonSecondaryBackground: palette.vivoPurple,
70
- buttonSecondaryBackgroundDisabled: palette.vivoPurpleLight20,
71
67
  buttonSecondaryBackgroundSelected: palette.vivoPurpleDark,
72
- buttonSecondaryBorderDisabledInverse: palette.vivoPurpleLight50,
73
68
  buttonSecondaryBorderInverse: palette.white,
74
69
  buttonSecondaryBorderSelectedInverse: palette.vivoPurpleLight50,
75
70
  textButtonPrimary: palette.white,
76
- textButtonPrimaryDisabled: palette.white,
77
71
  textButtonPrimaryInverse: palette.vivoPurple,
78
- textButtonPrimaryInverseDisabled: palette.vivoPurpleLight20,
79
72
  textButtonPrimaryInverseSelected: palette.vivoPurple,
80
73
  textButtonSecondary: palette.vivoPurple,
81
- textButtonSecondaryDisabled: palette.vivoPurpleLight20,
82
74
  textButtonSecondarySelected: palette.vivoPurpleDark,
83
75
  textButtonSecondaryInverse: palette.white,
84
- textButtonSecondaryInverseDisabled: palette.vivoPurpleLight50,
85
76
  textButtonSecondaryInverseSelected: palette.white,
86
77
  textLink: palette.vivoPurple,
87
78
  textLinkInverse: palette.white,
88
79
  textLinkDanger: palette.pepper,
89
- textLinkDangerDisabled: palette.pepperLight30,
90
- textLinkDisabled: palette.vivoPurpleLight50,
91
80
  textLinkSnackbar: palette.vivoPurpleLight50,
92
81
  // CONTROLS
93
82
  control: palette.grey3,
@@ -121,7 +110,6 @@ export var getVivoSkin = function() {
121
110
  textPrimaryInverse: palette.white,
122
111
  textSecondary: palette.grey5,
123
112
  textSecondaryInverse: palette.white,
124
- textDisabled: palette.grey4,
125
113
  textAmount: palette.vivoPurple,
126
114
  // STATES
127
115
  error: palette.pepper,
@@ -151,36 +139,26 @@ export var getVivoSkin = function() {
151
139
  border: palette.darkModeGrey,
152
140
  borderDark: palette.grey5,
153
141
  borderSelected: palette.vivoPurpleLight80,
154
- buttonDangerBackgroundDisabled: applyAlpha(palette.white, 0.05),
155
142
  buttonLinkBackgroundSelected: applyAlpha(palette.white, 0.05),
156
143
  buttonLinkBackgroundSelectedInverse: applyAlpha(palette.white, 0.05),
157
144
  buttonPrimaryBackground: palette.vivoPurpleLight80,
158
- buttonPrimaryBackgroundDisabled: applyAlpha(palette.white, 0.05),
159
- buttonPrimaryBackgroundDisabledInverse: applyAlpha(palette.white, 0.05),
160
145
  buttonPrimaryBackgroundInverse: palette.vivoPurpleLight80,
161
146
  buttonPrimaryBackgroundSelected: palette.vivoPurpleDark,
162
147
  buttonPrimaryBackgroundHover: palette.vivoPurpleDark,
163
148
  buttonPrimaryBackgroundSelectedInverse: palette.vivoPurpleDark,
164
149
  buttonSecondaryBackground: palette.vivoPurpleLight80,
165
- buttonSecondaryBackgroundDisabled: applyAlpha(palette.white, 0.05),
166
150
  buttonSecondaryBackgroundSelected: palette.vivoPurpleDark,
167
- buttonSecondaryBorderDisabledInverse: applyAlpha(palette.white, 0.05),
168
151
  buttonSecondaryBorderInverse: palette.vivoPurpleLight80,
169
152
  buttonSecondaryBorderSelectedInverse: palette.vivoPurpleDark,
170
153
  textButtonPrimary: palette.grey2,
171
- textButtonPrimaryDisabled: palette.grey5,
172
154
  textButtonPrimaryInverse: palette.grey2,
173
- textButtonPrimaryInverseDisabled: palette.grey5,
174
155
  textButtonPrimaryInverseSelected: palette.grey2,
175
156
  textButtonSecondary: palette.grey2,
176
- textButtonSecondaryDisabled: palette.grey5,
177
157
  textButtonSecondarySelected: palette.grey4,
178
158
  textButtonSecondaryInverse: palette.grey2,
179
- textButtonSecondaryInverseDisabled: palette.grey5,
180
159
  textButtonSecondaryInverseSelected: palette.grey4,
181
160
  textLink: palette.vivoPurpleLight50,
182
161
  textLinkInverse: palette.vivoPurpleLight50,
183
- textLinkDisabled: palette.darkModeGrey6,
184
162
  control: palette.darkModeGrey6,
185
163
  controlActivated: palette.vivoPurpleLight80,
186
164
  loadingBar: palette.vivoPurpleLight80,
@@ -205,7 +183,6 @@ export var getVivoSkin = function() {
205
183
  textPrimaryInverse: palette.grey2,
206
184
  textSecondary: palette.grey4,
207
185
  textSecondaryInverse: palette.grey4,
208
- textDisabled: palette.grey5,
209
186
  textAmount: palette.vivoPurpleLight50,
210
187
  textNavigationBarPrimary: palette.grey2,
211
188
  textNavigationBarSecondary: palette.grey4,
@@ -79,7 +79,8 @@ var useStyles = createUseStyles(function(param) {
79
79
  return {
80
80
  checkbox: {
81
81
  display: 'inline-block',
82
- padding: isIos ? 0 : 4
82
+ padding: isIos ? 0 : 4,
83
+ cursor: 'pointer'
83
84
  },
84
85
  switchCheckboxContainer: {
85
86
  position: 'relative',
@@ -89,7 +90,6 @@ var useStyles = createUseStyles(function(param) {
89
90
  switchCheckboxLabel: {
90
91
  display: 'block',
91
92
  overflow: 'hidden',
92
- cursor: 'pointer',
93
93
  borderRadius: 40,
94
94
  '& > *': {
95
95
  pointerEvents: 'none'
@@ -135,8 +135,8 @@ var useStyles = createUseStyles(function(param) {
135
135
  cursor: 'default'
136
136
  },
137
137
  disabled: {
138
- opacity: 0.5,
139
- pointerEvents: 'none'
138
+ cursor: 'default',
139
+ opacity: 0.5
140
140
  }
141
141
  };
142
142
  });
@@ -182,7 +182,8 @@ var Switch = function(props) {
182
182
  }
183
183
  };
184
184
  var switchEl = /*#__PURE__*/ _jsx("div", {
185
- className: classes.checkbox,
185
+ className: classNames(classes.checkbox, _defineProperty({
186
+ }, classes.disabled, disabled)),
186
187
  children: /*#__PURE__*/ _jsx("div", {
187
188
  className: classes.switchCheckboxContainer,
188
189
  children: /*#__PURE__*/ _jsxs("div", {
@@ -207,8 +208,7 @@ var Switch = function(props) {
207
208
  onKeyDown: disabled ? undefined : handleKeyDown,
208
209
  tabIndex: disabled ? undefined : 0,
209
210
  ref: focusableRef,
210
- className: classNames(classes.container, _defineProperty({
211
- }, classes.disabled, disabled)),
211
+ className: classes.container,
212
212
  "aria-disabled": disabled,
213
213
  "aria-labelledby": labelId
214
214
  }, getPrefixedDataAttributes(props.dataAttributes), {
@@ -219,11 +219,14 @@ var Switch = function(props) {
219
219
  alignItems: "center",
220
220
  children: [
221
221
  switchEl,
222
- /*#__PURE__*/ _jsx(Text3, {
222
+ props.children && /*#__PURE__*/ _jsx(Text3, {
223
223
  regular: true,
224
224
  as: "div",
225
225
  id: labelId,
226
- children: props.children
226
+ children: /*#__PURE__*/ _jsx("span", {
227
+ className: disabled ? classes.disabled : '',
228
+ children: props.children
229
+ })
227
230
  })
228
231
  ]
229
232
  })