xmlui 0.7.26 → 0.7.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{apiInterceptorWorker-BlvgbCSf.mjs → apiInterceptorWorker-FalV8U3I.mjs} +1 -1
- package/dist/{index-CWLnzVw7.mjs → index-CTUFRo8v.mjs} +9969 -9448
- package/dist/scripts/src/components/APICall/APICall.js +69 -32
- package/dist/scripts/src/components/Accordion/Accordion.js +27 -7
- package/dist/scripts/src/components/Accordion/AccordionNative.js +9 -3
- package/dist/scripts/src/components/Alert/Alert.js +25 -6
- package/dist/scripts/src/components/App/App.js +48 -13
- package/dist/scripts/src/components/AppHeader/AppHeader.js +13 -6
- package/dist/scripts/src/components/AppState/AppState.js +14 -8
- package/dist/scripts/src/components/Avatar/Avatar.js +14 -3
- package/dist/scripts/src/components/Avatar/AvatarNative.js +5 -2
- package/dist/scripts/src/components/Backdrop/Backdrop.js +10 -2
- package/dist/scripts/src/components/Backdrop/BackdropNative.js +6 -2
- package/dist/scripts/src/components/Badge/Badge.js +17 -9
- package/dist/scripts/src/components/Badge/BadgeNative.js +6 -4
- package/dist/scripts/src/components/Bookmark/Bookmark.js +24 -11
- package/dist/scripts/src/components/Bookmark/BookmarkNative.js +8 -4
- package/dist/scripts/src/components/Button/Button.js +1 -7
- package/dist/scripts/src/components/ButtonGroup/ButtonGroup.js +22 -8
- package/dist/scripts/src/components/Card/Card.js +31 -10
- package/dist/scripts/src/components/Card/CardNative.js +6 -3
- package/dist/scripts/src/components/Carousel/Carousel.js +61 -12
- package/dist/scripts/src/components/Carousel/CarouselNative.js +13 -2
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +10 -3
- package/dist/scripts/src/components/ChangeListener/ChangeListenerNative.js +5 -1
- package/dist/scripts/src/components/Checkbox/Checkbox.js +8 -7
- package/dist/scripts/src/components/ColorPicker/ColorPicker.js +3 -3
- package/dist/scripts/src/components/ColorPicker/ColorPickerNative.js +8 -2
- package/dist/scripts/src/components/Column/Column.js +39 -17
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +11 -3
- package/dist/scripts/src/components/ContentSeparator/ContentSeparatorNative.js +5 -2
- package/dist/scripts/src/components/DatePicker/DatePicker.js +42 -10
- package/dist/scripts/src/components/DatePicker/DatePickerNative.js +67 -26
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +52 -12
- package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +14 -3
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +13 -4
- package/dist/scripts/src/components/FlowLayout/FlowLayout.js +18 -8
- package/dist/scripts/src/components/FlowLayout/FlowLayoutNative.js +5 -1
- package/dist/scripts/src/components/Form/Form.js +53 -17
- package/dist/scripts/src/components/Form/FormNative.js +9 -1
- package/dist/scripts/src/components/FormItem/FormItem.js +11 -5
- package/dist/scripts/src/components/FormItem/FormItemNative.js +6 -1
- package/dist/scripts/src/components/Heading/Heading.js +23 -4
- package/dist/scripts/src/components/Heading/HeadingNative.js +9 -4
- package/dist/scripts/src/components/Icon/Icon.js +6 -2
- package/dist/scripts/src/components/Icon/IconNative.js +2 -2
- package/dist/scripts/src/components/Image/Image.js +5 -1
- package/dist/scripts/src/components/Items/Items.js +4 -2
- package/dist/scripts/src/components/Items/ItemsNative.js +1 -3
- package/dist/scripts/src/components/Link/Link.js +13 -4
- package/dist/scripts/src/components/List/List.js +22 -5
- package/dist/scripts/src/components/Markdown/Markdown.js +8 -4
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +12 -6
- package/dist/scripts/src/components/NavLink/NavLink.js +28 -10
- package/dist/scripts/src/components/NoResult/NoResult.js +6 -2
- package/dist/scripts/src/components/NumberBox/NumberBox.js +22 -6
- package/dist/scripts/src/components/ProgressBar/ProgressBar.js +5 -1
- package/dist/scripts/src/components/Spinner/Spinner.js +10 -2
- package/dist/scripts/src/components/Splitter/Splitter.js +38 -13
- package/dist/scripts/src/components/Stack/Stack.js +39 -11
- package/dist/scripts/src/components/StickyBox/StickyBox.js +7 -2
- package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +10 -3
- package/dist/scripts/src/components/Switch/Switch.js +6 -7
- package/dist/scripts/src/components/Table/Table.js +35 -18
- package/dist/scripts/src/components/TableOfContents/TableOfContents.js +13 -4
- package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +15 -22
- package/dist/scripts/src/components/Tabs/Tabs.js +8 -3
- package/dist/scripts/src/components/Text/Text.js +20 -8
- package/dist/scripts/src/components/TextArea/TextArea.js +30 -13
- package/dist/scripts/src/components/Theme/Theme.js +6 -2
- package/dist/scripts/src/components/Toggle/Toggle.js +10 -2
- package/dist/scripts/src/components/abstractions.js +14 -3
- package/dist/scripts/src/components/metadata-helpers.js +20 -8
- package/dist/scripts/src/components-core/TableOfContentsContext.js +57 -17
- package/dist/scripts/src/components-core/loader/DataLoader.js +1 -1
- package/dist/scripts/src/components-core/utils/hooks.js +3 -0
- package/dist/scripts/src/components-core/utils/misc.js +3 -0
- package/dist/style.css +1 -1
- package/dist/xmlui-metadata.mjs +10975 -6047
- package/dist/xmlui-metadata.umd.js +17 -17
- package/dist/xmlui-standalone.umd.js +182 -182
- package/dist/xmlui.mjs +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ const IconNative_1 = require("../Icon/IconNative");
|
|
|
15
15
|
const ButtonNative_1 = require("./ButtonNative");
|
|
16
16
|
const COMP = "Button";
|
|
17
17
|
exports.ButtonMd = (0, ComponentDefs_1.createMetadata)({
|
|
18
|
-
description:
|
|
18
|
+
description: "Button is an interactive element that triggers an action when clicked.",
|
|
19
19
|
status: "stable",
|
|
20
20
|
props: {
|
|
21
21
|
autoFocus: {
|
|
@@ -50,13 +50,11 @@ exports.ButtonMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
50
50
|
`specified and an icon is set, the ${COMP} will modify its styling to look like a ` +
|
|
51
51
|
`small icon button. When the ${COMP} has nested children, it will display them and ` +
|
|
52
52
|
`ignore the value of the \`label\` prop.`,
|
|
53
|
-
isRequired: false,
|
|
54
53
|
type: "string",
|
|
55
54
|
},
|
|
56
55
|
type: {
|
|
57
56
|
description: `This optional string describes how the ${COMP} appears in an HTML context. You ` +
|
|
58
57
|
`rarely need to set this property explicitly.`,
|
|
59
|
-
isRequired: false,
|
|
60
58
|
availableValues: abstractions_1.buttonTypesMd,
|
|
61
59
|
valueType: "string",
|
|
62
60
|
defaultValue: ButtonNative_1.propDefaults.type,
|
|
@@ -64,7 +62,6 @@ exports.ButtonMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
64
62
|
enabled: {
|
|
65
63
|
description: `The value of this property indicates whether the button accepts actions (\`true\`) ` +
|
|
66
64
|
`or does not react to them (\`false\`).`,
|
|
67
|
-
isRequired: false,
|
|
68
65
|
type: "boolean",
|
|
69
66
|
defaultValue: true,
|
|
70
67
|
},
|
|
@@ -73,12 +70,10 @@ exports.ButtonMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
73
70
|
description: `This string value denotes an icon name. The framework will render an icon if XMLUI ` +
|
|
74
71
|
`recognizes the icon by its name. If no label is specified and an icon is set, the ${COMP} ` +
|
|
75
72
|
`displays only that icon.`,
|
|
76
|
-
isRequired: false,
|
|
77
73
|
type: "string",
|
|
78
74
|
},
|
|
79
75
|
iconPosition: {
|
|
80
76
|
description: `This optional string determines the location of the icon in the ${COMP}.`,
|
|
81
|
-
isRequired: false,
|
|
82
77
|
availableValues: abstractions_1.iconPositionMd,
|
|
83
78
|
type: "string",
|
|
84
79
|
defaultValue: ButtonNative_1.propDefaults.iconPosition,
|
|
@@ -86,7 +81,6 @@ exports.ButtonMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
86
81
|
contentPosition: {
|
|
87
82
|
description: `This optional value determines how the label and icon (or nested children) should be placed` +
|
|
88
83
|
`inside the ${COMP} component.`,
|
|
89
|
-
isRequired: false,
|
|
90
84
|
availableValues: abstractions_1.alignmentOptionMd,
|
|
91
85
|
type: "string",
|
|
92
86
|
defaultValue: ButtonNative_1.propDefaults.contentPosition,
|
|
@@ -20,15 +20,29 @@ exports.ButtonGroupMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
20
20
|
description: `(**NOT IMPLEMENTED YET**) The \`${COMP}\` component is a container that embeds buttons used ` +
|
|
21
21
|
`together for a particular reason. It provides a view that emphasizes this coherency.`,
|
|
22
22
|
props: {
|
|
23
|
-
themeColor:
|
|
24
|
-
`
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
themeColor: {
|
|
24
|
+
description: `This optional property specifies the default theme color for the buttons in the group. ` +
|
|
25
|
+
`Individual buttons may override this setting with their \`themeColor\` property.`,
|
|
26
|
+
availableValues: abstractions_1.buttonThemeMd,
|
|
27
|
+
valueType: "string",
|
|
28
|
+
defaultValue: "primary",
|
|
29
|
+
},
|
|
30
|
+
variant: {
|
|
31
|
+
description: `This optional property specifies the default variant for the buttons in the group. ` +
|
|
32
|
+
`Individual buttons may override this setting with their \`variant\` property.`,
|
|
33
|
+
availableValues: abstractions_1.buttonVariantMd,
|
|
34
|
+
valueType: "string",
|
|
35
|
+
defaultValue: "solid",
|
|
36
|
+
},
|
|
27
37
|
orientation: (0, metadata_helpers_1.dOrientation)("horizontal"),
|
|
28
|
-
buttonWidth:
|
|
29
|
-
`
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
buttonWidth: {
|
|
39
|
+
description: `When this optional property is set, all buttons within the group will have the ` +
|
|
40
|
+
`specified width. If it is empty, each button's width accommodates its content.`,
|
|
41
|
+
},
|
|
42
|
+
gap: {
|
|
43
|
+
description: `When this optional property is set, adjacent buttons will have the specified gap ` +
|
|
44
|
+
`between them. If this property is not set, the buttons will be merged into one group.`,
|
|
45
|
+
},
|
|
32
46
|
},
|
|
33
47
|
themeVars: (0, themeVars_1.parseScssVar)(ButtonGroup_module_scss_1.default.themeVars),
|
|
34
48
|
defaultThemeVars: {
|
|
@@ -16,16 +16,37 @@ const COMP = "Card";
|
|
|
16
16
|
exports.CardMd = (0, ComponentDefs_1.createMetadata)({
|
|
17
17
|
description: `The \`${COMP}\` component is a container for cohesive elements, often rendered visually as a card.`,
|
|
18
18
|
props: {
|
|
19
|
-
avatarUrl:
|
|
20
|
-
`
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
avatarUrl: {
|
|
20
|
+
description: `Show the avatar (\`true\`) or not (\`false\`). If not specified, the ${COMP} will show the ` +
|
|
21
|
+
`first letters of the [\`title\`](#title).`,
|
|
22
|
+
type: "string",
|
|
23
|
+
},
|
|
24
|
+
showAvatar: {
|
|
25
|
+
description: `Indicates whether the ${COMP} should be displayed`,
|
|
26
|
+
valueType: "boolean",
|
|
27
|
+
defaultValue: CardNative_1.defaultProps.showAvatar,
|
|
28
|
+
},
|
|
29
|
+
title: {
|
|
30
|
+
description: `This prop sets the prestyled title.`,
|
|
31
|
+
valueType: "string",
|
|
32
|
+
},
|
|
33
|
+
subtitle: {
|
|
34
|
+
description: `This prop sets the prestyled subtitle.`,
|
|
35
|
+
valueType: "string",
|
|
36
|
+
},
|
|
37
|
+
linkTo: {
|
|
38
|
+
description: `This property wraps the title in a \`Link\` component that is clickable to navigate.`,
|
|
39
|
+
valueType: "string",
|
|
40
|
+
},
|
|
41
|
+
orientation: {
|
|
42
|
+
description: `An optional property that governs the ${COMP}'s orientation ` +
|
|
43
|
+
`(whether the ${COMP} lays out its children in a row or a column). ` +
|
|
44
|
+
`If the orientation is set to \`horizontal\`, the ${COMP} will display ` +
|
|
45
|
+
`its children in a row, except for its [\`title\`](#title) and [\`subtitle\`](#subtitle).`,
|
|
46
|
+
availableValues: abstractions_1.orientationOptionMd,
|
|
47
|
+
valueType: "string",
|
|
48
|
+
defaultValue: CardNative_1.defaultProps.orientation,
|
|
49
|
+
},
|
|
29
50
|
},
|
|
30
51
|
events: {
|
|
31
52
|
click: (0, metadata_helpers_1.dClick)(COMP),
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Card = exports.
|
|
6
|
+
exports.Card = exports.defaultProps = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const classnames_1 = __importDefault(require("classnames"));
|
|
@@ -13,8 +13,11 @@ const LinkNative_1 = require("../Link/LinkNative");
|
|
|
13
13
|
const HeadingNative_1 = require("../Heading/HeadingNative");
|
|
14
14
|
const StackNative_1 = require("../Stack/StackNative");
|
|
15
15
|
const TextNative_1 = require("../Text/TextNative");
|
|
16
|
-
exports.
|
|
17
|
-
|
|
16
|
+
exports.defaultProps = {
|
|
17
|
+
orientation: "vertical",
|
|
18
|
+
showAvatar: false,
|
|
19
|
+
};
|
|
20
|
+
exports.Card = (0, react_1.forwardRef)(function Card({ children, orientation = exports.defaultProps.orientation, style, title, subtitle, linkTo, avatarUrl, showAvatar = !!avatarUrl || exports.defaultProps.showAvatar, onClick, }, forwardedRef) {
|
|
18
21
|
const titleProps = {
|
|
19
22
|
level: "h2",
|
|
20
23
|
};
|
|
@@ -11,24 +11,73 @@ const renderers_1 = require("../../components-core/renderers");
|
|
|
11
11
|
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
12
|
const metadata_helpers_1 = require("../metadata-helpers");
|
|
13
13
|
const CarouselNative_1 = require("./CarouselNative");
|
|
14
|
+
const abstractions_1 = require("../abstractions");
|
|
14
15
|
const COMP = "Carousel";
|
|
15
16
|
exports.CarouselMd = (0, ComponentDefs_1.createMetadata)({
|
|
16
17
|
status: "in progress",
|
|
17
18
|
description: `This component displays a slideshow by cycling through elements (images, text, or ` +
|
|
18
19
|
`custom slides) like a carousel.`,
|
|
19
20
|
props: {
|
|
20
|
-
orientation:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
orientation: {
|
|
22
|
+
description: "This property indicates the orientation of the carousel. The `horizontal` " +
|
|
23
|
+
"value indicates that the carousel moves horizontally, and the `vertical` " +
|
|
24
|
+
"value indicates that the carousel moves vertically.",
|
|
25
|
+
availableValues: abstractions_1.orientationOptionMd,
|
|
26
|
+
valueType: "string",
|
|
27
|
+
defaultValue: CarouselNative_1.defaultProps.orientation,
|
|
28
|
+
},
|
|
29
|
+
indicators: {
|
|
30
|
+
description: "This property indicates whether the carousel displays the indicators.",
|
|
31
|
+
valueType: "boolean",
|
|
32
|
+
defaultValue: CarouselNative_1.defaultProps.indicators,
|
|
33
|
+
},
|
|
34
|
+
controls: {
|
|
35
|
+
description: "This property indicates whether the carousel displays the controls.",
|
|
36
|
+
valueType: "boolean",
|
|
37
|
+
defaultValue: CarouselNative_1.defaultProps.controls,
|
|
38
|
+
},
|
|
39
|
+
autoplay: {
|
|
40
|
+
description: "This property indicates whether the carousel automatically scrolls.",
|
|
41
|
+
valueType: "boolean",
|
|
42
|
+
defaultValue: CarouselNative_1.defaultProps.autoplay,
|
|
43
|
+
},
|
|
44
|
+
loop: {
|
|
45
|
+
description: "This property indicates whether the carousel loops.",
|
|
46
|
+
valueType: "boolean",
|
|
47
|
+
defaultValue: CarouselNative_1.defaultProps.loop,
|
|
48
|
+
},
|
|
49
|
+
startIndex: {
|
|
50
|
+
description: "This property indicates the index of the first slide to display.",
|
|
51
|
+
valueType: "number",
|
|
52
|
+
defaultValue: CarouselNative_1.defaultProps.startIndex,
|
|
53
|
+
},
|
|
54
|
+
transitionDuration: {
|
|
55
|
+
description: "This property indicates the duration of the transition between slides.",
|
|
56
|
+
valueType: "number",
|
|
57
|
+
defaultValue: CarouselNative_1.defaultProps.transitionDuration,
|
|
58
|
+
},
|
|
59
|
+
autoplayInterval: {
|
|
60
|
+
description: "This property specifies the interval between autoplay transitions.",
|
|
61
|
+
valueType: "number",
|
|
62
|
+
defaultValue: CarouselNative_1.defaultProps.autoplayInterval,
|
|
63
|
+
},
|
|
64
|
+
stopAutoplayOnInteraction: {
|
|
65
|
+
description: "This property indicates whether autoplay stops on interaction.",
|
|
66
|
+
valueType: "boolean",
|
|
67
|
+
defaultValue: CarouselNative_1.defaultProps.stopAutoplayOnInteraction,
|
|
68
|
+
},
|
|
69
|
+
prevIcon: {
|
|
70
|
+
description: "This property specifies the icon to display for the previous control.",
|
|
71
|
+
valueType: "string",
|
|
72
|
+
},
|
|
73
|
+
nextIcon: {
|
|
74
|
+
description: "This property specifies the icon to display for the next control.",
|
|
75
|
+
valueType: "string",
|
|
76
|
+
},
|
|
77
|
+
keyboard: {
|
|
78
|
+
description: "This property indicates whether the carousel responds to keyboard events.",
|
|
79
|
+
valueType: "boolean",
|
|
80
|
+
},
|
|
32
81
|
},
|
|
33
82
|
events: {
|
|
34
83
|
displayDidChange: (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.CarouselComponent = void 0;
|
|
39
|
+
exports.CarouselComponent = exports.defaultProps = void 0;
|
|
40
40
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
41
|
const React = __importStar(require("react"));
|
|
42
42
|
const react_1 = require("react");
|
|
@@ -48,7 +48,18 @@ const Carousel_module_scss_1 = __importDefault(require("./Carousel.module.scss")
|
|
|
48
48
|
const constants_1 = require("../../components-core/constants");
|
|
49
49
|
const CarouselContext_1 = require("./CarouselContext");
|
|
50
50
|
const IconNative_1 = __importDefault(require("../Icon/IconNative"));
|
|
51
|
-
exports.
|
|
51
|
+
exports.defaultProps = {
|
|
52
|
+
orientation: "horizontal",
|
|
53
|
+
indicators: true,
|
|
54
|
+
autoplay: false,
|
|
55
|
+
controls: true,
|
|
56
|
+
loop: false,
|
|
57
|
+
startIndex: 0,
|
|
58
|
+
transitionDuration: 25,
|
|
59
|
+
autoplayInterval: 5000,
|
|
60
|
+
stopAutoplayOnInteraction: true,
|
|
61
|
+
};
|
|
62
|
+
exports.CarouselComponent = (0, react_1.forwardRef)(function CarouselComponent({ orientation = exports.defaultProps.orientation, children, style, indicators = exports.defaultProps.indicators, onDisplayDidChange = constants_1.noop, autoplay = exports.defaultProps.autoplay, controls = exports.defaultProps.controls, loop = exports.defaultProps.loop, startIndex = exports.defaultProps.startIndex, prevIcon, nextIcon, transitionDuration = exports.defaultProps.transitionDuration, autoplayInterval = exports.defaultProps.autoplayInterval, stopAutoplayOnInteraction = exports.defaultProps.stopAutoplayOnInteraction, registerComponentApi, }, forwardedRef) {
|
|
52
63
|
const referenceElement = (0, react_1.useRef)(null);
|
|
53
64
|
const [activeSlide, setActiveSlide] = (0, react_1.useState)(0);
|
|
54
65
|
const [plugins, setPlugins] = (0, react_1.useState)([]);
|
|
@@ -11,9 +11,16 @@ exports.ChangeListenerMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
11
11
|
description: `\`${COMP}\` is a functional component (it renders no UI) to trigger an action when a ` +
|
|
12
12
|
`particular value (component property, state, etc.) changes.`,
|
|
13
13
|
props: {
|
|
14
|
-
listenTo:
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
listenTo: {
|
|
15
|
+
description: `Value to the changes of which this component listens.`,
|
|
16
|
+
valueType: "any",
|
|
17
|
+
},
|
|
18
|
+
throttleWaitInMs: {
|
|
19
|
+
description: `This variable sets a throttling time (in milliseconds) to apply when executing the \`didChange\` ` +
|
|
20
|
+
`event handler. All changes within that throttling time will only fire the \`didChange\` event once.`,
|
|
21
|
+
valueType: "number",
|
|
22
|
+
defaultValue: ChangeListenerNative_1.defaultProps.throttleWaitInMs,
|
|
23
|
+
},
|
|
17
24
|
},
|
|
18
25
|
events: {
|
|
19
26
|
didChange: (0, metadata_helpers_1.dDidChange)(COMP),
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultProps = void 0;
|
|
3
4
|
exports.ChangeListener = ChangeListener;
|
|
4
5
|
const react_1 = require("react");
|
|
5
6
|
const lodash_es_1 = require("lodash-es");
|
|
6
7
|
const hooks_1 = require("../../components-core/utils/hooks");
|
|
7
|
-
|
|
8
|
+
exports.defaultProps = {
|
|
9
|
+
throttleWaitInMs: 0,
|
|
10
|
+
};
|
|
11
|
+
function ChangeListener({ listenTo, onChange, throttleWaitInMs = exports.defaultProps.throttleWaitInMs }) {
|
|
8
12
|
const prevValue = (0, hooks_1.usePrevious)(listenTo);
|
|
9
13
|
const throttledOnChange = (0, react_1.useMemo)(() => {
|
|
10
14
|
if (throttleWaitInMs !== 0 && onChange) {
|
|
@@ -18,23 +18,24 @@ exports.CheckboxMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
18
18
|
description: `The \`${COMP}\` component allows users to make binary choices, typically between checked or ` +
|
|
19
19
|
`unchecked. It consists of a small box that can be toggled on or off by clicking on it.`,
|
|
20
20
|
props: {
|
|
21
|
-
indeterminate: (0, metadata_helpers_1.dIndeterminate)(),
|
|
21
|
+
indeterminate: (0, metadata_helpers_1.dIndeterminate)(Toggle_1.defaultProps.indeterminate),
|
|
22
22
|
label: (0, metadata_helpers_1.dLabel)(),
|
|
23
23
|
labelPosition: (0, metadata_helpers_1.dLabelPosition)("end"),
|
|
24
24
|
labelWidth: (0, metadata_helpers_1.dLabelWidth)(COMP),
|
|
25
25
|
labelBreak: (0, metadata_helpers_1.dLabelBreak)(COMP),
|
|
26
26
|
required: (0, metadata_helpers_1.dRequired)(),
|
|
27
|
-
initialValue: (0, metadata_helpers_1.dInitialValue)(
|
|
27
|
+
initialValue: (0, metadata_helpers_1.dInitialValue)(Toggle_1.defaultProps.initialValue),
|
|
28
28
|
autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
|
|
29
29
|
readOnly: (0, metadata_helpers_1.dReadonly)(),
|
|
30
30
|
enabled: (0, metadata_helpers_1.dEnabled)(),
|
|
31
|
-
validationStatus: (0, metadata_helpers_1.dValidationStatus)(),
|
|
32
|
-
description: (0,
|
|
31
|
+
validationStatus: (0, metadata_helpers_1.dValidationStatus)(Toggle_1.defaultProps.validationStatus),
|
|
32
|
+
description: (0, metadata_helpers_1.dInternal)(`(*** NOT IMPLEMENTED YET ***) This optional property displays an alternate description ` +
|
|
33
33
|
`of the ${COMP} besides its label.`),
|
|
34
|
-
inputTemplate:
|
|
34
|
+
inputTemplate: {
|
|
35
|
+
description: "This property is used to define a custom checkbox input template",
|
|
36
|
+
},
|
|
35
37
|
},
|
|
36
38
|
events: {
|
|
37
|
-
click: (0, metadata_helpers_1.dClick)(COMP),
|
|
38
39
|
gotFocus: (0, metadata_helpers_1.dGotFocus)(COMP),
|
|
39
40
|
lostFocus: (0, metadata_helpers_1.dLostFocus)(COMP),
|
|
40
41
|
didChange: (0, metadata_helpers_1.dDidChange)(COMP),
|
|
@@ -70,5 +71,5 @@ exports.checkboxComponentRenderer = (0, renderers_1.createComponentRenderer)(COM
|
|
|
70
71
|
const inputTemplate = node.children || ((_a = node.props) === null || _a === void 0 ? void 0 : _a.inputTemplate);
|
|
71
72
|
return ((0, jsx_runtime_1.jsx)(Toggle_1.Toggle, { inputRenderer: inputTemplate
|
|
72
73
|
? (contextVars) => ((0, jsx_runtime_1.jsx)(container_helpers_1.MemoizedItem, { contextVars: contextVars, node: inputTemplate, renderChild: renderChild, layoutContext: layoutContext }))
|
|
73
|
-
: undefined, enabled: extractValue.asOptionalBoolean(node.props.enabled), style: layoutCss, initialValue: extractValue.asOptionalBoolean(node.props.initialValue,
|
|
74
|
+
: undefined, 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), indeterminate: extractValue.asOptionalBoolean(node.props.indeterminate), registerComponentApi: registerComponentApi }));
|
|
74
75
|
});
|
|
@@ -13,18 +13,18 @@ const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
|
13
13
|
const ColorPicker_module_scss_1 = __importDefault(require("./ColorPicker.module.scss"));
|
|
14
14
|
const COMP = "ColorPicker";
|
|
15
15
|
exports.ColorPickerMd = (0, ComponentDefs_1.createMetadata)({
|
|
16
|
-
description:
|
|
16
|
+
description: "This component allows the user to select a color with the browser's default color picker control.",
|
|
17
17
|
props: {
|
|
18
18
|
initialValue: (0, metadata_helpers_1.dInitialValue)(),
|
|
19
19
|
label: (0, metadata_helpers_1.dLabel)(),
|
|
20
|
-
labelPosition: (0, metadata_helpers_1.dLabelPosition)(
|
|
20
|
+
labelPosition: (0, metadata_helpers_1.dLabelPosition)(),
|
|
21
21
|
labelWidth: (0, metadata_helpers_1.dLabelWidth)(COMP),
|
|
22
22
|
labelBreak: (0, metadata_helpers_1.dLabelBreak)(COMP),
|
|
23
23
|
enabled: (0, metadata_helpers_1.dEnabled)(),
|
|
24
24
|
autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
|
|
25
25
|
required: (0, metadata_helpers_1.dRequired)(),
|
|
26
26
|
readOnly: (0, metadata_helpers_1.dReadonly)(),
|
|
27
|
-
validationStatus: (0, metadata_helpers_1.dValidationStatus)(),
|
|
27
|
+
validationStatus: (0, metadata_helpers_1.dValidationStatus)(ColorPickerNative_1.defaultProps.validationStatus),
|
|
28
28
|
},
|
|
29
29
|
events: {
|
|
30
30
|
didChange: (0, metadata_helpers_1.dDidChange)(COMP),
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ColorPicker = void 0;
|
|
6
|
+
exports.ColorPicker = exports.defaultProps = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const react_2 = require("react");
|
|
@@ -12,7 +12,13 @@ const constants_1 = require("../../components-core/constants");
|
|
|
12
12
|
const misc_1 = require("../../components-core/utils/misc");
|
|
13
13
|
const ColorPicker_module_scss_1 = __importDefault(require("./ColorPicker.module.scss"));
|
|
14
14
|
const classnames_1 = __importDefault(require("classnames"));
|
|
15
|
-
exports.
|
|
15
|
+
exports.defaultProps = {
|
|
16
|
+
initialValue: "",
|
|
17
|
+
value: "",
|
|
18
|
+
enabled: true,
|
|
19
|
+
validationStatus: "none",
|
|
20
|
+
};
|
|
21
|
+
exports.ColorPicker = (0, react_2.forwardRef)(({ style, updateState, onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, registerComponentApi, enabled = exports.defaultProps.enabled, value = exports.defaultProps.value, autoFocus, tabIndex = -1, label, labelPosition, labelWidth, labelBreak, required, validationStatus = exports.defaultProps.validationStatus, initialValue = exports.defaultProps.initialValue, }, forwardedRef) => {
|
|
16
22
|
const inputRef = (0, react_2.useRef)(null);
|
|
17
23
|
const updateValue = (0, react_2.useCallback)((value) => {
|
|
18
24
|
updateState({ value });
|
|
@@ -12,23 +12,45 @@ exports.ColumnMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
12
12
|
props: {
|
|
13
13
|
bindTo: {
|
|
14
14
|
description: `Indicates what part of the data to lay out in the column.`,
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
header:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
15
|
+
valueType: "string",
|
|
16
|
+
},
|
|
17
|
+
header: {
|
|
18
|
+
description: `Adds a label for a particular column.`,
|
|
19
|
+
valueType: "string",
|
|
20
|
+
},
|
|
21
|
+
width: {
|
|
22
|
+
description: `This property defines the width of the column. You can use a numeric value, a pixel ` +
|
|
23
|
+
`value (such as \`100px\`), or a star size value (such as \`*\`, \`2*\`, etc.). ` +
|
|
24
|
+
`You will get an error if you use any other unit (or value).`,
|
|
25
|
+
valueType: "any",
|
|
26
|
+
},
|
|
27
|
+
minWidth: {
|
|
28
|
+
description: `Indicates the minimum width a particular column can have. Same rules apply as with [width](#width).`,
|
|
29
|
+
valueType: "any",
|
|
30
|
+
},
|
|
31
|
+
maxWidth: {
|
|
32
|
+
description: `Indicates the maximum width a particular column can have. Same rules apply as with [width](#width).`,
|
|
33
|
+
valueType: "any",
|
|
34
|
+
},
|
|
35
|
+
canSort: {
|
|
36
|
+
description: `This property sets whether the user can sort by a column by clicking on its header ` +
|
|
37
|
+
`(\`true\`) or not (\`false\`).`,
|
|
38
|
+
valueType: "boolean",
|
|
39
|
+
},
|
|
40
|
+
pinTo: {
|
|
41
|
+
description: `This property allows the column to be pinned to ` +
|
|
42
|
+
`the \`left\` (left-to-right writing style) or \`right\` (left-to-right writing style) edge ` +
|
|
43
|
+
`of the table. If the writing style is right-to-left, the locations are switched.`,
|
|
44
|
+
availableValues: ["left", "right"],
|
|
45
|
+
valueType: "string",
|
|
46
|
+
},
|
|
47
|
+
canResize: {
|
|
48
|
+
description: `This property indicates whether the user can resize the column. If set to ` +
|
|
49
|
+
`\`true\`, the column can be resized by dragging the column border. If set to ` +
|
|
50
|
+
`\`false\`, the column cannot be resized. Double-clicking the column border ` +
|
|
51
|
+
`resets to the original size.`,
|
|
52
|
+
valueType: "boolean",
|
|
53
|
+
},
|
|
32
54
|
},
|
|
33
55
|
contextVars: {
|
|
34
56
|
$item: {
|
|
@@ -17,9 +17,17 @@ exports.ContentSeparatorMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
17
17
|
`It serves as a visual cue to distinguish between different sections or groups of content, ` +
|
|
18
18
|
`helping to improve readability and organization.`,
|
|
19
19
|
props: {
|
|
20
|
-
size:
|
|
21
|
-
`
|
|
22
|
-
|
|
20
|
+
size: {
|
|
21
|
+
description: `This property defines the component's height (if the \`orientation\` is horizontal) ` +
|
|
22
|
+
`or the width (if the \`orientation\` is vertical).`,
|
|
23
|
+
valueType: "any",
|
|
24
|
+
},
|
|
25
|
+
orientation: {
|
|
26
|
+
description: "Sets the main axis of the component",
|
|
27
|
+
availableValues: abstractions_1.orientationOptionMd,
|
|
28
|
+
defaultValue: ContentSeparatorNative_1.defaultProps.orientation,
|
|
29
|
+
valueType: "string",
|
|
30
|
+
},
|
|
23
31
|
},
|
|
24
32
|
themeVars: (0, themeVars_1.parseScssVar)(ContentSeparator_module_scss_1.default.themeVars),
|
|
25
33
|
defaultThemeVars: {
|
|
@@ -3,11 +3,14 @@ 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.ContentSeparator = void 0;
|
|
6
|
+
exports.ContentSeparator = exports.defaultProps = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const classnames_1 = __importDefault(require("classnames"));
|
|
9
9
|
const ContentSeparator_module_scss_1 = __importDefault(require("./ContentSeparator.module.scss"));
|
|
10
|
-
|
|
10
|
+
exports.defaultProps = {
|
|
11
|
+
orientation: "horizontal",
|
|
12
|
+
};
|
|
13
|
+
const ContentSeparator = ({ orientation = exports.defaultProps.orientation, size, style, }) => {
|
|
11
14
|
return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(ContentSeparator_module_scss_1.default.separator, {
|
|
12
15
|
[ContentSeparator_module_scss_1.default.horizontal]: orientation === "horizontal",
|
|
13
16
|
[ContentSeparator_module_scss_1.default.vertical]: orientation === "vertical",
|
|
@@ -20,16 +20,48 @@ exports.DatePickerMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
20
20
|
initialValue: (0, metadata_helpers_1.dInitialValue)(),
|
|
21
21
|
autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
|
|
22
22
|
readOnly: (0, metadata_helpers_1.dReadonly)(),
|
|
23
|
-
enabled: (0, metadata_helpers_1.dEnabled)(),
|
|
24
|
-
validationStatus: (0, metadata_helpers_1.dValidationStatus)(),
|
|
25
|
-
mode:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
enabled: (0, metadata_helpers_1.dEnabled)(DatePickerNative_1.defaultProps.enabled),
|
|
24
|
+
validationStatus: (0, metadata_helpers_1.dValidationStatus)(DatePickerNative_1.defaultProps.validationStatus),
|
|
25
|
+
mode: {
|
|
26
|
+
description: "The mode of the datepicker (single or range)",
|
|
27
|
+
valueType: "string",
|
|
28
|
+
availableValues: DatePickerNative_1.DatePickerModeValues,
|
|
29
|
+
defaultValue: DatePickerNative_1.defaultProps.mode,
|
|
30
|
+
},
|
|
31
|
+
dateFormat: {
|
|
32
|
+
description: "The format of the date displayed in the input field",
|
|
33
|
+
valueType: "string",
|
|
34
|
+
defaultValue: DatePickerNative_1.defaultProps.dateFormat,
|
|
35
|
+
availableValues: DatePickerNative_1.dateFormats,
|
|
36
|
+
},
|
|
37
|
+
showWeekNumber: {
|
|
38
|
+
description: "Whether to show the week number in the calendar",
|
|
39
|
+
valueType: "boolean",
|
|
40
|
+
defaultValue: DatePickerNative_1.defaultProps.showWeekNumber,
|
|
41
|
+
},
|
|
42
|
+
weekStartsOn: {
|
|
43
|
+
description: "The first day of the week. 0 is Sunday, 1 is Monday, etc.",
|
|
44
|
+
valueType: "number",
|
|
45
|
+
defaultValue: DatePickerNative_1.defaultProps.weekStartsOn,
|
|
46
|
+
availableValues: DatePickerNative_1.weekDaysMd,
|
|
47
|
+
},
|
|
48
|
+
fromDate: {
|
|
49
|
+
description: "The start date of the range of selectable dates",
|
|
50
|
+
valueType: "string",
|
|
51
|
+
},
|
|
52
|
+
toDate: {
|
|
53
|
+
description: "The end date of the range of selectable dates",
|
|
54
|
+
valueType: "string",
|
|
55
|
+
},
|
|
56
|
+
disabledDates: {
|
|
57
|
+
description: "An array of dates that are disabled",
|
|
58
|
+
valueType: "any",
|
|
59
|
+
},
|
|
60
|
+
inline: {
|
|
61
|
+
description: "Whether to display the datepicker inline",
|
|
62
|
+
valueType: "boolean",
|
|
63
|
+
defaultValue: DatePickerNative_1.defaultProps.inline,
|
|
64
|
+
},
|
|
33
65
|
startText: (0, metadata_helpers_1.dStartText)(),
|
|
34
66
|
startIcon: (0, metadata_helpers_1.dStartIcon)(),
|
|
35
67
|
endText: (0, metadata_helpers_1.dEndText)(),
|