@seeqdev/qomponents 0.0.35 → 0.0.37

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
@@ -51,7 +51,7 @@ const browserName = browserId && browserId.split(' ', 2)[0];
51
51
  browserId && parseInt(browserId.split(' ', 2)[1], 10);
52
52
  const browserIsFirefox = browserId && browserName === 'Firefox';
53
53
 
54
- const DEFAULT_TOOL_TIP_DELAY = 1000;
54
+ const DEFAULT_TOOL_TIP_DELAY = 500;
55
55
 
56
56
  const colorClassesThemeLight = {
57
57
  'theme': 'tw-text-sq-color-dark',
@@ -2777,8 +2777,7 @@ const arrow = options => {
2777
2777
  }).fn(state);
2778
2778
  }
2779
2779
  return {};
2780
- }
2781
- if (element) {
2780
+ } else if (element) {
2782
2781
  return arrow$1({
2783
2782
  element,
2784
2783
  padding
@@ -2803,13 +2802,11 @@ function deepEqual(a, b) {
2803
2802
  if (typeof a === 'function' && a.toString() === b.toString()) {
2804
2803
  return true;
2805
2804
  }
2806
- let length;
2807
- let i;
2808
- let keys;
2809
- if (a && b && typeof a === 'object') {
2805
+ let length, i, keys;
2806
+ if (a && b && typeof a == 'object') {
2810
2807
  if (Array.isArray(a)) {
2811
2808
  length = a.length;
2812
- if (length !== b.length) return false;
2809
+ if (length != b.length) return false;
2813
2810
  for (i = length; i-- !== 0;) {
2814
2811
  if (!deepEqual(a[i], b[i])) {
2815
2812
  return false;
@@ -2838,8 +2835,6 @@ function deepEqual(a, b) {
2838
2835
  }
2839
2836
  return true;
2840
2837
  }
2841
-
2842
- // biome-ignore lint/suspicious/noSelfCompare: in source
2843
2838
  return a !== a && b !== b;
2844
2839
  }
2845
2840
 
@@ -2900,23 +2895,22 @@ function useFloating(options) {
2900
2895
  const [_reference, _setReference] = React__namespace.useState(null);
2901
2896
  const [_floating, _setFloating] = React__namespace.useState(null);
2902
2897
  const setReference = React__namespace.useCallback(node => {
2903
- if (node !== referenceRef.current) {
2898
+ if (node != referenceRef.current) {
2904
2899
  referenceRef.current = node;
2905
2900
  _setReference(node);
2906
2901
  }
2907
- }, []);
2902
+ }, [_setReference]);
2908
2903
  const setFloating = React__namespace.useCallback(node => {
2909
2904
  if (node !== floatingRef.current) {
2910
2905
  floatingRef.current = node;
2911
2906
  _setFloating(node);
2912
2907
  }
2913
- }, []);
2908
+ }, [_setFloating]);
2914
2909
  const referenceEl = externalReference || _reference;
2915
2910
  const floatingEl = externalFloating || _floating;
2916
2911
  const referenceRef = React__namespace.useRef(null);
2917
2912
  const floatingRef = React__namespace.useRef(null);
2918
2913
  const dataRef = React__namespace.useRef(data);
2919
- const hasWhileElementsMounted = whileElementsMounted != null;
2920
2914
  const whileElementsMountedRef = useLatestRef(whileElementsMounted);
2921
2915
  const platformRef = useLatestRef(platform);
2922
2916
  const update = React__namespace.useCallback(() => {
@@ -2960,18 +2954,17 @@ function useFloating(options) {
2960
2954
  isMountedRef.current = false;
2961
2955
  };
2962
2956
  }, []);
2963
-
2964
- // biome-ignore lint/correctness/useExhaustiveDependencies: `hasWhileElementsMounted` is intentionally included.
2965
2957
  index$1(() => {
2966
2958
  if (referenceEl) referenceRef.current = referenceEl;
2967
2959
  if (floatingEl) floatingRef.current = floatingEl;
2968
2960
  if (referenceEl && floatingEl) {
2969
2961
  if (whileElementsMountedRef.current) {
2970
2962
  return whileElementsMountedRef.current(referenceEl, floatingEl, update);
2963
+ } else {
2964
+ update();
2971
2965
  }
2972
- update();
2973
2966
  }
2974
- }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
2967
+ }, [referenceEl, floatingEl, update, whileElementsMountedRef]);
2975
2968
  const refs = React__namespace.useMemo(() => ({
2976
2969
  reference: referenceRef,
2977
2970
  floating: floatingRef,
@@ -4546,7 +4539,7 @@ const ToolbarButton = ({ isSmall = false, label, icon, secondIcon, forceSmallIco
4546
4539
  }
4547
4540
  };
4548
4541
  return (React__namespace.createElement($cb5cc270b50c6fcd$export$be92b6f5f03c0fe9, { defaultOpen: false, onOpenChange: onOpenChange },
4549
- React__namespace.createElement($cb5cc270b50c6fcd$export$41fb9f06171c75f4, { id: id },
4542
+ React__namespace.createElement($cb5cc270b50c6fcd$export$41fb9f06171c75f4, { id: id, className: "tw-border-none", asChild: true },
4550
4543
  React__namespace.createElement("button", { ...tooltipData, className: `tw-bg-transparent tw-p-0 tw-flex tw-flex-col tw-items-center ${isSmall ? 'tw-py-[1px] tw-px-[5px]' : 'tw-px-2 tw-py-[3px]'} ${disabled ? disabledClasses$1 : isActive ? activeBorderStyles : triggerBorderStyles} ${extraClassNames || ''}`, "data-testid": testId, disabled: disabled, onClick: (e) => {
4551
4544
  onClick && onClick(e);
4552
4545
  } },