xmlui 0.10.8 → 0.10.11
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/{metadata/apiInterceptorWorker-Bb5-fQup.mjs → lib/apiInterceptorWorker-DPgtUtdA.mjs} +5870 -3195
- package/dist/lib/index-BuIblMfO.mjs +50034 -0
- package/dist/lib/index.css +1 -1
- package/dist/lib/initMock-CV-9AUzP.mjs +843 -0
- package/dist/lib/language-server-web-worker.mjs +8 -7
- package/dist/lib/language-server.mjs +6 -6
- package/dist/lib/{metadata-utils-DrEexTX9.mjs → metadata-utils-DzONZF-e.mjs} +161 -111
- package/dist/lib/scss/components-core/theming/_themes.scss +6 -7
- package/dist/lib/{server-common-ddmPKhK6.mjs → server-common-Dsyp3-Ro.mjs} +14949 -10880
- package/dist/lib/syntax-monaco.mjs +14 -11
- package/dist/lib/syntax-textmate.d.ts +2 -2
- package/dist/lib/syntax-textmate.mjs +128 -109
- package/dist/lib/transform-CBz7TQJh.mjs +7375 -0
- package/dist/lib/xmlui-parser.d.ts +3 -3
- package/dist/lib/xmlui-parser.mjs +49 -49
- package/dist/lib/xmlui-serializer-Bf9bdvlV.mjs +667 -0
- package/dist/lib/xmlui.d.ts +16 -11
- package/dist/lib/xmlui.mjs +44 -44
- package/dist/{lib/apiInterceptorWorker-DH8wqOVq.mjs → metadata/apiInterceptorWorker-BmKP8bnq.mjs} +5432 -3502
- package/dist/metadata/collectedComponentMetadata-Cdi6AFD3.mjs +55851 -0
- package/dist/metadata/initMock-B7OlSKKb.mjs +843 -0
- package/dist/metadata/style.css +1 -1
- package/dist/metadata/xmlui-metadata.mjs +3 -3
- package/dist/metadata/xmlui-metadata.umd.js +207 -419
- package/dist/scripts/package.json +3 -1
- package/dist/scripts/src/components/APICall/APICall.js +4 -4
- package/dist/scripts/src/components/Accordion/Accordion.js +1 -1
- package/dist/scripts/src/components/Accordion/AccordionItemNative.js +2 -2
- package/dist/scripts/src/components/Animation/AnimationNative.js +259 -0
- package/dist/scripts/src/components/App/App.js +10 -0
- package/dist/scripts/src/components/App/AppNative.js +29 -9
- package/dist/scripts/src/components/AutoComplete/AutoComplete.js +1 -1
- package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +5 -4
- package/dist/scripts/src/components/Breakout/BreakoutNative.js +2 -2
- package/dist/scripts/src/components/Button/Button.js +1 -1
- package/dist/scripts/src/components/Button/ButtonNative.js +4 -0
- package/dist/scripts/src/components/Carousel/Carousel.js +13 -20
- package/dist/scripts/src/components/Carousel/CarouselContext.js +11 -2
- package/dist/scripts/src/components/Carousel/CarouselItemNative.js +2 -2
- package/dist/scripts/src/components/Carousel/CarouselNative.js +2 -2
- package/dist/scripts/src/components/Charts/AreaChart/AreaChart.js +92 -0
- package/dist/scripts/src/components/Charts/AreaChart/AreaChartNative.js +127 -0
- package/dist/scripts/src/components/Charts/BarChart/BarChart.js +4 -4
- package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +90 -82
- package/dist/scripts/src/components/Charts/LineChart/LineChart.js +3 -3
- package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +5 -1
- package/dist/scripts/src/components/Charts/RadarChart/RadarChart.js +92 -0
- package/dist/scripts/src/components/Charts/RadarChart/RadarChartNative.js +125 -0
- package/dist/scripts/src/components/Checkbox/Checkbox.js +2 -1
- package/dist/scripts/src/components/ComponentProvider.js +4 -0
- package/dist/scripts/src/components/DataSource/DataSource.js +124 -0
- package/dist/scripts/src/components/DateInput/DateInput.js +7 -9
- package/dist/scripts/src/components/DateInput/DateInputNative.js +101 -38
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +1 -1
- package/dist/scripts/src/components/ExpandableItem/ExpandableItemNative.js +18 -12
- package/dist/scripts/src/components/Footer/Footer.js +1 -1
- package/dist/scripts/src/components/FormItem/FormItem.js +1 -1
- package/dist/scripts/src/components/FormItem/ItemWithLabel.js +3 -3
- package/dist/scripts/src/components/Heading/Heading.js +83 -28
- package/dist/scripts/src/components/Heading/HeadingNative.js +10 -1
- package/dist/scripts/src/components/HtmlTags/HtmlTags.js +1 -1
- package/dist/scripts/src/components/Image/ImageNative.js +13 -0
- package/dist/scripts/src/components/Input/PartialInput.js +28 -3
- package/dist/scripts/src/components/List/ListNative.js +6 -5
- package/dist/scripts/src/components/NavLink/NavLink.js +1 -1
- package/dist/scripts/src/components/NavPanel/NavPanelNative.js +3 -8
- package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +2 -2
- package/dist/scripts/src/components/Option/Option.js +2 -2
- package/dist/scripts/src/components/Option/OptionNative.js +12 -1
- package/dist/scripts/src/components/Pagination/Pagination.js +2 -1
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +7 -3
- package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +20 -5
- package/dist/scripts/src/components/RadioGroup/RadioItemNative.js +2 -1
- package/dist/scripts/src/components/Select/Select.js +1 -1
- package/dist/scripts/src/components/Select/SelectNative.js +1 -1
- package/dist/scripts/src/components/Slider/Slider.js +10 -8
- package/dist/scripts/src/components/Slider/SliderNative.js +24 -21
- package/dist/scripts/src/components/Switch/Switch.js +2 -1
- package/dist/scripts/src/components/Table/Table.js +1 -1
- package/dist/scripts/src/components/Table/TableNative.js +18 -13
- package/dist/scripts/src/components/TableOfContents/TableOfContents.js +1 -1
- package/dist/scripts/src/components/Text/Text.js +32 -14
- package/dist/scripts/src/components/Text/TextNative.js +17 -5
- package/dist/scripts/src/components/TextArea/TextAreaNative.js +3 -3
- package/dist/scripts/src/components/TextBox/TextBoxNative.js +3 -3
- package/dist/scripts/src/components/TimeInput/TimeInput.js +10 -10
- package/dist/scripts/src/components/TimeInput/TimeInputNative.js +87 -38
- package/dist/scripts/src/components/Toggle/Toggle.js +2 -2
- package/dist/scripts/src/components/Tooltip/Tooltip.js +9 -9
- package/dist/scripts/src/components/Tooltip/TooltipNative.js +4 -4
- package/dist/scripts/src/components/abstractions.js +7 -3
- package/dist/scripts/src/components/collectedComponentMetadata.js +316 -0
- package/dist/scripts/src/components-core/RestApiProxy.js +3 -1
- package/dist/scripts/src/components-core/StandaloneApp.js +823 -0
- package/dist/scripts/src/components-core/interception/ApiInterceptor.js +4 -1
- package/dist/scripts/src/components-core/interception/Backend.js +13 -7
- package/dist/scripts/src/components-core/markup-check.js +279 -0
- package/dist/scripts/src/components-core/parts.js +0 -4
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +36 -16
- package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +4 -1
- package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +4 -1
- package/dist/scripts/src/components-core/theming/themes/root.js +30 -17
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +14 -7
- package/dist/scripts/src/components-core/xmlui-parser.js +60 -43
- package/dist/scripts/src/index.js +120 -0
- package/dist/scripts/src/parsers/xmlui-parser/transform.js +15 -4
- package/dist/standalone/xmlui-standalone.es.d.ts +23 -15
- package/dist/standalone/xmlui-standalone.umd.js +319 -823
- package/package.json +3 -1
- package/src/syntax/textMate/xmlui.tmLanguage.json +2 -2
- package/dist/lib/index-CqzCWOUw.mjs +0 -38579
- package/dist/lib/initMock-C5CXs0-5.mjs +0 -568
- package/dist/lib/transform-SMWeyMoq.mjs +0 -5391
- package/dist/lib/xmlui-serializer-a0O0jFY-.mjs +0 -497
- package/dist/metadata/collectedComponentMetadata-DIT5VbaH.mjs +0 -42985
- package/dist/metadata/initMock-D6Vi9kU_.mjs +0 -568
- package/dist/scripts/src/components-core/ScrollContext.js +0 -11
- package/dist/scripts/src/components-core/utils/audio-utils.js +0 -83
|
@@ -43,6 +43,22 @@ const OMIT_FROM_TOC_DESC = {
|
|
|
43
43
|
type: "boolean",
|
|
44
44
|
defaultValue: HeadingNative_1.defaultProps.omitFromToc,
|
|
45
45
|
};
|
|
46
|
+
const SHOW_ANCHOR_DESC = {
|
|
47
|
+
description: "This property indicates whether an anchor link should be displayed next to the heading. " +
|
|
48
|
+
"If set to `true`, an anchor link will be displayed on hover next to the heading.",
|
|
49
|
+
type: "boolean",
|
|
50
|
+
defaultValue: HeadingNative_1.defaultProps.showAnchor,
|
|
51
|
+
};
|
|
52
|
+
const APIS_DESC = {
|
|
53
|
+
scrollIntoView: {
|
|
54
|
+
signature: "scrollIntoView()",
|
|
55
|
+
description: "Scrolls the heading into view.",
|
|
56
|
+
},
|
|
57
|
+
hasOverflow: {
|
|
58
|
+
signature: "hasOverflow()",
|
|
59
|
+
description: "Returns true when the displayed text overflows the bounds of this heading component.",
|
|
60
|
+
},
|
|
61
|
+
};
|
|
46
62
|
exports.HeadingMd = (0, metadata_helpers_1.createMetadata)({
|
|
47
63
|
status: "stable",
|
|
48
64
|
description: "`Heading` displays hierarchical text headings with semantic importance levels " +
|
|
@@ -60,18 +76,9 @@ exports.HeadingMd = (0, metadata_helpers_1.createMetadata)({
|
|
|
60
76
|
ellipses: ELLIPSES_DESC,
|
|
61
77
|
preserveLinebreaks: PRESERVE_DESC,
|
|
62
78
|
omitFromToc: OMIT_FROM_TOC_DESC,
|
|
63
|
-
showAnchor:
|
|
64
|
-
description: "This property indicates whether an anchor link should be displayed next to the heading. " +
|
|
65
|
-
"If set to `true`, an anchor link will be displayed on hover next to the heading.",
|
|
66
|
-
type: "boolean",
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
apis: {
|
|
70
|
-
scrollIntoView: {
|
|
71
|
-
signature: "scrollIntoView()",
|
|
72
|
-
description: "Scrolls the heading into view.",
|
|
73
|
-
},
|
|
79
|
+
showAnchor: SHOW_ANCHOR_DESC,
|
|
74
80
|
},
|
|
81
|
+
apis: APIS_DESC,
|
|
75
82
|
themeVars: (0, themeVars_1.parseScssVar)(Heading_module_scss_1.default.themeVars),
|
|
76
83
|
limitThemeVarsToComponent: true,
|
|
77
84
|
defaultThemeVars: {
|
|
@@ -98,14 +105,20 @@ exports.H1Md = (0, metadata_helpers_1.createMetadata)({
|
|
|
98
105
|
props: {
|
|
99
106
|
value: VALUE_DESC,
|
|
100
107
|
maxLines: MAX_LINES_DESC,
|
|
108
|
+
ellipses: ELLIPSES_DESC,
|
|
109
|
+
preserveLinebreaks: PRESERVE_DESC,
|
|
101
110
|
omitFromToc: OMIT_FROM_TOC_DESC,
|
|
111
|
+
showAnchor: SHOW_ANCHOR_DESC,
|
|
102
112
|
},
|
|
113
|
+
apis: APIS_DESC,
|
|
103
114
|
themeVars: (0, themeVars_1.parseScssVar)(Heading_module_scss_1.default.themeVars),
|
|
104
115
|
defaultThemeVars: {
|
|
105
|
-
[`fontSize-${H1}`]: "$fontSize-
|
|
116
|
+
[`fontSize-${H1}`]: "$fontSize-2xl",
|
|
117
|
+
[`lineHeight-${H1}`]: "$lineHeight-2xl",
|
|
106
118
|
[`marginTop-${H1}`]: "0",
|
|
107
119
|
[`marginBottom-${H1}`]: "0",
|
|
108
|
-
[`fontSize-${H1}-markdown`]: "$fontSize-
|
|
120
|
+
[`fontSize-${H1}-markdown`]: "$fontSize-2xl",
|
|
121
|
+
[`lineHeight-${H1}-markdown`]: "$lineHeight-2xl",
|
|
109
122
|
[`marginTop-${H1}-markdown`]: "0",
|
|
110
123
|
[`marginBottom-${H1}-markdown`]: "$space-6",
|
|
111
124
|
light: {
|
|
@@ -124,13 +137,20 @@ exports.H2Md = (0, metadata_helpers_1.createMetadata)({
|
|
|
124
137
|
props: {
|
|
125
138
|
value: VALUE_DESC,
|
|
126
139
|
maxLines: MAX_LINES_DESC,
|
|
140
|
+
ellipses: ELLIPSES_DESC,
|
|
141
|
+
preserveLinebreaks: PRESERVE_DESC,
|
|
127
142
|
omitFromToc: OMIT_FROM_TOC_DESC,
|
|
143
|
+
showAnchor: SHOW_ANCHOR_DESC,
|
|
128
144
|
},
|
|
145
|
+
apis: APIS_DESC,
|
|
129
146
|
themeVars: (0, themeVars_1.parseScssVar)(Heading_module_scss_1.default.themeVars),
|
|
130
147
|
defaultThemeVars: {
|
|
131
|
-
[`fontSize-${H2}`]: "$fontSize-
|
|
148
|
+
[`fontSize-${H2}`]: "$fontSize-xl",
|
|
149
|
+
[`lineHeight-${H2}`]: "$lineHeight-xl",
|
|
132
150
|
[`marginTop-${H2}`]: "0",
|
|
133
151
|
[`marginBottom-${H2}`]: "0",
|
|
152
|
+
[`fontSize-${H2}-markdown`]: "$fontSize-xl",
|
|
153
|
+
[`lineHeight-${H2}-markdown`]: "$lineHeight-xl",
|
|
134
154
|
[`marginTop-${H2}-markdown`]: "$space-10",
|
|
135
155
|
[`marginBottom-${H2}-markdown`]: "$space-3",
|
|
136
156
|
light: {
|
|
@@ -149,13 +169,20 @@ exports.H3Md = (0, metadata_helpers_1.createMetadata)({
|
|
|
149
169
|
props: {
|
|
150
170
|
value: VALUE_DESC,
|
|
151
171
|
maxLines: MAX_LINES_DESC,
|
|
172
|
+
ellipses: ELLIPSES_DESC,
|
|
173
|
+
preserveLinebreaks: PRESERVE_DESC,
|
|
152
174
|
omitFromToc: OMIT_FROM_TOC_DESC,
|
|
175
|
+
showAnchor: SHOW_ANCHOR_DESC,
|
|
153
176
|
},
|
|
177
|
+
apis: APIS_DESC,
|
|
154
178
|
themeVars: (0, themeVars_1.parseScssVar)(Heading_module_scss_1.default.themeVars),
|
|
155
179
|
defaultThemeVars: {
|
|
156
|
-
[`fontSize-${H3}`]: "$fontSize-
|
|
180
|
+
[`fontSize-${H3}`]: "$fontSize-lg",
|
|
181
|
+
[`lineHeight-${H3}`]: "$lineHeight-lg",
|
|
157
182
|
[`marginTop-${H3}`]: "0",
|
|
158
183
|
[`marginBottom-${H3}`]: "0",
|
|
184
|
+
[`fontSize-${H3}-markdown`]: "$fontSize-lg",
|
|
185
|
+
[`lineHeight-${H3}-markdown`]: "$lineHeight-lg",
|
|
159
186
|
[`marginTop-${H3}-markdown`]: "$space-6",
|
|
160
187
|
[`marginBottom-${H3}-markdown`]: "$space-2",
|
|
161
188
|
light: {
|
|
@@ -175,12 +202,19 @@ exports.H4Md = (0, metadata_helpers_1.createMetadata)({
|
|
|
175
202
|
value: VALUE_DESC,
|
|
176
203
|
maxLines: MAX_LINES_DESC,
|
|
177
204
|
omitFromToc: OMIT_FROM_TOC_DESC,
|
|
205
|
+
ellipses: ELLIPSES_DESC,
|
|
206
|
+
preserveLinebreaks: PRESERVE_DESC,
|
|
207
|
+
showAnchor: SHOW_ANCHOR_DESC,
|
|
178
208
|
},
|
|
209
|
+
apis: APIS_DESC,
|
|
179
210
|
themeVars: (0, themeVars_1.parseScssVar)(Heading_module_scss_1.default.themeVars),
|
|
180
211
|
defaultThemeVars: {
|
|
181
|
-
[`fontSize-${H4}`]: "$fontSize-
|
|
212
|
+
[`fontSize-${H4}`]: "$fontSize-base",
|
|
213
|
+
[`lineHeight-${H4}`]: "$lineHeight-base",
|
|
182
214
|
[`marginTop-${H4}`]: "0",
|
|
183
215
|
[`marginBottom-${H4}`]: "0",
|
|
216
|
+
[`fontSize-${H4}-markdown`]: "$fontSize-base",
|
|
217
|
+
[`lineHeight-${H4}-markdown`]: "$lineHeight-base",
|
|
184
218
|
[`marginTop-${H4}-markdown`]: "$space-5",
|
|
185
219
|
[`marginBottom-${H4}-markdown`]: "$space-1",
|
|
186
220
|
light: {
|
|
@@ -200,12 +234,19 @@ exports.H5Md = (0, metadata_helpers_1.createMetadata)({
|
|
|
200
234
|
value: VALUE_DESC,
|
|
201
235
|
maxLines: MAX_LINES_DESC,
|
|
202
236
|
omitFromToc: OMIT_FROM_TOC_DESC,
|
|
237
|
+
ellipses: ELLIPSES_DESC,
|
|
238
|
+
preserveLinebreaks: PRESERVE_DESC,
|
|
239
|
+
showAnchor: SHOW_ANCHOR_DESC,
|
|
203
240
|
},
|
|
241
|
+
apis: APIS_DESC,
|
|
204
242
|
themeVars: (0, themeVars_1.parseScssVar)(Heading_module_scss_1.default.themeVars),
|
|
205
243
|
defaultThemeVars: {
|
|
206
|
-
[`fontSize-${H5}`]: "$fontSize-
|
|
244
|
+
[`fontSize-${H5}`]: "$fontSize-sm",
|
|
245
|
+
[`lineHeight-${H5}`]: "$lineHeight-sm",
|
|
207
246
|
[`marginTop-${H5}`]: "0",
|
|
208
247
|
[`marginBottom-${H5}`]: "0",
|
|
248
|
+
[`fontSize-${H5}-markdown`]: "$fontSize-sm",
|
|
249
|
+
[`lineHeight-${H5}-markdown`]: "$lineHeight-sm",
|
|
209
250
|
[`marginTop-${H5}-markdown`]: "0",
|
|
210
251
|
[`marginBottom-${H5}-markdown`]: "$space-0",
|
|
211
252
|
light: {
|
|
@@ -225,12 +266,19 @@ exports.H6Md = (0, metadata_helpers_1.createMetadata)({
|
|
|
225
266
|
value: VALUE_DESC,
|
|
226
267
|
maxLines: MAX_LINES_DESC,
|
|
227
268
|
omitFromToc: OMIT_FROM_TOC_DESC,
|
|
269
|
+
ellipses: ELLIPSES_DESC,
|
|
270
|
+
preserveLinebreaks: PRESERVE_DESC,
|
|
271
|
+
showAnchor: SHOW_ANCHOR_DESC,
|
|
228
272
|
},
|
|
273
|
+
apis: APIS_DESC,
|
|
229
274
|
themeVars: (0, themeVars_1.parseScssVar)(Heading_module_scss_1.default.themeVars),
|
|
230
275
|
defaultThemeVars: {
|
|
231
|
-
[`fontSize-${H6}`]: "$fontSize-
|
|
276
|
+
[`fontSize-${H6}`]: "$fontSize-xs",
|
|
277
|
+
[`lineHeight-${H6}`]: "$lineHeight-xs",
|
|
232
278
|
[`marginTop-${H6}`]: "0",
|
|
233
279
|
[`marginBottom-${H6}`]: "0",
|
|
280
|
+
[`fontSize-${H6}-markdown`]: "$fontSize-xs",
|
|
281
|
+
[`lineHeight-${H6}-markdown`]: "$lineHeight-xs",
|
|
234
282
|
[`marginTop-${H6}-markdown`]: "0",
|
|
235
283
|
[`marginBottom-${H6}-markdown`]: "$space-0",
|
|
236
284
|
light: {
|
|
@@ -241,72 +289,79 @@ exports.H6Md = (0, metadata_helpers_1.createMetadata)({
|
|
|
241
289
|
},
|
|
242
290
|
},
|
|
243
291
|
});
|
|
244
|
-
function renderHeading({ node, extractValue, className, level, showAnchor, renderChild, }) {
|
|
292
|
+
function renderHeading({ node, extractValue, className, level, showAnchor, renderChild, registerComponentApi, }) {
|
|
245
293
|
var _a, _b;
|
|
246
294
|
const _c = node.props, { maxLines, preserveLinebreaks, ellipses } = _c, restProps = __rest(_c, ["maxLines", "preserveLinebreaks", "ellipses"]);
|
|
247
295
|
delete restProps.level; // Remove level from restProps as it is handled separately
|
|
248
|
-
return ((0, jsx_runtime_1.jsx)(HeadingNative_1.Heading, Object.assign({ uid: node.uid, level: ((_a = extractValue.asOptionalString(level)) !== null && _a !== void 0 ? _a : "h1"), maxLines: extractValue.asOptionalNumber(maxLines), preserveLinebreaks: extractValue.asOptionalBoolean(preserveLinebreaks, false), ellipses: extractValue.asOptionalBoolean(ellipses, true), showAnchor: extractValue.asOptionalBoolean(showAnchor), className: className, omitFromToc: extractValue.asOptionalBoolean((_b = node.props) === null || _b === void 0 ? void 0 : _b.omitFromToc) }, (0, extractParam_1.resolveAndCleanProps)(restProps, extractValue), { children: extractValue.asDisplayText(node.props.value) || renderChild(node.children) })));
|
|
296
|
+
return ((0, jsx_runtime_1.jsx)(HeadingNative_1.Heading, Object.assign({ uid: node.uid, level: ((_a = extractValue.asOptionalString(level)) !== null && _a !== void 0 ? _a : "h1"), maxLines: extractValue.asOptionalNumber(maxLines), preserveLinebreaks: extractValue.asOptionalBoolean(preserveLinebreaks, false), ellipses: extractValue.asOptionalBoolean(ellipses, true), showAnchor: extractValue.asOptionalBoolean(showAnchor), className: className, omitFromToc: extractValue.asOptionalBoolean((_b = node.props) === null || _b === void 0 ? void 0 : _b.omitFromToc), registerComponentApi: registerComponentApi }, (0, extractParam_1.resolveAndCleanProps)(restProps, extractValue), { children: extractValue.asDisplayText(node.props.value) || renderChild(node.children) })));
|
|
249
297
|
}
|
|
250
|
-
exports.headingComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.HeadingMd, ({ node, extractValue, className, renderChild }) => {
|
|
298
|
+
exports.headingComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.HeadingMd, ({ node, extractValue, className, renderChild, registerComponentApi }) => {
|
|
251
299
|
return renderHeading({
|
|
252
|
-
node,
|
|
300
|
+
node: node,
|
|
253
301
|
extractValue,
|
|
254
302
|
className,
|
|
255
303
|
level: node.props.level,
|
|
256
304
|
renderChild,
|
|
305
|
+
registerComponentApi,
|
|
257
306
|
});
|
|
258
307
|
});
|
|
259
|
-
exports.h1ComponentRenderer = (0, renderers_1.createComponentRenderer)(H1, exports.H1Md, ({ node, extractValue, className, renderChild }) => {
|
|
308
|
+
exports.h1ComponentRenderer = (0, renderers_1.createComponentRenderer)(H1, exports.H1Md, ({ node, extractValue, className, renderChild, registerComponentApi }) => {
|
|
260
309
|
return renderHeading({
|
|
261
310
|
node,
|
|
262
311
|
extractValue,
|
|
263
312
|
className,
|
|
264
313
|
level: "h1",
|
|
265
314
|
renderChild,
|
|
315
|
+
registerComponentApi,
|
|
266
316
|
});
|
|
267
317
|
});
|
|
268
|
-
exports.h2ComponentRenderer = (0, renderers_1.createComponentRenderer)(H2, exports.H2Md, ({ node, extractValue, className, renderChild }) => {
|
|
318
|
+
exports.h2ComponentRenderer = (0, renderers_1.createComponentRenderer)(H2, exports.H2Md, ({ node, extractValue, className, renderChild, registerComponentApi }) => {
|
|
269
319
|
return renderHeading({
|
|
270
320
|
node,
|
|
271
321
|
extractValue,
|
|
272
322
|
className,
|
|
273
323
|
level: "h2",
|
|
274
324
|
renderChild,
|
|
325
|
+
registerComponentApi,
|
|
275
326
|
});
|
|
276
327
|
});
|
|
277
|
-
exports.h3ComponentRenderer = (0, renderers_1.createComponentRenderer)(H3, exports.H3Md, ({ node, extractValue, className, renderChild }) => {
|
|
328
|
+
exports.h3ComponentRenderer = (0, renderers_1.createComponentRenderer)(H3, exports.H3Md, ({ node, extractValue, className, renderChild, registerComponentApi }) => {
|
|
278
329
|
return renderHeading({
|
|
279
330
|
node,
|
|
280
331
|
extractValue,
|
|
281
332
|
className,
|
|
282
333
|
level: "h3",
|
|
283
334
|
renderChild,
|
|
335
|
+
registerComponentApi,
|
|
284
336
|
});
|
|
285
337
|
});
|
|
286
|
-
exports.h4ComponentRenderer = (0, renderers_1.createComponentRenderer)(H4, exports.H4Md, ({ node, extractValue, className, renderChild }) => {
|
|
338
|
+
exports.h4ComponentRenderer = (0, renderers_1.createComponentRenderer)(H4, exports.H4Md, ({ node, extractValue, className, renderChild, registerComponentApi }) => {
|
|
287
339
|
return renderHeading({
|
|
288
340
|
node,
|
|
289
341
|
extractValue,
|
|
290
342
|
className,
|
|
291
343
|
level: "h4",
|
|
292
344
|
renderChild,
|
|
345
|
+
registerComponentApi,
|
|
293
346
|
});
|
|
294
347
|
});
|
|
295
|
-
exports.h5ComponentRenderer = (0, renderers_1.createComponentRenderer)(H5, exports.H5Md, ({ node, extractValue, className, renderChild }) => {
|
|
348
|
+
exports.h5ComponentRenderer = (0, renderers_1.createComponentRenderer)(H5, exports.H5Md, ({ node, extractValue, className, renderChild, registerComponentApi }) => {
|
|
296
349
|
return renderHeading({
|
|
297
350
|
node,
|
|
298
351
|
extractValue,
|
|
299
352
|
className,
|
|
300
353
|
level: "h5",
|
|
301
354
|
renderChild,
|
|
355
|
+
registerComponentApi,
|
|
302
356
|
});
|
|
303
357
|
});
|
|
304
|
-
exports.h6ComponentRenderer = (0, renderers_1.createComponentRenderer)(H6, exports.H6Md, ({ node, extractValue, className, renderChild }) => {
|
|
358
|
+
exports.h6ComponentRenderer = (0, renderers_1.createComponentRenderer)(H6, exports.H6Md, ({ node, extractValue, className, renderChild, registerComponentApi }) => {
|
|
305
359
|
return renderHeading({
|
|
306
360
|
node,
|
|
307
361
|
extractValue,
|
|
308
362
|
className,
|
|
309
363
|
level: "h6",
|
|
310
364
|
renderChild,
|
|
365
|
+
registerComponentApi,
|
|
311
366
|
});
|
|
312
367
|
});
|
|
@@ -31,6 +31,7 @@ exports.defaultProps = {
|
|
|
31
31
|
omitFromToc: false,
|
|
32
32
|
maxLines: 0,
|
|
33
33
|
preserveLinebreaks: false,
|
|
34
|
+
showAnchor: false,
|
|
34
35
|
};
|
|
35
36
|
exports.Heading = (0, react_1.forwardRef)(function Heading(_a, forwardedRef) {
|
|
36
37
|
var _b, _c;
|
|
@@ -51,11 +52,19 @@ exports.Heading = (0, react_1.forwardRef)(function Heading(_a, forwardedRef) {
|
|
|
51
52
|
elementRef.current.scrollIntoView(Object.assign({ behavior: 'smooth', block: 'start' }, options));
|
|
52
53
|
}
|
|
53
54
|
}, []);
|
|
55
|
+
const hasOverflow = (0, react_1.useCallback)(() => {
|
|
56
|
+
if (elementRef.current) {
|
|
57
|
+
const element = elementRef.current;
|
|
58
|
+
return element.scrollWidth > element.clientWidth || element.scrollHeight > element.clientHeight;
|
|
59
|
+
}
|
|
60
|
+
return false;
|
|
61
|
+
}, []);
|
|
54
62
|
(0, react_1.useEffect)(() => {
|
|
55
63
|
registerComponentApi === null || registerComponentApi === void 0 ? void 0 : registerComponentApi({
|
|
56
64
|
scrollIntoView,
|
|
65
|
+
hasOverflow,
|
|
57
66
|
});
|
|
58
|
-
}, [registerComponentApi, scrollIntoView]);
|
|
67
|
+
}, [registerComponentApi, scrollIntoView, hasOverflow]);
|
|
59
68
|
(0, react_1.useEffect)(() => {
|
|
60
69
|
var _a, _b, _c, _d;
|
|
61
70
|
if (elementRef.current) {
|
|
@@ -1336,7 +1336,7 @@ exports.HtmlTrMd = (0, metadata_helpers_1.createMetadata)({
|
|
|
1336
1336
|
isHtmlTag: true,
|
|
1337
1337
|
themeVars: (0, themeVars_1.parseScssVar)(HtmlTags_module_scss_1.default.themeVarsTr),
|
|
1338
1338
|
defaultThemeVars: {
|
|
1339
|
-
"fontSize-HtmlTr": "$fontSize-
|
|
1339
|
+
"fontSize-HtmlTr": "$fontSize-sm",
|
|
1340
1340
|
"backgroundColor-row-HtmlTr": "inherit",
|
|
1341
1341
|
//"backgroundColor-HtmlTr--hover": "$color-primary-50",
|
|
1342
1342
|
},
|
|
@@ -26,7 +26,20 @@ exports.defaultProps = {
|
|
|
26
26
|
};
|
|
27
27
|
exports.Image = (0, react_1.forwardRef)(function Img(_a, ref) {
|
|
28
28
|
var { src, alt, fit = exports.defaultProps.fit, style, className, onClick, aspectRatio, lazyLoad = exports.defaultProps.lazyLoad, inline = exports.defaultProps.inline } = _a, rest = __rest(_a, ["src", "alt", "fit", "style", "className", "onClick", "aspectRatio", "lazyLoad", "inline"]);
|
|
29
|
+
src = safeConvertPropToString(src);
|
|
30
|
+
alt = safeConvertPropToString(alt);
|
|
29
31
|
return ((0, jsx_runtime_1.jsx)("img", Object.assign({}, rest, { src: src, ref: ref, alt: alt, loading: lazyLoad ? "lazy" : "eager", className: (0, classnames_1.default)(Image_module_scss_1.default.img, {
|
|
30
32
|
[Image_module_scss_1.default.clickable]: !!onClick,
|
|
31
33
|
}, className), style: Object.assign(Object.assign(Object.assign({ objectFit: fit, boxShadow: "none" }, style), { flexShrink: 1, aspectRatio: aspectRatio }), (inline ? { display: "inline" } : {})), onClick: onClick })));
|
|
32
34
|
});
|
|
35
|
+
function safeConvertPropToString(prop) {
|
|
36
|
+
if (typeof prop === "string")
|
|
37
|
+
return prop;
|
|
38
|
+
if (prop != null &&
|
|
39
|
+
typeof prop !== "object" &&
|
|
40
|
+
typeof prop !== "function" &&
|
|
41
|
+
!Number.isNaN(prop)) {
|
|
42
|
+
return String(prop);
|
|
43
|
+
}
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -24,7 +35,8 @@ const PartialInput_module_scss_1 = __importDefault(require("./PartialInput.modul
|
|
|
24
35
|
* @param props - PartialInputProps configuration
|
|
25
36
|
* @returns A configured input element with enhanced multi-field input behavior
|
|
26
37
|
*/
|
|
27
|
-
function PartialInput(
|
|
38
|
+
function PartialInput(_a) {
|
|
39
|
+
var { value, placeholder, onChange, onBlur, onKeyDown, emptyCharacter, placeholderLength = 2, max, min, maxLength = 2, validateFn, onBeep, nextInputRef, nextButtonRef, name, ariaLabel, className, invalidClassName, disabled, readOnly, required, autoFocus, inputRef, step = 1, isInvalid = false } = _a, restProps = __rest(_a, ["value", "placeholder", "onChange", "onBlur", "onKeyDown", "emptyCharacter", "placeholderLength", "max", "min", "maxLength", "validateFn", "onBeep", "nextInputRef", "nextButtonRef", "name", "ariaLabel", "className", "invalidClassName", "disabled", "readOnly", "required", "autoFocus", "inputRef", "step", "isInvalid"]);
|
|
28
40
|
/**
|
|
29
41
|
* Process emptyCharacter according to requirements.
|
|
30
42
|
* Handles null/empty values, multi-character strings, and unicode characters.
|
|
@@ -122,9 +134,22 @@ function PartialInput({ value, placeholder, onChange, onBlur, onKeyDown, emptyCh
|
|
|
122
134
|
// Call the enhanced onBlur handler with direction
|
|
123
135
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(direction, event);
|
|
124
136
|
}, [onBlur, nextInputRef, nextButtonRef]);
|
|
125
|
-
|
|
137
|
+
/**
|
|
138
|
+
* Enhanced key down handler that prevents space character input.
|
|
139
|
+
* Filters out space key presses while allowing other keys to pass through.
|
|
140
|
+
*/
|
|
141
|
+
const handleKeyDown = (0, react_1.useCallback)((event) => {
|
|
142
|
+
// Prevent space character input
|
|
143
|
+
if (event.key === " " || event.code === "Space") {
|
|
144
|
+
event.preventDefault();
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
// Call the original onKeyDown handler for other keys
|
|
148
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
|
|
149
|
+
}, [onKeyDown]);
|
|
150
|
+
return ((0, jsx_runtime_1.jsx)("input", Object.assign({}, restProps, { "aria-label": ariaLabel, autoComplete: "off",
|
|
126
151
|
// biome-ignore lint/a11y/noAutofocus: This is up to developers' decision
|
|
127
152
|
autoFocus: autoFocus, className: (0, classnames_1.default)(PartialInput_module_scss_1.default.partialInput, className, {
|
|
128
153
|
[invalidClassName]: isInvalid,
|
|
129
|
-
}), "data-input": "true", disabled: disabled, inputMode: "numeric", max: max, maxLength: maxLength, min: min, name: name, onChange: handleInputChange, onBlur: handleBlur, onFocus: handleInternalFocus, onKeyDown:
|
|
154
|
+
}), "data-input": "true", disabled: disabled, inputMode: "numeric", max: max, maxLength: maxLength, min: min, name: name, onChange: handleInputChange, onBlur: handleBlur, onFocus: handleInternalFocus, onKeyDown: handleKeyDown, placeholder: finalPlaceholder, readOnly: readOnly, ref: inputRef, required: required, step: step, type: "text", value: value !== null ? value : "" })));
|
|
130
155
|
}
|
|
@@ -66,7 +66,6 @@ const constants_1 = require("../../components-core/constants");
|
|
|
66
66
|
const CardNative_1 = require("../Card/CardNative");
|
|
67
67
|
const virtua_1 = require("virtua");
|
|
68
68
|
const hooks_1 = require("../../components-core/utils/hooks");
|
|
69
|
-
const ScrollContext_1 = require("../../components-core/ScrollContext");
|
|
70
69
|
const react_compose_refs_1 = require("@radix-ui/react-compose-refs");
|
|
71
70
|
const List_module_scss_1 = __importDefault(require("./List.module.scss"));
|
|
72
71
|
const classnames_1 = __importDefault(require("classnames"));
|
|
@@ -228,14 +227,16 @@ const useShift = (listData, idKey) => {
|
|
|
228
227
|
return shouldShift.current;
|
|
229
228
|
};
|
|
230
229
|
exports.ListNative = (0, react_1.forwardRef)(function DynamicHeightList(_a, ref) {
|
|
231
|
-
var _b;
|
|
230
|
+
var _b, _c;
|
|
232
231
|
var { items = constants_1.EMPTY_ARRAY, itemRenderer = defaultItemRenderer, sectionRenderer, sectionFooterRenderer, loading, limit, groupBy, orderBy, availableGroups, scrollAnchor = exports.defaultProps.scrollAnchor, requestFetchPrevPage = lodash_es_1.noop, requestFetchNextPage = lodash_es_1.noop, pageInfo, idKey = exports.defaultProps.idKey, style, className, emptyListPlaceholder, groupsInitiallyExpanded = true, defaultGroups = constants_1.EMPTY_ARRAY, registerComponentApi, borderCollapse = exports.defaultProps.borderCollapse } = _a, rest = __rest(_a, ["items", "itemRenderer", "sectionRenderer", "sectionFooterRenderer", "loading", "limit", "groupBy", "orderBy", "availableGroups", "scrollAnchor", "requestFetchPrevPage", "requestFetchNextPage", "pageInfo", "idKey", "style", "className", "emptyListPlaceholder", "groupsInitiallyExpanded", "defaultGroups", "registerComponentApi", "borderCollapse"]);
|
|
233
232
|
const virtualizerRef = (0, react_1.useRef)(null);
|
|
234
|
-
const scrollRef = (0, react_1.useContext)(ScrollContext_1.ScrollContext);
|
|
235
233
|
const parentRef = (0, react_1.useRef)(null);
|
|
236
234
|
const rootRef = ref ? (0, react_compose_refs_1.composeRefs)(parentRef, ref) : parentRef;
|
|
235
|
+
const scrollParent = (0, hooks_1.useScrollParent)((_b = parentRef.current) === null || _b === void 0 ? void 0 : _b.parentElement);
|
|
236
|
+
const scrollRef = (0, react_1.useRef)(scrollParent);
|
|
237
|
+
scrollRef.current = scrollParent;
|
|
237
238
|
const hasHeight = (0, hooks_1.useHasExplicitHeight)(parentRef);
|
|
238
|
-
const hasOutsideScroll = scrollRef && !hasHeight;
|
|
239
|
+
const hasOutsideScroll = scrollRef.current && !hasHeight;
|
|
239
240
|
const scrollElementRef = hasOutsideScroll ? scrollRef : parentRef;
|
|
240
241
|
const shouldStickToBottom = (0, react_1.useRef)(scrollAnchor === "bottom");
|
|
241
242
|
const [expanded, setExpanded] = (0, react_1.useState)(constants_1.EMPTY_OBJECT);
|
|
@@ -384,7 +385,7 @@ exports.ListNative = (0, react_1.forwardRef)(function DynamicHeightList(_a, ref)
|
|
|
384
385
|
// REVIEW: I changed this code line because in the build version rows[index] was undefined
|
|
385
386
|
// const rowTypeContextValue = useCallback((index: number) => rows[index]._row_type, [rows]);
|
|
386
387
|
const rowTypeContextValue = (0, react_1.useCallback)((index) => { var _a; return (_a = rows === null || rows === void 0 ? void 0 : rows[index]) === null || _a === void 0 ? void 0 : _a._row_type; }, [rows]);
|
|
387
|
-
const rowCount = (
|
|
388
|
+
const rowCount = (_c = rows === null || rows === void 0 ? void 0 : rows.length) !== null && _c !== void 0 ? _c : 0;
|
|
388
389
|
const startMargin = (0, hooks_1.useStartMargin)(hasOutsideScroll, parentRef, scrollRef);
|
|
389
390
|
return ((0, jsx_runtime_1.jsx)(ListItemTypeContext.Provider, { value: rowTypeContextValue, children: (0, jsx_runtime_1.jsx)(exports.ListContext.Provider, { value: expandContextValue, children: (0, jsx_runtime_1.jsxs)("div", Object.assign({}, rest, { ref: rootRef, style: style, className: (0, classnames_1.default)(List_module_scss_1.default.outerWrapper, {
|
|
390
391
|
[List_module_scss_1.default.hasOutsideScroll]: hasOutsideScroll,
|
|
@@ -62,7 +62,7 @@ exports.NavLinkMd = (0, metadata_helpers_1.createMetadata)({
|
|
|
62
62
|
[`backgroundColor-${COMP}`]: "transparent",
|
|
63
63
|
[`paddingHorizontal-${COMP}`]: "$space-4",
|
|
64
64
|
[`paddingVertical-${COMP}`]: "$space-2",
|
|
65
|
-
[`fontSize-${COMP}`]: "$fontSize-
|
|
65
|
+
[`fontSize-${COMP}`]: "$fontSize-sm",
|
|
66
66
|
[`fontWeight-${COMP}`]: "$fontWeight-normal",
|
|
67
67
|
[`fontFamily-${COMP}`]: "$fontFamily",
|
|
68
68
|
[`textColor-${COMP}`]: "$textColor-primary",
|
|
@@ -52,10 +52,8 @@ exports.buildNavHierarchy = buildNavHierarchy;
|
|
|
52
52
|
exports.buildLinkMap = buildLinkMap;
|
|
53
53
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
54
54
|
const react_1 = __importStar(require("react"));
|
|
55
|
-
const react_compose_refs_1 = require("@radix-ui/react-compose-refs");
|
|
56
55
|
const classnames_1 = __importDefault(require("classnames"));
|
|
57
56
|
const NavPanel_module_scss_1 = __importDefault(require("./NavPanel.module.scss"));
|
|
58
|
-
const ScrollContext_1 = require("../../components-core/ScrollContext");
|
|
59
57
|
const LogoNative_1 = require("../Logo/LogoNative");
|
|
60
58
|
const AppLayoutContext_1 = require("../App/AppLayoutContext");
|
|
61
59
|
const AppNative_1 = require("../App/AppNative");
|
|
@@ -193,14 +191,11 @@ const contextValue = {
|
|
|
193
191
|
};
|
|
194
192
|
function DrawerNavPanel(_a) {
|
|
195
193
|
var { logoContent, children, className, style } = _a, rest = __rest(_a, ["logoContent", "children", "className", "style"]);
|
|
196
|
-
|
|
197
|
-
return ((0, jsx_runtime_1.jsx)(exports.NavPanelContext.Provider, { value: contextValue, children: (0, jsx_runtime_1.jsx)("div", Object.assign({}, rest, { ref: scrollContainerRef, className: (0, classnames_1.default)(NavPanel_module_scss_1.default.wrapper, className), style: style, children: (0, jsx_runtime_1.jsxs)(ScrollContext_1.ScrollContext.Provider, { value: scrollContainerRef, children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(NavPanel_module_scss_1.default.logoWrapper, NavPanel_module_scss_1.default.inDrawer), children: logoContent || (0, jsx_runtime_1.jsx)(LogoNative_1.Logo, {}) }), (0, jsx_runtime_1.jsx)("div", { className: NavPanel_module_scss_1.default.wrapperInner, style: style, children: children })] }) })) }));
|
|
194
|
+
return ((0, jsx_runtime_1.jsx)(exports.NavPanelContext.Provider, { value: contextValue, children: (0, jsx_runtime_1.jsxs)("div", Object.assign({}, rest, { className: (0, classnames_1.default)(NavPanel_module_scss_1.default.wrapper, className), style: style, children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(NavPanel_module_scss_1.default.logoWrapper, NavPanel_module_scss_1.default.inDrawer), children: logoContent || (0, jsx_runtime_1.jsx)(LogoNative_1.Logo, {}) }), (0, jsx_runtime_1.jsx)("div", { className: NavPanel_module_scss_1.default.wrapperInner, style: style, children: children })] })) }));
|
|
198
195
|
}
|
|
199
196
|
exports.NavPanel = (0, react_1.forwardRef)(function NavPanel(_a, forwardedRef) {
|
|
200
197
|
var _b, _c;
|
|
201
198
|
var { children, style, logoContent, className, inDrawer = exports.defaultProps.inDrawer, renderChild, navLinks } = _a, rest = __rest(_a, ["children", "style", "logoContent", "className", "inDrawer", "renderChild", "navLinks"]);
|
|
202
|
-
const scrollContainerRef = (0, react_1.useRef)(null);
|
|
203
|
-
const ref = forwardedRef ? (0, react_compose_refs_1.composeRefs)(scrollContainerRef, forwardedRef) : scrollContainerRef;
|
|
204
199
|
const appLayoutContext = (0, AppLayoutContext_1.useAppLayoutContext)();
|
|
205
200
|
const linkInfoContext = (0, LinkInfoContext_1.useLinkInfoContext)();
|
|
206
201
|
const horizontal = (0, AppNative_1.getAppLayoutOrientation)(appLayoutContext === null || appLayoutContext === void 0 ? void 0 : appLayoutContext.layout) === "horizontal";
|
|
@@ -219,9 +214,9 @@ exports.NavPanel = (0, react_1.forwardRef)(function NavPanel(_a, forwardedRef) {
|
|
|
219
214
|
if (inDrawer) {
|
|
220
215
|
return ((0, jsx_runtime_1.jsx)(DrawerNavPanel, Object.assign({}, rest, { style: style, logoContent: safeLogoContent, className: className, children: children })));
|
|
221
216
|
}
|
|
222
|
-
return ((0, jsx_runtime_1.
|
|
217
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({}, rest, { ref: forwardedRef, className: (0, classnames_1.default)(NavPanel_module_scss_1.default.wrapper, className, {
|
|
223
218
|
[NavPanel_module_scss_1.default.horizontal]: horizontal,
|
|
224
219
|
[NavPanel_module_scss_1.default.vertical]: vertical,
|
|
225
220
|
[NavPanel_module_scss_1.default.condensed]: isCondensed,
|
|
226
|
-
}), style: style, children:
|
|
221
|
+
}), style: style, children: [showLogo && ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(NavPanel_module_scss_1.default.logoWrapper), children: safeLogoContent || (0, jsx_runtime_1.jsx)(LogoNative_1.Logo, {}) })), (0, jsx_runtime_1.jsx)("div", { className: NavPanel_module_scss_1.default.wrapperInner, style: style, children: children })] })));
|
|
227
222
|
});
|
|
@@ -321,9 +321,9 @@ exports.NumberBox = (0, react_1.forwardRef)(function NumberBox(_a, forwardedRef)
|
|
|
321
321
|
}), tabIndex: -1, onFocus: () => {
|
|
322
322
|
var _a;
|
|
323
323
|
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
324
|
-
}, style: { gap }, children: [(0, jsx_runtime_1.jsx)(InputAdornment_1.Adornment, { text: startText, iconName: startIcon, className: (0, classnames_1.default)(
|
|
324
|
+
}, style: { gap }, children: [(0, jsx_runtime_1.jsx)(InputAdornment_1.Adornment, { "data-part-id": parts_1.PART_START_ADORNMENT, text: startText, iconName: startIcon, className: (0, classnames_1.default)(NumberBox_module_scss_1.default.adornment) }), (0, jsx_runtime_1.jsx)("input", { id: id, "data-part-id": parts_1.PART_INPUT, type: "text", inputMode: "numeric", className: (0, classnames_1.default)(NumberBox_module_scss_1.default.input, {
|
|
325
325
|
[NumberBox_module_scss_1.default.readOnly]: readOnly,
|
|
326
|
-
}), disabled: !enabled, value: valueStrRep, step: step, placeholder: placeholder, onChange: onInputChange, onFocus: handleOnFocus, onBlur: handleOnBlur, onBeforeInput: handleOnBeforeInput, onKeyDown: handleOnKey, readOnly: readOnly, ref: inputRef, autoFocus: autoFocus, maxLength: maxLength, required: required }), (0, jsx_runtime_1.jsx)(InputAdornment_1.Adornment, { text: endText, iconName: endIcon, className: (0, classnames_1.default)(
|
|
326
|
+
}), disabled: !enabled, value: valueStrRep, step: step, placeholder: placeholder, onChange: onInputChange, onFocus: handleOnFocus, onBlur: handleOnBlur, onBeforeInput: handleOnBeforeInput, onKeyDown: handleOnKey, readOnly: readOnly, ref: inputRef, autoFocus: autoFocus, maxLength: maxLength, required: required }), (0, jsx_runtime_1.jsx)(InputAdornment_1.Adornment, { "data-part-id": parts_1.PART_END_ADORNMENT, text: endText, iconName: endIcon, className: (0, classnames_1.default)(NumberBox_module_scss_1.default.adornment) }), hasSpinBox && ((0, jsx_runtime_1.jsxs)("div", { className: NumberBox_module_scss_1.default.spinnerBox, children: [(0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { "data-spinner": "up", type: "button", role: "spinbutton", variant: "ghost", themeColor: "secondary", tabIndex: -1, className: NumberBox_module_scss_1.default.spinnerButton, disabled: !enabled || readOnly, ref: upButton, children: (0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: spinnerUpIcon || "spinnerUp:NumberBox", fallback: "chevronup", size: "sm" }) }), (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { "data-spinner": "down", type: "button", role: "spinbutton", tabIndex: -1, variant: "ghost", themeColor: "secondary", className: NumberBox_module_scss_1.default.spinnerButton, disabled: !enabled || readOnly, ref: downButton, children: (0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: spinnerDownIcon || "spinnerDown:NumberBox", fallback: "chevrondown", size: "sm" }) })] }))] }) })));
|
|
327
327
|
});
|
|
328
328
|
function applyStep(valueStrRep, step, min, max, integersOnly) {
|
|
329
329
|
const currentValue = (0, numberbox_abstractions_1.toUsableNumber)(valueStrRep, integersOnly);
|
|
@@ -30,13 +30,13 @@ exports.OptionMd = (0, metadata_helpers_1.createMetadata)({
|
|
|
30
30
|
exports.optionComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.OptionMd, ({ node, extractValue, className, renderChild, layoutContext }) => {
|
|
31
31
|
var _a, _b;
|
|
32
32
|
const label = extractValue.asOptionalString(node.props.label);
|
|
33
|
-
|
|
33
|
+
let value = extractValue(node.props.value);
|
|
34
34
|
if (label === undefined && value === undefined) {
|
|
35
35
|
return null;
|
|
36
36
|
}
|
|
37
37
|
const hasTextNodeChild = ((_a = node.children) === null || _a === void 0 ? void 0 : _a.length) === 1 && (node.children[0].type === "TextNode" || node.children[0].type === "TextNodeCData");
|
|
38
38
|
const textNodeChild = hasTextNodeChild ? renderChild(node.children) : undefined;
|
|
39
|
-
return ((0, jsx_runtime_1.jsx)(OptionNative_1.OptionNative, { label: label || textNodeChild, value: value
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)(OptionNative_1.OptionNative, { label: label || textNodeChild, value: value !== undefined && value !== "" ? value : label, enabled: extractValue.asOptionalBoolean(node.props.enabled), className: className, optionRenderer: ((_b = node.children) === null || _b === void 0 ? void 0 : _b.length) > 0
|
|
40
40
|
? !hasTextNodeChild ? (contextVars) => ((0, jsx_runtime_1.jsx)(container_helpers_1.MemoizedItem, { node: node.children, renderChild: renderChild, contextVars: contextVars, layoutContext: layoutContext })) : undefined
|
|
41
41
|
: undefined, children: !hasTextNodeChild && renderChild(node.children) }));
|
|
42
42
|
});
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OptionNative = exports.defaultProps = void 0;
|
|
4
|
+
exports.convertOptionValue = convertOptionValue;
|
|
4
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
6
|
const react_1 = require("react");
|
|
6
7
|
const OptionTypeProvider_1 = require("./OptionTypeProvider");
|
|
7
8
|
// Default props for Option component
|
|
8
9
|
exports.defaultProps = {
|
|
9
|
-
enabled: true
|
|
10
|
+
enabled: true,
|
|
10
11
|
};
|
|
12
|
+
function convertOptionValue(value) {
|
|
13
|
+
if (typeof value !== "string" &&
|
|
14
|
+
(typeof value !== "number" ||
|
|
15
|
+
(typeof value === "number" && isNaN(value))) &&
|
|
16
|
+
typeof value !== "boolean" &&
|
|
17
|
+
value !== null) {
|
|
18
|
+
return "";
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
11
22
|
exports.OptionNative = (0, react_1.memo)((props) => {
|
|
12
23
|
const OptionType = (0, OptionTypeProvider_1.useOptionType)();
|
|
13
24
|
if (!OptionType) {
|
|
@@ -23,7 +23,8 @@ exports.PaginationMd = (0, metadata_helpers_1.createMetadata)({
|
|
|
23
23
|
"that are enabled/disabled using the `hasPrevPage` and `hasNextPage` props.", undefined, "number"),
|
|
24
24
|
pageSize: (0, metadata_helpers_1.d)("Number of items per page", undefined, "number", PaginationNative_1.defaultProps.pageSize),
|
|
25
25
|
pageIndex: (0, metadata_helpers_1.d)("Current page index (0-based)", undefined, "number", PaginationNative_1.defaultProps.pageIndex),
|
|
26
|
-
maxVisiblePages: (0, metadata_helpers_1.d)("Maximum number of page buttons to display
|
|
26
|
+
maxVisiblePages: (0, metadata_helpers_1.d)("Maximum number of page buttons to display. " +
|
|
27
|
+
"If the value is not among the allowed values, it will fall back to the default.", PaginationNative_1.PageNumberValues, "number", PaginationNative_1.defaultProps.maxVisiblePages),
|
|
27
28
|
showPageInfo: (0, metadata_helpers_1.d)("Whether to show page information", undefined, "boolean", PaginationNative_1.defaultProps.showPageInfo),
|
|
28
29
|
showPageSizeSelector: (0, metadata_helpers_1.d)("Whether to show the page size selector", undefined, "boolean", PaginationNative_1.defaultProps.showPageSizeSelector),
|
|
29
30
|
showCurrentPage: (0, metadata_helpers_1.d)("Whether to show the current page indicator", undefined, "boolean", PaginationNative_1.defaultProps.showCurrentPage),
|
|
@@ -17,7 +17,11 @@ exports.RadioGroupMd = (0, metadata_helpers_1.createMetadata)({
|
|
|
17
17
|
description: "`RadioGroup` creates a mutually exclusive selection interface where users can " +
|
|
18
18
|
"choose only one option from a group of radio buttons. It manages the selection " +
|
|
19
19
|
"state and ensures that selecting one option automatically deselects all others in " +
|
|
20
|
-
"the group."
|
|
20
|
+
"the group." +
|
|
21
|
+
"\n\n" +
|
|
22
|
+
"Radio options store their values as strings. Numbers and booleans are converted to strings " +
|
|
23
|
+
"when assigned, while objects, functions and arrays default to an empty string unless resolved " +
|
|
24
|
+
"via binding expressions.",
|
|
21
25
|
props: {
|
|
22
26
|
initialValue: Object.assign(Object.assign({}, (0, metadata_helpers_1.dInitialValue)()), { defaultValue: RadioGroupNative_1.defaultProps.initialValue }),
|
|
23
27
|
autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
|
|
@@ -52,10 +56,10 @@ exports.RadioGroupMd = (0, metadata_helpers_1.createMetadata)({
|
|
|
52
56
|
[`backgroundColor-${RGOption}--disabled`]: "$backgroundColor--disabled",
|
|
53
57
|
[`backgroundColor-checked-${RGOption}`]: "$color-primary-500",
|
|
54
58
|
[`backgroundColor-checked-${RGOption}--disabled`]: `$textColor--disabled`,
|
|
55
|
-
[`fontSize-${RGOption}`]: "$fontSize-
|
|
59
|
+
[`fontSize-${RGOption}`]: "$fontSize-sm",
|
|
56
60
|
[`fontWeight-${RGOption}`]: "$fontWeight-bold",
|
|
57
61
|
},
|
|
58
62
|
});
|
|
59
63
|
exports.radioGroupRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.RadioGroupMd, ({ node, extractValue, className, state, updateState, lookupEventHandler, renderChild, registerComponentApi, }) => {
|
|
60
|
-
return ((0, jsx_runtime_1.jsx)(RadioGroupNative_1.RadioGroup, { enabled: extractValue.asOptionalBoolean(node.props.enabled), className: className, initialValue: extractValue(node.props.initialValue), value: state === null || state === void 0 ? void 0 : state.value, updateState: updateState, validationStatus: extractValue(node.props.validationStatus), onDidChange: lookupEventHandler("didChange"), onFocus: lookupEventHandler("gotFocus"), onBlur: lookupEventHandler("lostFocus"), registerComponentApi: registerComponentApi, label: extractValue.asOptionalString(node.props.label), labelPosition: extractValue(node.props.labelPosition), labelWidth: extractValue(node.props.labelWidth), labelBreak: extractValue(node.props.labelBreak), required: extractValue.asOptionalBoolean(node.props.required), children: renderChild(node.children) }));
|
|
64
|
+
return ((0, jsx_runtime_1.jsx)(RadioGroupNative_1.RadioGroup, { autofocus: extractValue.asOptionalBoolean(node.props.autoFocus), enabled: extractValue.asOptionalBoolean(node.props.enabled), className: className, initialValue: extractValue(node.props.initialValue), value: state === null || state === void 0 ? void 0 : state.value, updateState: updateState, validationStatus: extractValue(node.props.validationStatus), onDidChange: lookupEventHandler("didChange"), onFocus: lookupEventHandler("gotFocus"), onBlur: lookupEventHandler("lostFocus"), registerComponentApi: registerComponentApi, label: extractValue.asOptionalString(node.props.label), labelPosition: extractValue(node.props.labelPosition), labelWidth: extractValue(node.props.labelWidth), labelBreak: extractValue(node.props.labelBreak), required: extractValue.asOptionalBoolean(node.props.required), readOnly: extractValue.asOptionalBoolean(node.props.readOnly), children: renderChild(node.children) }));
|
|
61
65
|
});
|