@mrfylke/contact-form 0.1.24 → 0.1.26
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 +42 -24
- package/lib/ContactFormRoot.d.ts +2 -2
- package/lib/ContactFormRoot.d.ts.map +1 -1
- package/lib/ContactFormRoot.js +6 -4
- package/lib/components/button/link.d.ts +1 -1
- package/lib/components/button/link.d.ts.map +1 -1
- package/lib/components/button/utils.d.ts +2 -2
- package/lib/components/button/utils.d.ts.map +1 -1
- package/lib/components/checkbox/checkbox.d.ts +1 -1
- package/lib/components/checkbox/checkbox.d.ts.map +1 -1
- package/lib/components/error-message/error-message.d.ts +1 -1
- package/lib/components/error-message/error-message.d.ts.map +1 -1
- package/lib/components/external-link-page.d.ts +1 -1
- package/lib/components/external-link-page.d.ts.map +1 -1
- package/lib/components/form/date-selector.d.ts +1 -1
- package/lib/components/form/date-selector.d.ts.map +1 -1
- package/lib/components/form/date-selector.js +2 -2
- package/lib/components/form/departure-time-field.d.ts +1 -1
- package/lib/components/form/departure-time-field.d.ts.map +1 -1
- package/lib/components/form/description-modal.d.ts +1 -1
- package/lib/components/form/description-modal.d.ts.map +1 -1
- package/lib/components/form/field-wrapper-with-error/index.d.ts +1 -1
- package/lib/components/form/field-wrapper-with-error/index.d.ts.map +1 -1
- package/lib/components/form/fieldset/index.d.ts +1 -1
- package/lib/components/form/fieldset/index.d.ts.map +1 -1
- package/lib/components/form/file-input.d.ts +1 -1
- package/lib/components/form/file-input.d.ts.map +1 -1
- package/lib/components/form/form-component-label/index.d.ts +3 -2
- package/lib/components/form/form-component-label/index.d.ts.map +1 -1
- package/lib/components/form/form-component-label/index.js +2 -2
- package/lib/components/form/input.d.ts +1 -1
- package/lib/components/form/input.d.ts.map +1 -1
- package/lib/components/form/radio.d.ts +1 -1
- package/lib/components/form/radio.d.ts.map +1 -1
- package/lib/components/form/searchable-select/searchable-select.d.ts +1 -1
- package/lib/components/form/searchable-select/searchable-select.d.ts.map +1 -1
- package/lib/components/form/searchable-select/searchable-select.js +1 -1
- package/lib/components/form/select.d.ts +1 -1
- package/lib/components/form/select.d.ts.map +1 -1
- package/lib/components/form/select.js +1 -1
- package/lib/components/form/textarea.d.ts +1 -1
- package/lib/components/form/textarea.d.ts.map +1 -1
- package/lib/components/form/time-selector.d.ts +1 -1
- package/lib/components/form/time-selector.d.ts.map +1 -1
- package/lib/components/form/time-selector.js +2 -2
- package/lib/components/icon/checkbox-icon.d.ts +1 -1
- package/lib/components/icon/checkbox-icon.d.ts.map +1 -1
- package/lib/components/icon/color-icon.d.ts +1 -1
- package/lib/components/icon/color-icon.d.ts.map +1 -1
- package/lib/components/icon/generated-icons.d.ts +422 -262
- package/lib/components/icon/generated-icons.d.ts.map +1 -1
- package/lib/components/icon/generated-icons.js +1931 -1771
- package/lib/components/icon/illustration.d.ts +1 -1
- package/lib/components/icon/illustration.d.ts.map +1 -1
- package/lib/components/icon/image.d.ts +1 -1
- package/lib/components/icon/image.d.ts.map +1 -1
- package/lib/components/icon/mono-icon.d.ts +1 -1
- package/lib/components/icon/mono-icon.d.ts.map +1 -1
- package/lib/components/icon/utils.d.ts.map +1 -1
- package/lib/components/icon/utils.js +6 -6
- package/lib/components/loading/index.d.ts +2 -2
- package/lib/components/loading/index.d.ts.map +1 -1
- package/lib/components/section-card/section-card.d.ts +1 -1
- package/lib/components/section-card/section-card.d.ts.map +1 -1
- package/lib/components/typography/index.d.ts +6 -6
- package/lib/components/typography/index.d.ts.map +1 -1
- package/lib/contact.module.css +0 -9
- package/lib/error-content/error-content.d.ts +1 -1
- package/lib/error-content/error-content.d.ts.map +1 -1
- package/lib/group-travel/index.d.ts +1 -1
- package/lib/group-travel/index.d.ts.map +1 -1
- package/lib/group-travel/index.js +1 -2
- package/lib/index.d.ts +3 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -10
- package/lib/journey-info/events.d.ts.map +1 -1
- package/lib/journey-info/index.d.ts +1 -1
- package/lib/journey-info/index.d.ts.map +1 -1
- package/lib/journey-info/index.js +10 -8
- package/lib/journey-info/journeyInfoStateMachine.d.ts +2 -2
- package/lib/journey-info/journeyInfoStateMachine.d.ts.map +1 -1
- package/lib/journey-info/journeyInfoStateMachine.js +1 -1
- package/lib/layouts/contact-form-container.d.ts +1 -1
- package/lib/layouts/contact-form-container.d.ts.map +1 -1
- package/lib/layouts/contact-page-layout.d.ts +1 -8
- package/lib/layouts/contact-page-layout.d.ts.map +1 -1
- package/lib/layouts/contact-page-layout.js +8 -93
- package/lib/layouts/contact-pages.d.ts +20 -0
- package/lib/layouts/contact-pages.d.ts.map +1 -0
- package/lib/layouts/contact-pages.js +124 -0
- package/lib/layouts/index.d.ts +2 -1
- package/lib/layouts/index.d.ts.map +1 -1
- package/lib/layouts/index.js +5 -2
- package/lib/lines/use-departures.js +2 -2
- package/lib/lines/use-lines.d.ts +2 -2
- package/lib/lines/use-lines.js +1 -1
- package/lib/lost-property/LostPropertyForm.d.ts +2 -1
- package/lib/lost-property/LostPropertyForm.d.ts.map +1 -1
- package/lib/lost-property/LostPropertyMachine.d.ts +2 -2
- package/lib/lost-property/LostPropertyMachine.d.ts.map +1 -1
- package/lib/lost-property/LostPropertyMachine.js +1 -1
- package/lib/lost-property/index.d.ts +1 -1
- package/lib/lost-property/index.d.ts.map +1 -1
- package/lib/lost-property-external/index.d.ts +1 -1
- package/lib/lost-property-external/index.d.ts.map +1 -1
- package/lib/lost-property-external/index.js +1 -2
- package/lib/means-of-transport/events.d.ts.map +1 -1
- package/lib/means-of-transport/forms/delayForm.d.ts +1 -1
- package/lib/means-of-transport/forms/delayForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/driverForm.d.ts +1 -1
- package/lib/means-of-transport/forms/driverForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/injuryForm.d.ts +1 -1
- package/lib/means-of-transport/forms/injuryForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/serviceOfferingForm.d.ts +1 -1
- package/lib/means-of-transport/forms/serviceOfferingForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/serviceOfferingForm.js +3 -1
- package/lib/means-of-transport/forms/stopForm.d.ts +1 -1
- package/lib/means-of-transport/forms/stopForm.d.ts.map +1 -1
- package/lib/means-of-transport/forms/transportationForm.d.ts +1 -1
- package/lib/means-of-transport/forms/transportationForm.d.ts.map +1 -1
- package/lib/means-of-transport/index.d.ts +1 -1
- package/lib/means-of-transport/index.d.ts.map +1 -1
- package/lib/means-of-transport/index.js +8 -2
- package/lib/means-of-transport/means-of-transport-form-machine.d.ts +4 -2
- package/lib/means-of-transport/means-of-transport-form-machine.d.ts.map +1 -1
- package/lib/means-of-transport/means-of-transport-form-machine.js +9 -3
- package/lib/modules/config/context.d.ts +13 -38
- package/lib/modules/config/context.d.ts.map +1 -1
- package/lib/modules/config/context.js +16 -52
- package/lib/modules/config/default-submit.d.ts +3 -0
- package/lib/modules/config/default-submit.d.ts.map +1 -0
- package/lib/modules/config/default-submit.js +13 -0
- package/lib/modules/config/index.d.ts +1 -0
- package/lib/modules/config/index.d.ts.map +1 -1
- package/lib/modules/config/index.js +1 -0
- package/lib/modules/config/types.d.ts +60 -78
- package/lib/modules/config/types.d.ts.map +1 -1
- package/lib/modules/org-data/index.d.ts +1 -2
- package/lib/modules/org-data/index.d.ts.map +1 -1
- package/lib/modules/org-data/index.js +1 -2
- package/lib/modules/theme/theme-context.d.ts +1 -1
- package/lib/modules/theme/theme-context.d.ts.map +1 -1
- package/lib/modules/transport-mode/filter/filter.d.ts +1 -1
- package/lib/modules/transport-mode/filter/filter.d.ts.map +1 -1
- package/lib/modules/transport-mode/icon/index.d.ts +4 -4
- package/lib/modules/transport-mode/icon/index.d.ts.map +1 -1
- package/lib/modules/transport-mode/types.d.ts +3 -5
- package/lib/modules/transport-mode/types.d.ts.map +1 -1
- package/lib/modules/transport-mode/types.js +3 -138
- package/lib/modules/transport-mode/utils.d.ts +2 -2
- package/lib/modules/transport-mode/utils.d.ts.map +1 -1
- package/lib/modules/transport-mode/utils.js +39 -6
- package/lib/refund/forms/refund-and-travel-guarantee/index.d.ts +1 -1
- package/lib/refund/forms/refund-and-travel-guarantee/index.d.ts.map +1 -1
- package/lib/refund/forms/refund-and-travel-guarantee/index.js +1 -1
- package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.d.ts +1 -1
- package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.d.ts.map +1 -1
- package/lib/refund/forms/refund-and-travel-guarantee/refundCarForm.js +1 -1
- package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.d.ts +1 -1
- package/lib/refund/forms/refund-and-travel-guarantee/refundTaxiForm.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts +2 -2
- package/lib/refund/forms/refund-ticket/appTicketRefund.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/appTicketRefund.js +18 -2
- package/lib/refund/forms/refund-ticket/index.d.ts +1 -1
- package/lib/refund/forms/refund-ticket/index.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/index.js +1 -1
- package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts +1 -1
- package/lib/refund/forms/refund-ticket/otherTicketRefund.d.ts.map +1 -1
- package/lib/refund/forms/refund-ticket/otherTicketRefund.js +16 -4
- package/lib/refund/forms/residualValueOnTravelCard/index.d.ts +1 -1
- package/lib/refund/forms/residualValueOnTravelCard/index.d.ts.map +1 -1
- package/lib/refund/forms/residualValueOnTravelCard/index.js +1 -2
- package/lib/refund/index.d.ts +1 -1
- package/lib/refund/index.d.ts.map +1 -1
- package/lib/refund/index.js +9 -0
- package/lib/refund/refundFormMachine.d.ts +10 -2
- package/lib/refund/refundFormMachine.d.ts.map +1 -1
- package/lib/refund/refundFormMachine.js +23 -2
- package/lib/server/departures-route-handler.d.ts +27 -0
- package/lib/server/departures-route-handler.d.ts.map +1 -0
- package/lib/server/departures-route-handler.js +93 -0
- package/lib/server/index.d.ts +2 -0
- package/lib/server/index.d.ts.map +1 -1
- package/lib/server/index.js +5 -1
- package/lib/server/journey-planner/authority.d.ts +2 -2
- package/lib/server/journey-planner/authority.js +3 -3
- package/lib/server/journey-planner/index.d.ts.map +1 -1
- package/lib/server/journey-planner/index.js +8 -9
- package/lib/server/journey-planner/journey-gql/lines.generated.d.ts +1 -0
- package/lib/server/journey-planner/journey-gql/lines.generated.d.ts.map +1 -1
- package/lib/server/journey-planner/journey-gql/lines.generated.js +1 -0
- package/lib/server/journey-planner/validators.d.ts +4 -4
- package/lib/server/journey-planner/validators.js +3 -3
- package/lib/server/lines-route-handler.d.ts +7 -18
- package/lib/server/lines-route-handler.d.ts.map +1 -1
- package/lib/server/lines-route-handler.js +15 -17
- package/lib/server/submit-route-handler.d.ts +20 -0
- package/lib/server/submit-route-handler.d.ts.map +1 -0
- package/lib/server/submit-route-handler.js +62 -0
- package/lib/success-content/success-content.d.ts +1 -1
- package/lib/success-content/success-content.d.ts.map +1 -1
- package/lib/ticket-control/events.d.ts +1 -1
- package/lib/ticket-control/events.d.ts.map +1 -1
- package/lib/ticket-control/forms/feeComplaintForm.d.ts +1 -1
- package/lib/ticket-control/forms/feeComplaintForm.d.ts.map +1 -1
- package/lib/ticket-control/forms/feeComplaintForm.js +5 -1
- package/lib/ticket-control/forms/feedbackForm.d.ts +1 -1
- package/lib/ticket-control/forms/feedbackForm.d.ts.map +1 -1
- package/lib/ticket-control/forms/postponePayment.d.ts +1 -1
- package/lib/ticket-control/forms/postponePayment.d.ts.map +1 -1
- package/lib/ticket-control/forms/postponePayment.js +5 -1
- package/lib/ticket-control/index.d.ts +1 -1
- package/lib/ticket-control/index.d.ts.map +1 -1
- package/lib/ticket-control/index.js +2 -0
- package/lib/ticket-control/ticket-control-form-machine.d.ts +8 -4
- package/lib/ticket-control/ticket-control-form-machine.d.ts.map +1 -1
- package/lib/ticket-control/ticket-control-form-machine.js +14 -3
- package/lib/ticketing/events.d.ts.map +1 -1
- package/lib/ticketing/forms/app/appAccountForm.d.ts +1 -1
- package/lib/ticketing/forms/app/appAccountForm.d.ts.map +1 -1
- package/lib/ticketing/forms/app/appTicketingForm.d.ts +1 -1
- package/lib/ticketing/forms/app/appTicketingForm.d.ts.map +1 -1
- package/lib/ticketing/forms/app/appTravelSuggestionForm.d.ts +1 -1
- package/lib/ticketing/forms/app/appTravelSuggestionForm.d.ts.map +1 -1
- package/lib/ticketing/forms/app/index.d.ts +1 -1
- package/lib/ticketing/forms/app/index.d.ts.map +1 -1
- package/lib/ticketing/forms/priceAndTicketTypesForm.d.ts +1 -1
- package/lib/ticketing/forms/priceAndTicketTypesForm.d.ts.map +1 -1
- package/lib/ticketing/forms/travel-card/index.d.ts +1 -1
- package/lib/ticketing/forms/travel-card/index.d.ts.map +1 -1
- package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts +1 -1
- package/lib/ticketing/forms/travel-card/orderTravelCard.d.ts.map +1 -1
- package/lib/ticketing/forms/travel-card/orderTravelCard.js +1 -1
- package/lib/ticketing/forms/travel-card/travelCardQuestionForm.d.ts +1 -1
- package/lib/ticketing/forms/travel-card/travelCardQuestionForm.d.ts.map +1 -1
- package/lib/ticketing/forms/webshop/index.d.ts +1 -1
- package/lib/ticketing/forms/webshop/index.d.ts.map +1 -1
- package/lib/ticketing/forms/webshop/webshopAccountForm.d.ts +1 -1
- package/lib/ticketing/forms/webshop/webshopAccountForm.d.ts.map +1 -1
- package/lib/ticketing/forms/webshop/webshopTicketingForm.d.ts +1 -1
- package/lib/ticketing/forms/webshop/webshopTicketingForm.d.ts.map +1 -1
- package/lib/ticketing/index.d.ts +1 -1
- package/lib/ticketing/index.d.ts.map +1 -1
- package/lib/ticketing/ticketingStateMachine.d.ts +2 -2
- package/lib/ticketing/ticketingStateMachine.d.ts.map +1 -1
- package/lib/translations/commons.d.ts +1 -0
- package/lib/translations/commons.d.ts.map +1 -1
- package/lib/translations/commons.js +4 -4
- package/lib/translations/index.d.ts +2 -6
- package/lib/translations/index.d.ts.map +1 -1
- package/lib/translations/index.js +1 -9
- package/lib/translations/language-context.d.ts +3 -11
- package/lib/translations/language-context.d.ts.map +1 -1
- package/lib/translations/language-context.js +1 -31
- package/lib/translations/merge-overrides.d.ts +3 -9
- package/lib/translations/merge-overrides.d.ts.map +1 -1
- package/lib/translations/merge-overrides.js +3 -15
- package/lib/translations/pages/contact.d.ts +15 -4
- package/lib/translations/pages/contact.d.ts.map +1 -1
- package/lib/translations/pages/contact.js +17 -20
- package/lib/translations/server/endpoints.d.ts +0 -62
- package/lib/translations/server/endpoints.d.ts.map +1 -1
- package/lib/translations/server/endpoints.js +1 -139
- package/lib/translations/translations-context.d.ts +1 -1
- package/lib/translations/translations-context.d.ts.map +1 -1
- package/lib/translations/types.d.ts +7 -13
- package/lib/translations/types.d.ts.map +1 -1
- package/lib/translations/utils.d.ts +0 -7
- package/lib/translations/utils.d.ts.map +1 -1
- package/lib/translations/utils.js +0 -26
- package/lib/types/submit-payloads.d.ts +1 -0
- package/lib/types/submit-payloads.d.ts.map +1 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/validation/validationRules.d.ts.map +1 -1
- package/lib/validation/validationRules.js +7 -0
- package/package.json +37 -32
- package/lib/components/icon/icon-wrapper.d.ts +0 -30
- package/lib/components/icon/icon-wrapper.d.ts.map +0 -1
- package/lib/components/icon/icon-wrapper.js +0 -39
- package/lib/components/icon/mono-icon-new.d.ts +0 -32
- package/lib/components/icon/mono-icon-new.d.ts.map +0 -1
- package/lib/components/icon/mono-icon-new.js +0 -43
- package/lib/translations/common/index.d.ts +0 -3
- package/lib/translations/common/index.d.ts.map +0 -1
- package/lib/translations/common/index.js +0 -7
- package/lib/translations/common/layout.d.ts +0 -8
- package/lib/translations/common/layout.d.ts.map +0 -1
- package/lib/translations/common/layout.js +0 -39
- package/lib/translations/common/titles.d.ts +0 -4
- package/lib/translations/common/titles.d.ts.map +0 -1
- package/lib/translations/common/titles.js +0 -25
- package/lib/translations/json-to-override.d.ts +0 -19
- package/lib/translations/json-to-override.d.ts.map +0 -1
- package/lib/translations/json-to-override.js +0 -65
- package/lib/translations/load-org-translations.d.ts +0 -19
- package/lib/translations/load-org-translations.d.ts.map +0 -1
- package/lib/translations/load-org-translations.js +0 -23
package/README.md
CHANGED
|
@@ -26,19 +26,9 @@ export const contactFormConfig: ContactFormConfig = {
|
|
|
26
26
|
light: { /* colors, spacer, border */ },
|
|
27
27
|
dark: { /* same structure */ },
|
|
28
28
|
},
|
|
29
|
-
icons: {
|
|
30
|
-
'transportation/BusFill': MyBusIcon,
|
|
31
|
-
// ... see Icon set section below
|
|
32
|
-
},
|
|
33
29
|
api: {
|
|
34
|
-
baseUrl: '/api',
|
|
35
|
-
endpoints: { submitForm: '/contact/submit' },
|
|
36
30
|
onSubmit,
|
|
37
31
|
},
|
|
38
|
-
org: {
|
|
39
|
-
name: 'Your Company',
|
|
40
|
-
supportEmail: 'support@yourcompany.com',
|
|
41
|
-
},
|
|
42
32
|
};
|
|
43
33
|
```
|
|
44
34
|
|
|
@@ -74,37 +64,65 @@ export default function ContactPage() {
|
|
|
74
64
|
|
|
75
65
|
## API configuration
|
|
76
66
|
|
|
77
|
-
The package is decoupled from your backend.
|
|
67
|
+
The package is decoupled from your backend. By default, it POSTs to
|
|
68
|
+
`endpoints.submit` (`/api/contact/submit`) with `{ ...state, $slug: slug }`
|
|
69
|
+
in the body — no `onSubmit` needed:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
api: {
|
|
73
|
+
endpoints: {
|
|
74
|
+
submit: '/api/contact/submit', // Optional, this is the default
|
|
75
|
+
},
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Pair that with `createSubmitRouteHandler` for the route itself — it reads
|
|
80
|
+
`$slug` from the body and forwards the rest to your connector at that path:
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
// app/api/contact/submit/route.ts
|
|
84
|
+
import { createSubmitRouteHandler } from '@mrfylke/contact-form/server';
|
|
85
|
+
|
|
86
|
+
export const POST = createSubmitRouteHandler({
|
|
87
|
+
request: (path, init) => fetch(`${process.env.CONNECTOR_URL}${path}`, init),
|
|
88
|
+
});
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Overriding the submit callback
|
|
92
|
+
|
|
93
|
+
For full control over routing, provide your own `onSubmit` callback instead —
|
|
94
|
+
it receives the form slug and form state:
|
|
78
95
|
|
|
79
96
|
```ts
|
|
80
|
-
import type {
|
|
97
|
+
import type { FormSlug } from '@mrfylke/contact-form';
|
|
81
98
|
|
|
82
99
|
const onSubmit = async (
|
|
83
|
-
|
|
100
|
+
slug: FormSlug,
|
|
84
101
|
state: Record<string, unknown>,
|
|
85
102
|
): Promise<Response> => {
|
|
86
103
|
return fetch('/api/contact/submit', {
|
|
87
104
|
method: 'POST',
|
|
88
105
|
headers: { 'Content-Type': 'application/json' },
|
|
89
|
-
body: JSON.stringify({ ...state, formType:
|
|
106
|
+
body: JSON.stringify({ ...state, formType: slug }),
|
|
90
107
|
});
|
|
91
108
|
};
|
|
92
109
|
```
|
|
93
110
|
|
|
94
|
-
|
|
111
|
+
See `FormSlug` for the full set of possible values.
|
|
95
112
|
|
|
96
113
|
### Routing submissions to different endpoints
|
|
97
114
|
|
|
98
115
|
```ts
|
|
99
|
-
const onSubmit = async (
|
|
100
|
-
const endpointMap: Record<
|
|
101
|
-
|
|
102
|
-
refund:
|
|
103
|
-
|
|
104
|
-
ticketing:
|
|
105
|
-
|
|
116
|
+
const onSubmit = async (slug: FormSlug, state) => {
|
|
117
|
+
const endpointMap: Record<FormSlug, string> = {
|
|
118
|
+
'ticket-control': '/api/contact/ticket-control',
|
|
119
|
+
refund: '/api/contact/refund',
|
|
120
|
+
'means-of-transport': '/api/contact/means-of-transport',
|
|
121
|
+
ticketing: '/api/contact/ticketing',
|
|
122
|
+
'journey-info': '/api/contact/journey-info',
|
|
123
|
+
'lost-property': '/api/contact/lost-property',
|
|
106
124
|
};
|
|
107
|
-
return fetch(endpointMap[
|
|
125
|
+
return fetch(endpointMap[slug], {
|
|
108
126
|
method: 'POST',
|
|
109
127
|
headers: { 'Content-Type': 'application/json' },
|
|
110
128
|
body: JSON.stringify(state),
|
|
@@ -397,7 +415,7 @@ See the `apps/next-demo` directory for a complete implementation, including comm
|
|
|
397
415
|
|
|
398
416
|
## Troubleshooting
|
|
399
417
|
|
|
400
|
-
**`useContactFormConfig must be used within
|
|
418
|
+
**`useContactFormConfig must be used within ContactFormRoot`** — wrap your app with `<ContactFormRoot>`.
|
|
401
419
|
|
|
402
420
|
**Icons not showing** — verify all required icon keys are provided and check the browser console for warnings.
|
|
403
421
|
|
package/lib/ContactFormRoot.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { type ContactFormConfig } from './modules/config';
|
|
3
3
|
import { type ContactFormTranslationsOverride, Language } from './translations';
|
|
4
4
|
export type ContactFormRootProps = {
|
|
@@ -19,5 +19,5 @@ export type ContactFormRootProps = {
|
|
|
19
19
|
* providers together. Renders children inside the provider stack so
|
|
20
20
|
* consumers can pass their routes/layout as children.
|
|
21
21
|
*/
|
|
22
|
-
export declare function ContactFormRoot({ config, language, theme, translationsOverride, children, }: ContactFormRootProps):
|
|
22
|
+
export declare function ContactFormRoot({ config, language, theme, translationsOverride, children, }: ContactFormRootProps): React.JSX.Element;
|
|
23
23
|
//# sourceMappingURL=ContactFormRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactFormRoot.d.ts","sourceRoot":"","sources":["../src/ContactFormRoot.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"ContactFormRoot.d.ts","sourceRoot":"","sources":["../src/ContactFormRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EACL,KAAK,iBAAiB,EAGvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEL,KAAK,+BAA+B,EACpC,QAAQ,EACT,MAAM,gBAAgB,CAAC;AAQxB,MAAM,MAAM,oBAAoB,GAAG;IACjC,mEAAmE;IACnE,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,+BAA+B,CAAC;IACvD,sDAAsD;IACtD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,QAAQ,EACR,KAAK,EACL,oBAAoB,EACpB,QAAQ,GACT,EAAE,oBAAoB,qBAsBtB"}
|
package/lib/ContactFormRoot.js
CHANGED
|
@@ -16,11 +16,13 @@ function ThemeSync({ children }) {
|
|
|
16
16
|
* consumers can pass their routes/layout as children.
|
|
17
17
|
*/
|
|
18
18
|
function ContactFormRoot({ config, language, theme, translationsOverride, children, }) {
|
|
19
|
-
// Merge config translations (
|
|
19
|
+
// Merge config translations (optional) with optional root-level override (override takes precedence)
|
|
20
|
+
const configTranslations = config.translations ?? {};
|
|
20
21
|
const mergedTranslations = translationsOverride
|
|
21
|
-
? deepMerge(
|
|
22
|
-
:
|
|
23
|
-
|
|
22
|
+
? deepMerge(configTranslations, translationsOverride)
|
|
23
|
+
: configTranslations;
|
|
24
|
+
const mergedConfig = (0, config_1.mergeConfigThemeOverrides)(config);
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(config_1.ContactFormConfigContext.Provider, { value: mergedConfig, children: (0, jsx_runtime_1.jsx)(theme_1.ThemeProvider, { theme: theme, children: (0, jsx_runtime_1.jsx)(ThemeSync, { children: (0, jsx_runtime_1.jsx)(translations_1.AppLanguageProvider, { overrides: mergedTranslations, language: language, children: children }) }) }) }));
|
|
24
26
|
}
|
|
25
27
|
function deepMerge(target, source) {
|
|
26
28
|
const result = { ...target };
|
|
@@ -22,6 +22,6 @@ export type ButtonLinkProps = {
|
|
|
22
22
|
*/
|
|
23
23
|
shallow?: boolean;
|
|
24
24
|
} & ButtonBaseProps;
|
|
25
|
-
export declare function ButtonLink({ href, onClick, testID, aProps, shallow, ...props }: ButtonLinkProps):
|
|
25
|
+
export declare function ButtonLink({ href, onClick, testID, aProps, shallow, ...props }: ButtonLinkProps): React.JSX.Element;
|
|
26
26
|
export default ButtonLink;
|
|
27
27
|
//# sourceMappingURL=link.d.ts.map
|
|
@@ -1 +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,EAEL,eAAe,EAGhB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAEhC,MAAM,MAAM,eAAe,GAAG;IAC5B;;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;CACnB,GAAG,eAAe,CAAC;AAEpB,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,MAAM,EACN,MAAW,EACX,OAAe,EACf,GAAG,KAAK,EACT,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/components/button/link.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,eAAe,EAGhB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAEhC,MAAM,MAAM,eAAe,GAAG;IAC5B;;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;CACnB,GAAG,eAAe,CAAC;AAEpB,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,MAAM,EACN,MAAW,EACX,OAAe,EACf,GAAG,KAAK,EACT,EAAE,eAAe,qBAkCjB;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
1
|
+
import React, { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { ContrastColor } from '@atb-as/theme';
|
|
3
3
|
export type ButtonModes = 'interactive_0' | 'interactive_0--bordered' | 'interactive_0--bordered-light-outline' | 'interactive_1' | 'interactive_2' | 'interactive_2--light-outline' | 'interactive_3' | 'destructive' | 'transparent' | 'primary' | 'secondary' | 'transparent--underline';
|
|
4
4
|
export type RadiusMode = 'top' | 'bottom' | 'top-bottom' | 'none';
|
|
@@ -64,6 +64,6 @@ export type ButtonBaseProps = {
|
|
|
64
64
|
export declare function getButtonStyle(props: ButtonBaseProps): CSSProperties;
|
|
65
65
|
export declare function getButtonStyleForColor(color: ContrastColor): CSSProperties;
|
|
66
66
|
export declare function getBaseButtonClassName({ mode, size, state, radius, radiusSize, display, disabled, className, }: ButtonBaseProps): string;
|
|
67
|
-
declare function ButtonBase({ title, icon, state }: ButtonBaseProps):
|
|
67
|
+
declare function ButtonBase({ title, icon, state }: ButtonBaseProps): React.JSX.Element;
|
|
68
68
|
export { ButtonBase };
|
|
69
69
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/button/utils.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/button/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG9C,MAAM,MAAM,WAAW,GACnB,eAAe,GACf,yBAAyB,GACzB,uCAAuC,GACvC,eAAe,GACf,eAAe,GACf,8BAA8B,GAC9B,eAAe,GACf,aAAa,GACb,aAAa,GACb,SAAS,GACT,WAAW,GACX,wBAAwB,CAAC;AAE7B,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,CAAC;AAElE,KAAK,oBAAoB,GACrB;IACE,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACzC,eAAe,CAAC,EAAE,KAAK,CAAC;CACzB,GACD;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,eAAe,EAAE,aAAa,CAAC;CAChC,CAAC;AAEN,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAE/C;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IAEtC;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IAEpB;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAEpC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;QACb,IAAI,EAAE,SAAS,CAAC;QAChB,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC,CAAC;CACJ,GAAG,oBAAoB,CAAC;AAEzB,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,GAAG,aAAa,CAGpE;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,CAK1E;AAED,wBAAgB,sBAAsB,CAAC,EACrC,IAAsB,EACtB,IAAc,EACd,KAAc,EACd,MAAqB,EACrB,UAAsB,EACtB,OAAiB,EACjB,QAAgB,EAChB,SAAqB,GACtB,EAAE,eAAe,UAajB;AAED,iBAAS,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,eAAe,qBAa1D;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -9,5 +9,5 @@ export type CheckboxProps = {
|
|
|
9
9
|
expand?: boolean;
|
|
10
10
|
onClick?: () => void;
|
|
11
11
|
};
|
|
12
|
-
export default function Checkbox({ onChange, error, disabled, readonly, label, description, checked, expand, onClick, }: CheckboxProps): import("react
|
|
12
|
+
export default function Checkbox({ onChange, error, disabled, readonly, label, description, checked, expand, onClick, }: CheckboxProps): import("react").JSX.Element;
|
|
13
13
|
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,QAAgB,EAChB,KAAK,EACL,WAAW,EACX,OAAe,EACf,MAAc,EACd,OAAO,GACR,EAAE,aAAa
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,QAAgB,EAChB,KAAK,EACL,WAAW,EACX,OAAe,EACf,MAAc,EACd,OAAO,GACR,EAAE,aAAa,+BAyCf"}
|
|
@@ -2,5 +2,5 @@ export type ErrorMessageProps = {
|
|
|
2
2
|
message: string;
|
|
3
3
|
id?: string;
|
|
4
4
|
};
|
|
5
|
-
export default function ErrorMessage({ message, id }: ErrorMessageProps): import("react
|
|
5
|
+
export default function ErrorMessage({ message, id }: ErrorMessageProps): import("react").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=error-message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-message.d.ts","sourceRoot":"","sources":["../../../src/components/error-message/error-message.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,iBAAiB
|
|
1
|
+
{"version":3,"file":"error-message.d.ts","sourceRoot":"","sources":["../../../src/components/error-message/error-message.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,iBAAiB,+BAOtE"}
|
|
@@ -10,5 +10,5 @@ export type ExternalLinkPageProps = {
|
|
|
10
10
|
* Component for rendering a page that links to an external website.
|
|
11
11
|
* Used when a contact page is configured with an externalUrl in pages.externalUrlByPageId.
|
|
12
12
|
*/
|
|
13
|
-
export declare function ExternalLinkPage({ url, title, description, }: ExternalLinkPageProps): import("react
|
|
13
|
+
export declare function ExternalLinkPage({ url, title, description, }: ExternalLinkPageProps): import("react").JSX.Element;
|
|
14
14
|
//# sourceMappingURL=external-link-page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-link-page.d.ts","sourceRoot":"","sources":["../../src/components/external-link-page.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,qBAAqB,GAAG;IAClC,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,KAAK,EACL,WAAW,GACZ,EAAE,qBAAqB
|
|
1
|
+
{"version":3,"file":"external-link-page.d.ts","sourceRoot":"","sources":["../../src/components/external-link-page.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,qBAAqB,GAAG;IAClC,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,KAAK,EACL,WAAW,GACZ,EAAE,qBAAqB,+BA2CvB"}
|
|
@@ -7,5 +7,5 @@ export type DateSelectorProps = {
|
|
|
7
7
|
errorMessage?: TranslatedString;
|
|
8
8
|
onChange: (value: string) => void;
|
|
9
9
|
};
|
|
10
|
-
export default function DateSelector({ id, label, value, isRequired, errorMessage, onChange, }: DateSelectorProps): import("react
|
|
10
|
+
export default function DateSelector({ id, label, value, isRequired, errorMessage, onChange, }: DateSelectorProps): import("react").JSX.Element;
|
|
11
11
|
//# sourceMappingURL=date-selector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-selector.d.ts","sourceRoot":"","sources":["../../../src/components/form/date-selector.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,gBAAgB,EAAkB,MAAM,oBAAoB,CAAC;AAItE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,EAAE,EACF,KAAK,EACL,KAAK,EACL,UAAU,EACV,YAAY,EACZ,QAAQ,GACT,EAAE,iBAAiB
|
|
1
|
+
{"version":3,"file":"date-selector.d.ts","sourceRoot":"","sources":["../../../src/components/form/date-selector.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,gBAAgB,EAAkB,MAAM,oBAAoB,CAAC;AAItE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,EAAE,EACF,KAAK,EACL,KAAK,EACL,UAAU,EACV,YAAY,EACZ,QAAQ,GACT,EAAE,iBAAiB,+BAuEnB"}
|
|
@@ -15,8 +15,8 @@ const error_message_1 = require("../error-message");
|
|
|
15
15
|
function DateSelector({ id, label, value, isRequired, errorMessage, onChange, }) {
|
|
16
16
|
const { t } = (0, translations_1.useTranslation)();
|
|
17
17
|
const zonedDateTime = value ? (0, date_1.fromDate)(new Date(value), 'Europe/Oslo') : null;
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: form_module_css_1.default.dateSelectorContainer, children: [(0, jsx_runtime_1.jsxs)(react_aria_components_1.DatePicker, {
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: form_module_css_1.default.dateSelectorContainer, children: [(0, jsx_runtime_1.jsxs)(react_aria_components_1.DatePicker, { granularity: "day", value: zonedDateTime, onChange: (e) => e && onChange(e.toString().slice(0, 10)), onOpenChange: (isOpen) => {
|
|
19
19
|
if (isOpen && !value)
|
|
20
20
|
onChange((0, date_1.today)('Europe/Oslo').toString());
|
|
21
|
-
}, className: form_module_css_1.default.dateSelector, shouldForceLeadingZeros: true, "aria-label": label, "aria-labelledby": `label-${id}`, children: [(0, jsx_runtime_1.jsx)(form_component_label_1.default, { label: label,
|
|
21
|
+
}, className: form_module_css_1.default.dateSelector, shouldForceLeadingZeros: true, "aria-label": label, "aria-labelledby": `label-${id}`, children: [(0, jsx_runtime_1.jsx)(form_component_label_1.default, { label: label, id: `label-${id}`, isRequired: isRequired }), (0, jsx_runtime_1.jsxs)(react_aria_components_1.Group, { className: form_module_css_1.default.calendarSelectorGroup, children: [(0, jsx_runtime_1.jsx)(react_aria_components_1.DateInput, { className: form_module_css_1.default.dateSelectorInput, children: (segment) => ((0, jsx_runtime_1.jsx)(react_aria_components_1.DateSegment, { segment: segment, className: form_module_css_1.default.dateSelectorSegment })) }), (0, jsx_runtime_1.jsx)(react_aria_components_1.Button, { className: form_module_css_1.default.calendarButton, children: (0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: "time/Date" }) })] }), (0, jsx_runtime_1.jsx)(react_aria_components_1.Popover, { className: form_module_css_1.default.calendarDialog, placement: "bottom right", children: (0, jsx_runtime_1.jsx)(react_aria_components_1.Dialog, { children: (0, jsx_runtime_1.jsxs)(react_aria_components_1.Calendar, { children: [(0, jsx_runtime_1.jsxs)("header", { className: form_module_css_1.default.calendarDialog__header, children: [(0, jsx_runtime_1.jsx)(react_aria_components_1.Button, { slot: "previous", className: form_module_css_1.default.calendarDialog__headerButtons, children: (0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: "navigation/ArrowLeft" }) }), (0, jsx_runtime_1.jsx)(react_aria_components_1.Heading, { className: form_module_css_1.default.calendarDialog__title }), (0, jsx_runtime_1.jsx)(react_aria_components_1.Button, { slot: "next", className: form_module_css_1.default.calendarDialog__headerButtons, children: (0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: "navigation/ArrowRight" }) })] }), (0, jsx_runtime_1.jsx)(react_aria_components_1.CalendarGrid, { className: form_module_css_1.default.calendarGrid, children: (date) => ((0, jsx_runtime_1.jsx)(react_aria_components_1.CalendarCell, { date: date, className: form_module_css_1.default.calendarGrid__cell })) })] }) }) })] }), (0, jsx_runtime_1.jsx)("input", { id: `date_selector__${id}`, type: "hidden", value: value ?? '' }), errorMessage && (0, jsx_runtime_1.jsx)(error_message_1.ErrorMessage, { message: t(errorMessage) })] }));
|
|
22
22
|
}
|
|
@@ -11,6 +11,6 @@ type DepartureTimeFieldProps = {
|
|
|
11
11
|
isRequired?: boolean;
|
|
12
12
|
errorMessage?: TranslatedString;
|
|
13
13
|
};
|
|
14
|
-
export declare function DepartureTimeField({ id, date, lineId, fromStopId, toStopId, selectedTripId, plannedDepartureTime, onChange, isRequired, errorMessage, }: DepartureTimeFieldProps): import("react
|
|
14
|
+
export declare function DepartureTimeField({ id, date, lineId, fromStopId, toStopId, selectedTripId, plannedDepartureTime, onChange, isRequired, errorMessage, }: DepartureTimeFieldProps): import("react").JSX.Element;
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=departure-time-field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"departure-time-field.d.ts","sourceRoot":"","sources":["../../../src/components/form/departure-time-field.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,gBAAgB,EAGjB,MAAM,oBAAoB,CAAC;AAI5B,KAAK,uBAAuB,GAAG;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,EAAE,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,EAA2B,EAC3B,IAAI,EACJ,MAAM,EACN,UAAU,EACV,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,YAAY,GACb,EAAE,uBAAuB
|
|
1
|
+
{"version":3,"file":"departure-time-field.d.ts","sourceRoot":"","sources":["../../../src/components/form/departure-time-field.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,gBAAgB,EAGjB,MAAM,oBAAoB,CAAC;AAI5B,KAAK,uBAAuB,GAAG;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,EAAE,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,EAA2B,EAC3B,IAAI,EACJ,MAAM,EACN,UAAU,EACV,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,YAAY,GACb,EAAE,uBAAuB,+BAoDzB"}
|
|
@@ -8,6 +8,6 @@ type DescriptionModalProps = {
|
|
|
8
8
|
isModalOpen: boolean;
|
|
9
9
|
closeModal: () => void;
|
|
10
10
|
};
|
|
11
|
-
declare const DescriptionModal: ({ title, modalContent, isModalOpen, closeModal, }: DescriptionModalProps) => import("react
|
|
11
|
+
declare const DescriptionModal: ({ title, modalContent, isModalOpen, closeModal, }: DescriptionModalProps) => import("react").JSX.Element | null;
|
|
12
12
|
export default DescriptionModal;
|
|
13
13
|
//# sourceMappingURL=description-modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description-modal.d.ts","sourceRoot":"","sources":["../../../src/components/form/description-modal.tsx"],"names":[],"mappings":"AASA,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE;QACZ,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;KACzB,CAAC;IACF,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,gBAAgB,GAAI,mDAKvB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"description-modal.d.ts","sourceRoot":"","sources":["../../../src/components/form/description-modal.tsx"],"names":[],"mappings":"AASA,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE;QACZ,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;KACzB,CAAC;IACF,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,gBAAgB,GAAI,mDAKvB,qBAAqB,uCA2FvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -3,6 +3,6 @@ import { TranslatedString } from '../../../translations';
|
|
|
3
3
|
export type FieldWrapperWithErrorProps = PropsWithChildren<{
|
|
4
4
|
errorMessage?: TranslatedString;
|
|
5
5
|
}>;
|
|
6
|
-
export declare const FieldWrapperWithError: ({ errorMessage, children, }: FieldWrapperWithErrorProps) => import("react
|
|
6
|
+
export declare const FieldWrapperWithError: ({ errorMessage, children, }: FieldWrapperWithErrorProps) => import("react").JSX.Element;
|
|
7
7
|
export default FieldWrapperWithError;
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/field-wrapper-with-error/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAkB,MAAM,uBAAuB,CAAC;AAGzE,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;IACzD,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC,CAAC,CAAC;AAEH,eAAO,MAAM,qBAAqB,GAAI,6BAGnC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/field-wrapper-with-error/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAkB,MAAM,uBAAuB,CAAC;AAGzE,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;IACzD,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC,CAAC,CAAC;AAEH,eAAO,MAAM,qBAAqB,GAAI,6BAGnC,0BAA0B,gCAS5B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -3,6 +3,6 @@ export type FieldsetProps = PropsWithChildren<{
|
|
|
3
3
|
title?: string;
|
|
4
4
|
isRequired?: boolean;
|
|
5
5
|
}>;
|
|
6
|
-
export declare const Fieldset: ({ title, isRequired, children, }: FieldsetProps) => import("react
|
|
6
|
+
export declare const Fieldset: ({ title, isRequired, children, }: FieldsetProps) => import("react").JSX.Element;
|
|
7
7
|
export default Fieldset;
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/fieldset/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC,CAAC;AAEH,eAAO,MAAM,QAAQ,GAAI,kCAItB,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/fieldset/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC,CAAC;AAEH,eAAO,MAAM,QAAQ,GAAI,kCAItB,aAAa,gCAkBf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -6,5 +6,5 @@ export type FileInputProps = {
|
|
|
6
6
|
errorMessage?: string;
|
|
7
7
|
onChange?: (files: File[]) => void;
|
|
8
8
|
} & Omit<React.JSX.IntrinsicElements['input'], 'onChange'>;
|
|
9
|
-
export default function FileInput({ id, onChange, iconLabel, label, isRequired, name, errorMessage, }: FileInputProps): import("react
|
|
9
|
+
export default function FileInput({ id, onChange, iconLabel, label, isRequired, name, errorMessage, }: FileInputProps): import("react").JSX.Element;
|
|
10
10
|
//# sourceMappingURL=file-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-input.d.ts","sourceRoot":"","sources":["../../../src/components/form/file-input.tsx"],"names":[],"mappings":"AAUA,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;CACpC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC;AAI3D,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,EAAE,EACF,QAAQ,EACR,SAAS,EACT,KAAK,EACL,UAAkB,EAClB,IAAI,EACJ,YAAY,GACb,EAAE,cAAc
|
|
1
|
+
{"version":3,"file":"file-input.d.ts","sourceRoot":"","sources":["../../../src/components/form/file-input.tsx"],"names":[],"mappings":"AAUA,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;CACpC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC;AAI3D,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,EAAE,EACF,QAAQ,EACR,SAAS,EACT,KAAK,EACL,UAAkB,EAClB,IAAI,EACJ,YAAY,GACb,EAAE,cAAc,+BAkHhB"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
type FormComponentLabelProps = {
|
|
2
2
|
label: string;
|
|
3
|
-
|
|
3
|
+
id?: string;
|
|
4
|
+
htmlFor?: string;
|
|
4
5
|
disabled?: boolean;
|
|
5
6
|
isRequired?: boolean;
|
|
6
7
|
};
|
|
7
|
-
export declare const FormComponentLabel: ({ label, htmlFor, disabled, isRequired, }: FormComponentLabelProps) => import("react
|
|
8
|
+
export declare const FormComponentLabel: ({ label, id, htmlFor, disabled, isRequired, }: FormComponentLabelProps) => import("react").JSX.Element;
|
|
8
9
|
export default FormComponentLabel;
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/form-component-label/index.tsx"],"names":[],"mappings":"AAIA,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/form-component-label/index.tsx"],"names":[],"mappings":"AAIA,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,+CAMhC,uBAAuB,gCAczB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -8,8 +8,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
8
8
|
const typography_1 = require("../../typography");
|
|
9
9
|
const form_component_label_module_css_1 = __importDefault(require("./form-component-label.module.css"));
|
|
10
10
|
const css_1 = require("../../../utils/css");
|
|
11
|
-
const FormComponentLabel = ({ label, htmlFor, disabled = false, isRequired = false, }) => {
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)("label", { htmlFor: htmlFor, children: (0, jsx_runtime_1.jsx)(typography_1.Typo.span, { textType: "body__m", className: (0, css_1.andIf)({
|
|
11
|
+
const FormComponentLabel = ({ label, id, htmlFor, disabled = false, isRequired = false, }) => {
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)("label", { id: id, htmlFor: htmlFor, children: (0, jsx_runtime_1.jsx)(typography_1.Typo.span, { textType: "body__m", className: (0, css_1.andIf)({
|
|
13
13
|
[form_component_label_module_css_1.default.disabled]: disabled,
|
|
14
14
|
[form_component_label_module_css_1.default.required]: isRequired,
|
|
15
15
|
}), children: label }) }));
|
|
@@ -12,6 +12,6 @@ type InputProps = {
|
|
|
12
12
|
errorMessage?: TranslatedString;
|
|
13
13
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
14
14
|
} & React.JSX.IntrinsicElements['input'];
|
|
15
|
-
export declare const Input: ({ id, label, errorMessage, type, name, checked, value, modalContent, disabled, onChange, placeholder, isRequired, }: InputProps) =>
|
|
15
|
+
export declare const Input: ({ id, label, errorMessage, type, name, checked, value, modalContent, disabled, onChange, placeholder, isRequired, }: InputProps) => React.JSX.Element;
|
|
16
16
|
export default Input;
|
|
17
17
|
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/form/input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAY,MAAM,OAAO,CAAC;AAGrD,OAAO,EACL,gBAAgB,EAGjB,MAAM,oBAAoB,CAAC;AAM5B,KAAK,UAAU,GAAG;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;KACzB,CAAC;IACF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEzC,eAAO,MAAM,KAAK,GAAI,qHAanB,UAAU,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/form/input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAY,MAAM,OAAO,CAAC;AAGrD,OAAO,EACL,gBAAgB,EAGjB,MAAM,oBAAoB,CAAC;AAM5B,KAAK,UAAU,GAAG;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;KACzB,CAAC;IACF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEzC,eAAO,MAAM,KAAK,GAAI,qHAanB,UAAU,sBAmEZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -3,5 +3,5 @@ export type RadioInputProps = {
|
|
|
3
3
|
label: string;
|
|
4
4
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
5
5
|
} & React.JSX.IntrinsicElements['input'];
|
|
6
|
-
export default function Radio({ onChange, checked, label, value, name, }: RadioInputProps):
|
|
6
|
+
export default function Radio({ onChange, checked, label, value, name, }: RadioInputProps): React.JSX.Element;
|
|
7
7
|
//# sourceMappingURL=radio.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/form/radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAS,MAAM,OAAO,CAAC;AAIlD,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,IAAI,GACL,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/form/radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAS,MAAM,OAAO,CAAC;AAIlD,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,IAAI,GACL,EAAE,eAAe,qBAoBjB"}
|
|
@@ -14,5 +14,5 @@ export type SearchableSelectProps<T> = {
|
|
|
14
14
|
error?: string;
|
|
15
15
|
onChange: (value?: T) => void;
|
|
16
16
|
};
|
|
17
|
-
export default function SearchableSelect<T>({ id, label, value, placeholder, isDisabled, isRequired, options, error, onChange, }: SearchableSelectProps<T>): import("react
|
|
17
|
+
export default function SearchableSelect<T>({ id, label, value, placeholder, isDisabled, isRequired, options, error, onChange, }: SearchableSelectProps<T>): import("react").JSX.Element;
|
|
18
18
|
//# sourceMappingURL=searchable-select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchable-select.d.ts","sourceRoot":"","sources":["../../../../src/components/form/searchable-select/searchable-select.tsx"],"names":[],"mappings":"AAiBA,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAC/D,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;CAC/B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,EAAE,EAC1C,EAAE,EACF,KAAK,EACL,KAAK,EACL,WAAW,EACX,UAAU,EACV,UAAU,EACV,OAAO,EACP,KAAK,EACL,QAAQ,GACT,EAAE,qBAAqB,CAAC,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"searchable-select.d.ts","sourceRoot":"","sources":["../../../../src/components/form/searchable-select/searchable-select.tsx"],"names":[],"mappings":"AAiBA,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAC/D,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;CAC/B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,EAAE,EAC1C,EAAE,EACF,KAAK,EACL,KAAK,EACL,WAAW,EACX,UAAU,EACV,UAAU,EACV,OAAO,EACP,KAAK,EACL,QAAQ,GACT,EAAE,qBAAqB,CAAC,CAAC,CAAC,+BA+H1B"}
|
|
@@ -48,7 +48,7 @@ function SearchableSelect({ id, label, value, placeholder, isDisabled, isRequire
|
|
|
48
48
|
setInputValue(option?.name || inputValue);
|
|
49
49
|
onChange(option?.value);
|
|
50
50
|
};
|
|
51
|
-
return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.ComboBox, { items: filteredOptions, isDisabled: isDisabled, onSelectionChange: handleSelectionChange, className: form_module_css_1.default.searchable_select__comboBox, "aria-label": label,
|
|
51
|
+
return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.ComboBox, { items: filteredOptions, isDisabled: isDisabled, onSelectionChange: handleSelectionChange, className: form_module_css_1.default.searchable_select__comboBox, "aria-label": label, children: [(0, jsx_runtime_1.jsx)(form_component_label_1.default, { label: label, htmlFor: `searchable_select__${id}`, disabled: isDisabled, isRequired: isRequired }), (0, jsx_runtime_1.jsxs)(react_aria_components_1.Group, { className: form_module_css_1.default.searchable_select__group, children: [(0, jsx_runtime_1.jsx)(react_aria_components_1.Input, { id: `searchable_select__${id}`, placeholder: placeholder, className: (0, css_1.andIf)({
|
|
52
52
|
[form_module_css_1.default.searchable_select__input]: true,
|
|
53
53
|
[form_module_css_1.default.searchable_select__input_disabled]: !!isDisabled,
|
|
54
54
|
}), value: inputValue, onChange: (e) => handleInputChange(e.target.value), onFocus: handleFocus, onBlur: handleBlur }), (0, jsx_runtime_1.jsx)(react_aria_components_1.Button, { className: form_module_css_1.default.searchable_select__button, children: (0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: 'navigation/ExpandMore' }) })] }), (0, jsx_runtime_1.jsx)(react_aria_components_1.Popover, { className: form_module_css_1.default.searchable_select__popover, children: (0, jsx_runtime_1.jsxs)(react_aria_components_1.ListBox, { className: form_module_css_1.default.searchable_select__listBox, children: [(0, jsx_runtime_1.jsx)(react_aria_components_1.ListBoxItem, { textValue: placeholder, isDisabled: true, className: form_module_css_1.default.searchable_select__listBoxItem, children: (0, jsx_runtime_1.jsxs)("div", { className: form_module_css_1.default.searchable_select__item, children: [(0, jsx_runtime_1.jsx)("span", { className: form_module_css_1.default.searchable_select__truncate, children: placeholder }), (0, jsx_runtime_1.jsx)("span", { children: !value && (0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: 'actions/Confirm' }) })] }) }), filteredOptions.map((item) => ((0, jsx_runtime_1.jsx)(react_aria_components_1.ListBoxItem, { id: item.id, textValue: item.name, className: form_module_css_1.default.searchable_select__listBoxItem, children: ({ isSelected, isFocused }) => ((0, jsx_runtime_1.jsxs)("div", { className: `${form_module_css_1.default.searchable_select__item} ${isFocused ? form_module_css_1.default.searchable_select__highlight : ''} ${isSelected && value ? form_module_css_1.default.searchable_select__selected : ''}`, children: [(0, jsx_runtime_1.jsx)("span", { className: form_module_css_1.default.searchable_select__truncate, children: item.name }), (0, jsx_runtime_1.jsx)("span", { children: value && isSelected && ((0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: 'actions/Confirm' })) })] })) }, item.id)))] }) }), showError && (0, jsx_runtime_1.jsx)(error_message_1.ErrorMessage, { message: error })] }));
|
|
@@ -11,5 +11,5 @@ export type SelectProps<T> = {
|
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
isRequired?: boolean;
|
|
13
13
|
};
|
|
14
|
-
export default function CustomSelect<T>({ id, label, onChange, error, value, options, valueToId, valueToText, placeholder, disabled, isRequired, }: SelectProps<T>): import("react
|
|
14
|
+
export default function CustomSelect<T>({ id, label, onChange, error, value, options, valueToId, valueToText, placeholder, disabled, isRequired, }: SelectProps<T>): import("react").JSX.Element;
|
|
15
15
|
//# sourceMappingURL=select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/form/select.tsx"],"names":[],"mappings":"AAaA,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,CAAC,EAAE,EACtC,EAAE,EACF,KAAK,EACL,QAAQ,EACR,KAAK,EACL,KAAK,EACL,OAAO,EACP,SAAS,EACT,WAAW,EACX,WAAW,EACX,QAAQ,EACR,UAAU,GACX,EAAE,WAAW,CAAC,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/form/select.tsx"],"names":[],"mappings":"AAaA,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,CAAC,EAAE,EACtC,EAAE,EACF,KAAK,EACL,QAAQ,EACR,KAAK,EACL,KAAK,EACL,OAAO,EACP,SAAS,EACT,WAAW,EACX,WAAW,EACX,QAAQ,EACR,UAAU,GACX,EAAE,WAAW,CAAC,CAAC,CAAC,+BAmFhB"}
|
|
@@ -18,5 +18,5 @@ function CustomSelect({ id, label, onChange, error, value, options, valueToId, v
|
|
|
18
18
|
return;
|
|
19
19
|
onChange(findItemFromOptions(key.toString()));
|
|
20
20
|
};
|
|
21
|
-
return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.Select, { id: `select__${id}`, onSelectionChange: onChangeInternal, isDisabled: disabled, className: form_module_css_1.default.select__select_container, "aria-label": label,
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.Select, { id: `select__${id}`, onSelectionChange: onChangeInternal, isDisabled: disabled, className: form_module_css_1.default.select__select_container, "aria-label": label, children: [label && ((0, jsx_runtime_1.jsx)(form_component_label_1.default, { label: label, htmlFor: `select__${id}`, disabled: disabled, isRequired: isRequired })), (0, jsx_runtime_1.jsxs)(react_aria_components_1.Button, { className: form_module_css_1.default.select__button, children: [value ? ((0, jsx_runtime_1.jsx)("span", { children: valueToText(value) })) : ((0, jsx_runtime_1.jsx)("span", { className: `${form_module_css_1.default.select__placeholder} ${disabled ? form_module_css_1.default.label_disabled : ''}`, children: placeholder })), (0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: 'navigation/ExpandMore' })] }), (0, jsx_runtime_1.jsx)(react_aria_components_1.Popover, { className: form_module_css_1.default.select__popover, children: (0, jsx_runtime_1.jsxs)(react_aria_components_1.ListBox, { className: form_module_css_1.default.select__listBox, children: [(0, jsx_runtime_1.jsx)(react_aria_components_1.ListBoxItem, { isDisabled: true, textValue: placeholder, className: form_module_css_1.default.select__listBoxItem, children: (0, jsx_runtime_1.jsxs)("div", { className: form_module_css_1.default.select__item, children: [(0, jsx_runtime_1.jsx)("span", { className: form_module_css_1.default.select__placholder, children: placeholder }), !value && (0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: 'actions/Confirm' })] }) }), options.map((option) => ((0, jsx_runtime_1.jsx)(react_aria_components_1.ListBoxItem, { id: `${valueToId(option)}`, textValue: valueToText(option), className: form_module_css_1.default.select__listBoxItem, children: ({ isSelected, isFocused }) => ((0, jsx_runtime_1.jsxs)("div", { className: `${form_module_css_1.default.select__item} ${isFocused ? form_module_css_1.default.select__highlight : ''}`, children: [(0, jsx_runtime_1.jsx)("span", { children: valueToText(option) }), (0, jsx_runtime_1.jsx)("span", { children: value && isSelected ? ((0, jsx_runtime_1.jsx)(icon_1.MonoIcon, { icon: 'actions/Confirm' })) : ('\u00A0') })] })) }, `key-option-${valueToId(option)}`)))] }) }), showError && (0, jsx_runtime_1.jsx)(error_message_1.ErrorMessage, { message: error })] }));
|
|
22
22
|
}
|
|
@@ -7,5 +7,5 @@ export type CheckboxProps = {
|
|
|
7
7
|
fileInputProps?: FileInputProps;
|
|
8
8
|
onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
9
9
|
} & React.JSX.IntrinsicElements['textarea'];
|
|
10
|
-
export default function Textarea({ id, description, onChange, error, isRequired, value, fileInputProps, }: CheckboxProps): import("react
|
|
10
|
+
export default function Textarea({ id, description, onChange, error, isRequired, value, fileInputProps, }: CheckboxProps): import("react").JSX.Element;
|
|
11
11
|
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/form/textarea.tsx"],"names":[],"mappings":"AACA,OAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAKzD,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;CACnE,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;AAE5C,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,EAAE,EACF,WAAW,EACX,QAAQ,EACR,KAAK,EACL,UAAkB,EAClB,KAAK,EACL,cAAc,GACf,EAAE,aAAa
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/form/textarea.tsx"],"names":[],"mappings":"AACA,OAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAKzD,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;CACnE,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;AAE5C,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,EAAE,EACF,WAAW,EACX,QAAQ,EACR,KAAK,EACL,UAAkB,EAClB,KAAK,EACL,cAAc,GACf,EAAE,aAAa,+BAyBf"}
|
|
@@ -7,5 +7,5 @@ export type TimeSelectorProps = {
|
|
|
7
7
|
errorMessage?: TranslatedString;
|
|
8
8
|
onChange: (value: string) => void;
|
|
9
9
|
};
|
|
10
|
-
export default function TimeSelector({ id, label, value, isRequired, errorMessage, onChange, }: TimeSelectorProps): import("react
|
|
10
|
+
export default function TimeSelector({ id, label, value, isRequired, errorMessage, onChange, }: TimeSelectorProps): import("react").JSX.Element;
|
|
11
11
|
//# sourceMappingURL=time-selector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-selector.d.ts","sourceRoot":"","sources":["../../../src/components/form/time-selector.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAkB,MAAM,oBAAoB,CAAC;AAGtE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,EAAE,EACF,KAAK,EACL,KAAK,EACL,UAAU,EACV,YAAY,EACZ,QAAQ,GACT,EAAE,iBAAiB
|
|
1
|
+
{"version":3,"file":"time-selector.d.ts","sourceRoot":"","sources":["../../../src/components/form/time-selector.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAkB,MAAM,oBAAoB,CAAC;AAGtE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,EAAE,EACF,KAAK,EACL,KAAK,EACL,UAAU,EACV,YAAY,EACZ,QAAQ,GACT,EAAE,iBAAiB,+BAuCnB"}
|
|
@@ -14,9 +14,9 @@ const error_message_1 = require("../error-message");
|
|
|
14
14
|
function TimeSelector({ id, label, value, isRequired, errorMessage, onChange, }) {
|
|
15
15
|
const { t } = (0, translations_1.useTranslation)();
|
|
16
16
|
const parsedValue = value ? (0, date_1.parseTime)(value) : undefined;
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: form_module_css_1.default.timeSelectorContainer, children: [(0, jsx_runtime_1.jsxs)(react_aria_components_1.TimeField, {
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: form_module_css_1.default.timeSelectorContainer, children: [(0, jsx_runtime_1.jsxs)(react_aria_components_1.TimeField, { value: parsedValue, onChange: (change) => {
|
|
18
18
|
if (!change)
|
|
19
19
|
return;
|
|
20
20
|
onChange(change.toString());
|
|
21
|
-
}, hourCycle: 24, shouldForceLeadingZeros: true, className: form_module_css_1.default.timeSelector, "data-testid": "searchTimeSelector-time", granularity: "minute", "aria-label": label, "aria-labelledby": `label-${id}`, children: [(0, jsx_runtime_1.jsx)(form_component_label_1.default, { label: label,
|
|
21
|
+
}, hourCycle: 24, shouldForceLeadingZeros: true, className: form_module_css_1.default.timeSelector, "data-testid": "searchTimeSelector-time", granularity: "minute", "aria-label": label, "aria-labelledby": `label-${id}`, children: [(0, jsx_runtime_1.jsx)(form_component_label_1.default, { label: label, id: `label-${id}`, isRequired: isRequired }), (0, jsx_runtime_1.jsx)(react_aria_components_1.DateInput, { className: form_module_css_1.default.timeSelectorInput, children: (segment) => ((0, jsx_runtime_1.jsx)(react_aria_components_1.DateSegment, { className: form_module_css_1.default.timeSelectorSegment, segment: segment })) })] }), (0, jsx_runtime_1.jsx)("input", { id: `time_selector__${id}`, type: "hidden", value: value ?? '' }), errorMessage && (0, jsx_runtime_1.jsx)(error_message_1.ErrorMessage, { message: t(errorMessage) })] }));
|
|
22
22
|
}
|
|
@@ -10,5 +10,5 @@ export type CheckboxIconProps = Pick<React.JSX.IntrinsicElements['div'], 'classN
|
|
|
10
10
|
*/
|
|
11
11
|
checked: boolean;
|
|
12
12
|
};
|
|
13
|
-
export declare function CheckBoxIcon({ checked, size }: CheckboxIconProps): import("react
|
|
13
|
+
export declare function CheckBoxIcon({ checked, size }: CheckboxIconProps): import("react").JSX.Element;
|
|
14
14
|
//# sourceMappingURL=checkbox-icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/checkbox-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,SAAS,CAAC;AAuD7C,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAClC,WAAW,GAAG,MAAM,CACrB,GAAG;IACF;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,IAAe,EAAE,EAAE,iBAAiB
|
|
1
|
+
{"version":3,"file":"checkbox-icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/checkbox-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,SAAS,CAAC;AAuD7C,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAClC,WAAW,GAAG,MAAM,CACrB,GAAG;IACF;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,IAAe,EAAE,EAAE,iBAAiB,+BAa3E"}
|
|
@@ -13,5 +13,5 @@ export type ColorIconProps = Omit<React.JSX.IntrinsicElements['img'], 'src'> & {
|
|
|
13
13
|
*/
|
|
14
14
|
icon: ColorIcons;
|
|
15
15
|
};
|
|
16
|
-
export declare function ColorIcon({ icon, size, ...props }: ColorIconProps): import("react
|
|
16
|
+
export declare function ColorIcon({ icon, size, ...props }: ColorIconProps): import("react").JSX.Element;
|
|
17
17
|
//# sourceMappingURL=color-icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/color-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAS,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAW,MAAM,SAAS,CAAC;AAG7C,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG;IAC7E;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,IAAe,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc
|
|
1
|
+
{"version":3,"file":"color-icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/color-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAS,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAW,MAAM,SAAS,CAAC;AAG7C,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG;IAC7E;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,IAAe,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAiB5E"}
|