xmlui 0.7.25 → 0.7.27

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 (74) hide show
  1. package/dist/{apiInterceptorWorker-B0H9MD6w.mjs → apiInterceptorWorker-Ca5HMlfW.mjs} +1 -1
  2. package/dist/{index-Brmiu4kS.mjs → index-BMOK5q0U.mjs} +10810 -10330
  3. package/dist/index.css +1 -1
  4. package/dist/scripts/src/abstractions/ComponentDefs.js +2 -2
  5. package/dist/scripts/src/components/APICall/APICall.js +63 -28
  6. package/dist/scripts/src/components/Accordion/Accordion.js +28 -8
  7. package/dist/scripts/src/components/Accordion/AccordionNative.js +9 -3
  8. package/dist/scripts/src/components/Alert/Alert.js +25 -6
  9. package/dist/scripts/src/components/App/App.js +49 -13
  10. package/dist/scripts/src/components/App/AppNative.js +9 -3
  11. package/dist/scripts/src/components/AppHeader/AppHeader.js +10 -14
  12. package/dist/scripts/src/components/AppState/AppState.js +14 -8
  13. package/dist/scripts/src/components/Avatar/Avatar.js +16 -7
  14. package/dist/scripts/src/components/Avatar/AvatarNative.js +5 -2
  15. package/dist/scripts/src/components/Backdrop/Backdrop.js +10 -2
  16. package/dist/scripts/src/components/Backdrop/BackdropNative.js +6 -2
  17. package/dist/scripts/src/components/Badge/Badge.js +23 -10
  18. package/dist/scripts/src/components/Badge/BadgeNative.js +6 -4
  19. package/dist/scripts/src/components/Bookmark/Bookmark.js +22 -9
  20. package/dist/scripts/src/components/Bookmark/BookmarkNative.js +7 -3
  21. package/dist/scripts/src/components/Button/Button.js +74 -24
  22. package/dist/scripts/src/components/Button/ButtonNative.js +11 -3
  23. package/dist/scripts/src/components/ButtonGroup/ButtonGroup.js +22 -8
  24. package/dist/scripts/src/components/Card/Card.js +31 -10
  25. package/dist/scripts/src/components/Card/CardNative.js +6 -3
  26. package/dist/scripts/src/components/Carousel/Carousel.js +59 -12
  27. package/dist/scripts/src/components/Carousel/CarouselNative.js +13 -2
  28. package/dist/scripts/src/components/ChangeListener/ChangeListener.js +10 -3
  29. package/dist/scripts/src/components/ChangeListener/ChangeListenerNative.js +5 -1
  30. package/dist/scripts/src/components/Checkbox/Checkbox.js +8 -6
  31. package/dist/scripts/src/components/ColorPicker/ColorPicker.js +2 -2
  32. package/dist/scripts/src/components/ColorPicker/ColorPickerNative.js +8 -2
  33. package/dist/scripts/src/components/Column/Column.js +61 -16
  34. package/dist/scripts/src/components/Column/ColumnNative.js +8 -2
  35. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +11 -3
  36. package/dist/scripts/src/components/ContentSeparator/ContentSeparatorNative.js +5 -2
  37. package/dist/scripts/src/components/DatePicker/DatePicker.js +42 -10
  38. package/dist/scripts/src/components/DatePicker/DatePickerNative.js +67 -26
  39. package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +51 -12
  40. package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +14 -3
  41. package/dist/scripts/src/components/Footer/Footer.js +13 -10
  42. package/dist/scripts/src/components/Form/Form.js +7 -1
  43. package/dist/scripts/src/components/Form/FormNative.js +31 -2
  44. package/dist/scripts/src/components/Heading/Heading.js +5 -4
  45. package/dist/scripts/src/components/Heading/HeadingNative.js +4 -4
  46. package/dist/scripts/src/components/HtmlTags/HtmlTags.js +1 -1
  47. package/dist/scripts/src/components/Link/Link.js +1 -0
  48. package/dist/scripts/src/components/NavLink/NavLink.js +1 -0
  49. package/dist/scripts/src/components/NavPanel/NavPanel.js +12 -4
  50. package/dist/scripts/src/components/NoResult/NoResult.js +1 -0
  51. package/dist/scripts/src/components/Pages/PagesNative.js +1 -1
  52. package/dist/scripts/src/components/Select/SelectNative.js +17 -17
  53. package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +23 -4
  54. package/dist/scripts/src/components/Switch/Switch.js +6 -6
  55. package/dist/scripts/src/components/Table/Table.js +2 -7
  56. package/dist/scripts/src/components/Table/TableNative.js +1 -1
  57. package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +18 -9
  58. package/dist/scripts/src/components/Toggle/Toggle.js +10 -2
  59. package/dist/scripts/src/components/abstractions.js +1 -2
  60. package/dist/scripts/src/components/metadata-helpers.js +22 -9
  61. package/dist/scripts/src/components-core/TableOfContentsContext.js +21 -10
  62. package/dist/scripts/src/components-core/loader/DataLoader.js +7 -3
  63. package/dist/scripts/src/components-core/rendering/valueExtractor.js +5 -2
  64. package/dist/scripts/src/components-core/theming/ThemeProvider.js +4 -1
  65. package/dist/scripts/src/components-core/theming/transformThemeVars.js +55 -59
  66. package/dist/scripts/src/components-core/utils/hooks.js +76 -1
  67. package/dist/scripts/src/components-core/utils/misc.js +3 -0
  68. package/dist/style.css +1 -1
  69. package/dist/xmlui-metadata.mjs +6322 -4934
  70. package/dist/xmlui-metadata.umd.js +17 -17
  71. package/dist/xmlui-standalone.umd.js +186 -186
  72. package/dist/xmlui.d.ts +11 -6
  73. package/dist/xmlui.mjs +1 -1
  74. package/package.json +10 -12
@@ -24,7 +24,7 @@ const css_utils_1 = require("../../components-core/utils/css-utils");
24
24
  const TableOfContentsContext_1 = require("../../components-core/TableOfContentsContext");
25
25
  const HeadingLevelKeys = ["h1", "h2", "h3", "h4", "h5", "h6"];
26
26
  exports.Heading = (0, react_1.forwardRef)(function Heading(_a, forwardedRef) {
27
- var { uid, level = "h1", children, sx, style, title, maxLines = 0, preserveLinebreaks, ellipses = true, className } = _a, furtherProps = __rest(_a, ["uid", "level", "children", "sx", "style", "title", "maxLines", "preserveLinebreaks", "ellipses", "className"]);
27
+ var { uid, level = "h1", children, sx, style, title, maxLines = 0, preserveLinebreaks, ellipses = true, className, omitFromToc } = _a, furtherProps = __rest(_a, ["uid", "level", "children", "sx", "style", "title", "maxLines", "preserveLinebreaks", "ellipses", "className", "omitFromToc"]);
28
28
  const Element = level === null || level === void 0 ? void 0 : level.toLowerCase();
29
29
  const elementRef = (0, react_1.useRef)(null);
30
30
  const [anchorId, setAnchorId] = (0, react_1.useState)(null);
@@ -41,7 +41,7 @@ exports.Heading = (0, react_1.forwardRef)(function Heading(_a, forwardedRef) {
41
41
  }
42
42
  }, [observeIntersection]);
43
43
  (0, react_1.useEffect)(() => {
44
- if (observeIntersection && elementRef.current && anchorId) {
44
+ if (observeIntersection && elementRef.current && anchorId && !omitFromToc) {
45
45
  return registerHeading === null || registerHeading === void 0 ? void 0 : registerHeading({
46
46
  id: anchorId,
47
47
  level: parseInt(level.replace("h", "")),
@@ -49,10 +49,10 @@ exports.Heading = (0, react_1.forwardRef)(function Heading(_a, forwardedRef) {
49
49
  anchor: anchorRef.current,
50
50
  });
51
51
  }
52
- }, [anchorId, observeIntersection, registerHeading, level]);
52
+ }, [anchorId, observeIntersection, registerHeading, level, omitFromToc]);
53
53
  return ((0, jsx_runtime_1.jsxs)(Element, Object.assign({ ref: ref, id: uid, title: title, style: Object.assign(Object.assign(Object.assign({}, sx), style), (0, css_utils_1.getMaxLinesStyle)(maxLines)), className: (0, classnames_1.default)(Heading_module_scss_1.default.heading, Heading_module_scss_1.default[Element], className || "", {
54
54
  [Heading_module_scss_1.default.truncateOverflow]: maxLines > 0,
55
55
  [Heading_module_scss_1.default.preserveLinebreaks]: preserveLinebreaks,
56
56
  [Heading_module_scss_1.default.noEllipsis]: !ellipses,
57
- }) }, furtherProps, { children: [anchorId && observeIntersection && ((0, jsx_runtime_1.jsx)("span", { ref: anchorRef, id: anchorId, style: { width: 0, height: 0 } })), children] })));
57
+ }) }, furtherProps, { children: [anchorId && observeIntersection && ((0, jsx_runtime_1.jsx)("span", { ref: anchorRef, id: anchorId, style: { width: 0, height: 0 }, "data-anchor": true })), children] })));
58
58
  });
@@ -1041,7 +1041,7 @@ exports.HtmlTdMd = (0, ComponentDefs_1.createMetadata)({
1041
1041
  themeVars: (0, themeVars_1.parseScssVar)(HtmlTags_module_scss_1.default.themeVarsTd),
1042
1042
  defaultThemeVars: {
1043
1043
  "padding-HtmlTd": "$space-2",
1044
- "border-HtmlTd": "1px solid $color-border",
1044
+ "border-bottom-HtmlTd": "1px solid $color-border",
1045
1045
  }
1046
1046
  });
1047
1047
  exports.htmlTdTagRenderer = (0, renderers_1.createComponentRenderer)("td", exports.HtmlTdMd, ({ node, renderChild, extractValue, layoutCss }) => {
@@ -27,6 +27,7 @@ exports.LinkMd = (0, ComponentDefs_1.createMetadata)({
27
27
  },
28
28
  themeVars: (0, themeVars_1.parseScssVar)(Link_module_scss_1.default.themeVars),
29
29
  defaultThemeVars: {
30
+ [`border-${COMP}`]: '0px solid $color-border',
30
31
  [`color-text-${COMP}--hover--active`]: `$color-text-${COMP}--active`,
31
32
  [`color-text-decoration-${COMP}--hover`]: "$color-surface-400A80",
32
33
  [`color-text-decoration-${COMP}--active`]: "$color-surface200",
@@ -36,6 +36,7 @@ exports.NavLinkMd = (0, ComponentDefs_1.createMetadata)({
36
36
  },
37
37
  themeVars: (0, themeVars_1.parseScssVar)(NavLink_module_scss_1.default.themeVars),
38
38
  defaultThemeVars: {
39
+ [`border-NavLink`]: '0px solid $color-border',
39
40
  "radius-NavLink": "$radius",
40
41
  "color-bg-NavLink": "transparent",
41
42
  "padding-horizontal-NavLink": "$space-4",
@@ -9,7 +9,6 @@ const NavPanel_module_scss_1 = __importDefault(require("./NavPanel.module.scss")
9
9
  const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
10
10
  const renderers_1 = require("../../components-core/renderers");
11
11
  const themeVars_1 = require("../../components-core/theming/themeVars");
12
- const base_utils_1 = require("../../components-core/theming/themes/base-utils");
13
12
  const metadata_helpers_1 = require("../metadata-helpers");
14
13
  const NavPanelNative_1 = require("./NavPanelNative");
15
14
  const COMP = "NavPanel";
@@ -20,11 +19,20 @@ exports.NavPanelMd = (0, ComponentDefs_1.createMetadata)({
20
19
  `\`vertical\` and \`vertical-sticky\` layout.`),
21
20
  },
22
21
  themeVars: (0, themeVars_1.parseScssVar)(NavPanel_module_scss_1.default.themeVars),
23
- defaultThemeVars: Object.assign(Object.assign({ [`color-bg-${COMP}`]: "transparent" }, (0, base_utils_1.borderSubject)(COMP, {})), { [`padding-horizontal-${COMP}`]: "$space-4", [`padding-vertical-logo-${COMP}`]: "$space-4", [`padding-horizontal-logo-${COMP}`]: "$space-4", [`margin-bottom-logo-${COMP}`]: "$space-4", light: {
22
+ defaultThemeVars: {
23
+ [`color-bg-${COMP}`]: "transparent",
24
+ [`border-${COMP}`]: '0px solid $color-border',
25
+ [`padding-horizontal-${COMP}`]: "$space-4",
26
+ [`padding-vertical-logo-${COMP}`]: "$space-4",
27
+ [`padding-horizontal-logo-${COMP}`]: "$space-4",
28
+ [`margin-bottom-logo-${COMP}`]: "$space-4",
29
+ light: {
24
30
  [`shadow-${COMP}-vertical`]: "4px 0 4px 0 rgb(0 0 0 / 10%)",
25
- }, dark: {
31
+ },
32
+ dark: {
26
33
  [`shadow-${COMP}-vertical`]: "4px 0 6px 0 rgba(0, 0, 0, 0.2)",
27
- } }),
34
+ },
35
+ },
28
36
  });
29
37
  exports.navPanelRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.NavPanelMd, ({ node, renderChild, layoutCss, layoutContext }) => {
30
38
  return ((0, jsx_runtime_1.jsx)(NavPanelNative_1.NavPanel, { style: layoutCss, logoContent: renderChild(node.props.logoTemplate), className: layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.themeClassName, inDrawer: layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.inDrawer, renderChild: renderChild, children: renderChild(node.children) }));
@@ -22,6 +22,7 @@ exports.NoResultMd = (0, ComponentDefs_1.createMetadata)({
22
22
  },
23
23
  themeVars: (0, themeVars_1.parseScssVar)(NoResult_module_scss_1.default.themeVars),
24
24
  defaultThemeVars: {
25
+ [`border-${COMP}`]: '0px solid $color-border',
25
26
  [`padding-vertical-${COMP}`]: "$space-2",
26
27
  [`gap-icon-${COMP}`]: "$space-2",
27
28
  [`size-icon-${COMP}`]: "$space-8",
@@ -24,7 +24,7 @@ const constants_1 = require("../../components-core/constants");
24
24
  const Pages_module_scss_1 = __importDefault(require("./Pages.module.scss"));
25
25
  // --- We need this component to make sure all the child routes are wrapped in a
26
26
  // --- container and this way they can access the routeParams
27
- function RouteWrapper({ childRoute = constants_1.EMPTY_ARRAY, renderChild, layoutContext, style, uid }) {
27
+ function RouteWrapper({ childRoute = constants_1.EMPTY_ARRAY, renderChild, layoutContext, style, uid, }) {
28
28
  const params = (0, react_2.useParams)();
29
29
  //we need to wrap the child route in a container to make sure the route params are available.
30
30
  // we do this wrapping by providing an empty object to vars.
@@ -50,13 +50,13 @@ const constants_1 = require("../../components-core/constants");
50
50
  const ThemeContext_1 = require("../../components-core/theming/ThemeContext");
51
51
  const misc_1 = require("../../components-core/utils/misc");
52
52
  const IconNative_1 = __importDefault(require("../Icon/IconNative"));
53
- const SelectContext_1 = require("../Select/SelectContext");
53
+ const SelectContext_1 = require("./SelectContext");
54
54
  const OptionTypeProvider_1 = __importDefault(require("../Option/OptionTypeProvider"));
55
- const OptionContext_1 = require("../Select/OptionContext");
55
+ const OptionContext_1 = require("./OptionContext");
56
56
  const ItemWithLabel_1 = require("../FormItem/ItemWithLabel");
57
57
  const SimpleSelect = (0, react_1.forwardRef)(function SimpleSelect(props, forwardedRef) {
58
58
  const { root } = (0, ThemeContext_1.useTheme)();
59
- const { enabled, onBlur, autoFocus, onValueChange, validationStatus, children, value, height, style, placeholder, id, triggerRef, onFocus, options, } = props;
59
+ const { enabled, onBlur, autoFocus, onValueChange, validationStatus, children, value, height, style, placeholder, id, triggerRef, onFocus, options } = props;
60
60
  const ref = forwardedRef ? (0, react_compose_refs_1.composeRefs)(triggerRef, forwardedRef) : triggerRef;
61
61
  const stringValue = value + "";
62
62
  const onValChange = (0, react_1.useCallback)((val) => {
@@ -67,10 +67,10 @@ const SimpleSelect = (0, react_1.forwardRef)(function SimpleSelect(props, forwar
67
67
  return ((0, jsx_runtime_1.jsx)(OptionTypeProvider_1.default, { Component: SelectOption, children: (0, jsx_runtime_1.jsxs)(react_select_1.Root, { value: stringValue, onValueChange: onValChange, children: [(0, jsx_runtime_1.jsxs)(react_select_1.Trigger, { id: id, style: style, onFocus: onFocus, onBlur: onBlur, disabled: !enabled, className: (0, classnames_1.default)(Select_module_scss_1.default.selectTrigger, {
68
68
  [Select_module_scss_1.default.error]: validationStatus === "error",
69
69
  [Select_module_scss_1.default.warning]: validationStatus === "warning",
70
- [Select_module_scss_1.default.valid]: validationStatus === "valid",
70
+ [Select_module_scss_1.default.valid]: validationStatus === "valid"
71
71
  }), ref: ref, autoFocus: autoFocus, children: [(0, jsx_runtime_1.jsx)("div", { className: Select_module_scss_1.default.selectValue, children: (0, jsx_runtime_1.jsx)(react_select_1.Value, { placeholder: placeholder }) }), (0, jsx_runtime_1.jsx)(react_select_1.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "chevrondown" }) })] }), (0, jsx_runtime_1.jsx)(react_select_1.Portal, { container: root, children: (0, jsx_runtime_1.jsxs)(react_select_1.Content, { className: Select_module_scss_1.default.selectContent, position: "popper", style: { height: height }, children: [(0, jsx_runtime_1.jsx)(react_select_1.ScrollUpButton, { className: Select_module_scss_1.default.selectScrollUpButton, children: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "chevronup" }) }), (0, jsx_runtime_1.jsx)(react_select_1.Viewport, { className: (0, classnames_1.default)(Select_module_scss_1.default.selectViewport), children: children }), (0, jsx_runtime_1.jsx)(react_select_1.ScrollDownButton, { className: Select_module_scss_1.default.selectScrollDownButton, children: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "chevrondown" }) })] }) })] }) }));
72
72
  });
73
- exports.Select = (0, react_1.forwardRef)(function Select({ id, initialValue, value, enabled = true, placeholder, updateState = constants_1.noop, validationStatus = "none", onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, registerComponentApi, emptyListTemplate, optionLabelRenderer, valueRenderer, style, dropdownHeight, children, autoFocus = false, searchable = false, multiSelect = false, label, labelPosition, labelWidth, labelBreak, required = false, }, ref) {
73
+ exports.Select = (0, react_1.forwardRef)(function Select({ id, initialValue, value, enabled = true, placeholder, updateState = constants_1.noop, validationStatus = "none", onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, registerComponentApi, emptyListTemplate, optionLabelRenderer, valueRenderer, style, dropdownHeight, children, autoFocus = false, searchable = false, multiSelect = false, label, labelPosition, labelWidth, labelBreak, required = false }, ref) {
74
74
  var _a;
75
75
  const [referenceElement, setReferenceElement] = (0, react_1.useState)(null);
76
76
  const [open, setOpen] = (0, react_1.useState)(false);
@@ -129,7 +129,7 @@ exports.Select = (0, react_1.forwardRef)(function Select({ id, initialValue, val
129
129
  (0, react_1.useEffect)(() => {
130
130
  registerComponentApi === null || registerComponentApi === void 0 ? void 0 : registerComponentApi({
131
131
  focus,
132
- setValue,
132
+ setValue
133
133
  });
134
134
  }, [focus, registerComponentApi, setValue]);
135
135
  // Render the "empty list" message
@@ -146,17 +146,17 @@ exports.Select = (0, react_1.forwardRef)(function Select({ id, initialValue, val
146
146
  }, []);
147
147
  const optionContextValue = (0, react_1.useMemo)(() => ({
148
148
  onOptionAdd,
149
- onOptionRemove,
149
+ onOptionRemove
150
150
  }), [onOptionAdd, onOptionRemove]);
151
151
  const selectContextValue = (0, react_1.useMemo)(() => ({
152
152
  multiSelect,
153
153
  value,
154
154
  optionLabelRenderer,
155
- onChange: toggleOption,
155
+ onChange: toggleOption
156
156
  }), [multiSelect, toggleOption, value, optionLabelRenderer]);
157
157
  return ((0, jsx_runtime_1.jsx)(SelectContext_1.SelectContext.Provider, { value: selectContextValue, children: (0, jsx_runtime_1.jsx)(OptionContext_1.OptionContext.Provider, { value: optionContextValue, children: searchable || multiSelect ? ((0, jsx_runtime_1.jsxs)(OptionTypeProvider_1.default, { Component: HiddenOption, children: [children, (0, jsx_runtime_1.jsx)(ItemWithLabel_1.ItemWithLabel, { ref: ref, labelPosition: labelPosition, label: label, labelWidth: labelWidth, labelBreak: labelBreak, required: required, enabled: enabled, onFocus: onFocus, onBlur: onBlur, style: style, children: (0, jsx_runtime_1.jsxs)(react_popover_1.Popover, { open: open, onOpenChange: setOpen, modal: false, children: [(0, jsx_runtime_1.jsx)(react_popover_1.PopoverTrigger, { asChild: true, children: (0, jsx_runtime_1.jsxs)("button", { id: id, ref: setReferenceElement, onFocus: onFocus, onBlur: onBlur, disabled: !enabled, "aria-expanded": open, onClick: () => setOpen((prev) => !prev), className: (0, classnames_1.default)(Select_module_scss_1.default.selectTrigger, Select_module_scss_1.default[validationStatus], {
158
158
  [Select_module_scss_1.default.disabled]: !enabled,
159
- [Select_module_scss_1.default.multi]: multiSelect,
159
+ [Select_module_scss_1.default.multi]: multiSelect
160
160
  }), autoFocus: autoFocus, children: [multiSelect ? (Array.isArray(value) && value.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: Select_module_scss_1.default.badgeListContainer, children: (0, jsx_runtime_1.jsx)("div", { className: Select_module_scss_1.default.badgeList, children: value.map((v) => {
161
161
  var _a;
162
162
  return valueRenderer ? (valueRenderer(Array.from(options).find((o) => o.value === v), () => {
@@ -168,14 +168,14 @@ exports.Select = (0, react_1.forwardRef)(function Select({ id, initialValue, val
168
168
  }) }) })) : ((0, jsx_runtime_1.jsx)("span", { className: Select_module_scss_1.default.placeholder, children: placeholder || "" }))) : value !== undefined && value !== null ? ((0, jsx_runtime_1.jsx)("div", { children: (_a = Array.from(options).find((o) => o.value === value)) === null || _a === void 0 ? void 0 : _a.label })) : ((0, jsx_runtime_1.jsx)("span", { className: Select_module_scss_1.default.placeholder, children: placeholder || "" })), (0, jsx_runtime_1.jsxs)("div", { className: Select_module_scss_1.default.actions, children: [multiSelect && Array.isArray(value) && value.length > 0 && ((0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "close", onClick: (event) => {
169
169
  event.stopPropagation();
170
170
  clearValue();
171
- } })), (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "chevrondown" })] })] }) }), (0, jsx_runtime_1.jsx)(react_popover_1.Portal, { container: root, children: (0, jsx_runtime_1.jsx)(react_popover_1.PopoverContent, { style: { width, height: dropdownHeight }, className: Select_module_scss_1.default.selectContent, children: (0, jsx_runtime_1.jsxs)(cmdk_1.Command, { className: Select_module_scss_1.default.command, shouldFilter: searchable, filter: (value, search, keywords) => {
172
- const extendedValue = value + " " + keywords.join(" ");
173
- if (extendedValue.toLowerCase().includes(search.toLowerCase()))
174
- return 1;
175
- return 0;
176
- }, children: [searchable ? ((0, jsx_runtime_1.jsxs)("div", { className: Select_module_scss_1.default.commandInputContainer, children: [(0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "search" }), (0, jsx_runtime_1.jsx)(cmdk_1.CommandInput, { className: (0, classnames_1.default)(Select_module_scss_1.default.commandInput), placeholder: "Search..." })] })) : (
177
- // https://github.com/pacocoursey/cmdk/issues/322#issuecomment-2444703817
178
- (0, jsx_runtime_1.jsx)("button", { autoFocus: true, "aria-hidden": "true", className: Select_module_scss_1.default.srOnly })), (0, jsx_runtime_1.jsxs)(cmdk_1.CommandList, { className: Select_module_scss_1.default.commandList, children: [Array.from(options).map(({ value, label, enabled, keywords }) => ((0, jsx_runtime_1.jsx)(exports.ComboboxOption, { value: value, label: label, enabled: enabled, keywords: keywords }, value))), (0, jsx_runtime_1.jsx)(cmdk_1.CommandEmpty, { children: emptyListNode })] })] }) }) })] }) })] })) : ((0, jsx_runtime_1.jsx)(SimpleSelect, { ref: ref, value: value, options: options, onValueChange: toggleOption, id: id, style: style, onFocus: onFocus, onBlur: onBlur, enabled: enabled, validationStatus: validationStatus, triggerRef: setReferenceElement, autoFocus: autoFocus, placeholder: placeholder, height: dropdownHeight, children: children || emptyListNode })) }) }));
171
+ } })), (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "chevrondown" })] })] }) }), open && ((0, jsx_runtime_1.jsx)(react_popover_1.PopoverContent, { style: { width, height: dropdownHeight }, className: Select_module_scss_1.default.selectContent, children: (0, jsx_runtime_1.jsxs)(cmdk_1.Command, { className: Select_module_scss_1.default.command, shouldFilter: searchable, filter: (value, search, keywords) => {
172
+ const extendedValue = value + " " + keywords.join(" ");
173
+ if (extendedValue.toLowerCase().includes(search.toLowerCase()))
174
+ return 1;
175
+ return 0;
176
+ }, children: [searchable ? ((0, jsx_runtime_1.jsxs)("div", { className: Select_module_scss_1.default.commandInputContainer, children: [(0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "search" }), (0, jsx_runtime_1.jsx)(cmdk_1.CommandInput, { className: (0, classnames_1.default)(Select_module_scss_1.default.commandInput), placeholder: "Search..." })] })) : (
177
+ // https://github.com/pacocoursey/cmdk/issues/322#issuecomment-2444703817
178
+ (0, jsx_runtime_1.jsx)("button", { autoFocus: true, "aria-hidden": "true", className: Select_module_scss_1.default.srOnly })), (0, jsx_runtime_1.jsxs)(cmdk_1.CommandList, { className: Select_module_scss_1.default.commandList, children: [Array.from(options).map(({ value, label, enabled, keywords }) => ((0, jsx_runtime_1.jsx)(exports.ComboboxOption, { value: value, label: label, enabled: enabled, keywords: keywords }, value))), (0, jsx_runtime_1.jsx)(cmdk_1.CommandEmpty, { children: emptyListNode })] })] }) }))] }) })] })) : ((0, jsx_runtime_1.jsx)(SimpleSelect, { ref: ref, value: value, options: options, onValueChange: toggleOption, id: id, style: style, onFocus: onFocus, onBlur: onBlur, enabled: enabled, validationStatus: validationStatus, triggerRef: setReferenceElement, autoFocus: autoFocus, placeholder: placeholder, height: dropdownHeight, children: children || emptyListNode })) }) }));
179
179
  });
180
180
  exports.ComboboxOption = (0, react_1.forwardRef)(function Combobox(option, forwardedRef) {
181
181
  const id = (0, react_1.useId)();
@@ -5,11 +5,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.StickyBox = StickyBox;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
8
9
  const classnames_1 = __importDefault(require("classnames"));
10
+ const react_sticky_el_1 = require("react-sticky-el");
9
11
  const StickyBox_module_scss_1 = __importDefault(require("./StickyBox.module.scss"));
12
+ const hooks_1 = require("../../components-core/utils/hooks");
10
13
  function StickyBox({ children, uid, layout, to = "top" }) {
11
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(StickyBox_module_scss_1.default.wrapper, {
12
- [StickyBox_module_scss_1.default.top]: to === "top",
13
- [StickyBox_module_scss_1.default.bottom]: to === "bottom",
14
- }), style: layout, children: children }));
14
+ const sentinelRef = (0, react_1.useRef)(null);
15
+ const [wrapper, setWrapper] = (0, react_1.useState)(null);
16
+ const [stuck, setStuck] = (0, react_1.useState)(false);
17
+ const scrollParent = (0, hooks_1.useScrollParent)(sentinelRef.current);
18
+ const realBackground = (0, hooks_1.useRealBackground)(scrollParent);
19
+ (0, react_1.useEffect)(() => {
20
+ if (wrapper) {
21
+ document.documentElement.style.setProperty("--xmlui-scroll-margin-top", wrapper.clientHeight + "px");
22
+ // scrollParent.setAttribute("data-xmlui-scroll-padding", true);
23
+ }
24
+ }, [scrollParent, wrapper]);
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 : "" })] }));
15
34
  }
@@ -17,18 +17,18 @@ 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: {
@@ -67,6 +67,6 @@ exports.SwitchMd = (0, ComponentDefs_1.createMetadata)({
67
67
  },
68
68
  },
69
69
  });
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 }));
70
+ exports.switchComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, 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, 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
72
  });
@@ -80,16 +80,12 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
80
80
  },
81
81
  themeVars: (0, themeVars_1.parseScssVar)(Table_module_scss_1.default.themeVars),
82
82
  defaultThemeVars: {
83
- [`padding-horizontal-heading-${COMP}`]: "$space-2",
84
- [`padding-vertical-heading-${COMP}`]: "$space-2",
85
- [`padding-heading-${COMP}`]: `$padding-vertical-heading-${COMP} $padding-horizontal-heading-${COMP}`,
83
+ [`padding-heading-${COMP}`]: `$space-2`,
86
84
  [`padding-horizontal-cell-${COMP}`]: "$space-2",
87
85
  [`padding-horizontal-cell-first-${COMP}`]: "$space-5",
88
86
  [`padding-horizontal-cell-last-${COMP}`]: "$space-5",
89
87
  [`padding-vertical-cell-${COMP}`]: "$space-2",
90
- [`thickness-border-cell-${COMP}`]: "1px",
91
- [`style-border-cell-${COMP}`]: "solid",
92
- [`border-cell-${COMP}`]: `$thickness-border-cell-${COMP} $style-border-cell-${COMP} $color-border-cell-${COMP}`,
88
+ [`border-cell-${COMP}`]: "1px solid $color-border",
93
89
  [`thickness-outline-heading-${COMP}--focus`]: "$thickness-outline--focus",
94
90
  [`style-outline-heading-${COMP}--focus`]: "$style-outline--focus",
95
91
  [`offset-outline-heading-${COMP}--focus`]: "$offset-outline--focus",
@@ -99,7 +95,6 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
99
95
  [`font-size-row-${COMP}`]: "$font-size-small",
100
96
  [`color-bg-${COMP}`]: "$color-bg",
101
97
  [`color-bg-row-${COMP}`]: "inherit",
102
- [`color-border-cell-${COMP}`]: "$color-border",
103
98
  [`color-bg-selected-${COMP}--hover`]: `$color-bg-row-${COMP}--hover`,
104
99
  [`color-bg-pagination-${COMP}`]: `$color-bg-${COMP}`,
105
100
  [`color-outline-heading-${COMP}--focus`]: "$color-outline--focus",
@@ -444,7 +444,7 @@ exports.Table = (0, react_1.forwardRef)(({ data = constants_1.EMPTY_ARRAY, colum
444
444
  return ((0, jsx_runtime_1.jsx)("td", { className: Table_module_scss_1.default.cell, style: Object.assign({
445
445
  // width: size,
446
446
  width: size }, getCommonPinningStyles(cell.column)), children: cellRenderer
447
- ? cellRenderer(cell.row.original)
447
+ ? cellRenderer(cell.row.original, rowIndex, i, cell === null || cell === void 0 ? void 0 : cell.getValue())
448
448
  : (0, react_table_1.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, `${cell.id}-${i}`));
449
449
  }) }, `${row.id}-${rowIndex}`));
450
450
  }), 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 &&
@@ -12,10 +12,12 @@ const react_compose_refs_1 = require("@radix-ui/react-compose-refs");
12
12
  const classnames_1 = __importDefault(require("classnames"));
13
13
  const TableOfContents_module_scss_1 = __importDefault(require("./TableOfContents.module.scss"));
14
14
  const TableOfContentsContext_1 = require("../../components-core/TableOfContentsContext");
15
+ const react_router_dom_1 = require("react-router-dom");
15
16
  exports.TableOfContents = (0, react_1.forwardRef)(function TableOfContents({ style, smoothScrolling, maxHeadingLevel = 6 }, forwardedRef) {
16
17
  const tocRef = (0, react_1.useRef)(null);
17
18
  const { headings, setObserveIntersection, activeAnchorId, setActiveAnchorId } = (0, TableOfContentsContext_1.useTableOfContents)();
18
19
  const ref = forwardedRef ? (0, react_compose_refs_1.composeRefs)(tocRef, forwardedRef) : tocRef;
20
+ const navigate = (0, react_router_dom_1.useNavigate)();
19
21
  (0, react_1.useEffect)(() => {
20
22
  setObserveIntersection(true);
21
23
  }, [setObserveIntersection]);
@@ -44,16 +46,23 @@ exports.TableOfContents = (0, react_1.forwardRef)(function TableOfContents({ sty
44
46
  [TableOfContents_module_scss_1.default.head_4]: value.level === 4,
45
47
  [TableOfContents_module_scss_1.default.head_5]: value.level === 5,
46
48
  [TableOfContents_module_scss_1.default.head_6]: value.level === 6,
47
- }), to: `#${value.id}`, onClick: () => {
48
- if (smoothScrolling) {
49
- (0, scroll_into_view_if_needed_1.default)(value.anchor, {
50
- block: "start",
51
- inline: "start",
52
- behavior: "smooth",
53
- scrollMode: "if-needed",
54
- });
55
- }
49
+ }), to: `#${value.id}`, onClick: (event) => {
50
+ event.preventDefault();
51
+ value.anchor.scrollIntoView({
52
+ block: "start",
53
+ inline: "start",
54
+ behavior: smoothScrolling ? "smooth" : "auto",
55
+ });
56
56
  setActiveAnchorId(value.id);
57
+ requestAnimationFrame(() => {
58
+ navigate({
59
+ hash: `#${value.id}`,
60
+ }, {
61
+ state: {
62
+ preventHashScroll: true
63
+ },
64
+ });
65
+ });
57
66
  }, id: value.id, children: value.text }) }, value.id));
58
67
  }
59
68
  return null;
@@ -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.Toggle = void 0;
39
+ exports.Toggle = 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 = require("react");
@@ -46,7 +46,14 @@ const Toggle_module_scss_1 = __importDefault(require("./Toggle.module.scss"));
46
46
  const constants_1 = require("../../components-core/constants");
47
47
  const misc_1 = require("../../components-core/utils/misc");
48
48
  const ItemWithLabel_1 = require("../FormItem/ItemWithLabel");
49
- exports.Toggle = (0, react_3.forwardRef)(function Toggle({ id, initialValue = false, value = false, enabled = true, style, readOnly, validationStatus = "none", updateState = constants_1.noop, onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, variant = "checkbox", indeterminate = false, className, label, labelPosition = "start", labelWidth, labelBreak, required, registerComponentApi, inputRenderer, }, forwardedRef) {
49
+ exports.defaultProps = {
50
+ initialValue: false,
51
+ value: false,
52
+ enabled: true,
53
+ validationStatus: "none",
54
+ indeterminate: false,
55
+ };
56
+ exports.Toggle = (0, react_3.forwardRef)(function Toggle({ id, initialValue = exports.defaultProps.initialValue, value = exports.defaultProps.value, enabled = exports.defaultProps.enabled, style, readOnly, validationStatus = exports.defaultProps.validationStatus, updateState = constants_1.noop, onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, variant = "checkbox", indeterminate = exports.defaultProps.indeterminate, className, label, labelPosition = "end", labelWidth, labelBreak, required, registerComponentApi, inputRenderer, }, forwardedRef) {
50
57
  const generatedId = (0, react_1.useId)();
51
58
  const inputId = id || generatedId;
52
59
  const innerRef = react_3.default.useRef(null);
@@ -98,6 +105,7 @@ exports.Toggle = (0, react_3.forwardRef)(function Toggle({ id, initialValue = fa
98
105
  [Toggle_module_scss_1.default.warning]: validationStatus === "warning",
99
106
  [Toggle_module_scss_1.default.valid]: validationStatus === "valid",
100
107
  }) })), [
108
+ inputId,
101
109
  className,
102
110
  enabled,
103
111
  handleOnBlur,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VariantPropsKeys = exports.variantOptionsMd = exports.TextVariantElement = exports.orderingValues = exports.scrollAnchoringNames = exports.scrollAnchoringValues = exports.validationStatusMd = exports.validationStatusNames = exports.validationStatusValues = exports.triggerPositionNames = exports.labelPositionMd = exports.labelPositionNames = exports.labelPositionValues = exports.placementMd = exports.placementNames = exports.statusColorMd = exports.statusColorNames = exports.iconPositionMd = exports.iconPositionNames = exports.iconPositionValues = exports.orientationOptionMd = exports.orientationOptionNames = exports.alignmentOptionMd = exports.alignmentOptionNames = exports.alignmentOptionValues = exports.buttonAriaNames = exports.buttonVariantMd = exports.buttonVariantNames = exports.defaultButtonType = exports.buttonTypesMd = exports.buttonTypeNames = exports.buttonTypeValues = exports.buttonThemeMd = exports.buttonThemeNames = exports.sizeNames = exports.sizeMd = exports.viewportSizeNames = exports.viewportSizeMd = exports.LinkTargetMd = exports.LinkTargetNames = void 0;
3
+ exports.VariantPropsKeys = exports.variantOptionsMd = exports.TextVariantElement = exports.orderingValues = exports.scrollAnchoringNames = exports.scrollAnchoringValues = exports.validationStatusMd = exports.validationStatusNames = exports.validationStatusValues = exports.triggerPositionNames = exports.labelPositionMd = exports.labelPositionNames = exports.labelPositionValues = exports.placementMd = exports.placementNames = exports.statusColorMd = exports.statusColorNames = exports.iconPositionMd = exports.iconPositionNames = exports.iconPositionValues = exports.orientationOptionMd = exports.orientationOptionNames = exports.alignmentOptionMd = exports.alignmentOptionNames = exports.alignmentOptionValues = exports.buttonAriaNames = exports.buttonVariantMd = exports.buttonVariantNames = exports.buttonTypesMd = exports.buttonTypeNames = exports.buttonTypeValues = exports.buttonThemeMd = exports.buttonThemeNames = exports.sizeNames = exports.sizeMd = exports.viewportSizeNames = exports.viewportSizeMd = exports.LinkTargetMd = exports.LinkTargetNames = void 0;
4
4
  exports.LinkTargetNames = ["_self", "_blank", "_parent", "_top", "_unfencedTop"];
5
5
  exports.LinkTargetMd = [
6
6
  {
@@ -71,7 +71,6 @@ exports.buttonTypesMd = [
71
71
  description: "Resets all the controls to their initial values. Using it is ill advised for UX reasons.",
72
72
  },
73
73
  ];
74
- exports.defaultButtonType = "button";
75
74
  // --- Available button variants
76
75
  const buttonVariantValues = ["solid", "outlined", "ghost"];
77
76
  exports.buttonVariantNames = [...buttonVariantValues];
@@ -62,22 +62,24 @@ function dDidChange(comp) {
62
62
  description: `This event is triggered when value of ${comp} has changed.`,
63
63
  };
64
64
  }
65
- function dIndeterminate() {
65
+ function dIndeterminate(defaultValue) {
66
66
  return {
67
67
  description: `The \`true\` value of this property signals that the component is in an ` +
68
68
  `_intedeterminate state_.`,
69
+ defaultValue,
69
70
  };
70
71
  }
71
72
  function dLabel() {
72
73
  return {
73
74
  description: `This property sets the label of the component.`,
75
+ valueType: "string",
74
76
  };
75
77
  }
76
78
  function dLabelPosition(def) {
77
79
  return {
78
80
  description: `Places the label at the given position of the component.`,
79
81
  availableValues: abstractions_1.labelPositionMd,
80
- defaultValue: def,
82
+ defaultValue: def !== null && def !== void 0 ? def : "top",
81
83
  };
82
84
  }
83
85
  function dLabelWidth(comp) {
@@ -100,22 +102,24 @@ function dAutoFocus() {
100
102
  defaultValue: false,
101
103
  };
102
104
  }
103
- function dInitialValue(def) {
105
+ function dInitialValue(value) {
104
106
  return {
105
107
  description: `This property sets the component's initial value.`,
106
- defaultValue: def,
108
+ defaultValue: value,
107
109
  };
108
110
  }
109
- function dReadonly() {
111
+ function dReadonly(readOnly) {
110
112
  return {
111
113
  description: `Set this property to \`true\` to disallow changing the component value.`,
114
+ valueType: "boolean",
115
+ defaultValue: readOnly !== null && readOnly !== void 0 ? readOnly : false,
112
116
  };
113
117
  }
114
- function dEnabled() {
118
+ function dEnabled(isEnabled) {
115
119
  return {
116
120
  description: `This boolean property value indicates whether the component responds to user events (\`true\`) or not (\`false\`).`,
117
121
  valueType: "boolean",
118
- defaultValue: true,
122
+ defaultValue: isEnabled !== null && isEnabled !== void 0 ? isEnabled : true,
119
123
  };
120
124
  }
121
125
  function dMulti() {
@@ -125,10 +129,11 @@ function dMulti() {
125
129
  defaultValue: false,
126
130
  };
127
131
  }
128
- function dValidationStatus() {
132
+ function dValidationStatus(value) {
129
133
  return {
130
134
  description: `This property allows you to set the validation status of the input component.`,
131
135
  availableValues: abstractions_1.validationStatusMd,
136
+ defaultValue: value !== null && value !== void 0 ? value : "none",
132
137
  };
133
138
  }
134
139
  function dValueApi() {
@@ -152,41 +157,48 @@ function dComponent(description) {
152
157
  function dPlaceholder() {
153
158
  return {
154
159
  description: `A placeholder text that is visible in the input field when its empty.`,
160
+ valueType: "string",
155
161
  };
156
162
  }
157
163
  function dMaxLength() {
158
164
  return {
159
165
  description: `This property sets the maximum length of the input it accepts.`,
166
+ valueType: "number",
160
167
  };
161
168
  }
162
169
  function dRequired() {
163
170
  return {
164
171
  description: `Set this property to \`true\` to indicate it must have a value ` +
165
172
  `before submitting the containing form.`,
173
+ valueType: "boolean",
166
174
  };
167
175
  }
168
176
  function dStartText() {
169
177
  return {
170
178
  description: `This property sets a text to appear at the start (left side when the ` +
171
179
  `left-to-right direction is set) of the input.`,
180
+ valueType: "string",
172
181
  };
173
182
  }
174
183
  function dStartIcon() {
175
184
  return {
176
185
  description: `This property sets an icon to appear at the start (left side when the ` +
177
186
  `left-to-right direction is set) of the input.`,
187
+ valueType: "string",
178
188
  };
179
189
  }
180
190
  function dEndText() {
181
191
  return {
182
192
  description: `This property sets a text to appear on the end (right side when the ` +
183
193
  `left-to-right direction is set) of the input.`,
194
+ valueType: "string",
184
195
  };
185
196
  }
186
197
  function dEndIcon() {
187
198
  return {
188
199
  description: `This property sets an icon to appear on the end (right side when the ` +
189
200
  `left-to-right direction is set) of the input.`,
201
+ valueType: "string",
190
202
  };
191
203
  }
192
204
  function dExpanded(comp) {
@@ -235,11 +247,12 @@ function dTriggerTemplate(comp) {
235
247
  valueType: "ComponentDef",
236
248
  };
237
249
  }
238
- function dOrientation(defaultValue) {
250
+ function dOrientation(defaultValue, isRequired = false) {
239
251
  return {
240
252
  description: `This property sets the main axis along which the nested components are rendered.`,
241
253
  availableValues: abstractions_1.orientationOptionMd,
242
254
  valueType: "string",
243
255
  defaultValue,
256
+ isRequired,
244
257
  };
245
258
  }