@comet/admin 9.0.0-canary-20251002064922 → 9.0.0-canary-20251013121422

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.
@@ -6,16 +6,16 @@ type SlotProps = MuiTooltipProps["slotProps"] & ThemedComponentBaseProps<{
6
6
  text: typeof Typography;
7
7
  }>["slotProps"];
8
8
  export interface TooltipProps extends Omit<MuiTooltipProps, "slotProps" | "title"> {
9
- variant?: Variant;
9
+ color?: Color;
10
10
  title?: ReactNode;
11
11
  description?: ReactNode;
12
12
  customContent?: ReactNode;
13
13
  slotProps?: SlotProps;
14
14
  }
15
15
  type Slot = "root" | "title" | "text";
16
- type Variant = "light" | "dark" | "neutral" | "primary" | "error" | "success" | "warning";
16
+ type Color = "light" | "dark" | "error" | "success" | "warning";
17
17
  type ComponentState = "hasTitleOnly";
18
- export type TooltipClassKey = Slot | Variant | ComponentState | MuiTooltipClassKey;
18
+ export type TooltipClassKey = Slot | Color | ComponentState | MuiTooltipClassKey;
19
19
  export declare const Tooltip: (inProps: TooltipProps) => import("react/jsx-runtime").JSX.Element;
20
20
  declare module "@mui/material/styles" {
21
21
  interface ComponentsPropsList {
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/common/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,mBAAmB,EAExB,KAAK,KAAK,EAIV,KAAK,eAAe,IAAI,kBAAkB,EAC1C,KAAK,YAAY,IAAI,eAAe,EACpC,UAAU,EACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAEpF,KAAK,SAAS,GAAG,eAAe,CAAC,WAAW,CAAC,GACzC,wBAAwB,CAAC;IACrB,KAAK,EAAE,OAAO,UAAU,CAAC;IACzB,IAAI,EAAE,OAAO,UAAU,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CAAC,mBAAmB,CAAC,CAAC;SACpE,CAAC;KACL;CACJ"}
@@ -9,7 +9,7 @@ var _material = require("@mui/material");
9
9
  var _styles = require("@mui/material/styles");
10
10
  var _createComponentSlot = require("../helpers/createComponentSlot");
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
- var _excluded = ["variant", "disableInteractive", "arrow", "children", "title", "description", "customContent", "slotProps"],
12
+ var _excluded = ["color", "disableInteractive", "arrow", "children", "title", "description", "customContent", "slotProps"],
13
13
  _excluded2 = ["title", "text"];
14
14
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0;
15
15
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -28,32 +28,28 @@ var TooltipPopper = (0, _createComponentSlot.createComponentSlot)(_material.Popp
28
28
  componentName: "Tooltip",
29
29
  slotName: "popper",
30
30
  classesResolver: function classesResolver(ownerState) {
31
- return [ownerState.variant,
31
+ return [ownerState.color,
32
32
  // Copied the following from MUIs default TooltipPopper: https://github.com/mui/material-ui/blob/a13c0c026692aafc303756998a78f1d6c2dd707d/packages/mui-material/src/Tooltip/Tooltip.js#L48
33
33
  !ownerState.disableInteractive && "popperInteractive", ownerState.arrow && "popperArrow", ownerState.hasTitleOnly && "hasTitleOnly"];
34
34
  }
35
35
  })(function (_ref) {
36
36
  var theme = _ref.theme,
37
37
  ownerState = _ref.ownerState;
38
- var variantToTextColor = {
38
+ var colorPropToTextColor = {
39
39
  light: theme.palette.grey[900],
40
40
  dark: theme.palette.common.white,
41
- neutral: theme.palette.grey[900],
42
- primary: theme.palette.grey[900],
43
41
  error: theme.palette.common.white,
44
42
  success: theme.palette.common.black,
45
43
  warning: theme.palette.common.black
46
44
  };
47
- var variantToBackgroundColor = {
45
+ var colorPropToBackgroundColor = {
48
46
  light: theme.palette.common.white,
49
47
  dark: ownerState.hasTitleOnly ? theme.palette.grey[500] : theme.palette.grey[900],
50
- neutral: theme.palette.grey[100],
51
- primary: theme.palette.primary.light,
52
48
  error: theme.palette.error.light,
53
49
  success: theme.palette.success.light,
54
50
  warning: theme.palette.warning.light
55
51
  };
56
- return (0, _styles.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n .", " {\n box-shadow: ", ";\n border-radius: 4px;\n padding: 3px 6px;\n color: ", ";\n background-color: ", ";\n line-height: 0; // Custom content may include space-caracters, due to code indentation. Removing the line-height prevents these from adding unintended whitespace.\n\n ", "\n }\n\n .", " {\n color: ", ";\n }\n\n // Copied the following from MUIs default TooltipPopper: https://github.com/mui/material-ui/blob/a13c0c026692aafc303756998a78f1d6c2dd707d/packages/mui-material/src/Tooltip/Tooltip.js#L55\n z-index: ", ";\n pointer-events: none;\n ", ";\n ", ";\n "])), !ownerState.hasTitleOnly && (0, _styles.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: 200px;\n "]))), _material.tooltipClasses.tooltip, theme.shadows[3], variantToTextColor[ownerState.variant], variantToBackgroundColor[ownerState.variant], !ownerState.hasTitleOnly && (0, _styles.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 10px;\n "]))), _material.tooltipClasses.arrow, variantToBackgroundColor[ownerState.variant], theme.zIndex.tooltip, !ownerState.disableInteractive && (0, _styles.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n pointer-events: auto;\n "]))), ownerState.arrow && (0, _styles.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n &[data-popper-placement*=\"bottom\"] .", " {\n top: 0;\n margin-top: -0.71em;\n &::before {\n transform-origin: 0 100%;\n }\n }\n &[data-popper-placement*=\"top\"] .", " {\n bottom: 0;\n margin-bottom: -0.71em;\n &::before {\n transform-origin: 100% 0;\n }\n }\n &[data-popper-placement*=\"right\"] .", " {\n ", "\n height: 1em;\n width: 0.71em;\n &::before {\n transform-origin: 100% 100%;\n }\n }\n &[data-popper-placement*=\"left\"] .", " {\n ", "\n height: 1em;\n width: 0.71em;\n &::before {\n transform-origin: 0 0;\n }\n }\n "])), _material.tooltipClasses.arrow, _material.tooltipClasses.arrow, _material.tooltipClasses.arrow, !ownerState.isRtl ? (0, _styles.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n left: 0;\n margin-left: -0.71em;\n "]))) : (0, _styles.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n right: 0;\n margin-right: -0.71em;\n "]))), _material.tooltipClasses.arrow, !ownerState.isRtl ? (0, _styles.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n right: 0;\n margin-right: -0.71em;\n "]))) : (0, _styles.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n left: 0;\n margin-left: -0.71em;\n "])))));
52
+ return (0, _styles.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n .", " {\n box-shadow: ", ";\n border-radius: 4px;\n padding: 3px 6px;\n color: ", ";\n background-color: ", ";\n line-height: 0; // Custom content may include space-caracters, due to code indentation. Removing the line-height prevents these from adding unintended whitespace.\n\n ", "\n }\n\n .", " {\n color: ", ";\n }\n\n // Copied the following from MUIs default TooltipPopper: https://github.com/mui/material-ui/blob/a13c0c026692aafc303756998a78f1d6c2dd707d/packages/mui-material/src/Tooltip/Tooltip.js#L55\n z-index: ", ";\n pointer-events: none;\n ", ";\n ", ";\n "])), !ownerState.hasTitleOnly && (0, _styles.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: 200px;\n "]))), _material.tooltipClasses.tooltip, theme.shadows[3], colorPropToTextColor[ownerState.color], colorPropToBackgroundColor[ownerState.color], !ownerState.hasTitleOnly && (0, _styles.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 10px;\n "]))), _material.tooltipClasses.arrow, colorPropToBackgroundColor[ownerState.color], theme.zIndex.tooltip, !ownerState.disableInteractive && (0, _styles.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n pointer-events: auto;\n "]))), ownerState.arrow && (0, _styles.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n &[data-popper-placement*=\"bottom\"] .", " {\n top: 0;\n margin-top: -0.71em;\n &::before {\n transform-origin: 0 100%;\n }\n }\n &[data-popper-placement*=\"top\"] .", " {\n bottom: 0;\n margin-bottom: -0.71em;\n &::before {\n transform-origin: 100% 0;\n }\n }\n &[data-popper-placement*=\"right\"] .", " {\n ", "\n height: 1em;\n width: 0.71em;\n &::before {\n transform-origin: 100% 100%;\n }\n }\n &[data-popper-placement*=\"left\"] .", " {\n ", "\n height: 1em;\n width: 0.71em;\n &::before {\n transform-origin: 0 0;\n }\n }\n "])), _material.tooltipClasses.arrow, _material.tooltipClasses.arrow, _material.tooltipClasses.arrow, !ownerState.isRtl ? (0, _styles.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n left: 0;\n margin-left: -0.71em;\n "]))) : (0, _styles.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n right: 0;\n margin-right: -0.71em;\n "]))), _material.tooltipClasses.arrow, !ownerState.isRtl ? (0, _styles.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n right: 0;\n margin-right: -0.71em;\n "]))) : (0, _styles.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n left: 0;\n margin-left: -0.71em;\n "])))));
57
53
  });
58
54
  var Title = (0, _createComponentSlot.createComponentSlot)(_material.Typography)({
59
55
  componentName: "Tooltip",
@@ -68,8 +64,8 @@ var Tooltip = exports.Tooltip = function Tooltip(inProps) {
68
64
  props: inProps,
69
65
  name: "CometAdminTooltip"
70
66
  });
71
- var _props$variant = props.variant,
72
- variant = _props$variant === void 0 ? "dark" : _props$variant,
67
+ var _props$color = props.color,
68
+ color = _props$color === void 0 ? "dark" : _props$color,
73
69
  disableInteractive = props.disableInteractive,
74
70
  arrow = props.arrow,
75
71
  children = props.children,
@@ -87,7 +83,7 @@ var Tooltip = exports.Tooltip = function Tooltip(inProps) {
87
83
  throw new Error("You must provide a `title` or `customContent` when using the `Tooltip` component.");
88
84
  }
89
85
  var ownerState = {
90
- variant: variant,
86
+ color: color,
91
87
  disableInteractive: disableInteractive,
92
88
  arrow: arrow,
93
89
  isRtl: theme.direction === "rtl",
@@ -75,14 +75,14 @@ function FeedbackButton(inProps) {
75
75
  displayState: displayState
76
76
  };
77
77
  var isUncontrolled = loading === undefined && hasErrors === undefined;
78
- var resolveTooltipForDisplayState = function resolveTooltipForDisplayState(displayState) {
78
+ var resolveTooltipColorForDisplayState = function resolveTooltipColorForDisplayState(displayState) {
79
79
  switch (displayState) {
80
80
  case "error":
81
81
  return "error";
82
82
  case "success":
83
83
  return "success";
84
84
  default:
85
- return "neutral";
85
+ return "light";
86
86
  }
87
87
  };
88
88
  var handleOnClick = isUncontrolled && onClick ? /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
@@ -148,7 +148,7 @@ function FeedbackButton(inProps) {
148
148
  title: displayState === "error" ? tooltipErrorMessage : displayState === "success" ? tooltipSuccessMessage : "",
149
149
  open: displayState === "error" || displayState === "success",
150
150
  placement: endIcon && !startIcon ? "top-end" : "top-start",
151
- variant: resolveTooltipForDisplayState(displayState)
151
+ color: resolveTooltipColorForDisplayState(displayState)
152
152
  }, slotProps === null || slotProps === void 0 ? void 0 : slotProps.tooltip), {}, {
153
153
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
154
154
  children: startIcon || endIcon
@@ -1,5 +1,6 @@
1
- import { type IconButtonProps, type TooltipProps } from "@mui/material";
1
+ import { type IconButtonProps } from "@mui/material";
2
2
  import { type ReactNode } from "react";
3
+ import { type TooltipProps } from "../common/Tooltip";
3
4
  import { type CommonRowActionItemProps } from "./RowActionsItem";
4
5
  export interface RowActionsIconItemComponentsProps {
5
6
  tooltip?: Partial<TooltipProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"RowActionsIconItem.d.ts","sourceRoot":"","sources":["../../src/rowActions/RowActionsIconItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,WAAW,iCAAiC;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,uBAAwB,SAAQ,wBAAwB;IACrE,eAAe,CAAC,EAAE,iCAAiC,CAAC;IACpD,OAAO,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,uHAuB9B,CAAC"}
1
+ {"version":3,"file":"RowActionsIconItem.d.ts","sourceRoot":"","sources":["../../src/rowActions/RowActionsIconItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,WAAW,iCAAiC;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,uBAAwB,SAAQ,wBAAwB;IACrE,eAAe,CAAC,EAAE,iCAAiC,CAAC;IACpD,OAAO,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,uHAuB9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comet/admin",
3
- "version": "9.0.0-canary-20251002064922",
3
+ "version": "9.0.0-canary-20251013121422",
4
4
  "description": "Comet Admin package",
5
5
  "repository": {
6
6
  "directory": "packages/admin/admin",
@@ -28,7 +28,7 @@
28
28
  "react-dropzone": "^14.3.8",
29
29
  "use-constant": "^1.1.1",
30
30
  "uuid": "^11.1.0",
31
- "@comet/admin-icons": "9.0.0-canary-20251002064922"
31
+ "@comet/admin-icons": "9.0.0-canary-20251013121422"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@apollo/client": "^3.13.8",
@@ -76,9 +76,9 @@
76
76
  "rimraf": "^6.0.1",
77
77
  "ts-jest": "^29.4.0",
78
78
  "typescript": "5.8.3",
79
- "@comet/admin-babel-preset": "9.0.0-canary-20251002064922",
80
- "@comet/eslint-config": "9.0.0-canary-20251002064922",
81
- "@comet/eslint-plugin": "9.0.0-canary-20251002064922"
79
+ "@comet/admin-babel-preset": "9.0.0-canary-20251013121422",
80
+ "@comet/eslint-config": "9.0.0-canary-20251013121422",
81
+ "@comet/eslint-plugin": "9.0.0-canary-20251013121422"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "@apollo/client": "^3.7.0",