@seeqdev/qomponents 0.0.46 → 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/Button/Button.js +1 -1
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/Button.types.js.map +1 -1
- package/dist/FontCustom.woff +0 -0
- package/dist/FontCustom.woff2 +0 -0
- package/dist/Icon/Icon.stories.js +2 -2
- package/dist/Icon/Icon.stories.js.map +1 -1
- package/dist/Modal/Modal.js +103 -0
- package/dist/Modal/Modal.js.map +1 -0
- package/dist/Modal/Modal.stories.js +176 -0
- package/dist/Modal/Modal.stories.js.map +1 -0
- package/dist/Modal/Modal.test.js +108 -0
- package/dist/Modal/Modal.test.js.map +1 -0
- package/dist/Modal/Modal.types.js +2 -0
- package/dist/Modal/Modal.types.js.map +1 -0
- package/dist/Modal/index.js +2 -0
- package/dist/Modal/index.js.map +1 -0
- package/dist/Tabs/Tabs.js +4 -5
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.stories.js +31 -3
- package/dist/Tabs/Tabs.stories.js.map +1 -1
- package/dist/Tabs/Tabs.types.d.ts +5 -3
- package/dist/TextField/TextField.js +2 -2
- package/dist/TextField/TextField.js.map +1 -1
- package/dist/index.esm.js +9 -50
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -50
- package/dist/index.js.map +1 -1
- package/dist/styles.css +234 -182
- package/package.json +1 -1
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(
|
|
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:
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
@@ -14559,14 +14519,14 @@ const $69cb30bb0017df05$export$54c2e3dc7acea9f5 = $69cb30bb0017df05$export$9712d
|
|
|
14559
14519
|
const $69cb30bb0017df05$export$41fb9f06171c75f4 = $69cb30bb0017df05$export$8114b9fdfdf9f3ba;
|
|
14560
14520
|
const $69cb30bb0017df05$export$7c6e2c02157bb7d2 = $69cb30bb0017df05$export$bd905d70e8fd2ebb;
|
|
14561
14521
|
|
|
14562
|
-
const Tabs = ({ tabs, defaultActiveTab, activeTab, onTabSelect, extraClassNames, testId, id, }) => {
|
|
14522
|
+
const Tabs = ({ tabs, defaultActiveTab, activeTab, onTabSelect, extraClassNames, testId, id, stretchTabs = false, }) => {
|
|
14563
14523
|
const handleTabSelect = (tabId) => {
|
|
14564
14524
|
if (activeTab === tabId)
|
|
14565
14525
|
return;
|
|
14566
14526
|
onTabSelect && onTabSelect(tabId);
|
|
14567
14527
|
};
|
|
14568
|
-
return (React.createElement($69cb30bb0017df05$export$be92b6f5f03c0fe9, { className: `tw-flex tw-flex-col tw-min-w-[300px] ${extraClassNames || ''}`, defaultValue: defaultActiveTab, "data-testid": testId, id: id, value: activeTab, onValueChange: handleTabSelect },
|
|
14569
|
-
React.createElement($69cb30bb0017df05$export$54c2e3dc7acea9f5, { className: `tw-
|
|
14528
|
+
return (React.createElement($69cb30bb0017df05$export$be92b6f5f03c0fe9, { className: `tw-flex tw-flex-col tw-min-w-[300px] tw-max-w-full h-full ${extraClassNames || ''}`, defaultValue: defaultActiveTab, "data-testid": testId, id: id, value: activeTab, onValueChange: handleTabSelect },
|
|
14529
|
+
React.createElement($69cb30bb0017df05$export$54c2e3dc7acea9f5, { className: `tw-flex tw-flex-row tw-flex-wrap tw-z-[1001]` }, tabs.map(({ id, icon, label, tabExtraClassNames, testId: tabsTestId, disabled }, index) => (React.createElement($69cb30bb0017df05$export$41fb9f06171c75f4, { className: `tw-bg-sq-white dark:tw-bg-sq-dark-background tw-h-[45px] tw-min-w-[100px] tw-px-4 tw-border-solid dark:tw-border-gray-700 tw-flex tw-flex-1 tw-justify-center tw-items-center tw-border-r-[2px] last:tw-border-r-0 ${stretchTabs ? '' : 'tw-max-w-max tw-min-w-fit'} ${tabExtraClassNames || ''} ${activeTab === id
|
|
14570
14530
|
? 'tw-border-b-sq-color-dark dark:tw-border-b-sq-color-dark tw-border-b-[3px]'
|
|
14571
14531
|
: 'hover:tw-bg-sq-light-gray tw-border-b-[1px] hover:dark:tw-bg-gray-700'}`, "data-testid": tabsTestId, disabled: disabled, key: `${label}-${id}-${index}`, value: id },
|
|
14572
14532
|
React.createElement("span", null,
|
|
@@ -14574,8 +14534,7 @@ const Tabs = ({ tabs, defaultActiveTab, activeTab, onTabSelect, extraClassNames,
|
|
|
14574
14534
|
React.createElement("span", { className: `tw-text-[14px] tw-font-medium ${activeTab === id
|
|
14575
14535
|
? 'dark:tw-text-sq-dark-text tw-text-gray-500'
|
|
14576
14536
|
: 'dark:tw-text-sq-color-dark-dark tw-text-sq-color-dark'}` }, label)))))),
|
|
14577
|
-
tabs.map((tab, index) => (React.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2, { key: `${tab.label}_${index}_content`, value: tab.id },
|
|
14578
|
-
React.createElement("div", { className: "tw-bg-sq-white dark:tw-bg-sq-dark-background tw-p-4" }, tab.content))))));
|
|
14537
|
+
tabs.map((tab, index) => (React.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2, { className: `tw-bg-sq-white dark:tw-bg-sq-dark-background tw-h-full tw-overflow-y-auto -tw-mt-[1px] tw-border-t-[1px] tw-z-[500] ${tab.tabContentExtraClassNames || ''}`, key: `${tab.label}_${index}_content`, value: tab.id }, tab.content)))));
|
|
14579
14538
|
};
|
|
14580
14539
|
|
|
14581
14540
|
exports.Button = Button;
|