@phatvu/web-component-poc 1.0.2 → 1.0.4

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.
Files changed (43) hide show
  1. package/dist/cjs/{fast-carousel.cjs.entry.js → fast-button_4.cjs.entry.js} +233 -3
  2. package/dist/cjs/{index-C756SOR-.js → index-B2BTpdbN.js} +373 -114
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/web-component-poc.cjs.js +2 -2
  5. package/dist/collection/collection-manifest.json +2 -1
  6. package/dist/collection/components/button/button.js +2 -3
  7. package/dist/collection/components/fast-carousel/carousel.js +2 -3
  8. package/dist/collection/components/{jobs-list-only-ui/jobs-list-only-ui.css → jobs-item/jobs-item.css} +1 -75
  9. package/dist/collection/components/jobs-item/jobs-item.js +253 -0
  10. package/dist/collection/components/jobs-list-only/jobs-list-only.css +75 -0
  11. package/dist/collection/components/{jobs-list-only-ui/jobs-list-only-ui.js → jobs-list-only/jobs-list-only.js} +7 -45
  12. package/dist/components/fast-button.js +1 -1
  13. package/dist/components/fast-carousel.js +1 -1
  14. package/dist/components/index.js +1 -1
  15. package/dist/components/{jobs-list-only-ui.d.ts → jobs-item.d.ts} +4 -4
  16. package/dist/components/jobs-item.js +1 -0
  17. package/dist/components/jobs-list-only.d.ts +11 -0
  18. package/dist/components/jobs-list-only.js +1 -0
  19. package/dist/components/p-ClQDwJJB.js +1 -0
  20. package/dist/components/p-UM9TUfe3.js +1 -0
  21. package/dist/esm/{fast-carousel.entry.js → fast-button_4.entry.js} +231 -4
  22. package/dist/esm/{index-D7_MJBO8.js → index-Dk5CvWmb.js} +373 -114
  23. package/dist/esm/loader.js +3 -3
  24. package/dist/esm/web-component-poc.js +3 -3
  25. package/dist/types/components/jobs-item/jobs-item.d.ts +14 -0
  26. package/dist/types/components/{jobs-list-only-ui/jobs-list-only-ui.d.ts → jobs-list-only/jobs-list-only.d.ts} +1 -2
  27. package/dist/types/components.d.ts +99 -10
  28. package/dist/types/types/jobs-list.d.ts +2 -2
  29. package/dist/web-component-poc/{index-xE9n11HX.js.map → index-pJKMKO-T.js.map} +1 -1
  30. package/dist/web-component-poc/p-Dk5CvWmb.js +2 -0
  31. package/dist/web-component-poc/p-df843533.entry.js +1 -0
  32. package/dist/web-component-poc/web-component-poc.esm.js +1 -1
  33. package/hydrate/index.js +102 -552
  34. package/hydrate/index.mjs +102 -552
  35. package/package.json +9 -1
  36. package/readme.md +11 -0
  37. package/dist/cjs/fast-button_2.cjs.entry.js +0 -211
  38. package/dist/components/jobs-list-only-ui.js +0 -1
  39. package/dist/components/p-Cw2MJ5l2.js +0 -1
  40. package/dist/esm/fast-button_2.entry.js +0 -208
  41. package/dist/web-component-poc/p-0bc6d45d.entry.js +0 -1
  42. package/dist/web-component-poc/p-8ab359cc.entry.js +0 -1
  43. package/dist/web-component-poc/p-D7_MJBO8.js +0 -2
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C756SOR-.js');
3
+ var index = require('./index-B2BTpdbN.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  const defineCustomElements = async (win, options) => {
7
7
  if (typeof window === 'undefined') return undefined;
8
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);
9
+ return index.bootstrapLazy([["fast-button_4.cjs",[[512,"jobs-list-only",{"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"]}],[772,"fast-button",{"variant":[1],"type":[1],"disabled":[4]}],[772,"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]}],[512,"jobs-item",{"job":[16],"index":[2],"applyButtonText":[1,"apply-button-text"],"showBrand":[4,"show-brand"],"showReference":[4,"show-reference"],"showEmploymentType":[4,"show-employment-type"],"multiLocationText":[1,"multi-location-text"],"remoteLocationText":[1,"remote-location-text"],"enableKilometers":[4,"enable-kilometers"]}]]]], options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C756SOR-.js');
3
+ var index = require('./index-B2BTpdbN.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
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);
22
+ return index.bootstrapLazy([["fast-button_4.cjs",[[512,"jobs-list-only",{"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"]}],[772,"fast-button",{"variant":[1],"type":[1],"disabled":[4]}],[772,"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]}],[512,"jobs-item",{"job":[16],"index":[2],"applyButtonText":[1,"apply-button-text"],"showBrand":[4,"show-brand"],"showReference":[4,"show-reference"],"showEmploymentType":[4,"show-employment-type"],"multiLocationText":[1,"multi-location-text"],"remoteLocationText":[1,"remote-location-text"],"enableKilometers":[4,"enable-kilometers"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -2,7 +2,8 @@
2
2
  "entries": [
3
3
  "components/button/button.js",
4
4
  "components/fast-carousel/carousel.js",
5
- "components/jobs-list-only-ui/jobs-list-only-ui.js"
5
+ "components/jobs-item/jobs-item.js",
6
+ "components/jobs-list-only/jobs-list-only.js"
6
7
  ],
7
8
  "mixins": [],
8
9
  "compiler": {
@@ -25,14 +25,13 @@ export class CustomButton {
25
25
  this.buttonClick.emit(e);
26
26
  };
27
27
  render() {
28
- return (h("button", { key: 'b373f44e11e651d0371ce3cade98b4650ccdd727', type: this.type, class: {
28
+ return (h("button", { key: '3b74909afe4e305dfd38f0b07657202e3d5bfccd', type: this.type, class: {
29
29
  'custom-button': true,
30
30
  [`custom-button--${this.variant}`]: true,
31
31
  'custom-button--disabled': this.disabled,
32
- }, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '2a046bc70af051c04f4549def87dac7044b41e04' })));
32
+ }, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '49845d350e4665c5c66e30bd9262f788eaaa1e20' })));
33
33
  }
34
34
  static get is() { return "fast-button"; }
35
- static get encapsulation() { return "shadow"; }
36
35
  static get originalStyleUrls() {
37
36
  return {
38
37
  "$": ["button.css"]
@@ -220,16 +220,15 @@ export class AppCarousel {
220
220
  render() {
221
221
  const itemsArray = this.getItemsArray();
222
222
  const useItems = itemsArray !== undefined && itemsArray.length > 0;
223
- return (h("div", { key: '313c58e9c1ea3b9c0d0fd4b9d6354336682d9353', class: `carousel ${this.class || ''}`.trim() }, h("div", { key: '14ad75526a24ed38df053fa221e2fafef6d532ed', class: `carousel__viewport ${this.slideClass || ''}`.trim(), ref: (el) => (this.viewportRef = el) }, h("div", { key: '1d3a771598c382592b789289494f2439fea56918', class: "carousel__container", ref: (el) => (this.containerRef = el) }, useItems && itemsArray
223
+ return (h("div", { key: '3a2ea6c339bf0fe656e5a333789df7a37156b5dc', class: `carousel ${this.class || ''}`.trim() }, h("div", { key: '0a73b925095ae3188e5e40b024bc250e4c183894', class: `carousel__viewport ${this.slideClass || ''}`.trim(), ref: (el) => (this.viewportRef = el) }, h("div", { key: '7fc3b5a72e386f7fa21702aeb363e08da1b728cf', class: "carousel__container", ref: (el) => (this.containerRef = el) }, useItems && itemsArray
224
224
  ? itemsArray.map((item, i) => (h("div", { key: i, class: `carousel__slide ${this.itemClass || ''}`.trim() }, typeof item === 'object' &&
225
225
  item !== null &&
226
226
  'content' in item
227
227
  ? item.content
228
228
  : String(item))))
229
- : null)), !useItems && (h("div", { key: 'cdecd3275ac3c5ffe7a0f46153d3e59ad0d4ba9d', style: { display: 'none' }, "aria-hidden": "true" }, h("slot", { key: '450dd5b90f20166a4d6ef4a0d46d208ad47bbf4b', ref: (el) => (this.slotRef = el) }))), h("div", { key: 'ad4eab3f45204170308d8021799d227eaff36d71', class: `carousel__controls ${this.controlClass || ''}`.trim() }, h("button", { key: '1a4ef7209ea768a55892f4d928da3f6100faab4b', type: "button", "aria-label": "Previous", class: "carousel__prev", ref: (el) => (this.prevBtnRef = el) }, h("svg", { key: '7d579cb030149947791db565bc1520ef2707c360', class: "carousel__icon", "stroke-width": "1.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true" }, h("path", { key: 'fdca1a876d4967c39286bddba6122351fbf0d925', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15.75 19.5L8.25 12l7.5-7.5" }))), h("div", { key: '4d9a30f1988f2ce04f271967f1dd39c5287273f2', class: "carousel__dots", ref: (el) => (this.dotsRef = el) }), h("button", { key: 'c8bc7787821f3277c6d038e3ff1240b3ce936825', type: "button", "aria-label": "Next", class: "carousel__next", ref: (el) => (this.nextBtnRef = el) }, h("svg", { key: 'e6e4eff954b1b08711cc843de558e00a8257e9f8', class: "carousel__icon", "stroke-width": "1.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true" }, h("path", { key: '37b394093f327bdc46f8da1dcf78ec609a585a0a', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" }))))));
229
+ : null)), !useItems && (h("div", { key: 'dee2fc91470728c136c9853cd74ae350ad3c5676', style: { display: 'none' }, "aria-hidden": "true" }, h("slot", { key: '35dd47c03a1b9b6b73d845252c3d0482590f7da2', ref: (el) => (this.slotRef = el) }))), h("div", { key: 'df639ad86ae8533f1dc15eed30afb70d99e36e1a', class: `carousel__controls ${this.controlClass || ''}`.trim() }, h("button", { key: 'c17c0ea9bf023b5d2621e558c957d92b13425584', type: "button", "aria-label": "Previous", class: "carousel__prev", ref: (el) => (this.prevBtnRef = el) }, h("svg", { key: '5125abcae0b08ee72106d511b4c24c2d0f24187b', class: "carousel__icon", "stroke-width": "1.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true" }, h("path", { key: '9b7f28be56f451ad14de226d7163a5587a1cd9e6', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15.75 19.5L8.25 12l7.5-7.5" }))), h("div", { key: '9939d3496092a3f319efac9132cec8097c83b497', class: "carousel__dots", ref: (el) => (this.dotsRef = el) }), h("button", { key: 'a0b1228f6df0065885f1d272386283926e78464b', type: "button", "aria-label": "Next", class: "carousel__next", ref: (el) => (this.nextBtnRef = el) }, h("svg", { key: 'e00c92cc0485f41a30e97d5d0466aaee48a64998', class: "carousel__icon", "stroke-width": "1.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true" }, h("path", { key: 'a35c46fdbd1cd333d3e6f76590f45dd837546165', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" }))))));
230
230
  }
231
231
  static get is() { return "fast-carousel"; }
232
- static get encapsulation() { return "shadow"; }
233
232
  static get originalStyleUrls() {
234
233
  return {
235
234
  "$": ["carousel.css"]
@@ -1,50 +1,4 @@
1
- /* Jobs list only - presentation styles (standalone / mock) */
2
- :host {
3
- display: block;
4
- }
5
-
6
- .jobs-list-root {
7
- list-style: none;
8
- }
9
-
10
- .results-container {
11
- position: relative;
12
- }
13
-
14
- .loader {
15
- display: inline-block;
16
- width: 24px;
17
- height: 24px;
18
- border: 2px solid #ddd;
19
- border-top-color: #1f9755;
20
- border-radius: 50%;
21
- animation: jobs-list-spin 0.8s linear infinite;
22
- }
23
-
24
- .loader.hide {
25
- display: none;
26
- }
27
-
28
- @keyframes jobs-list-spin {
29
- to {
30
- transform: rotate(360deg);
31
- }
32
- }
33
-
34
- .card {
35
- border: 0;
36
- }
37
-
38
- .results-list {
39
- list-style: none;
40
- margin: 0;
41
- padding: 0;
42
- display: block;
43
- }
44
-
45
- .results-list.front {
46
- margin: 3px 0;
47
- }
1
+ /* Job item card styles (extracted from jobs-list-only) */
48
2
 
49
3
  .results-list__item {
50
4
  list-style: none;
@@ -198,31 +152,3 @@
198
152
  width: 14px;
199
153
  height: 14px;
200
154
  }
201
-
202
- /* No results & suggestions */
203
- .share-jobs__no-results {
204
- padding: 24px;
205
- text-align: center;
206
- }
207
-
208
- .share-jobs__no-results h2,
209
- .share-jobs__no-results h3 {
210
- margin: 8px 0;
211
- font-weight: 600;
212
- }
213
-
214
- .card.primary-color {
215
- padding: 16px;
216
- border-radius: 4px;
217
- background: #f8f9fa;
218
- }
219
-
220
- .result-suggestions-title {
221
- margin: 0 0 12px 0;
222
- font-size: 16px;
223
- }
224
-
225
- .results-list .result-suggestions-line {
226
- list-style: none;
227
- margin: 4px 0;
228
- }
@@ -0,0 +1,253 @@
1
+ import { h } from "@stencil/core";
2
+ function getLocationLabel(loc) {
3
+ if (loc.cityStateAbbr)
4
+ return loc.cityStateAbbr;
5
+ const parts = [loc.streetAddress, loc.city, loc.stateAbbr || loc.state, loc.countryAbbr || loc.country].filter(Boolean);
6
+ return parts.join(', ') || loc.locationText || '';
7
+ }
8
+ function getFirstLocation(job) {
9
+ const locs = job.locations;
10
+ if (!locs?.length)
11
+ return undefined;
12
+ return locs[0];
13
+ }
14
+ export class JobsItem {
15
+ job;
16
+ index = 0;
17
+ applyButtonText = 'Apply Now';
18
+ showBrand = true;
19
+ showReference = false;
20
+ showEmploymentType = true;
21
+ multiLocationText = 'More locations';
22
+ remoteLocationText = 'Remote';
23
+ enableKilometers = false;
24
+ formatDistance(distance) {
25
+ const value = this.enableKilometers ? distance * 1.60934 : distance;
26
+ const unit = this.enableKilometers ? 'Km' : 'Miles';
27
+ const str = `${value.toFixed(1)} ${unit}`.replace('.0', '');
28
+ return str;
29
+ }
30
+ render() {
31
+ if (!this.job)
32
+ return null;
33
+ const firstLoc = getFirstLocation(this.job);
34
+ const locationLabel = firstLoc ? getLocationLabel(firstLoc) : '';
35
+ const distance = firstLoc?.distance ?? 0;
36
+ const distanceLabel = distance > 0 ? this.formatDistance(distance) : '';
37
+ const applyHref = this.job.applyURL ||
38
+ (this.job.originalURL ? `${typeof window !== 'undefined' ? window.location.origin : ''}${this.job.originalURL}` : '#');
39
+ const applyLabel = `${this.applyButtonText}, ${this.job.title || ''}`;
40
+ const locs = this.job.locations ?? [];
41
+ const hasMultipleLocations = locs.length > 1;
42
+ return (h("li", { class: "results-list__item" }, h("div", { class: "results-list__item-header" }, h("h3", { class: "results-list__item-title" }, h("a", { class: "results-list__item-title--link", href: applyHref, target: "_blank", rel: "noopener noreferrer" }, this.job.title || ''), this.showReference && (h("span", { class: `reference ${this.job.reference ? '' : 'empty'}` }, this.job.reference || '')), this.job.isRemote && (h("span", { class: this.remoteLocationText ? 'remote' : 'remote remote--empty' }, this.remoteLocationText))), distanceLabel && (h("div", { class: "results-list__item-distance" }, h("span", { class: "results-list__item-distance--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z" }), h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 8v4l2 2" }))), h("span", { class: "results-list__item-distance--label" }, distanceLabel)))), h("div", { class: "results-list__item-content" }, h("div", { class: "results-list__item-info" }, h("div", { class: locs.length
43
+ ? 'results-list__item-street'
44
+ : 'results-list__item-street results-list__item-street--empty' }, h("div", { class: "results-list__item-street--label__wrapper" }, h("span", { class: "results-list__item-street--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0z" }), h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0z" }))), h("span", { class: "results-list__item-street--label" }, locationLabel || '—')), hasMultipleLocations && (h("div", { class: "results-list__item-street--more-locations__wrapper" }, h("span", { class: "results-list__item-street--amount" }, "+", locs.length - 1), h("span", { class: "results-list__item-street--more-locations" }, this.multiLocationText)))), this.showBrand && (h("div", { class: this.job.brandName
45
+ ? 'results-list__item-brand'
46
+ : 'results-list__item-brand results-list__item-brand--empty' }, h("span", { class: "results-list__item-brand--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008z" }))), h("span", { class: "results-list__item-brand--label" }, this.job.brandName || '—'))), this.showEmploymentType && (h("div", { class: this.job.employmentType?.length
47
+ ? 'results-list__item-employment-type'
48
+ : 'results-list__item-employment-type results-list__item-employment-type--empty' }, h("span", { class: "results-list__item-employment-type--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0z" }))), (this.job.employmentType?.length ? this.job.employmentType : ['—']).map((type) => (h("span", { key: type, class: "results-list__item-employment-type--label" }, type))))), (this.job.jobCardExtraFields ?? []).map((field, i) => (h("div", { key: i, class: (Array.isArray(field.value) ? field.value.length : field.value)
49
+ ? field.classname
50
+ : `${field.classname}--empty` }, Array.isArray(field.value)
51
+ ? field.value.map((v, j) => (h("span", { key: j, class: `${field.classname}--label` }, v)))
52
+ : (h("span", { class: `${field.classname}--label` }, String(field.value))))))), h("a", { class: "results-list__item-apply", href: applyHref, target: "_blank", rel: "noopener noreferrer", "aria-label": applyLabel }, h("span", { class: "results-list__item-apply--label" }, this.applyButtonText), h("span", { class: "results-list__item-apply--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M13 7l5 5m0 0l-5 5m5-5H6" })))))));
53
+ }
54
+ static get is() { return "jobs-item"; }
55
+ static get originalStyleUrls() {
56
+ return {
57
+ "$": ["jobs-item.css"]
58
+ };
59
+ }
60
+ static get styleUrls() {
61
+ return {
62
+ "$": ["jobs-item.css"]
63
+ };
64
+ }
65
+ static get properties() {
66
+ return {
67
+ "job": {
68
+ "type": "unknown",
69
+ "mutable": false,
70
+ "complexType": {
71
+ "original": "JobSummary",
72
+ "resolved": "JobSummary",
73
+ "references": {
74
+ "JobSummary": {
75
+ "location": "import",
76
+ "path": "../../types/jobs-list",
77
+ "id": "src/types/jobs-list.ts::JobSummary",
78
+ "referenceLocation": "JobSummary"
79
+ }
80
+ }
81
+ },
82
+ "required": false,
83
+ "optional": false,
84
+ "docs": {
85
+ "tags": [],
86
+ "text": ""
87
+ },
88
+ "getter": false,
89
+ "setter": false
90
+ },
91
+ "index": {
92
+ "type": "number",
93
+ "mutable": false,
94
+ "complexType": {
95
+ "original": "number",
96
+ "resolved": "number",
97
+ "references": {}
98
+ },
99
+ "required": false,
100
+ "optional": false,
101
+ "docs": {
102
+ "tags": [],
103
+ "text": ""
104
+ },
105
+ "getter": false,
106
+ "setter": false,
107
+ "reflect": false,
108
+ "attribute": "index",
109
+ "defaultValue": "0"
110
+ },
111
+ "applyButtonText": {
112
+ "type": "string",
113
+ "mutable": false,
114
+ "complexType": {
115
+ "original": "string",
116
+ "resolved": "string",
117
+ "references": {}
118
+ },
119
+ "required": false,
120
+ "optional": false,
121
+ "docs": {
122
+ "tags": [],
123
+ "text": ""
124
+ },
125
+ "getter": false,
126
+ "setter": false,
127
+ "reflect": false,
128
+ "attribute": "apply-button-text",
129
+ "defaultValue": "'Apply Now'"
130
+ },
131
+ "showBrand": {
132
+ "type": "boolean",
133
+ "mutable": false,
134
+ "complexType": {
135
+ "original": "boolean",
136
+ "resolved": "boolean",
137
+ "references": {}
138
+ },
139
+ "required": false,
140
+ "optional": false,
141
+ "docs": {
142
+ "tags": [],
143
+ "text": ""
144
+ },
145
+ "getter": false,
146
+ "setter": false,
147
+ "reflect": false,
148
+ "attribute": "show-brand",
149
+ "defaultValue": "true"
150
+ },
151
+ "showReference": {
152
+ "type": "boolean",
153
+ "mutable": false,
154
+ "complexType": {
155
+ "original": "boolean",
156
+ "resolved": "boolean",
157
+ "references": {}
158
+ },
159
+ "required": false,
160
+ "optional": false,
161
+ "docs": {
162
+ "tags": [],
163
+ "text": ""
164
+ },
165
+ "getter": false,
166
+ "setter": false,
167
+ "reflect": false,
168
+ "attribute": "show-reference",
169
+ "defaultValue": "false"
170
+ },
171
+ "showEmploymentType": {
172
+ "type": "boolean",
173
+ "mutable": false,
174
+ "complexType": {
175
+ "original": "boolean",
176
+ "resolved": "boolean",
177
+ "references": {}
178
+ },
179
+ "required": false,
180
+ "optional": false,
181
+ "docs": {
182
+ "tags": [],
183
+ "text": ""
184
+ },
185
+ "getter": false,
186
+ "setter": false,
187
+ "reflect": false,
188
+ "attribute": "show-employment-type",
189
+ "defaultValue": "true"
190
+ },
191
+ "multiLocationText": {
192
+ "type": "string",
193
+ "mutable": false,
194
+ "complexType": {
195
+ "original": "string",
196
+ "resolved": "string",
197
+ "references": {}
198
+ },
199
+ "required": false,
200
+ "optional": false,
201
+ "docs": {
202
+ "tags": [],
203
+ "text": ""
204
+ },
205
+ "getter": false,
206
+ "setter": false,
207
+ "reflect": false,
208
+ "attribute": "multi-location-text",
209
+ "defaultValue": "'More locations'"
210
+ },
211
+ "remoteLocationText": {
212
+ "type": "string",
213
+ "mutable": false,
214
+ "complexType": {
215
+ "original": "string",
216
+ "resolved": "string",
217
+ "references": {}
218
+ },
219
+ "required": false,
220
+ "optional": false,
221
+ "docs": {
222
+ "tags": [],
223
+ "text": ""
224
+ },
225
+ "getter": false,
226
+ "setter": false,
227
+ "reflect": false,
228
+ "attribute": "remote-location-text",
229
+ "defaultValue": "'Remote'"
230
+ },
231
+ "enableKilometers": {
232
+ "type": "boolean",
233
+ "mutable": false,
234
+ "complexType": {
235
+ "original": "boolean",
236
+ "resolved": "boolean",
237
+ "references": {}
238
+ },
239
+ "required": false,
240
+ "optional": false,
241
+ "docs": {
242
+ "tags": [],
243
+ "text": ""
244
+ },
245
+ "getter": false,
246
+ "setter": false,
247
+ "reflect": false,
248
+ "attribute": "enable-kilometers",
249
+ "defaultValue": "false"
250
+ }
251
+ };
252
+ }
253
+ }
@@ -0,0 +1,75 @@
1
+ /* Jobs list only - presentation styles (standalone / mock) */
2
+ :host {
3
+ display: block;
4
+ }
5
+
6
+ .jobs-list-root {
7
+ list-style: none;
8
+ }
9
+
10
+ .results-container {
11
+ position: relative;
12
+ }
13
+
14
+ .loader {
15
+ display: inline-block;
16
+ width: 24px;
17
+ height: 24px;
18
+ border: 2px solid #ddd;
19
+ border-top-color: #1f9755;
20
+ border-radius: 50%;
21
+ animation: jobs-list-spin 0.8s linear infinite;
22
+ }
23
+
24
+ .loader.hide {
25
+ display: none;
26
+ }
27
+
28
+ @keyframes jobs-list-spin {
29
+ to {
30
+ transform: rotate(360deg);
31
+ }
32
+ }
33
+
34
+ .card {
35
+ border: 0;
36
+ }
37
+
38
+ .results-list {
39
+ list-style: none;
40
+ margin: 0;
41
+ padding: 0;
42
+ display: block;
43
+ }
44
+
45
+ .results-list.front {
46
+ margin: 3px 0;
47
+ }
48
+
49
+ /* No results & suggestions */
50
+ .share-jobs__no-results {
51
+ padding: 24px;
52
+ text-align: center;
53
+ }
54
+
55
+ .share-jobs__no-results h2,
56
+ .share-jobs__no-results h3 {
57
+ margin: 8px 0;
58
+ font-weight: 600;
59
+ }
60
+
61
+ .card.primary-color {
62
+ padding: 16px;
63
+ border-radius: 4px;
64
+ background: #f8f9fa;
65
+ }
66
+
67
+ .result-suggestions-title {
68
+ margin: 0 0 12px 0;
69
+ font-size: 16px;
70
+ }
71
+
72
+ .results-list .result-suggestions-line {
73
+ list-style: none;
74
+ margin: 4px 0;
75
+ }
@@ -2,19 +2,7 @@ import { h } from "@stencil/core";
2
2
  import { mockJobsListOnly } from "../../mock/jobs-list-only.mock";
3
3
  const defaultNoResultsLine1 = "Sorry, we're not able to load results for your search.";
4
4
  const defaultNoResultsLine2 = 'Please refine your keywords in the search bar above and try again.';
5
- function getLocationLabel(loc) {
6
- if (loc.cityStateAbbr)
7
- return loc.cityStateAbbr;
8
- const parts = [loc.streetAddress, loc.city, loc.stateAbbr || loc.state, loc.countryAbbr || loc.country].filter(Boolean);
9
- return parts.join(', ') || loc.locationText || '';
10
- }
11
- function getFirstLocation(job) {
12
- const locs = job.locations;
13
- if (!locs?.length)
14
- return undefined;
15
- return locs[0];
16
- }
17
- export class JobsListOnlyUI {
5
+ export class JobsListOnly {
18
6
  /**
19
7
  * When "true", use built-in mock data (for local/dev/docs). Otherwise use `jobs` from API/parent.
20
8
  */
@@ -61,34 +49,8 @@ export class JobsListOnlyUI {
61
49
  }
62
50
  return [];
63
51
  }
64
- formatDistance(distance) {
65
- const value = this.enableKilometers ? distance * 1.60934 : distance;
66
- const unit = this.enableKilometers ? 'Km' : 'Miles';
67
- const str = `${value.toFixed(1)} ${unit}`.replace('.0', '');
68
- return str;
69
- }
70
- renderJobItem(job, _index) {
71
- const firstLoc = getFirstLocation(job);
72
- const locationLabel = firstLoc ? getLocationLabel(firstLoc) : '';
73
- const distance = firstLoc?.distance ?? 0;
74
- const distanceLabel = distance > 0 ? this.formatDistance(distance) : '';
75
- const applyHref = job.applyURL || (job.originalURL ? `${typeof window !== 'undefined' ? window.location.origin : ''}${job.originalURL}` : '#');
76
- const applyLabel = `${this.applyButtonText}, ${job.title || ''}`;
77
- const locs = job.locations ?? [];
78
- const hasMultipleLocations = locs.length > 1;
79
- return (h("li", { class: "results-list__item" }, h("div", { class: "results-list__item-header" }, h("h3", { class: "results-list__item-title" }, h("a", { class: "results-list__item-title--link", href: applyHref, target: "_blank", rel: "noopener noreferrer" }, job.title || ''), this.showReference && (h("span", { class: `reference ${job.reference ? '' : 'empty'}` }, job.reference || '')), job.isRemote && (h("span", { class: this.remoteLocationText ? 'remote' : 'remote remote--empty' }, this.remoteLocationText))), distanceLabel && (h("div", { class: "results-list__item-distance" }, h("span", { class: "results-list__item-distance--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z" }), h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 8v4l2 2" }))), h("span", { class: "results-list__item-distance--label" }, distanceLabel)))), h("div", { class: "results-list__item-content" }, h("div", { class: "results-list__item-info" }, h("div", { class: locs.length
80
- ? 'results-list__item-street'
81
- : 'results-list__item-street results-list__item-street--empty' }, h("div", { class: "results-list__item-street--label__wrapper" }, h("span", { class: "results-list__item-street--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0z" }), h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0z" }))), h("span", { class: "results-list__item-street--label" }, locationLabel || '—')), hasMultipleLocations && (h("div", { class: "results-list__item-street--more-locations__wrapper" }, h("span", { class: "results-list__item-street--amount" }, "+", locs.length - 1), h("span", { class: "results-list__item-street--more-locations" }, this.multiLocationText)))), this.showBrand && (h("div", { class: job.brandName
82
- ? 'results-list__item-brand'
83
- : 'results-list__item-brand results-list__item-brand--empty' }, h("span", { class: "results-list__item-brand--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008z" }))), h("span", { class: "results-list__item-brand--label" }, job.brandName || '—'))), this.showEmploymentType && (h("div", { class: job.employmentType?.length
84
- ? 'results-list__item-employment-type'
85
- : 'results-list__item-employment-type results-list__item-employment-type--empty' }, h("span", { class: "results-list__item-employment-type--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0z" }))), (job.employmentType?.length
86
- ? job.employmentType
87
- : ['—']).map((type) => (h("span", { key: type, class: "results-list__item-employment-type--label" }, type))))), (job.jobCardExtraFields ?? []).map((field, i) => (h("div", { key: i, class: (Array.isArray(field.value) ? field.value.length : field.value)
88
- ? field.classname
89
- : `${field.classname}--empty` }, Array.isArray(field.value)
90
- ? field.value.map((v, j) => (h("span", { key: j, class: `${field.classname}--label` }, v)))
91
- : (h("span", { class: `${field.classname}--label` }, String(field.value))))))), h("a", { class: "results-list__item-apply", href: applyHref, target: "_blank", rel: "noopener noreferrer", "aria-label": applyLabel }, h("span", { class: "results-list__item-apply--label" }, this.applyButtonText), h("span", { class: "results-list__item-apply--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M13 7l5 5m0 0l-5 5m5-5H6" })))))));
52
+ renderJobItem(job, index) {
53
+ return (h("jobs-item", { job: job, index: index, applyButtonText: this.applyButtonText, showBrand: this.showBrand, showReference: this.showReference, showEmploymentType: this.showEmploymentType, multiLocationText: this.multiLocationText, remoteLocationText: this.remoteLocationText, enableKilometers: this.enableKilometers }));
92
54
  }
93
55
  render() {
94
56
  const jobsArray = this.getJobsArray();
@@ -96,17 +58,17 @@ export class JobsListOnlyUI {
96
58
  const totalJob = this.mockData ? jobsArray.length : (this.totalJob || jobsArray.length);
97
59
  const showNoResults = !loading && totalJob === 0 && !this.showSuggestions;
98
60
  const showSuggestionsBlock = !loading && totalJob === 0 && this.showSuggestions;
99
- return (h("div", { key: 'c2e9c9146a24f0869cbd75588b2718c94f62bbbc', class: `jobs-list-root ${this.rootClass}`.trim() }, h("div", { key: 'b2f3dffe7e17797b378bd648f54e46bb31e2d374', class: "results-container" }, h("div", { key: '4733870b035ec307b6e691f1d62ed8568e93fd1f', class: loading ? 'loader' : 'loader hide', "aria-hidden": !loading }), totalJob > 0 && (h("div", { key: 'a9438f079041e0121fafdcb42089f27482475491', class: "card" }, h("ul", { key: '3bd7dcc64f46aec24945a25df7345766606a51bd', class: "results-list front" }, jobsArray.map((job, index) => this.renderJobItem(job, index))))), showNoResults && (h("div", { key: '1996476568c745e0ada31b47bb1a1be2efaf6917', class: "share-jobs__no-results" }, h("h2", { key: '8d2a79881428d89d783b05f26d06abbef94f5c2e' }, this.noResultsLine1), h("h3", { key: '855704ea47b06a701c0e59a8bb43fb405ad3bb96' }, this.noResultsLine2))), showSuggestionsBlock && (h("div", { key: '74da6e8243423dc9770f4dc67f46f5627c352349', class: "card primary-color" }, h("h4", { key: 'd3fb2ef03a656331f97afe3692b05bbe064ed124', class: "result-suggestions-title" }, this.clearResultSuggestionsTitleText, ":"), h("ul", { key: '63914647653930e6c686a38d779af20e7e5c17d5', class: "results-list front" }, h("li", { key: '82063c023701d0c42ca2787f382d42a80f569b6a', class: "result-suggestions-line" }, this.clearResultSuggestionsLine1), h("li", { key: '7645d7a7435f76854b8eeb0d693a883fc341764e', class: "result-suggestions-line" }, this.clearResultSuggestionsLine2), h("li", { key: '060675d017137e8b23342c92efadc769e2bae1c2', class: "result-suggestions-line" }, this.clearResultSuggestionsLine3), this.clearResultSuggestionsLine4 && (h("li", { key: '0f6ef00a4f6267dc9ad2441e16f02c82b0994d03', class: "result-suggestions-line" }, this.clearResultSuggestionsLine4))))))));
61
+ return (h("div", { key: '9e69d40c649b4f16617f522c89bc87d4cbffe1e3', class: `jobs-list-root ${this.rootClass}`.trim() }, h("div", { key: '7daf1c09dd1d5553a335f3c81c894a331964ee96', class: "results-container" }, h("div", { key: '9ab3db2b834359a64faee61f8c3dc2daca8211d9', class: loading ? 'loader' : 'loader hide', "aria-hidden": !loading }), totalJob > 0 && (h("div", { key: 'c729ccdf715105b9fbc7af0a1f148c82535772c1', class: "card" }, h("ul", { key: 'b0c5b6baccf7b94819cc2ad9ab970981a5294b42', class: "results-list front" }, jobsArray.map((job, index) => this.renderJobItem(job, index))))), showNoResults && (h("div", { key: '8f1684ddde51474e9c1699f93fb01c56e5406a51', class: "share-jobs__no-results" }, h("h2", { key: '2e3bc4b6b7647e3939588102d659e777207e46e9' }, this.noResultsLine1), h("h3", { key: 'f4881f19ad5db8fdd47aa4d31e1e0435f08da1ab' }, this.noResultsLine2))), showSuggestionsBlock && (h("div", { key: 'ed34907fd90f28571786045f21525895cef6e98a', class: "card primary-color" }, h("h4", { key: '33e96147f1b427df874656c1e0647af1d97fea29', class: "result-suggestions-title" }, this.clearResultSuggestionsTitleText, ":"), h("ul", { key: '570fd8e5068f1a7c809fad47347fe5f469da8bc6', class: "results-list front" }, h("li", { key: 'b5d22dfb448d2888dc010d6e494d1834d3d60034', class: "result-suggestions-line" }, this.clearResultSuggestionsLine1), h("li", { key: '77c1e8bbe9ab238e4f05fdbaf43551aef4f2a36e', class: "result-suggestions-line" }, this.clearResultSuggestionsLine2), h("li", { key: '0bd9503bf686213ae087f74a7b5f2cc62f9c96b7', class: "result-suggestions-line" }, this.clearResultSuggestionsLine3), this.clearResultSuggestionsLine4 && (h("li", { key: '961b2904347e1c5fc6b355a069790f0f2997917f', class: "result-suggestions-line" }, this.clearResultSuggestionsLine4))))))));
100
62
  }
101
- static get is() { return "jobs-list-only-ui"; }
63
+ static get is() { return "jobs-list-only"; }
102
64
  static get originalStyleUrls() {
103
65
  return {
104
- "$": ["jobs-list-only-ui.css"]
66
+ "$": ["jobs-list-only.css"]
105
67
  };
106
68
  }
107
69
  static get styleUrls() {
108
70
  return {
109
- "$": ["jobs-list-only-ui.css"]
71
+ "$": ["jobs-list-only.css"]
110
72
  };
111
73
  }
112
74
  static get properties() {
@@ -1 +1 @@
1
- import{t,p as o,H as s,c as n,h as e}from"./p-Cw2MJ5l2.js";const c=o(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.buttonClick=n(this,"buttonClick")}variant="primary";type="button";disabled=!1;buttonClick;handleClick=t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.buttonClick.emit(t)};render(){return e("button",{key:"b373f44e11e651d0371ce3cade98b4650ccdd727",type:this.type,class:{"custom-button":!0,["custom-button--"+this.variant]:!0,"custom-button--disabled":this.disabled},disabled:this.disabled,onClick:this.handleClick},e("slot",{key:"2a046bc70af051c04f4549def87dac7044b41e04"}))}static get style(){return":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}"}},[769,"fast-button",{variant:[1],type:[1],disabled:[4]}]);function u(){"undefined"!=typeof customElements&&["fast-button"].forEach((o=>{"fast-button"===o&&(customElements.get(t(o))||customElements.define(t(o),c))}))}u();const r=c,a=u;export{r as FastButton,a as defineCustomElement}
1
+ import{t,p as o,H as e,c as n,h as s}from"./p-UM9TUfe3.js";const u=o(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.buttonClick=n(this,"buttonClick")}variant="primary";type="button";disabled=!1;buttonClick;handleClick=t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.buttonClick.emit(t)};render(){return s("button",{key:"3b74909afe4e305dfd38f0b07657202e3d5bfccd",type:this.type,class:{"custom-button":!0,["custom-button--"+this.variant]:!0,"custom-button--disabled":this.disabled},disabled:this.disabled,onClick:this.handleClick},s("slot",{key:"49845d350e4665c5c66e30bd9262f788eaaa1e20"}))}static get style(){return":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}"}},[772,"fast-button",{variant:[1],type:[1],disabled:[4]}]);function c(){"undefined"!=typeof customElements&&["fast-button"].forEach((o=>{"fast-button"===o&&(customElements.get(t(o))||customElements.define(t(o),u))}))}c();const r=u,a=c;export{r as FastButton,a as defineCustomElement}