@lukso/web-components 1.126.0 → 1.127.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.
@@ -0,0 +1,3 @@
1
+ import type { IconOptions } from '../../../components/lukso-icon/index.js';
2
+ export declare const playLinear: (options: IconOptions) => import("lit-html").TemplateResult<1>;
3
+ //# sourceMappingURL=play-linear.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"play-linear.d.ts","sourceRoot":"","sources":["../../../../../../src/components/lukso-icon/icons/play-linear.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE,eAAO,MAAM,UAAU,YAAa,WAAW,yCAqB9C,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { IconOptions } from '../../../components/lukso-icon/index.js';
2
+ export declare const profileCircle: (options: IconOptions) => import("lit-html").TemplateResult<1>;
3
+ //# sourceMappingURL=profile-circle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-circle.d.ts","sourceRoot":"","sources":["../../../../../../src/components/lukso-icon/icons/profile-circle.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE,eAAO,MAAM,aAAa,YAAa,WAAW,yCAkCjD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { IconOptions } from '../../../components/lukso-icon/index.js';
2
+ export declare const stopLinear: (options: IconOptions) => import("lit-html").TemplateResult<1>;
3
+ //# sourceMappingURL=stop-linear.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stop-linear.d.ts","sourceRoot":"","sources":["../../../../../../src/components/lukso-icon/icons/stop-linear.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE,eAAO,MAAM,UAAU,YAAa,WAAW,yCAoB9C,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { IconOptions } from '../../../components/lukso-icon/index.js';
2
+ export declare const userCircleAdd: (options: IconOptions) => import("lit-html").TemplateResult<1>;
3
+ //# sourceMappingURL=user-circle-add.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-circle-add.d.ts","sourceRoot":"","sources":["../../../../../../src/components/lukso-icon/icons/user-circle-add.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE,eAAO,MAAM,aAAa,YAAa,WAAW,yCA0DjD,CAAA"}
@@ -7581,6 +7581,147 @@ const flash = (options) => {
7581
7581
  </svg> `;
7582
7582
  };
7583
7583
 
7584
+ const userCircleAdd = (options) => {
7585
+ return shared_tailwindElement_index.x`<svg
7586
+ width="24"
7587
+ height="24"
7588
+ viewBox="0 0 24 24"
7589
+ fill="none"
7590
+ xmlns="http://www.w3.org/2000/svg"
7591
+ style=${styleMap.o({
7592
+ width: `${options.width}px`,
7593
+ height: `${options.height}px`
7594
+ })}
7595
+ >
7596
+ <path
7597
+ d="M11.4599 13.73C13.0118 13.73 14.2699 12.4719 14.2699 10.92C14.2699 9.36806 13.0118 8.10999 11.4599 8.10999C9.90798 8.10999 8.6499 9.36806 8.6499 10.92C8.6499 12.4719 9.90798 13.73 11.4599 13.73Z"
7598
+ stroke="var(--${options.color})"
7599
+ stroke-width="${options.strokeWidth}"
7600
+ stroke-linecap="round"
7601
+ stroke-linejoin="round"
7602
+ />
7603
+ <path
7604
+ d="M16.65 20.2C16.65 17.87 14.33 15.97 11.46 15.97C8.59002 15.97 6.27002 17.86 6.27002 20.2"
7605
+ stroke="var(--${options.color})"
7606
+ stroke-width="${options.strokeWidth}"
7607
+ stroke-linecap="round"
7608
+ stroke-linejoin="round"
7609
+ />
7610
+ <path
7611
+ d="M21 12.5C21 17.75 16.75 22 11.5 22C6.25 22 2 17.75 2 12.5C2 7.25 6.25 3 11.5 3C12.81 3 14.06 3.25999 15.2 3.73999C15.07 4.13999 15 4.56 15 5C15 5.75 15.21 6.46 15.58 7.06C15.78 7.4 16.04 7.70997 16.34 7.96997C17.04 8.60997 17.97 9 19 9C19.44 9 19.86 8.92998 20.25 8.78998C20.73 9.92998 21 11.19 21 12.5Z"
7612
+ stroke="var(--${options.color})"
7613
+ stroke-width="${options.strokeWidth}"
7614
+ stroke-linecap="round"
7615
+ stroke-linejoin="round"
7616
+ />
7617
+ <path
7618
+ d="M23 5C23 5.32 22.96 5.62999 22.88 5.92999C22.79 6.32999 22.63 6.72 22.42 7.06C21.94 7.87 21.17 8.49998 20.25 8.78998C19.86 8.92998 19.44 9 19 9C17.97 9 17.04 8.60997 16.34 7.96997C16.04 7.70997 15.78 7.4 15.58 7.06C15.21 6.46 15 5.75 15 5C15 4.56 15.07 4.13999 15.2 3.73999C15.39 3.15999 15.71 2.64002 16.13 2.21002C16.86 1.46002 17.88 1 19 1C20.18 1 21.25 1.51002 21.97 2.33002C22.61 3.04002 23 3.98 23 5Z"
7619
+ stroke="var(--${options.color})"
7620
+ stroke-width="${options.strokeWidth}"
7621
+ stroke-miterlimit="10"
7622
+ stroke-linecap="round"
7623
+ stroke-linejoin="round"
7624
+ />
7625
+ <path
7626
+ d="M20.49 4.97998H17.51"
7627
+ stroke="var(--${options.color})"
7628
+ stroke-width="${options.strokeWidth}"
7629
+ stroke-miterlimit="10"
7630
+ stroke-linecap="round"
7631
+ stroke-linejoin="round"
7632
+ />
7633
+ <path
7634
+ d="M19 3.52002V6.51001"
7635
+ stroke="var(--${options.color})"
7636
+ stroke-width="${options.strokeWidth}"
7637
+ stroke-miterlimit="10"
7638
+ stroke-linecap="round"
7639
+ stroke-linejoin="round"
7640
+ />
7641
+ </svg> `;
7642
+ };
7643
+
7644
+ const profileCircle = (options) => {
7645
+ return shared_tailwindElement_index.x`<svg
7646
+ width="24"
7647
+ height="24"
7648
+ viewBox="0 0 24 24"
7649
+ fill="none"
7650
+ xmlns="http://www.w3.org/2000/svg"
7651
+ style=${styleMap.o({
7652
+ width: `${options.width}px`,
7653
+ height: `${options.height}px`
7654
+ })}
7655
+ >
7656
+ <path
7657
+ d="M12.12 12.78C12.05 12.77 11.96 12.77 11.88 12.78C10.12 12.72 8.71997 11.28 8.71997 9.50998C8.71997 7.69998 10.18 6.22998 12 6.22998C13.81 6.22998 15.28 7.69998 15.28 9.50998C15.27 11.28 13.88 12.72 12.12 12.78Z"
7658
+ stroke="var(--${options.color})"
7659
+ stroke-width="${options.strokeWidth}"
7660
+ stroke-linecap="round"
7661
+ stroke-linejoin="round"
7662
+ />
7663
+ <path
7664
+ d="M18.74 19.3801C16.96 21.0101 14.6 22.0001 12 22.0001C9.40001 22.0001 7.04001 21.0101 5.26001 19.3801C5.36001 18.4401 5.96001 17.5201 7.03001 16.8001C9.77001 14.9801 14.25 14.9801 16.97 16.8001C18.04 17.5201 18.64 18.4401 18.74 19.3801Z"
7665
+ stroke="var(--${options.color})"
7666
+ stroke-width="${options.strokeWidth}"
7667
+ stroke-linecap="round"
7668
+ stroke-linejoin="round"
7669
+ />
7670
+ <path
7671
+ d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
7672
+ stroke="var(--${options.color})"
7673
+ stroke-width="${options.strokeWidth}"
7674
+ stroke-linecap="round"
7675
+ stroke-linejoin="round"
7676
+ />
7677
+ </svg> `;
7678
+ };
7679
+
7680
+ const playLinear = (options) => {
7681
+ return shared_tailwindElement_index.x`<svg
7682
+ width="24"
7683
+ height="24"
7684
+ viewBox="0 0 24 24"
7685
+ fill="none"
7686
+ xmlns="http://www.w3.org/2000/svg"
7687
+ style=${styleMap.o({
7688
+ width: `${options.width}px`,
7689
+ height: `${options.height}px`
7690
+ })}
7691
+ >
7692
+ <path
7693
+ d="M4 12V8.44002C4 4.02002 7.13 2.21002 10.96 4.42002L14.05 6.20002L17.14 7.98002C20.97 10.19 20.97 13.81 17.14 16.02L14.05 17.8L10.96 19.58C7.13 21.79 4 19.98 4 15.56V12Z"
7694
+ stroke="var(--${options.color})"
7695
+ stroke-width="${options.strokeWidth}"
7696
+ stroke-miterlimit="10"
7697
+ stroke-linecap="round"
7698
+ stroke-linejoin="round"
7699
+ />
7700
+ </svg> `;
7701
+ };
7702
+
7703
+ const stopLinear = (options) => {
7704
+ return shared_tailwindElement_index.x`<svg
7705
+ width="24"
7706
+ height="24"
7707
+ viewBox="0 0 24 24"
7708
+ fill="none"
7709
+ xmlns="http://www.w3.org/2000/svg"
7710
+ style=${styleMap.o({
7711
+ width: `${options.width}px`,
7712
+ height: `${options.height}px`
7713
+ })}
7714
+ >
7715
+ <path
7716
+ d="M9.3 21H14.7C19.2 21 21 19.2 21 14.7V9.3C21 4.8 19.2 3 14.7 3H9.3C4.8 3 3 4.8 3 9.3V14.7C3 19.2 4.8 21 9.3 21Z"
7717
+ stroke="var(--${options.color})"
7718
+ stroke-width="${options.strokeWidth}"
7719
+ stroke-linecap="round"
7720
+ stroke-linejoin="round"
7721
+ />
7722
+ </svg> `;
7723
+ };
7724
+
7584
7725
  var __defProp = Object.defineProperty;
7585
7726
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7586
7727
  var __decorateClass = (decorators, target, key, kind) => {
@@ -7788,7 +7929,11 @@ const iconMap = {
7788
7929
  gas,
7789
7930
  "minus-filled": minusFilled,
7790
7931
  category,
7791
- flash
7932
+ flash,
7933
+ "user-circle-add": userCircleAdd,
7934
+ "profile-circle": profileCircle,
7935
+ "play-linear": playLinear,
7936
+ "stop-linear": stopLinear
7792
7937
  };
7793
7938
  exports.LuksoIcon = class LuksoIcon extends shared_tailwindElement_index.TailwindStyledElement(style) {
7794
7939
  constructor() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-icon/index.ts"],"names":[],"mappings":"AAyMA,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAA;;AA+M5E,qBACa,SAAU,SAAQ,cAA4B;IAEzD,IAAI,SAAK;IAGT,IAAI,SAAW;IAGf,KAAK,SAAe;IAGpB,cAAc,SAAK;IAEnB,OAAO,CAAC,KAAK,CA0BZ;IAED,MAAM;CAyBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAA;KACxB;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-icon/index.ts"],"names":[],"mappings":"AA6MA,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAA;;AAmN5E,qBACa,SAAU,SAAQ,cAA4B;IAEzD,IAAI,SAAK;IAGT,IAAI,SAAW;IAGf,KAAK,SAAe;IAGpB,cAAc,SAAK;IAEnB,OAAO,CAAC,KAAK,CA0BZ;IAED,MAAM;CAyBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAA;KACxB;CACF"}
@@ -7577,6 +7577,147 @@ const flash = (options) => {
7577
7577
  </svg> `;
7578
7578
  };
7579
7579
 
7580
+ const userCircleAdd = (options) => {
7581
+ return x`<svg
7582
+ width="24"
7583
+ height="24"
7584
+ viewBox="0 0 24 24"
7585
+ fill="none"
7586
+ xmlns="http://www.w3.org/2000/svg"
7587
+ style=${o({
7588
+ width: `${options.width}px`,
7589
+ height: `${options.height}px`
7590
+ })}
7591
+ >
7592
+ <path
7593
+ d="M11.4599 13.73C13.0118 13.73 14.2699 12.4719 14.2699 10.92C14.2699 9.36806 13.0118 8.10999 11.4599 8.10999C9.90798 8.10999 8.6499 9.36806 8.6499 10.92C8.6499 12.4719 9.90798 13.73 11.4599 13.73Z"
7594
+ stroke="var(--${options.color})"
7595
+ stroke-width="${options.strokeWidth}"
7596
+ stroke-linecap="round"
7597
+ stroke-linejoin="round"
7598
+ />
7599
+ <path
7600
+ d="M16.65 20.2C16.65 17.87 14.33 15.97 11.46 15.97C8.59002 15.97 6.27002 17.86 6.27002 20.2"
7601
+ stroke="var(--${options.color})"
7602
+ stroke-width="${options.strokeWidth}"
7603
+ stroke-linecap="round"
7604
+ stroke-linejoin="round"
7605
+ />
7606
+ <path
7607
+ d="M21 12.5C21 17.75 16.75 22 11.5 22C6.25 22 2 17.75 2 12.5C2 7.25 6.25 3 11.5 3C12.81 3 14.06 3.25999 15.2 3.73999C15.07 4.13999 15 4.56 15 5C15 5.75 15.21 6.46 15.58 7.06C15.78 7.4 16.04 7.70997 16.34 7.96997C17.04 8.60997 17.97 9 19 9C19.44 9 19.86 8.92998 20.25 8.78998C20.73 9.92998 21 11.19 21 12.5Z"
7608
+ stroke="var(--${options.color})"
7609
+ stroke-width="${options.strokeWidth}"
7610
+ stroke-linecap="round"
7611
+ stroke-linejoin="round"
7612
+ />
7613
+ <path
7614
+ d="M23 5C23 5.32 22.96 5.62999 22.88 5.92999C22.79 6.32999 22.63 6.72 22.42 7.06C21.94 7.87 21.17 8.49998 20.25 8.78998C19.86 8.92998 19.44 9 19 9C17.97 9 17.04 8.60997 16.34 7.96997C16.04 7.70997 15.78 7.4 15.58 7.06C15.21 6.46 15 5.75 15 5C15 4.56 15.07 4.13999 15.2 3.73999C15.39 3.15999 15.71 2.64002 16.13 2.21002C16.86 1.46002 17.88 1 19 1C20.18 1 21.25 1.51002 21.97 2.33002C22.61 3.04002 23 3.98 23 5Z"
7615
+ stroke="var(--${options.color})"
7616
+ stroke-width="${options.strokeWidth}"
7617
+ stroke-miterlimit="10"
7618
+ stroke-linecap="round"
7619
+ stroke-linejoin="round"
7620
+ />
7621
+ <path
7622
+ d="M20.49 4.97998H17.51"
7623
+ stroke="var(--${options.color})"
7624
+ stroke-width="${options.strokeWidth}"
7625
+ stroke-miterlimit="10"
7626
+ stroke-linecap="round"
7627
+ stroke-linejoin="round"
7628
+ />
7629
+ <path
7630
+ d="M19 3.52002V6.51001"
7631
+ stroke="var(--${options.color})"
7632
+ stroke-width="${options.strokeWidth}"
7633
+ stroke-miterlimit="10"
7634
+ stroke-linecap="round"
7635
+ stroke-linejoin="round"
7636
+ />
7637
+ </svg> `;
7638
+ };
7639
+
7640
+ const profileCircle = (options) => {
7641
+ return x`<svg
7642
+ width="24"
7643
+ height="24"
7644
+ viewBox="0 0 24 24"
7645
+ fill="none"
7646
+ xmlns="http://www.w3.org/2000/svg"
7647
+ style=${o({
7648
+ width: `${options.width}px`,
7649
+ height: `${options.height}px`
7650
+ })}
7651
+ >
7652
+ <path
7653
+ d="M12.12 12.78C12.05 12.77 11.96 12.77 11.88 12.78C10.12 12.72 8.71997 11.28 8.71997 9.50998C8.71997 7.69998 10.18 6.22998 12 6.22998C13.81 6.22998 15.28 7.69998 15.28 9.50998C15.27 11.28 13.88 12.72 12.12 12.78Z"
7654
+ stroke="var(--${options.color})"
7655
+ stroke-width="${options.strokeWidth}"
7656
+ stroke-linecap="round"
7657
+ stroke-linejoin="round"
7658
+ />
7659
+ <path
7660
+ d="M18.74 19.3801C16.96 21.0101 14.6 22.0001 12 22.0001C9.40001 22.0001 7.04001 21.0101 5.26001 19.3801C5.36001 18.4401 5.96001 17.5201 7.03001 16.8001C9.77001 14.9801 14.25 14.9801 16.97 16.8001C18.04 17.5201 18.64 18.4401 18.74 19.3801Z"
7661
+ stroke="var(--${options.color})"
7662
+ stroke-width="${options.strokeWidth}"
7663
+ stroke-linecap="round"
7664
+ stroke-linejoin="round"
7665
+ />
7666
+ <path
7667
+ d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
7668
+ stroke="var(--${options.color})"
7669
+ stroke-width="${options.strokeWidth}"
7670
+ stroke-linecap="round"
7671
+ stroke-linejoin="round"
7672
+ />
7673
+ </svg> `;
7674
+ };
7675
+
7676
+ const playLinear = (options) => {
7677
+ return x`<svg
7678
+ width="24"
7679
+ height="24"
7680
+ viewBox="0 0 24 24"
7681
+ fill="none"
7682
+ xmlns="http://www.w3.org/2000/svg"
7683
+ style=${o({
7684
+ width: `${options.width}px`,
7685
+ height: `${options.height}px`
7686
+ })}
7687
+ >
7688
+ <path
7689
+ d="M4 12V8.44002C4 4.02002 7.13 2.21002 10.96 4.42002L14.05 6.20002L17.14 7.98002C20.97 10.19 20.97 13.81 17.14 16.02L14.05 17.8L10.96 19.58C7.13 21.79 4 19.98 4 15.56V12Z"
7690
+ stroke="var(--${options.color})"
7691
+ stroke-width="${options.strokeWidth}"
7692
+ stroke-miterlimit="10"
7693
+ stroke-linecap="round"
7694
+ stroke-linejoin="round"
7695
+ />
7696
+ </svg> `;
7697
+ };
7698
+
7699
+ const stopLinear = (options) => {
7700
+ return x`<svg
7701
+ width="24"
7702
+ height="24"
7703
+ viewBox="0 0 24 24"
7704
+ fill="none"
7705
+ xmlns="http://www.w3.org/2000/svg"
7706
+ style=${o({
7707
+ width: `${options.width}px`,
7708
+ height: `${options.height}px`
7709
+ })}
7710
+ >
7711
+ <path
7712
+ d="M9.3 21H14.7C19.2 21 21 19.2 21 14.7V9.3C21 4.8 19.2 3 14.7 3H9.3C4.8 3 3 4.8 3 9.3V14.7C3 19.2 4.8 21 9.3 21Z"
7713
+ stroke="var(--${options.color})"
7714
+ stroke-width="${options.strokeWidth}"
7715
+ stroke-linecap="round"
7716
+ stroke-linejoin="round"
7717
+ />
7718
+ </svg> `;
7719
+ };
7720
+
7580
7721
  var __defProp = Object.defineProperty;
7581
7722
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7582
7723
  var __decorateClass = (decorators, target, key, kind) => {
@@ -7784,7 +7925,11 @@ const iconMap = {
7784
7925
  gas,
7785
7926
  "minus-filled": minusFilled,
7786
7927
  category,
7787
- flash
7928
+ flash,
7929
+ "user-circle-add": userCircleAdd,
7930
+ "profile-circle": profileCircle,
7931
+ "play-linear": playLinear,
7932
+ "stop-linear": stopLinear
7788
7933
  };
7789
7934
  let LuksoIcon = class extends TailwindStyledElement(style) {
7790
7935
  constructor() {
@@ -204,9 +204,28 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
204
204
  }
205
205
  optionsTemplate() {
206
206
  const optionTemplates = [];
207
- for (const option of Object.entries(this.optionsParsed)) {
207
+ let _options = [];
208
+ const groups = this.optionsParsed.reduce((acc, option) => {
209
+ if ("group" in option && !acc.includes(option.group)) {
210
+ acc.push(option.group);
211
+ }
212
+ return acc;
213
+ }, []);
214
+ if (groups.length > 0) {
215
+ for (const group of groups) {
216
+ _options.push({
217
+ group,
218
+ values: this.optionsParsed.filter(
219
+ (option) => "group" in option && option.group === group
220
+ )
221
+ });
222
+ }
223
+ } else {
224
+ _options = this.optionsParsed;
225
+ }
226
+ for (const option of Object.entries(_options)) {
208
227
  const index = Number(option[0]);
209
- if ("values" in option[1]) {
228
+ if ("group" in option[1]) {
210
229
  optionTemplates.push(this.optionGroupedStringTemplate(option[1], index));
211
230
  } else if ("value" in option[1]) {
212
231
  optionTemplates.push(this.optionStringTemplate(option[1], index));
@@ -231,9 +250,9 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
231
250
  >
232
251
  ${option.group}
233
252
  </div>
234
- ${option.values.map((value, valueIndex) => {
253
+ ${option.values.map((value) => {
235
254
  return this.optionStringTemplate(
236
- { id: `${option.id}-${valueIndex}`, group: option.group, value },
255
+ { id: value.id, group: option.group, value: value.value },
237
256
  index
238
257
  );
239
258
  })}`;
@@ -305,22 +324,6 @@ exports.LuksoSelect = class LuksoSelect extends shared_tailwindElement_index.Tai
305
324
  );
306
325
  return foundValues.map((value) => this.optionStringValue(value)).join(", ");
307
326
  }
308
- if ("values" in firstOption) {
309
- const foundValues = [];
310
- for (const option of this.optionsParsed) {
311
- for (const [index, value] of option.values.entries()) {
312
- for (const parsedValue of this.valueParsed) {
313
- if (parsedValue.id === `${option.id}-${index}`) {
314
- foundValues.push({
315
- id: `${option.id}-${index}`,
316
- value
317
- });
318
- }
319
- }
320
- }
321
- }
322
- return foundValues.map((value) => this.optionStringValue(value)).join(", ");
323
- }
324
327
  if ("address" in firstOption) {
325
328
  const foundValues = this.optionsParsed.filter(
326
329
  (option) => !!this.valueParsed?.find((value) => value.id === option.id)
@@ -12,12 +12,7 @@ export type SelectProfileOption = {
12
12
  name?: string;
13
13
  isEOA?: boolean;
14
14
  };
15
- export type SelectGroupedStringOption = {
16
- id?: string;
17
- group: string;
18
- values: string[];
19
- };
20
- export type SelectOption = SelectStringOption | SelectProfileOption | SelectGroupedStringOption;
15
+ export type SelectOption = SelectStringOption | SelectProfileOption;
21
16
  declare const LuksoSelect_base: typeof import("lit").LitElement;
22
17
  export declare class LuksoSelect extends LuksoSelect_base {
23
18
  value: string;
@@ -53,7 +48,10 @@ export declare class LuksoSelect extends LuksoSelect_base {
53
48
  descriptionTemplate(): TemplateResult<1>;
54
49
  errorTemplate(): TemplateResult<1>;
55
50
  optionsTemplate(): TemplateResult<1>;
56
- optionGroupedStringTemplate(option: SelectGroupedStringOption, index: number): TemplateResult<1>;
51
+ optionGroupedStringTemplate(option: {
52
+ group: string;
53
+ values: SelectStringOption[];
54
+ }, index: number): TemplateResult<1>;
57
55
  optionStringTemplate(option: SelectStringOption, index: number): TemplateResult<1>;
58
56
  optionProfileTemplate(option: SelectProfileOption, index: number): TemplateResult<1>;
59
57
  private optionStringValue;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAiB,MAAM,KAAK,CAAA;AAM7E,OAAO,yBAAyB,CAAA;AAChC,OAAO,4BAA4B,CAAA;AACnC,OAAO,6BAA6B,CAAA;AACpC,OAAO,6BAA6B,CAAA;AACpC,OAAO,oCAAoC,CAAA;AAI3C,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAExD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,YAAY,GACpB,kBAAkB,GAClB,mBAAmB,GACnB,yBAAyB,CAAA;;AAE7B,qBACa,WAAY,SAAQ,gBAA4B;IAE3D,KAAK,SAAK;IAGV,WAAW,SAAK;IAGhB,KAAK,SAAK;IAGV,EAAE,SAAK;IAGP,WAAW,SAAK;IAGhB,KAAK,SAAK;IAGV,WAAW,UAAQ;IAGnB,UAAU,UAAQ;IAGlB,UAAU,UAAQ;IAGlB,UAAU,UAAQ;IAGlB,OAAO,SAAK;IAGZ,QAAQ,MAAY;I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;IAkDf,2BAA2B,CACzB,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,kBAAkB,EAAE,CAAA;KAC7B,EACD,KAAK,EAAE,MAAM;IAef,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM;IAiB9D,qBAAqB,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM;IAgBhE,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,qBAAqB;IAoC7B,OAAO,CAAC,0BAA0B;YAUpB,qBAAqB;YAqCrB,YAAY;YAiBZ,UAAU;IAcxB,OAAO,CAAC,WAAW;IAQnB,MAAM;CA6BP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAA;KAC5B;CACF"}
@@ -200,9 +200,28 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
200
200
  }
201
201
  optionsTemplate() {
202
202
  const optionTemplates = [];
203
- for (const option of Object.entries(this.optionsParsed)) {
203
+ let _options = [];
204
+ const groups = this.optionsParsed.reduce((acc, option) => {
205
+ if ("group" in option && !acc.includes(option.group)) {
206
+ acc.push(option.group);
207
+ }
208
+ return acc;
209
+ }, []);
210
+ if (groups.length > 0) {
211
+ for (const group of groups) {
212
+ _options.push({
213
+ group,
214
+ values: this.optionsParsed.filter(
215
+ (option) => "group" in option && option.group === group
216
+ )
217
+ });
218
+ }
219
+ } else {
220
+ _options = this.optionsParsed;
221
+ }
222
+ for (const option of Object.entries(_options)) {
204
223
  const index = Number(option[0]);
205
- if ("values" in option[1]) {
224
+ if ("group" in option[1]) {
206
225
  optionTemplates.push(this.optionGroupedStringTemplate(option[1], index));
207
226
  } else if ("value" in option[1]) {
208
227
  optionTemplates.push(this.optionStringTemplate(option[1], index));
@@ -227,9 +246,9 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
227
246
  >
228
247
  ${option.group}
229
248
  </div>
230
- ${option.values.map((value, valueIndex) => {
249
+ ${option.values.map((value) => {
231
250
  return this.optionStringTemplate(
232
- { id: `${option.id}-${valueIndex}`, group: option.group, value },
251
+ { id: value.id, group: option.group, value: value.value },
233
252
  index
234
253
  );
235
254
  })}`;
@@ -301,22 +320,6 @@ let LuksoSelect = class extends TailwindStyledElement(style) {
301
320
  );
302
321
  return foundValues.map((value) => this.optionStringValue(value)).join(", ");
303
322
  }
304
- if ("values" in firstOption) {
305
- const foundValues = [];
306
- for (const option of this.optionsParsed) {
307
- for (const [index, value] of option.values.entries()) {
308
- for (const parsedValue of this.valueParsed) {
309
- if (parsedValue.id === `${option.id}-${index}`) {
310
- foundValues.push({
311
- id: `${option.id}-${index}`,
312
- value
313
- });
314
- }
315
- }
316
- }
317
- }
318
- return foundValues.map((value) => this.optionStringValue(value)).join(", ");
319
- }
320
323
  if ("address" in firstOption) {
321
324
  const foundValues = this.optionsParsed.filter(
322
325
  (option) => !!this.valueParsed?.find((value) => value.id === option.id)
@@ -1 +1 @@
1
- {"version":3,"file":"lukso-select.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-select/lukso-select.stories.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,SAAS,CAAA;AAEhB,+DAA+D;AAC/D,QAAA,MAAM,IAAI,EAAE,IAuOX,CAAA;AAED,eAAe,IAAI,CAAA;AAyDnB,+CAA+C;AAC/C,eAAO,MAAM,aAAa,KAAoB,CAAA;AAK9C,6EAA6E;AAC7E,eAAO,MAAM,WAAW,KAAoB,CAAA;AAM5C,wCAAwC;AACxC,eAAO,MAAM,OAAO,KAAoB,CAAA;AAMxC,gDAAgD;AAChD,eAAO,MAAM,aAAa,KAAoB,CAAA;AAmC9C,kCAAkC;AAClC,eAAO,MAAM,WAAW,KAAoB,CAAA;AAM5C,gCAAgC;AAChC,eAAO,MAAM,WAAW,KAAoB,CAAA;AAe5C,uCAAuC;AACvC,eAAO,MAAM,iBAAiB,KAAoB,CAAA;AAOlD,kCAAkC;AAClC,eAAO,MAAM,aAAa,KAAoB,CAAA;AA2B9C,qCAAqC;AACrC,eAAO,MAAM,eAAe,KAAoB,CAAA"}
1
+ {"version":3,"file":"lukso-select.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-select/lukso-select.stories.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,SAAS,CAAA;AAEhB,+DAA+D;AAC/D,QAAA,MAAM,IAAI,EAAE,IAuOX,CAAA;AAED,eAAe,IAAI,CAAA;AAyDnB,+CAA+C;AAC/C,eAAO,MAAM,aAAa,KAAoB,CAAA;AAK9C,6EAA6E;AAC7E,eAAO,MAAM,WAAW,KAAoB,CAAA;AAM5C,wCAAwC;AACxC,eAAO,MAAM,OAAO,KAAoB,CAAA;AAMxC,gDAAgD;AAChD,eAAO,MAAM,aAAa,KAAoB,CAAA;AAmC9C,kCAAkC;AAClC,eAAO,MAAM,WAAW,KAAoB,CAAA;AAM5C,gCAAgC;AAChC,eAAO,MAAM,WAAW,KAAoB,CAAA;AAe5C,uCAAuC;AACvC,eAAO,MAAM,iBAAiB,KAAoB,CAAA;AAOlD,kCAAkC;AAClC,eAAO,MAAM,aAAa,KAAoB,CAAA;AAqC9C,qCAAqC;AACrC,eAAO,MAAM,eAAe,KAAoB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukso/web-components",
3
- "version": "1.126.0",
3
+ "version": "1.127.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",