@xaui/native 0.9.1-alpha.35 → 0.9.1-alpha.36
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/{chunk-I66VMLHE.cjs → chunk-2L7FOIWY.cjs} +21 -21
- package/dist/{chunk-VSALV7VO.cjs → chunk-2LNE4PWB.cjs} +2 -2
- package/dist/{chunk-HVD5EX7V.js → chunk-2OZPOWFB.js} +1 -1
- package/dist/{chunk-6M7RUU7V.cjs → chunk-2SCE7TFZ.cjs} +64 -64
- package/dist/{chunk-L55CDXNI.js → chunk-3YZSUDZ2.js} +108 -102
- package/dist/{chunk-NLASSGA7.js → chunk-4XFEEBPU.js} +10 -2
- package/dist/{chunk-4SLOOIE5.cjs → chunk-5BNIIDQD.cjs} +2 -2
- package/dist/{chunk-HXL2QCMR.js → chunk-5GMU7ESV.js} +14 -14
- package/dist/{chunk-Q3D6KIVF.cjs → chunk-6N5ZCEAB.cjs} +104 -98
- package/dist/{chunk-GBFQZQ77.js → chunk-6U5IUUAR.js} +2 -2
- package/dist/{chunk-XWMB66ZM.cjs → chunk-ADQVA2FQ.cjs} +2 -2
- package/dist/{chunk-YUG22AXX.cjs → chunk-AQXNEV6J.cjs} +16 -16
- package/dist/{chunk-CNNLMMFV.cjs → chunk-AZRMOWRG.cjs} +6 -6
- package/dist/{chunk-JCYWU5TO.js → chunk-B6OKVLC7.js} +1 -1
- package/dist/{chunk-M2BGCN77.js → chunk-BAPXLO5N.js} +4 -4
- package/dist/{chunk-MHEL3NAN.js → chunk-CVCE7TW5.js} +53 -53
- package/dist/{chunk-BA2MPBCO.js → chunk-DL2PGB5G.js} +58 -58
- package/dist/{chunk-NFFL3E4N.js → chunk-DOLWSO7A.js} +2 -2
- package/dist/{chunk-ZA6RT3XQ.js → chunk-E5ZW7MBW.js} +16 -16
- package/dist/{chunk-K7LLERKT.cjs → chunk-EFPWXJAJ.cjs} +11 -11
- package/dist/{chunk-GGW42MY4.js → chunk-FJ5TLRT3.js} +2 -1
- package/dist/{chunk-CYS6U374.cjs → chunk-FVKIQBHS.cjs} +4 -4
- package/dist/{chunk-PBR44KVV.cjs → chunk-FYCDRRJ2.cjs} +22 -22
- package/dist/{chunk-DBXFFJTC.cjs → chunk-GHKJ6MUH.cjs} +8 -8
- package/dist/{chunk-QY4MN7X3.cjs → chunk-GPZSTEEI.cjs} +12 -12
- package/dist/{chunk-OHEHPQLC.cjs → chunk-HQVVQGYV.cjs} +2 -2
- package/dist/{chunk-MC7SY2QH.cjs → chunk-HT7H35GU.cjs} +2 -1
- package/dist/{chunk-PCWT2YBE.cjs → chunk-ISPOIMGX.cjs} +2 -2
- package/dist/{chunk-TZG3DERP.js → chunk-JB5XANQY.js} +1 -1
- package/dist/{chunk-I6ZB3FZI.cjs → chunk-K3AVOT6L.cjs} +2 -2
- package/dist/{chunk-AYOVBZAX.js → chunk-K7GAHNMJ.js} +3 -3
- package/dist/{chunk-2IWL6R3D.js → chunk-KZVHC4FL.js} +3 -3
- package/dist/{chunk-AOEXU5UV.cjs → chunk-LCDHTLSG.cjs} +3 -3
- package/dist/{chunk-UORTYL63.cjs → chunk-MFXZHLOU.cjs} +11 -11
- package/dist/{chunk-MSMZBUZO.cjs → chunk-N2U63JUX.cjs} +6 -6
- package/dist/{chunk-SLUJFE6R.js → chunk-OMV5MUTM.js} +15 -15
- package/dist/{chunk-MEYCZS32.js → chunk-OSCW7I4H.js} +1 -1
- package/dist/{chunk-WJPQARJ5.js → chunk-OWE5IID7.js} +1 -1
- package/dist/{chunk-DUQUCOUY.cjs → chunk-PGQWUASE.cjs} +2 -2
- package/dist/{chunk-LZK77LFX.js → chunk-QZO57TPX.js} +1 -1
- package/dist/{chunk-7CTIE42J.cjs → chunk-RPOKLFRB.cjs} +16 -8
- package/dist/{chunk-U3RDU3HU.js → chunk-RSGIJ6RI.js} +2 -2
- package/dist/{chunk-UR6DNU2M.js → chunk-SAGMDVFU.js} +2 -2
- package/dist/{chunk-CM4LI5OH.cjs → chunk-TE7KVFE4.cjs} +9 -9
- package/dist/{chunk-NMAZ2TQF.js → chunk-U3HFQHGZ.js} +1 -1
- package/dist/{chunk-XNNJM5DQ.js → chunk-UCW25LL6.js} +75 -75
- package/dist/{chunk-ZC35YYKS.js → chunk-V5IVMZQJ.js} +1 -1
- package/dist/{chunk-HNW4HIMO.js → chunk-VWATEE5O.js} +15 -15
- package/dist/{chunk-TVCS5UOE.cjs → chunk-XARBUUIE.cjs} +49 -49
- package/dist/{chunk-OX2YNMNS.cjs → chunk-ZU3XQZ63.cjs} +63 -63
- package/dist/components/alert/index.cjs +7 -7
- package/dist/components/alert/index.js +6 -6
- package/dist/components/avatar/index.cjs +5 -5
- package/dist/components/avatar/index.js +4 -4
- package/dist/components/badge/index.cjs +4 -4
- package/dist/components/badge/index.js +3 -3
- package/dist/components/button/index.cjs +6 -6
- package/dist/components/button/index.js +5 -5
- package/dist/components/card/index.cjs +5 -5
- package/dist/components/card/index.js +4 -4
- package/dist/components/checkbox/index.cjs +5 -5
- package/dist/components/checkbox/index.js +4 -4
- package/dist/components/chip/index.cjs +7 -7
- package/dist/components/chip/index.js +6 -6
- package/dist/components/divider/index.cjs +4 -4
- package/dist/components/divider/index.js +3 -3
- package/dist/components/field-group/index.cjs +28 -0
- package/dist/components/{input-group → field-group}/index.d.cts +60 -60
- package/dist/components/{input-group → field-group}/index.d.ts +60 -60
- package/dist/components/field-group/index.js +28 -0
- package/dist/components/input-otp/index.cjs +4 -4
- package/dist/components/input-otp/index.js +3 -3
- package/dist/components/radio/index.cjs +5 -5
- package/dist/components/radio/index.js +4 -4
- package/dist/components/skeleton/index.cjs +4 -4
- package/dist/components/skeleton/index.js +3 -3
- package/dist/components/spinner/index.cjs +4 -4
- package/dist/components/spinner/index.js +3 -3
- package/dist/components/switch/index.cjs +5 -5
- package/dist/components/switch/index.js +4 -4
- package/dist/components/text-area/index.cjs +5 -5
- package/dist/components/text-area/index.d.cts +10 -10
- package/dist/components/text-area/index.d.ts +10 -10
- package/dist/components/text-area/index.js +4 -4
- package/dist/components/text-field/index.cjs +26 -0
- package/dist/components/{input → text-field}/index.d.cts +43 -43
- package/dist/components/{input → text-field}/index.d.ts +43 -43
- package/dist/components/text-field/index.js +26 -0
- package/dist/components/typography/index.cjs +4 -4
- package/dist/components/typography/index.js +3 -3
- package/dist/components/view/index.cjs +4 -4
- package/dist/components/view/index.js +3 -3
- package/dist/index.cjs +26 -26
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +60 -60
- package/dist/system/index.cjs +7 -7
- package/dist/system/index.js +6 -6
- package/dist/{input.type-D2qgi03E.d.ts → text-field.type-0l73acce.d.ts} +24 -24
- package/dist/{input.type-BUMDlzL9.d.cts → text-field.type-DBh06DU5.d.cts} +24 -24
- package/dist/theme/index.cjs +3 -3
- package/dist/theme/index.js +2 -2
- package/package.json +16 -16
- package/dist/components/input/index.cjs +0 -26
- package/dist/components/input/index.js +0 -26
- package/dist/components/input-group/index.cjs +0 -28
- package/dist/components/input-group/index.js +0 -28
|
@@ -8,23 +8,23 @@ import {
|
|
|
8
8
|
} from "./chunk-4GTAZM2C.js";
|
|
9
9
|
import {
|
|
10
10
|
useStyleProps
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OSCW7I4H.js";
|
|
12
12
|
import {
|
|
13
13
|
useXAUITheme
|
|
14
14
|
} from "./chunk-A3EGFI6T.js";
|
|
15
15
|
|
|
16
|
-
// src/components/
|
|
16
|
+
// src/components/text-field/text-field-description.tsx
|
|
17
17
|
import { forwardRef } from "react";
|
|
18
18
|
import { Text } from "react-native";
|
|
19
19
|
|
|
20
|
-
// src/components/
|
|
21
|
-
var [
|
|
20
|
+
// src/components/text-field/text-field.context.ts
|
|
21
|
+
var [TextFieldProvider, useTextField] = createSlotContext("TextField");
|
|
22
22
|
|
|
23
|
-
// src/components/
|
|
23
|
+
// src/components/text-field/text-field-description.tsx
|
|
24
24
|
import { jsx } from "react/jsx-runtime";
|
|
25
|
-
var
|
|
26
|
-
function
|
|
27
|
-
const { descriptionStyle, descriptionId } =
|
|
25
|
+
var TextFieldDescription = forwardRef(
|
|
26
|
+
function TextFieldDescription2({ children, style, nativeID, ...props }, ref) {
|
|
27
|
+
const { descriptionStyle, descriptionId } = useTextField();
|
|
28
28
|
const [styleProps, rest] = useStyleProps(props);
|
|
29
29
|
return /* @__PURE__ */ jsx(
|
|
30
30
|
Text,
|
|
@@ -38,93 +38,99 @@ var InputDescription = forwardRef(
|
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
|
-
|
|
41
|
+
TextFieldDescription.displayName = "XAUI.TextField.Description";
|
|
42
42
|
|
|
43
|
-
// src/components/
|
|
43
|
+
// src/components/text-field/text-field-error.tsx
|
|
44
44
|
import { forwardRef as forwardRef2 } from "react";
|
|
45
45
|
import { Text as Text2 } from "react-native";
|
|
46
46
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
});
|
|
52
|
-
|
|
47
|
+
var TextFieldError = forwardRef2(
|
|
48
|
+
function TextFieldError2({ children, style, ...props }, ref) {
|
|
49
|
+
const { errorStyle } = useTextField();
|
|
50
|
+
const [styleProps, rest] = useStyleProps(props);
|
|
51
|
+
return /* @__PURE__ */ jsx2(Text2, { ref, style: [errorStyle, styleProps, style], ...rest, children });
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
TextFieldError.displayName = "XAUI.TextField.Error";
|
|
53
55
|
|
|
54
|
-
// src/components/
|
|
56
|
+
// src/components/text-field/text-field-field.tsx
|
|
55
57
|
import { forwardRef as forwardRef3, useCallback } from "react";
|
|
56
58
|
import { TextInput } from "react-native";
|
|
57
59
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
60
|
+
var TextFieldField = forwardRef3(
|
|
61
|
+
function TextFieldField2({ style, onFocus, onBlur, placeholderTextColor, ...props }, ref) {
|
|
62
|
+
const {
|
|
63
|
+
fieldStyle,
|
|
64
|
+
placeholderTextColor: resolvedPlaceholder,
|
|
65
|
+
onFieldFocus,
|
|
66
|
+
onFieldBlur,
|
|
67
|
+
labelId,
|
|
68
|
+
descriptionId,
|
|
69
|
+
isDisabled,
|
|
70
|
+
isInvalid
|
|
71
|
+
} = useTextField();
|
|
72
|
+
const [styleProps, rest] = useStyleProps(props);
|
|
73
|
+
const handleFocus = useCallback(
|
|
74
|
+
(event) => {
|
|
75
|
+
onFieldFocus(event);
|
|
76
|
+
onFocus?.(event);
|
|
77
|
+
},
|
|
78
|
+
[onFieldFocus, onFocus]
|
|
79
|
+
);
|
|
80
|
+
const handleBlur = useCallback(
|
|
81
|
+
(event) => {
|
|
82
|
+
onFieldBlur(event);
|
|
83
|
+
onBlur?.(event);
|
|
84
|
+
},
|
|
85
|
+
[onFieldBlur, onBlur]
|
|
86
|
+
);
|
|
87
|
+
return /* @__PURE__ */ jsx3(
|
|
88
|
+
TextInput,
|
|
89
|
+
{
|
|
90
|
+
ref,
|
|
91
|
+
"aria-labelledby": labelId,
|
|
92
|
+
"aria-describedby": descriptionId,
|
|
93
|
+
"aria-invalid": isInvalid,
|
|
94
|
+
editable: !isDisabled,
|
|
95
|
+
accessibilityState: { disabled: isDisabled },
|
|
96
|
+
placeholderTextColor: placeholderTextColor ?? resolvedPlaceholder,
|
|
97
|
+
...rest,
|
|
98
|
+
style: [fieldStyle, styleProps, style],
|
|
99
|
+
onFocus: handleFocus,
|
|
100
|
+
onBlur: handleBlur
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
TextFieldField.displayName = "XAUI.TextField.Field";
|
|
102
106
|
|
|
103
|
-
// src/components/
|
|
107
|
+
// src/components/text-field/text-field-label.tsx
|
|
104
108
|
import { forwardRef as forwardRef4 } from "react";
|
|
105
109
|
import { Text as Text3 } from "react-native";
|
|
106
110
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
107
|
-
var
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
111
|
+
var TextFieldLabel = forwardRef4(
|
|
112
|
+
function TextFieldLabel2({ children, style, nativeID, ...props }, ref) {
|
|
113
|
+
const { labelStyle, labelId } = useTextField();
|
|
114
|
+
const [styleProps, rest] = useStyleProps(props);
|
|
115
|
+
return /* @__PURE__ */ jsx4(
|
|
116
|
+
Text3,
|
|
117
|
+
{
|
|
118
|
+
ref,
|
|
119
|
+
nativeID: nativeID ?? labelId,
|
|
120
|
+
style: [labelStyle, styleProps, style],
|
|
121
|
+
...rest,
|
|
122
|
+
children
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
TextFieldLabel.displayName = "XAUI.TextField.Label";
|
|
122
128
|
|
|
123
|
-
// src/components/
|
|
129
|
+
// src/components/text-field/text-field.tsx
|
|
124
130
|
import { forwardRef as forwardRef5, useCallback as useCallback2, useId, useMemo, useState } from "react";
|
|
125
131
|
import { StyleSheet, View } from "react-native";
|
|
126
132
|
|
|
127
|
-
// src/components/
|
|
133
|
+
// src/components/text-field/text-field.recipe.ts
|
|
128
134
|
var SLOTS = [
|
|
129
135
|
"root",
|
|
130
136
|
"label",
|
|
@@ -184,7 +190,7 @@ function sizeAxis(step) {
|
|
|
184
190
|
paddingHorizontal: theme.spacing(padding),
|
|
185
191
|
fontSize: theme.fontSizes[field]
|
|
186
192
|
},
|
|
187
|
-
// Only what a multiline field *adds* — `
|
|
193
|
+
// Only what a multiline field *adds* — `TextField.TextArea` layers this over the field's
|
|
188
194
|
// own style rather than restating it, so the colours, the border and the radius are
|
|
189
195
|
// resolved once for both. The height is not here: `rows` is a raw value, and the
|
|
190
196
|
// slot computes it from the two numbers below.
|
|
@@ -285,14 +291,14 @@ function insideLabel(step) {
|
|
|
285
291
|
paddingTop: block,
|
|
286
292
|
paddingBottom: top
|
|
287
293
|
},
|
|
288
|
-
// The same room, because `
|
|
294
|
+
// The same room, because `TextField.TextArea` layers its own padding over the field's
|
|
289
295
|
// and would otherwise put the first line back under the label.
|
|
290
296
|
textArea: { paddingTop: block, paddingBottom: top }
|
|
291
297
|
};
|
|
292
298
|
};
|
|
293
299
|
}
|
|
294
300
|
var LABEL_INSIDE_TOP = 1.5;
|
|
295
|
-
var
|
|
301
|
+
var textFieldRecipe = createRecipe({
|
|
296
302
|
slots: SLOTS,
|
|
297
303
|
base: (theme) => ({
|
|
298
304
|
root: { flexDirection: "column" },
|
|
@@ -419,9 +425,9 @@ var inputRecipe = createRecipe({
|
|
|
419
425
|
defaultVariants: { variant: "secondary", size: "md", labelPlacement: "outside" }
|
|
420
426
|
});
|
|
421
427
|
|
|
422
|
-
// src/components/
|
|
428
|
+
// src/components/text-field/text-field.tsx
|
|
423
429
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
424
|
-
var
|
|
430
|
+
var TextFieldRoot = forwardRef5(function TextField({
|
|
425
431
|
children,
|
|
426
432
|
variant,
|
|
427
433
|
size,
|
|
@@ -450,8 +456,8 @@ var InputRoot = forwardRef5(function Input({
|
|
|
450
456
|
isInvalid: isInvalid ? "true" : void 0
|
|
451
457
|
};
|
|
452
458
|
const states = { focused: isFocused && !isInvalid, disabled: isDisabled };
|
|
453
|
-
const styles =
|
|
454
|
-
const tint = color ?
|
|
459
|
+
const styles = textFieldRecipe.resolve({ theme, selection, states });
|
|
460
|
+
const tint = color ? textFieldRecipe.tint({ theme, color, selection, states }) : void 0;
|
|
455
461
|
const context = useMemo(() => {
|
|
456
462
|
const placeholder = StyleSheet.flatten(styles.placeholder);
|
|
457
463
|
const icon = StyleSheet.flatten(styles.icon);
|
|
@@ -501,25 +507,25 @@ var InputRoot = forwardRef5(function Input({
|
|
|
501
507
|
// R12 — the caller's element *is* the column.
|
|
502
508
|
/* @__PURE__ */ jsx5(Slot, { ref, ...rest, style: rootStyle, children })
|
|
503
509
|
) : /* @__PURE__ */ jsx5(View, { ref, ...rest, style: rootStyle, children });
|
|
504
|
-
return /* @__PURE__ */ jsx5(
|
|
510
|
+
return /* @__PURE__ */ jsx5(TextFieldProvider, { value: context, children: surface });
|
|
505
511
|
});
|
|
506
|
-
|
|
512
|
+
TextFieldRoot.displayName = "XAUI.TextField.Root";
|
|
507
513
|
|
|
508
|
-
// src/components/
|
|
509
|
-
var
|
|
510
|
-
Label:
|
|
511
|
-
Field:
|
|
512
|
-
Description:
|
|
513
|
-
Error:
|
|
514
|
+
// src/components/text-field/index.ts
|
|
515
|
+
var TextField2 = Object.assign(TextFieldRoot, {
|
|
516
|
+
Label: TextFieldLabel,
|
|
517
|
+
Field: TextFieldField,
|
|
518
|
+
Description: TextFieldDescription,
|
|
519
|
+
Error: TextFieldError
|
|
514
520
|
});
|
|
515
521
|
|
|
516
522
|
export {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
523
|
+
useTextField,
|
|
524
|
+
TextFieldDescription,
|
|
525
|
+
TextFieldError,
|
|
526
|
+
TextFieldField,
|
|
527
|
+
TextFieldLabel,
|
|
528
|
+
textFieldRecipe,
|
|
529
|
+
TextFieldRoot,
|
|
530
|
+
TextField2 as TextField
|
|
525
531
|
};
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-YXPYOOHU.js";
|
|
4
4
|
import {
|
|
5
5
|
useStyleProps
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OSCW7I4H.js";
|
|
7
7
|
|
|
8
8
|
// src/components/view/grid.tsx
|
|
9
9
|
import { Children, forwardRef, useMemo, useState } from "react";
|
|
@@ -128,7 +128,15 @@ import { jsx as jsx6 } from "react/jsx-runtime";
|
|
|
128
128
|
var Column = forwardRef6(function Column2({ children, asChild = false, style, ...props }, ref) {
|
|
129
129
|
const [styleProps, rest] = useStyleProps(props);
|
|
130
130
|
const Root = asChild ? Slot : View6;
|
|
131
|
-
return /* @__PURE__ */ jsx6(
|
|
131
|
+
return /* @__PURE__ */ jsx6(
|
|
132
|
+
Root,
|
|
133
|
+
{
|
|
134
|
+
ref,
|
|
135
|
+
style: [{ flexDirection: "column" }, styleProps, style],
|
|
136
|
+
...rest,
|
|
137
|
+
children
|
|
138
|
+
}
|
|
139
|
+
);
|
|
132
140
|
});
|
|
133
141
|
Column.displayName = "XAUI.Column";
|
|
134
142
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkK3AVOT6Lcjs = require('./chunk-K3AVOT6L.cjs');
|
|
4
4
|
|
|
5
5
|
// src/system/portal/portal.tsx
|
|
6
6
|
var _react = require('react');
|
|
@@ -31,7 +31,7 @@ var styles = _reactnative.StyleSheet.create({
|
|
|
31
31
|
container: { flex: 1 }
|
|
32
32
|
});
|
|
33
33
|
function PortalHost({ children, ...props }) {
|
|
34
|
-
const [styleProps] =
|
|
34
|
+
const [styleProps] = _chunkK3AVOT6Lcjs.useStyleProps.call(void 0, props);
|
|
35
35
|
const [portals, setPortals] = _react.useState.call(void 0, /* @__PURE__ */ new Map());
|
|
36
36
|
const addPortal = _react.useCallback.call(void 0, (key, element) => {
|
|
37
37
|
setPortals((current) => new Map(current).set(key, element));
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "./chunk-
|
|
2
|
+
TextFieldDescription,
|
|
3
|
+
TextFieldError,
|
|
4
|
+
TextFieldField,
|
|
5
|
+
TextFieldLabel,
|
|
6
|
+
TextFieldRoot,
|
|
7
|
+
useTextField
|
|
8
|
+
} from "./chunk-3YZSUDZ2.js";
|
|
9
9
|
import {
|
|
10
10
|
createSlotContext
|
|
11
11
|
} from "./chunk-YXPYOOHU.js";
|
|
12
12
|
import {
|
|
13
13
|
useStyleProps
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OSCW7I4H.js";
|
|
15
15
|
|
|
16
16
|
// src/components/text-area/text-area-field.tsx
|
|
17
17
|
import { forwardRef, useMemo } from "react";
|
|
@@ -23,7 +23,7 @@ var [TextAreaProvider, useTextArea] = createSlotContext("TextArea");
|
|
|
23
23
|
import { jsx } from "react/jsx-runtime";
|
|
24
24
|
var TextAreaField = forwardRef(
|
|
25
25
|
function TextAreaField2({ style, scrollEnabled, ...props }, ref) {
|
|
26
|
-
const { textAreaStyle, textArea } =
|
|
26
|
+
const { textAreaStyle, textArea } = useTextField();
|
|
27
27
|
const { rows, maxRows } = useTextArea();
|
|
28
28
|
const [styleProps, rest] = useStyleProps(props);
|
|
29
29
|
const height = useMemo(() => {
|
|
@@ -37,7 +37,7 @@ var TextAreaField = forwardRef(
|
|
|
37
37
|
};
|
|
38
38
|
}, [rows, maxRows, textArea]);
|
|
39
39
|
return /* @__PURE__ */ jsx(
|
|
40
|
-
|
|
40
|
+
TextFieldField,
|
|
41
41
|
{
|
|
42
42
|
ref,
|
|
43
43
|
multiline: true,
|
|
@@ -56,16 +56,16 @@ import { jsx as jsx2 } from "react/jsx-runtime";
|
|
|
56
56
|
var DEFAULT_ROWS = 3;
|
|
57
57
|
var TextAreaRoot = forwardRef2(function TextArea({ rows = DEFAULT_ROWS, maxRows, children, ...props }, ref) {
|
|
58
58
|
const context = useMemo2(() => ({ rows, maxRows }), [rows, maxRows]);
|
|
59
|
-
return /* @__PURE__ */ jsx2(TextAreaProvider, { value: context, children: /* @__PURE__ */ jsx2(
|
|
59
|
+
return /* @__PURE__ */ jsx2(TextAreaProvider, { value: context, children: /* @__PURE__ */ jsx2(TextFieldRoot, { ref, ...props, children }) });
|
|
60
60
|
});
|
|
61
61
|
TextAreaRoot.displayName = "XAUI.TextArea.Root";
|
|
62
62
|
|
|
63
63
|
// src/components/text-area/index.ts
|
|
64
64
|
var TextArea2 = Object.assign(TextAreaRoot, {
|
|
65
|
-
Label:
|
|
65
|
+
Label: TextFieldLabel,
|
|
66
66
|
Field: TextAreaField,
|
|
67
|
-
Description:
|
|
68
|
-
Error:
|
|
67
|
+
Description: TextFieldDescription,
|
|
68
|
+
Error: TextFieldError
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
export {
|