@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 CHANGED
@@ -8,7 +8,7 @@ Seeq qomponents are a collection of UI components, including a Button, a TextFie
8
8
  React component (more coming soon!)
9
9
 
10
10
  These components are used by Seeq's application and are made publicly available for Developers who want to expand
11
- the Seeq eco-system with their own plugins and add-ons without having to worry about creating a cohesive Seeq UX
11
+ the Seeq ecosystem with their own plugins and add-ons without having to worry about creating a cohesive Seeq UX
12
12
  experience. Every component comes fully styled (and with dark mode support).
13
13
 
14
14
  ## Installation
@@ -29,8 +29,8 @@ yarn add @seeqdev/qomponents
29
29
 
30
30
  ## Getting started with Seeq qomponents
31
31
 
32
- Prefer a more complete example? <br/>Checkout the example folder provided.
33
- It includes a ready to run example application. Start with the readme in the example folder to get up and running!
32
+ Prefer a more complete example? <br/>Check out the example folder provided.
33
+ It includes a ready-to-run example application. Start with the readme in the example folder to get up and running!
34
34
 
35
35
  Here is an example of a basic app using the `Button` component:
36
36
 
@@ -47,14 +47,6 @@ To make sure all styles are properly applied be sure to include the qomponents c
47
47
 
48
48
  ```css
49
49
  @import '@seeqdev/qomponents/dist/styles.css';
50
-
51
- @font-face {
52
- font-family: 'fontCustom';
53
- src: url('@seeqdev/qomponents/dist/FontCustom.woff2') format('woff2'), url('@seeqdev/qomponents/dist/FontCustom.woff')
54
- format('woff');
55
- font-weight: normal;
56
- font-style: normal;
57
- }
58
50
  ```
59
51
 
60
52
  <b>A note on CSS:</b> Seeq's qomponents come fully styled and ready to use. While it is tempting to use the
package/dist/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as jsx$1, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import React__default, { useLayoutEffect, useState, useRef, useEffect, useCallback, forwardRef, useContext, useMemo, createContext, Component, Fragment as Fragment$1, useId as useId$1, useInsertionEffect as useInsertionEffect$2, Children, isValidElement, createElement } from 'react';
3
+ import React__default, { useLayoutEffect, useState, useCallback, useRef, useEffect, forwardRef, useContext, useMemo, createContext, Component, Fragment as Fragment$1, useId as useId$1, useInsertionEffect as useInsertionEffect$2, Children, isValidElement, createElement } from 'react';
4
4
  import * as ReactDOM from 'react-dom';
5
5
  import ReactDOM__default, { createPortal } from 'react-dom';
6
6
 
@@ -66,7 +66,7 @@ const colorClassesThemeDark = {
66
66
  'dark-gray': 'tw:text-sq-fairly-dark-gray',
67
67
  'warning': '',
68
68
  'darkish-gray': 'tw:text-sq-darkish-gray',
69
- 'gray': 'tw:dark:text-sq-dark-disabled-gray',
69
+ 'gray': 'tw:dark:text-sq-fairly-dark-gray',
70
70
  'color': '',
71
71
  'info': 'tw:dark:text-sq-theme-link',
72
72
  'text': 'tw:dark:text-sq-dark-text',
@@ -134,7 +134,7 @@ const Button = ({ onClick, label, variant = 'outline', type = 'button', size = '
134
134
  'outline': 'tw:bg-white tw:border-sq-disabled-gray',
135
135
  'theme': 'tw:bg-sq-theme-dark tw:border-sq-theme-dark',
136
136
  'danger': '',
137
- 'theme-light': 'tw:bg-sq-icon',
137
+ 'theme-light': 'tw:bg-sq-theme-icon',
138
138
  'no-border': '',
139
139
  'warning': '',
140
140
  };
@@ -142,7 +142,7 @@ const Button = ({ onClick, label, variant = 'outline', type = 'button', size = '
142
142
  'outline': 'tw:dark:bg-sq-dark-background tw:dark:border-sq-dark-disabled-gray',
143
143
  'theme': 'tw:dark:bg-sq-theme-dark tw:dark:border-sq-theme-dark',
144
144
  'danger': '',
145
- 'theme-light': 'tw:dark:bg-sq-icon-dark tw:dark:border-sq-icon-dark',
145
+ 'theme-light': 'tw:dark:bg-sq-theme-icon tw:dark:border-sq-theme-icon',
146
146
  'no-border': '',
147
147
  'warning': '',
148
148
  };
@@ -3843,7 +3843,7 @@ var removedBarSizeVariable = '--removed-body-scroll-bar-size';
3843
3843
  * assignRef(refObject, "refValue");
3844
3844
  * assignRef(refFn, "refValue");
3845
3845
  */
3846
- function assignRef(ref, value) {
3846
+ function assignRef$1(ref, value) {
3847
3847
  if (typeof ref === 'function') {
3848
3848
  ref(value);
3849
3849
  }
@@ -3910,7 +3910,7 @@ var currentValues = new WeakMap();
3910
3910
  */
3911
3911
  function useMergeRefs(refs, defaultValue) {
3912
3912
  var callbackRef = useCallbackRef(null, function (newValue) {
3913
- return refs.forEach(function (ref) { return assignRef(ref, newValue); });
3913
+ return refs.forEach(function (ref) { return assignRef$1(ref, newValue); });
3914
3914
  });
3915
3915
  // handle refs changes - added or removed
3916
3916
  useIsomorphicLayoutEffect$1(function () {
@@ -3921,12 +3921,12 @@ function useMergeRefs(refs, defaultValue) {
3921
3921
  var current_1 = callbackRef.current;
3922
3922
  prevRefs_1.forEach(function (ref) {
3923
3923
  if (!nextRefs_1.has(ref)) {
3924
- assignRef(ref, null);
3924
+ assignRef$1(ref, null);
3925
3925
  }
3926
3926
  });
3927
3927
  nextRefs_1.forEach(function (ref) {
3928
3928
  if (!prevRefs_1.has(ref)) {
3929
- assignRef(ref, current_1);
3929
+ assignRef$1(ref, current_1);
3930
3930
  }
3931
3931
  });
3932
3932
  }
@@ -4888,6 +4888,41 @@ const setValidInputDimension = (width, height) => {
4888
4888
  return inputStyle;
4889
4889
  };
4890
4890
 
4891
+ function assignRef(ref, value) {
4892
+ if (typeof ref === "function") {
4893
+ return ref(value);
4894
+ } else if (typeof ref === "object" && ref !== null && "current" in ref) {
4895
+ ref.current = value;
4896
+ }
4897
+ }
4898
+ function mergeRefs(...refs) {
4899
+ const cleanupMap = /* @__PURE__ */ new Map();
4900
+ return (node) => {
4901
+ refs.forEach((ref) => {
4902
+ const cleanup = assignRef(ref, node);
4903
+ if (cleanup) {
4904
+ cleanupMap.set(ref, cleanup);
4905
+ }
4906
+ });
4907
+ if (cleanupMap.size > 0) {
4908
+ return () => {
4909
+ refs.forEach((ref) => {
4910
+ const cleanup = cleanupMap.get(ref);
4911
+ if (cleanup && typeof cleanup === "function") {
4912
+ cleanup();
4913
+ } else {
4914
+ assignRef(ref, null);
4915
+ }
4916
+ });
4917
+ cleanupMap.clear();
4918
+ };
4919
+ }
4920
+ };
4921
+ }
4922
+ function useMergedRef(...refs) {
4923
+ return useCallback(mergeRefs(...refs), refs);
4924
+ }
4925
+
4891
4926
  const errorClasses$4 = 'tw:border-sq-danger';
4892
4927
  const borderColorClasses$4 = [
4893
4928
  'tw:border-sq-disabled-gray',
@@ -4911,15 +4946,11 @@ const sizeClasses = {
4911
4946
  * Textfield.
4912
4947
  */
4913
4948
  const TextField = React__default.forwardRef((props, ref) => {
4914
- 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;
4949
+ 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;
4915
4950
  const internalRef = useRef(null);
4951
+ const mergedRef = useMergedRef(ref, internalRef);
4916
4952
  const [cursor, setCursor] = useState(null);
4917
4953
  const tooltipData = getQTipData(tooltipProps);
4918
- const setAllRefs = (receivedRef) => {
4919
- if (ref)
4920
- ref.current = receivedRef;
4921
- internalRef.current = receivedRef;
4922
- };
4923
4954
  useEffect(() => {
4924
4955
  if (autoFocus) {
4925
4956
  setTimeout(() => {
@@ -4965,7 +4996,7 @@ const TextField = React__default.forwardRef((props, ref) => {
4965
4996
  inputLenghtProp.maxLength = maxLength;
4966
4997
  if (minLength)
4967
4998
  inputLenghtProp.minLength = minLength;
4968
- return (jsxs(Fragment, { children: [jsx$1("input", { ref: setAllRefs, "data-testid": testId, name: name, id: id, type: type, value: value, className: appliedClasses, placeholder: placeholder, disabled: disabled, readOnly: readonly, autoComplete: autoComplete, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, onKeyUp: onKeyUp, step: step, required: required, min: min, max: max, ...inputLenghtProp, ...inputProp, ...tooltipData }), errorText && showError && jsx$1("div", { className: "tw:text-sq-danger tw:text-xs tw:mt-1", children: errorText })] }));
4999
+ return (jsxs(Fragment, { children: [jsx$1("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 && jsx$1("div", { className: "tw:text-sq-danger tw:text-xs tw:mt-1", children: errorText })] }));
4969
5000
  });
4970
5001
 
4971
5002
  const alignment = 'tw:flex';
@@ -4975,8 +5006,8 @@ const baseClasses$5 = 'tw:appearance-none tw:border tw:h-3.5 tw:w-3.5 tw:focus:r
4975
5006
  ' tw:checked:text-white tw:checked:border-sq-text-color tw:checked:hover:border-sq-theme-dark' +
4976
5007
  ' tw:checked:active:border-sq-theme-darker tw:checked:focus:border-sq-theme-dark tw:disabled:border-sq-disabled-gray' +
4977
5008
  ' tw:dark:disabled:border-sq-fairly-dark-gray tw:dark:checked:focus:bg-sq-dark-background';
4978
- const checkboxClasses = `tw:form-checkbox tw:rounded ${baseClasses$5}`;
4979
- const radioClasses = `tw:form-radio tw:rounded-full ${baseClasses$5}`;
5009
+ const checkboxClasses = `tw:rounded ${baseClasses$5}`;
5010
+ const radioClasses = `tw:rounded-full ${baseClasses$5}`;
4980
5011
  /**
4981
5012
  * Checkbox and Radio Box Component.
4982
5013
  */
@@ -5010,6 +5041,7 @@ const borderColorClasses$3 = [
5010
5041
  const TextArea = React__default.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) => {
5011
5042
  const appliedClasses = `${baseClasses$4} ${extraClassNames} ${lightTheme$2} ${darkTheme$2} ${showError ? errorClasses$3 : borderColorClasses$3}`;
5012
5043
  const textareaRef = useRef(null);
5044
+ const mergedRef = useMergedRef(ref, textareaRef);
5013
5045
  // Handle selection change events
5014
5046
  useEffect(() => {
5015
5047
  if (!onSelectionChange || !textareaRef.current) {
@@ -5030,15 +5062,7 @@ const TextArea = React__default.forwardRef(({ readonly = false, disabled = false
5030
5062
  textarea.removeEventListener('keyup', handleSelectionChange);
5031
5063
  };
5032
5064
  }, [onSelectionChange]);
5033
- return (jsx$1("textarea", { ref: (element) => {
5034
- textareaRef.current = element;
5035
- if (typeof ref === 'function') {
5036
- ref(element);
5037
- }
5038
- else if (ref) {
5039
- ref.current = element;
5040
- }
5041
- }, "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 }));
5065
+ return (jsx$1("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 }));
5042
5066
  });
5043
5067
 
5044
5068
  /**
@@ -14543,7 +14567,7 @@ var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
14543
14567
  const Dialog = Root$4;
14544
14568
  const DialogPortal = Portal$1;
14545
14569
  const DialogClose = Close;
14546
- const DialogContent = React__default.forwardRef(({ className, children, ...props }, ref) => (jsxs(DialogPortal, { children: [jsx$1("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 " }), 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
14570
+ const DialogContent = React__default.forwardRef(({ className, 'aria-describedby': ariaDescribedBy, children, ...props }, ref) => (jsxs(DialogPortal, { children: [jsx$1("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 " }), 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
14547
14571
  tw:gap-4 tw:border tw:bg-sq-white tw:dark:bg-sq-dark-background tw:shadow-lg tw:duration-200
14548
14572
  tw:rounded-lg ${className}`, ...props, children: [jsx$1(DialogTitle$1, { className: "tw:hidden" }), children] })] })));
14549
14573
  DialogContent.displayName = Content$2.displayName;
@@ -14555,7 +14579,7 @@ const DialogTitle = React__default.forwardRef((props, ref) => jsx$1(Title, { ref
14555
14579
  DialogTitle.displayName = Title.displayName;
14556
14580
  const DialogDescription = React__default.forwardRef((props, ref) => jsx$1(Description, { ref: ref, ...props }));
14557
14581
  DialogDescription.displayName = Description.displayName;
14558
- 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 = jsx$1(Fragment, {}), customButtonVariant = 'outline', submitButtonVariant = 'theme', keepFocusInsideModal = true, onPointerDownOutside, onInteractOutside, }) => {
14582
+ 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 = jsx$1(Fragment, {}), customButtonVariant = 'outline', submitButtonVariant = 'theme', keepFocusInsideModal = true, onPointerDownOutside, onInteractOutside, ariaDescribedBy, }) => {
14559
14583
  const [isLoading, setIsLoading] = useState(false);
14560
14584
  // the Dialog is adding pointerEvents: none to body and the dropdowns from the modal does not work anymore
14561
14585
  useEffect(() => {
@@ -14593,7 +14617,7 @@ const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, sub
14593
14617
  }
14594
14618
  return (jsxs(Fragment, { children: [titleIcon && titleIconPosition === 'left' ? jsx$1("div", { className: "tw:flex tw:mr-2", children: titleIconElement }) : jsx$1(Fragment, {}), jsx$1(DialogTitle, { asChild: true, children: isTitleEditable ? (jsxs("div", { className: "tw:flex tw:w-full tw:items-center", children: [jsx$1(TextField, { extraClassNames: inputExtraClassNames, value: title, type: "text", testId: "modalTitle", onChange: onTitleChanged, placeholder: titlePlaceholder, required: titleRequired, showError: !!titleError }), titleError && jsx$1("p", { className: "tw:text-sq-danger tw:min-w-fit tw:pl-2 tw:mb-0", children: titleError })] })) : (customHeader ?? (jsxs("div", { "data-testid": "modalTitle", className: "modal-title", children: [jsxs("div", { className: "tw:flex tw:items-center", children: [jsx$1("h3", { children: title }), titleSuffixLabel && jsx$1("span", { className: "tw:text-xl tw:pl-0.5", children: titleSuffixLabel })] }), subtitle && (jsx$1("div", { className: "tw:italic tw:text-sm tw:text-left tw:mt-1", "data-testid": "modal-subtitle", children: subtitle }))] }))) }), titleIcon && titleIconPosition === 'right' ? jsx$1("div", { className: "tw:flex tw:ml-4", children: titleIconElement }) : jsx$1(Fragment, {})] }));
14595
14619
  };
14596
- return open ? (jsx$1(Dialog, { open: true, onOpenChange: onClose, modal: keepFocusInsideModal, children: 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!`, {
14620
+ return open ? (jsx$1(Dialog, { open: true, onOpenChange: onClose, modal: keepFocusInsideModal, children: 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!`, {
14597
14621
  'tw:max-w-xs': size === 'xs',
14598
14622
  'tw:max-w-sm': size === 'sm',
14599
14623
  'tw:max-w-md': size === 'md',
@@ -16661,7 +16685,7 @@ const Alert = ({ children, dismissible = true, onClose, show = true, variant, te
16661
16685
  theme: `${lightTheme$1} ${darkTheme$1}`,
16662
16686
  formulaError: 'tw:text-red-800 tw:bg-red-200 tw:rounded-[0.25rem]!',
16663
16687
  danger: 'tw:text-sq-text-color tw:bg-sq-danger',
16664
- warning: 'tw:bg-sq-bg-warning tw:text-sq-text-color',
16688
+ warning: 'tw:bg-sq-bg-warning tw:text-sq-text-color tw:dark:text-sq-multi-gray-dark',
16665
16689
  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',
16666
16690
  };
16667
16691
  const appliedBorderTheme = {
@@ -16697,8 +16721,8 @@ const SvgIcon = ({ onClick, icon, color, type = 'default', extraClassNames, view
16697
16721
  const appliedClassNames = `${onClick ? 'tw:cursor-pointer' : ''} ${extraClassNames} tw:focus:outline-none tw:focus-visible:outline-none
16698
16722
  tw:outline-none`;
16699
16723
  const tooltipData = getQTipData(tooltipProps);
16700
- const appliedType = type === 'default' ? 'currentColor' : 'rgb(var(--sq-icon))';
16701
- return (jsx$1("div", { onClick: onClick, ...tooltipData, className: `svgContainer ${appliedClassNames}`, children: jsx$1("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: jsx$1("path", { d: getSvgIconPath(icon) }) }) }));
16724
+ const appliedType = type === 'default' ? 'currentColor' : 'var(--theme-icon)';
16725
+ return (jsx$1("div", { onClick: onClick, ...tooltipData, className: `svgContainer ${appliedClassNames}`, children: jsx$1("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: jsx$1("path", { d: getSvgIconPath(icon) }) }) }));
16702
16726
  };
16703
16727
 
16704
16728
  const SeeqActionDropdownItem = (item) => {
@@ -16836,8 +16860,7 @@ function formatErrorMessage(message, errorCode) {
16836
16860
 
16837
16861
  let warning = () => { };
16838
16862
  let invariant = () => { };
16839
- if (typeof process !== "undefined" &&
16840
- process.env?.NODE_ENV !== "production") {
16863
+ if (process.env.NODE_ENV !== "production") {
16841
16864
  warning = (check, message, errorCode) => {
16842
16865
  if (!check && typeof console !== "undefined") {
16843
16866
  console.warn(formatErrorMessage(message, errorCode));
@@ -17293,17 +17316,6 @@ const isCSSVariableToken = (value) => {
17293
17316
  return singleCssVariableRegex.test(value.split("/*")[0].trim());
17294
17317
  };
17295
17318
  const singleCssVariableRegex = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
17296
- /**
17297
- * Check if a value contains a CSS variable anywhere (e.g. inside calc()).
17298
- * Unlike isCSSVariableToken which checks if the value IS a var() token,
17299
- * this checks if the value CONTAINS var() somewhere in the string.
17300
- */
17301
- function containsCSSVariable(value) {
17302
- if (typeof value !== "string")
17303
- return false;
17304
- // Strip comments to avoid false positives
17305
- return value.split("/*")[0].includes("var(--");
17306
- }
17307
17319
 
17308
17320
  const number = {
17309
17321
  test: (v) => typeof v === "number",
@@ -19101,12 +19113,6 @@ class NativeAnimation extends WithPromise {
19101
19113
  super();
19102
19114
  this.finishedTime = null;
19103
19115
  this.isStopped = false;
19104
- /**
19105
- * Tracks a manually-set start time that takes precedence over WAAPI's
19106
- * dynamic startTime. This is cleared when play() or time setter is called,
19107
- * allowing WAAPI to take over timing.
19108
- */
19109
- this.manualStartTime = null;
19110
19116
  if (!options)
19111
19117
  return;
19112
19118
  const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;
@@ -19142,7 +19148,6 @@ class NativeAnimation extends WithPromise {
19142
19148
  play() {
19143
19149
  if (this.isStopped)
19144
19150
  return;
19145
- this.manualStartTime = null;
19146
19151
  this.animation.play();
19147
19152
  if (this.state === "finished") {
19148
19153
  this.updateFinished();
@@ -19206,7 +19211,6 @@ class NativeAnimation extends WithPromise {
19206
19211
  return millisecondsToSeconds(Number(this.animation.currentTime) || 0);
19207
19212
  }
19208
19213
  set time(newTime) {
19209
- this.manualStartTime = null;
19210
19214
  this.finishedTime = null;
19211
19215
  this.animation.currentTime = secondsToMilliseconds(newTime);
19212
19216
  }
@@ -19229,10 +19233,10 @@ class NativeAnimation extends WithPromise {
19229
19233
  : this.animation.playState;
19230
19234
  }
19231
19235
  get startTime() {
19232
- return this.manualStartTime ?? Number(this.animation.startTime);
19236
+ return Number(this.animation.startTime);
19233
19237
  }
19234
19238
  set startTime(newStartTime) {
19235
- this.manualStartTime = this.animation.startTime = newStartTime;
19239
+ this.animation.startTime = newStartTime;
19236
19240
  }
19237
19241
  /**
19238
19242
  * Attaches a timeline to the animation, for instance the `ScrollTimeline`.
@@ -19294,7 +19298,7 @@ class NativeAnimationExtended extends NativeAnimation {
19294
19298
  */
19295
19299
  replaceTransitionType(options);
19296
19300
  super(options);
19297
- if (options.startTime !== undefined) {
19301
+ if (options.startTime) {
19298
19302
  this.startTime = options.startTime;
19299
19303
  }
19300
19304
  this.options = options;
@@ -19302,7 +19306,7 @@ class NativeAnimationExtended extends NativeAnimation {
19302
19306
  /**
19303
19307
  * WAAPI doesn't natively have any interruption capabilities.
19304
19308
  *
19305
- * Rather than read committed styles back out of the DOM, we can
19309
+ * Rather than read commited styles back out of the DOM, we can
19306
19310
  * create a renderless JS animation and sample it twice to calculate
19307
19311
  * its current value, "previous" value, and therefore allow
19308
19312
  * Motion to calculate velocity for any subsequent animation.
@@ -19319,14 +19323,8 @@ class NativeAnimationExtended extends NativeAnimation {
19319
19323
  ...options,
19320
19324
  autoplay: false,
19321
19325
  });
19322
- /**
19323
- * Use wall-clock elapsed time for sampling.
19324
- * Under CPU load, WAAPI's currentTime may not reflect actual
19325
- * elapsed time, causing incorrect sampling and visual jumps.
19326
- */
19327
- const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);
19328
- const delta = clamp$1(0, sampleDelta, sampleTime - sampleDelta);
19329
- motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, sampleAnimation.sample(sampleTime).value, delta);
19326
+ const sampleTime = secondsToMilliseconds(this.finishedTime ?? this.time);
19327
+ motionValue.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);
19330
19328
  sampleAnimation.stop();
19331
19329
  }
19332
19330
  }
@@ -19504,7 +19502,7 @@ class AsyncMotionValueAnimation extends WithPromise {
19504
19502
  * progress, which would feel snappier.
19505
19503
  *
19506
19504
  * However, if there's a delay (main thread work) between the creation of
19507
- * the animation and the first committed frame, we prefer to use resolvedAt
19505
+ * the animation and the first commited frame, we prefer to use resolvedAt
19508
19506
  * to avoid a sudden jump into the animation.
19509
19507
  */
19510
19508
  const startTime = sync
@@ -19773,36 +19771,17 @@ const numberValueTypes = {
19773
19771
  right: px,
19774
19772
  bottom: px,
19775
19773
  left: px,
19776
- inset: px,
19777
- insetBlock: px,
19778
- insetBlockStart: px,
19779
- insetBlockEnd: px,
19780
- insetInline: px,
19781
- insetInlineStart: px,
19782
- insetInlineEnd: px,
19783
19774
  // Spacing props
19784
19775
  padding: px,
19785
19776
  paddingTop: px,
19786
19777
  paddingRight: px,
19787
19778
  paddingBottom: px,
19788
19779
  paddingLeft: px,
19789
- paddingBlock: px,
19790
- paddingBlockStart: px,
19791
- paddingBlockEnd: px,
19792
- paddingInline: px,
19793
- paddingInlineStart: px,
19794
- paddingInlineEnd: px,
19795
19780
  margin: px,
19796
19781
  marginTop: px,
19797
19782
  marginRight: px,
19798
19783
  marginBottom: px,
19799
19784
  marginLeft: px,
19800
- marginBlock: px,
19801
- marginBlockStart: px,
19802
- marginBlockEnd: px,
19803
- marginInline: px,
19804
- marginInlineStart: px,
19805
- marginInlineEnd: px,
19806
19785
  // Misc
19807
19786
  backgroundPositionX: px,
19808
19787
  backgroundPositionY: px,
@@ -19920,16 +19899,6 @@ class DOMKeyframesResolver extends KeyframeResolver {
19920
19899
  const [origin, target] = unresolvedKeyframes;
19921
19900
  const originType = findDimensionValueType(origin);
19922
19901
  const targetType = findDimensionValueType(target);
19923
- /**
19924
- * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other
19925
- * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.
19926
- */
19927
- const originHasVar = containsCSSVariable(origin);
19928
- const targetHasVar = containsCSSVariable(target);
19929
- if (originHasVar !== targetHasVar && positionalValues[name]) {
19930
- this.needsMeasurement = true;
19931
- return;
19932
- }
19933
19902
  /**
19934
19903
  * Either we don't recognise these value types or we can animate between them.
19935
19904
  */
@@ -20464,24 +20433,16 @@ const isPrimaryPointer = (event) => {
20464
20433
  }
20465
20434
  };
20466
20435
 
20467
- const interactiveElements = new Set([
20436
+ const focusableElements = new Set([
20468
20437
  "BUTTON",
20469
20438
  "INPUT",
20470
20439
  "SELECT",
20471
20440
  "TEXTAREA",
20472
20441
  "A",
20473
20442
  ]);
20474
- /**
20475
- * Checks if an element is an interactive form element that should prevent
20476
- * drag gestures from starting when clicked.
20477
- *
20478
- * This specifically targets form controls, buttons, and links - not just any
20479
- * element with tabIndex, since motion elements with tap handlers automatically
20480
- * get tabIndex=0 for keyboard accessibility.
20481
- */
20482
20443
  function isElementKeyboardAccessible(element) {
20483
- return (interactiveElements.has(element.tagName) ||
20484
- element.isContentEditable === true);
20444
+ return (focusableElements.has(element.tagName) ||
20445
+ element.tabIndex !== -1);
20485
20446
  }
20486
20447
 
20487
20448
  const isPressing = new WeakSet();
@@ -29406,5 +29367,5 @@ const svgIconTypes = [...iconTypes, 'default'];
29406
29367
 
29407
29368
  const toolbarButtonVariants = ['outline', 'theme', 'theme-light', 'warning', 'danger', 'no-border'];
29408
29369
 
29409
- export { Accordion, Alert, Button, ButtonGroup, ButtonWithDropdown, ButtonWithPopover, Carousel, Checkbox, Collapse, DEFAULT_TOOL_TIP_DELAY, Icon, InputGroup, Modal, ProgressBar, QTip, SeeqActionDropdown, Select, components as SelectCompoents, Slider, Tabs, TextArea, TextField, ToolbarButton, Tooltip, buttonSizes, buttonTypes, buttonVariants, iconPositions, iconTypes, svgIconTypes, toolbarButtonVariants, tooltipPositions };
29370
+ export { Accordion, Alert, Button, ButtonGroup, ButtonWithDropdown, ButtonWithPopover, Carousel, Checkbox, Collapse, DEFAULT_TOOL_TIP_DELAY, Icon, InputGroup, Modal, ProgressBar, QTip, SeeqActionDropdown, Select, components as SelectComponents, Slider, Tabs, TextArea, TextField, ToolbarButton, Tooltip, buttonSizes, buttonTypes, buttonVariants, iconPositions, iconTypes, svgIconTypes, toolbarButtonVariants, tooltipPositions };
29410
29371
  //# sourceMappingURL=index.esm.js.map