@ballistix.digital/react-components 6.0.3-next-42.0 → 6.0.3-next-43.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.
package/dist/index.js CHANGED
@@ -1142,6 +1142,10 @@ var $87a4b9b6cee76290$var$topLeft = {
1142
1142
  var $87a4b9b6cee76290$var$topRight = {
1143
1143
  items: 'origin-bottom-left left-0 bottom-0'
1144
1144
  };
1145
+ var $87a4b9b6cee76290$var$disabled = {
1146
+ button: 'opacity-50 cursor-not-allowed',
1147
+ compact: 'opacity-50 cursor-not-allowed'
1148
+ };
1145
1149
  var $87a4b9b6cee76290$var$styles = {
1146
1150
  base: $87a4b9b6cee76290$var$base,
1147
1151
  button: $87a4b9b6cee76290$var$button,
@@ -1149,18 +1153,19 @@ var $87a4b9b6cee76290$var$styles = {
1149
1153
  'bottom-left': $87a4b9b6cee76290$var$bottomLeft,
1150
1154
  'bottom-right': $87a4b9b6cee76290$var$bottomRight,
1151
1155
  'top-left': $87a4b9b6cee76290$var$topLeft,
1152
- 'top-right': $87a4b9b6cee76290$var$topRight
1156
+ 'top-right': $87a4b9b6cee76290$var$topRight,
1157
+ disabled: $87a4b9b6cee76290$var$disabled
1153
1158
  };
1154
1159
  var $87a4b9b6cee76290$export$2e2bcd8739ae039 = $87a4b9b6cee76290$var$styles;
1155
1160
 
1156
1161
 
1157
1162
  var $6f7275eb03c2b93c$var$Container = function(props) {
1158
- var children = props.children, label = props.label, trigger = props.trigger, dataCy = props.dataCy, _a = props.type, type = _a === void 0 ? 'button' : _a, _b = props.direction, direction = _b === void 0 ? 'bottom end' : _b, _c = props.isEscapingOverflow, isEscapingOverflow = _c === void 0 ? false : _c, stylesOverrides = props.styles;
1163
+ var children = props.children, label = props.label, trigger = props.trigger, dataCy = props.dataCy, _a = props.type, type = _a === void 0 ? 'button' : _a, _b = props.direction, direction = _b === void 0 ? 'bottom end' : _b, _c = props.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = props.isEscapingOverflow, isEscapingOverflow = _d === void 0 ? false : _d, stylesOverrides = props.styles;
1159
1164
  var handleGenerateStyle = function() {
1160
1165
  var result = (0, $f0c671820c340322$export$e2d2075c69d9100d)((0, $87a4b9b6cee76290$export$2e2bcd8739ae039).base);
1161
1166
  var keys = (0, $27f90b0cff19565d$export$be5d6ab3c5b84767)((0, $87a4b9b6cee76290$export$2e2bcd8739ae039).base);
1162
1167
  keys.forEach(function(key) {
1163
- (0, $iA2ta$lodash.set)(result, key, (0, $622cd2936b18c771$export$4370d69198e9314a)((0, $iA2ta$lodash.get)((0, $87a4b9b6cee76290$export$2e2bcd8739ae039).base, key), type && (0, $iA2ta$lodash.get)((0, $87a4b9b6cee76290$export$2e2bcd8739ae039)[type], key), (0, $iA2ta$lodash.get)(stylesOverrides, key)));
1168
+ (0, $iA2ta$lodash.set)(result, key, (0, $622cd2936b18c771$export$4370d69198e9314a)((0, $iA2ta$lodash.get)((0, $87a4b9b6cee76290$export$2e2bcd8739ae039).base, key), type && (0, $iA2ta$lodash.get)((0, $87a4b9b6cee76290$export$2e2bcd8739ae039)[type], key), isDisabled && (0, $iA2ta$lodash.get)((0, $87a4b9b6cee76290$export$2e2bcd8739ae039).disabled, key), (0, $iA2ta$lodash.get)(stylesOverrides, key)));
1164
1169
  });
1165
1170
  return result;
1166
1171
  };
@@ -1172,6 +1177,7 @@ var $6f7275eb03c2b93c$var$Container = function(props) {
1172
1177
  (0, $iA2ta$reactjsxruntime.jsxs)("div", {
1173
1178
  children: [
1174
1179
  type === 'button' && (!trigger ? (0, $iA2ta$reactjsxruntime.jsxs)((0, $iA2ta$headlessuireact.MenuButton), {
1180
+ disabled: isDisabled,
1175
1181
  className: styles.button,
1176
1182
  "data-cy": dataCy,
1177
1183
  children: [
@@ -1182,10 +1188,12 @@ var $6f7275eb03c2b93c$var$Container = function(props) {
1182
1188
  })
1183
1189
  ]
1184
1190
  }) : (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$headlessuireact.MenuButton), {
1191
+ disabled: isDisabled,
1185
1192
  "data-cy": dataCy,
1186
1193
  children: trigger
1187
1194
  })),
1188
1195
  type === 'compact' && (0, $iA2ta$reactjsxruntime.jsxs)((0, $iA2ta$headlessuireact.MenuButton), {
1196
+ disabled: isDisabled,
1189
1197
  className: styles.compact,
1190
1198
  "data-cy": dataCy,
1191
1199
  children: [