@ballistix.digital/react-components 7.3.0 → 7.4.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
@@ -472,10 +472,10 @@ var $2125901b4a9afff9$export$2e2bcd8739ae039 = $2125901b4a9afff9$var$IconElement
472
472
 
473
473
 
474
474
  var $fbfda6b39c475fe4$var$base = {
475
- container: 'rounded-xs p-4 border-l-4',
475
+ container: 'flex rounded-xs p-4 border-l-4',
476
476
  icon: 'h-5 w-5',
477
477
  content: {
478
- container: 'ml-3 flex-1 md:flex md:justify-between ease-in-out transition-transform h-full items-center',
478
+ container: 'ml-3 flex-1 md:flex md:justify-between ease-in-out transition-transform h-full',
479
479
  iconContainer: 'shrink-0',
480
480
  title: 'text-md font-semibold',
481
481
  message: 'text-sm',
@@ -541,8 +541,8 @@ var $fbfda6b39c475fe4$export$2e2bcd8739ae039 = $fbfda6b39c475fe4$var$styles;
541
541
 
542
542
 
543
543
  var $29a51bd84954e590$var$AlertElement = function(props) {
544
- var title = props.title, message = props.message, _a = props.type, type = _a === void 0 ? 'generic' : _a, _b = props.onClose, onClose = _b === void 0 ? (0, $iA2ta$lodash.noop) : _b, _c = props.onCollapse, onCollapse = _c === void 0 ? (0, $iA2ta$lodash.noop) : _c, _d = props.isCollapsible, isCollapsible = _d === void 0 ? false : _d, stylesOverrides = props.styles, iconAccessorOverride = props.iconAccessor;
545
- var _e = (0, $iA2ta$react.useState)(false), isCollapsed = _e[0], setIsCollapsed = _e[1];
544
+ var title = props.title, message = props.message, _a = props.type, type = _a === void 0 ? 'generic' : _a, onClose = props.onClose, onCollapse = props.onCollapse, _b = props.isCollapsible, isCollapsible = _b === void 0 ? false : _b, stylesOverrides = props.styles, iconAccessorOverride = props.iconAccessor;
545
+ var _c = (0, $iA2ta$react.useState)(false), isCollapsed = _c[0], setIsCollapsed = _c[1];
546
546
  var handleGenerateStyle = function() {
547
547
  var result = (0, $f0c671820c340322$export$e2d2075c69d9100d)((0, $fbfda6b39c475fe4$export$2e2bcd8739ae039).base);
548
548
  var keys = (0, $27f90b0cff19565d$export$be5d6ab3c5b84767)((0, $fbfda6b39c475fe4$export$2e2bcd8739ae039).base);
@@ -574,9 +574,9 @@ var $29a51bd84954e590$var$AlertElement = function(props) {
574
574
  return (0, $iA2ta$reactjsxruntime.jsxs)("div", {
575
575
  className: (0, $622cd2936b18c771$export$4370d69198e9314a)(styles.container),
576
576
  children: [
577
- (0, $iA2ta$reactjsxruntime.jsx)("div", {
577
+ iconAccessor && (0, $iA2ta$reactjsxruntime.jsx)("div", {
578
578
  className: styles.iconContainer,
579
- children: iconAccessor && (0, $iA2ta$reactjsxruntime.jsx)((0, $2125901b4a9afff9$export$2e2bcd8739ae039), {
579
+ children: (0, $iA2ta$reactjsxruntime.jsx)((0, $2125901b4a9afff9$export$2e2bcd8739ae039), {
580
580
  accessor: iconAccessor,
581
581
  className: (0, $622cd2936b18c771$export$4370d69198e9314a)(styles.icon),
582
582
  "aria-hidden": "true"
@@ -587,11 +587,11 @@ var $29a51bd84954e590$var$AlertElement = function(props) {
587
587
  children: [
588
588
  (0, $iA2ta$reactjsxruntime.jsxs)("div", {
589
589
  children: [
590
- (0, $iA2ta$reactjsxruntime.jsx)("h3", {
590
+ title && (0, $iA2ta$reactjsxruntime.jsx)("h3", {
591
591
  className: (0, $622cd2936b18c771$export$4370d69198e9314a)(styles.content.title),
592
592
  children: title
593
593
  }),
594
- !isCollapsed && (0, $iA2ta$reactjsxruntime.jsx)("p", {
594
+ message && !isCollapsed && (0, $iA2ta$reactjsxruntime.jsx)("p", {
595
595
  className: (0, $622cd2936b18c771$export$4370d69198e9314a)(styles.content.message),
596
596
  children: message
597
597
  })
@@ -603,14 +603,14 @@ var $29a51bd84954e590$var$AlertElement = function(props) {
603
603
  isCollapsible && (0, $iA2ta$reactjsxruntime.jsx)("div", {
604
604
  onClick: function() {
605
605
  setIsCollapsed(!isCollapsed);
606
- onCollapse();
606
+ if (onCollapse) onCollapse();
607
607
  },
608
608
  children: (0, $iA2ta$reactjsxruntime.jsx)((0, $2125901b4a9afff9$export$2e2bcd8739ae039), {
609
609
  className: (0, $622cd2936b18c771$export$4370d69198e9314a)(styles.content.action, isCollapsed && styles.content.inverted),
610
610
  accessor: "chevron-up"
611
611
  })
612
612
  }),
613
- (0, $iA2ta$reactjsxruntime.jsx)("div", {
613
+ onClose && (0, $iA2ta$reactjsxruntime.jsx)("div", {
614
614
  onClick: onClose,
615
615
  children: (0, $iA2ta$reactjsxruntime.jsx)((0, $2125901b4a9afff9$export$2e2bcd8739ae039), {
616
616
  className: styles.content.action,
@@ -1133,8 +1133,8 @@ var $49256f91bd9e1c3f$export$2e2bcd8739ae039 = $49256f91bd9e1c3f$var$ButtonGroup
1133
1133
 
1134
1134
  var $87a4b9b6cee76290$var$base = {
1135
1135
  container: 'inline-block text-left',
1136
- button: 'inline-flex justify-center w-full rounded-md border border-gray-300 shadow-xs px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-primary-500',
1137
- compact: 'bg-gray-100 rounded-full flex items-center text-gray-400 hover:text-gray-600 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-primary-500',
1136
+ button: 'cursor-pointer inline-flex justify-center w-full rounded-md border border-gray-300 shadow-xs px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-primary-500',
1137
+ compact: 'cursor-pointer bg-gray-100 rounded-full flex items-center text-gray-400 hover:text-gray-600 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-primary-500',
1138
1138
  dots: 'h-7 w-7 p-1',
1139
1139
  items: 'z-10 absolute mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black/5 divide-y divide-gray-100 focus:outline-hidden'
1140
1140
  };
@@ -1153,8 +1153,8 @@ var $87a4b9b6cee76290$var$topRight = {
1153
1153
  items: 'origin-bottom-left left-0 bottom-0'
1154
1154
  };
1155
1155
  var $87a4b9b6cee76290$var$disabled = {
1156
- button: 'opacity-50 cursor-not-allowed',
1157
- compact: 'opacity-50 cursor-not-allowed'
1156
+ button: 'opacity-50 cursor-not-allowed!',
1157
+ compact: 'opacity-50 cursor-not-allowed!'
1158
1158
  };
1159
1159
  var $87a4b9b6cee76290$var$styles = {
1160
1160
  base: $87a4b9b6cee76290$var$base,
@@ -5418,7 +5418,8 @@ https://github.com/onesine/react-tailwindcss-datepicker
5418
5418
  label: 'block font-medium text-gray-900',
5419
5419
  hint: 'text-xs text-gray-500',
5420
5420
  leading: 'pointer-events-none absolute inset-y-0 left-0 flex items-center',
5421
- input: 'block w-full inline-flex',
5421
+ inputWrapper: '',
5422
+ input: 'w-full inline-flex',
5422
5423
  trailing: 'pointer-events-none absolute inset-y-0 right-0 flex items-center',
5423
5424
  description: 'text-gray-400 text-xs mt-1',
5424
5425
  error: 'text-red-500 text-xs ml-5 mt-1'
@@ -5599,7 +5600,7 @@ var $7d3977a96c400c32$var$DateRangeMenu = function(props) {
5599
5600
  ]
5600
5601
  }),
5601
5602
  (0, $iA2ta$reactjsxruntime.jsxs)("div", {
5602
- className: styles.container,
5603
+ className: styles.inputWrapper,
5603
5604
  "data-cy": inputDataCy,
5604
5605
  ref: $datepickerInputRef,
5605
5606
  onClick: onClick,
@@ -6083,28 +6084,26 @@ var $341e1fbf5ffaef7b$var$Switch = function(props) {
6083
6084
  name
6084
6085
  ]
6085
6086
  }),
6086
- (0, $iA2ta$reactjsxruntime.jsx)("span", {
6087
+ (0, $iA2ta$reactjsxruntime.jsxs)("span", {
6087
6088
  className: (0, $622cd2936b18c771$export$4370d69198e9314a)(styles.toggle.base, value ? styles.toggle.checked : styles.toggle.unchecked),
6088
- children: iconAccessorChecked && iconAccessorUnchecked && (0, $iA2ta$reactjsxruntime.jsxs)((0, $iA2ta$reactjsxruntime.Fragment), {
6089
- children: [
6090
- (0, $iA2ta$reactjsxruntime.jsx)("span", {
6091
- className: (0, $622cd2936b18c771$export$4370d69198e9314a)(value ? styles.icon.hidden : styles.icon.shown, styles.icon.base),
6092
- "aria-hidden": "true",
6093
- children: (0, $iA2ta$reactjsxruntime.jsx)((0, $2125901b4a9afff9$export$2e2bcd8739ae039), {
6094
- accessor: iconAccessorUnchecked,
6095
- className: styles.icon.icon
6096
- })
6097
- }),
6098
- (0, $iA2ta$reactjsxruntime.jsx)("span", {
6099
- className: (0, $622cd2936b18c771$export$4370d69198e9314a)(value ? styles.icon.shown : styles.icon.hidden, styles.icon.base),
6100
- "aria-hidden": "true",
6101
- children: (0, $iA2ta$reactjsxruntime.jsx)((0, $2125901b4a9afff9$export$2e2bcd8739ae039), {
6102
- accessor: iconAccessorChecked,
6103
- className: styles.icon.icon
6104
- })
6089
+ children: [
6090
+ iconAccessorUnchecked && (0, $iA2ta$reactjsxruntime.jsx)("span", {
6091
+ className: (0, $622cd2936b18c771$export$4370d69198e9314a)(value ? styles.icon.hidden : styles.icon.shown, styles.icon.base),
6092
+ "aria-hidden": "true",
6093
+ children: (0, $iA2ta$reactjsxruntime.jsx)((0, $2125901b4a9afff9$export$2e2bcd8739ae039), {
6094
+ accessor: iconAccessorUnchecked,
6095
+ className: styles.icon.icon
6105
6096
  })
6106
- ]
6107
- })
6097
+ }),
6098
+ iconAccessorChecked && (0, $iA2ta$reactjsxruntime.jsx)("span", {
6099
+ className: (0, $622cd2936b18c771$export$4370d69198e9314a)(value ? styles.icon.shown : styles.icon.hidden, styles.icon.base),
6100
+ "aria-hidden": "true",
6101
+ children: (0, $iA2ta$reactjsxruntime.jsx)((0, $2125901b4a9afff9$export$2e2bcd8739ae039), {
6102
+ accessor: iconAccessorChecked,
6103
+ className: styles.icon.icon
6104
+ })
6105
+ })
6106
+ ]
6108
6107
  })
6109
6108
  ]
6110
6109
  })