vpt-sebraeds 0.0.1
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/LICENSE +21 -0
- package/README.md +73 -0
- package/dist/components/Accordion/index.d.ts +9 -0
- package/dist/components/Accordion/index.d.ts.map +1 -0
- package/dist/components/Accordion/index.js +123 -0
- package/dist/components/AccordionAvatar/index.d.ts +8 -0
- package/dist/components/AccordionAvatar/index.d.ts.map +1 -0
- package/dist/components/AccordionAvatar/index.js +63 -0
- package/dist/components/AdBanner/index.d.ts +12 -0
- package/dist/components/AdBanner/index.d.ts.map +1 -0
- package/dist/components/AdBanner/index.js +65 -0
- package/dist/components/Avatar/index.d.ts +9 -0
- package/dist/components/Avatar/index.d.ts.map +1 -0
- package/dist/components/Avatar/index.js +69 -0
- package/dist/components/BottomSheet/BottomSheetNomeEmpresa.d.ts +7 -0
- package/dist/components/BottomSheet/BottomSheetNomeEmpresa.d.ts.map +1 -0
- package/dist/components/BottomSheet/BottomSheetNomeEmpresa.js +101 -0
- package/dist/components/BottomSheet/Components/ActionButtons.d.ts +9 -0
- package/dist/components/BottomSheet/Components/ActionButtons.d.ts.map +1 -0
- package/dist/components/BottomSheet/Components/ActionButtons.js +73 -0
- package/dist/components/BottomSheet/Components/ListaDeEstados.d.ts +9 -0
- package/dist/components/BottomSheet/Components/ListaDeEstados.d.ts.map +1 -0
- package/dist/components/BottomSheet/Components/ListaDeEstados.js +269 -0
- package/dist/components/BottomSheet/index.d.ts +12 -0
- package/dist/components/BottomSheet/index.d.ts.map +1 -0
- package/dist/components/BottomSheet/index.js +226 -0
- package/dist/components/Breadcrumb/index.d.ts +23 -0
- package/dist/components/Breadcrumb/index.d.ts.map +1 -0
- package/dist/components/Breadcrumb/index.js +59 -0
- package/dist/components/Button/index.d.ts +25 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +424 -0
- package/dist/components/CardNumber/index.d.ts +37 -0
- package/dist/components/CardNumber/index.d.ts.map +1 -0
- package/dist/components/CardNumber/index.js +108 -0
- package/dist/components/Checkbox/index.d.ts +35 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/Checkbox/index.js +93 -0
- package/dist/components/CommitmentCard/index.d.ts +27 -0
- package/dist/components/CommitmentCard/index.d.ts.map +1 -0
- package/dist/components/CommitmentCard/index.js +188 -0
- package/dist/components/ContentBlock/ContentBlock.d.ts +12 -0
- package/dist/components/ContentBlock/ContentBlock.d.ts.map +1 -0
- package/dist/components/ContentBlock/ContentBlock.js +29 -0
- package/dist/components/ContentCard/index.d.ts +28 -0
- package/dist/components/ContentCard/index.d.ts.map +1 -0
- package/dist/components/ContentCard/index.js +192 -0
- package/dist/components/ContentRelatedCard/index.d.ts +27 -0
- package/dist/components/ContentRelatedCard/index.d.ts.map +1 -0
- package/dist/components/ContentRelatedCard/index.js +56 -0
- package/dist/components/ContentSlot/index.d.ts +18 -0
- package/dist/components/ContentSlot/index.d.ts.map +1 -0
- package/dist/components/ContentSlot/index.js +140 -0
- package/dist/components/CopyButton/index.d.ts +9 -0
- package/dist/components/CopyButton/index.d.ts.map +1 -0
- package/dist/components/CopyButton/index.js +159 -0
- package/dist/components/Datepicker/MonthSelector.d.ts +4 -0
- package/dist/components/Datepicker/MonthSelector.d.ts.map +1 -0
- package/dist/components/Datepicker/MonthSelector.js +256 -0
- package/dist/components/Datepicker/TimeSelector.d.ts +4 -0
- package/dist/components/Datepicker/TimeSelector.d.ts.map +1 -0
- package/dist/components/Datepicker/TimeSelector.js +193 -0
- package/dist/components/Datepicker/index.d.ts +6 -0
- package/dist/components/Datepicker/index.d.ts.map +1 -0
- package/dist/components/Datepicker/index.js +387 -0
- package/dist/components/DonutChart/index.d.ts +12 -0
- package/dist/components/DonutChart/index.d.ts.map +1 -0
- package/dist/components/DonutChart/index.js +153 -0
- package/dist/components/Dropdown/DropdownCommitments.d.ts +1 -0
- package/dist/components/Dropdown/DropdownCommitments.d.ts.map +1 -0
- package/dist/components/Dropdown/DropdownCommitments.js +1 -0
- package/dist/components/Dropdown/index.d.ts +12 -0
- package/dist/components/Dropdown/index.d.ts.map +1 -0
- package/dist/components/Dropdown/index.js +287 -0
- package/dist/components/DropdownCommitments/index.d.ts +7 -0
- package/dist/components/DropdownCommitments/index.d.ts.map +1 -0
- package/dist/components/DropdownCommitments/index.js +119 -0
- package/dist/components/EmptySlot/index.d.ts +14 -0
- package/dist/components/EmptySlot/index.d.ts.map +1 -0
- package/dist/components/EmptySlot/index.js +117 -0
- package/dist/components/FilterTag/index.d.ts +7 -0
- package/dist/components/FilterTag/index.d.ts.map +1 -0
- package/dist/components/FilterTag/index.js +59 -0
- package/dist/components/FilterableMultiSelect/index.d.ts +11 -0
- package/dist/components/FilterableMultiSelect/index.d.ts.map +1 -0
- package/dist/components/FilterableMultiSelect/index.js +136 -0
- package/dist/components/GettingStarted.d.ts +13 -0
- package/dist/components/GettingStarted.d.ts.map +1 -0
- package/dist/components/GettingStarted.js +25 -0
- package/dist/components/Header/components/Context.d.ts +8 -0
- package/dist/components/Header/components/Context.d.ts.map +1 -0
- package/dist/components/Header/components/Context.js +30 -0
- package/dist/components/Header/components/Information.d.ts +7 -0
- package/dist/components/Header/components/Information.d.ts.map +1 -0
- package/dist/components/Header/components/Information.js +54 -0
- package/dist/components/Header/components/Shortcut.d.ts +6 -0
- package/dist/components/Header/components/Shortcut.d.ts.map +1 -0
- package/dist/components/Header/components/Shortcut.js +24 -0
- package/dist/components/Header/components/SwitchAccount.d.ts +8 -0
- package/dist/components/Header/components/SwitchAccount.d.ts.map +1 -0
- package/dist/components/Header/components/SwitchAccount.js +203 -0
- package/dist/components/Header/components/Variants.d.ts +10 -0
- package/dist/components/Header/components/Variants.d.ts.map +1 -0
- package/dist/components/Header/components/Variants.js +129 -0
- package/dist/components/Header/components/index.d.ts +21 -0
- package/dist/components/Header/components/index.d.ts.map +1 -0
- package/dist/components/Header/components/index.js +10 -0
- package/dist/components/Header/index.d.ts +35 -0
- package/dist/components/Header/index.d.ts.map +1 -0
- package/dist/components/Header/index.js +179 -0
- package/dist/components/Icon/iconEnums.d.ts +3 -0
- package/dist/components/Icon/iconEnums.d.ts.map +1 -0
- package/dist/components/Icon/iconEnums.js +27 -0
- package/dist/components/Icon/index.d.ts +9 -0
- package/dist/components/Icon/index.d.ts.map +1 -0
- package/dist/components/Icon/index.js +5 -0
- package/dist/components/Image/index.d.ts +11 -0
- package/dist/components/Image/index.d.ts.map +1 -0
- package/dist/components/Image/index.js +128 -0
- package/dist/components/Input/index.d.ts +15 -0
- package/dist/components/Input/index.d.ts.map +1 -0
- package/dist/components/Input/index.js +263 -0
- package/dist/components/Legend/index.d.ts +12 -0
- package/dist/components/Legend/index.d.ts.map +1 -0
- package/dist/components/Legend/index.js +68 -0
- package/dist/components/Link/index.d.ts +8 -0
- package/dist/components/Link/index.d.ts.map +1 -0
- package/dist/components/Link/index.js +48 -0
- package/dist/components/List/index.d.ts +7 -0
- package/dist/components/List/index.d.ts.map +1 -0
- package/dist/components/List/index.js +50 -0
- package/dist/components/MenuAccordion/index.d.ts +8 -0
- package/dist/components/MenuAccordion/index.d.ts.map +1 -0
- package/dist/components/MenuAccordion/index.js +64 -0
- package/dist/components/Modal/index.d.ts +15 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/components/Modal/index.js +195 -0
- package/dist/components/Navbar/index.d.ts +8 -0
- package/dist/components/Navbar/index.d.ts.map +1 -0
- package/dist/components/Navbar/index.js +101 -0
- package/dist/components/NavigationItem/index.d.ts +22 -0
- package/dist/components/NavigationItem/index.d.ts.map +1 -0
- package/dist/components/NavigationItem/index.js +410 -0
- package/dist/components/NotificationBanner/index.d.ts +12 -0
- package/dist/components/NotificationBanner/index.d.ts.map +1 -0
- package/dist/components/NotificationBanner/index.js +129 -0
- package/dist/components/NotificationCard/index.d.ts +16 -0
- package/dist/components/NotificationCard/index.d.ts.map +1 -0
- package/dist/components/NotificationCard/index.js +271 -0
- package/dist/components/NumberDisplay/index.d.ts +13 -0
- package/dist/components/NumberDisplay/index.d.ts.map +1 -0
- package/dist/components/NumberDisplay/index.js +227 -0
- package/dist/components/Pagination/index.d.ts +39 -0
- package/dist/components/Pagination/index.d.ts.map +1 -0
- package/dist/components/Pagination/index.js +179 -0
- package/dist/components/ProgressBar/ProgressBarSimple.d.ts +1 -0
- package/dist/components/ProgressBar/ProgressBarSimple.d.ts.map +1 -0
- package/dist/components/ProgressBar/ProgressBarSimple.js +1 -0
- package/dist/components/ProgressBar/index.d.ts +13 -0
- package/dist/components/ProgressBar/index.d.ts.map +1 -0
- package/dist/components/ProgressBar/index.js +67 -0
- package/dist/components/ProgressChart/index.d.ts +18 -0
- package/dist/components/ProgressChart/index.d.ts.map +1 -0
- package/dist/components/ProgressChart/index.js +147 -0
- package/dist/components/Quote/Quote.d.ts +8 -0
- package/dist/components/Quote/Quote.d.ts.map +1 -0
- package/dist/components/Quote/Quote.js +51 -0
- package/dist/components/RadioButton/index.d.ts +27 -0
- package/dist/components/RadioButton/index.d.ts.map +1 -0
- package/dist/components/RadioButton/index.js +88 -0
- package/dist/components/Rating/index.d.ts +12 -0
- package/dist/components/Rating/index.d.ts.map +1 -0
- package/dist/components/Rating/index.js +116 -0
- package/dist/components/ScrollBar/index.d.ts +12 -0
- package/dist/components/ScrollBar/index.d.ts.map +1 -0
- package/dist/components/ScrollBar/index.js +77 -0
- package/dist/components/Search/Search.d.ts +15 -0
- package/dist/components/Search/Search.d.ts.map +1 -0
- package/dist/components/Search/Search.js +272 -0
- package/dist/components/SegmentedButton/index.d.ts +9 -0
- package/dist/components/SegmentedButton/index.d.ts.map +1 -0
- package/dist/components/SegmentedButton/index.js +153 -0
- package/dist/components/Select/index.d.ts +15 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Select/index.js +274 -0
- package/dist/components/SelectItem/index.d.ts +12 -0
- package/dist/components/SelectItem/index.d.ts.map +1 -0
- package/dist/components/SelectItem/index.js +142 -0
- package/dist/components/Shortcut/index.d.ts +12 -0
- package/dist/components/Shortcut/index.d.ts.map +1 -0
- package/dist/components/Shortcut/index.js +159 -0
- package/dist/components/ShowMore/index.d.ts +8 -0
- package/dist/components/ShowMore/index.d.ts.map +1 -0
- package/dist/components/ShowMore/index.js +52 -0
- package/dist/components/ShuffleItem/ShuffleItemExample.d.ts +1 -0
- package/dist/components/ShuffleItem/ShuffleItemExample.d.ts.map +1 -0
- package/dist/components/ShuffleItem/ShuffleItemExample.js +1 -0
- package/dist/components/ShuffleItem/SimpleShuffleExample.d.ts +1 -0
- package/dist/components/ShuffleItem/SimpleShuffleExample.d.ts.map +1 -0
- package/dist/components/ShuffleItem/SimpleShuffleExample.js +1 -0
- package/dist/components/ShuffleItem/index.d.ts +30 -0
- package/dist/components/ShuffleItem/index.d.ts.map +1 -0
- package/dist/components/ShuffleItem/index.js +541 -0
- package/dist/components/Slider/index.d.ts +10 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Slider/index.js +164 -0
- package/dist/components/Tab/index.d.ts +54 -0
- package/dist/components/Tab/index.d.ts.map +1 -0
- package/dist/components/Tab/index.js +362 -0
- package/dist/components/Table/index.d.ts +11 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/Table/index.js +242 -0
- package/dist/components/Tag/index.d.ts +10 -0
- package/dist/components/Tag/index.d.ts.map +1 -0
- package/dist/components/Tag/index.js +116 -0
- package/dist/components/TaskCard/assets/example.d.ts +3 -0
- package/dist/components/TaskCard/assets/example.d.ts.map +1 -0
- package/dist/components/TaskCard/assets/example.js +8 -0
- package/dist/components/TaskCard/components/EditIcon.d.ts +21 -0
- package/dist/components/TaskCard/components/EditIcon.d.ts.map +1 -0
- package/dist/components/TaskCard/components/EditIcon.js +54 -0
- package/dist/components/TaskCard/components/SuccessContent.d.ts +25 -0
- package/dist/components/TaskCard/components/SuccessContent.d.ts.map +1 -0
- package/dist/components/TaskCard/components/SuccessContent.js +28 -0
- package/dist/components/TaskCard/components/SuccessIcon.d.ts +21 -0
- package/dist/components/TaskCard/components/SuccessIcon.d.ts.map +1 -0
- package/dist/components/TaskCard/components/SuccessIcon.js +33 -0
- package/dist/components/TaskCard/components/SuccessTitle.d.ts +21 -0
- package/dist/components/TaskCard/components/SuccessTitle.d.ts.map +1 -0
- package/dist/components/TaskCard/components/SuccessTitle.js +33 -0
- package/dist/components/TaskCard/components/Tag.d.ts +19 -0
- package/dist/components/TaskCard/components/Tag.d.ts.map +1 -0
- package/dist/components/TaskCard/components/Tag.js +62 -0
- package/dist/components/TaskCard/components/TagGroup.d.ts +15 -0
- package/dist/components/TaskCard/components/TagGroup.d.ts.map +1 -0
- package/dist/components/TaskCard/components/TagGroup.js +38 -0
- package/dist/components/TaskCard/components/TaskDescription.d.ts +23 -0
- package/dist/components/TaskCard/components/TaskDescription.d.ts.map +1 -0
- package/dist/components/TaskCard/components/TaskDescription.js +34 -0
- package/dist/components/TaskCard/components/index.d.ts +8 -0
- package/dist/components/TaskCard/components/index.d.ts.map +1 -0
- package/dist/components/TaskCard/components/index.js +7 -0
- package/dist/components/TaskCard/index.d.ts +61 -0
- package/dist/components/TaskCard/index.d.ts.map +1 -0
- package/dist/components/TaskCard/index.js +211 -0
- package/dist/components/Toast/index.d.ts +15 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/Toast/index.js +257 -0
- package/dist/components/Toggle/index.d.ts +11 -0
- package/dist/components/Toggle/index.d.ts.map +1 -0
- package/dist/components/Toggle/index.js +116 -0
- package/dist/components/TooltipCard/index.d.ts +12 -0
- package/dist/components/TooltipCard/index.d.ts.map +1 -0
- package/dist/components/TooltipCard/index.js +263 -0
- package/dist/components/Typography/index.d.ts +15 -0
- package/dist/components/Typography/index.d.ts.map +1 -0
- package/dist/components/Typography/index.js +115 -0
- package/dist/components/styles.d.ts +78 -0
- package/dist/components/styles.d.ts.map +1 -0
- package/dist/components/styles.js +78 -0
- package/dist/src/index.d.ts +60 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +77 -0
- package/dist/styles/useFocus.d.ts +12 -0
- package/dist/styles/useFocus.d.ts.map +1 -0
- package/dist/styles/useFocus.js +22 -0
- package/package.json +121 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export default ShuffleItem;
|
|
2
|
+
declare function ShuffleItem({ title, subtitle, icon, variant, onPress, onMoveUp, onMoveDown, onDropdownPress, onDelete, onAddPress, showMoveButtons, showDropdown, showAddButton, canMoveUp, canMoveDown, dragHandleProps, expandedCard, isDimmed, onDragStart, onDragEnd, iconContainerColor, iconColor, swipedKey, setSwipedKey, itemKey, }: {
|
|
3
|
+
title?: string | undefined;
|
|
4
|
+
subtitle?: string | undefined;
|
|
5
|
+
icon?: string | undefined;
|
|
6
|
+
variant?: string | undefined;
|
|
7
|
+
onPress?: (() => void) | undefined;
|
|
8
|
+
onMoveUp?: (() => void) | undefined;
|
|
9
|
+
onMoveDown?: (() => void) | undefined;
|
|
10
|
+
onDropdownPress?: (() => void) | undefined;
|
|
11
|
+
onDelete?: (() => void) | undefined;
|
|
12
|
+
onAddPress?: (() => void) | undefined;
|
|
13
|
+
showMoveButtons?: boolean | undefined;
|
|
14
|
+
showDropdown?: boolean | undefined;
|
|
15
|
+
showAddButton?: boolean | undefined;
|
|
16
|
+
canMoveUp?: boolean | undefined;
|
|
17
|
+
canMoveDown?: boolean | undefined;
|
|
18
|
+
dragHandleProps?: null | undefined;
|
|
19
|
+
expandedCard?: null | undefined;
|
|
20
|
+
isDimmed?: boolean | undefined;
|
|
21
|
+
onDragStart?: (() => void) | undefined;
|
|
22
|
+
onDragEnd?: (() => void) | undefined;
|
|
23
|
+
iconContainerColor?: null | undefined;
|
|
24
|
+
iconColor?: null | undefined;
|
|
25
|
+
swipedKey: any;
|
|
26
|
+
setSwipedKey: any;
|
|
27
|
+
itemKey: any;
|
|
28
|
+
}): React.JSX.Element;
|
|
29
|
+
import React from 'react';
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/ShuffleItem/index.jsx"],"names":[],"mappings":";AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;sBAibC;kBArbkD,OAAO"}
|
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
2
|
+
import { View, TouchableOpacity, Text, StyleSheet, Animated, PanResponder } from 'react-native';
|
|
3
|
+
import Icon from '../Icon';
|
|
4
|
+
const ShuffleItem = ({ title = 'Nome da Ferramenta', subtitle = 'Lorem Máxima Large', icon = 'settings-4-line', variant = 'default', // 'default', 'expanded', 'destructive'
|
|
5
|
+
onPress = () => { }, onMoveUp = () => { }, onMoveDown = () => { }, onDropdownPress = () => { }, onDelete = () => { }, onAddPress = () => { }, // Callback para o botão "+"
|
|
6
|
+
showMoveButtons = true, showDropdown = true, showAddButton = false, // Mostrar botão "+" ao invés dos botões de movimento
|
|
7
|
+
canMoveUp = true, canMoveDown = true, dragHandleProps = null, // Props para o PanResponder do drag handle
|
|
8
|
+
// Props para o card expandido
|
|
9
|
+
expandedCard = null, // Configurações do card expandido
|
|
10
|
+
// Prop para controlar opacidade quando outros cards estão sendo arrastados
|
|
11
|
+
isDimmed = false, // Quando true, este card fica opaco
|
|
12
|
+
onDragStart = () => { }, // Callback quando inicia o drag deste card
|
|
13
|
+
onDragEnd = () => { }, // Callback quando termina o drag deste card
|
|
14
|
+
iconContainerColor = null, // NOVA PROP
|
|
15
|
+
iconColor = null, // NOVA PROP
|
|
16
|
+
swipedKey, setSwipedKey, itemKey, }) => {
|
|
17
|
+
const [isSwipedLeft, setIsSwipedLeft] = useState(false);
|
|
18
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
19
|
+
const translateX = useRef(new Animated.Value(0)).current;
|
|
20
|
+
// Configurações de animação otimizadas
|
|
21
|
+
const springConfig = {
|
|
22
|
+
useNativeDriver: true,
|
|
23
|
+
tension: 180, // Controla a "força" da mola
|
|
24
|
+
friction: 6 // Controla o "amortecimento"
|
|
25
|
+
};
|
|
26
|
+
// Configuração rápida para retorno
|
|
27
|
+
const springReturnConfig = {
|
|
28
|
+
useNativeDriver: true,
|
|
29
|
+
tension: 200, // Mais força para voltar
|
|
30
|
+
friction: 5 // Menos amortecimento para ser mais rápido
|
|
31
|
+
};
|
|
32
|
+
// Adicione este useEffect para controlar swipe único
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (swipedKey !== itemKey && isSwipedLeft) {
|
|
35
|
+
setIsSwipedLeft(false);
|
|
36
|
+
Animated.spring(translateX, {
|
|
37
|
+
toValue: 0,
|
|
38
|
+
...springReturnConfig,
|
|
39
|
+
}).start();
|
|
40
|
+
}
|
|
41
|
+
}, [swipedKey, itemKey]);
|
|
42
|
+
// Otimiza o handleDeletePress
|
|
43
|
+
const handleDeletePress = () => {
|
|
44
|
+
onDelete();
|
|
45
|
+
setIsSwipedLeft(false);
|
|
46
|
+
setSwipedKey(null);
|
|
47
|
+
Animated.spring(translateX, {
|
|
48
|
+
toValue: 0,
|
|
49
|
+
...springReturnConfig,
|
|
50
|
+
}).start();
|
|
51
|
+
};
|
|
52
|
+
// Simplifica getBackgroundColor para usar apenas variant e isDragging
|
|
53
|
+
const getBackgroundColor = () => {
|
|
54
|
+
if (isDragging)
|
|
55
|
+
return '#F1F4FF';
|
|
56
|
+
return variant === 'expanded' ? '#F8F9FF' :
|
|
57
|
+
variant === 'destructive' ? '#FF4757' : '#FFFFFF';
|
|
58
|
+
};
|
|
59
|
+
// Simplifica os handlers
|
|
60
|
+
const handlePressIn = () => {
|
|
61
|
+
onDragStart();
|
|
62
|
+
};
|
|
63
|
+
const handlePressOut = () => {
|
|
64
|
+
setIsDragging(false);
|
|
65
|
+
onDragEnd();
|
|
66
|
+
};
|
|
67
|
+
const handleDragStart = () => {
|
|
68
|
+
setIsDragging(true);
|
|
69
|
+
};
|
|
70
|
+
const handleDragEnd = () => {
|
|
71
|
+
setIsDragging(false);
|
|
72
|
+
};
|
|
73
|
+
const getTextColor = () => {
|
|
74
|
+
return variant === 'destructive' ? '#FFFFFF' : '#1B244B';
|
|
75
|
+
};
|
|
76
|
+
const getSubtextColor = () => {
|
|
77
|
+
return variant === 'destructive' ? '#FFFFFF' : '#485274';
|
|
78
|
+
};
|
|
79
|
+
const getActionIconColor = () => {
|
|
80
|
+
return variant === 'destructive' ? '#FFFFFF' : '#2A4FDA';
|
|
81
|
+
};
|
|
82
|
+
const handleDropdownPress = () => {
|
|
83
|
+
setIsExpanded(!isExpanded);
|
|
84
|
+
onDropdownPress(!isExpanded);
|
|
85
|
+
};
|
|
86
|
+
const panResponder = useRef(PanResponder.create({
|
|
87
|
+
onStartShouldSetPanResponder: () => true,
|
|
88
|
+
onMoveShouldSetPanResponder: (evt, gestureState) => {
|
|
89
|
+
// Desativa o swipe se setSwipedKey não existir
|
|
90
|
+
if (!setSwipedKey || showAddButton)
|
|
91
|
+
return false;
|
|
92
|
+
return Math.abs(gestureState.dx) > 2;
|
|
93
|
+
},
|
|
94
|
+
onPanResponderGrant: () => {
|
|
95
|
+
handlePressIn();
|
|
96
|
+
},
|
|
97
|
+
onPanResponderMove: (evt, gestureState) => {
|
|
98
|
+
// Só permite swipe se setSwipedKey existir e não for botão de adicionar
|
|
99
|
+
if (!setSwipedKey || showAddButton)
|
|
100
|
+
return;
|
|
101
|
+
if (gestureState.dx < 0) {
|
|
102
|
+
translateX.setValue(Math.max(gestureState.dx, -80));
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
onPanResponderRelease: (evt, gestureState) => {
|
|
106
|
+
handlePressOut();
|
|
107
|
+
handleDragEnd();
|
|
108
|
+
// Só processa o swipe se setSwipedKey existir e não for botão de adicionar
|
|
109
|
+
if (!setSwipedKey || showAddButton) {
|
|
110
|
+
// Reseta posição se foi movido
|
|
111
|
+
Animated.spring(translateX, {
|
|
112
|
+
toValue: 0,
|
|
113
|
+
...springReturnConfig,
|
|
114
|
+
}).start();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (Math.abs(gestureState.dx) > Math.abs(gestureState.dy)) {
|
|
118
|
+
if (gestureState.dx < -15) {
|
|
119
|
+
setIsSwipedLeft(true);
|
|
120
|
+
setSwipedKey(itemKey);
|
|
121
|
+
Animated.spring(translateX, {
|
|
122
|
+
toValue: -80,
|
|
123
|
+
...springConfig,
|
|
124
|
+
}).start();
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
setIsSwipedLeft(false);
|
|
128
|
+
setSwipedKey(null);
|
|
129
|
+
Animated.spring(translateX, {
|
|
130
|
+
toValue: 0,
|
|
131
|
+
...springReturnConfig,
|
|
132
|
+
}).start();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
})).current;
|
|
137
|
+
return (<View style={styles.containerWrapper}>
|
|
138
|
+
{/* Fundo vermelho com lixeira - só aparece quando swipado para a esquerda */}
|
|
139
|
+
{isSwipedLeft && (<View style={styles.deleteBackground}>
|
|
140
|
+
<TouchableOpacity style={styles.deleteButton} onPress={handleDeletePress}>
|
|
141
|
+
<Icon name="delete-bin-line" size={24} color="#FFFFFF"/>
|
|
142
|
+
</TouchableOpacity>
|
|
143
|
+
</View>)}
|
|
144
|
+
|
|
145
|
+
{/* Container principal com gesto de arrastar */}
|
|
146
|
+
<Animated.View style={[
|
|
147
|
+
styles.container,
|
|
148
|
+
{ backgroundColor: getBackgroundColor() },
|
|
149
|
+
// Reduz padding direito quando há botões de movimento ou botão "+"
|
|
150
|
+
((showMoveButtons && !showAddButton) || showAddButton) && { paddingRight: 0 },
|
|
151
|
+
showAddButton && { paddingLeft: 0 }, // <-- Adicione esta linha
|
|
152
|
+
{
|
|
153
|
+
transform: [
|
|
154
|
+
{ translateX },
|
|
155
|
+
// Remove scale - mantém tamanho original
|
|
156
|
+
],
|
|
157
|
+
opacity: isDimmed ? 0.6 : 1, // Aplica opacidade mais sutil (0.6) para manter fundo branco visível, senão opacidade total
|
|
158
|
+
borderWidth: 1.5,
|
|
159
|
+
borderColor: '#E2E9FC',
|
|
160
|
+
zIndex: isDragging ? 1000 : 1,
|
|
161
|
+
// Ajusta bordas quando expandido com card
|
|
162
|
+
borderBottomLeftRadius: (variant === 'expanded' && expandedCard) ? 0 : 8,
|
|
163
|
+
borderBottomRightRadius: (variant === 'expanded' && expandedCard) ? 0 : 8,
|
|
164
|
+
}
|
|
165
|
+
]} {...panResponder.panHandlers}>
|
|
166
|
+
{/* Ícone de arrastar */}
|
|
167
|
+
{!showAddButton && (<TouchableOpacity style={styles.dragHandle} {...(dragHandleProps || {})} hitSlop={{ top: 20, bottom: 20, left: 20, right: 20 }} // Área de toque maior
|
|
168
|
+
>
|
|
169
|
+
<View style={{ flexDirection: 'row', marginBottom: -10 }}>
|
|
170
|
+
<View style={{ marginRight: 4 }}>
|
|
171
|
+
{[...Array(3)].map((_, index) => (<View key={`left-${index}`} style={styles.dragDot}/>))}
|
|
172
|
+
</View>
|
|
173
|
+
<View>
|
|
174
|
+
{[...Array(3)].map((_, index) => (<View key={`right-${index}`} style={styles.dragDot}/>))}
|
|
175
|
+
</View>
|
|
176
|
+
</View>
|
|
177
|
+
</TouchableOpacity>)}
|
|
178
|
+
|
|
179
|
+
{/* Área de drag para o botão "+" */}
|
|
180
|
+
{showAddButton && (<View style={styles.dragAreaForAddButton}/>)}
|
|
181
|
+
|
|
182
|
+
{/* Conteúdo principal */}
|
|
183
|
+
<TouchableOpacity style={styles.content} onPress={onPress} activeOpacity={0.7}>
|
|
184
|
+
{/* Ícone com container colorido se iconContainerColor for passado */}
|
|
185
|
+
{!showAddButton && (iconContainerColor ? (<View style={[styles.iconContainer, { backgroundColor: iconContainerColor }]}>
|
|
186
|
+
<Icon name={icon} size={24} color={iconColor} style={styles.contentIcon}/>
|
|
187
|
+
</View>) : (<Icon name={icon} size={24} color={getActionIconColor()} style={styles.contentIcon}/>))}
|
|
188
|
+
|
|
189
|
+
<View style={styles.textContainer}>
|
|
190
|
+
<Text style={[styles.title, { color: getTextColor() }]} numberOfLines={2} ellipsizeMode="tail">
|
|
191
|
+
{title}
|
|
192
|
+
</Text>
|
|
193
|
+
<Text style={[styles.subtitle, { color: getSubtextColor() }]} numberOfLines={1} ellipsizeMode="tail">
|
|
194
|
+
{subtitle}
|
|
195
|
+
</Text>
|
|
196
|
+
</View>
|
|
197
|
+
</TouchableOpacity>
|
|
198
|
+
|
|
199
|
+
{/* Dropdown */}
|
|
200
|
+
{showDropdown && (<TouchableOpacity style={[
|
|
201
|
+
styles.actionButton,
|
|
202
|
+
showAddButton && { marginRight: 16 }
|
|
203
|
+
]} onPress={onPress} // Use o onPress do pai
|
|
204
|
+
>
|
|
205
|
+
<Icon name={variant === 'expanded' ? 'arrow-up-s-line' : 'arrow-down-s-line'} size={24} color="#1B244B"/>
|
|
206
|
+
</TouchableOpacity>)}
|
|
207
|
+
|
|
208
|
+
{/* Botões de mover */}
|
|
209
|
+
{showMoveButtons && !showAddButton && (<View style={styles.moveButtons}>
|
|
210
|
+
<TouchableOpacity style={styles.actionButtonBoxDown} onPress={canMoveDown ? onMoveDown : undefined} disabled={!canMoveDown} activeOpacity={canMoveDown ? 0.7 : 1} hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }} // Aumenta área touchable
|
|
211
|
+
>
|
|
212
|
+
<Icon name="arrow-right-line" size={20} color={canMoveDown ? getActionIconColor() : '#96A1C1'} style={{ transform: [{ rotate: '90deg' }] }}/>
|
|
213
|
+
</TouchableOpacity>
|
|
214
|
+
|
|
215
|
+
<TouchableOpacity style={styles.actionButtonBoxUp} onPress={canMoveUp ? onMoveUp : undefined} disabled={!canMoveUp} activeOpacity={canMoveUp ? 0.7 : 1} hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }} // Aumenta área touchable
|
|
216
|
+
>
|
|
217
|
+
<Icon name="arrow-right-line" size={20} color={canMoveUp ? getActionIconColor() : '#96A1C1'} style={{ transform: [{ rotate: '-90deg' }] }}/>
|
|
218
|
+
</TouchableOpacity>
|
|
219
|
+
</View>)}
|
|
220
|
+
|
|
221
|
+
{/* Botão de adicionar (+) */}
|
|
222
|
+
{showAddButton && (<TouchableOpacity style={[
|
|
223
|
+
styles.addButton,
|
|
224
|
+
{
|
|
225
|
+
// Remove borda inferior direita quando expandido com card
|
|
226
|
+
borderBottomRightRadius: (variant === 'expanded' && expandedCard) ? 0 : 8,
|
|
227
|
+
}
|
|
228
|
+
]} onPress={onAddPress} activeOpacity={0.7}>
|
|
229
|
+
<Icon name="add-line" size={24} color="#FFFFFF"/>
|
|
230
|
+
</TouchableOpacity>)}
|
|
231
|
+
|
|
232
|
+
{/* Ícone de delete para variante destrutiva */}
|
|
233
|
+
{variant === 'destructive' && (<TouchableOpacity style={styles.actionButton}>
|
|
234
|
+
<Icon name="close-line" size={20} color="#FFFFFF"/>
|
|
235
|
+
</TouchableOpacity>)}
|
|
236
|
+
</Animated.View>
|
|
237
|
+
|
|
238
|
+
{/* Card expandido - aparece quando isExpanded for true e expandedCard estiver configurado */}
|
|
239
|
+
{variant === 'expanded' && expandedCard && (<View style={styles.expandedCard}>
|
|
240
|
+
{/* Descrição principal */}
|
|
241
|
+
{expandedCard.description && (<Text style={styles.expandedDescription}>
|
|
242
|
+
{expandedCard.description}
|
|
243
|
+
</Text>)}
|
|
244
|
+
|
|
245
|
+
{/* Subtitle */}
|
|
246
|
+
{expandedCard.subtitle && (<Text style={styles.expandedSubtitle}>
|
|
247
|
+
{expandedCard.subtitle}
|
|
248
|
+
</Text>)}
|
|
249
|
+
|
|
250
|
+
{/* Botões de ação */}
|
|
251
|
+
{expandedCard.buttons && expandedCard.buttons.length > 0 && (<View style={styles.expandedButtons}>
|
|
252
|
+
{expandedCard.buttons.map((button, index) => (<TouchableOpacity key={index} style={[
|
|
253
|
+
styles.expandedButton,
|
|
254
|
+
button.variant === 'primary' ? styles.expandedButtonPrimary : styles.expandedButtonSecondary
|
|
255
|
+
]} onPress={button.onPress}>
|
|
256
|
+
<Text style={[
|
|
257
|
+
styles.expandedButtonText,
|
|
258
|
+
button.variant === 'primary' ? styles.expandedButtonTextPrimary : styles.expandedButtonTextSecondary
|
|
259
|
+
]}>
|
|
260
|
+
{button.title}
|
|
261
|
+
</Text>
|
|
262
|
+
{button.icon && (<Icon name={button.icon} size={16} color={button.variant === 'primary' ? '#FFFFFF' : '#2A4FDA'} style={styles.expandedButtonIcon}/>)}
|
|
263
|
+
</TouchableOpacity>))}
|
|
264
|
+
</View>)}
|
|
265
|
+
|
|
266
|
+
{/* Botão remover */}
|
|
267
|
+
{expandedCard.showRemove && (<TouchableOpacity style={styles.removeButton} onPress={expandedCard.onRemove}>
|
|
268
|
+
<Icon name="delete-bin-line" size={16} color="#687499" style={styles.removeButtonIcon}/>
|
|
269
|
+
<Text style={styles.removeButtonText}>
|
|
270
|
+
{expandedCard.removeText || 'Remover da página inicial'}
|
|
271
|
+
</Text>
|
|
272
|
+
</TouchableOpacity>)}
|
|
273
|
+
</View>)}
|
|
274
|
+
</View>);
|
|
275
|
+
};
|
|
276
|
+
const styles = StyleSheet.create({
|
|
277
|
+
containerWrapper: {
|
|
278
|
+
position: 'relative',
|
|
279
|
+
marginVertical: 4,
|
|
280
|
+
width: '100%',
|
|
281
|
+
overflow: 'visible', // Permite que os botões não sejam cortados
|
|
282
|
+
borderRadius: 8,
|
|
283
|
+
},
|
|
284
|
+
deleteBackground: {
|
|
285
|
+
position: 'absolute',
|
|
286
|
+
top: 0,
|
|
287
|
+
right: 0,
|
|
288
|
+
bottom: 0,
|
|
289
|
+
width: 80,
|
|
290
|
+
backgroundColor: '#E72423',
|
|
291
|
+
justifyContent: 'center',
|
|
292
|
+
alignItems: 'center',
|
|
293
|
+
borderTopRightRadius: 8,
|
|
294
|
+
borderBottomRightRadius: 8,
|
|
295
|
+
borderTopLeftRadius: 0,
|
|
296
|
+
borderBottomLeftRadius: 0,
|
|
297
|
+
zIndex: -1,
|
|
298
|
+
overflow: 'hidden',
|
|
299
|
+
},
|
|
300
|
+
deleteButton: {
|
|
301
|
+
width: 80,
|
|
302
|
+
height: '100%',
|
|
303
|
+
justifyContent: 'center',
|
|
304
|
+
alignItems: 'center',
|
|
305
|
+
},
|
|
306
|
+
container: {
|
|
307
|
+
flexDirection: 'row',
|
|
308
|
+
alignItems: 'center',
|
|
309
|
+
paddingHorizontal: 16,
|
|
310
|
+
paddingVertical: 12, // Reduz padding vertical para dar mais espaço ao texto
|
|
311
|
+
borderRadius: 8,
|
|
312
|
+
borderWidth: 1,
|
|
313
|
+
borderColor: '#E6EAFF',
|
|
314
|
+
borderStyle: 'solid',
|
|
315
|
+
height: 80, // Altura fixa para manter o tamanho
|
|
316
|
+
minWidth: 350,
|
|
317
|
+
maxWidth: 380,
|
|
318
|
+
overflow: 'visible', // Garante que os botões não sejam cortados
|
|
319
|
+
},
|
|
320
|
+
dragHandle: {
|
|
321
|
+
flexDirection: 'row',
|
|
322
|
+
flexWrap: 'wrap',
|
|
323
|
+
width: 20, // Reduzido para 20x20
|
|
324
|
+
height: 20, // Área quadrada 20x20
|
|
325
|
+
marginRight: 12,
|
|
326
|
+
alignItems: 'center',
|
|
327
|
+
justifyContent: 'center',
|
|
328
|
+
padding: 2, // Padding menor para agrupar os dots
|
|
329
|
+
},
|
|
330
|
+
dragDot: {
|
|
331
|
+
width: 4, // Dots um pouco maiores
|
|
332
|
+
height: 4,
|
|
333
|
+
borderRadius: 2,
|
|
334
|
+
backgroundColor: '#687499',
|
|
335
|
+
margin: 2, // Espaçamento vertical reduzido
|
|
336
|
+
// margin: 3, // Espaçamento uniforme
|
|
337
|
+
},
|
|
338
|
+
dragAreaForAddButton: {
|
|
339
|
+
width: 16,
|
|
340
|
+
height: 18,
|
|
341
|
+
marginRight: 12,
|
|
342
|
+
// Área invisível para permitir drag mesmo sem os pontos visuais
|
|
343
|
+
},
|
|
344
|
+
content: {
|
|
345
|
+
flex: 1,
|
|
346
|
+
flexDirection: 'row',
|
|
347
|
+
alignItems: 'center',
|
|
348
|
+
minWidth: 0, // Permite que o texto seja truncado se necessário
|
|
349
|
+
},
|
|
350
|
+
contentIcon: {
|
|
351
|
+
marginRight: 12,
|
|
352
|
+
},
|
|
353
|
+
textContainer: {
|
|
354
|
+
flex: 1,
|
|
355
|
+
minWidth: 0,
|
|
356
|
+
paddingTop: 0, // Remove padding completamente
|
|
357
|
+
paddingBottom: 0, // Remove padding completamente
|
|
358
|
+
height: 36, // Reduz altura para forçar apenas 2 linhas (18px + 18px)
|
|
359
|
+
justifyContent: 'flex-start', // Alinha o texto no topo
|
|
360
|
+
overflow: 'hidden', // Garante que texto extra seja cortado
|
|
361
|
+
},
|
|
362
|
+
title: {
|
|
363
|
+
fontSize: 16,
|
|
364
|
+
fontWeight: '600',
|
|
365
|
+
fontFamily: 'Nunito Sans',
|
|
366
|
+
lineHeight: 18, // Reduz ainda mais para 18px (era 20px)
|
|
367
|
+
textAlign: 'left',
|
|
368
|
+
},
|
|
369
|
+
subtitle: {
|
|
370
|
+
fontSize: 14,
|
|
371
|
+
fontWeight: '400',
|
|
372
|
+
fontFamily: 'Nunito Sans',
|
|
373
|
+
lineHeight: 16, // Reduz para 16px (era 18px)
|
|
374
|
+
marginTop: 0, // Remove margem superior para economizar espaço
|
|
375
|
+
textAlign: 'left',
|
|
376
|
+
},
|
|
377
|
+
actionButton: {
|
|
378
|
+
paddingLeft: 2, // Padding mínimo à esquerda
|
|
379
|
+
paddingRight: 0, // Remove padding à direita para ficar mais próximo
|
|
380
|
+
marginLeft: 0, // Remove margem para ficar mais próximo das setas
|
|
381
|
+
},
|
|
382
|
+
actionButtonBox: {
|
|
383
|
+
backgroundColor: '#F1F4FF',
|
|
384
|
+
borderTopRightRadius: 8,
|
|
385
|
+
borderBottomRightRadius: 8,
|
|
386
|
+
borderTopLeftRadius: 0,
|
|
387
|
+
borderBottomLeftRadius: 0,
|
|
388
|
+
borderWidth: 1,
|
|
389
|
+
borderColor: '#E2E9FC',
|
|
390
|
+
width: 30,
|
|
391
|
+
alignSelf: 'stretch', // Faz ocupar toda a altura disponível
|
|
392
|
+
justifyContent: 'center',
|
|
393
|
+
alignItems: 'center',
|
|
394
|
+
marginLeft: 2,
|
|
395
|
+
},
|
|
396
|
+
moveButtons: {
|
|
397
|
+
flexDirection: 'row',
|
|
398
|
+
marginLeft: 16,
|
|
399
|
+
alignSelf: 'stretch',
|
|
400
|
+
marginVertical: -12,
|
|
401
|
+
width: 90,
|
|
402
|
+
height: '100%', // Garante altura total
|
|
403
|
+
},
|
|
404
|
+
// Estilos do card expandido
|
|
405
|
+
expandedCard: {
|
|
406
|
+
backgroundColor: '#F8F9FF',
|
|
407
|
+
borderRadius: 8,
|
|
408
|
+
borderTopLeftRadius: 0,
|
|
409
|
+
borderTopRightRadius: 0,
|
|
410
|
+
padding: 16,
|
|
411
|
+
marginTop: 0,
|
|
412
|
+
borderWidth: 1,
|
|
413
|
+
borderTopWidth: 0,
|
|
414
|
+
borderColor: '#E6EAFF',
|
|
415
|
+
borderStyle: 'solid',
|
|
416
|
+
minWidth: 350,
|
|
417
|
+
maxWidth: 380,
|
|
418
|
+
},
|
|
419
|
+
expandedDescription: {
|
|
420
|
+
fontSize: 14,
|
|
421
|
+
fontWeight: '400',
|
|
422
|
+
fontFamily: 'Nunito Sans',
|
|
423
|
+
lineHeight: 20,
|
|
424
|
+
color: '#1B244B',
|
|
425
|
+
marginBottom: 8,
|
|
426
|
+
},
|
|
427
|
+
expandedSubtitle: {
|
|
428
|
+
fontSize: 12,
|
|
429
|
+
fontWeight: '400',
|
|
430
|
+
fontFamily: 'Nunito Sans',
|
|
431
|
+
lineHeight: 16,
|
|
432
|
+
color: '#687499',
|
|
433
|
+
marginBottom: 16,
|
|
434
|
+
},
|
|
435
|
+
expandedButtons: {
|
|
436
|
+
flexDirection: 'column',
|
|
437
|
+
gap: 8,
|
|
438
|
+
marginBottom: 16,
|
|
439
|
+
},
|
|
440
|
+
expandedButton: {
|
|
441
|
+
marginBottom: 10,
|
|
442
|
+
flexDirection: 'row',
|
|
443
|
+
alignItems: 'center',
|
|
444
|
+
justifyContent: 'center',
|
|
445
|
+
paddingVertical: 12,
|
|
446
|
+
paddingHorizontal: 16,
|
|
447
|
+
borderRadius: 8,
|
|
448
|
+
minHeight: 44,
|
|
449
|
+
},
|
|
450
|
+
expandedButtonPrimary: {
|
|
451
|
+
backgroundColor: '#2A4FDA',
|
|
452
|
+
},
|
|
453
|
+
expandedButtonSecondary: {
|
|
454
|
+
backgroundColor: 'transparent',
|
|
455
|
+
borderWidth: 1,
|
|
456
|
+
borderColor: '#2A4FDA',
|
|
457
|
+
},
|
|
458
|
+
expandedButtonText: {
|
|
459
|
+
fontSize: 14,
|
|
460
|
+
fontWeight: '600',
|
|
461
|
+
fontFamily: 'Nunito Sans',
|
|
462
|
+
lineHeight: 20,
|
|
463
|
+
},
|
|
464
|
+
expandedButtonTextPrimary: {
|
|
465
|
+
color: '#FFFFFF',
|
|
466
|
+
},
|
|
467
|
+
expandedButtonTextSecondary: {
|
|
468
|
+
color: '#2A4FDA',
|
|
469
|
+
},
|
|
470
|
+
expandedButtonIcon: {
|
|
471
|
+
marginLeft: 8,
|
|
472
|
+
},
|
|
473
|
+
removeButton: {
|
|
474
|
+
flexDirection: 'row',
|
|
475
|
+
alignItems: 'center',
|
|
476
|
+
justifyContent: 'center',
|
|
477
|
+
paddingVertical: 8,
|
|
478
|
+
},
|
|
479
|
+
removeButtonIcon: {
|
|
480
|
+
marginRight: 6,
|
|
481
|
+
},
|
|
482
|
+
removeButtonText: {
|
|
483
|
+
fontSize: 12,
|
|
484
|
+
fontWeight: '400',
|
|
485
|
+
fontFamily: 'Nunito Sans',
|
|
486
|
+
lineHeight: 16,
|
|
487
|
+
color: '#687499',
|
|
488
|
+
},
|
|
489
|
+
addButton: {
|
|
490
|
+
backgroundColor: '#2A4FDA',
|
|
491
|
+
borderTopRightRadius: 8,
|
|
492
|
+
borderTopLeftRadius: 0,
|
|
493
|
+
borderBottomLeftRadius: 0,
|
|
494
|
+
width: 60,
|
|
495
|
+
alignSelf: 'stretch',
|
|
496
|
+
justifyContent: 'center',
|
|
497
|
+
alignItems: 'center',
|
|
498
|
+
marginLeft: 0, // Remove margem para grudar à direita
|
|
499
|
+
marginVertical: -12, // Ajusta para o novo padding vertical (era -16)
|
|
500
|
+
},
|
|
501
|
+
actionButtonBoxDown: {
|
|
502
|
+
backgroundColor: '#F1F4FF',
|
|
503
|
+
borderTopRightRadius: 0,
|
|
504
|
+
borderBottomRightRadius: 0,
|
|
505
|
+
borderTopLeftRadius: 0,
|
|
506
|
+
borderBottomLeftRadius: 0,
|
|
507
|
+
borderWidth: 1,
|
|
508
|
+
borderColor: '#E2E9FC',
|
|
509
|
+
width: 45,
|
|
510
|
+
minHeight: 80, // Garante altura mínima
|
|
511
|
+
alignSelf: 'stretch',
|
|
512
|
+
justifyContent: 'center',
|
|
513
|
+
alignItems: 'center',
|
|
514
|
+
padding: 12, // Aumenta área touchable
|
|
515
|
+
},
|
|
516
|
+
actionButtonBoxUp: {
|
|
517
|
+
backgroundColor: '#F1F4FF',
|
|
518
|
+
borderTopRightRadius: 8,
|
|
519
|
+
borderBottomRightRadius: 8, // Adiciona border inferior direito
|
|
520
|
+
borderTopLeftRadius: 0,
|
|
521
|
+
borderBottomLeftRadius: 0,
|
|
522
|
+
borderWidth: 1,
|
|
523
|
+
borderColor: '#E2E9FC',
|
|
524
|
+
width: 45,
|
|
525
|
+
minHeight: 80, // Garante altura mínima
|
|
526
|
+
alignSelf: 'stretch',
|
|
527
|
+
justifyContent: 'center',
|
|
528
|
+
alignItems: 'center',
|
|
529
|
+
padding: 12, // Aumenta área touchable
|
|
530
|
+
},
|
|
531
|
+
iconContainer: {
|
|
532
|
+
paddingLeft: 11,
|
|
533
|
+
width: 32,
|
|
534
|
+
height: 32,
|
|
535
|
+
borderRadius: 8,
|
|
536
|
+
justifyContent: 'center',
|
|
537
|
+
alignItems: 'center',
|
|
538
|
+
marginRight: 12,
|
|
539
|
+
},
|
|
540
|
+
});
|
|
541
|
+
export default ShuffleItem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default Slider;
|
|
2
|
+
declare function Slider({ total, current, onPrevious, onNext, disabled, }: {
|
|
3
|
+
total?: number | undefined;
|
|
4
|
+
current?: number | undefined;
|
|
5
|
+
onPrevious?: (() => void) | undefined;
|
|
6
|
+
onNext?: (() => void) | undefined;
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
import React from 'react';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Slider/index.jsx"],"names":[],"mappings":";AAIA;;;;;;sBAyJC;kBA7JkD,OAAO"}
|