xmlui 0.7.32 → 0.7.34

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 (81) hide show
  1. package/dist/{apiInterceptorWorker-iyzFS4kP.mjs → apiInterceptorWorker-DHDoRL37.mjs} +1 -1
  2. package/dist/{index-29eF52eI.mjs → index-B90aqc2f.mjs} +10337 -9968
  3. package/dist/index.css +1 -1
  4. package/dist/{lint-DgP_MIP6.mjs → lint-D3rXRbP1.mjs} +337 -337
  5. package/dist/scripts/bin/language-server.js +11 -0
  6. package/dist/scripts/src/abstractions/ComponentDefs.js +2 -1
  7. package/dist/scripts/src/components/Accordion/Accordion.js +5 -5
  8. package/dist/scripts/src/components/App/App.js +2 -2
  9. package/dist/scripts/src/components/App/AppNative.js +2 -2
  10. package/dist/scripts/src/components/AppHeader/AppHeader.js +6 -3
  11. package/dist/scripts/src/components/AutoComplete/AutoComplete.js +6 -6
  12. package/dist/scripts/src/components/Avatar/Avatar.js +3 -3
  13. package/dist/scripts/src/components/Badge/Badge.js +3 -3
  14. package/dist/scripts/src/components/Button/Button.js +15 -15
  15. package/dist/scripts/src/components/Button/ButtonNative.js +3 -2
  16. package/dist/scripts/src/components/Card/Card.js +2 -2
  17. package/dist/scripts/src/components/Carousel/Carousel.js +4 -1
  18. package/dist/scripts/src/components/ComponentProvider.js +8 -3
  19. package/dist/scripts/src/components/DatePicker/DatePicker.js +2 -2
  20. package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +10 -10
  21. package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +4 -5
  22. package/dist/scripts/src/components/Footer/Footer.js +1 -1
  23. package/dist/scripts/src/components/FormItem/FormItem.js +3 -3
  24. package/dist/scripts/src/components/Heading/Heading.js +21 -27
  25. package/dist/scripts/src/components/Heading/HeadingNative.js +2 -1
  26. package/dist/scripts/src/components/HtmlTags/HtmlTags.js +57 -20
  27. package/dist/scripts/src/components/Icon/Inspect.js +10 -0
  28. package/dist/scripts/src/components/IconProvider.js +3 -1
  29. package/dist/scripts/src/components/IconRegistryContext.js +243 -242
  30. package/dist/scripts/src/components/Link/Link.js +16 -13
  31. package/dist/scripts/src/components/Markdown/Markdown.js +3 -3
  32. package/dist/scripts/src/components/Markdown/MarkdownNative.js +73 -17
  33. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +1 -1
  34. package/dist/scripts/src/components/NavGroup/NavGroup.js +2 -2
  35. package/dist/scripts/src/components/NavLink/NavLink.js +26 -23
  36. package/dist/scripts/src/components/NavPanel/NavPanel.js +6 -6
  37. package/dist/scripts/src/components/NoResult/NoResult.js +1 -1
  38. package/dist/scripts/src/components/OffCanvas/OffCanvas.js +4 -4
  39. package/dist/scripts/src/components/ProgressBar/ProgressBar.js +2 -2
  40. package/dist/scripts/src/components/RadioGroup/RadioGroup.js +2 -2
  41. package/dist/scripts/src/components/Select/Select.js +6 -6
  42. package/dist/scripts/src/components/Select/SelectNative.js +16 -15
  43. package/dist/scripts/src/components/Slider/Slider.js +1 -1
  44. package/dist/scripts/src/components/Table/Table.js +15 -15
  45. package/dist/scripts/src/components/TableOfContents/TableOfContents.js +21 -21
  46. package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +2 -1
  47. package/dist/scripts/src/components/Text/Text.js +39 -40
  48. package/dist/scripts/src/components/TextBox/TextBox.js +6 -6
  49. package/dist/scripts/src/components/Theme/ThemeNative.js +1 -1
  50. package/dist/scripts/src/components-core/ComponentDecorator.js +23 -19
  51. package/dist/scripts/src/components-core/InspectorContext.js +2 -2
  52. package/dist/scripts/src/components-core/abstractions/standalone.js +2 -0
  53. package/dist/scripts/src/components-core/descriptorHelper.js +7 -7
  54. package/dist/scripts/src/components-core/interception/abstractions.js +2 -0
  55. package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +2 -2
  56. package/dist/scripts/src/components-core/rendering/Container.js +21 -34
  57. package/dist/scripts/src/components-core/theming/layout-resolver.js +26 -26
  58. package/dist/scripts/src/components-core/theming/themes/base-utils.js +8 -8
  59. package/dist/scripts/src/components-core/theming/themes/root.js +39 -39
  60. package/dist/scripts/src/components-core/theming/themes/solid.js +2 -2
  61. package/dist/scripts/src/components-core/theming/themes/xmlui.js +2 -2
  62. package/dist/scripts/src/components-core/theming/transformThemeVars.js +37 -37
  63. package/dist/scripts/src/components-core/utils/hooks.js +2 -2
  64. package/dist/scripts/src/language-server/metadata.js +8206 -0
  65. package/dist/scripts/src/language-server/server.js +135 -0
  66. package/dist/scripts/src/language-server/services/completion.js +100 -0
  67. package/dist/scripts/src/language-server/services/hover.js +170 -0
  68. package/dist/scripts/src/language-server/services/syntax-node-utilities.js +22 -0
  69. package/dist/scripts/src/parsers/xmlui-parser/index.js +29 -0
  70. package/dist/scripts/src/parsers/xmlui-parser/lint.js +177 -0
  71. package/dist/scripts/src/parsers/xmlui-parser/xmlui-serializer.js +582 -0
  72. package/dist/scripts/src/parsers/xmlui-parser/xmlui-tree.js +2 -0
  73. package/dist/style.css +1 -1
  74. package/dist/xmlui-metadata.mjs +8066 -6905
  75. package/dist/xmlui-metadata.umd.js +11 -11
  76. package/dist/xmlui-parser.d.ts +1 -0
  77. package/dist/xmlui-parser.mjs +2 -2
  78. package/dist/xmlui-standalone.umd.js +165 -165
  79. package/dist/xmlui.d.ts +5 -3
  80. package/dist/xmlui.mjs +13 -12
  81. package/package.json +9 -4
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Markdown = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = require("react");
9
+ const react_2 = __importDefault(require("react"));
9
10
  const react_markdown_1 = __importDefault(require("react-markdown"));
10
11
  const remark_gfm_1 = __importDefault(require("remark-gfm"));
11
12
  const unist_util_visit_1 = require("unist-util-visit");
12
13
  const Markdown_module_scss_1 = __importDefault(require("./Markdown.module.scss"));
13
14
  const HtmlTags_module_scss_1 = __importDefault(require("../HtmlTags/HtmlTags.module.scss"));
14
- const HeadingNative_1 = require("../Heading/HeadingNative");
15
15
  const TextNative_1 = require("../Text/TextNative");
16
16
  const LinkNative_1 = require("../Link/LinkNative");
17
17
  const ImageNative_1 = require("../Image/ImageNative");
@@ -21,24 +21,24 @@ exports.Markdown = (0, react_1.memo)(function Markdown({ extractValue, removeInd
21
21
  return null;
22
22
  }
23
23
  children = removeIndents ? removeTextIndents(children) : children;
24
- return ((0, jsx_runtime_1.jsx)("div", { style: style, children: (0, jsx_runtime_1.jsx)(react_markdown_1.default, { remarkPlugins: [remark_gfm_1.default, [bindingExpression, { extractValue }]], components: {
25
- h1({ id, children }) {
26
- return ((0, jsx_runtime_1.jsx)(HeadingNative_1.Heading, { uid: id, level: "h1", sx: { lineHeight: "initial" }, children: children }));
24
+ return ((0, jsx_runtime_1.jsx)("div", { className: Markdown_module_scss_1.default.markdownContent, style: Object.assign({}, style), children: (0, jsx_runtime_1.jsx)(react_markdown_1.default, { remarkPlugins: [remark_gfm_1.default, [bindingExpression, { extractValue }]], components: {
25
+ h1({ children }) {
26
+ return (0, jsx_runtime_1.jsx)("h1", { className: HtmlTags_module_scss_1.default.htmlH1, children: children });
27
27
  },
28
- h2({ id, children }) {
29
- return ((0, jsx_runtime_1.jsx)(HeadingNative_1.Heading, { uid: id, level: "h2", sx: { lineHeight: "initial" }, children: children }));
28
+ h2({ children }) {
29
+ return (0, jsx_runtime_1.jsx)("h2", { className: HtmlTags_module_scss_1.default.htmlH2, children: children });
30
30
  },
31
- h3({ id, children }) {
32
- return ((0, jsx_runtime_1.jsx)(HeadingNative_1.Heading, { uid: id, level: "h3", sx: { lineHeight: "initial" }, children: children }));
31
+ h3({ children }) {
32
+ return (0, jsx_runtime_1.jsx)("h3", { className: HtmlTags_module_scss_1.default.htmlH3, children: children });
33
33
  },
34
- h4({ id, children }) {
35
- return ((0, jsx_runtime_1.jsx)(HeadingNative_1.Heading, { uid: id, level: "h4", sx: { lineHeight: "initial" }, children: children }));
34
+ h4({ children }) {
35
+ return (0, jsx_runtime_1.jsx)("h4", { className: HtmlTags_module_scss_1.default.htmlH4, children: children });
36
36
  },
37
- h5({ id, children }) {
38
- return ((0, jsx_runtime_1.jsx)(HeadingNative_1.Heading, { uid: id, level: "h5", sx: { lineHeight: "initial" }, children: children }));
37
+ h5({ children }) {
38
+ return (0, jsx_runtime_1.jsx)("h5", { className: HtmlTags_module_scss_1.default.htmlH5, children: children });
39
39
  },
40
- h6({ id, children }) {
41
- return ((0, jsx_runtime_1.jsx)(HeadingNative_1.Heading, { uid: id, level: "h6", sx: { lineHeight: "initial" }, children: children }));
40
+ h6({ children }) {
41
+ return (0, jsx_runtime_1.jsx)("h6", { className: HtmlTags_module_scss_1.default.htmlH6, children: children });
42
42
  },
43
43
  p({ id, children }) {
44
44
  return ((0, jsx_runtime_1.jsx)(TextNative_1.Text, { uid: id, children: children }));
@@ -62,13 +62,13 @@ exports.Markdown = (0, react_1.memo)(function Markdown({ extractValue, removeInd
62
62
  return (0, jsx_runtime_1.jsx)(Blockquote, { children: children });
63
63
  },
64
64
  ol({ children }) {
65
- return (0, jsx_runtime_1.jsx)(OrderedList, { children: children });
65
+ return (0, jsx_runtime_1.jsx)("ol", { className: HtmlTags_module_scss_1.default.htmlOl, children: children });
66
66
  },
67
67
  ul({ children }) {
68
- return (0, jsx_runtime_1.jsx)(UnorderedList, { children: children });
68
+ return (0, jsx_runtime_1.jsx)("ul", { className: HtmlTags_module_scss_1.default.htmlUl, children: children });
69
69
  },
70
70
  li({ children }) {
71
- return (0, jsx_runtime_1.jsx)(ListItem, { children: children });
71
+ return (0, jsx_runtime_1.jsx)("li", { children: children }); // No custom styling for li elements
72
72
  },
73
73
  hr() {
74
74
  return (0, jsx_runtime_1.jsx)(HorizontalRule, {});
@@ -122,6 +122,62 @@ const HorizontalRule = () => {
122
122
  return (0, jsx_runtime_1.jsx)("hr", { className: Markdown_module_scss_1.default.horizontalRule });
123
123
  };
124
124
  const Blockquote = ({ children, style }) => {
125
+ // Helper function to extract text content from React nodes
126
+ const extractTextContent = (node) => {
127
+ if (typeof node === 'string') {
128
+ return node;
129
+ }
130
+ if (react_2.default.isValidElement(node) && node.props && node.props.children) {
131
+ if (Array.isArray(node.props.children)) {
132
+ return node.props.children.map(extractTextContent).join('');
133
+ }
134
+ return extractTextContent(node.props.children);
135
+ }
136
+ return '';
137
+ };
138
+ // Extract all text content
139
+ const allText = react_2.default.Children.toArray(children).map(extractTextContent).join('');
140
+ // Check for admonition pattern
141
+ const match = allText.match(/\[!([A-Z]+)\]/);
142
+ const isAdmonition = !!match;
143
+ if (isAdmonition && match && match[1]) {
144
+ const type = match[1].toLowerCase();
145
+ // Map admonition type to emoji
146
+ const emojiMap = {
147
+ info: '💡',
148
+ warning: '⚠️',
149
+ danger: '🚫',
150
+ note: '📝',
151
+ tip: '💬'
152
+ };
153
+ // Process children to remove the admonition marker
154
+ const processNode = (node) => {
155
+ if (typeof node === 'string') {
156
+ return node.replace(/\[!([A-Z]+)\]\s*/, '');
157
+ }
158
+ if (react_2.default.isValidElement(node)) {
159
+ // Handle React elements with children
160
+ if (node.props && node.props.children) {
161
+ let newChildren;
162
+ if (Array.isArray(node.props.children)) {
163
+ newChildren = node.props.children.map(processNode);
164
+ }
165
+ else {
166
+ newChildren = processNode(node.props.children);
167
+ }
168
+ return react_2.default.cloneElement(node, node.props, newChildren);
169
+ }
170
+ // Element without children, return as is
171
+ return node;
172
+ }
173
+ // Other node types (null, undefined, etc.)
174
+ return node;
175
+ };
176
+ const processedChildren = react_2.default.Children.map(children, processNode);
177
+ // Render admonition blockquote with the updated structure
178
+ return ((0, jsx_runtime_1.jsx)("blockquote", { className: Markdown_module_scss_1.default.admonitionBlockquote, style: style, children: (0, jsx_runtime_1.jsxs)("div", { className: Markdown_module_scss_1.default.admonitionContainer, children: [(0, jsx_runtime_1.jsx)("div", { className: `${Markdown_module_scss_1.default.admonitionIcon} ${Markdown_module_scss_1.default[type] || ''}`, children: emojiMap[type] || '💡' }), (0, jsx_runtime_1.jsx)("div", { className: Markdown_module_scss_1.default.admonitionContent, children: processedChildren })] }) }));
179
+ }
180
+ // Render regular blockquote
125
181
  return ((0, jsx_runtime_1.jsx)("blockquote", { className: Markdown_module_scss_1.default.blockquote, style: style, children: children }));
126
182
  };
127
183
  const UnorderedList = ({ children, style }) => {
@@ -51,7 +51,7 @@ exports.ModalDialogMd = (0, ComponentDefs_1.createMetadata)({
51
51
  "second (and so on) parameters. \`$param\` is the same as \`$params[0]\`."),
52
52
  },
53
53
  themeVars: (0, themeVars_1.parseScssVar)(ModalDialog_module_scss_1.default.themeVars),
54
- defaultThemeVars: Object.assign(Object.assign({}, (0, base_utils_1.paddingSubject)(COMP, { all: "$space-7" })), { [`color-bg-${COMP}`]: "$color-bg-primary", [`color-bg-overlay-${COMP}`]: "$color-bg-overlay", [`color-text-${COMP}`]: "$color-text-primary", [`radius-${COMP}`]: "$radius", [`font-family-${COMP}`]: "$font-family", [`max-width-${COMP}`]: "450px", [`margin-bottom-title-${COMP}`]: "0", dark: {
54
+ defaultThemeVars: Object.assign(Object.assign({}, (0, base_utils_1.paddingSubject)(COMP, { all: "$space-7" })), { [`color-bg-${COMP}`]: "$color-bg-primary", [`color-bg-overlay-${COMP}`]: "$color-bg-overlay", [`color-text-${COMP}`]: "$color-text-primary", [`borderRadius-${COMP}`]: "$borderRadius", [`fontFamily-${COMP}`]: "$fontFamily", [`maxWidth-${COMP}`]: "450px", [`marginBottom-title-${COMP}`]: "0", dark: {
55
55
  [`color-bg-${COMP}`]: "$color-bg-primary",
56
56
  } }),
57
57
  });
@@ -25,8 +25,8 @@ exports.NavGroupMd = (0, ComponentDefs_1.createMetadata)({
25
25
  themeVars: (0, themeVars_1.parseScssVar)(NavGroup_module_scss_1.default.themeVars),
26
26
  defaultThemeVars: {
27
27
  [`color-bg-dropdown-${COMP}`]: "$color-bg-primary",
28
- [`radius-dropdown-${COMP}`]: "$radius",
29
- [`shadow-dropdown-${COMP}`]: "$shadow-spread",
28
+ [`borderRadius-dropdown-${COMP}`]: "$borderRadius",
29
+ [`boxShadow-dropdown-${COMP}`]: "$shadow-spread",
30
30
  },
31
31
  });
32
32
  exports.navGroupComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.NavGroupMd, ({ node, extractValue, renderChild }) => {
@@ -53,33 +53,36 @@ exports.NavLinkMd = (0, ComponentDefs_1.createMetadata)({
53
53
  click: (0, metadata_helpers_1.dClick)(COMP),
54
54
  },
55
55
  themeVars: (0, themeVars_1.parseScssVar)(NavLink_module_scss_1.default.themeVars),
56
+ themeVarDescriptions: {
57
+ [`color-indicator-${COMP}`]: "Provides the following states: `--hover`, `--active`, `--pressed`",
58
+ },
56
59
  defaultThemeVars: {
57
- [`border-NavLink`]: "0px solid $color-border",
58
- "radius-NavLink": "$radius",
59
- "color-bg-NavLink": "transparent",
60
- "padding-horizontal-NavLink": "$space-4",
61
- "padding-vertical-NavLink": "$space-2",
62
- "font-size-NavLink": "$font-size-small",
63
- "font-weight-NavLink": "$font-weight-normal",
64
- "font-family-NavLink": "$font-family",
65
- "color-text-NavLink": "$color-text-primary",
66
- "font-weight-NavLink--pressed": "$font-weight-normal",
67
- "thickness-indicator-NavLink": "$space-0_5",
68
- "color-outline-NavLink--focus": "$color-outline--focus",
69
- "thickness-outline-NavLink--focus": "$thickness-outline--focus",
70
- "style-outline-NavLink--focus": "$style-outline--focus",
71
- "offset-outline-NavLink--focus": "-1px",
72
- "radius-indicator-NavLink": "$radius",
60
+ [`border-${COMP}`]: "0px solid $color-border",
61
+ [`borderRadius-${COMP}`]: "$borderRadius",
62
+ [`color-bg-${COMP}`]: "transparent",
63
+ [`paddingHorizontal-${COMP}`]: "$space-4",
64
+ [`paddingVertical-${COMP}`]: "$space-2",
65
+ [`fontSize-${COMP}`]: "$fontSize-small",
66
+ [`fontWeight-${COMP}`]: "$fontWeight-normal",
67
+ [`fontFamily-${COMP}`]: "$fontFamily",
68
+ [`color-text-${COMP}`]: "$color-text-primary",
69
+ [`fontWeight-${COMP}--pressed`]: "$fontWeight-normal",
70
+ [`thickness-indicator-${COMP}`]: "$space-0_5",
71
+ [`outlineColor-${COMP}--focus`]: "$outlineColor--focus",
72
+ [`outlineWidth-${COMP}--focus`]: "$outlineWidth--focus",
73
+ [`outlineStyle-${COMP}--focus`]: "$outlineStyle--focus",
74
+ [`outlineOffset-${COMP}--focus`]: "-1px",
75
+ [`borderRadius-indicator-${COMP}`]: "$borderRadius",
73
76
  light: {
74
- "color-icon-NavLink": "$color-surface-500",
75
- "color-indicator-NavLink--active": "$color-primary-500",
76
- "color-indicator-NavLink--pressed": "$color-primary-500",
77
- "color-indicator-NavLink--hover": "$color-primary-600",
77
+ [`color-icon-${COMP}`]: "$color-surface-500",
78
+ [`color-indicator-${COMP}--active`]: "$color-primary-500",
79
+ [`color-indicator-${COMP}--pressed`]: "$color-primary-500",
80
+ [`color-indicator-${COMP}--hover`]: "$color-primary-600",
78
81
  },
79
82
  dark: {
80
- "color-indicator-NavLink--active": "$color-primary-500",
81
- "color-indicator-NavLink--pressed": "$color-primary-500",
82
- "color-indicator-NavLink--hover": "$color-primary-400",
83
+ [`color-indicator-${COMP}--active`]: "$color-primary-500",
84
+ [`color-indicator-${COMP}--pressed`]: "$color-primary-500",
85
+ [`color-indicator-${COMP}--hover`]: "$color-primary-400",
83
86
  },
84
87
  },
85
88
  });
@@ -22,15 +22,15 @@ exports.NavPanelMd = (0, ComponentDefs_1.createMetadata)({
22
22
  defaultThemeVars: {
23
23
  [`color-bg-${COMP}`]: "transparent",
24
24
  [`border-${COMP}`]: '0px solid $color-border',
25
- [`padding-horizontal-${COMP}`]: "$space-4",
26
- [`padding-vertical-logo-${COMP}`]: "$space-4",
27
- [`padding-horizontal-logo-${COMP}`]: "$space-4",
28
- [`margin-bottom-logo-${COMP}`]: "$space-4",
25
+ [`paddingHorizontal-${COMP}`]: "$space-4",
26
+ [`paddingVertical-logo-${COMP}`]: "$space-4",
27
+ [`paddingHorizontal-logo-${COMP}`]: "$space-4",
28
+ [`marginBottom-logo-${COMP}`]: "$space-4",
29
29
  light: {
30
- [`shadow-${COMP}-vertical`]: "4px 0 4px 0 rgb(0 0 0 / 10%)",
30
+ [`boxShadow-${COMP}-vertical`]: "4px 0 4px 0 rgb(0 0 0 / 10%)",
31
31
  },
32
32
  dark: {
33
- [`shadow-${COMP}-vertical`]: "4px 0 6px 0 rgba(0, 0, 0, 0.2)",
33
+ [`boxShadow-${COMP}-vertical`]: "4px 0 6px 0 rgba(0, 0, 0, 0.2)",
34
34
  },
35
35
  },
36
36
  });
@@ -27,7 +27,7 @@ exports.NoResultMd = (0, ComponentDefs_1.createMetadata)({
27
27
  themeVars: (0, themeVars_1.parseScssVar)(NoResult_module_scss_1.default.themeVars),
28
28
  defaultThemeVars: {
29
29
  [`border-${COMP}`]: "0px solid $color-border",
30
- [`padding-vertical-${COMP}`]: "$space-2",
30
+ [`paddingVertical-${COMP}`]: "$space-2",
31
31
  [`gap-icon-${COMP}`]: "$space-2",
32
32
  [`size-icon-${COMP}`]: "$space-8",
33
33
  light: {
@@ -43,11 +43,11 @@ exports.OffCanvasMd = (0, ComponentDefs_1.createMetadata)({
43
43
  defaultThemeVars: {
44
44
  "width-OffCanvas": "600px",
45
45
  "padding-OffCanvas": "$padding-tight",
46
- "padding-vertical-OffCanvas": "$padding-tight",
47
- "padding-horizontal-OffCanvas": "$padding-normal",
46
+ "paddingVertical-OffCanvas": "$padding-tight",
47
+ "paddingHorizontal-OffCanvas": "$padding-normal",
48
48
  "color-bg-OffCanvas": "$color-bg",
49
- "shadow-horizontal-OffCanvas": "0 2px 10px rgba(0, 0, 0, 0.2)",
50
- "shadow-vertical-OffCanvas": "0 2px 10px rgba(0, 0, 0, 0.2)",
49
+ "boxShadow-horizontal-OffCanvas": "0 2px 10px rgba(0, 0, 0, 0.2)",
50
+ "boxShadow-vertical-OffCanvas": "0 2px 10px rgba(0, 0, 0, 0.2)",
51
51
  light: {},
52
52
  dark: {},
53
53
  },
@@ -22,8 +22,8 @@ exports.ProgressBarMd = (0, ComponentDefs_1.createMetadata)({
22
22
  },
23
23
  themeVars: (0, themeVars_1.parseScssVar)(ProgressBar_module_scss_1.default.themeVars),
24
24
  defaultThemeVars: {
25
- [`radius-${COMP}`]: "$radius",
26
- [`radius-indicator-${COMP}`]: "0px",
25
+ [`borderRadius-${COMP}`]: "$borderRadius",
26
+ [`borderRadius-indicator-${COMP}`]: "0px",
27
27
  [`thickness-${COMP}`]: "$space-2",
28
28
  light: {
29
29
  [`color-bg-${COMP}`]: "$color-surface-200",
@@ -44,8 +44,8 @@ exports.RadioGroupMd = (0, ComponentDefs_1.createMetadata)({
44
44
  [`color-bg-checked-${RGOption}-error`]: `$color-border-${RGOption}-error`,
45
45
  [`color-bg-checked-${RGOption}-warning`]: `$color-border-${RGOption}-warning`,
46
46
  [`color-bg-checked-${RGOption}-success`]: `$color-border-${RGOption}-success`,
47
- [`font-size-${RGOption}`]: "$font-size-small",
48
- [`font-weight-${RGOption}`]: "$font-weight-bold",
47
+ [`fontSize-${RGOption}`]: "$fontSize-small",
48
+ [`fontWeight-${RGOption}`]: "$fontWeight-bold",
49
49
  [`color-text-${RGOption}-error`]: `$color-border-${RGOption}-error`,
50
50
  [`color-text-${RGOption}-warning`]: `$color-border-${RGOption}-warning`,
51
51
  [`color-text-${RGOption}-success`]: `$color-border-${RGOption}-success`,
@@ -55,18 +55,18 @@ exports.SelectMd = (0, ComponentDefs_1.createMetadata)({
55
55
  themeVars: (0, themeVars_1.parseScssVar)(Select_module_scss_1.default.themeVars),
56
56
  defaultThemeVars: {
57
57
  [`color-bg-menu-${COMP}`]: "$color-bg-primary",
58
- [`shadow-menu-${COMP}`]: "$shadow-md",
59
- [`radius-menu-${COMP}`]: "$radius",
58
+ [`boxShadow-menu-${COMP}`]: "$shadow-md",
59
+ [`borderRadius-menu-${COMP}`]: "$borderRadius",
60
60
  [`thickness-border-menu-${COMP}`]: "1px",
61
61
  [`color-border-menu-${COMP}`]: "$color-border",
62
62
  [`color-bg-item-${COMP}`]: "$color-bg-dropdown-item",
63
63
  [`color-bg-item-${COMP}--hover`]: "$color-bg-dropdown-item--active",
64
64
  [`color-bg-item-${COMP}--active`]: "$color-bg-dropdown-item--active",
65
- [`min-height-Input`]: "39px",
65
+ [`minHeight-Input`]: "39px",
66
66
  [`color-bg-${COMP}-badge`]: "$color-primary-500",
67
- [`font-size-${COMP}-badge`]: "$font-size-small",
68
- [`padding-horizontal-${COMP}-badge`]: "$space-1",
69
- [`padding-vertical-${COMP}-badge`]: "$space-1",
67
+ [`fontSize-${COMP}-badge`]: "$fontSize-small",
68
+ [`paddingHorizontal-${COMP}-badge`]: "$space-1",
69
+ [`paddingVertical-${COMP}-badge`]: "$space-1",
70
70
  [`opacity-text-item-${COMP}--disabled`]: "0.5",
71
71
  [`opacity-${COMP}--disabled`]: "0.5",
72
72
  light: {
@@ -45,6 +45,7 @@ const react_select_1 = require("@radix-ui/react-select");
45
45
  const react_popover_1 = require("@radix-ui/react-popover");
46
46
  const cmdk_1 = require("cmdk");
47
47
  const classnames_1 = __importDefault(require("classnames"));
48
+ const react_focus_scope_1 = require("@radix-ui/react-focus-scope");
48
49
  const Select_module_scss_1 = __importDefault(require("./Select.module.scss"));
49
50
  const constants_1 = require("../../components-core/constants");
50
51
  const ThemeContext_1 = require("../../components-core/theming/ThemeContext");
@@ -56,7 +57,7 @@ const OptionContext_1 = require("./OptionContext");
56
57
  const ItemWithLabel_1 = require("../FormItem/ItemWithLabel");
57
58
  const SimpleSelect = (0, react_1.forwardRef)(function SimpleSelect(props, forwardedRef) {
58
59
  const { root } = (0, ThemeContext_1.useTheme)();
59
- const { enabled, onBlur, autoFocus, onValueChange, validationStatus, children, value, height, style, placeholder, id, triggerRef, onFocus, options } = props;
60
+ const { enabled, onBlur, autoFocus, onValueChange, validationStatus, children, value, height, style, placeholder, id, triggerRef, onFocus, options, } = props;
60
61
  const ref = forwardedRef ? (0, react_compose_refs_1.composeRefs)(triggerRef, forwardedRef) : triggerRef;
61
62
  const stringValue = value + "";
62
63
  const onValChange = (0, react_1.useCallback)((val) => {
@@ -67,10 +68,10 @@ const SimpleSelect = (0, react_1.forwardRef)(function SimpleSelect(props, forwar
67
68
  return ((0, jsx_runtime_1.jsx)(OptionTypeProvider_1.default, { Component: SelectOption, children: (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, style: style, onFocus: onFocus, onBlur: onBlur, disabled: !enabled, className: (0, classnames_1.default)(Select_module_scss_1.default.selectTrigger, {
68
69
  [Select_module_scss_1.default.error]: validationStatus === "error",
69
70
  [Select_module_scss_1.default.warning]: validationStatus === "warning",
70
- [Select_module_scss_1.default.valid]: validationStatus === "valid"
71
+ [Select_module_scss_1.default.valid]: validationStatus === "valid",
71
72
  }), ref: ref, autoFocus: autoFocus, children: [(0, jsx_runtime_1.jsx)("div", { className: Select_module_scss_1.default.selectValue, children: (0, jsx_runtime_1.jsx)(react_select_1.Value, { placeholder: placeholder }) }), (0, jsx_runtime_1.jsx)(react_select_1.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "chevrondown" }) })] }), (0, jsx_runtime_1.jsx)(react_select_1.Portal, { container: root, children: (0, jsx_runtime_1.jsxs)(react_select_1.Content, { className: Select_module_scss_1.default.selectContent, position: "popper", style: { height: height }, children: [(0, jsx_runtime_1.jsx)(react_select_1.ScrollUpButton, { className: Select_module_scss_1.default.selectScrollUpButton, children: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "chevronup" }) }), (0, jsx_runtime_1.jsx)(react_select_1.Viewport, { className: (0, classnames_1.default)(Select_module_scss_1.default.selectViewport), children: children }), (0, jsx_runtime_1.jsx)(react_select_1.ScrollDownButton, { className: Select_module_scss_1.default.selectScrollDownButton, children: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "chevrondown" }) })] }) })] }) }));
72
73
  });
73
- exports.Select = (0, react_1.forwardRef)(function Select({ id, initialValue, value, enabled = true, placeholder, updateState = constants_1.noop, validationStatus = "none", onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, registerComponentApi, emptyListTemplate, optionLabelRenderer, valueRenderer, style, dropdownHeight, children, autoFocus = false, searchable = false, multiSelect = false, label, labelPosition, labelWidth, labelBreak, required = false }, ref) {
74
+ exports.Select = (0, react_1.forwardRef)(function Select({ id, initialValue, value, enabled = true, placeholder, updateState = constants_1.noop, validationStatus = "none", onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, registerComponentApi, emptyListTemplate, optionLabelRenderer, valueRenderer, style, dropdownHeight, children, autoFocus = false, searchable = false, multiSelect = false, label, labelPosition, labelWidth, labelBreak, required = false, }, ref) {
74
75
  var _a;
75
76
  const [referenceElement, setReferenceElement] = (0, react_1.useState)(null);
76
77
  const [open, setOpen] = (0, react_1.useState)(false);
@@ -129,7 +130,7 @@ exports.Select = (0, react_1.forwardRef)(function Select({ id, initialValue, val
129
130
  (0, react_1.useEffect)(() => {
130
131
  registerComponentApi === null || registerComponentApi === void 0 ? void 0 : registerComponentApi({
131
132
  focus,
132
- setValue
133
+ setValue,
133
134
  });
134
135
  }, [focus, registerComponentApi, setValue]);
135
136
  // Render the "empty list" message
@@ -146,17 +147,17 @@ exports.Select = (0, react_1.forwardRef)(function Select({ id, initialValue, val
146
147
  }, []);
147
148
  const optionContextValue = (0, react_1.useMemo)(() => ({
148
149
  onOptionAdd,
149
- onOptionRemove
150
+ onOptionRemove,
150
151
  }), [onOptionAdd, onOptionRemove]);
151
152
  const selectContextValue = (0, react_1.useMemo)(() => ({
152
153
  multiSelect,
153
154
  value,
154
155
  optionLabelRenderer,
155
- onChange: toggleOption
156
+ onChange: toggleOption,
156
157
  }), [multiSelect, toggleOption, value, optionLabelRenderer]);
157
158
  return ((0, jsx_runtime_1.jsx)(SelectContext_1.SelectContext.Provider, { value: selectContextValue, children: (0, jsx_runtime_1.jsx)(OptionContext_1.OptionContext.Provider, { value: optionContextValue, children: searchable || multiSelect ? ((0, jsx_runtime_1.jsxs)(OptionTypeProvider_1.default, { Component: HiddenOption, children: [children, (0, jsx_runtime_1.jsx)(ItemWithLabel_1.ItemWithLabel, { ref: ref, labelPosition: labelPosition, label: label, labelWidth: labelWidth, labelBreak: labelBreak, required: required, enabled: enabled, onFocus: onFocus, onBlur: onBlur, style: style, children: (0, jsx_runtime_1.jsxs)(react_popover_1.Popover, { open: open, onOpenChange: setOpen, modal: false, children: [(0, jsx_runtime_1.jsx)(react_popover_1.PopoverTrigger, { asChild: true, children: (0, jsx_runtime_1.jsxs)("button", { id: id, ref: setReferenceElement, onFocus: onFocus, onBlur: onBlur, disabled: !enabled, "aria-expanded": open, onClick: () => setOpen((prev) => !prev), className: (0, classnames_1.default)(Select_module_scss_1.default.selectTrigger, Select_module_scss_1.default[validationStatus], {
158
159
  [Select_module_scss_1.default.disabled]: !enabled,
159
- [Select_module_scss_1.default.multi]: multiSelect
160
+ [Select_module_scss_1.default.multi]: multiSelect,
160
161
  }), autoFocus: autoFocus, children: [multiSelect ? (Array.isArray(value) && value.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: Select_module_scss_1.default.badgeListContainer, children: (0, jsx_runtime_1.jsx)("div", { className: Select_module_scss_1.default.badgeList, children: value.map((v) => {
161
162
  var _a;
162
163
  return valueRenderer ? (valueRenderer(Array.from(options).find((o) => o.value === v), () => {
@@ -168,14 +169,14 @@ exports.Select = (0, react_1.forwardRef)(function Select({ id, initialValue, val
168
169
  }) }) })) : ((0, jsx_runtime_1.jsx)("span", { 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", { 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) => {
169
170
  event.stopPropagation();
170
171
  clearValue();
171
- } })), (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "chevrondown" })] })] }) }), open && ((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) => {
172
- const extendedValue = value + " " + keywords.join(" ");
173
- if (extendedValue.toLowerCase().includes(search.toLowerCase()))
174
- return 1;
175
- return 0;
176
- }, 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..." })] })) : (
177
- // https://github.com/pacocoursey/cmdk/issues/322#issuecomment-2444703817
178
- (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: [Array.from(options).map(({ value, label, enabled, keywords }) => ((0, jsx_runtime_1.jsx)(exports.ComboboxOption, { value: value, label: label, enabled: enabled, keywords: keywords }, value))), (0, jsx_runtime_1.jsx)(cmdk_1.CommandEmpty, { children: emptyListNode })] })] }) }))] }) })] })) : ((0, jsx_runtime_1.jsx)(SimpleSelect, { ref: ref, value: value, options: options, onValueChange: toggleOption, id: id, style: style, onFocus: onFocus, onBlur: onBlur, enabled: enabled, validationStatus: validationStatus, triggerRef: setReferenceElement, autoFocus: autoFocus, placeholder: placeholder, height: dropdownHeight, children: children || emptyListNode })) }) }));
172
+ } })), (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) => {
173
+ const extendedValue = value + " " + keywords.join(" ");
174
+ if (extendedValue.toLowerCase().includes(search.toLowerCase()))
175
+ return 1;
176
+ return 0;
177
+ }, 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..." })] })) : (
178
+ // https://github.com/pacocoursey/cmdk/issues/322#issuecomment-2444703817
179
+ (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: [Array.from(options).map(({ value, label, enabled, keywords }) => ((0, jsx_runtime_1.jsx)(exports.ComboboxOption, { value: value, label: label, enabled: enabled, keywords: keywords }, value))), (0, jsx_runtime_1.jsx)(cmdk_1.CommandEmpty, { children: emptyListNode })] })] }) }) }) }))] }) })] })) : ((0, jsx_runtime_1.jsx)(SimpleSelect, { ref: ref, value: value, options: options, onValueChange: toggleOption, id: id, style: style, onFocus: onFocus, onBlur: onBlur, enabled: enabled, validationStatus: validationStatus, triggerRef: setReferenceElement, autoFocus: autoFocus, placeholder: placeholder, height: dropdownHeight, children: children || emptyListNode })) }) }));
179
180
  });
180
181
  exports.ComboboxOption = (0, react_1.forwardRef)(function Combobox(option, forwardedRef) {
181
182
  const id = (0, react_1.useId)();
@@ -52,7 +52,7 @@ exports.SliderMd = (0, ComponentDefs_1.createMetadata)({
52
52
  [`style-border-thumb-${COMP}`]: "solid",
53
53
  [`color-border-thumb-${COMP}`]: "$color-surface-50",
54
54
  [`color-bg-thumb-${COMP}`]: "$color-primary",
55
- [`shadow-thumb-${COMP}`]: "$shadow-md",
55
+ [`boxShadow-thumb-${COMP}`]: "$shadow-md",
56
56
  light: {
57
57
  [`color-bg-track-${COMP}--disabled`]: "$color-surface-300",
58
58
  [`color-bg-range-${COMP}--disabled`]: "$color-surface-400",
@@ -98,23 +98,23 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
98
98
  themeVars: (0, themeVars_1.parseScssVar)(Table_module_scss_1.default.themeVars),
99
99
  defaultThemeVars: {
100
100
  [`padding-heading-${COMP}`]: `$space-2`,
101
- [`padding-horizontal-cell-${COMP}`]: "$space-2",
102
- [`padding-horizontal-cell-first-${COMP}`]: "$space-5",
103
- [`padding-horizontal-cell-last-${COMP}`]: "$space-5",
104
- [`padding-vertical-cell-${COMP}`]: "$space-2",
101
+ [`paddingHorizontal-cell-${COMP}`]: "$space-2",
102
+ [`paddingHorizontal-cell-first-${COMP}`]: "$space-5",
103
+ [`paddingHorizontal-cell-last-${COMP}`]: "$space-5",
104
+ [`paddingVertical-cell-${COMP}`]: "$space-2",
105
105
  [`border-cell-${COMP}`]: "1px solid $color-border",
106
- [`thickness-outline-heading-${COMP}--focus`]: "$thickness-outline--focus",
107
- [`style-outline-heading-${COMP}--focus`]: "$style-outline--focus",
108
- [`offset-outline-heading-${COMP}--focus`]: "$offset-outline--focus",
109
- [`font-size-heading-${COMP}`]: "$font-size-tiny",
110
- [`font-weight-heading-${COMP}`]: "$font-weight-bold",
111
- [`transform-text-heading-${COMP}`]: "uppercase",
112
- [`font-size-row-${COMP}`]: "$font-size-small",
106
+ [`outlineWidth-heading-${COMP}--focus`]: "$outlineWidth--focus",
107
+ [`outlineStyle-heading-${COMP}--focus`]: "$outlineStyle--focus",
108
+ [`outlineOffset-heading-${COMP}--focus`]: "$outlineOffset--focus",
109
+ [`fontSize-heading-${COMP}`]: "$fontSize-tiny",
110
+ [`fontWeight-heading-${COMP}`]: "$fontWeight-bold",
111
+ [`textTransform-heading-${COMP}`]: "uppercase",
112
+ [`fontSize-row-${COMP}`]: "$fontSize-small",
113
113
  [`color-bg-${COMP}`]: "$color-bg",
114
114
  [`color-bg-row-${COMP}`]: "inherit",
115
115
  [`color-bg-selected-${COMP}--hover`]: `$color-bg-row-${COMP}--hover`,
116
116
  [`color-bg-pagination-${COMP}`]: `$color-bg-${COMP}`,
117
- [`color-outline-heading-${COMP}--focus`]: "$color-outline--focus",
117
+ [`outlineColor-heading-${COMP}--focus`]: "$outlineColor--focus",
118
118
  [`color-text-pagination-${COMP}`]: "$color-secondary",
119
119
  light: {
120
120
  [`color-bg-row-${COMP}--hover`]: "$color-primary-50",
@@ -133,7 +133,7 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
133
133
  },
134
134
  },
135
135
  });
136
- const TableWithColumns = ({ extractValue, node, renderChild, lookupEventHandler, lookupSyncCallback, layoutCss, registerComponentApi, }) => {
136
+ const TableWithColumns = (0, react_1.forwardRef)(({ extractValue, node, renderChild, lookupEventHandler, lookupSyncCallback, layoutCss, registerComponentApi, }, ref) => {
137
137
  var _a, _b, _c, _d, _e, _f;
138
138
  const data = extractValue(node.props.items) || extractValue(node.props.data);
139
139
  const [columnIds, setColumnIds] = (0, react_1.useState)(constants_1.EMPTY_ARRAY);
@@ -181,7 +181,7 @@ const TableWithColumns = ({ extractValue, node, renderChild, lookupEventHandler,
181
181
  }, []);
182
182
  const columns = (0, react_1.useMemo)(() => columnIds.map((colId) => columnsByIds[colId]), [columnIds, columnsByIds]);
183
183
  const selectionContext = (0, SelectionStoreNative_1.useSelectionContext)();
184
- const tableContent = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TableContext_1.TableContext.Provider, { value: tableContextValue, children: renderChild(node.children) }, tableKey), (0, jsx_runtime_1.jsx)(TableContext_1.TableContext.Provider, { value: columnRefresherContextValue, children: renderChild(node.children) }), (0, jsx_runtime_1.jsx)(TableNative_1.Table, { data: data, columns: columns, pageSizes: extractValue(node.props.pageSizes), rowsSelectable: extractValue.asOptionalBoolean(node.props.rowsSelectable), registerComponentApi: registerComponentApi, noDataRenderer: node.props.noDataTemplate &&
184
+ const tableContent = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TableContext_1.TableContext.Provider, { value: tableContextValue, children: renderChild(node.children) }, tableKey), (0, jsx_runtime_1.jsx)(TableContext_1.TableContext.Provider, { value: columnRefresherContextValue, children: renderChild(node.children) }), (0, jsx_runtime_1.jsx)(TableNative_1.Table, { ref: ref, data: data, columns: columns, pageSizes: extractValue(node.props.pageSizes), rowsSelectable: extractValue.asOptionalBoolean(node.props.rowsSelectable), registerComponentApi: registerComponentApi, noDataRenderer: node.props.noDataTemplate &&
185
185
  (() => {
186
186
  return renderChild(node.props.noDataTemplate);
187
187
  }), hideNoDataView: node.props.noDataTemplate === null || node.props.noDataTemplate === "", loading: extractValue.asOptionalBoolean(node.props.loading), isPaginated: extractValue.asOptionalBoolean((_a = node.props) === null || _a === void 0 ? void 0 : _a.isPaginated), headerHeight: extractValue.asSize(node.props.headerHeight), rowDisabledPredicate: lookupSyncCallback(node.props.rowDisabledPredicate), sortBy: extractValue((_b = node.props) === null || _b === void 0 ? void 0 : _b.sortBy), sortingDirection: extractValue((_c = node.props) === null || _c === void 0 ? void 0 : _c.sortDirection), iconSortAsc: extractValue.asOptionalString((_d = node.props) === null || _d === void 0 ? void 0 : _d.iconSortAsc), iconSortDesc: extractValue.asOptionalString((_e = node.props) === null || _e === void 0 ? void 0 : _e.iconSortDesc), iconNoSort: extractValue.asOptionalString((_f = node.props) === null || _f === void 0 ? void 0 : _f.iconNoSort), sortingDidChange: lookupEventHandler("sortingDidChange"), onSelectionDidChange: lookupEventHandler("selectionDidChange"), willSort: lookupEventHandler("willSort"), style: layoutCss, uid: node.uid, autoFocus: extractValue.asOptionalBoolean(node.props.autoFocus), hideHeader: extractValue.asOptionalBoolean(node.props.hideHeader), enableMultiRowSelection: extractValue.asOptionalBoolean(node.props.enableMultiRowSelection), alwaysShowSelectionHeader: extractValue.asOptionalBoolean(node.props.alwaysShowSelectionHeader) })] }));
@@ -189,7 +189,7 @@ const TableWithColumns = ({ extractValue, node, renderChild, lookupEventHandler,
189
189
  return (0, jsx_runtime_1.jsx)(SelectionStoreNative_1.StandaloneSelectionStore, { children: tableContent });
190
190
  }
191
191
  return tableContent;
192
- };
192
+ });
193
193
  exports.tableComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.TableMd, ({ extractValue, node, renderChild, lookupEventHandler, lookupSyncCallback, layoutCss, registerComponentApi, }) => {
194
194
  return ((0, jsx_runtime_1.jsx)(TableWithColumns, { node: node, extractValue: extractValue, lookupEventHandler: lookupEventHandler, lookupSyncCallback: lookupSyncCallback, layoutCss: layoutCss, renderChild: renderChild, registerComponentApi: registerComponentApi }));
195
195
  });
@@ -35,36 +35,36 @@ exports.TableOfContentsMd = (0, ComponentDefs_1.createMetadata)({
35
35
  defaultThemeVars: {
36
36
  [`width-${COMP}`]: "auto",
37
37
  [`height-${COMP}`]: "auto",
38
- [`font-size-${COMP}Item`]: "$font-size-smaller",
39
- [`font-weight-${COMP}Item`]: "$font-weight-normal",
40
- [`font-family-${COMP}Item`]: "$font-family",
41
- [`border-radius-${COMP}Item`]: "0",
38
+ [`fontSize-${COMP}Item`]: "$fontSize-smaller",
39
+ [`fontWeight-${COMP}Item`]: "$fontWeight-normal",
40
+ [`fontFamily-${COMP}Item`]: "$fontFamily",
41
+ [`borderRadius-${COMP}Item`]: "0",
42
42
  [`border-width-${COMP}Item`]: "$space-0_5",
43
43
  [`border-style-${COMP}Item`]: "solid",
44
- [`border-radius-${COMP}Item--active`]: "0",
44
+ [`borderRadius-${COMP}Item--active`]: "0",
45
45
  [`border-width-${COMP}Item--active`]: "$space-0_5",
46
46
  [`border-style-${COMP}Item--active`]: "solid",
47
- [`font-weight-${COMP}Item--active`]: "$font-weight-bold",
47
+ [`fontWeight-${COMP}Item--active`]: "$fontWeight-bold",
48
48
  [`color-bg-${COMP}`]: "transparent",
49
- [`padding-horizontal-${COMP}`]: "$space-8",
50
- [`padding-vertical-${COMP}`]: "$space-4",
51
- [`padding-horizontal-${COMP}Item`]: "$space-2",
52
- [`padding-vertical-${COMP}Item`]: "$space-2",
53
- [`padding-horizontal-${COMP}Item-level-1`]: "unset",
54
- [`padding-horizontal-${COMP}Item-level-2`]: "unset",
55
- [`padding-horizontal-${COMP}Item-level-3`]: "unset",
56
- [`padding-horizontal-${COMP}Item-level-4`]: "unset",
57
- [`padding-horizontal-${COMP}Item-level-5`]: "unset",
58
- [`padding-horizontal-${COMP}Item-level-6`]: "unset",
59
- [`margin-top-${COMP}`]: "0",
60
- [`margin-bottom-${COMP}`]: "0",
61
- [`border-radius-${COMP}`]: "0",
49
+ [`paddingHorizontal-${COMP}`]: "$space-8",
50
+ [`paddingVertical-${COMP}`]: "$space-4",
51
+ [`paddingHorizontal-${COMP}Item`]: "$space-2",
52
+ [`paddingVertical-${COMP}Item`]: "$space-2",
53
+ [`paddingHorizontal-${COMP}Item-level-1`]: "unset",
54
+ [`paddingHorizontal-${COMP}Item-level-2`]: "unset",
55
+ [`paddingHorizontal-${COMP}Item-level-3`]: "unset",
56
+ [`paddingHorizontal-${COMP}Item-level-4`]: "unset",
57
+ [`paddingHorizontal-${COMP}Item-level-5`]: "unset",
58
+ [`paddingHorizontal-${COMP}Item-level-6`]: "unset",
59
+ [`marginTop-${COMP}`]: "0",
60
+ [`marginBottom-${COMP}`]: "0",
61
+ [`borderRadius-${COMP}`]: "0",
62
62
  [`border-width-${COMP}`]: "0",
63
63
  [`border-color-${COMP}`]: "transparent",
64
64
  [`border-style-${COMP}`]: "solid",
65
- [`transform-${COMP}Item`]: "none",
65
+ [`textTransform-${COMP}Item`]: "none",
66
66
  [`align-vertical-${COMP}Item`]: "baseline",
67
- [`letter-spacing-${COMP}Item`]: "0",
67
+ [`letterSpacing-${COMP}Item`]: "0",
68
68
  light: {
69
69
  [`color-${COMP}Item`]: "$color-text-primary",
70
70
  [`border-color-${COMP}Item`]: "$color-border",
@@ -12,11 +12,12 @@ const react_compose_refs_1 = require("@radix-ui/react-compose-refs");
12
12
  const classnames_1 = __importDefault(require("classnames"));
13
13
  const TableOfContents_module_scss_1 = __importDefault(require("./TableOfContents.module.scss"));
14
14
  const TableOfContentsContext_1 = require("../../components-core/TableOfContentsContext");
15
+ const hooks_1 = require("../../components-core/utils/hooks");
15
16
  exports.TableOfContents = (0, react_1.forwardRef)(function TableOfContents({ style, smoothScrolling, maxHeadingLevel = 6 }, forwardedRef) {
16
17
  const tocRef = (0, react_1.useRef)(null);
17
18
  const [activeAnchorId, setActiveId] = (0, react_1.useState)(null);
18
19
  const { headings, scrollToAnchor, subscribeToActiveAnchorChange } = (0, TableOfContentsContext_1.useTableOfContents)();
19
- (0, react_1.useLayoutEffect)(() => {
20
+ (0, hooks_1.useIsomorphicLayoutEffect)(() => {
20
21
  return subscribeToActiveAnchorChange((id) => {
21
22
  const foundHeading = headings.find((heading) => heading.id === id);
22
23
  if (foundHeading.level <= maxHeadingLevel) {