@xplor-education/core-stencil-components 3.0.0 → 3.1.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/components/{p-DxxjL3sU.js → p-B49oUO_9.js} +3 -3
- package/components/{p-DxxjL3sU.js.map → p-B49oUO_9.js.map} +1 -1
- package/components/{p-DURNLP66.js → p-VIJbFoA4.js} +3 -3
- package/components/{p-DURNLP66.js.map → p-VIJbFoA4.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 +3 -3
- 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-send.js +2 -2
- package/components/xplor-input-text-area.js +6 -3
- package/components/xplor-input-text-area.js.map +1 -1
- package/components/xplor-input-text-secondary.js +2 -2
- package/components/xplor-input-text.js +6 -3
- package/components/xplor-input-text.js.map +1 -1
- 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.js +2 -2
- 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/xplor-alert-dialog_58.cjs.entry.js +56 -50
- package/dist/cjs/xplor-alert-dialog_58.cjs.entry.js.map +1 -1
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.css +3 -8
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.js +2 -2
- 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-send/xplor-input-send.js +2 -2
- package/dist/collection/components/xplor-input-text/xplor-input-text.css +41 -13
- package/dist/collection/components/xplor-input-text/xplor-input-text.js +5 -2
- package/dist/collection/components/xplor-input-text/xplor-input-text.js.map +1 -1
- package/dist/collection/components/xplor-input-text-area/xplor-input-text-area.css +39 -13
- package/dist/collection/components/xplor-input-text-area/xplor-input-text-area.js +5 -2
- package/dist/collection/components/xplor-input-text-area/xplor-input-text-area.js.map +1 -1
- 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.js +2 -2
- 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/collection/test-utils/index.js +3 -0
- package/dist/collection/test-utils/index.js.map +1 -0
- package/dist/collection/test-utils/mocks.js +46 -0
- package/dist/collection/test-utils/mocks.js.map +1 -0
- package/dist/collection/test-utils/spec-helpers.js +43 -0
- package/dist/collection/test-utils/spec-helpers.js.map +1 -0
- package/dist/components/{p-Dh0wQJt6.js → p-DQ8MCJFX.js} +3 -3
- package/dist/components/{p-Dh0wQJt6.js.map → p-DQ8MCJFX.js.map} +1 -1
- package/dist/components/{p-oOSnPjGy.js → p-J41B2nOt.js} +3 -3
- package/dist/components/{p-oOSnPjGy.js.map → p-J41B2nOt.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 +3 -3
- 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-send.js +2 -2
- package/dist/components/xplor-input-text-area.js +6 -3
- package/dist/components/xplor-input-text-area.js.map +1 -1
- package/dist/components/xplor-input-text-secondary.js +2 -2
- package/dist/components/xplor-input-text.js +6 -3
- package/dist/components/xplor-input-text.js.map +1 -1
- 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.js +2 -2
- 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/xplor-alert-dialog_58.entry.js +56 -50
- package/dist/esm/xplor-alert-dialog_58.entry.js.map +1 -1
- package/dist/hydrate/index.js +56 -50
- package/dist/hydrate/index.mjs +56 -50
- package/dist/types/test-utils/index.d.ts +2 -0
- package/dist/types/test-utils/mocks.d.ts +16 -0
- package/dist/types/test-utils/spec-helpers.d.ts +26 -0
- package/dist/xplor-component-library/{p-0df9ea5d.entry.js → p-7ecb45dd.entry.js} +2 -2
- package/dist/xplor-component-library/p-7ecb45dd.entry.js.map +1 -0
- package/dist/xplor-component-library/xplor-component-library.esm.js +1 -1
- package/package.json +7 -3
- package/dist/xplor-component-library/p-0df9ea5d.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xplor-input-text-area.js","sourceRoot":"","sources":["../../../src/components/xplor-input-text-area/xplor-input-text-area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAErF,IAAI,sBAAsB,GAAG,CAAC,CAAC;AAO/B,MAAM,OAAO,kBAAkB;IAL/B;QAMU,YAAO,GAAG,yBAAyB,EAAE,sBAAsB,EAAE,CAAC;QAC9D,YAAO,GAAG,GAAG,IAAI,CAAC,OAAO,QAAQ,CAAC;QAClC,aAAQ,GAAG,GAAG,IAAI,CAAC,OAAO,SAAS,CAAC;QAC5C;;WAEG;QACsB,UAAK,GAAW,EAAE,CAAC;QAE5C;;WAEG;QACK,UAAK,GAAW,EAAE,CAAC;QAE3B;;WAEG;QACK,gBAAW,GAAW,EAAE,CAAC;QAEjC;;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,cAAS,GAAY,IAAI,CAAC;QAElC;;WAEG;QACK,SAAI,GAAW,CAAC,CAAC;QAEzB;;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;QAiBzB,cAAS,GAAY,KAAK,CAAC;QAE5B,gBAAW,GAAG,CAAC,KAAY,EAAE,EAAE;YACrC,MAAM,MAAM,GAAG,KAAK,CAAC,MAA6B,CAAC;YACnD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;YAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC,CAAC;QAEM,iBAAY,GAAG,CAAC,KAAY,EAAE,EAAE;YACtC,MAAM,MAAM,GAAG,KAAK,CAAC,MAA6B,CAAC;YACnD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;YAC1B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC,CAAC;QAEM,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;YAChB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"xplor-input-text-area.js","sourceRoot":"","sources":["../../../src/components/xplor-input-text-area/xplor-input-text-area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAErF,IAAI,sBAAsB,GAAG,CAAC,CAAC;AAO/B,MAAM,OAAO,kBAAkB;IAL/B;Q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AAK,EAAC,sCAAsC,EAAC,EAAE,EAAE,IAAI,CAAC,OAAO,IAAG,IAAI,CAAC,KAAK,CAAO;oBACpG,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,UAAU,IAAI,4DAAK,KAAK,EAAC,oCAAoC,EAAC,EAAE,EAAE,IAAI,CAAC,QAAQ,IAAG,IAAI,CAAC,UAAU,CAAO,CACzH,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter, State } from '@stencil/core';\n\nlet inputTextAreaIdCounter = 0;\n\n@Component({\n tag: 'xplor-input-text-area',\n styleUrl: 'xplor-input-text-area.scss',\n scoped: true,\n})\nexport class XplorInputTextArea {\n private inputId = `xplor-input-text-area-${++inputTextAreaIdCounter}`;\n private errorId = `${this.inputId}-error`;\n private helperId = `${this.inputId}-helper`;\n /**\n * Input value\n */\n @Prop({ mutable: true }) value: string = '';\n\n /**\n * Input label\n */\n @Prop() label: string = '';\n\n /**\n * Input placeholder\n */\n @Prop() placeholder: string = '';\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 input is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Whether the input is readonly\n */\n @Prop() readonly: boolean = false;\n\n /**\n * Whether to show clear button\n */\n @Prop() clearable: boolean = true;\n\n /**\n * Number of rows\n */\n @Prop() rows: number = 3;\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 * Input event\n */\n @Event() xplorInput: EventEmitter<string>;\n\n /**\n * Change event\n */\n @Event() xplorChange: EventEmitter<string>;\n\n /**\n * Clear event\n */\n @Event() xplorClear: EventEmitter<void>;\n\n @State() isFocused: boolean = false;\n\n private handleInput = (event: Event) => {\n const target = event.target as HTMLTextAreaElement;\n this.value = target.value;\n this.xplorInput.emit(this.value);\n };\n\n private handleChange = (event: Event) => {\n const target = event.target as HTMLTextAreaElement;\n this.value = target.value;\n this.xplorChange.emit(this.value);\n };\n\n private handleClear = () => {\n this.value = '';\n this.xplorClear.emit();\n this.xplorChange.emit(this.value);\n };\n\n render() {\n const hasValue = this.value != null && this.value !== '';\n const isFloating = this.isFocused || hasValue;\n\n const containerClasses = {\n 'xplor-input-text-area': true,\n 'xplor-input-text-area--focused': this.isFocused,\n 'xplor-input-text-area--floating': isFloating,\n 'xplor-input-text-area--disabled': this.disabled,\n 'xplor-input-text-area--error': !!this.error,\n };\n\n const showClearButton = this.clearable && this.value && !this.readonly && !this.disabled;\n const showDetails = this.hideDetails === false || (this.hideDetails === 'auto' && (this.error || this.helperText));\n\n return (\n <Host>\n <div class={containerClasses}>\n <div class=\"xplor-input-text-area__field\">\n <textarea\n id={this.inputId}\n class=\"xplor-input-text-area__input\"\n value={this.value}\n placeholder={isFloating ? this.placeholder : ''}\n disabled={this.disabled}\n readonly={this.readonly}\n required={this.required}\n rows={this.rows}\n onInput={this.handleInput}\n onChange={this.handleChange}\n onFocus={() => (this.isFocused = true)}\n onBlur={() => (this.isFocused = false)}\n style={{\n backgroundColor: this.bgColor,\n }}\n aria-invalid={this.error ? 'true' : undefined}\n aria-required={this.required ? 'true' : undefined}\n aria-describedby={this.error ? this.errorId : this.helperText ? this.helperId : undefined}\n />\n {this.label && (\n <label\n class=\"xplor-input-text-area__label\"\n htmlFor={this.inputId}\n style={{ backgroundColor: this.bgColor }}\n >\n {this.label}\n {this.required && <span class=\"xplor-input-text-area__required\">*</span>}\n </label>\n )}\n {showClearButton && (\n <button\n type=\"button\"\n class=\"xplor-input-text-area__clear\"\n onClick={this.handleClear}\n aria-label=\"Clear\"\n >\n ✕\n </button>\n )}\n </div>\n\n {showDetails && (\n <div class=\"xplor-input-text-area__details\">\n {this.error && <div class=\"xplor-input-text-area__error-message\" id={this.errorId}>{this.error}</div>}\n {!this.error && this.helperText && <div class=\"xplor-input-text-area__helper-text\" id={this.helperId}>{this.helperText}</div>}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -46,9 +46,9 @@ export class XplorInputTextSecondary {
|
|
|
46
46
|
'input-secondary--dirty': this.isDirty,
|
|
47
47
|
};
|
|
48
48
|
const showDetails = this.hideDetails === false || (this.hideDetails === 'auto' && (this.error || this.helperText));
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '805c82be35d46be51ebc3e29e78345ae81bf1368' }, h("div", { key: 'df8e81a6553efbd0dade36a7d5871e8d1d789213', class: containerClasses }, this.label && (h("label", { key: '289689dbe52f2ae19af90664ae99240eee499d61', class: "input-secondary__label", htmlFor: this.inputId }, this.label, this.required && h("span", { key: '7e711647c5cdc04033f2f774eee8d810835685ae', class: "input-secondary__required" }, "*"))), h("div", { key: '6cab22daaade60aa7e5130afda2f2692c1ae73b1', class: "input-secondary__field" }, h("input", { key: 'eb9cc2994c5f68d15683c4584ac270bcb5c20664', id: this.inputId, 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: {
|
|
50
50
|
backgroundColor: this.bgColor,
|
|
51
|
-
}, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, "aria-describedby": this.error ? this.errorId : this.helperText ? this.helperId : undefined }), h("slot", { key: '
|
|
51
|
+
}, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, "aria-describedby": this.error ? this.errorId : this.helperText ? this.helperId : undefined }), h("slot", { key: 'e51cb67efac2e7037c2a903d78164348ce56998d', name: "append-inner" })), showDetails && (h("div", { key: '5c490ba173da365e8b9393ffee34a4259e9b3dbd', class: "input-secondary__details" }, this.error && h("div", { key: '4415c1feb83542ef0f0202fc48dfb13effc9d4c4', class: "input-secondary__error-message", id: this.errorId }, this.error), !this.error && this.helperText && h("div", { key: 'fb7e6c208fef2ea8139325438c19612538e1d845', class: "input-secondary__helper-text", id: this.helperId }, this.helperText))), h("slot", { key: 'e2479a9561cb0bf63f1115b2fc0b1d768bc705ed', name: "append" }))));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "xplor-input-text-secondary"; }
|
|
54
54
|
static get encapsulation() { return "scoped"; }
|
|
@@ -33,7 +33,7 @@ export class XplorInputTitle {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: 'ef2d69909fe74019c12da557fa136e0389336e05' }, h("input", { key: 'dfdc0a0072ec511a1edfc68a6fad9e4169064f8f', type: "text", class: "xplor-input-title", value: this.value, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, "aria-label": this.ariaLabel, onInput: this.handleInput, onChange: this.handleChange })));
|
|
37
37
|
}
|
|
38
38
|
static get is() { return "xplor-input-title"; }
|
|
39
39
|
static get encapsulation() { return "scoped"; }
|
|
@@ -5,7 +5,7 @@ export class XplorLinks {
|
|
|
5
5
|
this.imageAlt = '';
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: '1d0963855eaf79dacbae5d6a5b86cc6b6ae84632', class: `theme-${this.brand}` }, h("a", { key: 'd95d148b5745909e17a51e7d44e6412956a4844b', class: "x-link", href: "https://google.com" }, ' ', "googole this is a link", ' '), h("div", { key: '05c27ca582f5d298e00a46240700088f3ef1c250', class: "bg-black p-2 rounded-md flex justify-center" }, h("h1", { key: '9f4180eef39b9006277a72534d385ce3b742e40c', class: "text-primary font-sans" }, "This is a Stencil component using Tailwind")), h("div", { key: 'fe5ffb8f988e0df18e53a04873d6dfe63e7ca26e', class: "bg-white py-24 sm:py-32" }, h("div", { key: '09bd7b00cd955c991e662f3f71addac329d4b189', class: "mx-auto grid max-w-7xl gap-20 px-6 lg:px-8 xl:grid-cols-3" }, h("div", { key: '36f6bd91ab4db26df78b21e533c2f584ba656d26', class: "max-w-xl" }, h("h2", { key: '165380866054da7add2a455b15370f4cd8a7ad65', class: "text-pretty text-3xl font-semibold tracking-tight text-gray-900 sm:text-4xl" }, "Meet our leadership"), h("p", { key: '726b4e94c27bafe707c6a48f6604a28cb15d1c47', 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: 'a884c969151b0b935d40e5a98d9418d5a8bcc415', 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: 'c5b4adca7d9a2038462dcd2958b95b5a7c661314' }, h("div", { key: '4a013658a1982d345000bbce12ace33b5e6bd2d8', class: "flex items-center gap-x-6" }, h("img", { key: 'c93cc4184e758ca5d1b9942bbbec8a5afb219732', 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: this.imageAlt }), h("div", { key: 'a05b6b18dbf663af70b0c7840d034973b2cc15df' }, h("h3", { key: '7d6ff8ca21af23e69497e067f346b3b0b61de42c', class: "text-base/7 font-semibold tracking-tight text-gray-900" }, "Leslie Alexander"), h("p", { key: '33528098f6f09a748251f49a8e0b377992f2c4e1', class: "text-sm/6 font-semibold text-indigo-600" }, "Co-Founder / CEO")))))))));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "xplor-links"; }
|
|
11
11
|
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: '884f843600d455676714efef74a7102467cf7fe5' }, h("xplor-modal", { key: 'c3886708722829887adb5213f4eb98470ad16132', open: this.open, width: this.width, maxWidth: this.maxWidth, maxHeight: this.maxHeight, loading: this.loading, persistent: true, onXplorClose: () => this.xplorClose.emit() }, h("slot", { key: '0f6b7f60e3f9354994b00f15ee7056c2b5f4a454', name: "title", slot: "title" }), h("slot", { key: '03a625acfe4a23677d1e532d56b0797c9d0f6457', name: "subtitle", slot: "subtitle" }), h("slot", { key: '57d9c7c4897299b0bb84de291e202d6c00d3914f', name: "body", slot: "body" }), h("slot", { key: '9290ae4fede095d8e11f32396029e59da7212e16', name: "actions", slot: "actions" }))));
|
|
27
27
|
}
|
|
28
28
|
static get is() { return "xplor-modal-persistent"; }
|
|
29
29
|
static get properties() {
|
|
@@ -76,10 +76,10 @@ export class XplorRadioBtn {
|
|
|
76
76
|
return all.filter(radio => radio !== this.el);
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
|
-
return (h("label", { key: '
|
|
79
|
+
return (h("label", { key: '305a0c3d610686e8c11180c15db8d1ce4ca98c60', class: {
|
|
80
80
|
'radio-wrapper': true,
|
|
81
81
|
'radio-wrapper--disabled': this.disabled,
|
|
82
|
-
} }, h("div", { key: '
|
|
82
|
+
} }, h("div", { key: 'ed0dd418bf295430c8cf1edd4b43519b3cf04018', class: this.getRadioClass(), onClick: this.handleClick, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), onMouseDown: () => (this.isPressed = true), onMouseUp: () => (this.isPressed = false), onFocus: () => (this.isFocused = true), onBlur: () => (this.isFocused = false), onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, tabIndex: this.disabled ? -1 : 0, role: "radio", "aria-checked": this.checked.toString(), "aria-disabled": this.disabled.toString(), "aria-label": this.label }, h("div", { key: 'ae6dd96a65601ba50d3e6e919b95983d3e47e8e5', class: { 'radio-inner': true, 'radio-inner--visible': this.checked } })), this.label && (h("span", { key: 'b5647a8ad15d03187ba2f8c670846e9025ffba7e', class: "label" }, this.label))));
|
|
83
83
|
}
|
|
84
84
|
static get is() { return "xplor-radio-btn"; }
|
|
85
85
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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("slot", { key: '75faafcde4f79d7c7df0be49986420f147ccfde5' })), h("div", { key: 'f1f14d4cacef1580309321953d95d6b64825332e', class: "section-card__actions" }, h("slot", { key: '8e0520be390119389ac64f7fddd86c9e81ccd47c', name: "actions" })))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "xplor-section-card"; }
|
|
16
16
|
static get encapsulation() { return "scoped"; }
|
|
@@ -9,11 +9,11 @@ export class XplorSectionHeading {
|
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
11
|
const HeadingTag = `h${this.level}`;
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: '8d792fa1f7111c3de496e616c6c0d59a9f3bff0d' }, h(HeadingTag, { key: '56cc9b857b645d2b6de1d9b736b77c47011bc0aa', class: {
|
|
13
13
|
'section-heading': true,
|
|
14
14
|
'section-heading--small': this.size === 'small',
|
|
15
15
|
'section-heading--large': this.size === 'large',
|
|
16
|
-
} }, h("slot", { key: '
|
|
16
|
+
} }, h("slot", { key: 'c5820f563cbb67872c43018493553d9f1fe703f3' }, this.text))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "xplor-section-heading"; }
|
|
19
19
|
static get encapsulation() { return "scoped"; }
|
|
@@ -180,11 +180,11 @@ export class XplorTable {
|
|
|
180
180
|
if (this.hasScrolled)
|
|
181
181
|
className += ' xpl-table--has-scrolled';
|
|
182
182
|
const paginatedData = this.getPaginatedData();
|
|
183
|
-
return (h(Host, { key: '
|
|
183
|
+
return (h(Host, { key: '34a091e309fac05f19d2e895d6eaf9bcd6bd52b2', class: "xplor-table" }, h("div", { key: '63f1baa12c4a579a94e88b6afa955cedc55ebcbc', class: "bg-white rounded-lg shadow-sm border border-gray-200 p-6 max-w-6xl mx-auto" }, h("div", { key: 'a51f74e5a00e6286dc69d1cf63cbedbc52cf2323', class: "xpl-table-container", onScroll: this.onScroll, ref: (el) => {
|
|
184
184
|
this.container = el;
|
|
185
|
-
} }, h("div", { key: '
|
|
185
|
+
} }, h("div", { key: 'dd162973f151d437264803738951403fd118a325', class: "mb-6" }, h("h1", { key: 'cd20f65851fe73c7e22eca544c19460d1e8cfa41', class: "text-xl font-semibold text-gray-900 mb-4" }, "Head Counts Report"), h("div", { key: '4ccbb826c4d36a04d7abb229cb30b33b721302aa', class: "flex flex-wrap items-center gap-4 mb-6" }, h("div", { key: '2ec4358cab245173935bfd10750d426a95327649', class: "flex items-center gap-2" }, h("label", { key: '8a42d1fc73b38675efbb4d489ef52f490d355155', class: "text-sm text-gray-600 font-medium" }, "Date Range"), h("select", { key: 'bf158ae8de2d8350cb4a17882e876374f56d1191', class: "border border-gray-300 rounded px-3 py-1.5 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-teal-500 focus:border-teal-500",
|
|
186
186
|
// value={this.selectedDateRange}
|
|
187
|
-
onInput: this.handleDateRangeChange }, h("option", { key: '
|
|
187
|
+
onInput: this.handleDateRangeChange }, h("option", { key: '8d30107e14b3ae11283eab5c0dc5bb5e1625f206', value: "All" }, "All"), h("option", { key: 'e6ff573c014679027844de6fa074987c2af2747b', value: "Today" }, "Today"), h("option", { key: 'b2442d598fd4901bee4864d5eafb73fc36defed6', value: "This Week" }, "This Week"), h("option", { key: 'b8d65f2882d81ba062e005c19d8969df2ddf541b', value: "This Month" }, "This Month"), h("option", { key: 'e64697e70ba6daa1cedb3d4b35318cd473ad55ff', value: "Custom" }, "Custom Range")), h("button", { key: '5aca4cd7f522efa1fb6669a281c2f124a5f3c08a', class: "p-1.5 border border-gray-300 rounded hover:bg-gray-50" }, h("svg", { key: 'c64b7b245059c5c93abb2f8d1fba598d59d2697e', class: "w-4 h-4 text-gray-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, h("path", { key: 'd7f81604c3df7684dd33105f369ece2f25002426', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" })))), h("button", { key: '77e48fda9b868095074045507842dcb32a7ac3fb', onClick: this.handleFilterReports, class: "bg-teal-600 hover:bg-teal-700 text-white px-4 py-1.5 rounded text-sm font-medium transition-colors" }, "Filter Reports"), h("button", { key: '7f7a214ecb2e66828438dce866e134fe75910ebb', onClick: this.handleDownloadAll, class: "flex items-center gap-2 text-gray-600 hover:text-gray-800 text-sm" }, h("svg", { key: 'af830e634d4115487fb3e5ebc4ab085a864990ff', class: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, h("path", { key: '396c756b2fbe057f019872573f0fb44a6ef882f2', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" })), "Download All"))), h("table", { key: '984119ef9ca031d2cf21f40f888653e508157176', class: `w-full ${className}` }, this.columns && (h("thead", { key: 'a3ffca2c981bfbc8323d537507c2b416f4f39306' }, this.columns.map((column, i) => {
|
|
188
188
|
const iconType = getIconType(this.sortTypeArray[i]);
|
|
189
189
|
const isColumnSortable = !!(this.isSortable &&
|
|
190
190
|
this.sortableColumns[i]);
|
|
@@ -222,11 +222,11 @@ export class XplorTable {
|
|
|
222
222
|
// id="__xpl-icon-sort"
|
|
223
223
|
// ></xpl-icon>
|
|
224
224
|
)))));
|
|
225
|
-
}))), h("tbody", { key: '
|
|
225
|
+
}))), h("tbody", { key: 'b1794bf469839753599bca48a72153c8f53544e6' }, paginatedData.map((row, rowNum) => (h("tr", { class: `border-b border-gray-100 hover:bg-gray-50` }, row.map((cell, i) => (h("td", { class: "py-3 px-4 text-sm text-gray-900" }, this.multiselect && i === 0 ? (h("label", { class: "flex items-center gap-2", htmlFor: `__xpl-table-row-${rowNum}` }, h("input", { id: `__xpl-table-row-${rowNum}`, checked: !!this.selected[rowNum], type: "checkbox", onChange: (e) => this.selectOne(e, rowNum), value: this.selectedValues
|
|
226
226
|
.length > 0
|
|
227
227
|
? this
|
|
228
228
|
.selectedValues[rowNum]
|
|
229
|
-
: `xpl-table-checkbox-${rowNum}` }), h("div", { innerHTML: cell }))) : (h("div", { innerHTML: cell })))))))))), h("div", { key: '
|
|
229
|
+
: `xpl-table-checkbox-${rowNum}` }), h("div", { innerHTML: cell }))) : (h("div", { innerHTML: cell })))))))))), h("div", { key: '130cceed1d88934092f1a3a92a67d984b8bd465b', id: "pagination", class: "w-full flex items-center justify-between mt-6 text-sm" }, h("div", { key: '616ce36b0aa536f161eb9aa30b41acb18153208b', class: "flex items-center gap-2" }, h("button", { key: '10977dacc1cf364504c1cff031beb62a423f48be', onClick: () => this.handlePagination('first'), class: "p-1.5 text-gray-400 hover:text-gray-600 disabled:opacity-50", disabled: this.currentPage === 1 }, h("svg", { key: '3e7fe6e2411178be935d7c210eb5c6cf081a2d54', class: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, h("path", { key: '167a9ccaac38d293a86ff3983e5d0d6a222c91b4', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M11 19l-7-7 7-7m8 14l-7-7 7-7" }))), h("button", { key: '9ee908d6b52468a365c7173e3e3367b7b1945061', onClick: () => this.handlePagination('prev'), class: "p-1.5 text-gray-400 hover:text-gray-600 disabled:opacity-50", disabled: this.currentPage === 1 }, h("svg", { key: '286915694ecc0b480bf25e15baf3eb6423b68919', class: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, h("path", { key: 'f6983747c83e973f777bcadb9045c53da5d10674', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M15 19l-7-7 7-7" })))), h("span", { key: '1c619cd20140f8d73d461b4f2b661116b0059353', class: "text-gray-600" }, "Page ", this.currentPage, " of ", this.totalPages), h("div", { key: '1201039d99ac6d48f1075b36a602333dfe6d54e5', class: "flex items-center gap-2" }, h("button", { key: '828195335b1064d85f625f476b63da21ff37af71', onClick: () => this.handlePagination('next'), class: "p-1.5 text-gray-400 hover:text-gray-600 disabled:opacity-50", disabled: this.currentPage === this.totalPages }, h("svg", { key: '7c2770e6e31871e8ded8b3831695f1f39bd5b7ec', class: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, h("path", { key: '2f260f911a89596b76826930f2d4c5f25aab180a', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M9 5l7 7-7 7" }))), h("button", { key: 'aed318f01b51e8f78ab7b2d10543b00154970b0e', onClick: () => this.handlePagination('last'), class: "p-1.5 text-gray-400 hover:text-gray-600 disabled:opacity-50", disabled: this.currentPage === this.totalPages }, h("svg", { key: '70e04a5ce5106d5c1b3c3f653d156608c03dc0f8', class: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, h("path", { key: '25d7d949b2aa75ce8d268d8a472becd75b9eb3cb', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M13 5l7 7-7 7M5 5l7 7-7 7" })))))))));
|
|
230
230
|
}
|
|
231
231
|
static get is() { return "xplor-table"; }
|
|
232
232
|
static get encapsulation() { return "shadow"; }
|
|
@@ -4,11 +4,11 @@ export class XplorTextBubble {
|
|
|
4
4
|
this.color = 'orange';
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '935620a5fe11efe0b04bb35b1f2a61782f628fef' }, h("div", { key: '54efffa810a98239e535863a74bbcaa13dddb01e', class: {
|
|
8
8
|
'text-bubble': true,
|
|
9
9
|
'text-bubble--green': this.color === 'green',
|
|
10
10
|
'text-bubble--orange': this.color === 'orange',
|
|
11
|
-
} }, h("slot", { key: '
|
|
11
|
+
} }, h("slot", { key: 'c44912756dc8798305a68fa9ef2496610e0b73dd' }))));
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "xplor-text-bubble"; }
|
|
14
14
|
static get encapsulation() { return "scoped"; }
|
|
@@ -124,10 +124,10 @@ export class XplorTextField {
|
|
|
124
124
|
}
|
|
125
125
|
render() {
|
|
126
126
|
const labelFloating = this.isFocused || this.hasValue;
|
|
127
|
-
return (h(Host, { key: '
|
|
127
|
+
return (h(Host, { key: '7f96fd0fd49e24f55f29c839ce949ed4852ccd09' }, h("div", { key: 'a92aff2394b383f4e2189d239928b09e83df69c9', class: this.computedClasses }, h("div", { key: '80a9df3c874ba25b6d9072b01f113bd3615291de', class: "xplor-text-field__wrapper", style: { backgroundColor: this.bgColor } }, h("div", { key: '42de5abcd54384fd509d9788eb9534a1de2cc65a', class: "xplor-text-field__input-wrapper" }, this.label && (h("label", { key: '4668b75b97b1e95c3817924bd8d3a9c1355ba7ab', class: {
|
|
128
128
|
'xplor-text-field__label': true,
|
|
129
129
|
'xplor-text-field__label--floating': labelFloating,
|
|
130
|
-
} }, h("slot", { key: '
|
|
130
|
+
} }, h("slot", { key: 'c6f596aa30b8d263072a43f133bd2f049c22ed36', name: "label" }, this.label), this.required && h("span", { key: '4efc5c1726c5e0841502bb85726eb638391c60d1', class: "xplor-text-field__required" }, "*"))), h("input", { key: '2f226f284910e76ecc23e6cc3416c32782678a73', ref: (el) => (this.inputElement = el), class: "xplor-text-field__input", type: this.type, value: this.value, placeholder: this.isFocused ? this.placeholder : '', disabled: this.disabled, readonly: this.readonly, required: this.required, maxlength: this.maxlength, min: this.min, max: this.max, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, "aria-invalid": this.hasError ? 'true' : 'false', "aria-describedby": this.hasError ? 'error-messages' : undefined }), h("div", { key: '6068500f640c4144b8bbf1dcaaf8b216de9281c1', class: "xplor-text-field__append-inner" }, this.clearable && this.hasValue && !this.disabled && !this.readonly && (h("button", { key: '94eedd8a810932066690bf5dc6613d54dc7377e6', type: "button", class: "xplor-text-field__clear-btn", onClick: this.handleClear, "aria-label": "Clear" }, h("svg", { key: 'c325d1129f9987992183ffd1ce7e585e70fb3db3', width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor" }, h("path", { key: '02845166093ed8edc7670149cedb4e042d8626f4', d: "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" })))), h("slot", { key: 'af66e74670e30d12a5dc2f94bce768fc32a9716a', name: "append-inner" })), h("fieldset", { key: '3c4b60c284876a8c198d9a332db6fca5e9d91c81', class: "xplor-text-field__outline" }, h("legend", { key: '9d97a8b65d1787f5e8f4d0a4892fb9c85f839553', class: { 'xplor-text-field__outline-legend': true, 'xplor-text-field__outline-legend--floating': labelFloating } }, labelFloating && this.label ? h("span", null, this.label, this.required && '*') : h("span", null, "\u200B")))), h("div", { key: '53440d0311b2147598fa1dbf241629d7ec401d82', class: "xplor-text-field__append" }, h("slot", { key: '71caef9c6e34db94282fcb36ee341477c7523023', name: "append" }))), this.showDetails && (h("div", { key: '2b468deb8dabcd038e7728512cf68702cfad7d02', class: "xplor-text-field__details" }, this.hasError && (h("div", { key: '103e96cac4c46e52bbb5700fc9c64fc3ef7dc114', id: "error-messages", class: "xplor-text-field__error-messages" }, this.errorMessages.map((error) => (h("div", { class: "xplor-text-field__error" }, error))))))))));
|
|
131
131
|
}
|
|
132
132
|
static get is() { return "xplor-text-field"; }
|
|
133
133
|
static get encapsulation() { return "scoped"; }
|
|
@@ -282,16 +282,16 @@ export class XplorTimePicker {
|
|
|
282
282
|
}
|
|
283
283
|
render() {
|
|
284
284
|
const showDetails = this.hideDetails === false || (this.hideDetails === 'auto' && this.error);
|
|
285
|
-
const clockIcon = (h("svg", { key: '
|
|
286
|
-
return (h(Host, { key: '
|
|
285
|
+
const clockIcon = (h("svg", { key: '17e815e14889cbd5a7b8d9f2fc7a119c38978245', class: "time-picker__icon-svg", viewBox: "0 0 24 24", width: "20", height: "20", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("circle", { key: 'f2dd15cf2d0e2dd5e83665b268729ad42bd2f691', cx: "12", cy: "12", r: "10" }), h("polyline", { key: '1a75a6347d834e0709e4dd44ad0afd32520615ff', points: "12 6 12 12 16 14" })));
|
|
286
|
+
return (h(Host, { key: '0b7f26197f0e8a6b6b26aa07f623cc4a64ba0ea4' }, h("div", { key: 'f6e15abeed537c65f0e690d44cd8ce8412426a23', class: {
|
|
287
287
|
'time-picker': true,
|
|
288
288
|
'time-picker--disabled': this.disabled,
|
|
289
289
|
'time-picker--error': !!this.error,
|
|
290
290
|
'time-picker--open': this.isOpen,
|
|
291
|
-
} }, this.label && (h("label", { key: '
|
|
292
|
-
h("div", { key: '
|
|
293
|
-
h("div", { key: '
|
|
294
|
-
], h("div", { key: '
|
|
291
|
+
} }, this.label && (h("label", { key: '3a824d847af9373e93bb72026fddaa899633462f', class: "time-picker__label" }, this.label, this.required && h("span", { key: '70a02a316b6a610178d0d67912d285585f778d35', class: "time-picker__required" }, "*"))), h("div", { key: '99f32b42a52ab84ad9399b5eebd4fc3dd52c03c7', class: "time-picker__field" }, h("input", { key: '48ad49c0173ebfebdb2cf328cd8658df40824068', type: "text", class: "time-picker__input", value: this.inputText, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onInput: this.handleInputChange, style: { backgroundColor: this.bgColor } }), h("div", { key: '375560c783c400b52bcf96ac3b14ac285ab26b40', class: "time-picker__actions" }, this.clearable && this.value && !this.disabled && !this.readonly && (h("button", { key: '0716d483500bd91e0ae289568b6e22d80e667cd5', type: "button", class: "time-picker__clear", onClick: this.handleClear, "aria-label": "Clear" }, "\u00D7")), h("button", { key: '118766793e1c508c0acccc1b9a3ea486c4e2d1dc', type: "button", class: "time-picker__icon-btn", onClick: this.toggleDropdown, disabled: this.disabled, "aria-label": "Open time picker" }, clockIcon))), showDetails && (h("div", { key: 'b758cd4077af9f46c95ae9aee64cca1610cc6246', class: "time-picker__details" }, this.error && h("div", { key: '37f5fe76dbb2c39147202e549ed24ceaf74da530', class: "time-picker__error-message" }, this.error))), this.isOpen && (h("div", { key: 'cad94d2b88058f488951c437e6a1c77601f7fc2e', class: "time-picker__dropdown" }, h("div", { key: '1a2a60fc179eeacaf4891a8e99cbb7d0a871686c', class: "time-picker__columns" }, h("div", { key: 'e9b84703525a010884064c1b7a61f5db726b7dff', class: "time-picker__column" }, h("button", { key: '155f2c76f63b8ad0be071456fc1ac8ed36c28912', type: "button", class: "time-picker__spinner-btn", onClick: this.incrementHours, "aria-label": "Increase hours" }, this.renderChevronUp()), h("div", { key: '6f49e3b3ebed597ef27b61e0144bf65f288620a8', class: "time-picker__value" }, String(this.hours).padStart(2, '0')), h("button", { key: '7d14a1f6dd7ab392a76d936e054ca3c308da7666', type: "button", class: "time-picker__spinner-btn", onClick: this.decrementHours, "aria-label": "Decrease hours" }, this.renderChevronDown())), h("div", { key: '9244f886b97f2ae29e71ada6070b75bcec71e22b', class: "time-picker__separator" }, ":"), h("div", { key: '34a8f59c8fa8486c947e0d6079b6df773a86f187', class: "time-picker__column" }, h("button", { key: 'f996fa4638ae84bbcd3bce34c0c40669021a0e61', type: "button", class: "time-picker__spinner-btn", onClick: this.incrementMinutes, "aria-label": "Increase minutes" }, this.renderChevronUp()), h("div", { key: '161581c941572a3d0390b0efdbbf6c24e0ca4830', class: "time-picker__value" }, String(this.minutes).padStart(2, '0')), h("button", { key: '9fa3ee821b78caf94b388b335980ab7cc28110a5', type: "button", class: "time-picker__spinner-btn", onClick: this.decrementMinutes, "aria-label": "Decrease minutes" }, this.renderChevronDown())), this.showSeconds && [
|
|
292
|
+
h("div", { key: '4362983fe6d9ce187354b5423ff352ac13ee8917', class: "time-picker__separator" }, ":"),
|
|
293
|
+
h("div", { key: '8dda8c23ab9774bd946136054c537dd0adb8e45b', class: "time-picker__column" }, h("button", { key: '40338612d17dc3a8cf323e6c29942cb0cc0233c7', type: "button", class: "time-picker__spinner-btn", onClick: this.incrementSeconds, "aria-label": "Increase seconds" }, this.renderChevronUp()), h("div", { key: 'ff2d19c8f91070d5b53264266ff6541924613c38', class: "time-picker__value" }, String(this.seconds).padStart(2, '0')), h("button", { key: '985894586447b8e62c4c7c4075cfae8f8cc2eacf', type: "button", class: "time-picker__spinner-btn", onClick: this.decrementSeconds, "aria-label": "Decrease seconds" }, this.renderChevronDown()))
|
|
294
|
+
], h("div", { key: '22ea57820f5e2fb0beea1f2302efc009daf9b687', class: "time-picker__column time-picker__column--period" }, h("button", { key: '2d9bd33e505e980debd0fc692ddf072b3bb3eacd', type: "button", class: "time-picker__spinner-btn", onClick: this.togglePeriod, "aria-label": "Toggle AM/PM" }, this.renderChevronUp()), h("div", { key: 'd7540347cfa54e16f25e506701d1f1ff03452537', class: "time-picker__value time-picker__value--period" }, this.period), h("button", { key: '31b927a17b3be2749ac62968539fb7873bcd2f0e', type: "button", class: "time-picker__spinner-btn", onClick: this.togglePeriod, "aria-label": "Toggle AM/PM" }, this.renderChevronDown()))))))));
|
|
295
295
|
}
|
|
296
296
|
static get is() { return "xplor-time-picker"; }
|
|
297
297
|
static get encapsulation() { return "scoped"; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/test-utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,SAAS,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC","sourcesContent":["export { renderComponent, triggerEvent, triggerKeyboard, typeIntoInput, eventSpy } from './spec-helpers';\nexport { createMockFile, mockBoundingClientRect, mockFetch, mockRequestAnimationFrame } from './mocks';\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a mock File object for testing file upload components.
|
|
3
|
+
*/
|
|
4
|
+
export function createMockFile(name = 'test.txt', size = 1024, type = 'text/plain', lastModified) {
|
|
5
|
+
const content = new Array(size).fill('a').join('');
|
|
6
|
+
const file = new File([content], name, { type, lastModified: lastModified !== null && lastModified !== void 0 ? lastModified : Date.now() });
|
|
7
|
+
return file;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Mocks getBoundingClientRect for positioning tests (tooltip, picker, dropdown).
|
|
11
|
+
*/
|
|
12
|
+
export function mockBoundingClientRect(el, rect = {}) {
|
|
13
|
+
const defaultRect = {
|
|
14
|
+
top: 100,
|
|
15
|
+
left: 100,
|
|
16
|
+
bottom: 200,
|
|
17
|
+
right: 300,
|
|
18
|
+
width: 200,
|
|
19
|
+
height: 100,
|
|
20
|
+
x: 100,
|
|
21
|
+
y: 100,
|
|
22
|
+
toJSON: () => ({}),
|
|
23
|
+
};
|
|
24
|
+
jest.spyOn(el, 'getBoundingClientRect').mockReturnValue(Object.assign(Object.assign({}, defaultRect), rect));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Mocks global fetch for API-calling components like xplor-assistant.
|
|
28
|
+
*/
|
|
29
|
+
export function mockFetch(response, ok = true) {
|
|
30
|
+
return jest.spyOn(global, 'fetch').mockResolvedValue({
|
|
31
|
+
ok,
|
|
32
|
+
status: ok ? 200 : 500,
|
|
33
|
+
json: () => Promise.resolve(response),
|
|
34
|
+
text: () => Promise.resolve(JSON.stringify(response)),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Mocks requestAnimationFrame for JSDOM environments.
|
|
39
|
+
*/
|
|
40
|
+
export function mockRequestAnimationFrame() {
|
|
41
|
+
global.requestAnimationFrame = ((cb) => {
|
|
42
|
+
cb(0);
|
|
43
|
+
return 0;
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=mocks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mocks.js","sourceRoot":"","sources":["../../src/test-utils/mocks.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAe,UAAU,EACzB,OAAe,IAAI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AAC,QAAQ,CAAC,CAAC;KAC1C,CAAC,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB;IACvC,MAAM,CAAC,qBAAqB,GAAG,CAAC,CAAC,EAAwB,EAAE,EAAE;QAC3D,EAAE,CAAC,CAAC,CAAC,CAAC;QACN,OAAO,CAAC,CAAC;IACX,CAAC,CAAQ,CAAC;AACZ,CAAC","sourcesContent":["/**\n * Creates a mock File object for testing file upload components.\n */\nexport function createMockFile(\n name: string = 'test.txt',\n size: number = 1024,\n type: string = 'text/plain',\n lastModified?: number\n): File {\n const content = new Array(size).fill('a').join('');\n const file = new File([content], name, { type, lastModified: lastModified ?? Date.now() });\n return file;\n}\n\n/**\n * Mocks getBoundingClientRect for positioning tests (tooltip, picker, dropdown).\n */\nexport function mockBoundingClientRect(\n el: Element,\n rect: Partial<DOMRect> = {}\n): void {\n const defaultRect: DOMRect = {\n top: 100,\n left: 100,\n bottom: 200,\n right: 300,\n width: 200,\n height: 100,\n x: 100,\n y: 100,\n toJSON: () => ({}),\n };\n jest.spyOn(el, 'getBoundingClientRect').mockReturnValue({ ...defaultRect, ...rect } as DOMRect);\n}\n\n/**\n * Mocks global fetch for API-calling components like xplor-assistant.\n */\nexport function mockFetch(response: any, ok: boolean = true): jest.SpyInstance {\n return jest.spyOn(global, 'fetch').mockResolvedValue({\n ok,\n status: ok ? 200 : 500,\n json: () => Promise.resolve(response),\n text: () => Promise.resolve(JSON.stringify(response)),\n } as Response);\n}\n\n/**\n * Mocks requestAnimationFrame for JSDOM environments.\n */\nexport function mockRequestAnimationFrame(): void {\n global.requestAnimationFrame = ((cb: FrameRequestCallback) => {\n cb(0);\n return 0;\n }) as any;\n}\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
/**
|
|
3
|
+
* Wraps newSpecPage to reduce boilerplate. Renders a single component with the given HTML.
|
|
4
|
+
*/
|
|
5
|
+
export async function renderComponent(opts) {
|
|
6
|
+
return newSpecPage({
|
|
7
|
+
components: opts.components,
|
|
8
|
+
html: opts.html,
|
|
9
|
+
autoApplyChanges: opts.autoApplyChanges,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Dispatches a DOM event on the given element and waits for Stencil to process changes.
|
|
14
|
+
*/
|
|
15
|
+
export async function triggerEvent(page, el, eventName, eventInit) {
|
|
16
|
+
el.dispatchEvent(new Event(eventName, Object.assign({ bubbles: true, cancelable: true }, eventInit)));
|
|
17
|
+
await page.waitForChanges();
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Dispatches a keyboard event on the given element and waits for changes.
|
|
21
|
+
*/
|
|
22
|
+
export async function triggerKeyboard(page, el, eventName, key, options) {
|
|
23
|
+
el.dispatchEvent(new KeyboardEvent(eventName, Object.assign({ key, bubbles: true, cancelable: true }, options)));
|
|
24
|
+
await page.waitForChanges();
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Simulates typing into an input element by setting its value and dispatching an input event.
|
|
28
|
+
*/
|
|
29
|
+
export async function typeIntoInput(page, input, value) {
|
|
30
|
+
input.value = value;
|
|
31
|
+
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
32
|
+
await page.waitForChanges();
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Attaches a Jest spy to capture events emitted by a Stencil component.
|
|
36
|
+
* Returns the spy which can be used to check calls.
|
|
37
|
+
*/
|
|
38
|
+
export function eventSpy(el, eventName) {
|
|
39
|
+
const spy = jest.fn();
|
|
40
|
+
el.addEventListener(eventName, spy);
|
|
41
|
+
return spy;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=spec-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-helpers.js","sourceRoot":"","sources":["../../src/test-utils/spec-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAY,MAAM,uB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AE,CAAC;IACtB,EAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IACpC,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { newSpecPage, SpecPage } from '@stencil/core/testing';\n\n/**\n * Wraps newSpecPage to reduce boilerplate. Renders a single component with the given HTML.\n */\nexport async function renderComponent(opts: {\n components: any[];\n html: string;\n autoApplyChanges?: boolean;\n}): Promise<SpecPage> {\n return newSpecPage({\n components: opts.components,\n html: opts.html,\n autoApplyChanges: opts.autoApplyChanges,\n });\n}\n\n/**\n * Dispatches a DOM event on the given element and waits for Stencil to process changes.\n */\nexport async function triggerEvent(\n page: SpecPage,\n el: Element,\n eventName: string,\n eventInit?: EventInit\n): Promise<void> {\n el.dispatchEvent(new Event(eventName, { bubbles: true, cancelable: true, ...eventInit }));\n await page.waitForChanges();\n}\n\n/**\n * Dispatches a keyboard event on the given element and waits for changes.\n */\nexport async function triggerKeyboard(\n page: SpecPage,\n el: Element,\n eventName: 'keydown' | 'keyup' | 'keypress',\n key: string,\n options?: Partial<KeyboardEventInit>\n): Promise<void> {\n el.dispatchEvent(new KeyboardEvent(eventName, { key, bubbles: true, cancelable: true, ...options }));\n await page.waitForChanges();\n}\n\n/**\n * Simulates typing into an input element by setting its value and dispatching an input event.\n */\nexport async function typeIntoInput(\n page: SpecPage,\n input: HTMLInputElement | HTMLTextAreaElement,\n value: string\n): Promise<void> {\n input.value = value;\n input.dispatchEvent(new Event('input', { bubbles: true }));\n await page.waitForChanges();\n}\n\n/**\n * Attaches a Jest spy to capture events emitted by a Stencil component.\n * Returns the spy which can be used to check calls.\n */\nexport function eventSpy(el: Element, eventName: string): jest.Mock {\n const spy = jest.fn();\n el.addEventListener(eventName, spy);\n return spy;\n}\n"]}
|
|
@@ -213,7 +213,7 @@ const XplorInlineDatePicker = /*@__PURE__*/ proxyCustomElement(class XplorInline
|
|
|
213
213
|
render() {
|
|
214
214
|
const sidebarDate = this.getSidebarDate();
|
|
215
215
|
const dayHeaders = this.startWeekOnSunday ? this.dayNames : this.dayNamesStartMonday;
|
|
216
|
-
return (h(Host, { key: '
|
|
216
|
+
return (h(Host, { key: '031460c16f831f29173bbac372ee4de5b0473828' }, h("div", { key: 'b0d890fec94358a882d10a30b229196ee8fc4ea5', class: "xplor-inline-date-picker", style: { '--picker-color': this.color } }, h("div", { key: '2d5496299d0091d1960fb8507726f15828d68313', class: "xplor-inline-date-picker__sidebar" }, h("div", { key: 'b1645b35975a52e916eb6d18ccda16c3b90519c3', class: "xplor-inline-date-picker__sidebar-year" }, sidebarDate.year), h("div", { key: 'b812bbbd4686d06d6c4c602846c870777847c9ca', class: "xplor-inline-date-picker__sidebar-day" }, sidebarDate.day, ","), h("div", { key: 'd78744d1b353ddafa302693ac105837f33be736e', class: "xplor-inline-date-picker__sidebar-date" }, sidebarDate.date)), h("div", { key: '1e0519719bff8801a3f6a7d23c8140b4017656d8', class: "xplor-inline-date-picker__calendar" }, h("div", { key: '1f13bb35c2bbbc921f6f4d0a4dde12e47d010c81', class: "xplor-inline-date-picker__header" }, h("button", { key: 'dd726c543dc74ed85bb3dd128b45e5a74ffde1f6', type: "button", class: "xplor-inline-date-picker__arrow", onClick: this.previousMonth, "aria-label": "Previous month" }, "\u2039"), h("div", { key: 'ffb6cf26f1b1a0ef2c75ccb827f38110a6cfbdbe', class: "xplor-inline-date-picker__title" }, this.monthNames[this.currentMonth], " ", this.currentYear), h("button", { key: '69b0c08aae5b24b2814c37be40de942ed2ff8abb', type: "button", class: "xplor-inline-date-picker__arrow", onClick: this.nextMonth, "aria-label": "Next month" }, "\u203A")), h("div", { key: '25ef6b996fdccc121b44f6dafe018aef316ab09d', class: "xplor-inline-date-picker__weekdays" }, dayHeaders.map((day) => (h("div", { class: "xplor-inline-date-picker__weekday" }, day)))), h("div", { key: '6d092079f76ab7c06fcdb07c8d43d0cd9ace8faa', class: "xplor-inline-date-picker__days", role: "grid" }, this.renderCalendarDays())))));
|
|
217
217
|
}
|
|
218
218
|
get el() { return this; }
|
|
219
219
|
static get style() { return xplorInlineDatePickerCss; }
|
|
@@ -245,6 +245,6 @@ function defineCustomElement() {
|
|
|
245
245
|
defineCustomElement();
|
|
246
246
|
|
|
247
247
|
export { XplorInlineDatePicker as X, defineCustomElement as d };
|
|
248
|
-
//# sourceMappingURL=p-
|
|
248
|
+
//# sourceMappingURL=p-DQ8MCJFX.js.map
|
|
249
249
|
|
|
250
|
-
//# sourceMappingURL=p-
|
|
250
|
+
//# sourceMappingURL=p-DQ8MCJFX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-Dh0wQJt6.js","mappings":";;AAAA,MAAM,wBAAwB,GAAG,i8VAAi8V;;MCOr9V,qBAAqB,iBAAAA,kBAAA,CAAA,MAAA,qBAAA,SAAAC,CAAA,CAAA;AALlC,IAAA,WAAA,GAAA;;;;;AAOE;;AAEG;AACsB,QAAA,IAAY,CAAA,YAAA,GAAW,EAAE;AAElD;;AAEG;AACK,QAAA,IAAG,CAAA,GAAA,GAAW,EAAE;AAExB;;AAEG;AACK,QAAA,IAAG,CAAA,GAAA,GAAW,EAAE;AAExB;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAEjC;;AAEG;AACK,QAAA,IAAK,CAAA,KAAA,GAAW,SAAS;AAEjC;;AAEG;AACK,QAAA,IAAiB,CAAA,iBAAA,GAAY,IAAI;AAehC,QAAA,IAAU,CAAA,UAAA,GAAW,CAAC;AAEvB,QAAA,IAAU,CAAA,UAAA,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC;AACvI,QAAA,IAAA,CAAA,QAAQ,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;AAC5D,Q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/components/xplor-inline-date-picker/xplor-inline-date-picker.scss?tag=xplor-inline-date-picker&encapsulation=scoped","src/components/xplor-inline-date-picker/xplor-inline-date-picker.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.xplor-inline-date-picker {\n --picker-color: #008480;\n display: flex;\n border-radius: 1rem;\n background-color: white;\n box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),\n 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12);\n overflow: hidden;\n\n &__sidebar {\n background-color: var(--picker-color);\n color: white;\n padding: 1rem;\n min-width: 180px;\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n }\n\n &__sidebar-year {\n font-size: 0.875rem;\n font-weight: 700;\n }\n\n &__sidebar-day {\n font-size: 1.75rem;\n font-weight: 700;\n }\n\n &__sidebar-date {\n font-size: 1.75rem;\n font-weight: 700;\n }\n\n &__calendar {\n display: flex;\n flex-direction: column;\n width: 320px;\n padding: 1rem;\n }\n\n &__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem;\n padding: 0.5rem 0;\n }\n\n &__title {\n font-size: 1rem;\n font-weight: 700;\n color: rgba(0, 0, 0, 0.87);\n }\n\n &__arrow {\n width: 2rem;\n height: 2rem;\n border: none;\n background: transparent;\n font-size: 1.5rem;\n color: rgba(0, 0, 0, 0.54);\n cursor: pointer;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: rgba(0, 0, 0, 0.04);\n }\n\n &:active {\n background-color: rgba(0, 0, 0, 0.08);\n }\n }\n\n &__weekdays {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0.25rem;\n margin-bottom: 0.5rem;\n }\n\n &__weekday {\n text-align: center;\n font-size: 0.75rem;\n font-weight: 700;\n color: rgba(0, 0, 0, 0.6);\n padding: 0.5rem 0;\n }\n\n &__days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0.25rem;\n }\n\n &__day {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 0.875rem;\n font-weight: 500;\n border-radius: 50%;\n cursor: pointer;\n transition: background-color 0.2s ease;\n position: relative;\n\n &:not(&--empty):not(&--disabled):hover {\n background-color: rgba(0, 0, 0, 0.04);\n }\n\n &--empty {\n cursor: default;\n }\n\n &--today {\n color: var(--picker-color);\n font-weight: 700;\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n border: 2px solid var(--picker-color);\n border-radius: 50%;\n }\n }\n\n &--selected {\n background-color: var(--picker-color);\n color: white;\n font-weight: 700;\n\n &:hover {\n background-color: var(--picker-color);\n opacity: 0.9;\n }\n\n &::before {\n display: none;\n }\n }\n\n &--disabled {\n color: rgba(0, 0, 0, 0.38);\n cursor: not-allowed;\n pointer-events: none;\n }\n }\n}\n\n// Compact variant (no sidebar)\n:host([compact]) {\n .xplor-inline-date-picker {\n &__sidebar {\n display: none;\n }\n\n &__calendar {\n width: 280px;\n }\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, State, Element, Listen } from '@stencil/core';\n\n@Component({\n tag: 'xplor-inline-date-picker',\n styleUrl: 'xplor-inline-date-picker.scss',\n scoped: true,\n})\nexport class XplorInlineDatePicker {\n @Element() el: HTMLElement;\n /**\n * Selected date (YYYY-MM-DD format)\n */\n @Prop({ mutable: true }) selectedDate: string = '';\n\n /**\n * Minimum selectable date (YYYY-MM-DD format)\n */\n @Prop() min: string = '';\n\n /**\n * Maximum selectable date (YYYY-MM-DD format)\n */\n @Prop() max: string = '';\n\n /**\n * Whether the date picker is readonly\n */\n @Prop() readonly: boolean = false;\n\n /**\n * Primary color\n */\n @Prop() color: string = '#008480';\n\n /**\n * Whether to start week on Sunday (default: true)\n */\n @Prop() startWeekOnSunday: boolean = true;\n\n /**\n * Date selection event\n */\n @Event() dateSelected: EventEmitter<string>;\n\n /**\n * Month change event\n */\n @Event() monthChanged: EventEmitter<{ year: number; month: number }>;\n\n @State() currentYear: number;\n @State() currentMonth: number;\n @State() viewDate: Date;\n @State() focusedDay: number = 0;\n\n private monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n private dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n private dayNamesStartMonday = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];\n\n componentWillLoad() {\n const date = this.selectedDate ? new Date(this.selectedDate) : new Date();\n this.currentYear = date.getFullYear();\n this.currentMonth = date.getMonth();\n this.viewDate = new Date(this.currentYear, this.currentMonth, 1);\n this.focusedDay = date.getDate();\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n const daysInMonth = this.getDaysInMonth();\n\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n if (this.focusedDay > 1) {\n this.focusedDay--;\n } else {\n this.previousMonth();\n this.focusedDay = this.getDaysInMonth();\n }\n break;\n case 'ArrowRight':\n event.preventDefault();\n if (this.focusedDay < daysInMonth) {\n this.focusedDay++;\n } else {\n this.nextMonth();\n this.focusedDay = 1;\n }\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (this.focusedDay > 7) {\n this.focusedDay -= 7;\n } else {\n this.previousMonth();\n this.focusedDay = this.getDaysInMonth() - (7 - this.focusedDay);\n }\n break;\n case 'ArrowDown':\n event.preventDefault();\n if (this.focusedDay + 7 <= daysInMonth) {\n this.focusedDay += 7;\n } else {\n const remainder = this.focusedDay + 7 - daysInMonth;\n this.nextMonth();\n this.focusedDay = remainder;\n }\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (this.focusedDay >= 1 && this.focusedDay <= daysInMonth) {\n this.selectDate(this.focusedDay);\n }\n break;\n default:\n return;\n }\n\n // Focus the day cell after render\n requestAnimationFrame(() => {\n const dayEl = this.el.querySelector(`[data-day=\"${this.focusedDay}\"]`) as HTMLElement;\n if (dayEl) dayEl.focus();\n });\n }\n\n private previousMonth = () => {\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.currentYear--;\n } else {\n this.currentMonth--;\n }\n this.viewDate = new Date(this.currentYear, this.currentMonth, 1);\n this.monthChanged.emit({ year: this.currentYear, month: this.currentMonth });\n };\n\n private nextMonth = () => {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n this.viewDate = new Date(this.currentYear, this.currentMonth, 1);\n this.monthChanged.emit({ year: this.currentYear, month: this.currentMonth });\n };\n\n private selectDate = (day: number) => {\n if (this.readonly) return;\n\n const date = new Date(this.currentYear, this.currentMonth, day);\n const dateString = this.formatDate(date);\n\n if (this.isDateDisabled(date)) return;\n\n this.selectedDate = dateString;\n this.dateSelected.emit(dateString);\n };\n\n private formatDate = (date: Date): string => {\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n return `${year}-${month}-${day}`;\n };\n\n private isDateDisabled = (date: Date): boolean => {\n if (this.min) {\n const minDate = new Date(this.min);\n if (date < minDate) return true;\n }\n if (this.max) {\n const maxDate = new Date(this.max);\n if (date > maxDate) return true;\n }\n return false;\n };\n\n private isToday = (day: number): boolean => {\n const today = new Date();\n return (\n day === today.getDate() &&\n this.currentMonth === today.getMonth() &&\n this.currentYear === today.getFullYear()\n );\n };\n\n private isSelected = (day: number): boolean => {\n if (!this.selectedDate) return false;\n const selected = new Date(this.selectedDate);\n return (\n day === selected.getDate() &&\n this.currentMonth === selected.getMonth() &&\n this.currentYear === selected.getFullYear()\n );\n };\n\n private getDaysInMonth = (): number => {\n return new Date(this.currentYear, this.currentMonth + 1, 0).getDate();\n };\n\n private getFirstDayOfMonth = (): number => {\n const firstDay = new Date(this.currentYear, this.currentMonth, 1).getDay();\n return this.startWeekOnSunday ? firstDay : (firstDay === 0 ? 6 : firstDay - 1);\n };\n\n private renderCalendarDays = () => {\n const daysInMonth = this.getDaysInMonth();\n const firstDay = this.getFirstDayOfMonth();\n const days = [];\n\n // Empty cells for days before the first of the month\n for (let i = 0; i < firstDay; i++) {\n days.push(<div class=\"xplor-inline-date-picker__day xplor-inline-date-picker__day--empty\"></div>);\n }\n\n // Days of the month\n for (let day = 1; day <= daysInMonth; day++) {\n const date = new Date(this.currentYear, this.currentMonth, day);\n const isDisabled = this.isDateDisabled(date);\n const isToday = this.isToday(day);\n const isSelected = this.isSelected(day);\n\n days.push(\n <div\n class={{\n 'xplor-inline-date-picker__day': true,\n 'xplor-inline-date-picker__day--today': isToday,\n 'xplor-inline-date-picker__day--selected': isSelected,\n 'xplor-inline-date-picker__day--disabled': isDisabled,\n }}\n onClick={() => !isDisabled && this.selectDate(day)}\n role=\"gridcell\"\n aria-selected={isSelected ? 'true' : 'false'}\n aria-current={isToday ? 'date' : undefined}\n aria-disabled={isDisabled ? 'true' : undefined}\n tabIndex={day === this.focusedDay ? 0 : -1}\n data-day={day}\n >\n {day}\n </div>\n );\n }\n\n return days;\n };\n\n private getSidebarDate = () => {\n const date = this.selectedDate ? new Date(this.selectedDate) : new Date();\n const dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n const monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\n return {\n year: date.getFullYear(),\n day: dayNames[date.getDay()],\n date: `${monthNames[date.getMonth()]} ${date.getDate()}`,\n };\n };\n\n render() {\n const sidebarDate = this.getSidebarDate();\n const dayHeaders = this.startWeekOnSunday ? this.dayNames : this.dayNamesStartMonday;\n\n return (\n <Host>\n <div class=\"xplor-inline-date-picker\" style={{ '--picker-color': this.color }}>\n <div class=\"xplor-inline-date-picker__sidebar\">\n <div class=\"xplor-inline-date-picker__sidebar-year\">{sidebarDate.year}</div>\n <div class=\"xplor-inline-date-picker__sidebar-day\">{sidebarDate.day},</div>\n <div class=\"xplor-inline-date-picker__sidebar-date\">{sidebarDate.date}</div>\n </div>\n\n <div class=\"xplor-inline-date-picker__calendar\">\n <div class=\"xplor-inline-date-picker__header\">\n <button\n type=\"button\"\n class=\"xplor-inline-date-picker__arrow\"\n onClick={this.previousMonth}\n aria-label=\"Previous month\"\n >\n ‹\n </button>\n <div class=\"xplor-inline-date-picker__title\">\n {this.monthNames[this.currentMonth]} {this.currentYear}\n </div>\n <button\n type=\"button\"\n class=\"xplor-inline-date-picker__arrow\"\n onClick={this.nextMonth}\n aria-label=\"Next month\"\n >\n ›\n </button>\n </div>\n\n <div class=\"xplor-inline-date-picker__weekdays\">\n {dayHeaders.map((day) => (\n <div class=\"xplor-inline-date-picker__weekday\">{day}</div>\n ))}\n </div>\n\n <div class=\"xplor-inline-date-picker__days\" role=\"grid\">{this.renderCalendarDays()}</div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-DQ8MCJFX.js","mappings":";;AAAA,MAAM,wBAAwB,GAAG,i8VAAi8V;;MCOr9V,qBAAqB,iBAAAA,kBAAA,CAAA,MAAA,qBAAA,SAAAC,CAAA,CAAA;AALlC,IAAA,WAAA,GAAA;;;;;AAOE;;AAEG;AACsB,QAAA,IAAY,CAAA,YAAA,GAAW,EAAE;AAElD;;AAEG;AACK,QAAA,IAAG,CAAA,GAAA,GAAW,EAAE;AAExB;;AAEG;AACK,QAAA,IAAG,CAAA,GAAA,GAAW,EAAE;AAExB;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAEjC;;AAEG;AACK,QAAA,IAAK,CAAA,KAAA,GAAW,SAAS;AAEjC;;AAEG;AACK,QAAA,IAAiB,CAAA,iBAAA,GAAY,IAAI;AAehC,QAAA,IAAU,CAAA,UAAA,GAAW,CAAC;AAEvB,QAAA,IAAU,CAAA,UAAA,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM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AA,EAAA,0CAAA,EAAK,KAAK,EAAC,gCAAgC,EAAC,IAAI,EAAC,MAAM,EAAA,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAO,CACrF,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/xplor-inline-date-picker/xplor-inline-date-picker.scss?tag=xplor-inline-date-picker&encapsulation=scoped","src/components/xplor-inline-date-picker/xplor-inline-date-picker.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.xplor-inline-date-picker {\n --picker-color: #008480;\n display: flex;\n border-radius: 1rem;\n background-color: white;\n box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),\n 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12);\n overflow: hidden;\n\n &__sidebar {\n background-color: var(--picker-color);\n color: white;\n padding: 1rem;\n min-width: 180px;\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n }\n\n &__sidebar-year {\n font-size: 0.875rem;\n font-weight: 700;\n }\n\n &__sidebar-day {\n font-size: 1.75rem;\n font-weight: 700;\n }\n\n &__sidebar-date {\n font-size: 1.75rem;\n font-weight: 700;\n }\n\n &__calendar {\n display: flex;\n flex-direction: column;\n width: 320px;\n padding: 1rem;\n }\n\n &__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem;\n padding: 0.5rem 0;\n }\n\n &__title {\n font-size: 1rem;\n font-weight: 700;\n color: rgba(0, 0, 0, 0.87);\n }\n\n &__arrow {\n width: 2rem;\n height: 2rem;\n border: none;\n background: transparent;\n font-size: 1.5rem;\n color: rgba(0, 0, 0, 0.54);\n cursor: pointer;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background-color 0.2s ease;\n\n &:hover {\n background-color: rgba(0, 0, 0, 0.04);\n }\n\n &:active {\n background-color: rgba(0, 0, 0, 0.08);\n }\n }\n\n &__weekdays {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0.25rem;\n margin-bottom: 0.5rem;\n }\n\n &__weekday {\n text-align: center;\n font-size: 0.75rem;\n font-weight: 700;\n color: rgba(0, 0, 0, 0.6);\n padding: 0.5rem 0;\n }\n\n &__days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0.25rem;\n }\n\n &__day {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 0.875rem;\n font-weight: 500;\n border-radius: 50%;\n cursor: pointer;\n transition: background-color 0.2s ease;\n position: relative;\n\n &:not(&--empty):not(&--disabled):hover {\n background-color: rgba(0, 0, 0, 0.04);\n }\n\n &--empty {\n cursor: default;\n }\n\n &--today {\n color: var(--picker-color);\n font-weight: 700;\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n border: 2px solid var(--picker-color);\n border-radius: 50%;\n }\n }\n\n &--selected {\n background-color: var(--picker-color);\n color: white;\n font-weight: 700;\n\n &:hover {\n background-color: var(--picker-color);\n opacity: 0.9;\n }\n\n &::before {\n display: none;\n }\n }\n\n &--disabled {\n color: rgba(0, 0, 0, 0.38);\n cursor: not-allowed;\n pointer-events: none;\n }\n }\n}\n\n// Compact variant (no sidebar)\n:host([compact]) {\n .xplor-inline-date-picker {\n &__sidebar {\n display: none;\n }\n\n &__calendar {\n width: 280px;\n }\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, State, Element, Listen } from '@stencil/core';\n\n@Component({\n tag: 'xplor-inline-date-picker',\n styleUrl: 'xplor-inline-date-picker.scss',\n scoped: true,\n})\nexport class XplorInlineDatePicker {\n @Element() el: HTMLElement;\n /**\n * Selected date (YYYY-MM-DD format)\n */\n @Prop({ mutable: true }) selectedDate: string = '';\n\n /**\n * Minimum selectable date (YYYY-MM-DD format)\n */\n @Prop() min: string = '';\n\n /**\n * Maximum selectable date (YYYY-MM-DD format)\n */\n @Prop() max: string = '';\n\n /**\n * Whether the date picker is readonly\n */\n @Prop() readonly: boolean = false;\n\n /**\n * Primary color\n */\n @Prop() color: string = '#008480';\n\n /**\n * Whether to start week on Sunday (default: true)\n */\n @Prop() startWeekOnSunday: boolean = true;\n\n /**\n * Date selection event\n */\n @Event() dateSelected: EventEmitter<string>;\n\n /**\n * Month change event\n */\n @Event() monthChanged: EventEmitter<{ year: number; month: number }>;\n\n @State() currentYear: number;\n @State() currentMonth: number;\n @State() viewDate: Date;\n @State() focusedDay: number = 0;\n\n private monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n private dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n private dayNamesStartMonday = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];\n\n componentWillLoad() {\n const date = this.selectedDate ? new Date(this.selectedDate) : new Date();\n this.currentYear = date.getFullYear();\n this.currentMonth = date.getMonth();\n this.viewDate = new Date(this.currentYear, this.currentMonth, 1);\n this.focusedDay = date.getDate();\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n const daysInMonth = this.getDaysInMonth();\n\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n if (this.focusedDay > 1) {\n this.focusedDay--;\n } else {\n this.previousMonth();\n this.focusedDay = this.getDaysInMonth();\n }\n break;\n case 'ArrowRight':\n event.preventDefault();\n if (this.focusedDay < daysInMonth) {\n this.focusedDay++;\n } else {\n this.nextMonth();\n this.focusedDay = 1;\n }\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (this.focusedDay > 7) {\n this.focusedDay -= 7;\n } else {\n this.previousMonth();\n this.focusedDay = this.getDaysInMonth() - (7 - this.focusedDay);\n }\n break;\n case 'ArrowDown':\n event.preventDefault();\n if (this.focusedDay + 7 <= daysInMonth) {\n this.focusedDay += 7;\n } else {\n const remainder = this.focusedDay + 7 - daysInMonth;\n this.nextMonth();\n this.focusedDay = remainder;\n }\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (this.focusedDay >= 1 && this.focusedDay <= daysInMonth) {\n this.selectDate(this.focusedDay);\n }\n break;\n default:\n return;\n }\n\n // Focus the day cell after render\n requestAnimationFrame(() => {\n const dayEl = this.el.querySelector(`[data-day=\"${this.focusedDay}\"]`) as HTMLElement;\n if (dayEl) dayEl.focus();\n });\n }\n\n private previousMonth = () => {\n if (this.currentMonth === 0) {\n this.currentMonth = 11;\n this.currentYear--;\n } else {\n this.currentMonth--;\n }\n this.viewDate = new Date(this.currentYear, this.currentMonth, 1);\n this.monthChanged.emit({ year: this.currentYear, month: this.currentMonth });\n };\n\n private nextMonth = () => {\n if (this.currentMonth === 11) {\n this.currentMonth = 0;\n this.currentYear++;\n } else {\n this.currentMonth++;\n }\n this.viewDate = new Date(this.currentYear, this.currentMonth, 1);\n this.monthChanged.emit({ year: this.currentYear, month: this.currentMonth });\n };\n\n private selectDate = (day: number) => {\n if (this.readonly) return;\n\n const date = new Date(this.currentYear, this.currentMonth, day);\n const dateString = this.formatDate(date);\n\n if (this.isDateDisabled(date)) return;\n\n this.selectedDate = dateString;\n this.dateSelected.emit(dateString);\n };\n\n private formatDate = (date: Date): string => {\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n return `${year}-${month}-${day}`;\n };\n\n private isDateDisabled = (date: Date): boolean => {\n if (this.min) {\n const minDate = new Date(this.min);\n if (date < minDate) return true;\n }\n if (this.max) {\n const maxDate = new Date(this.max);\n if (date > maxDate) return true;\n }\n return false;\n };\n\n private isToday = (day: number): boolean => {\n const today = new Date();\n return (\n day === today.getDate() &&\n this.currentMonth === today.getMonth() &&\n this.currentYear === today.getFullYear()\n );\n };\n\n private isSelected = (day: number): boolean => {\n if (!this.selectedDate) return false;\n const selected = new Date(this.selectedDate);\n return (\n day === selected.getDate() &&\n this.currentMonth === selected.getMonth() &&\n this.currentYear === selected.getFullYear()\n );\n };\n\n private getDaysInMonth = (): number => {\n return new Date(this.currentYear, this.currentMonth + 1, 0).getDate();\n };\n\n private getFirstDayOfMonth = (): number => {\n const firstDay = new Date(this.currentYear, this.currentMonth, 1).getDay();\n return this.startWeekOnSunday ? firstDay : (firstDay === 0 ? 6 : firstDay - 1);\n };\n\n private renderCalendarDays = () => {\n const daysInMonth = this.getDaysInMonth();\n const firstDay = this.getFirstDayOfMonth();\n const days = [];\n\n // Empty cells for days before the first of the month\n for (let i = 0; i < firstDay; i++) {\n days.push(<div class=\"xplor-inline-date-picker__day xplor-inline-date-picker__day--empty\"></div>);\n }\n\n // Days of the month\n for (let day = 1; day <= daysInMonth; day++) {\n const date = new Date(this.currentYear, this.currentMonth, day);\n const isDisabled = this.isDateDisabled(date);\n const isToday = this.isToday(day);\n const isSelected = this.isSelected(day);\n\n days.push(\n <div\n class={{\n 'xplor-inline-date-picker__day': true,\n 'xplor-inline-date-picker__day--today': isToday,\n 'xplor-inline-date-picker__day--selected': isSelected,\n 'xplor-inline-date-picker__day--disabled': isDisabled,\n }}\n onClick={() => !isDisabled && this.selectDate(day)}\n role=\"gridcell\"\n aria-selected={isSelected ? 'true' : 'false'}\n aria-current={isToday ? 'date' : undefined}\n aria-disabled={isDisabled ? 'true' : undefined}\n tabIndex={day === this.focusedDay ? 0 : -1}\n data-day={day}\n >\n {day}\n </div>\n );\n }\n\n return days;\n };\n\n private getSidebarDate = () => {\n const date = this.selectedDate ? new Date(this.selectedDate) : new Date();\n const dayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n const monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\n return {\n year: date.getFullYear(),\n day: dayNames[date.getDay()],\n date: `${monthNames[date.getMonth()]} ${date.getDate()}`,\n };\n };\n\n render() {\n const sidebarDate = this.getSidebarDate();\n const dayHeaders = this.startWeekOnSunday ? this.dayNames : this.dayNamesStartMonday;\n\n return (\n <Host>\n <div class=\"xplor-inline-date-picker\" style={{ '--picker-color': this.color }}>\n <div class=\"xplor-inline-date-picker__sidebar\">\n <div class=\"xplor-inline-date-picker__sidebar-year\">{sidebarDate.year}</div>\n <div class=\"xplor-inline-date-picker__sidebar-day\">{sidebarDate.day},</div>\n <div class=\"xplor-inline-date-picker__sidebar-date\">{sidebarDate.date}</div>\n </div>\n\n <div class=\"xplor-inline-date-picker__calendar\">\n <div class=\"xplor-inline-date-picker__header\">\n <button\n type=\"button\"\n class=\"xplor-inline-date-picker__arrow\"\n onClick={this.previousMonth}\n aria-label=\"Previous month\"\n >\n ‹\n </button>\n <div class=\"xplor-inline-date-picker__title\">\n {this.monthNames[this.currentMonth]} {this.currentYear}\n </div>\n <button\n type=\"button\"\n class=\"xplor-inline-date-picker__arrow\"\n onClick={this.nextMonth}\n aria-label=\"Next month\"\n >\n ›\n </button>\n </div>\n\n <div class=\"xplor-inline-date-picker__weekdays\">\n {dayHeaders.map((day) => (\n <div class=\"xplor-inline-date-picker__weekday\">{day}</div>\n ))}\n </div>\n\n <div class=\"xplor-inline-date-picker__days\" role=\"grid\">{this.renderCalendarDays()}</div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|