@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,522 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-CTxpqopm.js';
|
|
2
|
+
import { a as appendControlToFormData } from './formData-DvLT8-y3.js';
|
|
3
|
+
|
|
4
|
+
function getDefaultExportFromCjs (x) {
|
|
5
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
var dayjs_min$1 = {exports: {}};
|
|
9
|
+
|
|
10
|
+
var dayjs_min = dayjs_min$1.exports;
|
|
11
|
+
|
|
12
|
+
var hasRequiredDayjs_min;
|
|
13
|
+
|
|
14
|
+
function requireDayjs_min () {
|
|
15
|
+
if (hasRequiredDayjs_min) return dayjs_min$1.exports;
|
|
16
|
+
hasRequiredDayjs_min = 1;
|
|
17
|
+
(function (module, exports) {
|
|
18
|
+
!function(t,e){module.exports=e();}(dayjs_min,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
19
|
+
} (dayjs_min$1));
|
|
20
|
+
return dayjs_min$1.exports;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var dayjs_minExports = requireDayjs_min();
|
|
24
|
+
var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
25
|
+
|
|
26
|
+
var customParseFormat$2 = {exports: {}};
|
|
27
|
+
|
|
28
|
+
var customParseFormat$1 = customParseFormat$2.exports;
|
|
29
|
+
|
|
30
|
+
var hasRequiredCustomParseFormat;
|
|
31
|
+
|
|
32
|
+
function requireCustomParseFormat () {
|
|
33
|
+
if (hasRequiredCustomParseFormat) return customParseFormat$2.exports;
|
|
34
|
+
hasRequiredCustomParseFormat = 1;
|
|
35
|
+
(function (module, exports) {
|
|
36
|
+
!function(e,t){module.exports=t();}(customParseFormat$1,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return (e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t;}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e);}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},c={A:[o,function(e){this.afternoon=d(e,false);}],a:[o,function(e){this.afternoon=d(e,true);}],Q:[n,function(e){this.month=3*(e-1)+1;}],S:[n,function(e){this.milliseconds=100*+e;}],SS:[r,function(e){this.milliseconds=10*+e;}],SSS:[/\d{3}/,function(e){this.milliseconds=+e;}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[r,f("day")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r);}],w:[i,f("week")],ww:[r,f("week")],M:[i,f("month")],MM:[r,f("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t;}],Y:[/[+-]?\d+/,f("year")],YY:[r,function(e){this.year=a(e);}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\[|\]$/g,"");}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if("string"==typeof i)r+=i.length;else {var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,"");}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon;}}(t),t}}return function(e,t,n){n.p.customParseFormat=true,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if("string"==typeof a){var f=true===o[2],h=true===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date("")}}(t,a,r,n),this.init(),d&&true!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),s={};}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(""));}else i.call(this,e);};}}));
|
|
37
|
+
} (customParseFormat$2));
|
|
38
|
+
return customParseFormat$2.exports;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
var customParseFormatExports = requireCustomParseFormat();
|
|
42
|
+
var customParseFormat = /*@__PURE__*/getDefaultExportFromCjs(customParseFormatExports);
|
|
43
|
+
|
|
44
|
+
const inputDateCss = ":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-date--container--background-color:var(--r-background-soft, #f3f1f0);--r-input-date--container--border-color:transparent transparent var(--r-border-soft, #686868) transparent;--r-input-date--container--cursor:text}:host(:hover:not([disabled]:not([disabled=false])):not([readonly]:not([readonly=false]))){--r-input-date--container--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host(:active:not([disabled]:not([disabled=false])):not([readonly]:not([readonly=false]))){--r-input-date--container--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host([full-width]:not([full-width=false])){display:flex}:host([disabled]:not([disabled=false])){cursor:not-allowed;--r-input-date--container--opacity:0.4;--r-input-date--container--cursor:not-allowed;--r-input-date--container--pointer-events:none;--r-input-date--container--background-color:transparent}:host([invalid]:not([invalid=false])){--r-input-date--container--border-color:var(--r-status-error-regular, #b00c15);--r-input-date--container--background-color:var(--r-status-error-soft, #fef6f6)}.r-input-date{padding:var(--r-input-date--padding, 0);margin:var(--r-input-date--margin, 0);border:var(--r-input-date--border, none)}.r-input-date--legend-container{display:var(--r-input-date--legend-container--display, flex);gap:var(--r-input-date--legend-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-input-date--legend-container--align-items, center);justify-content:var(--r-input-date--label-container--align-items, space-between)}.r-input-date--legend-container ::slotted([slot=popover]){display:var(--r-input-date--popover--display, inline-flex);height:var(--r-input-date--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-input-date--popover--align-items, center);justify-content:var(--r-input-date--popover--justify-content, center);margin-right:var(--r-input-date--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-input-date--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-input-date--popover--trigger--min-height, var(--r-spacing-150, 1.5))}.r-input-date--legend{padding:var(--r-input-date--label--padding, 0)}.r-input-date--container{position:var(--r-input-date--container--position, relative);display:var(--r-input-date--container--display, flex);align-items:var(--r-input-date--container--align-items, center);height:var(--r-input-date--container--height, var(--r-spacing-275, 2.75rem));font-family:var(--r-input-date--container--font-family, var(--r-font-family-text, system-ui));background-color:var(--r-input-date--container--background-color, var(--r-background-softest, #fff));border-width:var(--r-input-date--container--border-width, 1px);border-style:var(--r-input-date--container--border-style, solid);border-color:var(--r-input-date--container--border-color, var(--r-border-soft, #686868));box-sizing:var(--r-input-date--container--box-sizing, border-box);box-shadow:var(--r-input-date--container--box-shadow, none);outline:var(--r-input-date--container--outline, none);outline-offset:var(--r-input-date--container--outline-offset, 0);padding-right:var(--r-input-date--container--padding-right, 0.7em);padding-left:var(--r-input-date--container--padding-left, 0.7em);opacity:var(--r-input-date--container--opacity, 1);pointer-events:var(--r-input-date--container--pointer-events, auto);cursor:var(--r-input-date--container--cursor, inherit);margin-top:var(--r-input-date--container--margin-top, var(--r-spacing-025, 0.25rem));gap:var(--r-input-date--leading--gap, 0.625rem)}.r-input-date--container:has(input:focus-within){--r-input-date--container--box-shadow:0 0 0 6px var(--r-border-focused-outlined);--r-input-date--container--outline:2px solid var(--r-border-focused);--r-input-date--container--outline-offset:2px}.r-input-date--calendar-icon{color:var(--r-input-date--leading--color, var(--r-icon-soft, #686868))}.r-input-date--inputs{display:var(--r-input-date--inputs--display, flex);align-items:var(--r-input-date--inputs--align-items, center)}.r-input-date--input{max-width:var(--r-input-date--input--max-width, 2.625rem);field-sizing:var(--r-input-date--input--field-sizing, content);outline:var(--r-input-date--input--outline, none);height:var(--r-input-date--input--height, 100%);font-family:var(--r-input-date--input--font-family, inherit);font-size:var(--r-input-date--input--font-size, var(--r-font-size-400, 1rem));background-color:var(--r-input-date--input--background-color, transparent);border:var(--r-input-date--input--border, none);padding:var(--r-input-date--input--padding, 0)}.r-input-date--input[data-date-type=DD]{--r-input-date--input--max-width:1.5rem}.r-input-date--input[data-date-type=MM]{--r-input-date--input--max-width:1.75rem}.r-input-date--delimiter{padding-inline:var(--r-input-date--delimiter--padding-inline, var(--r-spacing-025, 0.25rem));margin-top:var(--r-input-date--delimiter--margin-top, -0.25rem);color:var(--r-input-date--delimiter--color, var(--r-border-regular, #282828));font-size:var(--r-input-date--delimiter--font-size, var(--r-spacing-150, 1.5rem));font-weight:var(--r-input-date--delimiter--font-weight, 200)}.r-input-date--message{margin-top:var(--r-input-date--message--margin-top, var(--r-spacing-025, 0.25rem))}.r-input-date--message:empty{--r-input-date--message--margin-top:0}.r-input-date--trailing{display:var(--r-input-date--trailing--display, flex);margin-left:var(--r-input-date--trailing--margin-left, auto);align-items:var(--r-input-date--trailing--align-items, center);gap:var(--r-input-date--trailing--gap, 0.625rem)}.r-input-date--readonly-icon{color:var(--r-input-date--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}";
|
|
45
|
+
|
|
46
|
+
const InputDate = class {
|
|
47
|
+
constructor(hostRef) {
|
|
48
|
+
registerInstance(this, hostRef);
|
|
49
|
+
this.rValidate = createEvent(this, "rValidate");
|
|
50
|
+
this.rInput = createEvent(this, "rInput");
|
|
51
|
+
this.rChange = createEvent(this, "rChange");
|
|
52
|
+
this.rReset = createEvent(this, "rReset");
|
|
53
|
+
/** Specifies a date format */
|
|
54
|
+
this.format = 'DD/MM/YYYY';
|
|
55
|
+
/** The value of the date input */
|
|
56
|
+
this.value = '';
|
|
57
|
+
/** Defines label for the input for the day */
|
|
58
|
+
this.dayAriaLabel = 'Day';
|
|
59
|
+
/** Defines label for the input for the month */
|
|
60
|
+
this.monthAriaLabel = 'Month';
|
|
61
|
+
/** Defines label for the input for the year */
|
|
62
|
+
this.yearAriaLabel = 'Year';
|
|
63
|
+
/** Save current value */
|
|
64
|
+
this.currentValues = {};
|
|
65
|
+
/** Defines date delimiter */
|
|
66
|
+
this.delimiter = '/';
|
|
67
|
+
/** Validity state passed from validateFormElement function after validation */
|
|
68
|
+
this.validityState = '';
|
|
69
|
+
/** Validity message passed from validateFormElement function after validation */
|
|
70
|
+
this.validityMessage = '';
|
|
71
|
+
/** Defines if the component has been touched by user */
|
|
72
|
+
this.touched = false;
|
|
73
|
+
/** Defines if the value has been changed by user interaction */
|
|
74
|
+
this.dirty = false;
|
|
75
|
+
/**
|
|
76
|
+
* Initial attributes state
|
|
77
|
+
* */
|
|
78
|
+
this.initial = {};
|
|
79
|
+
this.uniqueId = `r-input-date-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
|
|
80
|
+
this.nativeElement = null;
|
|
81
|
+
this.getDateComponent = (input) => {
|
|
82
|
+
switch (input.toUpperCase()) {
|
|
83
|
+
case 'DD':
|
|
84
|
+
return this.currentValues.day;
|
|
85
|
+
case 'MM':
|
|
86
|
+
case 'M':
|
|
87
|
+
return this.currentValues.month;
|
|
88
|
+
case 'YYYY':
|
|
89
|
+
case 'YY':
|
|
90
|
+
return this.currentValues.year;
|
|
91
|
+
default:
|
|
92
|
+
return '';
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
this.setDateComponent = (input, value) => {
|
|
96
|
+
switch (input.toUpperCase()) {
|
|
97
|
+
case 'DD':
|
|
98
|
+
this.currentValues.day = value;
|
|
99
|
+
break;
|
|
100
|
+
case 'MM':
|
|
101
|
+
case 'M':
|
|
102
|
+
this.currentValues.month = value;
|
|
103
|
+
break;
|
|
104
|
+
case 'YYYY':
|
|
105
|
+
case 'YY':
|
|
106
|
+
this.currentValues.year = value;
|
|
107
|
+
break;
|
|
108
|
+
default:
|
|
109
|
+
return '';
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
this.getInputAttrs = (input) => {
|
|
113
|
+
const label = (type) => {
|
|
114
|
+
switch (type) {
|
|
115
|
+
case 'DD':
|
|
116
|
+
return this.dayAriaLabel;
|
|
117
|
+
case 'MM':
|
|
118
|
+
case 'M':
|
|
119
|
+
return this.monthAriaLabel;
|
|
120
|
+
case 'YYYY':
|
|
121
|
+
case 'YY':
|
|
122
|
+
return this.yearAriaLabel;
|
|
123
|
+
default:
|
|
124
|
+
return '';
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
const type = input.toUpperCase();
|
|
128
|
+
return {
|
|
129
|
+
placeholder: input,
|
|
130
|
+
maxlength: input.length > 2 ? input.length : 2,
|
|
131
|
+
size: input.length,
|
|
132
|
+
inputmode: 'numeric',
|
|
133
|
+
disabled: this.disabled,
|
|
134
|
+
required: this.required,
|
|
135
|
+
readonly: this.readonly,
|
|
136
|
+
'aria-label': label(type),
|
|
137
|
+
'data-date-type': type
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
this.getDelimiter = (value) => {
|
|
141
|
+
var _a;
|
|
142
|
+
return ((_a = value.replace(/[^.\-/]/g, '')) === null || _a === void 0 ? void 0 : _a.charAt(0)) || '/';
|
|
143
|
+
};
|
|
144
|
+
this.updateValue = () => {
|
|
145
|
+
if (this.readonly)
|
|
146
|
+
return;
|
|
147
|
+
this.delimiter = this.getDelimiter(this.format);
|
|
148
|
+
this.value = this.value ? this.inputOrder.map((input) => this.getDateComponent(input)).join(this.delimiter) : '';
|
|
149
|
+
};
|
|
150
|
+
this.onHostClick = () => {
|
|
151
|
+
const input = this.firstEmptyInput || this.inputs[this.inputs.length - 1];
|
|
152
|
+
input === null || input === void 0 ? void 0 : input.focus();
|
|
153
|
+
};
|
|
154
|
+
this.onInputClick = (event) => {
|
|
155
|
+
event.stopPropagation();
|
|
156
|
+
};
|
|
157
|
+
this.createKeyDownHandler = (index) => {
|
|
158
|
+
return (e) => this.handleKeyDown(index, e);
|
|
159
|
+
};
|
|
160
|
+
this.handleKeyDown = (index, event) => {
|
|
161
|
+
var _a, _b, _c, _d, _e, _f;
|
|
162
|
+
if (this.readonly)
|
|
163
|
+
return;
|
|
164
|
+
if (event.code === 'Enter') {
|
|
165
|
+
this.touched = true;
|
|
166
|
+
this.validateFormElement(this.nativeElement);
|
|
167
|
+
if (this.invalid && !this.isNoValidate)
|
|
168
|
+
return;
|
|
169
|
+
const submitEl = this.host.querySelector('[type="submit"]') ||
|
|
170
|
+
((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.querySelector('[type="submit"]'));
|
|
171
|
+
if (submitEl && 'triggerClick' in submitEl) {
|
|
172
|
+
submitEl === null || submitEl === void 0 ? void 0 : submitEl.triggerClick();
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.requestSubmit();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
if (event.code === 'Backspace') {
|
|
179
|
+
const cursorPosition = (_c = this.inputs[index]) === null || _c === void 0 ? void 0 : _c.selectionStart;
|
|
180
|
+
if (cursorPosition === 0 && index > 0) {
|
|
181
|
+
(_d = this.inputs[index - 1]) === null || _d === void 0 ? void 0 : _d.focus();
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (event.code === 'ArrowLeft') {
|
|
185
|
+
const input = this.inputs[index];
|
|
186
|
+
const cursorPosition = input === null || input === void 0 ? void 0 : input.selectionStart;
|
|
187
|
+
if (cursorPosition === 0 && index > 0) {
|
|
188
|
+
const previousInputValue = this.inputs[index - 1].value;
|
|
189
|
+
const length = previousInputValue === null || previousInputValue === void 0 ? void 0 : previousInputValue.length;
|
|
190
|
+
(_e = this.inputs[index - 1]) === null || _e === void 0 ? void 0 : _e.focus();
|
|
191
|
+
if (length) {
|
|
192
|
+
setTimeout(() => {
|
|
193
|
+
var _a;
|
|
194
|
+
(_a = this.inputs[index - 1]) === null || _a === void 0 ? void 0 : _a.setSelectionRange(length, length);
|
|
195
|
+
}, 0);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if (event.code === 'ArrowRight') {
|
|
200
|
+
const input = this.inputs[index];
|
|
201
|
+
const cursorPosition = input === null || input === void 0 ? void 0 : input.selectionStart;
|
|
202
|
+
const value = input === null || input === void 0 ? void 0 : input.value;
|
|
203
|
+
if ((!value || cursorPosition === value.length) && index < this.inputOrder.length - 1) {
|
|
204
|
+
(_f = this.inputs[index + 1]) === null || _f === void 0 ? void 0 : _f.focus();
|
|
205
|
+
setTimeout(() => {
|
|
206
|
+
var _a;
|
|
207
|
+
(_a = this.inputs[index + 1]) === null || _a === void 0 ? void 0 : _a.setSelectionRange(0, 0);
|
|
208
|
+
}, 0);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
this.handlePaste = (event) => {
|
|
213
|
+
if (this.readonly)
|
|
214
|
+
return;
|
|
215
|
+
this.value = event.clipboardData.getData('text');
|
|
216
|
+
this.touched = true;
|
|
217
|
+
this.dirty = true;
|
|
218
|
+
event.preventDefault();
|
|
219
|
+
};
|
|
220
|
+
this.createInputHandler = (input, index) => {
|
|
221
|
+
return (e) => this.handleInput(input, index, e);
|
|
222
|
+
};
|
|
223
|
+
this.handleInput = (input, index, event) => {
|
|
224
|
+
var _a, _b, _c;
|
|
225
|
+
if (this.readonly)
|
|
226
|
+
return;
|
|
227
|
+
const value = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.replace(/[^0-9]/g, '');
|
|
228
|
+
event.target.value = value;
|
|
229
|
+
this.setDateComponent(input, value);
|
|
230
|
+
this.value = this.inputOrder.map((el) => this.getDateComponent(el)).join(this.delimiter);
|
|
231
|
+
if ((value === null || value === void 0 ? void 0 : value.length) === ((_b = this.inputs[index]) === null || _b === void 0 ? void 0 : _b.maxLength) &&
|
|
232
|
+
index < this.inputOrder.length - 1) {
|
|
233
|
+
(_c = this.inputs[index + 1]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
234
|
+
}
|
|
235
|
+
this.touched = true;
|
|
236
|
+
this.dirty = true;
|
|
237
|
+
this.rInput.emit({ element: this.host, value: this.value });
|
|
238
|
+
this.validateFormElement(this.nativeElement);
|
|
239
|
+
};
|
|
240
|
+
this.createChangeHandler = (input) => {
|
|
241
|
+
return (e) => this.handleChange(input, e);
|
|
242
|
+
};
|
|
243
|
+
this.handleChange = (input, event) => {
|
|
244
|
+
var _a;
|
|
245
|
+
if (this.readonly)
|
|
246
|
+
return;
|
|
247
|
+
const value = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.replace(/[^0-9]/g, '');
|
|
248
|
+
event.target.value = value;
|
|
249
|
+
this.setDateComponent(input, value);
|
|
250
|
+
this.value = this.inputOrder.map((el) => this.getDateComponent(el)).join(this.delimiter);
|
|
251
|
+
this.touched = true;
|
|
252
|
+
this.dirty = true;
|
|
253
|
+
this.rChange.emit({ element: this.host, value: this.value });
|
|
254
|
+
this.validateFormElement(this.nativeElement);
|
|
255
|
+
};
|
|
256
|
+
this.handleBlur = () => {
|
|
257
|
+
this.touched = true;
|
|
258
|
+
this.validateFormElement(this.nativeElement);
|
|
259
|
+
};
|
|
260
|
+
this.getValidityStateData = (element) => {
|
|
261
|
+
let validityState = '';
|
|
262
|
+
let validityMessage = '';
|
|
263
|
+
if (this.required && element.value.length === 0) {
|
|
264
|
+
validityState = 'valueMissing';
|
|
265
|
+
validityMessage = this.valueMissingMessage;
|
|
266
|
+
return { validityState, validityMessage };
|
|
267
|
+
}
|
|
268
|
+
const valid = this.value ? dayjs(this.value, this.format, true).isValid() : true;
|
|
269
|
+
if (!valid) {
|
|
270
|
+
validityState = 'invalid';
|
|
271
|
+
validityMessage = this.invalidDateMessage;
|
|
272
|
+
return { validityState, validityMessage };
|
|
273
|
+
}
|
|
274
|
+
// Check min/max constraints only if date is valid and has a value
|
|
275
|
+
// Note: min and max are expected to be in the same format as this.format
|
|
276
|
+
// If format changes, the developer should update min/max accordingly
|
|
277
|
+
if (this.value && valid) {
|
|
278
|
+
const currentDate = dayjs(this.value, this.format, true);
|
|
279
|
+
// Check minimum date constraint
|
|
280
|
+
if (this.min) {
|
|
281
|
+
const minDate = dayjs(this.min, this.format, true);
|
|
282
|
+
if (minDate.isValid() && currentDate.isBefore(minDate, 'day')) {
|
|
283
|
+
validityState = 'rangeUnderflow';
|
|
284
|
+
validityMessage = this.rangeUnderflowMessage;
|
|
285
|
+
return { validityState, validityMessage };
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
// Check maximum date constraint
|
|
289
|
+
if (this.max) {
|
|
290
|
+
const maxDate = dayjs(this.max, this.format, true);
|
|
291
|
+
if (maxDate.isValid() && currentDate.isAfter(maxDate, 'day')) {
|
|
292
|
+
validityState = 'rangeOverflow';
|
|
293
|
+
validityMessage = this.rangeOverflowMessage;
|
|
294
|
+
return { validityState, validityMessage };
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
validityState = 'valid';
|
|
299
|
+
return { validityState, validityMessage };
|
|
300
|
+
};
|
|
301
|
+
this.validateFormElement = (element) => {
|
|
302
|
+
if (element === null)
|
|
303
|
+
return;
|
|
304
|
+
if (this.isNoValidate)
|
|
305
|
+
return;
|
|
306
|
+
const { validityState, validityMessage } = this.getValidityStateData(element);
|
|
307
|
+
this.validityState = validityState;
|
|
308
|
+
this.validityMessage = validityMessage;
|
|
309
|
+
const isValid = this.validityState === 'valid';
|
|
310
|
+
this.valid = isValid;
|
|
311
|
+
this.invalid = !isValid;
|
|
312
|
+
this.rValidate.emit({
|
|
313
|
+
state: this.validityState,
|
|
314
|
+
message: this.validityMessage
|
|
315
|
+
});
|
|
316
|
+
};
|
|
317
|
+
this.onResetForm = async () => {
|
|
318
|
+
if (this.readonly)
|
|
319
|
+
return;
|
|
320
|
+
this.reset();
|
|
321
|
+
this.validityState = null;
|
|
322
|
+
this.validityMessage = null;
|
|
323
|
+
this.invalid = null;
|
|
324
|
+
this.valid = null;
|
|
325
|
+
const { host, value } = this;
|
|
326
|
+
this.rReset.emit({ element: host, value });
|
|
327
|
+
};
|
|
328
|
+
this.onSubmitForm = (event) => {
|
|
329
|
+
if (this.isNoValidate)
|
|
330
|
+
return;
|
|
331
|
+
if (this.disabled)
|
|
332
|
+
return;
|
|
333
|
+
this.validateFormElement(this.nativeElement);
|
|
334
|
+
if (this.invalid) {
|
|
335
|
+
event.preventDefault();
|
|
336
|
+
event.stopPropagation();
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
this.contributeToFormData = (event) => {
|
|
340
|
+
appendControlToFormData(this.nativeElement || this.host, event.formData);
|
|
341
|
+
};
|
|
342
|
+
this.setCurrentValues = () => {
|
|
343
|
+
var _a;
|
|
344
|
+
const valueDelimiter = this.getDelimiter(this.value);
|
|
345
|
+
const valueInOrder = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.split(valueDelimiter)) || [];
|
|
346
|
+
this.value = valueInOrder.join(this.delimiter);
|
|
347
|
+
this.inputOrder.forEach((el, i) => {
|
|
348
|
+
this.setDateComponent(el, valueInOrder[i] || '');
|
|
349
|
+
});
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
handleFormatChange() {
|
|
353
|
+
this.updateValue();
|
|
354
|
+
}
|
|
355
|
+
handleValueChange() {
|
|
356
|
+
this.setCurrentValues();
|
|
357
|
+
if (this.touched)
|
|
358
|
+
this.validateFormElement(this.nativeElement);
|
|
359
|
+
}
|
|
360
|
+
/** Get the date value */
|
|
361
|
+
async getValue() {
|
|
362
|
+
return this.value;
|
|
363
|
+
}
|
|
364
|
+
/** Sets the date value */
|
|
365
|
+
async setValue(value) {
|
|
366
|
+
this.nativeElement.value = value;
|
|
367
|
+
this.value = value;
|
|
368
|
+
}
|
|
369
|
+
/** Gets the current date format */
|
|
370
|
+
async getFormat() {
|
|
371
|
+
return this.format;
|
|
372
|
+
}
|
|
373
|
+
/** Sets the date format */
|
|
374
|
+
async setFormat(format) {
|
|
375
|
+
this.format = format;
|
|
376
|
+
}
|
|
377
|
+
/** Gets the touched state (whether user has interacted with the input) */
|
|
378
|
+
async isTouched() {
|
|
379
|
+
return this.touched;
|
|
380
|
+
}
|
|
381
|
+
/** Gets the dirty state (whether value has been changed by user) */
|
|
382
|
+
async isDirty() {
|
|
383
|
+
return this.dirty;
|
|
384
|
+
}
|
|
385
|
+
/** Resets touched and dirty states to pristine (untouched/clean) */
|
|
386
|
+
async markAsPristine() {
|
|
387
|
+
this.touched = false;
|
|
388
|
+
this.dirty = false;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Resets the component by clearing all input values and focusing the first input.
|
|
392
|
+
* @returns Promise that resolves when reset is complete
|
|
393
|
+
*/
|
|
394
|
+
async reset() {
|
|
395
|
+
if (this.readonly)
|
|
396
|
+
return;
|
|
397
|
+
this.markAsPristine();
|
|
398
|
+
this.validityState = null;
|
|
399
|
+
this.validityMessage = null;
|
|
400
|
+
this.value = this.initial['value'];
|
|
401
|
+
this.invalid = this.initial['invalid'];
|
|
402
|
+
this.format = this.initial['format'];
|
|
403
|
+
this.valid = !this.invalid;
|
|
404
|
+
}
|
|
405
|
+
/** Validates an element, displays provided message in case value is invalid. */
|
|
406
|
+
async setCustomValidity(message) {
|
|
407
|
+
this.customErrorMessage = message;
|
|
408
|
+
this.validateFormElement(this.nativeElement);
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Validates the input date without triggering UI and returns a boolean indicating its validity.
|
|
412
|
+
* @returns A boolean indicating whether the input date is valid.
|
|
413
|
+
*/
|
|
414
|
+
async checkValidity() {
|
|
415
|
+
const { validityState } = this.getValidityStateData(this.nativeElement);
|
|
416
|
+
return validityState === 'valid';
|
|
417
|
+
}
|
|
418
|
+
get inputs() {
|
|
419
|
+
return Array.from(this.host.shadowRoot.querySelectorAll('input[data-date-type]'));
|
|
420
|
+
}
|
|
421
|
+
get inputOrder() {
|
|
422
|
+
return this.format.split(this.delimiter);
|
|
423
|
+
}
|
|
424
|
+
get message() {
|
|
425
|
+
if (this.invalid && this.error) {
|
|
426
|
+
return this.error;
|
|
427
|
+
}
|
|
428
|
+
return (this.validityState && this.validityState !== 'valid' ?
|
|
429
|
+
(this.customErrorMessage || this.validityMessage)
|
|
430
|
+
: null);
|
|
431
|
+
}
|
|
432
|
+
get hasMessage() {
|
|
433
|
+
return this.message !== null;
|
|
434
|
+
}
|
|
435
|
+
get ariaDescribedBy() {
|
|
436
|
+
const messageId = this.message ? `${this.uniqueId}-message` : null;
|
|
437
|
+
return this.hint ? `${this.uniqueId}-hint ${messageId}` : messageId;
|
|
438
|
+
}
|
|
439
|
+
/** Identify wrapping form element */
|
|
440
|
+
get parentFormEl() {
|
|
441
|
+
return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Determine whether this element should be ignored
|
|
445
|
+
* during Constraint Validation API validation.
|
|
446
|
+
* */
|
|
447
|
+
get isNoValidate() {
|
|
448
|
+
var _a;
|
|
449
|
+
return (((_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.hasAttribute('novalidate')) ||
|
|
450
|
+
this.novalidate ||
|
|
451
|
+
this.disabled ||
|
|
452
|
+
false);
|
|
453
|
+
}
|
|
454
|
+
get firstEmptyInput() {
|
|
455
|
+
return this.inputs.find(input => !input.value) || null;
|
|
456
|
+
}
|
|
457
|
+
get hasTrailingSlot() {
|
|
458
|
+
return !!this.host.querySelector('[slot="trailing"]');
|
|
459
|
+
}
|
|
460
|
+
componentWillLoad() {
|
|
461
|
+
dayjs.extend(customParseFormat);
|
|
462
|
+
this.delimiter = this.getDelimiter(this.format);
|
|
463
|
+
this.initial['value'] = this.value;
|
|
464
|
+
this.initial['invalid'] = this.invalid;
|
|
465
|
+
this.initial['format'] = this.format;
|
|
466
|
+
this.setCurrentValues();
|
|
467
|
+
}
|
|
468
|
+
connectFormEventListeners() {
|
|
469
|
+
var _a, _b, _c;
|
|
470
|
+
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.contributeToFormData);
|
|
471
|
+
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.addEventListener('submit', this.onSubmitForm, { capture: true });
|
|
472
|
+
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.addEventListener('reset', this.onResetForm);
|
|
473
|
+
}
|
|
474
|
+
disconnectFormEventListeners() {
|
|
475
|
+
var _a, _b, _c;
|
|
476
|
+
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('formdata', this.contributeToFormData);
|
|
477
|
+
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('submit', this.onSubmitForm);
|
|
478
|
+
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('reset', this.onResetForm);
|
|
479
|
+
}
|
|
480
|
+
connectedCallback() {
|
|
481
|
+
this.connectFormEventListeners();
|
|
482
|
+
}
|
|
483
|
+
disconnectedCallback() {
|
|
484
|
+
this.disconnectFormEventListeners();
|
|
485
|
+
}
|
|
486
|
+
render() {
|
|
487
|
+
const { form, name, required, disabled, label, fieldIndicator, hint, uniqueId, invalid, valid, readonly } = this;
|
|
488
|
+
const groupAttrs = {
|
|
489
|
+
'aria-invalid': `${invalid || false}`,
|
|
490
|
+
'aria-describedby': this.ariaDescribedBy
|
|
491
|
+
};
|
|
492
|
+
const dateInputAttrs = {
|
|
493
|
+
id: uniqueId,
|
|
494
|
+
form,
|
|
495
|
+
name,
|
|
496
|
+
required,
|
|
497
|
+
disabled,
|
|
498
|
+
readonly,
|
|
499
|
+
'aria-describedby': this.ariaDescribedBy
|
|
500
|
+
};
|
|
501
|
+
const labelAttr = label ? {
|
|
502
|
+
id: `${uniqueId}-label`,
|
|
503
|
+
fieldIndicator
|
|
504
|
+
} : {};
|
|
505
|
+
return (h(Host, { key: 'e8d5144a4cefeca243ea6e80840e4ff12b9344f0', onClick: this.onHostClick, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, h("fieldset", Object.assign({ key: '417cac30b7b535e7367eef280732869cdd984ed1', class: "r-input-date" }, groupAttrs), h("div", { key: 'd7ef5eb79c96c0d8845399e536c356272ab7c03c', class: "r-input-date--legend-container" }, h("legend", { key: '14c195899fb789333bbd07a40ec1db746d004839', class: "r-input-date--legend" }, h("label", { key: 'f6ac0e10142bceefe404a385ac44534d81ae3f98', htmlFor: uniqueId }, label ?
|
|
506
|
+
h("r-label", Object.assign({}, labelAttr), label)
|
|
507
|
+
:
|
|
508
|
+
h("slot", { name: "label" }))), h("slot", { key: 'b3bb261cb82002f7c41470bb9ca09110c6f7a345', name: "popover" })), hint &&
|
|
509
|
+
h("r-hint", { key: '606d8d0f83416914627b23f901838c55f65b6adc', id: `${uniqueId}-hint`, role: "note" }, hint), h("div", { key: '46ca5170c4eafd18464dd7575ab41263907e2116', class: "r-input-date--container" }, h("r-icon", { key: '488dc02a12c354dc9fdd5d814b2c63dbd080175f', name: "calendar", size: "s", class: "r-input-date--calendar-icon" }), h("div", { key: '69ef56323ea2c1d90121dc280cb2072701558064', class: "r-input-date--inputs" }, this.inputOrder.map((input, i) => (h(Fragment, null, h("input", Object.assign({ class: "r-input-date--input" }, this.getInputAttrs(input), { key: input, value: this.getDateComponent(input), onInput: this.createInputHandler(input, i), onChange: this.createChangeHandler(input), onClick: this.onInputClick, onBlur: this.handleBlur, onKeyDown: this.createKeyDownHandler(i), onPaste: this.handlePaste })), i < this.inputOrder.length - 1 &&
|
|
510
|
+
h("span", { "aria-hidden": "true", class: "r-input-date--delimiter" }, this.delimiter)))), h("input", Object.assign({ key: '918cf85992a45287c77df5f937f82d0f6f316bf1', type: "hidden" }, dateInputAttrs, { value: this.value, ref: (el) => this.nativeElement = el }))), h("div", { key: '57dbce64441410f59571417fce01213af7ee146f', class: "r-input-date--trailing" }, this.readonly &&
|
|
511
|
+
h("r-icon", { key: 'e60109ba459f42e391a972cd7fdbd9fba134244f', class: "r-input-date--readonly-icon", name: "pen-disabled", size: "s" }), valid &&
|
|
512
|
+
h("r-icon", { key: '0c5af571965830bffdb226d94e4d2a2f4a158553', name: "circled-check", size: "s", color: "var(--r-status-success-regular)" }), this.hasTrailingSlot && h("slot", { key: '2b3836138862a6b6538aa75ddc2929b63f85667e', name: "trailing" }))), h("div", { key: 'd07f45f25bd1c6ad19f7feacf24cab515c40aa01', id: `${uniqueId}-message`, "aria-live": "polite", class: "r-input-date--message" }, this.hasMessage && h("r-hint", { key: '7974223f426574a5b6a54bbf773007475dfb6450', variant: "error" }, this.message)))));
|
|
513
|
+
}
|
|
514
|
+
get host() { return getElement(this); }
|
|
515
|
+
static get watchers() { return {
|
|
516
|
+
"format": ["handleFormatChange"],
|
|
517
|
+
"value": ["handleValueChange"]
|
|
518
|
+
}; }
|
|
519
|
+
};
|
|
520
|
+
InputDate.style = inputDateCss;
|
|
521
|
+
|
|
522
|
+
export { InputDate as r_input_date };
|