@sula-tech/webcomponents 0.11.1 → 0.11.2
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-LR6yFDX7.js → index-C19aFtyq.js} +5 -2
- package/dist/cjs/index-C19aFtyq.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sula-avatar_21.cjs.entry.js +60 -19
- package/dist/cjs/sula-avatar_21.cjs.entry.js.map +1 -1
- package/dist/cjs/webcomponents.cjs.js +2 -2
- 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 +62 -7
- package/dist/collection/components/sula-dropdown/sula-dropdown.js.map +1 -1
- package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js +94 -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-menu-select-list/sula-menu-select-list.css +1 -1
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js +28 -2
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js.map +1 -1
- package/dist/collection/components/sula-switch/sula-switch.css +1 -1
- package/dist/collection/components/sula-switch/sula-switch.js +35 -5
- package/dist/collection/components/sula-switch/sula-switch.js.map +1 -1
- package/dist/collection/components/sula-switch/sula-switch.stories.js +22 -0
- package/dist/collection/components/sula-switch/sula-switch.stories.js.map +1 -1
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-CD0__3qt.js → p-BlyFOqde.js} +3 -3
- package/dist/components/{p-CD0__3qt.js.map → p-BlyFOqde.js.map} +1 -1
- package/dist/components/{p-joZ5GnwE.js → p-DksR9NcR.js} +12 -5
- package/dist/components/p-DksR9NcR.js.map +1 -0
- package/dist/components/{p-DO7voMbe.js → p-tr2oA4pB.js} +3 -3
- package/dist/components/{p-DO7voMbe.js.map → p-tr2oA4pB.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 +3 -3
- package/dist/components/sula-chip.js.map +1 -1
- package/dist/components/sula-dropdown.js +41 -11
- package/dist/components/sula-dropdown.js.map +1 -1
- package/dist/components/sula-icon.js +1 -1
- package/dist/components/sula-menu-select-list.js +1 -1
- package/dist/components/sula-modal.js +2 -2
- package/dist/components/sula-progress-bar.js +1 -1
- package/dist/components/sula-search-bar.js +1 -1
- package/dist/components/sula-segmented-control.js +1 -1
- package/dist/components/sula-switch.js +14 -6
- package/dist/components/sula-switch.js.map +1 -1
- package/dist/components/sula-tag.js +1 -1
- package/dist/components/sula-textfield.js +1 -1
- package/dist/components/sula-tiles.js +1 -1
- package/dist/components/sula-timeline-list.js +1 -1
- package/dist/esm/{index-CrFclBiX.js → index-CwIBTB8E.js} +5 -2
- package/dist/esm/index-CwIBTB8E.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/sula-avatar_21.entry.js +60 -19
- package/dist/esm/sula-avatar_21.entry.js.map +1 -1
- package/dist/esm/webcomponents.js +3 -3
- package/dist/types/components/sula-dropdown/sula-dropdown.d.ts +7 -0
- package/dist/types/components/sula-dropdown/sula-dropdown.stories.d.ts +9 -0
- package/dist/types/components/sula-menu-select-list/sula-menu-select-list.d.ts +4 -0
- package/dist/types/components/sula-switch/sula-switch.d.ts +5 -0
- package/dist/types/components/sula-switch/sula-switch.stories.d.ts +10 -0
- package/dist/types/components.d.ts +30 -0
- package/dist/webcomponents/{p-867d5bf9.entry.js → p-1b6e77dc.entry.js} +68 -29
- package/dist/webcomponents/p-1b6e77dc.entry.js.map +1 -0
- package/dist/webcomponents/{p-CrFclBiX.js → p-CwIBTB8E.js} +5 -2
- package/dist/webcomponents/p-CwIBTB8E.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +9 -5
- package/package.json +1 -1
- package/dist/cjs/index-LR6yFDX7.js.map +0 -1
- package/dist/components/p-joZ5GnwE.js.map +0 -1
- package/dist/esm/index-CrFclBiX.js.map +0 -1
- package/dist/webcomponents/p-867d5bf9.entry.js.map +0 -1
- package/dist/webcomponents/p-CrFclBiX.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"sula-switch.js","mappings":";;AAAA,IAAY,cAGX;AAHD,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,cAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,GAGzB,EAAA,CAAA,CAAA;;ACHD,MAAM,aAAa,GAAG,
|
|
1
|
+
{"file":"sula-switch.js","mappings":";;AAAA,IAAY,cAGX;AAHD,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,cAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,GAGzB,EAAA,CAAA,CAAA;;ACHD,MAAM,aAAa,GAAG,m/ZAAm/Z;;MCQ5/ZA,YAAU,iBAAAC,kBAAA,CAAA,MAAA,UAAA,SAAAC,CAAA,CAAA;AALvB,IAAA,WAAA,GAAA;;;;;;;AAME;;AAEG;AACsB,QAAA,IAAA,CAAA,IAAI,GAAmB,cAAc,CAAC,OAAO;AAEtE;;AAEG;AACsB,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAEhD;;AAEG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAYlD;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AAqBnC,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAExB,QAAA,IAAW,CA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A8E,EAAE,IAAI;AACpF,gBAAA,wBAAwB,EAAE,CAAC,IAAI,CAAC,QAAQ;gBACxC,iCAAiC,EAAE,IAAI,CAAC,QAAQ;aACjD,EAAA,EAED,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,+BAA+B,EAAE,IAAI;gBACrC,gDAAgD,EAAE,IAAI,CAAC,MAAM;AAC7D,gBAAA,wDAAwD,EAAE,CAAC,IAAI,CAAC,MAAM;gBACtE,iCAAiC,EAAE,IAAI,CAAC,QAAQ;AACjD,aAAA,EAAA,CACI,CACH,CACF,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SulaSwitch","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-switch/model/sula-switch.model.ts","src/components/sula-switch/sula-switch.scss?tag=sula-switch&encapsulation=shadow","src/components/sula-switch/sula-switch.tsx"],"sourcesContent":["export enum SulaSwitchType {\n Default = 'default',\n List = 'list',\n}\n",":host {\n display: block;\n}\n\n.switch-focus {\n outline: 2px solid var(--color-feedback-informational) !important;\n outline-offset: 2px !important;\n}\n\n.container-focus {\n outline: 2px solid var(--color-feedback-informational) !important;\n outline-offset: 2px !important;\n}\n\n.switch-container {\n position: relative;\n transition: background-color 0.3s ease-in-out;\n cursor: pointer;\n overflow: hidden;\n}\n\n.switch-thumb {\n position: relative;\n transition: transform 0.3s ease-in-out;\n}\n\n.switch-on .switch-thumb {\n animation: slideFromLeft 0.3s ease-in-out forwards;\n}\n\n.switch-off .switch-thumb {\n animation: slideFromRight 0.3s ease-in-out forwards;\n}\n\n.switch-indicator {\n transition: width 0.3s ease-in-out, height 0.3s ease-in-out, background-color 0.3s ease-in-out;\n}\n\n.switch-indicator-on {\n animation: growIndicator 0.3s ease-in-out forwards;\n}\n\n.switch-indicator-off {\n animation: shrinkIndicator 0.3s ease-in-out forwards;\n}\n\n@keyframes slideFromLeft {\n 0% {\n transform: translateX(-100%);\n opacity: 0;\n }\n 50% {\n opacity: 0.7;\n }\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n}\n\n@keyframes slideFromRight {\n 0% {\n transform: translateX(100%);\n opacity: 0;\n }\n 50% {\n opacity: 0.7;\n }\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n}\n\n@keyframes growIndicator {\n 0% {\n width: 10px;\n height: 4px;\n opacity: 0.5;\n }\n 100% {\n width: 12px;\n height: 12px;\n opacity: 1;\n }\n}\n\n@keyframes shrinkIndicator {\n 0% {\n width: 12px;\n height: 12px;\n opacity: 0.5;\n }\n 100% {\n width: 10px;\n height: 4px;\n opacity: 1;\n }\n}\n","import { Component, Event, EventEmitter, Host, Prop, State, h } from '@stencil/core';\nimport { SulaSwitchType } from './model/sula-switch.model';\n\n@Component({\n tag: 'sula-switch',\n styleUrl: 'sula-switch.scss',\n shadow: true,\n})\nexport class SulaSwitch {\n /**\n * Switch type\n */\n @Prop({ mutable: true }) type: SulaSwitchType = SulaSwitchType.Default;\n\n /**\n * Is switch active\n */\n @Prop({ mutable: true }) active: boolean = false;\n\n /**\n * Is switch disabled\n */\n @Prop({ mutable: true }) disabled: boolean = false;\n\n /**\n * Switch label\n */\n @Prop({ mutable: true }) label?: string;\n\n /**\n * Switch sub title (avaible when is `list` type)\n */\n @Prop({ mutable: true }) subTitle?: string;\n\n /**\n * Enable responsive layout (full width)\n * @default false\n */\n @Prop() responsive: boolean = false;\n\n /**\n * Event emitted when switch value changes.\n */\n @Event()\n valueChanged: EventEmitter<boolean>;\n\n /**\n * Event emitted when switch is focused.\n */\n @Event()\n focusedOn: EventEmitter<void>;\n\n /**\n * Event emitted when switch is focused out.\n */\n @Event()\n focusedOut: EventEmitter<void>;\n\n @State()\n isFocus: boolean = false;\n\n handleClick = () => {\n if (!this.disabled) {\n this.active = !this.active;\n this.valueChanged.emit(this.active);\n }\n };\n\n handleFocus = () => {\n if (!this.disabled) {\n this.isFocus = true;\n this.focusedOn.emit();\n }\n };\n\n handleBlur = () => {\n if (!this.disabled) {\n this.focusedOut.emit();\n this.isFocus = false;\n }\n };\n\n render() {\n return (\n <Host>\n <div\n class={{\n 'outline-none': true,\n 'flex items-center space-x-12': !!this.label && this.type === SulaSwitchType.Default,\n 'flex items-center justify-between bg-surface-on-body rounded-md min-h-[85px] px-24 py-16': this.type === SulaSwitchType.List,\n 'w-full': this.type === SulaSwitchType.List && this.responsive,\n 'w-[280px]': this.type === SulaSwitchType.List && !this.responsive,\n 'hover:bg-states-empty-bg-hover active:bg-states-empty-bg-pressed cursor-pointer': this.type === SulaSwitchType.List && !this.disabled,\n 'container-focus': this.isFocus && this.type === SulaSwitchType.List,\n }}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onClick={this.handleClick}\n tabIndex={0}\n >\n {this.type === SulaSwitchType.List && (\n <div class=\"flex flex-col flex-1 mr-16 overflow-hidden\">\n {!!this.label && <label class=\"text-text-primary font-bold text-base cursor-pointer break-words\">{this.label}</label>}\n {!!this.subTitle && <span class=\"text-text-secondary text-base break-words\">{this.subTitle}</span>}\n </div>\n )}\n <div\n class={{\n 'switch-container w-56 h-32 flex items-center rounded-xxl p-2 outline-none': true,\n 'switch-on bg-brand-primary justify-end': this.active,\n 'switch-off bg-neutral-neutral-3 justify-start': !this.active,\n 'cursor-not-allowed bg-states-bg-disabled': this.disabled,\n 'switch-focus': this.isFocus && this.type === SulaSwitchType.Default,\n }}\n tabIndex={0}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n >\n <div\n class={{\n 'switch-thumb w-[28px] h-[28px] rounded-full flex justify-center items-center': true,\n 'bg-negative-negative-1': !this.disabled,\n 'bg-states-bg-disabled shadow-md': this.disabled,\n }}\n >\n <div\n class={{\n 'switch-indicator rounded-full': true,\n 'switch-indicator-on w-12 h-12 bg-brand-primary': this.active,\n 'switch-indicator-off w-[10px] h-4 bg-neutral-neutral-4': !this.active,\n 'shadow-sm bg-states-bg-disabled': this.disabled,\n }}\n ></div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -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-tr2oA4pB.js';
|
|
4
4
|
|
|
5
5
|
var SulaTextfieldType;
|
|
6
6
|
(function (SulaTextfieldType) {
|
|
@@ -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-tr2oA4pB.js';
|
|
3
3
|
|
|
4
4
|
var SulaTimelineListItemIconStatus;
|
|
5
5
|
(function (SulaTimelineListItemIconStatus) {
|
|
@@ -1472,6 +1472,9 @@ var getHostListenerTarget = (doc, elm, flags) => {
|
|
|
1472
1472
|
if (flags & 4 /* TargetDocument */) {
|
|
1473
1473
|
return doc;
|
|
1474
1474
|
}
|
|
1475
|
+
if (flags & 8 /* TargetWindow */) {
|
|
1476
|
+
return win;
|
|
1477
|
+
}
|
|
1475
1478
|
return elm;
|
|
1476
1479
|
};
|
|
1477
1480
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -1483,6 +1486,6 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
1483
1486
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1484
1487
|
|
|
1485
1488
|
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 };
|
|
1486
|
-
//# sourceMappingURL=index-
|
|
1489
|
+
//# sourceMappingURL=index-CwIBTB8E.js.map
|
|
1487
1490
|
|
|
1488
|
-
//# sourceMappingURL=index-
|
|
1491
|
+
//# sourceMappingURL=index-CwIBTB8E.js.map
|