@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,277 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BnETQtSf.js');
|
|
4
|
+
|
|
5
|
+
const tabsCss = ":host{display:block;margin-top:var(--r-spacing-150, 1.5rem)}";
|
|
6
|
+
|
|
7
|
+
const RTabs = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
this.rChange = index.createEvent(this, "rChange");
|
|
11
|
+
this.activeTab = null;
|
|
12
|
+
}
|
|
13
|
+
/** `<r-tab>` group of elements */
|
|
14
|
+
get tabElements() {
|
|
15
|
+
var _a;
|
|
16
|
+
return (_a = this.host.querySelector('r-tabs-list')) === null || _a === void 0 ? void 0 : _a.querySelectorAll('r-tab');
|
|
17
|
+
}
|
|
18
|
+
/** `<r-tab-panel>` group of elements */
|
|
19
|
+
get panelElements() {
|
|
20
|
+
return this.host.querySelectorAll(':scope > r-tab-panel');
|
|
21
|
+
}
|
|
22
|
+
/** Active tab element */
|
|
23
|
+
get activeTabElement() {
|
|
24
|
+
return this.activeTab || this.host.querySelector('r-tab[active]');
|
|
25
|
+
}
|
|
26
|
+
/** Check if active tab element exists */
|
|
27
|
+
get hasActiveTabElement() {
|
|
28
|
+
return this.activeTabElement !== null;
|
|
29
|
+
}
|
|
30
|
+
/** Check if active tab element is disabled */
|
|
31
|
+
get isActiveTabElementDisabled() {
|
|
32
|
+
var _a;
|
|
33
|
+
return ((_a = this.activeTabElement) === null || _a === void 0 ? void 0 : _a.disabled) || false;
|
|
34
|
+
}
|
|
35
|
+
get isStructureCorrect() {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
return Boolean(((_a = this.tabElements) === null || _a === void 0 ? void 0 : _a.length) && ((_b = this.panelElements) === null || _b === void 0 ? void 0 : _b.length));
|
|
38
|
+
}
|
|
39
|
+
get isMissingPanel() {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
return ((_a = this.panelElements) === null || _a === void 0 ? void 0 : _a.length) < ((_b = this.tabElements) === null || _b === void 0 ? void 0 : _b.length);
|
|
42
|
+
}
|
|
43
|
+
get isDisabledPanel() {
|
|
44
|
+
return Boolean(Array.from(this.panelElements).find(panel => panel.hasAttribute('disabled')));
|
|
45
|
+
}
|
|
46
|
+
_disableTabIfPanelMissing() {
|
|
47
|
+
var _a;
|
|
48
|
+
if (!this.isMissingPanel)
|
|
49
|
+
return;
|
|
50
|
+
(_a = this.tabElements) === null || _a === void 0 ? void 0 : _a.forEach((tab, index) => {
|
|
51
|
+
if (!this.panelElements[index]) {
|
|
52
|
+
tab.disabled = true;
|
|
53
|
+
tab.setAttribute('disabled', 'true');
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
get tabGroupsAmount() {
|
|
59
|
+
return document.querySelectorAll('r-tabs').length;
|
|
60
|
+
}
|
|
61
|
+
markGroupsWithIndex() {
|
|
62
|
+
document.querySelectorAll('r-tabs').forEach((el, index) => {
|
|
63
|
+
el.setAttribute('data-group', `${index}`);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
_connectTabsAndPanelsById() {
|
|
67
|
+
this.markGroupsWithIndex();
|
|
68
|
+
// Connect tabs and panels with id's
|
|
69
|
+
this.tabElements.forEach((tab, index) => {
|
|
70
|
+
var _a, _b;
|
|
71
|
+
const label = this.transliterateToKebabCase(tab.textContent);
|
|
72
|
+
// Unique id per each tab-panel pair
|
|
73
|
+
const tabId = `r-tab-${label}`;
|
|
74
|
+
const panelId = `r-tab-panel-${label}`;
|
|
75
|
+
// Assign `id` and `panel-id` to each tab
|
|
76
|
+
tab.setAttribute('id', tabId);
|
|
77
|
+
tab.setAttribute('panel-id', panelId);
|
|
78
|
+
// Assign `tab-id` and `id` to each panel
|
|
79
|
+
(_a = this.panelElements[index]) === null || _a === void 0 ? void 0 : _a.setAttribute('tab-id', tabId);
|
|
80
|
+
(_b = this.panelElements[index]) === null || _b === void 0 ? void 0 : _b.setAttribute('id', panelId);
|
|
81
|
+
return this;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
_disableTabIfPanelDisabled() {
|
|
85
|
+
if (!this.isDisabledPanel)
|
|
86
|
+
return;
|
|
87
|
+
this.panelElements.forEach(panel => {
|
|
88
|
+
if (panel.hasAttribute('disabled')) {
|
|
89
|
+
const tabEl = Array.from(this.tabElements).find(tab => tab.getAttribute('id') === panel.getAttribute('tab-id'));
|
|
90
|
+
tabEl.setAttribute('disabled', 'true');
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
transliterateToKebabCase(label) {
|
|
95
|
+
// Normalize and replace accents/diacritics
|
|
96
|
+
let latinLabel = label.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
97
|
+
// Replace common non-Latin characters with approximate Latin equivalents
|
|
98
|
+
latinLabel = latinLabel
|
|
99
|
+
.replace(/ß/g, "ss") // German Eszett
|
|
100
|
+
.replace(/æ/g, "ae") // Scandinavian
|
|
101
|
+
.replace(/ø/g, "o") // Scandinavian
|
|
102
|
+
.replace(/đ/g, "d") // Croatian/Serbian
|
|
103
|
+
.replace(/ł/g, "l"); // Polish
|
|
104
|
+
latinLabel = latinLabel.toLowerCase();
|
|
105
|
+
// Replace spaces and underscores with dashes
|
|
106
|
+
latinLabel = latinLabel.replace(/[ _]+/g, "-");
|
|
107
|
+
// Remove non-alphanumeric and non-dash characters
|
|
108
|
+
latinLabel = latinLabel.replace(/[^a-z0-9-]/g, "");
|
|
109
|
+
// Remove consecutive dashes and trim
|
|
110
|
+
latinLabel = latinLabel.replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
111
|
+
return latinLabel;
|
|
112
|
+
}
|
|
113
|
+
get tabIdFromUrl() {
|
|
114
|
+
const url = new URL(window.location.href);
|
|
115
|
+
return url.searchParams.get('tab') || null;
|
|
116
|
+
}
|
|
117
|
+
get tabsGroupFromUrl() {
|
|
118
|
+
const url = new URL(window.location.href);
|
|
119
|
+
return url.searchParams.get('tabs-group') || '0';
|
|
120
|
+
}
|
|
121
|
+
get groupFromData() {
|
|
122
|
+
return this.host.getAttribute('data-group');
|
|
123
|
+
}
|
|
124
|
+
_getTabElFromUrl() {
|
|
125
|
+
if (!this.navigation)
|
|
126
|
+
return;
|
|
127
|
+
const isCurrentGroup = this.groupFromData === this.tabsGroupFromUrl;
|
|
128
|
+
if (!isCurrentGroup)
|
|
129
|
+
return;
|
|
130
|
+
// Find the tab that matches the `tabId`
|
|
131
|
+
const tabEl = Array.from(this.tabElements).find(tab => tab.id === this.tabIdFromUrl);
|
|
132
|
+
if (!tabEl)
|
|
133
|
+
return null;
|
|
134
|
+
return tabEl;
|
|
135
|
+
}
|
|
136
|
+
_defineInitiallyActiveTab() {
|
|
137
|
+
if (this.tabIdFromUrl)
|
|
138
|
+
return this._getTabElFromUrl();
|
|
139
|
+
if (this.hasActiveTabElement && !this.isActiveTabElementDisabled)
|
|
140
|
+
return this.activeTabElement;
|
|
141
|
+
return this.host.querySelector('r-tab:not([disabled])');
|
|
142
|
+
}
|
|
143
|
+
_selectInitialTabAndPanel() {
|
|
144
|
+
const tabEl = this._defineInitiallyActiveTab();
|
|
145
|
+
tabEl && this._selectTab(tabEl);
|
|
146
|
+
}
|
|
147
|
+
_selectTab(tabEl) {
|
|
148
|
+
// Pass active tab to state
|
|
149
|
+
this.activeTab = tabEl;
|
|
150
|
+
// Mark active tab element
|
|
151
|
+
this.tabElements.forEach(element => {
|
|
152
|
+
element.active = element.id === tabEl.id;
|
|
153
|
+
element.active ? element.setAttribute('active', '') : element.removeAttribute('active');
|
|
154
|
+
});
|
|
155
|
+
// Mark active panel element
|
|
156
|
+
this.panelElements.forEach(element => {
|
|
157
|
+
element.active = element.id === tabEl.panelId;
|
|
158
|
+
element.active ? element.setAttribute('active', '') : element.removeAttribute('active');
|
|
159
|
+
});
|
|
160
|
+
// If URL contains tabId --> scroll active tab into view
|
|
161
|
+
if (this.tabIdFromUrl)
|
|
162
|
+
this.host.scrollIntoView({ behavior: 'smooth' });
|
|
163
|
+
}
|
|
164
|
+
handlePopState(event) {
|
|
165
|
+
var _a, _b;
|
|
166
|
+
if (!this.navigation)
|
|
167
|
+
return;
|
|
168
|
+
const tabId = (_a = event.state) === null || _a === void 0 ? void 0 : _a.tabId;
|
|
169
|
+
const tabsGroup = (_b = event.state) === null || _b === void 0 ? void 0 : _b.tabsGroup;
|
|
170
|
+
const isInGroup = tabsGroup === this.host.getAttribute('data-group');
|
|
171
|
+
if (!tabId)
|
|
172
|
+
window.location.reload();
|
|
173
|
+
if (!isInGroup)
|
|
174
|
+
return;
|
|
175
|
+
const tab = Array.from(this.tabElements).find(tab => tab.id === tabId);
|
|
176
|
+
if (!tab)
|
|
177
|
+
return;
|
|
178
|
+
this._selectTab(tab);
|
|
179
|
+
}
|
|
180
|
+
handleHistory(tab) {
|
|
181
|
+
const tabId = tab.getAttribute('id');
|
|
182
|
+
const tabsGroup = tab.closest('r-tabs').getAttribute('data-group');
|
|
183
|
+
const url = new URL(window.location.href);
|
|
184
|
+
url.searchParams.set('tab', tabId);
|
|
185
|
+
if (this.tabGroupsAmount > 1)
|
|
186
|
+
url.searchParams.set('tabs-group', tabsGroup);
|
|
187
|
+
history.pushState({ tabId, tabsGroup }, '', url.toString());
|
|
188
|
+
}
|
|
189
|
+
_changeFocusTab(tab, keycode) {
|
|
190
|
+
const tabs = Array.from(this.tabElements).filter(element => !element.disabled);
|
|
191
|
+
const index = tabs.indexOf(tab);
|
|
192
|
+
let nextTab;
|
|
193
|
+
switch (keycode) {
|
|
194
|
+
case 'ArrowLeft':
|
|
195
|
+
nextTab = index === 0 ? tabs[tabs.length - 1] : tabs[index - 1];
|
|
196
|
+
break;
|
|
197
|
+
case 'ArrowRight':
|
|
198
|
+
nextTab = index === tabs.length - 1 ? tabs[0] : tabs[index + 1];
|
|
199
|
+
break;
|
|
200
|
+
case 'Home':
|
|
201
|
+
nextTab = tabs[0];
|
|
202
|
+
break;
|
|
203
|
+
case 'End':
|
|
204
|
+
nextTab = tabs[tabs.length - 1];
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
if (nextTab) {
|
|
208
|
+
nextTab.focus();
|
|
209
|
+
this.scrollTabIntoView(nextTab);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
scrollTabIntoView(tab) {
|
|
213
|
+
var _a;
|
|
214
|
+
const tabsList = this.host.querySelector('r-tabs-list');
|
|
215
|
+
if (!tabsList)
|
|
216
|
+
return;
|
|
217
|
+
const container = (_a = tabsList.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.r-tabs-list--tabs-container');
|
|
218
|
+
if (!container)
|
|
219
|
+
return;
|
|
220
|
+
const containerRect = container.getBoundingClientRect();
|
|
221
|
+
const tabRect = tab.getBoundingClientRect();
|
|
222
|
+
// Check if tab is fully visible
|
|
223
|
+
const isFullyVisible = tabRect.left >= containerRect.left - 1 &&
|
|
224
|
+
tabRect.right <= containerRect.right + 1;
|
|
225
|
+
if (isFullyVisible)
|
|
226
|
+
return;
|
|
227
|
+
// Calculate scroll offset to center the tab
|
|
228
|
+
const centerOffset = (tabRect.left - containerRect.left) -
|
|
229
|
+
(containerRect.width / 2) +
|
|
230
|
+
(tabRect.width / 2);
|
|
231
|
+
container.scrollBy({
|
|
232
|
+
left: centerOffset,
|
|
233
|
+
behavior: 'smooth'
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
/** Listen for "click" event on `<r-tab>` */
|
|
237
|
+
tabChangeAction(event) {
|
|
238
|
+
event.stopPropagation();
|
|
239
|
+
const tab = event.target;
|
|
240
|
+
this._selectTab(tab);
|
|
241
|
+
if (this.navigation)
|
|
242
|
+
this.handleHistory(tab);
|
|
243
|
+
this.rChange.emit({ element: tab });
|
|
244
|
+
}
|
|
245
|
+
componentWillLoad() {
|
|
246
|
+
// If no tabs or no panels, skip the rest of initiation
|
|
247
|
+
if (!this.isStructureCorrect)
|
|
248
|
+
return;
|
|
249
|
+
// If panel is missing, tab is disabled
|
|
250
|
+
this._disableTabIfPanelMissing();
|
|
251
|
+
// Establish connection between tabs and panels through id
|
|
252
|
+
this._connectTabsAndPanelsById();
|
|
253
|
+
// If panel is disabled, tab is disabled
|
|
254
|
+
this._disableTabIfPanelDisabled();
|
|
255
|
+
// Active initial tab and panel
|
|
256
|
+
this._selectInitialTabAndPanel();
|
|
257
|
+
}
|
|
258
|
+
connectedCallback() {
|
|
259
|
+
// Listen for popstate events (when the user navigates back/forward)
|
|
260
|
+
window.addEventListener('popstate', this.handlePopState.bind(this));
|
|
261
|
+
}
|
|
262
|
+
disconnectedCallback() {
|
|
263
|
+
window.removeEventListener('popstate', this.handlePopState.bind(this));
|
|
264
|
+
}
|
|
265
|
+
/** Listen for "moveTabFocus" event on `<r-tab>` */
|
|
266
|
+
moveTabFocusAction(e) {
|
|
267
|
+
e.stopPropagation();
|
|
268
|
+
this._changeFocusTab(e.target, e.detail.keycode);
|
|
269
|
+
}
|
|
270
|
+
render() {
|
|
271
|
+
return (index.h(index.Host, { key: 'a1ff15e7b90774486932acd7035839fc8794e10b', class: "r-tabs" }, index.h("slot", { key: '4d8a00d7344c8cbc69896b43da740009fa54cab9' })));
|
|
272
|
+
}
|
|
273
|
+
get host() { return index.getElement(this); }
|
|
274
|
+
};
|
|
275
|
+
RTabs.style = tabsCss;
|
|
276
|
+
|
|
277
|
+
exports.r_tabs = RTabs;
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BnETQtSf.js');
|
|
4
|
+
var formData = require('./formData-B2DZyLxP.js');
|
|
5
|
+
|
|
6
|
+
const textareaCss = ":host{opacity:1;display:block;outline:none;--r-label--margin-bottom:0}:host(:focus-visible){outline:none}:host([resize=none]){--r-textarea--input--resize:none}:host([resize=both]){--r-textarea--input--resize:both}:host([resize=horizontal]){--r-textarea--input--resize:horizontal}:host([resize=vertical]){--r-textarea--input--resize:vertical}:host([resize=initial]){--r-textarea--input--resize:initial}:host([resize=inherit]){--r-textarea--input--resize:inherit}:host([invalid]:not([invalid=false])){--r-textarea--container--background-color:var(--r-status-error-soft, #fef6f6);--r-textarea--container--border-color:var(--r-status-error-regular, #b00c15)}.r-textarea--label-container{display:var(--r-textarea--label-container--display, flex);gap:var(--r-textarea--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-textarea--label-container--align-items, center);justify-content:var(--r-textarea--label-container--align-items, space-between)}.r-textarea--label-container ::slotted([slot=popover]){display:var(--r-textarea--popover--display, inline-flex);height:var(--r-textarea--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-textarea--popover--align-items, center);justify-content:var(--r-textarea--popover--justify-content, center);margin-right:var(--r-textarea--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-textarea--popover-trigger--min-width, var(--r-spacing-150, 1.5))}.r-textarea--input::placeholder{color:var(--r-textarea--input--placeholder--color, var(--r-text-soft, #686868))}.r-textarea--input{vertical-align:top;width:var(--r-textarea--input--width, 100%);max-width:var(--r-textarea--input--max-width, 100%);min-height:var(--r-textarea--input--min-height, 8.875em);font-family:var(--r-textarea--input--font-family, var(--r-font-family-text, system-ui));font-weight:var(--r-textarea--input--font-weight, var(--r-font-weight-regular, 400));font-size:var(--r-textarea--input--font-size, var(--r-font-size-400, 1rem));line-height:var(--r-textarea--input--line-height, var(--r-line-height-m, 1.5));color:var(--r-textarea--input--color, var(--r-text-regular, #282828));background-color:var(--r-textarea--input--background-color, transparent);opacity:var(--r-textarea--input--opacity, 1);border-width:var(--r-textarea--input--border-width, 0px);border-style:var(--r-textarea--input--border-style, solid);border-color:var(--r-textarea--input--border-color, var(--r-border-soft, #686868));border-radius:var(--r-textarea--input--border-radius, 0);box-sizing:var(--r-textarea--input--box-sizing, border-box);box-shadow:var(--r-textarea--input--box-shadow, none);padding:var(--r-textarea--input--padding, var(--r-textarea--input--padding-top, 0.688em) var(--r-textarea--input--padding-right, 0.625em) var(--r-textarea--input--padding-bottom, 0.688em) var(--r-textarea--input--padding-left, 0.625em));margin-top:var(--r-textarea--input--margin-top, 0);resize:var(--r-textarea--input--resize, both);z-index:var(--r-textarea--input--z-index, initial);outline:var(--r-textarea--input--outline, none);outline-offset:var(--r-textarea--input--outline-offset, 0);pointer-events:var(--r-textarea--input--pointer-events, auto);cursor:var(--r-textarea--input--cursor, inherit)}.r-textarea--container{display:flex;align-items:start;overflow:visible;background-color:var(--r-textarea--container--background-color, var(--r-background-interactive-softest, #f7f7f7));border-width:var(--r-textarea--container--border-width, 1px);border-style:var(--r-textarea--container--border-style, solid);border-color:var(--r-textarea--container--border-color, var(--r-border-soft, #686868));padding:var(--r-textarea--container--padding, 0);margin-top:var(--r-textarea--container--margin-top, var(--r-spacing-025, 0.25rem));box-shadow:var(--r-textarea--container--box-shadow, none);outline:var(--r-textarea--container--outline, none);outline-offset:var(--r-textarea--container--outline-offset, none)}.r-textarea--container[data-readonly=true]{--r-textarea--container--background-color:var(--r-background-soft, #f3f1f0);--r-textarea--container--border-color:transparent transparent var(--r-border-soft, #686868) transparent;--r-textarea--container--cursor:text}.r-textarea--container:hover:not([data-disabled=true]):not([data-readonly=true]){--r-textarea--container--background-color:var(--r-background-interactive-hovered)}.r-textarea--container:active:not([data-disabled=true]):not([data-readonly=true]){--r-textarea--container--background-color:var(--r-background-interactive-pressed)}.r-textarea--container:focus-within{--r-textarea--container--box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);--r-textarea--container--outline:2px solid var(--r-border-focused, #0071e3);--r-textarea--container--outline-offset:2px}.r-textarea--trailing{display:var(--r-textarea--trailing--display, flex);margin-top:var(--r-textarea--trailing--margin-top, 0.688em);margin-right:var(--r-textarea--trailing--margin-right, 0.625em);margin-left:var(--r-textarea--trailing--margin-left, auto);gap:var(--r-textarea--trailing--gap, 0.625rem)}.r-textarea--trailing:empty{display:none}.r-textarea--readonly-icon{color:var(--r-textarea--readonly-icon--color, var(--r-icon-soft, #686868))}.r-textarea--messages{display:flex;gap:var(--r-textarea--messages--gap, var(--r-spacing-025, 0.25rem))}.r-textarea--messages--counter{margin-left:auto}.r-textarea--messages:has(r-hint){margin-top:var(--r-spacing-025, 0.25rem)}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
|
|
7
|
+
|
|
8
|
+
const RTextarea = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
index.registerInstance(this, hostRef);
|
|
11
|
+
this.rChange = index.createEvent(this, "rChange");
|
|
12
|
+
this.rInput = index.createEvent(this, "rInput");
|
|
13
|
+
this.rReset = index.createEvent(this, "rReset");
|
|
14
|
+
this.rValidate = index.createEvent(this, "rValidate");
|
|
15
|
+
/** Represents the current value of the `<textarea>`, reflecting the content entered
|
|
16
|
+
* by the user or provided programmatically. */
|
|
17
|
+
this.value = this.textareaSlotValue;
|
|
18
|
+
/** Specifies a short hint that describes the expected value of the `<textarea>`,
|
|
19
|
+
* displayed when it is empty. */
|
|
20
|
+
this.placeholder = 'Provide an input';
|
|
21
|
+
/** Controls the resizability of the `<textarea>`, allowing
|
|
22
|
+
* or preventing the user from resizing it. */
|
|
23
|
+
this.resize = 'none';
|
|
24
|
+
/** Custom message when the character limit is reached to alert screen reader users. */
|
|
25
|
+
this.characterLimitReachedMessage = "You've reached the character limit.";
|
|
26
|
+
/** Custom validity state */
|
|
27
|
+
this.validityState = null;
|
|
28
|
+
/** Custom validity message */
|
|
29
|
+
this.validityMessage = '';
|
|
30
|
+
/**
|
|
31
|
+
* Initial attributes state
|
|
32
|
+
* */
|
|
33
|
+
this.initial = {};
|
|
34
|
+
/** Unique id */
|
|
35
|
+
this.uniqueId = `r-textarea-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
36
|
+
this.onInput = event => {
|
|
37
|
+
if (this.readonly)
|
|
38
|
+
return;
|
|
39
|
+
this.value = event.target.value;
|
|
40
|
+
this.validateFormElement(this.nativeElement);
|
|
41
|
+
const { host, value } = this;
|
|
42
|
+
this.rInput.emit({ element: host, value });
|
|
43
|
+
if (value.length === this.maxlength && this.characterLimitReachedAlert) {
|
|
44
|
+
this.characterLimitReachedAlert.innerText = this.characterLimitReachedMessage;
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
this.characterLimitReachedAlert.innerText = '';
|
|
47
|
+
}, 2000);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
this.onChange = event => {
|
|
51
|
+
if (this.readonly)
|
|
52
|
+
return;
|
|
53
|
+
this.value = event.target.value;
|
|
54
|
+
this.validateFormElement(this.nativeElement);
|
|
55
|
+
const { host, value } = this;
|
|
56
|
+
this.rChange.emit({ element: host, value });
|
|
57
|
+
};
|
|
58
|
+
this.onSubmitForm = (event) => {
|
|
59
|
+
if (this.isNoValidate)
|
|
60
|
+
return;
|
|
61
|
+
this.validateFormElement(this.nativeElement);
|
|
62
|
+
if (this.invalid) {
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
event.stopPropagation();
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
this.onResetForm = () => {
|
|
68
|
+
if (this.readonly)
|
|
69
|
+
return;
|
|
70
|
+
// Return to initial state
|
|
71
|
+
this.validityState = null;
|
|
72
|
+
this.validityMessage = null;
|
|
73
|
+
this.value = this.initial['value'];
|
|
74
|
+
this.invalid = this.initial['invalid'];
|
|
75
|
+
this.valid = !this.invalid;
|
|
76
|
+
const { host, value } = this;
|
|
77
|
+
this.rReset.emit({ element: host, value });
|
|
78
|
+
};
|
|
79
|
+
this.getValidityStateData = (element) => {
|
|
80
|
+
let validityState = '';
|
|
81
|
+
let validityMessage = '';
|
|
82
|
+
for (const state in element.validity) {
|
|
83
|
+
if (element.validity[state]) {
|
|
84
|
+
validityState = state;
|
|
85
|
+
if (this[state + 'Message']) {
|
|
86
|
+
validityMessage = this[state + 'Message'];
|
|
87
|
+
return { validityState, validityMessage };
|
|
88
|
+
}
|
|
89
|
+
validityMessage = element.validationMessage;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return { validityState, validityMessage };
|
|
93
|
+
};
|
|
94
|
+
this.validateFormElement = (element = null) => {
|
|
95
|
+
if (element === null)
|
|
96
|
+
return;
|
|
97
|
+
if (this.isNoValidate)
|
|
98
|
+
return;
|
|
99
|
+
if (this.error)
|
|
100
|
+
return;
|
|
101
|
+
const { validityState, validityMessage } = this.getValidityStateData(element);
|
|
102
|
+
this.validityState = validityState;
|
|
103
|
+
this.validityMessage = validityMessage;
|
|
104
|
+
const isValid = this.validityState === 'valid';
|
|
105
|
+
this.valid = isValid;
|
|
106
|
+
this.invalid = !isValid;
|
|
107
|
+
this.rValidate.emit({
|
|
108
|
+
state: this.validityState,
|
|
109
|
+
message: this.validityMessage
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
this.contributeToFormData = (event) => {
|
|
113
|
+
formData.appendControlToFormData(this.nativeElement || this.host, event.formData);
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
/** Sets the value of the element. */
|
|
117
|
+
async setValue(value) {
|
|
118
|
+
if (this.readonly)
|
|
119
|
+
return;
|
|
120
|
+
this.value = value;
|
|
121
|
+
}
|
|
122
|
+
/** Gets the value of the element. */
|
|
123
|
+
async getValue() {
|
|
124
|
+
return this.value;
|
|
125
|
+
}
|
|
126
|
+
/** Resets value and validity state to initial. */
|
|
127
|
+
async reset() {
|
|
128
|
+
if (this.readonly)
|
|
129
|
+
return;
|
|
130
|
+
this.validityState = null;
|
|
131
|
+
this.validityMessage = null;
|
|
132
|
+
this.value = this.initial['value'];
|
|
133
|
+
this.invalid = this.initial['invalid'];
|
|
134
|
+
this.valid = !this.invalid;
|
|
135
|
+
}
|
|
136
|
+
/** Sets focus on the element. */
|
|
137
|
+
async setFocus() {
|
|
138
|
+
this.nativeElement.focus();
|
|
139
|
+
}
|
|
140
|
+
/** Removes focus from the element. */
|
|
141
|
+
async setBlur() {
|
|
142
|
+
this.nativeElement.blur();
|
|
143
|
+
}
|
|
144
|
+
/** Sets the start and end positions of the text selection. */
|
|
145
|
+
async setSelectionRange(start, end, direction) {
|
|
146
|
+
this.nativeElement.setSelectionRange(start, end, direction);
|
|
147
|
+
}
|
|
148
|
+
/** Replaces the current text selection with a new string. */
|
|
149
|
+
async setRangeText(replacement, start, end, selectionMode) {
|
|
150
|
+
this.nativeElement.setRangeText(replacement, start, end, selectionMode);
|
|
151
|
+
}
|
|
152
|
+
/** Validates an element, displays provided message in case value is invalid. */
|
|
153
|
+
async setCustomValidity(message) {
|
|
154
|
+
this.customErrorMessage = message;
|
|
155
|
+
this.validateFormElement(this.nativeElement);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Validates the textarea without triggering UI and returns a boolean indicating its validity.
|
|
159
|
+
* @returns A boolean indicating whether the textarea is valid.
|
|
160
|
+
*/
|
|
161
|
+
async checkValidity() {
|
|
162
|
+
const { validityState } = this.getValidityStateData(this.nativeElement);
|
|
163
|
+
return validityState === 'valid';
|
|
164
|
+
}
|
|
165
|
+
/** Validates an element and displays validity state. */
|
|
166
|
+
async reportValidity() {
|
|
167
|
+
this.validateFormElement(this.nativeElement);
|
|
168
|
+
}
|
|
169
|
+
/** Identify wrapping form element. */
|
|
170
|
+
get parentFormEl() {
|
|
171
|
+
return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
|
|
172
|
+
}
|
|
173
|
+
get ariaDescribedBy() {
|
|
174
|
+
const describedBy = `${this.uniqueId}-message`;
|
|
175
|
+
return this.hint ? `${this.uniqueId}-hint ${describedBy}` : describedBy;
|
|
176
|
+
}
|
|
177
|
+
get hasError() {
|
|
178
|
+
var _a;
|
|
179
|
+
return this.invalid && !!((_a = this.error) === null || _a === void 0 ? void 0 : _a.length);
|
|
180
|
+
}
|
|
181
|
+
get hasValidationError() {
|
|
182
|
+
if (!this.validityState)
|
|
183
|
+
return false;
|
|
184
|
+
const isInvalid = this.validityState !== 'valid';
|
|
185
|
+
const hasMessage = !!(this.customErrorMessage || this.validityMessage);
|
|
186
|
+
return isInvalid && hasMessage;
|
|
187
|
+
}
|
|
188
|
+
get hasMessage() {
|
|
189
|
+
return this.hasError || this.hasValidationError;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Determine whether this element should be ignored
|
|
193
|
+
* during Constraint Validation API validation.
|
|
194
|
+
* */
|
|
195
|
+
get isNoValidate() {
|
|
196
|
+
var _a;
|
|
197
|
+
return (((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.hasAttribute('novalidate')) ||
|
|
198
|
+
this.novalidate ||
|
|
199
|
+
false);
|
|
200
|
+
}
|
|
201
|
+
get hasTrailingSlot() {
|
|
202
|
+
return !!this.host.querySelector('[slot="trailing"]');
|
|
203
|
+
}
|
|
204
|
+
get textareaSlotValue() {
|
|
205
|
+
return this.host.textContent;
|
|
206
|
+
}
|
|
207
|
+
connectFormEventListeners() {
|
|
208
|
+
var _a, _b, _c;
|
|
209
|
+
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.contributeToFormData);
|
|
210
|
+
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.addEventListener('submit', this.onSubmitForm, { capture: true });
|
|
211
|
+
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.addEventListener('reset', this.onResetForm);
|
|
212
|
+
}
|
|
213
|
+
disconnectFormEventListeners() {
|
|
214
|
+
var _a, _b, _c;
|
|
215
|
+
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('formdata', this.contributeToFormData);
|
|
216
|
+
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('submit', this.onSubmitForm);
|
|
217
|
+
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('reset', this.onResetForm);
|
|
218
|
+
}
|
|
219
|
+
componentWillLoad() {
|
|
220
|
+
this.initial['value'] = this.value;
|
|
221
|
+
this.initial['invalid'] = this.invalid;
|
|
222
|
+
}
|
|
223
|
+
connectedCallback() {
|
|
224
|
+
this.connectFormEventListeners();
|
|
225
|
+
}
|
|
226
|
+
disconnectedCallback() {
|
|
227
|
+
this.disconnectFormEventListeners();
|
|
228
|
+
}
|
|
229
|
+
render() {
|
|
230
|
+
const { name, rows, cols, placeholder, required, showCounter, maxlength, minlength, form, value, disabled, resize, hint, invalid, label, uniqueId, fieldIndicator, readonly } = this;
|
|
231
|
+
const textareaAttrs = {
|
|
232
|
+
name,
|
|
233
|
+
rows,
|
|
234
|
+
cols,
|
|
235
|
+
placeholder,
|
|
236
|
+
required,
|
|
237
|
+
maxlength,
|
|
238
|
+
minlength,
|
|
239
|
+
form,
|
|
240
|
+
value,
|
|
241
|
+
disabled,
|
|
242
|
+
resize,
|
|
243
|
+
readonly,
|
|
244
|
+
id: uniqueId,
|
|
245
|
+
'aria-describedby': this.ariaDescribedBy,
|
|
246
|
+
'aria-invalid': `${!!invalid}`,
|
|
247
|
+
'aria-required': `${!!required}`
|
|
248
|
+
};
|
|
249
|
+
const labelAttr = label ? {
|
|
250
|
+
label,
|
|
251
|
+
fieldIndicator
|
|
252
|
+
} : {};
|
|
253
|
+
// Filter out event listener properties based on naming convention.
|
|
254
|
+
// Pass them to native element.
|
|
255
|
+
const eventListeners = Object.entries(this).reduce((acc, [key, value]) => {
|
|
256
|
+
if (typeof value === 'function' && key.startsWith('on')) {
|
|
257
|
+
acc[key] = value;
|
|
258
|
+
}
|
|
259
|
+
return acc;
|
|
260
|
+
}, {});
|
|
261
|
+
return (index.h(index.Host, null, index.h("div", { class: "r-textarea--label-container" }, index.h("label", { htmlFor: uniqueId }, label &&
|
|
262
|
+
index.h("r-label", Object.assign({ id: `${uniqueId}-label` }, labelAttr), label)), index.h("slot", { name: "popover" })), hint &&
|
|
263
|
+
index.h("r-hint", { id: `${uniqueId}-hint`, role: "note" }, hint), index.h("div", { class: "r-textarea--container", "data-disabled": `${!!disabled}`, "data-readonly": `${!!readonly}` }, index.h("textarea", Object.assign({ class: "r-textarea--input" }, textareaAttrs, eventListeners, { ref: el => this.nativeElement = el, onChange: this.onChange, onInput: this.onInput })), index.h("div", { class: "r-textarea--trailing" }, this.readonly && index.h("r-icon", { class: "r-textarea--readonly-icon", name: "pen-disabled", size: "s" }), this.hasTrailingSlot && index.h("slot", { name: "trailing" }))), index.h("div", { class: "r-textarea--messages" }, index.h("r-hint", { "aria-live": "polite", "aria-atomic": "true", id: `${uniqueId}-message`, class: !this.hasMessage && 'visually-hidden', variant: invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && (this.customErrorMessage || this.validityMessage)), showCounter && index.h("r-hint", { "aria-hidden": true, class: "r-textarea--messages--counter" }, `${value.length}${maxlength ? '/' : ''}${maxlength}`), maxlength &&
|
|
264
|
+
index.h("div", { class: "visually-hidden", ref: el => this.characterLimitReachedAlert = el, "aria-live": "assertive" }))));
|
|
265
|
+
}
|
|
266
|
+
get host() { return index.getElement(this); }
|
|
267
|
+
};
|
|
268
|
+
RTextarea.style = textareaCss;
|
|
269
|
+
|
|
270
|
+
exports.r_textarea = RTextarea;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BnETQtSf.js');
|
|
4
|
+
|
|
5
|
+
const toastGroupCss = ":host([data-visually-hidden=true]){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}:host{display:var(--display, block);position:var(--position, fixed);top:var(--top, 0);right:var(--right, 0);bottom:var(--bottom, auto);left:var(--left, auto);overflow:var(--overflow, hidden);overflow-y:var(--overflow-y, auto);width:var(--width, 352px);max-height:var(--max-height, calc(100vh - 64px));padding-right:var(--padding-right, 32px);padding-top:var(--padding-top, 16px);padding-bottom:var(--padding-bottom, 32px);z-index:var(--z-index, 1)}:host ::slotted(r-toast){margin-top:var(--r-spacing-100, 1rem)}.r-toast-group{position:relative;display:var(--r-toast-group--display, flex);flex-direction:var(--r-toast-group--flex-direction, column);justify-content:var(--r-toast-group--justify-content, flex-start)}";
|
|
6
|
+
|
|
7
|
+
const ToastGroup = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
this.updateHiddenState = () => {
|
|
11
|
+
this.host.setAttribute('data-visually-hidden', `${!this.hasChildren}`);
|
|
12
|
+
};
|
|
13
|
+
this.observeSlotContentChange = () => {
|
|
14
|
+
this.observer = new MutationObserver(async (mutations) => {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
this.updateHiddenState();
|
|
17
|
+
const addedToast = mutations
|
|
18
|
+
.flatMap(mutation => Array.from(mutation.addedNodes))
|
|
19
|
+
.find(node => node.nodeName === 'R-TOAST');
|
|
20
|
+
if (addedToast) {
|
|
21
|
+
// Measure height then reveal for smooth animation
|
|
22
|
+
await ((_a = addedToast.measureAndPrepareHeight) === null || _a === void 0 ? void 0 : _a.call(addedToast));
|
|
23
|
+
await ((_b = addedToast.reveal) === null || _b === void 0 ? void 0 : _b.call(addedToast));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
this.observer.observe(this.host, {
|
|
27
|
+
childList: true,
|
|
28
|
+
subtree: true
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
get hasChildren() {
|
|
33
|
+
return this.host.querySelectorAll('r-toast').length > 0;
|
|
34
|
+
}
|
|
35
|
+
componentWillLoad() {
|
|
36
|
+
this.updateHiddenState();
|
|
37
|
+
this.observeSlotContentChange();
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
return (index.h(index.Host, { key: '9924942e0ad98ba7e26b0b816bc79546c43c6064' }, index.h("div", { key: 'ea11ad2d95cb84e15773ab1278ae2229a6fda25d', class: "r-toast-group" }, index.h("slot", { key: '047c070360fe1649a96b867456228892fa75cd26' }))));
|
|
41
|
+
}
|
|
42
|
+
get host() { return index.getElement(this); }
|
|
43
|
+
};
|
|
44
|
+
ToastGroup.style = toastGroupCss;
|
|
45
|
+
|
|
46
|
+
exports.r_toast_group = ToastGroup;
|