@xplor-education/core-stencil-components 2.0.0 → 2.1.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/components/{p-x30CgLRv.js → p-BaDLDCH5.js} +3 -3
- package/components/{p-x30CgLRv.js.map → p-BaDLDCH5.js.map} +1 -1
- package/components/{p-BK_ATKuB.js → p-DxxjL3sU.js} +3 -3
- package/components/{p-BK_ATKuB.js.map → p-DxxjL3sU.js.map} +1 -1
- package/components/xplor-chat-widget.js +1 -1
- package/components/xplor-date-picker.js +1 -1
- package/components/xplor-drag-and-drop-input.js +39 -4
- package/components/xplor-drag-and-drop-input.js.map +1 -1
- package/components/xplor-dropdown.js +1 -1
- package/components/xplor-expansion-panel.js +4 -4
- package/components/xplor-expansion-panels.js +1 -1
- package/components/xplor-inline-checkbox.js +2 -2
- package/components/xplor-inline-date-picker.js +1 -1
- package/components/xplor-inline-switch.js +1 -1
- package/components/xplor-input-file.js +1 -1
- package/components/xplor-input-search.js +2 -2
- package/components/xplor-input-select.js +24 -4
- package/components/xplor-input-select.js.map +1 -1
- package/components/xplor-input-send.js +2 -2
- package/components/xplor-input-text-area.js +2 -2
- package/components/xplor-input-text-secondary.js +2 -2
- package/components/xplor-input-text.js +2 -2
- package/components/xplor-input-title.js +1 -1
- package/components/xplor-links.js +1 -1
- package/components/xplor-modal-persistent.js +1 -1
- package/components/xplor-radio-btn.d.ts +11 -0
- package/components/xplor-radio-btn.js +36 -0
- package/components/xplor-radio-btn.js.map +1 -0
- package/components/xplor-section-card.js +2 -2
- package/components/xplor-section-heading.js +2 -2
- package/components/xplor-table.js +5 -5
- package/components/xplor-text-bubble.js +2 -2
- package/components/xplor-text-field.js +2 -2
- package/components/xplor-time-picker.js +6 -6
- package/dist/cjs/index-Bc5o_4vY.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{xplor-alert-dialog_57.cjs.entry.js → xplor-alert-dialog_58.cjs.entry.js} +118 -52
- package/dist/cjs/xplor-alert-dialog_58.cjs.entry.js.map +1 -0
- package/dist/cjs/xplor-component-library.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.css +125 -21
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.js +58 -4
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.js.map +1 -1
- package/dist/collection/components/xplor-dropdown/xplor-dropdown.js +1 -1
- package/dist/collection/components/xplor-expansion-panel/xplor-expansion-panel.js +4 -4
- package/dist/collection/components/xplor-expansion-panels/xplor-expansion-panels.js +1 -1
- package/dist/collection/components/xplor-inline-checkbox/xplor-inline-checkbox.js +2 -2
- package/dist/collection/components/xplor-inline-date-picker/xplor-inline-date-picker.js +1 -1
- package/dist/collection/components/xplor-inline-switch/xplor-inline-switch.js +1 -1
- package/dist/collection/components/xplor-input-file/xplor-input-file.js +1 -1
- package/dist/collection/components/xplor-input-search/xplor-input-search.js +2 -2
- package/dist/collection/components/xplor-input-select/xplor-input-select.css +1 -6
- package/dist/collection/components/xplor-input-select/xplor-input-select.js +23 -3
- package/dist/collection/components/xplor-input-select/xplor-input-select.js.map +1 -1
- package/dist/collection/components/xplor-input-send/xplor-input-send.js +2 -2
- package/dist/collection/components/xplor-input-text/xplor-input-text.js +2 -2
- package/dist/collection/components/xplor-input-text-area/xplor-input-text-area.js +2 -2
- package/dist/collection/components/xplor-input-text-secondary/xplor-input-text-secondary.js +2 -2
- package/dist/collection/components/xplor-input-title/xplor-input-title.js +1 -1
- package/dist/collection/components/xplor-links/xplor-links.js +1 -1
- package/dist/collection/components/xplor-modal-persistent/xplor-modal-persistent.js +1 -1
- package/dist/collection/components/xplor-radio-btn/xplor-radio-btn.css +271 -0
- package/dist/collection/components/xplor-radio-btn/xplor-radio-btn.js +19 -0
- package/dist/collection/components/xplor-radio-btn/xplor-radio-btn.js.map +1 -0
- package/dist/collection/components/xplor-section-card/xplor-section-card.js +2 -2
- package/dist/collection/components/xplor-section-heading/xplor-section-heading.js +2 -2
- package/dist/collection/components/xplor-table/xplor-table.js +5 -5
- package/dist/collection/components/xplor-text-bubble/xplor-text-bubble.js +2 -2
- package/dist/collection/components/xplor-text-field/xplor-text-field.js +2 -2
- package/dist/collection/components/xplor-time-picker/xplor-time-picker.js +6 -6
- package/dist/components/{p-BIFlTsO8.js → p-CXJd350E.js} +3 -3
- package/dist/components/{p-BIFlTsO8.js.map → p-CXJd350E.js.map} +1 -1
- package/dist/components/{p-CJGP2_5k.js → p-oOSnPjGy.js} +3 -3
- package/dist/components/{p-CJGP2_5k.js.map → p-oOSnPjGy.js.map} +1 -1
- package/dist/components/xplor-chat-widget.js +1 -1
- package/dist/components/xplor-date-picker.js +1 -1
- package/dist/components/xplor-drag-and-drop-input.js +39 -4
- package/dist/components/xplor-drag-and-drop-input.js.map +1 -1
- package/dist/components/xplor-dropdown.js +1 -1
- package/dist/components/xplor-expansion-panel.js +4 -4
- package/dist/components/xplor-expansion-panels.js +1 -1
- package/dist/components/xplor-inline-checkbox.js +2 -2
- package/dist/components/xplor-inline-date-picker.js +1 -1
- package/dist/components/xplor-inline-switch.js +1 -1
- package/dist/components/xplor-input-file.js +1 -1
- package/dist/components/xplor-input-search.js +2 -2
- package/dist/components/xplor-input-select.js +24 -4
- package/dist/components/xplor-input-select.js.map +1 -1
- package/dist/components/xplor-input-send.js +2 -2
- package/dist/components/xplor-input-text-area.js +2 -2
- package/dist/components/xplor-input-text-secondary.js +2 -2
- package/dist/components/xplor-input-text.js +2 -2
- package/dist/components/xplor-input-title.js +1 -1
- package/dist/components/xplor-links.js +1 -1
- package/dist/components/xplor-modal-persistent.js +1 -1
- package/dist/components/xplor-radio-btn.d.ts +11 -0
- package/dist/components/xplor-radio-btn.js +37 -0
- package/dist/components/xplor-radio-btn.js.map +1 -0
- package/dist/components/xplor-section-card.js +2 -2
- package/dist/components/xplor-section-heading.js +2 -2
- package/dist/components/xplor-table.js +5 -5
- package/dist/components/xplor-text-bubble.js +2 -2
- package/dist/components/xplor-text-field.js +2 -2
- package/dist/components/xplor-time-picker.js +6 -6
- package/dist/esm/index-Zkk2NJif.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{xplor-alert-dialog_57.entry.js → xplor-alert-dialog_58.entry.js} +118 -53
- package/dist/esm/xplor-alert-dialog_58.entry.js.map +1 -0
- package/dist/esm/xplor-component-library.js +1 -1
- package/dist/hydrate/index.js +127 -51
- package/dist/hydrate/index.mjs +127 -51
- package/dist/types/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.d.ts +7 -0
- package/dist/types/components/xplor-input-select/xplor-input-select.d.ts +7 -0
- package/dist/types/components/xplor-radio-btn/xplor-radio-btn.d.ts +3 -0
- package/dist/types/components.d.ts +25 -2
- package/dist/xplor-component-library/{p-25fa8553.entry.js → p-07d83c17.entry.js} +2 -2
- package/dist/xplor-component-library/p-07d83c17.entry.js.map +1 -0
- package/dist/xplor-component-library/xplor-component-library.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/xplor-alert-dialog_57.cjs.entry.js.map +0 -1
- package/dist/esm/xplor-alert-dialog_57.entry.js.map +0 -1
- package/dist/xplor-component-library/p-25fa8553.entry.js.map +0 -1
|
@@ -55,6 +55,17 @@ export class XplorInputSelect {
|
|
|
55
55
|
this.required = false;
|
|
56
56
|
this.isOpen = false;
|
|
57
57
|
this.isFocused = false;
|
|
58
|
+
this.menuPosition = null;
|
|
59
|
+
this.updateMenuPosition = () => {
|
|
60
|
+
if (this.fieldRef) {
|
|
61
|
+
const rect = this.fieldRef.getBoundingClientRect();
|
|
62
|
+
this.menuPosition = {
|
|
63
|
+
top: rect.bottom + 4,
|
|
64
|
+
left: rect.left,
|
|
65
|
+
width: rect.width,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
};
|
|
58
69
|
this.handleOutsideClick = (event) => {
|
|
59
70
|
if (this.selectRef && !this.selectRef.contains(event.target)) {
|
|
60
71
|
this.isOpen = false;
|
|
@@ -62,6 +73,9 @@ export class XplorInputSelect {
|
|
|
62
73
|
};
|
|
63
74
|
this.toggleDropdown = () => {
|
|
64
75
|
if (!this.disabled && !this.readonly) {
|
|
76
|
+
if (!this.isOpen) {
|
|
77
|
+
this.updateMenuPosition();
|
|
78
|
+
}
|
|
65
79
|
this.isOpen = !this.isOpen;
|
|
66
80
|
}
|
|
67
81
|
};
|
|
@@ -116,10 +130,15 @@ export class XplorInputSelect {
|
|
|
116
130
|
'xplor-input-select--error': !!this.error,
|
|
117
131
|
};
|
|
118
132
|
const showDetails = this.hideDetails === false || (this.hideDetails === 'auto' && (this.error || this.helperText));
|
|
119
|
-
return (h(Host, { key: '
|
|
133
|
+
return (h(Host, { key: 'e5865a9d55129458a5357cf05f15115f1007019b' }, h("div", { key: '66d54f5d1bb7514301427de3ad5bbf7746309cec', class: containerClasses, ref: (el) => (this.selectRef = el) }, this.label && (h("label", { key: 'dfa166182add3a83872a05e4a20b77f654921231', class: "xplor-input-select__label" }, this.label, this.required && h("span", { key: '0da6997f30e1861b35e67e80974fce115560cc9b', class: "xplor-input-select__required" }, "*"))), h("div", { key: 'f828546abc6121bcabcdbc905a0e43aa012bb5a9', class: "xplor-input-select__field", onClick: this.toggleDropdown, ref: (el) => (this.fieldRef = el) }, h("div", { key: '13692cc57a5c3c1da3915ca80f8324d091732ebb', class: "xplor-input-select__value" }, this.getDisplayValue()), h("span", { key: '0a372cf751bc459d957130c50fb4387405e9f21f', class: "xplor-input-select__arrow" }, this.isOpen ? '▲' : '▼')), this.isOpen && this.menuPosition && (h("div", { key: '13e8536c6ce8220041364675d459dc2ee3ef7613', class: "xplor-input-select__menu", style: {
|
|
134
|
+
position: 'fixed',
|
|
135
|
+
top: `${this.menuPosition.top}px`,
|
|
136
|
+
left: `${this.menuPosition.left}px`,
|
|
137
|
+
width: `${this.menuPosition.width}px`,
|
|
138
|
+
} }, this.options.length === 0 ? (h("div", { class: "xplor-input-select__empty" }, "No options available")) : (this.options.map((option) => (h("div", { key: option.value, class: {
|
|
120
139
|
'xplor-input-select__option': true,
|
|
121
140
|
'xplor-input-select__option--selected': this.isSelected(option),
|
|
122
|
-
}, onClick: () => this.handleOptionClick(option) }, this.multiple && (h("input", { type: "checkbox", class: "xplor-input-select__checkbox", checked: this.isSelected(option), readOnly: true })), h("div", { class: "xplor-input-select__option-content" }, h("div", { class: "xplor-input-select__option-title" }, option.title), option.subtitle && (h("div", { class: "xplor-input-select__option-subtitle" }, option.subtitle))))))))), showDetails && (h("div", { key: '
|
|
141
|
+
}, onClick: () => this.handleOptionClick(option) }, this.multiple && (h("input", { type: "checkbox", class: "xplor-input-select__checkbox", checked: this.isSelected(option), readOnly: true })), h("div", { class: "xplor-input-select__option-content" }, h("div", { class: "xplor-input-select__option-title" }, option.title), option.subtitle && (h("div", { class: "xplor-input-select__option-subtitle" }, option.subtitle))))))))), showDetails && (h("div", { key: '240b60564cf80cc66b879bb4431885270c64db5b', class: "xplor-input-select__details" }, this.error && h("div", { key: 'bbb2a2e796650c153e901aa87188a386c2f5b9f7', class: "xplor-input-select__error-message" }, this.error), !this.error && this.helperText && h("div", { key: 'a36ccb1626e1b5a9d19f2ee106213fd943177aa8', class: "xplor-input-select__helper-text" }, this.helperText))))));
|
|
123
142
|
}
|
|
124
143
|
static get is() { return "xplor-input-select"; }
|
|
125
144
|
static get encapsulation() { return "scoped"; }
|
|
@@ -405,7 +424,8 @@ export class XplorInputSelect {
|
|
|
405
424
|
static get states() {
|
|
406
425
|
return {
|
|
407
426
|
"isOpen": {},
|
|
408
|
-
"isFocused": {}
|
|
427
|
+
"isFocused": {},
|
|
428
|
+
"menuPosition": {}
|
|
409
429
|
};
|
|
410
430
|
}
|
|
411
431
|
static get events() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xplor-input-select.js","sourceRoot":"","sources":["../../../src/components/xplor-input-select/xplor-input-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA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AAC;oBAE5C,IAAI,CAAC,QAAQ,IAAI,CAChB,aACE,IAAI,EAAC,UAAU,EACf,KAAK,EAAC,8BAA8B,EACpC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAChC,QAAQ,SACR,CACH;oBACD,WAAK,KAAK,EAAC,oCAAoC;wBAC7C,WAAK,KAAK,EAAC,kCAAkC,IAAE,MAAM,CAAC,KAAK,CAAO;wBACjE,MAAM,CAAC,QAAQ,IAAI,CAClB,WAAK,KAAK,EAAC,qCAAqC,IAAE,MAAM,CAAC,QAAQ,CAAO,CACzE,CACG,CACF,CACP,CAAC,CACH,CACG,CACP;gBAEA,WAAW,IAAI,CACd,4DAAK,KAAK,EAAC,6BAA6B;oBACrC,IAAI,CAAC,KAAK,IAAI,4DAAK,KAAK,EAAC,mCAAmC,IAAE,IAAI,CAAC,KAAK,CAAO;oBAC/E,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,UAAU,IAAI,4DAAK,KAAK,EAAC,iCAAiC,IAAE,IAAI,CAAC,UAAU,CAAO,CACnG,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter, State } from '@stencil/core';\n\nexport interface SelectOption {\n value: any;\n title: string;\n subtitle?: string;\n [key: string]: any;\n}\n\n@Component({\n tag: 'xplor-input-select',\n styleUrl: 'xplor-input-select.scss',\n scoped: true,\n})\nexport class XplorInputSelect {\n private selectRef: HTMLDivElement;\n\n /**\n * Selected value(s)\n */\n @Prop({ mutable: true }) value: any | any[] = null;\n\n /**\n * Input label\n */\n @Prop() label: string = '';\n\n /**\n * Input placeholder\n */\n @Prop() placeholder: string = 'Select...';\n\n /**\n * Options array\n */\n @Prop() options: SelectOption[] = [];\n\n /**\n * Whether multiple selection is allowed\n */\n @Prop() multiple: boolean = false;\n\n /**\n * Background color\n */\n @Prop() bgColor: string = 'white';\n\n /**\n * Border/focus color\n */\n @Prop() color: string = '#008480';\n\n /**\n * Whether the select is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Whether the select is readonly\n */\n @Prop() readonly: boolean = false;\n\n /**\n * Whether to hide validation details\n */\n @Prop() hideDetails: boolean | 'auto' = 'auto';\n\n /**\n * Error message\n */\n @Prop() error: string = '';\n\n /**\n * Helper text\n */\n @Prop() helperText: string = '';\n\n /**\n * Whether the input is required\n */\n @Prop() required: boolean = false;\n\n /**\n * Change event\n */\n @Event() xplorChange: EventEmitter<any>;\n\n @State() isOpen: boolean = false;\n @State() isFocused: boolean = false;\n\n componentDidLoad() {\n document.addEventListener('click', this.handleOutsideClick);\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleOutsideClick);\n }\n\n private handleOutsideClick = (event: MouseEvent) => {\n if (this.selectRef && !this.selectRef.contains(event.target as Node)) {\n this.isOpen = false;\n }\n };\n\n private toggleDropdown = () => {\n if (!this.disabled && !this.readonly) {\n this.isOpen = !this.isOpen;\n }\n };\n\n private handleOptionClick = (option: SelectOption) => {\n if (this.multiple) {\n const currentValue = Array.isArray(this.value) ? this.value : [];\n const index = currentValue.findIndex((v) => v === option.value);\n\n if (index > -1) {\n this.value = currentValue.filter((_, i) => i !== index);\n } else {\n this.value = [...currentValue, option.value];\n }\n } else {\n this.value = option.value;\n this.isOpen = false;\n }\n\n this.xplorChange.emit(this.value);\n };\n\n private isSelected = (option: SelectOption): boolean => {\n if (this.multiple) {\n const currentValue = Array.isArray(this.value) ? this.value : [];\n return currentValue.includes(option.value);\n }\n return this.value === option.value;\n };\n\n private getDisplayValue = (): string => {\n if (this.multiple) {\n const currentValue = Array.isArray(this.value) ? this.value : [];\n if (currentValue.length === 0) return this.placeholder;\n\n const selectedOptions = this.options.filter((opt) =>\n currentValue.includes(opt.value)\n );\n return `${selectedOptions.length} selected`;\n }\n\n const selectedOption = this.options.find((opt) => opt.value === this.value);\n return selectedOption ? selectedOption.title : this.placeholder;\n };\n\n render() {\n const containerClasses = {\n 'xplor-input-select': true,\n 'xplor-input-select--open': this.isOpen,\n 'xplor-input-select--focused': this.isFocused,\n 'xplor-input-select--disabled': this.disabled,\n 'xplor-input-select--error': !!this.error,\n };\n\n const showDetails = this.hideDetails === false || (this.hideDetails === 'auto' && (this.error || this.helperText));\n\n return (\n <Host>\n <div class={containerClasses} ref={(el) => (this.selectRef = el)}>\n {this.label && (\n <label class=\"xplor-input-select__label\">\n {this.label}\n {this.required && <span class=\"xplor-input-select__required\">*</span>}\n </label>\n )}\n\n <div class=\"xplor-input-select__field\" onClick={this.toggleDropdown}>\n <div class=\"xplor-input-select__value\">\n {this.getDisplayValue()}\n </div>\n <span class=\"xplor-input-select__arrow\">{this.isOpen ? '▲' : '▼'}</span>\n </div>\n\n {this.isOpen && (\n <div class=\"xplor-input-select__menu\">\n {this.options.length === 0 ? (\n <div class=\"xplor-input-select__empty\">No options available</div>\n ) : (\n this.options.map((option) => (\n <div\n key={option.value}\n class={{\n 'xplor-input-select__option': true,\n 'xplor-input-select__option--selected': this.isSelected(option),\n }}\n onClick={() => this.handleOptionClick(option)}\n >\n {this.multiple && (\n <input\n type=\"checkbox\"\n class=\"xplor-input-select__checkbox\"\n checked={this.isSelected(option)}\n readOnly\n />\n )}\n <div class=\"xplor-input-select__option-content\">\n <div class=\"xplor-input-select__option-title\">{option.title}</div>\n {option.subtitle && (\n <div class=\"xplor-input-select__option-subtitle\">{option.subtitle}</div>\n )}\n </div>\n </div>\n ))\n )}\n </div>\n )}\n\n {showDetails && (\n <div class=\"xplor-input-select__details\">\n {this.error && <div class=\"xplor-input-select__error-message\">{this.error}</div>}\n {!this.error && this.helperText && <div class=\"xplor-input-select__helper-text\">{this.helperText}</div>}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"xplor-input-select.js","sourceRoot":"","sources":["../../../src/components/xplor-input-select/xplor-input-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAcrF,MAAM,OAAO,gBAAgB;IAL7B;QASE;;WAEG;QACsB,UAAK,GAAgB,IAAI,CAAC;QAEnD;;WAEG;QACK,UAAK,GAAW,EAAE,CAAC;QAE3B;;WAEG;QACK,gBAAW,GAAW,WAAW,CAAC;QAE1C;;WAEG;QACK,YAAO,GAAmB,EAAE,CAAC;QAErC;;WAEG;QACK,aAAQ,GAAY,KAAK,CAAC;QAElC;;WAEG;QACK,YAAO,GAAW,OAAO,CAAC;QAElC;;WAEG;QACK,UAAK,GAAW,SAAS,CAAC;QAElC;;WAEG;QACK,aAAQ,GAAY,KAAK,CAAC;QAElC;;WAEG;QACK,aAAQ,GAAY,KAAK,CAAC;QAElC;;WAEG;QACK,gBAAW,GAAqB,MAAM,CAAC;QAE/C;;WAEG;QACK,UAAK,GAAW,EAAE,CAAC;QAE3B;;WAEG;QACK,eAAU,GAAW,EAAE,CAAC;QAEhC;;WAEG;QACK,aAAQ,GAAY,KAAK,CAAC;QAOzB,WAAM,GAAY,KAAK,CAAC;QACxB,cAAS,GAAY,KAAK,CAAC;QAC3B,iBAAY,GAAiD,IAAI,CAAC;QAUnE,uBAAkB,GAAG,GAAG,EAAE;YAChC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,qB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,EACpC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAChC,QAAQ,SACR,CACH;oBACD,WAAK,KAAK,EAAC,oCAAoC;wBAC7C,WAAK,KAAK,EAAC,kCAAkC,IAAE,MAAM,CAAC,KAAK,CAAO;wBACjE,MAAM,CAAC,QAAQ,IAAI,CAClB,WAAK,KAAK,EAAC,qCAAqC,IAAE,MAAM,CAAC,QAAQ,CAAO,CACzE,CACG,CACF,CACP,CAAC,CACH,CACG,CACP;gBAEA,WAAW,IAAI,CACd,4DAAK,KAAK,EAAC,6BAA6B;oBACrC,IAAI,CAAC,KAAK,IAAI,4DAAK,KAAK,EAAC,mCAAmC,IAAE,IAAI,CAAC,KAAK,CAAO;oBAC/E,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,UAAU,IAAI,4DAAK,KAAK,EAAC,iCAAiC,IAAE,IAAI,CAAC,UAAU,CAAO,CACnG,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter, State } from '@stencil/core';\n\nexport interface SelectOption {\n value: any;\n title: string;\n subtitle?: string;\n [key: string]: any;\n}\n\n@Component({\n tag: 'xplor-input-select',\n styleUrl: 'xplor-input-select.scss',\n scoped: true,\n})\nexport class XplorInputSelect {\n private selectRef: HTMLDivElement;\n private fieldRef: HTMLDivElement;\n\n /**\n * Selected value(s)\n */\n @Prop({ mutable: true }) value: any | any[] = null;\n\n /**\n * Input label\n */\n @Prop() label: string = '';\n\n /**\n * Input placeholder\n */\n @Prop() placeholder: string = 'Select...';\n\n /**\n * Options array\n */\n @Prop() options: SelectOption[] = [];\n\n /**\n * Whether multiple selection is allowed\n */\n @Prop() multiple: boolean = false;\n\n /**\n * Background color\n */\n @Prop() bgColor: string = 'white';\n\n /**\n * Border/focus color\n */\n @Prop() color: string = '#008480';\n\n /**\n * Whether the select is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Whether the select is readonly\n */\n @Prop() readonly: boolean = false;\n\n /**\n * Whether to hide validation details\n */\n @Prop() hideDetails: boolean | 'auto' = 'auto';\n\n /**\n * Error message\n */\n @Prop() error: string = '';\n\n /**\n * Helper text\n */\n @Prop() helperText: string = '';\n\n /**\n * Whether the input is required\n */\n @Prop() required: boolean = false;\n\n /**\n * Change event\n */\n @Event() xplorChange: EventEmitter<any>;\n\n @State() isOpen: boolean = false;\n @State() isFocused: boolean = false;\n @State() menuPosition: { top: number; left: number; width: number } = null;\n\n componentDidLoad() {\n document.addEventListener('click', this.handleOutsideClick);\n }\n\n disconnectedCallback() {\n document.removeEventListener('click', this.handleOutsideClick);\n }\n\n private updateMenuPosition = () => {\n if (this.fieldRef) {\n const rect = this.fieldRef.getBoundingClientRect();\n this.menuPosition = {\n top: rect.bottom + 4,\n left: rect.left,\n width: rect.width,\n };\n }\n };\n\n private handleOutsideClick = (event: MouseEvent) => {\n if (this.selectRef && !this.selectRef.contains(event.target as Node)) {\n this.isOpen = false;\n }\n };\n\n private toggleDropdown = () => {\n if (!this.disabled && !this.readonly) {\n if (!this.isOpen) {\n this.updateMenuPosition();\n }\n this.isOpen = !this.isOpen;\n }\n };\n\n private handleOptionClick = (option: SelectOption) => {\n if (this.multiple) {\n const currentValue = Array.isArray(this.value) ? this.value : [];\n const index = currentValue.findIndex((v) => v === option.value);\n\n if (index > -1) {\n this.value = currentValue.filter((_, i) => i !== index);\n } else {\n this.value = [...currentValue, option.value];\n }\n } else {\n this.value = option.value;\n this.isOpen = false;\n }\n\n this.xplorChange.emit(this.value);\n };\n\n private isSelected = (option: SelectOption): boolean => {\n if (this.multiple) {\n const currentValue = Array.isArray(this.value) ? this.value : [];\n return currentValue.includes(option.value);\n }\n return this.value === option.value;\n };\n\n private getDisplayValue = (): string => {\n if (this.multiple) {\n const currentValue = Array.isArray(this.value) ? this.value : [];\n if (currentValue.length === 0) return this.placeholder;\n\n const selectedOptions = this.options.filter((opt) =>\n currentValue.includes(opt.value)\n );\n return `${selectedOptions.length} selected`;\n }\n\n const selectedOption = this.options.find((opt) => opt.value === this.value);\n return selectedOption ? selectedOption.title : this.placeholder;\n };\n\n render() {\n const containerClasses = {\n 'xplor-input-select': true,\n 'xplor-input-select--open': this.isOpen,\n 'xplor-input-select--focused': this.isFocused,\n 'xplor-input-select--disabled': this.disabled,\n 'xplor-input-select--error': !!this.error,\n };\n\n const showDetails = this.hideDetails === false || (this.hideDetails === 'auto' && (this.error || this.helperText));\n\n return (\n <Host>\n <div class={containerClasses} ref={(el) => (this.selectRef = el)}>\n {this.label && (\n <label class=\"xplor-input-select__label\">\n {this.label}\n {this.required && <span class=\"xplor-input-select__required\">*</span>}\n </label>\n )}\n\n <div class=\"xplor-input-select__field\" onClick={this.toggleDropdown} ref={(el) => (this.fieldRef = el)}>\n <div class=\"xplor-input-select__value\">\n {this.getDisplayValue()}\n </div>\n <span class=\"xplor-input-select__arrow\">{this.isOpen ? '▲' : '▼'}</span>\n </div>\n\n {this.isOpen && this.menuPosition && (\n <div\n class=\"xplor-input-select__menu\"\n style={{\n position: 'fixed',\n top: `${this.menuPosition.top}px`,\n left: `${this.menuPosition.left}px`,\n width: `${this.menuPosition.width}px`,\n }}\n >\n {this.options.length === 0 ? (\n <div class=\"xplor-input-select__empty\">No options available</div>\n ) : (\n this.options.map((option) => (\n <div\n key={option.value}\n class={{\n 'xplor-input-select__option': true,\n 'xplor-input-select__option--selected': this.isSelected(option),\n }}\n onClick={() => this.handleOptionClick(option)}\n >\n {this.multiple && (\n <input\n type=\"checkbox\"\n class=\"xplor-input-select__checkbox\"\n checked={this.isSelected(option)}\n readOnly\n />\n )}\n <div class=\"xplor-input-select__option-content\">\n <div class=\"xplor-input-select__option-title\">{option.title}</div>\n {option.subtitle && (\n <div class=\"xplor-input-select__option-subtitle\">{option.subtitle}</div>\n )}\n </div>\n </div>\n ))\n )}\n </div>\n )}\n\n {showDetails && (\n <div class=\"xplor-input-select__details\">\n {this.error && <div class=\"xplor-input-select__error-message\">{this.error}</div>}\n {!this.error && this.helperText && <div class=\"xplor-input-select__helper-text\">{this.helperText}</div>}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -36,10 +36,10 @@ export class XplorInputSend {
|
|
|
36
36
|
this.internalValue = this.value;
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: '87d0d49d2a9e9061152b294e6b7a91ffae7f39b0' }, h("div", { key: 'ef857693127c5945ff78c20e431609b051df32e7', class: {
|
|
40
40
|
'input-send': true,
|
|
41
41
|
'input-send--disabled': this.disabled,
|
|
42
|
-
} }, h("input", { key: '
|
|
42
|
+
} }, h("input", { key: '93aca7121d132bb72d812db77f8ff85be31a00aa', ref: (el) => (this.inputEl = el), type: "text", class: "input-send__input", placeholder: this.placeholder, value: this.internalValue, onInput: this.handleInput, onKeyDown: this.handleKeyDown, disabled: this.disabled, maxLength: this.maxLength }), h("xplor-button", { key: '92b64ec5e3c14cace28aacb12f58185e07b63f71', class: "input-send__button", text: this.buttonText, type: this.disabled || !this.internalValue.trim() ? 'disabled' : this.buttonType, onClick: this.handleSend }))));
|
|
43
43
|
}
|
|
44
44
|
static get is() { return "xplor-input-send"; }
|
|
45
45
|
static get encapsulation() { return "scoped"; }
|
|
@@ -77,9 +77,9 @@ export class XplorInputText {
|
|
|
77
77
|
'xplor-input-text--error': !!this.error,
|
|
78
78
|
};
|
|
79
79
|
const showDetails = this.hideDetails === false || (this.hideDetails === 'auto' && (this.error || this.helperText));
|
|
80
|
-
return (h(Host, { key: '
|
|
80
|
+
return (h(Host, { key: 'eefd18f18a4a0303cccca87db9256d2d7033e767' }, h("div", { key: 'cf152d49ce4ed953162467a4cc6d9e8392380d4c', class: containerClasses }, this.label && (h("label", { key: '78e7c0178ec1dedda68f6fdce7cb1f1dd13840fd', class: "xplor-input-text__label" }, this.label, this.required && h("span", { key: '1eaf01ca583263e7047444bbfe6b2636d8fde241', class: "xplor-input-text__required" }, "*"))), h("div", { key: '7318153a1c55ad38196cea03555238b8f2c37d51', class: "xplor-input-text__field" }, h("input", { key: '41c1c60d8dbdea750477a17d32b110ef826e73a6', type: this.type, class: "xplor-input-text__input", value: this.value, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, required: this.required, onInput: this.handleInput, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur, style: {
|
|
81
81
|
backgroundColor: this.bgColor,
|
|
82
|
-
} }), h("slot", { key: '
|
|
82
|
+
} }), h("slot", { key: '48461bf663591d51ebd1ee4b6fbdc25680b322fb', name: "append-inner" })), showDetails && (h("div", { key: '5ed0aecf6e5751e771882f9ab9cd58aafb44ba01', class: "xplor-input-text__details" }, this.error && h("div", { key: 'b34fffee42d3f663b923a1b9fe14c7a0a19539b2', class: "xplor-input-text__error-message" }, this.error), !this.error && this.helperText && h("div", { key: '7bf60893cc66f8916ebe3bc3bace1e827812541d', class: "xplor-input-text__helper-text" }, this.helperText))), h("slot", { key: 'c10099eb2c41e38cc65170a5acb6897b949b8173', name: "append" }))));
|
|
83
83
|
}
|
|
84
84
|
static get is() { return "xplor-input-text"; }
|
|
85
85
|
static get encapsulation() { return "scoped"; }
|
|
@@ -79,9 +79,9 @@ export class XplorInputTextArea {
|
|
|
79
79
|
};
|
|
80
80
|
const showClearButton = this.clearable && this.value && !this.readonly && !this.disabled;
|
|
81
81
|
const showDetails = this.hideDetails === false || (this.hideDetails === 'auto' && (this.error || this.helperText));
|
|
82
|
-
return (h(Host, { key: '
|
|
82
|
+
return (h(Host, { key: '310d900ed96c59bc8b0f19d40fc1573c1a08c220' }, h("div", { key: '0a1903c53b92932e7a98bf910c00b912a1fa078e', class: containerClasses }, this.label && (h("label", { key: '9c86a8f36b0007ecfdba4c70e3c76fa65a34d4e6', class: "xplor-input-text-area__label" }, this.label, this.required && h("span", { key: '5d57cbb3cd28c4533cfd42286bf16924f9937b4c', class: "xplor-input-text-area__required" }, "*"))), h("div", { key: '09feb36c8fe79b5a366d8c0f93495a363ec6596f', class: "xplor-input-text-area__field" }, h("textarea", { key: 'e05d3c094930b2993b5c959b1dfce569ad1b01d0', class: "xplor-input-text-area__input", value: this.value, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, required: this.required, rows: this.rows, onInput: this.handleInput, onChange: this.handleChange, onFocus: () => (this.isFocused = true), onBlur: () => (this.isFocused = false), style: {
|
|
83
83
|
backgroundColor: this.bgColor,
|
|
84
|
-
} }), showClearButton && (h("button", { key: '
|
|
84
|
+
} }), showClearButton && (h("button", { key: '3e95a44af498eb259fab45a653ed3ed2ce7ef3b7', type: "button", class: "xplor-input-text-area__clear", onClick: this.handleClear, "aria-label": "Clear" }, "\u2715"))), showDetails && (h("div", { key: 'cf21757ef973e21a44abba969baad7b88c0a273a', class: "xplor-input-text-area__details" }, this.error && h("div", { key: 'bdfd559501f15f928a44ed7cfe797bb47b614092', class: "xplor-input-text-area__error-message" }, this.error), !this.error && this.helperText && h("div", { key: '0eb05a84b610b3971e76cbd5f566f32ba260eacb', class: "xplor-input-text-area__helper-text" }, this.helperText))))));
|
|
85
85
|
}
|
|
86
86
|
static get is() { return "xplor-input-text-area"; }
|
|
87
87
|
static get encapsulation() { return "scoped"; }
|
|
@@ -42,9 +42,9 @@ export class XplorInputTextSecondary {
|
|
|
42
42
|
'input-secondary--dirty': this.isDirty,
|
|
43
43
|
};
|
|
44
44
|
const showDetails = this.hideDetails === false || (this.hideDetails === 'auto' && (this.error || this.helperText));
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: 'd6c2b61f7fc153bd32577086f5c0ffcc335cbf4a' }, h("div", { key: 'b7cfabd013e84a7b72e6ca4cd7cd592bcd9de4df', class: containerClasses }, this.label && (h("label", { key: 'd5dfe32ab50128b1a3ff824e82b98f4ae75fcd17', class: "input-secondary__label" }, this.label, this.required && h("span", { key: '5de6c309872715b1bdd1f0aad9f577618f43f63f', class: "input-secondary__required" }, "*"))), h("div", { key: '5295e7d9cc7ee5ab401ee5a1182241791f2d81db', class: "input-secondary__field" }, h("input", { key: '146cf2b3413de110e7aaadd19fc8da7bb824af4a', type: this.type, class: "input-secondary__input", value: this.value, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, required: this.required, onInput: this.handleInput, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur, style: {
|
|
46
46
|
backgroundColor: this.bgColor,
|
|
47
|
-
} }), h("slot", { key: '
|
|
47
|
+
} }), h("slot", { key: '8b72be3ae83c0de2f8c9f70198c012c0a25fb470', name: "append-inner" })), showDetails && (h("div", { key: 'a540ae6fd62ca09ca1ce337fd71d9b93950071d0', class: "input-secondary__details" }, this.error && h("div", { key: '1b899f4df036b2d648d7d6f87767d0ced8202a73', class: "input-secondary__error-message" }, this.error), !this.error && this.helperText && h("div", { key: 'ec2ba7e7cfc715235360bf9444bb054301537dc3', class: "input-secondary__helper-text" }, this.helperText))), h("slot", { key: '8dfc77b85e9d89c8c3fdbae4569e7b1ddc6ccb0d', name: "append" }))));
|
|
48
48
|
}
|
|
49
49
|
static get is() { return "xplor-input-text-secondary"; }
|
|
50
50
|
static get encapsulation() { return "scoped"; }
|
|
@@ -29,7 +29,7 @@ export class XplorInputTitle {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (h(Host, { key: '
|
|
32
|
+
return (h(Host, { key: '8aaf2d386451218e3261ffec5c37d512905776ef' }, h("input", { key: '0b79c0e500edcbd89a1e6f7bf4e1ea1b584b7a3e', type: "text", class: "xplor-input-title", value: this.value, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, onInput: this.handleInput, onChange: this.handleChange })));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "xplor-input-title"; }
|
|
35
35
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class XplorLinks {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '4e672b4eb8d386705f07f8d647a4a4cdabde607f', class: `theme-${this.brand}` }, h("a", { key: '8b23a97b669f6682588a568cc644a17cc92c8364', class: "x-link", href: "https://google.com" }, ' ', "googole this is a link", ' '), h("div", { key: '0b6bc1a1c77648137899cb8e554a93f1e56e4a15', class: "bg-black p-2 rounded-md flex justify-center" }, h("h1", { key: 'c2f23df8712e1763bf9d6910c0bea40a5ff476bf', class: "text-primary font-sans" }, "This is a Stencil component using Tailwind")), h("div", { key: 'e09c835f279ae0c2f70f2864ab4afa5942e1c900', class: "bg-white py-24 sm:py-32" }, h("div", { key: '5b390160da6205dc508018ab53a5f09ab80602d1', class: "mx-auto grid max-w-7xl gap-20 px-6 lg:px-8 xl:grid-cols-3" }, h("div", { key: 'd7cf64efb0c15d643a74f67c11a3b9bc0807cd6d', class: "max-w-xl" }, h("h2", { key: '78c877f919bd7098a79de55f2ef65d7538f418c5', class: "text-pretty text-3xl font-semibold tracking-tight text-gray-900 sm:text-4xl" }, "Meet our leadership"), h("p", { key: '74b69e6d9f0d99b8653704e9fac32fa4ce50f211', class: "mt-6 text-lg/8 text-gray-600" }, "We\u2019re a dynamic group of individuals who are passionate about what we do and dedicated to delivering the best results for our clients.")), h("ul", { key: 'c8e457f3529ad8340c84d5bad80431b3c42318c8', role: "list", class: "grid gap-x-8 gap-y-12 sm:grid-cols-2 sm:gap-y-16 xl:col-span-2" }, h("li", { key: '7cc055d330ab0ef28a10965f4fae52ba48b0f957' }, h("div", { key: '47faf4cf76fe5363bde5c318abd8a9ff21972f00', class: "flex items-center gap-x-6" }, h("img", { key: 'ecea3e92117d535dbd3c97d0868d5888c61a3b26', class: "size-16 rounded-full", src: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80", alt: "" }), h("div", { key: '4978dd776ab303b667c5a5a8e2c90e2a51b30829' }, h("h3", { key: 'f49b65df05b1659a27dd6a5c82c11e1b9e18306d', class: "text-base/7 font-semibold tracking-tight text-gray-900" }, "Leslie Alexander"), h("p", { key: 'e74b5a0caf90fef101dcbdf01e2aa6d823f0e36d', class: "text-sm/6 font-semibold text-indigo-600" }, "Co-Founder / CEO")))))))));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "xplor-links"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -23,7 +23,7 @@ export class XplorModalPersistent {
|
|
|
23
23
|
this.loading = false;
|
|
24
24
|
}
|
|
25
25
|
render() {
|
|
26
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: '60cd29fcdff8efad4d0b24f4532acb86e4f6220b' }, h("xplor-modal", { key: '6252525de022fcc1098e2e179c4aedb81ebb15d3', open: this.open, width: this.width, maxWidth: this.maxWidth, maxHeight: this.maxHeight, loading: this.loading, persistent: true, onXplorClose: () => this.xplorClose.emit() }, h("slot", { key: '484eeecc00f647e920878512f5e6bd61b41ba825', name: "title", slot: "title" }), h("slot", { key: 'e3fb52e2f19fdd4346fc4d014a0391dcc3e7c156', name: "subtitle", slot: "subtitle" }), h("slot", { key: 'aa8a47b1afa24229269c08783fe0b69c5a258adc', name: "body", slot: "body" }), h("slot", { key: '8d1711d5e3223922596a26ce4eb9d30288c259ed', name: "actions", slot: "actions" }))));
|
|
27
27
|
}
|
|
28
28
|
static get is() { return "xplor-modal-persistent"; }
|
|
29
29
|
static get properties() {
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
/* on mobile browsers, I set a width of 100% */
|
|
2
|
+
@tailwind base;
|
|
3
|
+
@tailwind components;
|
|
4
|
+
@tailwind utilities;
|
|
5
|
+
@layer base {
|
|
6
|
+
/* html[data-theme='office'] {
|
|
7
|
+
--color-primary: rgb(219, 59, 3);
|
|
8
|
+
--color-secondary: rgb(0, 119, 107);
|
|
9
|
+
--color-buttons: #89da59;
|
|
10
|
+
--color-typography: #ff320e;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
html {
|
|
14
|
+
--color-primary: #db3b03;
|
|
15
|
+
--color-primary-50: #db3b03;
|
|
16
|
+
--color-secondary: rgb(0, 119, 107);
|
|
17
|
+
--color-secondary-50: rgb(0, 119, 107);
|
|
18
|
+
--color-tertiary: rgb(128, 104, 186);
|
|
19
|
+
} */
|
|
20
|
+
:root {
|
|
21
|
+
--color-primary: #db3b03;
|
|
22
|
+
--color-primary-50: rgba(255, 152, 0, 1);
|
|
23
|
+
--color-secondary: rgb(0, 119, 107);
|
|
24
|
+
--color-secondary-50: rgba(1, 163, 157, 1);
|
|
25
|
+
--color-tertiary: rgb(128, 104, 186);
|
|
26
|
+
--color-tertiary: rgb(223, 242, 241);
|
|
27
|
+
--color-white: white;
|
|
28
|
+
--color-emphasis: rgb(8, 8, 9);
|
|
29
|
+
--color-supergiant: rgb(213, 66, 99);
|
|
30
|
+
--color-orange: rgb(250, 200, 127);
|
|
31
|
+
--color-buttons: #fbbc05;
|
|
32
|
+
--color-typography: #ea4335;
|
|
33
|
+
--background: 20 66% 99%;
|
|
34
|
+
--foreground: 20 51% 4%;
|
|
35
|
+
--muted: 20 25% 86%;
|
|
36
|
+
--muted-foreground: 20 7% 25%;
|
|
37
|
+
--popover: 20 66% 98%;
|
|
38
|
+
--popover-foreground: 20 51% 3%;
|
|
39
|
+
--card: 20 66% 98%;
|
|
40
|
+
--card-foreground: 20 51% 3%;
|
|
41
|
+
--border: 20 15% 94%;
|
|
42
|
+
--input: 20 15% 94%;
|
|
43
|
+
--primary: 20 48% 72%;
|
|
44
|
+
--primary-foreground: 20 48% 12%;
|
|
45
|
+
--secondary: 20 12% 92%;
|
|
46
|
+
--secondary-foreground: 20 12% 32%;
|
|
47
|
+
--accent: 20 12% 92%;
|
|
48
|
+
--accent-foreground: 20 12% 32%;
|
|
49
|
+
--destructive: 11 80% 22%;
|
|
50
|
+
--destructive-foreground: 11 80% 82%;
|
|
51
|
+
--ring: 20 48% 72%;
|
|
52
|
+
--radius: 0.5rem;
|
|
53
|
+
--chart-1: 12 76% 61%;
|
|
54
|
+
--chart-2: 173 58% 39%;
|
|
55
|
+
--chart-3: 197 37% 24%;
|
|
56
|
+
--chart-4: 43 74% 66%;
|
|
57
|
+
--chart-5: 27 87% 67%;
|
|
58
|
+
}
|
|
59
|
+
.dark {
|
|
60
|
+
--background: 253 43% 3%;
|
|
61
|
+
--foreground: 253 31% 98%;
|
|
62
|
+
--muted: 253 7% 13%;
|
|
63
|
+
--muted-foreground: 253 13% 63%;
|
|
64
|
+
--popover: 253 43% 3%;
|
|
65
|
+
--popover-foreground: 253 31% 98%;
|
|
66
|
+
--card: 253 43% 4%;
|
|
67
|
+
--card-foreground: 253 31% 99%;
|
|
68
|
+
--border: 215 27.9% 16.9%;
|
|
69
|
+
--input: 215 27.9% 16.9%;
|
|
70
|
+
--primary: 253 91% 58%;
|
|
71
|
+
--primary-foreground: 253 91% 98%;
|
|
72
|
+
--secondary: 253 7% 9%;
|
|
73
|
+
--secondary-foreground: 253 7% 69%;
|
|
74
|
+
--accent: 253 13% 14%;
|
|
75
|
+
--accent-foreground: 253 13% 74%;
|
|
76
|
+
--destructive: 339.2 90.36% 51.18%;
|
|
77
|
+
--destructive-foreground: 0 0% 100%;
|
|
78
|
+
--ring: 253 91% 58%;
|
|
79
|
+
--chart-1: 220 70% 50%;
|
|
80
|
+
--chart-2: 160 60% 45%;
|
|
81
|
+
--chart-3: 30 80% 55%;
|
|
82
|
+
--chart-4: 280 65% 60%;
|
|
83
|
+
--chart-5: 340 75% 55%;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
@layer base {
|
|
87
|
+
* {
|
|
88
|
+
@apply border-border;
|
|
89
|
+
}
|
|
90
|
+
body {
|
|
91
|
+
@apply box-border bg-background text-foreground;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
@layer utilities {
|
|
95
|
+
.min-h-screen {
|
|
96
|
+
min-height: 100vh;
|
|
97
|
+
/* Fallback */
|
|
98
|
+
min-height: 100dvh;
|
|
99
|
+
}
|
|
100
|
+
.h-screen {
|
|
101
|
+
height: 100vh;
|
|
102
|
+
/* Fallback */
|
|
103
|
+
height: 100dvh;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
@tailwind base;
|
|
107
|
+
@tailwind components;
|
|
108
|
+
@tailwind utilities;
|
|
109
|
+
@layer components {
|
|
110
|
+
.glass {
|
|
111
|
+
border: none;
|
|
112
|
+
backdrop-filter: blur(var(--glass-blur, 40px));
|
|
113
|
+
background-color: transparent;
|
|
114
|
+
background-image: linear-gradient(135deg, rgb(255, 255, 255, var(--glass-opacity, 30%)), transparent), linear-gradient(var(--glass-reflex-degree, 100deg), rgb(255, 255, 255, var(--glass-reflex-opacity, 10%)) 25%, transparent 0);
|
|
115
|
+
box-shadow: 0 0 0 1px rgb(255, 255, 255, var(--glass-border-opacity, 10%)) inset, 0 0 0 2px rgba(0, 0, 0, 0.05);
|
|
116
|
+
text-shadow: 0 1px rgb(0, 0, 0, var(--glass-text-shadow-opacity, 5%));
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
.tox.tox-tinymce {
|
|
120
|
+
width: 50% !important;
|
|
121
|
+
height: 400px !important;
|
|
122
|
+
display: inline-flex;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* on large screens, I use a different layout, so 600px are sufficient */
|
|
126
|
+
@media only screen and (min-width: 600px) {
|
|
127
|
+
.tox.tox-tinymce {
|
|
128
|
+
width: 600px !important;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
h1 {
|
|
132
|
+
color: var(--color-primary);
|
|
133
|
+
/* Header/H1 */
|
|
134
|
+
font-family: Inter;
|
|
135
|
+
font-size: 48px;
|
|
136
|
+
font-style: normal;
|
|
137
|
+
font-weight: 400;
|
|
138
|
+
line-height: 56px; /* 116.667% */
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
h2 {
|
|
142
|
+
color: var(--grey-1100252525, #252525);
|
|
143
|
+
/* Header/H2 Bold */
|
|
144
|
+
font-family: Inter;
|
|
145
|
+
font-size: 32px;
|
|
146
|
+
font-style: normal;
|
|
147
|
+
font-weight: 600;
|
|
148
|
+
line-height: 38px; /* 118.75% */
|
|
149
|
+
letter-spacing: 0.25px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
h3 {
|
|
153
|
+
color: var(--grey-1100252525, #252525);
|
|
154
|
+
/* Header/H3 */
|
|
155
|
+
font-family: Inter;
|
|
156
|
+
font-size: 24px;
|
|
157
|
+
font-style: normal;
|
|
158
|
+
font-weight: 400;
|
|
159
|
+
line-height: 32px; /* 133.333% */
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.overline {
|
|
163
|
+
color: var(--grey-1100252525, #252525);
|
|
164
|
+
/* Overline/Regular */
|
|
165
|
+
font-family: Inter;
|
|
166
|
+
font-size: 12px;
|
|
167
|
+
font-style: normal;
|
|
168
|
+
font-weight: 500;
|
|
169
|
+
line-height: 16px; /* 133.333% */
|
|
170
|
+
letter-spacing: 3.2px;
|
|
171
|
+
text-transform: uppercase;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
ol,
|
|
175
|
+
ul {
|
|
176
|
+
list-style: none;
|
|
177
|
+
margin: 1rem;
|
|
178
|
+
padding: 0;
|
|
179
|
+
}
|
|
180
|
+
ol li,
|
|
181
|
+
ul li {
|
|
182
|
+
margin: 1rem;
|
|
183
|
+
padding: 0;
|
|
184
|
+
}
|
|
185
|
+
ol.mdc-list,
|
|
186
|
+
ul.mdc-list {
|
|
187
|
+
list-style-type: none;
|
|
188
|
+
list-style: none;
|
|
189
|
+
}
|
|
190
|
+
ol.mdc-list li.mdc-list-item,
|
|
191
|
+
ul.mdc-list li.mdc-list-item {
|
|
192
|
+
list-style-type: none;
|
|
193
|
+
list-style: none !important;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.orange-label {
|
|
197
|
+
color: var(--Orange-900-Primary, #db3b03);
|
|
198
|
+
/* Caption 1/Regular */
|
|
199
|
+
font-family: Inter;
|
|
200
|
+
font-size: 12px;
|
|
201
|
+
font-style: normal;
|
|
202
|
+
font-weight: 400;
|
|
203
|
+
line-height: 16px; /* 133.333% */
|
|
204
|
+
letter-spacing: 0.4px;
|
|
205
|
+
margin: 0px 0 -9px 16px;
|
|
206
|
+
z-index: 1 !important;
|
|
207
|
+
position: relative;
|
|
208
|
+
width: fit-content;
|
|
209
|
+
}
|
|
210
|
+
.orange-label.grey-bg {
|
|
211
|
+
background-color: #fefcfb;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
#spinnerLoader {
|
|
215
|
+
position: fixed;
|
|
216
|
+
top: 50%;
|
|
217
|
+
left: 50%;
|
|
218
|
+
transform: translate(-50%, -50%);
|
|
219
|
+
background-color: #fff;
|
|
220
|
+
padding: 20px;
|
|
221
|
+
border-radius: 5px;
|
|
222
|
+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
|
|
223
|
+
display: flex;
|
|
224
|
+
align-items: center;
|
|
225
|
+
justify-content: center;
|
|
226
|
+
z-index: 100;
|
|
227
|
+
pointer-events: none;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
#textfield-Title-label {
|
|
231
|
+
background-color: white;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.mdc-ripple-upgraded .mdc-text-field--outlined .mdc-notched-outline__notch {
|
|
235
|
+
border: 0px solid transparent !important;
|
|
236
|
+
border-bottom: 1px solid #db3b03 !important;
|
|
237
|
+
padding: 0;
|
|
238
|
+
height: 0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.mdc-text-field--focused .mdc-notched-outline__notch {
|
|
242
|
+
border: 0px solid transparent !important;
|
|
243
|
+
border-bottom: 2px solid #db3b03 !important;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch {
|
|
247
|
+
max-width: calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2);
|
|
248
|
+
border-top: transparent;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.generate-btn {
|
|
252
|
+
display: flex;
|
|
253
|
+
height: 48px;
|
|
254
|
+
padding: 12px 24px;
|
|
255
|
+
justify-content: center;
|
|
256
|
+
align-items: center;
|
|
257
|
+
gap: 10px;
|
|
258
|
+
border-radius: 16px;
|
|
259
|
+
}
|
|
260
|
+
.generate-btn.link:hover {
|
|
261
|
+
background-color: var(--Cyan-700-Secondary, #e27046);
|
|
262
|
+
color: var(--Cyan-700-Secondary-Text, #fff);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.bg-green {
|
|
266
|
+
background: var(--Cyan-700-Secondary, #00776b);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
:host {
|
|
270
|
+
display: block;
|
|
271
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class XplorRadioBtn {
|
|
3
|
+
render() {
|
|
4
|
+
return (h(Host, { key: '350aae21c138b87e3dfce7ebdb2d74747d5abc93' }, h("h1", { key: 'f7546bbab5c85aa0ed4d180116200790444f8c5f' }, "I'm a button"), h("slot", { key: '79492d83d93da17775f56c21e2a600cafdea2c44' })));
|
|
5
|
+
}
|
|
6
|
+
static get is() { return "xplor-radio-btn"; }
|
|
7
|
+
static get encapsulation() { return "shadow"; }
|
|
8
|
+
static get originalStyleUrls() {
|
|
9
|
+
return {
|
|
10
|
+
"$": ["xplor-radio-btn.scss"]
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
static get styleUrls() {
|
|
14
|
+
return {
|
|
15
|
+
"$": ["xplor-radio-btn.css"]
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=xplor-radio-btn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xplor-radio-btn.js","sourceRoot":"","sources":["../../../src/components/xplor-radio-btn/xplor-radio-btn.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOnD,MAAM,OAAO,aAAa;IACxB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4EAAqB;YACrB,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'xplor-radio-btn',\n styleUrl: 'xplor-radio-btn.scss',\n shadow: true,\n})\nexport class XplorRadioBtn {\n render() {\n return (\n <Host>\n <h1>I'm a button</h1>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -6,11 +6,11 @@ export class XplorSectionCard {
|
|
|
6
6
|
this.padding = '1.5rem';
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
|
-
return (h(Host, { key: '
|
|
9
|
+
return (h(Host, { key: 'f0bb8af2883a5441f3e325c4267ad3cec5716c9a' }, h("div", { key: 'a7611e3f28ca8d84782146adb2b906c789f4a338', class: {
|
|
10
10
|
'section-card': true,
|
|
11
11
|
'section-card--outlined': this.outlined,
|
|
12
12
|
'section-card--rounded': this.rounded,
|
|
13
|
-
}, style: { padding: this.padding } }, h("slot", { key: '
|
|
13
|
+
}, style: { padding: this.padding } }, h("slot", { key: 'e1a7153c70bf52f1d539dfc4f0b95d571aaa97da', name: "title" }), h("slot", { key: '90d1df5bf54fc04271e0f762a6f6df09f9a5cc32', name: "subtitle" }), h("div", { key: '81c011fa1950cee54769b7940b92722d3dcdd4d5', class: "section-card__body" }, h("slot", { key: '5c8bba79d0900c8db7feb677ff1a6dc379bcad65', name: "body" })), h("div", { key: 'd71137c24f428c4001c06c3038565368423e71cd', class: "section-card__actions" }, h("slot", { key: '06b994a9fb3626a0054b6192b5bb666b89710f54', name: "actions" })))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "xplor-section-card"; }
|
|
16
16
|
static get encapsulation() { return "scoped"; }
|
|
@@ -4,11 +4,11 @@ export class XplorSectionHeading {
|
|
|
4
4
|
this.size = 'medium';
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '6ee4041528bf178feb4b641c6f6f937c28ed2e8e' }, h("span", { key: 'e9758f23fe78a18f5ebf77092225c4d3b2a29965', class: {
|
|
8
8
|
'section-heading': true,
|
|
9
9
|
'section-heading--small': this.size === 'small',
|
|
10
10
|
'section-heading--large': this.size === 'large',
|
|
11
|
-
} }, h("slot", { key: '
|
|
11
|
+
} }, h("slot", { key: 'e0191f9f23da9858ffbb204554fec2c1012d1cd3' }, this.text))));
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "xplor-section-heading"; }
|
|
14
14
|
static get encapsulation() { return "scoped"; }
|