@windstream/react-shared-components 0.1.19 → 0.1.21
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/README.md +635 -635
- package/dist/contentful/index.d.ts +1 -1
- package/dist/contentful/index.esm.js +4 -2
- package/dist/contentful/index.esm.js.map +1 -1
- package/dist/contentful/index.js +4 -2
- package/dist/contentful/index.js.map +1 -1
- package/dist/core.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +7 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/next/index.esm.js +3 -1
- package/dist/next/index.esm.js.map +1 -1
- package/dist/next/index.js +3 -1
- package/dist/next/index.js.map +1 -1
- package/dist/utils/index.d.ts +107 -1
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +182 -177
- package/src/components/accordion/Accordion.stories.tsx +230 -230
- package/src/components/accordion/types.ts +11 -11
- package/src/components/alert-card/AlertCard.stories.tsx +171 -171
- package/src/components/alert-card/index.tsx +41 -41
- package/src/components/alert-card/types.ts +13 -13
- package/src/components/brand-button/BrandButton.stories.tsx +223 -223
- package/src/components/brand-button/helpers.ts +35 -35
- package/src/components/brand-button/index.tsx +115 -115
- package/src/components/brand-button/types.ts +37 -37
- package/src/components/button/Button.stories.tsx +108 -108
- package/src/components/button/index.tsx +27 -27
- package/src/components/button/types.ts +14 -14
- package/src/components/call-button/CallButton.stories.tsx +324 -324
- package/src/components/call-button/index.tsx +86 -86
- package/src/components/call-button/types.ts +11 -11
- package/src/components/checkbox/Checkbox.stories.tsx +247 -247
- package/src/components/checkbox/index.tsx +197 -197
- package/src/components/checkbox/types.ts +27 -27
- package/src/components/checklist/Checklist.stories.tsx +150 -150
- package/src/components/checklist/index.tsx +59 -59
- package/src/components/checklist/types.ts +16 -16
- package/src/components/collapse/Collapse.stories.tsx +255 -255
- package/src/components/collapse/index.tsx +46 -46
- package/src/components/collapse/types.ts +6 -6
- package/src/components/divider/Divider.stories.tsx +205 -205
- package/src/components/divider/index.tsx +22 -22
- package/src/components/divider/type.ts +3 -3
- package/src/components/image/Image.stories.tsx +113 -113
- package/src/components/image/index.tsx +25 -25
- package/src/components/image/types.ts +40 -40
- package/src/components/input/Input.stories.tsx +325 -325
- package/src/components/input/index.tsx +177 -177
- package/src/components/input/types.ts +37 -37
- package/src/components/link/Link.stories.tsx +163 -163
- package/src/components/link/index.tsx +14 -2
- package/src/components/link/types.ts +25 -25
- package/src/components/list/List.stories.tsx +272 -272
- package/src/components/list/index.tsx +88 -88
- package/src/components/list/list-item/index.tsx +38 -38
- package/src/components/list/list-item/types.ts +13 -13
- package/src/components/list/types.ts +29 -29
- package/src/components/material-icon/MaterialIcon.stories.tsx +322 -322
- package/src/components/material-icon/constants.ts +98 -98
- package/src/components/material-icon/index.tsx +47 -47
- package/src/components/material-icon/types.ts +31 -31
- package/src/components/modal/Modal.stories.tsx +171 -171
- package/src/components/modal/index.tsx +164 -164
- package/src/components/modal/types.ts +24 -24
- package/src/components/next-image/index.tsx +54 -54
- package/src/components/next-image/types.ts +1 -1
- package/src/components/pagination/index.tsx +100 -100
- package/src/components/pagination/types.ts +6 -6
- package/src/components/radio-button/RadioButton.stories.tsx +307 -307
- package/src/components/radio-button/index.tsx +75 -75
- package/src/components/radio-button/types.ts +21 -21
- package/src/components/see-more/SeeMore.stories.tsx +181 -181
- package/src/components/see-more/index.tsx +44 -44
- package/src/components/see-more/types.ts +4 -4
- package/src/components/select/Select.stories.tsx +411 -411
- package/src/components/select/index.tsx +155 -155
- package/src/components/select/types.ts +36 -36
- package/src/components/select-plan-button/SelectPlanButton.stories.tsx +184 -184
- package/src/components/select-plan-button/index.tsx +57 -57
- package/src/components/select-plan-button/types.ts +14 -14
- package/src/components/skeleton/Skeleton.stories.tsx +179 -179
- package/src/components/skeleton/index.tsx +61 -61
- package/src/components/skeleton/types.ts +4 -4
- package/src/components/spinner/Spinner.stories.tsx +335 -335
- package/src/components/spinner/index.tsx +44 -44
- package/src/components/spinner/types.ts +5 -5
- package/src/components/text/Text.stories.tsx +321 -321
- package/src/components/text/index.tsx +25 -25
- package/src/components/text/types.ts +45 -45
- package/src/components/tooltip/Tooltip.stories.tsx +219 -219
- package/src/components/tooltip/index.tsx +74 -74
- package/src/components/tooltip/types.ts +7 -7
- package/src/components/view-cart-button/ViewCartButton.stories.tsx +252 -252
- package/src/components/view-cart-button/index.tsx +42 -42
- package/src/components/view-cart-button/types.ts +5 -5
- package/src/contentful/blocks/address-input-banner/index.tsx +52 -52
- package/src/contentful/blocks/address-input-banner/types.ts +14 -14
- package/src/contentful/blocks/blogs-grid/index.tsx +129 -129
- package/src/contentful/blocks/blogs-grid/types.ts +26 -26
- package/src/contentful/blocks/button/Button.stories.tsx +40 -40
- package/src/contentful/blocks/button/index.tsx +121 -111
- package/src/contentful/blocks/button/types.ts +36 -36
- package/src/contentful/blocks/callout/Callout.stories.tsx +23 -23
- package/src/contentful/blocks/callout/index.tsx +86 -86
- package/src/contentful/blocks/callout/types.ts +15 -15
- package/src/contentful/blocks/cards/Cards.stories.tsx +23 -23
- package/src/contentful/blocks/cards/blog-card/index.tsx +104 -104
- package/src/contentful/blocks/cards/blog-card/types.ts +15 -15
- package/src/contentful/blocks/cards/index.tsx +13 -13
- package/src/contentful/blocks/cards/product-card/index.tsx +208 -208
- package/src/contentful/blocks/cards/product-card/types.ts +28 -28
- package/src/contentful/blocks/cards/testimonial-card/index.tsx +88 -88
- package/src/contentful/blocks/cards/testimonial-card/types.tsx +12 -12
- package/src/contentful/blocks/cards/types.ts +1 -1
- package/src/contentful/blocks/carousel/Carousel.stories.tsx +23 -23
- package/src/contentful/blocks/carousel/helper.tsx +356 -356
- package/src/contentful/blocks/carousel/index.tsx +73 -73
- package/src/contentful/blocks/carousel/types.ts +143 -143
- package/src/contentful/blocks/cta-callout/CtaCallout.stories.tsx +46 -46
- package/src/contentful/blocks/cta-callout/index.tsx +60 -60
- package/src/contentful/blocks/cta-callout/types.ts +26 -26
- package/src/contentful/blocks/dynamic-tabs/index.tsx +204 -204
- package/src/contentful/blocks/dynamic-tabs/types.ts +21 -21
- package/src/contentful/blocks/find-kinetic/index.tsx +130 -130
- package/src/contentful/blocks/floating-banner/FloatingBanner.stories.tsx +34 -34
- package/src/contentful/blocks/floating-banner/index.tsx +97 -93
- package/src/contentful/blocks/floating-banner/types.ts +22 -22
- package/src/contentful/blocks/footer/Footer.stories.tsx +30 -30
- package/src/contentful/blocks/image-promo-bar/ImagePromoBar.stories.tsx +23 -23
- package/src/contentful/blocks/image-promo-bar/helper.tsx +28 -28
- package/src/contentful/blocks/image-promo-bar/types.ts +44 -44
- package/src/contentful/blocks/image-promo-bar/vimeo-embed.tsx +93 -93
- package/src/contentful/blocks/image-promo-bar/youtube-embed.tsx +46 -46
- package/src/contentful/blocks/modal/constants.ts +53 -53
- package/src/contentful/blocks/modal/index.tsx +91 -91
- package/src/contentful/blocks/modal/types.ts +12 -12
- package/src/contentful/blocks/navigation/desktop-link-groups.tsx/index.tsx +113 -113
- package/src/contentful/blocks/navigation/index.tsx +394 -394
- package/src/contentful/blocks/navigation/mobile-link-groups.tsx/index.tsx +82 -82
- package/src/contentful/blocks/navigation/types.ts +41 -41
- package/src/contentful/blocks/primary-hero/PrimaryHero.stories.tsx +23 -23
- package/src/contentful/blocks/primary-hero/index.tsx +234 -234
- package/src/contentful/blocks/primary-hero/types.ts +35 -35
- package/src/contentful/blocks/search-block/index.tsx +90 -90
- package/src/contentful/blocks/shape-background-wrapper/ShapeBackgroundWrapper.stories.tsx +26 -26
- package/src/contentful/blocks/shape-background-wrapper/index.tsx +124 -124
- package/src/contentful/blocks/shape-background-wrapper/types.ts +36 -36
- package/src/contentful/blocks/text/Text.stories.tsx +23 -23
- package/src/contentful/blocks/text/index.tsx +12 -12
- package/src/contentful/blocks/text/types.ts +1 -1
- package/src/contentful/index.ts +75 -75
- package/src/hooks/use-body-scroll-lock.ts +34 -34
- package/src/hooks/use-outside-click.ts +17 -17
- package/src/index.ts +96 -96
- package/src/next/index.ts +5 -5
- package/src/setupTests.ts +46 -46
- package/src/stories/DocsTemplate.tsx +24 -24
- package/src/styles/globals.css +343 -343
- package/src/types/global.d.ts +9 -9
- package/src/types/micro-components.ts +99 -99
- package/src/types/utm.ts +49 -49
- package/src/utils/cookie.ts +58 -58
- package/src/utils/index.ts +65 -49
- package/src/utils/utm.ts +221 -221
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,111 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
2
|
export { ClassValue, clsx } from 'clsx';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* UTM Parameter Types
|
|
6
|
+
*
|
|
7
|
+
* Type definitions for UTM tracking parameters used across Kinetic applications.
|
|
8
|
+
*/
|
|
9
|
+
/** All tracked UTM and click-ID parameter names */
|
|
10
|
+
type UTMProperty = "utm_content" | "utm_medium" | "utm_campaign" | "utm_source" | "utm_term" | "utm_campaign_id" | "utm_adgroup_id" | "fbclid" | "gclid" | "msclkid";
|
|
11
|
+
/** Partial record of UTM parameter values */
|
|
12
|
+
type UTMProperties = Partial<Record<UTMProperty, string>>;
|
|
13
|
+
/** Segment campaign context schema */
|
|
14
|
+
interface CampaignProperties {
|
|
15
|
+
name?: string;
|
|
16
|
+
source?: string;
|
|
17
|
+
medium?: string;
|
|
18
|
+
term?: string;
|
|
19
|
+
content?: string;
|
|
20
|
+
campaign_id?: string;
|
|
21
|
+
adgroup_id?: string;
|
|
22
|
+
gclid?: string;
|
|
23
|
+
fbclid?: string;
|
|
24
|
+
msclkid?: string;
|
|
25
|
+
}
|
|
26
|
+
/** List of all UTM parameter names for filtering */
|
|
27
|
+
declare const UTM_PARAM_NAMES: UTMProperty[];
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Cookie Helpers for UTM Parameter Storage
|
|
31
|
+
*
|
|
32
|
+
* Provides Base64-encoded JSON cookie storage for UTM parameters.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Reads UTM parameters from the Base64-encoded cookie.
|
|
37
|
+
* @returns Parsed UTMProperties or null if cookie doesn't exist / is invalid.
|
|
38
|
+
*/
|
|
39
|
+
declare function getUTMs(): UTMProperties | null;
|
|
40
|
+
/**
|
|
41
|
+
* Stores UTM parameters as a Base64-encoded JSON cookie.
|
|
42
|
+
* @param utms - The UTM properties to store.
|
|
43
|
+
* @param domain - Cookie domain (defaults to `.windstream.com`).
|
|
44
|
+
*/
|
|
45
|
+
declare function setUTMs(utms: UTMProperties, domain?: string): void;
|
|
46
|
+
/**
|
|
47
|
+
* Removes the UTM cookie.
|
|
48
|
+
* @param domain - Cookie domain (defaults to `.windstream.com`).
|
|
49
|
+
*/
|
|
50
|
+
declare function removeUTMs(domain?: string): void;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* UTM Parameter Helpers
|
|
54
|
+
*
|
|
55
|
+
* Functions for extracting, combining, and mapping UTM parameters
|
|
56
|
+
* for marketing campaign attribution.
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Extracts UTM parameters from the current page URL.
|
|
61
|
+
* Parses window.location.search for the 10 tracked UTM/click-ID params.
|
|
62
|
+
* @returns UTMProperties with any found values, or null if none found.
|
|
63
|
+
*/
|
|
64
|
+
declare function getUtmParametersFromURL(): UTMProperties | null;
|
|
65
|
+
/**
|
|
66
|
+
* Smart-merges existing (cookie) UTMs with newly arrived (URL) UTMs.
|
|
67
|
+
*
|
|
68
|
+
* Logic:
|
|
69
|
+
* - If the same campaign (campaign, medium, source, campaign_id, adgroup_id,
|
|
70
|
+
* fbclid, gclid, msclkid all match): preserve existing utm_content and
|
|
71
|
+
* utm_term (first-touch attribution for ad content/keyword).
|
|
72
|
+
* - If only campaign-level UTMs changed (no new content/term provided):
|
|
73
|
+
* carry forward existing content/term from cookie.
|
|
74
|
+
* - If completely different campaign: new UTMs fully overwrite.
|
|
75
|
+
*
|
|
76
|
+
* @param existing - UTM values currently stored in cookie.
|
|
77
|
+
* @param incoming - UTM values extracted from the current URL.
|
|
78
|
+
* @returns Merged UTMProperties.
|
|
79
|
+
*/
|
|
80
|
+
declare function combineExistingAndNewUTMs(existing: UTMProperties | null, incoming: UTMProperties | null): UTMProperties;
|
|
81
|
+
/**
|
|
82
|
+
* Generates synthetic UTM parameters for organic/direct traffic
|
|
83
|
+
* based on document.referrer.
|
|
84
|
+
*
|
|
85
|
+
* - No referrer → direct / direct
|
|
86
|
+
* - Google/Bing → organic / google or bing
|
|
87
|
+
* - Other external site (not windstream.com) → referral / <domain>
|
|
88
|
+
* - Internal (windstream.com) → null (no cookie set)
|
|
89
|
+
*
|
|
90
|
+
* @returns UTMProperties for organic traffic, or null for internal nav.
|
|
91
|
+
*/
|
|
92
|
+
declare function getOrganicTrafficUtmParameters(): UTMProperties | null;
|
|
93
|
+
/**
|
|
94
|
+
* Maps UTMProperties to Segment's campaign context schema.
|
|
95
|
+
* @param utms - The UTM properties (typically from cookie).
|
|
96
|
+
* @returns CampaignProperties for Segment context.
|
|
97
|
+
*/
|
|
98
|
+
declare function getCampaignProperties(utms: UTMProperties | null): CampaignProperties | null;
|
|
99
|
+
/**
|
|
100
|
+
* Builds a URL with non-UTM query params preserved and UTM params stripped.
|
|
101
|
+
* Used by the Link/Button component when preserveQueryParameters is true.
|
|
102
|
+
*
|
|
103
|
+
* @param href - The target URL/path.
|
|
104
|
+
* @param currentSearch - The current page's search string (e.g. "?foo=bar&utm_source=google").
|
|
105
|
+
* @returns The href with non-UTM params merged and UTM params removed.
|
|
106
|
+
*/
|
|
107
|
+
declare function buildPreservedQueryHref(href: string, currentSearch: string): string;
|
|
108
|
+
|
|
4
109
|
/**
|
|
5
110
|
* Utility function to combine class names using clsx
|
|
6
111
|
* @param inputs - Class values to combine
|
|
@@ -8,4 +113,5 @@ export { ClassValue, clsx } from 'clsx';
|
|
|
8
113
|
*/
|
|
9
114
|
declare const cx: (...val: ClassValue[]) => string;
|
|
10
115
|
|
|
11
|
-
export { cx };
|
|
116
|
+
export { UTM_PARAM_NAMES, buildPreservedQueryHref, combineExistingAndNewUTMs, cx, getCampaignProperties, getOrganicTrafficUtmParameters, getUTMs, getUtmParametersFromURL, removeUTMs, setUTMs };
|
|
117
|
+
export type { CampaignProperties, UTMProperties, UTMProperty };
|
package/dist/utils/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{clsx as
|
|
1
|
+
import{clsx as t}from"clsx";export{clsx}from"clsx";import{extendTailwindMerge as e}from"tailwind-merge";import{Base64 as n}from"js-base64";import u from"js-cookie";const m="utm_parameters",r=".windstream.com";function i(){if("undefined"==typeof window)return null;const t=u.get(m);if(!t)return null;try{const e=n.decode(t);return JSON.parse(e)}catch(t){return null}}function o(t,e=r){if("undefined"==typeof window)return;const i=JSON.stringify(t),o=n.encode(i);u.set(m,o,{domain:e,path:"/",sameSite:"Lax"})}function c(t=r){u.remove(m,{domain:t,path:"/"})}const a=["utm_content","utm_medium","utm_campaign","utm_source","utm_term","utm_campaign_id","utm_adgroup_id","fbclid","gclid","msclkid"];function d(){if("undefined"==typeof window)return null;const t=new URLSearchParams(window.location.search),e={};let n=!1;for(const u of a){const m=t.get(u);m&&(e[u]=m,n=!0)}return n?e:null}function s(t,e){if(!e)return t||{};if(!t)return e;if(["utm_campaign","utm_medium","utm_source","utm_campaign_id","utm_adgroup_id","fbclid","gclid","msclkid"].every(n=>(t[n]||"")===(e[n]||"")))return{...e,utm_content:t.utm_content||e.utm_content,utm_term:t.utm_term||e.utm_term};const n=!!e.utm_content,u=!!e.utm_term;return{...e,...!n&&t.utm_content&&{utm_content:t.utm_content},...!u&&t.utm_term&&{utm_term:t.utm_term}}}function l(){if("undefined"==typeof document)return null;const t=document.referrer;if(!t)return{utm_medium:"direct",utm_source:"direct"};let e;try{e=new URL(t).hostname.toLowerCase()}catch(t){return{utm_medium:"direct",utm_source:"direct"}}return e.includes("windstream.com")||e.includes("gokinetic.com")?null:e.includes("google.")?{utm_medium:"organic",utm_source:"google"}:e.includes("bing.")?{utm_medium:"organic",utm_source:"bing"}:{utm_medium:"referral",utm_source:e}}function _(t){if(!t)return null;const e={};return t.utm_campaign&&(e.name=t.utm_campaign),t.utm_source&&(e.source=t.utm_source),t.utm_medium&&(e.medium=t.utm_medium),t.utm_term&&(e.term=t.utm_term),t.utm_content&&(e.content=t.utm_content),t.utm_campaign_id&&(e.campaign_id=t.utm_campaign_id),t.utm_adgroup_id&&(e.adgroup_id=t.utm_adgroup_id),t.gclid&&(e.gclid=t.gclid),t.fbclid&&(e.fbclid=t.fbclid),t.msclkid&&(e.msclkid=t.msclkid),Object.keys(e).length>0?e:null}function g(t,e){if(!e)return t;const n=new URLSearchParams(e),u=new Set(a),m=new Set([...u,"searchtext","page"]);let r,i;try{if(t.startsWith("http://")||t.startsWith("https://")){const e=new URL(t);r=e.origin+e.pathname,i=e.searchParams}else{const[e,n]=t.split("?");r=e,i=new URLSearchParams(n||"")}}catch(e){return t}const o=new URLSearchParams(i);n.forEach((t,e)=>{m.has(e.toLowerCase())||o.has(e)||o.set(e,t)});const c=o.toString();return c?`${r}?${c}`:r}const f=e({extend:{classGroups:{"font-variants":["heading1","heading2","heading3","heading4","heading5","heading6","subheading1","subheading2","subheading3","subheading4","subheading5","subheading6","body1","body2","body3","footnote","micro","label1","label2","label3","label4"],"button-sizes":["btn-small","btn-medium","btn-large","btn-x-large"]}}}),h=(...e)=>f(t(...e));export{a as UTM_PARAM_NAMES,g as buildPreservedQueryHref,s as combineExistingAndNewUTMs,h as cx,_ as getCampaignProperties,l as getOrganicTrafficUtmParameters,i as getUTMs,d as getUtmParametersFromURL,c as removeUTMs,o as setUTMs};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../src/utils/index.ts"],"sourcesContent":[null],"names":["twMerge","extendTailwindMerge","extend","classGroups","cx","val","clsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../src/utils/cookie.ts","../../src/types/utm.ts","../../src/utils/utm.ts","../../src/utils/index.ts"],"sourcesContent":[null,null,null,null],"names":["UTM_COOKIE_KEY","DEFAULT_DOMAIN","getUTMs","window","raw","Cookies","get","decoded","Base64","decode","JSON","parse","_a","setUTMs","utms","domain","json","stringify","encoded","encode","set","path","sameSite","removeUTMs","remove","UTM_PARAM_NAMES","getUtmParametersFromURL","searchParams","URLSearchParams","location","search","found","param","value","combineExistingAndNewUTMs","existing","incoming","every","key","utm_content","utm_term","hasNewContent","hasNewTerm","getOrganicTrafficUtmParameters","document","referrer","utm_medium","utm_source","referrerHost","URL","hostname","toLowerCase","includes","getCampaignProperties","campaign","utm_campaign","name","source","medium","term","content","utm_campaign_id","campaign_id","utm_adgroup_id","adgroup_id","gclid","fbclid","msclkid","Object","keys","length","buildPreservedQueryHref","href","currentSearch","currentParams","utmSet","Set","stripParams","basePath","targetParams","startsWith","url","origin","pathname","query","split","merged","forEach","has","queryString","toString","twMerge","extendTailwindMerge","extend","classGroups","cx","val","clsx"],"mappings":"oKASA,MAAMA,EAAiB,iBACjBC,EAAiB,2BAMPC,IACd,GAAsB,oBAAXC,OAAwB,OAAO,KAE1C,MAAMC,EAAMC,EAAQC,IAAIN,GACxB,IAAKI,EAAK,OAAO,KAEjB,IACE,MAAMG,EAAUC,EAAOC,OAAOL,GAC9B,OAAOM,KAAKC,MAAMJ,EACpB,CAAE,MAAAK,GACA,OAAO,IACT,CACF,UAOgBC,EACdC,EACAC,EAAiBd,GAEjB,GAAsB,oBAAXE,OAAwB,OAEnC,MAAMa,EAAON,KAAKO,UAAUH,GACtBI,EAAUV,EAAOW,OAAOH,GAE9BX,EAAQe,IAAIpB,EAAgBkB,EAAS,CACnCH,SACAM,KAAM,IACNC,SAAU,OAEd,CAMM,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E,GACA,OAAO4D,CACT,CAGA,MAAMc,EAAS,IAAI1D,gBAAgBmD,GAGnCL,EAAca,QAAQ,CAACtD,EAAOK,KACvBuC,EAAYW,IAAIlD,EAAIa,gBAAmBmC,EAAOE,IAAIlD,IACrDgD,EAAOlE,IAAIkB,EAAKL,KAIpB,MAAMwD,EAAcH,EAAOI,WAC3B,OAAOD,EAAc,GAAGX,KAAYW,IAAgBX,CACtD,CCzNA,MAAMa,EAAUC,EAAoB,CAElCC,OAAQ,CACNC,YAAa,CACX,gBAA0B,CACxB,WACA,WACA,WACA,WACA,WACA,WACA,cACA,cACA,cACA,cACA,cACA,cACA,QACA,QACA,QACA,WACA,QACA,SACA,SACA,SACA,UAEF,eAAyB,CACvB,YACA,aACA,YACA,mBAWKC,EAAK,IAAIC,IAAsBL,EAAQM,KAAQD"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("clsx")
|
|
1
|
+
"use strict";var e=require("clsx"),t=require("tailwind-merge"),n=require("js-base64"),r=require("js-cookie");const u="utm_parameters",i=".windstream.com";const m=["utm_content","utm_medium","utm_campaign","utm_source","utm_term","utm_campaign_id","utm_adgroup_id","fbclid","gclid","msclkid"];const c=t.extendTailwindMerge({extend:{classGroups:{"font-variants":["heading1","heading2","heading3","heading4","heading5","heading6","subheading1","subheading2","subheading3","subheading4","subheading5","subheading6","body1","body2","body3","footnote","micro","label1","label2","label3","label4"],"button-sizes":["btn-small","btn-medium","btn-large","btn-x-large"]}}});Object.defineProperty(exports,"clsx",{enumerable:!0,get:function(){return e.clsx}}),exports.UTM_PARAM_NAMES=m,exports.buildPreservedQueryHref=function(e,t){if(!t)return e;const n=new URLSearchParams(t),r=new Set(m),u=new Set([...r,"searchtext","page"]);let i,c;try{if(e.startsWith("http://")||e.startsWith("https://")){const t=new URL(e);i=t.origin+t.pathname,c=t.searchParams}else{const[t,n]=e.split("?");i=t,c=new URLSearchParams(n||"")}}catch(t){return e}const o=new URLSearchParams(c);n.forEach((e,t)=>{u.has(t.toLowerCase())||o.has(t)||o.set(t,e)});const s=o.toString();return s?`${i}?${s}`:i},exports.combineExistingAndNewUTMs=function(e,t){if(!t)return e||{};if(!e)return t;if(["utm_campaign","utm_medium","utm_source","utm_campaign_id","utm_adgroup_id","fbclid","gclid","msclkid"].every(n=>(e[n]||"")===(t[n]||"")))return{...t,utm_content:e.utm_content||t.utm_content,utm_term:e.utm_term||t.utm_term};const n=!!t.utm_content,r=!!t.utm_term;return{...t,...!n&&e.utm_content&&{utm_content:e.utm_content},...!r&&e.utm_term&&{utm_term:e.utm_term}}},exports.cx=(...t)=>c(e.clsx(...t)),exports.getCampaignProperties=function(e){if(!e)return null;const t={};return e.utm_campaign&&(t.name=e.utm_campaign),e.utm_source&&(t.source=e.utm_source),e.utm_medium&&(t.medium=e.utm_medium),e.utm_term&&(t.term=e.utm_term),e.utm_content&&(t.content=e.utm_content),e.utm_campaign_id&&(t.campaign_id=e.utm_campaign_id),e.utm_adgroup_id&&(t.adgroup_id=e.utm_adgroup_id),e.gclid&&(t.gclid=e.gclid),e.fbclid&&(t.fbclid=e.fbclid),e.msclkid&&(t.msclkid=e.msclkid),Object.keys(t).length>0?t:null},exports.getOrganicTrafficUtmParameters=function(){if("undefined"==typeof document)return null;const e=document.referrer;if(!e)return{utm_medium:"direct",utm_source:"direct"};let t;try{t=new URL(e).hostname.toLowerCase()}catch(e){return{utm_medium:"direct",utm_source:"direct"}}return t.includes("windstream.com")||t.includes("gokinetic.com")?null:t.includes("google.")?{utm_medium:"organic",utm_source:"google"}:t.includes("bing.")?{utm_medium:"organic",utm_source:"bing"}:{utm_medium:"referral",utm_source:t}},exports.getUTMs=function(){if("undefined"==typeof window)return null;const e=r.get(u);if(!e)return null;try{const t=n.Base64.decode(e);return JSON.parse(t)}catch(e){return null}},exports.getUtmParametersFromURL=function(){if("undefined"==typeof window)return null;const e=new URLSearchParams(window.location.search),t={};let n=!1;for(const r of m){const u=e.get(r);u&&(t[r]=u,n=!0)}return n?t:null},exports.removeUTMs=function(e=i){r.remove(u,{domain:e,path:"/"})},exports.setUTMs=function(e,t=i){if("undefined"==typeof window)return;const m=JSON.stringify(e),c=n.Base64.encode(m);r.set(u,c,{domain:t,path:"/",sameSite:"Lax"})};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/utils/index.ts"],"sourcesContent":[null],"names":["twMerge","extendTailwindMerge","extend","classGroups","val","clsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/utils/cookie.ts","../../src/types/utm.ts","../../src/utils/index.ts","../../src/utils/utm.ts"],"sourcesContent":[null,null,null,null],"names":["UTM_COOKIE_KEY","DEFAULT_DOMAIN","UTM_PARAM_NAMES","twMerge","extendTailwindMerge","extend","classGroups","href","currentSearch","currentParams","URLSearchParams","utmSet","Set","stripParams","basePath","targetParams","startsWith","url","URL","origin","pathname","searchParams","path","query","split","_a","merged","forEach","value","key","has","toLowerCase","set","queryString","toString","existing","incoming","every","utm_content","utm_term","hasNewContent","hasNewTerm","val","clsx","utms","campaign","utm_campaign","name","utm_source","source","utm_medium","medium","term","content","utm_campaign_id","campaign_id","utm_adgroup_id","adgroup_id","gclid","fbclid","msclkid","Object","keys","length","document","referrer","referrerHost","hostname","includes","window","raw","Cookies","get","decoded","Base64","decode","JSON","parse","location","search","found","param","domain","remove","json","stringify","encoded","encode","sameSite"],"mappings":"6GASA,MAAMA,EAAiB,iBACjBC,EAAiB,kBC2BhB,MAAMC,EAAiC,CAC5C,cACA,aACA,eACA,aACA,WACA,kBACA,iBACA,SACA,QACA,WC5CF,MAAMC,EAAUC,EAAAA,oBAAoB,CAElCC,OAAQ,CACNC,YAAa,CACX,gBAA0B,CACxB,WACA,WACA,WACA,WACA,WACA,WACA,cACA,cACA,cACA,cACA,cACA,cACA,QACA,QACA,QACA,WACA,QACA,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AMJ,EACpB,CAAE,MAAAhD,GACA,OAAO,IACT,CACF,6CGTE,GAAsB,oBAAX4C,OAAwB,OAAO,KAE1C,MAAMhD,EAAe,IAAIX,gBAAgB2D,OAAOS,SAASC,QACnDnC,EAAsB,CAAA,EAC5B,IAAIoC,GAAQ,EAEZ,IAAK,MAAMC,KAAS/E,EAAiB,CACnC,MAAM0B,EAAQP,EAAamD,IAAIS,GAC3BrD,IACFgB,EAAKqC,GAASrD,EACdoD,GAAQ,EAEZ,CAEA,OAAOA,EAAQpC,EAAO,IACxB,qBHqBM,SAAqBsC,EAAiBjF,GAC1CsE,EAAQY,OAAOnF,EAAgB,CAAEkF,SAAQ5D,KAAM,KACjD,2BArBEsB,EACAsC,EAAiBjF,GAEjB,GAAsB,oBAAXoE,OAAwB,OAEnC,MAAMe,EAAOR,KAAKS,UAAUzC,GACtB0C,EAAUZ,EAAAA,OAAOa,OAAOH,GAE9Bb,EAAQvC,IAAIhC,EAAgBsF,EAAS,CACnCJ,SACA5D,KAAM,IACNkE,SAAU,OAEd"}
|
package/package.json
CHANGED
|
@@ -1,177 +1,182 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@windstream/react-shared-components",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "Shared React components for Kinetic applications",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"module": "dist/index.esm.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
9
|
-
"typesVersions": {
|
|
10
|
-
"*": {
|
|
11
|
-
"core": [
|
|
12
|
-
"./dist/core.d.ts"
|
|
13
|
-
],
|
|
14
|
-
"utils": [
|
|
15
|
-
"./dist/utils/index.d.ts"
|
|
16
|
-
],
|
|
17
|
-
"contentful": [
|
|
18
|
-
"./dist/contentful/index.d.ts"
|
|
19
|
-
],
|
|
20
|
-
"next": [
|
|
21
|
-
"./dist/next/index.d.ts"
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"exports": {
|
|
26
|
-
".": {
|
|
27
|
-
"types": "./dist/index.d.ts",
|
|
28
|
-
"import": "./dist/index.esm.js",
|
|
29
|
-
"require": "./dist/index.js"
|
|
30
|
-
},
|
|
31
|
-
"./core": {
|
|
32
|
-
"types": "./dist/index.d.ts",
|
|
33
|
-
"import": "./dist/index.esm.js",
|
|
34
|
-
"require": "./dist/index.js"
|
|
35
|
-
},
|
|
36
|
-
"./utils": {
|
|
37
|
-
"types": "./dist/utils/index.d.ts",
|
|
38
|
-
"import": "./dist/utils/index.esm.js",
|
|
39
|
-
"require": "./dist/utils/index.js"
|
|
40
|
-
},
|
|
41
|
-
"./contentful": {
|
|
42
|
-
"types": "./dist/contentful/index.d.ts",
|
|
43
|
-
"import": "./dist/contentful/index.esm.js",
|
|
44
|
-
"require": "./dist/contentful/index.js"
|
|
45
|
-
},
|
|
46
|
-
"./next": {
|
|
47
|
-
"types": "./dist/next/index.d.ts",
|
|
48
|
-
"import": "./dist/next/index.esm.js",
|
|
49
|
-
"require": "./dist/next/index.js"
|
|
50
|
-
},
|
|
51
|
-
"./tailwind.config": {
|
|
52
|
-
"types": "./tailwind.config.cjs",
|
|
53
|
-
"require": "./tailwind.config.cjs",
|
|
54
|
-
"import": "./tailwind.config.cjs",
|
|
55
|
-
"default": "./tailwind.config.cjs"
|
|
56
|
-
},
|
|
57
|
-
"./tailwind.config.cjs": {
|
|
58
|
-
"require": "./tailwind.config.cjs",
|
|
59
|
-
"import": "./tailwind.config.cjs",
|
|
60
|
-
"default": "./tailwind.config.cjs"
|
|
61
|
-
},
|
|
62
|
-
"./styles": {
|
|
63
|
-
"default": "./dist/styles.css"
|
|
64
|
-
},
|
|
65
|
-
"./styles.css": {
|
|
66
|
-
"default": "./dist/styles.css"
|
|
67
|
-
},
|
|
68
|
-
"./src/*": {
|
|
69
|
-
"default": "./src/*"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"files": [
|
|
73
|
-
"dist",
|
|
74
|
-
"src",
|
|
75
|
-
"README.md",
|
|
76
|
-
"tailwind.config.cjs"
|
|
77
|
-
],
|
|
78
|
-
"scripts": {
|
|
79
|
-
"build": "rollup -c",
|
|
80
|
-
"dev": "rollup -c -w",
|
|
81
|
-
"clean": "rimraf dist",
|
|
82
|
-
"prebuild": "npm run clean",
|
|
83
|
-
"lint": "eslint src --ext .ts,.tsx",
|
|
84
|
-
"lint:fix": "eslint src --ext .ts,.tsx --fix",
|
|
85
|
-
"format": "prettier --write \"src/**/*.(js|jsx|ts|tsx|css)\" | grep -v \"changed\" || true",
|
|
86
|
-
"format:check": "prettier --check .",
|
|
87
|
-
"test": "jest",
|
|
88
|
-
"test:watch": "jest --watch",
|
|
89
|
-
"type-check": "tsc --noEmit",
|
|
90
|
-
"storybook": "storybook dev -p 6006",
|
|
91
|
-
"build-storybook": "storybook build"
|
|
92
|
-
},
|
|
93
|
-
"peerDependencies": {
|
|
94
|
-
"next": ">=13.0.0",
|
|
95
|
-
"react": ">=18.0.0",
|
|
96
|
-
"react-dom": ">=18.0.0"
|
|
97
|
-
},
|
|
98
|
-
"peerDependenciesMeta": {
|
|
99
|
-
"next": {
|
|
100
|
-
"optional": true
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
"dependencies": {
|
|
104
|
-
"@types/react-modal": "3.16.3",
|
|
105
|
-
"@types/react-transition-group": "4.4.12",
|
|
106
|
-
"clsx": "2.1.1",
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"react-
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"@
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"@
|
|
120
|
-
"@
|
|
121
|
-
"@
|
|
122
|
-
"@
|
|
123
|
-
"@
|
|
124
|
-
"@
|
|
125
|
-
"@
|
|
126
|
-
"@
|
|
127
|
-
"@
|
|
128
|
-
"@
|
|
129
|
-
"@
|
|
130
|
-
"@
|
|
131
|
-
"@
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"eslint-plugin
|
|
136
|
-
"eslint
|
|
137
|
-
"
|
|
138
|
-
"eslint
|
|
139
|
-
"eslint-
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
"
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
"
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
"
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@windstream/react-shared-components",
|
|
3
|
+
"version": "0.1.21",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Shared React components for Kinetic applications",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.esm.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"typesVersions": {
|
|
10
|
+
"*": {
|
|
11
|
+
"core": [
|
|
12
|
+
"./dist/core.d.ts"
|
|
13
|
+
],
|
|
14
|
+
"utils": [
|
|
15
|
+
"./dist/utils/index.d.ts"
|
|
16
|
+
],
|
|
17
|
+
"contentful": [
|
|
18
|
+
"./dist/contentful/index.d.ts"
|
|
19
|
+
],
|
|
20
|
+
"next": [
|
|
21
|
+
"./dist/next/index.d.ts"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.esm.js",
|
|
29
|
+
"require": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./core": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"import": "./dist/index.esm.js",
|
|
34
|
+
"require": "./dist/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./utils": {
|
|
37
|
+
"types": "./dist/utils/index.d.ts",
|
|
38
|
+
"import": "./dist/utils/index.esm.js",
|
|
39
|
+
"require": "./dist/utils/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./contentful": {
|
|
42
|
+
"types": "./dist/contentful/index.d.ts",
|
|
43
|
+
"import": "./dist/contentful/index.esm.js",
|
|
44
|
+
"require": "./dist/contentful/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./next": {
|
|
47
|
+
"types": "./dist/next/index.d.ts",
|
|
48
|
+
"import": "./dist/next/index.esm.js",
|
|
49
|
+
"require": "./dist/next/index.js"
|
|
50
|
+
},
|
|
51
|
+
"./tailwind.config": {
|
|
52
|
+
"types": "./tailwind.config.cjs",
|
|
53
|
+
"require": "./tailwind.config.cjs",
|
|
54
|
+
"import": "./tailwind.config.cjs",
|
|
55
|
+
"default": "./tailwind.config.cjs"
|
|
56
|
+
},
|
|
57
|
+
"./tailwind.config.cjs": {
|
|
58
|
+
"require": "./tailwind.config.cjs",
|
|
59
|
+
"import": "./tailwind.config.cjs",
|
|
60
|
+
"default": "./tailwind.config.cjs"
|
|
61
|
+
},
|
|
62
|
+
"./styles": {
|
|
63
|
+
"default": "./dist/styles.css"
|
|
64
|
+
},
|
|
65
|
+
"./styles.css": {
|
|
66
|
+
"default": "./dist/styles.css"
|
|
67
|
+
},
|
|
68
|
+
"./src/*": {
|
|
69
|
+
"default": "./src/*"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"files": [
|
|
73
|
+
"dist",
|
|
74
|
+
"src",
|
|
75
|
+
"README.md",
|
|
76
|
+
"tailwind.config.cjs"
|
|
77
|
+
],
|
|
78
|
+
"scripts": {
|
|
79
|
+
"build": "rollup -c",
|
|
80
|
+
"dev": "rollup -c -w",
|
|
81
|
+
"clean": "rimraf dist",
|
|
82
|
+
"prebuild": "npm run clean",
|
|
83
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
84
|
+
"lint:fix": "eslint src --ext .ts,.tsx --fix",
|
|
85
|
+
"format": "prettier --write \"src/**/*.(js|jsx|ts|tsx|css)\" | grep -v \"changed\" || true",
|
|
86
|
+
"format:check": "prettier --check .",
|
|
87
|
+
"test": "jest",
|
|
88
|
+
"test:watch": "jest --watch",
|
|
89
|
+
"type-check": "tsc --noEmit",
|
|
90
|
+
"storybook": "storybook dev -p 6006",
|
|
91
|
+
"build-storybook": "storybook build"
|
|
92
|
+
},
|
|
93
|
+
"peerDependencies": {
|
|
94
|
+
"next": ">=13.0.0",
|
|
95
|
+
"react": ">=18.0.0",
|
|
96
|
+
"react-dom": ">=18.0.0"
|
|
97
|
+
},
|
|
98
|
+
"peerDependenciesMeta": {
|
|
99
|
+
"next": {
|
|
100
|
+
"optional": true
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"dependencies": {
|
|
104
|
+
"@types/react-modal": "3.16.3",
|
|
105
|
+
"@types/react-transition-group": "4.4.12",
|
|
106
|
+
"clsx": "2.1.1",
|
|
107
|
+
"js-cookie": "^3.0.5",
|
|
108
|
+
"js-base64": "^3.7.7",
|
|
109
|
+
"react-modal": "3.16.3",
|
|
110
|
+
"react-select": "5.10.2",
|
|
111
|
+
"react-transition-group": "4.4.5",
|
|
112
|
+
"@radix-ui/react-dialog": "1.0.5",
|
|
113
|
+
"framer-motion": "10.12.16"
|
|
114
|
+
},
|
|
115
|
+
"optionalDependencies": {
|
|
116
|
+
"@types/js-cookie": "^3.0.6"
|
|
117
|
+
},
|
|
118
|
+
"devDependencies": {
|
|
119
|
+
"@ianvs/prettier-plugin-sort-imports": "4.7.0",
|
|
120
|
+
"@rollup/plugin-commonjs": "28.0.6",
|
|
121
|
+
"@rollup/plugin-node-resolve": "16.0.1",
|
|
122
|
+
"@rollup/plugin-terser": "0.4.4",
|
|
123
|
+
"@rollup/plugin-typescript": "12.1.4",
|
|
124
|
+
"@storybook/addon-docs": "9.1.3",
|
|
125
|
+
"@storybook/addon-onboarding": "9.1.3",
|
|
126
|
+
"@storybook/blocks": "^9.0.0-alpha.17",
|
|
127
|
+
"@storybook/react": "9.1.3",
|
|
128
|
+
"@storybook/react-vite": "9.1.3",
|
|
129
|
+
"@tailwindcss/typography": "^0.5.19",
|
|
130
|
+
"@testing-library/jest-dom": "6.6.4",
|
|
131
|
+
"@testing-library/react": "16.3.0",
|
|
132
|
+
"@types/react": "18.3.23",
|
|
133
|
+
"@types/react-dom": "18.3.7",
|
|
134
|
+
"@types/react-select": "5.0.1",
|
|
135
|
+
"@typescript-eslint/eslint-plugin": "8.39.0",
|
|
136
|
+
"@typescript-eslint/parser": "8.39.0",
|
|
137
|
+
"autoprefixer": "10.4.21",
|
|
138
|
+
"eslint": "8.57.1",
|
|
139
|
+
"eslint-config-prettier": "10.1.8",
|
|
140
|
+
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
141
|
+
"eslint-plugin-prettier": "5.5.4",
|
|
142
|
+
"eslint-plugin-react": "7.37.5",
|
|
143
|
+
"eslint-plugin-react-hooks": "5.2.0",
|
|
144
|
+
"eslint-plugin-storybook": "9.1.3",
|
|
145
|
+
"jest": "30.0.5",
|
|
146
|
+
"jest-environment-jsdom": "30.0.5",
|
|
147
|
+
"next": "^16.1.6",
|
|
148
|
+
"postcss": "8.5.6",
|
|
149
|
+
"postcss-loader": "8.1.1",
|
|
150
|
+
"prettier": "3.6.2",
|
|
151
|
+
"prettier-plugin-tailwindcss": "0.6.14",
|
|
152
|
+
"rimraf": "^6.1.2",
|
|
153
|
+
"rollup": "4.49.0",
|
|
154
|
+
"rollup-plugin-dts": "6.2.3",
|
|
155
|
+
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
156
|
+
"rollup-plugin-postcss": "4.0.2",
|
|
157
|
+
"rollup-plugin-preserve-directives": "^0.4.0",
|
|
158
|
+
"storybook": "9.1.3",
|
|
159
|
+
"tailwind-merge": "3.3.1",
|
|
160
|
+
"tailwindcss": "3.4.17",
|
|
161
|
+
"tailwindcss-radix": "^4.0.2",
|
|
162
|
+
"typescript": "5.3.3"
|
|
163
|
+
},
|
|
164
|
+
"keywords": [
|
|
165
|
+
"react",
|
|
166
|
+
"components",
|
|
167
|
+
"ui",
|
|
168
|
+
"kinetic",
|
|
169
|
+
"windstream",
|
|
170
|
+
"typescript"
|
|
171
|
+
],
|
|
172
|
+
"author": "Kinetic Team",
|
|
173
|
+
"license": "MIT",
|
|
174
|
+
"repository": {
|
|
175
|
+
"type": "git",
|
|
176
|
+
"url": "https://github.com/kinetic/react-shared-components.git"
|
|
177
|
+
},
|
|
178
|
+
"bugs": {
|
|
179
|
+
"url": "https://github.com/kinetic/react-shared-components/issues"
|
|
180
|
+
},
|
|
181
|
+
"homepage": "https://github.com/kinetic/react-shared-components#readme"
|
|
182
|
+
}
|