@sula-tech/webcomponents 0.7.4 → 0.7.5
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/sula-avatar_18.cjs.entry.js +8 -6
- package/dist/cjs/sula-avatar_18.cjs.entry.js.map +1 -1
- package/dist/collection/components/sula-textarea/sula-textarea.js +8 -6
- package/dist/collection/components/sula-textarea/sula-textarea.js.map +1 -1
- package/dist/components/sula-textarea.js +8 -6
- package/dist/components/sula-textarea.js.map +1 -1
- package/dist/esm/sula-avatar_18.entry.js +8 -6
- package/dist/esm/sula-avatar_18.entry.js.map +1 -1
- package/dist/webcomponents/{p-0cad4d30.entry.js → p-e86b2271.entry.js} +11 -10
- package/dist/webcomponents/{p-0cad4d30.entry.js.map → p-e86b2271.entry.js.map} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
|
@@ -28241,6 +28241,8 @@ const SulaTextarea = class {
|
|
|
28241
28241
|
this.changeElementsStyle();
|
|
28242
28242
|
}
|
|
28243
28243
|
changeElementsStyle() {
|
|
28244
|
+
if (!this.labelElement || !this.activeLabelElement)
|
|
28245
|
+
return;
|
|
28244
28246
|
this.activeLabelElement.style.display = this.isActive ? 'flex' : 'none';
|
|
28245
28247
|
this.labelElement.style.display = this.isActive ? 'none' : 'block';
|
|
28246
28248
|
if (!this.isActive) {
|
|
@@ -28249,34 +28251,34 @@ const SulaTextarea = class {
|
|
|
28249
28251
|
}
|
|
28250
28252
|
render() {
|
|
28251
28253
|
const containerHeight = this.rows * 24 + 48;
|
|
28252
|
-
return (index.h(index.Host, { key: '
|
|
28254
|
+
return (index.h(index.Host, { key: '1ec5c0b8f04ea2f32d48301334d2c717327d0b17', ref: node => (this.node = node) }, index.h("div", { key: 'be0e209759746014407a3dc9aa553faea5b4f7f9' }, index.h("div", { key: '238be270fa3cfdbdd0f4a5cda9d99deeb7c9667d', id: "textarea-container", class: {
|
|
28253
28255
|
'relative border rounded-sm px-16 py-12 outline-none caret-brand-primary': true,
|
|
28254
28256
|
'textarea-focus': this.textareaIsFocused && !this.disabled && this.status === SulaTextareaStatus.Default,
|
|
28255
28257
|
'textarea-error': this.status === SulaTextareaStatus.Error && !this.disabled,
|
|
28256
28258
|
'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,
|
|
28257
28259
|
'bg-surface-body border-line-input cursor-text': !this.disabled,
|
|
28258
|
-
}, style: { height: `${containerHeight}px` }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleTextareaClick }, index.h("label", { key: '
|
|
28260
|
+
}, style: { height: `${containerHeight}px` }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleTextareaClick }, index.h("label", { key: '66812b881d9396ff093cac598e6c64a54e1cdbad', class: {
|
|
28259
28261
|
'text-base top-16 left-12 absolute transition-all duration-200 ease-in-out pointer-events-none z-10 w-[85%]': true,
|
|
28260
28262
|
'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),
|
|
28261
28263
|
'text-text-disabled': this.disabled,
|
|
28262
28264
|
'bg-surface-body': !this.disabled && this.isActive,
|
|
28263
|
-
}, ref: node => (this.labelElement = node) }, this.label), index.h("label", { key: '
|
|
28265
|
+
}, ref: node => (this.labelElement = node) }, this.label), index.h("label", { key: 'e0b2a3f1d35b7bd047b6324464772697d565076d', class: {
|
|
28264
28266
|
'absolute font-bold transition-all duration-200 ease-in-out pointer-events-none z-10 active-label hidden from-down': true,
|
|
28265
28267
|
'text-sm top-12 left-16': this.isActive,
|
|
28266
28268
|
'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),
|
|
28267
28269
|
'text-text-disabled': this.disabled,
|
|
28268
28270
|
'bg-surface-body': !this.disabled && this.isActive,
|
|
28269
|
-
}, ref: node => (this.activeLabelElement = node) }, this.label), index.h("textarea", { key: '
|
|
28271
|
+
}, ref: node => (this.activeLabelElement = node) }, this.label), index.h("textarea", { key: '77603b5c3bfb9430e5a41f0b219c5f0597f4ab92', ref: node => (this.textareaElement = node), placeholder: this.isActive ? this.placeholder : '', rows: this.rows, maxLength: this.maxLength, disabled: this.disabled, class: {
|
|
28270
28272
|
'w-full h-full outline-none text-base bg-transparent border-none resize-none': true,
|
|
28271
28273
|
'pt-6': this.isActive,
|
|
28272
28274
|
'pt-0': !this.isActive,
|
|
28273
28275
|
'text-text-primary': !this.disabled,
|
|
28274
28276
|
'text-text-disabled cursor-not-allowed overflow-hidden': this.disabled,
|
|
28275
|
-
}, onInput: this.handleTextareaChanges, onFocus: this.handleTextareaFocus, onBlur: this.handleBlur, value: this.textValue })), (this.helpText || this.maxLength) && (index.h("div", { key: '
|
|
28277
|
+
}, onInput: this.handleTextareaChanges, onFocus: this.handleTextareaFocus, onBlur: this.handleBlur, value: this.textValue })), (this.helpText || this.maxLength) && (index.h("div", { key: 'ed5e9397e617eb07241dc26fed75d35f0abd16fd', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (index.h("div", { key: '3ee82fca291f045dcee3c2c29da6ac625ee42d44', id: "textarea-help-text", class: {
|
|
28276
28278
|
'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,
|
|
28277
28279
|
'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,
|
|
28278
28280
|
'text-text-disabled': this.disabled,
|
|
28279
|
-
} }, this.helpText)), this.maxLength && (index.h("div", { key: '
|
|
28281
|
+
} }, this.helpText)), this.maxLength && (index.h("div", { key: 'd4a3503ef45089512b85cf2cb28c32f655f9b17c', id: "max-length-container", class: {
|
|
28280
28282
|
'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,
|
|
28281
28283
|
'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,
|
|
28282
28284
|
'text-text-disabled': this.disabled,
|