@seeqdev/qomponents 0.0.47 → 0.0.48

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/index.js CHANGED
@@ -13748,41 +13748,6 @@ const $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props)=>{
13748
13748
  }, child))
13749
13749
  ));
13750
13750
  };
13751
- /* -------------------------------------------------------------------------------------------------
13752
- * DialogOverlay
13753
- * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$OVERLAY_NAME = 'DialogOverlay';
13754
- const $5d3850c4d0b4e6c7$export$bd1d06c79be19e17 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
13755
- const portalContext = $5d3850c4d0b4e6c7$var$usePortalContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, props.__scopeDialog);
13756
- const { forceMount: forceMount = portalContext.forceMount , ...overlayProps } = props;
13757
- const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, props.__scopeDialog);
13758
- return context.modal ? /*#__PURE__*/ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
13759
- present: forceMount || context.open
13760
- }, /*#__PURE__*/ React.createElement($5d3850c4d0b4e6c7$var$DialogOverlayImpl, _extends({}, overlayProps, {
13761
- ref: forwardedRef
13762
- }))) : null;
13763
- });
13764
- const $5d3850c4d0b4e6c7$var$DialogOverlayImpl = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
13765
- const { __scopeDialog: __scopeDialog , ...overlayProps } = props;
13766
- const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, __scopeDialog);
13767
- return(/*#__PURE__*/ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
13768
- // ie. when `Overlay` and `Content` are siblings
13769
- React.createElement($67UHm$RemoveScroll, {
13770
- as: $5e63c961fc1ce211$export$8c6ed5c666ac1360,
13771
- allowPinchZoom: true,
13772
- shards: [
13773
- context.contentRef
13774
- ]
13775
- }, /*#__PURE__*/ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
13776
- "data-state": $5d3850c4d0b4e6c7$var$getState(context.open)
13777
- }, overlayProps, {
13778
- ref: forwardedRef // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.
13779
- ,
13780
- style: {
13781
- pointerEvents: 'auto',
13782
- ...overlayProps.style
13783
- }
13784
- }))));
13785
- });
13786
13751
  /* -------------------------------------------------------------------------------------------------
13787
13752
  * DialogContent
13788
13753
  * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$CONTENT_NAME = 'DialogContent';
@@ -13933,7 +13898,6 @@ const $5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac = /*#__PURE__*/ React.forwardRef
13933
13898
  }
13934
13899
  const $5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9 = $5d3850c4d0b4e6c7$export$3ddf2d174ce01153;
13935
13900
  const $5d3850c4d0b4e6c7$export$602eac185826482c = $5d3850c4d0b4e6c7$export$dad7c95542bacce0;
13936
- const $5d3850c4d0b4e6c7$export$c6fdb837b070b4ff = $5d3850c4d0b4e6c7$export$bd1d06c79be19e17;
13937
13901
  const $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2 = $5d3850c4d0b4e6c7$export$b6d9565de1e068cf;
13938
13902
  const $5d3850c4d0b4e6c7$export$f99233281efd08a0 = $5d3850c4d0b4e6c7$export$16f7638e4a34b909;
13939
13903
  const $5d3850c4d0b4e6c7$export$393edc798c47379d = $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5;
@@ -14007,12 +13971,8 @@ var classNames = classnamesExports;
14007
13971
  const Dialog = $5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9;
14008
13972
  const DialogPortal = $5d3850c4d0b4e6c7$export$602eac185826482c;
14009
13973
  const DialogClose = $5d3850c4d0b4e6c7$export$f39c2d165cd861fe;
14010
- const DialogOverlay = React.forwardRef(({ className = '', ...props }, ref) => (React.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, { ref: ref, className: `tw-pointer-events-none tw-fixed tw-w-full tw-h-full tw-opacity-50 tw-inset-0 tw-z-[1000] tw-bg-sq-dark-background
14011
- data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0
14012
- data-[state=open]:fade-in-0 ${className}`, ...props })));
14013
- DialogOverlay.displayName = $5d3850c4d0b4e6c7$export$c6fdb837b070b4ff.displayName;
14014
13974
  const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (React.createElement(DialogPortal, null,
14015
- React.createElement(DialogOverlay, null),
13975
+ React.createElement("div", { className: "tw-select-none tw-fixed tw-w-full tw-h-full tw-opacity-50 tw-inset-0 tw-z-[1000] tw-bg-sq-dark-background\n data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0\n data-[state=open]:fade-in-0 " }),
14016
13976
  React.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, { ref: ref, className: `tw-fixed tw-left-[50%] tw-top-0 tw-my-6 tw-translate-x-[-50%] tw-z-[1001] tw-grid
14017
13977
  tw-gap-4 tw-border tw-bg-sq-white dark:tw-bg-sq-dark-background tw-p-6 tw-shadow-lg tw-duration-200
14018
13978
  tw-rounded-lg ${className}`, ...props }, children))));
@@ -14068,7 +14028,7 @@ const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, sub
14068
14028
  titleIcon && titleIconPosition === 'right' ?
14069
14029
  React.createElement("div", { className: "tw-flex tw-ml-4" }, titleIconElement) : React.createElement(React.Fragment, null)));
14070
14030
  };
14071
- return open ? (React.createElement(Dialog, { open: true, onOpenChange: onClose, modal: true },
14031
+ return open ? (React.createElement(Dialog, { open: true, onOpenChange: onClose, modal: false },
14072
14032
  React.createElement(DialogContent, { onPointerDownOutside: (e) => e.preventDefault(), "data-testid": testId, className: classNames(`modalContent tw-w-full !tw-p-0 tw-border-none tw-shadow-none dark:tw-text-sq-dark-text !tw-gap-0`, {
14073
14033
  'tw-max-w-xs': size === 'xs',
14074
14034
  'tw-max-w-sm': size === 'sm',
@@ -14089,14 +14049,14 @@ const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, sub
14089
14049
  !hideFooterButtons && React.createElement(DialogFooter, { className: "modal-footer tw-px-6 tw-py-4" }, modalFooter ??
14090
14050
  React.createElement("div", { className: "tw-flex tw-w-full tw-justify-between", "data-testid": "modalFooter" },
14091
14051
  React.createElement("div", { className: "tw-flex tw-justify-start" }, customButton &&
14092
- React.createElement(Button, { label: customButtonLabel, onClick: onClickCustomButton, disabled: disableCustomButton, extraClassNames: "tw-justify-start tw-w-24", testId: "customButton", variant: customButtonVariant })),
14052
+ React.createElement(Button, { label: customButtonLabel, onClick: onClickCustomButton, disabled: disableCustomButton, extraClassNames: "tw-justify-start tw-min-w-[100px]", testId: "customButton", variant: customButtonVariant })),
14093
14053
  React.createElement("div", { className: "tw-flex tw-justify-end" },
14094
14054
  React.createElement("div", { className: "tw-flex tw-items-center" }, middleFooterSection),
14095
14055
  !hideCancelButton &&
14096
14056
  React.createElement(DialogClose, { asChild: true },
14097
- React.createElement(Button, { label: cancelButtonLabel, extraClassNames: "tw-mr-2 tw-w-24", tooltip: cancelButtonTooltip, variant: "outline", stopPropagation: false, testId: "cancelButton" })),
14057
+ React.createElement(Button, { label: cancelButtonLabel, extraClassNames: "tw-mr-5 tw-min-w-[100px]", tooltip: cancelButtonTooltip, variant: "outline", stopPropagation: false, testId: "cancelButton" })),
14098
14058
  !hideSubmitButton &&
14099
- React.createElement(Button, { label: submitButtonLabel, onClick: onSubmit, disabled: disableSubmitButton, variant: "theme", stopPropagation: stopPropagationSubmitButton, tooltip: submitButtonTooltip, testId: "submitButton", extraClassNames: "tw-w-24" }))))))) : React.createElement(React.Fragment, null);
14059
+ React.createElement(Button, { label: submitButtonLabel, onClick: onSubmit, disabled: disableSubmitButton, variant: "theme", stopPropagation: stopPropagationSubmitButton, tooltip: submitButtonTooltip, testId: "submitButton", extraClassNames: "tw-min-w-[100px]" }))))))) : React.createElement(React.Fragment, null);
14100
14060
  };
14101
14061
 
14102
14062
  // We have resorted to returning slots directly rather than exposing primitives that can then