@sula-tech/webcomponents 0.20.0 → 0.21.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.
- package/dist/cjs/index.cjs.js +7 -3
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{sula-avatar_31.cjs.entry.js → sula-avatar_32.cjs.entry.js} +428 -88
- package/dist/cjs/sula-avatar_32.cjs.entry.js.map +1 -0
- package/dist/cjs/{sula-menu.model-BDxbWyPG.js → sula-calendar.model-BI5cNrUo.js} +8 -2
- package/dist/cjs/sula-calendar.model-BI5cNrUo.js.map +1 -0
- package/dist/cjs/sula-toast-stack.cjs.entry.js +4 -4
- package/dist/cjs/sula-toast.cjs.entry.js +2 -2
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/sula-badge/sula-badge.css +1 -1
- package/dist/collection/components/sula-calendar/model/sula-calendar.model.js +6 -0
- package/dist/collection/components/sula-calendar/model/sula-calendar.model.js.map +1 -0
- package/dist/collection/components/sula-calendar/sula-calendar.css +1 -0
- package/dist/collection/components/sula-calendar/sula-calendar.js +747 -0
- package/dist/collection/components/sula-calendar/sula-calendar.js.map +1 -0
- package/dist/collection/components/sula-calendar/sula-calendar.stories.js +273 -0
- package/dist/collection/components/sula-calendar/sula-calendar.stories.js.map +1 -0
- package/dist/collection/components/sula-checkbox/sula-checkbox.js +3 -3
- package/dist/collection/components/sula-chip/sula-chip.js +3 -3
- package/dist/collection/components/sula-dropdown/sula-dropdown.js +3 -3
- package/dist/collection/components/sula-icon/sula-icon.css +1 -1
- package/dist/collection/components/sula-icon/sula-icon.js +1 -1
- package/dist/collection/components/sula-icon-picker/model/sula-icon-picker.model.js.map +1 -1
- package/dist/collection/components/sula-icon-picker/sula-icon-picker.js +18 -8
- package/dist/collection/components/sula-icon-picker/sula-icon-picker.js.map +1 -1
- package/dist/collection/components/sula-loader/sula-loader.js +1 -1
- package/dist/collection/components/sula-menu/sula-menu.js +8 -8
- 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.css +1 -1
- package/dist/collection/components/sula-textfield/sula-textfield.js +27 -3
- package/dist/collection/components/sula-textfield/sula-textfield.js.map +1 -1
- package/dist/collection/components/sula-textfield/sula-textfield.stories.js +9 -0
- package/dist/collection/components/sula-textfield/sula-textfield.stories.js.map +1 -1
- 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-toast/sula-toast.js +2 -2
- package/dist/collection/components/sula-toast-stack/sula-toast-stack.js +4 -4
- package/dist/collection/components/sula-toggle/sula-toggle.js +1 -1
- package/dist/collection/components/sula-tooltip/sula-tooltip.js +1 -1
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-DmQoJS86.js → p-B_NGmHsm.js} +5 -5
- package/dist/components/{p-DmQoJS86.js.map → p-B_NGmHsm.js.map} +1 -1
- package/dist/components/{p-D0ZAC0yK.js → p-BjgwRn5o.js} +7 -7
- package/dist/components/{p-D0ZAC0yK.js.map → p-BjgwRn5o.js.map} +1 -1
- package/dist/components/{p-DGfvh6dZ.js → p-BlH9b-mx.js} +4 -4
- package/dist/components/{p-DGfvh6dZ.js.map → p-BlH9b-mx.js.map} +1 -1
- package/dist/components/p-Cp_4qTxj.js +10 -0
- package/dist/components/p-Cp_4qTxj.js.map +1 -0
- package/dist/components/{p-DqRqPukj.js → p-DaG0HavP.js} +4 -4
- package/dist/components/{p-DqRqPukj.js.map → p-DaG0HavP.js.map} +1 -1
- package/dist/components/{p-b7t6bSNa.js → p-DtVQ10Ux.js} +4 -4
- package/dist/components/{p-b7t6bSNa.js.map → p-DtVQ10Ux.js.map} +1 -1
- package/dist/components/{p-CJ2i2jVV.js → p-VozP-C7p.js} +5 -5
- package/dist/components/{p-CJ2i2jVV.js.map → p-VozP-C7p.js.map} +1 -1
- package/dist/components/{p-DmCNhtp_.js → p-rCU8ay8s.js} +3 -3
- package/dist/components/{p-DmCNhtp_.js.map → p-rCU8ay8s.js.map} +1 -1
- package/dist/components/p-rm8YKiRh.js +555 -0
- package/dist/components/p-rm8YKiRh.js.map +1 -0
- package/dist/components/sula-avatar.js +1 -1
- package/dist/components/sula-badge.js +2 -2
- package/dist/components/sula-breadcrumb.js +1 -1
- package/dist/components/sula-button.js +1 -1
- package/dist/components/sula-calendar.d.ts +11 -0
- package/dist/components/sula-calendar.js +385 -0
- package/dist/components/sula-calendar.js.map +1 -0
- package/dist/components/sula-checkbox.js +4 -4
- package/dist/components/sula-chip.js +5 -5
- package/dist/components/sula-dropdown.js +1 -1
- package/dist/components/sula-icon-picker.js +22 -12
- package/dist/components/sula-icon-picker.js.map +1 -1
- 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.js +9 -9
- 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 +1 -1
- 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 +1 -545
- package/dist/components/sula-textfield.js.map +1 -1
- package/dist/components/sula-tiles.js +2 -2
- package/dist/components/sula-timeline-list.js +2 -2
- package/dist/components/sula-toast-stack.js +6 -6
- package/dist/components/sula-toast.js +1 -1
- package/dist/components/sula-toggle.js +2 -2
- package/dist/components/sula-tooltip.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{sula-avatar_31.entry.js → sula-avatar_32.entry.js} +422 -83
- package/dist/esm/sula-avatar_32.entry.js.map +1 -0
- package/dist/esm/{sula-menu.model-Cs9RR1ZV.js → sula-calendar.model-BbsLJDfp.js} +9 -3
- package/dist/esm/sula-calendar.model-BbsLJDfp.js.map +1 -0
- package/dist/esm/sula-toast-stack.entry.js +4 -4
- package/dist/esm/sula-toast.entry.js +2 -2
- package/dist/esm/webcomponents.js +1 -1
- package/dist/types/components/sula-calendar/model/sula-calendar.model.d.ts +28 -0
- package/dist/types/components/sula-calendar/sula-calendar.d.ts +128 -0
- package/dist/types/components/sula-calendar/sula-calendar.stories.d.ts +159 -0
- package/dist/types/components/sula-icon-picker/model/sula-icon-picker.model.d.ts +4 -0
- package/dist/types/components/sula-textfield/sula-textfield.d.ts +4 -0
- package/dist/types/components/sula-textfield/sula-textfield.stories.d.ts +8 -0
- package/dist/types/components.d.ts +199 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/webcomponents/index.esm.js +1 -1
- package/dist/webcomponents/{p-fcc1a28c.entry.js → p-0004eff8.entry.js} +805 -373
- package/dist/webcomponents/p-0004eff8.entry.js.map +1 -0
- package/dist/webcomponents/{p-170854a5.entry.js → p-9a8a1133.entry.js} +16 -16
- package/dist/webcomponents/{p-Cs9RR1ZV.js → p-BbsLJDfp.js} +11 -4
- package/dist/webcomponents/p-BbsLJDfp.js.map +1 -0
- package/dist/webcomponents/{p-c58125e1.entry.js → p-aafb83bd.entry.js} +6 -6
- package/dist/webcomponents/webcomponents.esm.js +46 -23
- package/package.json +1 -1
- package/dist/cjs/sula-avatar_31.cjs.entry.js.map +0 -1
- package/dist/cjs/sula-menu.model-BDxbWyPG.js.map +0 -1
- package/dist/esm/sula-avatar_31.entry.js.map +0 -1
- package/dist/esm/sula-menu.model-Cs9RR1ZV.js.map +0 -1
- package/dist/webcomponents/p-Cs9RR1ZV.js.map +0 -1
- package/dist/webcomponents/p-fcc1a28c.entry.js.map +0 -1
- /package/dist/webcomponents/{p-170854a5.entry.js.map → p-9a8a1133.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-c58125e1.entry.js.map → p-aafb83bd.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-DYfmicjp.js';
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-
|
|
2
|
+
import { d as defineCustomElement$2 } from './p-DaG0HavP.js';
|
|
3
3
|
|
|
4
4
|
var SulaSegmentedControlType;
|
|
5
5
|
(function (SulaSegmentedControlType) {
|
|
@@ -61,7 +61,7 @@ const SulaSegmentedControl$1 = /*@__PURE__*/ proxyCustomElement(class SulaSegmen
|
|
|
61
61
|
return item.selected ? 'text-brand-primary' : 'text-text-primary';
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
|
-
return (h(Host, { key: '
|
|
64
|
+
return (h(Host, { key: 'e4d257cbdefcae292ace48939622ac2b6c86808d' }, h("div", { key: '831495bf8af249b2d0ded6fa457cf76c1020a1fa', class: {
|
|
65
65
|
'flex flex-row items-center rounded-xxl p-2 w-fit backdrop-blur-[20px]': true,
|
|
66
66
|
'bg-opacity-on-body': this.color === SulaSegmentedControlColor.Gray,
|
|
67
67
|
'bg-opacity-body': this.color === SulaSegmentedControlColor.White,
|
|
@@ -54,7 +54,7 @@ const SulaSwitch$1 = /*@__PURE__*/ proxyCustomElement(class SulaSwitch extends H
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
return (h(Host, { key: '
|
|
57
|
+
return (h(Host, { key: '03ac13764a97e343c005d0b6ad86aedd63d3fcc0' }, h("div", { key: 'ddca75645b49d3b965011eb36e57a6eeaece645f', class: {
|
|
58
58
|
'outline-none': true,
|
|
59
59
|
'flex items-center space-x-12': !!this.label && this.type === SulaSwitchType.Default,
|
|
60
60
|
'flex items-center justify-between bg-surface-on-body rounded-md min-h-[85px] px-24 py-16': this.type === SulaSwitchType.List,
|
|
@@ -62,17 +62,17 @@ const SulaSwitch$1 = /*@__PURE__*/ proxyCustomElement(class SulaSwitch extends H
|
|
|
62
62
|
'w-[280px]': this.type === SulaSwitchType.List && !this.responsive,
|
|
63
63
|
'hover:bg-states-empty-bg-hover active:bg-states-empty-bg-pressed cursor-pointer': this.type === SulaSwitchType.List && !this.disabled,
|
|
64
64
|
'container-focus': this.isFocus && this.type === SulaSwitchType.List,
|
|
65
|
-
}, onFocus: this.handleFocus, onBlur: this.handleBlur, onClick: this.handleClick, tabIndex: 0 }, this.type === SulaSwitchType.List && (h("div", { key: '
|
|
65
|
+
}, onFocus: this.handleFocus, onBlur: this.handleBlur, onClick: this.handleClick, tabIndex: 0 }, this.type === SulaSwitchType.List && (h("div", { key: 'e15ca8ec7506497d574a76b523ce5c4fd6def934', class: "flex flex-col flex-1 mr-16 overflow-hidden" }, !!this.label && h("label", { key: '2bcd6af3688e18d597b39db6ee2eb4355a3c0377', class: "text-text-primary font-bold text-base cursor-pointer break-words" }, this.label), !!this.subTitle && h("span", { key: '7433a736246106dddfff92f681c274d2ea6d6938', class: "text-text-secondary text-base break-words" }, this.subTitle))), h("div", { key: 'cfe3186e0a7409a0cfe2092f0cca822eecf45727', class: {
|
|
66
66
|
'switch-container w-56 h-32 flex items-center rounded-xxl p-2 outline-none': true,
|
|
67
67
|
'switch-on bg-brand-primary justify-end': this.active,
|
|
68
68
|
'switch-off bg-neutral-neutral-3 justify-start': !this.active,
|
|
69
69
|
'cursor-not-allowed bg-states-bg-disabled': this.disabled,
|
|
70
70
|
'switch-focus': this.isFocus && this.type === SulaSwitchType.Default,
|
|
71
|
-
}, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '
|
|
71
|
+
}, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '411f40ad8ad8b6395ea24a076f88602342126cfc', class: {
|
|
72
72
|
'switch-thumb w-[28px] h-[28px] rounded-full flex justify-center items-center': true,
|
|
73
73
|
'bg-negative-negative-1': !this.disabled,
|
|
74
74
|
'bg-states-bg-disabled shadow-md': this.disabled,
|
|
75
|
-
} }, h("div", { key: '
|
|
75
|
+
} }, h("div", { key: 'ee793fac1da4897922c413dc253b66b47bebaec2', class: {
|
|
76
76
|
'switch-indicator rounded-full': true,
|
|
77
77
|
'switch-indicator-on w-12 h-12 bg-brand-primary': this.active,
|
|
78
78
|
'switch-indicator-off w-[10px] h-4 bg-neutral-neutral-4': !this.active,
|
|
@@ -12,7 +12,7 @@ const SulaTableBody$1 = /*@__PURE__*/ proxyCustomElement(class SulaTableBody ext
|
|
|
12
12
|
replaceHostWithRenderedElement(this.host, 'tbody');
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: 'b9f5648337032d4e589e940439a0099f1d43cffa' }, h("tbody", { key: 'b7cdcb725274bd440f9561aada4c7aac517de710' }, h("slot", { key: '02978fec755b66e807c8b8c57d8da66ba348a45d' }))));
|
|
16
16
|
}
|
|
17
17
|
get host() { return this; }
|
|
18
18
|
static get style() { return sulaTableBodyCss; }
|
|
@@ -17,13 +17,13 @@ const SulaTableCell$1 = /*@__PURE__*/ proxyCustomElement(class SulaTableCell ext
|
|
|
17
17
|
replaceHostWithRenderedElement(this.host, 'td');
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '347aabb92b3ae336b47c092b4836a9683abdb945' }, h("td", { key: 'abe8e1a42e60ca0314f2bccedaf51953d6e3efe6', class: "align-middle text-left border-b border-dashed border-line-general" }, h("div", { key: '5fb52f18fea375e0db464b1a81194ae2a5f5d53f', class: {
|
|
21
21
|
'px-16 py-4 w-full flex flex-col justify-center items-start box-border text-label-medium-regular text-text-secondary': true,
|
|
22
22
|
'min-h-56': this.tableDensity === SulaTableDensity.Compact,
|
|
23
23
|
'min-h-60': this.tableDensity === SulaTableDensity.Default,
|
|
24
24
|
'min-h-64': this.tableDensity === SulaTableDensity.Spaced,
|
|
25
25
|
'min-h-72': this.tableDensity === SulaTableDensity.Confortable,
|
|
26
|
-
} }, h("slot", { key: '
|
|
26
|
+
} }, h("slot", { key: 'fce54db787004cec755f69f9eabd1931ed27f7cf' })))));
|
|
27
27
|
}
|
|
28
28
|
get host() { return this; }
|
|
29
29
|
static get style() { return sulaTableCellCss; }
|
|
@@ -17,13 +17,13 @@ const SulaTableHeadCell$1 = /*@__PURE__*/ proxyCustomElement(class SulaTableHead
|
|
|
17
17
|
replaceHostWithRenderedElement(this.host, 'th');
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '41e5f68802c240cd1e691e3df61066d585117122' }, h("th", { key: '42907dc4d92bb3f70ad1a2c88e2580a3c07b8bc5', scope: "col", class: "align-middle text-left border-b border-line-general" }, h("div", { key: '482ebc9be886ea48becf0f72035c26ec694ff8c8', class: {
|
|
21
21
|
'px-16 py-4 w-full flex justify-start items-center box-border text-label-small-bold text-text-secondary': true,
|
|
22
22
|
'min-h-40': this.tableDensity === SulaTableDensity.Compact,
|
|
23
23
|
'min-h-44': this.tableDensity === SulaTableDensity.Default,
|
|
24
24
|
'min-h-48': this.tableDensity === SulaTableDensity.Spaced,
|
|
25
25
|
'min-h-56': this.tableDensity === SulaTableDensity.Confortable,
|
|
26
|
-
} }, h("slot", { key: '
|
|
26
|
+
} }, h("slot", { key: '328c07d328409e3e6c571ada4e36ede8609d38f4' })))));
|
|
27
27
|
}
|
|
28
28
|
get host() { return this; }
|
|
29
29
|
static get style() { return sulaTableHeadCellCss; }
|
|
@@ -12,7 +12,7 @@ const SulaTableHeader$1 = /*@__PURE__*/ proxyCustomElement(class SulaTableHeader
|
|
|
12
12
|
replaceHostWithRenderedElement(this.host, 'thead');
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: '9b60e1345817d85150547d9f6a8c4aea18fecf35' }, h("thead", { key: 'e1280134d0f2efa76aaada715771a9d3cb59c2cb' }, h("slot", { key: '9014c8901806203c448b8a263b39da14541ee4c2' }))));
|
|
16
16
|
}
|
|
17
17
|
get host() { return this; }
|
|
18
18
|
static get style() { return sulaTableHeaderCss; }
|
|
@@ -12,7 +12,7 @@ const SulaTableRow$1 = /*@__PURE__*/ proxyCustomElement(class SulaTableRow exten
|
|
|
12
12
|
replaceHostWithRenderedElement(this.host, 'tr');
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: '2f3bfac0df53bdac8f2bcd85b09719da7cef4f1d' }, h("tr", { key: '5b4a56ae49d512bcbe0ff49c878fcbe2cfde6386' }, h("slot", { key: '7bc654792d9375c53f000e4fb9b370e16b3bed19' }))));
|
|
16
16
|
}
|
|
17
17
|
get host() { return this; }
|
|
18
18
|
static get style() { return sulaTableRowCss; }
|
|
@@ -21,15 +21,15 @@ const SulaTable$1 = /*@__PURE__*/ proxyCustomElement(class SulaTable extends H {
|
|
|
21
21
|
this.fullWidth = true;
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: 'c4c85f0a00f5848a5ceeee0fa975b98dd8aaca10', class: {
|
|
25
25
|
'block max-w-full overflow-x-auto': true,
|
|
26
|
-
} }, h("table", { key: '
|
|
26
|
+
} }, h("table", { key: '429f48bb7125d0623a0896e2ffd64b5096bf3dcc', class: {
|
|
27
27
|
'w-full': this.fullWidth && this.equalWidth,
|
|
28
28
|
'w-max': !this.equalWidth,
|
|
29
29
|
'min-w-full': this.fullWidth && !this.equalWidth,
|
|
30
30
|
'table-fixed': this.equalWidth,
|
|
31
31
|
'border-collapse border-spacing-0 box-border': true,
|
|
32
|
-
} }, h("slot", { key: '
|
|
32
|
+
} }, h("slot", { key: '8887f401133f605293b98b0408e3b605270fcaad' }))));
|
|
33
33
|
}
|
|
34
34
|
static get style() { return sulaTableCss; }
|
|
35
35
|
}, [4, "sula-table", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, d as Host } from './p-DYfmicjp.js';
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-
|
|
2
|
+
import { d as defineCustomElement$2 } from './p-DaG0HavP.js';
|
|
3
3
|
|
|
4
4
|
var SulaTagSize;
|
|
5
5
|
(function (SulaTagSize) {
|
|
@@ -106,14 +106,14 @@ const SulaTag$1 = /*@__PURE__*/ proxyCustomElement(class SulaTag extends H {
|
|
|
106
106
|
return iconStatusStyles[this.iconStatus];
|
|
107
107
|
}
|
|
108
108
|
render() {
|
|
109
|
-
return (h(Host, { key: '
|
|
109
|
+
return (h(Host, { key: 'a2b77019aff1c066579e1b7aef2a95fba5039b71' }, h("div", { key: '63ff50af0b9ad7fe808d7d57865fe6febd855d94', class: {
|
|
110
110
|
'flex items-center rounded-xxl w-fit': true,
|
|
111
111
|
[this.getSizeClass()]: true,
|
|
112
112
|
[this.getAppearanceClass()]: true,
|
|
113
|
-
} }, this.icon && (h("div", { key: '
|
|
113
|
+
} }, this.icon && (h("div", { key: 'a7f85beae1c42d19fe6b03ba4bba5b64b1b8e076', class: {
|
|
114
114
|
'flex justify-center items-center mr-8 rounded-full leading-4 px-2 py-1': true,
|
|
115
115
|
[this.getIconStatusClass()]: true,
|
|
116
|
-
} }, h("sula-icon", { key: '
|
|
116
|
+
} }, h("sula-icon", { key: '4f2059c35afb8e6b0a51d54acac9b85988883e0c', icon: this.icon, "custom-class": "text-base text-negative-negative-1 leading-4" }))), h("span", { key: '6ec9221c71bab0fb9aa60b4e0bc70d1c681030a6', class: {
|
|
117
117
|
'text-base leading-4': true,
|
|
118
118
|
[this.getTextColorClass()]: true,
|
|
119
119
|
[this.getTextWeightClass()]: true,
|
|
@@ -138,32 +138,32 @@ const SulaTextarea$1 = /*@__PURE__*/ proxyCustomElement(class SulaTextarea exten
|
|
|
138
138
|
}
|
|
139
139
|
render() {
|
|
140
140
|
const containerHeight = this.rows * 24 + 48;
|
|
141
|
-
return (h(Host, { key: '
|
|
141
|
+
return (h(Host, { key: '69414124a1d0d623de74dd294f5a7c12d03be510', ref: node => (this.node = node) }, h("div", { key: 'd7aed61f535cb6a78200f03d276acc2d698c4ca0' }, h("div", { key: '1eb5db4d428026b4e81349e6d414681b854175ee', id: "textarea-container", class: {
|
|
142
142
|
'relative border rounded-sm px-16 py-12 outline-none caret-brand-primary': true,
|
|
143
143
|
'textarea-focus': this.textareaIsFocused && !this.disabled && this.status === SulaTextareaStatus.Default,
|
|
144
144
|
'textarea-error': this.status === SulaTextareaStatus.Error && !this.disabled,
|
|
145
145
|
'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,
|
|
146
146
|
'bg-surface-body border-line-input cursor-text': !this.disabled,
|
|
147
|
-
}, style: { height: `${containerHeight}px` }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleTextareaClick }, h("label", { key: '
|
|
147
|
+
}, style: { height: `${containerHeight}px` }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleTextareaClick }, h("label", { key: '2bb9278a3114114c869940be38c0c3887f539a45', class: {
|
|
148
148
|
'text-base top-16 left-12 absolute transition-all duration-200 ease-in-out pointer-events-none z-10 w-[85%]': true,
|
|
149
149
|
'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),
|
|
150
150
|
'text-text-disabled': this.disabled,
|
|
151
151
|
'bg-surface-body': !this.disabled && this.isActive,
|
|
152
|
-
}, ref: node => (this.labelElement = node) }, this.label), h("label", { key: '
|
|
152
|
+
}, ref: node => (this.labelElement = node) }, this.label), h("label", { key: 'c3904b5cb4b240d963b295d8cb21525d3335aafb', class: {
|
|
153
153
|
'absolute font-bold transition-all duration-200 ease-in-out pointer-events-none z-10 active-label hidden from-down': true,
|
|
154
154
|
'text-sm top-12 left-16': this.isActive,
|
|
155
155
|
'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),
|
|
156
156
|
'text-text-disabled': this.disabled,
|
|
157
157
|
'bg-surface-body': !this.disabled && this.isActive,
|
|
158
|
-
}, ref: node => (this.activeLabelElement = node) }, this.label), h("textarea", { key: '
|
|
158
|
+
}, ref: node => (this.activeLabelElement = node) }, this.label), h("textarea", { key: '23b6a8c876b771decfb7c89df727cd6a23c34a20', ref: node => (this.textareaElement = node), placeholder: this.isActive ? this.placeholder : '', rows: this.rows, maxLength: this.maxLength, disabled: this.disabled, class: {
|
|
159
159
|
'w-full h-full outline-none text-base bg-transparent border-none resize-none': true,
|
|
160
160
|
'text-text-primary': !this.disabled,
|
|
161
161
|
'text-text-disabled cursor-not-allowed overflow-hidden': this.disabled,
|
|
162
|
-
}, 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: '
|
|
162
|
+
}, 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: '2fc851e5b752a0745be44c2caa50d7cd3bfeb1bb', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: 'd3a91b547841b7de10dded53bcace7789a9f5ba5', id: "textarea-help-text", class: {
|
|
163
163
|
'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,
|
|
164
164
|
'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,
|
|
165
165
|
'text-text-disabled': this.disabled,
|
|
166
|
-
} }, this.helpText)), this.maxLength && (h("div", { key: '
|
|
166
|
+
} }, this.helpText)), this.maxLength && (h("div", { key: '3c6df29600df35826cfd75aad2cef9b55ef1ac17', id: "max-length-container", class: {
|
|
167
167
|
'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,
|
|
168
168
|
'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,
|
|
169
169
|
'text-text-disabled': this.disabled,
|