@phatvu/web-component-poc 1.0.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/LICENSE +21 -0
- package/dist/components/fast-button.d.ts +11 -0
- package/dist/components/fast-carousel.d.ts +11 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/jobs-list-only-ui.d.ts +11 -0
- package/dist/types/components/button/button.d.ts +23 -0
- package/dist/types/components/fast-carousel/carousel.d.ts +54 -0
- package/dist/types/components/jobs-list-only-ui/jobs-list-only-ui.d.ts +35 -0
- package/dist/types/components.d.ts +398 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/mock/jobs-list-only.mock.d.ts +7 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/types/jobs-list.d.ts +58 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/web-component-poc/fast-button.entry.js +47 -0
- package/dist/web-component-poc/fast-button.entry.js.map +1 -0
- package/dist/web-component-poc/fast-carousel.entry.js +1910 -0
- package/dist/web-component-poc/fast-carousel.entry.js.map +1 -0
- package/dist/web-component-poc/index-B0WZf8UB.js +4585 -0
- package/dist/web-component-poc/index-B0WZf8UB.js.map +1 -0
- package/dist/web-component-poc/index.esm.js +18 -0
- package/dist/web-component-poc/index.esm.js.map +1 -0
- package/dist/web-component-poc/jobs-list-only-ui.entry.js +173 -0
- package/dist/web-component-poc/jobs-list-only-ui.entry.js.map +1 -0
- package/dist/web-component-poc/web-component-poc.esm.js +50 -0
- package/dist/web-component-poc/web-component-poc.esm.js.map +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +59 -0
- package/readme.md +111 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal job shape for jobs-list-only-ui presentation.
|
|
3
|
+
* Compatible with IJob from career-sites-renderer for React integration.
|
|
4
|
+
*/
|
|
5
|
+
export interface JobLocationSummary {
|
|
6
|
+
city?: string;
|
|
7
|
+
state?: string;
|
|
8
|
+
stateAbbr?: string;
|
|
9
|
+
country?: string;
|
|
10
|
+
countryAbbr?: string;
|
|
11
|
+
street?: string;
|
|
12
|
+
streetAddress?: string;
|
|
13
|
+
address?: string;
|
|
14
|
+
distance?: number;
|
|
15
|
+
locationText?: string;
|
|
16
|
+
cityStateAbbr?: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface JobCardExtraFieldSummary {
|
|
20
|
+
attribute_name?: string;
|
|
21
|
+
value: string | string[];
|
|
22
|
+
classname: string;
|
|
23
|
+
}
|
|
24
|
+
export interface JobSummary {
|
|
25
|
+
title?: string;
|
|
26
|
+
reference?: string;
|
|
27
|
+
originalURL?: string;
|
|
28
|
+
applyURL?: string;
|
|
29
|
+
brandName?: string;
|
|
30
|
+
locations?: JobLocationSummary[];
|
|
31
|
+
employmentType?: string[];
|
|
32
|
+
isRemote?: boolean;
|
|
33
|
+
jobCardExtraFields?: JobCardExtraFieldSummary[];
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
export interface JobsListOnlyUIProps {
|
|
37
|
+
jobs?: JobSummary[];
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
totalJob?: number;
|
|
40
|
+
noResultsLine1?: string;
|
|
41
|
+
noResultsLine2?: string;
|
|
42
|
+
applyButtonText?: string;
|
|
43
|
+
showBrand?: boolean;
|
|
44
|
+
showReference?: boolean;
|
|
45
|
+
showEmploymentType?: boolean;
|
|
46
|
+
streetFormat?: string;
|
|
47
|
+
multiLocationText?: string;
|
|
48
|
+
remoteLocationText?: string;
|
|
49
|
+
enableKilometers?: boolean;
|
|
50
|
+
classname?: string;
|
|
51
|
+
/** Suggestions block when no results and config enabled */
|
|
52
|
+
showSuggestions?: boolean;
|
|
53
|
+
clearResultSuggestionsTitleText?: string;
|
|
54
|
+
clearResultSuggestionsLine1?: string;
|
|
55
|
+
clearResultSuggestionsLine2?: string;
|
|
56
|
+
clearResultSuggestionsLine3?: string;
|
|
57
|
+
clearResultSuggestionsLine4?: string;
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function format(first?: string, middle?: string, last?: string): string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { r as registerInstance, a as createEvent, h } from './index-B0WZf8UB.js';
|
|
2
|
+
|
|
3
|
+
const buttonCss = () => `:host{display:inline-block}.custom-button{display:inline-flex;align-items:center;justify-content:center;padding:0.5rem 1rem;font-family:inherit;font-size:0.875rem;font-weight:500;line-height:1.25;border:none;border-radius:0.375rem;cursor:pointer;transition:background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease}.custom-button:focus{outline:2px solid var(--custom-button-focus-ring, #2563eb);outline-offset:2px}.custom-button:focus:not(:focus-visible){outline:none}.custom-button--primary{background-color:var(--custom-button-primary-bg, #2563eb);color:var(--custom-button-primary-color, #fff)}.custom-button--primary:hover:not(.custom-button--disabled){background-color:var(--custom-button-primary-hover-bg, #1d4ed8)}.custom-button--primary:active:not(.custom-button--disabled){background-color:var(--custom-button-primary-active-bg, #1e40af)}.custom-button--secondary{background-color:var(--custom-button-secondary-bg, #e5e7eb);color:var(--custom-button-secondary-color, #1f2937)}.custom-button--secondary:hover:not(.custom-button--disabled){background-color:var(--custom-button-secondary-hover-bg, #d1d5db)}.custom-button--secondary:active:not(.custom-button--disabled){background-color:var(--custom-button-secondary-active-bg, #9ca3af)}.custom-button--text{background-color:transparent;color:var(--custom-button-text-color, #2563eb)}.custom-button--text:hover:not(.custom-button--disabled){background-color:var(--custom-button-text-hover-bg, rgba(37, 99, 235, 0.08))}.custom-button--text:active:not(.custom-button--disabled){background-color:var(--custom-button-text-active-bg, rgba(37, 99, 235, 0.12))}.custom-button--disabled,.custom-button:disabled{opacity:0.6;cursor:not-allowed}`;
|
|
4
|
+
|
|
5
|
+
const CustomButton = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.buttonClick = createEvent(this, "buttonClick", 7);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Visual variant of the button.
|
|
12
|
+
*/
|
|
13
|
+
variant = 'primary';
|
|
14
|
+
/**
|
|
15
|
+
* Native button type (button or submit).
|
|
16
|
+
*/
|
|
17
|
+
type = 'button';
|
|
18
|
+
/**
|
|
19
|
+
* When true, the button is disabled and does not emit events.
|
|
20
|
+
*/
|
|
21
|
+
disabled = false;
|
|
22
|
+
/**
|
|
23
|
+
* Emitted when the button is clicked (not emitted when disabled).
|
|
24
|
+
*/
|
|
25
|
+
buttonClick;
|
|
26
|
+
handleClick = (e) => {
|
|
27
|
+
if (this.disabled) {
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
e.stopPropagation();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
this.buttonClick.emit(e);
|
|
33
|
+
};
|
|
34
|
+
render() {
|
|
35
|
+
return (h("button", { key: 'b373f44e11e651d0371ce3cade98b4650ccdd727', type: this.type, class: {
|
|
36
|
+
'custom-button': true,
|
|
37
|
+
[`custom-button--${this.variant}`]: true,
|
|
38
|
+
'custom-button--disabled': this.disabled,
|
|
39
|
+
}, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '2a046bc70af051c04f4549def87dac7044b41e04' })));
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
CustomButton.style = buttonCss();
|
|
43
|
+
|
|
44
|
+
export { CustomButton as fast_button };
|
|
45
|
+
//# sourceMappingURL=fast-button.entry.esm.js.map
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=fast-button.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"fast-button.entry.js","mappings":";;AAAA,MAAM,SAAS,GAAG,MAAM,CAAC,qqDAAqqD,CAAC;;MCUlrD,YAAY,GAAA,MAAA;;;;;AACvB;;AAEG;IACK,OAAO,GAAkB,SAAS;AAE1C;;AAEG;IACK,IAAI,GAAe,QAAQ;AAEnC;;AAEG;IACK,QAAQ,GAAG,KAAK;AAExB;;AAEG;AACM,IAAA,WAAW;AAEZ,IAAA,WAAW,GAAG,CAAC,CAAa,KAAI;AACtC,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,CAAC,CAAC,cAAc,EAAE;YAClB,CAAC,CAAC,eAAe,EAAE;YACnB;;AAEF,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1B,KAAC;IAED,MAAM,GAAA;AACJ,QAAA,QACE,+DACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE;AACL,gBAAA,eAAe,EAAE,IAAI;AACrB,gBAAA,CAAC,kBAAkB,IAAI,CAAC,OAAO,CAAA,CAAE,GAAG,IAAI;gBACxC,yBAAyB,EAAE,IAAI,CAAC,QAAQ;aACzC,EACD,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,WAAW,EAAA,EAEzB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACD;;;;;;;","names":[],"sources":["src/components/button/button.css?tag=fast-button&encapsulation=shadow","src/components/button/button.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.custom-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0.5rem 1rem;\n font-family: inherit;\n font-size: 0.875rem;\n font-weight: 500;\n line-height: 1.25;\n border: none;\n border-radius: 0.375rem;\n cursor: pointer;\n transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;\n}\n\n.custom-button:focus {\n outline: 2px solid var(--custom-button-focus-ring, #2563eb);\n outline-offset: 2px;\n}\n\n.custom-button:focus:not(:focus-visible) {\n outline: none;\n}\n\n/* Primary */\n.custom-button--primary {\n background-color: var(--custom-button-primary-bg, #2563eb);\n color: var(--custom-button-primary-color, #fff);\n}\n\n.custom-button--primary:hover:not(.custom-button--disabled) {\n background-color: var(--custom-button-primary-hover-bg, #1d4ed8);\n}\n\n.custom-button--primary:active:not(.custom-button--disabled) {\n background-color: var(--custom-button-primary-active-bg, #1e40af);\n}\n\n/* Secondary */\n.custom-button--secondary {\n background-color: var(--custom-button-secondary-bg, #e5e7eb);\n color: var(--custom-button-secondary-color, #1f2937);\n}\n\n.custom-button--secondary:hover:not(.custom-button--disabled) {\n background-color: var(--custom-button-secondary-hover-bg, #d1d5db);\n}\n\n.custom-button--secondary:active:not(.custom-button--disabled) {\n background-color: var(--custom-button-secondary-active-bg, #9ca3af);\n}\n\n/* Text */\n.custom-button--text {\n background-color: transparent;\n color: var(--custom-button-text-color, #2563eb);\n}\n\n.custom-button--text:hover:not(.custom-button--disabled) {\n background-color: var(--custom-button-text-hover-bg, rgba(37, 99, 235, 0.08));\n}\n\n.custom-button--text:active:not(.custom-button--disabled) {\n background-color: var(--custom-button-text-active-bg, rgba(37, 99, 235, 0.12));\n}\n\n/* Disabled */\n.custom-button--disabled,\n.custom-button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n","import { Component, Prop, Event, EventEmitter, h } from '@stencil/core';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'text';\nexport type ButtonType = 'button' | 'submit';\n\n@Component({\n tag: 'fast-button',\n styleUrl: 'button.css',\n shadow: true,\n})\nexport class CustomButton {\n /**\n * Visual variant of the button.\n */\n @Prop() variant: ButtonVariant = 'primary';\n\n /**\n * Native button type (button or submit).\n */\n @Prop() type: ButtonType = 'button';\n\n /**\n * When true, the button is disabled and does not emit events.\n */\n @Prop() disabled = false;\n\n /**\n * Emitted when the button is clicked (not emitted when disabled).\n */\n @Event() buttonClick: EventEmitter<MouseEvent>;\n\n private handleClick = (e: MouseEvent) => {\n if (this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n this.buttonClick.emit(e);\n };\n\n render() {\n return (\n <button\n type={this.type}\n class={{\n 'custom-button': true,\n [`custom-button--${this.variant}`]: true,\n 'custom-button--disabled': this.disabled,\n }}\n disabled={this.disabled}\n onClick={this.handleClick}\n >\n <slot />\n </button>\n );\n }\n}\n"],"version":3}
|