@sula-tech/webcomponents 0.4.1 → 0.6.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 (129) hide show
  1. package/dist/cjs/{index-BtkenDV1.js → index-Bbryl0vg.js} +30 -4
  2. package/dist/cjs/index-Bbryl0vg.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/{sula-avatar_14.cjs.entry.js → sula-avatar_18.cjs.entry.js} +386 -48
  5. package/dist/cjs/sula-avatar_18.cjs.entry.js.map +1 -0
  6. package/dist/cjs/webcomponents.cjs.js +2 -2
  7. package/dist/collection/collection-manifest.json +5 -1
  8. package/dist/collection/components/sula-button/sula-button.css +1 -1
  9. package/dist/collection/components/sula-button/sula-button.js +66 -6
  10. package/dist/collection/components/sula-button/sula-button.js.map +1 -1
  11. package/dist/collection/components/sula-button/sula-button.stories.js +260 -97
  12. package/dist/collection/components/sula-button/sula-button.stories.js.map +1 -1
  13. package/dist/collection/components/sula-checkbox/sula-checkbox.js +3 -3
  14. package/dist/collection/components/sula-chip/sula-chip.css +1 -1
  15. package/dist/collection/components/sula-chip/sula-chip.js +3 -3
  16. package/dist/collection/components/sula-dropdown/sula-dropdown.css +1 -0
  17. package/dist/collection/components/sula-dropdown/sula-dropdown.js +275 -0
  18. package/dist/collection/components/sula-dropdown/sula-dropdown.js.map +1 -0
  19. package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js +155 -0
  20. package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js.map +1 -0
  21. package/dist/collection/components/sula-icon/sula-icon.css +1 -1
  22. package/dist/collection/components/sula-icon/sula-icon.js +1 -1
  23. package/dist/collection/components/sula-loader/sula-loader.css +1 -1
  24. package/dist/collection/components/sula-loader/sula-loader.js +1 -1
  25. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.css +1 -1
  26. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js +29 -1
  27. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js.map +1 -1
  28. package/dist/collection/components/sula-progress-bar/model/sula-progress-bar.model.js +15 -0
  29. package/dist/collection/components/sula-progress-bar/model/sula-progress-bar.model.js.map +1 -0
  30. package/dist/collection/components/sula-progress-bar/sula-progress-bar.css +1 -0
  31. package/dist/collection/components/sula-progress-bar/sula-progress-bar.js +213 -0
  32. package/dist/collection/components/sula-progress-bar/sula-progress-bar.js.map +1 -0
  33. package/dist/collection/components/sula-progress-bar/sula-progress.stories.js +172 -0
  34. package/dist/collection/components/sula-progress-bar/sula-progress.stories.js.map +1 -0
  35. package/dist/collection/components/sula-radio-button/sula-radio-button.js +2 -2
  36. package/dist/collection/components/sula-search-bar/model/sula-search.bar-model.js +6 -0
  37. package/dist/collection/components/sula-search-bar/model/sula-search.bar-model.js.map +1 -0
  38. package/dist/collection/components/sula-search-bar/sula-search-bar.css +1 -0
  39. package/dist/collection/components/sula-search-bar/sula-search-bar.js +240 -0
  40. package/dist/collection/components/sula-search-bar/sula-search-bar.js.map +1 -0
  41. package/dist/collection/components/sula-search-bar/sula-search-bar.stories.js +119 -0
  42. package/dist/collection/components/sula-search-bar/sula-search-bar.stories.js.map +1 -0
  43. package/dist/collection/components/sula-switch/sula-switch.js +4 -4
  44. package/dist/collection/components/sula-tag/sula-tag.js +3 -3
  45. package/dist/collection/components/sula-textarea/sula-textarea.js +6 -6
  46. package/dist/collection/components/sula-textfield/sula-textfield.js +2 -2
  47. package/dist/collection/components/sula-tiles/sula-tiles.js +1 -1
  48. package/dist/collection/components/sula-timeline-list/model/sula-timeline-list.model.js +7 -0
  49. package/dist/collection/components/sula-timeline-list/model/sula-timeline-list.model.js.map +1 -0
  50. package/dist/collection/components/sula-timeline-list/sula-timeline-list.css +1 -0
  51. package/dist/collection/components/sula-timeline-list/sula-timeline-list.js +123 -0
  52. package/dist/collection/components/sula-timeline-list/sula-timeline-list.js.map +1 -0
  53. package/dist/collection/components/sula-timeline-list/sula-timeline-list.stories.js +217 -0
  54. package/dist/collection/components/sula-timeline-list/sula-timeline-list.stories.js.map +1 -0
  55. package/dist/components/index.js +20 -2
  56. package/dist/components/index.js.map +1 -1
  57. package/dist/components/{p-DJGFqp8r.js → p-BNtk_d_S.js} +14 -5
  58. package/dist/components/p-BNtk_d_S.js.map +1 -0
  59. package/dist/components/p-CYBZuKr6.js +27129 -0
  60. package/dist/components/p-CYBZuKr6.js.map +1 -0
  61. package/dist/components/{p-CEU3PNQs.js → p-DULnDBOY.js} +4 -4
  62. package/dist/components/{p-CEU3PNQs.js.map → p-DULnDBOY.js.map} +1 -1
  63. package/dist/components/sula-avatar.js +1 -1
  64. package/dist/components/sula-badge.js +1 -1
  65. package/dist/components/sula-button.js +38 -9
  66. package/dist/components/sula-button.js.map +1 -1
  67. package/dist/components/sula-checkbox.js +4 -4
  68. package/dist/components/sula-chip.js +6 -6
  69. package/dist/components/sula-chip.js.map +1 -1
  70. package/dist/components/sula-dropdown.d.ts +11 -0
  71. package/dist/components/sula-dropdown.js +137 -0
  72. package/dist/components/sula-dropdown.js.map +1 -0
  73. package/dist/components/sula-icon.js +1 -1
  74. package/dist/components/sula-loader.js +1 -27124
  75. package/dist/components/sula-loader.js.map +1 -1
  76. package/dist/components/sula-menu-select-list.js +1 -1
  77. package/dist/components/sula-progress-bar.d.ts +11 -0
  78. package/dist/components/sula-progress-bar.js +122 -0
  79. package/dist/components/sula-progress-bar.js.map +1 -0
  80. package/dist/components/sula-radio-button.js +2 -2
  81. package/dist/components/sula-search-bar.d.ts +11 -0
  82. package/dist/components/sula-search-bar.js +104 -0
  83. package/dist/components/sula-search-bar.js.map +1 -0
  84. package/dist/components/sula-switch.js +4 -4
  85. package/dist/components/sula-tag.js +4 -4
  86. package/dist/components/sula-textarea.js +6 -6
  87. package/dist/components/sula-textfield.js +3 -3
  88. package/dist/components/sula-tiles.js +2 -2
  89. package/dist/components/sula-timeline-list.d.ts +11 -0
  90. package/dist/components/sula-timeline-list.js +101 -0
  91. package/dist/components/sula-timeline-list.js.map +1 -0
  92. package/dist/esm/{index-Yyeke16a.js → index-or7qTZgT.js} +30 -4
  93. package/dist/esm/index-or7qTZgT.js.map +1 -0
  94. package/dist/esm/loader.js +3 -3
  95. package/dist/esm/{sula-avatar_14.entry.js → sula-avatar_18.entry.js} +383 -49
  96. package/dist/esm/sula-avatar_18.entry.js.map +1 -0
  97. package/dist/esm/webcomponents.js +3 -3
  98. package/dist/types/components/sula-button/sula-button.d.ts +11 -1
  99. package/dist/types/components/sula-button/sula-button.stories.d.ts +124 -33
  100. package/dist/types/components/sula-dropdown/sula-dropdown.d.ts +49 -0
  101. package/dist/types/components/sula-dropdown/sula-dropdown.stories.d.ts +68 -0
  102. package/dist/types/components/sula-menu-select-list/sula-menu-select-list.d.ts +4 -0
  103. package/dist/types/components/sula-progress-bar/model/sula-progress-bar.model.d.ts +12 -0
  104. package/dist/types/components/sula-progress-bar/sula-progress-bar.d.ts +33 -0
  105. package/dist/types/components/sula-progress-bar/sula-progress.stories.d.ts +84 -0
  106. package/dist/types/components/sula-search-bar/model/sula-search.bar-model.d.ts +4 -0
  107. package/dist/types/components/sula-search-bar/sula-search-bar.d.ts +50 -0
  108. package/dist/types/components/sula-search-bar/sula-search-bar.stories.d.ts +84 -0
  109. package/dist/types/components/sula-timeline-list/model/sula-timeline-list.model.d.ts +16 -0
  110. package/dist/types/components/sula-timeline-list/sula-timeline-list.d.ts +17 -0
  111. package/dist/types/components/sula-timeline-list/sula-timeline-list.stories.d.ts +47 -0
  112. package/dist/types/components.d.ts +315 -0
  113. package/dist/webcomponents/{p-5ba79323.entry.js → p-2a133394.entry.js} +3656 -3167
  114. package/dist/webcomponents/p-2a133394.entry.js.map +1 -0
  115. package/dist/webcomponents/{p-Yyeke16a.js → p-or7qTZgT.js} +229 -204
  116. package/dist/webcomponents/p-or7qTZgT.js.map +1 -0
  117. package/dist/webcomponents/webcomponents.esm.js +50 -18
  118. package/package.json +1 -1
  119. package/readme.md +79 -19
  120. package/dist/cjs/index-BtkenDV1.js.map +0 -1
  121. package/dist/cjs/sula-avatar.sula-badge.sula-button.sula-checkbox.sula-chip.sula-icon.sula-loader.sula-menu-select-list.sula-radio-button.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.entry.cjs.js.map +0 -1
  122. package/dist/cjs/sula-avatar_14.cjs.entry.js.map +0 -1
  123. package/dist/components/p-DJGFqp8r.js.map +0 -1
  124. package/dist/esm/index-Yyeke16a.js.map +0 -1
  125. package/dist/esm/sula-avatar.sula-badge.sula-button.sula-checkbox.sula-chip.sula-icon.sula-loader.sula-menu-select-list.sula-radio-button.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.entry.js.map +0 -1
  126. package/dist/esm/sula-avatar_14.entry.js.map +0 -1
  127. package/dist/webcomponents/p-5ba79323.entry.js.map +0 -1
  128. package/dist/webcomponents/p-Yyeke16a.js.map +0 -1
  129. package/dist/webcomponents/sula-avatar.sula-badge.sula-button.sula-checkbox.sula-chip.sula-icon.sula-loader.sula-menu-select-list.sula-radio-button.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.entry.esm.js.map +0 -1
@@ -35,23 +35,23 @@ export class SulaSwitch {
35
35
  };
36
36
  }
37
37
  render() {
38
- return (h(Host, { key: '8c4e5a433806b881586f923d9c2a504bdce6746d' }, h("div", { key: '22d49911604bac2bf3da72635365dbf2a6f37dd6', class: {
38
+ return (h(Host, { key: 'e920dbb868a5bdde5e34ac4d015529aef08a8e3d' }, h("div", { key: '7552191cc1632d04c0c496f382fdbbb166547236', class: {
39
39
  'outline-none': true,
40
40
  'flex items-center space-x-12': !!this.label && this.type === SulaSwitchType.Default,
41
41
  'flex items-center justify-between bg-surface-on-body rounded-md w-[280px] min-h-[85px] px-24 py-16': this.type === SulaSwitchType.List,
42
42
  'hover:bg-states-empty-bg-hover active:bg-states-empty-bg-pressed cursor-pointer': this.type === SulaSwitchType.List && !this.disabled,
43
43
  'container-focus': this.isFocus && this.type === SulaSwitchType.List,
44
- }, onFocus: this.handleFocus, onBlur: this.handleBlur, onClick: this.handleClick, tabIndex: 0 }, this.type === SulaSwitchType.List && (h("div", { key: '7076e6b15b0c48d1f1a9e7a27eaeacc2504eaaf2', class: "flex flex-col flex-1 mr-16 overflow-hidden" }, !!this.label && h("label", { key: 'c669a1d88a26e897a1b8bcbdb96f6060d02e9fcb', class: "text-text-primary font-bold text-base cursor-pointer break-words" }, this.label), !!this.subTitle && h("span", { key: 'c428df447fd46a4639512065672923b0ef52c5a2', class: "text-text-secondary text-base break-words" }, this.subTitle))), h("div", { key: '01aab6ae10a1ebc05dcfd973045777ab31395c84', class: {
44
+ }, onFocus: this.handleFocus, onBlur: this.handleBlur, onClick: this.handleClick, tabIndex: 0 }, this.type === SulaSwitchType.List && (h("div", { key: '322c268b6e010f49cb1b61509398d9f7a1b9b8a1', class: "flex flex-col flex-1 mr-16 overflow-hidden" }, !!this.label && h("label", { key: '0da8b536c781a7d0fdfc1539b115c11171328455', class: "text-text-primary font-bold text-base cursor-pointer break-words" }, this.label), !!this.subTitle && h("span", { key: '8ff30bb13d52d759c6b2a2892ec608d14e9ece86', class: "text-text-secondary text-base break-words" }, this.subTitle))), h("div", { key: 'cec3a0d3f3620af6e25c2ae1e6ac771eb7acaef2', class: {
45
45
  'switch-container w-56 h-32 flex items-center rounded-xxl p-2 outline-none': true,
46
46
  'switch-on bg-brand-primary justify-end': this.active,
47
47
  'switch-off bg-neutral-neutral-3 justify-start': !this.active,
48
48
  'cursor-not-allowed bg-states-bg-disabled': this.disabled,
49
49
  'switch-focus': this.isFocus && this.type === SulaSwitchType.Default,
50
- }, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '4c7e11b5e66699eef10cdfc1790133da5fe2512f', class: {
50
+ }, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: 'ae01eb32010e93fbc3fb652c0fdd653df57b7835', class: {
51
51
  'switch-thumb w-[28px] h-[28px] rounded-full flex justify-center items-center': true,
52
52
  'bg-negative-negative-1': !this.disabled,
53
53
  'bg-states-bg-disabled shadow-md': this.disabled,
54
- } }, h("div", { key: 'dc4b278d4bae9c541d132ac0637155200c32e5b0', class: {
54
+ } }, h("div", { key: 'f965f1fa8af298f87383c8549a82990a9daeafee', class: {
55
55
  'switch-indicator rounded-full': true,
56
56
  'switch-indicator-on w-12 h-12 bg-brand-primary': this.active,
57
57
  'switch-indicator-off w-[10px] h-4 bg-neutral-neutral-4': !this.active,
@@ -72,14 +72,14 @@ export class SulaTag {
72
72
  return iconStatusStyles[this.iconStatus];
73
73
  }
74
74
  render() {
75
- return (h(Host, { key: '436412de610889b17970a85abf5ec197a8e47436' }, h("div", { key: '604f05fe84b218eb4b7470e9be5bdc9de3aa8357', class: {
75
+ return (h(Host, { key: 'ea42eeb4ee80620a790938eb08c6322fa4dee214' }, h("div", { key: '29745dd127c152c8e2e74534f8fa53cc8d305534', class: {
76
76
  'flex items-center rounded-xxl w-fit': true,
77
77
  [this.getSizeClass()]: true,
78
78
  [this.getAppearanceClass()]: true,
79
- } }, this.icon && (h("div", { key: 'c156b45c46625a17f99ca988da012aff3f486b82', class: {
79
+ } }, this.icon && (h("div", { key: '2eb1b3d506d98a12b5513c947237289fcacfe035', class: {
80
80
  'flex justify-center items-center mr-8 rounded-full leading-4 px-2 py-1': true,
81
81
  [this.getIconStatusClass()]: true,
82
- } }, h("sula-icon", { key: '0d128f0f6936aa0f5f4f021993002c31c4642fb7', icon: this.icon, "custom-class": "text-base text-negative-negative-1 leading-4" }))), h("span", { key: 'f9c361d1fce206a071a8e629067d82bd253bd106', class: {
82
+ } }, h("sula-icon", { key: 'b3daed5248632ce22ee43f9d64987939a3682242', icon: this.icon, "custom-class": "text-base text-negative-negative-1 leading-4" }))), h("span", { key: 'd436740cbce0feab73152447b7694818fe87f90e', class: {
83
83
  'text-base leading-4': true,
84
84
  [this.getTextColorClass()]: true,
85
85
  [this.getTextWeightClass()]: true,
@@ -94,34 +94,34 @@ export class SulaTextarea {
94
94
  }
95
95
  render() {
96
96
  const containerHeight = this.rows * 24 + 48;
97
- return (h(Host, { key: '112ab9367061b2cd3372a1513c0e0c3004508d62', ref: node => (this.node = node) }, h("div", { key: '429946804da278e0bb055cc44cd171d3fc932d00' }, h("div", { key: '75b2f1ba71fabd3ca88b6a64f24e9c806e62b6cd', id: "textarea-container", class: {
97
+ return (h(Host, { key: 'ed754651792554736de45340f7a2eca30303517e', ref: node => (this.node = node) }, h("div", { key: '7c8422829a17136e4f98792da018fa4a4c531de4' }, h("div", { key: '16f16305b5b1a059e8d1e0b956eb78d2443bd9e0', id: "textarea-container", class: {
98
98
  'relative border rounded-sm px-16 py-12 outline-none caret-brand-primary': true,
99
99
  'textarea-focus': this.textareaIsFocused && !this.disabled && this.status === SulaTextareaStatus.Default,
100
100
  'textarea-error': this.status === SulaTextareaStatus.Error && !this.disabled,
101
101
  'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,
102
102
  'bg-surface-body border-line-input cursor-text': !this.disabled,
103
- }, style: { height: `${containerHeight}px` }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleTextareaClick }, h("label", { key: '86cfcf89f55bd92d3b10ab75d38c6c982cae353c', class: {
103
+ }, style: { height: `${containerHeight}px` }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleTextareaClick }, h("label", { key: 'ca41cf5b404b52684d6597a6976b86a596bb613f', class: {
104
104
  'text-base top-16 left-12 absolute transition-all duration-200 ease-in-out pointer-events-none z-10 w-[85%]': true,
105
105
  'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),
106
106
  'text-text-disabled': this.disabled,
107
107
  'bg-surface-body': !this.disabled && this.isActive,
108
- }, ref: node => (this.labelElement = node) }, this.label), h("label", { key: '0c4bdde355694f1c04a7e6d32bd392fb088a4578', class: {
108
+ }, ref: node => (this.labelElement = node) }, this.label), h("label", { key: 'cfcb85fadb260a530be91f347c55e6f98ae3168b', class: {
109
109
  'absolute font-bold transition-all duration-200 ease-in-out pointer-events-none z-10 active-label hidden from-down': true,
110
110
  'text-sm top-12 left-16': this.isActive,
111
111
  'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),
112
112
  'text-text-disabled': this.disabled,
113
113
  'bg-surface-body': !this.disabled && this.isActive,
114
- }, ref: node => (this.activeLabelElement = node) }, this.label), h("textarea", { key: 'd64e5297376361329f46eb5d6e502324d3629a47', ref: node => (this.textareaElement = node), placeholder: this.isActive ? this.placeholder : '', rows: this.rows, maxLength: this.maxLength, disabled: this.disabled, class: {
114
+ }, ref: node => (this.activeLabelElement = node) }, this.label), h("textarea", { key: 'b020d47c6e676defc7af5703142bf28b27235b68', ref: node => (this.textareaElement = node), placeholder: this.isActive ? this.placeholder : '', rows: this.rows, maxLength: this.maxLength, disabled: this.disabled, class: {
115
115
  'w-full h-full outline-none text-base bg-transparent border-none resize-none': true,
116
116
  'pt-6': this.isActive,
117
117
  'pt-0': !this.isActive,
118
118
  'text-text-primary': !this.disabled,
119
119
  'text-text-disabled cursor-not-allowed overflow-hidden': this.disabled,
120
- }, onInput: this.handleTextareaChanges, onFocus: this.handleTextareaFocus, onBlur: this.handleBlur, value: this.textValue })), (this.helpText || this.maxLength) && (h("div", { key: '972de397157809afb5e3f423ad6cc020e0681a63', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: 'c395df80ecdc9ff30a4a3fc641e90427891d4b3d', id: "textarea-help-text", class: {
120
+ }, onInput: this.handleTextareaChanges, onFocus: this.handleTextareaFocus, onBlur: this.handleBlur, value: this.textValue })), (this.helpText || this.maxLength) && (h("div", { key: '5772c4879f4a2e680423a025ddf371b0682fdbfc', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: 'f85f4b9195cf845d110a8f3a9b4a34e8cd522783', id: "textarea-help-text", class: {
121
121
  'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,
122
122
  'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,
123
123
  'text-text-disabled': this.disabled,
124
- } }, this.helpText)), this.maxLength && (h("div", { key: '92e87522fdab71f57b34d65472697e851c97de7c', id: "max-length-container", class: {
124
+ } }, this.helpText)), this.maxLength && (h("div", { key: 'dffd4ae72ce81a460589f6cbb58f7615529547ea', id: "max-length-container", class: {
125
125
  'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,
126
126
  'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,
127
127
  'text-text-disabled': this.disabled,
@@ -97,14 +97,14 @@ export class SulaTextfield {
97
97
  return this.icon;
98
98
  }
99
99
  render() {
100
- return (h(Host, { key: '3e9bdde79b2e015d887acf681db7b7de4c6d10f9', ref: node => (this.node = node) }, h("div", { key: '58ea96ff28b4ccb218a6c255cd325526801b0bbe' }, h("div", { key: 'f7dafc576f9090557f72b78cc2225b0256c9935a', id: "button-container", class: {
100
+ return (h(Host, { key: '3805ff5fefc6ccc3b903384ac54bcf01ebd9527a', ref: node => (this.node = node) }, h("div", { key: 'e90a85b46e51d9c0c989bc4e0ff53b5996cc6c49' }, h("div", { key: '258fa53c0386cc3cc231a53d5d0e8da483cc51ce', id: "button-container", class: {
101
101
  'flex items-center border rounded-sm px-16 outline-none h-[72px] caret-brand-primary': true,
102
102
  'flex-row justify-between': !!this.icon || this.type === SulaTextfieldType.Password,
103
103
  'button-focus': this.inputIsFocused && !this.disabled && this.status === SulaTextfieldStatus.Default,
104
104
  'button-error': this.status === SulaTextfieldStatus.Error && !this.disabled,
105
105
  'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,
106
106
  'bg-surface-body border-line-input cursor-pointer': !this.disabled,
107
- }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleInputClick }, !this.disabled && (h("div", { key: '257c1ad5d7a3d5efd1d27127ac02594a47575fd8', class: { 'hidden flex-col w-full': true, 'pr-12': !!this.icon }, ref: node => (this.inputContainer = node) }, h("label", { key: 'efaf4fb0c7e118b1f177dbb32e810eb6a936d022', class: "font-bold text-sm text-text-primary from-down" }, this.label), h("input", { key: '17ebbebb92aa6ad6b66168b23e9e117f6f455bcd', type: this.type, ref: node => (this.inputElement = node), placeholder: this.placeholder, class: "outline-none text-base text-text-primary bg-transparent", onInput: this.handleInputChanges, onFocus: this.handleInputFocus, value: this.value }))), h("div", { key: '31dbb7b11e7affbb22dfc5e630a715ae8edb5a51', id: "textfield-label", class: { 'text-base flex items-center': true, 'text-text-primary': !this.disabled, 'text-text-disabled': this.disabled }, ref: node => (this.labelElement = node) }, this.label), (!!this.icon || this.type === SulaTextfieldType.Password) && (h("div", { key: 'b9e2f8eae982d0e39b92309042d2f166cf26d8b1', class: "flex items-center justify-center", onClick: this.handleIconClick }, h("sula-icon", { key: 'c379ae831debcabdc846ff925b56fc65f47365a5', icon: this.getInputIcon(), customClass: `text-2xl ${this.disabled ? 'text-icon-disabled' : 'text-icon-primary'}` })))), (this.helpText || this.maxLength) && !this.disabled && (h("div", { key: '40f3d2a9ff28fec7681e065362367b283632e210', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: '96bc7dffbd4ee747816bae7b5aaca1cba6f69782', id: "textfield-help-text", class: { 'text-text-primary': this.status === SulaTextfieldStatus.Default, 'text-feedback-error': this.status === SulaTextfieldStatus.Error } }, this.helpText)), this.maxLength && (h("div", { key: '066f76c181d7f858f16460fab9c5e9bcf301f5a4', id: "max-length-container", class: { 'text-text-primary': this.status === SulaTextfieldStatus.Default, 'text-feedback-error': this.status === SulaTextfieldStatus.Error } }, this.textValue ? this.textValue.length : 0, "/", this.maxLength)))))));
107
+ }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleInputClick }, !this.disabled && (h("div", { key: '0e16b2a5f2bd115b65a6d8e572bde900606fb97c', class: { 'hidden flex-col w-full': true, 'pr-12': !!this.icon }, ref: node => (this.inputContainer = node) }, h("label", { key: '1a487915bfd317c1f1b3c04917096f402e7cb7ba', class: "font-bold text-sm text-text-primary from-down" }, this.label), h("input", { key: 'b2cd0285ef6cdaa4956ac1e7dc7a9d2fb850ffed', type: this.type, ref: node => (this.inputElement = node), placeholder: this.placeholder, class: "outline-none text-base text-text-primary bg-transparent", onInput: this.handleInputChanges, onFocus: this.handleInputFocus, value: this.value }))), h("div", { key: 'c26f72728243abca768732d758f7a9992c32d146', id: "textfield-label", class: { 'text-base flex items-center': true, 'text-text-primary': !this.disabled, 'text-text-disabled': this.disabled }, ref: node => (this.labelElement = node) }, this.label), (!!this.icon || this.type === SulaTextfieldType.Password) && (h("div", { key: 'b1f375f8291a67455ae0e252321e4a0fa577bb64', class: "flex items-center justify-center", onClick: this.handleIconClick }, h("sula-icon", { key: 'a780572571be2d1b4e754ccb149b768bb9195800', icon: this.getInputIcon(), customClass: `text-2xl ${this.disabled ? 'text-icon-disabled' : 'text-icon-primary'}` })))), (this.helpText || this.maxLength) && !this.disabled && (h("div", { key: '6ac0ac18b014923a1b6a432e181beaea2f557dca', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: 'f8aa196b22755380105da258fa8e218ceb3894c0', id: "textfield-help-text", class: { 'text-text-primary': this.status === SulaTextfieldStatus.Default, 'text-feedback-error': this.status === SulaTextfieldStatus.Error } }, this.helpText)), this.maxLength && (h("div", { key: '9a9359a270f5f84175829e2e8347e992c89a2639', id: "max-length-container", class: { 'text-text-primary': this.status === SulaTextfieldStatus.Default, 'text-feedback-error': this.status === SulaTextfieldStatus.Error } }, this.textValue ? this.textValue.length : 0, "/", this.maxLength)))))));
108
108
  }
109
109
  static get is() { return "sula-textfield"; }
110
110
  static get encapsulation() { return "shadow"; }
@@ -121,7 +121,7 @@ export class SulaTiles {
121
121
  return (h("div", { class: this.getTextContainerClasses() }, h("span", { class: this.getTextClasses(true), title: this.ellipsis ? this.text : undefined }, this.text), this.hasSubText && (h("span", { class: this.getTextClasses(false), title: this.ellipsis ? this.subText : undefined }, this.subText))));
122
122
  }
123
123
  render() {
124
- return (h(Host, { key: '4ad25c005432166588fd14cc596db7f67455519d' }, h("div", { key: 'f1ed2bad68c99002ff7eda09fefa467981237918', class: this.getContainerClasses(), tabIndex: this.getTabIndex(this.isSquare), onClick: this.handleClick }, this.renderIcon(), this.renderText())));
124
+ return (h(Host, { key: 'bd93893ff89e978258ceb3621a260b305de320f5' }, h("div", { key: '661f7050d9a816aa3437e2d1c0de179cfb9d605d', class: this.getContainerClasses(), tabIndex: this.getTabIndex(this.isSquare), onClick: this.handleClick }, this.renderIcon(), this.renderText())));
125
125
  }
126
126
  static get is() { return "sula-tiles"; }
127
127
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,7 @@
1
+ export var SulaTimelineListItemIconStatus;
2
+ (function (SulaTimelineListItemIconStatus) {
3
+ SulaTimelineListItemIconStatus["Success"] = "success";
4
+ SulaTimelineListItemIconStatus["Error"] = "error";
5
+ SulaTimelineListItemIconStatus["Warning"] = "warning";
6
+ })(SulaTimelineListItemIconStatus || (SulaTimelineListItemIconStatus = {}));
7
+ //# sourceMappingURL=sula-timeline-list.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sula-timeline-list.model.js","sourceRoot":"","sources":["../../../../src/components/sula-timeline-list/model/sula-timeline-list.model.ts"],"names":[],"mappings":"AAaA,MAAM,CAAN,IAAY,8BAIX;AAJD,WAAY,8BAA8B;IACxC,qDAAmB,CAAA;IACnB,iDAAe,CAAA;IACf,qDAAmB,CAAA;AACrB,CAAC,EAJW,8BAA8B,KAA9B,8BAA8B,QAIzC","sourcesContent":["export interface SulaTimelineListItem {\n weekdayText?: SulaTimelineListItemWeekdayText;\n iconStatus?: SulaTimelineListItemIconStatus;\n title: string;\n message?: string;\n hasLink?: boolean;\n}\n\nexport interface SulaTimelineListItemWeekdayText {\n weekday: string;\n day: number;\n}\n\nexport enum SulaTimelineListItemIconStatus {\n Success = 'success',\n Error = 'error',\n Warning = 'warning',\n}\n"]}
@@ -0,0 +1 @@
1
+ *,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{display:block}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#02361a;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#500202;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#683f08;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#691e07;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#6a3b01;--color-gray-50:#fff;--color-gray-100:#f4f4f4;--color-gray-200:#e6e6e6;--color-gray-300:#c3c3c3;--color-gray-400:#b9b9b9;--color-gray-500:#949494;--color-gray-600:#737373;--color-gray-700:#5c5c5c;--color-gray-800:#323232;--color-gray-900:#292929;--color-gray-950:#141414;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#0a2e61;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:#14141405;--color-black-opacity-100:#1414141a;--color-black-opacity-200:#14141426;--color-black-opacity-300:#14141445;--color-black-opacity-400:#1414145c;--color-black-opacity-500:#14141480;--color-black-opacity-600:#1414148c;--color-black-opacity-700:#141414a3;--color-black-opacity-800:#141414ba;--color-black-opacity-900:#141414cc;--color-black-opacity-950:#141414e8;--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f4f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#323232;--color-text-secondary:#5c5c5c;--color-text-disabled:#949494;--color-text-link:#1355b4;--color-states-empty-bg-hover:#1414141a;--color-states-empty-bg-pressed:#14141426;--color-states-bg-disabled:#14141405;--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e6e6e6;--color-states-negative-pressed:#c3c3c3;--color-icon-primary:#5c5c5c;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#b9b9b9;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f4f4f4;--color-neutral-neutral-3:#b9b9b9;--color-neutral-neutral-4:#949494;--color-neutral-neutral-5:#737373;--color-neutral-neutral-6:#5c5c5c;--color-neutral-neutral-7:#323232;--color-neutral-neutral-8:#292929;--color-negative-negative-1:#fff;--color-negative-negative-2:#323232;--color-opacity-body:#fffc;--color-opacity-on-body:#14141405;--color-opacity-overlay:#1414148c;--color-opacity-on-overlay:#ffffff1a;--color-line-input:#949494;--color-line-general-strong:#c3c3c3;--color-line-general:#e6e6e6}.static{position:static}.absolute{position:absolute}.relative{position:relative}.left-\[28px\]{left:28px}.top-56{top:3.5rem}.z-10{z-index:10}.mt-4{margin-top:.25rem}.flex{display:flex}.h-24{height:1.5rem}.h-44{height:2.75rem}.h-56{height:3.5rem}.h-full{height:100%}.w-2{width:.125rem}.w-44{width:2.75rem}.w-56{width:3.5rem}.w-fit{width:fit-content}.w-full{width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-24>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.5rem*var(--tw-space-x-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.rounded-full{border-radius:9999px}.rounded-md{border-radius:1.25rem}.bg-surface-body{background-color:var(--color-surface-body)}.bg-surface-on-body{background-color:var(--color-surface-on-body)}.bg-surface-on-body-feedback-alert{background-color:var(--color-surface-on-body-feedback-alert)}.bg-surface-on-body-feedback-error{background-color:var(--color-surface-on-body-feedback-error)}.bg-surface-on-body-feedback-success{background-color:var(--color-surface-on-body-feedback-success)}.p-6{padding:1.5rem}.px-24{padding-left:1.5rem;padding-right:1.5rem}.px-\[6px\]{padding-left:6px;padding-right:6px}.py-2{padding-bottom:.125rem;padding-top:.125rem}.py-32{padding-bottom:2rem;padding-top:2rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.leading-3{line-height:.75rem}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.text-feedback-alert{color:var(--color-feedback-alert)}.text-feedback-error{color:var(--color-feedback-error)}.text-feedback-success{color:var(--color-feedback-success)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.group:hover .group-hover\:bg-states-empty-bg-hover{background-color:var(--color-states-empty-bg-hover)}
@@ -0,0 +1,123 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { SulaTimelineListItemIconStatus } from "./model/sula-timeline-list.model";
3
+ export class SulaTimelineList {
4
+ constructor() {
5
+ /**
6
+ * Timeline list. (Can be use with weekday text or icon with status)
7
+ */
8
+ this.sulaTimelineList = [];
9
+ this.handleItemClick = (item) => {
10
+ if (!item.hasLink)
11
+ return;
12
+ this.itemClicked.emit(item);
13
+ };
14
+ }
15
+ getIconBackgroundColorByStatus(status) {
16
+ const iconColorByStatus = {
17
+ [SulaTimelineListItemIconStatus.Success]: 'bg-surface-on-body-feedback-success',
18
+ [SulaTimelineListItemIconStatus.Warning]: 'bg-surface-on-body-feedback-alert',
19
+ [SulaTimelineListItemIconStatus.Error]: 'bg-surface-on-body-feedback-error',
20
+ };
21
+ return iconColorByStatus[status];
22
+ }
23
+ getIconByStatus(status) {
24
+ const iconByStatus = {
25
+ [SulaTimelineListItemIconStatus.Success]: 'ph ph-check-circle',
26
+ [SulaTimelineListItemIconStatus.Warning]: 'ph ph-warning',
27
+ [SulaTimelineListItemIconStatus.Error]: 'ph ph-warning-circle',
28
+ };
29
+ return iconByStatus[status];
30
+ }
31
+ getIconColorByStatus(status) {
32
+ const iconByStatus = {
33
+ [SulaTimelineListItemIconStatus.Success]: 'text-feedback-success',
34
+ [SulaTimelineListItemIconStatus.Warning]: 'text-feedback-alert',
35
+ [SulaTimelineListItemIconStatus.Error]: 'text-feedback-error',
36
+ };
37
+ return iconByStatus[status];
38
+ }
39
+ render() {
40
+ return (h(Host, { key: 'be18bb7bcb5cff8b45b1dc33fe9f4a14b6e21d5e' }, h("div", { key: '1a2bd5e50d78223c0ef3824beef028b0d6b8fa27', class: "flex flex-col bg-surface-on-body px-24 py-32 w-fit rounded-md" }, this.sulaTimelineList.map((item, index) => {
41
+ const isLastItem = index === this.sulaTimelineList.length - 1;
42
+ return (h("div", { class: {
43
+ 'relative timeline-item': true,
44
+ 'cursor-pointer group': item.hasLink,
45
+ }, onClick: () => this.handleItemClick(item) }, h("div", { class: "flex space-x-24 items-center justify-between flex-row w-full" }, h("div", { class: "relative flex flex-row space-x-24 items-center" }, h("div", { class: "relative" }, h("div", { class: {
46
+ 'rounded-full h-56 w-56 bg-surface-body flex justify-center items-center relative z-10': true,
47
+ 'p-6': !!item.iconStatus,
48
+ } }, item.weekdayText && (h("div", { class: "flex flex-col justify-center items-center space-y-4" }, h("span", { class: "text-text-secondary text-xs leading-3" }, item.weekdayText.weekday), h("span", { class: "text-xl leading-5 text-text-primary" }, item.weekdayText.day))), item.iconStatus && (h("div", { class: {
49
+ 'flex justify-center items-center w-44 h-44 rounded-full': true,
50
+ [this.getIconBackgroundColorByStatus(item.iconStatus)]: true,
51
+ } }, h("div", { class: "flex justify-center items-center leading-6 w-44" }, h("sula-icon", { icon: this.getIconByStatus(item.iconStatus), customClass: `${this.getIconColorByStatus(item.iconStatus)} text-2xl` })))))), h("div", { class: "flex flex-col" }, h("span", { class: "text-text-primary font-bold text-base leading-4" }, item.title), item.message && h("span", { class: "text-text-secondary text-base leading-4 mt-4" }, item.message))), item.hasLink && (h("div", { class: {
52
+ 'px-[6px] py-2 rounded-full leading-6 flex items-center justify-center margin-left': true,
53
+ 'group-hover:bg-states-empty-bg-hover transition': item.hasLink,
54
+ } }, h("sula-icon", { icon: "ph ph-caret-right", customClass: "text-2xl text-text-primary" })))), !isLastItem && h("div", { class: "absolute bg-surface-body left-[28px] top-56 w-2 h-full" }), !isLastItem && h("div", { class: "h-24" })));
55
+ }))));
56
+ }
57
+ static get is() { return "sula-timeline-list"; }
58
+ static get encapsulation() { return "shadow"; }
59
+ static get originalStyleUrls() {
60
+ return {
61
+ "$": ["sula-timeline-list.scss"]
62
+ };
63
+ }
64
+ static get styleUrls() {
65
+ return {
66
+ "$": ["sula-timeline-list.css"]
67
+ };
68
+ }
69
+ static get properties() {
70
+ return {
71
+ "sulaTimelineList": {
72
+ "type": "unknown",
73
+ "attribute": "sula-timeline-list",
74
+ "mutable": true,
75
+ "complexType": {
76
+ "original": "SulaTimelineListItem[]",
77
+ "resolved": "SulaTimelineListItem[]",
78
+ "references": {
79
+ "SulaTimelineListItem": {
80
+ "location": "import",
81
+ "path": "./model/sula-timeline-list.model",
82
+ "id": "src/components/sula-timeline-list/model/sula-timeline-list.model.ts::SulaTimelineListItem"
83
+ }
84
+ }
85
+ },
86
+ "required": false,
87
+ "optional": false,
88
+ "docs": {
89
+ "tags": [],
90
+ "text": "Timeline list. (Can be use with weekday text or icon with status)"
91
+ },
92
+ "getter": false,
93
+ "setter": false,
94
+ "defaultValue": "[]"
95
+ }
96
+ };
97
+ }
98
+ static get events() {
99
+ return [{
100
+ "method": "itemClicked",
101
+ "name": "itemClicked",
102
+ "bubbles": true,
103
+ "cancelable": true,
104
+ "composed": true,
105
+ "docs": {
106
+ "tags": [],
107
+ "text": "Event emitted when item is clicked."
108
+ },
109
+ "complexType": {
110
+ "original": "SulaTimelineListItem",
111
+ "resolved": "SulaTimelineListItem",
112
+ "references": {
113
+ "SulaTimelineListItem": {
114
+ "location": "import",
115
+ "path": "./model/sula-timeline-list.model",
116
+ "id": "src/components/sula-timeline-list/model/sula-timeline-list.model.ts::SulaTimelineListItem"
117
+ }
118
+ }
119
+ }
120
+ }];
121
+ }
122
+ }
123
+ //# sourceMappingURL=sula-timeline-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sula-timeline-list.js","sourceRoot":"","sources":["../../../src/components/sula-timeline-list/sula-timeline-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAwB,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAOxG,MAAM,OAAO,gBAAgB;IAL7B;QAME;;WAEG;QAEH,qBAAgB,GAA2B,EAAE,CAAC;QAQ9C,oBAAe,GAAG,CAAC,IAA0B,EAAE,EAAE;YAC/C,IAAI,CAAC,IAAI,CAAC,OAAO;gBAAE,OAAO;YAC1B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC,CAAC;KA0GH;IAxGC,8BAA8B,CAAC,MAAsC;QACnE,MAAM,iBAAiB,GAAG;YACxB,CAAC,8BAA8B,CAAC,OAAO,CAAC,EAAE,qCAAqC;YAC/E,CAAC,8BAA8B,CAAC,OAAO,CAAC,EAAE,mCAAmC;YAC7E,CAAC,8BAA8B,CAAC,KAAK,CAAC,EAAE,mCAAmC;SAC5E,CAAC;QAEF,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,eAAe,CAAC,MAAsC;QACpD,MAAM,YAAY,GAAG;YACnB,CAAC,8BAA8B,CAAC,OAAO,CAAC,EAAE,oBAAoB;YAC9D,CAAC,8BAA8B,CAAC,OAAO,CAAC,EAAE,eAAe;YACzD,CAAC,8BAA8B,CAAC,KAAK,CAAC,EAAE,sBAAsB;SAC/D,CAAC;QAEF,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAED,oBAAoB,CAAC,MAAsC;QACzD,MAAM,YAAY,GAAG;YACnB,CAAC,8BAA8B,CAAC,OAAO,CAAC,EAAE,uBAAuB;Y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iDAAiD;4CAC1D,iBAAW,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,GAAc,CACvI,CACF,CACP,CACG,CACF;4BAEN,WAAK,KAAK,EAAC,eAAe;gCACxB,YAAM,KAAK,EAAC,iDAAiD,IAAE,IAAI,CAAC,KAAK,CAAQ;gCAChF,IAAI,CAAC,OAAO,IAAI,YAAM,KAAK,EAAC,8CAA8C,IAAE,IAAI,CAAC,OAAO,CAAQ,CAC7F,CACF;wBAEL,IAAI,CAAC,OAAO,IAAI,CACf,WACE,KAAK,EAAE;gCACL,mFAAmF,EAAE,IAAI;gCACzF,iDAAiD,EAAE,IAAI,CAAC,OAAO;6BAChE;4BAED,iBAAW,IAAI,EAAC,mBAAmB,EAAC,WAAW,EAAC,4BAA4B,GAAa,CACrF,CACP,CACG;oBAEL,CAAC,UAAU,IAAI,WAAK,KAAK,EAAC,wDAAwD,GAAO;oBAEzF,CAAC,UAAU,IAAI,WAAK,KAAK,EAAC,MAAM,GAAO,CACpC,CACP,CAAC;YACJ,CAAC,CAAC,CACE,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Host, Prop, h } from '@stencil/core';\nimport { SulaTimelineListItem, SulaTimelineListItemIconStatus } from './model/sula-timeline-list.model';\n\n@Component({\n tag: 'sula-timeline-list',\n styleUrl: 'sula-timeline-list.scss',\n shadow: true,\n})\nexport class SulaTimelineList {\n /**\n * Timeline list. (Can be use with weekday text or icon with status)\n */\n @Prop({ mutable: true })\n sulaTimelineList: SulaTimelineListItem[] = [];\n\n /**\n * Event emitted when item is clicked.\n */\n @Event()\n itemClicked: EventEmitter<SulaTimelineListItem>;\n\n handleItemClick = (item: SulaTimelineListItem) => {\n if (!item.hasLink) return;\n this.itemClicked.emit(item);\n };\n\n getIconBackgroundColorByStatus(status: SulaTimelineListItemIconStatus) {\n const iconColorByStatus = {\n [SulaTimelineListItemIconStatus.Success]: 'bg-surface-on-body-feedback-success',\n [SulaTimelineListItemIconStatus.Warning]: 'bg-surface-on-body-feedback-alert',\n [SulaTimelineListItemIconStatus.Error]: 'bg-surface-on-body-feedback-error',\n };\n\n return iconColorByStatus[status];\n }\n\n getIconByStatus(status: SulaTimelineListItemIconStatus) {\n const iconByStatus = {\n [SulaTimelineListItemIconStatus.Success]: 'ph ph-check-circle',\n [SulaTimelineListItemIconStatus.Warning]: 'ph ph-warning',\n [SulaTimelineListItemIconStatus.Error]: 'ph ph-warning-circle',\n };\n\n return iconByStatus[status];\n }\n\n getIconColorByStatus(status: SulaTimelineListItemIconStatus) {\n const iconByStatus = {\n [SulaTimelineListItemIconStatus.Success]: 'text-feedback-success',\n [SulaTimelineListItemIconStatus.Warning]: 'text-feedback-alert',\n [SulaTimelineListItemIconStatus.Error]: 'text-feedback-error',\n };\n\n return iconByStatus[status];\n }\n\n render() {\n return (\n <Host>\n <div class=\"flex flex-col bg-surface-on-body px-24 py-32 w-fit rounded-md\">\n {this.sulaTimelineList.map((item, index) => {\n const isLastItem = index === this.sulaTimelineList.length - 1;\n\n return (\n <div\n class={{\n 'relative timeline-item': true,\n 'cursor-pointer group': item.hasLink,\n }}\n onClick={() => this.handleItemClick(item)}\n >\n <div class=\"flex space-x-24 items-center justify-between flex-row w-full\">\n <div class=\"relative flex flex-row space-x-24 items-center\">\n <div class=\"relative\">\n <div\n class={{\n 'rounded-full h-56 w-56 bg-surface-body flex justify-center items-center relative z-10': true,\n 'p-6': !!item.iconStatus,\n }}\n >\n {item.weekdayText && (\n <div class=\"flex flex-col justify-center items-center space-y-4\">\n <span class=\"text-text-secondary text-xs leading-3\">{item.weekdayText.weekday}</span>\n <span class=\"text-xl leading-5 text-text-primary\">{item.weekdayText.day}</span>\n </div>\n )}\n\n {item.iconStatus && (\n <div\n class={{\n 'flex justify-center items-center w-44 h-44 rounded-full': true,\n [this.getIconBackgroundColorByStatus(item.iconStatus)]: true,\n }}\n >\n <div class=\"flex justify-center items-center leading-6 w-44\">\n <sula-icon icon={this.getIconByStatus(item.iconStatus)} customClass={`${this.getIconColorByStatus(item.iconStatus)} text-2xl`}></sula-icon>\n </div>\n </div>\n )}\n </div>\n </div>\n\n <div class=\"flex flex-col\">\n <span class=\"text-text-primary font-bold text-base leading-4\">{item.title}</span>\n {item.message && <span class=\"text-text-secondary text-base leading-4 mt-4\">{item.message}</span>}\n </div>\n </div>\n\n {item.hasLink && (\n <div\n class={{\n 'px-[6px] py-2 rounded-full leading-6 flex items-center justify-center margin-left': true,\n 'group-hover:bg-states-empty-bg-hover transition': item.hasLink,\n }}\n >\n <sula-icon icon=\"ph ph-caret-right\" customClass=\"text-2xl text-text-primary\"></sula-icon>\n </div>\n )}\n </div>\n\n {!isLastItem && <div class=\"absolute bg-surface-body left-[28px] top-56 w-2 h-full\"></div>}\n\n {!isLastItem && <div class=\"h-24\"></div>}\n </div>\n );\n })}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,217 @@
1
+ import { SulaTimelineListItemIconStatus } from "./model/sula-timeline-list.model";
2
+ export default {
3
+ title: 'Components/sula-timeline-list',
4
+ tags: ['autodocs'],
5
+ argTypes: {
6
+ sulaTimelineList: {
7
+ control: 'object',
8
+ defaultValue: [
9
+ {
10
+ title: 'Item 1',
11
+ message: 'Primeira mensagem da timeline',
12
+ weekdayText: {
13
+ weekday: 'SEG',
14
+ day: '15',
15
+ },
16
+ },
17
+ {
18
+ title: 'Item 2',
19
+ message: 'Segunda mensagem da timeline',
20
+ iconStatus: SulaTimelineListItemIconStatus.Success,
21
+ },
22
+ ],
23
+ description: 'Lista de itens da timeline (pode usar texto de dia da semana ou ícone com status)',
24
+ type: {
25
+ required: true,
26
+ },
27
+ },
28
+ itemClicked: {
29
+ action: 'itemClicked',
30
+ description: 'Evento emitido quando o item é clicado',
31
+ },
32
+ },
33
+ parameters: {
34
+ docs: {
35
+ description: {
36
+ component: 'O componente Timeline List do Sula Design System é utilizado para exibir uma sequência cronológica de eventos ou etapas. Cada item pode conter um título, mensagem opcional, e pode ser representado por um dia da semana ou por um ícone com status (sucesso, aviso ou erro).',
37
+ },
38
+ },
39
+ },
40
+ };
41
+ const Template = args => {
42
+ const container = document.createElement('div');
43
+ container.style.margin = '20px';
44
+ const el = document.createElement('sula-timeline-list');
45
+ // Converte o array para string JSON para passar como atributo
46
+ if (args.sulaTimelineList) {
47
+ el.sulaTimelineList = args.sulaTimelineList;
48
+ }
49
+ container.appendChild(el);
50
+ el.addEventListener('itemClicked', args.itemClicked);
51
+ return container;
52
+ };
53
+ export const Default = Template.bind({});
54
+ Default.args = {
55
+ sulaTimelineList: [
56
+ {
57
+ title: 'Primeiro evento',
58
+ message: 'Descrição do primeiro evento da timeline',
59
+ weekdayText: {
60
+ weekday: 'SEG',
61
+ day: '15',
62
+ },
63
+ hasLink: true
64
+ },
65
+ {
66
+ title: 'Segundo evento',
67
+ message: 'Descrição do segundo evento',
68
+ weekdayText: {
69
+ weekday: 'TER',
70
+ day: '16',
71
+ },
72
+ },
73
+ {
74
+ title: 'Terceiro evento',
75
+ message: 'Descrição do terceiro evento',
76
+ weekdayText: {
77
+ weekday: 'QUA',
78
+ day: '17',
79
+ },
80
+ },
81
+ ],
82
+ };
83
+ export const WithIconStatus = Template.bind({});
84
+ WithIconStatus.args = {
85
+ sulaTimelineList: [
86
+ {
87
+ title: 'Tarefa concluída',
88
+ message: 'Esta tarefa foi finalizada com sucesso',
89
+ iconStatus: SulaTimelineListItemIconStatus.Success,
90
+ hasLink: true
91
+ },
92
+ {
93
+ title: 'Atenção necessária',
94
+ message: 'Esta tarefa precisa de atenção',
95
+ iconStatus: SulaTimelineListItemIconStatus.Warning,
96
+ hasLink: true
97
+ },
98
+ {
99
+ title: 'Erro encontrado',
100
+ message: 'Houve um problema nesta etapa',
101
+ iconStatus: SulaTimelineListItemIconStatus.Error,
102
+ hasLink: true
103
+ },
104
+ ],
105
+ };
106
+ export const MixedContent = Template.bind({});
107
+ MixedContent.args = {
108
+ sulaTimelineList: [
109
+ {
110
+ title: 'Reunião agendada',
111
+ message: 'Reunião de planejamento semanal',
112
+ weekdayText: {
113
+ weekday: 'SEG',
114
+ day: '20',
115
+ },
116
+ },
117
+ {
118
+ title: 'Projeto aprovado',
119
+ message: 'O projeto foi aprovado pela diretoria',
120
+ iconStatus: SulaTimelineListItemIconStatus.Success,
121
+ hasLink: true
122
+ },
123
+ {
124
+ title: 'Revisão pendente',
125
+ message: 'Documentação precisa ser revisada',
126
+ iconStatus: SulaTimelineListItemIconStatus.Warning,
127
+ hasLink: true
128
+ },
129
+ {
130
+ title: 'Entrega final',
131
+ message: 'Entrega do produto final',
132
+ weekdayText: {
133
+ weekday: 'SEX',
134
+ day: '24',
135
+ },
136
+ },
137
+ ],
138
+ };
139
+ export const OnlyTitles = Template.bind({});
140
+ OnlyTitles.args = {
141
+ sulaTimelineList: [
142
+ {
143
+ title: 'Início do projeto',
144
+ weekdayText: {
145
+ weekday: 'SEG',
146
+ day: '01',
147
+ },
148
+ },
149
+ {
150
+ title: 'Desenvolvimento',
151
+ iconStatus: SulaTimelineListItemIconStatus.Warning,
152
+ },
153
+ {
154
+ title: 'Testes',
155
+ iconStatus: SulaTimelineListItemIconStatus.Success,
156
+ hasLink: true
157
+ },
158
+ {
159
+ title: 'Deploy',
160
+ weekdayText: {
161
+ weekday: 'SEX',
162
+ day: '05',
163
+ },
164
+ },
165
+ ],
166
+ };
167
+ export const SingleItem = Template.bind({});
168
+ SingleItem.args = {
169
+ sulaTimelineList: [
170
+ {
171
+ title: 'Evento único',
172
+ message: 'Este é um evento isolado na timeline',
173
+ iconStatus: SulaTimelineListItemIconStatus.Success,
174
+ },
175
+ ],
176
+ };
177
+ export const SuccessFlow = Template.bind({});
178
+ SuccessFlow.args = {
179
+ sulaTimelineList: [
180
+ {
181
+ title: 'Pedido recebido',
182
+ message: 'Seu pedido foi recebido e está sendo processado',
183
+ iconStatus: SulaTimelineListItemIconStatus.Success,
184
+ },
185
+ {
186
+ title: 'Pagamento confirmado',
187
+ message: 'O pagamento foi processado com sucesso',
188
+ iconStatus: SulaTimelineListItemIconStatus.Success,
189
+ },
190
+ {
191
+ title: 'Produto enviado',
192
+ message: 'Seu produto foi enviado e está a caminho',
193
+ iconStatus: SulaTimelineListItemIconStatus.Success,
194
+ },
195
+ ],
196
+ };
197
+ export const ErrorFlow = Template.bind({});
198
+ ErrorFlow.args = {
199
+ sulaTimelineList: [
200
+ {
201
+ title: 'Pedido iniciado',
202
+ message: 'Processo de pedido foi iniciado',
203
+ iconStatus: SulaTimelineListItemIconStatus.Success,
204
+ },
205
+ {
206
+ title: 'Problema no pagamento',
207
+ message: 'Houve um erro no processamento do pagamento',
208
+ iconStatus: SulaTimelineListItemIconStatus.Error,
209
+ },
210
+ {
211
+ title: 'Aguardando correção',
212
+ message: 'Aguardando nova tentativa de pagamento',
213
+ iconStatus: SulaTimelineListItemIconStatus.Warning,
214
+ },
215
+ ],
216
+ };
217
+ //# sourceMappingURL=sula-timeline-list.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sula-timeline-list.stories.js","sourceRoot":"","sources":["../../../src/components/sula-timeline-list/sula-timeline-list.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAElF,eAAe;IACb,KAAK,EAAE,+BAA+B;IACtC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,gBAAgB,EAAE;YAChB,OAAO,EAAE,QAAQ;YACjB,YAAY,EAAE;gBACZ;oBACE,KAAK,EAAE,QAAQ;oBACf,OAAO,EAAE,+BAA+B;oBACxC,WAAW,EAAE;wBACX,OAAO,EAAE,KAAK;wBACd,GAAG,EAAE,IAAI;qBACV;iBACF;gBACD;oBACE,KAAK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AwC;YACjD,UAAU,EAAE,8BAA8B,CAAC,OAAO;SACnD;QACD;YACE,KAAK,EAAE,iBAAiB;YACxB,OAAO,EAAE,0CAA0C;YACnD,UAAU,EAAE,8BAA8B,CAAC,OAAO;SACnD;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;IACf,gBAAgB,EAAE;QAChB;YACE,KAAK,EAAE,iBAAiB;YACxB,OAAO,EAAE,iCAAiC;YAC1C,UAAU,EAAE,8BAA8B,CAAC,OAAO;SACnD;QACD;YACE,KAAK,EAAE,uBAAuB;YAC9B,OAAO,EAAE,6CAA6C;YACtD,UAAU,EAAE,8BAA8B,CAAC,KAAK;SACjD;QACD;YACE,KAAK,EAAE,qBAAqB;YAC5B,OAAO,EAAE,wCAAwC;YACjD,UAAU,EAAE,8BAA8B,CAAC,OAAO;SACnD;KACF;CACF,CAAC","sourcesContent":["import { SulaTimelineListItemIconStatus } from './model/sula-timeline-list.model';\n\nexport default {\n title: 'Components/sula-timeline-list',\n tags: ['autodocs'],\n argTypes: {\n sulaTimelineList: {\n control: 'object',\n defaultValue: [\n {\n title: 'Item 1',\n message: 'Primeira mensagem da timeline',\n weekdayText: {\n weekday: 'SEG',\n day: '15',\n },\n },\n {\n title: 'Item 2',\n message: 'Segunda mensagem da timeline',\n iconStatus: SulaTimelineListItemIconStatus.Success,\n },\n ],\n description: 'Lista de itens da timeline (pode usar texto de dia da semana ou ícone com status)',\n type: {\n required: true,\n },\n },\n itemClicked: {\n action: 'itemClicked',\n description: 'Evento emitido quando o item é clicado',\n },\n },\n parameters: {\n docs: {\n description: {\n component:\n 'O componente Timeline List do Sula Design System é utilizado para exibir uma sequência cronológica de eventos ou etapas. Cada item pode conter um título, mensagem opcional, e pode ser representado por um dia da semana ou por um ícone com status (sucesso, aviso ou erro).',\n },\n },\n },\n};\n\nconst Template = args => {\n const container = document.createElement('div');\n container.style.margin = '20px';\n\n const el = document.createElement('sula-timeline-list');\n\n // Converte o array para string JSON para passar como atributo\n if (args.sulaTimelineList) {\n el.sulaTimelineList = args.sulaTimelineList;\n }\n\n container.appendChild(el);\n el.addEventListener('itemClicked', args.itemClicked);\n\n return container;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n sulaTimelineList: [\n {\n title: 'Primeiro evento',\n message: 'Descrição do primeiro evento da timeline',\n weekdayText: {\n weekday: 'SEG',\n day: '15',\n },\n hasLink: true\n },\n {\n title: 'Segundo evento',\n message: 'Descrição do segundo evento',\n weekdayText: {\n weekday: 'TER',\n day: '16',\n },\n },\n {\n title: 'Terceiro evento',\n message: 'Descrição do terceiro evento',\n weekdayText: {\n weekday: 'QUA',\n day: '17',\n },\n },\n ],\n};\n\nexport const WithIconStatus = Template.bind({});\nWithIconStatus.args = {\n sulaTimelineList: [\n {\n title: 'Tarefa concluída',\n message: 'Esta tarefa foi finalizada com sucesso',\n iconStatus: SulaTimelineListItemIconStatus.Success,\n hasLink: true\n },\n {\n title: 'Atenção necessária',\n message: 'Esta tarefa precisa de atenção',\n iconStatus: SulaTimelineListItemIconStatus.Warning,\n hasLink: true\n },\n {\n title: 'Erro encontrado',\n message: 'Houve um problema nesta etapa',\n iconStatus: SulaTimelineListItemIconStatus.Error,\n hasLink: true\n },\n ],\n};\n\nexport const MixedContent = Template.bind({});\nMixedContent.args = {\n sulaTimelineList: [\n {\n title: 'Reunião agendada',\n message: 'Reunião de planejamento semanal',\n weekdayText: {\n weekday: 'SEG',\n day: '20',\n },\n },\n {\n title: 'Projeto aprovado',\n message: 'O projeto foi aprovado pela diretoria',\n iconStatus: SulaTimelineListItemIconStatus.Success,\n hasLink: true\n },\n {\n title: 'Revisão pendente',\n message: 'Documentação precisa ser revisada',\n iconStatus: SulaTimelineListItemIconStatus.Warning,\n hasLink: true\n },\n {\n title: 'Entrega final',\n message: 'Entrega do produto final',\n weekdayText: {\n weekday: 'SEX',\n day: '24',\n },\n },\n ],\n};\n\nexport const OnlyTitles = Template.bind({});\nOnlyTitles.args = {\n sulaTimelineList: [\n {\n title: 'Início do projeto',\n weekdayText: {\n weekday: 'SEG',\n day: '01',\n },\n },\n {\n title: 'Desenvolvimento',\n iconStatus: SulaTimelineListItemIconStatus.Warning,\n },\n {\n title: 'Testes',\n iconStatus: SulaTimelineListItemIconStatus.Success,\n hasLink: true\n },\n {\n title: 'Deploy',\n weekdayText: {\n weekday: 'SEX',\n day: '05',\n },\n },\n ],\n};\n\nexport const SingleItem = Template.bind({});\nSingleItem.args = {\n sulaTimelineList: [\n {\n title: 'Evento único',\n message: 'Este é um evento isolado na timeline',\n iconStatus: SulaTimelineListItemIconStatus.Success,\n },\n ],\n};\n\nexport const SuccessFlow = Template.bind({});\nSuccessFlow.args = {\n sulaTimelineList: [\n {\n title: 'Pedido recebido',\n message: 'Seu pedido foi recebido e está sendo processado',\n iconStatus: SulaTimelineListItemIconStatus.Success,\n },\n {\n title: 'Pagamento confirmado',\n message: 'O pagamento foi processado com sucesso',\n iconStatus: SulaTimelineListItemIconStatus.Success,\n },\n {\n title: 'Produto enviado',\n message: 'Seu produto foi enviado e está a caminho',\n iconStatus: SulaTimelineListItemIconStatus.Success,\n },\n ],\n};\n\nexport const ErrorFlow = Template.bind({});\nErrorFlow.args = {\n sulaTimelineList: [\n {\n title: 'Pedido iniciado',\n message: 'Processo de pedido foi iniciado',\n iconStatus: SulaTimelineListItemIconStatus.Success,\n },\n {\n title: 'Problema no pagamento',\n message: 'Houve um erro no processamento do pagamento',\n iconStatus: SulaTimelineListItemIconStatus.Error,\n },\n {\n title: 'Aguardando correção',\n message: 'Aguardando nova tentativa de pagamento',\n iconStatus: SulaTimelineListItemIconStatus.Warning,\n },\n ],\n};\n"]}
@@ -1,7 +1,7 @@
1
1
  const globalStyles = "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box }:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4 }body{line-height:inherit;margin:0 }hr{border-top-width:1px;color:inherit;height:0 }abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal }small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0 }button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0 }button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none }:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px }::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit }summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1 }[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle }img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{text-rendering:optimizeLegibility}";
2
2
 
3
3
  const NAMESPACE = 'webcomponents';
4
- const BUILD = /* webcomponents */ { hydratedSelectorName: "hydrated", lazyLoad: false, updatable: true, watchCallback: false };
4
+ const BUILD = /* webcomponents */ { hydratedSelectorName: "hydrated", lazyLoad: false, updatable: true};
5
5
 
6
6
  /*
7
7
  Stencil Client Platform v4.35.1 | MIT Licensed | https://stenciljs.com
@@ -952,6 +952,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
952
952
  if (didValueChange) {
953
953
  hostRef.$instanceValues$.set(propName, newVal);
954
954
  {
955
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
956
+ const watchMethods = cmpMeta.$watchers$[propName];
957
+ if (watchMethods) {
958
+ watchMethods.map((watchMethodName) => {
959
+ try {
960
+ instance[watchMethodName](newVal, oldVal, propName);
961
+ } catch (e) {
962
+ consoleError(e, elm);
963
+ }
964
+ });
965
+ }
966
+ }
955
967
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
956
968
  if (instance.componentShouldUpdate) {
957
969
  if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
@@ -968,7 +980,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
968
980
  var proxyComponent = (Cstr, cmpMeta, flags) => {
969
981
  var _a, _b;
970
982
  const prototype = Cstr.prototype;
971
- if (cmpMeta.$members$ || BUILD.watchCallback) {
983
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
984
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
985
+ cmpMeta.$watchers$ = Cstr.watchers;
986
+ }
972
987
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
973
988
  members.map(([memberName, [memberFlags]]) => {
974
989
  if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
@@ -1161,6 +1176,9 @@ var proxyCustomElement = (Cstr, compactMeta) => {
1161
1176
  {
1162
1177
  cmpMeta.$listeners$ = compactMeta[3];
1163
1178
  }
1179
+ {
1180
+ cmpMeta.$watchers$ = Cstr.$watchers$;
1181
+ }
1164
1182
  const originalConnectedCallback = Cstr.prototype.connectedCallback;
1165
1183
  const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
1166
1184
  Object.assign(Cstr.prototype, {