@daikin-oss/design-system-web-components 1.5.1 → 1.5.2-next.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 (163) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/custom-elements.json +449 -136
  3. package/dist/cjs/base/dds-element.cjs +1 -1
  4. package/dist/cjs/components/accordion/daikin-accordion.cjs +29 -11
  5. package/dist/cjs/components/accordion/daikin-accordion.d.cts +1 -6
  6. package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +6 -0
  7. package/dist/cjs/components/breadcrumb/daikin-breadcrumb.cjs +12 -1
  8. package/dist/cjs/components/breadcrumb/daikin-breadcrumb.d.cts +7 -0
  9. package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.cjs +12 -0
  10. package/dist/cjs/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +6 -0
  11. package/dist/cjs/components/button/daikin-button.cjs +51 -4
  12. package/dist/cjs/components/card/daikin-card.cjs +2 -3
  13. package/dist/cjs/components/card-header/daikin-card-header.cjs +4 -2
  14. package/dist/cjs/components/checkbox/daikin-checkbox.cjs +12 -1
  15. package/dist/cjs/components/checkbox/daikin-checkbox.d.cts +6 -0
  16. package/dist/cjs/components/date-picker/daikin-date-picker.cjs +8 -0
  17. package/dist/cjs/components/date-picker/daikin-date-picker.d.cts +5 -0
  18. package/dist/cjs/components/icon-button/daikin-icon-button.cjs +39 -3
  19. package/dist/cjs/components/icon-button/daikin-icon-button.d.cts +1 -0
  20. package/dist/cjs/components/link/daikin-link.cjs +12 -0
  21. package/dist/cjs/components/link/daikin-link.d.cts +6 -0
  22. package/dist/cjs/components/menu/daikin-menu.cjs +11 -2
  23. package/dist/cjs/components/menu/daikin-menu.d.cts +11 -0
  24. package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +3 -2
  25. package/dist/cjs/components/progress-indicator-item/daikin-progress-indicator-item.cjs +1 -1
  26. package/dist/cjs/components/radio/daikin-radio.cjs +1 -1
  27. package/dist/cjs/components/slider/daikin-slider.cjs +8 -0
  28. package/dist/cjs/components/slider/daikin-slider.d.cts +5 -0
  29. package/dist/cjs/components/table-header-cell/daikin-table-header-cell.cjs +19 -3
  30. package/dist/cjs/components/table-header-cell/daikin-table-header-cell.d.cts +7 -0
  31. package/dist/cjs/components/text-area/daikin-text-area.cjs +11 -0
  32. package/dist/cjs/components/text-area/daikin-text-area.d.cts +6 -0
  33. package/dist/cjs/components/text-field/daikin-text-field.cjs +11 -0
  34. package/dist/cjs/components/text-field/daikin-text-field.d.cts +6 -0
  35. package/dist/cjs/components/text-masked-field/daikin-text-masked-field.cjs +8 -0
  36. package/dist/cjs/components/text-masked-field/daikin-text-masked-field.d.cts +5 -0
  37. package/dist/cjs/components/time-picker/daikin-time-picker.cjs +8 -0
  38. package/dist/cjs/components/time-picker/daikin-time-picker.d.cts +5 -0
  39. package/dist/cjs/components/toggle/daikin-toggle.cjs +11 -0
  40. package/dist/cjs/components/toggle/daikin-toggle.d.cts +6 -0
  41. package/dist/cjs/components/tree-item/daikin-tree-item.cjs +1 -0
  42. package/dist/cjs/tailwind.css.cjs +1 -1
  43. package/dist/cjs-dev/base/dds-element.cjs +1 -1
  44. package/dist/cjs-dev/components/accordion/daikin-accordion.cjs +29 -11
  45. package/dist/cjs-dev/components/accordion/daikin-accordion.d.cts +1 -6
  46. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +6 -0
  47. package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.cjs +12 -1
  48. package/dist/cjs-dev/components/breadcrumb/daikin-breadcrumb.d.cts +7 -0
  49. package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.cjs +12 -0
  50. package/dist/cjs-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.cts +6 -0
  51. package/dist/cjs-dev/components/button/daikin-button.cjs +51 -4
  52. package/dist/cjs-dev/components/card/daikin-card.cjs +2 -3
  53. package/dist/cjs-dev/components/card-header/daikin-card-header.cjs +4 -2
  54. package/dist/cjs-dev/components/checkbox/daikin-checkbox.cjs +12 -1
  55. package/dist/cjs-dev/components/checkbox/daikin-checkbox.d.cts +6 -0
  56. package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +8 -0
  57. package/dist/cjs-dev/components/date-picker/daikin-date-picker.d.cts +5 -0
  58. package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +39 -3
  59. package/dist/cjs-dev/components/icon-button/daikin-icon-button.d.cts +1 -0
  60. package/dist/cjs-dev/components/link/daikin-link.cjs +12 -0
  61. package/dist/cjs-dev/components/link/daikin-link.d.cts +6 -0
  62. package/dist/cjs-dev/components/menu/daikin-menu.cjs +11 -2
  63. package/dist/cjs-dev/components/menu/daikin-menu.d.cts +11 -0
  64. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +3 -2
  65. package/dist/cjs-dev/components/progress-indicator-item/daikin-progress-indicator-item.cjs +1 -1
  66. package/dist/cjs-dev/components/radio/daikin-radio.cjs +1 -1
  67. package/dist/cjs-dev/components/slider/daikin-slider.cjs +8 -0
  68. package/dist/cjs-dev/components/slider/daikin-slider.d.cts +5 -0
  69. package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.cjs +19 -3
  70. package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.d.cts +7 -0
  71. package/dist/cjs-dev/components/text-area/daikin-text-area.cjs +11 -0
  72. package/dist/cjs-dev/components/text-area/daikin-text-area.d.cts +6 -0
  73. package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +11 -0
  74. package/dist/cjs-dev/components/text-field/daikin-text-field.d.cts +6 -0
  75. package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.cjs +8 -0
  76. package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.d.cts +5 -0
  77. package/dist/cjs-dev/components/time-picker/daikin-time-picker.cjs +8 -0
  78. package/dist/cjs-dev/components/time-picker/daikin-time-picker.d.cts +5 -0
  79. package/dist/cjs-dev/components/toggle/daikin-toggle.cjs +11 -0
  80. package/dist/cjs-dev/components/toggle/daikin-toggle.d.cts +6 -0
  81. package/dist/cjs-dev/components/tree-item/daikin-tree-item.cjs +1 -0
  82. package/dist/cjs-dev/tailwind.css.cjs +1 -1
  83. package/dist/es/base/dds-element.js +1 -1
  84. package/dist/es/components/accordion/daikin-accordion.d.ts +1 -6
  85. package/dist/es/components/accordion/daikin-accordion.js +29 -11
  86. package/dist/es/components/accordion-item/daikin-accordion-item.js +6 -0
  87. package/dist/es/components/breadcrumb/daikin-breadcrumb.d.ts +7 -0
  88. package/dist/es/components/breadcrumb/daikin-breadcrumb.js +12 -1
  89. package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +6 -0
  90. package/dist/es/components/breadcrumb-item/daikin-breadcrumb-item.js +12 -0
  91. package/dist/es/components/button/daikin-button.js +51 -4
  92. package/dist/es/components/card/daikin-card.js +2 -3
  93. package/dist/es/components/card-header/daikin-card-header.js +4 -2
  94. package/dist/es/components/checkbox/daikin-checkbox.d.ts +6 -0
  95. package/dist/es/components/checkbox/daikin-checkbox.js +12 -1
  96. package/dist/es/components/date-picker/daikin-date-picker.d.ts +5 -0
  97. package/dist/es/components/date-picker/daikin-date-picker.js +8 -0
  98. package/dist/es/components/icon-button/daikin-icon-button.d.ts +1 -0
  99. package/dist/es/components/icon-button/daikin-icon-button.js +39 -3
  100. package/dist/es/components/link/daikin-link.d.ts +6 -0
  101. package/dist/es/components/link/daikin-link.js +12 -0
  102. package/dist/es/components/menu/daikin-menu.d.ts +11 -0
  103. package/dist/es/components/menu/daikin-menu.js +12 -3
  104. package/dist/es/components/progress-bar/daikin-progress-bar.js +3 -2
  105. package/dist/es/components/progress-indicator-item/daikin-progress-indicator-item.js +1 -1
  106. package/dist/es/components/radio/daikin-radio.js +1 -1
  107. package/dist/es/components/slider/daikin-slider.d.ts +5 -0
  108. package/dist/es/components/slider/daikin-slider.js +8 -0
  109. package/dist/es/components/table-header-cell/daikin-table-header-cell.d.ts +7 -0
  110. package/dist/es/components/table-header-cell/daikin-table-header-cell.js +19 -3
  111. package/dist/es/components/text-area/daikin-text-area.d.ts +6 -0
  112. package/dist/es/components/text-area/daikin-text-area.js +11 -0
  113. package/dist/es/components/text-field/daikin-text-field.d.ts +6 -0
  114. package/dist/es/components/text-field/daikin-text-field.js +11 -0
  115. package/dist/es/components/text-masked-field/daikin-text-masked-field.d.ts +5 -0
  116. package/dist/es/components/text-masked-field/daikin-text-masked-field.js +8 -0
  117. package/dist/es/components/time-picker/daikin-time-picker.d.ts +5 -0
  118. package/dist/es/components/time-picker/daikin-time-picker.js +8 -0
  119. package/dist/es/components/toggle/daikin-toggle.d.ts +6 -0
  120. package/dist/es/components/toggle/daikin-toggle.js +11 -0
  121. package/dist/es/components/tree-item/daikin-tree-item.js +1 -0
  122. package/dist/es/tailwind.css.js +1 -1
  123. package/dist/es-dev/base/dds-element.js +1 -1
  124. package/dist/es-dev/components/accordion/daikin-accordion.d.ts +1 -6
  125. package/dist/es-dev/components/accordion/daikin-accordion.js +29 -11
  126. package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +6 -0
  127. package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.d.ts +7 -0
  128. package/dist/es-dev/components/breadcrumb/daikin-breadcrumb.js +12 -1
  129. package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.d.ts +6 -0
  130. package/dist/es-dev/components/breadcrumb-item/daikin-breadcrumb-item.js +12 -0
  131. package/dist/es-dev/components/button/daikin-button.js +51 -4
  132. package/dist/es-dev/components/card/daikin-card.js +2 -3
  133. package/dist/es-dev/components/card-header/daikin-card-header.js +4 -2
  134. package/dist/es-dev/components/checkbox/daikin-checkbox.d.ts +6 -0
  135. package/dist/es-dev/components/checkbox/daikin-checkbox.js +12 -1
  136. package/dist/es-dev/components/date-picker/daikin-date-picker.d.ts +5 -0
  137. package/dist/es-dev/components/date-picker/daikin-date-picker.js +8 -0
  138. package/dist/es-dev/components/icon-button/daikin-icon-button.d.ts +1 -0
  139. package/dist/es-dev/components/icon-button/daikin-icon-button.js +39 -3
  140. package/dist/es-dev/components/link/daikin-link.d.ts +6 -0
  141. package/dist/es-dev/components/link/daikin-link.js +12 -0
  142. package/dist/es-dev/components/menu/daikin-menu.d.ts +11 -0
  143. package/dist/es-dev/components/menu/daikin-menu.js +12 -3
  144. package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +3 -2
  145. package/dist/es-dev/components/progress-indicator-item/daikin-progress-indicator-item.js +1 -1
  146. package/dist/es-dev/components/radio/daikin-radio.js +1 -1
  147. package/dist/es-dev/components/slider/daikin-slider.d.ts +5 -0
  148. package/dist/es-dev/components/slider/daikin-slider.js +8 -0
  149. package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.d.ts +7 -0
  150. package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.js +19 -3
  151. package/dist/es-dev/components/text-area/daikin-text-area.d.ts +6 -0
  152. package/dist/es-dev/components/text-area/daikin-text-area.js +11 -0
  153. package/dist/es-dev/components/text-field/daikin-text-field.d.ts +6 -0
  154. package/dist/es-dev/components/text-field/daikin-text-field.js +11 -0
  155. package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.d.ts +5 -0
  156. package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.js +8 -0
  157. package/dist/es-dev/components/time-picker/daikin-time-picker.d.ts +5 -0
  158. package/dist/es-dev/components/time-picker/daikin-time-picker.js +8 -0
  159. package/dist/es-dev/components/toggle/daikin-toggle.d.ts +6 -0
  160. package/dist/es-dev/components/toggle/daikin-toggle.js +11 -0
  161. package/dist/es-dev/components/tree-item/daikin-tree-item.js +1 -0
  162. package/dist/es-dev/tailwind.css.js +1 -1
  163. package/package.json +1 -1
@@ -84,6 +84,6 @@ const _DDSElement = class _DDSElement extends lit.LitElement {
84
84
  return this[key];
85
85
  }
86
86
  };
87
- _DDSElement.version = "1.5.1";
87
+ _DDSElement.version = "1.5.2-next.0";
88
88
  let DDSElement = _DDSElement;
89
89
  exports.DDSElement = DDSElement;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const classVarianceAuthority = require("class-variance-authority");
4
3
  const lit = require("lit");
5
4
  const decorators_js = require("lit/decorators.js");
6
5
  const ddsElement = require("../../base/dds-element.cjs");
@@ -19,15 +18,6 @@ var __decorateClass = (decorators2, target, key, kind) => {
19
18
  if (kind && result) __defProp(target, key, result);
20
19
  return result;
21
20
  };
22
- const cvaAccordion = classVarianceAuthority.cva(["w-full"], {
23
- variants: {
24
- border: {
25
- vertical: ["border-y border-ddt-color-divider"],
26
- all: ["border border-ddt-color-divider"],
27
- none: []
28
- }
29
- }
30
- });
31
21
  exports.DaikinAccordion = class DaikinAccordion extends ddsElement.DDSElement {
32
22
  constructor() {
33
23
  super(...arguments);
@@ -62,7 +52,7 @@ exports.DaikinAccordion = class DaikinAccordion extends ddsElement.DDSElement {
62
52
  }
63
53
  }
64
54
  render() {
65
- return lit.html`<div class=${cvaAccordion({ border: this.border })}>
55
+ return lit.html`<div class="w-full">
66
56
  <slot
67
57
  @accordion-move-focus=${this._handleMoveFocus}
68
58
  @toggle=${this._handleToggle}
@@ -76,6 +66,34 @@ exports.DaikinAccordion.styles = lit.css`
76
66
 
77
67
  :host {
78
68
  min-width: 10rem;
69
+ position: relative;
70
+ }
71
+
72
+ :host([border="vertical"])::before {
73
+ content: "";
74
+ display: block;
75
+ position: absolute;
76
+ width: 100%;
77
+ height: 100%;
78
+ inset: 0px;
79
+ border-top: 1px solid var(--dds-color-divider) !important;
80
+ border-bottom: 1px solid var(--dds-color-divider) !important;
81
+ z-index: 1;
82
+ isolation: isolate;
83
+ pointer-events: none;
84
+ }
85
+
86
+ :host([border="all"])::before {
87
+ content: "";
88
+ display: block;
89
+ position: absolute;
90
+ width: 100%;
91
+ height: 100%;
92
+ inset: 0px;
93
+ border: 1px solid var(--dds-color-divider) !important;
94
+ z-index: 1;
95
+ isolation: isolate;
96
+ pointer-events: none;
79
97
  }
80
98
 
81
99
  :host(:not([border="none"])) ::slotted(daikin-accordion-item) {
@@ -1,9 +1,4 @@
1
1
  import { DDSElement } from "../../base/index.cjs";
2
- import { MergeVariantProps } from "../../type-utils.cjs";
3
- declare const cvaAccordion: (props?: ({
4
- border?: "vertical" | "all" | "none" | null | undefined;
5
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
- type AccordionVariantProps = MergeVariantProps<typeof cvaAccordion>;
7
2
  /**
8
3
  * The accordion component serves as the parent element that organizes and manages the overall structure of the accordion.
9
4
  * Currently it only provides appropriate styles for individual accordion items.
@@ -47,7 +42,7 @@ export declare class DaikinAccordion extends DDSElement {
47
42
  *
48
43
  * @default "vertical"
49
44
  */
50
- border: AccordionVariantProps["border"];
45
+ border: "vertical" | "all" | "none";
51
46
  /**
52
47
  * A list of the names of the open items.
53
48
  * If `exclusive` is true, the number of elements is 0 or 1.
@@ -161,6 +161,9 @@ exports.DaikinAccordionItem.styles = lit.css`
161
161
  :host::before {
162
162
  content: "";
163
163
  display: var(--divider-top-display, none);
164
+ position: absolute;
165
+ inset: 0;
166
+ bottom: auto;
164
167
  width: 100%;
165
168
  height: 1px;
166
169
  background: var(--dds-color-divider);
@@ -169,6 +172,9 @@ exports.DaikinAccordionItem.styles = lit.css`
169
172
  :host::after {
170
173
  content: "";
171
174
  display: var(--divider-bottom-display, none);
175
+ position: absolute;
176
+ inset: 0;
177
+ top: auto;
172
178
  width: 100%;
173
179
  height: 1px;
174
180
  background: var(--dds-color-divider);
@@ -58,7 +58,10 @@ exports.DaikinBreadcrumb = class DaikinBreadcrumb extends ddsElement.DDSElement
58
58
  this._updateBreadcrumbs();
59
59
  }
60
60
  render() {
61
- return lit.html`<nav class="inline-block" aria-label="Breadcrumbs">
61
+ return lit.html`<nav
62
+ class="inline-block"
63
+ aria-label=${this.breadcrumbAriaLabel}
64
+ >
62
65
  <div class="inline-block" role="list">
63
66
  <slot @slotchange=${this._handleSlotChange}></slot>
64
67
  </div>
@@ -74,6 +77,14 @@ exports.DaikinBreadcrumb.styles = lit.css`
74
77
  __decorateClass([
75
78
  ddsProperty.property({ type: Boolean, reflect: true, attribute: "show-visited" })
76
79
  ], exports.DaikinBreadcrumb.prototype, "showVisited", 2);
80
+ __decorateClass([
81
+ ddsProperty.property({
82
+ type: String,
83
+ reflect: true,
84
+ attribute: "breadcrumb-aria-label",
85
+ fallbackValue: "Breadcrumb"
86
+ })
87
+ ], exports.DaikinBreadcrumb.prototype, "breadcrumbAriaLabel", 2);
77
88
  __decorateClass([
78
89
  decorators_js.queryAssignedElements({ selector: "daikin-breadcrumb-item" })
79
90
  ], exports.DaikinBreadcrumb.prototype, "_items", 2);
@@ -60,6 +60,13 @@ export declare class DaikinBreadcrumb extends DDSElement {
60
60
  * Whether or not to change the color of visited links.
61
61
  */
62
62
  showVisited: boolean;
63
+ /**
64
+ * The aria-label of the breadcrumb.
65
+ * It's recommended to provide a more specific aria-label for the breadcrumb, especially when there are multiple breadcrumb components on the same page, to help users distinguish between them.
66
+ *
67
+ * @default "Breadcrumb"
68
+ */
69
+ breadcrumbAriaLabel: string;
63
70
  private readonly _items;
64
71
  private readonly _menus;
65
72
  private _rafId;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const classVarianceAuthority = require("class-variance-authority");
4
4
  const lit = require("lit");
5
5
  const ifDefined_js = require("lit/directives/if-defined.js");
6
+ const ref_js = require("lit/directives/ref.js");
6
7
  const ddsElement = require("../../base/dds-element.cjs");
7
8
  require("../../base/dds-form-element.cjs");
8
9
  const ddsProperty = require("../../base/dds-property.cjs");
@@ -45,6 +46,15 @@ exports.DaikinBreadcrumbItem = class DaikinBreadcrumbItem extends ddsElement.DDS
45
46
  this.appendDivider = false;
46
47
  this.breadcrumbAriaHaspopup = null;
47
48
  this.breadcrumbAriaExpanded = null;
49
+ this._focusableRef = ref_js.createRef();
50
+ }
51
+ /**
52
+ * Focuses on the inner focusable element.
53
+ * @param options focus options
54
+ */
55
+ focus(options) {
56
+ var _a;
57
+ (_a = this._focusableRef.value) == null ? void 0 : _a.focus(options);
48
58
  }
49
59
  /**
50
60
  * _Internal use._
@@ -66,6 +76,7 @@ exports.DaikinBreadcrumbItem = class DaikinBreadcrumbItem extends ddsElement.DDS
66
76
  }
67
77
  render() {
68
78
  const link = this.variant === "normal" ? lit.html`<daikin-link
79
+ ${ref_js.ref(this._focusableRef)}
69
80
  href=${ifDefined_js.ifDefined(this.href)}
70
81
  target=${ifDefined_js.ifDefined(this.target)}
71
82
  ?no-underline=${true}
@@ -73,6 +84,7 @@ exports.DaikinBreadcrumbItem = class DaikinBreadcrumbItem extends ddsElement.DDS
73
84
  >
74
85
  <slot></slot>
75
86
  </daikin-link>` : this.variant === "ellipsis" ? lit.html`<button
87
+ ${ref_js.ref(this._focusableRef)}
76
88
  type="button"
77
89
  class=${LINK_CLASS_NAME}
78
90
  aria-label="Show more items"
@@ -61,6 +61,12 @@ export declare class DaikinBreadcrumbItem extends DDSElement implements DDSNavig
61
61
  * When used within a daikin-menu component, this property will be controlled by daikin-menu, so you don't need to specify it explicitly.
62
62
  */
63
63
  breadcrumbAriaExpanded: "true" | "false" | "undefined" | null;
64
+ private readonly _focusableRef;
65
+ /**
66
+ * Focuses on the inner focusable element.
67
+ * @param options focus options
68
+ */
69
+ focus(options?: FocusOptions): void;
64
70
  /**
65
71
  * _Internal use._
66
72
  * Returns the navigation target information.
@@ -68,11 +68,58 @@ const cvaButton = classVarianceAuthority.cva(
68
68
  ghost: ["text-(--color-primary)", "bg-(--color-secondary)"]
69
69
  },
70
70
  size: {
71
- small: ["px-2", "text-sm"],
72
- medium: ["px-3", "text-base"],
73
- large: ["px-4", "text-xl"]
71
+ small: ["text-sm"],
72
+ medium: ["text-base"],
73
+ large: ["text-xl"]
74
74
  }
75
- }
75
+ },
76
+ compoundVariants: [
77
+ {
78
+ size: "small",
79
+ variant: "fill",
80
+ class: "px-2"
81
+ },
82
+ {
83
+ size: "small",
84
+ variant: "ghost",
85
+ class: "px-2"
86
+ },
87
+ {
88
+ size: "small",
89
+ variant: "outline",
90
+ class: "px-1.75"
91
+ },
92
+ {
93
+ size: "medium",
94
+ variant: "fill",
95
+ class: "px-3"
96
+ },
97
+ {
98
+ size: "medium",
99
+ variant: "ghost",
100
+ class: "px-3"
101
+ },
102
+ {
103
+ size: "medium",
104
+ variant: "outline",
105
+ class: "px-2.75"
106
+ },
107
+ {
108
+ size: "large",
109
+ variant: "fill",
110
+ class: "px-4"
111
+ },
112
+ {
113
+ size: "large",
114
+ variant: "ghost",
115
+ class: "px-4"
116
+ },
117
+ {
118
+ size: "large",
119
+ variant: "outline",
120
+ class: "px-3.75"
121
+ }
122
+ ]
76
123
  }
77
124
  );
78
125
  const cvaIcon = classVarianceAuthority.cva(["slotted:flex-none"], {
@@ -24,15 +24,14 @@ const cvaContainer = classVarianceAuthority.cva(
24
24
  "flex-col",
25
25
  "gap-4",
26
26
  "size-full",
27
- "p-3",
28
27
  "rounded-lg",
29
28
  "bg-ddt-color-common-background-default"
30
29
  ],
31
30
  {
32
31
  variants: {
33
32
  outline: {
34
- true: ["border", "border-ddt-color-divider"],
35
- false: []
33
+ true: ["border", "border-ddt-color-divider", "p-2.75"],
34
+ false: ["p-3"]
36
35
  }
37
36
  }
38
37
  }
@@ -23,7 +23,8 @@ const cvaTitle = classVarianceAuthority.cva([
23
23
  "text-base",
24
24
  "leading-[1.3]",
25
25
  "not-italic",
26
- "font-bold"
26
+ "font-bold",
27
+ "natural-break"
27
28
  ])();
28
29
  const cvaDescription = classVarianceAuthority.cva([
29
30
  "flex-none",
@@ -32,7 +33,8 @@ const cvaDescription = classVarianceAuthority.cva([
32
33
  "text-sm",
33
34
  "leading-normal",
34
35
  "not-italic",
35
- "font-normal"
36
+ "font-normal",
37
+ "natural-break"
36
38
  ])();
37
39
  exports.DaikinCardHeader = class DaikinCardHeader extends ddsElement.DDSElement {
38
40
  render() {
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const classVarianceAuthority = require("class-variance-authority");
4
4
  const lit = require("lit");
5
5
  const ifDefined_js = require("lit/directives/if-defined.js");
6
+ const ref_js = require("lit/directives/ref.js");
6
7
  require("../../base/dds-element.cjs");
7
8
  const ddsFormElement = require("../../base/dds-form-element.cjs");
8
9
  const ddsProperty = require("../../base/dds-property.cjs");
@@ -64,7 +65,7 @@ const CHECKBOX_CLASS_NAME = classVarianceAuthority.cva([
64
65
  "disabled:checked:bg-ddt-color-common-disabled",
65
66
  "disabled:indeterminate:bg-ddt-color-common-disabled"
66
67
  ])();
67
- const cvaLabel = classVarianceAuthority.cva([], {
68
+ const cvaLabel = classVarianceAuthority.cva(["natural-break"], {
68
69
  variants: {
69
70
  disabled: {
70
71
  false: ["text-ddt-color-common-text-primary"],
@@ -81,6 +82,15 @@ exports.DaikinCheckbox = class DaikinCheckbox extends ddsFormElement.DDSFormElem
81
82
  super(...arguments);
82
83
  this.disabled = false;
83
84
  this.disabledByParent = false;
85
+ this._inputRef = ref_js.createRef();
86
+ }
87
+ /**
88
+ * Focuses on the inner checkbox.
89
+ * @param options focus options
90
+ */
91
+ focus(options) {
92
+ var _a;
93
+ (_a = this._inputRef.value) == null ? void 0 : _a.focus(options);
84
94
  }
85
95
  get checked() {
86
96
  return this.checkState === "checked";
@@ -122,6 +132,7 @@ exports.DaikinCheckbox = class DaikinCheckbox extends ddsFormElement.DDSFormElem
122
132
  >
123
133
  <span class="p-2">
124
134
  <input
135
+ ${ref_js.ref(this._inputRef)}
125
136
  class=${CHECKBOX_CLASS_NAME}
126
137
  type="checkbox"
127
138
  name=${ifDefined_js.ifDefined(this.getBackingProperty("name"))}
@@ -59,6 +59,12 @@ export declare class DaikinCheckbox extends DDSFormElement {
59
59
  * @private
60
60
  */
61
61
  disabledByParent: boolean;
62
+ private readonly _inputRef;
63
+ /**
64
+ * Focuses on the inner checkbox.
65
+ * @param options focus options
66
+ */
67
+ focus(options?: FocusOptions): void;
62
68
  get checked(): boolean;
63
69
  private get _labelHidden();
64
70
  /**
@@ -493,6 +493,14 @@ exports.DaikinDatePicker = class DaikinDatePicker extends ddsFormElement.DDSForm
493
493
  this._currentSelection = itemInfo.type;
494
494
  }
495
495
  }
496
+ /**
497
+ * Focuses on the inner date input.
498
+ * @param options focus options
499
+ */
500
+ focus(options) {
501
+ var _a;
502
+ (_a = this._dateInputElement.value) == null ? void 0 : _a.focus(options);
503
+ }
496
504
  render() {
497
505
  const min = this._min;
498
506
  const max = this._max;
@@ -104,6 +104,11 @@ export declare class DaikinDatePicker extends DDSFormElement {
104
104
  private _updateInputSelection;
105
105
  private _updateSelection;
106
106
  label: string | null;
107
+ /**
108
+ * Focuses on the inner date input.
109
+ * @param options focus options
110
+ */
111
+ focus(options?: FocusOptions): void;
107
112
  render(): import('lit-html').TemplateResult<1>;
108
113
  protected willUpdate(changedProperties: PropertyValues<this>): void;
109
114
  protected updated(changedProperties: PropertyValues<this>): void;
@@ -30,7 +30,6 @@ const cvaIconButton = classVarianceAuthority.cva(
30
30
  "font-daikinSerif",
31
31
  "font-bold",
32
32
  "rounded-sm",
33
- "p-1",
34
33
  "tracking-wide",
35
34
  "text-nowrap",
36
35
  "focus-visible:outline-solid",
@@ -74,8 +73,44 @@ const cvaIconButton = classVarianceAuthority.cva(
74
73
  "border-(--color-primary)"
75
74
  ],
76
75
  ghost: ["text-(--color-primary)", "bg-(--color-secondary)"]
76
+ },
77
+ size: {
78
+ s: [],
79
+ m: []
77
80
  }
78
- }
81
+ },
82
+ compoundVariants: [
83
+ {
84
+ size: "s",
85
+ variant: "fill",
86
+ class: "p-1"
87
+ },
88
+ {
89
+ size: "s",
90
+ variant: "ghost",
91
+ class: "p-1"
92
+ },
93
+ {
94
+ size: "s",
95
+ variant: "outline",
96
+ class: "p-0.75"
97
+ },
98
+ {
99
+ size: "m",
100
+ variant: "fill",
101
+ class: "p-2"
102
+ },
103
+ {
104
+ size: "m",
105
+ variant: "ghost",
106
+ class: "p-2"
107
+ },
108
+ {
109
+ size: "m",
110
+ variant: "outline",
111
+ class: "p-1.75"
112
+ }
113
+ ]
79
114
  }
80
115
  );
81
116
  exports.DaikinIconButton = class DaikinIconButton extends ddsFormElement.DDSFormSubmitElement {
@@ -120,7 +155,8 @@ exports.DaikinIconButton = class DaikinIconButton extends ddsFormElement.DDSForm
120
155
  render() {
121
156
  const iconButtonCN = cvaIconButton({
122
157
  variant: this.variant,
123
- color: this.color
158
+ color: this.color,
159
+ size: this.size
124
160
  });
125
161
  if (this.type === "link") {
126
162
  const linkDisabled = this.disabled || this.href == null;
@@ -4,6 +4,7 @@ import { MergeVariantProps } from "../../type-utils.cjs";
4
4
  declare const cvaIconButton: (props?: ({
5
5
  color?: "default" | "danger" | "neutral" | null | undefined;
6
6
  variant?: "fill" | "outline" | "ghost" | null | undefined;
7
+ size?: "s" | "m" | null | undefined;
7
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
9
  type IconButtonVariantProps = MergeVariantProps<typeof cvaIconButton>;
9
10
  /**
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const classVarianceAuthority = require("class-variance-authority");
4
4
  const lit = require("lit");
5
5
  const ifDefined_js = require("lit/directives/if-defined.js");
6
+ const ref_js = require("lit/directives/ref.js");
6
7
  const ddsElement = require("../../base/dds-element.cjs");
7
8
  require("../../base/dds-form-element.cjs");
8
9
  const ddsProperty = require("../../base/dds-property.cjs");
@@ -23,6 +24,7 @@ const LINK_CLASS_NAME = classVarianceAuthority.cva([
23
24
  "font-daikinSerif",
24
25
  "leading-[130%]",
25
26
  "relative",
27
+ "natural-break",
26
28
  "link-enabled:text-ddt-color-link-text-default",
27
29
  "hover:link-enabled:text-ddt-color-link-text-hover",
28
30
  "hover:link-enabled:bg-ddt-color-common-surface-brand-hover",
@@ -55,6 +57,15 @@ exports.DaikinLink = class DaikinLink extends ddsElement.DDSElement {
55
57
  this.showVisited = false;
56
58
  this.size = "medium";
57
59
  this.noUnderline = false;
60
+ this._anchorRef = ref_js.createRef();
61
+ }
62
+ /**
63
+ * Focuses on the inner anchor.
64
+ * @param options focus options
65
+ */
66
+ focus(options) {
67
+ var _a;
68
+ (_a = this._anchorRef.value) == null ? void 0 : _a.focus(options);
58
69
  }
59
70
  /**
60
71
  * _Internal use._
@@ -76,6 +87,7 @@ exports.DaikinLink = class DaikinLink extends ddsElement.DDSElement {
76
87
  }
77
88
  render() {
78
89
  return lit.html`<a
90
+ ${ref_js.ref(this._anchorRef)}
79
91
  class=${LINK_CLASS_NAME}
80
92
  href=${ifDefined_js.ifDefined(this.disabled ? void 0 : this.href ?? void 0)}
81
93
  target=${ifDefined_js.ifDefined(this.target ?? void 0)}
@@ -45,6 +45,12 @@ export declare class DaikinLink extends DDSElement implements DDSNavigable {
45
45
  * Whether or not to display an underline.
46
46
  */
47
47
  noUnderline: boolean;
48
+ private readonly _anchorRef;
49
+ /**
50
+ * Focuses on the inner anchor.
51
+ * @param options focus options
52
+ */
53
+ focus(options?: FocusOptions): void;
48
54
  /**
49
55
  * _Internal use._
50
56
  * Returns the navigation target information.
@@ -50,6 +50,7 @@ exports.DaikinMenu = class DaikinMenu extends ddsElement.DDSElement {
50
50
  this.open = false;
51
51
  this._autoUpdateController = new floatingUiAutoUpdate.FloatingUIAutoUpdateController(this);
52
52
  this._hostStyles = isClient.isClient ? window.getComputedStyle(this) : null;
53
+ this._staticPlacement = false;
53
54
  }
54
55
  static registerCSSCustomProperties() {
55
56
  if (!isClient.isClient) {
@@ -87,6 +88,7 @@ exports.DaikinMenu = class DaikinMenu extends ddsElement.DDSElement {
87
88
  * These are typically set once when the slot changes and do not change frequently.
88
89
  */
89
90
  _reflectStaticProperties() {
91
+ this._staticPlacement = false;
90
92
  for (const control of this._controls) {
91
93
  if (control instanceof daikinButton.DaikinButton || control instanceof daikinIconButton.DaikinIconButton && control.type === "button") {
92
94
  control.buttonAriaHaspopup = "menu";
@@ -94,6 +96,7 @@ exports.DaikinMenu = class DaikinMenu extends ddsElement.DDSElement {
94
96
  control.avatarAriaHaspopup = "menu";
95
97
  } else if (control instanceof daikinNavigationItem.DaikinNavigationItem && control.type === "menu") {
96
98
  control.navigationItemAriaHaspopup = "menu";
99
+ this._staticPlacement = true;
97
100
  } else if (control instanceof daikinBreadcrumbItem.DaikinBreadcrumbItem) {
98
101
  control.breadcrumbAriaHaspopup = "menu";
99
102
  }
@@ -167,6 +170,7 @@ exports.DaikinMenu = class DaikinMenu extends ddsElement.DDSElement {
167
170
  <slot
168
171
  @click=${this._handleTriggerClick}
169
172
  @touchend=${this._handleTouchEnd}
173
+ @slotchange=${this._handleSlotChange}
170
174
  ></slot>
171
175
  </div>
172
176
  <span
@@ -184,11 +188,13 @@ exports.DaikinMenu = class DaikinMenu extends ddsElement.DDSElement {
184
188
  ${// Activate auto update only when the menu is open.
185
189
  // TODO(DDS-1226): refactor here with CSS Anchor Positioning instead of using floating-ui
186
190
  guard_js.guard(
187
- [this.open, this.placement, spacing],
191
+ [this.open, this.placement, spacing, this._staticPlacement],
188
192
  () => this._autoUpdateController.directive(
189
193
  {
190
194
  placement: this.placement,
191
- middleware: [dom.offset({ mainAxis: spacing }), dom.flip(), dom.shift()]
195
+ // flip() and shift() are disabled when the trigger is a daikin-navigation-item
196
+ // (see _staticPlacement for the full explanation).
197
+ middleware: this._staticPlacement ? [dom.offset({ mainAxis: spacing })] : [dom.offset({ mainAxis: spacing }), dom.flip(), dom.shift()]
192
198
  },
193
199
  this.open
194
200
  )
@@ -265,6 +271,9 @@ __decorateClass([
265
271
  isAllowedValue: ddsProperty.oneOf(["click", "manual"])
266
272
  })
267
273
  ], exports.DaikinMenu.prototype, "trigger", 2);
274
+ __decorateClass([
275
+ decorators_js.state()
276
+ ], exports.DaikinMenu.prototype, "_staticPlacement", 2);
268
277
  exports.DaikinMenu = __decorateClass([
269
278
  decorators.ddsElement("daikin-menu")
270
279
  ], exports.DaikinMenu);
@@ -75,6 +75,17 @@ export declare class DaikinMenu extends DDSElement {
75
75
  trigger: "click" | "manual";
76
76
  private _autoUpdateController;
77
77
  private _hostStyles;
78
+ /**
79
+ * Controls whether the floating-ui `flip()` and `shift()` middleware are active.
80
+ *
81
+ * - **`flip()`** — When there is insufficient space on the side specified by `placement`, the menu
82
+ * is automatically repositioned to the opposite side (e.g. `bottom` → `top`).
83
+ * - **`shift()`** — Keeps the menu within the viewport by nudging it along the cross-axis when it
84
+ * would otherwise overflow the screen edge.
85
+ *
86
+ * Both middlewares are disabled when the trigger element is a `daikin-navigation-item`.
87
+ */
88
+ private _staticPlacement;
78
89
  /**
79
90
  * Exposes the trigger element contained within the menu to the outside of the component.
80
91
  *
@@ -58,7 +58,8 @@ const cvaBarContainer = classVarianceAuthority.cva(
58
58
  "items-center",
59
59
  "text-ddt-color-common-text-primary",
60
60
  "leading-[130%]",
61
- "font-bold"
61
+ "font-bold",
62
+ "natural-break"
62
63
  ],
63
64
  {
64
65
  variants: {
@@ -81,7 +82,7 @@ const cvaBarContainer = classVarianceAuthority.cva(
81
82
  }
82
83
  }
83
84
  );
84
- const cvaHelper = classVarianceAuthority.cva(["text-sm", "leading-[130%]"], {
85
+ const cvaHelper = classVarianceAuthority.cva(["text-sm", "leading-[130%]", "natural-break"], {
85
86
  variants: {
86
87
  variant: {
87
88
  inprogress: ["text-ddt-color-common-text-secondary"],
@@ -49,7 +49,7 @@ exports.DaikinProgressIndicatorItem = class DaikinProgressIndicatorItem extends
49
49
  this.status === "inprogress" ? "step" : void 0
50
50
  )}
51
51
  >
52
- <div class="flex flex-col gap-1 w-full overflow-auto">
52
+ <div class="flex flex-col gap-1 w-full overflow-auto natural-break">
53
53
  <slot class="font-bold leading-[130%]"></slot>
54
54
  <slot name="description" class="text-sm leading-[130%]"></slot>
55
55
  </div>
@@ -44,7 +44,7 @@ const RADIO_CLASS_NAME = classVarianceAuthority.cva([
44
44
  "group-active:checked:enabled:border-ddt-color-common-brand-press",
45
45
  "disabled:border-ddt-color-common-disabled"
46
46
  ])();
47
- const cvaLabel = classVarianceAuthority.cva([], {
47
+ const cvaLabel = classVarianceAuthority.cva(["natural-break"], {
48
48
  variants: {
49
49
  disabled: {
50
50
  false: ["text-ddt-color-common-text-primary"],
@@ -194,6 +194,14 @@ exports.DaikinSlider = class DaikinSlider extends ddsFormElement.DDSFormElement
194
194
  (_a = this._thumbRef.value) == null ? void 0 : _a.focus();
195
195
  this._handleDrag(event);
196
196
  }
197
+ /**
198
+ * Focuses on the inner slider thumb.
199
+ * @param options focus options
200
+ */
201
+ focus(options) {
202
+ var _a;
203
+ (_a = this._thumbRef.value) == null ? void 0 : _a.focus(options);
204
+ }
197
205
  render() {
198
206
  const progress = this._progress;
199
207
  return lit.html`
@@ -72,6 +72,11 @@ export declare class DaikinSlider extends DDSFormElement {
72
72
  private _calcMousePositionRatio;
73
73
  private _startDrag;
74
74
  private _startTouch;
75
+ /**
76
+ * Focuses on the inner slider thumb.
77
+ * @param options focus options
78
+ */
79
+ focus(options?: FocusOptions): void;
75
80
  render(): import('lit-html').TemplateResult<1>;
76
81
  updated(changedProperties: PropertyValues<this>): void;
77
82
  }