xmlui 0.9.66 → 0.9.69

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 (105) hide show
  1. package/dist/lib/{apiInterceptorWorker-DSCdWyUK.mjs → apiInterceptorWorker-UGlauegS.mjs} +1 -1
  2. package/dist/lib/{index-oT3hI265.mjs → index-D4XP6T9c.mjs} +16165 -26197
  3. package/dist/lib/index.css +1 -1
  4. package/dist/lib/xmlui.d.ts +3 -27
  5. package/dist/lib/xmlui.mjs +1 -1
  6. package/dist/metadata/{apiInterceptorWorker-DZEO3I9-.mjs → apiInterceptorWorker-CNbJTzxw.mjs} +1 -1
  7. package/dist/metadata/{collectedComponentMetadata-BrcObxPh.mjs → collectedComponentMetadata-BJTdYg2J.mjs} +18207 -27024
  8. package/dist/metadata/style.css +1 -1
  9. package/dist/metadata/xmlui-metadata.mjs +1 -1
  10. package/dist/metadata/xmlui-metadata.umd.js +130 -137
  11. package/dist/scripts/package.json +7 -4
  12. package/dist/scripts/src/components/APICall/APICall.js +9 -8
  13. package/dist/scripts/src/components/Accordion/AccordionItem.js +1 -0
  14. package/dist/scripts/src/components/App/App.js +1 -1
  15. package/dist/scripts/src/components/App/AppNative.js +10 -7
  16. package/dist/scripts/src/components/App/LinkInfoContext.js +9 -0
  17. package/dist/scripts/src/components/AppState/AppState.js +1 -0
  18. package/dist/scripts/src/components/AutoComplete/AutoComplete.js +2 -2
  19. package/dist/scripts/src/components/Avatar/Avatar.js +1 -0
  20. package/dist/scripts/src/components/Bookmark/Bookmark.js +1 -0
  21. package/dist/scripts/src/components/Breakout/Breakout.js +1 -0
  22. package/dist/scripts/src/components/Button/Button.js +1 -1
  23. package/dist/scripts/src/components/Card/Card.js +1 -0
  24. package/dist/scripts/src/components/Carousel/CarouselItem.js +3 -1
  25. package/dist/scripts/src/components/ChangeListener/ChangeListener.js +1 -0
  26. package/dist/scripts/src/components/Charts/BarChart/BarChart.js +1 -1
  27. package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +2 -2
  28. package/dist/scripts/src/components/Charts/DonutChart/DonutChart.js +1 -1
  29. package/dist/scripts/src/components/Charts/LabelList/LabelList.js +1 -1
  30. package/dist/scripts/src/components/Charts/Legend/Legend.js +1 -1
  31. package/dist/scripts/src/components/Charts/LineChart/LineChart.js +1 -1
  32. package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +2 -2
  33. package/dist/scripts/src/components/Charts/PieChart/PieChart.js +1 -1
  34. package/dist/scripts/src/components/Charts/PieChart/PieChartNative.js +2 -2
  35. package/dist/scripts/src/components/Checkbox/Checkbox.js +9 -6
  36. package/dist/scripts/src/components/CodeBlock/CodeBlock.js +1 -2
  37. package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +2 -25
  38. package/dist/scripts/src/components/CodeBlock/highlight-code.js +102 -69
  39. package/dist/scripts/src/components/ColorPicker/ColorPicker.js +1 -0
  40. package/dist/scripts/src/components/Column/Column.js +1 -0
  41. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +1 -0
  42. package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +4 -0
  43. package/dist/scripts/src/components/ExpandableItem/ExpandableItem.js +1 -0
  44. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +1 -0
  45. package/dist/scripts/src/components/FlowLayout/FlowLayout.js +1 -0
  46. package/dist/scripts/src/components/Footer/Footer.js +1 -0
  47. package/dist/scripts/src/components/FormItem/FormItem.js +1 -3
  48. package/dist/scripts/src/components/Heading/Heading.js +7 -0
  49. package/dist/scripts/src/components/HelloWorld/HelloWorld.js +1 -1
  50. package/dist/scripts/src/components/HtmlTags/HtmlTags.js +114 -100
  51. package/dist/scripts/src/components/Image/Image.js +1 -0
  52. package/dist/scripts/src/components/Items/Items.js +1 -0
  53. package/dist/scripts/src/components/Link/Link.js +3 -2
  54. package/dist/scripts/src/components/List/ListNative.js +1 -1
  55. package/dist/scripts/src/components/Markdown/Markdown.js +1 -0
  56. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +1 -0
  57. package/dist/scripts/src/components/NavGroup/NavGroup.js +1 -0
  58. package/dist/scripts/src/components/NavLink/NavLink.js +1 -0
  59. package/dist/scripts/src/components/NavPanel/NavPanel.js +9 -2
  60. package/dist/scripts/src/components/NavPanel/NavPanelNative.js +10 -9
  61. package/dist/scripts/src/components/NestedApp/AppWithCodeView.js +1 -1
  62. package/dist/scripts/src/components/NestedApp/AppWithCodeViewNative.js +5 -5
  63. package/dist/scripts/src/components/NestedApp/NestedApp.js +3 -2
  64. package/dist/scripts/src/components/NestedApp/NestedAppNative.js +15 -5
  65. package/dist/scripts/src/components/NoResult/NoResult.js +1 -0
  66. package/dist/scripts/src/components/Option/Option.js +7 -1
  67. package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +1 -0
  68. package/dist/scripts/src/components/Pages/Pages.js +1 -0
  69. package/dist/scripts/src/components/Pages/PagesNative.js +0 -5
  70. package/dist/scripts/src/components/ProgressBar/ProgressBar.js +1 -0
  71. package/dist/scripts/src/components/Queue/Queue.js +1 -0
  72. package/dist/scripts/src/components/RadioGroup/RadioGroup.js +1 -0
  73. package/dist/scripts/src/components/Redirect/Redirect.js +1 -0
  74. package/dist/scripts/src/components/Select/HiddenOption.js +1 -1
  75. package/dist/scripts/src/components/Select/Select.js +2 -2
  76. package/dist/scripts/src/components/Select/SelectNative.js +15 -9
  77. package/dist/scripts/src/components/SpaceFiller/SpaceFiller.js +1 -0
  78. package/dist/scripts/src/components/Spinner/Spinner.js +1 -0
  79. package/dist/scripts/src/components/Splitter/Splitter.js +1 -0
  80. package/dist/scripts/src/components/Stack/Stack.js +1 -0
  81. package/dist/scripts/src/components/Switch/Switch.js +3 -2
  82. package/dist/scripts/src/components/Table/Table.js +1 -0
  83. package/dist/scripts/src/components/TableEditor/TableEditor.js +1 -1
  84. package/dist/scripts/src/components/TableOfContents/TableOfContents.js +1 -1
  85. package/dist/scripts/src/components/Tabs/TabItem.js +1 -0
  86. package/dist/scripts/src/components/Tabs/TabItemNative.js +1 -2
  87. package/dist/scripts/src/components/Tabs/Tabs.js +1 -5
  88. package/dist/scripts/src/components/Text/Text.js +5 -2
  89. package/dist/scripts/src/components/Theme/Theme.js +1 -0
  90. package/dist/scripts/src/components/Toggle/Toggle.js +11 -8
  91. package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +62 -3
  92. package/dist/scripts/src/components-core/Fragment.js +1 -0
  93. package/dist/scripts/src/components-core/XmluiCodeHighlighter.js +3 -1
  94. package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +13 -7
  95. package/dist/scripts/src/components-core/loader/ApiLoader.js +1 -0
  96. package/dist/scripts/src/components-core/loader/DataLoader.js +1 -0
  97. package/dist/scripts/src/components-core/loader/ExternalDataLoader.js +1 -0
  98. package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +1 -0
  99. package/dist/scripts/src/components-core/rendering/AppContent.js +9 -0
  100. package/dist/scripts/src/components-core/rendering/StateContainer.js +11 -7
  101. package/dist/scripts/src/components-core/theming/themes/root.js +1 -1
  102. package/dist/standalone/xmlui-standalone.es.d.ts +3 -27
  103. package/dist/standalone/xmlui-standalone.umd.js +239 -239
  104. package/package.json +7 -4
  105. package/dist/scripts/src/components/ValidationSummary/ValidationSummaryNative.js +0 -64
@@ -12,6 +12,7 @@ const metadata_helpers_1 = require("../metadata-helpers");
12
12
  const ImageNative_1 = require("./ImageNative");
13
13
  const COMP = "Image";
14
14
  exports.ImageMd = (0, metadata_helpers_1.createMetadata)({
15
+ status: "stable",
15
16
  description: "`Image` displays pictures from URLs or local sources with built-in responsive " +
16
17
  "sizing, aspect ratio control, and accessibility features. It handles different " +
17
18
  "image formats and provides options for lazy loading and click interactions.",
@@ -8,6 +8,7 @@ const metadata_helpers_1 = require("../metadata-helpers");
8
8
  const ItemsNative_1 = require("./ItemsNative");
9
9
  const COMP = "Items";
10
10
  exports.ItemsMd = (0, metadata_helpers_1.createMetadata)({
11
+ status: "stable",
11
12
  description: "`Items` renders data arrays without built-in layout or styling, providing " +
12
13
  "a lightweight alternative to `List`. Unlike `List`, it provides no " +
13
14
  "virtualization, grouping, or visual formatting — just pure data iteration.",
@@ -13,6 +13,7 @@ const abstractions_1 = require("../abstractions");
13
13
  const LinkNative_1 = require("./LinkNative");
14
14
  const COMP = "Link";
15
15
  exports.LinkMd = (0, metadata_helpers_1.createMetadata)({
16
+ status: "stable",
16
17
  description: "`Link` creates clickable navigation elements for internal app routes or " +
17
18
  "external URLs. You can use the `label` and `icon` properties for simple text " +
18
19
  "links, or embed custom components like buttons, cards, or complex layouts " +
@@ -41,9 +42,9 @@ exports.LinkMd = (0, metadata_helpers_1.createMetadata)({
41
42
  defaultThemeVars: {
42
43
  [`border-${COMP}`]: "0px solid $borderColor",
43
44
  [`textColor-${COMP}`]: "$color-primary-500",
44
- [`textDecorationColor-${COMP}`]: "$color-primary-500",
45
+ [`textDecorationColor-${COMP}`]: `textDecorationColor-${COMP}`,
45
46
  [`textColor-${COMP}--hover`]: `$color-primary-400`,
46
- [`textDecorationColor-${COMP}--hover`]: "$color-primary-400",
47
+ [`textDecorationColor-${COMP}--hover`]: `textColor-${COMP}--hover`,
47
48
  [`textColor-${COMP}--active`]: "$color-primary-400",
48
49
  [`textDecorationColor-${COMP}--active`]: "$color-primary-400",
49
50
  [`textColor-${COMP}--hover--active`]: `$textColor-${COMP}--active`,
@@ -392,7 +392,7 @@ exports.ListNative = (0, react_1.forwardRef)(function DynamicHeightList({ items
392
392
  const row = rows === null || rows === void 0 ? void 0 : rows[rowIndex];
393
393
  const key = row === null || row === void 0 ? void 0 : row[idKey];
394
394
  if (!row) {
395
- return (0, jsx_runtime_1.jsx)("div", {}, rowIndex);
395
+ return null;
396
396
  }
397
397
  // --- End change
398
398
  switch (row._row_type) {
@@ -15,6 +15,7 @@ const utils_1 = require("./utils");
15
15
  const metadata_helpers_1 = require("../metadata-helpers");
16
16
  const COMP = "Markdown";
17
17
  exports.MarkdownMd = (0, metadata_helpers_1.createMetadata)({
18
+ status: "stable",
18
19
  description: "`Markdown` renders formatted text using markdown syntax. Use " +
19
20
  "[Text](/working-with-text) for simple, styled text content, and `Markdown` " +
20
21
  "when you need [rich formatting](/working-with-markdown).",
@@ -14,6 +14,7 @@ const ModalDialogNative_1 = require("./ModalDialogNative");
14
14
  const metadata_helpers_1 = require("../metadata-helpers");
15
15
  const COMP = "ModalDialog";
16
16
  exports.ModalDialogMd = (0, metadata_helpers_1.createMetadata)({
17
+ status: "stable",
17
18
  description: "`ModalDialog` creates overlay dialogs that appear on top of the main interface, " +
18
19
  "ideal for forms, confirmations, detailed views, or any content that requires " +
19
20
  "focused user attention. Dialogs are programmatically opened using the `open()` " +
@@ -14,6 +14,7 @@ const metadata_helpers_1 = require("../metadata-helpers");
14
14
  const NavGroupNative_1 = require("./NavGroupNative");
15
15
  const COMP = "NavGroup";
16
16
  exports.NavGroupMd = (0, metadata_helpers_1.createMetadata)({
17
+ status: "stable",
17
18
  description: "`NavGroup` creates collapsible containers for organizing related navigation " +
18
19
  "items into hierarchical menu structures. It groups `NavLink` components and " +
19
20
  "other `NavGroup` components, providing expandable submenus with customizable " +
@@ -14,6 +14,7 @@ const NavLinkNative_1 = require("./NavLinkNative");
14
14
  const abstractions_1 = require("../abstractions");
15
15
  const COMP = "NavLink";
16
16
  exports.NavLinkMd = (0, metadata_helpers_1.createMetadata)({
17
+ status: "stable",
17
18
  description: "`NavLink` creates interactive navigation items that connect users to different " +
18
19
  "destinations within an app or external URLs. It automatically indicates active " +
19
20
  "states, supports custom icons and labels, and can execute custom actions instead " +
@@ -10,8 +10,10 @@ const renderers_1 = require("../../components-core/renderers");
10
10
  const themeVars_1 = require("../../components-core/theming/themeVars");
11
11
  const metadata_helpers_1 = require("../metadata-helpers");
12
12
  const NavPanelNative_1 = require("./NavPanelNative");
13
+ const react_1 = require("react");
13
14
  const COMP = "NavPanel";
14
15
  exports.NavPanelMd = (0, metadata_helpers_1.createMetadata)({
16
+ status: "stable",
15
17
  description: "`NavPanel` defines the navigation structure within an App, serving as a container " +
16
18
  "for NavLink and NavGroup components that create your application's primary " +
17
19
  "navigation menu. Its appearance and behavior automatically adapt based on the " +
@@ -39,7 +41,12 @@ exports.NavPanelMd = (0, metadata_helpers_1.createMetadata)({
39
41
  [`boxShadow-${COMP}-vertical`]: "4px 0 4px 0 rgb(0 0 0 / 10%)",
40
42
  },
41
43
  });
42
- exports.navPanelRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.NavPanelMd, ({ node, renderChild, layoutCss, layoutContext, extractValue }) => {
43
- const navLinks = (0, NavPanelNative_1.buildNavHierarchy)(node.children, extractValue, undefined, []);
44
+ function NavPanelWithBuiltNavHierarchy({ node, renderChild, layoutCss, layoutContext, extractValue, }) {
45
+ const navLinks = (0, react_1.useMemo)(() => {
46
+ return (0, NavPanelNative_1.buildNavHierarchy)(node.children, extractValue, undefined, []);
47
+ }, [extractValue, node.children]);
44
48
  return ((0, jsx_runtime_1.jsx)(NavPanelNative_1.NavPanel, { style: layoutCss, logoContent: renderChild(node.props.logoTemplate), className: layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.themeClassName, inDrawer: layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.inDrawer, renderChild: renderChild, navLinks: navLinks, children: renderChild(node.children) }));
49
+ }
50
+ exports.navPanelRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.NavPanelMd, ({ node, renderChild, layoutCss, layoutContext, extractValue }) => {
51
+ return ((0, jsx_runtime_1.jsx)(NavPanelWithBuiltNavHierarchy, { node: node, renderChild: renderChild, layoutCss: layoutCss, layoutContext: layoutContext, extractValue: extractValue }));
45
52
  });
@@ -48,13 +48,16 @@ const ScrollContext_1 = require("../../components-core/ScrollContext");
48
48
  const LogoNative_1 = require("../Logo/LogoNative");
49
49
  const AppLayoutContext_1 = require("../App/AppLayoutContext");
50
50
  const AppNative_1 = require("../App/AppNative");
51
+ const LinkInfoContext_1 = require("../App/LinkInfoContext");
51
52
  // Function to build navigation hierarchy from component children
52
53
  function buildNavHierarchy(children, extractValue, parent, pathSegments = []) {
53
54
  if (!children)
54
55
  return [];
55
56
  const hierarchy = [];
56
57
  // Skip non-object children
57
- children.filter(child => child && typeof child === 'object').forEach((child) => {
58
+ children
59
+ .filter((child) => child && typeof child === "object")
60
+ .forEach((child) => {
58
61
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
59
62
  if (child.type === "NavLink") {
60
63
  const label = ((_a = extractValue.asOptionalString) === null || _a === void 0 ? void 0 : _a.call(extractValue, (_b = child.props) === null || _b === void 0 ? void 0 : _b.label)) || extractValue((_c = child.props) === null || _c === void 0 ? void 0 : _c.label);
@@ -177,7 +180,7 @@ exports.NavPanelContext = react_1.default.createContext(null);
177
180
  const contextValue = {
178
181
  inDrawer: true,
179
182
  };
180
- function DrawerNavPanel({ logoContent, children, className, style, navLinks, }) {
183
+ function DrawerNavPanel({ logoContent, children, className, style, }) {
181
184
  const scrollContainerRef = (0, react_1.useRef)(null);
182
185
  return ((0, jsx_runtime_1.jsx)(exports.NavPanelContext.Provider, { value: contextValue, children: (0, jsx_runtime_1.jsx)("div", { ref: scrollContainerRef, className: (0, classnames_1.default)(NavPanel_module_scss_1.default.wrapper, className), style: style, children: (0, jsx_runtime_1.jsxs)(ScrollContext_1.ScrollContext.Provider, { value: scrollContainerRef, children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(NavPanel_module_scss_1.default.logoWrapper, NavPanel_module_scss_1.default.inDrawer), children: logoContent || (0, jsx_runtime_1.jsx)(LogoNative_1.Logo, {}) }), (0, jsx_runtime_1.jsx)("div", { className: NavPanel_module_scss_1.default.wrapperInner, style: style, children: children })] }) }) }));
183
186
  }
@@ -186,6 +189,7 @@ exports.NavPanel = (0, react_1.forwardRef)(function NavPanel({ children, style,
186
189
  const scrollContainerRef = (0, react_1.useRef)(null);
187
190
  const ref = forwardedRef ? (0, react_compose_refs_1.composeRefs)(scrollContainerRef, forwardedRef) : scrollContainerRef;
188
191
  const appLayoutContext = (0, AppLayoutContext_1.useAppLayoutContext)();
192
+ const linkInfoContext = (0, LinkInfoContext_1.useLinkInfoContext)();
189
193
  const horizontal = (0, AppNative_1.getAppLayoutOrientation)(appLayoutContext === null || appLayoutContext === void 0 ? void 0 : appLayoutContext.layout) === "horizontal";
190
194
  const showLogo = (appLayoutContext === null || appLayoutContext === void 0 ? void 0 : appLayoutContext.layout) === "vertical" || (appLayoutContext === null || appLayoutContext === void 0 ? void 0 : appLayoutContext.layout) === "vertical-sticky";
191
195
  const isCondensed = (_a = appLayoutContext === null || appLayoutContext === void 0 ? void 0 : appLayoutContext.layout) === null || _a === void 0 ? void 0 : _a.startsWith("condensed");
@@ -193,16 +197,13 @@ exports.NavPanel = (0, react_1.forwardRef)(function NavPanel({ children, style,
193
197
  const safeLogoContent = logoContent || renderChild(appLayoutContext === null || appLayoutContext === void 0 ? void 0 : appLayoutContext.logoContentDef);
194
198
  // Register the linkMap when navLinks change
195
199
  (0, react_1.useEffect)(() => {
196
- if ((appLayoutContext === null || appLayoutContext === void 0 ? void 0 : appLayoutContext.registerLinkMap) && navLinks) {
200
+ if ((linkInfoContext === null || linkInfoContext === void 0 ? void 0 : linkInfoContext.registerLinkMap) && navLinks) {
197
201
  const linkMap = buildLinkMap(navLinks);
198
- appLayoutContext.registerLinkMap(linkMap);
202
+ linkInfoContext.registerLinkMap(linkMap);
199
203
  }
200
- }, [navLinks, appLayoutContext === null || appLayoutContext === void 0 ? void 0 : appLayoutContext.registerLinkMap]);
201
- if (appLayoutContext && !(appLayoutContext === null || appLayoutContext === void 0 ? void 0 : appLayoutContext.isNested)) {
202
- //console.log(navLinks);
203
- }
204
+ }, [navLinks, linkInfoContext === null || linkInfoContext === void 0 ? void 0 : linkInfoContext.registerLinkMap]);
204
205
  if (inDrawer) {
205
- return ((0, jsx_runtime_1.jsx)(DrawerNavPanel, { style: style, logoContent: safeLogoContent, className: className, navLinks: navLinks, children: children }));
206
+ return ((0, jsx_runtime_1.jsx)(DrawerNavPanel, { style: style, logoContent: safeLogoContent, className: className, children: children }));
206
207
  }
207
208
  return ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: (0, classnames_1.default)(NavPanel_module_scss_1.default.wrapper, className, {
208
209
  [NavPanel_module_scss_1.default.horizontal]: horizontal,
@@ -13,7 +13,7 @@ const defaultProps_1 = require("./defaultProps");
13
13
  const metadata_helpers_1 = require("../metadata-helpers");
14
14
  const COMP = "AppWithCodeView";
15
15
  exports.AppWithCodeViewMd = (0, metadata_helpers_1.createMetadata)({
16
- status: "experimental",
16
+ status: "stable",
17
17
  description: `The ${COMP} component displays a combination of markdown content and a nested xmlui app.
18
18
  It supports both side-by-side and stacked layouts.`,
19
19
  props: {
@@ -62,11 +62,11 @@ function AppWithCodeViewNative({ markdown, splitView, withFrame = true, noHeader
62
62
  : `https://docs.xmlui.com/playground#${appQueryString}`, "_blank");
63
63
  }), [app, components, title, activeTheme, api, activeTone, useHashBasedRouting]);
64
64
  if (splitView) {
65
- return ((0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.nestedAppContainer, style: { height }, children: [(0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.header, children: [(0, jsx_runtime_1.jsx)("div", { className: NestedApp_module_scss_1.default.wrapper, children: (0, jsx_runtime_1.jsx)(logo_svg_react_1.default, { className: NestedApp_module_scss_1.default.logo }) }), (0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.viewControls, children: [(0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { onClick: () => setShowCode(true), variant: showCode ? "solid" : "ghost", className: (0, classnames_1.default)(NestedApp_module_scss_1.default.splitViewButton), style: {
66
- backgroundColor: !showCode ? "transparent" : "",
67
- }, children: "XML" }), (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { onClick: () => setShowCode(false), variant: showCode ? "ghost" : "solid", className: (0, classnames_1.default)(NestedApp_module_scss_1.default.splitViewButton), style: {
68
- backgroundColor: showCode ? "transparent" : "",
69
- }, children: "UI" })] }), (0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.wrapper, children: [allowPlaygroundPopup && ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { trigger: (0, jsx_runtime_1.jsx)("button", { className: NestedApp_module_scss_1.default.headerButton, onClick: () => {
65
+ return ((0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.nestedAppContainer, style: { height }, children: [(0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.header, children: [(0, jsx_runtime_1.jsx)("div", { className: NestedApp_module_scss_1.default.wrapper, children: (0, jsx_runtime_1.jsx)(logo_svg_react_1.default, { className: NestedApp_module_scss_1.default.logo }) }), (0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.viewControls, children: [(0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { onClick: () => setShowCode(true), variant: showCode ? "solid" : "ghost", className: (0, classnames_1.default)(NestedApp_module_scss_1.default.splitViewButton, {
66
+ [NestedApp_module_scss_1.default.active]: showCode,
67
+ }), children: "XML" }), (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { onClick: () => setShowCode(false), variant: showCode ? "ghost" : "solid", className: (0, classnames_1.default)(NestedApp_module_scss_1.default.splitViewButton, {
68
+ [NestedApp_module_scss_1.default.active]: !showCode,
69
+ }), children: "UI" })] }), (0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.wrapper, children: [allowPlaygroundPopup && ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { trigger: (0, jsx_runtime_1.jsx)("button", { className: NestedApp_module_scss_1.default.headerButton, onClick: () => {
70
70
  openPlayground();
71
71
  }, children: (0, jsx_runtime_1.jsx)(rx_1.RxOpenInNewWindow, {}) }), label: "View and edit in new full-width window" })), (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { trigger: (0, jsx_runtime_1.jsx)("button", { className: NestedApp_module_scss_1.default.headerButton, onClick: () => {
72
72
  setShowCode(false);
@@ -13,6 +13,7 @@ const defaultProps_1 = require("./defaultProps");
13
13
  const metadata_helpers_1 = require("../metadata-helpers");
14
14
  const COMP = "NestedApp";
15
15
  exports.NestedAppMd = (0, metadata_helpers_1.createMetadata)({
16
+ status: "stable",
16
17
  description: `The ${COMP} component allows you to nest an entire xmlui app into another one.
17
18
  `,
18
19
  props: {
@@ -65,7 +66,7 @@ exports.NestedAppMd = (0, metadata_helpers_1.createMetadata)({
65
66
  [`backgroundColor-frame-${COMP}`]: "$color-primary-50",
66
67
  [`gap-frame-${COMP}`]: "0",
67
68
  [`fontWeight-header-${COMP}`]: "$fontWeight-bold",
68
- [`boxShadow-${COMP}`]: "$boxShadow-md",
69
+ [`boxShadow-${COMP}`]: "0px 0px 32px 0px rgba(0, 0, 0, 0.05)",
69
70
  [`backgroundColor-viewControls-${COMP}`]: "$color-primary-100",
70
71
  [`borderRadius-viewControls-${COMP}`]: "5px",
71
72
  [`padding-viewControls-${COMP}`]: "$space-0_5",
@@ -75,7 +76,7 @@ exports.NestedAppMd = (0, metadata_helpers_1.createMetadata)({
75
76
  [`width-button-splitView-${COMP}`]: "60px",
76
77
  [`width-logo-splitView-${COMP}`]: "2rem",
77
78
  [`height-logo-splitView-${COMP}`]: "2rem",
78
- [`width-controls-${COMP}`]: "76px",
79
+ [`width-controls-${COMP}`]: "80px",
79
80
  },
80
81
  });
81
82
  exports.nestedAppComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.NestedAppMd, ({ node, extractValue, layoutCss }) => {
@@ -19,6 +19,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
19
19
  const react_1 = require("react");
20
20
  const client_1 = __importDefault(require("react-dom/client"));
21
21
  const NestedApp_module_scss_1 = __importDefault(require("./NestedApp.module.scss"));
22
+ const classnames_1 = __importDefault(require("classnames"));
22
23
  const AppRoot_1 = require("../../components-core/rendering/AppRoot");
23
24
  const lia_1 = require("react-icons/lia");
24
25
  const rx_1 = require("react-icons/rx");
@@ -63,11 +64,11 @@ function NestedApp({ api, app, components = constants_1.EMPTY_ARRAY, config, act
63
64
  const toneToApply = activeTone || (config === null || config === void 0 ? void 0 : config.defaultTone) || (theme === null || theme === void 0 ? void 0 : theme.activeThemeTone);
64
65
  const { appGlobals } = (0, AppContext_1.useAppContext)();
65
66
  const componentRegistry = (0, ComponentRegistryContext_1.useComponentRegistry)();
66
- const { interceptorWorker } = (0, useApiInterceptorContext_1.useApiInterceptorContext)();
67
+ const { interceptorWorker, initialized, forceInitialize } = (0, useApiInterceptorContext_1.useApiInterceptorContext)();
67
68
  (0, react_1.useEffect)(() => {
68
69
  setRefreshVersion(refVersion);
69
70
  }, [refVersion]);
70
- //TODO illesg: we should come up with something to make sure that nestedApps doesn't overwrite each other's mocked api endpoints
71
+ //TODO illesg: we should come up with something to make sure that nestedApps don't overwrite each other's mocked api endpoints
71
72
  // disabled for now, as it messes up the paths of not mocked APIs (e.g. resources/{staticJsonfiles})
72
73
  //const safeId = playgroundId || nestedAppId;
73
74
  //const apiUrl = api ? `/${safeId.replaceAll(":", "")}` : '';
@@ -115,7 +116,7 @@ function NestedApp({ api, app, components = constants_1.EMPTY_ARRAY, config, act
115
116
  window.open(useHashBasedRouting
116
117
  ? `${popOutUrl !== null && popOutUrl !== void 0 ? popOutUrl : ""}/#/playground#${appQueryString}`
117
118
  : `${popOutUrl !== null && popOutUrl !== void 0 ? popOutUrl : ""}/playground#${appQueryString}`, "_blank");
118
- }), [app, components, title, activeTheme, api, activeTone, useHashBasedRouting]);
119
+ }), [app, components, title, activeTheme, api, activeTone, useHashBasedRouting, popOutUrl]);
119
120
  (0, react_1.useEffect)(() => {
120
121
  var _a;
121
122
  if (!shadowRef.current && rootRef.current) {
@@ -153,11 +154,17 @@ function NestedApp({ api, app, components = constants_1.EMPTY_ARRAY, config, act
153
154
  Object.keys(theme.themeStyles).forEach((key) => {
154
155
  themeVarReset[key] = "initial";
155
156
  });
156
- let nestedAppRoot = ((0, jsx_runtime_1.jsx)(ApiInterceptorProvider_1.ApiInterceptorProvider, { interceptor: mock, apiWorker: interceptorWorker, children: (0, jsx_runtime_1.jsx)("div", { style: Object.assign(Object.assign({ height }, style), themeVarReset), children: (0, jsx_runtime_1.jsx)(AppRoot_1.AppRoot, { isNested: true, previewMode: true, standalone: true, trackContainerHeight: height ? "fixed" : "auto", node: component, globalProps: globalProps, defaultTheme: activeTheme || (config === null || config === void 0 ? void 0 : config.defaultTheme), defaultTone: toneToApply, contributes: {
157
+ let shouldForceInit = mock && initialized && !interceptorWorker;
158
+ if (shouldForceInit) {
159
+ // in this case we need to force initialize the interceptor worker
160
+ // to make sure that the mock is applied (this could be the case when the 'root' app is not using any mocks)
161
+ forceInitialize();
162
+ }
163
+ let nestedAppRoot = mock && !interceptorWorker ? null : ((0, jsx_runtime_1.jsx)(ApiInterceptorProvider_1.ApiInterceptorProvider, { interceptor: mock, apiWorker: interceptorWorker, children: (0, jsx_runtime_1.jsx)("div", { style: Object.assign(Object.assign({ height }, style), themeVarReset), children: (0, jsx_runtime_1.jsx)(AppRoot_1.AppRoot, { isNested: true, previewMode: true, standalone: true, trackContainerHeight: height ? "fixed" : "auto", node: component, globalProps: globalProps, defaultTheme: activeTheme || (config === null || config === void 0 ? void 0 : config.defaultTheme), defaultTone: toneToApply, contributes: {
157
164
  compoundComponents,
158
165
  themes: config === null || config === void 0 ? void 0 : config.themes,
159
166
  }, resources: config === null || config === void 0 ? void 0 : config.resources, extensionManager: componentRegistry.getExtensionManager() }, `app-${nestedAppId}-${refreshVersion}`) }) }));
160
- (_a = contentRootRef.current) === null || _a === void 0 ? void 0 : _a.render((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { node: component, children: withFrame ? ((0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.nestedAppContainer, children: [!noHeader && ((0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.header, children: [(0, jsx_runtime_1.jsx)("span", { className: NestedApp_module_scss_1.default.headerText, children: title }), (0, jsx_runtime_1.jsx)("div", { className: NestedApp_module_scss_1.default.spacer }), allowPlaygroundPopup && ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { trigger: (0, jsx_runtime_1.jsx)("button", { className: NestedApp_module_scss_1.default.headerButton, onClick: () => {
167
+ (_a = contentRootRef.current) === null || _a === void 0 ? void 0 : _a.render((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { node: component, children: withFrame ? ((0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.nestedAppContainer, children: [!noHeader && ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(NestedApp_module_scss_1.default.header), children: [(0, jsx_runtime_1.jsx)("span", { className: NestedApp_module_scss_1.default.headerText, children: title }), (0, jsx_runtime_1.jsx)("div", { className: NestedApp_module_scss_1.default.spacer }), allowPlaygroundPopup && ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { trigger: (0, jsx_runtime_1.jsx)("button", { className: NestedApp_module_scss_1.default.headerButton, onClick: () => {
161
168
  openPlayground();
162
169
  }, children: (0, jsx_runtime_1.jsx)(rx_1.RxOpenInNewWindow, {}) }), label: "View and edit in new full-width window" })), (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { trigger: (0, jsx_runtime_1.jsx)("button", { className: NestedApp_module_scss_1.default.headerButton, onClick: () => {
163
170
  setRefreshVersion(refreshVersion + 1);
@@ -185,6 +192,9 @@ function NestedApp({ api, app, components = constants_1.EMPTY_ARRAY, config, act
185
192
  withFrame,
186
193
  noHeader,
187
194
  apiUrl,
195
+ initialized,
196
+ style,
197
+ forceInitialize,
188
198
  ]);
189
199
  const mountedRef = (0, react_1.useRef)(false);
190
200
  (0, react_1.useEffect)(() => {
@@ -12,6 +12,7 @@ const metadata_helpers_1 = require("../metadata-helpers");
12
12
  const NoResultNative_1 = require("./NoResultNative");
13
13
  const COMP = "NoResult";
14
14
  exports.NoResultMd = (0, metadata_helpers_1.createMetadata)({
15
+ status: "stable",
15
16
  description: "`NoResult` displays a visual indication that a query or search returned nothing.",
16
17
  props: {
17
18
  label: (0, metadata_helpers_1.dLabel)(),
@@ -8,6 +8,7 @@ const metadata_helpers_1 = require("../metadata-helpers");
8
8
  const OptionNative_1 = require("./OptionNative");
9
9
  const COMP = "Option";
10
10
  exports.OptionMd = (0, metadata_helpers_1.createMetadata)({
11
+ status: "stable",
11
12
  description: "`Option` defines selectable items for choice-based components, providing both " +
12
13
  "the underlying value and display text for selection interfaces. It serves as " +
13
14
  "a non-visual data structure that describes individual choices within " +
@@ -30,7 +31,12 @@ exports.OptionMd = (0, metadata_helpers_1.createMetadata)({
30
31
  });
31
32
  exports.optionComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.OptionMd, ({ node, extractValue, layoutCss, renderChild, layoutContext }) => {
32
33
  const optionTemplate = node.props.optionTemplate;
34
+ const label = extractValue.asOptionalString(node.props.label) || extractValue(node.props.value);
35
+ const value = extractValue.asOptionalString(node.props.value) || extractValue(node.props.label);
36
+ if (label === undefined) {
37
+ return null;
38
+ }
33
39
  return ((0, jsx_runtime_1.jsx)(OptionNative_1.OptionNative, { optionRenderer: optionTemplate
34
40
  ? (contextVars) => ((0, jsx_runtime_1.jsx)(container_helpers_1.MemoizedItem, { node: optionTemplate, renderChild: renderChild, contextVars: contextVars, layoutContext: layoutContext }))
35
- : undefined, value: extractValue(node.props.value), label: extractValue.asOptionalString(node.props.label) || extractValue(node.props.value), enabled: extractValue.asOptionalBoolean(node.props.enabled), style: layoutCss }));
41
+ : undefined, label: label, value: value, enabled: extractValue.asOptionalBoolean(node.props.enabled), style: layoutCss }));
36
42
  });
@@ -7,6 +7,7 @@ const metadata_helpers_1 = require("../metadata-helpers");
7
7
  const PageMetaTilteNative_1 = require("./PageMetaTilteNative");
8
8
  const COMP = "PageMetaTitle";
9
9
  exports.PageMetaTitleMd = (0, metadata_helpers_1.createMetadata)({
10
+ status: "stable",
10
11
  description: "`PageMetaTitle` dynamically sets or updates the browser tab title, enabling " +
11
12
  "pages and components to override the default application name with context-specific titles.",
12
13
  props: {
@@ -26,6 +26,7 @@ exports.pageRenderer = (0, renderers_1.createComponentRenderer)(PAGE, exports.Pa
26
26
  });
27
27
  const COMP = "Pages";
28
28
  exports.PagesMd = (0, metadata_helpers_1.createMetadata)({
29
+ status: "stable",
29
30
  description: "`Pages` serves as the routing coordinator within an [App](/components/App), " +
30
31
  "managing which [Page](/components/Page) displays based on the current URL.",
31
32
  props: {
@@ -23,17 +23,12 @@ const react_2 = require("@remix-run/react");
23
23
  const classnames_1 = __importDefault(require("classnames"));
24
24
  const constants_1 = require("../../components-core/constants");
25
25
  const Pages_module_scss_1 = __importDefault(require("./Pages.module.scss"));
26
- const AppLayoutContext_1 = require("../App/AppLayoutContext");
27
26
  // Default props for Pages component
28
27
  exports.defaultProps = {
29
28
  fallbackPath: "/",
30
29
  };
31
30
  function RouteWrapper({ childRoute = constants_1.EMPTY_ARRAY, renderChild, layoutContext, style, uid, }) {
32
- var _a;
33
31
  const params = (0, react_2.useParams)();
34
- const location = (0, react_2.useLocation)();
35
- const appLayoutContext = (0, AppLayoutContext_1.useAppLayoutContext)();
36
- const linkInfo = ((_a = appLayoutContext === null || appLayoutContext === void 0 ? void 0 : appLayoutContext.linkMap) === null || _a === void 0 ? void 0 : _a.get(location.pathname)) || {};
37
32
  //we need to wrap the child route in a container to make sure the route params are available.
38
33
  // we do this wrapping by providing an empty object to vars.
39
34
  // this way it becomes an 'implicit' container (vars/state inside this container is propagated to the parent)
@@ -12,6 +12,7 @@ const ProgressBarNative_1 = require("./ProgressBarNative");
12
12
  const metadata_helpers_1 = require("../metadata-helpers");
13
13
  const COMP = "ProgressBar";
14
14
  exports.ProgressBarMd = (0, metadata_helpers_1.createMetadata)({
15
+ status: "stable",
15
16
  description: "`ProgressBar` provides a visual indicator showing the completion percentage " +
16
17
  "of tasks, processes, or any measurable progress. It displays as a horizontal " +
17
18
  "bar that fills from left to right based on the provided value between 0 " +
@@ -8,6 +8,7 @@ const metadata_helpers_1 = require("../metadata-helpers");
8
8
  const QueueNative_1 = require("./QueueNative");
9
9
  const COMP = "Queue";
10
10
  exports.QueueMd = (0, metadata_helpers_1.createMetadata)({
11
+ status: "stable",
11
12
  description: "`Queue` manages sequential processing of items in FIFO (first-in, first-out) " +
12
13
  "order. It is a non-visual component but provides UI progress reporting and result display.",
13
14
  props: {
@@ -13,6 +13,7 @@ const RadioGroupNative_1 = require("./RadioGroupNative");
13
13
  const COMP = "RadioGroup";
14
14
  const RGOption = `RadioGroupOption`;
15
15
  exports.RadioGroupMd = (0, metadata_helpers_1.createMetadata)({
16
+ status: "stable",
16
17
  description: "`RadioGroup` creates a mutually exclusive selection interface where users can " +
17
18
  "choose only one option from a group of radio buttons. It manages the selection " +
18
19
  "state and ensures that selecting one option automatically deselects all others in " +
@@ -11,6 +11,7 @@ exports.defaultProps = {
11
11
  to: "",
12
12
  };
13
13
  exports.RedirectMd = (0, metadata_helpers_1.createMetadata)({
14
+ status: "stable",
14
15
  description: "`Redirect` immediately redirects the browser to the URL in its `to` property when " +
15
16
  "it gets visible (its `when` property gets `true`). It works only within " +
16
17
  "[App](/components/App), not externally.",
@@ -11,7 +11,7 @@ function HiddenOption(option) {
11
11
  const opt = (0, react_1.useMemo)(() => {
12
12
  var _a, _b;
13
13
  return Object.assign(Object.assign({}, option), { label: (_a = label !== null && label !== void 0 ? label : node === null || node === void 0 ? void 0 : node.textContent) !== null && _a !== void 0 ? _a : "", keywords: [(_b = label !== null && label !== void 0 ? label : node === null || node === void 0 ? void 0 : node.textContent) !== null && _b !== void 0 ? _b : ""] });
14
- }, [option, node]);
14
+ }, [option, node, label]);
15
15
  (0, react_1.useEffect)(() => {
16
16
  onOptionAdd(opt);
17
17
  return () => onOptionRemove(opt);
@@ -14,11 +14,11 @@ const SelectNative_1 = require("./SelectNative");
14
14
  const react_select_1 = require("@radix-ui/react-select");
15
15
  const COMP = "Select";
16
16
  exports.SelectMd = (0, metadata_helpers_1.createMetadata)({
17
+ status: "stable",
17
18
  description: "`Select` provides a dropdown interface for choosing from a list of options, " +
18
19
  "supporting both single and multiple selection modes. It offers extensive " +
19
20
  "customization capabilities including search functionality, custom templates, " +
20
21
  "and comprehensive form integration.",
21
- status: "stable",
22
22
  props: {
23
23
  placeholder: Object.assign(Object.assign({}, (0, metadata_helpers_1.dPlaceholder)()), { defaultValue: SelectNative_1.defaultProps.placeholder }),
24
24
  initialValue: (0, metadata_helpers_1.dInitialValue)(),
@@ -36,7 +36,7 @@ exports.SelectMd = (0, metadata_helpers_1.createMetadata)({
36
36
  valueTemplate: (0, metadata_helpers_1.dComponent)(`This property allows replacing the default template to display a selected value when ` +
37
37
  `multiple selections (\`multiSelect\` is \`true\`) are enabled.`),
38
38
  dropdownHeight: (0, metadata_helpers_1.d)("This property sets the height of the dropdown list. If not set, the height is determined automatically."),
39
- emptyListTemplate: (0, metadata_helpers_1.d)(`This optional property provides the ability to customize what is displayed when the ` +
39
+ emptyListTemplate: (0, metadata_helpers_1.dComponent)(`This optional property provides the ability to customize what is displayed when the ` +
40
40
  `list of options is empty.`),
41
41
  multiSelect: Object.assign(Object.assign({}, (0, metadata_helpers_1.dMulti)()), { defaultValue: SelectNative_1.defaultProps.multiSelect }),
42
42
  searchable: {
@@ -83,7 +83,7 @@ const SimpleSelect = (0, react_1.forwardRef)(function SimpleSelect(props, forwar
83
83
  }
84
84
  const match = Array.from(options).find((o) => `${o.value}` === val);
85
85
  onValueChange((_a = match === null || match === void 0 ? void 0 : match.value) !== null && _a !== void 0 ? _a : val);
86
- }, [onValueChange, options]);
86
+ }, [onValueChange, options, readOnly]);
87
87
  return ((0, jsx_runtime_1.jsxs)(react_select_1.Root, { value: stringValue, onValueChange: onValChange, children: [(0, jsx_runtime_1.jsxs)(react_select_1.Trigger, { id: id, "aria-haspopup": "listbox", style: style, onFocus: onFocus, onBlur: onBlur, disabled: !enabled, className: (0, classnames_1.default)(Select_module_scss_1.default.selectTrigger, {
88
88
  [Select_module_scss_1.default.error]: validationStatus === "error",
89
89
  [Select_module_scss_1.default.warning]: validationStatus === "warning",
@@ -204,16 +204,16 @@ exports.Select = (0, react_1.forwardRef)(function Select({ id, initialValue, val
204
204
  }) }) })) : ((0, jsx_runtime_1.jsx)("span", { placeholder: placeholder, className: Select_module_scss_1.default.placeholder, children: placeholder }))) : value !== undefined && value !== null ? ((0, jsx_runtime_1.jsx)("div", { children: (_a = Array.from(options).find((o) => o.value === value)) === null || _a === void 0 ? void 0 : _a.label })) : ((0, jsx_runtime_1.jsx)("span", { "aria-placeholder": placeholder, className: Select_module_scss_1.default.placeholder, children: placeholder || "" })), (0, jsx_runtime_1.jsxs)("div", { className: Select_module_scss_1.default.actions, children: [multiSelect && Array.isArray(value) && value.length > 0 && ((0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "close", onClick: (event) => {
205
205
  event.stopPropagation();
206
206
  clearValue();
207
- } })), (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "chevrondown" })] })] }), open && ((0, jsx_runtime_1.jsx)(react_select_1.Portal, { container: root, children: (0, jsx_runtime_1.jsx)(react_focus_scope_1.FocusScope, { asChild: true, loop: true, trapped: true, children: (0, jsx_runtime_1.jsx)(react_popover_1.PopoverContent, { style: { width, height: dropdownHeight }, className: Select_module_scss_1.default.selectContent, children: (0, jsx_runtime_1.jsxs)(cmdk_1.Command, { className: Select_module_scss_1.default.command, shouldFilter: searchable, filter: (value, search, keywords) => {
208
- const extendedValue = value + " " + keywords.join(" ");
209
- if (extendedValue.toLowerCase().includes(search.toLowerCase()))
210
- return 1;
207
+ } })), (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "chevrondown" })] })] }), open && ((0, jsx_runtime_1.jsx)(react_select_1.Portal, { container: root, children: (0, jsx_runtime_1.jsx)(react_focus_scope_1.FocusScope, { asChild: true, loop: true, trapped: true, children: (0, jsx_runtime_1.jsx)(react_popover_1.PopoverContent, { style: { width, height: dropdownHeight }, className: Select_module_scss_1.default.selectContent, children: (0, jsx_runtime_1.jsxs)(cmdk_1.Command, { className: Select_module_scss_1.default.command, shouldFilter: searchable, filter: (_, search, keywords) => {
208
+ const lowSearch = search.toLowerCase();
209
+ for (const kw of keywords) {
210
+ if (kw.toLowerCase().includes(lowSearch))
211
+ return 1;
212
+ }
211
213
  return 0;
212
214
  }, children: [searchable ? ((0, jsx_runtime_1.jsxs)("div", { className: Select_module_scss_1.default.commandInputContainer, children: [(0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "search" }), (0, jsx_runtime_1.jsx)(cmdk_1.CommandInput, { className: (0, classnames_1.default)(Select_module_scss_1.default.commandInput), placeholder: "Search..." })] })) : (
213
215
  // https://github.com/pacocoursey/cmdk/issues/322#issuecomment-2444703817
214
- (0, jsx_runtime_1.jsx)("button", { autoFocus: true, "aria-hidden": "true", className: Select_module_scss_1.default.srOnly })), (0, jsx_runtime_1.jsxs)(cmdk_1.CommandList, { className: Select_module_scss_1.default.commandList, children: [inProgress && ((0, jsx_runtime_1.jsx)("div", { className: Select_module_scss_1.default.loading, children: inProgressNotificationMessage })), Array.from(options).map(({ value, label, enabled, keywords }) => ((0, jsx_runtime_1.jsx)(exports.ComboboxOption, { readOnly: readOnly, value: value, label: label, enabled: enabled, keywords: keywords }, value))), !inProgress && (0, jsx_runtime_1.jsx)(cmdk_1.CommandEmpty, { children: emptyListNode })] })] }) }) }) }))] })) : ((0, jsx_runtime_1.jsx)(SimpleSelect, { readOnly: !!readOnly, ref: ref, value: value, options: options, onValueChange: toggleOption, id: inputId, style: style, onFocus: onFocus, onBlur: onBlur, enabled: enabled, validationStatus: validationStatus, triggerRef: setReferenceElement, autoFocus: autoFocus, placeholder: placeholder, height: dropdownHeight, children: options.size > 0
215
- ? Array.from(options).map((option, idx) => ((0, jsx_runtime_1.jsx)(SelectOption, { value: option.value, label: option.label, enabled: option.enabled }, `${option.value}-${idx}`)))
216
- : emptyListNode })) }), children] }) }) }));
216
+ (0, jsx_runtime_1.jsx)("button", { autoFocus: true, "aria-hidden": "true", className: Select_module_scss_1.default.srOnly })), (0, jsx_runtime_1.jsxs)(cmdk_1.CommandList, { className: Select_module_scss_1.default.commandList, children: [inProgress && ((0, jsx_runtime_1.jsx)("div", { className: Select_module_scss_1.default.loading, children: inProgressNotificationMessage })), Array.from(options).map(({ value, label, enabled, keywords }) => ((0, jsx_runtime_1.jsx)(exports.ComboboxOption, { readOnly: readOnly, value: value, label: label, enabled: enabled, keywords: keywords }, value))), !inProgress && (0, jsx_runtime_1.jsx)(cmdk_1.CommandEmpty, { children: emptyListNode })] })] }) }) }) }))] })) : ((0, jsx_runtime_1.jsx)(SimpleSelect, { readOnly: !!readOnly, ref: ref, value: value, options: options, onValueChange: toggleOption, id: inputId, style: style, onFocus: onFocus, onBlur: onBlur, enabled: enabled, validationStatus: validationStatus, triggerRef: setReferenceElement, autoFocus: autoFocus, placeholder: placeholder, height: dropdownHeight, children: renderOptionsOrDefault(options, emptyListNode) })) }), children] }) }) }));
217
217
  });
218
218
  exports.ComboboxOption = (0, react_1.forwardRef)(function Combobox(option, forwardedRef) {
219
219
  const id = (0, react_1.useId)();
@@ -230,7 +230,7 @@ exports.ComboboxOption = (0, react_1.forwardRef)(function Combobox(option, forwa
230
230
  return;
231
231
  }
232
232
  onChange(value);
233
- }, "data-state": selected ? "checked" : undefined, keywords: keywords, children: (0, jsx_runtime_1.jsx)("div", { className: Select_module_scss_1.default.multiComboboxOptionContent, children: optionRenderer ? (optionRenderer({ label, value, enabled, keywords }, selectedValue, false)) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [optionLabelRenderer ? optionLabelRenderer({ label, value }) : label, selected && (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "checkmark" })] })) }) }, id));
233
+ }, "data-state": selected ? "checked" : undefined, keywords: [...keywords, label], children: (0, jsx_runtime_1.jsx)("div", { className: Select_module_scss_1.default.multiComboboxOptionContent, children: optionRenderer ? (optionRenderer({ label, value, enabled, keywords }, selectedValue, false)) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [optionLabelRenderer ? optionLabelRenderer({ label, value }) : label, selected && (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "checkmark" })] })) }) }, id));
234
234
  });
235
235
  const SelectOption = react_1.default.forwardRef((option, ref) => {
236
236
  const { value, label, enabled = true } = option;
@@ -242,3 +242,9 @@ const SelectOption = react_1.default.forwardRef((option, ref) => {
242
242
  }, selectedValue, false)) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_select_1.ItemText, { className: Select_module_scss_1.default.selectItemContent, children: optionLabelRenderer ? optionLabelRenderer({ value, label }) : label }), selectedValue === value && ((0, jsx_runtime_1.jsx)("span", { className: Select_module_scss_1.default.selectItemIndicator, children: (0, jsx_runtime_1.jsx)(react_select_1.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "checkmark" }) }) }))] })) }) }));
243
243
  });
244
244
  SelectOption.displayName = "SelectOption";
245
+ function renderOptionsOrDefault(options, default_) {
246
+ if (options.size === 0) {
247
+ return default_;
248
+ }
249
+ return Array.from(options).map((option) => ((0, jsx_runtime_1.jsx)(SelectOption, { value: option.value, label: option.label, enabled: option.enabled }, option.value)));
250
+ }
@@ -12,6 +12,7 @@ const SpaceFillerNative_1 = require("./SpaceFillerNative");
12
12
  const metadata_helpers_1 = require("../metadata-helpers");
13
13
  const COMP = "SpaceFiller";
14
14
  exports.SpaceFillerMd = (0, metadata_helpers_1.createMetadata)({
15
+ status: "stable",
15
16
  description: "`SpaceFiller` works well in layout containers to fill remaining (unused) " +
16
17
  "space. Its behavior depends on the layout container in which it is used.",
17
18
  themeVars: (0, themeVars_1.parseScssVar)(SpaceFiller_module_scss_1.default.themeVars),
@@ -12,6 +12,7 @@ const SpinnerNative_1 = require("./SpinnerNative");
12
12
  const metadata_helpers_1 = require("../metadata-helpers");
13
13
  const COMP = "Spinner";
14
14
  exports.SpinnerMd = (0, metadata_helpers_1.createMetadata)({
15
+ status: "stable",
15
16
  description: "`Spinner` is an animated indicator that represents an action in progress " +
16
17
  "with no deterministic progress value.",
17
18
  props: {
@@ -14,6 +14,7 @@ const metadata_helpers_1 = require("../metadata-helpers");
14
14
  const SplitterNative_1 = require("./SplitterNative");
15
15
  const COMP = "Splitter";
16
16
  const baseSplitterMd = (0, metadata_helpers_1.createMetadata)({
17
+ status: "stable",
17
18
  description: "`Splitter` component divides a container into two resizable sections. These " +
18
19
  "are are identified by their names: primary and secondary. They have a " +
19
20
  "draggable bar between them.",
@@ -27,6 +27,7 @@ const VERTICAL_ALIGNMENT = {
27
27
  defaultValue: "start",
28
28
  };
29
29
  const stackMd = (0, metadata_helpers_1.createMetadata)({
30
+ status: "stable",
30
31
  description: "`Stack` is the fundamental layout container that organizes child elements in " +
31
32
  "configurable horizontal or vertical arrangements. As the most versatile building " +
32
33
  "block in XMLUI's layout system, it provides comprehensive alignment, spacing, " +
@@ -5,13 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.switchComponentRenderer = exports.SwitchMd = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
- const Toggle_module_scss_1 = __importDefault(require("../Toggle/Toggle.module.scss"));
8
+ const Switch_module_scss_1 = __importDefault(require("./Switch.module.scss"));
9
9
  const renderers_1 = require("../../components-core/renderers");
10
10
  const themeVars_1 = require("../../components-core/theming/themeVars");
11
11
  const metadata_helpers_1 = require("../metadata-helpers");
12
12
  const Toggle_1 = require("../Toggle/Toggle");
13
13
  const COMP = "Switch";
14
14
  exports.SwitchMd = (0, metadata_helpers_1.createMetadata)({
15
+ status: "stable",
15
16
  description: "`Switch` enables users to toggle between two states: on and off.",
16
17
  props: {
17
18
  indeterminate: (0, metadata_helpers_1.dIndeterminate)(Toggle_1.defaultProps.indeterminate),
@@ -37,7 +38,7 @@ exports.SwitchMd = (0, metadata_helpers_1.createMetadata)({
37
38
  value: (0, metadata_helpers_1.dValueApi)(),
38
39
  setValue: (0, metadata_helpers_1.dSetValueApi)(),
39
40
  },
40
- themeVars: (0, themeVars_1.parseScssVar)(Toggle_module_scss_1.default.themeVars),
41
+ themeVars: (0, themeVars_1.parseScssVar)(Switch_module_scss_1.default.themeVars),
41
42
  limitThemeVarsToComponent: true,
42
43
  defaultThemeVars: {
43
44
  [`borderColor-checked-${COMP}-error`]: `$borderColor-${COMP}-error`,
@@ -18,6 +18,7 @@ const SelectionStoreNative_1 = require("../SelectionStore/SelectionStoreNative")
18
18
  const TableNative_1 = require("./TableNative");
19
19
  const COMP = "Table";
20
20
  exports.TableMd = (0, metadata_helpers_1.createMetadata)({
21
+ status: "stable",
21
22
  description: "`Table` presents structured data for viewing, sorting, selection, and interaction.",
22
23
  props: {
23
24
  items: (0, metadata_helpers_1.dInternal)(`You can use \`items\` as an alias for the \`data\` property. ` +
@@ -142,8 +142,8 @@ const TableEditor = (0, react_1.forwardRef)(function TableEditor({ registerCompo
142
142
  exports.default = TableEditor;
143
143
  // Create metadata for TableEditor that defines allowed props
144
144
  exports.TableEditorMd = (0, metadata_helpers_1.createMetadata)({
145
- description: "`TableEditor` provides an interactive table editing interface with controls for adding and deleting rows and columns. It supports theme customization and exports table data in HTML and Markdown formats.",
146
145
  status: "stable",
146
+ description: "`TableEditor` provides an interactive table editing interface with controls for adding and deleting rows and columns. It supports theme customization and exports table data in HTML and Markdown formats.",
147
147
  props: {
148
148
  themeColor: {
149
149
  description: "Sets the color scheme for all editor buttons.",
@@ -14,7 +14,7 @@ const metadata_helpers_1 = require("../metadata-helpers");
14
14
  const COMP = "TableOfContents";
15
15
  const COMP_CHILD = "TableOfContentsItem";
16
16
  exports.TableOfContentsMd = (0, metadata_helpers_1.createMetadata)({
17
- status: "experimental",
17
+ status: "stable",
18
18
  description: "`TableOfContents` component collects [Heading](/components/Heading) and " +
19
19
  "[Bookmark](/components/Bookmark) within the current page and displays them in a navigable tree.",
20
20
  props: {