@redsift/products 11.6.0-muiv5-alpha.4 → 11.6.0-muiv5-alpha.6
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/{components/radar-button → _internal}/RadarButton.d.ts +1 -1
- package/{components/radar-button → _internal}/RadarButton.js +2 -2
- package/_internal/RadarButton.js.map +1 -0
- package/{components/radar-item → _internal}/RadarItem.d.ts +1 -1
- package/{components/radar-item → _internal}/RadarItem.js +2 -2
- package/_internal/RadarItem.js.map +1 -0
- package/_internal/RadarSimpleDialog.d.ts +104 -0
- package/_internal/RadarSimpleDialog.js +8810 -0
- package/_internal/RadarSimpleDialog.js.map +1 -0
- package/{components/radar-menu-button/RadarMenuButton.d.ts → _internal/RadarSimpleMenuButton.d.ts} +11 -2
- package/{components/radar-menu-button/RadarMenuButton.js → _internal/RadarSimpleMenuButton.js} +39 -3
- package/_internal/RadarSimpleMenuButton.js.map +1 -0
- package/{_virtual → _internal}/_rollupPluginBabelHelpers.js +1 -1
- package/_internal/radar-button.d.ts +2 -0
- package/_internal/radar-button.js +2 -0
- package/_internal/radar-button.js.map +1 -0
- package/_internal/radar-dialog.d.ts +38 -0
- package/_internal/radar-dialog.js +2 -0
- package/_internal/radar-dialog.js.map +1 -0
- package/_internal/radar-item.d.ts +3 -0
- package/_internal/radar-item.js +2 -0
- package/_internal/radar-item.js.map +1 -0
- package/_internal/radar-menu-button.d.ts +4 -0
- package/_internal/radar-menu-button.js +2 -0
- package/_internal/radar-menu-button.js.map +1 -0
- package/{components/radar/index.d.ts → _internal/radar.d.ts} +1 -6
- package/_internal/radar.js +23 -0
- package/_internal/radar.js.map +1 -0
- package/index.d.ts +8 -5
- package/index.js +4 -5
- package/index.js.map +1 -1
- package/package.json +5 -5
- package/_virtual/jsx-runtime.js +0 -4
- package/_virtual/jsx-runtime.js.map +0 -1
- package/_virtual/react-jsx-runtime.development.js +0 -4
- package/_virtual/react-jsx-runtime.development.js.map +0 -1
- package/_virtual/react-jsx-runtime.production.min.js +0 -4
- package/_virtual/react-jsx-runtime.production.min.js.map +0 -1
- package/components/radar/index.js +0 -25
- package/components/radar/index.js.map +0 -1
- package/components/radar-button/RadarButton.js.map +0 -1
- package/components/radar-dialog/PulsedRadarImage.js +0 -437
- package/components/radar-dialog/PulsedRadarImage.js.map +0 -1
- package/components/radar-dialog/RadarDialog.js +0 -146
- package/components/radar-dialog/RadarDialog.js.map +0 -1
- package/components/radar-dialog/RadarSimpleDialog.d.ts +0 -15
- package/components/radar-dialog/RadarSimpleDialog.js +0 -23
- package/components/radar-dialog/RadarSimpleDialog.js.map +0 -1
- package/components/radar-dialog/ScatterGrid.js +0 -1548
- package/components/radar-dialog/ScatterGrid.js.map +0 -1
- package/components/radar-item/RadarItem.js.map +0 -1
- package/components/radar-menu-button/RadarMenuButton.js.map +0 -1
- package/components/radar-menu-button/RadarSimpleMenuButton.d.ts +0 -13
- package/components/radar-menu-button/RadarSimpleMenuButton.js +0 -42
- package/components/radar-menu-button/RadarSimpleMenuButton.js.map +0 -1
- package/packages/popovers/src/components/dialog/Dialog.js +0 -56
- package/packages/popovers/src/components/dialog/Dialog.js.map +0 -1
- package/packages/popovers/src/components/dialog/context.js +0 -6
- package/packages/popovers/src/components/dialog/context.js.map +0 -1
- package/packages/popovers/src/components/dialog/types.js +0 -20
- package/packages/popovers/src/components/dialog/types.js.map +0 -1
- package/packages/popovers/src/components/dialog/useDialog.js +0 -95
- package/packages/popovers/src/components/dialog/useDialog.js.map +0 -1
- package/packages/popovers/src/components/dialog/useDialogContext.js +0 -13
- package/packages/popovers/src/components/dialog/useDialogContext.js.map +0 -1
- package/packages/popovers/src/components/dialog-content/DialogContent.js +0 -97
- package/packages/popovers/src/components/dialog-content/DialogContent.js.map +0 -1
- package/packages/popovers/src/components/dialog-content/intl/en-US.json.js +0 -7
- package/packages/popovers/src/components/dialog-content/intl/en-US.json.js.map +0 -1
- package/packages/popovers/src/components/dialog-content/intl/fr-FR.json.js +0 -7
- package/packages/popovers/src/components/dialog-content/intl/fr-FR.json.js.map +0 -1
- package/packages/popovers/src/components/dialog-content/intl/index.js +0 -10
- package/packages/popovers/src/components/dialog-content/intl/index.js.map +0 -1
- package/packages/popovers/src/components/dialog-content/styles.js +0 -77
- package/packages/popovers/src/components/dialog-content/styles.js.map +0 -1
- package/packages/popovers/src/components/dialog-content-actions/DialogContentActions.js +0 -38
- package/packages/popovers/src/components/dialog-content-actions/DialogContentActions.js.map +0 -1
- package/packages/popovers/src/components/dialog-content-actions/styles.js +0 -20
- package/packages/popovers/src/components/dialog-content-actions/styles.js.map +0 -1
- package/packages/popovers/src/components/dialog-content-body/DialogContentBody.js +0 -49
- package/packages/popovers/src/components/dialog-content-body/DialogContentBody.js.map +0 -1
- package/packages/popovers/src/components/dialog-content-body/styles.js +0 -65
- package/packages/popovers/src/components/dialog-content-body/styles.js.map +0 -1
- package/packages/popovers/src/components/dialog-content-header/DialogContentHeader.js +0 -86
- package/packages/popovers/src/components/dialog-content-header/DialogContentHeader.js.map +0 -1
- package/packages/popovers/src/components/dialog-content-header/styles.js +0 -31
- package/packages/popovers/src/components/dialog-content-header/styles.js.map +0 -1
- package/packages/popovers/src/components/dialog-trigger/DialogTrigger.js +0 -47
- package/packages/popovers/src/components/dialog-trigger/DialogTrigger.js.map +0 -1
- package/popovers/src/components/dialog/types.d.ts +0 -50
- package/popovers/src/components/dialog-content/types.d.ts +0 -12
- package/popovers/src/components/dialog-content-body/types.d.ts +0 -12
- package/popovers/src/components/dialog-content-header/types.d.ts +0 -27
- package/popovers/src/components/dialog-trigger/types.d.ts +0 -10
- /package/{_virtual → _internal}/_rollupPluginBabelHelpers.js.map +0 -0
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { objectSpread2 as _objectSpread2 } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import React__default, { forwardRef } from 'react';
|
|
3
|
-
import { useMergeRefs } from '../../../../../node_modules/@floating-ui/react/dist/floating-ui.react.mjs.js';
|
|
4
|
-
import { isComponent } from '@redsift/design-system';
|
|
5
|
-
import classNames from 'classnames';
|
|
6
|
-
import { useDialogContext } from '../dialog/useDialogContext.js';
|
|
7
|
-
|
|
8
|
-
const COMPONENT_NAME = 'DialogTrigger';
|
|
9
|
-
const CLASSNAME = 'redsift-dialog-trigger';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* The DialogTrigger component.
|
|
13
|
-
*/
|
|
14
|
-
const DialogTrigger = /*#__PURE__*/forwardRef((props, ref) => {
|
|
15
|
-
const {
|
|
16
|
-
children
|
|
17
|
-
} = props;
|
|
18
|
-
const {
|
|
19
|
-
getReferenceProps,
|
|
20
|
-
isOpen,
|
|
21
|
-
handleOpen,
|
|
22
|
-
refs,
|
|
23
|
-
triggerClassName,
|
|
24
|
-
color
|
|
25
|
-
} = useDialogContext();
|
|
26
|
-
const childrenRef = children === null || children === void 0 ? void 0 : children.ref;
|
|
27
|
-
const triggerRef = useMergeRefs([refs.setReference, ref, childrenRef]);
|
|
28
|
-
if (isComponent('Button')(children) || isComponent('IconButton')(children) || isComponent('LinkButton')(children) || isComponent('Checkbox')(children) || isComponent('Switch')(children) || isComponent('Radio')(children) || isComponent('Item')(children)) {
|
|
29
|
-
var _children$props$child;
|
|
30
|
-
return /*#__PURE__*/React__default.cloneElement(children, _objectSpread2(_objectSpread2({}, getReferenceProps(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
31
|
-
ref: triggerRef
|
|
32
|
-
}, props), children.props), {}, {
|
|
33
|
-
children: (_children$props$child = children.props.children) !== null && _children$props$child !== void 0 ? _children$props$child : ''
|
|
34
|
-
}))), {}, {
|
|
35
|
-
onClick: props.onClick ? props.onClick : () => handleOpen(!isOpen),
|
|
36
|
-
isActive: isOpen,
|
|
37
|
-
className: classNames(children.props.className, triggerClassName),
|
|
38
|
-
color: color !== null && color !== void 0 ? color : children.props.color
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, children);
|
|
42
|
-
});
|
|
43
|
-
DialogTrigger.className = CLASSNAME;
|
|
44
|
-
DialogTrigger.displayName = COMPONENT_NAME;
|
|
45
|
-
|
|
46
|
-
export { DialogTrigger };
|
|
47
|
-
//# sourceMappingURL=DialogTrigger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DialogTrigger.js","sources":["../../../../../../../popovers/src/components/dialog-trigger/DialogTrigger.tsx"],"sourcesContent":["import React, { forwardRef, ReactElement } from 'react';\nimport { useMergeRefs } from '@floating-ui/react';\n\nimport { Comp, isComponent } from '@redsift/design-system';\nimport { useDialogContext } from '../dialog';\nimport { DialogTriggerProps } from './types';\nimport classNames from 'classnames';\n\nconst COMPONENT_NAME = 'DialogTrigger';\nconst CLASSNAME = 'redsift-dialog-trigger';\n\n/**\n * The DialogTrigger component.\n */\nexport const DialogTrigger: Comp<DialogTriggerProps, HTMLButtonElement> = forwardRef((props, ref) => {\n const { children } = props;\n\n const { getReferenceProps, isOpen, handleOpen, refs, triggerClassName, color } = useDialogContext();\n const childrenRef = (children as any)?.ref;\n const triggerRef = useMergeRefs([refs.setReference, ref, childrenRef]);\n\n if (\n isComponent('Button')(children) ||\n isComponent('IconButton')(children) ||\n isComponent('LinkButton')(children) ||\n isComponent('Checkbox')(children) ||\n isComponent('Switch')(children) ||\n isComponent('Radio')(children) ||\n isComponent('Item')(children)\n ) {\n return React.cloneElement(children as ReactElement, {\n ...getReferenceProps({\n ref: triggerRef,\n ...props,\n ...children.props,\n children: children.props.children ?? '',\n }),\n onClick: props.onClick ? props.onClick : () => handleOpen(!isOpen),\n isActive: isOpen,\n className: classNames((children as ReactElement).props.className, triggerClassName),\n color: color ?? children.props.color,\n });\n }\n\n return <>{children}</>;\n});\nDialogTrigger.className = CLASSNAME;\nDialogTrigger.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","DialogTrigger","forwardRef","props","ref","children","getReferenceProps","isOpen","handleOpen","refs","triggerClassName","color","useDialogContext","childrenRef","triggerRef","useMergeRefs","setReference","isComponent","_children$props$child","React","cloneElement","_objectSpread","onClick","isActive","className","classNames","createElement","Fragment","displayName"],"mappings":";;;;;;;AAQA,MAAMA,cAAc,GAAG,eAAe,CAAA;AACtC,MAAMC,SAAS,GAAG,wBAAwB,CAAA;;AAE1C;AACA;AACA;AACO,MAAMC,aAA0D,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACnG,MAAM;AAAEC,IAAAA,QAAAA;AAAS,GAAC,GAAGF,KAAK,CAAA;EAE1B,MAAM;IAAEG,iBAAiB;IAAEC,MAAM;IAAEC,UAAU;IAAEC,IAAI;IAAEC,gBAAgB;AAAEC,IAAAA,KAAAA;GAAO,GAAGC,gBAAgB,EAAE,CAAA;EACnG,MAAMC,WAAW,GAAIR,QAAQ,KAAA,IAAA,IAARA,QAAQ,KAARA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,QAAQ,CAAUD,GAAG,CAAA;AAC1C,EAAA,MAAMU,UAAU,GAAGC,YAAY,CAAC,CAACN,IAAI,CAACO,YAAY,EAAEZ,GAAG,EAAES,WAAW,CAAC,CAAC,CAAA;EAEtE,IACEI,WAAW,CAAC,QAAQ,CAAC,CAACZ,QAAQ,CAAC,IAC/BY,WAAW,CAAC,YAAY,CAAC,CAACZ,QAAQ,CAAC,IACnCY,WAAW,CAAC,YAAY,CAAC,CAACZ,QAAQ,CAAC,IACnCY,WAAW,CAAC,UAAU,CAAC,CAACZ,QAAQ,CAAC,IACjCY,WAAW,CAAC,QAAQ,CAAC,CAACZ,QAAQ,CAAC,IAC/BY,WAAW,CAAC,OAAO,CAAC,CAACZ,QAAQ,CAAC,IAC9BY,WAAW,CAAC,MAAM,CAAC,CAACZ,QAAQ,CAAC,EAC7B;AAAA,IAAA,IAAAa,qBAAA,CAAA;AACA,IAAA,oBAAOC,cAAK,CAACC,YAAY,CAACf,QAAQ,EAAAg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are const DialogSize: {
|
|
8
|
-
readonly small: "small";
|
|
9
|
-
readonly medium: "medium";
|
|
10
|
-
readonly large: "large";
|
|
11
|
-
readonly xlarge: "xlarge";
|
|
12
|
-
};
|
|
13
|
-
type DialogSize = ValueOf<typeof DialogSize>;
|
|
14
|
-
/**
|
|
15
|
-
* Component props.
|
|
16
|
-
*/
|
|
17
|
-
interface DialogProps {
|
|
18
|
-
/** Button color that will be forward to the trigger. */
|
|
19
|
-
color?: ButtonColor;
|
|
20
|
-
/** Children. Can only be DialogTrigger and DialogContent. */
|
|
21
|
-
children: ReactNode;
|
|
22
|
-
/**
|
|
23
|
-
* Default open status.
|
|
24
|
-
* Used for uncontrolled version.
|
|
25
|
-
*/
|
|
26
|
-
defaultOpen?: boolean;
|
|
27
|
-
/** Whether the Close icon button is displayed or not. */
|
|
28
|
-
hasCloseButton?: boolean;
|
|
29
|
-
/** Which element to initially focus. Can be either a number (tabbable index), a ref to en element, or a shortcut pointing towards a section of the dialog. See the accessibility section in the documentation to know which one to use. */
|
|
30
|
-
initialFocus?: number | React.MutableRefObject<HTMLElement | null> | 'header' | 'body' | 'actions';
|
|
31
|
-
/**
|
|
32
|
-
* Whether the component is opened or not.
|
|
33
|
-
* Used for controlled version.
|
|
34
|
-
*/
|
|
35
|
-
isOpen?: boolean;
|
|
36
|
-
/** Method to handle component change. */
|
|
37
|
-
onOpen?: (open: boolean) => void;
|
|
38
|
-
/** Dialog size. */
|
|
39
|
-
size?: DialogSize | {
|
|
40
|
-
width?: string;
|
|
41
|
-
maxWidth?: string;
|
|
42
|
-
minWidth?: string;
|
|
43
|
-
};
|
|
44
|
-
/** Theme. */
|
|
45
|
-
theme?: Theme;
|
|
46
|
-
/** Class name to append to the trigger. */
|
|
47
|
-
triggerClassName?: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { DialogProps, DialogSize };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Theme } from '@redsift/design-system';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Component props.
|
|
6
|
-
*/
|
|
7
|
-
interface DialogContentProps extends ComponentProps<'div'> {
|
|
8
|
-
/** Theme. */
|
|
9
|
-
theme?: Theme;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { DialogContentProps };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { ContainerProps, Theme } from '@redsift/design-system';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Component props.
|
|
6
|
-
*/
|
|
7
|
-
interface DialogContentBodyProps extends ComponentProps<'div'>, ContainerProps {
|
|
8
|
-
/** Theme. */
|
|
9
|
-
theme?: Theme;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { DialogContentBodyProps };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { HeadingProps, IconProps, Theme } from '@redsift/design-system';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Component props.
|
|
6
|
-
*/
|
|
7
|
-
interface DialogContentHeaderProps extends ComponentProps<'div'> {
|
|
8
|
-
/** Header. */
|
|
9
|
-
header?: string;
|
|
10
|
-
/** Heading props allowing to override the component rendered by the heading without changing its style. */
|
|
11
|
-
headingProps?: Pick<HeadingProps, 'as' | 'noWrap' | 'variant'>;
|
|
12
|
-
/** Subheader */
|
|
13
|
-
subheader?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
16
|
-
* Can also be a ReactElement.
|
|
17
|
-
*/
|
|
18
|
-
icon?: IconProps['icon'];
|
|
19
|
-
/** Custom props to pass to the Icon component. */
|
|
20
|
-
iconProps?: Omit<IconProps, 'ref' | 'icon'>;
|
|
21
|
-
/** Whether the card is loading or not. */
|
|
22
|
-
isLoading?: boolean;
|
|
23
|
-
/** Theme. */
|
|
24
|
-
theme?: Theme;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { DialogContentHeaderProps };
|
|
File without changes
|