xmlui 0.9.50 → 0.9.52

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 (170) hide show
  1. package/dist/lib/{apiInterceptorWorker-B6XqwxPF.mjs → apiInterceptorWorker-OagsYDXz.mjs} +3 -3
  2. package/dist/lib/{index-BpQ3DEFQ.mjs → index-BnpxPPve.mjs} +14387 -13003
  3. package/dist/lib/index.css +1 -1
  4. package/dist/lib/language-server-web-worker.mjs +1 -1
  5. package/dist/lib/language-server.mjs +1 -1
  6. package/dist/lib/{metadata-utils-QekhOD-W.mjs → metadata-utils-4EQ6kQIM.mjs} +7 -7
  7. package/dist/lib/{server-common-D4BcRpEl.mjs → server-common-C0cF2UTg.mjs} +4542 -4326
  8. package/dist/lib/{transform-DXcw0gGl.mjs → transform-CgRMkbb0.mjs} +1472 -1440
  9. package/dist/lib/xmlui-parser.d.ts +84 -62
  10. package/dist/lib/xmlui-parser.mjs +41 -49
  11. package/dist/lib/{xmlui-serializer-CAZCkpXP.mjs → xmlui-serializer-EDw51UFN.mjs} +10 -10
  12. package/dist/lib/xmlui.d.ts +17 -7
  13. package/dist/lib/xmlui.mjs +19 -18
  14. package/dist/metadata/apiInterceptorWorker-BOuioN57.mjs +15414 -0
  15. package/dist/metadata/collectedComponentMetadata-DbptBvJk.mjs +41019 -0
  16. package/dist/metadata/core-D3puiNN6.mjs +5771 -0
  17. package/dist/metadata/style.css +1 -1
  18. package/dist/metadata/wasm-DQxwEHae.mjs +7 -0
  19. package/dist/metadata/xmlui-metadata.mjs +3 -18371
  20. package/dist/metadata/xmlui-metadata.umd.js +547 -10
  21. package/dist/scripts/package.json +5 -7
  22. package/dist/scripts/src/components/APICall/APICall.js +13 -12
  23. package/dist/scripts/src/components/APICall/APICallNative.js +5 -0
  24. package/dist/scripts/src/components/Accordion/Accordion.js +4 -2
  25. package/dist/scripts/src/components/Accordion/AccordionItem.js +2 -2
  26. package/dist/scripts/src/components/Accordion/AccordionItemNative.js +6 -2
  27. package/dist/scripts/src/components/App/App.js +25 -10
  28. package/dist/scripts/src/components/App/AppNative.js +9 -1
  29. package/dist/scripts/src/components/AppHeader/AppHeader.js +2 -2
  30. package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +5 -2
  31. package/dist/scripts/src/components/AppState/AppState.js +2 -2
  32. package/dist/scripts/src/components/AppState/AppStateNative.js +5 -1
  33. package/dist/scripts/src/components/AutoComplete/AutoComplete.js +8 -8
  34. package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +16 -2
  35. package/dist/scripts/src/components/Avatar/Avatar.js +4 -2
  36. package/dist/scripts/src/components/Backdrop/Backdrop.js +2 -2
  37. package/dist/scripts/src/components/Badge/Badge.js +7 -5
  38. package/dist/scripts/src/components/Bookmark/Bookmark.js +5 -4
  39. package/dist/scripts/src/components/Card/Card.js +6 -4
  40. package/dist/scripts/src/components/ChangeListener/ChangeListener.js +2 -1
  41. package/dist/scripts/src/components/Charts/BarChart/BarChart.js +76 -0
  42. package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +108 -0
  43. package/dist/scripts/src/components/Charts/DonutChart/DonutChart.js +59 -0
  44. package/dist/scripts/src/components/Charts/LabelList/LabelList.js +38 -0
  45. package/dist/scripts/src/components/Charts/LabelList/LabelListNative.js +24 -0
  46. package/dist/scripts/src/components/Charts/Legend/Legend.js +30 -0
  47. package/dist/scripts/src/components/Charts/Legend/LegendNative.js +64 -0
  48. package/dist/scripts/src/components/Charts/LineChart/LineChart.js +53 -0
  49. package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +103 -0
  50. package/dist/scripts/src/components/Charts/PieChart/PieChart.js +58 -0
  51. package/dist/scripts/src/components/Charts/PieChart/PieChartNative.js +127 -0
  52. package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.js +27 -0
  53. package/dist/scripts/src/components/Charts/utils/ChartProvider.js +65 -0
  54. package/dist/scripts/src/components/Charts/utils/abstractions.js +26 -0
  55. package/dist/scripts/src/components/CodeBlock/CodeBlock.js +4 -4
  56. package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +5 -1
  57. package/dist/scripts/src/components/Column/Column.js +15 -9
  58. package/dist/scripts/src/components/Column/ColumnNative.js +5 -0
  59. package/dist/scripts/src/components/ComponentProvider.js +12 -6
  60. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +4 -3
  61. package/dist/scripts/src/components/DatePicker/DatePicker.js +5 -3
  62. package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +1 -1
  63. package/dist/scripts/src/components/EmojiSelector/EmojiSelectorNative.js +7 -2
  64. package/dist/scripts/src/components/FileInput/FileInput.js +8 -9
  65. package/dist/scripts/src/components/FileInput/FileInputNative.js +14 -2
  66. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +2 -2
  67. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +9 -2
  68. package/dist/scripts/src/components/Footer/Footer.js +1 -0
  69. package/dist/scripts/src/components/Footer/FooterNative.js +4 -1
  70. package/dist/scripts/src/components/Form/Form.js +9 -5
  71. package/dist/scripts/src/components/Form/FormNative.js +2 -1
  72. package/dist/scripts/src/components/FormItem/FormItem.js +25 -15
  73. package/dist/scripts/src/components/FormItem/FormItemNative.js +1 -0
  74. package/dist/scripts/src/components/FormItem/Validations.js +49 -33
  75. package/dist/scripts/src/components/Heading/Heading.js +5 -4
  76. package/dist/scripts/src/components/Heading/HeadingNative.js +1 -0
  77. package/dist/scripts/src/components/Icon/Icon.js +7 -5
  78. package/dist/scripts/src/components/Image/Image.js +19 -9
  79. package/dist/scripts/src/components/Image/ImageNative.js +7 -2
  80. package/dist/scripts/src/components/Items/Items.js +2 -0
  81. package/dist/scripts/src/components/Items/ItemsNative.js +5 -1
  82. package/dist/scripts/src/components/Link/Link.js +3 -4
  83. package/dist/scripts/src/components/Link/LinkNative.js +6 -2
  84. package/dist/scripts/src/components/List/List.js +12 -11
  85. package/dist/scripts/src/components/List/ListNative.js +10 -2
  86. package/dist/scripts/src/components/Logo/Logo.js +7 -0
  87. package/dist/scripts/src/components/Logo/LogoNative.js +6 -2
  88. package/dist/scripts/src/components/Markdown/Markdown.js +5 -3
  89. package/dist/scripts/src/components/Markdown/MarkdownNative.js +24 -76
  90. package/dist/scripts/src/components/Markdown/utils.js +23 -1
  91. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +2 -2
  92. package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +7 -2
  93. package/dist/scripts/src/components/NavGroup/NavGroup.js +2 -1
  94. package/dist/scripts/src/components/NavLink/NavLink.js +5 -7
  95. package/dist/scripts/src/components/NavLink/NavLinkNative.js +7 -2
  96. package/dist/scripts/src/components/NavPanel/NavPanel.js +7 -0
  97. package/dist/scripts/src/components/NavPanel/NavPanelNative.js +6 -3
  98. package/dist/scripts/src/components/NestedApp/NestedApp.js +16 -4
  99. package/dist/scripts/src/components/NestedApp/NestedAppNative.js +37 -34
  100. package/dist/scripts/src/components/NestedApp/defaultProps.js +10 -0
  101. package/dist/scripts/src/components/NoResult/NoResult.js +6 -2
  102. package/dist/scripts/src/components/NoResult/NoResultNative.js +8 -3
  103. package/dist/scripts/src/components/NumberBox/NumberBox.js +8 -6
  104. package/dist/scripts/src/components/NumberBox/NumberBox2.js +6 -6
  105. package/dist/scripts/src/components/NumberBox/NumberBox2Native.js +15 -2
  106. package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +16 -2
  107. package/dist/scripts/src/components/Option/Option.js +10 -15
  108. package/dist/scripts/src/components/Option/OptionNative.js +18 -0
  109. package/dist/scripts/src/components/PageMetaTitle/PageMetaTilteNative.js +6 -2
  110. package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +4 -1
  111. package/dist/scripts/src/components/Pages/Pages.js +7 -3
  112. package/dist/scripts/src/components/Pages/PagesNative.js +5 -0
  113. package/dist/scripts/src/components/ProgressBar/ProgressBar.js +1 -1
  114. package/dist/scripts/src/components/ProgressBar/ProgressBarNative.js +5 -2
  115. package/dist/scripts/src/components/Queue/Queue.js +11 -6
  116. package/dist/scripts/src/components/Queue/QueueNative.js +7 -1
  117. package/dist/scripts/src/components/RadioGroup/RadioGroup.js +5 -5
  118. package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +9 -2
  119. package/dist/scripts/src/components/RadioGroup/RadioItem.js +8 -2
  120. package/dist/scripts/src/components/RadioGroup/RadioItemNative.js +6 -2
  121. package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +4 -1
  122. package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +4 -0
  123. package/dist/scripts/src/components/Redirect/Redirect.js +8 -2
  124. package/dist/scripts/src/components/Select/Select.js +21 -12
  125. package/dist/scripts/src/components/Select/SelectNative.js +15 -2
  126. package/dist/scripts/src/components/SelectionStore/SelectionStore.js +6 -3
  127. package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +6 -2
  128. package/dist/scripts/src/components/Slider/Slider.js +28 -9
  129. package/dist/scripts/src/components/Slider/SliderNative.js +14 -3
  130. package/dist/scripts/src/components/Spinner/Spinner.js +2 -2
  131. package/dist/scripts/src/components/Spinner/SpinnerNative.js +6 -2
  132. package/dist/scripts/src/components/Splitter/Splitter.js +6 -6
  133. package/dist/scripts/src/components/Splitter/SplitterNative.js +10 -2
  134. package/dist/scripts/src/components/Stack/Stack.js +4 -4
  135. package/dist/scripts/src/components/Stack/StackNative.js +8 -2
  136. package/dist/scripts/src/components/StickyBox/StickyBox.js +1 -1
  137. package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +7 -1
  138. package/dist/scripts/src/components/Table/Table.js +15 -14
  139. package/dist/scripts/src/components/Table/TableNative.js +25 -9
  140. package/dist/scripts/src/components/TableOfContents/TableOfContents.js +12 -3
  141. package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +6 -2
  142. package/dist/scripts/src/components/Tabs/Tabs.js +2 -2
  143. package/dist/scripts/src/components/Tabs/TabsNative.js +7 -2
  144. package/dist/scripts/src/components/Text/Text.js +14 -12
  145. package/dist/scripts/src/components/Text/TextNative.js +7 -2
  146. package/dist/scripts/src/components/TextArea/TextArea.js +8 -5
  147. package/dist/scripts/src/components/TextArea/TextAreaNative.js +19 -2
  148. package/dist/scripts/src/components/TextBox/TextBox.js +5 -4
  149. package/dist/scripts/src/components/TextBox/TextBoxNative.js +14 -2
  150. package/dist/scripts/src/components/Theme/Theme.js +1 -1
  151. package/dist/scripts/src/components/Theme/ThemeNative.js +10 -14
  152. package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.js +18 -8
  153. package/dist/scripts/src/components/TreeDisplay/TreeDisplay.js +1 -1
  154. package/dist/scripts/src/components/TreeDisplay/TreeDisplayNative.js +2 -1
  155. package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +3 -57
  156. package/dist/scripts/src/components/ValidationSummary/ValidationSummaryNative.js +64 -0
  157. package/dist/scripts/src/components/metadata-helpers.js +11 -8
  158. package/dist/scripts/src/components-core/InspectorContext.js +0 -4
  159. package/dist/scripts/src/components-core/interception/ApiInterceptor.js +1 -1
  160. package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +6 -2
  161. package/dist/scripts/src/components-core/loader/DataLoader.js +1 -1
  162. package/dist/scripts/src/components-core/loader/Loader.js +7 -3
  163. package/dist/scripts/src/components-core/theming/themes/palette.js +5 -4
  164. package/dist/scripts/src/components-core/theming/themes/root.js +5 -4
  165. package/dist/scripts/src/components-core/theming/transformThemeVars.js +1 -17
  166. package/dist/scripts/src/parsers/xmlui-parser/diagnostics.js +92 -48
  167. package/dist/scripts/src/parsers/xmlui-parser/parser.js +179 -189
  168. package/dist/standalone/xmlui-standalone.es.d.ts +0 -2580
  169. package/dist/standalone/xmlui-standalone.umd.js +275 -305
  170. package/package.json +5 -7
@@ -31,7 +31,7 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
31
31
  isPaginated: {
32
32
  description: `This property adds pagination controls to the \`${COMP}\`.`,
33
33
  valueType: "boolean",
34
- defaultValue: false,
34
+ defaultValue: TableNative_1.defaultProps.isPaginated,
35
35
  },
36
36
  loading: (0, ComponentDefs_1.d)(`This boolean property indicates if the component is fetching (or processing) data. This ` +
37
37
  `property is useful when data is loaded conditionally or receiving it takes some time.`),
@@ -45,22 +45,24 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
45
45
  `row should be disabled. The function retrieves the item to display and should return ` +
46
46
  `a Boolean-like value.`),
47
47
  noDataTemplate: (0, metadata_helpers_1.dComponent)(`A property to customize what to display if the table does not contain any data.`),
48
- sortBy: (0, ComponentDefs_1.d)(`This property is used to determine which data attributes to sort by.`),
49
- sortDirection: (0, ComponentDefs_1.d)(`This property determines the sort order to be \`ascending\` or \`descending\`. This ` +
50
- `property only works if the [\`sortBy\`](#sortby) property is also set.`),
48
+ sortBy: (0, ComponentDefs_1.d)("This property is used to determine which data property to sort by. If not defined, " +
49
+ "the data is not sorted"),
50
+ sortDirection: (0, ComponentDefs_1.d)("This property determines the sort order to be \`ascending\` or \`descending\`. This " +
51
+ "property only works if the [\`sortBy\`](#sortby) property is also set. By default " +
52
+ "ascending order is used."),
51
53
  autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
52
54
  hideHeader: {
53
55
  description: "Set the header visibility using this property. Set it to \`true\` to hide the header.",
54
56
  valueType: "boolean",
55
- defaultValue: false,
57
+ defaultValue: TableNative_1.defaultProps.hideHeader,
56
58
  },
57
- iconNoSort: (0, ComponentDefs_1.d)(`Allows setting the icon displayed in the ${COMP} column header when sorting is ` +
59
+ iconNoSort: (0, ComponentDefs_1.d)(`Allows setting an alternate icon displayed in the ${COMP} column header when sorting is ` +
58
60
  `enabled, but the column remains unsorted. You can change the default icon for all ${COMP} ` +
59
61
  `instances with the "icon.nosort:Table" declaration in the app configuration file.`),
60
- iconSortAsc: (0, ComponentDefs_1.d)(`Allows setting the icon displayed in the ${COMP} column header when sorting is enabled, ` +
62
+ iconSortAsc: (0, ComponentDefs_1.d)(`Allows setting an alernate icon displayed in the ${COMP} column header when sorting is enabled, ` +
61
63
  `and the column is sorted in ascending order. You can change the default icon for all ${COMP} ` +
62
64
  `instances with the "icon.sortasc:Table" declaration in the app configuration file.`),
63
- iconSortDesc: (0, ComponentDefs_1.d)(`Allows setting the icon displayed in the ${COMP} column header when sorting is enabled, ` +
65
+ iconSortDesc: (0, ComponentDefs_1.d)(`Allows setting an alternate icon displayed in the ${COMP} column header when sorting is enabled, ` +
64
66
  `and the column is sorted in descending order. You can change the default icon for all ${COMP} ` +
65
67
  `instances with the "icon.sortdesc:Table" declaration in the app configuration file.`),
66
68
  enableMultiRowSelection: {
@@ -68,7 +70,7 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
68
70
  `This property only has an effect when the rowsSelectable property is set. Setting it ` +
69
71
  `to \`false\` limits selection to a single row.`,
70
72
  valueType: "boolean",
71
- defaultValue: true,
73
+ defaultValue: TableNative_1.defaultProps.enableMultiRowSelection,
72
74
  },
73
75
  alwaysShowSelectionHeader: {
74
76
  description: "This property indicates when the row selection header is displayed. When the value is " +
@@ -82,7 +84,7 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
82
84
  `\`true\`, the table does not have a bottom border. Otherwise, it has a bottom border.`,
83
85
  valueType: "boolean",
84
86
  defaultValue: false,
85
- }
87
+ },
86
88
  },
87
89
  events: {
88
90
  sortingDidChange: (0, ComponentDefs_1.d)(`This event is fired when the table data sorting has changed. It has two arguments: ` +
@@ -106,11 +108,10 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
106
108
  },
107
109
  themeVars: (0, themeVars_1.parseScssVar)(Table_module_scss_1.default.themeVars),
108
110
  defaultThemeVars: {
109
- [`padding-heading-${COMP}`]: `$space-2`,
110
- [`paddingHorizontal-cell-${COMP}`]: "$space-2",
111
+ [`padding-heading-${COMP}`]: `$space-2 $space-0 $space-2 $space-2`,
112
+ [`padding-cell-${COMP}`]: "$space-2 $space-0 $space-2 $space-2",
111
113
  [`paddingHorizontal-cell-first-${COMP}`]: "$space-5",
112
- [`paddingHorizontal-cell-last-${COMP}`]: "$space-5",
113
- [`paddingVertical-cell-${COMP}`]: "$space-2",
114
+ [`paddingHorizontal-cell-last-${COMP}`]: "$space-0",
114
115
  [`border-cell-${COMP}`]: "1px solid $borderColor",
115
116
  [`outlineWidth-heading-${COMP}--focus`]: "$outlineWidth--focus",
116
117
  [`outlineStyle-heading-${COMP}--focus`]: "$outlineStyle--focus",
@@ -23,7 +23,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
23
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Table = void 0;
26
+ exports.defaultProps = exports.Table = void 0;
27
27
  const jsx_runtime_1 = require("react/jsx-runtime");
28
28
  const react_1 = require("react");
29
29
  const react_dom_1 = require("react-dom");
@@ -73,7 +73,7 @@ const getCommonPinningStyles = (column) => {
73
73
  };
74
74
  };
75
75
  // eslint-disable-next-line react/display-name
76
- exports.Table = (0, react_1.forwardRef)(({ data = constants_1.EMPTY_ARRAY, columns = constants_1.EMPTY_ARRAY, isPaginated = false, loading = false, headerHeight, rowsSelectable = false, enableMultiRowSelection = true, pageSizes = DEFAULT_PAGE_SIZES, rowDisabledPredicate = defaultIsRowDisabled, sortBy, sortingDirection = "ascending", iconSortAsc, iconSortDesc, iconNoSort, sortingDidChange, willSort, style, noDataRenderer, autoFocus = false, hideHeader = false, hideNoDataView = false, alwaysShowSelectionHeader = false, registerComponentApi, onSelectionDidChange, noBottomBorder = false,
76
+ exports.Table = (0, react_1.forwardRef)(({ data = exports.defaultProps.data, columns = exports.defaultProps.columns, isPaginated = exports.defaultProps.isPaginated, loading = exports.defaultProps.loading, headerHeight, rowsSelectable = exports.defaultProps.rowsSelectable, enableMultiRowSelection = exports.defaultProps.enableMultiRowSelection, pageSizes = exports.defaultProps.pageSizes, rowDisabledPredicate = defaultIsRowDisabled, sortBy, sortingDirection = exports.defaultProps.sortingDirection, iconSortAsc, iconSortDesc, iconNoSort, sortingDidChange, willSort, style, noDataRenderer, autoFocus = exports.defaultProps.autoFocus, hideHeader = exports.defaultProps.hideHeader, hideNoDataView = exports.defaultProps.hideNoDataView, alwaysShowSelectionHeader = exports.defaultProps.alwaysShowSelectionHeader, registerComponentApi, onSelectionDidChange, noBottomBorder = exports.defaultProps.noBottomBorder,
77
77
  // cols
78
78
  }, forwardedRef) => {
79
79
  var _a, _b, _c, _d;
@@ -162,7 +162,7 @@ exports.Table = (0, react_1.forwardRef)(({ data = constants_1.EMPTY_ARRAY, colum
162
162
  const { width, starSizedWidth } = getColumnWidth(col.width, true, "width");
163
163
  const { width: minWidth } = getColumnWidth(col.minWidth, false, "minWidth");
164
164
  const { width: maxWidth } = getColumnWidth(col.maxWidth, false, "maxWidth");
165
- const customColumn = Object.assign(Object.assign({}, col), { header: (_b = (_a = col.header) !== null && _a !== void 0 ? _a : col.accessorKey) !== null && _b !== void 0 ? _b : " ", id: "col_" + idx, size: width, minSize: minWidth, maxSize: maxWidth, enableResizing: col.canResize, enableSorting: col.canSort, enablePinning: col.pinTo !== undefined, meta: {
165
+ const customColumn = Object.assign(Object.assign({}, col), { header: (_b = (_a = col.header) !== null && _a !== void 0 ? _a : col.accessorKey) !== null && _b !== void 0 ? _b : " ", id: "col_" + idx, size: width, minSize: minWidth, maxSize: maxWidth, enableResizing: col.canResize, enableSorting: col.canSort && !!col.accessorKey, enablePinning: col.pinTo !== undefined, meta: {
166
166
  starSizedWidth,
167
167
  pinTo: col.pinTo,
168
168
  style: col.style,
@@ -384,10 +384,11 @@ exports.Table = (0, react_1.forwardRef)(({ data = constants_1.EMPTY_ARRAY, colum
384
384
  return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(Table_module_scss_1.default.wrapper, { [Table_module_scss_1.default.noScroll]: hasOutsideScroll }), tabIndex: -1, onKeyDown: onKeyDown, ref: ref, style: style, children: [(0, jsx_runtime_1.jsxs)("table", { className: Table_module_scss_1.default.table, ref: tableRef, style: { borderRight: "1px solid transparent" }, children: [!hideHeader && ((0, jsx_runtime_1.jsx)("thead", { style: { height: headerHeight }, className: Table_module_scss_1.default.headerWrapper, children: table.getHeaderGroups().map((headerGroup, headerGroupIndex) => ((0, jsx_runtime_1.jsx)("tr", { className: (0, classnames_1.default)(Table_module_scss_1.default.headerRow, {
385
385
  [Table_module_scss_1.default.allSelected]: table.getIsAllRowsSelected(),
386
386
  }), children: headerGroup.headers.map((header, headerIndex) => {
387
- var _a, _b;
388
- const _c = ((_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.style) || {}, { width } = _c, style = __rest(_c, ["width"]);
387
+ var _a, _b, _c;
388
+ const _d = ((_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.style) || {}, { width } = _d, style = __rest(_d, ["width"]);
389
389
  const size = header.getSize();
390
- return ((0, jsx_runtime_1.jsxs)("th", { className: Table_module_scss_1.default.columnCell, colSpan: header.colSpan, style: Object.assign({ position: "relative", width: size }, getCommonPinningStyles(header.column)), children: [(0, jsx_runtime_1.jsx)(ClickableHeader, { hasSorting: header.column.columnDef.enableSorting, updateSorting: () => { var _a; return _updateSorting((_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.accessorKey); }, children: (0, jsx_runtime_1.jsxs)("div", { className: Table_module_scss_1.default.headerContent, style: style, children: [(0, react_table_1.flexRender)(header.column.columnDef.header, header.getContext()), header.column.columnDef.enableSorting && ((0, jsx_runtime_1.jsx)("span", { style: { display: "inline-flex", maxWidth: 16 }, children: (0, jsx_runtime_1.jsx)(ColumnOrderingIndicator, { iconSortAsc: iconSortAsc, iconSortDesc: iconSortDesc, iconNoSort: iconNoSort, direction: ((_b = header.column.columnDef.meta) === null || _b === void 0 ? void 0 : _b.accessorKey) === _sortBy
390
+ return ((0, jsx_runtime_1.jsxs)("th", { className: Table_module_scss_1.default.columnCell, colSpan: header.colSpan, style: Object.assign({ position: "relative", width: size }, getCommonPinningStyles(header.column)), children: [(0, jsx_runtime_1.jsx)(ClickableHeader, { hasSorting: header.column.columnDef.enableSorting &&
391
+ !!((_b = header.column.columnDef.meta) === null || _b === void 0 ? void 0 : _b.accessorKey), updateSorting: () => { var _a; return _updateSorting((_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.accessorKey); }, children: (0, jsx_runtime_1.jsxs)("div", { className: Table_module_scss_1.default.headerContent, style: style, children: [(0, react_table_1.flexRender)(header.column.columnDef.header, header.getContext()), header.column.columnDef.enableSorting && ((0, jsx_runtime_1.jsx)("span", { style: { display: "inline-flex", maxWidth: 16 }, children: (0, jsx_runtime_1.jsx)(ColumnOrderingIndicator, { iconSortAsc: iconSortAsc, iconSortDesc: iconSortDesc, iconNoSort: iconNoSort, direction: ((_c = header.column.columnDef.meta) === null || _c === void 0 ? void 0 : _c.accessorKey) === _sortBy
391
392
  ? _sortingDirection
392
393
  : undefined }) }))] }) }), header.column.getCanResize() && ((0, jsx_runtime_1.jsx)("div", { onDoubleClick: () => {
393
394
  touchedSizesRef.current[header.column.id] = false;
@@ -437,9 +438,9 @@ exports.Table = (0, react_1.forwardRef)(({ data = constants_1.EMPTY_ARRAY, colum
437
438
  const size = cell.column.getSize();
438
439
  return ((0, jsx_runtime_1.jsx)("td", { className: Table_module_scss_1.default.cell, style: Object.assign({
439
440
  // width: size,
440
- width: size }, getCommonPinningStyles(cell.column)), children: cellRenderer
441
- ? cellRenderer(cell.row.original, rowIndex, i, cell === null || cell === void 0 ? void 0 : cell.getValue())
442
- : (0, react_table_1.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, `${cell.id}-${i}`));
441
+ width: size }, getCommonPinningStyles(cell.column)), children: (0, jsx_runtime_1.jsx)("div", { className: Table_module_scss_1.default.cellContent, children: cellRenderer
442
+ ? cellRenderer(cell.row.original, rowIndex, i, cell === null || cell === void 0 ? void 0 : cell.getValue())
443
+ : (0, react_table_1.flexRender)(cell.column.columnDef.cell, cell.getContext()) }) }, `${cell.id}-${i}`));
443
444
  }) }, `${row.id}-${rowIndex}`));
444
445
  }), paddingBottom > 0 && ((0, jsx_runtime_1.jsx)("tr", { children: (0, jsx_runtime_1.jsx)("td", { style: { height: `${paddingBottom}px` } }) }))] }))] }), loading && !hasData && ((0, jsx_runtime_1.jsx)("div", { className: Table_module_scss_1.default.loadingWrapper, children: (0, jsx_runtime_1.jsx)(SpinnerNative_1.Spinner, {}) })), !hideNoDataView &&
445
446
  !loading &&
@@ -462,3 +463,18 @@ function ColumnOrderingIndicator({ direction, iconSortAsc = "sortasc:Table", ico
462
463
  }
463
464
  return iconNoSort !== "-" ? ((0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: iconNoSort, fallback: "nosort", size: "12" })) : ((0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: iconNoSort, size: "12" })); //nosort
464
465
  }
466
+ exports.defaultProps = {
467
+ data: constants_1.EMPTY_ARRAY,
468
+ columns: constants_1.EMPTY_ARRAY,
469
+ isPaginated: false,
470
+ loading: false,
471
+ rowsSelectable: false,
472
+ enableMultiRowSelection: true,
473
+ pageSizes: [10],
474
+ sortingDirection: "ascending",
475
+ autoFocus: false,
476
+ hideHeader: false,
477
+ hideNoDataView: false,
478
+ alwaysShowSelectionHeader: false,
479
+ noBottomBorder: false,
480
+ };
@@ -23,14 +23,14 @@ exports.TableOfContentsMd = (0, ComponentDefs_1.createMetadata)({
23
23
  description: `This property indicates that smooth scrolling is used while scrolling the selected table ` +
24
24
  `of contents items into view.`,
25
25
  valueType: "boolean",
26
- defaultValue: "false",
26
+ defaultValue: TableOfContentsNative_1.defaultProps.smoothScrolling,
27
27
  },
28
28
  maxHeadingLevel: {
29
29
  description: "Defines the maximum heading level (1 to 6) to include in the table of contents. " +
30
30
  "For example, if it is 2, then `H1` and `H2` are displayed, but lower levels " +
31
31
  "(`H3` to `H6`) are not.",
32
32
  valueType: "number",
33
- defaultValue: "6",
33
+ defaultValue: TableOfContentsNative_1.defaultProps.maxHeadingLevel,
34
34
  },
35
35
  },
36
36
  themeVars: (0, themeVars_1.parseScssVar)(TableOfContents_module_scss_1.default.themeVars),
@@ -41,8 +41,17 @@ exports.TableOfContentsMd = (0, ComponentDefs_1.createMetadata)({
41
41
  [`fontSize-${COMP_CHILD}`]: "$fontSize-small",
42
42
  [`wordWrap-${COMP_CHILD}`]: "break-word",
43
43
  [`paddingVertical-${COMP_CHILD}`]: "$space-1",
44
- [`paddingHorizontal-${COMP_CHILD}`]: "$space-1",
44
+ [`paddingLeft-${COMP_CHILD}`]: "$space-1",
45
+ [`paddingLeft-${COMP_CHILD}-level-2`]: "$space-3",
46
+ [`paddingLeft-${COMP_CHILD}-level-3`]: "$space-5",
47
+ [`paddingLeft-${COMP_CHILD}-level-4`]: "$space-6",
48
+ [`paddingLeft-${COMP_CHILD}-level-5`]: "$space-6",
49
+ [`paddingLeft-${COMP_CHILD}-level-6`]: "$space-6",
45
50
  [`fontWeight-${COMP_CHILD}`]: "$fontWeight-bold",
51
+ [`fontWeight-${COMP_CHILD}-level-3`]: "normal",
52
+ [`fontWeight-${COMP_CHILD}-level-4`]: "normal",
53
+ [`fontWeight-${COMP_CHILD}-level-5`]: "normal",
54
+ [`fontWeight-${COMP_CHILD}-level-6`]: "normal",
46
55
  [`fontStyle-${COMP_CHILD}-level-6`]: "italic",
47
56
  [`color-${COMP_CHILD}--active`]: "$color-primary-500",
48
57
  },
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TableOfContents = void 0;
6
+ exports.TableOfContents = exports.defaultProps = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = require("react");
9
9
  const react_2 = require("@remix-run/react");
@@ -13,7 +13,11 @@ 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
15
  const hooks_1 = require("../../components-core/utils/hooks");
16
- exports.TableOfContents = (0, react_1.forwardRef)(function TableOfContents({ style, smoothScrolling, maxHeadingLevel = 6 }, forwardedRef) {
16
+ exports.defaultProps = {
17
+ smoothScrolling: false,
18
+ maxHeadingLevel: 6,
19
+ };
20
+ exports.TableOfContents = (0, react_1.forwardRef)(function TableOfContents({ style, smoothScrolling = exports.defaultProps.smoothScrolling, maxHeadingLevel = exports.defaultProps.maxHeadingLevel }, forwardedRef) {
17
21
  const tocRef = (0, react_1.useRef)(null);
18
22
  const { headings, scrollToAnchor, subscribeToActiveAnchorChange, activeAnchorId: initialActiveAnchorId } = (0, TableOfContentsContext_1.useTableOfContents)();
19
23
  const [activeAnchorId, setActiveId] = (0, react_1.useState)(initialActiveAnchorId);
@@ -18,13 +18,13 @@ exports.TabsMd = (0, ComponentDefs_1.createMetadata)({
18
18
  description: `The \`${COMP}\` component provides a tabbed layout where each tab has a clickable label and content.`,
19
19
  props: {
20
20
  activeTab: (0, ComponentDefs_1.d)(`This property indicates the index of the active tab. The indexing starts from 0, ` +
21
- `representing the starting (leftmost) tab.`),
21
+ `representing the starting (leftmost) tab. If not set, the first tab is selected by default.`),
22
22
  orientation: {
23
23
  description: `This property indicates the orientation of the component. In horizontal orientation, ` +
24
24
  `the tab sections are laid out on the left side of the content panel, while in vertical ` +
25
25
  `orientation, the buttons are at the top.`,
26
26
  availableValues: ["horizontal", "vertical"],
27
- defaultValue: "vertical",
27
+ defaultValue: TabsNative_1.defaultProps.orientation,
28
28
  valueType: "string",
29
29
  },
30
30
  tabTemplate: (0, metadata_helpers_1.dComponent)(`This property declares the template for the clickable tab area.`),
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.Tabs = void 0;
39
+ exports.Tabs = exports.defaultProps = void 0;
40
40
  const jsx_runtime_1 = require("react/jsx-runtime");
41
41
  const react_1 = require("react");
42
42
  const RTabs = __importStar(require("@radix-ui/react-tabs"));
@@ -44,7 +44,12 @@ const Tabs_module_scss_1 = __importDefault(require("./Tabs.module.scss"));
44
44
  const misc_1 = require("../../components-core/utils/misc");
45
45
  const TabContext_1 = require("../Tabs/TabContext");
46
46
  const classnames_1 = __importDefault(require("classnames"));
47
- exports.Tabs = (0, react_1.forwardRef)(function Tabs({ activeTab = 0, orientation = "horizontal", tabRenderer, style, children, registerComponentApi, className, distributeEvenly = false, }, forwardedRef) {
47
+ exports.defaultProps = {
48
+ activeTab: 0,
49
+ orientation: "horizontal",
50
+ distributeEvenly: false,
51
+ };
52
+ exports.Tabs = (0, react_1.forwardRef)(function Tabs({ activeTab = exports.defaultProps.activeTab, orientation = exports.defaultProps.orientation, tabRenderer, style, children, registerComponentApi, className, distributeEvenly = exports.defaultProps.distributeEvenly, }, forwardedRef) {
48
53
  const { tabItems, tabContextValue } = (0, TabContext_1.useTabContextValue)();
49
54
  const [activeIndex, setActiveIndex] = (0, react_1.useState)(activeTab);
50
55
  const currentTab = (0, react_1.useMemo)(() => {
@@ -37,17 +37,18 @@ exports.TextMd = (0, ComponentDefs_1.createMetadata)({
37
37
  },
38
38
  maxLines: (0, ComponentDefs_1.d)("This property determines the maximum number of lines the component can wrap to. " +
39
39
  "If there is no space to display all the contents, the component displays up to as " +
40
- "many lines as specified in this property. When the value is not defined, there is no limit on the displayed lines."),
40
+ "many lines as specified in this property. When the value is not defined, there is " +
41
+ "no limit on the displayed lines."),
41
42
  preserveLinebreaks: {
42
43
  description: `This property indicates if linebreaks should be preserved when displaying text.`,
43
44
  valueType: "boolean",
44
- defaultValue: "false",
45
+ defaultValue: TextNative_1.defaultProps.preserveLinebreaks,
45
46
  },
46
47
  ellipses: {
47
48
  description: "This property indicates whether ellipses should be displayed when the text is " +
48
49
  "cropped (\`true\`) or not (\`false\`).",
49
50
  valueType: "boolean",
50
- defaultValue: false,
51
+ defaultValue: TextNative_1.defaultProps.ellipses,
51
52
  },
52
53
  },
53
54
  themeVars: (0, themeVars_1.parseScssVar)(Text_module_scss_1.default.themeVars),
@@ -56,6 +57,7 @@ exports.TextMd = (0, ComponentDefs_1.createMetadata)({
56
57
  [`borderStyle-${COMP}`]: "solid",
57
58
  [`fontSize-${COMP}`]: "$fontSize-small",
58
59
  [`borderWidth-${COMP}`]: "$space-0",
60
+ [`lineHeight-${COMP}-codefence`]: "1.5",
59
61
  [`fontWeight-${COMP}-abbr`]: "$fontWeight-bold",
60
62
  [`textTransform-${COMP}-abbr`]: "uppercase",
61
63
  [`fontSize-${COMP}-secondary`]: "$fontSize-small",
@@ -63,13 +65,13 @@ exports.TextMd = (0, ComponentDefs_1.createMetadata)({
63
65
  [`textColor-${COMP}`]: "$textColor-primary",
64
66
  [`fontFamily-${COMP}`]: "$fontFamily",
65
67
  [`fontWeight-${COMP}`]: "$fontWeight-normal",
66
- [`fontSize-${COMP}-codefence`]: "$fontSize-small",
68
+ [`fontSize-${COMP}-codefence`]: "$fontSize-code",
67
69
  [`fontFamily-${COMP}-code`]: "$fontFamily-monospace",
68
70
  [`fontSize-${COMP}-code`]: "$fontSize-small",
69
71
  [`borderWidth-${COMP}-code`]: "1px",
70
72
  [`borderStyle-${COMP}-code`]: "solid",
71
73
  [`borderRadius-${COMP}-code`]: "4px",
72
- [`paddingHorizontal-${COMP}-code`]: "$space-1",
74
+ [`paddingHorizontal-${COMP}-code`]: "$space-0_5",
73
75
  [`paddingBottom-${COMP}-code`]: "2px",
74
76
  [`textDecorationLine-${COMP}-deleted`]: "line-through",
75
77
  [`textDecorationLine-${COMP}-inserted`]: "underline",
@@ -92,7 +94,7 @@ exports.TextMd = (0, ComponentDefs_1.createMetadata)({
92
94
  [`fontSize-${COMP}-small`]: "$fontSize-small",
93
95
  [`lineHeight-${COMP}-small`]: "$lineHeight-tight",
94
96
  [`letterSpacing-${COMP}-caption`]: "0.05rem",
95
- [`fontSize-${COMP}-placeholder`]: "$fontSize-small",
97
+ [`fontSize-${COMP}-placeholder`]: "$fontSize-smaller",
96
98
  [`fontFamily-${COMP}-codefence`]: "$fontFamily-monospace",
97
99
  [`paddingHorizontal-${COMP}-codefence`]: "$space-3",
98
100
  [`paddingVertical-${COMP}-codefence`]: "$space-2",
@@ -108,18 +110,18 @@ exports.TextMd = (0, ComponentDefs_1.createMetadata)({
108
110
  [`fontWeight-${COMP}-tableheading`]: "$fontWeight-bold",
109
111
  [`marginTop-${COMP}-markdown`]: "$space-3",
110
112
  [`marginBottom-${COMP}-markdown`]: "$space-6",
111
- [`backgroundColor-${COMP}-code`]: "rgba($color-surface-100-rgb, .4)",
113
+ [`backgroundColor-${COMP}-code`]: "rgb(from $color-surface-100 r g b / 0.4)",
112
114
  [`borderColor-${COMP}-code`]: "$color-surface-100",
113
- [`backgroundColor-${COMP}-keyboard`]: "rgba($color-surface-100-rgb, .4)",
115
+ [`backgroundColor-${COMP}-keyboard`]: "rgb(from $color-surface-100 r g b / 0.4)",
114
116
  [`borderColor-${COMP}-keyboard`]: "$color-surface-300",
115
- [`backgroundColor-${COMP}-marked`]: "rgba($color-primary-200-rgb, .4)",
117
+ [`backgroundColor-${COMP}-marked`]: "rgb(from $color-primary-200 r g b / 0.4)",
116
118
  [`color-${COMP}-placeholder`]: "$color-surface-500",
117
119
  [`color-${COMP}-codefence`]: "$color-surface-900",
118
120
  [`color-${COMP}-subheading`]: "$textColor-secondary",
119
121
  [`color-${COMP}-secondary`]: "$textColor-secondary",
120
122
  dark: {
121
- [`backgroundColor-${COMP}-marked`]: "rgba($color-primary-400-rgb, .4)",
122
- }
123
+ [`backgroundColor-${COMP}-marked`]: "rgb(from $color-primary-400 r g b / 0.4)",
124
+ },
123
125
  },
124
126
  });
125
127
  exports.textComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.TextMd, ({ node, extractValue, layoutCss, renderChild }) => {
@@ -127,5 +129,5 @@ exports.textComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, e
127
129
  const variantSpecificProps = Object.fromEntries(Object.entries(variantSpecific)
128
130
  .filter(([key, _]) => abstractions_1.VariantPropsKeys.includes(key))
129
131
  .map(([key, value]) => [key, extractValue(value)]));
130
- return ((0, jsx_runtime_1.jsx)(TextNative_1.Text, Object.assign({ variant: extractValue(variant), maxLines: extractValue.asOptionalNumber(maxLines), style: layoutCss, preserveLinebreaks: extractValue.asOptionalBoolean(preserveLinebreaks, false), ellipses: extractValue.asOptionalBoolean(ellipses, true) }, variantSpecificProps, { children: extractValue.asDisplayText(value) || renderChild(node.children) })));
132
+ return ((0, jsx_runtime_1.jsx)(TextNative_1.Text, Object.assign({ variant: extractValue(variant), maxLines: extractValue.asOptionalNumber(maxLines), style: layoutCss, preserveLinebreaks: extractValue.asOptionalBoolean(preserveLinebreaks, TextNative_1.defaultProps.preserveLinebreaks), ellipses: extractValue.asOptionalBoolean(ellipses, TextNative_1.defaultProps.ellipses) }, variantSpecificProps, { children: extractValue.asDisplayText(value) || renderChild(node.children) })));
131
133
  });
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Text = void 0;
17
+ exports.Text = exports.defaultProps = void 0;
18
18
  const jsx_runtime_1 = require("react/jsx-runtime");
19
19
  const react_1 = require("react");
20
20
  const react_compose_refs_1 = require("@radix-ui/react-compose-refs");
@@ -22,8 +22,13 @@ const classnames_1 = __importDefault(require("classnames"));
22
22
  const Text_module_scss_1 = __importDefault(require("./Text.module.scss"));
23
23
  const css_utils_1 = require("../../components-core/utils/css-utils");
24
24
  const abstractions_1 = require("../abstractions");
25
+ exports.defaultProps = {
26
+ maxLines: 0,
27
+ preserveLinebreaks: false,
28
+ ellipses: true,
29
+ };
25
30
  exports.Text = (0, react_1.forwardRef)(function Text(_a, forwardedRef) {
26
- var { uid, variant, maxLines = 0, style, children, preserveLinebreaks, ellipses = true } = _a, variantSpecificProps = __rest(_a, ["uid", "variant", "maxLines", "style", "children", "preserveLinebreaks", "ellipses"]);
31
+ var { uid, variant, maxLines = exports.defaultProps.maxLines, style, children, preserveLinebreaks = exports.defaultProps.preserveLinebreaks, ellipses = exports.defaultProps.ellipses } = _a, variantSpecificProps = __rest(_a, ["uid", "variant", "maxLines", "style", "children", "preserveLinebreaks", "ellipses"]);
27
32
  const innerRef = (0, react_1.useRef)(null);
28
33
  const ref = forwardedRef ? (0, react_compose_refs_1.composeRefs)(innerRef, forwardedRef) : innerRef;
29
34
  // NOTE: This is to accept syntax highlight classes coming from shiki
@@ -26,7 +26,7 @@ exports.TextAreaMd = (0, ComponentDefs_1.createMetadata)({
26
26
  description: "This optional boolean property indicates whether pressing the \`Enter\` key on the " +
27
27
  "keyboard prompts the parent \`Form\` component to submit.",
28
28
  valueType: "boolean",
29
- defaultValue: true,
29
+ defaultValue: TextAreaNative_1.defaultProps.enterSubmits,
30
30
  },
31
31
  escResets: {
32
32
  description: `This boolean property indicates whether the ${COMP} contents should be reset when pressing ` +
@@ -34,12 +34,14 @@ exports.TextAreaMd = (0, ComponentDefs_1.createMetadata)({
34
34
  valueType: "boolean",
35
35
  defaultValue: false,
36
36
  },
37
- maxRows: (0, ComponentDefs_1.d)(`This optional property sets the maximum number of text rows the \`${COMP}\` can grow.`),
38
- minRows: (0, ComponentDefs_1.d)(`This optional property sets the minimum number of text rows the \`${COMP}\` can shrink.`),
37
+ maxRows: (0, ComponentDefs_1.d)(`This optional property sets the maximum number of text rows the \`${COMP}\` ` +
38
+ "can grow. If not set, the number of rows is unlimited."),
39
+ minRows: (0, ComponentDefs_1.d)(`This optional property sets the minimum number of text rows the \`${COMP}\` can shrink. ` +
40
+ `If not set, the minimum number of rows is 1.`),
39
41
  rows: {
40
42
  description: `Specifies the number of rows the component initially has.`,
41
43
  valueType: "number",
42
- defaultValue: 2,
44
+ defaultValue: TextAreaNative_1.defaultProps.rows,
43
45
  },
44
46
  autoSize: {
45
47
  description: `If set to \`true\`, this boolean property enables the \`${COMP}\` to resize ` +
@@ -59,7 +61,8 @@ exports.TextAreaMd = (0, ComponentDefs_1.createMetadata)({
59
61
  readOnly: (0, metadata_helpers_1.dReadonly)(),
60
62
  enabled: (0, metadata_helpers_1.dEnabled)(),
61
63
  validationStatus: (0, metadata_helpers_1.dValidationStatus)(),
62
- resize: { description: `This optional property specifies in which dimensions can the \`TextArea\` ` +
64
+ resize: {
65
+ description: `This optional property specifies in which dimensions can the \`TextArea\` ` +
63
66
  `be resized by the user.`,
64
67
  availableValues: exports.resizeOptionsMd,
65
68
  },
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.TextArea = exports.resizeOptionKeys = void 0;
39
+ exports.TextArea = exports.defaultProps = exports.resizeOptionKeys = void 0;
40
40
  const jsx_runtime_1 = require("react/jsx-runtime");
41
41
  const react_1 = __importStar(require("react"));
42
42
  const classnames_1 = __importDefault(require("classnames"));
@@ -53,7 +53,24 @@ const resizeMap = {
53
53
  vertical: TextArea_module_scss_1.default.resizeVertical,
54
54
  both: TextArea_module_scss_1.default.resizeBoth,
55
55
  };
56
- exports.TextArea = (0, react_1.forwardRef)(function TextArea({ id, value = "", placeholder = "", required = false, readOnly = false, allowCopy = true, updateState = constants_1.noop, validationStatus, autoFocus = false, initialValue = "", resize, onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, controlled = true, enterSubmits = true, escResets, style, registerComponentApi, autoSize, maxRows, minRows, maxLength, rows = 2, enabled = true, label, labelPosition, labelWidth, labelBreak, }, forwardedRef) {
56
+ exports.defaultProps = {
57
+ value: "",
58
+ placeholder: "",
59
+ required: false,
60
+ readOnly: false,
61
+ allowCopy: true,
62
+ updateState: constants_1.noop,
63
+ autoFocus: false,
64
+ initialValue: "",
65
+ onDidChange: constants_1.noop,
66
+ onFocus: constants_1.noop,
67
+ onBlur: constants_1.noop,
68
+ controlled: true,
69
+ enterSubmits: true,
70
+ rows: 2,
71
+ enabled: true
72
+ };
73
+ exports.TextArea = (0, react_1.forwardRef)(function TextArea({ id, value = exports.defaultProps.value, placeholder = exports.defaultProps.placeholder, required = exports.defaultProps.required, readOnly = exports.defaultProps.readOnly, allowCopy = exports.defaultProps.allowCopy, updateState = exports.defaultProps.updateState, validationStatus, autoFocus = exports.defaultProps.autoFocus, initialValue = exports.defaultProps.initialValue, resize, onDidChange = exports.defaultProps.onDidChange, onFocus = exports.defaultProps.onFocus, onBlur = exports.defaultProps.onBlur, controlled = exports.defaultProps.controlled, enterSubmits = exports.defaultProps.enterSubmits, escResets, style, registerComponentApi, autoSize, maxRows, minRows, maxLength, rows = exports.defaultProps.rows, enabled = exports.defaultProps.enabled, label, labelPosition, labelWidth, labelBreak, }, forwardedRef) {
57
74
  // --- The component is initially unfocused
58
75
  const inputRef = (0, react_1.useRef)(null);
59
76
  const [cursorPosition, setCursorPosition] = (0, react_1.useState)(null);
@@ -17,7 +17,7 @@ exports.TextBoxMd = (0, ComponentDefs_1.createMetadata)({
17
17
  description: `The \`${COMP}\` is an input component that allows users to input and edit textual data.`,
18
18
  props: {
19
19
  placeholder: (0, metadata_helpers_1.dPlaceholder)(),
20
- initialValue: (0, metadata_helpers_1.dInitialValue)(),
20
+ initialValue: Object.assign(Object.assign({}, (0, metadata_helpers_1.dInitialValue)()), { defaultValue: TextBoxNative_1.defaultProps.initialValue }),
21
21
  label: (0, metadata_helpers_1.dLabel)(),
22
22
  labelPosition: (0, metadata_helpers_1.dLabelPosition)("top"),
23
23
  labelWidth: (0, metadata_helpers_1.dLabelWidth)(COMP),
@@ -26,14 +26,15 @@ exports.TextBoxMd = (0, ComponentDefs_1.createMetadata)({
26
26
  autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
27
27
  required: (0, metadata_helpers_1.dRequired)(),
28
28
  readOnly: (0, metadata_helpers_1.dReadonly)(),
29
- enabled: (0, metadata_helpers_1.dEnabled)(),
30
- validationStatus: (0, metadata_helpers_1.dValidationStatus)(),
29
+ enabled: Object.assign(Object.assign({}, (0, metadata_helpers_1.dEnabled)()), { defaultValue: TextBoxNative_1.defaultProps.enabled }),
30
+ validationStatus: Object.assign(Object.assign({}, (0, metadata_helpers_1.dValidationStatus)()), { defaultValue: TextBoxNative_1.defaultProps.validationStatus }),
31
31
  startText: (0, metadata_helpers_1.dStartText)(),
32
32
  startIcon: (0, metadata_helpers_1.dStartIcon)(),
33
33
  endText: (0, metadata_helpers_1.dEndText)(),
34
34
  endIcon: (0, metadata_helpers_1.dEndIcon)(),
35
35
  gap: {
36
- description: "This property defines the gap between the adornments and the input area.",
36
+ description: "This property defines the gap between the adornments and the input area. If not " +
37
+ "set, the gap declared by the current theme is used.",
37
38
  },
38
39
  },
39
40
  events: {
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.TextBox = void 0;
39
+ exports.TextBox = exports.defaultProps = void 0;
40
40
  const jsx_runtime_1 = require("react/jsx-runtime");
41
41
  const react_1 = require("react");
42
42
  const react_2 = __importStar(require("react"));
@@ -46,7 +46,19 @@ const constants_1 = require("../../components-core/constants");
46
46
  const misc_1 = require("../../components-core/utils/misc");
47
47
  const InputAdornment_1 = require("../Input/InputAdornment");
48
48
  const ItemWithLabel_1 = require("../FormItem/ItemWithLabel");
49
- exports.TextBox = (0, react_1.forwardRef)(function TextBox({ id, type = "text", value = "", updateState = constants_1.noop, initialValue = "", style, maxLength, enabled = true, placeholder, validationStatus = "none", onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, onKeyDown = constants_1.noop, registerComponentApi, startText, startIcon, endText, endIcon, gap, autoFocus, readOnly, tabIndex, label, labelPosition, labelWidth, labelBreak, required, }, ref) {
49
+ exports.defaultProps = {
50
+ type: "text",
51
+ value: "",
52
+ initialValue: "",
53
+ enabled: true,
54
+ validationStatus: "none",
55
+ onDidChange: constants_1.noop,
56
+ onFocus: constants_1.noop,
57
+ onBlur: constants_1.noop,
58
+ onKeyDown: constants_1.noop,
59
+ updateState: constants_1.noop,
60
+ };
61
+ exports.TextBox = (0, react_1.forwardRef)(function TextBox({ id, type = exports.defaultProps.type, value = exports.defaultProps.value, updateState = exports.defaultProps.updateState, initialValue = exports.defaultProps.initialValue, style, maxLength, enabled = exports.defaultProps.enabled, placeholder, validationStatus = exports.defaultProps.validationStatus, onDidChange = exports.defaultProps.onDidChange, onFocus = exports.defaultProps.onFocus, onBlur = exports.defaultProps.onBlur, onKeyDown = exports.defaultProps.onKeyDown, registerComponentApi, startText, startIcon, endText, endIcon, gap, autoFocus, readOnly, tabIndex, label, labelPosition, labelWidth, labelBreak, required, }, ref) {
50
62
  const _id = (0, react_1.useId)();
51
63
  id = id || _id;
52
64
  const inputRef = (0, react_2.useRef)(null);
@@ -31,7 +31,7 @@ exports.ThemeMd = (0, ComponentDefs_1.createMetadata)({
31
31
  valueType: "string",
32
32
  defaultValue: "light",
33
33
  },
34
- root: (0, ComponentDefs_1.d)(`This property indicates whether the component is at the root of the application.`),
34
+ root: (0, ComponentDefs_1.d)(`This property indicates whether the component is at the root of the application.`, undefined, "boolean", ThemeNative_1.defaultProps.root),
35
35
  },
36
36
  opaque: true,
37
37
  });
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.defaultProps = void 0;
6
7
  exports.Theme = Theme;
7
8
  const jsx_runtime_1 = require("react/jsx-runtime");
8
9
  const react_1 = require("react");
@@ -15,7 +16,6 @@ const ThemeContext_1 = require("../../components-core/theming/ThemeContext");
15
16
  const constants_1 = require("../../components-core/constants");
16
17
  const ErrorBoundary_1 = require("../../components-core/rendering/ErrorBoundary");
17
18
  const NotificationToast_1 = require("./NotificationToast");
18
- const InspectorContext_1 = require("../../components-core/InspectorContext");
19
19
  const IndexerContext_1 = require("../App/IndexerContext");
20
20
  function getClassName(css) {
21
21
  return `theme-${calculateHash(css)}`;
@@ -31,7 +31,13 @@ function calculateHash(str) {
31
31
  }
32
32
  return hash;
33
33
  }
34
- function Theme({ id, isRoot = false, renderChild, node, tone, toastDuration = 5000, themeVars = constants_1.EMPTY_OBJECT, layoutContext, children, }) {
34
+ exports.defaultProps = {
35
+ isRoot: false,
36
+ toastDuration: 5000,
37
+ themeVars: constants_1.EMPTY_OBJECT,
38
+ root: false,
39
+ };
40
+ function Theme({ id, isRoot = exports.defaultProps.isRoot, renderChild, node, tone, toastDuration = exports.defaultProps.toastDuration, themeVars = exports.defaultProps.themeVars, layoutContext, children, }) {
35
41
  const generatedId = (0, react_1.useId)();
36
42
  const { themes, resources, resourceMap, activeThemeId, setRoot, root } = (0, ThemeContext_1.useThemes)();
37
43
  const { activeTheme, activeThemeTone } = (0, ThemeContext_1.useTheme)();
@@ -112,16 +118,6 @@ function Theme({ id, isRoot = false, renderChild, node, tone, toastDuration = 50
112
118
  getResourceUrl,
113
119
  getThemeVar,
114
120
  ]);
115
- const { devToolsSize, devToolsSide, devToolsEnabled } = (0, InspectorContext_1.useDevTools)();
116
- const inspectStyle = (0, react_1.useMemo)(() => {
117
- return devToolsEnabled
118
- ? {
119
- paddingBottom: devToolsSide === "bottom" ? devToolsSize : 0,
120
- paddingLeft: devToolsSide === "left" ? devToolsSize : 0,
121
- paddingRight: devToolsSide === "right" ? devToolsSize : 0,
122
- }
123
- : {};
124
- }, [devToolsEnabled, devToolsSide, devToolsSize]);
125
121
  const { indexing } = (0, IndexerContext_1.useIndexerContext)();
126
122
  if (indexing) {
127
123
  return children;
@@ -130,7 +126,7 @@ function Theme({ id, isRoot = false, renderChild, node, tone, toastDuration = 50
130
126
  const faviconUrl = getResourceUrl("resource:favicon") || "/resources/favicon.ico";
131
127
  return (
132
128
  // <ThemeContext.Provider value={currentThemeContextValue}>
133
- (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_helmet_async_1.Helmet, { children: [!!faviconUrl && (0, jsx_runtime_1.jsx)("link", { rel: "icon", type: "image/svg+xml", href: faviconUrl }), fontLinks === null || fontLinks === void 0 ? void 0 : fontLinks.map((fontLink) => (0, jsx_runtime_1.jsx)("link", { href: fontLink, rel: "stylesheet" }, fontLink))] }), (0, jsx_runtime_1.jsx)("style", { type: "text/css", "data-theme-root": true, children: `.${className} {${css}}` }), (0, jsx_runtime_1.jsxs)("div", { style: inspectStyle, id: "_ui-engine-theme-root", className: (0, classnames_1.default)(Theme_module_scss_1.default.baseRootComponent, className), ref: (el) => {
129
+ (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_helmet_async_1.Helmet, { children: [!!faviconUrl && (0, jsx_runtime_1.jsx)("link", { rel: "icon", type: "image/svg+xml", href: faviconUrl }), fontLinks === null || fontLinks === void 0 ? void 0 : fontLinks.map((fontLink) => (0, jsx_runtime_1.jsx)("link", { href: fontLink, rel: "stylesheet" }, fontLink))] }), (0, jsx_runtime_1.jsx)("style", { type: "text/css", "data-theme-root": true, dangerouslySetInnerHTML: { __html: `.${className} {${css}}` } }), (0, jsx_runtime_1.jsxs)("div", { id: "_ui-engine-theme-root", className: (0, classnames_1.default)(Theme_module_scss_1.default.baseRootComponent, className), ref: (el) => {
134
130
  if (el) {
135
131
  setRoot(el);
136
132
  }
@@ -138,7 +134,7 @@ function Theme({ id, isRoot = false, renderChild, node, tone, toastDuration = 50
138
134
  // </ThemeContext.Provider>
139
135
  );
140
136
  }
141
- return ((0, jsx_runtime_1.jsxs)(ThemeContext_1.ThemeContext.Provider, { value: currentThemeContextValue, children: [(0, jsx_runtime_1.jsx)("style", { children: `.${className} {${css}}` }), (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(Theme_module_scss_1.default.baseRootComponent, Theme_module_scss_1.default.wrapper, className), children: renderChild(node.children, Object.assign(Object.assign({}, layoutContext), { themeClassName: className })) }), root &&
137
+ return ((0, jsx_runtime_1.jsxs)(ThemeContext_1.ThemeContext.Provider, { value: currentThemeContextValue, children: [(0, jsx_runtime_1.jsx)("style", { type: "text/css", dangerouslySetInnerHTML: { __html: `.${className} {${css}}` } }), (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(Theme_module_scss_1.default.baseRootComponent, Theme_module_scss_1.default.wrapper, className), children: renderChild(node.children, Object.assign(Object.assign({}, layoutContext), { themeClassName: className })) }), root &&
142
138
  (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(className), ref: (el) => {
143
139
  if (el) {
144
140
  setThemeRoot(el);