@xaui/native 0.9.1-alpha.35 → 0.9.1-alpha.37
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-ZC35YYKS.js → chunk-2PMXMKS5.js} +13 -8
- package/dist/{chunk-CYS6U374.cjs → chunk-3P6M2R4S.cjs} +6 -6
- package/dist/{chunk-7CTIE42J.cjs → chunk-437QULXO.cjs} +16 -8
- package/dist/{chunk-M2BGCN77.js → chunk-4PTWZCOK.js} +9 -9
- package/dist/{chunk-ZA6RT3XQ.js → chunk-5PPNDKRX.js} +16 -16
- package/dist/{chunk-AYOVBZAX.js → chunk-6G3XWPNP.js} +5 -5
- package/dist/{chunk-PCWT2YBE.cjs → chunk-7B3UBUC6.cjs} +3 -3
- package/dist/{chunk-HXL2QCMR.js → chunk-7LSY4WFL.js} +14 -14
- package/dist/{chunk-OHEHPQLC.cjs → chunk-ACAPTWE3.cjs} +16 -12
- package/dist/{chunk-I66VMLHE.cjs → chunk-AP6RVIIK.cjs} +21 -21
- package/dist/{chunk-UR6DNU2M.js → chunk-BORJJYDW.js} +4 -4
- package/dist/{chunk-XWMB66ZM.cjs → chunk-C5VDFRAD.cjs} +3 -3
- package/dist/{chunk-PBR44KVV.cjs → chunk-CUQTAPBU.cjs} +22 -22
- package/dist/{chunk-QY4MN7X3.cjs → chunk-DKH6BNPF.cjs} +15 -15
- package/dist/{chunk-6M7RUU7V.cjs → chunk-DRMT346W.cjs} +64 -64
- package/dist/chunk-DVDQSW7U.cjs +1006 -0
- package/dist/{chunk-NMAZ2TQF.js → chunk-E3X5ODKQ.js} +3 -3
- package/dist/{chunk-U3RDU3HU.js → chunk-EOJ5MYAQ.js} +5 -5
- package/dist/{chunk-UORTYL63.cjs → chunk-FTQHDJYL.cjs} +14 -14
- package/dist/{chunk-DBXFFJTC.cjs → chunk-GTT4NHS2.cjs} +11 -11
- package/dist/{chunk-WJPQARJ5.js → chunk-HXW4ANVB.js} +3 -3
- package/dist/{chunk-MSMZBUZO.cjs → chunk-IGLKACSR.cjs} +7 -7
- package/dist/{chunk-HNW4HIMO.js → chunk-IKJVLJKT.js} +15 -15
- package/dist/{chunk-CNNLMMFV.cjs → chunk-ITURCQMQ.cjs} +7 -7
- package/dist/{chunk-DUQUCOUY.cjs → chunk-JB5LGQ54.cjs} +3 -3
- package/dist/{chunk-NLASSGA7.js → chunk-JDSE4TQL.js} +10 -2
- package/dist/{chunk-GBFQZQ77.js → chunk-JXNFOOKC.js} +7 -7
- package/dist/{chunk-Q3D6KIVF.cjs → chunk-LEWW24RQ.cjs} +105 -99
- package/dist/{chunk-MEYCZS32.js → chunk-M63GFNKV.js} +19 -4
- package/dist/chunk-MESKS6AI.js +0 -0
- package/dist/{chunk-MHEL3NAN.js → chunk-NKPTXTTS.js} +53 -53
- package/dist/{chunk-VSALV7VO.cjs → chunk-NTD3NPRX.cjs} +3 -3
- package/dist/{chunk-HVD5EX7V.js → chunk-O3A3DBSZ.js} +3 -3
- package/dist/chunk-OJCCV65P.cjs +1 -0
- package/dist/{chunk-JCYWU5TO.js → chunk-OULTSBKU.js} +3 -3
- package/dist/{chunk-CM4LI5OH.cjs → chunk-P747CRAY.cjs} +9 -9
- package/dist/{chunk-BA2MPBCO.js → chunk-RGKWNK4T.js} +58 -58
- package/dist/{chunk-NFFL3E4N.js → chunk-RVRVGG73.js} +4 -4
- package/dist/{chunk-L55CDXNI.js → chunk-SMW6ZWMH.js} +110 -104
- package/dist/{chunk-YUG22AXX.cjs → chunk-SNIHUKDA.cjs} +16 -16
- package/dist/{chunk-SLUJFE6R.js → chunk-SO5UAGIU.js} +15 -15
- package/dist/{chunk-2IWL6R3D.js → chunk-TDYPY2J7.js} +8 -8
- package/dist/{chunk-LZK77LFX.js → chunk-TJHYSSBZ.js} +3 -3
- package/dist/{chunk-I6ZB3FZI.cjs → chunk-TK44VBIE.cjs} +22 -7
- package/dist/{chunk-OX2YNMNS.cjs → chunk-UBOXW5WO.cjs} +63 -63
- package/dist/{chunk-XNNJM5DQ.js → chunk-UGF35NSE.js} +75 -75
- package/dist/{chunk-AOEXU5UV.cjs → chunk-VFTT3Q4B.cjs} +4 -4
- package/dist/{chunk-4SLOOIE5.cjs → chunk-WDDXU3OH.cjs} +14 -9
- package/dist/{chunk-TZG3DERP.js → chunk-WKCQ6VGW.js} +15 -11
- package/dist/{chunk-TVCS5UOE.cjs → chunk-WVLSQO6K.cjs} +49 -49
- package/dist/chunk-XWY4DF37.js +1143 -0
- package/dist/{chunk-K7LLERKT.cjs → chunk-ZJWEVFAO.cjs} +12 -12
- package/dist/components/alert/index.cjs +7 -8
- package/dist/components/alert/index.d.cts +1 -1
- package/dist/components/alert/index.d.ts +1 -1
- package/dist/components/alert/index.js +6 -7
- package/dist/components/avatar/index.cjs +4 -5
- package/dist/components/avatar/index.d.cts +3 -3
- package/dist/components/avatar/index.d.ts +3 -3
- package/dist/components/avatar/index.js +3 -4
- package/dist/components/badge/index.cjs +3 -4
- package/dist/components/badge/index.d.cts +1 -1
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/badge/index.js +2 -3
- package/dist/components/button/index.cjs +6 -7
- package/dist/components/button/index.d.cts +168 -168
- package/dist/components/button/index.d.ts +168 -168
- package/dist/components/button/index.js +5 -6
- package/dist/components/card/index.cjs +5 -6
- package/dist/components/card/index.d.cts +169 -169
- package/dist/components/card/index.d.ts +169 -169
- package/dist/components/card/index.js +4 -5
- package/dist/components/checkbox/index.cjs +5 -6
- package/dist/components/checkbox/index.d.cts +336 -336
- package/dist/components/checkbox/index.d.ts +336 -336
- package/dist/components/checkbox/index.js +4 -5
- package/dist/components/chip/index.cjs +7 -8
- package/dist/components/chip/index.d.cts +169 -169
- package/dist/components/chip/index.d.ts +169 -169
- package/dist/components/chip/index.js +6 -7
- package/dist/components/divider/index.cjs +3 -4
- package/dist/components/divider/index.d.cts +1 -1
- package/dist/components/divider/index.d.ts +1 -1
- package/dist/components/divider/index.js +2 -3
- package/dist/components/field-group/index.cjs +27 -0
- package/dist/components/{input-group → field-group}/index.d.cts +66 -66
- package/dist/components/{input-group → field-group}/index.d.ts +66 -66
- package/dist/components/field-group/index.js +27 -0
- package/dist/components/input-otp/index.cjs +3 -4
- package/dist/components/input-otp/index.d.cts +1 -1
- package/dist/components/input-otp/index.d.ts +1 -1
- package/dist/components/input-otp/index.js +2 -3
- package/dist/components/radio/index.cjs +5 -6
- package/dist/components/radio/index.d.cts +336 -336
- package/dist/components/radio/index.d.ts +336 -336
- package/dist/components/radio/index.js +4 -5
- package/dist/components/select/index.cjs +47 -0
- package/dist/components/select/index.d.cts +519 -0
- package/dist/components/select/index.d.ts +519 -0
- package/dist/components/select/index.js +47 -0
- package/dist/components/skeleton/index.cjs +3 -4
- package/dist/components/skeleton/index.d.cts +1 -1
- package/dist/components/skeleton/index.d.ts +1 -1
- package/dist/components/skeleton/index.js +2 -3
- package/dist/components/spinner/index.cjs +4 -5
- package/dist/components/spinner/index.d.cts +1 -1
- package/dist/components/spinner/index.d.ts +1 -1
- package/dist/components/spinner/index.js +3 -4
- package/dist/components/switch/index.cjs +5 -6
- package/dist/components/switch/index.d.cts +338 -338
- package/dist/components/switch/index.d.ts +338 -338
- package/dist/components/switch/index.js +4 -5
- package/dist/components/text-area/index.cjs +4 -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 +3 -4
- package/dist/components/text-field/index.cjs +25 -0
- package/dist/components/text-field/index.d.cts +205 -0
- package/dist/components/text-field/index.d.ts +205 -0
- package/dist/components/text-field/index.js +25 -0
- package/dist/components/typography/index.cjs +3 -4
- package/dist/components/typography/index.d.cts +2 -2
- package/dist/components/typography/index.d.ts +2 -2
- package/dist/components/typography/index.js +2 -3
- package/dist/components/view/index.cjs +3 -4
- package/dist/components/view/index.d.cts +6 -6
- package/dist/components/view/index.d.ts +6 -6
- package/dist/components/view/index.js +2 -3
- package/dist/index.cjs +64 -28
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +100 -64
- package/dist/system/index.cjs +10 -10
- package/dist/system/index.d.cts +15 -2
- package/dist/system/index.d.ts +15 -2
- package/dist/system/index.js +8 -8
- 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 +4 -3
- package/dist/theme/index.d.cts +21 -1
- package/dist/theme/index.d.ts +21 -1
- package/dist/theme/index.js +3 -2
- package/package.json +26 -16
- package/dist/chunk-GGW42MY4.js +0 -20
- package/dist/chunk-MC7SY2QH.cjs +0 -20
- package/dist/components/input/index.cjs +0 -26
- package/dist/components/input/index.d.cts +0 -205
- package/dist/components/input/index.d.ts +0 -205
- 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,24 +8,24 @@ var _chunk54FJOKANcjs = require('./chunk-54FJOKAN.cjs');
|
|
|
8
8
|
var _chunkFNEUOBCVcjs = require('./chunk-FNEUOBCV.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
|
|
15
15
|
|
|
16
|
-
// src/components/
|
|
16
|
+
// src/components/text-field/text-field-description.tsx
|
|
17
17
|
var _react = require('react');
|
|
18
18
|
var _reactnative = require('react-native');
|
|
19
19
|
|
|
20
|
-
// src/components/
|
|
21
|
-
var [
|
|
20
|
+
// src/components/text-field/text-field.context.ts
|
|
21
|
+
var [TextFieldProvider, useTextField] = _chunk54FJOKANcjs.createSlotContext.call(void 0, "TextField");
|
|
22
22
|
|
|
23
|
-
// src/components/
|
|
23
|
+
// src/components/text-field/text-field-description.tsx
|
|
24
24
|
var _jsxruntime = require('react/jsx-runtime');
|
|
25
|
-
var
|
|
26
|
-
function
|
|
27
|
-
const { descriptionStyle, descriptionId } =
|
|
28
|
-
const [styleProps, rest] =
|
|
25
|
+
var TextFieldDescription = _react.forwardRef.call(void 0,
|
|
26
|
+
function TextFieldDescription2({ children, style, nativeID, ...props }, ref) {
|
|
27
|
+
const { descriptionStyle, descriptionId } = useTextField();
|
|
28
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
29
29
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
30
30
|
_reactnative.Text,
|
|
31
31
|
{
|
|
@@ -38,93 +38,99 @@ var InputDescription = _react.forwardRef.call(void 0,
|
|
|
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
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
});
|
|
52
|
-
|
|
47
|
+
var TextFieldError = _react.forwardRef.call(void 0,
|
|
48
|
+
function TextFieldError2({ children, style, ...props }, ref) {
|
|
49
|
+
const { errorStyle } = useTextField();
|
|
50
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
51
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.Text, { 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
|
|
|
56
58
|
|
|
57
59
|
|
|
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 = _react.forwardRef.call(void 0,
|
|
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] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
73
|
+
const handleFocus = _react.useCallback.call(void 0,
|
|
74
|
+
(event) => {
|
|
75
|
+
onFieldFocus(event);
|
|
76
|
+
_optionalChain([onFocus, 'optionalCall', _ => _(event)]);
|
|
77
|
+
},
|
|
78
|
+
[onFieldFocus, onFocus]
|
|
79
|
+
);
|
|
80
|
+
const handleBlur = _react.useCallback.call(void 0,
|
|
81
|
+
(event) => {
|
|
82
|
+
onFieldBlur(event);
|
|
83
|
+
_optionalChain([onBlur, 'optionalCall', _2 => _2(event)]);
|
|
84
|
+
},
|
|
85
|
+
[onFieldBlur, onBlur]
|
|
86
|
+
);
|
|
87
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
88
|
+
_reactnative.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: _nullishCoalesce(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
|
|
|
105
109
|
|
|
106
110
|
|
|
107
|
-
var
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
111
|
+
var TextFieldLabel = _react.forwardRef.call(void 0,
|
|
112
|
+
function TextFieldLabel2({ children, style, nativeID, ...props }, ref) {
|
|
113
|
+
const { labelStyle, labelId } = useTextField();
|
|
114
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
115
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
116
|
+
_reactnative.Text,
|
|
117
|
+
{
|
|
118
|
+
ref,
|
|
119
|
+
nativeID: _nullishCoalesce(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
|
|
|
125
131
|
|
|
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 = _chunkFNEUOBCVcjs.createRecipe.call(void 0, {
|
|
296
302
|
slots: SLOTS,
|
|
297
303
|
base: (theme) => ({
|
|
298
304
|
root: { flexDirection: "column" },
|
|
@@ -419,9 +425,9 @@ var inputRecipe = _chunkFNEUOBCVcjs.createRecipe.call(void 0, {
|
|
|
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
|
|
|
424
|
-
var
|
|
430
|
+
var TextFieldRoot = _react.forwardRef.call(void 0, function TextField({
|
|
425
431
|
children,
|
|
426
432
|
variant,
|
|
427
433
|
size,
|
|
@@ -435,7 +441,7 @@ var InputRoot = _react.forwardRef.call(void 0, function Input({
|
|
|
435
441
|
...props
|
|
436
442
|
}, ref) {
|
|
437
443
|
const theme = _chunk57SJ4LJFcjs.useXAUITheme.call(void 0, );
|
|
438
|
-
const [styleProps, rest] =
|
|
444
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
439
445
|
const [isFocused, setIsFocused] = _react.useState.call(void 0, false);
|
|
440
446
|
const onFieldFocus = _react.useCallback.call(void 0, () => setIsFocused(true), []);
|
|
441
447
|
const onFieldBlur = _react.useCallback.call(void 0, () => setIsFocused(false), []);
|
|
@@ -450,8 +456,8 @@ var InputRoot = _react.forwardRef.call(void 0, 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 = _react.useMemo.call(void 0, () => {
|
|
456
462
|
const placeholder = _reactnative.StyleSheet.flatten(styles.placeholder);
|
|
457
463
|
const icon = _reactnative.StyleSheet.flatten(styles.icon);
|
|
@@ -501,16 +507,16 @@ var InputRoot = _react.forwardRef.call(void 0, function Input({
|
|
|
501
507
|
// R12 — the caller's element *is* the column.
|
|
502
508
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk54FJOKANcjs.Slot, { ref, ...rest, style: rootStyle, children })
|
|
503
509
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactnative.View, { ref, ...rest, style: rootStyle, children });
|
|
504
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
510
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TextFieldProvider, { value: context, children: surface });
|
|
505
511
|
});
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
// src/components/
|
|
509
|
-
var
|
|
510
|
-
Label:
|
|
511
|
-
Field:
|
|
512
|
-
Description:
|
|
513
|
-
Error:
|
|
512
|
+
TextFieldRoot.displayName = "XAUI.TextField.Root";
|
|
513
|
+
|
|
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
|
|
|
@@ -522,4 +528,4 @@ var Input2 = Object.assign(InputRoot, {
|
|
|
522
528
|
|
|
523
529
|
|
|
524
530
|
|
|
525
|
-
exports.
|
|
531
|
+
exports.useTextField = useTextField; exports.TextFieldDescription = TextFieldDescription; exports.TextFieldError = TextFieldError; exports.TextFieldField = TextFieldField; exports.TextFieldLabel = TextFieldLabel; exports.textFieldRecipe = textFieldRecipe; exports.TextFieldRoot = TextFieldRoot; exports.TextField = TextField2;
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
stableHash
|
|
3
|
-
} from "./chunk-GGW42MY4.js";
|
|
4
|
-
|
|
5
1
|
// src/system/style-props/use-style-props.ts
|
|
6
2
|
import { useMemo } from "react";
|
|
7
3
|
|
|
4
|
+
// src/utils/stable-hash.ts
|
|
5
|
+
function canonical(value) {
|
|
6
|
+
if (value === null || typeof value !== "object")
|
|
7
|
+
return JSON.stringify(value) ?? "null";
|
|
8
|
+
if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
|
|
9
|
+
const entries = Object.entries(value).filter(([, v]) => typeof v !== "function").sort(([a], [b]) => a < b ? -1 : 1).map(([k, v]) => `${JSON.stringify(k)}:${canonical(v)}`);
|
|
10
|
+
return `{${entries.join(",")}}`;
|
|
11
|
+
}
|
|
12
|
+
function stableHash(value) {
|
|
13
|
+
const input = canonical(value);
|
|
14
|
+
let hash = 2166136261;
|
|
15
|
+
for (let i = 0; i < input.length; i++) {
|
|
16
|
+
hash ^= input.charCodeAt(i);
|
|
17
|
+
hash = Math.imul(hash, 16777619) >>> 0;
|
|
18
|
+
}
|
|
19
|
+
return hash.toString(36);
|
|
20
|
+
}
|
|
21
|
+
|
|
8
22
|
// src/utils/style-props.ts
|
|
9
23
|
var STYLE_PROP_KEYS = [
|
|
10
24
|
// Flex and layout
|
|
@@ -175,5 +189,6 @@ function useStyleProps(props) {
|
|
|
175
189
|
}
|
|
176
190
|
|
|
177
191
|
export {
|
|
192
|
+
stableHash,
|
|
178
193
|
useStyleProps
|
|
179
194
|
};
|
|
File without changes
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
2
|
+
TextFieldField,
|
|
3
|
+
useTextField
|
|
4
|
+
} from "./chunk-SMW6ZWMH.js";
|
|
5
5
|
import {
|
|
6
6
|
Icon
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HXW4ANVB.js";
|
|
8
8
|
import {
|
|
9
9
|
Slot,
|
|
10
10
|
createSlotContext
|
|
11
11
|
} from "./chunk-YXPYOOHU.js";
|
|
12
12
|
import {
|
|
13
13
|
useStyleProps
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-M63GFNKV.js";
|
|
15
15
|
|
|
16
|
-
// src/components/
|
|
16
|
+
// src/components/field-group/field-group-field.tsx
|
|
17
17
|
import { forwardRef, useMemo } from "react";
|
|
18
18
|
|
|
19
|
-
// src/components/
|
|
20
|
-
var [
|
|
19
|
+
// src/components/field-group/field-group.context.ts
|
|
20
|
+
var [FieldGroupProvider, useFieldGroup] = createSlotContext("FieldGroup");
|
|
21
21
|
|
|
22
|
-
// src/components/
|
|
22
|
+
// src/components/field-group/field-group.utils.ts
|
|
23
23
|
function decoratorPadding(prefixWidth, suffixWidth) {
|
|
24
24
|
const paddingStart = prefixWidth > 0 ? prefixWidth : void 0;
|
|
25
25
|
const paddingEnd = suffixWidth > 0 ? suffixWidth : void 0;
|
|
@@ -27,39 +27,39 @@ function decoratorPadding(prefixWidth, suffixWidth) {
|
|
|
27
27
|
return { paddingStart, paddingEnd };
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
// src/components/
|
|
30
|
+
// src/components/field-group/field-group-field.tsx
|
|
31
31
|
import { jsx } from "react/jsx-runtime";
|
|
32
|
-
var
|
|
33
|
-
function
|
|
34
|
-
const { prefixWidth, suffixWidth } =
|
|
32
|
+
var FieldGroupField = forwardRef(
|
|
33
|
+
function FieldGroupField2({ style, ...props }, ref) {
|
|
34
|
+
const { prefixWidth, suffixWidth } = useFieldGroup();
|
|
35
35
|
const padding = useMemo(
|
|
36
36
|
() => decoratorPadding(prefixWidth, suffixWidth),
|
|
37
37
|
[prefixWidth, suffixWidth]
|
|
38
38
|
);
|
|
39
|
-
return /* @__PURE__ */ jsx(
|
|
39
|
+
return /* @__PURE__ */ jsx(TextFieldField, { ref, ...props, style: [padding, style] });
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
|
-
|
|
42
|
+
FieldGroupField.displayName = "XAUI.FieldGroup.Field";
|
|
43
43
|
|
|
44
|
-
// src/components/
|
|
44
|
+
// src/components/field-group/field-group-icon.tsx
|
|
45
45
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
46
|
-
function
|
|
47
|
-
const { icon } =
|
|
46
|
+
function FieldGroupIcon({ size, color, ...rest }) {
|
|
47
|
+
const { icon } = useTextField();
|
|
48
48
|
return /* @__PURE__ */ jsx2(Icon, { size: size ?? icon.size, color: color ?? icon.color, ...rest });
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
FieldGroupIcon.displayName = "XAUI.FieldGroup.Icon";
|
|
51
51
|
|
|
52
|
-
// src/components/
|
|
52
|
+
// src/components/field-group/field-group-prefix.tsx
|
|
53
53
|
import { forwardRef as forwardRef3 } from "react";
|
|
54
54
|
|
|
55
|
-
// src/components/
|
|
55
|
+
// src/components/field-group/field-group-decorator.tsx
|
|
56
56
|
import { forwardRef as forwardRef2, useCallback } from "react";
|
|
57
57
|
import { View } from "react-native";
|
|
58
58
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
59
|
-
var
|
|
60
|
-
function
|
|
61
|
-
const { prefixStyle, suffixStyle, isDisabled } =
|
|
62
|
-
const { setPrefixWidth, setSuffixWidth } =
|
|
59
|
+
var FieldGroupDecorator = forwardRef2(
|
|
60
|
+
function FieldGroupDecorator2({ side, children, isDecorative = false, onLayout, style, ...props }, ref) {
|
|
61
|
+
const { prefixStyle, suffixStyle, isDisabled } = useTextField();
|
|
62
|
+
const { setPrefixWidth, setSuffixWidth } = useFieldGroup();
|
|
63
63
|
const [styleProps, rest] = useStyleProps(props);
|
|
64
64
|
const report = side === "prefix" ? setPrefixWidth : setSuffixWidth;
|
|
65
65
|
const handleLayout = useCallback(
|
|
@@ -85,32 +85,32 @@ var InputGroupDecorator = forwardRef2(
|
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
87
|
);
|
|
88
|
-
|
|
88
|
+
FieldGroupDecorator.displayName = "XAUI.FieldGroup.Decorator";
|
|
89
89
|
|
|
90
|
-
// src/components/
|
|
90
|
+
// src/components/field-group/field-group-prefix.tsx
|
|
91
91
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
92
|
-
var
|
|
93
|
-
function
|
|
94
|
-
return /* @__PURE__ */ jsx4(
|
|
92
|
+
var FieldGroupPrefix = forwardRef3(
|
|
93
|
+
function FieldGroupPrefix2(props, ref) {
|
|
94
|
+
return /* @__PURE__ */ jsx4(FieldGroupDecorator, { ref, side: "prefix", ...props });
|
|
95
95
|
}
|
|
96
96
|
);
|
|
97
|
-
|
|
97
|
+
FieldGroupPrefix.displayName = "XAUI.FieldGroup.Prefix";
|
|
98
98
|
|
|
99
|
-
// src/components/
|
|
99
|
+
// src/components/field-group/field-group-suffix.tsx
|
|
100
100
|
import { forwardRef as forwardRef4 } from "react";
|
|
101
101
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
102
|
-
var
|
|
103
|
-
function
|
|
104
|
-
return /* @__PURE__ */ jsx5(
|
|
102
|
+
var FieldGroupSuffix = forwardRef4(
|
|
103
|
+
function FieldGroupSuffix2(props, ref) {
|
|
104
|
+
return /* @__PURE__ */ jsx5(FieldGroupDecorator, { ref, side: "suffix", ...props });
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
|
-
|
|
107
|
+
FieldGroupSuffix.displayName = "XAUI.FieldGroup.Suffix";
|
|
108
108
|
|
|
109
|
-
// src/components/
|
|
109
|
+
// src/components/field-group/field-group.tsx
|
|
110
110
|
import { forwardRef as forwardRef5, useMemo as useMemo2, useState } from "react";
|
|
111
111
|
import { View as View2 } from "react-native";
|
|
112
112
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
113
|
-
var
|
|
113
|
+
var FieldGroupRoot = forwardRef5(function FieldGroup({ children, asChild = false, style, ...props }, ref) {
|
|
114
114
|
const [styleProps, rest] = useStyleProps(props);
|
|
115
115
|
const [prefixWidth, setPrefixWidth] = useState(0);
|
|
116
116
|
const [suffixWidth, setSuffixWidth] = useState(0);
|
|
@@ -123,25 +123,25 @@ var InputGroupRoot = forwardRef5(function InputGroup({ children, asChild = false
|
|
|
123
123
|
// R12 — the caller's element *is* the row.
|
|
124
124
|
/* @__PURE__ */ jsx6(Slot, { ref, ...rest, style: rootStyle, children })
|
|
125
125
|
) : /* @__PURE__ */ jsx6(View2, { ref, ...rest, style: rootStyle, children });
|
|
126
|
-
return /* @__PURE__ */ jsx6(
|
|
126
|
+
return /* @__PURE__ */ jsx6(FieldGroupProvider, { value: context, children: surface });
|
|
127
127
|
});
|
|
128
|
-
|
|
128
|
+
FieldGroupRoot.displayName = "XAUI.FieldGroup.Root";
|
|
129
129
|
|
|
130
|
-
// src/components/
|
|
131
|
-
var
|
|
132
|
-
Prefix:
|
|
133
|
-
Field:
|
|
134
|
-
Suffix:
|
|
135
|
-
Icon:
|
|
130
|
+
// src/components/field-group/index.ts
|
|
131
|
+
var FieldGroup2 = Object.assign(FieldGroupRoot, {
|
|
132
|
+
Prefix: FieldGroupPrefix,
|
|
133
|
+
Field: FieldGroupField,
|
|
134
|
+
Suffix: FieldGroupSuffix,
|
|
135
|
+
Icon: FieldGroupIcon
|
|
136
136
|
});
|
|
137
137
|
|
|
138
138
|
export {
|
|
139
|
-
|
|
139
|
+
useFieldGroup,
|
|
140
140
|
decoratorPadding,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
FieldGroupField,
|
|
142
|
+
FieldGroupIcon,
|
|
143
|
+
FieldGroupPrefix,
|
|
144
|
+
FieldGroupSuffix,
|
|
145
|
+
FieldGroupRoot,
|
|
146
|
+
FieldGroup2 as FieldGroup
|
|
147
147
|
};
|
|
@@ -6,10 +6,10 @@ var _chunk54FJOKANcjs = require('./chunk-54FJOKAN.cjs');
|
|
|
6
6
|
var _chunkFNEUOBCVcjs = require('./chunk-FNEUOBCV.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
|
|
13
13
|
|
|
14
14
|
// src/components/divider/divider.tsx
|
|
15
15
|
var _react = require('react');
|
|
@@ -67,7 +67,7 @@ var dividerRecipe = _chunkFNEUOBCVcjs.createRecipe.call(void 0, {
|
|
|
67
67
|
var _jsxruntime = require('react/jsx-runtime');
|
|
68
68
|
var Divider = _react.forwardRef.call(void 0, function Divider2({ children, orientation, size, color, asChild = false, style, ...props }, ref) {
|
|
69
69
|
const theme = _chunk57SJ4LJFcjs.useXAUITheme.call(void 0, );
|
|
70
|
-
const [styleProps, rest] =
|
|
70
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
71
71
|
const selection = { orientation, size };
|
|
72
72
|
const styles = dividerRecipe.resolve({ theme, selection });
|
|
73
73
|
const tint = color ? dividerRecipe.tint({ theme, color, selection }) : void 0;
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
createRecipe
|
|
6
6
|
} from "./chunk-4GTAZM2C.js";
|
|
7
|
-
import {
|
|
8
|
-
useStyleProps
|
|
9
|
-
} from "./chunk-MEYCZS32.js";
|
|
10
7
|
import {
|
|
11
8
|
useXAUITheme
|
|
12
9
|
} from "./chunk-A3EGFI6T.js";
|
|
10
|
+
import {
|
|
11
|
+
useStyleProps
|
|
12
|
+
} from "./chunk-M63GFNKV.js";
|
|
13
13
|
|
|
14
14
|
// src/components/typography/typography.tsx
|
|
15
15
|
import { forwardRef } from "react";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
createRecipe
|
|
6
6
|
} from "./chunk-4GTAZM2C.js";
|
|
7
|
-
import {
|
|
8
|
-
useStyleProps
|
|
9
|
-
} from "./chunk-MEYCZS32.js";
|
|
10
7
|
import {
|
|
11
8
|
useXAUITheme
|
|
12
9
|
} from "./chunk-A3EGFI6T.js";
|
|
10
|
+
import {
|
|
11
|
+
useStyleProps
|
|
12
|
+
} from "./chunk-M63GFNKV.js";
|
|
13
13
|
|
|
14
14
|
// src/components/divider/divider.tsx
|
|
15
15
|
import { forwardRef } from "react";
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkLEWW24RQcjs = require('./chunk-LEWW24RQ.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunk54FJOKANcjs = require('./chunk-54FJOKAN.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
|
|
15
15
|
|
|
16
16
|
// src/components/text-area/text-area-field.tsx
|
|
17
17
|
var _react = require('react');
|
|
@@ -23,9 +23,9 @@ var [TextAreaProvider, useTextArea] = _chunk54FJOKANcjs.createSlotContext.call(v
|
|
|
23
23
|
var _jsxruntime = require('react/jsx-runtime');
|
|
24
24
|
var TextAreaField = _react.forwardRef.call(void 0,
|
|
25
25
|
function TextAreaField2({ style, scrollEnabled, ...props }, ref) {
|
|
26
|
-
const { textAreaStyle, textArea } =
|
|
26
|
+
const { textAreaStyle, textArea } = _chunkLEWW24RQcjs.useTextField.call(void 0, );
|
|
27
27
|
const { rows, maxRows } = useTextArea();
|
|
28
|
-
const [styleProps, rest] =
|
|
28
|
+
const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
|
|
29
29
|
const height = _react.useMemo.call(void 0, () => {
|
|
30
30
|
const chrome = textArea.paddingVertical * 2;
|
|
31
31
|
return {
|
|
@@ -37,7 +37,7 @@ var TextAreaField = _react.forwardRef.call(void 0,
|
|
|
37
37
|
};
|
|
38
38
|
}, [rows, maxRows, textArea]);
|
|
39
39
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
40
|
-
|
|
40
|
+
_chunkLEWW24RQcjs.TextFieldField,
|
|
41
41
|
{
|
|
42
42
|
ref,
|
|
43
43
|
multiline: true,
|
|
@@ -56,16 +56,16 @@ TextAreaField.displayName = "XAUI.TextArea.Field";
|
|
|
56
56
|
var DEFAULT_ROWS = 3;
|
|
57
57
|
var TextAreaRoot = _react.forwardRef.call(void 0, function TextArea({ rows = DEFAULT_ROWS, maxRows, children, ...props }, ref) {
|
|
58
58
|
const context = _react.useMemo.call(void 0, () => ({ rows, maxRows }), [rows, maxRows]);
|
|
59
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TextAreaProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
59
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TextAreaProvider, { value: context, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLEWW24RQcjs.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: _chunkLEWW24RQcjs.TextFieldLabel,
|
|
66
66
|
Field: TextAreaField,
|
|
67
|
-
Description:
|
|
68
|
-
Error:
|
|
67
|
+
Description: _chunkLEWW24RQcjs.TextFieldDescription,
|
|
68
|
+
Error: _chunkLEWW24RQcjs.TextFieldError
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
|