@avenue-ticketing/native 0.1.8 → 0.1.10
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/avatar.js +61 -37
- package/dist/avatar.js.map +1 -1
- package/dist/button.js +12 -5
- package/dist/button.js.map +1 -1
- package/dist/date-picker.js +12 -5
- package/dist/date-picker.js.map +1 -1
- package/dist/dropdown.js +58 -26
- package/dist/dropdown.js.map +1 -1
- package/dist/input.js +92 -78
- package/dist/input.js.map +1 -1
- package/dist/multi-select.js +69 -30
- package/dist/multi-select.js.map +1 -1
- package/dist/select-item.js +59 -27
- package/dist/select-item.js.map +1 -1
- package/dist/select.js +58 -26
- package/dist/select.js.map +1 -1
- package/dist/tabs.d.ts +2 -1
- package/dist/tabs.js +31 -10
- package/dist/tabs.js.map +1 -1
- package/dist/tag-select.js +102 -55
- package/dist/tag-select.js.map +1 -1
- package/package.json +1 -1
- package/theme-dark.css +4 -1
package/dist/input.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useContext, useState, useCallback, useEffect, useMemo, useRef, isValidElement } from 'react';
|
|
2
|
-
import { StyleSheet, useColorScheme, Platform, Modal, View as View$1, Pressable as Pressable$1, Linking } from 'react-native';
|
|
2
|
+
import { StyleSheet, useColorScheme, Platform, Modal, View as View$1, Pressable as Pressable$1, StatusBar, Linking } from 'react-native';
|
|
3
3
|
import { useNativeVariable } from 'react-native-css';
|
|
4
4
|
import { View, Text, TextInput, Pressable, FlatList } from 'react-native-css/components';
|
|
5
5
|
import { EyeIcon } from 'phosphor-react-native/src/icons/Eye';
|
|
@@ -6198,78 +6198,85 @@ var PhoneCountrySelect = ({
|
|
|
6198
6198
|
animationType: "slide",
|
|
6199
6199
|
presentationStyle: "pageSheet",
|
|
6200
6200
|
onRequestClose: close,
|
|
6201
|
-
children: /* @__PURE__ */ jsx(InputGroupContext.Provider, { value: null, children: /* @__PURE__ */ jsx(ShellFocusContext.Provider, { value: null, children: /* @__PURE__ */ jsxs(
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
{
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
className: phoneCountryStyles.
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6201
|
+
children: /* @__PURE__ */ jsx(InputGroupContext.Provider, { value: null, children: /* @__PURE__ */ jsx(ShellFocusContext.Provider, { value: null, children: /* @__PURE__ */ jsxs(
|
|
6202
|
+
View,
|
|
6203
|
+
{
|
|
6204
|
+
className: phoneCountryStyles.sheet,
|
|
6205
|
+
style: Platform.OS === "android" ? { paddingTop: StatusBar.currentHeight ?? 0 } : void 0,
|
|
6206
|
+
children: [
|
|
6207
|
+
/* @__PURE__ */ jsxs(View, { className: phoneCountryStyles.header, children: [
|
|
6208
|
+
/* @__PURE__ */ jsx(View, { className: phoneCountryStyles.headerSide }),
|
|
6209
|
+
/* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.headerTitle, children: "Select country" }),
|
|
6210
|
+
/* @__PURE__ */ jsx(
|
|
6211
|
+
Pressable,
|
|
6212
|
+
{
|
|
6213
|
+
accessibilityRole: "button",
|
|
6214
|
+
accessibilityLabel: "Close",
|
|
6215
|
+
onPress: close,
|
|
6216
|
+
className: phoneCountryStyles.headerClose,
|
|
6217
|
+
children: /* @__PURE__ */ jsx(XIcon, { size: 20, weight: "regular", color: fgPrimary })
|
|
6218
|
+
}
|
|
6219
|
+
)
|
|
6220
|
+
] }),
|
|
6221
|
+
/* @__PURE__ */ jsxs(View, { className: phoneCountryStyles.body, children: [
|
|
6222
|
+
/* @__PURE__ */ jsx(View, { className: phoneCountryStyles.searchWrap, children: /* @__PURE__ */ jsx(
|
|
6223
|
+
InputBase,
|
|
6224
|
+
{
|
|
6225
|
+
size: "lg",
|
|
6226
|
+
placeholder: "Search countries",
|
|
6227
|
+
icon: MagnifyingGlassIcon,
|
|
6228
|
+
value: search,
|
|
6229
|
+
onChangeText: setSearch,
|
|
6230
|
+
autoCapitalize: "none",
|
|
6231
|
+
autoCorrect: false
|
|
6232
|
+
}
|
|
6233
|
+
) }),
|
|
6234
|
+
/* @__PURE__ */ jsxs(View, { className: phoneCountryStyles.listRow, children: [
|
|
6235
|
+
/* @__PURE__ */ jsx(
|
|
6236
|
+
FlatList,
|
|
6237
|
+
{
|
|
6238
|
+
ref: listRef,
|
|
6239
|
+
className: phoneCountryStyles.listPane,
|
|
6240
|
+
contentContainerClassName: search.trim() ? phoneCountryStyles.listContentSearch : void 0,
|
|
6241
|
+
data: rows,
|
|
6242
|
+
extraData: value,
|
|
6243
|
+
keyboardShouldPersistTaps: "always",
|
|
6244
|
+
showsVerticalScrollIndicator: false,
|
|
6245
|
+
keyExtractor: (item) => item.type === "letter" ? `letter-${item.letter}` : item.country.iso,
|
|
6246
|
+
onScrollToIndexFailed: (info) => {
|
|
6247
|
+
setTimeout(() => {
|
|
6248
|
+
listRef.current?.scrollToIndex({
|
|
6249
|
+
index: info.index,
|
|
6250
|
+
animated: true,
|
|
6251
|
+
viewPosition: 0.1
|
|
6252
|
+
});
|
|
6253
|
+
}, 100);
|
|
6254
|
+
},
|
|
6255
|
+
ListHeaderComponent: search.trim() ? null : /* @__PURE__ */ jsxs(View, { children: [
|
|
6256
|
+
/* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.sectionTitle, children: "Popular" }),
|
|
6257
|
+
popular.map((country) => /* @__PURE__ */ jsx(View, { children: renderCountry(country) }, country.iso)),
|
|
6258
|
+
/* @__PURE__ */ jsx(View, { className: phoneCountryStyles.separator }),
|
|
6259
|
+
/* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.sectionTitle, children: "All countries" })
|
|
6260
|
+
] }),
|
|
6261
|
+
ListEmptyComponent: /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.empty, children: "No country found." }),
|
|
6262
|
+
renderItem: ({ item }) => item.type === "letter" ? /* @__PURE__ */ jsx(View, { className: phoneCountryStyles.letterHeader, children: /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.letterHeaderText, children: item.letter }) }) : renderCountry(item.country)
|
|
6263
|
+
}
|
|
6264
|
+
),
|
|
6265
|
+
!search.trim() && /* @__PURE__ */ jsx(View, { className: phoneCountryStyles.alphabet, children: letters.map((letter) => /* @__PURE__ */ jsx(
|
|
6266
|
+
Pressable,
|
|
6267
|
+
{
|
|
6268
|
+
accessibilityRole: "button",
|
|
6269
|
+
onPress: () => scrollToLetter(letter),
|
|
6270
|
+
className: phoneCountryStyles.alphabetItem,
|
|
6271
|
+
children: /* @__PURE__ */ jsx(Text, { className: phoneCountryStyles.alphabetLabel, children: letter })
|
|
6272
|
+
},
|
|
6273
|
+
letter
|
|
6274
|
+
)) })
|
|
6275
|
+
] })
|
|
6276
|
+
] })
|
|
6277
|
+
]
|
|
6278
|
+
}
|
|
6279
|
+
) }) })
|
|
6273
6280
|
}
|
|
6274
6281
|
)
|
|
6275
6282
|
] });
|
|
@@ -6498,8 +6505,8 @@ var buttonStyles = sortCx({
|
|
|
6498
6505
|
primary: {
|
|
6499
6506
|
root: "bg-button-primary",
|
|
6500
6507
|
label: "text-button-primary",
|
|
6501
|
-
/**
|
|
6502
|
-
icon: "text-button-primary
|
|
6508
|
+
/** Same color as the label. Figma fg-white is full strength. */
|
|
6509
|
+
icon: "text-button-primary",
|
|
6503
6510
|
/** Loading icon inherits the primary label color. */
|
|
6504
6511
|
spinner: "text-button-primary"
|
|
6505
6512
|
},
|
|
@@ -6579,10 +6586,12 @@ var isReactComponent = (component) => {
|
|
|
6579
6586
|
var nativeButtonInteraction = sortCx({
|
|
6580
6587
|
root: "active:scale-[0.985]",
|
|
6581
6588
|
drop: "shadow-xs",
|
|
6589
|
+
primaryDrop: "shadow-button-primary-drop",
|
|
6582
6590
|
clip: "absolute inset-0 overflow-hidden rounded-full",
|
|
6583
6591
|
insetRing: "absolute inset-0 rounded-full border border-solid border-[rgba(0,0,0,0.18)]",
|
|
6584
6592
|
bottomWeight: "absolute inset-x-0 bottom-0 h-0.5 bg-[rgba(0,0,0,0.05)]",
|
|
6585
6593
|
topHighlight: "absolute left-px right-px top-px h-px bg-[rgba(255,255,255,0.12)]",
|
|
6594
|
+
primaryBorder: "absolute inset-0 rounded-full border-2 border-solid border-white/12",
|
|
6586
6595
|
secondaryBottom: "absolute inset-x-0 bottom-0 h-px bg-[rgba(0,0,0,0.05)]",
|
|
6587
6596
|
colors: {
|
|
6588
6597
|
primary: "active:bg-button-primary_hover",
|
|
@@ -6666,7 +6675,7 @@ var Button = ({
|
|
|
6666
6675
|
const iconToken = buttonStyles.colors[color].icon.replace(/^text-/, "");
|
|
6667
6676
|
const onSolid = iconToken.startsWith("white");
|
|
6668
6677
|
const resolvedIconColor = useNativeVariable(
|
|
6669
|
-
onSolid ? "--color-white" : iconToken.startsWith("fg-") ? `--color-${iconToken}` : `--color-text-${iconToken}`
|
|
6678
|
+
onSolid ? "--color-white" : iconToken.startsWith("fg-") ? `--color-${iconToken}` : iconToken.startsWith("button-primary") ? "--color-button-primary-fg" : `--color-text-${iconToken}`
|
|
6670
6679
|
);
|
|
6671
6680
|
const iconColor = onSolid ? "rgba(255,255,255,0.7)" : typeof resolvedIconColor === "string" ? resolvedIconColor : void 0;
|
|
6672
6681
|
const iconClassName = cx(
|
|
@@ -6697,7 +6706,7 @@ var Button = ({
|
|
|
6697
6706
|
flattenInGroup ? cx(buttonStyles.inputGroup.root, buttonStyles.inputGroup[size]) : cx(buttonStyles.sizes[size].root, isIcon && buttonStyles.sizes[size].iconOnly),
|
|
6698
6707
|
flattenInGroup ? "bg-primary" : buttonStyles.colors[color].root,
|
|
6699
6708
|
!flattenInGroup && hasPressScale(color) && nativeButtonInteraction.root,
|
|
6700
|
-
!flattenInGroup && (isSolidSkeuomorphic(color) || isSecondarySkeuomorphic(color)) && nativeButtonInteraction.drop,
|
|
6709
|
+
!flattenInGroup && (isSolidSkeuomorphic(color) || isSecondarySkeuomorphic(color)) && (color === "primary" ? nativeButtonInteraction.primaryDrop : nativeButtonInteraction.drop),
|
|
6701
6710
|
nativeButtonInteraction.colors[color],
|
|
6702
6711
|
isLinkType && "h-auto min-h-0 px-0 py-0",
|
|
6703
6712
|
// Web applies disabled opacity only when disabled — not while loading.
|
|
@@ -6709,7 +6718,12 @@ var Button = ({
|
|
|
6709
6718
|
!flattenInGroup && isSolidSkeuomorphic(color) && /* @__PURE__ */ jsxs(View, { pointerEvents: "none", className: nativeButtonInteraction.clip, children: [
|
|
6710
6719
|
/* @__PURE__ */ jsx(View, { className: nativeButtonInteraction.insetRing }),
|
|
6711
6720
|
/* @__PURE__ */ jsx(View, { className: nativeButtonInteraction.bottomWeight }),
|
|
6712
|
-
/* @__PURE__ */ jsx(
|
|
6721
|
+
/* @__PURE__ */ jsx(
|
|
6722
|
+
View,
|
|
6723
|
+
{
|
|
6724
|
+
className: color === "primary" ? nativeButtonInteraction.primaryBorder : nativeButtonInteraction.topHighlight
|
|
6725
|
+
}
|
|
6726
|
+
)
|
|
6713
6727
|
] }),
|
|
6714
6728
|
!flattenInGroup && isSecondarySkeuomorphic(color) && /* @__PURE__ */ jsx(View, { pointerEvents: "none", className: nativeButtonInteraction.clip, children: /* @__PURE__ */ jsx(View, { className: nativeButtonInteraction.secondaryBottom }) }),
|
|
6715
6729
|
/* @__PURE__ */ jsxs(IconContext.Provider, { value: iconColor ? { color: iconColor } : {}, children: [
|