@roadtrip/components 3.33.7 → 3.34.0
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/road-badge_14.cjs.entry.js +14 -10
- package/dist/cjs/road-badge_14.cjs.entry.js.map +1 -1
- package/dist/cjs/road-modal.cjs.entry.js +1 -1
- package/dist/cjs/road-navbar-item-v2.cjs.entry.js +2 -2
- package/dist/cjs/road-navbar-item.cjs.entry.js +2 -2
- package/dist/cjs/road-navbar-v2.cjs.entry.js +1 -1
- package/dist/cjs/road-navbar.cjs.entry.js +1 -1
- package/dist/cjs/road-phone-number-input.cjs.entry.js +2 -2
- 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 +4 -4
- package/dist/cjs/road-tooltip.cjs.entry.js.map +1 -1
- package/dist/collection/components/input/input.css +1 -0
- package/dist/collection/components/input/input.js +8 -4
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/input/input.stories.js +25 -9
- package/dist/collection/components/input-group/input-group.js +1 -1
- package/dist/collection/components/item/item.js +3 -3
- package/dist/collection/components/label/label.js +1 -1
- package/dist/collection/components/list/list.js +2 -2
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/modal/modal.stories.js +4 -3
- package/dist/collection/components/navbar/navbar.js +1 -1
- package/dist/collection/components/navbar-item/navbar-item.js +2 -2
- package/dist/collection/components/navbar-item-v2/navbar-item-v2.js +2 -2
- package/dist/collection/components/navbar-v2/navbar-v2.js +1 -1
- package/dist/collection/components/phone-number-input/phone-number-input.js +2 -2
- package/dist/collection/components/plate-number/plate-number.js +2 -2
- package/dist/collection/components/plate-number/plate-number.stories.js +18 -12
- 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/radio.stories.js +12 -6
- package/dist/collection/components/radio-group/radio-group.js +1 -1
- package/dist/collection/components/range/range.js +2 -2
- package/dist/collection/components/range/range.stories.js +4 -3
- 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/select.stories.js +12 -7
- package/dist/collection/components/select-filter/select-filter.js +2 -2
- package/dist/collection/components/select-filter/select-filter.stories.js +4 -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/textarea/textarea.stories.js +18 -12
- package/dist/collection/components/toast/toast.js +1 -1
- package/dist/collection/components/toast/toast.stories.js +4 -2
- package/dist/collection/components/toggle/toggle.js +2 -2
- package/dist/collection/components/toggle/toggle.stories.js +12 -7
- 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.css +31 -0
- package/dist/collection/components/tooltip/tooltip.js +5 -5
- package/dist/collection/components/tooltip/tooltip.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.stories.js +1 -1
- package/dist/esm/road-badge_14.entry.js +14 -10
- package/dist/esm/road-badge_14.entry.js.map +1 -1
- package/dist/esm/road-modal.entry.js +1 -1
- package/dist/esm/road-navbar-item-v2.entry.js +2 -2
- package/dist/esm/road-navbar-item.entry.js +2 -2
- package/dist/esm/road-navbar-v2.entry.js +1 -1
- package/dist/esm/road-navbar.entry.js +1 -1
- package/dist/esm/road-phone-number-input.entry.js +2 -2
- 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 +4 -4
- package/dist/esm/road-tooltip.entry.js.map +1 -1
- package/dist/html.html-data.json +13 -1
- package/dist/roadtrip/p-061f6889.entry.js +2 -0
- package/dist/roadtrip/{p-6d3d947e.entry.js.map → p-061f6889.entry.js.map} +1 -1
- package/dist/roadtrip/{p-03656f9a.entry.js → p-0a6c9571.entry.js} +2 -2
- package/dist/roadtrip/{p-e0421465.entry.js → p-0d7b6e32.entry.js} +2 -2
- package/dist/roadtrip/{p-6ff3b37c.entry.js → p-0de7b85d.entry.js} +2 -2
- package/dist/roadtrip/p-16726940.entry.js +2 -0
- package/dist/roadtrip/{p-06fbd2ea.entry.js → p-2f89b651.entry.js} +2 -2
- package/dist/roadtrip/{p-60bd73ad.entry.js → p-327d424c.entry.js} +2 -2
- package/dist/roadtrip/{p-e75ec60f.entry.js → p-38fd91b3.entry.js} +2 -2
- package/dist/roadtrip/p-3aa617b1.entry.js +2 -0
- package/dist/roadtrip/{p-449affa6.entry.js → p-41bab704.entry.js} +2 -2
- package/dist/roadtrip/p-4329a5ff.entry.js +2 -0
- package/dist/roadtrip/{p-a67eaba7.entry.js → p-4765c524.entry.js} +3 -3
- package/dist/roadtrip/p-4765c524.entry.js.map +1 -0
- package/dist/roadtrip/p-50d9ed52.entry.js +2 -0
- package/dist/roadtrip/{p-db77c354.entry.js.map → p-50d9ed52.entry.js.map} +1 -1
- package/dist/roadtrip/{p-c28e7add.entry.js → p-5ed9e829.entry.js} +2 -2
- package/dist/roadtrip/{p-d80e7563.entry.js → p-6fb0f8b8.entry.js} +2 -2
- package/dist/roadtrip/{p-6c617506.entry.js → p-78e6204e.entry.js} +2 -2
- package/dist/roadtrip/{p-99a6faae.entry.js → p-7a7b1fb6.entry.js} +2 -2
- package/dist/roadtrip/{p-b5fa8c5a.entry.js → p-7d693464.entry.js} +2 -2
- package/dist/roadtrip/{p-3dcaa947.entry.js → p-7e1e110f.entry.js} +2 -2
- package/dist/roadtrip/{p-517aeeca.entry.js → p-7ea16bfa.entry.js} +2 -2
- package/dist/roadtrip/p-8c6ad79a.entry.js +2 -0
- package/dist/roadtrip/{p-b8c5d292.entry.js → p-93272a9d.entry.js} +2 -2
- package/dist/roadtrip/p-97245610.entry.js +2 -0
- package/dist/roadtrip/{p-a254df6d.entry.js → p-a0c91322.entry.js} +2 -2
- package/dist/roadtrip/{p-c465f551.entry.js → p-a406a342.entry.js} +2 -2
- package/dist/roadtrip/{p-e6e9882b.entry.js → p-a5c363f2.entry.js} +2 -2
- package/dist/roadtrip/{p-fe40ab3d.entry.js → p-ab550b59.entry.js} +2 -2
- package/dist/roadtrip/{p-5fea6a74.entry.js → p-ad9055c1.entry.js} +2 -2
- package/dist/roadtrip/{p-2e049c8e.entry.js → p-c4d3dda1.entry.js} +2 -2
- package/dist/roadtrip/{p-3f5dff96.entry.js → p-cb8924ee.entry.js} +2 -2
- package/dist/roadtrip/p-ce386f80.entry.js +2 -0
- package/dist/roadtrip/p-dc9509b1.entry.js +2 -0
- package/dist/roadtrip/p-dc9509b1.entry.js.map +1 -0
- package/dist/roadtrip/{p-c6824205.entry.js → p-df897815.entry.js} +2 -2
- package/dist/roadtrip/{p-eac313e4.entry.js → p-e82c8ca0.entry.js} +2 -2
- package/dist/roadtrip/{p-ea1a175d.entry.js → p-e8bcf7a0.entry.js} +2 -2
- package/dist/roadtrip/{p-37430583.entry.js → p-ebada9f6.entry.js} +2 -2
- package/dist/roadtrip/{p-950b8a43.entry.js → p-f1ef265d.entry.js} +2 -2
- package/dist/roadtrip/{p-167cd2fc.entry.js → p-f5bcb8d6.entry.js} +2 -2
- package/dist/roadtrip/{p-fd3c58b6.entry.js → p-f9ba8499.entry.js} +2 -2
- package/dist/roadtrip/{p-c47ccbf2.entry.js → p-fafcecb2.entry.js} +2 -2
- package/dist/roadtrip/{p-f1b53143.entry.js → p-ff430279.entry.js} +2 -2
- package/dist/roadtrip/roadtrip.esm.js +1 -1
- package/dist/types/components/input/input.d.ts +2 -2
- package/dist/types/components/tooltip/tooltip.d.ts +1 -1
- package/dist/types/components.d.ts +12 -4
- package/hydrate/index.js +69 -65
- package/hydrate/index.mjs +69 -65
- package/package.json +1 -1
- package/dist/roadtrip/p-215afdbd.entry.js +0 -2
- package/dist/roadtrip/p-4675ea6d.entry.js +0 -2
- package/dist/roadtrip/p-65f9bd9c.entry.js +0 -2
- package/dist/roadtrip/p-6d3d947e.entry.js +0 -2
- package/dist/roadtrip/p-85b1e505.entry.js +0 -2
- package/dist/roadtrip/p-8b04fc62.entry.js +0 -2
- package/dist/roadtrip/p-a67eaba7.entry.js.map +0 -1
- package/dist/roadtrip/p-cfd2919e.entry.js +0 -2
- package/dist/roadtrip/p-db77c354.entry.js +0 -2
- package/dist/roadtrip/p-e6c4c576.entry.js +0 -2
- package/dist/roadtrip/p-e6c4c576.entry.js.map +0 -1
- /package/dist/roadtrip/{p-03656f9a.entry.js.map → p-0a6c9571.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-e0421465.entry.js.map → p-0d7b6e32.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-6ff3b37c.entry.js.map → p-0de7b85d.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-65f9bd9c.entry.js.map → p-16726940.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-06fbd2ea.entry.js.map → p-2f89b651.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-60bd73ad.entry.js.map → p-327d424c.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-e75ec60f.entry.js.map → p-38fd91b3.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-85b1e505.entry.js.map → p-3aa617b1.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-449affa6.entry.js.map → p-41bab704.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-215afdbd.entry.js.map → p-4329a5ff.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-c28e7add.entry.js.map → p-5ed9e829.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-d80e7563.entry.js.map → p-6fb0f8b8.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-6c617506.entry.js.map → p-78e6204e.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-99a6faae.entry.js.map → p-7a7b1fb6.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-b5fa8c5a.entry.js.map → p-7d693464.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-3dcaa947.entry.js.map → p-7e1e110f.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-517aeeca.entry.js.map → p-7ea16bfa.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-4675ea6d.entry.js.map → p-8c6ad79a.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-b8c5d292.entry.js.map → p-93272a9d.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-8b04fc62.entry.js.map → p-97245610.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-a254df6d.entry.js.map → p-a0c91322.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-c465f551.entry.js.map → p-a406a342.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-e6e9882b.entry.js.map → p-a5c363f2.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-fe40ab3d.entry.js.map → p-ab550b59.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-5fea6a74.entry.js.map → p-ad9055c1.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-2e049c8e.entry.js.map → p-c4d3dda1.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-3f5dff96.entry.js.map → p-cb8924ee.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-cfd2919e.entry.js.map → p-ce386f80.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-c6824205.entry.js.map → p-df897815.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-eac313e4.entry.js.map → p-e82c8ca0.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-ea1a175d.entry.js.map → p-e8bcf7a0.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-37430583.entry.js.map → p-ebada9f6.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-950b8a43.entry.js.map → p-f1ef265d.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-167cd2fc.entry.js.map → p-f5bcb8d6.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-fd3c58b6.entry.js.map → p-f9ba8499.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-c47ccbf2.entry.js.map → p-fafcecb2.entry.js.map} +0 -0
- /package/dist/roadtrip/{p-f1b53143.entry.js.map → p-ff430279.entry.js.map} +0 -0
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-fee0103c.js');
|
|
6
6
|
|
|
7
|
-
const tooltipCss = ":host{--max-width:85vw;--z-index:1;--width:max-content;position:relative;display:inline-block}:host(:hover){cursor:pointer}:host([trigger=\"hover\"]) .tooltip{transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out}.tooltip{position:absolute;top:-0.5rem;left:50%;z-index:1;width:var(--width);min-width:100%;max-width:var(--max-width);padding:0.5rem;font-family:var(--road-font);font-size:var(--road-body-small);color:var(--road-on-surface);text-align:center;pointer-events:none;visibility:hidden;background:var(--road-surface);border:1px solid var(--road-outline-weak);border-radius:0.25rem;box-shadow:var(--road-elevation-low);opacity:0;transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out;transform:translateX(-50%) translateY(-100%)}:host([contentalign=\"left\"]) .tooltip{text-align:left}.tooltip.tooltip-text-left::after{text-align:left}.tooltip-open{visibility:visible;opacity:1}:host([data-tooltip-position=\"top\"]) .tooltip{left:50%;transform:translateX(-50%) translateY(-70%)}:host([data-tooltip-position=\"top\"]) .tooltip-open{left:50%;transform:translateX(-50%) translateY(-100%)}:host([data-tooltip-position=\"top-left\"]) .tooltip{left:0%;transform:translateY(-70%)}:host([data-tooltip-position=\"top-left\"]) .tooltip-open{transform:translateY(-100%)}:host([data-tooltip-position=\"top-right\"]) .tooltip{left:50%;transform:translateY(-70%)}:host([data-tooltip-position=\"top-right\"]) .tooltip-open{left:100%;transform:translateY(-100%)}:host([data-tooltip-position=\"left\"]) .tooltip{top:50%;left:0%;margin-right:0.5rem;transform:translateX(-94%) translateY(-55%)}:host([data-tooltip-position=\"left\"]) .tooltip-open{transform:translateX(-103%) translateY(-55%)}:host([data-tooltip-position=\"bottom\"]) .tooltip{top:100%;left:50%;margin-top:0.5rem;transform:translateX(-50%) translateY(-40%)}:host([data-tooltip-position=\"bottom\"]) .tooltip-open{transform:translateX(-50%) translateY(-6%)}:host([data-tooltip-position=\"bottom-left\"]) .tooltip{top:100%;left:0;margin-top:0.5rem;transform:translateY(-40%)}:host([data-tooltip-position=\"bottom-left\"]) .tooltip-open{transform:translateY(-6%)}:host([data-tooltip-position=\"bottom-right\"]) .tooltip{top:100%;left:100%;margin-top:0.5rem;transform:translateY(-40%)}:host([data-tooltip-position=\"bottom-right\"]) .tooltip-open{transform:translateY(-6%)}:host([data-tooltip-position=\"right\"]) .tooltip{top:50%;left:100%;margin-left:0.5rem;transform:translateX(-14%) translateY(-55%)}:host([data-tooltip-position=\"right\"]) .tooltip-open{transform:translateX(-4%) translateY(-55%)}";
|
|
7
|
+
const tooltipCss = ":host{--max-width:85vw;--z-index:1;--width:max-content;position:relative;display:inline-block}:host(:hover){cursor:pointer}:host([trigger=\"hover\"]) .tooltip{transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out}.tooltip{position:absolute;top:-0.5rem;left:50%;z-index:1;width:var(--width);min-width:100%;max-width:var(--max-width);padding:0.5rem;font-family:var(--road-font);font-size:var(--road-body-small);color:var(--road-on-surface);text-align:center;pointer-events:none;visibility:hidden;background:var(--road-surface);border:1px solid var(--road-outline-weak);border-radius:0.25rem;box-shadow:var(--road-elevation-low);opacity:0;transition:opacity 0.2s ease-in-out, transform 0.2s ease-in-out;transform:translateX(-50%) translateY(-100%)}:host([contentalign=\"left\"]) .tooltip{text-align:left}.tooltip.tooltip-text-left::after{text-align:left}.tooltip-open{visibility:visible;opacity:1}:host([data-tooltip-position=\"top\"]) .tooltip{left:50%;transform:translateX(-50%) translateY(-70%)}:host([data-tooltip-position=\"top\"]) .tooltip-open{left:50%;transform:translateX(-50%) translateY(-100%)}:host([data-tooltip-position=\"top-left\"]) .tooltip{left:0%;transform:translateY(-70%)}:host([data-tooltip-position=\"top-left\"]) .tooltip-open{transform:translateY(-100%)}:host([data-tooltip-position=\"top-right\"]) .tooltip{left:50%;transform:translateY(-70%)}:host([data-tooltip-position=\"top-right\"]) .tooltip-open{left:100%;transform:translateY(-100%)}:host([data-tooltip-position=\"top-end\"]) .tooltip{left:auto;right:0%;transform:translateY(-70%)}:host([data-tooltip-position=\"top-end\"]) .tooltip-open{transform:translateY(-100%)}:host([data-tooltip-position=\"left\"]) .tooltip{top:50%;left:0%;margin-right:0.5rem;transform:translateX(-94%) translateY(-55%)}:host([data-tooltip-position=\"left\"]) .tooltip-open{transform:translateX(-103%) translateY(-55%)}:host([data-tooltip-position=\"bottom\"]) .tooltip{top:100%;left:50%;margin-top:0.5rem;transform:translateX(-50%) translateY(-40%)}:host([data-tooltip-position=\"bottom\"]) .tooltip-open{transform:translateX(-50%) translateY(-6%)}:host([data-tooltip-position=\"bottom-left\"]) .tooltip{top:100%;left:0;margin-top:0.5rem;transform:translateY(-40%)}:host([data-tooltip-position=\"bottom-left\"]) .tooltip-open{transform:translateY(-6%)}:host([data-tooltip-position=\"bottom-right\"]) .tooltip{top:100%;left:100%;margin-top:0.5rem;transform:translateY(-40%)}:host([data-tooltip-position=\"bottom-right\"]) .tooltip-open{transform:translateY(-6%)}:host([data-tooltip-position=\"bottom-end\"]) .tooltip{margin-top:0.5rem;left:auto;top:100%;right:0;transform:translateY(-40%)}:host([data-tooltip-position=\"bottom-end\"]) .tooltip-open{transform:translateY(-6%)}:host([data-tooltip-position=\"right\"]) .tooltip{top:50%;left:100%;margin-left:0.5rem;transform:translateX(-14%) translateY(-55%)}:host([data-tooltip-position=\"right\"]) .tooltip-open{transform:translateX(-4%) translateY(-55%)}";
|
|
8
8
|
const RoadTooltipStyle0 = tooltipCss;
|
|
9
9
|
|
|
10
10
|
const Tooltip = class {
|
|
@@ -99,12 +99,12 @@ const Tooltip = class {
|
|
|
99
99
|
return triggers.includes(triggerType);
|
|
100
100
|
}
|
|
101
101
|
render() {
|
|
102
|
-
return (index.h(index.Host, { key: '
|
|
102
|
+
return (index.h(index.Host, { key: '172216930c32f4de48df7264149b90c95cdf299f', onMouseOver: this.onMouseOver, onMouseOut: this.onMouseOut, onClick: this.onClick, onFocus: this.onFocus, onBlur: this.onBlur, tabindex: "0" // Makes the element focusable
|
|
103
103
|
,
|
|
104
|
-
"data-tooltip-position": this.position }, index.h("slot", { key: '
|
|
104
|
+
"data-tooltip-position": this.position }, index.h("slot", { key: 'e87dd66f22d8586f1916b4fdd9839bec64d3aea4', "aria-describedby": this.tooltipId }), index.h("div", { key: 'b61044b9938cf4859676d05a76a6fc4e8f8fb77a', part: "tooltip", id: this.tooltipId, class: {
|
|
105
105
|
tooltip: true,
|
|
106
106
|
'tooltip-open': this.isOpen,
|
|
107
|
-
}, role: "tooltip", "aria-hidden": !this.isOpen ? 'true' : 'false' }, this.content, index.h("slot", { key: '
|
|
107
|
+
}, role: "tooltip", "aria-hidden": !this.isOpen ? 'true' : 'false' }, this.content, index.h("slot", { key: 'a7a84bbde98a3ee34b8ab8c1d397446dbd314f2e', name: "tooltip-content" }))));
|
|
108
108
|
}
|
|
109
109
|
get el() { return index.getElement(this); }
|
|
110
110
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"road-tooltip.entry.cj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AS,EAClB,KAAK,EAAE;gBACL,OAAO,EAAE,IAAI;gBACb,cAAc,EAAE,IAAI,CAAC,MAAM;aAC5B,EACD,IAAI,EAAC,SAAS,iBACD,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,IAE3C,IAAI,CAAC,OAAO,EACbA,mEAAM,IAAI,EAAC,iBAAiB,GAAG,CAC3B,CACD,EACP;KACH;;;AAGH,IAAI,UAAU,GAAG,CAAC,CAAC;;;;;","names":["h","Host"],"sources":["src/components/tooltip/tooltip.css?tag=road-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.tsx"],"sourcesContent":["/*\n * Tooltip\n *\n * Index\n * - Tooltip\n * - Position\n */\n\n/**\n * @prop --max-width: The maximum width of the tooltip.\n * @prop --z-index: The z-index of the tooltip.\n * @prop --width: width of the tooltip.\n */\n\n/* TOOLTIP\n -------------------- */\n\n:host {\n --max-width: 85vw;\n --z-index: 1;\n --width: max-content;\n\n position: relative;\n display: inline-block;\n}\n\n:host(:hover) {\n cursor: pointer;\n}\n\n\n:host([trigger=\"hover\"]) .tooltip {\n transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;\n}\n\n.tooltip {\n position: absolute;\n top: -0.5rem;\n left: 50%;\n z-index: 1;\n width: var(--width);\n min-width: 100%;\n max-width: var(--max-width);\n padding: 0.5rem;\n font-family: var(--road-font);\n font-size: var(--road-body-small);\n color: var(--road-on-surface);\n text-align: center;\n pointer-events: none;\n visibility: hidden;\n background: var(--road-surface);\n border: 1px solid var(--road-outline-weak);\n border-radius: 0.25rem;\n box-shadow: var(--road-elevation-low);\n opacity: 0;\n transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;\n transform: translateX(-50%) translateY(-100%);\n}\n\n:host([contentalign=\"left\"]) .tooltip {\n text-align: left;\n}\n\n.tooltip.tooltip-text-left::after {\n text-align: left;\n}\n\n.tooltip-open {\n visibility: visible;\n opacity: 1;\n}\n\n\n/* POSITION\n -------------------- */\n\n/**\n * Top\n */\n\n:host([data-tooltip-position=\"top\"]) .tooltip {\n left: 50%;\n transform: translateX(-50%) translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top\"]) .tooltip-open {\n left: 50%;\n transform: translateX(-50%) translateY(-100%);\n}\n\n/**\n * Top Left\n */\n\n:host([data-tooltip-position=\"top-left\"]) .tooltip {\n left: 0%;\n transform: translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top-left\"]) .tooltip-open {\n transform: translateY(-100%);\n}\n\n/**\n * Top Right\n */\n\n:host([data-tooltip-position=\"top-right\"]) .tooltip {\n left: 50%;\n transform: translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top-right\"]) .tooltip-open {\n left: 100%;\n transform: translateY(-100%);\n}\n\n/**\n * Left\n */\n\n:host([data-tooltip-position=\"left\"]) .tooltip {\n top: 50%;\n left: 0%;\n margin-right: 0.5rem;\n transform: translateX(-94%) translateY(-55%);\n}\n\n:host([data-tooltip-position=\"left\"]) .tooltip-open {\n transform: translateX(-103%) translateY(-55%);\n}\n\n/**\n * Bottom\n */\n\n:host([data-tooltip-position=\"bottom\"]) .tooltip {\n top: 100%;\n left: 50%;\n margin-top: 0.5rem;\n transform: translateX(-50%) translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom\"]) .tooltip-open {\n transform: translateX(-50%) translateY(-6%);\n}\n\n/**\n * Bottom Left\n */\n\n:host([data-tooltip-position=\"bottom-left\"]) .tooltip {\n top: 100%;\n left: 0;\n margin-top: 0.5rem;\n transform: translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom-left\"]) .tooltip-open {\n transform: translateY(-6%);\n}\n\n/**\n * Bottom Right\n */\n\n:host([data-tooltip-position=\"bottom-right\"]) .tooltip {\n top: 100%;\n left: 100%;\n margin-top: 0.5rem;\n transform: translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom-right\"]) .tooltip-open {\n transform: translateY(-6%);\n}\n\n/**\n * Right\n */\n\n:host([data-tooltip-position=\"right\"]) .tooltip {\n top: 50%;\n left: 100%;\n margin-left: 0.5rem;\n transform: translateX(-14%) translateY(-55%);\n}\n\n:host([data-tooltip-position=\"right\"]) .tooltip-open {\n transform: translateX(-4%) translateY(-55%);\n}\n","import { Component, Host, h, Prop, Method, Element } from '@stencil/core';\n\n/**\n * @slot tooltip-content - content of the tooltip, if you need to add html content, use this slot, otherwise use directly the content prop.\n *\n * @part tooltip - tooltip container\n */\n\n@Component({\n tag: 'road-tooltip',\n styleUrl: 'tooltip.css',\n shadow: true,\n})\nexport class Tooltip {\n\n @Element() el!: HTMLRoadTooltipElement;\n\n /**\n * The id of tooltip\n */\n @Prop() tooltipId: string = `road-tooltip-${++tooltipIds}`;\n\n /**\n * The tooltip's content.\n */\n @Prop() content = '';\n\n /**\n * The position of the tooltip.\n */\n @Prop() position:\n | 'top'\n | 'right'\n | 'bottom'\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right'\n | 'left' = 'top';\n\n /**\n * The content align of the tooltip.\n */\n @Prop() contentAlign:\n | 'center'\n | 'left' = 'center';\n\n /**\n * Indicates whether or not the tooltip is open. You can use this or the open/close methods.\n */\n @Prop({ mutable: true }) isOpen = false;\n\n /**\n * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`. Multiple\n * options can be passed by separating them with a space. When manual is used, the tooltip must be activated\n * programmatically.\n */\n @Prop() trigger: string = 'hover';\n\n /**\n * Open the tooltip.\n */\n @Method()\n async open() {\n this.isOpen = true;\n }\n\n /**\n * Close the tooltip.\n */\n @Method()\n async close() {\n this.isOpen = false;\n }\n\n private onClick = () => {\n if (this.hasTrigger('click')) {\n this.isOpen ? this.close() : this.open();\n }\n };\n\n private onMouseOver = () => {\n if (this.hasTrigger('hover')) {\n this.open();\n }\n };\n\n private onMouseOut = () => {\n if (this.hasTrigger('hover')) {\n this.close();\n }\n };\n\nprivate isKeyboardNavigation = false;\n\n// Écoute les événements pour détecter le mode d'interaction\ncomponentDidMount() {\n document.addEventListener('keydown', this.handleKeyDown);\n document.addEventListener('mousedown', this.handleMouseDown);\n}\n\ncomponentDidLoad() {\n document.addEventListener('keydown', this.handleKeyDown);\n document.addEventListener('mousedown', this.handleMouseDown);\n}\n\ncomponentWillUnmount() {\n document.removeEventListener('keydown', this.handleKeyDown);\n document.removeEventListener('mousedown', this.handleMouseDown);\n}\n\n\nprivate handleKeyDown = () => {\n this.isKeyboardNavigation = true;\n};\n\nprivate handleMouseDown = () => {\n this.isKeyboardNavigation = false;\n};\n\nprivate onFocus = () => {\n if (this.isKeyboardNavigation && this.hasTrigger('hover')) {\n this.open();\n }\n};\n\n\n private onBlur = () => {\n if (this.isKeyboardNavigation && this.hasTrigger('hover')) {\n this.close();\n }\n };\n\n private hasTrigger(triggerType: string) {\n const triggers = this.trigger.split(' ');\n return triggers.includes(triggerType);\n }\n\n render() {\n return (\n <Host\n onMouseOver={this.onMouseOver}\n onMouseOut={this.onMouseOut}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n tabindex=\"0\" // Makes the element focusable\n data-tooltip-position={this.position}\n >\n <slot aria-describedby={this.tooltipId} />\n\n <div\n part=\"tooltip\"\n id={this.tooltipId}\n class={{\n tooltip: true,\n 'tooltip-open': this.isOpen,\n }}\n role=\"tooltip\"\n aria-hidden={!this.isOpen ? 'true' : 'false'}\n >\n {this.content}\n <slot name=\"tooltip-content\" />\n </div>\n </Host>\n );\n }\n}\n\nlet tooltipIds = 0;\n"],"version":3}
|
|
1
|
+
{"file":"road-tooltip.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,UAAU,GAAG,25FAA25F,CAAC;AAC/6F,0BAAe,UAAU;;MCYZ,OAAO;IALpB;;;;;QAYU,cAAS,GAAW,gBAAgB,EAAE,UAAU,EAAE,CAAC;;;;QAKnD,YAAO,GAAG,EAAE,CAAC;;;;QAKb,aAAQ,GAYH,KAAK,CAAC;;;;QAKX,iBAAY,GAEP,QAAQ,CAAC;;;;QAKG,WAAM,GAAG,KAAK,CAAC;;;;;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names":["h","Host"],"sources":["src/components/tooltip/tooltip.css?tag=road-tooltip&encapsulation=shadow","src/components/tooltip/tooltip.tsx"],"sourcesContent":["/*\n * Tooltip\n *\n * Index\n * - Tooltip\n * - Position\n */\n\n/**\n * @prop --max-width: The maximum width of the tooltip.\n * @prop --z-index: The z-index of the tooltip.\n * @prop --width: width of the tooltip.\n */\n\n/* TOOLTIP\n -------------------- */\n\n:host {\n --max-width: 85vw;\n --z-index: 1;\n --width: max-content;\n\n position: relative;\n display: inline-block;\n}\n\n:host(:hover) {\n cursor: pointer;\n}\n\n\n:host([trigger=\"hover\"]) .tooltip {\n transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;\n}\n\n.tooltip {\n position: absolute;\n top: -0.5rem;\n left: 50%;\n z-index: 1;\n width: var(--width);\n min-width: 100%;\n max-width: var(--max-width);\n padding: 0.5rem;\n font-family: var(--road-font);\n font-size: var(--road-body-small);\n color: var(--road-on-surface);\n text-align: center;\n pointer-events: none;\n visibility: hidden;\n background: var(--road-surface);\n border: 1px solid var(--road-outline-weak);\n border-radius: 0.25rem;\n box-shadow: var(--road-elevation-low);\n opacity: 0;\n transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;\n transform: translateX(-50%) translateY(-100%);\n}\n\n:host([contentalign=\"left\"]) .tooltip {\n text-align: left;\n}\n\n.tooltip.tooltip-text-left::after {\n text-align: left;\n}\n\n.tooltip-open {\n visibility: visible;\n opacity: 1;\n}\n\n\n/* POSITION\n -------------------- */\n\n/**\n * Top\n */\n\n:host([data-tooltip-position=\"top\"]) .tooltip {\n left: 50%;\n transform: translateX(-50%) translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top\"]) .tooltip-open {\n left: 50%;\n transform: translateX(-50%) translateY(-100%);\n}\n\n/**\n * Top Left\n */\n\n:host([data-tooltip-position=\"top-left\"]) .tooltip {\n left: 0%;\n transform: translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top-left\"]) .tooltip-open {\n transform: translateY(-100%);\n}\n\n/**\n * Top Right\n */\n\n:host([data-tooltip-position=\"top-right\"]) .tooltip {\n left: 50%;\n transform: translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top-right\"]) .tooltip-open {\n left: 100%;\n transform: translateY(-100%);\n}\n\n/**\n * Top end\n */\n\n :host([data-tooltip-position=\"top-end\"]) .tooltip {\n left: auto;\n right: 0%;\n transform: translateY(-70%);\n}\n\n:host([data-tooltip-position=\"top-end\"]) .tooltip-open {\n transform: translateY(-100%);\n}\n\n/**\n * Left\n */\n\n:host([data-tooltip-position=\"left\"]) .tooltip {\n top: 50%;\n left: 0%;\n margin-right: 0.5rem;\n transform: translateX(-94%) translateY(-55%);\n}\n\n:host([data-tooltip-position=\"left\"]) .tooltip-open {\n transform: translateX(-103%) translateY(-55%);\n}\n\n/**\n * Bottom\n */\n\n:host([data-tooltip-position=\"bottom\"]) .tooltip {\n top: 100%;\n left: 50%;\n margin-top: 0.5rem;\n transform: translateX(-50%) translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom\"]) .tooltip-open {\n transform: translateX(-50%) translateY(-6%);\n}\n\n/**\n * Bottom Left\n */\n\n:host([data-tooltip-position=\"bottom-left\"]) .tooltip {\n top: 100%;\n left: 0;\n margin-top: 0.5rem;\n transform: translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom-left\"]) .tooltip-open {\n transform: translateY(-6%);\n}\n\n/**\n * Bottom Right\n */\n\n:host([data-tooltip-position=\"bottom-right\"]) .tooltip {\n top: 100%;\n left: 100%;\n margin-top: 0.5rem;\n transform: translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom-right\"]) .tooltip-open {\n transform: translateY(-6%);\n}\n\n\n/**\n * Bottom end\n */\n\n :host([data-tooltip-position=\"bottom-end\"]) .tooltip {\n margin-top: 0.5rem;\n left: auto;\n top: 100%;\n right: 0;\n transform: translateY(-40%);\n}\n\n:host([data-tooltip-position=\"bottom-end\"]) .tooltip-open {\n transform: translateY(-6%);\n}\n\n/**\n * Right\n */\n\n:host([data-tooltip-position=\"right\"]) .tooltip {\n top: 50%;\n left: 100%;\n margin-left: 0.5rem;\n transform: translateX(-14%) translateY(-55%);\n}\n\n:host([data-tooltip-position=\"right\"]) .tooltip-open {\n transform: translateX(-4%) translateY(-55%);\n}\n","import { Component, Host, h, Prop, Method, Element } from '@stencil/core';\n\n/**\n * @slot tooltip-content - content of the tooltip, if you need to add html content, use this slot, otherwise use directly the content prop.\n *\n * @part tooltip - tooltip container\n */\n\n@Component({\n tag: 'road-tooltip',\n styleUrl: 'tooltip.css',\n shadow: true,\n})\nexport class Tooltip {\n\n @Element() el!: HTMLRoadTooltipElement;\n\n /**\n * The id of tooltip\n */\n @Prop() tooltipId: string = `road-tooltip-${++tooltipIds}`;\n\n /**\n * The tooltip's content.\n */\n @Prop() content = '';\n\n /**\n * The position of the tooltip.\n */\n @Prop() position:\n | 'top'\n | 'right'\n | 'bottom'\n | 'top-left'\n | 'top-right'\n | 'top-start'\n | 'top-end'\n | 'bottom-left'\n | 'bottom-right'\n | 'bottom-start'\n | 'bottom-end'\n | 'left' = 'top';\n\n /**\n * The content align of the tooltip.\n */\n @Prop() contentAlign:\n | 'center'\n | 'left' = 'center';\n\n /**\n * Indicates whether or not the tooltip is open. You can use this or the open/close methods.\n */\n @Prop({ mutable: true }) isOpen = false;\n\n /**\n * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`. Multiple\n * options can be passed by separating them with a space. When manual is used, the tooltip must be activated\n * programmatically.\n */\n @Prop() trigger: string = 'hover';\n\n /**\n * Open the tooltip.\n */\n @Method()\n async open() {\n this.isOpen = true;\n }\n\n /**\n * Close the tooltip.\n */\n @Method()\n async close() {\n this.isOpen = false;\n }\n\n private onClick = () => {\n if (this.hasTrigger('click')) {\n this.isOpen ? this.close() : this.open();\n }\n };\n\n private onMouseOver = () => {\n if (this.hasTrigger('hover')) {\n this.open();\n }\n };\n\n private onMouseOut = () => {\n if (this.hasTrigger('hover')) {\n this.close();\n }\n };\n\nprivate isKeyboardNavigation = false;\n\n// Écoute les événements pour détecter le mode d'interaction\ncomponentDidMount() {\n document.addEventListener('keydown', this.handleKeyDown);\n document.addEventListener('mousedown', this.handleMouseDown);\n}\n\ncomponentDidLoad() {\n document.addEventListener('keydown', this.handleKeyDown);\n document.addEventListener('mousedown', this.handleMouseDown);\n}\n\ncomponentWillUnmount() {\n document.removeEventListener('keydown', this.handleKeyDown);\n document.removeEventListener('mousedown', this.handleMouseDown);\n}\n\n\nprivate handleKeyDown = () => {\n this.isKeyboardNavigation = true;\n};\n\nprivate handleMouseDown = () => {\n this.isKeyboardNavigation = false;\n};\n\nprivate onFocus = () => {\n if (this.isKeyboardNavigation && this.hasTrigger('hover')) {\n this.open();\n }\n};\n\n\n private onBlur = () => {\n if (this.isKeyboardNavigation && this.hasTrigger('hover')) {\n this.close();\n }\n };\n\n private hasTrigger(triggerType: string) {\n const triggers = this.trigger.split(' ');\n return triggers.includes(triggerType);\n }\n\n render() {\n return (\n <Host\n onMouseOver={this.onMouseOver}\n onMouseOut={this.onMouseOut}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n tabindex=\"0\" // Makes the element focusable\n data-tooltip-position={this.position}\n >\n <slot aria-describedby={this.tooltipId} />\n\n <div\n part=\"tooltip\"\n id={this.tooltipId}\n class={{\n tooltip: true,\n 'tooltip-open': this.isOpen,\n }}\n role=\"tooltip\"\n aria-hidden={!this.isOpen ? 'true' : 'false'}\n >\n {this.content}\n <slot name=\"tooltip-content\" />\n </div>\n </Host>\n );\n }\n}\n\nlet tooltipIds = 0;\n"],"version":3}
|
|
@@ -204,7 +204,11 @@ export class Input {
|
|
|
204
204
|
const hasValueClass = this.value !== '' && this.value !== null ? 'has-value' : '';
|
|
205
205
|
const lessLabelClass = this.label !== '' ? '' : 'less-label';
|
|
206
206
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
207
|
-
return (h(Host, { key: '
|
|
207
|
+
return (h(Host, { key: '1dc5be8cca2464709ea4661a875c35feaec6d7b3', "aria-disabled": this.disabled ? 'true' : null, class: this.sizes && `input-${this.sizes}`, value: value, blockdecimal: this.blockdecimal }, h("input", { key: '57575b6d01b4bf45703e76e0ac4b7e75aa7177ae', 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: '90ab2cc491c203f18e37654e361a03bf31f6e908', class: "form-label", id: labelId, htmlFor: this.inputId }, this.label), this.error && this.error !== '' && (Array.isArray(this.error)
|
|
208
|
+
? // Si error est un tableau, on itère et génère un <p> pour chaque élément
|
|
209
|
+
this.error.map((err, index) => (h("p", { key: index, class: "invalid-feedback" }, h("road-icon", { slot: "start", name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), err.trim(), " ")))
|
|
210
|
+
: // Si error est une chaîne, on la divise avec split et génère un <p> pour chaque élément
|
|
211
|
+
this.error.split(',').map((err, index) => (h("p", { key: index, class: "invalid-feedback" }, h("road-icon", { slot: "start", name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), err.trim(), " ")))), this.helper && this.helper !== '' && h("p", { key: 'ac10569a3eacf0e85142238d18139bb4b95c24e3', class: "helper" }, this.helper), this.type && this.type == 'password' && h("slot", { key: '17e2a2ea624850955a29167e0475cff88960cc49', name: "checklistPassword" })));
|
|
208
212
|
}
|
|
209
213
|
static get is() { return "road-input"; }
|
|
210
214
|
static get encapsulation() { return "scoped"; }
|
|
@@ -726,15 +730,15 @@ export class Input {
|
|
|
726
730
|
"type": "string",
|
|
727
731
|
"mutable": false,
|
|
728
732
|
"complexType": {
|
|
729
|
-
"original": "string",
|
|
730
|
-
"resolved": "string | undefined",
|
|
733
|
+
"original": "string | string[]",
|
|
734
|
+
"resolved": "string | string[] | undefined",
|
|
731
735
|
"references": {}
|
|
732
736
|
},
|
|
733
737
|
"required": false,
|
|
734
738
|
"optional": true,
|
|
735
739
|
"docs": {
|
|
736
740
|
"tags": [],
|
|
737
|
-
"text": "Error message for the field"
|
|
741
|
+
"text": "Error message for the field, for multiple error messages separate by ','"
|
|
738
742
|
},
|
|
739
743
|
"getter": false,
|
|
740
744
|
"setter": false,
|
|
@@ -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,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;;WAE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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(newValue: string | number | null, oldValue: string | number | null) {\n if (newValue !== oldValue) {\n this.debouncedRoadChange(newValue);\n }\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' && this.value !== value) {\n this.value = value; // Déclenche @Watch('value')\n }\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\n\n \n if (this.type === 'number') {\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 input.value = newValue; // Force l'affichage de la valeur max\n ev.preventDefault(); // Empêche la saisie supplémentaire\n }\n this.value = newValue;\n }\n \n // Vérification si la valeur a réellement changé avant de la mettre à jour\n if (this.value !== newValue) {\n this.value = newValue;\n this.roadInput.emit(ev as KeyboardEvent);\n }\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 \n \n if (this.type === 'number') {\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 this.value = value;\n const input = document.getElementById(this.inputId) as HTMLInputElement;\n input.value = value;\n }\n \n // Vérification si la valeur a changé avant mise à jour\n if (this.value !== value) {\n this.value = value;\n this.roadBlur.emit(value);\n this.roadChange.emit({ value });\n }else{\n this.roadBlur.emit(value);\n }\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"]}
|
|
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;;W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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, for multiple error messages separate by ','\n */\n @Prop() error?: string | 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(newValue: string | number | null, oldValue: string | number | null) {\n if (newValue !== oldValue) {\n this.debouncedRoadChange(newValue);\n }\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' && this.value !== value) {\n this.value = value; // Déclenche @Watch('value')\n }\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\n\n \n if (this.type === 'number') {\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 input.value = newValue; // Force l'affichage de la valeur max\n ev.preventDefault(); // Empêche la saisie supplémentaire\n }\n this.value = newValue;\n }\n \n // Vérification si la valeur a réellement changé avant de la mettre à jour\n if (this.value !== newValue) {\n this.value = newValue;\n this.roadInput.emit(ev as KeyboardEvent);\n }\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 \n \n if (this.type === 'number') {\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 this.value = value;\n const input = document.getElementById(this.inputId) as HTMLInputElement;\n input.value = value;\n }\n \n // Vérification si la valeur a changé avant mise à jour\n if (this.value !== value) {\n this.value = value;\n this.roadBlur.emit(value);\n this.roadChange.emit({ value });\n }else{\n this.roadBlur.emit(value);\n }\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 !== '' && (\n Array.isArray(this.error) \n ? // Si error est un tableau, on itère et génère un <p> pour chaque élément\n this.error.map((err, index) => (\n <p key={index} class=\"invalid-feedback\">\n <road-icon slot=\"start\" name=\"alert-error-solid\" aria-hidden=\"true\" size=\"sm\"></road-icon>\n {err.trim()} {/* Enlever les espaces superflus */}\n </p>\n ))\n : // Si error est une chaîne, on la divise avec split et génère un <p> pour chaque élément\n this.error.split(',').map((err, index) => (\n <p key={index} class=\"invalid-feedback\">\n <road-icon slot=\"start\" name=\"alert-error-solid\" aria-hidden=\"true\" size=\"sm\"></road-icon>\n {err.trim()} {/* Enlever les espaces superflus */}\n </p>\n ))\n )}\n\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"]}
|
|
@@ -36,7 +36,7 @@ export default {
|
|
|
36
36
|
control: 'boolean',
|
|
37
37
|
},
|
|
38
38
|
error: {
|
|
39
|
-
description: "Error message for the field",
|
|
39
|
+
description: "Error message for the field, for multiple error messages separate by ','",
|
|
40
40
|
control: 'text',
|
|
41
41
|
},
|
|
42
42
|
helper: {
|
|
@@ -151,25 +151,35 @@ export default {
|
|
|
151
151
|
control: 'text',
|
|
152
152
|
},
|
|
153
153
|
roadblur: {
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
action: 'roadblur',
|
|
155
|
+
description: 'Emitted when the input loses focus.',
|
|
156
|
+
table: {
|
|
157
|
+
category: 'Events',
|
|
158
|
+
type: { summary: 'CustomEvent' },
|
|
156
159
|
},
|
|
157
160
|
},
|
|
158
161
|
roadfocus: {
|
|
159
|
-
|
|
160
|
-
|
|
162
|
+
action: 'roadfocus',
|
|
163
|
+
description: 'Emitted when the input loses focus.',
|
|
164
|
+
table: {
|
|
165
|
+
category: 'Events',
|
|
166
|
+
type: { summary: 'CustomEvent' },
|
|
161
167
|
},
|
|
162
168
|
},
|
|
163
169
|
roadchange: {
|
|
164
170
|
action: 'roadchange',
|
|
165
|
-
|
|
166
|
-
|
|
171
|
+
description: 'Emitted when the value has changed.',
|
|
172
|
+
table: {
|
|
173
|
+
category: 'Events',
|
|
174
|
+
type: { summary: 'CustomEvent' },
|
|
167
175
|
},
|
|
168
176
|
},
|
|
169
177
|
roadinput: {
|
|
170
178
|
action: 'roadinput',
|
|
171
|
-
|
|
172
|
-
|
|
179
|
+
description: "Emitted when a keyboard input occurred.",
|
|
180
|
+
table: {
|
|
181
|
+
category: 'Events',
|
|
182
|
+
type: { summary: 'CustomEvent' },
|
|
173
183
|
},
|
|
174
184
|
},
|
|
175
185
|
'--height': {
|
|
@@ -293,6 +303,12 @@ Error.args = {
|
|
|
293
303
|
error: 'This field is required',
|
|
294
304
|
};
|
|
295
305
|
|
|
306
|
+
export const MultipleErrors = Template.bind({});
|
|
307
|
+
MultipleErrors.args = {
|
|
308
|
+
error: ['Champ requis', 'Doit contenir au moins 8 caractères'],
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
|
|
296
312
|
export const Helper = Template.bind({});
|
|
297
313
|
Helper.args = {
|
|
298
314
|
helper: 'This field is required',
|
|
@@ -58,7 +58,7 @@ export class InputGroup {
|
|
|
58
58
|
? `size-${this.el.querySelector('road-input').sizes}`
|
|
59
59
|
: '';
|
|
60
60
|
const disabledClass = this.disabled ? 'is-disabled' : '';
|
|
61
|
-
return (h("div", { key: '
|
|
61
|
+
return (h("div", { key: '54938b0939fc88368a47099bd3263a4eaaa273fc', class: `input-group ${errorClass} ${disabledClass} ${sizeClass}` }, h("div", { key: '3039896e2e22c633d4b298899488b16dc2d34018', class: "input-group-prepend" }, h("slot", { key: 'ad675a53558b83d6dd5b0ae044db538245da0316', name: "prepend" })), h("slot", { key: '1283ee327bbe9755e107a80cf700293c685429bf' }), h("div", { key: '677da10746507b1171498461da76d7e8e7d6056a', class: "input-group-append" }, h("slot", { key: '2bbf8d38a2343e362ee20bc8c3d54f88fd992eed', name: "append" }))));
|
|
62
62
|
}
|
|
63
63
|
static get is() { return "road-input-group"; }
|
|
64
64
|
static get encapsulation() { return "shadow"; }
|
|
@@ -57,13 +57,13 @@ export class Item {
|
|
|
57
57
|
target,
|
|
58
58
|
};
|
|
59
59
|
const showDetail = detail !== undefined && detail;
|
|
60
|
-
return (h(Host, { key: '
|
|
60
|
+
return (h(Host, { key: '9b71788b470f7fc686c9953868c59515607d5b01', "aria-disabled": disabled ? 'true' : null, class: {
|
|
61
61
|
[`item-lines-${lines}`]: lines !== undefined,
|
|
62
|
-
} }, h(TagType, Object.assign({ key: '
|
|
62
|
+
} }, h(TagType, Object.assign({ key: 'd05ff0c98f1a0713e935954b995e0f6476069414' }, attrs, { class: {
|
|
63
63
|
'item-native': true,
|
|
64
64
|
'item-active': this.active,
|
|
65
65
|
[`layout-${layout}`]: layout !== undefined,
|
|
66
|
-
}, part: "native", disabled: disabled }), h("slot", { key: '
|
|
66
|
+
}, part: "native", disabled: disabled }), h("slot", { key: '4287ffe1ac1fc6471bef8cc1c060637bd6889ef4', name: "start" }), h("div", { key: '70dff3ab1b88fc4e51e83280504c85cfdbef6e75', class: "item-inner" }, h("div", { key: '872a6387bceac2c8ef76d8ebd5ecc47cb6f93aa7', class: "input-wrapper" }, h("slot", { key: 'c0e117161a86fb92ed121ab1fdc71de76a9d1aae' }), h("div", { key: '23f4c082e69b0584cecadaf62c3cda21073068d6', class: "input-wrapper-info" }, h("road-label", { key: '7af0a0698d00c0681181038163b8f5c15ef82e9a', class: "input-wrapper-info-title" }, this.titleItem), h("p", { key: '87653ef8324a8e8b82270d697e657e242e9494be', class: "input-wrapper-info-text" }, this.text))), h("slot", { key: '4d58e9d7d5f808b3a7f6bc2dee4912015070a495', name: "end" }), showDetail && h("road-icon", { key: '6422e581f75db848cc4e788d7fd9f48709bd7588', icon: detailIcon, lazy: false, class: "item-detail-icon" })))));
|
|
67
67
|
}
|
|
68
68
|
static get is() { return "road-item"; }
|
|
69
69
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,7 +4,7 @@ import { h } from "@stencil/core";
|
|
|
4
4
|
*/
|
|
5
5
|
export class Label {
|
|
6
6
|
render() {
|
|
7
|
-
return (h("slot", { key: '
|
|
7
|
+
return (h("slot", { key: 'e6b8246e6673eeaa1d33517a58de2df43091c4dc' }));
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "road-label"; }
|
|
10
10
|
static get encapsulation() { return "shadow"; }
|
|
@@ -5,9 +5,9 @@ import { Host, h } from "@stencil/core";
|
|
|
5
5
|
export class List {
|
|
6
6
|
render() {
|
|
7
7
|
const { lines } = this;
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: 'a830b17499a394ad9bccaaed0aa2056ae538929b', class: {
|
|
9
9
|
[`list-lines-${lines}`]: lines !== undefined,
|
|
10
|
-
} }, h("slot", { key: '
|
|
10
|
+
} }, h("slot", { key: '1010f8f4a4376db24412ea8e5f407f3951ac8333' })));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "road-list"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -65,7 +65,7 @@ export class Modal {
|
|
|
65
65
|
const modalIsOpenClass = this.isOpen ? 'modal-open' : '';
|
|
66
66
|
const inverseHeaderClass = this.hasInverseHeader ? 'modal-header-inverse' : '';
|
|
67
67
|
const closeIconElement = this.hasCloseIcon ? h("button", { type: "button", class: "modal-close", onClick: this.onClick, "aria-label": "Close" }, h("road-icon", { icon: navigationClose, "aria-hidden": "true" })) : '';
|
|
68
|
-
return (h(Host, { key: '
|
|
68
|
+
return (h(Host, { key: 'dea7d12a7d711034e4bfbb57bd5ab17d0d2d0c64', class: `modal ${modalIsOpenClass}`, tabindex: "-1", role: "dialog", "aria-label": "modal" }, h("div", { key: 'e3be54a36318d4a7942ac56477dccbc089b62d95', class: "modal-overlay", onClick: this.onClick, tabindex: "-1" }), h("div", { key: '34576fcfbe6ca5da7cb655969ac011d627c4a450', class: "modal-dialog", style: { maxWidth: `${this.maxWidth}px` }, role: "document", tabindex: "0" }, h("div", { key: '997ebcf1495edc6427595303fc87f77b31fa69c8', class: "modal-content" }, h("header", { key: '0724f16b5f0deeeada144df5e0f5df9e61f1e94f', class: `modal-header ${inverseHeaderClass}` }, h("h2", { key: '4ca7c0df3c5f39fcb4d0c18ef0d286d8131c75d2', class: "modal-title" }, this.modalTitle), closeIconElement), h("div", { key: '86a30cd070f946728373100e30e86914c9952699', class: "modal-body" }, h("slot", { key: '2a80c579ec2784e0baee03e0d65d55ff626e541a' }))))));
|
|
69
69
|
}
|
|
70
70
|
static get is() { return "road-modal"; }
|
|
71
71
|
static get encapsulation() { return "shadow"; }
|
|
@@ -44,9 +44,10 @@ export default {
|
|
|
44
44
|
control: 'text',
|
|
45
45
|
},
|
|
46
46
|
close: {
|
|
47
|
-
description:
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
description: 'Indicate when closing the modal',
|
|
48
|
+
table: {
|
|
49
|
+
category: 'Events',
|
|
50
|
+
type: { summary: 'CustomEvent' },
|
|
50
51
|
},
|
|
51
52
|
},
|
|
52
53
|
'--z-index': {
|
|
@@ -21,7 +21,7 @@ export class Navbar {
|
|
|
21
21
|
this.selectedTabChanged();
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: '188151d4f107e38799301e254fef5cb36b77f427', role: "menubar" }, h("slot", { key: '7ed62f55bd9828c04a28f4090b6563dbc7cbd741' })));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "road-navbar"; }
|
|
27
27
|
static get encapsulation() { return "shadow"; }
|
|
@@ -61,11 +61,11 @@ export class NavbarItem {
|
|
|
61
61
|
rel,
|
|
62
62
|
target,
|
|
63
63
|
};
|
|
64
|
-
return (h(Host, { key: '
|
|
64
|
+
return (h(Host, { key: 'acbf239caf20ec5fdad46f4af576243eab63c2f9', onClick: this.onClick, onKeyup: this.onKeyUp, role: "menuitem", tabindex: "0", "aria-selected": selected ? 'true' : null, id: tab !== undefined ? `navbar-item-${tab}` : null, disabled: disabled, class: {
|
|
65
65
|
'navbar-item': true,
|
|
66
66
|
'tab-selected': selected,
|
|
67
67
|
'tab-disabled': disabled,
|
|
68
|
-
} }, h("a", Object.assign({ key: '
|
|
68
|
+
} }, h("a", Object.assign({ key: 'ba6ba2a86abdc210604b52e77ab44362ddeda18d' }, attrs, { tabIndex: -1, class: "button-native", part: "native" }), h("span", { key: '189d158e062896460568593a287e52708eb13d4c', class: "button-inner" }, h("slot", { key: 'e690abfecff3881e688020a4f8c173c73674b050' })))));
|
|
69
69
|
}
|
|
70
70
|
static get is() { return "road-navbar-item"; }
|
|
71
71
|
static get encapsulation() { return "shadow"; }
|
|
@@ -61,11 +61,11 @@ export class NavbarItem {
|
|
|
61
61
|
rel,
|
|
62
62
|
target,
|
|
63
63
|
};
|
|
64
|
-
return (h(Host, { key: '
|
|
64
|
+
return (h(Host, { key: 'd3962edd95606e908423aef6bcac10e9900f5cac', onClick: this.onClick, onKeyup: this.onKeyUp, role: "menuitem", tabindex: "0", "aria-selected": selected ? 'true' : null, id: tab !== undefined ? `navbar-item-${tab}` : null, disabled: disabled, class: {
|
|
65
65
|
'navbar-item': true,
|
|
66
66
|
'tab-selected': selected,
|
|
67
67
|
'tab-disabled': disabled,
|
|
68
|
-
} }, h("a", Object.assign({ key: '
|
|
68
|
+
} }, h("a", Object.assign({ key: '2f2f9d568a06d666ddcded0a3bbf18b9145dc6ec' }, attrs, { tabIndex: -1, class: "button-native", part: "native" }), h("span", { key: '49e8a3698a19ed7b591531bda1baa3ddc0c0925f', class: "button-inner" }, h("slot", { key: '3b9a1513ead6236942ad77fb19b099f26332b31c' })))));
|
|
69
69
|
}
|
|
70
70
|
static get is() { return "road-navbar-item-v2"; }
|
|
71
71
|
static get encapsulation() { return "shadow"; }
|
|
@@ -28,7 +28,7 @@ export class NavbarV2 {
|
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
30
|
const compactClass = this.compact ? 'compact' : '';
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: '666a88c32c86b9e81a4f7fa244385f43ae44d72f', role: "menubar", class: `${compactClass}` }, h("slot", { key: '2b65539c449d50ca60a93e96ff65b0ea28fca173' })));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "road-navbar-v2"; }
|
|
34
34
|
static get encapsulation() { return "shadow"; }
|
|
@@ -151,9 +151,9 @@ export class RoadPhoneNumberInput {
|
|
|
151
151
|
const isErrorClass = this.errorMessage.length ? 'is-error' : '';
|
|
152
152
|
const hasValueClass = this.hasValue() ? 'has-value' : '';
|
|
153
153
|
const sizes = 'xl';
|
|
154
|
-
return (h(Host, { key: '
|
|
154
|
+
return (h(Host, { key: 'cecbc63d32eea08a7a110f9990df28aceb53c2a8' }, h("div", { key: 'b2cbe43100fe14b762af1910139e3d746e983c7c', class: 'phone-number-inputs-container' }, h("div", { key: '067b2ebb88dc0f3d98318d522dbf05c56adad91c', class: `road-phone-input-select ${isErrorClass} ${isInvalidClass}`, slot: "prepend" }, h("select", { key: 'd654ca41d2f8a859c2a8ba40bc65f7ff57fa2b70', id: selectId, class: `form-select-area has-value`, "aria-disabled": this.disabled ? 'true' : null, disabled: this.disabled, onChange: (event) => this.handleSelect(event), "aria-label": this.codeLabel, tabIndex: this.disabled ? -1 : 0 }, this.countryOptions && this.countryOptions.map(option => (h("option", { value: option.value, disabled: option.disabled, selected: option.selected }, option.label)))), h("label", { key: 'fac2d9990c24757cc975f750a3eec44f173dfeca', class: "form-select-area-label", id: labelId, htmlFor: selectId }, this.codeLabel), h("label", { key: 'b7449465cdf82627c8737b09c73bbf8c46104e41', class: "form-select-area-value", id: valueId, htmlFor: selectId }, "+", this.selectedCountryCode)), h("input", { key: 'ea5d0a4808ab0117c3f9b163e5c9e2f2751a3908', type: 'tel', id: inputId, class: `input-${sizes} phone-number-input-field ${hasValueClass} ${isErrorClass}`, value: this.phoneValue, required: this.required, tabIndex: 0, onInput: (event) => this.handleInput(event) }), h("label", { key: '5c0628f00c771e0b36a2d0d662634ed9a0924a62', class: "phone-number-input-label", id: labelId, htmlFor: inputId }, this.phoneLabel)), this.errorMessage
|
|
155
155
|
&& this.errorMessage !== ''
|
|
156
|
-
&& h("p", { key: '
|
|
156
|
+
&& h("p", { key: '70d8e2b0acc90afbd08607fbdd420e6c2b0ed25d', class: "invalid-feedback" }, h("road-icon", { key: '490e8baafe7b9ef670f11227043e6552287131ec', slot: "start", color: 'danger', name: "alert-error-solid", "aria-hidden": "true", size: "sm" }), this.errorMessage)));
|
|
157
157
|
}
|
|
158
158
|
static get is() { return "road-phone-number-input"; }
|
|
159
159
|
static get encapsulation() { return "scoped"; }
|
|
@@ -92,10 +92,10 @@ export class PlateNumber {
|
|
|
92
92
|
render() {
|
|
93
93
|
const value = this.getValue();
|
|
94
94
|
const motorbikeClass = this.motorbike ? 'motorbike-plate' : '';
|
|
95
|
-
return (h("road-input-group", { key: '
|
|
95
|
+
return (h("road-input-group", { key: '28c30b625e2af365c0249677e44c7d0429763631', class: `plate-number plate-number-${this.country.toLowerCase()} ${motorbikeClass}` }, h("label", { key: '70107849b6839becadfb8b5ef92a6111295bdb08', slot: "prepend", class: "input-group-prepend" }, h("div", { key: '31ee9cd44c6fa9e0df1b610f342e4c7409ec10a0', class: "plate-number-start" }, h("road-icon", { key: '0b9a9f14ebbae17cba9cd3dd2541ec0ea80c9108', class: "plate-number-icon", icon: licensePlateStarEu }), h("div", { key: '6ee7f8b160a21b6c9ae549f1979598f5bc3d5eb1', class: "plate-number-location", "aria-label": this.country, role: "img" }, this.countries
|
|
96
96
|
.filter(item => item.country === this.country)[0].letter))), this.motorbike
|
|
97
97
|
? (h("textarea", { class: "form-control plate-number-input mb-0", disabled: this.disabled, placeholder: this.placeholder != null ? this.placeholder : this.countries.filter(item => item.country === this.country)[0].placeholder, readOnly: this.readonly, maxlength: "9", rows: 2, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus }))
|
|
98
|
-
: (h("input", { class: "plate-number-input mb-0", disabled: this.disabled, placeholder: this.placeholder != null ? this.placeholder : this.countries.filter(item => item.country === this.country)[0].placeholder, readOnly: this.readonly, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus })), h("label", { key: '
|
|
98
|
+
: (h("input", { class: "plate-number-input mb-0", disabled: this.disabled, placeholder: this.placeholder != null ? this.placeholder : this.countries.filter(item => item.country === this.country)[0].placeholder, readOnly: this.readonly, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus })), h("label", { key: '30b0898365b95e47c58b1ce349a224574f9b6939', slot: "append", class: "input-group-append" }, h("div", { key: '022809f30f9dea2d7e2e5d18067f3c8cb5c7a72d', class: "plate-number-end" }))));
|
|
99
99
|
}
|
|
100
100
|
static get is() { return "road-plate-number"; }
|
|
101
101
|
static get encapsulation() { return "scoped"; }
|
|
@@ -41,29 +41,35 @@ export default {
|
|
|
41
41
|
control: 'text',
|
|
42
42
|
},
|
|
43
43
|
roadblur: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
action: 'roadblur',
|
|
45
|
+
description: 'Emitted when the input loses focus.',
|
|
46
|
+
table: {
|
|
47
|
+
category: 'Events',
|
|
48
|
+
type: { summary: 'CustomEvent' },
|
|
47
49
|
},
|
|
48
50
|
},
|
|
49
51
|
roadfocus: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
action: 'roadfocus',
|
|
53
|
+
description: 'Emitted when the input loses focus.',
|
|
54
|
+
table: {
|
|
55
|
+
category: 'Events',
|
|
56
|
+
type: { summary: 'CustomEvent' },
|
|
53
57
|
},
|
|
54
58
|
},
|
|
55
59
|
roadchange: {
|
|
56
|
-
description: "Emitted when the value has changed.",
|
|
57
60
|
action: 'roadchange',
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
description: 'Emitted when the value has changed.',
|
|
62
|
+
table: {
|
|
63
|
+
category: 'Events',
|
|
64
|
+
type: { summary: 'CustomEvent' },
|
|
60
65
|
},
|
|
61
66
|
},
|
|
62
67
|
roadinput: {
|
|
63
|
-
description: "Emitted when a keyboard input occurred.",
|
|
64
68
|
action: 'roadinput',
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
description: "Emitted when a keyboard input occurred.",
|
|
70
|
+
table: {
|
|
71
|
+
category: 'Events',
|
|
72
|
+
type: { summary: 'CustomEvent' },
|
|
67
73
|
},
|
|
68
74
|
},
|
|
69
75
|
},
|
|
@@ -31,7 +31,7 @@ export class Dropdown {
|
|
|
31
31
|
this.isOpen = false;
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (h("details", { key: '
|
|
34
|
+
return (h("details", { key: '43e4ae49c617fbacc94b8baa71e48f69fe476f1d', class: "dropdown", open: this.isOpen }, h("summary", { key: '4b710e357a714a422988b653ae2cb8573935ff35', "aria-expanded": `${this.isOpen}`, tabindex: "0", role: "button", onClick: this.onClick }, h("div", { key: '4f6e0a9bc88cfb776c1bb77e54db15b5083171b2', class: `d-flex` }, h("div", { key: '47c2820abb6c77ec3058b1b2b5fbf724350caabd' }, h("road-avatar", { key: '4cfa1004541f55168b831c6e8541c57c81df4630' }, h("slot", { key: 'b71ee875ef37c645b7bd365ac57d7198b171f1f6', name: "avatar" }))))), h("div", { key: '0722a1227a791a58fecd3f6e9e525656deb286d0', class: `dropdown-menu` }, h("div", { key: '06a40cb955460d18e5b81daa33d97e6fba62c558', class: "profil-item" }, h("road-avatar", { key: 'd7f3cbdb3c3556228f6751e16f48ea15989a40c1', size: "sm" }, h("slot", { key: '18e9fbed6f749746247bd5cb32be190fbc137441', name: "avatarItem" })), h("div", { key: '861ee72150789f798709bef31bc8cf2013b75e9e', class: "profil-item-info" }, h("span", { key: 'a51ab011c1dbb74eb0110ac5ef9bbce140060456', class: "profil-item-info-name" }, h("slot", { key: 'b96374ca1927d2af6428a773dfcf4b4c97656551', name: "name" })), h("road-label", { key: '5c58f0aa250f9cb66ff5a04e5517fc5693c8f189' }, h("slot", { key: 'aca0556fa9c641dffcafa231d72ada909c51adc8', name: "email" })))), h("slot", { key: '5482d7055522cd952392d1f437b261497747a452', name: "list" }))));
|
|
35
35
|
}
|
|
36
36
|
static get is() { return "road-profil-dropdown"; }
|
|
37
37
|
static get encapsulation() { return "shadow"; }
|
|
@@ -40,7 +40,7 @@ export class ProgressBar {
|
|
|
40
40
|
const fullwidth = this.fullwidth ? 'progress-element-info-full-width' : 'progress-element-info';
|
|
41
41
|
const light = this.light ? 'progress progress-light' : 'progress';
|
|
42
42
|
const animation = this.animation ? 'animation' : '';
|
|
43
|
-
return (h(Host, { key: '
|
|
43
|
+
return (h(Host, { key: '029ef77c8c30790505626a065e0382fd96de48f3', class: "progress-element" }, h("div", { key: '6abaec562d06e1550cc4a81708625a298b701a58', class: `${light} progress-${this.color} ${animation}` }, h("div", { key: '155e66309824c5cf5af2bab1b8c5984d7ad69e24', class: "progress-bar", role: "progressbar", style: { width: `${this.value}%` }, "aria-valuenow": this.value, "aria-valuemin": "0", "aria-valuemax": "100", "aria-label": "progress bar" })), h("div", { key: '6054fb408c776fb258c7889bab50b8d0c4cb158f', class: `${fullwidth}` }, h("span", { key: '90dc79f84351f7845dd17a8c2024d42f12ca6585', class: "progress-element-label" }, this.label), this.showstep && h("span", { key: 'd316a662a44d0c44250c26a1ae81d106f8914d43', class: "progress-element-step" }, valueRound, "/", this.numbersteps))));
|
|
44
44
|
}
|
|
45
45
|
static get is() { return "road-progress"; }
|
|
46
46
|
static get encapsulation() { return "shadow"; }
|