@paubox/ui 3.2.0 → 3.3.0
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/index.esm.js
CHANGED
|
@@ -1994,7 +1994,7 @@ function _templateObject4$e() {
|
|
|
1994
1994
|
};
|
|
1995
1995
|
return data;
|
|
1996
1996
|
}
|
|
1997
|
-
function _templateObject5$
|
|
1997
|
+
function _templateObject5$8() {
|
|
1998
1998
|
var data = _tagged_template_literal$v([
|
|
1999
1999
|
"\n ",
|
|
2000
2000
|
"\n font-size: ",
|
|
@@ -2002,7 +2002,7 @@ function _templateObject5$7() {
|
|
|
2002
2002
|
"rem;\n letter-spacing: ",
|
|
2003
2003
|
"px;\n font-weight: 400;\n"
|
|
2004
2004
|
]);
|
|
2005
|
-
_templateObject5$
|
|
2005
|
+
_templateObject5$8 = function _templateObject() {
|
|
2006
2006
|
return data;
|
|
2007
2007
|
};
|
|
2008
2008
|
return data;
|
|
@@ -2273,7 +2273,7 @@ var $headline100Regular = css(_templateObject1$l(), commonStyles, headline100Fon
|
|
|
2273
2273
|
var $headline100Semibold = css(_templateObject2$l(), commonStyles, headline100FontSize / BASE_FONT_SIZE, headline100LineHeight / BASE_FONT_SIZE, headline100LetterSpacing);
|
|
2274
2274
|
var $headline200Regular = css(_templateObject3$h(), commonStyles, headline200FontSize / BASE_FONT_SIZE, headline200LineHeight / BASE_FONT_SIZE, headline200LetterSpacing);
|
|
2275
2275
|
var $headline200Semibold = css(_templateObject4$e(), commonStyles, headline200FontSize / BASE_FONT_SIZE, headline200LineHeight / BASE_FONT_SIZE, headline200LetterSpacing);
|
|
2276
|
-
var $headline300Regular = css(_templateObject5$
|
|
2276
|
+
var $headline300Regular = css(_templateObject5$8(), commonStyles, headline300FontSize / BASE_FONT_SIZE, headline300LineHeight / BASE_FONT_SIZE, headline300LetterSpacing);
|
|
2277
2277
|
var $headline300Semibold = css(_templateObject6$4(), commonStyles, headline300FontSize / BASE_FONT_SIZE, headline300LineHeight / BASE_FONT_SIZE, headline300LetterSpacing);
|
|
2278
2278
|
// PARAGRAPH
|
|
2279
2279
|
var $paragraph100Regular = css(_templateObject7$3(), commonStyles, paragraph100FontSize / BASE_FONT_SIZE, paragraph100LineHeight / BASE_FONT_SIZE, paragraph100LetterSpacing);
|
|
@@ -2461,13 +2461,13 @@ function _templateObject4$d() {
|
|
|
2461
2461
|
};
|
|
2462
2462
|
return data;
|
|
2463
2463
|
}
|
|
2464
|
-
function _templateObject5$
|
|
2464
|
+
function _templateObject5$7() {
|
|
2465
2465
|
var data = _tagged_template_literal$u([
|
|
2466
2466
|
"\n background-color: transparent;\n border: none;\n color: ",
|
|
2467
2467
|
";\n cursor: pointer;\n padding: 0.25rem;\n font-size: 0.75rem;\n margin-left: ",
|
|
2468
2468
|
";\n"
|
|
2469
2469
|
]);
|
|
2470
|
-
_templateObject5$
|
|
2470
|
+
_templateObject5$7 = function _templateObject() {
|
|
2471
2471
|
return data;
|
|
2472
2472
|
};
|
|
2473
2473
|
return data;
|
|
@@ -2489,7 +2489,7 @@ var StyledIcon = styled.div(_templateObject3$g(), function(param) {
|
|
|
2489
2489
|
return type === 'info' ? primary700$1 : type === 'error' ? danger700$1 : type === 'success' ? success700$1 : warning700$1;
|
|
2490
2490
|
});
|
|
2491
2491
|
var TextWrapper = styled.div(_templateObject4$d());
|
|
2492
|
-
var TruncaterButton = styled.button(_templateObject5$
|
|
2492
|
+
var TruncaterButton = styled.button(_templateObject5$7(), primary700$1, function(param) {
|
|
2493
2493
|
var isExpanded = param.isExpanded;
|
|
2494
2494
|
return !isExpanded ? '0' : '0.25rem';
|
|
2495
2495
|
});
|
|
@@ -23024,7 +23024,7 @@ var ArrowIcon = styled(ChevronDown)(_templateObject$m(), spacing(1), function(pa
|
|
|
23024
23024
|
var DropdownMenu = function(param) {
|
|
23025
23025
|
var label = param.label, items = param.items, children = param.children, openProp = param.open, onOpenChange = param.onOpenChange, iconLeft = param.iconLeft, _param_size = param.size, size = _param_size === void 0 ? 'small' : _param_size, align = param.align, _param_buttonProps = param.buttonProps, buttonProps = _param_buttonProps === void 0 ? {
|
|
23026
23026
|
color: 'primary'
|
|
23027
|
-
} : _param_buttonProps, _param_testId = param.testId, testId = _param_testId === void 0 ? 'dropdown' : _param_testId, childContainerRefs = param.childContainerRefs, disabled = param.disabled;
|
|
23027
|
+
} : _param_buttonProps, _param_testId = param.testId, testId = _param_testId === void 0 ? 'dropdown' : _param_testId, childContainerRefs = param.childContainerRefs, disabled = param.disabled, _param_detectEdges = param.detectEdges, detectEdges = _param_detectEdges === void 0 ? true : _param_detectEdges;
|
|
23028
23028
|
var _useState = _sliced_to_array$g(useState(false), 2), open = _useState[0], setOpen = _useState[1];
|
|
23029
23029
|
var buttonRef = useRef(null);
|
|
23030
23030
|
var isControlled = openProp !== undefined && onOpenChange;
|
|
@@ -23070,7 +23070,7 @@ var DropdownMenu = function(param) {
|
|
|
23070
23070
|
anchorRef: buttonRef,
|
|
23071
23071
|
align: align === 'center' ? 'middle' : align === 'right' ? 'end' : 'start',
|
|
23072
23072
|
offset: 4,
|
|
23073
|
-
detectEdges:
|
|
23073
|
+
detectEdges: detectEdges,
|
|
23074
23074
|
style: {
|
|
23075
23075
|
padding: "".concat(spacing(1), "px 0")
|
|
23076
23076
|
},
|
|
@@ -23437,11 +23437,11 @@ function _templateObject4$c() {
|
|
|
23437
23437
|
};
|
|
23438
23438
|
return data;
|
|
23439
23439
|
}
|
|
23440
|
-
function _templateObject5$
|
|
23440
|
+
function _templateObject5$6() {
|
|
23441
23441
|
var data = _tagged_template_literal$k([
|
|
23442
23442
|
"\n display: flex;\n flex-direction: row;\n gap: 0.5rem;\n"
|
|
23443
23443
|
]);
|
|
23444
|
-
_templateObject5$
|
|
23444
|
+
_templateObject5$6 = function _templateObject() {
|
|
23445
23445
|
return data;
|
|
23446
23446
|
};
|
|
23447
23447
|
return data;
|
|
@@ -23466,7 +23466,7 @@ var FilterGroup = styled.div(_templateObject1$h(), function(param) {
|
|
|
23466
23466
|
var CloseButton$1 = styled.button(_templateObject2$h());
|
|
23467
23467
|
var FilterRowsContainer = styled.div(_templateObject3$e());
|
|
23468
23468
|
var OrButton = styled.button(_templateObject4$c(), neutral100$1);
|
|
23469
|
-
var ButtonGroup = styled.div(_templateObject5$
|
|
23469
|
+
var ButtonGroup = styled.div(_templateObject5$6());
|
|
23470
23470
|
var AndButtonContainer = styled.div(_templateObject6$3());
|
|
23471
23471
|
var FilterForm = function(param) {
|
|
23472
23472
|
var values = param.values, fieldOptions = param.fieldOptions, operatorOptions = param.operatorOptions, onSubmit = param.onSubmit, onClear = param.onClear, onChange = param.onChange, errors = param.errors, touched = param.touched;
|
|
@@ -23890,7 +23890,8 @@ var MenuItem = function(_param) {
|
|
|
23890
23890
|
children: [
|
|
23891
23891
|
checkbox && /*#__PURE__*/ jsx(Checkbox, {
|
|
23892
23892
|
checked: selected,
|
|
23893
|
-
onClick: onClick
|
|
23893
|
+
onClick: onClick,
|
|
23894
|
+
readOnly: true
|
|
23894
23895
|
}),
|
|
23895
23896
|
/*#__PURE__*/ jsxs(Typography, {
|
|
23896
23897
|
style: {
|
|
@@ -24119,11 +24120,11 @@ function _templateObject4$a() {
|
|
|
24119
24120
|
};
|
|
24120
24121
|
return data;
|
|
24121
24122
|
}
|
|
24122
|
-
function _templateObject5$
|
|
24123
|
+
function _templateObject5$5() {
|
|
24123
24124
|
var data = _tagged_template_literal$i([
|
|
24124
24125
|
'\n /* role="option" wrapper — visual state is delegated to inner MenuItem */\n'
|
|
24125
24126
|
]);
|
|
24126
|
-
_templateObject5$
|
|
24127
|
+
_templateObject5$5 = function _templateObject() {
|
|
24127
24128
|
return data;
|
|
24128
24129
|
};
|
|
24129
24130
|
return data;
|
|
@@ -24154,7 +24155,7 @@ var BaseInput$2 = styled.input(_templateObject1$f(), textPrimary$1, neutral500$1
|
|
|
24154
24155
|
var Chip$2 = styled.button(_templateObject2$f(), neutral100$1, $label200Medium, primary600$1, surfaceRaised, textPrimaryWhite, primary500);
|
|
24155
24156
|
var RightIconWrapper = styled.div(_templateObject3$c(), neutral600$1, surfaceMuted);
|
|
24156
24157
|
var EmptyState = styled.div(_templateObject4$a(), neutral500$1, $paragraph200Regular, surfaceMuted);
|
|
24157
|
-
var OptionWrapper = styled.div(_templateObject5$
|
|
24158
|
+
var OptionWrapper = styled.div(_templateObject5$5());
|
|
24158
24159
|
/**
|
|
24159
24160
|
* AutoComplete: single-line input that filters a closed list of options as
|
|
24160
24161
|
* the user types. Selected items render as removable chips. Multi-select.
|
|
@@ -24881,12 +24882,12 @@ function _templateObject4$9() {
|
|
|
24881
24882
|
};
|
|
24882
24883
|
return data;
|
|
24883
24884
|
}
|
|
24884
|
-
function _templateObject5$
|
|
24885
|
+
function _templateObject5$4() {
|
|
24885
24886
|
var data = _tagged_template_literal$g([
|
|
24886
24887
|
"\n position: absolute;\n right: 0rem;\n width: 2rem;\n background-color: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 0;\n border: none;\n cursor: pointer;\n z-index: 0;\n transition: all 150ms ease-in-out;\n transform: ",
|
|
24887
24888
|
";\n"
|
|
24888
24889
|
]);
|
|
24889
|
-
_templateObject5$
|
|
24890
|
+
_templateObject5$4 = function _templateObject() {
|
|
24890
24891
|
return data;
|
|
24891
24892
|
};
|
|
24892
24893
|
return data;
|
|
@@ -24972,7 +24973,7 @@ var MultiSelectChip = function(option) {
|
|
|
24972
24973
|
});
|
|
24973
24974
|
};
|
|
24974
24975
|
// Style for the Icons
|
|
24975
|
-
var IconWrapper$2 = styled.div(_templateObject5$
|
|
24976
|
+
var IconWrapper$2 = styled.div(_templateObject5$4(), function(param) {
|
|
24976
24977
|
var open = param.open;
|
|
24977
24978
|
return open ? 'rotate(180deg)' : 'rotate(0deg)';
|
|
24978
24979
|
});
|
|
@@ -30878,11 +30879,11 @@ function _templateObject4$5() {
|
|
|
30878
30879
|
};
|
|
30879
30880
|
return data;
|
|
30880
30881
|
}
|
|
30881
|
-
function _templateObject5$
|
|
30882
|
+
function _templateObject5$3() {
|
|
30882
30883
|
var data = _tagged_template_literal$6([
|
|
30883
30884
|
"\n width: 100%;\n max-height: 420px;\n overflow-y: auto;\n"
|
|
30884
30885
|
]);
|
|
30885
|
-
_templateObject5$
|
|
30886
|
+
_templateObject5$3 = function _templateObject() {
|
|
30886
30887
|
return data;
|
|
30887
30888
|
};
|
|
30888
30889
|
return data;
|
|
@@ -30981,7 +30982,7 @@ var ClearButton = styled(IconButton)(_templateObject3$5(), spacing(1));
|
|
|
30981
30982
|
* Inner content of the dropdown. Popper provides the outer container
|
|
30982
30983
|
* (positioning, portal, elevation, dark-mode background). We just lay out
|
|
30983
30984
|
* the rows full-width inside it, with our own max-height + scroll behavior.
|
|
30984
|
-
*/ var DropdownContent = styled.div(_templateObject5$
|
|
30985
|
+
*/ var DropdownContent = styled.div(_templateObject5$3());
|
|
30985
30986
|
var DropdownRow = styled.button(_templateObject6$1(), spacing(1), spacing(1), spacing(2), function(param) {
|
|
30986
30987
|
var highlighted = param.highlighted;
|
|
30987
30988
|
return highlighted ? neutral100$1 : 'transparent';
|
|
@@ -32002,6 +32003,17 @@ function _templateObject4$4() {
|
|
|
32002
32003
|
};
|
|
32003
32004
|
return data;
|
|
32004
32005
|
}
|
|
32006
|
+
function _templateObject5$2() {
|
|
32007
|
+
var data = _tagged_template_literal$5([
|
|
32008
|
+
"\n color: ",
|
|
32009
|
+
";\n font-size: 12px;\n line-height: 1.2;\n font-family: 'Roboto', sans-serif;\n\n html.dark & {\n color: ",
|
|
32010
|
+
";\n }\n"
|
|
32011
|
+
]);
|
|
32012
|
+
_templateObject5$2 = function _templateObject() {
|
|
32013
|
+
return data;
|
|
32014
|
+
};
|
|
32015
|
+
return data;
|
|
32016
|
+
}
|
|
32005
32017
|
var variantMap = {
|
|
32006
32018
|
blue: {
|
|
32007
32019
|
bg: primary100$1,
|
|
@@ -32027,8 +32039,9 @@ var IconBadge = styled.div(_templateObject1$5(), function(param) {
|
|
|
32027
32039
|
var TextBlock = styled.div(_templateObject2$5());
|
|
32028
32040
|
var Label = styled.div(_templateObject3$4(), neutral500$1, neutral400$1);
|
|
32029
32041
|
var Value = styled.div(_templateObject4$4(), neutral900$1, neutral100$1);
|
|
32042
|
+
var Caption = styled.div(_templateObject5$2(), neutral400$1, neutral500$1);
|
|
32030
32043
|
var StatCard = function(param) {
|
|
32031
|
-
var label = param.label, value = param.value, icon = param.icon, _param_variant = param.variant, variant = _param_variant === void 0 ? 'blue' : _param_variant, className = param.className;
|
|
32044
|
+
var label = param.label, value = param.value, icon = param.icon, _param_variant = param.variant, variant = _param_variant === void 0 ? 'blue' : _param_variant, className = param.className, caption = param.caption;
|
|
32032
32045
|
var _variantMap_variant = variantMap[variant], bg = _variantMap_variant.bg, color = _variantMap_variant.color;
|
|
32033
32046
|
return /*#__PURE__*/ jsxs(Card, {
|
|
32034
32047
|
className: className,
|
|
@@ -32045,6 +32058,9 @@ var StatCard = function(param) {
|
|
|
32045
32058
|
}),
|
|
32046
32059
|
/*#__PURE__*/ jsx(Value, {
|
|
32047
32060
|
children: typeof value === 'number' ? value.toLocaleString() : value
|
|
32061
|
+
}),
|
|
32062
|
+
caption && /*#__PURE__*/ jsx(Caption, {
|
|
32063
|
+
children: caption
|
|
32048
32064
|
})
|
|
32049
32065
|
]
|
|
32050
32066
|
})
|
|
@@ -36595,8 +36611,8 @@ function _templateObject3$1() {
|
|
|
36595
36611
|
}
|
|
36596
36612
|
function _templateObject4$1() {
|
|
36597
36613
|
var data = _tagged_template_literal$2([
|
|
36598
|
-
"\n display: flex;\n align-items: center;\n justify-content: center;\n padding: ",
|
|
36599
|
-
"px;\n background: none;\n font-size: 20px;\n"
|
|
36614
|
+
"\n display: flex;\n align-items: center;\n justify-content: center;\n /* The kebab icon is 1em (20px here) — already equal to a cell's text\n line-height (paragraph200Regular = 20px). The BaseButton's border (2px) and\n vertical padding (8px) were the only things making rows with a context menu\n ~10px taller than rows without one. Drop both so the trigger occupies exactly\n one text line and row height matches a table with no context column. Keep the\n horizontal padding for a comfortable hit area. */\n padding: 0 ",
|
|
36615
|
+
"px;\n border: none;\n background: none;\n font-size: 20px;\n"
|
|
36600
36616
|
]);
|
|
36601
36617
|
_templateObject4$1 = function _templateObject() {
|
|
36602
36618
|
return data;
|
package/package.json
CHANGED
|
@@ -13,5 +13,10 @@ export interface DropdownMenuProps {
|
|
|
13
13
|
size?: 'small' | 'large';
|
|
14
14
|
childContainerRefs?: RefObject<HTMLElement>[];
|
|
15
15
|
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Keep the menu within the viewport, shifting it away from the window edge
|
|
18
|
+
* when it would otherwise be clipped. Defaults to `true`.
|
|
19
|
+
*/
|
|
20
|
+
detectEdges?: boolean;
|
|
16
21
|
}
|
|
17
|
-
export declare const DropdownMenu: ({ label, items, children, open: openProp, onOpenChange, iconLeft, size, align, buttonProps, testId, childContainerRefs, disabled, }: DropdownMenuProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const DropdownMenu: ({ label, items, children, open: openProp, onOpenChange, iconLeft, size, align, buttonProps, testId, childContainerRefs, disabled, detectEdges, }: DropdownMenuProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -6,5 +6,10 @@ export interface StatCardProps {
|
|
|
6
6
|
icon: React.ReactNode;
|
|
7
7
|
variant?: StatCardVariant;
|
|
8
8
|
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Optional third line rendered as a smaller, muted label beneath the value
|
|
11
|
+
* (e.g. a time window like "Last 24 hours").
|
|
12
|
+
*/
|
|
13
|
+
caption?: string;
|
|
9
14
|
}
|
|
10
|
-
export declare const StatCard: ({ label, value, icon, variant, className, }: StatCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const StatCard: ({ label, value, icon, variant, className, caption, }: StatCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|