xmlui 0.9.83 → 0.9.86

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 (75) hide show
  1. package/dist/lib/{index-aMRikNoc.mjs → index-Bm0sNu3Q.mjs} +17098 -21599
  2. package/dist/lib/index.css +1 -1
  3. package/dist/lib/{initMock-CYGUM37_.mjs → initMock-BJWFwa64.mjs} +1 -1
  4. package/dist/lib/language-server-web-worker.mjs +1 -1
  5. package/dist/lib/language-server.mjs +1 -1
  6. package/dist/lib/{server-common-LUcdzTQs.mjs → server-common-CfdMYx46.mjs} +4453 -4423
  7. package/dist/lib/syntax-monaco.d.ts +64 -0
  8. package/dist/lib/syntax-monaco.mjs +639 -0
  9. package/dist/lib/syntax-textmate.d.ts +2127 -0
  10. package/dist/lib/syntax-textmate.mjs +2491 -0
  11. package/dist/lib/xmlui-parser.d.ts +7 -1
  12. package/dist/lib/xmlui.d.ts +8 -2
  13. package/dist/lib/xmlui.mjs +1 -1
  14. package/dist/metadata/{collectedComponentMetadata-BD1Fa8Cz.mjs → collectedComponentMetadata-BLxDndi5.mjs} +19018 -23504
  15. package/dist/metadata/{initMock-CzVkUblk.mjs → initMock-DRxSMFJz.mjs} +1 -1
  16. package/dist/metadata/style.css +1 -1
  17. package/dist/metadata/xmlui-metadata.mjs +1 -1
  18. package/dist/metadata/xmlui-metadata.umd.js +138 -285
  19. package/dist/scripts/package.json +24 -4
  20. package/dist/scripts/src/components/APICall/APICall.js +4 -0
  21. package/dist/scripts/src/components/Accordion/Accordion.js +14 -4
  22. package/dist/scripts/src/components/AppState/AppState.js +7 -2
  23. package/dist/scripts/src/components/AutoComplete/AutoComplete.js +17 -3
  24. package/dist/scripts/src/components/Bookmark/Bookmark.js +1 -0
  25. package/dist/scripts/src/components/Carousel/Carousel.js +23 -5
  26. package/dist/scripts/src/components/Checkbox/Checkbox.js +15 -5
  27. package/dist/scripts/src/components/ColorPicker/ColorPicker.js +15 -3
  28. package/dist/scripts/src/components/ComponentProvider.js +0 -4
  29. package/dist/scripts/src/components/DatePicker/DatePicker.js +15 -3
  30. package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +8 -1
  31. package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +1 -0
  32. package/dist/scripts/src/components/ExpandableItem/ExpandableItem.js +16 -4
  33. package/dist/scripts/src/components/FileInput/FileInput.js +19 -6
  34. package/dist/scripts/src/components/Form/Form.js +12 -3
  35. package/dist/scripts/src/components/FormItem/FormItem.js +16 -5
  36. package/dist/scripts/src/components/FormItem/ItemWithLabel.js +5 -2
  37. package/dist/scripts/src/components/FormItem/Validations.js +4 -1
  38. package/dist/scripts/src/components/Heading/Heading.js +6 -0
  39. package/dist/scripts/src/components/Heading/HeadingNative.js +11 -1
  40. package/dist/scripts/src/components/HelloWorld/HelloWorld.js +8 -2
  41. package/dist/scripts/src/components/List/List.js +22 -4
  42. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +14 -5
  43. package/dist/scripts/src/components/NumberBox/NumberBox.js +12 -3
  44. package/dist/scripts/src/components/NumberBox/NumberBox2.js +12 -3
  45. package/dist/scripts/src/components/Queue/Queue.js +38 -15
  46. package/dist/scripts/src/components/Select/Select.js +19 -4
  47. package/dist/scripts/src/components/Slider/Slider.js +15 -3
  48. package/dist/scripts/src/components/Switch/Switch.js +13 -3
  49. package/dist/scripts/src/components/Table/Table.js +26 -8
  50. package/dist/scripts/src/components/Tabs/Tabs.js +4 -1
  51. package/dist/scripts/src/components/TextArea/TextArea.js +8 -2
  52. package/dist/scripts/src/components/TextBox/TextBox.js +16 -4
  53. package/dist/scripts/src/components/Toggle/Toggle.js +9 -2
  54. package/dist/scripts/src/components/metadata-helpers.js +3 -3
  55. package/dist/standalone/xmlui-standalone.es.d.ts +9 -3
  56. package/dist/standalone/xmlui-standalone.umd.js +251 -251
  57. package/package.json +24 -4
  58. package/src/syntax/monaco/grammar.monacoLanguage.ts +283 -0
  59. package/src/syntax/monaco/index.ts +4 -0
  60. package/src/syntax/monaco/xmlui-dark.ts +24 -0
  61. package/src/syntax/monaco/xmlui-light.ts +24 -0
  62. package/src/syntax/monaco/xmluiscript.monacoLanguage.ts +337 -0
  63. package/src/syntax/textMate/index.ts +6 -0
  64. package/src/syntax/textMate/xmlui-dark.json +631 -0
  65. package/src/syntax/textMate/xmlui-light.json +565 -0
  66. package/src/syntax/textMate/xmlui.json +564 -0
  67. package/src/syntax/textMate/xmlui.tmLanguage.json +341 -0
  68. package/dist/lib/core-CvFpTAHi.mjs +0 -5775
  69. package/dist/lib/wasm-DQxwEHae.mjs +0 -7
  70. package/dist/metadata/core-D3puiNN6.mjs +0 -5771
  71. package/dist/metadata/wasm-DQxwEHae.mjs +0 -7
  72. package/dist/scripts/src/components-core/XmluiCodeHighlighter.js +0 -109
  73. package/dist/scripts/src/syntax/grammar.tmLanguage.json +0 -341
  74. package/dist/scripts/src/syntax/textMate/xmlui-dark.json +0 -631
  75. package/dist/scripts/src/syntax/textMate/xmlui-light.json +0 -565
@@ -40,11 +40,20 @@ exports.ModalDialogMd = (0, metadata_helpers_1.createMetadata)({
40
40
  `the \`${COMP}\`.`),
41
41
  },
42
42
  apis: {
43
- close: (0, metadata_helpers_1.d)(`This method is used to close the \`${COMP}\`. Invoke it using \`modalId.close()\` ` +
44
- `where \`modalId\` refers to a \`ModalDialog\` component.`),
45
- open: (0, metadata_helpers_1.d)("This method imperatively opens the modal dialog. You can pass an arbitrary number " +
46
- "of parameters to the method. In the \`ModalDialog\` instance, you can access those " +
47
- "with the \`$paramq` and \`$params\` context values."),
43
+ close: {
44
+ description: `This method is used to close the \`${COMP}\`. Invoke it using \`modalId.close()\` ` +
45
+ `where \`modalId\` refers to a \`ModalDialog\` component.`,
46
+ signature: "close(): void",
47
+ },
48
+ open: {
49
+ description: "This method imperatively opens the modal dialog. You can pass an arbitrary number " +
50
+ "of parameters to the method. In the `ModalDialog` instance, you can access those " +
51
+ "with the `\$param` and `\$params` context values.",
52
+ signature: "open(...params: any[]): void",
53
+ parameters: {
54
+ params: "An arbitrary number of parameters that can be used to pass data to the dialog.",
55
+ },
56
+ },
48
57
  },
49
58
  contextVars: {
50
59
  $param: (0, metadata_helpers_1.d)("First parameter passed to the `open()` method"),
@@ -78,9 +78,18 @@ exports.NumberBoxMd = (0, metadata_helpers_1.createMetadata)({
78
78
  didChange: (0, metadata_helpers_1.dDidChange)(COMP),
79
79
  },
80
80
  apis: {
81
- focus: (0, metadata_helpers_1.dFocus)(COMP),
82
- value: (0, metadata_helpers_1.dValue)(),
83
- setValue: (0, metadata_helpers_1.dSetValueApi)(),
81
+ focus: {
82
+ description: `This API focuses the input field of the \`${COMP}\`. You can use it to programmatically focus the field.`,
83
+ signature: "focus(): void",
84
+ },
85
+ value: {
86
+ description: `This API retrieves the current value of the \`${COMP}\`. You can use it to get the value programmatically.`,
87
+ signature: "get value(): number | undefined",
88
+ },
89
+ setValue: {
90
+ description: `This API sets the value of the \`${COMP}\`. You can use it to programmatically change the value.`,
91
+ signature: "setValue(value: number | undefined): void",
92
+ },
84
93
  },
85
94
  themeVars: (0, themeVars_1.parseScssVar)(NumberBox_module_scss_1.default.themeVars),
86
95
  });
@@ -77,9 +77,18 @@ exports.NumberBoxMd2 = (0, metadata_helpers_1.createMetadata)({
77
77
  didChange: (0, metadata_helpers_1.dDidChange)(COMP),
78
78
  },
79
79
  apis: {
80
- focus: (0, metadata_helpers_1.dFocus)(COMP),
81
- value: (0, metadata_helpers_1.dValue)(),
82
- setValue: (0, metadata_helpers_1.dSetValueApi)(),
80
+ focus: {
81
+ description: "This method focuses the input field of the component.",
82
+ signature: "focus(): void",
83
+ },
84
+ value: {
85
+ description: "This API retrieves the current value of the component.",
86
+ signature: "get value(): number | undefined",
87
+ },
88
+ setValue: {
89
+ description: "This API sets the value of the component.",
90
+ signature: "setValue(value: number | undefined): void",
91
+ },
83
92
  },
84
93
  themeVars: (0, themeVars_1.parseScssVar)(NumberBox_module_scss_1.default.themeVars),
85
94
  });
@@ -37,21 +37,44 @@ exports.QueueMd = (0, metadata_helpers_1.createMetadata)({
37
37
  `The event handler has no arguments.`),
38
38
  },
39
39
  apis: {
40
- enqueueItem: (0, metadata_helpers_1.d)(`This method enqueues the item passed in the method parameter. The new item will be ` +
41
- `processed after the current queue items have been handled. The method retrieves the ` +
42
- `unique ID of the newly added item; this ID can be used later in other methods, ` +
43
- `such as \`remove\`.`),
44
- enqueueItems: (0, metadata_helpers_1.d)(`This method enqueues the array of items passed in the method parameter. The new items ` +
45
- `will be processed after the current queue items have been handled. The method ` +
46
- `retrieves an array of unique IDs, one for each new item. An item ID can be used later ` +
47
- `in other methods, such as \`remove\`.`),
48
- getQueuedItems: (0, metadata_helpers_1.d)(`You can use this method to return the items in the queue. These items contain all ` +
49
- `entries not removed from the queue yet, including pending, in-progress, and ` +
50
- `completed items.`),
51
- getQueueLength: (0, metadata_helpers_1.d)(`This method retrieves the current queue length. The queue contains only those items ` +
52
- `that are not fully processed yet.`),
53
- remove: (0, metadata_helpers_1.d)(`This method retrieves the current queue length. The queue contains only those items ` +
54
- `that are not fully processed yet.`),
40
+ enqueueItem: {
41
+ description: `This method enqueues the item passed in the method parameter. The new item will be ` +
42
+ `processed after the current queue items have been handled. The method retrieves the ` +
43
+ `unique ID of the newly added item; this ID can be used later in other methods, ` +
44
+ `such as \`remove\`.`,
45
+ signature: "enqueueItem(item: any): string",
46
+ parameters: {
47
+ item: "The item to enqueue.",
48
+ },
49
+ },
50
+ enqueueItems: {
51
+ description: `This method enqueues the array of items passed in the method parameter. The new items ` +
52
+ `will be processed after the current queue items have been handled. The method ` +
53
+ `retrieves an array of unique IDs, one for each new item. An item ID can be used later ` +
54
+ `in other methods, such as \`remove\`.`,
55
+ signature: "enqueueItems(items: any[]): string[]",
56
+ parameters: {
57
+ items: "The array of items to enqueue.",
58
+ },
59
+ },
60
+ getQueuedItems: {
61
+ description: `You can use this method to return the items in the queue. These items contain all ` +
62
+ `entries not removed from the queue yet, including pending, in-progress, and ` +
63
+ `completed items.`,
64
+ signature: "getQueuedItems(): any[]",
65
+ },
66
+ getQueueLength: {
67
+ description: `This method retrieves the current queue length. The queue contains only those items ` +
68
+ `that are not fully processed yet.`,
69
+ signature: "getQueueLength(): number",
70
+ },
71
+ remove: {
72
+ description: `This method removes an item from the queue using its unique ID.`,
73
+ signature: "remove(itemId: string): void",
74
+ parameters: {
75
+ itemId: "The unique ID of the item to remove.",
76
+ },
77
+ },
55
78
  },
56
79
  contextVars: {
57
80
  $completedItems: (0, metadata_helpers_1.d)(`A list containing the queue items that have been completed (fully processed).`),
@@ -58,10 +58,25 @@ exports.SelectMd = (0, metadata_helpers_1.createMetadata)({
58
58
  didChange: (0, metadata_helpers_1.dDidChange)(COMP),
59
59
  },
60
60
  apis: {
61
- focus: (0, metadata_helpers_1.dFocus)(COMP),
62
- setValue: (0, metadata_helpers_1.dSetValueApi)(),
63
- value: (0, metadata_helpers_1.dValue)(),
64
- reset: (0, metadata_helpers_1.d)(`This method resets the component to its initial value, or clears the selection if no initial value was provided.`),
61
+ focus: {
62
+ description: `This method focuses the \`${COMP}\` component. You can use it to programmatically focus the component.`,
63
+ signature: "focus(): void",
64
+ },
65
+ setValue: {
66
+ description: `This API sets the value of the \`${COMP}\`. You can use it to programmatically change the value.`,
67
+ signature: "setValue(value: string | string[] | undefined): void",
68
+ parameters: {
69
+ value: "The new value to set. Can be a single value or an array of values for multi-select.",
70
+ },
71
+ },
72
+ value: {
73
+ description: `This API retrieves the current value of the \`${COMP}\`. You can use it to get the value programmatically.`,
74
+ signature: "get value(): string | string[] | undefined",
75
+ },
76
+ reset: {
77
+ description: `This method resets the component to its initial value, or clears the selection if no initial value was provided.`,
78
+ signature: "reset(): void",
79
+ },
65
80
  },
66
81
  contextVars: {
67
82
  $item: (0, metadata_helpers_1.d)("Represents the current option's data (label and value properties)"),
@@ -62,9 +62,21 @@ exports.SliderMd = (0, metadata_helpers_1.createMetadata)({
62
62
  lostFocus: (0, metadata_helpers_1.dLostFocus)(COMP),
63
63
  },
64
64
  apis: {
65
- focus: (0, metadata_helpers_1.dFocus)(COMP),
66
- value: (0, metadata_helpers_1.dValue)(),
67
- setValue: (0, metadata_helpers_1.dSetValueApi)(),
65
+ focus: {
66
+ description: `This method sets the focus on the slider component.`,
67
+ signature: "focus(): void",
68
+ },
69
+ value: {
70
+ description: `This API retrieves the current value of the \`${COMP}\`. You can use it to get the value programmatically.`,
71
+ signature: "get value(): number | [number, number] | undefined",
72
+ },
73
+ setValue: {
74
+ description: `This API sets the value of the \`${COMP}\`. You can use it to programmatically change the value.`,
75
+ signature: "setValue(value: number | [number, number] | undefined): void",
76
+ parameters: {
77
+ value: "The new value to set. Can be a single value or an array of values for range sliders.",
78
+ },
79
+ },
68
80
  },
69
81
  themeVars: (0, themeVars_1.parseScssVar)(Slider_module_scss_1.default.themeVars),
70
82
  defaultThemeVars: {
@@ -35,8 +35,18 @@ exports.SwitchMd = (0, metadata_helpers_1.createMetadata)({
35
35
  didChange: (0, metadata_helpers_1.dDidChange)(COMP),
36
36
  },
37
37
  apis: {
38
- value: (0, metadata_helpers_1.dValueApi)(),
39
- setValue: (0, metadata_helpers_1.dSetValueApi)(),
38
+ value: {
39
+ description: `This property holds the current value of the ${COMP}, which can be either ` +
40
+ `"true" (on) or "false" (off).`,
41
+ signature: "get value():boolean",
42
+ },
43
+ setValue: {
44
+ description: `This API sets the value of the \`${COMP}\`. You can use it to programmatically change the value.`,
45
+ signature: "setValue(value: boolean): void",
46
+ parameters: {
47
+ value: "The new value to set. Can be either true (on) or false (off).",
48
+ },
49
+ },
40
50
  },
41
51
  themeVars: (0, themeVars_1.parseScssVar)(Toggle_module_scss_1.default.themeVars),
42
52
  limitThemeVarsToComponent: true,
@@ -58,7 +68,7 @@ exports.SwitchMd = (0, metadata_helpers_1.createMetadata)({
58
68
  [`backgroundColor-${COMP}--disabled`]: "$color-surface-200",
59
69
  dark: {
60
70
  [`backgroundColor-indicator-${COMP}`]: "$color-surface-500",
61
- }
71
+ },
62
72
  },
63
73
  });
64
74
  exports.switchComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.SwitchMd, ({ node, extractValue, layoutCss, updateState, state, lookupEventHandler, registerComponentApi, }) => {
@@ -96,14 +96,32 @@ exports.TableMd = (0, metadata_helpers_1.createMetadata)({
96
96
  `Its parameter is an array of the selected table row items. `),
97
97
  },
98
98
  apis: {
99
- clearSelection: (0, metadata_helpers_1.d)("This method clears the list of currently selected table rows."),
100
- getSelectedItems: (0, metadata_helpers_1.d)(`This method returns the list of currently selected table rows items.`),
101
- getSelectedIds: (0, metadata_helpers_1.d)(`This method returns the list of currently selected table rows IDs.`),
102
- selectAll: (0, metadata_helpers_1.d)(`This method selects all the rows in the table. This method has no effect if the ` +
103
- `rowsSelectable property is set to \`false\`.`),
104
- selectId: (0, metadata_helpers_1.d)(`This method selects the row with the specified ID. This method has no effect if the ` +
105
- `\`rowsSelectable\` property is set to \`false\`. The method argument can be a ` +
106
- `single id or an array of them.`),
99
+ clearSelection: {
100
+ description: `This method clears the list of currently selected table rows.`,
101
+ signature: "clearSelection(): void",
102
+ },
103
+ getSelectedItems: {
104
+ description: `This method returns the list of currently selected table rows items.`,
105
+ signature: "getSelectedItems(): Array<TableRowItem>",
106
+ },
107
+ getSelectedIds: {
108
+ description: `This method returns the list of currently selected table rows IDs.`,
109
+ signature: "getSelectedIds(): Array<string>",
110
+ },
111
+ selectAll: {
112
+ description: `This method selects all the rows in the table. This method has no effect if the ` +
113
+ `rowsSelectable property is set to \`false\`.`,
114
+ signature: "selectAll(): void",
115
+ },
116
+ selectId: {
117
+ description: `This method selects the row with the specified ID. This method has no effect if the ` +
118
+ `\`rowsSelectable\` property is set to \`false\`. The method argument can be a ` +
119
+ `single id or an array of them.`,
120
+ signature: "selectId(id: string | Array<string>): void",
121
+ parameters: {
122
+ id: `The ID of the row to select, or an array of IDs to select multiple rows.`,
123
+ },
124
+ },
107
125
  },
108
126
  themeVars: (0, themeVars_1.parseScssVar)(Table_module_scss_1.default.themeVars),
109
127
  defaultThemeVars: {
@@ -32,7 +32,10 @@ exports.TabsMd = (0, metadata_helpers_1.createMetadata)({
32
32
  tabTemplate: Object.assign(Object.assign({}, (0, metadata_helpers_1.dComponent)(`This property declares the template for the clickable tab area.`)), { isInternal: true }),
33
33
  },
34
34
  apis: {
35
- next: (0, metadata_helpers_1.d)(`This method selects the next tab.`),
35
+ next: {
36
+ description: `This method selects the next tab. If the current tab is the last one, it wraps around to the first tab.`,
37
+ signature: "next(): void",
38
+ },
36
39
  },
37
40
  themeVars: (0, themeVars_1.parseScssVar)(Tabs_module_scss_1.default.themeVars),
38
41
  defaultThemeVars: {
@@ -72,8 +72,14 @@ exports.TextAreaMd = (0, metadata_helpers_1.createMetadata)({
72
72
  didChange: (0, metadata_helpers_1.dDidChange)(COMP),
73
73
  },
74
74
  apis: {
75
- focus: (0, metadata_helpers_1.dFocus)(COMP),
76
- value: (0, metadata_helpers_1.d)(`You can query the component's value. If no value is set, it will retrieve \`undefined\`.`),
75
+ focus: {
76
+ description: `This method sets the focus on the \`${COMP}\` component.`,
77
+ signature: "focus(): void",
78
+ },
79
+ value: {
80
+ description: `You can query the component's value. If no value is set, it will retrieve \`undefined\`.`,
81
+ signature: "get value(): string | undefined",
82
+ },
77
83
  setValue: (0, metadata_helpers_1.dSetValueApi)(),
78
84
  },
79
85
  themeVars: (0, themeVars_1.parseScssVar)(TextArea_module_scss_1.default.themeVars),
@@ -49,7 +49,7 @@ exports.TextBoxMd = (0, metadata_helpers_1.createMetadata)({
49
49
  description: "The icon to display when the password is hidden (when showPasswordToggle is true).",
50
50
  valueType: "string",
51
51
  defaultValue: "eye-off",
52
- }
52
+ },
53
53
  },
54
54
  events: {
55
55
  gotFocus: (0, metadata_helpers_1.dGotFocus)(COMP),
@@ -57,9 +57,21 @@ exports.TextBoxMd = (0, metadata_helpers_1.createMetadata)({
57
57
  didChange: (0, metadata_helpers_1.dDidChange)(COMP),
58
58
  },
59
59
  apis: {
60
- focus: (0, metadata_helpers_1.dFocus)(COMP),
61
- value: (0, metadata_helpers_1.d)(`You can query the component's value. If no value is set, it will retrieve \`undefined\`.`),
62
- setValue: (0, metadata_helpers_1.dSetValueApi)(),
60
+ focus: {
61
+ description: `This method sets the focus on the \`${COMP}\` component.`,
62
+ signature: "focus(): void",
63
+ },
64
+ value: {
65
+ description: `You can query the component's value. If no value is set, it will retrieve \`undefined\`.`,
66
+ signature: "get value(): string | undefined",
67
+ },
68
+ setValue: {
69
+ description: `This API sets the value of the \`${COMP}\`. You can use it to programmatically change the value.`,
70
+ signature: "setValue(value: string): void",
71
+ parameters: {
72
+ value: "The new value to set. If the value is empty, it will clear the input.",
73
+ },
74
+ },
63
75
  },
64
76
  themeVars: (0, themeVars_1.parseScssVar)(TextBox_module_scss_1.default.themeVars),
65
77
  defaultThemeVars: {
@@ -53,7 +53,7 @@ exports.defaultProps = {
53
53
  validationStatus: "none",
54
54
  indeterminate: false,
55
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) {
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, autoFocus, registerComponentApi, inputRenderer, }, forwardedRef) {
57
57
  const generatedId = (0, react_1.useId)();
58
58
  const inputId = id || generatedId;
59
59
  const innerRef = react_3.default.useRef(null);
@@ -89,6 +89,11 @@ exports.Toggle = (0, react_3.forwardRef)(function Toggle({ id, initialValue = ex
89
89
  var _a;
90
90
  (_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
91
91
  }, []);
92
+ (0, react_3.useEffect)(() => {
93
+ if (innerRef.current && autoFocus) {
94
+ setTimeout(() => focus(), 0);
95
+ }
96
+ }, [focus, autoFocus]);
92
97
  const setValue = (0, misc_1.useEvent)((newValue) => {
93
98
  updateValue(newValue);
94
99
  });
@@ -98,7 +103,7 @@ exports.Toggle = (0, react_3.forwardRef)(function Toggle({ id, initialValue = ex
98
103
  setValue,
99
104
  });
100
105
  }, [focus, registerComponentApi, setValue]);
101
- const input = (0, react_2.useMemo)(() => ((0, jsx_runtime_1.jsx)("input", { id: inputId, ref: innerRef, type: "checkbox", role: variant, checked: value, disabled: !enabled, required: required, readOnly: readOnly, "aria-readonly": readOnly, "aria-checked": value, onChange: onInputChange, onFocus: handleOnFocus, onBlur: handleOnBlur, className: (0, classnames_1.default)(Toggle_module_scss_1.default.resetAppearance, className, {
106
+ const input = (0, react_2.useMemo)(() => ((0, jsx_runtime_1.jsx)("input", { id: inputId, ref: innerRef, type: "checkbox", role: variant, checked: value, disabled: !enabled, required: required, readOnly: readOnly, "aria-readonly": readOnly, "aria-checked": indeterminate ? "mixed" : value, "aria-required": required, "aria-disabled": !enabled, onChange: onInputChange, onFocus: handleOnFocus, onBlur: handleOnBlur, autoFocus: autoFocus, className: (0, classnames_1.default)(Toggle_module_scss_1.default.resetAppearance, className, {
102
107
  [Toggle_module_scss_1.default.checkbox]: variant === "checkbox",
103
108
  [Toggle_module_scss_1.default.switch]: variant === "switch",
104
109
  [Toggle_module_scss_1.default.error]: validationStatus === "error",
@@ -116,6 +121,8 @@ exports.Toggle = (0, react_3.forwardRef)(function Toggle({ id, initialValue = ex
116
121
  validationStatus,
117
122
  value,
118
123
  variant,
124
+ indeterminate,
125
+ autoFocus,
119
126
  ]);
120
127
  return ((0, jsx_runtime_1.jsx)(ItemWithLabel_1.ItemWithLabel, { ref: forwardedRef, id: inputId, label: label, style: style, labelPosition: labelPosition, labelWidth: labelWidth, labelBreak: labelBreak, required: required, enabled: enabled, isInputTemplateUsed: !!inputRenderer, shrinkToLabel: true, labelStyle: { pointerEvents: readOnly ? "none" : undefined }, children: inputRenderer ? ((0, jsx_runtime_1.jsxs)("label", { className: Toggle_module_scss_1.default.label, children: [(0, jsx_runtime_1.jsx)("div", { className: Toggle_module_scss_1.default.inputContainer, children: input }), inputRenderer({
121
128
  $checked: value,
@@ -38,6 +38,7 @@ exports.dDidClose = dDidClose;
38
38
  exports.dTriggerTemplate = dTriggerTemplate;
39
39
  exports.dOrientation = dOrientation;
40
40
  const abstractions_1 = require("./abstractions");
41
+ const ItemWithLabel_1 = require("./FormItem/ItemWithLabel");
41
42
  function createMetadata(metadata) {
42
43
  return metadata;
43
44
  }
@@ -99,10 +100,10 @@ function dLabelWidth(comp) {
99
100
  }
100
101
  function dLabelBreak(comp) {
101
102
  return {
102
- description: `This boolean value indicates if the \`${comp}\` label can be split into multiple ` +
103
+ description: `This boolean value indicates whether the \`${comp}\` label can be split into multiple ` +
103
104
  `lines if it would overflow the available label width.`,
104
105
  valueType: "boolean",
105
- defaultValue: false,
106
+ defaultValue: ItemWithLabel_1.defaultProps.labelBreak,
106
107
  };
107
108
  }
108
109
  function dAutoFocus() {
@@ -238,7 +239,6 @@ function dValue() {
238
239
  `retrieve \`undefined\`.`,
239
240
  };
240
241
  }
241
- `You can query the component's value. If no value is set, it will retrieve \`undefined\`.`;
242
242
  function dDidOpen(comp) {
243
243
  return {
244
244
  description: `This event is triggered when the ${comp} has been displayed. The event handler has a single ` +
@@ -288,7 +288,7 @@ declare const Button: default_2.ForwardRefExoticComponent<{
288
288
  accessibilityProps?: any;
289
289
  autoFocus?: boolean;
290
290
  contextualLabel?: string;
291
- } & Pick<default_2.HTMLAttributes<HTMLButtonElement>, "className" | "aria-disabled" | "aria-label" | "aria-controls" | "aria-expanded" | "onClick" | "onFocus" | "onBlur" | "tabIndex" | "onMouseEnter" | "onMouseLeave"> & default_2.RefAttributes<HTMLButtonElement>>;
291
+ } & Pick<default_2.HTMLAttributes<HTMLButtonElement>, "className" | "aria-disabled" | "aria-label" | "aria-controls" | "aria-expanded" | "onFocus" | "onBlur" | "onClick" | "tabIndex" | "onMouseEnter" | "onMouseLeave"> & default_2.RefAttributes<HTMLButtonElement>>;
292
292
 
293
293
  declare type ButtonThemeColor = (typeof buttonThemeValues)[number];
294
294
 
@@ -347,6 +347,12 @@ declare type CompilationUnit = {
347
347
  */
348
348
  declare type ComponentApi = Record<string, ((...args: any[]) => any) | boolean>;
349
349
 
350
+ declare type ComponentApiMetadata = {
351
+ readonly description: string;
352
+ readonly signature?: string;
353
+ readonly parameters?: Record<string, string>;
354
+ };
355
+
350
356
  declare type ComponentCompilation = CompilationUnit & {
351
357
  /** The compiled markup of the component file */
352
358
  definition: CompoundComponentDef;
@@ -433,7 +439,7 @@ declare type ComponentExtension = ComponentRendererDef | CompoundComponentDef;
433
439
 
434
440
  declare type ComponentLike = ComponentDef | CompoundComponentDef;
435
441
 
436
- declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentPropertyMetadata> = Record<string, any>> = {
442
+ declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentApiMetadata> = Record<string, any>> = {
437
443
  status?: "stable" | "experimental" | "deprecated" | "in progress";
438
444
  description?: string;
439
445
  shortDescription?: string;
@@ -1326,7 +1332,7 @@ declare const standaloneExports: {
1326
1332
  accessibilityProps?: any;
1327
1333
  autoFocus?: boolean;
1328
1334
  contextualLabel?: string;
1329
- } & Pick<default_2.HTMLAttributes<HTMLButtonElement>, "className" | "aria-disabled" | "aria-label" | "aria-controls" | "aria-expanded" | "onClick" | "onFocus" | "onBlur" | "tabIndex" | "onMouseEnter" | "onMouseLeave"> & default_2.RefAttributes<HTMLButtonElement>>;
1335
+ } & Pick<default_2.HTMLAttributes<HTMLButtonElement>, "className" | "aria-disabled" | "aria-label" | "aria-controls" | "aria-expanded" | "onFocus" | "onBlur" | "onClick" | "tabIndex" | "onMouseEnter" | "onMouseLeave"> & default_2.RefAttributes<HTMLButtonElement>>;
1330
1336
  Splitter: ({ initialPrimarySize, minPrimarySize, maxPrimarySize, orientation, children, style, swapped, floating, splitterTemplate, resize, }: {
1331
1337
  children: default_2.ReactNode[] | default_2.ReactNode;
1332
1338
  style?: default_2.CSSProperties;