@redsift/products 11.6.0-muiv5-alpha.11 → 11.6.0-muiv5-alpha.13

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.
Files changed (83) hide show
  1. package/{packages/products/src/components/radar-button/_internal → _internal}/RadarButton.js +2 -2
  2. package/_internal/RadarButton.js.map +1 -0
  3. package/{packages/products/src/components/radar-item/_internal → _internal}/RadarItem.js +2 -2
  4. package/_internal/RadarItem.js.map +1 -0
  5. package/_internal/RadarSimpleDialog.js +8810 -0
  6. package/_internal/RadarSimpleDialog.js.map +1 -0
  7. package/{packages/products/src/components/radar-menu-button/_internal/RadarMenuButton.js → _internal/RadarSimpleMenuButton.js} +39 -3
  8. package/_internal/RadarSimpleMenuButton.js.map +1 -0
  9. package/{_virtual/_internal → _internal}/_rollupPluginBabelHelpers.js +1 -1
  10. package/_internal/radar-button.js +2 -0
  11. package/_internal/radar-dialog.js +2 -0
  12. package/{packages/products/src/components/radar-dialog/_internal → _internal}/radar-dialog.js.map +1 -1
  13. package/_internal/radar-item.js +2 -0
  14. package/_internal/radar-menu-button.js +2 -0
  15. package/{packages/products/src/components/radar-menu-button/_internal → _internal}/radar-menu-button.js.map +1 -1
  16. package/_internal/radar.js +23 -0
  17. package/_internal/radar.js.map +1 -0
  18. package/index.js +5 -0
  19. package/{packages/products/src/index.js.map → index.js.map} +1 -1
  20. package/package.json +5 -5
  21. package/_virtual/_internal/jsx-runtime.js +0 -4
  22. package/_virtual/_internal/jsx-runtime.js.map +0 -1
  23. package/_virtual/_internal/react-jsx-runtime.development.js +0 -4
  24. package/_virtual/_internal/react-jsx-runtime.development.js.map +0 -1
  25. package/_virtual/_internal/react-jsx-runtime.production.min.js +0 -4
  26. package/_virtual/_internal/react-jsx-runtime.production.min.js.map +0 -1
  27. package/packages/popovers/src/components/dialog/_internal/Dialog.js +0 -56
  28. package/packages/popovers/src/components/dialog/_internal/Dialog.js.map +0 -1
  29. package/packages/popovers/src/components/dialog/_internal/context.js +0 -6
  30. package/packages/popovers/src/components/dialog/_internal/context.js.map +0 -1
  31. package/packages/popovers/src/components/dialog/_internal/types.js +0 -20
  32. package/packages/popovers/src/components/dialog/_internal/types.js.map +0 -1
  33. package/packages/popovers/src/components/dialog/_internal/useDialog.js +0 -95
  34. package/packages/popovers/src/components/dialog/_internal/useDialog.js.map +0 -1
  35. package/packages/popovers/src/components/dialog/_internal/useDialogContext.js +0 -13
  36. package/packages/popovers/src/components/dialog/_internal/useDialogContext.js.map +0 -1
  37. package/packages/popovers/src/components/dialog-content/_internal/DialogContent.js +0 -97
  38. package/packages/popovers/src/components/dialog-content/_internal/DialogContent.js.map +0 -1
  39. package/packages/popovers/src/components/dialog-content/_internal/styles.js +0 -77
  40. package/packages/popovers/src/components/dialog-content/_internal/styles.js.map +0 -1
  41. package/packages/popovers/src/components/dialog-content/intl/_internal/en-US.js +0 -7
  42. package/packages/popovers/src/components/dialog-content/intl/_internal/en-US.js.map +0 -1
  43. package/packages/popovers/src/components/dialog-content/intl/_internal/fr-FR.js +0 -7
  44. package/packages/popovers/src/components/dialog-content/intl/_internal/fr-FR.js.map +0 -1
  45. package/packages/popovers/src/components/dialog-content/intl/index.js +0 -10
  46. package/packages/popovers/src/components/dialog-content/intl/index.js.map +0 -1
  47. package/packages/popovers/src/components/dialog-content-actions/_internal/DialogContentActions.js +0 -38
  48. package/packages/popovers/src/components/dialog-content-actions/_internal/DialogContentActions.js.map +0 -1
  49. package/packages/popovers/src/components/dialog-content-actions/_internal/styles.js +0 -20
  50. package/packages/popovers/src/components/dialog-content-actions/_internal/styles.js.map +0 -1
  51. package/packages/popovers/src/components/dialog-content-body/_internal/DialogContentBody.js +0 -49
  52. package/packages/popovers/src/components/dialog-content-body/_internal/DialogContentBody.js.map +0 -1
  53. package/packages/popovers/src/components/dialog-content-body/_internal/styles.js +0 -65
  54. package/packages/popovers/src/components/dialog-content-body/_internal/styles.js.map +0 -1
  55. package/packages/popovers/src/components/dialog-content-header/_internal/DialogContentHeader.js +0 -86
  56. package/packages/popovers/src/components/dialog-content-header/_internal/DialogContentHeader.js.map +0 -1
  57. package/packages/popovers/src/components/dialog-content-header/_internal/styles.js +0 -31
  58. package/packages/popovers/src/components/dialog-content-header/_internal/styles.js.map +0 -1
  59. package/packages/popovers/src/components/dialog-trigger/_internal/DialogTrigger.js +0 -47
  60. package/packages/popovers/src/components/dialog-trigger/_internal/DialogTrigger.js.map +0 -1
  61. package/packages/products/src/components/radar/_internal/radar.js +0 -25
  62. package/packages/products/src/components/radar/_internal/radar.js.map +0 -1
  63. package/packages/products/src/components/radar-button/_internal/RadarButton.js.map +0 -1
  64. package/packages/products/src/components/radar-button/_internal/radar-button.js +0 -2
  65. package/packages/products/src/components/radar-dialog/_internal/PulsedRadarImage.js +0 -437
  66. package/packages/products/src/components/radar-dialog/_internal/PulsedRadarImage.js.map +0 -1
  67. package/packages/products/src/components/radar-dialog/_internal/RadarDialog.js +0 -146
  68. package/packages/products/src/components/radar-dialog/_internal/RadarDialog.js.map +0 -1
  69. package/packages/products/src/components/radar-dialog/_internal/RadarSimpleDialog.js +0 -23
  70. package/packages/products/src/components/radar-dialog/_internal/RadarSimpleDialog.js.map +0 -1
  71. package/packages/products/src/components/radar-dialog/_internal/ScatterGrid.js +0 -1548
  72. package/packages/products/src/components/radar-dialog/_internal/ScatterGrid.js.map +0 -1
  73. package/packages/products/src/components/radar-dialog/_internal/radar-dialog.js +0 -3
  74. package/packages/products/src/components/radar-item/_internal/RadarItem.js.map +0 -1
  75. package/packages/products/src/components/radar-item/_internal/radar-item.js +0 -2
  76. package/packages/products/src/components/radar-menu-button/_internal/RadarMenuButton.js.map +0 -1
  77. package/packages/products/src/components/radar-menu-button/_internal/RadarSimpleMenuButton.js +0 -42
  78. package/packages/products/src/components/radar-menu-button/_internal/RadarSimpleMenuButton.js.map +0 -1
  79. package/packages/products/src/components/radar-menu-button/_internal/radar-menu-button.js +0 -3
  80. package/packages/products/src/index.js +0 -6
  81. /package/{_virtual/_internal → _internal}/_rollupPluginBabelHelpers.js.map +0 -0
  82. /package/{packages/products/src/components/radar-button/_internal → _internal}/radar-button.js.map +0 -0
  83. /package/{packages/products/src/components/radar-item/_internal → _internal}/radar-item.js.map +0 -0
@@ -1,77 +0,0 @@
1
- import { FloatingOverlay } from '../../../../../../node_modules/@floating-ui/react/dist/_internal/floating-ui.react.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
@@ -1 +0,0 @@
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;;;;"}
@@ -1,7 +0,0 @@
1
- var close = "Close";
2
- var enUS = {
3
- close: close
4
- };
5
-
6
- export { close, enUS as default };
7
- //# sourceMappingURL=en-US.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"en-US.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,7 +0,0 @@
1
- var close = "Fermer";
2
- var frFR = {
3
- close: close
4
- };
5
-
6
- export { close, frFR as default };
7
- //# sourceMappingURL=fr-FR.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fr-FR.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,10 +0,0 @@
1
- import enUS from './_internal/en-US.js';
2
- import frFR from './_internal/fr-FR.js';
3
-
4
- var intlMessages = {
5
- 'en-US': enUS,
6
- 'fr-FR': frFR
7
- };
8
-
9
- export { intlMessages as default };
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../../popovers/src/components/dialog-content/intl/index.ts"],"sourcesContent":["import enUS from './en-US.json';\nimport frFR from './fr-FR.json';\n\nexport default {\n 'en-US': enUS,\n 'fr-FR': frFR,\n};\n"],"names":["enUS","frFR"],"mappings":";;;AAGA,mBAAe;AACb,EAAA,OAAO,EAAEA,IAAI;AACb,EAAA,OAAO,EAAEC,IAAAA;AACX,CAAC;;;;"}
@@ -1,38 +0,0 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../../../../_virtual/_internal/_rollupPluginBabelHelpers.js';
2
- import React__default, { forwardRef } from 'react';
3
- import classNames from 'classnames';
4
- import { useMergeRefs } from '../../../../../../node_modules/@floating-ui/react/dist/_internal/floating-ui.react.js';
5
- import { StyledDialogContentActions } from './styles.js';
6
- import { useDialogContext } from '../../dialog/_internal/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
@@ -1 +0,0 @@
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;;;;"}
@@ -1,20 +0,0 @@
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
@@ -1 +0,0 @@
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;;;;"}
@@ -1,49 +0,0 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../../../../_virtual/_internal/_rollupPluginBabelHelpers.js';
2
- import React__default, { forwardRef } from 'react';
3
- import classNames from 'classnames';
4
- import { useMergeRefs } from '../../../../../../node_modules/@floating-ui/react/dist/_internal/floating-ui.react.js';
5
- import { useBoundingClientRect } from '@redsift/design-system';
6
- import { StyledDialogContentBody } from './styles.js';
7
- import { useDialogContext } from '../../dialog/_internal/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
@@ -1 +0,0 @@
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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';
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
@@ -1 +0,0 @@
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;;;;"}
@@ -1,86 +0,0 @@
1
- import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../../../../_virtual/_internal/_rollupPluginBabelHelpers.js';
2
- import React__default, { forwardRef } from 'react';
3
- import classNames from 'classnames';
4
- import { useMergeRefs } from '../../../../../../node_modules/@floating-ui/react/dist/_internal/floating-ui.react.js';
5
- import { useId, Skeleton, Heading, Icon } from '@redsift/design-system';
6
- import { StyledDialogContentHeader } from './styles.js';
7
- import { useDialogContext } from '../../dialog/_internal/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
@@ -1 +0,0 @@
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":";;;;;;;;;AASA,MAAMA,cAAc,GAAG,qBAAqB,CAAA;AAC5C,MAAMC,SAAS,GAAG,+BAA+B,CAAA;;AAEjD;AACA;AACA;AACO,MAAMC,mBAAmE,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAC5G,MAAM;MAAEC,QAAQ;MAAEC,SAAS;MAAEC,MAAM;MAAEC,YAAY;MAAEC,IAAI;MAAEC,SAAS;MAAEC,SAAS;MAAEC,SAAS;AAAEC,MAAAA,KAAAA;AAAyB,KAAC,GAClHV,KAAK;AAD6FW,IAAAA,cAAc,GAAAC,wBAAA,CAChHZ,KAAK,EAAAa,SAAA,CAAA,CAAA;EAEP,MAAM;IAAEC,UAAU;IAAEC,gBAAgB;IAAEC,SAAS;AAAEC,IAAAA,YAAAA;GAAc,GAAGC,gBAAgB,EAAE,CAAA;AACpF,EAAA,MAAM,CAACC,OAAO,CAAC,GAAGC,KAAK,EAAE,CAAA;AACzB,EAAA,MAAM,CAACC,aAAa,CAAC,GAAGD,KAAK,EAAE,CAAA;;AAE/B;AACA;EACAE,cAAK,CAACC,eAAe,CAAC,MAAM;IAC1BT,UAAU,CAACK,OAAO,CAAC,CAAA;AACnB,IAAA,OAAO,MAAML,UAAU,CAACU,SAAS,CAAC,CAAA;AACpC,GAAC,EAAE,CAACL,OAAO,EAAEL,UAAU,CAAC,CAAC,CAAA;;AAEzB;AACA;EACAQ,cAAK,CAACC,eAAe,CAAC,MAAM;IAC1BR,gBAAgB,CAACM,aAAa,CAAC,CAAA;AAC/B,IAAA,OAAO,MAAMN,gBAAgB,CAACS,SAAS,CAAC,CAAA;AAC1C,GAAC,EAAE,CAACH,aAAa,EAAEN,gBAAgB,CAAC,CAAC,CAAA;EAErC,oBACEO,cAAA,CAAAG,aAAA,CAACC,yBAAyB,EAAAC,QAAA,KACpBhB,cAAc,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AA,IAAI,gBAAGgB,cAAA,CAAAG,aAAA,CAACe,IAAI,EAAAb,QAAA,CAAA;AAACjB,IAAAA,KAAK,EAAEA,KAAM;AAACJ,IAAAA,IAAI,EAAEA,IAAK;AAAC,IAAA,aAAA,EAAY,MAAM;AAACmC,IAAAA,IAAI,EAAC,OAAA;AAAO,GAAA,EAAKlC,SAAS,CAAG,CAAC,GAAG,IAAI,EAC/FH,MACM,CACI,CAAC,GACd,IAAI,EACPF,QAAQ,gBAAGoB,cAAA,CAAAG,aAAA,CAAA,KAAA,EAAA;AAAKiB,IAAAA,EAAE,EAAErB,aAAAA;AAAc,GAAA,EAAEnB,QAAc,CAAC,GAAG,IAC9B,CAAC,CAAA;AAEhC,CAAC,EAAC;AACFJ,mBAAmB,CAACK,SAAS,GAAGN,SAAS,CAAA;AACzCC,mBAAmB,CAAC6C,WAAW,GAAG/C,cAAc;;;;"}
@@ -1,31 +0,0 @@
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
@@ -1 +0,0 @@
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;;;;"}
@@ -1,47 +0,0 @@
1
- import { objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_internal/_rollupPluginBabelHelpers.js';
2
- import React__default, { forwardRef } from 'react';
3
- import { useMergeRefs } from '../../../../../../node_modules/@floating-ui/react/dist/_internal/floating-ui.react.js';
4
- import { isComponent } from '@redsift/design-system';
5
- import classNames from 'classnames';
6
- import { useDialogContext } from '../../dialog/_internal/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,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A,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;;;;"}
@@ -1,25 +0,0 @@
1
- import { RadarItem } from '../../radar-item/_internal/RadarItem.js';
2
- import { RadarMenuButton } from '../../radar-menu-button/_internal/RadarMenuButton.js';
3
- import { RadarSimpleMenuButton } from '../../radar-menu-button/_internal/RadarSimpleMenuButton.js';
4
- import { RadarSimpleDialog } from '../../radar-dialog/_internal/RadarSimpleDialog.js';
5
- import { RadarDialog } from '../../radar-dialog/_internal/RadarDialog.js';
6
- import { RadarButton } from '../../radar-button/_internal/RadarButton.js';
7
-
8
- RadarButton.displayName = 'Button';
9
- RadarItem.displayName = 'Item';
10
- RadarMenuButton.displayName = 'MenuButton';
11
- RadarSimpleMenuButton.displayName = 'MenuButton';
12
- const RadarSimple = {
13
- Dialog: RadarSimpleDialog,
14
- MenuButton: RadarSimpleMenuButton
15
- };
16
- const Radar = {
17
- Button: RadarButton,
18
- Dialog: RadarDialog,
19
- Item: RadarItem,
20
- MenuButton: RadarMenuButton,
21
- Simple: RadarSimple
22
- };
23
-
24
- export { Radar, RadarSimple };
25
- //# sourceMappingURL=radar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"radar.js","sources":["../../../../../../../src/components/radar/index.ts"],"sourcesContent":["import { RadarButton } from '../radar-button';\nimport { RadarSimpleDialog, RadarDialog } from '../radar-dialog';\nimport { RadarItem } from '../radar-item';\nimport { RadarMenuButton, RadarSimpleMenuButton } from '../radar-menu-button';\n\nRadarButton.displayName = 'Button';\nRadarItem.displayName = 'Item';\nRadarMenuButton.displayName = 'MenuButton';\nRadarSimpleMenuButton.displayName = 'MenuButton';\n\nexport const RadarSimple = {\n Dialog: RadarSimpleDialog,\n MenuButton: RadarSimpleMenuButton,\n};\n\nexport const Radar = {\n Button: RadarButton,\n Dialog: RadarDialog,\n Item: RadarItem,\n MenuButton: RadarMenuButton,\n Simple: RadarSimple,\n};\n"],"names":["RadarButton","displayName","RadarItem","RadarMenuButton","RadarSimpleMenuButton","RadarSimple","Dialog","RadarSimpleDialog","MenuButton","Radar","Button","RadarDialog","Item","Simple"],"mappings":";;;;;;;AAKAA,WAAW,CAACC,WAAW,GAAG,QAAQ,CAAA;AAClCC,SAAS,CAACD,WAAW,GAAG,MAAM,CAAA;AAC9BE,eAAe,CAACF,WAAW,GAAG,YAAY,CAAA;AAC1CG,qBAAqB,CAACH,WAAW,GAAG,YAAY,CAAA;AAEzC,MAAMI,WAAW,GAAG;AACzBC,EAAAA,MAAM,EAAEC,iBAAiB;AACzBC,EAAAA,UAAU,EAAEJ,qBAAAA;AACd,EAAC;AAEM,MAAMK,KAAK,GAAG;AACnBC,EAAAA,MAAM,EAAEV,WAAW;AACnBM,EAAAA,MAAM,EAAEK,WAAW;AACnBC,EAAAA,IAAI,EAAEV,SAAS;AACfM,EAAAA,UAAU,EAAEL,eAAe;AAC3BU,EAAAA,MAAM,EAAER,WAAAA;AACV;;;;"}
@@ -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,2 +0,0 @@
1
- export { RadarButton } from './RadarButton.js';
2
- //# sourceMappingURL=radar-button.js.map