@activecollab/components 2.0.592 → 2.0.594
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/BatchEdit/BatchEdit.js +164 -23
- package/dist/cjs/components/BatchEdit/BatchEdit.js.map +1 -1
- package/dist/cjs/components/BatchEdit/BatchProperties.js +19 -3
- package/dist/cjs/components/BatchEdit/BatchProperties.js.map +1 -1
- package/dist/cjs/components/BatchEdit/Styles.js +67 -1
- package/dist/cjs/components/BatchEdit/Styles.js.map +1 -1
- package/dist/cjs/components/PillButton/PillButton.js.map +1 -1
- package/dist/cjs/components/PillButton/Styles.js +1 -1
- package/dist/cjs/components/PillButton/Styles.js.map +1 -1
- package/dist/cjs/components/Popper/Popper.js +20 -2
- package/dist/cjs/components/Popper/Popper.js.map +1 -1
- package/dist/cjs/presentation/appsAndIntegrations/McpIntegration.js +848 -0
- package/dist/cjs/presentation/appsAndIntegrations/McpIntegration.js.map +1 -0
- package/dist/cjs/presentation/appsAndIntegrations/mcpData.js +149 -0
- package/dist/cjs/presentation/appsAndIntegrations/mcpData.js.map +1 -0
- package/dist/cjs/presentation/shared/CopySnippet.js +56 -0
- package/dist/cjs/presentation/shared/CopySnippet.js.map +1 -0
- package/dist/cjs/presentation/shared/LinkingCommandsButton.js +21 -62
- package/dist/cjs/presentation/shared/LinkingCommandsButton.js.map +1 -1
- package/dist/cjs/presentation/shared/index.js +8 -0
- package/dist/cjs/presentation/shared/index.js.map +1 -1
- package/dist/esm/components/BatchEdit/BatchEdit.d.ts +33 -2
- package/dist/esm/components/BatchEdit/BatchEdit.d.ts.map +1 -1
- package/dist/esm/components/BatchEdit/BatchEdit.js +149 -24
- package/dist/esm/components/BatchEdit/BatchEdit.js.map +1 -1
- package/dist/esm/components/BatchEdit/BatchProperties.d.ts +7 -1
- package/dist/esm/components/BatchEdit/BatchProperties.d.ts.map +1 -1
- package/dist/esm/components/BatchEdit/BatchProperties.js +20 -4
- package/dist/esm/components/BatchEdit/BatchProperties.js.map +1 -1
- package/dist/esm/components/BatchEdit/Styles.d.ts +18 -0
- package/dist/esm/components/BatchEdit/Styles.d.ts.map +1 -1
- package/dist/esm/components/BatchEdit/Styles.js +66 -0
- package/dist/esm/components/BatchEdit/Styles.js.map +1 -1
- package/dist/esm/components/PillButton/PillButton.d.ts +1 -1
- package/dist/esm/components/PillButton/PillButton.d.ts.map +1 -1
- package/dist/esm/components/PillButton/PillButton.js.map +1 -1
- package/dist/esm/components/PillButton/Styles.d.ts.map +1 -1
- package/dist/esm/components/PillButton/Styles.js +1 -1
- package/dist/esm/components/PillButton/Styles.js.map +1 -1
- package/dist/esm/components/Popper/Popper.d.ts.map +1 -1
- package/dist/esm/components/Popper/Popper.js +18 -2
- package/dist/esm/components/Popper/Popper.js.map +1 -1
- package/dist/esm/presentation/appsAndIntegrations/McpIntegration.d.ts +18 -0
- package/dist/esm/presentation/appsAndIntegrations/McpIntegration.d.ts.map +1 -0
- package/dist/esm/presentation/appsAndIntegrations/McpIntegration.js +735 -0
- package/dist/esm/presentation/appsAndIntegrations/McpIntegration.js.map +1 -0
- package/dist/esm/presentation/appsAndIntegrations/mcpData.d.ts +53 -0
- package/dist/esm/presentation/appsAndIntegrations/mcpData.d.ts.map +1 -0
- package/dist/esm/presentation/appsAndIntegrations/mcpData.js +143 -0
- package/dist/esm/presentation/appsAndIntegrations/mcpData.js.map +1 -0
- package/dist/esm/presentation/shared/CopySnippet.d.ts +7 -0
- package/dist/esm/presentation/shared/CopySnippet.d.ts.map +1 -0
- package/dist/esm/presentation/shared/CopySnippet.js +40 -0
- package/dist/esm/presentation/shared/CopySnippet.js.map +1 -0
- package/dist/esm/presentation/shared/LinkingCommandsButton.d.ts.map +1 -1
- package/dist/esm/presentation/shared/LinkingCommandsButton.js +19 -57
- package/dist/esm/presentation/shared/LinkingCommandsButton.js.map +1 -1
- package/dist/esm/presentation/shared/index.d.ts +2 -0
- package/dist/esm/presentation/shared/index.d.ts.map +1 -1
- package/dist/esm/presentation/shared/index.js +1 -0
- package/dist/esm/presentation/shared/index.js.map +1 -1
- package/dist/index.js +485 -255
- 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
package/dist/index.js
CHANGED
|
@@ -17587,13 +17587,31 @@
|
|
|
17587
17587
|
return observer.disconnect();
|
|
17588
17588
|
};
|
|
17589
17589
|
}, [anchorEl, followAnchor, open]);
|
|
17590
|
+
|
|
17591
|
+
// Content that grows after the popper opens, such as a list that shows more rows, moves or flips it to stay on the screen.
|
|
17592
|
+
React.useEffect(function () {
|
|
17593
|
+
var node = ownRef.current;
|
|
17594
|
+
if (!open || !node || typeof ResizeObserver === "undefined") {
|
|
17595
|
+
return undefined;
|
|
17596
|
+
}
|
|
17597
|
+
|
|
17598
|
+
// eslint-disable-next-line compat/compat -- guarded above
|
|
17599
|
+
var observer = new ResizeObserver(function () {
|
|
17600
|
+
var _popperRef$current2;
|
|
17601
|
+
(_popperRef$current2 = popperRef.current) === null || _popperRef$current2 === void 0 || _popperRef$current2.update();
|
|
17602
|
+
});
|
|
17603
|
+
observer.observe(node);
|
|
17604
|
+
return function () {
|
|
17605
|
+
return observer.disconnect();
|
|
17606
|
+
};
|
|
17607
|
+
}, [open]);
|
|
17590
17608
|
React.useEffect(function () {
|
|
17591
17609
|
if (!open) {
|
|
17592
17610
|
return undefined;
|
|
17593
17611
|
}
|
|
17594
17612
|
var update = function update() {
|
|
17595
|
-
var _popperRef$
|
|
17596
|
-
return (_popperRef$
|
|
17613
|
+
var _popperRef$current3;
|
|
17614
|
+
return (_popperRef$current3 = popperRef.current) === null || _popperRef$current3 === void 0 ? void 0 : _popperRef$current3.update();
|
|
17597
17615
|
};
|
|
17598
17616
|
window.addEventListener(ANCHOR_MOVE_EVENT, update);
|
|
17599
17617
|
return function () {
|
|
@@ -32750,11 +32768,311 @@
|
|
|
32750
32768
|
componentId: "sc-wphosb-9"
|
|
32751
32769
|
})(["flex:1 1 0%;padding-right:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
32752
32770
|
StyledBatchPropertiesName.displayName = "StyledBatchPropertiesName";
|
|
32771
|
+
var BATCH_EDIT_STRIP_MS = 200;
|
|
32772
|
+
|
|
32773
|
+
// The strip opens and closes by the height of its row, from no height when it mounts.
|
|
32774
|
+
var StyledBatchEditClip = styled__default["default"].div.withConfig({
|
|
32775
|
+
displayName: "Styles__StyledBatchEditClip",
|
|
32776
|
+
componentId: "sc-wphosb-10"
|
|
32777
|
+
})(["display:grid;grid-template-rows:", ";transition:grid-template-rows ", "ms ease-out;", " @media (prefers-reduced-motion:reduce){transition:none;}"], function (_ref4) {
|
|
32778
|
+
var $open = _ref4.$open;
|
|
32779
|
+
return $open ? "1fr" : "0fr";
|
|
32780
|
+
}, BATCH_EDIT_STRIP_MS, function (_ref5) {
|
|
32781
|
+
var $open = _ref5.$open;
|
|
32782
|
+
return $open && styled.css(["@starting-style{grid-template-rows:0fr;}"]);
|
|
32783
|
+
});
|
|
32784
|
+
StyledBatchEditClip.displayName = "StyledBatchEditClip";
|
|
32785
|
+
var StyledBatchEditClipInner = styled__default["default"].div.withConfig({
|
|
32786
|
+
displayName: "Styles__StyledBatchEditClipInner",
|
|
32787
|
+
componentId: "sc-wphosb-11"
|
|
32788
|
+
})(["min-height:0;overflow:hidden;", ""], function (_ref6) {
|
|
32789
|
+
var $standalone = _ref6.$standalone;
|
|
32790
|
+
return $standalone && "padding-bottom: 8px;";
|
|
32791
|
+
});
|
|
32792
|
+
StyledBatchEditClipInner.displayName = "StyledBatchEditClipInner";
|
|
32793
|
+
|
|
32794
|
+
// A light theme takes a softer tint with an accent edge, so the strip does not fight the paper and its shadow.
|
|
32795
|
+
var StyledBatchEditStrip = styled__default["default"].div.withConfig({
|
|
32796
|
+
displayName: "Styles__StyledBatchEditStrip",
|
|
32797
|
+
componentId: "sc-wphosb-12"
|
|
32798
|
+
})(["--batch-edit-strip-base:var(--color-primary-300);display:flex;align-items:center;gap:8px;min-height:52px;padding:8px 8px 8px 12px;border-radius:", ";background-color:var(--page-paper-main);background-image:linear-gradient( var(--color-primary-100),var(--color-primary-100) ),linear-gradient(var(--batch-edit-strip-base),var(--batch-edit-strip-base));box-shadow:inset 0 0 0 1px var(--batch-edit-strip-edge,transparent);@supports (color:light-dark(red,red)){--batch-edit-strip-base:light-dark( var(--color-primary-200),var(--color-primary-300) );--batch-edit-strip-edge:light-dark(var(--color-primary-400),transparent);}"], function (_ref7) {
|
|
32799
|
+
var $standalone = _ref7.$standalone;
|
|
32800
|
+
return $standalone ? "var(--ac-br-8)" : "var(--ac-br-8) var(--ac-br-8) 0 0";
|
|
32801
|
+
});
|
|
32802
|
+
StyledBatchEditStrip.displayName = "StyledBatchEditStrip";
|
|
32803
|
+
var StyledBatchEditFloat = styled__default["default"].div.withConfig({
|
|
32804
|
+
displayName: "Styles__StyledBatchEditFloat",
|
|
32805
|
+
componentId: "sc-wphosb-13"
|
|
32806
|
+
})(["border-radius:9999px;box-shadow:0 4px 12px -4px rgba(0,0,0,0.35);"]);
|
|
32807
|
+
StyledBatchEditFloat.displayName = "StyledBatchEditFloat";
|
|
32808
|
+
var StyledBatchEditStripCount = styled__default["default"].span.withConfig({
|
|
32809
|
+
displayName: "Styles__StyledBatchEditStripCount",
|
|
32810
|
+
componentId: "sc-wphosb-14"
|
|
32811
|
+
})(["white-space:nowrap;[data-testid=\"batch-edit-counter\"]{font-variant-numeric:tabular-nums;}"]);
|
|
32812
|
+
StyledBatchEditStripCount.displayName = "StyledBatchEditStripCount";
|
|
32813
|
+
|
|
32814
|
+
// A narrow strip wraps its groups into more rows, so no button leaves the screen.
|
|
32815
|
+
var StyledBatchEditStripGroups = styled__default["default"].div.withConfig({
|
|
32816
|
+
displayName: "Styles__StyledBatchEditStripGroups",
|
|
32817
|
+
componentId: "sc-wphosb-15"
|
|
32818
|
+
})(["display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;"]);
|
|
32819
|
+
StyledBatchEditStripGroups.displayName = "StyledBatchEditStripGroups";
|
|
32820
|
+
var StyledBatchEditStripClose = styled__default["default"](IconButton).withConfig({
|
|
32821
|
+
displayName: "Styles__StyledBatchEditStripClose",
|
|
32822
|
+
componentId: "sc-wphosb-16"
|
|
32823
|
+
})(["flex-shrink:0;"]);
|
|
32824
|
+
StyledBatchEditStripClose.displayName = "StyledBatchEditStripClose";
|
|
32825
|
+
|
|
32826
|
+
// The icon of a menu pill takes the size and the color of an action pill icon.
|
|
32827
|
+
var StyledBatchPropertiesPillLabel = styled__default["default"].span.withConfig({
|
|
32828
|
+
displayName: "Styles__StyledBatchPropertiesPillLabel",
|
|
32829
|
+
componentId: "sc-wphosb-17"
|
|
32830
|
+
})(["display:flex;align-items:center;gap:6px;> svg{flex-shrink:0;width:18px;height:18px;}> svg:not([fill=\"none\"]){fill:currentColor;}> svg[stroke]{stroke:currentColor;}"]);
|
|
32831
|
+
StyledBatchPropertiesPillLabel.displayName = "StyledBatchPropertiesPillLabel";
|
|
32832
|
+
var StyledBatchPropertiesItemIcon = styled__default["default"].span.withConfig({
|
|
32833
|
+
displayName: "Styles__StyledBatchPropertiesItemIcon",
|
|
32834
|
+
componentId: "sc-wphosb-18"
|
|
32835
|
+
})(["display:flex;flex-shrink:0;margin-right:8px;svg{width:16px;height:16px;}"]);
|
|
32836
|
+
StyledBatchPropertiesItemIcon.displayName = "StyledBatchPropertiesItemIcon";
|
|
32837
|
+
|
|
32838
|
+
var StyledPillIcon = styled__default["default"].span.withConfig({
|
|
32839
|
+
displayName: "Styles__StyledPillIcon",
|
|
32840
|
+
componentId: "sc-14yhio0-0"
|
|
32841
|
+
})(["display:inline-flex;flex-shrink:0;color:var(--color-theme-600);svg{width:18px;height:18px;fill:currentColor;}"]);
|
|
32842
|
+
StyledPillIcon.displayName = "StyledPillIcon";
|
|
32843
|
+
var StyledPillPlaceholder = styled__default["default"].span.withConfig({
|
|
32844
|
+
displayName: "Styles__StyledPillPlaceholder",
|
|
32845
|
+
componentId: "sc-14yhio0-1"
|
|
32846
|
+
})(["overflow:hidden;text-overflow:ellipsis;"]);
|
|
32847
|
+
StyledPillPlaceholder.displayName = "StyledPillPlaceholder";
|
|
32848
|
+
var ACTIVE_COLORS = {
|
|
32849
|
+
alert: ["var(--alert-surface-subtle)", "var(--red-alert)"],
|
|
32850
|
+
warning: ["var(--note-bg)", "var(--warning-text)"]
|
|
32851
|
+
};
|
|
32852
|
+
var activeColors = function activeColors(tone) {
|
|
32853
|
+
return tone === "alert" || tone === "warning" ? ACTIVE_COLORS[tone] : ["var(--pill-background-active)", "var(--color-primary)"];
|
|
32854
|
+
};
|
|
32855
|
+
var activeStyle = function activeStyle(tone) {
|
|
32856
|
+
return styled.css(["background-color:", ";color:", ";", "{color:", ";}svg{fill:currentColor;}svg [stroke]:not([stroke=\"none\"]){stroke:currentColor;}"], activeColors(tone)[0], activeColors(tone)[1], StyledPillIcon, activeColors(tone)[1]);
|
|
32857
|
+
};
|
|
32858
|
+
var hoverTextStyle = styled.css(["color:var(--color-theme-900);", "{color:var(--color-theme-900);}"], StyledPillIcon);
|
|
32859
|
+
var toneStyle = function toneStyle(tone) {
|
|
32860
|
+
switch (tone) {
|
|
32861
|
+
case "alternate":
|
|
32862
|
+
return styled.css(["background-color:var(--color-theme-300);&:hover,&:focus-visible{background-color:var(--color-theme-400);", "}"], hoverTextStyle);
|
|
32863
|
+
case "accent":
|
|
32864
|
+
return styled.css(["background-color:color-mix( in srgb,var(--color-primary) 15%,transparent );color:var(--color-primary);", "{color:var(--color-primary);}&:hover,&:focus-visible{background-color:color-mix( in srgb,var(--color-primary) 25%,transparent );color:var(--color-primary);}"], StyledPillIcon);
|
|
32865
|
+
case "raised":
|
|
32866
|
+
return styled.css(["&&{gap:6px;font-weight:600;}border:1px solid var(--color-theme-400);background-color:var(--color-theme-200);box-shadow:inset 0 1px 0 rgba(255,255,255,0.07);color:var(--color-theme-900);", "{color:inherit;}@supports (color:light-dark(red,red)){border-color:light-dark(var(--color-theme-400),#494e59);background-color:transparent;background-image:linear-gradient( light-dark(#ffffff,#3a3f49),light-dark(#f3f4f6,#31353e) );color:light-dark(var(--color-theme-900),#eceef1);&:hover{background-image:linear-gradient( light-dark(#f8f9fa,#444a55),light-dark(#eceef1,#3a3f49) );}}&:focus-visible{outline:2px solid var(--color-primary);outline-offset:1px;}&[aria-expanded=\"true\"]{background-image:none;}"], StyledPillIcon);
|
|
32867
|
+
case "primary":
|
|
32868
|
+
return styled.css(["&&{gap:6px;font-weight:600;}border:1px solid var(--color-primary);background-color:var(--color-primary);background-image:linear-gradient( var(--color-primary-800),var(--color-primary) );box-shadow:inset 0 1px 0 rgba(255,255,255,0.35);color:var(--page-paper-main);", "{color:inherit;}&:hover{background-color:var(--color-primary-800);background-image:none;}&:focus-visible{outline:2px solid var(--color-primary);outline-offset:1px;}"], StyledPillIcon);
|
|
32869
|
+
case "well":
|
|
32870
|
+
return styled.css(["&&{gap:6px;font-weight:600;}border:1px solid var(--color-theme-400);background-color:var(--body-bg-main);color:var(--color-theme-900);", "{color:inherit;}&:focus-visible{outline:2px solid var(--color-primary);outline-offset:1px;}"], StyledPillIcon);
|
|
32871
|
+
case "ghost":
|
|
32872
|
+
return styled.css(["background-color:transparent;.c-pill-host:hover &.c-pill-button--ghost,&:focus-visible{background-color:var(--pill-background);}.c-pill-host:hover &.c-pill-button--ghost:hover,&:hover{background-color:var(--pill-background-hover);", "}"], hoverTextStyle);
|
|
32873
|
+
case "outlined":
|
|
32874
|
+
return styled.css(["background-color:transparent;border:1px solid var(--color-theme-700);&:hover,&:focus-visible{border-color:var(--color-primary);color:var(--color-primary);", "{color:var(--color-primary);}}"], StyledPillIcon);
|
|
32875
|
+
default:
|
|
32876
|
+
return styled.css(["background-color:var(--pill-background);&:hover,&:focus-visible{background-color:var(--pill-background-hover);", "}"], hoverTextStyle);
|
|
32877
|
+
}
|
|
32878
|
+
};
|
|
32879
|
+
var compactStyle = styled.css(["", "{display:none;}"], StyledPillPlaceholder);
|
|
32880
|
+
var PILL_HEIGHTS = {
|
|
32881
|
+
xsmall: "18px",
|
|
32882
|
+
small: "24px",
|
|
32883
|
+
dense: "24px",
|
|
32884
|
+
medium: "26px"
|
|
32885
|
+
};
|
|
32886
|
+
var denseStyle = styled.css(["gap:4px;--c-pill-padding-x:11px;font-size:calc(0.75rem * var(--text-scale,1));", " svg{width:12px;height:12px;}"], StyledPillIcon);
|
|
32887
|
+
|
|
32888
|
+
/* The size of a type chip: small caps of an object type or a state switch. */
|
|
32889
|
+
var xsmallStyle = styled.css(["gap:3px;--c-pill-padding-x:6px;font-size:calc(0.625rem * var(--text-scale,1));font-weight:600;", " svg{width:12px;height:12px;}"], StyledPillIcon);
|
|
32890
|
+
var StyledPillButton = styled__default["default"].button.withConfig({
|
|
32891
|
+
displayName: "Styles__StyledPillButton",
|
|
32892
|
+
componentId: "sc-14yhio0-2"
|
|
32893
|
+
})(["", " ", " display:inline-flex;align-items:center;justify-content:center;gap:6px;flex-shrink:0;max-width:100%;height:", ";margin:0;--c-pill-padding-x:", ";padding:0 var(--c-pill-padding-x);border:none;border-radius:var(--ac-br-rounded);font-size:calc(0.875rem * var(--text-scale,1));font-weight:500;line-height:1;white-space:nowrap;color:", ";cursor:pointer;user-select:none;&:focus{outline:none;}&:disabled{cursor:default;opacity:", ";pointer-events:none;}", " ", " ", " ", " ", " ", " ", " ", " &[aria-haspopup][aria-expanded=\"true\"],.c-pill-host:hover &[aria-haspopup][aria-expanded=\"true\"]{", "}"], FontStyle, BoxSizingStyle, function (props) {
|
|
32894
|
+
return PILL_HEIGHTS[props.$size];
|
|
32895
|
+
}, function (props) {
|
|
32896
|
+
return props.$inset === "tight" ? "6px" : "10px";
|
|
32897
|
+
}, function (props) {
|
|
32898
|
+
return props.$empty ? "var(--color-theme-700)" : "var(--color-theme-800)";
|
|
32899
|
+
}, function (props) {
|
|
32900
|
+
return props.$dimDisabled ? "50%" : "100%";
|
|
32901
|
+
}, function (props) {
|
|
32902
|
+
return toneStyle(props.$tone);
|
|
32903
|
+
}, function (props) {
|
|
32904
|
+
return props.$tone === "ghost" && props.$empty && styled.css(["", ",", "{opacity:0;}.c-pill-host:hover &.c-pill-button--ghost,&:hover,&:focus-visible,&[aria-expanded=\"true\"]{", ",", "{opacity:1;}}"], StyledPillIcon, StyledPillPlaceholder, StyledPillIcon, StyledPillPlaceholder);
|
|
32905
|
+
}, function (props) {
|
|
32906
|
+
return props.$iconOnly && styled.css(["width:", ";padding:0;", " svg{width:16px;height:16px;}"], props.$tone === "raised" ? "28px" : "36px", StyledPillIcon);
|
|
32907
|
+
}, function (props) {
|
|
32908
|
+
return props.$size === "xsmall" && xsmallStyle;
|
|
32909
|
+
}, function (props) {
|
|
32910
|
+
return props.$size === "dense" && denseStyle;
|
|
32911
|
+
}, function (props) {
|
|
32912
|
+
return props.$compact === true && compactStyle;
|
|
32913
|
+
}, function (props) {
|
|
32914
|
+
return props.$compact === "mobile" && styled.css(["@media (max-width:768px){", "}"], compactStyle);
|
|
32915
|
+
}, function (props) {
|
|
32916
|
+
return props.$active && styled.css(["&,&:hover,&:focus-visible{", "}"], activeStyle(props.$tone));
|
|
32917
|
+
}, function (props) {
|
|
32918
|
+
return activeStyle(props.$tone);
|
|
32919
|
+
});
|
|
32920
|
+
StyledPillButton.displayName = "StyledPillButton";
|
|
32921
|
+
|
|
32922
|
+
var _excluded$1o = ["icon", "endIcon", "placeholder", "tone", "active", "iconOnly", "compact", "size", "inset", "dimDisabled", "type", "className", "children"];
|
|
32923
|
+
/**
|
|
32924
|
+
* @component PillButton
|
|
32925
|
+
* @description
|
|
32926
|
+
* A rounded trigger for a field value, for example the assignees, the dates or the label of a task.
|
|
32927
|
+
* With no children it shows its icon and placeholder. With children it shows only the children.
|
|
32928
|
+
* It forwards its ref and click handler, so a Menu or a Select can use it as a target.
|
|
32929
|
+
* Put several pills in a PillGroup to make a segmented control.
|
|
32930
|
+
*
|
|
32931
|
+
* @example
|
|
32932
|
+
* <PillButton icon={<CalendarIcon />} placeholder="Dates" />
|
|
32933
|
+
* <PillButton tone="ghost">Sep 24. - 30.</PillButton>
|
|
32934
|
+
*/
|
|
32935
|
+
var PillButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
32936
|
+
var _args$ariaLabel;
|
|
32937
|
+
var icon = _ref.icon,
|
|
32938
|
+
endIcon = _ref.endIcon,
|
|
32939
|
+
placeholder = _ref.placeholder,
|
|
32940
|
+
_ref$tone = _ref.tone,
|
|
32941
|
+
tone = _ref$tone === void 0 ? "soft" : _ref$tone,
|
|
32942
|
+
active = _ref.active,
|
|
32943
|
+
_ref$iconOnly = _ref.iconOnly,
|
|
32944
|
+
iconOnly = _ref$iconOnly === void 0 ? false : _ref$iconOnly,
|
|
32945
|
+
_ref$compact = _ref.compact,
|
|
32946
|
+
compact = _ref$compact === void 0 ? false : _ref$compact,
|
|
32947
|
+
_ref$size = _ref.size,
|
|
32948
|
+
size = _ref$size === void 0 ? "medium" : _ref$size,
|
|
32949
|
+
_ref$inset = _ref.inset,
|
|
32950
|
+
inset = _ref$inset === void 0 ? "default" : _ref$inset,
|
|
32951
|
+
_ref$dimDisabled = _ref.dimDisabled,
|
|
32952
|
+
dimDisabled = _ref$dimDisabled === void 0 ? true : _ref$dimDisabled,
|
|
32953
|
+
_ref$type = _ref.type,
|
|
32954
|
+
type = _ref$type === void 0 ? "button" : _ref$type,
|
|
32955
|
+
className = _ref.className,
|
|
32956
|
+
children = _ref.children,
|
|
32957
|
+
args = _objectWithoutProperties(_ref, _excluded$1o);
|
|
32958
|
+
var isEmpty = React.Children.toArray(children).length === 0;
|
|
32959
|
+
var ariaLabel = (_args$ariaLabel = args["aria-label"]) !== null && _args$ariaLabel !== void 0 ? _args$ariaLabel : isEmpty && compact && typeof placeholder === "string" ? placeholder : undefined;
|
|
32960
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledPillButton, _extends({
|
|
32961
|
+
ref: ref,
|
|
32962
|
+
type: type,
|
|
32963
|
+
className: classnames__default["default"]("c-pill-button", "c-pill-button--".concat(tone), {
|
|
32964
|
+
"c-pill-button--empty": isEmpty,
|
|
32965
|
+
"c-pill-button--active": active,
|
|
32966
|
+
"c-pill-button--icon-only": iconOnly
|
|
32967
|
+
}, className),
|
|
32968
|
+
"aria-pressed": active
|
|
32969
|
+
}, args, {
|
|
32970
|
+
"aria-label": ariaLabel,
|
|
32971
|
+
$tone: tone,
|
|
32972
|
+
$active: Boolean(active),
|
|
32973
|
+
$empty: isEmpty,
|
|
32974
|
+
$iconOnly: iconOnly,
|
|
32975
|
+
$compact: compact,
|
|
32976
|
+
$size: size,
|
|
32977
|
+
$inset: inset,
|
|
32978
|
+
$dimDisabled: dimDisabled
|
|
32979
|
+
}), isEmpty && icon ? /*#__PURE__*/React__default["default"].createElement(StyledPillIcon, {
|
|
32980
|
+
className: "c-pill-button__icon"
|
|
32981
|
+
}, icon) : null, isEmpty && placeholder && !iconOnly ? /*#__PURE__*/React__default["default"].createElement(StyledPillPlaceholder, {
|
|
32982
|
+
className: "c-pill-button__placeholder"
|
|
32983
|
+
}, placeholder) : null, isEmpty && endIcon && !iconOnly ? /*#__PURE__*/React__default["default"].createElement(StyledPillIcon, {
|
|
32984
|
+
className: "c-pill-button__end-icon"
|
|
32985
|
+
}, endIcon) : null, isEmpty ? null : children);
|
|
32986
|
+
});
|
|
32987
|
+
PillButton.displayName = "PillButton";
|
|
32988
|
+
|
|
32989
|
+
var first = "& > .c-pill-button:first-child, & > :first-child .c-pill-button";
|
|
32990
|
+
var last = "& > .c-pill-button:last-child, & > :last-child .c-pill-button";
|
|
32991
|
+
var firstText = "& > .c-pill-button:not(.c-pill-button--icon-only):first-child, & > :first-child .c-pill-button:not(.c-pill-button--icon-only)";
|
|
32992
|
+
var lastIconOnly = "& > .c-pill-button--icon-only:last-child, & > :last-child .c-pill-button--icon-only";
|
|
32993
|
+
var lastText = "& > .c-pill-button:not(.c-pill-button--icon-only):last-child, & > :last-child .c-pill-button:not(.c-pill-button--icon-only)";
|
|
32994
|
+
var StyledPillGroup = styled__default["default"].div.withConfig({
|
|
32995
|
+
displayName: "Styles__StyledPillGroup",
|
|
32996
|
+
componentId: "sc-1x5hpq8-0"
|
|
32997
|
+
})(["", " display:inline-flex;align-items:stretch;flex-shrink:0;max-width:100%;& > *{display:inline-flex;min-width:0;}.c-pill-button{border-radius:0;}", "{border-top-left-radius:var(--ac-br-rounded);border-bottom-left-radius:var(--ac-br-rounded);}", "{border-top-right-radius:var(--ac-br-rounded);border-bottom-right-radius:var(--ac-br-rounded);}", "{padding-left:calc(var(--c-pill-padding-x,10px) + 4px);}", "{padding-right:calc(var(--c-pill-padding-x,10px) + 4px);}", " ", " ", ""], BoxSizingStyle, first, last, firstText, lastText, function (props) {
|
|
32998
|
+
return props.$appearance === "soft" && styled.css(["gap:2px;"]);
|
|
32999
|
+
}, function (props) {
|
|
33000
|
+
return props.$appearance === "raised" && styled.css(["border-radius:var(--ac-br-rounded);box-shadow:0 1px 1px rgba(0,0,0,0.22);", "{width:auto;padding-left:7px;padding-right:calc(var(--c-pill-padding-x,10px) + 4px);}& > * + *{margin-left:-1px;}.c-pill-button:hover,.c-pill-button:focus-visible{position:relative;z-index:1;}"], lastIconOnly);
|
|
33001
|
+
}, function (props) {
|
|
33002
|
+
return props.$appearance === "outlined" && styled.css(["border:1px solid var(--pill-border);border-radius:var(--ac-br-6);overflow:hidden;.c-pill-button{height:24px;}.c-pill-button:not(.c-pill-button--accent){background-color:transparent;}", ",", "{border-radius:0;}& > * + *{border-left:1px solid var(--pill-border);}"], first, last);
|
|
33003
|
+
});
|
|
33004
|
+
StyledPillGroup.displayName = "StyledPillGroup";
|
|
33005
|
+
|
|
33006
|
+
var _excluded$1n = ["appearance", "className", "children"];
|
|
33007
|
+
/**
|
|
33008
|
+
* @component PillGroup
|
|
33009
|
+
* @description
|
|
33010
|
+
* Joins PillButton children into one segmented control. The outer pills keep their round ends.
|
|
33011
|
+
* A child may wrap its pill, for example in a Tooltip or a picker, the group still finds it.
|
|
33012
|
+
*
|
|
33013
|
+
* @example
|
|
33014
|
+
* <PillGroup aria-label="Task fields">
|
|
33015
|
+
* <PillButton icon={<PersonPlusIcon />} placeholder="Assignee" />
|
|
33016
|
+
* <PillButton icon={<CalendarIcon />} placeholder="Dates" />
|
|
33017
|
+
* </PillGroup>
|
|
33018
|
+
*/
|
|
33019
|
+
var PillGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
33020
|
+
var _ref$appearance = _ref.appearance,
|
|
33021
|
+
appearance = _ref$appearance === void 0 ? "soft" : _ref$appearance,
|
|
33022
|
+
className = _ref.className,
|
|
33023
|
+
children = _ref.children,
|
|
33024
|
+
args = _objectWithoutProperties(_ref, _excluded$1n);
|
|
33025
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledPillGroup, _extends({
|
|
33026
|
+
ref: ref,
|
|
33027
|
+
role: "group",
|
|
33028
|
+
className: classnames__default["default"]("c-pill-group", "c-pill-group--".concat(appearance), className),
|
|
33029
|
+
$appearance: appearance
|
|
33030
|
+
}, args), children);
|
|
33031
|
+
});
|
|
33032
|
+
PillGroup.displayName = "PillGroup";
|
|
32753
33033
|
|
|
32754
|
-
|
|
32755
|
-
var
|
|
33034
|
+
// The strip stays in the page while it clips shut, and leaves after the animation.
|
|
33035
|
+
var useClipPresence = function useClipPresence(open) {
|
|
33036
|
+
var _useState = React.useState(open),
|
|
33037
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33038
|
+
isRendered = _useState2[0],
|
|
33039
|
+
setIsRendered = _useState2[1];
|
|
33040
|
+
React.useEffect(function () {
|
|
33041
|
+
if (open) {
|
|
33042
|
+
setIsRendered(true);
|
|
33043
|
+
return undefined;
|
|
33044
|
+
}
|
|
33045
|
+
var timer = setTimeout(function () {
|
|
33046
|
+
return setIsRendered(false);
|
|
33047
|
+
}, BATCH_EDIT_STRIP_MS);
|
|
33048
|
+
return function () {
|
|
33049
|
+
return clearTimeout(timer);
|
|
33050
|
+
};
|
|
33051
|
+
}, [open]);
|
|
33052
|
+
return open || isRendered;
|
|
33053
|
+
};
|
|
33054
|
+
|
|
33055
|
+
/** The band under the toolbar of a list: the count with Clear All, the action pills, the property menus, Update and a close button. */
|
|
33056
|
+
var BatchEditStrip = function BatchEditStrip(_ref) {
|
|
32756
33057
|
var open = _ref.open,
|
|
32757
33058
|
count = _ref.count,
|
|
33059
|
+
container = _ref.container,
|
|
33060
|
+
_ref$bleed = _ref.bleed,
|
|
33061
|
+
bleed = _ref$bleed === void 0 ? 0 : _ref$bleed,
|
|
33062
|
+
_ref$standalone = _ref.standalone,
|
|
33063
|
+
standalone = _ref$standalone === void 0 ? false : _ref$standalone,
|
|
33064
|
+
_ref$actions = _ref.actions,
|
|
33065
|
+
actions = _ref$actions === void 0 ? [] : _ref$actions,
|
|
33066
|
+
_ref$hasChanges = _ref.hasChanges,
|
|
33067
|
+
hasChanges = _ref$hasChanges === void 0 ? false : _ref$hasChanges,
|
|
33068
|
+
onUpdate = _ref.onUpdate,
|
|
33069
|
+
_ref$updateDisabled = _ref.updateDisabled,
|
|
33070
|
+
updateDisabled = _ref$updateDisabled === void 0 ? false : _ref$updateDisabled,
|
|
33071
|
+
onClearChanges = _ref.onClearChanges,
|
|
33072
|
+
_ref$updateLabel = _ref.updateLabel,
|
|
33073
|
+
updateLabel = _ref$updateLabel === void 0 ? "Update" : _ref$updateLabel,
|
|
33074
|
+
_ref$clearChangesLabe = _ref.clearChangesLabel,
|
|
33075
|
+
clearChangesLabel = _ref$clearChangesLabe === void 0 ? "Clear Properties" : _ref$clearChangesLabe,
|
|
32758
33076
|
onClose = _ref.onClose,
|
|
32759
33077
|
onClearAll = _ref.onClearAll,
|
|
32760
33078
|
_ref$selectedLabel = _ref.selectedLabel,
|
|
@@ -32763,13 +33081,101 @@
|
|
|
32763
33081
|
clearAllLabel = _ref$clearAllLabel === void 0 ? "Clear All" : _ref$clearAllLabel,
|
|
32764
33082
|
_ref$closeLabel = _ref.closeLabel,
|
|
32765
33083
|
closeLabel = _ref$closeLabel === void 0 ? "Close" : _ref$closeLabel,
|
|
32766
|
-
_ref$fitContent = _ref.fitContent,
|
|
32767
|
-
fitContent = _ref$fitContent === void 0 ? false : _ref$fitContent,
|
|
32768
|
-
_ref$renderInPortal = _ref.renderInPortal,
|
|
32769
|
-
renderInPortal = _ref$renderInPortal === void 0 ? true : _ref$renderInPortal,
|
|
32770
33084
|
children = _ref.children,
|
|
32771
33085
|
className = _ref.className,
|
|
32772
33086
|
style = _ref.style;
|
|
33087
|
+
var isRendered = useClipPresence(open);
|
|
33088
|
+
var menus = React.Children.toArray(children);
|
|
33089
|
+
if (!container || !isRendered) {
|
|
33090
|
+
return null;
|
|
33091
|
+
}
|
|
33092
|
+
return /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/React__default["default"].createElement(StyledBatchEditClip, {
|
|
33093
|
+
$open: open,
|
|
33094
|
+
style: bleed ? {
|
|
33095
|
+
margin: "-".concat(bleed, "px -").concat(bleed, "px 0")
|
|
33096
|
+
} : undefined,
|
|
33097
|
+
"data-testid": "batch-edit-strip-clip"
|
|
33098
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledBatchEditClipInner, {
|
|
33099
|
+
$standalone: standalone,
|
|
33100
|
+
style: bleed ? {
|
|
33101
|
+
paddingBottom: "".concat(bleed, "px")
|
|
33102
|
+
} : undefined
|
|
33103
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledBatchEditStrip, {
|
|
33104
|
+
$standalone: standalone,
|
|
33105
|
+
style: style,
|
|
33106
|
+
className: classnames__default["default"]("c-batch-edit c-batch-edit--strip", className),
|
|
33107
|
+
"data-testid": "batch-edit-strip"
|
|
33108
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledBatchEditStripGroups, null, /*#__PURE__*/React__default["default"].createElement(StyledBatchEditFloat, null, /*#__PURE__*/React__default["default"].createElement(PillGroup, {
|
|
33109
|
+
appearance: "raised"
|
|
33110
|
+
}, /*#__PURE__*/React__default["default"].createElement(PillButton, {
|
|
33111
|
+
tone: "well",
|
|
33112
|
+
disabled: true,
|
|
33113
|
+
dimDisabled: false
|
|
33114
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledBatchEditStripCount, null, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
33115
|
+
"data-testid": "batch-edit-counter"
|
|
33116
|
+
}, count), " ", selectedLabel)), /*#__PURE__*/React__default["default"].createElement(PillButton, {
|
|
33117
|
+
tone: "raised",
|
|
33118
|
+
placeholder: clearAllLabel,
|
|
33119
|
+
onClick: onClearAll,
|
|
33120
|
+
disabled: count === 0
|
|
33121
|
+
}))), actions.length ? /*#__PURE__*/React__default["default"].createElement(StyledBatchEditFloat, null, /*#__PURE__*/React__default["default"].createElement(PillGroup, {
|
|
33122
|
+
appearance: "raised"
|
|
33123
|
+
}, actions.map(function (action) {
|
|
33124
|
+
return /*#__PURE__*/React__default["default"].createElement(PillButton, {
|
|
33125
|
+
key: action.id,
|
|
33126
|
+
tone: "raised",
|
|
33127
|
+
icon: action.icon,
|
|
33128
|
+
placeholder: action.label,
|
|
33129
|
+
onClick: action.onClick,
|
|
33130
|
+
disabled: action.disabled,
|
|
33131
|
+
"data-testid": action["data-testid"]
|
|
33132
|
+
});
|
|
33133
|
+
}))) : null, menus.length ? /*#__PURE__*/React__default["default"].createElement(StyledBatchEditFloat, null, /*#__PURE__*/React__default["default"].createElement(PillGroup, {
|
|
33134
|
+
appearance: "raised"
|
|
33135
|
+
}, menus)) : null, hasChanges ? /*#__PURE__*/React__default["default"].createElement(StyledBatchEditFloat, null, /*#__PURE__*/React__default["default"].createElement(PillGroup, {
|
|
33136
|
+
appearance: "raised"
|
|
33137
|
+
}, /*#__PURE__*/React__default["default"].createElement(PillButton, {
|
|
33138
|
+
tone: "primary",
|
|
33139
|
+
placeholder: updateLabel,
|
|
33140
|
+
onClick: onUpdate,
|
|
33141
|
+
disabled: updateDisabled,
|
|
33142
|
+
"data-testid": "batch-update"
|
|
33143
|
+
}), /*#__PURE__*/React__default["default"].createElement(Tooltip, {
|
|
33144
|
+
title: clearChangesLabel
|
|
33145
|
+
}, /*#__PURE__*/React__default["default"].createElement(PillButton, {
|
|
33146
|
+
tone: "raised",
|
|
33147
|
+
icon: /*#__PURE__*/React__default["default"].createElement(CloseIcon$1, null),
|
|
33148
|
+
"aria-label": clearChangesLabel,
|
|
33149
|
+
onClick: onClearChanges,
|
|
33150
|
+
"data-testid": "batch-clear-properties"
|
|
33151
|
+
})))) : null), /*#__PURE__*/React__default["default"].createElement(Tooltip, {
|
|
33152
|
+
title: closeLabel
|
|
33153
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledBatchEditStripClose, {
|
|
33154
|
+
variant: "text gray",
|
|
33155
|
+
"aria-label": closeLabel,
|
|
33156
|
+
onClick: onClose
|
|
33157
|
+
}, /*#__PURE__*/React__default["default"].createElement(CloseIcon$1, null)))))), container);
|
|
33158
|
+
};
|
|
33159
|
+
|
|
33160
|
+
/** The floating bar at the bottom of the page. */
|
|
33161
|
+
var BatchEditFloat = function BatchEditFloat(_ref2) {
|
|
33162
|
+
var open = _ref2.open,
|
|
33163
|
+
count = _ref2.count,
|
|
33164
|
+
onClose = _ref2.onClose,
|
|
33165
|
+
onClearAll = _ref2.onClearAll,
|
|
33166
|
+
_ref2$selectedLabel = _ref2.selectedLabel,
|
|
33167
|
+
selectedLabel = _ref2$selectedLabel === void 0 ? "Selected" : _ref2$selectedLabel,
|
|
33168
|
+
_ref2$clearAllLabel = _ref2.clearAllLabel,
|
|
33169
|
+
clearAllLabel = _ref2$clearAllLabel === void 0 ? "Clear All" : _ref2$clearAllLabel,
|
|
33170
|
+
_ref2$closeLabel = _ref2.closeLabel,
|
|
33171
|
+
closeLabel = _ref2$closeLabel === void 0 ? "Close" : _ref2$closeLabel,
|
|
33172
|
+
_ref2$fitContent = _ref2.fitContent,
|
|
33173
|
+
fitContent = _ref2$fitContent === void 0 ? false : _ref2$fitContent,
|
|
33174
|
+
_ref2$renderInPortal = _ref2.renderInPortal,
|
|
33175
|
+
renderInPortal = _ref2$renderInPortal === void 0 ? true : _ref2$renderInPortal,
|
|
33176
|
+
children = _ref2.children,
|
|
33177
|
+
className = _ref2.className,
|
|
33178
|
+
style = _ref2.style;
|
|
32773
33179
|
return /*#__PURE__*/React__default["default"].createElement(StyledBatchEdit, {
|
|
32774
33180
|
open: open,
|
|
32775
33181
|
renderInPortal: renderInPortal,
|
|
@@ -32795,13 +33201,18 @@
|
|
|
32795
33201
|
"aria-label": closeLabel
|
|
32796
33202
|
}, /*#__PURE__*/React__default["default"].createElement(CloseIcon$1, null))));
|
|
32797
33203
|
};
|
|
33204
|
+
|
|
33205
|
+
/** The batch edit bar: the selection count, Clear All, the actions and a close button. The look sets a floating bar or a strip under the toolbar. */
|
|
33206
|
+
var BatchEdit = function BatchEdit(props) {
|
|
33207
|
+
return props.look === "strip" ? /*#__PURE__*/React__default["default"].createElement(BatchEditStrip, props) : /*#__PURE__*/React__default["default"].createElement(BatchEditFloat, props);
|
|
33208
|
+
};
|
|
32798
33209
|
BatchEdit.displayName = "BatchEdit";
|
|
32799
33210
|
/** A row of batch edit parts, such as the action icons or the property menus with Update. */
|
|
32800
|
-
var BatchEditGroup = function BatchEditGroup(
|
|
32801
|
-
var
|
|
32802
|
-
gap =
|
|
32803
|
-
children =
|
|
32804
|
-
className =
|
|
33211
|
+
var BatchEditGroup = function BatchEditGroup(_ref3) {
|
|
33212
|
+
var _ref3$gap = _ref3.gap,
|
|
33213
|
+
gap = _ref3$gap === void 0 ? 16 : _ref3$gap,
|
|
33214
|
+
children = _ref3.children,
|
|
33215
|
+
className = _ref3.className;
|
|
32805
33216
|
return /*#__PURE__*/React__default["default"].createElement(StyledBatchEditGroup, {
|
|
32806
33217
|
$gap: gap,
|
|
32807
33218
|
className: classnames__default["default"]("c-batch-edit-group", className)
|
|
@@ -32809,17 +33220,17 @@
|
|
|
32809
33220
|
};
|
|
32810
33221
|
BatchEditGroup.displayName = "BatchEditGroup";
|
|
32811
33222
|
/** An icon action of the batch edit bar, such as Complete, Move or Move to Trash. */
|
|
32812
|
-
var BatchEditAction = function BatchEditAction(
|
|
32813
|
-
var title =
|
|
32814
|
-
children =
|
|
32815
|
-
onClick =
|
|
32816
|
-
|
|
32817
|
-
disabled =
|
|
32818
|
-
|
|
32819
|
-
tooltipDisabled =
|
|
32820
|
-
|
|
32821
|
-
iconTone =
|
|
32822
|
-
testId =
|
|
33223
|
+
var BatchEditAction = function BatchEditAction(_ref4) {
|
|
33224
|
+
var title = _ref4.title,
|
|
33225
|
+
children = _ref4.children,
|
|
33226
|
+
onClick = _ref4.onClick,
|
|
33227
|
+
_ref4$disabled = _ref4.disabled,
|
|
33228
|
+
disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
|
|
33229
|
+
_ref4$tooltipDisabled = _ref4.tooltipDisabled,
|
|
33230
|
+
tooltipDisabled = _ref4$tooltipDisabled === void 0 ? disabled : _ref4$tooltipDisabled,
|
|
33231
|
+
_ref4$iconTone = _ref4.iconTone,
|
|
33232
|
+
iconTone = _ref4$iconTone === void 0 ? "dark" : _ref4$iconTone,
|
|
33233
|
+
testId = _ref4["data-testid"];
|
|
32823
33234
|
return /*#__PURE__*/React__default["default"].createElement(Tooltip, {
|
|
32824
33235
|
title: title,
|
|
32825
33236
|
disable: tooltipDisabled
|
|
@@ -32856,6 +33267,9 @@
|
|
|
32856
33267
|
_ref$defaultOpen = _ref.defaultOpen,
|
|
32857
33268
|
defaultOpen = _ref$defaultOpen === void 0 ? false : _ref$defaultOpen,
|
|
32858
33269
|
defaultItem = _ref.defaultItem,
|
|
33270
|
+
_ref$look = _ref.look,
|
|
33271
|
+
look = _ref$look === void 0 ? "float" : _ref$look,
|
|
33272
|
+
popperClassName = _ref.popperClassName,
|
|
32859
33273
|
className = _ref.className,
|
|
32860
33274
|
_ref$dataTestid = _ref["data-testid"],
|
|
32861
33275
|
testId = _ref$dataTestid === void 0 ? "batch-properties" : _ref$dataTestid;
|
|
@@ -32884,14 +33298,26 @@
|
|
|
32884
33298
|
}
|
|
32885
33299
|
};
|
|
32886
33300
|
});
|
|
33301
|
+
var isStrip = look === "strip";
|
|
32887
33302
|
return /*#__PURE__*/React__default["default"].createElement(StyledBatchPropertiesMenu, {
|
|
32888
33303
|
open: open,
|
|
32889
33304
|
onOpen: function onOpen() {
|
|
32890
33305
|
return setOpen(true);
|
|
32891
33306
|
},
|
|
32892
33307
|
onClose: handleClose,
|
|
32893
|
-
position: "top-start",
|
|
32894
|
-
|
|
33308
|
+
position: isStrip ? "bottom-start" : "top-start",
|
|
33309
|
+
popperClassName: popperClassName,
|
|
33310
|
+
target: isStrip ? /*#__PURE__*/React__default["default"].createElement(PillButton, {
|
|
33311
|
+
tone: "raised",
|
|
33312
|
+
active: open,
|
|
33313
|
+
disabled: disabled,
|
|
33314
|
+
"data-testid": testId,
|
|
33315
|
+
className: classnames__default["default"]("c-batch-properties", className)
|
|
33316
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledBatchPropertiesPillLabel, null, icon, label, total > 0 ? /*#__PURE__*/React__default["default"].createElement(Badge, {
|
|
33317
|
+
value: total,
|
|
33318
|
+
dimension: 16,
|
|
33319
|
+
isStandalone: true
|
|
33320
|
+
}) : null)) : /*#__PURE__*/React__default["default"].createElement(StyledBatchPropertiesTrigger, {
|
|
32895
33321
|
active: open,
|
|
32896
33322
|
disabled: disabled,
|
|
32897
33323
|
"data-testid": testId,
|
|
@@ -32930,7 +33356,7 @@
|
|
|
32930
33356
|
openSubmenu(item.id);
|
|
32931
33357
|
}
|
|
32932
33358
|
}
|
|
32933
|
-
}, /*#__PURE__*/React__default["default"].createElement(StyledBatchPropertiesName, null, item.name), count > 0 ? /*#__PURE__*/React__default["default"].createElement(Badge, {
|
|
33359
|
+
}, item.icon ? /*#__PURE__*/React__default["default"].createElement(StyledBatchPropertiesItemIcon, null, item.icon) : null, /*#__PURE__*/React__default["default"].createElement(StyledBatchPropertiesName, null, item.name), count > 0 ? /*#__PURE__*/React__default["default"].createElement(Badge, {
|
|
32934
33360
|
value: count,
|
|
32935
33361
|
dimension: 16,
|
|
32936
33362
|
isStandalone: true
|
|
@@ -32966,7 +33392,7 @@
|
|
|
32966
33392
|
})(["width:144px;"]);
|
|
32967
33393
|
StyledBlockingProgressLoader.displayName = "StyledBlockingProgressLoader";
|
|
32968
33394
|
|
|
32969
|
-
var _excluded$
|
|
33395
|
+
var _excluded$1m = ["open", "title", "illustration", "onClose", "className"];
|
|
32970
33396
|
/**
|
|
32971
33397
|
* Blocks the page while work runs. Only the owner closes it: Escape and a backdrop click do nothing. It opens as a
|
|
32972
33398
|
* native modal dialog, so it sits above any dialog that is already open.
|
|
@@ -32977,7 +33403,7 @@
|
|
|
32977
33403
|
illustration = _ref.illustration,
|
|
32978
33404
|
onClose = _ref.onClose,
|
|
32979
33405
|
className = _ref.className,
|
|
32980
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
33406
|
+
rest = _objectWithoutProperties(_ref, _excluded$1m);
|
|
32981
33407
|
var titleId = useStableId();
|
|
32982
33408
|
return /*#__PURE__*/React__default["default"].createElement(ModalRoot, _extends({}, rest, {
|
|
32983
33409
|
ref: ref,
|
|
@@ -33026,7 +33452,7 @@
|
|
|
33026
33452
|
return $edge === "left" ? "-50%" : "50%";
|
|
33027
33453
|
}, StyledResizeHandleLine, StyledResizeHandleLine);
|
|
33028
33454
|
|
|
33029
|
-
var _excluded$
|
|
33455
|
+
var _excluded$1l = ["label", "edge", "active", "className"];
|
|
33030
33456
|
var ResizeHandle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
33031
33457
|
var label = _ref.label,
|
|
33032
33458
|
_ref$edge = _ref.edge,
|
|
@@ -33034,7 +33460,7 @@
|
|
|
33034
33460
|
_ref$active = _ref.active,
|
|
33035
33461
|
active = _ref$active === void 0 ? false : _ref$active,
|
|
33036
33462
|
className = _ref.className,
|
|
33037
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
33463
|
+
rest = _objectWithoutProperties(_ref, _excluded$1l);
|
|
33038
33464
|
return /*#__PURE__*/React__default["default"].createElement(StyledResizeHandle, _extends({
|
|
33039
33465
|
role: "separator",
|
|
33040
33466
|
"aria-orientation": "vertical",
|
|
@@ -33227,7 +33653,7 @@
|
|
|
33227
33653
|
};
|
|
33228
33654
|
};
|
|
33229
33655
|
|
|
33230
|
-
var _excluded$
|
|
33656
|
+
var _excluded$1k = ["padded", "className", "children"],
|
|
33231
33657
|
_excluded2$f = ["children", "onClose", "controls", "leadingControl", "sideContent", "open", "animation", "position", "mode", "maxWidth", "surface", "disableFocusLock", "disableScrollLock", "disableBackgroundColor", "bodyStyle", "bodyClassName", "dismissOnBackdropClick", "onBackdropClickBlocked", "disableBackgroundClick", "onWidthChange", "onWidthReset", "resizeMin", "resizeMax", "resizeLabel"],
|
|
33232
33658
|
_excluded3$5 = ["active"];
|
|
33233
33659
|
var INSET_VAR = "--c-sheet-inset-right";
|
|
@@ -33362,7 +33788,7 @@
|
|
|
33362
33788
|
padded = _ref$padded === void 0 ? false : _ref$padded,
|
|
33363
33789
|
className = _ref.className,
|
|
33364
33790
|
children = _ref.children,
|
|
33365
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
33791
|
+
rest = _objectWithoutProperties(_ref, _excluded$1k);
|
|
33366
33792
|
return /*#__PURE__*/React__default["default"].createElement(StyledSheetCapsule, _extends({}, rest, {
|
|
33367
33793
|
ref: ref,
|
|
33368
33794
|
$padded: padded,
|
|
@@ -33594,13 +34020,13 @@
|
|
|
33594
34020
|
});
|
|
33595
34021
|
StyledHeader$1.displayName = "StyledHeader";
|
|
33596
34022
|
|
|
33597
|
-
var _excluded$
|
|
34023
|
+
var _excluded$1j = ["className", "size", "children"];
|
|
33598
34024
|
var Header = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
33599
34025
|
var className = _ref.className,
|
|
33600
34026
|
_ref$size = _ref.size,
|
|
33601
34027
|
size = _ref$size === void 0 ? "small" : _ref$size,
|
|
33602
34028
|
children = _ref.children,
|
|
33603
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
34029
|
+
rest = _objectWithoutProperties(_ref, _excluded$1j);
|
|
33604
34030
|
return /*#__PURE__*/React__default["default"].createElement(StyledHeader$1, _extends({
|
|
33605
34031
|
type: "paper-2",
|
|
33606
34032
|
className: classnames__default["default"]("c-header", className),
|
|
@@ -33655,7 +34081,7 @@
|
|
|
33655
34081
|
});
|
|
33656
34082
|
StyledDivider$1.displayName = "StyledDivider";
|
|
33657
34083
|
|
|
33658
|
-
var _excluded$
|
|
34084
|
+
var _excluded$1i = ["orientation", "length", "tone", "spacing", "className"];
|
|
33659
34085
|
var toCss = function toCss(value) {
|
|
33660
34086
|
return typeof value === "number" ? "".concat(value, "px") : value;
|
|
33661
34087
|
};
|
|
@@ -33668,7 +34094,7 @@
|
|
|
33668
34094
|
_ref$spacing = _ref.spacing,
|
|
33669
34095
|
spacing = _ref$spacing === void 0 ? 0 : _ref$spacing,
|
|
33670
34096
|
className = _ref.className,
|
|
33671
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
34097
|
+
rest = _objectWithoutProperties(_ref, _excluded$1i);
|
|
33672
34098
|
var vertical = orientation === "vertical";
|
|
33673
34099
|
return /*#__PURE__*/React__default["default"].createElement(StyledDivider$1, _extends({
|
|
33674
34100
|
as: vertical ? "span" : "hr",
|
|
@@ -33685,7 +34111,7 @@
|
|
|
33685
34111
|
});
|
|
33686
34112
|
Divider.displayName = "Divider";
|
|
33687
34113
|
|
|
33688
|
-
var _excluded$
|
|
34114
|
+
var _excluded$1h = ["gap", "divider", "addButton", "className"],
|
|
33689
34115
|
_excluded2$e = ["className"];
|
|
33690
34116
|
var _HeaderControls = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
33691
34117
|
var _ref$gap = _ref.gap,
|
|
@@ -33695,7 +34121,7 @@
|
|
|
33695
34121
|
_ref$addButton = _ref.addButton,
|
|
33696
34122
|
addButton = _ref$addButton === void 0 ? false : _ref$addButton,
|
|
33697
34123
|
className = _ref.className,
|
|
33698
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
34124
|
+
rest = _objectWithoutProperties(_ref, _excluded$1h);
|
|
33699
34125
|
return /*#__PURE__*/React__default["default"].createElement(StyledHeaderControls, _extends({}, rest, {
|
|
33700
34126
|
ref: ref,
|
|
33701
34127
|
$gap: gap,
|
|
@@ -33727,7 +34153,7 @@
|
|
|
33727
34153
|
})(["white-space:pre-wrap;overflow-wrap:break-word;resize:none;"]);
|
|
33728
34154
|
StyledAutoResizeTextarea.displayName = "StyledAutoResizeTextarea";
|
|
33729
34155
|
|
|
33730
|
-
var _excluded$
|
|
34156
|
+
var _excluded$1g = ["minRows", "maxRows", "lineHeight", "onChange", "className", "preventNewRowOnEnter", "cursorAtTextEnd", "onKeyDown", "value", "mode"];
|
|
33731
34157
|
var AutoResizeTextarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
33732
34158
|
var _ref$minRows = _ref.minRows,
|
|
33733
34159
|
minRows = _ref$minRows === void 0 ? 1 : _ref$minRows,
|
|
@@ -33745,7 +34171,7 @@
|
|
|
33745
34171
|
value = _ref.value,
|
|
33746
34172
|
_ref$mode = _ref.mode,
|
|
33747
34173
|
mode = _ref$mode === void 0 ? "outlined" : _ref$mode,
|
|
33748
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
34174
|
+
rest = _objectWithoutProperties(_ref, _excluded$1g);
|
|
33749
34175
|
var innerRef = React.useRef(null);
|
|
33750
34176
|
var _useState = React.useState(minRows),
|
|
33751
34177
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -34171,7 +34597,7 @@
|
|
|
34171
34597
|
componentId: "sc-xsk1k8-36"
|
|
34172
34598
|
})(["display:none;@media (min-width:640px){display:block;}"]);
|
|
34173
34599
|
|
|
34174
|
-
var _excluded$
|
|
34600
|
+
var _excluded$1f = ["view", "className", "children"],
|
|
34175
34601
|
_excluded2$d = ["label", "count", "itemsProps", "className", "children"],
|
|
34176
34602
|
_excluded3$4 = ["time", "node", "details", "className", "children"],
|
|
34177
34603
|
_excluded4$3 = ["itemsProps", "className", "children"],
|
|
@@ -34183,7 +34609,7 @@
|
|
|
34183
34609
|
view = _ref$view === void 0 ? "timeline" : _ref$view,
|
|
34184
34610
|
className = _ref.className,
|
|
34185
34611
|
children = _ref.children,
|
|
34186
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
34612
|
+
rest = _objectWithoutProperties(_ref, _excluded$1f);
|
|
34187
34613
|
return /*#__PURE__*/React__default["default"].createElement(StyledActivityRail, _extends({}, rest, {
|
|
34188
34614
|
ref: ref,
|
|
34189
34615
|
$view: view,
|
|
@@ -34452,7 +34878,7 @@
|
|
|
34452
34878
|
});
|
|
34453
34879
|
StyledChoose$1.displayName = "StyledChoose";
|
|
34454
34880
|
|
|
34455
|
-
var _excluded$
|
|
34881
|
+
var _excluded$1e = ["children", "disabled", "active", "className", "type"];
|
|
34456
34882
|
/**
|
|
34457
34883
|
* Choose component
|
|
34458
34884
|
*/
|
|
@@ -34465,7 +34891,7 @@
|
|
|
34465
34891
|
className = _ref.className,
|
|
34466
34892
|
_ref$type = _ref.type,
|
|
34467
34893
|
type = _ref$type === void 0 ? "button" : _ref$type,
|
|
34468
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
34894
|
+
args = _objectWithoutProperties(_ref, _excluded$1e);
|
|
34469
34895
|
return /*#__PURE__*/React__default["default"].createElement(StyledChoose$1, _extends({
|
|
34470
34896
|
disabled: disabled,
|
|
34471
34897
|
className: classnames__default["default"]("c-choose", className),
|
|
@@ -34475,7 +34901,7 @@
|
|
|
34475
34901
|
};
|
|
34476
34902
|
Choose.displayName = "Choose";
|
|
34477
34903
|
|
|
34478
|
-
var _excluded$
|
|
34904
|
+
var _excluded$1d = ["invalid", "required", "size", "children", "className", "weight", "htmlFor"];
|
|
34479
34905
|
var Label = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
34480
34906
|
var _ref$invalid = _ref.invalid,
|
|
34481
34907
|
invalid = _ref$invalid === void 0 ? false : _ref$invalid,
|
|
@@ -34488,7 +34914,7 @@
|
|
|
34488
34914
|
_ref$weight = _ref.weight,
|
|
34489
34915
|
weight = _ref$weight === void 0 ? "bold" : _ref$weight,
|
|
34490
34916
|
htmlFor = _ref.htmlFor,
|
|
34491
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
34917
|
+
props = _objectWithoutProperties(_ref, _excluded$1d);
|
|
34492
34918
|
var color = invalid ? "alert" : "primary";
|
|
34493
34919
|
var variant = size === "regular" ? "Body 2" : "Caption 1";
|
|
34494
34920
|
return /*#__PURE__*/React__default["default"].createElement(Typography, _extends({
|
|
@@ -34535,7 +34961,7 @@
|
|
|
34535
34961
|
})(["display:flex;width:100%;"]);
|
|
34536
34962
|
StyledFlexContainer.displayName = "StyledFlexContainer";
|
|
34537
34963
|
|
|
34538
|
-
var _excluded$
|
|
34964
|
+
var _excluded$1c = ["required", "multiple", "invalid", "options", "selected", "onChange", "type"];
|
|
34539
34965
|
var ChooseV2 = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
34540
34966
|
var _parentSize$width, _flexSize$width;
|
|
34541
34967
|
var _ref$required = _ref.required,
|
|
@@ -34549,7 +34975,7 @@
|
|
|
34549
34975
|
onChange = _ref.onChange,
|
|
34550
34976
|
_ref$type = _ref.type,
|
|
34551
34977
|
type = _ref$type === void 0 ? "button" : _ref$type,
|
|
34552
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
34978
|
+
rest = _objectWithoutProperties(_ref, _excluded$1c);
|
|
34553
34979
|
var internalRef = React.useRef(null);
|
|
34554
34980
|
var flexContainerRef = React.useRef(null);
|
|
34555
34981
|
var handleRef = useForkRef(ref, internalRef);
|
|
@@ -34752,21 +35178,21 @@
|
|
|
34752
35178
|
StyledLinkElements.displayName = "StyledLinkElements";
|
|
34753
35179
|
StyledLink$1.displayName = "StyledLink";
|
|
34754
35180
|
|
|
34755
|
-
var _excluded$
|
|
35181
|
+
var _excluded$1b = ["children", "className"];
|
|
34756
35182
|
/**
|
|
34757
35183
|
* Back link component
|
|
34758
35184
|
*/
|
|
34759
35185
|
var BackLink = function BackLink(_ref) {
|
|
34760
35186
|
var children = _ref.children,
|
|
34761
35187
|
className = _ref.className,
|
|
34762
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
35188
|
+
args = _objectWithoutProperties(_ref, _excluded$1b);
|
|
34763
35189
|
return /*#__PURE__*/React__default["default"].createElement(StyledBackLink, _extends({
|
|
34764
35190
|
className: classnames__default["default"]("c-back-link", className)
|
|
34765
35191
|
}, args), children);
|
|
34766
35192
|
};
|
|
34767
35193
|
BackLink.displayName = "BackLink";
|
|
34768
35194
|
|
|
34769
|
-
var _excluded$
|
|
35195
|
+
var _excluded$1a = ["as", "children", "variant", "size", "disabled", "className", "isExternal", "iconOnly"];
|
|
34770
35196
|
/**
|
|
34771
35197
|
* @component Link
|
|
34772
35198
|
* @description
|
|
@@ -34790,7 +35216,7 @@
|
|
|
34790
35216
|
isExternal = _ref$isExternal === void 0 ? false : _ref$isExternal,
|
|
34791
35217
|
_ref$iconOnly = _ref.iconOnly,
|
|
34792
35218
|
iconOnly = _ref$iconOnly === void 0 ? false : _ref$iconOnly,
|
|
34793
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
35219
|
+
args = _objectWithoutProperties(_ref, _excluded$1a);
|
|
34794
35220
|
var Component = as || "a";
|
|
34795
35221
|
return /*#__PURE__*/React__default["default"].createElement(StyledLink$1, _extends({
|
|
34796
35222
|
ref: ref,
|
|
@@ -35226,7 +35652,7 @@
|
|
|
35226
35652
|
})([".c-theme-swatch__outline{stroke:var(--color-theme-400);}"]);
|
|
35227
35653
|
StyledThemeSwatch.displayName = "StyledThemeSwatch";
|
|
35228
35654
|
|
|
35229
|
-
var _excluded$
|
|
35655
|
+
var _excluded$19 = ["theme", "className"];
|
|
35230
35656
|
var STRIPE = 16;
|
|
35231
35657
|
var HEIGHT = 16;
|
|
35232
35658
|
var RADIUS$1 = 3;
|
|
@@ -35234,7 +35660,7 @@
|
|
|
35234
35660
|
var _THEMES$find;
|
|
35235
35661
|
var theme = _ref.theme,
|
|
35236
35662
|
className = _ref.className,
|
|
35237
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
35663
|
+
rest = _objectWithoutProperties(_ref, _excluded$19);
|
|
35238
35664
|
var swatch = (_THEMES$find = THEMES.find(function (entry) {
|
|
35239
35665
|
return entry.name === theme;
|
|
35240
35666
|
})) === null || _THEMES$find === void 0 ? void 0 : _THEMES$find.swatch;
|
|
@@ -35316,7 +35742,7 @@
|
|
|
35316
35742
|
StyledCloseSmallIcon.displayName = "StyledCloseSmallIcon";
|
|
35317
35743
|
StyledToastMessageClose.displayName = "StyledToastMessageClose";
|
|
35318
35744
|
|
|
35319
|
-
var _excluded$
|
|
35745
|
+
var _excluded$18 = ["text", "type", "onClose", "dismissible", "dropShadow", "timeout", "closeLabel"];
|
|
35320
35746
|
var ToastMessage = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
35321
35747
|
var text = _ref.text,
|
|
35322
35748
|
type = _ref.type,
|
|
@@ -35329,7 +35755,7 @@
|
|
|
35329
35755
|
timeout = _ref$timeout === void 0 ? 0 : _ref$timeout,
|
|
35330
35756
|
_ref$closeLabel = _ref.closeLabel,
|
|
35331
35757
|
closeLabel = _ref$closeLabel === void 0 ? "Close" : _ref$closeLabel,
|
|
35332
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
35758
|
+
rest = _objectWithoutProperties(_ref, _excluded$18);
|
|
35333
35759
|
var handleOnClose = React.useCallback(function () {
|
|
35334
35760
|
if (typeof onClose === "function") {
|
|
35335
35761
|
onClose();
|
|
@@ -35379,7 +35805,7 @@
|
|
|
35379
35805
|
});
|
|
35380
35806
|
StyledValueButton$1.displayName = "StyledValueButton";
|
|
35381
35807
|
|
|
35382
|
-
var _excluded$
|
|
35808
|
+
var _excluded$17 = ["active", "alwaysShowIcon", "icon", "label", "value"];
|
|
35383
35809
|
var ValueButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
35384
35810
|
var _ref$active = _ref.active,
|
|
35385
35811
|
active = _ref$active === void 0 ? false : _ref$active,
|
|
@@ -35388,7 +35814,7 @@
|
|
|
35388
35814
|
icon = _ref.icon,
|
|
35389
35815
|
label = _ref.label,
|
|
35390
35816
|
value = _ref.value,
|
|
35391
|
-
args = _objectWithoutProperties(_ref, _excluded$
|
|
35817
|
+
args = _objectWithoutProperties(_ref, _excluded$17);
|
|
35392
35818
|
return /*#__PURE__*/React__default["default"].createElement(StyledValueButton$1, _extends({
|
|
35393
35819
|
className: "c-value-button"
|
|
35394
35820
|
}, args, {
|
|
@@ -35411,202 +35837,6 @@
|
|
|
35411
35837
|
});
|
|
35412
35838
|
ValueButton.displayName = "ValueButton";
|
|
35413
35839
|
|
|
35414
|
-
var StyledPillIcon = styled__default["default"].span.withConfig({
|
|
35415
|
-
displayName: "Styles__StyledPillIcon",
|
|
35416
|
-
componentId: "sc-14yhio0-0"
|
|
35417
|
-
})(["display:inline-flex;flex-shrink:0;color:var(--color-theme-600);svg{width:18px;height:18px;fill:currentColor;}"]);
|
|
35418
|
-
StyledPillIcon.displayName = "StyledPillIcon";
|
|
35419
|
-
var StyledPillPlaceholder = styled__default["default"].span.withConfig({
|
|
35420
|
-
displayName: "Styles__StyledPillPlaceholder",
|
|
35421
|
-
componentId: "sc-14yhio0-1"
|
|
35422
|
-
})(["overflow:hidden;text-overflow:ellipsis;"]);
|
|
35423
|
-
StyledPillPlaceholder.displayName = "StyledPillPlaceholder";
|
|
35424
|
-
var ACTIVE_COLORS = {
|
|
35425
|
-
alert: ["var(--alert-surface-subtle)", "var(--red-alert)"],
|
|
35426
|
-
warning: ["var(--note-bg)", "var(--warning-text)"]
|
|
35427
|
-
};
|
|
35428
|
-
var activeColors = function activeColors(tone) {
|
|
35429
|
-
return tone === "alert" || tone === "warning" ? ACTIVE_COLORS[tone] : ["var(--pill-background-active)", "var(--color-primary)"];
|
|
35430
|
-
};
|
|
35431
|
-
var activeStyle = function activeStyle(tone) {
|
|
35432
|
-
return styled.css(["background-color:", ";color:", ";", "{color:", ";}svg{fill:currentColor;}svg [stroke]:not([stroke=\"none\"]){stroke:currentColor;}"], activeColors(tone)[0], activeColors(tone)[1], StyledPillIcon, activeColors(tone)[1]);
|
|
35433
|
-
};
|
|
35434
|
-
var hoverTextStyle = styled.css(["color:var(--color-theme-900);", "{color:var(--color-theme-900);}"], StyledPillIcon);
|
|
35435
|
-
var toneStyle = function toneStyle(tone) {
|
|
35436
|
-
switch (tone) {
|
|
35437
|
-
case "alternate":
|
|
35438
|
-
return styled.css(["background-color:var(--color-theme-300);&:hover,&:focus-visible{background-color:var(--color-theme-400);", "}"], hoverTextStyle);
|
|
35439
|
-
case "accent":
|
|
35440
|
-
return styled.css(["background-color:color-mix( in srgb,var(--color-primary) 15%,transparent );color:var(--color-primary);", "{color:var(--color-primary);}&:hover,&:focus-visible{background-color:color-mix( in srgb,var(--color-primary) 25%,transparent );color:var(--color-primary);}"], StyledPillIcon);
|
|
35441
|
-
case "raised":
|
|
35442
|
-
return styled.css(["&&{gap:6px;font-weight:600;}border:1px solid var(--color-theme-400);background-color:var(--color-theme-200);box-shadow:inset 0 1px 0 rgba(255,255,255,0.07);color:var(--color-theme-900);", "{color:inherit;}@supports (color:light-dark(red,red)){border-color:light-dark(var(--color-theme-400),#494e59);background-color:transparent;background-image:linear-gradient( light-dark(#ffffff,#3a3f49),light-dark(#f3f4f6,#31353e) );color:light-dark(var(--color-theme-900),#eceef1);&:hover{background-image:linear-gradient( light-dark(#f8f9fa,#444a55),light-dark(#eceef1,#3a3f49) );}}&:focus-visible{outline:2px solid var(--color-primary);outline-offset:1px;}&[aria-expanded=\"true\"]{background-image:none;}"], StyledPillIcon);
|
|
35443
|
-
case "primary":
|
|
35444
|
-
return styled.css(["&&{gap:6px;font-weight:600;}border:1px solid var(--color-primary);background-color:var(--color-primary);background-image:linear-gradient( var(--color-primary-800),var(--color-primary) );box-shadow:inset 0 1px 0 rgba(255,255,255,0.35);color:var(--page-paper-main);", "{color:inherit;}&:hover{background-color:var(--color-primary-800);background-image:none;}&:focus-visible{outline:2px solid var(--color-primary);outline-offset:1px;}"], StyledPillIcon);
|
|
35445
|
-
case "well":
|
|
35446
|
-
return styled.css(["&&{gap:6px;font-weight:600;}border:1px solid var(--color-theme-400);background-color:var(--body-bg-main);box-shadow:inset 0 1px 2px rgba(0,0,0,0.2);color:var(--color-theme-900);", "{color:inherit;}&:focus-visible{outline:2px solid var(--color-primary);outline-offset:1px;}"], StyledPillIcon);
|
|
35447
|
-
case "ghost":
|
|
35448
|
-
return styled.css(["background-color:transparent;.c-pill-host:hover &.c-pill-button--ghost,&:focus-visible{background-color:var(--pill-background);}.c-pill-host:hover &.c-pill-button--ghost:hover,&:hover{background-color:var(--pill-background-hover);", "}"], hoverTextStyle);
|
|
35449
|
-
case "outlined":
|
|
35450
|
-
return styled.css(["background-color:transparent;border:1px solid var(--color-theme-700);&:hover,&:focus-visible{border-color:var(--color-primary);color:var(--color-primary);", "{color:var(--color-primary);}}"], StyledPillIcon);
|
|
35451
|
-
default:
|
|
35452
|
-
return styled.css(["background-color:var(--pill-background);&:hover,&:focus-visible{background-color:var(--pill-background-hover);", "}"], hoverTextStyle);
|
|
35453
|
-
}
|
|
35454
|
-
};
|
|
35455
|
-
var compactStyle = styled.css(["", "{display:none;}"], StyledPillPlaceholder);
|
|
35456
|
-
var PILL_HEIGHTS = {
|
|
35457
|
-
xsmall: "18px",
|
|
35458
|
-
small: "24px",
|
|
35459
|
-
dense: "24px",
|
|
35460
|
-
medium: "26px"
|
|
35461
|
-
};
|
|
35462
|
-
var denseStyle = styled.css(["gap:4px;--c-pill-padding-x:11px;font-size:calc(0.75rem * var(--text-scale,1));", " svg{width:12px;height:12px;}"], StyledPillIcon);
|
|
35463
|
-
|
|
35464
|
-
/* The size of a type chip: small caps of an object type or a state switch. */
|
|
35465
|
-
var xsmallStyle = styled.css(["gap:3px;--c-pill-padding-x:6px;font-size:calc(0.625rem * var(--text-scale,1));font-weight:600;", " svg{width:12px;height:12px;}"], StyledPillIcon);
|
|
35466
|
-
var StyledPillButton = styled__default["default"].button.withConfig({
|
|
35467
|
-
displayName: "Styles__StyledPillButton",
|
|
35468
|
-
componentId: "sc-14yhio0-2"
|
|
35469
|
-
})(["", " ", " display:inline-flex;align-items:center;justify-content:center;gap:6px;flex-shrink:0;max-width:100%;height:", ";margin:0;--c-pill-padding-x:", ";padding:0 var(--c-pill-padding-x);border:none;border-radius:var(--ac-br-rounded);font-size:calc(0.875rem * var(--text-scale,1));font-weight:500;line-height:1;white-space:nowrap;color:", ";cursor:pointer;user-select:none;&:focus{outline:none;}&:disabled{cursor:default;opacity:", ";pointer-events:none;}", " ", " ", " ", " ", " ", " ", " ", " &[aria-haspopup][aria-expanded=\"true\"],.c-pill-host:hover &[aria-haspopup][aria-expanded=\"true\"]{", "}"], FontStyle, BoxSizingStyle, function (props) {
|
|
35470
|
-
return PILL_HEIGHTS[props.$size];
|
|
35471
|
-
}, function (props) {
|
|
35472
|
-
return props.$inset === "tight" ? "6px" : "10px";
|
|
35473
|
-
}, function (props) {
|
|
35474
|
-
return props.$empty ? "var(--color-theme-700)" : "var(--color-theme-800)";
|
|
35475
|
-
}, function (props) {
|
|
35476
|
-
return props.$dimDisabled ? "50%" : "100%";
|
|
35477
|
-
}, function (props) {
|
|
35478
|
-
return toneStyle(props.$tone);
|
|
35479
|
-
}, function (props) {
|
|
35480
|
-
return props.$tone === "ghost" && props.$empty && styled.css(["", ",", "{opacity:0;}.c-pill-host:hover &.c-pill-button--ghost,&:hover,&:focus-visible,&[aria-expanded=\"true\"]{", ",", "{opacity:1;}}"], StyledPillIcon, StyledPillPlaceholder, StyledPillIcon, StyledPillPlaceholder);
|
|
35481
|
-
}, function (props) {
|
|
35482
|
-
return props.$iconOnly && styled.css(["width:", ";padding:0;", " svg{width:16px;height:16px;}"], props.$tone === "raised" ? "28px" : "36px", StyledPillIcon);
|
|
35483
|
-
}, function (props) {
|
|
35484
|
-
return props.$size === "xsmall" && xsmallStyle;
|
|
35485
|
-
}, function (props) {
|
|
35486
|
-
return props.$size === "dense" && denseStyle;
|
|
35487
|
-
}, function (props) {
|
|
35488
|
-
return props.$compact === true && compactStyle;
|
|
35489
|
-
}, function (props) {
|
|
35490
|
-
return props.$compact === "mobile" && styled.css(["@media (max-width:768px){", "}"], compactStyle);
|
|
35491
|
-
}, function (props) {
|
|
35492
|
-
return props.$active && styled.css(["&,&:hover,&:focus-visible{", "}"], activeStyle(props.$tone));
|
|
35493
|
-
}, function (props) {
|
|
35494
|
-
return activeStyle(props.$tone);
|
|
35495
|
-
});
|
|
35496
|
-
StyledPillButton.displayName = "StyledPillButton";
|
|
35497
|
-
|
|
35498
|
-
var _excluded$18 = ["icon", "endIcon", "placeholder", "tone", "active", "iconOnly", "compact", "size", "inset", "dimDisabled", "type", "className", "children"];
|
|
35499
|
-
/**
|
|
35500
|
-
* @component PillButton
|
|
35501
|
-
* @description
|
|
35502
|
-
* A rounded trigger for a field value, for example the assignees, the dates or the label of a task.
|
|
35503
|
-
* With no children it shows its icon and placeholder. With children it shows only the children.
|
|
35504
|
-
* It forwards its ref and click handler, so a Menu or a Select can use it as a target.
|
|
35505
|
-
* Put several pills in a PillGroup to make a segmented control.
|
|
35506
|
-
*
|
|
35507
|
-
* @example
|
|
35508
|
-
* <PillButton icon={<CalendarIcon />} placeholder="Dates" />
|
|
35509
|
-
* <PillButton tone="ghost">Sep 24. - 30.</PillButton>
|
|
35510
|
-
*/
|
|
35511
|
-
var PillButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
35512
|
-
var _args$ariaLabel;
|
|
35513
|
-
var icon = _ref.icon,
|
|
35514
|
-
endIcon = _ref.endIcon,
|
|
35515
|
-
placeholder = _ref.placeholder,
|
|
35516
|
-
_ref$tone = _ref.tone,
|
|
35517
|
-
tone = _ref$tone === void 0 ? "soft" : _ref$tone,
|
|
35518
|
-
active = _ref.active,
|
|
35519
|
-
_ref$iconOnly = _ref.iconOnly,
|
|
35520
|
-
iconOnly = _ref$iconOnly === void 0 ? false : _ref$iconOnly,
|
|
35521
|
-
_ref$compact = _ref.compact,
|
|
35522
|
-
compact = _ref$compact === void 0 ? false : _ref$compact,
|
|
35523
|
-
_ref$size = _ref.size,
|
|
35524
|
-
size = _ref$size === void 0 ? "medium" : _ref$size,
|
|
35525
|
-
_ref$inset = _ref.inset,
|
|
35526
|
-
inset = _ref$inset === void 0 ? "default" : _ref$inset,
|
|
35527
|
-
_ref$dimDisabled = _ref.dimDisabled,
|
|
35528
|
-
dimDisabled = _ref$dimDisabled === void 0 ? true : _ref$dimDisabled,
|
|
35529
|
-
_ref$type = _ref.type,
|
|
35530
|
-
type = _ref$type === void 0 ? "button" : _ref$type,
|
|
35531
|
-
className = _ref.className,
|
|
35532
|
-
children = _ref.children,
|
|
35533
|
-
args = _objectWithoutProperties(_ref, _excluded$18);
|
|
35534
|
-
var isEmpty = React.Children.toArray(children).length === 0;
|
|
35535
|
-
var ariaLabel = (_args$ariaLabel = args["aria-label"]) !== null && _args$ariaLabel !== void 0 ? _args$ariaLabel : isEmpty && compact && typeof placeholder === "string" ? placeholder : undefined;
|
|
35536
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledPillButton, _extends({
|
|
35537
|
-
ref: ref,
|
|
35538
|
-
type: type,
|
|
35539
|
-
className: classnames__default["default"]("c-pill-button", "c-pill-button--".concat(tone), {
|
|
35540
|
-
"c-pill-button--empty": isEmpty,
|
|
35541
|
-
"c-pill-button--active": active,
|
|
35542
|
-
"c-pill-button--icon-only": iconOnly
|
|
35543
|
-
}, className),
|
|
35544
|
-
"aria-pressed": active
|
|
35545
|
-
}, args, {
|
|
35546
|
-
"aria-label": ariaLabel,
|
|
35547
|
-
$tone: tone,
|
|
35548
|
-
$active: Boolean(active),
|
|
35549
|
-
$empty: isEmpty,
|
|
35550
|
-
$iconOnly: iconOnly,
|
|
35551
|
-
$compact: compact,
|
|
35552
|
-
$size: size,
|
|
35553
|
-
$inset: inset,
|
|
35554
|
-
$dimDisabled: dimDisabled
|
|
35555
|
-
}), isEmpty && icon ? /*#__PURE__*/React__default["default"].createElement(StyledPillIcon, {
|
|
35556
|
-
className: "c-pill-button__icon"
|
|
35557
|
-
}, icon) : null, isEmpty && placeholder && !iconOnly ? /*#__PURE__*/React__default["default"].createElement(StyledPillPlaceholder, {
|
|
35558
|
-
className: "c-pill-button__placeholder"
|
|
35559
|
-
}, placeholder) : null, isEmpty && endIcon && !iconOnly ? /*#__PURE__*/React__default["default"].createElement(StyledPillIcon, {
|
|
35560
|
-
className: "c-pill-button__end-icon"
|
|
35561
|
-
}, endIcon) : null, isEmpty ? null : children);
|
|
35562
|
-
});
|
|
35563
|
-
PillButton.displayName = "PillButton";
|
|
35564
|
-
|
|
35565
|
-
var first = "& > .c-pill-button:first-child, & > :first-child .c-pill-button";
|
|
35566
|
-
var last = "& > .c-pill-button:last-child, & > :last-child .c-pill-button";
|
|
35567
|
-
var firstText = "& > .c-pill-button:not(.c-pill-button--icon-only):first-child, & > :first-child .c-pill-button:not(.c-pill-button--icon-only)";
|
|
35568
|
-
var lastIconOnly = "& > .c-pill-button--icon-only:last-child, & > :last-child .c-pill-button--icon-only";
|
|
35569
|
-
var lastText = "& > .c-pill-button:not(.c-pill-button--icon-only):last-child, & > :last-child .c-pill-button:not(.c-pill-button--icon-only)";
|
|
35570
|
-
var StyledPillGroup = styled__default["default"].div.withConfig({
|
|
35571
|
-
displayName: "Styles__StyledPillGroup",
|
|
35572
|
-
componentId: "sc-1x5hpq8-0"
|
|
35573
|
-
})(["", " display:inline-flex;align-items:stretch;flex-shrink:0;max-width:100%;& > *{display:inline-flex;min-width:0;}.c-pill-button{border-radius:0;}", "{border-top-left-radius:var(--ac-br-rounded);border-bottom-left-radius:var(--ac-br-rounded);}", "{border-top-right-radius:var(--ac-br-rounded);border-bottom-right-radius:var(--ac-br-rounded);}", "{padding-left:calc(var(--c-pill-padding-x,10px) + 4px);}", "{padding-right:calc(var(--c-pill-padding-x,10px) + 4px);}", " ", " ", ""], BoxSizingStyle, first, last, firstText, lastText, function (props) {
|
|
35574
|
-
return props.$appearance === "soft" && styled.css(["gap:2px;"]);
|
|
35575
|
-
}, function (props) {
|
|
35576
|
-
return props.$appearance === "raised" && styled.css(["border-radius:var(--ac-br-rounded);box-shadow:0 1px 1px rgba(0,0,0,0.22);", "{width:auto;padding-left:7px;padding-right:calc(var(--c-pill-padding-x,10px) + 4px);}& > * + *{margin-left:-1px;}.c-pill-button:hover,.c-pill-button:focus-visible{position:relative;z-index:1;}"], lastIconOnly);
|
|
35577
|
-
}, function (props) {
|
|
35578
|
-
return props.$appearance === "outlined" && styled.css(["border:1px solid var(--pill-border);border-radius:var(--ac-br-6);overflow:hidden;.c-pill-button{height:24px;}.c-pill-button:not(.c-pill-button--accent){background-color:transparent;}", ",", "{border-radius:0;}& > * + *{border-left:1px solid var(--pill-border);}"], first, last);
|
|
35579
|
-
});
|
|
35580
|
-
StyledPillGroup.displayName = "StyledPillGroup";
|
|
35581
|
-
|
|
35582
|
-
var _excluded$17 = ["appearance", "className", "children"];
|
|
35583
|
-
/**
|
|
35584
|
-
* @component PillGroup
|
|
35585
|
-
* @description
|
|
35586
|
-
* Joins PillButton children into one segmented control. The outer pills keep their round ends.
|
|
35587
|
-
* A child may wrap its pill, for example in a Tooltip or a picker, the group still finds it.
|
|
35588
|
-
*
|
|
35589
|
-
* @example
|
|
35590
|
-
* <PillGroup aria-label="Task fields">
|
|
35591
|
-
* <PillButton icon={<PersonPlusIcon />} placeholder="Assignee" />
|
|
35592
|
-
* <PillButton icon={<CalendarIcon />} placeholder="Dates" />
|
|
35593
|
-
* </PillGroup>
|
|
35594
|
-
*/
|
|
35595
|
-
var PillGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
35596
|
-
var _ref$appearance = _ref.appearance,
|
|
35597
|
-
appearance = _ref$appearance === void 0 ? "soft" : _ref$appearance,
|
|
35598
|
-
className = _ref.className,
|
|
35599
|
-
children = _ref.children,
|
|
35600
|
-
args = _objectWithoutProperties(_ref, _excluded$17);
|
|
35601
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledPillGroup, _extends({
|
|
35602
|
-
ref: ref,
|
|
35603
|
-
role: "group",
|
|
35604
|
-
className: classnames__default["default"]("c-pill-group", "c-pill-group--".concat(appearance), className),
|
|
35605
|
-
$appearance: appearance
|
|
35606
|
-
}, args), children);
|
|
35607
|
-
});
|
|
35608
|
-
PillGroup.displayName = "PillGroup";
|
|
35609
|
-
|
|
35610
35840
|
/* The track and the button take the measures of ViewSwitcher, so the two sit side by side as one family. */
|
|
35611
35841
|
var StyledViewSettings = styled__default["default"].span.withConfig({
|
|
35612
35842
|
displayName: "Styles__StyledViewSettings",
|