@seeqdev/qomponents 0.0.51 → 0.0.53
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/Modal/Modal.types.d.ts +1 -0
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/styles.css +4 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -13966,7 +13966,7 @@ const DialogTitle = React__default.forwardRef(({ className, ...props }, ref) =>
|
|
|
13966
13966
|
DialogTitle.displayName = $5d3850c4d0b4e6c7$export$f99233281efd08a0.displayName;
|
|
13967
13967
|
const DialogDescription = React__default.forwardRef(({ className, ...props }, ref) => (React__default.createElement($5d3850c4d0b4e6c7$export$393edc798c47379d, { ref: ref, className: `text-sm text-muted-foreground ${className}`, ...props })));
|
|
13968
13968
|
DialogDescription.displayName = $5d3850c4d0b4e6c7$export$393edc798c47379d.displayName;
|
|
13969
|
-
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 = React__default.createElement(React__default.Fragment, null), customButtonVariant = 'outline', }) => {
|
|
13969
|
+
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 = React__default.createElement(React__default.Fragment, null), customButtonVariant = 'outline', keepFocusInsideModal = true, }) => {
|
|
13970
13970
|
// the Dialog is adding pointerEvents: none to body and the dropdowns from the modal does not work anymore
|
|
13971
13971
|
useEffect(() => {
|
|
13972
13972
|
if (open) {
|
|
@@ -14008,7 +14008,7 @@ const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, sub
|
|
|
14008
14008
|
titleIcon && titleIconPosition === 'right' ?
|
|
14009
14009
|
React__default.createElement("div", { className: "tw-flex tw-ml-4" }, titleIconElement) : React__default.createElement(React__default.Fragment, null)));
|
|
14010
14010
|
};
|
|
14011
|
-
return open ? (React__default.createElement(Dialog, { open: true, onOpenChange: onClose, modal:
|
|
14011
|
+
return open ? (React__default.createElement(Dialog, { open: true, onOpenChange: onClose, modal: keepFocusInsideModal },
|
|
14012
14012
|
React__default.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`, {
|
|
14013
14013
|
'tw-max-w-xs': size === 'xs',
|
|
14014
14014
|
'tw-max-w-sm': size === 'sm',
|
|
@@ -14505,7 +14505,7 @@ const Tabs = ({ tabs, defaultActiveTab, activeTab, onTabSelect, extraClassNames,
|
|
|
14505
14505
|
return;
|
|
14506
14506
|
onTabSelect && onTabSelect(tabId);
|
|
14507
14507
|
};
|
|
14508
|
-
return (React__default.createElement($69cb30bb0017df05$export$be92b6f5f03c0fe9, { className: `tw-flex tw-flex-col tw-min-w-[300px] tw-max-w-full
|
|
14508
|
+
return (React__default.createElement($69cb30bb0017df05$export$be92b6f5f03c0fe9, { className: `tw-flex tw-flex-col tw-min-w-[300px] tw-max-w-full tw-flex-grow ${extraClassNames || ''}`, defaultValue: defaultActiveTab, "data-testid": testId, id: id, value: activeTab, onValueChange: handleTabSelect },
|
|
14509
14509
|
React__default.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__default.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
|
|
14510
14510
|
? 'tw-border-b-sq-color-dark dark:tw-border-b-sq-color-dark tw-border-b-[3px]'
|
|
14511
14511
|
: '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 },
|
|
@@ -14514,7 +14514,7 @@ const Tabs = ({ tabs, defaultActiveTab, activeTab, onTabSelect, extraClassNames,
|
|
|
14514
14514
|
React__default.createElement("span", { className: `tw-text-[14px] tw-font-medium ${activeTab === id
|
|
14515
14515
|
? 'dark:tw-text-sq-dark-text tw-text-gray-500'
|
|
14516
14516
|
: 'dark:tw-text-sq-color-dark-dark tw-text-sq-color-dark'}` }, label)))))),
|
|
14517
|
-
tabs.map((tab, index) => (React__default.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2, { className: `tw-bg-sq-white dark:tw-bg-sq-dark-background tw-
|
|
14517
|
+
tabs.map((tab, index) => (React__default.createElement($69cb30bb0017df05$export$7c6e2c02157bb7d2, { className: `tw-bg-sq-white dark:tw-bg-sq-dark-background tw-overflow-y-auto -tw-mt-[1px] tw-border-t-[1px] tw-z-[500] tw-flex tw-flex-col tw-flex-grow ${tab.tabContentExtraClassNames || ''}`, key: `${tab.label}_${index}_content`, value: tab.id }, tab.content)))));
|
|
14518
14518
|
};
|
|
14519
14519
|
|
|
14520
14520
|
export { Button, Checkbox, Icon, Modal, QTip, Select, Tabs, TextArea, TextField, ToolbarButton, Tooltip };
|