@ballistix.digital/react-components 4.10.0 → 5.0.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
@@ -26,7 +26,7 @@ var $iA2ta$reacttailwindcssdatepicker = require("react-tailwindcss-datepicker");
26
26
  var $iA2ta$formik = require("formik");
27
27
  var $iA2ta$reactdropzone = require("react-dropzone");
28
28
  var $iA2ta$moment = require("moment");
29
- var $iA2ta$reactgeosuggest = require("react-geosuggest");
29
+ var $iA2ta$ubilabsreactgeosuggest = require("@ubilabs/react-geosuggest");
30
30
 
31
31
 
32
32
  function $parcel$export(e, n, v, s) {
@@ -4094,7 +4094,7 @@ var $9420756208be2d43$var$defaultStyles = {
4094
4094
  };
4095
4095
  var $9420756208be2d43$var$underline = {
4096
4096
  tab: {
4097
- base: 'whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm cursor-pointer',
4097
+ base: 'whitespace-nowrap flex gap-2 py-4 px-1 border-b-2 font-medium text-sm cursor-pointer',
4098
4098
  active: 'border-primary-500 text-primary-600',
4099
4099
  inactive: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'
4100
4100
  }
@@ -4178,16 +4178,18 @@ var $06795e94e474e27d$var$List = function(props) {
4178
4178
  setActive
4179
4179
  ]);
4180
4180
  (0, $iA2ta$react.useEffect)(function() {
4181
+ var _a;
4181
4182
  var tab;
4182
4183
  var tabs = (0, $iA2ta$react.Children).map(children, function(child) {
4183
4184
  return child;
4184
4185
  });
4185
- var initialTab = tabs === null || tabs === void 0 ? void 0 : tabs.find(function(tab) {
4186
- return tab.props.isInitial;
4187
- });
4186
+ var initialTab = (0, $iA2ta$lodash.find)(tabs, [
4187
+ 'props.isInitial',
4188
+ true
4189
+ ]);
4188
4190
  if (initialTab !== undefined) tab = initialTab;
4189
4191
  else tab = tabs[0];
4190
- setActive && setActive(tab === null || tab === void 0 ? void 0 : tab.props.accessor);
4192
+ setActive && setActive((_a = tab === null || tab === void 0 ? void 0 : tab.props) === null || _a === void 0 ? void 0 : _a.accessor);
4191
4193
  // eslint-disable-next-line react-hooks/exhaustive-deps
4192
4194
  }, []);
4193
4195
  var handleCalculateActiveAccessor = function() {
@@ -4220,9 +4222,10 @@ var $06795e94e474e27d$var$List = function(props) {
4220
4222
  onChange: handleChangeSelect,
4221
4223
  children: (0, $iA2ta$react.Children).map(children, function(child) {
4222
4224
  var _a;
4225
+ if (child.props.isHidden) return null;
4223
4226
  return (0, $iA2ta$reactjsxruntime.jsx)("option", {
4224
4227
  value: child.props.accessor,
4225
- children: child.props.children
4228
+ children: child.props.label
4226
4229
  }, (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.accessor);
4227
4230
  })
4228
4231
  })
@@ -4239,7 +4242,7 @@ var $06795e94e474e27d$var$List = function(props) {
4239
4242
  });
4240
4243
  };
4241
4244
  var $06795e94e474e27d$var$Item = function(props) {
4242
- var children = props.children, _a = props.as, LinkComponent = _a === void 0 ? 'a' : _a, _b = props.type, type = _b === void 0 ? 'underline' : _b, href = props.href, isCurrent = props.isCurrent, onClick = props.onClick, stylesOverrides = props.styles, isLoading = props.isLoading, isHidden = props.isHidden;
4245
+ var label = props.label, icon = props.icon, _a = props.as, LinkComponent = _a === void 0 ? 'a' : _a, _b = props.type, type = _b === void 0 ? 'underline' : _b, href = props.href, isCurrent = props.isCurrent, onClick = props.onClick, stylesOverrides = props.styles, isLoading = props.isLoading, isHidden = props.isHidden;
4243
4246
  if (isHidden) return null;
4244
4247
  var handleGenerateStyle = function() {
4245
4248
  var result = (0, $f0c671820c340322$export$e2d2075c69d9100d)((0, $9420756208be2d43$export$2e2bcd8739ae039).base);
@@ -4250,18 +4253,24 @@ var $06795e94e474e27d$var$Item = function(props) {
4250
4253
  return result;
4251
4254
  };
4252
4255
  var styles = handleGenerateStyle();
4253
- if (href && LinkComponent) return (0, $iA2ta$reactjsxruntime.jsx)(LinkComponent, {
4256
+ if (href && LinkComponent) return (0, $iA2ta$reactjsxruntime.jsxs)(LinkComponent, {
4254
4257
  href: href,
4255
4258
  className: (0, $622cd2936b18c771$export$4370d69198e9314a)(styles.tab.base, isCurrent ? styles.tab.active : styles.tab.inactive, isLoading && 'opacity-30 !text-gray-300 !cursor-default', isLoading && styles.tab.inactive),
4256
4259
  onClick: onClick,
4257
- children: children
4260
+ children: [
4261
+ icon,
4262
+ label
4263
+ ]
4258
4264
  });
4259
- return (0, $iA2ta$reactjsxruntime.jsx)("div", {
4265
+ return (0, $iA2ta$reactjsxruntime.jsxs)("div", {
4260
4266
  className: (0, $622cd2936b18c771$export$4370d69198e9314a)(styles.tab.base, isCurrent ? styles.tab.active : styles.tab.inactive, isLoading && 'opacity-30 !text-gray-300 !cursor-default', isLoading && styles.tab.inactive),
4261
4267
  onClick: !isLoading ? onClick : function() {
4262
4268
  return null;
4263
4269
  },
4264
- children: children
4270
+ children: [
4271
+ icon,
4272
+ label
4273
+ ]
4265
4274
  });
4266
4275
  };
4267
4276
  var $06795e94e474e27d$var$View = function(props) {
@@ -6339,7 +6348,6 @@ var $9f6cfd21b337aca9$export$2e2bcd8739ae039 = $9f6cfd21b337aca9$var$OpeningsHou
6339
6348
 
6340
6349
 
6341
6350
 
6342
-
6343
6351
  var $03b368478cf695f0$var$base = {
6344
6352
  container: '',
6345
6353
  head: 'flex justify-between',
@@ -6467,7 +6475,7 @@ var $7fcfa1d90c4a7e45$var$AddressInputGroupForm = function(props) {
6467
6475
  }),
6468
6476
  (0, $iA2ta$reactjsxruntime.jsx)("div", {
6469
6477
  className: styles.body,
6470
- children: (0, $iA2ta$reactjsxruntime.jsx)((0, ($parcel$interopDefault($iA2ta$reactgeosuggest))), {
6478
+ children: (0, $iA2ta$reactjsxruntime.jsx)((0, ($parcel$interopDefault($iA2ta$ubilabsreactgeosuggest))), {
6471
6479
  types: [
6472
6480
  'address'
6473
6481
  ],
@@ -6555,8 +6563,7 @@ var $7fcfa1d90c4a7e45$var$AddressInputGroupForm = function(props) {
6555
6563
  info: value === null || value === void 0 ? void 0 : value.info
6556
6564
  };
6557
6565
  onBlur && onBlur(location);
6558
- },
6559
- children: (0, $iA2ta$reactjsxruntime.jsx)((0, $iA2ta$reactjsxruntime.Fragment), {})
6566
+ }
6560
6567
  })
6561
6568
  }),
6562
6569
  (0, $iA2ta$reactjsxruntime.jsxs)("div", {