@react-typed-forms/schemas-rn 2.2.1 → 2.2.3
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/lib/StdComponents.d.ts +4 -0
- package/lib/createDefaultRNRenderers.d.ts +2 -6
- package/lib/defaultTailwindTheme.d.ts +1 -0
- package/lib/index.cjs +89 -90
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +92 -94
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { HtmlDivProperties } from "@react-typed-forms/schemas";
|
|
2
|
+
export declare function RNDiv({ className, html, children, textClass, text, style, inline, role, selectable, ...props }: HtmlDivProperties & {
|
|
3
|
+
selectable?: boolean;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { DefaultRendererOptions, DefaultDataRendererOptions, DefaultLabelRendererOptions, DefaultAdornmentRendererOptions } from "./rendererOptions";
|
|
1
|
+
import { AdornmentRendererRegistration, DataRendererRegistration, DefaultRenderers, HtmlComponents, LabelRendererRegistration } from "@react-typed-forms/schemas";
|
|
2
|
+
import { DefaultAdornmentRendererOptions, DefaultDataRendererOptions, DefaultLabelRendererOptions, DefaultRendererOptions } from "./rendererOptions";
|
|
4
3
|
export declare function createDefaultDataRenderer(options?: DefaultDataRendererOptions): DataRendererRegistration;
|
|
5
4
|
export declare function createDefaultAdornmentRenderer(options?: DefaultAdornmentRendererOptions): AdornmentRendererRegistration;
|
|
6
5
|
export declare function createDefaultLabelRenderer(options?: DefaultLabelRendererOptions): LabelRendererRegistration;
|
|
7
|
-
export declare function RNDiv({ className, html, children, textClass, text, style, inline, role, noSelection, ...props }: HtmlDivProperties & {
|
|
8
|
-
noSelection?: boolean | null;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
10
6
|
export declare const ReactNativeHtmlComponents: HtmlComponents;
|
|
11
7
|
export declare function createDefaultRenderers(options?: DefaultRendererOptions): DefaultRenderers;
|
package/lib/index.cjs
CHANGED
|
@@ -94,6 +94,7 @@ var defaultTailwindTheme = {
|
|
|
94
94
|
buttonClass: "rounded-lg p-3 text-white disabled:opacity-75",
|
|
95
95
|
primaryClass: "bg-primary-500",
|
|
96
96
|
secondaryClass: "bg-secondary-500",
|
|
97
|
+
linkTextClass: "text-primary-500 underline",
|
|
97
98
|
iconBeforeClass: "px-2",
|
|
98
99
|
iconAfterClass: "px-2",
|
|
99
100
|
busyIcon: schemas.fontAwesomeIcon("spinner fa-spin")
|
|
@@ -106,7 +107,7 @@ var defaultTailwindTheme = {
|
|
|
106
107
|
inputClass: "border rounded p-2",
|
|
107
108
|
displayOnlyClass: "flex flex-row items-center gap-2",
|
|
108
109
|
checkOptions: {
|
|
109
|
-
className: "flex
|
|
110
|
+
className: "flex gap-4",
|
|
110
111
|
entryClass: "flex items-center gap-1"
|
|
111
112
|
},
|
|
112
113
|
selectOptions: {
|
|
@@ -147,7 +148,7 @@ var defaultRnTailwindTheme = schemas.deepMerge({
|
|
|
147
148
|
data: {
|
|
148
149
|
checkOptions: {
|
|
149
150
|
entryClass: "flex flex-row items-center gap-[8px]",
|
|
150
|
-
labelClass: "
|
|
151
|
+
labelClass: "body shrink"
|
|
151
152
|
},
|
|
152
153
|
selectOptions: {
|
|
153
154
|
emptyText: "select"
|
|
@@ -205,13 +206,13 @@ function cn() {
|
|
|
205
206
|
return tailwindMerge.twMerge(clsx.clsx([].slice.call(arguments)));
|
|
206
207
|
}
|
|
207
208
|
|
|
208
|
-
var _excluded$
|
|
209
|
+
var _excluded$e = ["className", "asChild"];
|
|
209
210
|
var TextClassContext = /*#__PURE__*/React__namespace.createContext(undefined);
|
|
210
211
|
var RNText = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
211
212
|
var className = _ref.className,
|
|
212
213
|
_ref$asChild = _ref.asChild,
|
|
213
214
|
asChild = _ref$asChild === void 0 ? false : _ref$asChild,
|
|
214
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
215
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
215
216
|
var textClass = React__namespace.useContext(TextClassContext);
|
|
216
217
|
var Component = asChild ? Slot__namespace.Text : reactNative.Text;
|
|
217
218
|
return jsxRuntime.jsx(Component, _extends({
|
|
@@ -221,7 +222,7 @@ var RNText = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
|
221
222
|
});
|
|
222
223
|
RNText.displayName = "RNText";
|
|
223
224
|
|
|
224
|
-
var _excluded$
|
|
225
|
+
var _excluded$d = ["className", "variant", "size"];
|
|
225
226
|
var buttonVariants = classVarianceAuthority.cva("group flex items-center justify-center rounded-md web:ring-offset-background web:transition-colors web:focus-visible:outline-none web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2", {
|
|
226
227
|
variants: {
|
|
227
228
|
variant: {
|
|
@@ -270,7 +271,7 @@ var RNButton$1 = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
|
270
271
|
var className = _ref.className,
|
|
271
272
|
variant = _ref.variant,
|
|
272
273
|
size = _ref.size,
|
|
273
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
274
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
274
275
|
return jsxRuntime.jsx(TextClassContext.Provider, {
|
|
275
276
|
value: buttonTextVariants({
|
|
276
277
|
variant: variant,
|
|
@@ -326,7 +327,7 @@ function Icon(_ref) {
|
|
|
326
327
|
}
|
|
327
328
|
}
|
|
328
329
|
|
|
329
|
-
var _excluded$
|
|
330
|
+
var _excluded$c = ["className"];
|
|
330
331
|
function createRNCheckboxRenderer(options) {
|
|
331
332
|
if (options === void 0) {
|
|
332
333
|
options = {};
|
|
@@ -382,7 +383,7 @@ function CheckBoxRenderer(_ref) {
|
|
|
382
383
|
}
|
|
383
384
|
var RNCheckbox = /*#__PURE__*/React__namespace.forwardRef(function (_ref2, ref) {
|
|
384
385
|
var className = _ref2.className,
|
|
385
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
386
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$c);
|
|
386
387
|
return jsxRuntime.jsx(CheckboxPrimitive__namespace.Root, _extends({
|
|
387
388
|
ref: ref,
|
|
388
389
|
className: cn("web:peer h-4 w-4 native:h-[24px] native:w-[24px] shrink-0 rounded-sm native:rounded border border-accent web:ring-offset-background web:focus-visible:outline-none web:focus-visible:ring-2 web:focus-visible:ring-ring web:focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className)
|
|
@@ -401,14 +402,14 @@ var RNCheckbox = /*#__PURE__*/React__namespace.forwardRef(function (_ref2, ref)
|
|
|
401
402
|
});
|
|
402
403
|
RNCheckbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
403
404
|
|
|
404
|
-
var _excluded$
|
|
405
|
+
var _excluded$b = ["renderOptions", "control", "readonly"],
|
|
405
406
|
_excluded2$5 = ["className", "placeholderClassName"];
|
|
406
407
|
function createRNTextInputRenderer(inputClass, inputTextClass) {
|
|
407
408
|
return schemas.createDataRenderer(function (p) {
|
|
408
409
|
var renderOptions = p.renderOptions,
|
|
409
410
|
control = p.control,
|
|
410
411
|
readonly = p.readonly,
|
|
411
|
-
rest = _objectWithoutPropertiesLoose(p, _excluded$
|
|
412
|
+
rest = _objectWithoutPropertiesLoose(p, _excluded$b);
|
|
412
413
|
var _formControlProps = core.formControlProps(control),
|
|
413
414
|
disabled = _formControlProps.disabled;
|
|
414
415
|
var placeholder = renderOptions.placeholder,
|
|
@@ -452,7 +453,7 @@ function RNTextInput(_ref) {
|
|
|
452
453
|
}
|
|
453
454
|
RNTextInput.displayName = "RNInput";
|
|
454
455
|
|
|
455
|
-
var _excluded$
|
|
456
|
+
var _excluded$a = ["control", "mode", "locale", "is24Hour", "className"];
|
|
456
457
|
function createRNDateTimePickerRenderer(options) {
|
|
457
458
|
if (options === void 0) {
|
|
458
459
|
options = {};
|
|
@@ -538,7 +539,7 @@ function RNDateTimePicker(_ref) {
|
|
|
538
539
|
_ref$is24Hour = _ref.is24Hour,
|
|
539
540
|
is24Hour = _ref$is24Hour === void 0 ? true : _ref$is24Hour,
|
|
540
541
|
className = _ref.className,
|
|
541
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
542
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
542
543
|
var disabled = control.disabled;
|
|
543
544
|
var maximumDate = props.maximumDate,
|
|
544
545
|
minimumDate = props.minimumDate;
|
|
@@ -601,7 +602,7 @@ function RNDateTimePicker(_ref) {
|
|
|
601
602
|
}
|
|
602
603
|
}
|
|
603
604
|
|
|
604
|
-
var _excluded$
|
|
605
|
+
var _excluded$9 = ["className", "html", "style", "contentWidth", "noSelection"];
|
|
605
606
|
function RNHtmlRenderer(_ref) {
|
|
606
607
|
var _effect = core.useComponentTracking();
|
|
607
608
|
try {
|
|
@@ -610,7 +611,7 @@ function RNHtmlRenderer(_ref) {
|
|
|
610
611
|
style = _ref.style,
|
|
611
612
|
contentWidth = _ref.contentWidth,
|
|
612
613
|
noSelection = _ref.noSelection,
|
|
613
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
614
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
614
615
|
if (!html) return;
|
|
615
616
|
var source = {
|
|
616
617
|
html: html
|
|
@@ -631,12 +632,12 @@ function RNHtmlRenderer(_ref) {
|
|
|
631
632
|
}
|
|
632
633
|
}
|
|
633
634
|
|
|
634
|
-
var _excluded$
|
|
635
|
+
var _excluded$8 = ["className", "checked", "onChange"];
|
|
635
636
|
var RNRadioItem = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
636
637
|
var className = _ref.className,
|
|
637
638
|
checked = _ref.checked,
|
|
638
639
|
onChange = _ref.onChange,
|
|
639
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
640
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
640
641
|
return jsxRuntime.jsx(reactNative.Pressable, _extends({
|
|
641
642
|
ref: ref,
|
|
642
643
|
onPress: onChange,
|
|
@@ -669,10 +670,10 @@ function createSelectConversion(ft) {
|
|
|
669
670
|
}
|
|
670
671
|
}
|
|
671
672
|
|
|
672
|
-
var _excluded$
|
|
673
|
+
var _excluded$7 = ["state", "options", "className", "convert", "required", "emptyText", "requiredText", "portalHost", "readonly"],
|
|
673
674
|
_excluded2$4 = ["ref", "className", "children"],
|
|
674
675
|
_excluded3$2 = ["className", "children", "position", "portalHost"],
|
|
675
|
-
_excluded4$
|
|
676
|
+
_excluded4$1 = ["className"],
|
|
676
677
|
_excluded5 = ["className", "children"];
|
|
677
678
|
function createRNSelectRenderer(options) {
|
|
678
679
|
if (options === void 0) {
|
|
@@ -720,7 +721,7 @@ function RNSelectRenderer(_ref) {
|
|
|
720
721
|
requiredText = _ref$requiredText === void 0 ? "Please select" : _ref$requiredText,
|
|
721
722
|
portalHost = _ref.portalHost,
|
|
722
723
|
readonly = _ref.readonly,
|
|
723
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
724
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
724
725
|
var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
725
726
|
var contentInsets = {
|
|
726
727
|
top: insets.top,
|
|
@@ -871,7 +872,7 @@ var SelectContent = /*#__PURE__*/React__namespace.forwardRef(function (_ref3, re
|
|
|
871
872
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
872
873
|
var SelectLabel = /*#__PURE__*/React__namespace.forwardRef(function (_ref4, ref) {
|
|
873
874
|
var className = _ref4.className,
|
|
874
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded4$
|
|
875
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded4$1);
|
|
875
876
|
return jsxRuntime.jsx(SelectPrimitive__namespace.Label, _extends({
|
|
876
877
|
ref: ref,
|
|
877
878
|
className: cn("py-1.5 native:pb-2 pl-2 native:pl-2 pr-2 text-popover-foreground text-sm native:text-base font-semibold", className)
|
|
@@ -900,10 +901,10 @@ var SelectItem = /*#__PURE__*/React__namespace.forwardRef(function (_ref5, ref)
|
|
|
900
901
|
});
|
|
901
902
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
902
903
|
|
|
903
|
-
var _excluded$
|
|
904
|
+
var _excluded$6 = ["className"],
|
|
904
905
|
_excluded2$3 = ["className", "children"],
|
|
905
906
|
_excluded3$1 = ["className", "children", "portalHost", "closeOnOutsidePress"],
|
|
906
|
-
_excluded4
|
|
907
|
+
_excluded4 = ["className"];
|
|
907
908
|
var Dialog = DialogPrimitive__namespace.Root;
|
|
908
909
|
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
909
910
|
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
@@ -912,7 +913,7 @@ function DialogOverlayWeb(_ref) {
|
|
|
912
913
|
var _effect = core.useComponentTracking();
|
|
913
914
|
try {
|
|
914
915
|
var className = _ref.className,
|
|
915
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
916
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
916
917
|
var _DialogPrimitive$useR = DialogPrimitive__namespace.useRootContext(),
|
|
917
918
|
open = _DialogPrimitive$useR.open;
|
|
918
919
|
return jsxRuntime.jsx(DialogPrimitive__namespace.Overlay, _extends({
|
|
@@ -970,7 +971,7 @@ var DialogContent = /*#__PURE__*/React__namespace.forwardRef(function (_ref3, re
|
|
|
970
971
|
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
971
972
|
var DialogTitle = /*#__PURE__*/React__namespace.forwardRef(function (_ref4, ref) {
|
|
972
973
|
var className = _ref4.className,
|
|
973
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded4
|
|
974
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
974
975
|
return jsxRuntime.jsx(DialogPrimitive__namespace.Title, _extends({
|
|
975
976
|
ref: ref,
|
|
976
977
|
className: cn(className)
|
|
@@ -1148,6 +1149,58 @@ function RNScrollListRenderer(_ref) {
|
|
|
1148
1149
|
}
|
|
1149
1150
|
}
|
|
1150
1151
|
|
|
1152
|
+
var _excluded$5 = ["className", "html", "children", "textClass", "text", "style", "inline", "role", "selectable"];
|
|
1153
|
+
function RNDiv(_ref) {
|
|
1154
|
+
var _effect = core.useComponentTracking();
|
|
1155
|
+
try {
|
|
1156
|
+
var className = _ref.className,
|
|
1157
|
+
html = _ref.html,
|
|
1158
|
+
children = _ref.children,
|
|
1159
|
+
textClass = _ref.textClass,
|
|
1160
|
+
text = _ref.text,
|
|
1161
|
+
style = _ref.style,
|
|
1162
|
+
inline = _ref.inline,
|
|
1163
|
+
role = _ref.role,
|
|
1164
|
+
selectable = _ref.selectable,
|
|
1165
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
1166
|
+
if (html != null) {
|
|
1167
|
+
return jsxRuntime.jsx(RNHtmlRenderer, _extends({}, props, {
|
|
1168
|
+
html: html,
|
|
1169
|
+
noSelection: !selectable
|
|
1170
|
+
}));
|
|
1171
|
+
}
|
|
1172
|
+
if (inline) {
|
|
1173
|
+
return jsxRuntime.jsx(reactNative.Text, {
|
|
1174
|
+
style: style,
|
|
1175
|
+
className: textClass,
|
|
1176
|
+
selectable: selectable,
|
|
1177
|
+
children: text != null ? text : children
|
|
1178
|
+
});
|
|
1179
|
+
}
|
|
1180
|
+
if (text != null) {
|
|
1181
|
+
return jsxRuntime.jsx(reactNative.View, _extends({
|
|
1182
|
+
className: className,
|
|
1183
|
+
style: style,
|
|
1184
|
+
role: role
|
|
1185
|
+
}, props, {
|
|
1186
|
+
children: jsxRuntime.jsx(reactNative.Text, {
|
|
1187
|
+
className: textClass,
|
|
1188
|
+
selectable: selectable,
|
|
1189
|
+
children: text
|
|
1190
|
+
})
|
|
1191
|
+
}));
|
|
1192
|
+
}
|
|
1193
|
+
return jsxRuntime.jsx(reactNative.View, _extends({
|
|
1194
|
+
className: className,
|
|
1195
|
+
style: style,
|
|
1196
|
+
children: children,
|
|
1197
|
+
role: role
|
|
1198
|
+
}, props));
|
|
1199
|
+
} finally {
|
|
1200
|
+
_effect();
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1151
1204
|
var _excluded$4 = ["htmlClassName"];
|
|
1152
1205
|
function createDefaultDisplayRenderer(options) {
|
|
1153
1206
|
if (options === void 0) {
|
|
@@ -1180,8 +1233,7 @@ function DefaultDisplay(_ref) {
|
|
|
1180
1233
|
I = _renderer$html.I,
|
|
1181
1234
|
Div = _renderer$html.Div,
|
|
1182
1235
|
B = _renderer$html.B,
|
|
1183
|
-
H1 = _renderer$html.H1
|
|
1184
|
-
Span = _renderer$html.Span;
|
|
1236
|
+
H1 = _renderer$html.H1;
|
|
1185
1237
|
switch (data.type) {
|
|
1186
1238
|
case schemas.DisplayDataType.Icon:
|
|
1187
1239
|
var iconDisplay = data;
|
|
@@ -1199,7 +1251,7 @@ function DefaultDisplay(_ref) {
|
|
|
1199
1251
|
textClass: schemas.rendererClass(textClass, options.textTextClass),
|
|
1200
1252
|
text: text,
|
|
1201
1253
|
inline: displayProps.inline,
|
|
1202
|
-
|
|
1254
|
+
selectable: !displayProps.noSelection
|
|
1203
1255
|
});
|
|
1204
1256
|
case schemas.DisplayDataType.Html:
|
|
1205
1257
|
var htmlClassName = options.htmlClassName,
|
|
@@ -1378,7 +1430,7 @@ function RNCheckButtons(props) {
|
|
|
1378
1430
|
}
|
|
1379
1431
|
}), jsxRuntime.jsx(Label, {
|
|
1380
1432
|
className: classes.labelClass,
|
|
1381
|
-
textClass: classes.
|
|
1433
|
+
textClass: classes.labelTextClass,
|
|
1382
1434
|
htmlFor: name + "_" + i,
|
|
1383
1435
|
children: o.name
|
|
1384
1436
|
})]
|
|
@@ -1414,7 +1466,7 @@ function DefaultDisplayOnly(_ref) {
|
|
|
1414
1466
|
textClass: textClass,
|
|
1415
1467
|
text: text,
|
|
1416
1468
|
inline: inline,
|
|
1417
|
-
|
|
1469
|
+
selectable: !noSelection
|
|
1418
1470
|
});
|
|
1419
1471
|
} finally {
|
|
1420
1472
|
_effect();
|
|
@@ -2342,18 +2394,18 @@ function createDefaultGroupRenderer(options, adornmentOptions) {
|
|
|
2342
2394
|
},
|
|
2343
2395
|
style = _ref2.style,
|
|
2344
2396
|
gcn = _ref2.className;
|
|
2345
|
-
var Div = renderer.html.Div;
|
|
2346
2397
|
var inline = renderOptions.type == schemas.GroupRenderType.Inline;
|
|
2347
2398
|
var children = formNode.children.map(function (c, i) {
|
|
2348
2399
|
return renderChild(c, {
|
|
2349
2400
|
inline: inline
|
|
2350
2401
|
});
|
|
2351
2402
|
});
|
|
2352
|
-
return jsxRuntime.jsx(
|
|
2403
|
+
return jsxRuntime.jsx(RNDiv, {
|
|
2353
2404
|
className: schemas.rendererClass(props.className, clsx__default["default"](className, gcn)),
|
|
2354
2405
|
textClass: props.textClass,
|
|
2355
2406
|
style: style,
|
|
2356
2407
|
inline: inline,
|
|
2408
|
+
selectable: inline && !props.definition.noSelection,
|
|
2357
2409
|
children: children
|
|
2358
2410
|
});
|
|
2359
2411
|
}
|
|
@@ -2426,8 +2478,7 @@ function createButtonActionRenderer(actionId, options) {
|
|
|
2426
2478
|
var iconPlacement = busyIcon ? busyPlacement : stdIconPlacement;
|
|
2427
2479
|
var _renderer$html = renderer.html,
|
|
2428
2480
|
Button = _renderer$html.Button,
|
|
2429
|
-
I = _renderer$html.I
|
|
2430
|
-
Span = _renderer$html.Span;
|
|
2481
|
+
I = _renderer$html.I;
|
|
2431
2482
|
var isLink = actionStyle == schemas.ActionStyle.Link;
|
|
2432
2483
|
var isGroup = actionStyle == schemas.ActionStyle.Group;
|
|
2433
2484
|
var classNames = schemas.rendererClass(className, isLink ? options.linkClass : isGroup ? options.groupClass : schemas.rendererClass(options.buttonClass, actionStyle == schemas.ActionStyle.Secondary ? options.secondaryClass : options.primaryClass));
|
|
@@ -2437,7 +2488,7 @@ function createButtonActionRenderer(actionId, options) {
|
|
|
2437
2488
|
iconLibrary: icon.library,
|
|
2438
2489
|
className: schemas.rendererClass(textClassNames, iconPlacement == schemas.IconPlacement.BeforeText ? options.iconBeforeClass : options.iconAfterClass)
|
|
2439
2490
|
});
|
|
2440
|
-
var textElement = actionContent != null ? actionContent : actionText && jsxRuntime.jsx(
|
|
2491
|
+
var textElement = actionContent != null ? actionContent : actionText && jsxRuntime.jsx(reactNative.Text, {
|
|
2441
2492
|
className: textClassNames,
|
|
2442
2493
|
children: actionText
|
|
2443
2494
|
});
|
|
@@ -2461,8 +2512,7 @@ function createButtonActionRenderer(actionId, options) {
|
|
|
2461
2512
|
|
|
2462
2513
|
var _excluded = ["inline", "textClass", "children", "notWrapInText", "androidRippleColor", "nonTextContent", "onClick"],
|
|
2463
2514
|
_excluded2 = ["className", "html", "children", "textClass", "text", "style", "inline", "role"],
|
|
2464
|
-
_excluded3 = ["
|
|
2465
|
-
_excluded4 = ["id", "type", "onChangeValue", "onChangeChecked", "checked", "value"];
|
|
2515
|
+
_excluded3 = ["id", "type", "onChangeValue", "onChangeChecked", "checked", "value"];
|
|
2466
2516
|
function createDefaultDataRenderer(options) {
|
|
2467
2517
|
var _options$checkboxOpti, _options$checkboxOpti2, _options$radioOptions, _options$checkListOpt;
|
|
2468
2518
|
if (options === void 0) {
|
|
@@ -2799,58 +2849,8 @@ function RNLabel(_ref7) {
|
|
|
2799
2849
|
_effect4();
|
|
2800
2850
|
}
|
|
2801
2851
|
}
|
|
2802
|
-
function RNDiv(_ref8) {
|
|
2803
|
-
var _effect5 = core.useComponentTracking();
|
|
2804
|
-
try {
|
|
2805
|
-
var className = _ref8.className,
|
|
2806
|
-
html = _ref8.html,
|
|
2807
|
-
children = _ref8.children,
|
|
2808
|
-
textClass = _ref8.textClass,
|
|
2809
|
-
text = _ref8.text,
|
|
2810
|
-
style = _ref8.style,
|
|
2811
|
-
inline = _ref8.inline,
|
|
2812
|
-
role = _ref8.role,
|
|
2813
|
-
noSelection = _ref8.noSelection,
|
|
2814
|
-
props = _objectWithoutPropertiesLoose(_ref8, _excluded3);
|
|
2815
|
-
if (html != null) {
|
|
2816
|
-
return jsxRuntime.jsx(RNHtmlRenderer, _extends({}, props, {
|
|
2817
|
-
html: html,
|
|
2818
|
-
noSelection: noSelection
|
|
2819
|
-
}));
|
|
2820
|
-
}
|
|
2821
|
-
if (inline) {
|
|
2822
|
-
return jsxRuntime.jsx(reactNative.Text, {
|
|
2823
|
-
style: style,
|
|
2824
|
-
className: textClass,
|
|
2825
|
-
selectable: !noSelection,
|
|
2826
|
-
children: text != null ? text : children
|
|
2827
|
-
});
|
|
2828
|
-
}
|
|
2829
|
-
if (text != null) {
|
|
2830
|
-
return jsxRuntime.jsx(reactNative.View, _extends({
|
|
2831
|
-
className: className,
|
|
2832
|
-
style: style,
|
|
2833
|
-
role: role
|
|
2834
|
-
}, props, {
|
|
2835
|
-
children: jsxRuntime.jsx(reactNative.Text, {
|
|
2836
|
-
className: textClass,
|
|
2837
|
-
selectable: !noSelection,
|
|
2838
|
-
children: text
|
|
2839
|
-
})
|
|
2840
|
-
}));
|
|
2841
|
-
}
|
|
2842
|
-
return jsxRuntime.jsx(reactNative.View, _extends({
|
|
2843
|
-
className: className,
|
|
2844
|
-
style: style,
|
|
2845
|
-
children: children,
|
|
2846
|
-
role: role
|
|
2847
|
-
}, props));
|
|
2848
|
-
} finally {
|
|
2849
|
-
_effect5();
|
|
2850
|
-
}
|
|
2851
|
-
}
|
|
2852
2852
|
function RNInput(props) {
|
|
2853
|
-
var
|
|
2853
|
+
var _effect5 = core.useComponentTracking();
|
|
2854
2854
|
try {
|
|
2855
2855
|
var id = props.id,
|
|
2856
2856
|
type = props.type,
|
|
@@ -2858,7 +2858,7 @@ function RNInput(props) {
|
|
|
2858
2858
|
onChangeChecked = props.onChangeChecked,
|
|
2859
2859
|
checked = props.checked,
|
|
2860
2860
|
value = props.value,
|
|
2861
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
2861
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded3);
|
|
2862
2862
|
switch (type) {
|
|
2863
2863
|
case "radio":
|
|
2864
2864
|
return jsxRuntime.jsx(RNRadioItem, _extends({}, rest, {
|
|
@@ -2883,7 +2883,7 @@ function RNInput(props) {
|
|
|
2883
2883
|
}));
|
|
2884
2884
|
}
|
|
2885
2885
|
} finally {
|
|
2886
|
-
|
|
2886
|
+
_effect5();
|
|
2887
2887
|
}
|
|
2888
2888
|
}
|
|
2889
2889
|
// React Native HTML Components
|
|
@@ -2947,7 +2947,6 @@ exports.Icon = Icon;
|
|
|
2947
2947
|
exports.RNButton = RNButton$1;
|
|
2948
2948
|
exports.RNCheckbox = RNCheckbox;
|
|
2949
2949
|
exports.RNDialog = RNDialog;
|
|
2950
|
-
exports.RNDiv = RNDiv;
|
|
2951
2950
|
exports.RNHtmlRenderer = RNHtmlRenderer;
|
|
2952
2951
|
exports.RNRadioItem = RNRadioItem;
|
|
2953
2952
|
exports.RNSelectRenderer = RNSelectRenderer;
|