@daikin-oss/design-system-web-components 0.3.2 → 0.5.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 +104 -0
- package/dist/cjs/components/accordion/daikin-accordion.cjs +24 -6
- package/dist/cjs/components/accordion/daikin-accordion.d.ts +15 -9
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +106 -59
- package/dist/cjs/components/accordion-item/daikin-accordion-item.d.ts +28 -13
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +3 -6
- package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.ts +4 -0
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +38 -30
- package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +12 -2
- package/dist/cjs/components/button/daikin-button.cjs +89 -128
- package/dist/cjs/components/button/daikin-button.d.ts +30 -27
- package/dist/cjs/components/checkbox/daikin-checkbox.cjs +100 -119
- package/dist/cjs/components/checkbox/daikin-checkbox.d.ts +27 -38
- package/dist/cjs/components/dropdown/daikin-dropdown.cjs +367 -0
- package/dist/cjs/components/dropdown/daikin-dropdown.d.ts +100 -0
- package/dist/cjs/components/dropdown/index.cjs +7 -0
- package/dist/cjs/components/dropdown/index.d.ts +1 -0
- package/dist/cjs/components/dropdown-item/daikin-dropdown-item.cjs +112 -0
- package/dist/cjs/components/dropdown-item/daikin-dropdown-item.d.ts +42 -0
- package/dist/cjs/components/dropdown-item/index.cjs +7 -0
- package/dist/cjs/components/dropdown-item/index.d.ts +1 -0
- package/dist/cjs/components/icon/daikin-icon.d.ts +4 -0
- package/dist/cjs/components/icon/icons.json.cjs +29 -5
- package/dist/cjs/components/icon/icons.json.d.ts +29 -5
- package/dist/cjs/components/index.cjs +49 -14
- package/dist/cjs/components/index.d.ts +11 -4
- package/dist/cjs/components/input-group/daikin-input-group.cjs +103 -46
- package/dist/cjs/components/input-group/daikin-input-group.d.ts +69 -25
- package/dist/cjs/components/list/daikin-list.cjs +24 -0
- package/dist/cjs/components/list/daikin-list.d.ts +28 -0
- package/dist/cjs/components/list/index.cjs +7 -0
- package/dist/cjs/components/list/index.d.ts +1 -0
- package/dist/cjs/components/list-item/daikin-list-item.cjs +131 -0
- package/dist/cjs/components/list-item/daikin-list-item.d.ts +64 -0
- package/dist/cjs/components/list-item/index.cjs +7 -0
- package/dist/cjs/components/list-item/index.d.ts +1 -0
- package/dist/cjs/components/notification/daikin-notification.cjs +14 -15
- package/dist/cjs/components/notification/daikin-notification.d.ts +13 -11
- package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +53 -29
- package/dist/cjs/components/progress-bar/daikin-progress-bar.d.ts +32 -10
- package/dist/cjs/components/progress-indicator/daikin-progress-indicator.cjs +75 -0
- package/dist/cjs/components/progress-indicator/daikin-progress-indicator.d.ts +47 -0
- package/dist/cjs/components/progress-indicator/index.cjs +7 -0
- package/dist/cjs/components/progress-indicator/index.d.ts +1 -0
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +92 -0
- package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +44 -0
- package/dist/cjs/components/progress-indicator-item/index.cjs +7 -0
- package/dist/cjs/components/progress-indicator-item/index.d.ts +1 -0
- package/dist/cjs/components/radio/daikin-radio.cjs +92 -90
- package/dist/cjs/components/radio/daikin-radio.d.ts +33 -35
- package/dist/cjs/components/radio-group/daikin-radio-group.cjs +144 -0
- package/dist/cjs/components/radio-group/daikin-radio-group.d.ts +82 -0
- package/dist/cjs/components/radio-group/index.cjs +7 -0
- package/dist/cjs/components/radio-group/index.d.ts +1 -0
- package/dist/cjs/components/select/daikin-select.cjs +160 -0
- package/dist/cjs/components/select/daikin-select.d.ts +60 -0
- package/dist/cjs/components/select/index.cjs +7 -0
- package/dist/cjs/components/select/index.d.ts +1 -0
- package/dist/cjs/components/tab/daikin-tab.cjs +48 -48
- package/dist/cjs/components/tab/daikin-tab.d.ts +12 -12
- package/dist/cjs/components/{panel-switcher/daikin-panel-switcher.cjs → tab-panels/daikin-tab-panels.cjs} +8 -8
- package/dist/cjs/components/tab-panels/daikin-tab-panels.d.ts +56 -0
- package/dist/cjs/components/tab-panels/index.cjs +7 -0
- package/dist/cjs/components/tab-panels/index.d.ts +1 -0
- package/dist/cjs/components/{tab-group/daikin-tab-group.cjs → tabs/daikin-tabs.cjs} +35 -36
- package/dist/{es-dev/components/tab-group/daikin-tab-group.d.ts → cjs/components/tabs/daikin-tabs.d.ts} +27 -25
- package/dist/cjs/components/tabs/index.cjs +7 -0
- package/dist/cjs/components/tabs/index.d.ts +1 -0
- package/dist/cjs/components/text-area/daikin-text-area.cjs +164 -0
- package/dist/cjs/components/text-area/daikin-text-area.d.ts +82 -0
- package/dist/cjs/components/text-area/index.cjs +7 -0
- package/dist/cjs/components/text-area/index.d.ts +1 -0
- package/dist/cjs/components/text-field/daikin-text-field.cjs +211 -0
- package/dist/cjs/components/text-field/daikin-text-field.d.ts +94 -0
- package/dist/cjs/components/text-field/index.cjs +7 -0
- package/dist/cjs/components/text-field/index.d.ts +1 -0
- package/dist/cjs/components/toggle/daikin-toggle.cjs +44 -68
- package/dist/cjs/components/toggle/daikin-toggle.d.ts +15 -26
- package/dist/cjs/components/tooltip/daikin-tooltip.cjs +77 -70
- package/dist/cjs/components/tooltip/daikin-tooltip.d.ts +39 -15
- package/dist/cjs/controllers/click-outside.cjs +29 -0
- package/dist/cjs/controllers/click-outside.d.ts +37 -0
- package/dist/cjs/controllers/floating-ui-auto-update.cjs +75 -0
- package/dist/cjs/controllers/floating-ui-auto-update.d.ts +22 -0
- package/dist/cjs/controllers/helpers/controller-directive.cjs +50 -0
- package/dist/cjs/controllers/helpers/controller-directive.d.ts +12 -0
- package/dist/cjs/index.cjs +49 -14
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs/utils/reDispatch.cjs +10 -0
- package/dist/cjs/utils/reDispatch.d.ts +1 -0
- package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +24 -6
- package/dist/cjs-dev/components/accordion/daikin-accordion.d.ts +15 -9
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +106 -59
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.ts +28 -13
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +3 -6
- package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.ts +4 -0
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +38 -30
- package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +12 -2
- package/dist/cjs-dev/components/button/daikin-button.cjs +89 -128
- package/dist/cjs-dev/components/button/daikin-button.d.ts +30 -27
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +100 -119
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.ts +27 -38
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +367 -0
- package/dist/cjs-dev/components/dropdown/daikin-dropdown.d.ts +100 -0
- package/dist/cjs-dev/components/dropdown/index.cjs +7 -0
- package/dist/cjs-dev/components/dropdown/index.d.ts +1 -0
- package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.cjs +112 -0
- package/dist/cjs-dev/components/dropdown-item/daikin-dropdown-item.d.ts +42 -0
- package/dist/cjs-dev/components/dropdown-item/index.cjs +7 -0
- package/dist/cjs-dev/components/dropdown-item/index.d.ts +1 -0
- package/dist/cjs-dev/components/icon/daikin-icon.d.ts +4 -0
- package/dist/cjs-dev/components/icon/icons.json.cjs +29 -5
- package/dist/cjs-dev/components/icon/icons.json.d.ts +29 -5
- package/dist/cjs-dev/components/index.cjs +49 -14
- package/dist/cjs-dev/components/index.d.ts +11 -4
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +103 -46
- package/dist/cjs-dev/components/input-group/daikin-input-group.d.ts +69 -25
- package/dist/cjs-dev/components/list/daikin-list.cjs +24 -0
- package/dist/cjs-dev/components/list/daikin-list.d.ts +28 -0
- package/dist/cjs-dev/components/list/index.cjs +7 -0
- package/dist/cjs-dev/components/list/index.d.ts +1 -0
- package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +131 -0
- package/dist/cjs-dev/components/list-item/daikin-list-item.d.ts +64 -0
- package/dist/cjs-dev/components/list-item/index.cjs +7 -0
- package/dist/cjs-dev/components/list-item/index.d.ts +1 -0
- package/dist/cjs-dev/components/notification/daikin-notification.cjs +14 -15
- package/dist/cjs-dev/components/notification/daikin-notification.d.ts +13 -11
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +53 -29
- package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.d.ts +32 -10
- package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.cjs +85 -0
- package/dist/cjs-dev/components/progress-indicator/daikin-progress-indicator.d.ts +47 -0
- package/dist/cjs-dev/components/progress-indicator/index.cjs +7 -0
- package/dist/cjs-dev/components/progress-indicator/index.d.ts +1 -0
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +92 -0
- package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +44 -0
- package/dist/cjs-dev/components/progress-indicator-item/index.cjs +7 -0
- package/dist/cjs-dev/components/progress-indicator-item/index.d.ts +1 -0
- package/dist/cjs-dev/components/radio/daikin-radio.cjs +92 -90
- package/dist/cjs-dev/components/radio/daikin-radio.d.ts +33 -35
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.cjs +144 -0
- package/dist/cjs-dev/components/radio-group/daikin-radio-group.d.ts +82 -0
- package/dist/cjs-dev/components/radio-group/index.cjs +7 -0
- package/dist/cjs-dev/components/radio-group/index.d.ts +1 -0
- package/dist/cjs-dev/components/select/daikin-select.cjs +160 -0
- package/dist/cjs-dev/components/select/daikin-select.d.ts +60 -0
- package/dist/cjs-dev/components/select/index.cjs +7 -0
- package/dist/cjs-dev/components/select/index.d.ts +1 -0
- package/dist/cjs-dev/components/tab/daikin-tab.cjs +48 -48
- package/dist/cjs-dev/components/tab/daikin-tab.d.ts +12 -12
- package/dist/cjs-dev/components/{panel-switcher/daikin-panel-switcher.cjs → tab-panels/daikin-tab-panels.cjs} +9 -9
- package/dist/cjs-dev/components/tab-panels/daikin-tab-panels.d.ts +56 -0
- package/dist/cjs-dev/components/tab-panels/index.cjs +7 -0
- package/dist/cjs-dev/components/tab-panels/index.d.ts +1 -0
- package/dist/cjs-dev/components/{tab-group/daikin-tab-group.cjs → tabs/daikin-tabs.cjs} +37 -38
- package/dist/{cjs/components/tab-group/daikin-tab-group.d.ts → cjs-dev/components/tabs/daikin-tabs.d.ts} +27 -25
- package/dist/cjs-dev/components/tabs/index.cjs +7 -0
- package/dist/cjs-dev/components/tabs/index.d.ts +1 -0
- package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +164 -0
- package/dist/cjs-dev/components/text-area/daikin-text-area.d.ts +82 -0
- package/dist/cjs-dev/components/text-area/index.cjs +7 -0
- package/dist/cjs-dev/components/text-area/index.d.ts +1 -0
- package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +211 -0
- package/dist/cjs-dev/components/text-field/daikin-text-field.d.ts +94 -0
- package/dist/cjs-dev/components/text-field/index.cjs +7 -0
- package/dist/cjs-dev/components/text-field/index.d.ts +1 -0
- package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +44 -68
- package/dist/cjs-dev/components/toggle/daikin-toggle.d.ts +15 -26
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +77 -70
- package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.ts +39 -15
- package/dist/cjs-dev/controllers/click-outside.cjs +29 -0
- package/dist/cjs-dev/controllers/click-outside.d.ts +37 -0
- package/dist/cjs-dev/controllers/floating-ui-auto-update.cjs +82 -0
- package/dist/cjs-dev/controllers/floating-ui-auto-update.d.ts +22 -0
- package/dist/cjs-dev/controllers/helpers/controller-directive.cjs +50 -0
- package/dist/cjs-dev/controllers/helpers/controller-directive.d.ts +12 -0
- package/dist/cjs-dev/index.cjs +49 -14
- package/dist/cjs-dev/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/utils/reDispatch.cjs +10 -0
- package/dist/cjs-dev/utils/reDispatch.d.ts +1 -0
- package/dist/es/components/accordion/daikin-accordion.d.ts +15 -9
- package/dist/es/components/accordion/daikin-accordion.js +25 -7
- package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +28 -13
- package/dist/es/components/accordion-item/daikin-accordion-item.js +107 -60
- package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +4 -0
- package/dist/es/components/breadcrumb/daikin-breadcrumb.js +3 -6
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +12 -2
- package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +38 -30
- package/dist/es/components/button/daikin-button.d.ts +30 -27
- package/dist/es/components/button/daikin-button.js +90 -129
- package/dist/es/components/checkbox/daikin-checkbox.d.ts +27 -38
- package/dist/es/components/checkbox/daikin-checkbox.js +102 -121
- package/dist/es/components/dropdown/daikin-dropdown.d.ts +100 -0
- package/dist/es/components/dropdown/daikin-dropdown.js +368 -0
- package/dist/es/components/dropdown/index.d.ts +1 -0
- package/dist/es/components/dropdown/index.js +4 -0
- package/dist/es/components/dropdown-item/daikin-dropdown-item.d.ts +42 -0
- package/dist/es/components/dropdown-item/daikin-dropdown-item.js +113 -0
- package/dist/es/components/dropdown-item/index.d.ts +1 -0
- package/dist/es/components/dropdown-item/index.js +4 -0
- package/dist/es/components/icon/daikin-icon.d.ts +4 -0
- package/dist/es/components/icon/icons.json.d.ts +29 -5
- package/dist/es/components/icon/icons.json.js +29 -5
- package/dist/es/components/index.d.ts +11 -4
- package/dist/es/components/index.js +22 -8
- package/dist/es/components/input-group/daikin-input-group.d.ts +69 -25
- package/dist/es/components/input-group/daikin-input-group.js +105 -48
- package/dist/es/components/list/daikin-list.d.ts +28 -0
- package/dist/es/components/list/daikin-list.js +25 -0
- package/dist/es/components/list/index.d.ts +1 -0
- package/dist/es/components/list/index.js +4 -0
- package/dist/es/components/list-item/daikin-list-item.d.ts +64 -0
- package/dist/es/components/list-item/daikin-list-item.js +132 -0
- package/dist/es/components/list-item/index.d.ts +1 -0
- package/dist/es/components/list-item/index.js +4 -0
- package/dist/es/components/notification/daikin-notification.d.ts +13 -11
- package/dist/es/components/notification/daikin-notification.js +15 -16
- package/dist/es/components/progress-bar/daikin-progress-bar.d.ts +32 -10
- package/dist/es/components/progress-bar/daikin-progress-bar.js +53 -29
- package/dist/es/components/progress-indicator/daikin-progress-indicator.d.ts +47 -0
- package/dist/es/components/progress-indicator/daikin-progress-indicator.js +76 -0
- package/dist/es/components/progress-indicator/index.d.ts +1 -0
- package/dist/es/components/progress-indicator/index.js +4 -0
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +44 -0
- package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +93 -0
- package/dist/es/components/progress-indicator-item/index.d.ts +1 -0
- package/dist/es/components/progress-indicator-item/index.js +4 -0
- package/dist/es/components/radio/daikin-radio.d.ts +33 -35
- package/dist/es/components/radio/daikin-radio.js +94 -92
- package/dist/es/components/radio-group/daikin-radio-group.d.ts +82 -0
- package/dist/es/components/radio-group/daikin-radio-group.js +145 -0
- package/dist/es/components/radio-group/index.d.ts +1 -0
- package/dist/es/components/radio-group/index.js +4 -0
- package/dist/es/components/select/daikin-select.d.ts +60 -0
- package/dist/es/components/select/daikin-select.js +161 -0
- package/dist/es/components/select/index.d.ts +1 -0
- package/dist/es/components/select/index.js +4 -0
- package/dist/es/components/tab/daikin-tab.d.ts +12 -12
- package/dist/es/components/tab/daikin-tab.js +49 -49
- package/dist/es/components/tab-panels/daikin-tab-panels.d.ts +56 -0
- package/dist/es/components/{panel-switcher/daikin-panel-switcher.js → tab-panels/daikin-tab-panels.js} +9 -9
- package/dist/es/components/tab-panels/index.d.ts +1 -0
- package/dist/es/components/tab-panels/index.js +4 -0
- package/dist/es/components/{tab-group/daikin-tab-group.d.ts → tabs/daikin-tabs.d.ts} +27 -25
- package/dist/es/components/{tab-group/daikin-tab-group.js → tabs/daikin-tabs.js} +36 -37
- package/dist/es/components/tabs/index.d.ts +1 -0
- package/dist/es/components/tabs/index.js +4 -0
- package/dist/es/components/text-area/daikin-text-area.d.ts +82 -0
- package/dist/es/components/text-area/daikin-text-area.js +165 -0
- package/dist/es/components/text-area/index.d.ts +1 -0
- package/dist/es/components/text-area/index.js +4 -0
- package/dist/es/components/text-field/daikin-text-field.d.ts +94 -0
- package/dist/es/components/text-field/daikin-text-field.js +212 -0
- package/dist/es/components/text-field/index.d.ts +1 -0
- package/dist/es/components/text-field/index.js +4 -0
- package/dist/es/components/toggle/daikin-toggle.d.ts +15 -26
- package/dist/es/components/toggle/daikin-toggle.js +45 -69
- package/dist/es/components/tooltip/daikin-tooltip.d.ts +39 -15
- package/dist/es/components/tooltip/daikin-tooltip.js +78 -71
- package/dist/es/controllers/click-outside.d.ts +37 -0
- package/dist/es/controllers/click-outside.js +29 -0
- package/dist/es/controllers/floating-ui-auto-update.d.ts +22 -0
- package/dist/es/controllers/floating-ui-auto-update.js +75 -0
- package/dist/es/controllers/helpers/controller-directive.d.ts +12 -0
- package/dist/es/controllers/helpers/controller-directive.js +50 -0
- package/dist/es/index.js +22 -8
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es/utils/reDispatch.d.ts +1 -0
- package/dist/es/utils/reDispatch.js +10 -0
- package/dist/es-dev/components/accordion/daikin-accordion.d.ts +15 -9
- package/dist/es-dev/components/accordion/daikin-accordion.js +25 -7
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +28 -13
- package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +107 -60
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +4 -0
- package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +3 -6
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +12 -2
- package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +38 -30
- package/dist/es-dev/components/button/daikin-button.d.ts +30 -27
- package/dist/es-dev/components/button/daikin-button.js +90 -129
- package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +27 -38
- package/dist/es-dev/components/checkbox/daikin-checkbox.js +102 -121
- package/dist/es-dev/components/dropdown/daikin-dropdown.d.ts +100 -0
- package/dist/es-dev/components/dropdown/daikin-dropdown.js +368 -0
- package/dist/es-dev/components/dropdown/index.d.ts +1 -0
- package/dist/es-dev/components/dropdown/index.js +4 -0
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.d.ts +42 -0
- package/dist/es-dev/components/dropdown-item/daikin-dropdown-item.js +113 -0
- package/dist/es-dev/components/dropdown-item/index.d.ts +1 -0
- package/dist/es-dev/components/dropdown-item/index.js +4 -0
- package/dist/es-dev/components/icon/daikin-icon.d.ts +4 -0
- package/dist/es-dev/components/icon/icons.json.d.ts +29 -5
- package/dist/es-dev/components/icon/icons.json.js +29 -5
- package/dist/es-dev/components/index.d.ts +11 -4
- package/dist/es-dev/components/index.js +22 -8
- package/dist/es-dev/components/input-group/daikin-input-group.d.ts +69 -25
- package/dist/es-dev/components/input-group/daikin-input-group.js +105 -48
- package/dist/es-dev/components/list/daikin-list.d.ts +28 -0
- package/dist/es-dev/components/list/daikin-list.js +25 -0
- package/dist/es-dev/components/list/index.d.ts +1 -0
- package/dist/es-dev/components/list/index.js +4 -0
- package/dist/es-dev/components/list-item/daikin-list-item.d.ts +64 -0
- package/dist/es-dev/components/list-item/daikin-list-item.js +132 -0
- package/dist/es-dev/components/list-item/index.d.ts +1 -0
- package/dist/es-dev/components/list-item/index.js +4 -0
- package/dist/es-dev/components/notification/daikin-notification.d.ts +13 -11
- package/dist/es-dev/components/notification/daikin-notification.js +15 -16
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.d.ts +32 -10
- package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +53 -29
- package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.d.ts +47 -0
- package/dist/es-dev/components/progress-indicator/daikin-progress-indicator.js +86 -0
- package/dist/es-dev/components/progress-indicator/index.d.ts +1 -0
- package/dist/es-dev/components/progress-indicator/index.js +4 -0
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.d.ts +44 -0
- package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +93 -0
- package/dist/es-dev/components/progress-indicator-item/index.d.ts +1 -0
- package/dist/es-dev/components/progress-indicator-item/index.js +4 -0
- package/dist/es-dev/components/radio/daikin-radio.d.ts +33 -35
- package/dist/es-dev/components/radio/daikin-radio.js +94 -92
- package/dist/es-dev/components/radio-group/daikin-radio-group.d.ts +82 -0
- package/dist/es-dev/components/radio-group/daikin-radio-group.js +145 -0
- package/dist/es-dev/components/radio-group/index.d.ts +1 -0
- package/dist/es-dev/components/radio-group/index.js +4 -0
- package/dist/es-dev/components/select/daikin-select.d.ts +60 -0
- package/dist/es-dev/components/select/daikin-select.js +161 -0
- package/dist/es-dev/components/select/index.d.ts +1 -0
- package/dist/es-dev/components/select/index.js +4 -0
- package/dist/es-dev/components/tab/daikin-tab.d.ts +12 -12
- package/dist/es-dev/components/tab/daikin-tab.js +49 -49
- package/dist/es-dev/components/tab-panels/daikin-tab-panels.d.ts +56 -0
- package/dist/es-dev/components/{panel-switcher/daikin-panel-switcher.js → tab-panels/daikin-tab-panels.js} +10 -10
- package/dist/es-dev/components/tab-panels/index.d.ts +1 -0
- package/dist/es-dev/components/tab-panels/index.js +4 -0
- package/dist/{cjs-dev/components/tab-group/daikin-tab-group.d.ts → es-dev/components/tabs/daikin-tabs.d.ts} +27 -25
- package/dist/es-dev/components/{tab-group/daikin-tab-group.js → tabs/daikin-tabs.js} +38 -39
- package/dist/es-dev/components/tabs/index.d.ts +1 -0
- package/dist/es-dev/components/tabs/index.js +4 -0
- package/dist/es-dev/components/text-area/daikin-text-area.d.ts +82 -0
- package/dist/es-dev/components/text-area/daikin-text-area.js +165 -0
- package/dist/es-dev/components/text-area/index.d.ts +1 -0
- package/dist/es-dev/components/text-area/index.js +4 -0
- package/dist/es-dev/components/text-field/daikin-text-field.d.ts +94 -0
- package/dist/es-dev/components/text-field/daikin-text-field.js +212 -0
- package/dist/es-dev/components/text-field/index.d.ts +1 -0
- package/dist/es-dev/components/text-field/index.js +4 -0
- package/dist/es-dev/components/toggle/daikin-toggle.d.ts +15 -26
- package/dist/es-dev/components/toggle/daikin-toggle.js +45 -69
- package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +39 -15
- package/dist/es-dev/components/tooltip/daikin-tooltip.js +78 -71
- package/dist/es-dev/controllers/click-outside.d.ts +37 -0
- package/dist/es-dev/controllers/click-outside.js +29 -0
- package/dist/es-dev/controllers/floating-ui-auto-update.d.ts +22 -0
- package/dist/es-dev/controllers/floating-ui-auto-update.js +82 -0
- package/dist/es-dev/controllers/helpers/controller-directive.d.ts +12 -0
- package/dist/es-dev/controllers/helpers/controller-directive.js +50 -0
- package/dist/es-dev/index.js +22 -8
- package/dist/es-dev/tailwind.css.js +1 -1
- package/dist/es-dev/utils/reDispatch.d.ts +1 -0
- package/dist/es-dev/utils/reDispatch.js +10 -0
- package/icons/checkbox-indeterminate.svg +2 -2
- package/icons/chevron-down.svg +3 -0
- package/icons/chevron-left.svg +3 -0
- package/icons/chevron-right.svg +3 -0
- package/icons/chevron-up.svg +3 -0
- package/icons/dropdown-check.svg +3 -0
- package/icons/dropdown-chevron-down.svg +3 -0
- package/icons/required.svg +3 -0
- package/icons/status-error.svg +3 -0
- package/icons/status-negative.svg +3 -11
- package/icons/status-positive.svg +4 -14
- package/icons/status-success.svg +6 -0
- package/package.json +3 -2
- package/dist/cjs/components/panel-switcher/daikin-panel-switcher.d.ts +0 -50
- package/dist/cjs/components/panel-switcher/index.cjs +0 -7
- package/dist/cjs/components/panel-switcher/index.d.ts +0 -1
- package/dist/cjs/components/tab-group/index.cjs +0 -7
- package/dist/cjs/components/tab-group/index.d.ts +0 -1
- package/dist/cjs/components/text-input/daikin-text-input.cjs +0 -137
- package/dist/cjs/components/text-input/daikin-text-input.d.ts +0 -68
- package/dist/cjs/components/text-input/index.cjs +0 -7
- package/dist/cjs/components/text-input/index.d.ts +0 -1
- package/dist/cjs/components/textarea/daikin-textarea.cjs +0 -168
- package/dist/cjs/components/textarea/daikin-textarea.d.ts +0 -70
- package/dist/cjs/components/textarea/index.cjs +0 -7
- package/dist/cjs/components/textarea/index.d.ts +0 -1
- package/dist/cjs-dev/components/panel-switcher/daikin-panel-switcher.d.ts +0 -50
- package/dist/cjs-dev/components/panel-switcher/index.cjs +0 -7
- package/dist/cjs-dev/components/panel-switcher/index.d.ts +0 -1
- package/dist/cjs-dev/components/tab-group/index.cjs +0 -7
- package/dist/cjs-dev/components/tab-group/index.d.ts +0 -1
- package/dist/cjs-dev/components/text-input/daikin-text-input.cjs +0 -137
- package/dist/cjs-dev/components/text-input/daikin-text-input.d.ts +0 -68
- package/dist/cjs-dev/components/text-input/index.cjs +0 -7
- package/dist/cjs-dev/components/text-input/index.d.ts +0 -1
- package/dist/cjs-dev/components/textarea/daikin-textarea.cjs +0 -168
- package/dist/cjs-dev/components/textarea/daikin-textarea.d.ts +0 -70
- package/dist/cjs-dev/components/textarea/index.cjs +0 -7
- package/dist/cjs-dev/components/textarea/index.d.ts +0 -1
- package/dist/es/components/panel-switcher/daikin-panel-switcher.d.ts +0 -50
- package/dist/es/components/panel-switcher/index.d.ts +0 -1
- package/dist/es/components/panel-switcher/index.js +0 -4
- package/dist/es/components/tab-group/index.d.ts +0 -1
- package/dist/es/components/tab-group/index.js +0 -4
- package/dist/es/components/text-input/daikin-text-input.d.ts +0 -68
- package/dist/es/components/text-input/daikin-text-input.js +0 -138
- package/dist/es/components/text-input/index.d.ts +0 -1
- package/dist/es/components/text-input/index.js +0 -4
- package/dist/es/components/textarea/daikin-textarea.d.ts +0 -70
- package/dist/es/components/textarea/daikin-textarea.js +0 -169
- package/dist/es/components/textarea/index.d.ts +0 -1
- package/dist/es/components/textarea/index.js +0 -4
- package/dist/es-dev/components/panel-switcher/daikin-panel-switcher.d.ts +0 -50
- package/dist/es-dev/components/panel-switcher/index.d.ts +0 -1
- package/dist/es-dev/components/panel-switcher/index.js +0 -4
- package/dist/es-dev/components/tab-group/index.d.ts +0 -1
- package/dist/es-dev/components/tab-group/index.js +0 -4
- package/dist/es-dev/components/text-input/daikin-text-input.d.ts +0 -68
- package/dist/es-dev/components/text-input/daikin-text-input.js +0 -138
- package/dist/es-dev/components/text-input/index.d.ts +0 -1
- package/dist/es-dev/components/text-input/index.js +0 -4
- package/dist/es-dev/components/textarea/daikin-textarea.d.ts +0 -70
- package/dist/es-dev/components/textarea/daikin-textarea.js +0 -169
- package/dist/es-dev/components/textarea/index.d.ts +0 -1
- package/dist/es-dev/components/textarea/index.js +0 -4
- package/icons/accordion-chevron-up.svg +0 -3
- package/icons/notification-status-negative.svg +0 -3
- package/icons/notification-status-positive.svg +0 -5
- package/icons/radio-checked.svg +0 -4
- package/icons/radio-unchecked.svg +0 -4
- /package/dist/cjs/components/{tab-group → tabs}/scroller.cjs +0 -0
- /package/dist/cjs/components/{tab-group → tabs}/scroller.d.ts +0 -0
- /package/dist/cjs-dev/components/{tab-group → tabs}/scroller.cjs +0 -0
- /package/dist/cjs-dev/components/{tab-group → tabs}/scroller.d.ts +0 -0
- /package/dist/es/components/{tab-group → tabs}/scroller.d.ts +0 -0
- /package/dist/es/components/{tab-group → tabs}/scroller.js +0 -0
- /package/dist/es-dev/components/{tab-group → tabs}/scroller.d.ts +0 -0
- /package/dist/es-dev/components/{tab-group → tabs}/scroller.js +0 -0
- /package/icons/{notification-status-alarm.svg → status-alarm.svg} +0 -0
- /package/icons/{notification-status-information.svg → status-information.svg} +0 -0
- /package/icons/{notification-status-warning.svg → status-warning.svg} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinProgressIndicator = require("./daikin-progress-indicator.cjs");
|
|
4
|
+
Object.defineProperty(exports, "DaikinProgressIndicator", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: () => daikinProgressIndicator.DaikinProgressIndicator
|
|
7
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-progress-indicator';
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const classVarianceAuthority = require("class-variance-authority");
|
|
4
|
+
const lit = require("lit");
|
|
5
|
+
const decorators_js = require("lit/decorators.js");
|
|
6
|
+
const ifDefined_js = require("lit/directives/if-defined.js");
|
|
7
|
+
const tailwind = require("../../tailwind.css.cjs");
|
|
8
|
+
require("../icon/daikin-icon.cjs");
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
12
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
13
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
14
|
+
if (decorator = decorators[i])
|
|
15
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
16
|
+
if (kind && result) __defProp(target, key, result);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
const cvaContainer = classVarianceAuthority.cva(
|
|
20
|
+
[
|
|
21
|
+
"flex",
|
|
22
|
+
"flex-col",
|
|
23
|
+
"gap-1",
|
|
24
|
+
"w-full",
|
|
25
|
+
"text-system-element-text-primary",
|
|
26
|
+
"pt-1",
|
|
27
|
+
"border-t-4",
|
|
28
|
+
"font-daikinSerif"
|
|
29
|
+
],
|
|
30
|
+
{
|
|
31
|
+
variants: {
|
|
32
|
+
status: {
|
|
33
|
+
unfinished: ["border-system-state-disabled"],
|
|
34
|
+
inprogress: ["border-system-state-primary-active"],
|
|
35
|
+
finished: ["border-system-state-primary-active"]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
const cvaLabel = classVarianceAuthority.cva(
|
|
41
|
+
["flex", "items-center", "gap-2", "font-bold", "leading-5"],
|
|
42
|
+
{
|
|
43
|
+
variants: {
|
|
44
|
+
status: {
|
|
45
|
+
unfinished: [],
|
|
46
|
+
inprogress: [],
|
|
47
|
+
finished: [
|
|
48
|
+
"after:size-4",
|
|
49
|
+
"after:i-daikin-status-success",
|
|
50
|
+
"after:text-system-state-primary-active"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
exports.DaikinProgressIndicatorItem = class DaikinProgressIndicatorItem extends lit.LitElement {
|
|
57
|
+
constructor() {
|
|
58
|
+
super(...arguments);
|
|
59
|
+
this.status = "unfinished";
|
|
60
|
+
this.current = false;
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
return lit.html`<div
|
|
64
|
+
class=${cvaContainer({
|
|
65
|
+
status: this.status
|
|
66
|
+
})}
|
|
67
|
+
role="listitem"
|
|
68
|
+
aria-current=${ifDefined_js.ifDefined(this.current ? "step" : void 0)}
|
|
69
|
+
>
|
|
70
|
+
<slot class=${cvaLabel({ status: this.status })}></slot>
|
|
71
|
+
<slot name="description" class="text-sm leading-[18px]"></slot>
|
|
72
|
+
</div>`;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
exports.DaikinProgressIndicatorItem.styles = lit.css`
|
|
76
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
77
|
+
|
|
78
|
+
:host {
|
|
79
|
+
display: block;
|
|
80
|
+
width: 100%;
|
|
81
|
+
min-width: 142px;
|
|
82
|
+
}
|
|
83
|
+
`;
|
|
84
|
+
__decorateClass([
|
|
85
|
+
decorators_js.property({ type: String, reflect: true })
|
|
86
|
+
], exports.DaikinProgressIndicatorItem.prototype, "status", 2);
|
|
87
|
+
__decorateClass([
|
|
88
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
89
|
+
], exports.DaikinProgressIndicatorItem.prototype, "current", 2);
|
|
90
|
+
exports.DaikinProgressIndicatorItem = __decorateClass([
|
|
91
|
+
decorators_js.customElement("daikin-progress-indicator-item")
|
|
92
|
+
], exports.DaikinProgressIndicatorItem);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { MergeVariantProps } from '../../type-utils';
|
|
3
|
+
declare const cvaContainer: (props?: ({
|
|
4
|
+
status?: "inprogress" | "unfinished" | "finished" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
declare const cvaLabel: (props?: ({
|
|
7
|
+
status?: "inprogress" | "unfinished" | "finished" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
type ProgressIndicatorItemVariantProps = MergeVariantProps<typeof cvaContainer | typeof cvaLabel>;
|
|
10
|
+
/**
|
|
11
|
+
* The progress indicator item component is a child element within the `daikin-progress-indicator` component, this represents one of the tasks that the user is working on.
|
|
12
|
+
*
|
|
13
|
+
* In addition to the name of each task, the progress of the task can be indicated, such as whether it is in progress or has not yet started.
|
|
14
|
+
*
|
|
15
|
+
* Hierarchy:
|
|
16
|
+
* - `daikin-progress-indicator` > `daikin-progress-indicator-item`
|
|
17
|
+
*
|
|
18
|
+
* @slot - A slot for label content.
|
|
19
|
+
* @slot description - A slot for description content.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
*
|
|
23
|
+
* ```html
|
|
24
|
+
* <daikin-progress-indicator-item state="unfinished">
|
|
25
|
+
* Progress indicator label
|
|
26
|
+
* <span slot="description">Progress indicator description</span>
|
|
27
|
+
* </daikin-progress-indicator-item>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare class DaikinProgressIndicatorItem extends LitElement {
|
|
31
|
+
static readonly styles: import('lit').CSSResult;
|
|
32
|
+
/**
|
|
33
|
+
* Status of the progress indicator item
|
|
34
|
+
*/
|
|
35
|
+
status: ProgressIndicatorItemVariantProps["status"];
|
|
36
|
+
current: boolean;
|
|
37
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
38
|
+
}
|
|
39
|
+
declare global {
|
|
40
|
+
interface HTMLElementTagNameMap {
|
|
41
|
+
"daikin-progress-indicator-item": DaikinProgressIndicatorItem;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export default DaikinProgressIndicatorItem;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const daikinProgressIndicatorItem = require("./daikin-progress-indicator-item.cjs");
|
|
4
|
+
Object.defineProperty(exports, "DaikinProgressIndicatorItem", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: () => daikinProgressIndicatorItem.DaikinProgressIndicatorItem
|
|
7
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-progress-indicator-item';
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const classVarianceAuthority = require("class-variance-authority");
|
|
4
4
|
const lit = require("lit");
|
|
5
5
|
const decorators_js = require("lit/decorators.js");
|
|
6
|
+
const ifDefined_js = require("lit/directives/if-defined.js");
|
|
6
7
|
const tailwind = require("../../tailwind.css.cjs");
|
|
7
8
|
var __defProp = Object.defineProperty;
|
|
8
9
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -14,100 +15,104 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
14
15
|
if (kind && result) __defProp(target, key, result);
|
|
15
16
|
return result;
|
|
16
17
|
};
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
18
|
+
const RADIO_CLASS_NAME = classVarianceAuthority.cva([
|
|
19
|
+
"flex",
|
|
20
|
+
"justify-center",
|
|
21
|
+
"items-center",
|
|
22
|
+
"size-4",
|
|
23
|
+
"rounded-full",
|
|
24
|
+
"relative",
|
|
25
|
+
"appearance-none",
|
|
26
|
+
"focus-visible:outline",
|
|
27
|
+
"focus-visible:outline-2",
|
|
28
|
+
"focus-visible:outline-offset-2",
|
|
29
|
+
"focus-visible:outline-system-state-focus",
|
|
30
|
+
"unchecked:border-2",
|
|
31
|
+
"enabled:unchecked:border-system-state-neutral-active",
|
|
32
|
+
"enabled:unchecked:hover:bg-system-background-surface-hover",
|
|
33
|
+
"enabled:unchecked:active:bg-system-background-surface-press",
|
|
34
|
+
"checked:border-[5px]",
|
|
35
|
+
"enabled:checked:border-system-state-primary-active",
|
|
36
|
+
"enabled:checked:group-hover:border-system-state-primary-hover",
|
|
37
|
+
"enabled:checked:group-active:border-system-state-primary-press",
|
|
38
|
+
"disabled:border-system-state-disabled"
|
|
39
|
+
])();
|
|
40
|
+
const cvaLabel = classVarianceAuthority.cva(["pr-2"], {
|
|
41
|
+
variants: {
|
|
42
|
+
disabled: {
|
|
43
|
+
false: ["text-system-element-text-primary"],
|
|
44
|
+
true: ["text-system-state-disabled"]
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
|
-
);
|
|
45
|
-
const cvaLabel = classVarianceAuthority.cva(
|
|
46
|
-
["leading-8", "not-italic", "font-normal", "align-middle"],
|
|
47
|
-
{
|
|
48
|
-
variants: {
|
|
49
|
-
size: {
|
|
50
|
-
small: ["text-sm"],
|
|
51
|
-
large: ["text-base"]
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
);
|
|
47
|
+
});
|
|
56
48
|
exports.DaikinRadio = class DaikinRadio extends lit.LitElement {
|
|
57
49
|
constructor() {
|
|
58
50
|
super(...arguments);
|
|
59
|
-
this.
|
|
51
|
+
this.name = "";
|
|
52
|
+
this.value = "";
|
|
60
53
|
this.label = "";
|
|
61
|
-
this.size = "small";
|
|
62
54
|
this.labelPosition = "right";
|
|
63
|
-
this.disabled = false;
|
|
64
|
-
this.readonly = false;
|
|
65
55
|
this.checked = false;
|
|
66
|
-
this.
|
|
67
|
-
this.
|
|
68
|
-
this.
|
|
56
|
+
this.disabled = false;
|
|
57
|
+
this.skipTab = false;
|
|
58
|
+
this._internals = this.attachInternals();
|
|
69
59
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Focuses on the inner radio.
|
|
62
|
+
* @param options focus options
|
|
63
|
+
*/
|
|
64
|
+
focus(options) {
|
|
65
|
+
var _a;
|
|
66
|
+
(_a = this._radio) == null ? void 0 : _a.focus(options);
|
|
74
67
|
}
|
|
75
68
|
_updateFormValue() {
|
|
76
69
|
this._internals.setFormValue(this.checked ? this.value : null);
|
|
77
70
|
}
|
|
78
|
-
|
|
79
|
-
if (
|
|
80
|
-
|
|
71
|
+
_handleClick(event) {
|
|
72
|
+
if (this.disabled) {
|
|
73
|
+
event.preventDefault();
|
|
81
74
|
}
|
|
82
75
|
}
|
|
83
76
|
_handleChange(event) {
|
|
84
|
-
|
|
85
|
-
const input = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("input");
|
|
86
|
-
this.checked = input.checked;
|
|
77
|
+
this.checked = event.target.checked;
|
|
87
78
|
this._updateFormValue();
|
|
88
|
-
|
|
89
|
-
|
|
79
|
+
this.dispatchEvent(
|
|
80
|
+
new Event("change", {
|
|
81
|
+
bubbles: true,
|
|
82
|
+
composed: true
|
|
83
|
+
})
|
|
84
|
+
);
|
|
90
85
|
}
|
|
91
86
|
render() {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
87
|
+
return lit.html`<label class="group flex gap-2 items-center font-daikinSerif">
|
|
88
|
+
<span class="p-2">
|
|
89
|
+
<input
|
|
90
|
+
class=${RADIO_CLASS_NAME}
|
|
91
|
+
type="radio"
|
|
92
|
+
name=${this.name}
|
|
93
|
+
value=${this.value}
|
|
94
|
+
aria-label=${this.labelPosition === "hidden" ? this.label : lit.nothing}
|
|
95
|
+
?disabled=${this.disabled}
|
|
96
|
+
.checked=${this.checked}
|
|
97
|
+
@click=${this._handleClick}
|
|
98
|
+
@change=${this._handleChange}
|
|
99
|
+
tabindex=${ifDefined_js.ifDefined(this.skipTab ? "-1" : void 0)}
|
|
100
|
+
/>
|
|
101
|
+
</span>
|
|
102
|
+
<span
|
|
103
|
+
class=${cvaLabel({
|
|
104
|
+
disabled: this.disabled
|
|
105
|
+
})}
|
|
106
|
+
?hidden=${this.labelPosition === "hidden"}
|
|
107
|
+
>
|
|
108
|
+
${this.label}
|
|
109
|
+
</span>
|
|
110
|
+
</label>`;
|
|
111
|
+
}
|
|
112
|
+
updated(changedProperties) {
|
|
113
|
+
if (changedProperties.has("checked")) {
|
|
114
|
+
this._updateFormValue();
|
|
115
|
+
}
|
|
111
116
|
}
|
|
112
117
|
};
|
|
113
118
|
exports.DaikinRadio.styles = lit.css`
|
|
@@ -119,32 +124,29 @@ exports.DaikinRadio.styles = lit.css`
|
|
|
119
124
|
`;
|
|
120
125
|
exports.DaikinRadio.formAssociated = true;
|
|
121
126
|
__decorateClass([
|
|
122
|
-
decorators_js.property({ type: String })
|
|
123
|
-
], exports.DaikinRadio.prototype, "
|
|
127
|
+
decorators_js.property({ type: String, reflect: true })
|
|
128
|
+
], exports.DaikinRadio.prototype, "name", 2);
|
|
129
|
+
__decorateClass([
|
|
130
|
+
decorators_js.property({ type: String, reflect: true })
|
|
131
|
+
], exports.DaikinRadio.prototype, "value", 2);
|
|
124
132
|
__decorateClass([
|
|
125
133
|
decorators_js.property({ type: String })
|
|
126
|
-
], exports.DaikinRadio.prototype, "
|
|
134
|
+
], exports.DaikinRadio.prototype, "label", 2);
|
|
127
135
|
__decorateClass([
|
|
128
136
|
decorators_js.property({ type: String, attribute: "label-position" })
|
|
129
137
|
], exports.DaikinRadio.prototype, "labelPosition", 2);
|
|
130
|
-
__decorateClass([
|
|
131
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
132
|
-
], exports.DaikinRadio.prototype, "disabled", 2);
|
|
133
|
-
__decorateClass([
|
|
134
|
-
decorators_js.property({ type: Boolean, reflect: true })
|
|
135
|
-
], exports.DaikinRadio.prototype, "readonly", 2);
|
|
136
138
|
__decorateClass([
|
|
137
139
|
decorators_js.property({ type: Boolean, reflect: true })
|
|
138
140
|
], exports.DaikinRadio.prototype, "checked", 2);
|
|
139
141
|
__decorateClass([
|
|
140
|
-
decorators_js.property({ type:
|
|
141
|
-
], exports.DaikinRadio.prototype, "
|
|
142
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
143
|
+
], exports.DaikinRadio.prototype, "disabled", 2);
|
|
142
144
|
__decorateClass([
|
|
143
|
-
decorators_js.property({ type:
|
|
144
|
-
], exports.DaikinRadio.prototype, "
|
|
145
|
+
decorators_js.property({ type: Boolean, attribute: false })
|
|
146
|
+
], exports.DaikinRadio.prototype, "skipTab", 2);
|
|
145
147
|
__decorateClass([
|
|
146
|
-
decorators_js.
|
|
147
|
-
], exports.DaikinRadio.prototype, "
|
|
148
|
+
decorators_js.query("input")
|
|
149
|
+
], exports.DaikinRadio.prototype, "_radio", 2);
|
|
148
150
|
exports.DaikinRadio = __decorateClass([
|
|
149
151
|
decorators_js.customElement("daikin-radio")
|
|
150
152
|
], exports.DaikinRadio);
|
|
@@ -1,75 +1,73 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { MergeVariantProps } from '../../type-utils';
|
|
3
|
-
declare const cvaRadio: (props?: ({
|
|
4
|
-
size?: "small" | "large" | null | undefined;
|
|
5
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
-
declare const cvaLabel: (props?: ({
|
|
7
|
-
size?: "small" | "large" | null | undefined;
|
|
8
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
-
type RadioVariantProps = MergeVariantProps<typeof cvaRadio | typeof cvaLabel>;
|
|
10
2
|
/**
|
|
11
3
|
* The radio button component is a UI element that allows users to select one options from a set of choices.
|
|
12
4
|
* It functions similarly to the HTML `<input type="radio">` tag. \
|
|
13
5
|
* Please note that **a radio group component is not yet available**, so you'll need to manually group radio buttons when using multiple instances.
|
|
14
6
|
*
|
|
7
|
+
* Hierarchies:
|
|
8
|
+
* - `daikin-radio-group` > `daikin-radio`
|
|
9
|
+
*
|
|
15
10
|
* @fires change - A cloned event of a [change event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event) emitted from the inner `<input type="radio">` element.
|
|
16
11
|
*
|
|
17
12
|
* @example
|
|
18
13
|
*
|
|
14
|
+
* ```js
|
|
15
|
+
* import "@daikin-oss/design-system-web-components/components/radio/index.js";
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
19
18
|
* ```html
|
|
20
19
|
* <daikin-radio name="name" value="value" label="Radio button label"></daikin-radio>
|
|
21
20
|
* ```
|
|
22
21
|
*/
|
|
23
22
|
export declare class DaikinRadio extends LitElement {
|
|
24
23
|
static readonly styles: import('lit').CSSResult;
|
|
25
|
-
private _handleClick;
|
|
26
|
-
static readonly formAssociated = true;
|
|
27
|
-
private _internals;
|
|
28
|
-
private _updateFormValue;
|
|
29
|
-
updated(changedProperties: Map<string, unknown>): void;
|
|
30
|
-
private _handleChange;
|
|
31
|
-
/**
|
|
32
|
-
* Specify the label text for the radio
|
|
33
|
-
*/
|
|
34
|
-
label: string;
|
|
35
24
|
/**
|
|
36
|
-
*
|
|
25
|
+
* Form name of the radio button.
|
|
37
26
|
*/
|
|
38
|
-
|
|
27
|
+
name: string;
|
|
39
28
|
/**
|
|
40
|
-
*
|
|
41
|
-
* when `left` the label will be in left of radio, when `right` label will be in right of radio
|
|
29
|
+
* Form value of the radio button.
|
|
42
30
|
*/
|
|
43
|
-
|
|
31
|
+
value: string;
|
|
44
32
|
/**
|
|
45
|
-
*
|
|
33
|
+
* Label text for the radio button.
|
|
46
34
|
*/
|
|
47
|
-
|
|
35
|
+
label: string;
|
|
48
36
|
/**
|
|
49
|
-
*
|
|
37
|
+
* Label position.
|
|
38
|
+
* - `right` (default): The label will be placed to the right of the radio button.
|
|
39
|
+
* - `hidden`: The label will not be shown.
|
|
50
40
|
*/
|
|
51
|
-
|
|
41
|
+
labelPosition: "right" | "hidden";
|
|
52
42
|
/**
|
|
53
|
-
*
|
|
43
|
+
* Whether the radio button is checked.
|
|
54
44
|
*/
|
|
55
45
|
checked: boolean;
|
|
56
46
|
/**
|
|
57
|
-
*
|
|
47
|
+
* Whether the radio button is disabled.
|
|
58
48
|
*/
|
|
59
|
-
|
|
49
|
+
disabled: boolean;
|
|
60
50
|
/**
|
|
61
|
-
*
|
|
51
|
+
* Whether the radio button can be focused.
|
|
52
|
+
* Automatically set by `daikin-radio-group` component.
|
|
62
53
|
*/
|
|
63
|
-
|
|
54
|
+
skipTab: boolean;
|
|
55
|
+
static readonly formAssociated = true;
|
|
56
|
+
private _radio;
|
|
64
57
|
/**
|
|
65
|
-
*
|
|
58
|
+
* Focuses on the inner radio.
|
|
59
|
+
* @param options focus options
|
|
66
60
|
*/
|
|
67
|
-
|
|
61
|
+
focus(options?: FocusOptions): void;
|
|
62
|
+
private _internals;
|
|
63
|
+
private _updateFormValue;
|
|
64
|
+
private _handleClick;
|
|
65
|
+
private _handleChange;
|
|
68
66
|
render(): import('lit-html').TemplateResult<1>;
|
|
67
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
69
68
|
}
|
|
70
69
|
declare global {
|
|
71
70
|
interface HTMLElementTagNameMap {
|
|
72
71
|
"daikin-radio": DaikinRadio;
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
|
-
export {};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const classVarianceAuthority = require("class-variance-authority");
|
|
4
|
+
const lit = require("lit");
|
|
5
|
+
const decorators_js = require("lit/decorators.js");
|
|
6
|
+
const ifDefined_js = require("lit/directives/if-defined.js");
|
|
7
|
+
const tailwind = require("../../tailwind.css.cjs");
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
12
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
+
if (decorator = decorators[i])
|
|
14
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
|
+
if (kind && result) __defProp(target, key, result);
|
|
16
|
+
return result;
|
|
17
|
+
};
|
|
18
|
+
const radioGroupCN = classVarianceAuthority.cva(["flex", "gap-2", "py-2", "pr-2"], {
|
|
19
|
+
variants: {
|
|
20
|
+
orientation: {
|
|
21
|
+
horizontal: ["flex-col"],
|
|
22
|
+
vertical: ["flex-row", "gap-3"]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
exports.DaikinRadioGroup = class DaikinRadioGroup extends lit.LitElement {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
this.orientation = "horizontal";
|
|
30
|
+
this.name = "";
|
|
31
|
+
this.value = "";
|
|
32
|
+
this.required = false;
|
|
33
|
+
this._label = null;
|
|
34
|
+
this._handleRadioChange = (event) => {
|
|
35
|
+
this.value = event.target.value;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
_updateRadios() {
|
|
39
|
+
const radios = this._radios;
|
|
40
|
+
const selectedRadio = radios.find((radio) => radio.value === this.value);
|
|
41
|
+
const firstEnabledRadio = radios.find((radio) => !radio.disabled);
|
|
42
|
+
for (const daikinRadio of this._radios) {
|
|
43
|
+
if (this.name) {
|
|
44
|
+
daikinRadio.name = this.name;
|
|
45
|
+
}
|
|
46
|
+
const isSelected = daikinRadio === selectedRadio;
|
|
47
|
+
daikinRadio.checked = isSelected;
|
|
48
|
+
daikinRadio.skipTab = selectedRadio ? !isSelected : daikinRadio !== firstEnabledRadio;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
_handleSlotChange() {
|
|
52
|
+
this._updateRadios();
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Handles keyboard interactions in the radio list.
|
|
56
|
+
* https://www.w3.org/WAI/ARIA/apg/patterns/radio/
|
|
57
|
+
*/
|
|
58
|
+
_handleKeyDown(event) {
|
|
59
|
+
const moveOffset = {
|
|
60
|
+
ArrowRight: 1,
|
|
61
|
+
ArrowDown: 1,
|
|
62
|
+
ArrowLeft: -1,
|
|
63
|
+
ArrowUp: -1
|
|
64
|
+
}[event.key];
|
|
65
|
+
if (!moveOffset) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
event.preventDefault();
|
|
69
|
+
const enabledRadios = this._radios.filter(({ disabled }) => !disabled);
|
|
70
|
+
if (!enabledRadios.length) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const activeElement = document.activeElement;
|
|
74
|
+
const focusedRadioIndex = activeElement ? enabledRadios.findIndex((radio) => radio.contains(activeElement)) : -1;
|
|
75
|
+
if (focusedRadioIndex < 0) {
|
|
76
|
+
const activeRadio = enabledRadios.find((radio) => radio.checked) ?? enabledRadios[0];
|
|
77
|
+
this.value = activeRadio.value;
|
|
78
|
+
activeRadio.focus();
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const newIndex = (focusedRadioIndex + moveOffset + enabledRadios.length) % enabledRadios.length;
|
|
82
|
+
if (newIndex !== focusedRadioIndex) {
|
|
83
|
+
const newRadio = enabledRadios[newIndex];
|
|
84
|
+
this.value = newRadio.value;
|
|
85
|
+
newRadio.focus();
|
|
86
|
+
this.dispatchEvent(new Event("change"));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
render() {
|
|
90
|
+
const radioGroupClassName = radioGroupCN({ orientation: this.orientation });
|
|
91
|
+
return lit.html`<fieldset
|
|
92
|
+
role="radiogroup"
|
|
93
|
+
aria-label=${// eslint-disable-next-line @typescript-eslint/no-explicit-any -- workaround lit-analyzer checking
|
|
94
|
+
ifDefined_js.ifDefined(this._label)}
|
|
95
|
+
aria-required=${// eslint-disable-next-line @typescript-eslint/no-explicit-any -- workaround lit-analyzer checking
|
|
96
|
+
ifDefined_js.ifDefined(this.required)}
|
|
97
|
+
@keydown=${this._handleKeyDown}
|
|
98
|
+
>
|
|
99
|
+
<slot
|
|
100
|
+
class=${radioGroupClassName}
|
|
101
|
+
@slotchange=${this._handleSlotChange}
|
|
102
|
+
@change=${this._handleRadioChange}
|
|
103
|
+
>
|
|
104
|
+
</slot>
|
|
105
|
+
</fieldset>`;
|
|
106
|
+
}
|
|
107
|
+
updated(changedProperties) {
|
|
108
|
+
if (changedProperties.has("value") || changedProperties.has("name")) {
|
|
109
|
+
this._updateRadios();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
reflectInputGroup(inputGroup) {
|
|
113
|
+
this._label = inputGroup.label;
|
|
114
|
+
this.required = !!inputGroup.required;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
exports.DaikinRadioGroup.styles = lit.css`
|
|
118
|
+
${lit.unsafeCSS(tailwind.default)}
|
|
119
|
+
|
|
120
|
+
:host {
|
|
121
|
+
display: inline-block;
|
|
122
|
+
}
|
|
123
|
+
`;
|
|
124
|
+
__decorateClass([
|
|
125
|
+
decorators_js.queryAssignedElements({ selector: "daikin-radio" })
|
|
126
|
+
], exports.DaikinRadioGroup.prototype, "_radios", 2);
|
|
127
|
+
__decorateClass([
|
|
128
|
+
decorators_js.property({ type: String })
|
|
129
|
+
], exports.DaikinRadioGroup.prototype, "orientation", 2);
|
|
130
|
+
__decorateClass([
|
|
131
|
+
decorators_js.property({ type: String, reflect: true })
|
|
132
|
+
], exports.DaikinRadioGroup.prototype, "name", 2);
|
|
133
|
+
__decorateClass([
|
|
134
|
+
decorators_js.property({ type: String, reflect: true })
|
|
135
|
+
], exports.DaikinRadioGroup.prototype, "value", 2);
|
|
136
|
+
__decorateClass([
|
|
137
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
138
|
+
], exports.DaikinRadioGroup.prototype, "required", 2);
|
|
139
|
+
__decorateClass([
|
|
140
|
+
decorators_js.state()
|
|
141
|
+
], exports.DaikinRadioGroup.prototype, "_label", 2);
|
|
142
|
+
exports.DaikinRadioGroup = __decorateClass([
|
|
143
|
+
decorators_js.customElement("daikin-radio-group")
|
|
144
|
+
], exports.DaikinRadioGroup);
|