@activecollab/components 2.0.545 → 2.0.546
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Dialog/DialogTitle.js +1 -1
- package/dist/cjs/components/Dialog/DialogTitle.js.map +1 -1
- package/dist/cjs/components/Dialog/Styles.js +10 -5
- package/dist/cjs/components/Dialog/Styles.js.map +1 -1
- package/dist/cjs/components/FilterInput/FilterInput.styles.js +2 -2
- package/dist/cjs/components/FilterInput/FilterInput.styles.js.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.js +14 -3
- package/dist/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/Dialog/DialogTitle.d.ts.map +1 -1
- package/dist/esm/components/Dialog/DialogTitle.js +2 -2
- package/dist/esm/components/Dialog/DialogTitle.js.map +1 -1
- package/dist/esm/components/Dialog/Styles.d.ts +1 -0
- package/dist/esm/components/Dialog/Styles.d.ts.map +1 -1
- package/dist/esm/components/Dialog/Styles.js +9 -4
- package/dist/esm/components/Dialog/Styles.js.map +1 -1
- package/dist/esm/components/FilterInput/FilterInput.styles.d.ts.map +1 -1
- package/dist/esm/components/FilterInput/FilterInput.styles.js +2 -2
- package/dist/esm/components/FilterInput/FilterInput.styles.js.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.js +14 -3
- package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/index.js +26 -10
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -36,7 +36,7 @@ var DialogTitle = exports.DialogTitle = function DialogTitle(_ref) {
|
|
|
36
36
|
}, [registerTitle]);
|
|
37
37
|
var heading;
|
|
38
38
|
if (disableDefaultHeading) {
|
|
39
|
-
heading = titleId ? /*#__PURE__*/_react.default.createElement(
|
|
39
|
+
heading = titleId ? /*#__PURE__*/_react.default.createElement(_Styles.StyledDialogTitleHeading, {
|
|
40
40
|
id: titleId
|
|
41
41
|
}, children) : children;
|
|
42
42
|
} else if (titleId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogTitle.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_DialogContext","_Styles","_IconButton","_Icons","_Typography","_Header","_excluded","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_objectWithoutProperties","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","DialogTitle","exports","_ref","_dialog$requestClose","children","className","_ref$disableDefaultHe","disableDefaultHeading","onClose","_ref$closeLabel","closeLabel","rest","dialog","useDialogContext","titleId","registerTitle","useEffect","heading","createElement","id","Typography","as","variant","weight","Header3","handleClose","requestClose","StyledDialogTitle","classnames","StyledDialogTitleBar","StyledDialogTitleClose","IconButton","type","onClick","CancelCrossIcon","displayName"],"sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"sourcesContent":["import React, { PropsWithChildren, useEffect } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { useDialogContext } from \"./DialogContext\";\nimport {\n StyledDialogTitle,\n StyledDialogTitleBar,\n StyledDialogTitleClose,\n} from \"./Styles\";\nimport { IconButton } from \"../IconButton\";\nimport { CancelCrossIcon } from \"../Icons\";\nimport { Typography } from \"../Typography/Typography\";\nimport { Header3 } from \"../Typography/Variants/Header3\";\n\nexport interface DialogTitleProps {\n className?: string;\n disableDefaultHeading?: boolean;\n /** Draws a close button next to the heading. */\n onClose?: () => void;\n closeLabel?: string;\n}\n\nexport const DialogTitle = ({\n children,\n className,\n disableDefaultHeading = false,\n onClose,\n closeLabel = \"Close\",\n ...rest\n}: PropsWithChildren<DialogTitleProps>) => {\n const dialog = useDialogContext();\n const titleId = dialog?.titleId;\n const registerTitle = dialog?.registerTitle;\n\n useEffect(() => registerTitle?.(), [registerTitle]);\n\n let heading: React.ReactNode;\n\n if (disableDefaultHeading) {\n heading = titleId ? <
|
|
1
|
+
{"version":3,"file":"DialogTitle.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_DialogContext","_Styles","_IconButton","_Icons","_Typography","_Header","_excluded","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_objectWithoutProperties","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","DialogTitle","exports","_ref","_dialog$requestClose","children","className","_ref$disableDefaultHe","disableDefaultHeading","onClose","_ref$closeLabel","closeLabel","rest","dialog","useDialogContext","titleId","registerTitle","useEffect","heading","createElement","StyledDialogTitleHeading","id","Typography","as","variant","weight","Header3","handleClose","requestClose","StyledDialogTitle","classnames","StyledDialogTitleBar","StyledDialogTitleClose","IconButton","type","onClick","CancelCrossIcon","displayName"],"sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"sourcesContent":["import React, { PropsWithChildren, useEffect } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { useDialogContext } from \"./DialogContext\";\nimport {\n StyledDialogTitle,\n StyledDialogTitleBar,\n StyledDialogTitleClose,\n StyledDialogTitleHeading,\n} from \"./Styles\";\nimport { IconButton } from \"../IconButton\";\nimport { CancelCrossIcon } from \"../Icons\";\nimport { Typography } from \"../Typography/Typography\";\nimport { Header3 } from \"../Typography/Variants/Header3\";\n\nexport interface DialogTitleProps {\n className?: string;\n disableDefaultHeading?: boolean;\n /** Draws a close button next to the heading. */\n onClose?: () => void;\n closeLabel?: string;\n}\n\nexport const DialogTitle = ({\n children,\n className,\n disableDefaultHeading = false,\n onClose,\n closeLabel = \"Close\",\n ...rest\n}: PropsWithChildren<DialogTitleProps>) => {\n const dialog = useDialogContext();\n const titleId = dialog?.titleId;\n const registerTitle = dialog?.registerTitle;\n\n useEffect(() => registerTitle?.(), [registerTitle]);\n\n let heading: React.ReactNode;\n\n if (disableDefaultHeading) {\n heading = titleId ? (\n <StyledDialogTitleHeading id={titleId}>\n {children}\n </StyledDialogTitleHeading>\n ) : (\n children\n );\n } else if (titleId) {\n heading = (\n <Typography\n as=\"h2\"\n variant=\"Header 3\"\n weight=\"bold\"\n id={titleId}\n className=\"c-dialog-title\"\n >\n {children}\n </Typography>\n );\n } else {\n heading = <Header3>{children}</Header3>;\n }\n\n // Closing through the dialog lets the exit transition run; the caller's onClose fires once it\n // finishes. Falling back keeps a title used outside a dialog working.\n const handleClose = dialog?.requestClose ?? onClose;\n\n return (\n <StyledDialogTitle\n className={classnames(\"c-dialog-title-wrapper\", className)}\n {...rest}\n >\n {onClose ? (\n <StyledDialogTitleBar>\n {heading}\n <StyledDialogTitleClose>\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n aria-label={closeLabel}\n onClick={handleClose}\n >\n <CancelCrossIcon />\n </IconButton>\n </StyledDialogTitleClose>\n </StyledDialogTitleBar>\n ) : (\n heading\n )}\n </StyledDialogTitle>\n );\n};\n\nDialogTitle.displayName = \"DialogTitle\";\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAMA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAyD,IAAAS,SAAA;AAAA,SAAAP,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAX,wBAAAW,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,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,EAAE,IAAAwB,mBAAU,EAAC,wBAAwB,EAAExB,SAAS;EAAE,GACvDM,IAAI,GAEPH,OAAO,gBACNnD,MAAA,CAAAc,OAAA,CAAA+C,aAAA,CAACvD,OAAA,CAAAmE,oBAAoB,QAClBb,OAAO,eACR5D,MAAA,CAAAc,OAAA,CAAA+C,aAAA,CAACvD,OAAA,CAAAoE,sBAAsB,qBACrB1E,MAAA,CAAAc,OAAA,CAAA+C,aAAA,CAACtD,WAAA,CAAAoE,UAAU;IACTC,IAAI,EAAC,QAAQ;IACbV,OAAO,EAAC,WAAW;IACnB,cAAYb,UAAW;IACvBwB,OAAO,EAAER;EAAY,gBAErBrE,MAAA,CAAAc,OAAA,CAAA+C,aAAA,CAACrD,MAAA,CAAAsE,eAAe,MAAE,CACR,CACU,CACJ,CAAC,GAEvBlB,OAEe,CAAC;AAExB,CAAC;AAEDjB,WAAW,CAACoC,WAAW,GAAG,aAAa","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.dialogSizes = exports.StyledDialogViewport = exports.StyledDialogTitleClose = exports.StyledDialogTitleBar = exports.StyledDialogTitle = exports.StyledDialogContentDivider = exports.StyledDialogContent = exports.StyledDialogActions = exports.StyledDialog = void 0;
|
|
6
|
+
exports.dialogSizes = exports.StyledDialogViewport = exports.StyledDialogTitleHeading = exports.StyledDialogTitleClose = exports.StyledDialogTitleBar = exports.StyledDialogTitle = exports.StyledDialogContentDivider = exports.StyledDialogContent = exports.StyledDialogActions = exports.StyledDialog = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
8
|
var _BoxSizingStyle = require("../BoxSizingStyle");
|
|
9
9
|
var _BreakPoints = require("../BreakPoints");
|
|
@@ -54,26 +54,31 @@ var StyledDialogTitleBar = exports.StyledDialogTitleBar = _styledComponents.defa
|
|
|
54
54
|
componentId: "sc-jwpvgm-3"
|
|
55
55
|
})(["position:relative;display:flex;align-items:center;padding-right:", "px;"], CLOSE_RESERVE);
|
|
56
56
|
StyledDialogTitleBar.displayName = "StyledDialogTitleBar";
|
|
57
|
+
var StyledDialogTitleHeading = exports.StyledDialogTitleHeading = _styledComponents.default.div.withConfig({
|
|
58
|
+
displayName: "Styles__StyledDialogTitleHeading",
|
|
59
|
+
componentId: "sc-jwpvgm-4"
|
|
60
|
+
})(["flex:1;min-width:0;"]);
|
|
61
|
+
StyledDialogTitleHeading.displayName = "StyledDialogTitleHeading";
|
|
57
62
|
var StyledDialogTitleClose = exports.StyledDialogTitleClose = _styledComponents.default.div.withConfig({
|
|
58
63
|
displayName: "Styles__StyledDialogTitleClose",
|
|
59
|
-
componentId: "sc-jwpvgm-
|
|
64
|
+
componentId: "sc-jwpvgm-5"
|
|
60
65
|
})(["position:absolute;right:-", "px;top:50%;transform:translateY(-50%);line-height:0;"], CLOSE_OFFSET);
|
|
61
66
|
StyledDialogTitleClose.displayName = "StyledDialogTitleClose";
|
|
62
67
|
var StyledDialogContent = exports.StyledDialogContent = _styledComponents.default.div.withConfig({
|
|
63
68
|
displayName: "Styles__StyledDialogContent",
|
|
64
|
-
componentId: "sc-jwpvgm-
|
|
69
|
+
componentId: "sc-jwpvgm-6"
|
|
65
70
|
})(["padding:20px 30px;flex:1 1 auto;min-height:0;overscroll-behavior:contain;overflow-y:", ";", " ", ""], function (props) {
|
|
66
71
|
return props.$scroll ? "auto" : "visible";
|
|
67
72
|
}, _FontStyle.FontStyle, _BoxSizingStyle.BoxSizingStyle);
|
|
68
73
|
StyledDialogContent.displayName = "StyledDialogContent";
|
|
69
74
|
var StyledDialogContentDivider = exports.StyledDialogContentDivider = _styledComponents.default.div.withConfig({
|
|
70
75
|
displayName: "Styles__StyledDialogContentDivider",
|
|
71
|
-
componentId: "sc-jwpvgm-
|
|
76
|
+
componentId: "sc-jwpvgm-7"
|
|
72
77
|
})(["border-top:1px solid var(--border-primary);height:1px;flex:0 0 auto;"]);
|
|
73
78
|
StyledDialogContentDivider.displayName = "StyledDialogContentDivider";
|
|
74
79
|
var StyledDialogActions = exports.StyledDialogActions = _styledComponents.default.div.withConfig({
|
|
75
80
|
displayName: "Styles__StyledDialogActions",
|
|
76
|
-
componentId: "sc-jwpvgm-
|
|
81
|
+
componentId: "sc-jwpvgm-8"
|
|
77
82
|
})(["padding:20px 30px;flex:0 0 auto;display:flex;align-items:center;gap:12px;", " ", ""], _FontStyle.FontStyle, _BoxSizingStyle.BoxSizingStyle);
|
|
78
83
|
StyledDialogActions.displayName = "StyledDialogActions";
|
|
79
84
|
//# sourceMappingURL=Styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["_styledComponents","_interopRequireWildcard","require","_BoxSizingStyle","_BreakPoints","_FontStyle","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","dialogSizes","exports","s","m","l","xl","xxl","xxxl","MIN_GAP","MAX_DIALOG_HEIGHT","StyledDialogViewport","styled","div","withConfig","displayName","componentId","screen","sm","BoxSizingStyle","StyledDialog","props","$maxWidth","$height","css","FontStyle","StyledDialogTitle","CLOSE_OFFSET","CLOSE_RESERVE","StyledDialogTitleBar","StyledDialogTitleClose","StyledDialogContent","$scroll","StyledDialogContentDivider","StyledDialogActions"],"sources":["../../../../src/components/Dialog/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { screen } from \"../BreakPoints\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const dialogSizes = {\n s: 440,\n m: 540,\n l: 700,\n xl: 840,\n xxl: 1000,\n xxxl: 1120,\n} as const;\n\nexport type DialogSize = keyof typeof dialogSizes;\n\nconst MIN_GAP = \"2.5vh\";\nconst MAX_DIALOG_HEIGHT = \"95vh\";\n\n// The dialog hangs at a fixed offset while there is room below it, then grows in both directions at\n// once. Two shrinkable spacers express that: only the lower one grows, and past the crossover both\n// shrink from the same basis, so the gaps stay equal down to MIN_GAP.\nexport const StyledDialogViewport = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding-left: 16px;\n padding-right: 16px;\n pointer-events: none;\n\n --ac-dialog-offset: 60px;\n\n ${screen.sm} {\n --ac-dialog-offset: 126px;\n }\n\n &::before,\n &::after {\n content: \"\";\n flex-shrink: 1;\n flex-basis: var(--ac-dialog-offset);\n min-height: ${MIN_GAP};\n }\n\n &::before {\n flex-grow: 0;\n }\n\n &::after {\n flex-grow: 1;\n }\n\n ${BoxSizingStyle}\n`;\n\nStyledDialogViewport.displayName = \"StyledDialogViewport\";\n\nexport const StyledDialog = styled.div<{\n $maxWidth: number;\n $height?: string;\n}>`\n display: flex;\n flex-direction: column;\n flex: 0 0 auto;\n pointer-events: auto;\n width: 100%;\n max-width: ${(props) => props.$maxWidth}px;\n max-height: ${MAX_DIALOG_HEIGHT};\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n box-shadow: var(--shadow-primary);\n border-radius: 8px;\n position: relative;\n transition: max-width 0.2s ease, height 0.2s ease;\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n\n &[data-resizing],\n &[data-resizing] .c-dialog-content {\n overflow: hidden;\n }\n\n ${(props) =>\n props.$height &&\n css`\n height: ${props.$height};\n `}\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\n\nStyledDialog.displayName = \"StyledDialog\";\n\nexport const StyledDialogTitle = styled.div`\n padding: 20px 30px;\n flex: 0 0 auto;\n\n & h2.c-dialog-title {\n margin: 0;\n }\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogTitle.displayName = \"StyledDialogTitle\";\n\n// The close button hangs 8px into the title padding, so it sits nearer the dialog edge than the\n// heading does. The bar reserves the rest, which keeps the gap to the heading unchanged.\nconst CLOSE_OFFSET = 8;\nconst CLOSE_RESERVE = 44 - CLOSE_OFFSET;\n\n// The header is as tall as its heading, with or without a close button.\nexport const StyledDialogTitleBar = styled.div`\n position: relative;\n display: flex;\n align-items: center;\n padding-right: ${CLOSE_RESERVE}px;\n`;\nStyledDialogTitleBar.displayName = \"StyledDialogTitleBar\";\n\nexport const StyledDialogTitleClose = styled.div`\n position: absolute;\n right: -${CLOSE_OFFSET}px;\n top: 50%;\n transform: translateY(-50%);\n line-height: 0;\n`;\nStyledDialogTitleClose.displayName = \"StyledDialogTitleClose\";\n\nexport const StyledDialogContent = styled.div<{ $scroll: boolean }>`\n padding: 20px 30px;\n flex: 1 1 auto;\n min-height: 0;\n overscroll-behavior: contain;\n overflow-y: ${(props) => (props.$scroll ? \"auto\" : \"visible\")};\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogContent.displayName = \"StyledDialogContent\";\n\nexport const StyledDialogContentDivider = styled.div`\n border-top: 1px solid var(--border-primary);\n height: 1px;\n flex: 0 0 auto;\n`;\nStyledDialogContentDivider.displayName = \"StyledDialogContentDivider\";\n\nexport const StyledDialogActions = styled.div`\n padding: 20px 30px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: 12px;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogActions.displayName = \"StyledDialogActions\";\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAAyC,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,wBAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,E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AMK,YAAY,GAAAlB,OAAA,CAAAkB,YAAA,GAAGR,yBAAM,CAACC,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+bASvB,UAACK,KAAK;EAAA,OAAKA,KAAK,CAACC,SAAS;AAAA,GACzBZ,iBAAiB,EAiB7B,UAACW,KAAK;EAAA,OACNA,KAAK,CAACE,OAAO,QACbC,qBAAG,oBACSH,KAAK,CAACE,OAAO,CACxB;AAAA,GAEDE,oBAAS,EACTN,8BAAc,CACjB;AAEDC,YAAY,CAACL,WAAW,GAAG,cAAc;AAElC,IAAMW,iBAAiB,GAAAxB,OAAA,CAAAwB,iBAAA,GAAGd,yBAAM,CAACC,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gFAQvCS,oBAAS,EACTN,8BAAc,CACjB;AACDO,iBAAiB,CAACX,WAAW,GAAG,mBAAmB;;AAEnD;AACA;AACA,IAAMY,YAAY,GAAG,CAAC;AACtB,IAAMC,aAAa,GAAG,EAAE,GAAGD,YAAY;;AAEvC;AACO,IAAME,oBAAoB,GAAA3B,OAAA,CAAA2B,oBAAA,GAAGjB,yBAAM,CAACC,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gFAI3BY,aAAa,CAC/B;AACDC,oBAAoB,CAACd,WAAW,GAAG,sBAAsB;AAElD,IAAMe,
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["_styledComponents","_interopRequireWildcard","require","_BoxSizingStyle","_BreakPoints","_FontStyle","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","dialogSizes","exports","s","m","l","xl","xxl","xxxl","MIN_GAP","MAX_DIALOG_HEIGHT","StyledDialogViewport","styled","div","withConfig","displayName","componentId","screen","sm","BoxSizingStyle","StyledDialog","props","$maxWidth","$height","css","FontStyle","StyledDialogTitle","CLOSE_OFFSET","CLOSE_RESERVE","StyledDialogTitleBar","StyledDialogTitleHeading","StyledDialogTitleClose","StyledDialogContent","$scroll","StyledDialogContentDivider","StyledDialogActions"],"sources":["../../../../src/components/Dialog/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { screen } from \"../BreakPoints\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const dialogSizes = {\n s: 440,\n m: 540,\n l: 700,\n xl: 840,\n xxl: 1000,\n xxxl: 1120,\n} as const;\n\nexport type DialogSize = keyof typeof dialogSizes;\n\nconst MIN_GAP = \"2.5vh\";\nconst MAX_DIALOG_HEIGHT = \"95vh\";\n\n// The dialog hangs at a fixed offset while there is room below it, then grows in both directions at\n// once. Two shrinkable spacers express that: only the lower one grows, and past the crossover both\n// shrink from the same basis, so the gaps stay equal down to MIN_GAP.\nexport const StyledDialogViewport = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding-left: 16px;\n padding-right: 16px;\n pointer-events: none;\n\n --ac-dialog-offset: 60px;\n\n ${screen.sm} {\n --ac-dialog-offset: 126px;\n }\n\n &::before,\n &::after {\n content: \"\";\n flex-shrink: 1;\n flex-basis: var(--ac-dialog-offset);\n min-height: ${MIN_GAP};\n }\n\n &::before {\n flex-grow: 0;\n }\n\n &::after {\n flex-grow: 1;\n }\n\n ${BoxSizingStyle}\n`;\n\nStyledDialogViewport.displayName = \"StyledDialogViewport\";\n\nexport const StyledDialog = styled.div<{\n $maxWidth: number;\n $height?: string;\n}>`\n display: flex;\n flex-direction: column;\n flex: 0 0 auto;\n pointer-events: auto;\n width: 100%;\n max-width: ${(props) => props.$maxWidth}px;\n max-height: ${MAX_DIALOG_HEIGHT};\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n box-shadow: var(--shadow-primary);\n border-radius: 8px;\n position: relative;\n transition: max-width 0.2s ease, height 0.2s ease;\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n\n &[data-resizing],\n &[data-resizing] .c-dialog-content {\n overflow: hidden;\n }\n\n ${(props) =>\n props.$height &&\n css`\n height: ${props.$height};\n `}\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\n\nStyledDialog.displayName = \"StyledDialog\";\n\nexport const StyledDialogTitle = styled.div`\n padding: 20px 30px;\n flex: 0 0 auto;\n\n & h2.c-dialog-title {\n margin: 0;\n }\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogTitle.displayName = \"StyledDialogTitle\";\n\n// The close button hangs 8px into the title padding, so it sits nearer the dialog edge than the\n// heading does. The bar reserves the rest, which keeps the gap to the heading unchanged.\nconst CLOSE_OFFSET = 8;\nconst CLOSE_RESERVE = 44 - CLOSE_OFFSET;\n\n// The header is as tall as its heading, with or without a close button.\nexport const StyledDialogTitleBar = styled.div`\n position: relative;\n display: flex;\n align-items: center;\n padding-right: ${CLOSE_RESERVE}px;\n`;\nStyledDialogTitleBar.displayName = \"StyledDialogTitleBar\";\n\nexport const StyledDialogTitleHeading = styled.div`\n flex: 1;\n min-width: 0;\n`;\nStyledDialogTitleHeading.displayName = \"StyledDialogTitleHeading\";\n\nexport const StyledDialogTitleClose = styled.div`\n position: absolute;\n right: -${CLOSE_OFFSET}px;\n top: 50%;\n transform: translateY(-50%);\n line-height: 0;\n`;\nStyledDialogTitleClose.displayName = \"StyledDialogTitleClose\";\n\nexport const StyledDialogContent = styled.div<{ $scroll: boolean }>`\n padding: 20px 30px;\n flex: 1 1 auto;\n min-height: 0;\n overscroll-behavior: contain;\n overflow-y: ${(props) => (props.$scroll ? \"auto\" : \"visible\")};\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogContent.displayName = \"StyledDialogContent\";\n\nexport const StyledDialogContentDivider = styled.div`\n border-top: 1px solid var(--border-primary);\n height: 1px;\n flex: 0 0 auto;\n`;\nStyledDialogContentDivider.displayName = \"StyledDialogContentDivider\";\n\nexport const StyledDialogActions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terInput = exports.StyledFilterInput = (0, _styledComponents.defaul
|
|
|
13
13
|
componentId: "sc-bna484-0"
|
|
14
14
|
})(["&&{background-color:var(--color-theme-300);border-color:transparent;border-radius:16px;height:32px;padding-block:1px;padding-inline:8px;transition:background-color 150ms ease,box-shadow 150ms ease;width:120px;.c-input{background-color:transparent;}> svg:first-child{fill:var(--color-theme-700);flex-shrink:0;}&:hover:not(:focus-within){background-image:linear-gradient( color-mix(in srgb,var(--color-theme-900) 16%,transparent),color-mix(in srgb,var(--color-theme-900) 16%,transparent) );}", " &:focus-within{border-color:transparent;box-shadow:0 0 0 2px var(--color-primary);}}&&&.c-filter-input--split{background-color:transparent;border-radius:16px 0 0 16px;height:32px;padding-inline:10px;width:130px;", " &:focus-within{box-shadow:inset 0 0 0 2px var(--color-primary);}button{background:none;height:20px;left:4px;min-height:20px;min-width:20px;width:20px;&:hover{background:none;opacity:0.8;}svg{fill:var(--color-primary);height:20px;width:20px;}}}"], function (_ref) {
|
|
15
15
|
var $active = _ref.$active;
|
|
16
|
-
return $active && (0, _styledComponents.css)(["background-color:var(--page-paper-main);box-shadow:var(--shadow-float);> svg:first-child{fill:var(--color-theme-900);}"]);
|
|
16
|
+
return $active && (0, _styledComponents.css)(["background-color:var(--page-paper-main);box-shadow:0 0 0 2px var(--color-primary),var(--shadow-float);> svg:first-child{fill:var(--color-theme-900);}"]);
|
|
17
17
|
}, function (_ref2) {
|
|
18
18
|
var $active = _ref2.$active;
|
|
19
|
-
return $active && (0, _styledComponents.css)(["background-color:var(--page-paper-main);"]);
|
|
19
|
+
return $active && (0, _styledComponents.css)(["background-color:var(--page-paper-main);box-shadow:inset 0 0 0 2px var(--color-primary);"]);
|
|
20
20
|
});
|
|
21
21
|
var StyledClearButton = exports.StyledClearButton = (0, _styledComponents.default)(_IconButton.IconButton).withConfig({
|
|
22
22
|
displayName: "FilterInputstyles__StyledClearButton",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterInput.styles.js","names":["_styledComponents","_interopRequireWildcard","require","_IconButton","_Input","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledFilterInput","exports","styled","Input","withConfig","displayName","componentId","_ref","$active","css","_ref2","StyledClearButton","IconButton"],"sources":["../../../../src/components/FilterInput/FilterInput.styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { IconButton } from \"../IconButton\";\nimport { Input } from \"../Input\";\n\nexport const StyledFilterInput = styled(Input)<{ $active: boolean }>`\n && {\n background-color: var(--color-theme-300);\n border-color: transparent;\n border-radius: 16px;\n height: 32px;\n padding-block: 1px;\n padding-inline: 8px;\n transition: background-color 150ms ease, box-shadow 150ms ease;\n width: 120px;\n\n .c-input {\n background-color: transparent;\n }\n\n > svg:first-child {\n fill: var(--color-theme-700);\n flex-shrink: 0;\n }\n\n /* the hover of a view switcher option, clearly apart from the rest fill and from the paper */\n &:hover:not(:focus-within) {\n background-image: linear-gradient(\n color-mix(in srgb, var(--color-theme-900) 16%, transparent),\n color-mix(in srgb, var(--color-theme-900) 16%, transparent)\n );\n }\n\n ${({ $active }) =>\n $active &&\n css`\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-float);\n\n > svg:first-child {\n fill: var(--color-theme-900);\n }\n `}\n\n &:focus-within {\n border-color: transparent;\n box-shadow: 0 0 0 2px var(--color-primary);\n }\n }\n\n /* the left half of the split pill of a Filter: the pill owns the surface */\n &&&.c-filter-input--split {\n background-color: transparent;\n border-radius: 16px 0 0 16px;\n height: 32px;\n padding-inline: 10px;\n width: 130px;\n\n ${({ $active }) =>\n $active &&\n css`\n background-color: var(--page-paper-main);\n `}\n\n /* the ring stays inside the pill: round on the left, straight at the line to the Filter half */\n &:focus-within {\n box-shadow: inset 0 0 0 2px var(--color-primary);\n }\n\n /* in the pill the clear button looks as the reset button of the filter beside it */\n button {\n background: none;\n height: 20px;\n left: 4px;\n min-height: 20px;\n min-width: 20px;\n width: 20px;\n\n &:hover {\n background: none;\n opacity: 0.8;\n }\n\n svg {\n fill: var(--color-primary);\n height: 20px;\n width: 20px;\n }\n }\n }\n`;\n\nexport const StyledClearButton = styled(IconButton)`\n && {\n background-color: color-mix(in srgb, var(--color-primary) 25%, transparent);\n border-radius: 50%;\n flex-shrink: 0;\n height: 20px;\n left: 5px;\n min-height: 20px;\n min-width: 20px;\n padding: 0;\n position: relative;\n width: 20px;\n\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--color-primary) 40%,\n transparent\n );\n }\n\n svg {\n fill: var(--color-theme-900);\n height: 14px;\n width: 14px;\n }\n }\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAiC,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,wBAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,cAAAM,EAAA,IAAAd,CAAA,gBAAAc,EAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,EAAA,OAAAP,CAAA,IAAAD,CAAA,GAAAW,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,EAAAc,EAAA,OAAAP,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAM,EAAA,EAAAP,CAAA,IAAAC,CAAA,CAAAM,EAAA,IAAAd,CAAA,CAAAc,EAAA,WAAAN,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAE1B,IAAMmB,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,yBAAM,EAACC,YAAK,CAAC,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,k8BA4BxC,UAAAC,IAAA;EAAA,IAAGC,OAAO,GAAAD,IAAA,CAAPC,OAAO;EAAA,OACVA,OAAO,QACPC,qBAAG,
|
|
1
|
+
{"version":3,"file":"FilterInput.styles.js","names":["_styledComponents","_interopRequireWildcard","require","_IconButton","_Input","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledFilterInput","exports","styled","Input","withConfig","displayName","componentId","_ref","$active","css","_ref2","StyledClearButton","IconButton"],"sources":["../../../../src/components/FilterInput/FilterInput.styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { IconButton } from \"../IconButton\";\nimport { Input } from \"../Input\";\n\nexport const StyledFilterInput = styled(Input)<{ $active: boolean }>`\n && {\n background-color: var(--color-theme-300);\n border-color: transparent;\n border-radius: 16px;\n height: 32px;\n padding-block: 1px;\n padding-inline: 8px;\n transition: background-color 150ms ease, box-shadow 150ms ease;\n width: 120px;\n\n .c-input {\n background-color: transparent;\n }\n\n > svg:first-child {\n fill: var(--color-theme-700);\n flex-shrink: 0;\n }\n\n /* the hover of a view switcher option, clearly apart from the rest fill and from the paper */\n &:hover:not(:focus-within) {\n background-image: linear-gradient(\n color-mix(in srgb, var(--color-theme-900) 16%, transparent),\n color-mix(in srgb, var(--color-theme-900) 16%, transparent)\n );\n }\n\n ${({ $active }) =>\n $active &&\n css`\n background-color: var(--page-paper-main);\n /* a search in force keeps the ring after the field loses the focus */\n box-shadow: 0 0 0 2px var(--color-primary), var(--shadow-float);\n\n > svg:first-child {\n fill: var(--color-theme-900);\n }\n `}\n\n &:focus-within {\n border-color: transparent;\n box-shadow: 0 0 0 2px var(--color-primary);\n }\n }\n\n /* the left half of the split pill of a Filter: the pill owns the surface */\n &&&.c-filter-input--split {\n background-color: transparent;\n border-radius: 16px 0 0 16px;\n height: 32px;\n padding-inline: 10px;\n width: 130px;\n\n ${({ $active }) =>\n $active &&\n css`\n background-color: var(--page-paper-main);\n box-shadow: inset 0 0 0 2px var(--color-primary);\n `}\n\n /* the ring stays inside the pill: round on the left, straight at the line to the Filter half */\n &:focus-within {\n box-shadow: inset 0 0 0 2px var(--color-primary);\n }\n\n /* in the pill the clear button looks as the reset button of the filter beside it */\n button {\n background: none;\n height: 20px;\n left: 4px;\n min-height: 20px;\n min-width: 20px;\n width: 20px;\n\n &:hover {\n background: none;\n opacity: 0.8;\n }\n\n svg {\n fill: var(--color-primary);\n height: 20px;\n width: 20px;\n }\n }\n }\n`;\n\nexport const StyledClearButton = styled(IconButton)`\n && {\n background-color: color-mix(in srgb, var(--color-primary) 25%, transparent);\n border-radius: 50%;\n flex-shrink: 0;\n height: 20px;\n left: 5px;\n min-height: 20px;\n min-width: 20px;\n padding: 0;\n position: relative;\n width: 20px;\n\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--color-primary) 40%,\n transparent\n );\n }\n\n svg {\n fill: var(--color-theme-900);\n height: 14px;\n width: 14px;\n }\n }\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAiC,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CA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,IAAME,iBAAiB,GAAAV,OAAA,CAAAU,iBAAA,GAAG,IAAAT,yBAAM,EAACU,sBAAU,CAAC,CAAAR,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,4VA2BlD","ignoreList":[]}
|
|
@@ -68,12 +68,23 @@ var Tooltip = exports.Tooltip = /*#__PURE__*/(0, _react.forwardRef)(function (_r
|
|
|
68
68
|
setArmed = _useState4[1];
|
|
69
69
|
// A ref, not state: state would render every tooltip again right after it mounts.
|
|
70
70
|
var childNode = (0, _react.useRef)(null);
|
|
71
|
-
|
|
71
|
+
var lastChildNode = (0, _react.useRef)(null);
|
|
72
|
+
// A trigger that leaves the page sends no mouseleave, so its tooltip closes here. A router link hands a new ref
|
|
73
|
+
// callback on every render, so a null that the same node follows in the same commit is no leave.
|
|
72
74
|
var setChildNode = (0, _react.useCallback)(function (node) {
|
|
73
75
|
childNode.current = node;
|
|
74
|
-
if (
|
|
75
|
-
|
|
76
|
+
if (node) {
|
|
77
|
+
if (lastChildNode.current && node !== lastChildNode.current) {
|
|
78
|
+
setOpen(false);
|
|
79
|
+
}
|
|
80
|
+
lastChildNode.current = node;
|
|
81
|
+
return;
|
|
76
82
|
}
|
|
83
|
+
Promise.resolve().then(function () {
|
|
84
|
+
if (!childNode.current) {
|
|
85
|
+
setOpen(false);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
77
88
|
}, []);
|
|
78
89
|
|
|
79
90
|
// A mouseleave can also get lost under a still pointer, so any pointer move outside the trigger closes it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_Styles","_helpers","_utils","_useForkRef","_Popper","_FromElement","_excluded","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","l","iterator","u","next","done","return","isArray","_extends","assign","bind","_objectWithoutProperties","_objectWithoutPropertiesLoose","indexOf","propertyIsEnumerable","TooltipAnimation","_ref","children","props","createElement","FromElement","timeout","enter","exit","FROM_ELEMENT_FADE_OUT","Tooltip","exports","forwardRef","_ref2","ref","title","className","style","_ref2$isLight","isLight","_ref2$placement","placement","_ref2$TransitionCompo","TransitionComponent","popperTooltipStyle","popperTooltipClassName","disable","popperModifiers","_useLayerContext","useLayerContext","_useLayerContext$zInd","zIndex","layers","skyscraper","_useState","useState","_useState2","open","setOpen","_useState3","_useState4","armed","setArmed","childNode","useRef","setChildNode","useCallback","node","current","useEffect","undefined","closeOutsideTrigger","event","_childNode$current","contains","target","document","addEventListener","removeEventListener","handleEnter","_childNode$current2","childrenProps","type","onMouseOver","removeAttribute","handleLeave","onMouseLeave","currentTarget","handleOwnRef","useForkRef","handleRef","Fragment","React","cloneElement","Portal","Popper","anchorEl","transition","modifiers","role","_ref3","_ref3$transitionProps","transitionProps","StyledTooltip","classnames","$isLight","displayName"],"sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import React, {\n ReactElement,\n useCallback,\n useEffect,\n useRef,\n useState,\n CSSProperties,\n MouseEvent,\n forwardRef,\n Ref,\n FC,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { StyledTooltip } from \"./Styles\";\nimport { Portal, useLayerContext } from \"../../helpers\";\nimport { layers } from \"../../utils\";\nimport useForkRef from \"../../utils/useForkRef\";\nimport { Popper, Placement, PopperModifier } from \"../Popper\";\nimport { TransitionProps } from \"../Transitions\";\nimport { FromElement, FROM_ELEMENT_FADE_OUT } from \"../Transitions/FromElement\";\n\ninterface ElementWithRef<T> extends ReactElement {\n ref?: Ref<T>;\n}\n\nexport interface ITooltipProps {\n /** Children element. */\n children: ElementWithRef<HTMLElement>;\n /** Title element. */\n title: ReactElement | string;\n /** Applies passed styles */\n style?: CSSProperties;\n /** Applies passed classes */\n className?: string;\n /** Open */\n open?: boolean;\n /** Placement */\n placement?: Placement;\n /** Transition component */\n TransitionComponent?: React.FC<TransitionProps>;\n /** Light tooltip */\n isLight?: boolean;\n /** Popper Tooltip style */\n popperTooltipStyle?: CSSProperties;\n /** Popper Tooltip class name*/\n popperTooltipClassName?: string;\n /** Remove tooltip */\n disable?: boolean;\n /** Extra Popper.js modifiers for the tooltip popper */\n popperModifiers?: PopperModifier[];\n}\n\ninterface ITooltipAnimation extends TransitionProps {\n children: ReactElement;\n}\n\nconst TooltipAnimation: FC<ITooltipAnimation> = ({ children, ...props }) => {\n return (\n <FromElement timeout={{ enter: 0, exit: FROM_ELEMENT_FADE_OUT }} {...props}>\n {children}\n </FromElement>\n );\n};\n\nexport const Tooltip = forwardRef<HTMLElement, ITooltipProps>(\n (\n {\n children,\n title,\n className,\n style,\n isLight = false,\n placement = \"top\",\n TransitionComponent = TooltipAnimation,\n popperTooltipStyle,\n popperTooltipClassName,\n disable,\n popperModifiers,\n },\n ref\n ) => {\n const { zIndex = layers.skyscraper } = useLayerContext();\n const [open, setOpen] = useState(false);\n // The popper mounts on the first hover. A list with a tooltip in every row mounts none of them before.\n const [armed, setArmed] = useState(false);\n // A ref, not state: state would render every tooltip again right after it mounts.\n const childNode = useRef<HTMLElement | null>(null);\n // A trigger that leaves the page sends no mouseleave, so its tooltip closes here.\n const setChildNode = useCallback((node: HTMLElement | null) => {\n childNode.current = node;\n\n if (!node) {\n setOpen(false);\n }\n }, []);\n\n // A mouseleave can also get lost under a still pointer, so any pointer move outside the trigger closes it.\n useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n const closeOutsideTrigger = (event: globalThis.MouseEvent): void => {\n if (!childNode.current?.contains(event.target as Node)) {\n setOpen(false);\n }\n };\n\n document.addEventListener(\"mouseover\", closeOutsideTrigger, true);\n\n return () =>\n document.removeEventListener(\"mouseover\", closeOutsideTrigger, true);\n }, [open]);\n\n const handleEnter = (event: MouseEvent<HTMLElement>): void => {\n const childrenProps = children.props;\n\n if (event.type === \"mouseover\" && childrenProps.onMouseOver) {\n childrenProps.onMouseOver(event);\n }\n\n childNode.current?.removeAttribute(\"title\");\n\n setArmed(true);\n setOpen(true);\n };\n\n const handleLeave = (event: MouseEvent<HTMLElement>): void => {\n const childrenProps = children.props;\n\n if (\n event.type === \"mouseleave\" &&\n childrenProps.onMouseLeave &&\n event.currentTarget === childNode.current\n ) {\n childrenProps.onMouseLeave(event);\n }\n\n setOpen(false);\n };\n\n const handleOwnRef = useForkRef(children.ref, ref);\n const handleRef = useForkRef(setChildNode, handleOwnRef);\n\n const childrenProps = {\n onMouseOver: handleEnter,\n onMouseLeave: handleLeave,\n ref: handleRef,\n };\n\n return (\n <>\n {React.cloneElement(children, childrenProps)}\n {!disable && armed && (\n <Portal>\n <Popper\n anchorEl={childNode.current}\n open={childNode.current ? open : false}\n placement={placement}\n transition\n modifiers={popperModifiers}\n className={popperTooltipClassName}\n style={{ zIndex, ...popperTooltipStyle }}\n role=\"tooltip\"\n >\n {({ transitionProps = {} }) => (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore - due to @node/types making ts more strict\n <TransitionComponent {...transitionProps} style={style}>\n <StyledTooltip\n className={classnames(\"c-tooltip-ds\", className)}\n $isLight={isLight}\n >\n {title}\n </StyledTooltip>\n </TransitionComponent>\n )}\n </Popper>\n </Portal>\n )}\n </>\n );\n }\n);\n\nTooltip.displayName = \"Tooltip\";\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAaA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IA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AQ;IAC5BX,IAAI,EAAEM,SAAS,CAACK,OAAO,GAAGX,IAAI,GAAG,KAAM;IACvChB,SAAS,EAAEA,SAAU;IACrBwD,UAAU;IACVC,SAAS,EAAEnD,eAAgB;IAC3BX,SAAS,EAAES,sBAAuB;IAClCR,KAAK,EAAA9D,aAAA;MAAI4E;IAAM,GAAKP,kBAAkB,CAAG;IACzCuD,IAAI,EAAC;EAAS,GAEb,UAAAC,KAAA;IAAA,IAAAC,qBAAA,GAAAD,KAAA,CAAGE,eAAe;MAAfA,eAAe,GAAAD,qBAAA,cAAG,CAAC,CAAC,GAAAA,qBAAA;IAAA;MAAA;MACtB;MACA;MACArK,MAAA,CAAAc,OAAA,CAAA0E,aAAA,CAACmB,mBAAmB,EAAA9B,QAAA,KAAKyF,eAAe;QAAEjE,KAAK,EAAEA;MAAM,iBACrDrG,MAAA,CAAAc,OAAA,CAAA0E,aAAA,CAACnF,OAAA,CAAAkK,aAAa;QACZnE,SAAS,EAAE,IAAAoE,mBAAU,EAAC,cAAc,EAAEpE,SAAS,CAAE;QACjDqE,QAAQ,EAAElE;MAAQ,GAEjBJ,KACY,CACI;IAAC;EAAA,CAElB,CACF,CAEV,CAAC;AAEP,CACF,CAAC;AAEDL,OAAO,CAAC4E,WAAW,GAAG,SAAS","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Tooltip.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_Styles","_helpers","_utils","_useForkRef","_Popper","_FromElement","_excluded","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","l","iterator","u","next","done","return","isArray","_extends","assign","bind","_objectWithoutProperties","_objectWithoutPropertiesLoose","indexOf","propertyIsEnumerable","TooltipAnimation","_ref","children","props","createElement","FromElement","timeout","enter","exit","FROM_ELEMENT_FADE_OUT","Tooltip","exports","forwardRef","_ref2","ref","title","className","style","_ref2$isLight","isLight","_ref2$placement","placement","_ref2$TransitionCompo","TransitionComponent","popperTooltipStyle","popperTooltipClassName","disable","popperModifiers","_useLayerContext","useLayerContext","_useLayerContext$zInd","zIndex","layers","skyscraper","_useState","useState","_useState2","open","setOpen","_useState3","_useState4","armed","setArmed","childNode","useRef","lastChildNode","setChildNode","useCallback","node","current","Promise","resolve","then","useEffect","undefined","closeOutsideTrigger","event","_childNode$current","contains","target","document","addEventListener","removeEventListener","handleEnter","_childNode$current2","childrenProps","type","onMouseOver","removeAttribute","handleLeave","onMouseLeave","currentTarget","handleOwnRef","useForkRef","handleRef","Fragment","React","cloneElement","Portal","Popper","anchorEl","transition","modifiers","role","_ref3","_ref3$transitionProps","transitionProps","StyledTooltip","classnames","$isLight","displayName"],"sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import React, {\n ReactElement,\n useCallback,\n useEffect,\n useRef,\n useState,\n CSSProperties,\n MouseEvent,\n forwardRef,\n Ref,\n FC,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { StyledTooltip } from \"./Styles\";\nimport { Portal, useLayerContext } from \"../../helpers\";\nimport { layers } from \"../../utils\";\nimport useForkRef from \"../../utils/useForkRef\";\nimport { Popper, Placement, PopperModifier } from \"../Popper\";\nimport { TransitionProps } from \"../Transitions\";\nimport { FromElement, FROM_ELEMENT_FADE_OUT } from \"../Transitions/FromElement\";\n\ninterface ElementWithRef<T> extends ReactElement {\n ref?: Ref<T>;\n}\n\nexport interface ITooltipProps {\n /** Children element. */\n children: ElementWithRef<HTMLElement>;\n /** Title element. */\n title: ReactElement | string;\n /** Applies passed styles */\n style?: CSSProperties;\n /** Applies passed classes */\n className?: string;\n /** Open */\n open?: boolean;\n /** Placement */\n placement?: Placement;\n /** Transition component */\n TransitionComponent?: React.FC<TransitionProps>;\n /** Light tooltip */\n isLight?: boolean;\n /** Popper Tooltip style */\n popperTooltipStyle?: CSSProperties;\n /** Popper Tooltip class name*/\n popperTooltipClassName?: string;\n /** Remove tooltip */\n disable?: boolean;\n /** Extra Popper.js modifiers for the tooltip popper */\n popperModifiers?: PopperModifier[];\n}\n\ninterface ITooltipAnimation extends TransitionProps {\n children: ReactElement;\n}\n\nconst TooltipAnimation: FC<ITooltipAnimation> = ({ children, ...props }) => {\n return (\n <FromElement timeout={{ enter: 0, exit: FROM_ELEMENT_FADE_OUT }} {...props}>\n {children}\n </FromElement>\n );\n};\n\nexport const Tooltip = forwardRef<HTMLElement, ITooltipProps>(\n (\n {\n children,\n title,\n className,\n style,\n isLight = false,\n placement = \"top\",\n TransitionComponent = TooltipAnimation,\n popperTooltipStyle,\n popperTooltipClassName,\n disable,\n popperModifiers,\n },\n ref\n ) => {\n const { zIndex = layers.skyscraper } = useLayerContext();\n const [open, setOpen] = useState(false);\n // The popper mounts on the first hover. A list with a tooltip in every row mounts none of them before.\n const [armed, setArmed] = useState(false);\n // A ref, not state: state would render every tooltip again right after it mounts.\n const childNode = useRef<HTMLElement | null>(null);\n const lastChildNode = useRef<HTMLElement | null>(null);\n // A trigger that leaves the page sends no mouseleave, so its tooltip closes here. A router link hands a new ref\n // callback on every render, so a null that the same node follows in the same commit is no leave.\n const setChildNode = useCallback((node: HTMLElement | null) => {\n childNode.current = node;\n\n if (node) {\n if (lastChildNode.current && node !== lastChildNode.current) {\n setOpen(false);\n }\n\n lastChildNode.current = node;\n\n return;\n }\n\n Promise.resolve().then(() => {\n if (!childNode.current) {\n setOpen(false);\n }\n });\n }, []);\n\n // A mouseleave can also get lost under a still pointer, so any pointer move outside the trigger closes it.\n useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n const closeOutsideTrigger = (event: globalThis.MouseEvent): void => {\n if (!childNode.current?.contains(event.target as Node)) {\n setOpen(false);\n }\n };\n\n document.addEventListener(\"mouseover\", closeOutsideTrigger, true);\n\n return () =>\n document.removeEventListener(\"mouseover\", closeOutsideTrigger, true);\n }, [open]);\n\n const handleEnter = (event: MouseEvent<HTMLElement>): void => {\n const childrenProps = children.props;\n\n if (event.type === \"mouseover\" && childrenProps.onMouseOver) {\n childrenProps.onMouseOver(event);\n }\n\n childNode.current?.removeAttribute(\"title\");\n\n setArmed(true);\n setOpen(true);\n };\n\n const handleLeave = (event: MouseEvent<HTMLElement>): void => {\n const childrenProps = children.props;\n\n if (\n event.type === \"mouseleave\" &&\n childrenProps.onMouseLeave &&\n event.currentTarget === childNode.current\n ) {\n childrenProps.onMouseLeave(event);\n }\n\n setOpen(false);\n };\n\n const handleOwnRef = useForkRef(children.ref, ref);\n const handleRef = useForkRef(setChildNode, handleOwnRef);\n\n const childrenProps = {\n onMouseOver: handleEnter,\n onMouseLeave: handleLeave,\n ref: handleRef,\n };\n\n return (\n <>\n {React.cloneElement(children, childrenProps)}\n {!disable && armed && (\n <Portal>\n <Popper\n anchorEl={childNode.current}\n open={childNode.current ? open : false}\n placement={placement}\n transition\n modifiers={popperModifiers}\n className={popperTooltipClassName}\n style={{ zIndex, ...popperTooltipStyle }}\n role=\"tooltip\"\n >\n {({ transitionProps = {} }) => (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore - due to @node/types making ts more strict\n <TransitionComponent {...transitionProps} style={style}>\n <StyledTooltip\n className={classnames(\"c-tooltip-ds\", className)}\n $isLight={isLight}\n >\n {title}\n </StyledTooltip>\n </TransitionComponent>\n )}\n </Popper>\n </Portal>\n )}\n </>\n );\n }\n);\n\nTooltip.displayName = \"Tooltip\";\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAaA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AA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@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DialogTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAgB5D,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,WAAW;mFAOrB,iBAAiB,CAAC,gBAAgB,CAAC;;CA6DrC,CAAC"}
|
|
@@ -4,7 +4,7 @@ const _excluded = ["children", "className", "disableDefaultHeading", "onClose",
|
|
|
4
4
|
import React, { useEffect } from "react";
|
|
5
5
|
import classnames from "classnames";
|
|
6
6
|
import { useDialogContext } from "./DialogContext";
|
|
7
|
-
import { StyledDialogTitle, StyledDialogTitleBar, StyledDialogTitleClose } from "./Styles";
|
|
7
|
+
import { StyledDialogTitle, StyledDialogTitleBar, StyledDialogTitleClose, StyledDialogTitleHeading } from "./Styles";
|
|
8
8
|
import { IconButton } from "../IconButton";
|
|
9
9
|
import { CancelCrossIcon } from "../Icons";
|
|
10
10
|
import { Typography } from "../Typography/Typography";
|
|
@@ -25,7 +25,7 @@ export const DialogTitle = _ref => {
|
|
|
25
25
|
useEffect(() => registerTitle == null ? void 0 : registerTitle(), [registerTitle]);
|
|
26
26
|
let heading;
|
|
27
27
|
if (disableDefaultHeading) {
|
|
28
|
-
heading = titleId ? /*#__PURE__*/React.createElement(
|
|
28
|
+
heading = titleId ? /*#__PURE__*/React.createElement(StyledDialogTitleHeading, {
|
|
29
29
|
id: titleId
|
|
30
30
|
}, children) : children;
|
|
31
31
|
} else if (titleId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogTitle.js","names":["React","useEffect","classnames","useDialogContext","StyledDialogTitle","StyledDialogTitleBar","StyledDialogTitleClose","IconButton","CancelCrossIcon","Typography","Header3","DialogTitle","_ref","_dialog$requestClose","children","className","_ref$disableDefaultHe","disableDefaultHeading","onClose","_ref$closeLabel","closeLabel","rest","_objectWithoutPropertiesLoose","_excluded","dialog","titleId","registerTitle","heading","createElement","id","as","variant","weight","handleClose","requestClose","_extends","type","onClick","displayName"],"sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"sourcesContent":["import React, { PropsWithChildren, useEffect } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { useDialogContext } from \"./DialogContext\";\nimport {\n StyledDialogTitle,\n StyledDialogTitleBar,\n StyledDialogTitleClose,\n} from \"./Styles\";\nimport { IconButton } from \"../IconButton\";\nimport { CancelCrossIcon } from \"../Icons\";\nimport { Typography } from \"../Typography/Typography\";\nimport { Header3 } from \"../Typography/Variants/Header3\";\n\nexport interface DialogTitleProps {\n className?: string;\n disableDefaultHeading?: boolean;\n /** Draws a close button next to the heading. */\n onClose?: () => void;\n closeLabel?: string;\n}\n\nexport const DialogTitle = ({\n children,\n className,\n disableDefaultHeading = false,\n onClose,\n closeLabel = \"Close\",\n ...rest\n}: PropsWithChildren<DialogTitleProps>) => {\n const dialog = useDialogContext();\n const titleId = dialog?.titleId;\n const registerTitle = dialog?.registerTitle;\n\n useEffect(() => registerTitle?.(), [registerTitle]);\n\n let heading: React.ReactNode;\n\n if (disableDefaultHeading) {\n heading = titleId ? <
|
|
1
|
+
{"version":3,"file":"DialogTitle.js","names":["React","useEffect","classnames","useDialogContext","StyledDialogTitle","StyledDialogTitleBar","StyledDialogTitleClose","StyledDialogTitleHeading","IconButton","CancelCrossIcon","Typography","Header3","DialogTitle","_ref","_dialog$requestClose","children","className","_ref$disableDefaultHe","disableDefaultHeading","onClose","_ref$closeLabel","closeLabel","rest","_objectWithoutPropertiesLoose","_excluded","dialog","titleId","registerTitle","heading","createElement","id","as","variant","weight","handleClose","requestClose","_extends","type","onClick","displayName"],"sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"sourcesContent":["import React, { PropsWithChildren, useEffect } from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { useDialogContext } from \"./DialogContext\";\nimport {\n StyledDialogTitle,\n StyledDialogTitleBar,\n StyledDialogTitleClose,\n StyledDialogTitleHeading,\n} from \"./Styles\";\nimport { IconButton } from \"../IconButton\";\nimport { CancelCrossIcon } from \"../Icons\";\nimport { Typography } from \"../Typography/Typography\";\nimport { Header3 } from \"../Typography/Variants/Header3\";\n\nexport interface DialogTitleProps {\n className?: string;\n disableDefaultHeading?: boolean;\n /** Draws a close button next to the heading. */\n onClose?: () => void;\n closeLabel?: string;\n}\n\nexport const DialogTitle = ({\n children,\n className,\n disableDefaultHeading = false,\n onClose,\n closeLabel = \"Close\",\n ...rest\n}: PropsWithChildren<DialogTitleProps>) => {\n const dialog = useDialogContext();\n const titleId = dialog?.titleId;\n const registerTitle = dialog?.registerTitle;\n\n useEffect(() => registerTitle?.(), [registerTitle]);\n\n let heading: React.ReactNode;\n\n if (disableDefaultHeading) {\n heading = titleId ? (\n <StyledDialogTitleHeading id={titleId}>\n {children}\n </StyledDialogTitleHeading>\n ) : (\n children\n );\n } else if (titleId) {\n heading = (\n <Typography\n as=\"h2\"\n variant=\"Header 3\"\n weight=\"bold\"\n id={titleId}\n className=\"c-dialog-title\"\n >\n {children}\n </Typography>\n );\n } else {\n heading = <Header3>{children}</Header3>;\n }\n\n // Closing through the dialog lets the exit transition run; the caller's onClose fires once it\n // finishes. Falling back keeps a title used outside a dialog working.\n const handleClose = dialog?.requestClose ?? onClose;\n\n return (\n <StyledDialogTitle\n className={classnames(\"c-dialog-title-wrapper\", className)}\n {...rest}\n >\n {onClose ? (\n <StyledDialogTitleBar>\n {heading}\n <StyledDialogTitleClose>\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n aria-label={closeLabel}\n onClick={handleClose}\n >\n <CancelCrossIcon />\n </IconButton>\n </StyledDialogTitleClose>\n </StyledDialogTitleBar>\n ) : (\n heading\n )}\n </StyledDialogTitle>\n );\n};\n\nDialogTitle.displayName = \"DialogTitle\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAuBC,SAAS,QAAQ,OAAO;AAE3D,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,gBAAgB,QAAQ,iBAAiB;AAClD,SACEC,iBAAiB,EACjBC,oBAAoB,EACpBC,sBAAsB,EACtBC,wBAAwB,QACnB,UAAU;AACjB,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,eAAe,QAAQ,UAAU;AAC1C,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SAASC,OAAO,QAAQ,gCAAgC;AAUxD,OAAO,MAAMC,WAAW,GAAGC,IAAA,IAOgB;EAAA,IAAAC,oBAAA;EAAA,IANzCC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAAC,qBAAA,GAAAJ,IAAA,CACTK,qBAAqB;IAArBA,qBAAqB,GAAAD,qBAAA,cAAG,KAAK,GAAAA,qBAAA;IAC7BE,OAAO,GAAAN,IAAA,CAAPM,OAAO;IAAAC,eAAA,GAAAP,IAAA,CACPQ,UAAU;IAAVA,UAAU,GAAAD,eAAA,cAAG,OAAO,GAAAA,eAAA;IACjBE,IAAI,GAAAC,6BAAA,CAAAV,IAAA,EAAAW,SAAA;EAEP,MAAMC,MAAM,GAAGtB,gBAAgB,CAAC,CAAC;EACjC,MAAMuB,OAAO,GAAGD,MAAM,oBAANA,MAAM,CAAEC,OAAO;EAC/B,MAAMC,aAAa,GAAGF,MAAM,oBAANA,MAAM,CAAEE,aAAa;EAE3C1B,SAAS,CAAC,M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GAAG,aAAa","ignoreList":[]}
|
|
@@ -14,6 +14,7 @@ export declare const StyledDialog: import("styled-components").StyledComponent<"
|
|
|
14
14
|
}, never>;
|
|
15
15
|
export declare const StyledDialogTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
16
|
export declare const StyledDialogTitleBar: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
+
export declare const StyledDialogTitleHeading: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
18
|
export declare const StyledDialogTitleClose: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
18
19
|
export declare const StyledDialogContent: import("styled-components").StyledComponent<"div", any, {
|
|
19
20
|
$scroll: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/Styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;CAOd,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAC;AAQlD,eAAO,MAAM,oBAAoB,oEAoChC,CAAC;AAIF,eAAO,MAAM,YAAY;eACZ,MAAM;cACP,MAAM;SAiCjB,CAAC;AAIF,eAAO,MAAM,iBAAiB,oEAU7B,CAAC;AASF,eAAO,MAAM,oBAAoB,oEAKhC,CAAC;AAGF,eAAO,MAAM,sBAAsB,oEAMlC,CAAC;AAGF,eAAO,MAAM,mBAAmB;aAAyB,OAAO;SAS/D,CAAC;AAGF,eAAO,MAAM,0BAA0B,oEAItC,CAAC;AAGF,eAAO,MAAM,mBAAmB,oEAS/B,CAAC"}
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/Styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;CAOd,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAC;AAQlD,eAAO,MAAM,oBAAoB,oEAoChC,CAAC;AAIF,eAAO,MAAM,YAAY;eACZ,MAAM;cACP,MAAM;SAiCjB,CAAC;AAIF,eAAO,MAAM,iBAAiB,oEAU7B,CAAC;AASF,eAAO,MAAM,oBAAoB,oEAKhC,CAAC;AAGF,eAAO,MAAM,wBAAwB,oEAGpC,CAAC;AAGF,eAAO,MAAM,sBAAsB,oEAMlC,CAAC;AAGF,eAAO,MAAM,mBAAmB;aAAyB,OAAO;SAS/D,CAAC;AAGF,eAAO,MAAM,0BAA0B,oEAItC,CAAC;AAGF,eAAO,MAAM,mBAAmB,oEAS/B,CAAC"}
|
|
@@ -43,24 +43,29 @@ export const StyledDialogTitleBar = styled.div.withConfig({
|
|
|
43
43
|
componentId: "sc-jwpvgm-3"
|
|
44
44
|
})(["position:relative;display:flex;align-items:center;padding-right:", "px;"], CLOSE_RESERVE);
|
|
45
45
|
StyledDialogTitleBar.displayName = "StyledDialogTitleBar";
|
|
46
|
+
export const StyledDialogTitleHeading = styled.div.withConfig({
|
|
47
|
+
displayName: "Styles__StyledDialogTitleHeading",
|
|
48
|
+
componentId: "sc-jwpvgm-4"
|
|
49
|
+
})(["flex:1;min-width:0;"]);
|
|
50
|
+
StyledDialogTitleHeading.displayName = "StyledDialogTitleHeading";
|
|
46
51
|
export const StyledDialogTitleClose = styled.div.withConfig({
|
|
47
52
|
displayName: "Styles__StyledDialogTitleClose",
|
|
48
|
-
componentId: "sc-jwpvgm-
|
|
53
|
+
componentId: "sc-jwpvgm-5"
|
|
49
54
|
})(["position:absolute;right:-", "px;top:50%;transform:translateY(-50%);line-height:0;"], CLOSE_OFFSET);
|
|
50
55
|
StyledDialogTitleClose.displayName = "StyledDialogTitleClose";
|
|
51
56
|
export const StyledDialogContent = styled.div.withConfig({
|
|
52
57
|
displayName: "Styles__StyledDialogContent",
|
|
53
|
-
componentId: "sc-jwpvgm-
|
|
58
|
+
componentId: "sc-jwpvgm-6"
|
|
54
59
|
})(["padding:20px 30px;flex:1 1 auto;min-height:0;overscroll-behavior:contain;overflow-y:", ";", " ", ""], props => props.$scroll ? "auto" : "visible", FontStyle, BoxSizingStyle);
|
|
55
60
|
StyledDialogContent.displayName = "StyledDialogContent";
|
|
56
61
|
export const StyledDialogContentDivider = styled.div.withConfig({
|
|
57
62
|
displayName: "Styles__StyledDialogContentDivider",
|
|
58
|
-
componentId: "sc-jwpvgm-
|
|
63
|
+
componentId: "sc-jwpvgm-7"
|
|
59
64
|
})(["border-top:1px solid var(--border-primary);height:1px;flex:0 0 auto;"]);
|
|
60
65
|
StyledDialogContentDivider.displayName = "StyledDialogContentDivider";
|
|
61
66
|
export const StyledDialogActions = styled.div.withConfig({
|
|
62
67
|
displayName: "Styles__StyledDialogActions",
|
|
63
|
-
componentId: "sc-jwpvgm-
|
|
68
|
+
componentId: "sc-jwpvgm-8"
|
|
64
69
|
})(["padding:20px 30px;flex:0 0 auto;display:flex;align-items:center;gap:12px;", " ", ""], FontStyle, BoxSizingStyle);
|
|
65
70
|
StyledDialogActions.displayName = "StyledDialogActions";
|
|
66
71
|
//# sourceMappingURL=Styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["styled","css","BoxSizingStyle","screen","FontStyle","dialogSizes","s","m","l","xl","xxl","xxxl","MIN_GAP","MAX_DIALOG_HEIGHT","StyledDialogViewport","div","withConfig","displayName","componentId","sm","StyledDialog","props","$maxWidth","$height","StyledDialogTitle","CLOSE_OFFSET","CLOSE_RESERVE","StyledDialogTitleBar","StyledDialogTitleClose","StyledDialogContent","$scroll","StyledDialogContentDivider","StyledDialogActions"],"sources":["../../../../src/components/Dialog/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { screen } from \"../BreakPoints\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const dialogSizes = {\n s: 440,\n m: 540,\n l: 700,\n xl: 840,\n xxl: 1000,\n xxxl: 1120,\n} as const;\n\nexport type DialogSize = keyof typeof dialogSizes;\n\nconst MIN_GAP = \"2.5vh\";\nconst MAX_DIALOG_HEIGHT = \"95vh\";\n\n// The dialog hangs at a fixed offset while there is room below it, then grows in both directions at\n// once. Two shrinkable spacers express that: only the lower one grows, and past the crossover both\n// shrink from the same basis, so the gaps stay equal down to MIN_GAP.\nexport const StyledDialogViewport = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding-left: 16px;\n padding-right: 16px;\n pointer-events: none;\n\n --ac-dialog-offset: 60px;\n\n ${screen.sm} {\n --ac-dialog-offset: 126px;\n }\n\n &::before,\n &::after {\n content: \"\";\n flex-shrink: 1;\n flex-basis: var(--ac-dialog-offset);\n min-height: ${MIN_GAP};\n }\n\n &::before {\n flex-grow: 0;\n }\n\n &::after {\n flex-grow: 1;\n }\n\n ${BoxSizingStyle}\n`;\n\nStyledDialogViewport.displayName = \"StyledDialogViewport\";\n\nexport const StyledDialog = styled.div<{\n $maxWidth: number;\n $height?: string;\n}>`\n display: flex;\n flex-direction: column;\n flex: 0 0 auto;\n pointer-events: auto;\n width: 100%;\n max-width: ${(props) => props.$maxWidth}px;\n max-height: ${MAX_DIALOG_HEIGHT};\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n box-shadow: var(--shadow-primary);\n border-radius: 8px;\n position: relative;\n transition: max-width 0.2s ease, height 0.2s ease;\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n\n &[data-resizing],\n &[data-resizing] .c-dialog-content {\n overflow: hidden;\n }\n\n ${(props) =>\n props.$height &&\n css`\n height: ${props.$height};\n `}\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\n\nStyledDialog.displayName = \"StyledDialog\";\n\nexport const StyledDialogTitle = styled.div`\n padding: 20px 30px;\n flex: 0 0 auto;\n\n & h2.c-dialog-title {\n margin: 0;\n }\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogTitle.displayName = \"StyledDialogTitle\";\n\n// The close button hangs 8px into the title padding, so it sits nearer the dialog edge than the\n// heading does. The bar reserves the rest, which keeps the gap to the heading unchanged.\nconst CLOSE_OFFSET = 8;\nconst CLOSE_RESERVE = 44 - CLOSE_OFFSET;\n\n// The header is as tall as its heading, with or without a close button.\nexport const StyledDialogTitleBar = styled.div`\n position: relative;\n display: flex;\n align-items: center;\n padding-right: ${CLOSE_RESERVE}px;\n`;\nStyledDialogTitleBar.displayName = \"StyledDialogTitleBar\";\n\nexport const StyledDialogTitleClose = styled.div`\n position: absolute;\n right: -${CLOSE_OFFSET}px;\n top: 50%;\n transform: translateY(-50%);\n line-height: 0;\n`;\nStyledDialogTitleClose.displayName = \"StyledDialogTitleClose\";\n\nexport const StyledDialogContent = styled.div<{ $scroll: boolean }>`\n padding: 20px 30px;\n flex: 1 1 auto;\n min-height: 0;\n overscroll-behavior: contain;\n overflow-y: ${(props) => (props.$scroll ? \"auto\" : \"visible\")};\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogContent.displayName = \"StyledDialogContent\";\n\nexport const StyledDialogContentDivider = styled.div`\n border-top: 1px solid var(--border-primary);\n height: 1px;\n flex: 0 0 auto;\n`;\nStyledDialogContentDivider.displayName = \"StyledDialogContentDivider\";\n\nexport const StyledDialogActions = styled.div`\n padding: 20px 30px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: 12px;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogActions.displayName = \"StyledDialogActions\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,SAAS,QAAQ,cAAc;AAExC,OAAO,MAAMC,WAAW,GAAG;EACzBC,CAAC,EAAE,GAAG;EACNC,CAAC,EAAE,GAAG;EACNC,CAAC,EAAE,GAAG;EACNC,EAAE,EAAE,GAAG;EACPC,GAAG,EAAE,IAAI;EACTC,IAAI,EAAE;AACR,CAAU;AAIV,MAAMC,OAAO,GAAG,OAAO;AACvB,MAAMC,iBAAiB,GAAG,MAAM;;AAEhC;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAGd,MAAM,CAACe,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kXAe1Cf,MAAM,CAACgB,EAAE,EASKP,OAAO,EAWrBV,cAAc,CACjB;AAEDY,oBAAoB,CAACG,WAAW,GAAG,sBAAsB;AAEzD,OAAO,MAAMG,YAAY,GAAGpB,MAAM,CAACe,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+bAStBG,KAAK,IAAKA,KAAK,CAACC,SAAS,EACzBT,iBAAiB,EAiB5BQ,KAAK,IACNA,KAAK,CAACE,OAAO,IACbtB,GAAG,mBACSoB,KAAK,CAACE,OAAO,CACxB,EAEDnB,SAAS,EACTF,cAAc,CACjB;AAEDkB,YAAY,CAACH,WAAW,GAAG,cAAc;AAEzC,OAAO,MAAMO,iBAAiB,GAAGxB,MAAM,CAACe,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gFAQvCd,SAAS,EACTF,cAAc,CACjB;AACDsB,iBAAiB,CAACP,WAAW,GAAG,mBAAmB;;AAEnD;AACA;AACA,MAAMQ,YAAY,GAAG,CAAC;AACtB,MAAMC,aAAa,GAAG,EAAE,GAAGD,YAAY;;AAEvC;AACA,OAAO,MAAME,oBAAoB,GAAG3B,MAAM,CAACe,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gFAI3BQ,aAAa,CAC/B;AACDC,oBAAoB,CAACV,WAAW,GAAG,sBAAsB;AAEzD,OAAO,MAAMW,
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["styled","css","BoxSizingStyle","screen","FontStyle","dialogSizes","s","m","l","xl","xxl","xxxl","MIN_GAP","MAX_DIALOG_HEIGHT","StyledDialogViewport","div","withConfig","displayName","componentId","sm","StyledDialog","props","$maxWidth","$height","StyledDialogTitle","CLOSE_OFFSET","CLOSE_RESERVE","StyledDialogTitleBar","StyledDialogTitleHeading","StyledDialogTitleClose","StyledDialogContent","$scroll","StyledDialogContentDivider","StyledDialogActions"],"sources":["../../../../src/components/Dialog/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { screen } from \"../BreakPoints\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const dialogSizes = {\n s: 440,\n m: 540,\n l: 700,\n xl: 840,\n xxl: 1000,\n xxxl: 1120,\n} as const;\n\nexport type DialogSize = keyof typeof dialogSizes;\n\nconst MIN_GAP = \"2.5vh\";\nconst MAX_DIALOG_HEIGHT = \"95vh\";\n\n// The dialog hangs at a fixed offset while there is room below it, then grows in both directions at\n// once. Two shrinkable spacers express that: only the lower one grows, and past the crossover both\n// shrink from the same basis, so the gaps stay equal down to MIN_GAP.\nexport const StyledDialogViewport = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding-left: 16px;\n padding-right: 16px;\n pointer-events: none;\n\n --ac-dialog-offset: 60px;\n\n ${screen.sm} {\n --ac-dialog-offset: 126px;\n }\n\n &::before,\n &::after {\n content: \"\";\n flex-shrink: 1;\n flex-basis: var(--ac-dialog-offset);\n min-height: ${MIN_GAP};\n }\n\n &::before {\n flex-grow: 0;\n }\n\n &::after {\n flex-grow: 1;\n }\n\n ${BoxSizingStyle}\n`;\n\nStyledDialogViewport.displayName = \"StyledDialogViewport\";\n\nexport const StyledDialog = styled.div<{\n $maxWidth: number;\n $height?: string;\n}>`\n display: flex;\n flex-direction: column;\n flex: 0 0 auto;\n pointer-events: auto;\n width: 100%;\n max-width: ${(props) => props.$maxWidth}px;\n max-height: ${MAX_DIALOG_HEIGHT};\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n box-shadow: var(--shadow-primary);\n border-radius: 8px;\n position: relative;\n transition: max-width 0.2s ease, height 0.2s ease;\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n\n &[data-resizing],\n &[data-resizing] .c-dialog-content {\n overflow: hidden;\n }\n\n ${(props) =>\n props.$height &&\n css`\n height: ${props.$height};\n `}\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\n\nStyledDialog.displayName = \"StyledDialog\";\n\nexport const StyledDialogTitle = styled.div`\n padding: 20px 30px;\n flex: 0 0 auto;\n\n & h2.c-dialog-title {\n margin: 0;\n }\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogTitle.displayName = \"StyledDialogTitle\";\n\n// The close button hangs 8px into the title padding, so it sits nearer the dialog edge than the\n// heading does. The bar reserves the rest, which keeps the gap to the heading unchanged.\nconst CLOSE_OFFSET = 8;\nconst CLOSE_RESERVE = 44 - CLOSE_OFFSET;\n\n// The header is as tall as its heading, with or without a close button.\nexport const StyledDialogTitleBar = styled.div`\n position: relative;\n display: flex;\n align-items: center;\n padding-right: ${CLOSE_RESERVE}px;\n`;\nStyledDialogTitleBar.displayName = \"StyledDialogTitleBar\";\n\nexport const StyledDialogTitleHeading = styled.div`\n flex: 1;\n min-width: 0;\n`;\nStyledDialogTitleHeading.displayName = \"StyledDialogTitleHeading\";\n\nexport const StyledDialogTitleClose = styled.div`\n position: absolute;\n right: -${CLOSE_OFFSET}px;\n top: 50%;\n transform: translateY(-50%);\n line-height: 0;\n`;\nStyledDialogTitleClose.displayName = \"StyledDialogTitleClose\";\n\nexport const StyledDialogContent = styled.div<{ $scroll: boolean }>`\n padding: 20px 30px;\n flex: 1 1 auto;\n min-height: 0;\n overscroll-behavior: contain;\n overflow-y: ${(props) => (props.$scroll ? \"auto\" : \"visible\")};\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogContent.displayName = \"StyledDialogContent\";\n\nexport const StyledDialogContentDivider = styled.div`\n border-top: 1px solid var(--border-primary);\n height: 1px;\n flex: 0 0 auto;\n`;\nStyledDialogContentDivider.displayName = \"StyledDialogContentDivider\";\n\nexport const StyledDialogActions = styled.div`\n padding: 20px 30px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: 12px;\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\nStyledDialogActions.displayName = \"StyledDialogActions\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,SAAS,QAAQ,cAAc;AAExC,OAAO,MAAMC,WAAW,GAAG;EACzBC,CAAC,EAAE,GAAG;EACNC,CAAC,EAAE,GAAG;EACNC,CAAC,EAAE,GAAG;EACNC,EAAE,EAAE,GAAG;EACPC,GAAG,EAAE,IAAI;EACTC,IAAI,EAAE;AACR,CAAU;AAIV,MAAMC,OAAO,GAAG,OAAO;AACvB,MAAMC,iBAAiB,GAAG,MAAM;;AAEhC;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAGd,MAAM,CAACe,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kXAe1Cf,MAAM,CAACgB,EAAE,EASKP,OAAO,EAWrBV,cAAc,CACjB;AAEDY,oBAAoB,CAACG,WAAW,GAAG,sBAAsB;AAEzD,OAAO,MAAMG,YAAY,GAAGpB,MAAM,CAACe,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+bAStBG,KAAK,IAAKA,KAAK,CAACC,SAAS,EACzBT,iBAAiB,EAiB5BQ,KAAK,IACNA,KAAK,CAACE,OAAO,IACbtB,GAAG,mBACSoB,KAAK,CAACE,OAAO,CACxB,EAEDnB,SAAS,EACTF,cAAc,CACjB;AAEDkB,YAAY,CAACH,WAAW,GAAG,cAAc;AAEzC,OAAO,MAAMO,iBAAiB,GAAGxB,MAAM,CAACe,GAAG,CAAAC,UAAA;EAAAC,WA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AG,qBAAqB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterInput.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/FilterInput/FilterInput.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB;aAA4B,OAAO;
|
|
1
|
+
{"version":3,"file":"FilterInput.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/FilterInput/FilterInput.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB;aAA4B,OAAO;SAuFhE,CAAC;AAEF,eAAO,MAAM,iBAAiB;;sEA2B7B,CAAC"}
|
|
@@ -6,10 +6,10 @@ export const StyledFilterInput = styled(Input).withConfig({
|
|
|
6
6
|
componentId: "sc-bna484-0"
|
|
7
7
|
})(["&&{background-color:var(--color-theme-300);border-color:transparent;border-radius:16px;height:32px;padding-block:1px;padding-inline:8px;transition:background-color 150ms ease,box-shadow 150ms ease;width:120px;.c-input{background-color:transparent;}> svg:first-child{fill:var(--color-theme-700);flex-shrink:0;}&:hover:not(:focus-within){background-image:linear-gradient( color-mix(in srgb,var(--color-theme-900) 16%,transparent),color-mix(in srgb,var(--color-theme-900) 16%,transparent) );}", " &:focus-within{border-color:transparent;box-shadow:0 0 0 2px var(--color-primary);}}&&&.c-filter-input--split{background-color:transparent;border-radius:16px 0 0 16px;height:32px;padding-inline:10px;width:130px;", " &:focus-within{box-shadow:inset 0 0 0 2px var(--color-primary);}button{background:none;height:20px;left:4px;min-height:20px;min-width:20px;width:20px;&:hover{background:none;opacity:0.8;}svg{fill:var(--color-primary);height:20px;width:20px;}}}"], _ref => {
|
|
8
8
|
let $active = _ref.$active;
|
|
9
|
-
return $active && css(["background-color:var(--page-paper-main);box-shadow:var(--shadow-float);> svg:first-child{fill:var(--color-theme-900);}"]);
|
|
9
|
+
return $active && css(["background-color:var(--page-paper-main);box-shadow:0 0 0 2px var(--color-primary),var(--shadow-float);> svg:first-child{fill:var(--color-theme-900);}"]);
|
|
10
10
|
}, _ref2 => {
|
|
11
11
|
let $active = _ref2.$active;
|
|
12
|
-
return $active && css(["background-color:var(--page-paper-main);"]);
|
|
12
|
+
return $active && css(["background-color:var(--page-paper-main);box-shadow:inset 0 0 0 2px var(--color-primary);"]);
|
|
13
13
|
});
|
|
14
14
|
export const StyledClearButton = styled(IconButton).withConfig({
|
|
15
15
|
displayName: "FilterInputstyles__StyledClearButton",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterInput.styles.js","names":["styled","css","IconButton","Input","StyledFilterInput","withConfig","displayName","componentId","_ref","$active","_ref2","StyledClearButton"],"sources":["../../../../src/components/FilterInput/FilterInput.styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { IconButton } from \"../IconButton\";\nimport { Input } from \"../Input\";\n\nexport const StyledFilterInput = styled(Input)<{ $active: boolean }>`\n && {\n background-color: var(--color-theme-300);\n border-color: transparent;\n border-radius: 16px;\n height: 32px;\n padding-block: 1px;\n padding-inline: 8px;\n transition: background-color 150ms ease, box-shadow 150ms ease;\n width: 120px;\n\n .c-input {\n background-color: transparent;\n }\n\n > svg:first-child {\n fill: var(--color-theme-700);\n flex-shrink: 0;\n }\n\n /* the hover of a view switcher option, clearly apart from the rest fill and from the paper */\n &:hover:not(:focus-within) {\n background-image: linear-gradient(\n color-mix(in srgb, var(--color-theme-900) 16%, transparent),\n color-mix(in srgb, var(--color-theme-900) 16%, transparent)\n );\n }\n\n ${({ $active }) =>\n $active &&\n css`\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-float);\n\n > svg:first-child {\n fill: var(--color-theme-900);\n }\n `}\n\n &:focus-within {\n border-color: transparent;\n box-shadow: 0 0 0 2px var(--color-primary);\n }\n }\n\n /* the left half of the split pill of a Filter: the pill owns the surface */\n &&&.c-filter-input--split {\n background-color: transparent;\n border-radius: 16px 0 0 16px;\n height: 32px;\n padding-inline: 10px;\n width: 130px;\n\n ${({ $active }) =>\n $active &&\n css`\n background-color: var(--page-paper-main);\n `}\n\n /* the ring stays inside the pill: round on the left, straight at the line to the Filter half */\n &:focus-within {\n box-shadow: inset 0 0 0 2px var(--color-primary);\n }\n\n /* in the pill the clear button looks as the reset button of the filter beside it */\n button {\n background: none;\n height: 20px;\n left: 4px;\n min-height: 20px;\n min-width: 20px;\n width: 20px;\n\n &:hover {\n background: none;\n opacity: 0.8;\n }\n\n svg {\n fill: var(--color-primary);\n height: 20px;\n width: 20px;\n }\n }\n }\n`;\n\nexport const StyledClearButton = styled(IconButton)`\n && {\n background-color: color-mix(in srgb, var(--color-primary) 25%, transparent);\n border-radius: 50%;\n flex-shrink: 0;\n height: 20px;\n left: 5px;\n min-height: 20px;\n min-width: 20px;\n padding: 0;\n position: relative;\n width: 20px;\n\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--color-primary) 40%,\n transparent\n );\n }\n\n svg {\n fill: var(--color-theme-900);\n height: 14px;\n width: 14px;\n }\n }\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,KAAK,QAAQ,UAAU;AAEhC,OAAO,MAAMC,iBAAiB,GAAGJ,MAAM,CAACG,KAAK,CAAC,CAAAE,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,k8BA4BxCC,IAAA;EAAA,IAAGC,OAAO,GAAAD,IAAA,CAAPC,OAAO;EAAA,OACVA,OAAO,IACPR,GAAG,
|
|
1
|
+
{"version":3,"file":"FilterInput.styles.js","names":["styled","css","IconButton","Input","StyledFilterInput","withConfig","displayName","componentId","_ref","$active","_ref2","StyledClearButton"],"sources":["../../../../src/components/FilterInput/FilterInput.styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { IconButton } from \"../IconButton\";\nimport { Input } from \"../Input\";\n\nexport const StyledFilterInput = styled(Input)<{ $active: boolean }>`\n && {\n background-color: var(--color-theme-300);\n border-color: transparent;\n border-radius: 16px;\n height: 32px;\n padding-block: 1px;\n padding-inline: 8px;\n transition: background-color 150ms ease, box-shadow 150ms ease;\n width: 120px;\n\n .c-input {\n background-color: transparent;\n }\n\n > svg:first-child {\n fill: var(--color-theme-700);\n flex-shrink: 0;\n }\n\n /* the hover of a view switcher option, clearly apart from the rest fill and from the paper */\n &:hover:not(:focus-within) {\n background-image: linear-gradient(\n color-mix(in srgb, var(--color-theme-900) 16%, transparent),\n color-mix(in srgb, var(--color-theme-900) 16%, transparent)\n );\n }\n\n ${({ $active }) =>\n $active &&\n css`\n background-color: var(--page-paper-main);\n /* a search in force keeps the ring after the field loses the focus */\n box-shadow: 0 0 0 2px var(--color-primary), var(--shadow-float);\n\n > svg:first-child {\n fill: var(--color-theme-900);\n }\n `}\n\n &:focus-within {\n border-color: transparent;\n box-shadow: 0 0 0 2px var(--color-primary);\n }\n }\n\n /* the left half of the split pill of a Filter: the pill owns the surface */\n &&&.c-filter-input--split {\n background-color: transparent;\n border-radius: 16px 0 0 16px;\n height: 32px;\n padding-inline: 10px;\n width: 130px;\n\n ${({ $active }) =>\n $active &&\n css`\n background-color: var(--page-paper-main);\n box-shadow: inset 0 0 0 2px var(--color-primary);\n `}\n\n /* the ring stays inside the pill: round on the left, straight at the line to the Filter half */\n &:focus-within {\n box-shadow: inset 0 0 0 2px var(--color-primary);\n }\n\n /* in the pill the clear button looks as the reset button of the filter beside it */\n button {\n background: none;\n height: 20px;\n left: 4px;\n min-height: 20px;\n min-width: 20px;\n width: 20px;\n\n &:hover {\n background: none;\n opacity: 0.8;\n }\n\n svg {\n fill: var(--color-primary);\n height: 20px;\n width: 20px;\n }\n }\n }\n`;\n\nexport const StyledClearButton = styled(IconButton)`\n && {\n background-color: color-mix(in srgb, var(--color-primary) 25%, transparent);\n border-radius: 50%;\n flex-shrink: 0;\n height: 20px;\n left: 5px;\n min-height: 20px;\n min-width: 20px;\n padding: 0;\n position: relative;\n width: 20px;\n\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--color-primary) 40%,\n transparent\n );\n }\n\n svg {\n fill: var(--color-theme-900);\n height: 14px;\n width: 14px;\n }\n }\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,KAAK,QAAQ,UAAU;AAEhC,OAAO,MAAMC,iBAAiB,GAAGJ,MAAM,CAACG,KAAK,CAAC,CAAAE,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,k8BA4BxCC,IAAA;EAAA,IAAGC,OAAO,GAAAD,IAAA,CAAPC,OAAO;EAAA,OACVA,OAAO,IACPR,GAAG,2JAQF;AAAA,GAgBDS,KAAA;EAAA,IAAGD,OAAO,GAAAC,KAAA,CAAPD,OAAO;EAAA,OACVA,OAAO,IACPR,GAAG,8FAGF;AAAA,EA4BN;AAED,OAAO,MAAMU,iBAAiB,GAAGX,MAAM,CAACE,UAAU,CAAC,CAAAG,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,4VA2BlD","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,YAAY,EAKZ,aAAa,EAGb,GAAG,EAEJ,MAAM,OAAO,CAAC;AAQf,OAAO,EAAU,SAAS,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,UAAU,cAAc,CAAC,CAAC,CAAE,SAAQ,YAAY;IAC9C,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,wBAAwB;IACxB,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACtC,qBAAqB;IACrB,KAAK,EAAE,YAAY,GAAG,MAAM,CAAC;IAC7B,4B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,WAAW;IACX,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gBAAgB;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,2BAA2B;IAC3B,mBAAmB,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC;IAChD,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2BAA2B;IAC3B,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,+BAA+B;IAC/B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,qBAAqB;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;CACpC;AAcD,eAAO,MAAM,OAAO,mFAqInB,CAAC"}
|
|
@@ -46,12 +46,23 @@ export const Tooltip = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
46
46
|
setArmed = _useState2[1];
|
|
47
47
|
// A ref, not state: state would render every tooltip again right after it mounts.
|
|
48
48
|
const childNode = useRef(null);
|
|
49
|
-
|
|
49
|
+
const lastChildNode = useRef(null);
|
|
50
|
+
// A trigger that leaves the page sends no mouseleave, so its tooltip closes here. A router link hands a new ref
|
|
51
|
+
// callback on every render, so a null that the same node follows in the same commit is no leave.
|
|
50
52
|
const setChildNode = useCallback(node => {
|
|
51
53
|
childNode.current = node;
|
|
52
|
-
if (
|
|
53
|
-
|
|
54
|
+
if (node) {
|
|
55
|
+
if (lastChildNode.current && node !== lastChildNode.current) {
|
|
56
|
+
setOpen(false);
|
|
57
|
+
}
|
|
58
|
+
lastChildNode.current = node;
|
|
59
|
+
return;
|
|
54
60
|
}
|
|
61
|
+
Promise.resolve().then(() => {
|
|
62
|
+
if (!childNode.current) {
|
|
63
|
+
setOpen(false);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
55
66
|
}, []);
|
|
56
67
|
|
|
57
68
|
// A mouseleave can also get lost under a still pointer, so any pointer move outside the trigger closes it.
|