@daikin-oss/design-system-web-components 1.2.0 → 1.3.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 (245) hide show
  1. package/CHANGELOG.md +150 -0
  2. package/dist/cjs/base/dds-element.cjs +1 -1
  3. package/dist/cjs/components/accordion-item/daikin-accordion-item.cjs +1 -0
  4. package/dist/cjs/components/avatar/daikin-avatar.cjs +1 -0
  5. package/dist/cjs/components/calendar/daikin-calendar.cjs +2 -0
  6. package/dist/cjs/components/card-header/daikin-card-header.cjs +1 -1
  7. package/dist/cjs/components/carousel/daikin-carousel.cjs +7 -3
  8. package/dist/cjs/components/carousel-item/daikin-carousel-item.cjs +2 -2
  9. package/dist/cjs/components/chip/daikin-chip.cjs +106 -0
  10. package/dist/cjs/components/chip/daikin-chip.d.cts +36 -0
  11. package/dist/cjs/components/chip/index.cjs +7 -0
  12. package/dist/cjs/components/chip/index.d.cts +1 -0
  13. package/dist/cjs/components/combobox/daikin-combobox.cjs +604 -0
  14. package/dist/cjs/components/combobox/daikin-combobox.d.cts +134 -0
  15. package/dist/cjs/components/combobox/index.cjs +8 -0
  16. package/dist/cjs/components/combobox/index.d.cts +1 -0
  17. package/dist/cjs/components/date-picker/daikin-date-picker.cjs +31 -16
  18. package/dist/cjs/components/date-picker/daikin-date-picker.d.cts +2 -1
  19. package/dist/cjs/components/dropdown/daikin-dropdown.cjs +52 -37
  20. package/dist/cjs/components/dropdown/daikin-dropdown.d.cts +4 -3
  21. package/dist/cjs/components/icon/daikin-icon.cjs +117 -12
  22. package/dist/cjs/components/icon/daikin-icon.d.cts +141 -9
  23. package/dist/cjs/components/icon/icons.json.cjs +5 -1
  24. package/dist/cjs/components/icon-button/daikin-icon-button.cjs +12 -2
  25. package/dist/cjs/components/icon-button/daikin-icon-button.d.cts +8 -0
  26. package/dist/cjs/components/index.cjs +36 -0
  27. package/dist/cjs/components/index.d.cts +5 -0
  28. package/dist/cjs/components/input-group/daikin-input-group.cjs +1 -1
  29. package/dist/cjs/components/input-group/daikin-input-group.d.cts +40 -13
  30. package/dist/cjs/components/list-item/daikin-list-item.cjs +2 -2
  31. package/dist/cjs/components/modal-header/daikin-modal-header.cjs +1 -1
  32. package/dist/cjs/components/progress-bar/daikin-progress-bar.cjs +3 -3
  33. package/dist/cjs/components/select/daikin-select.cjs +6 -1
  34. package/dist/cjs/components/tab/daikin-tab.cjs +1 -0
  35. package/dist/cjs/components/table/daikin-table.cjs +33 -12
  36. package/dist/cjs/components/table/daikin-table.d.cts +67 -34
  37. package/dist/cjs/components/table-header-cell/daikin-table-header-cell.cjs +31 -6
  38. package/dist/cjs/components/table-header-cell/daikin-table-header-cell.d.cts +7 -0
  39. package/dist/cjs/components/text-field/daikin-text-field.cjs +191 -56
  40. package/dist/cjs/components/text-field/daikin-text-field.d.cts +32 -3
  41. package/dist/cjs/components/text-field/number-utils.cjs +61 -0
  42. package/dist/cjs/components/text-field/number-utils.d.cts +26 -0
  43. package/dist/cjs/components/text-masked-field/daikin-text-masked-field.cjs +312 -0
  44. package/dist/cjs/components/text-masked-field/daikin-text-masked-field.d.cts +136 -0
  45. package/dist/cjs/components/text-masked-field/index.cjs +7 -0
  46. package/dist/cjs/components/text-masked-field/index.d.cts +1 -0
  47. package/dist/cjs/components/time-picker/daikin-time-picker.cjs +577 -0
  48. package/dist/cjs/components/time-picker/daikin-time-picker.d.cts +165 -0
  49. package/dist/cjs/components/time-picker/index.cjs +17 -0
  50. package/dist/cjs/components/time-picker/index.d.cts +1 -0
  51. package/dist/cjs/components/toast-notification-manager/daikin-toast-notification-manager.d.cts +1 -1
  52. package/dist/cjs/components/tooltip/daikin-tooltip.cjs +12 -2
  53. package/dist/cjs/components/tooltip/daikin-tooltip.d.cts +8 -1
  54. package/dist/cjs/controllers/floating-ui-auto-update.cjs +22 -4
  55. package/dist/cjs/controllers/floating-ui-auto-update.d.cts +12 -0
  56. package/dist/cjs/icon-registry.cjs +170 -0
  57. package/dist/cjs/icon-registry.d.cts +120 -0
  58. package/dist/cjs/index.cjs +39 -0
  59. package/dist/cjs/index.d.cts +1 -0
  60. package/dist/cjs/tailwind.css.cjs +1 -1
  61. package/dist/cjs/utils/notification-common.d.cts +1 -1
  62. package/dist/cjs-dev/base/dds-element.cjs +1 -1
  63. package/dist/cjs-dev/components/accordion-item/daikin-accordion-item.cjs +1 -0
  64. package/dist/cjs-dev/components/avatar/daikin-avatar.cjs +1 -0
  65. package/dist/cjs-dev/components/calendar/daikin-calendar.cjs +2 -0
  66. package/dist/cjs-dev/components/card-header/daikin-card-header.cjs +1 -1
  67. package/dist/cjs-dev/components/carousel/daikin-carousel.cjs +7 -3
  68. package/dist/cjs-dev/components/carousel-item/daikin-carousel-item.cjs +2 -2
  69. package/dist/cjs-dev/components/chip/daikin-chip.cjs +106 -0
  70. package/dist/cjs-dev/components/chip/daikin-chip.d.cts +36 -0
  71. package/dist/cjs-dev/components/chip/index.cjs +7 -0
  72. package/dist/cjs-dev/components/chip/index.d.cts +1 -0
  73. package/dist/cjs-dev/components/combobox/daikin-combobox.cjs +604 -0
  74. package/dist/cjs-dev/components/combobox/daikin-combobox.d.cts +134 -0
  75. package/dist/cjs-dev/components/combobox/index.cjs +8 -0
  76. package/dist/cjs-dev/components/combobox/index.d.cts +1 -0
  77. package/dist/cjs-dev/components/date-picker/daikin-date-picker.cjs +31 -16
  78. package/dist/cjs-dev/components/date-picker/daikin-date-picker.d.cts +2 -1
  79. package/dist/cjs-dev/components/dropdown/daikin-dropdown.cjs +52 -37
  80. package/dist/cjs-dev/components/dropdown/daikin-dropdown.d.cts +4 -3
  81. package/dist/cjs-dev/components/icon/daikin-icon.cjs +141 -16
  82. package/dist/cjs-dev/components/icon/daikin-icon.d.cts +141 -9
  83. package/dist/cjs-dev/components/icon/icons.json.cjs +5 -1
  84. package/dist/cjs-dev/components/icon-button/daikin-icon-button.cjs +12 -2
  85. package/dist/cjs-dev/components/icon-button/daikin-icon-button.d.cts +8 -0
  86. package/dist/cjs-dev/components/index.cjs +36 -0
  87. package/dist/cjs-dev/components/index.d.cts +5 -0
  88. package/dist/cjs-dev/components/input-group/daikin-input-group.cjs +1 -1
  89. package/dist/cjs-dev/components/input-group/daikin-input-group.d.cts +40 -13
  90. package/dist/cjs-dev/components/list-item/daikin-list-item.cjs +2 -2
  91. package/dist/cjs-dev/components/modal-header/daikin-modal-header.cjs +1 -1
  92. package/dist/cjs-dev/components/progress-bar/daikin-progress-bar.cjs +3 -3
  93. package/dist/cjs-dev/components/select/daikin-select.cjs +6 -1
  94. package/dist/cjs-dev/components/tab/daikin-tab.cjs +1 -0
  95. package/dist/cjs-dev/components/table/daikin-table.cjs +36 -15
  96. package/dist/cjs-dev/components/table/daikin-table.d.cts +67 -34
  97. package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.cjs +31 -6
  98. package/dist/cjs-dev/components/table-header-cell/daikin-table-header-cell.d.cts +7 -0
  99. package/dist/cjs-dev/components/text-field/daikin-text-field.cjs +191 -56
  100. package/dist/cjs-dev/components/text-field/daikin-text-field.d.cts +32 -3
  101. package/dist/cjs-dev/components/text-field/number-utils.cjs +64 -0
  102. package/dist/cjs-dev/components/text-field/number-utils.d.cts +26 -0
  103. package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.cjs +312 -0
  104. package/dist/cjs-dev/components/text-masked-field/daikin-text-masked-field.d.cts +136 -0
  105. package/dist/cjs-dev/components/text-masked-field/index.cjs +7 -0
  106. package/dist/cjs-dev/components/text-masked-field/index.d.cts +1 -0
  107. package/dist/cjs-dev/components/time-picker/daikin-time-picker.cjs +589 -0
  108. package/dist/cjs-dev/components/time-picker/daikin-time-picker.d.cts +165 -0
  109. package/dist/cjs-dev/components/time-picker/index.cjs +17 -0
  110. package/dist/cjs-dev/components/time-picker/index.d.cts +1 -0
  111. package/dist/cjs-dev/components/toast-notification-manager/daikin-toast-notification-manager.d.cts +1 -1
  112. package/dist/cjs-dev/components/tooltip/daikin-tooltip.cjs +12 -2
  113. package/dist/cjs-dev/components/tooltip/daikin-tooltip.d.cts +8 -1
  114. package/dist/cjs-dev/controllers/floating-ui-auto-update.cjs +22 -4
  115. package/dist/cjs-dev/controllers/floating-ui-auto-update.d.cts +12 -0
  116. package/dist/cjs-dev/icon-registry.cjs +170 -0
  117. package/dist/cjs-dev/icon-registry.d.cts +120 -0
  118. package/dist/cjs-dev/index.cjs +39 -0
  119. package/dist/cjs-dev/index.d.cts +1 -0
  120. package/dist/cjs-dev/tailwind.css.cjs +1 -1
  121. package/dist/cjs-dev/utils/notification-common.d.cts +1 -1
  122. package/dist/es/base/dds-element.js +1 -1
  123. package/dist/es/components/accordion-item/daikin-accordion-item.js +1 -0
  124. package/dist/es/components/avatar/daikin-avatar.js +1 -0
  125. package/dist/es/components/calendar/daikin-calendar.js +2 -0
  126. package/dist/es/components/card-header/daikin-card-header.js +1 -1
  127. package/dist/es/components/carousel/daikin-carousel.js +7 -3
  128. package/dist/es/components/carousel-item/daikin-carousel-item.js +2 -2
  129. package/dist/es/components/chip/daikin-chip.d.ts +36 -0
  130. package/dist/es/components/chip/daikin-chip.js +107 -0
  131. package/dist/es/components/chip/index.d.ts +1 -0
  132. package/dist/es/components/chip/index.js +4 -0
  133. package/dist/es/components/combobox/daikin-combobox.d.ts +134 -0
  134. package/dist/es/components/combobox/daikin-combobox.js +605 -0
  135. package/dist/es/components/combobox/index.d.ts +1 -0
  136. package/dist/es/components/combobox/index.js +5 -0
  137. package/dist/es/components/date-picker/daikin-date-picker.d.ts +2 -1
  138. package/dist/es/components/date-picker/daikin-date-picker.js +32 -17
  139. package/dist/es/components/dropdown/daikin-dropdown.d.ts +4 -3
  140. package/dist/es/components/dropdown/daikin-dropdown.js +52 -37
  141. package/dist/es/components/icon/daikin-icon.d.ts +141 -9
  142. package/dist/es/components/icon/daikin-icon.js +118 -13
  143. package/dist/es/components/icon/icons.json.js +4 -0
  144. package/dist/es/components/icon-button/daikin-icon-button.d.ts +8 -0
  145. package/dist/es/components/icon-button/daikin-icon-button.js +12 -2
  146. package/dist/es/components/index.d.ts +5 -0
  147. package/dist/es/components/index.js +22 -1
  148. package/dist/es/components/input-group/daikin-input-group.d.ts +40 -13
  149. package/dist/es/components/input-group/daikin-input-group.js +1 -1
  150. package/dist/es/components/list-item/daikin-list-item.js +2 -2
  151. package/dist/es/components/modal-header/daikin-modal-header.js +1 -1
  152. package/dist/es/components/progress-bar/daikin-progress-bar.js +3 -3
  153. package/dist/es/components/select/daikin-select.js +6 -1
  154. package/dist/es/components/tab/daikin-tab.js +1 -0
  155. package/dist/es/components/table/daikin-table.d.ts +67 -34
  156. package/dist/es/components/table/daikin-table.js +33 -12
  157. package/dist/es/components/table-header-cell/daikin-table-header-cell.d.ts +7 -0
  158. package/dist/es/components/table-header-cell/daikin-table-header-cell.js +31 -6
  159. package/dist/es/components/text-field/daikin-text-field.d.ts +32 -3
  160. package/dist/es/components/text-field/daikin-text-field.js +191 -56
  161. package/dist/es/components/text-field/number-utils.d.ts +26 -0
  162. package/dist/es/components/text-field/number-utils.js +61 -0
  163. package/dist/es/components/text-masked-field/daikin-text-masked-field.d.ts +136 -0
  164. package/dist/es/components/text-masked-field/daikin-text-masked-field.js +313 -0
  165. package/dist/es/components/text-masked-field/index.d.ts +1 -0
  166. package/dist/es/components/text-masked-field/index.js +4 -0
  167. package/dist/es/components/time-picker/daikin-time-picker.d.ts +165 -0
  168. package/dist/es/components/time-picker/daikin-time-picker.js +578 -0
  169. package/dist/es/components/time-picker/index.d.ts +1 -0
  170. package/dist/es/components/time-picker/index.js +14 -0
  171. package/dist/es/components/toast-notification-manager/daikin-toast-notification-manager.d.ts +1 -1
  172. package/dist/es/components/tooltip/daikin-tooltip.d.ts +8 -1
  173. package/dist/es/components/tooltip/daikin-tooltip.js +12 -2
  174. package/dist/es/controllers/floating-ui-auto-update.d.ts +12 -0
  175. package/dist/es/controllers/floating-ui-auto-update.js +22 -4
  176. package/dist/es/icon-registry.d.ts +120 -0
  177. package/dist/es/icon-registry.js +170 -0
  178. package/dist/es/index.d.ts +1 -0
  179. package/dist/es/index.js +25 -1
  180. package/dist/es/tailwind.css.js +1 -1
  181. package/dist/es/utils/notification-common.d.ts +1 -1
  182. package/dist/es-dev/base/dds-element.js +1 -1
  183. package/dist/es-dev/components/accordion-item/daikin-accordion-item.js +1 -0
  184. package/dist/es-dev/components/avatar/daikin-avatar.js +1 -0
  185. package/dist/es-dev/components/calendar/daikin-calendar.js +2 -0
  186. package/dist/es-dev/components/card-header/daikin-card-header.js +1 -1
  187. package/dist/es-dev/components/carousel/daikin-carousel.js +7 -3
  188. package/dist/es-dev/components/carousel-item/daikin-carousel-item.js +2 -2
  189. package/dist/es-dev/components/chip/daikin-chip.d.ts +36 -0
  190. package/dist/es-dev/components/chip/daikin-chip.js +107 -0
  191. package/dist/es-dev/components/chip/index.d.ts +1 -0
  192. package/dist/es-dev/components/chip/index.js +4 -0
  193. package/dist/es-dev/components/combobox/daikin-combobox.d.ts +134 -0
  194. package/dist/es-dev/components/combobox/daikin-combobox.js +605 -0
  195. package/dist/es-dev/components/combobox/index.d.ts +1 -0
  196. package/dist/es-dev/components/combobox/index.js +5 -0
  197. package/dist/es-dev/components/date-picker/daikin-date-picker.d.ts +2 -1
  198. package/dist/es-dev/components/date-picker/daikin-date-picker.js +32 -17
  199. package/dist/es-dev/components/dropdown/daikin-dropdown.d.ts +4 -3
  200. package/dist/es-dev/components/dropdown/daikin-dropdown.js +52 -37
  201. package/dist/es-dev/components/icon/daikin-icon.d.ts +141 -9
  202. package/dist/es-dev/components/icon/daikin-icon.js +142 -17
  203. package/dist/es-dev/components/icon/icons.json.js +4 -0
  204. package/dist/es-dev/components/icon-button/daikin-icon-button.d.ts +8 -0
  205. package/dist/es-dev/components/icon-button/daikin-icon-button.js +12 -2
  206. package/dist/es-dev/components/index.d.ts +5 -0
  207. package/dist/es-dev/components/index.js +22 -1
  208. package/dist/es-dev/components/input-group/daikin-input-group.d.ts +40 -13
  209. package/dist/es-dev/components/input-group/daikin-input-group.js +1 -1
  210. package/dist/es-dev/components/list-item/daikin-list-item.js +2 -2
  211. package/dist/es-dev/components/modal-header/daikin-modal-header.js +1 -1
  212. package/dist/es-dev/components/progress-bar/daikin-progress-bar.js +3 -3
  213. package/dist/es-dev/components/select/daikin-select.js +6 -1
  214. package/dist/es-dev/components/tab/daikin-tab.js +1 -0
  215. package/dist/es-dev/components/table/daikin-table.d.ts +67 -34
  216. package/dist/es-dev/components/table/daikin-table.js +36 -15
  217. package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.d.ts +7 -0
  218. package/dist/es-dev/components/table-header-cell/daikin-table-header-cell.js +31 -6
  219. package/dist/es-dev/components/text-field/daikin-text-field.d.ts +32 -3
  220. package/dist/es-dev/components/text-field/daikin-text-field.js +191 -56
  221. package/dist/es-dev/components/text-field/number-utils.d.ts +26 -0
  222. package/dist/es-dev/components/text-field/number-utils.js +64 -0
  223. package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.d.ts +136 -0
  224. package/dist/es-dev/components/text-masked-field/daikin-text-masked-field.js +313 -0
  225. package/dist/es-dev/components/text-masked-field/index.d.ts +1 -0
  226. package/dist/es-dev/components/text-masked-field/index.js +4 -0
  227. package/dist/es-dev/components/time-picker/daikin-time-picker.d.ts +165 -0
  228. package/dist/es-dev/components/time-picker/daikin-time-picker.js +590 -0
  229. package/dist/es-dev/components/time-picker/index.d.ts +1 -0
  230. package/dist/es-dev/components/time-picker/index.js +14 -0
  231. package/dist/es-dev/components/toast-notification-manager/daikin-toast-notification-manager.d.ts +1 -1
  232. package/dist/es-dev/components/tooltip/daikin-tooltip.d.ts +8 -1
  233. package/dist/es-dev/components/tooltip/daikin-tooltip.js +12 -2
  234. package/dist/es-dev/controllers/floating-ui-auto-update.d.ts +12 -0
  235. package/dist/es-dev/controllers/floating-ui-auto-update.js +22 -4
  236. package/dist/es-dev/icon-registry.d.ts +120 -0
  237. package/dist/es-dev/icon-registry.js +170 -0
  238. package/dist/es-dev/index.d.ts +1 -0
  239. package/dist/es-dev/index.js +25 -1
  240. package/dist/es-dev/tailwind.css.js +1 -1
  241. package/dist/es-dev/utils/notification-common.d.ts +1 -1
  242. package/icons/number-minus.svg +5 -0
  243. package/icons/number-plus.svg +5 -0
  244. package/package.json +14 -4
  245. package/icons/dropdown-chevron-down.svg +0 -3
@@ -13,7 +13,19 @@ export declare class FloatingUIAutoUpdateController<T extends ReactiveController
13
13
  private readonly _isOptionsUpdated?;
14
14
  private _floatingElement;
15
15
  private _referenceElement;
16
+ /**
17
+ * Context information to be passed with floating-ready event
18
+ */
19
+ private _triggerContext;
16
20
  constructor(_host: T, _isOptionsUpdated?: ((current: Partial<ComputePositionConfig>, previous: Partial<ComputePositionConfig>) => boolean) | undefined);
21
+ /**
22
+ * Set context information that will be included in the floating-ready event
23
+ */
24
+ setTriggerContext(context: Record<string, unknown>): void;
25
+ /**
26
+ * Clear the trigger context
27
+ */
28
+ clearTriggerContext(): void;
17
29
  private readonly _refCallbackFloating;
18
30
  private readonly _refCallbackReference;
19
31
  get floatingElement(): HTMLElement | undefined;
@@ -3,7 +3,7 @@ import { nothing } from "lit";
3
3
  import { ref } from "lit/directives/ref.js";
4
4
  import { createControllerDirective } from "./helpers/controller-directive.js";
5
5
  const floatingUIAutoUpdateDirective = createControllerDirective(
6
- (referenceElement, floatingElement, options) => {
6
+ (referenceElement, floatingElement, options, _isOptionsUpdated, triggerContext) => {
7
7
  const cleanupAutoUpdate = autoUpdate(
8
8
  referenceElement,
9
9
  floatingElement,
@@ -16,7 +16,10 @@ const floatingUIAutoUpdateDirective = createControllerDirective(
16
16
  floatingElement.style.setProperty("--floating-y", `${y}px`);
17
17
  floatingElement.setAttribute("data-floating-ready", "");
18
18
  if (isFirst) {
19
- floatingElement.dispatchEvent(new Event("floating-ready"));
19
+ const event = new CustomEvent("floating-ready", {
20
+ detail: triggerContext
21
+ });
22
+ floatingElement.dispatchEvent(event);
20
23
  }
21
24
  }).catch((error) => {
22
25
  {
@@ -41,7 +44,8 @@ const floatingUIAutoUpdateDirective = createControllerDirective(
41
44
  current[0] !== previous[0] || // Check if the floating element is changed
42
45
  current[1] !== previous[1] || // Check if the options is changed.
43
46
  // If option comparison function (current[3]) is provided, use it to compare options. Otherwise, use `!==` to compare options.
44
- (((_a = current[3]) == null ? void 0 : _a.call(current, current[2], previous[2])) ?? current[2] !== previous[2])
47
+ (((_a = current[3]) == null ? void 0 : _a.call(current, current[2], previous[2])) ?? current[2] !== previous[2]) || // Check if the trigger context is changed
48
+ current[4] !== previous[4]
45
49
  );
46
50
  }
47
51
  );
@@ -49,6 +53,7 @@ class FloatingUIAutoUpdateController {
49
53
  constructor(_host, _isOptionsUpdated) {
50
54
  this._host = _host;
51
55
  this._isOptionsUpdated = _isOptionsUpdated;
56
+ this._triggerContext = {};
52
57
  this._refCallbackFloating = (element) => {
53
58
  this._floatingElement = element;
54
59
  this._host.requestUpdate();
@@ -59,6 +64,18 @@ class FloatingUIAutoUpdateController {
59
64
  };
60
65
  _host.addController(this);
61
66
  }
67
+ /**
68
+ * Set context information that will be included in the floating-ready event
69
+ */
70
+ setTriggerContext(context) {
71
+ this._triggerContext = { ...context };
72
+ }
73
+ /**
74
+ * Clear the trigger context
75
+ */
76
+ clearTriggerContext() {
77
+ this._triggerContext = {};
78
+ }
62
79
  get floatingElement() {
63
80
  return this._floatingElement;
64
81
  }
@@ -79,7 +96,8 @@ class FloatingUIAutoUpdateController {
79
96
  this._referenceElement,
80
97
  this._floatingElement,
81
98
  options,
82
- this._isOptionsUpdated
99
+ this._isOptionsUpdated,
100
+ this._triggerContext
83
101
  );
84
102
  }
85
103
  }
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Icon data structure containing SVG information
3
+ */
4
+ export interface IconData {
5
+ /** SVG content as a string */
6
+ svg: string;
7
+ /** Default color for the icon */
8
+ defaultColor?: string | null;
9
+ /**
10
+ * Determines how the SVG is rendered.
11
+ * This affects the styling and behavior of the icon.
12
+ *
13
+ * - "mask": Uses the SVG as a CSS mask, allowing for color customization. Use this for monochrome icons.
14
+ * - "background": Uses the SVG as a CSS background image. Use this for colorful icons with no complex styling.
15
+ * - "inline": Renders the SVG inline, allowing for more complex styling.
16
+ * **Be cautious with this mode as it can introduce security risks if the SVG content is not trusted.**
17
+ *
18
+ * @default "mask"
19
+ */
20
+ mode?: "mask" | "background" | "inline";
21
+ }
22
+ /**
23
+ * Direct icon registration configuration
24
+ */
25
+ export interface DirectIconRegistration {
26
+ /** Icon name */
27
+ name: string;
28
+ /** SVG content or icon data */
29
+ svg: string | IconData;
30
+ }
31
+ /**
32
+ * Dynamic icon registration configuration using regex pattern matching
33
+ */
34
+ export interface DynamicIconRegistration {
35
+ /** Regular expression to match icon names */
36
+ match: RegExp;
37
+ /** Function to fetch SVG content for matched names */
38
+ fetch: (name: string) => Promise<string | IconData> | string | IconData;
39
+ }
40
+ /**
41
+ * Icon registration configuration
42
+ */
43
+ export type IconRegistration = DirectIconRegistration | DynamicIconRegistration;
44
+ /**
45
+ * Icon registry class that manages icon registration and retrieval
46
+ */
47
+ export declare class IconRegistry {
48
+ #private;
49
+ /**
50
+ * Get the singleton instance of IconRegistry
51
+ */
52
+ static getGlobalInstance(): IconRegistry;
53
+ /**
54
+ * Register an icon or dynamic icon fetcher
55
+ * @param registration Icon registration configuration
56
+ *
57
+ * @example
58
+ * // Direct registration
59
+ * registry.register({ name: "custom-icon", svg: "<svg>...</svg>" });
60
+ *
61
+ * // Dynamic registration
62
+ * registry.register({
63
+ * match: /^custom-/,
64
+ * fetch: async (name) => {
65
+ * const response = await fetch(`/icons/${name}.svg`);
66
+ * return response.text();
67
+ * }
68
+ * });
69
+ */
70
+ register(registration: IconRegistration): void;
71
+ /**
72
+ * Get an icon by name
73
+ * @param name Icon name
74
+ * @returns Promise that resolves to IconData or null if not found
75
+ */
76
+ getIcon(name: string): Promise<IconData | null>;
77
+ /**
78
+ * Check if an icon is registered (either directly or through dynamic registration)
79
+ * @param name Icon name
80
+ * @returns true if icon is available
81
+ */
82
+ hasIcon(name: string): boolean;
83
+ /**
84
+ * Get all directly registered icon names
85
+ * @returns Array of icon names
86
+ */
87
+ getRegisteredIconNames(): string[];
88
+ /**
89
+ * Get all dynamic registration patterns
90
+ * @returns Array of regex patterns
91
+ */
92
+ getDynamicPatterns(): RegExp[];
93
+ /**
94
+ * Clear all registrations and cache
95
+ */
96
+ clear(): void;
97
+ /**
98
+ * Remove a specific icon registration
99
+ * @param name Icon name to remove
100
+ */
101
+ unregister(name: string): boolean;
102
+ /**
103
+ * Fetch icon from dynamic registration
104
+ * @param registration Dynamic registration
105
+ * @param name Icon name
106
+ * @returns Promise that resolves to IconData or null
107
+ */
108
+ private fetchDynamicIcon;
109
+ /**
110
+ * Perform the actual dynamic fetch
111
+ * @param registration Dynamic registration
112
+ * @param name Icon name
113
+ * @returns Promise that resolves to IconData or null
114
+ */
115
+ private performDynamicFetch;
116
+ }
117
+ /**
118
+ * Global icon registry instance
119
+ */
120
+ export declare const iconRegistry: IconRegistry;
@@ -0,0 +1,170 @@
1
+ var __typeError = (msg) => {
2
+ throw TypeError(msg);
3
+ };
4
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
5
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
6
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
7
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
8
+ var _instance, _icons, _dynamicRegistrations, _cache;
9
+ function isDynamicRegistration(registration) {
10
+ return "match" in registration && "fetch" in registration;
11
+ }
12
+ function isDirectRegistration(registration) {
13
+ return "name" in registration && "svg" in registration;
14
+ }
15
+ function normalizeIconData(svg) {
16
+ if (typeof svg === "string") {
17
+ return { mode: "mask", svg };
18
+ }
19
+ return { mode: "mask", ...svg };
20
+ }
21
+ const _IconRegistry = class _IconRegistry {
22
+ constructor() {
23
+ /** Map of registered icons by name */
24
+ __privateAdd(this, _icons, /* @__PURE__ */ new Map());
25
+ /** Array of dynamic icon registrations */
26
+ __privateAdd(this, _dynamicRegistrations, []);
27
+ /** Cache for dynamically fetched icons */
28
+ __privateAdd(this, _cache, /* @__PURE__ */ new Map());
29
+ }
30
+ /**
31
+ * Get the singleton instance of IconRegistry
32
+ */
33
+ static getGlobalInstance() {
34
+ const instance = __privateGet(_IconRegistry, _instance) ?? __privateSet(_IconRegistry, _instance, new _IconRegistry());
35
+ return instance;
36
+ }
37
+ /**
38
+ * Register an icon or dynamic icon fetcher
39
+ * @param registration Icon registration configuration
40
+ *
41
+ * @example
42
+ * // Direct registration
43
+ * registry.register({ name: "custom-icon", svg: "<svg>...</svg>" });
44
+ *
45
+ * // Dynamic registration
46
+ * registry.register({
47
+ * match: /^custom-/,
48
+ * fetch: async (name) => {
49
+ * const response = await fetch(`/icons/${name}.svg`);
50
+ * return response.text();
51
+ * }
52
+ * });
53
+ */
54
+ register(registration) {
55
+ if (isDirectRegistration(registration)) {
56
+ const iconData = normalizeIconData(registration.svg);
57
+ __privateGet(this, _icons).set(registration.name, iconData);
58
+ } else if (isDynamicRegistration(registration)) {
59
+ __privateGet(this, _dynamicRegistrations).push(registration);
60
+ }
61
+ }
62
+ /**
63
+ * Get an icon by name
64
+ * @param name Icon name
65
+ * @returns Promise that resolves to IconData or null if not found
66
+ */
67
+ async getIcon(name) {
68
+ const registered = __privateGet(this, _icons).get(name);
69
+ if (registered) {
70
+ return registered;
71
+ }
72
+ for (const registration of __privateGet(this, _dynamicRegistrations)) {
73
+ if (registration.match.test(name)) {
74
+ return this.fetchDynamicIcon(registration, name);
75
+ }
76
+ }
77
+ return null;
78
+ }
79
+ /**
80
+ * Check if an icon is registered (either directly or through dynamic registration)
81
+ * @param name Icon name
82
+ * @returns true if icon is available
83
+ */
84
+ hasIcon(name) {
85
+ if (__privateGet(this, _icons).has(name)) {
86
+ return true;
87
+ }
88
+ return __privateGet(this, _dynamicRegistrations).some(
89
+ (registration) => registration.match.test(name)
90
+ );
91
+ }
92
+ /**
93
+ * Get all directly registered icon names
94
+ * @returns Array of icon names
95
+ */
96
+ getRegisteredIconNames() {
97
+ return Array.from(__privateGet(this, _icons).keys());
98
+ }
99
+ /**
100
+ * Get all dynamic registration patterns
101
+ * @returns Array of regex patterns
102
+ */
103
+ getDynamicPatterns() {
104
+ return __privateGet(this, _dynamicRegistrations).map((reg) => reg.match);
105
+ }
106
+ /**
107
+ * Clear all registrations and cache
108
+ */
109
+ clear() {
110
+ __privateGet(this, _icons).clear();
111
+ __privateGet(this, _dynamicRegistrations).length = 0;
112
+ __privateGet(this, _cache).clear();
113
+ }
114
+ /**
115
+ * Remove a specific icon registration
116
+ * @param name Icon name to remove
117
+ */
118
+ unregister(name) {
119
+ const existed = __privateGet(this, _icons).has(name);
120
+ __privateGet(this, _icons).delete(name);
121
+ return existed;
122
+ }
123
+ /**
124
+ * Fetch icon from dynamic registration
125
+ * @param registration Dynamic registration
126
+ * @param name Icon name
127
+ * @returns Promise that resolves to IconData or null
128
+ */
129
+ async fetchDynamicIcon(registration, name) {
130
+ const cacheKey = `${registration.match.source}\0${name}`;
131
+ const cached = __privateGet(this, _cache).get(cacheKey);
132
+ if (cached) {
133
+ return cached;
134
+ }
135
+ const fetchPromise = this.performDynamicFetch(registration, name).then(
136
+ (result) => {
137
+ __privateGet(this, _cache).set(cacheKey, result);
138
+ return result;
139
+ }
140
+ );
141
+ __privateGet(this, _cache).set(cacheKey, fetchPromise);
142
+ return fetchPromise;
143
+ }
144
+ /**
145
+ * Perform the actual dynamic fetch
146
+ * @param registration Dynamic registration
147
+ * @param name Icon name
148
+ * @returns Promise that resolves to IconData or null
149
+ */
150
+ async performDynamicFetch(registration, name) {
151
+ try {
152
+ const result = await registration.fetch(name);
153
+ return normalizeIconData(result);
154
+ } catch (error) {
155
+ console.warn(`Failed to fetch dynamic icon "${name}":`, error);
156
+ return null;
157
+ }
158
+ }
159
+ };
160
+ _instance = new WeakMap();
161
+ _icons = new WeakMap();
162
+ _dynamicRegistrations = new WeakMap();
163
+ _cache = new WeakMap();
164
+ __privateAdd(_IconRegistry, _instance);
165
+ let IconRegistry = _IconRegistry;
166
+ const iconRegistry = IconRegistry.getGlobalInstance();
167
+ export {
168
+ IconRegistry,
169
+ iconRegistry
170
+ };
@@ -1,2 +1,3 @@
1
1
  export * from "./components/index.js";
2
+ export * from "./icon-registry.js";
2
3
  export * from "./lit-analyzer-types.js";
@@ -12,6 +12,8 @@ import { DaikinCarousel } from "./components/carousel/daikin-carousel.js";
12
12
  import { DaikinCarouselItem } from "./components/carousel-item/daikin-carousel-item.js";
13
13
  import { DaikinCheckbox } from "./components/checkbox/daikin-checkbox.js";
14
14
  import { DaikinCheckboxGroup } from "./components/checkbox-group/daikin-checkbox-group.js";
15
+ import { DaikinChip } from "./components/chip/daikin-chip.js";
16
+ import { DaikinCombobox, defaultFilterFn } from "./components/combobox/daikin-combobox.js";
15
17
  import { DaikinDatePicker } from "./components/date-picker/daikin-date-picker.js";
16
18
  import { DaikinDropdown } from "./components/dropdown/daikin-dropdown.js";
17
19
  import { DaikinDropdownItem } from "./components/dropdown-item/daikin-dropdown-item.js";
@@ -33,6 +35,7 @@ import { DaikinProgressBar } from "./components/progress-bar/daikin-progress-bar
33
35
  import { DaikinProgressIndicator } from "./components/progress-indicator/daikin-progress-indicator.js";
34
36
  import { DaikinProgressIndicatorItem } from "./components/progress-indicator-item/daikin-progress-indicator-item.js";
35
37
  import { DaikinRadio } from "./components/radio/daikin-radio.js";
38
+ import { DaikinRadioGroup } from "./components/radio-group/daikin-radio-group.js";
36
39
  import { DaikinSelect } from "./components/select/daikin-select.js";
37
40
  import { DaikinSlider } from "./components/slider/daikin-slider.js";
38
41
  import { DaikinTab } from "./components/tab/daikin-tab.js";
@@ -43,6 +46,8 @@ import { DaikinTableHeaderCell } from "./components/table-header-cell/daikin-tab
43
46
  import { DaikinTabs } from "./components/tabs/daikin-tabs.js";
44
47
  import { DaikinTextArea } from "./components/text-area/daikin-text-area.js";
45
48
  import { DaikinTextField } from "./components/text-field/daikin-text-field.js";
49
+ import { DaikinTextMaskedField } from "./components/text-masked-field/daikin-text-masked-field.js";
50
+ import { DaikinTimePicker, calcDigitInput, formatPartsForUI, formatTimeForUI, from24HourFormat, getTimeItemInSelection, isTimeOutOfRange, isValidValueTime, parsePartsFromUIValue, to24HourFormat, tryParseTimeFromUIValue } from "./components/time-picker/daikin-time-picker.js";
46
51
  import { DaikinToastNotification } from "./components/toast-notification/daikin-toast-notification.js";
47
52
  import { DaikinToastNotificationManager } from "./components/toast-notification-manager/daikin-toast-notification-manager.js";
48
53
  import { DaikinToggle } from "./components/toggle/daikin-toggle.js";
@@ -50,6 +55,7 @@ import { DaikinTooltip } from "./components/tooltip/daikin-tooltip.js";
50
55
  import { DaikinTree } from "./components/tree/daikin-tree.js";
51
56
  import { DaikinTreeItem, cvaTreeChildren } from "./components/tree-item/daikin-tree-item.js";
52
57
  import { DaikinTreeSection } from "./components/tree-section/daikin-tree-section.js";
58
+ import { IconRegistry, iconRegistry } from "./icon-registry.js";
53
59
  export {
54
60
  DaikinAccordion,
55
61
  DaikinAccordionItem,
@@ -65,6 +71,8 @@ export {
65
71
  DaikinCarouselItem,
66
72
  DaikinCheckbox,
67
73
  DaikinCheckboxGroup,
74
+ DaikinChip,
75
+ DaikinCombobox,
68
76
  DaikinDatePicker,
69
77
  DaikinDropdown,
70
78
  DaikinDropdownItem,
@@ -86,6 +94,7 @@ export {
86
94
  DaikinProgressIndicator,
87
95
  DaikinProgressIndicatorItem,
88
96
  DaikinRadio,
97
+ DaikinRadioGroup,
89
98
  DaikinSelect,
90
99
  DaikinSlider,
91
100
  DaikinTab,
@@ -96,6 +105,8 @@ export {
96
105
  DaikinTabs,
97
106
  DaikinTextArea,
98
107
  DaikinTextField,
108
+ DaikinTextMaskedField,
109
+ DaikinTimePicker,
99
110
  DaikinToastNotification,
100
111
  DaikinToastNotificationManager,
101
112
  DaikinToggle,
@@ -103,6 +114,19 @@ export {
103
114
  DaikinTree,
104
115
  DaikinTreeItem,
105
116
  DaikinTreeSection,
117
+ IconRegistry,
118
+ calcDigitInput,
106
119
  cvaTreeChildren,
107
- iconList
120
+ defaultFilterFn,
121
+ formatPartsForUI,
122
+ formatTimeForUI,
123
+ from24HourFormat,
124
+ getTimeItemInSelection,
125
+ iconList,
126
+ iconRegistry,
127
+ isTimeOutOfRange,
128
+ isValidValueTime,
129
+ parsePartsFromUIValue,
130
+ to24HourFormat,
131
+ tryParseTimeFromUIValue
108
132
  };