opus-toolkit-components 1.2.3 → 1.2.5

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.
@@ -3737,11 +3737,11 @@ function Button(_ref) {
3737
3737
  } = _ref;
3738
3738
  // Define styles for button ranks
3739
3739
  const rankStyles = {
3740
- primary: 'bg-[--color-primary-btn] hover:bg-[--color-primary-btn-hover] text-greyBaseLight',
3741
- secondary: 'bg-transparent hover:bg-[--color-primary-btn-hover] text-greyBaseLight',
3740
+ primary: 'bg-[--color-primary-btn] hover:bg-[--color-primary-btn-hover] text-[--color-primary-btn-txt]',
3741
+ secondary: 'bg-transparent border-2 border-[--color-primary-btn] hover:border-[--color-secondary-btn-hover] hover:text-[--color-secondary-btn-hover] text-[--color-primary-btn]',
3742
+ tertiary: 'bg-transparent underline text-[--color-text-strong]',
3742
3743
  outline: 'bg-[--color-input-bg] border-solid border-2 border-[--color-outline-btn] hover:border-[--color-outline-btn-hover] text-[--color-text-strong]',
3743
- neutral: 'bg-greyLight50 hover:bg-greyLight100 text-greyLight700',
3744
- destructive: 'bg-utilRed1000 hover:bg-utilRed800 text-greyBaseLight'
3744
+ destructive: 'bg-[--color-destructive-btn] hover:bg-[--color-destructive-btn-hover] text-[--color-destructive-btn-txt]'
3745
3745
  };
3746
3746
 
3747
3747
  // Disabled styles for button
@@ -3751,7 +3751,7 @@ function Button(_ref) {
3751
3751
  const iconClassNames = "inline-block \n transition-transform \n ease-in-out \n duration-200\n h-5 w-5\n ".concat(iconPosition === 'right' ? 'ml-2' : 'mr-2', "\n ").concat(isIconAnimated && !isSaving ? 'group-hover:translate-x-1' : '', "\n ").concat(isSaving ? 'animate-spin' : '', " // Add spinning animation\n ");
3752
3752
 
3753
3753
  // Main button class names
3754
- const classNames = " \n ".concat(state === 'disabled' || isSaving ? disabledStyles : rankStyles[rank] || rankStyles.primary, "\n group \n transition \n ease-in-out \n duration-700 \n rounded-lg \n px-5 \n py-2 \n text-").concat(size, " \n flex \n items-center \n justify-center \n whitespace-nowrap // Prevents text wrapping\n ").concat(isFullWidth ? 'w-full' : '', "\n ").concat(className, "\n ");
3754
+ const classNames = " \n ".concat(state === 'disabled' || isSaving ? disabledStyles : rankStyles[rank] || rankStyles.primary, "\n group \n transition \n ease-in-out \n duration-700 \n rounded-lg\n hover:shadow-lg\n px-5 \n py-2 \n text-").concat(size, " \n flex \n items-center \n justify-center \n whitespace-nowrap // Prevents text wrapping\n ").concat(isFullWidth ? 'w-full' : '', "\n ").concat(className, "\n ");
3755
3755
  return /*#__PURE__*/external_react_default().createElement("button", {
3756
3756
  type: type,
3757
3757
  title: title,
@@ -3789,9 +3789,9 @@ function Card(_ref) {
3789
3789
  // Theme override
3790
3790
  const intentClasses = {
3791
3791
  default: 'bg-[--color-primary-bg] text-[--color-text-weak]',
3792
- info: 'bg-[--color-util-blue-200] text-[--color-text-strong]',
3793
- success: 'bg-[--color-util-green-200] text-[--color-text-strong]',
3794
- error: 'bg-[--color-util-red-200] text-[--color-text-strong]',
3792
+ info: 'bg-[--color-util-blue-200] text-[--color-black] border-[--color-util-blue]',
3793
+ success: 'bg-[--color-util-green-200] text-[--color-black] border-[--color-util-green]',
3794
+ error: 'bg-[--color-util-red-200] text-[--color-text-black] border-[--color-util-red]',
3795
3795
  brand: 'bg-[--color-brand-primary] text-[--color-white]',
3796
3796
  brandSecondary: 'bg-[--color-brand-secondary] text-[--color-white]'
3797
3797
  };
@@ -6318,10 +6318,11 @@ const flip = function (options) {
6318
6318
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
6319
6319
  const nextPlacement = placements[nextIndex];
6320
6320
  if (nextPlacement) {
6321
- var _overflowsData$;
6322
6321
  const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== floating_ui_utils_getSideAxis(nextPlacement) : false;
6323
- const hasInitialMainAxisOverflow = ((_overflowsData$ = overflowsData[0]) == null ? void 0 : _overflowsData$.overflows[0]) > 0;
6324
- if (!ignoreCrossAxisOverflow || hasInitialMainAxisOverflow) {
6322
+ if (!ignoreCrossAxisOverflow ||
6323
+ // We leave the current main axis only if every placement on that axis
6324
+ // overflows the main axis.
6325
+ overflowsData.every(d => d.overflows[0] > 0 && floating_ui_utils_getSideAxis(d.placement) === initialSideAxis)) {
6325
6326
  // Try next placement and re-run the lifecycle.
6326
6327
  return {
6327
6328
  data: {
@@ -7662,7 +7663,10 @@ const floating_ui_dom_computePosition = (reference, floating, options) => {
7662
7663
 
7663
7664
 
7664
7665
 
7665
- var index = typeof document !== 'undefined' ? external_react_.useLayoutEffect : external_react_.useEffect;
7666
+ var isClient = typeof document !== 'undefined';
7667
+
7668
+ var noop = function noop() {};
7669
+ var index = isClient ? external_react_.useLayoutEffect : noop;
7666
7670
 
7667
7671
  // Fork of `fast-deep-equal` that only does the comparisons we need and compares
7668
7672
  // functions
@@ -12777,7 +12781,7 @@ function Dropdown(_ref) {
12777
12781
  className: "-mr-1 h-5 w-5 text-[--color-text-weak] transition-transform duration-200 ".concat(isOpen ? 'rotate-180' : 'rotate-0')
12778
12782
  }))), !disabled && /*#__PURE__*/external_react_default().createElement(Pt, {
12779
12783
  transition: true,
12780
- className: "\r absolute \r right-0 \r z-10 \r mt-2 \r w-56 \r origin-top-right \r rounded-md bg-[--color-primary-bg] \r shadow-lg \r ring-1 \r ring-[--color-stroke] \r ring-opacity-1 \r transition \r focus:outline-none \r max-h-48 \r overflow-y-auto\r ",
12784
+ className: " absolute right-0 z-10 mt-2 w-56 origin-top-right rounded-md bg-[--color-primary-bg] shadow-lg ring-1 ring-[--color-stroke] ring-opacity-1 transition focus:outline-none max-h-48 overflow-y-auto ",
12781
12785
  onClick: () => setIsOpen(false)
12782
12786
  }, /*#__PURE__*/external_react_default().createElement("div", {
12783
12787
  className: "py-1"