@retray-dev/ui-kit 12.2.0 → 13.0.0
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/COMPONENTS.md +85 -143
- package/CONSUMER.md +2 -2
- package/DESIGN.md +2 -2
- package/README.md +11 -6
- package/dist/Accordion.js +48 -210
- package/dist/Accordion.mjs +6 -5
- package/dist/AlertBanner.js +29 -153
- package/dist/AlertBanner.mjs +3 -3
- package/dist/AppHeader.js +37 -235
- package/dist/AppHeader.mjs +6 -7
- package/dist/Avatar.d.mts +17 -1
- package/dist/Avatar.d.ts +17 -1
- package/dist/Avatar.js +80 -115
- package/dist/Avatar.mjs +2 -2
- package/dist/Badge.js +24 -149
- package/dist/Badge.mjs +3 -3
- package/dist/Button.js +79 -267
- package/dist/Button.mjs +6 -6
- package/dist/Card.js +15 -200
- package/dist/Card.mjs +4 -5
- package/dist/CategoryStrip.d.mts +0 -5
- package/dist/CategoryStrip.d.ts +0 -5
- package/dist/CategoryStrip.js +47 -265
- package/dist/CategoryStrip.mjs +6 -6
- package/dist/Checkbox.js +15 -200
- package/dist/Checkbox.mjs +5 -5
- package/dist/Chip.js +44 -236
- package/dist/Chip.mjs +7 -6
- package/dist/ConfirmDialog.js +84 -286
- package/dist/ConfirmDialog.mjs +7 -7
- package/dist/CurrencyDisplay.js +1 -114
- package/dist/CurrencyDisplay.mjs +2 -2
- package/dist/CurrencyInput.js +35 -162
- package/dist/CurrencyInput.mjs +5 -5
- package/dist/DetailRow.js +25 -150
- package/dist/DetailRow.mjs +3 -3
- package/dist/EmptyState.js +80 -268
- package/dist/EmptyState.mjs +7 -7
- package/dist/ErrorBoundary.js +32 -199
- package/dist/ErrorBoundary.mjs +4 -4
- package/dist/Form.js +1 -114
- package/dist/Form.mjs +2 -2
- package/dist/HolographicCard.d.mts +0 -28
- package/dist/HolographicCard.d.ts +0 -28
- package/dist/HolographicCard.js +20 -130
- package/dist/HolographicCard.mjs +9 -32
- package/dist/IconButton.js +36 -234
- package/dist/IconButton.mjs +5 -6
- package/dist/IconPicker.js +222 -929
- package/dist/IconPicker.mjs +5 -5
- package/dist/ImageUpload.d.mts +3 -1
- package/dist/ImageUpload.d.ts +3 -1
- package/dist/ImageUpload.js +25 -215
- package/dist/ImageUpload.mjs +5 -6
- package/dist/ImageViewer.js +75 -266
- package/dist/ImageViewer.mjs +8 -8
- package/dist/Input.d.mts +1 -1
- package/dist/Input.d.ts +1 -1
- package/dist/Input.js +35 -162
- package/dist/Input.mjs +4 -4
- package/dist/LabelValue.js +24 -149
- package/dist/LabelValue.mjs +3 -3
- package/dist/ListGroup.js +1 -114
- package/dist/ListGroup.mjs +2 -2
- package/dist/ListItem.js +38 -235
- package/dist/ListItem.mjs +5 -6
- package/dist/MediaCard.d.mts +0 -14
- package/dist/MediaCard.d.ts +0 -14
- package/dist/MediaCard.js +69 -315
- package/dist/MediaCard.mjs +5 -6
- package/dist/MenuGroup.js +1 -114
- package/dist/MenuGroup.mjs +2 -2
- package/dist/MenuItem.js +36 -234
- package/dist/MenuItem.mjs +5 -6
- package/dist/MonthPicker.js +8 -163
- package/dist/MonthPicker.mjs +3 -3
- package/dist/NumberStepper.js +40 -238
- package/dist/NumberStepper.mjs +5 -6
- package/dist/PagerDots.d.mts +1 -1
- package/dist/PagerDots.d.ts +1 -1
- package/dist/PagerDots.js +69 -224
- package/dist/PagerDots.mjs +6 -5
- package/dist/Pressable.js +14 -85
- package/dist/Pressable.mjs +4 -4
- package/dist/PricingCard.js +87 -272
- package/dist/PricingCard.mjs +8 -8
- package/dist/Progress.js +3 -123
- package/dist/Progress.mjs +3 -3
- package/dist/RadioGroup.js +52 -265
- package/dist/RadioGroup.mjs +5 -5
- package/dist/RetrayProvider.js +3 -6
- package/dist/RetrayProvider.mjs +3 -3
- package/dist/Select.d.mts +2 -1
- package/dist/Select.d.ts +2 -1
- package/dist/Select.js +24 -232
- package/dist/Select.mjs +4 -5
- package/dist/SelectableCard.js +33 -209
- package/dist/SelectableCard.mjs +5 -5
- package/dist/SelectableGrid.d.mts +0 -21
- package/dist/SelectableGrid.d.ts +0 -21
- package/dist/SelectableGrid.js +49 -271
- package/dist/SelectableGrid.mjs +5 -6
- package/dist/Separator.js +1 -114
- package/dist/Separator.mjs +2 -2
- package/dist/Sheet.js +7 -162
- package/dist/Sheet.mjs +3 -3
- package/dist/SheetSelect.js +39 -236
- package/dist/SheetSelect.mjs +6 -6
- package/dist/Skeleton.js +4 -124
- package/dist/Skeleton.mjs +3 -3
- package/dist/Slider.js +6 -161
- package/dist/Slider.mjs +3 -3
- package/dist/Spinner.js +3 -116
- package/dist/Spinner.mjs +2 -2
- package/dist/Stats.js +36 -234
- package/dist/Stats.mjs +5 -6
- package/dist/Switch.js +24 -175
- package/dist/Switch.mjs +5 -4
- package/dist/TabBar.js +43 -200
- package/dist/TabBar.mjs +5 -4
- package/dist/Tabs.js +15 -199
- package/dist/Tabs.mjs +5 -5
- package/dist/Text.js +9 -130
- package/dist/Text.mjs +2 -2
- package/dist/Textarea.d.mts +2 -1
- package/dist/Textarea.d.ts +2 -1
- package/dist/Textarea.js +71 -219
- package/dist/Textarea.mjs +4 -4
- package/dist/Toast.js +1 -114
- package/dist/Toast.mjs +2 -2
- package/dist/Toggle.js +39 -236
- package/dist/Toggle.mjs +6 -6
- package/dist/{chunk-M3C7XM2M.mjs → chunk-2QOHHBJC.mjs} +3 -3
- package/dist/{chunk-LIS6I5UP.mjs → chunk-2VIDP72N.mjs} +3 -3
- package/dist/{chunk-DF7JA72E.mjs → chunk-4NQFTHN3.mjs} +13 -7
- package/dist/{chunk-UBUXUMER.mjs → chunk-4ZO5PTKF.mjs} +4 -4
- package/dist/{chunk-3XCFYSX4.mjs → chunk-5MYNAAFE.mjs} +13 -17
- package/dist/{chunk-E7NEHHXV.mjs → chunk-62BBSSUF.mjs} +3 -3
- package/dist/{chunk-MVMGPZN6.mjs → chunk-6CR4S6W2.mjs} +3 -3
- package/dist/{chunk-EDLCGYIO.mjs → chunk-6QLBHUEG.mjs} +8 -7
- package/dist/chunk-ARONDO7M.mjs +40 -0
- package/dist/{chunk-GH67YXG6.mjs → chunk-AZV7KNJI.mjs} +3 -3
- package/dist/{chunk-RMRS44MQ.mjs → chunk-BTUW5LSG.mjs} +11 -8
- package/dist/{chunk-2P2CB235.mjs → chunk-BULKGOIZ.mjs} +7 -8
- package/dist/{chunk-NHDI3VQB.mjs → chunk-CBIZLRYH.mjs} +15 -12
- package/dist/chunk-CM2DG4MR.mjs +142 -0
- package/dist/{chunk-TS7DGUIR.mjs → chunk-DBHSUUKU.mjs} +2 -2
- package/dist/{chunk-57V2LXCK.mjs → chunk-DE25XTVQ.mjs} +3 -3
- package/dist/{chunk-UQ4742ET.mjs → chunk-E4EQSCKR.mjs} +5 -5
- package/dist/{chunk-GUTDFUNF.mjs → chunk-EHGBHFMH.mjs} +9 -17
- package/dist/{chunk-CF27NBXO.mjs → chunk-EROPDCB5.mjs} +16 -24
- package/dist/{chunk-ZIMY2QUM.mjs → chunk-ERWJPVX7.mjs} +2 -2
- package/dist/{chunk-NLZY4TXU.mjs → chunk-ESQDPO5E.mjs} +7 -7
- package/dist/{chunk-VJBUCITV.mjs → chunk-EW2FIDSM.mjs} +1 -1
- package/dist/{chunk-HC4VVCWY.mjs → chunk-FTTI6T5Q.mjs} +4 -4
- package/dist/{chunk-2HFD4IHU.mjs → chunk-HUSSF6TF.mjs} +1 -1
- package/dist/chunk-IFYMBOEN.mjs +14 -0
- package/dist/{chunk-QOLWA2PW.mjs → chunk-IGU223UM.mjs} +80 -4
- package/dist/chunk-IJCMPVW5.mjs +121 -0
- package/dist/{chunk-AENAVIKT.mjs → chunk-ITG4JQM3.mjs} +4 -4
- package/dist/{chunk-E5UKLSJZ.mjs → chunk-K3QX2M26.mjs} +11 -8
- package/dist/{chunk-4OORJ2DY.mjs → chunk-K7TKID3V.mjs} +8 -7
- package/dist/{chunk-2LG326TT.mjs → chunk-KAGADD2O.mjs} +4 -4
- package/dist/{chunk-IVSRW4HS.mjs → chunk-KC5QDYGZ.mjs} +4 -4
- package/dist/{chunk-7AFZWSCI.mjs → chunk-KPTY7UYQ.mjs} +1 -1
- package/dist/{chunk-YTXRIXNZ.mjs → chunk-KSSVIFYR.mjs} +9 -12
- package/dist/chunk-L3YKPTJQ.mjs +119 -0
- package/dist/chunk-M53LC4Q7.mjs +35 -0
- package/dist/{chunk-ZR6HSEAB.mjs → chunk-MP7GLMIR.mjs} +17 -25
- package/dist/chunk-MZ6WRTD2.mjs +40 -0
- package/dist/chunk-NGEN2EES.mjs +581 -0
- package/dist/{chunk-C43HRKXH.mjs → chunk-OBV72JD4.mjs} +1 -1
- package/dist/{chunk-LPV4NJJK.mjs → chunk-PGQ6FMXS.mjs} +6 -5
- package/dist/{chunk-MEPSKGBO.mjs → chunk-PI6RULJX.mjs} +1 -1
- package/dist/{chunk-F3YTWO3T.mjs → chunk-RA6SAAFE.mjs} +9 -8
- package/dist/{chunk-UNNRUJTM.mjs → chunk-RRKM4MKB.mjs} +7 -7
- package/dist/{chunk-ULGNQPNE.mjs → chunk-S2VGME7X.mjs} +1 -1
- package/dist/{chunk-OLVJFKXS.mjs → chunk-S44XWTTC.mjs} +35 -25
- package/dist/{chunk-YMYIEVZP.mjs → chunk-SZEKQAOY.mjs} +1 -1
- package/dist/{chunk-ELGEOM7I.mjs → chunk-TETMEKZE.mjs} +9 -9
- package/dist/{chunk-BXF4AMHY.mjs → chunk-TMH263OK.mjs} +5 -4
- package/dist/{chunk-NJG7DHVF.mjs → chunk-U6DEBYU5.mjs} +10 -9
- package/dist/{chunk-RJNLAH76.mjs → chunk-UOKFSFNJ.mjs} +2 -2
- package/dist/{chunk-HEDQPK4I.mjs → chunk-URIH43IJ.mjs} +13 -21
- package/dist/{chunk-QXDGGOLC.mjs → chunk-V2ZB2XNS.mjs} +6 -6
- package/dist/{chunk-KSUWPU2F.mjs → chunk-WIPEDNSD.mjs} +7 -7
- package/dist/{chunk-QDAZGZUF.mjs → chunk-XCIG6HT2.mjs} +3 -3
- package/dist/{chunk-4J2PXL36.mjs → chunk-Y6YS33GM.mjs} +40 -38
- package/dist/{chunk-4XOB5TTD.mjs → chunk-ZKDKKQCE.mjs} +5 -5
- package/dist/{chunk-LOBLCFMN.mjs → chunk-ZTPYUU5C.mjs} +5 -5
- package/dist/index.d.mts +12 -72
- package/dist/index.d.ts +12 -72
- package/dist/index.js +1051 -1838
- package/dist/index.mjs +81 -85
- package/package.json +8 -10
- package/src/components/Accordion/Accordion.tsx +12 -9
- package/src/components/AlertBanner/AlertBanner.tsx +7 -6
- package/src/components/AppHeader/AppHeader.tsx +1 -1
- package/src/components/Avatar/Avatar.tsx +92 -1
- package/src/components/Avatar/index.ts +2 -2
- package/src/components/Badge/Badge.tsx +2 -2
- package/src/components/Button/Button.tsx +50 -46
- package/src/components/Card/Card.tsx +1 -0
- package/src/components/CategoryStrip/CategoryStrip.tsx +36 -49
- package/src/components/Chip/Chip.tsx +5 -4
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +3 -3
- package/src/components/DetailRow/DetailRow.tsx +3 -3
- package/src/components/EmptyState/EmptyState.tsx +2 -2
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +6 -6
- package/src/components/HolographicCard/HolographicCard.tsx +14 -95
- package/src/components/IconButton/IconButton.tsx +2 -2
- package/src/components/IconPicker/IconPicker.tsx +13 -12
- package/src/components/ImageUpload/ImageUpload.tsx +14 -25
- package/src/components/ImageViewer/ImageViewer.tsx +3 -3
- package/src/components/Input/Input.tsx +11 -5
- package/src/components/LabelValue/LabelValue.tsx +2 -2
- package/src/components/ListItem/ListItem.tsx +4 -4
- package/src/components/MediaCard/MediaCard.tsx +21 -59
- package/src/components/MenuItem/MenuItem.tsx +2 -2
- package/src/components/MonthPicker/MonthPicker.tsx +2 -2
- package/src/components/NumberStepper/NumberStepper.tsx +6 -6
- package/src/components/PagerDots/PagerDots.tsx +38 -28
- package/src/components/PricingCard/PricingCard.tsx +6 -6
- package/src/components/RadioGroup/RadioGroup.tsx +18 -31
- package/src/components/Select/Select.tsx +32 -39
- package/src/components/SelectableCard/SelectableCard.tsx +4 -6
- package/src/components/SelectableGrid/SelectableGrid.tsx +38 -72
- package/src/components/Sheet/Sheet.tsx +1 -1
- package/src/components/SheetSelect/SheetSelect.tsx +3 -3
- package/src/components/Skeleton/Skeleton.tsx +1 -1
- package/src/components/Spinner/Spinner.tsx +2 -2
- package/src/components/Stats/Stats.tsx +2 -2
- package/src/components/Switch/Switch.tsx +9 -6
- package/src/components/TabBar/TabBar.tsx +9 -8
- package/src/components/Text/Text.tsx +12 -1
- package/src/components/Textarea/Textarea.tsx +18 -32
- package/src/components/Toggle/Toggle.tsx +3 -3
- package/src/hooks/useConfirmDialog.ts +31 -42
- package/src/index.ts +3 -4
- package/src/theme/ThemeProvider.tsx +1 -4
- package/src/theme/colorUtils.ts +1 -72
- package/src/theme/colors.ts +40 -1
- package/src/theme/types.ts +2 -2
- package/src/utils/animations.ts +0 -47
- package/src/utils/curatedIcons.ts +93 -801
- package/src/utils/haptics.ts +13 -208
- package/src/utils/icons.ts +27 -91
- package/src/utils/pressable.ts +10 -61
- package/dist/VirtualList.d.mts +0 -19
- package/dist/VirtualList.d.ts +0 -19
- package/dist/VirtualList.js +0 -38
- package/dist/VirtualList.mjs +0 -2
- package/dist/chunk-2BA3JMKK.mjs +0 -136
- package/dist/chunk-3DKJ2GIC.mjs +0 -30
- package/dist/chunk-7ELGZ66G.mjs +0 -164
- package/dist/chunk-DVK4G2GT.mjs +0 -59
- package/dist/chunk-EJ7ZPXOH.mjs +0 -163
- package/dist/chunk-KA7LTET3.mjs +0 -71
- package/dist/chunk-LNPKGWBG.mjs +0 -134
- package/dist/chunk-NC5ZTR2Y.mjs +0 -32
- package/dist/chunk-SAWUXP3A.mjs +0 -1114
- package/dist/chunk-YNROWHQJ.mjs +0 -46
- package/src/components/VirtualList/VirtualList.tsx +0 -60
- package/src/components/VirtualList/index.ts +0 -1
- package/src/utils/fontGuard.ts +0 -35
- package/src/utils/hover.ts +0 -25
- package/src/utils/useColorTransition.ts +0 -40
- package/src/utils/usePressScale.ts +0 -75
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { selectionAsync } from './chunk-
|
|
3
|
-
import { PRESS_SCALE } from './chunk-DVK4G2GT.mjs';
|
|
1
|
+
import { PressableChip } from './chunk-IFYMBOEN.mjs';
|
|
2
|
+
import { selectionAsync } from './chunk-ARONDO7M.mjs';
|
|
4
3
|
import { RADIUS } from './chunk-QY3X2UYR.mjs';
|
|
5
|
-
import {
|
|
6
|
-
import { useTheme } from './chunk-
|
|
4
|
+
import { Icon } from './chunk-MZ6WRTD2.mjs';
|
|
5
|
+
import { useTheme } from './chunk-KSSVIFYR.mjs';
|
|
7
6
|
import { mvs, ms, vs, s } from './chunk-2CE3TQVY.mjs';
|
|
8
7
|
import React, { useState } from 'react';
|
|
9
|
-
import { StyleSheet, ScrollView, View,
|
|
10
|
-
import Animated from 'react-native-reanimated';
|
|
8
|
+
import { StyleSheet, ScrollView, View, Text } from 'react-native';
|
|
11
9
|
|
|
12
10
|
function isSelected(value, candidate) {
|
|
13
11
|
if (value == null) return false;
|
|
@@ -15,26 +13,21 @@ function isSelected(value, candidate) {
|
|
|
15
13
|
}
|
|
16
14
|
function Cell({ item, selected, width, onPress }) {
|
|
17
15
|
const { colors } = useTheme();
|
|
18
|
-
const { animatedStyle, onPressIn, onPressOut, hoverHandlers } = usePressScale({
|
|
19
|
-
pressScale: PRESS_SCALE.chip,
|
|
20
|
-
disabled: item.disabled
|
|
21
|
-
});
|
|
22
16
|
const iconColor = selected ? colors.primary : colors.foregroundSubtle;
|
|
23
|
-
const iconNode = item.icon ?? (item.iconName ?
|
|
24
|
-
return /* @__PURE__ */ React.createElement(
|
|
25
|
-
|
|
17
|
+
const iconNode = item.icon ?? (item.iconName ? /* @__PURE__ */ React.createElement(Icon, { name: item.iconName, size: ms(24), color: iconColor }) : null);
|
|
18
|
+
return /* @__PURE__ */ React.createElement(
|
|
19
|
+
PressableChip,
|
|
26
20
|
{
|
|
27
21
|
onPress,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
disabled: item.disabled,
|
|
31
|
-
activeOpacity: 1,
|
|
22
|
+
enabled: !item.disabled,
|
|
23
|
+
rippleColor: "transparent",
|
|
32
24
|
touchSoundDisabled: true,
|
|
25
|
+
activateOnHover: true,
|
|
33
26
|
accessibilityRole: "button",
|
|
34
27
|
accessibilityState: { selected, disabled: item.disabled },
|
|
35
28
|
accessibilityLabel: item.label ?? String(item.value),
|
|
36
|
-
...hoverHandlers,
|
|
37
29
|
style: [
|
|
30
|
+
{ width },
|
|
38
31
|
styles.cell,
|
|
39
32
|
{
|
|
40
33
|
backgroundColor: selected ? colors.primary + "14" : colors.surface,
|
|
@@ -53,7 +46,7 @@ function Cell({ item, selected, width, onPress }) {
|
|
|
53
46
|
},
|
|
54
47
|
item.label
|
|
55
48
|
) : null
|
|
56
|
-
)
|
|
49
|
+
);
|
|
57
50
|
}
|
|
58
51
|
function SelectableGrid({
|
|
59
52
|
items,
|
|
@@ -124,22 +117,21 @@ var styles = StyleSheet.create({
|
|
|
124
117
|
paddingHorizontal: s(4)
|
|
125
118
|
},
|
|
126
119
|
cell: {
|
|
127
|
-
flex: 1,
|
|
128
120
|
borderRadius: RADIUS.md,
|
|
129
121
|
borderWidth: 2,
|
|
130
122
|
alignItems: "center",
|
|
131
123
|
justifyContent: "center",
|
|
132
124
|
gap: vs(4),
|
|
133
|
-
paddingHorizontal: s(
|
|
134
|
-
paddingVertical: vs(
|
|
125
|
+
paddingHorizontal: s(8),
|
|
126
|
+
paddingVertical: vs(10)
|
|
135
127
|
},
|
|
136
128
|
cellDisabled: {
|
|
137
129
|
opacity: 0.4
|
|
138
130
|
},
|
|
139
131
|
label: {
|
|
140
132
|
fontFamily: "Sohne-Medium",
|
|
141
|
-
fontSize: ms(
|
|
142
|
-
lineHeight: mvs(
|
|
133
|
+
fontSize: ms(11),
|
|
134
|
+
lineHeight: mvs(14),
|
|
143
135
|
textAlign: "center"
|
|
144
136
|
}
|
|
145
137
|
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import AntDesign from '@expo/vector-icons/AntDesign';
|
|
3
|
+
import Entypo from '@expo/vector-icons/Entypo';
|
|
4
|
+
import Feather from '@expo/vector-icons/Feather';
|
|
5
|
+
import FontAwesome5 from '@expo/vector-icons/FontAwesome5';
|
|
6
|
+
import MaterialIcons from '@expo/vector-icons/MaterialIcons';
|
|
7
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
8
|
+
|
|
9
|
+
// src/utils/icons.ts
|
|
10
|
+
var ALL_FAMILIES = [
|
|
11
|
+
{ name: "Feather", component: Feather },
|
|
12
|
+
{ name: "AntDesign", component: AntDesign },
|
|
13
|
+
{ name: "Entypo", component: Entypo },
|
|
14
|
+
{ name: "FontAwesome5", component: FontAwesome5 },
|
|
15
|
+
{ name: "MaterialIcons", component: MaterialIcons },
|
|
16
|
+
{ name: "Ionicons", component: Ionicons }
|
|
17
|
+
];
|
|
18
|
+
var glyphCacheInitialized = false;
|
|
19
|
+
function ensureGlyphCache() {
|
|
20
|
+
if (glyphCacheInitialized) return;
|
|
21
|
+
glyphCacheInitialized = true;
|
|
22
|
+
for (const entry of ALL_FAMILIES) {
|
|
23
|
+
try {
|
|
24
|
+
entry.glyphMap = entry.component.glyphMap;
|
|
25
|
+
} catch {
|
|
26
|
+
entry.glyphMap = {};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function Icon({ name, size, color, family }) {
|
|
31
|
+
ensureGlyphCache();
|
|
32
|
+
const entry = family ? ALL_FAMILIES.find((f) => f.name === family) : ALL_FAMILIES.find((f) => {
|
|
33
|
+
const glyphMap = f.glyphMap;
|
|
34
|
+
return glyphMap ? name in glyphMap : false;
|
|
35
|
+
});
|
|
36
|
+
if (!entry) return null;
|
|
37
|
+
return React.createElement(entry.component, { name, size, color });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { Icon };
|
|
@@ -0,0 +1,581 @@
|
|
|
1
|
+
import { Spinner } from './chunk-2VIDP72N.mjs';
|
|
2
|
+
import { selectionAsync, impactMedium } from './chunk-ARONDO7M.mjs';
|
|
3
|
+
import { RADIUS } from './chunk-QY3X2UYR.mjs';
|
|
4
|
+
import { Icon } from './chunk-MZ6WRTD2.mjs';
|
|
5
|
+
import { useTheme } from './chunk-KSSVIFYR.mjs';
|
|
6
|
+
import { s, vs, ms } from './chunk-2CE3TQVY.mjs';
|
|
7
|
+
import React, { useRef, useState, useId, useMemo, useCallback } from 'react';
|
|
8
|
+
import { Dimensions, StyleSheet, TouchableOpacity, View, Text } from 'react-native';
|
|
9
|
+
import { ScrollView } from 'react-native-gesture-handler';
|
|
10
|
+
import { BottomSheetBackdrop, BottomSheetModal, BottomSheetScrollView } from '@gorhom/bottom-sheet';
|
|
11
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
12
|
+
|
|
13
|
+
// src/utils/curatedIcons.ts
|
|
14
|
+
var CATEGORIES = [
|
|
15
|
+
{
|
|
16
|
+
name: "acciones",
|
|
17
|
+
label: "Actions",
|
|
18
|
+
labelEs: "Acciones",
|
|
19
|
+
categoryIcon: "zap",
|
|
20
|
+
icons: [
|
|
21
|
+
"plus",
|
|
22
|
+
"x",
|
|
23
|
+
"check",
|
|
24
|
+
"edit-2",
|
|
25
|
+
"search",
|
|
26
|
+
"settings",
|
|
27
|
+
"filter",
|
|
28
|
+
"trash-2",
|
|
29
|
+
"copy",
|
|
30
|
+
"save",
|
|
31
|
+
"share-2",
|
|
32
|
+
"download",
|
|
33
|
+
"upload",
|
|
34
|
+
"refresh-cw",
|
|
35
|
+
"lock",
|
|
36
|
+
"bookmark",
|
|
37
|
+
"heart",
|
|
38
|
+
"star",
|
|
39
|
+
"flag",
|
|
40
|
+
"link-2"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "comunicacion",
|
|
45
|
+
label: "Communication",
|
|
46
|
+
labelEs: "Comunicaci\xF3n",
|
|
47
|
+
categoryIcon: "mail",
|
|
48
|
+
icons: [
|
|
49
|
+
"mail",
|
|
50
|
+
"message-circle",
|
|
51
|
+
"message-square",
|
|
52
|
+
"phone",
|
|
53
|
+
"phone-call",
|
|
54
|
+
"phone-forwarded",
|
|
55
|
+
"phone-incoming",
|
|
56
|
+
"phone-missed",
|
|
57
|
+
"phone-off",
|
|
58
|
+
"phone-outgoing",
|
|
59
|
+
"send",
|
|
60
|
+
"at-sign",
|
|
61
|
+
"paperclip",
|
|
62
|
+
"inbox",
|
|
63
|
+
"volume",
|
|
64
|
+
"volume-1",
|
|
65
|
+
"volume-2",
|
|
66
|
+
"volume-x",
|
|
67
|
+
"mic",
|
|
68
|
+
"mic-off"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "navegacion",
|
|
73
|
+
label: "Navigation",
|
|
74
|
+
labelEs: "Navegaci\xF3n",
|
|
75
|
+
categoryIcon: "map-pin",
|
|
76
|
+
icons: [
|
|
77
|
+
"arrow-up",
|
|
78
|
+
"arrow-down",
|
|
79
|
+
"arrow-left",
|
|
80
|
+
"arrow-right",
|
|
81
|
+
"chevron-up",
|
|
82
|
+
"chevron-down",
|
|
83
|
+
"chevron-left",
|
|
84
|
+
"chevron-right",
|
|
85
|
+
"chevrons-up",
|
|
86
|
+
"chevrons-down",
|
|
87
|
+
"chevrons-left",
|
|
88
|
+
"chevrons-right",
|
|
89
|
+
"arrow-up-circle",
|
|
90
|
+
"arrow-down-circle",
|
|
91
|
+
"arrow-left-circle",
|
|
92
|
+
"arrow-right-circle",
|
|
93
|
+
"corner-up-left",
|
|
94
|
+
"corner-up-right",
|
|
95
|
+
"corner-down-left",
|
|
96
|
+
"corner-down-right"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "comida",
|
|
101
|
+
label: "Food",
|
|
102
|
+
labelEs: "Comida",
|
|
103
|
+
categoryIcon: "coffee",
|
|
104
|
+
icons: [
|
|
105
|
+
"coffee",
|
|
106
|
+
"shopping-bag",
|
|
107
|
+
"shopping-cart",
|
|
108
|
+
"package",
|
|
109
|
+
"box",
|
|
110
|
+
"tag",
|
|
111
|
+
"truck",
|
|
112
|
+
"gift",
|
|
113
|
+
"award",
|
|
114
|
+
"star",
|
|
115
|
+
"heart",
|
|
116
|
+
"zap",
|
|
117
|
+
"sun",
|
|
118
|
+
"moon",
|
|
119
|
+
"cloud",
|
|
120
|
+
"droplet",
|
|
121
|
+
"thermometer",
|
|
122
|
+
"wind",
|
|
123
|
+
"map-pin",
|
|
124
|
+
"home"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: "negocios",
|
|
129
|
+
label: "Business",
|
|
130
|
+
labelEs: "Negocios",
|
|
131
|
+
categoryIcon: "briefcase",
|
|
132
|
+
icons: [
|
|
133
|
+
"briefcase",
|
|
134
|
+
"dollar-sign",
|
|
135
|
+
"credit-card",
|
|
136
|
+
"bar-chart",
|
|
137
|
+
"bar-chart-2",
|
|
138
|
+
"pie-chart",
|
|
139
|
+
"trending-up",
|
|
140
|
+
"trending-down",
|
|
141
|
+
"activity",
|
|
142
|
+
"target",
|
|
143
|
+
"hash",
|
|
144
|
+
"percent",
|
|
145
|
+
"file-text",
|
|
146
|
+
"folder",
|
|
147
|
+
"clipboard",
|
|
148
|
+
"calendar",
|
|
149
|
+
"clock",
|
|
150
|
+
"database",
|
|
151
|
+
"archive",
|
|
152
|
+
"terminal"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: "perfil",
|
|
157
|
+
label: "Profile",
|
|
158
|
+
labelEs: "Perfil",
|
|
159
|
+
categoryIcon: "user",
|
|
160
|
+
icons: [
|
|
161
|
+
"user",
|
|
162
|
+
"users",
|
|
163
|
+
"user-check",
|
|
164
|
+
"user-x",
|
|
165
|
+
"user-plus",
|
|
166
|
+
"user-minus",
|
|
167
|
+
"key",
|
|
168
|
+
"shield",
|
|
169
|
+
"shield-off",
|
|
170
|
+
"lock",
|
|
171
|
+
"unlock",
|
|
172
|
+
"log-in",
|
|
173
|
+
"log-out",
|
|
174
|
+
"eye",
|
|
175
|
+
"eye-off",
|
|
176
|
+
"bell",
|
|
177
|
+
"bell-off",
|
|
178
|
+
"settings",
|
|
179
|
+
"tool",
|
|
180
|
+
"sliders"
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: "multimedia",
|
|
185
|
+
label: "Media",
|
|
186
|
+
labelEs: "Multimedia",
|
|
187
|
+
categoryIcon: "camera",
|
|
188
|
+
icons: [
|
|
189
|
+
"camera",
|
|
190
|
+
"camera-off",
|
|
191
|
+
"video",
|
|
192
|
+
"video-off",
|
|
193
|
+
"film",
|
|
194
|
+
"music",
|
|
195
|
+
"music-off",
|
|
196
|
+
"headphones",
|
|
197
|
+
"speaker",
|
|
198
|
+
"radio",
|
|
199
|
+
"image",
|
|
200
|
+
"images",
|
|
201
|
+
"play",
|
|
202
|
+
"pause",
|
|
203
|
+
"stop",
|
|
204
|
+
"skip-back",
|
|
205
|
+
"skip-forward",
|
|
206
|
+
"monitor",
|
|
207
|
+
"smart-phone",
|
|
208
|
+
"tablet"
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: "texto",
|
|
213
|
+
label: "Text",
|
|
214
|
+
labelEs: "Texto",
|
|
215
|
+
categoryIcon: "type",
|
|
216
|
+
icons: [
|
|
217
|
+
"type",
|
|
218
|
+
"bold",
|
|
219
|
+
"italic",
|
|
220
|
+
"underline",
|
|
221
|
+
"align-left",
|
|
222
|
+
"align-center",
|
|
223
|
+
"align-right",
|
|
224
|
+
"align-justify",
|
|
225
|
+
"list",
|
|
226
|
+
"columns",
|
|
227
|
+
"sidebar",
|
|
228
|
+
"minimize-2",
|
|
229
|
+
"maximize-2",
|
|
230
|
+
"edit-3",
|
|
231
|
+
"feather",
|
|
232
|
+
"circle",
|
|
233
|
+
"square",
|
|
234
|
+
"plus-circle",
|
|
235
|
+
"minus-circle",
|
|
236
|
+
"x-circle"
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
];
|
|
240
|
+
var _allIcons = null;
|
|
241
|
+
var _categorized = null;
|
|
242
|
+
function getAllCuratedIcons() {
|
|
243
|
+
if (!_allIcons) {
|
|
244
|
+
const seen = /* @__PURE__ */ new Set();
|
|
245
|
+
const result = [];
|
|
246
|
+
for (const cat of CATEGORIES) {
|
|
247
|
+
for (const name of cat.icons) {
|
|
248
|
+
if (!seen.has(name)) {
|
|
249
|
+
seen.add(name);
|
|
250
|
+
result.push(name);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
_allIcons = result;
|
|
255
|
+
}
|
|
256
|
+
return _allIcons;
|
|
257
|
+
}
|
|
258
|
+
function getCuratedCategories() {
|
|
259
|
+
if (!_categorized) {
|
|
260
|
+
_categorized = CATEGORIES.map((cat) => ({ ...cat, icons: [...cat.icons] }));
|
|
261
|
+
}
|
|
262
|
+
return _categorized;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// src/components/IconPicker/IconPicker.tsx
|
|
266
|
+
var NUM_COLUMNS = 6;
|
|
267
|
+
var GAP = 6;
|
|
268
|
+
var TRIGGER_SIZE = s(56);
|
|
269
|
+
var SCREEN_HEIGHT = Dimensions.get("window").height;
|
|
270
|
+
function IconCell({ name, selected, size, onPress }) {
|
|
271
|
+
const { colors } = useTheme();
|
|
272
|
+
const handlePress = () => {
|
|
273
|
+
selectionAsync();
|
|
274
|
+
onPress();
|
|
275
|
+
};
|
|
276
|
+
const iconColor = selected ? colors.primaryForeground : colors.foreground;
|
|
277
|
+
const bg = selected ? colors.primary : "transparent";
|
|
278
|
+
return /* @__PURE__ */ React.createElement(
|
|
279
|
+
TouchableOpacity,
|
|
280
|
+
{
|
|
281
|
+
onPress: handlePress,
|
|
282
|
+
activeOpacity: 0.6,
|
|
283
|
+
touchSoundDisabled: true,
|
|
284
|
+
accessibilityRole: "button",
|
|
285
|
+
accessibilityState: { selected },
|
|
286
|
+
accessibilityLabel: name,
|
|
287
|
+
style: [styles.cell, { width: size, height: size, backgroundColor: bg }]
|
|
288
|
+
},
|
|
289
|
+
/* @__PURE__ */ React.createElement(Icon, { name, size: ms(20), color: iconColor })
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
var IconCellMemo = React.memo(IconCell);
|
|
293
|
+
function IconPicker({
|
|
294
|
+
value,
|
|
295
|
+
onChange,
|
|
296
|
+
label,
|
|
297
|
+
error,
|
|
298
|
+
hint,
|
|
299
|
+
disabled = false,
|
|
300
|
+
numColumns = NUM_COLUMNS,
|
|
301
|
+
gap = GAP,
|
|
302
|
+
style
|
|
303
|
+
}) {
|
|
304
|
+
const { colors } = useTheme();
|
|
305
|
+
const insets = useSafeAreaInsets();
|
|
306
|
+
const sheetRef = useRef(null);
|
|
307
|
+
const catScrollRef = useRef(null);
|
|
308
|
+
const [activeCategory, setActiveCategory] = useState(null);
|
|
309
|
+
const [containerWidth, setContainerWidth] = useState(() => Dimensions.get("window").width - s(16) * 2);
|
|
310
|
+
const [ready, setReady] = useState(false);
|
|
311
|
+
const sheetName = useId();
|
|
312
|
+
const activeIcons = useMemo(() => {
|
|
313
|
+
const allIcons = getAllCuratedIcons();
|
|
314
|
+
if (activeCategory) {
|
|
315
|
+
return getCuratedCategories().find((c) => c.name === activeCategory)?.icons ?? allIcons;
|
|
316
|
+
}
|
|
317
|
+
return allIcons;
|
|
318
|
+
}, [activeCategory]);
|
|
319
|
+
const gapPx = s(gap);
|
|
320
|
+
const cellSize = containerWidth > 0 ? Math.floor((containerWidth - gapPx * (numColumns - 1)) / numColumns) : 0;
|
|
321
|
+
const rows = useMemo(() => {
|
|
322
|
+
const result = [];
|
|
323
|
+
for (let i = 0; i < activeIcons.length; i += numColumns) {
|
|
324
|
+
result.push(activeIcons.slice(i, i + numColumns));
|
|
325
|
+
}
|
|
326
|
+
return result;
|
|
327
|
+
}, [activeIcons, numColumns]);
|
|
328
|
+
const handleDismiss = useCallback(() => {
|
|
329
|
+
setActiveCategory(null);
|
|
330
|
+
setReady(false);
|
|
331
|
+
}, []);
|
|
332
|
+
const handleSelect = useCallback(
|
|
333
|
+
(iconName) => {
|
|
334
|
+
onChange(iconName);
|
|
335
|
+
},
|
|
336
|
+
[onChange]
|
|
337
|
+
);
|
|
338
|
+
const handleOpen = useCallback(() => {
|
|
339
|
+
if (disabled) return;
|
|
340
|
+
impactMedium();
|
|
341
|
+
setActiveCategory(null);
|
|
342
|
+
setReady(false);
|
|
343
|
+
sheetRef.current?.present();
|
|
344
|
+
}, [disabled]);
|
|
345
|
+
const renderBackdrop = useCallback(
|
|
346
|
+
(props) => /* @__PURE__ */ React.createElement(BottomSheetBackdrop, { ...props, disappearsOnIndex: -1, appearsOnIndex: 0, pressBehavior: "close" }),
|
|
347
|
+
[]
|
|
348
|
+
);
|
|
349
|
+
const selectedIcon = value ? /* @__PURE__ */ React.createElement(Icon, { name: value, size: ms(28), color: colors.foreground }) : null;
|
|
350
|
+
return /* @__PURE__ */ React.createElement(View, { style: [styles.triggerContainer, style] }, label ? /* @__PURE__ */ React.createElement(Text, { style: [styles.triggerLabel, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React.createElement(
|
|
351
|
+
TouchableOpacity,
|
|
352
|
+
{
|
|
353
|
+
onPress: handleOpen,
|
|
354
|
+
disabled,
|
|
355
|
+
activeOpacity: 0.7,
|
|
356
|
+
touchSoundDisabled: true,
|
|
357
|
+
accessibilityRole: "button",
|
|
358
|
+
accessibilityLabel: label ?? "Seleccionar icono",
|
|
359
|
+
accessibilityState: { disabled },
|
|
360
|
+
style: [
|
|
361
|
+
styles.trigger,
|
|
362
|
+
{
|
|
363
|
+
backgroundColor: disabled ? colors.surface : colors.background,
|
|
364
|
+
width: TRIGGER_SIZE,
|
|
365
|
+
height: TRIGGER_SIZE,
|
|
366
|
+
borderColor: error ? colors.destructive : value ? colors.primary : colors.border
|
|
367
|
+
},
|
|
368
|
+
disabled && styles.triggerDisabled
|
|
369
|
+
]
|
|
370
|
+
},
|
|
371
|
+
selectedIcon ?? /* @__PURE__ */ React.createElement(Icon, { name: "plus", size: ms(24), color: colors.foregroundMuted })
|
|
372
|
+
), error ? /* @__PURE__ */ React.createElement(
|
|
373
|
+
Text,
|
|
374
|
+
{
|
|
375
|
+
style: [styles.helperText, { color: colors.destructive }],
|
|
376
|
+
allowFontScaling: true,
|
|
377
|
+
accessibilityLiveRegion: "polite"
|
|
378
|
+
},
|
|
379
|
+
error
|
|
380
|
+
) : null, !error && hint ? /* @__PURE__ */ React.createElement(Text, { style: [styles.helperText, { color: colors.foregroundMuted }], allowFontScaling: true }, hint) : null, /* @__PURE__ */ React.createElement(
|
|
381
|
+
BottomSheetModal,
|
|
382
|
+
{
|
|
383
|
+
ref: sheetRef,
|
|
384
|
+
name: sheetName,
|
|
385
|
+
onDismiss: handleDismiss,
|
|
386
|
+
enableDynamicSizing: true,
|
|
387
|
+
maxDynamicContentSize: SCREEN_HEIGHT * 0.7,
|
|
388
|
+
backdropComponent: renderBackdrop,
|
|
389
|
+
backgroundStyle: { ...styles.sheetBackground, backgroundColor: colors.card },
|
|
390
|
+
handleIndicatorStyle: { ...styles.handle, backgroundColor: colors.border },
|
|
391
|
+
enablePanDownToClose: true,
|
|
392
|
+
topInset: insets.top,
|
|
393
|
+
android_keyboardInputMode: "adjustPan"
|
|
394
|
+
},
|
|
395
|
+
/* @__PURE__ */ React.createElement(
|
|
396
|
+
BottomSheetScrollView,
|
|
397
|
+
{
|
|
398
|
+
contentContainerStyle: styles.sheetContent,
|
|
399
|
+
showsVerticalScrollIndicator: true
|
|
400
|
+
},
|
|
401
|
+
/* @__PURE__ */ React.createElement(
|
|
402
|
+
View,
|
|
403
|
+
{
|
|
404
|
+
style: styles.gridContainer,
|
|
405
|
+
onLayout: (e) => {
|
|
406
|
+
setContainerWidth(e.nativeEvent.layout.width);
|
|
407
|
+
setReady(true);
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
!ready ? /* @__PURE__ */ React.createElement(View, { style: styles.loader }, /* @__PURE__ */ React.createElement(Spinner, { size: "md", color: colors.primary, label: "Cargando iconos..." })) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Text, { style: [styles.sectionLabel, { color: colors.foregroundSubtle }], allowFontScaling: true }, "Categor\xEDas"), /* @__PURE__ */ React.createElement(
|
|
411
|
+
ScrollView,
|
|
412
|
+
{
|
|
413
|
+
ref: catScrollRef,
|
|
414
|
+
horizontal: true,
|
|
415
|
+
showsHorizontalScrollIndicator: false,
|
|
416
|
+
contentContainerStyle: styles.categoryStrip,
|
|
417
|
+
style: styles.categoryScroll
|
|
418
|
+
},
|
|
419
|
+
/* @__PURE__ */ React.createElement(
|
|
420
|
+
TouchableOpacity,
|
|
421
|
+
{
|
|
422
|
+
onPress: () => setActiveCategory(null),
|
|
423
|
+
activeOpacity: 0.7,
|
|
424
|
+
touchSoundDisabled: true,
|
|
425
|
+
accessibilityRole: "button",
|
|
426
|
+
accessibilityLabel: "Todas",
|
|
427
|
+
accessibilityState: { selected: activeCategory === null },
|
|
428
|
+
style: [
|
|
429
|
+
styles.categoryChip,
|
|
430
|
+
{
|
|
431
|
+
backgroundColor: activeCategory === null ? colors.primary : colors.surface,
|
|
432
|
+
borderColor: activeCategory === null ? colors.primary : colors.border
|
|
433
|
+
}
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.categoryChipInner }, /* @__PURE__ */ React.createElement(Icon, { name: "grid", size: ms(14), color: activeCategory === null ? colors.primaryForeground : colors.foregroundSubtle }), /* @__PURE__ */ React.createElement(
|
|
437
|
+
Text,
|
|
438
|
+
{
|
|
439
|
+
style: [
|
|
440
|
+
styles.categoryChipText,
|
|
441
|
+
{ color: activeCategory === null ? colors.primaryForeground : colors.foreground }
|
|
442
|
+
],
|
|
443
|
+
allowFontScaling: true,
|
|
444
|
+
numberOfLines: 1
|
|
445
|
+
},
|
|
446
|
+
"Todas"
|
|
447
|
+
))
|
|
448
|
+
),
|
|
449
|
+
getCuratedCategories().map((cat) => /* @__PURE__ */ React.createElement(
|
|
450
|
+
TouchableOpacity,
|
|
451
|
+
{
|
|
452
|
+
key: cat.name,
|
|
453
|
+
onPress: () => setActiveCategory(cat.name),
|
|
454
|
+
activeOpacity: 0.7,
|
|
455
|
+
touchSoundDisabled: true,
|
|
456
|
+
accessibilityRole: "button",
|
|
457
|
+
accessibilityLabel: cat.labelEs,
|
|
458
|
+
accessibilityState: { selected: activeCategory === cat.name },
|
|
459
|
+
style: [
|
|
460
|
+
styles.categoryChip,
|
|
461
|
+
{
|
|
462
|
+
backgroundColor: activeCategory === cat.name ? colors.primary : colors.surface,
|
|
463
|
+
borderColor: activeCategory === cat.name ? colors.primary : colors.border
|
|
464
|
+
}
|
|
465
|
+
]
|
|
466
|
+
},
|
|
467
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.categoryChipInner }, /* @__PURE__ */ React.createElement(Icon, { name: cat.categoryIcon, size: ms(14), color: activeCategory === cat.name ? colors.primaryForeground : colors.foregroundSubtle }), /* @__PURE__ */ React.createElement(
|
|
468
|
+
Text,
|
|
469
|
+
{
|
|
470
|
+
style: [
|
|
471
|
+
styles.categoryChipText,
|
|
472
|
+
{ color: activeCategory === cat.name ? colors.primaryForeground : colors.foreground }
|
|
473
|
+
],
|
|
474
|
+
allowFontScaling: true,
|
|
475
|
+
numberOfLines: 1
|
|
476
|
+
},
|
|
477
|
+
cat.labelEs
|
|
478
|
+
))
|
|
479
|
+
))
|
|
480
|
+
), /* @__PURE__ */ React.createElement(View, { style: [styles.separator, { backgroundColor: colors.border }] }), cellSize > 0 ? rows.map((row, i) => /* @__PURE__ */ React.createElement(View, { key: row[0] ?? `row-${i}`, style: [styles.row, { marginBottom: gapPx }] }, row.map((name) => /* @__PURE__ */ React.createElement(
|
|
481
|
+
IconCellMemo,
|
|
482
|
+
{
|
|
483
|
+
key: name,
|
|
484
|
+
name,
|
|
485
|
+
selected: value === name,
|
|
486
|
+
size: cellSize,
|
|
487
|
+
onPress: () => {
|
|
488
|
+
handleSelect(name);
|
|
489
|
+
sheetRef.current?.dismiss();
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
)), Array.from({ length: numColumns - row.length }).map((_, j) => /* @__PURE__ */ React.createElement(View, { key: `spacer-${j}`, style: { width: cellSize, height: cellSize } })))) : null)
|
|
493
|
+
)
|
|
494
|
+
)
|
|
495
|
+
));
|
|
496
|
+
}
|
|
497
|
+
var styles = StyleSheet.create({
|
|
498
|
+
triggerContainer: {
|
|
499
|
+
gap: vs(8)
|
|
500
|
+
},
|
|
501
|
+
triggerLabel: {
|
|
502
|
+
fontFamily: "Sohne-Medium",
|
|
503
|
+
fontSize: ms(14)
|
|
504
|
+
},
|
|
505
|
+
trigger: {
|
|
506
|
+
borderRadius: RADIUS.md,
|
|
507
|
+
borderWidth: 1,
|
|
508
|
+
alignItems: "center",
|
|
509
|
+
justifyContent: "center"
|
|
510
|
+
},
|
|
511
|
+
triggerDisabled: {
|
|
512
|
+
opacity: 0.6
|
|
513
|
+
},
|
|
514
|
+
helperText: {
|
|
515
|
+
fontFamily: "Sohne-Regular",
|
|
516
|
+
fontSize: ms(13)
|
|
517
|
+
},
|
|
518
|
+
sheetBackground: {
|
|
519
|
+
borderTopLeftRadius: ms(16),
|
|
520
|
+
borderTopRightRadius: ms(16)
|
|
521
|
+
},
|
|
522
|
+
handle: {
|
|
523
|
+
width: s(36),
|
|
524
|
+
height: vs(4),
|
|
525
|
+
borderRadius: ms(2)
|
|
526
|
+
},
|
|
527
|
+
sheetContent: {
|
|
528
|
+
paddingHorizontal: s(16),
|
|
529
|
+
paddingBottom: vs(24)
|
|
530
|
+
},
|
|
531
|
+
sectionLabel: {
|
|
532
|
+
fontFamily: "Sohne-Medium",
|
|
533
|
+
fontSize: ms(12),
|
|
534
|
+
marginBottom: vs(8),
|
|
535
|
+
textTransform: "uppercase",
|
|
536
|
+
letterSpacing: 0.5
|
|
537
|
+
},
|
|
538
|
+
categoryScroll: {
|
|
539
|
+
flexGrow: 0,
|
|
540
|
+
flexShrink: 0
|
|
541
|
+
},
|
|
542
|
+
categoryStrip: {
|
|
543
|
+
gap: s(8)
|
|
544
|
+
},
|
|
545
|
+
categoryChip: {
|
|
546
|
+
borderRadius: RADIUS.full,
|
|
547
|
+
borderWidth: 1,
|
|
548
|
+
paddingVertical: vs(6),
|
|
549
|
+
paddingHorizontal: s(12)
|
|
550
|
+
},
|
|
551
|
+
categoryChipInner: {
|
|
552
|
+
flexDirection: "row",
|
|
553
|
+
alignItems: "center",
|
|
554
|
+
gap: s(6)
|
|
555
|
+
},
|
|
556
|
+
categoryChipText: {
|
|
557
|
+
fontFamily: "Sohne-Medium",
|
|
558
|
+
fontSize: ms(12)
|
|
559
|
+
},
|
|
560
|
+
separator: {
|
|
561
|
+
height: StyleSheet.hairlineWidth,
|
|
562
|
+
marginVertical: vs(12)
|
|
563
|
+
},
|
|
564
|
+
gridContainer: {},
|
|
565
|
+
row: {
|
|
566
|
+
flexDirection: "row",
|
|
567
|
+
gap: GAP
|
|
568
|
+
},
|
|
569
|
+
cell: {
|
|
570
|
+
borderRadius: RADIUS.md,
|
|
571
|
+
alignItems: "center",
|
|
572
|
+
justifyContent: "center"
|
|
573
|
+
},
|
|
574
|
+
loader: {
|
|
575
|
+
minHeight: vs(200),
|
|
576
|
+
alignItems: "center",
|
|
577
|
+
justifyContent: "center"
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
|
|
581
|
+
export { IconPicker };
|