@homebound/beam 2.417.6 → 2.417.8
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/{chunk-XH44AYND.js → chunk-ZPT2ZR5B.js} +28 -1
- package/dist/chunk-ZPT2ZR5B.js.map +1 -0
- package/dist/index.cjs +286 -152
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +6 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +42 -7
- package/dist/index.d.ts +42 -7
- package/dist/index.js +294 -183
- package/dist/index.js.map +1 -1
- package/dist/utils/rtlUtils.cjs.map +1 -1
- package/dist/utils/rtlUtils.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-XH44AYND.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EmptyRef,
|
|
3
|
+
clearInlineStyles,
|
|
3
4
|
defaultTestId,
|
|
4
5
|
fail,
|
|
5
6
|
isAbsoluteUrl,
|
|
@@ -13,9 +14,10 @@ import {
|
|
|
13
14
|
pluralize,
|
|
14
15
|
safeEntries,
|
|
15
16
|
safeKeys,
|
|
17
|
+
setInlineStyles,
|
|
16
18
|
toToggleState,
|
|
17
19
|
useTestIds
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZPT2ZR5B.js";
|
|
19
21
|
|
|
20
22
|
// src/Css.ts
|
|
21
23
|
var CssBuilder = class _CssBuilder {
|
|
@@ -4157,11 +4159,7 @@ var Icon = React3.memo((props) => {
|
|
|
4157
4159
|
viewBox: "0 0 24 24",
|
|
4158
4160
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4159
4161
|
css: {
|
|
4160
|
-
|
|
4161
|
-
...{
|
|
4162
|
-
"& > path": Css.fill(color).$,
|
|
4163
|
-
"& > rect": Css.fill(color).$
|
|
4164
|
-
},
|
|
4162
|
+
...Css.fill(color).$,
|
|
4165
4163
|
...bgColor && Css.bgColor(bgColor).$,
|
|
4166
4164
|
...xss
|
|
4167
4165
|
},
|
|
@@ -4745,20 +4743,8 @@ var Icons = {
|
|
|
4745
4743
|
/* @__PURE__ */ jsx3("path", { d: "M7.43848 0.0527344C8.92278 0.0527344 10.1259 1.25595 10.126 2.74023C10.126 4.22459 8.78231 5.87619 7.43848 7.66797C6.09464 5.87619 4.75098 4.22459 4.75098 2.74023C4.75107 1.25601 5.95425 0.0528239 7.43848 0.0527344ZM7.4375 1.84473C6.94279 1.84478 6.54203 2.24552 6.54199 2.74023C6.54199 3.23499 6.94276 3.63569 7.4375 3.63574C7.93229 3.63574 8.33301 3.23502 8.33301 2.74023C8.33296 2.24549 7.93226 1.84473 7.4375 1.84473Z" })
|
|
4746
4744
|
] }),
|
|
4747
4745
|
buildings: /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
4748
|
-
/* @__PURE__ */ jsx3(
|
|
4749
|
-
|
|
4750
|
-
{
|
|
4751
|
-
d: "M14.1787 3.58594V23.6494H0V3.60449L7.08887 0.347656L14.1787 3.58594ZM3.42285 20.2275H5.86719V17.7832H3.42285V20.2275ZM8.31348 17.7832V20.2275H10.7578V17.7832H8.31348ZM3.42285 16.3174H5.86719V13.873H3.42285V16.3174ZM8.31348 16.3174H10.7578V13.873H8.31348V16.3174ZM3.42285 12.4062H5.86719V9.96191H3.42285V12.4062ZM8.31348 12.4062H10.7578V9.96191H8.31348V12.4062ZM3.42285 8.49414H5.86719V6.0498H3.42285V8.49414ZM8.31348 8.49414H10.7578V6.0498H8.31348V8.49414Z",
|
|
4752
|
-
fill: "#8D8D8D"
|
|
4753
|
-
}
|
|
4754
|
-
),
|
|
4755
|
-
/* @__PURE__ */ jsx3(
|
|
4756
|
-
"path",
|
|
4757
|
-
{
|
|
4758
|
-
d: "M22 23.6523H15.6445V8.00684H22V23.6523ZM17.5996 18.7617V21.2061H20.0439V18.7617H17.5996ZM17.5996 17.2959H20.0439V14.8516H17.5996V17.2959ZM17.5996 13.3828H20.0439V10.9385H17.5996V13.3828Z",
|
|
4759
|
-
fill: "#8D8D8D"
|
|
4760
|
-
}
|
|
4761
|
-
)
|
|
4746
|
+
/* @__PURE__ */ jsx3("path", { d: "M14.1787 3.58594V23.6494H0V3.60449L7.08887 0.347656L14.1787 3.58594ZM3.42285 20.2275H5.86719V17.7832H3.42285V20.2275ZM8.31348 17.7832V20.2275H10.7578V17.7832H8.31348ZM3.42285 16.3174H5.86719V13.873H3.42285V16.3174ZM8.31348 16.3174H10.7578V13.873H8.31348V16.3174ZM3.42285 12.4062H5.86719V9.96191H3.42285V12.4062ZM8.31348 12.4062H10.7578V9.96191H8.31348V12.4062ZM3.42285 8.49414H5.86719V6.0498H3.42285V8.49414ZM8.31348 8.49414H10.7578V6.0498H8.31348V8.49414Z" }),
|
|
4747
|
+
/* @__PURE__ */ jsx3("path", { d: "M22 23.6523H15.6445V8.00684H22V23.6523ZM17.5996 18.7617V21.2061H20.0439V18.7617H17.5996ZM17.5996 17.2959H20.0439V14.8516H17.5996V17.2959ZM17.5996 13.3828H20.0439V10.9385H17.5996V13.3828Z" })
|
|
4762
4748
|
] }),
|
|
4763
4749
|
community: /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
4764
4750
|
/* @__PURE__ */ jsx3("path", { d: "M6.41018 0.520509C6.61589 0.334405 6.93017 0.334214 7.13576 0.520509L11.1797 4.20899C11.1553 4.22924 11.1302 4.24904 11.1065 4.27051L11.1016 4.27539L7.85549 7.23535V6.22266H5.69045V8.96289C5.69045 9.2644 5.44619 9.51172 5.14846 9.51172H3.52444C3.22683 9.51157 2.98342 9.26431 2.98342 8.96289V5.12598H2.0635C1.81449 5.12598 1.70074 4.8129 1.88479 4.64844L6.41018 0.520509ZM10.5615 8.96289C10.5615 9.2644 10.3183 9.51172 10.0205 9.51172H8.39651C8.24437 9.51169 8.10738 9.44603 8.00881 9.34277L10.5615 7.01465V8.96289Z" }),
|
|
@@ -6455,13 +6441,13 @@ function AvatarButton(props) {
|
|
|
6455
6441
|
menuTriggerProps,
|
|
6456
6442
|
openInNew,
|
|
6457
6443
|
forceFocusStyles = false,
|
|
6458
|
-
|
|
6444
|
+
__storyState,
|
|
6459
6445
|
...avatarProps
|
|
6460
6446
|
} = props;
|
|
6461
6447
|
const isDisabled = !!disabled;
|
|
6462
6448
|
const ariaProps = { onPress, isDisabled, autoFocus, ...menuTriggerProps };
|
|
6463
6449
|
const ref = useGetRef(buttonRef);
|
|
6464
|
-
const { buttonProps, isPressed } = useButton2(
|
|
6450
|
+
const { buttonProps, isPressed: isPressedFromEvents } = useButton2(
|
|
6465
6451
|
{
|
|
6466
6452
|
...ariaProps,
|
|
6467
6453
|
onPress: typeof onPress === "string" ? noop : onPress,
|
|
@@ -6469,8 +6455,11 @@ function AvatarButton(props) {
|
|
|
6469
6455
|
},
|
|
6470
6456
|
ref
|
|
6471
6457
|
);
|
|
6472
|
-
const { focusProps, isFocusVisible } = useFocusRing2(ariaProps);
|
|
6473
|
-
const { hoverProps, isHovered } = useHover3(ariaProps);
|
|
6458
|
+
const { focusProps, isFocusVisible: isFocusVisibleFromEvents } = useFocusRing2(ariaProps);
|
|
6459
|
+
const { hoverProps, isHovered: isHoveredFromEvents } = useHover3(ariaProps);
|
|
6460
|
+
const isHovered = __storyState?.hovered ?? isHoveredFromEvents;
|
|
6461
|
+
const isFocusVisible = __storyState?.focusVisible ?? isFocusVisibleFromEvents;
|
|
6462
|
+
const isPressed = __storyState?.pressed ?? isPressedFromEvents;
|
|
6474
6463
|
const tid = useTestIds(props, avatarProps.name);
|
|
6475
6464
|
const styles = useMemo9(
|
|
6476
6465
|
() => ({
|
|
@@ -6493,7 +6482,7 @@ function AvatarButton(props) {
|
|
|
6493
6482
|
};
|
|
6494
6483
|
const content = /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
6495
6484
|
/* @__PURE__ */ jsx23(Avatar, { ...avatarProps, ...tid, disableTooltip: true }),
|
|
6496
|
-
|
|
6485
|
+
isPressed && /* @__PURE__ */ jsx23("span", { css: pressedOverlayCss })
|
|
6497
6486
|
] });
|
|
6498
6487
|
return maybeTooltip({
|
|
6499
6488
|
// Default the tooltip to the avatar's name, if defined.
|
|
@@ -7156,21 +7145,19 @@ function memoizedTableStyles() {
|
|
|
7156
7145
|
cellCss: {
|
|
7157
7146
|
...Css[cellTypography].gray900.bgWhite.ai(alignItems).pxPx(12).boxShadow(`inset 0 -1px 0 ${"rgba(236, 235, 235, 1)" /* Gray200 */}`).$,
|
|
7158
7147
|
...rowHeight === "flexible" ? Css.pyPx(12).$ : Css.wsnw.hPx(inlineEditing ? 48 : 36).$,
|
|
7159
|
-
...cellHighlight ? { "&:hover": Css.bgGray100.$ } : {}
|
|
7160
|
-
...bordered && { "&:first-child": Css.bl.bcGray200.$, "&:last-child": Css.br.bcGray200.$ }
|
|
7161
|
-
},
|
|
7162
|
-
firstRowCss: {
|
|
7163
|
-
...Css.addIn("& > *:first-of-type", Css.borderRadius("8px 0 0 0 ").$).addIn(
|
|
7164
|
-
"& > *:last-of-type",
|
|
7165
|
-
Css.borderRadius("0 8px 0 0").$
|
|
7166
|
-
).$,
|
|
7167
|
-
...bordered && Css.addIn("& > *", Css.bt.bcGray200.$).$
|
|
7148
|
+
...cellHighlight ? { "&:hover": Css.bgGray100.$ } : {}
|
|
7168
7149
|
},
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7150
|
+
firstCellCss: bordered ? Css.bl.bcGray200.$ : void 0,
|
|
7151
|
+
lastCellCss: bordered ? Css.br.bcGray200.$ : void 0,
|
|
7152
|
+
firstRowCellCss: bordered ? Css.bt.bcGray200.$ : void 0,
|
|
7153
|
+
firstRowFirstCellCss: Css.borderRadius("8px 0 0 0 ").$,
|
|
7154
|
+
firstRowLastCellCss: Css.borderRadius("0 8px 0 0").$,
|
|
7155
|
+
// Keep `betweenRowsCss` on all body rows, but on the final body row
|
|
7156
|
+
// remove the inset shadow and, when bordered, replace it with a true bottom border.
|
|
7157
|
+
lastRowCellCss: bordered ? Css.bsh0.bb.bcGray200.$ : Css.bsh0.$,
|
|
7158
|
+
// Only apply bottom corner radii to the final body-row cells when using `bordered`.
|
|
7159
|
+
lastRowFirstCellCss: bordered ? Css.borderRadius("0 0 0 8px").$ : void 0,
|
|
7160
|
+
lastRowLastCellCss: bordered ? Css.borderRadius("0 0 8px 0").$ : void 0,
|
|
7174
7161
|
presentationSettings: {
|
|
7175
7162
|
borderless: true,
|
|
7176
7163
|
typeScale: "xs",
|
|
@@ -7189,6 +7176,7 @@ function memoizedTableStyles() {
|
|
|
7189
7176
|
var getTableStyles = memoizedTableStyles();
|
|
7190
7177
|
var totalsRowHeight = 40;
|
|
7191
7178
|
var expandableHeaderRowHeight = 40;
|
|
7179
|
+
var tableRowPrintBreakCss = Css.add("pageBreakAfter", "auto").add("pageBreakInside", "avoid").$;
|
|
7192
7180
|
var defaultStyle = getTableStyles({});
|
|
7193
7181
|
var condensedStyle = {
|
|
7194
7182
|
...getTableStyles({ rowHeight: "fixed" }),
|
|
@@ -7457,10 +7445,10 @@ function applyRowFn(column2, row, api, level, expanded, dragData) {
|
|
|
7457
7445
|
var ASC = "ASC";
|
|
7458
7446
|
var DESC = "DESC";
|
|
7459
7447
|
var emptyCell = { content: () => /* @__PURE__ */ jsx31(Fragment9, {}), value: "" };
|
|
7460
|
-
function getFirstOrLastCellCss(style, columnIndex, columns) {
|
|
7448
|
+
function getFirstOrLastCellCss(style, columnIndex, columns, colspan = 1) {
|
|
7461
7449
|
return {
|
|
7462
7450
|
...columnIndex === 0 ? style.firstCellCss : {},
|
|
7463
|
-
...columnIndex
|
|
7451
|
+
...columnIndex + colspan >= columns.length ? style.lastCellCss : {}
|
|
7464
7452
|
};
|
|
7465
7453
|
}
|
|
7466
7454
|
function isJSX(content) {
|
|
@@ -7851,7 +7839,7 @@ function ColumnResizeHandle({
|
|
|
7851
7839
|
import { useContext as useContext8 } from "react";
|
|
7852
7840
|
import { jsx as jsx33, jsxs as jsxs20 } from "@emotion/react/jsx-runtime";
|
|
7853
7841
|
function KeptGroupRow(props) {
|
|
7854
|
-
const { as, columnSizes, style, row, colSpan } = props;
|
|
7842
|
+
const { as, columnSizes, style, row, colSpan, isLastBodyRow } = props;
|
|
7855
7843
|
const CellTag = as === "table" ? "td" : "div";
|
|
7856
7844
|
const { tableState } = useContext8(TableStateContext);
|
|
7857
7845
|
const numHiddenSelectedRows = useComputed(() => tableState.keptRows.length, [tableState]);
|
|
@@ -7860,6 +7848,10 @@ function KeptGroupRow(props) {
|
|
|
7860
7848
|
{
|
|
7861
7849
|
css: {
|
|
7862
7850
|
...style.cellCss,
|
|
7851
|
+
...style.betweenRowsCss,
|
|
7852
|
+
...isLastBodyRow && style.lastRowCellCss,
|
|
7853
|
+
...isLastBodyRow && style.lastRowFirstCellCss,
|
|
7854
|
+
...isLastBodyRow && style.lastRowLastCellCss,
|
|
7863
7855
|
...style.keptGroupRowCss,
|
|
7864
7856
|
...Css.pl0.w(`calc(${columnSizes.join(" + ")})`).$
|
|
7865
7857
|
},
|
|
@@ -8174,6 +8166,9 @@ function RowImpl(props) {
|
|
|
8174
8166
|
cellHighlight,
|
|
8175
8167
|
omitRowHover,
|
|
8176
8168
|
hasExpandableHeader,
|
|
8169
|
+
isFirstHeadRow,
|
|
8170
|
+
isFirstBodyRow,
|
|
8171
|
+
isLastBodyRow,
|
|
8177
8172
|
resizedWidths,
|
|
8178
8173
|
setResizedWidth,
|
|
8179
8174
|
disableColumnResizing = true,
|
|
@@ -8192,6 +8187,8 @@ function RowImpl(props) {
|
|
|
8192
8187
|
const isTotals = row.kind === TOTALS;
|
|
8193
8188
|
const isExpandableHeader = row.kind === EXPANDABLE_HEADER;
|
|
8194
8189
|
const isKeptGroupRow = row.kind === KEPT_GROUP;
|
|
8190
|
+
const isBodyRow = !isHeader && !isTotals && !isExpandableHeader;
|
|
8191
|
+
const isFirstHeadCellRow = isExpandableHeader || !hasExpandableHeader && (isHeader || isTotals);
|
|
8195
8192
|
const rowStyle = rowStyles?.[row.kind];
|
|
8196
8193
|
const RowTag = as === "table" ? "tr" : "div";
|
|
8197
8194
|
const sortOn = tableState.sortConfig?.on;
|
|
@@ -8207,6 +8204,9 @@ function RowImpl(props) {
|
|
|
8207
8204
|
};
|
|
8208
8205
|
const rowCss = {
|
|
8209
8206
|
...!reservedRowKinds.includes(row.kind) && style.nonHeaderRowCss,
|
|
8207
|
+
...isFirstBodyRow && style.firstBodyRowCss,
|
|
8208
|
+
...isFirstHeadRow && style.firstRowCss,
|
|
8209
|
+
...as === "table" && tableRowPrintBreakCss,
|
|
8210
8210
|
// Optionally include the row hover styles, by default they should be turned on.
|
|
8211
8211
|
...showRowHoverColor && {
|
|
8212
8212
|
// Even though backgroundColor is set on the cellCss, the hover target is the row.
|
|
@@ -8219,6 +8219,7 @@ function RowImpl(props) {
|
|
|
8219
8219
|
...levelIndent && Css.mlPx(levelIndent).$,
|
|
8220
8220
|
// For virtual tables use `display: flex` to keep all cells on the same row.
|
|
8221
8221
|
...as === "table" ? {} : Css.relative.df.fg1.fs1.$,
|
|
8222
|
+
...isLastBodyRow && style.lastRowCss,
|
|
8222
8223
|
// Apply `cursorPointer` to the row if it has a link or `onClick` value.
|
|
8223
8224
|
...(rowStyle?.rowLink || rowStyle?.onClick) && { "&:hover": Css.cursorPointer.$ },
|
|
8224
8225
|
...maybeApplyFunction(row, rowStyle?.rowCss),
|
|
@@ -8239,7 +8240,17 @@ function RowImpl(props) {
|
|
|
8239
8240
|
[onDragOver]
|
|
8240
8241
|
);
|
|
8241
8242
|
const onDragOverDebounced = useDebouncedCallback4(dragOverCallback, 100);
|
|
8242
|
-
const RowContent = () => /* @__PURE__ */ jsx34(RowTag, { css: rowCss, ...others, "data-gridrow": true, ...getCount(row.id), ref, className: BorderHoverParent, children: isKeptGroupRow ? /* @__PURE__ */ jsx34(
|
|
8243
|
+
const RowContent = () => /* @__PURE__ */ jsx34(RowTag, { css: rowCss, ...others, "data-gridrow": true, ...getCount(row.id), ref, className: BorderHoverParent, children: isKeptGroupRow ? /* @__PURE__ */ jsx34(
|
|
8244
|
+
KeptGroupRow,
|
|
8245
|
+
{
|
|
8246
|
+
as,
|
|
8247
|
+
style,
|
|
8248
|
+
columnSizes,
|
|
8249
|
+
row,
|
|
8250
|
+
colSpan: columns.length,
|
|
8251
|
+
isLastBodyRow
|
|
8252
|
+
}
|
|
8253
|
+
) : columns.map((column2, columnIndex) => {
|
|
8243
8254
|
const maybeExpandedColumn = expandColumnHidden ? columns[columnIndex - 1] : column2;
|
|
8244
8255
|
const isExpanded = tableState.isExpandedColumn(maybeExpandedColumn.id);
|
|
8245
8256
|
if (column2.hideOnExpand && isExpanded) {
|
|
@@ -8323,8 +8334,16 @@ function RowImpl(props) {
|
|
|
8323
8334
|
...maybeStickyColumnStyles,
|
|
8324
8335
|
// Apply any static/all-cell styling
|
|
8325
8336
|
...style.cellCss,
|
|
8337
|
+
// Apply between-row cell styling for body rows.
|
|
8338
|
+
...isBodyRow && style.betweenRowsCss,
|
|
8339
|
+
...isFirstHeadCellRow && style.firstRowCellCss,
|
|
8340
|
+
...isLastBodyRow && style.lastRowCellCss,
|
|
8326
8341
|
// Then override with first/last cell styling
|
|
8327
|
-
...getFirstOrLastCellCss(style, columnIndex, columns),
|
|
8342
|
+
...getFirstOrLastCellCss(style, columnIndex, columns, currentColspan),
|
|
8343
|
+
...columnIndex === 0 && isFirstHeadCellRow && style.firstRowFirstCellCss,
|
|
8344
|
+
...columnIndex === columns.length - 1 && isFirstHeadCellRow && style.firstRowLastCellCss,
|
|
8345
|
+
...columnIndex === 0 && isLastBodyRow && style.lastRowFirstCellCss,
|
|
8346
|
+
...columnIndex === columns.length - 1 && isLastBodyRow && style.lastRowLastCellCss,
|
|
8328
8347
|
// Then override with per-cell/per-row justification
|
|
8329
8348
|
...justificationCss,
|
|
8330
8349
|
// Then apply any header-specific override
|
|
@@ -8340,7 +8359,7 @@ function RowImpl(props) {
|
|
|
8340
8359
|
// Only apply if not the last column in the table AND when this column is the last column in the group of expandable column or not expanded AND
|
|
8341
8360
|
...hasExpandableHeader && columnIndex + currentColspan < columns.length && (isHeader || isTotals) && currentExpandedColumnCount === 0 && Css.boxShadow(`inset -1px -1px 0 ${"rgba(236, 235, 235, 1)" /* Gray200 */}`).$,
|
|
8342
8361
|
// Or level-specific styling
|
|
8343
|
-
|
|
8362
|
+
...isBodyRow && levelStyle?.cellCss,
|
|
8344
8363
|
// Level specific styling for the first content column
|
|
8345
8364
|
...applyFirstContentColumnStyles && levelStyle?.firstContentColumn,
|
|
8346
8365
|
// The specific cell's css (if any from GridCellContent)
|
|
@@ -8535,6 +8554,7 @@ function TextFieldBase(props) {
|
|
|
8535
8554
|
},
|
|
8536
8555
|
input: {
|
|
8537
8556
|
...Css.w100.mw0.outline0.fg1.bgTransparent.$,
|
|
8557
|
+
// Keep `addIn` for `::selection` until we finish the StyleX migration.
|
|
8538
8558
|
// Not using Truss's inline `if` statement here because `addIn` properties do not respect the if statement.
|
|
8539
8559
|
...contrast && !inputStylePalette && Css.addIn("&::selection", Css.bgGray800.$).$,
|
|
8540
8560
|
// For "multiline" fields we add top and bottom padding of 7px for compact, or 11px for non-compact, to properly match the height of the single line fields
|
|
@@ -12166,6 +12186,7 @@ function Switch(props) {
|
|
|
12166
12186
|
label,
|
|
12167
12187
|
labelStyle = "inline",
|
|
12168
12188
|
hideLabel = false,
|
|
12189
|
+
__storyState,
|
|
12169
12190
|
...otherProps
|
|
12170
12191
|
} = props;
|
|
12171
12192
|
const isDisabled = !!disabled;
|
|
@@ -12173,8 +12194,10 @@ function Switch(props) {
|
|
|
12173
12194
|
const state = toToggleState(isSelected, onChange);
|
|
12174
12195
|
const ref = useRef32(null);
|
|
12175
12196
|
const { inputProps } = useSwitch({ ...ariaProps, "aria-label": label }, state, ref);
|
|
12176
|
-
const { isFocusVisible:
|
|
12177
|
-
const { hoverProps, isHovered } = useHover13(ariaProps);
|
|
12197
|
+
const { isFocusVisible: isFocusVisibleFromEvents, focusProps } = useFocusRing7(otherProps);
|
|
12198
|
+
const { hoverProps, isHovered: isHoveredFromEvents } = useHover13(ariaProps);
|
|
12199
|
+
const isFocusVisible = __storyState?.focusVisible ?? isFocusVisibleFromEvents;
|
|
12200
|
+
const isHovered = __storyState?.hovered ?? isHoveredFromEvents;
|
|
12178
12201
|
const tooltip = resolveTooltip(disabled, props.tooltip);
|
|
12179
12202
|
const tid = useTestIds(otherProps, label);
|
|
12180
12203
|
return /* @__PURE__ */ jsxs45(
|
|
@@ -12207,7 +12230,7 @@ function Switch(props) {
|
|
|
12207
12230
|
css: {
|
|
12208
12231
|
...Css.wPx(toggleWidth(compact)).hPx(toggleHeight(compact)).bgGray200.br12.relative.transition.$,
|
|
12209
12232
|
...isHovered && switchHoverStyles,
|
|
12210
|
-
...
|
|
12233
|
+
...isFocusVisible && switchFocusStyles,
|
|
12211
12234
|
...isDisabled && Css.bgGray300.$,
|
|
12212
12235
|
...isSelected && Css.bgBlue700.$,
|
|
12213
12236
|
...isSelected && isHovered && switchSelectedHoverStyles
|
|
@@ -12374,7 +12397,7 @@ import { useFocusRing as useFocusRing8, useHover as useHover14, usePress, useSwi
|
|
|
12374
12397
|
import { useToggleState as useToggleState3 } from "react-stately";
|
|
12375
12398
|
import { jsx as jsx77, jsxs as jsxs46 } from "@emotion/react/jsx-runtime";
|
|
12376
12399
|
function ToggleButton(props) {
|
|
12377
|
-
const { selected: isSelected = false, disabled = false, label, onChange, icon, ...otherProps } = props;
|
|
12400
|
+
const { selected: isSelected = false, disabled = false, label, onChange, icon, __storyState, ...otherProps } = props;
|
|
12378
12401
|
const [asyncInProgress, setAsyncInProgress] = useState27(false);
|
|
12379
12402
|
const isDisabled = !!disabled || asyncInProgress;
|
|
12380
12403
|
const ariaProps = { "aria-label": label, isSelected, isDisabled, ...otherProps };
|
|
@@ -12391,11 +12414,14 @@ function ToggleButton(props) {
|
|
|
12391
12414
|
});
|
|
12392
12415
|
const labelRef = useRef35(null);
|
|
12393
12416
|
const ref = useRef35(null);
|
|
12394
|
-
const tid = useTestIds(
|
|
12395
|
-
const { isPressed, pressProps } = usePress({ ref: labelRef, isDisabled });
|
|
12417
|
+
const tid = useTestIds(otherProps, label);
|
|
12418
|
+
const { isPressed: isPressedFromEvents, pressProps } = usePress({ ref: labelRef, isDisabled });
|
|
12396
12419
|
const { inputProps } = useSwitch2(ariaProps, state, ref);
|
|
12397
|
-
const { isFocusVisible:
|
|
12398
|
-
const { hoverProps, isHovered } = useHover14({ isDisabled });
|
|
12420
|
+
const { isFocusVisible: isFocusVisibleFromEvents, focusProps } = useFocusRing8({ ...otherProps, within: true });
|
|
12421
|
+
const { hoverProps, isHovered: isHoveredFromEvents } = useHover14({ isDisabled });
|
|
12422
|
+
const isHovered = __storyState?.hovered ?? isHoveredFromEvents;
|
|
12423
|
+
const isPressed = __storyState?.pressed ?? isPressedFromEvents;
|
|
12424
|
+
const isFocusVisible = __storyState?.focusVisible ?? isFocusVisibleFromEvents;
|
|
12399
12425
|
const tooltip = resolveTooltip(disabled);
|
|
12400
12426
|
const labelAttrs = {
|
|
12401
12427
|
...focusProps,
|
|
@@ -12406,7 +12432,7 @@ function ToggleButton(props) {
|
|
|
12406
12432
|
...isHovered && toggleHoverStyles,
|
|
12407
12433
|
...isPressed && togglePressStyles,
|
|
12408
12434
|
...isSelected && !isDisabled && Css.blue700.$,
|
|
12409
|
-
...
|
|
12435
|
+
...isFocusVisible && toggleFocusStyles,
|
|
12410
12436
|
...isDisabled && Css.gray300.cursorNotAllowed.$
|
|
12411
12437
|
},
|
|
12412
12438
|
...tid
|
|
@@ -13778,7 +13804,25 @@ function GridTable(props) {
|
|
|
13778
13804
|
let visibleDataRows2 = [];
|
|
13779
13805
|
const { visibleRows } = tableState;
|
|
13780
13806
|
const hasExpandableHeader = visibleRows.some((rs) => rs.row.id === EXPANDABLE_HEADER);
|
|
13807
|
+
const bodyRowsCount = visibleRows.filter((rs) => ![HEADER, EXPANDABLE_HEADER, TOTALS].includes(rs.kind)).length;
|
|
13808
|
+
const onlyKeptBodyRows = bodyRowsCount > 0 && visibleRows.every(
|
|
13809
|
+
(rs) => (
|
|
13810
|
+
// For our purposes, "body rows" are any non-header / non-totals rows.
|
|
13811
|
+
[HEADER, EXPANDABLE_HEADER, TOTALS].includes(rs.kind) || rs.isKept || rs.kind === KEPT_GROUP
|
|
13812
|
+
)
|
|
13813
|
+
);
|
|
13814
|
+
let bodyRowsSeen = 0;
|
|
13815
|
+
let foundFirstBodyRow = false;
|
|
13816
|
+
let foundFirstHeadRow = false;
|
|
13781
13817
|
visibleRows.forEach((rs) => {
|
|
13818
|
+
const isHeadRow = [HEADER, EXPANDABLE_HEADER, TOTALS].includes(rs.kind);
|
|
13819
|
+
const isFirstHeadRow = isHeadRow && !foundFirstHeadRow;
|
|
13820
|
+
const isBodyRow = ![HEADER, EXPANDABLE_HEADER, TOTALS].includes(rs.kind);
|
|
13821
|
+
const isFirstBodyRow = isBodyRow && !foundFirstBodyRow;
|
|
13822
|
+
if (isHeadRow) foundFirstHeadRow = true;
|
|
13823
|
+
if (isBodyRow) bodyRowsSeen += 1;
|
|
13824
|
+
if (isBodyRow) foundFirstBodyRow = true;
|
|
13825
|
+
const isLastBodyRow = isBodyRow && bodyRowsSeen === bodyRowsCount && !onlyKeptBodyRows;
|
|
13782
13826
|
const row = /* @__PURE__ */ jsx81(
|
|
13783
13827
|
Row,
|
|
13784
13828
|
{
|
|
@@ -13797,6 +13841,9 @@ function GridTable(props) {
|
|
|
13797
13841
|
cellHighlight: "cellHighlight" in maybeStyle && maybeStyle.cellHighlight === true,
|
|
13798
13842
|
omitRowHover: "rowHover" in maybeStyle && maybeStyle.rowHover === false,
|
|
13799
13843
|
hasExpandableHeader,
|
|
13844
|
+
isFirstHeadRow,
|
|
13845
|
+
isFirstBodyRow,
|
|
13846
|
+
isLastBodyRow,
|
|
13800
13847
|
resizedWidths,
|
|
13801
13848
|
setResizedWidth: handleColumnResize,
|
|
13802
13849
|
disableColumnResizing,
|
|
@@ -13895,27 +13942,30 @@ function renderDiv(style, id, columns, visibleDataRows, keptSelectedRows, firstR
|
|
|
13895
13942
|
"div",
|
|
13896
13943
|
{
|
|
13897
13944
|
css: {
|
|
13898
|
-
...style.firstRowCss && Css.addIn("& > div:first-of-type", style.firstRowCss).$,
|
|
13899
13945
|
...Css.if(stickyHeader).sticky.topPx(stickyOffset).z(zIndices.stickyHeader).$
|
|
13900
13946
|
},
|
|
13901
13947
|
children: tableHeadRows
|
|
13902
13948
|
}
|
|
13903
13949
|
),
|
|
13904
|
-
/* @__PURE__ */ jsxs48(
|
|
13905
|
-
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
|
|
13909
|
-
|
|
13910
|
-
|
|
13911
|
-
|
|
13912
|
-
|
|
13913
|
-
|
|
13914
|
-
|
|
13915
|
-
|
|
13916
|
-
|
|
13917
|
-
|
|
13918
|
-
|
|
13950
|
+
/* @__PURE__ */ jsxs48("div", { children: [
|
|
13951
|
+
keptSelectedRows,
|
|
13952
|
+
firstRowMessage && /* @__PURE__ */ jsx81(
|
|
13953
|
+
"div",
|
|
13954
|
+
{
|
|
13955
|
+
css: {
|
|
13956
|
+
...keptSelectedRows.length === 0 && style.firstBodyRowCss,
|
|
13957
|
+
...style.firstRowMessageCss,
|
|
13958
|
+
...visibleDataRows.length === 0 && style.lastRowCss,
|
|
13959
|
+
...visibleDataRows.length === 0 && style.lastRowCellCss,
|
|
13960
|
+
...visibleDataRows.length === 0 && style.lastRowFirstCellCss,
|
|
13961
|
+
...visibleDataRows.length === 0 && style.lastRowLastCellCss
|
|
13962
|
+
},
|
|
13963
|
+
"data-gridrow": true,
|
|
13964
|
+
children: firstRowMessage
|
|
13965
|
+
}
|
|
13966
|
+
),
|
|
13967
|
+
visibleDataRows
|
|
13968
|
+
] })
|
|
13919
13969
|
]
|
|
13920
13970
|
}
|
|
13921
13971
|
);
|
|
@@ -13927,10 +13977,6 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, firs
|
|
|
13927
13977
|
ref: tableContainerRef,
|
|
13928
13978
|
css: {
|
|
13929
13979
|
...Css.w100.add("borderCollapse", "separate").add("borderSpacing", "0").$,
|
|
13930
|
-
...Css.addIn("& tr ", { pageBreakAfter: "auto", pageBreakInside: "avoid" }).$,
|
|
13931
|
-
...Css.addIn("& > tbody > tr > * ", style.betweenRowsCss || {}).addIn("& > tbody > tr:first-of-type", style.firstNonHeaderRowCss || {}).$,
|
|
13932
|
-
...Css.addIn("& > tbody > tr:last-of-type", style.lastRowCss).$,
|
|
13933
|
-
...Css.addIn("& > thead > tr:first-of-type", style.firstRowCss).$,
|
|
13934
13980
|
...style.rootCss,
|
|
13935
13981
|
...style.minWidthPx ? Css.mwPx(style.minWidthPx).$ : {},
|
|
13936
13982
|
...xss
|
|
@@ -13940,7 +13986,30 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, firs
|
|
|
13940
13986
|
/* @__PURE__ */ jsx81("thead", { css: Css.if(stickyHeader).sticky.topPx(stickyOffset).z(zIndices.stickyHeader).$, children: tableHeadRows }),
|
|
13941
13987
|
/* @__PURE__ */ jsxs48("tbody", { children: [
|
|
13942
13988
|
keptSelectedRows,
|
|
13943
|
-
firstRowMessage && /* @__PURE__ */ jsx81(
|
|
13989
|
+
firstRowMessage && /* @__PURE__ */ jsx81(
|
|
13990
|
+
"tr",
|
|
13991
|
+
{
|
|
13992
|
+
css: {
|
|
13993
|
+
...tableRowPrintBreakCss,
|
|
13994
|
+
...keptSelectedRows.length === 0 && style.firstBodyRowCss,
|
|
13995
|
+
...visibleDataRows.length === 0 && style.lastRowCss
|
|
13996
|
+
},
|
|
13997
|
+
children: /* @__PURE__ */ jsx81(
|
|
13998
|
+
"td",
|
|
13999
|
+
{
|
|
14000
|
+
colSpan: columns.length,
|
|
14001
|
+
css: {
|
|
14002
|
+
...style.betweenRowsCss,
|
|
14003
|
+
...style.firstRowMessageCss,
|
|
14004
|
+
...visibleDataRows.length === 0 && style.lastRowCellCss,
|
|
14005
|
+
...visibleDataRows.length === 0 && style.lastRowFirstCellCss,
|
|
14006
|
+
...visibleDataRows.length === 0 && style.lastRowLastCellCss
|
|
14007
|
+
},
|
|
14008
|
+
children: firstRowMessage
|
|
14009
|
+
}
|
|
14010
|
+
)
|
|
14011
|
+
}
|
|
14012
|
+
),
|
|
13944
14013
|
visibleDataRows
|
|
13945
14014
|
] })
|
|
13946
14015
|
]
|
|
@@ -13993,7 +14062,28 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
|
|
|
13993
14062
|
if (index === 0) {
|
|
13994
14063
|
return (
|
|
13995
14064
|
// Ensure the fallback message is the same width as the table
|
|
13996
|
-
/* @__PURE__ */ jsx81(
|
|
14065
|
+
/* @__PURE__ */ jsx81(
|
|
14066
|
+
"div",
|
|
14067
|
+
{
|
|
14068
|
+
css: {
|
|
14069
|
+
...getTableRefWidthStyles(true),
|
|
14070
|
+
...keptSelectedRows.length === 0 && style.firstBodyRowCss,
|
|
14071
|
+
...visibleDataRows.length === 0 && style.lastRowCss
|
|
14072
|
+
},
|
|
14073
|
+
children: /* @__PURE__ */ jsx81(
|
|
14074
|
+
"div",
|
|
14075
|
+
{
|
|
14076
|
+
css: {
|
|
14077
|
+
...style.firstRowMessageCss,
|
|
14078
|
+
...visibleDataRows.length === 0 && style.lastRowCellCss,
|
|
14079
|
+
...visibleDataRows.length === 0 && style.lastRowFirstCellCss,
|
|
14080
|
+
...visibleDataRows.length === 0 && style.lastRowLastCellCss
|
|
14081
|
+
},
|
|
14082
|
+
children: firstRowMessage
|
|
14083
|
+
}
|
|
14084
|
+
)
|
|
14085
|
+
}
|
|
14086
|
+
)
|
|
13997
14087
|
);
|
|
13998
14088
|
}
|
|
13999
14089
|
index--;
|
|
@@ -14031,20 +14121,12 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
|
|
|
14031
14121
|
var VirtualRoot = memoizeOne(
|
|
14032
14122
|
(gs, _columns, id, xss) => {
|
|
14033
14123
|
return React13.forwardRef(function VirtualRoot2({ style, children }, ref) {
|
|
14034
|
-
const isHeader = Object.keys(style || {}).length === 0;
|
|
14035
14124
|
return /* @__PURE__ */ jsx81(
|
|
14036
14125
|
"div",
|
|
14037
14126
|
{
|
|
14038
14127
|
ref,
|
|
14039
14128
|
style: { ...style, ...{ minWidth: "fit-content" } },
|
|
14040
14129
|
css: {
|
|
14041
|
-
// Add an extra `> div` due to Item + itemContent both having divs
|
|
14042
|
-
...Css.addIn("& > div + div > div > *", gs.betweenRowsCss || {}).$,
|
|
14043
|
-
// Table list styles only
|
|
14044
|
-
...isHeader ? Css.addIn("& > div:first-of-type > *", gs.firstRowCss).$ : {
|
|
14045
|
-
...Css.addIn("& > div:first-of-type", gs.firstNonHeaderRowCss).$,
|
|
14046
|
-
...Css.addIn("& > div:last-of-type > *", gs.lastRowCss).$
|
|
14047
|
-
},
|
|
14048
14130
|
...gs.rootCss,
|
|
14049
14131
|
...gs.minWidthPx ? Css.mwPx(gs.minWidthPx).$ : {},
|
|
14050
14132
|
...xss
|
|
@@ -14663,7 +14745,7 @@ function SuperDrawer() {
|
|
|
14663
14745
|
}
|
|
14664
14746
|
|
|
14665
14747
|
// src/components/Layout/FormPageLayout.tsx
|
|
14666
|
-
import React16, { createRef, useCallback as useCallback22, useEffect as useEffect24, useMemo as useMemo34, useRef as useRef43, useState as
|
|
14748
|
+
import React16, { createRef, useCallback as useCallback22, useEffect as useEffect24, useMemo as useMemo34, useRef as useRef43, useState as useState38 } from "react";
|
|
14667
14749
|
import { useButton as useButton9, useFocusRing as useFocusRing11 } from "react-aria";
|
|
14668
14750
|
|
|
14669
14751
|
// src/forms/BoundCheckboxField.tsx
|
|
@@ -15557,17 +15639,18 @@ function FormLines(props) {
|
|
|
15557
15639
|
{
|
|
15558
15640
|
css: {
|
|
15559
15641
|
// Note that we're purposefully not using display:flex so that our children's margins will collapse.
|
|
15560
|
-
...Css.w(sizes[width2])
|
|
15561
|
-
// Purposefully use this instead of childGap3 to put margin-bottom on the last line
|
|
15562
|
-
"& > *": Css.mb(gap).$
|
|
15642
|
+
...Css.w(sizes[width2]).$
|
|
15563
15643
|
},
|
|
15564
15644
|
children: Children.map(children, (child) => {
|
|
15645
|
+
if (child === null || child === void 0 || typeof child === "boolean") {
|
|
15646
|
+
return child;
|
|
15647
|
+
}
|
|
15565
15648
|
if (child && typeof child === "object" && "type" in child && child.type.isFormHeading) {
|
|
15566
15649
|
const clone = cloneElement(child, { isFirst: firstFormHeading });
|
|
15567
15650
|
firstFormHeading = false;
|
|
15568
|
-
return clone;
|
|
15651
|
+
return /* @__PURE__ */ jsx114("div", { css: Css.mb(gap).$, children: clone });
|
|
15569
15652
|
} else {
|
|
15570
|
-
return child;
|
|
15653
|
+
return /* @__PURE__ */ jsx114("div", { css: Css.mb(gap).$, children: child });
|
|
15571
15654
|
}
|
|
15572
15655
|
})
|
|
15573
15656
|
}
|
|
@@ -15733,7 +15816,7 @@ function boundTreeSelectField(props) {
|
|
|
15733
15816
|
}
|
|
15734
15817
|
|
|
15735
15818
|
// src/components/internal/CompoundField.tsx
|
|
15736
|
-
import { cloneElement as cloneElement2 } from "react";
|
|
15819
|
+
import { cloneElement as cloneElement2, useState as useState34 } from "react";
|
|
15737
15820
|
import { jsx as jsx116, jsxs as jsxs59 } from "@emotion/react/jsx-runtime";
|
|
15738
15821
|
function CompoundField({ children }) {
|
|
15739
15822
|
if (children?.length !== 2) {
|
|
@@ -15741,45 +15824,46 @@ function CompoundField({ children }) {
|
|
|
15741
15824
|
}
|
|
15742
15825
|
const commonStyles = Css.df.aic.fs1.maxwPx(550).bt.bb.bcGray300.$;
|
|
15743
15826
|
const internalProps = { compound: true };
|
|
15744
|
-
|
|
15745
|
-
|
|
15746
|
-
|
|
15747
|
-
|
|
15748
|
-
|
|
15749
|
-
|
|
15750
|
-
|
|
15751
|
-
|
|
15752
|
-
children: [
|
|
15753
|
-
/* @__PURE__ */ jsx116(
|
|
15754
|
-
"div",
|
|
15755
|
-
{
|
|
15756
|
-
css: {
|
|
15757
|
-
...commonStyles,
|
|
15758
|
-
...Css.bl.borderRadius("4px 0 0 4px").$,
|
|
15759
|
-
"&:focus-within": Css.bcBlue700.$
|
|
15760
|
-
},
|
|
15761
|
-
children: cloneElement2(children[0], {
|
|
15762
|
-
internalProps
|
|
15763
|
-
})
|
|
15764
|
-
}
|
|
15765
|
-
),
|
|
15766
|
-
/* @__PURE__ */ jsx116("div", { css: Css.wPx(1).fn.bgGray300.$ }),
|
|
15767
|
-
/* @__PURE__ */ jsx116(
|
|
15768
|
-
"div",
|
|
15769
|
-
{
|
|
15770
|
-
css: {
|
|
15771
|
-
...commonStyles,
|
|
15772
|
-
...Css.fg1.br.borderRadius("0 4px 4px 0").$,
|
|
15773
|
-
"&:focus-within": Css.bcBlue700.$
|
|
15774
|
-
},
|
|
15775
|
-
children: cloneElement2(children[1], {
|
|
15776
|
-
internalProps
|
|
15777
|
-
})
|
|
15778
|
-
}
|
|
15779
|
-
)
|
|
15780
|
-
]
|
|
15827
|
+
const [hasFocusWithin, setHasFocusWithin] = useState34(false);
|
|
15828
|
+
function onFocusCapture() {
|
|
15829
|
+
setHasFocusWithin(true);
|
|
15830
|
+
}
|
|
15831
|
+
function onBlurCapture(e) {
|
|
15832
|
+
const nextFocusedElement = e.relatedTarget;
|
|
15833
|
+
if (nextFocusedElement instanceof Node && e.currentTarget.contains(nextFocusedElement)) {
|
|
15834
|
+
return;
|
|
15781
15835
|
}
|
|
15782
|
-
|
|
15836
|
+
setHasFocusWithin(false);
|
|
15837
|
+
}
|
|
15838
|
+
return /* @__PURE__ */ jsxs59("div", { css: Css.df.$, onFocusCapture, onBlurCapture, children: [
|
|
15839
|
+
/* @__PURE__ */ jsx116(
|
|
15840
|
+
"div",
|
|
15841
|
+
{
|
|
15842
|
+
css: {
|
|
15843
|
+
...commonStyles,
|
|
15844
|
+
...Css.bl.borderRadius("4px 0 0 4px").$,
|
|
15845
|
+
"&:focus-within": Css.bcBlue700.$
|
|
15846
|
+
},
|
|
15847
|
+
children: cloneElement2(children[0], {
|
|
15848
|
+
internalProps
|
|
15849
|
+
})
|
|
15850
|
+
}
|
|
15851
|
+
),
|
|
15852
|
+
/* @__PURE__ */ jsx116("div", { css: { ...Css.wPx(1).fn.bgGray300.$, ...hasFocusWithin && Css.bgBlue700.$ } }),
|
|
15853
|
+
/* @__PURE__ */ jsx116(
|
|
15854
|
+
"div",
|
|
15855
|
+
{
|
|
15856
|
+
css: {
|
|
15857
|
+
...commonStyles,
|
|
15858
|
+
...Css.fg1.br.borderRadius("0 4px 4px 0").$,
|
|
15859
|
+
"&:focus-within": Css.bcBlue700.$
|
|
15860
|
+
},
|
|
15861
|
+
children: cloneElement2(children[1], {
|
|
15862
|
+
internalProps
|
|
15863
|
+
})
|
|
15864
|
+
}
|
|
15865
|
+
)
|
|
15866
|
+
] });
|
|
15783
15867
|
}
|
|
15784
15868
|
|
|
15785
15869
|
// src/forms/BoundSelectAndTextField.tsx
|
|
@@ -15875,11 +15959,11 @@ import { useDebouncedCallback as useDebouncedCallback5 } from "use-debounce";
|
|
|
15875
15959
|
|
|
15876
15960
|
// src/components/RightSidebar.tsx
|
|
15877
15961
|
import { AnimatePresence as AnimatePresence2, motion as motion2 } from "framer-motion";
|
|
15878
|
-
import { useState as
|
|
15962
|
+
import { useState as useState35 } from "react";
|
|
15879
15963
|
import { Fragment as Fragment24, jsx as jsx121, jsxs as jsxs62 } from "@emotion/react/jsx-runtime";
|
|
15880
15964
|
var RIGHT_SIDEBAR_MIN_WIDTH = "250px";
|
|
15881
15965
|
function RightSidebar({ content, headerHeightPx: headerHeightPx2 }) {
|
|
15882
|
-
const [selectedIcon, setSelectedIcon] =
|
|
15966
|
+
const [selectedIcon, setSelectedIcon] = useState35(void 0);
|
|
15883
15967
|
const tid = useTestIds({}, "rightSidebar");
|
|
15884
15968
|
return /* @__PURE__ */ jsxs62(Fragment24, { children: [
|
|
15885
15969
|
/* @__PURE__ */ jsx121("div", { css: Css.df.jcfe.absolute.right0.pr3.$, children: /* @__PURE__ */ jsx121(AnimatePresence2, { children: !selectedIcon && /* @__PURE__ */ jsx121(
|
|
@@ -15940,7 +16024,7 @@ function IconButtonList({ content, selectedIcon, onIconClick }) {
|
|
|
15940
16024
|
}
|
|
15941
16025
|
|
|
15942
16026
|
// src/components/Toast/ToastContext.tsx
|
|
15943
|
-
import { createContext as createContext5, useCallback as useCallback21, useContext as useContext14, useMemo as useMemo32, useState as
|
|
16027
|
+
import { createContext as createContext5, useCallback as useCallback21, useContext as useContext14, useMemo as useMemo32, useState as useState36 } from "react";
|
|
15944
16028
|
import { jsx as jsx122 } from "@emotion/react/jsx-runtime";
|
|
15945
16029
|
var ToastContext = createContext5({
|
|
15946
16030
|
setNotice: () => {
|
|
@@ -15951,7 +16035,7 @@ var ToastContext = createContext5({
|
|
|
15951
16035
|
notice: void 0
|
|
15952
16036
|
});
|
|
15953
16037
|
function ToastProvider(props) {
|
|
15954
|
-
const [notice, setNotice] =
|
|
16038
|
+
const [notice, setNotice] = useState36();
|
|
15955
16039
|
const clear = useCallback21(() => setNotice(void 0), [setNotice]);
|
|
15956
16040
|
const contextValue = useMemo32(() => ({ setNotice, notice, clear }), [notice, clear]);
|
|
15957
16041
|
return /* @__PURE__ */ jsx122(ToastContext.Provider, { value: contextValue, children: props.children });
|
|
@@ -15969,13 +16053,13 @@ function Toast() {
|
|
|
15969
16053
|
}
|
|
15970
16054
|
|
|
15971
16055
|
// src/components/Layout/PageHeaderBreadcrumbs.tsx
|
|
15972
|
-
import { Fragment as Fragment26, useMemo as useMemo33, useState as
|
|
16056
|
+
import { Fragment as Fragment26, useMemo as useMemo33, useState as useState37 } from "react";
|
|
15973
16057
|
import { Link as Link4 } from "react-router-dom";
|
|
15974
16058
|
import { Fragment as Fragment27, jsx as jsx124, jsxs as jsxs63 } from "@emotion/react/jsx-runtime";
|
|
15975
16059
|
function PageHeaderBreadcrumbs({ breadcrumb }) {
|
|
15976
16060
|
const tids = useTestIds({}, "pageHeaderBreadcrumbs");
|
|
15977
16061
|
const breadcrumbs = useMemo33(() => Array.isArray(breadcrumb) ? breadcrumb : [breadcrumb], [breadcrumb]);
|
|
15978
|
-
const [collapsed, setCollapsed] =
|
|
16062
|
+
const [collapsed, setCollapsed] = useState37(true);
|
|
15979
16063
|
function renderBreadcrumb(bc, index, hideDivisor) {
|
|
15980
16064
|
return (
|
|
15981
16065
|
// Adding index to key to prevent rendering issues when multiple items have the same label
|
|
@@ -16139,7 +16223,7 @@ function SectionNavLink(props) {
|
|
|
16139
16223
|
);
|
|
16140
16224
|
}
|
|
16141
16225
|
function useActiveSection(sectionsWithRefs) {
|
|
16142
|
-
const [activeSection, setActiveSection] =
|
|
16226
|
+
const [activeSection, setActiveSection] = useState38(null);
|
|
16143
16227
|
const debouncedIntersectionCallback = useDebouncedCallback5(
|
|
16144
16228
|
(entries) => {
|
|
16145
16229
|
const sectionsInView = entries.filter((entry) => entry.isIntersecting && entry.intersectionRatio > 0.2).sort((a, b) => {
|
|
@@ -16196,7 +16280,7 @@ function FullBleed({ children, omitPadding = false }) {
|
|
|
16196
16280
|
}
|
|
16197
16281
|
|
|
16198
16282
|
// src/components/Layout/GridTableLayout/GridTableLayout.tsx
|
|
16199
|
-
import React17, { useEffect as useEffect27, useMemo as useMemo38, useState as
|
|
16283
|
+
import React17, { useEffect as useEffect27, useMemo as useMemo38, useState as useState41 } from "react";
|
|
16200
16284
|
|
|
16201
16285
|
// src/components/ButtonMenu.tsx
|
|
16202
16286
|
import { useRef as useRef44 } from "react";
|
|
@@ -16248,7 +16332,7 @@ function isSelectionButtonMenuProps(props) {
|
|
|
16248
16332
|
}
|
|
16249
16333
|
|
|
16250
16334
|
// src/components/Filters/FilterDropdownMenu.tsx
|
|
16251
|
-
import { memo as memo2, useMemo as useMemo36, useState as
|
|
16335
|
+
import { memo as memo2, useMemo as useMemo36, useState as useState40 } from "react";
|
|
16252
16336
|
|
|
16253
16337
|
// src/components/CountBadge.tsx
|
|
16254
16338
|
import { jsx as jsx127 } from "@emotion/react/jsx-runtime";
|
|
@@ -16633,7 +16717,7 @@ var CheckboxFilter = class extends BaseFilter {
|
|
|
16633
16717
|
};
|
|
16634
16718
|
|
|
16635
16719
|
// src/components/Filters/FilterModal.tsx
|
|
16636
|
-
import { useState as
|
|
16720
|
+
import { useState as useState39 } from "react";
|
|
16637
16721
|
|
|
16638
16722
|
// src/components/Modal/OpenModal.tsx
|
|
16639
16723
|
import { useEffect as useEffect25 } from "react";
|
|
@@ -16659,7 +16743,7 @@ function FilterModal(props) {
|
|
|
16659
16743
|
const { filter, filters, onApply } = props;
|
|
16660
16744
|
const testId = useTestIds(props, filterTestIdPrefix);
|
|
16661
16745
|
const { closeModal } = useModal();
|
|
16662
|
-
const [modalFilter, setModalFilter] =
|
|
16746
|
+
const [modalFilter, setModalFilter] = useState39(filter);
|
|
16663
16747
|
return /* @__PURE__ */ jsxs68(Fragment31, { children: [
|
|
16664
16748
|
/* @__PURE__ */ jsx137(ModalHeader, { children: "More Filters" }),
|
|
16665
16749
|
/* @__PURE__ */ jsx137(ModalBody, { children: /* @__PURE__ */ jsx137("div", { css: Css.df.fdc.$, children: safeEntries(filters).map(([key, f]) => /* @__PURE__ */ jsx137(ModalFilterItem, { label: f.hideLabelInModal ? void 0 : f.label, children: f.render(
|
|
@@ -16814,7 +16898,7 @@ import { Fragment as Fragment32, jsx as jsx140, jsxs as jsxs70 } from "@emotion/
|
|
|
16814
16898
|
function FilterDropdownMenu(props) {
|
|
16815
16899
|
const { filter, onChange, filterDefs, groupBy } = props;
|
|
16816
16900
|
const testId = useTestIds(props, filterTestIdPrefix);
|
|
16817
|
-
const [isOpen, setIsOpen] =
|
|
16901
|
+
const [isOpen, setIsOpen] = useState40(false);
|
|
16818
16902
|
const activeFilterCount = useMemo36(() => getActiveFilterCount(filter), [filter]);
|
|
16819
16903
|
const filterImpls = useMemo36(() => buildFilterImpls(filterDefs), [filterDefs]);
|
|
16820
16904
|
const renderFilters = () => {
|
|
@@ -17239,7 +17323,7 @@ function useGridTableLayoutState({
|
|
|
17239
17323
|
const filterFallback = { filterDefs: {}, storageKey: "unset-filter" };
|
|
17240
17324
|
const { filter, setFilter } = usePersistedFilter(persistedFilter ?? filterFallback);
|
|
17241
17325
|
const groupBy = useGroupBy(maybeGroupBy ?? { none: "none" });
|
|
17242
|
-
const [searchString, setSearchString] =
|
|
17326
|
+
const [searchString, setSearchString] = useState41("");
|
|
17243
17327
|
const columnsFallback = "unset-columns";
|
|
17244
17328
|
const [visibleColumnIds, setVisibleColumnIds] = useSessionStorage(
|
|
17245
17329
|
persistedColumns?.storageKey ?? columnsFallback,
|
|
@@ -17252,7 +17336,7 @@ function useGridTableLayoutState({
|
|
|
17252
17336
|
100
|
|
17253
17337
|
// default page size
|
|
17254
17338
|
);
|
|
17255
|
-
const [page, setPage] =
|
|
17339
|
+
const [page, setPage] = useState41({
|
|
17256
17340
|
offset: 0,
|
|
17257
17341
|
limit: persistedPageSize
|
|
17258
17342
|
});
|
|
@@ -17295,7 +17379,7 @@ function Header2(props) {
|
|
|
17295
17379
|
}
|
|
17296
17380
|
function SearchBox({ onSearch }) {
|
|
17297
17381
|
const [{ search: initialValue }, setQueryParams] = useQueryParams3({ search: StringParam2 });
|
|
17298
|
-
const [value, setValue] =
|
|
17382
|
+
const [value, setValue] = useState41(initialValue || "");
|
|
17299
17383
|
const [debouncedSearch] = useDebounce2(value, 300);
|
|
17300
17384
|
useEffect27(() => {
|
|
17301
17385
|
onSearch(debouncedSearch);
|
|
@@ -17327,7 +17411,7 @@ function PreventBrowserScroll({ children }) {
|
|
|
17327
17411
|
}
|
|
17328
17412
|
|
|
17329
17413
|
// src/components/Layout/RightPaneLayout/RightPaneContext.tsx
|
|
17330
|
-
import React18, { useCallback as useCallback23, useContext as useContext15, useMemo as useMemo39, useState as
|
|
17414
|
+
import React18, { useCallback as useCallback23, useContext as useContext15, useMemo as useMemo39, useState as useState42 } from "react";
|
|
17331
17415
|
import { jsx as jsx148 } from "@emotion/react/jsx-runtime";
|
|
17332
17416
|
var RightPaneContext = React18.createContext({
|
|
17333
17417
|
openInPane: () => {
|
|
@@ -17340,8 +17424,8 @@ var RightPaneContext = React18.createContext({
|
|
|
17340
17424
|
rightPaneContent: null
|
|
17341
17425
|
});
|
|
17342
17426
|
function RightPaneProvider({ children }) {
|
|
17343
|
-
const [rightPaneContent, setRightPaneContent] =
|
|
17344
|
-
const [isRightPaneOpen, setIsRightPaneOpen] =
|
|
17427
|
+
const [rightPaneContent, setRightPaneContent] = useState42(void 0);
|
|
17428
|
+
const [isRightPaneOpen, setIsRightPaneOpen] = useState42(false);
|
|
17345
17429
|
const openInPane = useCallback23(
|
|
17346
17430
|
(opts) => {
|
|
17347
17431
|
setRightPaneContent(opts?.content);
|
|
@@ -17526,19 +17610,43 @@ function ButtonGroup(props) {
|
|
|
17526
17610
|
// Adding `line-height: 0` prevent inheriting line-heights that might throw off sizing within the button group.
|
|
17527
17611
|
/* @__PURE__ */ jsx152("div", { ...tid, css: Css.df.lh(0).add({ ...sizeStyles2[size] }).$, children: buttons.map(({ disabled: buttonDisabled, ...buttonProps }, i) => (
|
|
17528
17612
|
// Disable the button if the ButtonGroup is disabled or if the current button is disabled.
|
|
17529
|
-
/* @__PURE__ */ jsx152(
|
|
17613
|
+
/* @__PURE__ */ jsx152(
|
|
17614
|
+
GroupButton,
|
|
17615
|
+
{
|
|
17616
|
+
...buttonProps,
|
|
17617
|
+
disabled: disabled || buttonDisabled,
|
|
17618
|
+
size,
|
|
17619
|
+
isFirst: i === 0,
|
|
17620
|
+
isLast: i === buttons.length - 1,
|
|
17621
|
+
...tid
|
|
17622
|
+
},
|
|
17623
|
+
i
|
|
17624
|
+
)
|
|
17530
17625
|
)) })
|
|
17531
17626
|
);
|
|
17532
17627
|
}
|
|
17533
17628
|
function GroupButton(props) {
|
|
17534
|
-
const {
|
|
17629
|
+
const {
|
|
17630
|
+
icon,
|
|
17631
|
+
iconInc,
|
|
17632
|
+
iconColor,
|
|
17633
|
+
text,
|
|
17634
|
+
active,
|
|
17635
|
+
onClick: onPress,
|
|
17636
|
+
disabled,
|
|
17637
|
+
size,
|
|
17638
|
+
tooltip,
|
|
17639
|
+
isFirst,
|
|
17640
|
+
isLast,
|
|
17641
|
+
...otherProps
|
|
17642
|
+
} = props;
|
|
17535
17643
|
const ariaProps = { onPress, isDisabled: !!disabled, ...otherProps };
|
|
17536
17644
|
const ref = useRef47(null);
|
|
17537
17645
|
const { buttonProps, isPressed } = useButton10(ariaProps, ref);
|
|
17538
17646
|
const { isFocusVisible, focusProps } = useFocusRing12();
|
|
17539
17647
|
const { hoverProps, isHovered } = useHover15(ariaProps);
|
|
17540
17648
|
const tid = useTestIds(props);
|
|
17541
|
-
return /* @__PURE__ */ jsx152("span", { css: getButtonStyles2(), children: maybeTooltip({
|
|
17649
|
+
return /* @__PURE__ */ jsx152("span", { css: getButtonStyles2(isFirst, isLast), children: maybeTooltip({
|
|
17542
17650
|
title: resolveTooltip(disabled, tooltip),
|
|
17543
17651
|
placement: "top",
|
|
17544
17652
|
children: /* @__PURE__ */ jsxs78(
|
|
@@ -17569,15 +17677,15 @@ var pressedStyles = Css.bgGray200.$;
|
|
|
17569
17677
|
var activeStyles3 = Css.bgGray300.$;
|
|
17570
17678
|
var hoverStyles3 = Css.bgGray100.$;
|
|
17571
17679
|
var defaultFocusRingStyles2 = Css.relative.z2.bshFocus.$;
|
|
17572
|
-
function getButtonStyles2() {
|
|
17680
|
+
function getButtonStyles2(isFirst, isLast) {
|
|
17573
17681
|
return {
|
|
17574
17682
|
...Css.z1.bgWhite.bcGray300.bw1.ba.gray900.br0.oh.$,
|
|
17575
|
-
// Our first button should have a rounded left border
|
|
17576
|
-
|
|
17577
|
-
// Our last button should have a rounded right border
|
|
17578
|
-
|
|
17579
|
-
// Nudge buttons one pixel to the left so they visually share a border
|
|
17580
|
-
|
|
17683
|
+
// Our first button should have a rounded left border.
|
|
17684
|
+
...isFirst && Css.add("borderRadius", "4px 0 0 4px").$,
|
|
17685
|
+
// Our last button should have a rounded right border.
|
|
17686
|
+
...isLast && Css.add("borderRadius", "0 4px 4px 0").$,
|
|
17687
|
+
// Nudge buttons one pixel to the left so they visually share a border.
|
|
17688
|
+
...!isFirst && Css.mlPx(-1).$
|
|
17581
17689
|
};
|
|
17582
17690
|
}
|
|
17583
17691
|
var sizeStyles2 = {
|
|
@@ -17597,13 +17705,13 @@ import { useHover as useHover16 } from "react-aria";
|
|
|
17597
17705
|
|
|
17598
17706
|
// src/components/Tag.tsx
|
|
17599
17707
|
import { useResizeObserver as useResizeObserver4 } from "@react-aria/utils";
|
|
17600
|
-
import { useRef as useRef48, useState as
|
|
17708
|
+
import { useRef as useRef48, useState as useState43 } from "react";
|
|
17601
17709
|
import { jsx as jsx153, jsxs as jsxs79 } from "@emotion/react/jsx-runtime";
|
|
17602
17710
|
function Tag(props) {
|
|
17603
17711
|
const { text, type, xss, preventTooltip = false, ...otherProps } = props;
|
|
17604
17712
|
const typeStyles2 = getStyles(type);
|
|
17605
17713
|
const tid = useTestIds(otherProps);
|
|
17606
|
-
const [showTooltip, setShowTooltip] =
|
|
17714
|
+
const [showTooltip, setShowTooltip] = useState43(false);
|
|
17607
17715
|
const ref = useRef48(null);
|
|
17608
17716
|
useResizeObserver4({
|
|
17609
17717
|
ref,
|
|
@@ -17707,9 +17815,9 @@ function Copy(props) {
|
|
|
17707
17815
|
return /* @__PURE__ */ jsx155(
|
|
17708
17816
|
"div",
|
|
17709
17817
|
{
|
|
17818
|
+
className: "beam-copy",
|
|
17710
17819
|
css: {
|
|
17711
|
-
...Css.sm.gray700.mt2.mb3.wPx(480)
|
|
17712
|
-
"& > p": Css.my2.$
|
|
17820
|
+
...Css.sm.gray700.mt2.mb3.wPx(480).$
|
|
17713
17821
|
},
|
|
17714
17822
|
children: props.children
|
|
17715
17823
|
}
|
|
@@ -17742,6 +17850,7 @@ function DnDGrid(props) {
|
|
|
17742
17850
|
const reorderViaKeyboard = useRef49(false);
|
|
17743
17851
|
const transformFrom = useRef49({ x: 0, y: 0 });
|
|
17744
17852
|
const tid = useTestIds(props, "dndGrid");
|
|
17853
|
+
const activeStyles4 = activeItemStyles ?? Css.bshModal.$;
|
|
17745
17854
|
const getGridItems = useCallback24(() => {
|
|
17746
17855
|
return gridEl.current ? Array.from(gridEl.current.querySelectorAll(`[${gridItemIdKey}]`)) : [];
|
|
17747
17856
|
}, []);
|
|
@@ -17751,19 +17860,19 @@ function DnDGrid(props) {
|
|
|
17751
17860
|
const initReorder = useCallback24(() => {
|
|
17752
17861
|
if (gridEl.current && dragEl.current) {
|
|
17753
17862
|
initialOrder.current = getGridItemIdOrder();
|
|
17754
|
-
dragEl.current
|
|
17863
|
+
setInlineStyles(dragEl.current, activeStyles4);
|
|
17755
17864
|
}
|
|
17756
|
-
}, [getGridItemIdOrder]);
|
|
17865
|
+
}, [getGridItemIdOrder, activeStyles4]);
|
|
17757
17866
|
const commitReorder = useCallback24(() => {
|
|
17758
17867
|
if (gridEl.current && dragEl.current) {
|
|
17759
17868
|
const currentOrder = getGridItemIdOrder();
|
|
17760
17869
|
if (!equal2(currentOrder, initialOrder.current)) onReorder(currentOrder);
|
|
17761
|
-
dragEl.current
|
|
17870
|
+
clearInlineStyles(dragEl.current, activeStyles4);
|
|
17762
17871
|
dragEl.current = void 0;
|
|
17763
17872
|
reorderViaKeyboard.current = false;
|
|
17764
17873
|
initialOrder.current = currentOrder;
|
|
17765
17874
|
}
|
|
17766
|
-
}, [onReorder, getGridItemIdOrder]);
|
|
17875
|
+
}, [onReorder, getGridItemIdOrder, activeStyles4]);
|
|
17767
17876
|
const cancelReorder = useCallback24(() => {
|
|
17768
17877
|
if (gridEl.current && dragEl.current && initialOrder.current) {
|
|
17769
17878
|
const currentOrder = getGridItemIdOrder();
|
|
@@ -17781,11 +17890,11 @@ function DnDGrid(props) {
|
|
|
17781
17890
|
}
|
|
17782
17891
|
}
|
|
17783
17892
|
}
|
|
17784
|
-
dragEl.current
|
|
17893
|
+
clearInlineStyles(dragEl.current, activeStyles4);
|
|
17785
17894
|
dragEl.current = void 0;
|
|
17786
17895
|
reorderViaKeyboard.current = false;
|
|
17787
17896
|
}
|
|
17788
|
-
}, [getGridItemIdOrder, getGridItems]);
|
|
17897
|
+
}, [getGridItemIdOrder, getGridItems, activeStyles4]);
|
|
17789
17898
|
const onMove = useCallback24((e) => {
|
|
17790
17899
|
if (!reorderViaKeyboard.current && dragEl.current && cloneEl.current && gridEl.current) {
|
|
17791
17900
|
const clientX = "clientX" in e ? e.clientX : e.touches[0].clientX;
|
|
@@ -17824,18 +17933,21 @@ function DnDGrid(props) {
|
|
|
17824
17933
|
);
|
|
17825
17934
|
cloneEl.current?.setAttribute(gridCloneKey, "true");
|
|
17826
17935
|
cloneEl.current.removeAttribute("id");
|
|
17827
|
-
cloneEl.current?.classList.remove(activeGridItemClass);
|
|
17828
17936
|
gridEl.current.insertBefore(cloneEl.current, dragEl.current.nextSibling);
|
|
17829
|
-
dragEl.current.
|
|
17830
|
-
|
|
17831
|
-
|
|
17832
|
-
|
|
17937
|
+
dragEl.current.style.pointerEvents = "none";
|
|
17938
|
+
dragEl.current.style.position = "fixed";
|
|
17939
|
+
dragEl.current.style.zIndex = "9999";
|
|
17940
|
+
dragEl.current.style.top = `${top}px`;
|
|
17941
|
+
dragEl.current.style.left = `${left}px`;
|
|
17942
|
+
dragEl.current.style.width = `${rect.width}px`;
|
|
17943
|
+
dragEl.current.style.height = `${rect.height}px`;
|
|
17944
|
+
setInlineStyles(dragEl.current, activeStyles4);
|
|
17833
17945
|
gridEl.current.style.cursor = "grabbing";
|
|
17834
17946
|
gridEl.current.addEventListener("mousemove", onMove);
|
|
17835
17947
|
gridEl.current.addEventListener("touchmove", onMove);
|
|
17836
17948
|
}
|
|
17837
17949
|
},
|
|
17838
|
-
[initReorder, onMove]
|
|
17950
|
+
[initReorder, onMove, activeStyles4]
|
|
17839
17951
|
);
|
|
17840
17952
|
const onDragEnd = useCallback24(
|
|
17841
17953
|
(e) => {
|
|
@@ -17909,7 +18021,7 @@ function DnDGrid(props) {
|
|
|
17909
18021
|
{
|
|
17910
18022
|
ref: gridEl,
|
|
17911
18023
|
css: {
|
|
17912
|
-
...Css.ctis.dg
|
|
18024
|
+
...Css.ctis.dg.$,
|
|
17913
18025
|
...gridStyles
|
|
17914
18026
|
},
|
|
17915
18027
|
onTouchStart: onDragStart,
|
|
@@ -17923,7 +18035,6 @@ function DnDGrid(props) {
|
|
|
17923
18035
|
}
|
|
17924
18036
|
var gridItemIdKey = "dndgrid-itemid";
|
|
17925
18037
|
var gridCloneKey = "dndgrid-clone";
|
|
17926
|
-
var activeGridItemClass = "dndgrid-active";
|
|
17927
18038
|
|
|
17928
18039
|
// src/components/DnDGrid/DnDGridItemHandle.tsx
|
|
17929
18040
|
import { mergeProps as mergeProps12, useFocusRing as useFocusRing13, useHover as useHover17 } from "react-aria";
|
|
@@ -18108,12 +18219,12 @@ function HbSpinnerProvider({ quips = [], children }) {
|
|
|
18108
18219
|
|
|
18109
18220
|
// src/components/MaxLines.tsx
|
|
18110
18221
|
import { useLayoutEffect as useLayoutEffect2, useResizeObserver as useResizeObserver5 } from "@react-aria/utils";
|
|
18111
|
-
import { useCallback as useCallback25, useEffect as useEffect29, useRef as useRef50, useState as
|
|
18222
|
+
import { useCallback as useCallback25, useEffect as useEffect29, useRef as useRef50, useState as useState44 } from "react";
|
|
18112
18223
|
import { jsx as jsx161, jsxs as jsxs82 } from "@emotion/react/jsx-runtime";
|
|
18113
18224
|
function MaxLines({ maxLines, children }) {
|
|
18114
18225
|
const elRef = useRef50(null);
|
|
18115
|
-
const [hasMore, setHasMore] =
|
|
18116
|
-
const [expanded, setExpanded] =
|
|
18226
|
+
const [hasMore, setHasMore] = useState44(false);
|
|
18227
|
+
const [expanded, setExpanded] = useState44(false);
|
|
18117
18228
|
useLayoutEffect2(() => {
|
|
18118
18229
|
if (!elRef.current) return;
|
|
18119
18230
|
setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
|
|
@@ -18134,7 +18245,7 @@ function MaxLines({ maxLines, children }) {
|
|
|
18134
18245
|
|
|
18135
18246
|
// src/components/ScrollShadows.tsx
|
|
18136
18247
|
import { useResizeObserver as useResizeObserver6 } from "@react-aria/utils";
|
|
18137
|
-
import { useCallback as useCallback26, useMemo as useMemo47, useRef as useRef51, useState as
|
|
18248
|
+
import { useCallback as useCallback26, useMemo as useMemo47, useRef as useRef51, useState as useState45 } from "react";
|
|
18138
18249
|
import { jsx as jsx162, jsxs as jsxs83 } from "@emotion/react/jsx-runtime";
|
|
18139
18250
|
function ScrollShadows(props) {
|
|
18140
18251
|
const { children, xss, horizontal = false, bgColor = "rgba(255,255,255,1)" /* White */ } = props;
|
|
@@ -18143,8 +18254,8 @@ function ScrollShadows(props) {
|
|
|
18143
18254
|
if (!bgColor.includes("rgba")) {
|
|
18144
18255
|
throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
|
|
18145
18256
|
}
|
|
18146
|
-
const [showStartShadow, setShowStartShadow] =
|
|
18147
|
-
const [showEndShadow, setShowEndShadow] =
|
|
18257
|
+
const [showStartShadow, setShowStartShadow] = useState45(false);
|
|
18258
|
+
const [showEndShadow, setShowEndShadow] = useState45(false);
|
|
18148
18259
|
const scrollRef = useRef51(null);
|
|
18149
18260
|
const [startShadowStyles, endShadowStyles] = useMemo47(() => {
|
|
18150
18261
|
const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
|
|
@@ -18589,7 +18700,7 @@ var SuperDrawerContent = ({ children, actions }) => {
|
|
|
18589
18700
|
|
|
18590
18701
|
// src/components/Tabs.tsx
|
|
18591
18702
|
import { camelCase as camelCase5 } from "change-case";
|
|
18592
|
-
import { useEffect as useEffect31, useMemo as useMemo49, useRef as useRef53, useState as
|
|
18703
|
+
import { useEffect as useEffect31, useMemo as useMemo49, useRef as useRef53, useState as useState46 } from "react";
|
|
18593
18704
|
import { mergeProps as mergeProps13, useFocusRing as useFocusRing15, useHover as useHover19 } from "react-aria";
|
|
18594
18705
|
import { matchPath, Route } from "react-router";
|
|
18595
18706
|
import { Link as Link5, useLocation } from "react-router-dom";
|
|
@@ -18635,7 +18746,7 @@ function Tabs(props) {
|
|
|
18635
18746
|
) : props.selected;
|
|
18636
18747
|
const { isFocusVisible, focusProps } = useFocusRing15();
|
|
18637
18748
|
const tid = useTestIds(others, "tabs");
|
|
18638
|
-
const [active, setActive] =
|
|
18749
|
+
const [active, setActive] = useState46(selected);
|
|
18639
18750
|
const ref = useRef53(null);
|
|
18640
18751
|
useEffect31(() => setActive(selected), [selected]);
|
|
18641
18752
|
function onKeyUp(e) {
|