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.
- package/dist/lib/{apiInterceptorWorker-B6XqwxPF.mjs → apiInterceptorWorker-OagsYDXz.mjs} +3 -3
- package/dist/lib/{index-BpQ3DEFQ.mjs → index-BnpxPPve.mjs} +14387 -13003
- package/dist/lib/index.css +1 -1
- package/dist/lib/language-server-web-worker.mjs +1 -1
- package/dist/lib/language-server.mjs +1 -1
- package/dist/lib/{metadata-utils-QekhOD-W.mjs → metadata-utils-4EQ6kQIM.mjs} +7 -7
- package/dist/lib/{server-common-D4BcRpEl.mjs → server-common-C0cF2UTg.mjs} +4542 -4326
- package/dist/lib/{transform-DXcw0gGl.mjs → transform-CgRMkbb0.mjs} +1472 -1440
- package/dist/lib/xmlui-parser.d.ts +84 -62
- package/dist/lib/xmlui-parser.mjs +41 -49
- package/dist/lib/{xmlui-serializer-CAZCkpXP.mjs → xmlui-serializer-EDw51UFN.mjs} +10 -10
- package/dist/lib/xmlui.d.ts +17 -7
- package/dist/lib/xmlui.mjs +19 -18
- package/dist/metadata/apiInterceptorWorker-BOuioN57.mjs +15414 -0
- package/dist/metadata/collectedComponentMetadata-DbptBvJk.mjs +41019 -0
- package/dist/metadata/core-D3puiNN6.mjs +5771 -0
- package/dist/metadata/style.css +1 -1
- package/dist/metadata/wasm-DQxwEHae.mjs +7 -0
- package/dist/metadata/xmlui-metadata.mjs +3 -18371
- package/dist/metadata/xmlui-metadata.umd.js +547 -10
- package/dist/scripts/package.json +5 -7
- package/dist/scripts/src/components/APICall/APICall.js +13 -12
- package/dist/scripts/src/components/APICall/APICallNative.js +5 -0
- package/dist/scripts/src/components/Accordion/Accordion.js +4 -2
- package/dist/scripts/src/components/Accordion/AccordionItem.js +2 -2
- package/dist/scripts/src/components/Accordion/AccordionItemNative.js +6 -2
- package/dist/scripts/src/components/App/App.js +25 -10
- package/dist/scripts/src/components/App/AppNative.js +9 -1
- package/dist/scripts/src/components/AppHeader/AppHeader.js +2 -2
- package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +5 -2
- package/dist/scripts/src/components/AppState/AppState.js +2 -2
- package/dist/scripts/src/components/AppState/AppStateNative.js +5 -1
- package/dist/scripts/src/components/AutoComplete/AutoComplete.js +8 -8
- package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +16 -2
- package/dist/scripts/src/components/Avatar/Avatar.js +4 -2
- package/dist/scripts/src/components/Backdrop/Backdrop.js +2 -2
- package/dist/scripts/src/components/Badge/Badge.js +7 -5
- package/dist/scripts/src/components/Bookmark/Bookmark.js +5 -4
- package/dist/scripts/src/components/Card/Card.js +6 -4
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +2 -1
- package/dist/scripts/src/components/Charts/BarChart/BarChart.js +76 -0
- package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +108 -0
- package/dist/scripts/src/components/Charts/DonutChart/DonutChart.js +59 -0
- package/dist/scripts/src/components/Charts/LabelList/LabelList.js +38 -0
- package/dist/scripts/src/components/Charts/LabelList/LabelListNative.js +24 -0
- package/dist/scripts/src/components/Charts/Legend/Legend.js +30 -0
- package/dist/scripts/src/components/Charts/Legend/LegendNative.js +64 -0
- package/dist/scripts/src/components/Charts/LineChart/LineChart.js +53 -0
- package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +103 -0
- package/dist/scripts/src/components/Charts/PieChart/PieChart.js +58 -0
- package/dist/scripts/src/components/Charts/PieChart/PieChartNative.js +127 -0
- package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.js +27 -0
- package/dist/scripts/src/components/Charts/utils/ChartProvider.js +65 -0
- package/dist/scripts/src/components/Charts/utils/abstractions.js +26 -0
- package/dist/scripts/src/components/CodeBlock/CodeBlock.js +4 -4
- package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +5 -1
- package/dist/scripts/src/components/Column/Column.js +15 -9
- package/dist/scripts/src/components/Column/ColumnNative.js +5 -0
- package/dist/scripts/src/components/ComponentProvider.js +12 -6
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +4 -3
- package/dist/scripts/src/components/DatePicker/DatePicker.js +5 -3
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +1 -1
- package/dist/scripts/src/components/EmojiSelector/EmojiSelectorNative.js +7 -2
- package/dist/scripts/src/components/FileInput/FileInput.js +8 -9
- package/dist/scripts/src/components/FileInput/FileInputNative.js +14 -2
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +2 -2
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +9 -2
- package/dist/scripts/src/components/Footer/Footer.js +1 -0
- package/dist/scripts/src/components/Footer/FooterNative.js +4 -1
- package/dist/scripts/src/components/Form/Form.js +9 -5
- package/dist/scripts/src/components/Form/FormNative.js +2 -1
- package/dist/scripts/src/components/FormItem/FormItem.js +25 -15
- package/dist/scripts/src/components/FormItem/FormItemNative.js +1 -0
- package/dist/scripts/src/components/FormItem/Validations.js +49 -33
- package/dist/scripts/src/components/Heading/Heading.js +5 -4
- package/dist/scripts/src/components/Heading/HeadingNative.js +1 -0
- package/dist/scripts/src/components/Icon/Icon.js +7 -5
- package/dist/scripts/src/components/Image/Image.js +19 -9
- package/dist/scripts/src/components/Image/ImageNative.js +7 -2
- package/dist/scripts/src/components/Items/Items.js +2 -0
- package/dist/scripts/src/components/Items/ItemsNative.js +5 -1
- package/dist/scripts/src/components/Link/Link.js +3 -4
- package/dist/scripts/src/components/Link/LinkNative.js +6 -2
- package/dist/scripts/src/components/List/List.js +12 -11
- package/dist/scripts/src/components/List/ListNative.js +10 -2
- package/dist/scripts/src/components/Logo/Logo.js +7 -0
- package/dist/scripts/src/components/Logo/LogoNative.js +6 -2
- package/dist/scripts/src/components/Markdown/Markdown.js +5 -3
- package/dist/scripts/src/components/Markdown/MarkdownNative.js +24 -76
- package/dist/scripts/src/components/Markdown/utils.js +23 -1
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +2 -2
- package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +7 -2
- package/dist/scripts/src/components/NavGroup/NavGroup.js +2 -1
- package/dist/scripts/src/components/NavLink/NavLink.js +5 -7
- package/dist/scripts/src/components/NavLink/NavLinkNative.js +7 -2
- package/dist/scripts/src/components/NavPanel/NavPanel.js +7 -0
- package/dist/scripts/src/components/NavPanel/NavPanelNative.js +6 -3
- package/dist/scripts/src/components/NestedApp/NestedApp.js +16 -4
- package/dist/scripts/src/components/NestedApp/NestedAppNative.js +37 -34
- package/dist/scripts/src/components/NestedApp/defaultProps.js +10 -0
- package/dist/scripts/src/components/NoResult/NoResult.js +6 -2
- package/dist/scripts/src/components/NoResult/NoResultNative.js +8 -3
- package/dist/scripts/src/components/NumberBox/NumberBox.js +8 -6
- package/dist/scripts/src/components/NumberBox/NumberBox2.js +6 -6
- package/dist/scripts/src/components/NumberBox/NumberBox2Native.js +15 -2
- package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +16 -2
- package/dist/scripts/src/components/Option/Option.js +10 -15
- package/dist/scripts/src/components/Option/OptionNative.js +18 -0
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTilteNative.js +6 -2
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +4 -1
- package/dist/scripts/src/components/Pages/Pages.js +7 -3
- package/dist/scripts/src/components/Pages/PagesNative.js +5 -0
- package/dist/scripts/src/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/scripts/src/components/ProgressBar/ProgressBarNative.js +5 -2
- package/dist/scripts/src/components/Queue/Queue.js +11 -6
- package/dist/scripts/src/components/Queue/QueueNative.js +7 -1
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +5 -5
- package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +9 -2
- package/dist/scripts/src/components/RadioGroup/RadioItem.js +8 -2
- package/dist/scripts/src/components/RadioGroup/RadioItemNative.js +6 -2
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +4 -1
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +4 -0
- package/dist/scripts/src/components/Redirect/Redirect.js +8 -2
- package/dist/scripts/src/components/Select/Select.js +21 -12
- package/dist/scripts/src/components/Select/SelectNative.js +15 -2
- package/dist/scripts/src/components/SelectionStore/SelectionStore.js +6 -3
- package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +6 -2
- package/dist/scripts/src/components/Slider/Slider.js +28 -9
- package/dist/scripts/src/components/Slider/SliderNative.js +14 -3
- package/dist/scripts/src/components/Spinner/Spinner.js +2 -2
- package/dist/scripts/src/components/Spinner/SpinnerNative.js +6 -2
- package/dist/scripts/src/components/Splitter/Splitter.js +6 -6
- package/dist/scripts/src/components/Splitter/SplitterNative.js +10 -2
- package/dist/scripts/src/components/Stack/Stack.js +4 -4
- package/dist/scripts/src/components/Stack/StackNative.js +8 -2
- package/dist/scripts/src/components/StickyBox/StickyBox.js +1 -1
- package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +7 -1
- package/dist/scripts/src/components/Table/Table.js +15 -14
- package/dist/scripts/src/components/Table/TableNative.js +25 -9
- package/dist/scripts/src/components/TableOfContents/TableOfContents.js +12 -3
- package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +6 -2
- package/dist/scripts/src/components/Tabs/Tabs.js +2 -2
- package/dist/scripts/src/components/Tabs/TabsNative.js +7 -2
- package/dist/scripts/src/components/Text/Text.js +14 -12
- package/dist/scripts/src/components/Text/TextNative.js +7 -2
- package/dist/scripts/src/components/TextArea/TextArea.js +8 -5
- package/dist/scripts/src/components/TextArea/TextAreaNative.js +19 -2
- package/dist/scripts/src/components/TextBox/TextBox.js +5 -4
- package/dist/scripts/src/components/TextBox/TextBoxNative.js +14 -2
- package/dist/scripts/src/components/Theme/Theme.js +1 -1
- package/dist/scripts/src/components/Theme/ThemeNative.js +10 -14
- package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.js +18 -8
- package/dist/scripts/src/components/TreeDisplay/TreeDisplay.js +1 -1
- package/dist/scripts/src/components/TreeDisplay/TreeDisplayNative.js +2 -1
- package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +3 -57
- package/dist/scripts/src/components/ValidationSummary/ValidationSummaryNative.js +64 -0
- package/dist/scripts/src/components/metadata-helpers.js +11 -8
- package/dist/scripts/src/components-core/InspectorContext.js +0 -4
- package/dist/scripts/src/components-core/interception/ApiInterceptor.js +1 -1
- package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +6 -2
- package/dist/scripts/src/components-core/loader/DataLoader.js +1 -1
- package/dist/scripts/src/components-core/loader/Loader.js +7 -3
- package/dist/scripts/src/components-core/theming/themes/palette.js +5 -4
- package/dist/scripts/src/components-core/theming/themes/root.js +5 -4
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +1 -17
- package/dist/scripts/src/parsers/xmlui-parser/diagnostics.js +92 -48
- package/dist/scripts/src/parsers/xmlui-parser/parser.js +179 -189
- package/dist/standalone/xmlui-standalone.es.d.ts +0 -2580
- package/dist/standalone/xmlui-standalone.umd.js +275 -305
- package/package.json +5 -7
|
@@ -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.RadioGroupOption = exports.RadioGroup = void 0;
|
|
39
|
+
exports.RadioGroupOption = exports.RadioGroup = exports.defaultProps = void 0;
|
|
40
40
|
exports.useRadioGroupValue = useRadioGroupValue;
|
|
41
41
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
@@ -47,10 +47,17 @@ 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
49
|
const OptionTypeProvider_1 = __importDefault(require("../Option/OptionTypeProvider"));
|
|
50
|
+
exports.defaultProps = {
|
|
51
|
+
value: "",
|
|
52
|
+
initialValue: "",
|
|
53
|
+
enabled: true,
|
|
54
|
+
validationStatus: "none",
|
|
55
|
+
required: false,
|
|
56
|
+
};
|
|
50
57
|
const RadioGroupValidationStatusContext = (0, react_1.createContext)({
|
|
51
58
|
status: "none",
|
|
52
59
|
});
|
|
53
|
-
exports.RadioGroup = (0, react_1.forwardRef)(function RadioGroup({ id, value =
|
|
60
|
+
exports.RadioGroup = (0, react_1.forwardRef)(function RadioGroup({ id, value = exports.defaultProps.value, initialValue = exports.defaultProps.initialValue, enabled = exports.defaultProps.enabled, validationStatus = exports.defaultProps.validationStatus, label, labelPosition, labelWidth, labelBreak, required = exports.defaultProps.required, updateState = constants_1.noop, onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, children, registerComponentApi, style, }, forwardedRef) {
|
|
54
61
|
const [focused, setFocused] = react_1.default.useState(false);
|
|
55
62
|
// --- Initialize the related field with the input's initial value
|
|
56
63
|
(0, react_1.useEffect)(() => {
|
|
@@ -10,8 +10,14 @@ exports.RadioItemMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
10
10
|
status: "experimental",
|
|
11
11
|
description: `The \`${COMP}\` component is a radio button that is part of a group of radio buttons.`,
|
|
12
12
|
props: {
|
|
13
|
-
checked:
|
|
14
|
-
|
|
13
|
+
checked: {
|
|
14
|
+
description: "This property specifies whether the radio button is checked.",
|
|
15
|
+
defaultValue: RadioItemNative_1.defaultProps.checked,
|
|
16
|
+
},
|
|
17
|
+
value: {
|
|
18
|
+
description: "This property specifies the value of the radio button.",
|
|
19
|
+
defaultValue: RadioItemNative_1.defaultProps.value,
|
|
20
|
+
},
|
|
15
21
|
},
|
|
16
22
|
});
|
|
17
23
|
exports.radioItemComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.RadioItemMd, ({ node, extractValue }) => {
|
|
@@ -36,13 +36,17 @@ 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.RadioItem = void 0;
|
|
39
|
+
exports.RadioItem = exports.defaultProps = void 0;
|
|
40
40
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
41
|
const react_1 = require("react");
|
|
42
42
|
const RadioGroup_module_scss_1 = __importDefault(require("./RadioGroup.module.scss"));
|
|
43
43
|
const InnerRadioGroup = __importStar(require("@radix-ui/react-radio-group"));
|
|
44
44
|
const classnames_1 = __importDefault(require("classnames"));
|
|
45
|
-
|
|
45
|
+
exports.defaultProps = {
|
|
46
|
+
checked: false,
|
|
47
|
+
value: "",
|
|
48
|
+
};
|
|
49
|
+
const RadioItem = ({ checked = exports.defaultProps.checked, style, value = exports.defaultProps.value }) => {
|
|
46
50
|
const id = (0, react_1.useId)();
|
|
47
51
|
return ((0, jsx_runtime_1.jsx)("div", { className: RadioGroup_module_scss_1.default.radioOptionContainer, style: style, children: (0, jsx_runtime_1.jsx)(InnerRadioGroup.Item, { className: (0, classnames_1.default)(RadioGroup_module_scss_1.default.radioOption), id: id, value: value, checked: checked, children: (0, jsx_runtime_1.jsx)(InnerRadioGroup.Indicator, { className: (0, classnames_1.default)(RadioGroup_module_scss_1.default.indicator) }) }) }, id));
|
|
48
52
|
};
|
|
@@ -10,7 +10,10 @@ exports.RealTimeAdapterMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
10
10
|
status: "experimental",
|
|
11
11
|
description: `\`${COMP}\` is a non-visual component that listens to real-time events through long-polling.`,
|
|
12
12
|
props: {
|
|
13
|
-
url:
|
|
13
|
+
url: {
|
|
14
|
+
description: `This property specifies the URL to use for long-polling.`,
|
|
15
|
+
defaultValue: RealTimeAdapterNative_1.defaultProps.url,
|
|
16
|
+
},
|
|
14
17
|
},
|
|
15
18
|
events: {
|
|
16
19
|
eventArrived: (0, ComponentDefs_1.d)(`This event is raised when data arrives from the backend using long-polling.`),
|
|
@@ -12,11 +12,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.defaultProps = void 0;
|
|
15
16
|
exports.RealTimeAdapter = RealTimeAdapter;
|
|
16
17
|
const react_1 = require("react");
|
|
17
18
|
const RestApiProxy_1 = __importDefault(require("../../components-core/RestApiProxy"));
|
|
18
19
|
const misc_1 = require("../../components-core/utils/misc");
|
|
19
20
|
const AppContext_1 = require("../../components-core/AppContext");
|
|
21
|
+
exports.defaultProps = {
|
|
22
|
+
url: "",
|
|
23
|
+
};
|
|
20
24
|
class PollClient {
|
|
21
25
|
constructor(url, appContext) {
|
|
22
26
|
this.url = url;
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.redirectRenderer = exports.RedirectMd = void 0;
|
|
3
|
+
exports.redirectRenderer = exports.RedirectMd = exports.defaultProps = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("@remix-run/react");
|
|
6
6
|
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
7
7
|
const renderers_1 = require("../../components-core/renderers");
|
|
8
8
|
const component_utils_1 = require("../component-utils");
|
|
9
9
|
const COMP = "Redirect";
|
|
10
|
+
exports.defaultProps = {
|
|
11
|
+
to: "",
|
|
12
|
+
};
|
|
10
13
|
exports.RedirectMd = (0, ComponentDefs_1.createMetadata)({
|
|
11
14
|
description: `\`${COMP}\` is a component that immediately redirects the browser to the URL in its ` +
|
|
12
15
|
`\`to\` property when it gets visible (its \`when\` property gets \`true\`). The ` +
|
|
13
16
|
`redirection works only within the app.`,
|
|
14
17
|
props: {
|
|
15
|
-
to:
|
|
18
|
+
to: {
|
|
19
|
+
description: `This property defines the URL to which this component is about to redirect requests.`,
|
|
20
|
+
defaultValue: exports.defaultProps.to,
|
|
21
|
+
},
|
|
16
22
|
},
|
|
17
23
|
});
|
|
18
24
|
exports.redirectRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.RedirectMd, ({ node, extractValue }) => {
|
|
@@ -18,28 +18,37 @@ exports.SelectMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
18
18
|
description: "Provides a dropdown with a list of options to choose from.",
|
|
19
19
|
status: "experimental",
|
|
20
20
|
props: {
|
|
21
|
-
placeholder: (0, metadata_helpers_1.dPlaceholder)(),
|
|
21
|
+
placeholder: Object.assign(Object.assign({}, (0, metadata_helpers_1.dPlaceholder)()), { defaultValue: SelectNative_1.defaultProps.placeholder }),
|
|
22
22
|
initialValue: (0, metadata_helpers_1.dInitialValue)(),
|
|
23
|
-
autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
|
|
24
|
-
required: (0, metadata_helpers_1.dRequired)(),
|
|
25
|
-
readOnly: (0, metadata_helpers_1.dReadonly)(),
|
|
26
|
-
enabled: (0, metadata_helpers_1.dEnabled)(),
|
|
27
|
-
validationStatus: (0, metadata_helpers_1.dValidationStatus)(),
|
|
23
|
+
autoFocus: Object.assign(Object.assign({}, (0, metadata_helpers_1.dAutoFocus)()), { defaultValue: SelectNative_1.defaultProps.autoFocus }),
|
|
24
|
+
required: Object.assign(Object.assign({}, (0, metadata_helpers_1.dRequired)()), { defaultValue: SelectNative_1.defaultProps.required }),
|
|
25
|
+
readOnly: Object.assign(Object.assign({}, (0, metadata_helpers_1.dReadonly)()), { defaultValue: SelectNative_1.defaultProps.readOnly }),
|
|
26
|
+
enabled: Object.assign(Object.assign({}, (0, metadata_helpers_1.dEnabled)()), { defaultValue: SelectNative_1.defaultProps.enabled }),
|
|
27
|
+
validationStatus: Object.assign(Object.assign({}, (0, metadata_helpers_1.dValidationStatus)()), { defaultValue: SelectNative_1.defaultProps.validationStatus }),
|
|
28
28
|
label: (0, metadata_helpers_1.dLabel)(),
|
|
29
29
|
labelPosition: (0, metadata_helpers_1.dLabelPosition)("top"),
|
|
30
30
|
labelWidth: (0, metadata_helpers_1.dLabelWidth)(COMP),
|
|
31
|
-
labelBreak: (0, metadata_helpers_1.dLabelBreak)(COMP),
|
|
31
|
+
labelBreak: Object.assign(Object.assign({}, (0, metadata_helpers_1.dLabelBreak)(COMP)), { defaultValue: SelectNative_1.defaultProps.labelBreak }),
|
|
32
32
|
optionLabelTemplate: (0, metadata_helpers_1.dComponent)(`This property allows replacing the default template to display an option in the dropdown list.`),
|
|
33
33
|
optionTemplate: (0, metadata_helpers_1.dComponent)(`This property allows replacing the default template to display an option in the dropdown list.`),
|
|
34
34
|
valueTemplate: (0, metadata_helpers_1.dComponent)(`This property allows replacing the default template to display a selected value when ` +
|
|
35
35
|
`multiple selections (\`multiSelect\` is \`true\`) are enabled.`),
|
|
36
|
-
dropdownHeight: (0, ComponentDefs_1.d)("This property sets the height of the dropdown list."),
|
|
36
|
+
dropdownHeight: (0, ComponentDefs_1.d)("This property sets the height of the dropdown list. If not set, the height is determined automatically."),
|
|
37
37
|
emptyListTemplate: (0, ComponentDefs_1.d)(`This optional property provides the ability to customize what is displayed when the ` +
|
|
38
38
|
`list of options is empty.`),
|
|
39
|
-
multiSelect: (0, metadata_helpers_1.dMulti)(),
|
|
40
|
-
searchable:
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
multiSelect: Object.assign(Object.assign({}, (0, metadata_helpers_1.dMulti)()), { defaultValue: SelectNative_1.defaultProps.multiSelect }),
|
|
40
|
+
searchable: {
|
|
41
|
+
description: `This property enables the search functionality in the dropdown list.`,
|
|
42
|
+
defaultValue: SelectNative_1.defaultProps.searchable,
|
|
43
|
+
},
|
|
44
|
+
inProgress: {
|
|
45
|
+
description: `This property indicates whether the component is in progress. It can be used to show a loading message.`,
|
|
46
|
+
defaultValue: SelectNative_1.defaultProps.inProgress,
|
|
47
|
+
},
|
|
48
|
+
inProgressNotificationMessage: {
|
|
49
|
+
description: `This property indicates the message to display when the component is in progress.`,
|
|
50
|
+
defaultValue: SelectNative_1.defaultProps.inProgressNotificationMessage,
|
|
51
|
+
},
|
|
43
52
|
},
|
|
44
53
|
events: {
|
|
45
54
|
gotFocus: (0, metadata_helpers_1.dGotFocus)(COMP),
|
|
@@ -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.ComboboxOption = exports.Select = void 0;
|
|
39
|
+
exports.ComboboxOption = exports.Select = exports.defaultProps = void 0;
|
|
40
40
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
41
|
const react_1 = __importStar(require("react"));
|
|
42
42
|
const react_compose_refs_1 = require("@radix-ui/react-compose-refs");
|
|
@@ -55,6 +55,19 @@ const OptionTypeProvider_1 = __importDefault(require("../Option/OptionTypeProvid
|
|
|
55
55
|
const OptionContext_1 = require("./OptionContext");
|
|
56
56
|
const ItemWithLabel_1 = require("../FormItem/ItemWithLabel");
|
|
57
57
|
const HiddenOption_1 = require("./HiddenOption");
|
|
58
|
+
exports.defaultProps = {
|
|
59
|
+
enabled: true,
|
|
60
|
+
placeholder: "",
|
|
61
|
+
autoFocus: false,
|
|
62
|
+
searchable: false,
|
|
63
|
+
multiSelect: false,
|
|
64
|
+
required: false,
|
|
65
|
+
inProgress: false,
|
|
66
|
+
inProgressNotificationMessage: "",
|
|
67
|
+
readOnly: false,
|
|
68
|
+
validationStatus: "none",
|
|
69
|
+
labelBreak: false,
|
|
70
|
+
};
|
|
58
71
|
const SimpleSelect = (0, react_1.forwardRef)(function SimpleSelect(props, forwardedRef) {
|
|
59
72
|
var _a;
|
|
60
73
|
const { root } = (0, ThemeContext_1.useTheme)();
|
|
@@ -77,7 +90,7 @@ const SimpleSelect = (0, react_1.forwardRef)(function SimpleSelect(props, forwar
|
|
|
77
90
|
[Select_module_scss_1.default.valid]: validationStatus === "valid",
|
|
78
91
|
}), ref: ref, autoFocus: autoFocus, children: [(0, jsx_runtime_1.jsx)("div", { className: Select_module_scss_1.default.selectValue, children: readOnly ? (((_a = Array.from(options).find((o) => `${o.value}` === stringValue)) === null || _a === void 0 ? void 0 : _a.label) || ((0, jsx_runtime_1.jsx)("span", { "aria-placeholder": placeholder, children: placeholder }))) : ((0, jsx_runtime_1.jsx)(react_select_1.Value, { "aria-placeholder": placeholder, 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.SelectViewport, { className: Select_module_scss_1.default.selectViewport, role: "listbox", 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" }) })] }) })] }));
|
|
79
92
|
});
|
|
80
|
-
exports.Select = (0, react_1.forwardRef)(function Select({ id, initialValue, value, enabled =
|
|
93
|
+
exports.Select = (0, react_1.forwardRef)(function Select({ id, initialValue, value, enabled = exports.defaultProps.enabled, placeholder = exports.defaultProps.placeholder, updateState = constants_1.noop, validationStatus = exports.defaultProps.validationStatus, onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, registerComponentApi, emptyListTemplate, optionLabelRenderer, optionRenderer, valueRenderer, style, dropdownHeight, children, autoFocus = exports.defaultProps.autoFocus, searchable = exports.defaultProps.searchable, multiSelect = exports.defaultProps.multiSelect, label, labelPosition, labelWidth, labelBreak = exports.defaultProps.labelBreak, required = exports.defaultProps.required, inProgress = exports.defaultProps.inProgress, inProgressNotificationMessage = exports.defaultProps.inProgressNotificationMessage, readOnly = false, }, ref) {
|
|
81
94
|
var _a;
|
|
82
95
|
const [referenceElement, setReferenceElement] = (0, react_1.useState)(null);
|
|
83
96
|
const [open, setOpen] = (0, react_1.useState)(false);
|
|
@@ -11,9 +11,12 @@ exports.SelectionStoreMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
11
11
|
description: `The \`${COMP}\` is a non-visual component that may wrap components (items) and manage ` +
|
|
12
12
|
`their selection state to accommodate the usage of other actions.`,
|
|
13
13
|
props: {
|
|
14
|
-
idKey:
|
|
15
|
-
`
|
|
16
|
-
|
|
14
|
+
idKey: {
|
|
15
|
+
description: `The selected items in the selection store needs to have a unique ID to use as an ` +
|
|
16
|
+
`unambiguous key for that particular item. This property uniquely identifies the ` +
|
|
17
|
+
`selected object item via a given property. By default, the key attribute is \`"id"\`.`,
|
|
18
|
+
defaultValue: SelectionStoreNative_1.defaultProps.idKey,
|
|
19
|
+
},
|
|
17
20
|
},
|
|
18
21
|
});
|
|
19
22
|
exports.selectionStoreComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.SelectionStoreMd, (rendererContext) => {
|
|
@@ -33,13 +33,17 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.SelectionStore = exports.StandaloneSelectionStore = void 0;
|
|
36
|
+
exports.SelectionStore = exports.StandaloneSelectionStore = exports.defaultProps = void 0;
|
|
37
37
|
exports.useSelectionContext = useSelectionContext;
|
|
38
38
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
40
|
const lodash_es_1 = require("lodash-es");
|
|
41
41
|
const misc_1 = require("../../components-core/utils/misc");
|
|
42
42
|
const constants_1 = require("../../components-core/constants");
|
|
43
|
+
exports.defaultProps = {
|
|
44
|
+
idKey: "id",
|
|
45
|
+
selectedItems: constants_1.EMPTY_ARRAY,
|
|
46
|
+
};
|
|
43
47
|
const EMPTY_SELECTION_STATE = {
|
|
44
48
|
value: constants_1.EMPTY_ARRAY,
|
|
45
49
|
};
|
|
@@ -48,7 +52,7 @@ const StandaloneSelectionStore = ({ children }) => {
|
|
|
48
52
|
return ((0, jsx_runtime_1.jsx)(exports.SelectionStore, { updateState: setSelection, selectedItems: selection.value, children: children }));
|
|
49
53
|
};
|
|
50
54
|
exports.StandaloneSelectionStore = StandaloneSelectionStore;
|
|
51
|
-
const SelectionStore = ({ updateState = lodash_es_1.noop, idKey =
|
|
55
|
+
const SelectionStore = ({ updateState = lodash_es_1.noop, idKey = exports.defaultProps.idKey, children, selectedItems = exports.defaultProps.selectedItems, registerComponentApi = lodash_es_1.noop, }) => {
|
|
52
56
|
const [items, setItems] = (0, react_1.useState)(selectedItems);
|
|
53
57
|
const valueInitializedRef = (0, react_1.useRef)(false);
|
|
54
58
|
const refreshSelection = (0, misc_1.useEvent)((allItems = constants_1.EMPTY_ARRAY) => {
|
|
@@ -22,19 +22,38 @@ exports.SliderMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
22
22
|
labelPosition: (0, metadata_helpers_1.dLabelPosition)("top"),
|
|
23
23
|
labelWidth: (0, metadata_helpers_1.dLabelWidth)(COMP),
|
|
24
24
|
labelBreak: (0, metadata_helpers_1.dLabelBreak)(COMP),
|
|
25
|
-
minValue:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
minValue: {
|
|
26
|
+
description: `This property specifies the minimum value of the allowed input range.`,
|
|
27
|
+
valueType: "number",
|
|
28
|
+
defaultValue: SliderNative_1.defaultProps.min,
|
|
29
|
+
},
|
|
30
|
+
maxValue: {
|
|
31
|
+
description: `This property specifies the maximum value of the allowed input range.`,
|
|
32
|
+
valueType: "number",
|
|
33
|
+
defaultValue: SliderNative_1.defaultProps.max,
|
|
34
|
+
},
|
|
35
|
+
step: {
|
|
36
|
+
description: `This property defines the increment value for the slider, determining the allowed intervals between selectable values.`,
|
|
37
|
+
defaultValue: SliderNative_1.defaultProps.step,
|
|
38
|
+
},
|
|
39
|
+
minStepsBetweenThumbs: (0, ComponentDefs_1.d)(`This property sets the minimum number of steps required between multiple thumbs on the slider, ensuring they maintain a specified distance.`, undefined, "number", SliderNative_1.defaultProps.minStepsBetweenThumbs),
|
|
29
40
|
enabled: (0, metadata_helpers_1.dEnabled)(),
|
|
30
41
|
autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
|
|
31
42
|
required: (0, metadata_helpers_1.dRequired)(),
|
|
32
43
|
readOnly: (0, metadata_helpers_1.dReadonly)(),
|
|
33
|
-
validationStatus: (0, metadata_helpers_1.dValidationStatus)(),
|
|
34
|
-
rangeStyle: (0, ComponentDefs_1.d)(`This property allows you to apply custom styles to the range element of the slider.`),
|
|
35
|
-
thumbStyle: (0, ComponentDefs_1.d)(`This property allows you to apply custom styles to the thumb elements of the slider.`),
|
|
36
|
-
showValues:
|
|
37
|
-
|
|
44
|
+
validationStatus: Object.assign(Object.assign({}, (0, metadata_helpers_1.dValidationStatus)()), { defaultValue: SliderNative_1.defaultProps.validationStatus }),
|
|
45
|
+
rangeStyle: (0, ComponentDefs_1.d)(`This optional property allows you to apply custom styles to the range element of the slider.`),
|
|
46
|
+
thumbStyle: (0, ComponentDefs_1.d)(`This optional property allows you to apply custom styles to the thumb elements of the slider.`),
|
|
47
|
+
showValues: {
|
|
48
|
+
description: `This property controls whether the slider shows the current values of the thumbs.`,
|
|
49
|
+
valueType: "boolean",
|
|
50
|
+
defaultValue: SliderNative_1.defaultProps.showValues,
|
|
51
|
+
},
|
|
52
|
+
valueFormat: {
|
|
53
|
+
description: `This property allows you to customize how the values are displayed.`,
|
|
54
|
+
valueType: "any",
|
|
55
|
+
defaultValue: "(value) => value.toString()",
|
|
56
|
+
},
|
|
38
57
|
},
|
|
39
58
|
events: {
|
|
40
59
|
didChange: (0, metadata_helpers_1.dDidChange)(COMP),
|
|
@@ -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.Slider = void 0;
|
|
39
|
+
exports.Slider = exports.defaultProps = void 0;
|
|
40
40
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
41
|
const react_1 = __importStar(require("react"));
|
|
42
42
|
const react_2 = require("react");
|
|
@@ -46,6 +46,17 @@ const constants_1 = require("../../components-core/constants");
|
|
|
46
46
|
const misc_1 = require("../../components-core/utils/misc");
|
|
47
47
|
const ItemWithLabel_1 = require("../FormItem/ItemWithLabel");
|
|
48
48
|
const classnames_1 = __importDefault(require("classnames"));
|
|
49
|
+
exports.defaultProps = {
|
|
50
|
+
step: 1,
|
|
51
|
+
min: 0,
|
|
52
|
+
max: 10,
|
|
53
|
+
enabled: true,
|
|
54
|
+
validationStatus: "none",
|
|
55
|
+
tabIndex: -1,
|
|
56
|
+
showValues: true,
|
|
57
|
+
valueFormat: (value) => value.toString(),
|
|
58
|
+
minStepsBetweenThumbs: 1,
|
|
59
|
+
};
|
|
49
60
|
// Helper function to ensure value is properly formatted
|
|
50
61
|
const formatValue = (val, defaultVal = 0) => {
|
|
51
62
|
if (val === undefined) {
|
|
@@ -59,7 +70,7 @@ const formatValue = (val, defaultVal = 0) => {
|
|
|
59
70
|
}
|
|
60
71
|
return [defaultVal];
|
|
61
72
|
};
|
|
62
|
-
exports.Slider = (0, react_2.forwardRef)(({ style, step =
|
|
73
|
+
exports.Slider = (0, react_2.forwardRef)(({ style, step = exports.defaultProps.step, min = exports.defaultProps.min, max = exports.defaultProps.max, inverted, updateState, onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, registerComponentApi, enabled = exports.defaultProps.enabled, value, autoFocus, readOnly, tabIndex = exports.defaultProps.tabIndex, label, labelPosition, labelWidth, labelBreak, required, validationStatus = exports.defaultProps.validationStatus, initialValue, minStepsBetweenThumbs = exports.defaultProps.minStepsBetweenThumbs, rangeStyle, thumbStyle, showValues = exports.defaultProps.showValues, valueFormat = exports.defaultProps.valueFormat, }, forwardedRef) => {
|
|
63
74
|
const inputRef = (0, react_1.useRef)(null);
|
|
64
75
|
// Initialize localValue properly
|
|
65
76
|
const [localValue, setLocalValue] = react_1.default.useState([]);
|
|
@@ -145,7 +156,7 @@ exports.Slider = (0, react_2.forwardRef)(({ style, step = 1, min = 0, max = 10,
|
|
|
145
156
|
const valuesText = displayValue.map(v => valueFormat(v)).join(', ');
|
|
146
157
|
// Create a custom label that includes the current values
|
|
147
158
|
const displayLabel = label ? (showValues ? `${label} ${valuesText}` : label) : (showValues ? valuesText : '');
|
|
148
|
-
return ((0, jsx_runtime_1.jsx)(ItemWithLabel_1.ItemWithLabel, { labelPosition: labelPosition, label: displayLabel, labelWidth: labelWidth, labelBreak: labelBreak, required: required, enabled: enabled, onFocus: onFocus, onBlur: onBlur, style: style, ref: forwardedRef, children: (0, jsx_runtime_1.jsx)("div", { className: Slider_module_scss_1.default.sliderContainer, children: (0, jsx_runtime_1.jsxs)(react_slider_1.Root, { minStepsBetweenThumbs: minStepsBetweenThumbs
|
|
159
|
+
return ((0, jsx_runtime_1.jsx)(ItemWithLabel_1.ItemWithLabel, { labelPosition: labelPosition, label: displayLabel, labelWidth: labelWidth, labelBreak: labelBreak, required: required, enabled: enabled, onFocus: onFocus, onBlur: onBlur, style: style, ref: forwardedRef, children: (0, jsx_runtime_1.jsx)("div", { className: Slider_module_scss_1.default.sliderContainer, children: (0, jsx_runtime_1.jsxs)(react_slider_1.Root, { minStepsBetweenThumbs: minStepsBetweenThumbs, ref: inputRef, tabIndex: tabIndex, "aria-readonly": readOnly, className: (0, classnames_1.default)(Slider_module_scss_1.default.sliderRoot, {
|
|
149
160
|
[Slider_module_scss_1.default.disabled]: !enabled,
|
|
150
161
|
[Slider_module_scss_1.default.readOnly]: readOnly
|
|
151
162
|
}), style: style, max: max, min: min, inverted: inverted, step: step, disabled: !enabled, onFocus: handleOnFocus, onBlur: handleOnBlur, onValueChange: onInputChange, "aria-required": required, value: displayValue, autoFocus: autoFocus, children: [(0, jsx_runtime_1.jsx)(react_slider_1.Track, { className: (0, classnames_1.default)(Slider_module_scss_1.default.sliderTrack, {
|
|
@@ -18,12 +18,12 @@ exports.SpinnerMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
18
18
|
delay: {
|
|
19
19
|
description: `The delay in milliseconds before the spinner is displayed.`,
|
|
20
20
|
valueType: "number",
|
|
21
|
-
defaultValue:
|
|
21
|
+
defaultValue: SpinnerNative_1.defaultProps.delay,
|
|
22
22
|
},
|
|
23
23
|
fullScreen: {
|
|
24
24
|
description: `If set to \`true\`, the component will be rendered in a full screen container.`,
|
|
25
25
|
valueType: "boolean",
|
|
26
|
-
defaultValue:
|
|
26
|
+
defaultValue: SpinnerNative_1.defaultProps.fullScreen,
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
themeVars: (0, themeVars_1.parseScssVar)(Spinner_module_scss_1.default.themeVars),
|
|
@@ -3,12 +3,16 @@ 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.Spinner = void 0;
|
|
6
|
+
exports.Spinner = exports.defaultProps = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const Spinner_module_scss_1 = __importDefault(require("./Spinner.module.scss"));
|
|
10
|
+
exports.defaultProps = {
|
|
11
|
+
delay: 400,
|
|
12
|
+
fullScreen: false
|
|
13
|
+
};
|
|
10
14
|
// source https://loading.io/css/
|
|
11
|
-
exports.Spinner = (0, react_1.forwardRef)(function Spinner({ delay =
|
|
15
|
+
exports.Spinner = (0, react_1.forwardRef)(function Spinner({ delay = exports.defaultProps.delay, fullScreen = exports.defaultProps.fullScreen, style }, forwardedRef) {
|
|
12
16
|
const [pastDelay, setPastDelay] = (0, react_1.useState)(delay === 0);
|
|
13
17
|
(0, react_1.useEffect)(() => {
|
|
14
18
|
const timeout = setTimeout(() => {
|
|
@@ -22,32 +22,32 @@ const baseSplitterMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
22
22
|
description: `This optional booelan property indicates whether the \`${COMP}\` sections are layed out as ` +
|
|
23
23
|
`primary and secondary (\`false\`) or secondary and primary (\`true\`) from left to right.`,
|
|
24
24
|
valueType: "boolean",
|
|
25
|
-
defaultValue:
|
|
25
|
+
defaultValue: SplitterNative_1.defaultProps.swapped,
|
|
26
26
|
},
|
|
27
27
|
splitterTemplate: (0, metadata_helpers_1.dComponent)(`The divider can be customized using XMLUI components via this property.`),
|
|
28
28
|
initialPrimarySize: {
|
|
29
29
|
description: `This optional number property sets the initial size of the primary section. The unit of ` +
|
|
30
30
|
`the size value is in pixels or percentages.`,
|
|
31
31
|
valueType: "string",
|
|
32
|
-
defaultValue:
|
|
32
|
+
defaultValue: SplitterNative_1.defaultProps.initialPrimarySize,
|
|
33
33
|
},
|
|
34
34
|
minPrimarySize: {
|
|
35
35
|
description: `This property sets the minimum size the primary section can have. The unit of the size ` +
|
|
36
36
|
`value is in pixels or percentages.`,
|
|
37
37
|
valueType: "string",
|
|
38
|
-
defaultValue:
|
|
38
|
+
defaultValue: SplitterNative_1.defaultProps.minPrimarySize,
|
|
39
39
|
},
|
|
40
40
|
maxPrimarySize: {
|
|
41
41
|
description: `This property sets the maximum size the primary section can have. The unit of the size ` +
|
|
42
42
|
`value is in pixels or percentages.`,
|
|
43
43
|
valueType: "string",
|
|
44
|
-
defaultValue:
|
|
44
|
+
defaultValue: SplitterNative_1.defaultProps.maxPrimarySize,
|
|
45
45
|
},
|
|
46
46
|
floating: {
|
|
47
47
|
description: `Toggles whether the resizer is visible (\`false\`) or not (\`true\`) when not hovered ` +
|
|
48
48
|
`or dragged. The default value is \`false\`, meaning the resizer is visible all the time.`,
|
|
49
49
|
valueType: "boolean",
|
|
50
|
-
defaultValue:
|
|
50
|
+
defaultValue: SplitterNative_1.defaultProps.floating,
|
|
51
51
|
},
|
|
52
52
|
orientation: {
|
|
53
53
|
description: `Sets whether the \`Splitter\` divides the container horizontally and lays out the ` +
|
|
@@ -55,7 +55,7 @@ const baseSplitterMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
55
55
|
`next to each other (\`horizontal\`).`,
|
|
56
56
|
valueType: "string",
|
|
57
57
|
availableValues: ["horizontal", "vertical"],
|
|
58
|
-
defaultValue:
|
|
58
|
+
defaultValue: SplitterNative_1.defaultProps.orientation,
|
|
59
59
|
},
|
|
60
60
|
},
|
|
61
61
|
events: {
|
|
@@ -36,14 +36,22 @@ 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.Splitter = void 0;
|
|
39
|
+
exports.Splitter = exports.defaultProps = 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"));
|
|
43
43
|
const Splitter_module_scss_1 = __importDefault(require("./Splitter.module.scss"));
|
|
44
44
|
const constants_1 = require("../../components-core/constants");
|
|
45
45
|
const utils_1 = require("../Splitter/utils");
|
|
46
|
-
|
|
46
|
+
exports.defaultProps = {
|
|
47
|
+
initialPrimarySize: "50%",
|
|
48
|
+
minPrimarySize: "0%",
|
|
49
|
+
maxPrimarySize: "100%",
|
|
50
|
+
orientation: "vertical",
|
|
51
|
+
swapped: false,
|
|
52
|
+
floating: false,
|
|
53
|
+
};
|
|
54
|
+
const Splitter = ({ initialPrimarySize = exports.defaultProps.initialPrimarySize, minPrimarySize = exports.defaultProps.minPrimarySize, maxPrimarySize = exports.defaultProps.maxPrimarySize, orientation = exports.defaultProps.orientation, children, style, swapped = exports.defaultProps.swapped, floating = exports.defaultProps.floating, splitterTemplate, resize = constants_1.noop, }) => {
|
|
47
55
|
var _a;
|
|
48
56
|
const [size, setSize] = (0, react_1.useState)(0);
|
|
49
57
|
const [splitter, setSplitter] = (0, react_1.useState)(null);
|
|
@@ -38,7 +38,7 @@ const stackMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
38
38
|
reverse: {
|
|
39
39
|
description: "Optional boolean property to reverse the order of child elements.",
|
|
40
40
|
valueType: "boolean",
|
|
41
|
-
defaultValue:
|
|
41
|
+
defaultValue: StackNative_1.defaultProps.reverse,
|
|
42
42
|
},
|
|
43
43
|
wrapContent: {
|
|
44
44
|
description: "Optional boolean which wraps the content if set to true and the available " +
|
|
@@ -51,12 +51,12 @@ const stackMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
51
51
|
"the Stack lays out its children in a row or a column).",
|
|
52
52
|
availableValues: ["horizontal", "vertical"],
|
|
53
53
|
valueType: "string",
|
|
54
|
-
defaultValue: StackNative_1.
|
|
54
|
+
defaultValue: StackNative_1.defaultProps.orientation,
|
|
55
55
|
},
|
|
56
56
|
horizontalAlignment: HORIZONTAL_ALIGNMENT,
|
|
57
57
|
verticalAlignment: VERTICAL_ALIGNMENT,
|
|
58
|
-
hoverContainer: (0, metadata_helpers_1.dInternal)("Reserved for future use"),
|
|
59
|
-
visibleOnHover: (0, metadata_helpers_1.dInternal)("Reserved for future use"),
|
|
58
|
+
hoverContainer: Object.assign(Object.assign({}, (0, metadata_helpers_1.dInternal)("Reserved for future use")), { defaultValue: StackNative_1.defaultProps.hoverContainer }),
|
|
59
|
+
visibleOnHover: Object.assign(Object.assign({}, (0, metadata_helpers_1.dInternal)("Reserved for future use")), { defaultValue: StackNative_1.defaultProps.visibleOnHover }),
|
|
60
60
|
},
|
|
61
61
|
events: {
|
|
62
62
|
click: (0, metadata_helpers_1.dClick)(COMP),
|
|
@@ -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.Stack = exports.DEFAULT_ORIENTATION = void 0;
|
|
17
|
+
exports.Stack = exports.defaultProps = exports.DEFAULT_ORIENTATION = void 0;
|
|
18
18
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
19
|
const react_1 = require("react");
|
|
20
20
|
const classnames_1 = __importDefault(require("classnames"));
|
|
@@ -22,10 +22,16 @@ const Stack_module_scss_1 = __importDefault(require("./Stack.module.scss"));
|
|
|
22
22
|
const component_hooks_1 = require("../../components-core/component-hooks");
|
|
23
23
|
const hooks_1 = require("../../components-core/utils/hooks");
|
|
24
24
|
exports.DEFAULT_ORIENTATION = "vertical";
|
|
25
|
+
exports.defaultProps = {
|
|
26
|
+
orientation: exports.DEFAULT_ORIENTATION,
|
|
27
|
+
reverse: false,
|
|
28
|
+
hoverContainer: false,
|
|
29
|
+
visibleOnHover: false,
|
|
30
|
+
};
|
|
25
31
|
// =====================================================================================================================
|
|
26
32
|
// Stack React component
|
|
27
33
|
exports.Stack = (0, react_1.forwardRef)(function Stack(_a, ref) {
|
|
28
|
-
var { uid, children, orientation = exports.
|
|
34
|
+
var { uid, children, orientation = exports.defaultProps.orientation, horizontalAlignment, verticalAlignment, style, reverse = exports.defaultProps.reverse, hoverContainer = exports.defaultProps.hoverContainer, visibleOnHover = exports.defaultProps.visibleOnHover, onClick, onMount } = _a, rest = __rest(_a, ["uid", "children", "orientation", "horizontalAlignment", "verticalAlignment", "style", "reverse", "hoverContainer", "visibleOnHover", "onClick", "onMount"]);
|
|
29
35
|
(0, hooks_1.useOnMount)(onMount);
|
|
30
36
|
const { horizontal, vertical } = (0, component_hooks_1.useContentAlignment)(orientation, horizontalAlignment, verticalAlignment);
|
|
31
37
|
return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, rest, { onClick: onClick, ref: ref, style: style, className: (0, classnames_1.default)(Stack_module_scss_1.default.base, {
|
|
@@ -21,7 +21,7 @@ exports.StickyBoxMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
21
21
|
"the \`top\` or \`bottom\`.",
|
|
22
22
|
availableValues: ["top", "bottom"],
|
|
23
23
|
valueType: "string",
|
|
24
|
-
defaultValue:
|
|
24
|
+
defaultValue: StickyBoxNative_1.defaultProps.to,
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
27
|
themeVars: (0, themeVars_1.parseScssVar)(StickyBox_module_scss_1.default.themeVars),
|
|
@@ -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.StickyBox = StickyBox;
|
|
7
8
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
9
|
const react_1 = require("react");
|
|
@@ -10,7 +11,12 @@ const classnames_1 = __importDefault(require("classnames"));
|
|
|
10
11
|
const react_sticky_el_1 = require("react-sticky-el");
|
|
11
12
|
const StickyBox_module_scss_1 = __importDefault(require("./StickyBox.module.scss"));
|
|
12
13
|
const hooks_1 = require("../../components-core/utils/hooks");
|
|
13
|
-
|
|
14
|
+
// =====================================================================================================================
|
|
15
|
+
// React StickyBox component implementation
|
|
16
|
+
exports.defaultProps = {
|
|
17
|
+
to: "top",
|
|
18
|
+
};
|
|
19
|
+
function StickyBox({ children, uid, layout, to = exports.defaultProps.to }) {
|
|
14
20
|
const sentinelRef = (0, react_1.useRef)(null);
|
|
15
21
|
const [wrapper, setWrapper] = (0, react_1.useState)(null);
|
|
16
22
|
const [stuck, setStuck] = (0, react_1.useState)(false);
|