@seeqdev/qomponents 0.0.190 → 0.0.193
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/README.md +3 -11
- package/dist/index.esm.js +68 -107
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +67 -106
- package/dist/index.js.map +1 -1
- package/dist/src/Alert/Alert.d.ts +0 -1
- package/dist/src/Button/Button.d.ts +0 -1
- package/dist/src/ButtonGroup/ButtonGroup.d.ts +0 -1
- package/dist/src/Checkbox/Checkbox.d.ts +0 -1
- package/dist/src/Icon/Icon.d.ts +0 -1
- package/dist/src/InputGroup/InputGroup.d.ts +1 -2
- package/dist/src/Modal/Modal.d.ts +0 -1
- package/dist/src/Modal/Modal.types.d.ts +5 -0
- package/dist/src/Select/Select.d.ts +0 -1
- package/dist/src/Select/index.d.ts +1 -1
- package/dist/src/SvgIcon/SvgIcon.d.ts +0 -1
- package/dist/src/TextArea/TextArea.d.ts +1 -2
- package/dist/src/TextField/TextField.d.ts +1 -2
- package/dist/src/TextField/TextField.types.d.ts +7 -0
- package/dist/src/Tooltip/Tooltip.d.ts +0 -1
- package/dist/src/index.build.d.ts +6 -0
- package/dist/src/index.d.ts +2 -4
- package/dist/styles.css +36 -51
- package/package.json +14 -11
- /package/dist/{FontCustom.woff → iconFont/FontCustom.woff} +0 -0
- /package/dist/{FontCustom.woff2 → iconFont/FontCustom.woff2} +0 -0
package/dist/index.js
CHANGED
|
@@ -86,7 +86,7 @@ const colorClassesThemeDark = {
|
|
|
86
86
|
'dark-gray': 'tw:text-sq-fairly-dark-gray',
|
|
87
87
|
'warning': '',
|
|
88
88
|
'darkish-gray': 'tw:text-sq-darkish-gray',
|
|
89
|
-
'gray': 'tw:dark:text-sq-dark-
|
|
89
|
+
'gray': 'tw:dark:text-sq-fairly-dark-gray',
|
|
90
90
|
'color': '',
|
|
91
91
|
'info': 'tw:dark:text-sq-theme-link',
|
|
92
92
|
'text': 'tw:dark:text-sq-dark-text',
|
|
@@ -154,7 +154,7 @@ const Button = ({ onClick, label, variant = 'outline', type = 'button', size = '
|
|
|
154
154
|
'outline': 'tw:bg-white tw:border-sq-disabled-gray',
|
|
155
155
|
'theme': 'tw:bg-sq-theme-dark tw:border-sq-theme-dark',
|
|
156
156
|
'danger': '',
|
|
157
|
-
'theme-light': 'tw:bg-sq-icon',
|
|
157
|
+
'theme-light': 'tw:bg-sq-theme-icon',
|
|
158
158
|
'no-border': '',
|
|
159
159
|
'warning': '',
|
|
160
160
|
};
|
|
@@ -162,7 +162,7 @@ const Button = ({ onClick, label, variant = 'outline', type = 'button', size = '
|
|
|
162
162
|
'outline': 'tw:dark:bg-sq-dark-background tw:dark:border-sq-dark-disabled-gray',
|
|
163
163
|
'theme': 'tw:dark:bg-sq-theme-dark tw:dark:border-sq-theme-dark',
|
|
164
164
|
'danger': '',
|
|
165
|
-
'theme-light': 'tw:dark:bg-sq-icon
|
|
165
|
+
'theme-light': 'tw:dark:bg-sq-theme-icon tw:dark:border-sq-theme-icon',
|
|
166
166
|
'no-border': '',
|
|
167
167
|
'warning': '',
|
|
168
168
|
};
|
|
@@ -3863,7 +3863,7 @@ var removedBarSizeVariable = '--removed-body-scroll-bar-size';
|
|
|
3863
3863
|
* assignRef(refObject, "refValue");
|
|
3864
3864
|
* assignRef(refFn, "refValue");
|
|
3865
3865
|
*/
|
|
3866
|
-
function assignRef(ref, value) {
|
|
3866
|
+
function assignRef$1(ref, value) {
|
|
3867
3867
|
if (typeof ref === 'function') {
|
|
3868
3868
|
ref(value);
|
|
3869
3869
|
}
|
|
@@ -3930,7 +3930,7 @@ var currentValues = new WeakMap();
|
|
|
3930
3930
|
*/
|
|
3931
3931
|
function useMergeRefs(refs, defaultValue) {
|
|
3932
3932
|
var callbackRef = useCallbackRef(null, function (newValue) {
|
|
3933
|
-
return refs.forEach(function (ref) { return assignRef(ref, newValue); });
|
|
3933
|
+
return refs.forEach(function (ref) { return assignRef$1(ref, newValue); });
|
|
3934
3934
|
});
|
|
3935
3935
|
// handle refs changes - added or removed
|
|
3936
3936
|
useIsomorphicLayoutEffect$1(function () {
|
|
@@ -3941,12 +3941,12 @@ function useMergeRefs(refs, defaultValue) {
|
|
|
3941
3941
|
var current_1 = callbackRef.current;
|
|
3942
3942
|
prevRefs_1.forEach(function (ref) {
|
|
3943
3943
|
if (!nextRefs_1.has(ref)) {
|
|
3944
|
-
assignRef(ref, null);
|
|
3944
|
+
assignRef$1(ref, null);
|
|
3945
3945
|
}
|
|
3946
3946
|
});
|
|
3947
3947
|
nextRefs_1.forEach(function (ref) {
|
|
3948
3948
|
if (!prevRefs_1.has(ref)) {
|
|
3949
|
-
assignRef(ref, current_1);
|
|
3949
|
+
assignRef$1(ref, current_1);
|
|
3950
3950
|
}
|
|
3951
3951
|
});
|
|
3952
3952
|
}
|
|
@@ -4908,6 +4908,41 @@ const setValidInputDimension = (width, height) => {
|
|
|
4908
4908
|
return inputStyle;
|
|
4909
4909
|
};
|
|
4910
4910
|
|
|
4911
|
+
function assignRef(ref, value) {
|
|
4912
|
+
if (typeof ref === "function") {
|
|
4913
|
+
return ref(value);
|
|
4914
|
+
} else if (typeof ref === "object" && ref !== null && "current" in ref) {
|
|
4915
|
+
ref.current = value;
|
|
4916
|
+
}
|
|
4917
|
+
}
|
|
4918
|
+
function mergeRefs(...refs) {
|
|
4919
|
+
const cleanupMap = /* @__PURE__ */ new Map();
|
|
4920
|
+
return (node) => {
|
|
4921
|
+
refs.forEach((ref) => {
|
|
4922
|
+
const cleanup = assignRef(ref, node);
|
|
4923
|
+
if (cleanup) {
|
|
4924
|
+
cleanupMap.set(ref, cleanup);
|
|
4925
|
+
}
|
|
4926
|
+
});
|
|
4927
|
+
if (cleanupMap.size > 0) {
|
|
4928
|
+
return () => {
|
|
4929
|
+
refs.forEach((ref) => {
|
|
4930
|
+
const cleanup = cleanupMap.get(ref);
|
|
4931
|
+
if (cleanup && typeof cleanup === "function") {
|
|
4932
|
+
cleanup();
|
|
4933
|
+
} else {
|
|
4934
|
+
assignRef(ref, null);
|
|
4935
|
+
}
|
|
4936
|
+
});
|
|
4937
|
+
cleanupMap.clear();
|
|
4938
|
+
};
|
|
4939
|
+
}
|
|
4940
|
+
};
|
|
4941
|
+
}
|
|
4942
|
+
function useMergedRef(...refs) {
|
|
4943
|
+
return React.useCallback(mergeRefs(...refs), refs);
|
|
4944
|
+
}
|
|
4945
|
+
|
|
4911
4946
|
const errorClasses$4 = 'tw:border-sq-danger';
|
|
4912
4947
|
const borderColorClasses$4 = [
|
|
4913
4948
|
'tw:border-sq-disabled-gray',
|
|
@@ -4931,15 +4966,11 @@ const sizeClasses = {
|
|
|
4931
4966
|
* Textfield.
|
|
4932
4967
|
*/
|
|
4933
4968
|
const TextField = React.forwardRef((props, ref) => {
|
|
4934
|
-
const { readonly = false, disabled = false, onChange, onKeyUp, onFocus, onBlur, onKeyDown, id, name, size = 'sm', value, placeholder, extraClassNames, testId, type = 'text', inputGroup, step, showError, errorText, min, max, maxLength, minLength, required = false, autoComplete = 'off', inputWidth = undefined, inputHeight = undefined, autoFocus = false, ...tooltipProps } = props;
|
|
4969
|
+
const { readonly = false, disabled = false, onChange, onPaste, onKeyUp, onFocus, onBlur, onKeyDown, id, name, size = 'sm', value, placeholder, extraClassNames, testId, type = 'text', inputGroup, step, showError, errorText, min, max, maxLength, minLength, required = false, autoComplete = 'off', inputWidth = undefined, inputHeight = undefined, autoFocus = false, ...tooltipProps } = props;
|
|
4935
4970
|
const internalRef = React.useRef(null);
|
|
4971
|
+
const mergedRef = useMergedRef(ref, internalRef);
|
|
4936
4972
|
const [cursor, setCursor] = React.useState(null);
|
|
4937
4973
|
const tooltipData = getQTipData(tooltipProps);
|
|
4938
|
-
const setAllRefs = (receivedRef) => {
|
|
4939
|
-
if (ref)
|
|
4940
|
-
ref.current = receivedRef;
|
|
4941
|
-
internalRef.current = receivedRef;
|
|
4942
|
-
};
|
|
4943
4974
|
React.useEffect(() => {
|
|
4944
4975
|
if (autoFocus) {
|
|
4945
4976
|
setTimeout(() => {
|
|
@@ -4985,7 +5016,7 @@ const TextField = React.forwardRef((props, ref) => {
|
|
|
4985
5016
|
inputLenghtProp.maxLength = maxLength;
|
|
4986
5017
|
if (minLength)
|
|
4987
5018
|
inputLenghtProp.minLength = minLength;
|
|
4988
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("input", { ref:
|
|
5019
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("input", { ref: mergedRef, "data-testid": testId, name: name, id: id, type: type, value: value, className: appliedClasses, placeholder: placeholder, disabled: disabled, readOnly: readonly, autoComplete: autoComplete, onChange: handleChange, onPaste: onPaste, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onKeyUp: onKeyUp, step: step, required: required, min: min, max: max, ...inputLenghtProp, ...inputProp, ...tooltipData }), errorText && showError && jsxRuntime.jsx("div", { className: "tw:text-sq-danger tw:text-xs tw:mt-1", children: errorText })] }));
|
|
4989
5020
|
});
|
|
4990
5021
|
|
|
4991
5022
|
const alignment = 'tw:flex';
|
|
@@ -4995,8 +5026,8 @@ const baseClasses$5 = 'tw:appearance-none tw:border tw:h-3.5 tw:w-3.5 tw:focus:r
|
|
|
4995
5026
|
' tw:checked:text-white tw:checked:border-sq-text-color tw:checked:hover:border-sq-theme-dark' +
|
|
4996
5027
|
' tw:checked:active:border-sq-theme-darker tw:checked:focus:border-sq-theme-dark tw:disabled:border-sq-disabled-gray' +
|
|
4997
5028
|
' tw:dark:disabled:border-sq-fairly-dark-gray tw:dark:checked:focus:bg-sq-dark-background';
|
|
4998
|
-
const checkboxClasses = `tw:
|
|
4999
|
-
const radioClasses = `tw:
|
|
5029
|
+
const checkboxClasses = `tw:rounded ${baseClasses$5}`;
|
|
5030
|
+
const radioClasses = `tw:rounded-full ${baseClasses$5}`;
|
|
5000
5031
|
/**
|
|
5001
5032
|
* Checkbox and Radio Box Component.
|
|
5002
5033
|
*/
|
|
@@ -5030,6 +5061,7 @@ const borderColorClasses$3 = [
|
|
|
5030
5061
|
const TextArea = React.forwardRef(({ readonly = false, disabled = false, onChange, onKeyUp, onFocus, onBlur, onKeyDown, onSelectionChange, id, name, rows = 3, cols = undefined, value, placeholder, showError, extraClassNames, testId, autoFocus = false, }, ref) => {
|
|
5031
5062
|
const appliedClasses = `${baseClasses$4} ${extraClassNames} ${lightTheme$2} ${darkTheme$2} ${showError ? errorClasses$3 : borderColorClasses$3}`;
|
|
5032
5063
|
const textareaRef = React.useRef(null);
|
|
5064
|
+
const mergedRef = useMergedRef(ref, textareaRef);
|
|
5033
5065
|
// Handle selection change events
|
|
5034
5066
|
React.useEffect(() => {
|
|
5035
5067
|
if (!onSelectionChange || !textareaRef.current) {
|
|
@@ -5050,15 +5082,7 @@ const TextArea = React.forwardRef(({ readonly = false, disabled = false, onChang
|
|
|
5050
5082
|
textarea.removeEventListener('keyup', handleSelectionChange);
|
|
5051
5083
|
};
|
|
5052
5084
|
}, [onSelectionChange]);
|
|
5053
|
-
return (jsxRuntime.jsx("textarea", { ref:
|
|
5054
|
-
textareaRef.current = element;
|
|
5055
|
-
if (typeof ref === 'function') {
|
|
5056
|
-
ref(element);
|
|
5057
|
-
}
|
|
5058
|
-
else if (ref) {
|
|
5059
|
-
ref.current = element;
|
|
5060
|
-
}
|
|
5061
|
-
}, "data-testid": testId, name: name, id: id, value: value, className: appliedClasses, placeholder: placeholder, disabled: disabled, readOnly: readonly, onChange: onChange, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onKeyUp: onKeyUp, rows: rows, cols: cols, autoFocus: autoFocus }));
|
|
5085
|
+
return (jsxRuntime.jsx("textarea", { ref: mergedRef, "data-testid": testId, name: name, id: id, value: value, className: appliedClasses, placeholder: placeholder, disabled: disabled, readOnly: readonly, onChange: onChange, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onKeyUp: onKeyUp, rows: rows, cols: cols, autoFocus: autoFocus }));
|
|
5062
5086
|
});
|
|
5063
5087
|
|
|
5064
5088
|
/**
|
|
@@ -14563,7 +14587,7 @@ var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
|
14563
14587
|
const Dialog = Root$4;
|
|
14564
14588
|
const DialogPortal = Portal$1;
|
|
14565
14589
|
const DialogClose = Close;
|
|
14566
|
-
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (jsxRuntime.jsxs(DialogPortal, { children: [jsxRuntime.jsx("div", { className: "tw:select-none tw:fixed tw:w-full tw:h-full tw:opacity-50 tw:inset-0 tw:z-[1009] tw:bg-sq-dark-background\n tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0\n tw:data-[state=open]:fade-in-0 " }), jsxRuntime.jsxs(Content$2, { ref: ref, className: `tw:fixed tw:left-[50%] tw:top-0 tw:my-6 tw:translate-x-[-50%] tw:z-[1010] tw:grid
|
|
14590
|
+
const DialogContent = React.forwardRef(({ className, 'aria-describedby': ariaDescribedBy, children, ...props }, ref) => (jsxRuntime.jsxs(DialogPortal, { children: [jsxRuntime.jsx("div", { className: "tw:select-none tw:fixed tw:w-full tw:h-full tw:opacity-50 tw:inset-0 tw:z-[1009] tw:bg-sq-dark-background\n tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0\n tw:data-[state=open]:fade-in-0 " }), jsxRuntime.jsxs(Content$2, { ref: ref, "aria-describedby": ariaDescribedBy, className: `tw:fixed tw:left-[50%] tw:top-0 tw:my-6 tw:translate-x-[-50%] tw:z-[1010] tw:grid
|
|
14567
14591
|
tw:gap-4 tw:border tw:bg-sq-white tw:dark:bg-sq-dark-background tw:shadow-lg tw:duration-200
|
|
14568
14592
|
tw:rounded-lg ${className}`, ...props, children: [jsxRuntime.jsx(DialogTitle$1, { className: "tw:hidden" }), children] })] })));
|
|
14569
14593
|
DialogContent.displayName = Content$2.displayName;
|
|
@@ -14575,7 +14599,7 @@ const DialogTitle = React.forwardRef((props, ref) => jsxRuntime.jsx(Title, { ref
|
|
|
14575
14599
|
DialogTitle.displayName = Title.displayName;
|
|
14576
14600
|
const DialogDescription = React.forwardRef((props, ref) => jsxRuntime.jsx(Description, { ref: ref, ...props }));
|
|
14577
14601
|
DialogDescription.displayName = Description.displayName;
|
|
14578
|
-
const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, subtitle, children, open = false, onClose, customButton = false, customButtonLabel = 'Back', onClickCustomButton, submitButtonLabel = 'Submit', cancelButtonLabel = 'Cancel', disableSubmitButton = false, stopPropagationSubmitButton = false, onSubmit, isTitleEditable = false, onTitleChanged, inputExtraClassNames, hideCloseIcon = false, size = 'xl', titleIconPosition = 'left', hideFooterButtons = false, hideSubmitButton = false, hideCancelButton = false, testId = 'modal', modalFooter, dialogClassName, titlePlaceholder, titleRequired, titleError, submitButtonTooltip, cancelButtonTooltip, disableCustomButton, customHeader, middleFooterSection = jsxRuntime.jsx(jsxRuntime.Fragment, {}), customButtonVariant = 'outline', submitButtonVariant = 'theme', keepFocusInsideModal = true, onPointerDownOutside, onInteractOutside, }) => {
|
|
14602
|
+
const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, subtitle, children, open = false, onClose, customButton = false, customButtonLabel = 'Back', onClickCustomButton, submitButtonLabel = 'Submit', cancelButtonLabel = 'Cancel', disableSubmitButton = false, stopPropagationSubmitButton = false, onSubmit, isTitleEditable = false, onTitleChanged, inputExtraClassNames, hideCloseIcon = false, size = 'xl', titleIconPosition = 'left', hideFooterButtons = false, hideSubmitButton = false, hideCancelButton = false, testId = 'modal', modalFooter, dialogClassName, titlePlaceholder, titleRequired, titleError, submitButtonTooltip, cancelButtonTooltip, disableCustomButton, customHeader, middleFooterSection = jsxRuntime.jsx(jsxRuntime.Fragment, {}), customButtonVariant = 'outline', submitButtonVariant = 'theme', keepFocusInsideModal = true, onPointerDownOutside, onInteractOutside, ariaDescribedBy, }) => {
|
|
14579
14603
|
const [isLoading, setIsLoading] = React.useState(false);
|
|
14580
14604
|
// the Dialog is adding pointerEvents: none to body and the dropdowns from the modal does not work anymore
|
|
14581
14605
|
React.useEffect(() => {
|
|
@@ -14613,7 +14637,7 @@ const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, sub
|
|
|
14613
14637
|
}
|
|
14614
14638
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [titleIcon && titleIconPosition === 'left' ? jsxRuntime.jsx("div", { className: "tw:flex tw:mr-2", children: titleIconElement }) : jsxRuntime.jsx(jsxRuntime.Fragment, {}), jsxRuntime.jsx(DialogTitle, { asChild: true, children: isTitleEditable ? (jsxRuntime.jsxs("div", { className: "tw:flex tw:w-full tw:items-center", children: [jsxRuntime.jsx(TextField, { extraClassNames: inputExtraClassNames, value: title, type: "text", testId: "modalTitle", onChange: onTitleChanged, placeholder: titlePlaceholder, required: titleRequired, showError: !!titleError }), titleError && jsxRuntime.jsx("p", { className: "tw:text-sq-danger tw:min-w-fit tw:pl-2 tw:mb-0", children: titleError })] })) : (customHeader ?? (jsxRuntime.jsxs("div", { "data-testid": "modalTitle", className: "modal-title", children: [jsxRuntime.jsxs("div", { className: "tw:flex tw:items-center", children: [jsxRuntime.jsx("h3", { children: title }), titleSuffixLabel && jsxRuntime.jsx("span", { className: "tw:text-xl tw:pl-0.5", children: titleSuffixLabel })] }), subtitle && (jsxRuntime.jsx("div", { className: "tw:italic tw:text-sm tw:text-left tw:mt-1", "data-testid": "modal-subtitle", children: subtitle }))] }))) }), titleIcon && titleIconPosition === 'right' ? jsxRuntime.jsx("div", { className: "tw:flex tw:ml-4", children: titleIconElement }) : jsxRuntime.jsx(jsxRuntime.Fragment, {})] }));
|
|
14615
14639
|
};
|
|
14616
|
-
return open ? (jsxRuntime.jsx(Dialog, { open: true, onOpenChange: onClose, modal: keepFocusInsideModal, children: jsxRuntime.jsxs(DialogContent, { onPointerDownOutside: (e) => (onPointerDownOutside ? onPointerDownOutside(e) : e.preventDefault()), onInteractOutside: (e) => (onInteractOutside ? onInteractOutside(e) : e.preventDefault()), "data-testid": testId, className: classNames(`modalContent tw:w-full tw:border-none tw:shadow-none tw:dark:text-sq-dark-text tw:gap-0!`, {
|
|
14640
|
+
return open ? (jsxRuntime.jsx(Dialog, { open: true, onOpenChange: onClose, modal: keepFocusInsideModal, children: jsxRuntime.jsxs(DialogContent, { onPointerDownOutside: (e) => (onPointerDownOutside ? onPointerDownOutside(e) : e.preventDefault()), onInteractOutside: (e) => (onInteractOutside ? onInteractOutside(e) : e.preventDefault()), "data-testid": testId, "aria-describedby": ariaDescribedBy, className: classNames(`modalContent tw:w-full tw:border-none tw:shadow-none tw:dark:text-sq-dark-text tw:gap-0!`, {
|
|
14617
14641
|
'tw:max-w-xs': size === 'xs',
|
|
14618
14642
|
'tw:max-w-sm': size === 'sm',
|
|
14619
14643
|
'tw:max-w-md': size === 'md',
|
|
@@ -16681,7 +16705,7 @@ const Alert = ({ children, dismissible = true, onClose, show = true, variant, te
|
|
|
16681
16705
|
theme: `${lightTheme$1} ${darkTheme$1}`,
|
|
16682
16706
|
formulaError: 'tw:text-red-800 tw:bg-red-200 tw:rounded-[0.25rem]!',
|
|
16683
16707
|
danger: 'tw:text-sq-text-color tw:bg-sq-danger',
|
|
16684
|
-
warning: 'tw:bg-sq-bg-warning tw:text-sq-text-color',
|
|
16708
|
+
warning: 'tw:bg-sq-bg-warning tw:text-sq-text-color tw:dark:text-sq-multi-gray-dark',
|
|
16685
16709
|
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',
|
|
16686
16710
|
};
|
|
16687
16711
|
const appliedBorderTheme = {
|
|
@@ -16717,8 +16741,8 @@ const SvgIcon = ({ onClick, icon, color, type = 'default', extraClassNames, view
|
|
|
16717
16741
|
const appliedClassNames = `${onClick ? 'tw:cursor-pointer' : ''} ${extraClassNames} tw:focus:outline-none tw:focus-visible:outline-none
|
|
16718
16742
|
tw:outline-none`;
|
|
16719
16743
|
const tooltipData = getQTipData(tooltipProps);
|
|
16720
|
-
const appliedType = type === 'default' ? 'currentColor' : '
|
|
16721
|
-
return (jsxRuntime.jsx("div", { onClick: onClick, ...tooltipData, className: `svgContainer ${appliedClassNames}`, children: jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: `tw:sq-icon tw:dark:text-sq-white`, viewBox: viewBox, fill: color ? color : appliedType, "data-testid": testId, children: jsxRuntime.jsx("path", { d: getSvgIconPath(icon) }) }) }));
|
|
16744
|
+
const appliedType = type === 'default' ? 'currentColor' : 'var(--theme-icon)';
|
|
16745
|
+
return (jsxRuntime.jsx("div", { onClick: onClick, ...tooltipData, className: `svgContainer ${appliedClassNames}`, children: jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: `tw:text-sq-theme-icon tw:dark:text-sq-white`, viewBox: viewBox, fill: color ? color : appliedType, "data-testid": testId, children: jsxRuntime.jsx("path", { d: getSvgIconPath(icon) }) }) }));
|
|
16722
16746
|
};
|
|
16723
16747
|
|
|
16724
16748
|
const SeeqActionDropdownItem = (item) => {
|
|
@@ -16856,8 +16880,7 @@ function formatErrorMessage(message, errorCode) {
|
|
|
16856
16880
|
|
|
16857
16881
|
let warning = () => { };
|
|
16858
16882
|
let invariant = () => { };
|
|
16859
|
-
if (
|
|
16860
|
-
process.env?.NODE_ENV !== "production") {
|
|
16883
|
+
if (process.env.NODE_ENV !== "production") {
|
|
16861
16884
|
warning = (check, message, errorCode) => {
|
|
16862
16885
|
if (!check && typeof console !== "undefined") {
|
|
16863
16886
|
console.warn(formatErrorMessage(message, errorCode));
|
|
@@ -17313,17 +17336,6 @@ const isCSSVariableToken = (value) => {
|
|
|
17313
17336
|
return singleCssVariableRegex.test(value.split("/*")[0].trim());
|
|
17314
17337
|
};
|
|
17315
17338
|
const singleCssVariableRegex = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
17316
|
-
/**
|
|
17317
|
-
* Check if a value contains a CSS variable anywhere (e.g. inside calc()).
|
|
17318
|
-
* Unlike isCSSVariableToken which checks if the value IS a var() token,
|
|
17319
|
-
* this checks if the value CONTAINS var() somewhere in the string.
|
|
17320
|
-
*/
|
|
17321
|
-
function containsCSSVariable(value) {
|
|
17322
|
-
if (typeof value !== "string")
|
|
17323
|
-
return false;
|
|
17324
|
-
// Strip comments to avoid false positives
|
|
17325
|
-
return value.split("/*")[0].includes("var(--");
|
|
17326
|
-
}
|
|
17327
17339
|
|
|
17328
17340
|
const number = {
|
|
17329
17341
|
test: (v) => typeof v === "number",
|
|
@@ -19121,12 +19133,6 @@ class NativeAnimation extends WithPromise {
|
|
|
19121
19133
|
super();
|
|
19122
19134
|
this.finishedTime = null;
|
|
19123
19135
|
this.isStopped = false;
|
|
19124
|
-
/**
|
|
19125
|
-
* Tracks a manually-set start time that takes precedence over WAAPI's
|
|
19126
|
-
* dynamic startTime. This is cleared when play() or time setter is called,
|
|
19127
|
-
* allowing WAAPI to take over timing.
|
|
19128
|
-
*/
|
|
19129
|
-
this.manualStartTime = null;
|
|
19130
19136
|
if (!options)
|
|
19131
19137
|
return;
|
|
19132
19138
|
const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;
|
|
@@ -19162,7 +19168,6 @@ class NativeAnimation extends WithPromise {
|
|
|
19162
19168
|
play() {
|
|
19163
19169
|
if (this.isStopped)
|
|
19164
19170
|
return;
|
|
19165
|
-
this.manualStartTime = null;
|
|
19166
19171
|
this.animation.play();
|
|
19167
19172
|
if (this.state === "finished") {
|
|
19168
19173
|
this.updateFinished();
|
|
@@ -19226,7 +19231,6 @@ class NativeAnimation extends WithPromise {
|
|
|
19226
19231
|
return millisecondsToSeconds(Number(this.animation.currentTime) || 0);
|
|
19227
19232
|
}
|
|
19228
19233
|
set time(newTime) {
|
|
19229
|
-
this.manualStartTime = null;
|
|
19230
19234
|
this.finishedTime = null;
|
|
19231
19235
|
this.animation.currentTime = secondsToMilliseconds(newTime);
|
|
19232
19236
|
}
|
|
@@ -19249,10 +19253,10 @@ class NativeAnimation extends WithPromise {
|
|
|
19249
19253
|
: this.animation.playState;
|
|
19250
19254
|
}
|
|
19251
19255
|
get startTime() {
|
|
19252
|
-
return
|
|
19256
|
+
return Number(this.animation.startTime);
|
|
19253
19257
|
}
|
|
19254
19258
|
set startTime(newStartTime) {
|
|
19255
|
-
this.
|
|
19259
|
+
this.animation.startTime = newStartTime;
|
|
19256
19260
|
}
|
|
19257
19261
|
/**
|
|
19258
19262
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
@@ -19314,7 +19318,7 @@ class NativeAnimationExtended extends NativeAnimation {
|
|
|
19314
19318
|
*/
|
|
19315
19319
|
replaceTransitionType(options);
|
|
19316
19320
|
super(options);
|
|
19317
|
-
if (options.startTime
|
|
19321
|
+
if (options.startTime) {
|
|
19318
19322
|
this.startTime = options.startTime;
|
|
19319
19323
|
}
|
|
19320
19324
|
this.options = options;
|
|
@@ -19322,7 +19326,7 @@ class NativeAnimationExtended extends NativeAnimation {
|
|
|
19322
19326
|
/**
|
|
19323
19327
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
19324
19328
|
*
|
|
19325
|
-
* Rather than read
|
|
19329
|
+
* Rather than read commited styles back out of the DOM, we can
|
|
19326
19330
|
* create a renderless JS animation and sample it twice to calculate
|
|
19327
19331
|
* its current value, "previous" value, and therefore allow
|
|
19328
19332
|
* Motion to calculate velocity for any subsequent animation.
|
|
@@ -19339,14 +19343,8 @@ class NativeAnimationExtended extends NativeAnimation {
|
|
|
19339
19343
|
...options,
|
|
19340
19344
|
autoplay: false,
|
|
19341
19345
|
});
|
|
19342
|
-
|
|
19343
|
-
|
|
19344
|
-
* Under CPU load, WAAPI's currentTime may not reflect actual
|
|
19345
|
-
* elapsed time, causing incorrect sampling and visual jumps.
|
|
19346
|
-
*/
|
|
19347
|
-
const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);
|
|
19348
|
-
const delta = clamp$1(0, sampleDelta, sampleTime - sampleDelta);
|
|
19349
|
-
motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, sampleAnimation.sample(sampleTime).value, delta);
|
|
19346
|
+
const sampleTime = secondsToMilliseconds(this.finishedTime ?? this.time);
|
|
19347
|
+
motionValue.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);
|
|
19350
19348
|
sampleAnimation.stop();
|
|
19351
19349
|
}
|
|
19352
19350
|
}
|
|
@@ -19524,7 +19522,7 @@ class AsyncMotionValueAnimation extends WithPromise {
|
|
|
19524
19522
|
* progress, which would feel snappier.
|
|
19525
19523
|
*
|
|
19526
19524
|
* However, if there's a delay (main thread work) between the creation of
|
|
19527
|
-
* the animation and the first
|
|
19525
|
+
* the animation and the first commited frame, we prefer to use resolvedAt
|
|
19528
19526
|
* to avoid a sudden jump into the animation.
|
|
19529
19527
|
*/
|
|
19530
19528
|
const startTime = sync
|
|
@@ -19793,36 +19791,17 @@ const numberValueTypes = {
|
|
|
19793
19791
|
right: px,
|
|
19794
19792
|
bottom: px,
|
|
19795
19793
|
left: px,
|
|
19796
|
-
inset: px,
|
|
19797
|
-
insetBlock: px,
|
|
19798
|
-
insetBlockStart: px,
|
|
19799
|
-
insetBlockEnd: px,
|
|
19800
|
-
insetInline: px,
|
|
19801
|
-
insetInlineStart: px,
|
|
19802
|
-
insetInlineEnd: px,
|
|
19803
19794
|
// Spacing props
|
|
19804
19795
|
padding: px,
|
|
19805
19796
|
paddingTop: px,
|
|
19806
19797
|
paddingRight: px,
|
|
19807
19798
|
paddingBottom: px,
|
|
19808
19799
|
paddingLeft: px,
|
|
19809
|
-
paddingBlock: px,
|
|
19810
|
-
paddingBlockStart: px,
|
|
19811
|
-
paddingBlockEnd: px,
|
|
19812
|
-
paddingInline: px,
|
|
19813
|
-
paddingInlineStart: px,
|
|
19814
|
-
paddingInlineEnd: px,
|
|
19815
19800
|
margin: px,
|
|
19816
19801
|
marginTop: px,
|
|
19817
19802
|
marginRight: px,
|
|
19818
19803
|
marginBottom: px,
|
|
19819
19804
|
marginLeft: px,
|
|
19820
|
-
marginBlock: px,
|
|
19821
|
-
marginBlockStart: px,
|
|
19822
|
-
marginBlockEnd: px,
|
|
19823
|
-
marginInline: px,
|
|
19824
|
-
marginInlineStart: px,
|
|
19825
|
-
marginInlineEnd: px,
|
|
19826
19805
|
// Misc
|
|
19827
19806
|
backgroundPositionX: px,
|
|
19828
19807
|
backgroundPositionY: px,
|
|
@@ -19940,16 +19919,6 @@ class DOMKeyframesResolver extends KeyframeResolver {
|
|
|
19940
19919
|
const [origin, target] = unresolvedKeyframes;
|
|
19941
19920
|
const originType = findDimensionValueType(origin);
|
|
19942
19921
|
const targetType = findDimensionValueType(target);
|
|
19943
|
-
/**
|
|
19944
|
-
* If one keyframe contains embedded CSS variables (e.g. in calc()) and the other
|
|
19945
|
-
* doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.
|
|
19946
|
-
*/
|
|
19947
|
-
const originHasVar = containsCSSVariable(origin);
|
|
19948
|
-
const targetHasVar = containsCSSVariable(target);
|
|
19949
|
-
if (originHasVar !== targetHasVar && positionalValues[name]) {
|
|
19950
|
-
this.needsMeasurement = true;
|
|
19951
|
-
return;
|
|
19952
|
-
}
|
|
19953
19922
|
/**
|
|
19954
19923
|
* Either we don't recognise these value types or we can animate between them.
|
|
19955
19924
|
*/
|
|
@@ -20484,24 +20453,16 @@ const isPrimaryPointer = (event) => {
|
|
|
20484
20453
|
}
|
|
20485
20454
|
};
|
|
20486
20455
|
|
|
20487
|
-
const
|
|
20456
|
+
const focusableElements = new Set([
|
|
20488
20457
|
"BUTTON",
|
|
20489
20458
|
"INPUT",
|
|
20490
20459
|
"SELECT",
|
|
20491
20460
|
"TEXTAREA",
|
|
20492
20461
|
"A",
|
|
20493
20462
|
]);
|
|
20494
|
-
/**
|
|
20495
|
-
* Checks if an element is an interactive form element that should prevent
|
|
20496
|
-
* drag gestures from starting when clicked.
|
|
20497
|
-
*
|
|
20498
|
-
* This specifically targets form controls, buttons, and links - not just any
|
|
20499
|
-
* element with tabIndex, since motion elements with tap handlers automatically
|
|
20500
|
-
* get tabIndex=0 for keyboard accessibility.
|
|
20501
|
-
*/
|
|
20502
20463
|
function isElementKeyboardAccessible(element) {
|
|
20503
|
-
return (
|
|
20504
|
-
element.
|
|
20464
|
+
return (focusableElements.has(element.tagName) ||
|
|
20465
|
+
element.tabIndex !== -1);
|
|
20505
20466
|
}
|
|
20506
20467
|
|
|
20507
20468
|
const isPressing = new WeakSet();
|
|
@@ -29443,7 +29404,7 @@ exports.ProgressBar = ProgressBar;
|
|
|
29443
29404
|
exports.QTip = QTip;
|
|
29444
29405
|
exports.SeeqActionDropdown = SeeqActionDropdown;
|
|
29445
29406
|
exports.Select = Select;
|
|
29446
|
-
exports.
|
|
29407
|
+
exports.SelectComponents = components;
|
|
29447
29408
|
exports.Slider = Slider;
|
|
29448
29409
|
exports.Tabs = Tabs;
|
|
29449
29410
|
exports.TextArea = TextArea;
|