@roadtrip/components 3.32.5 → 3.33.1
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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/road-badge_14.cjs.entry.js +90 -32
- package/dist/cjs/road-badge_14.cjs.entry.js.map +1 -1
- package/dist/cjs/road-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/road-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/road-phone-number-input.cjs.entry.js +21 -66
- package/dist/cjs/road-phone-number-input.cjs.entry.js.map +1 -1
- package/dist/cjs/road-plate-number.cjs.entry.js +2 -2
- package/dist/cjs/road-profil-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/road-progress-indicator-horizontal.cjs.entry.js +1 -1
- package/dist/cjs/road-progress-indicator-vertical-item.cjs.entry.js +1 -1
- package/dist/cjs/road-progress-indicator-vertical.cjs.entry.js +1 -1
- package/dist/cjs/road-progress-tracker-item.cjs.entry.js +1 -1
- package/dist/cjs/road-progress-tracker.cjs.entry.js +1 -1
- package/dist/cjs/road-progress.cjs.entry.js +1 -1
- package/dist/cjs/road-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/road-radio.cjs.entry.js +1 -1
- package/dist/cjs/road-range.cjs.entry.js +2 -2
- package/dist/cjs/road-rating.cjs.entry.js +1 -1
- package/dist/cjs/road-segmented-button-bar.cjs.entry.js +1 -1
- package/dist/cjs/road-segmented-button.cjs.entry.js +2 -2
- package/dist/cjs/road-segmented-buttons.cjs.entry.js +1 -1
- package/dist/cjs/road-select-filter.cjs.entry.js +2 -2
- package/dist/cjs/road-select.cjs.entry.js +1 -1
- package/dist/cjs/road-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/road-spinner.cjs.entry.js +1 -1
- package/dist/cjs/road-switch.cjs.entry.js +2 -2
- package/dist/cjs/road-tab-bar.cjs.entry.js +2 -2
- package/dist/cjs/road-tab-button.cjs.entry.js +2 -2
- package/dist/cjs/road-tab.cjs.entry.js +2 -2
- package/dist/cjs/road-table.cjs.entry.js +1 -1
- package/dist/cjs/road-tabs.cjs.entry.js +1 -1
- package/dist/cjs/road-tag.cjs.entry.js +1 -1
- package/dist/cjs/road-text.cjs.entry.js +1 -1
- package/dist/cjs/road-textarea.cjs.entry.js +1 -1
- package/dist/cjs/road-toast.cjs.entry.js +1 -1
- package/dist/cjs/road-toggle.cjs.entry.js +2 -2
- package/dist/cjs/road-toolbar-title-page.cjs.entry.js +1 -1
- package/dist/cjs/road-toolbar-title.cjs.entry.js +1 -1
- package/dist/cjs/road-toolbar-v2.cjs.entry.js +1 -1
- package/dist/cjs/road-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/roadtrip.cjs.js +1 -1
- package/dist/collection/components/drawer/drawer.css +17 -0
- package/dist/collection/components/drawer/drawer.js +26 -1
- package/dist/collection/components/drawer/drawer.js.map +1 -1
- package/dist/collection/components/drawer/drawer.stories.js +7 -1
- package/dist/collection/components/dropdown/dropdown.css +1 -1
- package/dist/collection/components/input/input.js +86 -23
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/input-group/input-group.css +10 -7
- package/dist/collection/components/input-group/input-group.js +19 -4
- package/dist/collection/components/input-group/input-group.js.map +1 -1
- package/dist/collection/components/phone-number-input/phone-number-input.css +198 -129
- package/dist/collection/components/phone-number-input/phone-number-input.js +20 -68
- package/dist/collection/components/phone-number-input/phone-number-input.js.map +1 -1
- package/dist/collection/components/plate-number/plate-number.js +2 -2
- package/dist/collection/components/profil-dropdown/profil-dropdown.js +1 -1
- package/dist/collection/components/progress/progress.js +1 -1
- package/dist/collection/components/progress-indicator-horizontal/progress-indicator-horizontal.js +1 -1
- package/dist/collection/components/progress-indicator-vertical/progress-indicator-vertical.js +1 -1
- package/dist/collection/components/progress-indicator-vertical-item/progress-indicator-vertical-item.js +1 -1
- package/dist/collection/components/progress-tracker/progress-tracker.js +1 -1
- package/dist/collection/components/progress-tracker-item/progress-tracker-item.js +1 -1
- package/dist/collection/components/radio/radio.js +1 -1
- package/dist/collection/components/radio-group/radio-group.js +1 -1
- package/dist/collection/components/range/range.js +2 -2
- package/dist/collection/components/rating/rating.js +1 -1
- package/dist/collection/components/row/row.js +1 -1
- package/dist/collection/components/segmented-button/segmented-button.js +2 -2
- package/dist/collection/components/segmented-button-bar/segmented-button-bar.js +1 -1
- package/dist/collection/components/segmented-buttons/segmented-buttons.js +1 -1
- package/dist/collection/components/select/select.js +1 -1
- package/dist/collection/components/select-filter/select-filter.js +2 -2
- package/dist/collection/components/skeleton/skeleton.js +1 -1
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/switch/switch.js +2 -2
- package/dist/collection/components/tab/tab.js +2 -2
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-button/tab-button.js +2 -2
- package/dist/collection/components/table/table.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/tag/tag.js +1 -1
- package/dist/collection/components/text/text.js +1 -1
- package/dist/collection/components/textarea/textarea.js +1 -1
- package/dist/collection/components/toast/toast.js +1 -1
- package/dist/collection/components/toggle/toggle.js +2 -2
- package/dist/collection/components/toolbar/toolbar.js +1 -1
- package/dist/collection/components/toolbar-title/toolbar-title.js +1 -1
- package/dist/collection/components/toolbar-title-page/toolbar-title-page.js +1 -1
- package/dist/collection/components/toolbar-v2/toolbar-v2.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +3 -3
- package/dist/collection/components/utilities/text.stories.js +2 -0
- package/dist/collection/fonts/Muli-Black.woff +0 -0
- package/dist/collection/fonts/Muli-Black.woff2 +0 -0
- package/dist/collection/fonts/Muli-SemiBold.woff +0 -0
- package/dist/collection/fonts/Muli-SemiBold.woff2 +0 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/road-badge_14.entry.js +90 -32
- package/dist/esm/road-badge_14.entry.js.map +1 -1
- package/dist/esm/road-dropdown.entry.js +1 -1
- package/dist/esm/road-dropdown.entry.js.map +1 -1
- package/dist/esm/road-phone-number-input.entry.js +21 -66
- package/dist/esm/road-phone-number-input.entry.js.map +1 -1
- package/dist/esm/road-plate-number.entry.js +2 -2
- package/dist/esm/road-profil-dropdown.entry.js +1 -1
- package/dist/esm/road-progress-indicator-horizontal.entry.js +1 -1
- package/dist/esm/road-progress-indicator-vertical-item.entry.js +1 -1
- package/dist/esm/road-progress-indicator-vertical.entry.js +1 -1
- package/dist/esm/road-progress-tracker-item.entry.js +1 -1
- package/dist/esm/road-progress-tracker.entry.js +1 -1
- package/dist/esm/road-progress.entry.js +1 -1
- package/dist/esm/road-radio-group.entry.js +1 -1
- package/dist/esm/road-radio.entry.js +1 -1
- package/dist/esm/road-range.entry.js +2 -2
- package/dist/esm/road-rating.entry.js +1 -1
- package/dist/esm/road-segmented-button-bar.entry.js +1 -1
- package/dist/esm/road-segmented-button.entry.js +2 -2
- package/dist/esm/road-segmented-buttons.entry.js +1 -1
- package/dist/esm/road-select-filter.entry.js +2 -2
- package/dist/esm/road-select.entry.js +1 -1
- package/dist/esm/road-skeleton.entry.js +1 -1
- package/dist/esm/road-spinner.entry.js +1 -1
- package/dist/esm/road-switch.entry.js +2 -2
- package/dist/esm/road-tab-bar.entry.js +2 -2
- package/dist/esm/road-tab-button.entry.js +2 -2
- package/dist/esm/road-tab.entry.js +2 -2
- package/dist/esm/road-table.entry.js +1 -1
- package/dist/esm/road-tabs.entry.js +1 -1
- package/dist/esm/road-tag.entry.js +1 -1
- package/dist/esm/road-text.entry.js +1 -1
- package/dist/esm/road-textarea.entry.js +1 -1
- package/dist/esm/road-toast.entry.js +1 -1
- package/dist/esm/road-toggle.entry.js +2 -2
- package/dist/esm/road-toolbar-title-page.entry.js +1 -1
- package/dist/esm/road-toolbar-title.entry.js +1 -1
- package/dist/esm/road-toolbar-v2.entry.js +1 -1
- package/dist/esm/road-tooltip.entry.js +3 -3
- package/dist/esm/roadtrip.js +1 -1
- package/dist/html.html-data.json +4 -0
- package/dist/roadtrip/fonts/Muli-Black.woff +0 -0
- package/dist/roadtrip/fonts/Muli-Black.woff2 +0 -0
- package/dist/roadtrip/fonts/Muli-SemiBold.woff +0 -0
- package/dist/roadtrip/fonts/Muli-SemiBold.woff2 +0 -0
- package/dist/roadtrip/{p-c1e2aa67.entry.js → p-04913d58.entry.js} +2 -2
- package/dist/roadtrip/{p-494aab48.entry.js → p-06fbd2ea.entry.js} +2 -2
- package/dist/roadtrip/{p-2a4a0928.entry.js → p-167cd2fc.entry.js} +2 -2
- package/dist/roadtrip/p-215afdbd.entry.js +2 -0
- package/dist/roadtrip/{p-8f7375bc.entry.js → p-2e049c8e.entry.js} +2 -2
- package/dist/roadtrip/{p-8ca23318.entry.js → p-37430583.entry.js} +2 -2
- package/dist/roadtrip/{p-9fce16aa.entry.js → p-3dcaa947.entry.js} +2 -2
- package/dist/roadtrip/{p-b5c4455e.entry.js → p-3e36cd02.entry.js} +3 -3
- package/dist/roadtrip/p-3e36cd02.entry.js.map +1 -0
- package/dist/roadtrip/{p-1e61ca1f.entry.js → p-3f5dff96.entry.js} +2 -2
- package/dist/roadtrip/{p-f8817c0e.entry.js → p-449affa6.entry.js} +2 -2
- package/dist/roadtrip/p-4675ea6d.entry.js +2 -0
- package/dist/roadtrip/{p-4a47999a.entry.js → p-5fea6a74.entry.js} +2 -2
- package/dist/roadtrip/{p-f9754547.entry.js → p-60bd73ad.entry.js} +2 -2
- package/dist/roadtrip/p-65f9bd9c.entry.js +2 -0
- package/dist/roadtrip/{p-c68fc795.entry.js → p-6c617506.entry.js} +2 -2
- package/dist/roadtrip/{p-4e779fd6.entry.js → p-6ff3b37c.entry.js} +2 -2
- package/dist/roadtrip/p-85b1e505.entry.js +2 -0
- package/dist/roadtrip/{p-a990a8b6.entry.js → p-862c1831.entry.js} +2 -2
- package/dist/roadtrip/{p-a990a8b6.entry.js.map → p-862c1831.entry.js.map} +1 -1
- package/dist/roadtrip/p-8b04fc62.entry.js +2 -0
- package/dist/roadtrip/{p-0cacf829.entry.js → p-950b8a43.entry.js} +2 -2
- package/dist/roadtrip/p-950b8a43.entry.js.map +1 -0
- package/dist/roadtrip/{p-87c1ff76.entry.js → p-99a6faae.entry.js} +2 -2
- package/dist/roadtrip/{p-bba18327.entry.js → p-b5fa8c5a.entry.js} +2 -2
- package/dist/roadtrip/{p-db243855.entry.js → p-b8c5d292.entry.js} +2 -2
- package/dist/roadtrip/{p-d68e64a8.entry.js → p-c28e7add.entry.js} +2 -2
- package/dist/roadtrip/{p-10e65612.entry.js → p-c47ccbf2.entry.js} +2 -2
- package/dist/roadtrip/{p-c3ef32ef.entry.js → p-c6824205.entry.js} +2 -2
- package/dist/roadtrip/{p-833c1e78.entry.js → p-cfd2919e.entry.js} +2 -2
- package/dist/roadtrip/{p-a0a95c0a.entry.js → p-d80e7563.entry.js} +2 -2
- package/dist/roadtrip/p-db77c354.entry.js +2 -0
- package/dist/roadtrip/{p-5fab1bc3.entry.js.map → p-db77c354.entry.js.map} +1 -1
- package/dist/roadtrip/{p-4bbc889b.entry.js → p-e6c4c576.entry.js} +2 -2
- package/dist/roadtrip/{p-01be5517.entry.js → p-e6e9882b.entry.js} +2 -2
- package/dist/roadtrip/{p-5a6fbd7f.entry.js → p-e75ec60f.entry.js} +2 -2
- package/dist/roadtrip/{p-edbbe884.entry.js → p-ea1a175d.entry.js} +2 -2
- package/dist/roadtrip/{p-2903bdc0.entry.js → p-eac313e4.entry.js} +2 -2
- package/dist/roadtrip/{p-fb26ed7e.entry.js → p-f1b53143.entry.js} +2 -2
- package/dist/roadtrip/{p-b18cda16.entry.js → p-fd3c58b6.entry.js} +2 -2
- package/dist/roadtrip/{p-32845e72.entry.js → p-fe40ab3d.entry.js} +2 -2
- package/dist/roadtrip/roadtrip.css +1 -1
- package/dist/roadtrip/roadtrip.esm.js +1 -1
- package/dist/roadtrip/roadtrip.esm.js.map +1 -1
- package/dist/types/components/drawer/drawer.d.ts +4 -0
- package/dist/types/components/input/input.d.ts +1 -1
- package/dist/types/components/input-group/input-group.d.ts +4 -2
- package/dist/types/components/phone-number-input/phone-number-input.d.ts +3 -10
- package/dist/types/components-react.d.ts +4 -4
- package/dist/types/components.d.ts +17 -0
- package/hydrate/index.js +353 -357
- package/hydrate/index.mjs +353 -357
- package/package.json +1 -1
- package/dist/roadtrip/p-0cacf829.entry.js.map +0 -1
- package/dist/roadtrip/p-427bd935.entry.js +0 -2
- package/dist/roadtrip/p-5fab1bc3.entry.js +0 -2
- package/dist/roadtrip/p-78b51033.entry.js +0 -2
- package/dist/roadtrip/p-9737182c.entry.js +0 -2
- package/dist/roadtrip/p-a925ff64.entry.js +0 -2
- package/dist/roadtrip/p-b5c4455e.entry.js.map +0 -1
- package/dist/roadtrip/p-ee92b78d.entry.js +0 -2
- /package/dist/roadtrip/{p-c1e2aa67.entry.js.map → p-04913d58.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-494aab48.entry.js.map → p-06fbd2ea.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-2a4a0928.entry.js.map → p-167cd2fc.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-427bd935.entry.js.map → p-215afdbd.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-8f7375bc.entry.js.map → p-2e049c8e.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-8ca23318.entry.js.map → p-37430583.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-9fce16aa.entry.js.map → p-3dcaa947.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-1e61ca1f.entry.js.map → p-3f5dff96.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-f8817c0e.entry.js.map → p-449affa6.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-ee92b78d.entry.js.map → p-4675ea6d.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-4a47999a.entry.js.map → p-5fea6a74.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-f9754547.entry.js.map → p-60bd73ad.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-a925ff64.entry.js.map → p-65f9bd9c.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-c68fc795.entry.js.map → p-6c617506.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-4e779fd6.entry.js.map → p-6ff3b37c.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-9737182c.entry.js.map → p-85b1e505.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-78b51033.entry.js.map → p-8b04fc62.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-87c1ff76.entry.js.map → p-99a6faae.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-bba18327.entry.js.map → p-b5fa8c5a.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-db243855.entry.js.map → p-b8c5d292.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-d68e64a8.entry.js.map → p-c28e7add.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-10e65612.entry.js.map → p-c47ccbf2.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-c3ef32ef.entry.js.map → p-c6824205.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-833c1e78.entry.js.map → p-cfd2919e.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-a0a95c0a.entry.js.map → p-d80e7563.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-4bbc889b.entry.js.map → p-e6c4c576.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-01be5517.entry.js.map → p-e6e9882b.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-5a6fbd7f.entry.js.map → p-e75ec60f.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-edbbe884.entry.js.map → p-ea1a175d.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-2903bdc0.entry.js.map → p-eac313e4.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-fb26ed7e.entry.js.map → p-f1b53143.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-b18cda16.entry.js.map → p-fd3c58b6.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-32845e72.entry.js.map → p-fe40ab3d.entry.js.map} +0 -0
package/dist/cjs/roadtrip.cjs.js
CHANGED
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy(JSON.parse("[[\"road-badge_14.cjs\",[[2,\"road-counter\",{\"inputId\":[1,\"input-id\"],\"min\":[2],\"max\":[2],\"step\":[1],\"value\":[2],\"size\":[1],\"dustbin\":[4],\"readonly\":[4],\"leftIconClasses\":[32],\"rightIconClasses\":[32],\"isDustbinVisible\":[32]},null,{\"value\":[\"onValueChange\"]}],[1,\"road-item\",{\"titleItem\":[1,\"title-item\"],\"text\":[1],\"button\":[4],\"detail\":[4],\"active\":[4],\"detailIcon\":[1,\"detail-icon\"],\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"lines\":[1],\"layout\":[1],\"target\":[1],\"type\":[1],\"multipleInputs\":[32]}],[1,\"road-badge\",{\"color\":[1],\"bubble\":[4]}],[1,\"road-list\",{\"lines\":[1]}],[1,\"road-toolbar\",{\"color\":[1]}],[1,\"road-drawer\",{\"isOpen\":[1028,\"is-open\"],\"position\":[1],\"drawerWidth\":[2,\"drawer-width\"],\"hasInverseHeader\":[4,\"has-inverse-header\"],\"hasBackIcon\":[4,\"has-back-icon\"],\"backText\":[1,\"back-text\"],\"drawerTitle\":[1,\"drawer-title\"],\"ariaLabel\":[1,\"aria-label\"],\"ariaLabelBack\":[1,\"aria-label-back\"],\"ariaLabelClose\":[1,\"aria-label-close\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"open\":[64],\"close\":[64],\"back\":[64]},[[4,\"keyup\",\"onEscape\"]],{\"isOpen\":[\"handleOpen\"]}],[1,\"road-col\"],[1,\"road-grid\"],[1,\"road-row\"],[6,\"road-input\",{\"inputId\":[1,\"input-id\"],\"autocapitalize\":[1],\"autocomplete\":[1],\"blockdecimal\":[4],\"autocorrect\":[1],\"autofocus\":[4],\"disabled\":[4],\"enterkeyhint\":[1],\"inputmode\":[1],\"max\":[1],\"maxlength\":[2],\"min\":[1],\"minlength\":[2],\"name\":[1],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"step\":[1],\"size\":[2],\"sizes\":[1],\"type\":[1],\"value\":[1032],\"label\":[1],\"error\":[1],\"helper\":[1],\"debounce\":[2]},null,{\"debounce\":[\"debounceChanged\"],\"value\":[\"valueChanged\"]}],[1,\"road-button\",{\"color\":[1],\"size\":[513],\"buttonType\":[1,\"button-type\"],\"iconOnly\":[516,\"icon-only\"],\"disabled\":[516],\"expand\":[516],\"download\":[1],\"href\":[1],\"rel\":[1],\"target\":[1],\"outline\":[4]}],[1,\"road-input-group\",{\"disabled\":[4]},null,{\"disabled\":[\"handleDisabledChange\"]}],[1,\"road-label\"],[1,\"road-icon\",{\"color\":[1],\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"icon\":[8],\"size\":[1],\"rotate\":[1],\"lazy\":[4],\"sanitize\":[4],\"svgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadIcon\"],\"src\":[\"loadIcon\"],\"icon\":[\"loadIcon\"]}]]],[\"road-duration.cjs\",[[1,\"road-duration\",{\"isOpen\":[1028,\"is-open\"],\"header\":[1],\"min\":[2],\"max\":[2],\"step\":[2],\"open\":[64],\"close\":[64]},[[0,\"roadcardclick\",\"handleClick\"]]]]],[\"road-phone-number-input.cjs\",[[2,\"road-phone-number-input\",{\"disabled\":[4],\"countryData\":[16],\"language\":[1],\"codeLabel\":[1,\"code-label\"],\"phoneLabel\":[1,\"phone-label\"],\"phoneValue\":[1,\"phone-value\"],\"countryCode\":[1,\"country-code\"],\"errorMessage\":[1,\"error-message\"],\"required\":[4],\"selectedCountry\":[32],\"selectedCountryCode\":[32],\"phoneNumber\":[32],\"countryOptions\":[32],\"returnObject\":[32]},null,{\"errorMessage\":[\"updateMessagePosition\"]}]]],[\"road-content-card.cjs\",[[1,\"road-content-card\",{\"insetImage\":[4,\"inset-image\"]}]]],[\"road-plate-number.cjs\",[[2,\"road-plate-number\",{\"country\":[1],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"value\":[1032],\"motorbike\":[4]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-profil-dropdown.cjs\",[[1,\"road-profil-dropdown\",{\"isOpen\":[1028,\"is-open\"]},[[4,\"click\",\"handleDocumentClick\"]]]]],[\"road-rating.cjs\",[[1,\"road-rating\",{\"size\":[513],\"rate\":[2],\"showreviews\":[4],\"readonly\":[4],\"reviews\":[2],\"reviewsText\":[1,\"reviews-text\"],\"url\":[1]}]]],[\"road-accordion.cjs\",[[1,\"road-accordion\",{\"isOpen\":[1028,\"is-open\"],\"isLight\":[4,\"is-light\"],\"isLightSeparator\":[4,\"is-light-separator\"],\"isSmall\":[4,\"is-small\"]}]]],[\"road-banner.cjs\",[[1,\"road-banner\",{\"isOpen\":[1028,\"is-open\"],\"label\":[1],\"link\":[1],\"url\":[1],\"close\":[64]}]]],[\"road-carousel.cjs\",[[1,\"road-carousel\",{\"options\":[8],\"pager\":[4],\"arrows\":[4],\"update\":[64],\"updateAutoHeight\":[64],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"getActiveIndex\":[64],\"getPreviousIndex\":[64],\"length\":[64],\"isEnd\":[64],\"isBeginning\":[64],\"startAutoplay\":[64],\"stopAutoplay\":[64],\"lockSwipeToNext\":[64],\"lockSwipeToPrev\":[64],\"lockSwipes\":[64],\"getSwiper\":[64]},null,{\"options\":[\"optionsChanged\"]}]]],[\"road-checkbox.cjs\",[[6,\"road-checkbox\",{\"checkboxId\":[1,\"checkbox-id\"],\"name\":[1],\"required\":[4],\"checked\":[1028],\"indeterminate\":[4],\"disabled\":[4],\"value\":[1],\"label\":[1],\"secondaryLabel\":[1,\"secondary-label\"],\"inverse\":[4],\"error\":[1],\"helper\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-chip.cjs\",[[1,\"road-chip\",{\"color\":[1],\"outline\":[4],\"size\":[1],\"hasCloseIcon\":[4,\"has-close-icon\"]}]]],[\"road-collapse.cjs\",[[1,\"road-collapse\",{\"isOpen\":[1028,\"is-open\"],\"showMore\":[1,\"show-more\"],\"showLess\":[1,\"show-less\"],\"centered\":[4]}]]],[\"road-dialog.cjs\",[[1,\"road-dialog\",{\"isOpen\":[1028,\"is-open\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"color\":[1],\"icon\":[1],\"label\":[1],\"description\":[1],\"open\":[64],\"close\":[64]},[[4,\"keyup\",\"onEscape\"]]]]],[\"road-dropdown.cjs\",[[1,\"road-dropdown\",{\"isOpen\":[1028,\"is-open\"],\"isLight\":[4,\"is-light\"],\"isMedium\":[4,\"is-medium\"],\"position\":[513],\"direction\":[513]},[[4,\"click\",\"handleDocumentClick\"]]]]],[\"road-modal.cjs\",[[1,\"road-modal\",{\"maxWidth\":[2,\"max-width\"],\"isOpen\":[1028,\"is-open\"],\"hasInverseHeader\":[4,\"has-inverse-header\"],\"modalTitle\":[1,\"modal-title\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"open\":[64],\"close\":[64]},[[4,\"keyup\",\"onEscape\"]]]]],[\"road-range.cjs\",[[6,\"road-range\",{\"rangeId\":[1,\"range-id\"],\"value\":[1032],\"min\":[1],\"max\":[1],\"step\":[1],\"showValue\":[4,\"show-value\"],\"showTick\":[4,\"show-tick\"],\"showLabels\":[4,\"show-labels\"],\"disabled\":[4]},[[2,\"focus\",\"handleFocus\"],[2,\"blur\",\"handleBlur\"]],{\"value\":[\"valueChanged\"]}]]],[\"road-toast.cjs\",[[1,\"road-toast\",{\"isOpen\":[1028,\"is-open\"],\"color\":[1],\"label\":[1],\"timeout\":[2],\"open\":[64],\"close\":[64]},null,{\"isOpen\":[\"isOpenChanged\"]}]]],[\"road-alert.cjs\",[[1,\"road-alert\",{\"color\":[1],\"label\":[1],\"button\":[1],\"link\":[1],\"url\":[1]}]]],[\"road-area-code.cjs\",[[2,\"road-area-code\",{\"selectId\":[1,\"select-id\"],\"options\":[16],\"autofocus\":[4],\"disabled\":[4],\"name\":[1],\"required\":[4],\"size\":[2],\"sizes\":[1],\"label\":[1],\"error\":[1],\"value\":[1025],\"triggerRender\":[1026,\"trigger-render\"],\"selectedValue\":[32]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-asset.cjs\",[[1,\"road-asset\",{\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"asset\":[8],\"lazy\":[4],\"sanitize\":[4],\"assetSvgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadAsset\"],\"src\":[\"loadAsset\"],\"asset\":[\"loadAsset\"]}]]],[\"road-autocomplete.cjs\",[[6,\"road-autocomplete\",{\"options\":[16],\"visible\":[32]},[[0,\"roadFocus\",\"handleFocus\"],[0,\"roadfocus\",\"handleFocus\"],[4,\"click\",\"onClickOutside\"]]]]],[\"road-button-floating.cjs\",[[1,\"road-button-floating\",{\"position\":[513],\"href\":[1],\"rel\":[1],\"target\":[1]},[[9,\"scroll\",\"onScroll\"]]]]],[\"road-carousel-item.cjs\",[[4,\"road-carousel-item\"]]],[\"road-flap.cjs\",[[1,\"road-flap\",{\"color\":[1],\"filled\":[4],\"size\":[513]}]]],[\"road-global-navigation.cjs\",[[1,\"road-global-navigation\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-global-navigation-v2.cjs\",[[1,\"road-global-navigation-v2\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"],[8,\"click\",\"onButtonClick\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-illustration.cjs\",[[1,\"road-illustration\",{\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"illustration\":[8],\"size\":[1],\"rotate\":[1],\"lazy\":[4],\"sanitize\":[4],\"illustrationSvgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadIllustration\"],\"src\":[\"loadIllustration\"],\"illustration\":[\"loadIllustration\"]}]]],[\"road-navbar.cjs\",[[1,\"road-navbar\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-navbar-item.cjs\",[[1,\"road-navbar-item\",{\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadNavbarChanged\",\"onNavbarChanged\"],[8,\"roadnavbarchanged\",\"onNavbarChanged\"]],{\"selected\":[\"handleSelectedChange\"]}]]],[\"road-navbar-item-v2.cjs\",[[1,\"road-navbar-item-v2\",{\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadNavbarChanged\",\"onNavbarChanged\"],[8,\"roadnavbarchanged\",\"onNavbarChanged\"]],{\"selected\":[\"handleSelectedChange\"]}]]],[\"road-navbar-v2.cjs\",[[1,\"road-navbar-v2\",{\"compact\":[516],\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-progress.cjs\",[[1,\"road-progress\",{\"value\":[2],\"numbersteps\":[1],\"label\":[1],\"showstep\":[4],\"animation\":[4],\"light\":[4],\"fullwidth\":[4],\"color\":[1]}]]],[\"road-progress-indicator-horizontal.cjs\",[[1,\"road-progress-indicator-horizontal\",{\"color\":[513],\"numberStep\":[2,\"number-step\"],\"stateFirstStep\":[1,\"state-first-step\"],\"stateSecondStep\":[1,\"state-second-step\"],\"stateThirdStep\":[1,\"state-third-step\"],\"urlStep1\":[1,\"url-step-1\"],\"urlStep2\":[1,\"url-step-2\"],\"urlStep3\":[1,\"url-step-3\"]}]]],[\"road-progress-indicator-vertical.cjs\",[[1,\"road-progress-indicator-vertical\"]]],[\"road-progress-indicator-vertical-item.cjs\",[[4,\"road-progress-indicator-vertical-item\"]]],[\"road-progress-tracker.cjs\",[[1,\"road-progress-tracker\"]]],[\"road-progress-tracker-item.cjs\",[[4,\"road-progress-tracker-item\"]]],[\"road-radio.cjs\",[[2,\"road-radio\",{\"radioId\":[1,\"radio-id\"],\"name\":[1],\"required\":[4],\"disabled\":[4],\"value\":[8],\"label\":[1],\"secondaryLabel\":[1,\"secondary-label\"],\"inverse\":[4],\"error\":[4],\"helper\":[1],\"inline\":[4],\"checked\":[32]},[[8,\"roadChange\",\"onRoadChangedChanged\"],[8,\"roadchange\",\"onRoadChangedChanged\"]]]]],[\"road-radio-group.cjs\",[[6,\"road-radio-group\",{\"radioGroupId\":[1,\"radio-group-id\"],\"allowEmptySelection\":[4,\"allow-empty-selection\"],\"name\":[1],\"value\":[1032],\"label\":[1],\"asterisk\":[4],\"ariaLabel\":[513,\"aria-label\"],\"error\":[1025],\"helper\":[1]},null,{\"value\":[\"valueChanged\"],\"error\":[\"errorChanged\"]}]]],[\"road-segmented-button.cjs\",[[1,\"road-segmented-button\",{\"size\":[1],\"selected\":[1028],\"tab\":[1]},[[8,\"roadSegmentedButtonBarChanged\",\"onButtonBarChanged\"],[8,\"roadSegmentedButtonbarchanged\",\"onButtonBarChanged\"]]]]],[\"road-segmented-button-bar.cjs\",[[1,\"road-segmented-button-bar\",{\"selectedTab\":[1,\"selected-tab\"]},null,{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-segmented-buttons.cjs\",[[1,\"road-segmented-buttons\",{\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64]}]]],[\"road-select.cjs\",[[2,\"road-select\",{\"selectId\":[1,\"select-id\"],\"options\":[16],\"autofocus\":[4],\"disabled\":[4],\"name\":[1],\"required\":[4],\"size\":[2],\"sizes\":[1],\"label\":[1],\"error\":[1],\"value\":[1032]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-select-filter.cjs\",[[6,\"road-select-filter\",{\"options\":[16],\"parameters\":[8],\"isActive\":[4,\"is-active\"],\"onlySelect\":[4,\"only-select\"],\"isOpen\":[32],\"currentValue\":[32],\"activeIndex\":[32]},[[0,\"roadFocus\",\"handleFocus\"],[0,\"roadfocus\",\"handleFocus\"],[0,\"roadBlur\",\"handleBlur\"],[0,\"roadblur\",\"handleBlur\"],[0,\"roadChange\",\"handleChange\"],[0,\"roadchange\",\"handleChange\"],[4,\"click\",\"onClickOutside\"],[8,\"keydown\",\"handleKeydown\"]]]]],[\"road-skeleton.cjs\",[[1,\"road-skeleton\"]]],[\"road-spinner.cjs\",[[1,\"road-spinner\",{\"size\":[513],\"color\":[513]}]]],[\"road-switch.cjs\",[[2,\"road-switch\",{\"switchId\":[1,\"switch-id\"],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"label\":[1],\"color\":[1],\"hasLeftLabel\":[4,\"has-left-label\"],\"isSpaced\":[4,\"is-spaced\"],\"value\":[1],\"on\":[1],\"off\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-tab.cjs\",[[1,\"road-tab\",{\"active\":[1028],\"tab\":[1],\"setActive\":[64]},[[8,\"roadtabbarchanged\",\"onTabBarChanged\"]]]]],[\"road-tab-bar.cjs\",[[1,\"road-tab-bar\",{\"secondary\":[4],\"expand\":[4],\"center\":[4],\"selectedTab\":[1537,\"selected-tab\"]},[[0,\"roadTabButtonClick\",\"onTabButtonClick\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-tab-button.cjs\",[[1,\"road-tab-button\",{\"download\":[1],\"href\":[1],\"rel\":[1],\"layout\":[1],\"selected\":[1028],\"disabled\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadTabBarChanged\",\"onTabBarChanged\"],[8,\"roadTabbarchanged\",\"onTabBarChanged\"]]]]],[\"road-table.cjs\",[[6,\"road-table\"]]],[\"road-tabs.cjs\",[[1,\"road-tabs\",{\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64]}]]],[\"road-tag.cjs\",[[1,\"road-tag\",{\"color\":[1],\"contrast\":[4]}]]],[\"road-text.cjs\",[[1,\"road-text\",{\"color\":[1]}]]],[\"road-textarea.cjs\",[[2,\"road-textarea\",{\"textareaId\":[1,\"textarea-id\"],\"autocapitalize\":[1],\"autofocus\":[4],\"disabled\":[4],\"inputmode\":[1],\"enterkeyhint\":[1],\"maxlength\":[2],\"minlength\":[2],\"name\":[1],\"placeholder\":[1],\"sizes\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"resize\":[4],\"cols\":[2],\"rows\":[2],\"wrap\":[1],\"value\":[1025],\"label\":[1],\"error\":[1],\"helper\":[1]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-toggle.cjs\",[[2,\"road-toggle\",{\"toggleId\":[1,\"toggle-id\"],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"label\":[1],\"hasLeftLabel\":[4,\"has-left-label\"],\"isSpaced\":[4,\"is-spaced\"],\"value\":[1],\"on\":[1],\"off\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-toolbar-title.cjs\",[[1,\"road-toolbar-title\"]]],[\"road-toolbar-title-page.cjs\",[[1,\"road-toolbar-title-page\"]]],[\"road-toolbar-v2.cjs\",[[1,\"road-toolbar-v2\"]]],[\"road-tooltip.cjs\",[[1,\"road-tooltip\",{\"tooltipId\":[1,\"tooltip-id\"],\"content\":[1],\"position\":[1],\"contentAlign\":[1,\"content-align\"],\"isOpen\":[1028,\"is-open\"],\"trigger\":[1],\"open\":[64],\"close\":[64]}]]],[\"road-avatar.cjs\",[[1,\"road-avatar\",{\"size\":[513]}]]],[\"road-card.cjs\",[[1,\"road-card\",{\"elevation\":[1],\"button\":[4],\"value\":[1],\"type\":[1],\"download\":[1],\"href\":[1],\"rel\":[1],\"target\":[1]}]]],[\"road-img.cjs\",[[1,\"road-img\",{\"alt\":[1],\"src\":[1],\"loadSrc\":[32],\"loadError\":[32]},null,{\"src\":[\"srcChanged\"]}]]]]"), options);
|
|
22
|
+
return index.bootstrapLazy(JSON.parse("[[\"road-badge_14.cjs\",[[2,\"road-counter\",{\"inputId\":[1,\"input-id\"],\"min\":[2],\"max\":[2],\"step\":[1],\"value\":[2],\"size\":[1],\"dustbin\":[4],\"readonly\":[4],\"leftIconClasses\":[32],\"rightIconClasses\":[32],\"isDustbinVisible\":[32]},null,{\"value\":[\"onValueChange\"]}],[1,\"road-item\",{\"titleItem\":[1,\"title-item\"],\"text\":[1],\"button\":[4],\"detail\":[4],\"active\":[4],\"detailIcon\":[1,\"detail-icon\"],\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"lines\":[1],\"layout\":[1],\"target\":[1],\"type\":[1],\"multipleInputs\":[32]}],[1,\"road-badge\",{\"color\":[1],\"bubble\":[4]}],[1,\"road-list\",{\"lines\":[1]}],[1,\"road-toolbar\",{\"color\":[1]}],[1,\"road-drawer\",{\"isOpen\":[1028,\"is-open\"],\"removePadding\":[1028,\"remove-padding\"],\"position\":[1],\"drawerWidth\":[2,\"drawer-width\"],\"hasInverseHeader\":[4,\"has-inverse-header\"],\"hasBackIcon\":[4,\"has-back-icon\"],\"backText\":[1,\"back-text\"],\"drawerTitle\":[1,\"drawer-title\"],\"ariaLabel\":[1,\"aria-label\"],\"ariaLabelBack\":[1,\"aria-label-back\"],\"ariaLabelClose\":[1,\"aria-label-close\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"open\":[64],\"close\":[64],\"back\":[64]},[[4,\"keyup\",\"onEscape\"]],{\"isOpen\":[\"handleOpen\"]}],[6,\"road-input\",{\"inputId\":[1,\"input-id\"],\"autocapitalize\":[1],\"autocomplete\":[1],\"blockdecimal\":[4],\"autocorrect\":[1],\"autofocus\":[4],\"disabled\":[4],\"enterkeyhint\":[1],\"inputmode\":[1],\"max\":[1],\"maxlength\":[2],\"min\":[1],\"minlength\":[2],\"name\":[1],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"step\":[1],\"size\":[2],\"sizes\":[1],\"type\":[1],\"value\":[1032],\"label\":[1],\"error\":[1],\"helper\":[1],\"debounce\":[2],\"enforceMinMaxValue\":[64]},null,{\"debounce\":[\"debounceChanged\"],\"value\":[\"valueChanged\"]}],[1,\"road-col\"],[1,\"road-grid\"],[1,\"road-row\"],[1,\"road-button\",{\"color\":[1],\"size\":[513],\"buttonType\":[1,\"button-type\"],\"iconOnly\":[516,\"icon-only\"],\"disabled\":[516],\"expand\":[516],\"download\":[1],\"href\":[1],\"rel\":[1],\"target\":[1],\"outline\":[4]}],[1,\"road-input-group\",{\"disabled\":[4]},null,{\"disabled\":[\"handleDisabledChange\"]}],[1,\"road-label\"],[1,\"road-icon\",{\"color\":[1],\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"icon\":[8],\"size\":[1],\"rotate\":[1],\"lazy\":[4],\"sanitize\":[4],\"svgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadIcon\"],\"src\":[\"loadIcon\"],\"icon\":[\"loadIcon\"]}]]],[\"road-duration.cjs\",[[1,\"road-duration\",{\"isOpen\":[1028,\"is-open\"],\"header\":[1],\"min\":[2],\"max\":[2],\"step\":[2],\"open\":[64],\"close\":[64]},[[0,\"roadcardclick\",\"handleClick\"]]]]],[\"road-content-card.cjs\",[[1,\"road-content-card\",{\"insetImage\":[4,\"inset-image\"]}]]],[\"road-plate-number.cjs\",[[2,\"road-plate-number\",{\"country\":[1],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"value\":[1032],\"motorbike\":[4]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-profil-dropdown.cjs\",[[1,\"road-profil-dropdown\",{\"isOpen\":[1028,\"is-open\"]},[[4,\"click\",\"handleDocumentClick\"]]]]],[\"road-rating.cjs\",[[1,\"road-rating\",{\"size\":[513],\"rate\":[2],\"showreviews\":[4],\"readonly\":[4],\"reviews\":[2],\"reviewsText\":[1,\"reviews-text\"],\"url\":[1]}]]],[\"road-accordion.cjs\",[[1,\"road-accordion\",{\"isOpen\":[1028,\"is-open\"],\"isLight\":[4,\"is-light\"],\"isLightSeparator\":[4,\"is-light-separator\"],\"isSmall\":[4,\"is-small\"]}]]],[\"road-banner.cjs\",[[1,\"road-banner\",{\"isOpen\":[1028,\"is-open\"],\"label\":[1],\"link\":[1],\"url\":[1],\"close\":[64]}]]],[\"road-carousel.cjs\",[[1,\"road-carousel\",{\"options\":[8],\"pager\":[4],\"arrows\":[4],\"update\":[64],\"updateAutoHeight\":[64],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"getActiveIndex\":[64],\"getPreviousIndex\":[64],\"length\":[64],\"isEnd\":[64],\"isBeginning\":[64],\"startAutoplay\":[64],\"stopAutoplay\":[64],\"lockSwipeToNext\":[64],\"lockSwipeToPrev\":[64],\"lockSwipes\":[64],\"getSwiper\":[64]},null,{\"options\":[\"optionsChanged\"]}]]],[\"road-checkbox.cjs\",[[6,\"road-checkbox\",{\"checkboxId\":[1,\"checkbox-id\"],\"name\":[1],\"required\":[4],\"checked\":[1028],\"indeterminate\":[4],\"disabled\":[4],\"value\":[1],\"label\":[1],\"secondaryLabel\":[1,\"secondary-label\"],\"inverse\":[4],\"error\":[1],\"helper\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-chip.cjs\",[[1,\"road-chip\",{\"color\":[1],\"outline\":[4],\"size\":[1],\"hasCloseIcon\":[4,\"has-close-icon\"]}]]],[\"road-collapse.cjs\",[[1,\"road-collapse\",{\"isOpen\":[1028,\"is-open\"],\"showMore\":[1,\"show-more\"],\"showLess\":[1,\"show-less\"],\"centered\":[4]}]]],[\"road-dialog.cjs\",[[1,\"road-dialog\",{\"isOpen\":[1028,\"is-open\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"color\":[1],\"icon\":[1],\"label\":[1],\"description\":[1],\"open\":[64],\"close\":[64]},[[4,\"keyup\",\"onEscape\"]]]]],[\"road-dropdown.cjs\",[[1,\"road-dropdown\",{\"isOpen\":[1028,\"is-open\"],\"isLight\":[4,\"is-light\"],\"isMedium\":[4,\"is-medium\"],\"position\":[513],\"direction\":[513]},[[4,\"click\",\"handleDocumentClick\"]]]]],[\"road-modal.cjs\",[[1,\"road-modal\",{\"maxWidth\":[2,\"max-width\"],\"isOpen\":[1028,\"is-open\"],\"hasInverseHeader\":[4,\"has-inverse-header\"],\"modalTitle\":[1,\"modal-title\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"open\":[64],\"close\":[64]},[[4,\"keyup\",\"onEscape\"]]]]],[\"road-phone-number-input.cjs\",[[2,\"road-phone-number-input\",{\"disabled\":[4],\"countryData\":[16],\"language\":[1],\"codeLabel\":[1,\"code-label\"],\"phoneLabel\":[1,\"phone-label\"],\"phoneValue\":[1,\"phone-value\"],\"countryCode\":[1,\"country-code\"],\"errorMessage\":[1,\"error-message\"],\"required\":[4],\"selectedCountry\":[32],\"selectedCountryCode\":[32],\"phoneNumber\":[32],\"countryOptions\":[32],\"returnObject\":[32]}]]],[\"road-range.cjs\",[[6,\"road-range\",{\"rangeId\":[1,\"range-id\"],\"value\":[1032],\"min\":[1],\"max\":[1],\"step\":[1],\"showValue\":[4,\"show-value\"],\"showTick\":[4,\"show-tick\"],\"showLabels\":[4,\"show-labels\"],\"disabled\":[4]},[[2,\"focus\",\"handleFocus\"],[2,\"blur\",\"handleBlur\"]],{\"value\":[\"valueChanged\"]}]]],[\"road-toast.cjs\",[[1,\"road-toast\",{\"isOpen\":[1028,\"is-open\"],\"color\":[1],\"label\":[1],\"timeout\":[2],\"open\":[64],\"close\":[64]},null,{\"isOpen\":[\"isOpenChanged\"]}]]],[\"road-alert.cjs\",[[1,\"road-alert\",{\"color\":[1],\"label\":[1],\"button\":[1],\"link\":[1],\"url\":[1]}]]],[\"road-area-code.cjs\",[[2,\"road-area-code\",{\"selectId\":[1,\"select-id\"],\"options\":[16],\"autofocus\":[4],\"disabled\":[4],\"name\":[1],\"required\":[4],\"size\":[2],\"sizes\":[1],\"label\":[1],\"error\":[1],\"value\":[1025],\"triggerRender\":[1026,\"trigger-render\"],\"selectedValue\":[32]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-asset.cjs\",[[1,\"road-asset\",{\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"asset\":[8],\"lazy\":[4],\"sanitize\":[4],\"assetSvgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadAsset\"],\"src\":[\"loadAsset\"],\"asset\":[\"loadAsset\"]}]]],[\"road-autocomplete.cjs\",[[6,\"road-autocomplete\",{\"options\":[16],\"visible\":[32]},[[0,\"roadFocus\",\"handleFocus\"],[0,\"roadfocus\",\"handleFocus\"],[4,\"click\",\"onClickOutside\"]]]]],[\"road-button-floating.cjs\",[[1,\"road-button-floating\",{\"position\":[513],\"href\":[1],\"rel\":[1],\"target\":[1]},[[9,\"scroll\",\"onScroll\"]]]]],[\"road-carousel-item.cjs\",[[4,\"road-carousel-item\"]]],[\"road-flap.cjs\",[[1,\"road-flap\",{\"color\":[1],\"filled\":[4],\"size\":[513]}]]],[\"road-global-navigation.cjs\",[[1,\"road-global-navigation\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-global-navigation-v2.cjs\",[[1,\"road-global-navigation-v2\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"],[8,\"click\",\"onButtonClick\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-illustration.cjs\",[[1,\"road-illustration\",{\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"illustration\":[8],\"size\":[1],\"rotate\":[1],\"lazy\":[4],\"sanitize\":[4],\"illustrationSvgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadIllustration\"],\"src\":[\"loadIllustration\"],\"illustration\":[\"loadIllustration\"]}]]],[\"road-navbar.cjs\",[[1,\"road-navbar\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-navbar-item.cjs\",[[1,\"road-navbar-item\",{\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadNavbarChanged\",\"onNavbarChanged\"],[8,\"roadnavbarchanged\",\"onNavbarChanged\"]],{\"selected\":[\"handleSelectedChange\"]}]]],[\"road-navbar-item-v2.cjs\",[[1,\"road-navbar-item-v2\",{\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadNavbarChanged\",\"onNavbarChanged\"],[8,\"roadnavbarchanged\",\"onNavbarChanged\"]],{\"selected\":[\"handleSelectedChange\"]}]]],[\"road-navbar-v2.cjs\",[[1,\"road-navbar-v2\",{\"compact\":[516],\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-progress.cjs\",[[1,\"road-progress\",{\"value\":[2],\"numbersteps\":[1],\"label\":[1],\"showstep\":[4],\"animation\":[4],\"light\":[4],\"fullwidth\":[4],\"color\":[1]}]]],[\"road-progress-indicator-horizontal.cjs\",[[1,\"road-progress-indicator-horizontal\",{\"color\":[513],\"numberStep\":[2,\"number-step\"],\"stateFirstStep\":[1,\"state-first-step\"],\"stateSecondStep\":[1,\"state-second-step\"],\"stateThirdStep\":[1,\"state-third-step\"],\"urlStep1\":[1,\"url-step-1\"],\"urlStep2\":[1,\"url-step-2\"],\"urlStep3\":[1,\"url-step-3\"]}]]],[\"road-progress-indicator-vertical.cjs\",[[1,\"road-progress-indicator-vertical\"]]],[\"road-progress-indicator-vertical-item.cjs\",[[4,\"road-progress-indicator-vertical-item\"]]],[\"road-progress-tracker.cjs\",[[1,\"road-progress-tracker\"]]],[\"road-progress-tracker-item.cjs\",[[4,\"road-progress-tracker-item\"]]],[\"road-radio.cjs\",[[2,\"road-radio\",{\"radioId\":[1,\"radio-id\"],\"name\":[1],\"required\":[4],\"disabled\":[4],\"value\":[8],\"label\":[1],\"secondaryLabel\":[1,\"secondary-label\"],\"inverse\":[4],\"error\":[4],\"helper\":[1],\"inline\":[4],\"checked\":[32]},[[8,\"roadChange\",\"onRoadChangedChanged\"],[8,\"roadchange\",\"onRoadChangedChanged\"]]]]],[\"road-radio-group.cjs\",[[6,\"road-radio-group\",{\"radioGroupId\":[1,\"radio-group-id\"],\"allowEmptySelection\":[4,\"allow-empty-selection\"],\"name\":[1],\"value\":[1032],\"label\":[1],\"asterisk\":[4],\"ariaLabel\":[513,\"aria-label\"],\"error\":[1025],\"helper\":[1]},null,{\"value\":[\"valueChanged\"],\"error\":[\"errorChanged\"]}]]],[\"road-segmented-button.cjs\",[[1,\"road-segmented-button\",{\"size\":[1],\"selected\":[1028],\"tab\":[1]},[[8,\"roadSegmentedButtonBarChanged\",\"onButtonBarChanged\"],[8,\"roadSegmentedButtonbarchanged\",\"onButtonBarChanged\"]]]]],[\"road-segmented-button-bar.cjs\",[[1,\"road-segmented-button-bar\",{\"selectedTab\":[1,\"selected-tab\"]},null,{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-segmented-buttons.cjs\",[[1,\"road-segmented-buttons\",{\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64]}]]],[\"road-select.cjs\",[[2,\"road-select\",{\"selectId\":[1,\"select-id\"],\"options\":[16],\"autofocus\":[4],\"disabled\":[4],\"name\":[1],\"required\":[4],\"size\":[2],\"sizes\":[1],\"label\":[1],\"error\":[1],\"value\":[1032]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-select-filter.cjs\",[[6,\"road-select-filter\",{\"options\":[16],\"parameters\":[8],\"isActive\":[4,\"is-active\"],\"onlySelect\":[4,\"only-select\"],\"isOpen\":[32],\"currentValue\":[32],\"activeIndex\":[32]},[[0,\"roadFocus\",\"handleFocus\"],[0,\"roadfocus\",\"handleFocus\"],[0,\"roadBlur\",\"handleBlur\"],[0,\"roadblur\",\"handleBlur\"],[0,\"roadChange\",\"handleChange\"],[0,\"roadchange\",\"handleChange\"],[4,\"click\",\"onClickOutside\"],[8,\"keydown\",\"handleKeydown\"]]]]],[\"road-skeleton.cjs\",[[1,\"road-skeleton\"]]],[\"road-spinner.cjs\",[[1,\"road-spinner\",{\"size\":[513],\"color\":[513]}]]],[\"road-switch.cjs\",[[2,\"road-switch\",{\"switchId\":[1,\"switch-id\"],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"label\":[1],\"color\":[1],\"hasLeftLabel\":[4,\"has-left-label\"],\"isSpaced\":[4,\"is-spaced\"],\"value\":[1],\"on\":[1],\"off\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-tab.cjs\",[[1,\"road-tab\",{\"active\":[1028],\"tab\":[1],\"setActive\":[64]},[[8,\"roadtabbarchanged\",\"onTabBarChanged\"]]]]],[\"road-tab-bar.cjs\",[[1,\"road-tab-bar\",{\"secondary\":[4],\"expand\":[4],\"center\":[4],\"selectedTab\":[1537,\"selected-tab\"]},[[0,\"roadTabButtonClick\",\"onTabButtonClick\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-tab-button.cjs\",[[1,\"road-tab-button\",{\"download\":[1],\"href\":[1],\"rel\":[1],\"layout\":[1],\"selected\":[1028],\"disabled\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadTabBarChanged\",\"onTabBarChanged\"],[8,\"roadTabbarchanged\",\"onTabBarChanged\"]]]]],[\"road-table.cjs\",[[6,\"road-table\"]]],[\"road-tabs.cjs\",[[1,\"road-tabs\",{\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64]}]]],[\"road-tag.cjs\",[[1,\"road-tag\",{\"color\":[1],\"contrast\":[4]}]]],[\"road-text.cjs\",[[1,\"road-text\",{\"color\":[1]}]]],[\"road-textarea.cjs\",[[2,\"road-textarea\",{\"textareaId\":[1,\"textarea-id\"],\"autocapitalize\":[1],\"autofocus\":[4],\"disabled\":[4],\"inputmode\":[1],\"enterkeyhint\":[1],\"maxlength\":[2],\"minlength\":[2],\"name\":[1],\"placeholder\":[1],\"sizes\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"resize\":[4],\"cols\":[2],\"rows\":[2],\"wrap\":[1],\"value\":[1025],\"label\":[1],\"error\":[1],\"helper\":[1]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-toggle.cjs\",[[2,\"road-toggle\",{\"toggleId\":[1,\"toggle-id\"],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"label\":[1],\"hasLeftLabel\":[4,\"has-left-label\"],\"isSpaced\":[4,\"is-spaced\"],\"value\":[1],\"on\":[1],\"off\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-toolbar-title.cjs\",[[1,\"road-toolbar-title\"]]],[\"road-toolbar-title-page.cjs\",[[1,\"road-toolbar-title-page\"]]],[\"road-toolbar-v2.cjs\",[[1,\"road-toolbar-v2\"]]],[\"road-tooltip.cjs\",[[1,\"road-tooltip\",{\"tooltipId\":[1,\"tooltip-id\"],\"content\":[1],\"position\":[1],\"contentAlign\":[1,\"content-align\"],\"isOpen\":[1028,\"is-open\"],\"trigger\":[1],\"open\":[64],\"close\":[64]}]]],[\"road-avatar.cjs\",[[1,\"road-avatar\",{\"size\":[513]}]]],[\"road-card.cjs\",[[1,\"road-card\",{\"elevation\":[1],\"button\":[4],\"value\":[1],\"type\":[1],\"download\":[1],\"href\":[1],\"rel\":[1],\"target\":[1]}]]],[\"road-img.cjs\",[[1,\"road-img\",{\"alt\":[1],\"src\":[1],\"loadSrc\":[32],\"loadError\":[32]},null,{\"src\":[\"srcChanged\"]}]]]]"), options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -152,6 +152,10 @@
|
|
|
152
152
|
background-color: var(--road-surface);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
.drawer-footer.remove-padding {
|
|
156
|
+
padding: 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
155
159
|
/**
|
|
156
160
|
* Header inverse colors
|
|
157
161
|
*/
|
|
@@ -217,6 +221,11 @@
|
|
|
217
221
|
|
|
218
222
|
.drawer-body {
|
|
219
223
|
overflow-y: auto;
|
|
224
|
+
padding: 0 var(--road-spacing-05) var(--road-spacing-05);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.drawer-body.remove-padding {
|
|
228
|
+
padding: 0;
|
|
220
229
|
}
|
|
221
230
|
|
|
222
231
|
:host(.drawer-right) .drawer-body,
|
|
@@ -238,9 +247,17 @@
|
|
|
238
247
|
padding: 0 var(--road-spacing-08) var(--road-spacing-05);
|
|
239
248
|
}
|
|
240
249
|
|
|
250
|
+
.drawer-body.remove-padding {
|
|
251
|
+
padding: 0;
|
|
252
|
+
}
|
|
253
|
+
|
|
241
254
|
.drawer-footer {
|
|
242
255
|
padding: var(--road-spacing-05) var(--road-spacing-08);
|
|
243
256
|
}
|
|
257
|
+
|
|
258
|
+
.drawer-footer.remove-padding {
|
|
259
|
+
padding: 0;
|
|
260
|
+
}
|
|
244
261
|
}
|
|
245
262
|
|
|
246
263
|
/* OPEN STATE
|
|
@@ -15,6 +15,10 @@ export class Drawer {
|
|
|
15
15
|
* Set isOpen property to true to open the drawer
|
|
16
16
|
*/
|
|
17
17
|
this.isOpen = false;
|
|
18
|
+
/**
|
|
19
|
+
* Set removePadding property to true to remove padding for drawer body
|
|
20
|
+
*/
|
|
21
|
+
this.removePadding = false;
|
|
18
22
|
/**
|
|
19
23
|
* position of the drawer. e.g. left, right, bottom
|
|
20
24
|
*/
|
|
@@ -123,6 +127,7 @@ export class Drawer {
|
|
|
123
127
|
render() {
|
|
124
128
|
var _a, _b, _c;
|
|
125
129
|
const drawerIsOpenClass = this.isOpen ? 'drawer-open' : '';
|
|
130
|
+
const removePaddingClass = this.removePadding ? 'remove-padding' : '';
|
|
126
131
|
const inverseHeaderClass = this.hasInverseHeader ? 'drawer-header-inverse' : '';
|
|
127
132
|
const ariaLabel = (_a = this.ariaLabel) !== null && _a !== void 0 ? _a : 'drawer';
|
|
128
133
|
const ariaLabelBack = (_b = this.ariaLabelBack) !== null && _b !== void 0 ? _b : 'Back';
|
|
@@ -131,7 +136,7 @@ export class Drawer {
|
|
|
131
136
|
const backIconElement = this.hasBackIcon ? (h("button", { type: "button", class: "drawer-action", "aria-label": ariaLabelBack, onClick: this.onClickBack }, h("road-icon", { icon: navigationChevron, rotate: "180" }), this.backText)) : null;
|
|
132
137
|
const closeIconElement = this.hasCloseIcon ? (h("button", { type: "button", class: "drawer-close", onClick: this.onClick, "aria-label": ariaLabelClose }, h("road-icon", { icon: navigationClose, "aria-hidden": "true" }))) : null;
|
|
133
138
|
const drawerWidthValue = this.position === 'bottom' ? '100%' : `${this.drawerWidth}px`;
|
|
134
|
-
return (h(Host, { key: '
|
|
139
|
+
return (h(Host, { key: '803e9ce30d1511c6714bcf3eae6cf482ab910483', class: `${drawerIsOpenClass} drawer-${this.position}`, tabindex: "0", role: "dialog", "aria-label": ariaLabel }, h("div", { key: 'e57c395fee5c6f507623221567aa8944225e077f', class: "drawer-overlay", onClick: this.onClick, tabindex: "-1" }), h("div", { key: '13d65e0346da78e8d305e8ec367e1a425a64df42', class: "drawer-dialog", style: { maxWidth: drawerWidthValue }, role: "document", tabindex: "0" }, h("div", { key: '3a9b0175243b9a330155a26155e19f288822a2ea', class: "drawer-content" }, h("header", { key: '22f1f8fece85ce1e1d998b876fd83c7854c59ac1', class: `drawer-header ${inverseHeaderClass} ${drawerDelimiterClass}` }, backIconElement, this.drawerTitle ? (h("h2", { class: "drawer-title" }, this.drawerTitle)) : (h("div", { class: "drawer-title" }, h("slot", { name: "title" }))), closeIconElement), h("div", { key: '8d4c6ce1183733fbb7b22e96e2c8cd81c687cf3a', class: `drawer-body ${removePaddingClass}` }, h("slot", { key: 'd8185e9a322bd64833b6ce2ce57807ce27a75dbd' })), h("footer", { key: '8c3345df320d569fe9b8472faba3f4204750c903', class: `drawer-footer ${removePaddingClass}` }, h("slot", { key: '716055f5fc9792510ed43f77cbd81f9b2a039002', name: "footer" }))))));
|
|
135
140
|
}
|
|
136
141
|
static get is() { return "road-drawer"; }
|
|
137
142
|
static get encapsulation() { return "shadow"; }
|
|
@@ -167,6 +172,26 @@ export class Drawer {
|
|
|
167
172
|
"reflect": false,
|
|
168
173
|
"defaultValue": "false"
|
|
169
174
|
},
|
|
175
|
+
"removePadding": {
|
|
176
|
+
"type": "boolean",
|
|
177
|
+
"mutable": true,
|
|
178
|
+
"complexType": {
|
|
179
|
+
"original": "boolean",
|
|
180
|
+
"resolved": "boolean",
|
|
181
|
+
"references": {}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": "Set removePadding property to true to remove padding for drawer body"
|
|
188
|
+
},
|
|
189
|
+
"getter": false,
|
|
190
|
+
"setter": false,
|
|
191
|
+
"attribute": "remove-padding",
|
|
192
|
+
"reflect": false,
|
|
193
|
+
"defaultValue": "false"
|
|
194
|
+
},
|
|
170
195
|
"position": {
|
|
171
196
|
"type": "string",
|
|
172
197
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../src/components/drawer/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9G,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEpE;;;;;;;;GAQG;AAQH,MAAM,OAAO,MAAM;IALnB;QAYE;;WAEG;QACsB,WAAM,GAAY,KAAK,CAAC;QAEjD;;WAEG;QACK,aAAQ,GAAW,MAAM,CAAC;QAElC;;WAEG;QACK,gBAAW,GAAW,GAAG,CAAC;QAElC;;WAEG;QACK,qBAAgB,GAAY,KAAK,CAAC;QAE1C;;WAEG;QACK,gBAAW,GAAY,KAAK,CAAC;QA2BrC;;WAEG;QACK,iBAAY,GAAY,IAAI,CAAC;QAgFrC;;WAEG;QACK,YAAO,GAAG,CAAC,EAAW,EAAE,EAAE;YAChC,EAAE,CAAC,eAAe,EAAE,CAAC;YACrB,EAAE,CAAC,cAAc,EAAE,CAAC;YAEpB,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC,CAAC;QAEF;;WAEG;QACK,gBAAW,GAAG,CAAC,KAAiB,EAAE,EAAE;YAC1C,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,KAAK,CAAC,cAAc,EAAE,CAAC;YAEvB,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC;KAqEH;IAtJC;;OAEG;IAEH,KAAK,CAAC,IAA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AQ,CACJ;oBACN,+DAAQ,KAAK,EAAC,eAAe;wBAC3B,6DAAM,IAAI,EAAC,QAAQ,GAAG,CACf,CACL,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Element, Event, EventEmitter, Listen, Method, Prop, h, Host, Watch } from '@stencil/core';\nimport { navigationClose, navigationChevron } from '../../../icons';\n\n/**\n * @slot - Content of the drawer.\n * @slot title - replace the title with a custom title section when `'drawerTitle'` is not set\n * @slot footer - footer of the drawer\n * `<div slot=\"footer\">`\n `<road-button color=\"primary\" outline=\"true\" expand=\"true\">Annuler</road-button>`\n `<road-button color=\"primary\" expand=\"true\" class=\"mb-0\">Valider</road-button>`\n ` </div>`\n */\n\n\n@Component({\n tag: 'road-drawer',\n styleUrl: 'drawer.css',\n shadow: true,\n})\nexport class Drawer {\n\n /**\n * Current reference of the drawer\n */\n @Element() el!: HTMLRoadDrawerElement;\n\n /**\n * Set isOpen property to true to open the drawer\n */\n @Prop({ mutable: true }) isOpen: boolean = false;\n\n /**\n * position of the drawer. e.g. left, right, bottom\n */\n @Prop() position: string = 'left';\n\n /**\n * Width of the drawer\n */\n @Prop() drawerWidth: number = 480;\n\n /**\n * Inverse header colors\n */\n @Prop() hasInverseHeader: boolean = false;\n\n /**\n * Show / hide back icon\n */\n @Prop() hasBackIcon: boolean = false;\n\n /**\n * Show / hide back icon\n */\n @Prop() backText?: string;\n\n /**\n * Title of the drawer in the header bar\n */\n @Prop() drawerTitle?: string;\n\n /**\n * Aria label of the drawer\n */\n @Prop() ariaLabel?: string;\n\n /**\n * Aria label of the drawer\n */\n @Prop() ariaLabelBack?: string;\n\n /**\n * Aria label of the drawer\n */\n @Prop() ariaLabelClose?: string;\n\n /**\n * Show / hide close icon\n */\n @Prop() hasCloseIcon: boolean = true;\n\n /**\n * Indicate when opening the drawer\n */\n @Event({ eventName: 'open' }) onOpen!: EventEmitter<void>;\n\n /**\n * Indicate when closing the drawer\n */\n @Event({ eventName: 'close' }) onClose!: EventEmitter<void>;\n\n /**\n * Indicate when return to previous state of the drawer content\n */\n @Event({ eventName: 'back' }) onBack!: EventEmitter<void>;\n\n /**\n * Open the drawer\n */\n @Method()\n async open() {\n this.isOpen = true;\n }\n\n /**\n * Close the drawer\n */\n @Method()\n async close() {\n this.isOpen = false;\n }\n\n /**\n * Return to previous state of the drawer content\n */\n @Method()\n async back() {\n this.onBack.emit();\n }\n\n // @Watch('isOpen')\n // handleOpen(openValue: boolean) {\n // if(openValue === true) {\n // this.onOpen.emit();\n // } else {\n // this.el.addEventListener('transitionend', () => {\n // this.onClose.emit();\n // this.el.shadowRoot && ((this.el.shadowRoot.querySelector('.drawer-body') as HTMLElement).scrollTop = 0);\n // }, { once: true});\n // }\n // }\n\n\n @Watch('isOpen')\n handleOpen(openValue: boolean) {\n if(openValue === true) {\n this.onOpen.emit();\n // Focus the first button element after the drawer is opened\n setTimeout(() => this.focusFirstButton(), 50); // Add a slight delay to ensure the element is rendered\n } else {\n this.el.addEventListener('transitionend', () => {\n this.onClose.emit();\n this.el.shadowRoot && ((this.el.shadowRoot.querySelector('.drawer-body') as HTMLElement).scrollTop = 0);\n }, { once: true });\n }\n }\n \n /**\n * Find and focus the first button element in the drawer\n */\n private focusFirstButton() {\n const buttonElement = this.el.shadowRoot?.querySelector('button') as HTMLElement;\n \n if (buttonElement) {\n buttonElement.focus(); // Focus the first button element\n }\n }\n \n\n /**\n * Close the dialog when clicking on the cross or layer\n */\n private onClick = (ev: UIEvent) => {\n ev.stopPropagation();\n ev.preventDefault();\n\n this.close();\n };\n\n /**\n * Close the dialog when clicking on the cross or layer\n */\n private onClickBack = (event: MouseEvent) => {\n event.stopPropagation();\n event.preventDefault();\n\n this.back();\n };\n\n /**\n * Close the dialog when press Escape key\n */\n @Listen('keyup', { target: 'document' })\n onEscape(event: KeyboardEvent) {\n if (event.key === 'Escape' || event.key === \"Esc\") {\n this.close();\n }\n }\n\n /**\n * Call close function when clicking an element with data-dismiss=\"modal\" attribute\n */\n componentDidLoad() {\n this.el.querySelectorAll('[data-dismiss=\"modal\"]').forEach(item => {\n item.addEventListener('click', () => this.close());\n });\n }\n\n render() {\n const drawerIsOpenClass = this.isOpen ? 'drawer-open' : '';\n const inverseHeaderClass = this.hasInverseHeader ? 'drawer-header-inverse' : '';\n const ariaLabel = this.ariaLabel ?? 'drawer';\n const ariaLabelBack = this.ariaLabelBack ?? 'Back';\n const ariaLabelClose = this.ariaLabelClose ?? 'Close';\n const drawerDelimiterClass = this.drawerTitle && !this.hasInverseHeader ? 'drawer-delimiter' : '';\n const backIconElement = this.hasBackIcon ? (\n <button type=\"button\" class=\"drawer-action\" aria-label={ariaLabelBack} onClick={this.onClickBack}>\n <road-icon icon={navigationChevron} rotate=\"180\"></road-icon>\n {this.backText}\n </button>\n ) : null;\n const closeIconElement = this.hasCloseIcon ? (\n <button type=\"button\" class=\"drawer-close\" onClick={this.onClick} aria-label={ariaLabelClose}>\n <road-icon icon={navigationClose} aria-hidden=\"true\"></road-icon>\n </button>\n ) : null;\n const drawerWidthValue = this.position === 'bottom' ? '100%' : `${this.drawerWidth}px`;\n \n return (\n <Host class={`${drawerIsOpenClass} drawer-${this.position}`} tabindex=\"0\" role=\"dialog\" aria-label={ariaLabel}>\n <div class=\"drawer-overlay\" onClick={this.onClick} tabindex=\"-1\"></div>\n <div class=\"drawer-dialog\" style={{ maxWidth: drawerWidthValue }} role=\"document\" tabindex=\"0\">\n <div class=\"drawer-content\">\n <header class={`drawer-header ${inverseHeaderClass} ${drawerDelimiterClass}`}>\n {backIconElement}\n {this.drawerTitle ? (\n <h2 class=\"drawer-title\">{this.drawerTitle}</h2>\n ) : (\n <div class=\"drawer-title\">\n <slot name=\"title\" />\n </div>\n )}\n {closeIconElement}\n </header>\n <div class=\"drawer-body\">\n <slot />\n </div>\n <footer class=\"drawer-footer\">\n <slot name=\"footer\" />\n </footer>\n </div>\n </div>\n </Host>\n );\n }\n \n}"]}
|
|
1
|
+
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../src/components/drawer/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC9G,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEpE;;;;;;;;GAQG;AAQH,MAAM,OAAO,MAAM;IALnB;QAYE;;WAEG;QACsB,WAAM,GAAY,KAAK,CAAC;QAE/C;;SAEC;QACwB,kBAAa,GAAY,KAAK,CAAC;QAE1D;;WAEG;QACK,aAAQ,GAAW,MAAM,CAAC;QAElC;;WAEG;QACK,gBAAW,GAAW,GAAG,CAAC;QAElC;;WAEG;QACK,qBAAgB,GAAY,KAAK,CAAC;QAE1C;;WAEG;QACK,gBAAW,GAAY,KAAK,CAAC;QA2BrC;;WAEG;QACK,iBAAY,GAAY,IAAI,CAAC;QAgFrC;;WAEG;QACK,YAAO,GAAG,CAAC,EAAW,EAAE,EAAE;YAChC,EAAE,CAAC,eAAe,EAAE,CAAC;YACrB,EAAE,CAAC,cAAc,EAAE,CAAC;YAEpB,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC,CAAC;QAEF;;WAEG;QACK,gBA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kBAAkB,IAAI,oBAAoB,EAAE;wBACzE,eAAe;wBACf,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAClB,UAAI,KAAK,EAAC,cAAc,IAAE,IAAI,CAAC,WAAW,CAAM,CACjD,CAAC,CAAC,CAAC,CACF,WAAK,KAAK,EAAC,cAAc;4BACvB,YAAM,IAAI,EAAC,OAAO,GAAG,CACjB,CACP;wBACA,gBAAgB,CACV;oBACT,4DAAK,KAAK,EAAE,eAAe,kBAAkB,EAAE;wBAC7C,8DAAQ,CACJ;oBACN,+DAAQ,KAAK,EAAE,iBAAiB,kBAAkB,EAAE;wBAClD,6DAAM,IAAI,EAAC,QAAQ,GAAG,CACf,CACL,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Element, Event, EventEmitter, Listen, Method, Prop, h, Host, Watch } from '@stencil/core';\nimport { navigationClose, navigationChevron } from '../../../icons';\n\n/**\n * @slot - Content of the drawer.\n * @slot title - replace the title with a custom title section when `'drawerTitle'` is not set\n * @slot footer - footer of the drawer\n * `<div slot=\"footer\">`\n `<road-button color=\"primary\" outline=\"true\" expand=\"true\">Annuler</road-button>`\n `<road-button color=\"primary\" expand=\"true\" class=\"mb-0\">Valider</road-button>`\n ` </div>`\n */\n\n\n@Component({\n tag: 'road-drawer',\n styleUrl: 'drawer.css',\n shadow: true,\n})\nexport class Drawer {\n\n /**\n * Current reference of the drawer\n */\n @Element() el!: HTMLRoadDrawerElement;\n\n /**\n * Set isOpen property to true to open the drawer\n */\n @Prop({ mutable: true }) isOpen: boolean = false;\n\n /**\n * Set removePadding property to true to remove padding for drawer body\n */\n @Prop({ mutable: true }) removePadding: boolean = false;\n\n /**\n * position of the drawer. e.g. left, right, bottom\n */\n @Prop() position: string = 'left';\n\n /**\n * Width of the drawer\n */\n @Prop() drawerWidth: number = 480;\n\n /**\n * Inverse header colors\n */\n @Prop() hasInverseHeader: boolean = false;\n\n /**\n * Show / hide back icon\n */\n @Prop() hasBackIcon: boolean = false;\n\n /**\n * Show / hide back icon\n */\n @Prop() backText?: string;\n\n /**\n * Title of the drawer in the header bar\n */\n @Prop() drawerTitle?: string;\n\n /**\n * Aria label of the drawer\n */\n @Prop() ariaLabel?: string;\n\n /**\n * Aria label of the drawer\n */\n @Prop() ariaLabelBack?: string;\n\n /**\n * Aria label of the drawer\n */\n @Prop() ariaLabelClose?: string;\n\n /**\n * Show / hide close icon\n */\n @Prop() hasCloseIcon: boolean = true;\n\n /**\n * Indicate when opening the drawer\n */\n @Event({ eventName: 'open' }) onOpen!: EventEmitter<void>;\n\n /**\n * Indicate when closing the drawer\n */\n @Event({ eventName: 'close' }) onClose!: EventEmitter<void>;\n\n /**\n * Indicate when return to previous state of the drawer content\n */\n @Event({ eventName: 'back' }) onBack!: EventEmitter<void>;\n\n /**\n * Open the drawer\n */\n @Method()\n async open() {\n this.isOpen = true;\n }\n\n /**\n * Close the drawer\n */\n @Method()\n async close() {\n this.isOpen = false;\n }\n\n /**\n * Return to previous state of the drawer content\n */\n @Method()\n async back() {\n this.onBack.emit();\n }\n\n // @Watch('isOpen')\n // handleOpen(openValue: boolean) {\n // if(openValue === true) {\n // this.onOpen.emit();\n // } else {\n // this.el.addEventListener('transitionend', () => {\n // this.onClose.emit();\n // this.el.shadowRoot && ((this.el.shadowRoot.querySelector('.drawer-body') as HTMLElement).scrollTop = 0);\n // }, { once: true});\n // }\n // }\n\n\n @Watch('isOpen')\n handleOpen(openValue: boolean) {\n if(openValue === true) {\n this.onOpen.emit();\n // Focus the first button element after the drawer is opened\n setTimeout(() => this.focusFirstButton(), 50); // Add a slight delay to ensure the element is rendered\n } else {\n this.el.addEventListener('transitionend', () => {\n this.onClose.emit();\n this.el.shadowRoot && ((this.el.shadowRoot.querySelector('.drawer-body') as HTMLElement).scrollTop = 0);\n }, { once: true });\n }\n }\n \n /**\n * Find and focus the first button element in the drawer\n */\n private focusFirstButton() {\n const buttonElement = this.el.shadowRoot?.querySelector('button') as HTMLElement;\n \n if (buttonElement) {\n buttonElement.focus(); // Focus the first button element\n }\n }\n \n\n /**\n * Close the dialog when clicking on the cross or layer\n */\n private onClick = (ev: UIEvent) => {\n ev.stopPropagation();\n ev.preventDefault();\n\n this.close();\n };\n\n /**\n * Close the dialog when clicking on the cross or layer\n */\n private onClickBack = (event: MouseEvent) => {\n event.stopPropagation();\n event.preventDefault();\n\n this.back();\n };\n\n /**\n * Close the dialog when press Escape key\n */\n @Listen('keyup', { target: 'document' })\n onEscape(event: KeyboardEvent) {\n if (event.key === 'Escape' || event.key === \"Esc\") {\n this.close();\n }\n }\n\n /**\n * Call close function when clicking an element with data-dismiss=\"modal\" attribute\n */\n componentDidLoad() {\n this.el.querySelectorAll('[data-dismiss=\"modal\"]').forEach(item => {\n item.addEventListener('click', () => this.close());\n });\n }\n\n render() {\n const drawerIsOpenClass = this.isOpen ? 'drawer-open' : '';\n const removePaddingClass = this.removePadding ? 'remove-padding' : '';\n const inverseHeaderClass = this.hasInverseHeader ? 'drawer-header-inverse' : '';\n const ariaLabel = this.ariaLabel ?? 'drawer';\n const ariaLabelBack = this.ariaLabelBack ?? 'Back';\n const ariaLabelClose = this.ariaLabelClose ?? 'Close';\n const drawerDelimiterClass = this.drawerTitle && !this.hasInverseHeader ? 'drawer-delimiter' : '';\n const backIconElement = this.hasBackIcon ? (\n <button type=\"button\" class=\"drawer-action\" aria-label={ariaLabelBack} onClick={this.onClickBack}>\n <road-icon icon={navigationChevron} rotate=\"180\"></road-icon>\n {this.backText}\n </button>\n ) : null;\n const closeIconElement = this.hasCloseIcon ? (\n <button type=\"button\" class=\"drawer-close\" onClick={this.onClick} aria-label={ariaLabelClose}>\n <road-icon icon={navigationClose} aria-hidden=\"true\"></road-icon>\n </button>\n ) : null;\n const drawerWidthValue = this.position === 'bottom' ? '100%' : `${this.drawerWidth}px`;\n \n return (\n <Host class={`${drawerIsOpenClass} drawer-${this.position}`} tabindex=\"0\" role=\"dialog\" aria-label={ariaLabel}>\n <div class=\"drawer-overlay\" onClick={this.onClick} tabindex=\"-1\"></div>\n <div class=\"drawer-dialog\" style={{ maxWidth: drawerWidthValue }} role=\"document\" tabindex=\"0\">\n <div class=\"drawer-content\">\n <header class={`drawer-header ${inverseHeaderClass} ${drawerDelimiterClass}`}>\n {backIconElement}\n {this.drawerTitle ? (\n <h2 class=\"drawer-title\">{this.drawerTitle}</h2>\n ) : (\n <div class=\"drawer-title\">\n <slot name=\"title\" />\n </div>\n )}\n {closeIconElement}\n </header>\n <div class={`drawer-body ${removePaddingClass}`}>\n <slot />\n </div>\n <footer class={`drawer-footer ${removePaddingClass}`}>\n <slot name=\"footer\" />\n </footer>\n </div>\n </div>\n </Host>\n );\n }\n \n}"]}
|
|
@@ -19,6 +19,10 @@ export default {
|
|
|
19
19
|
control: 'boolean',
|
|
20
20
|
description: 'Defines whether the drawer is open or closed.',
|
|
21
21
|
},
|
|
22
|
+
'remove-padding': {
|
|
23
|
+
control: 'boolean',
|
|
24
|
+
description: 'If true add padding for drawer body',
|
|
25
|
+
},
|
|
22
26
|
'has-back-icon': {
|
|
23
27
|
control: 'boolean',
|
|
24
28
|
description: 'Displays a back arrow icon in the header.',
|
|
@@ -88,13 +92,14 @@ export default {
|
|
|
88
92
|
},
|
|
89
93
|
args: {
|
|
90
94
|
'is-open': true,
|
|
95
|
+
'remove-padding': false,
|
|
91
96
|
position: 'right',
|
|
92
97
|
'drawer-width': 480,
|
|
93
98
|
'has-inverse-header': false,
|
|
94
99
|
'has-back-icon': false,
|
|
95
100
|
'has-close-icon': true,
|
|
96
101
|
'drawer-title': 'Drawer title',
|
|
97
|
-
' ': `<div
|
|
102
|
+
' ': `<div>
|
|
98
103
|
<p>This is the drawer content.</p>
|
|
99
104
|
<road-button color="primary" expand>Confirm</road-button>
|
|
100
105
|
</div>`,
|
|
@@ -104,6 +109,7 @@ export default {
|
|
|
104
109
|
const Template = (args) => html`
|
|
105
110
|
<road-drawer
|
|
106
111
|
?is-open="${args['is-open']}"
|
|
112
|
+
?remove-padding="${args['remove-padding']}"
|
|
107
113
|
?has-back-icon="${args['has-back-icon']}"
|
|
108
114
|
?has-close-icon="${args['has-close-icon']}"
|
|
109
115
|
?has-inverse-header="${args['has-inverse-header']}"
|
|
@@ -84,24 +84,52 @@ export class Input {
|
|
|
84
84
|
const input = ev.target;
|
|
85
85
|
let newValue = input.value;
|
|
86
86
|
if (this.type === 'number' && this.blockdecimal) {
|
|
87
|
-
newValue = newValue.replace(/[.,]/g, ''); // Supprime les décimales si
|
|
87
|
+
newValue = newValue.replace(/[.,]/g, ''); // Supprime les décimales si `blockdecimal` est activé
|
|
88
|
+
}
|
|
89
|
+
// Convertir en nombre et ajuster selon min/max
|
|
90
|
+
let numericValue = parseFloat(newValue);
|
|
91
|
+
const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;
|
|
92
|
+
const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;
|
|
93
|
+
if (!isNaN(numericValue)) {
|
|
94
|
+
if (minValue !== undefined && numericValue < minValue) {
|
|
95
|
+
numericValue = minValue;
|
|
96
|
+
}
|
|
97
|
+
if (maxValue !== undefined && numericValue > maxValue) {
|
|
98
|
+
numericValue = maxValue;
|
|
99
|
+
}
|
|
100
|
+
newValue = numericValue.toString();
|
|
101
|
+
}
|
|
102
|
+
if (this.type === 'number') {
|
|
103
|
+
this.value = newValue;
|
|
104
|
+
input.value = newValue; // Mise à jour immédiate du champ
|
|
88
105
|
}
|
|
89
|
-
this.value = newValue;
|
|
90
106
|
this.roadInput.emit(ev);
|
|
91
107
|
this.roadChange.emit({ value: newValue });
|
|
108
|
+
// Appeler enforceMinMaxValue à chaque modification de la valeur
|
|
109
|
+
this.enforceMinMaxValue();
|
|
92
110
|
};
|
|
93
111
|
this.onBlur = () => {
|
|
94
112
|
let value = this.getValue();
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
113
|
+
const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;
|
|
114
|
+
const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;
|
|
115
|
+
let numericValue = parseFloat(value);
|
|
116
|
+
if (!isNaN(numericValue)) {
|
|
117
|
+
if (minValue !== undefined && numericValue < minValue) {
|
|
118
|
+
numericValue = minValue;
|
|
119
|
+
}
|
|
120
|
+
if (maxValue !== undefined && numericValue > maxValue) {
|
|
121
|
+
numericValue = maxValue;
|
|
122
|
+
}
|
|
123
|
+
value = numericValue.toString();
|
|
98
124
|
}
|
|
99
|
-
if (this.
|
|
100
|
-
value =
|
|
125
|
+
if (this.type === 'number') {
|
|
126
|
+
this.value = value;
|
|
127
|
+
const input = document.getElementById(this.inputId);
|
|
128
|
+
input.value = value;
|
|
101
129
|
}
|
|
102
|
-
this.value = value; // Mettre à jour la valeur avec la valeur ajustée
|
|
103
|
-
// Émettre l'événement roadblur avec la valeur ajustée
|
|
104
130
|
this.roadBlur.emit(value);
|
|
131
|
+
// Appeler enforceMinMaxValue lors de la perte de focus
|
|
132
|
+
this.enforceMinMaxValue();
|
|
105
133
|
};
|
|
106
134
|
this.onFocus = () => {
|
|
107
135
|
this.roadFocus.emit();
|
|
@@ -129,25 +157,35 @@ export class Input {
|
|
|
129
157
|
*/
|
|
130
158
|
valueChanged() {
|
|
131
159
|
this.debouncedRoadChange(this.value);
|
|
160
|
+
// Appeler enforceMinMaxValue après chaque changement de valeur
|
|
161
|
+
this.enforceMinMaxValue();
|
|
162
|
+
}
|
|
163
|
+
async enforceMinMaxValue() {
|
|
164
|
+
let value = this.getValue();
|
|
165
|
+
const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;
|
|
166
|
+
const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;
|
|
167
|
+
let numericValue = parseFloat(value);
|
|
168
|
+
if (!isNaN(numericValue)) {
|
|
169
|
+
if (minValue !== undefined && numericValue < minValue) {
|
|
170
|
+
numericValue = minValue;
|
|
171
|
+
}
|
|
172
|
+
if (maxValue !== undefined && numericValue > maxValue) {
|
|
173
|
+
numericValue = maxValue;
|
|
174
|
+
}
|
|
175
|
+
value = numericValue.toString();
|
|
176
|
+
}
|
|
177
|
+
if (this.type === 'number') {
|
|
178
|
+
this.value = value;
|
|
179
|
+
const input = document.getElementById(this.inputId);
|
|
180
|
+
input.value = value;
|
|
181
|
+
}
|
|
182
|
+
this.roadChange.emit({ value });
|
|
132
183
|
}
|
|
133
184
|
getValue() {
|
|
134
185
|
return typeof this.value === 'number'
|
|
135
186
|
? this.value.toString()
|
|
136
187
|
: (this.value || '').toString();
|
|
137
188
|
}
|
|
138
|
-
enforceMinMax(el) {
|
|
139
|
-
if (el.value !== "") {
|
|
140
|
-
const value = parseInt(el.value);
|
|
141
|
-
const minValue = parseInt(el.min);
|
|
142
|
-
const maxValue = parseInt(el.max);
|
|
143
|
-
if (value < minValue) {
|
|
144
|
-
el.value = el.min;
|
|
145
|
-
}
|
|
146
|
-
if (value > maxValue) {
|
|
147
|
-
el.value = el.max;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
189
|
componentWillLoad() {
|
|
152
190
|
this.debounceChanged(); // Initialize debounce on component load
|
|
153
191
|
}
|
|
@@ -157,7 +195,7 @@ export class Input {
|
|
|
157
195
|
const hasValueClass = this.value !== '' && this.value !== null ? 'has-value' : '';
|
|
158
196
|
const lessLabelClass = this.label !== '' ? '' : 'less-label';
|
|
159
197
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
160
|
-
return (h(Host, { key: '
|
|
198
|
+
return (h(Host, { key: 'b7ef84554172ef97f03f4dc705900d07a2aa1a38', "aria-disabled": this.disabled ? 'true' : null, class: this.sizes && `input-${this.sizes}`, value: value, blockdecimal: this.blockdecimal }, h("input", { key: '8eeb48bdc7f566e5d05653b62e84fd8a65c5f186', class: `form-control ${hasValueClass} ${isInvalidClass} ${lessLabelClass}`, id: this.inputId, "aria-disabled": this.disabled ? 'true' : null, "aria-labelledby": labelId, disabled: this.disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, enterKeyHint: this.enterkeyhint, autoFocus: this.autofocus, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, name: this.name, pattern: this.pattern, placeholder: this.placeholder, readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, size: this.size, type: this.type, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.type === 'number' ? (event) => this.handleKeyDown(event) : undefined, "data-cy": 'road-input' }), h("label", { key: '4aefd838da02cab58f221b5b3997425b08a5d8d4', class: "form-label", id: labelId, htmlFor: this.inputId }, this.label), this.error && this.error !== '' && h("p", { key: '4240bb64b880cc9d5a197bde53d751e111585c1e', class: "invalid-feedback" }, h("road-icon", { key: '018901170aa61e758327643920e4e061df3b8610', slot: "start", name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), this.error), this.helper && this.helper !== '' && h("p", { key: '84c82786154595624d477db40b79bee27eff1d03', class: "helper" }, this.helper), this.type && this.type == 'password' && h("slot", { key: '3d55459ebb09892c6b830b726292ae2db4cbb5be', name: "checklistPassword" })));
|
|
161
199
|
}
|
|
162
200
|
static get is() { return "road-input"; }
|
|
163
201
|
static get encapsulation() { return "scoped"; }
|
|
@@ -815,6 +853,31 @@ export class Input {
|
|
|
815
853
|
}
|
|
816
854
|
}];
|
|
817
855
|
}
|
|
856
|
+
static get methods() {
|
|
857
|
+
return {
|
|
858
|
+
"enforceMinMaxValue": {
|
|
859
|
+
"complexType": {
|
|
860
|
+
"signature": "() => Promise<void>",
|
|
861
|
+
"parameters": [],
|
|
862
|
+
"references": {
|
|
863
|
+
"Promise": {
|
|
864
|
+
"location": "global",
|
|
865
|
+
"id": "global::Promise"
|
|
866
|
+
},
|
|
867
|
+
"HTMLInputElement": {
|
|
868
|
+
"location": "global",
|
|
869
|
+
"id": "global::HTMLInputElement"
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
"return": "Promise<void>"
|
|
873
|
+
},
|
|
874
|
+
"docs": {
|
|
875
|
+
"text": "",
|
|
876
|
+
"tags": []
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
}
|
|
818
881
|
static get watchers() {
|
|
819
882
|
return [{
|
|
820
883
|
"propName": "debounce",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,QAAQ,CAAC;AAGpD;;;;;;;;;;;;GAYG;AAOH,MAAM,OAAO,KAAK;IALlB;QAME;;WAEG;QACK,YAAO,GAAW,cAAc,QAAQ,EAAE,EAAE,CAAC;QAErD;;WAEG;QACK,mBAAc,GAAG,KAAK,CAAC;QAE/B;;WAEG;QACK,iBAAY,GAAsB,KAAK,CAAC;QAEhD;;WAEG;QACK,iBAAY,GAAG,KAAK,CAAC;QAG7B;;WAEG;QACK,gBAAW,GAAiB,KAAK,CAAC;QAE1C;;WAEG;QACK,cAAS,GAAG,KAAK,CAAC;QAE1B;;WAEG;QACK,aAAQ,GA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AAmB,GAAG,CACrE,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,IAAI,QAAQ,GAAG,CAAC,CAAC","sourcesContent":["import { Component, Event, EventEmitter, Host, Prop, Watch, h } from '@stencil/core';\nimport { debounce as lodashDebounce } from 'lodash';\nimport { AutocompleteTypes, TextFieldTypes } from '../../interface';\n\n/**\n * @slot checklistPassword - Content the checklist Password exemple.\n * `<div class=\"checklist-password mt-16\" slot=\"checklistPassword\">`\n * `<span class=\"checklist-password-label\"><strong>Low Safety</strong></span>`\n * `<road-progress color=\"danger\" value=\"25\" class=\"mt-8 mb-16\"></road-progress>`\n * `<p class=\"text-medium mb-8\">For optimal safety your password must have at least :</p>`\n * `<ul class=\"m-0 pl-16\">`\n * `<li id=\"letter\" class=\"invalid mb-8\">1 lowercase and 1 uppercase</li>`\n * `<li id=\"number\" class=\"invalid mb-8\">1 digit</li>`\n * `<li id=\"length\" class=\"invalid\">8 characters minimum</li>`\n * `</ul>`\n * `</div>`\n */\n\n@Component({\n tag: 'road-input',\n styleUrl: 'input.css',\n scoped: true,\n})\nexport class Input {\n /**\n * The id of input\n */\n @Prop() inputId: string = `road-input-${inputIds++}`;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n @Prop() autocapitalize = 'off';\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: AutocompleteTypes = 'off';\n\n /**\n * If `true`, block decimal.\n */\n @Prop() blockdecimal = false;\n\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop() disabled = false;\n\n /**\n * A hint to the browser for which enter key to display.\n * Possible values: `\"enter\"`, `\"done\"`, `\"go\"`, `\"next\"`,\n * `\"previous\"`, `\"search\"`, and `\"send\"`.\n */\n @Prop() enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /**\n * A hint to the browser for which keyboard to display.\n * This attribute applies when the value of the type attribute is `\"text\"`, `\"password\"`, `\"email\"`, or `\"url\"`. Possible values are: `\"verbatim\"`, `\"latin\"`, `\"latin-name\"`, `\"latin-prose\"`, `\"full-width-latin\"`, `\"kana\"`, `\"katakana\"`, `\"numeric\"`, `\"tel\"`, `\"email\"`, `\"url\"`.\n */\n @Prop() inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() pattern?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop() readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * The initial size of the control. This value is in pixels unless the value of the type attribute is `\"text\"` or `\"password\"`, in which case it is an integer number of characters. This attribute applies only when the `type` attribute is set to `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() size?: number;\n\n /**\n * The sizes of the input.\n */\n @Prop() sizes: 'lg' | 'xl' = 'lg';\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: TextFieldTypes = 'text';\n\n /**\n * The value of the input.(for dynamic use use v-model for vue instead)\n */\n @Prop({ mutable: true }) value?: string | number | null = '';\n\n /**\n * Label for the field\n */\n @Prop() label?: string = '';\n\n /**\n * Error message for the field\n */\n @Prop() error?: string;\n\n /**\n * Helper message for the field\n */\n @Prop() helper?: string;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `roadChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n private handleKeyDown(event: KeyboardEvent) {\n if (this.type === 'number' && this.blockdecimal) {\n const forbiddenKeys = ['.', ',', 'e', '-', '¨', '^', '`', '+'];\n if (forbiddenKeys.includes(event.key)) {\n event.preventDefault();\n }\n }\n }\n\n\n private debouncedRoadChange = this.createDebouncedRoadChange();\n\n private createDebouncedRoadChange() {\n return lodashDebounce((value: any) => {\n this.roadChange.emit({ value: value == null ? value : value.toString() });\n }, this.debounce);\n }\n\n @Watch('debounce')\n debounceChanged() {\n // Créez une nouvelle fonction debouncedRoadChange avec la nouvelle valeur de debounce\n this.debouncedRoadChange = this.createDebouncedRoadChange();\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n this.debouncedRoadChange(this.value);\n }\n\n /**\n * Emitted when a keyboard input occurred.\n */\n\n /** @internal */\n @Event() roadInput!: EventEmitter<KeyboardEvent>;\n\n /**\n * Emitted when the value has changed.\n */\n\n /** @internal */\n @Event() roadChange!: EventEmitter<{\n value: string | undefined | null;\n }>;\n\n /**\n * Emitted when the input loses focus.\n */\n\n /** @internal */\n @Event() roadBlur!: EventEmitter<string | null>;\n\n /**\n * Emitted when the input has focus.\n */\n\n /** @internal */\n @Event() roadFocus!: EventEmitter<void>;\n\n private getValue(): string {\n return typeof this.value === 'number'\n ? this.value.toString()\n : (this.value || '').toString();\n }\n\n private onInput = (ev: Event) => {\n const input = ev.target as HTMLInputElement;\n let newValue = input.value;\n\n if (this.type === 'number' && this.blockdecimal) {\n newValue = newValue.replace(/[.,]/g, ''); // Supprime les décimales si blockDecimal est activé\n }\n\n this.value = newValue;\n this.roadInput.emit(ev as KeyboardEvent);\n this.roadChange.emit({ value: newValue });\n };\n\n private onBlur = () => {\n let value = this.getValue();\n\n // Vérifier si les contraintes min et max sont définies\n if (this.min !== undefined && value !== '' && parseFloat(value) < parseFloat(this.min)) {\n value = this.min; // Ajuster la valeur à la valeur minimale\n }\n\n if (this.max !== undefined && value !== '' && parseFloat(value) > parseFloat(this.max)) {\n value = this.max; // Ajuster la valeur à la valeur maximale\n }\n\n this.value = value; // Mettre à jour la valeur avec la valeur ajustée\n\n // Émettre l'événement roadblur avec la valeur ajustée\n this.roadBlur.emit(value);\n };\n\n private onFocus = () => {\n this.roadFocus.emit();\n };\n\n private enforceMinMax(el: HTMLInputElement): void {\n if (el.value !== \"\") {\n const value: number = parseInt(el.value);\n const minValue: number = parseInt(el.min);\n const maxValue: number = parseInt(el.max);\n\n if (value < minValue) {\n el.value = el.min;\n }\n\n if (value > maxValue) {\n el.value = el.max;\n }\n }\n }\n\n componentWillLoad() {\n this.debounceChanged(); // Initialize debounce on component load\n }\n\n render() {\n const value = this.getValue();\n const labelId = this.inputId + '-label';\n const hasValueClass = this.value !== '' && this.value !== null ? 'has-value' : '';\n const lessLabelClass = this.label !== '' ? '' : 'less-label';\n const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';\n\n return (\n <Host aria-disabled={this.disabled ? 'true' : null} class={this.sizes && `input-${this.sizes}`} value={value} blockdecimal={this.blockdecimal}>\n <input\n class={`form-control ${hasValueClass} ${isInvalidClass} ${lessLabelClass}`}\n id={this.inputId}\n aria-disabled={this.disabled ? 'true' : null}\n aria-labelledby={labelId}\n disabled={this.disabled}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n enterKeyHint={this.enterkeyhint}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n min={this.min}\n max={this.max}\n minLength={this.minlength}\n maxLength={this.maxlength}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n step={this.step}\n size={this.size}\n type={this.type}\n value={value}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onKeyDown={this.type === 'number' ? (event: KeyboardEvent) => this.handleKeyDown(event) : undefined}\n onKeyUp={(event: Event) => this.enforceMinMax(event.target as HTMLInputElement)}\n data-cy='road-input'\n />\n <label class=\"form-label\" id={labelId} htmlFor={this.inputId}>{this.label}</label>\n {this.error && this.error !== '' && <p class=\"invalid-feedback\"><road-icon slot=\"start\" name=\"alert-error-solid\" aria-hidden=\"true\" size=\"sm\"></road-icon>{this.error}</p>}\n {this.helper && this.helper !== '' && <p class=\"helper\">{this.helper}</p>}\n {this.type && this.type == 'password' && <slot name=\"checklistPassword\" />}\n </Host>\n );\n }\n}\n\nlet inputIds = 0;\n"]}
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,QAAQ,CAAC;AAGpD;;;;;;;;;;;;GAYG;AAOH,MAAM,OAAO,KAAK;IALlB;QAME;;WAEG;QACK,YAAO,GAAW,cAAc,QAAQ,EAAE,EAAE,CAAC;QAErD;;WAEG;QACK,mBAAc,GAAG,KAAK,CAAC;QAE/B;;WAEG;QACK,iBAAY,GAAsB,KAAK,CAAC;QAEhD;;WAEG;QACK,iBAAY,GAAG,KAAK,CAAC;QAG7B;;WAEG;QACK,gBAAW,GAAiB,KAAK,CAAC;QAE1C;;WAEG;QACK,cAAS,GAAG,KAAK,CAAC;QAE1B;;WAEG;QACK,aAAQ,GAAG,KAAK,CAAC;QAmCzB;;WAEG;QACK,SAAI,GAAW,IAAI,CAAC,OAAO,CAAC;QAYpC;;WAEG;QACK,aAAQ,GAAG,KAAK,CAAC;QAEzB;;WAEG;QACK,aAAQ,GAAG,KAAK,CAAC;QAEzB;;WAEG;QACK,eAAU,GAAG,KAAK,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,IAAI,QAAQ,GAAG,CAAC,CAAC","sourcesContent":["import { Component, Event, EventEmitter, Host, Prop, Watch, h, Method } from '@stencil/core';\nimport { debounce as lodashDebounce } from 'lodash';\nimport { AutocompleteTypes, TextFieldTypes } from '../../interface';\n\n/**\n * @slot checklistPassword - Content the checklist Password exemple.\n * `<div class=\"checklist-password mt-16\" slot=\"checklistPassword\">`\n * `<span class=\"checklist-password-label\"><strong>Low Safety</strong></span>`\n * `<road-progress color=\"danger\" value=\"25\" class=\"mt-8 mb-16\"></road-progress>`\n * `<p class=\"text-medium mb-8\">For optimal safety your password must have at least :</p>`\n * `<ul class=\"m-0 pl-16\">`\n * `<li id=\"letter\" class=\"invalid mb-8\">1 lowercase and 1 uppercase</li>`\n * `<li id=\"number\" class=\"invalid mb-8\">1 digit</li>`\n * `<li id=\"length\" class=\"invalid\">8 characters minimum</li>`\n * `</ul>`\n * `</div>`\n */\n\n@Component({\n tag: 'road-input',\n styleUrl: 'input.css',\n scoped: true,\n})\nexport class Input {\n /**\n * The id of input\n */\n @Prop() inputId: string = `road-input-${inputIds++}`;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n @Prop() autocapitalize = 'off';\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: AutocompleteTypes = 'off';\n\n /**\n * If `true`, block decimal.\n */\n @Prop() blockdecimal = false;\n\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop() disabled = false;\n\n /**\n * A hint to the browser for which enter key to display.\n * Possible values: `\"enter\"`, `\"done\"`, `\"go\"`, `\"next\"`,\n * `\"previous\"`, `\"search\"`, and `\"send\"`.\n */\n @Prop() enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /**\n * A hint to the browser for which keyboard to display.\n * This attribute applies when the value of the type attribute is `\"text\"`, `\"password\"`, `\"email\"`, or `\"url\"`. Possible values are: `\"verbatim\"`, `\"latin\"`, `\"latin-name\"`, `\"latin-prose\"`, `\"full-width-latin\"`, `\"kana\"`, `\"katakana\"`, `\"numeric\"`, `\"tel\"`, `\"email\"`, `\"url\"`.\n */\n @Prop() inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() pattern?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop() readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * The initial size of the control. This value is in pixels unless the value of the type attribute is `\"text\"` or `\"password\"`, in which case it is an integer number of characters. This attribute applies only when the `type` attribute is set to `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() size?: number;\n\n /**\n * The sizes of the input.\n */\n @Prop() sizes: 'lg' | 'xl' = 'lg';\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: TextFieldTypes = 'text';\n\n /**\n * The value of the input.(for dynamic use use v-model for vue instead)\n */\n @Prop({ mutable: true }) value?: string | number | null = '';\n\n /**\n * Label for the field\n */\n @Prop() label?: string = '';\n\n /**\n * Error message for the field\n */\n @Prop() error?: string;\n\n /**\n * Helper message for the field\n */\n @Prop() helper?: string;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `roadChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n private handleKeyDown(event: KeyboardEvent) {\n if (this.type === 'number' && this.blockdecimal) {\n const forbiddenKeys = ['.', ',', 'e', '-', '¨', '^', '`', '+'];\n if (forbiddenKeys.includes(event.key)) {\n event.preventDefault();\n }\n }\n }\n\n\n private debouncedRoadChange = this.createDebouncedRoadChange();\n\n private createDebouncedRoadChange() {\n return lodashDebounce((value: any) => {\n this.roadChange.emit({ value: value == null ? value : value.toString() });\n }, this.debounce);\n }\n\n @Watch('debounce')\n debounceChanged() {\n // Créez une nouvelle fonction debouncedRoadChange avec la nouvelle valeur de debounce\n this.debouncedRoadChange = this.createDebouncedRoadChange();\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n this.debouncedRoadChange(this.value);\n // Appeler enforceMinMaxValue après chaque changement de valeur\n this.enforceMinMaxValue();\n }\n\n @Method()\n async enforceMinMaxValue() {\n let value = this.getValue();\n\n const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;\n const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;\n let numericValue = parseFloat(value);\n\n if (!isNaN(numericValue)) {\n if (minValue !== undefined && numericValue < minValue) {\n numericValue = minValue;\n }\n if (maxValue !== undefined && numericValue > maxValue) {\n numericValue = maxValue;\n }\n value = numericValue.toString();\n }\n\n if (this.type === 'number') {\n this.value = value;\n const input = document.getElementById(this.inputId) as HTMLInputElement;\n input.value = value;\n }\n\n this.roadChange.emit({ value });\n }\n\n /**\n * Emitted when a keyboard input occurred.\n */\n\n /** @internal */\n @Event() roadInput!: EventEmitter<KeyboardEvent>;\n\n /**\n * Emitted when the value has changed.\n */\n\n /** @internal */\n @Event() roadChange!: EventEmitter<{\n value: string | undefined | null;\n }>;\n\n /**\n * Emitted when the input loses focus.\n */\n\n /** @internal */\n @Event() roadBlur!: EventEmitter<string | null>;\n\n /**\n * Emitted when the input has focus.\n */\n\n /** @internal */\n @Event() roadFocus!: EventEmitter<void>;\n\n\n\n\n\n private getValue(): string {\n return typeof this.value === 'number'\n ? this.value.toString()\n : (this.value || '').toString();\n }\n\n private onInput = (ev: Event) => {\n const input = ev.target as HTMLInputElement;\n let newValue = input.value;\n \n if (this.type === 'number' && this.blockdecimal) {\n newValue = newValue.replace(/[.,]/g, ''); // Supprime les décimales si `blockdecimal` est activé\n }\n \n // Convertir en nombre et ajuster selon min/max\n let numericValue = parseFloat(newValue);\n const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;\n const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;\n \n if (!isNaN(numericValue)) {\n if (minValue !== undefined && numericValue < minValue) {\n numericValue = minValue;\n }\n if (maxValue !== undefined && numericValue > maxValue) {\n numericValue = maxValue;\n }\n newValue = numericValue.toString();\n }\n \n if (this.type === 'number') {\n this.value = newValue;\n input.value = newValue; // Mise à jour immédiate du champ\n }\n \n this.roadInput.emit(ev as KeyboardEvent);\n this.roadChange.emit({ value: newValue });\n\n // Appeler enforceMinMaxValue à chaque modification de la valeur\n this.enforceMinMaxValue();\n }; \n \n\n private onBlur = () => {\n let value = this.getValue();\n \n const minValue = this.min !== undefined ? parseFloat(this.min) : undefined;\n const maxValue = this.max !== undefined ? parseFloat(this.max) : undefined;\n let numericValue = parseFloat(value);\n \n if (!isNaN(numericValue)) {\n if (minValue !== undefined && numericValue < minValue) {\n numericValue = minValue;\n }\n if (maxValue !== undefined && numericValue > maxValue) {\n numericValue = maxValue;\n }\n value = numericValue.toString();\n }\n \n if (this.type === 'number') {\n this.value = value;\n const input = document.getElementById(this.inputId) as HTMLInputElement;\n input.value = value;\n }\n \n this.roadBlur.emit(value);\n \n // Appeler enforceMinMaxValue lors de la perte de focus\n this.enforceMinMaxValue();\n };\n \n\n private onFocus = () => {\n this.roadFocus.emit();\n };\n\n\n\n componentWillLoad() {\n this.debounceChanged(); // Initialize debounce on component load\n }\n\n render() {\n const value = this.getValue();\n const labelId = this.inputId + '-label';\n const hasValueClass = this.value !== '' && this.value !== null ? 'has-value' : '';\n const lessLabelClass = this.label !== '' ? '' : 'less-label';\n const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';\n\n return (\n <Host aria-disabled={this.disabled ? 'true' : null} class={this.sizes && `input-${this.sizes}`} value={value} blockdecimal={this.blockdecimal}>\n <input\n class={`form-control ${hasValueClass} ${isInvalidClass} ${lessLabelClass}`}\n id={this.inputId}\n aria-disabled={this.disabled ? 'true' : null}\n aria-labelledby={labelId}\n disabled={this.disabled}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n enterKeyHint={this.enterkeyhint}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n min={this.min}\n max={this.max}\n minLength={this.minlength}\n maxLength={this.maxlength}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n step={this.step}\n size={this.size}\n type={this.type}\n value={value}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onKeyDown={this.type === 'number' ? (event: KeyboardEvent) => this.handleKeyDown(event) : undefined}\n data-cy='road-input'\n />\n <label class=\"form-label\" id={labelId} htmlFor={this.inputId}>{this.label}</label>\n {this.error && this.error !== '' && <p class=\"invalid-feedback\"><road-icon slot=\"start\" name=\"alert-error-solid\" aria-hidden=\"true\" size=\"sm\"></road-icon>{this.error}</p>}\n {this.helper && this.helper !== '' && <p class=\"helper\">{this.helper}</p>}\n {this.type && this.type == 'password' && <slot name=\"checklistPassword\" />}\n </Host>\n );\n }\n}\n\nlet inputIds = 0;\n"]}
|