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,454 +1,815 @@
|
|
|
1
|
-
import React, { useState, useEffect, forwardRef, useImperativeHandle } from 'react';
|
|
2
|
-
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
-
import { fontFamily } from '../utils/fontFamily';
|
|
4
|
-
|
|
5
|
-
// import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
const
|
|
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
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
const
|
|
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
|
-
const
|
|
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
|
-
|
|
372
|
-
|
|
373
|
-
|
|
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
|
-
|
|
410
|
-
|
|
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
|
-
|
|
1
|
+
import React, { useMemo, useState, useEffect, forwardRef, useImperativeHandle } from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
+
import { fontFamily } from '../utils/fontFamily';
|
|
4
|
+
import Icon from '../Icon';
|
|
5
|
+
// import TimeSelector from './TimeSelector';
|
|
6
|
+
// import MonthSelector from './MonthSelector';
|
|
7
|
+
|
|
8
|
+
const TODAY_RANGE = {
|
|
9
|
+
startDate: new Date(),
|
|
10
|
+
endDate: new Date(),
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const parseDateValue = (dateValue) => {
|
|
14
|
+
if (!dateValue) return null;
|
|
15
|
+
|
|
16
|
+
if (dateValue instanceof Date) {
|
|
17
|
+
return isNaN(dateValue.getTime()) ? null : dateValue;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (typeof dateValue === 'number') {
|
|
21
|
+
const parsed = new Date(dateValue);
|
|
22
|
+
return isNaN(parsed.getTime()) ? null : parsed;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (typeof dateValue === 'string') {
|
|
26
|
+
const trimmed = dateValue.trim();
|
|
27
|
+
if (!trimmed) return null;
|
|
28
|
+
|
|
29
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(trimmed)) {
|
|
30
|
+
const parsed = new Date(`${trimmed}T00:00:00.000Z`);
|
|
31
|
+
return isNaN(parsed.getTime()) ? null : parsed;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const parsed = new Date(trimmed);
|
|
35
|
+
return isNaN(parsed.getTime()) ? null : parsed;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return null;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const toUTCDay = (dateValue) => {
|
|
42
|
+
const date = parseDateValue(dateValue);
|
|
43
|
+
if (!date) return null;
|
|
44
|
+
return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const toUTCDateKey = (dateValue) => {
|
|
48
|
+
const date = toUTCDay(dateValue);
|
|
49
|
+
if (!date) return null;
|
|
50
|
+
const y = String(date.getUTCFullYear());
|
|
51
|
+
const m = String(date.getUTCMonth() + 1).padStart(2, '0');
|
|
52
|
+
const d = String(date.getUTCDate()).padStart(2, '0');
|
|
53
|
+
return `${y}-${m}-${d}`;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const startOfUTCWeek = (date) => {
|
|
57
|
+
const base = toUTCDay(date || new Date());
|
|
58
|
+
if (!base) return null;
|
|
59
|
+
const start = new Date(base);
|
|
60
|
+
start.setUTCDate(base.getUTCDate() - base.getUTCDay());
|
|
61
|
+
return start;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const toUTCMonth = (date) => {
|
|
65
|
+
const d = toUTCDay(date || new Date());
|
|
66
|
+
if (!d) return null;
|
|
67
|
+
return new Date(Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), 1));
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const DatePicker = forwardRef(({
|
|
71
|
+
value = TODAY_RANGE,
|
|
72
|
+
onDateChange,
|
|
73
|
+
title = 'Selecionar datas',
|
|
74
|
+
initialView = 'month',
|
|
75
|
+
commitments,
|
|
76
|
+
commitmentDotColor = '#FF4D4D',
|
|
77
|
+
commitmentDotSize = 6,
|
|
78
|
+
onViewChange,
|
|
79
|
+
}, ref) => {
|
|
80
|
+
const normalizeRange = (rangeValue) => {
|
|
81
|
+
if (!rangeValue || typeof rangeValue !== 'object') return { startDate: null, endDate: null };
|
|
82
|
+
return {
|
|
83
|
+
startDate: toUTCDay(rangeValue.startDate),
|
|
84
|
+
endDate: toUTCDay(rangeValue.endDate),
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// Estado para o intervalo de datas (início e fim)
|
|
89
|
+
const [dateRange, setDateRange] = useState(() => normalizeRange(value));
|
|
90
|
+
|
|
91
|
+
useImperativeHandle(ref, () => ({
|
|
92
|
+
dateRange,
|
|
93
|
+
}));
|
|
94
|
+
|
|
95
|
+
// Estado para o mês e ano sendo exibido no calendário
|
|
96
|
+
const [currentMonth, setCurrentMonth] = useState(() => {
|
|
97
|
+
const seed = value?.endDate || value?.startDate || new Date();
|
|
98
|
+
return toUTCMonth(seed) || new Date();
|
|
99
|
+
});
|
|
100
|
+
// Estado para controlar a visualização (dia, mês ou ano)
|
|
101
|
+
const [viewMode, setViewMode] = useState(initialView === 'week' ? 'week' : 'day');
|
|
102
|
+
// Tamanho da célula para garantir 7 colunas fixas (evita quebra por arredondamento)
|
|
103
|
+
const [cellSize, setCellSize] = useState(0);
|
|
104
|
+
const [weekAnchor, setWeekAnchor] = useState(() => {
|
|
105
|
+
const anchor = value?.endDate || value?.startDate || new Date();
|
|
106
|
+
return toUTCDay(anchor) || toUTCDay(new Date()) || new Date();
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// Nomes dos meses e dias da semana para a UI
|
|
110
|
+
const months = [
|
|
111
|
+
'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho',
|
|
112
|
+
'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'
|
|
113
|
+
];
|
|
114
|
+
const weekDays = ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'];
|
|
115
|
+
|
|
116
|
+
// Função para validar e converter datas
|
|
117
|
+
const validateAndParseDate = (dateValue) => {
|
|
118
|
+
if (!dateValue) return null;
|
|
119
|
+
const parsed = toUTCDay(dateValue);
|
|
120
|
+
if (parsed) return parsed;
|
|
121
|
+
console.warn('Invalid date value:', dateValue);
|
|
122
|
+
return null;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// Efeito que atualiza o estado interno se a prop `value` mudar
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
if (value && typeof value === 'object') {
|
|
128
|
+
const nextRange = normalizeRange(value);
|
|
129
|
+
setDateRange(nextRange);
|
|
130
|
+
|
|
131
|
+
const anchor = nextRange.endDate || nextRange.startDate;
|
|
132
|
+
if (anchor) setWeekAnchor(anchor);
|
|
133
|
+
if (anchor) setCurrentMonth(toUTCMonth(anchor));
|
|
134
|
+
}
|
|
135
|
+
}, [value]);
|
|
136
|
+
|
|
137
|
+
useEffect(() => {
|
|
138
|
+
const next = initialView === 'week' ? 'week' : 'day';
|
|
139
|
+
setViewMode(next);
|
|
140
|
+
}, [initialView]);
|
|
141
|
+
|
|
142
|
+
useEffect(() => {
|
|
143
|
+
const mapped =
|
|
144
|
+
viewMode === 'day'
|
|
145
|
+
? 'month'
|
|
146
|
+
: viewMode === 'month'
|
|
147
|
+
? 'monthPicker'
|
|
148
|
+
: viewMode === 'year'
|
|
149
|
+
? 'yearPicker'
|
|
150
|
+
: viewMode;
|
|
151
|
+
onViewChange?.(mapped);
|
|
152
|
+
}, [onViewChange, viewMode]);
|
|
153
|
+
|
|
154
|
+
// Função para verificar se dois objetos de data são o mesmo dia
|
|
155
|
+
const isSameDay = (dateA, dateB) => {
|
|
156
|
+
if (!dateA || !dateB) return false;
|
|
157
|
+
return (
|
|
158
|
+
dateA.getUTCFullYear() === dateB.getUTCFullYear() &&
|
|
159
|
+
dateA.getUTCMonth() === dateB.getUTCMonth() &&
|
|
160
|
+
dateA.getUTCDate() === dateB.getUTCDate()
|
|
161
|
+
);
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
// Funções auxiliares para estilização do intervalo
|
|
165
|
+
const isStartDate = (date) => isSameDay(date, dateRange.startDate);
|
|
166
|
+
const isEndDate = (date) => isSameDay(date, dateRange.endDate);
|
|
167
|
+
const isInRange = (date) => {
|
|
168
|
+
if (!dateRange.startDate || !dateRange.endDate || !date) return false;
|
|
169
|
+
// Garante que a comparação seja feita corretamente, ignorando o horário
|
|
170
|
+
const timestamp = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
|
|
171
|
+
const startTimestamp = Date.UTC(dateRange.startDate.getUTCFullYear(), dateRange.startDate.getUTCMonth(), dateRange.startDate.getUTCDate());
|
|
172
|
+
const endTimestamp = Date.UTC(dateRange.endDate.getUTCFullYear(), dateRange.endDate.getUTCMonth(), dateRange.endDate.getUTCDate());
|
|
173
|
+
return timestamp > startTimestamp && timestamp < endTimestamp;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
// Gera os dias do mês para exibição no grid
|
|
177
|
+
const getDaysInMonth = () => {
|
|
178
|
+
const year = currentMonth.getUTCFullYear();
|
|
179
|
+
const month = currentMonth.getUTCMonth();
|
|
180
|
+
const firstDay = new Date(Date.UTC(year, month, 1));
|
|
181
|
+
const lastDay = new Date(Date.UTC(year, month + 1, 0));
|
|
182
|
+
const daysInMonth = lastDay.getUTCDate();
|
|
183
|
+
const startingDayOfWeek = firstDay.getUTCDay();
|
|
184
|
+
|
|
185
|
+
const days = [];
|
|
186
|
+
for (let i = 0; i < startingDayOfWeek; i++) {
|
|
187
|
+
days.push(null); // Adiciona células vazias para o início do mês
|
|
188
|
+
}
|
|
189
|
+
for (let day = 1; day <= daysInMonth; day++) {
|
|
190
|
+
days.push(new Date(Date.UTC(year, month, day)));
|
|
191
|
+
}
|
|
192
|
+
// Preenche o final para o total de células ser múltiplo de 7 (linhas completas)
|
|
193
|
+
const remainder = days.length % 7;
|
|
194
|
+
if (remainder !== 0) {
|
|
195
|
+
const toAdd = 7 - remainder;
|
|
196
|
+
for (let i = 0; i < toAdd; i++) days.push(null);
|
|
197
|
+
}
|
|
198
|
+
return days;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
// Gera uma lista de anos para o seletor de ano
|
|
202
|
+
const getYearRange = () => {
|
|
203
|
+
const currentYear = new Date().getFullYear();
|
|
204
|
+
const years = [];
|
|
205
|
+
for (let year = currentYear - 50; year <= currentYear + 50; year++) {
|
|
206
|
+
years.push(year);
|
|
207
|
+
}
|
|
208
|
+
return years;
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
// Lógica para seleção do intervalo de datas
|
|
212
|
+
const handleDateSelect = (date) => {
|
|
213
|
+
if (!date) return;
|
|
214
|
+
|
|
215
|
+
const { startDate, endDate } = dateRange;
|
|
216
|
+
const selected = toUTCDay(date);
|
|
217
|
+
|
|
218
|
+
let newRange;
|
|
219
|
+
if (!startDate || (startDate && endDate)) {
|
|
220
|
+
// Inicia um novo intervalo
|
|
221
|
+
newRange = { startDate: selected, endDate: null };
|
|
222
|
+
} else if (startDate && !endDate) {
|
|
223
|
+
// Finaliza o intervalo
|
|
224
|
+
if (selected < startDate) {
|
|
225
|
+
// Se a data final for anterior à inicial, a data selecionada vira o novo início
|
|
226
|
+
newRange = { startDate: selected, endDate: null };
|
|
227
|
+
} else {
|
|
228
|
+
newRange = { ...dateRange, endDate: selected };
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
setDateRange(newRange);
|
|
233
|
+
setWeekAnchor(newRange.endDate || newRange.startDate || selected);
|
|
234
|
+
setCurrentMonth(toUTCMonth(newRange.endDate || newRange.startDate || selected));
|
|
235
|
+
onDateChange?.(newRange); // Chama o callback com o novo intervalo
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
// Funções para navegar entre meses e anos
|
|
239
|
+
const navigateMonth = (direction) => {
|
|
240
|
+
const y = currentMonth.getUTCFullYear();
|
|
241
|
+
const m = currentMonth.getUTCMonth();
|
|
242
|
+
setCurrentMonth(new Date(Date.UTC(y, m + direction, 1)));
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
const navigateYear = (direction) => {
|
|
246
|
+
const y = currentMonth.getUTCFullYear();
|
|
247
|
+
const m = currentMonth.getUTCMonth();
|
|
248
|
+
setCurrentMonth(new Date(Date.UTC(y + direction, m, 1)));
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
const navigateWeek = (direction) => {
|
|
252
|
+
setWeekAnchor((prev) => {
|
|
253
|
+
const base = toUTCDay(prev) || toUTCDay(new Date());
|
|
254
|
+
if (!base) return prev;
|
|
255
|
+
const next = new Date(base);
|
|
256
|
+
next.setUTCDate(base.getUTCDate() + direction * 7);
|
|
257
|
+
return next;
|
|
258
|
+
});
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
const commitmentSet = useMemo(() => {
|
|
262
|
+
if (!Array.isArray(commitments)) return null;
|
|
263
|
+
const set = new Set();
|
|
264
|
+
commitments.forEach((item) => {
|
|
265
|
+
const parsed = validateAndParseDate(item);
|
|
266
|
+
const key = toUTCDateKey(parsed);
|
|
267
|
+
if (key) set.add(key);
|
|
268
|
+
});
|
|
269
|
+
return set;
|
|
270
|
+
}, [commitments]);
|
|
271
|
+
|
|
272
|
+
const getCommitmentMeta = (date) => {
|
|
273
|
+
if (!commitments || !date) return null;
|
|
274
|
+
const key = toUTCDateKey(date);
|
|
275
|
+
if (!key) return null;
|
|
276
|
+
|
|
277
|
+
if (typeof commitments === 'function') {
|
|
278
|
+
const res = commitments(date, key);
|
|
279
|
+
if (res === true) return {};
|
|
280
|
+
if (res === false || res == null) return null;
|
|
281
|
+
if (typeof res === 'object') {
|
|
282
|
+
if (res.hasCommitment === false) return null;
|
|
283
|
+
return res;
|
|
284
|
+
}
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (commitmentSet) {
|
|
289
|
+
return commitmentSet.has(key) ? {} : null;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
if (typeof commitments === 'object') {
|
|
293
|
+
const val = commitments[key];
|
|
294
|
+
if (val === true) return {};
|
|
295
|
+
if (val === false || val == null) return null;
|
|
296
|
+
if (typeof val === 'object') {
|
|
297
|
+
if (val.hasCommitment === false) return null;
|
|
298
|
+
return val;
|
|
299
|
+
}
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
return null;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
// --- Renderização dos Componentes ---
|
|
307
|
+
|
|
308
|
+
const renderWeekView = () => {
|
|
309
|
+
const weekStart = startOfUTCWeek(weekAnchor);
|
|
310
|
+
if (!weekStart) return null;
|
|
311
|
+
const weekEnd = new Date(weekStart);
|
|
312
|
+
weekEnd.setUTCDate(weekStart.getUTCDate() + 6);
|
|
313
|
+
|
|
314
|
+
const weekDates = Array.from({ length: 7 }, (_, i) => {
|
|
315
|
+
const d = new Date(weekStart);
|
|
316
|
+
d.setUTCDate(weekStart.getUTCDate() + i);
|
|
317
|
+
return d;
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
const toggleToMonth = () => setViewMode('day');
|
|
321
|
+
|
|
322
|
+
return (
|
|
323
|
+
<View style={styles.calendarContainer}>
|
|
324
|
+
<View style={styles.calendarHeader}>
|
|
325
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', margin: 'auto', gap: 8 }}>
|
|
326
|
+
<TouchableOpacity onPress={() => navigateWeek(-1)} style={styles.navIconButton}>
|
|
327
|
+
<Icon name="arrow-left-s-line" size={20} color={stylesVars.headerIconColor} />
|
|
328
|
+
</TouchableOpacity>
|
|
329
|
+
|
|
330
|
+
<Text style={styles.weekRangeText}>
|
|
331
|
+
{weekStart.getUTCDate()}-{weekEnd.getUTCDate()}
|
|
332
|
+
</Text>
|
|
333
|
+
<Text style={styles.monthShortText}>{months[weekStart.getUTCMonth()].substring(0, 3)}</Text>
|
|
334
|
+
<TouchableOpacity onPress={() => navigateWeek(1)} style={styles.navIconButton}>
|
|
335
|
+
<Icon name="arrow-right-s-line" size={20} color={stylesVars.headerIconColor} />
|
|
336
|
+
</TouchableOpacity>
|
|
337
|
+
</View>
|
|
338
|
+
|
|
339
|
+
<TouchableOpacity onPress={toggleToMonth} style={[styles.expandButton, { position: 'absolute', right: 0 }]}>
|
|
340
|
+
<Icon name="expand-diagonal-line" size={18} color={stylesVars.headerIconColor} />
|
|
341
|
+
</TouchableOpacity>
|
|
342
|
+
</View>
|
|
343
|
+
|
|
344
|
+
<View style={styles.weekDaysContainer}>
|
|
345
|
+
{weekDays.map((day) => <Text key={day} style={styles.weekDay}>{day}</Text>)}
|
|
346
|
+
</View>
|
|
347
|
+
|
|
348
|
+
<View
|
|
349
|
+
style={styles.weekRow}
|
|
350
|
+
onLayout={e => {
|
|
351
|
+
const width = e.nativeEvent.layout.width;
|
|
352
|
+
const size = Math.floor(width / 7);
|
|
353
|
+
if (size !== cellSize) setCellSize(size);
|
|
354
|
+
}}
|
|
355
|
+
>
|
|
356
|
+
{weekDates.map((date, index) => {
|
|
357
|
+
const isStart = isStartDate(date);
|
|
358
|
+
const isEnd = isEndDate(date);
|
|
359
|
+
const commitmentMeta = getCommitmentMeta(date);
|
|
360
|
+
|
|
361
|
+
const isStartAndEnd = isStart && isEnd;
|
|
362
|
+
|
|
363
|
+
const cellStyle = [
|
|
364
|
+
styles.dayCell,
|
|
365
|
+
cellSize > 0 && { width: cellSize, height: cellSize },
|
|
366
|
+
isStart && !isStartAndEnd && styles.startDay,
|
|
367
|
+
(isEnd || isStartAndEnd) && styles.endDay,
|
|
368
|
+
];
|
|
369
|
+
|
|
370
|
+
const textStyle = [
|
|
371
|
+
styles.dayText,
|
|
372
|
+
(isEnd || isStartAndEnd) && styles.endDayText,
|
|
373
|
+
];
|
|
374
|
+
|
|
375
|
+
const dotStyle = [
|
|
376
|
+
styles.commitmentDot,
|
|
377
|
+
{
|
|
378
|
+
width: commitmentDotSize,
|
|
379
|
+
height: commitmentDotSize,
|
|
380
|
+
borderRadius: commitmentDotSize / 2,
|
|
381
|
+
backgroundColor: commitmentMeta?.color || commitmentDotColor,
|
|
382
|
+
},
|
|
383
|
+
(isStart || isEnd || isStartAndEnd) && styles.commitmentDotSelected,
|
|
384
|
+
(commitmentMeta?.color || commitmentDotColor) && { borderColor: commitmentMeta?.color || commitmentDotColor },
|
|
385
|
+
];
|
|
386
|
+
|
|
387
|
+
return (
|
|
388
|
+
<TouchableOpacity
|
|
389
|
+
key={index}
|
|
390
|
+
style={cellStyle}
|
|
391
|
+
onPress={() => handleDateSelect(date)}
|
|
392
|
+
>
|
|
393
|
+
<View style={styles.dayContent}>
|
|
394
|
+
<Text style={textStyle}>{date.getUTCDate()}</Text>
|
|
395
|
+
</View>
|
|
396
|
+
{!!commitmentMeta && (
|
|
397
|
+
<View style={styles.commitmentDotWrapper} pointerEvents="none">
|
|
398
|
+
<View style={dotStyle} />
|
|
399
|
+
</View>
|
|
400
|
+
)}
|
|
401
|
+
</TouchableOpacity>
|
|
402
|
+
);
|
|
403
|
+
})}
|
|
404
|
+
</View>
|
|
405
|
+
</View>
|
|
406
|
+
);
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
const renderDayView = () => (
|
|
410
|
+
<View style={styles.calendarContainer}>
|
|
411
|
+
<View style={styles.calendarHeader}>
|
|
412
|
+
<View style={{ flexDirection: 'row', alignItems: 'center', margin: 'auto', gap: 8 }}>
|
|
413
|
+
<TouchableOpacity onPress={() => navigateMonth(-1)} style={styles.navIconButton}>
|
|
414
|
+
<Icon name="arrow-left-s-line" size={20} color={stylesVars.headerIconColor} />
|
|
415
|
+
</TouchableOpacity>
|
|
416
|
+
|
|
417
|
+
<TouchableOpacity onPress={() => setViewMode('month')} hitSlop={8}>
|
|
418
|
+
<Text style={styles.monthShortText}>
|
|
419
|
+
{months[currentMonth.getUTCMonth()].substring(0, 3)}
|
|
420
|
+
</Text>
|
|
421
|
+
</TouchableOpacity>
|
|
422
|
+
|
|
423
|
+
<TouchableOpacity onPress={() => setViewMode('year')} hitSlop={8}>
|
|
424
|
+
<Text style={styles.yearTextHeader}>{currentMonth.getUTCFullYear()}</Text>
|
|
425
|
+
</TouchableOpacity>
|
|
426
|
+
|
|
427
|
+
<TouchableOpacity onPress={() => navigateMonth(1)} style={styles.navIconButton}>
|
|
428
|
+
<Icon name="arrow-right-s-line" size={20} color={stylesVars.headerIconColor} />
|
|
429
|
+
</TouchableOpacity>
|
|
430
|
+
</View>
|
|
431
|
+
|
|
432
|
+
<TouchableOpacity onPress={() => setViewMode('week')} style={[styles.expandButton, { position: 'absolute', right: 0 }]}>
|
|
433
|
+
<Icon name="collapse-diagonal-line" size={18} color={stylesVars.headerIconColor} />
|
|
434
|
+
</TouchableOpacity>
|
|
435
|
+
</View>
|
|
436
|
+
|
|
437
|
+
<View style={styles.weekDaysContainer}>
|
|
438
|
+
{weekDays.map((day) => <Text key={day} style={styles.weekDay}>{day}</Text>)}
|
|
439
|
+
</View>
|
|
440
|
+
|
|
441
|
+
<View
|
|
442
|
+
style={styles.daysGrid}
|
|
443
|
+
onLayout={e => {
|
|
444
|
+
const width = e.nativeEvent.layout.width;
|
|
445
|
+
// Usa floor para garantir que sete células caibam na linha
|
|
446
|
+
const size = Math.floor(width / 7);
|
|
447
|
+
if (size !== cellSize) setCellSize(size);
|
|
448
|
+
}}
|
|
449
|
+
>
|
|
450
|
+
{getDaysInMonth().map((date, index) => {
|
|
451
|
+
const isStart = isStartDate(date);
|
|
452
|
+
const isEnd = isEndDate(date);
|
|
453
|
+
const inRange = isInRange(date);
|
|
454
|
+
const commitmentMeta = getCommitmentMeta(date);
|
|
455
|
+
const isStartAndEnd = isStart && isEnd;
|
|
456
|
+
|
|
457
|
+
const cellStyle = [
|
|
458
|
+
styles.dayCell,
|
|
459
|
+
inRange && styles.inRangeDay,
|
|
460
|
+
isStart && !isStartAndEnd && styles.startDay,
|
|
461
|
+
(isEnd || isStartAndEnd) && styles.endDay,
|
|
462
|
+
// Garante 7 colunas e quadrado perfeito baseado na largura medida do grid
|
|
463
|
+
cellSize > 0 && { width: cellSize, height: cellSize },
|
|
464
|
+
];
|
|
465
|
+
|
|
466
|
+
const textStyle = [
|
|
467
|
+
styles.dayText,
|
|
468
|
+
(isEnd || isStartAndEnd) && styles.endDayText,
|
|
469
|
+
!date && styles.emptyDay,
|
|
470
|
+
];
|
|
471
|
+
|
|
472
|
+
const dotStyle = [
|
|
473
|
+
styles.commitmentDot,
|
|
474
|
+
{
|
|
475
|
+
width: commitmentDotSize,
|
|
476
|
+
height: commitmentDotSize,
|
|
477
|
+
borderRadius: commitmentDotSize / 2,
|
|
478
|
+
backgroundColor: commitmentMeta?.color || commitmentDotColor,
|
|
479
|
+
},
|
|
480
|
+
(isStart || isEnd || isStartAndEnd) && styles.commitmentDotSelected,
|
|
481
|
+
(commitmentMeta?.color || commitmentDotColor) && { borderColor: commitmentMeta?.color || commitmentDotColor },
|
|
482
|
+
];
|
|
483
|
+
|
|
484
|
+
return (
|
|
485
|
+
<TouchableOpacity
|
|
486
|
+
key={index}
|
|
487
|
+
style={cellStyle}
|
|
488
|
+
onPress={() => handleDateSelect(date)}
|
|
489
|
+
disabled={!date}
|
|
490
|
+
>
|
|
491
|
+
<View style={styles.dayContent}>
|
|
492
|
+
<Text style={textStyle}>
|
|
493
|
+
{date ? date.getUTCDate() : ''}
|
|
494
|
+
</Text>
|
|
495
|
+
</View>
|
|
496
|
+
{!!commitmentMeta && !!date && (
|
|
497
|
+
<View style={styles.commitmentDotWrapper} pointerEvents="none">
|
|
498
|
+
<View style={dotStyle} />
|
|
499
|
+
</View>
|
|
500
|
+
)}
|
|
501
|
+
</TouchableOpacity>
|
|
502
|
+
);
|
|
503
|
+
})}
|
|
504
|
+
</View>
|
|
505
|
+
</View>
|
|
506
|
+
);
|
|
507
|
+
|
|
508
|
+
const renderMonthView = () => (
|
|
509
|
+
<View style={styles.calendarContainer}>
|
|
510
|
+
<View style={styles.calendarHeader}>
|
|
511
|
+
<TouchableOpacity onPress={() => setViewMode('day')} style={[styles.backButton, { position: 'absolute', left: 0 }]}>
|
|
512
|
+
<Icon name="arrow-left-line" size={20} color={stylesVars.headerIconColor} />
|
|
513
|
+
</TouchableOpacity>
|
|
514
|
+
|
|
515
|
+
<View style={{ margin: 'auto', flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
516
|
+
<TouchableOpacity onPress={() => navigateYear(-1)} style={styles.navIconButton}>
|
|
517
|
+
<Icon name="arrow-left-s-line" size={20} color={stylesVars.headerIconColor} />
|
|
518
|
+
</TouchableOpacity>
|
|
519
|
+
|
|
520
|
+
<TouchableOpacity onPress={() => setViewMode('year')} hitSlop={8}>
|
|
521
|
+
<Text style={styles.yearTextHeader}>{currentMonth.getUTCFullYear()}</Text>
|
|
522
|
+
</TouchableOpacity>
|
|
523
|
+
|
|
524
|
+
<TouchableOpacity onPress={() => navigateYear(1)} style={styles.navIconButton}>
|
|
525
|
+
<Icon name="arrow-right-s-line" size={20} color={stylesVars.headerIconColor} />
|
|
526
|
+
</TouchableOpacity>
|
|
527
|
+
</View>
|
|
528
|
+
</View>
|
|
529
|
+
<View style={styles.monthsGrid}>
|
|
530
|
+
{months.map((month, index) => (
|
|
531
|
+
<TouchableOpacity
|
|
532
|
+
key={month}
|
|
533
|
+
style={[styles.monthCell, index === currentMonth.getUTCMonth() && styles.selectedMonth]}
|
|
534
|
+
onPress={() => {
|
|
535
|
+
setCurrentMonth(new Date(Date.UTC(currentMonth.getUTCFullYear(), index, 1)));
|
|
536
|
+
setViewMode('day');
|
|
537
|
+
}}
|
|
538
|
+
>
|
|
539
|
+
<Text style={[styles.monthText, index === currentMonth.getUTCMonth() && styles.selectedMonthText]}>
|
|
540
|
+
{month.substring(0, 3)}
|
|
541
|
+
</Text>
|
|
542
|
+
</TouchableOpacity>
|
|
543
|
+
))}
|
|
544
|
+
</View>
|
|
545
|
+
</View>
|
|
546
|
+
);
|
|
547
|
+
|
|
548
|
+
const renderYearView = () => (
|
|
549
|
+
<View style={styles.calendarContainer}>
|
|
550
|
+
<View style={styles.calendarHeader}>
|
|
551
|
+
<TouchableOpacity onPress={() => setViewMode('day')} style={styles.backButton}>
|
|
552
|
+
<Icon name="arrow-left-line" size={20} color={stylesVars.headerIconColor} />
|
|
553
|
+
</TouchableOpacity>
|
|
554
|
+
<View style={styles.headerCenter}>
|
|
555
|
+
<Text style={styles.yearPickerTitle}>Ano</Text>
|
|
556
|
+
</View>
|
|
557
|
+
<View style={styles.headerRight} />
|
|
558
|
+
</View>
|
|
559
|
+
<View style={styles.yearsGrid}>
|
|
560
|
+
{getYearRange().map((year) => (
|
|
561
|
+
<TouchableOpacity
|
|
562
|
+
key={year}
|
|
563
|
+
style={[styles.yearCell, year === currentMonth.getUTCFullYear() && styles.selectedYear]}
|
|
564
|
+
onPress={() => {
|
|
565
|
+
setCurrentMonth(new Date(Date.UTC(year, currentMonth.getUTCMonth(), 1)));
|
|
566
|
+
setViewMode('month');
|
|
567
|
+
}}
|
|
568
|
+
>
|
|
569
|
+
<Text style={[styles.yearText, year === currentMonth.getUTCFullYear() && styles.selectedYearText]}>
|
|
570
|
+
{year}
|
|
571
|
+
</Text>
|
|
572
|
+
</TouchableOpacity>
|
|
573
|
+
))}
|
|
574
|
+
</View>
|
|
575
|
+
</View>
|
|
576
|
+
);
|
|
577
|
+
|
|
578
|
+
return (
|
|
579
|
+
<View style={styles.container}>
|
|
580
|
+
{viewMode === 'week' && renderWeekView()}
|
|
581
|
+
{viewMode === 'day' && renderDayView()}
|
|
582
|
+
{viewMode === 'month' && renderMonthView()}
|
|
583
|
+
{viewMode === 'year' && renderYearView()}
|
|
584
|
+
</View>
|
|
585
|
+
);
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
const stylesVars = {
|
|
589
|
+
primary: '#2A4FDA',
|
|
590
|
+
text: '#1B244B',
|
|
591
|
+
muted: '#7C8DB5',
|
|
592
|
+
headerIconColor: '#1B244B',
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
// --- Estilos ---
|
|
596
|
+
const styles = StyleSheet.create({
|
|
597
|
+
container: {
|
|
598
|
+
backgroundColor: '#FFFFFF',
|
|
599
|
+
borderRadius: 16,
|
|
600
|
+
paddingVertical: 10,
|
|
601
|
+
width: '100%',
|
|
602
|
+
},
|
|
603
|
+
calendarContainer: {
|
|
604
|
+
paddingHorizontal: 15,
|
|
605
|
+
},
|
|
606
|
+
// Cabeçalho e Navegação
|
|
607
|
+
calendarHeader: {
|
|
608
|
+
flexDirection: 'row',
|
|
609
|
+
// justifyContent: 'space-between',
|
|
610
|
+
alignItems: 'center',
|
|
611
|
+
marginBottom: 20,
|
|
612
|
+
},
|
|
613
|
+
navIconButton: {
|
|
614
|
+
width: 40,
|
|
615
|
+
height: 40,
|
|
616
|
+
borderRadius: 20,
|
|
617
|
+
alignItems: 'center',
|
|
618
|
+
justifyContent: 'center',
|
|
619
|
+
},
|
|
620
|
+
expandButton: {
|
|
621
|
+
width: 40,
|
|
622
|
+
height: 40,
|
|
623
|
+
borderRadius: 20,
|
|
624
|
+
alignItems: 'center',
|
|
625
|
+
justifyContent: 'center',
|
|
626
|
+
backgroundColor: '#EEF2FF',
|
|
627
|
+
marginLeft: 8,
|
|
628
|
+
},
|
|
629
|
+
headerCenter: {
|
|
630
|
+
flex: 1,
|
|
631
|
+
alignItems: 'center',
|
|
632
|
+
justifyContent: 'center',
|
|
633
|
+
},
|
|
634
|
+
headerRight: {
|
|
635
|
+
flexDirection: 'row',
|
|
636
|
+
alignItems: 'center',
|
|
637
|
+
justifyContent: 'flex-end',
|
|
638
|
+
minWidth: 96,
|
|
639
|
+
},
|
|
640
|
+
headerCenterRow: {
|
|
641
|
+
flexDirection: 'row',
|
|
642
|
+
alignItems: 'center',
|
|
643
|
+
justifyContent: 'center',
|
|
644
|
+
gap: 18,
|
|
645
|
+
flex: 1,
|
|
646
|
+
},
|
|
647
|
+
monthShortText: {
|
|
648
|
+
fontSize: 20,
|
|
649
|
+
fontWeight: '700',
|
|
650
|
+
color: stylesVars.text,
|
|
651
|
+
fontFamily: fontFamily.bold,
|
|
652
|
+
},
|
|
653
|
+
yearTextHeader: {
|
|
654
|
+
fontSize: 20,
|
|
655
|
+
fontWeight: '700',
|
|
656
|
+
color: stylesVars.text,
|
|
657
|
+
fontFamily: fontFamily.bold,
|
|
658
|
+
},
|
|
659
|
+
weekRangeText: {
|
|
660
|
+
fontSize: 20,
|
|
661
|
+
fontWeight: '700',
|
|
662
|
+
color: stylesVars.text,
|
|
663
|
+
fontFamily: fontFamily.bold,
|
|
664
|
+
},
|
|
665
|
+
yearPickerTitle: {
|
|
666
|
+
fontSize: 20,
|
|
667
|
+
fontWeight: '700',
|
|
668
|
+
color: stylesVars.text,
|
|
669
|
+
fontFamily: fontFamily.bold,
|
|
670
|
+
},
|
|
671
|
+
backButton: {
|
|
672
|
+
width: 44,
|
|
673
|
+
height: 44,
|
|
674
|
+
borderRadius: 22,
|
|
675
|
+
backgroundColor: '#EEF2FF',
|
|
676
|
+
alignItems: 'center',
|
|
677
|
+
justifyContent: 'center',
|
|
678
|
+
},
|
|
679
|
+
// Dias da Semana
|
|
680
|
+
weekDaysContainer: {
|
|
681
|
+
flexDirection: 'row',
|
|
682
|
+
marginBottom: 10,
|
|
683
|
+
},
|
|
684
|
+
weekDay: {
|
|
685
|
+
flex: 1,
|
|
686
|
+
textAlign: 'center',
|
|
687
|
+
fontSize: 13,
|
|
688
|
+
color: stylesVars.muted,
|
|
689
|
+
fontWeight: '500',
|
|
690
|
+
fontFamily: fontFamily.regular,
|
|
691
|
+
},
|
|
692
|
+
// Grid de Dias
|
|
693
|
+
daysGrid: {
|
|
694
|
+
flexDirection: 'row',
|
|
695
|
+
flexWrap: 'wrap',
|
|
696
|
+
rowGap: 24,
|
|
697
|
+
},
|
|
698
|
+
weekRow: {
|
|
699
|
+
flexDirection: 'row',
|
|
700
|
+
},
|
|
701
|
+
dayCell: {
|
|
702
|
+
width: `${100 / 7}%`,
|
|
703
|
+
aspectRatio: 1,
|
|
704
|
+
justifyContent: 'center',
|
|
705
|
+
alignItems: 'center',
|
|
706
|
+
backgroundColor: 'transparent',
|
|
707
|
+
},
|
|
708
|
+
dayContent: {
|
|
709
|
+
flex: 1,
|
|
710
|
+
width: '100%',
|
|
711
|
+
alignItems: 'center',
|
|
712
|
+
justifyContent: 'center',
|
|
713
|
+
},
|
|
714
|
+
dayText: {
|
|
715
|
+
fontSize: 16,
|
|
716
|
+
color: stylesVars.text,
|
|
717
|
+
fontFamily: fontFamily.regular,
|
|
718
|
+
},
|
|
719
|
+
emptyDay: {
|
|
720
|
+
color: 'transparent',
|
|
721
|
+
},
|
|
722
|
+
// Estilos do Intervalo de Datas
|
|
723
|
+
inRangeDay: {
|
|
724
|
+
backgroundColor: 'transparent',
|
|
725
|
+
borderRadius: 8,
|
|
726
|
+
alignItems: 'center',
|
|
727
|
+
justifyContent: 'center',
|
|
728
|
+
},
|
|
729
|
+
startDay: {
|
|
730
|
+
backgroundColor: 'transparent',
|
|
731
|
+
borderColor: stylesVars.primary,
|
|
732
|
+
borderWidth: 2,
|
|
733
|
+
borderRadius: 10,
|
|
734
|
+
},
|
|
735
|
+
endDay: {
|
|
736
|
+
backgroundColor: stylesVars.primary,
|
|
737
|
+
borderRadius: 10,
|
|
738
|
+
},
|
|
739
|
+
endDayText: { color: '#FFFFFF', fontWeight: '700', fontFamily: fontFamily.bold },
|
|
740
|
+
commitmentDot: {
|
|
741
|
+
},
|
|
742
|
+
commitmentDotWrapper: {
|
|
743
|
+
position: 'absolute',
|
|
744
|
+
left: 0,
|
|
745
|
+
right: 0,
|
|
746
|
+
bottom: 6,
|
|
747
|
+
alignItems: 'center',
|
|
748
|
+
justifyContent: 'center',
|
|
749
|
+
},
|
|
750
|
+
commitmentDotSelected: {
|
|
751
|
+
// backgroundColor: 'transparent',
|
|
752
|
+
borderWidth: 1.5,
|
|
753
|
+
},
|
|
754
|
+
// Views de Mês e Ano
|
|
755
|
+
monthsGrid: {
|
|
756
|
+
flexDirection: 'row',
|
|
757
|
+
flexWrap: 'wrap',
|
|
758
|
+
justifyContent: 'center',
|
|
759
|
+
},
|
|
760
|
+
monthCell: {
|
|
761
|
+
width: '30%',
|
|
762
|
+
margin: 5,
|
|
763
|
+
paddingVertical: 15,
|
|
764
|
+
justifyContent: 'center',
|
|
765
|
+
alignItems: 'center',
|
|
766
|
+
borderRadius: 8,
|
|
767
|
+
borderWidth: 2,
|
|
768
|
+
borderColor: 'transparent',
|
|
769
|
+
},
|
|
770
|
+
selectedMonth: {
|
|
771
|
+
borderColor: stylesVars.primary,
|
|
772
|
+
},
|
|
773
|
+
monthText: {
|
|
774
|
+
fontSize: 16,
|
|
775
|
+
color: stylesVars.text,
|
|
776
|
+
fontFamily: fontFamily.regular,
|
|
777
|
+
},
|
|
778
|
+
selectedMonthText: {
|
|
779
|
+
color: stylesVars.primary,
|
|
780
|
+
fontWeight: '700',
|
|
781
|
+
fontFamily: fontFamily.bold,
|
|
782
|
+
},
|
|
783
|
+
yearsGrid: {
|
|
784
|
+
flexDirection: 'row',
|
|
785
|
+
flexWrap: 'wrap',
|
|
786
|
+
justifyContent: 'center',
|
|
787
|
+
},
|
|
788
|
+
yearCell: {
|
|
789
|
+
width: '22%',
|
|
790
|
+
margin: 5,
|
|
791
|
+
paddingVertical: 10,
|
|
792
|
+
justifyContent: 'center',
|
|
793
|
+
alignItems: 'center',
|
|
794
|
+
borderRadius: 8,
|
|
795
|
+
borderWidth: 2,
|
|
796
|
+
borderColor: 'transparent',
|
|
797
|
+
},
|
|
798
|
+
selectedYear: {
|
|
799
|
+
borderColor: stylesVars.primary,
|
|
800
|
+
},
|
|
801
|
+
yearText: {
|
|
802
|
+
fontSize: 16,
|
|
803
|
+
color: stylesVars.text,
|
|
804
|
+
fontFamily: fontFamily.regular,
|
|
805
|
+
},
|
|
806
|
+
selectedYearText: {
|
|
807
|
+
color: stylesVars.primary,
|
|
808
|
+
fontWeight: '700',
|
|
809
|
+
fontFamily: fontFamily.bold,
|
|
810
|
+
},
|
|
811
|
+
});
|
|
812
|
+
|
|
813
|
+
export { default as MonthSelector } from './MonthSelector';
|
|
814
|
+
export { default as TimeSelector } from './TimeSelector';
|
|
815
|
+
export default DatePicker;
|