@seeqdev/qomponents 0.0.174 → 0.0.175
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/iconFont/FontCustom.woff +0 -0
- package/dist/iconFont/FontCustom.woff2 +0 -0
- package/dist/index.esm.js +57 -55
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +57 -55
- package/dist/index.js.map +1 -1
- package/dist/src/Alert/Alert.types.d.ts +0 -1
- package/dist/src/ButtonGroup/ButtonGroup.types.d.ts +0 -1
- package/dist/src/ButtonWithDropdown/ButtonWithDropdown.types.d.ts +0 -1
- package/dist/src/Carousel/Carousel.types.d.ts +0 -1
- package/dist/src/Checkbox/Checkbox.types.d.ts +0 -1
- package/dist/src/Collapse/Collapse.types.d.ts +0 -1
- package/dist/src/Icon/Icon.types.d.ts +0 -1
- package/dist/src/InputGroup/InputGroup.types.d.ts +0 -1
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +0 -1
- package/dist/src/Slider/Slider.types.d.ts +0 -1
- package/dist/src/SvgIcon/SvgIcon.types.d.ts +0 -1
- package/dist/src/TextArea/TextArea.types.d.ts +0 -1
- package/dist/src/TextField/TextField.types.d.ts +0 -1
- package/dist/styles.css +1225 -1256
- package/package.json +2 -2
|
File without changes
|
|
File without changes
|
package/dist/index.esm.js
CHANGED
|
@@ -4800,12 +4800,12 @@ const ToolbarButton = ({ isSmall = false, label, icon, secondIcon, forceSmallIco
|
|
|
4800
4800
|
onHide && onHide();
|
|
4801
4801
|
}
|
|
4802
4802
|
};
|
|
4803
|
-
return (jsxs(Root2$3, { defaultOpen: false, onOpenChange: onOpenChange, children: [jsx$1(Trigger$3, { id: id, className: `tw:bg-transparent tw:border-none tw:mx-
|
|
4803
|
+
return (jsxs(Root2$3, { defaultOpen: false, onOpenChange: onOpenChange, children: [jsx$1(Trigger$3, { id: id, className: `tw:bg-transparent tw:border-none tw:mx-sq-1.5 tw:first:ml-0 tw:last:mr-0 ${isActive ? 'active' : ''}`, disabled: disabled, "data-testid": testId, onClick: (e) => {
|
|
4804
4804
|
onClick && onClick(e);
|
|
4805
|
-
}, children: jsxs("div", { ...tooltipData, className: `tw:flex tw:flex-col tw:items-center tw:rounded-md ${isSmall ? 'tw:py-px tw:px-1' : 'tw:px-2 tw:py-
|
|
4806
|
-
' tw:relative tw:z-[1000] tw:min-w-6 tw:p-
|
|
4805
|
+
}, children: jsxs("div", { ...tooltipData, className: `tw:flex tw:flex-col tw:items-center tw:rounded-md ${isSmall ? 'tw:py-px tw:px-1' : 'tw:px-2 tw:py-sq-5'} ${disabled ? disabledClasses$4 : isActive ? activeBackgroundStyles : triggerBackgroundStyles} ${extraClassNames || ''}`, children: [jsxs("span", { className: "tw:nowrap", children: [isPrimaryAnSvg ? (jsx$1("svg", { xmlns: "http://www.w3.org/2000/svg", className: `tw:text-sq-text-color tw:dark:text-sq-dark-text ${primaryIconExtraClassNames || ''}`, viewBox: primaryIconViewbox, height: `${iconHeight}px`, width: `${iconWidth}px`, fill: "currentColor", "data-testid": testId, children: jsx$1("path", { d: getSvgIconPath(icon) }) })) : (jsx$1(Icon, { icon: icon, testId: "firstIcon", type: "text", size: !isSmall && !label && !secondIcon && !forceSmallIcon ? 'lg' : 'sm', extraClassNames: `tw:text-sq-text-color tw:dark:text-sq-dark-text` })), secondIcon && jsx$1(Icon, { icon: secondIcon, type: "text", testId: "secondIcon" }), popoverContent ? (jsx$1(Icon, { icon: "fc-arrow-dropdown", extraClassNames: "tw:text-sq-text-color tw:dark:text-sq-dark-text tw:ml-sq-3 tw:text-2", type: "text", size: "sm" })) : undefined] }), !isSmall && jsx$1("small", { className: "tw:text-sq-text-color tw:dark:text-sq-dark-text tw:text-2.5", children: label })] }) }), !!popoverContent ? (jsx$1(PopoverContent, { sideOffset: 2, align: "start", children: jsxs("div", { className: bgStyles$3 +
|
|
4806
|
+
' tw:relative tw:z-[1000] tw:min-w-6 tw:p-2 tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out' +
|
|
4807
4807
|
' tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2' +
|
|
4808
|
-
popoverBorderStyles, children: [hasArrow && (jsx$1(Arrow2$2, { asChild: true, children: jsx$1("div", { className: " tw:fill-transparent tw:bg-sq-white tw:w-
|
|
4808
|
+
popoverBorderStyles, children: [hasArrow && (jsx$1(Arrow2$2, { asChild: true, children: jsx$1("div", { className: " tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 tw:-mt-sq-7 tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500" }) })), popoverContent] }) })) : undefined] }));
|
|
4809
4809
|
};
|
|
4810
4810
|
|
|
4811
4811
|
const setValidInputDimension = (width, height) => {
|
|
@@ -4831,7 +4831,7 @@ const borderColorClasses$4 = [
|
|
|
4831
4831
|
'tw:focus:border-sq-theme-dark',
|
|
4832
4832
|
'tw:active:border-sq-theme-dark',
|
|
4833
4833
|
].join(' ');
|
|
4834
|
-
const baseClasses$6 = 'tw:h-
|
|
4834
|
+
const baseClasses$6 = 'tw:h-8.5 tw:leading-normal tw:outline-none tw:py-1 tw:px-3' +
|
|
4835
4835
|
' tw:disabled:pointer-events-none tw:disabled:bg-sq-light-gray tw:disabled:dark:bg-sq-dark-disabled-gray' +
|
|
4836
4836
|
' tw:disabled:cursor-not-allowed tw:p-1 tw:border-solid tw:border tw:placeholder-gray-400' +
|
|
4837
4837
|
' tw:dark:placeholder-sq-dark-text/30 specTextField';
|
|
@@ -4988,9 +4988,9 @@ const Tooltip = ({ position = 'bottom', children, text, delay = DEFAULT_TOOL_TIP
|
|
|
4988
4988
|
const arrowBaseClasses = "tw:before:content-[''] tw:before:absolute tw:before:border-8";
|
|
4989
4989
|
const centerArrowVertically = 'tw:before:top-1/2 tw:before:-translate-y-1/2';
|
|
4990
4990
|
const centerArrowHorizontally = 'tw:before:left-1/2 tw:before:-translate-x-1/2';
|
|
4991
|
-
const arrowRight = `${arrowBaseClasses} ${centerArrowVertically} tw:before:right-
|
|
4991
|
+
const arrowRight = `${arrowBaseClasses} ${centerArrowVertically} tw:before:right-full tw:before:border-y-transparent
|
|
4992
4992
|
tw:before:border-l-transparent tw:before:border-r-sq-black`;
|
|
4993
|
-
const arrowLeft = `${arrowBaseClasses} ${centerArrowVertically} tw:before:left-
|
|
4993
|
+
const arrowLeft = `${arrowBaseClasses} ${centerArrowVertically} tw:before:left-full tw:before:border-y-transparent
|
|
4994
4994
|
tw:before:border-l-sq-black tw:before:border-r-transparent`;
|
|
4995
4995
|
const arrowBottom = `${arrowBaseClasses} ${centerArrowHorizontally} tw:before:-top-4 tw:before:border-b-sq-black
|
|
4996
4996
|
tw:before:border-r-transparent tw:before:border-l-transparent tw:before:border-t-transparent`;
|
|
@@ -7490,7 +7490,7 @@ const QTip = () => {
|
|
|
7490
7490
|
}
|
|
7491
7491
|
};
|
|
7492
7492
|
return (jsx$1(Fragment, { children: jsxs("div", { onMouseEnter: () => setOverTooltip(true), onMouseLeave: () => setOverTooltip(false), "data-testid": tooltipTestId, ref: tooltipRef, className: 'tw:absolute tw:rounded tw:bg-black tw:max-w-96 tw:p-2 tw:text-xs tw:text-sq-white tw:z-[9999] tw:fade-in ' +
|
|
7493
|
-
(show ? 'tw:visible' : 'tw:invisible tw:pointer-events-none'), children: [html ? jsx$1(HTMLTip, { text: tooltipText }) : tooltipText, jsx$1("div", { className: "tw:absolute tw:w-
|
|
7493
|
+
(show ? 'tw:visible' : 'tw:invisible tw:pointer-events-none'), children: [html ? jsx$1(HTMLTip, { text: tooltipText }) : tooltipText, jsx$1("div", { className: "tw:absolute tw:w-2.5 tw:h-2.5 tw:rotate-45 tw:bg-sq-black", ref: tooltipArrowRef })] }) }));
|
|
7494
7494
|
};
|
|
7495
7495
|
|
|
7496
7496
|
function _typeof$1(o) {
|
|
@@ -13905,29 +13905,31 @@ var CreatableSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
13905
13905
|
});
|
|
13906
13906
|
var CreatableSelect$1 = CreatableSelect;
|
|
13907
13907
|
|
|
13908
|
-
const baseClasses$3 = ['focus:
|
|
13908
|
+
const baseClasses$3 = ['tw:focus:ring-0', 'tw:disabled:cursor-not-allowed'].join(' ');
|
|
13909
13909
|
const containerStyles = ['tw:bg-sq-white', 'tw:dark:bg-sq-dark-background'].join(' ');
|
|
13910
13910
|
const errorClasses$2 = 'tw:border-sq-danger-color';
|
|
13911
13911
|
const borderColorClasses$2 = ['tw:border-sq-disabled-gray', 'tw:dark:border-sq-dark-disabled-gray'].join(' ');
|
|
13912
|
-
const borderStyles$3 = [
|
|
13913
|
-
|
|
13914
|
-
'tw:border',
|
|
13915
|
-
'tw:
|
|
13916
|
-
'
|
|
13917
|
-
'
|
|
13918
|
-
'tw:dark:
|
|
13919
|
-
'dark:
|
|
13920
|
-
'dark:active:tw:border-sq-theme-dark-dark',
|
|
13912
|
+
const borderStyles$3 = ['tw:border-solid', 'tw:border'].join(' ');
|
|
13913
|
+
const borderActiveClasses = [
|
|
13914
|
+
'tw:hover:border-sq-color-dark',
|
|
13915
|
+
'tw:focus-within:border-sq-color-dark',
|
|
13916
|
+
'tw:active:border-sq-color-dark',
|
|
13917
|
+
'tw:dark:hover:border-sq-color-dark-dark',
|
|
13918
|
+
'tw:dark:focus-within:border-sq-color-dark-dark',
|
|
13919
|
+
'tw:dark:active:border-sq-color-dark-dark',
|
|
13921
13920
|
].join(' ');
|
|
13922
13921
|
const textStyles = ['tw:text-sq-text-color', 'tw:dark:text-sq-dark-text', 'tw:text-sm'].join(' ');
|
|
13923
13922
|
const textActiveStyles = [
|
|
13924
13923
|
'tw:hover:text-sq-theme-dark',
|
|
13925
|
-
'focus:
|
|
13926
|
-
'active:
|
|
13924
|
+
'tw:focus:text-sq-theme-dark',
|
|
13925
|
+
'tw:active:text-sq-theme-dark',
|
|
13927
13926
|
'tw:dark:text-sq-dark-disabled-gray',
|
|
13928
13927
|
'tw:dark:hover:text-sq-theme-dark-dark',
|
|
13929
|
-
'dark:focus:
|
|
13930
|
-
'dark:active:
|
|
13928
|
+
'tw:dark:focus:text-sq-theme-dark-dark',
|
|
13929
|
+
'tw:dark:active:text-sq-theme-dark-dark',
|
|
13930
|
+
'tw:hover:text-sq-color-dark',
|
|
13931
|
+
'tw:dark:text-sq-dark-disabled-gray',
|
|
13932
|
+
'tw:dark:hover:text-sq-color-dark-dark',
|
|
13931
13933
|
].join(' ');
|
|
13932
13934
|
const menuStyles = [
|
|
13933
13935
|
'tw:border-solid',
|
|
@@ -13963,7 +13965,7 @@ const optionStyles = [
|
|
|
13963
13965
|
'tw:px-2.5',
|
|
13964
13966
|
'specSelectOption',
|
|
13965
13967
|
].join(' ');
|
|
13966
|
-
const disabledClasses$3 = ['tw:bg-sq-field-disabled-gray', 'tw:cursor-not-allowed'].join(' ');
|
|
13968
|
+
const disabledClasses$3 = ['tw:bg-sq-field-disabled-gray', '!tw:cursor-not-allowed', 'tw:opacity-50'].join(' ');
|
|
13967
13969
|
const dropDownIndicatorStyles = `tw:text-sq-disabled-gray ${textActiveStyles} specOpenIt`;
|
|
13968
13970
|
const placeholderStyles = ['tw:text-gray-400', 'tw:dark:text-sq-dark-text-lighter', 'specOpenSelect'].join(' ');
|
|
13969
13971
|
const multiValueStyles = [
|
|
@@ -14046,13 +14048,13 @@ const Select = ({ options, value, placeholder = 'select', noOptionsMessage = 'no
|
|
|
14046
14048
|
else if (inputGroup === 'right') {
|
|
14047
14049
|
border = menuIsOpen ? 'tw:rounded-tr-md' : 'tw:rounded-r-md';
|
|
14048
14050
|
}
|
|
14049
|
-
const appliedClasses = `${borderStyles$3} ${border} ${showError ? errorClasses$2 : borderColorClasses$2} ${small ? 'reactSelectMinHeightSmall' : 'reactSelectMinHeight'} ${controlClassNames}`;
|
|
14051
|
+
const appliedClasses = `${borderStyles$3} ${isDisabled ? '' : borderActiveClasses} ${border} ${showError ? errorClasses$2 : borderColorClasses$2} ${small ? 'reactSelectMinHeightSmall' : 'reactSelectMinHeight'} ${controlClassNames}`;
|
|
14050
14052
|
return `${appliedClasses} ${baseClasses$3} ${containerStyles} specSelectControl ${isDisabled ? disabledClasses$3 : ''} ${small ? 'tw:pl-2 tw:pr-1' : 'tw:pl-2.5 tw:pr-1.5'}`;
|
|
14051
14053
|
},
|
|
14052
14054
|
placeholder: () => placeholderStyles,
|
|
14053
14055
|
container: ({ selectProps }) => {
|
|
14054
14056
|
const containerBorderStyles = selectProps?.menuIsOpen ? 'tw:rounded-t-md' : 'tw:rounded-md';
|
|
14055
|
-
return `${textStyles} ${extraClassNames} ${containerBorderStyles}`;
|
|
14057
|
+
return `${textStyles} ${extraClassNames} ${containerBorderStyles} !tw:pointer-events-auto`;
|
|
14056
14058
|
},
|
|
14057
14059
|
input: () => textStyles + ' specSelectInput',
|
|
14058
14060
|
menuList: () => menuListStyles,
|
|
@@ -14520,7 +14522,7 @@ const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, sub
|
|
|
14520
14522
|
'tw:max-w-4xl': size === '4xl',
|
|
14521
14523
|
'tw:max-w-5xl': size === '5xl',
|
|
14522
14524
|
'tw:max-w-6xl': size === '6xl',
|
|
14523
|
-
}, dialogClassName), children: [jsxs(DialogHeader, { className: "modal-header tw:flex tw:w-full tw:justify-between tw:border-sq-disabled-gray\n tw:dark:border-sq-dark-disabled-gray tw:border-0 tw:border-b tw:px-6 tw:py-4", children: [jsx$1("div", { className: "tw:flex tw:w-full", children: renderTitle() }), !hideCloseIcon && (jsx$1(DialogClose, { autoFocus: false, className: "tw:[&:has(:focus-visible)]:none tw:opacity-70 tw:bg-transparent tw:hover:opacity-100 close tw:text-base tw:cursor-pointer tw:ml-4", "data-testid": "closeButton", children: jsx$1("span", { className: "tw:cursor-pointer", children: "\u00D7" }) }))] }), jsx$1(DialogDescription, { className: "modal-body tw:px-6 tw:py-4 tw:overflow-y-auto", asChild: true, children: children }), !hideFooterButtons && (jsx$1(DialogFooter, { className: "modal-footer tw:px-6 tw:py-4", children: modalFooter ?? (jsxs("div", { className: "tw:flex tw:w-full tw:justify-between", "data-testid": "modalFooter", children: [jsx$1("div", { className: "tw:flex tw:justify-start", children: customButton && (jsx$1(Button, { label: customButtonLabel, onClick: onClickCustomButton, disabled: disableCustomButton, extraClassNames: "tw:justify-start tw:min-w-
|
|
14525
|
+
}, dialogClassName), children: [jsxs(DialogHeader, { className: "modal-header tw:flex tw:w-full tw:justify-between tw:border-sq-disabled-gray\n tw:dark:border-sq-dark-disabled-gray tw:border-0 tw:border-b tw:px-6 tw:py-4", children: [jsx$1("div", { className: "tw:flex tw:w-full", children: renderTitle() }), !hideCloseIcon && (jsx$1(DialogClose, { autoFocus: false, className: "tw:[&:has(:focus-visible)]:none tw:opacity-70 tw:bg-transparent tw:hover:opacity-100 close tw:text-base tw:cursor-pointer tw:ml-4", "data-testid": "closeButton", children: jsx$1("span", { className: "tw:cursor-pointer", children: "\u00D7" }) }))] }), jsx$1(DialogDescription, { className: "modal-body tw:px-6 tw:py-4 tw:overflow-y-auto", asChild: true, children: children }), !hideFooterButtons && (jsx$1(DialogFooter, { className: "modal-footer tw:px-6 tw:py-4", children: modalFooter ?? (jsxs("div", { className: "tw:flex tw:w-full tw:justify-between", "data-testid": "modalFooter", children: [jsx$1("div", { className: "tw:flex tw:justify-start", children: customButton && (jsx$1(Button, { label: customButtonLabel, onClick: onClickCustomButton, disabled: disableCustomButton, extraClassNames: "tw:justify-start tw:min-w-25", testId: "customButton", variant: customButtonVariant })) }), jsxs("div", { className: "tw:flex tw:justify-end", children: [jsx$1("div", { className: "tw:flex tw:items-center", children: middleFooterSection }), !hideCancelButton && (jsx$1(DialogClose, { asChild: true, children: jsx$1(Button, { label: cancelButtonLabel, extraClassNames: "tw:mr-5 tw:min-w-25", tooltip: cancelButtonTooltip, variant: "outline", stopPropagation: false, testId: "cancelButton" }) })), !hideSubmitButton && (jsx$1(Button, { label: submitButtonLabel, onClick: handleSubmit, disabled: disableSubmitButton || isLoading, variant: submitButtonVariant, stopPropagation: stopPropagationSubmitButton, tooltip: submitButtonTooltip, icon: isLoading ? 'fc-loading-notch tw:animate-spin' : undefined, iconPosition: "left", testId: "submitButton", extraClassNames: "tw:min-w-25" }))] })] })) }))] }) })) : (jsx$1(Fragment, {}));
|
|
14524
14526
|
};
|
|
14525
14527
|
|
|
14526
14528
|
function createCollection(name) {
|
|
@@ -14978,11 +14980,11 @@ const Tabs = ({ tabs, defaultActiveTab, activeTab, onTabSelect, extraClassNames,
|
|
|
14978
14980
|
return;
|
|
14979
14981
|
onTabSelect && onTabSelect(tabId);
|
|
14980
14982
|
};
|
|
14981
|
-
return (jsxs(Root2$2, { className: `tw:flex tw:flex-col tw:min-w-
|
|
14982
|
-
? 'tw:border-b-sq-theme-dark tw:dark:border-b-sq-theme-dark tw:border-b-
|
|
14983
|
-
: 'tw:hover:bg-sq-light-gray tw:border-b-
|
|
14983
|
+
return (jsxs(Root2$2, { className: `tw:flex tw:flex-col tw:min-w-75 tw:max-w-full tw:flex-grow tw:focus-visible:outline-none ${extraClassNames || ''}`, defaultValue: defaultActiveTab, "data-testid": testId, id: id, value: activeTab, onValueChange: handleTabSelect, children: [jsx$1(List, { className: `tw:flex tw:flex-row tw:flex-wrap tw:z-[1001]`, children: tabs.map(({ id, icon, label, tabExtraClassNames, testId: tabsTestId, disabled, tabLabelExtraClassNames = '' }, index) => (jsx$1(Trigger$2, { className: `tw:bg-sq-white tw:dark:bg-sq-dark-background tw:h-sq-25 tw:focus-visible:outline-none tw:min-w-25 tw:px-4 tw:border-solid tw:flex tw:flex-1 tw:justify-center tw:items-center tw:border-r-0.5 tw:last:border-r-0 tw:border-sq-overlay tw:dark:border-gray-700 ${stretchTabs ? '' : 'tw:max-w-max tw:min-w-fit'} ${tabExtraClassNames || ''} ${activeTab === id
|
|
14984
|
+
? 'tw:border-b-sq-theme-dark tw:dark:border-b-sq-theme-dark tw:border-b-sq-3'
|
|
14985
|
+
: 'tw:hover:bg-sq-light-gray tw:border-b-sq-1 tw:hover:dark:bg-gray-700'}`, "data-testid": tabsTestId, disabled: disabled, value: id, children: jsxs("span", { className: "tw:flex tw:items-center tw:overflow-hidden", children: [icon && (jsx$1(Icon, { icon: icon, testId: `${id}_tab-icon`, extraClassNames: "tw:text-sq-15 tw:mr-sq-7 tw:flex-shrink-0" })), jsx$1("span", { className: `tw:text-sq-13 tw:font-medium tw:whitespace-nowrap tw:overflow-hidden tw:text-ellipsis ${activeTab === id
|
|
14984
14986
|
? 'tw:dark:text-sq-dark-text tw:text-gray-500'
|
|
14985
|
-
: 'tw:dark:text-sq-theme-darker tw:text-sq-theme-dark'} ${tabLabelExtraClassNames}`, children: label })] }) }, `${label}-${id}-${index}`))) }), tabs.map((tab, index) => (jsx$1(Content$1, { className: `tw:bg-sq-white tw:dark:bg-sq-dark-background tw:overflow-y-auto tw:-mt-
|
|
14987
|
+
: 'tw:dark:text-sq-theme-darker tw:text-sq-theme-dark'} ${tabLabelExtraClassNames}`, children: label })] }) }, `${label}-${id}-${index}`))) }), tabs.map((tab, index) => (jsx$1(Content$1, { className: `tw:bg-sq-white tw:dark:bg-sq-dark-background tw:overflow-y-auto tw:-mt-sq-1 tw:border-t-sq-1 tw:border-t-sq-overlay tw:dark:border-t-gray-700 tw:z-[500] tw:flex tw:flex-col tw:flex-grow tw:focus-visible:outline-none ${tab.tabContentExtraClassNames || ''}`, value: tab.id, children: tab.content }, `${tab.label}_${index}_content`)))] }));
|
|
14986
14988
|
};
|
|
14987
14989
|
|
|
14988
14990
|
var COLLAPSIBLE_NAME = "Collapsible";
|
|
@@ -15451,7 +15453,7 @@ const ButtonWithPopover = ({ children, trigger, id, hasArrow, extraTriggerClassN
|
|
|
15451
15453
|
const renderContent = () => {
|
|
15452
15454
|
return (jsx$1(Content2$3, { 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", children: jsxs("div", { "data-testid": containerTestId, className: `${bgStyles$2} ${borderStyles$2} tw:relative tw:z-[1200] tw:min-w-6 tw:focus-visible:outline-none tw:outline-none data-[state=open]:tw:animate-in data-[state=closed]:tw:animate-out
|
|
15453
15455
|
tw:data-[side=top]:animate-slideDownAndFade data-[side=right]:tw:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade tw:text-sq-text-color
|
|
15454
|
-
${extraPopoverClassNames || ''}`, children: [hasArrow && (jsx$1(Arrow2$2, { asChild: true, children: jsx$1("div", { className: "tw:fill-transparent tw:bg-sq-white tw:w-
|
|
15456
|
+
${extraPopoverClassNames || ''}`, children: [hasArrow && (jsx$1(Arrow2$2, { asChild: true, children: jsx$1("div", { className: "tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 tw:-mt-sq-7 tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500" }) })), children] }) }));
|
|
15455
15457
|
};
|
|
15456
15458
|
const renderPopover = (popoverOpenState) => {
|
|
15457
15459
|
return (jsxs(Root2$3, { open: popoverOpenState, defaultOpen: false, onOpenChange: onOpenChange, children: [trigger ? (jsx$1(Trigger$3, { id: id, asChild: isTriggerAsChild, className: `tw:focus-visible:outline-none tw:outline-none tw:bg-transparent ${shouldTriggerFullWidth ? 'tw:w-full tw:h-full' : ''}`, disabled: disabled, children: jsx$1("div", { ...tooltipData, onMouseOver: onHoverStart, onMouseOut: onHoverEnd, className: `tw:focus-visible:outline-none tw:outline-none tw:dark:text-sq-white ${disabled ? disabledClasses$2 : ''} ${shouldTriggerFullWidth ? 'tw:flex tw:flex-col tw:items-center tw:justify-center' : 'tw:inline'} ${extraTriggerClassNames || ''}`, children: trigger }) })) : (jsx$1(Trigger$3, { asChild: true, children: jsx$1("div", {}) })), isPortal ? jsx$1(Portal$2, { children: renderContent() }) : renderContent()] }));
|
|
@@ -16529,30 +16531,30 @@ const bgStyles$1 = ['tw:bg-sq-white', 'tw:dark:bg-sq-dark-background'].join(' ')
|
|
|
16529
16531
|
const disabledClasses$1 = ['tw:opacity-50', 'tw:cursor-not-allowed'].join(' ');
|
|
16530
16532
|
const ButtonWithDropdown = ({ dropdownItems, triggerIcon, id, extraClassNames = '', contentExtraClassNames = '', containerTestId, disabled = false, align = 'end', placement = 'bottom', placementOffset = 5, alignOffset = -35, hasArrow = false, onOpenChange, isOpen, setFocusOnTriggerOnClose = true, keepFocusInsideDropdown = true, onContainerClick, ...tooltipProps }) => {
|
|
16531
16533
|
const tooltipData = getQTipData(tooltipProps);
|
|
16532
|
-
return (jsxs(Root2, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown, children: [jsx$1(Trigger, { id: id, className: `tw:bg-transparent tw:border-none tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none`, disabled: disabled, children: jsx$1("div", { ...tooltipData, className: `tw:bg-transparent tw:flex tw:flex-col tw:items-center tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none ${disabled ? disabledClasses$1 : ''} ${extraClassNames}`, children: triggerIcon }) }), jsx$1(Portal2, { children: jsx$1(Content2, { onClick: onContainerClick, sideOffset: placementOffset, side: placement, align: align, alignOffset: alignOffset, asChild: true, onCloseAutoFocus: (e) => !setFocusOnTriggerOnClose && e.preventDefault(), className: "tw:focus-visible:outline-none tw:outline-none", children: jsxs("div", { "data-testid": containerTestId, className: `${bgStyles$1} tw:relative tw:z-[1200] tw:min-w-6 tw:py-2 tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out forceFont tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade ${borderStyles$1} ${contentExtraClassNames}`, children: [hasArrow && (jsx$1(Arrow2, { asChild: true, children: jsx$1("div", { className: "tw:fill-transparent tw:bg-sq-white tw:w-
|
|
16534
|
+
return (jsxs(Root2, { defaultOpen: false, open: isOpen, onOpenChange: onOpenChange, modal: keepFocusInsideDropdown, children: [jsx$1(Trigger, { id: id, className: `tw:bg-transparent tw:border-none tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none`, disabled: disabled, children: jsx$1("div", { ...tooltipData, className: `tw:bg-transparent tw:flex tw:flex-col tw:items-center tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none ${disabled ? disabledClasses$1 : ''} ${extraClassNames}`, children: triggerIcon }) }), jsx$1(Portal2, { children: jsx$1(Content2, { onClick: onContainerClick, sideOffset: placementOffset, side: placement, align: align, alignOffset: alignOffset, asChild: true, onCloseAutoFocus: (e) => !setFocusOnTriggerOnClose && e.preventDefault(), className: "tw:focus-visible:outline-none tw:outline-none", children: jsxs("div", { "data-testid": containerTestId, className: `${bgStyles$1} tw:relative tw:z-[1200] tw:min-w-6 tw:py-2 tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out forceFont tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade ${borderStyles$1} ${contentExtraClassNames}`, children: [hasArrow && (jsx$1(Arrow2, { asChild: true, children: jsx$1("div", { className: "tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500 tw:-mt-sq-7" }) })), dropdownItems.map((item, index) => {
|
|
16533
16535
|
const tooltipData = getQTipData(item);
|
|
16534
16536
|
if (item.isLabel) {
|
|
16535
|
-
return (jsxs(Label2, { className: item.itemExtraClassNames, ...tooltipData, children: [item.icon && (jsx$1(Icon, { icon: item.icon, testId: item.iconTestId, type: "text", color: item.iconColor, extraClassNames: "tw:text-sq-text-color tw:dark:text-sq-white tw:w-
|
|
16537
|
+
return (jsxs(Label2, { className: item.itemExtraClassNames, ...tooltipData, children: [item.icon && (jsx$1(Icon, { icon: item.icon, testId: item.iconTestId, type: "text", color: item.iconColor, extraClassNames: "tw:text-sq-text-color tw:dark:text-sq-white tw:w-4.5" })), jsx$1("div", { "data-testid": item.labelTestId, className: `tw:text-sq-13 tw:ml-1 ${item.disabled ? 'tw:text-sq-disabled-gray' : 'tw:text-sq-text-color tw:dark:text-sq-white'} tw:not-italic tw:font-normal ${item.labelClasses}`, children: item.label })] }, (item.id || '') + index));
|
|
16536
16538
|
}
|
|
16537
16539
|
if (Array.isArray(item.subMenuItems) && item.subMenuItems.length > 0) {
|
|
16538
|
-
return (jsxs(Sub2, { children: [jsxs(SubTrigger2, { id: id, className: `tw:cursor-pointer tw:flex tw:justify-between tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:h-
|
|
16540
|
+
return (jsxs(Sub2, { children: [jsxs(SubTrigger2, { id: id, className: `tw:cursor-pointer tw:flex tw:justify-between tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:h-sq-27 tw:pl-sq-19 tw:relative tw:select-none tw:outline-none tw:data-disabled:pointer-events-none ${item.itemExtraClassNames || ''}`, "data-testid": item.testId, disabled: item.disabled, ...tooltipData, children: [jsxs("div", { className: "tw:flex", children: [item.icon && (jsx$1(Icon, { icon: item.icon, extraClassNames: `tw:w-4.5 ${item.disabled
|
|
16539
16541
|
? '!tw:text-sq-disabled-gray'
|
|
16540
|
-
: 'tw:text-sq-text-color tw:dark:text-sq-white'} ${item.iconExtraClassNames || ''}` })), jsx$1("div", { "data-testid": item.labelTestId, "data-customid": item.labelCustomId, className: `tw:text-
|
|
16541
|
-
return (jsxs(Item2, { onSelect: subItem.onClick, "data-qtip-text": subItem.tooltip, className: "tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:h-
|
|
16542
|
+
: 'tw:text-sq-text-color tw:dark:text-sq-white'} ${item.iconExtraClassNames || ''}` })), jsx$1("div", { "data-testid": item.labelTestId, "data-customid": item.labelCustomId, className: `tw:text-sq-13 tw:ml-1 ${item.disabled && '!tw:opacity-30'} tw:not-italic tw:font-semibold ${item.labelClasses}`, children: item.label })] }), jsx$1(Icon, { size: "sm", icon: "fc-arrow-dropdown tw:rotate-270", extraClassNames: `${item.disabled ? 'tw:text-sq-disabled-gray' : 'tw:text-sq-text-color tw:dark:text-sq-white'} tw:w-4.5 tw:ml-4 tw:text-2 tw:justify-center tw:flex` })] }), jsx$1(Portal2, { children: jsx$1(SubContent2, { className: "tw:focus-visible:outline-none tw:outline-none", children: jsx$1("div", { "data-testid": containerTestId, className: `${bgStyles$1} tw:relative tw:z-[1000] tw:min-w-6 tw:py-2 tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out forceFont tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade ${borderStyles$1}`, children: item.subMenuItems.map((subItem, subIndex) => {
|
|
16543
|
+
return (jsxs(Item2, { onSelect: subItem.onClick, "data-qtip-text": subItem.tooltip, className: "tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:h-sq-27 tw:px-sq-19 tw:relative tw:select-none tw:outline-none tw:data-disabled:pointer-events-none", disabled: subItem.disabled, children: [subItem.iconClass && (jsx$1(Icon, { icon: subItem.iconClass, type: "text", extraClassNames: `tw:w-4.5 ${item.disabled && '!tw:opacity-30'}` })), jsx$1("div", { className: `tw:text-sq-13 tw:ml-1 ${subItem.disabled
|
|
16542
16544
|
? 'tw:text-sq-disabled-gray'
|
|
16543
16545
|
: 'tw:text-sq-text-color tw:dark:text-sq-white'} tw:not-italic tw:font-normal ${item.labelClasses}`, children: subItem.label })] }, subItem.label + subIndex));
|
|
16544
16546
|
}) }) }) })] }, (item.id || item.icon || '') + index));
|
|
16545
16547
|
}
|
|
16546
16548
|
return (jsxs("div", { ...tooltipData, children: [jsxs(Item2, { "data-customid": item.itemCustomId, onSelect: (e) => {
|
|
16547
16549
|
item.onClick(e);
|
|
16548
|
-
}, className: `tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:min-h-
|
|
16550
|
+
}, className: `tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:min-h-sq-27 tw:px-sq-19 tw:relative tw:select-none tw:outline-none tw:data-disabled:pointer-events-none ${item.itemExtraClassNames || ''}`, "data-testid": item.testId, disabled: item.disabled, children: [item.icon && (jsx$1(Icon, { icon: item.icon, testId: item.iconTestId, type: (item.iconType || 'text'), color: item.iconColor, customId: item.iconCustomId, extraClassNames: `tw:w-sq-4.5 ${item.disabled && '!tw:opacity-30'} ${item.iconExtraClassNames || ''}` })), jsx$1("div", { "data-testid": item.labelTestId, "data-customid": item.labelCustomId, className: `tw:text-sq-13 tw:ml-1 ${item.disabled ? 'tw:text-sq-disabled-gray' : 'tw:text-sq-text-color tw:dark:text-sq-white'} tw:not-italic tw:font-normal ${item.labelClasses || ''}`, children: item.label })] }, (item.id || item.icon || '') + index), item.hasDivider && (jsx$1(Separator2, { "data-testid": `dropdown-divider-${index}`, className: "tw:h-px tw:bg-sq-disabled-gray tw:dark:bg-gray-500 tw:my-2" }))] }, (item.id || '') + index));
|
|
16549
16551
|
})] }) }) })] }));
|
|
16550
16552
|
};
|
|
16551
16553
|
|
|
16552
16554
|
const baseClasses$2 = 'tw:mx-auto tw:p-4 tw:leading-normal tw:outline-none tw:py-2 tw:px-3 tw:rounded-[10px] tw:w-full tw:relative' +
|
|
16553
16555
|
' tw:border-solid tw:border tw:text-sm tw:flex tw:flex-col tw:justify-center tw:items-center';
|
|
16554
16556
|
const darkTheme$1 = 'tw:dark:bg-sq-theme-hover-dark tw:dark:text-sq-text-color-dark';
|
|
16555
|
-
const lightTheme$1 = 'tw:text-sq-text-color tw:bg-sq-theme-highlight';
|
|
16557
|
+
const lightTheme$1 = 'tw:text-sq-text-color tw:bg-sq-theme-highlight/10';
|
|
16556
16558
|
const errorClasses$1 = 'tw:border-sq-danger';
|
|
16557
16559
|
const borderColorClasses$1 = 'tw:border-sq-theme-dark';
|
|
16558
16560
|
/**
|
|
@@ -16561,7 +16563,7 @@ const borderColorClasses$1 = 'tw:border-sq-theme-dark';
|
|
|
16561
16563
|
const Alert = ({ children, dismissible = true, onClose, show = true, variant, testId = 'alert-id', id, extraClassNames, ...tooltipProps }) => {
|
|
16562
16564
|
const appliedTheme = {
|
|
16563
16565
|
theme: `${lightTheme$1} ${darkTheme$1}`,
|
|
16564
|
-
formulaError: 'tw:text-red-800 tw:bg-red-200 !tw:rounded-[
|
|
16566
|
+
formulaError: 'tw:text-red-800 tw:bg-red-200 !tw:rounded-[0.25rem]',
|
|
16565
16567
|
danger: 'tw:text-sq-text-color tw:bg-sq-danger',
|
|
16566
16568
|
warning: 'tw:bg-sq-bg-warning tw:text-sq-text-color',
|
|
16567
16569
|
gray: 'tw:bg-sq-hover-gray tw:text-sq-text-color tw:dark:bg-sq-tools-background-dark tw:dark:text-sq-text-color-dark',
|
|
@@ -16577,7 +16579,7 @@ const Alert = ({ children, dismissible = true, onClose, show = true, variant, te
|
|
|
16577
16579
|
if (!show) {
|
|
16578
16580
|
return jsx$1("div", {});
|
|
16579
16581
|
}
|
|
16580
|
-
return (jsxs("div", { "data-testid": testId, id: id, className: appliedClasses, children: [children, dismissible && (jsx$1(Icon, { icon: "fc-delete", type: variant.match(/danger|warning|formulaError/) ? 'color' : 'theme', color: variant.match(/danger|warning|formulaError/) ? 'inherit' : undefined, extraClassNames: `tw:self-end tw:text-
|
|
16582
|
+
return (jsxs("div", { "data-testid": testId, id: id, className: appliedClasses, children: [children, dismissible && (jsx$1(Icon, { icon: "fc-delete", type: variant.match(/danger|warning|formulaError/) ? 'color' : 'theme', color: variant.match(/danger|warning|formulaError/) ? 'inherit' : undefined, extraClassNames: `tw:self-end tw:text-size-11 tw:cursor-pointer tw:absolute tw:right-2.5 tw:top-2.5 ${variant.match(/danger|warning|gray|formulaError/) ? 'tw:text-sq-text-color tw:dark:text-sq-dark-text' : ''}`, testId: `${testId}-close-btn`, onClick: onClose, ...tooltipProps }))] }));
|
|
16581
16583
|
};
|
|
16582
16584
|
|
|
16583
16585
|
/**
|
|
@@ -16606,19 +16608,19 @@ const SvgIcon = ({ onClick, icon, color, type = 'default', extraClassNames, view
|
|
|
16606
16608
|
const SeeqActionDropdownItem = (item) => {
|
|
16607
16609
|
let renderIcon = jsx$1(Fragment, {});
|
|
16608
16610
|
if (item.icon) {
|
|
16609
|
-
renderIcon = isSvgIcon(item.icon) ? (jsx$1(SvgIcon, { icon: item.icon, extraClassNames: 'tw:p-1 tw:h-8 tw:w-8 tw:dark:text-sq-white tw:!text-
|
|
16611
|
+
renderIcon = isSvgIcon(item.icon) ? (jsx$1(SvgIcon, { icon: item.icon, extraClassNames: 'tw:p-1 tw:h-8 tw:w-8 tw:dark:text-sq-white tw:!text-5.5 tw:text-sq-white ' + item.iconExtraClassNames, ...item })) : (jsx$1(Icon, { icon: item.icon, type: "text", extraClassNames: 'tw:dark:text-sq-white tw:!text-5.5 tw:text-sq-white ' + item.iconExtraClassNames }));
|
|
16610
16612
|
}
|
|
16611
|
-
return (jsxs("div", { className: "tw:flex-col tw:flex tw:p-
|
|
16613
|
+
return (jsxs("div", { className: "tw:flex-col tw:flex tw:p-2.5 tw:pl-5 tw:w-150", children: [jsxs("div", { className: "tw:flex tw:flex-row tw:gap-2 tw:items-end", children: [jsx$1("div", { className: "tw:rounded-[0.1875rem] tw:h-8 tw:w-8 tw:bg-sq-theme-dark tw:flex tw:justify-center tw:items-center ", children: renderIcon }), jsx$1("h4", { className: "tw:text-base tw:font-[600] tw:leading-5 mb-0", children: item.display })] }), jsx$1("div", { className: "tw:text-sq-13 tw:font-normal", children: item.text })] }));
|
|
16612
16614
|
};
|
|
16613
16615
|
const ViewWorkbench = (item) => {
|
|
16614
16616
|
let renderIcon = jsx$1(Fragment, {});
|
|
16615
16617
|
if (item.icon) {
|
|
16616
|
-
renderIcon = isSvgIcon(item.icon) ? (jsx$1(SvgIcon, { icon: item.icon, extraClassNames: 'tw:w-4 tw:text-
|
|
16618
|
+
renderIcon = isSvgIcon(item.icon) ? (jsx$1(SvgIcon, { icon: item.icon, extraClassNames: 'tw:w-4 tw:text-5 tw:dark:text-sq-white' + ' tw:text-sq-text-color ' + item.iconExtraClassNames, type: "default", ...item })) : (jsx$1(Icon, { icon: item.icon, type: "text", extraClassNames: 'tw:text-5 tw:dark:text-sq-white tw:text-sq-text-color ' + item.iconExtraClassNames }));
|
|
16617
16619
|
}
|
|
16618
|
-
return (jsx$1("div", { className: "tw:flex-col tw:flex tw:p-
|
|
16620
|
+
return (jsx$1("div", { className: "tw:flex-col tw:flex tw:p-2.5", children: jsxs("div", { className: "tw:flex tw:flex-row tw:gap-2 tw:items-end", children: [jsx$1("div", { className: "tw:rounded-[0.1875rem] tw:h-5 tw:w-5 tw:flex tw:justify-center tw:items-center ", children: renderIcon }), jsx$1("div", { className: "tw:text-sq-13", children: item.display })] }) }));
|
|
16619
16621
|
};
|
|
16620
16622
|
const InsertSeeqContent = (item) => {
|
|
16621
|
-
return (jsxs("div", { className: "tw:flex-col tw:flex tw:justify-start tw:p-
|
|
16623
|
+
return (jsxs("div", { className: "tw:flex-col tw:flex tw:justify-start tw:p-2.5 tw:font-normal tw:text-left tw:text-sq-text-color tw:dark:text-sq-dark-text", children: [jsx$1("h5", { className: "tw:text-4 tw:font-medium tw:text-sq-theme-dark tw:leading-4.5", children: item.display }), jsx$1("div", { className: "tw:text-sq-13 tw:text-sq-text-color tw:dark:text-sq-dark-text !tw:mt-1", children: item.text })] }));
|
|
16622
16624
|
};
|
|
16623
16625
|
|
|
16624
16626
|
const borderStyles = [
|
|
@@ -16648,7 +16650,7 @@ const SeeqActionDropdown = ({ seeqActionDropdownItems, trigger, id, extraClassNa
|
|
|
16648
16650
|
' tw:relative tw:z-[1200] tw:min-w-6 tw:py-2 tw:focus-visible:outline-none tw:outline-none' +
|
|
16649
16651
|
' tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out' +
|
|
16650
16652
|
' forceFont tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade ' +
|
|
16651
|
-
borderStyles, children: [hasArrow && (jsx$1(Arrow2, { asChild: true, children: jsx$1("div", { className: " tw:fill-transparent tw:bg-sq-white tw:w-
|
|
16653
|
+
borderStyles, children: [hasArrow && (jsx$1(Arrow2, { asChild: true, children: jsx$1("div", { className: " tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500 tw:-mt-sq-7" }) })), seeqActionDropdownItems.map((item, index) => {
|
|
16652
16654
|
return (jsxs("div", { children: [jsx$1(Item2, { onSelect: (e) => {
|
|
16653
16655
|
item.action(e);
|
|
16654
16656
|
}, className: `tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:relative tw:select-none tw:outline-none tw:data-[disabled]:text-sq-disabled-gray tw:data-[disabled]:pointer-events-none`, "data-testid": item.testId, disabled: !item.enabled, children: renderItem(variant, item) }), item.divider && (jsx$1(Separator2, { "data-testid": `dropdown-divider-${index}`, className: "tw:h-px tw:bg-sq-disabled-gray tw:dark:bg-gray-500 tw:my-2" }))] }, item.display + index));
|
|
@@ -27411,7 +27413,7 @@ var Thumb = SliderThumb;
|
|
|
27411
27413
|
*/
|
|
27412
27414
|
const Slider = (props) => {
|
|
27413
27415
|
const { onValueChange, onPointerUp, id, value, name, disabled = false, rootExtraClassNames = '', trackExtraClassNames = '', rangeExtraClassNames = '', thumbExtraClassNames = '', step, min, max, } = props;
|
|
27414
|
-
return (jsxs(Root$1, { className: `tw:relative tw:flex tw:h-5 tw:w-full tw:touch-none tw:select-none tw:items-center ${rootExtraClassNames}`, defaultValue: [value], value: [value], onValueChange: (value) => onValueChange && onValueChange(value), onPointerUp: (e) => onPointerUp && onPointerUp(e), name: name, id: id, max: max, min: min, disabled: disabled, step: step, children: [jsx$1(Track, { className: `tw:relative tw:h-
|
|
27416
|
+
return (jsxs(Root$1, { className: `tw:relative tw:flex tw:h-5 tw:w-full tw:touch-none tw:select-none tw:items-center ${rootExtraClassNames}`, defaultValue: [value], value: [value], onValueChange: (value) => onValueChange && onValueChange(value), onPointerUp: (e) => onPointerUp && onPointerUp(e), name: name, id: id, max: max, min: min, disabled: disabled, step: step, children: [jsx$1(Track, { className: `tw:relative tw:h-sq-5 tw:grow tw:rounded-sm tw:bg-sq-dark-gray tw:dark:bg-sq-dark-disabled-gray ${trackExtraClassNames}`, children: jsx$1(Range, { className: `tw:absolute tw:h-full tw:rounded-full ${rangeExtraClassNames}` }) }), jsx$1(Thumb, { className: `tw:block tw:h-sq-15 tw:w-sq-15 tw:rounded-full tw:bg-sq-theme-dark active:tw:bg-sq-theme-darker tw:focus:outline-none tw:focus-visible:outline-none tw:aria-disabled:bg-sq-dark-gray tw:dark:aria-disabled:bg-sq-dark-disabled-gray tw:transition tw:ease-in-out ${thumbExtraClassNames}`, "aria-disabled": disabled })] }));
|
|
27415
27417
|
};
|
|
27416
27418
|
|
|
27417
27419
|
var PROGRESS_NAME = "Progress";
|
|
@@ -28680,7 +28682,7 @@ function validateWCAG2Parms(parms) {
|
|
|
28680
28682
|
};
|
|
28681
28683
|
}
|
|
28682
28684
|
|
|
28683
|
-
const baseLabelClasses = 'tw:left-1 tw:text-xs tw:text-sq-text-color tw:dark:text-sq-dark-text tw:items-center tw:h-
|
|
28685
|
+
const baseLabelClasses = 'tw:left-1 tw:text-xs tw:text-sq-text-color tw:dark:text-sq-dark-text tw:items-center tw:h-4.5';
|
|
28684
28686
|
const ProgressIndicator = (props) => {
|
|
28685
28687
|
const { value, color = undefined, testId, label, extraClasses = '', labelClasses = '', valuesLength, max, index, totalValue, ...tooltipProps } = props;
|
|
28686
28688
|
const tooltipData = getQTipData(tooltipProps);
|
|
@@ -28693,19 +28695,19 @@ const ProgressIndicator = (props) => {
|
|
|
28693
28695
|
if (totalValue >= max) {
|
|
28694
28696
|
// If progress is 100%, round both ends
|
|
28695
28697
|
if (index === 0 && valuesLength === 1) {
|
|
28696
|
-
roundedCorners = 'tw:rounded-[
|
|
28698
|
+
roundedCorners = 'tw:rounded-[0.9375rem]';
|
|
28697
28699
|
}
|
|
28698
28700
|
else if (index === 0) {
|
|
28699
|
-
roundedCorners = 'tw:rounded-l-[
|
|
28701
|
+
roundedCorners = 'tw:rounded-l-[0.9375rem]';
|
|
28700
28702
|
}
|
|
28701
28703
|
else if (index === valuesLength - 1) {
|
|
28702
|
-
roundedCorners = 'tw:rounded-r-[
|
|
28704
|
+
roundedCorners = 'tw:rounded-r-[0.9375rem]';
|
|
28703
28705
|
}
|
|
28704
28706
|
}
|
|
28705
28707
|
else {
|
|
28706
28708
|
// Otherwise, only round the leftmost indicator
|
|
28707
28709
|
if (index === 0) {
|
|
28708
|
-
roundedCorners = 'tw:rounded-l-[
|
|
28710
|
+
roundedCorners = 'tw:rounded-l-[0.9375rem]';
|
|
28709
28711
|
}
|
|
28710
28712
|
}
|
|
28711
28713
|
useEffect(() => {
|
|
@@ -28731,7 +28733,7 @@ const ProgressIndicator = (props) => {
|
|
|
28731
28733
|
computeTextClass(indicatorElementRef.current);
|
|
28732
28734
|
}
|
|
28733
28735
|
}, [!!indicatorElementRef.current]);
|
|
28734
|
-
return (createElement(Indicator, { className: `tw:ease-[cubic-bezier(0.65, 0, 0.35, 1)] tw:w-full tw:h-
|
|
28736
|
+
return (createElement(Indicator, { className: `tw:ease-[cubic-bezier(0.65, 0, 0.35, 1)] tw:w-full tw:h-4.5 tw:duration-[660ms] tw:flex tw:justify-center tw:items-center ${valuesLength === 1 ? '' : 'tw:overflow-hidden'} ${roundedCorners} ${bgClass} ${extraClasses}`, ...tooltipData, "data-qtip-text": tooltipProps.tooltip ? tooltipProps.tooltip : `${value}%`, "data-testid": `progress-bar-indicator-${testId ? testId : value}`, key: `${index}-${value}`, ref: indicatorElementRef, style: {
|
|
28735
28737
|
// Background color will default to the theme color if undefined
|
|
28736
28738
|
backgroundColor: bgColor,
|
|
28737
28739
|
animation: 'width 660ms forwards',
|
|
@@ -28740,7 +28742,7 @@ const ProgressIndicator = (props) => {
|
|
|
28740
28742
|
};
|
|
28741
28743
|
const ProgressBar = ({ values = [], max = 100, containerExtraClasses = '', zeroValueLabel = 'No progress yet', }) => {
|
|
28742
28744
|
const totalValue = values.reduce((acc, { value }) => acc + value, 0);
|
|
28743
|
-
return (jsx$1(Root, { className: `tw:relative tw:h-
|
|
28745
|
+
return (jsx$1(Root, { className: `tw:relative tw:h-4.5 tw:w-full tw:overflow-hidden tw:rounded-[0.9375rem] tw:bg-sq-dark-gray tw:dark:bg-sq-dark-disabled-gray tw:flex tw:flex-1 ${containerExtraClasses}`, max: max, value: totalValue, children: totalValue > 0 ? (values.map((props, i) => {
|
|
28744
28746
|
return (createElement(ProgressIndicator, { ...props, max: max, valuesLength: values.length, index: i, totalValue: totalValue, key: i }));
|
|
28745
28747
|
})) : (jsx$1("div", { className: `${baseLabelClasses} tw:mx-auto tw:overflow-hidden`, children: zeroValueLabel })) }));
|
|
28746
28748
|
};
|
|
@@ -28771,7 +28773,7 @@ const ButtonGroup = (props) => {
|
|
|
28771
28773
|
const appliedClasses = `${baseClasses} ${extraClassNames}`;
|
|
28772
28774
|
return (jsx$1("div", { id: id ? `button-group-${id}` : undefined, "data-testid": testId, className: appliedClasses, ...tooltipData, children: buttons
|
|
28773
28775
|
.filter(Boolean)
|
|
28774
|
-
.map((item, index) => item?.variant === 'button' ? (jsx$1(Button, { ...item.buttonProps, extraClassNames: `tw
|
|
28776
|
+
.map((item, index) => item?.variant === 'button' ? (jsx$1(Button, { ...item.buttonProps, extraClassNames: `tw:-ml-sq-1 tw:focus:z-40 tw:outline-none tw:focus:border tw:rounded-none tw:first:rounded-l-md tw:last:rounded-r-md ${item.buttonProps?.isActive
|
|
28775
28777
|
? `${activeClassesByVariantLightTheme[item?.buttonProps?.variant ?? 'outline']} ${activeClassesByVariantDarkTheme[item?.buttonProps?.variant ?? 'outline']} `
|
|
28776
28778
|
: ''} ${item.buttonProps.extraClassNames}`, onClick: () => onChange && onChange(item?.buttonProps?.value) }, index)) : (item?.element)) }));
|
|
28777
28779
|
};
|