@phatvu/web-component-poc 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/fast-button_2.cjs.entry.js +211 -0
- package/dist/cjs/fast-carousel.cjs.entry.js +1909 -0
- package/dist/cjs/index-C756SOR-.js +2225 -0
- package/dist/cjs/index.cjs.js +7 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/web-component-poc.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +15 -0
- package/dist/collection/components/button/button.css +76 -0
- package/dist/collection/components/button/button.js +145 -0
- package/dist/collection/components/fast-carousel/carousel.css +98 -0
- package/dist/collection/components/fast-carousel/carousel.js +439 -0
- package/dist/collection/components/jobs-list-only-ui/jobs-list-only-ui.css +228 -0
- package/dist/collection/components/jobs-list-only-ui/jobs-list-only-ui.js +543 -0
- package/dist/collection/index.js +10 -0
- package/dist/collection/mock/jobs-list-only.mock.js +60 -0
- package/dist/collection/types/jobs-list.js +1 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/components/fast-button.js +1 -0
- package/dist/components/fast-carousel.js +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/jobs-list-only-ui.js +1 -0
- package/dist/components/p-Cw2MJ5l2.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/{web-component-poc/jobs-list-only-ui.entry.js → esm/fast-button_2.entry.js} +44 -9
- package/dist/{web-component-poc → esm}/fast-carousel.entry.js +1 -4
- package/dist/esm/index-D7_MJBO8.js +2217 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/web-component-poc.js +21 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/web-component-poc/index-xE9n11HX.js.map +1 -0
- package/dist/web-component-poc/index.esm.js +1 -18
- package/dist/web-component-poc/p-0bc6d45d.entry.js +1 -0
- package/dist/web-component-poc/p-8ab359cc.entry.js +1 -0
- package/dist/web-component-poc/p-D7_MJBO8.js +2 -0
- package/dist/web-component-poc/p-DQuL1Twl.js +1 -0
- package/dist/web-component-poc/web-component-poc.esm.js +1 -50
- package/hydrate/index.d.ts +287 -0
- package/hydrate/index.js +25150 -0
- package/hydrate/index.mjs +25140 -0
- package/hydrate/package.json +12 -0
- package/package.json +11 -2
- package/dist/web-component-poc/fast-button.entry.js +0 -47
- package/dist/web-component-poc/fast-button.entry.js.map +0 -1
- package/dist/web-component-poc/fast-carousel.entry.js.map +0 -1
- package/dist/web-component-poc/index-B0WZf8UB.js +0 -4585
- package/dist/web-component-poc/index-B0WZf8UB.js.map +0 -1
- package/dist/web-component-poc/jobs-list-only-ui.entry.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-C756SOR-.js');
|
|
4
|
+
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
|
+
|
|
6
|
+
const defineCustomElements = async (win, options) => {
|
|
7
|
+
if (typeof window === 'undefined') return undefined;
|
|
8
|
+
await appGlobals.globalScripts();
|
|
9
|
+
return index.bootstrapLazy([["fast-button_2.cjs",[[769,"fast-button",{"variant":[1],"type":[1],"disabled":[4]}],[512,"jobs-list-only-ui",{"mockData":[4,"mock-data"],"jobs":[1],"loading":[4],"totalJob":[2,"total-job"],"noResultsLine1":[1,"no-results-line-1"],"noResultsLine2":[1,"no-results-line-2"],"applyButtonText":[1,"apply-button-text"],"showBrand":[4,"show-brand"],"showReference":[4,"show-reference"],"showEmploymentType":[4,"show-employment-type"],"streetFormat":[1,"street-format"],"multiLocationText":[1,"multi-location-text"],"remoteLocationText":[1,"remote-location-text"],"enableKilometers":[4,"enable-kilometers"],"rootClass":[1,"root-class"],"showSuggestions":[4,"show-suggestions"],"clearResultSuggestionsTitleText":[1,"clear-result-suggestions-title-text"],"clearResultSuggestionsLine1":[1,"clear-result-suggestions-line-1"],"clearResultSuggestionsLine2":[1,"clear-result-suggestions-line-2"],"clearResultSuggestionsLine3":[1,"clear-result-suggestions-line-3"],"clearResultSuggestionsLine4":[1,"clear-result-suggestions-line-4"]}]]],["fast-carousel.cjs",[[769,"fast-carousel",{"items":[1],"loop":[4],"class":[1],"controlClass":[1,"control-class"],"slideClass":[1,"slide-class"],"itemClass":[1,"item-class"],"scrollPrev":[64],"scrollNext":[64],"goToSlide":[64],"getEmbla":[64]}]]]], options);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.setNonce = index.setNonce;
|
|
13
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-C756SOR-.js');
|
|
4
|
+
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
|
+
|
|
6
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
7
|
+
/*
|
|
8
|
+
Stencil Client Patch Browser v4.43.2 | MIT Licensed | https://stenciljs.com
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
var patchBrowser = () => {
|
|
12
|
+
const importMeta = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('web-component-poc.cjs.js', document.baseURI).href));
|
|
13
|
+
const opts = {};
|
|
14
|
+
if (importMeta !== "") {
|
|
15
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
16
|
+
}
|
|
17
|
+
return index.promiseResolve(opts);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
patchBrowser().then(async (options) => {
|
|
21
|
+
await appGlobals.globalScripts();
|
|
22
|
+
return index.bootstrapLazy([["fast-button_2.cjs",[[769,"fast-button",{"variant":[1],"type":[1],"disabled":[4]}],[512,"jobs-list-only-ui",{"mockData":[4,"mock-data"],"jobs":[1],"loading":[4],"totalJob":[2,"total-job"],"noResultsLine1":[1,"no-results-line-1"],"noResultsLine2":[1,"no-results-line-2"],"applyButtonText":[1,"apply-button-text"],"showBrand":[4,"show-brand"],"showReference":[4,"show-reference"],"showEmploymentType":[4,"show-employment-type"],"streetFormat":[1,"street-format"],"multiLocationText":[1,"multi-location-text"],"remoteLocationText":[1,"remote-location-text"],"enableKilometers":[4,"enable-kilometers"],"rootClass":[1,"root-class"],"showSuggestions":[4,"show-suggestions"],"clearResultSuggestionsTitleText":[1,"clear-result-suggestions-title-text"],"clearResultSuggestionsLine1":[1,"clear-result-suggestions-line-1"],"clearResultSuggestionsLine2":[1,"clear-result-suggestions-line-2"],"clearResultSuggestionsLine3":[1,"clear-result-suggestions-line-3"],"clearResultSuggestionsLine4":[1,"clear-result-suggestions-line-4"]}]]],["fast-carousel.cjs",[[769,"fast-carousel",{"items":[1],"loop":[4],"class":[1],"controlClass":[1,"control-class"],"slideClass":[1,"slide-class"],"itemClass":[1,"item-class"],"scrollPrev":[64],"scrollNext":[64],"goToSlide":[64],"getEmbla":[64]}]]]], options);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
"components/button/button.js",
|
|
4
|
+
"components/fast-carousel/carousel.js",
|
|
5
|
+
"components/jobs-list-only-ui/jobs-list-only-ui.js"
|
|
6
|
+
],
|
|
7
|
+
"mixins": [],
|
|
8
|
+
"compiler": {
|
|
9
|
+
"name": "@stencil/core",
|
|
10
|
+
"version": "4.43.2",
|
|
11
|
+
"typescriptVersion": "5.8.3"
|
|
12
|
+
},
|
|
13
|
+
"collections": [],
|
|
14
|
+
"bundles": []
|
|
15
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.custom-button {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
padding: 0.5rem 1rem;
|
|
10
|
+
font-family: inherit;
|
|
11
|
+
font-size: 0.875rem;
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
line-height: 1.25;
|
|
14
|
+
border: none;
|
|
15
|
+
border-radius: 0.375rem;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.custom-button:focus {
|
|
21
|
+
outline: 2px solid var(--custom-button-focus-ring, #2563eb);
|
|
22
|
+
outline-offset: 2px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.custom-button:focus:not(:focus-visible) {
|
|
26
|
+
outline: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Primary */
|
|
30
|
+
.custom-button--primary {
|
|
31
|
+
background-color: var(--custom-button-primary-bg, #2563eb);
|
|
32
|
+
color: var(--custom-button-primary-color, #fff);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.custom-button--primary:hover:not(.custom-button--disabled) {
|
|
36
|
+
background-color: var(--custom-button-primary-hover-bg, #1d4ed8);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.custom-button--primary:active:not(.custom-button--disabled) {
|
|
40
|
+
background-color: var(--custom-button-primary-active-bg, #1e40af);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Secondary */
|
|
44
|
+
.custom-button--secondary {
|
|
45
|
+
background-color: var(--custom-button-secondary-bg, #e5e7eb);
|
|
46
|
+
color: var(--custom-button-secondary-color, #1f2937);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.custom-button--secondary:hover:not(.custom-button--disabled) {
|
|
50
|
+
background-color: var(--custom-button-secondary-hover-bg, #d1d5db);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.custom-button--secondary:active:not(.custom-button--disabled) {
|
|
54
|
+
background-color: var(--custom-button-secondary-active-bg, #9ca3af);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Text */
|
|
58
|
+
.custom-button--text {
|
|
59
|
+
background-color: transparent;
|
|
60
|
+
color: var(--custom-button-text-color, #2563eb);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.custom-button--text:hover:not(.custom-button--disabled) {
|
|
64
|
+
background-color: var(--custom-button-text-hover-bg, rgba(37, 99, 235, 0.08));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.custom-button--text:active:not(.custom-button--disabled) {
|
|
68
|
+
background-color: var(--custom-button-text-active-bg, rgba(37, 99, 235, 0.12));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Disabled */
|
|
72
|
+
.custom-button--disabled,
|
|
73
|
+
.custom-button:disabled {
|
|
74
|
+
opacity: 0.6;
|
|
75
|
+
cursor: not-allowed;
|
|
76
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class CustomButton {
|
|
3
|
+
/**
|
|
4
|
+
* Visual variant of the button.
|
|
5
|
+
*/
|
|
6
|
+
variant = 'primary';
|
|
7
|
+
/**
|
|
8
|
+
* Native button type (button or submit).
|
|
9
|
+
*/
|
|
10
|
+
type = 'button';
|
|
11
|
+
/**
|
|
12
|
+
* When true, the button is disabled and does not emit events.
|
|
13
|
+
*/
|
|
14
|
+
disabled = false;
|
|
15
|
+
/**
|
|
16
|
+
* Emitted when the button is clicked (not emitted when disabled).
|
|
17
|
+
*/
|
|
18
|
+
buttonClick;
|
|
19
|
+
handleClick = (e) => {
|
|
20
|
+
if (this.disabled) {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
e.stopPropagation();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
this.buttonClick.emit(e);
|
|
26
|
+
};
|
|
27
|
+
render() {
|
|
28
|
+
return (h("button", { key: 'b373f44e11e651d0371ce3cade98b4650ccdd727', type: this.type, class: {
|
|
29
|
+
'custom-button': true,
|
|
30
|
+
[`custom-button--${this.variant}`]: true,
|
|
31
|
+
'custom-button--disabled': this.disabled,
|
|
32
|
+
}, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '2a046bc70af051c04f4549def87dac7044b41e04' })));
|
|
33
|
+
}
|
|
34
|
+
static get is() { return "fast-button"; }
|
|
35
|
+
static get encapsulation() { return "shadow"; }
|
|
36
|
+
static get originalStyleUrls() {
|
|
37
|
+
return {
|
|
38
|
+
"$": ["button.css"]
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
static get styleUrls() {
|
|
42
|
+
return {
|
|
43
|
+
"$": ["button.css"]
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
static get properties() {
|
|
47
|
+
return {
|
|
48
|
+
"variant": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"mutable": false,
|
|
51
|
+
"complexType": {
|
|
52
|
+
"original": "ButtonVariant",
|
|
53
|
+
"resolved": "\"primary\" | \"secondary\" | \"text\"",
|
|
54
|
+
"references": {
|
|
55
|
+
"ButtonVariant": {
|
|
56
|
+
"location": "local",
|
|
57
|
+
"path": "/Users/phat.vu/Documents/Paradox/web-component-poc/src/components/button/button.tsx",
|
|
58
|
+
"id": "src/components/button/button.tsx::ButtonVariant"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"required": false,
|
|
63
|
+
"optional": false,
|
|
64
|
+
"docs": {
|
|
65
|
+
"tags": [],
|
|
66
|
+
"text": "Visual variant of the button."
|
|
67
|
+
},
|
|
68
|
+
"getter": false,
|
|
69
|
+
"setter": false,
|
|
70
|
+
"reflect": false,
|
|
71
|
+
"attribute": "variant",
|
|
72
|
+
"defaultValue": "'primary'"
|
|
73
|
+
},
|
|
74
|
+
"type": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"mutable": false,
|
|
77
|
+
"complexType": {
|
|
78
|
+
"original": "ButtonType",
|
|
79
|
+
"resolved": "\"button\" | \"submit\"",
|
|
80
|
+
"references": {
|
|
81
|
+
"ButtonType": {
|
|
82
|
+
"location": "local",
|
|
83
|
+
"path": "/Users/phat.vu/Documents/Paradox/web-component-poc/src/components/button/button.tsx",
|
|
84
|
+
"id": "src/components/button/button.tsx::ButtonType"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"required": false,
|
|
89
|
+
"optional": false,
|
|
90
|
+
"docs": {
|
|
91
|
+
"tags": [],
|
|
92
|
+
"text": "Native button type (button or submit)."
|
|
93
|
+
},
|
|
94
|
+
"getter": false,
|
|
95
|
+
"setter": false,
|
|
96
|
+
"reflect": false,
|
|
97
|
+
"attribute": "type",
|
|
98
|
+
"defaultValue": "'button'"
|
|
99
|
+
},
|
|
100
|
+
"disabled": {
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "boolean",
|
|
105
|
+
"resolved": "boolean",
|
|
106
|
+
"references": {}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": false,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": "When true, the button is disabled and does not emit events."
|
|
113
|
+
},
|
|
114
|
+
"getter": false,
|
|
115
|
+
"setter": false,
|
|
116
|
+
"reflect": false,
|
|
117
|
+
"attribute": "disabled",
|
|
118
|
+
"defaultValue": "false"
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
static get events() {
|
|
123
|
+
return [{
|
|
124
|
+
"method": "buttonClick",
|
|
125
|
+
"name": "buttonClick",
|
|
126
|
+
"bubbles": true,
|
|
127
|
+
"cancelable": true,
|
|
128
|
+
"composed": true,
|
|
129
|
+
"docs": {
|
|
130
|
+
"tags": [],
|
|
131
|
+
"text": "Emitted when the button is clicked (not emitted when disabled)."
|
|
132
|
+
},
|
|
133
|
+
"complexType": {
|
|
134
|
+
"original": "MouseEvent",
|
|
135
|
+
"resolved": "MouseEvent",
|
|
136
|
+
"references": {
|
|
137
|
+
"MouseEvent": {
|
|
138
|
+
"location": "global",
|
|
139
|
+
"id": "global::MouseEvent"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}];
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.carousel {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.carousel__viewport {
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
touch-action: pan-y pinch-zoom;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.carousel__container {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: row;
|
|
19
|
+
height: 100%;
|
|
20
|
+
margin-left: calc(-0.4rem);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.carousel__container ::slotted(*) {
|
|
24
|
+
flex: 0 0 50%;
|
|
25
|
+
width: 50%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
padding-left: 0.4rem;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.carousel__slide {
|
|
32
|
+
flex: 0 0 50%;
|
|
33
|
+
width: 50%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
padding-left: 0.4rem;
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.carousel__controls {
|
|
40
|
+
display: flex;
|
|
41
|
+
gap: 0.25rem;
|
|
42
|
+
margin-top: 0.25rem;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
align-items: center;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.carousel__prev,
|
|
48
|
+
.carousel__next {
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
padding: 0;
|
|
53
|
+
border: none;
|
|
54
|
+
background: transparent;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
color: currentColor;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.carousel__prev:disabled,
|
|
60
|
+
.carousel__next:disabled {
|
|
61
|
+
opacity: 0.4;
|
|
62
|
+
cursor: not-allowed;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.carousel__icon {
|
|
66
|
+
width: 2.4rem;
|
|
67
|
+
height: 2.4rem;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.carousel__dots {
|
|
71
|
+
display: flex;
|
|
72
|
+
gap: 0.25rem;
|
|
73
|
+
align-items: center;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.carousel__dot {
|
|
77
|
+
padding: 0;
|
|
78
|
+
border: none;
|
|
79
|
+
background: none;
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
width: 0.5rem;
|
|
82
|
+
height: 0.5rem;
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.carousel__dot-inner {
|
|
89
|
+
width: 100%;
|
|
90
|
+
height: 100%;
|
|
91
|
+
border-radius: 50%;
|
|
92
|
+
background-color: var(--carousel-dot-bg, #cbd5e1);
|
|
93
|
+
transition: background-color 0.2s ease;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.carousel__dot.current .carousel__dot-inner {
|
|
97
|
+
background-color: var(--carousel-dot-active-bg, #94a3b8);
|
|
98
|
+
}
|