Skip to content

Commit

Permalink
[DPEDE-2106] Include new custom elements version (#1461)
Browse files Browse the repository at this point in the history
Co-authored-by: allyourbotsarebelongtous <[email protected]>
  • Loading branch information
allyourbotsarebelongtous and allyourbotsarebelongtous authored Dec 18, 2024
1 parent 5ce8fc2 commit 268bf00
Show file tree
Hide file tree
Showing 28 changed files with 41,792 additions and 24 deletions.
20,743 changes: 20,743 additions & 0 deletions lib/chi-custom-elements/cjs/chi-accordion_37.cjs.entry.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/chi-custom-elements/cjs/index-1c2d46a0.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
}
switch(bundleId) {

case 'chi-accordion_36.cjs':
case 'chi-accordion_37.cjs':
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
/* webpackMode: "lazy" */
'./chi-accordion_36.cjs.entry.js')); }).then(processMod, consoleError);
'./chi-accordion_37.cjs.entry.js')); }).then(processMod, consoleError);
case 'chi-main.cjs':
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
/* webpackMode: "lazy" */
Expand Down
2 changes: 1 addition & 1 deletion lib/chi-custom-elements/cjs/loader.cjs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/chi-custom-elements/cjs/ux-chi-ce.cjs.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"components/skeleton/skeleton.js",
"components/spinner/spinner.js",
"components/tabs/tabs.js",
"components/tags/tags.js",
"components/text-input/text-input.js",
"components/textarea/textarea.js",
"components/time/time.js",
Expand Down
143 changes: 143 additions & 0 deletions lib/chi-custom-elements/collection/components/tags/tags.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
import { h } from "@stencil/core";
import { TAGS_CLASSES, UTILITY_CLASSES } from "../../constants/classes";
import { joinArrayValues } from "../../utils/utils";
export class Tags {
constructor() {
this.placeholder = '';
this.tags = [];
this._status = undefined;
this._tags = [];
}
// #region LifeCycle
componentDidLoad() {
if (this.tags) {
this._tags = this.tags.map((tag) => (Object.assign({}, tag)));
}
}
// #endregion
// #region Handlers
_focusInput() {
setTimeout(() => this.el.querySelector(`input.${TAGS_CLASSES.INPUT}`).focus(), 100);
}
_onKeyDown(ev) {
const inputElement = ev.target;
const inputValue = inputElement.value.trim();
if (inputValue && ['Tab', 'Enter'].includes(ev.key)) {
ev.preventDefault();
this._tags = [...this._tags, { name: inputValue }];
inputElement.value = '';
this._focusInput();
this.chiChange.emit(this._tags);
}
}
_onDeleteTag(deleteTag) {
this._tags = this._tags.filter((tag) => tag !== deleteTag);
this.chiChange.emit(this._tags);
}
// #endregion
// #region Render
_getTagElement(tag) {
return (h("li", null, h("chi-badge", { class: TAGS_CLASSES.TAG }, tag.name, h("chi-button", { type: "close", size: "xs", onClick: () => this._onDeleteTag(tag) }))));
}
_getInput() {
return (h("li", { class: UTILITY_CLASSES.FLEX.FLEX_GROW1 }, h("input", { type: "text", class: TAGS_CLASSES.INPUT, placeholder: this.placeholder || '', onKeyDown: (ev) => this._onKeyDown(ev), tabindex: "0", "aria-label": this.placeholder || 'Add tag' })));
}
render() {
const tagElements = this._tags.map((tag) => this._getTagElement(tag));
const input = this._getInput();
const classes = joinArrayValues([TAGS_CLASSES.TAGS, this._status && `-${this._status}`]);
return (h("ul", { key: '0e51152f8a250d3022a19e4df991c0f4243ca753', class: classes }, tagElements, input));
}
static get is() { return "chi-tags"; }
static get properties() {
return {
"placeholder": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "To define placeholder of Text input"
},
"attribute": "placeholder",
"reflect": false,
"defaultValue": "''"
},
"tags": {
"type": "unknown",
"mutable": false,
"complexType": {
"original": "Tag[]",
"resolved": "Tag[]",
"references": {
"Tag": {
"location": "import",
"path": "../../constants/types",
"id": "src/constants/types.ts::Tag"
}
}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "To add tags"
},
"defaultValue": "[]"
},
"_status": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "To define -hover, -focus statuses"
},
"attribute": "_status",
"reflect": false
}
};
}
static get states() {
return {
"_tags": {}
};
}
static get events() {
return [{
"method": "chiChange",
"name": "chiChange",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": "Triggered when the user selects or deselects an option"
},
"complexType": {
"original": "Tag[]",
"resolved": "Tag[]",
"references": {
"Tag": {
"location": "import",
"path": "../../constants/types",
"id": "src/constants/types.ts::Tag"
}
}
}
}];
}
static get elementRef() { return "el"; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ export class TimePicker {
timePickerInput.value = `${formatTimePeriod(hour)}:${formatTimePeriod(ev.detail.minute)}${seconds} ${timePeriod}`;
}
render() {
const chiPopover = (h("chi-popover", { key: '7e2328f16c2770e0592efa116b6a8bfb1c005932', id: `popover-${this._uuid}`, position: "bottom", reference: `#${this._uuid}-control`, "prevent-auto-hide": true, active: this.active }, h("chi-time", { key: '2056afe557a5ddb0a708c740e18e26d00d3d8bae', "display-seconds": this.displaySeconds, "excluded-hours": this._excludedHours, "excluded-minutes": this._excludedMinutes, "excluded-seconds": this._excludedSeconds, format: this.format, value: this.value, "seconds-step": this.secondsStep, "minutes-step": this.minutesStep })));
return (h("div", { key: '96886d4803ef78b1c34ecb5bec3e53e0916d0b1d', class: this.disabled ? '-disabled' : '' }, h("div", { key: '60b38721ac19a7a6b780dab5545cf29de010295d', class: "chi-input__wrapper -icon--right" }, h("input", { key: 'f9328ef68c3aa0ee743ba785496cf9f0d89e9bb6', id: `${this._uuid}-control`, class: `chi-input
${this.active ? '-focus' : ''}`, type: `text`, placeholder: this.format === '12hr' ? '--:-- --' : '--:--', ref: (el) => (this._input = el), value: this.value, disabled: this.disabled }), h("chi-icon", { key: '861fc5c9340f9080c38ff60c4bf40cd668952677', icon: "circle-clock-outline" })), !this.disabled && chiPopover));
const chiPopover = (h("chi-popover", { key: 'ad90040b792a10363397275e41109fcac9c2d0aa', id: `popover-${this._uuid}`, position: "bottom", reference: `#${this._uuid}-control`, "prevent-auto-hide": true, active: this.active }, h("chi-time", { key: '4965a89dd5ba485b0e68fcccf2c2bbdc27921ef0', "display-seconds": this.displaySeconds, "excluded-hours": this._excludedHours, "excluded-minutes": this._excludedMinutes, "excluded-seconds": this._excludedSeconds, format: this.format, value: this.value, "seconds-step": this.secondsStep, "minutes-step": this.minutesStep })));
return (h("div", { key: '8166958a9bfe596bf5f1171fa020560b516555a2', class: this.disabled ? '-disabled' : '' }, h("div", { key: '835693d05ef2dcf2e41c47be0227e233883f78fa', class: "chi-input__wrapper -icon--right" }, h("input", { key: 'c7d0c2944c00f40c8c904c5a6abf1a2d00904456', id: `${this._uuid}-control`, class: `chi-input
${this.active ? '-focus' : ''}`, type: `text`, placeholder: this.format === '12hr' ? '--:-- --' : '--:--', ref: (el) => (this._input = el), value: this.value, disabled: this.disabled }), h("chi-icon", { key: '7beeb040c00122c61da8ba34339dc09d501bbe1d', icon: "circle-clock-outline" })), !this.disabled && chiPopover));
}
static get is() { return "chi-time-picker"; }
static get encapsulation() { return "scoped"; }
Expand Down
2 changes: 1 addition & 1 deletion lib/chi-custom-elements/collection/components/time/time.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ export class Time {
}
render() {
const hours = this.hours(), minutes = this.minutes(), seconds = this.seconds(), periods = this.periods();
return (h("div", { key: 'd71105c46f5d260587043628c05ff59065a80869', class: TIME_CLASSES.TIME }, h("div", { key: '975cd31b3be68966f5e480806337c84e04ee5045', class: TIME_CLASSES.CONTENT }, hours, minutes, seconds, periods)));
return (h("div", { key: 'b4dfd6ba62a94367a8a4fb0ea589d24b71eb5c02', class: TIME_CLASSES.TIME }, h("div", { key: 'd2554010bd43f67b139819d659357ac396219287', class: TIME_CLASSES.CONTENT }, hours, minutes, seconds, periods)));
}
static get is() { return "chi-time"; }
static get encapsulation() { return "scoped"; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export class ToggleSwitch {
this.sizeValidation(this.size);
}
render() {
return (h("label", { key: 'a7803652ad82fb1c09814c9f759cc55fdc4e00ed', htmlFor: `${this.el.id}-control`, class: `chi-switch
return (h("label", { key: 'cb8975a9196ffae509cac676655092f7feda30e7', htmlFor: `${this.el.id}-control`, class: `chi-switch
${this.size ? `-${this.size}` : ''}
${this.hideLabel ? '-label--hide' : ''}` }, h("input", { key: '3a57d91f819d622c15c3fe88d3fbdae1c0111d8a', type: "checkbox", class: `chi-switch__input ${this.extraClass ? this.extraClass : ''}`, id: `${this.el.id}-control`, disabled: this.disabled, checked: this.checked, onClick: () => this._toggle() }), h("span", { key: '55b4dc4fba0b301fc7a58a7cf633d1f406740fd5', class: "chi-switch__content" }, h("span", { key: '6b7591a0a7f7904b19befe876a4a69e81f046b6d', class: "chi-switch__thumb" })), h("span", { key: 'a74734c778ab99928752f5ef94ee82d692b9bb6b', class: "chi-switch__label" }, this.label)));
${this.hideLabel ? '-label--hide' : ''}` }, h("input", { key: 'c1e8116bc10ddc5b9b3a5916840488f7c7f920ea', type: "checkbox", class: `chi-switch__input ${this.extraClass ? this.extraClass : ''}`, id: `${this.el.id}-control`, disabled: this.disabled, checked: this.checked, onClick: () => this._toggle() }), h("span", { key: 'bc9c3db53bec717a1d17c139e3395ef9aa5e27ca', class: "chi-switch__content" }, h("span", { key: '8732b589825a0a73e4506cb6e121fa73b6e40291', class: "chi-switch__thumb" })), h("span", { key: 'cbf4828a036546ddbcfbfb982ad09c3d51b26d6b', class: "chi-switch__label" }, this.label)));
}
static get is() { return "chi-switch"; }
static get encapsulation() { return "scoped"; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ export class Tooltip {
}
}
render() {
return (h("div", { key: 'd0b743c37c158504d4b1d9c903ae450424356808', class: this.wrapper ? TOOLTIP_CLASSES.WRAPPER : '', ref: (el) => (this._tooltipRef = el), "aria-describedby": this.tooltipVisible ? this._id : null }, h("slot", { key: 'c5933d01974ed9d63cf2963924ffca8c161b78bf' }), h("div", { key: '0b69216217beae0cf3b830d9e6c0cf08e0dc7ff7', class: {
return (h("div", { key: 'd57dc9c29f97e9625edc3233d3cbcfd5318a7428', class: this.wrapper ? TOOLTIP_CLASSES.WRAPPER : '', ref: (el) => (this._tooltipRef = el), "aria-describedby": this.tooltipVisible ? this._id : null }, h("slot", { key: '7ee107335b7a5ef4a069341070845c23bdd66971' }), h("div", { key: '113e9375a6186ffdfcdadf597912abb9df4f85eb', class: {
[TOOLTIP_CLASSES.ELEMENT]: true,
[LIGHT_CLASS]: this.color === 'light',
}, id: this._id, role: "tooltip", ref: (el) => (this._tooltipElementNode = el), "aria-hidden": !this.tooltipVisible }, h("span", { key: 'aa9002f6ac2520aa0621382bd45e2390c1d1cf6e', class: TOOLTIP_CLASSES.MESSAGE }, this.message))));
}, id: this._id, role: "tooltip", ref: (el) => (this._tooltipElementNode = el), "aria-hidden": !this.tooltipVisible }, h("span", { key: 'bd5b668a4fd64050abfa2cf900de2bcc7045bf5d', class: TOOLTIP_CLASSES.MESSAGE }, this.message))));
}
static get is() { return "chi-tooltip"; }
static get encapsulation() { return "scoped"; }
Expand Down
8 changes: 8 additions & 0 deletions lib/chi-custom-elements/collection/constants/classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const PILL_CLASS = '-pill';
export const SQUARE_CLASS = '-square';
export const CIRCLE_CLASS = '-circle';
export const ROUNDED_CLASS = '-rounded';
export const FOCUS_CLASS = '-focus';
//#endregion
//#region Accordion
export const ACCORDION_CLASSES = {
Expand Down Expand Up @@ -478,3 +479,10 @@ export const PICKER_CLASSES = {
RADIO: 'chi-picker__radio',
};
//#endregion
// #region Tags
export const TAGS_CLASSES = {
TAGS: 'chi-tags',
TAG: 'chi-tag',
INPUT: 'chi-tags__input',
};
// #endregion
2 changes: 1 addition & 1 deletion lib/chi-custom-elements/collection/constants/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export const DROPDOWN_SELECT_MODES = ['single', 'multi'];
//#endregion
//#region Dropdown
export const SKELETON_TYPES = ['square', 'rounded', 'circle', 'rounded-square'];
//#endregion
// #endregion
25 changes: 25 additions & 0 deletions lib/chi-custom-elements/esm-es5/chi-accordion_37.entry.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/chi-custom-elements/esm-es5/index-c11192ea.js

Large diffs are not rendered by default.

Loading

0 comments on commit 268bf00

Please sign in to comment.