@seeqdev/qomponents 0.0.121 → 0.0.123
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.
|
@@ -8,7 +8,8 @@ interface AppendedButtonProps {
|
|
|
8
8
|
variant: 'button';
|
|
9
9
|
/** The properties for the button */
|
|
10
10
|
buttonProps: ButtonProps & {
|
|
11
|
-
|
|
11
|
+
value: string;
|
|
12
|
+
isActive?: boolean;
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
@@ -32,8 +33,6 @@ export interface ButtonGroupProps extends TooltipComponentProps {
|
|
|
32
33
|
buttons: Props[];
|
|
33
34
|
id?: string;
|
|
34
35
|
extraClassNames?: string;
|
|
35
|
-
name?: string;
|
|
36
|
-
value?: string;
|
|
37
36
|
onChange?: (value: string) => void;
|
|
38
37
|
testId?: string;
|
|
39
38
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -13775,7 +13775,7 @@ const DialogTitle = React__default.forwardRef((props, ref) => React__default.cre
|
|
|
13775
13775
|
DialogTitle.displayName = $5d3850c4d0b4e6c7$export$f99233281efd08a0.displayName;
|
|
13776
13776
|
const DialogDescription = React__default.forwardRef((props, ref) => React__default.createElement($5d3850c4d0b4e6c7$export$393edc798c47379d, { ref: ref, ...props }));
|
|
13777
13777
|
DialogDescription.displayName = $5d3850c4d0b4e6c7$export$393edc798c47379d.displayName;
|
|
13778
|
-
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', submitButtonVariant = 'theme', keepFocusInsideModal = true, onPointerDownOutside, }) => {
|
|
13778
|
+
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', submitButtonVariant = 'theme', keepFocusInsideModal = true, onPointerDownOutside, onInteractOutside, }) => {
|
|
13779
13779
|
const [isLoading, setIsLoading] = useState(false);
|
|
13780
13780
|
// the Dialog is adding pointerEvents: none to body and the dropdowns from the modal does not work anymore
|
|
13781
13781
|
useEffect(() => {
|
|
@@ -13823,7 +13823,7 @@ const Modal = ({ titleIcon, title = 'Modal title example', titleSuffixLabel, sub
|
|
|
13823
13823
|
titleIcon && titleIconPosition === 'right' ? React__default.createElement("div", { className: "tw-flex tw-ml-4" }, titleIconElement) : React__default.createElement(React__default.Fragment, null)));
|
|
13824
13824
|
};
|
|
13825
13825
|
return open ? (React__default.createElement(Dialog, { open: true, onOpenChange: onClose, modal: keepFocusInsideModal },
|
|
13826
|
-
React__default.createElement(DialogContent, { onPointerDownOutside: (e) => (onPointerDownOutside ? 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`, {
|
|
13826
|
+
React__default.createElement(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-p-0 tw-border-none tw-shadow-none dark:tw-text-sq-dark-text !tw-gap-0`, {
|
|
13827
13827
|
'tw-max-w-xs': size === 'xs',
|
|
13828
13828
|
'tw-max-w-sm': size === 'sm',
|
|
13829
13829
|
'tw-max-w-md': size === 'md',
|
|
@@ -20712,12 +20712,12 @@ const activeClassesByVariantDarkTheme = {
|
|
|
20712
20712
|
* ButtonGroup.
|
|
20713
20713
|
*/
|
|
20714
20714
|
const ButtonGroup = (props) => {
|
|
20715
|
-
const { id, extraClassNames,
|
|
20715
|
+
const { id, extraClassNames, testId, onChange, buttons = [], ...tooltipProps } = props;
|
|
20716
20716
|
const tooltipData = getQTipData(tooltipProps);
|
|
20717
20717
|
const appliedClasses = `${baseClasses} ${extraClassNames}`;
|
|
20718
|
-
return (React__default.createElement("div", { id: `button-group-${id
|
|
20718
|
+
return (React__default.createElement("div", { id: id ? `button-group-${id}` : undefined, "data-testid": testId, className: appliedClasses, ...tooltipData }, buttons.filter(Boolean).map((item, index) => item?.variant === 'button' ? (React__default.createElement(Button, { key: index, ...item.buttonProps, extraClassNames: `tw-ml-[-1px] focus:tw-z-40 tw-outline-none focus:tw-border tw-rounded-r-none tw-rounded-l-none last:tw-rounded-r-sm first:tw-rounded-l-sm ${item.buttonProps?.isActive
|
|
20719
20719
|
? `${activeClassesByVariantLightTheme[item?.buttonProps?.variant ?? 'outline']} ${activeClassesByVariantDarkTheme[item?.buttonProps?.variant ?? 'outline']} `
|
|
20720
|
-
: ''} ${item.buttonProps.extraClassNames}`, onClick: () => onChange && onChange(item?.buttonProps?.
|
|
20720
|
+
: ''} ${item.buttonProps.extraClassNames}`, onClick: () => onChange && onChange(item?.buttonProps?.value) })) : (React__default.createElement("div", { key: index, className: ` tw-flex tw-items-center tw-justify-center tw-rounded-none tw-ml-[-1px] active:tw-z-30 ${item?.extraClassNames || ''}` }, item?.element)))));
|
|
20721
20721
|
};
|
|
20722
20722
|
|
|
20723
20723
|
export { Accordion, Alert, Button, ButtonGroup, ButtonWithDropdown, ButtonWithPopover, Checkbox, Collapse, Icon, InputGroup, Modal, ProgressBar, QTip, SeeqActionDropdown, Select, components as SelectCompoents, Slider, Tabs, TextArea, TextField, ToolbarButton, Tooltip };
|