@mrfylke/contact-form 0.1.3
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/lib/ContactFormRoot.d.ts +37 -0
- package/lib/ContactFormRoot.d.ts.map +1 -0
- package/lib/ContactFormRoot.js +53 -0
- package/lib/commoneEvents.d.ts +16 -0
- package/lib/commoneEvents.d.ts.map +1 -0
- package/lib/commoneEvents.js +4 -0
- package/lib/components/button/button.d.ts +17 -0
- package/lib/components/button/button.d.ts.map +1 -0
- package/lib/components/button/button.js +15 -0
- package/lib/components/button/button.module.css +399 -0
- package/lib/components/button/index.d.ts +5 -0
- package/lib/components/button/index.d.ts.map +1 -0
- package/lib/components/button/index.js +10 -0
- package/lib/components/button/link.d.ts +27 -0
- package/lib/components/button/link.d.ts.map +1 -0
- package/lib/components/button/link.js +19 -0
- package/lib/components/button/utils.d.ts +69 -0
- package/lib/components/button/utils.d.ts.map +1 -0
- package/lib/components/button/utils.js +33 -0
- package/lib/components/checkbox/checkbox.d.ts +13 -0
- package/lib/components/checkbox/checkbox.d.ts.map +1 -0
- package/lib/components/checkbox/checkbox.js +23 -0
- package/lib/components/checkbox/checkbox.module.css +96 -0
- package/lib/components/checkbox/index.d.ts +3 -0
- package/lib/components/checkbox/index.d.ts.map +1 -0
- package/lib/components/checkbox/index.js +8 -0
- package/lib/components/error-message/error-message.d.ts +6 -0
- package/lib/components/error-message/error-message.d.ts.map +1 -0
- package/lib/components/error-message/error-message.js +13 -0
- package/lib/components/error-message/error-message.module.css +6 -0
- package/lib/components/error-message/index.d.ts +3 -0
- package/lib/components/error-message/index.d.ts.map +1 -0
- package/lib/components/error-message/index.js +8 -0
- package/lib/components/external-link-page.d.ts +14 -0
- package/lib/components/external-link-page.d.ts.map +1 -0
- package/lib/components/external-link-page.js +27 -0
- package/lib/components/external-link-page.module.css +29 -0
- package/lib/components/form/date-selector.d.ts +11 -0
- package/lib/components/form/date-selector.d.ts.map +1 -0
- package/lib/components/form/date-selector.js +21 -0
- package/lib/components/form/description-modal.d.ts +13 -0
- package/lib/components/form/description-modal.d.ts.map +1 -0
- package/lib/components/form/description-modal.js +43 -0
- package/lib/components/form/field-wrapper-with-error/index.d.ts +8 -0
- package/lib/components/form/field-wrapper-with-error/index.d.ts.map +1 -0
- package/lib/components/form/field-wrapper-with-error/index.js +12 -0
- package/lib/components/form/fieldset/fieldset.module.css +26 -0
- package/lib/components/form/fieldset/index.d.ts +8 -0
- package/lib/components/form/fieldset/index.d.ts.map +1 -0
- package/lib/components/form/fieldset/index.js +17 -0
- package/lib/components/form/file-input.d.ts +10 -0
- package/lib/components/form/file-input.d.ts.map +1 -0
- package/lib/components/form/file-input.js +68 -0
- package/lib/components/form/form-component-label/form-component-label.module.css +10 -0
- package/lib/components/form/form-component-label/index.d.ts +9 -0
- package/lib/components/form/form-component-label/index.d.ts.map +1 -0
- package/lib/components/form/form-component-label/index.js +18 -0
- package/lib/components/form/form.module.css +573 -0
- package/lib/components/form/index.d.ts +11 -0
- package/lib/components/form/index.d.ts.map +1 -0
- package/lib/components/form/index.js +28 -0
- package/lib/components/form/input.d.ts +17 -0
- package/lib/components/form/input.d.ts.map +1 -0
- package/lib/components/form/input.js +42 -0
- package/lib/components/form/radio.d.ts +7 -0
- package/lib/components/form/radio.d.ts.map +1 -0
- package/lib/components/form/radio.js +14 -0
- package/lib/components/form/searchable-select/index.d.ts +3 -0
- package/lib/components/form/searchable-select/index.d.ts.map +1 -0
- package/lib/components/form/searchable-select/index.js +11 -0
- package/lib/components/form/searchable-select/searchable-select.d.ts +18 -0
- package/lib/components/form/searchable-select/searchable-select.d.ts.map +1 -0
- package/lib/components/form/searchable-select/searchable-select.js +55 -0
- package/lib/components/form/searchable-select/utils.d.ts +5 -0
- package/lib/components/form/searchable-select/utils.d.ts.map +1 -0
- package/lib/components/form/searchable-select/utils.js +19 -0
- package/lib/components/form/select.d.ts +15 -0
- package/lib/components/form/select.d.ts.map +1 -0
- package/lib/components/form/select.js +22 -0
- package/lib/components/form/textarea.d.ts +11 -0
- package/lib/components/form/textarea.d.ts.map +1 -0
- package/lib/components/form/textarea.js +17 -0
- package/lib/components/form/time-selector.d.ts +11 -0
- package/lib/components/form/time-selector.d.ts.map +1 -0
- package/lib/components/form/time-selector.js +22 -0
- package/lib/components/icon/checkbox-icon.d.ts +14 -0
- package/lib/components/icon/checkbox-icon.d.ts.map +1 -0
- package/lib/components/icon/checkbox-icon.js +18 -0
- package/lib/components/icon/color-icon.d.ts +17 -0
- package/lib/components/icon/color-icon.d.ts.map +1 -0
- package/lib/components/icon/color-icon.js +27 -0
- package/lib/components/icon/generated-icons.d.ts +1797 -0
- package/lib/components/icon/generated-icons.d.ts.map +1 -0
- package/lib/components/icon/generated-icons.js +1782 -0
- package/lib/components/icon/icon-wrapper.d.ts +30 -0
- package/lib/components/icon/icon-wrapper.d.ts.map +1 -0
- package/lib/components/icon/icon-wrapper.js +39 -0
- package/lib/components/icon/illustration.d.ts +7 -0
- package/lib/components/icon/illustration.d.ts.map +1 -0
- package/lib/components/icon/illustration.js +25 -0
- package/lib/components/icon/image.d.ts +7 -0
- package/lib/components/icon/image.d.ts.map +1 -0
- package/lib/components/icon/image.js +26 -0
- package/lib/components/icon/index.d.ts +6 -0
- package/lib/components/icon/index.d.ts.map +1 -0
- package/lib/components/icon/index.js +20 -0
- package/lib/components/icon/mono-icon-new.d.ts +32 -0
- package/lib/components/icon/mono-icon-new.d.ts.map +1 -0
- package/lib/components/icon/mono-icon-new.js +43 -0
- package/lib/components/icon/mono-icon.d.ts +29 -0
- package/lib/components/icon/mono-icon.d.ts.map +1 -0
- package/lib/components/icon/mono-icon.js +39 -0
- package/lib/components/icon/utils.d.ts +3 -0
- package/lib/components/icon/utils.d.ts.map +1 -0
- package/lib/components/icon/utils.js +12 -0
- package/lib/components/index.d.ts +3 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +18 -0
- package/lib/components/loading/index.d.ts +15 -0
- package/lib/components/loading/index.d.ts.map +1 -0
- package/lib/components/loading/index.js +19 -0
- package/lib/components/loading/loading.module.css +17 -0
- package/lib/components/section-card/index.d.ts +2 -0
- package/lib/components/section-card/index.d.ts.map +1 -0
- package/lib/components/section-card/index.js +8 -0
- package/lib/components/section-card/section-card.d.ts +7 -0
- package/lib/components/section-card/section-card.d.ts.map +1 -0
- package/lib/components/section-card/section-card.js +14 -0
- package/lib/components/section-card/section-card.module.css +15 -0
- package/lib/components/typography/index.d.ts +19 -0
- package/lib/components/typography/index.d.ts.map +1 -0
- package/lib/components/typography/index.js +27 -0
- package/lib/components/typography/utils.d.ts +2 -0
- package/lib/components/typography/utils.d.ts.map +1 -0
- package/lib/components/typography/utils.js +4 -0
- package/lib/contact.module.css +76 -0
- package/lib/error-content/error-content.d.ts +2 -0
- package/lib/error-content/error-content.d.ts.map +1 -0
- package/lib/error-content/error-content.js +19 -0
- package/lib/error-content/error-content.module.css +11 -0
- package/lib/group-travel/index.d.ts +2 -0
- package/lib/group-travel/index.d.ts.map +1 -0
- package/lib/group-travel/index.js +15 -0
- package/lib/index.d.ts +25 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +73 -0
- package/lib/journey-info/events.d.ts +14 -0
- package/lib/journey-info/events.d.ts.map +1 -0
- package/lib/journey-info/events.js +5 -0
- package/lib/journey-info/index.d.ts +2 -0
- package/lib/journey-info/index.d.ts.map +1 -0
- package/lib/journey-info/index.js +66 -0
- package/lib/journey-info/journeyInfoStateMachine.d.ts +179 -0
- package/lib/journey-info/journeyInfoStateMachine.d.ts.map +1 -0
- package/lib/journey-info/journeyInfoStateMachine.js +160 -0
- package/lib/layouts/contact-form-container.d.ts +10 -0
- package/lib/layouts/contact-form-container.d.ts.map +1 -0
- package/lib/layouts/contact-form-container.js +12 -0
- package/lib/layouts/contact-form-footer.d.ts +5 -0
- package/lib/layouts/contact-form-footer.d.ts.map +1 -0
- package/lib/layouts/contact-form-footer.js +59 -0
- package/lib/layouts/contact-form-header.d.ts +9 -0
- package/lib/layouts/contact-form-header.d.ts.map +1 -0
- package/lib/layouts/contact-form-header.js +45 -0
- package/lib/layouts/contact-page-layout.d.ts +24 -0
- package/lib/layouts/contact-page-layout.d.ts.map +1 -0
- package/lib/layouts/contact-page-layout.js +104 -0
- package/lib/layouts/container.module.css +15 -0
- package/lib/layouts/footer.module.css +109 -0
- package/lib/layouts/header.module.css +39 -0
- package/lib/layouts/index.d.ts +3 -0
- package/lib/layouts/index.d.ts.map +1 -0
- package/lib/layouts/index.js +11 -0
- package/lib/layouts/layout.module.css +80 -0
- package/lib/lines/use-lines.d.ts +25 -0
- package/lib/lines/use-lines.d.ts.map +1 -0
- package/lib/lines/use-lines.js +77 -0
- package/lib/lost-property/index.d.ts +2 -0
- package/lib/lost-property/index.d.ts.map +1 -0
- package/lib/lost-property/index.js +11 -0
- package/lib/means-of-transport/events.d.ts +17 -0
- package/lib/means-of-transport/events.d.ts.map +1 -0
- package/lib/means-of-transport/events.js +5 -0
- package/lib/means-of-transport/forms/delayForm.d.ts +11 -0
- package/lib/means-of-transport/forms/delayForm.d.ts.map +1 -0
- package/lib/means-of-transport/forms/delayForm.js +88 -0
- package/lib/means-of-transport/forms/driverForm.d.ts +11 -0
- package/lib/means-of-transport/forms/driverForm.d.ts.map +1 -0
- package/lib/means-of-transport/forms/driverForm.js +88 -0
- package/lib/means-of-transport/forms/index.d.ts +7 -0
- package/lib/means-of-transport/forms/index.d.ts.map +1 -0
- package/lib/means-of-transport/forms/index.js +18 -0
- package/lib/means-of-transport/forms/injuryForm.d.ts +11 -0
- package/lib/means-of-transport/forms/injuryForm.d.ts.map +1 -0
- package/lib/means-of-transport/forms/injuryForm.js +88 -0
- package/lib/means-of-transport/forms/serviceOfferingForm.d.ts +11 -0
- package/lib/means-of-transport/forms/serviceOfferingForm.d.ts.map +1 -0
- package/lib/means-of-transport/forms/serviceOfferingForm.js +64 -0
- package/lib/means-of-transport/forms/stopForm.d.ts +11 -0
- package/lib/means-of-transport/forms/stopForm.d.ts.map +1 -0
- package/lib/means-of-transport/forms/stopForm.js +76 -0
- package/lib/means-of-transport/forms/transportationForm.d.ts +11 -0
- package/lib/means-of-transport/forms/transportationForm.d.ts.map +1 -0
- package/lib/means-of-transport/forms/transportationForm.js +88 -0
- package/lib/means-of-transport/index.d.ts +3 -0
- package/lib/means-of-transport/index.d.ts.map +1 -0
- package/lib/means-of-transport/index.js +47 -0
- package/lib/means-of-transport/means-of-transport-form-machine.d.ts +291 -0
- package/lib/means-of-transport/means-of-transport-form-machine.d.ts.map +1 -0
- package/lib/means-of-transport/means-of-transport-form-machine.js +287 -0
- package/lib/modules/api-browser/index.d.ts +8 -0
- package/lib/modules/api-browser/index.d.ts.map +1 -0
- package/lib/modules/api-browser/index.js +54 -0
- package/lib/modules/api-server/external-client.d.ts +22 -0
- package/lib/modules/api-server/external-client.d.ts.map +1 -0
- package/lib/modules/api-server/external-client.js +86 -0
- package/lib/modules/api-server/index.d.ts +9 -0
- package/lib/modules/api-server/index.d.ts.map +1 -0
- package/lib/modules/api-server/index.js +24 -0
- package/lib/modules/api-server/requesters/graphql-requester.d.ts +6 -0
- package/lib/modules/api-server/requesters/graphql-requester.d.ts.map +1 -0
- package/lib/modules/api-server/requesters/graphql-requester.js +63 -0
- package/lib/modules/api-server/requesters/http-requester.d.ts +3 -0
- package/lib/modules/api-server/requesters/http-requester.d.ts.map +1 -0
- package/lib/modules/api-server/requesters/http-requester.js +110 -0
- package/lib/modules/api-server/requesters/types.d.ts +37 -0
- package/lib/modules/api-server/requesters/types.d.ts.map +1 -0
- package/lib/modules/api-server/requesters/types.js +34 -0
- package/lib/modules/api-server/requesters/utils.d.ts +17 -0
- package/lib/modules/api-server/requesters/utils.d.ts.map +1 -0
- package/lib/modules/api-server/requesters/utils.js +75 -0
- package/lib/modules/config/context.d.ts +54 -0
- package/lib/modules/config/context.d.ts.map +1 -0
- package/lib/modules/config/context.js +112 -0
- package/lib/modules/config/index.d.ts +4 -0
- package/lib/modules/config/index.d.ts.map +1 -0
- package/lib/modules/config/index.js +19 -0
- package/lib/modules/config/theme-adapter.d.ts +20 -0
- package/lib/modules/config/theme-adapter.d.ts.map +1 -0
- package/lib/modules/config/theme-adapter.js +56 -0
- package/lib/modules/config/types.d.ts +348 -0
- package/lib/modules/config/types.d.ts.map +1 -0
- package/lib/modules/config/types.js +6 -0
- package/lib/modules/cookies/constants.d.ts +4 -0
- package/lib/modules/cookies/constants.d.ts.map +1 -0
- package/lib/modules/cookies/constants.js +6 -0
- package/lib/modules/cookies/cookies-context.d.ts +17 -0
- package/lib/modules/cookies/cookies-context.d.ts.map +1 -0
- package/lib/modules/cookies/cookies-context.js +61 -0
- package/lib/modules/cookies/index.d.ts +15 -0
- package/lib/modules/cookies/index.d.ts.map +1 -0
- package/lib/modules/cookies/index.js +22 -0
- package/lib/modules/firebase/analytics.d.ts +3 -0
- package/lib/modules/firebase/analytics.d.ts.map +1 -0
- package/lib/modules/firebase/analytics.js +40 -0
- package/lib/modules/firebase/firebase.d.ts +4 -0
- package/lib/modules/firebase/firebase.d.ts.map +1 -0
- package/lib/modules/firebase/firebase.js +19 -0
- package/lib/modules/firebase/index.d.ts +5 -0
- package/lib/modules/firebase/index.d.ts.map +1 -0
- package/lib/modules/firebase/index.js +25 -0
- package/lib/modules/firebase/preassigned-fare-products.d.ts +8 -0
- package/lib/modules/firebase/preassigned-fare-products.d.ts.map +1 -0
- package/lib/modules/firebase/preassigned-fare-products.js +35 -0
- package/lib/modules/firebase/tariff-zones.d.ts +17 -0
- package/lib/modules/firebase/tariff-zones.d.ts.map +1 -0
- package/lib/modules/firebase/tariff-zones.js +32 -0
- package/lib/modules/firebase/transport-mode-filter.d.ts +27 -0
- package/lib/modules/firebase/transport-mode-filter.d.ts.map +1 -0
- package/lib/modules/firebase/transport-mode-filter.js +27 -0
- package/lib/modules/firebase/types.d.ts +19 -0
- package/lib/modules/firebase/types.d.ts.map +1 -0
- package/lib/modules/firebase/types.js +15 -0
- package/lib/modules/graphql-types/index.d.ts +1998 -0
- package/lib/modules/graphql-types/index.d.ts.map +1 -0
- package/lib/modules/graphql-types/index.js +442 -0
- package/lib/modules/graphql-types/journeyplanner-types_v3.generated.d.ts +2419 -0
- package/lib/modules/graphql-types/journeyplanner-types_v3.generated.d.ts.map +1 -0
- package/lib/modules/graphql-types/journeyplanner-types_v3.generated.js +524 -0
- package/lib/modules/logging/index.d.ts +6 -0
- package/lib/modules/logging/index.d.ts.map +1 -0
- package/lib/modules/logging/index.js +13 -0
- package/lib/modules/logging/log-api-response.d.ts +15 -0
- package/lib/modules/logging/log-api-response.d.ts.map +1 -0
- package/lib/modules/logging/log-api-response.js +52 -0
- package/lib/modules/logging/log-page-access.d.ts +20 -0
- package/lib/modules/logging/log-page-access.d.ts.map +1 -0
- package/lib/modules/logging/log-page-access.js +60 -0
- package/lib/modules/logging/logger.d.ts +3 -0
- package/lib/modules/logging/logger.d.ts.map +1 -0
- package/lib/modules/logging/logger.js +32 -0
- package/lib/modules/logging/timer.d.ts +6 -0
- package/lib/modules/logging/timer.d.ts.map +1 -0
- package/lib/modules/logging/timer.js +13 -0
- package/lib/modules/logging/with-access-logging.d.ts +5 -0
- package/lib/modules/logging/with-access-logging.d.ts.map +1 -0
- package/lib/modules/logging/with-access-logging.js +20 -0
- package/lib/modules/org-data/compat-layer.d.ts +8 -0
- package/lib/modules/org-data/compat-layer.d.ts.map +1 -0
- package/lib/modules/org-data/compat-layer.js +8 -0
- package/lib/modules/org-data/index.d.ts +12 -0
- package/lib/modules/org-data/index.d.ts.map +1 -0
- package/lib/modules/org-data/index.js +27 -0
- package/lib/modules/theme/index.d.ts +3 -0
- package/lib/modules/theme/index.d.ts.map +1 -0
- package/lib/modules/theme/index.js +9 -0
- package/lib/modules/theme/theme-context.d.ts +43 -0
- package/lib/modules/theme/theme-context.d.ts.map +1 -0
- package/lib/modules/theme/theme-context.js +73 -0
- package/lib/modules/transport-mode/filter/filter.d.ts +9 -0
- package/lib/modules/transport-mode/filter/filter.d.ts.map +1 -0
- package/lib/modules/transport-mode/filter/filter.js +64 -0
- package/lib/modules/transport-mode/filter/filter.module.css +98 -0
- package/lib/modules/transport-mode/filter/index.d.ts +3 -0
- package/lib/modules/transport-mode/filter/index.d.ts.map +1 -0
- package/lib/modules/transport-mode/filter/index.js +11 -0
- package/lib/modules/transport-mode/filter/types.d.ts +2 -0
- package/lib/modules/transport-mode/filter/types.d.ts.map +1 -0
- package/lib/modules/transport-mode/filter/types.js +2 -0
- package/lib/modules/transport-mode/filter/utils.d.ts +9 -0
- package/lib/modules/transport-mode/filter/utils.d.ts.map +1 -0
- package/lib/modules/transport-mode/filter/utils.js +21 -0
- package/lib/modules/transport-mode/icon/icon.module.css +33 -0
- package/lib/modules/transport-mode/icon/index.d.ts +29 -0
- package/lib/modules/transport-mode/icon/index.d.ts.map +1 -0
- package/lib/modules/transport-mode/icon/index.js +116 -0
- package/lib/modules/transport-mode/icon/transport-icon-new.d.ts +28 -0
- package/lib/modules/transport-mode/icon/transport-icon-new.d.ts.map +1 -0
- package/lib/modules/transport-mode/icon/transport-icon-new.js +114 -0
- package/lib/modules/transport-mode/index.d.ts +5 -0
- package/lib/modules/transport-mode/index.d.ts.map +1 -0
- package/lib/modules/transport-mode/index.js +29 -0
- package/lib/modules/transport-mode/types.d.ts +10 -0
- package/lib/modules/transport-mode/types.d.ts.map +1 -0
- package/lib/modules/transport-mode/types.js +141 -0
- package/lib/modules/transport-mode/utils.d.ts +9 -0
- package/lib/modules/transport-mode/utils.d.ts.map +1 -0
- package/lib/modules/transport-mode/utils.js +53 -0
- package/lib/refund/events.d.ts +32 -0
- package/lib/refund/events.d.ts.map +1 -0
- package/lib/refund/events.js +5 -0
- package/lib/refund/forms/refund-and-travel-guarantee/index.d.ts +10 -0
- package/lib/refund/forms/refund-and-travel-guarantee/index.d.ts.map +1 -0
- package/lib/refund/forms/refund-and-travel-guarantee/index.js +37 -0
- package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.d.ts +11 -0
- package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.d.ts.map +1 -0
- package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.js +133 -0
- package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.d.ts +11 -0
- package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.d.ts.map +1 -0
- package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.js +133 -0
- package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts +12 -0
- package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts.map +1 -0
- package/lib/refund/forms/refund-ticket/appTicketRefund.js +82 -0
- package/lib/refund/forms/refund-ticket/index.d.ts +10 -0
- package/lib/refund/forms/refund-ticket/index.d.ts.map +1 -0
- package/lib/refund/forms/refund-ticket/index.js +38 -0
- package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts +11 -0
- package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts.map +1 -0
- package/lib/refund/forms/refund-ticket/otherTicketRefund.js +109 -0
- package/lib/refund/forms/residualValueOnTravelCard/index.d.ts +2 -0
- package/lib/refund/forms/residualValueOnTravelCard/index.d.ts.map +1 -0
- package/lib/refund/forms/residualValueOnTravelCard/index.js +19 -0
- package/lib/refund/index.d.ts +3 -0
- package/lib/refund/index.d.ts.map +1 -0
- package/lib/refund/index.js +50 -0
- package/lib/refund/refundFormMachine.d.ts +406 -0
- package/lib/refund/refundFormMachine.d.ts.map +1 -0
- package/lib/refund/refundFormMachine.js +404 -0
- package/lib/server/contact/index.d.ts +11 -0
- package/lib/server/contact/index.d.ts.map +1 -0
- package/lib/server/contact/index.js +47 -0
- package/lib/server/index.d.ts +9 -0
- package/lib/server/index.d.ts.map +1 -0
- package/lib/server/index.js +14 -0
- package/lib/server/journey-planner/authority.d.ts +26 -0
- package/lib/server/journey-planner/authority.d.ts.map +1 -0
- package/lib/server/journey-planner/authority.js +48 -0
- package/lib/server/journey-planner/entur-client.d.ts +7 -0
- package/lib/server/journey-planner/entur-client.d.ts.map +1 -0
- package/lib/server/journey-planner/entur-client.js +46 -0
- package/lib/server/journey-planner/index.d.ts +11 -0
- package/lib/server/journey-planner/index.d.ts.map +1 -0
- package/lib/server/journey-planner/index.js +63 -0
- package/lib/server/journey-planner/journey-gql/lines.generated.d.ts +25 -0
- package/lib/server/journey-planner/journey-gql/lines.generated.d.ts.map +1 -0
- package/lib/server/journey-planner/journey-gql/lines.generated.js +30 -0
- package/lib/server/journey-planner/validators.d.ts +25 -0
- package/lib/server/journey-planner/validators.d.ts.map +1 -0
- package/lib/server/journey-planner/validators.js +17 -0
- package/lib/server/types.d.ts +5 -0
- package/lib/server/types.d.ts.map +1 -0
- package/lib/server/types.js +2 -0
- package/lib/success-content/success-content.d.ts +2 -0
- package/lib/success-content/success-content.d.ts.map +1 -0
- package/lib/success-content/success-content.js +19 -0
- package/lib/success-content/success-content.module.css +11 -0
- package/lib/ticket-control/events.d.ts +16 -0
- package/lib/ticket-control/events.d.ts.map +1 -0
- package/lib/ticket-control/events.js +5 -0
- package/lib/ticket-control/forms/feeComplaintForm.d.ts +11 -0
- package/lib/ticket-control/forms/feeComplaintForm.d.ts.map +1 -0
- package/lib/ticket-control/forms/feeComplaintForm.js +130 -0
- package/lib/ticket-control/forms/feedbackForm.d.ts +11 -0
- package/lib/ticket-control/forms/feedbackForm.d.ts.map +1 -0
- package/lib/ticket-control/forms/feedbackForm.js +75 -0
- package/lib/ticket-control/forms/postponePayment.d.ts +11 -0
- package/lib/ticket-control/forms/postponePayment.d.ts.map +1 -0
- package/lib/ticket-control/forms/postponePayment.js +37 -0
- package/lib/ticket-control/index.d.ts +3 -0
- package/lib/ticket-control/index.d.ts.map +1 -0
- package/lib/ticket-control/index.js +53 -0
- package/lib/ticket-control/ticket-control-form-machine.d.ts +277 -0
- package/lib/ticket-control/ticket-control-form-machine.d.ts.map +1 -0
- package/lib/ticket-control/ticket-control-form-machine.js +262 -0
- package/lib/ticketing/events.d.ts +28 -0
- package/lib/ticketing/events.d.ts.map +1 -0
- package/lib/ticketing/events.js +5 -0
- package/lib/ticketing/forms/app/appAccountForm.d.ts +11 -0
- package/lib/ticketing/forms/app/appAccountForm.d.ts.map +1 -0
- package/lib/ticketing/forms/app/appAccountForm.js +51 -0
- package/lib/ticketing/forms/app/appTicketingForm.d.ts +11 -0
- package/lib/ticketing/forms/app/appTicketingForm.d.ts.map +1 -0
- package/lib/ticketing/forms/app/appTicketingForm.js +59 -0
- package/lib/ticketing/forms/app/appTravelSuggestionForm.d.ts +11 -0
- package/lib/ticketing/forms/app/appTravelSuggestionForm.d.ts.map +1 -0
- package/lib/ticketing/forms/app/appTravelSuggestionForm.js +41 -0
- package/lib/ticketing/forms/app/index.d.ts +10 -0
- package/lib/ticketing/forms/app/index.d.ts.map +1 -0
- package/lib/ticketing/forms/app/index.js +23 -0
- package/lib/ticketing/forms/priceAndTicketTypesForm.d.ts +11 -0
- package/lib/ticketing/forms/priceAndTicketTypesForm.d.ts.map +1 -0
- package/lib/ticketing/forms/priceAndTicketTypesForm.js +41 -0
- package/lib/ticketing/forms/travel-card/index.d.ts +10 -0
- package/lib/ticketing/forms/travel-card/index.d.ts.map +1 -0
- package/lib/ticketing/forms/travel-card/index.js +24 -0
- package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts +3 -0
- package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts.map +1 -0
- package/lib/ticketing/forms/travel-card/orderTravelCard.js +21 -0
- package/lib/ticketing/forms/travel-card/travelCardQuestionForm.d.ts +11 -0
- package/lib/ticketing/forms/travel-card/travelCardQuestionForm.d.ts.map +1 -0
- package/lib/ticketing/forms/travel-card/travelCardQuestionForm.js +52 -0
- package/lib/ticketing/forms/webshop/index.d.ts +10 -0
- package/lib/ticketing/forms/webshop/index.d.ts.map +1 -0
- package/lib/ticketing/forms/webshop/index.js +22 -0
- package/lib/ticketing/forms/webshop/webshopAccountForm.d.ts +11 -0
- package/lib/ticketing/forms/webshop/webshopAccountForm.d.ts.map +1 -0
- package/lib/ticketing/forms/webshop/webshopAccountForm.js +51 -0
- package/lib/ticketing/forms/webshop/webshopTicketingForm.d.ts +11 -0
- package/lib/ticketing/forms/webshop/webshopTicketingForm.d.ts.map +1 -0
- package/lib/ticketing/forms/webshop/webshopTicketingForm.js +58 -0
- package/lib/ticketing/index.d.ts +3 -0
- package/lib/ticketing/index.d.ts.map +1 -0
- package/lib/ticketing/index.js +52 -0
- package/lib/ticketing/ticketingStateMachine.d.ts +438 -0
- package/lib/ticketing/ticketingStateMachine.d.ts.map +1 -0
- package/lib/ticketing/ticketingStateMachine.js +435 -0
- package/lib/translations/__tests__/utils.test.d.ts +2 -0
- package/lib/translations/__tests__/utils.test.d.ts.map +1 -0
- package/lib/translations/__tests__/utils.test.js +35 -0
- package/lib/translations/common/index.d.ts +3 -0
- package/lib/translations/common/index.d.ts.map +1 -0
- package/lib/translations/common/index.js +7 -0
- package/lib/translations/common/layout.d.ts +8 -0
- package/lib/translations/common/layout.d.ts.map +1 -0
- package/lib/translations/common/layout.js +39 -0
- package/lib/translations/common/titles.d.ts +4 -0
- package/lib/translations/common/titles.d.ts.map +1 -0
- package/lib/translations/common/titles.js +25 -0
- package/lib/translations/commons.d.ts +21 -0
- package/lib/translations/commons.d.ts.map +1 -0
- package/lib/translations/commons.js +39 -0
- package/lib/translations/components/clear-button.d.ts +4 -0
- package/lib/translations/components/clear-button.d.ts.map +1 -0
- package/lib/translations/components/clear-button.js +7 -0
- package/lib/translations/components/departure-date-selector.d.ts +8 -0
- package/lib/translations/components/departure-date-selector.d.ts.map +1 -0
- package/lib/translations/components/departure-date-selector.js +11 -0
- package/lib/translations/components/departure-time.d.ts +8 -0
- package/lib/translations/components/departure-time.d.ts.map +1 -0
- package/lib/translations/components/departure-time.js +11 -0
- package/lib/translations/components/empty-search.d.ts +18 -0
- package/lib/translations/components/empty-search.d.ts.map +1 -0
- package/lib/translations/components/empty-search.js +21 -0
- package/lib/translations/components/geolocation-button.d.ts +10 -0
- package/lib/translations/components/geolocation-button.d.ts.map +1 -0
- package/lib/translations/components/geolocation-button.js +13 -0
- package/lib/translations/components/index.d.ts +14 -0
- package/lib/translations/components/index.d.ts.map +1 -0
- package/lib/translations/components/index.js +29 -0
- package/lib/translations/components/loading.d.ts +4 -0
- package/lib/translations/components/loading.d.ts.map +1 -0
- package/lib/translations/components/loading.js +7 -0
- package/lib/translations/components/map.d.ts +19 -0
- package/lib/translations/components/map.d.ts.map +1 -0
- package/lib/translations/components/map.js +22 -0
- package/lib/translations/components/search.d.ts +9 -0
- package/lib/translations/components/search.d.ts.map +1 -0
- package/lib/translations/components/search.js +12 -0
- package/lib/translations/components/swap-button.d.ts +4 -0
- package/lib/translations/components/swap-button.d.ts.map +1 -0
- package/lib/translations/components/swap-button.js +7 -0
- package/lib/translations/components/tab-link.d.ts +5 -0
- package/lib/translations/components/tab-link.d.ts.map +1 -0
- package/lib/translations/components/tab-link.js +8 -0
- package/lib/translations/components/transport-mode-filter.d.ts +6 -0
- package/lib/translations/components/transport-mode-filter.d.ts.map +1 -0
- package/lib/translations/components/transport-mode-filter.js +9 -0
- package/lib/translations/components/transport-mode.d.ts +3 -0
- package/lib/translations/components/transport-mode.d.ts.map +1 -0
- package/lib/translations/components/transport-mode.js +28 -0
- package/lib/translations/components/venue-icon.d.ts +9 -0
- package/lib/translations/components/venue-icon.d.ts.map +1 -0
- package/lib/translations/components/venue-icon.js +12 -0
- package/lib/translations/dictionary.d.ts +33 -0
- package/lib/translations/dictionary.d.ts.map +1 -0
- package/lib/translations/dictionary.js +59 -0
- package/lib/translations/index.d.ts +16 -0
- package/lib/translations/index.d.ts.map +1 -0
- package/lib/translations/index.js +65 -0
- package/lib/translations/json-to-override.d.ts +19 -0
- package/lib/translations/json-to-override.d.ts.map +1 -0
- package/lib/translations/json-to-override.js +61 -0
- package/lib/translations/language-context.d.ts +37 -0
- package/lib/translations/language-context.d.ts.map +1 -0
- package/lib/translations/language-context.js +98 -0
- package/lib/translations/load-org-translations.d.ts +19 -0
- package/lib/translations/load-org-translations.d.ts.map +1 -0
- package/lib/translations/load-org-translations.js +23 -0
- package/lib/translations/merge-overrides.d.ts +28 -0
- package/lib/translations/merge-overrides.d.ts.map +1 -0
- package/lib/translations/merge-overrides.js +126 -0
- package/lib/translations/modules/index.d.ts +4 -0
- package/lib/translations/modules/index.d.ts.map +1 -0
- package/lib/translations/modules/index.js +9 -0
- package/lib/translations/modules/layout.d.ts +73 -0
- package/lib/translations/modules/layout.d.ts.map +1 -0
- package/lib/translations/modules/layout.js +106 -0
- package/lib/translations/modules/search-time.d.ts +8 -0
- package/lib/translations/modules/search-time.d.ts.map +1 -0
- package/lib/translations/modules/search-time.js +11 -0
- package/lib/translations/modules/situation.d.ts +8 -0
- package/lib/translations/modules/situation.d.ts.map +1 -0
- package/lib/translations/modules/situation.js +11 -0
- package/lib/translations/pages/assistant.d.ts +2 -0
- package/lib/translations/pages/assistant.d.ts.map +1 -0
- package/lib/translations/pages/assistant.js +303 -0
- package/lib/translations/pages/contact.d.ts +589 -0
- package/lib/translations/pages/contact.d.ts.map +1 -0
- package/lib/translations/pages/contact.js +679 -0
- package/lib/translations/pages/departures.d.ts +64 -0
- package/lib/translations/pages/departures.d.ts.map +1 -0
- package/lib/translations/pages/departures.js +75 -0
- package/lib/translations/pages/error.d.ts +8 -0
- package/lib/translations/pages/error.d.ts.map +1 -0
- package/lib/translations/pages/error.js +11 -0
- package/lib/translations/pages/index.d.ts +4 -0
- package/lib/translations/pages/index.d.ts.map +1 -0
- package/lib/translations/pages/index.js +9 -0
- package/lib/translations/server/endpoints.d.ts +67 -0
- package/lib/translations/server/endpoints.d.ts.map +1 -0
- package/lib/translations/server/endpoints.js +146 -0
- package/lib/translations/server/index.d.ts +2 -0
- package/lib/translations/server/index.d.ts.map +1 -0
- package/lib/translations/server/index.js +5 -0
- package/lib/translations/translations-context.d.ts +10 -0
- package/lib/translations/translations-context.d.ts.map +1 -0
- package/lib/translations/translations-context.js +20 -0
- package/lib/translations/types.d.ts +41 -0
- package/lib/translations/types.d.ts.map +1 -0
- package/lib/translations/types.js +24 -0
- package/lib/translations/utils.d.ts +16 -0
- package/lib/translations/utils.d.ts.map +1 -0
- package/lib/translations/utils.js +56 -0
- package/lib/types/submit-payloads.d.ts +119 -0
- package/lib/types/submit-payloads.d.ts.map +1 -0
- package/lib/types/submit-payloads.js +7 -0
- package/lib/types.d.ts +20 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +12 -0
- package/lib/utils/color.d.ts +2 -0
- package/lib/utils/color.d.ts.map +1 -0
- package/lib/utils/color.js +50 -0
- package/lib/utils/css.d.ts +3 -0
- package/lib/utils/css.d.ts.map +1 -0
- package/lib/utils/css.js +15 -0
- package/lib/utils/date.d.ts +4 -0
- package/lib/utils/date.d.ts.map +1 -0
- package/lib/utils/date.js +21 -0
- package/lib/utils/enum-from-string.d.ts +4 -0
- package/lib/utils/enum-from-string.d.ts.map +1 -0
- package/lib/utils/enum-from-string.js +9 -0
- package/lib/utils/env.d.ts +10 -0
- package/lib/utils/env.d.ts.map +1 -0
- package/lib/utils/env.js +49 -0
- package/lib/utils/only-uniques.d.ts +3 -0
- package/lib/utils/only-uniques.d.ts.map +1 -0
- package/lib/utils/only-uniques.js +7 -0
- package/lib/utils/org-theme-definitions.d.ts +5 -0
- package/lib/utils/org-theme-definitions.d.ts.map +1 -0
- package/lib/utils/org-theme-definitions.js +13 -0
- package/lib/utils/presence.d.ts +2 -0
- package/lib/utils/presence.d.ts.map +1 -0
- package/lib/utils/presence.js +5 -0
- package/lib/utils/reference-data.d.ts +15 -0
- package/lib/utils/reference-data.d.ts.map +1 -0
- package/lib/utils/reference-data.js +15 -0
- package/lib/utils/use-client-width.d.ts +2 -0
- package/lib/utils/use-client-width.d.ts.map +1 -0
- package/lib/utils/use-client-width.js +18 -0
- package/lib/utils/use-debounce.d.ts +3 -0
- package/lib/utils/use-debounce.d.ts.map +1 -0
- package/lib/utils/use-debounce.js +14 -0
- package/lib/utils/use-interval.d.ts +2 -0
- package/lib/utils/use-interval.d.ts.map +1 -0
- package/lib/utils/use-interval.js +22 -0
- package/lib/utils/use-localstorage.d.ts +2 -0
- package/lib/utils/use-localstorage.d.ts.map +1 -0
- package/lib/utils/use-localstorage.js +40 -0
- package/lib/utils/use-now.d.ts +2 -0
- package/lib/utils/use-now.d.ts.map +1 -0
- package/lib/utils/use-now.js +13 -0
- package/lib/utils/user-media-query.d.ts +2 -0
- package/lib/utils/user-media-query.d.ts.map +1 -0
- package/lib/utils/user-media-query.js +36 -0
- package/lib/utils.d.ts +19 -0
- package/lib/utils.d.ts.map +1 -0
- package/lib/utils.js +126 -0
- package/lib/validation/commonInputValidator.d.ts +7 -0
- package/lib/validation/commonInputValidator.d.ts.map +1 -0
- package/lib/validation/commonInputValidator.js +28 -0
- package/lib/validation/index.d.ts +2 -0
- package/lib/validation/index.d.ts.map +1 -0
- package/lib/validation/index.js +8 -0
- package/lib/validation/validationRules.d.ts +11 -0
- package/lib/validation/validationRules.d.ts.map +1 -0
- package/lib/validation/validationRules.js +372 -0
- package/package.json +99 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ContactFormConfig } from './modules/config';
|
|
3
|
+
import { type ContactFormTranslationsOverride, Language } from './translations';
|
|
4
|
+
export type ContactFormRootProps = {
|
|
5
|
+
/** Main configuration object (theme, icons, api, org, features) */
|
|
6
|
+
config: ContactFormConfig;
|
|
7
|
+
/**
|
|
8
|
+
* Optional raw Accept-Language header string from the server.
|
|
9
|
+
* If provided, this takes precedence over initialLanguage.
|
|
10
|
+
*/
|
|
11
|
+
acceptLanguageHeader?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional initial language for purely client-side usage.
|
|
14
|
+
* Will be converted to a basic Accept-Language style string internally.
|
|
15
|
+
*/
|
|
16
|
+
initialLanguage?: Language;
|
|
17
|
+
/**
|
|
18
|
+
* Optional: force a specific theme mode (light or dark).
|
|
19
|
+
* When set, dark mode toggle is effectively disabled and the chosen
|
|
20
|
+
* variant is always used.
|
|
21
|
+
*/
|
|
22
|
+
forceTheme?: 'light' | 'dark';
|
|
23
|
+
/**
|
|
24
|
+
* Optional additional translation overrides that will be merged on top of config.translations.
|
|
25
|
+
* Config translations are required; this allows additional overrides at the root level if needed.
|
|
26
|
+
*/
|
|
27
|
+
translationsOverride?: ContactFormTranslationsOverride;
|
|
28
|
+
/** App content to render inside the provider stack */
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* High-level entrypoint that wires configuration, theme, and language
|
|
33
|
+
* providers together. Renders children inside the provider stack so
|
|
34
|
+
* consumers can pass their routes/layout as children.
|
|
35
|
+
*/
|
|
36
|
+
export declare function ContactFormRoot({ config, acceptLanguageHeader, initialLanguage, forceTheme, translationsOverride, children, }: ContactFormRootProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
//# sourceMappingURL=ContactFormRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactFormRoot.d.ts","sourceRoot":"","sources":["../src/ContactFormRoot.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE5C,OAAO,EACH,KAAK,iBAAiB,EAEzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEH,KAAK,+BAA+B,EACpC,QAAQ,EACX,MAAM,gBAAgB,CAAC;AAQxB,MAAM,MAAM,oBAAoB,GAAG;IAC/B,mEAAmE;IACnE,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,+BAA+B,CAAC;IACvD,sDAAsD;IACtD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EACI,MAAM,EACN,oBAAoB,EACpB,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,QAAQ,GACX,EAAE,oBAAoB,2CAuBtD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContactFormRoot = ContactFormRoot;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const config_1 = require("./modules/config");
|
|
6
|
+
const theme_1 = require("./modules/theme");
|
|
7
|
+
const translations_1 = require("./translations");
|
|
8
|
+
/** Syncs theme (light/dark) to document for CSS [data-theme] selectors */
|
|
9
|
+
function ThemeSync({ children }) {
|
|
10
|
+
(0, theme_1.useHtmlDarkMode)();
|
|
11
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* High-level entrypoint that wires configuration, theme, and language
|
|
15
|
+
* providers together. Renders children inside the provider stack so
|
|
16
|
+
* consumers can pass their routes/layout as children.
|
|
17
|
+
*/
|
|
18
|
+
function ContactFormRoot({ config, acceptLanguageHeader, initialLanguage, forceTheme, translationsOverride, children, }) {
|
|
19
|
+
const header = acceptLanguageHeader ?? deriveHeaderFromInitialLanguage(initialLanguage);
|
|
20
|
+
// Merge config translations (required) with optional root-level override (override takes precedence)
|
|
21
|
+
const mergedTranslations = translationsOverride
|
|
22
|
+
? deepMerge(config.translations, translationsOverride)
|
|
23
|
+
: config.translations;
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(config_1.ContactFormConfigProvider, { config: config, children: (0, jsx_runtime_1.jsx)(theme_1.ThemeProvider, { forceTheme: forceTheme, children: (0, jsx_runtime_1.jsx)(ThemeSync, { children: (0, jsx_runtime_1.jsx)(translations_1.AppLanguageProvider, { serverAcceptLanguage: header ?? 'no,en;q=0.9', overrides: mergedTranslations, children: children }) }) }) }));
|
|
25
|
+
}
|
|
26
|
+
function deriveHeaderFromInitialLanguage(language) {
|
|
27
|
+
if (!language) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
// Very small helper to build a reasonable Accept-Language style string
|
|
31
|
+
// based on the enum values we already expose.
|
|
32
|
+
switch (language) {
|
|
33
|
+
case translations_1.Language.English:
|
|
34
|
+
return 'en-US,no;q=0.9';
|
|
35
|
+
case translations_1.Language.Nynorsk:
|
|
36
|
+
return 'nn,no;q=0.9';
|
|
37
|
+
case translations_1.Language.Norwegian:
|
|
38
|
+
default:
|
|
39
|
+
return 'no,en;q=0.9';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function deepMerge(target, source) {
|
|
43
|
+
const result = { ...target };
|
|
44
|
+
for (const key in source) {
|
|
45
|
+
if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {
|
|
46
|
+
result[key] = deepMerge((result[key] || {}), source[key]);
|
|
47
|
+
}
|
|
48
|
+
else if (source[key] !== undefined) {
|
|
49
|
+
result[key] = source[key];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TransportModeType } from './types';
|
|
2
|
+
import { Line } from '.';
|
|
3
|
+
export declare const commonEvents: {
|
|
4
|
+
type: "VALIDATE";
|
|
5
|
+
} | {
|
|
6
|
+
type: "ON_INPUT_CHANGE";
|
|
7
|
+
inputName: "address" | "attachments" | "bankAccountNumber" | "city" | "date" | "email" | "firstName" | "feedback" | "IBAN" | "lastName" | "phoneNumber" | "postalCode" | "SWIFT" | "toStop" | "fromStop" | "plannedDepartureTime";
|
|
8
|
+
value: any;
|
|
9
|
+
} | {
|
|
10
|
+
type: "ON_TRANSPORTMODE_CHANGE";
|
|
11
|
+
value: TransportModeType;
|
|
12
|
+
} | {
|
|
13
|
+
type: "ON_LINE_CHANGE";
|
|
14
|
+
value: Line | undefined;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=commoneEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commoneEvents.d.ts","sourceRoot":"","sources":["../src/commoneEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,GAAG,CAAC;AAEvB,eAAO,MAAM,YAAY,EACnB;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IACF,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EACH,SAAS,GACT,aAAa,GACb,mBAAmB,GACnB,MAAM,GACN,MAAM,GACN,OAAO,GACP,WAAW,GACX,UAAU,GACV,MAAM,GACN,UAAU,GACV,aAAa,GACb,YAAY,GACZ,OAAO,GACP,QAAQ,GACR,UAAU,GACV,sBAAsB,CAAC;IAC7B,KAAK,EAAE,GAAG,CAAC;CACd,GACK;IACF,IAAI,EAAE,yBAAyB,CAAC;IAChC,KAAK,EAAE,iBAAiB,CAAC;CAC5B,GACK;IACF,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,IAAI,GAAG,SAAS,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { MouseEventHandler } from 'react';
|
|
2
|
+
import { ButtonBaseProps } from './utils';
|
|
3
|
+
export type ButtonProps = {
|
|
4
|
+
/** Action when clicked */
|
|
5
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
6
|
+
/**
|
|
7
|
+
* Specify testID for easier access when using cypress
|
|
8
|
+
*/
|
|
9
|
+
testID?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Pass properties to button element directly
|
|
12
|
+
*/
|
|
13
|
+
buttonProps?: React.JSX.IntrinsicElements['button'];
|
|
14
|
+
} & ButtonBaseProps;
|
|
15
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
export default Button;
|
|
17
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAC/C,OAAO,EAEH,eAAe,EAGlB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,WAAW,GAAG;IACtB,0BAA0B;IAC1B,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAC/C;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;CACvD,GAAG,eAAe,CAAC;AAEpB,eAAO,MAAM,MAAM,uFAqBlB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Button = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const utils_1 = require("./utils");
|
|
10
|
+
exports.Button = react_1.default.forwardRef(function Button({ onClick, testID, buttonProps, ...props }, ref) {
|
|
11
|
+
const className = (0, utils_1.getBaseButtonClassName)(props);
|
|
12
|
+
const buttonStyle = (0, utils_1.getButtonStyle)(props);
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("button", { ref: ref, type: "button", onClick: onClick, className: className, disabled: props.disabled || props.state === 'loading', "aria-disabled": props.disabled || props.state === 'loading', "data-testid": testID, style: buttonStyle, ...buttonProps, children: (0, jsx_runtime_1.jsx)(utils_1.ButtonBase, { ...props }) }));
|
|
14
|
+
});
|
|
15
|
+
exports.default = exports.Button;
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
/* Button */
|
|
2
|
+
.button {
|
|
3
|
+
composes: typo-body__m from '@atb-as/theme/lib/generated/typography.module.css';
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
text-align: left;
|
|
6
|
+
border: 0;
|
|
7
|
+
text-decoration: none;
|
|
8
|
+
align-items: center;
|
|
9
|
+
|
|
10
|
+
display: flex;
|
|
11
|
+
|
|
12
|
+
flex-wrap: nowrap;
|
|
13
|
+
gap: token('spacing.small');
|
|
14
|
+
|
|
15
|
+
background: transparent;
|
|
16
|
+
color: currentColor;
|
|
17
|
+
|
|
18
|
+
transition: all 100ms ease-in;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.button--display_inline {
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.button--disabled,
|
|
26
|
+
.button:disabled {
|
|
27
|
+
opacity: 0.6;
|
|
28
|
+
cursor: not-allowed;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.button--state_loading {
|
|
32
|
+
cursor: not-allowed;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.button__text {
|
|
36
|
+
display: block;
|
|
37
|
+
flex: 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.button--transparent,
|
|
41
|
+
.button--transparent:visited {
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.button--transparent:hover {
|
|
45
|
+
color: token('color.foreground.dynamic.secondary');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.button--transparent:active {
|
|
49
|
+
background-color: token('color.interactive.0.active.background');
|
|
50
|
+
color: token('color.interactive.0.active.foreground.primary');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.button--transparent:disabled,
|
|
54
|
+
.button--transparent.button--disabled {
|
|
55
|
+
opacity: 0.6;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.button--transparent:focus {
|
|
59
|
+
outline: 0;
|
|
60
|
+
box-shadow: inset 0 0 0 token('border.width.medium') token('color.interactive.1.outline.background');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.button--transparent--underline,
|
|
64
|
+
.button--transparent--underline:visited {
|
|
65
|
+
text-decoration: underline;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.button--transparent--underline:hover {
|
|
69
|
+
color: token('color.foreground.dynamic.secondary');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.button--transparent--underline:active {
|
|
73
|
+
background-color: token('color.interactive.0.active.background');
|
|
74
|
+
color: token('color.interactive.0.active.foreground.primary');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.button--transparent--underline:disabled,
|
|
78
|
+
.button--transparent--underline.button--disabled {
|
|
79
|
+
opacity: 0.6;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.button--transparent--underline:focus {
|
|
83
|
+
outline: 0;
|
|
84
|
+
box-shadow: inset 0 0 0 token('border.width.medium') token('color.interactive.1.outline.background');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Primary */
|
|
88
|
+
.button--primary,
|
|
89
|
+
.button--primary:visited {
|
|
90
|
+
color: token('color.foreground.inverse.primary');
|
|
91
|
+
background-color: token('color.interactive.0.default.background');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.button--primary:not(:disabled):hover,
|
|
95
|
+
.button--primary:not(:disabled):active,
|
|
96
|
+
.button--primary.button--state_active {
|
|
97
|
+
color: token('color.foreground.dynamic.primary');
|
|
98
|
+
background-color: token('color.interactive.0.active.background');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.button--primary:disabled,
|
|
102
|
+
.button--primary.button--disabled {
|
|
103
|
+
opacity: 0.2;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Secondary */
|
|
107
|
+
.button--secondary,
|
|
108
|
+
.button--secondary:visited {
|
|
109
|
+
color: token('color.foreground.dynamic.primary');
|
|
110
|
+
border: 2px solid token('color.foreground.dynamic.primary');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.button--secondary:not(:disabled):hover,
|
|
114
|
+
.button--secondary:not(:disabled):active,
|
|
115
|
+
.button--secondary.button--state_active {
|
|
116
|
+
background-color: token('color.interactive.0.active.background');
|
|
117
|
+
border: 2px solid token('color.interactive.0.outline.background');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.button--secondary:disabled,
|
|
121
|
+
.button--secondary.button--disabled {
|
|
122
|
+
opacity: 0.2;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Interactive button 0 */
|
|
126
|
+
.button--interactive_0,
|
|
127
|
+
.button--interactive_0:visited {
|
|
128
|
+
background-color: token('color.interactive.0.default.background');
|
|
129
|
+
color: token('color.interactive.0.default.foreground.primary');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.button--interactive_0:hover {
|
|
133
|
+
background-color: token('color.interactive.0.hover.background');
|
|
134
|
+
color: token('color.interactive.0.hover.foreground.primary');
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.button--interactive_0:active {
|
|
138
|
+
background-color: token('color.interactive.0.active.background');
|
|
139
|
+
color: token('color.interactive.0.active.foreground.primary');
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.button--interactive_0:disabled,
|
|
143
|
+
.button--interactive_0.button--disabled {
|
|
144
|
+
background-color: token('color.interactive.0.disabled.background');
|
|
145
|
+
color: token('color.interactive.0.disabled.foreground.primary');
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.button--interactive_0:focus {
|
|
149
|
+
outline: 0;
|
|
150
|
+
box-shadow: inset 0 0 0 token('border.width.medium') token('color.interactive.0.outline.background');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Interactive button 0 bordered */
|
|
154
|
+
.button--interactive_0--bordered,
|
|
155
|
+
.button--interactive_0--bordered:visited {
|
|
156
|
+
background-color: token('color.interactive.0.default.background');
|
|
157
|
+
color: token('color.interactive.0.default.foreground.primary');
|
|
158
|
+
box-shadow: inset 0 0 0 token('border.width.slim') token('color.interactive.0.default.foreground.primary');
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.button--interactive_0--bordered:hover {
|
|
162
|
+
background-color: token('color.interactive.0.hover.background');
|
|
163
|
+
color: token('color.interactive.0.hover.foreground.primary');
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.button--interactive_0--bordered:active {
|
|
167
|
+
background-color: token('color.interactive.0.active.background');
|
|
168
|
+
color: token('color.interactive.0.active.foreground.primary');
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.button--interactive_0--bordered:disabled,
|
|
172
|
+
.button--interactive_0--bordered.button--disabled {
|
|
173
|
+
background-color: token('color.interactive.0.disabled.background');
|
|
174
|
+
color: token('color.interactive.0.disabled.foreground.primary');
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.button--interactive_0--bordered:focus {
|
|
178
|
+
outline: 0;
|
|
179
|
+
box-shadow: inset 0 0 0 token('border.width.medium') token('color.interactive.0.outline.background');
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.button--interactive_0--bordered-light-outline,
|
|
183
|
+
.button--interactive_0--bordered-light-outline:visited {
|
|
184
|
+
background-color: token('color.interactive.0.default.background');
|
|
185
|
+
color: token('color.interactive.0.default.foreground.primary');
|
|
186
|
+
box-shadow: inset 0 0 0 token('border.width.slim') token('color.interactive.0.default.foreground.primary');
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.button--interactive_0--bordered-light-outline:hover {
|
|
190
|
+
background-color: token('color.interactive.0.hover.background');
|
|
191
|
+
color: token('color.interactive.0.hover.foreground.primary');
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.button--interactive_0--bordered-light-outline:active {
|
|
195
|
+
background-color: token('color.interactive.1.hover.background');
|
|
196
|
+
color: token('color.interactive.1.active.foreground.primary');
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.button--interactive_0--bordered-light-outline:disabled,
|
|
200
|
+
.button--interactive_0--bordered-light-outline.button--disabled {
|
|
201
|
+
background-color: token('color.interactive.0.disabled.background');
|
|
202
|
+
color: token('color.interactive.0.disabled.foreground.primary');
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.button--interactive_0--bordered-light-outline:focus {
|
|
206
|
+
outline: 0;
|
|
207
|
+
box-shadow: inset 0 0 0 token('border.width.medium') token('color.interactive.0.active.background');
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Interactive button 1 */
|
|
211
|
+
|
|
212
|
+
.button--interactive_1,
|
|
213
|
+
.button--interactive_1:visited {
|
|
214
|
+
background-color: token('color.interactive.1.default.background');
|
|
215
|
+
color: token('color.interactive.1.default.foreground.primary');
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.button--interactive_1:hover {
|
|
219
|
+
background-color: token('color.interactive.1.hover.background');
|
|
220
|
+
color: token('color.interactive.1.hover.foreground.primary');
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.button--interactive_1:active {
|
|
224
|
+
background-color: token('color.interactive.1.active.background');
|
|
225
|
+
color: token('color.interactive.1.active.foreground.primary');
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.button--interactive_1:disabled,
|
|
229
|
+
.button--interactive_1.button--disabled {
|
|
230
|
+
background-color: token('color.interactive.1.disabled.background');
|
|
231
|
+
color: token('color.interactive.1.disabled.foreground.primary');
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.button--interactive_1:focus {
|
|
235
|
+
outline: 0;
|
|
236
|
+
box-shadow: inset 0 0 0 token('border.width.medium') token('color.interactive.1.outline.background');
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* Interactive button 2 */
|
|
240
|
+
|
|
241
|
+
.button--interactive_2,
|
|
242
|
+
.button--interactive_2:visited {
|
|
243
|
+
background-color: token('color.interactive.2.default.background');
|
|
244
|
+
color: token('color.interactive.2.default.foreground.primary');
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.button--interactive_2:hover {
|
|
248
|
+
background-color: token('color.interactive.2.hover.background');
|
|
249
|
+
color: token('color.interactive.2.hover.foreground.primary');
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.button--interactive_2:active {
|
|
253
|
+
background-color: token('color.interactive.2.active.background');
|
|
254
|
+
color: token('color.interactive.2.active.foreground.primary');
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.button--interactive_2:disabled,
|
|
258
|
+
.button--interactive_2.button--disabled {
|
|
259
|
+
background-color: token('color.interactive.2.disabled.background');
|
|
260
|
+
color: token('color.interactive.2.disabled.foreground.primary');
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.button--interactive_2:focus {
|
|
264
|
+
outline: 0;
|
|
265
|
+
box-shadow: inset 0 0 0 token('border.width.medium') token('color.interactive.2.outline.background');
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* Interactive button 2 alternative */
|
|
269
|
+
|
|
270
|
+
.button--interactive_2--light-outline,
|
|
271
|
+
.button--interactive_2--light-outline:visited {
|
|
272
|
+
background-color: token('color.interactive.2.default.background');
|
|
273
|
+
color: token('color.interactive.2.default.foreground.primary');
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.button--interactive_2--light-outline:hover {
|
|
277
|
+
background-color: token('color.interactive.2.hover.background');
|
|
278
|
+
color: token('color.interactive.2.hover.foreground.primary');
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.button--interactive_2--light-outline:active {
|
|
282
|
+
background-color: token('color.interactive.2.active.background');
|
|
283
|
+
color: token('color.interactive.2.active.foreground.primary');
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.button--interactive_2--light-outline:disabled,
|
|
287
|
+
.button--interactive_2--light-outline.button--disabled {
|
|
288
|
+
background-color: token('color.interactive.2.disabled.background');
|
|
289
|
+
color: token('color.interactive.2.disabled.foreground.primary');
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.button--interactive_2--light-outline:focus {
|
|
293
|
+
outline: 0;
|
|
294
|
+
box-shadow: inset 0 0 0 token('border.width.medium') token('color.interactive.1.active.background');
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/* Interactive button 3 */
|
|
298
|
+
|
|
299
|
+
.button--interactive_3,
|
|
300
|
+
.button--interactive_3:visited {
|
|
301
|
+
background-color: token('color.interactive.3.default.background');
|
|
302
|
+
color: token('color.interactive.3.default.foreground.primary');
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.button--interactive_3:hover {
|
|
306
|
+
background-color: token('color.interactive.3.hover.background');
|
|
307
|
+
color: token('color.interactive.3.hover.foreground.primary');
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.button--interactive_3:active {
|
|
311
|
+
background-color: token('color.interactive.3.active.background');
|
|
312
|
+
color: token('color.interactive.3.active.foreground.primary');
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.button--interactive_3:disabled,
|
|
316
|
+
.button--interactive_3.button--disabled {
|
|
317
|
+
background-color: token('color.interactive.3.disabled.background');
|
|
318
|
+
color: token('color.interactive.3.disabled.foreground.primary');
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.button--interactive_3:focus {
|
|
322
|
+
outline: 0;
|
|
323
|
+
box-shadow: inset 0 0 0 token('border.width.medium') token('color.interactive.3.outline.background');
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/* Interactive button, destructive */
|
|
327
|
+
|
|
328
|
+
.button--destructive,
|
|
329
|
+
.button--destructive:visited {
|
|
330
|
+
background-color: var(
|
|
331
|
+
--interactive-interactive_destructive-default-background
|
|
332
|
+
);
|
|
333
|
+
color: token('color.interactive.destructive.default.foreground.primary');
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.button--destructive:hover {
|
|
337
|
+
background-color: token('color.interactive.destructive.hover.background');
|
|
338
|
+
color: token('color.interactive.destructive.hover.foreground.primary');
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.button--destructive:active {
|
|
342
|
+
background-color: token('color.interactive.destructive.active.background');
|
|
343
|
+
color: token('color.interactive.destructive.active.foreground.primary');
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.button--destructive:disabled,
|
|
347
|
+
.button--destructive.button--disabled {
|
|
348
|
+
background-color: token('color.interactive.destructive.disabled.background');
|
|
349
|
+
color: token('color.interactive.destructive.disabled.foreground.primary');
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.button--destructive:focus {
|
|
353
|
+
outline: 0;
|
|
354
|
+
box-shadow: inset 0 0 0 token('border.width.medium') token('color.interactive.destructive.outline.background');
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.button--size_medium {
|
|
358
|
+
padding: token('spacing.xLarge');
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.button--size_small {
|
|
362
|
+
padding: token('spacing.medium');
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.button--size_compact {
|
|
366
|
+
padding: 0;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.button--size_pill {
|
|
370
|
+
padding: token('spacing.xSmall') token('spacing.medium');
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.button--radius_top-bottom {
|
|
374
|
+
border-radius: token('border.radius.regular');
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.button--radius_top {
|
|
378
|
+
border-top-left-radius: token('border.radius.regular');
|
|
379
|
+
border-top-right-radius: token('border.radius.regular');
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.button--radius_bottom {
|
|
383
|
+
border-bottom-left-radius: token('border.radius.regular');
|
|
384
|
+
border-bottom-right-radius: token('border.radius.regular');
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.button--radius_top-bottom.button--radiusSize_circular {
|
|
388
|
+
border-radius: token('border.radius.circle');
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.button--radius_top.button--radiusSize_circular {
|
|
392
|
+
border-top-left-radius: token('border.radius.circle');
|
|
393
|
+
border-top-right-radius: token('border.radius.circle');
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.button--radius_bottom.button--radiusSize_circular {
|
|
397
|
+
border-bottom-left-radius: token('border.radius.circle');
|
|
398
|
+
border-bottom-right-radius: token('border.radius.circle');
|
|
399
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,QAAQ,CAAC;AAC7C,YAAY,EAAC,eAAe,EAAC,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAC;AAC3C,YAAY,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Button = exports.ButtonLink = void 0;
|
|
7
|
+
var link_1 = require("./link");
|
|
8
|
+
Object.defineProperty(exports, "ButtonLink", { enumerable: true, get: function () { return __importDefault(link_1).default; } });
|
|
9
|
+
var button_1 = require("./button");
|
|
10
|
+
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return __importDefault(button_1).default; } });
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonBaseProps } from './utils';
|
|
3
|
+
import { UrlObject } from 'url';
|
|
4
|
+
export type ButtonLinkProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Link or UrlObject passed to next/link
|
|
7
|
+
*/
|
|
8
|
+
href: string | UrlObject;
|
|
9
|
+
/**
|
|
10
|
+
* Optional additional onClick if you want to
|
|
11
|
+
* enrich click actions with JavaScript function
|
|
12
|
+
*/
|
|
13
|
+
onClick?: React.JSX.IntrinsicElements['a']['onClick'];
|
|
14
|
+
/**
|
|
15
|
+
* Specify properties to underlying a tag
|
|
16
|
+
*/
|
|
17
|
+
aProps?: React.JSX.IntrinsicElements['a'];
|
|
18
|
+
/**
|
|
19
|
+
* If we should do shallow routing or not.
|
|
20
|
+
* Shallow routing will not trigger server side props
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
shallow?: boolean;
|
|
24
|
+
} & ButtonBaseProps;
|
|
25
|
+
export declare function ButtonLink({ href, onClick, testID, aProps, shallow, ...props }: ButtonLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export default ButtonLink;
|
|
27
|
+
//# sourceMappingURL=link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/components/button/link.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEH,eAAe,EAGlB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAC,SAAS,EAAC,MAAM,KAAK,CAAC;AAE9B,MAAM,MAAM,eAAe,GAAG;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;IACtD;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC1C;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,eAAe,CAAC;AAEpB,wBAAgB,UAAU,CAAC,EACI,IAAI,EACJ,OAAO,EACP,MAAM,EACN,MAAW,EACX,OAAe,EACf,GAAG,KAAK,EACX,EAAE,eAAe,2CAkC5C;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ButtonLink = ButtonLink;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const link_1 = __importDefault(require("next/link"));
|
|
9
|
+
const utils_1 = require("./utils");
|
|
10
|
+
function ButtonLink({ href, onClick, testID, aProps = {}, shallow = false, ...props }) {
|
|
11
|
+
const className = (0, utils_1.getBaseButtonClassName)(props);
|
|
12
|
+
const extraProps = props.state == 'active' ? { 'aria-current': true } : {};
|
|
13
|
+
const buttonStyle = (0, utils_1.getButtonStyle)(props);
|
|
14
|
+
if (props.disabled || props.state == 'loading') {
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)("a", { className: className, role: "link", "aria-disabled": true, "data-testid": testID, ...extraProps, ...aProps, children: (0, jsx_runtime_1.jsx)(utils_1.ButtonBase, { ...props }) }));
|
|
16
|
+
}
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(link_1.default, { href: href, shallow: shallow, className: className, onClick: onClick, ...extraProps, ...aProps, style: buttonStyle, "data-testid": testID, children: (0, jsx_runtime_1.jsx)(utils_1.ButtonBase, { ...props }) }));
|
|
18
|
+
}
|
|
19
|
+
exports.default = ButtonLink;
|