xmlui 0.9.51 → 0.9.53

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.
Files changed (171) hide show
  1. package/dist/lib/{apiInterceptorWorker-BtGYrMWj.mjs → apiInterceptorWorker-CZW6DSTB.mjs} +3 -3
  2. package/dist/lib/{index-hS5S81ba.mjs → index-qpGKk07J.mjs} +13827 -12206
  3. package/dist/lib/index.css +1 -1
  4. package/dist/lib/language-server-web-worker.mjs +1 -1
  5. package/dist/lib/language-server.mjs +1 -1
  6. package/dist/lib/{metadata-utils-QekhOD-W.mjs → metadata-utils-4EQ6kQIM.mjs} +7 -7
  7. package/dist/lib/{server-common-CtY73qos.mjs → server-common-SNl_47nE.mjs} +2 -2
  8. package/dist/lib/{transform-DXcw0gGl.mjs → transform-CgRMkbb0.mjs} +1472 -1440
  9. package/dist/lib/xmlui-parser.d.ts +84 -62
  10. package/dist/lib/xmlui-parser.mjs +41 -49
  11. package/dist/lib/{xmlui-serializer-CAZCkpXP.mjs → xmlui-serializer-EDw51UFN.mjs} +10 -10
  12. package/dist/lib/xmlui.d.ts +17 -7
  13. package/dist/lib/xmlui.mjs +19 -18
  14. package/dist/metadata/apiInterceptorWorker-CC40OeUC.mjs +15414 -0
  15. package/dist/metadata/collectedComponentMetadata-C5DVNC6p.mjs +41262 -0
  16. package/dist/metadata/core-D3puiNN6.mjs +5771 -0
  17. package/dist/metadata/style.css +1 -1
  18. package/dist/metadata/wasm-DQxwEHae.mjs +7 -0
  19. package/dist/metadata/xmlui-metadata.mjs +3 -18398
  20. package/dist/metadata/xmlui-metadata.umd.js +549 -10
  21. package/dist/scripts/package.json +5 -6
  22. package/dist/scripts/src/components/APICall/APICall.js +13 -12
  23. package/dist/scripts/src/components/APICall/APICallNative.js +5 -0
  24. package/dist/scripts/src/components/Accordion/Accordion.js +4 -2
  25. package/dist/scripts/src/components/Accordion/AccordionItem.js +2 -2
  26. package/dist/scripts/src/components/Accordion/AccordionItemNative.js +6 -2
  27. package/dist/scripts/src/components/App/App.js +22 -9
  28. package/dist/scripts/src/components/App/AppNative.js +9 -1
  29. package/dist/scripts/src/components/AppHeader/AppHeader.js +2 -2
  30. package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +5 -2
  31. package/dist/scripts/src/components/AppState/AppState.js +2 -2
  32. package/dist/scripts/src/components/AppState/AppStateNative.js +5 -1
  33. package/dist/scripts/src/components/AutoComplete/AutoComplete.js +8 -8
  34. package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +16 -2
  35. package/dist/scripts/src/components/Avatar/Avatar.js +4 -2
  36. package/dist/scripts/src/components/Backdrop/Backdrop.js +2 -2
  37. package/dist/scripts/src/components/Badge/Badge.js +7 -5
  38. package/dist/scripts/src/components/Bookmark/Bookmark.js +5 -4
  39. package/dist/scripts/src/components/Card/Card.js +6 -4
  40. package/dist/scripts/src/components/ChangeListener/ChangeListener.js +2 -1
  41. package/dist/scripts/src/components/Charts/BarChart/BarChart.js +76 -0
  42. package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +108 -0
  43. package/dist/scripts/src/components/Charts/DonutChart/DonutChart.js +59 -0
  44. package/dist/scripts/src/components/Charts/LabelList/LabelList.js +38 -0
  45. package/dist/scripts/src/components/Charts/LabelList/LabelListNative.js +24 -0
  46. package/dist/scripts/src/components/Charts/Legend/Legend.js +30 -0
  47. package/dist/scripts/src/components/Charts/Legend/LegendNative.js +64 -0
  48. package/dist/scripts/src/components/Charts/LineChart/LineChart.js +53 -0
  49. package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +103 -0
  50. package/dist/scripts/src/components/Charts/PieChart/PieChart.js +58 -0
  51. package/dist/scripts/src/components/Charts/PieChart/PieChartNative.js +127 -0
  52. package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.js +27 -0
  53. package/dist/scripts/src/components/Charts/utils/ChartProvider.js +65 -0
  54. package/dist/scripts/src/components/Charts/utils/abstractions.js +26 -0
  55. package/dist/scripts/src/components/CodeBlock/CodeBlock.js +4 -4
  56. package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +5 -1
  57. package/dist/scripts/src/components/Column/Column.js +15 -9
  58. package/dist/scripts/src/components/Column/ColumnNative.js +5 -0
  59. package/dist/scripts/src/components/ComponentProvider.js +14 -6
  60. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +4 -3
  61. package/dist/scripts/src/components/DatePicker/DatePicker.js +5 -3
  62. package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +1 -1
  63. package/dist/scripts/src/components/EmojiSelector/EmojiSelectorNative.js +7 -2
  64. package/dist/scripts/src/components/ExpandableItem/ExpandableItem.js +88 -0
  65. package/dist/scripts/src/components/ExpandableItem/ExpandableItemNative.js +91 -0
  66. package/dist/scripts/src/components/FileInput/FileInput.js +8 -9
  67. package/dist/scripts/src/components/FileInput/FileInputNative.js +14 -2
  68. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +2 -2
  69. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +9 -2
  70. package/dist/scripts/src/components/Footer/Footer.js +1 -0
  71. package/dist/scripts/src/components/Footer/FooterNative.js +4 -1
  72. package/dist/scripts/src/components/Form/Form.js +9 -5
  73. package/dist/scripts/src/components/Form/FormNative.js +2 -1
  74. package/dist/scripts/src/components/FormItem/FormItem.js +25 -15
  75. package/dist/scripts/src/components/FormItem/FormItemNative.js +1 -0
  76. package/dist/scripts/src/components/Heading/Heading.js +12 -6
  77. package/dist/scripts/src/components/Heading/HeadingNative.js +7 -0
  78. package/dist/scripts/src/components/Icon/Icon.js +7 -5
  79. package/dist/scripts/src/components/Image/Image.js +19 -9
  80. package/dist/scripts/src/components/Image/ImageNative.js +7 -2
  81. package/dist/scripts/src/components/Items/Items.js +2 -0
  82. package/dist/scripts/src/components/Items/ItemsNative.js +5 -1
  83. package/dist/scripts/src/components/Link/Link.js +3 -4
  84. package/dist/scripts/src/components/Link/LinkNative.js +6 -2
  85. package/dist/scripts/src/components/List/List.js +12 -11
  86. package/dist/scripts/src/components/List/ListNative.js +10 -2
  87. package/dist/scripts/src/components/Logo/Logo.js +7 -0
  88. package/dist/scripts/src/components/Logo/LogoNative.js +6 -2
  89. package/dist/scripts/src/components/Markdown/Markdown.js +5 -4
  90. package/dist/scripts/src/components/Markdown/MarkdownNative.js +64 -21
  91. package/dist/scripts/src/components/Markdown/utils.js +23 -1
  92. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +2 -2
  93. package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +7 -2
  94. package/dist/scripts/src/components/NavGroup/NavGroup.js +2 -1
  95. package/dist/scripts/src/components/NavLink/NavLink.js +5 -7
  96. package/dist/scripts/src/components/NavLink/NavLinkNative.js +7 -2
  97. package/dist/scripts/src/components/NavPanel/NavPanel.js +6 -0
  98. package/dist/scripts/src/components/NavPanel/NavPanelNative.js +6 -2
  99. package/dist/scripts/src/components/NestedApp/NestedApp.js +16 -4
  100. package/dist/scripts/src/components/NestedApp/NestedAppNative.js +37 -34
  101. package/dist/scripts/src/components/NestedApp/defaultProps.js +10 -0
  102. package/dist/scripts/src/components/NoResult/NoResult.js +6 -2
  103. package/dist/scripts/src/components/NoResult/NoResultNative.js +8 -3
  104. package/dist/scripts/src/components/NumberBox/NumberBox.js +8 -6
  105. package/dist/scripts/src/components/NumberBox/NumberBox2.js +6 -6
  106. package/dist/scripts/src/components/NumberBox/NumberBox2Native.js +15 -2
  107. package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +16 -2
  108. package/dist/scripts/src/components/Option/Option.js +10 -15
  109. package/dist/scripts/src/components/Option/OptionNative.js +18 -0
  110. package/dist/scripts/src/components/PageMetaTitle/PageMetaTilteNative.js +6 -2
  111. package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +4 -1
  112. package/dist/scripts/src/components/Pages/Pages.js +7 -3
  113. package/dist/scripts/src/components/Pages/PagesNative.js +5 -0
  114. package/dist/scripts/src/components/ProgressBar/ProgressBar.js +1 -1
  115. package/dist/scripts/src/components/ProgressBar/ProgressBarNative.js +5 -2
  116. package/dist/scripts/src/components/Queue/Queue.js +11 -6
  117. package/dist/scripts/src/components/Queue/QueueNative.js +7 -1
  118. package/dist/scripts/src/components/RadioGroup/RadioGroup.js +5 -5
  119. package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +9 -2
  120. package/dist/scripts/src/components/RadioGroup/RadioItem.js +8 -2
  121. package/dist/scripts/src/components/RadioGroup/RadioItemNative.js +6 -2
  122. package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +4 -1
  123. package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +4 -0
  124. package/dist/scripts/src/components/Redirect/Redirect.js +8 -2
  125. package/dist/scripts/src/components/Select/Select.js +21 -12
  126. package/dist/scripts/src/components/Select/SelectNative.js +15 -2
  127. package/dist/scripts/src/components/SelectionStore/SelectionStore.js +6 -3
  128. package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +6 -2
  129. package/dist/scripts/src/components/Slider/Slider.js +28 -9
  130. package/dist/scripts/src/components/Slider/SliderNative.js +14 -3
  131. package/dist/scripts/src/components/Spinner/Spinner.js +2 -2
  132. package/dist/scripts/src/components/Spinner/SpinnerNative.js +6 -2
  133. package/dist/scripts/src/components/Splitter/Splitter.js +6 -6
  134. package/dist/scripts/src/components/Splitter/SplitterNative.js +10 -2
  135. package/dist/scripts/src/components/Stack/Stack.js +4 -4
  136. package/dist/scripts/src/components/Stack/StackNative.js +8 -2
  137. package/dist/scripts/src/components/StickyBox/StickyBox.js +1 -1
  138. package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +7 -1
  139. package/dist/scripts/src/components/Table/Table.js +15 -14
  140. package/dist/scripts/src/components/Table/TableNative.js +25 -9
  141. package/dist/scripts/src/components/TableOfContents/TableOfContents.js +12 -3
  142. package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +6 -2
  143. package/dist/scripts/src/components/Tabs/Tabs.js +2 -2
  144. package/dist/scripts/src/components/Tabs/TabsNative.js +7 -2
  145. package/dist/scripts/src/components/Text/Text.js +14 -13
  146. package/dist/scripts/src/components/Text/TextNative.js +7 -2
  147. package/dist/scripts/src/components/TextArea/TextArea.js +8 -5
  148. package/dist/scripts/src/components/TextArea/TextAreaNative.js +19 -2
  149. package/dist/scripts/src/components/TextBox/TextBox.js +5 -4
  150. package/dist/scripts/src/components/TextBox/TextBoxNative.js +14 -2
  151. package/dist/scripts/src/components/Theme/Theme.js +1 -1
  152. package/dist/scripts/src/components/Theme/ThemeNative.js +10 -14
  153. package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.js +18 -8
  154. package/dist/scripts/src/components/TreeDisplay/TreeDisplay.js +1 -1
  155. package/dist/scripts/src/components/TreeDisplay/TreeDisplayNative.js +2 -1
  156. package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +3 -57
  157. package/dist/scripts/src/components/ValidationSummary/ValidationSummaryNative.js +64 -0
  158. package/dist/scripts/src/components/metadata-helpers.js +11 -8
  159. package/dist/scripts/src/components-core/InspectorContext.js +2 -7
  160. package/dist/scripts/src/components-core/interception/ApiInterceptor.js +1 -1
  161. package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +6 -2
  162. package/dist/scripts/src/components-core/loader/DataLoader.js +1 -1
  163. package/dist/scripts/src/components-core/loader/Loader.js +7 -3
  164. package/dist/scripts/src/components-core/theming/themes/palette.js +5 -4
  165. package/dist/scripts/src/components-core/theming/themes/root.js +5 -4
  166. package/dist/scripts/src/components-core/theming/transformThemeVars.js +1 -17
  167. package/dist/scripts/src/parsers/xmlui-parser/diagnostics.js +92 -48
  168. package/dist/scripts/src/parsers/xmlui-parser/parser.js +179 -189
  169. package/dist/standalone/xmlui-standalone.es.d.ts +235 -223
  170. package/dist/standalone/xmlui-standalone.umd.js +288 -316
  171. package/package.json +5 -6
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toneChangerButtonComponentRenderer = exports.ToneChangerButtonMd = void 0;
3
+ exports.toneChangerButtonComponentRenderer = exports.ToneChangerButtonMd = exports.defaultProps = void 0;
4
4
  exports.ToneChangerButton = ToneChangerButton;
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
@@ -11,19 +11,29 @@ const IconNative_1 = require("../Icon/IconNative");
11
11
  const COMP = "ToneChangerButton";
12
12
  const LIGHT_TO_DARK_ICON = "lightToDark:ToneChangerButton";
13
13
  const DARK_TO_LIGHT_ICON = "darkToLight:ToneChangerButton";
14
+ exports.defaultProps = {
15
+ lightToDarkIcon: LIGHT_TO_DARK_ICON,
16
+ darkToLightIcon: DARK_TO_LIGHT_ICON
17
+ };
14
18
  exports.ToneChangerButtonMd = (0, ComponentDefs_1.createMetadata)({
15
19
  status: "experimental",
16
20
  description: `The \`${COMP}\` component is a component that allows the user to change the tone of the app.`,
17
21
  props: {
18
- lightToDarkIcon: (0, ComponentDefs_1.d)(`The icon displayed when the theme is in light mode and will switch to dark. You can change ` +
19
- `the default icon for all ${COMP} instances with the "icon.lightToDark:ToneChangerButton" ` +
20
- `declaration in the app configuration file.`),
21
- darkToLightIcon: (0, ComponentDefs_1.d)(`The icon displayed when the theme is in dark mode and will switch to light. You can change ` +
22
- `the default icon for all ${COMP} instances with the "icon.darkToLight:ToneChangerButton" ` +
23
- `declaration in the app configuration file.`),
22
+ lightToDarkIcon: {
23
+ description: `The icon displayed when the theme is in light mode and will switch to dark. You can change ` +
24
+ `the default icon for all ${COMP} instances with the "icon.lightToDark:ToneChangerButton" ` +
25
+ `declaration in the app configuration file.`,
26
+ defaultValue: exports.defaultProps.lightToDarkIcon,
27
+ },
28
+ darkToLightIcon: {
29
+ description: `The icon displayed when the theme is in dark mode and will switch to light. You can change ` +
30
+ `the default icon for all ${COMP} instances with the "icon.darkToLight:ToneChangerButton" ` +
31
+ `declaration in the app configuration file.`,
32
+ defaultValue: exports.defaultProps.darkToLightIcon,
33
+ },
24
34
  },
25
35
  });
26
- function ToneChangerButton({ lightToDarkIcon = LIGHT_TO_DARK_ICON, darkToLightIcon = DARK_TO_LIGHT_ICON }) {
36
+ function ToneChangerButton({ lightToDarkIcon = exports.defaultProps.lightToDarkIcon, darkToLightIcon = exports.defaultProps.darkToLightIcon }) {
27
37
  const { activeThemeTone, setActiveThemeTone } = (0, ThemeContext_1.useThemes)();
28
38
  // Use the direct icon name as both the main icon and the fallback
29
39
  // This ensures we always have a working icon
@@ -26,7 +26,7 @@ exports.TreeDisplayMd = (0, ComponentDefs_1.createMetadata)({
26
26
  itemHeight: {
27
27
  description: "The height of each tree item in pixels.",
28
28
  valueType: "number",
29
- defaultValue: 24,
29
+ defaultValue: TreeDisplayNative_1.defaultProps.itemHeight,
30
30
  },
31
31
  },
32
32
  themeVars: (0, themeVars_1.parseScssVar)(TreeDisplay_module_scss_1.default.themeVars),
@@ -9,6 +9,7 @@ const react_1 = require("react");
9
9
  const TreeDisplay_module_scss_1 = __importDefault(require("./TreeDisplay.module.scss"));
10
10
  exports.defaultProps = {
11
11
  content: "",
12
+ itemHeight: 24
12
13
  };
13
14
  // Parse the indented text into a tree structure
14
15
  const parseTreeContent = (content) => {
@@ -95,7 +96,7 @@ const renderTreeNode = (node, index, itemHeight, level = 0, ancestorLines = [])
95
96
  return renderTreeNode(child, i, itemHeight, level + 1, newAncestorLines);
96
97
  }) }))] }, `${node.label}-${index}`));
97
98
  };
98
- exports.TreeDisplay = (0, react_1.forwardRef)(function TreeDisplay({ style, children, content = "", itemHeight = 24 }, forwardedRef) {
99
+ exports.TreeDisplay = (0, react_1.forwardRef)(function TreeDisplay({ style, children, content = exports.defaultProps.content, itemHeight = exports.defaultProps.itemHeight }, forwardedRef) {
99
100
  const contentString = (content || (children === null || children === void 0 ? void 0 : children.toString()) || "").toString();
100
101
  const treeNodes = (0, react_1.useMemo)(() => parseTreeContent(contentString), [contentString]);
101
102
  return ((0, jsx_runtime_1.jsx)("div", { className: TreeDisplay_module_scss_1.default.treeDisplay, style: style, ref: forwardedRef, children: (0, jsx_runtime_1.jsx)("div", { className: TreeDisplay_module_scss_1.default.content, children: treeNodes.map((node, index) => renderTreeNode(node, index, itemHeight, 0, [])) }) }));
@@ -1,59 +1,5 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ValidationSummary = ValidationSummary;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
- const react_1 = require("react");
9
- const react_2 = require("@formkit/auto-animate/react");
10
- const classnames_1 = __importDefault(require("classnames"));
11
- const ValidationSummary_module_scss_1 = __importDefault(require("./ValidationSummary.module.scss"));
12
- const constants_1 = require("../../components-core/constants");
13
- const StackNative_1 = require("../Stack/StackNative");
14
- const IconNative_1 = require("../Icon/IconNative");
15
- const TextNative_1 = require("../Text/TextNative");
16
- const SpaceFillerNative_1 = require("../SpaceFiller/SpaceFillerNative");
17
- const ButtonNative_1 = require("../Button/ButtonNative");
18
- function ValidationSummary({ fieldValidationResults = constants_1.EMPTY_OBJECT, generalValidationResults = constants_1.EMPTY_ARRAY, }) {
19
- const [animateContainerRef] = (0, react_2.useAutoAnimate)({ duration: 100 });
20
- const groupedInvalidResults = (0, react_1.useMemo)(() => {
21
- const ret = {};
22
- Object.entries(fieldValidationResults).forEach(([field, validationResult]) => {
23
- validationResult.validations.forEach((singleValidationResult) => {
24
- if (!singleValidationResult.isValid) {
25
- ret[singleValidationResult.severity] = ret[singleValidationResult.severity] || [];
26
- ret[singleValidationResult.severity].push({
27
- field,
28
- message: singleValidationResult.invalidMessage || "",
29
- });
30
- }
31
- });
32
- });
33
- generalValidationResults.forEach((singleValidationResult) => {
34
- ret[singleValidationResult.severity] = ret[singleValidationResult.severity] || [];
35
- ret[singleValidationResult.severity].push({
36
- message: singleValidationResult.invalidMessage || "",
37
- });
38
- });
39
- return ret;
40
- }, [fieldValidationResults, generalValidationResults]);
41
- return ((0, jsx_runtime_1.jsxs)("div", { ref: animateContainerRef, className: ValidationSummary_module_scss_1.default.summaryContainer, "data-validation-summary": true, children: [(0, jsx_runtime_1.jsx)(ValidationDisplay, { issues: groupedInvalidResults.warning, severity: "warning", heading: "Validation warnings" }), (0, jsx_runtime_1.jsx)(ValidationDisplay, { issues: groupedInvalidResults.error, severity: "error", heading: "Validation errors" })] }));
42
- }
43
- const ValidationDisplay = ({ heading, issues = constants_1.EMPTY_ARRAY, severity = "error", onClose, }) => {
44
- const [animateContainerRef] = (0, react_2.useAutoAnimate)({ duration: 100 });
45
- if (issues.length === 0) {
46
- return null;
47
- }
48
- return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(ValidationSummary_module_scss_1.default.validationContainer, {
49
- [ValidationSummary_module_scss_1.default.valid]: severity === "valid",
50
- [ValidationSummary_module_scss_1.default.info]: severity === "info",
51
- [ValidationSummary_module_scss_1.default.warning]: severity === "warning",
52
- [ValidationSummary_module_scss_1.default.error]: severity === "error",
53
- }), style: { paddingTop: !onClose ? "0.5rem" : undefined }, "data-validation-display-severity": severity, children: [(0, jsx_runtime_1.jsxs)(StackNative_1.Stack, { orientation: "horizontal", verticalAlignment: "center", style: { gap: "0.5rem" }, children: [(0, jsx_runtime_1.jsx)(IconNative_1.Icon, { className: ValidationSummary_module_scss_1.default.heading, name: severity, size: "md" }), (0, jsx_runtime_1.jsx)("div", { className: ValidationSummary_module_scss_1.default.heading, children: (0, jsx_runtime_1.jsx)(TextNative_1.Text, { children: heading }) }), !!onClose && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SpaceFillerNative_1.SpaceFiller, {}), (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { onClick: onClose, variant: "ghost", themeColor: "secondary", icon: (0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: "close", size: "sm" }), orientation: "vertical" })] }))] }), (0, jsx_runtime_1.jsx)("ul", { ref: animateContainerRef, children: issues.map((issue, i) => ((0, jsx_runtime_1.jsx)(ValidationEntry, { issue: issue }, i))) })] }));
54
- };
55
- // --- ValidationEntry
56
- const ValidationEntry = ({ issue }) => {
57
- const { field, message } = issue;
58
- return ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)("span", { style: { display: "inline-flex", gap: field ? "0.25rem" : undefined }, children: [field && (0, jsx_runtime_1.jsx)(TextNative_1.Text, { variant: "small", fontWeight: "bold", children: `${field}:` }), (0, jsx_runtime_1.jsx)(TextNative_1.Text, { variant: "small", preserveLinebreaks: true, children: message })] }) }));
59
- };
3
+ exports.ValidationSummary = void 0;
4
+ const ValidationSummaryNative_1 = require("./ValidationSummaryNative");
5
+ exports.ValidationSummary = ValidationSummaryNative_1.ValidationSummary;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.defaultProps = void 0;
7
+ exports.ValidationSummary = ValidationSummary;
8
+ const jsx_runtime_1 = require("react/jsx-runtime");
9
+ const react_1 = require("react");
10
+ const react_2 = require("@formkit/auto-animate/react");
11
+ const classnames_1 = __importDefault(require("classnames"));
12
+ const ValidationSummary_module_scss_1 = __importDefault(require("./ValidationSummary.module.scss"));
13
+ const constants_1 = require("../../components-core/constants");
14
+ const StackNative_1 = require("../Stack/StackNative");
15
+ const IconNative_1 = require("../Icon/IconNative");
16
+ const TextNative_1 = require("../Text/TextNative");
17
+ const SpaceFillerNative_1 = require("../SpaceFiller/SpaceFillerNative");
18
+ const ButtonNative_1 = require("../Button/ButtonNative");
19
+ exports.defaultProps = {
20
+ fieldValidationResults: constants_1.EMPTY_OBJECT,
21
+ generalValidationResults: constants_1.EMPTY_ARRAY,
22
+ };
23
+ function ValidationSummary({ fieldValidationResults = exports.defaultProps.fieldValidationResults, generalValidationResults = exports.defaultProps.generalValidationResults, }) {
24
+ const [animateContainerRef] = (0, react_2.useAutoAnimate)({ duration: 100 });
25
+ const groupedInvalidResults = (0, react_1.useMemo)(() => {
26
+ const ret = {};
27
+ Object.entries(fieldValidationResults).forEach(([field, validationResult]) => {
28
+ validationResult.validations.forEach((singleValidationResult) => {
29
+ if (!singleValidationResult.isValid) {
30
+ ret[singleValidationResult.severity] = ret[singleValidationResult.severity] || [];
31
+ ret[singleValidationResult.severity].push({
32
+ field,
33
+ message: singleValidationResult.invalidMessage || "",
34
+ });
35
+ }
36
+ });
37
+ });
38
+ generalValidationResults.forEach((singleValidationResult) => {
39
+ ret[singleValidationResult.severity] = ret[singleValidationResult.severity] || [];
40
+ ret[singleValidationResult.severity].push({
41
+ message: singleValidationResult.invalidMessage || "",
42
+ });
43
+ });
44
+ return ret;
45
+ }, [fieldValidationResults, generalValidationResults]);
46
+ return ((0, jsx_runtime_1.jsxs)("div", { ref: animateContainerRef, className: ValidationSummary_module_scss_1.default.summaryContainer, "data-validation-summary": true, children: [(0, jsx_runtime_1.jsx)(ValidationDisplay, { issues: groupedInvalidResults.warning, severity: "warning", heading: "Validation warnings" }), (0, jsx_runtime_1.jsx)(ValidationDisplay, { issues: groupedInvalidResults.error, severity: "error", heading: "Validation errors" })] }));
47
+ }
48
+ const ValidationDisplay = ({ heading, issues = constants_1.EMPTY_ARRAY, severity = "error", onClose, }) => {
49
+ const [animateContainerRef] = (0, react_2.useAutoAnimate)({ duration: 100 });
50
+ if (issues.length === 0) {
51
+ return null;
52
+ }
53
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(ValidationSummary_module_scss_1.default.validationContainer, {
54
+ [ValidationSummary_module_scss_1.default.valid]: severity === "valid",
55
+ [ValidationSummary_module_scss_1.default.info]: severity === "info",
56
+ [ValidationSummary_module_scss_1.default.warning]: severity === "warning",
57
+ [ValidationSummary_module_scss_1.default.error]: severity === "error",
58
+ }), style: { paddingTop: !onClose ? "0.5rem" : undefined }, "data-validation-display-severity": severity, children: [(0, jsx_runtime_1.jsxs)(StackNative_1.Stack, { orientation: "horizontal", verticalAlignment: "center", style: { gap: "0.5rem" }, children: [(0, jsx_runtime_1.jsx)(IconNative_1.Icon, { className: ValidationSummary_module_scss_1.default.heading, name: severity, size: "md" }), (0, jsx_runtime_1.jsx)("div", { className: ValidationSummary_module_scss_1.default.heading, children: (0, jsx_runtime_1.jsx)(TextNative_1.Text, { children: heading }) }), !!onClose && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SpaceFillerNative_1.SpaceFiller, {}), (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { onClick: onClose, variant: "ghost", themeColor: "secondary", icon: (0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: "close", size: "sm" }), orientation: "vertical" })] }))] }), (0, jsx_runtime_1.jsx)("ul", { ref: animateContainerRef, children: issues.map((issue, i) => ((0, jsx_runtime_1.jsx)(ValidationEntry, { issue: issue }, i))) })] }));
59
+ };
60
+ // --- ValidationEntry
61
+ const ValidationEntry = ({ issue }) => {
62
+ const { field, message } = issue;
63
+ return ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)("span", { style: { display: "inline-flex", gap: field ? "0.25rem" : undefined }, children: [field && (0, jsx_runtime_1.jsx)(TextNative_1.Text, { variant: "small", fontWeight: "bold", children: `${field}:` }), (0, jsx_runtime_1.jsx)(TextNative_1.Text, { variant: "small", preserveLinebreaks: true, children: message })] }) }));
64
+ };
@@ -71,7 +71,8 @@ function dIndeterminate(defaultValue) {
71
71
  }
72
72
  function dLabel() {
73
73
  return {
74
- description: `This property sets the label of the component.`,
74
+ description: "This property sets the label of the component. " +
75
+ "If not set, the component will not display a label.",
75
76
  valueType: "string",
76
77
  };
77
78
  }
@@ -84,12 +85,13 @@ function dLabelPosition(def) {
84
85
  }
85
86
  function dLabelWidth(comp) {
86
87
  return {
87
- description: `This property sets the width of the \`${comp}\`.`,
88
+ description: `This property sets the width of the \`${comp}\` component's label. ` +
89
+ "If not defined, the label's width will be determined by its content and the available space.",
88
90
  };
89
91
  }
90
92
  function dLabelBreak(comp) {
91
93
  return {
92
- description: `This boolean value indicates if the \`${comp}\` labels can be split into multiple ` +
94
+ description: `This boolean value indicates if the \`${comp}\` label can be split into multiple ` +
93
95
  `lines if it would overflow the available label width.`,
94
96
  valueType: "boolean",
95
97
  defaultValue: false,
@@ -156,7 +158,7 @@ function dComponent(description) {
156
158
  }
157
159
  function dPlaceholder() {
158
160
  return {
159
- description: `A placeholder text that is visible in the input field when its empty.`,
161
+ description: `An optional placeholder text that is visible in the input field when its empty.`,
160
162
  valueType: "string",
161
163
  };
162
164
  }
@@ -171,32 +173,33 @@ function dRequired() {
171
173
  description: `Set this property to \`true\` to indicate it must have a value ` +
172
174
  `before submitting the containing form.`,
173
175
  valueType: "boolean",
176
+ defaultValue: false,
174
177
  };
175
178
  }
176
179
  function dStartText() {
177
180
  return {
178
- description: `This property sets a text to appear at the start (left side when the ` +
181
+ description: `This property sets an optional text to appear at the start (left side when the ` +
179
182
  `left-to-right direction is set) of the input.`,
180
183
  valueType: "string",
181
184
  };
182
185
  }
183
186
  function dStartIcon() {
184
187
  return {
185
- description: `This property sets an icon to appear at the start (left side when the ` +
188
+ description: `This property sets an optional icon to appear at the start (left side when the ` +
186
189
  `left-to-right direction is set) of the input.`,
187
190
  valueType: "string",
188
191
  };
189
192
  }
190
193
  function dEndText() {
191
194
  return {
192
- description: `This property sets a text to appear on the end (right side when the ` +
195
+ description: `This property sets an optional text to appear on the end (right side when the ` +
193
196
  `left-to-right direction is set) of the input.`,
194
197
  valueType: "string",
195
198
  };
196
199
  }
197
200
  function dEndIcon() {
198
201
  return {
199
- description: `This property sets an icon to appear on the end (right side when the ` +
202
+ description: `This property sets an optional icon to appear on the end (right side when the ` +
200
203
  `left-to-right direction is set) of the input.`,
201
204
  valueType: "string",
202
205
  };
@@ -17,7 +17,6 @@ const classnames_1 = __importDefault(require("classnames"));
17
17
  const ButtonNative_1 = require("../components/Button/ButtonNative");
18
18
  const InspectorButton_module_scss_1 = __importDefault(require("./InspectorButton.module.scss"));
19
19
  const ComponentRegistryContext_1 = require("../components/ComponentRegistryContext");
20
- const pi_1 = require("react-icons/pi");
21
20
  // --- The context object that is used to store the inspector information.
22
21
  exports.InspectorContext = (0, react_1.createContext)(null);
23
22
  function InspectorProvider({ children, sources, projectCompilation, mockApi, }) {
@@ -188,7 +187,7 @@ function InspectButton({ inspectId, node, inspectedNode, setInspectedNode, setSh
188
187
  ? null
189
188
  : visible &&
190
189
  !!root &&
191
- (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(ButtonNative_1.Button, Object.assign({ variant: "ghost", className: (0, classnames_1.default)(InspectorButton_module_scss_1.default.wrapper, "_debug-inspect-button"), ref: (el) => setPopperElement(el), style: Object.assign(Object.assign({}, popperStyles.popper), { padding: 0 }) }, attributes.popper, { onMouseEnter: () => {
190
+ (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(ButtonNative_1.Button, Object.assign({ variant: "outlined", className: (0, classnames_1.default)(InspectorButton_module_scss_1.default.wrapper, "_debug-inspect-button"), ref: (el) => setPopperElement(el), style: Object.assign(Object.assign({}, popperStyles.popper), { padding: 0 }) }, attributes.popper, { onMouseEnter: () => {
192
191
  hoverRef.current = true;
193
192
  if (timeoutRef.current) {
194
193
  clearTimeout(timeoutRef.current);
@@ -200,7 +199,7 @@ function InspectButton({ inspectId, node, inspectedNode, setInspectedNode, setSh
200
199
  }, onClick: () => {
201
200
  setInspectedNode(node);
202
201
  setShowCode(true);
203
- }, children: (0, jsx_runtime_1.jsx)(pi_1.PiFileCode, { className: InspectorButton_module_scss_1.default.inspectIcon }) })), root) }));
202
+ }, children: "Show code" })), root) }));
204
203
  }
205
204
  function useDevTools() {
206
205
  const context = (0, react_1.useContext)(exports.InspectorContext);
@@ -209,10 +208,6 @@ function useDevTools() {
209
208
  inspectedNode: context === null || context === void 0 ? void 0 : context.inspectedNode,
210
209
  sources: context === null || context === void 0 ? void 0 : context.sources,
211
210
  setIsOpen: context === null || context === void 0 ? void 0 : context.setIsOpen,
212
- devToolsSize: context === null || context === void 0 ? void 0 : context.devToolsSize,
213
- setDevToolsSize: context === null || context === void 0 ? void 0 : context.setDevToolsSize,
214
- devToolsSide: context === null || context === void 0 ? void 0 : context.devToolsSide,
215
- setDevToolsSide: context === null || context === void 0 ? void 0 : context.setDevToolsSide,
216
211
  devToolsEnabled: context === null || context === void 0 ? void 0 : context.devToolsEnabled,
217
212
  mockApi: context === null || context === void 0 ? void 0 : context.mockApi,
218
213
  };
@@ -170,7 +170,7 @@ class ApiInterceptor {
170
170
  status: successStatusCode,
171
171
  });
172
172
  }
173
- console.log(operationId, ret);
173
+ // console.log(operationId, ret)
174
174
  return msw_1.HttpResponse.json(ret, {
175
175
  headers: headers,
176
176
  status: successStatusCode,
@@ -50,6 +50,7 @@ const useApiInterceptorContext_1 = require("./useApiInterceptorContext");
50
50
  // This React component injects the API interceptor into the application's context
51
51
  function ApiInterceptorProvider({ interceptor, children, apiWorker, useHashBasedRouting, }) {
52
52
  const [initialized, setInitialized] = (0, react_1.useState)(!interceptor);
53
+ const [interceptorWorker, setInterceptorWorker] = (0, react_1.useState)(null);
53
54
  // --- Whenever the interceptor changes, update the provider accordingly
54
55
  (0, react_1.useEffect)(() => {
55
56
  if (interceptor) {
@@ -62,6 +63,7 @@ function ApiInterceptorProvider({ interceptor, children, apiWorker, useHashBased
62
63
  const { createApiInterceptorWorker } = yield Promise.resolve().then(() => __importStar(require("./apiInterceptorWorker")));
63
64
  if (interceptor) {
64
65
  interceptorWorker = yield createApiInterceptorWorker(interceptor, apiWorker);
66
+ setInterceptorWorker(interceptorWorker);
65
67
  // if the apiWorker comes from the outside, we don't handle the lifecycle here
66
68
  if (!apiWorker) {
67
69
  const workerFileLocation = (0, misc_1.normalizePath)(process.env.VITE_MOCK_WORKER_LOCATION || "mockServiceWorker.js");
@@ -87,8 +89,10 @@ function ApiInterceptorProvider({ interceptor, children, apiWorker, useHashBased
87
89
  }, [apiWorker, interceptor, useHashBasedRouting]);
88
90
  const contextValue = (0, react_1.useMemo)(() => {
89
91
  return {
92
+ interceptorWorker,
93
+ initialized: initialized,
90
94
  isMocked: (url) => interceptor !== undefined && !!process.env.VITE_MOCK_ENABLED,
91
95
  };
92
- }, [interceptor]);
93
- return ((0, jsx_runtime_1.jsx)(useApiInterceptorContext_1.ApiInterceptorContext.Provider, { value: contextValue, children: initialized ? children || null : null }));
96
+ }, [interceptorWorker, initialized, interceptor]);
97
+ return ((0, jsx_runtime_1.jsx)(useApiInterceptorContext_1.ApiInterceptorContext.Provider, { value: contextValue, children: children }));
94
98
  }
@@ -275,7 +275,7 @@ function DataLoader({ loader, state, registerComponentApi, onLoaded, onError, lo
275
275
  return;
276
276
  }
277
277
  }
278
- const errorMessage = (0, extractParam_1.extractParam)(Object.assign(Object.assign({}, stateRef.current.state), { $error: error }), loader.props.errorNotificationMessage, stateRef.current.appContext);
278
+ const errorMessage = (0, extractParam_1.extractParam)(Object.assign(Object.assign({}, stateRef.current.state), { $error: error === null || error === void 0 ? void 0 : error.toString() }), loader.props.errorNotificationMessage, stateRef.current.appContext);
279
279
  if (errorMessage) {
280
280
  react_hot_toast_1.default.error(errorMessage, {
281
281
  id: loadingToastIdRef.current,
@@ -16,18 +16,22 @@ const immer_1 = require("immer");
16
16
  const extractParam_1 = require("../utils/extractParam");
17
17
  const AppContext_1 = require("../AppContext");
18
18
  const hooks_1 = require("../utils/hooks");
19
+ const useApiInterceptorContext_1 = require("../interception/useApiInterceptorContext");
19
20
  function Loader({ state, loader, loaderFn, queryId, pollIntervalInSeconds, registerComponentApi, onLoaded, loaderLoaded, loaderInProgressChanged, loaderIsRefetchingChanged, loaderError, transformResult, structuralSharing = true }) {
20
21
  const { uid } = loader;
21
22
  const appContext = (0, AppContext_1.useAppContext)();
23
+ const { initialized } = (0, useApiInterceptorContext_1.useApiInterceptorContext)();
22
24
  // --- Rely on react-query to decide when data fetching should use the cache or when is should fetch the data from
23
25
  // --- its data source.
24
26
  // --- data: The data obtained by the query
25
27
  // --- status: Query execution status
26
28
  // --- error: Error information about the current query error (in "error" state)
27
29
  // --- refetch: The function that can be used to re-fetch the data (because of data/state changes)
28
- const { data, status, isFetching, error, refetch, isRefetching } = (0, react_query_1.useQuery)({
30
+ const { data, status, isFetching, isLoading, error, refetch, isRefetching } = (0, react_query_1.useQuery)({
29
31
  queryKey: (0, react_1.useMemo)(() => (queryId ? queryId : [uid, (0, extractParam_1.extractParam)(state, loader.props, appContext)]), [appContext, loader.props, queryId, state, uid]),
30
32
  structuralSharing,
33
+ //we pause the loaders if the apiInterceptor is not initialized (true when the app is not using mockApi)
34
+ enabled: initialized,
31
35
  queryFn: (0, react_1.useCallback)((_a) => __awaiter(this, [_a], void 0, function* ({ signal }) {
32
36
  // console.log("[Loader queryFn] Starting to fetch data...");
33
37
  try {
@@ -77,8 +81,8 @@ function Loader({ state, loader, loaderFn, queryId, pollIntervalInSeconds, regis
77
81
  const prevData = (0, hooks_1.usePrevious)(data);
78
82
  const prevError = (0, hooks_1.usePrevious)(error);
79
83
  (0, hooks_1.useIsomorphicLayoutEffect)(() => {
80
- loaderInProgressChanged(isFetching);
81
- }, [isFetching, loaderInProgressChanged]);
84
+ loaderInProgressChanged(isFetching || isLoading);
85
+ }, [isLoading, isFetching, loaderInProgressChanged]);
82
86
  (0, hooks_1.useIsomorphicLayoutEffect)(() => {
83
87
  loaderIsRefetchingChanged(isRefetching);
84
88
  }, [isRefetching, loaderIsRefetchingChanged]);
@@ -6,17 +6,18 @@ exports.palette = {
6
6
  $colorSurface50: "$color-surface-50",
7
7
  $colorSurface100: "$color-surface-100",
8
8
  $colorSurface200: "$color-surface-200",
9
- $colorSurface200A80: "rgba($color-surface-200-rgb, .8)",
9
+ $colorSurface200A70: "rgb(from $color-surface-200 r g b / 0.7)",
10
+ $colorSurface200A80: "rgb(from $color-surface-200 r g b / 0.8)",
10
11
  $colorSurface300: "$color-surface-300",
11
- $colorSurface400A80: "rgba($color-surface-400-rgb, .8)",
12
+ $colorSurface400A80: "rgb(from $color-surface-400 r g b / 0.8)",
12
13
  $colorSurface400: "$color-surface-400",
13
14
  $colorSurface500: "$color-surface-500",
14
15
  $colorSurface500A80: "rgba($color-surface-500, .8)",
15
16
  $colorSurface500A60: "rgba($color-surface-500, .6)",
16
17
  $colorSurface600: "$color-surface-600",
17
18
  $colorSurface700: "$color-surface-700",
18
- $colorSurface700A30: "rgba($color-surface-700-rgb, .3)",
19
- $colorSurface700A90: "rgba($color-surface-700-rgb, .9)",
19
+ $colorSurface700A30: "rgb(from $color-surface-700 r g b / 0.3)",
20
+ $colorSurface700A90: "rgb(from $color-surface-700 r g b / 0.9)",
20
21
  $colorSurface800: "$color-surface-800",
21
22
  $colorSurface900: "$color-surface-900",
22
23
  $colorSurface950: "$color-surface-950",
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RootThemeDefinition = void 0;
4
4
  const palette_1 = require("./palette");
5
- const { $colorSurface0, $colorSurface50, $colorSurface100, $colorSurface200, $colorSurface300, $colorSurface400, $colorSurface500, $colorSurface500A80, $colorSurface500A60, $colorSurface600, $colorSurface700, $colorSurface800, $colorSurface900, $colorSurface950, $colorPrimary50, $colorPrimary950, $colorWarn700, $colorDanger400, $colorDanger500, $colorDanger600, $colorDanger700, $colorSuccess600, $colorInfo600, $colorInfo800, } = palette_1.palette;
5
+ const { $colorSurface0, $colorSurface50, $colorSurface100, $colorSurface200A80, $colorSurface200A70, $colorSurface200, $colorSurface300, $colorSurface400, $colorSurface500, $colorSurface500A80, $colorSurface500A60, $colorSurface600, $colorSurface700, $colorSurface800, $colorSurface900, $colorSurface950, $colorPrimary50, $colorPrimary950, $colorWarn700, $colorDanger400, $colorDanger500, $colorDanger600, $colorDanger700, $colorSuccess600, $colorInfo600, $colorInfo800, } = palette_1.palette;
6
6
  // --- This theme contains the application-bound base theme variables and their default values.
7
7
  // --- Individual controls also add their component-specific default theme variable values.
8
8
  exports.RootThemeDefinition = {
@@ -147,7 +147,7 @@ exports.RootThemeDefinition = {
147
147
  "maxWidth-large-desktop": "1400px",
148
148
  // --- The app's default radius value
149
149
  borderRadius: "4px",
150
- "outlineColor--focus": "rgba($color-primary-500-rgb, .5)",
150
+ "outlineColor--focus": "rgb(from $color-primary-500 r g b / 0.5)",
151
151
  "outlineWidth--focus": "2px",
152
152
  "outlineStyle--focus": "solid",
153
153
  "outlineOffset--focus": "0",
@@ -160,6 +160,7 @@ exports.RootThemeDefinition = {
160
160
  "fontSize-medium": "1.25rem",
161
161
  "fontSize-normal": "1rem",
162
162
  "fontSize-small": "0.875rem",
163
+ "fontSize-code": "0.75rem",
163
164
  "fontSize-smaller": "0.75rem",
164
165
  "fontSize-tiny": "0.625rem",
165
166
  // --- The default font size
@@ -201,8 +202,8 @@ exports.RootThemeDefinition = {
201
202
  "backgroundColor-dropdown-item--active-hover": $colorSurface50,
202
203
  "backgroundColor-tree-row--selected--before": $colorPrimary50,
203
204
  // --- Border colors
204
- "borderColor": $colorSurface200,
205
- "borderColor--disabled": $colorSurface200,
205
+ "borderColor": "rgb(from $color-surface-900 r g b / 0.1)",
206
+ "borderColor--disabled": $colorSurface100,
206
207
  // --- Text colors
207
208
  "textColor-secondary": $colorSurface600,
208
209
  // --- Input is an abstract component, so we define its default theme variables here
@@ -35,8 +35,7 @@ function generateBaseTones(theme) {
35
35
  return {};
36
36
  }
37
37
  const resolvedTheme = resolveThemeVars(theme);
38
- let colorTones = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, generateBaseTonesForColor("color-primary", resolvedTheme)), generateBaseTonesForColor("color-secondary", resolvedTheme)), generateBaseTonesForColor("color-info", resolvedTheme)), generateBaseTonesForColor("color-success", resolvedTheme)), generateBaseTonesForColor("color-warn", resolvedTheme)), generateBaseTonesForColor("color-danger", resolvedTheme)), generateBaseTonesForColor("color-surface", resolvedTheme, { distributeEven: true }));
39
- return Object.assign(Object.assign(Object.assign(Object.assign({}, colorTones), generateRbgChannelsForTone("color-surface", Object.assign(Object.assign({}, resolvedTheme), colorTones))), generateRbgChannelsForTone("color-primary", Object.assign(Object.assign({}, resolvedTheme), colorTones))), generateRbgChannelsForTone("color-secondary", Object.assign(Object.assign({}, resolvedTheme), colorTones)));
38
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, generateBaseTonesForColor("color-primary", resolvedTheme)), generateBaseTonesForColor("color-secondary", resolvedTheme)), generateBaseTonesForColor("color-info", resolvedTheme)), generateBaseTonesForColor("color-success", resolvedTheme)), generateBaseTonesForColor("color-warn", resolvedTheme)), generateBaseTonesForColor("color-danger", resolvedTheme)), generateBaseTonesForColor("color-surface", resolvedTheme, { distributeEven: true }));
40
39
  }
41
40
  function generateBaseSpacings(theme) {
42
41
  if (!theme) {
@@ -688,21 +687,6 @@ function generateBaseTonesForColor(varName, theme, options = { distributeEven: f
688
687
  return {};
689
688
  }
690
689
  }
691
- function generateRbgChannelsForTone(varName, theme) {
692
- return {
693
- [`${varName}-50-rgb`]: getRgbChannelsString(theme[`${varName}-50`]),
694
- [`${varName}-100-rgb`]: getRgbChannelsString(theme[`${varName}-100`]),
695
- [`${varName}-200-rgb`]: getRgbChannelsString(theme[`${varName}-200`]),
696
- [`${varName}-300-rgb`]: getRgbChannelsString(theme[`${varName}-300`]),
697
- [`${varName}-400-rgb`]: getRgbChannelsString(theme[`${varName}-400`]),
698
- [`${varName}-500-rgb`]: getRgbChannelsString(theme[`${varName}-500`]),
699
- [`${varName}-600-rgb`]: getRgbChannelsString(theme[`${varName}-600`]),
700
- [`${varName}-700-rgb`]: getRgbChannelsString(theme[`${varName}-700`]),
701
- [`${varName}-800-rgb`]: getRgbChannelsString(theme[`${varName}-800`]),
702
- [`${varName}-900-rgb`]: getRgbChannelsString(theme[`${varName}-900`]),
703
- [`${varName}-950-rgb`]: getRgbChannelsString(theme[`${varName}-950`]),
704
- };
705
- }
706
690
  function mapTones(baseColor, mapper) {
707
691
  const tones = generateTones(baseColor);
708
692
  if (!tones) {