@qoretechnologies/reqore 0.78.10 → 0.78.11-pr.723.g4423093
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/components/Accordion/index.d.ts.map +1 -1
- package/dist/components/Accordion/index.js +60 -14
- package/dist/components/Accordion/index.js.map +1 -1
- package/dist/components/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/index.js +58 -21
- package/dist/components/Breadcrumbs/index.js.map +1 -1
- package/dist/components/Bubble/index.d.ts.map +1 -1
- package/dist/components/Bubble/index.js +13 -4
- package/dist/components/Bubble/index.js.map +1 -1
- package/dist/components/Button/index.d.ts +67 -0
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +238 -98
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Callout/index.d.ts.map +1 -1
- package/dist/components/Callout/index.js +49 -29
- package/dist/components/Callout/index.js.map +1 -1
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +112 -36
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/CollapsibleContent/index.d.ts.map +1 -1
- package/dist/components/CollapsibleContent/index.js +6 -2
- package/dist/components/CollapsibleContent/index.js.map +1 -1
- package/dist/components/ControlGroup/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.js +22 -1
- package/dist/components/ControlGroup/index.js.map +1 -1
- package/dist/components/DataView/index.d.ts.map +1 -1
- package/dist/components/DataView/index.js +13 -10
- package/dist/components/DataView/index.js.map +1 -1
- package/dist/components/DescriptionList/index.d.ts.map +1 -1
- package/dist/components/DescriptionList/index.js +30 -4
- package/dist/components/DescriptionList/index.js.map +1 -1
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +41 -25
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/Dropdown/list.d.ts.map +1 -1
- package/dist/components/Dropdown/list.js +19 -14
- package/dist/components/Dropdown/list.js.map +1 -1
- package/dist/components/Effect/index.d.ts +37 -0
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/Effect/index.js +224 -58
- package/dist/components/Effect/index.js.map +1 -1
- package/dist/components/EntityRow/index.d.ts.map +1 -1
- package/dist/components/EntityRow/index.js +98 -59
- package/dist/components/EntityRow/index.js.map +1 -1
- package/dist/components/FeatureCard/index.d.ts.map +1 -1
- package/dist/components/FeatureCard/index.js +54 -21
- package/dist/components/FeatureCard/index.js.map +1 -1
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +7 -4
- package/dist/components/Header/index.js.map +1 -1
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +13 -3
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Input/index.d.ts +44 -1
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +89 -23
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/InputClearButton/index.d.ts +7 -2
- package/dist/components/InputClearButton/index.d.ts.map +1 -1
- package/dist/components/InputClearButton/index.js +12 -5
- package/dist/components/InputClearButton/index.js.map +1 -1
- package/dist/components/InternalPopover/index.d.ts.map +1 -1
- package/dist/components/InternalPopover/index.js +19 -10
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/components/Link/index.d.ts.map +1 -1
- package/dist/components/Link/index.js +6 -1
- package/dist/components/Link/index.js.map +1 -1
- package/dist/components/Menu/divider.d.ts.map +1 -1
- package/dist/components/Menu/divider.js +8 -3
- package/dist/components/Menu/divider.js.map +1 -1
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.js +17 -4
- package/dist/components/Menu/index.js.map +1 -1
- package/dist/components/Message/index.d.ts.map +1 -1
- package/dist/components/Message/index.js +20 -4
- package/dist/components/Message/index.js.map +1 -1
- package/dist/components/NavRail/index.d.ts +2 -0
- package/dist/components/NavRail/index.d.ts.map +1 -1
- package/dist/components/NavRail/index.js +120 -40
- package/dist/components/NavRail/index.js.map +1 -1
- package/dist/components/Notifications/notification.d.ts +6 -2
- package/dist/components/Notifications/notification.d.ts.map +1 -1
- package/dist/components/Notifications/notification.js +78 -18
- package/dist/components/Notifications/notification.js.map +1 -1
- package/dist/components/Notifications/styles.d.ts +20 -0
- package/dist/components/Notifications/styles.d.ts.map +1 -1
- package/dist/components/Notifications/styles.js +37 -9
- package/dist/components/Notifications/styles.js.map +1 -1
- package/dist/components/Panel/index.d.ts +3 -0
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +214 -153
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Paragraph/index.d.ts.map +1 -1
- package/dist/components/Paragraph/index.js +8 -5
- package/dist/components/Paragraph/index.js.map +1 -1
- package/dist/components/Progress/index.d.ts.map +1 -1
- package/dist/components/Progress/index.js +1 -1
- package/dist/components/Progress/index.js.map +1 -1
- package/dist/components/Rating/index.d.ts.map +1 -1
- package/dist/components/Rating/index.js +20 -8
- package/dist/components/Rating/index.js.map +1 -1
- package/dist/components/RichTextEditor/index.d.ts.map +1 -1
- package/dist/components/RichTextEditor/index.js +89 -46
- package/dist/components/RichTextEditor/index.js.map +1 -1
- package/dist/components/SegmentedControl/index.d.ts.map +1 -1
- package/dist/components/SegmentedControl/index.js +87 -42
- package/dist/components/SegmentedControl/index.js.map +1 -1
- package/dist/components/SeverityRow/index.d.ts.map +1 -1
- package/dist/components/SeverityRow/index.js +1 -1
- package/dist/components/SeverityRow/index.js.map +1 -1
- package/dist/components/Span/index.d.ts.map +1 -1
- package/dist/components/Span/index.js +8 -5
- package/dist/components/Span/index.js.map +1 -1
- package/dist/components/StackedBar/index.d.ts.map +1 -1
- package/dist/components/StackedBar/index.js +42 -12
- package/dist/components/StackedBar/index.js.map +1 -1
- package/dist/components/Statistic/index.d.ts.map +1 -1
- package/dist/components/Statistic/index.js +34 -6
- package/dist/components/Statistic/index.js.map +1 -1
- package/dist/components/Table/cell.d.ts.map +1 -1
- package/dist/components/Table/cell.js +72 -41
- package/dist/components/Table/cell.js.map +1 -1
- package/dist/components/Table/headerCell.d.ts.map +1 -1
- package/dist/components/Table/headerCell.js +7 -5
- package/dist/components/Table/headerCell.js.map +1 -1
- package/dist/components/Tag/index.d.ts +70 -3
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +233 -67
- package/dist/components/Tag/index.js.map +1 -1
- package/dist/components/Testimonial/index.d.ts.map +1 -1
- package/dist/components/Testimonial/index.js +35 -20
- package/dist/components/Testimonial/index.js.map +1 -1
- package/dist/components/Textarea/index.d.ts +6 -0
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +20 -20
- package/dist/components/Textarea/index.js.map +1 -1
- package/dist/components/Timeline/index.d.ts +2 -0
- package/dist/components/Timeline/index.d.ts.map +1 -1
- package/dist/components/Timeline/index.js +56 -13
- package/dist/components/Timeline/index.js.map +1 -1
- package/dist/components/Tree/index.d.ts.map +1 -1
- package/dist/components/Tree/index.js +24 -20
- package/dist/components/Tree/index.js.map +1 -1
- package/dist/containers/UIProvider.d.ts +10 -0
- package/dist/containers/UIProvider.d.ts.map +1 -1
- package/dist/containers/UIProvider.js +33 -4
- package/dist/containers/UIProvider.js.map +1 -1
- package/dist/context/SurfaceContext.d.ts +18 -0
- package/dist/context/SurfaceContext.d.ts.map +1 -0
- package/dist/context/SurfaceContext.js +39 -0
- package/dist/context/SurfaceContext.js.map +1 -0
- package/dist/helpers/colors.d.ts +184 -2
- package/dist/helpers/colors.d.ts.map +1 -1
- package/dist/helpers/colors.js +739 -86
- package/dist/helpers/colors.js.map +1 -1
- package/dist/helpers/iconProps.d.ts +14 -0
- package/dist/helpers/iconProps.d.ts.map +1 -0
- package/dist/helpers/iconProps.js +33 -0
- package/dist/helpers/iconProps.js.map +1 -0
- package/dist/helpers/surface.d.ts +31 -0
- package/dist/helpers/surface.d.ts.map +1 -0
- package/dist/helpers/surface.js +87 -0
- package/dist/helpers/surface.js.map +1 -0
- package/dist/hooks/useDrawnSurface.d.ts +38 -0
- package/dist/hooks/useDrawnSurface.d.ts.map +1 -0
- package/dist/hooks/useDrawnSurface.js +48 -0
- package/dist/hooks/useDrawnSurface.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/vitest.config.ts +10 -0
- package/tests.json +0 -1
|
@@ -69,11 +69,58 @@ var react_1 = require("react");
|
|
|
69
69
|
var styled_components_1 = require("styled-components");
|
|
70
70
|
var sizes_1 = require("../../constants/sizes");
|
|
71
71
|
var colors_1 = require("../../helpers/colors");
|
|
72
|
+
var SurfaceContext_1 = require("../../context/SurfaceContext");
|
|
72
73
|
var styled_1 = __importStar(require("../../helpers/styled"));
|
|
73
74
|
var utils_1 = require("../../helpers/utils");
|
|
74
75
|
var helpers_1 = require("./helpers");
|
|
75
76
|
var Button_1 = __importDefault(require("../Button"));
|
|
76
77
|
var TooltipComponent_1 = require("../TooltipComponent");
|
|
78
|
+
/**
|
|
79
|
+
* A cell's paint: its color (the theme's, or the row's intent), lightened for each of what the row is - an
|
|
80
|
+
* intent's, striped and odd, selected, hovered - and drawn at 30%; `transparent` when it is none of them (an
|
|
81
|
+
* unpinned cell). A pinned cell is opaque: the paint over the theme's main.
|
|
82
|
+
*/
|
|
83
|
+
var getTableCellPaint = function (_a) {
|
|
84
|
+
var theme = _a.theme, intent = _a.intent, selected = _a.selected, selectedIntent = _a.selectedIntent, striped = _a.striped, even = _a.even, hovered = _a.hovered, pin = _a.pin;
|
|
85
|
+
var color = intent || (selected && selectedIntent)
|
|
86
|
+
? theme.intents[intent || selectedIntent]
|
|
87
|
+
: theme.main;
|
|
88
|
+
var opacity = 0;
|
|
89
|
+
// Is there any intent
|
|
90
|
+
if (intent || (selected && selectedIntent)) {
|
|
91
|
+
opacity += 0.02;
|
|
92
|
+
}
|
|
93
|
+
// Is the table striped and this row odd
|
|
94
|
+
if (striped && !even) {
|
|
95
|
+
opacity += 0.05;
|
|
96
|
+
}
|
|
97
|
+
// Is this row selected
|
|
98
|
+
if (selected) {
|
|
99
|
+
opacity += 0.02;
|
|
100
|
+
}
|
|
101
|
+
// Is this row hovered
|
|
102
|
+
if (hovered) {
|
|
103
|
+
opacity += 0.08;
|
|
104
|
+
}
|
|
105
|
+
// Pinned cells must paint opaque — otherwise non-pinned cells scrolling underneath show through
|
|
106
|
+
var backgroundColor = opacity === 0 ? (pin ? theme.main : 'transparent') : (0, colors_1.changeLightness)(color, opacity);
|
|
107
|
+
return {
|
|
108
|
+
backgroundColor: backgroundColor,
|
|
109
|
+
displayedBackgroundColor: backgroundColor === 'transparent'
|
|
110
|
+
? theme.main
|
|
111
|
+
: (0, polished_1.rgba)(backgroundColor, 0.3),
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* A cell as it is drawn: its paint over what the table is drawn on (a pinned one over the theme's main), or
|
|
116
|
+
* what the table is drawn on alone when it paints nothing.
|
|
117
|
+
*/
|
|
118
|
+
var getTableCellBackground = function (_a, _b, surface) {
|
|
119
|
+
var theme = _a.theme, pin = _a.pin;
|
|
120
|
+
var backgroundColor = _b.backgroundColor, displayedBackgroundColor = _b.displayedBackgroundColor;
|
|
121
|
+
var under = pin ? (0, colors_1.getDrawnColor)(theme.main) : (0, colors_1.getThemeSurface)(theme, surface);
|
|
122
|
+
return backgroundColor === 'transparent' ? under : (0, colors_1.getDrawnColor)(displayedBackgroundColor, under);
|
|
123
|
+
};
|
|
77
124
|
exports.StyledTableCell = styled_1.default.div.withConfig({
|
|
78
125
|
// `wrap` drives the cell's white-space rule and `width` its CSS width; neither is a DOM
|
|
79
126
|
// attribute of a `div`.
|
|
@@ -82,52 +129,18 @@ exports.StyledTableCell = styled_1.default.div.withConfig({
|
|
|
82
129
|
var width = _a.width, minWidth = _a.minWidth, maxWidth = _a.maxWidth, grow = _a.grow;
|
|
83
130
|
return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", "px;\n min-width: ", "px;\n max-width: ", "px;\n\n flex-grow: ", ";\n "], ["\n width: ", "px;\n min-width: ", "px;\n max-width: ", "px;\n\n flex-grow: ", ";\n "])), width, minWidth, maxWidth, grow || (width ? undefined : 1));
|
|
84
131
|
}, function (_a) {
|
|
85
|
-
var theme = _a.theme, align = _a.align, interactive = _a.interactive, interactiveCell = _a.interactiveCell, intent = _a.intent, size = _a.size, flat = _a.flat, striped = _a.striped, even = _a.even, selected = _a.selected, selectedIntent = _a.selectedIntent, disabled = _a.disabled, hovered = _a.hovered, padded = _a.padded, wrap = _a.wrap, pin = _a.pin, pinOffset = _a.pinOffset, pinEdge = _a.pinEdge, maxHeight = _a.maxHeight;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if (intent || (selected && selectedIntent)) {
|
|
90
|
-
color = theme.intents[intent || selectedIntent];
|
|
91
|
-
}
|
|
92
|
-
return color;
|
|
93
|
-
};
|
|
94
|
-
var getBackgroundColor = function () {
|
|
95
|
-
var color = getOriginalBackgroundColor();
|
|
96
|
-
var opacity = 0;
|
|
97
|
-
// Is there any intent
|
|
98
|
-
if (intent || (selected && selectedIntent)) {
|
|
99
|
-
opacity += 0.02;
|
|
100
|
-
}
|
|
101
|
-
// Is the table striped and this row odd
|
|
102
|
-
if (striped && !even) {
|
|
103
|
-
opacity += 0.05;
|
|
104
|
-
}
|
|
105
|
-
// Is this row selected
|
|
106
|
-
if (selected) {
|
|
107
|
-
opacity += 0.02;
|
|
108
|
-
}
|
|
109
|
-
// Is this row hovered
|
|
110
|
-
if (hovered) {
|
|
111
|
-
opacity += 0.08;
|
|
112
|
-
}
|
|
113
|
-
// Pinned cells must paint opaque — otherwise non-pinned cells scrolling underneath show through
|
|
114
|
-
if (opacity === 0) {
|
|
115
|
-
return pin ? theme.main : 'transparent';
|
|
116
|
-
}
|
|
117
|
-
return (0, colors_1.changeLightness)(color, opacity);
|
|
118
|
-
};
|
|
119
|
-
var backgroundColor = getBackgroundColor();
|
|
120
|
-
var displayedBackgroundColor = backgroundColor === 'transparent'
|
|
121
|
-
? theme.main
|
|
122
|
-
: (0, polished_1.rgba)(backgroundColor, 0.3);
|
|
132
|
+
var theme = _a.theme, align = _a.align, interactive = _a.interactive, interactiveCell = _a.interactiveCell, intent = _a.intent, size = _a.size, flat = _a.flat, striped = _a.striped, even = _a.even, selected = _a.selected, selectedIntent = _a.selectedIntent, disabled = _a.disabled, hovered = _a.hovered, padded = _a.padded, wrap = _a.wrap, pin = _a.pin, pinOffset = _a.pinOffset, pinEdge = _a.pinEdge, maxHeight = _a.maxHeight, $surface = _a.$surface, $paint = _a.$paint, $color = _a.$color;
|
|
133
|
+
// the component's, when it has worked them out
|
|
134
|
+
var paint = $paint !== null && $paint !== void 0 ? $paint : getTableCellPaint({ theme: theme, intent: intent, selected: selected, selectedIntent: selectedIntent, striped: striped, even: even, hovered: hovered, pin: pin });
|
|
135
|
+
var backgroundColor = paint.backgroundColor, displayedBackgroundColor = paint.displayedBackgroundColor;
|
|
123
136
|
// Pinned cells need an opaque paint so non-pinned cells scrolling underneath don't show
|
|
124
137
|
// through. We layer the semi-transparent displayed color over a solid theme.main base.
|
|
125
138
|
var pinnedBackground = pin
|
|
126
139
|
? "linear-gradient(".concat(displayedBackgroundColor, ", ").concat(displayedBackgroundColor, "), ").concat(theme.main)
|
|
127
140
|
: undefined;
|
|
128
|
-
return (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n align-items: ", ";\n justify-content: ", ";\n flex-shrink: 0;\n align-self: stretch;\n border-bottom: ", ";\n\n ", "\n\n padding: ", "\n ", ";\n font-size: ", "px;\n background: ", ";\n color: ", ";\n border-color: ", ";\n transition: background-color 0.2s ease-out;\n opacity: ", ";\n pointer-events: ", ";\n cursor: ", ";\n\n ", "\n\n ", "\n\n /* ------------------------------------------------------------------\n A cell contains what it is given.\n\n These rules used to name p.reqore-table-text \u2014 the paragraph the\n table's own 'text' / 'number' / 'time-ago' cell renderers produce \u2014 so\n they reached exactly the content the table had written itself.\n Everything else got nothing: the 'title' renderer (a heading), the\n 'tag' renderer, and every element a caller's own cell content function\n returns, which is how a real table fills a cell. Those elements laid\n themselves out at their natural size, and since a body row is drawn at\n ONE height \u2014 decided before any of this is laid out, because a\n virtualised list has to know it up front \u2014 a paragraph of prose simply\n painted over the rows beneath it. Two and three descriptions\n overprinted each other and none of them could be read.\n\n So the rules are about the cell's content, whatever that content is:\n\n - min-width 0, because a flex item's automatic minimum size is its\n MIN-CONTENT width, which for one long unbreakable token (a URL, an\n id) is the whole token. That minimum beats max-width, which is why\n capping a link's width at the call site did not hold it: the address\n of one row printed across the next column's chips.\n - max-width and max-height of 100%, so the content is bounded by the\n box it is in, on both axes, whatever it is.\n - and, when the cell does not wrap, one line ending in an ellipsis.\n\n Wrapping is the other honest answer: wrap turns virtualisation off (see\n IReqoreTableProps), every row is then drawn at the height of its own\n content, and the whole value is on screen instead of a line of it. A\n wrapped cell still needs a break opportunity inside a long token, or it\n overflows sideways for the same reason as above. ----------------- */\n > * {\n min-width: 0;\n max-width: 100%;\n }\n\n ", "\n\n ", "\n\n p.reqore-table-text {\n margin: 0;\n padding: 0;\n }\n "], ["\n box-sizing: border-box;\n display: flex;\n align-items: ", ";\n justify-content: ", ";\n flex-shrink: 0;\n align-self: stretch;\n border-bottom: ", ";\n\n ", "\n\n padding: ", "\n ", ";\n font-size: ", "px;\n background: ", ";\n color: ", ";\n border-color: ", ";\n transition: background-color 0.2s ease-out;\n opacity: ", ";\n pointer-events: ", ";\n cursor: ", ";\n\n ", "\n\n ", "\n\n /* ------------------------------------------------------------------\n A cell contains what it is given.\n\n These rules used to name p.reqore-table-text \u2014 the paragraph the\n table's own 'text' / 'number' / 'time-ago' cell renderers produce \u2014 so\n they reached exactly the content the table had written itself.\n Everything else got nothing: the 'title' renderer (a heading), the\n 'tag' renderer, and every element a caller's own cell content function\n returns, which is how a real table fills a cell. Those elements laid\n themselves out at their natural size, and since a body row is drawn at\n ONE height \u2014 decided before any of this is laid out, because a\n virtualised list has to know it up front \u2014 a paragraph of prose simply\n painted over the rows beneath it. Two and three descriptions\n overprinted each other and none of them could be read.\n\n So the rules are about the cell's content, whatever that content is:\n\n - min-width 0, because a flex item's automatic minimum size is its\n MIN-CONTENT width, which for one long unbreakable token (a URL, an\n id) is the whole token. That minimum beats max-width, which is why\n capping a link's width at the call site did not hold it: the address\n of one row printed across the next column's chips.\n - max-width and max-height of 100%, so the content is bounded by the\n box it is in, on both axes, whatever it is.\n - and, when the cell does not wrap, one line ending in an ellipsis.\n\n Wrapping is the other honest answer: wrap turns virtualisation off (see\n IReqoreTableProps), every row is then drawn at the height of its own\n content, and the whole value is on screen instead of a line of it. A\n wrapped cell still needs a break opportunity inside a long token, or it\n overflows sideways for the same reason as above. ----------------- */\n > * {\n min-width: 0;\n max-width: 100%;\n }\n\n ", "\n\n ", "\n\n p.reqore-table-text {\n margin: 0;\n padding: 0;\n }\n "])), maxHeight ? 'flex-start' : 'center', align ? (0, utils_1.alignToFlexAlign)(align) : 'flex-start', !flat ? '1px solid ' : undefined, maxHeight && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n max-height: ", "px;\n overflow: hidden;\n "], ["\n position: relative;\n max-height: ", "px;\n overflow: hidden;\n "])), maxHeight), !padded || padded === 'both' || padded === 'vertical' ? (wrap ? '6px' : 0) : undefined, !padded || padded === 'both' || padded === 'horizontal'
|
|
141
|
+
return (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n align-items: ", ";\n justify-content: ", ";\n flex-shrink: 0;\n align-self: stretch;\n border-bottom: ", ";\n\n ", "\n\n padding: ", "\n ", ";\n font-size: ", "px;\n background: ", ";\n /* Read against the cell as it is drawn - its wash over what the table is drawn on - not\n against the colour the wash is made from. */\n color: ", ";\n border-color: ", ";\n transition: background-color 0.2s ease-out;\n opacity: ", ";\n pointer-events: ", ";\n cursor: ", ";\n\n ", "\n\n ", "\n\n /* ------------------------------------------------------------------\n A cell contains what it is given.\n\n These rules used to name p.reqore-table-text \u2014 the paragraph the\n table's own 'text' / 'number' / 'time-ago' cell renderers produce \u2014 so\n they reached exactly the content the table had written itself.\n Everything else got nothing: the 'title' renderer (a heading), the\n 'tag' renderer, and every element a caller's own cell content function\n returns, which is how a real table fills a cell. Those elements laid\n themselves out at their natural size, and since a body row is drawn at\n ONE height \u2014 decided before any of this is laid out, because a\n virtualised list has to know it up front \u2014 a paragraph of prose simply\n painted over the rows beneath it. Two and three descriptions\n overprinted each other and none of them could be read.\n\n So the rules are about the cell's content, whatever that content is:\n\n - min-width 0, because a flex item's automatic minimum size is its\n MIN-CONTENT width, which for one long unbreakable token (a URL, an\n id) is the whole token. That minimum beats max-width, which is why\n capping a link's width at the call site did not hold it: the address\n of one row printed across the next column's chips.\n - max-width and max-height of 100%, so the content is bounded by the\n box it is in, on both axes, whatever it is.\n - and, when the cell does not wrap, one line ending in an ellipsis.\n\n Wrapping is the other honest answer: wrap turns virtualisation off (see\n IReqoreTableProps), every row is then drawn at the height of its own\n content, and the whole value is on screen instead of a line of it. A\n wrapped cell still needs a break opportunity inside a long token, or it\n overflows sideways for the same reason as above. ----------------- */\n > * {\n min-width: 0;\n max-width: 100%;\n }\n\n ", "\n\n ", "\n\n p.reqore-table-text {\n margin: 0;\n padding: 0;\n }\n "], ["\n box-sizing: border-box;\n display: flex;\n align-items: ", ";\n justify-content: ", ";\n flex-shrink: 0;\n align-self: stretch;\n border-bottom: ", ";\n\n ", "\n\n padding: ", "\n ", ";\n font-size: ", "px;\n background: ", ";\n /* Read against the cell as it is drawn - its wash over what the table is drawn on - not\n against the colour the wash is made from. */\n color: ", ";\n border-color: ", ";\n transition: background-color 0.2s ease-out;\n opacity: ", ";\n pointer-events: ", ";\n cursor: ", ";\n\n ", "\n\n ", "\n\n /* ------------------------------------------------------------------\n A cell contains what it is given.\n\n These rules used to name p.reqore-table-text \u2014 the paragraph the\n table's own 'text' / 'number' / 'time-ago' cell renderers produce \u2014 so\n they reached exactly the content the table had written itself.\n Everything else got nothing: the 'title' renderer (a heading), the\n 'tag' renderer, and every element a caller's own cell content function\n returns, which is how a real table fills a cell. Those elements laid\n themselves out at their natural size, and since a body row is drawn at\n ONE height \u2014 decided before any of this is laid out, because a\n virtualised list has to know it up front \u2014 a paragraph of prose simply\n painted over the rows beneath it. Two and three descriptions\n overprinted each other and none of them could be read.\n\n So the rules are about the cell's content, whatever that content is:\n\n - min-width 0, because a flex item's automatic minimum size is its\n MIN-CONTENT width, which for one long unbreakable token (a URL, an\n id) is the whole token. That minimum beats max-width, which is why\n capping a link's width at the call site did not hold it: the address\n of one row printed across the next column's chips.\n - max-width and max-height of 100%, so the content is bounded by the\n box it is in, on both axes, whatever it is.\n - and, when the cell does not wrap, one line ending in an ellipsis.\n\n Wrapping is the other honest answer: wrap turns virtualisation off (see\n IReqoreTableProps), every row is then drawn at the height of its own\n content, and the whole value is on screen instead of a line of it. A\n wrapped cell still needs a break opportunity inside a long token, or it\n overflows sideways for the same reason as above. ----------------- */\n > * {\n min-width: 0;\n max-width: 100%;\n }\n\n ", "\n\n ", "\n\n p.reqore-table-text {\n margin: 0;\n padding: 0;\n }\n "])), maxHeight ? 'flex-start' : 'center', align ? (0, utils_1.alignToFlexAlign)(align) : 'flex-start', !flat ? '1px solid ' : undefined, maxHeight && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n max-height: ", "px;\n overflow: hidden;\n "], ["\n position: relative;\n max-height: ", "px;\n overflow: hidden;\n "])), maxHeight), !padded || padded === 'both' || padded === 'vertical' ? (wrap ? '6px' : 0) : undefined, !padded || padded === 'both' || padded === 'horizontal'
|
|
129
142
|
? "".concat(helpers_1.TABLE_CELL_HORIZONTAL_PADDING_PX, "px")
|
|
130
|
-
: undefined, sizes_1.TEXT_FROM_SIZE[size], pinnedBackground !== null && pinnedBackground !== void 0 ? pinnedBackground : (backgroundColor === 'transparent' ? 'transparent' : displayedBackgroundColor), (0, colors_1.getReadableColorFrom)(
|
|
143
|
+
: undefined, sizes_1.TEXT_FROM_SIZE[size], pinnedBackground !== null && pinnedBackground !== void 0 ? pinnedBackground : (backgroundColor === 'transparent' ? 'transparent' : displayedBackgroundColor), $color !== null && $color !== void 0 ? $color : (0, colors_1.getReadableColorFrom)(getTableCellBackground({ theme: theme, pin: pin }, paint, $surface), !hovered), (0, colors_1.changeLightness)(displayedBackgroundColor, 0.1), disabled ? 0.2 : 1, disabled ? 'none' : undefined, interactive || interactiveCell ? 'pointer' : 'default', pin && (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: sticky;\n ", "\n z-index: 2;\n ", "\n "], ["\n position: sticky;\n ", "\n z-index: 2;\n ", "\n "])), pin === 'left' ? "left: ".concat(pinOffset || 0, "px;") : "right: ".concat(pinOffset || 0, "px;"), pinEdge && (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n /* Use a pseudo-element instead of box-shadow so the shadow is strictly bounded to\n the cell's height \u2014 a blurred box-shadow bleeds vertically and stacks across\n neighboring pinned cells, producing dark bands between rows. */\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n width: 12px;\n pointer-events: none;\n ", "\n background: linear-gradient(\n to ", ",\n rgba(0, 0, 0, 0.35),\n rgba(0, 0, 0, 0)\n );\n }\n "], ["\n /* Use a pseudo-element instead of box-shadow so the shadow is strictly bounded to\n the cell's height \u2014 a blurred box-shadow bleeds vertically and stacks across\n neighboring pinned cells, producing dark bands between rows. */\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n width: 12px;\n pointer-events: none;\n ", "\n background: linear-gradient(\n to ", ",\n rgba(0, 0, 0, 0.35),\n rgba(0, 0, 0, 0)\n );\n }\n "])), pin === 'left' ? 'right: -12px;' : 'left: -12px;', pin === 'left' ? 'right' : 'left')), interactiveCell && (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n &:hover {\n /* Pinned cells rely on the layered background shorthand for their opaque base \u2014\n overriding just background-color would lose theme.main and let the non-pinned\n cells scrolling underneath show through on hover. */\n ", "\n }\n "], ["\n &:hover {\n /* Pinned cells rely on the layered background shorthand for their opaque base \u2014\n overriding just background-color would lose theme.main and let the non-pinned\n cells scrolling underneath show through on hover. */\n ", "\n }\n "])), pin
|
|
131
144
|
? (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background: linear-gradient(\n ", ",\n ", "\n ),\n ", ";\n "], ["\n background: linear-gradient(\n ", ",\n ", "\n ),\n ", ";\n "])), (0, polished_1.lighten)(0.1, displayedBackgroundColor), (0, polished_1.lighten)(0.1, displayedBackgroundColor), theme.main) : (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n "], ["\n background-color: ", ";\n "])), (0, polished_1.lighten)(0.1, displayedBackgroundColor))), !maxHeight && (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n /* Bound the content to the cell's own height.\n\n Left to a cell that clips itself \u2014 the maxHeight clamp above \u2014 this\n would take its job away rather than help: that clamp shows a Show\n more button, and it knows to show it by asking whether its content is\n TALLER than it is. Content pre-shrunk to fit is content with nothing\n more to show, so the button never appeared and the rest of the value\n became unreachable.\n\n Everywhere else the bound is what holds a cell's content to its row.\n It is inert while wrapping does what it says, because the row is then\n as tall as its tallest cell and that cell's content is already\n exactly that tall. It bites where wrapping CANNOT make the row taller\n \u2014 wrap together with an explicit virtualized, which the table warns\n about \u2014 and in the ordinary case below, where it holds anything the\n ellipsis does not reach: a group of chips that wrapped, an image. */\n > * {\n max-height: 100%;\n overflow: hidden;\n }\n "], ["\n /* Bound the content to the cell's own height.\n\n Left to a cell that clips itself \u2014 the maxHeight clamp above \u2014 this\n would take its job away rather than help: that clamp shows a Show\n more button, and it knows to show it by asking whether its content is\n TALLER than it is. Content pre-shrunk to fit is content with nothing\n more to show, so the button never appeared and the rest of the value\n became unreachable.\n\n Everywhere else the bound is what holds a cell's content to its row.\n It is inert while wrapping does what it says, because the row is then\n as tall as its tallest cell and that cell's content is already\n exactly that tall. It bites where wrapping CANNOT make the row taller\n \u2014 wrap together with an explicit virtualized, which the table warns\n about \u2014 and in the ordinary case below, where it holds anything the\n ellipsis does not reach: a group of chips that wrapped, an image. */\n > * {\n max-height: 100%;\n overflow: hidden;\n }\n "]))), wrap
|
|
132
145
|
? (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n > * {\n word-break: break-word;\n overflow-wrap: anywhere;\n }\n\n p.reqore-table-text {\n white-space: normal;\n }\n "], ["\n > * {\n word-break: break-word;\n overflow-wrap: anywhere;\n }\n\n p.reqore-table-text {\n white-space: normal;\n }\n "]))) : (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n > * {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n "], ["\n > * {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n "]))));
|
|
133
146
|
});
|
|
@@ -172,7 +185,25 @@ exports.ReqoreTableBodyCell = (0, react_1.memo)((0, react_1.forwardRef)(function
|
|
|
172
185
|
}, [maxHeight, expanded, children]);
|
|
173
186
|
var effectiveMaxHeight = expanded ? undefined : maxHeight;
|
|
174
187
|
var showOverlay = !!maxHeight && !expanded && isOverflowing;
|
|
175
|
-
|
|
188
|
+
var surface = (0, SurfaceContext_1.useReqoreSurface)();
|
|
189
|
+
var contextTheme = (0, styled_components_1.useTheme)();
|
|
190
|
+
var _d = cellStyleProps, themeProp = _d.theme, intent = _d.intent, selected = _d.selected, selectedIntent = _d.selectedIntent, striped = _d.striped, even = _d.even, hovered = _d.hovered, pin = _d.pin;
|
|
191
|
+
// The theme its styles are given: its own, when it is handed one, else the table's.
|
|
192
|
+
var theme = themeProp || contextTheme;
|
|
193
|
+
/* Its paint, what it is drawn in and its text color, worked out once for as long as what decides them
|
|
194
|
+
holds - not on every render, nor again in its styles. What the cell holds is drawn on the cell. */
|
|
195
|
+
var paint = (0, react_1.useMemo)(function () {
|
|
196
|
+
return (theme === null || theme === void 0 ? void 0 : theme.main)
|
|
197
|
+
? getTableCellPaint({ theme: theme, intent: intent, selected: selected, selectedIntent: selectedIntent, striped: striped, even: even, hovered: hovered, pin: pin })
|
|
198
|
+
: undefined;
|
|
199
|
+
}, [theme, intent, selected, selectedIntent, striped, even, hovered, pin]);
|
|
200
|
+
var cellSurface = (0, react_1.useMemo)(function () { return (paint ? getTableCellBackground({ theme: theme, pin: pin }, paint, surface) : surface); }, [paint, theme, pin, surface]);
|
|
201
|
+
var cellText = (0, react_1.useMemo)(function () {
|
|
202
|
+
return paint ? (0, colors_1.getReadableColorFrom)(cellSurface, !hovered) : undefined;
|
|
203
|
+
}, [paint, cellSurface, hovered]);
|
|
204
|
+
return ((0, jsx_runtime_1.jsxs)(TooltipComponent_1.ReqoreTooltipComponent, __assign({ Component: exports.StyledTableCell }, cellStyleProps, { "aria-disabled": cellStyleProps.disabled
|
|
205
|
+
? true
|
|
206
|
+
: cellStyleProps['aria-disabled'], "$surface": surface, "$paint": paint, "$color": cellText, maxHeight: effectiveMaxHeight, ref: setRefs, children: [(0, jsx_runtime_1.jsx)(SurfaceContext_1.ReqoreSurfaceProvider, { color: cellSurface, children: children }), showOverlay && ((0, jsx_runtime_1.jsx)(StyledCellExpandOverlay, { className: 'reqore-table-cell-expand', onClick: function (e) { return e.stopPropagation(); }, children: (0, jsx_runtime_1.jsx)(Button_1.default, __assign({ compact: true, size: size === 'micro' || size === 'tiny' ? 'tiny' : 'small', rightIcon: 'ArrowDownSLine' }, expandHeightButtonProps, { onClick: function (e) {
|
|
176
207
|
var _a;
|
|
177
208
|
e.stopPropagation();
|
|
178
209
|
(_a = expandHeightButtonProps === null || expandHeightButtonProps === void 0 ? void 0 : expandHeightButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(expandHeightButtonProps, e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell.js","sourceRoot":"","sources":["../../../src/components/Table/cell.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyC;AACzC,+
|
|
1
|
+
{"version":3,"file":"cell.js","sourceRoot":"","sources":["../../../src/components/Table/cell.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAyC;AACzC,+BAAkG;AAClG,uDAAkD;AAElD,+CAA+D;AAE/D,+CAM8B;AAC9B,+DAAuF;AACvF,6DAA8D;AAC9D,6CAAuD;AACvD,qCAA6D;AAE7D,qDAA6D;AAE7D,wDAA6D;AAyC7D;;;;GAIG;AACH,IAAM,iBAAiB,GAAG,UAAC,EASE;QAR3B,KAAK,WAAA,EACL,MAAM,YAAA,EACN,QAAQ,cAAA,EACR,cAAc,oBAAA,EACd,OAAO,aAAA,EACP,IAAI,UAAA,EACJ,OAAO,aAAA,EACP,GAAG,SAAA;IAEH,IAAM,KAAK,GACT,MAAM,IAAI,CAAC,QAAQ,IAAI,cAAc,CAAC;QACpC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,IAAI,cAAc,CAAC;QACzC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;IACjB,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,sBAAsB;IACtB,IAAI,MAAM,IAAI,CAAC,QAAQ,IAAI,cAAc,CAAC,EAAE,CAAC;QAC3C,OAAO,IAAI,IAAI,CAAC;IAClB,CAAC;IACD,wCAAwC;IACxC,IAAI,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QACrB,OAAO,IAAI,IAAI,CAAC;IAClB,CAAC;I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0BAA0B,EACpC,OAAO,EAAE,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,eAAe,EAAE,EAAnB,CAAmB,YAEnC,uBAAC,gBAAY,aACX,OAAO,QACP,IAAI,EAAE,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAC5D,SAAS,EAAC,gBAAgB,IACtB,uBAAuB,IAC3B,OAAO,EAAE,UAAC,CAAC;;wBACT,CAAC,CAAC,eAAe,EAAE,CAAC;wBACpB,MAAA,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,OAAO,wEAAG,CAAC,CAAC,CAAC;wBACtC,WAAW,CAAC,IAAI,CAAC,CAAC;oBACpB,CAAC,YAEA,MAAA,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,QAAQ,mCAAI,WAAW,IACpC,GACS,CAC3B,KACsB,CAC1B,CAAC;AACJ,CAAC,CACF,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headerCell.d.ts","sourceRoot":"","sources":["../../../src/components/Table/headerCell.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"headerCell.d.ts","sourceRoot":"","sources":["../../../src/components/Table/headerCell.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD,OAAqB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAK7D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,2BACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,MAAM,CA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,eAAO,MAAM,cAAc,KAE1B,CAAC;AA4DF,eAAO,MAAM,qBAAqB,8eAuC7B,2BAA2B,6CAqT/B,CAAC"}
|
|
@@ -47,6 +47,7 @@ var react_1 = require("react");
|
|
|
47
47
|
var styled_components_1 = require("styled-components");
|
|
48
48
|
var styled_1 = __importDefault(require("../../helpers/styled"));
|
|
49
49
|
var __1 = require("../..");
|
|
50
|
+
var SurfaceContext_1 = require("../../context/SurfaceContext");
|
|
50
51
|
var colors_1 = require("../../helpers/colors");
|
|
51
52
|
var utils_1 = require("../../helpers/utils");
|
|
52
53
|
var Button_1 = __importDefault(require("../Button"));
|
|
@@ -177,10 +178,11 @@ exports.ReqoreTableHeaderCell = (0, react_1.memo)(function (_a) {
|
|
|
177
178
|
otherActionsLabel,
|
|
178
179
|
]);
|
|
179
180
|
var theme = (0, styled_components_1.useTheme)();
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
var surface = (0, SurfaceContext_1.useReqoreSurface)();
|
|
182
|
+
/* A pinned header cell is drawn over the header cells that scroll under it, so it paints what the
|
|
183
|
+
header row is drawn on - opaque, as a pinned body cell is - and looks like the cells beside it at
|
|
184
|
+
rest. Without it the cells passing under showed through ("ORDER DA" under "ACTIONS"). */
|
|
185
|
+
var pinnedFill = (0, react_1.useMemo)(function () { return (pin && (theme === null || theme === void 0 ? void 0 : theme.main) ? (0, colors_1.getThemeSurface)(theme, surface) : undefined); }, [pin, theme, surface]);
|
|
184
186
|
var pinStyle = pin
|
|
185
187
|
? (_b = {
|
|
186
188
|
position: 'sticky'
|
|
@@ -254,7 +256,7 @@ exports.ReqoreTableHeaderCell = (0, react_1.memo)(function (_a) {
|
|
|
254
256
|
height: undefined,
|
|
255
257
|
}, enable: {
|
|
256
258
|
right: resizable,
|
|
257
|
-
}, children: (0, jsx_runtime_1.jsx)(
|
|
259
|
+
}, children: (0, jsx_runtime_1.jsx)(SurfaceContext_1.ReqoreSurfaceProvider, { color: pinnedFill, children: (0, jsx_runtime_1.jsxs)(__1.ReqoreControlGroup, { fluid: true, stack: true, rounded: false, fill: true, style: { height: '100%' }, children: [content ? (content) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, size_1.default)(items) ? ((0, jsx_runtime_1.jsx)(__1.ReqoreDropdown, __assign({ className: "".concat(className || '', " reqore-table-header-cell-options reqore-table-header-cell"), compact: true, size: size, rounded: false, filterable: filterable, filterPlaceholder: filterPlaceholder || columnFilterPlaceholder, filter: filter, onFilterChange: handleFilterChange, items: items, showCaret: false, textAlign: align, readOnlyOnEmpty: true, onBeforeOpen: opensUnlessSorting, inputProps: filterInputProps, onClick: handleClick, labelEffect: baseHeaderEffect }, rest, { effect: menuEffect }))) : ((0, jsx_runtime_1.jsx)(Button_1.default, __assign({ className: "".concat(className || '', " reqore-table-header-cell-options reqore-table-header-cell"), compact: true, size: size, rounded: false, textAlign: align, onClick: handleClick }, rest, { effect: buttonEffect }))) })), content && (filterable || hideable || resizable) ? ((0, jsx_runtime_1.jsx)(__1.ReqoreDropdown, { icon: 'More2Line', className: 'reqore-table-header-cell-options', fixed: true, compact: true, buttonStyle: OPTIONS_BUTTON_STYLE, size: size, rounded: false, intent: filter || sortData.by === dataId ? 'info' : rest.intent, filterable: filterable, filterPlaceholder: filterPlaceholder || columnFilterPlaceholder, filter: filter, inputProps: filterInputProps, onFilterChange: handleFilterChange, items: items })) : null] }) }) })));
|
|
258
260
|
});
|
|
259
261
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
260
262
|
//# sourceMappingURL=headerCell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headerCell.js","sourceRoot":"","sources":["../../../src/components/Table/headerCell.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAgC;AAChC,qCAAgC;AAChC,6CAAyC;AACzC,+BAAmD;AACnD,uDAAkD;AAClD,gEA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B,EAC/D,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,gBAAgB,EAC5B,cAAc,EAAE,kBAAkB,EAClC,KAAK,EAAE,KAAK,GACZ,CACH,CAAC,CAAC,CAAC,IAAI,IACW,GACC,IACF,CACzB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from 'react';
|
|
2
2
|
import { TSizes } from '../../constants/sizes';
|
|
3
3
|
import { IReqoreTheme, TReqoreIntent } from '../../constants/theme';
|
|
4
|
+
import { TReqoreSurface } from '../../helpers/colors';
|
|
4
5
|
import { TReqoreStylePropKeys } from '../../helpers/styled';
|
|
5
6
|
import { IReqoreDisabled, IReqoreIntent, IReqoreReadOnly, IWithReqoreCustomTheme, IWithReqoreEffect, IWithReqoreFlat, IWithReqoreFluid, IWithReqoreLoading, IWithReqoreMinimal, IWithReqoreTooltip } from '../../types/global';
|
|
6
7
|
import { IReqoreIconName } from '../../types/icons';
|
|
@@ -27,9 +28,67 @@ export interface IReqoreTagAppearanceColors {
|
|
|
27
28
|
border?: string;
|
|
28
29
|
/** Behind the `labelKey` half of a key/value tag. */
|
|
29
30
|
keyBackground: string;
|
|
31
|
+
/** The key's text and icon: the label's colour at a shade that reads on the key's background too. */
|
|
32
|
+
keyText: TReqoreHexColor;
|
|
33
|
+
/** What the label is drawn on, as drawn (the wash over the theme's surface), for its icons. */
|
|
34
|
+
drawnBackground: TReqoreHexColor;
|
|
35
|
+
/** Every color the label is drawn on, as drawn: the wash over each color of a gradient surface. */
|
|
36
|
+
drawnBackgrounds: TReqoreHexColor[];
|
|
37
|
+
/** What the key is drawn on, as drawn. */
|
|
38
|
+
drawnKeyBackground: TReqoreHexColor;
|
|
39
|
+
/** Every color the key is drawn on, as drawn. */
|
|
40
|
+
drawnKeyBackgrounds: TReqoreHexColor[];
|
|
30
41
|
/** Behind the remove button and actions on hover. */
|
|
31
42
|
buttonHoverBackground: string;
|
|
32
43
|
}
|
|
44
|
+
/** The colours a solid tag is drawn in: what its label and its key are drawn on, as drawn, and their text. */
|
|
45
|
+
export interface IReqoreTagSolidColors {
|
|
46
|
+
/** The tag's fill as drawn: one colour, or each colour of its gradient. */
|
|
47
|
+
backgrounds: TReqoreHexColor[];
|
|
48
|
+
/** The key beside the label, darker than the fill. The same as `backgrounds` with no `labelKey`. */
|
|
49
|
+
keyBackgrounds: TReqoreHexColor[];
|
|
50
|
+
/** What darkens the key: black, translucent. */
|
|
51
|
+
keyShade: string;
|
|
52
|
+
/** The label, which reads on the fill. */
|
|
53
|
+
text: TReqoreHexColor;
|
|
54
|
+
/** The key, which reads on its darker background. */
|
|
55
|
+
keyText: TReqoreHexColor;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* What a solid tag is drawn on and in, at rest or hovered: its fill as drawn over the theme's surface (a minimal
|
|
59
|
+
* tag's wash, a translucent colour, each colour of a gradient), the key darkened over it, and a label and a key
|
|
60
|
+
* that read on them. A minimal tag with a colour keeps the colour in its label, in a shade that reads.
|
|
61
|
+
*/
|
|
62
|
+
export declare const getTagSolidColors: (theme: IReqoreTheme, color: TReqoreColor | undefined, minimal: boolean | undefined, labelKey: boolean, effect: IReqoreEffect | undefined, hovered?: boolean, surface?: TReqoreSurface) => IReqoreTagSolidColors;
|
|
63
|
+
/** What a tag's styles paint it with, worked out once per render (`getTagPaint`), not in each style rule. */
|
|
64
|
+
export interface IReqoreTagPaint {
|
|
65
|
+
/** The edge drawn with `flat={false}`. */
|
|
66
|
+
edge: string;
|
|
67
|
+
/** The ring drawn when the tag is focused or pressed. */
|
|
68
|
+
outline: string;
|
|
69
|
+
/** A solid tag only (none for a soft or text one): its fill and the text on it, at rest and hovered. */
|
|
70
|
+
rest?: {
|
|
71
|
+
background: string;
|
|
72
|
+
text: TReqoreHexColor;
|
|
73
|
+
keyShade: string;
|
|
74
|
+
keyText: TReqoreHexColor;
|
|
75
|
+
};
|
|
76
|
+
hover?: {
|
|
77
|
+
background: string;
|
|
78
|
+
text: TReqoreHexColor;
|
|
79
|
+
keyText: TReqoreHexColor;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Everything a tag is painted with (`IReqoreTagPaint`), and the solid colours it is worked out from: `resting`,
|
|
84
|
+
* and `hovered` when the tag answers the pointer. A soft or text tag (`solid` false) has its own colours
|
|
85
|
+
* (`getTagAppearanceColors`), so none of the solid ones are worked out for it.
|
|
86
|
+
*/
|
|
87
|
+
export declare const getTagPaint: (theme: IReqoreTheme, color: TReqoreHexColor | undefined, minimal: boolean | undefined, labelKey: boolean, effect: IReqoreEffect | undefined, interactive: boolean, surface: TReqoreSurface | undefined, solid: boolean) => {
|
|
88
|
+
paint: IReqoreTagPaint;
|
|
89
|
+
resting?: IReqoreTagSolidColors;
|
|
90
|
+
hovered?: IReqoreTagSolidColors;
|
|
91
|
+
};
|
|
33
92
|
/** Share of the colour laid over the surface behind a soft tag. */
|
|
34
93
|
export declare const TAG_SOFT_BACKGROUND_OPACITY = 0.2;
|
|
35
94
|
/**
|
|
@@ -40,9 +99,12 @@ export declare const TAG_SOFT_BACKGROUND_OPACITY = 0.2;
|
|
|
40
99
|
* is the tag's own colour pushed lighter (dark theme) or darker (light theme) until it
|
|
41
100
|
* reaches a 4.5:1 contrast there — a green label stays green, only a shade that reads.
|
|
42
101
|
* With no colour at all the tag is neutral: the surface's readable text colour plays
|
|
43
|
-
* the part of the colour.
|
|
102
|
+
* the part of the colour. The surface is `drawnOn` when the tag knows what it is drawn on
|
|
103
|
+
* (`useReqoreSurface`; every colour of a gradient), the theme's surface otherwise
|
|
104
|
+
* (`getThemeSurfaces`). A colour the helpers cannot read (a CSS variable) is drawn as it
|
|
105
|
+
* is given: the label in it, over a wash of it the browser mixes.
|
|
44
106
|
*/
|
|
45
|
-
export declare const getTagAppearanceColors: (theme: IReqoreTheme, appearance: Exclude<TReqoreTagAppearance, "solid">, color?: TReqoreColor) => IReqoreTagAppearanceColors;
|
|
107
|
+
export declare const getTagAppearanceColors: (theme: IReqoreTheme, appearance: Exclude<TReqoreTagAppearance, "solid">, color?: TReqoreColor, drawnOn?: TReqoreSurface) => IReqoreTagAppearanceColors;
|
|
46
108
|
export interface IReqoreTagAction extends IWithReqoreTooltip, IReqoreDisabled, IReqoreIntent, HTMLAttributes<HTMLSpanElement> {
|
|
47
109
|
icon: IReqoreIconName;
|
|
48
110
|
show?: boolean | 'hover';
|
|
@@ -186,7 +248,11 @@ export interface IReqoreTagStyle extends IReqoreTagProps {
|
|
|
186
248
|
$capped?: boolean;
|
|
187
249
|
/** Set for a `soft` or `text` tag only: a solid tag keeps its original rules. */
|
|
188
250
|
$appearance?: TReqoreTagAppearance;
|
|
251
|
+
/** What the tag is drawn on (`useReqoreSurface`): the theme's surface when not known. */
|
|
252
|
+
$surface?: TReqoreSurface;
|
|
189
253
|
$appearanceColors?: IReqoreTagAppearanceColors;
|
|
254
|
+
/** What the tag is painted with, worked out once per render (`getTagPaint`). */
|
|
255
|
+
$paint?: IReqoreTagPaint;
|
|
190
256
|
}
|
|
191
257
|
/**
|
|
192
258
|
* Every tag prop that only styles or configures the tag. None of them reaches the rendered
|
|
@@ -195,6 +261,7 @@ export interface IReqoreTagStyle extends IReqoreTagProps {
|
|
|
195
261
|
*/
|
|
196
262
|
export declare const REQORE_TAG_STYLE_PROPS: TReqoreStylePropKeys<IReqoreTagStyle, React.HTMLAttributes<HTMLSpanElement>>[];
|
|
197
263
|
export declare const StyledTag: any;
|
|
198
|
-
|
|
264
|
+
/** A memo component, as Reqore's components are: a tag re-renders when its props or what it reads change. */
|
|
265
|
+
declare const ReqoreTag: React.MemoExoticComponent<(props: IReqoreTagProps & React.RefAttributes<HTMLSpanElement>) => React.ReactElement | null>;
|
|
199
266
|
export default ReqoreTag;
|
|
200
267
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAc,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAc,cAAc,EAA8B,MAAM,OAAO,CAAC;AAKtF,OAAO,EAaL,MAAM,EACP,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAeL,cAAc,EACf,MAAM,sBAAsB,CAAC;AAE9B,OAAe,EAIb,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAGL,aAAa,EAGb,YAAY,EACZ,kBAAkB,EAClB,eAAe,EAChB,MAAM,WAAW,CAAC;AACnB,OAAmB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGvD;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7D,oFAAoF;AACpF,MAAM,WAAW,0BAA0B;IACzC,uFAAuF;IACvF,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAC;IACtB,qGAAqG;IACrG,OAAO,EAAE,eAAe,CAAC;IACzB,+FAA+F;IAC/F,eAAe,EAAE,eAAe,CAAC;IACjC,mGAAmG;IACnG,gBAAgB,EAAE,e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