@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
|
@@ -4,16 +4,23 @@ import { DaikinBreadcrumb } from "./breadcrumb/daikin-breadcrumb.js";
|
|
|
4
4
|
import { DaikinBreadcrumbItem } from "./breadcrumb-item/daikin-breadcrumb-item.js";
|
|
5
5
|
import { DaikinButton } from "./button/daikin-button.js";
|
|
6
6
|
import { DaikinCheckbox } from "./checkbox/daikin-checkbox.js";
|
|
7
|
+
import { DaikinDropdown } from "./dropdown/daikin-dropdown.js";
|
|
8
|
+
import { DaikinDropdownItem } from "./dropdown-item/daikin-dropdown-item.js";
|
|
7
9
|
import { DaikinIcon, iconList } from "./icon/daikin-icon.js";
|
|
8
10
|
import { DaikinInputGroup } from "./input-group/daikin-input-group.js";
|
|
11
|
+
import { DaikinList } from "./list/daikin-list.js";
|
|
12
|
+
import { DaikinListItem } from "./list-item/daikin-list-item.js";
|
|
9
13
|
import { DaikinNotification } from "./notification/daikin-notification.js";
|
|
10
|
-
import { DaikinPanelSwitcher } from "./panel-switcher/daikin-panel-switcher.js";
|
|
11
14
|
import { DaikinProgressBar } from "./progress-bar/daikin-progress-bar.js";
|
|
15
|
+
import { DaikinProgressIndicator } from "./progress-indicator/daikin-progress-indicator.js";
|
|
16
|
+
import { DaikinProgressIndicatorItem } from "./progress-indicator-item/daikin-progress-indicator-item.js";
|
|
12
17
|
import { DaikinRadio } from "./radio/daikin-radio.js";
|
|
18
|
+
import { DaikinSelect } from "./select/daikin-select.js";
|
|
13
19
|
import { DaikinTab } from "./tab/daikin-tab.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
20
|
+
import { DaikinTabPanels } from "./tab-panels/daikin-tab-panels.js";
|
|
21
|
+
import { DaikinTabs } from "./tabs/daikin-tabs.js";
|
|
22
|
+
import { DaikinTextArea } from "./text-area/daikin-text-area.js";
|
|
23
|
+
import { DaikinTextField } from "./text-field/daikin-text-field.js";
|
|
17
24
|
import { DaikinToggle } from "./toggle/daikin-toggle.js";
|
|
18
25
|
import { DaikinTooltip } from "./tooltip/daikin-tooltip.js";
|
|
19
26
|
export {
|
|
@@ -23,16 +30,23 @@ export {
|
|
|
23
30
|
DaikinBreadcrumbItem,
|
|
24
31
|
DaikinButton,
|
|
25
32
|
DaikinCheckbox,
|
|
33
|
+
DaikinDropdown,
|
|
34
|
+
DaikinDropdownItem,
|
|
26
35
|
DaikinIcon,
|
|
27
36
|
DaikinInputGroup,
|
|
37
|
+
DaikinList,
|
|
38
|
+
DaikinListItem,
|
|
28
39
|
DaikinNotification,
|
|
29
|
-
DaikinPanelSwitcher,
|
|
30
40
|
DaikinProgressBar,
|
|
41
|
+
DaikinProgressIndicator,
|
|
42
|
+
DaikinProgressIndicatorItem,
|
|
31
43
|
DaikinRadio,
|
|
44
|
+
DaikinSelect,
|
|
32
45
|
DaikinTab,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
46
|
+
DaikinTabPanels,
|
|
47
|
+
DaikinTabs,
|
|
48
|
+
DaikinTextArea,
|
|
49
|
+
DaikinTextField,
|
|
36
50
|
DaikinToggle,
|
|
37
51
|
DaikinTooltip,
|
|
38
52
|
iconList
|
|
@@ -1,65 +1,109 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { DaikinTextInput } from '../text-input/daikin-text-input';
|
|
3
|
-
import { DaikinTextarea } from '../textarea/daikin-textarea';
|
|
4
|
-
type ControlElement = DaikinTextInput | DaikinTextarea;
|
|
5
2
|
/**
|
|
6
|
-
* The input group component serves as a wrapper for
|
|
3
|
+
* The input group component serves as a wrapper for an input control component (full list below), providing additional elements such as label text, helper text, or a counter.
|
|
7
4
|
* It enhances the user experience by associating supplementary information or functionality directly with the input field.
|
|
8
5
|
* This component is particularly useful for creating complex forms where clear communication and guidance are essential.
|
|
9
6
|
*
|
|
10
7
|
* Hierarchies:
|
|
11
|
-
* - `daikin-input-group` > `daikin-
|
|
12
|
-
* - `daikin-input-group` > `daikin-
|
|
8
|
+
* - `daikin-input-group` > `daikin-select`
|
|
9
|
+
* - `daikin-input-group` > `daikin-dropdown` > `daikin-dropdown-item`
|
|
10
|
+
* - `daikin-input-group` > `daikin-text-area`
|
|
11
|
+
* - `daikin-input-group` > `daikin-text-field`
|
|
12
|
+
* - `daikin-input-group` > `daikin-radio-group` > `daikin-radio`
|
|
13
13
|
*
|
|
14
|
-
* @slot - A slot for
|
|
14
|
+
* @slot - A slot for an input component. See **Hierarchies** for supported components.
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
*
|
|
18
|
-
*
|
|
18
|
+
* ```js
|
|
19
|
+
* import "@daikin-oss/design-system-web-components/components/input-group/index.js";
|
|
20
|
+
* import "@daikin-oss/design-system-web-components/components/select/index.js";
|
|
21
|
+
* import "@daikin-oss/design-system-web-components/components/text-area/index.js";
|
|
22
|
+
* import "@daikin-oss/design-system-web-components/components/text-field/index.js";
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* With Dropdown:
|
|
19
26
|
*
|
|
20
27
|
* ```html
|
|
21
28
|
* <daikin-input-group>
|
|
22
|
-
* <daikin-
|
|
29
|
+
* <daikin-dropdown value="Value of Dropdown">
|
|
30
|
+
* <daikin-dropdown-item value="Value of Dropdown Item">
|
|
31
|
+
* Dropdown item 1
|
|
32
|
+
* </daikin-dropdown-item>
|
|
33
|
+
* </daikin-dropdown>
|
|
23
34
|
* </daikin-input-group>
|
|
24
35
|
* ```
|
|
25
36
|
*
|
|
26
|
-
* With
|
|
37
|
+
* With Select:
|
|
27
38
|
*
|
|
28
39
|
* ```html
|
|
29
40
|
* <daikin-input-group>
|
|
30
|
-
* <daikin-
|
|
41
|
+
* <daikin-select>
|
|
42
|
+
* <select name="select">
|
|
43
|
+
* <option value="value1">Option 1</option>
|
|
44
|
+
* <option value="value2">Option 2</option>
|
|
45
|
+
* <option value="value3">Option 3</option>
|
|
46
|
+
* </select>
|
|
47
|
+
* </daikin-select>
|
|
31
48
|
* </daikin-input-group>
|
|
32
49
|
* ```
|
|
50
|
+
*
|
|
51
|
+
* With Text Field:
|
|
52
|
+
*
|
|
53
|
+
* ```html
|
|
54
|
+
* <daikin-input-group>
|
|
55
|
+
* <daikin-text-field value="Content of Text Field"></daikin-text-field>
|
|
56
|
+
* </daikin-input-group>
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* With TextArea:
|
|
60
|
+
*
|
|
61
|
+
* ```html
|
|
62
|
+
* <daikin-input-group>
|
|
63
|
+
* <daikin-text-area value="Content of TextArea"></daikin-text-area>
|
|
64
|
+
* </daikin-input-group>
|
|
65
|
+
* ```
|
|
66
|
+
* ```
|
|
33
67
|
*/
|
|
34
68
|
export declare class DaikinInputGroup extends LitElement {
|
|
35
69
|
static readonly styles: import('lit').CSSResult;
|
|
36
70
|
/**
|
|
37
|
-
* Label text
|
|
71
|
+
* Label text displayed at the top of the field.
|
|
38
72
|
*/
|
|
39
|
-
label
|
|
73
|
+
label: string | null;
|
|
40
74
|
/**
|
|
41
|
-
* Helper text
|
|
75
|
+
* Helper text displayed at the top of the field.
|
|
76
|
+
* If `error` is specified and `disabled` is `false`, that takes precedence and helper text is not displayed.
|
|
42
77
|
*/
|
|
43
|
-
helper
|
|
78
|
+
helper: string | null;
|
|
44
79
|
/**
|
|
45
|
-
*
|
|
80
|
+
* Text indicating that the field is required.
|
|
81
|
+
* If a non-empty string is set,
|
|
82
|
+
* - the text will be displayed in red to the right of the label, and
|
|
83
|
+
* - the `required` attribute will be set for the input control in the slot.
|
|
84
|
+
* Ignored if `disabled` is `true`.
|
|
46
85
|
*/
|
|
47
|
-
|
|
86
|
+
required: string | null;
|
|
48
87
|
/**
|
|
49
|
-
*
|
|
88
|
+
* Error text displayed at the top of the field.
|
|
89
|
+
* Ignored if `disabled` is `true`.
|
|
90
|
+
* Reflected in presence of `error` attribute of the input control in the slot.
|
|
50
91
|
*/
|
|
51
|
-
|
|
92
|
+
error: string | null;
|
|
52
93
|
/**
|
|
53
|
-
*
|
|
94
|
+
* Whether the field is disabled.
|
|
95
|
+
* Reflected in `disabled` attribute of the input control in the slot.
|
|
54
96
|
*/
|
|
55
|
-
|
|
97
|
+
disabled: boolean;
|
|
56
98
|
/**
|
|
57
|
-
*
|
|
99
|
+
* Maximum value to display on the counter. When `null`, the counter will be hidden.
|
|
58
100
|
*/
|
|
59
|
-
|
|
60
|
-
_textareas
|
|
61
|
-
_controls
|
|
101
|
+
textareaMaxCount: number | null;
|
|
102
|
+
private readonly _textareas;
|
|
103
|
+
private readonly _controls;
|
|
104
|
+
private _textareaCount;
|
|
62
105
|
private _handleSlotChange;
|
|
106
|
+
private _handleInput;
|
|
63
107
|
private _reflectSlotProperties;
|
|
64
108
|
render(): import('lit-html').TemplateResult<1>;
|
|
65
109
|
updated(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { colorFeedbackNegative } from "@daikin-oss/dds-tokens/js/daikin/Light/variables.js";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
|
-
import { css, unsafeCSS, LitElement, html } from "lit";
|
|
4
|
-
import { property, queryAssignedElements, customElement } from "lit/decorators.js";
|
|
3
|
+
import { css, unsafeCSS, LitElement, html, nothing } from "lit";
|
|
4
|
+
import { property, queryAssignedElements, state, customElement } from "lit/decorators.js";
|
|
5
5
|
import tailwindStyles from "../../tailwind.css.js";
|
|
6
6
|
var __defProp = Object.defineProperty;
|
|
7
7
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -13,64 +13,116 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
13
13
|
if (kind && result) __defProp(target, key, result);
|
|
14
14
|
return result;
|
|
15
15
|
};
|
|
16
|
-
const cvaLabel = cva(["
|
|
16
|
+
const cvaLabel = cva(["flex", "items-center", "font-bold", "leading-5"], {
|
|
17
17
|
variants: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
required: {
|
|
23
|
-
optional: [],
|
|
24
|
-
required: ["after:content-['*']", "after:ml-[2px]"]
|
|
18
|
+
disabled: {
|
|
19
|
+
false: [],
|
|
20
|
+
true: ["text-system-state-disabled"]
|
|
25
21
|
}
|
|
26
22
|
}
|
|
27
23
|
});
|
|
28
|
-
const cvaHelper = cva(
|
|
24
|
+
const cvaHelper = cva(
|
|
25
|
+
["flex", "gap-1", "items-center", "leading-5", "text-sm"],
|
|
26
|
+
{
|
|
27
|
+
variants: {
|
|
28
|
+
type: {
|
|
29
|
+
helper: [],
|
|
30
|
+
helperDisabled: ["text-system-state-disabled"],
|
|
31
|
+
error: [
|
|
32
|
+
"text-system-state-error-active",
|
|
33
|
+
"font-bold",
|
|
34
|
+
"before:size-4",
|
|
35
|
+
"before:i-daikin-status-error"
|
|
36
|
+
],
|
|
37
|
+
none: ["hidden"]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
const cvaCounter = cva(["text-sm", "font-bold"], {
|
|
43
|
+
variants: {
|
|
44
|
+
disabled: {
|
|
45
|
+
false: ["text-system-element-text-secondary"],
|
|
46
|
+
true: ["text-system-state-disabled"]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
const cvaCounterValueLength = cva([], {
|
|
29
51
|
variants: {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
52
|
+
error: {
|
|
53
|
+
false: [],
|
|
54
|
+
true: ["text-system-state-error-active"]
|
|
33
55
|
}
|
|
34
56
|
}
|
|
35
57
|
});
|
|
36
58
|
let DaikinInputGroup = class extends LitElement {
|
|
37
59
|
constructor() {
|
|
38
60
|
super(...arguments);
|
|
61
|
+
this.label = null;
|
|
62
|
+
this.helper = null;
|
|
63
|
+
this.required = null;
|
|
64
|
+
this.error = null;
|
|
39
65
|
this.disabled = false;
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
this.textareaCounter = false;
|
|
66
|
+
this.textareaMaxCount = null;
|
|
67
|
+
this._textareaCount = null;
|
|
43
68
|
}
|
|
44
69
|
_handleSlotChange() {
|
|
45
70
|
this._reflectSlotProperties();
|
|
71
|
+
const textarea = this._textareas[0];
|
|
72
|
+
this._textareaCount = (textarea == null ? void 0 : textarea.count) ?? null;
|
|
73
|
+
}
|
|
74
|
+
_handleInput(event) {
|
|
75
|
+
if (event.target.tagName === "DAIKIN-TEXT-AREA") {
|
|
76
|
+
this._textareaCount = event.target.count;
|
|
77
|
+
}
|
|
46
78
|
}
|
|
47
79
|
_reflectSlotProperties() {
|
|
48
|
-
const isError = !this.disabled && !!this.error;
|
|
49
80
|
for (const control of this._controls) {
|
|
50
|
-
control.
|
|
51
|
-
control.error = isError;
|
|
52
|
-
}
|
|
53
|
-
for (const item of this._textareas) {
|
|
54
|
-
item.counter = this.textareaCounter;
|
|
81
|
+
control.reflectInputGroup(this);
|
|
55
82
|
}
|
|
56
83
|
}
|
|
57
84
|
render() {
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
85
|
+
const helperType = this.error && !this.disabled ? "error" : this.helper ? this.disabled ? "helperDisabled" : "helper" : "none";
|
|
86
|
+
const helperText = {
|
|
87
|
+
error: this.error,
|
|
88
|
+
helper: this.helper,
|
|
89
|
+
helperDisabled: this.helper,
|
|
90
|
+
none: ""
|
|
91
|
+
}[helperType];
|
|
65
92
|
return html`<fieldset class="content" ?disabled=${this.disabled}>
|
|
66
|
-
<label
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
93
|
+
<label
|
|
94
|
+
class="flex flex-col justify-center gap-2 w-full text-system-element-text-primary font-daikinSerif"
|
|
95
|
+
>
|
|
96
|
+
<div class="flex justify-between items-center gap-2">
|
|
97
|
+
<div class="flex items-center gap-1 font-bold">
|
|
98
|
+
${this.label ? html`<span class=${cvaLabel({ disabled: this.disabled })}>
|
|
99
|
+
${this.label}
|
|
100
|
+
</span>` : nothing}
|
|
101
|
+
${this.required && !this.disabled ? html`<span class="text-system-state-error-active text-xs">
|
|
102
|
+
${this.required}
|
|
103
|
+
</span>` : nothing}
|
|
104
|
+
</div>
|
|
105
|
+
${this.textareaMaxCount != null && this._textareaCount != null ? html`
|
|
106
|
+
<span class=${cvaCounter({ disabled: this.disabled })}>
|
|
107
|
+
<span
|
|
108
|
+
class=${cvaCounterValueLength({
|
|
109
|
+
error: this.textareaMaxCount < this._textareaCount
|
|
110
|
+
})}
|
|
111
|
+
>${this._textareaCount}</span
|
|
112
|
+
><span>/</span><span>${this.textareaMaxCount}</span>
|
|
113
|
+
</span>
|
|
114
|
+
` : nothing}
|
|
115
|
+
</div>
|
|
116
|
+
<span
|
|
117
|
+
class=${cvaHelper({ type: helperType })}
|
|
118
|
+
aria-live=${helperType === "error" ? "polite" : "off"}
|
|
119
|
+
>
|
|
120
|
+
${helperText}
|
|
121
|
+
</span>
|
|
122
|
+
<slot
|
|
123
|
+
@slotchange=${this._handleSlotChange}
|
|
124
|
+
@input=${this._handleInput}
|
|
125
|
+
></slot>
|
|
74
126
|
</label>
|
|
75
127
|
</fieldset>`;
|
|
76
128
|
}
|
|
@@ -85,33 +137,38 @@ DaikinInputGroup.styles = css`
|
|
|
85
137
|
--input-group-border-color-error: ${unsafeCSS(colorFeedbackNegative)};
|
|
86
138
|
|
|
87
139
|
display: block;
|
|
88
|
-
width:
|
|
140
|
+
width: 100%;
|
|
89
141
|
}
|
|
90
142
|
`;
|
|
91
143
|
__decorateClass([
|
|
92
|
-
property({ type: String })
|
|
144
|
+
property({ type: String, reflect: true })
|
|
93
145
|
], DaikinInputGroup.prototype, "label", 2);
|
|
94
146
|
__decorateClass([
|
|
95
|
-
property({ type: String })
|
|
147
|
+
property({ type: String, reflect: true })
|
|
96
148
|
], DaikinInputGroup.prototype, "helper", 2);
|
|
97
149
|
__decorateClass([
|
|
98
|
-
property({ type:
|
|
99
|
-
], DaikinInputGroup.prototype, "disabled", 2);
|
|
100
|
-
__decorateClass([
|
|
101
|
-
property({ type: Boolean, reflect: true })
|
|
150
|
+
property({ type: String, reflect: true })
|
|
102
151
|
], DaikinInputGroup.prototype, "required", 2);
|
|
103
152
|
__decorateClass([
|
|
104
153
|
property({ type: String, reflect: true })
|
|
105
154
|
], DaikinInputGroup.prototype, "error", 2);
|
|
106
155
|
__decorateClass([
|
|
107
156
|
property({ type: Boolean, reflect: true })
|
|
108
|
-
], DaikinInputGroup.prototype, "
|
|
157
|
+
], DaikinInputGroup.prototype, "disabled", 2);
|
|
109
158
|
__decorateClass([
|
|
110
|
-
|
|
159
|
+
property({ type: Number, reflect: true, attribute: "textarea-max-count" })
|
|
160
|
+
], DaikinInputGroup.prototype, "textareaMaxCount", 2);
|
|
161
|
+
__decorateClass([
|
|
162
|
+
queryAssignedElements({ selector: "daikin-text-area" })
|
|
111
163
|
], DaikinInputGroup.prototype, "_textareas", 2);
|
|
112
164
|
__decorateClass([
|
|
113
|
-
queryAssignedElements({
|
|
165
|
+
queryAssignedElements({
|
|
166
|
+
selector: "daikin-dropdown,daikin-select,daikin-text-field,daikin-text-area,daikin-radio-group"
|
|
167
|
+
})
|
|
114
168
|
], DaikinInputGroup.prototype, "_controls", 2);
|
|
169
|
+
__decorateClass([
|
|
170
|
+
state()
|
|
171
|
+
], DaikinInputGroup.prototype, "_textareaCount", 2);
|
|
115
172
|
DaikinInputGroup = __decorateClass([
|
|
116
173
|
customElement("daikin-input-group")
|
|
117
174
|
], DaikinInputGroup);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* The list component is used to list items using the list item component.
|
|
4
|
+
*
|
|
5
|
+
* Hierarchy:
|
|
6
|
+
* - `daikin-list` > `daikin-list-item`
|
|
7
|
+
*
|
|
8
|
+
* @slot - A slot for the list items. Place `daikin-list-item` elements here.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
*
|
|
12
|
+
* ```html
|
|
13
|
+
* <daikin-list>
|
|
14
|
+
* <daikin-list-item>List item label 1</daikin-list-item>
|
|
15
|
+
* <daikin-list-item>List item label 2</daikin-list-item>
|
|
16
|
+
* <daikin-list-item>List item label 3</daikin-list-item>
|
|
17
|
+
* </daikin-list>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare class DaikinList extends LitElement {
|
|
21
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
22
|
+
}
|
|
23
|
+
declare global {
|
|
24
|
+
interface HTMLElementTagNameMap {
|
|
25
|
+
"daikin-list": DaikinList;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export default DaikinList;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LitElement, html } from "lit";
|
|
2
|
+
import { customElement } from "lit/decorators.js";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
6
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
7
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
8
|
+
if (decorator = decorators[i])
|
|
9
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
10
|
+
if (kind && result) __defProp(target, key, result);
|
|
11
|
+
return result;
|
|
12
|
+
};
|
|
13
|
+
let DaikinList = class extends LitElement {
|
|
14
|
+
render() {
|
|
15
|
+
return html`<div role="list">
|
|
16
|
+
<slot></slot>
|
|
17
|
+
</div>`;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
DaikinList = __decorateClass([
|
|
21
|
+
customElement("daikin-list")
|
|
22
|
+
], DaikinList);
|
|
23
|
+
export {
|
|
24
|
+
DaikinList
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-list';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* The list item component is used to represent a single item in a list. Please use it within the `daikin-list` component.
|
|
4
|
+
*
|
|
5
|
+
* The following types are available:
|
|
6
|
+
*
|
|
7
|
+
* - `button`: Uses `<button>` tag.
|
|
8
|
+
* - `link`: Uses `<a>` tag.
|
|
9
|
+
* - `text`: Uses `<span>` tag.
|
|
10
|
+
*
|
|
11
|
+
* Hierarchy:
|
|
12
|
+
* - `daikin-list` > `daikin-list-item`
|
|
13
|
+
*
|
|
14
|
+
* @fires click - A retargeted event of a [click event](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event). Suppressed if `disabled` is true.
|
|
15
|
+
*
|
|
16
|
+
* @slot - A slot for the list item label content.
|
|
17
|
+
* @slot action - An optional slot for an interaction item to be placed to the right of the text. Place `daikin-checkbox`, `daikin-toggle`, or something similar.
|
|
18
|
+
* @slot left-icon - An optional slot for an icon to be placed to the left of the text. Place `daikin-icon` or something similar.
|
|
19
|
+
* @slot right-icon - An optional slot for an icon to be placed to the left of the text. Ignored if `action` slot is used. Place `daikin-icon` or something similar.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
*
|
|
23
|
+
* ```html
|
|
24
|
+
* <daikin-list-item>List item label</daikin-list-item>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare class DaikinListItem extends LitElement {
|
|
28
|
+
static readonly styles: import('lit').CSSResult;
|
|
29
|
+
/**
|
|
30
|
+
* Type of the list item.
|
|
31
|
+
* - `button` (default): The list item will be rendered as a `<button>` element.
|
|
32
|
+
* - `link`: The list item will be rendered as an `<a>` element.
|
|
33
|
+
* - `text`: The list item will be rendered as a `<span>` element. Use this if the list itself has no action.
|
|
34
|
+
*/
|
|
35
|
+
type: "button" | "link" | "text";
|
|
36
|
+
/**
|
|
37
|
+
* Link `href`.
|
|
38
|
+
* Only used if the `type` is `"link"`.
|
|
39
|
+
* If omitted with `type="link"`, the link will be treated as [a placeholder link](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element:~:text=If%20the%20a%20element%20has%20no%20href%20attribute) and rendered as disabled state.
|
|
40
|
+
*/
|
|
41
|
+
href: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the list item is disabled.
|
|
44
|
+
* Ignored if the `type` is `"text"`.
|
|
45
|
+
*/
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
private _focusableElement;
|
|
48
|
+
private get _disabled();
|
|
49
|
+
private _handleClickAction;
|
|
50
|
+
constructor();
|
|
51
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
52
|
+
/**
|
|
53
|
+
* Focuses on the inner button or link.
|
|
54
|
+
* It will have no effect if the `type` is "text" or `disabled` is `true`.
|
|
55
|
+
* @param options focus options
|
|
56
|
+
*/
|
|
57
|
+
focus(options?: FocusOptions): void;
|
|
58
|
+
}
|
|
59
|
+
declare global {
|
|
60
|
+
interface HTMLElementTagNameMap {
|
|
61
|
+
"daikin-list-item": DaikinListItem;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export default DaikinListItem;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { css, unsafeCSS, LitElement, html } from "lit";
|
|
3
|
+
import { property, query, customElement } from "lit/decorators.js";
|
|
4
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
5
|
+
import tailwindStyles from "../../tailwind.css.js";
|
|
6
|
+
import "../icon/daikin-icon.js";
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12
|
+
if (decorator = decorators[i])
|
|
13
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
14
|
+
if (kind && result) __defProp(target, key, result);
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
const INNER_CN = cva([
|
|
18
|
+
"text-left",
|
|
19
|
+
"before:absolute",
|
|
20
|
+
"before:inset-0",
|
|
21
|
+
"before:w-full",
|
|
22
|
+
"before:h-full",
|
|
23
|
+
"focus-visible:outline-none",
|
|
24
|
+
"focus-visible:before:outline",
|
|
25
|
+
"focus-visible:before:outline-2",
|
|
26
|
+
"focus-visible:before:-outline-offset-2",
|
|
27
|
+
"focus-visible:before:outline-system-state-focus",
|
|
28
|
+
// For buttons and links
|
|
29
|
+
"link-enabled:before:group-hover:[&:not(:active)]:bg-system-background-surface-hover",
|
|
30
|
+
"link-enabled:before:active:bg-system-background-surface-press",
|
|
31
|
+
// For text
|
|
32
|
+
"[&:not(a,button)]:before:group-hover:bg-system-background-surface-hover"
|
|
33
|
+
])();
|
|
34
|
+
const cvaContent = cva(["block", "pl-2", "pr-3", "text-left"], {
|
|
35
|
+
variants: {
|
|
36
|
+
disabled: {
|
|
37
|
+
false: ["text-system-element-text-primary"],
|
|
38
|
+
true: ["text-system-state-disabled"]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
let DaikinListItem = class extends LitElement {
|
|
43
|
+
constructor() {
|
|
44
|
+
super();
|
|
45
|
+
this.type = "button";
|
|
46
|
+
this.href = null;
|
|
47
|
+
this.disabled = false;
|
|
48
|
+
this.addEventListener("click", (event) => {
|
|
49
|
+
if (this._disabled) {
|
|
50
|
+
event.stopImmediatePropagation();
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
get _disabled() {
|
|
55
|
+
return (
|
|
56
|
+
// False if `type` is "text".
|
|
57
|
+
this.type !== "text" && // True if `this.disabled`, or if `type` is "link" and `href` is missing.
|
|
58
|
+
(this.disabled || this.type === "link" && this.href == null)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
_handleClickAction(event) {
|
|
62
|
+
event.stopPropagation();
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
const disabled = this._disabled;
|
|
66
|
+
const content = html`<span class="flex items-center w-full relative">
|
|
67
|
+
<slot name="left-icon">
|
|
68
|
+
<span class="block -ml-1"></span>
|
|
69
|
+
</slot>
|
|
70
|
+
<slot class=${cvaContent({ disabled: this.disabled })}></slot>
|
|
71
|
+
</span>`;
|
|
72
|
+
const list = {
|
|
73
|
+
button: () => html`<button type="button" class=${INNER_CN} ?disabled=${disabled}>
|
|
74
|
+
${content}
|
|
75
|
+
</button>`,
|
|
76
|
+
link: () => html`<a
|
|
77
|
+
class=${INNER_CN}
|
|
78
|
+
href=${ifDefined(!disabled ? this.href ?? void 0 : void 0)}
|
|
79
|
+
role=${ifDefined(disabled ? "link" : void 0)}
|
|
80
|
+
aria-disabled=${ifDefined(disabled ? "true" : void 0)}
|
|
81
|
+
>
|
|
82
|
+
${content}
|
|
83
|
+
</a>`,
|
|
84
|
+
text: () => html`<span class=${INNER_CN}>${content}</span>`
|
|
85
|
+
}[this.type]();
|
|
86
|
+
return html`<div
|
|
87
|
+
class="group flex justify-between items-center w-full min-h-12 p-3 text-left relative"
|
|
88
|
+
role="listitem"
|
|
89
|
+
>
|
|
90
|
+
${list}
|
|
91
|
+
<slot
|
|
92
|
+
name="action"
|
|
93
|
+
class="flex items-center gap-3"
|
|
94
|
+
@click=${this._handleClickAction}
|
|
95
|
+
>
|
|
96
|
+
<slot name="right-icon" class="pointer-events-none">
|
|
97
|
+
<span class="block -mr-1"></span>
|
|
98
|
+
</slot>
|
|
99
|
+
</slot>
|
|
100
|
+
</div>`;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Focuses on the inner button or link.
|
|
104
|
+
* It will have no effect if the `type` is "text" or `disabled` is `true`.
|
|
105
|
+
* @param options focus options
|
|
106
|
+
*/
|
|
107
|
+
focus(options) {
|
|
108
|
+
var _a;
|
|
109
|
+
(_a = this._focusableElement) == null ? void 0 : _a.focus(options);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
DaikinListItem.styles = css`
|
|
113
|
+
${unsafeCSS(tailwindStyles)}
|
|
114
|
+
`;
|
|
115
|
+
__decorateClass([
|
|
116
|
+
property({ type: String, reflect: true })
|
|
117
|
+
], DaikinListItem.prototype, "type", 2);
|
|
118
|
+
__decorateClass([
|
|
119
|
+
property({ type: String, reflect: true })
|
|
120
|
+
], DaikinListItem.prototype, "href", 2);
|
|
121
|
+
__decorateClass([
|
|
122
|
+
property({ type: Boolean, reflect: true })
|
|
123
|
+
], DaikinListItem.prototype, "disabled", 2);
|
|
124
|
+
__decorateClass([
|
|
125
|
+
query("a,button")
|
|
126
|
+
], DaikinListItem.prototype, "_focusableElement", 2);
|
|
127
|
+
DaikinListItem = __decorateClass([
|
|
128
|
+
customElement("daikin-list-item")
|
|
129
|
+
], DaikinListItem);
|
|
130
|
+
export {
|
|
131
|
+
DaikinListItem
|
|
132
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './daikin-list-item';
|