@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
@@ -1,9 +1,4 @@
1
1
  import { DDSElement } from "../../base/index.js";
2
- import { MergeVariantProps } from "../../type-utils.js";
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.
@@ -1,4 +1,3 @@
1
- import { cva } from "class-variance-authority";
2
1
  import { unsafeCSS, css, html } from "lit";
3
2
  import { queryAssignedElements } from "lit/decorators.js";
4
3
  import { DDSElement } from "../../base/dds-element.js";
@@ -17,15 +16,6 @@ var __decorateClass = (decorators, target, key, kind) => {
17
16
  if (kind && result) __defProp(target, key, result);
18
17
  return result;
19
18
  };
20
- const cvaAccordion = cva(["w-full"], {
21
- variants: {
22
- border: {
23
- vertical: ["border-y border-ddt-color-divider"],
24
- all: ["border border-ddt-color-divider"],
25
- none: []
26
- }
27
- }
28
- });
29
19
  let DaikinAccordion = class extends DDSElement {
30
20
  constructor() {
31
21
  super(...arguments);
@@ -67,7 +57,7 @@ let DaikinAccordion = class extends DDSElement {
67
57
  }
68
58
  }
69
59
  render() {
70
- return html`<div class=${cvaAccordion({ border: this.border })}>
60
+ return html`<div class="w-full">
71
61
  <slot
72
62
  @accordion-move-focus=${this._handleMoveFocus}
73
63
  @toggle=${this._handleToggle}
@@ -81,6 +71,34 @@ DaikinAccordion.styles = css`
81
71
 
82
72
  :host {
83
73
  min-width: 10rem;
74
+ position: relative;
75
+ }
76
+
77
+ :host([border="vertical"])::before {
78
+ content: "";
79
+ display: block;
80
+ position: absolute;
81
+ width: 100%;
82
+ height: 100%;
83
+ inset: 0px;
84
+ border-top: 1px solid var(--dds-color-divider) !important;
85
+ border-bottom: 1px solid var(--dds-color-divider) !important;
86
+ z-index: 1;
87
+ isolation: isolate;
88
+ pointer-events: none;
89
+ }
90
+
91
+ :host([border="all"])::before {
92
+ content: "";
93
+ display: block;
94
+ position: absolute;
95
+ width: 100%;
96
+ height: 100%;
97
+ inset: 0px;
98
+ border: 1px solid var(--dds-color-divider) !important;
99
+ z-index: 1;
100
+ isolation: isolate;
101
+ pointer-events: none;
84
102
  }
85
103
 
86
104
  :host(:not([border="none"])) ::slotted(daikin-accordion-item) {
@@ -159,6 +159,9 @@ DaikinAccordionItem.styles = css`
159
159
  :host::before {
160
160
  content: "";
161
161
  display: var(--divider-top-display, none);
162
+ position: absolute;
163
+ inset: 0;
164
+ bottom: auto;
162
165
  width: 100%;
163
166
  height: 1px;
164
167
  background: var(--dds-color-divider);
@@ -167,6 +170,9 @@ DaikinAccordionItem.styles = css`
167
170
  :host::after {
168
171
  content: "";
169
172
  display: var(--divider-bottom-display, none);
173
+ position: absolute;
174
+ inset: 0;
175
+ top: auto;
170
176
  width: 100%;
171
177
  height: 1px;
172
178
  background: var(--dds-color-divider);
@@ -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;
@@ -56,7 +56,10 @@ let DaikinBreadcrumb = class extends DDSElement {
56
56
  this._updateBreadcrumbs();
57
57
  }
58
58
  render() {
59
- return html`<nav class="inline-block" aria-label="Breadcrumbs">
59
+ return html`<nav
60
+ class="inline-block"
61
+ aria-label=${this.breadcrumbAriaLabel}
62
+ >
60
63
  <div class="inline-block" role="list">
61
64
  <slot @slotchange=${this._handleSlotChange}></slot>
62
65
  </div>
@@ -72,6 +75,14 @@ DaikinBreadcrumb.styles = css`
72
75
  __decorateClass([
73
76
  property({ type: Boolean, reflect: true, attribute: "show-visited" })
74
77
  ], DaikinBreadcrumb.prototype, "showVisited", 2);
78
+ __decorateClass([
79
+ property({
80
+ type: String,
81
+ reflect: true,
82
+ attribute: "breadcrumb-aria-label",
83
+ fallbackValue: "Breadcrumb"
84
+ })
85
+ ], DaikinBreadcrumb.prototype, "breadcrumbAriaLabel", 2);
75
86
  __decorateClass([
76
87
  queryAssignedElements({ selector: "daikin-breadcrumb-item" })
77
88
  ], DaikinBreadcrumb.prototype, "_items", 2);
@@ -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.
@@ -1,6 +1,7 @@
1
1
  import { cva } from "class-variance-authority";
2
2
  import { unsafeCSS, css, html, nothing } from "lit";
3
3
  import { ifDefined } from "lit/directives/if-defined.js";
4
+ import { createRef, ref } from "lit/directives/ref.js";
4
5
  import { DDSElement } from "../../base/dds-element.js";
5
6
  import "../../base/dds-form-element.js";
6
7
  import { property, oneOf } from "../../base/dds-property.js";
@@ -43,6 +44,15 @@ let DaikinBreadcrumbItem = class extends DDSElement {
43
44
  this.appendDivider = false;
44
45
  this.breadcrumbAriaHaspopup = null;
45
46
  this.breadcrumbAriaExpanded = null;
47
+ this._focusableRef = createRef();
48
+ }
49
+ /**
50
+ * Focuses on the inner focusable element.
51
+ * @param options focus options
52
+ */
53
+ focus(options) {
54
+ var _a;
55
+ (_a = this._focusableRef.value) == null ? void 0 : _a.focus(options);
46
56
  }
47
57
  /**
48
58
  * _Internal use._
@@ -64,6 +74,7 @@ let DaikinBreadcrumbItem = class extends DDSElement {
64
74
  }
65
75
  render() {
66
76
  const link = this.variant === "normal" ? html`<daikin-link
77
+ ${ref(this._focusableRef)}
67
78
  href=${ifDefined(this.href)}
68
79
  target=${ifDefined(this.target)}
69
80
  ?no-underline=${true}
@@ -71,6 +82,7 @@ let DaikinBreadcrumbItem = class extends DDSElement {
71
82
  >
72
83
  <slot></slot>
73
84
  </daikin-link>` : this.variant === "ellipsis" ? html`<button
85
+ ${ref(this._focusableRef)}
74
86
  type="button"
75
87
  class=${LINK_CLASS_NAME}
76
88
  aria-label="Show more items"
@@ -66,11 +66,58 @@ const cvaButton = cva(
66
66
  ghost: ["text-(--color-primary)", "bg-(--color-secondary)"]
67
67
  },
68
68
  size: {
69
- small: ["px-2", "text-sm"],
70
- medium: ["px-3", "text-base"],
71
- large: ["px-4", "text-xl"]
69
+ small: ["text-sm"],
70
+ medium: ["text-base"],
71
+ large: ["text-xl"]
72
72
  }
73
- }
73
+ },
74
+ compoundVariants: [
75
+ {
76
+ size: "small",
77
+ variant: "fill",
78
+ class: "px-2"
79
+ },
80
+ {
81
+ size: "small",
82
+ variant: "ghost",
83
+ class: "px-2"
84
+ },
85
+ {
86
+ size: "small",
87
+ variant: "outline",
88
+ class: "px-1.75"
89
+ },
90
+ {
91
+ size: "medium",
92
+ variant: "fill",
93
+ class: "px-3"
94
+ },
95
+ {
96
+ size: "medium",
97
+ variant: "ghost",
98
+ class: "px-3"
99
+ },
100
+ {
101
+ size: "medium",
102
+ variant: "outline",
103
+ class: "px-2.75"
104
+ },
105
+ {
106
+ size: "large",
107
+ variant: "fill",
108
+ class: "px-4"
109
+ },
110
+ {
111
+ size: "large",
112
+ variant: "ghost",
113
+ class: "px-4"
114
+ },
115
+ {
116
+ size: "large",
117
+ variant: "outline",
118
+ class: "px-3.75"
119
+ }
120
+ ]
74
121
  }
75
122
  );
76
123
  const cvaIcon = cva(["slotted:flex-none"], {
@@ -22,15 +22,14 @@ const cvaContainer = cva(
22
22
  "flex-col",
23
23
  "gap-4",
24
24
  "size-full",
25
- "p-3",
26
25
  "rounded-lg",
27
26
  "bg-ddt-color-common-background-default"
28
27
  ],
29
28
  {
30
29
  variants: {
31
30
  outline: {
32
- true: ["border", "border-ddt-color-divider"],
33
- false: []
31
+ true: ["border", "border-ddt-color-divider", "p-2.75"],
32
+ false: ["p-3"]
34
33
  }
35
34
  }
36
35
  }
@@ -21,7 +21,8 @@ const cvaTitle = cva([
21
21
  "text-base",
22
22
  "leading-[1.3]",
23
23
  "not-italic",
24
- "font-bold"
24
+ "font-bold",
25
+ "natural-break"
25
26
  ])();
26
27
  const cvaDescription = cva([
27
28
  "flex-none",
@@ -30,7 +31,8 @@ const cvaDescription = cva([
30
31
  "text-sm",
31
32
  "leading-normal",
32
33
  "not-italic",
33
- "font-normal"
34
+ "font-normal",
35
+ "natural-break"
34
36
  ])();
35
37
  let DaikinCardHeader = class extends DDSElement {
36
38
  render() {
@@ -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
  /**
@@ -1,6 +1,7 @@
1
1
  import { cva } from "class-variance-authority";
2
2
  import { unsafeCSS, css, nothing, html } from "lit";
3
3
  import { ifDefined } from "lit/directives/if-defined.js";
4
+ import { createRef, ref } from "lit/directives/ref.js";
4
5
  import "../../base/dds-element.js";
5
6
  import { DDSFormElement } from "../../base/dds-form-element.js";
6
7
  import { property, oneOf } from "../../base/dds-property.js";
@@ -62,7 +63,7 @@ const CHECKBOX_CLASS_NAME = cva([
62
63
  "disabled:checked:bg-ddt-color-common-disabled",
63
64
  "disabled:indeterminate:bg-ddt-color-common-disabled"
64
65
  ])();
65
- const cvaLabel = cva([], {
66
+ const cvaLabel = cva(["natural-break"], {
66
67
  variants: {
67
68
  disabled: {
68
69
  false: ["text-ddt-color-common-text-primary"],
@@ -79,6 +80,15 @@ let DaikinCheckbox = class extends DDSFormElement {
79
80
  super(...arguments);
80
81
  this.disabled = false;
81
82
  this.disabledByParent = false;
83
+ this._inputRef = createRef();
84
+ }
85
+ /**
86
+ * Focuses on the inner checkbox.
87
+ * @param options focus options
88
+ */
89
+ focus(options) {
90
+ var _a;
91
+ (_a = this._inputRef.value) == null ? void 0 : _a.focus(options);
82
92
  }
83
93
  get checked() {
84
94
  return this.checkState === "checked";
@@ -120,6 +130,7 @@ let DaikinCheckbox = class extends DDSFormElement {
120
130
  >
121
131
  <span class="p-2">
122
132
  <input
133
+ ${ref(this._inputRef)}
123
134
  class=${CHECKBOX_CLASS_NAME}
124
135
  type="checkbox"
125
136
  name=${ifDefined(this.getBackingProperty("name"))}
@@ -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;
@@ -491,6 +491,14 @@ let DaikinDatePicker = class extends DDSFormElement {
491
491
  this._currentSelection = itemInfo.type;
492
492
  }
493
493
  }
494
+ /**
495
+ * Focuses on the inner date input.
496
+ * @param options focus options
497
+ */
498
+ focus(options) {
499
+ var _a;
500
+ (_a = this._dateInputElement.value) == null ? void 0 : _a.focus(options);
501
+ }
494
502
  render() {
495
503
  const min = this._min;
496
504
  const max = this._max;
@@ -4,6 +4,7 @@ import { MergeVariantProps } from "../../type-utils.js";
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
  /**
@@ -28,7 +28,6 @@ const cvaIconButton = cva(
28
28
  "font-daikinSerif",
29
29
  "font-bold",
30
30
  "rounded-sm",
31
- "p-1",
32
31
  "tracking-wide",
33
32
  "text-nowrap",
34
33
  "focus-visible:outline-solid",
@@ -72,8 +71,44 @@ const cvaIconButton = cva(
72
71
  "border-(--color-primary)"
73
72
  ],
74
73
  ghost: ["text-(--color-primary)", "bg-(--color-secondary)"]
74
+ },
75
+ size: {
76
+ s: [],
77
+ m: []
75
78
  }
76
- }
79
+ },
80
+ compoundVariants: [
81
+ {
82
+ size: "s",
83
+ variant: "fill",
84
+ class: "p-1"
85
+ },
86
+ {
87
+ size: "s",
88
+ variant: "ghost",
89
+ class: "p-1"
90
+ },
91
+ {
92
+ size: "s",
93
+ variant: "outline",
94
+ class: "p-0.75"
95
+ },
96
+ {
97
+ size: "m",
98
+ variant: "fill",
99
+ class: "p-2"
100
+ },
101
+ {
102
+ size: "m",
103
+ variant: "ghost",
104
+ class: "p-2"
105
+ },
106
+ {
107
+ size: "m",
108
+ variant: "outline",
109
+ class: "p-1.75"
110
+ }
111
+ ]
77
112
  }
78
113
  );
79
114
  let DaikinIconButton = class extends DDSFormSubmitElement {
@@ -118,7 +153,8 @@ let DaikinIconButton = class extends DDSFormSubmitElement {
118
153
  render() {
119
154
  const iconButtonCN = cvaIconButton({
120
155
  variant: this.variant,
121
- color: this.color
156
+ color: this.color,
157
+ size: this.size
122
158
  });
123
159
  if (this.type === "link") {
124
160
  const linkDisabled = this.disabled || this.href == null;
@@ -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.
@@ -1,6 +1,7 @@
1
1
  import { cva } from "class-variance-authority";
2
2
  import { unsafeCSS, css, html } from "lit";
3
3
  import { ifDefined } from "lit/directives/if-defined.js";
4
+ import { createRef, ref } from "lit/directives/ref.js";
4
5
  import { DDSElement } from "../../base/dds-element.js";
5
6
  import "../../base/dds-form-element.js";
6
7
  import { property } from "../../base/dds-property.js";
@@ -21,6 +22,7 @@ const LINK_CLASS_NAME = cva([
21
22
  "font-daikinSerif",
22
23
  "leading-[130%]",
23
24
  "relative",
25
+ "natural-break",
24
26
  "link-enabled:text-ddt-color-link-text-default",
25
27
  "hover:link-enabled:text-ddt-color-link-text-hover",
26
28
  "hover:link-enabled:bg-ddt-color-common-surface-brand-hover",
@@ -53,6 +55,15 @@ let DaikinLink = class extends DDSElement {
53
55
  this.showVisited = false;
54
56
  this.size = "medium";
55
57
  this.noUnderline = false;
58
+ this._anchorRef = createRef();
59
+ }
60
+ /**
61
+ * Focuses on the inner anchor.
62
+ * @param options focus options
63
+ */
64
+ focus(options) {
65
+ var _a;
66
+ (_a = this._anchorRef.value) == null ? void 0 : _a.focus(options);
56
67
  }
57
68
  /**
58
69
  * _Internal use._
@@ -74,6 +85,7 @@ let DaikinLink = class extends DDSElement {
74
85
  }
75
86
  render() {
76
87
  return html`<a
88
+ ${ref(this._anchorRef)}
77
89
  class=${LINK_CLASS_NAME}
78
90
  href=${ifDefined(this.disabled ? void 0 : this.href ?? void 0)}
79
91
  target=${ifDefined(this.target ?? void 0)}
@@ -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
  *
@@ -1,7 +1,7 @@
1
1
  import { offset, flip, shift } from "@floating-ui/dom";
2
2
  import { cva } from "class-variance-authority";
3
3
  import { unsafeCSS, css, html } from "lit";
4
- import { queryAssignedElements } from "lit/decorators.js";
4
+ import { queryAssignedElements, state } from "lit/decorators.js";
5
5
  import { guard } from "lit/directives/guard.js";
6
6
  import { DDSElement } from "../../base/dds-element.js";
7
7
  import "../../base/dds-form-element.js";
@@ -48,6 +48,7 @@ let DaikinMenu = class extends DDSElement {
48
48
  this.open = false;
49
49
  this._autoUpdateController = new FloatingUIAutoUpdateController(this);
50
50
  this._hostStyles = isClient ? window.getComputedStyle(this) : null;
51
+ this._staticPlacement = false;
51
52
  }
52
53
  static registerCSSCustomProperties() {
53
54
  if (!isClient) {
@@ -85,6 +86,7 @@ let DaikinMenu = class extends DDSElement {
85
86
  * These are typically set once when the slot changes and do not change frequently.
86
87
  */
87
88
  _reflectStaticProperties() {
89
+ this._staticPlacement = false;
88
90
  for (const control of this._controls) {
89
91
  if (control instanceof DaikinButton || control instanceof DaikinIconButton && control.type === "button") {
90
92
  control.buttonAriaHaspopup = "menu";
@@ -92,6 +94,7 @@ let DaikinMenu = class extends DDSElement {
92
94
  control.avatarAriaHaspopup = "menu";
93
95
  } else if (control instanceof DaikinNavigationItem && control.type === "menu") {
94
96
  control.navigationItemAriaHaspopup = "menu";
97
+ this._staticPlacement = true;
95
98
  } else if (control instanceof DaikinBreadcrumbItem) {
96
99
  control.breadcrumbAriaHaspopup = "menu";
97
100
  }
@@ -165,6 +168,7 @@ let DaikinMenu = class extends DDSElement {
165
168
  <slot
166
169
  @click=${this._handleTriggerClick}
167
170
  @touchend=${this._handleTouchEnd}
171
+ @slotchange=${this._handleSlotChange}
168
172
  ></slot>
169
173
  </div>
170
174
  <span
@@ -182,11 +186,13 @@ let DaikinMenu = class extends DDSElement {
182
186
  ${// Activate auto update only when the menu is open.
183
187
  // TODO(DDS-1226): refactor here with CSS Anchor Positioning instead of using floating-ui
184
188
  guard(
185
- [this.open, this.placement, spacing],
189
+ [this.open, this.placement, spacing, this._staticPlacement],
186
190
  () => this._autoUpdateController.directive(
187
191
  {
188
192
  placement: this.placement,
189
- middleware: [offset({ mainAxis: spacing }), flip(), shift()]
193
+ // flip() and shift() are disabled when the trigger is a daikin-navigation-item
194
+ // (see _staticPlacement for the full explanation).
195
+ middleware: this._staticPlacement ? [offset({ mainAxis: spacing })] : [offset({ mainAxis: spacing }), flip(), shift()]
190
196
  },
191
197
  this.open
192
198
  )
@@ -263,6 +269,9 @@ __decorateClass([
263
269
  isAllowedValue: oneOf(["click", "manual"])
264
270
  })
265
271
  ], DaikinMenu.prototype, "trigger", 2);
272
+ __decorateClass([
273
+ state()
274
+ ], DaikinMenu.prototype, "_staticPlacement", 2);
266
275
  DaikinMenu = __decorateClass([
267
276
  ddsElement("daikin-menu")
268
277
  ], DaikinMenu);
@@ -56,7 +56,8 @@ const cvaBarContainer = cva(
56
56
  "items-center",
57
57
  "text-ddt-color-common-text-primary",
58
58
  "leading-[130%]",
59
- "font-bold"
59
+ "font-bold",
60
+ "natural-break"
60
61
  ],
61
62
  {
62
63
  variants: {
@@ -79,7 +80,7 @@ const cvaBarContainer = cva(
79
80
  }
80
81
  }
81
82
  );
82
- const cvaHelper = cva(["text-sm", "leading-[130%]"], {
83
+ const cvaHelper = cva(["text-sm", "leading-[130%]", "natural-break"], {
83
84
  variants: {
84
85
  variant: {
85
86
  inprogress: ["text-ddt-color-common-text-secondary"],
@@ -47,7 +47,7 @@ let DaikinProgressIndicatorItem = class extends DDSElement {
47
47
  this.status === "inprogress" ? "step" : void 0
48
48
  )}
49
49
  >
50
- <div class="flex flex-col gap-1 w-full overflow-auto">
50
+ <div class="flex flex-col gap-1 w-full overflow-auto natural-break">
51
51
  <slot class="font-bold leading-[130%]"></slot>
52
52
  <slot name="description" class="text-sm leading-[130%]"></slot>
53
53
  </div>
@@ -42,7 +42,7 @@ const RADIO_CLASS_NAME = cva([
42
42
  "group-active:checked:enabled:border-ddt-color-common-brand-press",
43
43
  "disabled:border-ddt-color-common-disabled"
44
44
  ])();
45
- const cvaLabel = cva([], {
45
+ const cvaLabel = cva(["natural-break"], {
46
46
  variants: {
47
47
  disabled: {
48
48
  false: ["text-ddt-color-common-text-primary"],
@@ -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
  }
@@ -192,6 +192,14 @@ let DaikinSlider = class extends DDSFormElement {
192
192
  (_a = this._thumbRef.value) == null ? void 0 : _a.focus();
193
193
  this._handleDrag(event);
194
194
  }
195
+ /**
196
+ * Focuses on the inner slider thumb.
197
+ * @param options focus options
198
+ */
199
+ focus(options) {
200
+ var _a;
201
+ (_a = this._thumbRef.value) == null ? void 0 : _a.focus(options);
202
+ }
195
203
  render() {
196
204
  const progress = this._progress;
197
205
  return html`