@next-degree/pickle-shared-js 0.12.1 → 0.12.3

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 (91) hide show
  1. package/dist/{company_service_sanity-Br0R7m-A.d.cts → company_service_sanity-2J1ZuUnu.d.cts} +1 -1
  2. package/dist/{company_service_sanity-DF01qvTz.d.ts → company_service_sanity-KaAGfnNV.d.ts} +1 -1
  3. package/dist/components/jobCard/JobLocation.cjs +92 -12
  4. package/dist/components/jobCard/JobLocation.cjs.map +1 -1
  5. package/dist/components/jobCard/JobLocation.d.cts +7 -5
  6. package/dist/components/jobCard/JobLocation.d.ts +7 -5
  7. package/dist/components/jobCard/JobLocation.js +92 -12
  8. package/dist/components/jobCard/JobLocation.js.map +1 -1
  9. package/dist/components/jobPost/JobHeader.cjs +1 -0
  10. package/dist/components/jobPost/JobHeader.cjs.map +1 -1
  11. package/dist/components/jobPost/JobHeader.js +1 -0
  12. package/dist/components/jobPost/JobHeader.js.map +1 -1
  13. package/dist/components/jobPost/JobPost.cjs +9 -5
  14. package/dist/components/jobPost/JobPost.cjs.map +1 -1
  15. package/dist/components/jobPost/JobPost.d.cts +1 -1
  16. package/dist/components/jobPost/JobPost.d.ts +1 -1
  17. package/dist/components/jobPost/JobPost.js +9 -5
  18. package/dist/components/jobPost/JobPost.js.map +1 -1
  19. package/dist/components/primitives/command.d.cts +3 -3
  20. package/dist/components/primitives/command.d.ts +3 -3
  21. package/dist/components/primitives/input-otp.d.cts +2 -2
  22. package/dist/components/primitives/input-otp.d.ts +2 -2
  23. package/dist/components/ui/Button.d.cts +1 -1
  24. package/dist/components/ui/Button.d.ts +1 -1
  25. package/dist/components/ui/Chip.cjs +1 -0
  26. package/dist/components/ui/Chip.cjs.map +1 -1
  27. package/dist/components/ui/Chip.d.cts +1 -1
  28. package/dist/components/ui/Chip.d.ts +1 -1
  29. package/dist/components/ui/Chip.js +1 -0
  30. package/dist/components/ui/Chip.js.map +1 -1
  31. package/dist/components/ui/Select.cjs +1 -0
  32. package/dist/components/ui/Select.cjs.map +1 -1
  33. package/dist/components/ui/Select.js +1 -0
  34. package/dist/components/ui/Select.js.map +1 -1
  35. package/dist/components/ui/StepTabs.cjs +21 -4
  36. package/dist/components/ui/StepTabs.cjs.map +1 -1
  37. package/dist/components/ui/StepTabs.d.cts +2 -2
  38. package/dist/components/ui/StepTabs.d.ts +2 -2
  39. package/dist/components/ui/StepTabs.js +21 -4
  40. package/dist/components/ui/StepTabs.js.map +1 -1
  41. package/dist/components/ui/buttonShadcn.d.cts +1 -1
  42. package/dist/components/ui/buttonShadcn.d.ts +1 -1
  43. package/dist/{displayText-DzxDrQAT.d.cts → displayText-DW0qiJqh.d.cts} +2 -2
  44. package/dist/{displayText-C1DIK8hr.d.ts → displayText-DahwdHdi.d.ts} +2 -2
  45. package/dist/hooks/useDisplayText.d.cts +3 -3
  46. package/dist/hooks/useDisplayText.d.ts +3 -3
  47. package/dist/index.cjs +80 -19
  48. package/dist/index.cjs.map +1 -1
  49. package/dist/index.d.cts +5 -4
  50. package/dist/index.d.ts +5 -4
  51. package/dist/index.js +80 -19
  52. package/dist/index.js.map +1 -1
  53. package/dist/{job_posting_service_latest-DCbi2bXu.d.cts → job_posting_service_latest-DdgK8Nnz.d.cts} +29 -29
  54. package/dist/{job_posting_service_latest-DCbi2bXu.d.ts → job_posting_service_latest-DdgK8Nnz.d.ts} +29 -29
  55. package/dist/{job_posting_service_sanity-CfLaGMVK.d.ts → job_posting_service_sanity-BKo9TBDT.d.ts} +106 -106
  56. package/dist/{job_posting_service_sanity-B7GvIdYQ.d.cts → job_posting_service_sanity-BNq-Am9N.d.cts} +106 -106
  57. package/dist/lib/locations.cjs +32 -7
  58. package/dist/lib/locations.cjs.map +1 -1
  59. package/dist/lib/locations.d.cts +8 -5
  60. package/dist/lib/locations.d.ts +8 -5
  61. package/dist/lib/locations.js +30 -6
  62. package/dist/lib/locations.js.map +1 -1
  63. package/dist/lib/mappings.d.cts +3 -3
  64. package/dist/lib/mappings.d.ts +3 -3
  65. package/dist/lib/salaryRange.d.cts +1 -1
  66. package/dist/lib/salaryRange.d.ts +1 -1
  67. package/dist/services/displayText.d.cts +3 -3
  68. package/dist/services/displayText.d.ts +3 -3
  69. package/dist/styles/globals.css +23 -7
  70. package/dist/styles/globals.css.map +1 -1
  71. package/dist/types/data/job_posting_service_latest.d.cts +1 -1
  72. package/dist/types/data/job_posting_service_latest.d.ts +1 -1
  73. package/dist/types/data/shared_pickle_output_latest.d.cts +1 -1
  74. package/dist/types/data/shared_pickle_output_latest.d.ts +1 -1
  75. package/dist/types/index.d.cts +4 -4
  76. package/dist/types/index.d.ts +4 -4
  77. package/dist/types/latest/custom/company_service_sanity.d.cts +2 -2
  78. package/dist/types/latest/custom/company_service_sanity.d.ts +2 -2
  79. package/dist/types/latest/custom/job_posting_service_sanity.d.cts +3 -3
  80. package/dist/types/latest/custom/job_posting_service_sanity.d.ts +3 -3
  81. package/dist/types/latest/job_posting_service_latest.d.cts +1 -1
  82. package/dist/types/latest/job_posting_service_latest.d.ts +1 -1
  83. package/dist/types/latest/shared_pickle_output_latest.d.cts +1 -1
  84. package/dist/types/latest/shared_pickle_output_latest.d.ts +1 -1
  85. package/package.json +3 -2
  86. package/dist/{job_posting_service_latest-tqnHqjwc.d.cts → job_posting_service_latest-C_TEBzCf.d.cts} +28 -28
  87. package/dist/{job_posting_service_latest-tqnHqjwc.d.ts → job_posting_service_latest-C_TEBzCf.d.ts} +28 -28
  88. package/dist/{shared_pickle_output_latest-DKOmTyYk.d.cts → shared_pickle_output_latest-CXBCG04N.d.cts} +4 -4
  89. package/dist/{shared_pickle_output_latest-DKOmTyYk.d.ts → shared_pickle_output_latest-CXBCG04N.d.ts} +4 -4
  90. package/dist/{shared_pickle_output_latest--XZhOUyE.d.cts → shared_pickle_output_latest-CtvHTPeX.d.cts} +4 -4
  91. package/dist/{shared_pickle_output_latest--XZhOUyE.d.ts → shared_pickle_output_latest-CtvHTPeX.d.ts} +4 -4
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
3
3
  import * as React from 'react';
4
4
 
5
5
  declare const buttonVariants: (props?: ({
6
- variant?: "link" | "default" | "outline" | "secondary" | "destructive" | "ghost" | null | undefined;
6
+ variant?: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null | undefined;
7
7
  size?: "default" | "icon" | "sm" | "lg" | null | undefined;
8
8
  } & cva_types.ClassProp) | undefined) => string;
9
9
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
3
3
  import * as React from 'react';
4
4
 
5
5
  declare const buttonVariants: (props?: ({
6
- variant?: "link" | "default" | "outline" | "secondary" | "destructive" | "ghost" | null | undefined;
6
+ variant?: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null | undefined;
7
7
  size?: "default" | "icon" | "sm" | "lg" | null | undefined;
8
8
  } & cva_types.ClassProp) | undefined) => string;
9
9
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
@@ -1,7 +1,7 @@
1
1
  import * as zod from 'zod';
2
2
  import { z } from 'zod';
3
- import { E as EmploymentTypeEnum, a as EmploymentLevelEnum, b as JobFunctionEnum, B as BestFitEnum, C as ClinicalSpecialtyEnum, S as ShiftEnum, c as ClinicalSettingEnum } from './job_posting_service_latest-tqnHqjwc.cjs';
4
- import { U as UnitTextEnum, C as CurrencyEnum } from './shared_pickle_output_latest-DKOmTyYk.cjs';
3
+ import { E as EmploymentTypeEnum, a as EmploymentLevelEnum, b as JobFunctionEnum, B as BestFitEnum, C as ClinicalSpecialtyEnum, S as ShiftEnum, c as ClinicalSettingEnum } from './job_posting_service_latest-C_TEBzCf.cjs';
4
+ import { U as UnitTextEnum, C as CurrencyEnum } from './shared_pickle_output_latest-CXBCG04N.cjs';
5
5
 
6
6
  declare const employmentTypeDisplayText: DisplayTextConfig<typeof EmploymentTypeEnum>;
7
7
  declare const unitTextDisplayText: DisplayTextConfig<typeof UnitTextEnum>;
@@ -1,7 +1,7 @@
1
1
  import * as zod from 'zod';
2
2
  import { z } from 'zod';
3
- import { E as EmploymentTypeEnum, a as EmploymentLevelEnum, b as JobFunctionEnum, B as BestFitEnum, C as ClinicalSpecialtyEnum, S as ShiftEnum, c as ClinicalSettingEnum } from './job_posting_service_latest-tqnHqjwc.js';
4
- import { U as UnitTextEnum, C as CurrencyEnum } from './shared_pickle_output_latest-DKOmTyYk.js';
3
+ import { E as EmploymentTypeEnum, a as EmploymentLevelEnum, b as JobFunctionEnum, B as BestFitEnum, C as ClinicalSpecialtyEnum, S as ShiftEnum, c as ClinicalSettingEnum } from './job_posting_service_latest-C_TEBzCf.js';
4
+ import { U as UnitTextEnum, C as CurrencyEnum } from './shared_pickle_output_latest-CXBCG04N.js';
5
5
 
6
6
  declare const employmentTypeDisplayText: DisplayTextConfig<typeof EmploymentTypeEnum>;
7
7
  declare const unitTextDisplayText: DisplayTextConfig<typeof UnitTextEnum>;
@@ -1,7 +1,7 @@
1
- import { S as ServiceMappings } from '../displayText-DzxDrQAT.cjs';
1
+ import { S as ServiceMappings } from '../displayText-DW0qiJqh.cjs';
2
2
  import 'zod';
3
- import '../job_posting_service_latest-tqnHqjwc.cjs';
4
- import '../shared_pickle_output_latest-DKOmTyYk.cjs';
3
+ import '../job_posting_service_latest-C_TEBzCf.cjs';
4
+ import '../shared_pickle_output_latest-CXBCG04N.cjs';
5
5
 
6
6
  declare const useDisplayText: (scope: keyof ServiceMappings, value: string | string[] | undefined | null) => string;
7
7
 
@@ -1,7 +1,7 @@
1
- import { S as ServiceMappings } from '../displayText-C1DIK8hr.js';
1
+ import { S as ServiceMappings } from '../displayText-DahwdHdi.js';
2
2
  import 'zod';
3
- import '../job_posting_service_latest-tqnHqjwc.js';
4
- import '../shared_pickle_output_latest-DKOmTyYk.js';
3
+ import '../job_posting_service_latest-C_TEBzCf.js';
4
+ import '../shared_pickle_output_latest-CXBCG04N.js';
5
5
 
6
6
  declare const useDisplayText: (scope: keyof ServiceMappings, value: string | string[] | undefined | null) => string;
7
7
 
package/dist/index.cjs CHANGED
@@ -83,6 +83,7 @@ var chipVariants = (0, import_cva.cva)(["flex", "items-center", "rounded-3xl", "
83
83
  neutral: ["text-grey-80", "border-grey-10"],
84
84
  primary: ["text-purple-100", "border-purple-20"],
85
85
  danger: ["text-pumpkin-100", "border-pumpkin-20"],
86
+ jobLocation: ["text-grey-80", "border-grey-10", "bg-grey-5"],
86
87
  onboarding: ["text-green-100", "bg-green-10", "cursor-pointer"],
87
88
  onboardingSelected: ["text-white", "bg-green-90", "cursor-pointer"]
88
89
  },
@@ -2036,7 +2037,20 @@ var tabParentVariants = (0, import_cva10.cva)("flex flex-col", {
2036
2037
  variants: {
2037
2038
  variant: {
2038
2039
  primary: "rounded-lg border shadow-sm",
2039
- neutral: ""
2040
+ neutral: "",
2041
+ minimal: "relative overflow-x-auto"
2042
+ }
2043
+ },
2044
+ defaultVariants: {
2045
+ variant: "primary"
2046
+ }
2047
+ });
2048
+ var headerVariants = (0, import_cva10.cva)("flex shrink-0 border-b border-grey-20", {
2049
+ variants: {
2050
+ variant: {
2051
+ primary: "",
2052
+ neutral: "",
2053
+ minimal: "w-fit relative border-none"
2040
2054
  }
2041
2055
  },
2042
2056
  defaultVariants: {
@@ -2049,7 +2063,8 @@ var singleTabVariants = (0, import_cva10.cva)(
2049
2063
  variants: {
2050
2064
  variant: {
2051
2065
  primary: "first:rounded-tl-md last:rounded-tr-md hover:text-purple-100 data-[state=active]:text-purple-100 data-[state=active]:shadow-[inset_0_-1px_0_0,0_1px_0_0] data-[state=active]:shadow-current data-[state=active]:focus:relative data-[state=active]:focus:shadow-[0_0_0_2px] data-[state=active]:focus:shadow-black",
2052
- neutral: "first:rounded-tl-md last:rounded-tr-md hover:text-black data-[state=active]:text-black data-[state=active]:shadow-[inset_0_-1px_0_0,0_1px_0_0] data-[state=active]:shadow-current data-[state=active]:focus:relative"
2066
+ neutral: "first:rounded-tl-md last:rounded-tr-md hover:text-black data-[state=active]:text-black data-[state=active]:shadow-[inset_0_-1px_0_0,0_1px_0_0] data-[state=active]:shadow-current data-[state=active]:focus:relative",
2067
+ minimal: "whitespace-nowrap flex-none first:rounded-tl-md last:rounded-tr-md hover:text-black data-[state=active]:font-bold data-[state=active]:text-black data-[state=active]:shadow-[inset_0_-2px_0_0] data-[state=active]:shadow-current data-[state=active]:focus:relative"
2053
2068
  }
2054
2069
  },
2055
2070
  defaultVariants: {
@@ -2077,7 +2092,7 @@ function StepTabs({
2077
2092
  className: cn(tabParentVariants({ variant }), className),
2078
2093
  ...props,
2079
2094
  children: [
2080
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Tabs.List, { className: "flex shrink-0 border-b border-grey-20", children: list.length > 1 && list.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2095
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Tabs.List, { className: cn(headerVariants({ variant })), children: list.length > 1 && list.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2081
2096
  Tabs.Trigger,
2082
2097
  {
2083
2098
  className: cn(singleTabVariants({ variant }), classNameTab),
@@ -2089,7 +2104,10 @@ function StepTabs({
2089
2104
  children && children.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2090
2105
  Tabs.Content,
2091
2106
  {
2092
- className: "grow rounded-b-md bg-white p-5 outline-none",
2107
+ className: cn(
2108
+ "grow rounded-b-md bg-white p-5 outline-none",
2109
+ variant === "minimal" && "border-t"
2110
+ ),
2093
2111
  value: index.toString(),
2094
2112
  children: child
2095
2113
  },
@@ -3379,14 +3397,37 @@ var useDisplayText = (scope, value) => {
3379
3397
  };
3380
3398
 
3381
3399
  // src/lib/locations.ts
3382
- function formattedAddress(address) {
3400
+ function formattedAddress(address, isRemote = false) {
3401
+ if (!address) return null;
3383
3402
  const { addressLocality, addressRegion, addressCountry } = address;
3384
- if (addressLocality && addressRegion) return `${addressLocality}, ${addressRegion}`;
3385
- if (addressRegion && addressCountry) return `${addressRegion}, ${addressCountry}`;
3386
- if (addressRegion) return addressRegion;
3387
- if (addressCountry) return addressCountry;
3403
+ const remoteMessage = isRemote ? " | Remote" : "";
3404
+ if (addressLocality && addressRegion)
3405
+ return `${addressLocality}, ${addressRegion + remoteMessage}`;
3406
+ if (addressRegion && addressCountry) return `${addressRegion}, ${addressCountry + remoteMessage}`;
3407
+ if (addressRegion) return `${addressRegion + remoteMessage}`;
3408
+ if (addressCountry) return `${addressCountry + remoteMessage}`;
3388
3409
  return null;
3389
3410
  }
3411
+ function getAddressList(jobPost) {
3412
+ const locations = [];
3413
+ if (jobPost.jobLocation) {
3414
+ const address = formattedAddress(jobPost.jobLocation, jobPost.isRemote);
3415
+ if (address) locations.push(address);
3416
+ }
3417
+ if (jobPost.applicableOffices && jobPost.applicableOffices.length > 0) {
3418
+ jobPost.applicableOffices.map((office) => {
3419
+ const address = formattedAddress(office?.geoLocation?.address, jobPost.isRemote);
3420
+ if (address && !locations.includes(address)) locations.push(address);
3421
+ });
3422
+ }
3423
+ if (jobPost.applicantLocationRequirements && jobPost.applicantLocationRequirements.length > 0) {
3424
+ jobPost.applicantLocationRequirements.map((place) => {
3425
+ const address = formattedAddress(place?.address, jobPost.isRemote);
3426
+ if (address && !locations.includes(address)) locations.push(address);
3427
+ });
3428
+ }
3429
+ return locations;
3430
+ }
3390
3431
  function formattedJobLocation(job) {
3391
3432
  const address = job.jobLocation && formattedAddress(job.jobLocation);
3392
3433
  const remote = job.isRemote ? "Remote" : "";
@@ -3498,17 +3539,37 @@ function JobPost({
3498
3539
  // src/components/jobCard/JobLocation.tsx
3499
3540
  var import_lucide_react19 = require("lucide-react");
3500
3541
  var import_jsx_runtime42 = require("react/jsx-runtime");
3501
- function JobLocation({ mainLocation, extendedLocations }) {
3502
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-2", "data-testid": "job-card-location", children: [
3542
+ function JobLocation({ jobPost }) {
3543
+ const locations = getAddressList(jobPost);
3544
+ if (!locations || locations.length === 0) return null;
3545
+ const primaryOffice = locations[0];
3546
+ const extendedLocations = locations.slice(1).map((address) => address);
3547
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-2", "data-testid": "job-location-element", children: [
3503
3548
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react19.MapPin, { size: 16 }),
3504
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm font-thin", children: mainLocation }),
3505
- extendedLocations && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Tooltip, { children: [
3506
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "length-text group text-nowrap rounded-full bg-grey-5 px-2 py-1 text-sm font-bold text-gray-700 group-hover:cursor-pointer", children: [
3507
- "+ ",
3508
- extendedLocations.length,
3509
- " more"
3510
- ] }) }),
3511
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipContent, { className: "border-1 rounded-md border border-grey-5 bg-white p-2", children: extendedLocations.map((location) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "text-nowrap text-sm", children: location }, location)) })
3549
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm font-thin", children: primaryOffice }),
3550
+ extendedLocations.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Tooltip, { children: [
3551
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3552
+ Chip_default,
3553
+ {
3554
+ className: "font-bold",
3555
+ size: "small",
3556
+ variant: "jobLocation",
3557
+ "data-testid": "job-location-tooltip",
3558
+ children: [
3559
+ "+ ",
3560
+ extendedLocations.length,
3561
+ " more"
3562
+ ]
3563
+ }
3564
+ ) }),
3565
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3566
+ TooltipContent,
3567
+ {
3568
+ className: "border-1 rounded-md border border-grey-5 bg-white p-2",
3569
+ "data-testid": "job-location-tooltip-content",
3570
+ children: extendedLocations.map((location) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "text-nowrap text-sm", children: location }, location))
3571
+ }
3572
+ )
3512
3573
  ] }) })
3513
3574
  ] });
3514
3575
  }