@nanahoshi/mona-ui 0.24.11 → 0.25.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/README.md +9 -0
  2. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -10
  3. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +37 -20
  4. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +239 -47
  5. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +184 -31
  6. package/fesm2022/nanahoshi-mona-ui-button.mjs +47 -11
  7. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +17 -13
  8. package/fesm2022/nanahoshi-mona-ui-card.mjs +54 -30
  9. package/fesm2022/nanahoshi-mona-ui-chart.mjs +27 -22
  10. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +112 -31
  11. package/fesm2022/nanahoshi-mona-ui-chip.mjs +131 -89
  12. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +59 -19
  13. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +118 -41
  14. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +243 -212
  15. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +155 -86
  16. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +161 -131
  17. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +12 -11
  18. package/fesm2022/nanahoshi-mona-ui-common.mjs +18 -1
  19. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +10 -9
  20. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +10 -9
  21. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +2 -2
  22. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +2 -2
  23. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +10 -9
  24. package/fesm2022/nanahoshi-mona-ui-editor.mjs +25 -24
  25. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +202 -33
  26. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +31 -10
  27. package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
  28. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-DhKLnW06.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs} +2 -2
  29. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-voGbKOiB.mjs → nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs} +4 -4
  30. package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-HQ1Kv6R9.mjs → nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs} +7 -7
  31. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-PNLJFcuH.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs} +4 -4
  32. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BO19AVwC.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs} +27 -29
  33. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  34. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +39 -4
  35. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +2 -2
  36. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +1 -1
  37. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +5 -5
  38. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +7 -7
  39. package/fesm2022/nanahoshi-mona-ui-internal.mjs +183 -47
  40. package/fesm2022/nanahoshi-mona-ui-label.mjs +111 -15
  41. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1 -1
  42. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1 -1
  43. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +33 -4
  44. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +33 -4
  45. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +33 -4
  46. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +33 -4
  47. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +33 -4
  48. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +33 -4
  49. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +33 -4
  50. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +33 -4
  51. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +33 -4
  52. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +33 -4
  53. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +33 -4
  54. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +33 -4
  55. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +33 -4
  56. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +2 -2
  57. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +14 -13
  58. package/fesm2022/nanahoshi-mona-ui-notification.mjs +1 -1
  59. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +13 -12
  60. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +192 -56
  61. package/fesm2022/nanahoshi-mona-ui-pager.mjs +1 -1
  62. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +3 -1
  63. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2 -2
  64. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +60 -29
  65. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +334 -37
  66. package/fesm2022/nanahoshi-mona-ui-rating.mjs +84 -30
  67. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +274 -108
  68. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +127 -37
  69. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +2 -2
  70. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +595 -170
  71. package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +3 -2
  72. package/fesm2022/nanahoshi-mona-ui-slider.mjs +323 -166
  73. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +167 -82
  74. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +3 -3
  75. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +273 -165
  76. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +219 -132
  77. package/fesm2022/nanahoshi-mona-ui-switch.mjs +84 -32
  78. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +337 -116
  79. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +10 -12
  80. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +21 -8
  81. package/fesm2022/nanahoshi-mona-ui-theme.mjs +444 -88
  82. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +10 -9
  83. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +15 -14
  84. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +17 -3
  85. package/fesm2022/nanahoshi-mona-ui-window.mjs +1 -1
  86. package/i18n/catalogs/en-US.messages.json +33 -4
  87. package/locales/ar-sa/ar-sa.messages.json +33 -4
  88. package/locales/de-de/de-de.messages.json +33 -4
  89. package/locales/es-es/es-es.messages.json +33 -4
  90. package/locales/fr-fr/fr-fr.messages.json +33 -4
  91. package/locales/id-id/id-id.messages.json +33 -4
  92. package/locales/it-it/it-it.messages.json +33 -4
  93. package/locales/ja-jp/ja-jp.messages.json +33 -4
  94. package/locales/ko-kr/ko-kr.messages.json +33 -4
  95. package/locales/pt-br/pt-br.messages.json +33 -4
  96. package/locales/ru-ru/ru-ru.messages.json +33 -4
  97. package/locales/tr-tr/tr-tr.messages.json +33 -4
  98. package/locales/zh-cn/zh-cn.messages.json +33 -4
  99. package/locales/zh-tw/zh-tw.messages.json +33 -4
  100. package/package.json +2 -1
  101. package/styles.css +156 -0
  102. package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -0
  103. package/types/nanahoshi-mona-ui-avatar.d.ts +18 -11
  104. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +62 -14
  105. package/types/nanahoshi-mona-ui-button-group.d.ts +86 -16
  106. package/types/nanahoshi-mona-ui-button.d.ts +26 -3
  107. package/types/nanahoshi-mona-ui-calendar.d.ts +1 -0
  108. package/types/nanahoshi-mona-ui-card.d.ts +22 -6
  109. package/types/nanahoshi-mona-ui-check-box.d.ts +54 -13
  110. package/types/nanahoshi-mona-ui-chip.d.ts +31 -18
  111. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +21 -5
  112. package/types/nanahoshi-mona-ui-collapsible.d.ts +20 -11
  113. package/types/nanahoshi-mona-ui-color-gradient.d.ts +62 -36
  114. package/types/nanahoshi-mona-ui-color-palette.d.ts +65 -27
  115. package/types/nanahoshi-mona-ui-color-picker.d.ts +64 -23
  116. package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -0
  117. package/types/nanahoshi-mona-ui-common.d.ts +28 -2
  118. package/types/nanahoshi-mona-ui-date-picker.d.ts +1 -0
  119. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +1 -0
  120. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +1 -0
  121. package/types/nanahoshi-mona-ui-editor.d.ts +1 -0
  122. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +51 -7
  123. package/types/nanahoshi-mona-ui-fieldset.d.ts +18 -4
  124. package/types/nanahoshi-mona-ui-grid.d.ts +0 -1
  125. package/types/nanahoshi-mona-ui-i18n.d.ts +38 -3
  126. package/types/nanahoshi-mona-ui-internal.d.ts +95 -14
  127. package/types/nanahoshi-mona-ui-label.d.ts +17 -2
  128. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +29 -0
  129. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +29 -0
  130. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +29 -0
  131. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +29 -0
  132. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +29 -0
  133. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +29 -0
  134. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +29 -0
  135. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +29 -0
  136. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +29 -0
  137. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +29 -0
  138. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +29 -0
  139. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +29 -0
  140. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +29 -0
  141. package/types/nanahoshi-mona-ui-multi-select.d.ts +1 -0
  142. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -0
  143. package/types/nanahoshi-mona-ui-otp-input.d.ts +49 -12
  144. package/types/nanahoshi-mona-ui-placeholder.d.ts +2 -1
  145. package/types/nanahoshi-mona-ui-progress-bar.d.ts +21 -9
  146. package/types/nanahoshi-mona-ui-radio-button.d.ts +165 -20
  147. package/types/nanahoshi-mona-ui-rating.d.ts +21 -6
  148. package/types/nanahoshi-mona-ui-scroll-view.d.ts +59 -27
  149. package/types/nanahoshi-mona-ui-segmented.d.ts +52 -24
  150. package/types/nanahoshi-mona-ui-sidebar.d.ts +104 -41
  151. package/types/nanahoshi-mona-ui-skeleton.d.ts +1 -1
  152. package/types/nanahoshi-mona-ui-slider.d.ts +99 -35
  153. package/types/nanahoshi-mona-ui-spinner.d.ts +9 -5
  154. package/types/nanahoshi-mona-ui-splitter.d.ts +31 -10
  155. package/types/nanahoshi-mona-ui-stepper.d.ts +58 -12
  156. package/types/nanahoshi-mona-ui-switch.d.ts +32 -10
  157. package/types/nanahoshi-mona-ui-tabs.d.ts +75 -20
  158. package/types/nanahoshi-mona-ui-text-area.d.ts +7 -7
  159. package/types/nanahoshi-mona-ui-text-box.d.ts +2 -0
  160. package/types/nanahoshi-mona-ui-theme.d.ts +392 -15
  161. package/types/nanahoshi-mona-ui-time-picker.d.ts +1 -0
  162. package/types/nanahoshi-mona-ui-time-selector.d.ts +1 -0
  163. package/types/nanahoshi-mona-ui-tooltip.d.ts +7 -1
@@ -1,9 +1,17 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, computed, signal, input, output, model, Component } from '@angular/core';
2
+ import { inject, DOCUMENT, ElementRef, computed, signal, input, booleanAttribute, output, model, Component } from '@angular/core';
3
3
  import { injectComponentDirection, MonaI18nService } from '@nanahoshi/mona-ui/i18n';
4
- import { count } from '@mirei/ts-collections';
4
+ import { injectLabelAssociation, injectEffectiveDisabled, colorKey } from '@nanahoshi/mona-ui/internal';
5
5
  import { cva } from 'class-variance-authority';
6
6
 
7
+ // Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
8
+ // Edit the JSON file and run `npm run generate:locale-catalogs`.
9
+ const COLOR_PALETTE_DEFAULT_MESSAGES = {
10
+ color: (color) => `Color ${color}`,
11
+ colorPalette: "Color palette",
12
+ namedColor: (name, color) => `${name}, ${color}`
13
+ };
14
+
7
15
  const colorPaletteBaseThemeVariants = cva(`
8
16
  grid gap-0.125 p-0.0625
9
17
  data-[disabled='true']:pointer-events-none
@@ -17,7 +25,8 @@ const colorPaletteBaseThemeVariants = cva(`
17
25
  `);
18
26
  const colorPaletteItemThemeVariants = cva(`
19
27
  cursor-pointer
20
- transition-transform
28
+ forced-color-adjust-none
29
+ transition-transform motion-reduce:transition-none
21
30
  data-[readonly='true']:cursor-default
22
31
  data-[selected='true']:scale-90
23
32
  data-[selected='true']:border-2 data-[selected='true']:border-black/90
@@ -25,11 +34,9 @@ const colorPaletteItemThemeVariants = cva(`
25
34
  hover:scale-95
26
35
 
27
36
  focus-visible:z-1
28
- focus-visible:not-data-[selected='true']:border-2
29
- focus-visible:not-data-[selected='true']:border-black/90
30
- focus-visible:not-data-[selected='true']:outline
31
- focus-visible:not-data-[selected='true']:outline-2
32
- focus-visible:not-data-[selected='true']:outline-white/90
37
+ focus-visible:border-2 focus-visible:border-black/90
38
+ focus-visible:outline focus-visible:outline-2 focus-visible:outline-white/90!
39
+ focus-visible:shadow-[0_0_0_4px_rgb(0_0_0/0.9)]
33
40
  `, {
34
41
  variants: {
35
42
  rounded: {
@@ -42,13 +49,6 @@ const colorPaletteItemThemeVariants = cva(`
42
49
  }
43
50
  });
44
51
 
45
- // Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
46
- // Edit the JSON file and run `npm run generate:locale-catalogs`.
47
- const COLOR_PALETTE_DEFAULT_MESSAGES = {
48
- color: (color) => `Color ${color}`,
49
- colorPalette: "Color palette"
50
- };
51
-
52
52
  const flatColorScheme = {
53
53
  name: "flat",
54
54
  columns: 20,
@@ -677,63 +677,103 @@ const websafeColorScheme = {
677
677
  class ColorPaletteComponent {
678
678
  constructor() {
679
679
  this.#direction = injectComponentDirection();
680
+ this.#document = inject(DOCUMENT);
680
681
  this.#elementRef = inject((ElementRef));
681
682
  this.#i18n = inject(MonaI18nService);
682
- this.isRtl = computed(() => this.#direction() === "rtl", /* @ts-ignore */
683
- ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
684
- this.activeColorIndex = computed(() => this.focusedColorIndex() === -1 ? 0 : this.focusedColorIndex(), /* @ts-ignore */
683
+ this.#label = injectLabelAssociation({
684
+ activate: () => this.focus(),
685
+ ariaLabel: () => this.ariaLabel(),
686
+ ariaLabelledBy: () => this.ariaLabelledBy()
687
+ });
688
+ this.activeColorIndex = computed(() => {
689
+ const focused = this.focusedColorIndex();
690
+ if (focused !== -1) {
691
+ return Math.min(focused, this.grid().tiles.length - 1);
692
+ }
693
+ return Math.max(this.selectedIndex(), 0);
694
+ }, /* @ts-ignore */
685
695
  ...(ngDevMode ? [{ debugName: "activeColorIndex" }] : /* istanbul ignore next */ []));
686
696
  this.baseClasses = computed(() => {
687
697
  return colorPaletteBaseThemeVariants();
688
698
  }, /* @ts-ignore */
689
699
  ...(ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []));
690
700
  this.colorRows = computed(() => {
691
- const { colors, columns } = this.colorScheme();
701
+ const { columns, tiles } = this.grid();
692
702
  const rows = [];
693
- for (let i = 0; i < colors.length; i += columns) {
694
- rows.push(colors.slice(i, i + columns));
703
+ for (let i = 0; i < tiles.length; i += columns) {
704
+ rows.push(tiles.slice(i, i + columns));
695
705
  }
696
706
  return rows;
697
707
  }, /* @ts-ignore */
698
708
  ...(ngDevMode ? [{ debugName: "colorRows" }] : /* istanbul ignore next */ []));
699
- this.colorScheme = computed(() => {
709
+ this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
710
+ this.focusedColorIndex = signal(-1, /* @ts-ignore */
711
+ ...(ngDevMode ? [{ debugName: "focusedColorIndex" }] : /* istanbul ignore next */ []));
712
+ this.grid = computed(() => {
700
713
  const palette = this.palette();
701
- const columns = this.columns();
702
714
  if (typeof palette === "string") {
703
- return this.getColorScheme(palette);
715
+ return this.gridFromScheme(this.getColorScheme(palette));
704
716
  }
705
- else {
706
- const paletteArray = Array.from(palette);
707
- if (paletteArray.length === 0) {
708
- return flatColorScheme;
709
- }
717
+ // Read once, so a generator can be used as the palette.
718
+ const items = Array.from(palette);
719
+ if (items.length === 0) {
720
+ return this.gridFromScheme(flatColorScheme);
710
721
  }
711
- const maxColumns = Math.min(count(palette), columns);
712
722
  return {
713
- colors: [...palette],
714
- columns: maxColumns,
715
- name: "custom"
723
+ columns: Math.min(items.length, Math.max(1, Math.floor(this.columns()) || 1)),
724
+ tiles: items.map(item => typeof item === "string" ? { color: item, name: null } : { color: item.color, name: item.name || null })
716
725
  };
717
726
  }, /* @ts-ignore */
718
- ...(ngDevMode ? [{ debugName: "colorScheme" }] : /* istanbul ignore next */ []));
719
- this.focusedColorIndex = signal(-1, /* @ts-ignore */
720
- ...(ngDevMode ? [{ debugName: "focusedColorIndex" }] : /* istanbul ignore next */ []));
727
+ ...(ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []));
721
728
  this.invalidState = computed(() => this.touched() && (this.invalid() || (this.required() && !this.value())), /* @ts-ignore */
722
729
  ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
730
+ this.isRtl = computed(() => this.#direction() === "rtl", /* @ts-ignore */
731
+ ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
732
+ this.labelledBy = this.#label.labelledBy;
723
733
  this.messages = this.#i18n.componentMessages("colorPalette", COLOR_PALETTE_DEFAULT_MESSAGES);
724
734
  this.paletteItemClasses = computed(() => {
725
735
  const rounded = this.rounded();
726
736
  return colorPaletteItemThemeVariants({ rounded });
727
737
  }, /* @ts-ignore */
728
738
  ...(ngDevMode ? [{ debugName: "paletteItemClasses" }] : /* istanbul ignore next */ []));
739
+ /**
740
+ * The first tile showing the value. Two spellings of a color count as the same color, so a value that went through
741
+ * a server or the color gradient keeps its selection, and a repeated color marks one tile only.
742
+ */
743
+ this.selectedIndex = computed(() => {
744
+ const value = this.value();
745
+ if (!value) {
746
+ return -1;
747
+ }
748
+ const key = colorKey(value, this.#document);
749
+ return this.tileKeys().indexOf(key);
750
+ }, /* @ts-ignore */
751
+ ...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
752
+ this.tileKeys = computed(() => this.grid().tiles.map(tile => colorKey(tile.color, this.#document)), /* @ts-ignore */
753
+ ...(ngDevMode ? [{ debugName: "tileKeys" }] : /* istanbul ignore next */ []));
729
754
  /**
730
755
  * @description Accessible label for the color palette grid.
731
756
  * @default ""
732
757
  */
733
758
  this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
734
759
  /**
735
- * @description The number of columns in the color palette grid.
736
- * Only applicable when using a custom palette.
760
+ * @description Id of the element that names the color palette grid.
761
+ * @default ""
762
+ */
763
+ this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
764
+ /**
765
+ * @description Whether activating the selected tile clears the value. A required palette never clears.
766
+ * @default true
767
+ */
768
+ this.clearable = input(true, { ...(ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
769
+ /**
770
+ * @description Emitted with the tile's color each time a tile is activated, also when it's already selected, which
771
+ * doesn't change `value`.
772
+ */
773
+ this.colorSelect = output();
774
+ /**
775
+ * @description The number of columns in the color palette grid. Only applicable when using a custom palette. A
776
+ * value below 1 shows one column.
737
777
  * @default 10
738
778
  */
739
779
  this.columns = input(10, /* @ts-ignore */
@@ -742,18 +782,17 @@ class ColorPaletteComponent {
742
782
  * @description Renders the component with reduced visual emphasis and removes pointer interaction.
743
783
  * @default false
744
784
  */
745
- this.disabled = input(false, /* @ts-ignore */
746
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
785
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
747
786
  /**
748
787
  * @description Marks the color palette as invalid. When bound to a signal form field via `[formField]`,
749
788
  * this is written by the `FormField` directive.
750
789
  * @default false
751
790
  */
752
- this.invalid = input(false, /* @ts-ignore */
753
- ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
791
+ this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
754
792
  /**
755
793
  * @description The palette to display — one of the built-in `"flat"`, `"material"`, or `"websafe"` schemes, or a
756
- * custom iterable of color strings. An empty custom palette falls back to the flat scheme.
794
+ * custom iterable of colors. A custom color is a CSS color string, or a `{ color, name }` item when it has a name
795
+ * of its own. An empty custom palette falls back to the flat scheme.
757
796
  * @default []
758
797
  */
759
798
  this.palette = input([], /* @ts-ignore */
@@ -763,15 +802,13 @@ class ColorPaletteComponent {
763
802
  * form field via `[formField]`, this is written by the `FormField` directive.
764
803
  * @default false
765
804
  */
766
- this.readonly = input(false, /* @ts-ignore */
767
- ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
805
+ this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
768
806
  /**
769
807
  * @description Sets whether the color palette is required. When bound to a signal form field via `[formField]`,
770
808
  * this is written by the `FormField` directive.
771
809
  * @default false
772
810
  */
773
- this.required = input(false, /* @ts-ignore */
774
- ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
811
+ this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
775
812
  /**
776
813
  * @description Border-radius preset applied to the color palette items.
777
814
  * @default "none"
@@ -779,13 +816,14 @@ class ColorPaletteComponent {
779
816
  this.rounded = input("none", /* @ts-ignore */
780
817
  ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
781
818
  /**
782
- * @description The size of each tile in the color palette grid.
783
- * @default 18
819
+ * @description The size of each tile in the color palette grid, in pixels. Below 24, tiles miss the minimum target
820
+ * size of WCAG 2.5.8.
821
+ * @default 24
784
822
  */
785
- this.tileSize = input(18, /* @ts-ignore */
823
+ this.tileSize = input(24, /* @ts-ignore */
786
824
  ...(ngDevMode ? [{ debugName: "tileSize" }] : /* istanbul ignore next */ []));
787
825
  /**
788
- * @description Emitted when the color palette is interacted with on blur or color selection.
826
+ * @description Emitted when focus leaves the color palette or a color is selected.
789
827
  * The `FormField` directive listens to this to mark the field as touched.
790
828
  */
791
829
  this.touch = output();
@@ -794,8 +832,7 @@ class ColorPaletteComponent {
794
832
  * this is written by the `FormField` directive.
795
833
  * @default false
796
834
  */
797
- this.touched = input(false, /* @ts-ignore */
798
- ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
835
+ this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
799
836
  /**
800
837
  * @description Two-way bindable current color value.
801
838
  * @default null
@@ -804,37 +841,58 @@ class ColorPaletteComponent {
804
841
  ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
805
842
  }
806
843
  #direction;
844
+ #document;
807
845
  #elementRef;
808
846
  #i18n;
809
- focusColorTile(index) {
810
- setTimeout(() => {
811
- const colorTiles = this.#elementRef.nativeElement.querySelectorAll("[data-color-index]");
812
- const targetTile = colorTiles[index];
813
- if (targetTile) {
814
- targetTile.focus();
815
- }
816
- });
847
+ #label;
848
+ /**
849
+ * @description Moves focus to the palette's active tile.
850
+ * @param options Options passed to the native `focus()` call, such as `preventScroll`.
851
+ */
852
+ focus(options) {
853
+ const element = this.#elementRef.nativeElement;
854
+ element.querySelector('[data-color-index][tabindex="0"]')?.focus(options);
817
855
  }
818
- onColorBlur() {
819
- this.touch.emit();
856
+ /**
857
+ * @internal
858
+ */
859
+ setLabelledBy(id) {
860
+ this.#label.setLabelledBy(id);
820
861
  }
821
862
  onColorFocus(index) {
822
863
  this.focusedColorIndex.set(index);
823
864
  }
824
- onColorSelect(color) {
825
- if (this.disabled() || this.readonly()) {
865
+ onColorSelect(index) {
866
+ if (this.effectiveDisabled() || this.readonly()) {
867
+ return;
868
+ }
869
+ const { color } = this.grid().tiles[index];
870
+ if (index !== this.selectedIndex()) {
871
+ this.value.set(color);
872
+ }
873
+ else if (this.clearable() && !this.required()) {
874
+ this.value.set(null);
875
+ }
876
+ this.colorSelect.emit(color);
877
+ this.touch.emit();
878
+ }
879
+ onFocusOut(event) {
880
+ const nextTarget = event.relatedTarget;
881
+ const element = this.#elementRef.nativeElement;
882
+ if (nextTarget instanceof Node && element.contains(nextTarget)) {
826
883
  return;
827
884
  }
828
- const resultColor = this.value() === color ? null : color;
829
- this.value.set(resultColor);
885
+ // Coming back to the grid starts from the selected color, which may have changed in the meantime.
886
+ this.focusedColorIndex.set(-1);
830
887
  this.touch.emit();
831
888
  }
832
889
  onKeyDown(event, colorIndex) {
833
- if (this.disabled()) {
890
+ if (this.effectiveDisabled()) {
834
891
  return;
835
892
  }
836
- const colors = this.colorScheme().colors;
837
- const columns = this.colorScheme().columns;
893
+ const { columns, tiles } = this.grid();
894
+ const lastIndex = tiles.length - 1;
895
+ const rowStart = colorIndex - (colorIndex % columns);
838
896
  const isRtl = this.isRtl();
839
897
  const prevKey = isRtl ? "ArrowRight" : "ArrowLeft";
840
898
  const nextKey = isRtl ? "ArrowLeft" : "ArrowRight";
@@ -846,29 +904,29 @@ class ColorPaletteComponent {
846
904
  handled = true;
847
905
  break;
848
906
  case nextKey:
849
- newIndex = Math.min(colors.length - 1, colorIndex + 1);
907
+ newIndex = Math.min(lastIndex, colorIndex + 1);
850
908
  handled = true;
851
909
  break;
852
910
  case "ArrowUp":
853
- newIndex = Math.max(0, colorIndex - columns);
911
+ newIndex = colorIndex - columns >= 0 ? colorIndex - columns : colorIndex;
854
912
  handled = true;
855
913
  break;
856
914
  case "ArrowDown":
857
- newIndex = Math.min(colors.length - 1, colorIndex + columns);
915
+ newIndex = colorIndex + columns <= lastIndex ? colorIndex + columns : colorIndex;
858
916
  handled = true;
859
917
  break;
860
918
  case "Home":
861
- newIndex = 0;
919
+ newIndex = event.ctrlKey ? 0 : rowStart;
862
920
  handled = true;
863
921
  break;
864
922
  case "End":
865
- newIndex = colors.length - 1;
923
+ newIndex = event.ctrlKey ? lastIndex : Math.min(lastIndex, rowStart + columns - 1);
866
924
  handled = true;
867
925
  break;
868
926
  case "Enter":
869
927
  case " ":
870
- if (!this.readonly()) {
871
- this.onColorSelect(colors[colorIndex]);
928
+ if (!event.repeat) {
929
+ this.onColorSelect(colorIndex);
872
930
  }
873
931
  handled = true;
874
932
  break;
@@ -876,10 +934,16 @@ class ColorPaletteComponent {
876
934
  if (handled) {
877
935
  event.preventDefault();
878
936
  event.stopPropagation();
879
- this.focusedColorIndex.set(newIndex);
880
- this.focusColorTile(newIndex);
937
+ if (newIndex !== colorIndex) {
938
+ this.focusColorTile(newIndex);
939
+ }
881
940
  }
882
941
  }
942
+ focusColorTile(index) {
943
+ this.focusedColorIndex.set(index);
944
+ const tiles = this.#elementRef.nativeElement.querySelectorAll("[data-color-index]");
945
+ tiles[index]?.focus();
946
+ }
883
947
  getColorScheme(paletteType) {
884
948
  switch (paletteType) {
885
949
  case "flat":
@@ -890,27 +954,32 @@ class ColorPaletteComponent {
890
954
  return websafeColorScheme;
891
955
  }
892
956
  }
957
+ gridFromScheme({ colors, columns }) {
958
+ return { columns, tiles: colors.map(color => ({ color, name: null })) };
959
+ }
893
960
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ColorPaletteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
894
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ColorPaletteComponent, isStandalone: true, selector: "mona-color-palette", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, tileSize: { classPropertyName: "tileSize", publicName: "tileSize", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { touch: "touch", value: "valueChange" }, host: { properties: { "class": "baseClasses()", "style.grid-template-columns": "'repeat('+colorScheme().columns+', minmax('+tileSize()+'px, 1fr))'", "style.grid-auto-rows": "tileSize()+'px'", "attr.data-disabled": "disabled()", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly()", "attr.data-required": "required() || null", "attr.role": "'grid'", "attr.aria-label": "ariaLabel() || messages().colorPalette", "attr.aria-disabled": "disabled()", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.aria-readonly": "readonly()", "attr.aria-required": "required()" } }, ngImport: i0, template: "@for (row of colorRows(); track $index; let rowIndex = $index) {\n <div class=\"contents\" role=\"row\">\n @for (color of row; track $index; let colIndex = $index) {\n @let i = rowIndex * colorScheme().columns + colIndex;\n <div\n [class]=\"paletteItemClasses()\"\n [attr.data-selected]=\"color === value()\"\n [attr.data-color-index]=\"i\"\n [attr.data-readonly]=\"readonly()\"\n [attr.tabindex]=\"disabled() ? -1 : i === activeColorIndex() ? 0 : -1\"\n [attr.role]=\"'gridcell'\"\n [attr.aria-label]=\"messages().color(color)\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.aria-readonly]=\"readonly()\"\n [attr.aria-selected]=\"color === value()\"\n [style.background-color]=\"color\"\n (click)=\"onColorSelect(color)\"\n (keydown)=\"onKeyDown($event, i)\"\n (focus)=\"onColorFocus(i)\"\n (blur)=\"onColorBlur()\"></div>\n }\n </div>\n}\n" }); }
961
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ColorPaletteComponent, isStandalone: true, selector: "mona-color-palette", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, tileSize: { classPropertyName: "tileSize", publicName: "tileSize", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { colorSelect: "colorSelect", touch: "touch", value: "valueChange" }, host: { listeners: { "focusout": "onFocusOut($event)" }, properties: { "class": "baseClasses()", "style.grid-template-columns": "'repeat('+grid().columns+', minmax('+tileSize()+'px, 1fr))'", "style.grid-auto-rows": "tileSize()+'px'", "attr.data-disabled": "effectiveDisabled()", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly()", "attr.data-required": "required() || null", "attr.role": "'grid'", "attr.aria-label": "labelledBy() ? null : ariaLabel() || messages().colorPalette", "attr.aria-labelledby": "labelledBy()", "attr.aria-disabled": "effectiveDisabled()", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.aria-readonly": "readonly()", "attr.aria-required": "required()" } }, ngImport: i0, template: "@for (row of colorRows(); track $index; let rowIndex = $index) {\n <div class=\"contents\" role=\"row\">\n @for (item of row; track $index; let colIndex = $index) {\n @let i = rowIndex * grid().columns + colIndex;\n @let label = item.name ? messages().namedColor(item.name, item.color) : messages().color(item.color);\n <div\n [class]=\"paletteItemClasses()\"\n [attr.data-selected]=\"i === selectedIndex()\"\n [attr.data-color-index]=\"i\"\n [attr.data-readonly]=\"readonly()\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : i === activeColorIndex() ? 0 : -1\"\n [attr.role]=\"'gridcell'\"\n [attr.title]=\"label\"\n [attr.aria-label]=\"label\"\n [attr.aria-disabled]=\"effectiveDisabled()\"\n [attr.aria-readonly]=\"readonly()\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n [style.background-color]=\"item.color\"\n (click)=\"onColorSelect(i)\"\n (keydown)=\"onKeyDown($event, i)\"\n (focus)=\"onColorFocus(i)\"></div>\n }\n </div>\n}\n" }); }
895
962
  }
896
963
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ColorPaletteComponent, decorators: [{
897
964
  type: Component,
898
965
  args: [{ selector: "mona-color-palette", host: {
899
966
  "[class]": "baseClasses()",
900
- "[style.grid-template-columns]": "'repeat('+colorScheme().columns+', minmax('+tileSize()+'px, 1fr))'",
967
+ "[style.grid-template-columns]": "'repeat('+grid().columns+', minmax('+tileSize()+'px, 1fr))'",
901
968
  "[style.grid-auto-rows]": "tileSize()+'px'",
902
- "[attr.data-disabled]": "disabled()",
969
+ "[attr.data-disabled]": "effectiveDisabled()",
903
970
  "[attr.data-invalid]": "invalidState() || null",
904
971
  "[attr.data-readonly]": "readonly()",
972
+ "(focusout)": "onFocusOut($event)",
905
973
  "[attr.data-required]": "required() || null",
906
974
  "[attr.role]": "'grid'",
907
- "[attr.aria-label]": "ariaLabel() || messages().colorPalette",
908
- "[attr.aria-disabled]": "disabled()",
975
+ "[attr.aria-label]": "labelledBy() ? null : ariaLabel() || messages().colorPalette",
976
+ "[attr.aria-labelledby]": "labelledBy()",
977
+ "[attr.aria-disabled]": "effectiveDisabled()",
909
978
  "[attr.aria-invalid]": "invalidState() ? 'true' : null",
910
979
  "[attr.aria-readonly]": "readonly()",
911
980
  "[attr.aria-required]": "required()"
912
- }, template: "@for (row of colorRows(); track $index; let rowIndex = $index) {\n <div class=\"contents\" role=\"row\">\n @for (color of row; track $index; let colIndex = $index) {\n @let i = rowIndex * colorScheme().columns + colIndex;\n <div\n [class]=\"paletteItemClasses()\"\n [attr.data-selected]=\"color === value()\"\n [attr.data-color-index]=\"i\"\n [attr.data-readonly]=\"readonly()\"\n [attr.tabindex]=\"disabled() ? -1 : i === activeColorIndex() ? 0 : -1\"\n [attr.role]=\"'gridcell'\"\n [attr.aria-label]=\"messages().color(color)\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.aria-readonly]=\"readonly()\"\n [attr.aria-selected]=\"color === value()\"\n [style.background-color]=\"color\"\n (click)=\"onColorSelect(color)\"\n (keydown)=\"onKeyDown($event, i)\"\n (focus)=\"onColorFocus(i)\"\n (blur)=\"onColorBlur()\"></div>\n }\n </div>\n}\n" }]
913
- }], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], tileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "tileSize", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
981
+ }, template: "@for (row of colorRows(); track $index; let rowIndex = $index) {\n <div class=\"contents\" role=\"row\">\n @for (item of row; track $index; let colIndex = $index) {\n @let i = rowIndex * grid().columns + colIndex;\n @let label = item.name ? messages().namedColor(item.name, item.color) : messages().color(item.color);\n <div\n [class]=\"paletteItemClasses()\"\n [attr.data-selected]=\"i === selectedIndex()\"\n [attr.data-color-index]=\"i\"\n [attr.data-readonly]=\"readonly()\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : i === activeColorIndex() ? 0 : -1\"\n [attr.role]=\"'gridcell'\"\n [attr.title]=\"label\"\n [attr.aria-label]=\"label\"\n [attr.aria-disabled]=\"effectiveDisabled()\"\n [attr.aria-readonly]=\"readonly()\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n [style.background-color]=\"item.color\"\n (click)=\"onColorSelect(i)\"\n (keydown)=\"onKeyDown($event, i)\"\n (focus)=\"onColorFocus(i)\"></div>\n }\n </div>\n}\n" }]
982
+ }], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], colorSelect: [{ type: i0.Output, args: ["colorSelect"] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], tileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "tileSize", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
914
983
 
915
984
  /*
916
985
  * Public API Surface of @nanahoshi/mona-ui/color-palette