@daikin-oss/design-system-web-components 0.3.2 → 0.4.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 +63 -0
- package/dist/cjs/components/accordion/daikin-accordion.cjs +31 -6
- package/dist/cjs/components/accordion/daikin-accordion.d.ts +15 -9
- package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +105 -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 +99 -119
- package/dist/cjs/components/checkbox/daikin-checkbox.d.ts +27 -38
- package/dist/cjs/components/icon/daikin-icon.d.ts +4 -0
- package/dist/cjs/components/icon/icons.json.cjs +20 -0
- package/dist/cjs/components/icon/icons.json.d.ts +20 -0
- package/dist/cjs/components/index.cjs +18 -8
- package/dist/cjs/components/index.d.ts +4 -2
- package/dist/cjs/components/input-group/daikin-input-group.cjs +1 -1
- package/dist/cjs/components/input-group/daikin-input-group.d.ts +6 -0
- 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 +125 -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/radio/daikin-radio.cjs +73 -92
- package/dist/cjs/components/radio/daikin-radio.d.ts +23 -39
- package/dist/cjs/components/tab/daikin-tab.cjs +41 -46
- 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-dev/components/panel-switcher/daikin-panel-switcher.d.ts → cjs/components/tab-panels/daikin-tab-panels.d.ts} +17 -11
- 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} +29 -35
- package/dist/cjs/components/{tab-group/daikin-tab-group.d.ts → tabs/daikin-tabs.d.ts} +27 -21
- package/dist/cjs/components/tabs/index.cjs +7 -0
- package/dist/cjs/components/tabs/index.d.ts +1 -0
- package/dist/cjs/components/text-input/daikin-text-input.cjs +4 -3
- package/dist/cjs/components/text-input/daikin-text-input.d.ts +5 -0
- package/dist/cjs/components/textarea/daikin-textarea.cjs +3 -3
- package/dist/cjs/components/textarea/daikin-textarea.d.ts +5 -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.d.ts +4 -0
- package/dist/cjs/index.cjs +18 -8
- package/dist/cjs/tailwind.css.cjs +1 -1
- package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +31 -6
- package/dist/cjs-dev/components/accordion/daikin-accordion.d.ts +15 -9
- package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +105 -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 +99 -119
- package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.ts +27 -38
- package/dist/cjs-dev/components/icon/daikin-icon.d.ts +4 -0
- package/dist/cjs-dev/components/icon/icons.json.cjs +20 -0
- package/dist/cjs-dev/components/icon/icons.json.d.ts +20 -0
- package/dist/cjs-dev/components/index.cjs +18 -8
- package/dist/cjs-dev/components/index.d.ts +4 -2
- package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +1 -1
- package/dist/cjs-dev/components/input-group/daikin-input-group.d.ts +6 -0
- 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 +125 -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/radio/daikin-radio.cjs +73 -92
- package/dist/cjs-dev/components/radio/daikin-radio.d.ts +23 -39
- package/dist/cjs-dev/components/tab/daikin-tab.cjs +41 -46
- 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/components/panel-switcher/daikin-panel-switcher.d.ts → cjs-dev/components/tab-panels/daikin-tab-panels.d.ts} +17 -11
- 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} +31 -37
- package/dist/{es-dev/components/tab-group/daikin-tab-group.d.ts → cjs-dev/components/tabs/daikin-tabs.d.ts} +27 -21
- 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-input/daikin-text-input.cjs +4 -3
- package/dist/cjs-dev/components/text-input/daikin-text-input.d.ts +5 -0
- package/dist/cjs-dev/components/textarea/daikin-textarea.cjs +3 -3
- package/dist/cjs-dev/components/textarea/daikin-textarea.d.ts +5 -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.d.ts +4 -0
- package/dist/cjs-dev/index.cjs +18 -8
- package/dist/cjs-dev/tailwind.css.cjs +1 -1
- package/dist/es/components/accordion/daikin-accordion.d.ts +15 -9
- package/dist/es/components/accordion/daikin-accordion.js +32 -7
- package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +28 -13
- package/dist/es/components/accordion-item/daikin-accordion-item.js +106 -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 +101 -121
- package/dist/es/components/icon/daikin-icon.d.ts +4 -0
- package/dist/es/components/icon/icons.json.d.ts +20 -0
- package/dist/es/components/icon/icons.json.js +20 -0
- package/dist/es/components/index.d.ts +4 -2
- package/dist/es/components/index.js +8 -4
- package/dist/es/components/input-group/daikin-input-group.d.ts +6 -0
- package/dist/es/components/input-group/daikin-input-group.js +1 -1
- 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 +126 -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/radio/daikin-radio.d.ts +23 -39
- package/dist/es/components/radio/daikin-radio.js +74 -93
- package/dist/es/components/tab/daikin-tab.d.ts +12 -12
- package/dist/es/components/tab/daikin-tab.js +42 -47
- package/dist/es/components/{panel-switcher/daikin-panel-switcher.d.ts → tab-panels/daikin-tab-panels.d.ts} +17 -11
- 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 -21
- package/dist/es/components/{tab-group/daikin-tab-group.js → tabs/daikin-tabs.js} +30 -36
- package/dist/es/components/tabs/index.d.ts +1 -0
- package/dist/es/components/tabs/index.js +4 -0
- package/dist/es/components/text-input/daikin-text-input.d.ts +5 -0
- package/dist/es/components/text-input/daikin-text-input.js +4 -3
- package/dist/es/components/textarea/daikin-textarea.d.ts +5 -0
- package/dist/es/components/textarea/daikin-textarea.js +3 -3
- 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 +4 -0
- package/dist/es/index.js +8 -4
- package/dist/es/tailwind.css.js +1 -1
- package/dist/es-dev/components/accordion/daikin-accordion.d.ts +15 -9
- package/dist/es-dev/components/accordion/daikin-accordion.js +32 -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 +106 -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 +101 -121
- package/dist/es-dev/components/icon/daikin-icon.d.ts +4 -0
- package/dist/es-dev/components/icon/icons.json.d.ts +20 -0
- package/dist/es-dev/components/icon/icons.json.js +20 -0
- package/dist/es-dev/components/index.d.ts +4 -2
- package/dist/es-dev/components/index.js +8 -4
- package/dist/es-dev/components/input-group/daikin-input-group.d.ts +6 -0
- package/dist/es-dev/components/input-group/daikin-input-group.js +1 -1
- 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 +126 -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/radio/daikin-radio.d.ts +23 -39
- package/dist/es-dev/components/radio/daikin-radio.js +74 -93
- package/dist/es-dev/components/tab/daikin-tab.d.ts +12 -12
- package/dist/es-dev/components/tab/daikin-tab.js +42 -47
- package/dist/es-dev/components/{panel-switcher/daikin-panel-switcher.d.ts → tab-panels/daikin-tab-panels.d.ts} +17 -11
- 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 -21
- package/dist/es-dev/components/{tab-group/daikin-tab-group.js → tabs/daikin-tabs.js} +32 -38
- 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-input/daikin-text-input.d.ts +5 -0
- package/dist/es-dev/components/text-input/daikin-text-input.js +4 -3
- package/dist/es-dev/components/textarea/daikin-textarea.d.ts +5 -0
- package/dist/es-dev/components/textarea/daikin-textarea.js +3 -3
- 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 +4 -0
- package/dist/es-dev/index.js +8 -4
- package/dist/es-dev/tailwind.css.js +1 -1
- 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/status-error.svg +3 -0
- package/package.json +2 -1
- 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-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/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-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/icons/accordion-chevron-up.svg +0 -3
- package/icons/radio-checked.svg +0 -4
- package/icons/radio-unchecked.svg +0 -4
- package/icons/status-negative.svg +0 -11
- /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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
# @daikin-oss/design-system-web-components
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#72](https://github.com/dsv-rp/DDS/pull/72) [`70391aa`](https://github.com/dsv-rp/DDS/commit/70391aab75eaf72fcf2951b4cb2664d8afa4cbf4) Thanks [@poetrainy](https://github.com/poetrainy)! - Progress Bar: The `size` property has been added. (DDS-1385)
|
|
8
|
+
Progress Bar: Updated appearance. (DDS-1385)
|
|
9
|
+
|
|
10
|
+
- [#60](https://github.com/dsv-rp/DDS/pull/60) [`b6d7d9f`](https://github.com/dsv-rp/DDS/commit/b6d7d9f4bb5286bb9a8dc719628624dcca3c0f75) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Checkbox: The `readonly`, `size` and `error` property has been removed. (DDS-1288)
|
|
11
|
+
**BREAKING CHANGE** Checkbox: The `labelPosition` property now removed `"left"` value. (DDS-1288)
|
|
12
|
+
**BREAKING CHANGE** Checkbox: The `labelPosition` attribute (not property) has been renamed to `label-position`. (DDS-1288)
|
|
13
|
+
Checkbox: The `labelPosition` property now accepts `"hidden"` value. (DDS-1288)
|
|
14
|
+
Checkbox: Updated appearance. (DDS-1288)
|
|
15
|
+
|
|
16
|
+
- [#75](https://github.com/dsv-rp/DDS/pull/75) [`3922068`](https://github.com/dsv-rp/DDS/commit/3922068e28efcd5786f576435f68c35983f252c2) Thanks [@rinjInTokyo](https://github.com/rinjInTokyo)! - Improve breadcrumb accessibility. (DDS-1482)
|
|
17
|
+
**BREAKING CHANGE** Remove `link` slot from `daikin-breadcrumb-item`.
|
|
18
|
+
|
|
19
|
+
- [#69](https://github.com/dsv-rp/DDS/pull/69) [`3fcbc38`](https://github.com/dsv-rp/DDS/commit/3fcbc38a1affb1f3d50dbfb4e1aeb1fd34f301a7) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Accordion: The `title` attribute has been removed and replaced with a `summary` slot. (DDS-1414)
|
|
20
|
+
Accordion: Updated appearance. (DDS-1414)
|
|
21
|
+
Accordion Item: Updated appearance. (DDS-1414)
|
|
22
|
+
|
|
23
|
+
- [#61](https://github.com/dsv-rp/DDS/pull/61) [`36ef955`](https://github.com/dsv-rp/DDS/commit/36ef9551a504de318a51a738b9b6b58edfb7f6f9) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Radio: The `readonly`, `size` and `error` properties have been removed. (DDS-1350)
|
|
24
|
+
**BREAKING CHANGE** Radio: The `labelPosition` property no longer supports `"left"`. Instead, it now supports `"hidden"`. (DDS-1350)
|
|
25
|
+
**BREAKING CHANGE** Radio: The `labelPosition` attribute (not property) has been renamed to `label-position`.
|
|
26
|
+
Radio: Updated appearance. (DDS-1350)
|
|
27
|
+
|
|
28
|
+
- [#56](https://github.com/dsv-rp/DDS/pull/56) [`a81916a`](https://github.com/dsv-rp/DDS/commit/a81916ac21c4fec5e85eb1e8bf9005137887a662) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Button: The `role` attribute/property is renamed to `button-role` attribute and `buttonRole` property to avoid conflicts with standard HTML attributes.
|
|
29
|
+
**BREAKING CHANGE** Button: The `variant` attribute now accepts values of `"fill"`, `"outline"` and `"ghost"`, instead of `"primary"`, `"secondary"`, `"tertiary"` and `"primaryDanger"`.
|
|
30
|
+
**BREAKING CHANGE** Button: The `isLoading` attribute has been removed.
|
|
31
|
+
**BREAKING CHANGE** Button: The `leftIcon` and `rightIcon` attributes have been renamed to `left-icon` and `right-icon` respectively.
|
|
32
|
+
**BREAKING CHANGE** Button: The `type` attribute now accepts `"link"`, and whether the button becomes a link is now determined by the `type` attribute, not by the presence of the `href` attribute. If `href` is omitted with `type="link"`, it is treated as a disabled state.
|
|
33
|
+
Button: Added `color` attribute that accepts values of `"default"` and `"danger"`.
|
|
34
|
+
Button: Updated appearance. (DDS-1284)
|
|
35
|
+
|
|
36
|
+
- [#50](https://github.com/dsv-rp/DDS/pull/50) [`4a34db7`](https://github.com/dsv-rp/DDS/commit/4a34db738bc08e347a790c0620bc602bbf1eac5b) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Notification: The `title` and `description` attributes have been removed, and their contents are now specified using slots with the same names.
|
|
37
|
+
|
|
38
|
+
- [#67](https://github.com/dsv-rp/DDS/pull/67) [`d377f50`](https://github.com/dsv-rp/DDS/commit/d377f5043f8d12c37a28772e44173b0e2a778003) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Tabs: The name of the component has been changed from `Tab Group` to `Tabs`. Use `<daikin-tabs>` instead of `<daikin-tab-group>`. (DDS-1450)
|
|
39
|
+
**BREAKING CHANGE** Tabs: The signatures of the `beforechange` and `change` events have been updated to match those of other components. (DDS-1450)
|
|
40
|
+
**BREAKING CHANGE** Tab Panels: The name of the component has been changed from `Panel Switcher` to `Tab panels`. Use `<daikin-tab-panels>` instead of `<daikin-panel-switcher>`. (DDS-1450)
|
|
41
|
+
**BREAKING CHANGE** Tab: The `size` property has been removed. (DDS-1450)
|
|
42
|
+
Tab: Updated appearance. (DDS-1450)
|
|
43
|
+
|
|
44
|
+
- [#63](https://github.com/dsv-rp/DDS/pull/63) [`535464e`](https://github.com/dsv-rp/DDS/commit/535464e625a3edb60e7e94ca867e16b390e3097e) Thanks [@poetrainy](https://github.com/poetrainy)! - **BREAKING CHANGE** Toggle: The `size` and `error` properties has been removed. (DDS-1374)
|
|
45
|
+
Toggle: Updated appearance. (DDS-1374)
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- [#82](https://github.com/dsv-rp/DDS/pull/82) [`db7f9f3`](https://github.com/dsv-rp/DDS/commit/db7f9f331650d21d07d192d7032fd2689a849e3d) Thanks [@rinjInTokyo](https://github.com/rinjInTokyo)! - Delete Stories area from component documentation page.
|
|
50
|
+
|
|
51
|
+
- [#77](https://github.com/dsv-rp/DDS/pull/77) [`dce6fa9`](https://github.com/dsv-rp/DDS/commit/dce6fa9128c84d55baf64b3d0ad8f35c4d8ea69c) Thanks [@rinjInTokyo](https://github.com/rinjInTokyo)! - Add component import guideline to documentation.
|
|
52
|
+
|
|
53
|
+
- [#59](https://github.com/dsv-rp/DDS/pull/59) [`dcfaef3`](https://github.com/dsv-rp/DDS/commit/dcfaef3e5aabe47e61b3ed815d2c74fcb14afc68) Thanks [@yodas7](https://github.com/yodas7)! - Storybook: Improve the code displayed by "Show code".
|
|
54
|
+
Storybook: Added a common description of the event to the beginning of the Events section of the component documentation.
|
|
55
|
+
|
|
56
|
+
- [#55](https://github.com/dsv-rp/DDS/pull/55) [`5d5c051`](https://github.com/dsv-rp/DDS/commit/5d5c0513febb1c38a500850806c9eef0c210a756) Thanks [@rinjInTokyo](https://github.com/rinjInTokyo)! - Toggle: Fix `checked` property not updated on `change` event. (DDS-1317)
|
|
57
|
+
Tab Group: Fix `value` property not updated on `change` event. (DDS-1317)
|
|
58
|
+
|
|
59
|
+
- [#45](https://github.com/dsv-rp/DDS/pull/45) [`42f6d1b`](https://github.com/dsv-rp/DDS/commit/42f6d1b27e4020db4e1c286f16d632aa305457d9) Thanks [@poetrainy](https://github.com/poetrainy)! - Text Input: Fixed an issue where the size of components could not be changed. (DDS-1279)
|
|
60
|
+
Textarea: Fixed an issue where the size of components could not be changed. (DDS-1279)
|
|
61
|
+
|
|
62
|
+
- [#78](https://github.com/dsv-rp/DDS/pull/78) [`fbd2adb`](https://github.com/dsv-rp/DDS/commit/fbd2adbd671a9d928fb92eec7d548260e5bbaa87) Thanks [@poetrainy](https://github.com/poetrainy)! - Toggle: Assign the `switch` role. (DDS-1531)
|
|
63
|
+
|
|
64
|
+
- [#70](https://github.com/dsv-rp/DDS/pull/70) [`144a2ad`](https://github.com/dsv-rp/DDS/commit/144a2adbe9043f345f88f42c80a0106fcb68f542) Thanks [@poetrainy](https://github.com/poetrainy)! - Add List Component.
|
|
65
|
+
|
|
3
66
|
## 0.3.2
|
|
4
67
|
|
|
5
68
|
### Patch Changes
|
|
@@ -14,9 +14,27 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
14
14
|
return result;
|
|
15
15
|
};
|
|
16
16
|
exports.DaikinAccordion = class DaikinAccordion extends lit.LitElement {
|
|
17
|
+
_handleMoveFocus(event) {
|
|
18
|
+
const moveOffset = event.detail.direction === "up" ? -1 : 1;
|
|
19
|
+
const items = this._items;
|
|
20
|
+
const activeElement = document.activeElement;
|
|
21
|
+
const focusedItemIndex = activeElement ? items.findIndex((item) => item === activeElement) : -1;
|
|
22
|
+
if (focusedItemIndex < 0) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
for (let index = focusedItemIndex + moveOffset, i = 0; i < items.length; index += moveOffset, i++) {
|
|
26
|
+
index = Math.sign(index % items.length) === -1 ? items.length - 1 : index % items.length;
|
|
27
|
+
const item = items[index];
|
|
28
|
+
if (item.disabled) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
item.focus();
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
17
35
|
render() {
|
|
18
|
-
return lit.html`<div class="w-full
|
|
19
|
-
<slot></slot>
|
|
36
|
+
return lit.html`<div class="w-full">
|
|
37
|
+
<slot @accordion-move-focus=${this._handleMoveFocus}></slot>
|
|
20
38
|
</div>`;
|
|
21
39
|
}
|
|
22
40
|
};
|
|
@@ -24,14 +42,21 @@ exports.DaikinAccordion.styles = lit.css`
|
|
|
24
42
|
${lit.unsafeCSS(tailwind.default)}
|
|
25
43
|
|
|
26
44
|
:host {
|
|
27
|
-
|
|
28
|
-
|
|
45
|
+
min-width: 160px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
::slotted(daikin-accordion-item) {
|
|
49
|
+
--divider-top-display: block;
|
|
50
|
+
--divider-bottom-display: none;
|
|
29
51
|
}
|
|
30
52
|
|
|
31
|
-
::slotted(daikin-accordion-item:
|
|
32
|
-
|
|
53
|
+
::slotted(daikin-accordion-item:last-child) {
|
|
54
|
+
--divider-bottom-display: block;
|
|
33
55
|
}
|
|
34
56
|
`;
|
|
57
|
+
__decorateClass([
|
|
58
|
+
decorators_js.queryAssignedElements({ selector: "daikin-accordion-item" })
|
|
59
|
+
], exports.DaikinAccordion.prototype, "_items", 2);
|
|
35
60
|
exports.DaikinAccordion = __decorateClass([
|
|
36
61
|
decorators_js.customElement("daikin-accordion")
|
|
37
62
|
], exports.DaikinAccordion);
|
|
@@ -10,25 +10,31 @@ import { LitElement } from 'lit';
|
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
*
|
|
13
|
+
* ```js
|
|
14
|
+
* import "@daikin-oss/design-system-web-components/components/accordion/index.js";
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
13
17
|
* ```html
|
|
14
18
|
* <daikin-accordion>
|
|
15
|
-
* <daikin-accordion-item
|
|
16
|
-
* Accordion 1
|
|
17
|
-
*
|
|
18
|
-
* <daikin-accordion-item title="The second accordion item" open>
|
|
19
|
-
* Accordion 2 content.
|
|
19
|
+
* <daikin-accordion-item>
|
|
20
|
+
* <span slot="summary">Accordion summary 1</span>
|
|
21
|
+
* Accordion content 1
|
|
20
22
|
* </daikin-accordion-item>
|
|
21
|
-
* <daikin-accordion-item
|
|
22
|
-
* Accordion
|
|
23
|
+
* <daikin-accordion-item open>
|
|
24
|
+
* <span slot="summary">Accordion summary 2</span>
|
|
25
|
+
* Accordion content 2
|
|
23
26
|
* </daikin-accordion-item>
|
|
24
|
-
* <daikin-accordion-item
|
|
25
|
-
* Accordion
|
|
27
|
+
* <daikin-accordion-item disabled>
|
|
28
|
+
* <span slot="summary">Accordion summary 3</span>
|
|
29
|
+
* Accordion content 3
|
|
26
30
|
* </daikin-accordion-item>
|
|
27
31
|
* </daikin-accordion>
|
|
28
32
|
* ```
|
|
29
33
|
*/
|
|
30
34
|
export declare class DaikinAccordion extends LitElement {
|
|
31
35
|
static readonly styles: import('lit').CSSResult;
|
|
36
|
+
private readonly _items;
|
|
37
|
+
private _handleMoveFocus;
|
|
32
38
|
render(): import('lit-html').TemplateResult<1>;
|
|
33
39
|
}
|
|
34
40
|
declare global {
|
|
@@ -15,55 +15,38 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
15
15
|
if (kind && result) __defProp(target, key, result);
|
|
16
16
|
return result;
|
|
17
17
|
};
|
|
18
|
-
const cvaDetails = classVarianceAuthority.cva(
|
|
19
|
-
["flex", "w-full", "h-max", "bg-white", "font-daikinSerif", "overflow-clip"],
|
|
20
|
-
{
|
|
21
|
-
variants: {
|
|
22
|
-
status: {
|
|
23
|
-
enabled: [],
|
|
24
|
-
disabled: ["text-[#DCDCDC]"]
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
18
|
const cvaSummary = classVarianceAuthority.cva(
|
|
30
19
|
[
|
|
31
20
|
"flex",
|
|
21
|
+
"justify-between",
|
|
32
22
|
"items-center",
|
|
23
|
+
"gap-2",
|
|
33
24
|
"w-full",
|
|
34
|
-
"h-12",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"after:
|
|
43
|
-
"after:
|
|
44
|
-
"after:
|
|
45
|
-
"after:absolute",
|
|
46
|
-
"after:i-daikin-accordion-chevron-up",
|
|
47
|
-
"after:transition-all"
|
|
25
|
+
"min-h-12",
|
|
26
|
+
"py-3",
|
|
27
|
+
"pr-3",
|
|
28
|
+
"pl-4",
|
|
29
|
+
"focus-visible:outline",
|
|
30
|
+
"focus-visible:outline-2",
|
|
31
|
+
"focus-visible:-outline-offset-2",
|
|
32
|
+
"focus-visible:outline-daikinBlue-700",
|
|
33
|
+
"after:size-6",
|
|
34
|
+
"after:transition-all",
|
|
35
|
+
"after:i-daikin-chevron-down"
|
|
48
36
|
],
|
|
49
37
|
{
|
|
50
38
|
variants: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
open: {
|
|
40
|
+
false: ["after:rotate-0"],
|
|
41
|
+
true: ["after:rotate-180"]
|
|
54
42
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"hover:bg-
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"focus-visible:outline",
|
|
61
|
-
"focus-visible:outline-[2px]",
|
|
62
|
-
"focus-visible:outline-[#0097E0]",
|
|
63
|
-
"focus-visible:outline-offset-[-2px]",
|
|
64
|
-
"after:text-[#828282]"
|
|
43
|
+
disabled: {
|
|
44
|
+
false: [
|
|
45
|
+
"hover:bg-daikinNeutral-100",
|
|
46
|
+
"cursor-pointer",
|
|
47
|
+
"active:bg-daikinNeutral-200"
|
|
65
48
|
],
|
|
66
|
-
|
|
49
|
+
true: ["text-daikinNeutral-200", "after:text-daikinNeutral-200"]
|
|
67
50
|
}
|
|
68
51
|
}
|
|
69
52
|
}
|
|
@@ -82,7 +65,6 @@ exports.DaikinAccordionItem = class DaikinAccordionItem extends lit.LitElement {
|
|
|
82
65
|
constructor() {
|
|
83
66
|
super(...arguments);
|
|
84
67
|
this._contentRef = ref_js.createRef();
|
|
85
|
-
this.title = "";
|
|
86
68
|
this.open = false;
|
|
87
69
|
this.disabled = false;
|
|
88
70
|
this._detailsOpen = false;
|
|
@@ -108,36 +90,69 @@ exports.DaikinAccordionItem = class DaikinAccordionItem extends lit.LitElement {
|
|
|
108
90
|
};
|
|
109
91
|
}
|
|
110
92
|
}
|
|
111
|
-
_handleSummaryClick(
|
|
112
|
-
|
|
93
|
+
_handleSummaryClick(event) {
|
|
94
|
+
event.preventDefault();
|
|
113
95
|
if (this.disabled) {
|
|
114
96
|
return;
|
|
115
97
|
}
|
|
116
98
|
this.open = !this.open;
|
|
117
99
|
}
|
|
100
|
+
_handleKeyDown(event) {
|
|
101
|
+
const direction = {
|
|
102
|
+
ArrowDown: "down",
|
|
103
|
+
ArrowUp: "up"
|
|
104
|
+
}[event.key];
|
|
105
|
+
if (!direction) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
event.preventDefault();
|
|
109
|
+
this.dispatchEvent(
|
|
110
|
+
new CustomEvent("accordion-move-focus", {
|
|
111
|
+
detail: {
|
|
112
|
+
direction
|
|
113
|
+
},
|
|
114
|
+
bubbles: true
|
|
115
|
+
})
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
// When using the in-page search, the `<details>` element may open without clicking on the `<summary>`.
|
|
119
|
+
// In order to handle such cases, it is necessary to respond to the "toggle" event.
|
|
120
|
+
_handleToggle(event) {
|
|
121
|
+
event.preventDefault();
|
|
122
|
+
if (this.disabled) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
this.open = event.newState === "open";
|
|
126
|
+
}
|
|
118
127
|
render() {
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
});
|
|
122
|
-
const accordionSummaryClassName = cvaSummary({
|
|
123
|
-
status: this.disabled ? "disabled" : "enabled",
|
|
124
|
-
visible: this.open ? "open" : "close"
|
|
125
|
-
});
|
|
128
|
+
const detailsOpen = !this.disabled && this._detailsOpen;
|
|
129
|
+
const open = !this.disabled && this.open;
|
|
126
130
|
return lit.html`<details
|
|
127
|
-
class
|
|
128
|
-
?open=${
|
|
129
|
-
?data-open=${
|
|
131
|
+
class="flex w-full bg-white font-daikinSerif overflow-clip"
|
|
132
|
+
?open=${detailsOpen}
|
|
133
|
+
?data-open=${open}
|
|
130
134
|
aria-disabled=${this.disabled}
|
|
135
|
+
@toggle=${this._handleToggle}
|
|
131
136
|
>
|
|
132
137
|
<summary
|
|
133
|
-
|
|
138
|
+
id="summary"
|
|
139
|
+
class=${cvaSummary({
|
|
140
|
+
open,
|
|
141
|
+
disabled: this.disabled
|
|
142
|
+
})}
|
|
134
143
|
tabindex=${this.disabled ? -1 : 0}
|
|
135
144
|
@click=${this._handleSummaryClick}
|
|
145
|
+
@keydown=${this._handleKeyDown}
|
|
136
146
|
>
|
|
137
|
-
|
|
147
|
+
<slot name="summary"></slot>
|
|
138
148
|
</summary>
|
|
139
|
-
<div
|
|
140
|
-
|
|
149
|
+
<div
|
|
150
|
+
${ref_js.ref(this._contentRef)}
|
|
151
|
+
role="region"
|
|
152
|
+
aria-labelledby="summary"
|
|
153
|
+
?hidden=${this.disabled}
|
|
154
|
+
>
|
|
155
|
+
<div class="pt-2 pr-3 pb-3 pl-4">
|
|
141
156
|
<slot></slot>
|
|
142
157
|
</div>
|
|
143
158
|
</div>
|
|
@@ -151,24 +166,55 @@ exports.DaikinAccordionItem = class DaikinAccordionItem extends lit.LitElement {
|
|
|
151
166
|
this._contentAnimate();
|
|
152
167
|
}
|
|
153
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* Focuses on the inner summary.
|
|
171
|
+
* @param options focus options
|
|
172
|
+
*/
|
|
173
|
+
focus(options) {
|
|
174
|
+
var _a;
|
|
175
|
+
(_a = this._summary) == null ? void 0 : _a.focus(options);
|
|
176
|
+
}
|
|
154
177
|
};
|
|
155
178
|
exports.DaikinAccordionItem.styles = lit.css`
|
|
156
179
|
${lit.unsafeCSS(tailwind.default)}
|
|
157
180
|
|
|
158
181
|
:host {
|
|
182
|
+
--divider-top-display: none;
|
|
183
|
+
--divider-bottom-display: none;
|
|
184
|
+
|
|
159
185
|
display: block;
|
|
186
|
+
position: relative;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:host::before {
|
|
190
|
+
content: "";
|
|
191
|
+
display: var(--divider-top-display, none);
|
|
160
192
|
width: 100%;
|
|
193
|
+
height: 1px;
|
|
194
|
+
background: #828282;
|
|
195
|
+
position: absolute;
|
|
196
|
+
top: 0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
:host::after {
|
|
200
|
+
content: "";
|
|
201
|
+
display: var(--divider-bottom-display, none);
|
|
202
|
+
width: 100%;
|
|
203
|
+
height: 1px;
|
|
204
|
+
background: #828282;
|
|
205
|
+
position: absolute;
|
|
206
|
+
bottom: 0;
|
|
161
207
|
}
|
|
162
208
|
`;
|
|
163
|
-
__decorateClass([
|
|
164
|
-
decorators_js.property({ type: String })
|
|
165
|
-
], exports.DaikinAccordionItem.prototype, "title", 2);
|
|
166
209
|
__decorateClass([
|
|
167
210
|
decorators_js.property({ type: Boolean, reflect: true })
|
|
168
211
|
], exports.DaikinAccordionItem.prototype, "open", 2);
|
|
169
212
|
__decorateClass([
|
|
170
213
|
decorators_js.property({ type: Boolean, reflect: true })
|
|
171
214
|
], exports.DaikinAccordionItem.prototype, "disabled", 2);
|
|
215
|
+
__decorateClass([
|
|
216
|
+
decorators_js.query("summary")
|
|
217
|
+
], exports.DaikinAccordionItem.prototype, "_summary", 2);
|
|
172
218
|
__decorateClass([
|
|
173
219
|
decorators_js.state()
|
|
174
220
|
], exports.DaikinAccordionItem.prototype, "_detailsOpen", 2);
|
|
@@ -8,12 +8,21 @@ import { LitElement, PropertyValues } from 'lit';
|
|
|
8
8
|
* - `daikin-accordion` > `daikin-accordion-item`
|
|
9
9
|
*
|
|
10
10
|
* @slot - A slot for the accordion item content.
|
|
11
|
+
* @slot summary - A slot for the accordion item summary content.
|
|
12
|
+
*
|
|
13
|
+
* @cssprop [--divider-top-display=none] - The `display` property of the top divider. Must be either `block` or `none`. Set automatically by `daikin-accordion` component.
|
|
14
|
+
* @cssprop [--divider-bottom-display=none] - The `display` property of the bottom divider. Must be either `block` or `none`. Set automatically by `daikin-accordion` component.
|
|
11
15
|
*
|
|
12
16
|
* @example
|
|
13
17
|
*
|
|
18
|
+
* ```js
|
|
19
|
+
* import "@daikin-oss/design-system-web-components/components/accordion-item/index.js";
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
14
22
|
* ```html
|
|
15
|
-
* <daikin-accordion-item
|
|
16
|
-
* Accordion
|
|
23
|
+
* <daikin-accordion-item>
|
|
24
|
+
* <span slot="Accordion summary">
|
|
25
|
+
* Accordion content
|
|
17
26
|
* </daikin-accordion-item>
|
|
18
27
|
* ```
|
|
19
28
|
*/
|
|
@@ -21,31 +30,37 @@ export declare class DaikinAccordionItem extends LitElement {
|
|
|
21
30
|
static readonly styles: import('lit').CSSResult;
|
|
22
31
|
private _contentRef;
|
|
23
32
|
/**
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
title: string;
|
|
27
|
-
/**
|
|
28
|
-
* Whether the accordion is open
|
|
33
|
+
* Whether the accordion item is open.
|
|
34
|
+
* Ignored if `disabled` is `true`.
|
|
29
35
|
*/
|
|
30
36
|
open: boolean;
|
|
31
37
|
/**
|
|
32
|
-
* Whether the accordion is disabled
|
|
38
|
+
* Whether the accordion item is disabled.
|
|
39
|
+
* If this is set to `true`, the accordion item will always be closed.
|
|
33
40
|
*/
|
|
34
41
|
disabled: boolean;
|
|
42
|
+
private _summary;
|
|
35
43
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* The default `open` attribute of the default details element does not allow the display of content to have transitions.
|
|
39
|
-
* To solve this, the `open` property that `daikin-accordion-item` receives manages the opening and closing of items independently of the open attribute.
|
|
44
|
+
* Actual presence of `open` attribute of the `<details>` element.
|
|
40
45
|
*
|
|
41
|
-
* The
|
|
46
|
+
* The `<details>` element does not support animation on changing the `open` attribute.
|
|
47
|
+
* In other words, the content is hidden immediately when the `open` attribute is removed.
|
|
48
|
+
* To enable animation for an accordion, we need to run the animation while maintaining the `open` attribute, and then remove the `open` attribute at the end of the animation.
|
|
49
|
+
* Treated as `false` if `disabled` is `true`.
|
|
42
50
|
*/
|
|
43
51
|
private _detailsOpen;
|
|
44
52
|
private _contentAnimate;
|
|
45
53
|
private _handleSummaryClick;
|
|
54
|
+
private _handleKeyDown;
|
|
55
|
+
private _handleToggle;
|
|
46
56
|
render(): import('lit-html').TemplateResult<1>;
|
|
47
57
|
protected firstUpdated(): void;
|
|
48
58
|
protected updated(changedProperties: PropertyValues<this>): void;
|
|
59
|
+
/**
|
|
60
|
+
* Focuses on the inner summary.
|
|
61
|
+
* @param options focus options
|
|
62
|
+
*/
|
|
63
|
+
focus(options?: FocusOptions | undefined): void;
|
|
49
64
|
}
|
|
50
65
|
declare global {
|
|
51
66
|
interface HTMLElementTagNameMap {
|
|
@@ -54,12 +54,9 @@ exports.DaikinBreadcrumb = class DaikinBreadcrumb extends lit.LitElement {
|
|
|
54
54
|
_updateBreadcrumbs() {
|
|
55
55
|
const daikinBreadCrumbItems = this._slottedDaikinBreadCrumbItems;
|
|
56
56
|
for (const [index, item] of daikinBreadCrumbItems.entries()) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
item.trailingSlash = true;
|
|
57
|
+
const isLast = index === daikinBreadCrumbItems.length - 1;
|
|
58
|
+
item.trailingSlash = !isLast || this.trailingSlash;
|
|
59
|
+
item.last = isLast;
|
|
63
60
|
}
|
|
64
61
|
}
|
|
65
62
|
_handleChange() {
|
|
@@ -9,6 +9,10 @@ import { LitElement, PropertyValues } from 'lit';
|
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
*
|
|
12
|
+
* ```js
|
|
13
|
+
* import "@daikin-oss/design-system-web-components/components/breadcrumb/index.js";
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
12
16
|
* ```html
|
|
13
17
|
* <daikin-breadcrumb>
|
|
14
18
|
* <daikin-breadcrumb-item href="#">
|
|
@@ -15,33 +15,33 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
15
15
|
if (kind && result) __defProp(target, key, result);
|
|
16
16
|
return result;
|
|
17
17
|
};
|
|
18
|
-
const
|
|
18
|
+
const cvaLink = classVarianceAuthority.cva(
|
|
19
19
|
[
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
20
|
+
"h-8",
|
|
21
|
+
"font-normal",
|
|
22
|
+
"not-italic",
|
|
23
|
+
"leading-8",
|
|
24
|
+
"text-sm",
|
|
25
|
+
"text-daikinBlue-500",
|
|
26
|
+
"outline-none",
|
|
27
|
+
"font-daikinSerif"
|
|
28
28
|
],
|
|
29
29
|
{
|
|
30
30
|
variants: {
|
|
31
31
|
variant: {
|
|
32
32
|
normal: [
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
33
|
+
"hover:text-daikinBlue-300",
|
|
34
|
+
"active:text-daikinNeutral-800",
|
|
35
|
+
"focus-visible:text-daikinBlue-700"
|
|
36
36
|
],
|
|
37
|
-
ellipsis: ["
|
|
37
|
+
ellipsis: ["hover:text-daikinBlue-300"]
|
|
38
38
|
},
|
|
39
39
|
disabled: {
|
|
40
40
|
true: [
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
41
|
+
"!text-daikinNeutral-800",
|
|
42
|
+
"pointer-events-none",
|
|
43
|
+
"cursor-default",
|
|
44
|
+
"focus-visible:!text-daikinNeutral-800"
|
|
45
45
|
],
|
|
46
46
|
false: []
|
|
47
47
|
}
|
|
@@ -56,25 +56,30 @@ exports.DaikinBreadcrumbItem = class DaikinBreadcrumbItem extends lit.LitElement
|
|
|
56
56
|
this.disabled = false;
|
|
57
57
|
this.target = null;
|
|
58
58
|
this.trailingSlash = false;
|
|
59
|
+
this.last = false;
|
|
59
60
|
this.hidden = false;
|
|
60
61
|
}
|
|
61
62
|
render() {
|
|
62
|
-
const slash = this.trailingSlash ? lit.html`<span
|
|
63
|
+
const slash = this.trailingSlash ? lit.html`<span
|
|
64
|
+
class="text-daikinNeutral-800 font-daikinSerif"
|
|
65
|
+
aria-hidden="true"
|
|
66
|
+
>
|
|
67
|
+
/
|
|
68
|
+
</span>` : null;
|
|
69
|
+
const isDisabled = this.last || this.disabled;
|
|
63
70
|
return lit.html`
|
|
64
|
-
${this.variant === "normal" ? lit.html`<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
${this.variant === "normal" ? lit.html`<a
|
|
72
|
+
class=${cvaLink({ variant: this.variant, disabled: isDisabled })}
|
|
73
|
+
href=${ifDefined_js.ifDefined(!isDisabled && this.href || void 0)}
|
|
74
|
+
target=${// eslint-disable-next-line @typescript-eslint/no-explicit-any -- workaround lit-analyzer checking
|
|
68
75
|
ifDefined_js.ifDefined(this.target)}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
lit.html`<span class=${cvaLinkSlot(this)} aria-label="…">
|
|
76
|
+
aria-disabled=${ifDefined_js.ifDefined(isDisabled || void 0)}
|
|
77
|
+
aria-current=${ifDefined_js.ifDefined(this.last || void 0)}
|
|
78
|
+
>
|
|
79
|
+
<slot></slot>
|
|
80
|
+
</a>` : lit.html`<span class=${cvaLink(this)} aria-label="…">
|
|
75
81
|
<span>. . .</span>
|
|
76
|
-
</span> `
|
|
77
|
-
)}
|
|
82
|
+
</span> `}
|
|
78
83
|
${slash}
|
|
79
84
|
`;
|
|
80
85
|
}
|
|
@@ -108,6 +113,9 @@ __decorateClass([
|
|
|
108
113
|
__decorateClass([
|
|
109
114
|
decorators_js.property({ type: Boolean, reflect: true, attribute: "trailing-slash" })
|
|
110
115
|
], exports.DaikinBreadcrumbItem.prototype, "trailingSlash", 2);
|
|
116
|
+
__decorateClass([
|
|
117
|
+
decorators_js.property({ type: Boolean, reflect: true })
|
|
118
|
+
], exports.DaikinBreadcrumbItem.prototype, "last", 2);
|
|
111
119
|
__decorateClass([
|
|
112
120
|
decorators_js.property({ type: Boolean, reflect: true })
|
|
113
121
|
], exports.DaikinBreadcrumbItem.prototype, "hidden", 2);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
import { MergeVariantProps } from '../../type-utils';
|
|
3
|
-
declare const
|
|
3
|
+
declare const cvaLink: (props?: ({
|
|
4
4
|
variant?: "normal" | "ellipsis" | null | undefined;
|
|
5
5
|
disabled?: boolean | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
type LinkVariantProps = MergeVariantProps<typeof
|
|
7
|
+
type LinkVariantProps = MergeVariantProps<typeof cvaLink>;
|
|
8
8
|
/**
|
|
9
9
|
* The `daikin-breadcrumb-item` is a component used to represent each item of the breadcrumb list, and is used as a child element of the `daikin-breadcrumb` component.
|
|
10
10
|
*
|
|
@@ -15,6 +15,10 @@ type LinkVariantProps = MergeVariantProps<typeof cvaLinkSlot>;
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
*
|
|
18
|
+
* ```js
|
|
19
|
+
* import "@daikin-oss/design-system-web-components/components/breadcrumb-item/index.js";
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
18
22
|
* ```html
|
|
19
23
|
* <!-- See `daikin-breadcrumb` component for complete example. -->
|
|
20
24
|
* <daikin-breadcrumb-item href="#">
|
|
@@ -47,6 +51,12 @@ export declare class DaikinBreadcrumbItem extends LitElement {
|
|
|
47
51
|
* Set automatically by `daikin-breadcrumb`.
|
|
48
52
|
*/
|
|
49
53
|
trailingSlash: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the item is the last one.
|
|
56
|
+
* When set to `true`, the item will also be considered to be the current page and the link will be disabled.
|
|
57
|
+
* Automatically set by `daikin-breadcrumb` component.
|
|
58
|
+
*/
|
|
59
|
+
last: boolean;
|
|
50
60
|
/**
|
|
51
61
|
* Whether the link should be hidden when ellipsis mode.
|
|
52
62
|
* Set automatically by `daikin-breadcrumb`.
|