@ballistix.digital/react-components 9.4.1-rc-357.0 → 9.4.1-rc-360.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
@@ -986,7 +986,7 @@ var $1a23dea933d8729b$export$2e2bcd8739ae039 = $1a23dea933d8729b$var$styles;
986
986
 
987
987
 
988
988
  const $88f571169cf61789$var$Button = (props)=>{
989
- const { children: children, innerRef: innerRef, htmlType: htmlType = 'button', dataCy: dataCy, dataTestid: dataTestid, type: type = 'primary', size: size = 'md', figure: figure = 'block', status: status = 'idle', isDisabled: isDisabled, styles: stylesOverrides, onClick: onClick } = props;
989
+ const { children: children, innerRef: innerRef, htmlType: htmlType = 'button', dataCy: dataCy, dataTestId: dataTestId, type: type = 'primary', size: size = 'md', figure: figure = 'block', status: status = 'idle', isDisabled: isDisabled, styles: stylesOverrides, onClick: onClick } = props;
990
990
  const handleGenerateStyle = ()=>{
991
991
  const result = (0, $f0c671820c340322$export$e2d2075c69d9100d)((0, $1a23dea933d8729b$export$2e2bcd8739ae039).base);
992
992
  const keys = (0, $27f90b0cff19565d$export$be5d6ab3c5b84767)((0, $1a23dea933d8729b$export$2e2bcd8739ae039).base);
@@ -1005,7 +1005,7 @@ const $88f571169cf61789$var$Button = (props)=>{
1005
1005
  },
1006
1006
  ref: innerRef,
1007
1007
  "data-cy": dataCy,
1008
- "data-testid": dataTestid,
1008
+ "data-test-id": dataTestId,
1009
1009
  children: [
1010
1010
  status === 'idle' && children,
1011
1011
  status === 'loading' && (0, $iA2ta$reactjsxruntime.jsxs)("div", {
@@ -1727,7 +1727,7 @@ const $c474e734ef48f77c$var$InputGroup = (props)=>{
1727
1727
  onClick: onClick,
1728
1728
  onKeyDown: onKeyDown
1729
1729
  }),
1730
- htmlType === 'text' && isClearable && (0, $iA2ta$reactjsxruntime.jsx)("div", {
1730
+ (htmlType === 'text' || htmlType === 'email') && isClearable && (0, $iA2ta$reactjsxruntime.jsx)("div", {
1731
1731
  className: "right-5 px-2 absolute cursor-pointer hover:opacity-60",
1732
1732
  onClick: onClear,
1733
1733
  children: (0, $iA2ta$reactjsxruntime.jsx)((0, $cbf4b156892acb71$export$2e2bcd8739ae039), {
@@ -2298,12 +2298,12 @@ var $0c7305af577f9538$export$2e2bcd8739ae039 = $0c7305af577f9538$var$styles;
2298
2298
 
2299
2299
  const $cb1b9d36d0757897$var$searchPrefix = '__search__';
2300
2300
  const $cb1b9d36d0757897$var$SelectMenu = (props)=>{
2301
- const { name: name = 'select-menu-form', label: label, description: description, hint: hint, placeholder: placeholder, options: options, required: required, value: value, error: error, isRequired: isRequired = false, isLoading: isLoading, isTouched: isTouched = false, isDisabled: isDisabled, isClearable: isClearable = true, isMultiple: isMultiple = false, isSearchable: isSearchable = true, isSolo: isSolo = false, isOptionalLabelHidden: isOptionalLabelHidden = false, onChange: onChange, onSearchInputChange: onSearchInputChange, onClear: onClear, onBlur: onBlur, isSearchOptionEnabled: isSearchOptionEnabled = false, searchInputOptionRenderer: searchInputOptionRenderer, dataTestid: dataTestid, styles: stylesOverrides } = props;
2301
+ const { name: name = 'select-menu-form', label: label, description: description, hint: hint, placeholder: placeholder, options: options, required: required, value: value, error: error, isRequired: isRequired = false, isLoading: isLoading, isTouched: isTouched = false, isDisabled: isDisabled, isClearable: isClearable = true, isMultiple: isMultiple = false, isSearchable: isSearchable = true, isSolo: isSolo = false, isOptionalLabelHidden: isOptionalLabelHidden = false, onChange: onChange, onSearchInputChange: onSearchInputChange, onClear: onClear, onBlur: onBlur, searchInputOptionRenderer: searchInputOptionRenderer, dataTestId: dataTestId, styles: stylesOverrides } = props;
2302
2302
  const [isFocus, setIsFocus] = (0, $iA2ta$react.useState)(true);
2303
2303
  const [state, setState] = (0, $iA2ta$react.useState)(value ?? null);
2304
2304
  const [searchValue, setSearchValue] = (0, $iA2ta$react.useState)();
2305
2305
  const isValid = error === undefined;
2306
- const selectDataTestid = dataTestid ?? `form-select-${name}`;
2306
+ const selectDataTestId = dataTestId ?? `form-select-${name}`;
2307
2307
  const handleGenerateStyle = ()=>{
2308
2308
  const result = (0, $f0c671820c340322$export$e2d2075c69d9100d)((0, $0c7305af577f9538$export$2e2bcd8739ae039).base);
2309
2309
  const keys = (0, $iA2ta$lodash.concat)((0, $27f90b0cff19565d$export$be5d6ab3c5b84767)((0, $0c7305af577f9538$export$2e2bcd8739ae039).base), (0, $27f90b0cff19565d$export$be5d6ab3c5b84767)((0, $3369f7d596d23d58$export$2e2bcd8739ae039).base), (0, $27f90b0cff19565d$export$be5d6ab3c5b84767)((0, $65bb4d593718fcda$export$2e2bcd8739ae039).base));
@@ -2316,14 +2316,14 @@ const $cb1b9d36d0757897$var$SelectMenu = (props)=>{
2316
2316
  setState(selectValue);
2317
2317
  onChange && onChange(selectValue);
2318
2318
  setIsFocus(false);
2319
- if (isSearchOptionEnabled) setSearchValue(null);
2319
+ if (searchInputOptionRenderer) setSearchValue(null);
2320
2320
  };
2321
2321
  const handleSearchInputChange = (e)=>{
2322
- if (isSearchOptionEnabled) setSearchValue(e.target.value);
2322
+ if (searchInputOptionRenderer) setSearchValue(e.target.value);
2323
2323
  onSearchInputChange?.(e);
2324
2324
  };
2325
2325
  const computedOptions = (0, $iA2ta$react.useMemo)(()=>{
2326
- if (!isSearchOptionEnabled || !searchValue) return options;
2326
+ if (!searchInputOptionRenderer || !searchValue) return options;
2327
2327
  if (options.some((opt)=>opt.label.toLowerCase().includes(searchValue.toLowerCase()))) return options;
2328
2328
  return [
2329
2329
  ...options,
@@ -2333,7 +2333,7 @@ const $cb1b9d36d0757897$var$SelectMenu = (props)=>{
2333
2333
  }
2334
2334
  ];
2335
2335
  }, [
2336
- isSearchOptionEnabled,
2336
+ searchInputOptionRenderer,
2337
2337
  options,
2338
2338
  searchValue
2339
2339
  ]);
@@ -2368,7 +2368,7 @@ const $cb1b9d36d0757897$var$SelectMenu = (props)=>{
2368
2368
  ]);
2369
2369
  // Reset search value when the dropdown closes (aria-expanded → false).
2370
2370
  (0, $iA2ta$react.useEffect)(()=>{
2371
- if (!isSearchOptionEnabled) return;
2371
+ if (!searchInputOptionRenderer) return;
2372
2372
  const targetNode = document.querySelector(`.bx-select-menu-${name}`);
2373
2373
  if (!targetNode) return;
2374
2374
  const observer = new MutationObserver((mutations)=>{
@@ -2382,7 +2382,7 @@ const $cb1b9d36d0757897$var$SelectMenu = (props)=>{
2382
2382
  });
2383
2383
  return ()=>observer.disconnect();
2384
2384
  }, [
2385
- isSearchOptionEnabled,
2385
+ searchInputOptionRenderer,
2386
2386
  name
2387
2387
  ]);
2388
2388
  const formattedError = (0, $iA2ta$react.useMemo)(()=>{
@@ -2393,11 +2393,11 @@ const $cb1b9d36d0757897$var$SelectMenu = (props)=>{
2393
2393
  ]);
2394
2394
  return (0, $iA2ta$reactjsxruntime.jsxs)("div", {
2395
2395
  className: styles.container,
2396
- "data-testid": selectDataTestid,
2396
+ "data-testid": selectDataTestId,
2397
2397
  onBlur: (e)=>{
2398
2398
  if (!e.currentTarget.contains(e.relatedTarget)) {
2399
2399
  setIsFocus(false);
2400
- if (isSearchOptionEnabled) setSearchValue('');
2400
+ if (searchInputOptionRenderer) setSearchValue('');
2401
2401
  }
2402
2402
  },
2403
2403
  children: [
@@ -2416,7 +2416,7 @@ const $cb1b9d36d0757897$var$SelectMenu = (props)=>{
2416
2416
  (0, $iA2ta$reactjsxruntime.jsx)("div", {
2417
2417
  id: `select-menu-control-${name}`,
2418
2418
  "data-cy": `form-select-${name}`,
2419
- "data-testid": `${selectDataTestid}-control`,
2419
+ "data-testid": `${selectDataTestId}-control`,
2420
2420
  children: (0, $iA2ta$reactjsxruntime.jsx)((0, ($parcel$interopDefault($iA2ta$reacttailwindcssselect))), {
2421
2421
  primaryColor: "primary",
2422
2422
  //
@@ -2436,7 +2436,7 @@ const $cb1b9d36d0757897$var$SelectMenu = (props)=>{
2436
2436
  onSearchInputChange: handleSearchInputChange,
2437
2437
  //
2438
2438
  formatOptionLabel: (data)=>{
2439
- if (isSearchOptionEnabled && searchInputOptionRenderer && data.value.startsWith($cb1b9d36d0757897$var$searchPrefix)) {
2439
+ if (searchInputOptionRenderer && data.value.startsWith($cb1b9d36d0757897$var$searchPrefix)) {
2440
2440
  const tagItem = (0, $iA2ta$reactjsxruntime.jsx)("div", {
2441
2441
  className: styles.tagItem,
2442
2442
  children: (0, $iA2ta$reactjsxruntime.jsx)("p", {
@@ -3724,11 +3724,11 @@ const $51d5596368acf759$var$TableList2 = (props)=>{
3724
3724
  if (column.getIsSorted()) return column.getIsSorted() === 'asc' ? (0, $iA2ta$reactjsxruntime.jsx)((0, $cbf4b156892acb71$export$2e2bcd8739ae039), {
3725
3725
  accessor: "chevron-up",
3726
3726
  type: "solid",
3727
- className: "h-4 w-4"
3727
+ className: "h-3! w-3!"
3728
3728
  }) : (0, $iA2ta$reactjsxruntime.jsx)((0, $cbf4b156892acb71$export$2e2bcd8739ae039), {
3729
3729
  accessor: "chevron-down",
3730
3730
  type: "solid",
3731
- className: "h-4 w-4"
3731
+ className: "h-3! w-3!"
3732
3732
  });
3733
3733
  return (0, $iA2ta$reactjsxruntime.jsxs)("div", {
3734
3734
  className: "h-5 w-5 flex flex-col items-center justify-center",
@@ -3736,12 +3736,12 @@ const $51d5596368acf759$var$TableList2 = (props)=>{
3736
3736
  (0, $iA2ta$reactjsxruntime.jsx)((0, $cbf4b156892acb71$export$2e2bcd8739ae039), {
3737
3737
  accessor: "chevron-up",
3738
3738
  type: "solid",
3739
- className: "translate-y-1/5 h-3 w-3"
3739
+ className: "translate-y-1/12 h-2.5! w-2.5!"
3740
3740
  }),
3741
3741
  (0, $iA2ta$reactjsxruntime.jsx)((0, $cbf4b156892acb71$export$2e2bcd8739ae039), {
3742
3742
  accessor: "chevron-down",
3743
3743
  type: "solid",
3744
- className: "-translate-y-1/5 h-3 w-3"
3744
+ className: "-translate-y-1/12 h-2.5! w-2.5!"
3745
3745
  })
3746
3746
  ]
3747
3747
  });