@uniformdev/design-system 20.7.1-alpha.26 → 20.7.1-alpha.28
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/esm/index.js +194 -76
- package/dist/index.d.mts +28 -7
- package/dist/index.d.ts +28 -7
- package/dist/index.js +168 -45
- package/package.json +22 -10
package/dist/esm/index.js
CHANGED
|
@@ -3398,6 +3398,24 @@ var uniformStatusPublishedIcon = GenIcon2({
|
|
|
3398
3398
|
}
|
|
3399
3399
|
]
|
|
3400
3400
|
});
|
|
3401
|
+
var uniformUsageStatusIcon = GenIcon2({
|
|
3402
|
+
tag: "svg",
|
|
3403
|
+
attr: {
|
|
3404
|
+
role: "img",
|
|
3405
|
+
viewBox: "0 0 12 12",
|
|
3406
|
+
fill: "none"
|
|
3407
|
+
},
|
|
3408
|
+
child: [
|
|
3409
|
+
{
|
|
3410
|
+
tag: "path",
|
|
3411
|
+
attr: {
|
|
3412
|
+
fill: "currentColor",
|
|
3413
|
+
d: "M9.37501 7.12499C9.04355 7.12482 8.72146 7.23498 8.45954 7.43812L7.37626 6.59437C7.45804 6.40689 7.50017 6.20453 7.50001 5.99999C7.50001 5.96531 7.50001 5.93062 7.49626 5.8964L8.11641 5.68968C8.31261 5.99228 8.61126 6.21406 8.95766 6.3144C9.30406 6.41474 9.67501 6.38692 10.0026 6.23604C10.3301 6.08516 10.5924 5.82131 10.7412 5.49284C10.8901 5.16436 10.9157 4.79324 10.8132 4.44747C10.7107 4.10169 10.4871 3.8044 10.1833 3.61006C9.87954 3.41572 9.5159 3.33733 9.15902 3.38926C8.80214 3.44119 8.47592 3.61996 8.2401 3.89281C8.00429 4.16567 7.87468 4.51436 7.87501 4.87499C7.87501 4.90968 7.87501 4.94437 7.87876 4.97859L7.2586 5.18531C7.12265 4.97514 6.93627 4.80233 6.71644 4.68263C6.49661 4.56293 6.25031 4.50014 6.00001 4.49999C5.91724 4.50017 5.83462 4.50706 5.75297 4.52062L5.43235 3.79687C5.7092 3.57566 5.8988 3.26358 5.96753 2.91594C6.03626 2.5683 5.9797 2.20755 5.80786 1.89763C5.63602 1.58771 5.36 1.34863 5.02873 1.22278C4.69746 1.09693 4.33233 1.09243 3.99805 1.21007C3.66378 1.32771 3.38195 1.5599 3.20251 1.86549C3.02308 2.17108 2.95763 2.53032 3.01777 2.87956C3.07791 3.22879 3.25975 3.54545 3.53106 3.77342C3.80237 4.00139 4.14563 4.12594 4.50001 4.12499C4.58277 4.12482 4.66539 4.11792 4.74704 4.10437L5.06766 4.82624C4.79577 5.04144 4.60706 5.34439 4.53378 5.68331C4.46051 6.02223 4.50722 6.37608 4.66594 6.68437L3.46079 7.75499C3.1575 7.55053 2.79005 7.4637 2.42732 7.51078C2.06459 7.55785 1.73148 7.7356 1.49043 8.01071C1.24938 8.28581 1.11693 8.63939 1.11793 9.00516C1.11892 9.37093 1.25327 9.72379 1.49581 9.99758C1.73835 10.2714 2.07242 10.4473 2.4354 10.4924C2.79838 10.5375 3.16535 10.4487 3.46753 10.2426C3.7697 10.0365 3.98634 9.72728 4.07683 9.37288C4.16732 9.01847 4.12545 8.64323 3.95907 8.31749L5.16422 7.24687C5.42516 7.42256 5.73485 7.51152 6.04925 7.50108C6.36365 7.49064 6.66676 7.38135 6.91547 7.18874L7.99876 8.03249C7.91723 8.21939 7.8751 8.42109 7.87501 8.62499C7.87501 8.92167 7.96298 9.21168 8.1278 9.45835C8.29262 9.70502 8.52689 9.89728 8.80098 10.0108C9.07507 10.1243 9.37667 10.154 9.66764 10.0962C9.95861 10.0383 10.2259 9.89543 10.4357 9.68565C10.6454 9.47588 10.7883 9.2086 10.8462 8.91763C10.9041 8.62666 10.8744 8.32506 10.7608 8.05097C10.6473 7.77688 10.455 7.54261 10.2084 7.37779C9.96169 7.21297 9.67168 7.12499 9.37501 7.12499ZM9.37501 4.12499C9.52334 4.12499 9.66835 4.16898 9.79168 4.25139C9.91502 4.3338 10.0112 4.45094 10.0679 4.58798C10.1247 4.72503 10.1395 4.87583 10.1106 5.02131C10.0817 5.1668 10.0102 5.30044 9.90534 5.40532C9.80045 5.51021 9.66681 5.58164 9.52132 5.61058C9.37584 5.63952 9.22504 5.62467 9.08799 5.5679C8.95095 5.51114 8.83382 5.41501 8.7514 5.29167C8.66899 5.16833 8.62501 5.02333 8.62501 4.87499C8.62501 4.67608 8.70402 4.48532 8.84468 4.34466C8.98533 4.20401 9.17609 4.12499 9.37501 4.12499ZM3.75001 2.62499C3.75001 2.47666 3.79399 2.33165 3.8764 2.20832C3.95881 2.08498 4.07595 1.98885 4.21299 1.93208C4.35004 1.87532 4.50084 1.86047 4.64632 1.88941C4.79181 1.91834 4.92545 1.98978 5.03034 2.09466C5.13522 2.19955 5.20666 2.33319 5.23559 2.47868C5.26453 2.62416 5.24968 2.77496 5.19292 2.91201C5.13615 3.04905 5.04002 3.16619 4.91668 3.2486C4.79335 3.33101 4.64834 3.37499 4.50001 3.37499C4.30109 3.37499 4.11033 3.29598 3.96968 3.15532C3.82902 3.01467 3.75001 2.82391 3.75001 2.62499ZM2.62501 9.74999C2.47667 9.74999 2.33167 9.70601 2.20833 9.6236C2.08499 9.54119 1.98886 9.42405 1.9321 9.28701C1.87533 9.14996 1.86048 8.99916 1.88942 8.85368C1.91836 8.70819 1.98979 8.57455 2.09468 8.46966C2.19957 8.36478 2.3332 8.29334 2.47869 8.26441C2.62417 8.23547 2.77497 8.25032 2.91202 8.30708C3.04906 8.36385 3.1662 8.45998 3.24861 8.58332C3.33102 8.70665 3.37501 8.85166 3.37501 8.99999C3.37501 9.19891 3.29599 9.38967 3.15534 9.53032C3.01468 9.67098 2.82392 9.74999 2.62501 9.74999ZM9.37501 9.37499C9.22667 9.37499 9.08167 9.33101 8.95833 9.2486C8.83499 9.16619 8.73886 9.04905 8.6821 8.91201C8.62533 8.77496 8.61048 8.62416 8.63942 8.47868C8.66836 8.33319 8.73979 8.19955 8.84468 8.09466C8.94957 7.98978 9.0832 7.91834 9.22869 7.88941C9.37417 7.86047 9.52497 7.87532 9.66202 7.93208C9.79906 7.98885 9.9162 8.08498 9.99861 8.20832C10.081 8.33165 10.125 8.47666 10.125 8.62499C10.125 8.82391 10.046 9.01467 9.90534 9.15532C9.76468 9.29598 9.57392 9.37499 9.37501 9.37499Z"
|
|
3414
|
+
},
|
|
3415
|
+
child: []
|
|
3416
|
+
}
|
|
3417
|
+
]
|
|
3418
|
+
});
|
|
3401
3419
|
|
|
3402
3420
|
// src/components/AddListButton/AddListButton.styles.ts
|
|
3403
3421
|
import { css as css17 } from "@emotion/react";
|
|
@@ -6484,7 +6502,7 @@ var ChipContainer = css45`
|
|
|
6484
6502
|
`;
|
|
6485
6503
|
var ChipText = css45`
|
|
6486
6504
|
align-self: center;
|
|
6487
|
-
line-height: 1;
|
|
6505
|
+
line-height: 1.1;
|
|
6488
6506
|
text-wrap: nowrap;
|
|
6489
6507
|
`;
|
|
6490
6508
|
var ChipIcon = css45`
|
|
@@ -7640,7 +7658,7 @@ var DragHandle = forwardRef15(
|
|
|
7640
7658
|
|
|
7641
7659
|
// src/components/Drawer/Drawer.tsx
|
|
7642
7660
|
import { CgChevronRight } from "@react-icons/all-files/cg/CgChevronRight";
|
|
7643
|
-
import React15, { createContext as createContext4, useContext as useContext4, useEffect as useEffect5, useRef as
|
|
7661
|
+
import React15, { createContext as createContext4, useContext as useContext4, useEffect as useEffect5, useRef as useRef4, useState as useState8 } from "react";
|
|
7644
7662
|
import { createPortal } from "react-dom";
|
|
7645
7663
|
|
|
7646
7664
|
// src/components/Drawer/Drawer.styles.ts
|
|
@@ -7751,7 +7769,7 @@ var drawerWrapperOverlayStyles = css54`
|
|
|
7751
7769
|
`;
|
|
7752
7770
|
|
|
7753
7771
|
// src/components/Drawer/DrawerProvider.tsx
|
|
7754
|
-
import { createContext as createContext3, useCallback as useCallback5, useContext as useContext3,
|
|
7772
|
+
import { createContext as createContext3, useCallback as useCallback5, useContext as useContext3, useId, useState as useState7 } from "react";
|
|
7755
7773
|
import { jsx as jsx67 } from "@emotion/react/jsx-runtime";
|
|
7756
7774
|
var DrawerContext = createContext3({
|
|
7757
7775
|
providerId: "",
|
|
@@ -7770,7 +7788,7 @@ function renderDrawerId(drawer) {
|
|
|
7770
7788
|
}
|
|
7771
7789
|
var DrawerProvider = ({ children }) => {
|
|
7772
7790
|
const [drawersRegistry, setDrawersRegistry] = useState7([]);
|
|
7773
|
-
const providerId =
|
|
7791
|
+
const providerId = useId();
|
|
7774
7792
|
const [drawerTakeoverStackId, setDrawerTakeoverStackId] = useState7(void 0);
|
|
7775
7793
|
useShortcut({
|
|
7776
7794
|
handler: () => {
|
|
@@ -7852,7 +7870,7 @@ var DrawerProvider = ({ children }) => {
|
|
|
7852
7870
|
drawersRegistry,
|
|
7853
7871
|
registerDrawer,
|
|
7854
7872
|
unregisterDrawer,
|
|
7855
|
-
providerId
|
|
7873
|
+
providerId,
|
|
7856
7874
|
drawerTakeoverStackId,
|
|
7857
7875
|
registerTakeoverStackId,
|
|
7858
7876
|
unregisterTakeoverStackId
|
|
@@ -7891,7 +7909,7 @@ var Drawer = React15.forwardRef(
|
|
|
7891
7909
|
const { stackId: inheritedStackId } = useCurrentDrawer();
|
|
7892
7910
|
const { drawerTakeoverStackId } = useDrawer();
|
|
7893
7911
|
const drawerRendererProps = { width: drawerProps.width, minWidth, maxWidth, position, leftAligned };
|
|
7894
|
-
const resolvedStickyStackIdRef =
|
|
7912
|
+
const resolvedStickyStackIdRef = useRef4((_a = drawerTakeoverStackId != null ? drawerTakeoverStackId : drawerProps.stackId) != null ? _a : inheritedStackId);
|
|
7895
7913
|
return resolvedStickyStackIdRef.current ? /* @__PURE__ */ jsx68(DrawerInner, { ref, ...drawerProps, stackId: resolvedStickyStackIdRef.current }) : /* @__PURE__ */ jsxs43(DrawerProvider, { children: [
|
|
7896
7914
|
/* @__PURE__ */ jsx68(DrawerInner, { ref, ...drawerProps }),
|
|
7897
7915
|
/* @__PURE__ */ jsx68(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
|
|
@@ -7912,7 +7930,7 @@ var DrawerInner = ({
|
|
|
7912
7930
|
testId = "side-dialog"
|
|
7913
7931
|
}) => {
|
|
7914
7932
|
const { registerDrawer, unregisterDrawer, providerId } = useDrawer();
|
|
7915
|
-
const closeButtonRef =
|
|
7933
|
+
const closeButtonRef = useRef4(null);
|
|
7916
7934
|
const [rendererElement, setRendererElement] = useState8(null);
|
|
7917
7935
|
useEffect5(() => {
|
|
7918
7936
|
registerDrawer({
|
|
@@ -8864,21 +8882,28 @@ import { forwardRef as forwardRef17 } from "react";
|
|
|
8864
8882
|
// src/components/Tiles/styles/Tile.styles.ts
|
|
8865
8883
|
import { css as css63 } from "@emotion/react";
|
|
8866
8884
|
var tileBorderSize = "1px";
|
|
8885
|
+
var tileBorderRadius = "var(--rounded-2xl)";
|
|
8886
|
+
var tileBorderColor = "var(--gray-300)";
|
|
8867
8887
|
var Tile = css63`
|
|
8868
8888
|
background: var(--white);
|
|
8869
8889
|
cursor: pointer;
|
|
8870
|
-
border: ${tileBorderSize} solid var(--
|
|
8871
|
-
display:
|
|
8890
|
+
border: ${tileBorderSize} solid var(--tile-border-color, ${tileBorderColor});
|
|
8891
|
+
display: flex;
|
|
8892
|
+
flex-direction: column;
|
|
8872
8893
|
padding: var(--spacing-base);
|
|
8873
|
-
|
|
8874
|
-
|
|
8894
|
+
align-items: center;
|
|
8895
|
+
justify-content: center;
|
|
8875
8896
|
gap: var(--spacing-sm);
|
|
8876
|
-
|
|
8877
|
-
|
|
8897
|
+
border-radius: var(--tile-border-radius, ${tileBorderRadius});
|
|
8898
|
+
transition:
|
|
8899
|
+
background-color var(--duration-fast) var(--timing-ease-out),
|
|
8900
|
+
border-color var(--duration-fast) var(--timing-ease-out);
|
|
8878
8901
|
|
|
8879
8902
|
&:hover,
|
|
8880
8903
|
&:focus {
|
|
8881
8904
|
background: var(--gray-50);
|
|
8905
|
+
border-color: var(--tile-border-color-hover, var(--accent-dark));
|
|
8906
|
+
z-index: 1;
|
|
8882
8907
|
}
|
|
8883
8908
|
|
|
8884
8909
|
&[aria-disabled='true'],
|
|
@@ -8894,27 +8919,55 @@ var TileIsSelected = css63`
|
|
|
8894
8919
|
border: calc(${tileBorderSize} + 1px) solid var(--primary-action-active);
|
|
8895
8920
|
z-index: 1; // Used to elevate active state border over other Tile borders
|
|
8896
8921
|
`;
|
|
8922
|
+
var TileHorizontal = css63`
|
|
8923
|
+
flex-direction: row;
|
|
8924
|
+
justify-content: flex-start;
|
|
8925
|
+
`;
|
|
8897
8926
|
|
|
8898
8927
|
// src/components/Tiles/LinkTile.tsx
|
|
8899
8928
|
import { jsx as jsx83 } from "@emotion/react/jsx-runtime";
|
|
8900
8929
|
var LinkTile2 = forwardRef17(
|
|
8901
|
-
({ children, ...props }, ref) => {
|
|
8930
|
+
({ orientation = "vertical", children, ...props }, ref) => {
|
|
8902
8931
|
if ("linkManagerComponent" in props) {
|
|
8903
8932
|
const { linkManagerComponent: LinkManager, ...rest } = props;
|
|
8904
|
-
return /* @__PURE__ */ jsx83(
|
|
8933
|
+
return /* @__PURE__ */ jsx83(
|
|
8934
|
+
LinkManager,
|
|
8935
|
+
{
|
|
8936
|
+
css: [
|
|
8937
|
+
Tile,
|
|
8938
|
+
LinkTile,
|
|
8939
|
+
orientation === "horizontal" ? TileHorizontal : void 0
|
|
8940
|
+
],
|
|
8941
|
+
ref,
|
|
8942
|
+
...rest,
|
|
8943
|
+
children
|
|
8944
|
+
}
|
|
8945
|
+
);
|
|
8905
8946
|
}
|
|
8906
|
-
return /* @__PURE__ */ jsx83(
|
|
8947
|
+
return /* @__PURE__ */ jsx83(
|
|
8948
|
+
"a",
|
|
8949
|
+
{
|
|
8950
|
+
ref,
|
|
8951
|
+
css: [Tile, LinkTile, orientation === "horizontal" ? TileHorizontal : void 0],
|
|
8952
|
+
...props,
|
|
8953
|
+
children
|
|
8954
|
+
}
|
|
8955
|
+
);
|
|
8907
8956
|
}
|
|
8908
8957
|
);
|
|
8909
8958
|
|
|
8910
8959
|
// src/components/Tiles/Tile.tsx
|
|
8911
8960
|
import { jsx as jsx84 } from "@emotion/react/jsx-runtime";
|
|
8912
|
-
var Tile2 = ({ children, disabled: disabled2, isSelected, ...props }) => {
|
|
8961
|
+
var Tile2 = ({ children, disabled: disabled2, isSelected, orientation = "vertical", ...props }) => {
|
|
8913
8962
|
return /* @__PURE__ */ jsx84(
|
|
8914
8963
|
"button",
|
|
8915
8964
|
{
|
|
8916
8965
|
type: "button",
|
|
8917
|
-
css: [
|
|
8966
|
+
css: [
|
|
8967
|
+
Tile,
|
|
8968
|
+
orientation === "horizontal" ? TileHorizontal : void 0,
|
|
8969
|
+
isSelected ? TileIsSelected : void 0
|
|
8970
|
+
],
|
|
8918
8971
|
disabled: disabled2,
|
|
8919
8972
|
...props,
|
|
8920
8973
|
children
|
|
@@ -8929,17 +8982,46 @@ var TileContainerWrapper = (theme, padding) => css64`
|
|
|
8929
8982
|
padding: ${padding != "none" ? `var(--spacing-${padding})` : "0"};
|
|
8930
8983
|
`;
|
|
8931
8984
|
var TileContainerInner = (gap, templateColumns) => css64`
|
|
8985
|
+
/* We remove the border radius from the tiles when used inside TileContainer */
|
|
8986
|
+
--tile-border-radius: 0;
|
|
8987
|
+
--tile-border-color: ${tileBorderColor};
|
|
8988
|
+
/* We don't want the tiles to change border color on hover, because of the border radius we have on the container-level */
|
|
8989
|
+
--tile-border-color-hover: ${tileBorderColor};
|
|
8990
|
+
|
|
8991
|
+
position: relative;
|
|
8932
8992
|
display: grid;
|
|
8933
8993
|
grid-template-columns: ${templateColumns};
|
|
8994
|
+
grid-auto-rows: 1fr;
|
|
8934
8995
|
gap: var(--spacing-${gap});
|
|
8996
|
+
background-color: var(--gray-5);
|
|
8935
8997
|
margin-top: ${tileBorderSize};
|
|
8936
8998
|
margin-left: ${tileBorderSize};
|
|
8999
|
+
border-radius: ${tileBorderRadius};
|
|
9000
|
+
overflow: hidden;
|
|
9001
|
+
|
|
9002
|
+
/* This is used to create a border around the tiles */
|
|
9003
|
+
&::after {
|
|
9004
|
+
content: '';
|
|
9005
|
+
position: absolute;
|
|
9006
|
+
inset: 0;
|
|
9007
|
+
border-radius: ${tileBorderRadius};
|
|
9008
|
+
border: ${tileBorderSize} solid var(--tile-border-color);
|
|
9009
|
+
pointer-events: none;
|
|
9010
|
+
z-index: 1;
|
|
9011
|
+
}
|
|
8937
9012
|
|
|
8938
9013
|
> * {
|
|
8939
9014
|
margin-top: -${tileBorderSize};
|
|
8940
9015
|
margin-left: -${tileBorderSize};
|
|
8941
9016
|
}
|
|
8942
9017
|
`;
|
|
9018
|
+
var TileContainerInnerWithoutGrouping = css64`
|
|
9019
|
+
overflow: visible;
|
|
9020
|
+
|
|
9021
|
+
&::after {
|
|
9022
|
+
display: none;
|
|
9023
|
+
}
|
|
9024
|
+
`;
|
|
8943
9025
|
|
|
8944
9026
|
// src/components/Tiles/TileContainer.tsx
|
|
8945
9027
|
import { jsx as jsx85 } from "@emotion/react/jsx-runtime";
|
|
@@ -8949,9 +9031,19 @@ var TileContainer = ({
|
|
|
8949
9031
|
gap = "base",
|
|
8950
9032
|
gridTemplateColumns = "repeat(auto-fill, minmax(13rem, 1fr))",
|
|
8951
9033
|
children,
|
|
9034
|
+
withoutGrouping = false,
|
|
8952
9035
|
...props
|
|
8953
9036
|
}) => {
|
|
8954
|
-
return /* @__PURE__ */ jsx85("div", { css: TileContainerWrapper(bgColor, containerPadding), ...props, children: /* @__PURE__ */ jsx85(
|
|
9037
|
+
return /* @__PURE__ */ jsx85("div", { css: TileContainerWrapper(bgColor, containerPadding), ...props, children: /* @__PURE__ */ jsx85(
|
|
9038
|
+
"div",
|
|
9039
|
+
{
|
|
9040
|
+
css: [
|
|
9041
|
+
TileContainerInner(gap, gridTemplateColumns),
|
|
9042
|
+
withoutGrouping ? TileContainerInnerWithoutGrouping : void 0
|
|
9043
|
+
],
|
|
9044
|
+
children
|
|
9045
|
+
}
|
|
9046
|
+
) });
|
|
8955
9047
|
};
|
|
8956
9048
|
|
|
8957
9049
|
// src/components/Tiles/styles/TileText.styles.ts
|
|
@@ -9139,15 +9231,15 @@ import {
|
|
|
9139
9231
|
verticalListSortingStrategy
|
|
9140
9232
|
} from "@dnd-kit/sortable";
|
|
9141
9233
|
import { CSS } from "@dnd-kit/utilities";
|
|
9142
|
-
import { useCallback as useCallback7, useEffect as useEffect11, useMemo as useMemo5, useRef as
|
|
9234
|
+
import { useCallback as useCallback7, useEffect as useEffect11, useMemo as useMemo5, useRef as useRef6, useState as useState11 } from "react";
|
|
9143
9235
|
|
|
9144
9236
|
// src/utils/useDebouncedCallback.ts
|
|
9145
|
-
import { useEffect as useEffect10, useMemo as useMemo4, useRef as
|
|
9237
|
+
import { useEffect as useEffect10, useMemo as useMemo4, useRef as useRef5 } from "react";
|
|
9146
9238
|
function useDebouncedCallback(callback, deps, delay, maxWait = 0) {
|
|
9147
|
-
const timeout =
|
|
9148
|
-
const waitTimeout =
|
|
9149
|
-
const cb =
|
|
9150
|
-
const lastCall =
|
|
9239
|
+
const timeout = useRef5();
|
|
9240
|
+
const waitTimeout = useRef5();
|
|
9241
|
+
const cb = useRef5(callback);
|
|
9242
|
+
const lastCall = useRef5();
|
|
9151
9243
|
const clear = () => {
|
|
9152
9244
|
if (timeout.current) {
|
|
9153
9245
|
clearTimeout(timeout.current);
|
|
@@ -9229,8 +9321,8 @@ var KeyValueInput = ({
|
|
|
9229
9321
|
onFocusChange
|
|
9230
9322
|
}) => {
|
|
9231
9323
|
const [isDragging, setIsDragging] = useState11(false);
|
|
9232
|
-
const popoverStoresMap =
|
|
9233
|
-
const lastRowFirstInputRef =
|
|
9324
|
+
const popoverStoresMap = useRef6({});
|
|
9325
|
+
const lastRowFirstInputRef = useRef6(null);
|
|
9234
9326
|
const sensors = useSensors(
|
|
9235
9327
|
useSensor(PointerSensor),
|
|
9236
9328
|
useSensor(KeyboardSensor, {
|
|
@@ -10168,7 +10260,7 @@ var LoadingIcon = ({ height, width, ...props }) => {
|
|
|
10168
10260
|
// src/components/Modal/Modal.tsx
|
|
10169
10261
|
import { PortalContext } from "@ariakit/react";
|
|
10170
10262
|
import { CgClose as CgClose4 } from "@react-icons/all-files/cg/CgClose";
|
|
10171
|
-
import React17, { useEffect as useEffect12, useRef as
|
|
10263
|
+
import React17, { useEffect as useEffect12, useRef as useRef7 } from "react";
|
|
10172
10264
|
|
|
10173
10265
|
// src/components/Modal/Modal.styles.ts
|
|
10174
10266
|
import { css as css75 } from "@emotion/react";
|
|
@@ -10272,8 +10364,8 @@ var Modal = React17.forwardRef(
|
|
|
10272
10364
|
disableBodyScroll = false,
|
|
10273
10365
|
...modalProps
|
|
10274
10366
|
}, ref) => {
|
|
10275
|
-
const mouseDownInsideModal =
|
|
10276
|
-
const dialogRef =
|
|
10367
|
+
const mouseDownInsideModal = useRef7(false);
|
|
10368
|
+
const dialogRef = useRef7(null);
|
|
10277
10369
|
const size = {
|
|
10278
10370
|
sm: modalSizeSmall,
|
|
10279
10371
|
md: modalSizeMedium,
|
|
@@ -10648,24 +10740,23 @@ var CoverSelectedChip = css78`
|
|
|
10648
10740
|
import { Fragment as Fragment11, jsx as jsx101, jsxs as jsxs67 } from "@emotion/react/jsx-runtime";
|
|
10649
10741
|
var ObjectGridItemCardCover = (props) => {
|
|
10650
10742
|
if ("imageUrl" in props && props.imageUrl) {
|
|
10651
|
-
const { imageUrl, srcSet,
|
|
10743
|
+
const { imageUrl, srcSet, alt } = props;
|
|
10652
10744
|
return /* @__PURE__ */ jsx101("div", { css: CoverContainer, children: /* @__PURE__ */ jsx101(
|
|
10653
10745
|
"img",
|
|
10654
10746
|
{
|
|
10655
10747
|
src: imageUrl,
|
|
10656
10748
|
srcSet,
|
|
10657
|
-
alt: props.alt,
|
|
10658
10749
|
css: CoverImage,
|
|
10659
10750
|
loading: "lazy",
|
|
10660
10751
|
role: "presentation",
|
|
10661
10752
|
"data-testid": "object-grid-item-thumbnail",
|
|
10662
|
-
|
|
10753
|
+
alt
|
|
10663
10754
|
}
|
|
10664
10755
|
) });
|
|
10665
10756
|
}
|
|
10666
10757
|
if ("icon" in props && props.icon) {
|
|
10667
|
-
const { icon, iconColor
|
|
10668
|
-
return /* @__PURE__ */ jsx101("div", { css: CoverContainer, children: /* @__PURE__ */ jsxs67("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail",
|
|
10758
|
+
const { icon, iconColor } = props;
|
|
10759
|
+
return /* @__PURE__ */ jsx101("div", { css: CoverContainer, children: /* @__PURE__ */ jsxs67("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail", children: [
|
|
10669
10760
|
/* @__PURE__ */ jsx101(Icon, { icon, iconColor: iconColor != null ? iconColor : "currentColor", css: CoverIconGhost }),
|
|
10670
10761
|
/* @__PURE__ */ jsx101(Icon, { icon, iconColor: iconColor != null ? iconColor : "currentColor", size: 48 })
|
|
10671
10762
|
] }) });
|
|
@@ -10715,7 +10806,7 @@ var ObjectGridItemCoverButton = ({
|
|
|
10715
10806
|
};
|
|
10716
10807
|
|
|
10717
10808
|
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
10718
|
-
import { useEffect as useEffect13, useRef as
|
|
10809
|
+
import { useEffect as useEffect13, useRef as useRef8, useState as useState12 } from "react";
|
|
10719
10810
|
|
|
10720
10811
|
// src/components/Objects/styles/ObjectGridItemHeading.styles.ts
|
|
10721
10812
|
import { css as css79 } from "@emotion/react";
|
|
@@ -10742,7 +10833,7 @@ var ObjectGridItemHeading2 = ({
|
|
|
10742
10833
|
...props
|
|
10743
10834
|
}) => {
|
|
10744
10835
|
const [hasTruncation, setHasTruncation] = useState12(false);
|
|
10745
|
-
const headingRef =
|
|
10836
|
+
const headingRef = useRef8(null);
|
|
10746
10837
|
const onStopPropagation = (e) => {
|
|
10747
10838
|
e.stopPropagation();
|
|
10748
10839
|
};
|
|
@@ -10881,7 +10972,7 @@ var ObjectListItemRightSlot = css81`
|
|
|
10881
10972
|
gap: var(--spacing-sm);
|
|
10882
10973
|
`;
|
|
10883
10974
|
var ObjectListItemContainer = css81`
|
|
10884
|
-
> [role='listitem'] {
|
|
10975
|
+
> [role='listitem']:not(:first-of-type) {
|
|
10885
10976
|
border-top: 1px solid var(--gray-200);
|
|
10886
10977
|
}
|
|
10887
10978
|
`;
|
|
@@ -12612,7 +12703,7 @@ import {
|
|
|
12612
12703
|
FOCUS_COMMAND,
|
|
12613
12704
|
PASTE_COMMAND
|
|
12614
12705
|
} from "lexical";
|
|
12615
|
-
import { useCallback as useCallback8, useEffect as useEffect16, useRef as
|
|
12706
|
+
import { useCallback as useCallback8, useEffect as useEffect16, useRef as useRef9, useState as useState15 } from "react";
|
|
12616
12707
|
|
|
12617
12708
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
12618
12709
|
import { $isAtNodeEnd } from "@lexical/selection";
|
|
@@ -12962,7 +13053,7 @@ function LinkNodePlugin({
|
|
|
12962
13053
|
};
|
|
12963
13054
|
const [editor] = useLexicalComposerContext3();
|
|
12964
13055
|
const [linkPopoverState, setLinkPopoverState] = useState15();
|
|
12965
|
-
const linkPopoverElRef =
|
|
13056
|
+
const linkPopoverElRef = useRef9(null);
|
|
12966
13057
|
const [isEditorFocused, setIsEditorFocused] = useState15(false);
|
|
12967
13058
|
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState15(false);
|
|
12968
13059
|
useEffect16(() => {
|
|
@@ -13213,7 +13304,7 @@ import {
|
|
|
13213
13304
|
OUTDENT_CONTENT_COMMAND,
|
|
13214
13305
|
SELECTION_CHANGE_COMMAND
|
|
13215
13306
|
} from "lexical";
|
|
13216
|
-
import { useEffect as useEffect17, useRef as
|
|
13307
|
+
import { useEffect as useEffect17, useRef as useRef10 } from "react";
|
|
13217
13308
|
function isIndentPermitted(maxDepth) {
|
|
13218
13309
|
const selection = $getSelection2();
|
|
13219
13310
|
if (!$isRangeSelection2(selection)) {
|
|
@@ -13268,7 +13359,7 @@ function $indentOverTab(selection) {
|
|
|
13268
13359
|
}
|
|
13269
13360
|
function ListIndentPlugin({ maxDepth }) {
|
|
13270
13361
|
const [editor] = useLexicalComposerContext4();
|
|
13271
|
-
const isInListItemNode =
|
|
13362
|
+
const isInListItemNode = useRef10(false);
|
|
13272
13363
|
useEffect17(() => {
|
|
13273
13364
|
return editor.registerCommand(
|
|
13274
13365
|
SELECTION_CHANGE_COMMAND,
|
|
@@ -13680,7 +13771,7 @@ import {
|
|
|
13680
13771
|
} from "@lexical/table";
|
|
13681
13772
|
import { calculateZoomLevel } from "@lexical/utils";
|
|
13682
13773
|
import { $getNearestNodeFromDOMNode } from "lexical";
|
|
13683
|
-
import { useCallback as useCallback10, useEffect as useEffect19, useMemo as useMemo6, useRef as
|
|
13774
|
+
import { useCallback as useCallback10, useEffect as useEffect19, useMemo as useMemo6, useRef as useRef11, useState as useState17 } from "react";
|
|
13684
13775
|
import { createPortal as createPortal3 } from "react-dom";
|
|
13685
13776
|
import { Fragment as Fragment16, jsx as jsx125, jsxs as jsxs83 } from "@emotion/react/jsx-runtime";
|
|
13686
13777
|
var MIN_ROW_HEIGHT = 33;
|
|
@@ -13707,10 +13798,10 @@ var fixedGetDOMCellFromTarget = (node) => {
|
|
|
13707
13798
|
return null;
|
|
13708
13799
|
};
|
|
13709
13800
|
function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
13710
|
-
const targetRef =
|
|
13711
|
-
const resizerRef =
|
|
13712
|
-
const tableRectRef =
|
|
13713
|
-
const mouseStartPosRef =
|
|
13801
|
+
const targetRef = useRef11(null);
|
|
13802
|
+
const resizerRef = useRef11(null);
|
|
13803
|
+
const tableRectRef = useRef11(null);
|
|
13804
|
+
const mouseStartPosRef = useRef11(null);
|
|
13714
13805
|
const [mouseCurrentPos, updateMouseCurrentPos] = useState17(null);
|
|
13715
13806
|
const [activeCell, updateActiveCell] = useState17(null);
|
|
13716
13807
|
const [isMouseDown, updateIsMouseDown] = useState17(false);
|
|
@@ -15296,7 +15387,7 @@ var ProgressListItem = ({
|
|
|
15296
15387
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
15297
15388
|
import { css as css101 } from "@emotion/react";
|
|
15298
15389
|
import { CgCheck as CgCheck5 } from "@react-icons/all-files/cg/CgCheck";
|
|
15299
|
-
import { useCallback as useCallback12, useEffect as useEffect24, useMemo as useMemo9, useRef as
|
|
15390
|
+
import { useCallback as useCallback12, useEffect as useEffect24, useMemo as useMemo9, useRef as useRef12, useState as useState21 } from "react";
|
|
15300
15391
|
|
|
15301
15392
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
15302
15393
|
import { css as css100 } from "@emotion/react";
|
|
@@ -15484,7 +15575,7 @@ var SegmentedControl = ({
|
|
|
15484
15575
|
currentBackgroundColor = "white",
|
|
15485
15576
|
...props
|
|
15486
15577
|
}) => {
|
|
15487
|
-
const wrapperRef =
|
|
15578
|
+
const wrapperRef = useRef12(null);
|
|
15488
15579
|
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = useState21(false);
|
|
15489
15580
|
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = useState21(false);
|
|
15490
15581
|
const onOptionChange = useCallback12(
|
|
@@ -15638,7 +15729,7 @@ var Skeleton = ({
|
|
|
15638
15729
|
);
|
|
15639
15730
|
|
|
15640
15731
|
// src/components/Spinner/Spinner.tsx
|
|
15641
|
-
import { useEffect as useEffect25, useRef as
|
|
15732
|
+
import { useEffect as useEffect25, useRef as useRef13 } from "react";
|
|
15642
15733
|
|
|
15643
15734
|
// src/components/Spinner/Spinner.styles.ts
|
|
15644
15735
|
import { css as css103 } from "@emotion/react";
|
|
@@ -16078,7 +16169,7 @@ var Spinner = ({
|
|
|
16078
16169
|
label,
|
|
16079
16170
|
isPaused
|
|
16080
16171
|
}) => {
|
|
16081
|
-
const ref =
|
|
16172
|
+
const ref = useRef13(null);
|
|
16082
16173
|
useEffect25(() => {
|
|
16083
16174
|
var _a, _b, _c;
|
|
16084
16175
|
(_c = ref.current) == null ? void 0 : _c.style.setProperty("--pyramid-size", ((_b = (_a = ref.current) == null ? void 0 : _a.clientWidth) != null ? _b : 200) / 6 + "px");
|
|
@@ -16262,12 +16353,9 @@ var Switch = forwardRef29(
|
|
|
16262
16353
|
}
|
|
16263
16354
|
);
|
|
16264
16355
|
|
|
16265
|
-
// src/components/Table/Table.tsx
|
|
16266
|
-
import * as React21 from "react";
|
|
16267
|
-
|
|
16268
16356
|
// src/components/Table/Table.styles.ts
|
|
16269
16357
|
import { css as css105 } from "@emotion/react";
|
|
16270
|
-
var table = ({ cellPadding = "var(--spacing-sm)
|
|
16358
|
+
var table = ({ cellPadding = "var(--spacing-sm)" }) => css105`
|
|
16271
16359
|
border-bottom: 1px solid var(--gray-400);
|
|
16272
16360
|
border-collapse: collapse;
|
|
16273
16361
|
min-width: 100%;
|
|
@@ -16277,10 +16365,11 @@ var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => css105`
|
|
|
16277
16365
|
th,
|
|
16278
16366
|
td {
|
|
16279
16367
|
padding: ${cellPadding};
|
|
16368
|
+
vertical-align: top;
|
|
16280
16369
|
}
|
|
16281
16370
|
|
|
16282
16371
|
thead tr {
|
|
16283
|
-
border-color: var(--gray-
|
|
16372
|
+
border-color: var(--gray-200);
|
|
16284
16373
|
}
|
|
16285
16374
|
|
|
16286
16375
|
tbody tr:hover {
|
|
@@ -16292,49 +16381,76 @@ var tableHead = css105`
|
|
|
16292
16381
|
text-align: left;
|
|
16293
16382
|
`;
|
|
16294
16383
|
var tableRow = css105`
|
|
16295
|
-
border-bottom: 1px solid var(--gray-
|
|
16384
|
+
border-bottom: 1px solid var(--gray-200);
|
|
16385
|
+
vertical-align: top;
|
|
16386
|
+
font-size: var(--fs-sm);
|
|
16296
16387
|
`;
|
|
16297
16388
|
var tableCellHead = css105`
|
|
16298
16389
|
font-size: var(--fs-sm);
|
|
16299
|
-
|
|
16300
|
-
|
|
16390
|
+
font-weight: var(--fw-regular);
|
|
16391
|
+
line-height: 1.2;
|
|
16392
|
+
}
|
|
16301
16393
|
`;
|
|
16394
|
+
var responsiveTableContainer = css105`
|
|
16395
|
+
max-width: calc(100vw - var(--spacing-md) * 2);
|
|
16396
|
+
overflow-x: auto;
|
|
16397
|
+
${scrollbarStyles}
|
|
16302
16398
|
|
|
16303
|
-
|
|
16399
|
+
> table {
|
|
16400
|
+
display: block;
|
|
16401
|
+
overflow-x: auto;
|
|
16402
|
+
white-space: nowrap;
|
|
16403
|
+
${scrollbarStyles}
|
|
16404
|
+
|
|
16405
|
+
${mq("lg")} {
|
|
16406
|
+
display: table;
|
|
16407
|
+
white-space: initial;
|
|
16408
|
+
}
|
|
16409
|
+
}
|
|
16410
|
+
`;
|
|
16411
|
+
|
|
16412
|
+
// src/components/Table/ResponsiveTableContainer.tsx
|
|
16304
16413
|
import { jsx as jsx138 } from "@emotion/react/jsx-runtime";
|
|
16414
|
+
var ResponsiveTableContainer = ({ children }) => {
|
|
16415
|
+
return /* @__PURE__ */ jsx138("div", { css: responsiveTableContainer, children });
|
|
16416
|
+
};
|
|
16417
|
+
|
|
16418
|
+
// src/components/Table/Table.tsx
|
|
16419
|
+
import * as React21 from "react";
|
|
16420
|
+
import { jsx as jsx139 } from "@emotion/react/jsx-runtime";
|
|
16305
16421
|
var Table = React21.forwardRef(
|
|
16306
16422
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
16307
|
-
return /* @__PURE__ */
|
|
16423
|
+
return /* @__PURE__ */ jsx139("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
16308
16424
|
}
|
|
16309
16425
|
);
|
|
16310
16426
|
var TableHead = React21.forwardRef(
|
|
16311
16427
|
({ children, ...otherProps }, ref) => {
|
|
16312
|
-
return /* @__PURE__ */
|
|
16428
|
+
return /* @__PURE__ */ jsx139("thead", { ref, css: tableHead, ...otherProps, children });
|
|
16313
16429
|
}
|
|
16314
16430
|
);
|
|
16315
16431
|
var TableBody = React21.forwardRef(
|
|
16316
16432
|
({ children, ...otherProps }, ref) => {
|
|
16317
|
-
return /* @__PURE__ */
|
|
16433
|
+
return /* @__PURE__ */ jsx139("tbody", { ref, ...otherProps, children });
|
|
16318
16434
|
}
|
|
16319
16435
|
);
|
|
16320
16436
|
var TableFoot = React21.forwardRef(
|
|
16321
16437
|
({ children, ...otherProps }, ref) => {
|
|
16322
|
-
return /* @__PURE__ */
|
|
16438
|
+
return /* @__PURE__ */ jsx139("tfoot", { ref, ...otherProps, children });
|
|
16323
16439
|
}
|
|
16324
16440
|
);
|
|
16325
16441
|
var TableRow = React21.forwardRef(
|
|
16326
16442
|
({ children, ...otherProps }, ref) => {
|
|
16327
|
-
return /* @__PURE__ */
|
|
16443
|
+
return /* @__PURE__ */ jsx139("tr", { ref, css: tableRow, ...otherProps, children });
|
|
16328
16444
|
}
|
|
16329
16445
|
);
|
|
16330
16446
|
var TableCellHead = React21.forwardRef(
|
|
16331
16447
|
({ children, ...otherProps }, ref) => {
|
|
16332
|
-
return /* @__PURE__ */
|
|
16448
|
+
return /* @__PURE__ */ jsx139("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
16333
16449
|
}
|
|
16334
16450
|
);
|
|
16335
16451
|
var TableCellData = React21.forwardRef(
|
|
16336
16452
|
({ children, ...otherProps }, ref) => {
|
|
16337
|
-
return /* @__PURE__ */
|
|
16453
|
+
return /* @__PURE__ */ jsx139("td", { ref, ...otherProps, children });
|
|
16338
16454
|
}
|
|
16339
16455
|
);
|
|
16340
16456
|
|
|
@@ -16374,7 +16490,7 @@ var tabButtonGroupStyles = css106`
|
|
|
16374
16490
|
`;
|
|
16375
16491
|
|
|
16376
16492
|
// src/components/Tabs/Tabs.tsx
|
|
16377
|
-
import { jsx as
|
|
16493
|
+
import { jsx as jsx140 } from "@emotion/react/jsx-runtime";
|
|
16378
16494
|
var useCurrentTab = () => {
|
|
16379
16495
|
const context = useAriakitTabStore();
|
|
16380
16496
|
if (!context) {
|
|
@@ -16405,23 +16521,23 @@ var Tabs = ({
|
|
|
16405
16521
|
},
|
|
16406
16522
|
[onSelectedIdChange, useHashForState]
|
|
16407
16523
|
);
|
|
16408
|
-
return /* @__PURE__ */
|
|
16524
|
+
return /* @__PURE__ */ jsx140(AriakitTabProvider, { selectedId: selected, selectOnMove: !manual, setSelectedId: onTabSelect, ...props, children });
|
|
16409
16525
|
};
|
|
16410
16526
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
16411
|
-
return /* @__PURE__ */
|
|
16527
|
+
return /* @__PURE__ */ jsx140(AriakitTabList, { ...props, css: tabButtonGroupStyles, children });
|
|
16412
16528
|
};
|
|
16413
16529
|
var TabButton = ({
|
|
16414
16530
|
children,
|
|
16415
16531
|
id,
|
|
16416
16532
|
...props
|
|
16417
16533
|
}) => {
|
|
16418
|
-
return /* @__PURE__ */
|
|
16534
|
+
return /* @__PURE__ */ jsx140(AriakitTab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
16419
16535
|
};
|
|
16420
16536
|
var TabContent = ({
|
|
16421
16537
|
children,
|
|
16422
16538
|
...props
|
|
16423
16539
|
}) => {
|
|
16424
|
-
return /* @__PURE__ */
|
|
16540
|
+
return /* @__PURE__ */ jsx140(AriakitTabPanel, { ...props, children });
|
|
16425
16541
|
};
|
|
16426
16542
|
|
|
16427
16543
|
// src/components/Validation/StatusBullet.styles.ts
|
|
@@ -16503,7 +16619,7 @@ var StatusDeleted = css107`
|
|
|
16503
16619
|
`;
|
|
16504
16620
|
|
|
16505
16621
|
// src/components/Validation/StatusBullet.tsx
|
|
16506
|
-
import { jsx as
|
|
16622
|
+
import { jsx as jsx141 } from "@emotion/react/jsx-runtime";
|
|
16507
16623
|
var StatusBullet = ({
|
|
16508
16624
|
status,
|
|
16509
16625
|
hideText = false,
|
|
@@ -16524,7 +16640,7 @@ var StatusBullet = ({
|
|
|
16524
16640
|
Deleted: StatusDeleted
|
|
16525
16641
|
};
|
|
16526
16642
|
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
16527
|
-
const StatusComponent = () => /* @__PURE__ */
|
|
16643
|
+
const StatusComponent = () => /* @__PURE__ */ jsx141(
|
|
16528
16644
|
"span",
|
|
16529
16645
|
{
|
|
16530
16646
|
role: "status",
|
|
@@ -16534,9 +16650,9 @@ var StatusBullet = ({
|
|
|
16534
16650
|
}
|
|
16535
16651
|
);
|
|
16536
16652
|
if (compact) {
|
|
16537
|
-
return /* @__PURE__ */
|
|
16653
|
+
return /* @__PURE__ */ jsx141(StatusComponent, {});
|
|
16538
16654
|
}
|
|
16539
|
-
return /* @__PURE__ */
|
|
16655
|
+
return /* @__PURE__ */ jsx141(Tooltip, { title: message != null ? message : status, children: /* @__PURE__ */ jsx141("div", { children: /* @__PURE__ */ jsx141(StatusComponent, {}) }) });
|
|
16540
16656
|
};
|
|
16541
16657
|
export {
|
|
16542
16658
|
AddButton,
|
|
@@ -16674,6 +16790,7 @@ export {
|
|
|
16674
16790
|
ProgressList,
|
|
16675
16791
|
ProgressListItem,
|
|
16676
16792
|
ResolveIcon,
|
|
16793
|
+
ResponsiveTableContainer,
|
|
16677
16794
|
RichTextToolbarIcon,
|
|
16678
16795
|
ScrollableList,
|
|
16679
16796
|
ScrollableListInputItem,
|
|
@@ -16799,6 +16916,7 @@ export {
|
|
|
16799
16916
|
uniformStatusDraftIcon,
|
|
16800
16917
|
uniformStatusModifiedIcon,
|
|
16801
16918
|
uniformStatusPublishedIcon,
|
|
16919
|
+
uniformUsageStatusIcon,
|
|
16802
16920
|
useBreakpoint,
|
|
16803
16921
|
useButtonStyles,
|
|
16804
16922
|
useCloseCurrentDrawer,
|