@sula-tech/webcomponents 0.17.4 → 0.17.6
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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{sula-avatar_29.cjs.entry.js → sula-avatar_30.cjs.entry.js} +339 -46
- package/dist/cjs/sula-avatar_30.cjs.entry.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/sula-icon/sula-icon.css +1 -1
- package/dist/collection/components/sula-loader/sula-loader.js +21 -6
- package/dist/collection/components/sula-loader/sula-loader.js.map +1 -1
- package/dist/collection/components/sula-menu/model/sula-menu.model.js +2 -0
- package/dist/collection/components/sula-menu/model/sula-menu.model.js.map +1 -0
- package/dist/collection/components/sula-menu/sula-menu.css +1 -0
- package/dist/collection/components/sula-menu/sula-menu.js +442 -0
- package/dist/collection/components/sula-menu/sula-menu.js.map +1 -0
- package/dist/collection/components/sula-menu/sula-menu.stories.js +401 -0
- package/dist/collection/components/sula-menu/sula-menu.stories.js.map +1 -0
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js +1 -1
- package/dist/collection/components/sula-progress-bar/sula-progress-bar.js +2 -2
- package/dist/collection/components/sula-radio-button/sula-radio-button.js +2 -2
- package/dist/collection/components/sula-search-bar/sula-search-bar.js +2 -2
- package/dist/collection/components/sula-segmented-control/sula-segmented-control.js +1 -1
- package/dist/collection/components/sula-switch/sula-switch.js +4 -4
- package/dist/collection/components/sula-table/sula-table.js +3 -3
- package/dist/collection/components/sula-table-body/sula-table-body.js +1 -1
- package/dist/collection/components/sula-table-cell/sula-table-cell.js +2 -2
- package/dist/collection/components/sula-table-head-cell/sula-table-head-cell.js +2 -2
- package/dist/collection/components/sula-table-header/sula-table-header.js +1 -1
- package/dist/collection/components/sula-table-row/sula-table-row.js +1 -1
- package/dist/collection/components/sula-tag/sula-tag.js +3 -3
- package/dist/collection/components/sula-textarea/sula-textarea.js +6 -6
- package/dist/collection/components/sula-textfield/sula-textfield.js +2 -2
- package/dist/collection/components/sula-tiles/sula-tiles.js +1 -1
- package/dist/collection/components/sula-timeline-list/sula-timeline-list.js +1 -1
- package/dist/collection/components/sula-toggle/sula-toggle.js +1 -1
- package/dist/collection/components/sula-tooltip/sula-tooltip.js +1 -1
- package/dist/components/{p-fgs5TBQ7.js → p-B2GnTWgR.js} +3 -3
- package/dist/components/{p-fgs5TBQ7.js.map → p-B2GnTWgR.js.map} +1 -1
- package/dist/components/{p-DGCOlK4x.js → p-BJMnU9Gv.js} +4 -4
- package/dist/components/{p-DGCOlK4x.js.map → p-BJMnU9Gv.js.map} +1 -1
- package/dist/components/{p-DksR9NcR.js → p-DtVItq_Q.js} +3 -3
- package/dist/components/{p-DksR9NcR.js.map → p-DtVItq_Q.js.map} +1 -1
- package/dist/components/{p-fwcKhm5l.js → p-zE24jlFe.js} +23 -8
- package/dist/components/{p-fwcKhm5l.js.map → p-zE24jlFe.js.map} +1 -1
- package/dist/components/sula-avatar.js +1 -1
- package/dist/components/sula-badge.js +1 -1
- package/dist/components/sula-breadcrumb.js +1 -1
- package/dist/components/sula-button.js +1 -1
- package/dist/components/sula-checkbox.js +1 -1
- package/dist/components/sula-chip.js +2 -2
- package/dist/components/sula-dropdown.js +2 -2
- package/dist/components/sula-icon.js +1 -1
- package/dist/components/sula-loader.js +1 -1
- package/dist/components/sula-menu-select-list.js +1 -1
- package/dist/components/sula-menu.d.ts +11 -0
- package/dist/components/sula-menu.js +317 -0
- package/dist/components/sula-menu.js.map +1 -0
- package/dist/components/sula-modal.js +3 -3
- package/dist/components/sula-progress-bar.js +3 -3
- package/dist/components/sula-radio-button.js +2 -2
- package/dist/components/sula-search-bar.js +3 -3
- package/dist/components/sula-segmented-control.js +2 -2
- package/dist/components/sula-switch.js +4 -4
- package/dist/components/sula-table-body.js +1 -1
- package/dist/components/sula-table-cell.js +2 -2
- package/dist/components/sula-table-head-cell.js +2 -2
- package/dist/components/sula-table-header.js +1 -1
- package/dist/components/sula-table-row.js +1 -1
- package/dist/components/sula-table.js +3 -3
- package/dist/components/sula-tag.js +4 -4
- package/dist/components/sula-textarea.js +6 -6
- package/dist/components/sula-textfield.js +3 -3
- package/dist/components/sula-tiles.js +2 -2
- package/dist/components/sula-timeline-list.js +2 -2
- package/dist/components/sula-toggle.js +2 -2
- package/dist/components/sula-tooltip.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{sula-avatar_29.entry.js → sula-avatar_30.entry.js} +339 -47
- package/dist/esm/sula-avatar_30.entry.js.map +1 -0
- package/dist/esm/webcomponents.js +1 -1
- package/dist/types/components/sula-loader/sula-loader.d.ts +7 -3
- package/dist/types/components/sula-menu/model/sula-menu.model.d.ts +21 -0
- package/dist/types/components/sula-menu/sula-menu.d.ts +73 -0
- package/dist/types/components/sula-menu/sula-menu.stories.d.ts +56 -0
- package/dist/types/components.d.ts +74 -0
- package/dist/webcomponents/{p-f62433bd.entry.js → p-b58b85c4.entry.js} +854 -423
- package/dist/webcomponents/p-b58b85c4.entry.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +14 -5
- package/package.json +1 -1
- package/dist/cjs/sula-avatar_29.cjs.entry.js.map +0 -1
- package/dist/esm/sula-avatar_29.entry.js.map +0 -1
- package/dist/webcomponents/p-f62433bd.entry.js.map +0 -1
|
@@ -5,7 +5,7 @@ export class SulaTableRow {
|
|
|
5
5
|
replaceHostWithRenderedElement(this.host, 'tr');
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: 'b50904b0e7a340a2c59ed70448c0a1b0a2c7095d' }, h("tr", { key: '6055f44975ae0ce19b380f9badec73a66d26b0ea' }, h("slot", { key: 'a7c8efe725c4a9b52f14be88a1f4fc86230bad63' }))));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "sula-table-row"; }
|
|
11
11
|
static get originalStyleUrls() {
|
|
@@ -72,14 +72,14 @@ export class SulaTag {
|
|
|
72
72
|
return iconStatusStyles[this.iconStatus];
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
|
-
return (h(Host, { key: '
|
|
75
|
+
return (h(Host, { key: '7fa65feb03069f4195fe0b02497f2ed1b269a302' }, h("div", { key: 'dcf9d0817a0c208bfd2e33527dbb23695528ec62', 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: '
|
|
79
|
+
} }, this.icon && (h("div", { key: '2c7e5bc40795acce82cebc6129859ce733419686', 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: '
|
|
82
|
+
} }, h("sula-icon", { key: '916971b011cace9d210484e4465eb1927985e8bc', icon: this.icon, "custom-class": "text-base text-negative-negative-1 leading-4" }))), h("span", { key: '7587ddfdfc8bb764e2108f2b7145b2f2801c51a1', class: {
|
|
83
83
|
'text-base leading-4': true,
|
|
84
84
|
[this.getTextColorClass()]: true,
|
|
85
85
|
[this.getTextWeightClass()]: true,
|
|
@@ -124,32 +124,32 @@ export class SulaTextarea {
|
|
|
124
124
|
}
|
|
125
125
|
render() {
|
|
126
126
|
const containerHeight = this.rows * 24 + 48;
|
|
127
|
-
return (h(Host, { key: '
|
|
127
|
+
return (h(Host, { key: '7656b022c7545b930dc22a20018e307d1208934b', ref: node => (this.node = node) }, h("div", { key: 'c98a79a8b8791187b161676b5616c87360ef1b5e' }, h("div", { key: '95e8581a69ac055689be4ced3b06bbc6a77c5693', id: "textarea-container", class: {
|
|
128
128
|
'relative border rounded-sm px-16 py-12 outline-none caret-brand-primary': true,
|
|
129
129
|
'textarea-focus': this.textareaIsFocused && !this.disabled && this.status === SulaTextareaStatus.Default,
|
|
130
130
|
'textarea-error': this.status === SulaTextareaStatus.Error && !this.disabled,
|
|
131
131
|
'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,
|
|
132
132
|
'bg-surface-body border-line-input cursor-text': !this.disabled,
|
|
133
|
-
}, style: { height: `${containerHeight}px` }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleTextareaClick }, h("label", { key: '
|
|
133
|
+
}, style: { height: `${containerHeight}px` }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleTextareaClick }, h("label", { key: '795b6e54da17a34d27be93c36dadc83469a9983e', class: {
|
|
134
134
|
'text-base top-16 left-12 absolute transition-all duration-200 ease-in-out pointer-events-none z-10 w-[85%]': true,
|
|
135
135
|
'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),
|
|
136
136
|
'text-text-disabled': this.disabled,
|
|
137
137
|
'bg-surface-body': !this.disabled && this.isActive,
|
|
138
|
-
}, ref: node => (this.labelElement = node) }, this.label), h("label", { key: '
|
|
138
|
+
}, ref: node => (this.labelElement = node) }, this.label), h("label", { key: 'e7afb52d2d41be28e79ffa3c3c33967daae252e7', class: {
|
|
139
139
|
'absolute font-bold transition-all duration-200 ease-in-out pointer-events-none z-10 active-label hidden from-down': true,
|
|
140
140
|
'text-sm top-12 left-16': this.isActive,
|
|
141
141
|
'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),
|
|
142
142
|
'text-text-disabled': this.disabled,
|
|
143
143
|
'bg-surface-body': !this.disabled && this.isActive,
|
|
144
|
-
}, ref: node => (this.activeLabelElement = node) }, this.label), h("textarea", { key: '
|
|
144
|
+
}, ref: node => (this.activeLabelElement = node) }, this.label), h("textarea", { key: '064c1bd7d0f6d39b2bab31b0735707058298d00b', ref: node => (this.textareaElement = node), placeholder: this.isActive ? this.placeholder : '', rows: this.rows, maxLength: this.maxLength, disabled: this.disabled, class: {
|
|
145
145
|
'w-full h-full outline-none text-base bg-transparent border-none resize-none': true,
|
|
146
146
|
'text-text-primary': !this.disabled,
|
|
147
147
|
'text-text-disabled cursor-not-allowed overflow-hidden': this.disabled,
|
|
148
|
-
}, style: { paddingTop: this.isActive ? `${this.labelPadding}px` : '0' }, onInput: this.handleTextareaChanges, onFocus: this.handleTextareaFocus, onBlur: this.handleBlur, value: this.textValue })), (this.helpText || this.maxLength) && (h("div", { key: '
|
|
148
|
+
}, style: { paddingTop: this.isActive ? `${this.labelPadding}px` : '0' }, onInput: this.handleTextareaChanges, onFocus: this.handleTextareaFocus, onBlur: this.handleBlur, value: this.textValue })), (this.helpText || this.maxLength) && (h("div", { key: 'edff6adbd2f75bdbd9178459ff7b2dfb7ee8e0e1', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: 'ed7699069648023632444a04d30966c3e72d669a', id: "textarea-help-text", class: {
|
|
149
149
|
'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,
|
|
150
150
|
'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,
|
|
151
151
|
'text-text-disabled': this.disabled,
|
|
152
|
-
} }, this.helpText)), this.maxLength && (h("div", { key: '
|
|
152
|
+
} }, this.helpText)), this.maxLength && (h("div", { key: 'd2e69f71725c41c238282d3cf6b8e849036ec45d', id: "max-length-container", class: {
|
|
153
153
|
'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,
|
|
154
154
|
'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,
|
|
155
155
|
'text-text-disabled': this.disabled,
|
|
@@ -232,14 +232,14 @@ export class SulaTextfield {
|
|
|
232
232
|
return this.icon;
|
|
233
233
|
}
|
|
234
234
|
render() {
|
|
235
|
-
return (h(Host, { key: '
|
|
235
|
+
return (h(Host, { key: '4f79598068fc26d0da85046107c7d3f86f718faa', ref: node => (this.node = node) }, h("div", { key: 'a04fd8998155e121521c9041e59b12bddefa9642' }, h("div", { key: '51d112d7433e828222e3ecd5fc4d56c79ff0d234', id: "button-container", class: {
|
|
236
236
|
'flex items-center border rounded-sm px-16 outline-none h-[72px] caret-brand-primary': true,
|
|
237
237
|
'flex-row justify-between': !!this.icon || this.type === SulaTextfieldType.Password,
|
|
238
238
|
'button-focus': this.inputIsFocused && !this.disabled && this.status === SulaTextfieldStatus.Default,
|
|
239
239
|
'button-error': this.status === SulaTextfieldStatus.Error && !this.disabled,
|
|
240
240
|
'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,
|
|
241
241
|
'bg-surface-body border-line-input cursor-pointer': !this.disabled,
|
|
242
|
-
}, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleInputClick }, h("div", { key: '
|
|
242
|
+
}, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleInputClick }, h("div", { key: '76d35e1f52b83283aa01ca00c8ca8449e4c9f769', class: { 'hidden flex-col w-full': true, 'pr-12': !!this.icon }, ref: node => (this.inputContainer = node) }, h("label", { key: '04483fdf77992f83471d83e16ddc629f08eae2d0', class: { 'font-bold text-sm from-down': true, 'text-text-primary': !this.disabled, 'text-text-disabled': this.disabled } }, this.label), h("input", { key: 'f9bf7f7af0de3dd5ba87238afd611398a2122936', type: this.type, ref: node => (this.inputElement = node), placeholder: this.placeholder, class: { 'outline-none text-base bg-transparent': true, 'text-text-primary': !this.disabled, 'text-text-disabled': this.disabled }, onInput: this.handleInputChanges, onFocus: this.handleInputFocus, value: this.textValue, disabled: this.disabled })), h("div", { key: 'e3b131e038441af0190a446552960940143f81b8', 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: '7b61eba4a612546572ab62be87a6e394bf0e6062', class: "flex items-center justify-center", onClick: this.handleIconClick }, h("sula-icon", { key: '02c9cace5b4553ae5b2cd8ac6e563ddabbfe68ea', icon: this.getInputIcon(), customClass: `text-2xl ${this.disabled ? 'text-icon-disabled' : 'text-icon-primary'}` })))), (this.helpText || this.maxLength) && !this.disabled && (h("div", { key: '55c5dac7fd4602a53394fb0b0bd4856893f8bf07', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: '37fa016f1e136635d2e2fead44bc7c4364b71ee0', 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: '289e59d646731611ca1f6271aad0675d78982f3d', 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)))))));
|
|
243
243
|
}
|
|
244
244
|
static get is() { return "sula-textfield"; }
|
|
245
245
|
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: '
|
|
124
|
+
return (h(Host, { key: '2a2ec056596961f8e07ebfdc3f056fcb89b9a42b' }, h("div", { key: 'fd69113042f871fd28a8b0389cd51f8543b4fada', 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"; }
|
|
@@ -37,7 +37,7 @@ export class SulaTimelineList {
|
|
|
37
37
|
return iconByStatus[status];
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
|
-
return (h(Host, { key: '
|
|
40
|
+
return (h(Host, { key: '3caead2afcf62c17f2f6ac76976afde55d0834a3' }, h("div", { key: 'f9dbc541a4e9dad9bf216a1c09da4cf45be01a8e', class: "flex flex-col bg-surface-on-body px-24 py-32 w-fit rounded-md" }, this.sulaTimelineList.map((item, index) => {
|
|
41
41
|
const isLastItem = index === this.sulaTimelineList.length - 1;
|
|
42
42
|
return (h("div", { class: {
|
|
43
43
|
'relative timeline-item': true,
|
|
@@ -38,7 +38,7 @@ export class SulaToggle {
|
|
|
38
38
|
return `${base} bg-surface-on-body hover:bg-states-empty-bg-hover active:bg-states-empty-bg-pressed`;
|
|
39
39
|
}
|
|
40
40
|
render() {
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: 'c1e3feffd4ddfa93fb7df88f992cbe15dd6745ba' }, h("button", { key: '3778675d10b39c15ce3a55f0d3a32e1595b1fc1a', id: "favorite-button", class: this.getButtonClass(), disabled: this.buttonDisabled, onClick: this.handleClick, "aria-pressed": this.selected ? 'true' : 'false', "aria-label": this.selected ? 'Remover dos favoritos' : 'Adicionar aos favoritos' }, h("sula-icon", { key: 'a901c2eede34f16d1d3f86424d28f3d112c66f3a', icon: this.getIconName(), customClass: `text-2xl ${this.getIconColorClass()} ${!this.buttonDisabled && !this.selected ? 'active:text-feedback-error' : ''}`, class: "flex leading-6" }))));
|
|
42
42
|
}
|
|
43
43
|
static get is() { return "sula-toggle"; }
|
|
44
44
|
static get encapsulation() { return "shadow"; }
|
|
@@ -99,7 +99,7 @@ export class SulaTooltip {
|
|
|
99
99
|
const hostClass = isParentMode
|
|
100
100
|
? 'absolute inset-0 pointer-events-none overflow-visible'
|
|
101
101
|
: 'inline-block relative';
|
|
102
|
-
return (h(Host, { key: '
|
|
102
|
+
return (h(Host, { key: '1749f7b44ef30504ecce491b4859f9515519265e', class: hostClass }, !isParentMode && (h("div", { key: 'f76902766e86ac4835da267dc8c9d01c70062668', class: this.getIconClasses(), onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, role: "button", "aria-label": "Tooltip trigger", ref: (el) => (this.triggerEl = el) }, h("sula-icon", { key: 'cbd5f793255ee1017a5335e867bd18de598b37c3', class: "flex items-center justify-center w-full h-full leading-[0]", icon: this.icon, customClass: "text-icon-primary text-[18px] leading-none" }))), this.displayText && (h("div", { key: '04a929fcd51750a4450d1104a8dee9b912a5da7a', class: this.getHintClasses(), role: "tooltip", ref: (el) => (this.hintEl = el) }, this.displayText, h("div", { key: 'a10a53512e69146284365393b72864c8c3b1a0f5', class: "tooltip-arrow", "data-popper-arrow": true, ref: (el) => (this.arrowEl = el) })))));
|
|
103
103
|
}
|
|
104
104
|
static get is() { return "sula-tooltip"; }
|
|
105
105
|
static get encapsulation() { return "shadow"; }
|