@luzmo/lucero 1.0.1-alpha.0 → 1.0.1-alpha.10

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 (87) hide show
  1. package/README.md +29 -0
  2. package/components/accordion/index.cjs +2 -2
  3. package/components/accordion/index.js +1 -1
  4. package/components/action-bar/index.cjs +1 -1
  5. package/components/action-bar/index.js +1 -1
  6. package/components/action-button/index.cjs +2 -2
  7. package/components/action-button/index.js +2 -2
  8. package/components/action-menu/index.cjs +1 -1
  9. package/components/action-menu/index.js +2 -2
  10. package/components/button/index.cjs +1 -1
  11. package/components/button/index.js +2 -2
  12. package/components/calendar/index.cjs +1 -1
  13. package/components/calendar/index.js +1 -1
  14. package/components/checkbox/index.cjs +1 -1
  15. package/components/checkbox/index.js +1 -1
  16. package/components/{clear-button-BbVqNU-g.js → clear-button-DQcRdcUa.js} +1 -1
  17. package/components/{clear-button-DYdeFsS8.cjs → clear-button-OFUFFe7G.cjs} +1 -1
  18. package/components/{close-button-CpfKibqg.cjs → close-button-Cbnb7XXj.cjs} +1 -1
  19. package/components/{close-button-DzOZZmkY.js → close-button-CqHYZhum.js} +1 -1
  20. package/components/color-area/index.cjs +1 -1
  21. package/components/color-area/index.js +1 -1
  22. package/components/{color-controller-DTp1juRz.js → color-controller-B0uX6Zso.js} +116 -84
  23. package/components/{color-controller-_ZwyhvaU.cjs → color-controller-CoUL5f9K.cjs} +1 -1
  24. package/components/color-field/color-field.d.ts +8 -0
  25. package/components/color-field/index.cjs +4 -4
  26. package/components/color-field/index.js +36 -24
  27. package/components/color-menu/index.cjs +7 -7
  28. package/components/color-menu/index.js +39 -39
  29. package/components/color-palette/color-palette.d.ts +53 -0
  30. package/components/color-palette/index.cjs +18 -0
  31. package/components/color-palette/index.d.ts +7 -0
  32. package/components/color-palette/index.js +88 -0
  33. package/components/color-palette-group/color-palette-group.d.ts +79 -0
  34. package/components/color-palette-group/index.cjs +28 -0
  35. package/components/color-palette-group/index.d.ts +7 -0
  36. package/components/color-palette-group/index.js +205 -0
  37. package/components/color-picker/color-picker.d.ts +31 -2
  38. package/components/color-picker/index.cjs +4 -3
  39. package/components/color-picker/index.js +13 -9
  40. package/components/date-time-picker/index.cjs +1 -1
  41. package/components/date-time-picker/index.js +2 -2
  42. package/components/icon/index.cjs +1 -1
  43. package/components/icon/index.js +1 -1
  44. package/components/{index-Cb9zsiz6.js → index-Cl54m8Yh.js} +1 -1
  45. package/components/{index-BQoI8AD3.cjs → index-Wq3qZJGh.cjs} +1 -1
  46. package/components/index.cjs +1 -1
  47. package/components/index.js +141 -137
  48. package/components/{luzmo-icons-NEyaMpEM.js → luzmo-icons-4nDFv1Lq.js} +12 -12
  49. package/components/{luzmo-icons-D47EGj-3.cjs → luzmo-icons-D4IvHgVd.cjs} +2 -2
  50. package/components/menu/index.cjs +4 -4
  51. package/components/menu/index.js +2 -2
  52. package/components/number-field/index.cjs +5 -5
  53. package/components/number-field/index.js +5 -5
  54. package/components/options/index.cjs +8 -8
  55. package/components/options/index.js +1 -1
  56. package/components/overlay/index.cjs +1 -1
  57. package/components/overlay/index.js +2 -2
  58. package/components/{overlay-BtZCJ2M0.js → overlay-Cig9r6uU.js} +1 -1
  59. package/components/overlay-KSKMzzkh.cjs +47 -0
  60. package/components/picker/index.cjs +1 -1
  61. package/components/picker/index.js +2 -2
  62. package/components/{picker-CAYj4hBD.js → picker-BfBP7XJN.js} +1 -1
  63. package/components/picker-button/index.cjs +1 -1
  64. package/components/picker-button/index.js +1 -1
  65. package/components/{picker-apS0Zrly.cjs → picker-xIphqE6d.cjs} +4 -4
  66. package/components/search/index.cjs +1 -1
  67. package/components/search/index.js +2 -2
  68. package/components/select/index.cjs +6 -6
  69. package/components/select/index.js +1 -1
  70. package/components/swatch/index.cjs +2 -2
  71. package/components/swatch/index.js +1 -1
  72. package/components/tabs/index.cjs +1 -1
  73. package/components/tabs/index.js +1 -1
  74. package/components/tags/index.cjs +1 -1
  75. package/components/tags/index.js +1 -1
  76. package/components/text-field/index.cjs +2 -2
  77. package/components/text-field/index.js +5 -5
  78. package/components/{text-field-BSIXGkFs.cjs → text-field-BTkr42k4.cjs} +4 -4
  79. package/components/{text-field-B9IkRRxO.js → text-field-ol9Ed5lQ.js} +5 -5
  80. package/components/toast/index.cjs +1 -1
  81. package/components/toast/index.js +2 -2
  82. package/components/unit-input/index.cjs +3 -3
  83. package/components/unit-input/index.js +1 -1
  84. package/custom-elements.json +1 -1
  85. package/index.d.ts +2 -0
  86. package/package.json +12 -2
  87. package/components/overlay-DTCm3y_-.cjs +0 -47
@@ -15,7 +15,7 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- import { p, b as z, T as f } from "../luzmo-icons-NEyaMpEM.js";
18
+ import { y as p, b as z, T as f } from "../luzmo-icons-4nDFv1Lq.js";
19
19
  import { r as v, x as s, n as h } from "../base-WsynuqaS.js";
20
20
  import { r as b } from "../state-Deh-vKYE.js";
21
21
  import { e as n } from "../query-D_KR_GUc.js";
@@ -36,62 +36,62 @@ const g = () => {
36
36
  };
37
37
  g();
38
38
  const C = '@charset "UTF-8";:host{width:var(--luzmo-color-menu-width, var(--color-menu-width))}.hue-opacity-text-swatches-container{display:flex;gap:var(--luzmo-color-menu-color-controls-vertical-gap, var(--color-menu-color-controls-vertical-gap));flex-direction:column;padding:var(--luzmo-color-menu-hue-opacity-text-swatches-vertical-padding, var(--color-menu-hue-opacity-text-swatches-vertical-padding)) var(--luzmo-color-menu-hue-opacity-text-swatches-horizontal-padding, var(--color-menu-hue-opacity-text-swatches-horizontal-padding))}.swatch-sliders-container{display:flex;gap:var(--luzmo-color-menu-swatch-to-sliders-space, var(--color-menu-swatch-to-sliders-space))}.swatch-example-container{display:flex;align-items:center}.field-container{display:flex;align-items:center;gap:var(--luzmo-color-menu-format-field-to-format-space, var(--color-menu-format-field-to-format-space))}.format-container{text-transform:uppercase;position:relative;background:none;border:none;outline:none;height:var(--luzmo-color-menu-format-height, var(--color-menu-format-height));cursor:pointer;font-size:var(--luzmo-color-menu-format-font-size, var(--color-menu-format-font-size));display:flex;align-items:center;color:var(--luzmo-color-menu-format-font-color, var(--color-menu-format-font-color));gap:var(--luzmo-color-menu-format-name-to-icon, var(--color-menu-format-name-to-icon-space));padding:0 var(--luzmo-color-menu-format-horizontal-padding, var(--color-menu-format-horizontal-padding))}.format-container:hover{color:var(--luzmo-color-menu-format-font-color-hover, var(--color-menu-format-font-color-hover))}.format-container:focus-visible{outline:none}.format-container:focus-visible:after{content:"";width:100%;height:100%;position:absolute;box-sizing:border-box;left:0;top:0;border:var(--luzmo-color-menu-format-indicator-width, var(--luzmo-indicator-width)) solid var(--luzmo-color-menu-format-indicator-color, var(--luzmo-indicator-color));border-radius:var(--luzmo-color-menu-format-label-indicator-border-radius, var(--luzmo-border-radius-s))}.format-container:focus-visible,.format-container:active{color:var(--luzmo-color-menu-format-font-color-down, var(--color-menu-format-font-color-down))}.format-container .format-label{-webkit-user-select:none;user-select:none}.format-container .angle-icon{display:flex;align-items:center;height:calc(var(--color-menu-format-font-size) / 1.5)}.slider-container{display:flex;flex-direction:column;justify-content:center;gap:var(--luzmo-color-menu-slider-gap, var(--color-menu-slider-gap))}luzmo-color-area{width:100%;height:var(--luzmo-color-menu-height, var(--color-menu-height))}luzmo-color-slider{width:100%}luzmo-divider{margin:var(--luzmo-spacing-5) à}.swatches-container{display:grid;grid-template-columns:repeat(6,1fr);gap:var(--luzmo-color-menu-swatches-gap, var(--color-menu-swatches-gap))}.swatches-container luzmo-swatch{cursor:pointer}.swatches-container .swatch-choice{display:flex;align-items:center;justify-content:center}:host{--luzmo-text-field-icon-size-valid: 0px;--luzmo-text-field-icon-spacing-inline-end-valid: 1px;--luzmo-text-field-text-align: center}:host{--color-menu-width: 290px;--luzmo-text-field-width: 220px;--luzmo-color-slider-control-track-width: 8px;--color-menu-height: 140px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-5 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-5);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-5);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height);--color-menu-format-font-size: var(--luzmo-font-size-s);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-2);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-3);--color-menu-format-font-color: var(--luzmo-font-color);--color-menu-format-font-color-hover: var(--luzmo-font-color-hover);--color-menu-format-font-color-down: var(--luzmo-font-color-down);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host .swatches-container{--luzmo-swatch-size: 22px}:host([size=s]){--color-menu-width: 260px;--luzmo-text-field-width: 200px;--luzmo-color-slider-control-track-width: 8px;--color-menu-hue-opacity-text-swatches-horizontal-padding: var( --luzmo-spacing-5 );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-4 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-4);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-4);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height-s);--color-menu-format-font-size: var(--luzmo-font-size-xs);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-2);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-2);--color-menu-swatches-gap: var(--luzmo-spacing-3)}:host([size=s]) .swatches-container{--luzmo-swatch-size: 20px}:host([size=l]){--color-menu-width: 350px;--luzmo-text-field-width: 240px;--luzmo-color-slider-control-track-width: 16px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-hue-opacity-text-swatches-vertical-padding: var( --luzmo-spacing-5 );--color-menu-color-controls-vertical-gap: var(--luzmo-spacing-5);--color-menu-swatch-to-sliders-space: var(--luzmo-spacing-5);--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-format-height: var(--luzmo-component-height-l);--color-menu-format-font-size: var(--luzmo-font-size);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-3);--color-menu-format-field-to-format-space: var(--luzmo-spacing-2);--color-menu-format-horizontal-padding: var(--luzmo-spacing-4);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host([size=l]) .swatches-container{--luzmo-swatch-size: 24px}:host([size=l]) .swatch-example-container{--luzmo-swatch-size: 56px}:host([size=xl]){--color-menu-width: 380px;--luzmo-text-field-width: 280px;--luzmo-color-slider-control-track-width: 16px;--color-menu-hue-opacity-text-swatches-horizontal-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-2) );--color-menu-hue-opacity-text-swatches-vertical-padding: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-color-controls-vertical-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-swatch-to-sliders-space: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-slider-gap: calc( var(--luzmo-spacing-5) + var(--luzmo-spacing-1) );--color-menu-format-height: var(--luzmo-component-height-xl);--color-menu-format-font-size: var(--luzmo-font-size-l);--color-menu-format-name-to-icon-space: var(--luzmo-spacing-3);--color-menu-format-field-to-format-space: var(--luzmo-spacing-3);--color-menu-format-horizontal-padding: var(--luzmo-spacing-4);--color-menu-swatches-gap: var(--luzmo-spacing-4)}:host([size=xl]) .swatches-container{--luzmo-swatch-size: 26px}:host([size=xl]) .swatch-example-container{--luzmo-swatch-size: 64px}';
39
- var y = Object.defineProperty, t = (i, o, r, e) => {
39
+ var y = Object.defineProperty, t = (i, r, o, e) => {
40
40
  for (var c = void 0, m = i.length - 1, d; m >= 0; m--)
41
- (d = i[m]) && (c = d(o, r, c) || c);
42
- return c && y(o, r, c), c;
41
+ (d = i[m]) && (c = d(r, o, c) || c);
42
+ return c && y(r, o, c), c;
43
43
  };
44
44
  const u = class u extends w(x) {
45
45
  constructor() {
46
46
  super(...arguments), this.color = "rgb(255, 0, 0)", this.noAlphaChannel = !1, this._alpha = 1, this._rgbColor = "rgb(255, 0, 0)", this._rgbaColor = "rgb(255, 0, 0, 1)", this._previousColor = "rgb(255, 0, 0)";
47
47
  }
48
- setColor(o) {
48
+ setColor(r) {
49
49
  var e;
50
- const r = new a((e = o == null ? void 0 : o.target) == null ? void 0 : e.color);
51
- this._format = r.format === "name" ? "rgb" : r.format, this._rgbaColor = r.toRgbString(), this._alpha = this.noAlphaChannel ? 1 : r.getAlpha(), this._rgbColor = r.setAlpha(1).toRgbString(), this.hueSliderElement.color = this._rgbColor, this.areaElement.color = this._rgbColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.swatchElement.color = this._rgbaColor, this.colorFieldElement.value = this.formatTextField(r), this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
50
+ const o = new a((e = r == null ? void 0 : r.target) == null ? void 0 : e.color);
51
+ this._format = o.format === "name" ? "rgb" : o.format, this._rgbaColor = o.toRgbString(), this._alpha = this.noAlphaChannel ? 1 : o.getAlpha(), this._rgbColor = o.setAlpha(1).toRgbString(), this.hueSliderElement.color = this._rgbColor, this.areaElement.color = this._rgbColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.swatchElement.color = this._rgbaColor, this.colorFieldElement.value = this.formatTextField(o), this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
52
52
  }
53
- handleAreaChange(o) {
54
- o.stopPropagation(), o.preventDefault(), this._rgbColor = this.areaElement.color;
55
- const r = new a(this._rgbColor);
56
- this._rgbaColor = r.setAlpha(this._alpha).toRgbString(), this.colorFieldElement.value = this._rgbaColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.colorFieldElement.value = this.formatTextField(r), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
53
+ handleAreaChange(r) {
54
+ r.stopPropagation(), r.preventDefault(), this._rgbColor = this.areaElement.color;
55
+ const o = new a(this._rgbColor);
56
+ this._rgbaColor = o.setAlpha(this._alpha).toRgbString(), this.colorFieldElement.value = this._rgbaColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.colorFieldElement.value = this.formatTextField(o), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
57
57
  }
58
58
  get focusElement() {
59
59
  return this.areaElement || this.colorFieldElement || this;
60
60
  }
61
- handleHueSliderChange(o) {
62
- o.stopPropagation(), o.preventDefault();
63
- const r = new a(this._rgbColor).toHsl();
64
- r.h = this.hueSliderElement.value;
65
- const e = new a(r);
66
- this._rgbColor = e.toRgbString(), this._rgbaColor = e.setAlpha(this._alpha).toRgbString(), this.areaElement.color = this._rgbColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.colorFieldElement.value = this.formatTextField(e), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
61
+ handleHueSliderChange(r) {
62
+ r.stopPropagation(), r.preventDefault();
63
+ const o = new a(this._rgbColor).toHsl();
64
+ o.h = this.hueSliderElement.value;
65
+ const e = new a(o);
66
+ this._rgbColor = e.toRgbString(), this._rgbaColor = e.setAlpha(this._alpha).toRgbString(), this.areaElement.color = `hsla(${o.h}, ${o.s * 100}%, ${o.l * 100}%, ${o.a})`, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.colorFieldElement.value = this.formatTextField(e), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
67
67
  }
68
- handleOpacitySliderChange(o) {
69
- o.stopPropagation(), o.preventDefault(), this._alpha = this.opacitySliderElement.sliderHandlePosition / 100;
70
- const r = new a(this._rgbColor).setAlpha(this._alpha);
71
- this._rgbaColor = r.toRgbString(), this.colorFieldElement.value = this.formatTextField(r), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
68
+ handleOpacitySliderChange(r) {
69
+ r.stopPropagation(), r.preventDefault(), this._alpha = this.opacitySliderElement.sliderHandlePosition / 100;
70
+ const o = new a(this._rgbColor).setAlpha(this._alpha);
71
+ this._rgbaColor = o.toRgbString(), this.colorFieldElement.value = this.formatTextField(o), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
72
72
  }
73
- handleFieldChange(o) {
74
- if (o.stopPropagation(), o.preventDefault(), this.colorFieldElement.checkValidity()) {
75
- const r = new a(this.colorFieldElement.value);
76
- this._format = r.format, this._rgbaColor = r.toRgbString(), this._alpha = r.getAlpha(), this._rgbColor = r.setAlpha(1).toRgbString(), this.noAlphaChannel && (this._rgbaColor = this._rgbColor, this._alpha = 1), this.hueSliderElement.color = this._rgbColor, this.areaElement.color = this._rgbColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
73
+ handleFieldChange(r) {
74
+ if (r.stopPropagation(), r.preventDefault(), this.colorFieldElement.checkValidity()) {
75
+ const o = new a(this.colorFieldElement.value);
76
+ this._format = o.format, this._rgbaColor = o.toRgbString(), this._alpha = o.getAlpha(), this._rgbColor = o.setAlpha(1).toRgbString(), this.noAlphaChannel && (this._rgbaColor = this._rgbColor, this._alpha = 1), this.hueSliderElement.color = this._rgbColor, this.areaElement.color = this._rgbColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.swatchElement.color = this._rgbaColor, this._previousColor = this._rgbaColor, this.color = this._rgbaColor, this.dispatchEvent(new CustomEvent("change", { detail: this.color }));
77
77
  }
78
78
  }
79
- formatTextField(o) {
80
- return this._format === "hsl" ? o.toHslString() : this._format === "hex" ? this.noAlphaChannel ? o.toHexString() : o.toHex8String() : (this._format === "name" && (this._format = "rgb"), o.toRgbString());
79
+ formatTextField(r) {
80
+ return this._format === "hsl" ? r.toHslString() : this._format === "hex" ? this.noAlphaChannel ? r.toHexString() : r.toHex8String() : (this._format === "name" && (this._format = "rgb"), r.toRgbString());
81
81
  }
82
82
  cycleFormat() {
83
- const o = ["rgb", "hsl", "hex"];
84
- this._format = o[(o.indexOf(this._format) + 1) % o.length];
85
- const r = new a(this.color), e = this.formatTextField(r);
83
+ const r = ["rgb", "hsl", "hex"];
84
+ this._format = r[(r.indexOf(this._format) + 1) % r.length];
85
+ const o = new a(this.color), e = this.formatTextField(o);
86
86
  this.colorFieldElement.value = e;
87
87
  }
88
- updated(o) {
89
- if (o.has("color") && this.color !== this._previousColor) {
88
+ updated(r) {
89
+ if (r.has("color") && this.color !== this._previousColor) {
90
90
  this._previousColor = this.color;
91
- const r = new a(this.color);
92
- this._alpha = r.getAlpha(), this._rgbColor = r.setAlpha(1).toRgbString(), this._rgbaColor = r.setAlpha(this._alpha).toRgbString(), this.areaElement.color = this._rgbColor, this.hueSliderElement.color = this._rgbColor, this.colorFieldElement.value = this._rgbaColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.swatchElement.color = this._rgbaColor, this._format = "rgb";
91
+ const o = new a(this.color);
92
+ this._alpha = o.getAlpha(), this._rgbColor = o.setAlpha(1).toRgbString(), this._rgbaColor = o.setAlpha(this._alpha).toRgbString(), this.areaElement.color = this._rgbColor, this.hueSliderElement.color = this._rgbColor, this.colorFieldElement.value = this._rgbaColor, this.noAlphaChannel || (this.opacitySliderElement.color = this._rgbaColor), this.swatchElement.color = this._rgbaColor, this._format = "rgb";
93
93
  }
94
- o.has("noAlphaChannel") && !this.noAlphaChannel && (this.opacitySliderElement.color = this._rgbaColor);
94
+ r.has("noAlphaChannel") && !this.noAlphaChannel && (this.opacitySliderElement.color = this._rgbaColor);
95
95
  }
96
96
  renderOpacitySlider() {
97
97
  return s`
@@ -104,7 +104,7 @@ const u = class u extends w(x) {
104
104
  `;
105
105
  }
106
106
  render() {
107
- var o;
107
+ var r;
108
108
  return s`
109
109
  <div id="color-menu" tabindex="0">
110
110
  <luzmo-color-area
@@ -148,15 +148,15 @@ const u = class u extends w(x) {
148
148
  </div>
149
149
  </button>
150
150
  </div>
151
- ${((o = this.swatches) == null ? void 0 : o.length) > 0 ? s`
151
+ ${((r = this.swatches) == null ? void 0 : r.length) > 0 ? s`
152
152
  <luzmo-divider></luzmo-divider>
153
153
  <div class="swatches-container">
154
154
  ${this.swatches.map(
155
- (r) => s`
155
+ (o) => s`
156
156
  <div class="swatch-choice">
157
157
  <luzmo-swatch
158
158
  @click=${this.setColor}
159
- .color=${r}
159
+ .color=${o}
160
160
  .size=${this.size}
161
161
  readonly
162
162
  >
@@ -0,0 +1,53 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { Focusable } from '../../utils/focusable';
3
+ declare const LuzmoColorPalette_base: typeof Focusable & {
4
+ new (...args: any[]): import("../..").SizedElementInterface;
5
+ prototype: import("../..").SizedElementInterface;
6
+ };
7
+ export declare class LuzmoColorPalette extends LuzmoColorPalette_base {
8
+ /**
9
+ * The styles of the color palette
10
+ * @internal
11
+ */
12
+ static styles: import("lit").CSSResult;
13
+ /**
14
+ * Set the color palette to a disabled state
15
+ */
16
+ disabled: boolean;
17
+ /**
18
+ * Set the color palette to a focused state
19
+ */
20
+ focused: boolean;
21
+ /**
22
+ * Set the color palette to a selected state
23
+ */
24
+ selected: boolean;
25
+ /**
26
+ * Set the color palette to an active state
27
+ */
28
+ active: boolean;
29
+ /**
30
+ * Identifies this color palette within its color palette group
31
+ */
32
+ value?: string;
33
+ /**
34
+ * Set the colors to be displayed in the color palette
35
+ */
36
+ colors?: string[];
37
+ /**
38
+ * Set the color palette to a reverse state
39
+ */
40
+ reverse: boolean;
41
+ /**
42
+ * Set the color palette to a horizontal state
43
+ */
44
+ horizontal: boolean;
45
+ /**
46
+ * @internal
47
+ */
48
+ get focusElement(): HTMLElement;
49
+ protected render(): import("lit-html").TemplateResult<1>;
50
+ protected firstUpdated(changedProperties: Map<string, any>): void;
51
+ protected updated(changes: PropertyValues): void;
52
+ }
53
+ export {};
@@ -0,0 +1,18 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../base-CBCg3yyw.cjs"),u=require("../focusable-EbipgXRh.cjs"),n=require("../sized-mixin-CPxE5C96.cjs"),h=":host{box-sizing:border-box}:host([focused]),:host(:focus-visible){outline:none}:host([focused]) #palette,:host(:focus-visible) #palette{border:var(--luzmo-color-palette-focus-indicator-width, var(--color-palette-focus-indicator-width)) solid var(--luzmo-color-palette-focus-indicator-color, var(--color-palette-focus-indicator-color))!important}:host([disabled]){pointer-events:none;cursor:not-allowed}:host([disabled]) #palette{opacity:var(--luzmo-color-palette-disabled-opacity, .3);border-color:transparent!important;background-color:var(--luzmo-color-palette-disabled-background-color, var(--color-palette-disabled-background-color))!important}:host([selected]) #palette{border-color:var(--luzmo-color-palette-selected-border-color, var(--color-palette-selected-border-color));background-color:var(--luzmo-color-palette-selected-background-color, var(--color-palette-selected-background-color))}:host:hover #palette{border-color:var(--luzmo-color-palette-hover-border-color, var(--color-palette-hover-border-color))}#palette{box-sizing:border-box;height:100%;width:fit-content;padding:var(--luzmo-color-palette-padding, var(--color-palette-padding));border:var(--luzmo-color-palette-border-width, var(--color-palette-border-width)) solid transparent;cursor:pointer;border-radius:var(--luzmo-color-palette-border-radius, var(--color-palette-border-radius));display:flex}#palette>div{box-sizing:border-box;border:var(--luzmo-color-palette-color-border-width, var(--color-palette-color-border-width)) solid var(--luzmo-color-palette-color-border-color, var(--color-palette-color-border-color));height:var(--luzmo-color-palette-color-height, var(--color-palette-color-height));width:var(--luzmo-color-palette-color-width, var(--color-palette-color-width))}#palette:hover{background-color:var(--luzmo-color-palette-hover-background-color, var(--color-palette-hover-background-color))}#palette:focus-visible{outline:none}:host(:not([reverse]):not([horizontal])) #palette{flex-direction:column}:host(:not([reverse]):not([horizontal])) #palette>div:not(:first-child){border-top:0}:host(:not([reverse]):not([horizontal])) #palette>div:first-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host(:not([reverse]):not([horizontal])) #palette>div:last-child{border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([reverse]:not([horizontal])) #palette{flex-direction:column-reverse}:host([reverse]:not([horizontal])) #palette>div:not(:first-child){border-bottom:0}:host([reverse]:not([horizontal])) #palette>div:first-child{border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([reverse]:not([horizontal])) #palette>div:last-child{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal]:not([reverse])) #palette{flex-direction:row}:host([horizontal]:not([reverse])) #palette>div:not(:first-child){border-left:0}:host([horizontal]:not([reverse])) #palette>div:first-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal]:not([reverse])) #palette>div:last-child{border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal][reverse]) #palette{flex-direction:row-reverse}:host([horizontal][reverse]) #palette>div:not(:first-child){border-right:0}:host([horizontal][reverse]) #palette>div:first-child{border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal][reverse]) #palette>div:last-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host{--color-palette-padding: var(--luzmo-spacing-1);--color-palette-background-color: transparent;--color-palette-hover-background-color: var( --luzmo-background-color-highlight );--color-palette-selected-border-color: var(--luzmo-border-color-down);--color-palette-selected-background-color: var( --luzmo-background-color-highlight-hover );--color-palette-disabled-background-color: transparent;--color-palette-border-width: var(--luzmo-border-width);--color-palette-hover-border-color: var(--luzmo-border-color);--color-palette-focus-indicator-width: var(--luzmo-indicator-width);--color-palette-focus-indicator-color: var(--luzmo-indicator-color);--color-palette-color-width: var(--luzmo-spacing-5);--color-palette-color-height: 1.25rem;--color-palette-color-border-radius: var(--luzmo-border-radius);--color-palette-color-border-width: var(--luzmo-border-width);--color-palette-color-border-color: var(--luzmo-border-color);--color-palette-border-radius: calc( var(--color-palette-color-border-radius) + var(--color-palette-padding) )}:host([horizontal]){--color-palette-color-height: var(--luzmo-spacing-5);--color-palette-color-width: 1.25rem}:host([size=s]){--color-palette-color-width: .75rem;--color-palette-color-height: var(--luzmo-spacing-5);--color-palette-padding: var(--luzmo-spacing-1);--color-palette-color-border-radius: var(--luzmo-border-radius-s)}:host([size=s][horizontal]){--color-palette-color-height: .75rem;--color-palette-color-width: var(--luzmo-spacing-5)}:host([size=l]){--color-palette-color-width: 1.25rem;--color-palette-color-height: 1.5rem;--color-palette-padding: var(--luzmo-spacing-2);--color-palette-color-border-radius: var(--luzmo-border-radius-l)}:host([size=l][horizontal]){--color-palette-color-height: 1.25rem;--color-palette-color-width: 1.5rem}:host([size=xl]){--color-palette-color-width: 1.5rem;--color-palette-color-height: 1.75rem;--color-palette-padding: var(--luzmo-spacing-2);--color-palette-color-border-radius: var(--luzmo-border-radius-xl)}:host([size=xl][horizontal]){--color-palette-color-height: 1.5rem;--color-palette-color-width: 1.75rem}";var b=Object.defineProperty,t=(i,e,a,s)=>{for(var l=void 0,d=i.length-1,p;d>=0;d--)(p=i[d])&&(l=p(e,a,l)||l);return l&&b(e,a,l),l};const c=class c extends n.SizedMixin(u.Focusable,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(...arguments),this.disabled=!1,this.focused=!1,this.selected=!1,this.active=!1,this.reverse=!1,this.horizontal=!1}get focusElement(){return this}render(){var a;const e=(a=this.colors)==null?void 0:a.map(s=>r.x`<div class="color" style="background-color: ${s}"></div>`);return r.x` <div id="palette">${e}</div> `}firstUpdated(e){super.firstUpdated(e)}updated(e){super.updated(e),e.has("selected")&&this.setAttribute("tabindex",this.selected?"0":"-1"),e.has("disabled")&&(this.disabled?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"))}};c.styles=r.r(h);let o=c;t([r.n({type:Boolean,reflect:!0})],o.prototype,"disabled");t([r.n({type:Boolean,reflect:!0})],o.prototype,"focused");t([r.n({type:Boolean,reflect:!0})],o.prototype,"selected");t([r.n({type:Boolean,reflect:!0})],o.prototype,"active");t([r.n({type:String,reflect:!0})],o.prototype,"value");t([r.n({type:Array,reflect:!0})],o.prototype,"colors");t([r.n({type:Boolean,reflect:!0})],o.prototype,"reverse");t([r.n({type:Boolean,reflect:!0})],o.prototype,"horizontal");customElements.get("luzmo-color-palette")||customElements.define("luzmo-color-palette",o);exports.LuzmoColorPalette=o;
@@ -0,0 +1,7 @@
1
+ import { LuzmoColorPalette } from './color-palette';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'luzmo-color-palette': LuzmoColorPalette;
5
+ }
6
+ }
7
+ export { LuzmoColorPalette } from './color-palette';
@@ -0,0 +1,88 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ import { r as m, x as p, n as e } from "../base-WsynuqaS.js";
19
+ import { F as b } from "../focusable-BxtpnzWp.js";
20
+ import { S as z } from "../sized-mixin-D4ACoVUr.js";
21
+ const n = () => {
22
+ if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
23
+ const t = document.createElement("style");
24
+ t.setAttribute("data-luzmo-vars", ""), t.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(t);
25
+ }
26
+ };
27
+ n();
28
+ const h = ":host{box-sizing:border-box}:host([focused]),:host(:focus-visible){outline:none}:host([focused]) #palette,:host(:focus-visible) #palette{border:var(--luzmo-color-palette-focus-indicator-width, var(--color-palette-focus-indicator-width)) solid var(--luzmo-color-palette-focus-indicator-color, var(--color-palette-focus-indicator-color))!important}:host([disabled]){pointer-events:none;cursor:not-allowed}:host([disabled]) #palette{opacity:var(--luzmo-color-palette-disabled-opacity, .3);border-color:transparent!important;background-color:var(--luzmo-color-palette-disabled-background-color, var(--color-palette-disabled-background-color))!important}:host([selected]) #palette{border-color:var(--luzmo-color-palette-selected-border-color, var(--color-palette-selected-border-color));background-color:var(--luzmo-color-palette-selected-background-color, var(--color-palette-selected-background-color))}:host:hover #palette{border-color:var(--luzmo-color-palette-hover-border-color, var(--color-palette-hover-border-color))}#palette{box-sizing:border-box;height:100%;width:fit-content;padding:var(--luzmo-color-palette-padding, var(--color-palette-padding));border:var(--luzmo-color-palette-border-width, var(--color-palette-border-width)) solid transparent;cursor:pointer;border-radius:var(--luzmo-color-palette-border-radius, var(--color-palette-border-radius));display:flex}#palette>div{box-sizing:border-box;border:var(--luzmo-color-palette-color-border-width, var(--color-palette-color-border-width)) solid var(--luzmo-color-palette-color-border-color, var(--color-palette-color-border-color));height:var(--luzmo-color-palette-color-height, var(--color-palette-color-height));width:var(--luzmo-color-palette-color-width, var(--color-palette-color-width))}#palette:hover{background-color:var(--luzmo-color-palette-hover-background-color, var(--color-palette-hover-background-color))}#palette:focus-visible{outline:none}:host(:not([reverse]):not([horizontal])) #palette{flex-direction:column}:host(:not([reverse]):not([horizontal])) #palette>div:not(:first-child){border-top:0}:host(:not([reverse]):not([horizontal])) #palette>div:first-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host(:not([reverse]):not([horizontal])) #palette>div:last-child{border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([reverse]:not([horizontal])) #palette{flex-direction:column-reverse}:host([reverse]:not([horizontal])) #palette>div:not(:first-child){border-bottom:0}:host([reverse]:not([horizontal])) #palette>div:first-child{border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([reverse]:not([horizontal])) #palette>div:last-child{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal]:not([reverse])) #palette{flex-direction:row}:host([horizontal]:not([reverse])) #palette>div:not(:first-child){border-left:0}:host([horizontal]:not([reverse])) #palette>div:first-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal]:not([reverse])) #palette>div:last-child{border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal][reverse]) #palette{flex-direction:row-reverse}:host([horizontal][reverse]) #palette>div:not(:first-child){border-right:0}:host([horizontal][reverse]) #palette>div:first-child{border-top-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-right-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host([horizontal][reverse]) #palette>div:last-child{border-top-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius));border-bottom-left-radius:var(--luzmo-color-palette-color-border-radius, var(--color-palette-color-border-radius))}:host{--color-palette-padding: var(--luzmo-spacing-1);--color-palette-background-color: transparent;--color-palette-hover-background-color: var( --luzmo-background-color-highlight );--color-palette-selected-border-color: var(--luzmo-border-color-down);--color-palette-selected-background-color: var( --luzmo-background-color-highlight-hover );--color-palette-disabled-background-color: transparent;--color-palette-border-width: var(--luzmo-border-width);--color-palette-hover-border-color: var(--luzmo-border-color);--color-palette-focus-indicator-width: var(--luzmo-indicator-width);--color-palette-focus-indicator-color: var(--luzmo-indicator-color);--color-palette-color-width: var(--luzmo-spacing-5);--color-palette-color-height: 1.25rem;--color-palette-color-border-radius: var(--luzmo-border-radius);--color-palette-color-border-width: var(--luzmo-border-width);--color-palette-color-border-color: var(--luzmo-border-color);--color-palette-border-radius: calc( var(--color-palette-color-border-radius) + var(--color-palette-padding) )}:host([horizontal]){--color-palette-color-height: var(--luzmo-spacing-5);--color-palette-color-width: 1.25rem}:host([size=s]){--color-palette-color-width: .75rem;--color-palette-color-height: var(--luzmo-spacing-5);--color-palette-padding: var(--luzmo-spacing-1);--color-palette-color-border-radius: var(--luzmo-border-radius-s)}:host([size=s][horizontal]){--color-palette-color-height: .75rem;--color-palette-color-width: var(--luzmo-spacing-5)}:host([size=l]){--color-palette-color-width: 1.25rem;--color-palette-color-height: 1.5rem;--color-palette-padding: var(--luzmo-spacing-2);--color-palette-color-border-radius: var(--luzmo-border-radius-l)}:host([size=l][horizontal]){--color-palette-color-height: 1.25rem;--color-palette-color-width: 1.5rem}:host([size=xl]){--color-palette-color-width: 1.5rem;--color-palette-color-height: 1.75rem;--color-palette-padding: var(--luzmo-spacing-2);--color-palette-color-border-radius: var(--luzmo-border-radius-xl)}:host([size=xl][horizontal]){--color-palette-color-height: 1.5rem;--color-palette-color-width: 1.75rem}";
29
+ var v = Object.defineProperty, l = (t, r, c, s) => {
30
+ for (var a = void 0, d = t.length - 1, u; d >= 0; d--)
31
+ (u = t[d]) && (a = u(r, c, a) || a);
32
+ return a && v(r, c, a), a;
33
+ };
34
+ const i = class i extends z(b, {
35
+ validSizes: ["s", "m", "l", "xl"],
36
+ noDefaultSize: !0
37
+ }) {
38
+ constructor() {
39
+ super(...arguments), this.disabled = !1, this.focused = !1, this.selected = !1, this.active = !1, this.reverse = !1, this.horizontal = !1;
40
+ }
41
+ /**
42
+ * @internal
43
+ */
44
+ get focusElement() {
45
+ return this;
46
+ }
47
+ render() {
48
+ var c;
49
+ const r = (c = this.colors) == null ? void 0 : c.map((s) => p`<div class="color" style="background-color: ${s}"></div>`);
50
+ return p` <div id="palette">${r}</div> `;
51
+ }
52
+ firstUpdated(r) {
53
+ super.firstUpdated(r);
54
+ }
55
+ updated(r) {
56
+ super.updated(r), r.has("selected") && this.setAttribute("tabindex", this.selected ? "0" : "-1"), r.has("disabled") && (this.disabled ? this.setAttribute("aria-disabled", "true") : this.removeAttribute("aria-disabled"));
57
+ }
58
+ };
59
+ i.styles = m(h);
60
+ let o = i;
61
+ l([
62
+ e({ type: Boolean, reflect: !0 })
63
+ ], o.prototype, "disabled");
64
+ l([
65
+ e({ type: Boolean, reflect: !0 })
66
+ ], o.prototype, "focused");
67
+ l([
68
+ e({ type: Boolean, reflect: !0 })
69
+ ], o.prototype, "selected");
70
+ l([
71
+ e({ type: Boolean, reflect: !0 })
72
+ ], o.prototype, "active");
73
+ l([
74
+ e({ type: String, reflect: !0 })
75
+ ], o.prototype, "value");
76
+ l([
77
+ e({ type: Array, reflect: !0 })
78
+ ], o.prototype, "colors");
79
+ l([
80
+ e({ type: Boolean, reflect: !0 })
81
+ ], o.prototype, "reverse");
82
+ l([
83
+ e({ type: Boolean, reflect: !0 })
84
+ ], o.prototype, "horizontal");
85
+ customElements.get("luzmo-color-palette") || customElements.define("luzmo-color-palette", o);
86
+ export {
87
+ o as LuzmoColorPalette
88
+ };
@@ -0,0 +1,79 @@
1
+ import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
2
+ import { LuzmoElement } from '../../utils/base';
3
+ import { RovingTabindexController } from '../../utils/reactive-controllers/roving-tabindex';
4
+ import { LuzmoColorPalette } from '../color-palette';
5
+ declare const LuzmoColorPaletteGroup_base: typeof LuzmoElement & {
6
+ new (...args: any[]): import("../..").SizedElementInterface;
7
+ prototype: import("../..").SizedElementInterface;
8
+ };
9
+ /**
10
+ * @element luzmo-color-palette-group
11
+ * @slot - the luzmo-color-palette elements that make up the group
12
+ *
13
+ * @fires change - Announces the color palette value has been changed by user
14
+ */
15
+ export declare class LuzmoColorPaletteGroup extends LuzmoColorPaletteGroup_base {
16
+ /**
17
+ * The styles of the color palette
18
+ * @internal
19
+ */
20
+ static get styles(): CSSResultArray;
21
+ /**
22
+ * Set the color palette group to a disabled state
23
+ */
24
+ disabled: boolean;
25
+ /**
26
+ * Set the color palette group to a horizontal state
27
+ */
28
+ horizontal: boolean;
29
+ /**
30
+ * The color palette elements in the group
31
+ * @internal
32
+ */
33
+ set palettes(palettes: LuzmoColorPalette[]);
34
+ /**
35
+ * The color palette elements in the group
36
+ * @internal
37
+ */
38
+ get palettes(): LuzmoColorPalette[];
39
+ /**
40
+ * @internal
41
+ */
42
+ _palettes: LuzmoColorPalette[];
43
+ constructor();
44
+ rovingTabindexController: RovingTabindexController<LuzmoColorPalette>;
45
+ /**
46
+ * The aria-label of the color palette group
47
+ */
48
+ label: string;
49
+ /**
50
+ * @internal
51
+ */
52
+ private _selected?;
53
+ /**
54
+ * The selected color palette value
55
+ */
56
+ get selected(): string | undefined;
57
+ set selected(selected: string);
58
+ slotElement: HTMLSlotElement;
59
+ private dispatchChange;
60
+ private setSelected;
61
+ focus(options?: FocusOptions): void;
62
+ private deselectSelectedPalettes;
63
+ private _handleClick;
64
+ /**
65
+ * @internal
66
+ */
67
+ private _onKeyDown;
68
+ private applySelects;
69
+ private manageSelects;
70
+ protected render(): TemplateResult;
71
+ protected firstUpdated(changes: PropertyValues): void;
72
+ protected updated(changes: PropertyValues): void;
73
+ private manageChildren;
74
+ /**
75
+ * @internal
76
+ */
77
+ private manageColorPalettes;
78
+ }
79
+ export {};
@@ -0,0 +1,28 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../base-CBCg3yyw.cjs"),u=require("../mutation-controller-DkOMCW-c.cjs"),d=require("../query-BL-TJj7K.cjs"),p=require("../if-defined-C9YGdo33.cjs"),h=require("../roving-tabindex-By_fCy_e.cjs"),g=require("../sized-mixin-CPxE5C96.cjs"),m=".color-palette-group{column-gap:var(--luzmo-color-palette-group-column-gap, var(--color-palette-group-column-gap));row-gap:var(--luzmo-color-palette-group-row-gap, var(--color-palette-group-row-gap));flex-wrap:wrap;display:flex}::slotted(*){flex-shrink:0}::slotted(:focus-visible){z-index:1}:host{--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}:host([size=s]){--color-palette-group-column-gap: var(--luzmo-spacing-2);--color-palette-group-row-gap: var(--luzmo-spacing-2)}:host,:host([size=l]),:host([size=xl]){--color-palette-group-column-gap: var(--luzmo-spacing-3);--color-palette-group-row-gap: var(--luzmo-spacing-3)}";var f=Object.defineProperty,b=Object.getOwnPropertyDescriptor,o=(n,e,t,s)=>{for(var a=s>1?void 0:s?b(e,t):e,l=n.length-1,c;l>=0;l--)(c=n[l])&&(a=(s?c(e,t,a):c(a))||a);return s&&a&&f(e,t,a),a};class i extends g.SizedMixin(r.LuzmoElement,{validSizes:["s","m","l","xl"],noDefaultSize:!0}){constructor(){super(),this.disabled=!1,this.horizontal=!1,this._palettes=[],this.rovingTabindexController=new h.RovingTabindexController(this,{focusInIndex:e=>e.findIndex(t=>this.selected?!t.disabled&&t.value===this.selected:!t.disabled),elements:()=>this.palettes,isFocusableElement:e=>!e.disabled}),this.label="",this._onKeyDown=e=>{if(e.code==="Enter"||e.code==="Space"){e.preventDefault();const t=e.target;if(t.value===void 0)return;this.deselectSelectedPalettes(),t.selected=!0,t.tabIndex=0,t.setAttribute("aria-checked","true"),this.setSelected(t.value,!0)}},this.manageColorPalettes=()=>{if(!this.slotElement)return;const t=this.slotElement.assignedElements({flatten:!0}).reduce((s,a)=>{if(a.matches("luzmo-color-palette"))s.push(a);else{const l=[...a.querySelectorAll(":scope > luzmo-color-palette")];s.push(...l)}return s},[]);this.palettes=t,this.manageChildren(),this.manageSelects()},new u.s(this,{config:{childList:!0,subtree:!0},callback:()=>{this.manageColorPalettes()},skipInitial:!0})}static get styles(){return[r.r(m)]}set palettes(e){e!==this.palettes&&(this._palettes=e,this.rovingTabindexController.clearElementCache())}get palettes(){return this._palettes}get selected(){return this._selected}set selected(e){this.requestUpdate("selected",this._selected),this._selected=e,this.updateComplete.then(()=>{this.applySelects(),this.manageChildren()})}dispatchChange(e){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0,cancelable:!0}))||(this.setSelected(e),this.palettes.map(s=>{s.selected=!!(s.value&&this.selected===s.value)}))}setSelected(e,t){if(e===this.selected)return;const s=this.selected;this.requestUpdate("selected",s),this._selected=e,t&&this.dispatchChange(s)}focus(e){this.rovingTabindexController.focus(e)}deselectSelectedPalettes(){this.palettes.forEach(e=>{e.selected&&(e.selected=!1,e.tabIndex=-1,e.setAttribute("aria-checked","false"))})}_handleClick(e){const t=e.target;t.value!==void 0&&(this.deselectSelectedPalettes(),t.selected=!0,t.tabIndex=0,t.setAttribute("aria-checked","true"),this.setSelected(t.value,!0))}async applySelects(){await this.manageSelects()}async manageSelects(){if(this.palettes.length===0)return;const e=this.palettes;this.setAttribute("role","radiogroup");const t=[],s=e.map(async l=>{await l.updateComplete,l.setAttribute("role","radio"),l.setAttribute("aria-checked",l.selected?"true":"false"),l.selected&&t.push(l)});await Promise.all(s);const a=t.map(l=>l.value).find(Boolean);this.setSelected(a)}render(){return r.x`
19
+ <div
20
+ class="color-palette-group"
21
+ aria-label=${p.o(this.label??void 0)}
22
+ role="radiogroup"
23
+ @keydown=${this._onKeyDown}
24
+ @slotchange=${this.manageColorPalettes}
25
+ >
26
+ <slot role="presentation"></slot>
27
+ </div>
28
+ `}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",this._handleClick)}updated(e){super.updated(e),e.has("horizontal")&&this.palettes.forEach(s=>{s.horizontal=this.horizontal}),this.manageSelects(),this.manageChildren(),e.has("size")&&this.manageChildren(e),e.has("label")&&(this.label||e.get("label")!==void 0)&&(this.label.length>0?this.setAttribute("aria-label",this.label):this.removeAttribute("aria-label"))}manageChildren(e){this.palettes.forEach(t=>{t.setAttribute("aria-label",`color palette: ${t.value}`),t.selected=!!(t.value&&this.selected===t.value),this.size&&(this.size!=="m"||(e==null?void 0:e.get("size"))!==void 0)&&(t.size=this.size),this.disabled&&(t.disabled=!0),t.horizontal=this.horizontal})}}o([r.n({type:Boolean,reflect:!0})],i.prototype,"disabled",2);o([r.n({type:Boolean,reflect:!0})],i.prototype,"horizontal",2);o([r.n({type:String})],i.prototype,"label",2);o([r.n({type:String})],i.prototype,"selected",1);o([d.e("slot")],i.prototype,"slotElement",2);customElements.get("luzmo-color-palette-group")||customElements.define("luzmo-color-palette-group",i);exports.LuzmoColorPaletteGroup=i;
@@ -0,0 +1,7 @@
1
+ import { LuzmoColorPaletteGroup } from './color-palette-group';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'luzmo-color-palette-group': LuzmoColorPaletteGroup;
5
+ }
6
+ }
7
+ export { LuzmoColorPaletteGroup } from './color-palette-group';