@purpur/library 9.0.2 → 9.0.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.
- package/CHANGELOG.json +15 -0
- package/CHANGELOG.md +9 -1
- package/dist/ThemeProvider-CrjMv3M8.mjs +337 -0
- package/dist/{ThemeProvider-mOHIAi2k.mjs.map → ThemeProvider-CrjMv3M8.mjs.map} +1 -1
- package/dist/ThemeProvider-ipAIFRUi.js +2 -0
- package/dist/{ThemeProvider-djmNDpmy.js.map → ThemeProvider-ipAIFRUi.js.map} +1 -1
- package/dist/{footer-DY0s_C6e.mjs → footer-DcWsihxS.mjs} +3 -4
- package/dist/{footer-DY0s_C6e.mjs.map → footer-DcWsihxS.mjs.map} +1 -1
- package/dist/footer-DrjAwjuL.js +2 -0
- package/dist/{footer-Btsh40pg.js.map → footer-DrjAwjuL.js.map} +1 -1
- package/dist/footer.cjs.js +1 -1
- package/dist/footer.es.js +1 -1
- package/dist/{hero-banner-Cl5YFaKh.mjs → hero-banner-B8fRHxXc.mjs} +4 -5
- package/dist/{hero-banner-Cl5YFaKh.mjs.map → hero-banner-B8fRHxXc.mjs.map} +1 -1
- package/dist/hero-banner-D3peC1NR.js +2 -0
- package/dist/{hero-banner-4JZr2Tzb.js.map → hero-banner-D3peC1NR.js.map} +1 -1
- package/dist/hero-banner.cjs.js +1 -1
- package/dist/hero-banner.es.js +1 -1
- package/dist/libraries/theme/src/useApplyTheme.d.ts.map +1 -1
- package/dist/library.cjs.js +1 -1
- package/dist/library.es.js +6 -6
- package/dist/promotion-card-C7B5ZJaB.js +2 -0
- package/dist/{promotion-card-DMCtLQwW.js.map → promotion-card-C7B5ZJaB.js.map} +1 -1
- package/dist/{promotion-card-D2F-EWgn.mjs → promotion-card-wGGt75eI.mjs} +4 -5
- package/dist/{promotion-card-D2F-EWgn.mjs.map → promotion-card-wGGt75eI.mjs.map} +1 -1
- package/dist/promotion-card.cjs.js +1 -1
- package/dist/promotion-card.es.js +1 -1
- package/dist/text-area-9ggiIWtJ.js +2 -0
- package/dist/{text-area-C4mcG5c0.js.map → text-area-9ggiIWtJ.js.map} +1 -1
- package/dist/{text-area-CJD8ksqm.mjs → text-area-Cb9Hm2Z9.mjs} +3 -4
- package/dist/{text-area-CJD8ksqm.mjs.map → text-area-Cb9Hm2Z9.mjs.map} +1 -1
- package/dist/text-area.cjs.js +1 -1
- package/dist/text-area.es.js +1 -1
- package/dist/theme.cjs.js +1 -1
- package/dist/theme.es.js +2 -2
- package/dist/tokens/dark.css +9 -0
- package/dist/tokens/dark.d.ts +9 -0
- package/dist/tokens/dark.js +9 -0
- package/dist/tokens/index.css +18 -0
- package/dist/tokens/index.d.ts +9 -0
- package/dist/tokens/index.js +9 -0
- package/dist/useColorScheme-DNNu9bz0.js +2 -0
- package/dist/{useColorScheme-DwlZAnlk.js.map → useColorScheme-DNNu9bz0.js.map} +1 -1
- package/dist/{useColorScheme-CgjazeGp.mjs → useColorScheme-DRQcbSog.mjs} +2 -2
- package/dist/{useColorScheme-CgjazeGp.mjs.map → useColorScheme-DRQcbSog.mjs.map} +1 -1
- package/package.json +21 -24
- package/tokens/dark.css +9 -0
- package/tokens/dark.d.ts +9 -0
- package/tokens/dark.js +9 -0
- package/tokens/index.css +18 -0
- package/tokens/index.d.ts +9 -0
- package/tokens/index.js +9 -0
- package/dist/ThemeProvider-djmNDpmy.js +0 -2
- package/dist/ThemeProvider-mOHIAi2k.mjs +0 -338
- package/dist/footer-Btsh40pg.js +0 -2
- package/dist/hero-banner-4JZr2Tzb.js +0 -2
- package/dist/promotion-card-DMCtLQwW.js +0 -2
- package/dist/text-area-C4mcG5c0.js +0 -2
- package/dist/useColorScheme-DwlZAnlk.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-area-
|
|
1
|
+
{"version":3,"file":"text-area-9ggiIWtJ.js","sources":["../../../components/text-area/src/text-area.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { FieldErrorText } from \"@purpur/field-error-text\";\nimport { FieldHelperText } from \"@purpur/field-helper-text\";\nimport { Label } from \"@purpur/label\";\nimport { useColorScheme } from \"@purpur/theme\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./text-area.module.scss\";\n\nexport const ResizeOption = {\n NONE: \"none\",\n BOTH: \"both\",\n HORIZONTAL: \"horizontal\",\n VERTICAL: \"vertical\",\n} as const;\n\nexport type ResizeOption = (typeof ResizeOption)[keyof typeof ResizeOption];\n\nexport type TextAreaProps = Omit<BaseProps<\"textarea\">, \"id\"> & {\n id: string;\n /**\n * Use to render error message below the text area. The text area renders with error appearance.\n * */\n errorText?: string;\n /**\n * Use to give context about the text area's input. Renders below the text area.\n * */\n helperText?: string;\n /**\n * The label of the text area.\n * */\n label?: string;\n /**\n * The height of the text area, measured in number of rows.\n * */\n rows?: number;\n /**\n * The width of the text area, measured in number of cols.\n * */\n cols?: number;\n /**\n * Controls whether the text area can be resized, and in which direction.\n * */\n resize?: ResizeOption;\n};\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-text-area\";\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n (\n {\n id,\n [\"data-testid\"]: dataTestId,\n className,\n errorText,\n helperText,\n label,\n rows = 3,\n cols = 90,\n resize = ResizeOption.BOTH,\n style,\n ...props\n },\n ref\n ) => {\n const [colorScheme] = useColorScheme();\n\n const getTestId = (name: string) => (dataTestId ? `${dataTestId}-${name}` : undefined);\n\n const helperTextId = helperText ? `${id}-helper-text` : undefined;\n\n const textAreaContainerClassnames = cx(`${rootClassName}__textarea-container`, {\n [`${rootClassName}__textarea-container--disabled`]: props.disabled,\n [`${rootClassName}__textarea-container--readonly`]: props.readOnly && !props.disabled,\n });\n\n return (\n <div className={cx(className, rootClassName)} data-testid={dataTestId}>\n {label && (\n <Label\n htmlFor={id}\n disabled={props.disabled}\n className={styles[`${rootClassName}__label`]}\n data-testid={getTestId(\"label\")}\n >\n {props.required && <span aria-hidden>*</span>}\n {label}\n </Label>\n )}\n <div className={textAreaContainerClassnames}>\n <textarea\n {...props}\n ref={ref}\n id={id}\n data-testid={getTestId(\"textarea\")}\n aria-describedby={props[\"aria-describedby\"] || helperTextId}\n aria-invalid={props[\"aria-invalid\"] || !!errorText}\n className={cx(\n `${rootClassName}__textarea`,\n `${rootClassName}__textarea--${colorScheme}`,\n {\n [`${rootClassName}__textarea--error`]: !!errorText,\n }\n )}\n rows={rows}\n cols={cols}\n style={{ resize, ...style }}\n />\n <div className={styles[`${rootClassName}__frame`]} />\n </div>\n {helperTextId && (\n <FieldHelperText data-testid={getTestId(\"helper-text\")} id={helperTextId}>\n {helperText}\n </FieldHelperText>\n )}\n {errorText && (\n <FieldErrorText data-testid={getTestId(\"error-text\")}>{errorText}</FieldErrorText>\n )}\n </div>\n );\n }\n);\n\nTextArea.displayName = \"TextArea\";\n"],"names":["ResizeOption","cx","c","styles","rootClassName","TextArea","forwardRef","id","dataTestId","className","errorText","helperText","label","rows","cols","resize","style","props","ref","colorScheme","useColorScheme","getTestId","name","helperTextId","textAreaContainerClassnames","jsxs","Label","jsx","FieldHelperText","FieldErrorText"],"mappings":"suCAUaA,EAAe,CAC1B,KAAM,OACN,KAAM,OACN,WAAY,aACZ,SAAU,UACZ,EAgCMC,EAAKC,EAAAA,EAAE,KAAKC,CAAM,EAClBC,EAAgB,mBAETC,EAAWC,EAAAA,WACtB,CACE,CACE,GAAAC,EACA,CAAC,eAAgBC,EACjB,UAAAC,EACA,UAAAC,EACA,WAAAC,EAAA,MACAC,EACA,KAAAC,EAAO,EACP,KAAAC,EAAO,GACP,OAAAC,EAASf,EAAa,KACtB,MAAAgB,EACA,GAAGC,CAAA,EAELC,IACG,CACH,KAAM,CAACC,CAAW,EAAIC,iBAAA,EAEhBC,EAAaC,GAAkBd,EAAa,GAAGA,CAAU,IAAIc,CAAI,GAAK,OAEtEC,EAAeZ,EAAa,GAAGJ,CAAE,eAAiB,OAElDiB,EAA8BvB,EAAG,GAAGG,CAAa,uBAAwB,CAC7E,CAAC,GAAGA,CAAa,gCAAgC,EAAGa,EAAM,SAC1D,CAAC,GAAGb,CAAa,gCAAgC,EAAGa,EAAM,UAAY,CAACA,EAAM,QAAA,CAC9E,EAED,OACEQ,OAAC,OAAI,UAAWxB,EAAGQ,EAAWL,CAAa,EAAG,cAAaI,EACxD,SAAA,CAAAI,GACCa,EAAAA,KAACC,EAAAA,MAAA,CACC,QAASnB,EACT,SAAUU,EAAM,SAChB,UAAWd,EAAO,GAAGC,CAAa,SAAS,EAC3C,cAAaiB,EAAU,OAAO,EAE7B,SAAA,CAAAJ,EAAM,UAAYU,EAAAA,IAAC,OAAA,CAAK,cAAW,GAAC,SAAA,IAAC,EACrCf,CAAA,CAAA,CAAA,EAGLa,EAAAA,KAAC,MAAA,CAAI,UAAWD,EACd,SAAA,CAAAG,EAAAA,IAAC,WAAA,CACE,GAAGV,EACJ,IAAAC,EACA,GAAAX,EACA,cAAac,EAAU,UAAU,EACjC,mBAAkBJ,EAAM,kBAAkB,GAAKM,EAC/C,eAAcN,EAAM,cAAc,GAAK,CAAC,CAACP,EACzC,UAAWT,EACT,GAAGG,CAAa,aAChB,GAAGA,CAAa,eAAee,CAAW,GAC1C,CACE,CAAC,GAAGf,CAAa,mBAAmB,EAAG,CAAC,CAACM,CAAA,CAC3C,EAEF,KAAAG,EACA,KAAAC,EACA,MAAO,CAAE,OAAAC,EAAQ,GAAGC,CAAA,CAAM,CAAA,QAE3B,MAAA,CAAI,UAAWb,EAAO,GAAGC,CAAa,SAAS,CAAA,CAAG,CAAA,EACrD,EACCmB,SACEK,kBAAA,CAAgB,cAAaP,EAAU,aAAa,EAAG,GAAIE,EACzD,SAAAZ,CAAA,CACH,EAEDD,GACCiB,EAAAA,IAACE,EAAAA,eAAA,CAAe,cAAaR,EAAU,YAAY,EAAI,SAAAX,CAAA,CAAU,CAAA,EAErE,CAEJ,CACF,EAEAL,EAAS,YAAc"}
|
|
@@ -3,9 +3,8 @@ import { forwardRef as N } from "react";
|
|
|
3
3
|
import { F as y } from "./field-error-text-CBSX8dGx.mjs";
|
|
4
4
|
import { F as O } from "./field-helper-text-C5ee4SFV.mjs";
|
|
5
5
|
import { L as A } from "./label-7sJe5-pX.mjs";
|
|
6
|
-
import "./ThemeProvider-
|
|
7
|
-
import "
|
|
8
|
-
import { u as C } from "./useColorScheme-CgjazeGp.mjs";
|
|
6
|
+
import "./ThemeProvider-CrjMv3M8.mjs";
|
|
7
|
+
import { u as C } from "./useColorScheme-DRQcbSog.mjs";
|
|
9
8
|
import { c as F } from "./bind-CU-R61T-.mjs";
|
|
10
9
|
const p = {
|
|
11
10
|
"purpur-text-area": "_purpur-text-area_1qqf0_1",
|
|
@@ -91,4 +90,4 @@ export {
|
|
|
91
90
|
R,
|
|
92
91
|
T
|
|
93
92
|
};
|
|
94
|
-
//# sourceMappingURL=text-area-
|
|
93
|
+
//# sourceMappingURL=text-area-Cb9Hm2Z9.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-area-
|
|
1
|
+
{"version":3,"file":"text-area-Cb9Hm2Z9.mjs","sources":["../../../components/text-area/src/text-area.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { FieldErrorText } from \"@purpur/field-error-text\";\nimport { FieldHelperText } from \"@purpur/field-helper-text\";\nimport { Label } from \"@purpur/label\";\nimport { useColorScheme } from \"@purpur/theme\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./text-area.module.scss\";\n\nexport const ResizeOption = {\n NONE: \"none\",\n BOTH: \"both\",\n HORIZONTAL: \"horizontal\",\n VERTICAL: \"vertical\",\n} as const;\n\nexport type ResizeOption = (typeof ResizeOption)[keyof typeof ResizeOption];\n\nexport type TextAreaProps = Omit<BaseProps<\"textarea\">, \"id\"> & {\n id: string;\n /**\n * Use to render error message below the text area. The text area renders with error appearance.\n * */\n errorText?: string;\n /**\n * Use to give context about the text area's input. Renders below the text area.\n * */\n helperText?: string;\n /**\n * The label of the text area.\n * */\n label?: string;\n /**\n * The height of the text area, measured in number of rows.\n * */\n rows?: number;\n /**\n * The width of the text area, measured in number of cols.\n * */\n cols?: number;\n /**\n * Controls whether the text area can be resized, and in which direction.\n * */\n resize?: ResizeOption;\n};\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-text-area\";\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n (\n {\n id,\n [\"data-testid\"]: dataTestId,\n className,\n errorText,\n helperText,\n label,\n rows = 3,\n cols = 90,\n resize = ResizeOption.BOTH,\n style,\n ...props\n },\n ref\n ) => {\n const [colorScheme] = useColorScheme();\n\n const getTestId = (name: string) => (dataTestId ? `${dataTestId}-${name}` : undefined);\n\n const helperTextId = helperText ? `${id}-helper-text` : undefined;\n\n const textAreaContainerClassnames = cx(`${rootClassName}__textarea-container`, {\n [`${rootClassName}__textarea-container--disabled`]: props.disabled,\n [`${rootClassName}__textarea-container--readonly`]: props.readOnly && !props.disabled,\n });\n\n return (\n <div className={cx(className, rootClassName)} data-testid={dataTestId}>\n {label && (\n <Label\n htmlFor={id}\n disabled={props.disabled}\n className={styles[`${rootClassName}__label`]}\n data-testid={getTestId(\"label\")}\n >\n {props.required && <span aria-hidden>*</span>}\n {label}\n </Label>\n )}\n <div className={textAreaContainerClassnames}>\n <textarea\n {...props}\n ref={ref}\n id={id}\n data-testid={getTestId(\"textarea\")}\n aria-describedby={props[\"aria-describedby\"] || helperTextId}\n aria-invalid={props[\"aria-invalid\"] || !!errorText}\n className={cx(\n `${rootClassName}__textarea`,\n `${rootClassName}__textarea--${colorScheme}`,\n {\n [`${rootClassName}__textarea--error`]: !!errorText,\n }\n )}\n rows={rows}\n cols={cols}\n style={{ resize, ...style }}\n />\n <div className={styles[`${rootClassName}__frame`]} />\n </div>\n {helperTextId && (\n <FieldHelperText data-testid={getTestId(\"helper-text\")} id={helperTextId}>\n {helperText}\n </FieldHelperText>\n )}\n {errorText && (\n <FieldErrorText data-testid={getTestId(\"error-text\")}>{errorText}</FieldErrorText>\n )}\n </div>\n );\n }\n);\n\nTextArea.displayName = \"TextArea\";\n"],"names":["ResizeOption","cx","c","styles","rootClassName","TextArea","forwardRef","id","dataTestId","className","errorText","helperText","label","rows","cols","resize","style","props","ref","colorScheme","useColorScheme","getTestId","name","helperTextId","textAreaContainerClassnames","jsxs","Label","jsx","FieldHelperText","FieldErrorText"],"mappings":";;;;;;;;;;;;;;;;;;;;;GAUaA,IAAe;AAAA,EAC1B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,UAAU;AACZ,GAgCMC,IAAKC,EAAE,KAAKC,CAAM,GAClBC,IAAgB,oBAETC,IAAWC;AAAA,EACtB,CACE;AAAA,IACE,IAAAC;AAAA,IACA,CAAC,gBAAgBC;AAAA,IACjB,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,MAAAC,IAAO;AAAA,IACP,QAAAC,IAASf,EAAa;AAAA,IACtB,OAAAgB;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAM,CAACC,CAAW,IAAIC,EAAA,GAEhBC,IAAY,CAACC,MAAkBd,IAAa,GAAGA,CAAU,IAAIc,CAAI,KAAK,QAEtEC,IAAeZ,IAAa,GAAGJ,CAAE,iBAAiB,QAElDiB,IAA8BvB,EAAG,GAAGG,CAAa,wBAAwB;AAAA,MAC7E,CAAC,GAAGA,CAAa,gCAAgC,GAAGa,EAAM;AAAA,MAC1D,CAAC,GAAGb,CAAa,gCAAgC,GAAGa,EAAM,YAAY,CAACA,EAAM;AAAA,IAAA,CAC9E;AAED,WACE,gBAAAQ,EAAC,SAAI,WAAWxB,EAAGQ,GAAWL,CAAa,GAAG,eAAaI,GACxD,UAAA;AAAA,MAAAI,KACC,gBAAAa;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,SAASnB;AAAA,UACT,UAAUU,EAAM;AAAA,UAChB,WAAWd,EAAO,GAAGC,CAAa,SAAS;AAAA,UAC3C,eAAaiB,EAAU,OAAO;AAAA,UAE7B,UAAA;AAAA,YAAAJ,EAAM,YAAY,gBAAAU,EAAC,QAAA,EAAK,eAAW,IAAC,UAAA,KAAC;AAAA,YACrCf;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,MAGL,gBAAAa,EAAC,OAAA,EAAI,WAAWD,GACd,UAAA;AAAA,QAAA,gBAAAG;AAAA,UAAC;AAAA,UAAA;AAAA,YACE,GAAGV;AAAA,YACJ,KAAAC;AAAA,YACA,IAAAX;AAAA,YACA,eAAac,EAAU,UAAU;AAAA,YACjC,oBAAkBJ,EAAM,kBAAkB,KAAKM;AAAA,YAC/C,gBAAcN,EAAM,cAAc,KAAK,CAAC,CAACP;AAAA,YACzC,WAAWT;AAAA,cACT,GAAGG,CAAa;AAAA,cAChB,GAAGA,CAAa,eAAee,CAAW;AAAA,cAC1C;AAAA,gBACE,CAAC,GAAGf,CAAa,mBAAmB,GAAG,CAAC,CAACM;AAAA,cAAA;AAAA,YAC3C;AAAA,YAEF,MAAAG;AAAA,YACA,MAAAC;AAAA,YACA,OAAO,EAAE,QAAAC,GAAQ,GAAGC,EAAA;AAAA,UAAM;AAAA,QAAA;AAAA,0BAE3B,OAAA,EAAI,WAAWb,EAAO,GAAGC,CAAa,SAAS,EAAA,CAAG;AAAA,MAAA,GACrD;AAAA,MACCmB,uBACEK,GAAA,EAAgB,eAAaP,EAAU,aAAa,GAAG,IAAIE,GACzD,UAAAZ,EAAA,CACH;AAAA,MAEDD,KACC,gBAAAiB,EAACE,GAAA,EAAe,eAAaR,EAAU,YAAY,GAAI,UAAAX,EAAA,CAAU;AAAA,IAAA,GAErE;AAAA,EAEJ;AACF;AAEAL,EAAS,cAAc;"}
|
package/dist/text-area.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./text-area-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./text-area-9ggiIWtJ.js");exports.ResizeOption=e.ResizeOption;exports.TextArea=e.TextArea;
|
|
2
2
|
//# sourceMappingURL=text-area.cjs.js.map
|
package/dist/text-area.es.js
CHANGED
package/dist/theme.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ThemeProvider-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ThemeProvider-ipAIFRUi.js"),r=require("./useColorScheme-DNNu9bz0.js");exports.ThemeProvider=e.ThemeProvider;exports.teliaTheme=e.teliaTheme;exports.useApplyTheme=e.useApplyTheme;exports.useTheme=e.useTheme;exports.useColorScheme=r.useColorScheme;
|
|
2
2
|
//# sourceMappingURL=theme.cjs.js.map
|
package/dist/theme.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as a, t as m, a as o, u as r } from "./ThemeProvider-
|
|
2
|
-
import { u } from "./useColorScheme-
|
|
1
|
+
import { T as a, t as m, a as o, u as r } from "./ThemeProvider-CrjMv3M8.mjs";
|
|
2
|
+
import { u } from "./useColorScheme-DRQcbSog.mjs";
|
|
3
3
|
export {
|
|
4
4
|
a as ThemeProvider,
|
|
5
5
|
m as teliaTheme,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@import "./border/variables.dark.css";
|
|
2
|
+
@import "./breakpoint/variables.dark.css";
|
|
3
|
+
@import "./color/variables.dark.css";
|
|
4
|
+
@import "./filter/variables.dark.css";
|
|
5
|
+
@import "./gradient/variables.dark.css";
|
|
6
|
+
@import "./motion/variables.dark.css";
|
|
7
|
+
@import "./shadow/variables.dark.css";
|
|
8
|
+
@import "./spacing/variables.dark.css";
|
|
9
|
+
@import "./typography/variables.dark.css";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./border/variables.dark";
|
|
2
|
+
export * from "./breakpoint/variables.dark";
|
|
3
|
+
export * from "./color/variables.dark";
|
|
4
|
+
export * from "./filter/variables.dark";
|
|
5
|
+
export * from "./gradient/variables.dark";
|
|
6
|
+
export * from "./motion/variables.dark";
|
|
7
|
+
export * from "./shadow/variables.dark";
|
|
8
|
+
export * from "./spacing/variables.dark";
|
|
9
|
+
export * from "./typography/variables.dark";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./border/variables.dark";
|
|
2
|
+
export * from "./breakpoint/variables.dark";
|
|
3
|
+
export * from "./color/variables.dark";
|
|
4
|
+
export * from "./filter/variables.dark";
|
|
5
|
+
export * from "./gradient/variables.dark";
|
|
6
|
+
export * from "./motion/variables.dark";
|
|
7
|
+
export * from "./shadow/variables.dark";
|
|
8
|
+
export * from "./spacing/variables.dark";
|
|
9
|
+
export * from "./typography/variables.dark";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@import "./border/variables.css";
|
|
2
|
+
@import "./breakpoint/variables.css";
|
|
3
|
+
@import "./color/variables.css";
|
|
4
|
+
@import "./filter/variables.css";
|
|
5
|
+
@import "./gradient/variables.css";
|
|
6
|
+
@import "./motion/variables.css";
|
|
7
|
+
@import "./shadow/variables.css";
|
|
8
|
+
@import "./spacing/variables.css";
|
|
9
|
+
@import "./typography/variables.css";
|
|
10
|
+
@import "./border/variables.dark.css";
|
|
11
|
+
@import "./breakpoint/variables.dark.css";
|
|
12
|
+
@import "./color/variables.dark.css";
|
|
13
|
+
@import "./filter/variables.dark.css";
|
|
14
|
+
@import "./gradient/variables.dark.css";
|
|
15
|
+
@import "./motion/variables.dark.css";
|
|
16
|
+
@import "./shadow/variables.dark.css";
|
|
17
|
+
@import "./spacing/variables.dark.css";
|
|
18
|
+
@import "./typography/variables.dark.css";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./border/variables";
|
|
2
|
+
export * from "./breakpoint/variables";
|
|
3
|
+
export * from "./color/variables";
|
|
4
|
+
export * from "./filter/variables";
|
|
5
|
+
export * from "./gradient/variables";
|
|
6
|
+
export * from "./motion/variables";
|
|
7
|
+
export * from "./shadow/variables";
|
|
8
|
+
export * from "./spacing/variables";
|
|
9
|
+
export * from "./typography/variables";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./border/variables";
|
|
2
|
+
export * from "./breakpoint/variables";
|
|
3
|
+
export * from "./color/variables";
|
|
4
|
+
export * from "./filter/variables";
|
|
5
|
+
export * from "./gradient/variables";
|
|
6
|
+
export * from "./motion/variables";
|
|
7
|
+
export * from "./shadow/variables";
|
|
8
|
+
export * from "./spacing/variables";
|
|
9
|
+
export * from "./typography/variables";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColorScheme-
|
|
1
|
+
{"version":3,"file":"useColorScheme-DNNu9bz0.js","sources":["../../theme/src/useColorScheme.ts"],"sourcesContent":["import { useTheme } from \"./ThemeProvider\";\nimport type { ColorOptions } from \"./types\";\n\nexport const useColorScheme = (): [ColorOptions, (colorScheme: ColorOptions) => void] => {\n const { colorScheme, setColorScheme } = useTheme();\n return [colorScheme, setColorScheme];\n};\n"],"names":["useColorScheme","colorScheme","setColorScheme","useTheme"],"mappings":"4DAGaA,EAAiB,IAA2D,CACvF,KAAM,CAAE,YAAAC,EAAa,eAAAC,CAAA,EAAmBC,WAAA,EACxC,MAAO,CAACF,EAAaC,CAAc,CACrC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as r } from "./ThemeProvider-
|
|
1
|
+
import { u as r } from "./ThemeProvider-CrjMv3M8.mjs";
|
|
2
2
|
const c = () => {
|
|
3
3
|
const { colorScheme: e, setColorScheme: o } = r();
|
|
4
4
|
return [e, o];
|
|
@@ -6,4 +6,4 @@ const c = () => {
|
|
|
6
6
|
export {
|
|
7
7
|
c as u
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=useColorScheme-
|
|
9
|
+
//# sourceMappingURL=useColorScheme-DRQcbSog.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColorScheme-
|
|
1
|
+
{"version":3,"file":"useColorScheme-DRQcbSog.mjs","sources":["../../theme/src/useColorScheme.ts"],"sourcesContent":["import { useTheme } from \"./ThemeProvider\";\nimport type { ColorOptions } from \"./types\";\n\nexport const useColorScheme = (): [ColorOptions, (colorScheme: ColorOptions) => void] => {\n const { colorScheme, setColorScheme } = useTheme();\n return [colorScheme, setColorScheme];\n};\n"],"names":["useColorScheme","colorScheme","setColorScheme","useTheme"],"mappings":";AAGO,MAAMA,IAAiB,MAA2D;AACvF,QAAM,EAAE,aAAAC,GAAa,gBAAAC,EAAA,IAAmBC,EAAA;AACxC,SAAO,CAACF,GAAaC,CAAc;AACrC;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpur/library",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.3",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
@@ -86,9 +86,6 @@
|
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
"source": "src/library.ts",
|
|
89
|
-
"dependencies": {
|
|
90
|
-
"change-case": "~5.4.4"
|
|
91
|
-
},
|
|
92
89
|
"devDependencies": {
|
|
93
90
|
"@microsoft/api-extractor": "^7.52.8",
|
|
94
91
|
"@microsoft/rush-lib": "5.166.0",
|
|
@@ -110,62 +107,62 @@
|
|
|
110
107
|
"vite": "^7.2.2",
|
|
111
108
|
"shx": "~0.4.0",
|
|
112
109
|
"@purpur/accordion": "8.21.0",
|
|
113
|
-
"@purpur/alert-badge": "8.21.0",
|
|
114
110
|
"@purpur/action": "8.21.0",
|
|
115
111
|
"@purpur/autocomplete": "8.21.0",
|
|
112
|
+
"@purpur/alert-badge": "8.21.0",
|
|
116
113
|
"@purpur/badge": "8.21.0",
|
|
117
114
|
"@purpur/breadcrumbs": "8.21.0",
|
|
118
115
|
"@purpur/button": "8.21.0",
|
|
119
116
|
"@purpur/calendar": "8.21.0",
|
|
120
|
-
"@purpur/card": "8.21.0",
|
|
121
117
|
"@purpur/checkbox": "8.21.0",
|
|
122
118
|
"@purpur/chip-group": "8.21.0",
|
|
123
119
|
"@purpur/color-dot": "8.21.0",
|
|
124
|
-
"@purpur/
|
|
120
|
+
"@purpur/card": "8.21.0",
|
|
125
121
|
"@purpur/common-types": "8.21.0",
|
|
126
|
-
"@purpur/
|
|
122
|
+
"@purpur/component-rig": "1.0.0",
|
|
127
123
|
"@purpur/container": "8.21.0",
|
|
124
|
+
"@purpur/content-block": "8.21.0",
|
|
128
125
|
"@purpur/countdown": "8.21.0",
|
|
129
126
|
"@purpur/counter-badge": "8.21.0",
|
|
127
|
+
"@purpur/date-picker": "8.21.0",
|
|
130
128
|
"@purpur/cta-link": "8.21.0",
|
|
131
129
|
"@purpur/date-field": "8.21.0",
|
|
132
|
-
"@purpur/date-picker": "8.21.0",
|
|
133
|
-
"@purpur/dismissable-chip-group": "8.21.0",
|
|
134
130
|
"@purpur/drawer": "8.21.0",
|
|
135
|
-
"@purpur/
|
|
131
|
+
"@purpur/dismissable-chip-group": "8.21.0",
|
|
136
132
|
"@purpur/field-helper-text": "8.21.0",
|
|
137
|
-
"@purpur/heading": "8.21.0",
|
|
138
133
|
"@purpur/footer": "8.21.0",
|
|
134
|
+
"@purpur/field-error-text": "8.21.0",
|
|
139
135
|
"@purpur/grid": "8.21.0",
|
|
140
136
|
"@purpur/hero-banner": "8.21.0",
|
|
137
|
+
"@purpur/heading": "8.21.0",
|
|
141
138
|
"@purpur/illustrative-icon": "8.21.0",
|
|
142
139
|
"@purpur/icon": "8.21.0",
|
|
143
|
-
"@purpur/link": "8.21.0",
|
|
144
|
-
"@purpur/listbox": "8.21.0",
|
|
145
140
|
"@purpur/label": "8.21.0",
|
|
141
|
+
"@purpur/link": "8.21.0",
|
|
146
142
|
"@purpur/logo": "8.21.0",
|
|
147
|
-
"@purpur/
|
|
143
|
+
"@purpur/listbox": "8.21.0",
|
|
148
144
|
"@purpur/modal": "8.21.0",
|
|
149
145
|
"@purpur/notification-banner": "8.21.0",
|
|
150
|
-
"@purpur/paragraph": "8.21.0",
|
|
151
|
-
"@purpur/password-field": "8.21.0",
|
|
152
146
|
"@purpur/pagination": "8.21.0",
|
|
153
|
-
"@purpur/
|
|
147
|
+
"@purpur/notification": "8.21.0",
|
|
148
|
+
"@purpur/password-field": "8.21.0",
|
|
154
149
|
"@purpur/popover": "8.21.0",
|
|
150
|
+
"@purpur/paragraph": "8.21.0",
|
|
151
|
+
"@purpur/promotion-card": "8.21.0",
|
|
155
152
|
"@purpur/product-card": "8.21.0",
|
|
156
|
-
"@purpur/radio-card-group": "8.21.0",
|
|
157
153
|
"@purpur/quantity-selector": "8.21.0",
|
|
158
|
-
"@purpur/
|
|
154
|
+
"@purpur/radio-button-group": "8.21.0",
|
|
159
155
|
"@purpur/rich-text": "8.21.0",
|
|
160
|
-
"@purpur/select": "8.21.0",
|
|
161
|
-
"@purpur/skeleton": "8.21.0",
|
|
162
156
|
"@purpur/search-field": "8.21.0",
|
|
163
|
-
"@purpur/
|
|
157
|
+
"@purpur/radio-card-group": "8.21.0",
|
|
158
|
+
"@purpur/select": "8.21.0",
|
|
164
159
|
"@purpur/spacer": "8.21.0",
|
|
160
|
+
"@purpur/slider": "8.21.0",
|
|
165
161
|
"@purpur/spinner": "8.21.0",
|
|
162
|
+
"@purpur/skeleton": "8.21.0",
|
|
166
163
|
"@purpur/stepper": "8.21.0",
|
|
167
|
-
"@purpur/table": "8.21.0",
|
|
168
164
|
"@purpur/tabs": "8.21.0",
|
|
165
|
+
"@purpur/table": "8.21.0",
|
|
169
166
|
"@purpur/text-area": "8.21.0",
|
|
170
167
|
"@purpur/text-field": "8.21.0",
|
|
171
168
|
"@purpur/text-spacing": "8.21.0",
|
package/tokens/dark.css
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@import "./border/variables.dark.css";
|
|
2
|
+
@import "./breakpoint/variables.dark.css";
|
|
3
|
+
@import "./color/variables.dark.css";
|
|
4
|
+
@import "./filter/variables.dark.css";
|
|
5
|
+
@import "./gradient/variables.dark.css";
|
|
6
|
+
@import "./motion/variables.dark.css";
|
|
7
|
+
@import "./shadow/variables.dark.css";
|
|
8
|
+
@import "./spacing/variables.dark.css";
|
|
9
|
+
@import "./typography/variables.dark.css";
|
package/tokens/dark.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./border/variables.dark";
|
|
2
|
+
export * from "./breakpoint/variables.dark";
|
|
3
|
+
export * from "./color/variables.dark";
|
|
4
|
+
export * from "./filter/variables.dark";
|
|
5
|
+
export * from "./gradient/variables.dark";
|
|
6
|
+
export * from "./motion/variables.dark";
|
|
7
|
+
export * from "./shadow/variables.dark";
|
|
8
|
+
export * from "./spacing/variables.dark";
|
|
9
|
+
export * from "./typography/variables.dark";
|
package/tokens/dark.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./border/variables.dark";
|
|
2
|
+
export * from "./breakpoint/variables.dark";
|
|
3
|
+
export * from "./color/variables.dark";
|
|
4
|
+
export * from "./filter/variables.dark";
|
|
5
|
+
export * from "./gradient/variables.dark";
|
|
6
|
+
export * from "./motion/variables.dark";
|
|
7
|
+
export * from "./shadow/variables.dark";
|
|
8
|
+
export * from "./spacing/variables.dark";
|
|
9
|
+
export * from "./typography/variables.dark";
|
package/tokens/index.css
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@import "./border/variables.css";
|
|
2
|
+
@import "./breakpoint/variables.css";
|
|
3
|
+
@import "./color/variables.css";
|
|
4
|
+
@import "./filter/variables.css";
|
|
5
|
+
@import "./gradient/variables.css";
|
|
6
|
+
@import "./motion/variables.css";
|
|
7
|
+
@import "./shadow/variables.css";
|
|
8
|
+
@import "./spacing/variables.css";
|
|
9
|
+
@import "./typography/variables.css";
|
|
10
|
+
@import "./border/variables.dark.css";
|
|
11
|
+
@import "./breakpoint/variables.dark.css";
|
|
12
|
+
@import "./color/variables.dark.css";
|
|
13
|
+
@import "./filter/variables.dark.css";
|
|
14
|
+
@import "./gradient/variables.dark.css";
|
|
15
|
+
@import "./motion/variables.dark.css";
|
|
16
|
+
@import "./shadow/variables.dark.css";
|
|
17
|
+
@import "./spacing/variables.dark.css";
|
|
18
|
+
@import "./typography/variables.dark.css";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./border/variables";
|
|
2
|
+
export * from "./breakpoint/variables";
|
|
3
|
+
export * from "./color/variables";
|
|
4
|
+
export * from "./filter/variables";
|
|
5
|
+
export * from "./gradient/variables";
|
|
6
|
+
export * from "./motion/variables";
|
|
7
|
+
export * from "./shadow/variables";
|
|
8
|
+
export * from "./spacing/variables";
|
|
9
|
+
export * from "./typography/variables";
|
package/tokens/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./border/variables";
|
|
2
|
+
export * from "./breakpoint/variables";
|
|
3
|
+
export * from "./color/variables";
|
|
4
|
+
export * from "./filter/variables";
|
|
5
|
+
export * from "./gradient/variables";
|
|
6
|
+
export * from "./motion/variables";
|
|
7
|
+
export * from "./shadow/variables";
|
|
8
|
+
export * from "./spacing/variables";
|
|
9
|
+
export * from "./typography/variables";
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const B=require("react/jsx-runtime"),t=require("react"),k=require("change-case"),r=require("./variables-CMzMXeor.js"),x="#f4e0ff",m="#c461f7",f="#29003e",N="#ede1d8",y="#4f4741",P="#3b332d",E="#ffffff",O="#202022",b="rgba(255, 255, 255, 0.95)",A="rgba(255, 255, 255, 0.66)",H="rgba(255, 255, 255, 0.37)",M="rgba(0, 0, 0, 0.8)",W="rgba(0, 0, 0, 0.54)",D="rgba(0, 0, 0, 0.44)",h="#e4b6fb",F="#f4e0ff",L="#faf0ff",R="#4e0174",q="#ffffff",w="#8c07d0",Q="#6d02a3",j="#4e0174",$="#ffffff",z="#ffffff",G="#29003e",J="#ffffff",K="#29003e",U="#ffffff",X="#ffffff",Y="#d58df9",Z="#d58df9",_="#ffafc9",V="#980233",rr="#fb4885",er="#e4175c",or="#79d9a7",tr="#02562b",ar="#1fa15e",ur="#f9bb5b",cr="#f39200",nr="#a86602",ir="#91cdf4",lr="#3694d3",pr="#ffffff",vr="#ffffff",sr="#4e0174",gr="#202022",dr="#29003e",Br="#f4e0ff",Sr="#ffffff",Cr="#121212",Tr="#ffffff",Ir="#202022",kr="#f5f5fa",xr="rgba(0, 0, 0, 0.71)",mr="rgba(255, 255, 255, 0.84)",fr="#03385b",Nr="#f4e0ff",yr="#e4b6fb",Pr="#d58df9",Er="#4e0174",Or="#6d02a3",br="#8c07d0",Ar="#990ae3",Hr="#c461f7",Mr="#d58df9",Wr="#990ae3",Dr="#6d02a3",hr="#4e0174",Fr="rgba(255, 255, 255, 0.11)",Lr="rgba(0, 0, 0, 0.1)",Rr="#4e0174",qr="#e4b6fb",wr="#6d02a3",Qr="#d58df9",jr="rgba(255, 255, 255, 0.16)",$r="rgba(0, 0, 0, 0.05)",zr="rgba(255, 255, 255, 0.07)",Gr="rgba(0, 0, 0, 0.05)",Jr="#e4175c",Kr="#c00543",Ur="#980233",Xr="#03385b",Yr="#62b2e7",Zr="#003e1e",_r="#3dbf7c",Vr="#1fa15e",re="#700025",ee="#ff80ab",oe="#fb4885",te="#4c2f03",ae="#f39200",ue="#f39200",ce="#353537",ne="#6d02a3",ie="#f4e0ff",le="#ffffff",pe="#f4e0ff",ve="#29003e",se="#4f4741",ge="#2d2824",de="rgba(255, 255, 255, 0.29)",Be="rgba(0, 0, 0, 0.33)",Se="rgba(255, 255, 255, 0.46)",Ce="rgba(0, 0, 0, 0.54)",Te="rgba(255, 255, 255, 0.16)",Ie="rgba(0, 0, 0, 0.16)",ke="#c461f7",xe="#e4b6fb",me="#8c07d0",fe="#f4e0ff",Ne="#faf0ff",ye="#6d02a3",Pe="#4e0174",Ee="#990ae3",Oe="#d58df9",be="rgba(255, 255, 255, 0.37)",Ae="rgba(0, 0, 0, 0.44)",He="#e4b6fb",Me="#6d02a3",We="#fb4885",De="#e4175c",he="#f39200",Fe="#3694d3",Le="#1fa15e",Re="#018842",qe={colorBrandDeepPurple:x,colorBrandCorePurple:m,colorBrandLightPurple:f,colorBrandDeepBeige:N,colorBrandBeige:y,colorBrandLightBeige:P,colorBrandOffBlack:E,colorBrandWhite:O,colorTextDefault:b,colorTextMedium:A,colorTextWeak:H,colorTextDefaultNegative:M,colorTextMediumNegative:W,colorTextWeakNegative:D,colorTextInteractivePrimary:h,colorTextInteractivePrimaryHover:F,colorTextInteractivePrimaryActive:L,colorTextInteractiveOnPrimary:R,colorTextInteractiveOnExpressive:$,colorTextInteractiveOnExpressiveHover:G,colorTextInteractiveOnExpressiveActive:K,colorTextInteractiveOnDestructive:X,colorTextInteractiveSelected:Y,colorTextInteractivePrimaryNegative:w,colorTextInteractivePrimaryHoverNegative:Q,colorTextInteractivePrimaryActiveNegative:j,colorTextInteractiveOnPrimaryNegative:q,colorTextInteractiveOnExpressiveNegative:z,colorTextInteractiveOnExpressiveHoverNegative:J,colorTextInteractiveOnExpressiveActiveNegative:U,colorTextStatusInfoMedium:lr,colorTextStatusInfoStrong:ir,colorTextStatusSuccessMedium:ar,colorTextStatusSuccessStrong:or,colorTextStatusWarningMedium:cr,colorTextStatusWarningStrong:ur,colorTextStatusErrorMedium:rr,colorTextStatusErrorStrong:_,colorTextStatusNeutral:pr,colorTextStatusSpecial:vr,colorTextStatusAttention:sr,colorTextStatusDiscount:Z,colorTextStatusBlackFriday:gr,colorTextStatusSuccessStrongNegative:tr,colorTextStatusErrorMediumNegative:er,colorTextStatusErrorStrongNegative:V,colorTextStatusWarningMediumNegative:nr,colorTextToneOnTonePrimary:dr,colorTextToneOnToneSecondary:Br,colorTextToneOnToneTertiary:Sr,colorBackgroundPrimary:Cr,colorBackgroundSecondary:Ir,colorBackgroundOnImage:xr,colorBackgroundPrimaryNegative:Tr,colorBackgroundSecondaryNegative:kr,colorBackgroundOnImageNegative:mr,colorBackgroundInteractivePrimary:Nr,colorBackgroundInteractivePrimaryHover:yr,colorBackgroundInteractivePrimaryActive:Pr,colorBackgroundInteractiveExpressive:Ar,colorBackgroundInteractiveExpressiveHover:Hr,colorBackgroundInteractiveExpressiveActive:Mr,colorBackgroundInteractiveTransparentHover:Rr,colorBackgroundInteractiveTransparentActive:wr,colorBackgroundInteractiveDisabled:Fr,colorBackgroundInteractiveReadOnly:zr,colorBackgroundInteractiveInactive:jr,colorBackgroundInteractiveDestructive:Jr,colorBackgroundInteractiveDestructiveHover:Kr,colorBackgroundInteractiveDestructiveActive:Ur,colorBackgroundInteractiveAutoFill:fr,colorBackgroundInteractivePrimaryNegative:Er,colorBackgroundInteractivePrimaryHoverNegative:Or,colorBackgroundInteractivePrimaryActiveNegative:br,colorBackgroundInteractiveExpressiveNegative:Wr,colorBackgroundInteractiveExpressiveHoverNegative:Dr,colorBackgroundInteractiveExpressiveActiveNegative:hr,colorBackgroundInteractiveTransparentHoverNegative:qr,colorBackgroundInteractiveTransparentActiveNegative:Qr,colorBackgroundInteractiveDisabledNegative:Lr,colorBackgroundInteractiveInactiveNegative:$r,colorBackgroundInteractiveReadOnlyNegative:Gr,colorBackgroundStatusInfoMedium:Xr,colorBackgroundStatusInfoStrong:Yr,colorBackgroundStatusSuccessMedium:Zr,colorBackgroundStatusSuccessStrong:_r,colorBackgroundStatusWarningMedium:te,colorBackgroundStatusWarningStrong:ae,colorBackgroundStatusErrorMedium:re,colorBackgroundStatusErrorStrong:ee,colorBackgroundStatusNeutral:ce,colorBackgroundStatusSpecial:ne,colorBackgroundStatusAttention:ie,colorBackgroundStatusBlackFriday:le,colorBackgroundStatusSuccessStrongNegative:Vr,colorBackgroundStatusWarningStrongNegative:ue,colorBackgroundStatusErrorStrongNegative:oe,colorBackgroundToneOnTonePrimary:pe,colorBackgroundToneOnToneSecondary:ve,colorBackgroundToneOnToneTertiary:se,colorBackgroundToneOnToneQuaternary:ge,colorBorderWeak:Te,colorBorderMedium:de,colorBorderStrong:Se,colorBorderWeakNegative:Ie,colorBorderMediumNegative:Be,colorBorderStrongNegative:Ce,colorBorderInteractivePrimary:xe,colorBorderInteractivePrimaryHover:fe,colorBorderInteractivePrimaryActive:Ne,colorBorderInteractiveFocus:ke,colorBorderInteractiveExpressive:Ee,colorBorderInteractiveSubtle:be,colorBorderInteractiveSubtleHover:He,colorBorderInteractiveSelected:Oe,colorBorderInteractivePrimaryNegative:me,colorBorderInteractivePrimaryHoverNegative:ye,colorBorderInteractivePrimaryActiveNegative:Pe,colorBorderInteractiveSubtleNegative:Ae,colorBorderInteractiveSubtleHoverNegative:Me,colorBorderStatusError:We,colorBorderStatusWarning:he,colorBorderStatusInfo:Fe,colorBorderStatusSuccess:Le,colorBorderStatusErrorNegative:De,colorBorderStatusSuccessNegative:Re},we={colorBrandDeepPurple:r.purpurColorBrandDeepPurple,colorBrandCorePurple:r.purpurColorBrandCorePurple,colorBrandLightPurple:r.purpurColorBrandLightPurple,colorBrandDeepBeige:r.purpurColorBrandDeepBeige,colorBrandBeige:r.purpurColorBrandBeige,colorBrandLightBeige:r.purpurColorBrandLightBeige,colorBrandOffBlack:r.purpurColorBrandOffBlack,colorBrandWhite:r.purpurColorBrandWhite,colorTextDefault:r.purpurColorTextDefault,colorTextMedium:r.purpurColorTextMedium,colorTextWeak:r.purpurColorTextWeak,colorTextDefaultNegative:r.purpurColorTextDefaultNegative,colorTextMediumNegative:r.purpurColorTextMediumNegative,colorTextWeakNegative:r.purpurColorTextWeakNegative,colorTextInteractivePrimary:r.purpurColorTextInteractivePrimary,colorTextInteractivePrimaryHover:r.purpurColorTextInteractivePrimaryHover,colorTextInteractivePrimaryActive:r.purpurColorTextInteractivePrimaryActive,colorTextInteractiveOnPrimary:r.purpurColorTextInteractiveOnPrimary,colorTextInteractiveOnExpressive:r.purpurColorTextInteractiveOnExpressive,colorTextInteractiveOnExpressiveHover:r.purpurColorTextInteractiveOnExpressiveHover,colorTextInteractiveOnExpressiveActive:r.purpurColorTextInteractiveOnExpressiveActive,colorTextInteractiveOnDestructive:r.purpurColorTextInteractiveOnDestructive,colorTextInteractiveSelected:r.purpurColorTextInteractiveSelected,colorTextInteractivePrimaryNegative:r.purpurColorTextInteractivePrimaryNegative,colorTextInteractivePrimaryHoverNegative:r.purpurColorTextInteractivePrimaryHoverNegative,colorTextInteractivePrimaryActiveNegative:r.purpurColorTextInteractivePrimaryActiveNegative,colorTextInteractiveOnPrimaryNegative:r.purpurColorTextInteractiveOnPrimaryNegative,colorTextInteractiveOnExpressiveNegative:r.purpurColorTextInteractiveOnExpressiveNegative,colorTextInteractiveOnExpressiveHoverNegative:r.purpurColorTextInteractiveOnExpressiveHoverNegative,colorTextInteractiveOnExpressiveActiveNegative:r.purpurColorTextInteractiveOnExpressiveActiveNegative,colorTextStatusInfoMedium:r.purpurColorTextStatusInfoMedium,colorTextStatusInfoStrong:r.purpurColorTextStatusInfoStrong,colorTextStatusSuccessMedium:r.purpurColorTextStatusSuccessMedium,colorTextStatusSuccessStrong:r.purpurColorTextStatusSuccessStrong,colorTextStatusWarningMedium:r.purpurColorTextStatusWarningMedium,colorTextStatusWarningStrong:r.purpurColorTextStatusWarningStrong,colorTextStatusErrorMedium:r.purpurColorTextStatusErrorMedium,colorTextStatusErrorStrong:r.purpurColorTextStatusErrorStrong,colorTextStatusNeutral:r.purpurColorTextStatusNeutral,colorTextStatusSpecial:r.purpurColorTextStatusSpecial,colorTextStatusAttention:r.purpurColorTextStatusAttention,colorTextStatusDiscount:r.purpurColorTextStatusDiscount,colorTextStatusBlackFriday:r.purpurColorTextStatusBlackFriday,colorTextStatusSuccessStrongNegative:r.purpurColorTextStatusSuccessStrongNegative,colorTextStatusErrorMediumNegative:r.purpurColorTextStatusErrorMediumNegative,colorTextStatusErrorStrongNegative:r.purpurColorTextStatusErrorStrongNegative,colorTextStatusWarningMediumNegative:r.purpurColorTextStatusWarningMediumNegative,colorTextToneOnTonePrimary:r.purpurColorTextToneOnTonePrimary,colorTextToneOnToneSecondary:r.purpurColorTextToneOnToneSecondary,colorTextToneOnToneTertiary:r.purpurColorTextToneOnToneTertiary,colorBackgroundPrimary:r.purpurColorBackgroundPrimary,colorBackgroundSecondary:r.purpurColorBackgroundSecondary,colorBackgroundOnImage:r.purpurColorBackgroundOnImage,colorBackgroundPrimaryNegative:r.purpurColorBackgroundPrimaryNegative,colorBackgroundSecondaryNegative:r.purpurColorBackgroundSecondaryNegative,colorBackgroundOnImageNegative:r.purpurColorBackgroundOnImageNegative,colorBackgroundInteractivePrimary:r.purpurColorBackgroundInteractivePrimary,colorBackgroundInteractivePrimaryHover:r.purpurColorBackgroundInteractivePrimaryHover,colorBackgroundInteractivePrimaryActive:r.purpurColorBackgroundInteractivePrimaryActive,colorBackgroundInteractiveExpressive:r.purpurColorBackgroundInteractiveExpressive,colorBackgroundInteractiveExpressiveHover:r.purpurColorBackgroundInteractiveExpressiveHover,colorBackgroundInteractiveExpressiveActive:r.purpurColorBackgroundInteractiveExpressiveActive,colorBackgroundInteractiveTransparentHover:r.purpurColorBackgroundInteractiveTransparentHover,colorBackgroundInteractiveTransparentActive:r.purpurColorBackgroundInteractiveTransparentActive,colorBackgroundInteractiveDisabled:r.purpurColorBackgroundInteractiveDisabled,colorBackgroundInteractiveReadOnly:r.purpurColorBackgroundInteractiveReadOnly,colorBackgroundInteractiveInactive:r.purpurColorBackgroundInteractiveInactive,colorBackgroundInteractiveDestructive:r.purpurColorBackgroundInteractiveDestructive,colorBackgroundInteractiveDestructiveHover:r.purpurColorBackgroundInteractiveDestructiveHover,colorBackgroundInteractiveDestructiveActive:r.purpurColorBackgroundInteractiveDestructiveActive,colorBackgroundInteractiveAutoFill:r.purpurColorBackgroundInteractiveAutoFill,colorBackgroundInteractivePrimaryNegative:r.purpurColorBackgroundInteractivePrimaryNegative,colorBackgroundInteractivePrimaryHoverNegative:r.purpurColorBackgroundInteractivePrimaryHoverNegative,colorBackgroundInteractivePrimaryActiveNegative:r.purpurColorBackgroundInteractivePrimaryActiveNegative,colorBackgroundInteractiveExpressiveNegative:r.purpurColorBackgroundInteractiveExpressiveNegative,colorBackgroundInteractiveExpressiveHoverNegative:r.purpurColorBackgroundInteractiveExpressiveHoverNegative,colorBackgroundInteractiveExpressiveActiveNegative:r.purpurColorBackgroundInteractiveExpressiveActiveNegative,colorBackgroundInteractiveTransparentHoverNegative:r.purpurColorBackgroundInteractiveTransparentHoverNegative,colorBackgroundInteractiveTransparentActiveNegative:r.purpurColorBackgroundInteractiveTransparentActiveNegative,colorBackgroundInteractiveDisabledNegative:r.purpurColorBackgroundInteractiveDisabledNegative,colorBackgroundInteractiveInactiveNegative:r.purpurColorBackgroundInteractiveInactiveNegative,colorBackgroundInteractiveReadOnlyNegative:r.purpurColorBackgroundInteractiveReadOnlyNegative,colorBackgroundStatusInfoMedium:r.purpurColorBackgroundStatusInfoMedium,colorBackgroundStatusInfoStrong:r.purpurColorBackgroundStatusInfoStrong,colorBackgroundStatusSuccessMedium:r.purpurColorBackgroundStatusSuccessMedium,colorBackgroundStatusSuccessStrong:r.purpurColorBackgroundStatusSuccessStrong,colorBackgroundStatusWarningMedium:r.purpurColorBackgroundStatusWarningMedium,colorBackgroundStatusWarningStrong:r.purpurColorBackgroundStatusWarningStrong,colorBackgroundStatusErrorMedium:r.purpurColorBackgroundStatusErrorMedium,colorBackgroundStatusErrorStrong:r.purpurColorBackgroundStatusErrorStrong,colorBackgroundStatusNeutral:r.purpurColorBackgroundStatusNeutral,colorBackgroundStatusSpecial:r.purpurColorBackgroundStatusSpecial,colorBackgroundStatusAttention:r.purpurColorBackgroundStatusAttention,colorBackgroundStatusBlackFriday:r.purpurColorBackgroundStatusBlackFriday,colorBackgroundStatusSuccessStrongNegative:r.purpurColorBackgroundStatusSuccessStrongNegative,colorBackgroundStatusWarningStrongNegative:r.purpurColorBackgroundStatusWarningStrongNegative,colorBackgroundStatusErrorStrongNegative:r.purpurColorBackgroundStatusErrorStrongNegative,colorBackgroundToneOnTonePrimary:r.purpurColorBackgroundToneOnTonePrimary,colorBackgroundToneOnToneSecondary:r.purpurColorBackgroundToneOnToneSecondary,colorBackgroundToneOnToneTertiary:r.purpurColorBackgroundToneOnToneTertiary,colorBackgroundToneOnToneQuaternary:r.purpurColorBackgroundToneOnToneQuaternary,colorBorderWeak:r.purpurColorBorderWeak,colorBorderMedium:r.purpurColorBorderMedium,colorBorderStrong:r.purpurColorBorderStrong,colorBorderWeakNegative:r.purpurColorBorderWeakNegative,colorBorderMediumNegative:r.purpurColorBorderMediumNegative,colorBorderStrongNegative:r.purpurColorBorderStrongNegative,colorBorderInteractivePrimary:r.purpurColorBorderInteractivePrimary,colorBorderInteractivePrimaryHover:r.purpurColorBorderInteractivePrimaryHover,colorBorderInteractivePrimaryActive:r.purpurColorBorderInteractivePrimaryActive,colorBorderInteractiveFocus:r.purpurColorBorderInteractiveFocus,colorBorderInteractiveExpressive:r.purpurColorBorderInteractiveExpressive,colorBorderInteractiveSubtle:r.purpurColorBorderInteractiveSubtle,colorBorderInteractiveSubtleHover:r.purpurColorBorderInteractiveSubtleHover,colorBorderInteractiveSelected:r.purpurColorBorderInteractiveSelected,colorBorderInteractivePrimaryNegative:r.purpurColorBorderInteractivePrimaryNegative,colorBorderInteractivePrimaryHoverNegative:r.purpurColorBorderInteractivePrimaryHoverNegative,colorBorderInteractivePrimaryActiveNegative:r.purpurColorBorderInteractivePrimaryActiveNegative,colorBorderInteractiveSubtleNegative:r.purpurColorBorderInteractiveSubtleNegative,colorBorderInteractiveSubtleHoverNegative:r.purpurColorBorderInteractiveSubtleHoverNegative,colorBorderStatusError:r.purpurColorBorderStatusError,colorBorderStatusWarning:r.purpurColorBorderStatusWarning,colorBorderStatusInfo:r.purpurColorBorderStatusInfo,colorBorderStatusSuccess:r.purpurColorBorderStatusSuccess,colorBorderStatusErrorNegative:r.purpurColorBorderStatusErrorNegative,colorBorderStatusSuccessNegative:r.purpurColorBorderStatusSuccessNegative},s={light:we,dark:qe},S=({theme:a=s,cssVariablesSelector:e,currentColorScheme:u})=>{t.useEffect(()=>{u&&Object.entries(a?.[u]??s[u]).forEach(([i,l])=>{((e?document.querySelector(e):null)??document.documentElement).style.setProperty(`--purpur-${k.kebabCase(i)}`,l)})},[a,e,u])},C=t.createContext({colorScheme:"light",currentColorScheme:"light",setColorScheme:()=>{},options:{}}),Qe=({cssVariablesSelector:a,forceColorScheme:e,theme:u,children:i,options:l={},...g})=>{const[c,p]=t.useState(e??"auto"),[n,v]=t.useState(e??"light");t.useEffect(()=>{if(e)p(e);else{const o=localStorage.getItem("colorScheme");o&&p(o)}},[e]),t.useEffect(()=>{const o=window.matchMedia("(prefers-color-scheme: dark)");v(c==="auto"?o.matches?"dark":"light":c);const d=I=>{!e&&c==="auto"&&v(I.matches?"dark":"light")};return o.addEventListener("change",d),()=>{o.removeEventListener("change",d)}},[c,e]),S({theme:u,cssVariablesSelector:a,currentColorScheme:u!==void 0?n:void 0});const T=t.useMemo(()=>({colorScheme:c,currentColorScheme:n,setColorScheme:o=>{e||(p(o),localStorage.setItem("colorScheme",o))}}),[c,n,e]);return B.jsx(C.Provider,{value:{...T,options:l},children:B.jsx("div",{"data-color-scheme":n,className:n,...g,children:i})})},je=()=>{const a=t.useContext(C);if(!a)throw new Error("useTheme must be used within a ThemeProvider");return a};exports.ThemeProvider=Qe;exports.teliaTheme=s;exports.useApplyTheme=S;exports.useTheme=je;
|
|
2
|
-
//# sourceMappingURL=ThemeProvider-djmNDpmy.js.map
|