@riverty/web-components 6.3.0 → 6.3.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/CHANGELOG.md +6 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/focusable-Oll_rmtP.js +28 -0
- package/dist/cjs/formData-B2DZyLxP.js +44 -0
- package/dist/cjs/index-BnETQtSf.js +1834 -0
- package/dist/cjs/index.cjs.js +37 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/r-accordion-panel.cjs.entry.js +24 -0
- package/dist/cjs/r-accordion-section.cjs.entry.js +125 -0
- package/dist/cjs/r-accordion-trigger.cjs.entry.js +93 -0
- package/dist/cjs/r-accordion.cjs.entry.js +20 -0
- package/dist/cjs/r-alert.cjs.entry.js +146 -0
- package/dist/cjs/r-badge.cjs.entry.js +41 -0
- package/dist/cjs/r-button.cjs.entry.js +149 -0
- package/dist/cjs/r-checkbox-group.cjs.entry.js +237 -0
- package/dist/cjs/r-checkbox.cjs.entry.js +274 -0
- package/dist/cjs/r-design-system-devtools.cjs.entry.js +31 -0
- package/dist/cjs/r-dialog.cjs.entry.js +107 -0
- package/dist/cjs/r-hint_2.cjs.entry.js +50 -0
- package/dist/cjs/r-icon-button_2.cjs.entry.js +492 -0
- package/dist/cjs/r-icon.cjs.entry.js +284 -0
- package/dist/cjs/r-illustration.cjs.entry.js +396 -0
- package/dist/cjs/r-input-code.cjs.entry.js +437 -0
- package/dist/cjs/r-input-date.cjs.entry.js +524 -0
- package/dist/cjs/r-input-password.cjs.entry.js +270 -0
- package/dist/cjs/r-input-phone-number.cjs.entry.js +2525 -0
- package/dist/cjs/r-input.cjs.entry.js +618 -0
- package/dist/cjs/r-list-item.cjs.entry.js +109 -0
- package/dist/cjs/r-pagination.cjs.entry.js +320 -0
- package/dist/cjs/r-panel.cjs.entry.js +184 -0
- package/dist/cjs/r-popover-action.cjs.entry.js +80 -0
- package/dist/cjs/r-popover-content.cjs.entry.js +62 -0
- package/dist/cjs/r-popover-headline.cjs.entry.js +28 -0
- package/dist/cjs/r-popover-trigger.cjs.entry.js +70 -0
- package/dist/cjs/r-popover.cjs.entry.js +347 -0
- package/dist/cjs/r-progress-bar.cjs.entry.js +25 -0
- package/dist/cjs/r-radio-button-description.cjs.entry.js +18 -0
- package/dist/cjs/r-radio-button-leading.cjs.entry.js +18 -0
- package/dist/cjs/r-radio-button-title.cjs.entry.js +18 -0
- package/dist/cjs/r-radio-button-trailing.cjs.entry.js +18 -0
- package/dist/cjs/r-radio-button.cjs.entry.js +139 -0
- package/dist/cjs/r-radio-group.cjs.entry.js +428 -0
- package/dist/cjs/r-select-option.cjs.entry.js +130 -0
- package/dist/cjs/r-select.cjs.entry.js +1107 -0
- package/dist/cjs/r-skip-link.cjs.entry.js +19 -0
- package/dist/cjs/r-stepper-item.cjs.entry.js +42 -0
- package/dist/cjs/r-stepper.cjs.entry.js +99 -0
- package/dist/cjs/r-tab-panel.cjs.entry.js +26 -0
- package/dist/cjs/r-tab.cjs.entry.js +62 -0
- package/dist/cjs/r-tabs-list.cjs.entry.js +175 -0
- package/dist/cjs/r-tabs.cjs.entry.js +277 -0
- package/dist/cjs/r-textarea.cjs.entry.js +270 -0
- package/dist/cjs/r-toast-group.cjs.entry.js +46 -0
- package/dist/cjs/r-toast.cjs.entry.js +314 -0
- package/dist/cjs/style-observer-D9zSP9wP.js +1118 -0
- package/dist/cjs/theming-NqxjhVJS.js +109 -0
- package/dist/cjs/web-components.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +60 -0
- package/dist/collection/components/accordion/accordion.css +24 -0
- package/dist/collection/components/accordion/accordion.js +90 -0
- package/dist/collection/components/accordion/exports.js +1 -0
- package/dist/collection/components/accordion-panel/accordion-panel.css +50 -0
- package/dist/collection/components/accordion-panel/accordion-panel.js +86 -0
- package/dist/collection/components/accordion-section/accordion-section.css +27 -0
- package/dist/collection/components/accordion-section/accordion-section.js +235 -0
- package/dist/collection/components/accordion-trigger/accordion-trigger.css +93 -0
- package/dist/collection/components/accordion-trigger/accordion-trigger.js +220 -0
- package/dist/collection/components/alert/alert.css +120 -0
- package/dist/collection/components/alert/alert.js +526 -0
- package/dist/collection/components/alert/exports.js +2 -0
- package/dist/collection/components/badge/badge.css +62 -0
- package/dist/collection/components/badge/badge.js +124 -0
- package/dist/collection/components/badge/exports.js +1 -0
- package/dist/collection/components/button/button.css +180 -0
- package/dist/collection/components/button/button.js +510 -0
- package/dist/collection/components/button/exports.js +5 -0
- package/dist/collection/components/checkbox/checkbox.css +116 -0
- package/dist/collection/components/checkbox/checkbox.js +803 -0
- package/dist/collection/components/checkbox-group/checkbox-group.css +48 -0
- package/dist/collection/components/checkbox-group/checkbox-group.js +744 -0
- package/dist/collection/components/design-system-devtools/design-system-devtools.js +59 -0
- package/dist/collection/components/dialog/dialog.css +125 -0
- package/dist/collection/components/dialog/dialog.js +345 -0
- package/dist/collection/components/dialog/exports.js +9 -0
- package/dist/collection/components/hint/exports.js +1 -0
- package/dist/collection/components/hint/hint.css +63 -0
- package/dist/collection/components/hint/hint.js +114 -0
- package/dist/collection/components/icon/all-kit.js +2 -0
- package/dist/collection/components/icon/data.js +90 -0
- package/dist/collection/components/icon/exports.js +7 -0
- package/dist/collection/components/icon/icon.css +105 -0
- package/dist/collection/components/icon/icon.js +379 -0
- package/dist/collection/components/icon/riverty-kit.js +2 -0
- package/dist/collection/components/icon-button/icon-button.css +105 -0
- package/dist/collection/components/icon-button/icon-button.js +343 -0
- package/dist/collection/components/illustration/data.js +112 -0
- package/dist/collection/components/illustration/exports.js +3 -0
- package/dist/collection/components/illustration/illustration.css +52 -0
- package/dist/collection/components/illustration/illustration.js +540 -0
- package/dist/collection/components/illustration/illustrations-ui-kit.js +2 -0
- package/dist/collection/components/input/exports.js +62 -0
- package/dist/collection/components/input/input.css +186 -0
- package/dist/collection/components/input/input.js +1861 -0
- package/dist/collection/components/input-code/exports.js +2 -0
- package/dist/collection/components/input-code/input-code.css +127 -0
- package/dist/collection/components/input-code/input-code.js +1165 -0
- package/dist/collection/components/input-date/exports.js +1 -0
- package/dist/collection/components/input-date/input-date.css +148 -0
- package/dist/collection/components/input-date/input-date.js +1254 -0
- package/dist/collection/components/input-password/exports.js +1 -0
- package/dist/collection/components/input-password/input-password.css +25 -0
- package/dist/collection/components/input-password/input-password.js +1077 -0
- package/dist/collection/components/input-phone-number/input-phone-number.css +61 -0
- package/dist/collection/components/input-phone-number/input-phone-number.js +893 -0
- package/dist/collection/components/label/label.css +38 -0
- package/dist/collection/components/label/label.js +47 -0
- package/dist/collection/components/list-item/list-item/exports.js +2 -0
- package/dist/collection/components/list-item/list-item/list-item.css +199 -0
- package/dist/collection/components/list-item/list-item/list-item.js +467 -0
- package/dist/collection/components/pagination/exports.js +3 -0
- package/dist/collection/components/pagination/pagination.css +118 -0
- package/dist/collection/components/pagination/pagination.js +814 -0
- package/dist/collection/components/panel/exports.js +1 -0
- package/dist/collection/components/panel/panel.css +192 -0
- package/dist/collection/components/panel/panel.js +473 -0
- package/dist/collection/components/popover/exports.js +3 -0
- package/dist/collection/components/popover/popover.css +251 -0
- package/dist/collection/components/popover/popover.js +741 -0
- package/dist/collection/components/popover-action/popover-action.css +21 -0
- package/dist/collection/components/popover-action/popover-action.js +150 -0
- package/dist/collection/components/popover-content/popover-content.css +9 -0
- package/dist/collection/components/popover-content/popover-content.js +130 -0
- package/dist/collection/components/popover-headline/popover-headline.css +7 -0
- package/dist/collection/components/popover-headline/popover-headline.js +28 -0
- package/dist/collection/components/popover-trigger/exports.js +1 -0
- package/dist/collection/components/popover-trigger/popover-trigger.css +4 -0
- package/dist/collection/components/popover-trigger/popover-trigger.js +163 -0
- package/dist/collection/components/progress-bar/progress-bar.css +41 -0
- package/dist/collection/components/progress-bar/progress-bar.js +71 -0
- package/dist/collection/components/radio-button/radio-button.css +126 -0
- package/dist/collection/components/radio-button/radio-button.js +559 -0
- package/dist/collection/components/radio-button-description/radio-button-description.css +5 -0
- package/dist/collection/components/radio-button-description/radio-button-description.js +22 -0
- package/dist/collection/components/radio-button-leading/radio-button-leading.css +3 -0
- package/dist/collection/components/radio-button-leading/radio-button-leading.js +22 -0
- package/dist/collection/components/radio-button-title/radio-button-title.css +8 -0
- package/dist/collection/components/radio-button-title/radio-button-title.js +22 -0
- package/dist/collection/components/radio-button-trailing/radio-button-trailing.css +6 -0
- package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +22 -0
- package/dist/collection/components/radio-group/exports.js +1 -0
- package/dist/collection/components/radio-group/radio-group.css +65 -0
- package/dist/collection/components/radio-group/radio-group.js +1023 -0
- package/dist/collection/components/select/exports.js +1 -0
- package/dist/collection/components/select/select.css +247 -0
- package/dist/collection/components/select/select.js +2038 -0
- package/dist/collection/components/select-option/select-option.css +93 -0
- package/dist/collection/components/select-option/select-option.js +459 -0
- package/dist/collection/components/skip-link/exports.js +1 -0
- package/dist/collection/components/skip-link/skip-link.css +37 -0
- package/dist/collection/components/skip-link/skip-link.js +52 -0
- package/dist/collection/components/stepper/stepper.css +25 -0
- package/dist/collection/components/stepper/stepper.js +216 -0
- package/dist/collection/components/stepper-item/stepper-item.css +62 -0
- package/dist/collection/components/stepper-item/stepper-item.js +171 -0
- package/dist/collection/components/tab/tab.css +81 -0
- package/dist/collection/components/tab/tab.js +169 -0
- package/dist/collection/components/tab-panel/tab-panel.css +19 -0
- package/dist/collection/components/tab-panel/tab-panel.js +72 -0
- package/dist/collection/components/tabs/tabs.css +4 -0
- package/dist/collection/components/tabs/tabs.js +345 -0
- package/dist/collection/components/tabs-list/exports.js +2 -0
- package/dist/collection/components/tabs-list/tabs-list.css +58 -0
- package/dist/collection/components/tabs-list/tabs-list.js +294 -0
- package/dist/collection/components/textarea/exports.js +8 -0
- package/dist/collection/components/textarea/textarea.css +148 -0
- package/dist/collection/components/textarea/textarea.js +1055 -0
- package/dist/collection/components/toast/exports.js +3 -0
- package/dist/collection/components/toast/toast.css +179 -0
- package/dist/collection/components/toast/toast.js +820 -0
- package/dist/collection/components/toast-group/exports.js +1 -0
- package/dist/collection/components/toast-group/toast-group.css +37 -0
- package/dist/collection/components/toast-group/toast-group.js +49 -0
- package/dist/collection/components/tooltip/exports.js +3 -0
- package/dist/collection/components/tooltip/tooltip.css +77 -0
- package/dist/collection/components/tooltip/tooltip.js +525 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/utils/focusable.js +24 -0
- package/dist/collection/utils/formData.js +40 -0
- package/dist/collection/utils/theming.js +103 -0
- package/dist/collection/utils/version-checker.js +33 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/focusable-ky1yonnS.js +26 -0
- package/dist/esm/formData-DvLT8-y3.js +42 -0
- package/dist/esm/index-CTxpqopm.js +1806 -0
- package/dist/esm/index.js +35 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/r-accordion-panel.entry.js +22 -0
- package/dist/esm/r-accordion-section.entry.js +123 -0
- package/dist/esm/r-accordion-trigger.entry.js +91 -0
- package/dist/esm/r-accordion.entry.js +18 -0
- package/dist/esm/r-alert.entry.js +144 -0
- package/dist/esm/r-badge.entry.js +39 -0
- package/dist/esm/r-button.entry.js +147 -0
- package/dist/esm/r-checkbox-group.entry.js +235 -0
- package/dist/esm/r-checkbox.entry.js +272 -0
- package/dist/esm/r-design-system-devtools.entry.js +29 -0
- package/dist/esm/r-dialog.entry.js +105 -0
- package/dist/esm/r-hint_2.entry.js +47 -0
- package/dist/esm/r-icon-button_2.entry.js +489 -0
- package/dist/esm/r-icon.entry.js +282 -0
- package/dist/esm/r-illustration.entry.js +394 -0
- package/dist/esm/r-input-code.entry.js +435 -0
- package/dist/esm/r-input-date.entry.js +522 -0
- package/dist/esm/r-input-password.entry.js +268 -0
- package/dist/esm/r-input-phone-number.entry.js +2523 -0
- package/dist/esm/r-input.entry.js +616 -0
- package/dist/esm/r-list-item.entry.js +107 -0
- package/dist/esm/r-pagination.entry.js +318 -0
- package/dist/esm/r-panel.entry.js +182 -0
- package/dist/esm/r-popover-action.entry.js +78 -0
- package/dist/esm/r-popover-content.entry.js +60 -0
- package/dist/esm/r-popover-headline.entry.js +26 -0
- package/dist/esm/r-popover-trigger.entry.js +68 -0
- package/dist/esm/r-popover.entry.js +345 -0
- package/dist/esm/r-progress-bar.entry.js +23 -0
- package/dist/esm/r-radio-button-description.entry.js +16 -0
- package/dist/esm/r-radio-button-leading.entry.js +16 -0
- package/dist/esm/r-radio-button-title.entry.js +16 -0
- package/dist/esm/r-radio-button-trailing.entry.js +16 -0
- package/dist/esm/r-radio-button.entry.js +137 -0
- package/dist/esm/r-radio-group.entry.js +426 -0
- package/dist/esm/r-select-option.entry.js +128 -0
- package/dist/esm/r-select.entry.js +1105 -0
- package/dist/esm/r-skip-link.entry.js +17 -0
- package/dist/esm/r-stepper-item.entry.js +40 -0
- package/dist/esm/r-stepper.entry.js +97 -0
- package/dist/esm/r-tab-panel.entry.js +24 -0
- package/dist/esm/r-tab.entry.js +60 -0
- package/dist/esm/r-tabs-list.entry.js +173 -0
- package/dist/esm/r-tabs.entry.js +275 -0
- package/dist/esm/r-textarea.entry.js +268 -0
- package/dist/esm/r-toast-group.entry.js +44 -0
- package/dist/esm/r-toast.entry.js +312 -0
- package/dist/esm/style-observer-4Uv3PpKT.js +1116 -0
- package/dist/esm/theming-DD2IrjpG.js +106 -0
- package/dist/esm/web-components.js +21 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/accordion/accordion.d.ts +27 -0
- package/dist/types/components/accordion/exports.d.ts +2 -0
- package/dist/types/components/accordion-panel/accordion-panel.d.ts +10 -0
- package/dist/types/components/accordion-section/accordion-section.d.ts +36 -0
- package/dist/types/components/accordion-trigger/accordion-trigger.d.ts +33 -0
- package/dist/types/components/alert/alert.d.ts +67 -0
- package/dist/types/components/alert/exports.d.ts +4 -0
- package/dist/types/components/badge/badge.d.ts +26 -0
- package/dist/types/components/badge/exports.d.ts +2 -0
- package/dist/types/components/button/button.d.ts +89 -0
- package/dist/types/components/button/exports.d.ts +10 -0
- package/dist/types/components/checkbox/checkbox.d.ts +138 -0
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +124 -0
- package/dist/types/components/design-system-devtools/design-system-devtools.d.ts +15 -0
- package/dist/types/components/dialog/dialog.d.ts +69 -0
- package/dist/types/components/dialog/exports.d.ts +10 -0
- package/dist/types/components/hint/exports.d.ts +2 -0
- package/dist/types/components/hint/hint.d.ts +20 -0
- package/dist/types/components/icon/all-kit.d.ts +2890 -0
- package/dist/types/components/icon/data.d.ts +145 -0
- package/dist/types/components/icon/exports.d.ts +152 -0
- package/dist/types/components/icon/icon.d.ts +37 -0
- package/dist/types/components/icon/riverty-kit.d.ts +139 -0
- package/dist/types/components/icon-button/icon-button.d.ts +69 -0
- package/dist/types/components/illustration/data.d.ts +52 -0
- package/dist/types/components/illustration/exports.d.ts +23 -0
- package/dist/types/components/illustration/illustration.d.ts +51 -0
- package/dist/types/components/illustration/illustrations-ui-kit.d.ts +21 -0
- package/dist/types/components/input/exports.d.ts +55 -0
- package/dist/types/components/input/input.d.ts +365 -0
- package/dist/types/components/input-code/exports.d.ts +4 -0
- package/dist/types/components/input-code/input-code.d.ts +177 -0
- package/dist/types/components/input-date/exports.d.ts +5 -0
- package/dist/types/components/input-date/input-date.d.ts +174 -0
- package/dist/types/components/input-password/exports.d.ts +1 -0
- package/dist/types/components/input-password/input-password.d.ts +186 -0
- package/dist/types/components/input-phone-number/input-phone-number.d.ts +130 -0
- package/dist/types/components/label/label.d.ts +9 -0
- package/dist/types/components/list-item/list-item/exports.d.ts +4 -0
- package/dist/types/components/list-item/list-item/list-item.d.ts +61 -0
- package/dist/types/components/pagination/exports.d.ts +6 -0
- package/dist/types/components/pagination/pagination.d.ts +140 -0
- package/dist/types/components/panel/exports.d.ts +2 -0
- package/dist/types/components/panel/panel.d.ts +56 -0
- package/dist/types/components/popover/exports.d.ts +6 -0
- package/dist/types/components/popover/popover.d.ts +131 -0
- package/dist/types/components/popover-action/popover-action.d.ts +24 -0
- package/dist/types/components/popover-content/popover-content.d.ts +22 -0
- package/dist/types/components/popover-headline/popover-headline.d.ts +6 -0
- package/dist/types/components/popover-trigger/exports.d.ts +2 -0
- package/dist/types/components/popover-trigger/popover-trigger.d.ts +31 -0
- package/dist/types/components/progress-bar/progress-bar.d.ts +10 -0
- package/dist/types/components/radio-button/radio-button.d.ts +92 -0
- package/dist/types/components/radio-button-description/radio-button-description.d.ts +8 -0
- package/dist/types/components/radio-button-leading/radio-button-leading.d.ts +8 -0
- package/dist/types/components/radio-button-title/radio-button-title.d.ts +8 -0
- package/dist/types/components/radio-button-trailing/radio-button-trailing.d.ts +8 -0
- package/dist/types/components/radio-group/exports.d.ts +2 -0
- package/dist/types/components/radio-group/radio-group.d.ts +179 -0
- package/dist/types/components/select/exports.d.ts +2 -0
- package/dist/types/components/select/select.d.ts +319 -0
- package/dist/types/components/select-option/select-option.d.ts +113 -0
- package/dist/types/components/skip-link/exports.d.ts +2 -0
- package/dist/types/components/skip-link/skip-link.d.ts +6 -0
- package/dist/types/components/stepper/stepper.d.ts +22 -0
- package/dist/types/components/stepper-item/stepper-item.d.ts +23 -0
- package/dist/types/components/tab/tab.d.ts +23 -0
- package/dist/types/components/tab-panel/tab-panel.d.ts +7 -0
- package/dist/types/components/tabs/tabs.d.ts +49 -0
- package/dist/types/components/tabs-list/exports.d.ts +4 -0
- package/dist/types/components/tabs-list/tabs-list.d.ts +41 -0
- package/dist/types/components/textarea/exports.d.ts +2 -0
- package/dist/types/components/textarea/textarea.d.ts +158 -0
- package/dist/types/components/toast/exports.d.ts +6 -0
- package/dist/types/components/toast/toast.d.ts +146 -0
- package/dist/types/components/toast-group/exports.d.ts +2 -0
- package/dist/types/components/toast-group/toast-group.d.ts +9 -0
- package/dist/types/components/tooltip/exports.d.ts +6 -0
- package/dist/types/components/tooltip/tooltip.d.ts +132 -0
- package/dist/types/components.d.ts +6347 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1732 -0
- package/dist/types/types/jsx-shim.d.ts +13 -0
- package/dist/types/types/style-observer.d.ts +20 -0
- package/dist/types/utils/focusable.d.ts +1 -0
- package/dist/types/utils/formData.d.ts +1 -0
- package/dist/types/utils/theming.d.ts +15 -0
- package/dist/types/utils/version-checker.d.ts +1 -0
- package/dist/web-components/index.esm.js +1 -0
- package/dist/web-components/p-01aefcf0.entry.js +1 -0
- package/dist/web-components/p-05cb55db.entry.js +1 -0
- package/dist/web-components/p-0a34d33b.entry.js +1 -0
- package/dist/web-components/p-11b22309.entry.js +1 -0
- package/dist/web-components/p-2d878934.entry.js +1 -0
- package/dist/web-components/p-325dbedf.entry.js +1 -0
- package/dist/web-components/p-34b9457b.entry.js +1 -0
- package/dist/web-components/p-36abd05a.entry.js +1 -0
- package/dist/web-components/p-386d1ef9.entry.js +1 -0
- package/dist/web-components/p-3d67b77b.entry.js +1 -0
- package/dist/web-components/p-4Uv3PpKT.js +1 -0
- package/dist/web-components/p-4b12fbc0.entry.js +1 -0
- package/dist/web-components/p-52f7b505.entry.js +1 -0
- package/dist/web-components/p-55600d47.entry.js +1 -0
- package/dist/web-components/p-57ebc474.entry.js +1 -0
- package/dist/web-components/p-57edf7f4.entry.js +1 -0
- package/dist/web-components/p-69a24fe2.entry.js +1 -0
- package/dist/web-components/p-6d92648c.entry.js +1 -0
- package/dist/web-components/p-75052597.entry.js +1 -0
- package/dist/web-components/p-7b2c5b63.entry.js +1 -0
- package/dist/web-components/p-7bf463ff.entry.js +1 -0
- package/dist/web-components/p-838e43d4.entry.js +1 -0
- package/dist/web-components/p-8c16d038.entry.js +1 -0
- package/dist/web-components/p-8f8313de.entry.js +1 -0
- package/dist/web-components/p-9026d5a2.entry.js +1 -0
- package/dist/web-components/p-95396b5c.entry.js +1 -0
- package/dist/web-components/p-9c31c7c4.entry.js +1 -0
- package/dist/web-components/p-9c415b9c.entry.js +1 -0
- package/dist/web-components/p-9f583ed1.entry.js +1 -0
- package/dist/web-components/p-B9rsR6cQ.js +1 -0
- package/dist/web-components/p-CTxpqopm.js +2 -0
- package/dist/web-components/p-DQuL1Twl.js +1 -0
- package/dist/web-components/p-DvLT8-y3.js +1 -0
- package/dist/web-components/p-b303b2cc.entry.js +1 -0
- package/dist/web-components/p-b8df041d.entry.js +1 -0
- package/dist/web-components/p-bc30844f.entry.js +1 -0
- package/dist/web-components/p-c4a77a65.entry.js +1 -0
- package/dist/web-components/p-c549addf.entry.js +1 -0
- package/dist/web-components/p-c65df19f.entry.js +1 -0
- package/dist/web-components/p-c80a5541.entry.js +1 -0
- package/dist/web-components/p-c96ee61a.entry.js +1 -0
- package/dist/web-components/p-cf3f044d.entry.js +1 -0
- package/dist/web-components/p-d1412932.entry.js +1 -0
- package/dist/web-components/p-d9778cfa.entry.js +1 -0
- package/dist/web-components/p-dbe4ccb8.entry.js +1 -0
- package/dist/web-components/p-ded50850.entry.js +1 -0
- package/dist/web-components/p-e5be895b.entry.js +1 -0
- package/dist/web-components/p-e6b34c1e.entry.js +1 -0
- package/dist/web-components/p-ec3c4800.entry.js +1 -0
- package/dist/web-components/p-f670fd87.entry.js +1 -0
- package/dist/web-components/p-f867e4c3.entry.js +1 -0
- package/dist/web-components/p-ff6b1b8f.entry.js +1 -0
- package/dist/web-components/p-ky1yonnS.js +1 -0
- package/dist/web-components/web-components.esm.js +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CTxpqopm.js';
|
|
2
|
+
import { a as appendControlToFormData } from './formData-DvLT8-y3.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Native HTML input attributes that can be passed through.
|
|
6
|
+
* Using Set for O(1) lookup performance instead of O(n) array includes.
|
|
7
|
+
*/
|
|
8
|
+
const nativeInputAttributesSet = new Set([
|
|
9
|
+
'accept', 'autocorrect', 'capture', 'dirname',
|
|
10
|
+
'height', 'incremental', 'list', 'multiple', 'size', 'src', 'width'
|
|
11
|
+
]);
|
|
12
|
+
/**
|
|
13
|
+
* Special case mappings for attributes that need custom camelCase conversion
|
|
14
|
+
* beyond simple hyphen-based transformation. Maps HTML attribute name (lowercase)
|
|
15
|
+
* to JSX property name (camelCase).
|
|
16
|
+
*/
|
|
17
|
+
const attributeCamelCaseMap = {
|
|
18
|
+
'autocorrect': 'autoCorrect',
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Component-specific props that should NOT be passed to the native input.
|
|
22
|
+
* Using Set for O(1) lookup performance.
|
|
23
|
+
*/
|
|
24
|
+
const excludedAttributesSet = new Set([
|
|
25
|
+
'internal', 'full-width', 'fullwidth', 'validity-marker', 'validitymarker',
|
|
26
|
+
'error', 'valid', 'invalid', 'hint', 'field-indicator', 'fieldindicator',
|
|
27
|
+
'value-missing-message', 'valuemissingmessage', 'type-mismatch-message', 'typemismatchmessage',
|
|
28
|
+
'pattern-mismatch-message', 'patternmismatchmessage', 'too-long-message', 'toolongmessage',
|
|
29
|
+
'too-short-message', 'tooshortmessage', 'range-overflow-message', 'rangeoverflowmessage',
|
|
30
|
+
'range-underflow-message', 'rangeunderflowmessage', 'step-mismatch-message', 'stepmismatchmessage',
|
|
31
|
+
'bad-input-message', 'badinputmessage', 'custom-error-message', 'customerrormessage'
|
|
32
|
+
]);
|
|
33
|
+
/**
|
|
34
|
+
* Framework/DOM-specific attributes that should never be passed through.
|
|
35
|
+
*/
|
|
36
|
+
const frameworkAttributesSet = new Set([
|
|
37
|
+
'class', 'style', 'id', 'slot', 'ref', 'key'
|
|
38
|
+
]);
|
|
39
|
+
/**
|
|
40
|
+
* ARIA attributes that are already handled explicitly by the component
|
|
41
|
+
* and should not be passed through to avoid conflicts.
|
|
42
|
+
*/
|
|
43
|
+
const managedAriaAttributesSet = new Set([
|
|
44
|
+
'aria-invalid',
|
|
45
|
+
'aria-required',
|
|
46
|
+
'aria-placeholder',
|
|
47
|
+
'aria-describedby',
|
|
48
|
+
'data-value'
|
|
49
|
+
]);
|
|
50
|
+
|
|
51
|
+
const inputCss = ":host{display:inline-flex;flex-direction:column;vertical-align:top;--r-label--margin-bottom:0}:host slot{display:contents}:host([readonly]:not([readonly=false])){--r-input--container--background-color:var(--r-background-soft, #f3f1f0);--r-input--container--border-color:transparent transparent var(--r-border-soft, #686868) transparent;--r-input--container--cursor:text}:host(:hover:not([disabled]:not([disabled=false])):not([readonly]:not([readonly=false]))){--r-input--container--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host(.focused){--r-input--container--box-shadow:0 0 0 6px var(--r-border-focused-outlined);--r-input--container--outline:2px solid var(--r-border-focused);--r-input--container--outline-offset:2px}:host(:active:not([disabled]:not([disabled=false])):not([readonly]:not([readonly=false]))){--r-input--container--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host([expanded]:not([expanded=false])),:host([full-width]:not([full-width=false])){display:block}:host([disabled]:not([disabled=false])){--r-input--container--opacity:0.4;--r-input--container--cursor:not-allowed;--r-input--container--pointer-events:none;--r-input--container--background-color:transparent}:host([invalid]:not([invalid=false])){--r-input--container--border-color:var(--r-status-error-regular, #b00c15);--r-input--container--background-color:var(--r-status-error-soft, #fef6f6)}:host([size]){--r-input--width:auto;--r-input--input--width:auto;--r-input--container--display:inline-flex}.r-input{display:var(--r-input--display, flex);flex:var(--r-input--flex, 1);flex-direction:var(--r-input--flex-direction, column);width:var(--r-input--width, auto);font-family:var(--r-input--font-family, system-ui);position:var(--r-input--position, relative);border-radius:var(--r-input--border-radius, 0);cursor:var(--r-input--cursor, inherit)}.r-input--label-container{display:var(--r-input--label-container--display, flex);gap:var(--r-input--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-input--label-container--align-items, center);justify-content:var(--r-input--label-container--align-items, space-between)}.r-input--label-container ::slotted([slot=popover]){display:var(--r-input--popover--display, inline-flex);height:var(--r-input--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-input--popover--align-items, center);justify-content:var(--r-input--popover--justify-content, center);margin-right:var(--r-input--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-input--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-input--popover--trigger--min-height, var(--r-spacing-150, 1.5))}.r-input--label{cursor:var(--r-input--label--cursor, inherit)}.r-input--input{font-family:var(--r-input--input--font-family, system-ui);font-size:var(--r-input--input--font-size, 1em);width:var(--r-input--input--width, 100%);max-width:var(--r-input--input--max-width, 100%);height:var(--r-input--input--height, var(--r-spacing-275, 2.75rem));border-radius:var(--r-input--input--border-radius, 0);border:var(--r-input--input--border, none);color:var(--r-input--input--color, var(--r-text-regular, #282828));background-color:var(--r-input--input--background-color, none);appearance:var(--r-input--input--appearance, none);box-sizing:var(--r-input--input--box-sizing, border-box);outline:var(--r-input--input--outline, none);cursor:var(--r-input--input--cursor, inherit);pointer-events:var(--r-input--input--pointer-events, auto)}.r-input--input:autofill,.r-input--input:-webkit-autofill{-webkit-background-clip:text !important}.r-input--input::-ms-reveal{display:var(--r-input--input--ms-reveal--display, none)}.r-input--input::placeholder{color:var(--r-input--input--placeholder--color, var(--r-text-soft, #686868))}.r-input--input[type=search]::-webkit-search-cancel-button{cursor:var(--r-input--input-clear--cursor, pointer);display:var(--r-input--input-clear--display, block);height:var(--r-input--input-clear--height, 0.875rem);width:var(--r-input--input-clear--width, 0.875rem);appearance:var(--r-input--input-clear--appearance, none);background-repeat:var(--r-input--input-clear--background-repeat, no-repeat);background-image:var(--r-input--input-clear--background-image, url(\"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20stroke-width%3D%221.5%22%20viewBox%3D%220.75%200.75%2022.5%2022.5%22%3E%3Cpath%20id%3D%22Vector%202269%22%20stroke%3D%22currentColor%22%20d%3D%22M1.5%201.5L22.5%2022.5%22%2F%3E%3Cpath%20id%3D%22Vector%202270%22%20stroke%3D%22currentColor%22%20d%3D%22M22.5%201.5L1.5%2022.5%22%2F%3E%3C%2Fsvg%3E\"));background-size:var(--r-input--input-clear--background-size, contain);margin-inline:var(--r-input--input-clear--margin-inline, 0);color:currentColor}.r-input--button{position:var(--r-input--icon-button--position, absolute);width:var(--r-input--icon-button--width, calc(1.125em + var(--r-input--icon--width)));height:var(--r-input--icon-button--height, 100%);top:var(--r-input--icon-button--top, 0);right:var(--r-input--icon-button--right, auto);bottom:var(--r-input--icon-button--bottom, auto);left:var(--r-input--icon-button--left, 0);cursor:var(--r-input--icon-button--cursor, inherit)}.r-input--container{position:var(--r-input--container--position, relative);display:var(--r-input--container--display, flex);align-items:var(--r-input--container--align-items, center);gap:var(--r-input--container--gap, 0.625rem);height:var(--r-input--container--height, var(--r-spacing-275, 2.75rem));background-color:var(--r-input--container--background-color, var(--r-background-softest, #fff));border-width:var(--r-input--container--border-width, 1px);border-style:var(--r-input--container--border-style, solid);border-color:var(--r-input--container--border-color, var(--r-border-soft, #686868));box-sizing:var(--r-input--container--box-sizing, border-box);box-shadow:var(--r-input--container--box-shadow, none);outline:var(--r-input--container--outline, none);outline-offset:var(--r-input--container--outline-offset, 0);padding-top:var(--r-input--container--padding-top, 0.6875rem);padding-right:var(--r-input--container--padding-right, var(--r-spacing-075, 0.75rem));padding-bottom:var(--r-input--container--padding-bottom, 0.6875rem);padding-left:var(--r-input--container--padding-left, var(--r-spacing-0275, 0.75rem));opacity:var(--r-input--container--opacity, 1);pointer-events:var(--r-input--container--pointer-events, auto);line-height:var(--r-input--container--line-height, 1);cursor:var(--r-input--container--cursor, inherit);margin-top:var(--r-input--container--margin-top, var(--r-spacing-025, 0.25rem))}.r-input--container slot[name=leading]{color:var(--r-input--container-leading--color, var(--r-icon-soft, #686868))}.r-input--message:has(r-hint),.r-input--message ::slotted([slot=message]){margin-top:var(--r-input--message--margin-top, var(--r-spacing-025, 0.25rem))}.r-input--trailing{display:var(--r-input--trailing--display, flex);margin-left:var(--r-input--trailing--margin-left, auto);align-items:var(--r-input--trailing--align-items, center);gap:var(--r-input--trailing--gap, 0.625rem)}.r-input--trailing:empty{--r-input--trailing--display:none}.r-input--validation-icon{display:var(--r-input--validation-icon--display, inline-block)}.r-input--readonly-icon{color:var(--r-input--readonly-icon--color, var(--r-icon-soft, #686868))}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
|
|
52
|
+
|
|
53
|
+
const RInput = class {
|
|
54
|
+
constructor(hostRef) {
|
|
55
|
+
registerInstance(this, hostRef);
|
|
56
|
+
this.rValidate = createEvent(this, "rValidate");
|
|
57
|
+
this.rInput = createEvent(this, "rInput");
|
|
58
|
+
this.rBlur = createEvent(this, "rBlur");
|
|
59
|
+
this.rFocus = createEvent(this, "rFocus");
|
|
60
|
+
this.rChange = createEvent(this, "rChange");
|
|
61
|
+
this.rReset = createEvent(this, "rReset");
|
|
62
|
+
this.rBeforeInput = createEvent(this, "rBeforeInput");
|
|
63
|
+
this.rInvalid = createEvent(this, "rInvalid");
|
|
64
|
+
this.rKeyDown = createEvent(this, "rKeyDown");
|
|
65
|
+
this.rKeyUp = createEvent(this, "rKeyUp");
|
|
66
|
+
this.rSelect = createEvent(this, "rSelect");
|
|
67
|
+
/**
|
|
68
|
+
* Input type (e.g. `text`, `email`, `number`, `password`).
|
|
69
|
+
* See HTMLInputElement `type` for supported values.
|
|
70
|
+
*/
|
|
71
|
+
this.type = 'text';
|
|
72
|
+
/**
|
|
73
|
+
* Current value. Mutable: can be changed programmatically or through user input.
|
|
74
|
+
*/
|
|
75
|
+
this.value = '';
|
|
76
|
+
/** Internal state for options extracted from slotted datalist */
|
|
77
|
+
this.slottedOptions = [];
|
|
78
|
+
/**
|
|
79
|
+
* When `true` field renders valid/invalid marker within.
|
|
80
|
+
*/
|
|
81
|
+
this.validityMarker = true;
|
|
82
|
+
/** Validity state passed from validateFormElement function after validation */
|
|
83
|
+
this.validityState = '';
|
|
84
|
+
/** Validity message passed from validateFormElement function after validation */
|
|
85
|
+
this.validityMessage = '';
|
|
86
|
+
/** Defines if the component has been touched by user */
|
|
87
|
+
this.touched = false;
|
|
88
|
+
/** Defines if the value has been changed by user interaction */
|
|
89
|
+
this.dirty = false;
|
|
90
|
+
/** Private flag to prevent validation during reset */
|
|
91
|
+
this.isResetting = false;
|
|
92
|
+
this.nativeElement = null;
|
|
93
|
+
/**
|
|
94
|
+
* Helper to set the native input element ref and apply boolean properties
|
|
95
|
+
* that don't get properly set through JSX attribute spreading.
|
|
96
|
+
*/
|
|
97
|
+
this.setNativeInputRef = (el) => {
|
|
98
|
+
this.nativeElement = el;
|
|
99
|
+
if (el) {
|
|
100
|
+
el.addEventListener('beforeinput', this.onBeforeInput);
|
|
101
|
+
// Manually apply boolean native attributes as properties
|
|
102
|
+
// This is necessary because Stencil's JSX doesn't always properly
|
|
103
|
+
// set boolean DOM properties when spreading attributes
|
|
104
|
+
const passthroughAttrs = this.collectNativeAttributes();
|
|
105
|
+
// List of boolean native input properties that need manual application
|
|
106
|
+
const booleanProps = ['multiple'];
|
|
107
|
+
for (const prop of booleanProps) {
|
|
108
|
+
if (prop in passthroughAttrs && passthroughAttrs[prop] === true) {
|
|
109
|
+
el[prop] = true;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
this.uniqueId = `r-input-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
115
|
+
/**
|
|
116
|
+
* Initial attributes state
|
|
117
|
+
* */
|
|
118
|
+
this.initial = {};
|
|
119
|
+
/**
|
|
120
|
+
* Cache for passthrough attributes to avoid recomputing on every render.
|
|
121
|
+
* Cleared when attributes might have changed.
|
|
122
|
+
*/
|
|
123
|
+
this.passthroughAttrsCache = null;
|
|
124
|
+
this.getValidityStateData = (element) => {
|
|
125
|
+
let validityState = '';
|
|
126
|
+
let validityMessage = '';
|
|
127
|
+
if (this.type === 'email' && this.pattern) {
|
|
128
|
+
element.setCustomValidity('');
|
|
129
|
+
validityState = this.validEmailPattern ? 'valid' : 'patternMismatch';
|
|
130
|
+
validityMessage = this.validEmailPattern ? '' : this.patternMismatchMessage;
|
|
131
|
+
return { validityState, validityMessage };
|
|
132
|
+
}
|
|
133
|
+
for (const state in element.validity) {
|
|
134
|
+
if (element.validity[state]) {
|
|
135
|
+
validityState = state;
|
|
136
|
+
const customMessage = this[state + 'Message'];
|
|
137
|
+
if (customMessage) {
|
|
138
|
+
validityMessage = customMessage;
|
|
139
|
+
return { validityState, validityMessage };
|
|
140
|
+
}
|
|
141
|
+
validityMessage = element.validationMessage;
|
|
142
|
+
// Found an error, use it even if no custom message
|
|
143
|
+
return { validityState, validityMessage };
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
// No errors found, field is valid
|
|
147
|
+
return { validityState: 'valid', validityMessage: '' };
|
|
148
|
+
};
|
|
149
|
+
this.validateFormElement = (element) => {
|
|
150
|
+
if (element === null)
|
|
151
|
+
return;
|
|
152
|
+
if (this.isNoValidate)
|
|
153
|
+
return;
|
|
154
|
+
if (this.error)
|
|
155
|
+
return;
|
|
156
|
+
// Trigger browser validation to populate validity states
|
|
157
|
+
if (element.checkValidity) {
|
|
158
|
+
element.checkValidity();
|
|
159
|
+
}
|
|
160
|
+
const { validityState, validityMessage } = this.getValidityStateData(element);
|
|
161
|
+
this.validityState = validityState;
|
|
162
|
+
this.validityMessage = validityMessage;
|
|
163
|
+
const isValid = this.validityState === 'valid';
|
|
164
|
+
this.valid = isValid;
|
|
165
|
+
this.invalid = !isValid;
|
|
166
|
+
this.rValidate.emit({
|
|
167
|
+
state: this.validityState,
|
|
168
|
+
message: this.validityMessage
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
this.onInput = (event) => {
|
|
172
|
+
if (this.readonly)
|
|
173
|
+
return;
|
|
174
|
+
this.value = event.target.value;
|
|
175
|
+
this.touched = true;
|
|
176
|
+
this.dirty = true;
|
|
177
|
+
const { host, value } = this;
|
|
178
|
+
this.rInput.emit({ element: host, value });
|
|
179
|
+
};
|
|
180
|
+
this.onChange = event => {
|
|
181
|
+
if (this.readonly)
|
|
182
|
+
return;
|
|
183
|
+
this.value = event.target.value;
|
|
184
|
+
this.touched = true;
|
|
185
|
+
this.dirty = true;
|
|
186
|
+
const { host, value } = this;
|
|
187
|
+
this.rChange.emit({ element: host, value });
|
|
188
|
+
};
|
|
189
|
+
this.onBlur = () => {
|
|
190
|
+
this.host.classList.remove('focused');
|
|
191
|
+
this.touched = true;
|
|
192
|
+
this.validateFormElement(this.nativeElement);
|
|
193
|
+
this.rBlur.emit();
|
|
194
|
+
};
|
|
195
|
+
this.onFocus = () => {
|
|
196
|
+
this.host.classList.add('focused');
|
|
197
|
+
this.rFocus.emit();
|
|
198
|
+
};
|
|
199
|
+
this.onBeforeInput = (event) => {
|
|
200
|
+
this.rBeforeInput.emit(event);
|
|
201
|
+
};
|
|
202
|
+
this.onInvalid = (event) => {
|
|
203
|
+
this.rInvalid.emit(event);
|
|
204
|
+
};
|
|
205
|
+
this.onKeyDown = (event) => {
|
|
206
|
+
this.rKeyDown.emit(event);
|
|
207
|
+
};
|
|
208
|
+
this.onKeyUp = (event) => {
|
|
209
|
+
this.rKeyUp.emit(event);
|
|
210
|
+
};
|
|
211
|
+
this.onSelect = (event) => {
|
|
212
|
+
this.rSelect.emit(event);
|
|
213
|
+
};
|
|
214
|
+
this.contributeToFormData = (event) => {
|
|
215
|
+
appendControlToFormData(this.nativeElement || this.host, event.formData);
|
|
216
|
+
};
|
|
217
|
+
this.datalistObserver = null;
|
|
218
|
+
this.onResetForm = () => {
|
|
219
|
+
if (this.readonly)
|
|
220
|
+
return;
|
|
221
|
+
this.isResetting = true;
|
|
222
|
+
this.markAsPristine();
|
|
223
|
+
this.validityState = null;
|
|
224
|
+
this.validityMessage = null;
|
|
225
|
+
// Restore initial value without triggering validation
|
|
226
|
+
if (this.nativeElement) {
|
|
227
|
+
this.nativeElement.value = this.initial['value'] || '';
|
|
228
|
+
}
|
|
229
|
+
this.value = this.initial['value'];
|
|
230
|
+
this.invalid = this.initial['invalid'];
|
|
231
|
+
this.valid = !this.invalid;
|
|
232
|
+
this.isResetting = false;
|
|
233
|
+
const { host, value } = this;
|
|
234
|
+
this.rReset.emit({ element: host, value });
|
|
235
|
+
};
|
|
236
|
+
this.onSubmitForm = (event) => {
|
|
237
|
+
if (this.isNoValidate)
|
|
238
|
+
return;
|
|
239
|
+
this.touched = true;
|
|
240
|
+
this.validateFormElement(this.nativeElement);
|
|
241
|
+
if (this.invalid) {
|
|
242
|
+
event.preventDefault();
|
|
243
|
+
event.stopPropagation();
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
this.handleKeyup = (event) => {
|
|
247
|
+
var _a, _b;
|
|
248
|
+
this.validateFormElement(this.nativeElement);
|
|
249
|
+
if (this.invalid && !this.isNoValidate)
|
|
250
|
+
return;
|
|
251
|
+
if (event.code === 'Enter') {
|
|
252
|
+
const submitEl = this.host.querySelector('[type="submit"]') ||
|
|
253
|
+
((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.querySelector('[type="submit"]'));
|
|
254
|
+
if (submitEl && 'triggerClick' in submitEl) {
|
|
255
|
+
submitEl === null || submitEl === void 0 ? void 0 : submitEl.triggerClick();
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.requestSubmit();
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
this.handleClick = () => {
|
|
263
|
+
this.host.shadowRoot.querySelector('input').focus();
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Programmatically focus the native input element.
|
|
268
|
+
*/
|
|
269
|
+
async setFocus() {
|
|
270
|
+
var _a;
|
|
271
|
+
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Programmatically remove focus from the native input.
|
|
275
|
+
*/
|
|
276
|
+
async setBlur() {
|
|
277
|
+
var _a;
|
|
278
|
+
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.blur();
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Select (highlight) the entire current input value.
|
|
282
|
+
*/
|
|
283
|
+
async select() {
|
|
284
|
+
var _a;
|
|
285
|
+
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.select();
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Get the start index of the current text selection (or null if unavailable).
|
|
289
|
+
*/
|
|
290
|
+
async getSelectionStart() {
|
|
291
|
+
var _a, _b;
|
|
292
|
+
return (_b = (_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.selectionStart) !== null && _b !== void 0 ? _b : null;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Get the end index of the current text selection (or null if unavailable).
|
|
296
|
+
*/
|
|
297
|
+
async getSelectionEnd() {
|
|
298
|
+
var _a, _b;
|
|
299
|
+
return (_b = (_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.selectionEnd) !== null && _b !== void 0 ? _b : null;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Set a selection (or caret) range within the value.
|
|
303
|
+
* @param start Start index (inclusive)
|
|
304
|
+
* @param end End index (exclusive)
|
|
305
|
+
* @param direction Selection direction (browser hint)
|
|
306
|
+
*/
|
|
307
|
+
async setSelectionRange(start, end, direction = 'none') {
|
|
308
|
+
if (this.nativeElement) {
|
|
309
|
+
this.nativeElement.setSelectionRange(start, end, direction);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Retrieve the current value (returns empty string if unset).
|
|
314
|
+
*/
|
|
315
|
+
async getValue() {
|
|
316
|
+
var _a;
|
|
317
|
+
return ((_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Set the current value programmatically (does not fire native input/change automatically).
|
|
321
|
+
*/
|
|
322
|
+
async setValue(value) {
|
|
323
|
+
if (this.nativeElement) {
|
|
324
|
+
this.nativeElement.value = value;
|
|
325
|
+
}
|
|
326
|
+
this.value = value;
|
|
327
|
+
this.validateFormElement(this.nativeElement);
|
|
328
|
+
}
|
|
329
|
+
/** Validates an element, displays provided message in case value is invalid. */
|
|
330
|
+
async setCustomValidity(message) {
|
|
331
|
+
this.customErrorMessage = message;
|
|
332
|
+
this.validateFormElement(this.nativeElement);
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Validates the input without triggering UI and returns a boolean indicating its validity.
|
|
336
|
+
* @returns A boolean indicating whether the input is valid.
|
|
337
|
+
*/
|
|
338
|
+
async checkValidity() {
|
|
339
|
+
const { validityState } = this.getValidityStateData(this.nativeElement);
|
|
340
|
+
return validityState === 'valid';
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Gets the touched state (whether user has interacted with the input)
|
|
344
|
+
*/
|
|
345
|
+
async isTouched() {
|
|
346
|
+
return this.touched;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Gets the dirty state (whether value has been changed by user)
|
|
350
|
+
*/
|
|
351
|
+
async isDirty() {
|
|
352
|
+
return this.dirty;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Resets touched and dirty states to pristine (untouched/clean)
|
|
356
|
+
*/
|
|
357
|
+
async markAsPristine() {
|
|
358
|
+
this.touched = false;
|
|
359
|
+
this.dirty = false;
|
|
360
|
+
}
|
|
361
|
+
get datalistId() {
|
|
362
|
+
return `${this.uniqueId}-list`;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Checks if an attribute should be excluded from passthrough.
|
|
366
|
+
*/
|
|
367
|
+
shouldExcludeAttribute(attrName) {
|
|
368
|
+
return (frameworkAttributesSet.has(attrName) ||
|
|
369
|
+
excludedAttributesSet.has(attrName) ||
|
|
370
|
+
managedAriaAttributesSet.has(attrName));
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Collects native HTML input attributes from the host element that aren't
|
|
374
|
+
* already handled by explicit props. This allows passing through attributes
|
|
375
|
+
* like 'list', 'multiple', 'size', etc. without creating explicit props.
|
|
376
|
+
* Optimized with Set lookups (O(1)) and caching.
|
|
377
|
+
*/
|
|
378
|
+
collectNativeAttributes() {
|
|
379
|
+
// Return cached result if available
|
|
380
|
+
if (this.passthroughAttrsCache !== null) {
|
|
381
|
+
return this.passthroughAttrsCache;
|
|
382
|
+
}
|
|
383
|
+
const collected = {};
|
|
384
|
+
const hostAttrs = this.host.attributes;
|
|
385
|
+
// Early return if no attributes to process
|
|
386
|
+
if (!hostAttrs || hostAttrs.length === 0) {
|
|
387
|
+
this.passthroughAttrsCache = collected;
|
|
388
|
+
return collected;
|
|
389
|
+
}
|
|
390
|
+
for (const attr of Array.from(hostAttrs)) {
|
|
391
|
+
const attrName = attr.name.toLowerCase();
|
|
392
|
+
// Skip framework/component-specific attributes using helper method
|
|
393
|
+
if (this.shouldExcludeAttribute(attrName)) {
|
|
394
|
+
continue;
|
|
395
|
+
}
|
|
396
|
+
// Include data-* or native input attributes (exclude aria- - component manages ARIA via inputAttrs)
|
|
397
|
+
if (attrName.startsWith('data-') || nativeInputAttributesSet.has(attrName)) {
|
|
398
|
+
// Use special camelCase mapping for certain attributes that need it for JSX properties
|
|
399
|
+
// Otherwise keep the attribute name as-is for native HTML attributes
|
|
400
|
+
const jsxAttrName = attributeCamelCaseMap[attrName] || attrName;
|
|
401
|
+
// Handle boolean attributes: if value is empty or matches attribute name, set to true
|
|
402
|
+
// This ensures proper JSX rendering for attributes like 'multiple'
|
|
403
|
+
const attrValue = attr.value;
|
|
404
|
+
collected[jsxAttrName] = (attrValue === '' || attrValue === attrName) ? true : attrValue;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
// Cache the result
|
|
408
|
+
this.passthroughAttrsCache = collected;
|
|
409
|
+
return collected;
|
|
410
|
+
}
|
|
411
|
+
/** Identify wrapping form element */
|
|
412
|
+
get parentFormEl() {
|
|
413
|
+
return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
|
|
414
|
+
}
|
|
415
|
+
get ariaDescribedBy() {
|
|
416
|
+
const describedBy = `${this.uniqueId}-message`;
|
|
417
|
+
return this.hint ? `${this.uniqueId}-hint ${describedBy}` : describedBy;
|
|
418
|
+
}
|
|
419
|
+
get hasError() {
|
|
420
|
+
var _a;
|
|
421
|
+
return this.invalid && !!((_a = this.error) === null || _a === void 0 ? void 0 : _a.length);
|
|
422
|
+
}
|
|
423
|
+
get hasValidationError() {
|
|
424
|
+
return (this.validityState && this.validityState !== 'valid' || this.invalid) && !!(this.validityMessage || this.customErrorMessage);
|
|
425
|
+
}
|
|
426
|
+
get hasMessage() {
|
|
427
|
+
return this.hasError || this.hasValidationError;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Determine whether this element should be ignored
|
|
431
|
+
* during Constraint Validation API validation.
|
|
432
|
+
* */
|
|
433
|
+
get isNoValidate() {
|
|
434
|
+
var _a;
|
|
435
|
+
return (((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.hasAttribute('novalidate')) ||
|
|
436
|
+
this.novalidate ||
|
|
437
|
+
false);
|
|
438
|
+
}
|
|
439
|
+
get hasTrailingSlot() {
|
|
440
|
+
return !!this.host.querySelector('[slot="trailing"]');
|
|
441
|
+
}
|
|
442
|
+
get validEmailPattern() {
|
|
443
|
+
if (!this.value)
|
|
444
|
+
return false;
|
|
445
|
+
const regex = new RegExp(this.pattern, 'u');
|
|
446
|
+
return regex.test(this.value);
|
|
447
|
+
}
|
|
448
|
+
componentWillLoad() {
|
|
449
|
+
this.initial['value'] = this.value;
|
|
450
|
+
this.initial['invalid'] = this.invalid;
|
|
451
|
+
// Clear passthrough attributes cache to ensure fresh collection on load
|
|
452
|
+
this.passthroughAttrsCache = null;
|
|
453
|
+
// Extract options from slotted datalist
|
|
454
|
+
this.extractSlottedDatalistOptions();
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Extracts options from a slotted <datalist> element.
|
|
458
|
+
* Supports both default slot and slot="datalist" usage.
|
|
459
|
+
*/
|
|
460
|
+
extractSlottedDatalistOptions() {
|
|
461
|
+
// First check for slot="datalist"
|
|
462
|
+
const slottedDatalist = this.host.querySelector('datalist[slot="datalist"]');
|
|
463
|
+
if (!slottedDatalist) {
|
|
464
|
+
// Check for datalist in default slot
|
|
465
|
+
const defaultSlotDatalist = Array.from(this.host.querySelectorAll('datalist'))
|
|
466
|
+
.find(el => !el.hasAttribute('slot'));
|
|
467
|
+
if (!defaultSlotDatalist) {
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
this.slottedOptions = this.parseDatalistOptions(defaultSlotDatalist);
|
|
471
|
+
}
|
|
472
|
+
else {
|
|
473
|
+
this.slottedOptions = this.parseDatalistOptions(slottedDatalist);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Parses options from a HTMLDataListElement into InputOption array.
|
|
478
|
+
*/
|
|
479
|
+
parseDatalistOptions(datalist) {
|
|
480
|
+
const options = [];
|
|
481
|
+
const optionElements = datalist.querySelectorAll('option');
|
|
482
|
+
optionElements.forEach(opt => {
|
|
483
|
+
options.push({
|
|
484
|
+
value: opt.value,
|
|
485
|
+
label: opt.label || opt.textContent || opt.value
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
return options;
|
|
489
|
+
}
|
|
490
|
+
connectFormEventListeners() {
|
|
491
|
+
var _a, _b, _c;
|
|
492
|
+
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.contributeToFormData);
|
|
493
|
+
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.addEventListener('submit', this.onSubmitForm, { capture: true });
|
|
494
|
+
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.addEventListener('reset', this.onResetForm);
|
|
495
|
+
}
|
|
496
|
+
connectedCallback() {
|
|
497
|
+
this.connectFormEventListeners();
|
|
498
|
+
this.setupDatalistObserver();
|
|
499
|
+
if (this.autofocus && !RInput.autofocusHandled) {
|
|
500
|
+
RInput.autofocusHandled = true;
|
|
501
|
+
queueMicrotask(() => { var _a; return (_a = this.host.querySelector('input[autofocus]')) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true }); });
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
disconnectedCallback() {
|
|
505
|
+
var _a;
|
|
506
|
+
this.disconnectFormEventListeners();
|
|
507
|
+
this.disconnectDatalistObserver();
|
|
508
|
+
(_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.removeEventListener('beforeinput', this.onBeforeInput);
|
|
509
|
+
}
|
|
510
|
+
setupDatalistObserver() {
|
|
511
|
+
this.extractSlottedDatalistOptions();
|
|
512
|
+
if (typeof MutationObserver === 'undefined') {
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
this.datalistObserver = new MutationObserver((mutations) => {
|
|
516
|
+
for (const mutation of mutations) {
|
|
517
|
+
if (mutation.type === 'childList') {
|
|
518
|
+
this.extractSlottedDatalistOptions();
|
|
519
|
+
break;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
this.datalistObserver.observe(this.host, {
|
|
524
|
+
childList: true,
|
|
525
|
+
subtree: false
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
disconnectDatalistObserver() {
|
|
529
|
+
if (this.datalistObserver) {
|
|
530
|
+
this.datalistObserver.disconnect();
|
|
531
|
+
this.datalistObserver = null;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
disconnectFormEventListeners() {
|
|
535
|
+
var _a, _b, _c;
|
|
536
|
+
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('formdata', this.contributeToFormData);
|
|
537
|
+
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('submit', this.onSubmitForm);
|
|
538
|
+
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('reset', this.onResetForm);
|
|
539
|
+
}
|
|
540
|
+
handleValueChange() {
|
|
541
|
+
if (!this.isResetting) {
|
|
542
|
+
this.validateFormElement(this.nativeElement);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
handleTypeChange() {
|
|
546
|
+
if (this.nativeElement) {
|
|
547
|
+
this.setValue(this.nativeElement.value);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
render() {
|
|
551
|
+
const { name, placeholder, required, fieldIndicator, maxlength, minlength, min, max, value, disabled, form, pattern, invalid, valid, hint, label, internal, uniqueId, autocomplete, readonly, autofocus, passwordrules, enterkeyhint, spellcheck, autocapitalize, validityMarker } = this;
|
|
552
|
+
// Collect any native input attributes that were set on the host element
|
|
553
|
+
const passthroughAttrs = this.collectNativeAttributes();
|
|
554
|
+
// Combine options from prop and slotted datalist (prop takes precedence)
|
|
555
|
+
const options = [...(this.slottedOptions || [])];
|
|
556
|
+
const hasDatalist = options.length > 0;
|
|
557
|
+
const inputAttrs = Object.assign(Object.assign({ disabled,
|
|
558
|
+
readonly,
|
|
559
|
+
required,
|
|
560
|
+
label,
|
|
561
|
+
name,
|
|
562
|
+
placeholder,
|
|
563
|
+
maxlength,
|
|
564
|
+
minlength,
|
|
565
|
+
min,
|
|
566
|
+
max,
|
|
567
|
+
form,
|
|
568
|
+
pattern,
|
|
569
|
+
autocomplete, autofocus: autofocus || null, passwordrules,
|
|
570
|
+
enterkeyhint,
|
|
571
|
+
autocapitalize,
|
|
572
|
+
spellcheck, inputmode: this.inputmode || null, id: uniqueId }, passthroughAttrs), {
|
|
573
|
+
// Component-controlled values always win
|
|
574
|
+
'data-value': value, 'aria-invalid': `${invalid || false}`, 'aria-required': `${required || false}`, 'aria-describedby': this.ariaDescribedBy,
|
|
575
|
+
// list attribute: use internal datalist when options provided, otherwise use passthrough value (explicit takes precedence)
|
|
576
|
+
list: hasDatalist ? this.datalistId : (passthroughAttrs.list || null)
|
|
577
|
+
});
|
|
578
|
+
const labelAttr = label ? {
|
|
579
|
+
id: `${uniqueId}-label`,
|
|
580
|
+
fieldIndicator
|
|
581
|
+
} : {};
|
|
582
|
+
const renderValidationMarker = () => {
|
|
583
|
+
const icons = {
|
|
584
|
+
valid: 'circled-check',
|
|
585
|
+
invalid: 'circled-exclamation-mark'
|
|
586
|
+
};
|
|
587
|
+
const colors = {
|
|
588
|
+
valid: '--r-status-success-regular',
|
|
589
|
+
invalid: '--r-status-error-regular'
|
|
590
|
+
};
|
|
591
|
+
const shouldShowValidMarker = !!validityMarker && !!valid && !!value;
|
|
592
|
+
const shouldShowInvalidMarker = !!validityMarker && !!invalid;
|
|
593
|
+
if (!shouldShowValidMarker && !shouldShowInvalidMarker)
|
|
594
|
+
return null;
|
|
595
|
+
const iconName = shouldShowInvalidMarker ? icons.invalid : icons.valid;
|
|
596
|
+
const iconColor = shouldShowInvalidMarker ? colors.invalid : colors.valid;
|
|
597
|
+
return h("r-icon", { class: "r-input--validation-icon", "aria-hidden": "true", size: "s", name: iconName, color: iconColor });
|
|
598
|
+
};
|
|
599
|
+
return (h(Host, { onClick: this.handleClick, onKeyup: this.handleKeyup, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, h("div", { class: internal ? 'visually-hidden' : 'r-input--label-container' }, h("label", { htmlFor: uniqueId }, label ?
|
|
600
|
+
h("r-label", Object.assign({ class: "r-input--label" }, labelAttr), label)
|
|
601
|
+
:
|
|
602
|
+
h("slot", { name: "label" })), h("slot", { name: "popover" })), hint &&
|
|
603
|
+
h("r-hint", { id: `${uniqueId}-hint`, role: "note" }, hint), h("div", { class: "r-input--container" }, h("slot", { name: "leading" }), h("input", Object.assign({ class: "r-input--input", type: this.type }, inputAttrs, { ref: this.setNativeInputRef, value: this.value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onInvalid: this.onInvalid, onKeyDown: this.onKeyDown, onKeyUp: this.onKeyUp, onSelect: this.onSelect })), hasDatalist && (h("datalist", { ref: (el) => el && (el.id = this.datalistId) }, options.map((option) => (h("option", { value: option.value }, option.label || option.value))))), h("div", { class: "r-input--trailing" }, this.readonly &&
|
|
604
|
+
h("r-icon", { class: "r-input--readonly-icon", name: "pen-disabled", size: "s" }), renderValidationMarker(), this.hasTrailingSlot &&
|
|
605
|
+
h("slot", { name: "trailing" }))), h("div", { id: `${uniqueId}-message`, "aria-live": !internal ? 'polite' : null, class: !internal ? 'r-input--message' : 'visually-hidden' }, h("slot", { name: "message" }, this.hasMessage && h("r-hint", { variant: valid ? 'success' : 'error' }, this.hasError && this.error, this.hasValidationError && (this.customErrorMessage || this.validityMessage))))));
|
|
606
|
+
}
|
|
607
|
+
get host() { return getElement(this); }
|
|
608
|
+
static get watchers() { return {
|
|
609
|
+
"value": ["handleValueChange"],
|
|
610
|
+
"type": ["handleTypeChange"]
|
|
611
|
+
}; }
|
|
612
|
+
};
|
|
613
|
+
RInput.autofocusHandled = false;
|
|
614
|
+
RInput.style = inputCss;
|
|
615
|
+
|
|
616
|
+
export { RInput as r_input };
|