jornada-ui 0.4.11 → 0.4.13
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/coil-removel-code/index.js +4 -3
- package/lib/commonjs/components/coil-removel-code/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 +104 -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 +26 -9
- 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/step-indicator/index.js +54 -40
- package/lib/commonjs/components/step-indicator/index.js.map +1 -1
- package/lib/commonjs/components/step-indicator/styles.js.map +1 -1
- package/lib/commonjs/components/supply-error-card/index.js +6 -6
- 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 +102 -22
- 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/step-indicator/step-indicator.stories.js +1 -0
- package/lib/commonjs/stories/step-indicator/step-indicator.stories.js.map +1 -1
- package/lib/commonjs/stories/supply-error-card/supply-error-card.stories.js +2 -2
- 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/commonjs/utils/text-limit/index.js +37 -0
- package/lib/commonjs/utils/text-limit/index.js.map +1 -0
- 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/coil-removel-code/index.js +4 -3
- package/lib/module/components/coil-removel-code/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 +100 -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 +26 -9
- 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/step-indicator/index.js +55 -41
- package/lib/module/components/step-indicator/index.js.map +1 -1
- package/lib/module/components/step-indicator/styles.js.map +1 -1
- package/lib/module/components/supply-error-card/index.js +6 -6
- 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 +105 -24
- 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/step-indicator/step-indicator.stories.js +1 -0
- package/lib/module/stories/step-indicator/step-indicator.stories.js.map +1 -1
- package/lib/module/stories/supply-error-card/supply-error-card.stories.js +2 -2
- 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/module/utils/text-limit/index.js +32 -0
- package/lib/module/utils/text-limit/index.js.map +1 -0
- 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/coil-removel-code/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/step-indicator/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/step-indicator/styles.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/step-indicator/styles.d.ts.map +1 -1
- 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/step-indicator/step-indicator.stories.d.ts.map +1 -1
- 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/commonjs/src/utils/text-limit/index.d.ts +14 -0
- package/lib/typescript/commonjs/src/utils/text-limit/index.d.ts.map +1 -0
- 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/coil-removel-code/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/step-indicator/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/step-indicator/styles.d.ts +2 -2
- package/lib/typescript/module/src/components/step-indicator/styles.d.ts.map +1 -1
- 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/step-indicator/step-indicator.stories.d.ts.map +1 -1
- 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/lib/typescript/module/src/utils/text-limit/index.d.ts +14 -0
- package/lib/typescript/module/src/utils/text-limit/index.d.ts.map +1 -0
- 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/coil-removel-code/index.tsx +8 -3
- package/src/components/coil-removel-code/interface.d.ts +14 -13
- 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 +103 -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 +124 -94
- package/src/components/selects/select-option/interface.d.ts +1 -1
- package/src/components/selects/select-option/styles.ts +74 -75
- package/src/components/step-indicator/index.tsx +56 -36
- package/src/components/step-indicator/interface.d.ts +14 -3
- package/src/components/step-indicator/styles.ts +2 -2
- package/src/components/supply-error-card/index.tsx +109 -109
- package/src/components/supply-error-card/interface.d.ts +133 -133
- 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 +267 -193
- 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/step-indicator/step-indicator.stories.tsx +1 -0
- package/src/stories/supply-error-card/supply-error-card.stories.tsx +72 -72
- package/src/stories/trip-details-card/trip-details-card.stories.tsx +38 -5
- package/src/styles/theme/theme.ts +1 -0
- package/src/utils/text-limit/index.ts +28 -0
|
@@ -1,74 +1,75 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import React, { forwardRef, useMemo } from "react";
|
|
6
|
-
import { View } from "react-native";
|
|
7
|
-
|
|
8
|
-
// components
|
|
9
|
-
import Typography from "../typography";
|
|
10
|
-
|
|
11
|
-
// typings
|
|
12
|
-
import type { ToastMessageCustoProps } from "./interface";
|
|
13
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
14
|
-
|
|
15
|
-
import { styles } from "./styles";
|
|
16
|
-
import { theme } from "../../styles/theme/theme";
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Componente ToastMessage para a exibição de mensagens de conexão.
|
|
20
|
-
*/
|
|
21
|
-
const ToastMessage = forwardRef<any, ToastMessageCustoProps>(
|
|
22
|
-
({ text1, text2, options }, ref): React.ReactElement => {
|
|
23
|
-
const borderColor = useMemo(() => {
|
|
24
|
-
const map = {
|
|
25
|
-
success: theme.colors?.green[400] ?? "#69C779",
|
|
26
|
-
alert: theme.colors?.blue[800] ?? "#87CEFA",
|
|
27
|
-
error: theme.colors?.red[500] ?? "#ef4444",
|
|
28
|
-
} as const;
|
|
29
|
-
return map[options];
|
|
30
|
-
}, [options, theme]);
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<View ref={ref} style={styles.wrapperToash}>
|
|
34
|
-
<View style={styles.wrapperBorder}>
|
|
35
|
-
<View
|
|
36
|
-
testID="border-custom"
|
|
37
|
-
style={[styles.borderCustom, { backgroundColor: borderColor }]}
|
|
38
|
-
/>
|
|
39
|
-
</View>
|
|
40
|
-
|
|
41
|
-
<View style={styles.wrapperText}>
|
|
42
|
-
{!!text1 && (
|
|
43
|
-
<Typography
|
|
44
|
-
text={String(text1)}
|
|
45
|
-
fontFamily={theme.fonts.inter_medium_500}
|
|
46
|
-
color={"blue500"}
|
|
47
|
-
size={theme.fontSizes.xs}
|
|
48
|
-
lineHeight={theme.lineHeight["2xl"]}
|
|
49
|
-
letterSpacing={"regular"}
|
|
50
|
-
/>
|
|
51
|
-
)}
|
|
52
|
-
|
|
53
|
-
{!!text2 && (
|
|
54
|
-
<Typography
|
|
55
|
-
text={String(text2)}
|
|
56
|
-
fontFamily="inter_regular_400"
|
|
57
|
-
color={"black25"}
|
|
58
|
-
size={theme.fontSizes.xs}
|
|
59
|
-
lineHeight={theme.lineHeight["2xl"]}
|
|
60
|
-
letterSpacing={"regular"}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import React, { forwardRef, useMemo } from "react";
|
|
6
|
+
import { View } from "react-native";
|
|
7
|
+
|
|
8
|
+
// components
|
|
9
|
+
import Typography from "../typography";
|
|
10
|
+
|
|
11
|
+
// typings
|
|
12
|
+
import type { ToastMessageCustoProps } from "./interface";
|
|
13
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
14
|
+
|
|
15
|
+
import { styles } from "./styles";
|
|
16
|
+
import { theme } from "../../styles/theme/theme";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Componente ToastMessage para a exibição de mensagens de conexão.
|
|
20
|
+
*/
|
|
21
|
+
const ToastMessage = forwardRef<any, ToastMessageCustoProps>(
|
|
22
|
+
({ text1, text2, options }, ref): React.ReactElement => {
|
|
23
|
+
const borderColor = useMemo(() => {
|
|
24
|
+
const map = {
|
|
25
|
+
success: theme.colors?.green[400] ?? "#69C779",
|
|
26
|
+
alert: theme.colors?.blue[800] ?? "#87CEFA",
|
|
27
|
+
error: theme.colors?.red[500] ?? "#ef4444",
|
|
28
|
+
} as const;
|
|
29
|
+
return map[options];
|
|
30
|
+
}, [options, theme]);
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<View ref={ref} style={styles.wrapperToash}>
|
|
34
|
+
<View style={styles.wrapperBorder}>
|
|
35
|
+
<View
|
|
36
|
+
testID="border-custom"
|
|
37
|
+
style={[styles.borderCustom, { backgroundColor: borderColor }]}
|
|
38
|
+
/>
|
|
39
|
+
</View>
|
|
40
|
+
|
|
41
|
+
<View style={styles.wrapperText}>
|
|
42
|
+
{!!text1 && (
|
|
43
|
+
<Typography
|
|
44
|
+
text={String(text1)}
|
|
45
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
46
|
+
color={"blue500"}
|
|
47
|
+
size={theme.fontSizes.xs}
|
|
48
|
+
lineHeight={theme.lineHeight["2xl"]}
|
|
49
|
+
letterSpacing={"regular"}
|
|
50
|
+
/>
|
|
51
|
+
)}
|
|
52
|
+
|
|
53
|
+
{!!text2 && (
|
|
54
|
+
<Typography
|
|
55
|
+
text={String(text2)}
|
|
56
|
+
fontFamily="inter_regular_400"
|
|
57
|
+
color={"black25"}
|
|
58
|
+
size={theme.fontSizes.xs}
|
|
59
|
+
lineHeight={theme.lineHeight["2xl"]}
|
|
60
|
+
letterSpacing={"regular"}
|
|
61
|
+
marginBottom={4}
|
|
62
|
+
/>
|
|
63
|
+
)}
|
|
64
|
+
</View>
|
|
65
|
+
</View>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
ToastMessage.displayName = "ToastMessage";
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* EXPORT
|
|
74
|
+
*/
|
|
75
|
+
export default asBaseComponent(ToastMessage);
|
|
@@ -210,7 +210,7 @@ const TravelHistory = forwardRef<any, ITravelHistory>((props, ref): React.ReactE
|
|
|
210
210
|
text={`${status ?? "ABERTA"}`}
|
|
211
211
|
size={theme.fontSizes.xs}
|
|
212
212
|
color={backgroundColor ?? theme.colors.black[180]}
|
|
213
|
-
fontFamily={theme.fonts.
|
|
213
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
214
214
|
/>
|
|
215
215
|
</Box>
|
|
216
216
|
|
|
@@ -223,16 +223,16 @@ const TravelHistory = forwardRef<any, ITravelHistory>((props, ref): React.ReactE
|
|
|
223
223
|
>
|
|
224
224
|
<Typography
|
|
225
225
|
style={{ flexShrink: 1 }}
|
|
226
|
-
text={`
|
|
226
|
+
text={`Próxima viagem: `}
|
|
227
227
|
size={theme.fontSizes.sm}
|
|
228
228
|
color={theme.colors.black[10]}
|
|
229
229
|
fontFamily={theme.fonts.inter_medium_500}
|
|
230
230
|
/>
|
|
231
231
|
<Typography
|
|
232
|
-
text={`${
|
|
232
|
+
text={`${nextTrip ?? "Não especificado"}`}
|
|
233
233
|
size={theme.fontSizes.xs}
|
|
234
234
|
color={backgroundColor ?? theme.colors.black[180]}
|
|
235
|
-
fontFamily={theme.fonts.
|
|
235
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
236
236
|
/>
|
|
237
237
|
</Box>
|
|
238
238
|
|
|
@@ -245,16 +245,16 @@ const TravelHistory = forwardRef<any, ITravelHistory>((props, ref): React.ReactE
|
|
|
245
245
|
>
|
|
246
246
|
<Typography
|
|
247
247
|
style={{ flexShrink: 1 }}
|
|
248
|
-
text={`
|
|
248
|
+
text={`Abastecimentos: `}
|
|
249
249
|
size={theme.fontSizes.sm}
|
|
250
250
|
color={theme.colors.black[10]}
|
|
251
251
|
fontFamily={theme.fonts.inter_medium_500}
|
|
252
252
|
/>
|
|
253
253
|
<Typography
|
|
254
|
-
text={`${
|
|
254
|
+
text={`${supply ?? "0"}`}
|
|
255
255
|
size={theme.fontSizes.xs}
|
|
256
256
|
color={backgroundColor ?? theme.colors.black[180]}
|
|
257
|
-
fontFamily={theme.fonts.
|
|
257
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
258
258
|
/>
|
|
259
259
|
</Box>
|
|
260
260
|
</Box>
|
|
@@ -1,193 +1,267 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React, {
|
|
5
|
-
import { View, TouchableOpacity, LayoutAnimation,
|
|
6
|
-
|
|
7
|
-
// components
|
|
8
|
-
import Box from "../../components/box";
|
|
9
|
-
import Typography from "../../components/typography";
|
|
10
|
-
|
|
11
|
-
// style
|
|
12
|
-
import { theme } from "../../styles/theme/theme";
|
|
13
|
-
import { Icons } from "../../common/icons-svg";
|
|
14
|
-
|
|
15
|
-
// typings
|
|
16
|
-
import type { ITripDetailsCard } from "./interface";
|
|
17
|
-
import { asBaseComponent } from "../../@types/as-base-component";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React, { useState } from "react";
|
|
5
|
+
import { View, TouchableOpacity, LayoutAnimation, Platform, UIManager } from "react-native";
|
|
6
|
+
|
|
7
|
+
// components
|
|
8
|
+
import Box from "../../components/box";
|
|
9
|
+
import Typography from "../../components/typography";
|
|
10
|
+
|
|
11
|
+
// style
|
|
12
|
+
import { theme } from "../../styles/theme/theme";
|
|
13
|
+
import { Icons } from "../../common/icons-svg";
|
|
14
|
+
|
|
15
|
+
// typings
|
|
16
|
+
import type { ITripDetailsCard } from "./interface";
|
|
17
|
+
import { asBaseComponent } from "../../@types/as-base-component";
|
|
18
|
+
|
|
19
|
+
// Ativa animação no Android
|
|
20
|
+
if (Platform.OS === "android" && UIManager.setLayoutAnimationEnabledExperimental) {
|
|
21
|
+
UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const TripDetailsCard: React.FC<ITripDetailsCard> = ({
|
|
25
|
+
dataRegistro,
|
|
26
|
+
numeroCte,
|
|
27
|
+
origem,
|
|
28
|
+
destino,
|
|
29
|
+
proximoCarregamento,
|
|
30
|
+
peso,
|
|
31
|
+
baseCalculo,
|
|
32
|
+
corBarra,
|
|
33
|
+
kmCarregado,
|
|
34
|
+
kmVazio,
|
|
35
|
+
}) => {
|
|
36
|
+
const [expanded, setExpanded] = useState(true);
|
|
37
|
+
|
|
38
|
+
const toggleExpand = () => {
|
|
39
|
+
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
40
|
+
setExpanded((prev) => !prev);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const formatPeso = (v?: number) =>
|
|
44
|
+
v === undefined || v === null ? "Não informado" : `${v.toLocaleString("pt-BR")} kg`;
|
|
45
|
+
|
|
46
|
+
const formatBase = (v?: number) =>
|
|
47
|
+
v === undefined || v === null ? "Não informado" : `R$ ${v.toLocaleString("pt-BR")}`;
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<Box
|
|
51
|
+
width={"100%"}
|
|
52
|
+
flexStyle={{ flexDirection: "row" }}
|
|
53
|
+
backgroundColor={theme.colors.neutral[25]}
|
|
54
|
+
borderStyled={{ borderRadius: theme.borderWidths.thick_medium }}
|
|
55
|
+
>
|
|
56
|
+
{/* faixa lateral */}
|
|
57
|
+
<View
|
|
58
|
+
style={{
|
|
59
|
+
width: 8,
|
|
60
|
+
backgroundColor: corBarra ?? theme.colors.orange[150],
|
|
61
|
+
borderTopLeftRadius: theme.borderWidths.thick_medium,
|
|
62
|
+
borderBottomLeftRadius: theme.borderWidths.thick_medium,
|
|
63
|
+
}}
|
|
64
|
+
/>
|
|
65
|
+
|
|
66
|
+
<Box flexStyle={{ flex: 1 }} paddingStyle={{ padding: theme.paddings["2xs"] }}>
|
|
67
|
+
<TouchableOpacity
|
|
68
|
+
onPress={toggleExpand}
|
|
69
|
+
activeOpacity={0.9}
|
|
70
|
+
accessibilityRole="button"
|
|
71
|
+
accessibilityLabel="Detalhes da viagem"
|
|
72
|
+
>
|
|
73
|
+
<Box
|
|
74
|
+
flexStyle={{
|
|
75
|
+
flexDirection: "row",
|
|
76
|
+
justifyContent: "space-between",
|
|
77
|
+
alignItems: "center",
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
<Typography
|
|
81
|
+
text="Detalhes da viagem"
|
|
82
|
+
color={theme.colors.black[25]}
|
|
83
|
+
fontFamily={theme.fonts.inter_bold}
|
|
84
|
+
size={theme.fontSizes.md}
|
|
85
|
+
/>
|
|
86
|
+
|
|
87
|
+
<Icons
|
|
88
|
+
icon={expanded ? "CHEVRON_UP" : "CHEVRON_DOWN"}
|
|
89
|
+
color={theme.colors.gray[700]}
|
|
90
|
+
size={20}
|
|
91
|
+
/>
|
|
92
|
+
</Box>
|
|
93
|
+
</TouchableOpacity>
|
|
94
|
+
|
|
95
|
+
{/* Bloco que será expandido/colapsado com animação */}
|
|
96
|
+
{expanded && (
|
|
97
|
+
<>
|
|
98
|
+
<Box
|
|
99
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
100
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
101
|
+
>
|
|
102
|
+
<Typography
|
|
103
|
+
text={"Número CTE: "}
|
|
104
|
+
color={theme.colors.black[25]}
|
|
105
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
106
|
+
size={theme.fontSizes.sm}
|
|
107
|
+
/>
|
|
108
|
+
<Typography
|
|
109
|
+
text={`${numeroCte || "Não informado"}`}
|
|
110
|
+
color={theme.colors.gray[700]}
|
|
111
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
112
|
+
size={theme.fontSizes.xs}
|
|
113
|
+
/>
|
|
114
|
+
</Box>
|
|
115
|
+
|
|
116
|
+
<Box
|
|
117
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
118
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
119
|
+
>
|
|
120
|
+
<Typography
|
|
121
|
+
text="Data carregamento: "
|
|
122
|
+
color={theme.colors.black[25]}
|
|
123
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
124
|
+
size={theme.fontSizes.sm}
|
|
125
|
+
/>
|
|
126
|
+
<Typography
|
|
127
|
+
text={`${dataRegistro || "Não informado"}`}
|
|
128
|
+
color={theme.colors.gray[700]}
|
|
129
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
130
|
+
size={theme.fontSizes.xs}
|
|
131
|
+
/>
|
|
132
|
+
</Box>
|
|
133
|
+
|
|
134
|
+
<Box
|
|
135
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
136
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
137
|
+
>
|
|
138
|
+
<Typography
|
|
139
|
+
text="Origem: "
|
|
140
|
+
color={theme.colors.black[25]}
|
|
141
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
142
|
+
size={theme.fontSizes.sm}
|
|
143
|
+
/>
|
|
144
|
+
<Typography
|
|
145
|
+
text={`${origem || "Não informado"}`}
|
|
146
|
+
color={theme.colors.gray[700]}
|
|
147
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
148
|
+
size={theme.fontSizes.xs}
|
|
149
|
+
/>
|
|
150
|
+
</Box>
|
|
151
|
+
|
|
152
|
+
<Box
|
|
153
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
154
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
155
|
+
>
|
|
156
|
+
<Typography
|
|
157
|
+
text="Destino: "
|
|
158
|
+
color={theme.colors.black[25]}
|
|
159
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
160
|
+
size={theme.fontSizes.xs}
|
|
161
|
+
/>
|
|
162
|
+
<Typography
|
|
163
|
+
text={`${destino || "Não informado"}`}
|
|
164
|
+
color={theme.colors.gray[700]}
|
|
165
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
166
|
+
size={theme.fontSizes.xs}
|
|
167
|
+
/>
|
|
168
|
+
</Box>
|
|
169
|
+
|
|
170
|
+
<Box
|
|
171
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
172
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
173
|
+
>
|
|
174
|
+
<Typography
|
|
175
|
+
text="Próximo carregamento: "
|
|
176
|
+
color={theme.colors.black[25]}
|
|
177
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
178
|
+
size={theme.fontSizes.xs}
|
|
179
|
+
/>
|
|
180
|
+
<Typography
|
|
181
|
+
text={`${proximoCarregamento || "Não informado"}`}
|
|
182
|
+
color={theme.colors.gray[700]}
|
|
183
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
184
|
+
size={theme.fontSizes.xs}
|
|
185
|
+
/>
|
|
186
|
+
</Box>
|
|
187
|
+
|
|
188
|
+
<Box
|
|
189
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
190
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
191
|
+
>
|
|
192
|
+
<Typography
|
|
193
|
+
text={"Peso: "}
|
|
194
|
+
color={theme.colors.black[25]}
|
|
195
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
196
|
+
size={theme.fontSizes.xs}
|
|
197
|
+
/>
|
|
198
|
+
<Typography
|
|
199
|
+
text={`${formatPeso(peso) || "Não informado"}`}
|
|
200
|
+
color={theme.colors.gray[700]}
|
|
201
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
202
|
+
size={theme.fontSizes.xs}
|
|
203
|
+
/>
|
|
204
|
+
</Box>
|
|
205
|
+
|
|
206
|
+
<Box
|
|
207
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
208
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
209
|
+
>
|
|
210
|
+
<Typography
|
|
211
|
+
text={"Km carregado: "}
|
|
212
|
+
color={theme.colors.black[25]}
|
|
213
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
214
|
+
size={theme.fontSizes.xs}
|
|
215
|
+
/>
|
|
216
|
+
<Typography
|
|
217
|
+
text={`${kmCarregado || "Não informado"}`}
|
|
218
|
+
color={theme.colors.gray[700]}
|
|
219
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
220
|
+
size={theme.fontSizes.xs}
|
|
221
|
+
/>
|
|
222
|
+
</Box>
|
|
223
|
+
|
|
224
|
+
<Box
|
|
225
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
226
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
227
|
+
>
|
|
228
|
+
<Typography
|
|
229
|
+
text={"Km vazio: "}
|
|
230
|
+
color={theme.colors.black[25]}
|
|
231
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
232
|
+
size={theme.fontSizes.xs}
|
|
233
|
+
/>
|
|
234
|
+
<Typography
|
|
235
|
+
text={`${kmVazio || "Não informado"}`}
|
|
236
|
+
color={theme.colors.gray[700]}
|
|
237
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
238
|
+
size={theme.fontSizes.xs}
|
|
239
|
+
/>
|
|
240
|
+
</Box>
|
|
241
|
+
|
|
242
|
+
<Box
|
|
243
|
+
marginStyle={{ marginTop: theme.margins["1xs"] }}
|
|
244
|
+
flexStyle={{ flexDirection: "row", justifyContent: "flex-start" }}
|
|
245
|
+
>
|
|
246
|
+
<Typography
|
|
247
|
+
text="Base para cálculo do PRO: "
|
|
248
|
+
color={theme.colors.black[25]}
|
|
249
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
250
|
+
size={theme.fontSizes.xs}
|
|
251
|
+
/>
|
|
252
|
+
<Typography
|
|
253
|
+
text={`${formatBase(baseCalculo) || "Não informado"}`}
|
|
254
|
+
color={theme.colors.gray[700]}
|
|
255
|
+
fontFamily={theme.fonts.inter_regular_400}
|
|
256
|
+
size={theme.fontSizes.xs}
|
|
257
|
+
/>
|
|
258
|
+
</Box>
|
|
259
|
+
</>
|
|
260
|
+
)}
|
|
261
|
+
</Box>
|
|
262
|
+
</Box>
|
|
263
|
+
);
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
TripDetailsCard.displayName = "TripDetailsCard";
|
|
267
|
+
export default asBaseComponent(TripDetailsCard);
|