@seeqdev/qomponents 0.0.74 → 0.0.76

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.
@@ -1,38 +1,22 @@
1
1
  import { TooltipComponentProps } from '../Tooltip/Tooltip.types';
2
2
  export interface NewWorkbenchItems {
3
3
  id?: string;
4
- /** icon class to be used with the dropdown items - if available (i.e. 'fc-zoom') */
4
+ /** icon class to be used with the workbench items - if available (i.e. 'fc-zoom') */
5
5
  icon?: string;
6
- /** icon type to be used with the dropdown items - if available (i.e. 'fc') */
7
- iconType?: string;
8
- /** icon color to be used with the dropdown items - if available */
9
- iconColor?: string;
10
- /** custom id for the icon */
11
- iconCustomId?: string;
12
6
  /** icon extra class names */
13
7
  iconExtraClassNames?: string;
14
- /** label for the dropdown items */
15
- label: string;
16
- /** function called when the dropdown item is clicked on */
17
- onClick: (e?: Event) => void;
18
- /** dropdown subitem container classes */
19
- itemContainerClasses?: string;
20
- /** dropdown subitem label classes */
21
- labelClasses?: string;
8
+ /** label for the workbench items */
9
+ display: string;
10
+ /** function called when the workbench item is clicked on */
11
+ action: (e?: Event) => void;
22
12
  /** is item disabled */
23
- disabled?: boolean;
24
- /** test id for the dropdown subitem */
25
- labelTestId?: string;
26
- /** test id for the dropdown subitem icon */
27
- iconTestId?: string;
28
- /** displays a divider line under present dropdown item */
29
- hasDivider?: boolean;
30
- /** test id for the dropdown subitem */
13
+ enabled?: boolean;
14
+ /** displays a divider line under present workbench item */
15
+ divider?: boolean;
16
+ /** test id for the workbench item */
31
17
  testId?: string;
32
- /** adds description to be rendered by the custom component */
33
- description?: string;
34
- /** item container extra class names */
35
- containerExtraClassNames?: string;
18
+ /** subtext displayed below workbench item "headline" */
19
+ text?: string;
36
20
  }
37
21
  export interface NewWorkbenchProps extends TooltipComponentProps {
38
22
  /** items for the dropdown content */
@@ -69,6 +53,4 @@ export interface NewWorkbenchProps extends TooltipComponentProps {
69
53
  isCloseOnContentClick?: boolean;
70
54
  /** focus should be kept within dropdown */
71
55
  keepFocusInsideDropdown?: boolean;
72
- /** component to be used to render the dropdown item */
73
- variant?: 'newWorkbenchItem';
74
56
  }
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ import Tabs from './Tabs';
11
11
  import Accordion from './Accordion';
12
12
  import ButtonWithPopover from './ButtonWithPopover';
13
13
  import ButtonWithDropdown from './ButtonWithDropdown';
14
+ import NewWorkbench from './NewWorkbench';
14
15
  export { Tabs };
15
16
  export { Button };
16
17
  export { ToolbarButton };
@@ -25,3 +26,4 @@ export { Modal };
25
26
  export { Accordion };
26
27
  export { ButtonWithPopover };
27
28
  export { ButtonWithDropdown };
29
+ export { NewWorkbench };
package/dist/index.esm.js CHANGED
@@ -4561,7 +4561,7 @@ const $cb5cc270b50c6fcd$export$602eac185826482c = $cb5cc270b50c6fcd$export$dd679
4561
4561
  const $cb5cc270b50c6fcd$export$7c6e2c02157bb7d2 = $cb5cc270b50c6fcd$export$d7e1f420b25549ff;
4562
4562
  const $cb5cc270b50c6fcd$export$21b07c8f274aebd5 = $cb5cc270b50c6fcd$export$3152841115e061b2;
4563
4563
 
4564
- const borderStyles$3 = [
4564
+ const borderStyles$4 = [
4565
4565
  'tw-border-solid',
4566
4566
  'tw-border',
4567
4567
  'tw-rounded-sm',
@@ -4591,8 +4591,8 @@ const activeBorderStyles = [
4591
4591
  'active:tw-border-sq-color-dark',
4592
4592
  'dark:hover:tw-border-sq-color-dark-dark',
4593
4593
  ].join(' ');
4594
- const bgStyles$2 = ['tw-bg-sq-white', 'dark:tw-bg-sq-dark-background'].join(' ');
4595
- const disabledClasses$3 = ['tw-opacity-50', 'tw-cursor-not-allowed'].join(' ');
4594
+ const bgStyles$3 = ['tw-bg-sq-white', 'dark:tw-bg-sq-dark-background'].join(' ');
4595
+ const disabledClasses$4 = ['tw-opacity-50', 'tw-cursor-not-allowed'].join(' ');
4596
4596
  const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (React.createElement($cb5cc270b50c6fcd$export$7c6e2c02157bb7d2, { ref: ref, align: align, sideOffset: sideOffset, ...props, asChild: true })));
4597
4597
  const ToolbarButton = ({ isSmall = false, label, icon, secondIcon, forceSmallIcon = false, tooltipText, id, popoverContent, extraClassNames, testId, tooltipTestId, tooltipOptions, isActive = false, isHtmlTooltip = false, hasArrow = false, disabled = false, onClick, onHide, }) => {
4598
4598
  let tooltipData = undefined;
@@ -4614,17 +4614,17 @@ const ToolbarButton = ({ isSmall = false, label, icon, secondIcon, forceSmallIco
4614
4614
  React.createElement($cb5cc270b50c6fcd$export$41fb9f06171c75f4, { id: id, className: `tw-border-none ${isActive ? 'active' : ''}`, disabled: disabled, "data-testid": testId, onClick: (e) => {
4615
4615
  onClick && onClick(e);
4616
4616
  } },
4617
- React.createElement("div", { ...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$3 : isActive ? activeBorderStyles : triggerBorderStyles} ${extraClassNames || ''}` },
4617
+ React.createElement("div", { ...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$4 : isActive ? activeBorderStyles : triggerBorderStyles} ${extraClassNames || ''}` },
4618
4618
  React.createElement("span", { className: "tw-nowrap" },
4619
4619
  React.createElement(Icon, { icon: icon, testId: "firstIcon", type: "text", large: !isSmall && !label && !secondIcon && !forceSmallIcon, extraClassNames: `tw-text-sq-text-color dark:tw-text-sq-dark-text` }),
4620
4620
  secondIcon && React.createElement(Icon, { icon: secondIcon, type: "text", testId: "secondIcon" }),
4621
4621
  popoverContent ? (React.createElement(Icon, { icon: "fc-arrow-dropdown", extraClassNames: "tw-text-sq-text-color dark:tw-text-sq-dark-text tw-ml-[3px] tw-text-[8px]", type: "text" })) : undefined),
4622
4622
  !isSmall && (React.createElement("small", { className: "tw-text-sq-text-color dark:tw-text-sq-dark-text tw-text-[10px]" }, label)))),
4623
4623
  !!popoverContent ? (React.createElement(PopoverContent, { sideOffset: 2, align: "start" },
4624
- React.createElement("div", { className: bgStyles$2 +
4624
+ React.createElement("div", { className: bgStyles$3 +
4625
4625
  ' tw-relative tw-z-[1000] tw-min-w-6 tw-p-[0.5rem] focus-visible:tw-outline-none tw-outline-none data-[state=open]:animate-in data-[state=closed]:animate-out' +
4626
4626
  ' data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2' +
4627
- borderStyles$3 },
4627
+ borderStyles$4 },
4628
4628
  hasArrow && (React.createElement($cb5cc270b50c6fcd$export$21b07c8f274aebd5, { asChild: true },
4629
4629
  React.createElement("div", { className: " tw-fill-transparent tw-bg-white tw-w-[15px] tw-h-[15px] tw-mt-[-7px] tw-rotate-45 dark:tw-bg-sq-dark-background tw-border-b tw-border-r tw-border-sq-disabled-gray dark:tw-border-gray-500" }))),
4630
4630
  popoverContent))) : undefined));
@@ -13612,7 +13612,7 @@ const baseClasses = ['focus:tw-ring-0', 'disabled:tw-cursor-not-allowed'].join('
13612
13612
  const containerStyles = ['tw-bg-white', 'dark:tw-bg-sq-dark-background'].join(' ');
13613
13613
  const errorClasses = 'tw-border-sq-danger-color';
13614
13614
  const borderColorClasses = ['tw-border-sq-disabled-gray', 'dark:tw-border-sq-dark-disabled-gray'].join(' ');
13615
- const borderStyles$2 = [
13615
+ const borderStyles$3 = [
13616
13616
  'tw-border-solid',
13617
13617
  'tw-border',
13618
13618
  'hover:tw-border-sq-color-dark',
@@ -13666,7 +13666,7 @@ const optionStyles = [
13666
13666
  'tw-px-2.5',
13667
13667
  'specSelectOption',
13668
13668
  ].join(' ');
13669
- const disabledClasses$2 = ['tw-bg-sq-field-disabled-gray', 'tw-cursor-not-allowed'].join(' ');
13669
+ const disabledClasses$3 = ['tw-bg-sq-field-disabled-gray', 'tw-cursor-not-allowed'].join(' ');
13670
13670
  const dropDownIndicatorStyles = `tw-text-sq-disabled-gray ${textActiveStyles} specOpenIt`;
13671
13671
  const placeholderStyles = ['tw-text-gray-400', 'dark:tw-text-sq-dark-text-lighter', 'specOpenSelect'].join(' ');
13672
13672
  const multiValueStyles = [
@@ -13746,8 +13746,8 @@ const Select = ({ options, value, placeholder = 'select', noOptionsMessage = 'no
13746
13746
  else if (inputGroup === 'right') {
13747
13747
  border = menuIsOpen ? 'tw-rounded-tr-sm' : 'tw-rounded-r-sm';
13748
13748
  }
13749
- const appliedClasses = `${borderStyles$2} ${border} ${showError ? errorClasses : borderColorClasses} ${small ? 'reactSelectMinHeightSmall' : 'reactSelectMinHeight'} `;
13750
- return `${appliedClasses} ${baseClasses} specSelectControl ${isDisabled ? disabledClasses$2 : ''} ${small ? 'tw-pl-2 tw-pr-1' : 'tw-pl-2.5 tw-pr-1.5'}`;
13749
+ const appliedClasses = `${borderStyles$3} ${border} ${showError ? errorClasses : borderColorClasses} ${small ? 'reactSelectMinHeightSmall' : 'reactSelectMinHeight'} `;
13750
+ return `${appliedClasses} ${baseClasses} specSelectControl ${isDisabled ? disabledClasses$3 : ''} ${small ? 'tw-pl-2 tw-pr-1' : 'tw-pl-2.5 tw-pr-1.5'}`;
13751
13751
  },
13752
13752
  placeholder: () => placeholderStyles,
13753
13753
  container: () => `${textStyles} ${containerStyles} ${extraClassNames}`,
@@ -15000,15 +15000,15 @@ const Accordion = ({ accordionItems, defaultValue, value, onItemSelect, disabled
15000
15000
  React__default.createElement($1bf158f521e1b1b4$export$7c6e2c02157bb7d2, { className: `data-[state=open]:tw-animate-slideDown data-[state=closed]:tw-animate-slideUp tw-overflow-hidden focus-visible:tw-outline-none ${item.contentClassNames || ''}` }, item.content))))));
15001
15001
  };
15002
15002
 
15003
- const bgStyles$1 = ['tw-bg-sq-white', 'dark:tw-bg-sq-dark-background'].join(' ');
15004
- const borderStyles$1 = [
15003
+ const bgStyles$2 = ['tw-bg-sq-white', 'dark:tw-bg-sq-dark-background'].join(' ');
15004
+ const borderStyles$2 = [
15005
15005
  'tw-border-solid',
15006
15006
  'tw-border',
15007
15007
  'tw-rounded-sm',
15008
15008
  'tw-border-sq-disabled-gray',
15009
15009
  'dark:tw-border-gray-500',
15010
15010
  ].join(' ');
15011
- const disabledClasses$1 = ['tw-opacity-50', 'tw-cursor-not-allowed'].join(' ');
15011
+ const disabledClasses$2 = ['tw-opacity-50', 'tw-cursor-not-allowed'].join(' ');
15012
15012
  const ButtonWithPopover = ({ children, trigger, id, hasArrow, extraTriggerClassNames, extraPopoverClassNames, containerTestId, onInteractOutside, onPointerDownOutside, isTriggerAsChild = false, shouldTriggerFullWidth = false, disabled = false, align = 'end', alignOffset = -35, placement = 'bottom', placementOffset = 2, isHoverEnabled = false, hoverOpenDelay = 300, onOpenChange, isOpen, isCloseOnContentClick = false, setFocusOnTriggerOnClose = true, isPortal = false, ...tooltipProps }) => {
15013
15013
  const tooltipData = getQTipData(tooltipProps);
15014
15014
  let timeout;
@@ -15032,17 +15032,17 @@ const ButtonWithPopover = ({ children, trigger, id, hasArrow, extraTriggerClassN
15032
15032
  React.useEffect(() => () => timeout && clearTimeout(timeout), []);
15033
15033
  const renderContent = () => {
15034
15034
  return (React.createElement($cb5cc270b50c6fcd$export$7c6e2c02157bb7d2, { sideOffset: placementOffset, align: align, side: placement, onInteractOutside: onInteractOutside, onPointerDownOutside: onPointerDownOutside, alignOffset: isHoverEnabled ? -10 : alignOffset, asChild: true, onClick: () => isCloseOnContentClick && onOpenChange && onOpenChange(false), className: "focus-visible:tw-outline-none tw-outline-none tw-w-full tw-h-full" },
15035
- React.createElement("div", { "data-testid": containerTestId, className: `${bgStyles$1} ${borderStyles$1} tw-relative tw-z-[1200] tw-min-w-6 focus-visible:tw-outline-none tw-outline-none data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out
15035
+ React.createElement("div", { "data-testid": containerTestId, className: `${bgStyles$2} ${borderStyles$2} tw-relative tw-z-[1200] tw-min-w-6 focus-visible:tw-outline-none tw-outline-none data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out
15036
15036
  data-[side=top]:tw-animate-slideDownAndFade data-[side=right]:tw-animate-slideLeftAndFade data-[side=bottom]:tw-animate-slideUpAndFade data-[side=left]:tw-animate-slideRightAndFade tw-text-sq-text-color
15037
15037
  ${extraPopoverClassNames || ''}` },
15038
15038
  hasArrow && (React.createElement($cb5cc270b50c6fcd$export$21b07c8f274aebd5, { asChild: true },
15039
- React.createElement("div", { className: " tw-fill-transparent tw-bg-white tw-w-[15px] tw-h-[15px] tw-mt-[-7px] tw-rotate-45 dark:tw-bg-sq-dark-background tw-border-b tw-border-r tw-border-sq-disabled-gray dark:tw-border-gray-500" }))),
15039
+ React.createElement("div", { className: "tw-fill-transparent tw-bg-white tw-w-[15px] tw-h-[15px] tw-mt-[-7px] tw-rotate-45 dark:tw-bg-sq-dark-background tw-border-b tw-border-r tw-border-sq-disabled-gray dark:tw-border-gray-500" }))),
15040
15040
  children)));
15041
15041
  };
15042
15042
  const renderPopover = (popoverOpenState) => {
15043
15043
  return (React.createElement($cb5cc270b50c6fcd$export$be92b6f5f03c0fe9, { open: popoverOpenState, defaultOpen: false, onOpenChange: onOpenChange },
15044
15044
  trigger ? (React.createElement($cb5cc270b50c6fcd$export$41fb9f06171c75f4, { id: id, asChild: isTriggerAsChild, className: `focus-visible:tw-outline-none tw-outline-none ${shouldTriggerFullWidth ? 'tw-w-full tw-h-full' : ''}`, disabled: disabled },
15045
- React.createElement("div", { ...tooltipData, onMouseOver: onHoverStart, onMouseOut: onHoverEnd, className: `tw-bg-transparent focus-visible:tw-outline-none tw-outline-none ${disabled ? disabledClasses$1 : ''} ${shouldTriggerFullWidth ? 'tw-flex tw-flex-col tw-items-center tw-justify-center' : 'tw-inline'} ${extraTriggerClassNames || ''}` }, trigger))) : (React.createElement($cb5cc270b50c6fcd$export$41fb9f06171c75f4, { asChild: true },
15045
+ React.createElement("div", { ...tooltipData, onMouseOver: onHoverStart, onMouseOut: onHoverEnd, className: `tw-bg-transparent focus-visible:tw-outline-none tw-outline-none ${disabled ? disabledClasses$2 : ''} ${shouldTriggerFullWidth ? 'tw-flex tw-flex-col tw-items-center tw-justify-center' : 'tw-inline'} ${extraTriggerClassNames || ''}` }, trigger))) : (React.createElement($cb5cc270b50c6fcd$export$41fb9f06171c75f4, { asChild: true },
15046
15046
  React.createElement("div", null))),
15047
15047
  isPortal ? React.createElement($cb5cc270b50c6fcd$export$602eac185826482c, null, renderContent()) : renderContent()));
15048
15048
  };
@@ -16023,60 +16023,101 @@ const $d08ef79370b62062$export$d7a01e11500dfb6f = $d08ef79370b62062$export$2f307
16023
16023
  const $d08ef79370b62062$export$2ea8a7a591ac5eac = $d08ef79370b62062$export$21dcb7ec56f874cf;
16024
16024
  const $d08ef79370b62062$export$6d4de93b380beddf = $d08ef79370b62062$export$f34ec8bc2482cc5f;
16025
16025
 
16026
- const borderStyles = [
16026
+ const borderStyles$1 = [
16027
16027
  'tw-border-solid',
16028
16028
  'tw-border',
16029
16029
  'tw-rounded-sm',
16030
16030
  'tw-border-sq-disabled-gray',
16031
16031
  'dark:tw-border-gray-500',
16032
16032
  ].join(' ');
16033
- const bgStyles = ['tw-bg-sq-white', 'dark:tw-bg-sq-dark-background'].join(' ');
16034
- const disabledClasses = ['tw-opacity-50', 'tw-cursor-not-allowed'].join(' ');
16033
+ const bgStyles$1 = ['tw-bg-sq-white', 'dark:tw-bg-sq-dark-background'].join(' ');
16034
+ const disabledClasses$1 = ['tw-opacity-50', 'tw-cursor-not-allowed'].join(' ');
16035
16035
  const ButtonWithDropdown = ({ dropdownItems, triggerIcon, id, extraClassNames, containerTestId, disabled = false, align = 'end', placement = 'bottom', placementOffset = 5, alignOffset = -35, hasArrow = false, onOpenChange, isOpen, setFocusOnTriggerOnClose = true, keepFocusInsideDropdown = true, ...tooltipProps }) => {
16036
16036
  const tooltipData = getQTipData(tooltipProps);
16037
16037
  return (React.createElement($d08ef79370b62062$export$be92b6f5f03c0fe9, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown },
16038
16038
  React.createElement($d08ef79370b62062$export$41fb9f06171c75f4, { id: id, className: `tw-border-none focus-visible:tw-outline-none focus:tw-outline-none focus-within:tw-outline-none`, disabled: disabled },
16039
- React.createElement("div", { ...tooltipData, className: `tw-bg-transparent tw-flex tw-flex-col tw-items-center focus-visible:tw-outline-none focus:tw-outline-none focus-within:tw-outline-none ${disabled ? disabledClasses : ''} ${extraClassNames || ''}` }, triggerIcon)),
16039
+ React.createElement("div", { ...tooltipData, className: `tw-bg-transparent tw-flex tw-flex-col tw-items-center focus-visible:tw-outline-none focus:tw-outline-none focus-within:tw-outline-none ${disabled ? disabledClasses$1 : ''} ${extraClassNames || ''}` }, triggerIcon)),
16040
16040
  React.createElement($d08ef79370b62062$export$7c6e2c02157bb7d2, { sideOffset: placementOffset, side: placement, align: align, alignOffset: alignOffset, asChild: true, onCloseAutoFocus: (e) => !setFocusOnTriggerOnClose && e.preventDefault(), className: "focus-visible:tw-outline-none tw-outline-none" },
16041
- React.createElement("div", { "data-testid": containerTestId, className: bgStyles +
16041
+ React.createElement("div", { "data-testid": containerTestId, className: bgStyles$1 +
16042
16042
  ' tw-relative tw-z-[1200] tw-min-w-6 tw-py-2 focus-visible:tw-outline-none tw-outline-none' +
16043
16043
  ' data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out' +
16044
16044
  ' forceFont data-[side=top]:tw-animate-slideDownAndFade data-[side=right]:tw-animate-slideLeftAndFade data-[side=bottom]:tw-animate-slideUpAndFade data-[side=left]:tw-animate-slideRightAndFade ' +
16045
- borderStyles },
16045
+ borderStyles$1 },
16046
16046
  hasArrow && (React.createElement($d08ef79370b62062$export$21b07c8f274aebd5, { asChild: true },
16047
16047
  React.createElement("div", { className: " tw-fill-transparent tw-bg-white tw-w-[15px] tw-h-[15px] tw-rotate-45 dark:tw-bg-sq-dark-background tw-border-b tw-border-r tw-border-sq-disabled-gray dark:tw-border-gray-500 tw-mt-[-7px]" }))),
16048
16048
  dropdownItems.map((item, index) => {
16049
16049
  if (item.isLabel) {
16050
16050
  return (React.createElement($d08ef79370b62062$export$b04be29aa201d4f5, { key: (item.label || '') + index, className: item.containerExtraClassNames },
16051
16051
  item.icon && (React.createElement(Icon, { icon: item.icon, testId: item.iconTestId, type: "text", color: item.iconColor, extraClassNames: "tw-text-sq-text-color dark:tw-text-sq-white tw-w-[18px]" })),
16052
- React.createElement("div", { "data-testid": item.labelTestId, className: "tw-text-[13px] tw-text-sq-text-color dark:tw-text-sq-white tw-ml-1" }, item.label)));
16052
+ React.createElement("div", { "data-testid": item.labelTestId, className: `tw-text-[13px] tw-ml-1 ${item.disabled ? 'tw-text-sq-disabled-gray' : 'tw-text-sq-text-color dark:tw-text-sq-white'} tw-not-italic tw-font-normal ${item.labelClasses}` }, item.label)));
16053
16053
  }
16054
16054
  if (Array.isArray(item.subMenuItems) && item.subMenuItems.length > 0) {
16055
16055
  return (React.createElement($d08ef79370b62062$export$d7a01e11500dfb6f, { key: item.label + index },
16056
- React.createElement($d08ef79370b62062$export$2ea8a7a591ac5eac, { id: id, className: `tw-cursor-pointer tw-flex tw-justify-between dark:tw-text-sq-white hover:tw-bg-sq-gray-highlight dark:hover:tw-bg-sq-gray-highlight-dark tw-leading-none tw-items-center tw-h-[27px] tw-pl-[19px] tw-relative tw-select-none tw-outline-none data-[disabled]:tw-text-sq-disabled-gray data-[disabled]:tw-pointer-events-none ${item.containerExtraClassNames || ''}`, "data-testid": item.testId, disabled: item.disabled },
16056
+ React.createElement($d08ef79370b62062$export$2ea8a7a591ac5eac, { id: id, className: `tw-cursor-pointer tw-flex tw-justify-between dark:tw-text-sq-white hover:tw-bg-sq-gray-highlight dark:hover:tw-bg-sq-gray-highlight-dark tw-leading-none tw-items-center tw-h-[27px] tw-pl-[19px] tw-relative tw-select-none tw-outline-none data-[disabled]:tw-pointer-events-none ${item.containerExtraClassNames || ''}`, "data-testid": item.testId, disabled: item.disabled },
16057
16057
  React.createElement("div", { className: "tw-flex" },
16058
- item.icon && (React.createElement(Icon, { icon: item.icon, extraClassNames: `tw-text-sq-text-color dark:tw-text-sq-white tw-w-[18px] ${item.iconExtraClassNames || ''}` })),
16059
- React.createElement("div", { "data-testid": item.labelTestId, "data-customid": item.labelCustomId, className: `tw-text-[13px] tw-ml-1 ${item.labelClasses}` }, item.label)),
16060
- React.createElement(Icon, { small: true, icon: "fc-arrow-dropdown -tw-rotate-90", extraClassNames: "tw-text-sq-text-color dark:tw-text-sq-white tw-w-[18px] tw-ml-4 tw-text-[8px] tw-justify-center tw-flex" })),
16058
+ item.icon && (React.createElement(Icon, { icon: item.icon, extraClassNames: `tw-w-[18px] ${item.disabled ? '!tw-text-sq-disabled-gray' : 'tw-text-sq-text-color dark:tw-text-sq-white'} ${item.iconExtraClassNames || ''}` })),
16059
+ React.createElement("div", { "data-testid": item.labelTestId, "data-customid": item.labelCustomId, className: `tw-text-[13px] tw-ml-1 ${item.disabled ? 'tw-text-sq-disabled-gray' : 'tw-text-sq-text-color dark:tw-text-sq-white'} tw-not-italic tw-font-semibold ${item.labelClasses}` }, item.label)),
16060
+ React.createElement(Icon, { small: true, icon: "fc-arrow-dropdown -tw-rotate-90", extraClassNames: `${item.disabled ? 'tw-text-sq-disabled-gray' : 'tw-text-sq-text-color dark:tw-text-sq-white'} tw-w-[18px] tw-ml-4 tw-text-[8px] tw-justify-center tw-flex` })),
16061
16061
  React.createElement($d08ef79370b62062$export$6d4de93b380beddf, { className: "focus-visible:tw-outline-none tw-outline-none" },
16062
- React.createElement("div", { "data-testid": containerTestId, className: bgStyles +
16062
+ React.createElement("div", { "data-testid": containerTestId, className: bgStyles$1 +
16063
16063
  ' tw-relative tw-z-[1000] tw-min-w-6 tw-py-2 focus-visible:tw-outline-none tw-outline-none data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out' +
16064
16064
  ' forceFont data-[side=top]:tw-animate-slideDownAndFade data-[side=right]:tw-animate-slideLeftAndFade data-[side=bottom]:tw-animate-slideUpAndFade data-[side=left]:tw-animate-slideRightAndFade ' +
16065
- borderStyles }, item.subMenuItems.map((subItem, subIndex) => {
16066
- return (React.createElement($d08ef79370b62062$export$6d08773d2e66f8f2, { key: subItem.label + subIndex, onSelect: subItem.onClick, "data-qtip-text": subItem.tooltip, className: "tw-cursor-pointer tw-flex dark:tw-text-sq-white hover:tw-bg-sq-gray-highlight dark:hover:tw-bg-sq-gray-highlight-dark tw-leading-none tw-items-center tw-h-[27px] tw-px-[19px] tw-relative tw-select-none tw-outline-none data-[disabled]:tw-text-sq-disabled-gray data-[disabled]:tw-pointer-events-none", disabled: subItem.disabled },
16067
- subItem.iconClass && (React.createElement(Icon, { icon: subItem.iconClass, extraClassNames: `tw-text-sq-text-color dark:tw-text-sq-white tw-w-[18px]` })),
16068
- React.createElement("div", { className: `tw-text-[13px] tw-ml-1` }, subItem.label)));
16065
+ borderStyles$1 }, item.subMenuItems.map((subItem, subIndex) => {
16066
+ return (React.createElement($d08ef79370b62062$export$6d08773d2e66f8f2, { key: subItem.label + subIndex, onSelect: subItem.onClick, "data-qtip-text": subItem.tooltip, className: "tw-cursor-pointer tw-flex dark:tw-text-sq-white hover:tw-bg-sq-gray-highlight dark:hover:tw-bg-sq-gray-highlight-dark tw-leading-none tw-items-center tw-h-[27px] tw-px-[19px] tw-relative tw-select-none tw-outline-none data-[disabled]:tw-pointer-events-none", disabled: subItem.disabled },
16067
+ subItem.iconClass && (React.createElement(Icon, { icon: subItem.iconClass, extraClassNames: `tw-w-[18px] ${subItem.disabled
16068
+ ? '!tw-text-sq-disabled-gray'
16069
+ : 'tw-text-sq-text-color dark:tw-text-sq-white'}` })),
16070
+ React.createElement("div", { className: `tw-text-[13px] tw-ml-1 ${subItem.disabled
16071
+ ? 'tw-text-sq-disabled-gray'
16072
+ : 'tw-text-sq-text-color dark:tw-text-sq-white'} tw-not-italic tw-font-normal ${item.labelClasses}` }, subItem.label)));
16069
16073
  })))));
16070
16074
  }
16071
16075
  return (React.createElement("div", { key: item.label + index },
16072
16076
  React.createElement($d08ef79370b62062$export$6d08773d2e66f8f2, { key: item.label + index, "data-customid": item.itemCustomId, onSelect: (e) => {
16073
16077
  item.onClick(e);
16074
- }, className: `tw-cursor-pointer tw-flex dark:tw-text-sq-white hover:tw-bg-sq-gray-highlight dark:hover:tw-bg-sq-gray-highlight-dark tw-leading-none tw-items-center tw-h-[27px] tw-px-[19px] tw-relative tw-select-none tw-outline-none data-[disabled]:tw-text-sq-disabled-gray data-[disabled]:tw-pointer-events-none ${item.containerExtraClassNames || ''}`, "data-testid": item.testId, disabled: item.disabled },
16075
- item.icon && (React.createElement(Icon, { icon: item.icon, testId: item.iconTestId, type: (item.iconType || 'text'), color: item.iconColor, customId: item.iconCustomId, extraClassNames: `tw-text-sq-text-color dark:tw-text-sq-white tw-w-[18px] ${item.iconExtraClassNames || ''}` })),
16076
- React.createElement("div", { "data-testid": item.labelTestId, "data-customid": item.labelCustomId, className: `tw-text-[13px] tw-ml-1 ${item.labelClasses}` }, item.label)),
16078
+ }, className: `tw-cursor-pointer tw-flex dark:tw-text-sq-white hover:tw-bg-sq-gray-highlight dark:hover:tw-bg-sq-gray-highlight-dark tw-leading-none tw-items-center tw-h-[27px] tw-px-[19px] tw-relative tw-select-none tw-outline-none data-[disabled]:tw-pointer-events-none ${item.containerExtraClassNames || ''}`, "data-testid": item.testId, disabled: item.disabled },
16079
+ item.icon && (React.createElement(Icon, { icon: item.icon, testId: item.iconTestId, type: (item.iconType || 'text'), color: item.iconColor, customId: item.iconCustomId, extraClassNames: `tw-w-[18px] ${item.disabled ? '!tw-text-sq-disabled-gray' : 'tw-text-sq-text-color dark:tw-text-sq-white'} ${item.iconExtraClassNames || ''}` })),
16080
+ React.createElement("div", { "data-testid": item.labelTestId, "data-customid": item.labelCustomId, className: `tw-text-[13px] tw-ml-1 ${item.disabled ? 'tw-text-sq-disabled-gray' : 'tw-text-sq-text-color dark:tw-text-sq-white'} tw-not-italic tw-font-normal ${item.labelClasses || ''}` }, item.label)),
16077
16081
  item.hasDivider && (React.createElement($d08ef79370b62062$export$1ff3c3f08ae963c0, { "data-testid": `dropdown-divider-${index}`, className: "tw-h-[1px] tw-bg-sq-disabled-gray dark:tw-bg-gray-500 tw-my-[8px]" }))));
16078
16082
  })))));
16079
16083
  };
16080
16084
 
16081
- export { Accordion, Button, ButtonWithDropdown, ButtonWithPopover, Checkbox, Icon, Modal, QTip, Select, Tabs, TextArea, TextField, ToolbarButton, Tooltip };
16085
+ const borderStyles = [
16086
+ 'tw-border-solid',
16087
+ 'tw-border',
16088
+ 'tw-rounded-sm',
16089
+ 'tw-border-sq-disabled-gray',
16090
+ 'dark:tw-border-gray-500',
16091
+ ].join(' ');
16092
+ const bgStyles = ['tw-bg-sq-white', 'dark:tw-bg-sq-dark-background'].join(' ');
16093
+ const disabledClasses = ['tw-opacity-50', 'tw-cursor-not-allowed'].join(' ');
16094
+ const NewWorkbench = ({ newWorkbenchItems, trigger, id, extraClassNames, containerTestId, disabled = false, align = 'end', placement = 'bottom', placementOffset = 5, alignOffset = -35, hasArrow = false, onOpenChange, isOpen, setFocusOnTriggerOnClose = true, keepFocusInsideDropdown = true, ...tooltipProps }) => {
16095
+ const tooltipData = getQTipData(tooltipProps);
16096
+ return (React.createElement($d08ef79370b62062$export$be92b6f5f03c0fe9, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown },
16097
+ React.createElement($d08ef79370b62062$export$41fb9f06171c75f4, { id: id, "data-testid": id, className: `tw-border-none focus-visible:tw-outline-none focus:tw-outline-none focus-within:tw-outline-none`, asChild: true, disabled: disabled },
16098
+ React.createElement("div", { ...tooltipData, className: `tw-bg-transparent tw-flex tw-flex-col tw-items-center focus-visible:tw-outline-none focus:tw-outline-none focus-within:tw-outline-none ${disabled ? disabledClasses : ''} ${extraClassNames || ''}` }, trigger)),
16099
+ React.createElement($d08ef79370b62062$export$7c6e2c02157bb7d2, { sideOffset: placementOffset, side: placement, align: align, alignOffset: alignOffset, asChild: true, onCloseAutoFocus: (e) => !setFocusOnTriggerOnClose && e.preventDefault(), className: "focus-visible:tw-outline-none tw-outline-none" },
16100
+ React.createElement("div", { "data-testid": containerTestId, className: bgStyles +
16101
+ ' tw-relative tw-z-[1200] tw-min-w-6 tw-py-2 focus-visible:tw-outline-none tw-outline-none' +
16102
+ ' data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out' +
16103
+ ' forceFont data-[side=top]:tw-animate-slideDownAndFade data-[side=right]:tw-animate-slideLeftAndFade data-[side=bottom]:tw-animate-slideUpAndFade data-[side=left]:tw-animate-slideRightAndFade ' +
16104
+ borderStyles },
16105
+ hasArrow && (React.createElement($d08ef79370b62062$export$21b07c8f274aebd5, { asChild: true },
16106
+ React.createElement("div", { className: " tw-fill-transparent tw-bg-white tw-w-[15px] tw-h-[15px] tw-rotate-45 dark:tw-bg-sq-dark-background tw-border-b tw-border-r tw-border-sq-disabled-gray dark:tw-border-gray-500 tw-mt-[-7px]" }))),
16107
+ newWorkbenchItems.map((item, index) => {
16108
+ return (React.createElement("div", { key: item.display + index },
16109
+ React.createElement($d08ef79370b62062$export$6d08773d2e66f8f2, { onSelect: (e) => {
16110
+ item.action(e);
16111
+ }, className: `tw-cursor-pointer tw-flex dark:tw-text-sq-white hover:tw-bg-sq-gray-highlight dark:hover:tw-bg-sq-gray-highlight-dark tw-relative tw-select-none tw-outline-none data-[disabled]:tw-text-sq-disabled-gray data-[disabled]:tw-pointer-events-none`, "data-testid": item.testId, disabled: !item.enabled },
16112
+ React.createElement("div", { className: "tw-flex-col tw-flex tw-p-[10px] tw-pl-5 tw-w-[600px]" },
16113
+ React.createElement("div", { className: "tw-flex tw-flex-row tw-gap-2 tw-items-end" },
16114
+ item.icon && (React.createElement(Icon, { icon: item.icon, type: "text", extraClassNames: 'tw-rounded-[3px] tw-h-8 tw-w-8 tw-flex tw-justify-center tw-items-center tw-bg-sq-color-dark dark:tw-text-sq-white tw-text-[22px] tw-text-sq-white ' +
16115
+ item.iconExtraClassNames })),
16116
+ React.createElement("h4", { className: "tw-text-base tw-font-[600] tw-leading-[20px] mb-0" }, item.display)),
16117
+ React.createElement("div", { className: "tw-text-[13px] tw-font-[400]" }, item.text))),
16118
+ item.divider && (React.createElement($d08ef79370b62062$export$1ff3c3f08ae963c0, { "data-testid": `dropdown-divider-${index}`, className: "tw-h-[1px] tw-bg-sq-disabled-gray dark:tw-bg-gray-500 tw-my-[8px]" }))));
16119
+ })))));
16120
+ };
16121
+
16122
+ export { Accordion, Button, ButtonWithDropdown, ButtonWithPopover, Checkbox, Icon, Modal, NewWorkbench, QTip, Select, Tabs, TextArea, TextField, ToolbarButton, Tooltip };
16082
16123
  //# sourceMappingURL=index.esm.js.map