@lukso/web-components 1.66.1 → 1.68.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 (71) hide show
  1. package/dist/{cn-4ec0bd94.cjs → cn-5a985a94.cjs} +48 -19
  2. package/dist/{cn-616567d4.js → cn-e708e7fa.js} +45 -16
  3. package/dist/components/index.cjs +5 -5
  4. package/dist/components/index.js +5 -5
  5. package/dist/components/lukso-button/index.cjs +5 -5
  6. package/dist/components/lukso-button/index.js +5 -5
  7. package/dist/components/lukso-card/index.cjs +6 -6
  8. package/dist/components/lukso-card/index.js +6 -6
  9. package/dist/components/lukso-checkbox/index.cjs +1 -1
  10. package/dist/components/lukso-checkbox/index.js +1 -1
  11. package/dist/components/lukso-footer/index.cjs +1 -1
  12. package/dist/components/lukso-footer/index.js +1 -1
  13. package/dist/components/lukso-icon/index.cjs +2 -2
  14. package/dist/components/lukso-icon/index.js +2 -2
  15. package/dist/components/lukso-input/index.cjs +1 -1
  16. package/dist/components/lukso-input/index.js +1 -1
  17. package/dist/components/lukso-modal/index.cjs +1 -1
  18. package/dist/components/lukso-modal/index.js +1 -1
  19. package/dist/components/lukso-navbar/index.cjs +5 -5
  20. package/dist/components/lukso-navbar/index.js +5 -5
  21. package/dist/components/lukso-profile/index.cjs +2 -2
  22. package/dist/components/lukso-profile/index.js +2 -2
  23. package/dist/components/lukso-progress/index.cjs +3 -3
  24. package/dist/components/lukso-progress/index.js +3 -3
  25. package/dist/components/lukso-sanitize/index.cjs +1 -1
  26. package/dist/components/lukso-sanitize/index.js +1 -1
  27. package/dist/components/lukso-search/index.cjs +3 -3
  28. package/dist/components/lukso-search/index.js +3 -3
  29. package/dist/components/lukso-select/index.cjs +8 -8
  30. package/dist/components/lukso-select/index.js +8 -8
  31. package/dist/components/lukso-share/index.cjs +1 -1
  32. package/dist/components/lukso-share/index.js +1 -1
  33. package/dist/components/lukso-switch/index.cjs +2 -2
  34. package/dist/components/lukso-switch/index.js +2 -2
  35. package/dist/components/lukso-tag/index.cjs +4 -4
  36. package/dist/components/lukso-tag/index.js +4 -4
  37. package/dist/components/lukso-terms/index.cjs +2 -2
  38. package/dist/components/lukso-terms/index.js +2 -2
  39. package/dist/components/lukso-test/index.cjs +1 -1
  40. package/dist/components/lukso-test/index.js +1 -1
  41. package/dist/components/lukso-tooltip/index.cjs +49 -23
  42. package/dist/components/lukso-tooltip/index.d.ts +10 -2
  43. package/dist/components/lukso-tooltip/index.d.ts.map +1 -1
  44. package/dist/components/lukso-tooltip/index.js +49 -23
  45. package/dist/components/lukso-tooltip/lukso-tooltip.stories.d.ts +3 -1
  46. package/dist/components/lukso-tooltip/lukso-tooltip.stories.d.ts.map +1 -1
  47. package/dist/components/lukso-username/index.cjs +2 -2
  48. package/dist/components/lukso-username/index.js +2 -2
  49. package/dist/components/lukso-wizard/index.cjs +64 -41
  50. package/dist/components/lukso-wizard/index.d.ts +3 -3
  51. package/dist/components/lukso-wizard/index.d.ts.map +1 -1
  52. package/dist/components/lukso-wizard/index.js +63 -40
  53. package/dist/components/lukso-wizard/lukso-wizard.stories.d.ts +0 -2
  54. package/dist/components/lukso-wizard/lukso-wizard.stories.d.ts.map +1 -1
  55. package/dist/{index-98e8e0d5.cjs → index-0e131d65.cjs} +1 -1
  56. package/dist/index-5cc4a839.cjs +46 -0
  57. package/dist/{index-e8741080.cjs → index-66211c85.cjs} +3 -3
  58. package/dist/index-814bcac2.js +39 -0
  59. package/dist/{index-1765cfe1.js → index-f171e7da.js} +1 -1
  60. package/dist/{index-c55a1069.js → index-faa8c4ae.js} +3 -3
  61. package/dist/index.cjs +5 -5
  62. package/dist/index.js +5 -5
  63. package/dist/shared/tailwind-element/index.cjs +1 -1
  64. package/dist/shared/tailwind-element/index.js +1 -1
  65. package/dist/{style-map-9fdda015.js → style-map-21f59b89.js} +1 -1
  66. package/dist/{style-map-c86dd6e2.cjs → style-map-7d4ddea1.cjs} +1 -1
  67. package/package.json +1 -1
  68. package/tools/cn.cjs +45 -16
  69. package/tools/cn.js +45 -16
  70. package/dist/index-3527fb14.js +0 -39
  71. package/dist/index-688c3040.cjs +0 -46
@@ -1,7 +1,8 @@
1
- import { T as TailwindStyledElement, x } from '../../index-3527fb14.js';
1
+ import { T as TailwindStyledElement, x } from '../../index-814bcac2.js';
2
2
  import { n, e } from '../../query-assigned-elements-5d94572f.js';
3
3
  import { t } from '../../state-0a779257.js';
4
- import { c as customClassMap } from '../../index-5e194caf.js';
4
+ import { i as ie } from '../../index-faa8c4ae.js';
5
+ import { o } from '../../style-map-21f59b89.js';
5
6
  import '../../directive-2bb7789e.js';
6
7
 
7
8
  var top = 'top';
@@ -3469,9 +3470,17 @@ let LuksoTooltip = class extends TailwindStyledElement(style) {
3469
3470
  this.copyText = "";
3470
3471
  this.copyValue = "";
3471
3472
  this.offset = 10;
3473
+ this.options = "";
3472
3474
  this.showCopy = false;
3473
- this.defaultTooltipStyles = "bg-neutral-20 p-4 hidden";
3475
+ this.optionsParsed = [];
3474
3476
  this.tooltipInstance = void 0;
3477
+ this.tooltipStyles = ie({
3478
+ slots: {
3479
+ tooltip: "hidden",
3480
+ trigger: "cursor-pointer flex flex-col items-center",
3481
+ options: "rounded-4 hover:bg-neutral-95"
3482
+ }
3483
+ });
3475
3484
  }
3476
3485
  hideOnClickCheck() {
3477
3486
  if (this.hideOnClick === "toggle") {
@@ -3491,7 +3500,7 @@ let LuksoTooltip = class extends TailwindStyledElement(style) {
3491
3500
  this.tooltipInstance.destroy();
3492
3501
  this.tooltipInstance = void 0;
3493
3502
  }
3494
- if (!this.text) {
3503
+ if (!this.text && !this.options) {
3495
3504
  return;
3496
3505
  }
3497
3506
  this.tooltipInstance = tippy(trigger, {
@@ -3523,25 +3532,44 @@ let LuksoTooltip = class extends TailwindStyledElement(style) {
3523
3532
  await this.updateComplete;
3524
3533
  if (changedProperties.has("show") && this.trigger === "manual") {
3525
3534
  if (this.show) {
3526
- !!!this.tooltipInstance && this.initTooltip();
3535
+ !this.tooltipInstance && this.initTooltip();
3527
3536
  this.tooltipInstance.show();
3528
3537
  } else {
3529
3538
  this.tooltipInstance?.hide();
3530
3539
  }
3531
3540
  return;
3532
3541
  }
3542
+ if (changedProperties.has("options") && !!this.options) {
3543
+ try {
3544
+ this.optionsParsed = JSON.parse(this.options);
3545
+ } catch (error) {
3546
+ console.warn("Could not parse options", error);
3547
+ }
3548
+ }
3533
3549
  this.initTooltip();
3534
3550
  }
3551
+ optionsTemplate() {
3552
+ const { options } = this.tooltipStyles();
3553
+ return x`<ul>
3554
+ ${Object.entries(this.optionsParsed)?.map(
3555
+ (option) => x`<li
3556
+ class=${options()}
3557
+ style=${o({
3558
+ padding: "4px 8px",
3559
+ cursor: "pointer"
3560
+ })}
3561
+ onClick="navigator.clipboard.writeText('${option[1].value}')"
3562
+ >
3563
+ ${option[1].text}
3564
+ </li>`
3565
+ )}
3566
+ </ul>`;
3567
+ }
3535
3568
  render() {
3569
+ const { tooltip, trigger } = this.tooltipStyles();
3536
3570
  return x`
3537
- <div
3538
- id="tooltip"
3539
- role="tooltip"
3540
- class=${customClassMap({
3541
- [this.defaultTooltipStyles]: true
3542
- })}
3543
- >
3544
- ${this.text}
3571
+ <div id="tooltip" role="tooltip" class=${tooltip()}>
3572
+ ${this.options ? this.optionsTemplate() : this.text}
3545
3573
  </div>
3546
3574
  ${this.isClipboardCopy ? x`<lukso-tooltip
3547
3575
  variant=${this.variant}
@@ -3553,18 +3581,10 @@ let LuksoTooltip = class extends TailwindStyledElement(style) {
3553
3581
  ?show=${this.showCopy ? true : void 0}
3554
3582
  text=${this.copyText}
3555
3583
  >
3556
- <div
3557
- id="trigger"
3558
- class="cursor-pointer flex flex-col items-center"
3559
- @click=${this.handleClick}
3560
- >
3584
+ <div id="trigger" class=${trigger()} @click=${this.handleClick}>
3561
3585
  <slot></slot>
3562
3586
  </div>
3563
- </lukso-tooltip>` : x`<div
3564
- id="trigger"
3565
- class="cursor-pointer flex flex-col items-center"
3566
- @click=${this.handleClick}
3567
- >
3587
+ </lukso-tooltip>` : x`<div id="trigger" class=${trigger()} @click=${this.handleClick}>
3568
3588
  <slot></slot>
3569
3589
  </div>`}
3570
3590
  `;
@@ -3606,9 +3626,15 @@ __decorateClass([
3606
3626
  __decorateClass([
3607
3627
  n({ type: Number })
3608
3628
  ], LuksoTooltip.prototype, "offset", 2);
3629
+ __decorateClass([
3630
+ n({ type: String })
3631
+ ], LuksoTooltip.prototype, "options", 2);
3609
3632
  __decorateClass([
3610
3633
  t()
3611
3634
  ], LuksoTooltip.prototype, "showCopy", 2);
3635
+ __decorateClass([
3636
+ t()
3637
+ ], LuksoTooltip.prototype, "optionsParsed", 2);
3612
3638
  LuksoTooltip = __decorateClass([
3613
3639
  e("lukso-tooltip")
3614
3640
  ], LuksoTooltip);
@@ -1,4 +1,4 @@
1
- import { Meta } from '@storybook/web-components';
1
+ import type { Meta } from '@storybook/web-components';
2
2
  /** Documentation and examples of `lukso-tooltip` component. */
3
3
  declare const meta: Meta;
4
4
  export default meta;
@@ -24,4 +24,6 @@ export declare const PlacementBottom: any;
24
24
  export declare const Offset: any;
25
25
  /** Tooltip can work as clipboard copy component. For that wou need to enable `is-clipboard-copy` and set `copy-text` attribute.. */
26
26
  export declare const ClipboardCopy: any;
27
+ /** Tooltip with `options` (copied to clipboard). */
28
+ export declare const OptionsTooltip: any;
27
29
  //# sourceMappingURL=lukso-tooltip.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lukso-tooltip.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-tooltip/lukso-tooltip.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAEhD,OAAO,SAAS,CAAA;AAChB,OAAO,uBAAuB,CAAA;AAE9B,gEAAgE;AAChE,QAAA,MAAM,IAAI,EAAE,IA6KX,CAAA;AAED,eAAe,IAAI,CAAA;AAqCnB,8CAA8C;AAC9C,eAAO,MAAM,cAAc,KAA2B,CAAA;AAMtD,4CAA4C;AAC5C,eAAO,MAAM,YAAY,KAA2B,CAAA;AAOpD,sEAAsE;AACtE,eAAO,MAAM,QAAQ,KAA2B,CAAA;AAUhD,gCAAgC;AAChC,eAAO,MAAM,SAAS,KAA2B,CAAA;AASjD,mCAAmC;AACnC,eAAO,MAAM,YAAY,KAA2B,CAAA;AASpD,qCAAqC;AACrC,eAAO,MAAM,cAAc,KAA2B,CAAA;AAStD,oCAAoC;AACpC,eAAO,MAAM,aAAa,KAA2B,CAAA;AASrD,oEAAoE;AACpE,eAAO,MAAM,cAAc,KAA2B,CAAA;AAOtD,eAAO,MAAM,aAAa,KAA2B,CAAA;AAQrD,eAAO,MAAM,eAAe,KAA2B,CAAA;AASvD,8DAA8D;AAC9D,eAAO,MAAM,MAAM,KAA2B,CAAA;AAS9C,qIAAqI;AACrI,eAAO,MAAM,aAAa,KAA2B,CAAA"}
1
+ {"version":3,"file":"lukso-tooltip.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-tooltip/lukso-tooltip.stories.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,SAAS,CAAA;AAChB,OAAO,uBAAuB,CAAA;AAE9B,gEAAgE;AAChE,QAAA,MAAM,IAAI,EAAE,IAmLX,CAAA;AAED,eAAe,IAAI,CAAA;AAuCnB,8CAA8C;AAC9C,eAAO,MAAM,cAAc,KAA2B,CAAA;AAMtD,4CAA4C;AAC5C,eAAO,MAAM,YAAY,KAA2B,CAAA;AAOpD,sEAAsE;AACtE,eAAO,MAAM,QAAQ,KAA2B,CAAA;AAUhD,gCAAgC;AAChC,eAAO,MAAM,SAAS,KAA2B,CAAA;AASjD,mCAAmC;AACnC,eAAO,MAAM,YAAY,KAA2B,CAAA;AASpD,qCAAqC;AACrC,eAAO,MAAM,cAAc,KAA2B,CAAA;AAStD,oCAAoC;AACpC,eAAO,MAAM,aAAa,KAA2B,CAAA;AASrD,oEAAoE;AACpE,eAAO,MAAM,cAAc,KAA2B,CAAA;AAOtD,eAAO,MAAM,aAAa,KAA2B,CAAA;AAQrD,eAAO,MAAM,eAAe,KAA2B,CAAA;AASvD,8DAA8D;AAC9D,eAAO,MAAM,MAAM,KAA2B,CAAA;AAS9C,qIAAqI;AACrI,eAAO,MAAM,aAAa,KAA2B,CAAA;AAUrD,qDAAqD;AACrD,eAAO,MAAM,cAAc,KAA2B,CAAA"}
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-688c3040.cjs');
5
+ const shared_tailwindElement_index = require('../../index-5cc4a839.cjs');
6
6
  const queryAssignedElements = require('../../query-assigned-elements-1d5d9d4c.cjs');
7
7
  const index = require('../../index-e9668573.cjs');
8
- const index$1 = require('../../index-98e8e0d5.cjs');
8
+ const index$1 = require('../../index-0e131d65.cjs');
9
9
  require('../../directive-8278ab14.cjs');
10
10
 
11
11
  const sliceAddress = (address, startSliceBy = 6, endSliceBy) => {
@@ -1,7 +1,7 @@
1
- import { T as TailwindStyledElement, x, A } from '../../index-3527fb14.js';
1
+ import { T as TailwindStyledElement, x, A } from '../../index-814bcac2.js';
2
2
  import { n, e } from '../../query-assigned-elements-5d94572f.js';
3
3
  import { c as customClassMap } from '../../index-5e194caf.js';
4
- import { c as customStyleMap } from '../../index-1765cfe1.js';
4
+ import { c as customStyleMap } from '../../index-f171e7da.js';
5
5
  import '../../directive-2bb7789e.js';
6
6
 
7
7
  const sliceAddress = (address, startSliceBy = 6, endSliceBy) => {
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const shared_tailwindElement_index = require('../../index-688c3040.cjs');
5
+ const shared_tailwindElement_index = require('../../index-5cc4a839.cjs');
6
6
  const queryAssignedElements = require('../../query-assigned-elements-1d5d9d4c.cjs');
7
7
  const directive = require('../../directive-8278ab14.cjs');
8
- const index = require('../../index-e9668573.cjs');
8
+ const index = require('../../index-66211c85.cjs');
9
9
 
10
10
  /**
11
11
  * @license
@@ -38,49 +38,72 @@ exports.LuksoWizard = class LuksoWizard extends shared_tailwindElement_index.Tai
38
38
  super(...arguments);
39
39
  this.steps = "";
40
40
  this.activeStep = 1;
41
- this.isFullWidth = false;
42
- this.activeStepStyles = `[&_.lukso-wizard-circle-inner]:border-2 [&_.lukso-wizard-circle-inner]:border-purple-51`;
43
- this.completedStepStyles = `[&>.lukso-wizard-circle]:after:bg-purple-51
44
- [&_.lukso-wizard-circle-inner]:bg-gradient-to-t
45
- [&_.lukso-wizard-circle-inner]:from-gradient-3-start
46
- [&_.lukso-wizard-circle-inner]:to-gradient-3-end`;
47
- }
48
- stepTemplate(step, index$1) {
49
- return shared_tailwindElement_index.x`<li
50
- class="inline-flex flex-col items-center justify-end first:-ml-12 last:-mr-12 relative
51
- [&>.lukso-wizard-circle]:after:last:hidden [&>.lukso-wizard-circle]:before:last:hidden ${index.customClassMap(
52
- {
53
- [this.completedStepStyles]: index$1 + 1 < this.activeStep,
54
- [this.activeStepStyles]: index$1 + 1 === this.activeStep,
55
- ["w-full"]: this.isFullWidth,
56
- ["w-[121px]"]: !this.isFullWidth
41
+ this.size = "medium";
42
+ this.stepStyles = index.ie({
43
+ slots: {
44
+ base: `inline-flex flex-col items-center justify-end first:-ml-12 last:-mr-12 relative
45
+ [&>.lukso-wizard-circle]:after:last:hidden [&>.lukso-wizard-circle]:before:last:hidden`,
46
+ circle: `lukso-wizard-circle bg-neutral-90 w-4 h-4 rounded-full shadow-wizard-step mt-2 flex items-center
47
+ border-[1px] border-solid border-[rgba(255,255,255,0.8)]
48
+ after:block after:absolute after:bottom-[7px] after:ml-[15px] after:h-[2px]
49
+ after:content:'' after:bg-transparent after:transition-width after:duration-300
50
+ before:block before:absolute before:bottom-[7px] before:ml-[15px] before:h-[2px]
51
+ before:content:'' before:bg-neutral-90 before:shadow-wizard-line before:w-[calc(100%-16px)]`,
52
+ innerCircle: "lukso-wizard-circle-inner rounded-full w-[10px] h-[10px] ml-[2px]"
53
+ },
54
+ variants: {
55
+ size: {
56
+ small: {
57
+ base: "w-[92px]"
58
+ },
59
+ medium: {
60
+ base: "w-[121px]"
61
+ },
62
+ large: {
63
+ base: "w-[180px]"
64
+ },
65
+ ["full-width"]: {
66
+ base: "w-full"
67
+ }
68
+ },
69
+ completed: {
70
+ true: {
71
+ base: `[&>.lukso-wizard-circle]:after:bg-purple-51
72
+ [&_.lukso-wizard-circle-inner]:bg-gradient-to-t
73
+ [&_.lukso-wizard-circle-inner]:from-gradient-3-start
74
+ [&_.lukso-wizard-circle-inner]:to-gradient-3-end`,
75
+ circle: "completed"
76
+ }
77
+ },
78
+ current: {
79
+ true: {
80
+ circle: "current"
81
+ }
82
+ },
83
+ active: {
84
+ true: {
85
+ base: `[&_.lukso-wizard-circle-inner]:border-2 [&_.lukso-wizard-circle-inner]:border-purple-51`,
86
+ innerCircle: "[&_.lukso-wizard-circle-inner]:border-2 [&_.lukso-wizard-circle-inner]:border-purple-51"
87
+ }
88
+ }
57
89
  }
58
- )}"
59
- >
90
+ });
91
+ }
92
+ stepTemplate(step, index) {
93
+ const { base, circle, innerCircle } = this.stepStyles({
94
+ completed: index + 1 < this.activeStep,
95
+ active: index + 1 === this.activeStep,
96
+ current: index === this.activeStep - 2,
97
+ size: this.size
98
+ });
99
+ return shared_tailwindElement_index.x`<li class="${base()}">
60
100
  <div
61
101
  class="text-purple-51 nav-apax-8-medium-uppercase whitespace-pre-line flex text-center break-words uppercase"
62
102
  >
63
103
  ${step.label}
64
104
  </div>
65
- <div
66
- class="lukso-wizard-circle bg-neutral-90 w-4 h-4 rounded-full shadow-wizard-step mt-2 flex items-center
67
- border-[1px] border-solid border-[rgba(255,255,255,0.8)]
68
- after:block after:absolute after:bottom-[7px] after:ml-[15px] after:h-[2px]
69
- after:content:'' after:bg-transparent after:transition-width after:duration-300
70
- before:block before:absolute before:bottom-[7px] before:ml-[15px] before:h-[2px]
71
- before:content:'' before:bg-neutral-90 before:shadow-wizard-line before:w-[calc(100%-16px)]
72
- ${index.customClassMap({
73
- ["completed"]: index$1 + 1 < this.activeStep,
74
- ["current"]: index$1 === this.activeStep - 2
75
- })}"
76
- >
77
- <div
78
- class="lukso-wizard-circle-inner rounded-full w-[10px] h-[10px] ml-[2px] ${index.customClassMap(
79
- {
80
- [this.activeStepStyles]: index$1 + 1 === this.activeStep
81
- }
82
- )}"
83
- ></div>
105
+ <div class="${circle()}">
106
+ <div class="${innerCircle()}"></div>
84
107
  </div>
85
108
  </li>`;
86
109
  }
@@ -110,8 +133,8 @@ __decorateClass([
110
133
  queryAssignedElements.n({ type: Number, attribute: "active-step" })
111
134
  ], exports.LuksoWizard.prototype, "activeStep", 2);
112
135
  __decorateClass([
113
- queryAssignedElements.n({ type: Boolean, attribute: "is-full-width" })
114
- ], exports.LuksoWizard.prototype, "isFullWidth", 2);
136
+ queryAssignedElements.n({ type: String })
137
+ ], exports.LuksoWizard.prototype, "size", 2);
115
138
  exports.LuksoWizard = __decorateClass([
116
139
  queryAssignedElements.e("lukso-wizard")
117
140
  ], exports.LuksoWizard);
@@ -1,13 +1,13 @@
1
1
  export type WizardStep = {
2
2
  label: string;
3
3
  };
4
+ export type WizardSize = 'small' | 'medium' | 'large' | 'full-width';
4
5
  declare const LuksoWizard_base: typeof import("lit").LitElement;
5
6
  export declare class LuksoWizard extends LuksoWizard_base {
6
7
  steps: string;
7
8
  activeStep: number;
8
- isFullWidth: boolean;
9
- private activeStepStyles;
10
- private completedStepStyles;
9
+ size: WizardSize;
10
+ private stepStyles;
11
11
  stepTemplate(step: WizardStep, index: number): import("lit-html").TemplateResult<1>;
12
12
  render(): import("lit-html").TemplateResult<1>;
13
13
  updated(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-wizard/index.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;;AAED,qBACa,WAAY,SAAQ,gBAA4B;IAE3D,KAAK,SAAK;IAGV,UAAU,SAAI;IAGd,WAAW,UAAQ;IAEnB,OAAO,CAAC,gBAAgB,CAA4F;IAEpH,OAAO,CAAC,mBAAmB,CAGwB;IAEnD,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM;IAwC5C,MAAM;IAcN,OAAO;CAOR;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAA;KAC5B;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-wizard/index.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAA;;AAEpE,qBACa,WAAY,SAAQ,gBAA4B;IAE3D,KAAK,SAAK;IAGV,UAAU,SAAI;IAGd,IAAI,EAAE,UAAU,CAAW;IAE3B,OAAO,CAAC,UAAU,CAkDhB;IAEF,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM;IAmB5C,MAAM;IAcN,OAAO;CAOR;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAA;KAC5B;CACF"}
@@ -1,7 +1,7 @@
1
- import { j, b as T, T as TailwindStyledElement, x } from '../../index-3527fb14.js';
1
+ import { j, b as T, T as TailwindStyledElement, x } from '../../index-814bcac2.js';
2
2
  import { n, e as e$1 } from '../../query-assigned-elements-5d94572f.js';
3
3
  import { e, i, t } from '../../directive-2bb7789e.js';
4
- import { c as customClassMap } from '../../index-5e194caf.js';
4
+ import { i as ie } from '../../index-faa8c4ae.js';
5
5
 
6
6
  /**
7
7
  * @license
@@ -34,49 +34,72 @@ let LuksoWizard = class extends TailwindStyledElement(style) {
34
34
  super(...arguments);
35
35
  this.steps = "";
36
36
  this.activeStep = 1;
37
- this.isFullWidth = false;
38
- this.activeStepStyles = `[&_.lukso-wizard-circle-inner]:border-2 [&_.lukso-wizard-circle-inner]:border-purple-51`;
39
- this.completedStepStyles = `[&>.lukso-wizard-circle]:after:bg-purple-51
40
- [&_.lukso-wizard-circle-inner]:bg-gradient-to-t
41
- [&_.lukso-wizard-circle-inner]:from-gradient-3-start
42
- [&_.lukso-wizard-circle-inner]:to-gradient-3-end`;
37
+ this.size = "medium";
38
+ this.stepStyles = ie({
39
+ slots: {
40
+ base: `inline-flex flex-col items-center justify-end first:-ml-12 last:-mr-12 relative
41
+ [&>.lukso-wizard-circle]:after:last:hidden [&>.lukso-wizard-circle]:before:last:hidden`,
42
+ circle: `lukso-wizard-circle bg-neutral-90 w-4 h-4 rounded-full shadow-wizard-step mt-2 flex items-center
43
+ border-[1px] border-solid border-[rgba(255,255,255,0.8)]
44
+ after:block after:absolute after:bottom-[7px] after:ml-[15px] after:h-[2px]
45
+ after:content:'' after:bg-transparent after:transition-width after:duration-300
46
+ before:block before:absolute before:bottom-[7px] before:ml-[15px] before:h-[2px]
47
+ before:content:'' before:bg-neutral-90 before:shadow-wizard-line before:w-[calc(100%-16px)]`,
48
+ innerCircle: "lukso-wizard-circle-inner rounded-full w-[10px] h-[10px] ml-[2px]"
49
+ },
50
+ variants: {
51
+ size: {
52
+ small: {
53
+ base: "w-[92px]"
54
+ },
55
+ medium: {
56
+ base: "w-[121px]"
57
+ },
58
+ large: {
59
+ base: "w-[180px]"
60
+ },
61
+ ["full-width"]: {
62
+ base: "w-full"
63
+ }
64
+ },
65
+ completed: {
66
+ true: {
67
+ base: `[&>.lukso-wizard-circle]:after:bg-purple-51
68
+ [&_.lukso-wizard-circle-inner]:bg-gradient-to-t
69
+ [&_.lukso-wizard-circle-inner]:from-gradient-3-start
70
+ [&_.lukso-wizard-circle-inner]:to-gradient-3-end`,
71
+ circle: "completed"
72
+ }
73
+ },
74
+ current: {
75
+ true: {
76
+ circle: "current"
77
+ }
78
+ },
79
+ active: {
80
+ true: {
81
+ base: `[&_.lukso-wizard-circle-inner]:border-2 [&_.lukso-wizard-circle-inner]:border-purple-51`,
82
+ innerCircle: "[&_.lukso-wizard-circle-inner]:border-2 [&_.lukso-wizard-circle-inner]:border-purple-51"
83
+ }
84
+ }
85
+ }
86
+ });
43
87
  }
44
88
  stepTemplate(step, index) {
45
- return x`<li
46
- class="inline-flex flex-col items-center justify-end first:-ml-12 last:-mr-12 relative
47
- [&>.lukso-wizard-circle]:after:last:hidden [&>.lukso-wizard-circle]:before:last:hidden ${customClassMap(
48
- {
49
- [this.completedStepStyles]: index + 1 < this.activeStep,
50
- [this.activeStepStyles]: index + 1 === this.activeStep,
51
- ["w-full"]: this.isFullWidth,
52
- ["w-[121px]"]: !this.isFullWidth
53
- }
54
- )}"
55
- >
89
+ const { base, circle, innerCircle } = this.stepStyles({
90
+ completed: index + 1 < this.activeStep,
91
+ active: index + 1 === this.activeStep,
92
+ current: index === this.activeStep - 2,
93
+ size: this.size
94
+ });
95
+ return x`<li class="${base()}">
56
96
  <div
57
97
  class="text-purple-51 nav-apax-8-medium-uppercase whitespace-pre-line flex text-center break-words uppercase"
58
98
  >
59
99
  ${step.label}
60
100
  </div>
61
- <div
62
- class="lukso-wizard-circle bg-neutral-90 w-4 h-4 rounded-full shadow-wizard-step mt-2 flex items-center
63
- border-[1px] border-solid border-[rgba(255,255,255,0.8)]
64
- after:block after:absolute after:bottom-[7px] after:ml-[15px] after:h-[2px]
65
- after:content:'' after:bg-transparent after:transition-width after:duration-300
66
- before:block before:absolute before:bottom-[7px] before:ml-[15px] before:h-[2px]
67
- before:content:'' before:bg-neutral-90 before:shadow-wizard-line before:w-[calc(100%-16px)]
68
- ${customClassMap({
69
- ["completed"]: index + 1 < this.activeStep,
70
- ["current"]: index === this.activeStep - 2
71
- })}"
72
- >
73
- <div
74
- class="lukso-wizard-circle-inner rounded-full w-[10px] h-[10px] ml-[2px] ${customClassMap(
75
- {
76
- [this.activeStepStyles]: index + 1 === this.activeStep
77
- }
78
- )}"
79
- ></div>
101
+ <div class="${circle()}">
102
+ <div class="${innerCircle()}"></div>
80
103
  </div>
81
104
  </li>`;
82
105
  }
@@ -106,8 +129,8 @@ __decorateClass([
106
129
  n({ type: Number, attribute: "active-step" })
107
130
  ], LuksoWizard.prototype, "activeStep", 2);
108
131
  __decorateClass([
109
- n({ type: Boolean, attribute: "is-full-width" })
110
- ], LuksoWizard.prototype, "isFullWidth", 2);
132
+ n({ type: String })
133
+ ], LuksoWizard.prototype, "size", 2);
111
134
  LuksoWizard = __decorateClass([
112
135
  e$1("lukso-wizard")
113
136
  ], LuksoWizard);
@@ -5,6 +5,4 @@ import { Meta } from '@storybook/web-components';
5
5
  declare const meta: Meta;
6
6
  export default meta;
7
7
  export declare const BasicWizard: any;
8
- /** If you need button to take full width of the parent element add `is-full-width` property. */
9
- export declare const FullWidthWizard: any;
10
8
  //# sourceMappingURL=lukso-wizard.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lukso-wizard.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-wizard/lukso-wizard.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAEhD,OAAO,UAAU,CAAA;AAEjB;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAiEX,CAAA;AAED,eAAe,IAAI,CAAA;AASnB,eAAO,MAAM,WAAW,KAAoB,CAAA;AAE5C,gGAAgG;AAChG,eAAO,MAAM,eAAe,KAAoB,CAAA"}
1
+ {"version":3,"file":"lukso-wizard.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/lukso-wizard/lukso-wizard.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAA;AAEhD,OAAO,UAAU,CAAA;AAEjB;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IA6DX,CAAA;AAED,eAAe,IAAI,CAAA;AASnB,eAAO,MAAM,WAAW,KAAoB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const shared_tailwindElement_index = require('./index-688c3040.cjs');
3
+ const shared_tailwindElement_index = require('./index-5cc4a839.cjs');
4
4
  const directive = require('./directive-8278ab14.cjs');
5
5
 
6
6
  class CustomStyleMapDirective extends directive.i {