jornada-ui 0.4.10 → 0.4.12
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/README.md +31 -31
- package/lib/commonjs/common/icons-svg/bluetooth/index.js +45 -27
- package/lib/commonjs/common/icons-svg/bluetooth/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/constants/index.js +7 -5
- package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/index.js +19 -4
- package/lib/commonjs/common/icons-svg/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/plus-container/index.js +42 -0
- package/lib/commonjs/common/icons-svg/plus-container/index.js.map +1 -0
- package/lib/commonjs/common/icons-svg/trash/index.js +41 -0
- package/lib/commonjs/common/icons-svg/trash/index.js.map +1 -0
- package/lib/commonjs/components/activity-step/components/activite-row/index.js +137 -0
- package/lib/commonjs/components/activity-step/components/activite-row/index.js.map +1 -0
- package/lib/commonjs/components/activity-step/index.js +77 -0
- package/lib/commonjs/components/activity-step/index.js.map +1 -0
- package/lib/commonjs/components/activity-step/interface.js +6 -0
- package/lib/commonjs/components/activity-step/interface.js.map +1 -0
- package/lib/commonjs/components/activity-step/styles.js +86 -0
- package/lib/commonjs/components/activity-step/styles.js.map +1 -0
- package/lib/commonjs/components/card-scheduled-journey/index.js +8 -6
- package/lib/commonjs/components/card-scheduled-journey/index.js.map +1 -1
- package/lib/commonjs/components/inputs/input-date-time/index.js +136 -0
- package/lib/commonjs/components/inputs/input-date-time/index.js.map +1 -0
- package/lib/commonjs/components/inputs/input-date-time/interface.d.js +2 -0
- package/lib/commonjs/components/inputs/input-date-time/interface.d.js.map +1 -0
- package/lib/commonjs/components/inputs/input-date-time/styles.js +66 -0
- package/lib/commonjs/components/inputs/input-date-time/styles.js.map +1 -0
- package/lib/commonjs/components/list-devices/helpers/get-icon-by-status.js +25 -0
- package/lib/commonjs/components/list-devices/helpers/get-icon-by-status.js.map +1 -0
- package/lib/commonjs/components/list-devices/index.js +97 -0
- package/lib/commonjs/components/list-devices/index.js.map +1 -0
- package/lib/commonjs/components/list-devices/interface.d.js +2 -0
- package/lib/commonjs/components/list-devices/interface.d.js.map +1 -0
- package/lib/commonjs/components/list-devices/styles.js +60 -0
- package/lib/commonjs/components/list-devices/styles.js.map +1 -0
- package/lib/commonjs/components/list-supplies/index.js +171 -0
- package/lib/commonjs/components/list-supplies/index.js.map +1 -0
- package/lib/commonjs/components/list-supplies/interface.d.js +2 -0
- package/lib/commonjs/components/list-supplies/interface.d.js.map +1 -0
- package/lib/commonjs/components/maintenance-description-input/index.js +3 -0
- package/lib/commonjs/components/maintenance-description-input/index.js.map +1 -1
- package/lib/commonjs/components/maintenance-description-input/styles.js +1 -1
- package/lib/commonjs/components/maintenance-description-input/styles.js.map +1 -1
- package/lib/commonjs/components/modals/modal-activity-reason/index.js +170 -0
- package/lib/commonjs/components/modals/modal-activity-reason/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-activity-reason/interface.d.js +2 -0
- package/lib/commonjs/components/modals/modal-activity-reason/interface.d.js.map +1 -0
- package/lib/commonjs/components/modals/modal-create-activitie/helpers/index.js +27 -0
- package/lib/commonjs/components/modals/modal-create-activitie/helpers/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-create-activitie/index.js +203 -0
- package/lib/commonjs/components/modals/modal-create-activitie/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-create-activitie/interface.js +2 -0
- package/lib/commonjs/components/modals/modal-create-activitie/interface.js.map +1 -0
- package/lib/commonjs/components/modals/modal-create-activitie/styles.js +42 -0
- package/lib/commonjs/components/modals/modal-create-activitie/styles.js.map +1 -0
- package/lib/commonjs/components/modals/modal-exclude-activitie/index.js +2 -0
- package/lib/commonjs/components/modals/modal-exclude-activitie/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-journey-rectification/index.js +242 -0
- package/lib/commonjs/components/modals/modal-journey-rectification/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-journey-rectification/interface.d.js +2 -0
- package/lib/commonjs/components/modals/modal-journey-rectification/interface.d.js.map +1 -0
- package/lib/commonjs/components/modals/modal-to-confimations/index.js +182 -0
- package/lib/commonjs/components/modals/modal-to-confimations/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-to-confimations/interface.js +2 -0
- package/lib/commonjs/components/modals/modal-to-confimations/interface.js.map +1 -0
- package/lib/commonjs/components/selects/select-date-and-hours/index.js +80 -0
- package/lib/commonjs/components/selects/select-date-and-hours/index.js.map +1 -0
- package/lib/commonjs/components/selects/select-date-and-hours/interface.js +6 -0
- package/lib/commonjs/components/selects/select-date-and-hours/interface.js.map +1 -0
- package/lib/commonjs/components/selects/select-date-and-hours/styles.js +34 -0
- package/lib/commonjs/components/selects/select-date-and-hours/styles.js.map +1 -0
- package/lib/commonjs/components/selects/select-option/index.js +4 -2
- package/lib/commonjs/components/selects/select-option/index.js.map +1 -1
- package/lib/commonjs/components/selects/select-option/styles.js +6 -7
- package/lib/commonjs/components/selects/select-option/styles.js.map +1 -1
- package/lib/commonjs/components/supply-error-card/index.js +7 -6
- package/lib/commonjs/components/supply-error-card/index.js.map +1 -1
- package/lib/commonjs/components/toast-message/index.js +8 -7
- package/lib/commonjs/components/toast-message/index.js.map +1 -1
- package/lib/commonjs/components/travel-history/index.js +7 -7
- package/lib/commonjs/components/travel-history/index.js.map +1 -1
- package/lib/commonjs/components/trip-details-card/index.js +94 -13
- package/lib/commonjs/components/trip-details-card/index.js.map +1 -1
- package/lib/commonjs/components/typography/index.js +5 -5
- package/lib/commonjs/components/typography/index.js.map +1 -1
- package/lib/commonjs/index.js +53 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/list-devices/list-devices.stories.js +146 -0
- package/lib/commonjs/stories/list-devices/list-devices.stories.js.map +1 -0
- package/lib/commonjs/stories/list-supplies/list-supplies.stories.js +69 -0
- package/lib/commonjs/stories/list-supplies/list-supplies.stories.js.map +1 -0
- package/lib/commonjs/stories/modal-activity-reason/modal-activity-reason.stories.js +63 -0
- package/lib/commonjs/stories/modal-activity-reason/modal-activity-reason.stories.js.map +1 -0
- package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js +63 -0
- package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -0
- package/lib/commonjs/stories/supply-error-card/supply-error-card.stories.js +12 -12
- package/lib/commonjs/stories/supply-error-card/supply-error-card.stories.js.map +1 -1
- package/lib/commonjs/stories/trip-details-card/trip-details-card.stories.js +39 -6
- package/lib/commonjs/stories/trip-details-card/trip-details-card.stories.js.map +1 -1
- package/lib/commonjs/styles/theme/theme.js +1 -0
- package/lib/commonjs/styles/theme/theme.js.map +1 -1
- package/lib/module/common/icons-svg/bluetooth/index.js +45 -27
- package/lib/module/common/icons-svg/bluetooth/index.js.map +1 -1
- package/lib/module/common/icons-svg/constants/index.js +7 -5
- package/lib/module/common/icons-svg/constants/index.js.map +1 -1
- package/lib/module/common/icons-svg/index.js +19 -4
- package/lib/module/common/icons-svg/index.js.map +1 -1
- package/lib/module/common/icons-svg/plus-container/index.js +36 -0
- package/lib/module/common/icons-svg/plus-container/index.js.map +1 -0
- package/lib/module/common/icons-svg/trash/index.js +34 -0
- package/lib/module/common/icons-svg/trash/index.js.map +1 -0
- package/lib/module/components/activity-step/components/activite-row/index.js +134 -0
- package/lib/module/components/activity-step/components/activite-row/index.js.map +1 -0
- package/lib/module/components/activity-step/index.js +73 -0
- package/lib/module/components/activity-step/index.js.map +1 -0
- package/lib/module/components/activity-step/interface.js +4 -0
- package/lib/module/components/activity-step/interface.js.map +1 -0
- package/lib/module/components/activity-step/styles.js +83 -0
- package/lib/module/components/activity-step/styles.js.map +1 -0
- package/lib/module/components/card-scheduled-journey/index.js +8 -6
- package/lib/module/components/card-scheduled-journey/index.js.map +1 -1
- package/lib/module/components/inputs/input-date-time/index.js +130 -0
- package/lib/module/components/inputs/input-date-time/index.js.map +1 -0
- package/lib/module/components/inputs/input-date-time/interface.d.js +2 -0
- package/lib/module/components/inputs/input-date-time/interface.d.js.map +1 -0
- package/lib/module/components/inputs/input-date-time/styles.js +62 -0
- package/lib/module/components/inputs/input-date-time/styles.js.map +1 -0
- package/lib/module/components/list-devices/helpers/get-icon-by-status.js +21 -0
- package/lib/module/components/list-devices/helpers/get-icon-by-status.js.map +1 -0
- package/lib/module/components/list-devices/index.js +93 -0
- package/lib/module/components/list-devices/index.js.map +1 -0
- package/lib/module/components/list-devices/interface.d.js +2 -0
- package/lib/module/components/list-devices/interface.d.js.map +1 -0
- package/lib/module/components/list-devices/styles.js +56 -0
- package/lib/module/components/list-devices/styles.js.map +1 -0
- package/lib/module/components/list-supplies/index.js +165 -0
- package/lib/module/components/list-supplies/index.js.map +1 -0
- package/lib/module/components/list-supplies/interface.d.js +2 -0
- package/lib/module/components/list-supplies/interface.d.js.map +1 -0
- package/lib/module/components/maintenance-description-input/index.js +3 -0
- package/lib/module/components/maintenance-description-input/index.js.map +1 -1
- package/lib/module/components/maintenance-description-input/styles.js +1 -1
- package/lib/module/components/maintenance-description-input/styles.js.map +1 -1
- package/lib/module/components/modals/modal-activity-reason/index.js +165 -0
- package/lib/module/components/modals/modal-activity-reason/index.js.map +1 -0
- package/lib/module/components/modals/modal-activity-reason/interface.d.js +2 -0
- package/lib/module/components/modals/modal-activity-reason/interface.d.js.map +1 -0
- package/lib/module/components/modals/modal-create-activitie/helpers/index.js +24 -0
- package/lib/module/components/modals/modal-create-activitie/helpers/index.js.map +1 -0
- package/lib/module/components/modals/modal-create-activitie/index.js +196 -0
- package/lib/module/components/modals/modal-create-activitie/index.js.map +1 -0
- package/lib/module/components/modals/modal-create-activitie/interface.js +2 -0
- package/lib/module/components/modals/modal-create-activitie/interface.js.map +1 -0
- package/lib/module/components/modals/modal-create-activitie/styles.js +39 -0
- package/lib/module/components/modals/modal-create-activitie/styles.js.map +1 -0
- package/lib/module/components/modals/modal-exclude-activitie/index.js +2 -0
- package/lib/module/components/modals/modal-exclude-activitie/index.js.map +1 -0
- package/lib/module/components/modals/modal-journey-rectification/index.js +236 -0
- package/lib/module/components/modals/modal-journey-rectification/index.js.map +1 -0
- package/lib/module/components/modals/modal-journey-rectification/interface.d.js +2 -0
- package/lib/module/components/modals/modal-journey-rectification/interface.d.js.map +1 -0
- package/lib/module/components/modals/modal-to-confimations/index.js +179 -0
- package/lib/module/components/modals/modal-to-confimations/index.js.map +1 -0
- package/lib/module/components/modals/modal-to-confimations/interface.js +2 -0
- package/lib/module/components/modals/modal-to-confimations/interface.js.map +1 -0
- package/lib/module/components/selects/select-date-and-hours/index.js +74 -0
- package/lib/module/components/selects/select-date-and-hours/index.js.map +1 -0
- package/lib/module/components/selects/select-date-and-hours/interface.js +4 -0
- package/lib/module/components/selects/select-date-and-hours/interface.js.map +1 -0
- package/lib/module/components/selects/select-date-and-hours/styles.js +31 -0
- package/lib/module/components/selects/select-date-and-hours/styles.js.map +1 -0
- package/lib/module/components/selects/select-option/index.js +4 -2
- package/lib/module/components/selects/select-option/index.js.map +1 -1
- package/lib/module/components/selects/select-option/styles.js +6 -7
- package/lib/module/components/selects/select-option/styles.js.map +1 -1
- package/lib/module/components/supply-error-card/index.js +7 -6
- package/lib/module/components/supply-error-card/index.js.map +1 -1
- package/lib/module/components/toast-message/index.js +8 -7
- package/lib/module/components/toast-message/index.js.map +1 -1
- package/lib/module/components/travel-history/index.js +7 -7
- package/lib/module/components/travel-history/index.js.map +1 -1
- package/lib/module/components/trip-details-card/index.js +94 -13
- package/lib/module/components/trip-details-card/index.js.map +1 -1
- package/lib/module/components/typography/index.js +5 -5
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/list-devices/list-devices.stories.js +140 -0
- package/lib/module/stories/list-devices/list-devices.stories.js.map +1 -0
- package/lib/module/stories/list-supplies/list-supplies.stories.js +63 -0
- package/lib/module/stories/list-supplies/list-supplies.stories.js.map +1 -0
- package/lib/module/stories/modal-activity-reason/modal-activity-reason.stories.js +57 -0
- package/lib/module/stories/modal-activity-reason/modal-activity-reason.stories.js.map +1 -0
- package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js +57 -0
- package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -0
- package/lib/module/stories/supply-error-card/supply-error-card.stories.js +12 -12
- package/lib/module/stories/supply-error-card/supply-error-card.stories.js.map +1 -1
- package/lib/module/stories/trip-details-card/trip-details-card.stories.js +39 -6
- package/lib/module/stories/trip-details-card/trip-details-card.stories.js.map +1 -1
- package/lib/module/styles/theme/theme.js +1 -0
- package/lib/module/styles/theme/theme.js.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/bluetooth/index.d.ts +5 -1
- package/lib/typescript/commonjs/src/common/icons-svg/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/plus-container/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/common/icons-svg/plus-container/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/common/icons-svg/trash/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/common/icons-svg/trash/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/activity-step/components/activite-row/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/activity-step/components/activite-row/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/activity-step/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/activity-step/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/activity-step/interface.d.ts +40 -0
- package/lib/typescript/commonjs/src/components/activity-step/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/activity-step/styles.d.ts +75 -0
- package/lib/typescript/commonjs/src/components/activity-step/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/card-scheduled-journey/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/card-scheduled-journey/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/styles.d.ts +59 -0
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/list-devices/helpers/get-icon-by-status.d.ts +15 -0
- package/lib/typescript/commonjs/src/components/list-devices/helpers/get-icon-by-status.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/list-devices/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/list-devices/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/list-devices/styles.d.ts +57 -0
- package/lib/typescript/commonjs/src/components/list-devices/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/list-supplies/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/list-supplies/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/maintenance-description-input/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modals/modal-activity-reason/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/modals/modal-activity-reason/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/helpers/index.d.ts +21 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/helpers/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/interface.d.ts +19 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/styles.d.ts +33 -0
- package/lib/typescript/commonjs/src/components/modals/modal-create-activitie/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-exclude-activitie/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-exclude-activitie/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-journey-rectification/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/modals/modal-journey-rectification/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-to-confimations/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/modals/modal-to-confimations/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-to-confimations/interface.d.ts +28 -0
- package/lib/typescript/commonjs/src/components/modals/modal-to-confimations/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/index.d.ts +13 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/interface.d.ts +22 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/styles.d.ts +26 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/selects/select-option/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/selects/select-option/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/selects/select-option/styles.d.ts +0 -1
- package/lib/typescript/commonjs/src/components/selects/select-option/styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/supply-error-card/index.d.ts +3 -8
- package/lib/typescript/commonjs/src/components/supply-error-card/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/toast-message/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/trip-details-card/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +7 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/stories/list-devices/list-devices.stories.d.ts +22 -0
- package/lib/typescript/commonjs/src/stories/list-devices/list-devices.stories.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/stories/list-supplies/list-supplies.stories.d.ts +10 -0
- package/lib/typescript/commonjs/src/stories/list-supplies/list-supplies.stories.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/stories/modal-activity-reason/modal-activity-reason.stories.d.ts +10 -0
- package/lib/typescript/commonjs/src/stories/modal-activity-reason/modal-activity-reason.stories.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +10 -0
- package/lib/typescript/commonjs/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/stories/trip-details-card/trip-details-card.stories.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/commonjs/src/styles/theme/theme.d.ts.map +1 -1
- package/lib/typescript/module/src/common/icons-svg/bluetooth/index.d.ts +5 -1
- package/lib/typescript/module/src/common/icons-svg/bluetooth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/common/icons-svg/constants/index.d.ts +2 -0
- package/lib/typescript/module/src/common/icons-svg/constants/index.d.ts.map +1 -1
- package/lib/typescript/module/src/common/icons-svg/index.d.ts.map +1 -1
- package/lib/typescript/module/src/common/icons-svg/plus-container/index.d.ts +11 -0
- package/lib/typescript/module/src/common/icons-svg/plus-container/index.d.ts.map +1 -0
- package/lib/typescript/module/src/common/icons-svg/trash/index.d.ts +11 -0
- package/lib/typescript/module/src/common/icons-svg/trash/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/activity-step/components/activite-row/index.d.ts +11 -0
- package/lib/typescript/module/src/components/activity-step/components/activite-row/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/activity-step/index.d.ts +17 -0
- package/lib/typescript/module/src/components/activity-step/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/activity-step/interface.d.ts +40 -0
- package/lib/typescript/module/src/components/activity-step/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/activity-step/styles.d.ts +75 -0
- package/lib/typescript/module/src/components/activity-step/styles.d.ts.map +1 -0
- package/lib/typescript/module/src/components/card-scheduled-journey/index.d.ts +2 -1
- package/lib/typescript/module/src/components/card-scheduled-journey/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/inputs/input-date-time/index.d.ts +8 -0
- package/lib/typescript/module/src/components/inputs/input-date-time/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/inputs/input-date-time/styles.d.ts +59 -0
- package/lib/typescript/module/src/components/inputs/input-date-time/styles.d.ts.map +1 -0
- package/lib/typescript/module/src/components/list-devices/helpers/get-icon-by-status.d.ts +15 -0
- package/lib/typescript/module/src/components/list-devices/helpers/get-icon-by-status.d.ts.map +1 -0
- package/lib/typescript/module/src/components/list-devices/index.d.ts +11 -0
- package/lib/typescript/module/src/components/list-devices/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/list-devices/styles.d.ts +57 -0
- package/lib/typescript/module/src/components/list-devices/styles.d.ts.map +1 -0
- package/lib/typescript/module/src/components/list-supplies/index.d.ts +8 -0
- package/lib/typescript/module/src/components/list-supplies/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/maintenance-description-input/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modals/modal-activity-reason/index.d.ts +8 -0
- package/lib/typescript/module/src/components/modals/modal-activity-reason/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/helpers/index.d.ts +21 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/helpers/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/index.d.ts +8 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/interface.d.ts +19 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/styles.d.ts +33 -0
- package/lib/typescript/module/src/components/modals/modal-create-activitie/styles.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-exclude-activitie/index.d.ts +1 -0
- package/lib/typescript/module/src/components/modals/modal-exclude-activitie/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-journey-rectification/index.d.ts +8 -0
- package/lib/typescript/module/src/components/modals/modal-journey-rectification/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-to-confimations/index.d.ts +8 -0
- package/lib/typescript/module/src/components/modals/modal-to-confimations/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-to-confimations/interface.d.ts +28 -0
- package/lib/typescript/module/src/components/modals/modal-to-confimations/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/index.d.ts +13 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/interface.d.ts +22 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/styles.d.ts +26 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/styles.d.ts.map +1 -0
- package/lib/typescript/module/src/components/selects/select-option/index.d.ts +1 -0
- package/lib/typescript/module/src/components/selects/select-option/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/selects/select-option/styles.d.ts +0 -1
- package/lib/typescript/module/src/components/selects/select-option/styles.d.ts.map +1 -1
- package/lib/typescript/module/src/components/supply-error-card/index.d.ts +3 -8
- package/lib/typescript/module/src/components/supply-error-card/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/toast-message/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/trip-details-card/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +7 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/stories/list-devices/list-devices.stories.d.ts +22 -0
- package/lib/typescript/module/src/stories/list-devices/list-devices.stories.d.ts.map +1 -0
- package/lib/typescript/module/src/stories/list-supplies/list-supplies.stories.d.ts +10 -0
- package/lib/typescript/module/src/stories/list-supplies/list-supplies.stories.d.ts.map +1 -0
- package/lib/typescript/module/src/stories/modal-activity-reason/modal-activity-reason.stories.d.ts +10 -0
- package/lib/typescript/module/src/stories/modal-activity-reason/modal-activity-reason.stories.d.ts.map +1 -0
- package/lib/typescript/module/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +10 -0
- package/lib/typescript/module/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts.map +1 -0
- package/lib/typescript/module/src/stories/trip-details-card/trip-details-card.stories.d.ts.map +1 -1
- package/lib/typescript/module/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/module/src/styles/global/theme-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/module/src/styles/theme/theme.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/common/icons-svg/bluetooth/index.tsx +51 -24
- package/src/common/icons-svg/constants/index.ts +67 -65
- package/src/common/icons-svg/index.tsx +289 -280
- package/src/common/icons-svg/plus-container/index.tsx +32 -0
- package/src/common/icons-svg/trash/index.tsx +31 -0
- package/src/components/activity-step/components/activite-row/index.tsx +141 -0
- package/src/components/activity-step/index.tsx +73 -0
- package/src/components/activity-step/interface.ts +54 -0
- package/src/components/activity-step/styles.ts +72 -0
- package/src/components/card-scheduled-journey/index.tsx +140 -138
- package/src/components/card-scheduled-journey/interface.d.ts +145 -140
- package/src/components/inputs/input-date-time/index.tsx +133 -0
- package/src/components/inputs/input-date-time/interface.d.ts +25 -0
- package/src/components/inputs/input-date-time/styles.ts +63 -0
- package/src/components/list-devices/helpers/get-icon-by-status.tsx +20 -0
- package/src/components/list-devices/index.tsx +102 -0
- package/src/components/list-devices/interface.d.ts +36 -0
- package/src/components/list-devices/styles.ts +68 -0
- package/src/components/list-supplies/index.tsx +153 -0
- package/src/components/list-supplies/interface.d.ts +9 -0
- package/src/components/maintenance-description-input/index.tsx +1 -0
- package/src/components/maintenance-description-input/styles.ts +1 -1
- package/src/components/modals/modal-activity-reason/index.tsx +168 -0
- package/src/components/modals/modal-activity-reason/interface.d.ts +9 -0
- package/src/components/modals/modal-create-activitie/helpers/index.ts +14 -0
- package/src/components/modals/modal-create-activitie/index.tsx +210 -0
- package/src/components/modals/modal-create-activitie/interface.ts +22 -0
- package/src/components/modals/modal-create-activitie/styles.ts +24 -0
- package/src/components/modals/modal-exclude-activitie/index.ts +0 -0
- package/src/components/modals/modal-journey-rectification/index.tsx +236 -0
- package/src/components/modals/modal-journey-rectification/interface.d.ts +10 -0
- package/src/components/modals/modal-to-confimations/index.tsx +182 -0
- package/src/components/modals/modal-to-confimations/interface.ts +36 -0
- package/src/components/selects/select-date-and-hours/index.tsx +70 -0
- package/src/components/selects/select-date-and-hours/interface.ts +31 -0
- package/src/components/selects/select-date-and-hours/styles.ts +24 -0
- package/src/components/selects/select-option/index.tsx +2 -1
- package/src/components/selects/select-option/interface.d.ts +1 -1
- package/src/components/selects/select-option/styles.ts +74 -75
- package/src/components/supply-error-card/index.tsx +10 -6
- package/src/components/supply-error-card/interface.d.ts +3 -9
- package/src/components/toast-message/index.tsx +75 -74
- package/src/components/travel-history/index.tsx +7 -7
- package/src/components/trip-details-card/index.tsx +89 -12
- package/src/components/trip-details-card/interface.d.ts +4 -1
- package/src/components/typography/index.tsx +78 -78
- package/src/index.tsx +7 -0
- package/src/stories/list-devices/list-devices.stories.tsx +114 -0
- package/src/stories/list-supplies/list-supplies.stories.tsx +66 -0
- package/src/stories/modal-activity-reason/modal-activity-reason.stories.tsx +60 -0
- package/src/stories/modal-journey-rectification/modal-journey-rectification.stories.tsx +60 -0
- package/src/stories/supply-error-card/supply-error-card.stories.tsx +12 -12
- package/src/stories/trip-details-card/trip-details-card.stories.tsx +38 -5
- package/src/styles/theme/theme.ts +1 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { StyleSheet } from "react-native";
|
|
6
|
+
import { theme } from "../../../styles/theme/theme";
|
|
7
|
+
|
|
8
|
+
const styles = StyleSheet.create({
|
|
9
|
+
overlay: {
|
|
10
|
+
flex: 1,
|
|
11
|
+
justifyContent: "center",
|
|
12
|
+
alignItems: "center",
|
|
13
|
+
backgroundColor: theme.shadows.z1,
|
|
14
|
+
},
|
|
15
|
+
card: { width: "90%" },
|
|
16
|
+
headerRow: { marginBottom: 10, marginLeft: 4, flexDirection: "row", alignItems: "center" },
|
|
17
|
+
content: { padding: theme.paddings.xs },
|
|
18
|
+
actions: { marginTop: 16, flexDirection: "row", justifyContent: "space-between" },
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* EXPORTS
|
|
23
|
+
*/
|
|
24
|
+
export { styles };
|
|
File without changes
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { useState } from "react";
|
|
5
|
+
import { Modal, View } from "react-native";
|
|
6
|
+
|
|
7
|
+
// components
|
|
8
|
+
import Box from "../../box";
|
|
9
|
+
import Typography from "../../typography";
|
|
10
|
+
import Button from "../../button";
|
|
11
|
+
import SelectOption from "../../selects/select-option";
|
|
12
|
+
import InputDateTime from "../../inputs/input-date-time";
|
|
13
|
+
|
|
14
|
+
// commons / svg
|
|
15
|
+
import { Icons } from "../../../common/icons-svg";
|
|
16
|
+
|
|
17
|
+
// typings
|
|
18
|
+
import type { IModalJourneyRectificationProps } from "./interface";
|
|
19
|
+
import { asBaseComponent } from "../../../@types/as-base-component";
|
|
20
|
+
|
|
21
|
+
// styles
|
|
22
|
+
import { theme } from "../../../styles/theme/theme";
|
|
23
|
+
|
|
24
|
+
const options = [
|
|
25
|
+
{ label: "Disp com veículo parado", value: "option1" },
|
|
26
|
+
{ label: "Operação com veículo", value: "option2" },
|
|
27
|
+
{ label: "Em carga", value: "option3" },
|
|
28
|
+
{ label: "Em descarga", value: "option4" },
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const ModalJourneyRectification: React.FC<IModalJourneyRectificationProps> = ({
|
|
32
|
+
visible,
|
|
33
|
+
onClose,
|
|
34
|
+
modalConfirm,
|
|
35
|
+
textTitle,
|
|
36
|
+
}) => {
|
|
37
|
+
const [isLoading] = React.useState(false);
|
|
38
|
+
|
|
39
|
+
// *** DEFAULTS: já começa com um motivo, data e hora atuais
|
|
40
|
+
const defaultReason = options[0]?.value ?? null;
|
|
41
|
+
const [selectedReason, setSelectedReason] = useState<string | null>(defaultReason); // ***
|
|
42
|
+
const [selectedDate, setSelectedDate] = useState<Date>(new Date()); // ***
|
|
43
|
+
const [selectedTime, setSelectedTime] = useState<Date>(new Date()); // ***
|
|
44
|
+
|
|
45
|
+
// helpers de formatação
|
|
46
|
+
const fmtDate = (d: Date) =>
|
|
47
|
+
`${String(d.getDate()).padStart(2, "0")}/${String(d.getMonth() + 1).padStart(2, "0")}/${d.getFullYear()}`;
|
|
48
|
+
|
|
49
|
+
const fmtTime = (d: Date) =>
|
|
50
|
+
`${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
|
|
51
|
+
|
|
52
|
+
// junta data + hora
|
|
53
|
+
const mergeDateTime = (date: Date | null, time: Date | null): Date | null => {
|
|
54
|
+
if (!date) return null;
|
|
55
|
+
const out = new Date(date);
|
|
56
|
+
if (time) {
|
|
57
|
+
out.setHours(time.getHours());
|
|
58
|
+
out.setMinutes(time.getMinutes());
|
|
59
|
+
out.setSeconds(0);
|
|
60
|
+
out.setMilliseconds(0);
|
|
61
|
+
}
|
|
62
|
+
return out;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<Modal animationType="fade" transparent visible={visible}>
|
|
67
|
+
<View
|
|
68
|
+
style={{
|
|
69
|
+
flex: 1,
|
|
70
|
+
justifyContent: "center",
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
backgroundColor: "rgba(0,0,0,0.6)",
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
75
|
+
<Box
|
|
76
|
+
width={"90%"}
|
|
77
|
+
backgroundColor={theme.colors.orange[500]}
|
|
78
|
+
borderStyled={{
|
|
79
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
80
|
+
}}
|
|
81
|
+
paddingStyle={{
|
|
82
|
+
paddingLeft: theme.paddings["2xs"],
|
|
83
|
+
paddingRight: theme.paddings["2xs"],
|
|
84
|
+
paddingTop: theme.paddings.sm,
|
|
85
|
+
paddingBottom: theme.paddings.sm,
|
|
86
|
+
}}
|
|
87
|
+
>
|
|
88
|
+
<Box
|
|
89
|
+
marginStyle={{ marginBottom: 10, marginLeft: 4 }}
|
|
90
|
+
flexStyle={{ flexDirection: "row", alignItems: "center" }}
|
|
91
|
+
>
|
|
92
|
+
<Icons
|
|
93
|
+
icon="EXCLAMATION_TRIANGLE"
|
|
94
|
+
color={theme.colors.orange[500]}
|
|
95
|
+
background={theme.colors.neutral[300]}
|
|
96
|
+
size={22}
|
|
97
|
+
/>
|
|
98
|
+
<Typography
|
|
99
|
+
text={`${textTitle ?? "Incluir atividade"}`}
|
|
100
|
+
color={theme.colors.neutral[25]}
|
|
101
|
+
marginLeft={theme.margins["2xs"]}
|
|
102
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
103
|
+
size={theme.fontSizes.lg}
|
|
104
|
+
/>
|
|
105
|
+
</Box>
|
|
106
|
+
|
|
107
|
+
<Box
|
|
108
|
+
backgroundColor={theme.colors.neutral[300]}
|
|
109
|
+
paddingStyle={{
|
|
110
|
+
padding: theme.paddings.xs,
|
|
111
|
+
}}
|
|
112
|
+
borderStyled={{
|
|
113
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
114
|
+
}}
|
|
115
|
+
>
|
|
116
|
+
<Typography
|
|
117
|
+
text={"Confirme as alterações antes de salvar."}
|
|
118
|
+
color={theme.colors.black[25]}
|
|
119
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
120
|
+
size={theme.fontSizes.md}
|
|
121
|
+
marginBottom={16}
|
|
122
|
+
/>
|
|
123
|
+
|
|
124
|
+
<SelectOption
|
|
125
|
+
titleLabel="Selecione atividade"
|
|
126
|
+
sizeTitleLabel={18}
|
|
127
|
+
dataOption={options}
|
|
128
|
+
// Onde o motivo é RECEBIDO: aqui no callback
|
|
129
|
+
handleSelectDown={(value) => setSelectedReason(value)} // ***
|
|
130
|
+
backgroundColor={theme.colors.neutral[300]}
|
|
131
|
+
/>
|
|
132
|
+
|
|
133
|
+
<InputDateTime
|
|
134
|
+
mode="date"
|
|
135
|
+
titleLabel="Data"
|
|
136
|
+
// Onde a data é RECEBIDA: no onChange abaixo
|
|
137
|
+
value={selectedDate} // *** controlado
|
|
138
|
+
onChange={(d) => setSelectedDate(d)} // ***
|
|
139
|
+
backgroundColor="#f5f5f5"
|
|
140
|
+
colortitleLabel="#333"
|
|
141
|
+
/>
|
|
142
|
+
|
|
143
|
+
<InputDateTime
|
|
144
|
+
mode="time"
|
|
145
|
+
titleLabel="Horário"
|
|
146
|
+
// Onde a hora é RECEBIDA: no onChange abaixo
|
|
147
|
+
value={selectedTime} // *** controlado
|
|
148
|
+
onChange={(d) => setSelectedTime(d)} // ***
|
|
149
|
+
backgroundColor="#f5f5f5"
|
|
150
|
+
colortitleLabel="#333"
|
|
151
|
+
/>
|
|
152
|
+
|
|
153
|
+
<Box
|
|
154
|
+
marginStyle={{ marginTop: 4 }}
|
|
155
|
+
flexStyle={{
|
|
156
|
+
flexDirection: "row",
|
|
157
|
+
justifyContent: "space-between",
|
|
158
|
+
}}
|
|
159
|
+
>
|
|
160
|
+
<Button
|
|
161
|
+
title="CANCELAR"
|
|
162
|
+
onPress={onClose}
|
|
163
|
+
width={"48%"}
|
|
164
|
+
height={40}
|
|
165
|
+
isLoading={isLoading}
|
|
166
|
+
disabled={isLoading}
|
|
167
|
+
backgroundColor={theme.colors.neutral[300]}
|
|
168
|
+
buttonTextStyle={{
|
|
169
|
+
color: theme.colors.blue[100],
|
|
170
|
+
fontFamily: "Inter-Medium",
|
|
171
|
+
fontSize: theme.fontSizes.xs,
|
|
172
|
+
fontWeight: "500",
|
|
173
|
+
}}
|
|
174
|
+
flexStyle={{
|
|
175
|
+
flexDirection: "row",
|
|
176
|
+
alignItems: "center",
|
|
177
|
+
justifyContent: "center",
|
|
178
|
+
textAlign: "center",
|
|
179
|
+
}}
|
|
180
|
+
borderStyled={{
|
|
181
|
+
borderWidth: theme.borderWidths.thin,
|
|
182
|
+
borderColor: theme.colors.blue[100],
|
|
183
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
184
|
+
}}
|
|
185
|
+
/>
|
|
186
|
+
|
|
187
|
+
<Button
|
|
188
|
+
title="CONFIRMAR"
|
|
189
|
+
onPress={() => {
|
|
190
|
+
const merged = mergeDateTime(selectedDate, selectedTime);
|
|
191
|
+
|
|
192
|
+
const payload = {
|
|
193
|
+
reasonValue: selectedReason,
|
|
194
|
+
reasonLabel: options.find((o) => o.value === selectedReason)?.label ?? null,
|
|
195
|
+
date: selectedDate ? fmtDate(selectedDate) : null,
|
|
196
|
+
time: selectedTime ? fmtTime(selectedTime) : null,
|
|
197
|
+
dateTimeISO: merged ? merged.toISOString() : null,
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
modalConfirm(payload);
|
|
201
|
+
onClose();
|
|
202
|
+
}}
|
|
203
|
+
width={"48%"}
|
|
204
|
+
height={40}
|
|
205
|
+
isLoading={isLoading}
|
|
206
|
+
disabled={isLoading}
|
|
207
|
+
backgroundColor={theme.colors.blue[500]}
|
|
208
|
+
buttonTextStyle={{
|
|
209
|
+
color: theme.colors.neutral[25],
|
|
210
|
+
fontFamily: "Inter-Medium",
|
|
211
|
+
fontSize: theme.fontSizes.xs,
|
|
212
|
+
fontWeight: "500",
|
|
213
|
+
}}
|
|
214
|
+
flexStyle={{
|
|
215
|
+
flexDirection: "row",
|
|
216
|
+
alignItems: "center",
|
|
217
|
+
justifyContent: "center",
|
|
218
|
+
textAlign: "center",
|
|
219
|
+
}}
|
|
220
|
+
borderStyled={{
|
|
221
|
+
borderWidth: theme.borderWidths.thin,
|
|
222
|
+
borderColor: theme.colors.blue[100],
|
|
223
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
224
|
+
}}
|
|
225
|
+
/>
|
|
226
|
+
</Box>
|
|
227
|
+
</Box>
|
|
228
|
+
</Box>
|
|
229
|
+
</View>
|
|
230
|
+
</Modal>
|
|
231
|
+
);
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
ModalJourneyRectification.displayName = "ModalJourneyRectification";
|
|
235
|
+
|
|
236
|
+
export default asBaseComponent(ModalJourneyRectification);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable no-undef */
|
|
2
|
+
/* eslint-disable no-unused-vars */
|
|
3
|
+
interface IModalJourneyRectificationProps {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
modalConfirm: (value: T) => void;
|
|
7
|
+
textTitle?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type { IModalJourneyRectificationProps };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Modal, Text, View } from "react-native";
|
|
6
|
+
|
|
7
|
+
// components
|
|
8
|
+
import Box from "../../box";
|
|
9
|
+
import Button from "../../button";
|
|
10
|
+
import Typography from "../../typography";
|
|
11
|
+
|
|
12
|
+
// commons / svg
|
|
13
|
+
import { Icons } from "../../../common/icons-svg";
|
|
14
|
+
|
|
15
|
+
// typings
|
|
16
|
+
import type { IModalToConfirmationsProps } from ".//interface";
|
|
17
|
+
import { asBaseComponent } from "../../../@types/as-base-component";
|
|
18
|
+
|
|
19
|
+
// styles
|
|
20
|
+
import { theme } from "../../../styles/theme/theme";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Componente ModalToConfirmations para a interação da ui.
|
|
24
|
+
*/
|
|
25
|
+
const ModalToConfirmations: React.FC<IModalToConfirmationsProps> = ({
|
|
26
|
+
visible,
|
|
27
|
+
onClose,
|
|
28
|
+
onPressConfirm,
|
|
29
|
+
textTitle,
|
|
30
|
+
text1,
|
|
31
|
+
text2,
|
|
32
|
+
titleButtonCancel,
|
|
33
|
+
titleButtonConfirm,
|
|
34
|
+
backgroundColor,
|
|
35
|
+
}) => {
|
|
36
|
+
return (
|
|
37
|
+
<Modal animationType="fade" transparent visible={visible}>
|
|
38
|
+
<View
|
|
39
|
+
style={{
|
|
40
|
+
flex: 1,
|
|
41
|
+
justifyContent: "center",
|
|
42
|
+
alignItems: "center",
|
|
43
|
+
backgroundColor: theme.shadows.z1,
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<Box
|
|
47
|
+
width={"90%"}
|
|
48
|
+
backgroundColor={theme.colors.orange[500]}
|
|
49
|
+
borderStyled={{
|
|
50
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
51
|
+
}}
|
|
52
|
+
paddingStyle={{
|
|
53
|
+
paddingLeft: theme.paddings["2xs"],
|
|
54
|
+
paddingRight: theme.paddings["2xs"],
|
|
55
|
+
paddingTop: theme.paddings.sm,
|
|
56
|
+
paddingBottom: theme.paddings.sm,
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
59
|
+
<Box
|
|
60
|
+
marginStyle={{ marginBottom: 10, marginLeft: 4 }}
|
|
61
|
+
flexStyle={{ flexDirection: "row", alignItems: "center" }}
|
|
62
|
+
>
|
|
63
|
+
<Icons
|
|
64
|
+
icon="EXCLAMATION_TRIANGLE"
|
|
65
|
+
color={theme.colors.orange[500]}
|
|
66
|
+
background={theme.colors.neutral[300]}
|
|
67
|
+
size={22}
|
|
68
|
+
/>
|
|
69
|
+
<Typography
|
|
70
|
+
text={`${textTitle ?? "TITULO NÃO INFORMADO"}`}
|
|
71
|
+
color={theme.colors.neutral[25]}
|
|
72
|
+
marginLeft={theme.margins["2xs"]}
|
|
73
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
74
|
+
size={theme.fontSizes.lg}
|
|
75
|
+
/>
|
|
76
|
+
</Box>
|
|
77
|
+
|
|
78
|
+
<Box
|
|
79
|
+
backgroundColor={theme.colors.neutral[300]}
|
|
80
|
+
paddingStyle={{
|
|
81
|
+
padding: theme.paddings.xs,
|
|
82
|
+
}}
|
|
83
|
+
borderStyled={{
|
|
84
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
85
|
+
}}
|
|
86
|
+
>
|
|
87
|
+
<Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
88
|
+
<Text
|
|
89
|
+
style={{
|
|
90
|
+
color: theme.colors.orange[150],
|
|
91
|
+
fontFamily: theme.fonts.inter_semi_bold_600,
|
|
92
|
+
marginBottom: text2 ? 16 : 8,
|
|
93
|
+
}}
|
|
94
|
+
>
|
|
95
|
+
<Typography
|
|
96
|
+
text={`${text1} `}
|
|
97
|
+
size={theme.fontSizes.sm}
|
|
98
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
99
|
+
fontWeight="400"
|
|
100
|
+
color={theme.colors.black[180]}
|
|
101
|
+
lineHeight={24}
|
|
102
|
+
letterSpacing={"regular"}
|
|
103
|
+
/>
|
|
104
|
+
{text2 ?? "Alterar?"}
|
|
105
|
+
</Text>
|
|
106
|
+
</Box>
|
|
107
|
+
|
|
108
|
+
<Box
|
|
109
|
+
flexStyle={{
|
|
110
|
+
flexDirection: "row",
|
|
111
|
+
justifyContent: "space-between",
|
|
112
|
+
}}
|
|
113
|
+
>
|
|
114
|
+
<Button
|
|
115
|
+
title={titleButtonCancel ?? "CANCELAR"}
|
|
116
|
+
onPress={onClose}
|
|
117
|
+
width={text2 ? "48%" : "100%"}
|
|
118
|
+
height={40}
|
|
119
|
+
isLoading={false}
|
|
120
|
+
disabled={false}
|
|
121
|
+
backgroundColor={backgroundColor ?? theme.colors.neutral[300]}
|
|
122
|
+
buttonTextStyle={{
|
|
123
|
+
color: backgroundColor ? theme.colors.neutral[25] : theme.colors.blue[100],
|
|
124
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
125
|
+
fontSize: theme.fontSizes.xs,
|
|
126
|
+
fontWeight: "500",
|
|
127
|
+
}}
|
|
128
|
+
flexStyle={{
|
|
129
|
+
flexDirection: "row",
|
|
130
|
+
alignItems: "center",
|
|
131
|
+
justifyContent: "center",
|
|
132
|
+
textAlign: "center",
|
|
133
|
+
}}
|
|
134
|
+
borderStyled={{
|
|
135
|
+
borderWidth: theme.borderWidths.thin,
|
|
136
|
+
borderColor: theme.colors.blue[100],
|
|
137
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
138
|
+
}}
|
|
139
|
+
/>
|
|
140
|
+
|
|
141
|
+
{text2 && (
|
|
142
|
+
<Button
|
|
143
|
+
title={titleButtonConfirm ?? "CONFIRMAR"}
|
|
144
|
+
onPress={() => {
|
|
145
|
+
onPressConfirm();
|
|
146
|
+
onClose();
|
|
147
|
+
}}
|
|
148
|
+
width={"48%"}
|
|
149
|
+
height={40}
|
|
150
|
+
isLoading={false}
|
|
151
|
+
disabled={false}
|
|
152
|
+
backgroundColor={theme.colors.blue[500]}
|
|
153
|
+
buttonTextStyle={{
|
|
154
|
+
color: theme.colors.neutral[25],
|
|
155
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
156
|
+
fontSize: theme.fontSizes.xs,
|
|
157
|
+
fontWeight: "500",
|
|
158
|
+
}}
|
|
159
|
+
flexStyle={{
|
|
160
|
+
flexDirection: "row",
|
|
161
|
+
alignItems: "center",
|
|
162
|
+
justifyContent: "center",
|
|
163
|
+
textAlign: "center",
|
|
164
|
+
}}
|
|
165
|
+
borderStyled={{
|
|
166
|
+
borderWidth: theme.borderWidths.thin,
|
|
167
|
+
borderColor: theme.colors.blue[100],
|
|
168
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
169
|
+
}}
|
|
170
|
+
/>
|
|
171
|
+
)}
|
|
172
|
+
</Box>
|
|
173
|
+
</Box>
|
|
174
|
+
</Box>
|
|
175
|
+
</View>
|
|
176
|
+
</Modal>
|
|
177
|
+
);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
ModalToConfirmations.displayName = "ModalToConfirmations";
|
|
181
|
+
|
|
182
|
+
export default asBaseComponent(ModalToConfirmations);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
interface IModalToConfirmationsProps {
|
|
5
|
+
/**params para informa se o modal estár aberto ou fecahdo */
|
|
6
|
+
visible: boolean;
|
|
7
|
+
|
|
8
|
+
/**params do modal */
|
|
9
|
+
textTitle?: string;
|
|
10
|
+
|
|
11
|
+
/**params que armazena o texto da descrição com cor padrão */
|
|
12
|
+
text1?: string;
|
|
13
|
+
|
|
14
|
+
/**params que armazema o texto da descrição com a cor pintada */
|
|
15
|
+
text2?: string;
|
|
16
|
+
|
|
17
|
+
/**params para o titulo do botão de cancelar */
|
|
18
|
+
titleButtonCancel?: string;
|
|
19
|
+
|
|
20
|
+
/**params para o titulo do botão de confirmar */
|
|
21
|
+
titleButtonConfirm?: string;
|
|
22
|
+
|
|
23
|
+
/**params para colocar cor de fundo no botão */
|
|
24
|
+
backgroundColor?: string;
|
|
25
|
+
|
|
26
|
+
/**params que faz o fechamento do modal */
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
|
|
29
|
+
/**params que faz o fechamento do modal + confirmação */
|
|
30
|
+
onPressConfirm: () => void;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* EXPORTS
|
|
35
|
+
*/
|
|
36
|
+
export type { IModalToConfirmationsProps };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { forwardRef } from "react";
|
|
5
|
+
|
|
6
|
+
import { View, TouchableOpacity } from "react-native";
|
|
7
|
+
|
|
8
|
+
// seus componentes
|
|
9
|
+
import Box from "../../box";
|
|
10
|
+
import Typography from "../../typography";
|
|
11
|
+
|
|
12
|
+
// commons / svg
|
|
13
|
+
import { Icons } from "../../../common/icons-svg";
|
|
14
|
+
|
|
15
|
+
// typings
|
|
16
|
+
import type { IActivityFieldsProps } from "./interface";
|
|
17
|
+
import { asBaseComponent } from "../../../@types/as-base-component";
|
|
18
|
+
|
|
19
|
+
// styles
|
|
20
|
+
import { theme } from "../../../styles/theme/theme";
|
|
21
|
+
import { styles } from "./styles";
|
|
22
|
+
|
|
23
|
+
const ActivityFields = forwardRef<any, IActivityFieldsProps<any>>(
|
|
24
|
+
({ value, icon, onPressConfirm, disabled = false }, ref): React.ReactElement => {
|
|
25
|
+
return (
|
|
26
|
+
<TouchableOpacity
|
|
27
|
+
ref={ref}
|
|
28
|
+
activeOpacity={0.7}
|
|
29
|
+
style={[
|
|
30
|
+
styles.field,
|
|
31
|
+
{
|
|
32
|
+
borderColor: theme.colors.gray[700],
|
|
33
|
+
backgroundColor: theme.colors.neutral[300],
|
|
34
|
+
opacity: disabled ? 0.7 : 1,
|
|
35
|
+
},
|
|
36
|
+
]}
|
|
37
|
+
onPress={() => onPressConfirm(value)}
|
|
38
|
+
disabled={disabled}
|
|
39
|
+
>
|
|
40
|
+
<View style={styles.row}>
|
|
41
|
+
<Box
|
|
42
|
+
width={"10%"}
|
|
43
|
+
height={45}
|
|
44
|
+
flexStyle={{ alignItems: "center", justifyContent: "center" }}
|
|
45
|
+
>
|
|
46
|
+
<Icons icon={icon ? icon : "CALENDAR"} color={theme.colors.black[100]} size={18} />
|
|
47
|
+
</Box>
|
|
48
|
+
|
|
49
|
+
<Box
|
|
50
|
+
width={"90%"}
|
|
51
|
+
height={45}
|
|
52
|
+
flexStyle={{ alignItems: "center", justifyContent: "center" }}
|
|
53
|
+
>
|
|
54
|
+
<Typography
|
|
55
|
+
text={String(value)}
|
|
56
|
+
color={theme.colors.blue[500]}
|
|
57
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
58
|
+
size={theme.fontSizes.md}
|
|
59
|
+
marginRight={44}
|
|
60
|
+
/>
|
|
61
|
+
</Box>
|
|
62
|
+
</View>
|
|
63
|
+
</TouchableOpacity>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
ActivityFields.displayName = "ActivityFields";
|
|
69
|
+
|
|
70
|
+
export default asBaseComponent(ActivityFields);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
2
|
+
/**
|
|
3
|
+
* IMPORTS
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { TouchableOpacityProps } from "react-native";
|
|
7
|
+
|
|
8
|
+
// commons / svg
|
|
9
|
+
import type { SVG_NAME } from "../../../common/icons-svg/constants";
|
|
10
|
+
|
|
11
|
+
type IActivityFieldsProps<T> = TouchableOpacityProps & {
|
|
12
|
+
/** Valor exibido e retornado no onPressConfirm */
|
|
13
|
+
value: T | null;
|
|
14
|
+
|
|
15
|
+
/** Ícone à esquerda (padrão: 'CALENDAR') */
|
|
16
|
+
icon: keyof typeof SVG_NAME;
|
|
17
|
+
|
|
18
|
+
/** Desabilita interação */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
|
|
21
|
+
/** Cor do texto (opcional) */
|
|
22
|
+
textColor?: string;
|
|
23
|
+
|
|
24
|
+
/** Clique confirma e devolve o value */
|
|
25
|
+
onPressConfirm: (value: T) => void;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* EXPORTS
|
|
30
|
+
*/
|
|
31
|
+
export type { IActivityFieldsProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { StyleSheet } from "react-native";
|
|
6
|
+
|
|
7
|
+
const styles = StyleSheet.create({
|
|
8
|
+
field: {
|
|
9
|
+
width: "100%",
|
|
10
|
+
height: 45,
|
|
11
|
+
borderRadius: 12,
|
|
12
|
+
borderWidth: 1,
|
|
13
|
+
paddingHorizontal: 12,
|
|
14
|
+
justifyContent: "center",
|
|
15
|
+
marginTop: 10,
|
|
16
|
+
marginBottom: 16,
|
|
17
|
+
},
|
|
18
|
+
row: { flexDirection: "row", alignItems: "center", gap: 8, justifyContent: "space-around" },
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* EXPORTS
|
|
23
|
+
*/
|
|
24
|
+
export { styles };
|
|
@@ -16,7 +16,7 @@ import { styles } from "./styles";
|
|
|
16
16
|
import { theme } from "../../../styles/theme/theme";
|
|
17
17
|
|
|
18
18
|
const SelectOption = forwardRef<any, ISelectDropDownProps>((props, ref): React.ReactElement => {
|
|
19
|
-
const { dataOption, handleSelectDown, titleLabel, sizeTitleLabel, colortitleLabel } = props;
|
|
19
|
+
const { dataOption, handleSelectDown, titleLabel, sizeTitleLabel, colortitleLabel, backgroundColor } = props;
|
|
20
20
|
|
|
21
21
|
const [selectedValue, setSelectedValue] = useState(dataOption[0]?.value || "");
|
|
22
22
|
const [modalVisible, setModalVisible] = useState(false);
|
|
@@ -33,6 +33,7 @@ const SelectOption = forwardRef<any, ISelectDropDownProps>((props, ref): React.R
|
|
|
33
33
|
titleLabel,
|
|
34
34
|
sizeTitleLabel,
|
|
35
35
|
colortitleLabel,
|
|
36
|
+
backgroundColor,
|
|
36
37
|
} as ISelectDropDownProps;
|
|
37
38
|
return (
|
|
38
39
|
<View ref={ref} style={styles(styleProps).container}>
|
|
@@ -13,7 +13,7 @@ type ISelectDropDownProps = TextProps & {
|
|
|
13
13
|
titleLabel: string;
|
|
14
14
|
sizeTitleLabel?: number;
|
|
15
15
|
colortitleLabel?: string;
|
|
16
|
-
|
|
16
|
+
backgroundColor?: string;
|
|
17
17
|
/**retorna o valor selecionado */
|
|
18
18
|
// eslint-disable-next-line no-unused-vars
|
|
19
19
|
handleSelectDown: (value: string) => void;
|