vpt-sebraeds 0.0.39 → 0.0.42
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/Dropdown/index.jsx +2 -2
- package/components/Table/index.jsx +3 -1
- package/dist/assets/Propertychart.png +0 -0
- package/dist/assets/Propertygoal.png +0 -0
- package/dist/assets/Propertypencil.png +0 -0
- package/dist/assets/Vector.png +0 -0
- package/dist/assets/edit-icon.png +0 -0
- package/dist/components/Dropdown/index.js +2 -2
- package/dist/components/MenuAccordion/assets/Vector.png +0 -0
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +2 -2
- package/dist/components/TaskCard/assets/README.md +22 -0
- package/dist/components/TaskCard/assets/edit-icon.png +0 -0
- package/dist/components/TaskCard/assets/example.js +10 -8
- package/package.json +2 -2
|
@@ -330,7 +330,7 @@ const Dropdown = ({
|
|
|
330
330
|
ref={scrollViewRef}
|
|
331
331
|
style={styles.pickerScrollView}
|
|
332
332
|
contentContainerStyle={{
|
|
333
|
-
paddingVertical: ITEM_HEIGHT *
|
|
333
|
+
paddingVertical: ITEM_HEIGHT * 1
|
|
334
334
|
}}
|
|
335
335
|
showsVerticalScrollIndicator={false}
|
|
336
336
|
snapToInterval={ITEM_HEIGHT}
|
|
@@ -521,7 +521,7 @@ const styles = StyleSheet.create({
|
|
|
521
521
|
},
|
|
522
522
|
// Picker styles
|
|
523
523
|
pickerContainer: {
|
|
524
|
-
height: ITEM_HEIGHT *
|
|
524
|
+
height: ITEM_HEIGHT * 3,
|
|
525
525
|
overflow: 'hidden',
|
|
526
526
|
},
|
|
527
527
|
pickerScrollView: {
|
|
@@ -14,7 +14,8 @@ const Table = ({
|
|
|
14
14
|
onRowPress,
|
|
15
15
|
hideUnavailableStatus = false,
|
|
16
16
|
statusDropdownShowCloseButton = false,
|
|
17
|
-
statusDropdownItemGap = 0
|
|
17
|
+
statusDropdownItemGap = 0,
|
|
18
|
+
yearDropdownShowCloseButton = false
|
|
18
19
|
}) => {
|
|
19
20
|
const [selectedYear, setSelectedYear] = useState(null);
|
|
20
21
|
const [selectedStatuses, setSelectedStatuses] = useState([]);
|
|
@@ -235,6 +236,7 @@ const Table = ({
|
|
|
235
236
|
displayMode="picker"
|
|
236
237
|
innerTitle="Escolha um ano para exibir:"
|
|
237
238
|
disabled={yearOptions.length === 0}
|
|
239
|
+
showCloseButton={yearDropdownShowCloseButton}
|
|
238
240
|
/>
|
|
239
241
|
</View>
|
|
240
242
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -247,7 +247,7 @@ const Dropdown = ({ title, onSelect, options = [], withSeparator = false, isOpen
|
|
|
247
247
|
if (isPicker) {
|
|
248
248
|
return (<View style={styles.pickerContainer}>
|
|
249
249
|
<ScrollView ref={scrollViewRef} style={styles.pickerScrollView} contentContainerStyle={{
|
|
250
|
-
paddingVertical: ITEM_HEIGHT *
|
|
250
|
+
paddingVertical: ITEM_HEIGHT * 1
|
|
251
251
|
}} showsVerticalScrollIndicator={false} snapToInterval={ITEM_HEIGHT} decelerationRate="fast" onMomentumScrollEnd={(e) => {
|
|
252
252
|
const idx = Math.round(e.nativeEvent.contentOffset.y / ITEM_HEIGHT);
|
|
253
253
|
const clampedIdx = Math.max(0, Math.min(idx, options.length - 1));
|
|
@@ -403,7 +403,7 @@ const styles = StyleSheet.create({
|
|
|
403
403
|
},
|
|
404
404
|
// Picker styles
|
|
405
405
|
pickerContainer: {
|
|
406
|
-
height: ITEM_HEIGHT *
|
|
406
|
+
height: ITEM_HEIGHT * 3,
|
|
407
407
|
overflow: 'hidden',
|
|
408
408
|
},
|
|
409
409
|
pickerScrollView: {
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default Table;
|
|
2
|
-
declare function Table({ data, showMoreComponent, showFilters, onFilterChange, selectedRowIndex, onRowPress, hideUnavailableStatus, statusDropdownShowCloseButton, statusDropdownItemGap }: {
|
|
2
|
+
declare function Table({ data, showMoreComponent, showFilters, onFilterChange, selectedRowIndex, onRowPress, hideUnavailableStatus, statusDropdownShowCloseButton, statusDropdownItemGap, yearDropdownShowCloseButton }: {
|
|
3
3
|
data?: never[] | undefined;
|
|
4
4
|
showMoreComponent: any;
|
|
5
5
|
showFilters?: boolean | undefined;
|
|
@@ -9,6 +9,7 @@ declare function Table({ data, showMoreComponent, showFilters, onFilterChange, s
|
|
|
9
9
|
hideUnavailableStatus?: boolean | undefined;
|
|
10
10
|
statusDropdownShowCloseButton?: boolean | undefined;
|
|
11
11
|
statusDropdownItemGap?: number | undefined;
|
|
12
|
+
yearDropdownShowCloseButton?: boolean | undefined;
|
|
12
13
|
}): React.JSX.Element;
|
|
13
14
|
import React from 'react';
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Table/index.jsx"],"names":[],"mappings":";AAOA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Table/index.jsx"],"names":[],"mappings":";AAOA;;;;;;;;;;;sBA0UC;kBAjVsE,OAAO"}
|
|
@@ -4,7 +4,7 @@ import moment from 'moment';
|
|
|
4
4
|
import Icon from '../Icon';
|
|
5
5
|
import Select from '../Select';
|
|
6
6
|
import SEText from '../SEText';
|
|
7
|
-
const Table = ({ data = [], showMoreComponent, showFilters = false, onFilterChange, selectedRowIndex = null, onRowPress, hideUnavailableStatus = false, statusDropdownShowCloseButton = false, statusDropdownItemGap = 0 }) => {
|
|
7
|
+
const Table = ({ data = [], showMoreComponent, showFilters = false, onFilterChange, selectedRowIndex = null, onRowPress, hideUnavailableStatus = false, statusDropdownShowCloseButton = false, statusDropdownItemGap = 0, yearDropdownShowCloseButton = false }) => {
|
|
8
8
|
const [selectedYear, setSelectedYear] = useState(null);
|
|
9
9
|
const [selectedStatuses, setSelectedStatuses] = useState([]);
|
|
10
10
|
const [selectedFilter, setSelectedFilter] = useState({});
|
|
@@ -190,7 +190,7 @@ const Table = ({ data = [], showMoreComponent, showFilters = false, onFilterChan
|
|
|
190
190
|
return (<View style={styles.container}>
|
|
191
191
|
{showFilters && (<View style={styles.filtersContainer}>
|
|
192
192
|
<View style={[styles.filterItem, { width: '35%' }]}>
|
|
193
|
-
<Select label="Ano" value={yearOptions.find(option => option.value === selectedYear)} onSelect={handleYearChange} options={yearOptions} placeholder="Selecione o ano" displayMode="picker" innerTitle="Escolha um ano para exibir:" disabled={yearOptions.length === 0}/>
|
|
193
|
+
<Select label="Ano" value={yearOptions.find(option => option.value === selectedYear)} onSelect={handleYearChange} options={yearOptions} placeholder="Selecione o ano" displayMode="picker" innerTitle="Escolha um ano para exibir:" disabled={yearOptions.length === 0} showCloseButton={yearDropdownShowCloseButton}/>
|
|
194
194
|
</View>
|
|
195
195
|
|
|
196
196
|
<View style={[styles.filterItem, { width: '60%' }]}>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Assets do TaskCard
|
|
2
|
+
|
|
3
|
+
## Como adicionar a imagem do ícone de edição:
|
|
4
|
+
|
|
5
|
+
1. Salve a imagem do ícone azul de edição nesta pasta com o nome `edit-icon.png`
|
|
6
|
+
2. No arquivo `EditIcon.jsx`, descomente e ajuste a linha de import:
|
|
7
|
+
```javascript
|
|
8
|
+
import editIconImage from '../assets/edit-icon.png';
|
|
9
|
+
```
|
|
10
|
+
3. Use o componente passando a propriedade `source`:
|
|
11
|
+
```javascript
|
|
12
|
+
<EditIcon source={editIconImage} size={20} />
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Formatos suportados:
|
|
16
|
+
- PNG (recomendado para ícones)
|
|
17
|
+
- JPG
|
|
18
|
+
- SVG (com bibliotecas adicionais)
|
|
19
|
+
|
|
20
|
+
## Resolução recomendada:
|
|
21
|
+
- 20x20px, 40x40px, 60x60px (para diferentes densidades de tela)
|
|
22
|
+
- Ou usar SVG para escalabilidade perfeita
|
|
Binary file
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
// Exemplo de como usar o EditIcon com a imagem
|
|
2
|
-
// Descomente essas linhas quando adicionar a imagem na pasta assets:
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
|
|
1
|
+
// Exemplo de como usar o EditIcon com a imagem
|
|
2
|
+
// Descomente essas linhas quando adicionar a imagem na pasta assets:
|
|
3
|
+
|
|
4
|
+
// import editIconImage from '../assets/edit-icon.png';
|
|
5
|
+
//
|
|
6
|
+
// // Uso do componente:
|
|
7
|
+
// <EditIcon source={editIconImage} size={20} />
|
|
8
|
+
|
|
9
|
+
// Por enquanto, o componente mostra um placeholder azul
|
|
10
|
+
export default null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vpt-sebraeds",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
4
4
|
"description": "Biblioteca de componentes React Native do Sebrae",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"LICENSE"
|
|
27
27
|
],
|
|
28
28
|
"scripts": {
|
|
29
|
-
"build": "tsc",
|
|
29
|
+
"build": "tsc && node scripts/copy-assets.js",
|
|
30
30
|
"prepublishOnly": "npm run build",
|
|
31
31
|
"android": "react-native run-android",
|
|
32
32
|
"ios": "react-native run-ios",
|