@qoretechnologies/reqore 0.78.24 → 0.78.25-pr.715.g25b6c3d
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 +28 -19
- package/dist/components/Accordion/index.js.map +1 -1
- package/dist/components/Bubble/index.d.ts.map +1 -1
- package/dist/components/Bubble/index.js +3 -2
- package/dist/components/Bubble/index.js.map +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +58 -21
- 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 +25 -12
- 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 +42 -19
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/CollapsibleContent/index.d.ts +12 -0
- package/dist/components/CollapsibleContent/index.d.ts.map +1 -1
- package/dist/components/CollapsibleContent/index.js +37 -16
- package/dist/components/CollapsibleContent/index.js.map +1 -1
- package/dist/components/Collection/index.d.ts +8 -1
- package/dist/components/Collection/index.d.ts.map +1 -1
- package/dist/components/Collection/index.js +34 -21
- package/dist/components/Collection/index.js.map +1 -1
- package/dist/components/Collection/item.js +1 -1
- package/dist/components/Collection/item.js.map +1 -1
- package/dist/components/DataView/index.d.ts +11 -0
- package/dist/components/DataView/index.d.ts.map +1 -1
- package/dist/components/DataView/index.js +40 -22
- package/dist/components/DataView/index.js.map +1 -1
- package/dist/components/DatePicker/index.d.ts +6 -1
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +12 -10
- package/dist/components/DatePicker/index.js.map +1 -1
- package/dist/components/DescriptionList/index.d.ts +7 -0
- package/dist/components/DescriptionList/index.d.ts.map +1 -1
- package/dist/components/DescriptionList/index.js +6 -2
- package/dist/components/DescriptionList/index.js.map +1 -1
- package/dist/components/Drawer/backdrop.d.ts.map +1 -1
- package/dist/components/Drawer/backdrop.js +3 -1
- package/dist/components/Drawer/backdrop.js.map +1 -1
- package/dist/components/Drawer/index.d.ts +17 -0
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +70 -15
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/Dropdown/index.d.ts +11 -0
- package/dist/components/Dropdown/index.d.ts.map +1 -1
- package/dist/components/Dropdown/index.js +10 -3
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/Dropdown/item.js +1 -1
- package/dist/components/Dropdown/item.js.map +1 -1
- package/dist/components/Dropdown/list.d.ts +9 -2
- package/dist/components/Dropdown/list.d.ts.map +1 -1
- package/dist/components/Dropdown/list.js +29 -13
- package/dist/components/Dropdown/list.js.map +1 -1
- package/dist/components/Effect/index.d.ts +6 -0
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/Effect/index.js +26 -21
- 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 +2 -2
- 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 +10 -5
- 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 +11 -3
- 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 +10 -5
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +6 -5
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/InternalPopover/index.d.ts.map +1 -1
- package/dist/components/InternalPopover/index.js +69 -9
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/components/KeyboardShortcut/index.d.ts.map +1 -1
- package/dist/components/KeyboardShortcut/index.js +3 -2
- package/dist/components/KeyboardShortcut/index.js.map +1 -1
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Layout/index.js +6 -2
- package/dist/components/Layout/index.js.map +1 -1
- package/dist/components/Link/index.d.ts.map +1 -1
- package/dist/components/Link/index.js +10 -5
- package/dist/components/Link/index.js.map +1 -1
- package/dist/components/MarkdownBlock/index.d.ts +38 -0
- package/dist/components/MarkdownBlock/index.d.ts.map +1 -0
- package/dist/components/MarkdownBlock/index.js +88 -0
- package/dist/components/MarkdownBlock/index.js.map +1 -0
- package/dist/components/Menu/divider.d.ts.map +1 -1
- package/dist/components/Menu/divider.js +4 -1
- package/dist/components/Menu/divider.js.map +1 -1
- package/dist/components/Menu/index.js +1 -1
- 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 +9 -1
- package/dist/components/Message/index.js.map +1 -1
- package/dist/components/Modal/index.d.ts +24 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +5 -34
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/NavRail/index.d.ts.map +1 -1
- package/dist/components/NavRail/index.js +5 -3
- package/dist/components/NavRail/index.js.map +1 -1
- package/dist/components/Notifications/notification.d.ts.map +1 -1
- package/dist/components/Notifications/notification.js +3 -2
- package/dist/components/Notifications/notification.js.map +1 -1
- package/dist/components/Notifications/styles.d.ts +2 -0
- package/dist/components/Notifications/styles.d.ts.map +1 -1
- package/dist/components/Notifications/styles.js +65 -24
- package/dist/components/Notifications/styles.js.map +1 -1
- package/dist/components/Panel/TitleAndBadges.d.ts +31 -0
- package/dist/components/Panel/TitleAndBadges.d.ts.map +1 -0
- package/dist/components/Panel/TitleAndBadges.js +81 -0
- package/dist/components/Panel/TitleAndBadges.js.map +1 -0
- package/dist/components/Panel/index.d.ts +37 -0
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +249 -96
- 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 +3 -3
- 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 +11 -4
- 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 +1 -1
- package/dist/components/Rating/index.js.map +1 -1
- package/dist/components/SegmentedControl/index.d.ts +24 -1
- package/dist/components/SegmentedControl/index.d.ts.map +1 -1
- package/dist/components/SegmentedControl/index.js +136 -59
- package/dist/components/SegmentedControl/index.js.map +1 -1
- package/dist/components/Select/valuePreview.js +5 -2
- package/dist/components/Select/valuePreview.js.map +1 -1
- package/dist/components/SeverityRow/index.d.ts +12 -4
- package/dist/components/SeverityRow/index.d.ts.map +1 -1
- package/dist/components/SeverityRow/index.js +37 -15
- package/dist/components/SeverityRow/index.js.map +1 -1
- package/dist/components/Spacer/index.js +1 -1
- package/dist/components/Spacer/index.js.map +1 -1
- package/dist/components/Span/index.d.ts.map +1 -1
- package/dist/components/Span/index.js +3 -3
- 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 +8 -2
- package/dist/components/StackedBar/index.js.map +1 -1
- package/dist/components/Statistic/index.d.ts +16 -1
- package/dist/components/Statistic/index.d.ts.map +1 -1
- package/dist/components/Statistic/index.js +7 -5
- package/dist/components/Statistic/index.js.map +1 -1
- package/dist/components/StatisticGroup/index.d.ts +68 -0
- package/dist/components/StatisticGroup/index.d.ts.map +1 -0
- package/dist/components/StatisticGroup/index.js +123 -0
- package/dist/components/StatisticGroup/index.js.map +1 -0
- package/dist/components/Table/body.d.ts.map +1 -1
- package/dist/components/Table/body.js +36 -4
- package/dist/components/Table/body.js.map +1 -1
- package/dist/components/Table/cell.d.ts.map +1 -1
- package/dist/components/Table/cell.js +42 -22
- package/dist/components/Table/cell.js.map +1 -1
- package/dist/components/Table/controls.d.ts +70 -0
- package/dist/components/Table/controls.d.ts.map +1 -0
- package/dist/components/Table/controls.js +137 -0
- package/dist/components/Table/controls.js.map +1 -0
- package/dist/components/Table/header.d.ts +10 -1
- package/dist/components/Table/header.d.ts.map +1 -1
- package/dist/components/Table/header.js +5 -5
- package/dist/components/Table/header.js.map +1 -1
- package/dist/components/Table/headerCell.d.ts +10 -1
- package/dist/components/Table/headerCell.d.ts.map +1 -1
- package/dist/components/Table/headerCell.js +37 -24
- package/dist/components/Table/headerCell.js.map +1 -1
- package/dist/components/Table/helpers.d.ts +36 -3
- package/dist/components/Table/helpers.d.ts.map +1 -1
- package/dist/components/Table/helpers.js +79 -8
- package/dist/components/Table/helpers.js.map +1 -1
- package/dist/components/Table/index.d.ts +67 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +116 -83
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Table/row.d.ts +5 -1
- package/dist/components/Table/row.d.ts.map +1 -1
- package/dist/components/Table/row.js +30 -7
- package/dist/components/Table/row.js.map +1 -1
- package/dist/components/Tabs/index.d.ts +5 -0
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Tabs/item.d.ts.map +1 -1
- package/dist/components/Tabs/item.js +8 -3
- package/dist/components/Tabs/item.js.map +1 -1
- package/dist/components/Tabs/list.d.ts +7 -2
- package/dist/components/Tabs/list.d.ts.map +1 -1
- package/dist/components/Tabs/list.js +28 -16
- package/dist/components/Tabs/list.js.map +1 -1
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +8 -7
- 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 +10 -5
- package/dist/components/Testimonial/index.js.map +1 -1
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +6 -5
- package/dist/components/Textarea/index.js.map +1 -1
- package/dist/components/Tier/index.d.ts +7 -1
- package/dist/components/Tier/index.d.ts.map +1 -1
- package/dist/components/Tier/index.js +10 -9
- package/dist/components/Tier/index.js.map +1 -1
- package/dist/components/Timeline/index.d.ts.map +1 -1
- package/dist/components/Timeline/index.js +4 -3
- package/dist/components/Timeline/index.js.map +1 -1
- package/dist/components/Tree/index.d.ts +18 -1
- package/dist/components/Tree/index.d.ts.map +1 -1
- package/dist/components/Tree/index.js +36 -25
- package/dist/components/Tree/index.js.map +1 -1
- package/dist/components/Tree/modal.d.ts.map +1 -1
- package/dist/components/Tree/modal.js +8 -4
- package/dist/components/Tree/modal.js.map +1 -1
- package/dist/constants/sizes.d.ts +26 -0
- package/dist/constants/sizes.d.ts.map +1 -1
- package/dist/constants/sizes.js +33 -1
- package/dist/constants/sizes.js.map +1 -1
- package/dist/constants/theme.d.ts +128 -0
- package/dist/constants/theme.d.ts.map +1 -1
- package/dist/constants/theme.js.map +1 -1
- package/dist/containers/ReqoreProvider.d.ts +23 -0
- package/dist/containers/ReqoreProvider.d.ts.map +1 -1
- package/dist/containers/ReqoreProvider.js +52 -12
- package/dist/containers/ReqoreProvider.js.map +1 -1
- package/dist/containers/UIProvider.d.ts +4 -1
- package/dist/containers/UIProvider.d.ts.map +1 -1
- package/dist/containers/UIProvider.js +6 -2
- package/dist/containers/UIProvider.js.map +1 -1
- package/dist/context/ReqoreContext.d.ts +16 -0
- package/dist/context/ReqoreContext.d.ts.map +1 -1
- package/dist/context/ReqoreContext.js +3 -0
- package/dist/context/ReqoreContext.js.map +1 -1
- package/dist/helpers/colors.d.ts +18 -1
- package/dist/helpers/colors.d.ts.map +1 -1
- package/dist/helpers/colors.js +34 -3
- package/dist/helpers/colors.js.map +1 -1
- package/dist/helpers/typeScale.d.ts +30 -0
- package/dist/helpers/typeScale.d.ts.map +1 -0
- package/dist/helpers/typeScale.js +34 -0
- package/dist/helpers/typeScale.js.map +1 -0
- package/dist/helpers/utils.d.ts +5 -1
- package/dist/helpers/utils.d.ts.map +1 -1
- package/dist/helpers/utils.js +5 -2
- package/dist/helpers/utils.js.map +1 -1
- package/dist/hooks/useColorDataByType.d.ts +6 -0
- package/dist/hooks/useColorDataByType.d.ts.map +1 -0
- package/dist/hooks/useColorDataByType.js +11 -0
- package/dist/hooks/useColorDataByType.js.map +1 -0
- package/dist/hooks/useFocusTrap.d.ts +12 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +50 -7
- package/dist/hooks/useFocusTrap.js.map +1 -1
- package/dist/hooks/useReqoreEscClose.d.ts +20 -0
- package/dist/hooks/useReqoreEscClose.d.ts.map +1 -0
- package/dist/hooks/useReqoreEscClose.js +44 -0
- package/dist/hooks/useReqoreEscClose.js.map +1 -0
- package/dist/hooks/useUppercaseLabels.d.ts +8 -0
- package/dist/hooks/useUppercaseLabels.d.ts.map +1 -0
- package/dist/hooks/useUppercaseLabels.js +13 -0
- package/dist/hooks/useUppercaseLabels.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -3
- package/dist/index.js.map +1 -1
- package/docs/docs/guides/theming.mdx +15 -0
- package/package.json +1 -1
- package/tests.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/modal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/modal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAMrC,OAAO,EAAE,iBAAiB,EAAe,MAAM,UAAU,CAAC;AAG1D,MAAM,WAAW,2BACf,SAAQ,iBAAiB,EACvB,IAAI,CAAC,gBAAgB,EAAE,aAAa,GAAG,eAAe,CAAC;IACzD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAChC,IAAI,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,CAAC;IACnC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,GAAG,CAAC;QACX,YAAY,CAAC,EAAE;YAAE,GAAG,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,GAAG,CAAA;SAAE,CAAC;KAC9C,KAAK,IAAI,CAAC;IACX,mGAAmG;IACnG,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2FAA2F;IAC3F,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,0BAA0B,GAAI,8LAgBxC,2BAA2B,4CA8F7B,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ReqoreTreeManagementDialog = void 0;
|
|
7
7
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
var react_1 = require("react");
|
|
9
|
+
var useReqoreContext_1 = require("../../hooks/useReqoreContext");
|
|
9
10
|
var __1 = require("../..");
|
|
10
11
|
var Button_1 = __importDefault(require("../Button"));
|
|
11
12
|
var ControlGroup_1 = __importDefault(require("../ControlGroup"));
|
|
@@ -13,12 +14,15 @@ var Input_1 = __importDefault(require("../Input"));
|
|
|
13
14
|
var Modal_1 = require("../Modal");
|
|
14
15
|
var Tag_1 = __importDefault(require("../Tag"));
|
|
15
16
|
var ReqoreTreeManagementDialog = function (_a) {
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
17
|
+
var _b;
|
|
18
|
+
var path = _a.path, parentType = _a.parentType, type = _a.type, data = _a.data, onClose = _a.onClose, onSave = _a.onSave, KeyRenderer = _a.KeyRenderer, ValueRenderer = _a.ValueRenderer, _c = _a.addItemDialogLabel, addItemDialogLabel = _c === void 0 ? 'Adding new item' : _c, _d = _a.updateItemDialogLabel, updateItemDialogLabel = _d === void 0 ? function (p) { return "Updating \"".concat(p, "\""); } : _d, _e = _a.saveLabel, saveLabel = _e === void 0 ? 'Save' : _e, _f = _a.keyLabel, keyLabel = _f === void 0 ? 'Key' : _f, _g = _a.valueLabel, valueLabel = _g === void 0 ? 'Value' : _g, _h = _a.keyPlaceholder, keyPlaceholder = _h === void 0 ? 'Key' : _h, _j = _a.valuePlaceholder, valuePlaceholder = _j === void 0 ? 'Value' : _j;
|
|
19
|
+
var primaryActionIntent = (_b = (0, useReqoreContext_1.useReqoreProperty)('theme')) === null || _b === void 0 ? void 0 : _b.primaryActionIntent;
|
|
20
|
+
var _k = (0, react_1.useState)(data === null || data === void 0 ? void 0 : data.key), key = _k[0], setKey = _k[1];
|
|
21
|
+
var _l = (0, react_1.useState)(data === null || data === void 0 ? void 0 : data.value), value = _l[0], setValue = _l[1];
|
|
19
22
|
return ((0, jsx_runtime_1.jsx)(Modal_1.ReqoreModal, { isOpen: true, label: path ? updateItemDialogLabel(path) : addItemDialogLabel, onClose: onClose, minimal: true, panelSize: 'small', actions: [
|
|
20
23
|
{
|
|
21
|
-
|
|
24
|
+
// The app's primary when the theme names one, else green as before.
|
|
25
|
+
intent: primaryActionIntent !== null && primaryActionIntent !== void 0 ? primaryActionIntent : 'success',
|
|
22
26
|
className: 'reqore-tree-save',
|
|
23
27
|
disabled: type === 'object' ? !key || !value : !value,
|
|
24
28
|
label: saveLabel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../src/components/Tree/modal.tsx"],"names":[],"mappings":";;;;;;;AAAA,+BAAiC;AAEjC,2BAAuC;AACvC,qDAAqC;AACrC,iEAAiD;AACjD,mDAAmC;AACnC,kCAA0D;AAC1D,+CAA+B;AAgCxB,IAAM,0BAA0B,GAAG,UAAC,EAgBb
|
|
1
|
+
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../src/components/Tree/modal.tsx"],"names":[],"mappings":";;;;;;;AAAA,+BAAiC;AAEjC,iEAAiE;AACjE,2BAAuC;AACvC,qDAAqC;AACrC,iEAAiD;AACjD,mDAAmC;AACnC,kCAA0D;AAC1D,+CAA+B;AAgCxB,IAAM,0BAA0B,GAAG,UAAC,EAgBb;;QAf5B,IAAI,UAAA,EACJ,UAAU,gBAAA,EACV,IAAI,UAAA,EACJ,IAAI,UAAA,EACJ,OAAO,aAAA,EACP,MAAM,YAAA,EACN,WAAW,iBAAA,EACX,aAAa,mBAAA,EACb,0BAAsC,EAAtC,kBAAkB,mBAAG,iBAAiB,KAAA,EACtC,6BAAwD,EAAxD,qBAAqB,mBAAG,UAAC,CAAS,IAAK,OAAA,qBAAa,CAAC,OAAG,EAAjB,CAAiB,KAAA,EACxD,iBAAkB,EAAlB,SAAS,mBAAG,MAAM,KAAA,EAClB,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,kBAAoB,EAApB,UAAU,mBAAG,OAAO,KAAA,EACpB,sBAAsB,EAAtB,cAAc,mBAAG,KAAK,KAAA,EACtB,wBAA0B,EAA1B,gBAAgB,mBAAG,OAAO,KAAA;IAE1B,IAAM,mBAAmB,GAAG,MAAA,IAAA,oCAAiB,EAAC,OAA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CAAC,KAAK,CAAC,EAAxB,CAAwB,EAC9C,WAAW,EAAE,gBAAgB,EAC7B,KAAK,QACL,QAAQ,EAAE,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI,GAC1C,CACH,EACD,uBAAC,gBAAY,IACX,KAAK,QACL,SAAS,EAAC,wBAAwB,EAClC,OAAO,EAAE,cAAM,OAAA,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAhD,CAAgD,EAC/D,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC3C,OAAO,QACP,SAAS,EAAC,QAAQ,sBAGL,EACf,uBAAC,gBAAY,IACX,KAAK,QACL,SAAS,EAAC,0BAA0B,EACpC,OAAO,EAAE,cAAM,OAAA,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAhD,CAAgD,EAC/D,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC3C,OAAO,QACP,SAAS,EAAC,QAAQ,EAClB,KAAK,EAAC,OAAO,GACb,IACiB,IACF,CACtB,IACkB,GACT,CACf,CAAC;AACJ,CAAC,CAAC;AA9GW,QAAA,0BAA0B,8BA8GrC"}
|
|
@@ -321,6 +321,32 @@ export declare const RADIUS_FROM_RADIUS_SIZE: {
|
|
|
321
321
|
* and pass those in instead.
|
|
322
322
|
*/
|
|
323
323
|
export declare const resolveRadius: (size: TSizes, radiusSize: TSizes | undefined, sizeScale?: Record<TSizes, number>, radiusScale?: Record<TSizes, number>) => number;
|
|
324
|
+
/**
|
|
325
|
+
* A rounded panel-like container's corner radius: its `radiusSize` when it names one, else the
|
|
326
|
+
* theme's `panel.radius`, else the radius of its `size` (`normal` for a panel). Panels,
|
|
327
|
+
* callouts and accordions read it here — and every place a panel draws an inner curve (a sticky
|
|
328
|
+
* header's top, an accent strip, a media frame) — so a card is one curve wherever it is drawn.
|
|
329
|
+
*/
|
|
330
|
+
export declare const resolvePanelRadius: (theme: {
|
|
331
|
+
panel?: {
|
|
332
|
+
radius?: number;
|
|
333
|
+
};
|
|
334
|
+
} | undefined, radiusSize?: TSizes, size?: TSizes) => number;
|
|
335
|
+
/**
|
|
336
|
+
* The side padding that keeps a rounded container's label clear of its corner: the container's
|
|
337
|
+
* own `padding`, or as much as it takes for the label to start `radius` px in from the outer edge
|
|
338
|
+
* when that is more. `border` is the width of the edge the padding sits inside.
|
|
339
|
+
*
|
|
340
|
+
* Padding steps with the size (8px at `normal`, 6px at `small`) while a corner is the theme's
|
|
341
|
+
* (`panel.radius`) or `radiusSize`'s, so a 14px corner on a small panel put its title 7px in, under
|
|
342
|
+
* the curve. Every container that draws a label against its top-left corner — a panel's title bar,
|
|
343
|
+
* padded content and bottom actions, an accordion's headers, a callout, a statistic, a feature
|
|
344
|
+
* card, a testimonial — pads it through here, and what sits under the label takes the same
|
|
345
|
+
* inset, so the container keeps one left edge. Pass `radius` 0 where the container draws no
|
|
346
|
+
* corner (not rounded, or neither a surface nor an edge), so a bare container keeps its label
|
|
347
|
+
* flush.
|
|
348
|
+
*/
|
|
349
|
+
export declare const clearCorner: (padding: number, radius: number, border?: number) => number;
|
|
324
350
|
export declare const TAG_RADIUS_FROM_SIZE: {
|
|
325
351
|
micro: number;
|
|
326
352
|
tiny: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sizes.d.ts","sourceRoot":"","sources":["../../src/constants/sizes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;AACxF,MAAM,MAAM,QAAQ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|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.WEIGHT_TO_NUMBER = exports.ICON_WRAPPER_FROM_HEADER_SIZE = exports.ICON_FROM_HEADER_SIZE = exports.ACCENT_SIZE_TO_PX = exports.RATING_GAP_FROM_SIZE = exports.GAP_FROM_SIZE = exports.BUBBLE_AVATAR_RADIUS_FROM_SIZE = exports.BUBBLE_RADIUS_FROM_RADIUS_SIZE = exports.BUBBLE_RADIUS_FROM_SIZE = exports.BADGE_RADIUS_FROM_RADIUS_SIZE = exports.BADGE_RADIUS_FROM_SIZE = exports.TAG_RADIUS_FROM_RADIUS_SIZE = exports.TAG_RADIUS_FROM_SIZE = exports.clearCorner = exports.resolvePanelRadius = exports.resolveRadius = exports.RADIUS_FROM_RADIUS_SIZE = exports.RADIUS_FROM_SIZE = exports.CONTROL_VERTICAL_PADDING_MODIFIER_FROM_SIZE = exports.CONTROL_VERTICAL_PADDING_FROM_SIZE = exports.CONTROL_HORIZONTAL_PADDING_FROM_SIZE = exports.TEXTAREA_PADDING_FROM_SIZE = exports.SPECIAL_PADDING_FROM_SIZE = exports.PADDING_FROM_SIZE = exports.HALF_PADDING_FROM_SIZE = exports.ICON_FROM_SIZE = exports.TAG_ICON_FROM_SIZE = exports.TAG_TEXT_FROM_SIZE = exports.CONTROL_TEXT_FROM_SIZE = exports.TEXT_FROM_SIZE = exports.MARGIN_FROM_SIZE = exports.TAG_HORIZONTAL_PADDING_FROM_SIZE = exports.TAG_VERTICAL_PADDING_FROM_SIZE = exports.TABS_PADDING_TO_PX = exports.TOUCH_TARGET_PX = exports.TABLE_SIZE_TO_PX = exports.TABS_SIZE_TO_PX = exports.INDICATOR_SIZE_TO_PX = exports.BADGE_SIZE_TO_PX = exports.TAG_SIZE_TO_PX = exports.SIZE_TO_PX = exports.SWITCH_SIZE_TO_PX = exports.HEADER_SIZE_TO_NUMBER = exports.HEADER_LEVEL_TO_PX = exports.NUMBER_TO_SIZE = exports.SIZE_TO_NUMBER = exports.LINE_SIZE_TO_NUMBER = exports.SIZE_TO_MODIFIER = exports.SIZES = exports.ReqoreSizes = void 0;
|
|
4
|
+
exports.PROGRESS_HEIGHT_FROM_SIZE = exports.PILL_RADIUS_MODIFIER = void 0;
|
|
4
5
|
exports.ReqoreSizes = {
|
|
5
6
|
MICRO: 'micro',
|
|
6
7
|
TINY: 'tiny',
|
|
@@ -326,6 +327,37 @@ var resolveRadius = function (size, radiusSize, sizeScale, radiusScale) {
|
|
|
326
327
|
return (radiusSize ? radiusScale[radiusSize] : sizeScale[size]);
|
|
327
328
|
};
|
|
328
329
|
exports.resolveRadius = resolveRadius;
|
|
330
|
+
/**
|
|
331
|
+
* A rounded panel-like container's corner radius: its `radiusSize` when it names one, else the
|
|
332
|
+
* theme's `panel.radius`, else the radius of its `size` (`normal` for a panel). Panels,
|
|
333
|
+
* callouts and accordions read it here — and every place a panel draws an inner curve (a sticky
|
|
334
|
+
* header's top, an accent strip, a media frame) — so a card is one curve wherever it is drawn.
|
|
335
|
+
*/
|
|
336
|
+
var resolvePanelRadius = function (theme, radiusSize, size) {
|
|
337
|
+
var _a, _b;
|
|
338
|
+
if (size === void 0) { size = 'normal'; }
|
|
339
|
+
return radiusSize ? (0, exports.resolveRadius)(size, radiusSize) : ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.panel) === null || _a === void 0 ? void 0 : _a.radius) !== null && _b !== void 0 ? _b : exports.RADIUS_FROM_SIZE[size]);
|
|
340
|
+
};
|
|
341
|
+
exports.resolvePanelRadius = resolvePanelRadius;
|
|
342
|
+
/**
|
|
343
|
+
* The side padding that keeps a rounded container's label clear of its corner: the container's
|
|
344
|
+
* own `padding`, or as much as it takes for the label to start `radius` px in from the outer edge
|
|
345
|
+
* when that is more. `border` is the width of the edge the padding sits inside.
|
|
346
|
+
*
|
|
347
|
+
* Padding steps with the size (8px at `normal`, 6px at `small`) while a corner is the theme's
|
|
348
|
+
* (`panel.radius`) or `radiusSize`'s, so a 14px corner on a small panel put its title 7px in, under
|
|
349
|
+
* the curve. Every container that draws a label against its top-left corner — a panel's title bar,
|
|
350
|
+
* padded content and bottom actions, an accordion's headers, a callout, a statistic, a feature
|
|
351
|
+
* card, a testimonial — pads it through here, and what sits under the label takes the same
|
|
352
|
+
* inset, so the container keeps one left edge. Pass `radius` 0 where the container draws no
|
|
353
|
+
* corner (not rounded, or neither a surface nor an edge), so a bare container keeps its label
|
|
354
|
+
* flush.
|
|
355
|
+
*/
|
|
356
|
+
var clearCorner = function (padding, radius, border) {
|
|
357
|
+
if (border === void 0) { border = 0; }
|
|
358
|
+
return Math.max(padding, radius - border);
|
|
359
|
+
};
|
|
360
|
+
exports.clearCorner = clearCorner;
|
|
329
361
|
exports.TAG_RADIUS_FROM_SIZE = {
|
|
330
362
|
micro: 1,
|
|
331
363
|
tiny: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sizes.js","sourceRoot":"","sources":["../../src/constants/sizes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sizes.js","sourceRoot":"","sources":["../../src/constants/sizes.ts"],"names":[],"mappings":";;;;AAGa,QAAA,WAAW,GAAG;IACzB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;CACnB,CAAC;AAEW,QAAA,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAEhF,QAAA,gBAAgB,GAAG;IAC9B,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,GAAG;IACT,OA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, TReqoreHexColor } from '../components/Effect';
|
|
2
2
|
import { TReqoreFontFamilyShorthand } from './fonts';
|
|
3
|
+
import { TSizes } from './sizes';
|
|
3
4
|
export interface IReqoreSidebarTheme {
|
|
4
5
|
main?: TReqoreHexColor;
|
|
5
6
|
color?: TReqoreHexColor;
|
|
@@ -46,6 +47,70 @@ export interface IReqoreNavbarTheme {
|
|
|
46
47
|
background?: TReqoreHexColor;
|
|
47
48
|
hoverColor?: TReqoreHexColor;
|
|
48
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* The surface panels and panel-like containers are painted on, and the hairline they are edged
|
|
52
|
+
* with. Unset, both are derived from `main` as they always were (on a dark theme the panel comes
|
|
53
|
+
* out a shade DARKER than the page). Set, a panel can sit one step above the page with a
|
|
54
|
+
* neutral 1px edge — one decision for every surface instead of a `customTheme` on each.
|
|
55
|
+
*
|
|
56
|
+
* Read by ReqorePanel (and so ReqoreDrawer, ReqoreModal and ReqoreTable), ReqoreStatistic,
|
|
57
|
+
* ReqoreAccordion, ReqoreCallout, ReqoreCollection items, ReqoreFeatureCard, ReqoreMenu,
|
|
58
|
+
* ReqoreTestimonial, ReqoreTier, ReqoreEntityRow and ReqoreSeverityRow, and by table row lines.
|
|
59
|
+
*
|
|
60
|
+
* A component whose surface is customised — a `customTheme` with a `main`, an `intent`, or a
|
|
61
|
+
* custom theme inherited from an ancestor — keeps deriving its colours from that, as before.
|
|
62
|
+
*/
|
|
63
|
+
export interface IReqorePanelTheme {
|
|
64
|
+
/** The panel surface. */
|
|
65
|
+
main?: TReqoreHexColor;
|
|
66
|
+
/** The 1px hairline on the panel's edge and between its rows. */
|
|
67
|
+
border?: TReqoreHexColor;
|
|
68
|
+
/**
|
|
69
|
+
* The corner radius, in px, of every rounded panel that names no `radiusSize` — one curve
|
|
70
|
+
* for every card on the page, decided once. Unset, a panel keeps the `normal` radius.
|
|
71
|
+
*/
|
|
72
|
+
radius?: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The px every `size` renders its text at, decided once for the whole app. Each table names only
|
|
76
|
+
* the sizes it changes; a size it leaves out — and every size when `typeScale` is unset — keeps
|
|
77
|
+
* Reqore's own value (`TEXT_FROM_SIZE`, `CONTROL_TEXT_FROM_SIZE`, `TAG_TEXT_FROM_SIZE`), so a
|
|
78
|
+
* theme without it renders exactly as before.
|
|
79
|
+
*
|
|
80
|
+
* What a component derives from its text size (a feature card's title at 1.4×, a data view's
|
|
81
|
+
* secondary line a pixel smaller, the width a tab list measures a label at) is derived from the
|
|
82
|
+
* theme's value. Box heights are not type: a button, an input, a tag or a table row keeps its
|
|
83
|
+
* height from the size, and its text is centred in it.
|
|
84
|
+
*/
|
|
85
|
+
export interface IReqoreTypeScale {
|
|
86
|
+
/**
|
|
87
|
+
* px per size for running text: ReqoreP, ReqoreSpan, ReqoreLink, table cells,
|
|
88
|
+
* panel/accordion/callout/bubble/notification/dataview text, `effect.textSize` given as a
|
|
89
|
+
* size name (which is how table header cells are sized: one size below the table's).
|
|
90
|
+
*/
|
|
91
|
+
text?: Partial<Record<TSizes, number>>;
|
|
92
|
+
/**
|
|
93
|
+
* px per size for controls: buttons, inputs, textareas, tabs, checkboxes, segmented control,
|
|
94
|
+
* progress, a tag's actions.
|
|
95
|
+
*/
|
|
96
|
+
control?: Partial<Record<TSizes, number>>;
|
|
97
|
+
/** px per size for tags, badges and keyboard keys. */
|
|
98
|
+
tag?: Partial<Record<TSizes, number>>;
|
|
99
|
+
/**
|
|
100
|
+
* px per heading level (1-6): ReqoreHeading and ReqoreH1-H6, and the title of a panel, card,
|
|
101
|
+
* drawer or modal, which is a heading at the level its size names (a `normal` panel's title is
|
|
102
|
+
* level 3). A level left out is Reqore's own: 30, 24, 19, 14, 11, 8.
|
|
103
|
+
*/
|
|
104
|
+
heading?: Partial<Record<1 | 2 | 3 | 4 | 5 | 6, number>>;
|
|
105
|
+
/** The weight every heading is drawn in. Unset, the browser's bold (700), as before. */
|
|
106
|
+
headingWeight?: number;
|
|
107
|
+
/**
|
|
108
|
+
* Unitless line height for running text, set where `theme.fontFamily` is set (the layout
|
|
109
|
+
* wrapper and the portal popovers, modals and drawers render into) and inherited from there.
|
|
110
|
+
* Unset, neither names one: the browser's `normal` applies, as before.
|
|
111
|
+
*/
|
|
112
|
+
lineHeight?: number;
|
|
113
|
+
}
|
|
49
114
|
export interface IReqoreTheme {
|
|
50
115
|
main: TReqoreHexColor;
|
|
51
116
|
originalMain?: TReqoreHexColor;
|
|
@@ -66,18 +131,68 @@ export interface IReqoreTheme {
|
|
|
66
131
|
* Unset (the default), the wrapper and the portal name no font: the page's font reaches them.
|
|
67
132
|
*/
|
|
68
133
|
fontFamily?: TReqoreFontFamilyShorthand | string;
|
|
134
|
+
/** Text sizes and line height for the whole app. See `IReqoreTypeScale`. */
|
|
135
|
+
typeScale?: IReqoreTypeScale;
|
|
69
136
|
intents: IReqoreIntents;
|
|
70
137
|
sidebar?: IReqoreSidebarTheme;
|
|
71
138
|
notifications: IReqoreIntents;
|
|
72
139
|
popover?: {
|
|
73
140
|
main: TReqoreHexColor;
|
|
74
141
|
};
|
|
142
|
+
/** Surface and hairline for panels and panel-like containers. See `IReqorePanelTheme`. */
|
|
143
|
+
panel?: IReqorePanelTheme;
|
|
144
|
+
/**
|
|
145
|
+
* Whether the small labels Reqore names things with — a statistic's label, a menu's group
|
|
146
|
+
* heading, a stacked bar's segment labels, a description list's row labels, a collection's
|
|
147
|
+
* group headers, a switch's on / off text, a progress bar's target label, a data view's type
|
|
148
|
+
* tags, a spacer's label — are set in tracked uppercase (`useUppercaseLabels()`). Default `true` (unchanged). A theme that sets every label in sentence
|
|
149
|
+
* case (the calm theme) sets `false` once here, instead of overriding each component at every
|
|
150
|
+
* call site — which is how one app ended up with uppercase headings in the menus nobody had
|
|
151
|
+
* reached yet. A component's own `uppercase` prop or effect still wins.
|
|
152
|
+
*/
|
|
153
|
+
uppercaseLabels?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* How a message (`ReqoreMessage`) shows its intent. `'tint'` (the default, unchanged): the
|
|
156
|
+
* box is filled with a shade of the intent and edged in it. `'panel'`: the box sits on the
|
|
157
|
+
* panel surface (`theme.panel`) with the panel hairline, like a calm callout — the intent is
|
|
158
|
+
* on the icon, and a danger or warning message carries a soft glow in its top-left corner. A
|
|
159
|
+
* theme that keeps colour for state sets it once here, instead of restyling every message.
|
|
160
|
+
*/
|
|
161
|
+
messageSurface?: 'tint' | 'panel';
|
|
162
|
+
/**
|
|
163
|
+
* Whether the data viewers colour what they show by its type: a tree's keys blue and its
|
|
164
|
+
* values by type (a boolean green or red, a number blue), a data view's value chips by type.
|
|
165
|
+
* Default `true` (unchanged). `false` draws keys as quiet labels and values as plain text,
|
|
166
|
+
* for an app whose colours each mean something (green "healthy"), where a value painted green
|
|
167
|
+
* reads as a verdict it is not. Decided once here; a component's own prop still wins
|
|
168
|
+
* (`ReqoreTree` `colorByType`, `ReqoreDataView` `colorValuesByType`).
|
|
169
|
+
*/
|
|
170
|
+
colorDataByType?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* The intent of the primary action in the dialogs Reqore draws itself — the tree editor's Save,
|
|
173
|
+
* the confirm dialog's confirm when the action is not dangerous. Unset, each dialog keeps its
|
|
174
|
+
* own (the tree's Save is `success`). An app whose primary is not green sets it once here,
|
|
175
|
+
* instead of finding each dialog.
|
|
176
|
+
*/
|
|
177
|
+
primaryActionIntent?: TReqoreIntent;
|
|
178
|
+
/**
|
|
179
|
+
* How a switch (`ReqoreCheckbox asSwitch`) shows that it is on. `'tint'` (the default,
|
|
180
|
+
* unchanged): the track takes a lighter shade of the switch's intent. `'filled'`: an on switch's
|
|
181
|
+
* track is filled with the text colour — white on a dark theme — and its knob is the surface,
|
|
182
|
+
* so on and off read apart without a colour. Decided once here for every switch in the app.
|
|
183
|
+
*/
|
|
184
|
+
switchOnLook?: 'tint' | 'filled';
|
|
75
185
|
header?: IReqoreNavbarTheme;
|
|
76
186
|
footer?: IReqoreNavbarTheme;
|
|
77
187
|
breadcrumbs?: IReqoreBreadcrumbsTheme;
|
|
78
188
|
buttons?: IReqoreCustomTheme;
|
|
79
189
|
}
|
|
80
190
|
export interface IReqoreCustomTheme {
|
|
191
|
+
/**
|
|
192
|
+
* As `theme.buttons.main`: the surface of every button that has no intent and no surface of
|
|
193
|
+
* its own (a `customTheme` main, given or inherited) — table header cells included, which are
|
|
194
|
+
* buttons. Unset, a button is `main` a step lighter, as before. (`text` is not read.)
|
|
195
|
+
*/
|
|
81
196
|
main?: TReqoreEffectColor;
|
|
82
197
|
text?: {
|
|
83
198
|
color?: TReqoreEffectColor;
|
|
@@ -85,6 +200,19 @@ export interface IReqoreCustomTheme {
|
|
|
85
200
|
};
|
|
86
201
|
effect?: IReqoreEffect;
|
|
87
202
|
compact?: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* As `theme.buttons.intentLook`: how a button with an intent draws it, per intent. `'fill'`
|
|
205
|
+
* (the default) paints the button in the intent. `'text'` keeps the ordinary button and says the
|
|
206
|
+
* intent in its words and icons, in the intent's colour made readable on the button: a calm
|
|
207
|
+
* theme's destructive button is red words on a plain button, not a red block. A `'text'` button
|
|
208
|
+
* with no label (an icon-only bin) is the ordinary button at rest and takes the intent's colour
|
|
209
|
+
* only under the pointer — a row of bins is not a row of red.
|
|
210
|
+
* `'outline'` keeps the ordinary fill too, and draws the intent at rest on every such button,
|
|
211
|
+
* labelled or icon-only: its words and icons in the intent's readable colour and a border in
|
|
212
|
+
* the intent — a destructive control that says so before anyone points at it, without being
|
|
213
|
+
* a block of colour.
|
|
214
|
+
*/
|
|
215
|
+
intentLook?: Partial<Record<TReqoreIntent, 'fill' | 'text' | 'outline'>>;
|
|
88
216
|
}
|
|
89
217
|
export interface IReqoreIntents {
|
|
90
218
|
info?: TReqoreHexColor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/constants/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE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AG,CAAC,EAAE,OAAO,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;CAC1E;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,CAAC,EAAE,eAAe,CAAC;IAExB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED,eAAO,MAAM,eAAe,EAAE,cAe7B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,cAAc,CAAC;AAEjD,eAAO,MAAM,aAAa,EAAE,YAO3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CAczD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/constants/theme.ts"],"names":[],"mappings":";;;AACA,mCAAkC;
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/constants/theme.ts"],"names":[],"mappings":";;;AACA,mCAAkC;AAiPrB,QAAA,eAAe,GAAmB;IAC7C,IAAI,EAAE,eAAM,CAAC,IAAI;IACjB,OAAO,EAAE,eAAM,CAAC,KAAK;IACrB,OAAO,EAAE,eAAM,CAAC,MAAM;IACtB,OAAO,EAAE,eAAM,CAAC,MAAM;IACtB,MAAM,EAAE,eAAM,CAAC,GAAG;IAClB,KAAK,EAAE,eAAM,CAAC,IAAI;IAClB,KAAK,EAAE,eAAM,CAAC,IAAI;IAClB,KAAK,EAAE,eAAM,CAAC,KAAK;IAEnB,OAAO,EAAE,eAAM,CAAC,IAAI;IACpB,OAAO,EAAE,eAAM,CAAC,IAAI;IACpB,OAAO,EAAE,eAAM,CAAC,IAAI;IACpB,OAAO,EAAE,eAAM,CAAC,IAAI;IACpB,OAAO,EAAE,eAAM,CAAC,IAAI;CACrB,CAAC;AAIW,QAAA,aAAa,GAAiB;IACzC,IAAI,EAAE,eAAM,CAAC,UAAU;IACvB,IAAI,EAAE;QACJ,GAAG,EAAE,IAAI;KACV;IACD,OAAO,EAAE,uBAAe;IACxB,aAAa,EAAE,EAAE;CAClB,CAAC;AAEW,QAAA,aAAa,GAAqC;IAC7D,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACnB,CAAC"}
|
|
@@ -52,6 +52,29 @@ export interface IReqoreConfirmationModal {
|
|
|
52
52
|
intent?: TReqoreIntent;
|
|
53
53
|
modalProps?: IReqoreModalProps;
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Defaults for every confirmation `confirmAction` opens (`options.confirmations`), under each
|
|
57
|
+
* call's own data — what an app decides once instead of at every call site: its words (so they
|
|
58
|
+
* can be translated), its primary, and its look.
|
|
59
|
+
*/
|
|
60
|
+
export interface IReqoreConfirmationDefaults extends Omit<IReqoreConfirmationModal, 'onConfirm' | 'onCancel' | 'isOpen' | 'content'> {
|
|
61
|
+
/**
|
|
62
|
+
* The line under the title when a call gives none. Default `'Are you sure you want to
|
|
63
|
+
* proceed?'`. `null`: no line — a title that asks the question needs no second one.
|
|
64
|
+
*/
|
|
65
|
+
content?: string | null;
|
|
66
|
+
/** The dialog's own opacity: below 1 the page shows through it. Default `0.9`; `1` for a
|
|
67
|
+
* solid dialog. */
|
|
68
|
+
surfaceOpacity?: number;
|
|
69
|
+
/** The blur of the backdrop behind the dialog, in pixels. Default `2`; `0` for none. */
|
|
70
|
+
backdropBlur?: number;
|
|
71
|
+
/**
|
|
72
|
+
* How the dialog shows a call's `intent`. `'wash'` (the default, unchanged) draws the dialog in
|
|
73
|
+
* it — its edge and title. `'icon'` keeps the dialog on its own surface and edge and colours
|
|
74
|
+
* only its icon, for a theme that keeps colour for state.
|
|
75
|
+
*/
|
|
76
|
+
intentLook?: 'wash' | 'icon';
|
|
77
|
+
}
|
|
55
78
|
export declare const modalStore: import("zustand").UseBoundStore<import("zustand").StoreApi<{
|
|
56
79
|
modals: IReqoreModals;
|
|
57
80
|
addModal: IReqoreContext["addModal"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReqoreProvider.d.ts","sourceRoot":"","sources":["../../src/containers/ReqoreProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAK7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAmC,EACjC,4BAA4B,EAC7B,MAAM,6BAA6B,CAAC;AACrC,OAA2B,EACzB,wBAAwB,EACzB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAgB,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACj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,EAAE,eAAe,CAAC;IAC7B,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IAEvC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,2BACf,SAAQ,IAAI,CAAC,wBAAwB,EAAE,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;IACvF;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;wBACoB;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B;AAkBD,eAAO,MAAM,UAAU;YACb,aAAa;cACX,cAAc,CAAC,UAAU,CAAC;iBACvB,cAAc,CAAC,aAAa,CAAC;GA+BzC,CAAC;AAKJ,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA0YjD,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -39,6 +39,7 @@ var notification_1 = __importDefault(require("../components/Notifications/notifi
|
|
|
39
39
|
var ReqoreContext_1 = __importDefault(require("../context/ReqoreContext"));
|
|
40
40
|
var schedule_1 = require("../helpers/schedule");
|
|
41
41
|
var ThemeContext_1 = __importDefault(require("../context/ThemeContext"));
|
|
42
|
+
var NO_CONFIRMATION_BODY = { display: 'none' };
|
|
42
43
|
var DEFAULT_ERROR_BOUNDARY_OPTIONS = {
|
|
43
44
|
errorMessage: 'There was an error rendering this component. You can try resetting or refreshing the page.',
|
|
44
45
|
};
|
|
@@ -79,13 +80,15 @@ exports.modalStore = (0, zustand_1.create)(function (set) { return ({
|
|
|
79
80
|
});
|
|
80
81
|
},
|
|
81
82
|
}); });
|
|
83
|
+
/** Marks the element a dialog's focus trap gives focus to when it opens (see useFocusTrap). */
|
|
84
|
+
var INITIAL_FOCUS = { 'data-reqore-initial-focus': true };
|
|
82
85
|
var ReqoreProvider = (0, react_2.memo)(function (_a) {
|
|
83
|
-
var _b;
|
|
84
|
-
var children = _a.children,
|
|
85
|
-
var
|
|
86
|
-
var
|
|
87
|
-
var
|
|
88
|
-
var
|
|
86
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
|
87
|
+
var children = _a.children, _j = _a.options, options = _j === void 0 ? {} : _j;
|
|
88
|
+
var _k = (0, react_2.useState)([]), notifications = _k[0], setNotifications = _k[1];
|
|
89
|
+
var _l = (0, exports.modalStore)(), addModal = _l.addModal, removeModal = _l.removeModal;
|
|
90
|
+
var _m = (0, react_2.useState)([]), escClosableModals = _m[0], setEscClosableModals = _m[1];
|
|
91
|
+
var _o = (0, react_2.useState)({}), confirmationModal = _o[0], setConfirmationModal = _o[1];
|
|
89
92
|
var theme = (0, use_context_selector_1.useContext)(ThemeContext_1.default);
|
|
90
93
|
var latestZIndex = (0, react_2.useRef)(9000);
|
|
91
94
|
// Live media queries in a browser, fixed defaults in jsdom — see
|
|
@@ -109,6 +112,12 @@ var ReqoreProvider = (0, react_2.memo)(function (_a) {
|
|
|
109
112
|
var closeConfirmationModal = (0, react_2.useCallback)(function () {
|
|
110
113
|
setConfirmationModal(function (cur) { return (__assign(__assign({}, cur), { isOpen: false })); });
|
|
111
114
|
}, []);
|
|
115
|
+
/* Escape or the × on a confirmation cancels it, as its Cancel does. */
|
|
116
|
+
var cancelConfirmationModal = (0, react_2.useCallback)(function () {
|
|
117
|
+
var _a;
|
|
118
|
+
closeConfirmationModal();
|
|
119
|
+
(_a = confirmationModal === null || confirmationModal === void 0 ? void 0 : confirmationModal.onCancel) === null || _a === void 0 ? void 0 : _a.call(confirmationModal);
|
|
120
|
+
}, [closeConfirmationModal, confirmationModal]);
|
|
112
121
|
var addEscClosableModal = (0, react_2.useCallback)(function (id) {
|
|
113
122
|
setEscClosableModals(function (cur) { return __spreadArray(__spreadArray([], cur, true), [id], false); });
|
|
114
123
|
}, []);
|
|
@@ -145,6 +154,14 @@ var ReqoreProvider = (0, react_2.memo)(function (_a) {
|
|
|
145
154
|
}
|
|
146
155
|
close();
|
|
147
156
|
}, [confirmAction]);
|
|
157
|
+
/* The app's confirmation defaults (`options.confirmations`) under each call's own data. */
|
|
158
|
+
var confirmationDefaults = options === null || options === void 0 ? void 0 : options.confirmations;
|
|
159
|
+
var confirmationIntent = (_b = confirmationModal.intent) !== null && _b !== void 0 ? _b : confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.intent;
|
|
160
|
+
var confirmationIntentOnIcon = (confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.intentLook) === 'icon';
|
|
161
|
+
var confirmationContent = confirmationModal.content ||
|
|
162
|
+
((confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.content) === null
|
|
163
|
+
? undefined
|
|
164
|
+
: (confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.content) || 'Are you sure you want to proceed?');
|
|
148
165
|
var notificationDefaults = options === null || options === void 0 ? void 0 : options.notifications;
|
|
149
166
|
var addNotification = (0, react_2.useCallback)(function (data) {
|
|
150
167
|
setNotifications(function (cur) {
|
|
@@ -192,6 +209,9 @@ var ReqoreProvider = (0, react_2.memo)(function (_a) {
|
|
|
192
209
|
uiScale: options === null || options === void 0 ? void 0 : options.uiScale,
|
|
193
210
|
glowingIcons: (_b = options === null || options === void 0 ? void 0 : options.glowingIcons) !== null && _b !== void 0 ? _b : false,
|
|
194
211
|
shortcutHints: (_c = options === null || options === void 0 ? void 0 : options.shortcutHints) !== null && _c !== void 0 ? _c : true,
|
|
212
|
+
backdropBlur: options === null || options === void 0 ? void 0 : options.backdropBlur,
|
|
213
|
+
dialogOpacity: options === null || options === void 0 ? void 0 : options.dialogOpacity,
|
|
214
|
+
dialogBlur: options === null || options === void 0 ? void 0 : options.dialogBlur,
|
|
195
215
|
errorBoundaryOptions: (options === null || options === void 0 ? void 0 : options.errorBoundaryOptions) || DEFAULT_ERROR_BOUNDARY_OPTIONS,
|
|
196
216
|
schedule: (_d = options === null || options === void 0 ? void 0 : options.schedule) !== null && _d !== void 0 ? _d : schedule_1.scheduleOnTimer,
|
|
197
217
|
});
|
|
@@ -220,6 +240,9 @@ var ReqoreProvider = (0, react_2.memo)(function (_a) {
|
|
|
220
240
|
tooltips: resolvedOptions.tooltips,
|
|
221
241
|
glowingIcons: resolvedOptions.glowingIcons,
|
|
222
242
|
shortcutHints: resolvedOptions.shortcutHints,
|
|
243
|
+
backdropBlur: resolvedOptions.backdropBlur,
|
|
244
|
+
dialogOpacity: resolvedOptions.dialogOpacity,
|
|
245
|
+
dialogBlur: resolvedOptions.dialogBlur,
|
|
223
246
|
closePopoversOnEscPress: resolvedOptions.closePopoversOnEscPress,
|
|
224
247
|
// ESC Closable modals management
|
|
225
248
|
closeModalsOnEscPress: resolvedOptions.closeModalsOnEscPress,
|
|
@@ -267,8 +290,15 @@ var ReqoreProvider = (0, react_2.memo)(function (_a) {
|
|
|
267
290
|
}
|
|
268
291
|
removeNotification(notification.id);
|
|
269
292
|
} }))); }) }, position)) : null;
|
|
270
|
-
}), children, confirmationModal.isOpen && ((0, jsx_runtime_1.jsx)(__1.ReqoreModal, __assign({ isOpen: true, flat: true, opacity: 0.9, blur: 2, width: '500px', intent:
|
|
271
|
-
|
|
293
|
+
}), children, confirmationModal.isOpen && ((0, jsx_runtime_1.jsx)(__1.ReqoreModal, __assign({ isOpen: true, flat: true, opacity: (_c = confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.surfaceOpacity) !== null && _c !== void 0 ? _c : 0.9, blur: (_d = confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.backdropBlur) !== null && _d !== void 0 ? _d : 2, width: '500px', intent: confirmationIntentOnIcon ? undefined : confirmationIntent, iconColor: confirmationIntentOnIcon ? confirmationIntent : undefined, label: confirmationModal.title ||
|
|
294
|
+
confirmationModal.label ||
|
|
295
|
+
(confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.title) ||
|
|
296
|
+
(confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.label) ||
|
|
297
|
+
'Confirm your action', description: (_e = confirmationModal.description) !== null && _e !== void 0 ? _e : confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.description, icon: confirmationModal.icon || (confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.icon) || 'ErrorWarningFill', className: 'reqore-confirmation-modal',
|
|
298
|
+
/* Escape cancels, as its Cancel does (APG alertdialog), and only it: it is on top of
|
|
299
|
+
the Escape stack, so the drawer or modal under it stays. */
|
|
300
|
+
onClose: cancelConfirmationModal, bottomActions: [
|
|
301
|
+
__assign(__assign(__assign(__assign({ label: confirmationModal.cancelLabel || (confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.cancelLabel) || 'Cancel', icon: confirmationModal.cancelIcon || (confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.cancelIcon) || 'CloseLine', intent: (_f = confirmationModal.cancelButtonIntent) !== null && _f !== void 0 ? _f : confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.cancelButtonIntent,
|
|
272
302
|
/* A panel short of room drops its actions' labels and keeps the
|
|
273
303
|
icons, which is the right trade for a toolbar — the label is a
|
|
274
304
|
verb the icon already carries. Not here: this dialog exists to
|
|
@@ -276,19 +306,29 @@ var ReqoreProvider = (0, react_2.memo)(function (_a) {
|
|
|
276
306
|
offered a tick and a cross with the destructive one named
|
|
277
307
|
nowhere. Pinned before the caller's props, so a caller that
|
|
278
308
|
wants the icon alone can still ask for it. */
|
|
279
|
-
responsive: false }, (confirmationModal.cancelButtonProps || {})), { onClick: function () {
|
|
309
|
+
responsive: false }, INITIAL_FOCUS), ((confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.cancelButtonProps) || {})), (confirmationModal.cancelButtonProps || {})), { onClick: function () {
|
|
280
310
|
var _a;
|
|
281
311
|
closeConfirmationModal();
|
|
282
312
|
(_a = confirmationModal === null || confirmationModal === void 0 ? void 0 : confirmationModal.onCancel) === null || _a === void 0 ? void 0 : _a.call(confirmationModal);
|
|
283
313
|
}, position: 'left' }),
|
|
284
|
-
__assign(__assign({ label: confirmationModal.confirmLabel ||
|
|
314
|
+
__assign(__assign(__assign({ label: confirmationModal.confirmLabel || (confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.confirmLabel) || 'Confirm',
|
|
315
|
+
// The call's own, else the app's default, else the theme's primary, else green.
|
|
316
|
+
intent: confirmationModal.confirmButtonIntent ||
|
|
317
|
+
(confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.confirmButtonIntent) ||
|
|
318
|
+
(theme === null || theme === void 0 ? void 0 : theme.primaryActionIntent) ||
|
|
319
|
+
'success', icon: confirmationModal.confirmIcon || (confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.confirmIcon) || 'CheckLine',
|
|
285
320
|
/* Named at every width — see the cancel action above. */
|
|
286
|
-
responsive: false }, (confirmationModal.confirmButtonProps || {})), { onClick: function () {
|
|
321
|
+
responsive: false }, ((confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.confirmButtonProps) || {})), (confirmationModal.confirmButtonProps || {})), { onClick: function () {
|
|
287
322
|
var _a;
|
|
288
323
|
closeConfirmationModal();
|
|
289
324
|
(_a = confirmationModal === null || confirmationModal === void 0 ? void 0 : confirmationModal.onConfirm) === null || _a === void 0 ? void 0 : _a.call(confirmationModal);
|
|
290
325
|
}, position: 'right' }),
|
|
291
|
-
]
|
|
326
|
+
],
|
|
327
|
+
// With no line to show, no empty band between the title and the buttons.
|
|
328
|
+
contentStyle: confirmationContent || ((_g = confirmationModal.modalProps) === null || _g === void 0 ? void 0 : _g.children)
|
|
329
|
+
? undefined
|
|
330
|
+
: NO_CONFIRMATION_BODY }, ((confirmationDefaults === null || confirmationDefaults === void 0 ? void 0 : confirmationDefaults.modalProps) || {}), (confirmationModal.modalProps || {}), { children: ((_h = confirmationModal.modalProps) === null || _h === void 0 ? void 0 : _h.children) ||
|
|
331
|
+
(confirmationContent ? ((0, jsx_runtime_1.jsx)(__1.ReqoreTextEffect, { as: 'p', effect: { textAlign: 'center', weight: 'bold', textSize: 'big' }, children: confirmationContent })) : null) })))] }) }));
|
|
292
332
|
});
|
|
293
333
|
exports.default = ReqoreProvider;
|
|
294
334
|
//# sourceMappingURL=ReqoreProvider.js.map
|