vpt-sebraeds 0.0.76 → 0.0.78
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 +20 -20
- package/README.md +225 -225
- package/components/Accordion/Accordion.stories.jsx +143 -143
- package/components/Accordion/README.md +144 -144
- package/components/Accordion/index.jsx +334 -334
- package/components/AccordionAvatar/AccordionAvatar.stories.jsx +27 -27
- package/components/AccordionAvatar/index.jsx +94 -94
- package/components/AdBanner/AdBanner.stories.jsx +62 -62
- package/components/AdBanner/index.jsx +92 -92
- package/components/Avatar/Avatar.stories.jsx +59 -59
- package/components/Avatar/index.jsx +102 -102
- package/components/Banner/Banner.stories.jsx +127 -127
- package/components/Banner/index.jsx +70 -70
- package/components/BottomSheet/BottomSheet.jsx +235 -235
- package/components/BottomSheet/BottomSheet.stories.jsx +541 -541
- package/components/BottomSheet/BottomSheetNomeEmpresa.jsx +110 -110
- package/components/BottomSheet/Components/ActionButtons.jsx +91 -91
- package/components/BottomSheet/Components/ListaDeEstados.jsx +337 -337
- package/components/BottomSheet/index.jsx +1 -1
- package/components/Breadcrumb/Breadcrumb.stories.jsx +62 -62
- package/components/Breadcrumb/index.jsx +88 -88
- package/components/Bullet/Bullet.stories.jsx +55 -55
- package/components/Bullet/index.jsx +224 -224
- package/components/Button/ButtonPrimary.stories.jsx +372 -372
- package/components/Button/index.jsx +528 -528
- package/components/ButtonGroup/ButtonGroup.stories.jsx +431 -383
- package/components/ButtonGroup/index.tsx +516 -439
- package/components/CNAESelectItem/CNAESelectItem.stories.jsx +195 -195
- package/components/CNAESelectItem/index.jsx +259 -259
- package/components/CNAESelectItem/padrao.js +1145 -1145
- package/components/CardNumber/CardNumber.stories.jsx +60 -60
- package/components/CardNumber/index.jsx +136 -136
- package/components/Checkbox/Checkbox.stories.jsx +70 -70
- package/components/Checkbox/index.jsx +125 -125
- package/components/CommitmentCard/CommitmentCard.stories.jsx +282 -282
- package/components/CommitmentCard/index.jsx +227 -227
- package/components/ContentBlock/ContentBlock.stories.tsx +48 -48
- package/components/ContentBlock/ContentBlock.tsx +50 -50
- package/components/ContentCard/ContentCard.stories.jsx +130 -130
- package/components/ContentCard/index.jsx +326 -326
- package/components/ContentRelatedCard/ContentRelatedCard.stories.jsx +79 -79
- package/components/ContentRelatedCard/index.jsx +79 -79
- package/components/ContentSlot/ContentSlot.stories.jsx +276 -276
- package/components/ContentSlot/index.jsx +196 -196
- package/components/CopyButton/CopyButton.stories.jsx +110 -110
- package/components/CopyButton/index.jsx +192 -192
- package/components/Datepicker/Datepicker.stories.jsx +291 -239
- package/components/Datepicker/MonthSelector.jsx +323 -323
- package/components/Datepicker/TimeSelector.jsx +261 -261
- package/components/Datepicker/index.jsx +815 -454
- package/components/DonutChart/DonutChart.stories.jsx +221 -221
- package/components/DonutChart/index.jsx +191 -191
- package/components/Dropdown/Dropdown.stories.jsx +331 -331
- package/components/Dropdown/index.jsx +556 -556
- package/components/DropdownCommitments/index.js +149 -149
- package/components/EmptySlot/EmptySlot.stories.jsx +114 -114
- package/components/EmptySlot/index.jsx +152 -152
- package/components/EventListItem/EventListItem.stories.tsx +179 -179
- package/components/EventListItem/index.tsx +532 -514
- package/components/ExpandableNumberDisplay/ExpandableNumberDisplay.stories.jsx +92 -92
- package/components/ExpandableNumberDisplay/index.tsx +126 -126
- package/components/FilterTag/FilterTag.stories.jsx +54 -54
- package/components/FilterTag/index.jsx +69 -69
- package/components/FilterableMultiSelect/FilterableMultiSelect.stories.jsx +63 -63
- package/components/FilterableMultiSelect/index.jsx +207 -207
- package/components/FilterableUniSelect/FilterableUniSelect.stories.jsx +68 -68
- package/components/FilterableUniSelect/index.jsx +251 -251
- package/components/GeneralInformationCard/GeneralInformationCard.stories.jsx +62 -62
- package/components/GeneralInformationCard/index.tsx +123 -123
- package/components/GettingStarted.jsx +38 -38
- package/components/Header/Header.stories.jsx +1075 -1008
- package/components/Header/HeaderV2.stories.jsx +1200 -1113
- package/components/Header/index.jsx +5 -5
- package/components/Header/v1/components/Context.jsx +32 -32
- package/components/Header/v1/components/Information.jsx +109 -107
- package/components/Header/v1/components/Shortcut.jsx +45 -45
- package/components/Header/v1/components/SwitchAccount.jsx +301 -211
- package/components/Header/v1/components/Variants.jsx +479 -478
- package/components/Header/v1/components/index.jsx +12 -12
- package/components/Header/v1/index.jsx +195 -195
- package/components/Header/v2/README.md +757 -724
- package/components/Header/v2/index.jsx +224 -219
- package/components/Header/v2/parts/BackButton.jsx +36 -36
- package/components/Header/v2/parts/Context.jsx +25 -25
- package/components/Header/v2/parts/Hero.jsx +68 -59
- package/components/Header/v2/parts/Information.jsx +68 -66
- package/components/Header/v2/parts/Shortcut.jsx +39 -39
- package/components/Header/v2/parts/SwitchAccount.jsx +381 -290
- package/components/Header/v2/parts/Variants.jsx +420 -353
- package/components/Header/v2/parts/index.jsx +22 -22
- package/components/Header/v2/styles.js +598 -598
- package/components/Icon/iconEnums.ts +285 -285
- package/components/Icon/index.jsx +38 -38
- package/components/Image/Image.stories.jsx +250 -250
- package/components/Image/index.jsx +175 -175
- package/components/Input/Input.stories.jsx +394 -394
- package/components/Input/InputUnderline.tsx +161 -161
- package/components/Input/index.jsx +305 -305
- package/components/Legend/Legend.stories.jsx +110 -110
- package/components/Legend/index.jsx +87 -87
- package/components/Link/Link.stories.jsx +78 -78
- package/components/Link/index.jsx +66 -66
- package/components/List/List.stories.jsx +57 -57
- package/components/List/index.jsx +64 -64
- package/components/ListItem/ListItem.stories.jsx +179 -179
- package/components/ListItem/index.jsx +532 -532
- package/components/MenuAccordion/MenuAccordion.stories.jsx +27 -27
- package/components/MenuAccordion/index.jsx +98 -98
- package/components/Modal/Modal.stories.jsx +151 -151
- package/components/Modal/index.jsx +249 -249
- package/components/Navbar/Navbar.stories.jsx +244 -244
- package/components/Navbar/index.jsx +130 -130
- package/components/NavigationItem/NavigationItem.stories.tsx +483 -454
- package/components/NavigationItem/index.tsx +792 -524
- package/components/NotificationBanner/NotificationBanner.stories.jsx +57 -57
- package/components/NotificationBanner/index.jsx +154 -154
- package/components/NotificationCard/NotificationCard.stories.jsx +93 -93
- package/components/NotificationCard/index.jsx +338 -338
- package/components/NotificationDialog/NotificationDialog.stories.jsx +205 -205
- package/components/NotificationDialog/README.md +104 -104
- package/components/NotificationDialog/index.jsx +283 -283
- package/components/NumberDisplay/NumberDisplay.stories.jsx +339 -339
- package/components/NumberDisplay/index.jsx +483 -483
- package/components/Pagination/Pagination.stories.jsx +170 -170
- package/components/Pagination/index.jsx +229 -229
- package/components/ProgressBar/ProgressBar.stories.jsx +355 -355
- package/components/ProgressBar/index.jsx +91 -91
- package/components/ProgressChart/ProgressChart.stories.jsx +312 -312
- package/components/ProgressChart/index.jsx +193 -193
- package/components/Quote/Quote.stories.tsx +32 -32
- package/components/Quote/Quote.tsx +60 -60
- package/components/RadioButton/RadioButton.stories.jsx +112 -112
- package/components/RadioButton/index.jsx +114 -114
- package/components/RangeSlider/RangeSlider.stories.jsx +165 -165
- package/components/RangeSlider/index.tsx +255 -255
- package/components/Rating/Rating.stories.jsx +196 -196
- package/components/Rating/index.jsx +187 -187
- package/components/SEIcon/CustomIcon/boletoDasMei.jsx +25 -25
- package/components/SEIcon/CustomIcon/calculadoraPrecoIdeal.jsx +22 -22
- package/components/SEIcon/CustomIcon/calculadoraValuation.jsx +21 -21
- package/components/SEIcon/CustomIcon/capacidadePagamento.jsx +22 -22
- package/components/SEIcon/CustomIcon/capitalGiro.jsx +22 -22
- package/components/SEIcon/CustomIcon/catalogoFornecedores.jsx +22 -22
- package/components/SEIcon/CustomIcon/creditoPermutas.jsx +22 -22
- package/components/SEIcon/CustomIcon/dataValidadeEpi.jsx +25 -25
- package/components/SEIcon/CustomIcon/diagnosticoEstrategico.jsx +22 -22
- package/components/SEIcon/CustomIcon/dominandoRedesSociais.jsx +22 -22
- package/components/SEIcon/CustomIcon/empresaGoogle.jsx +22 -22
- package/components/SEIcon/CustomIcon/fluxoCaixa.jsx +22 -22
- package/components/SEIcon/CustomIcon/fornecedoresTi.jsx +22 -22
- package/components/SEIcon/CustomIcon/geradoresIdeiasIA.jsx +25 -25
- package/components/SEIcon/CustomIcon/gestaoAgendamento.jsx +22 -22
- package/components/SEIcon/CustomIcon/impostoMei.jsx +22 -22
- package/components/SEIcon/CustomIcon/indicadorPorRegiao.jsx +27 -27
- package/components/SEIcon/CustomIcon/indicadoresMercado.jsx +25 -25
- package/components/SEIcon/CustomIcon/listaEpi.jsx +22 -22
- package/components/SEIcon/CustomIcon/lucroPotencial.jsx +24 -24
- package/components/SEIcon/CustomIcon/melhoresRegioesComerciais.jsx +24 -24
- package/components/SEIcon/CustomIcon/ncmComCodigoDeBarras.jsx +25 -25
- package/components/SEIcon/CustomIcon/pesquisaRegistroDeMarca.jsx +23 -23
- package/components/SEIcon/CustomIcon/planoNegocios.jsx +23 -23
- package/components/SEIcon/CustomIcon/postsInteligentes.jsx +24 -24
- package/components/SEIcon/CustomIcon/sebraeConecta.jsx +25 -25
- package/components/SEIcon/CustomIcon/segurancaTrabalho.jsx +25 -25
- package/components/SEIcon/CustomIcon/simuladorEmprestimo.jsx +22 -22
- package/components/SEIcon/SEIcon.stories.jsx +211 -211
- package/components/SEIcon/index.js +114 -114
- package/components/SEText/index.d.ts +74 -74
- package/components/SEText/index.js +171 -171
- package/components/SEText/styles.js +348 -348
- package/components/ScrollBar/ScrollBar.stories.tsx +65 -65
- package/components/ScrollBar/index.tsx +139 -139
- package/components/Search/Search.stories.jsx +161 -161
- package/components/Search/index.jsx +267 -267
- package/components/SegmentedButton/SegmentedButton.stories.jsx +274 -274
- package/components/SegmentedButton/index.jsx +195 -195
- package/components/Select/Select.stories.jsx +415 -415
- package/components/Select/index.jsx +321 -321
- package/components/SelectItem/SelectItem.stories.jsx +609 -609
- package/components/SelectItem/index.jsx +174 -174
- package/components/Shortcut/Shortcut.stories.jsx +202 -202
- package/components/Shortcut/index.jsx +294 -294
- package/components/ShowMore/ShowMore.stories.jsx +70 -70
- package/components/ShowMore/index.jsx +68 -68
- package/components/ShuffleItem/ShuffleItem.stories.jsx +278 -278
- package/components/ShuffleItem/index.jsx +723 -723
- package/components/Slider/Slider.stories.jsx +248 -248
- package/components/Slider/index.jsx +211 -211
- package/components/Tab/Tab.stories.jsx +323 -323
- package/components/Tab/index.jsx +483 -483
- package/components/Table/Table.stories.jsx +253 -253
- package/components/Table/index.jsx +432 -432
- package/components/Tag/Tag.stories.jsx +78 -78
- package/components/Tag/index.d.ts +10 -10
- package/components/Tag/index.jsx +129 -129
- package/components/TaggedInputText/TaggedInputText.stories.jsx +106 -106
- package/components/TaggedInputText/index.jsx +232 -232
- package/components/TaskCard/TaskCard.stories.jsx +468 -468
- package/components/TaskCard/assets/README.md +22 -22
- package/components/TaskCard/assets/example.js +10 -10
- package/components/TaskCard/components/EditIcon.jsx +78 -78
- package/components/TaskCard/components/SuccessContent.jsx +52 -52
- package/components/TaskCard/components/SuccessIcon.jsx +52 -52
- package/components/TaskCard/components/SuccessTitle.jsx +49 -49
- package/components/TaskCard/components/Tag.jsx +80 -80
- package/components/TaskCard/components/TagGroup.jsx +60 -60
- package/components/TaskCard/components/TaskDescription.jsx +51 -51
- package/components/TaskCard/components/index.js +7 -7
- package/components/TaskCard/index.jsx +317 -317
- package/components/Toast/Toast.stories.jsx +316 -316
- package/components/Toast/index.jsx +386 -386
- package/components/Toggle/Toggle.stories.jsx +161 -161
- package/components/Toggle/index.jsx +145 -145
- package/components/Tools/NavigationButton/NavigationButton.stories.jsx +140 -140
- package/components/Tools/NavigationButton/index.jsx +341 -341
- package/components/Tools/SearchResult/SearchResult.stories.jsx +112 -112
- package/components/Tools/SearchResult/index.jsx +106 -106
- package/components/TooltipCard/TooltipCard.stories.jsx +88 -88
- package/components/TooltipCard/index.jsx +355 -355
- package/components/Typography/Typography.stories.jsx +262 -262
- package/components/Typography/index.jsx +137 -137
- package/components/styles/colors.js +204 -204
- package/components/styles/fonts.js +15 -15
- package/components/styles/index,js +7 -7
- package/components/styles/metrics.js +13 -13
- package/components/styles/tokens.ts +222 -222
- package/components/styles.ts +79 -79
- package/components/utils/fontFamily.js +6 -6
- package/dist/components/Accordion/index.js +32 -32
- package/dist/components/AccordionAvatar/index.js +19 -19
- package/dist/components/AdBanner/index.js +12 -12
- package/dist/components/Avatar/index.js +6 -6
- package/dist/components/Banner/index.js +5 -5
- package/dist/components/BottomSheet/BottomSheet.js +31 -31
- package/dist/components/BottomSheet/BottomSheetNomeEmpresa.js +21 -21
- package/dist/components/BottomSheet/Components/ActionButtons.js +13 -13
- package/dist/components/BottomSheet/Components/ListaDeEstados.js +10 -10
- package/dist/components/Breadcrumb/index.js +7 -7
- package/dist/components/Bullet/index.js +14 -14
- package/dist/components/ButtomGroup/index.js +21 -21
- package/dist/components/Button/index.js +15 -15
- package/dist/components/ButtonGroup/index.d.ts +4 -2
- package/dist/components/ButtonGroup/index.d.ts.map +1 -1
- package/dist/components/ButtonGroup/index.js +68 -25
- package/dist/components/CNAESelectItem/index.js +54 -54
- package/dist/components/CNAESelectItem/padrao.js +213 -213
- package/dist/components/CardNumber/index.js +16 -16
- package/dist/components/Checkbox/index.js +7 -7
- package/dist/components/CommitmentCard/index.js +30 -30
- package/dist/components/ContentBlock/ContentBlock.js +7 -7
- package/dist/components/ContentCard/index.js +50 -50
- package/dist/components/ContentRelatedCard/index.js +10 -10
- package/dist/components/ContentSlot/index.js +31 -31
- package/dist/components/CopyButton/index.js +5 -5
- package/dist/components/Datepicker/MonthSelector.js +13 -13
- package/dist/components/Datepicker/TimeSelector.js +15 -15
- package/dist/components/Datepicker/index.d.ts.map +1 -1
- package/dist/components/Datepicker/index.js +485 -149
- package/dist/components/DonutChart/index.js +19 -19
- package/dist/components/Dropdown/index.js +66 -66
- package/dist/components/DropdownCommitments/index.js +24 -24
- package/dist/components/EmptySlot/index.js +19 -19
- package/dist/components/EventListItem/index.d.ts.map +1 -1
- package/dist/components/EventListItem/index.js +61 -43
- package/dist/components/ExpandableNumberDisplay/index.js +19 -19
- package/dist/components/FilterTag/index.js +7 -7
- package/dist/components/FilterableMultiSelect/index.js +29 -29
- package/dist/components/FilterableUniSelect/index.js +33 -33
- package/dist/components/GeneralInformationCard/index.js +24 -24
- package/dist/components/GettingStarted.js +8 -8
- package/dist/components/Header/components/Context.d.ts +7 -7
- package/dist/components/Header/components/Context.js +21 -21
- package/dist/components/Header/components/Information.d.ts +6 -6
- package/dist/components/Header/components/Information.js +72 -72
- package/dist/components/Header/components/Shortcut.d.ts +5 -5
- package/dist/components/Header/components/Shortcut.js +25 -25
- package/dist/components/Header/components/SwitchAccount.d.ts +8 -8
- package/dist/components/Header/components/SwitchAccount.js +170 -170
- package/dist/components/Header/components/Variants.d.ts +22 -22
- package/dist/components/Header/components/Variants.js +371 -371
- package/dist/components/Header/components/index.d.ts +33 -33
- package/dist/components/Header/components/index.js +10 -10
- package/dist/components/Header/v1/components/Context.js +2 -2
- package/dist/components/Header/v1/components/Information.d.ts +2 -1
- package/dist/components/Header/v1/components/Information.d.ts.map +1 -1
- package/dist/components/Header/v1/components/Information.js +16 -15
- package/dist/components/Header/v1/components/SwitchAccount.d.ts +2 -1
- package/dist/components/Header/v1/components/SwitchAccount.d.ts.map +1 -1
- package/dist/components/Header/v1/components/SwitchAccount.js +124 -42
- package/dist/components/Header/v1/components/Variants.d.ts.map +1 -1
- package/dist/components/Header/v1/components/Variants.js +84 -84
- package/dist/components/Header/v1/index.js +5 -5
- package/dist/components/Header/v2/index.js +11 -6
- package/dist/components/Header/v2/parts/BackButton.js +2 -2
- package/dist/components/Header/v2/parts/Context.js +2 -2
- package/dist/components/Header/v2/parts/Hero.d.ts +2 -1
- package/dist/components/Header/v2/parts/Hero.d.ts.map +1 -1
- package/dist/components/Header/v2/parts/Hero.js +14 -10
- package/dist/components/Header/v2/parts/Information.d.ts +2 -1
- package/dist/components/Header/v2/parts/Information.d.ts.map +1 -1
- package/dist/components/Header/v2/parts/Information.js +14 -13
- package/dist/components/Header/v2/parts/SwitchAccount.d.ts +2 -1
- package/dist/components/Header/v2/parts/SwitchAccount.d.ts.map +1 -1
- package/dist/components/Header/v2/parts/SwitchAccount.js +147 -66
- package/dist/components/Header/v2/parts/Variants.d.ts +21 -0
- package/dist/components/Header/v2/parts/Variants.d.ts.map +1 -1
- package/dist/components/Header/v2/parts/Variants.js +188 -148
- package/dist/components/Header/v2/parts/index.d.ts +18 -0
- package/dist/components/Image/index.js +22 -22
- package/dist/components/Input/InputUnderline.js +7 -7
- package/dist/components/Input/index.js +14 -14
- package/dist/components/Legend/index.js +8 -8
- package/dist/components/Link/index.js +7 -7
- package/dist/components/List/index.js +7 -7
- package/dist/components/ListItem/index.js +74 -74
- package/dist/components/MenuAccordion/index.js +21 -21
- package/dist/components/Modal/index.js +38 -38
- package/dist/components/Navbar/index.js +9 -9
- package/dist/components/NavigationItem/index.d.ts +73 -10
- package/dist/components/NavigationItem/index.d.ts.map +1 -1
- package/dist/components/NavigationItem/index.js +300 -145
- package/dist/components/NotificationBanner/index.js +8 -8
- package/dist/components/NotificationCard/index.js +41 -41
- package/dist/components/NotificationDialog/index.js +46 -46
- package/dist/components/NumberDisplay/index.js +24 -24
- package/dist/components/Pagination/index.js +23 -23
- package/dist/components/ProgressBar/index.js +14 -14
- package/dist/components/ProgressChart/index.js +29 -29
- package/dist/components/Quote/Quote.js +9 -9
- package/dist/components/RadioButton/index.js +7 -7
- package/dist/components/RangeSlider/index.js +32 -32
- package/dist/components/Rating/index.js +16 -16
- package/dist/components/SEIcon/CustomIcon/boletoDasMei.js +6 -6
- package/dist/components/SEIcon/CustomIcon/calculadoraPrecoIdeal.js +3 -3
- package/dist/components/SEIcon/CustomIcon/calculadoraValuation.js +3 -3
- package/dist/components/SEIcon/CustomIcon/capacidadePagamento.js +3 -3
- package/dist/components/SEIcon/CustomIcon/capitalGiro.js +3 -3
- package/dist/components/SEIcon/CustomIcon/catalogoFornecedores.js +3 -3
- package/dist/components/SEIcon/CustomIcon/creditoPermutas.js +3 -3
- package/dist/components/SEIcon/CustomIcon/dataValidadeEpi.js +6 -6
- package/dist/components/SEIcon/CustomIcon/diagnosticoEstrategico.js +3 -3
- package/dist/components/SEIcon/CustomIcon/dominandoRedesSociais.js +3 -3
- package/dist/components/SEIcon/CustomIcon/empresaGoogle.js +3 -3
- package/dist/components/SEIcon/CustomIcon/fluxoCaixa.js +3 -3
- package/dist/components/SEIcon/CustomIcon/fornecedoresTi.js +3 -3
- package/dist/components/SEIcon/CustomIcon/geradoresIdeiasIA.js +6 -6
- package/dist/components/SEIcon/CustomIcon/gestaoAgendamento.js +3 -3
- package/dist/components/SEIcon/CustomIcon/impostoMei.js +3 -3
- package/dist/components/SEIcon/CustomIcon/indicadorPorRegiao.js +6 -6
- package/dist/components/SEIcon/CustomIcon/indicadoresMercado.js +6 -6
- package/dist/components/SEIcon/CustomIcon/listaEpi.js +3 -3
- package/dist/components/SEIcon/CustomIcon/lucroPotencial.js +6 -6
- package/dist/components/SEIcon/CustomIcon/melhoresRegioesComerciais.js +6 -6
- package/dist/components/SEIcon/CustomIcon/ncmComCodigoDeBarras.js +6 -6
- package/dist/components/SEIcon/CustomIcon/pesquisaRegistroDeMarca.js +3 -3
- package/dist/components/SEIcon/CustomIcon/planoNegocios.js +3 -3
- package/dist/components/SEIcon/CustomIcon/postsInteligentes.js +6 -6
- package/dist/components/SEIcon/CustomIcon/sebraeConecta.js +6 -6
- package/dist/components/SEIcon/CustomIcon/segurancaTrabalho.js +6 -6
- package/dist/components/SEIcon/CustomIcon/simuladorEmprestimo.js +3 -3
- package/dist/components/SEText/index.js +2 -2
- package/dist/components/ScrollBar/index.js +8 -8
- package/dist/components/Search/Search.d.ts +14 -14
- package/dist/components/Search/Search.js +272 -272
- package/dist/components/Search/index.js +17 -17
- package/dist/components/SegmentedButton/index.js +10 -10
- package/dist/components/Select/index.js +16 -16
- package/dist/components/SelectItem/index.js +6 -6
- package/dist/components/Shortcut/index.js +14 -14
- package/dist/components/ShowMore/index.js +7 -7
- package/dist/components/ShuffleItem/index.js +98 -98
- package/dist/components/Slider/index.js +20 -20
- package/dist/components/Tab/index.js +26 -26
- package/dist/components/Table/index.js +35 -35
- package/dist/components/Tag/index.js +5 -5
- package/dist/components/TaggedInputText/index.js +20 -20
- package/dist/components/TaskCard/assets/README.md +22 -22
- package/dist/components/TaskCard/assets/example.js +10 -10
- package/dist/components/TaskCard/components/EditIcon.js +2 -2
- package/dist/components/TaskCard/components/SuccessContent.js +3 -3
- package/dist/components/TaskCard/components/SuccessIcon.js +2 -2
- package/dist/components/TaskCard/components/SuccessTitle.js +2 -2
- package/dist/components/TaskCard/components/Tag.js +4 -4
- package/dist/components/TaskCard/components/TagGroup.js +4 -4
- package/dist/components/TaskCard/components/TaskDescription.js +2 -2
- package/dist/components/TaskCard/index.js +51 -51
- package/dist/components/Toast/index.js +36 -36
- package/dist/components/Toggle/index.js +3 -3
- package/dist/components/Tools/NavigationButton/index.js +53 -53
- package/dist/components/Tools/SearchResult/index.js +19 -19
- package/dist/components/TooltipCard/index.js +46 -46
- package/dist/components/Typography/index.js +2 -2
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -0
- package/package.json +124 -124
- package/src/index.ts +107 -100
|
@@ -1,514 +1,532 @@
|
|
|
1
|
-
import React, { createContext, useContext, useMemo } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Pressable,
|
|
4
|
-
StyleProp,
|
|
5
|
-
StyleSheet,
|
|
6
|
-
Text,
|
|
7
|
-
View,
|
|
8
|
-
ViewStyle,
|
|
9
|
-
} from 'react-native';
|
|
10
|
-
|
|
11
|
-
import Icon from '../Icon';
|
|
12
|
-
import Tag from '../Tag';
|
|
13
|
-
import tokens from '../styles/tokens';
|
|
14
|
-
import { fontFamily } from '../utils/fontFamily';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
* -
|
|
22
|
-
* -
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (
|
|
71
|
-
if (state === '
|
|
72
|
-
return styles.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (
|
|
81
|
-
if (state === '
|
|
82
|
-
return colors.default;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
*
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
<
|
|
196
|
-
<
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
<
|
|
207
|
-
<
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
)
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
)
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
width:
|
|
372
|
-
|
|
373
|
-
alignItems: '
|
|
374
|
-
},
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
},
|
|
408
|
-
|
|
409
|
-
flexDirection: 'row',
|
|
410
|
-
alignItems: 'center',
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
},
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
508
|
-
(EventListItem as any).
|
|
509
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
510
|
-
(EventListItem as any).
|
|
511
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
512
|
-
(EventListItem as any).
|
|
513
|
-
|
|
514
|
-
|
|
1
|
+
import React, { createContext, useContext, useMemo } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Pressable,
|
|
4
|
+
StyleProp,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
Text,
|
|
7
|
+
View,
|
|
8
|
+
ViewStyle,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
|
|
11
|
+
import Icon from '../Icon';
|
|
12
|
+
import Tag from '../Tag';
|
|
13
|
+
import tokens from '../styles/tokens';
|
|
14
|
+
import { fontFamily } from '../utils/fontFamily';
|
|
15
|
+
import SEText from '../SEText';
|
|
16
|
+
|
|
17
|
+
export type EventListItemKind = 'detailed' | 'simple';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Variantes do Figma:
|
|
21
|
+
* - default: estado normal
|
|
22
|
+
* - active: estado selecionado/ativo
|
|
23
|
+
* - press: estado pressionado (pode ser usado também como preview no Storybook)
|
|
24
|
+
*/
|
|
25
|
+
export type EventListItemState = 'default' | 'active' | 'press';
|
|
26
|
+
|
|
27
|
+
type VariantStyles = {
|
|
28
|
+
default?: StyleProp<ViewStyle>;
|
|
29
|
+
active?: StyleProp<ViewStyle>;
|
|
30
|
+
press?: StyleProp<ViewStyle>;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type EventListItemContextValue = {
|
|
34
|
+
kind: EventListItemKind;
|
|
35
|
+
state: EventListItemState;
|
|
36
|
+
showTrailingIcon: boolean;
|
|
37
|
+
categoryColor?: {
|
|
38
|
+
default?: string;
|
|
39
|
+
active?: string;
|
|
40
|
+
press?: string;
|
|
41
|
+
};
|
|
42
|
+
categoryIconColor?: {
|
|
43
|
+
default?: string;
|
|
44
|
+
active?: string;
|
|
45
|
+
press?: string;
|
|
46
|
+
};
|
|
47
|
+
cardStyles?: VariantStyles;
|
|
48
|
+
accentBarStyles?: VariantStyles;
|
|
49
|
+
simpleContainerStyles?: VariantStyles;
|
|
50
|
+
onPress?: () => void;
|
|
51
|
+
testID?: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const EventListItemContext = createContext<EventListItemContextValue | null>(null);
|
|
55
|
+
|
|
56
|
+
const useEventListItem = () => {
|
|
57
|
+
const ctx = useContext(EventListItemContext);
|
|
58
|
+
if (!ctx) {
|
|
59
|
+
throw new Error(
|
|
60
|
+
'EventListItem compound components must be used within EventListItem'
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
return ctx;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
function pickStyle(
|
|
67
|
+
state: EventListItemState,
|
|
68
|
+
styles?: VariantStyles
|
|
69
|
+
): StyleProp<ViewStyle> {
|
|
70
|
+
if (!styles) return undefined;
|
|
71
|
+
if (state === 'press') return styles.press;
|
|
72
|
+
if (state === 'active') return styles.active;
|
|
73
|
+
return styles.default;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function pickColor(
|
|
77
|
+
state: EventListItemState,
|
|
78
|
+
colors?: { default?: string; active?: string; press?: string }
|
|
79
|
+
) {
|
|
80
|
+
if (!colors) return undefined;
|
|
81
|
+
if (state === 'press') return colors.press ?? colors.active ?? colors.default;
|
|
82
|
+
if (state === 'active') return colors.active ?? colors.default;
|
|
83
|
+
return colors.default;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export type EventListItemProps = {
|
|
87
|
+
kind?: EventListItemKind;
|
|
88
|
+
state?: EventListItemState;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* As cores/estilos devem vir via prop/style (não hardcoded por variante de categoria).
|
|
92
|
+
* Esses estilos são aplicados conforme state (default/active/press).
|
|
93
|
+
*/
|
|
94
|
+
cardStyles?: VariantStyles;
|
|
95
|
+
accentBarStyles?: VariantStyles;
|
|
96
|
+
simpleContainerStyles?: VariantStyles;
|
|
97
|
+
|
|
98
|
+
categoryColor?: { default?: string; active?: string; press?: string };
|
|
99
|
+
categoryIconColor?: { default?: string; active?: string; press?: string };
|
|
100
|
+
|
|
101
|
+
showTrailingIcon?: boolean;
|
|
102
|
+
onPress?: () => void;
|
|
103
|
+
testID?: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Backward compatibility (API "pronta" sem composition)
|
|
107
|
+
*/
|
|
108
|
+
time?: string;
|
|
109
|
+
duration?: string;
|
|
110
|
+
categoryLabel?: string;
|
|
111
|
+
categoryIconName?: string;
|
|
112
|
+
title?: string;
|
|
113
|
+
description?: string;
|
|
114
|
+
responsible?: string;
|
|
115
|
+
tags?: string[];
|
|
116
|
+
date?: string;
|
|
117
|
+
label?: string;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Composition Pattern: quando children for informado, o componente renderiza
|
|
121
|
+
* apenas o layout-base e você monta os blocos usando os subcomponentes.
|
|
122
|
+
*/
|
|
123
|
+
children?: React.ReactNode;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
function EventListItem({
|
|
127
|
+
kind = 'detailed',
|
|
128
|
+
state = 'default',
|
|
129
|
+
cardStyles,
|
|
130
|
+
accentBarStyles,
|
|
131
|
+
simpleContainerStyles,
|
|
132
|
+
categoryColor,
|
|
133
|
+
categoryIconColor,
|
|
134
|
+
showTrailingIcon = true,
|
|
135
|
+
onPress,
|
|
136
|
+
testID,
|
|
137
|
+
// Backward compatibility
|
|
138
|
+
time,
|
|
139
|
+
duration,
|
|
140
|
+
categoryLabel,
|
|
141
|
+
categoryIconName,
|
|
142
|
+
title,
|
|
143
|
+
description,
|
|
144
|
+
responsible,
|
|
145
|
+
tags,
|
|
146
|
+
date,
|
|
147
|
+
label,
|
|
148
|
+
children,
|
|
149
|
+
}: EventListItemProps) {
|
|
150
|
+
const ctxValue = useMemo<EventListItemContextValue>(
|
|
151
|
+
() => ({
|
|
152
|
+
kind,
|
|
153
|
+
state,
|
|
154
|
+
showTrailingIcon,
|
|
155
|
+
categoryColor,
|
|
156
|
+
categoryIconColor,
|
|
157
|
+
cardStyles,
|
|
158
|
+
accentBarStyles,
|
|
159
|
+
simpleContainerStyles,
|
|
160
|
+
onPress,
|
|
161
|
+
testID,
|
|
162
|
+
}),
|
|
163
|
+
[
|
|
164
|
+
kind,
|
|
165
|
+
state,
|
|
166
|
+
showTrailingIcon,
|
|
167
|
+
categoryColor,
|
|
168
|
+
categoryIconColor,
|
|
169
|
+
cardStyles,
|
|
170
|
+
accentBarStyles,
|
|
171
|
+
simpleContainerStyles,
|
|
172
|
+
onPress,
|
|
173
|
+
testID,
|
|
174
|
+
]
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
// Se vier children, assume composition.
|
|
178
|
+
if (children) {
|
|
179
|
+
return (
|
|
180
|
+
<EventListItemContext.Provider value={ctxValue}>
|
|
181
|
+
{kind === 'simple' ? (
|
|
182
|
+
<View style={styles.simpleRoot}>{children}</View>
|
|
183
|
+
) : (
|
|
184
|
+
<View style={styles.row}>{children}</View>
|
|
185
|
+
)}
|
|
186
|
+
</EventListItemContext.Provider>
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Render padrão (sem composition) — mantém ergonomia e também serve de exemplo.
|
|
191
|
+
if (kind === 'simple') {
|
|
192
|
+
return (
|
|
193
|
+
<EventListItemContext.Provider value={ctxValue}>
|
|
194
|
+
<SimpleContainer>
|
|
195
|
+
{!!date && <Date>{date}</Date>}
|
|
196
|
+
<Label numberOfLines={1}>{label ?? ''}</Label>
|
|
197
|
+
<TrailingIcon />
|
|
198
|
+
</SimpleContainer>
|
|
199
|
+
</EventListItemContext.Provider>
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
return (
|
|
204
|
+
<EventListItemContext.Provider value={ctxValue}>
|
|
205
|
+
<View style={styles.row}>
|
|
206
|
+
<TimeColumn time={time} duration={duration} />
|
|
207
|
+
<AccentBar />
|
|
208
|
+
<Card>
|
|
209
|
+
<View style={styles.topRow}>
|
|
210
|
+
<Category iconName={categoryIconName}>
|
|
211
|
+
{categoryLabel ?? ''}
|
|
212
|
+
</Category>
|
|
213
|
+
<TrailingIcon />
|
|
214
|
+
</View>
|
|
215
|
+
|
|
216
|
+
{!!title && (
|
|
217
|
+
<Title numberOfLines={1}>{title}</Title>
|
|
218
|
+
)}
|
|
219
|
+
{!!description && (
|
|
220
|
+
<Description numberOfLines={1}>{description}</Description>
|
|
221
|
+
)}
|
|
222
|
+
{!!responsible && (
|
|
223
|
+
<Description numberOfLines={1}>{responsible}</Description>
|
|
224
|
+
)}
|
|
225
|
+
|
|
226
|
+
{!!tags?.length && (
|
|
227
|
+
<View style={styles.tagsRow}>
|
|
228
|
+
{tags.slice(0, 2).map((t, idx) => (
|
|
229
|
+
<View key={`${t}-${idx}`} style={styles.tag}>
|
|
230
|
+
<SEText bold style={styles.tagText}>
|
|
231
|
+
{t}
|
|
232
|
+
</SEText>
|
|
233
|
+
</View>
|
|
234
|
+
))}
|
|
235
|
+
</View>
|
|
236
|
+
)}
|
|
237
|
+
</Card>
|
|
238
|
+
</View>
|
|
239
|
+
</EventListItemContext.Provider>
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// =============================================================================
|
|
244
|
+
// Sub-componentes (Composition Pattern)
|
|
245
|
+
// =============================================================================
|
|
246
|
+
|
|
247
|
+
const TimeColumn = ({ time, duration }: { time?: string; duration?: string }) => (
|
|
248
|
+
<View style={styles.leftColumn}>
|
|
249
|
+
{!!time && <Text style={styles.time}>{time}</Text>}
|
|
250
|
+
{!!duration && <Text style={styles.duration}>{duration}</Text>}
|
|
251
|
+
</View>
|
|
252
|
+
);
|
|
253
|
+
|
|
254
|
+
const AccentBar = ({ style }: { style?: StyleProp<ViewStyle> }) => {
|
|
255
|
+
const { state, accentBarStyles } = useEventListItem();
|
|
256
|
+
return (
|
|
257
|
+
<View style={[styles.accentBar, pickStyle(state, accentBarStyles), style]} />
|
|
258
|
+
);
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
const Card = ({
|
|
262
|
+
children,
|
|
263
|
+
style,
|
|
264
|
+
}: {
|
|
265
|
+
children?: React.ReactNode;
|
|
266
|
+
style?: StyleProp<ViewStyle>;
|
|
267
|
+
}) => {
|
|
268
|
+
const { state, cardStyles, onPress, testID } = useEventListItem();
|
|
269
|
+
|
|
270
|
+
return (
|
|
271
|
+
<Pressable
|
|
272
|
+
accessibilityRole={onPress ? 'button' : undefined}
|
|
273
|
+
onPress={onPress}
|
|
274
|
+
testID={testID}
|
|
275
|
+
style={({ pressed }) => [
|
|
276
|
+
styles.card,
|
|
277
|
+
// Defaults neutros: o consumidor manda as cores via prop/style.
|
|
278
|
+
{ backgroundColor: tokens.colors.background.light },
|
|
279
|
+
pickStyle(state, cardStyles),
|
|
280
|
+
pressed && cardStyles?.press,
|
|
281
|
+
style,
|
|
282
|
+
]}
|
|
283
|
+
>
|
|
284
|
+
{children}
|
|
285
|
+
</Pressable>
|
|
286
|
+
);
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
const Category = ({
|
|
290
|
+
children,
|
|
291
|
+
iconName,
|
|
292
|
+
style,
|
|
293
|
+
}: {
|
|
294
|
+
children?: React.ReactNode;
|
|
295
|
+
iconName?: string;
|
|
296
|
+
style?: StyleProp<ViewStyle>;
|
|
297
|
+
}) => {
|
|
298
|
+
const { state, categoryColor, categoryIconColor } = useEventListItem();
|
|
299
|
+
const textColor = pickColor(state, categoryColor) ?? tokens.colors.text.brand;
|
|
300
|
+
const iconColor = pickColor(state, categoryIconColor) ?? textColor;
|
|
301
|
+
|
|
302
|
+
return (
|
|
303
|
+
<View style={[styles.categoryRow, style]}>
|
|
304
|
+
{!!iconName && (
|
|
305
|
+
<Icon name={iconName} size={18} color={iconColor} style={styles.categoryIcon} />
|
|
306
|
+
)}
|
|
307
|
+
<Text style={[styles.categoryLabel, { color: textColor }]} numberOfLines={1}>
|
|
308
|
+
{children ?? ''}
|
|
309
|
+
</Text>
|
|
310
|
+
</View>
|
|
311
|
+
);
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
const Title = (props: any) => <Text style={styles.title} {...props} />;
|
|
315
|
+
const Description = (props: any) => <Text style={styles.description} {...props} />;
|
|
316
|
+
|
|
317
|
+
const Tags = ({ children }: { children?: React.ReactNode }) => (
|
|
318
|
+
<View style={styles.tagsRow}>{children}</View>
|
|
319
|
+
);
|
|
320
|
+
|
|
321
|
+
const TagItem = ({ children }: { children?: React.ReactNode }) => (
|
|
322
|
+
<Tag label={String(children ?? '')} variant="outlined" style={styles.tag} />
|
|
323
|
+
);
|
|
324
|
+
|
|
325
|
+
const TrailingIcon = ({
|
|
326
|
+
name = 'arrow-right-line',
|
|
327
|
+
color = tokens.colors.text.disabled,
|
|
328
|
+
}: {
|
|
329
|
+
name?: string;
|
|
330
|
+
color?: string;
|
|
331
|
+
}) => {
|
|
332
|
+
const { showTrailingIcon } = useEventListItem();
|
|
333
|
+
|
|
334
|
+
return showTrailingIcon ? (
|
|
335
|
+
<Icon name={name} size={20} color={color} />
|
|
336
|
+
) : (
|
|
337
|
+
<View style={styles.trailingPlaceholder} />
|
|
338
|
+
);
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
const SimpleContainer = ({
|
|
342
|
+
children,
|
|
343
|
+
style,
|
|
344
|
+
}: {
|
|
345
|
+
children?: React.ReactNode;
|
|
346
|
+
style?: StyleProp<ViewStyle>;
|
|
347
|
+
}) => {
|
|
348
|
+
const { state, simpleContainerStyles, onPress, testID } = useEventListItem();
|
|
349
|
+
return (
|
|
350
|
+
<Pressable
|
|
351
|
+
accessibilityRole={onPress ? 'button' : undefined}
|
|
352
|
+
onPress={onPress}
|
|
353
|
+
testID={testID}
|
|
354
|
+
style={({ pressed }) => [
|
|
355
|
+
styles.simpleContainer,
|
|
356
|
+
pickStyle(state, simpleContainerStyles),
|
|
357
|
+
pressed && simpleContainerStyles?.press,
|
|
358
|
+
style,
|
|
359
|
+
]}
|
|
360
|
+
>
|
|
361
|
+
{children}
|
|
362
|
+
</Pressable>
|
|
363
|
+
);
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
const Date = (props: any) => <Text style={styles.simpleDate} {...props} />;
|
|
367
|
+
const Label = (props: any) => <Text style={styles.simpleLabel} {...props} />;
|
|
368
|
+
|
|
369
|
+
const styles = StyleSheet.create({
|
|
370
|
+
row: {
|
|
371
|
+
width: '100%',
|
|
372
|
+
flexDirection: 'row',
|
|
373
|
+
alignItems: 'stretch',
|
|
374
|
+
},
|
|
375
|
+
leftColumn: {
|
|
376
|
+
width: 52,
|
|
377
|
+
paddingRight: 8,
|
|
378
|
+
alignItems: 'flex-start',
|
|
379
|
+
},
|
|
380
|
+
time: {
|
|
381
|
+
fontSize: 16,
|
|
382
|
+
lineHeight: 20,
|
|
383
|
+
color: tokens.colors.text.default,
|
|
384
|
+
fontFamily: fontFamily.bold,
|
|
385
|
+
fontWeight: '700',
|
|
386
|
+
},
|
|
387
|
+
duration: {
|
|
388
|
+
marginTop: 2,
|
|
389
|
+
fontSize: 12,
|
|
390
|
+
lineHeight: 16,
|
|
391
|
+
color: tokens.colors.text.disabled,
|
|
392
|
+
fontFamily: fontFamily.regular,
|
|
393
|
+
fontWeight: '400',
|
|
394
|
+
},
|
|
395
|
+
accentBar: {
|
|
396
|
+
width: 4,
|
|
397
|
+
borderRadius: 999,
|
|
398
|
+
marginRight: 12,
|
|
399
|
+
backgroundColor: tokens.colors.brand.primary,
|
|
400
|
+
},
|
|
401
|
+
card: {
|
|
402
|
+
flex: 1,
|
|
403
|
+
borderRadius: 16,
|
|
404
|
+
paddingVertical: 12,
|
|
405
|
+
paddingHorizontal: 16,
|
|
406
|
+
minHeight: 88,
|
|
407
|
+
},
|
|
408
|
+
topRow: {
|
|
409
|
+
flexDirection: 'row',
|
|
410
|
+
alignItems: 'center',
|
|
411
|
+
justifyContent: 'space-between',
|
|
412
|
+
},
|
|
413
|
+
categoryRow: {
|
|
414
|
+
flexDirection: 'row',
|
|
415
|
+
alignItems: 'center',
|
|
416
|
+
gap: 8,
|
|
417
|
+
flex: 1,
|
|
418
|
+
paddingRight: 8,
|
|
419
|
+
},
|
|
420
|
+
categoryIcon: {
|
|
421
|
+
marginTop: 1,
|
|
422
|
+
},
|
|
423
|
+
categoryLabel: {
|
|
424
|
+
fontSize: 14,
|
|
425
|
+
lineHeight: 20,
|
|
426
|
+
fontFamily: fontFamily.bold,
|
|
427
|
+
fontWeight: '700',
|
|
428
|
+
},
|
|
429
|
+
title: {
|
|
430
|
+
marginTop: 8,
|
|
431
|
+
fontSize: 14,
|
|
432
|
+
lineHeight: 20,
|
|
433
|
+
color: tokens.colors.text.default,
|
|
434
|
+
fontFamily: fontFamily.regular,
|
|
435
|
+
fontWeight: '400',
|
|
436
|
+
},
|
|
437
|
+
description: {
|
|
438
|
+
marginTop: 2,
|
|
439
|
+
fontSize: 12,
|
|
440
|
+
lineHeight: 18,
|
|
441
|
+
color: '#687499',
|
|
442
|
+
fontFamily: fontFamily.regular,
|
|
443
|
+
fontWeight: '400',
|
|
444
|
+
},
|
|
445
|
+
tagsRow: {
|
|
446
|
+
flexDirection: 'row',
|
|
447
|
+
marginTop: 10,
|
|
448
|
+
},
|
|
449
|
+
tag: {
|
|
450
|
+
minWidth: 52,
|
|
451
|
+
height: 32,
|
|
452
|
+
borderWidth: 1,
|
|
453
|
+
borderColor: '#D7DDFA',
|
|
454
|
+
borderRadius: 16,
|
|
455
|
+
alignItems: 'center',
|
|
456
|
+
justifyContent: 'center',
|
|
457
|
+
marginRight: 8,
|
|
458
|
+
backgroundColor: '#FFFFFF',
|
|
459
|
+
paddingHorizontal: 14,
|
|
460
|
+
},
|
|
461
|
+
tagText: {
|
|
462
|
+
color: '#37416F',
|
|
463
|
+
fontSize: 13,
|
|
464
|
+
lineHeight: 17,
|
|
465
|
+
},
|
|
466
|
+
trailingPlaceholder: {
|
|
467
|
+
width: 20,
|
|
468
|
+
height: 20,
|
|
469
|
+
},
|
|
470
|
+
|
|
471
|
+
// Simple
|
|
472
|
+
simpleRoot: {
|
|
473
|
+
width: '100%',
|
|
474
|
+
},
|
|
475
|
+
simpleContainer: {
|
|
476
|
+
width: '100%',
|
|
477
|
+
backgroundColor: tokens.colors.background.default,
|
|
478
|
+
borderRadius: 16,
|
|
479
|
+
paddingVertical: 14,
|
|
480
|
+
paddingHorizontal: 16,
|
|
481
|
+
flexDirection: 'row',
|
|
482
|
+
alignItems: 'center',
|
|
483
|
+
gap: 12,
|
|
484
|
+
borderWidth: 1,
|
|
485
|
+
borderColor: '#E2E9FC',
|
|
486
|
+
},
|
|
487
|
+
simpleDate: {
|
|
488
|
+
width: 28,
|
|
489
|
+
textAlign: 'center',
|
|
490
|
+
fontSize: 12,
|
|
491
|
+
lineHeight: 16,
|
|
492
|
+
color: tokens.colors.text.disabled,
|
|
493
|
+
fontFamily: fontFamily.bold,
|
|
494
|
+
fontWeight: '700',
|
|
495
|
+
},
|
|
496
|
+
simpleLabel: {
|
|
497
|
+
flex: 1,
|
|
498
|
+
fontSize: 14,
|
|
499
|
+
lineHeight: 20,
|
|
500
|
+
color: tokens.colors.text.default,
|
|
501
|
+
fontFamily: fontFamily.regular,
|
|
502
|
+
fontWeight: '400',
|
|
503
|
+
},
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
// Anexa sub-componentes (Composition Pattern)
|
|
507
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
508
|
+
(EventListItem as any).TimeColumn = TimeColumn;
|
|
509
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
510
|
+
(EventListItem as any).AccentBar = AccentBar;
|
|
511
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
512
|
+
(EventListItem as any).Card = Card;
|
|
513
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
514
|
+
(EventListItem as any).Category = Category;
|
|
515
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
516
|
+
(EventListItem as any).Title = Title;
|
|
517
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
518
|
+
(EventListItem as any).Description = Description;
|
|
519
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
520
|
+
(EventListItem as any).Tags = Tags;
|
|
521
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
522
|
+
(EventListItem as any).Tag = TagItem;
|
|
523
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
524
|
+
(EventListItem as any).TrailingIcon = TrailingIcon;
|
|
525
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
526
|
+
(EventListItem as any).SimpleContainer = SimpleContainer;
|
|
527
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
528
|
+
(EventListItem as any).Date = Date;
|
|
529
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
530
|
+
(EventListItem as any).Label = Label;
|
|
531
|
+
|
|
532
|
+
export default EventListItem;
|