@shipengine/alchemy 2.3.1 → 2.3.3
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { RefObject } from "react";
|
|
1
2
|
type ElementContainerContextValue = {
|
|
2
|
-
elementContainer: HTMLDivElement
|
|
3
|
+
elementContainer: RefObject<HTMLDivElement>;
|
|
3
4
|
};
|
|
4
5
|
export type ElementContainerProviderProps = {
|
|
5
6
|
children: React.ReactNode;
|
|
@@ -11,7 +12,7 @@ export type ElementContainerProviderProps = {
|
|
|
11
12
|
* Useful for re-targetting portal-based UI that would otherwise render at React's #root, placing it outside of
|
|
12
13
|
* the Element and lacking any styles.
|
|
13
14
|
*
|
|
14
|
-
* @example <IconTooltip container={elementContainer} {...otherProps} />
|
|
15
|
+
* @example <IconTooltip container={elementContainer.current} {...otherProps} />
|
|
15
16
|
*/
|
|
16
17
|
export declare const ElementContainerProvider: ({ children, className, }: ElementContainerProviderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
17
18
|
export declare const useElementContainer: () => ElementContainerContextValue;
|
package/index.js
CHANGED
|
@@ -2525,6 +2525,7 @@ var Currency = /* @__PURE__ */ ((Currency2) => {
|
|
|
2525
2525
|
|
|
2526
2526
|
var RateCardStatus = /* @__PURE__ */ ((RateCardStatus2) => {
|
|
2527
2527
|
RateCardStatus2["DRAFT"] = "Draft";
|
|
2528
|
+
RateCardStatus2["DELETED"] = "Deleted";
|
|
2528
2529
|
RateCardStatus2["PUBLISHED"] = "Published";
|
|
2529
2530
|
return RateCardStatus2;
|
|
2530
2531
|
})(RateCardStatus || {});
|
|
@@ -10054,7 +10055,7 @@ const ElementContainerProvider = ({
|
|
|
10054
10055
|
}) => {
|
|
10055
10056
|
const { scope } = useAlchemy();
|
|
10056
10057
|
const elementContainerRef = React.useRef(null);
|
|
10057
|
-
return /* @__PURE__ */ jsx(ElementContainerContext.Provider, { value: { elementContainer: elementContainerRef
|
|
10058
|
+
return /* @__PURE__ */ jsx(ElementContainerContext.Provider, { value: { elementContainer: elementContainerRef }, children: /* @__PURE__ */ jsx("div", { className: cx(scope, className), "data-testid": scope, ref: elementContainerRef, children }) });
|
|
10058
10059
|
};
|
|
10059
10060
|
const useElementContainer = () => {
|
|
10060
10061
|
const context = React.useContext(ElementContainerContext);
|
package/index.mjs
CHANGED
|
@@ -2503,6 +2503,7 @@ var Currency = /* @__PURE__ */ ((Currency2) => {
|
|
|
2503
2503
|
|
|
2504
2504
|
var RateCardStatus = /* @__PURE__ */ ((RateCardStatus2) => {
|
|
2505
2505
|
RateCardStatus2["DRAFT"] = "Draft";
|
|
2506
|
+
RateCardStatus2["DELETED"] = "Deleted";
|
|
2506
2507
|
RateCardStatus2["PUBLISHED"] = "Published";
|
|
2507
2508
|
return RateCardStatus2;
|
|
2508
2509
|
})(RateCardStatus || {});
|
|
@@ -10032,7 +10033,7 @@ const ElementContainerProvider = ({
|
|
|
10032
10033
|
}) => {
|
|
10033
10034
|
const { scope } = useAlchemy();
|
|
10034
10035
|
const elementContainerRef = useRef(null);
|
|
10035
|
-
return /* @__PURE__ */ jsx(ElementContainerContext.Provider, { value: { elementContainer: elementContainerRef
|
|
10036
|
+
return /* @__PURE__ */ jsx(ElementContainerContext.Provider, { value: { elementContainer: elementContainerRef }, children: /* @__PURE__ */ jsx("div", { className: cx(scope, className), "data-testid": scope, ref: elementContainerRef, children }) });
|
|
10036
10037
|
};
|
|
10037
10038
|
const useElementContainer = () => {
|
|
10038
10039
|
const context = useContext(ElementContainerContext);
|