@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.
Files changed (244) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/cjs/components/accordion/daikin-accordion.cjs +31 -6
  3. package/dist/cjs/components/accordion/daikin-accordion.d.ts +15 -9
  4. package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +105 -59
  5. package/dist/cjs/components/accordion-item/daikin-accordion-item.d.ts +28 -13
  6. package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +3 -6
  7. package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.ts +4 -0
  8. package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +38 -30
  9. package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +12 -2
  10. package/dist/cjs/components/button/daikin-button.cjs +89 -128
  11. package/dist/cjs/components/button/daikin-button.d.ts +30 -27
  12. package/dist/cjs/components/checkbox/daikin-checkbox.cjs +99 -119
  13. package/dist/cjs/components/checkbox/daikin-checkbox.d.ts +27 -38
  14. package/dist/cjs/components/icon/daikin-icon.d.ts +4 -0
  15. package/dist/cjs/components/icon/icons.json.cjs +20 -0
  16. package/dist/cjs/components/icon/icons.json.d.ts +20 -0
  17. package/dist/cjs/components/index.cjs +18 -8
  18. package/dist/cjs/components/index.d.ts +4 -2
  19. package/dist/cjs/components/input-group/daikin-input-group.cjs +1 -1
  20. package/dist/cjs/components/input-group/daikin-input-group.d.ts +6 -0
  21. package/dist/cjs/components/list/daikin-list.cjs +24 -0
  22. package/dist/cjs/components/list/daikin-list.d.ts +28 -0
  23. package/dist/cjs/components/list/index.cjs +7 -0
  24. package/dist/cjs/components/list/index.d.ts +1 -0
  25. package/dist/cjs/components/list-item/daikin-list-item.cjs +125 -0
  26. package/dist/cjs/components/list-item/daikin-list-item.d.ts +64 -0
  27. package/dist/cjs/components/list-item/index.cjs +7 -0
  28. package/dist/cjs/components/list-item/index.d.ts +1 -0
  29. package/dist/cjs/components/notification/daikin-notification.cjs +14 -15
  30. package/dist/cjs/components/notification/daikin-notification.d.ts +13 -11
  31. package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +53 -29
  32. package/dist/cjs/components/progress-bar/daikin-progress-bar.d.ts +32 -10
  33. package/dist/cjs/components/radio/daikin-radio.cjs +73 -92
  34. package/dist/cjs/components/radio/daikin-radio.d.ts +23 -39
  35. package/dist/cjs/components/tab/daikin-tab.cjs +41 -46
  36. package/dist/cjs/components/tab/daikin-tab.d.ts +12 -12
  37. package/dist/cjs/components/{panel-switcher/daikin-panel-switcher.cjs → tab-panels/daikin-tab-panels.cjs} +8 -8
  38. package/dist/{cjs-dev/components/panel-switcher/daikin-panel-switcher.d.ts → cjs/components/tab-panels/daikin-tab-panels.d.ts} +17 -11
  39. package/dist/cjs/components/tab-panels/index.cjs +7 -0
  40. package/dist/cjs/components/tab-panels/index.d.ts +1 -0
  41. package/dist/cjs/components/{tab-group/daikin-tab-group.cjs → tabs/daikin-tabs.cjs} +29 -35
  42. package/dist/cjs/components/{tab-group/daikin-tab-group.d.ts → tabs/daikin-tabs.d.ts} +27 -21
  43. package/dist/cjs/components/tabs/index.cjs +7 -0
  44. package/dist/cjs/components/tabs/index.d.ts +1 -0
  45. package/dist/cjs/components/text-input/daikin-text-input.cjs +4 -3
  46. package/dist/cjs/components/text-input/daikin-text-input.d.ts +5 -0
  47. package/dist/cjs/components/textarea/daikin-textarea.cjs +3 -3
  48. package/dist/cjs/components/textarea/daikin-textarea.d.ts +5 -0
  49. package/dist/cjs/components/toggle/daikin-toggle.cjs +44 -68
  50. package/dist/cjs/components/toggle/daikin-toggle.d.ts +15 -26
  51. package/dist/cjs/components/tooltip/daikin-tooltip.d.ts +4 -0
  52. package/dist/cjs/index.cjs +18 -8
  53. package/dist/cjs/tailwind.css.cjs +1 -1
  54. package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +31 -6
  55. package/dist/cjs-dev/components/accordion/daikin-accordion.d.ts +15 -9
  56. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +105 -59
  57. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.d.ts +28 -13
  58. package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +3 -6
  59. package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.ts +4 -0
  60. package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +38 -30
  61. package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +12 -2
  62. package/dist/cjs-dev/components/button/daikin-button.cjs +89 -128
  63. package/dist/cjs-dev/components/button/daikin-button.d.ts +30 -27
  64. package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +99 -119
  65. package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.ts +27 -38
  66. package/dist/cjs-dev/components/icon/daikin-icon.d.ts +4 -0
  67. package/dist/cjs-dev/components/icon/icons.json.cjs +20 -0
  68. package/dist/cjs-dev/components/icon/icons.json.d.ts +20 -0
  69. package/dist/cjs-dev/components/index.cjs +18 -8
  70. package/dist/cjs-dev/components/index.d.ts +4 -2
  71. package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +1 -1
  72. package/dist/cjs-dev/components/input-group/daikin-input-group.d.ts +6 -0
  73. package/dist/cjs-dev/components/list/daikin-list.cjs +24 -0
  74. package/dist/cjs-dev/components/list/daikin-list.d.ts +28 -0
  75. package/dist/cjs-dev/components/list/index.cjs +7 -0
  76. package/dist/cjs-dev/components/list/index.d.ts +1 -0
  77. package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +125 -0
  78. package/dist/cjs-dev/components/list-item/daikin-list-item.d.ts +64 -0
  79. package/dist/cjs-dev/components/list-item/index.cjs +7 -0
  80. package/dist/cjs-dev/components/list-item/index.d.ts +1 -0
  81. package/dist/cjs-dev/components/notification/daikin-notification.cjs +14 -15
  82. package/dist/cjs-dev/components/notification/daikin-notification.d.ts +13 -11
  83. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +53 -29
  84. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.d.ts +32 -10
  85. package/dist/cjs-dev/components/radio/daikin-radio.cjs +73 -92
  86. package/dist/cjs-dev/components/radio/daikin-radio.d.ts +23 -39
  87. package/dist/cjs-dev/components/tab/daikin-tab.cjs +41 -46
  88. package/dist/cjs-dev/components/tab/daikin-tab.d.ts +12 -12
  89. package/dist/cjs-dev/components/{panel-switcher/daikin-panel-switcher.cjs → tab-panels/daikin-tab-panels.cjs} +9 -9
  90. package/dist/{cjs/components/panel-switcher/daikin-panel-switcher.d.ts → cjs-dev/components/tab-panels/daikin-tab-panels.d.ts} +17 -11
  91. package/dist/cjs-dev/components/tab-panels/index.cjs +7 -0
  92. package/dist/cjs-dev/components/tab-panels/index.d.ts +1 -0
  93. package/dist/cjs-dev/components/{tab-group/daikin-tab-group.cjs → tabs/daikin-tabs.cjs} +31 -37
  94. package/dist/{es-dev/components/tab-group/daikin-tab-group.d.ts → cjs-dev/components/tabs/daikin-tabs.d.ts} +27 -21
  95. package/dist/cjs-dev/components/tabs/index.cjs +7 -0
  96. package/dist/cjs-dev/components/tabs/index.d.ts +1 -0
  97. package/dist/cjs-dev/components/text-input/daikin-text-input.cjs +4 -3
  98. package/dist/cjs-dev/components/text-input/daikin-text-input.d.ts +5 -0
  99. package/dist/cjs-dev/components/textarea/daikin-textarea.cjs +3 -3
  100. package/dist/cjs-dev/components/textarea/daikin-textarea.d.ts +5 -0
  101. package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +44 -68
  102. package/dist/cjs-dev/components/toggle/daikin-toggle.d.ts +15 -26
  103. package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.ts +4 -0
  104. package/dist/cjs-dev/index.cjs +18 -8
  105. package/dist/cjs-dev/tailwind.css.cjs +1 -1
  106. package/dist/es/components/accordion/daikin-accordion.d.ts +15 -9
  107. package/dist/es/components/accordion/daikin-accordion.js +32 -7
  108. package/dist/es/components/accordion-item/daikin-accordion-item.d.ts +28 -13
  109. package/dist/es/components/accordion-item/daikin-accordion-item.js +106 -60
  110. package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +4 -0
  111. package/dist/es/components/breadcrumb/daikin-breadcrumb.js +3 -6
  112. package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +12 -2
  113. package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +38 -30
  114. package/dist/es/components/button/daikin-button.d.ts +30 -27
  115. package/dist/es/components/button/daikin-button.js +90 -129
  116. package/dist/es/components/checkbox/daikin-checkbox.d.ts +27 -38
  117. package/dist/es/components/checkbox/daikin-checkbox.js +101 -121
  118. package/dist/es/components/icon/daikin-icon.d.ts +4 -0
  119. package/dist/es/components/icon/icons.json.d.ts +20 -0
  120. package/dist/es/components/icon/icons.json.js +20 -0
  121. package/dist/es/components/index.d.ts +4 -2
  122. package/dist/es/components/index.js +8 -4
  123. package/dist/es/components/input-group/daikin-input-group.d.ts +6 -0
  124. package/dist/es/components/input-group/daikin-input-group.js +1 -1
  125. package/dist/es/components/list/daikin-list.d.ts +28 -0
  126. package/dist/es/components/list/daikin-list.js +25 -0
  127. package/dist/es/components/list/index.d.ts +1 -0
  128. package/dist/es/components/list/index.js +4 -0
  129. package/dist/es/components/list-item/daikin-list-item.d.ts +64 -0
  130. package/dist/es/components/list-item/daikin-list-item.js +126 -0
  131. package/dist/es/components/list-item/index.d.ts +1 -0
  132. package/dist/es/components/list-item/index.js +4 -0
  133. package/dist/es/components/notification/daikin-notification.d.ts +13 -11
  134. package/dist/es/components/notification/daikin-notification.js +15 -16
  135. package/dist/es/components/progress-bar/daikin-progress-bar.d.ts +32 -10
  136. package/dist/es/components/progress-bar/daikin-progress-bar.js +53 -29
  137. package/dist/es/components/radio/daikin-radio.d.ts +23 -39
  138. package/dist/es/components/radio/daikin-radio.js +74 -93
  139. package/dist/es/components/tab/daikin-tab.d.ts +12 -12
  140. package/dist/es/components/tab/daikin-tab.js +42 -47
  141. package/dist/es/components/{panel-switcher/daikin-panel-switcher.d.ts → tab-panels/daikin-tab-panels.d.ts} +17 -11
  142. package/dist/es/components/{panel-switcher/daikin-panel-switcher.js → tab-panels/daikin-tab-panels.js} +9 -9
  143. package/dist/es/components/tab-panels/index.d.ts +1 -0
  144. package/dist/es/components/tab-panels/index.js +4 -0
  145. package/dist/es/components/{tab-group/daikin-tab-group.d.ts → tabs/daikin-tabs.d.ts} +27 -21
  146. package/dist/es/components/{tab-group/daikin-tab-group.js → tabs/daikin-tabs.js} +30 -36
  147. package/dist/es/components/tabs/index.d.ts +1 -0
  148. package/dist/es/components/tabs/index.js +4 -0
  149. package/dist/es/components/text-input/daikin-text-input.d.ts +5 -0
  150. package/dist/es/components/text-input/daikin-text-input.js +4 -3
  151. package/dist/es/components/textarea/daikin-textarea.d.ts +5 -0
  152. package/dist/es/components/textarea/daikin-textarea.js +3 -3
  153. package/dist/es/components/toggle/daikin-toggle.d.ts +15 -26
  154. package/dist/es/components/toggle/daikin-toggle.js +45 -69
  155. package/dist/es/components/tooltip/daikin-tooltip.d.ts +4 -0
  156. package/dist/es/index.js +8 -4
  157. package/dist/es/tailwind.css.js +1 -1
  158. package/dist/es-dev/components/accordion/daikin-accordion.d.ts +15 -9
  159. package/dist/es-dev/components/accordion/daikin-accordion.js +32 -7
  160. package/dist/es-dev/components/accordion-item/daikin-accordion-item.d.ts +28 -13
  161. package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +106 -60
  162. package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +4 -0
  163. package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +3 -6
  164. package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +12 -2
  165. package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +38 -30
  166. package/dist/es-dev/components/button/daikin-button.d.ts +30 -27
  167. package/dist/es-dev/components/button/daikin-button.js +90 -129
  168. package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +27 -38
  169. package/dist/es-dev/components/checkbox/daikin-checkbox.js +101 -121
  170. package/dist/es-dev/components/icon/daikin-icon.d.ts +4 -0
  171. package/dist/es-dev/components/icon/icons.json.d.ts +20 -0
  172. package/dist/es-dev/components/icon/icons.json.js +20 -0
  173. package/dist/es-dev/components/index.d.ts +4 -2
  174. package/dist/es-dev/components/index.js +8 -4
  175. package/dist/es-dev/components/input-group/daikin-input-group.d.ts +6 -0
  176. package/dist/es-dev/components/input-group/daikin-input-group.js +1 -1
  177. package/dist/es-dev/components/list/daikin-list.d.ts +28 -0
  178. package/dist/es-dev/components/list/daikin-list.js +25 -0
  179. package/dist/es-dev/components/list/index.d.ts +1 -0
  180. package/dist/es-dev/components/list/index.js +4 -0
  181. package/dist/es-dev/components/list-item/daikin-list-item.d.ts +64 -0
  182. package/dist/es-dev/components/list-item/daikin-list-item.js +126 -0
  183. package/dist/es-dev/components/list-item/index.d.ts +1 -0
  184. package/dist/es-dev/components/list-item/index.js +4 -0
  185. package/dist/es-dev/components/notification/daikin-notification.d.ts +13 -11
  186. package/dist/es-dev/components/notification/daikin-notification.js +15 -16
  187. package/dist/es-dev/components/progress-bar/daikin-progress-bar.d.ts +32 -10
  188. package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +53 -29
  189. package/dist/es-dev/components/radio/daikin-radio.d.ts +23 -39
  190. package/dist/es-dev/components/radio/daikin-radio.js +74 -93
  191. package/dist/es-dev/components/tab/daikin-tab.d.ts +12 -12
  192. package/dist/es-dev/components/tab/daikin-tab.js +42 -47
  193. package/dist/es-dev/components/{panel-switcher/daikin-panel-switcher.d.ts → tab-panels/daikin-tab-panels.d.ts} +17 -11
  194. package/dist/es-dev/components/{panel-switcher/daikin-panel-switcher.js → tab-panels/daikin-tab-panels.js} +10 -10
  195. package/dist/es-dev/components/tab-panels/index.d.ts +1 -0
  196. package/dist/es-dev/components/tab-panels/index.js +4 -0
  197. package/dist/{cjs-dev/components/tab-group/daikin-tab-group.d.ts → es-dev/components/tabs/daikin-tabs.d.ts} +27 -21
  198. package/dist/es-dev/components/{tab-group/daikin-tab-group.js → tabs/daikin-tabs.js} +32 -38
  199. package/dist/es-dev/components/tabs/index.d.ts +1 -0
  200. package/dist/es-dev/components/tabs/index.js +4 -0
  201. package/dist/es-dev/components/text-input/daikin-text-input.d.ts +5 -0
  202. package/dist/es-dev/components/text-input/daikin-text-input.js +4 -3
  203. package/dist/es-dev/components/textarea/daikin-textarea.d.ts +5 -0
  204. package/dist/es-dev/components/textarea/daikin-textarea.js +3 -3
  205. package/dist/es-dev/components/toggle/daikin-toggle.d.ts +15 -26
  206. package/dist/es-dev/components/toggle/daikin-toggle.js +45 -69
  207. package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +4 -0
  208. package/dist/es-dev/index.js +8 -4
  209. package/dist/es-dev/tailwind.css.js +1 -1
  210. package/icons/checkbox-indeterminate.svg +2 -2
  211. package/icons/chevron-down.svg +3 -0
  212. package/icons/chevron-left.svg +3 -0
  213. package/icons/chevron-right.svg +3 -0
  214. package/icons/chevron-up.svg +3 -0
  215. package/icons/status-error.svg +3 -0
  216. package/package.json +2 -1
  217. package/dist/cjs/components/panel-switcher/index.cjs +0 -7
  218. package/dist/cjs/components/panel-switcher/index.d.ts +0 -1
  219. package/dist/cjs/components/tab-group/index.cjs +0 -7
  220. package/dist/cjs/components/tab-group/index.d.ts +0 -1
  221. package/dist/cjs-dev/components/panel-switcher/index.cjs +0 -7
  222. package/dist/cjs-dev/components/panel-switcher/index.d.ts +0 -1
  223. package/dist/cjs-dev/components/tab-group/index.cjs +0 -7
  224. package/dist/cjs-dev/components/tab-group/index.d.ts +0 -1
  225. package/dist/es/components/panel-switcher/index.d.ts +0 -1
  226. package/dist/es/components/panel-switcher/index.js +0 -4
  227. package/dist/es/components/tab-group/index.d.ts +0 -1
  228. package/dist/es/components/tab-group/index.js +0 -4
  229. package/dist/es-dev/components/panel-switcher/index.d.ts +0 -1
  230. package/dist/es-dev/components/panel-switcher/index.js +0 -4
  231. package/dist/es-dev/components/tab-group/index.d.ts +0 -1
  232. package/dist/es-dev/components/tab-group/index.js +0 -4
  233. package/icons/accordion-chevron-up.svg +0 -3
  234. package/icons/radio-checked.svg +0 -4
  235. package/icons/radio-unchecked.svg +0 -4
  236. package/icons/status-negative.svg +0 -11
  237. /package/dist/cjs/components/{tab-group → tabs}/scroller.cjs +0 -0
  238. /package/dist/cjs/components/{tab-group → tabs}/scroller.d.ts +0 -0
  239. /package/dist/cjs-dev/components/{tab-group → tabs}/scroller.cjs +0 -0
  240. /package/dist/cjs-dev/components/{tab-group → tabs}/scroller.d.ts +0 -0
  241. /package/dist/es/components/{tab-group → tabs}/scroller.d.ts +0 -0
  242. /package/dist/es/components/{tab-group → tabs}/scroller.js +0 -0
  243. /package/dist/es-dev/components/{tab-group → tabs}/scroller.d.ts +0 -0
  244. /package/dist/es-dev/components/{tab-group → tabs}/scroller.js +0 -0
@@ -12,7 +12,7 @@ var __decorateClass = (decorators, target, key, kind) => {
12
12
  if (kind && result) __defProp(target, key, result);
13
13
  return result;
14
14
  };
15
- let DaikinTabGroup = class extends LitElement {
15
+ let DaikinTabs = class extends LitElement {
16
16
  constructor() {
17
17
  super(...arguments);
18
18
  this.value = "";
@@ -20,22 +20,21 @@ let DaikinTabGroup = class extends LitElement {
20
20
  /**
21
21
  * Emits `beforechange` event if necessary and returns whether we should proceed.
22
22
  *
23
- * 1. Check if `newValue` is different from `value`.
23
+ * 1. Check if `newTab.value` is different from `value`.
24
24
  * 2. Emit "beforechange" event.
25
- * 3. Check if the event is canceled.
25
+ * 3. Check and return whether the event is canceled.
26
26
  *
27
- * @param newValue The `value` of the newly active tab.
27
+ * @param newTab The newly active tab element.
28
28
  * @returns `true` if we should proceed (event is emitted and not canceled). `false` otherwise.
29
29
  */
30
- _emitBeforeChange(newValue) {
31
- if (this.value === newValue) {
30
+ _emitBeforeChange(newTab) {
31
+ if (this.value === newTab.value) {
32
32
  return false;
33
33
  }
34
34
  if (!this.dispatchEvent(
35
35
  new CustomEvent("beforechange", {
36
- detail: { oldValue: this.value, newValue },
36
+ detail: { newTab },
37
37
  bubbles: true,
38
- composed: true,
39
38
  cancelable: true
40
39
  })
41
40
  )) {
@@ -46,18 +45,16 @@ let DaikinTabGroup = class extends LitElement {
46
45
  /**
47
46
  * Updates `this.value` and emit "change" event.
48
47
  *
49
- * @param newValue The `value` of the newly active tab.
48
+ * @param newTab The newly active tab element.
50
49
  */
51
- _updateValue(newValue) {
50
+ _updateValue(newTab) {
51
+ this.value = newTab.value;
52
52
  this.dispatchEvent(
53
- new CustomEvent("change", {
54
- detail: { oldValue: this.value, newValue },
53
+ new Event("change", {
55
54
  bubbles: true,
56
- composed: true,
57
55
  cancelable: false
58
56
  })
59
57
  );
60
- this.value = newValue;
61
58
  }
62
59
  /**
63
60
  * Updates `daikin-tab` component(s)' properties in the slot.
@@ -80,7 +77,7 @@ let DaikinTabGroup = class extends LitElement {
80
77
  selectedTab = tabs.find((tab) => !tab.disabled);
81
78
  if (selectedTab) {
82
79
  selectedTab.active = true;
83
- this._updateValue(selectedTab.value);
80
+ this._updateValue(selectedTab);
84
81
  }
85
82
  }
86
83
  if (!selectedTab) {
@@ -89,14 +86,14 @@ let DaikinTabGroup = class extends LitElement {
89
86
  scrollIntoViewOnlyParent(selectedTab);
90
87
  }
91
88
  /**
92
- * Updates `daikin-panel-switcher` component(s)' properties in the slot.
89
+ * Updates `daikin-tab-panels` component(s)' properties in the slot.
93
90
  *
94
91
  * Invoke when:
95
92
  * - `this.value` is changed.
96
93
  * - the default slot's content is changed.
97
94
  * - the panel slot's content is changed.
98
95
  */
99
- _updatePanelSwitcher() {
96
+ _updateTabPanels() {
100
97
  const panelSwitchers = this._panelSwitchers;
101
98
  const tabs = this._tabs;
102
99
  const panels = Array.from(new Set(tabs.map((tab) => tab.value)));
@@ -119,13 +116,13 @@ let DaikinTabGroup = class extends LitElement {
119
116
  if (this.value === tab.value) {
120
117
  return;
121
118
  }
122
- if (!this._emitBeforeChange(tab.value)) {
119
+ if (!this._emitBeforeChange(tab)) {
123
120
  return;
124
121
  }
125
122
  for (const element of tabs) {
126
123
  element.active = element === tab;
127
124
  }
128
- this._updateValue(tab.value);
125
+ this._updateValue(tab);
129
126
  }
130
127
  /**
131
128
  * Handles keyboard interactions in the tab list.
@@ -163,10 +160,10 @@ let DaikinTabGroup = class extends LitElement {
163
160
  }
164
161
  _handleSlotChange() {
165
162
  this._updateTabs();
166
- this._updatePanelSwitcher();
163
+ this._updateTabPanels();
167
164
  }
168
- _handlePanelSwitcherSlotChange() {
169
- this._updatePanelSwitcher();
165
+ _handleTabPanelsSlotChange() {
166
+ this._updateTabPanels();
170
167
  }
171
168
  render() {
172
169
  return html`
@@ -178,10 +175,7 @@ let DaikinTabGroup = class extends LitElement {
178
175
  >
179
176
  <slot @slotchange=${this._handleSlotChange}></slot>
180
177
  </div>
181
- <slot
182
- name="panels"
183
- @slotchange=${this._handlePanelSwitcherSlotChange}
184
- ></slot>
178
+ <slot name="panels" @slotchange=${this._handleTabPanelsSlotChange}></slot>
185
179
  `;
186
180
  }
187
181
  updated(changedProperties) {
@@ -189,24 +183,24 @@ let DaikinTabGroup = class extends LitElement {
189
183
  return;
190
184
  }
191
185
  this._updateTabs();
192
- this._updatePanelSwitcher();
186
+ this._updateTabPanels();
193
187
  }
194
188
  };
195
- DaikinTabGroup.styles = css`
189
+ DaikinTabs.styles = css`
196
190
  ${unsafeCSS(tailwindStyles)}
197
191
  `;
198
192
  __decorateClass([
199
193
  property({ type: String, reflect: true })
200
- ], DaikinTabGroup.prototype, "value", 2);
194
+ ], DaikinTabs.prototype, "value", 2);
201
195
  __decorateClass([
202
196
  queryAssignedElements({ selector: "daikin-tab" })
203
- ], DaikinTabGroup.prototype, "_tabs", 2);
197
+ ], DaikinTabs.prototype, "_tabs", 2);
204
198
  __decorateClass([
205
- queryAssignedElements({ slot: "panels", selector: "daikin-panel-switcher" })
206
- ], DaikinTabGroup.prototype, "_panelSwitchers", 2);
207
- DaikinTabGroup = __decorateClass([
208
- customElement("daikin-tab-group")
209
- ], DaikinTabGroup);
199
+ queryAssignedElements({ slot: "panels", selector: "daikin-tab-panels" })
200
+ ], DaikinTabs.prototype, "_panelSwitchers", 2);
201
+ DaikinTabs = __decorateClass([
202
+ customElement("daikin-tabs")
203
+ ], DaikinTabs);
210
204
  export {
211
- DaikinTabGroup
205
+ DaikinTabs
212
206
  };
@@ -0,0 +1 @@
1
+ export * from './daikin-tabs';
@@ -0,0 +1,4 @@
1
+ import { DaikinTabs } from "./daikin-tabs.js";
2
+ export {
3
+ DaikinTabs
4
+ };
@@ -9,9 +9,14 @@ import { LitElement, PropertyValues } from 'lit';
9
9
  * - `daikin-input-group` > `daikin-text-input`
10
10
  *
11
11
  * @fires change - A cloned event of a [change event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event) emitted from the inner `<input>` element.
12
+ * @fires input - A retargeted event of a [input event](https://developer.mozilla.org/en-US/docs/Web/API/Element/input_event).
12
13
  *
13
14
  * @example
14
15
  *
16
+ * ```js
17
+ * import "@daikin-oss/design-system-web-components/components/text-input/index.js";
18
+ * ```
19
+ *
15
20
  * ```html
16
21
  * <!-- See `daikin-input-group` component for complete example. -->
17
22
  * <daikin-text-input name="name"></daikin-text-input>
@@ -16,8 +16,8 @@ var __decorateClass = (decorators, target, key, kind) => {
16
16
  };
17
17
  const cvaInput = cva(
18
18
  [
19
- "w-[340px]",
20
- "h-12",
19
+ "w-full",
20
+ "h-full",
21
21
  "text-daikinNeutral-900",
22
22
  "border",
23
23
  "border-solid",
@@ -99,7 +99,8 @@ DaikinTextInput.styles = css`
99
99
  --text-input-outline-color-hover: #54c3f1;
100
100
 
101
101
  display: block;
102
- width: max-content;
102
+ width: 340px;
103
+ height: 48px;
103
104
  }
104
105
  `;
105
106
  DaikinTextInput.formAssociated = true;
@@ -9,9 +9,14 @@ import { LitElement, PropertyValues } from 'lit';
9
9
  * - `daikin-input-group` > `daikin-textarea`
10
10
  *
11
11
  * @fires change - A cloned event of a [change event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event) emitted from the inner `<textarea>` element.
12
+ * @fires input - A retargeted event of a [input event](https://developer.mozilla.org/en-US/docs/Web/API/Element/input_event).
12
13
  *
13
14
  * @example
14
15
  *
16
+ * ```js
17
+ * import "@daikin-oss/design-system-web-components/components/textarea/index.js";
18
+ * ```
19
+ *
15
20
  * ```html
16
21
  * <!-- See `daikin-input-group` component for complete example. -->
17
22
  * <daikin-textarea name="name"></daikin-textarea>
@@ -16,8 +16,8 @@ var __decorateClass = (decorators, target, key, kind) => {
16
16
  };
17
17
  const cvaTextarea = cva(
18
18
  [
19
- "w-[340px]",
20
- "h-[120px]",
19
+ "w-full",
20
+ "h-full",
21
21
  "text-daikinNeutral-900",
22
22
  "border",
23
23
  "border-solid",
@@ -125,7 +125,7 @@ DaikinTextarea.styles = css`
125
125
  --text-input-background-color: #ffffff;
126
126
 
127
127
  display: block;
128
- width: max-content;
128
+ width: 340px;
129
129
  height: 120px;
130
130
  position: relative;
131
131
  }
@@ -1,9 +1,4 @@
1
1
  import { LitElement, PropertyValues } from 'lit';
2
- import { MergeVariantProps } from '../../type-utils';
3
- declare const cvaToggle: (props?: ({
4
- size?: "default" | "small" | null | undefined;
5
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
- type ToggleVariantProps = MergeVariantProps<typeof cvaToggle>;
7
2
  /**
8
3
  * The toggle switch component is a UI element that allows users to switch between two states, typically "on" and "off".
9
4
  * It functions similarly to a `daikin-checkbox` component but provides a more visually intuitive way to represent binary options.
@@ -14,41 +9,36 @@ type ToggleVariantProps = MergeVariantProps<typeof cvaToggle>;
14
9
  *
15
10
  * @example
16
11
  *
12
+ * ```js
13
+ * import "@daikin-oss/design-system-web-components/components/toggle/index.js";
14
+ * ```
15
+ *
17
16
  * ```html
18
17
  * <daikin-toggle name="name" value="value"></daikin-toggle>
19
18
  * ```
20
19
  */
21
20
  export declare class DaikinToggle extends LitElement {
22
21
  static readonly styles: import('lit').CSSResult;
23
- static readonly formAssociated = true;
24
- private _internals;
25
- private _updateFormValue;
26
- private _input;
27
- private _handleChange;
28
22
  /**
29
- * Specify the component size
23
+ * Form name of the toggle switch.
30
24
  */
31
- size: ToggleVariantProps["size"];
25
+ name: string;
32
26
  /**
33
- * Specify whether the Toggle should be disabled
27
+ * Form value of the toggle switch.
34
28
  */
35
- disabled: boolean;
29
+ value: string;
36
30
  /**
37
- * Specify whether the control is checked
31
+ * Whether the toggle switch is turned on.
38
32
  */
39
33
  checked: boolean;
40
34
  /**
41
- * The form name.
42
- */
43
- name: string;
44
- /**
45
- * The value.
46
- */
47
- value: string;
48
- /**
49
- * Specify whether the Toggle is in a error state
35
+ * Whether the toggle switch is disabled.
50
36
  */
51
- error: boolean;
37
+ disabled: boolean;
38
+ static readonly formAssociated = true;
39
+ private _internals;
40
+ private _updateFormValue;
41
+ private _handleChange;
52
42
  render(): import('lit-html').TemplateResult<1>;
53
43
  updated(changedProperties: PropertyValues<this>): void;
54
44
  }
@@ -57,4 +47,3 @@ declare global {
57
47
  "daikin-toggle": DaikinToggle;
58
48
  }
59
49
  }
60
- export {};
@@ -1,6 +1,6 @@
1
1
  import { cva } from "class-variance-authority";
2
2
  import { css, unsafeCSS, LitElement, html } from "lit";
3
- import { query, property, customElement } from "lit/decorators.js";
3
+ import { property, customElement } from "lit/decorators.js";
4
4
  import tailwindStyles from "../../tailwind.css.js";
5
5
  var __defProp = Object.defineProperty;
6
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -12,79 +12,64 @@ var __decorateClass = (decorators, target, key, kind) => {
12
12
  if (kind && result) __defProp(target, key, result);
13
13
  return result;
14
14
  };
15
- const cvaToggle = cva(
16
- [
17
- "appearance-none",
18
- "cursor-pointer",
19
- "relative",
20
- "bg-daikinNeutral-200",
21
- "rounded-3xl",
22
- "transition-color",
23
- "duration-300",
24
- "disabled:bg-daikinNeutral-200",
25
- "before:content-['']",
26
- "before:absolute",
27
- "before:rounded-full",
28
- "before:transition",
29
- "before:disabled:bg-daikinNeutral-400"
30
- ],
31
- {
32
- variants: {
33
- size: {
34
- default: [
35
- "w-[51px]",
36
- "h-[31px]",
37
- "checked:bg-daikinBlue-500",
38
- "before:h-[27px]",
39
- "before:w-[27px]",
40
- "before:bg-white",
41
- "before:top-[2px]",
42
- "before:left-[2px]",
43
- "before:checked:translate-x-5"
44
- ],
45
- small: [
46
- "w-8",
47
- "h-[14px]",
48
- "checked:bg-daikinBlue-50",
49
- "before:h-5",
50
- "before:w-5",
51
- "before:top-[-3px]",
52
- "before:bg-daikinNeutral-600",
53
- "before:checked:bg-daikinBlue-500",
54
- "before:checked:translate-x-3"
55
- ]
56
- }
57
- }
58
- }
59
- );
15
+ const TOGGLE_CLASS_NAME = cva([
16
+ "w-12",
17
+ "h-6",
18
+ "relative",
19
+ "bg-daikinNeutral-600",
20
+ "rounded-full",
21
+ "cursor-pointer",
22
+ "transition-colors",
23
+ "duration-300",
24
+ "appearance-none",
25
+ "enabled:hover:bg-daikinNeutral-400",
26
+ "enabled:active:bg-daikinNeutral-700",
27
+ "focus-visible:outline",
28
+ "focus-visible:outline-1",
29
+ "focus-visible:outline-offset-1",
30
+ "focus-visible:outline-daikinBlue-700",
31
+ "enabled:checked:bg-daikinBlue-500",
32
+ "enabled:checked:hover:bg-daikinBlue-300",
33
+ "enabled:checked:active:bg-daikinBlue-600",
34
+ "disabled:bg-daikinNeutral-200",
35
+ "disabled:cursor-default",
36
+ "before:size-4",
37
+ "before:m-auto",
38
+ "before:rounded-full",
39
+ "before:absolute",
40
+ "before:top-0",
41
+ "before:bottom-0",
42
+ "before:left-1",
43
+ "before:transition",
44
+ "before:duration-300",
45
+ "before:checked:translate-x-6",
46
+ "enabled:before:bg-white",
47
+ "disabled:before:bg-daikinNeutral-100"
48
+ ])();
60
49
  let DaikinToggle = class extends LitElement {
61
50
  constructor() {
62
51
  super(...arguments);
63
- this._internals = this.attachInternals();
64
- this.size = "default";
65
- this.disabled = false;
66
- this.checked = false;
67
52
  this.name = "";
68
53
  this.value = "";
69
- this.error = false;
54
+ this.checked = false;
55
+ this.disabled = false;
56
+ this._internals = this.attachInternals();
70
57
  }
71
58
  _updateFormValue() {
72
59
  this._internals.setFormValue(this.checked ? this.value : null);
73
60
  }
74
61
  _handleChange(event) {
75
- if (!this._input) {
76
- return;
77
- }
62
+ this.checked = event.target.checked;
78
63
  this._updateFormValue();
79
64
  this.dispatchEvent(new Event("change", event));
80
65
  }
81
66
  render() {
82
- const toggleClassName = cvaToggle({ size: this.size });
83
67
  return html`<input
84
- class=${toggleClassName}
68
+ class=${TOGGLE_CLASS_NAME}
85
69
  type="checkbox"
86
70
  name=${this.name}
87
71
  value=${this.value}
72
+ role="switch"
88
73
  .checked=${this.checked}
89
74
  ?disabled=${this.disabled}
90
75
  @change=${this._handleChange}
@@ -104,18 +89,6 @@ DaikinToggle.styles = css`
104
89
  }
105
90
  `;
106
91
  DaikinToggle.formAssociated = true;
107
- __decorateClass([
108
- query("input")
109
- ], DaikinToggle.prototype, "_input", 2);
110
- __decorateClass([
111
- property({ type: String })
112
- ], DaikinToggle.prototype, "size", 2);
113
- __decorateClass([
114
- property({ type: Boolean, reflect: true })
115
- ], DaikinToggle.prototype, "disabled", 2);
116
- __decorateClass([
117
- property({ type: Boolean, reflect: true })
118
- ], DaikinToggle.prototype, "checked", 2);
119
92
  __decorateClass([
120
93
  property({ type: String, reflect: true })
121
94
  ], DaikinToggle.prototype, "name", 2);
@@ -124,7 +97,10 @@ __decorateClass([
124
97
  ], DaikinToggle.prototype, "value", 2);
125
98
  __decorateClass([
126
99
  property({ type: Boolean, reflect: true })
127
- ], DaikinToggle.prototype, "error", 2);
100
+ ], DaikinToggle.prototype, "checked", 2);
101
+ __decorateClass([
102
+ property({ type: Boolean, reflect: true })
103
+ ], DaikinToggle.prototype, "disabled", 2);
128
104
  DaikinToggle = __decorateClass([
129
105
  customElement("daikin-toggle")
130
106
  ], DaikinToggle);
@@ -12,6 +12,10 @@ import { LitElement, PropertyValues } from 'lit';
12
12
  *
13
13
  * @example
14
14
  *
15
+ * ```js
16
+ * import "@daikin-oss/design-system-web-components/components/tooltip/index.js";
17
+ * ```
18
+ *
15
19
  * ```html
16
20
  * </daikin-tooltip>
17
21
  * <span slot="tooltip">This is a message</span>
package/dist/es/index.js CHANGED
@@ -7,12 +7,14 @@ import { DaikinButton } from "./components/button/daikin-button.js";
7
7
  import { DaikinCheckbox } from "./components/checkbox/daikin-checkbox.js";
8
8
  import { DaikinIcon, iconList } from "./components/icon/daikin-icon.js";
9
9
  import { DaikinInputGroup } from "./components/input-group/daikin-input-group.js";
10
+ import { DaikinList } from "./components/list/daikin-list.js";
11
+ import { DaikinListItem } from "./components/list-item/daikin-list-item.js";
10
12
  import { DaikinNotification } from "./components/notification/daikin-notification.js";
11
- import { DaikinPanelSwitcher } from "./components/panel-switcher/daikin-panel-switcher.js";
12
13
  import { DaikinProgressBar } from "./components/progress-bar/daikin-progress-bar.js";
13
14
  import { DaikinRadio } from "./components/radio/daikin-radio.js";
14
15
  import { DaikinTab } from "./components/tab/daikin-tab.js";
15
- import { DaikinTabGroup } from "./components/tab-group/daikin-tab-group.js";
16
+ import { DaikinTabPanels } from "./components/tab-panels/daikin-tab-panels.js";
17
+ import { DaikinTabs } from "./components/tabs/daikin-tabs.js";
16
18
  import { DaikinTextInput } from "./components/text-input/daikin-text-input.js";
17
19
  import { DaikinTextarea } from "./components/textarea/daikin-textarea.js";
18
20
  import { DaikinToggle } from "./components/toggle/daikin-toggle.js";
@@ -26,12 +28,14 @@ export {
26
28
  DaikinCheckbox,
27
29
  DaikinIcon,
28
30
  DaikinInputGroup,
31
+ DaikinList,
32
+ DaikinListItem,
29
33
  DaikinNotification,
30
- DaikinPanelSwitcher,
31
34
  DaikinProgressBar,
32
35
  DaikinRadio,
33
36
  DaikinTab,
34
- DaikinTabGroup,
37
+ DaikinTabPanels,
38
+ DaikinTabs,
35
39
  DaikinTextInput,
36
40
  DaikinTextarea,
37
41
  DaikinToggle,