xmlui 0.7.26 → 0.7.28

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 (83) hide show
  1. package/dist/{apiInterceptorWorker-BlvgbCSf.mjs → apiInterceptorWorker-FalV8U3I.mjs} +1 -1
  2. package/dist/{index-CWLnzVw7.mjs → index-CTUFRo8v.mjs} +9969 -9448
  3. package/dist/scripts/src/components/APICall/APICall.js +69 -32
  4. package/dist/scripts/src/components/Accordion/Accordion.js +27 -7
  5. package/dist/scripts/src/components/Accordion/AccordionNative.js +9 -3
  6. package/dist/scripts/src/components/Alert/Alert.js +25 -6
  7. package/dist/scripts/src/components/App/App.js +48 -13
  8. package/dist/scripts/src/components/AppHeader/AppHeader.js +13 -6
  9. package/dist/scripts/src/components/AppState/AppState.js +14 -8
  10. package/dist/scripts/src/components/Avatar/Avatar.js +14 -3
  11. package/dist/scripts/src/components/Avatar/AvatarNative.js +5 -2
  12. package/dist/scripts/src/components/Backdrop/Backdrop.js +10 -2
  13. package/dist/scripts/src/components/Backdrop/BackdropNative.js +6 -2
  14. package/dist/scripts/src/components/Badge/Badge.js +17 -9
  15. package/dist/scripts/src/components/Badge/BadgeNative.js +6 -4
  16. package/dist/scripts/src/components/Bookmark/Bookmark.js +24 -11
  17. package/dist/scripts/src/components/Bookmark/BookmarkNative.js +8 -4
  18. package/dist/scripts/src/components/Button/Button.js +1 -7
  19. package/dist/scripts/src/components/ButtonGroup/ButtonGroup.js +22 -8
  20. package/dist/scripts/src/components/Card/Card.js +31 -10
  21. package/dist/scripts/src/components/Card/CardNative.js +6 -3
  22. package/dist/scripts/src/components/Carousel/Carousel.js +61 -12
  23. package/dist/scripts/src/components/Carousel/CarouselNative.js +13 -2
  24. package/dist/scripts/src/components/ChangeListener/ChangeListener.js +10 -3
  25. package/dist/scripts/src/components/ChangeListener/ChangeListenerNative.js +5 -1
  26. package/dist/scripts/src/components/Checkbox/Checkbox.js +8 -7
  27. package/dist/scripts/src/components/ColorPicker/ColorPicker.js +3 -3
  28. package/dist/scripts/src/components/ColorPicker/ColorPickerNative.js +8 -2
  29. package/dist/scripts/src/components/Column/Column.js +39 -17
  30. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +11 -3
  31. package/dist/scripts/src/components/ContentSeparator/ContentSeparatorNative.js +5 -2
  32. package/dist/scripts/src/components/DatePicker/DatePicker.js +42 -10
  33. package/dist/scripts/src/components/DatePicker/DatePickerNative.js +67 -26
  34. package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +52 -12
  35. package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +14 -3
  36. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +13 -4
  37. package/dist/scripts/src/components/FlowLayout/FlowLayout.js +18 -8
  38. package/dist/scripts/src/components/FlowLayout/FlowLayoutNative.js +5 -1
  39. package/dist/scripts/src/components/Form/Form.js +53 -17
  40. package/dist/scripts/src/components/Form/FormNative.js +9 -1
  41. package/dist/scripts/src/components/FormItem/FormItem.js +11 -5
  42. package/dist/scripts/src/components/FormItem/FormItemNative.js +6 -1
  43. package/dist/scripts/src/components/Heading/Heading.js +23 -4
  44. package/dist/scripts/src/components/Heading/HeadingNative.js +9 -4
  45. package/dist/scripts/src/components/Icon/Icon.js +6 -2
  46. package/dist/scripts/src/components/Icon/IconNative.js +2 -2
  47. package/dist/scripts/src/components/Image/Image.js +5 -1
  48. package/dist/scripts/src/components/Items/Items.js +4 -2
  49. package/dist/scripts/src/components/Items/ItemsNative.js +1 -3
  50. package/dist/scripts/src/components/Link/Link.js +13 -4
  51. package/dist/scripts/src/components/List/List.js +22 -5
  52. package/dist/scripts/src/components/Markdown/Markdown.js +8 -4
  53. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +12 -6
  54. package/dist/scripts/src/components/NavLink/NavLink.js +28 -10
  55. package/dist/scripts/src/components/NoResult/NoResult.js +6 -2
  56. package/dist/scripts/src/components/NumberBox/NumberBox.js +22 -6
  57. package/dist/scripts/src/components/ProgressBar/ProgressBar.js +5 -1
  58. package/dist/scripts/src/components/Spinner/Spinner.js +10 -2
  59. package/dist/scripts/src/components/Splitter/Splitter.js +38 -13
  60. package/dist/scripts/src/components/Stack/Stack.js +39 -11
  61. package/dist/scripts/src/components/StickyBox/StickyBox.js +7 -2
  62. package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +10 -3
  63. package/dist/scripts/src/components/Switch/Switch.js +6 -7
  64. package/dist/scripts/src/components/Table/Table.js +35 -18
  65. package/dist/scripts/src/components/TableOfContents/TableOfContents.js +13 -4
  66. package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +15 -22
  67. package/dist/scripts/src/components/Tabs/Tabs.js +8 -3
  68. package/dist/scripts/src/components/Text/Text.js +20 -8
  69. package/dist/scripts/src/components/TextArea/TextArea.js +30 -13
  70. package/dist/scripts/src/components/Theme/Theme.js +6 -2
  71. package/dist/scripts/src/components/Toggle/Toggle.js +10 -2
  72. package/dist/scripts/src/components/abstractions.js +14 -3
  73. package/dist/scripts/src/components/metadata-helpers.js +20 -8
  74. package/dist/scripts/src/components-core/TableOfContentsContext.js +57 -17
  75. package/dist/scripts/src/components-core/loader/DataLoader.js +1 -1
  76. package/dist/scripts/src/components-core/utils/hooks.js +3 -0
  77. package/dist/scripts/src/components-core/utils/misc.js +3 -0
  78. package/dist/style.css +1 -1
  79. package/dist/xmlui-metadata.mjs +10975 -6047
  80. package/dist/xmlui-metadata.umd.js +17 -17
  81. package/dist/xmlui-standalone.umd.js +182 -182
  82. package/dist/xmlui.mjs +1 -1
  83. package/package.json +1 -1
@@ -17,8 +17,12 @@ exports.IconMd = (0, ComponentDefs_1.createMetadata)({
17
17
  props: {
18
18
  name: (0, ComponentDefs_1.d)(`This string property specifies the name of the icon to display. All icons have unique names ` +
19
19
  `and identifying the name is case-sensitive.`),
20
- size: (0, ComponentDefs_1.d)(`This property defines the size of the \`${COMP}\`. Note that setting the \`height\` and/or ` +
21
- `the \`width\` of the component will override this property.`),
20
+ size: {
21
+ description: `This property defines the size of the \`${COMP}\`. Note that setting the \`height\` and/or ` +
22
+ `the \`width\` of the component will override this property.`,
23
+ availableValues: ["xs", "sm", "md", "lg"],
24
+ defaultValue: "md",
25
+ },
22
26
  fallback: (0, ComponentDefs_1.d)(`This optional property provides a way to handle situations when the provided ` +
23
27
  `[icon name](#name) is not found in the registry.`),
24
28
  },
@@ -25,9 +25,9 @@ const StyleParser_1 = require("../../parsers/style-parser/StyleParser");
25
25
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
26
26
  exports.Icon = (0, react_1.forwardRef)(function Icon(_a, ref) {
27
27
  var _b;
28
- var { name, fallback, style, className } = _a, restProps = __rest(_a, ["name", "fallback", "style", "className"]);
28
+ var { name, fallback, style, className, size = "md" } = _a, restProps = __rest(_a, ["name", "fallback", "style", "className", "size"]);
29
29
  const iconRenderer = useFindIconRenderer(name, fallback);
30
- const computedSize = typeof (restProps === null || restProps === void 0 ? void 0 : restProps.size) === "string" ? mapSizeToIconPack(restProps.size) : restProps === null || restProps === void 0 ? void 0 : restProps.size;
30
+ const computedSize = typeof size === "string" ? mapSizeToIconPack(size) : size;
31
31
  const width = computedSize || restProps.width;
32
32
  const height = computedSize || restProps.height;
33
33
  const computedProps = Object.assign(Object.assign({
@@ -18,7 +18,11 @@ exports.ImageMd = (0, ComponentDefs_1.createMetadata)({
18
18
  props: {
19
19
  src: (0, ComponentDefs_1.d)(`This property is used to indicate the source (path) of the image to display.`),
20
20
  alt: (0, ComponentDefs_1.d)(`This property specifies an alternate text for the image.`),
21
- fit: (0, ComponentDefs_1.d)(`This property sets how the image content should be resized to fit its container.`),
21
+ fit: {
22
+ description: "This property sets how the image content should be resized to fit its container.",
23
+ type: "string",
24
+ defaultValue: "contain",
25
+ },
22
26
  lazyLoad: (0, ComponentDefs_1.d)(`Lazy loading instructs the browser to load the image only when it is imminently needed ` +
23
27
  `(e.g. user scrolls to it). The default value is eager (\`false\`).`),
24
28
  aspectRatio: (0, ComponentDefs_1.d)(`This property sets a preferred aspect ratio for the image, which will be used in the ` +
@@ -12,9 +12,11 @@ exports.ItemsMd = (0, ComponentDefs_1.createMetadata)({
12
12
  description: `The \`${COMP}\` component maps sequential data items into component instances, representing ` +
13
13
  `each data item as a particular component.`,
14
14
  props: {
15
- items: (0, metadata_helpers_1.dComponent)(`This property contains the list of data items this component renders.`),
15
+ items: (0, metadata_helpers_1.dInternal)(`This property contains the list of data items this component renders.`),
16
16
  data: (0, ComponentDefs_1.d)(`This property contains the list of data items (obtained from a data source) this component renders.`),
17
- reverse: (0, ComponentDefs_1.d)(`This property reverses the order in which data is mapped to template components.`),
17
+ reverse: {
18
+ description: "This property reverses the order in which data is mapped to template components.",
19
+ },
18
20
  itemTemplate: (0, metadata_helpers_1.dComponent)("The component template to display a single item"),
19
21
  },
20
22
  contextVars: {
@@ -4,9 +4,7 @@ exports.Items = Items;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const lodash_es_1 = require("lodash-es");
7
- // =====================================================================================================================
8
- // React Items component implementation
9
- function Items({ items, renderItem, reverse = false, }) {
7
+ function Items({ items, renderItem, reverse = false }) {
10
8
  const itemsToRender = (0, react_1.useMemo)(() => {
11
9
  if (!items) {
12
10
  return [];
@@ -19,15 +19,24 @@ exports.LinkMd = (0, ComponentDefs_1.createMetadata)({
19
19
  props: {
20
20
  to: (0, ComponentDefs_1.d)(`This property defines the URL of the link.`),
21
21
  enabled: (0, metadata_helpers_1.dEnabled)(),
22
- active: (0, ComponentDefs_1.d)(`Indicates whether this link is active or not. If so, it will have a distinct visual appearance.`, null, "boolean", false),
23
- target: (0, ComponentDefs_1.d)(`This property specifies where to open the link represented by the \`${COMP}\`. This ` +
24
- `property accepts the following values (in accordance with the HTML standard):`, abstractions_1.LinkTargetMd, "string", "_self"),
22
+ active: {
23
+ description: `Indicates whether this link is active or not. If so, it will have a distinct visual appearance.`,
24
+ type: "boolean",
25
+ defaultValue: false,
26
+ },
27
+ target: {
28
+ description: `This property specifies where to open the link represented by the \`${COMP}\`. This ` +
29
+ `property accepts the following values (in accordance with the HTML standard):`,
30
+ availableValues: abstractions_1.LinkTargetMd,
31
+ type: "string",
32
+ defaultValue: "_self",
33
+ },
25
34
  label: (0, metadata_helpers_1.dLabel)(),
26
35
  icon: (0, ComponentDefs_1.d)(`This property allows you to add an icon (specify the icon's name) to the link.`),
27
36
  },
28
37
  themeVars: (0, themeVars_1.parseScssVar)(Link_module_scss_1.default.themeVars),
29
38
  defaultThemeVars: {
30
- [`border-${COMP}`]: '0px solid $color-border',
39
+ [`border-${COMP}`]: "0px solid $color-border",
31
40
  [`color-text-${COMP}--hover--active`]: `$color-text-${COMP}--active`,
32
41
  [`color-text-decoration-${COMP}--hover`]: "$color-surface-400A80",
33
42
  [`color-text-decoration-${COMP}--active`]: "$color-surface200",
@@ -22,14 +22,19 @@ exports.ListMd = (0, ComponentDefs_1.createMetadata)({
22
22
  props: {
23
23
  data: (0, ComponentDefs_1.d)(`The component receives data via this property. The \`data\` property is a list of items ` +
24
24
  `that the \`List\` can display.`),
25
- items: (0, ComponentDefs_1.d)(`You can use \`items\` as an alias for the \`data\` property. ` +
25
+ items: (0, metadata_helpers_1.dInternal)(`You can use \`items\` as an alias for the \`data\` property. ` +
26
26
  `When you bind the list to a data source (e.g. an API endpoint), ` +
27
27
  `the \`data\` acts as the property that accepts a URL to fetch information from an API.` +
28
28
  `When both \`items\` and \`data\` are used, \`items\` has priority.`),
29
29
  loading: (0, ComponentDefs_1.d)(`This property delays the rendering of children until it is set to \`false\`, or the ` +
30
30
  `component receives usable list items via the [\`data\`](#data) property.`),
31
31
  limit: (0, ComponentDefs_1.d)(`This property limits the number of items displayed in the \`${COMP}\`.`),
32
- scrollAnchor: (0, ComponentDefs_1.d)(`This property pins the scroll position to a specified location of the list. Available values are shown below.`, abstractions_1.scrollAnchoringValues, "string", "top"),
32
+ scrollAnchor: {
33
+ description: `This property pins the scroll position to a specified location of the list. Available values are shown below.`,
34
+ availableValues: abstractions_1.scrollAnchoringValues,
35
+ type: "string",
36
+ defaultValue: "top",
37
+ },
33
38
  groupBy: (0, ComponentDefs_1.d)(`This property sets which attribute of the data is used to group the list items. ` +
34
39
  `If the attribute does not appear in the data, it will be ignored.`),
35
40
  orderBy: (0, ComponentDefs_1.d)(`This property enables the ordering of list items by specifying an attribute in the data.`),
@@ -45,14 +50,26 @@ exports.ListMd = (0, ComponentDefs_1.createMetadata)({
45
50
  emptyListTemplate: (0, metadata_helpers_1.dComponent)(`This property defines the template to display when the list is empty.`),
46
51
  pageInfo: (0, ComponentDefs_1.d)(`This property contains the current page information. Setting this property also enures the ` +
47
52
  `\`${COMP}\` uses pagination.`),
48
- idKey: (0, ComponentDefs_1.d)(`Denotes which attribute of an item acts as the ID or key of the item. Default is \`"id"\`.`),
53
+ idKey: {
54
+ description: "Denotes which attribute of an item acts as the ID or key of the item",
55
+ type: "string",
56
+ defaultValue: "id",
57
+ },
49
58
  groupsInitiallyExpanded: (0, ComponentDefs_1.d)(`This Boolean property defines whether the list groups are initially expanded.`),
50
59
  defaultGroups: (0, ComponentDefs_1.d)(`This property adds a list of default groups for the \`${COMP}\` and displays the group ` +
51
60
  `headers in the specified order. If the data contains group headers not in this list, ` +
52
61
  `those headers are also displayed (after the ones in this list); however, their order ` +
53
62
  `is not deterministic.`),
54
- hideEmptyGroups: (0, ComponentDefs_1.d)("This boolean property indicates if empty groups should be hidden (no header and footer are displayed).", null, "boolean", true),
55
- borderCollapse: (0, ComponentDefs_1.d)("Collapse items borders", null, "boolean", true)
63
+ hideEmptyGroups: {
64
+ description: "This boolean property indicates if empty groups should be hidden (no header and footer are displayed).",
65
+ valueType: "boolean",
66
+ defaultValue: true,
67
+ },
68
+ borderCollapse: {
69
+ description: "Collapse items borders",
70
+ valueType: "boolean",
71
+ defaultValue: true,
72
+ },
56
73
  },
57
74
  contextVars: {
58
75
  $item: (0, ComponentDefs_1.d)(`This property represents the value of an item in the data list.`),
@@ -16,10 +16,14 @@ exports.MarkdownMd = (0, ComponentDefs_1.createMetadata)({
16
16
  themeVars: (0, themeVars_1.parseScssVar)(Markdown_module_scss_1.default.themeVars),
17
17
  props: {
18
18
  content: (0, ComponentDefs_1.d)("This property sets the markdown content to display."),
19
- removeIndents: (0, ComponentDefs_1.d)("This boolean property specifies whether leading indents should be " +
20
- "removed from the markdown content. If set to `true`, the shortest " +
21
- "indent found at the start of the content lines is removed from the " +
22
- "beginning of every line.", null, "boolean", false),
19
+ removeIndents: {
20
+ description: "This boolean property specifies whether leading indents should be " +
21
+ "removed from the markdown content. If set to `true`, the shortest " +
22
+ "indent found at the start of the content lines is removed from the " +
23
+ "beginning of every line.",
24
+ valueType: "boolean",
25
+ defaultValue: false,
26
+ },
23
27
  },
24
28
  defaultThemeVars: {
25
29
  "color-border-HorizontalRule": "$color-border",
@@ -17,12 +17,18 @@ exports.ModalDialogMd = (0, ComponentDefs_1.createMetadata)({
17
17
  description: `The \`${COMP}\` component defines a modal dialog UI element that can be displayed over ` +
18
18
  `the existing UI - triggered by some action.`,
19
19
  props: {
20
- fullScreen: (0, ComponentDefs_1.d)(`Toggles whether the dialog encompasses the whole UI (\`true\`) or not and has a minimum ` +
21
- `width and height (\`false\`).`),
20
+ fullScreen: {
21
+ description: `Toggles whether the dialog encompasses the whole UI (\`true\`) or not and has a minimum ` +
22
+ `width and height (\`false\`).`,
23
+ valueType: "boolean",
24
+ defaultValue: false,
25
+ },
22
26
  title: (0, ComponentDefs_1.d)(`Provides a prestyled heading to display the intent of the dialog.`),
23
- closeButtonVisible: (0, ComponentDefs_1.d)(`Shows (\`true\`) or hides (\`false\`) the visibility of the close button on the dialog.`),
24
- isInitiallyOpen: (0, ComponentDefs_1.d)(`This property sets whether the modal dialog appears open (\`true\`) or not (\`false\`) ` +
25
- `when the page is it is defined on is rendered.`),
27
+ closeButtonVisible: {
28
+ description: `Shows (\`true\`) or hides (\`false\`) the visibility of the close button on the dialog.`,
29
+ valueType: "boolean",
30
+ defaultValue: true,
31
+ },
26
32
  },
27
33
  events: {
28
34
  open: (0, ComponentDefs_1.d)(`This event is fired when the \`${COMP}\` is opened either via a \`when\` or an ` +
@@ -49,7 +55,7 @@ exports.ModalDialogMd = (0, ComponentDefs_1.createMetadata)({
49
55
  [`color-bg-${COMP}`]: "$color-bg-primary",
50
56
  } }),
51
57
  });
52
- exports.modalViewComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.ModalDialogMd, ({ node, extractValue, layoutCss, renderChild, lookupEventHandler, registerComponentApi, layoutContext }) => {
58
+ exports.modalViewComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.ModalDialogMd, ({ node, extractValue, layoutCss, renderChild, lookupEventHandler, registerComponentApi, layoutContext, }) => {
53
59
  var _a, _b;
54
60
  // gigantic hack: If the ModalDialog is not inside a ModalDialogFrame, wrap it in one
55
61
  // we do this through the layout context, render it through another render loop with the extra $param context var
@@ -12,6 +12,7 @@ const themeVars_1 = require("../../components-core/theming/themeVars");
12
12
  const metadata_helpers_1 = require("../metadata-helpers");
13
13
  const IconNative_1 = require("../Icon/IconNative");
14
14
  const NavLinkNative_1 = require("./NavLinkNative");
15
+ const abstractions_1 = require("../abstractions");
15
16
  const COMP = "NavLink";
16
17
  exports.NavLinkMd = (0, ComponentDefs_1.createMetadata)({
17
18
  description: `The \`${COMP}\` component defines a navigation target (app navigation menu item) within ` +
@@ -19,16 +20,33 @@ exports.NavLinkMd = (0, ComponentDefs_1.createMetadata)({
19
20
  props: {
20
21
  to: (0, ComponentDefs_1.d)(`This property defines the URL of the link.`),
21
22
  enabled: (0, metadata_helpers_1.dEnabled)(),
22
- active: (0, ComponentDefs_1.d)(`This property indicates if the particular navigation is an active link. An active link ` +
23
- `has a particular visual appearance, provided its [\`displayActive\`](#displayactive) ` +
24
- `property is set to \`true\`.`),
25
- target: (0, ComponentDefs_1.d)(`This property specifies how to open the clicked link.`),
23
+ active: {
24
+ description: `This property indicates if the particular navigation is an active link. An active link ` +
25
+ `has a particular visual appearance, provided its [\`displayActive\`](#displayactive) ` +
26
+ `property is set to \`true\`.`,
27
+ valueType: "boolean",
28
+ defaultValue: false,
29
+ },
30
+ target: {
31
+ description: `This property specifies how to open the clicked link.`,
32
+ availableValues: abstractions_1.LinkTargetMd,
33
+ type: "string",
34
+ defaultValue: "_self",
35
+ },
26
36
  label: (0, metadata_helpers_1.dLabel)(),
27
- vertical: (0, ComponentDefs_1.d)(`This property sets how the active status is displayed on the \`${COMP}\` component. If ` +
28
- `set to true, the indicator is displayed on the side which lends itself to a vertically ` +
29
- `aligned navigation menu.`),
30
- displayActive: (0, ComponentDefs_1.d)(`This Boolean property indicates if the active state of a link should have a visual ` +
31
- `indication. Setting it to \`false\` removes the visual indication of an active link.`),
37
+ vertical: {
38
+ description: `This property sets how the active status is displayed on the \`${COMP}\` component. If ` +
39
+ `set to true, the indicator is displayed on the side which lends itself to a vertically ` +
40
+ `aligned navigation menu.`,
41
+ valueType: "boolean",
42
+ defaultValue: false,
43
+ },
44
+ displayActive: {
45
+ description: `This Boolean property indicates if the active state of a link should have a visual ` +
46
+ `indication. Setting it to \`false\` removes the visual indication of an active link.`,
47
+ valueType: "boolean",
48
+ defaultValue: true,
49
+ },
32
50
  icon: (0, ComponentDefs_1.d)(`This property allows you to add an icon (specify the icon's name) to the navigation link.`),
33
51
  },
34
52
  events: {
@@ -36,7 +54,7 @@ exports.NavLinkMd = (0, ComponentDefs_1.createMetadata)({
36
54
  },
37
55
  themeVars: (0, themeVars_1.parseScssVar)(NavLink_module_scss_1.default.themeVars),
38
56
  defaultThemeVars: {
39
- [`border-NavLink`]: '0px solid $color-border',
57
+ [`border-NavLink`]: "0px solid $color-border",
40
58
  "radius-NavLink": "$radius",
41
59
  "color-bg-NavLink": "transparent",
42
60
  "padding-horizontal-NavLink": "$space-4",
@@ -18,11 +18,15 @@ exports.NoResultMd = (0, ComponentDefs_1.createMetadata)({
18
18
  props: {
19
19
  label: (0, metadata_helpers_1.dLabel)(),
20
20
  icon: (0, ComponentDefs_1.d)(`This property defines the icon to display with the component.`),
21
- hideIcon: (0, ComponentDefs_1.d)(`This boolean property indicates if the icon should be hidden.`),
21
+ hideIcon: {
22
+ description: `This boolean property indicates if the icon should be hidden.`,
23
+ valueType: "boolean",
24
+ defaultValue: "false",
25
+ },
22
26
  },
23
27
  themeVars: (0, themeVars_1.parseScssVar)(NoResult_module_scss_1.default.themeVars),
24
28
  defaultThemeVars: {
25
- [`border-${COMP}`]: '0px solid $color-border',
29
+ [`border-${COMP}`]: "0px solid $color-border",
26
30
  [`padding-vertical-${COMP}`]: "$space-2",
27
31
  [`gap-icon-${COMP}`]: "$space-2",
28
32
  [`size-icon-${COMP}`]: "$space-8",
@@ -33,12 +33,28 @@ exports.NumberBoxMd = (0, ComponentDefs_1.createMetadata)({
33
33
  startIcon: (0, metadata_helpers_1.dStartIcon)(),
34
34
  endText: (0, metadata_helpers_1.dEndText)(),
35
35
  endIcon: (0, metadata_helpers_1.dEndIcon)(),
36
- hasSpinBox: (0, ComponentDefs_1.d)(`This boolean prop shows (\`true\`) or hides (\`false\`) the spinner buttons for the input field.`, null, "boolean", true),
37
- step: (0, ComponentDefs_1.d)(`This prop governs how big the step when clicking on the spinner of the field.`, null, "number"),
38
- integersOnly: (0, ComponentDefs_1.d)(`This boolean property signs whether the input field accepts integers only (\`true\`) ` +
39
- `or not (\`false\`).`, null, "boolean", false),
40
- zeroOrPositive: (0, ComponentDefs_1.d)(`This boolean property determines whether the input value can only be 0 or positive numbers ` +
41
- `(\`true\`) or also negative (\`false\`).`, null, "boolean", false),
36
+ hasSpinBox: {
37
+ description: `This boolean prop shows (\`true\`) or hides (\`false\`) the spinner buttons for the input field.`,
38
+ valueType: "boolean",
39
+ defaultValue: true,
40
+ },
41
+ step: {
42
+ description: `This prop governs how big the step when clicking on the spinner of the field.`,
43
+ valueType: "number",
44
+ defaultValue: 1,
45
+ },
46
+ integersOnly: {
47
+ description: `This boolean property signs whether the input field accepts integers only (\`true\`) ` +
48
+ `or not (\`false\`).`,
49
+ valueType: "boolean",
50
+ defaultValue: false,
51
+ },
52
+ zeroOrPositive: {
53
+ description: `This boolean property determines whether the input value can only be 0 or positive numbers ` +
54
+ `(\`true\`) or also negative (\`false\`).`,
55
+ valueType: "boolean",
56
+ defaultValue: false,
57
+ },
42
58
  minValue: (0, ComponentDefs_1.d)(`The minimum value the input field allows. Can be a float or an integer if ` +
43
59
  `[\`integersOnly\`](#integersonly) is set to \`false\`, otherwise it can only be an integer.`),
44
60
  maxValue: (0, ComponentDefs_1.d)(`The maximum value the input field allows. Can be a float or an integer if ` +
@@ -14,7 +14,11 @@ const COMP = "ProgressBar";
14
14
  exports.ProgressBarMd = (0, ComponentDefs_1.createMetadata)({
15
15
  description: `A \`${COMP}\` component visually represents the progress of a task or process.`,
16
16
  props: {
17
- value: (0, ComponentDefs_1.d)(`This property defines the progress value with a number between 0 and 1.`),
17
+ value: {
18
+ description: `This property defines the progress value with a number between 0 and 1.`,
19
+ valueType: "number",
20
+ defaultValue: 0,
21
+ },
18
22
  },
19
23
  themeVars: (0, themeVars_1.parseScssVar)(ProgressBar_module_scss_1.default.themeVars),
20
24
  defaultThemeVars: {
@@ -15,8 +15,16 @@ exports.SpinnerMd = (0, ComponentDefs_1.createMetadata)({
15
15
  description: `The \`${COMP}\` component is an animated indicator that represents a particular action ` +
16
16
  `in progress without a deterministic progress value.`,
17
17
  props: {
18
- delay: (0, ComponentDefs_1.d)(`The delay in milliseconds before the spinner is displayed.`),
19
- fullScreen: (0, ComponentDefs_1.d)(`If set to \`true\`, the component will be rendered in a full screen container.`),
18
+ delay: {
19
+ description: `The delay in milliseconds before the spinner is displayed.`,
20
+ valueType: "number",
21
+ defaultValue: 400,
22
+ },
23
+ fullScreen: {
24
+ description: `If set to \`true\`, the component will be rendered in a full screen container.`,
25
+ valueType: "boolean",
26
+ defaultValue: false,
27
+ },
20
28
  themeColor: (0, ComponentDefs_1.d)(`(**NOT IMPLEMENTED YET**) The theme color of the component.`),
21
29
  },
22
30
  themeVars: (0, themeVars_1.parseScssVar)(Spinner_module_scss_1.default.themeVars),
@@ -18,20 +18,45 @@ const baseSplitterMd = (0, ComponentDefs_1.createMetadata)({
18
18
  description: `The \`${COMP}\` component divides a container (such as a window, panel, pane, etc.) ` +
19
19
  `into two resizable sections.`,
20
20
  props: {
21
- swapped: (0, ComponentDefs_1.d)(`This optional booelan property indicates whether the \`${COMP}\` sections are layed out as ` +
22
- `primary and secondary (\`false\`) or secondary and primary (\`true\`) from left to right.`),
21
+ swapped: {
22
+ description: `This optional booelan property indicates whether the \`${COMP}\` sections are layed out as ` +
23
+ `primary and secondary (\`false\`) or secondary and primary (\`true\`) from left to right.`,
24
+ valueType: "boolean",
25
+ defaultValue: false,
26
+ },
23
27
  splitterTemplate: (0, metadata_helpers_1.dComponent)(`The divider can be customized using XMLUI components via this property.`),
24
- initialPrimarySize: (0, ComponentDefs_1.d)(`This optional number property sets the initial size of the primary section. The unit of ` +
25
- `the size value is in pixels or percentages.`),
26
- minPrimarySize: (0, ComponentDefs_1.d)(`This property sets the minimum size the primary section can have. The unit of the size ` +
27
- `value is in pixels or percentages.`),
28
- maxPrimarySize: (0, ComponentDefs_1.d)(`This property sets the maximum size the primary section can have. The unit of the size ` +
29
- `value is in pixels or percentages.`),
30
- floating: (0, ComponentDefs_1.d)(`Toggles whether the resizer is visible (\`false\`) or not (\`true\`) when not hovered ` +
31
- `or dragged. The default value is \`false\`, meaning the resizer is visible all the time.`),
32
- orientation: (0, ComponentDefs_1.d)(`Sets whether the \`Splitter\` divides the container horizontally and lays out the ` +
33
- `section on top of each other (\`vertical\`), or vertically by placing the sections ` +
34
- `next to each other (\`horizontal\`).`),
28
+ initialPrimarySize: {
29
+ description: `This optional number property sets the initial size of the primary section. The unit of ` +
30
+ `the size value is in pixels or percentages.`,
31
+ valueType: "string",
32
+ defaultValue: "50%",
33
+ },
34
+ minPrimarySize: {
35
+ description: `This property sets the minimum size the primary section can have. The unit of the size ` +
36
+ `value is in pixels or percentages.`,
37
+ valueType: "string",
38
+ defaultValue: "0%",
39
+ },
40
+ maxPrimarySize: {
41
+ description: `This property sets the maximum size the primary section can have. The unit of the size ` +
42
+ `value is in pixels or percentages.`,
43
+ valueType: "string",
44
+ defaultValue: "100%",
45
+ },
46
+ floating: {
47
+ description: `Toggles whether the resizer is visible (\`false\`) or not (\`true\`) when not hovered ` +
48
+ `or dragged. The default value is \`false\`, meaning the resizer is visible all the time.`,
49
+ valueType: "boolean",
50
+ defaultValue: false,
51
+ },
52
+ orientation: {
53
+ description: `Sets whether the \`Splitter\` divides the container horizontally and lays out the ` +
54
+ `section on top of each other (\`vertical\`), or vertically by placing the sections ` +
55
+ `next to each other (\`horizontal\`).`,
56
+ valueType: "string",
57
+ availableValues: ["horizontal", "vertical"],
58
+ defaultValue: "vertical",
59
+ },
35
60
  },
36
61
  events: {
37
62
  resize: (0, ComponentDefs_1.d)(`This event fires when the component is resized.`),
@@ -13,26 +13,54 @@ const EngineError_1 = require("../../components-core/EngineError");
13
13
  const themeVars_1 = require("../../components-core/theming/themeVars");
14
14
  const metadata_helpers_1 = require("../metadata-helpers");
15
15
  const StackNative_1 = require("./StackNative");
16
+ const abstractions_1 = require("../abstractions");
16
17
  const COMP = "Stack";
17
- const HORIZONTAL_ALIGNMENT = (0, ComponentDefs_1.d)(`Manages the horizontal content alignment for each child element in the Stack.`);
18
- const VERTICAL_ALIGNMENT = (0, ComponentDefs_1.d)(`Manages the vertical content alignment for each child element in the Stack.`);
18
+ const HORIZONTAL_ALIGNMENT = {
19
+ description: "Manages the horizontal content alignment for each child element in the Stack.",
20
+ availableValues: abstractions_1.alignmentOptionValues,
21
+ valueType: "string",
22
+ defaultValue: "start",
23
+ };
24
+ const VERTICAL_ALIGNMENT = {
25
+ description: "Manages the vertical content alignment for each child element in the Stack.",
26
+ availableValues: abstractions_1.alignmentOptionValues,
27
+ valueType: "string",
28
+ defaultValue: "start",
29
+ };
19
30
  const stackMd = (0, ComponentDefs_1.createMetadata)({
20
31
  description: `\`Stack\` is a layout container displaying children in a horizontal or vertical stack.`,
21
32
  props: {
22
- gap: (0, ComponentDefs_1.d)(`Optional size value indicating the gap between child elements.`),
23
- reverse: (0, ComponentDefs_1.d)(`Optional boolean property to reverse the order of child elements.`),
24
- wrapContent: (0, ComponentDefs_1.d)(`Optional boolean which wraps the content if set to true and the available space is not big ` +
25
- `enough. Works in all orientations.`),
26
- orientation: (0, ComponentDefs_1.d)(`An optional property that governs the Stack's orientation (whether the Stack lays out its ` +
27
- `children in a row or a column).`),
33
+ gap: {
34
+ description: "Optional size value indicating the gap between child elements.",
35
+ valueType: "string",
36
+ defaultValue: "$gap-normal",
37
+ },
38
+ reverse: {
39
+ description: "Optional boolean property to reverse the order of child elements.",
40
+ valueType: "boolean",
41
+ defaultValue: false,
42
+ },
43
+ wrapContent: {
44
+ description: "Optional boolean which wraps the content if set to true and the available " +
45
+ "space is not big enough. Works only with horizontal orientations.",
46
+ valueType: "boolean",
47
+ defaultValue: false,
48
+ },
49
+ orientation: {
50
+ description: "An optional property that governs the Stack's orientation (whether " +
51
+ "the Stack lays out its children in a row or a column).",
52
+ availableValues: ["horizontal", "vertical"],
53
+ valueType: "string",
54
+ defaultValue: StackNative_1.DEFAULT_ORIENTATION,
55
+ },
28
56
  horizontalAlignment: HORIZONTAL_ALIGNMENT,
29
57
  verticalAlignment: VERTICAL_ALIGNMENT,
30
- hoverContainer: (0, ComponentDefs_1.d)("Reserved for future use"),
31
- visibleOnHover: (0, ComponentDefs_1.d)("Reserved for future use"),
58
+ hoverContainer: (0, metadata_helpers_1.dInternal)("Reserved for future use"),
59
+ visibleOnHover: (0, metadata_helpers_1.dInternal)("Reserved for future use"),
32
60
  },
33
61
  events: {
34
62
  click: (0, metadata_helpers_1.dClick)(COMP),
35
- mounted: (0, ComponentDefs_1.d)("Reserved for future use"),
63
+ mounted: (0, metadata_helpers_1.dInternal)("Reserved for future use"),
36
64
  },
37
65
  themeVars: (0, themeVars_1.parseScssVar)(Stack_module_scss_1.default.themeVars),
38
66
  });
@@ -16,8 +16,13 @@ exports.StickyBoxMd = (0, ComponentDefs_1.createMetadata)({
16
16
  description: `The \`${COMP}\` is a component that "sticks" or remains fixed at the top or bottom ` +
17
17
  `position on the screen as the user scrolls.`,
18
18
  props: {
19
- to: (0, ComponentDefs_1.d)(`This property determines whether the StickyBox should be anchored to ` +
20
- `the \`top\` or \`bottom\`.`),
19
+ to: {
20
+ description: "This property determines whether the StickyBox should be anchored to " +
21
+ "the \`top\` or \`bottom\`.",
22
+ availableValues: ["top", "bottom"],
23
+ valueType: "string",
24
+ defaultValue: "top",
25
+ },
21
26
  },
22
27
  themeVars: (0, themeVars_1.parseScssVar)(StickyBox_module_scss_1.default.themeVars),
23
28
  defaultThemeVars: {
@@ -7,7 +7,7 @@ exports.StickyBox = StickyBox;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = require("react");
9
9
  const classnames_1 = __importDefault(require("classnames"));
10
- const react_sticky_el_1 = __importDefault(require("react-sticky-el"));
10
+ const react_sticky_el_1 = require("react-sticky-el");
11
11
  const StickyBox_module_scss_1 = __importDefault(require("./StickyBox.module.scss"));
12
12
  const hooks_1 = require("../../components-core/utils/hooks");
13
13
  function StickyBox({ children, uid, layout, to = "top" }) {
@@ -18,10 +18,17 @@ function StickyBox({ children, uid, layout, to = "top" }) {
18
18
  const realBackground = (0, hooks_1.useRealBackground)(scrollParent);
19
19
  (0, react_1.useEffect)(() => {
20
20
  if (wrapper) {
21
- console.log(wrapper.innerHeight);
22
21
  document.documentElement.style.setProperty("--xmlui-scroll-margin-top", wrapper.clientHeight + "px");
23
22
  // scrollParent.setAttribute("data-xmlui-scroll-padding", true);
24
23
  }
25
24
  }, [scrollParent, wrapper]);
26
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [scrollParent && ((0, jsx_runtime_1.jsx)(react_sticky_el_1.default, { scrollElement: scrollParent, wrapperClassName: (0, classnames_1.default)(StickyBox_module_scss_1.default.wrapper), mode: to, onFixedToggle: setStuck, stickyStyle: Object.assign({ backgroundColor: realBackground }, layout), children: (0, jsx_runtime_1.jsx)("div", { ref: setWrapper, children: children }) })), (0, jsx_runtime_1.jsx)("div", { style: { display: "none" }, ref: sentinelRef, className: to === "top" ? StickyBox_module_scss_1.default.sentinel : "" })] }));
25
+ const wrapperClassName = (0, classnames_1.default)(StickyBox_module_scss_1.default.wrapper);
26
+ const stickyStyles = Object.assign({ backgroundColor: realBackground }, layout);
27
+ const stickyClassName = "";
28
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!!scrollParent && ((0, jsx_runtime_1.jsx)(react_sticky_el_1.RenderPropSticky, { mode: to, onFixedToggle: setStuck,
29
+ // hideOnBoundaryHit={hideOnBoundaryHit}
30
+ // offsetTransforms={offsetTransforms}
31
+ // disabled={disabled}
32
+ // boundaryElement={boundaryElement}
33
+ scrollElement: scrollParent, children: ({ isFixed, wrapperStyles, wrapperRef, holderStyles, holderRef }) => ((0, jsx_runtime_1.jsx)("div", { ref: holderRef, style: holderStyles, children: (0, jsx_runtime_1.jsx)("div", { className: `${wrapperClassName} ${isFixed ? stickyClassName : ''}`, style: isFixed ? Object.assign(Object.assign({}, wrapperStyles), stickyStyles) : wrapperStyles, ref: wrapperRef, children: (0, jsx_runtime_1.jsx)("div", { ref: setWrapper, children: children }) }) })) })), (0, jsx_runtime_1.jsx)("div", { style: { display: "none" }, ref: sentinelRef, className: to === "top" ? StickyBox_module_scss_1.default.sentinel : "" })] }));
27
34
  }
@@ -17,22 +17,21 @@ exports.SwitchMd = (0, ComponentDefs_1.createMetadata)({
17
17
  `on and off. It consists of a small rectangular or circular button that can be moved left or right to ` +
18
18
  `change its state.`,
19
19
  props: {
20
- indeterminate: (0, metadata_helpers_1.dIndeterminate)(),
20
+ indeterminate: (0, metadata_helpers_1.dIndeterminate)(Toggle_1.defaultProps.indeterminate),
21
21
  label: (0, metadata_helpers_1.dLabel)(),
22
22
  labelPosition: (0, metadata_helpers_1.dLabelPosition)("end"),
23
23
  labelWidth: (0, metadata_helpers_1.dLabelWidth)(COMP),
24
24
  labelBreak: (0, metadata_helpers_1.dLabelBreak)(COMP),
25
25
  required: (0, metadata_helpers_1.dRequired)(),
26
- initialValue: (0, metadata_helpers_1.dInitialValue)(false),
26
+ initialValue: (0, metadata_helpers_1.dInitialValue)(Toggle_1.defaultProps.initialValue),
27
27
  autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
28
28
  readOnly: (0, metadata_helpers_1.dReadonly)(),
29
29
  enabled: (0, metadata_helpers_1.dEnabled)(),
30
- validationStatus: (0, metadata_helpers_1.dValidationStatus)(),
31
- description: (0, ComponentDefs_1.d)(`(*** NOT IMPLEMENTED YET ***) This optional property displays an alternate description ` +
30
+ validationStatus: (0, metadata_helpers_1.dValidationStatus)(Toggle_1.defaultProps.validationStatus),
31
+ description: (0, metadata_helpers_1.dInternal)(`(*** NOT IMPLEMENTED YET ***) This optional property displays an alternate description ` +
32
32
  `of the ${COMP} besides its label.`),
33
33
  },
34
34
  events: {
35
- click: (0, metadata_helpers_1.dClick)(COMP),
36
35
  gotFocus: (0, metadata_helpers_1.dGotFocus)(COMP),
37
36
  lostFocus: (0, metadata_helpers_1.dLostFocus)(COMP),
38
37
  didChange: (0, metadata_helpers_1.dDidChange)(COMP),
@@ -67,6 +66,6 @@ exports.SwitchMd = (0, ComponentDefs_1.createMetadata)({
67
66
  },
68
67
  },
69
68
  });
70
- exports.switchComponentRenderer = (0, renderers_1.createComponentRenderer)("Switch", exports.SwitchMd, ({ node, extractValue, layoutCss, updateState, state, lookupEventHandler, registerComponentApi, }) => {
71
- return ((0, jsx_runtime_1.jsx)(Toggle_1.Toggle, { enabled: extractValue.asOptionalBoolean(node.props.enabled), style: layoutCss, initialValue: extractValue.asOptionalBoolean(node.props.initialValue) || false, value: state === null || state === void 0 ? void 0 : state.value, readOnly: extractValue.asOptionalBoolean(node.props.readOnly), validationStatus: extractValue(node.props.validationStatus), updateState: updateState, onDidChange: lookupEventHandler("didChange"), onFocus: lookupEventHandler("gotFocus"), onBlur: lookupEventHandler("lostFocus"), label: extractValue(node.props.label), labelPosition: extractValue(node.props.labelPosition), labelWidth: extractValue(node.props.labelWidth), labelBreak: extractValue.asOptionalBoolean(node.props.labelBreak), required: extractValue.asOptionalBoolean(node.props.required), variant: "switch", registerComponentApi: registerComponentApi }));
69
+ exports.switchComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.SwitchMd, ({ node, extractValue, layoutCss, updateState, state, lookupEventHandler, registerComponentApi, }) => {
70
+ return ((0, jsx_runtime_1.jsx)(Toggle_1.Toggle, { enabled: extractValue.asOptionalBoolean(node.props.enabled), style: layoutCss, initialValue: extractValue.asOptionalBoolean(node.props.initialValue, Toggle_1.defaultProps.initialValue), value: state === null || state === void 0 ? void 0 : state.value, readOnly: extractValue.asOptionalBoolean(node.props.readOnly), validationStatus: extractValue(node.props.validationStatus), updateState: updateState, onDidChange: lookupEventHandler("didChange"), onFocus: lookupEventHandler("gotFocus"), onBlur: lookupEventHandler("lostFocus"), label: extractValue(node.props.label), labelPosition: extractValue(node.props.labelPosition), labelWidth: extractValue(node.props.labelWidth), labelBreak: extractValue.asOptionalBoolean(node.props.labelBreak), required: extractValue.asOptionalBoolean(node.props.required), variant: "switch", registerComponentApi: registerComponentApi }));
72
71
  });