@sula-tech/webcomponents 0.8.0 → 0.9.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-Bbryl0vg.js → index-LR6yFDX7.js} +16 -2
- package/dist/cjs/index-LR6yFDX7.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{sula-avatar_18.cjs.entry.js → sula-avatar_19.cjs.entry.js} +368 -45
- package/dist/cjs/sula-avatar_19.cjs.entry.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/sula-button/sula-button.css +1 -1
- package/dist/collection/components/sula-chip/sula-chip.css +1 -1
- package/dist/collection/components/sula-dropdown/sula-dropdown.css +1 -1
- package/dist/collection/components/sula-dropdown/sula-dropdown.js +74 -9
- package/dist/collection/components/sula-dropdown/sula-dropdown.js.map +1 -1
- package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js +53 -0
- package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js.map +1 -1
- 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-loader/sula-loader.css +1 -1
- package/dist/collection/components/sula-loader/sula-loader.js +1 -1
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.css +1 -1
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js +33 -2
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js.map +1 -1
- package/dist/collection/components/sula-modal/model/sula-modal.model.js +16 -0
- package/dist/collection/components/sula-modal/model/sula-modal.model.js.map +1 -0
- package/dist/collection/components/sula-modal/sula-modal.css +1 -0
- package/dist/collection/components/sula-modal/sula-modal.js +558 -0
- package/dist/collection/components/sula-modal/sula-modal.js.map +1 -0
- package/dist/collection/components/sula-modal/sula-modal.stories.js +193 -0
- package/dist/collection/components/sula-modal/sula-modal.stories.js.map +1 -0
- 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-switch/sula-switch.js +4 -4
- 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/components/index.js +19 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-BhxK9El6.js +231 -0
- package/dist/components/p-BhxK9El6.js.map +1 -0
- package/dist/components/{p-DrUsgtsv.js → p-CyIObO0v.js} +4 -4
- package/dist/components/{p-DrUsgtsv.js.map → p-CyIObO0v.js.map} +1 -1
- package/dist/components/{p-BNtk_d_S.js → p-DvWN7hVP.js} +14 -6
- package/dist/components/p-DvWN7hVP.js.map +1 -0
- package/dist/components/{p-BrY8WoEl.js → p-ff6chV3i.js} +4 -4
- package/dist/components/{p-BrY8WoEl.js.map → p-ff6chV3i.js.map} +1 -1
- package/dist/components/sula-avatar.js +1 -1
- package/dist/components/sula-badge.js +1 -1
- package/dist/components/sula-button.js +1 -226
- package/dist/components/sula-button.js.map +1 -1
- package/dist/components/sula-checkbox.js +1 -1
- package/dist/components/sula-chip.js +3 -3
- package/dist/components/sula-chip.js.map +1 -1
- package/dist/components/sula-dropdown.js +60 -14
- package/dist/components/sula-dropdown.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-modal.d.ts +11 -0
- package/dist/components/sula-modal.js +332 -0
- package/dist/components/sula-modal.js.map +1 -0
- 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-switch.js +4 -4
- 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/esm/{index-or7qTZgT.js → index-CrFclBiX.js} +16 -2
- package/dist/esm/index-CrFclBiX.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{sula-avatar_18.entry.js → sula-avatar_19.entry.js} +368 -46
- package/dist/esm/sula-avatar_19.entry.js.map +1 -0
- package/dist/esm/webcomponents.js +3 -3
- package/dist/types/components/sula-dropdown/sula-dropdown.d.ts +11 -0
- package/dist/types/components/sula-dropdown/sula-dropdown.stories.d.ts +10 -0
- package/dist/types/components/sula-menu-select-list/sula-menu-select-list.d.ts +4 -0
- package/dist/types/components/sula-modal/model/sula-modal.model.d.ts +13 -0
- package/dist/types/components/sula-modal/sula-modal.d.ts +94 -0
- package/dist/types/components/sula-modal/sula-modal.stories.d.ts +83 -0
- package/dist/types/components.d.ts +170 -0
- package/dist/webcomponents/{p-or7qTZgT.js → p-CrFclBiX.js} +28 -16
- package/dist/webcomponents/p-CrFclBiX.js.map +1 -0
- package/dist/webcomponents/{p-bc1f174c.entry.js → p-e4fa59d5.entry.js} +658 -285
- package/dist/webcomponents/p-e4fa59d5.entry.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +41 -20
- package/package.json +2 -3
- package/dist/cjs/index-Bbryl0vg.js.map +0 -1
- package/dist/cjs/sula-avatar_18.cjs.entry.js.map +0 -1
- package/dist/components/p-BNtk_d_S.js.map +0 -1
- package/dist/esm/index-or7qTZgT.js.map +0 -1
- package/dist/esm/sula-avatar_18.entry.js.map +0 -1
- package/dist/webcomponents/p-bc1f174c.entry.js.map +0 -1
- package/dist/webcomponents/p-or7qTZgT.js.map +0 -1
|
@@ -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: '2fcc7b99d23820764799bcf3eed0a7605c9d2f72', ref: node => (this.node = node) }, h("div", { key: '5b6fecfaef896755b1862cf8468fb31297169885' }, h("div", { key: 'ed641bb610135c66bd663bfa284f0d81e7e1738d', 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: '69ad1cd86d7395ecdeb7a6aeac02273370a10fef', 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: '0352260db567f497becd5f8f347cf206aecb595b', 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: 'edeacd0e14078081c1d5986e60852b8ed5b6a6a6', 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: 'f1036cde3cf5bbd60fba5938fc2054d12d110624', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: 'db55a3ae78e63964a9d26a8cd44a71874a500004', 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: '4e73a6934d1b959c86fa2c9f4cfb5dadaf20e943', 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,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
2
|
import { g as getDefaultExportFromCjs } from './p-B85MJLTf.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './p-
|
|
3
|
+
import { d as defineCustomElement$2 } from './p-ff6chV3i.js';
|
|
4
4
|
|
|
5
5
|
var SulaTextfieldType;
|
|
6
6
|
(function (SulaTextfieldType) {
|
|
@@ -384,14 +384,14 @@ const SulaTextfield$1 = /*@__PURE__*/ proxyCustomElement(class SulaTextfield ext
|
|
|
384
384
|
return this.icon;
|
|
385
385
|
}
|
|
386
386
|
render() {
|
|
387
|
-
return (h(Host, { key: '
|
|
387
|
+
return (h(Host, { key: '7f3d6752bea3a556fa77a52513eabe0655d9234d', ref: node => (this.node = node) }, h("div", { key: 'cd9cbc06a0244161c06e770d87834ddd7311ada3' }, h("div", { key: 'b66f4f6f2a5cfdcbc212264d500d219b4deb335e', id: "button-container", class: {
|
|
388
388
|
'flex items-center border rounded-sm px-16 outline-none h-[72px] caret-brand-primary': true,
|
|
389
389
|
'flex-row justify-between': !!this.icon || this.type === SulaTextfieldType.Password,
|
|
390
390
|
'button-focus': this.inputIsFocused && !this.disabled && this.status === SulaTextfieldStatus.Default,
|
|
391
391
|
'button-error': this.status === SulaTextfieldStatus.Error && !this.disabled,
|
|
392
392
|
'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,
|
|
393
393
|
'bg-surface-body border-line-input cursor-pointer': !this.disabled,
|
|
394
|
-
}, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleInputClick }, !this.disabled && (h("div", { key: '
|
|
394
|
+
}, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleInputClick }, !this.disabled && (h("div", { key: '79eabd37134b96bbb5a315ca73d81d0c8be01ce4', class: { 'hidden flex-col w-full': true, 'pr-12': !!this.icon }, ref: node => (this.inputContainer = node) }, h("label", { key: 'd24af603a0e365d1482daea31b75fa8e86fd5e8a', class: "font-bold text-sm text-text-primary from-down" }, this.label), h("input", { key: 'aea523483b4a39f31b0d2c9506001d69c397da70', 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.textValue }))), h("div", { key: '2e3d9fbe37ba1dc5aceea8e8ce7e6152f740a955', 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: 'd6f5aacd486e093d64307117d8c6b0bfea460f49', class: "flex items-center justify-center", onClick: this.handleIconClick }, h("sula-icon", { key: 'cfc400df76f2c487a09b641c101543a3e2895bd1', icon: this.getInputIcon(), customClass: `text-2xl ${this.disabled ? 'text-icon-disabled' : 'text-icon-primary'}` })))), (this.helpText || this.maxLength) && !this.disabled && (h("div", { key: '8d450abc836ba702aeda16f4f6c1d379373ee698', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: 'e0d25ac6878865510a0afc793d81b07d8a016bb5', 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: '6384a6d5468b03bef0ddf2e0345438efe1b5fd32', 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)))))));
|
|
395
395
|
}
|
|
396
396
|
static get watchers() { return {
|
|
397
397
|
"value": ["watchValueHandler"]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-
|
|
2
|
+
import { d as defineCustomElement$2 } from './p-ff6chV3i.js';
|
|
3
3
|
|
|
4
4
|
var SulaTilesType;
|
|
5
5
|
(function (SulaTilesType) {
|
|
@@ -139,7 +139,7 @@ const SulaTiles$1 = /*@__PURE__*/ proxyCustomElement(class SulaTiles extends H {
|
|
|
139
139
|
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))));
|
|
140
140
|
}
|
|
141
141
|
render() {
|
|
142
|
-
return (h(Host, { key: '
|
|
142
|
+
return (h(Host, { key: '32ee3b19743f75052428014a010545e4a6c9098b' }, h("div", { key: '09384829c191d1ec6518e0ccbc3ac4c290e1e798', class: this.getContainerClasses(), tabIndex: this.getTabIndex(this.isSquare), onClick: this.handleClick }, this.renderIcon(), this.renderText())));
|
|
143
143
|
}
|
|
144
144
|
static get style() { return sulaTilesCss; }
|
|
145
145
|
}, [1, "sula-tiles", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-
|
|
2
|
+
import { d as defineCustomElement$2 } from './p-ff6chV3i.js';
|
|
3
3
|
|
|
4
4
|
var SulaTimelineListItemIconStatus;
|
|
5
5
|
(function (SulaTimelineListItemIconStatus) {
|
|
@@ -51,7 +51,7 @@ const SulaTimelineList$1 = /*@__PURE__*/ proxyCustomElement(class SulaTimelineLi
|
|
|
51
51
|
return iconByStatus[status];
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: '61a3d229e04aa2935ef1d03fca3aa519aa21d13b' }, h("div", { key: 'cd8c1483e94ea8f8cf2e0c51e400528f83fcf9f5', class: "flex flex-col bg-surface-on-body px-24 py-32 w-fit rounded-md" }, this.sulaTimelineList.map((item, index) => {
|
|
55
55
|
const isLastItem = index === this.sulaTimelineList.length - 1;
|
|
56
56
|
return (h("div", { class: {
|
|
57
57
|
'relative timeline-item': true,
|
|
@@ -784,10 +784,17 @@ var insertBefore = (parent, newNode, reference) => {
|
|
|
784
784
|
};
|
|
785
785
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
786
786
|
const hostElm = hostRef.$hostElement$;
|
|
787
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
787
788
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
788
789
|
const isHostElement = isHost(renderFnResults);
|
|
789
790
|
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
790
791
|
hostTagName = hostElm.tagName;
|
|
792
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
793
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
794
|
+
cmpMeta.$attrsToReflect$.map(
|
|
795
|
+
([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
|
|
796
|
+
);
|
|
797
|
+
}
|
|
791
798
|
if (isInitialLoad && rootVnode.$attrs$) {
|
|
792
799
|
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
793
800
|
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
@@ -1143,8 +1150,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1143
1150
|
/* @__PURE__ */ new Set([
|
|
1144
1151
|
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
1145
1152
|
...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
|
|
1153
|
+
var _a2;
|
|
1146
1154
|
const attrName = m[1] || propName;
|
|
1147
1155
|
attrNameToPropName.set(attrName, propName);
|
|
1156
|
+
if (m[0] & 512 /* ReflectAttr */) {
|
|
1157
|
+
(_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
|
|
1158
|
+
}
|
|
1148
1159
|
return attrName;
|
|
1149
1160
|
})
|
|
1150
1161
|
])
|
|
@@ -1334,6 +1345,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1334
1345
|
{
|
|
1335
1346
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1336
1347
|
}
|
|
1348
|
+
{
|
|
1349
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1350
|
+
}
|
|
1337
1351
|
{
|
|
1338
1352
|
cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
|
|
1339
1353
|
}
|
|
@@ -1469,6 +1483,6 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
1469
1483
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1470
1484
|
|
|
1471
1485
|
export { Host as H, getElement as a, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1472
|
-
//# sourceMappingURL=index-
|
|
1486
|
+
//# sourceMappingURL=index-CrFclBiX.js.map
|
|
1473
1487
|
|
|
1474
|
-
//# sourceMappingURL=index-
|
|
1488
|
+
//# sourceMappingURL=index-CrFclBiX.js.map
|