@xaui/native 0.9.1-beta.97 → 0.9.1-beta.99
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-XCEDD7PE.cjs → chunk-GEWYOB25.cjs} +34 -25
- package/dist/{chunk-EXONAJUX.js → chunk-IYUT2IKZ.js} +26 -17
- package/dist/{chunk-WH7MFY3H.cjs → chunk-JMHB7K53.cjs} +140 -29
- package/dist/{chunk-QT7KLGO3.js → chunk-V5FYHQKQ.js} +102 -87
- package/dist/{chunk-VQG7K5QE.js → chunk-XJEG4Q2R.js} +175 -61
- package/dist/{chunk-SIOSYITD.cjs → chunk-ZBFBF7S4.cjs} +60 -45
- package/dist/components/agenda-calendar/agenda-calendar-today-button.d.cts +4 -0
- package/dist/components/agenda-calendar/agenda-calendar-today-button.d.ts +4 -0
- package/dist/components/agenda-calendar/agenda-calendar.recipe.d.cts +1 -1
- package/dist/components/agenda-calendar/agenda-calendar.recipe.d.ts +1 -1
- package/dist/components/agenda-calendar/agenda-calendar.type.d.cts +4 -1
- package/dist/components/agenda-calendar/agenda-calendar.type.d.ts +4 -1
- package/dist/components/agenda-calendar/index.cjs +2 -2
- package/dist/components/agenda-calendar/index.js +1 -1
- package/dist/components/autocomplete/autocomplete-description.d.cts +14 -0
- package/dist/components/autocomplete/autocomplete-description.d.ts +14 -0
- package/dist/components/autocomplete/autocomplete-error.d.cts +12 -0
- package/dist/components/autocomplete/autocomplete-error.d.ts +12 -0
- package/dist/components/autocomplete/autocomplete-label.d.cts +15 -0
- package/dist/components/autocomplete/autocomplete-label.d.ts +15 -0
- package/dist/components/autocomplete/autocomplete.d.cts +50 -7
- package/dist/components/autocomplete/autocomplete.d.ts +50 -7
- package/dist/components/autocomplete/autocomplete.type.d.cts +21 -4
- package/dist/components/autocomplete/autocomplete.type.d.ts +21 -4
- package/dist/components/autocomplete/index.cjs +9 -2
- package/dist/components/autocomplete/index.d.cts +50 -3
- package/dist/components/autocomplete/index.d.ts +50 -3
- package/dist/components/autocomplete/index.js +8 -1
- package/dist/components/color-picker/index.cjs +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/combobox.type.d.cts +5 -1
- package/dist/components/combobox/combobox.type.d.ts +5 -1
- package/dist/components/combobox/index.cjs +4 -3
- package/dist/components/combobox/index.d.cts +15 -1
- package/dist/components/combobox/index.d.ts +15 -1
- package/dist/components/combobox/index.js +3 -2
- package/dist/components/date-picker/index.cjs +3 -3
- package/dist/components/date-picker/index.js +2 -2
- package/dist/components/mask-field/index.cjs +1 -1
- package/dist/components/mask-field/index.js +1 -1
- package/dist/components/phone-number-field/index.cjs +1 -1
- package/dist/components/phone-number-field/index.js +1 -1
- package/dist/components/search-field/index.cjs +3 -3
- package/dist/components/search-field/index.js +2 -2
- package/dist/index.cjs +10 -10
- package/dist/index.js +9 -9
- package/package.json +1 -1
- package/dist/{chunk-L6EWRWTE.js → chunk-ESP2X6PN.js} +3 -3
- package/dist/{chunk-3CI4JGY4.cjs → chunk-FLKTJ46K.cjs} +2 -2
- package/dist/{chunk-ES7RME6G.js → chunk-M352N6PQ.js} +3 -3
- package/dist/{chunk-7CGF3Z5S.cjs → chunk-VQIQ3ERR.cjs} +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { collectItemLabels, readItemLabel, useLabelRegistry } from "./chunk-4WCBZFAK.js";
|
|
2
2
|
import { useAnchoredPosition } from "./chunk-Z6FRP4EV.js";
|
|
3
|
+
import { textFieldRecipe } from "./chunk-NTVPLDJC.js";
|
|
3
4
|
import { selectRecipe } from "./chunk-AMFGATFY.js";
|
|
4
5
|
import { Portal } from "./chunk-2PMXMKS5.js";
|
|
5
6
|
import { INDICATOR_ROTATION, INDICATOR_SPRING, anchoredEntering, anchoredExiting, overlayEntering, overlayExiting } from "./chunk-64MXEVT3.js";
|
|
@@ -10,13 +11,13 @@ import { usePressState } from "./chunk-423RQBOX.js";
|
|
|
10
11
|
import { ChevronDownIcon, Icon, IconContext } from "./chunk-JN6IRT2M.js";
|
|
11
12
|
import { childrenToString } from "./chunk-WFZDAXDI.js";
|
|
12
13
|
import { createRecipe } from "./chunk-DKVXTMIJ.js";
|
|
13
|
-
import { createSlotContext } from "./chunk-TTZOIXKE.js";
|
|
14
|
+
import { Slot, createSlotContext } from "./chunk-TTZOIXKE.js";
|
|
14
15
|
import { useXAUITheme } from "./chunk-Z6JBWRPL.js";
|
|
15
16
|
import { useStyleProps } from "./chunk-M63GFNKV.js";
|
|
16
17
|
|
|
17
18
|
// src/components/autocomplete/autocomplete.tsx
|
|
18
|
-
import { useCallback, useMemo, useState } from "react";
|
|
19
|
-
import { StyleSheet } from "react-native";
|
|
19
|
+
import { forwardRef, useCallback, useId, useMemo, useState } from "react";
|
|
20
|
+
import { StyleSheet, View } from "react-native";
|
|
20
21
|
|
|
21
22
|
// src/components/autocomplete/autocomplete.context.ts
|
|
22
23
|
var [AutocompleteProvider, useAutocomplete] = createSlotContext("Autocomplete");
|
|
@@ -101,7 +102,7 @@ var autocompleteRecipe = createRecipe({
|
|
|
101
102
|
|
|
102
103
|
// src/components/autocomplete/autocomplete.tsx
|
|
103
104
|
import { jsx } from "react/jsx-runtime";
|
|
104
|
-
|
|
105
|
+
var Autocomplete = forwardRef(function Autocomplete2({
|
|
105
106
|
children,
|
|
106
107
|
variant,
|
|
107
108
|
size,
|
|
@@ -117,14 +118,21 @@ function Autocomplete({
|
|
|
117
118
|
defaultQuery = "",
|
|
118
119
|
onQueryChange,
|
|
119
120
|
isDisabled = false,
|
|
120
|
-
isInvalid = false
|
|
121
|
-
|
|
121
|
+
isInvalid = false,
|
|
122
|
+
asChild = false,
|
|
123
|
+
style,
|
|
124
|
+
...props
|
|
125
|
+
}, ref) {
|
|
122
126
|
const theme = useXAUITheme();
|
|
127
|
+
const [styleProps, rest] = useStyleProps(props);
|
|
123
128
|
const {
|
|
124
129
|
labelFor,
|
|
125
130
|
registerLabel
|
|
126
131
|
} = useLabelRegistry();
|
|
127
132
|
const [anchor, setAnchor] = useState(null);
|
|
133
|
+
const id = useId();
|
|
134
|
+
const labelId = `${id}-label`;
|
|
135
|
+
const descriptionId = `${id}-description`;
|
|
128
136
|
const [value, setValue] = useControllableState({
|
|
129
137
|
value: controlledValue,
|
|
130
138
|
defaultValue,
|
|
@@ -149,10 +157,7 @@ function Autocomplete({
|
|
|
149
157
|
};
|
|
150
158
|
const styles = selectRecipe.resolve({
|
|
151
159
|
theme,
|
|
152
|
-
selection
|
|
153
|
-
states: {
|
|
154
|
-
disabled: isDisabled
|
|
155
|
-
}
|
|
160
|
+
selection
|
|
156
161
|
});
|
|
157
162
|
const pressed = selectRecipe.resolve({
|
|
158
163
|
theme,
|
|
@@ -166,6 +171,16 @@ function Autocomplete({
|
|
|
166
171
|
color,
|
|
167
172
|
selection
|
|
168
173
|
}) : void 0;
|
|
174
|
+
const labelled = textFieldRecipe.resolve({
|
|
175
|
+
theme,
|
|
176
|
+
selection: {
|
|
177
|
+
size,
|
|
178
|
+
isInvalid: isInvalid ? "true" : void 0
|
|
179
|
+
},
|
|
180
|
+
states: {
|
|
181
|
+
disabled: isDisabled
|
|
182
|
+
}
|
|
183
|
+
});
|
|
169
184
|
const own = autocompleteRecipe.resolve({
|
|
170
185
|
theme,
|
|
171
186
|
selection: {
|
|
@@ -208,6 +223,9 @@ function Autocomplete({
|
|
|
208
223
|
itemStyle: styles.item,
|
|
209
224
|
itemPressedStyle: pressed.item,
|
|
210
225
|
itemLabelStyle: styles.itemLabel,
|
|
226
|
+
labelStyle: labelled.label,
|
|
227
|
+
descriptionStyle: labelled.description,
|
|
228
|
+
errorStyle: labelled.error,
|
|
211
229
|
glyph: {
|
|
212
230
|
size: indicator.fontSize,
|
|
213
231
|
color: typeof indicator.color === "string" ? indicator.color : void 0
|
|
@@ -226,18 +244,35 @@ function Autocomplete({
|
|
|
226
244
|
anchor,
|
|
227
245
|
setAnchor,
|
|
228
246
|
labelFor,
|
|
229
|
-
registerLabel
|
|
247
|
+
registerLabel,
|
|
248
|
+
labelId,
|
|
249
|
+
descriptionId
|
|
230
250
|
};
|
|
231
|
-
}, [styles, pressed, tint, own, ownTint, value, query, setQueryState, isOpen, isDisabled, isInvalid, open, close, toggle, select, anchor, labelFor, registerLabel]);
|
|
251
|
+
}, [styles, pressed, tint, own, ownTint, labelled, labelId, descriptionId, value, query, setQueryState, isOpen, isDisabled, isInvalid, open, close, toggle, select, anchor, labelFor, registerLabel]);
|
|
252
|
+
const columnStyle = [labelled.root, styleProps, style];
|
|
253
|
+
const column = asChild ?
|
|
254
|
+
// R12 — the caller's element is the column.
|
|
255
|
+
/* @__PURE__ */
|
|
256
|
+
jsx(Slot, {
|
|
257
|
+
ref,
|
|
258
|
+
...rest,
|
|
259
|
+
style: columnStyle,
|
|
260
|
+
children
|
|
261
|
+
}) : /* @__PURE__ */jsx(View, {
|
|
262
|
+
ref,
|
|
263
|
+
...rest,
|
|
264
|
+
style: columnStyle,
|
|
265
|
+
children
|
|
266
|
+
});
|
|
232
267
|
return /* @__PURE__ */jsx(AutocompleteProvider, {
|
|
233
268
|
value: context,
|
|
234
|
-
children
|
|
269
|
+
children: column
|
|
235
270
|
});
|
|
236
|
-
}
|
|
271
|
+
});
|
|
237
272
|
Autocomplete.displayName = "XAUI.Autocomplete.Root";
|
|
238
273
|
|
|
239
274
|
// src/components/autocomplete/autocomplete-content.tsx
|
|
240
|
-
import { Children as Children2, forwardRef as
|
|
275
|
+
import { Children as Children2, forwardRef as forwardRef6, isValidElement as isValidElement2, useEffect, useMemo as useMemo3 } from "react";
|
|
241
276
|
import { ScrollView } from "react-native";
|
|
242
277
|
import Animated from "react-native-reanimated";
|
|
243
278
|
|
|
@@ -270,10 +305,10 @@ function filterItems(children, query, isItem2) {
|
|
|
270
305
|
}
|
|
271
306
|
|
|
272
307
|
// src/components/autocomplete/autocomplete-empty.tsx
|
|
273
|
-
import { forwardRef } from "react";
|
|
308
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
274
309
|
import { Text } from "react-native";
|
|
275
310
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
276
|
-
var AutocompleteEmpty =
|
|
311
|
+
var AutocompleteEmpty = forwardRef2(function AutocompleteEmpty2({
|
|
277
312
|
children,
|
|
278
313
|
style,
|
|
279
314
|
...props
|
|
@@ -292,13 +327,13 @@ var AutocompleteEmpty = forwardRef(function AutocompleteEmpty2({
|
|
|
292
327
|
AutocompleteEmpty.displayName = "XAUI.Autocomplete.Empty";
|
|
293
328
|
|
|
294
329
|
// src/components/autocomplete/autocomplete-item.tsx
|
|
295
|
-
import { forwardRef as
|
|
330
|
+
import { forwardRef as forwardRef4, useCallback as useCallback2, useMemo as useMemo2 } from "react";
|
|
296
331
|
|
|
297
332
|
// src/components/autocomplete/autocomplete-item-label.tsx
|
|
298
|
-
import { forwardRef as
|
|
333
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
299
334
|
import { Text as Text2 } from "react-native";
|
|
300
335
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
301
|
-
var AutocompleteItemLabel =
|
|
336
|
+
var AutocompleteItemLabel = forwardRef3(function AutocompleteItemLabel2({
|
|
302
337
|
children,
|
|
303
338
|
style,
|
|
304
339
|
...props
|
|
@@ -318,7 +353,7 @@ AutocompleteItemLabel.displayName = "XAUI.Autocomplete.ItemLabel";
|
|
|
318
353
|
|
|
319
354
|
// src/components/autocomplete/autocomplete-item.tsx
|
|
320
355
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
321
|
-
var AutocompleteItem =
|
|
356
|
+
var AutocompleteItem = forwardRef4(function AutocompleteItem2({
|
|
322
357
|
value,
|
|
323
358
|
label,
|
|
324
359
|
children,
|
|
@@ -385,10 +420,10 @@ var AutocompleteItem = forwardRef3(function AutocompleteItem2({
|
|
|
385
420
|
AutocompleteItem.displayName = "XAUI.Autocomplete.Item";
|
|
386
421
|
|
|
387
422
|
// src/components/autocomplete/autocomplete-search.tsx
|
|
388
|
-
import { forwardRef as
|
|
423
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
389
424
|
import { TextInput } from "react-native";
|
|
390
425
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
391
|
-
var AutocompleteSearch =
|
|
426
|
+
var AutocompleteSearch = forwardRef5(function AutocompleteSearch2({
|
|
392
427
|
autoFocus = true,
|
|
393
428
|
style,
|
|
394
429
|
...props
|
|
@@ -429,7 +464,7 @@ var DEFAULT_INSETS = {
|
|
|
429
464
|
var isItem = type => type === AutocompleteItem;
|
|
430
465
|
var isSearch = type => type === AutocompleteSearch;
|
|
431
466
|
var isEmpty = type => type === AutocompleteEmpty;
|
|
432
|
-
var AutocompleteContent =
|
|
467
|
+
var AutocompleteContent = forwardRef6(function AutocompleteContent2({
|
|
433
468
|
children,
|
|
434
469
|
placement = "bottom",
|
|
435
470
|
align = "center",
|
|
@@ -533,14 +568,61 @@ function partition(children) {
|
|
|
533
568
|
};
|
|
534
569
|
}
|
|
535
570
|
|
|
571
|
+
// src/components/autocomplete/autocomplete-description.tsx
|
|
572
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
573
|
+
import { Text as Text3 } from "react-native";
|
|
574
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
575
|
+
var AutocompleteDescription = forwardRef7(function AutocompleteDescription2({
|
|
576
|
+
children,
|
|
577
|
+
style,
|
|
578
|
+
nativeID,
|
|
579
|
+
...props
|
|
580
|
+
}, ref) {
|
|
581
|
+
const {
|
|
582
|
+
descriptionStyle,
|
|
583
|
+
descriptionId
|
|
584
|
+
} = useAutocomplete();
|
|
585
|
+
const [styleProps, rest] = useStyleProps(props);
|
|
586
|
+
return /* @__PURE__ */jsx7(Text3, {
|
|
587
|
+
ref,
|
|
588
|
+
nativeID: nativeID ?? descriptionId,
|
|
589
|
+
style: [descriptionStyle, styleProps, style],
|
|
590
|
+
...rest,
|
|
591
|
+
children
|
|
592
|
+
});
|
|
593
|
+
});
|
|
594
|
+
AutocompleteDescription.displayName = "XAUI.Autocomplete.Description";
|
|
595
|
+
|
|
596
|
+
// src/components/autocomplete/autocomplete-error.tsx
|
|
597
|
+
import { forwardRef as forwardRef8 } from "react";
|
|
598
|
+
import { Text as Text4 } from "react-native";
|
|
599
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
600
|
+
var AutocompleteError = forwardRef8(function AutocompleteError2({
|
|
601
|
+
children,
|
|
602
|
+
style,
|
|
603
|
+
...props
|
|
604
|
+
}, ref) {
|
|
605
|
+
const {
|
|
606
|
+
errorStyle
|
|
607
|
+
} = useAutocomplete();
|
|
608
|
+
const [styleProps, rest] = useStyleProps(props);
|
|
609
|
+
return /* @__PURE__ */jsx8(Text4, {
|
|
610
|
+
ref,
|
|
611
|
+
style: [errorStyle, styleProps, style],
|
|
612
|
+
...rest,
|
|
613
|
+
children
|
|
614
|
+
});
|
|
615
|
+
});
|
|
616
|
+
AutocompleteError.displayName = "XAUI.Autocomplete.Error";
|
|
617
|
+
|
|
536
618
|
// src/components/autocomplete/autocomplete-indicator.tsx
|
|
537
619
|
import { useEffect as useEffect2 } from "react";
|
|
538
620
|
import Animated2, { interpolate, useAnimatedStyle, useSharedValue, withSpring } from "react-native-reanimated";
|
|
539
|
-
import { jsx as
|
|
540
|
-
const
|
|
541
|
-
code: "function
|
|
542
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
543
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
621
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
622
|
+
const _worklet_6900067877253_init_data = {
|
|
623
|
+
code: "function chunkXJEG4Q2RJs1(){const{interpolate,progress,INDICATOR_ROTATION}=this.__closure;return{transform:[{rotate:interpolate(progress.get(),[0,1],[INDICATOR_ROTATION[0],INDICATOR_ROTATION[1]])+\"deg\"}]};}",
|
|
624
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-XJEG4Q2R.js",
|
|
625
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkXJEG4Q2RJs1\",\"interpolate\",\"progress\",\"INDICATOR_ROTATION\",\"__closure\",\"transform\",\"rotate\",\"get\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-XJEG4Q2R.js\"],\"mappings\":\"AAwlBoC,SAAAA,gBAAMA,CAAA,QAAAC,WAAA,CAAAC,QAAA,CAAAC,kBAAA,OAAAC,SAAA,CAEtC,MAAO,CACLC,SAAS,CAAE,CACT,CACEC,MAAM,CAAKL,WAAW,CAACC,QAAQ,CAACK,GAAG,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAACJ,kBAAkB,CAAC,CAAC,CAAC,CAAEA,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,MAChG,CAAC,CAEL,CAAC,CACH\",\"ignoreList\":[]}"
|
|
544
626
|
};
|
|
545
627
|
function AutocompleteIndicator(props) {
|
|
546
628
|
const {
|
|
@@ -554,52 +636,77 @@ function AutocompleteIndicator(props) {
|
|
|
554
636
|
useEffect2(() => {
|
|
555
637
|
progress.set(withSpring(isOpen ? 1 : 0, INDICATOR_SPRING));
|
|
556
638
|
}, [isOpen, progress]);
|
|
557
|
-
const rotation = useAnimatedStyle(function
|
|
558
|
-
|
|
639
|
+
const rotation = useAnimatedStyle(function chunkXJEG4Q2RJs1Factory({
|
|
640
|
+
_worklet_6900067877253_init_data,
|
|
559
641
|
interpolate,
|
|
560
642
|
progress,
|
|
561
643
|
INDICATOR_ROTATION
|
|
562
644
|
}) {
|
|
563
645
|
const _e = [new global.Error(), -4, -27];
|
|
564
|
-
const
|
|
646
|
+
const chunkXJEG4Q2RJs1 = function () {
|
|
565
647
|
return {
|
|
566
648
|
transform: [{
|
|
567
649
|
rotate: `${interpolate(progress.get(), [0, 1], [INDICATOR_ROTATION[0], INDICATOR_ROTATION[1]])}deg`
|
|
568
650
|
}]
|
|
569
651
|
};
|
|
570
652
|
};
|
|
571
|
-
|
|
653
|
+
chunkXJEG4Q2RJs1.__closure = {
|
|
572
654
|
interpolate,
|
|
573
655
|
progress,
|
|
574
656
|
INDICATOR_ROTATION
|
|
575
657
|
};
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
return
|
|
658
|
+
chunkXJEG4Q2RJs1.__workletHash = 6900067877253;
|
|
659
|
+
chunkXJEG4Q2RJs1.__pluginVersion = "0.7.4";
|
|
660
|
+
chunkXJEG4Q2RJs1.__initData = _worklet_6900067877253_init_data;
|
|
661
|
+
chunkXJEG4Q2RJs1.__stackDetails = _e;
|
|
662
|
+
return chunkXJEG4Q2RJs1;
|
|
581
663
|
}({
|
|
582
|
-
|
|
664
|
+
_worklet_6900067877253_init_data,
|
|
583
665
|
interpolate,
|
|
584
666
|
progress,
|
|
585
667
|
INDICATOR_ROTATION
|
|
586
668
|
}), [progress]);
|
|
587
|
-
return /* @__PURE__ */
|
|
669
|
+
return /* @__PURE__ */jsx9(Animated2.View, {
|
|
588
670
|
style: [indicatorStyle, rotation],
|
|
589
|
-
children: /* @__PURE__ */
|
|
671
|
+
children: /* @__PURE__ */jsx9(Icon, {
|
|
590
672
|
as
|
|
591
673
|
})
|
|
592
674
|
});
|
|
593
675
|
}
|
|
594
676
|
AutocompleteIndicator.displayName = "XAUI.Autocomplete.Indicator";
|
|
595
677
|
|
|
678
|
+
// src/components/autocomplete/autocomplete-label.tsx
|
|
679
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
680
|
+
import { Text as Text5 } from "react-native";
|
|
681
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
682
|
+
var AutocompleteLabel = forwardRef9(function AutocompleteLabel2({
|
|
683
|
+
children,
|
|
684
|
+
style,
|
|
685
|
+
nativeID,
|
|
686
|
+
...props
|
|
687
|
+
}, ref) {
|
|
688
|
+
const {
|
|
689
|
+
labelStyle,
|
|
690
|
+
labelId
|
|
691
|
+
} = useAutocomplete();
|
|
692
|
+
const [styleProps, rest] = useStyleProps(props);
|
|
693
|
+
return /* @__PURE__ */jsx10(Text5, {
|
|
694
|
+
ref,
|
|
695
|
+
nativeID: nativeID ?? labelId,
|
|
696
|
+
style: [labelStyle, styleProps, style],
|
|
697
|
+
...rest,
|
|
698
|
+
children
|
|
699
|
+
});
|
|
700
|
+
});
|
|
701
|
+
AutocompleteLabel.displayName = "XAUI.Autocomplete.Label";
|
|
702
|
+
|
|
596
703
|
// src/components/autocomplete/autocomplete-overlay.tsx
|
|
597
|
-
import { forwardRef as
|
|
704
|
+
import { forwardRef as forwardRef10 } from "react";
|
|
598
705
|
import { Pressable } from "react-native";
|
|
599
706
|
import Animated3 from "react-native-reanimated";
|
|
600
|
-
import { jsx as
|
|
707
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
601
708
|
var AnimatedPressable = Animated3.createAnimatedComponent(Pressable);
|
|
602
|
-
var AutocompleteOverlay =
|
|
709
|
+
var AutocompleteOverlay = forwardRef10(function AutocompleteOverlay2({
|
|
603
710
|
children,
|
|
604
711
|
style,
|
|
605
712
|
...props
|
|
@@ -612,10 +719,10 @@ var AutocompleteOverlay = forwardRef6(function AutocompleteOverlay2({
|
|
|
612
719
|
} = context;
|
|
613
720
|
const [styleProps, rest] = useStyleProps(props);
|
|
614
721
|
if (!isOpen) return null;
|
|
615
|
-
return /* @__PURE__ */
|
|
616
|
-
children: /* @__PURE__ */
|
|
722
|
+
return /* @__PURE__ */jsx11(Portal, {
|
|
723
|
+
children: /* @__PURE__ */jsx11(AutocompleteProvider, {
|
|
617
724
|
value: context,
|
|
618
|
-
children: /* @__PURE__ */
|
|
725
|
+
children: /* @__PURE__ */jsx11(AnimatedPressable, {
|
|
619
726
|
ref,
|
|
620
727
|
entering: overlayEntering,
|
|
621
728
|
exiting: overlayExiting,
|
|
@@ -632,9 +739,9 @@ var AutocompleteOverlay = forwardRef6(function AutocompleteOverlay2({
|
|
|
632
739
|
AutocompleteOverlay.displayName = "XAUI.Autocomplete.Overlay";
|
|
633
740
|
|
|
634
741
|
// src/components/autocomplete/autocomplete-trigger.tsx
|
|
635
|
-
import { forwardRef as
|
|
636
|
-
import { jsx as
|
|
637
|
-
var AutocompleteTrigger =
|
|
742
|
+
import { forwardRef as forwardRef11, useCallback as useCallback3, useEffect as useEffect3, useRef } from "react";
|
|
743
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
744
|
+
var AutocompleteTrigger = forwardRef11(function AutocompleteTrigger2({
|
|
638
745
|
children,
|
|
639
746
|
asChild = false,
|
|
640
747
|
accessibilityRole = "combobox",
|
|
@@ -654,7 +761,9 @@ var AutocompleteTrigger = forwardRef7(function AutocompleteTrigger2({
|
|
|
654
761
|
isDisabled,
|
|
655
762
|
isInvalid,
|
|
656
763
|
toggle,
|
|
657
|
-
setAnchor
|
|
764
|
+
setAnchor,
|
|
765
|
+
labelId,
|
|
766
|
+
descriptionId
|
|
658
767
|
} = useAutocomplete();
|
|
659
768
|
const [styleProps, rest] = useStyleProps(props);
|
|
660
769
|
const [isPressed, press] = usePressState({
|
|
@@ -685,9 +794,9 @@ var AutocompleteTrigger = forwardRef7(function AutocompleteTrigger2({
|
|
|
685
794
|
measure();
|
|
686
795
|
toggle();
|
|
687
796
|
}, [measure, onPress, toggle]);
|
|
688
|
-
return /* @__PURE__ */
|
|
797
|
+
return /* @__PURE__ */jsx12(IconContext.Provider, {
|
|
689
798
|
value: glyph,
|
|
690
|
-
children: /* @__PURE__ */
|
|
799
|
+
children: /* @__PURE__ */jsx12(PressableFeedback, {
|
|
691
800
|
ref: refs,
|
|
692
801
|
isPressed,
|
|
693
802
|
isDisabled,
|
|
@@ -699,6 +808,8 @@ var AutocompleteTrigger = forwardRef7(function AutocompleteTrigger2({
|
|
|
699
808
|
...accessibilityState
|
|
700
809
|
},
|
|
701
810
|
"aria-invalid": isInvalid || void 0,
|
|
811
|
+
"aria-labelledby": labelId,
|
|
812
|
+
"aria-describedby": descriptionId,
|
|
702
813
|
...rest,
|
|
703
814
|
onLayout: handleLayout,
|
|
704
815
|
style: [triggerStyle, isPressed && triggerPressedStyle, styleProps, typeof style === "function" ? style({
|
|
@@ -714,10 +825,10 @@ var AutocompleteTrigger = forwardRef7(function AutocompleteTrigger2({
|
|
|
714
825
|
AutocompleteTrigger.displayName = "XAUI.Autocomplete.Trigger";
|
|
715
826
|
|
|
716
827
|
// src/components/autocomplete/autocomplete-value.tsx
|
|
717
|
-
import { forwardRef as
|
|
718
|
-
import { Text as
|
|
719
|
-
import { jsx as
|
|
720
|
-
var AutocompleteValue =
|
|
828
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
829
|
+
import { Text as Text6 } from "react-native";
|
|
830
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
831
|
+
var AutocompleteValue = forwardRef12(function AutocompleteValue2({
|
|
721
832
|
children,
|
|
722
833
|
placeholder,
|
|
723
834
|
style,
|
|
@@ -732,7 +843,7 @@ var AutocompleteValue = forwardRef8(function AutocompleteValue2({
|
|
|
732
843
|
const [styleProps, rest] = useStyleProps(props);
|
|
733
844
|
const label = children ?? (value === void 0 ? void 0 : labelFor(value));
|
|
734
845
|
const isEmpty2 = label === void 0 || label === null;
|
|
735
|
-
return /* @__PURE__ */
|
|
846
|
+
return /* @__PURE__ */jsx13(Text6, {
|
|
736
847
|
ref,
|
|
737
848
|
numberOfLines: 1,
|
|
738
849
|
...rest,
|
|
@@ -743,7 +854,8 @@ var AutocompleteValue = forwardRef8(function AutocompleteValue2({
|
|
|
743
854
|
AutocompleteValue.displayName = "XAUI.Autocomplete.Value";
|
|
744
855
|
|
|
745
856
|
// src/components/autocomplete/index.ts
|
|
746
|
-
var
|
|
857
|
+
var Autocomplete3 = Object.assign(Autocomplete, {
|
|
858
|
+
Label: AutocompleteLabel,
|
|
747
859
|
Trigger: AutocompleteTrigger,
|
|
748
860
|
Value: AutocompleteValue,
|
|
749
861
|
Indicator: AutocompleteIndicator,
|
|
@@ -752,6 +864,8 @@ var Autocomplete2 = Object.assign(Autocomplete, {
|
|
|
752
864
|
Search: AutocompleteSearch,
|
|
753
865
|
Item: AutocompleteItem,
|
|
754
866
|
ItemLabel: AutocompleteItemLabel,
|
|
755
|
-
Empty: AutocompleteEmpty
|
|
867
|
+
Empty: AutocompleteEmpty,
|
|
868
|
+
Description: AutocompleteDescription,
|
|
869
|
+
Error: AutocompleteError
|
|
756
870
|
});
|
|
757
|
-
export { useAutocomplete, useAutocompleteItem, autocompleteRecipe, Autocomplete, AutocompleteEmpty, AutocompleteItemLabel, AutocompleteItem, AutocompleteSearch, AutocompleteContent, AutocompleteIndicator, AutocompleteOverlay, AutocompleteTrigger, AutocompleteValue, Autocomplete2 };
|
|
871
|
+
export { useAutocomplete, useAutocompleteItem, autocompleteRecipe, Autocomplete, AutocompleteEmpty, AutocompleteItemLabel, AutocompleteItem, AutocompleteSearch, AutocompleteContent, AutocompleteDescription, AutocompleteError, AutocompleteIndicator, AutocompleteLabel, AutocompleteOverlay, AutocompleteTrigger, AutocompleteValue, Autocomplete3 as Autocomplete2 };
|
|
@@ -324,14 +324,30 @@ var AgendaCalendarNextButton = navButton(1, "XAUI.AgendaCalendar.NextButton", sh
|
|
|
324
324
|
// src/components/agenda-calendar/agenda-calendar.recipe.ts
|
|
325
325
|
var SLOTS = ["root", "header", "nav", "navButton", "today", "todayDisabled", "todayLabel", "week", "picker", "pickerItem"];
|
|
326
326
|
var VARIANT_TOKENS = {
|
|
327
|
-
//
|
|
328
|
-
//
|
|
329
|
-
//
|
|
330
|
-
//
|
|
331
|
-
//
|
|
332
|
-
|
|
333
|
-
|
|
327
|
+
// The four the `Calendar` declares, answered on the pill rather than on a disc. The
|
|
328
|
+
// variant is a level of emphasis, and the two controls it reaches are the chosen day and
|
|
329
|
+
// this button — a strip whose chosen day is a soft wash under a pill that kept a hard
|
|
330
|
+
// accent border is two variants on one card.
|
|
331
|
+
//
|
|
332
|
+
// The emphasis runs the other way round from a `Button`'s, and on purpose: `primary`
|
|
333
|
+
// outlines rather than fills. The pill sits between two bare chevrons, so the filled
|
|
334
|
+
// accent that makes a `Button` primary would read here as the primary action of the whole
|
|
335
|
+
// card — the accent goes on the word instead, which is where the strip's own accent is.
|
|
336
|
+
primary: {
|
|
337
|
+
border: "border",
|
|
334
338
|
fg: "accent"
|
|
339
|
+
},
|
|
340
|
+
secondary: {
|
|
341
|
+
bg: "accentSoft",
|
|
342
|
+
fg: "accentSoftForeground"
|
|
343
|
+
},
|
|
344
|
+
tertiary: {
|
|
345
|
+
bg: "default",
|
|
346
|
+
fg: "defaultForeground"
|
|
347
|
+
},
|
|
348
|
+
// No fill and no border: the word alone, as `ghost` means everywhere else.
|
|
349
|
+
ghost: {
|
|
350
|
+
fg: "foreground"
|
|
335
351
|
}
|
|
336
352
|
};
|
|
337
353
|
var SIZES = {
|
|
@@ -410,18 +426,14 @@ var agendaCalendarRecipe = _chunkSL3V7R2Ycjs.createRecipe.call(void 0, {
|
|
|
410
426
|
alignItems: "center",
|
|
411
427
|
justifyContent: "center"
|
|
412
428
|
},
|
|
413
|
-
//
|
|
414
|
-
// filled button there would read as the primary action of the whole card.
|
|
429
|
+
// The box only. Whether it is outlined, washed or bare is the variant's, below.
|
|
415
430
|
today: {
|
|
416
431
|
alignItems: "center",
|
|
417
|
-
justifyContent: "center"
|
|
418
|
-
borderWidth: theme.borderWidth.default,
|
|
419
|
-
borderColor: theme.colors.border
|
|
432
|
+
justifyContent: "center"
|
|
420
433
|
},
|
|
421
434
|
todayLabel: {
|
|
422
435
|
fontFamily: theme.fontFamilies.body,
|
|
423
|
-
fontWeight: theme.fontWeights.medium
|
|
424
|
-
color: theme.colors.accent
|
|
436
|
+
fontWeight: theme.fontWeights.medium
|
|
425
437
|
},
|
|
426
438
|
week: {
|
|
427
439
|
flexDirection: "row"
|
|
@@ -445,14 +457,20 @@ var agendaCalendarRecipe = _chunkSL3V7R2Ycjs.createRecipe.call(void 0, {
|
|
|
445
457
|
}
|
|
446
458
|
}),
|
|
447
459
|
variantTokens: VARIANT_TOKENS,
|
|
448
|
-
// The
|
|
449
|
-
//
|
|
450
|
-
//
|
|
451
|
-
|
|
460
|
+
// The `Button`'s own paint, one slot down: the border's *width* follows the presence of
|
|
461
|
+
// the border role rather than a per-variant flag, because which variant outlines is
|
|
462
|
+
// already stated in the table above. `undefined` where a variant names no `bg` is the
|
|
463
|
+
// transparent the outlined and the bare pill both want.
|
|
464
|
+
paint: (theme, colors) => ({
|
|
465
|
+
today: {
|
|
466
|
+
backgroundColor: colors.bg,
|
|
467
|
+
borderColor: colors.border,
|
|
468
|
+
borderWidth: colors.border ? theme.borderWidth.default : 0
|
|
469
|
+
},
|
|
452
470
|
todayLabel: {
|
|
453
471
|
color: colors.fg
|
|
454
472
|
}
|
|
455
|
-
}
|
|
473
|
+
}),
|
|
456
474
|
variants: {
|
|
457
475
|
size: {
|
|
458
476
|
sm: sizeAxis(SIZES.sm),
|
|
@@ -469,11 +487,12 @@ var agendaCalendarRecipe = _chunkSL3V7R2Ycjs.createRecipe.call(void 0, {
|
|
|
469
487
|
}
|
|
470
488
|
})
|
|
471
489
|
},
|
|
472
|
-
// `
|
|
473
|
-
//
|
|
474
|
-
//
|
|
490
|
+
// The `Calendar`'s default, because the two resolve from the same `variant` prop and a
|
|
491
|
+
// card whose strip defaulted to one and whose pill to another is not one component.
|
|
492
|
+
// Naming it is also what makes `paint` and `tint` run at all — without a variant both are
|
|
493
|
+
// handed no colours, and the pill loses its word to RN's black.
|
|
475
494
|
defaultVariants: {
|
|
476
|
-
variant: "
|
|
495
|
+
variant: "primary",
|
|
477
496
|
size: "md"
|
|
478
497
|
}
|
|
479
498
|
});
|
|
@@ -528,14 +547,14 @@ var AgendaCalendarRoot = _react.forwardRef.call(void 0, function AgendaCalendar(
|
|
|
528
547
|
});
|
|
529
548
|
const resolvedLocale = _nullishCoalesce(locale, () => deviceLocale());
|
|
530
549
|
const weekStart = _nullishCoalesce(firstDayOfWeek, () => _chunkISHMSP6Pcjs.firstDayOfWeekFor.call(void 0, resolvedLocale));
|
|
531
|
-
const
|
|
550
|
+
const selection = {
|
|
532
551
|
variant,
|
|
533
552
|
size,
|
|
534
553
|
radius
|
|
535
554
|
};
|
|
536
555
|
const cells = _chunk6ZWQDTGQcjs.calendarRecipe.resolve({
|
|
537
556
|
theme,
|
|
538
|
-
selection
|
|
557
|
+
selection,
|
|
539
558
|
states: {
|
|
540
559
|
disabled: isDisabled
|
|
541
560
|
}
|
|
@@ -543,12 +562,8 @@ var AgendaCalendarRoot = _react.forwardRef.call(void 0, function AgendaCalendar(
|
|
|
543
562
|
const cellTint = color ? _chunk6ZWQDTGQcjs.calendarRecipe.tint({
|
|
544
563
|
theme,
|
|
545
564
|
color,
|
|
546
|
-
selection
|
|
565
|
+
selection
|
|
547
566
|
}) : void 0;
|
|
548
|
-
const selection = {
|
|
549
|
-
size,
|
|
550
|
-
radius
|
|
551
|
-
};
|
|
552
567
|
const styles = agendaCalendarRecipe.resolve({
|
|
553
568
|
theme,
|
|
554
569
|
selection,
|
|
@@ -646,7 +661,7 @@ var AgendaCalendarRoot = _react.forwardRef.call(void 0, function AgendaCalendar(
|
|
|
646
661
|
},
|
|
647
662
|
pickerItemLabelStyle: cells.dayLabel,
|
|
648
663
|
pickerItemLabelSelectedStyle: cellTint ? [cells.dayLabelSelected, cellTint.dayLabelSelected] : cells.dayLabelSelected,
|
|
649
|
-
todayStyle: styles.today,
|
|
664
|
+
todayStyle: tint ? [styles.today, tint.today] : styles.today,
|
|
650
665
|
todayDisabledStyle: styles.todayDisabled,
|
|
651
666
|
todayLabelStyle: tint ? [styles.todayLabel, tint.todayLabel] : styles.todayLabel,
|
|
652
667
|
weekStyle: styles.week,
|
|
@@ -806,10 +821,10 @@ var SPRING = {
|
|
|
806
821
|
stiffness: 220,
|
|
807
822
|
mass: 0.6
|
|
808
823
|
};
|
|
809
|
-
const
|
|
810
|
-
code: "function
|
|
811
|
-
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-
|
|
812
|
-
sourceMap: "{\"version\":3,\"names\":[\"
|
|
824
|
+
const _worklet_368808865208_init_data = {
|
|
825
|
+
code: "function chunkZBFBF7S4Cjs1(){const{drag}=this.__closure;return{transform:[{translateX:drag.get()}]};}",
|
|
826
|
+
location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-ZBFBF7S4.cjs",
|
|
827
|
+
sourceMap: "{\"version\":3,\"names\":[\"chunkZBFBF7S4Cjs1\",\"drag\",\"__closure\",\"transform\",\"translateX\",\"get\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-ZBFBF7S4.cjs\"],\"mappings\":\"AA+0BuE,SAAAA,iBAAMA,CAAA,QAAAC,IAAA,OAAAC,SAAA,CAEvE,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEH,IAAI,CAACI,GAAG,CAAC,CAAE,CAAC,CAAE,CAAC,CACpD\",\"ignoreList\":[]}"
|
|
813
828
|
};
|
|
814
829
|
var AgendaCalendarWeek = _react.forwardRef.call(void 0, function AgendaCalendarWeek2({
|
|
815
830
|
children,
|
|
@@ -839,28 +854,28 @@ var AgendaCalendarWeek = _react.forwardRef.call(void 0, function AgendaCalendarW
|
|
|
839
854
|
}).onFinalize(() => {
|
|
840
855
|
drag.set(_reactnativereanimated.withSpring.call(void 0, 0, SPRING));
|
|
841
856
|
});
|
|
842
|
-
const slide = _reactnativereanimated.useAnimatedStyle.call(void 0, function
|
|
843
|
-
|
|
857
|
+
const slide = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkZBFBF7S4Cjs1Factory({
|
|
858
|
+
_worklet_368808865208_init_data,
|
|
844
859
|
drag
|
|
845
860
|
}) {
|
|
846
861
|
const _e = [new global.Error(), -2, -27];
|
|
847
|
-
const
|
|
862
|
+
const chunkZBFBF7S4Cjs1 = function () {
|
|
848
863
|
return {
|
|
849
864
|
transform: [{
|
|
850
865
|
translateX: drag.get()
|
|
851
866
|
}]
|
|
852
867
|
};
|
|
853
868
|
};
|
|
854
|
-
|
|
869
|
+
chunkZBFBF7S4Cjs1.__closure = {
|
|
855
870
|
drag
|
|
856
871
|
};
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
return
|
|
872
|
+
chunkZBFBF7S4Cjs1.__workletHash = 368808865208;
|
|
873
|
+
chunkZBFBF7S4Cjs1.__pluginVersion = "0.7.4";
|
|
874
|
+
chunkZBFBF7S4Cjs1.__initData = _worklet_368808865208_init_data;
|
|
875
|
+
chunkZBFBF7S4Cjs1.__stackDetails = _e;
|
|
876
|
+
return chunkZBFBF7S4Cjs1;
|
|
862
877
|
}({
|
|
863
|
-
|
|
878
|
+
_worklet_368808865208_init_data,
|
|
864
879
|
drag
|
|
865
880
|
}), [drag]);
|
|
866
881
|
const cells = days.map(date => /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
|
|
@@ -13,6 +13,10 @@ import { View } from 'react-native';
|
|
|
13
13
|
*
|
|
14
14
|
* The word is the caller's: "Today", "Aujourd'hui", "Hoy". R3 wraps a text child into the
|
|
15
15
|
* label, so `<AgendaCalendar.TodayButton>Today</…>` is the whole call.
|
|
16
|
+
*
|
|
17
|
+
* **It wears the card's `variant`**, the one that aims the chosen day: outlined with the
|
|
18
|
+
* word in the accent on `primary`, a soft fill on `secondary`, a neutral one on `tertiary`,
|
|
19
|
+
* the bare word on `ghost`. Nothing to pass — the pill reads the root's resolution.
|
|
16
20
|
*/
|
|
17
21
|
export declare const AgendaCalendarTodayButton: import("react").ForwardRefExoticComponent<{
|
|
18
22
|
children?: import("react").ReactNode;
|