@redsift/products 11.6.0-alpha.0 → 11.6.0-muiv5-alpha.1
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/{_internal → _virtual}/_rollupPluginBabelHelpers.js +1 -1
- package/_virtual/jsx-runtime.js +4 -0
- package/_virtual/jsx-runtime.js.map +1 -0
- package/_virtual/react-jsx-runtime.development.js +4 -0
- package/_virtual/react-jsx-runtime.development.js.map +1 -0
- package/_virtual/react-jsx-runtime.production.min.js +4 -0
- package/_virtual/react-jsx-runtime.production.min.js.map +1 -0
- package/components/radar/index.d.ts +55 -0
- package/components/radar/index.js +25 -0
- package/components/radar/index.js.map +1 -0
- package/components/radar-button/RadarButton.d.ts +8 -0
- package/{_internal → components/radar-button}/RadarButton.js +2 -2
- package/components/radar-button/RadarButton.js.map +1 -0
- package/components/radar-dialog/PulsedRadarImage.js +437 -0
- package/components/radar-dialog/PulsedRadarImage.js.map +1 -0
- package/components/radar-dialog/RadarDialog.js +146 -0
- package/components/radar-dialog/RadarDialog.js.map +1 -0
- package/components/radar-dialog/RadarSimpleDialog.d.ts +15 -0
- package/components/radar-dialog/RadarSimpleDialog.js +23 -0
- package/components/radar-dialog/RadarSimpleDialog.js.map +1 -0
- package/components/radar-dialog/ScatterGrid.js +1548 -0
- package/components/radar-dialog/ScatterGrid.js.map +1 -0
- package/components/radar-item/RadarItem.d.ts +9 -0
- package/{_internal → components/radar-item}/RadarItem.js +2 -2
- package/components/radar-item/RadarItem.js.map +1 -0
- package/components/radar-menu-button/RadarMenuButton.d.ts +35 -0
- package/{_internal/RadarSimpleMenuButton.js → components/radar-menu-button/RadarMenuButton.js} +3 -39
- package/components/radar-menu-button/RadarMenuButton.js.map +1 -0
- package/components/radar-menu-button/RadarSimpleMenuButton.d.ts +13 -0
- package/components/radar-menu-button/RadarSimpleMenuButton.js +42 -0
- package/components/radar-menu-button/RadarSimpleMenuButton.js.map +1 -0
- package/index.d.ts +5 -199
- package/index.js +5 -4
- package/index.js.map +1 -1
- package/package.json +5 -5
- package/packages/popovers/src/components/dialog/Dialog.js +56 -0
- package/packages/popovers/src/components/dialog/Dialog.js.map +1 -0
- package/packages/popovers/src/components/dialog/context.js +6 -0
- package/packages/popovers/src/components/dialog/context.js.map +1 -0
- package/packages/popovers/src/components/dialog/types.js +20 -0
- package/packages/popovers/src/components/dialog/types.js.map +1 -0
- package/packages/popovers/src/components/dialog/useDialog.js +95 -0
- package/packages/popovers/src/components/dialog/useDialog.js.map +1 -0
- package/packages/popovers/src/components/dialog/useDialogContext.js +13 -0
- package/packages/popovers/src/components/dialog/useDialogContext.js.map +1 -0
- package/packages/popovers/src/components/dialog-content/DialogContent.js +97 -0
- package/packages/popovers/src/components/dialog-content/DialogContent.js.map +1 -0
- package/packages/popovers/src/components/dialog-content/intl/en-US.json.js +7 -0
- package/packages/popovers/src/components/dialog-content/intl/en-US.json.js.map +1 -0
- package/packages/popovers/src/components/dialog-content/intl/fr-FR.json.js +7 -0
- package/packages/popovers/src/components/dialog-content/intl/fr-FR.json.js.map +1 -0
- package/packages/popovers/src/components/dialog-content/intl/index.js +10 -0
- package/packages/popovers/src/components/dialog-content/intl/index.js.map +1 -0
- package/packages/popovers/src/components/dialog-content/styles.js +77 -0
- package/packages/popovers/src/components/dialog-content/styles.js.map +1 -0
- package/packages/popovers/src/components/dialog-content-actions/DialogContentActions.js +38 -0
- package/packages/popovers/src/components/dialog-content-actions/DialogContentActions.js.map +1 -0
- package/packages/popovers/src/components/dialog-content-actions/styles.js +20 -0
- package/packages/popovers/src/components/dialog-content-actions/styles.js.map +1 -0
- package/packages/popovers/src/components/dialog-content-body/DialogContentBody.js +49 -0
- package/packages/popovers/src/components/dialog-content-body/DialogContentBody.js.map +1 -0
- package/packages/popovers/src/components/dialog-content-body/styles.js +65 -0
- package/packages/popovers/src/components/dialog-content-body/styles.js.map +1 -0
- package/packages/popovers/src/components/dialog-content-header/DialogContentHeader.js +86 -0
- package/packages/popovers/src/components/dialog-content-header/DialogContentHeader.js.map +1 -0
- package/packages/popovers/src/components/dialog-content-header/styles.js +31 -0
- package/packages/popovers/src/components/dialog-content-header/styles.js.map +1 -0
- package/packages/popovers/src/components/dialog-trigger/DialogTrigger.js +47 -0
- package/packages/popovers/src/components/dialog-trigger/DialogTrigger.js.map +1 -0
- package/popovers/src/components/dialog/types.d.ts +50 -0
- package/popovers/src/components/dialog-content/types.d.ts +12 -0
- package/popovers/src/components/dialog-content-body/types.d.ts +12 -0
- package/popovers/src/components/dialog-content-header/types.d.ts +27 -0
- package/popovers/src/components/dialog-trigger/types.d.ts +10 -0
- package/_internal/RadarButton.js.map +0 -1
- package/_internal/RadarItem.js.map +0 -1
- package/_internal/RadarSimpleDialog.js +0 -8810
- package/_internal/RadarSimpleDialog.js.map +0 -1
- package/_internal/RadarSimpleMenuButton.js.map +0 -1
- package/_internal/radar-button.js +0 -2
- package/_internal/radar-button.js.map +0 -1
- package/_internal/radar-dialog.js +0 -2
- package/_internal/radar-dialog.js.map +0 -1
- package/_internal/radar-item.js +0 -2
- package/_internal/radar-item.js.map +0 -1
- package/_internal/radar-menu-button.js +0 -2
- package/_internal/radar-menu-button.js.map +0 -1
- package/_internal/radar.js +0 -23
- package/_internal/radar.js.map +0 -1
- /package/{_internal → _virtual}/_rollupPluginBabelHelpers.js.map +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { FloatingOverlay } from '../../../../../node_modules/@floating-ui/react/dist/floating-ui.react.mjs.js';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { baseContainer, Theme } from '@redsift/design-system';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Component style.
|
|
7
|
+
*/
|
|
8
|
+
const StyledDialogContent = styled.div`
|
|
9
|
+
${baseContainer}
|
|
10
|
+
${_ref => {
|
|
11
|
+
let {
|
|
12
|
+
$theme
|
|
13
|
+
} = _ref;
|
|
14
|
+
return css`
|
|
15
|
+
color: var(--redsift-color-neutral-${$theme === Theme.dark ? 'white' : 'x-dark-grey'});
|
|
16
|
+
background-color: var(--redsift-color-neutral-${$theme === Theme.dark ? 'black' : 'white'});
|
|
17
|
+
`;
|
|
18
|
+
}}
|
|
19
|
+
|
|
20
|
+
border-radius: 4px;
|
|
21
|
+
box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2);
|
|
22
|
+
display: flex;
|
|
23
|
+
filter: drop-shadow(0px 4px 5px rgba(0, 0, 0, 0.14)) drop-shadow(0px 1px 10px rgba(0, 0, 0, 0.12));
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
font-family: var(--redsift-typography-dialog-font-family);
|
|
26
|
+
font-size: var(--redsift-typography-dialog-font-size);
|
|
27
|
+
font-weight: var(--redsift-typography-dialog-font-weight);
|
|
28
|
+
line-height: var(--redsift-typography-dialog-line-height);
|
|
29
|
+
margin: 32px;
|
|
30
|
+
max-width: calc(100vw - 48px);
|
|
31
|
+
padding: 24px;
|
|
32
|
+
width: 540px;
|
|
33
|
+
z-index: var(--redsift-layout-z-index-dialog);
|
|
34
|
+
|
|
35
|
+
${_ref2 => {
|
|
36
|
+
let {
|
|
37
|
+
$width,
|
|
38
|
+
$maxWidth,
|
|
39
|
+
$minWidth
|
|
40
|
+
} = _ref2;
|
|
41
|
+
return css`
|
|
42
|
+
${$width !== undefined ? `width: ${$width};` : ''}
|
|
43
|
+
${$maxWidth !== undefined ? `min-width: ${$maxWidth};` : ''}
|
|
44
|
+
${$minWidth !== undefined ? `max-width: ${$minWidth};` : ''}
|
|
45
|
+
`;
|
|
46
|
+
}}
|
|
47
|
+
|
|
48
|
+
&:focus-visible {
|
|
49
|
+
outline: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.redsift-dialog-content__header {
|
|
53
|
+
align-items: flex-start;
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: space-between;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.redsift-card-header__icon-button {
|
|
59
|
+
margin-top: 8px;
|
|
60
|
+
margin-left: auto;
|
|
61
|
+
margin-right: 8px;
|
|
62
|
+
|
|
63
|
+
[dir='rtl'] & {
|
|
64
|
+
margin-left: 8px;
|
|
65
|
+
margin-right: auto;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
const StyledFloatingOverlay = styled(FloatingOverlay)`
|
|
70
|
+
background: rgba(0, 0, 0, 0.8);
|
|
71
|
+
display: grid;
|
|
72
|
+
place-items: center;
|
|
73
|
+
z-index: var(--redsift-layout-z-index-overlay);
|
|
74
|
+
`;
|
|
75
|
+
|
|
76
|
+
export { StyledDialogContent, StyledFloatingOverlay };
|
|
77
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../../../../popovers/src/components/dialog-content/styles.ts"],"sourcesContent":["import { FloatingOverlay } from '@floating-ui/react';\nimport styled, { css } from 'styled-components';\nimport { StyledDialogContentProps } from './types';\nimport { Theme, baseContainer } from '@redsift/design-system';\n\n/**\n * Component style.\n */\nexport const StyledDialogContent = styled.div<StyledDialogContentProps>`\n ${baseContainer}\n ${({ $theme }) => css`\n color: var(--redsift-color-neutral-${$theme === Theme.dark ? 'white' : 'x-dark-grey'});\n background-color: var(--redsift-color-neutral-${$theme === Theme.dark ? 'black' : 'white'});\n `}\n\n border-radius: 4px;\n box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2);\n display: flex;\n filter: drop-shadow(0px 4px 5px rgba(0, 0, 0, 0.14)) drop-shadow(0px 1px 10px rgba(0, 0, 0, 0.12));\n flex-direction: column;\n font-family: var(--redsift-typography-dialog-font-family);\n font-size: var(--redsift-typography-dialog-font-size);\n font-weight: var(--redsift-typography-dialog-font-weight);\n line-height: var(--redsift-typography-dialog-line-height);\n margin: 32px;\n max-width: calc(100vw - 48px);\n padding: 24px;\n width: 540px;\n z-index: var(--redsift-layout-z-index-dialog);\n\n ${({ $width, $maxWidth, $minWidth }) => css`\n ${$width !== undefined ? `width: ${$width};` : ''}\n ${$maxWidth !== undefined ? `min-width: ${$maxWidth};` : ''}\n ${$minWidth !== undefined ? `max-width: ${$minWidth};` : ''}\n `}\n\n &:focus-visible {\n outline: none;\n }\n\n .redsift-dialog-content__header {\n align-items: flex-start;\n display: flex;\n justify-content: space-between;\n }\n\n .redsift-card-header__icon-button {\n margin-top: 8px;\n margin-left: auto;\n margin-right: 8px;\n\n [dir='rtl'] & {\n margin-left: 8px;\n margin-right: auto;\n }\n }\n`;\n\nexport const StyledFloatingOverlay = styled(FloatingOverlay)`\n background: rgba(0, 0, 0, 0.8);\n display: grid;\n place-items: center;\n z-index: var(--redsift-layout-z-index-overlay);\n`;\n"],"names":["StyledDialogContent","styled","div","baseContainer","_ref","$theme","css","Theme","dark","_ref2","$width","$maxWidth","$minWidth","undefined","StyledFloatingOverlay","FloatingOverlay"],"mappings":";;;;AAKA;AACA;AACA;AACaA,MAAAA,mBAAmB,GAAGC,MAAM,CAACC,GAA8B,CAAA;AACxE,EAAA,EAAIC,aAAc,CAAA;AAClB,EAAA,EAAIC,IAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,MAAAA;AAAO,GAAC,GAAAD,IAAA,CAAA;AAAA,EAAA,OAAKE,GAAI,CAAA;AACxB,uCAAyCD,EAAAA,MAAM,KAAKE,KAAK,CAACC,IAAI,GAAG,OAAO,GAAG,aAAc,CAAA;AACzF,kDAAoDH,EAAAA,MAAM,KAAKE,KAAK,CAACC,IAAI,GAAG,OAAO,GAAG,OAAQ,CAAA;AAC9F,EAAG,CAAA,CAAA;AAAA,CAAC,CAAA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,EAAIC,KAAA,IAAA;EAAA,IAAC;IAAEC,MAAM;IAAEC,SAAS;AAAEC,IAAAA,SAAAA;AAAU,GAAC,GAAAH,KAAA,CAAA;AAAA,EAAA,OAAKH,GAAI,CAAA;AAC9C,IAAMI,EAAAA,MAAM,KAAKG,SAAS,GAAI,UAASH,MAAO,CAAA,CAAA,CAAE,GAAG,EAAG,CAAA;AACtD,IAAMC,EAAAA,SAAS,KAAKE,SAAS,GAAI,cAAaF,SAAU,CAAA,CAAA,CAAE,GAAG,EAAG,CAAA;AAChE,IAAMC,EAAAA,SAAS,KAAKC,SAAS,GAAI,cAAaD,SAAU,CAAA,CAAA,CAAE,GAAG,EAAG,CAAA;AAChE,EAAG,CAAA,CAAA;AAAA,CAAC,CAAA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;MAEYE,qBAAqB,GAAGb,MAAM,CAACc,eAAe,CAAE,CAAA;AAC7D;AACA;AACA;AACA;AACA;;;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { useMergeRefs } from '../../../../../node_modules/@floating-ui/react/dist/floating-ui.react.mjs.js';
|
|
5
|
+
import { StyledDialogContentActions } from './styles.js';
|
|
6
|
+
import { useDialogContext } from '../dialog/useDialogContext.js';
|
|
7
|
+
|
|
8
|
+
const _excluded = ["children", "className", "flexDirection"];
|
|
9
|
+
const COMPONENT_NAME = 'DialogContentActions';
|
|
10
|
+
const CLASSNAME = 'redsift-dialog-content-actions';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The DialogContentActions component.
|
|
14
|
+
*/
|
|
15
|
+
const DialogContentActions = /*#__PURE__*/forwardRef((props, ref) => {
|
|
16
|
+
const {
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
flexDirection = 'row'
|
|
20
|
+
} = props,
|
|
21
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
22
|
+
const {
|
|
23
|
+
actionsRef,
|
|
24
|
+
initialFocus
|
|
25
|
+
} = useDialogContext();
|
|
26
|
+
return /*#__PURE__*/React__default.createElement(StyledDialogContentActions, _extends({
|
|
27
|
+
flexDirection: flexDirection
|
|
28
|
+
}, forwardedProps, {
|
|
29
|
+
className: classNames(DialogContentActions.className, className),
|
|
30
|
+
ref: useMergeRefs([ref, actionsRef]),
|
|
31
|
+
tabIndex: initialFocus === 'actions' ? -1 : undefined
|
|
32
|
+
}), children);
|
|
33
|
+
});
|
|
34
|
+
DialogContentActions.className = CLASSNAME;
|
|
35
|
+
DialogContentActions.displayName = COMPONENT_NAME;
|
|
36
|
+
|
|
37
|
+
export { DialogContentActions };
|
|
38
|
+
//# sourceMappingURL=DialogContentActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogContentActions.js","sources":["../../../../../../../popovers/src/components/dialog-content-actions/DialogContentActions.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport classNames from 'classnames';\nimport { useMergeRefs } from '@floating-ui/react';\n\nimport { Comp } from '@redsift/design-system';\nimport { StyledDialogContentActions } from './styles';\nimport { DialogContentActionsProps } from './types';\nimport { useDialogContext } from '../dialog';\n\nconst COMPONENT_NAME = 'DialogContentActions';\nconst CLASSNAME = 'redsift-dialog-content-actions';\n\n/**\n * The DialogContentActions component.\n */\nexport const DialogContentActions: Comp<DialogContentActionsProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { children, className, flexDirection = 'row', ...forwardedProps } = props;\n\n const { actionsRef, initialFocus } = useDialogContext();\n\n return (\n <StyledDialogContentActions\n flexDirection={flexDirection}\n {...forwardedProps}\n className={classNames(DialogContentActions.className, className)}\n ref={useMergeRefs([ref, actionsRef])}\n tabIndex={initialFocus === 'actions' ? -1 : undefined}\n >\n {children}\n </StyledDialogContentActions>\n );\n});\nDialogContentActions.className = CLASSNAME;\nDialogContentActions.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","DialogContentActions","forwardRef","props","ref","children","className","flexDirection","forwardedProps","_objectWithoutProperties","_excluded","actionsRef","initialFocus","useDialogContext","React","createElement","StyledDialogContentActions","_extends","classNames","useMergeRefs","tabIndex","undefined","displayName"],"mappings":";;;;;;;;AASA,MAAMA,cAAc,GAAG,sBAAsB,CAAA;AAC7C,MAAMC,SAAS,GAAG,gCAAgC,CAAA;;AAElD;AACA;AACA;AACO,MAAMC,oBAAqE,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAC9G,MAAM;MAAEC,QAAQ;MAAEC,SAAS;AAAEC,MAAAA,aAAa,GAAG,KAAA;AAAyB,KAAC,GAAGJ,KAAK;AAAxBK,IAAAA,cAAc,GAAAC,wBAAA,CAAKN,KAAK,EAAAO,SAAA,CAAA,CAAA;EAE/E,MAAM;IAAEC,UAAU;AAAEC,IAAAA,YAAAA;GAAc,GAAGC,gBAAgB,EAAE,CAAA;AAEvD,EAAA,oBACEC,cAAA,CAAAC,aAAA,CAACC,0BAA0B,EAAAC,QAAA,CAAA;AACzBV,IAAAA,aAAa,EAAEA,aAAAA;AAAc,GAAA,EACzBC,cAAc,EAAA;IAClBF,SAAS,EAAEY,UAAU,CAACjB,oBAAoB,CAACK,SAAS,EAAEA,SAAS,CAAE;IACjEF,GAAG,EAAEe,YAAY,CAAC,CAACf,GAAG,EAAEO,UAAU,CAAC,CAAE;AACrCS,IAAAA,QAAQ,EAAER,YAAY,KAAK,SAAS,GAAG,CAAC,CAAC,GAAGS,SAAAA;AAAU,GAAA,CAAA,EAErDhB,QACyB,CAAC,CAAA;AAEjC,CAAC,EAAC;AACFJ,oBAAoB,CAACK,SAAS,GAAGN,SAAS,CAAA;AAC1CC,oBAAoB,CAACqB,WAAW,GAAGvB,cAAc;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { baseContainer } from '@redsift/design-system';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Component style.
|
|
6
|
+
*/
|
|
7
|
+
const StyledDialogContentActions = styled.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
${baseContainer}
|
|
10
|
+
|
|
11
|
+
margin-top: 8px;
|
|
12
|
+
margin-bottom: 8px;
|
|
13
|
+
|
|
14
|
+
&:focus-visible {
|
|
15
|
+
outline: none;
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
export { StyledDialogContentActions };
|
|
20
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../../../../popovers/src/components/dialog-content-actions/styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { baseContainer } from '@redsift/design-system';\nimport { StyledDialogContentActionsProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledDialogContentActions = styled.div<StyledDialogContentActionsProps>`\n display: flex;\n ${baseContainer}\n\n margin-top: 8px;\n margin-bottom: 8px;\n\n &:focus-visible {\n outline: none;\n }\n`;\n"],"names":["StyledDialogContentActions","styled","div","baseContainer"],"mappings":";;;AAIA;AACA;AACA;AACaA,MAAAA,0BAA0B,GAAGC,MAAM,CAACC,GAAqC,CAAA;AACtF;AACA,EAAA,EAAIC,aAAc,CAAA;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { useMergeRefs } from '../../../../../node_modules/@floating-ui/react/dist/floating-ui.react.mjs.js';
|
|
5
|
+
import { useBoundingClientRect } from '@redsift/design-system';
|
|
6
|
+
import { StyledDialogContentBody } from './styles.js';
|
|
7
|
+
import { useDialogContext } from '../dialog/useDialogContext.js';
|
|
8
|
+
|
|
9
|
+
const _excluded = ["children", "className"];
|
|
10
|
+
const COMPONENT_NAME = 'DialogContentBody';
|
|
11
|
+
const CLASSNAME = 'redsift-dialog-content-body';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The DialogContentBody component.
|
|
15
|
+
*/
|
|
16
|
+
const DialogContentBody = /*#__PURE__*/forwardRef((props, ref) => {
|
|
17
|
+
const {
|
|
18
|
+
children,
|
|
19
|
+
className
|
|
20
|
+
} = props,
|
|
21
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
22
|
+
const {
|
|
23
|
+
actionsRef,
|
|
24
|
+
bodyRef,
|
|
25
|
+
hasCloseButton,
|
|
26
|
+
headerRef,
|
|
27
|
+
initialFocus
|
|
28
|
+
} = useDialogContext();
|
|
29
|
+
const {
|
|
30
|
+
height: headerHeight = 0
|
|
31
|
+
} = useBoundingClientRect(headerRef, [children, headerRef]);
|
|
32
|
+
const {
|
|
33
|
+
height: actionsHeight = 0
|
|
34
|
+
} = useBoundingClientRect(actionsRef, [children, actionsRef]);
|
|
35
|
+
|
|
36
|
+
/* istanbul ignore next */
|
|
37
|
+
return /*#__PURE__*/React__default.createElement(StyledDialogContentBody, _extends({}, forwardedProps, {
|
|
38
|
+
className: classNames(DialogContentBody.className, className),
|
|
39
|
+
ref: useMergeRefs([ref, bodyRef]),
|
|
40
|
+
tabIndex: initialFocus === 'body' ? -1 : undefined,
|
|
41
|
+
$marginTop: Math.max(headerHeight, hasCloseButton ? 40 : 0) + 32,
|
|
42
|
+
$marginBottom: (actionsHeight === 0 ? 0 : actionsHeight + 16) + 32
|
|
43
|
+
}), children);
|
|
44
|
+
});
|
|
45
|
+
DialogContentBody.className = CLASSNAME;
|
|
46
|
+
DialogContentBody.displayName = COMPONENT_NAME;
|
|
47
|
+
|
|
48
|
+
export { DialogContentBody };
|
|
49
|
+
//# sourceMappingURL=DialogContentBody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogContentBody.js","sources":["../../../../../../../popovers/src/components/dialog-content-body/DialogContentBody.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport classNames from 'classnames';\nimport { useMergeRefs } from '@floating-ui/react';\n\nimport { Comp, useBoundingClientRect } from '@redsift/design-system';\nimport { StyledDialogContentBody } from './styles';\nimport { DialogContentBodyProps } from './types';\nimport { useDialogContext } from '../dialog';\n\nconst COMPONENT_NAME = 'DialogContentBody';\nconst CLASSNAME = 'redsift-dialog-content-body';\n\n/**\n * The DialogContentBody component.\n */\nexport const DialogContentBody: Comp<DialogContentBodyProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { children, className, ...forwardedProps } = props;\n\n const { actionsRef, bodyRef, hasCloseButton, headerRef, initialFocus } = useDialogContext();\n\n const { height: headerHeight = 0 } = useBoundingClientRect(headerRef as any, [children, headerRef]);\n const { height: actionsHeight = 0 } = useBoundingClientRect(actionsRef as any, [children, actionsRef]);\n\n /* istanbul ignore next */\n return (\n <StyledDialogContentBody\n {...forwardedProps}\n className={classNames(DialogContentBody.className, className)}\n ref={useMergeRefs([ref, bodyRef])}\n tabIndex={initialFocus === 'body' ? -1 : undefined}\n $marginTop={Math.max(headerHeight, hasCloseButton ? 40 : 0) + 32}\n $marginBottom={(actionsHeight === 0 ? 0 : actionsHeight + 16) + 32}\n >\n {children}\n </StyledDialogContentBody>\n );\n});\nDialogContentBody.className = CLASSNAME;\nDialogContentBody.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","DialogContentBody","forwardRef","props","ref","children","className","forwardedProps","_objectWithoutProperties","_excluded","actionsRef","bodyRef","hasCloseButton","headerRef","initialFocus","useDialogContext","height","headerHeight","useBoundingClientRect","actionsHeight","React","createElement","StyledDialogContentBody","_extends","classNames","useMergeRefs","tabIndex","undefined","$marginTop","Math","max","$marginBottom","displayName"],"mappings":";;;;;;;;;AASA,MAAMA,cAAc,GAAG,mBAAmB,CAAA;AAC1C,MAAMC,SAAS,GAAG,6BAA6B,CAAA;;AAE/C;AACA;AACA;AACO,MAAMC,iBAA+D,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACxG,MAAM;MAAEC,QAAQ;AAAEC,MAAAA,SAAAA;AAA6B,KAAC,GAAGH,KAAK;AAAxBI,IAAAA,cAAc,GAAAC,wBAAA,CAAKL,KAAK,EAAAM,SAAA,CAAA,CAAA;EAExD,MAAM;IAAEC,UAAU;IAAEC,OAAO;IAAEC,cAAc;IAAEC,SAAS;AAAEC,IAAAA,YAAAA;GAAc,GAAGC,gBAAgB,EAAE,CAAA;EAE3F,MAAM;IAAEC,MAAM,EAAEC,YAAY,GAAG,CAAA;GAAG,GAAGC,qBAAqB,CAACL,SAAS,EAAS,CAACR,QAAQ,EAAEQ,SAAS,CAAC,CAAC,CAAA;EACnG,MAAM;IAAEG,MAAM,EAAEG,aAAa,GAAG,CAAA;GAAG,GAAGD,qBAAqB,CAACR,UAAU,EAAS,CAACL,QAAQ,EAAEK,UAAU,CAAC,CAAC,CAAA;;AAEtG;EACA,oBACEU,cAAA,CAAAC,aAAA,CAACC,uBAAuB,EAAAC,QAAA,KAClBhB,cAAc,EAAA;IAClBD,SAAS,EAAEkB,UAAU,CAACvB,iBAAiB,CAACK,SAAS,EAAEA,SAAS,CAAE;IAC9DF,GAAG,EAAEqB,YAAY,CAAC,CAACrB,GAAG,EAAEO,OAAO,CAAC,CAAE;IAClCe,QAAQ,EAAEZ,YAAY,KAAK,MAAM,GAAG,CAAC,CAAC,GAAGa,SAAU;AACnDC,IAAAA,UAAU,EAAEC,IAAI,CAACC,GAAG,CAACb,YAAY,EAAEL,cAAc,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAG;IACjEmB,aAAa,EAAE,CAACZ,aAAa,KAAK,CAAC,GAAG,CAAC,GAAGA,aAAa,GAAG,EAAE,IAAI,EAAA;AAAG,GAAA,CAAA,EAElEd,QACsB,CAAC,CAAA;AAE9B,CAAC,EAAC;AACFJ,iBAAiB,CAACK,SAAS,GAAGN,SAAS,CAAA;AACvCC,iBAAiB,CAAC+B,WAAW,GAAGjC,cAAc;;;;"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { baseContainer } from '@redsift/design-system';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Component style.
|
|
6
|
+
*/
|
|
7
|
+
const StyledDialogContentBody = styled.div`
|
|
8
|
+
${baseContainer}
|
|
9
|
+
|
|
10
|
+
overflow-y: auto;
|
|
11
|
+
${_ref => {
|
|
12
|
+
let {
|
|
13
|
+
$marginTop,
|
|
14
|
+
$marginBottom
|
|
15
|
+
} = _ref;
|
|
16
|
+
return css`
|
|
17
|
+
max-height: calc(100vh - ${$marginTop + $marginBottom}px);
|
|
18
|
+
`;
|
|
19
|
+
}}
|
|
20
|
+
|
|
21
|
+
font-family: var(--redsift-typography-body-font-family);
|
|
22
|
+
font-size: var(--redsift-typography-body-font-size);
|
|
23
|
+
font-weight: var(--redsift-typography-body-font-weight);
|
|
24
|
+
line-height: var(--redsift-typography-body-line-height);
|
|
25
|
+
padding: 0 24px;
|
|
26
|
+
margin: 16px -24px;
|
|
27
|
+
|
|
28
|
+
&:focus-visible {
|
|
29
|
+
outline: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
scrollbar-color: var(--redsift-color-neutral-mid-grey) transparent;
|
|
33
|
+
scrollbar-width: thin;
|
|
34
|
+
|
|
35
|
+
&::-webkit-scrollbar {
|
|
36
|
+
block-size: 9px;
|
|
37
|
+
inline-size: 9px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&::-webkit-scrollbar-thumb {
|
|
41
|
+
background-clip: padding-box;
|
|
42
|
+
background-color: var(--redsift-color-neutral-mid-grey);
|
|
43
|
+
border-radius: 0px;
|
|
44
|
+
border-left: 2px solid transparent;
|
|
45
|
+
border-right: 2px solid transparent;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&::-webkit-scrollbar-track {
|
|
49
|
+
background-color: transparent;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&::-webkit-scrollbar-thumb:horizontal,
|
|
53
|
+
&::-webkit-scrollbar-thumb:vertical {
|
|
54
|
+
&:hover {
|
|
55
|
+
background-color: var(--redsift-color-neutral-x-dark-grey);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&::-webkit-scrollbar-corner {
|
|
60
|
+
visibility: hidden;
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
|
|
64
|
+
export { StyledDialogContentBody };
|
|
65
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../../../../popovers/src/components/dialog-content-body/styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { baseContainer } from '@redsift/design-system';\nimport { StyledDialogContentBodyProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledDialogContentBody = styled.div<StyledDialogContentBodyProps>`\n ${baseContainer}\n\n overflow-y: auto;\n ${({ $marginTop, $marginBottom }) => css`\n max-height: calc(100vh - ${$marginTop + $marginBottom}px);\n `}\n\n font-family: var(--redsift-typography-body-font-family);\n font-size: var(--redsift-typography-body-font-size);\n font-weight: var(--redsift-typography-body-font-weight);\n line-height: var(--redsift-typography-body-line-height);\n padding: 0 24px;\n margin: 16px -24px;\n\n &:focus-visible {\n outline: none;\n }\n\n scrollbar-color: var(--redsift-color-neutral-mid-grey) transparent;\n scrollbar-width: thin;\n\n &::-webkit-scrollbar {\n block-size: 9px;\n inline-size: 9px;\n }\n\n &::-webkit-scrollbar-thumb {\n background-clip: padding-box;\n background-color: var(--redsift-color-neutral-mid-grey);\n border-radius: 0px;\n border-left: 2px solid transparent;\n border-right: 2px solid transparent;\n }\n\n &::-webkit-scrollbar-track {\n background-color: transparent;\n }\n\n &::-webkit-scrollbar-thumb:horizontal,\n &::-webkit-scrollbar-thumb:vertical {\n &:hover {\n background-color: var(--redsift-color-neutral-x-dark-grey);\n }\n }\n\n &::-webkit-scrollbar-corner {\n visibility: hidden;\n }\n`;\n"],"names":["StyledDialogContentBody","styled","div","baseContainer","_ref","$marginTop","$marginBottom","css"],"mappings":";;;AAIA;AACA;AACA;AACaA,MAAAA,uBAAuB,GAAGC,MAAM,CAACC,GAAkC,CAAA;AAChF,EAAA,EAAIC,aAAc,CAAA;AAClB;AACA;AACA,EAAA,EAAIC,IAAA,IAAA;EAAA,IAAC;IAAEC,UAAU;AAAEC,IAAAA,aAAAA;AAAc,GAAC,GAAAF,IAAA,CAAA;AAAA,EAAA,OAAKG,GAAI,CAAA;AAC3C,6BAA+BF,EAAAA,UAAU,GAAGC,aAAc,CAAA;AAC1D,EAAG,CAAA,CAAA;AAAA,CAAC,CAAA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { useMergeRefs } from '../../../../../node_modules/@floating-ui/react/dist/floating-ui.react.mjs.js';
|
|
5
|
+
import { useId, Skeleton, Heading, Icon } from '@redsift/design-system';
|
|
6
|
+
import { StyledDialogContentHeader } from './styles.js';
|
|
7
|
+
import { useDialogContext } from '../dialog/useDialogContext.js';
|
|
8
|
+
|
|
9
|
+
const _excluded = ["children", "className", "header", "headingProps", "icon", "iconProps", "isLoading", "subheader", "theme"];
|
|
10
|
+
const COMPONENT_NAME = 'DialogContentHeader';
|
|
11
|
+
const CLASSNAME = 'redsift-dialog-content-header';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The DialogContentHeader component.
|
|
15
|
+
*/
|
|
16
|
+
const DialogContentHeader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
17
|
+
const {
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
header,
|
|
21
|
+
headingProps,
|
|
22
|
+
icon,
|
|
23
|
+
iconProps,
|
|
24
|
+
isLoading,
|
|
25
|
+
subheader,
|
|
26
|
+
theme
|
|
27
|
+
} = props,
|
|
28
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
29
|
+
const {
|
|
30
|
+
setLabelId,
|
|
31
|
+
setDescriptionId,
|
|
32
|
+
headerRef,
|
|
33
|
+
initialFocus
|
|
34
|
+
} = useDialogContext();
|
|
35
|
+
const [labelId] = useId();
|
|
36
|
+
const [descriptionId] = useId();
|
|
37
|
+
|
|
38
|
+
// Only sets `aria-labelledby` on the Dialog root element
|
|
39
|
+
// if this component is mounted inside it.
|
|
40
|
+
React__default.useLayoutEffect(() => {
|
|
41
|
+
setLabelId(labelId);
|
|
42
|
+
return () => setLabelId(undefined);
|
|
43
|
+
}, [labelId, setLabelId]);
|
|
44
|
+
|
|
45
|
+
// Only sets `aria-describedby` on the Dialog root element
|
|
46
|
+
// if this component is mounted inside it.
|
|
47
|
+
React__default.useLayoutEffect(() => {
|
|
48
|
+
setDescriptionId(descriptionId);
|
|
49
|
+
return () => setDescriptionId(undefined);
|
|
50
|
+
}, [descriptionId, setDescriptionId]);
|
|
51
|
+
return /*#__PURE__*/React__default.createElement(StyledDialogContentHeader, _extends({}, forwardedProps, {
|
|
52
|
+
className: classNames(DialogContentHeader.className, className),
|
|
53
|
+
ref: useMergeRefs([ref, headerRef]),
|
|
54
|
+
tabIndex: initialFocus === 'header' ? -1 : undefined
|
|
55
|
+
}), subheader ? /*#__PURE__*/React__default.createElement(Skeleton.Text, {
|
|
56
|
+
theme: theme,
|
|
57
|
+
variant: "body",
|
|
58
|
+
isLoaded: !isLoading
|
|
59
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
60
|
+
className: `${DialogContentHeader.className}__subheader`
|
|
61
|
+
}, subheader)) : null, header ? /*#__PURE__*/React__default.createElement(Skeleton.Text, {
|
|
62
|
+
theme: theme,
|
|
63
|
+
variant: (headingProps === null || headingProps === void 0 ? void 0 : headingProps.variant) || 'h2',
|
|
64
|
+
isLoaded: !isLoading,
|
|
65
|
+
marginTop: "10px",
|
|
66
|
+
marginBottom: "10px"
|
|
67
|
+
}, /*#__PURE__*/React__default.createElement(Heading, _extends({
|
|
68
|
+
theme: theme,
|
|
69
|
+
as: "h2",
|
|
70
|
+
color: "black",
|
|
71
|
+
className: `${DialogContentHeader.className}__header`,
|
|
72
|
+
variant: "h2"
|
|
73
|
+
}, headingProps), icon ? /*#__PURE__*/React__default.createElement(Icon, _extends({
|
|
74
|
+
theme: theme,
|
|
75
|
+
icon: icon,
|
|
76
|
+
"aria-hidden": "true",
|
|
77
|
+
size: "large"
|
|
78
|
+
}, iconProps)) : null, header)) : null, children ? /*#__PURE__*/React__default.createElement("div", {
|
|
79
|
+
id: descriptionId
|
|
80
|
+
}, children) : null);
|
|
81
|
+
});
|
|
82
|
+
DialogContentHeader.className = CLASSNAME;
|
|
83
|
+
DialogContentHeader.displayName = COMPONENT_NAME;
|
|
84
|
+
|
|
85
|
+
export { DialogContentHeader };
|
|
86
|
+
//# sourceMappingURL=DialogContentHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DialogContentHeader.js","sources":["../../../../../../../popovers/src/components/dialog-content-header/DialogContentHeader.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport classNames from 'classnames';\nimport { useMergeRefs } from '@floating-ui/react';\n\nimport { Icon, Heading, Comp, useId, Skeleton } from '@redsift/design-system';\nimport { StyledDialogContentHeader } from './styles';\nimport { DialogContentHeaderProps } from './types';\nimport { useDialogContext } from '../dialog';\n\nconst COMPONENT_NAME = 'DialogContentHeader';\nconst CLASSNAME = 'redsift-dialog-content-header';\n\n/**\n * The DialogContentHeader component.\n */\nexport const DialogContentHeader: Comp<DialogContentHeaderProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { children, className, header, headingProps, icon, iconProps, isLoading, subheader, theme, ...forwardedProps } =\n props;\n\n const { setLabelId, setDescriptionId, headerRef, initialFocus } = useDialogContext();\n const [labelId] = useId();\n const [descriptionId] = useId();\n\n // Only sets `aria-labelledby` on the Dialog root element\n // if this component is mounted inside it.\n React.useLayoutEffect(() => {\n setLabelId(labelId);\n return () => setLabelId(undefined);\n }, [labelId, setLabelId]);\n\n // Only sets `aria-describedby` on the Dialog root element\n // if this component is mounted inside it.\n React.useLayoutEffect(() => {\n setDescriptionId(descriptionId);\n return () => setDescriptionId(undefined);\n }, [descriptionId, setDescriptionId]);\n\n return (\n <StyledDialogContentHeader\n {...forwardedProps}\n className={classNames(DialogContentHeader.className, className)}\n ref={useMergeRefs([ref, headerRef])}\n tabIndex={initialFocus === 'header' ? -1 : undefined}\n >\n {subheader ? (\n <Skeleton.Text theme={theme} variant=\"body\" isLoaded={!isLoading}>\n <div className={`${DialogContentHeader.className}__subheader`}>{subheader}</div>\n </Skeleton.Text>\n ) : null}\n {header ? (\n <Skeleton.Text\n theme={theme}\n variant={headingProps?.variant || 'h2'}\n isLoaded={!isLoading}\n marginTop=\"10px\"\n marginBottom=\"10px\"\n >\n <Heading\n theme={theme}\n as=\"h2\"\n color=\"black\"\n className={`${DialogContentHeader.className}__header`}\n variant=\"h2\"\n {...headingProps}\n >\n {icon ? <Icon theme={theme} icon={icon} aria-hidden=\"true\" size=\"large\" {...iconProps} /> : null}\n {header}\n </Heading>\n </Skeleton.Text>\n ) : null}\n {children ? <div id={descriptionId}>{children}</div> : null}\n </StyledDialogContentHeader>\n );\n});\nDialogContentHeader.className = CLASSNAME;\nDialogContentHeader.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","DialogContentHeader","forwardRef","props","ref","children","className","header","headingProps","icon","iconProps","isLoading","subheader","theme","forwardedProps","_objectWithoutProperties","_excluded","setLabelId","setDescriptionId","headerRef","initialFocus","useDialogContext","labelId","useId","descriptionId","React","useLayoutEffect","undefined","createElement","StyledDialogContentHeader","_extends","classNames","useMergeRefs","tabIndex","Skeleton","Text","variant","isLoaded","marginTop","marginBottom","Heading","as","color","Icon","size","id","displayName"],"mappings":"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"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { baseStyling, baseFlexbox } from '@redsift/design-system';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Component style.
|
|
6
|
+
*/
|
|
7
|
+
const StyledDialogContentHeader = styled.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
width: 100%;
|
|
11
|
+
${baseStyling}
|
|
12
|
+
${baseFlexbox}
|
|
13
|
+
|
|
14
|
+
.redsift-dialog-content-header__header {
|
|
15
|
+
align-items: center;
|
|
16
|
+
display: flex;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
padding: 10px 0px;
|
|
19
|
+
margin: 0px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.redsift-dialog-content-header__subheader {
|
|
23
|
+
font-family: var(--redsift-typography-body-font-family);
|
|
24
|
+
font-size: var(--redsift-typography-body-font-size);
|
|
25
|
+
font-weight: var(--redsift-typography-body-font-weight);
|
|
26
|
+
line-height: var(--redsift-typography-body-line-height);
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
export { StyledDialogContentHeader };
|
|
31
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../../../../popovers/src/components/dialog-content-header/styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { StyledDialogContentHeaderProps } from './types';\nimport { baseFlexbox, baseStyling } from '@redsift/design-system';\n\n/**\n * Component style.\n */\nexport const StyledDialogContentHeader = styled.div<StyledDialogContentHeaderProps>`\n display: flex;\n flex-direction: column;\n width: 100%;\n ${baseStyling}\n ${baseFlexbox}\n\n .redsift-dialog-content-header__header {\n align-items: center;\n display: flex;\n gap: 8px;\n padding: 10px 0px;\n margin: 0px;\n }\n\n .redsift-dialog-content-header__subheader {\n font-family: var(--redsift-typography-body-font-family);\n font-size: var(--redsift-typography-body-font-size);\n font-weight: var(--redsift-typography-body-font-weight);\n line-height: var(--redsift-typography-body-line-height);\n }\n`;\n"],"names":["StyledDialogContentHeader","styled","div","baseStyling","baseFlexbox"],"mappings":";;;AAIA;AACA;AACA;AACaA,MAAAA,yBAAyB,GAAGC,MAAM,CAACC,GAAoC,CAAA;AACpF;AACA;AACA;AACA,EAAA,EAAIC,WAAY,CAAA;AAChB,EAAA,EAAIC,WAAY,CAAA;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,EAAAgB,cAAA,CAAAA,cAAA,CAAA,EAAA,EAC7Bf,iBAAiB,CAAAe,cAAA,CAAAA,cAAA,CAAAA,cAAA,CAAA;AAClBjB,MAAAA,GAAG,EAAEU,UAAAA;AAAU,KAAA,EACZX,KAAK,CAAA,EACLE,QAAQ,CAACF,KAAK,CAAA,EAAA,EAAA,EAAA;AACjBE,MAAAA,QAAQ,EAAAa,CAAAA,qBAAA,GAAEb,QAAQ,CAACF,KAAK,CAACE,QAAQ,MAAAa,IAAAA,IAAAA,qBAAA,KAAAA,KAAAA,CAAAA,GAAAA,qBAAA,GAAI,EAAA;AAAE,KAAA,CACxC,CAAC,CAAA,EAAA,EAAA,EAAA;AACFI,MAAAA,OAAO,EAAEnB,KAAK,CAACmB,OAAO,GAAGnB,KAAK,CAACmB,OAAO,GAAG,MAAMd,UAAU,CAAC,CAACD,MAAM,CAAC;AAClEgB,MAAAA,QAAQ,EAAEhB,MAAM;MAChBiB,SAAS,EAAEC,UAAU,CAAEpB,QAAQ,CAAkBF,KAAK,CAACqB,SAAS,EAAEd,gBAAgB,CAAC;MACnFC,KAAK,EAAEA,KAAK,KAAA,IAAA,IAALA,KAAK,KAAA,KAAA,CAAA,GAALA,KAAK,GAAIN,QAAQ,CAACF,KAAK,CAACQ,KAAAA;AAAK,KAAA,CACrC,CAAC,CAAA;AACJ,GAAA;EAEA,oBAAOQ,cAAA,CAAAO,aAAA,CAAAP,cAAA,CAAAQ,QAAA,EAAGtB,IAAAA,EAAAA,QAAW,CAAC,CAAA;AACxB,CAAC,EAAC;AACFJ,aAAa,CAACuB,SAAS,GAAGxB,SAAS,CAAA;AACnCC,aAAa,CAAC2B,WAAW,GAAG7B,cAAc;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonColor, Theme, ValueOf } from '@redsift/design-system';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Component variant.
|
|
6
|
+
*/
|
|
7
|
+
declare 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 };
|
|
@@ -0,0 +1,12 @@
|
|
|
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 };
|
|
@@ -0,0 +1,12 @@
|
|
|
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 };
|
|
@@ -0,0 +1,27 @@
|
|
|
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 };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadarButton.js","sources":["../../src/components/radar-button/RadarButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { Button, Comp, ButtonProps } from '@redsift/design-system';\nimport { rsiRadarSparkleWhite } from '@redsift/icons';\n\nconst COMPONENT_NAME = 'Button';\nconst CLASSNAME = 'redsift-radar-button';\n\n/**\n * The RadarButton component.\n */\nexport const RadarButton: Comp<ButtonProps, HTMLButtonElement> = forwardRef((props, ref) => {\n return (\n <Button variant=\"primary\" leftIcon={rsiRadarSparkleWhite} color=\"radar\" {...props} ref={ref}>\n {props.children || 'Radar'}\n </Button>\n );\n});\nRadarButton.className = CLASSNAME;\nRadarButton.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","RadarButton","forwardRef","props","ref","React","createElement","Button","_extends","variant","leftIcon","rsiRadarSparkleWhite","color","children","className","displayName"],"mappings":";;;;;AAKA,MAAMA,cAAc,GAAG,QAAQ,CAAA;AAC/B,MAAMC,SAAS,GAAG,sBAAsB,CAAA;;AAExC;AACA;AACA;AACO,MAAMC,WAAiD,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;AAC1F,EAAA,oBACEC,cAAA,CAAAC,aAAA,CAACC,MAAM,EAAAC,QAAA,CAAA;AAACC,IAAAA,OAAO,EAAC,SAAS;AAACC,IAAAA,QAAQ,EAAEC,oBAAqB;AAACC,IAAAA,KAAK,EAAC,OAAA;AAAO,GAAA,EAAKT,KAAK,EAAA;AAAEC,IAAAA,GAAG,EAAEA,GAAAA;AAAI,GAAA,CAAA,EACzFD,KAAK,CAACU,QAAQ,IAAI,OACb,CAAC,CAAA;AAEb,CAAC,EAAC;AACFZ,WAAW,CAACa,SAAS,GAAGd,SAAS,CAAA;AACjCC,WAAW,CAACc,WAAW,GAAGhB,cAAc;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadarItem.js","sources":["../../src/components/radar-item/RadarItem.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { Comp } from '@redsift/design-system';\nimport { Item, ItemProps } from '@redsift/pickers';\n\nconst COMPONENT_NAME = 'Item';\nconst CLASSNAME = 'redsift-radar-item';\n\n/**\n * The RadarItem component.\n */\nexport const RadarItem: Comp<ItemProps, HTMLDivElement> = forwardRef((props, ref) => (\n <Item padding=\"11px 15px\" color=\"radar\" hasBorder borderRadius=\"4px\" {...props} ref={ref} />\n));\nRadarItem.className = CLASSNAME;\nRadarItem.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","RadarItem","forwardRef","props","ref","React","createElement","Item","_extends","padding","color","hasBorder","borderRadius","className","displayName"],"mappings":";;;;AAKA,MAAMA,cAAc,GAAG,MAAM,CAAA;AAC7B,MAAMC,SAAS,GAAG,oBAAoB,CAAA;;AAEtC;AACA;AACA;MACaC,SAA0C,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,kBAC9EC,cAAA,CAAAC,aAAA,CAACC,IAAI,EAAAC,QAAA,CAAA;AAACC,EAAAA,OAAO,EAAC,WAAW;AAACC,EAAAA,KAAK,EAAC,OAAO;EAACC,SAAS,EAAA,IAAA;AAACC,EAAAA,YAAY,EAAC,KAAA;AAAK,CAAA,EAAKT,KAAK,EAAA;AAAEC,EAAAA,GAAG,EAAEA,GAAAA;AAAI,CAAA,CAAE,CAC5F,EAAC;AACFH,SAAS,CAACY,SAAS,GAAGb,SAAS,CAAA;AAC/BC,SAAS,CAACa,WAAW,GAAGf,cAAc;;;;"}
|