@daikin-oss/design-system-web-components 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +127 -0
- package/LICENSE +1 -1
- package/dist/cjs/base/dds-element.cjs +1 -1
- package/dist/cjs/base/dds-form-element.cjs +139 -0
- package/dist/cjs/base/dds-form-element.d.cts +100 -0
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +6 -3
- package/dist/cjs/components/avatar/daikin-avatar.cjs +160 -0
- package/dist/cjs/components/avatar/daikin-avatar.d.cts +67 -0
- package/dist/cjs/components/avatar/index.cjs +7 -0
- package/dist/cjs/components/avatar/index.d.cts +1 -0
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +2 -0
- package/dist/cjs/components/button/daikin-button.cjs +35 -13
- package/dist/cjs/components/button/daikin-button.d.cts +20 -10
- package/dist/cjs/components/calendar/daikin-calendar.cjs +547 -0
- package/dist/cjs/components/calendar/daikin-calendar.d.cts +87 -0
- package/dist/cjs/components/calendar/index.cjs +7 -0
- package/dist/cjs/components/calendar/index.d.cts +1 -0
- package/dist/cjs/components/card/daikin-card.cjs +1 -1
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +13 -16
- package/dist/cjs/components/checkbox/daikin-checkbox.d.cts +13 -12
- package/dist/cjs/components/checkbox-group/daikin-checkbox-group.cjs +94 -0
- package/dist/cjs/components/checkbox-group/daikin-checkbox-group.d.cts +69 -0
- package/dist/cjs/components/checkbox-group/index.cjs +7 -0
- package/dist/cjs/components/checkbox-group/index.d.cts +1 -0
- package/dist/cjs/components/date-picker/daikin-date-picker.cjs +611 -0
- package/dist/cjs/components/date-picker/daikin-date-picker.d.cts +105 -0
- package/dist/cjs/components/date-picker/index.cjs +7 -0
- package/dist/cjs/components/date-picker/index.d.cts +1 -0
- package/dist/cjs/components/dropdown/daikin-dropdown.cjs +181 -86
- package/dist/cjs/components/dropdown/daikin-dropdown.d.cts +48 -18
- package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +97 -36
- package/dist/cjs/components/dropdown-item/daikin-dropdown-item.d.cts +6 -1
- package/dist/cjs/components/icon/icons.json.cjs +1 -1
- package/dist/cjs/components/icon/icons.json.d.cts +30 -14
- package/dist/cjs/components/icon-button/daikin-icon-button.cjs +18 -2
- package/dist/cjs/components/icon-button/daikin-icon-button.d.cts +12 -2
- package/dist/cjs/components/index.cjs +55 -0
- package/dist/cjs/components/index.d.cts +11 -0
- package/dist/cjs/components/inline-notification/daikin-inline-notification.cjs +13 -18
- package/dist/cjs/components/inline-notification/daikin-inline-notification.d.cts +3 -1
- package/dist/cjs/components/input-group/daikin-input-group.cjs +4 -4
- package/dist/cjs/components/input-group/daikin-input-group.d.cts +22 -0
- package/dist/cjs/components/list/daikin-list.cjs +75 -3
- package/dist/cjs/components/list/daikin-list.d.cts +16 -0
- package/dist/cjs/components/list-item/daikin-list-item.cjs +25 -5
- package/dist/cjs/components/list-item/daikin-list-item.d.cts +9 -3
- package/dist/cjs/components/loading/daikin-loading.cjs +91 -0
- package/dist/cjs/components/loading/daikin-loading.d.cts +33 -0
- package/dist/cjs/components/loading/index.cjs +7 -0
- package/dist/cjs/components/loading/index.d.cts +1 -0
- package/dist/cjs/components/logo/daikin-logo.cjs +105 -0
- package/dist/cjs/components/logo/daikin-logo.d.cts +54 -0
- package/dist/cjs/components/logo/index.cjs +7 -0
- package/dist/cjs/components/logo/index.d.cts +1 -0
- package/dist/cjs/components/menu/daikin-menu.cjs +205 -0
- package/dist/cjs/components/menu/daikin-menu.d.cts +89 -0
- package/dist/cjs/components/menu/index.cjs +7 -0
- package/dist/cjs/components/menu/index.d.cts +1 -0
- package/dist/cjs/components/modal/daikin-modal.cjs +115 -0
- package/dist/cjs/components/modal/daikin-modal.d.cts +61 -0
- package/dist/cjs/components/modal/index.cjs +7 -0
- package/dist/cjs/components/modal/index.d.cts +1 -0
- package/dist/cjs/components/modal-footer/daikin-modal-footer.cjs +40 -0
- package/dist/cjs/components/modal-footer/daikin-modal-footer.d.cts +33 -0
- package/dist/cjs/components/modal-footer/index.cjs +7 -0
- package/dist/cjs/components/modal-footer/index.d.cts +1 -0
- package/dist/cjs/components/modal-header/daikin-modal-header.cjs +96 -0
- package/dist/cjs/components/modal-header/daikin-modal-header.d.cts +43 -0
- package/dist/cjs/components/modal-header/index.cjs +7 -0
- package/dist/cjs/components/modal-header/index.d.cts +1 -0
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +2 -2
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +1 -1
- package/dist/cjs/components/radio/daikin-radio.cjs +4 -13
- package/dist/cjs/components/radio/daikin-radio.d.cts +2 -12
- package/dist/cjs/components/radio-group/daikin-radio-group.cjs +1 -1
- package/dist/cjs/components/radio-group/daikin-radio-group.d.cts +2 -1
- package/dist/cjs/components/slider/daikin-slider.cjs +263 -0
- package/dist/cjs/components/slider/daikin-slider.d.cts +67 -0
- package/dist/cjs/components/slider/index.cjs +7 -0
- package/dist/cjs/components/slider/index.d.cts +1 -0
- package/dist/cjs/components/slider/slider-utils.cjs +57 -0
- package/dist/cjs/components/slider/slider-utils.d.cts +37 -0
- package/dist/cjs/components/table/daikin-table.cjs +42 -4
- package/dist/cjs/components/table/daikin-table.d.cts +5 -0
- package/dist/cjs/components/table-cell/daikin-table-cell.cjs +2 -1
- package/dist/cjs/components/table-cell/daikin-table-cell.d.cts +1 -1
- package/dist/cjs/components/table-header-cell/daikin-table-header-cell.d.cts +1 -1
- package/dist/cjs/components/tabs/daikin-tabs.cjs +2 -2
- package/dist/cjs/components/text-area/daikin-text-area.cjs +4 -13
- package/dist/cjs/components/text-area/daikin-text-area.d.cts +2 -12
- package/dist/cjs/components/text-field/daikin-text-field.cjs +149 -52
- package/dist/cjs/components/text-field/daikin-text-field.d.cts +28 -18
- package/dist/cjs/components/toast-notification/daikin-toast-notification.cjs +10 -7
- package/dist/cjs/components/toast-notification/daikin-toast-notification.d.cts +2 -0
- package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.cjs +1 -1
- package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.d.cts +1 -1
- package/dist/cjs/components/toggle/daikin-toggle.cjs +4 -13
- package/dist/cjs/components/toggle/daikin-toggle.d.cts +2 -12
- package/dist/cjs/components/tooltip/daikin-tooltip.cjs +12 -6
- package/dist/cjs/components/tooltip/daikin-tooltip.d.cts +3 -2
- package/dist/cjs/components/tree-section/daikin-tree-section.d.cts +2 -0
- package/dist/cjs/controllers/click-outside.cjs +3 -1
- package/dist/cjs/controllers/focus-trap.cjs +42 -0
- package/dist/cjs/controllers/focus-trap.d.cts +10 -0
- package/dist/cjs/index.cjs +55 -0
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs/utils/calendar-common.cjs +151 -0
- package/dist/cjs/utils/calendar-common.d.cts +64 -0
- package/dist/cjs/utils/is-similar-to-click.cjs +4 -0
- package/dist/cjs/utils/is-similar-to-click.d.cts +1 -0
- package/dist/cjs/utils/notification-common.cjs +19 -15
- package/dist/cjs/utils/notification-common.d.cts +1 -1
- package/dist/cjs/{components/tabs → utils}/scroller.cjs +20 -12
- package/dist/cjs/{components/tabs → utils}/scroller.d.cts +2 -2
- package/dist/cjs-dev/base/dds-element.cjs +1 -1
- package/dist/cjs-dev/base/dds-form-element.cjs +139 -0
- package/dist/cjs-dev/base/dds-form-element.d.cts +100 -0
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +6 -3
- package/dist/cjs-dev/components/avatar/daikin-avatar.cjs +160 -0
- package/dist/cjs-dev/components/avatar/daikin-avatar.d.cts +67 -0
- package/dist/cjs-dev/components/avatar/index.cjs +7 -0
- package/dist/cjs-dev/components/avatar/index.d.cts +1 -0
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +2 -0
- package/dist/cjs-dev/components/button/daikin-button.cjs +35 -13
- package/dist/cjs-dev/components/button/daikin-button.d.cts +20 -10
- package/dist/cjs-dev/components/calendar/daikin-calendar.cjs +558 -0
- package/dist/cjs-dev/components/calendar/daikin-calendar.d.cts +87 -0
- package/dist/cjs-dev/components/calendar/index.cjs +7 -0
- package/dist/cjs-dev/components/calendar/index.d.cts +1 -0
- package/dist/cjs-dev/components/card/daikin-card.cjs +1 -1
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +13 -16
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.cts +13 -12
- package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.cjs +94 -0
- package/dist/cjs-dev/components/checkbox-group/daikin-checkbox-group.d.cts +69 -0
- package/dist/cjs-dev/components/checkbox-group/index.cjs +7 -0
- package/dist/cjs-dev/components/checkbox-group/index.d.cts +1 -0
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +622 -0
- package/dist/cjs-dev/components/date-picker/daikin-date-picker.d.cts +105 -0
- package/dist/cjs-dev/components/date-picker/index.cjs +7 -0
- package/dist/cjs-dev/components/date-picker/index.d.cts +1 -0
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +181 -86
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.d.cts +48 -18
- package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +97 -36
- package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.d.cts +6 -1
- package/dist/cjs-dev/components/icon/icons.json.cjs +1 -1
- package/dist/cjs-dev/components/icon/icons.json.d.cts +30 -14
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +18 -2
- package/dist/cjs-dev/components/icon-button/daikin-icon-button.d.cts +12 -2
- package/dist/cjs-dev/components/index.cjs +55 -0
- package/dist/cjs-dev/components/index.d.cts +11 -0
- package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.cjs +13 -18
- package/dist/cjs-dev/components/inline-notification/daikin-inline-notification.d.cts +3 -1
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +4 -4
- package/dist/cjs-dev/components/input-group/daikin-input-group.d.cts +22 -0
- package/dist/cjs-dev/components/list/daikin-list.cjs +75 -3
- package/dist/cjs-dev/components/list/daikin-list.d.cts +16 -0
- package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +25 -5
- package/dist/cjs-dev/components/list-item/daikin-list-item.d.cts +9 -3
- package/dist/cjs-dev/components/loading/daikin-loading.cjs +91 -0
- package/dist/cjs-dev/components/loading/daikin-loading.d.cts +33 -0
- package/dist/cjs-dev/components/loading/index.cjs +7 -0
- package/dist/cjs-dev/components/loading/index.d.cts +1 -0
- package/dist/cjs-dev/components/logo/daikin-logo.cjs +105 -0
- package/dist/cjs-dev/components/logo/daikin-logo.d.cts +54 -0
- package/dist/cjs-dev/components/logo/index.cjs +7 -0
- package/dist/cjs-dev/components/logo/index.d.cts +1 -0
- package/dist/cjs-dev/components/menu/daikin-menu.cjs +205 -0
- package/dist/cjs-dev/components/menu/daikin-menu.d.cts +89 -0
- package/dist/cjs-dev/components/menu/index.cjs +7 -0
- package/dist/cjs-dev/components/menu/index.d.cts +1 -0
- package/dist/cjs-dev/components/modal/daikin-modal.cjs +115 -0
- package/dist/cjs-dev/components/modal/daikin-modal.d.cts +61 -0
- package/dist/cjs-dev/components/modal/index.cjs +7 -0
- package/dist/cjs-dev/components/modal/index.d.cts +1 -0
- package/dist/cjs-dev/components/modal-footer/daikin-modal-footer.cjs +40 -0
- package/dist/cjs-dev/components/modal-footer/daikin-modal-footer.d.cts +33 -0
- package/dist/cjs-dev/components/modal-footer/index.cjs +7 -0
- package/dist/cjs-dev/components/modal-footer/index.d.cts +1 -0
- package/dist/cjs-dev/components/modal-header/daikin-modal-header.cjs +96 -0
- package/dist/cjs-dev/components/modal-header/daikin-modal-header.d.cts +43 -0
- package/dist/cjs-dev/components/modal-header/index.cjs +7 -0
- package/dist/cjs-dev/components/modal-header/index.d.cts +1 -0
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +2 -2
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +1 -1
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +4 -13
- package/dist/cjs-dev/components/radio/daikin-radio.d.cts +2 -12
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +1 -1
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.d.cts +2 -1
- package/dist/cjs-dev/components/slider/daikin-slider.cjs +263 -0
- package/dist/cjs-dev/components/slider/daikin-slider.d.cts +67 -0
- package/dist/cjs-dev/components/slider/index.cjs +7 -0
- package/dist/cjs-dev/components/slider/index.d.cts +1 -0
- package/dist/cjs-dev/components/slider/slider-utils.cjs +57 -0
- package/dist/cjs-dev/components/slider/slider-utils.d.cts +37 -0
- package/dist/cjs-dev/components/table/daikin-table.cjs +42 -4
- package/dist/cjs-dev/components/table/daikin-table.d.cts +5 -0
- package/dist/cjs-dev/components/table-cell/daikin-table-cell.cjs +2 -1
- package/dist/cjs-dev/components/table-cell/daikin-table-cell.d.cts +1 -1
- package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.d.cts +1 -1
- package/dist/cjs-dev/components/tabs/daikin-tabs.cjs +2 -2
- package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +4 -13
- package/dist/cjs-dev/components/text-area/daikin-text-area.d.cts +2 -12
- package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +149 -52
- package/dist/cjs-dev/components/text-field/daikin-text-field.d.cts +28 -18
- package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.cjs +10 -7
- package/dist/cjs-dev/components/toast-notification/daikin-toast-notification.d.cts +2 -0
- package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.cjs +1 -1
- package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.d.cts +1 -1
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +4 -13
- package/dist/cjs-dev/components/toggle/daikin-toggle.d.cts +2 -12
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +12 -6
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.cts +3 -2
- package/dist/cjs-dev/components/tree-section/daikin-tree-section.d.cts +2 -0
- package/dist/cjs-dev/controllers/click-outside.cjs +3 -1
- package/dist/cjs-dev/controllers/focus-trap.cjs +42 -0
- package/dist/cjs-dev/controllers/focus-trap.d.cts +10 -0
- package/dist/cjs-dev/index.cjs +55 -0
- package/dist/cjs-dev/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/utils/calendar-common.cjs +151 -0
- package/dist/cjs-dev/utils/calendar-common.d.cts +64 -0
- package/dist/cjs-dev/utils/is-similar-to-click.cjs +4 -0
- package/dist/cjs-dev/utils/is-similar-to-click.d.cts +1 -0
- package/dist/cjs-dev/utils/notification-common.cjs +19 -15
- package/dist/cjs-dev/utils/notification-common.d.cts +1 -1
- package/dist/cjs-dev/{components/tabs → utils}/scroller.cjs +20 -12
- package/dist/cjs-dev/{components/tabs → utils}/scroller.d.cts +2 -2
- package/dist/es/base/dds-element.js +1 -1
- package/dist/es/base/dds-form-element.d.ts +100 -0
- package/dist/es/base/dds-form-element.js +139 -0
- package/dist/es/components/accordion/daikin-accordion.js +1 -1
- package/dist/es/components/accordion-item/daikin-accordion-item.js +7 -4
- package/dist/es/components/avatar/daikin-avatar.d.ts +67 -0
- package/dist/es/components/avatar/daikin-avatar.js +161 -0
- package/dist/es/components/avatar/index.d.ts +1 -0
- package/dist/es/components/avatar/index.js +4 -0
- package/dist/es/components/breadcrumb/daikin-breadcrumb.js +1 -1
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +3 -1
- package/dist/es/components/button/daikin-button.d.ts +20 -10
- package/dist/es/components/button/daikin-button.js +36 -14
- package/dist/es/components/calendar/daikin-calendar.d.ts +87 -0
- package/dist/es/components/calendar/daikin-calendar.js +548 -0
- package/dist/es/components/calendar/index.d.ts +1 -0
- package/dist/es/components/calendar/index.js +4 -0
- package/dist/es/components/card/daikin-card.js +2 -2
- package/dist/es/components/card-footer/daikin-card-footer.js +1 -1
- package/dist/es/components/card-header/daikin-card-header.js +1 -1
- package/dist/es/components/carousel/daikin-carousel.js +1 -1
- package/dist/es/components/carousel-item/daikin-carousel-item.js +1 -1
- package/dist/es/components/checkbox/daikin-checkbox.d.ts +13 -12
- package/dist/es/components/checkbox/daikin-checkbox.js +14 -17
- package/dist/es/components/checkbox-group/daikin-checkbox-group.d.ts +69 -0
- package/dist/es/components/checkbox-group/daikin-checkbox-group.js +95 -0
- package/dist/es/components/checkbox-group/index.d.ts +1 -0
- package/dist/es/components/checkbox-group/index.js +4 -0
- package/dist/es/components/date-picker/daikin-date-picker.d.ts +105 -0
- package/dist/es/components/date-picker/daikin-date-picker.js +612 -0
- package/dist/es/components/date-picker/index.d.ts +1 -0
- package/dist/es/components/date-picker/index.js +4 -0
- package/dist/es/components/dropdown/daikin-dropdown.d.ts +48 -18
- package/dist/es/components/dropdown/daikin-dropdown.js +182 -87
- package/dist/es/components/dropdown-item/daikin-dropdown-item.d.ts +6 -1
- package/dist/es/components/dropdown-item/daikin-dropdown-item.js +98 -37
- package/dist/es/components/icon/daikin-icon.js +1 -1
- package/dist/es/components/icon/icons.json.d.ts +30 -14
- package/dist/es/components/icon/icons.json.js +1 -1
- package/dist/es/components/icon-button/daikin-icon-button.d.ts +12 -2
- package/dist/es/components/icon-button/daikin-icon-button.js +19 -3
- package/dist/es/components/index.d.ts +11 -0
- package/dist/es/components/index.js +22 -0
- package/dist/es/components/inline-notification/daikin-inline-notification.d.ts +3 -1
- package/dist/es/components/inline-notification/daikin-inline-notification.js +14 -19
- package/dist/es/components/input-group/daikin-input-group.d.ts +22 -0
- package/dist/es/components/input-group/daikin-input-group.js +5 -5
- package/dist/es/components/link/daikin-link.js +1 -1
- package/dist/es/components/list/daikin-list.d.ts +16 -0
- package/dist/es/components/list/daikin-list.js +76 -4
- package/dist/es/components/list-item/daikin-list-item.d.ts +9 -3
- package/dist/es/components/list-item/daikin-list-item.js +26 -6
- package/dist/es/components/loading/daikin-loading.d.ts +33 -0
- package/dist/es/components/loading/daikin-loading.js +92 -0
- package/dist/es/components/loading/index.d.ts +1 -0
- package/dist/es/components/loading/index.js +4 -0
- package/dist/es/components/logo/daikin-logo.d.ts +54 -0
- package/dist/es/components/logo/daikin-logo.js +106 -0
- package/dist/es/components/logo/index.d.ts +1 -0
- package/dist/es/components/logo/index.js +4 -0
- package/dist/es/components/menu/daikin-menu.d.ts +89 -0
- package/dist/es/components/menu/daikin-menu.js +206 -0
- package/dist/es/components/menu/index.d.ts +1 -0
- package/dist/es/components/menu/index.js +4 -0
- package/dist/es/components/modal/daikin-modal.d.ts +61 -0
- package/dist/es/components/modal/daikin-modal.js +116 -0
- package/dist/es/components/modal/index.d.ts +1 -0
- package/dist/es/components/modal/index.js +4 -0
- package/dist/es/components/modal-footer/daikin-modal-footer.d.ts +33 -0
- package/dist/es/components/modal-footer/daikin-modal-footer.js +41 -0
- package/dist/es/components/modal-footer/index.d.ts +1 -0
- package/dist/es/components/modal-footer/index.js +4 -0
- package/dist/es/components/modal-header/daikin-modal-header.d.ts +43 -0
- package/dist/es/components/modal-header/daikin-modal-header.js +97 -0
- package/dist/es/components/modal-header/index.d.ts +1 -0
- package/dist/es/components/modal-header/index.js +4 -0
- package/dist/es/components/pagination/daikin-pagination.js +1 -1
- package/dist/es/components/progress-bar/daikin-progress-bar.js +3 -3
- package/dist/es/components/progress-indicator/daikin-progress-indicator.js +1 -1
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +2 -2
- package/dist/es/components/radio/daikin-radio.d.ts +2 -12
- package/dist/es/components/radio/daikin-radio.js +5 -14
- package/dist/es/components/radio-group/daikin-radio-group.d.ts +2 -1
- package/dist/es/components/radio-group/daikin-radio-group.js +2 -2
- package/dist/es/components/select/daikin-select.js +1 -1
- package/dist/es/components/slider/daikin-slider.d.ts +67 -0
- package/dist/es/components/slider/daikin-slider.js +264 -0
- package/dist/es/components/slider/index.d.ts +1 -0
- package/dist/es/components/slider/index.js +4 -0
- package/dist/es/components/slider/slider-utils.d.ts +37 -0
- package/dist/es/components/slider/slider-utils.js +57 -0
- package/dist/es/components/tab/daikin-tab.js +1 -1
- package/dist/es/components/tab-panels/daikin-tab-panels.js +1 -1
- package/dist/es/components/table/daikin-table.d.ts +5 -0
- package/dist/es/components/table/daikin-table.js +43 -5
- package/dist/es/components/table-cell/daikin-table-cell.d.ts +1 -1
- package/dist/es/components/table-cell/daikin-table-cell.js +3 -2
- package/dist/es/components/table-header-cell/daikin-table-header-cell.d.ts +1 -1
- package/dist/es/components/table-header-cell/daikin-table-header-cell.js +1 -1
- package/dist/es/components/tabs/daikin-tabs.js +3 -3
- package/dist/es/components/text-area/daikin-text-area.d.ts +2 -12
- package/dist/es/components/text-area/daikin-text-area.js +5 -14
- package/dist/es/components/text-field/daikin-text-field.d.ts +28 -18
- package/dist/es/components/text-field/daikin-text-field.js +150 -53
- package/dist/es/components/toast-notification/daikin-toast-notification.d.ts +2 -0
- package/dist/es/components/toast-notification/daikin-toast-notification.js +11 -8
- package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.d.ts +1 -1
- package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.js +2 -2
- package/dist/es/components/toggle/daikin-toggle.d.ts +2 -12
- package/dist/es/components/toggle/daikin-toggle.js +5 -14
- package/dist/es/components/tooltip/daikin-tooltip.d.ts +3 -2
- package/dist/es/components/tooltip/daikin-tooltip.js +13 -7
- package/dist/es/components/tree/daikin-tree.js +1 -1
- package/dist/es/components/tree-item/daikin-tree-item.js +1 -1
- package/dist/es/components/tree-section/daikin-tree-section.d.ts +2 -0
- package/dist/es/components/tree-section/daikin-tree-section.js +1 -1
- package/dist/es/controllers/click-outside.js +3 -1
- package/dist/es/controllers/focus-trap.d.ts +10 -0
- package/dist/es/controllers/focus-trap.js +42 -0
- package/dist/es/index.js +22 -0
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es/utils/calendar-common.d.ts +64 -0
- package/dist/es/utils/calendar-common.js +151 -0
- package/dist/es/utils/is-similar-to-click.d.ts +1 -0
- package/dist/es/utils/is-similar-to-click.js +4 -0
- package/dist/es/utils/notification-common.d.ts +1 -1
- package/dist/es/utils/notification-common.js +19 -15
- package/dist/es/{components/tabs → utils}/scroller.d.ts +2 -2
- package/dist/es/{components/tabs → utils}/scroller.js +20 -12
- package/dist/es-dev/base/dds-element.js +1 -1
- package/dist/es-dev/base/dds-form-element.d.ts +100 -0
- package/dist/es-dev/base/dds-form-element.js +139 -0
- package/dist/es-dev/components/accordion/daikin-accordion.js +1 -1
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +7 -4
- package/dist/es-dev/components/avatar/daikin-avatar.d.ts +67 -0
- package/dist/es-dev/components/avatar/daikin-avatar.js +161 -0
- package/dist/es-dev/components/avatar/index.d.ts +1 -0
- package/dist/es-dev/components/avatar/index.js +4 -0
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +1 -1
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +3 -1
- package/dist/es-dev/components/button/daikin-button.d.ts +20 -10
- package/dist/es-dev/components/button/daikin-button.js +36 -14
- package/dist/es-dev/components/calendar/daikin-calendar.d.ts +87 -0
- package/dist/es-dev/components/calendar/daikin-calendar.js +559 -0
- package/dist/es-dev/components/calendar/index.d.ts +1 -0
- package/dist/es-dev/components/calendar/index.js +4 -0
- package/dist/es-dev/components/card/daikin-card.js +2 -2
- package/dist/es-dev/components/card-footer/daikin-card-footer.js +1 -1
- package/dist/es-dev/components/card-header/daikin-card-header.js +1 -1
- package/dist/es-dev/components/carousel/daikin-carousel.js +1 -1
- package/dist/es-dev/components/carousel-item/daikin-carousel-item.js +1 -1
- package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +13 -12
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +14 -17
- package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.d.ts +69 -0
- package/dist/es-dev/components/checkbox-group/daikin-checkbox-group.js +95 -0
- package/dist/es-dev/components/checkbox-group/index.d.ts +1 -0
- package/dist/es-dev/components/checkbox-group/index.js +4 -0
- package/dist/es-dev/components/date-picker/daikin-date-picker.d.ts +105 -0
- package/dist/es-dev/components/date-picker/daikin-date-picker.js +623 -0
- package/dist/es-dev/components/date-picker/index.d.ts +1 -0
- package/dist/es-dev/components/date-picker/index.js +4 -0
- package/dist/es-dev/components/dropdown/daikin-dropdown.d.ts +48 -18
- package/dist/es-dev/components/dropdown/daikin-dropdown.js +182 -87
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.d.ts +6 -1
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +98 -37
- package/dist/es-dev/components/icon/daikin-icon.js +1 -1
- package/dist/es-dev/components/icon/icons.json.d.ts +30 -14
- package/dist/es-dev/components/icon/icons.json.js +1 -1
- package/dist/es-dev/components/icon-button/daikin-icon-button.d.ts +12 -2
- package/dist/es-dev/components/icon-button/daikin-icon-button.js +19 -3
- package/dist/es-dev/components/index.d.ts +11 -0
- package/dist/es-dev/components/index.js +22 -0
- package/dist/es-dev/components/inline-notification/daikin-inline-notification.d.ts +3 -1
- package/dist/es-dev/components/inline-notification/daikin-inline-notification.js +14 -19
- package/dist/es-dev/components/input-group/daikin-input-group.d.ts +22 -0
- package/dist/es-dev/components/input-group/daikin-input-group.js +5 -5
- package/dist/es-dev/components/link/daikin-link.js +1 -1
- package/dist/es-dev/components/list/daikin-list.d.ts +16 -0
- package/dist/es-dev/components/list/daikin-list.js +76 -4
- package/dist/es-dev/components/list-item/daikin-list-item.d.ts +9 -3
- package/dist/es-dev/components/list-item/daikin-list-item.js +26 -6
- package/dist/es-dev/components/loading/daikin-loading.d.ts +33 -0
- package/dist/es-dev/components/loading/daikin-loading.js +92 -0
- package/dist/es-dev/components/loading/index.d.ts +1 -0
- package/dist/es-dev/components/loading/index.js +4 -0
- package/dist/es-dev/components/logo/daikin-logo.d.ts +54 -0
- package/dist/es-dev/components/logo/daikin-logo.js +106 -0
- package/dist/es-dev/components/logo/index.d.ts +1 -0
- package/dist/es-dev/components/logo/index.js +4 -0
- package/dist/es-dev/components/menu/daikin-menu.d.ts +89 -0
- package/dist/es-dev/components/menu/daikin-menu.js +206 -0
- package/dist/es-dev/components/menu/index.d.ts +1 -0
- package/dist/es-dev/components/menu/index.js +4 -0
- package/dist/es-dev/components/modal/daikin-modal.d.ts +61 -0
- package/dist/es-dev/components/modal/daikin-modal.js +116 -0
- package/dist/es-dev/components/modal/index.d.ts +1 -0
- package/dist/es-dev/components/modal/index.js +4 -0
- package/dist/es-dev/components/modal-footer/daikin-modal-footer.d.ts +33 -0
- package/dist/es-dev/components/modal-footer/daikin-modal-footer.js +41 -0
- package/dist/es-dev/components/modal-footer/index.d.ts +1 -0
- package/dist/es-dev/components/modal-footer/index.js +4 -0
- package/dist/es-dev/components/modal-header/daikin-modal-header.d.ts +43 -0
- package/dist/es-dev/components/modal-header/daikin-modal-header.js +97 -0
- package/dist/es-dev/components/modal-header/index.d.ts +1 -0
- package/dist/es-dev/components/modal-header/index.js +4 -0
- package/dist/es-dev/components/pagination/daikin-pagination.js +1 -1
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +3 -3
- package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +1 -1
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +2 -2
- package/dist/es-dev/components/radio/daikin-radio.d.ts +2 -12
- package/dist/es-dev/components/radio/daikin-radio.js +5 -14
- package/dist/es-dev/components/radio-group/daikin-radio-group.d.ts +2 -1
- package/dist/es-dev/components/radio-group/daikin-radio-group.js +2 -2
- package/dist/es-dev/components/select/daikin-select.js +1 -1
- package/dist/es-dev/components/slider/daikin-slider.d.ts +67 -0
- package/dist/es-dev/components/slider/daikin-slider.js +264 -0
- package/dist/es-dev/components/slider/index.d.ts +1 -0
- package/dist/es-dev/components/slider/index.js +4 -0
- package/dist/es-dev/components/slider/slider-utils.d.ts +37 -0
- package/dist/es-dev/components/slider/slider-utils.js +57 -0
- package/dist/es-dev/components/tab/daikin-tab.js +1 -1
- package/dist/es-dev/components/tab-panels/daikin-tab-panels.js +1 -1
- package/dist/es-dev/components/table/daikin-table.d.ts +5 -0
- package/dist/es-dev/components/table/daikin-table.js +43 -5
- package/dist/es-dev/components/table-cell/daikin-table-cell.d.ts +1 -1
- package/dist/es-dev/components/table-cell/daikin-table-cell.js +3 -2
- package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.d.ts +1 -1
- package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.js +1 -1
- package/dist/es-dev/components/tabs/daikin-tabs.js +3 -3
- package/dist/es-dev/components/text-area/daikin-text-area.d.ts +2 -12
- package/dist/es-dev/components/text-area/daikin-text-area.js +5 -14
- package/dist/es-dev/components/text-field/daikin-text-field.d.ts +28 -18
- package/dist/es-dev/components/text-field/daikin-text-field.js +150 -53
- package/dist/es-dev/components/toast-notification/daikin-toast-notification.d.ts +2 -0
- package/dist/es-dev/components/toast-notification/daikin-toast-notification.js +11 -8
- package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.d.ts +1 -1
- package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.js +2 -2
- package/dist/es-dev/components/toggle/daikin-toggle.d.ts +2 -12
- package/dist/es-dev/components/toggle/daikin-toggle.js +5 -14
- package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +3 -2
- package/dist/es-dev/components/tooltip/daikin-tooltip.js +13 -7
- package/dist/es-dev/components/tree/daikin-tree.js +1 -1
- package/dist/es-dev/components/tree-item/daikin-tree-item.js +1 -1
- package/dist/es-dev/components/tree-section/daikin-tree-section.d.ts +2 -0
- package/dist/es-dev/components/tree-section/daikin-tree-section.js +1 -1
- package/dist/es-dev/controllers/click-outside.js +3 -1
- package/dist/es-dev/controllers/focus-trap.d.ts +10 -0
- package/dist/es-dev/controllers/focus-trap.js +42 -0
- package/dist/es-dev/index.js +22 -0
- package/dist/es-dev/tailwind.css.js +1 -1
- package/dist/es-dev/utils/calendar-common.d.ts +64 -0
- package/dist/es-dev/utils/calendar-common.js +151 -0
- package/dist/es-dev/utils/is-similar-to-click.d.ts +1 -0
- package/dist/es-dev/utils/is-similar-to-click.js +4 -0
- package/dist/es-dev/utils/notification-common.d.ts +1 -1
- package/dist/es-dev/utils/notification-common.js +19 -15
- package/dist/es-dev/{components/tabs → utils}/scroller.d.ts +2 -2
- package/dist/es-dev/{components/tabs → utils}/scroller.js +20 -12
- package/icons/alarm.svg +3 -0
- package/icons/calendar.svg +3 -0
- package/icons/chevron-down.svg +3 -3
- package/icons/chevron-left.svg +2 -2
- package/icons/chevron-right.svg +2 -2
- package/icons/chevron-up.svg +2 -2
- package/icons/close.svg +3 -0
- package/icons/dropdown-chevron-down.svg +3 -3
- package/icons/error.svg +3 -0
- package/icons/information.svg +3 -0
- package/icons/logo-negative.svg +10 -0
- package/icons/logo-positive.svg +10 -0
- package/icons/password-hidden.svg +3 -0
- package/icons/password-visible.svg +3 -0
- package/icons/profile.svg +4 -0
- package/icons/pulldown-down.svg +3 -0
- package/icons/search.svg +3 -0
- package/icons/success.svg +3 -0
- package/icons/warning.svg +3 -0
- package/package.json +7 -3
- package/icons/cross.svg +0 -3
- package/icons/notification-close.svg +0 -5
- package/icons/status-alarm.svg +0 -5
- package/icons/status-error.svg +0 -3
- package/icons/status-information.svg +0 -5
- package/icons/status-negative.svg +0 -5
- package/icons/status-positive.svg +0 -5
- package/icons/status-warning.svg +0 -3
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const dom = require("@floating-ui/dom");
|
|
4
|
+
const classVarianceAuthority = require("class-variance-authority");
|
|
5
|
+
const lit = require("lit");
|
|
6
|
+
const decorators_js = require("lit/decorators.js");
|
|
7
|
+
const ifDefined_js = require("lit/directives/if-defined.js");
|
|
8
|
+
const ref_js = require("lit/directives/ref.js");
|
|
9
|
+
const ddsFormElement = require("../../base/dds-form-element.cjs");
|
|
10
|
+
const floatingUiAutoUpdate = require("../../controllers/floating-ui-auto-update.cjs");
|
|
11
|
+
const tailwind = require("../../tailwind.css.cjs");
|
|
12
|
+
const calendarCommon = require("../../utils/calendar-common.cjs");
|
|
13
|
+
const reDispatch = require("../../utils/re-dispatch.cjs");
|
|
14
|
+
require("../calendar/daikin-calendar.cjs");
|
|
15
|
+
require("../icon-button/daikin-icon-button.cjs");
|
|
16
|
+
var __defProp = Object.defineProperty;
|
|
17
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
18
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
19
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
20
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
21
|
+
if (decorator = decorators[i])
|
|
22
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
23
|
+
if (kind && result) __defProp(target, key, result);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
const DATE_ITEMS = [
|
|
27
|
+
{
|
|
28
|
+
type: "month",
|
|
29
|
+
range: [0, 2]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: "day",
|
|
33
|
+
range: [3, 5]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: "year",
|
|
37
|
+
range: [6, 10]
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
const PLACEHOLDER_YEAR = "YYYY";
|
|
41
|
+
const PLACEHOLDER_MONTH = "MM";
|
|
42
|
+
const PLACEHOLDER_DAY = "DD";
|
|
43
|
+
const PLACEHOLDER_ALL = formatPartsForUI({
|
|
44
|
+
year: PLACEHOLDER_YEAR,
|
|
45
|
+
month: PLACEHOLDER_MONTH,
|
|
46
|
+
day: PLACEHOLDER_DAY
|
|
47
|
+
});
|
|
48
|
+
const cvaField = classVarianceAuthority.cva(
|
|
49
|
+
[
|
|
50
|
+
"flex",
|
|
51
|
+
"items-center",
|
|
52
|
+
"size-full",
|
|
53
|
+
"bg-ddt-color-common-background-default",
|
|
54
|
+
"pl-4",
|
|
55
|
+
"pr-10",
|
|
56
|
+
"rounded",
|
|
57
|
+
"overflow-hidden",
|
|
58
|
+
"outline",
|
|
59
|
+
"outline-[--color-border]",
|
|
60
|
+
"outline-0",
|
|
61
|
+
"-outline-offset-2",
|
|
62
|
+
"placeholder:text-ddt-color-common-text-secondary",
|
|
63
|
+
// Define `--color-border` as a CSS variable that references `--color-state-focus` and `--color-base` in that order.
|
|
64
|
+
// `--color-base` indicates the color of the border when the element is normal, hovered, or disabled.
|
|
65
|
+
"define-[--color-state-focus,--color-base]/color-border",
|
|
66
|
+
"border",
|
|
67
|
+
"border-[--color-border]",
|
|
68
|
+
// Update `--color-base` depending on the state.
|
|
69
|
+
// The default `--color-base` and `--color-state-focus` values are defined in `variants.error` because they differ depending on whether or not the input has an error state.
|
|
70
|
+
"enabled:text-ddt-color-common-text-primary",
|
|
71
|
+
"enabled:hover:bg-ddt-color-common-surface-hover",
|
|
72
|
+
"enabled:active:bg-ddt-color-common-surface-press",
|
|
73
|
+
"focus-visible:outline-2",
|
|
74
|
+
"disabled:var-color-ddt-color-common-disabled/color-base",
|
|
75
|
+
"disabled:text-ddt-color-common-disabled",
|
|
76
|
+
"disabled:bg-ddt-color-common-background-default",
|
|
77
|
+
"disabled:placeholder:text-ddt-color-common-disabled"
|
|
78
|
+
],
|
|
79
|
+
{
|
|
80
|
+
variants: {
|
|
81
|
+
error: {
|
|
82
|
+
false: [
|
|
83
|
+
"enabled:var-color-ddt-color-common-neutral-default/color-base",
|
|
84
|
+
"focus-visible:var-color-ddt-color-common-border-focus/color-state-focus"
|
|
85
|
+
],
|
|
86
|
+
true: ["enabled:var-color-ddt-color-common-danger-default/color-base"]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
function parsePartsFromUIValue(value) {
|
|
92
|
+
const [month, day, year] = value.split("/");
|
|
93
|
+
return { year, month, day };
|
|
94
|
+
}
|
|
95
|
+
function formatPartsForUI({ year, month, day }) {
|
|
96
|
+
return `${month}/${day}/${year}`;
|
|
97
|
+
}
|
|
98
|
+
function tryParseDateFromUIValue(value) {
|
|
99
|
+
const { year, month, day } = parsePartsFromUIValue(value);
|
|
100
|
+
if (
|
|
101
|
+
// Prevent treating incomplete year entries (such as 0202) as valid.
|
|
102
|
+
// This also means that dates less than 1000 years ago cannot be handled.
|
|
103
|
+
!/^[1-9]\d\d\d$/.test(year) || !/^\d\d$/.test(month) || !/^\d\d$/.test(day)
|
|
104
|
+
) {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
const date = calendarCommon.parseDateFromProperty(`${year}-${month}-${day}`);
|
|
108
|
+
if (date.getUTCFullYear() !== Number(year) || date.getUTCMonth() + 1 !== Number(month) || date.getUTCDate() !== Number(day)) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
return date;
|
|
112
|
+
}
|
|
113
|
+
function formatDateForUI(date) {
|
|
114
|
+
return formatPartsForUI({
|
|
115
|
+
year: String(date.getUTCFullYear()).padStart(4, "0"),
|
|
116
|
+
month: String(date.getUTCMonth() + 1).padStart(2, "0"),
|
|
117
|
+
day: String(date.getUTCDate()).padStart(2, "0")
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
function getDateItemInSelection(selectionStart, selectionEnd) {
|
|
121
|
+
for (const { type, range } of DATE_ITEMS) {
|
|
122
|
+
if (range[0] <= selectionStart && selectionStart <= range[1] && range[0] <= selectionEnd && selectionEnd <= range[1]) {
|
|
123
|
+
return type;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
function handleDigitInput(parts, item, digit) {
|
|
129
|
+
switch (item) {
|
|
130
|
+
case "year": {
|
|
131
|
+
if (!parts.year.startsWith("0")) {
|
|
132
|
+
return {
|
|
133
|
+
parts: { ...parts, year: `000${digit}` },
|
|
134
|
+
done: false
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
const newYear = `${parts.year.slice(1)}${digit}`;
|
|
138
|
+
return {
|
|
139
|
+
parts: { ...parts, year: newYear },
|
|
140
|
+
done: !newYear.startsWith("0")
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
case "month":
|
|
144
|
+
if (parts.month === "01" && ["0", "1", "2"].includes(digit)) {
|
|
145
|
+
return {
|
|
146
|
+
parts: { ...parts, month: `1${digit}` },
|
|
147
|
+
done: true
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
if (digit !== "0") {
|
|
151
|
+
return {
|
|
152
|
+
parts: { ...parts, month: `0${digit}` },
|
|
153
|
+
done: digit !== "1"
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
break;
|
|
157
|
+
case "day":
|
|
158
|
+
if (["01", "02"].includes(parts.day) || parts.day === "03" && ["0", "1"].includes(digit)) {
|
|
159
|
+
return {
|
|
160
|
+
parts: {
|
|
161
|
+
...parts,
|
|
162
|
+
day: `${parts.day.slice(1)}${digit}`
|
|
163
|
+
},
|
|
164
|
+
done: true
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
if (parts.day === "03" && digit === "3" || digit === "0") {
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
return {
|
|
171
|
+
parts: { ...parts, day: `0${digit}` },
|
|
172
|
+
done: !["1", "2", "3"].includes(digit)
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
function handleOffsetInput(parts, item, offset2, viewDate, minDate, maxDate) {
|
|
178
|
+
if (offset2 === 0) {
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
const year = Number(parts.year);
|
|
182
|
+
const month = Number(parts.month);
|
|
183
|
+
const maxDay = isFinite(month) ? calendarCommon.countDaysForYearMonth(
|
|
184
|
+
isFinite(year) ? year : 2021,
|
|
185
|
+
// Assume not leap year
|
|
186
|
+
month - 1
|
|
187
|
+
) : 31;
|
|
188
|
+
const { nanDefault, min, max, length } = {
|
|
189
|
+
year: {
|
|
190
|
+
nanDefault: viewDate == null ? void 0 : viewDate.getUTCFullYear(),
|
|
191
|
+
min: minDate.getUTCFullYear(),
|
|
192
|
+
max: maxDate.getUTCFullYear(),
|
|
193
|
+
length: 4
|
|
194
|
+
},
|
|
195
|
+
month: {
|
|
196
|
+
nanDefault: null,
|
|
197
|
+
min: 1,
|
|
198
|
+
max: 12,
|
|
199
|
+
length: 2
|
|
200
|
+
},
|
|
201
|
+
day: {
|
|
202
|
+
nanDefault: null,
|
|
203
|
+
min: 1,
|
|
204
|
+
max: maxDay,
|
|
205
|
+
length: 2
|
|
206
|
+
}
|
|
207
|
+
}[item];
|
|
208
|
+
const value = Number(parts[item]);
|
|
209
|
+
let newValue;
|
|
210
|
+
if (isFinite(value)) {
|
|
211
|
+
const withOffset = value + offset2;
|
|
212
|
+
newValue = min <= withOffset && withOffset <= max ? withOffset : (
|
|
213
|
+
// Wrap around
|
|
214
|
+
offset2 > 0 ? min : max
|
|
215
|
+
);
|
|
216
|
+
} else {
|
|
217
|
+
newValue = nanDefault ?? (offset2 > 0 ? min : max);
|
|
218
|
+
}
|
|
219
|
+
return {
|
|
220
|
+
...parts,
|
|
221
|
+
[item]: String(Math.max(Math.min(newValue, max), min)).padStart(
|
|
222
|
+
length,
|
|
223
|
+
"0"
|
|
224
|
+
)
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSFormElement {
|
|
228
|
+
constructor() {
|
|
229
|
+
super(...arguments);
|
|
230
|
+
this.placeholder = null;
|
|
231
|
+
this.min = "";
|
|
232
|
+
this.max = "";
|
|
233
|
+
this.readonly = false;
|
|
234
|
+
this.disabled = false;
|
|
235
|
+
this.required = false;
|
|
236
|
+
this.error = false;
|
|
237
|
+
this.open = false;
|
|
238
|
+
this.defaultValue = null;
|
|
239
|
+
this._label = null;
|
|
240
|
+
this._currentSelection = "month";
|
|
241
|
+
this._autoUpdateController = new floatingUiAutoUpdate.FloatingUIAutoUpdateController(this);
|
|
242
|
+
this._dateInputElement = ref_js.createRef();
|
|
243
|
+
this._calendarElement = ref_js.createRef();
|
|
244
|
+
}
|
|
245
|
+
get _value() {
|
|
246
|
+
return calendarCommon.tryParseDateFromProperty(this.value);
|
|
247
|
+
}
|
|
248
|
+
get _min() {
|
|
249
|
+
return calendarCommon.tryParseDateFromProperty(this.min) ?? calendarCommon.parseDateFromProperty(calendarCommon.DEFAULT_MIN_DATE);
|
|
250
|
+
}
|
|
251
|
+
get _max() {
|
|
252
|
+
return calendarCommon.tryParseDateFromProperty(this.max) ?? calendarCommon.parseDateFromProperty(calendarCommon.DEFAULT_MAX_DATE);
|
|
253
|
+
}
|
|
254
|
+
get _defaultValue() {
|
|
255
|
+
return calendarCommon.tryParseDateFromProperty(this.defaultValue ?? "");
|
|
256
|
+
}
|
|
257
|
+
get _viewDate() {
|
|
258
|
+
var _a;
|
|
259
|
+
return ((_a = this._calendarElement.value) == null ? void 0 : _a.viewDate) ?? null;
|
|
260
|
+
}
|
|
261
|
+
get _open() {
|
|
262
|
+
return this.open && !this.disabled && !this.readonly;
|
|
263
|
+
}
|
|
264
|
+
_openCalendar() {
|
|
265
|
+
if (this.disabled || this.readonly) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
this.open = true;
|
|
269
|
+
}
|
|
270
|
+
_emitSelect() {
|
|
271
|
+
this.dispatchEvent(
|
|
272
|
+
new Event("select", {
|
|
273
|
+
bubbles: true,
|
|
274
|
+
composed: true
|
|
275
|
+
})
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
_handleFocusIn(event) {
|
|
279
|
+
const target = event.target;
|
|
280
|
+
this._updateInputSelection(target);
|
|
281
|
+
}
|
|
282
|
+
_handleFocusOut(event) {
|
|
283
|
+
const target = event.target;
|
|
284
|
+
if (target.value === PLACEHOLDER_ALL) {
|
|
285
|
+
target.value = "";
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
_handleChange(event) {
|
|
289
|
+
this._updateValue(event);
|
|
290
|
+
}
|
|
291
|
+
_handleMouseUp(event) {
|
|
292
|
+
var _a, _b;
|
|
293
|
+
event.preventDefault();
|
|
294
|
+
const selectionStart = ((_a = this._dateInputElement.value) == null ? void 0 : _a.selectionStart) ?? 0;
|
|
295
|
+
const selectionEnd = ((_b = this._dateInputElement.value) == null ? void 0 : _b.selectionEnd) ?? 0;
|
|
296
|
+
const dateItemInSelection = getDateItemInSelection(
|
|
297
|
+
selectionStart,
|
|
298
|
+
selectionEnd
|
|
299
|
+
);
|
|
300
|
+
if (event.target.value === PLACEHOLDER_ALL && !dateItemInSelection) {
|
|
301
|
+
this._updateSelection("month");
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
if (dateItemInSelection) {
|
|
305
|
+
this._updateSelection(dateItemInSelection);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
_handleKeyDown(event) {
|
|
309
|
+
if (this.readonly) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
const target = event.target;
|
|
313
|
+
const key = event.key;
|
|
314
|
+
const parts = parsePartsFromUIValue(target.value);
|
|
315
|
+
if (key === "Backspace") {
|
|
316
|
+
event.preventDefault();
|
|
317
|
+
const itemToRemove = this._currentSelection;
|
|
318
|
+
const placeholder = {
|
|
319
|
+
year: PLACEHOLDER_YEAR,
|
|
320
|
+
month: PLACEHOLDER_MONTH,
|
|
321
|
+
day: PLACEHOLDER_DAY
|
|
322
|
+
}[itemToRemove];
|
|
323
|
+
if (parts[itemToRemove] !== placeholder) {
|
|
324
|
+
target.value = formatPartsForUI({
|
|
325
|
+
...parts,
|
|
326
|
+
[itemToRemove]: placeholder
|
|
327
|
+
});
|
|
328
|
+
this._updateSelection(itemToRemove);
|
|
329
|
+
}
|
|
330
|
+
this._updateValue(event);
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
if (/^\d$/.test(key)) {
|
|
334
|
+
event.preventDefault();
|
|
335
|
+
const newState = handleDigitInput(parts, this._currentSelection, key);
|
|
336
|
+
if (newState) {
|
|
337
|
+
target.value = formatPartsForUI(newState.parts);
|
|
338
|
+
const currentIndex = DATE_ITEMS.findIndex(
|
|
339
|
+
({ type }) => type === this._currentSelection
|
|
340
|
+
);
|
|
341
|
+
const nextIndex = currentIndex >= 0 ? Math.min(currentIndex + 1, DATE_ITEMS.length - 1) : -1;
|
|
342
|
+
this._updateSelection(
|
|
343
|
+
newState.done && nextIndex >= 0 ? DATE_ITEMS[nextIndex].type : this._currentSelection
|
|
344
|
+
);
|
|
345
|
+
}
|
|
346
|
+
this._updateValue(event);
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
const moveOffset = {
|
|
350
|
+
ArrowLeft: -1,
|
|
351
|
+
ArrowRight: 1
|
|
352
|
+
}[key];
|
|
353
|
+
if (moveOffset) {
|
|
354
|
+
event.preventDefault();
|
|
355
|
+
const currentIndex = DATE_ITEMS.findIndex(
|
|
356
|
+
({ type }) => type === this._currentSelection
|
|
357
|
+
);
|
|
358
|
+
const newIndex = currentIndex >= 0 ? Math.min(
|
|
359
|
+
Math.max(currentIndex + moveOffset, 0),
|
|
360
|
+
DATE_ITEMS.length - 1
|
|
361
|
+
) : 0;
|
|
362
|
+
this._updateSelection(DATE_ITEMS[newIndex].type);
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
const countOffset = {
|
|
366
|
+
ArrowUp: 1,
|
|
367
|
+
ArrowDown: -1
|
|
368
|
+
}[key];
|
|
369
|
+
if (countOffset) {
|
|
370
|
+
event.preventDefault();
|
|
371
|
+
const newParts = handleOffsetInput(
|
|
372
|
+
parts,
|
|
373
|
+
this._currentSelection,
|
|
374
|
+
countOffset,
|
|
375
|
+
this._viewDate,
|
|
376
|
+
this._min,
|
|
377
|
+
this._max
|
|
378
|
+
);
|
|
379
|
+
if (newParts) {
|
|
380
|
+
target.value = formatPartsForUI(newParts);
|
|
381
|
+
this._updateSelection(this._currentSelection);
|
|
382
|
+
}
|
|
383
|
+
this._updateValue(event);
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
if (key.length <= 1) {
|
|
387
|
+
event.preventDefault();
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
// Depending on the PC settings, a period may be entered when the space key is pressed repeatedly, so this is stopped.
|
|
392
|
+
// When this happens, the selection range changes, so this is also reset.
|
|
393
|
+
_handleBeforeInput(event) {
|
|
394
|
+
event.preventDefault();
|
|
395
|
+
this._updateInputSelection(event.target);
|
|
396
|
+
}
|
|
397
|
+
_handleSelect(event) {
|
|
398
|
+
event.stopPropagation();
|
|
399
|
+
const calendar = event.target;
|
|
400
|
+
if (!calendar.value) {
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
const target = this._dateInputElement.value;
|
|
404
|
+
const value = calendarCommon.parseDateFromProperty(calendar.value);
|
|
405
|
+
this.value = calendarCommon.formatDateForProperty(value);
|
|
406
|
+
target.value = formatDateForUI(value);
|
|
407
|
+
this.error = false;
|
|
408
|
+
if (event.type === "select") {
|
|
409
|
+
this.open = false;
|
|
410
|
+
}
|
|
411
|
+
this._emitSelect();
|
|
412
|
+
}
|
|
413
|
+
_handleToggle(event) {
|
|
414
|
+
if (reDispatch.reDispatch(this, event, new ToggleEvent("toggle", event))) {
|
|
415
|
+
this.open = event.newState === "open";
|
|
416
|
+
const calendar = this._calendarElement.value;
|
|
417
|
+
if (calendar) {
|
|
418
|
+
calendar.view = "day";
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
_updateValue(event) {
|
|
423
|
+
const target = event.target;
|
|
424
|
+
if (target.value === PLACEHOLDER_ALL) {
|
|
425
|
+
this.error = false;
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
const newDate = tryParseDateFromUIValue(target.value);
|
|
429
|
+
if (!newDate || calendarCommon.isDateOutOfRange(newDate, this._min, this._max)) {
|
|
430
|
+
this.error = true;
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
this.error = false;
|
|
434
|
+
this.value = calendarCommon.formatDateForProperty(newDate);
|
|
435
|
+
this.open = false;
|
|
436
|
+
this._emitSelect();
|
|
437
|
+
}
|
|
438
|
+
_updateInputSelection(target) {
|
|
439
|
+
var _a;
|
|
440
|
+
const selection = window.getSelection();
|
|
441
|
+
if (!selection) {
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
if (target.value === "") {
|
|
445
|
+
target.value = PLACEHOLDER_ALL;
|
|
446
|
+
}
|
|
447
|
+
const itemInfo = DATE_ITEMS[0];
|
|
448
|
+
(_a = this._dateInputElement.value) == null ? void 0 : _a.setSelectionRange(
|
|
449
|
+
itemInfo.range[0],
|
|
450
|
+
itemInfo.range[1]
|
|
451
|
+
);
|
|
452
|
+
this._currentSelection = itemInfo.type;
|
|
453
|
+
}
|
|
454
|
+
_updateSelection(dateItem) {
|
|
455
|
+
var _a;
|
|
456
|
+
const selection = window.getSelection();
|
|
457
|
+
if (!selection) {
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
const itemInfo = DATE_ITEMS.find(({ type }) => type === dateItem);
|
|
461
|
+
if (itemInfo) {
|
|
462
|
+
(_a = this._dateInputElement.value) == null ? void 0 : _a.setSelectionRange(
|
|
463
|
+
itemInfo.range[0],
|
|
464
|
+
itemInfo.range[1]
|
|
465
|
+
);
|
|
466
|
+
this._currentSelection = itemInfo.type;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
render() {
|
|
470
|
+
const min = this._min;
|
|
471
|
+
const max = this._max;
|
|
472
|
+
return lit.html`<div
|
|
473
|
+
class="size-full relative font-daikinSerif"
|
|
474
|
+
${this._autoUpdateController.refReference()}
|
|
475
|
+
>
|
|
476
|
+
<input
|
|
477
|
+
${ref_js.ref(this._dateInputElement)}
|
|
478
|
+
class=${cvaField({ error: this.error })}
|
|
479
|
+
type="text"
|
|
480
|
+
placeholder=${ifDefined_js.ifDefined(this.placeholder ?? void 0)}
|
|
481
|
+
name=${this.name}
|
|
482
|
+
aria-label=${ifDefined_js.ifDefined(this._label ?? void 0)}
|
|
483
|
+
.value=${this._value ? formatDateForUI(this._value) : ""}
|
|
484
|
+
?disabled=${this.disabled}
|
|
485
|
+
?readonly=${this.readonly}
|
|
486
|
+
?required=${this.required}
|
|
487
|
+
@change=${this._handleChange}
|
|
488
|
+
@focusin=${this._handleFocusIn}
|
|
489
|
+
@focusout=${this._handleFocusOut}
|
|
490
|
+
@keydown=${this._handleKeyDown}
|
|
491
|
+
@beforeinput=${this._handleBeforeInput}
|
|
492
|
+
@mouseup=${this._handleMouseUp}
|
|
493
|
+
/>
|
|
494
|
+
<daikin-icon-button
|
|
495
|
+
class="absolute top-0 bottom-0 right-2 m-auto"
|
|
496
|
+
type="button"
|
|
497
|
+
color="neutral"
|
|
498
|
+
variant="ghost"
|
|
499
|
+
button-aria-label="Open the date picker"
|
|
500
|
+
?disabled=${this.disabled}
|
|
501
|
+
@click=${this._openCalendar}
|
|
502
|
+
>
|
|
503
|
+
<span class=${calendarCommon.cvaIconButton({ intent: "calender" })}></span>
|
|
504
|
+
</daikin-icon-button>
|
|
505
|
+
</div>
|
|
506
|
+
<daikin-calendar
|
|
507
|
+
${ref_js.ref(this._calendarElement)}
|
|
508
|
+
id="calendar"
|
|
509
|
+
.value=${this._value ? calendarCommon.formatDateForProperty(this._value) : null}
|
|
510
|
+
min=${calendarCommon.formatDateForProperty(min)}
|
|
511
|
+
max=${calendarCommon.formatDateForProperty(max)}
|
|
512
|
+
default-value=${ifDefined_js.ifDefined(
|
|
513
|
+
this._defaultValue ? calendarCommon.formatDateForProperty(this._defaultValue) : void 0
|
|
514
|
+
)}
|
|
515
|
+
popover
|
|
516
|
+
class="absolute left-[--floating-x,0] top-[--floating-y,0]"
|
|
517
|
+
@toggle=${this._handleToggle}
|
|
518
|
+
@select=${this._handleSelect}
|
|
519
|
+
@selecting=${this._handleSelect}
|
|
520
|
+
${this._autoUpdateController.refFloating()}
|
|
521
|
+
>
|
|
522
|
+
</daikin-calendar>
|
|
523
|
+
${// Activate auto update only when the calendar is open.
|
|
524
|
+
// TODO: refactor here with CSS Anchor Positioning instead of using floating-ui
|
|
525
|
+
this._autoUpdateController.directive(
|
|
526
|
+
{
|
|
527
|
+
placement: "bottom-start",
|
|
528
|
+
middleware: [dom.offset({ mainAxis: 0 })]
|
|
529
|
+
},
|
|
530
|
+
this._open
|
|
531
|
+
)}`;
|
|
532
|
+
}
|
|
533
|
+
willUpdate(changedProperties) {
|
|
534
|
+
if (changedProperties.has("open") || changedProperties.has("disabled") || changedProperties.has("readonly")) {
|
|
535
|
+
this.open = this._open;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
updated(changedProperties) {
|
|
539
|
+
var _a;
|
|
540
|
+
if (changedProperties.has("open") || changedProperties.has("disabled") || changedProperties.has("readonly")) {
|
|
541
|
+
(_a = this._autoUpdateController.floatingElement) == null ? void 0 : _a.togglePopover(this._open);
|
|
542
|
+
}
|
|
543
|
+
if (changedProperties.has("value")) {
|
|
544
|
+
this.setFormValue(this.value);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* This method is used by `daikin-input-group` to reflect it's attributes to this component.
|
|
549
|
+
* @private
|
|
550
|
+
*/
|
|
551
|
+
reflectInputGroup(inputGroup) {
|
|
552
|
+
const isError = !inputGroup.disabled && !!inputGroup.error;
|
|
553
|
+
this.disabled = !!inputGroup.disabled;
|
|
554
|
+
this.required = !!inputGroup.required;
|
|
555
|
+
this.error = isError;
|
|
556
|
+
this._label = inputGroup.label;
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
exports.DaikinDatePicker.styles = lit.css`
|
|
560
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
561
|
+
|
|
562
|
+
:host {
|
|
563
|
+
display: flex;
|
|
564
|
+
align-items: center;
|
|
565
|
+
height: 3rem;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
daikin-calendar[popover] {
|
|
569
|
+
display: none;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
daikin-calendar[popover]:popover-open {
|
|
573
|
+
display: flex;
|
|
574
|
+
}
|
|
575
|
+
`;
|
|
576
|
+
__decorateClass([
|
|
577
|
+
decorators_js.property({ type: String, reflect: true })
|
|
578
|
+
], exports.DaikinDatePicker.prototype, "placeholder", 2);
|
|
579
|
+
__decorateClass([
|
|
580
|
+
decorators_js.property({ type: String, reflect: true })
|
|
581
|
+
], exports.DaikinDatePicker.prototype, "min", 2);
|
|
582
|
+
__decorateClass([
|
|
583
|
+
decorators_js.property({ type: String, reflect: true })
|
|
584
|
+
], exports.DaikinDatePicker.prototype, "max", 2);
|
|
585
|
+
__decorateClass([
|
|
586
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
587
|
+
], exports.DaikinDatePicker.prototype, "readonly", 2);
|
|
588
|
+
__decorateClass([
|
|
589
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
590
|
+
], exports.DaikinDatePicker.prototype, "disabled", 2);
|
|
591
|
+
__decorateClass([
|
|
592
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
593
|
+
], exports.DaikinDatePicker.prototype, "required", 2);
|
|
594
|
+
__decorateClass([
|
|
595
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
596
|
+
], exports.DaikinDatePicker.prototype, "error", 2);
|
|
597
|
+
__decorateClass([
|
|
598
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
599
|
+
], exports.DaikinDatePicker.prototype, "open", 2);
|
|
600
|
+
__decorateClass([
|
|
601
|
+
decorators_js.property({ type: String, reflect: true, attribute: "default-value" })
|
|
602
|
+
], exports.DaikinDatePicker.prototype, "defaultValue", 2);
|
|
603
|
+
__decorateClass([
|
|
604
|
+
decorators_js.state()
|
|
605
|
+
], exports.DaikinDatePicker.prototype, "_label", 2);
|
|
606
|
+
__decorateClass([
|
|
607
|
+
decorators_js.state()
|
|
608
|
+
], exports.DaikinDatePicker.prototype, "_currentSelection", 2);
|
|
609
|
+
exports.DaikinDatePicker = __decorateClass([
|
|
610
|
+
decorators_js.customElement("daikin-date-picker")
|
|
611
|
+
], exports.DaikinDatePicker);
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { DDSFormElement } from "../../base/dds-form-element.cjs";
|
|
3
|
+
import { DaikinInputGroup } from "../input-group/daikin-input-group.cjs";
|
|
4
|
+
/**
|
|
5
|
+
* The date picker component provides a date selection function that can be combined with forms. This component uses `daikin-calendar` internally (users do not need to nest this).
|
|
6
|
+
*
|
|
7
|
+
* @fires select - Fires when the date is selected.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
*
|
|
11
|
+
* ```js
|
|
12
|
+
* import "@daikin-oss/design-system-web-components/components/date-picker/index.js";
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ```html
|
|
16
|
+
* <daikin-date-picker></daikin-date-picker>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare class DaikinDatePicker extends DDSFormElement {
|
|
20
|
+
static readonly styles: import('lit').CSSResult;
|
|
21
|
+
/**
|
|
22
|
+
* The placeholder text.
|
|
23
|
+
*/
|
|
24
|
+
placeholder: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* The minimum date.
|
|
27
|
+
* example: `1900-01-01`
|
|
28
|
+
*/
|
|
29
|
+
min: string;
|
|
30
|
+
/**
|
|
31
|
+
* The maximum date.
|
|
32
|
+
* example: `2099-12-31`
|
|
33
|
+
*/
|
|
34
|
+
max: string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the text field is readonly.
|
|
37
|
+
*/
|
|
38
|
+
readonly: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the text field is disabled.
|
|
41
|
+
* Controlled by `daikin-input-group` when used within `daikin-input-group`.
|
|
42
|
+
*/
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the text field is required.
|
|
46
|
+
* Controlled by `daikin-input-group` when used within `daikin-input-group`.
|
|
47
|
+
*/
|
|
48
|
+
required: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Whether or not to display error states.
|
|
51
|
+
* Ignored if the `disabled` is `true`.
|
|
52
|
+
* Controlled by `daikin-input-group` when used within `daikin-input-group`.
|
|
53
|
+
*/
|
|
54
|
+
error: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the date picker is open.
|
|
57
|
+
*/
|
|
58
|
+
open: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* The month that is initially displayed when the date picker is opened.
|
|
61
|
+
* If there is a `value` attribute, this is ignored.
|
|
62
|
+
*/
|
|
63
|
+
defaultValue: string | null;
|
|
64
|
+
/**
|
|
65
|
+
* The label text used as the value of aria-label.
|
|
66
|
+
* Set automatically by `reflectInputGroup` method.
|
|
67
|
+
*/
|
|
68
|
+
private _label;
|
|
69
|
+
private _currentSelection;
|
|
70
|
+
private _autoUpdateController;
|
|
71
|
+
private _dateInputElement;
|
|
72
|
+
private _calendarElement;
|
|
73
|
+
private get _value();
|
|
74
|
+
private get _min();
|
|
75
|
+
private get _max();
|
|
76
|
+
private get _defaultValue();
|
|
77
|
+
private get _viewDate();
|
|
78
|
+
private get _open();
|
|
79
|
+
private _openCalendar;
|
|
80
|
+
private _emitSelect;
|
|
81
|
+
private _handleFocusIn;
|
|
82
|
+
private _handleFocusOut;
|
|
83
|
+
private _handleChange;
|
|
84
|
+
private _handleMouseUp;
|
|
85
|
+
private _handleKeyDown;
|
|
86
|
+
private _handleBeforeInput;
|
|
87
|
+
private _handleSelect;
|
|
88
|
+
private _handleToggle;
|
|
89
|
+
private _updateValue;
|
|
90
|
+
private _updateInputSelection;
|
|
91
|
+
private _updateSelection;
|
|
92
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
93
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
94
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
95
|
+
/**
|
|
96
|
+
* This method is used by `daikin-input-group` to reflect it's attributes to this component.
|
|
97
|
+
* @private
|
|
98
|
+
*/
|
|
99
|
+
reflectInputGroup(inputGroup: DaikinInputGroup): void;
|
|
100
|
+
}
|
|
101
|
+
declare global {
|
|
102
|
+
interface HTMLElementTagNameMap {
|
|
103
|
+
"daikin-date-picker": DaikinDatePicker;
|
|
104
|
+
}
|
|
105
|
+
}
|