@protonradio/proton-ui 0.12.5 → 0.12.6
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 +10 -0
- package/dist/components/ActionMenu/ActionMenu.cjs.js.map +1 -1
- package/dist/components/ActionMenu/ActionMenu.es.js.map +1 -1
- package/dist/components/Banner/Banner.cjs.js.map +1 -1
- package/dist/components/Banner/Banner.es.js.map +1 -1
- package/dist/components/Button/Button.cjs.js.map +1 -1
- package/dist/components/Button/Button.es.js.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.cjs.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.cjs.js.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.es.js +10 -10
- package/dist/components/ButtonGroup/ButtonGroup.es.js.map +1 -1
- package/dist/components/Checkbox/CheckboxInput/CheckboxInput.cjs.js.map +1 -1
- package/dist/components/Checkbox/CheckboxInput/CheckboxInput.es.js.map +1 -1
- package/dist/components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.cjs.js.map +1 -1
- package/dist/components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.es.js.map +1 -1
- package/dist/components/Input/BaseInput/Input.cjs.js.map +1 -1
- package/dist/components/Input/BaseInput/Input.es.js.map +1 -1
- package/dist/components/Input/OTPInput/OTPInput.cjs.js.map +1 -1
- package/dist/components/Input/OTPInput/OTPInput.es.js.map +1 -1
- package/dist/components/Modal/Modal.cjs.js +1 -1
- package/dist/components/Modal/Modal.cjs.js.map +1 -1
- package/dist/components/Modal/Modal.es.js +34 -42
- package/dist/components/Modal/Modal.es.js.map +1 -1
- package/dist/components/Popover/Popover.cjs.js +1 -1
- package/dist/components/Popover/Popover.cjs.js.map +1 -1
- package/dist/components/Popover/Popover.es.js +21 -14
- package/dist/components/Popover/Popover.es.js.map +1 -1
- package/dist/components/ScreenOverlay/ScreenOverlay.cjs.js.map +1 -1
- package/dist/components/ScreenOverlay/ScreenOverlay.es.js.map +1 -1
- package/dist/components/Select/Select.cjs.js.map +1 -1
- package/dist/components/Select/Select.es.js.map +1 -1
- package/dist/components/Text/TextEllipsis/TextEllipsis.cjs.js.map +1 -1
- package/dist/components/Text/TextEllipsis/TextEllipsis.es.js.map +1 -1
- package/dist/components/Tooltip/ResponsiveTooltip.cjs.js.map +1 -1
- package/dist/components/Tooltip/ResponsiveTooltip.es.js.map +1 -1
- package/dist/constants/breakpoint.cjs.js.map +1 -1
- package/dist/constants/breakpoint.es.js.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/dark.d.ts +0 -1
- package/dist/design/darkTheme/colors.cjs.js +1 -1
- package/dist/design/darkTheme/colors.cjs.js.map +1 -1
- package/dist/design/darkTheme/colors.es.js +7 -8
- package/dist/design/darkTheme/colors.es.js.map +1 -1
- package/dist/design/generateStylesheet.cjs.js.map +1 -1
- package/dist/design/generateStylesheet.es.js +0 -1
- package/dist/design/generateStylesheet.es.js.map +1 -1
- package/dist/design/lightTheme/colors.cjs.js +1 -1
- package/dist/design/lightTheme/colors.cjs.js.map +1 -1
- package/dist/design/lightTheme/colors.es.js +10 -11
- package/dist/design/lightTheme/colors.es.js.map +1 -1
- package/dist/hooks/useBreakpoint.cjs.js.map +1 -1
- package/dist/hooks/useBreakpoint.es.js.map +1 -1
- package/dist/hooks/useMergedRef.cjs.js.map +1 -1
- package/dist/hooks/useMergedRef.es.js.map +1 -1
- package/dist/hooks.d.ts +1 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +16 -27
- package/dist/index.es.js +57 -58
- package/dist/light.d.ts +0 -1
- package/dist/style.css +1 -1
- package/dist/theme.d.ts +0 -1
- package/dist/utils/palette.cjs.js +1 -1
- package/dist/utils/palette.cjs.js.map +1 -1
- package/dist/utils/palette.es.js +64 -77
- package/dist/utils/palette.es.js.map +1 -1
- package/dist/utils.d.ts +0 -1
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
package/dist/dark.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../colors.cjs.js"),A="#f7f9fb",
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../colors.cjs.js"),A="#f7f9fb",D=A,T="rgba(174, 175, 177, 0.21)",I={SUPER_DARK:"#111212",DARK:"#1e1f21",MEDIUM:"#232629",MEDIUM_LIGHT:"#2b2d30",LIGHT:"#43464a",LIGHTEST:"#63676b",SUPER_LIGHT:"#8a8e91",WHITE:A},E={SUPER_DARK:"#142736",DARK:"#22445d",MEDIUM:"#306082",MEDIUM_LIGHT:"#3e7ca8",LIGHT:"#5795c1",LIGHTEST:"#a2c4dd",SUPER_LIGHT:"#dae7f1",WHITE:A},L={BASE_COLOR:R.BACKGROUNDS.BLACK,BRAND:R.BRAND,PRIMARY:R.BRAND_PRIMARY_SCALE,SECONDARY:E};exports.BORDER=D;exports.DARK_GRAYSCALE=I;exports.DARK_PALETTE=L;exports.DARK_SECONDARY=E;exports.ELEVATION=T;
|
|
2
2
|
//# sourceMappingURL=colors.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.cjs.js","sources":["../../../src/design/darkTheme/colors.ts"],"sourcesContent":["import { BACKGROUNDS, BRAND, BRAND_PRIMARY_SCALE } from \"../colors\";\nimport type { ProtonColorScale, ProtonPalette } from \"../types\";\n\nconst WHITE = \"#f7f9fb\";\nexport const BORDER = WHITE;\nexport const ELEVATION = \"rgba(174, 175, 177, 0.21)\";\nexport const DARK_GRAYSCALE: ProtonColorScale = {\n SUPER_DARK: \"#111212\",\n DARK: \"#1e1f21\",\n MEDIUM: \"#232629\",\n MEDIUM_LIGHT: \"#2b2d30\",\n LIGHT: \"#43464a\",\n LIGHTEST: \"#63676b\",\n SUPER_LIGHT: \"#8a8e91\",\n WHITE: WHITE,\n};\n\nexport const DARK_SECONDARY = {\n SUPER_DARK: \"#142736\",\n DARK: \"#22445d\",\n MEDIUM: \"#306082\",\n MEDIUM_LIGHT: \"#3e7ca8\",\n LIGHT: \"#5795c1\",\n LIGHTEST: \"#a2c4dd\",\n SUPER_LIGHT: \"#dae7f1\",\n WHITE: WHITE,\n};\n\nexport const DARK_PALETTE: ProtonPalette = {\n BASE_COLOR: BACKGROUNDS.BLACK,\n BRAND,\n
|
|
1
|
+
{"version":3,"file":"colors.cjs.js","sources":["../../../src/design/darkTheme/colors.ts"],"sourcesContent":["import { BACKGROUNDS, BRAND, BRAND_PRIMARY_SCALE } from \"../colors\";\nimport type { ProtonColorScale, ProtonPalette } from \"../types\";\n\nconst WHITE = \"#f7f9fb\";\nexport const BORDER = WHITE;\nexport const ELEVATION = \"rgba(174, 175, 177, 0.21)\";\nexport const DARK_GRAYSCALE: ProtonColorScale = {\n SUPER_DARK: \"#111212\",\n DARK: \"#1e1f21\",\n MEDIUM: \"#232629\",\n MEDIUM_LIGHT: \"#2b2d30\",\n LIGHT: \"#43464a\",\n LIGHTEST: \"#63676b\",\n SUPER_LIGHT: \"#8a8e91\",\n WHITE: WHITE,\n};\n\nexport const DARK_SECONDARY = {\n SUPER_DARK: \"#142736\",\n DARK: \"#22445d\",\n MEDIUM: \"#306082\",\n MEDIUM_LIGHT: \"#3e7ca8\",\n LIGHT: \"#5795c1\",\n LIGHTEST: \"#a2c4dd\",\n SUPER_LIGHT: \"#dae7f1\",\n WHITE: WHITE,\n};\n\nexport const DARK_PALETTE: ProtonPalette = {\n BASE_COLOR: BACKGROUNDS.BLACK,\n BRAND,\n PRIMARY: BRAND_PRIMARY_SCALE,\n SECONDARY: DARK_SECONDARY,\n} as const;\n"],"names":["WHITE","BORDER","ELEVATION","DARK_GRAYSCALE","DARK_SECONDARY","DARK_PALETTE","BACKGROUNDS","BRAND","BRAND_PRIMARY_SCALE"],"mappings":"oHAGMA,EAAQ,UACDC,EAASD,EACTE,EAAY,4BACZC,EAAmC,CAC9C,WAAY,UACZ,KAAM,UACN,OAAQ,UACR,aAAc,UACd,MAAO,UACP,SAAU,UACV,YAAa,UACb,MAAAH,CACF,EAEaI,EAAiB,CAC5B,WAAY,UACZ,KAAM,UACN,OAAQ,UACR,aAAc,UACd,MAAO,UACP,SAAU,UACV,YAAa,UACb,MAAAJ,CACF,EAEaK,EAA8B,CACzC,WAAYC,EAAAA,YAAY,MAAA,MACxBC,EAAAA,MACA,QAASC,EAAAA,oBACT,UAAWJ,CACb"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BRAND_PRIMARY_SCALE as A, BRAND as E, BACKGROUNDS as D } from "../colors.es.js";
|
|
2
|
-
const R = "#f7f9fb",
|
|
2
|
+
const R = "#f7f9fb", T = R, S = "rgba(174, 175, 177, 0.21)", _ = {
|
|
3
3
|
SUPER_DARK: "#111212",
|
|
4
4
|
DARK: "#1e1f21",
|
|
5
5
|
MEDIUM: "#232629",
|
|
@@ -8,7 +8,7 @@ const R = "#f7f9fb", S = R, _ = "rgba(174, 175, 177, 0.21)", I = {
|
|
|
8
8
|
LIGHTEST: "#63676b",
|
|
9
9
|
SUPER_LIGHT: "#8a8e91",
|
|
10
10
|
WHITE: R
|
|
11
|
-
},
|
|
11
|
+
}, I = {
|
|
12
12
|
SUPER_DARK: "#142736",
|
|
13
13
|
DARK: "#22445d",
|
|
14
14
|
MEDIUM: "#306082",
|
|
@@ -20,15 +20,14 @@ const R = "#f7f9fb", S = R, _ = "rgba(174, 175, 177, 0.21)", I = {
|
|
|
20
20
|
}, G = {
|
|
21
21
|
BASE_COLOR: D.BLACK,
|
|
22
22
|
BRAND: E,
|
|
23
|
-
GRAYSCALE: I,
|
|
24
23
|
PRIMARY: A,
|
|
25
|
-
SECONDARY:
|
|
24
|
+
SECONDARY: I
|
|
26
25
|
};
|
|
27
26
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
T as BORDER,
|
|
28
|
+
_ as DARK_GRAYSCALE,
|
|
30
29
|
G as DARK_PALETTE,
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
I as DARK_SECONDARY,
|
|
31
|
+
S as ELEVATION
|
|
33
32
|
};
|
|
34
33
|
//# sourceMappingURL=colors.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.es.js","sources":["../../../src/design/darkTheme/colors.ts"],"sourcesContent":["import { BACKGROUNDS, BRAND, BRAND_PRIMARY_SCALE } from \"../colors\";\nimport type { ProtonColorScale, ProtonPalette } from \"../types\";\n\nconst WHITE = \"#f7f9fb\";\nexport const BORDER = WHITE;\nexport const ELEVATION = \"rgba(174, 175, 177, 0.21)\";\nexport const DARK_GRAYSCALE: ProtonColorScale = {\n SUPER_DARK: \"#111212\",\n DARK: \"#1e1f21\",\n MEDIUM: \"#232629\",\n MEDIUM_LIGHT: \"#2b2d30\",\n LIGHT: \"#43464a\",\n LIGHTEST: \"#63676b\",\n SUPER_LIGHT: \"#8a8e91\",\n WHITE: WHITE,\n};\n\nexport const DARK_SECONDARY = {\n SUPER_DARK: \"#142736\",\n DARK: \"#22445d\",\n MEDIUM: \"#306082\",\n MEDIUM_LIGHT: \"#3e7ca8\",\n LIGHT: \"#5795c1\",\n LIGHTEST: \"#a2c4dd\",\n SUPER_LIGHT: \"#dae7f1\",\n WHITE: WHITE,\n};\n\nexport const DARK_PALETTE: ProtonPalette = {\n BASE_COLOR: BACKGROUNDS.BLACK,\n BRAND,\n
|
|
1
|
+
{"version":3,"file":"colors.es.js","sources":["../../../src/design/darkTheme/colors.ts"],"sourcesContent":["import { BACKGROUNDS, BRAND, BRAND_PRIMARY_SCALE } from \"../colors\";\nimport type { ProtonColorScale, ProtonPalette } from \"../types\";\n\nconst WHITE = \"#f7f9fb\";\nexport const BORDER = WHITE;\nexport const ELEVATION = \"rgba(174, 175, 177, 0.21)\";\nexport const DARK_GRAYSCALE: ProtonColorScale = {\n SUPER_DARK: \"#111212\",\n DARK: \"#1e1f21\",\n MEDIUM: \"#232629\",\n MEDIUM_LIGHT: \"#2b2d30\",\n LIGHT: \"#43464a\",\n LIGHTEST: \"#63676b\",\n SUPER_LIGHT: \"#8a8e91\",\n WHITE: WHITE,\n};\n\nexport const DARK_SECONDARY = {\n SUPER_DARK: \"#142736\",\n DARK: \"#22445d\",\n MEDIUM: \"#306082\",\n MEDIUM_LIGHT: \"#3e7ca8\",\n LIGHT: \"#5795c1\",\n LIGHTEST: \"#a2c4dd\",\n SUPER_LIGHT: \"#dae7f1\",\n WHITE: WHITE,\n};\n\nexport const DARK_PALETTE: ProtonPalette = {\n BASE_COLOR: BACKGROUNDS.BLACK,\n BRAND,\n PRIMARY: BRAND_PRIMARY_SCALE,\n SECONDARY: DARK_SECONDARY,\n} as const;\n"],"names":["WHITE","BORDER","ELEVATION","DARK_GRAYSCALE","DARK_SECONDARY","DARK_PALETTE","BACKGROUNDS","BRAND","BRAND_PRIMARY_SCALE"],"mappings":";AAGA,MAAMA,IAAQ,WACDC,IAASD,GACTE,IAAY,6BACZC,IAAmC;AAAA,EAC9C,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,OAAO;AAAA,EACP,UAAU;AAAA,EACV,aAAa;AAAA,EACb,OAAAH;AACF,GAEaI,IAAiB;AAAA,EAC5B,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,OAAO;AAAA,EACP,UAAU;AAAA,EACV,aAAa;AAAA,EACb,OAAAJ;AACF,GAEaK,IAA8B;AAAA,EACzC,YAAYC,EAAY;AAAA,EACxB,OAAAC;AAAA,EACA,SAASC;AAAA,EACT,WAAWJ;AACb;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateStylesheet.cjs.js","sources":["../../src/design/generateStylesheet.ts"],"sourcesContent":["import { THEMES } from \"./theme\";\nimport { ProtonPalette } from \"./types\";\nimport { LIGHT_STYLESHEET } from \"./lightTheme/stylesheet\";\nimport { DARK_STYLESHEET } from \"./darkTheme/stylesheet\";\nimport { ProtonStyleSheet } from \"./types\";\n\nexport const generateStylesheet = (\n palette: ProtonPalette,\n theme: string\n): ProtonStyleSheet => {\n const themeVariables =\n theme === THEMES.DARK ? DARK_STYLESHEET : LIGHT_STYLESHEET;\n\n if (palette) {\n const customVars = generateCustomStylesheet(palette);\n return {\n ...themeVariables,\n ...customVars,\n };\n }\n\n return themeVariables;\n};\n\n//overrride theme colors in stylesheet\nconst generateCustomStylesheet = (\n palette: ProtonPalette\n): Partial<ProtonStyleSheet> => {\n return {\n \"--proton-color__primary\": palette.BRAND.PRIMARY,\n \"--proton-color__primary-light\": palette.BRAND.PRIMARY_LIGHT,\n \"--proton-color__primary-super-light\": palette.BRAND.PRIMARY_SUPER_LIGHT,\n \"--proton-color__secondary\": palette.BRAND.SECONDARY,\n \"--proton-color__secondary-light\": palette.BRAND.SECONDARY_LIGHT,\n \"--proton-color__secondary-super-light\":\n palette.BRAND.SECONDARY_SUPER_LIGHT,\n
|
|
1
|
+
{"version":3,"file":"generateStylesheet.cjs.js","sources":["../../src/design/generateStylesheet.ts"],"sourcesContent":["import { THEMES } from \"./theme\";\nimport { ProtonPalette } from \"./types\";\nimport { LIGHT_STYLESHEET } from \"./lightTheme/stylesheet\";\nimport { DARK_STYLESHEET } from \"./darkTheme/stylesheet\";\nimport { ProtonStyleSheet } from \"./types\";\n\nexport const generateStylesheet = (\n palette: ProtonPalette,\n theme: string\n): ProtonStyleSheet => {\n const themeVariables =\n theme === THEMES.DARK ? DARK_STYLESHEET : LIGHT_STYLESHEET;\n\n if (palette) {\n const customVars = generateCustomStylesheet(palette);\n return {\n ...themeVariables,\n ...customVars,\n };\n }\n\n return themeVariables;\n};\n\n//overrride theme colors in stylesheet\nconst generateCustomStylesheet = (\n palette: ProtonPalette\n): Partial<ProtonStyleSheet> => {\n return {\n \"--proton-color__primary\": palette.BRAND.PRIMARY,\n \"--proton-color__primary-light\": palette.BRAND.PRIMARY_LIGHT,\n \"--proton-color__primary-super-light\": palette.BRAND.PRIMARY_SUPER_LIGHT,\n \"--proton-color__secondary\": palette.BRAND.SECONDARY,\n \"--proton-color__secondary-light\": palette.BRAND.SECONDARY_LIGHT,\n \"--proton-color__secondary-super-light\":\n palette.BRAND.SECONDARY_SUPER_LIGHT,\n };\n};\n"],"names":["generateStylesheet","palette","theme","themeVariables","THEMES","DARK_STYLESHEET","LIGHT_STYLESHEET","customVars","generateCustomStylesheet"],"mappings":"yMAMaA,EAAqB,CAChCC,EACAC,IACqB,CACrB,MAAMC,EACJD,IAAUE,EAAAA,OAAO,KAAOC,EAAAA,gBAAkBC,EAAAA,iBAE5C,GAAIL,EAAS,CACX,MAAMM,EAAaC,EAAyBP,CAAO,EACnD,MAAO,CACL,GAAGE,EACH,GAAGI,CAAA,CAEP,CAEA,OAAOJ,CACT,EAGMK,EACJP,IAEO,CACL,0BAA2BA,EAAQ,MAAM,QACzC,gCAAiCA,EAAQ,MAAM,cAC/C,sCAAuCA,EAAQ,MAAM,oBACrD,4BAA6BA,EAAQ,MAAM,UAC3C,kCAAmCA,EAAQ,MAAM,gBACjD,wCACEA,EAAQ,MAAM,qBAAA"}
|
|
@@ -18,7 +18,6 @@ const i = (o, _) => {
|
|
|
18
18
|
"--proton-color__secondary": o.BRAND.SECONDARY,
|
|
19
19
|
"--proton-color__secondary-light": o.BRAND.SECONDARY_LIGHT,
|
|
20
20
|
"--proton-color__secondary-super-light": o.BRAND.SECONDARY_SUPER_LIGHT
|
|
21
|
-
//TODO: add newly generated grayscale color scale
|
|
22
21
|
});
|
|
23
22
|
export {
|
|
24
23
|
i as generateStylesheet
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateStylesheet.es.js","sources":["../../src/design/generateStylesheet.ts"],"sourcesContent":["import { THEMES } from \"./theme\";\nimport { ProtonPalette } from \"./types\";\nimport { LIGHT_STYLESHEET } from \"./lightTheme/stylesheet\";\nimport { DARK_STYLESHEET } from \"./darkTheme/stylesheet\";\nimport { ProtonStyleSheet } from \"./types\";\n\nexport const generateStylesheet = (\n palette: ProtonPalette,\n theme: string\n): ProtonStyleSheet => {\n const themeVariables =\n theme === THEMES.DARK ? DARK_STYLESHEET : LIGHT_STYLESHEET;\n\n if (palette) {\n const customVars = generateCustomStylesheet(palette);\n return {\n ...themeVariables,\n ...customVars,\n };\n }\n\n return themeVariables;\n};\n\n//overrride theme colors in stylesheet\nconst generateCustomStylesheet = (\n palette: ProtonPalette\n): Partial<ProtonStyleSheet> => {\n return {\n \"--proton-color__primary\": palette.BRAND.PRIMARY,\n \"--proton-color__primary-light\": palette.BRAND.PRIMARY_LIGHT,\n \"--proton-color__primary-super-light\": palette.BRAND.PRIMARY_SUPER_LIGHT,\n \"--proton-color__secondary\": palette.BRAND.SECONDARY,\n \"--proton-color__secondary-light\": palette.BRAND.SECONDARY_LIGHT,\n \"--proton-color__secondary-super-light\":\n palette.BRAND.SECONDARY_SUPER_LIGHT,\n
|
|
1
|
+
{"version":3,"file":"generateStylesheet.es.js","sources":["../../src/design/generateStylesheet.ts"],"sourcesContent":["import { THEMES } from \"./theme\";\nimport { ProtonPalette } from \"./types\";\nimport { LIGHT_STYLESHEET } from \"./lightTheme/stylesheet\";\nimport { DARK_STYLESHEET } from \"./darkTheme/stylesheet\";\nimport { ProtonStyleSheet } from \"./types\";\n\nexport const generateStylesheet = (\n palette: ProtonPalette,\n theme: string\n): ProtonStyleSheet => {\n const themeVariables =\n theme === THEMES.DARK ? DARK_STYLESHEET : LIGHT_STYLESHEET;\n\n if (palette) {\n const customVars = generateCustomStylesheet(palette);\n return {\n ...themeVariables,\n ...customVars,\n };\n }\n\n return themeVariables;\n};\n\n//overrride theme colors in stylesheet\nconst generateCustomStylesheet = (\n palette: ProtonPalette\n): Partial<ProtonStyleSheet> => {\n return {\n \"--proton-color__primary\": palette.BRAND.PRIMARY,\n \"--proton-color__primary-light\": palette.BRAND.PRIMARY_LIGHT,\n \"--proton-color__primary-super-light\": palette.BRAND.PRIMARY_SUPER_LIGHT,\n \"--proton-color__secondary\": palette.BRAND.SECONDARY,\n \"--proton-color__secondary-light\": palette.BRAND.SECONDARY_LIGHT,\n \"--proton-color__secondary-super-light\":\n palette.BRAND.SECONDARY_SUPER_LIGHT,\n };\n};\n"],"names":["generateStylesheet","palette","theme","themeVariables","THEMES","DARK_STYLESHEET","LIGHT_STYLESHEET","customVars","generateCustomStylesheet"],"mappings":";;;AAMO,MAAMA,IAAqB,CAChCC,GACAC,MACqB;AACrB,QAAMC,IACJD,MAAUE,EAAO,OAAOC,IAAkBC;AAE5C,MAAIL,GAAS;AACX,UAAMM,IAAaC,EAAyBP,CAAO;AACnD,WAAO;AAAA,MACL,GAAGE;AAAA,MACH,GAAGI;AAAA,IAAA;AAAA,EAEP;AAEA,SAAOJ;AACT,GAGMK,IAA2B,CAC/BP,OAEO;AAAA,EACL,2BAA2BA,EAAQ,MAAM;AAAA,EACzC,iCAAiCA,EAAQ,MAAM;AAAA,EAC/C,uCAAuCA,EAAQ,MAAM;AAAA,EACrD,6BAA6BA,EAAQ,MAAM;AAAA,EAC3C,mCAAmCA,EAAQ,MAAM;AAAA,EACjD,yCACEA,EAAQ,MAAM;AAAA;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../colors.cjs.js"),D="#DDDDDD",
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../colors.cjs.js"),D="#DDDDDD",T=D,A="#F7F8F9",I={SUPER_DARK:"#141211",DARK:"#4D4D4D",MEDIUM:"#7D7D7D",MEDIUM_LIGHT:"#B1B1B1",LIGHT:D,LIGHTEST:"#F0F1F2",SUPER_LIGHT:A,WHITE:"#FFFFFF"},R={SUPER_DARK:"#032026",DARK:"#084657",MEDIUM:"#2085BA",MEDIUM_LIGHT:"#44A8EB",LIGHT:"#70B9F6",LIGHTEST:"#9DCBFC",SUPER_LIGHT:"#C8DFFF",WHITE:"#f5f9ff"},L={BASE_COLOR:E.BACKGROUNDS.WHITE,BRAND:E.BRAND,PRIMARY:E.BRAND_PRIMARY_SCALE,SECONDARY:R};exports.BORDER=T;exports.ELEVATION=A;exports.LIGHT_GRAYSCALE=I;exports.LIGHT_PALETTE=L;exports.LIGHT_SECONDARY_SCALE=R;
|
|
2
2
|
//# sourceMappingURL=colors.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.cjs.js","sources":["../../../src/design/lightTheme/colors.ts"],"sourcesContent":["import {\n BACKGROUNDS,\n BRAND,\n BRAND_PRIMARY_SCALE,\n} from \"../colors\";\nimport { ProtonColorScale, ProtonPalette } from \"../types\";\n\nconst LIGHT_GRAY = \"#DDDDDD\";\nexport const BORDER = LIGHT_GRAY;\nexport const ELEVATION = \"#F7F8F9\";\nexport const LIGHT_GRAYSCALE: ProtonColorScale = {\n SUPER_DARK: \"#141211\",\n DARK: \"#4D4D4D\",\n MEDIUM: \"#7D7D7D\",\n MEDIUM_LIGHT: \"#B1B1B1\",\n LIGHT: LIGHT_GRAY,\n LIGHTEST: \"#F0F1F2\",\n SUPER_LIGHT: ELEVATION,\n WHITE: \"#FFFFFF\",\n};\n\nexport const LIGHT_SECONDARY_SCALE: ProtonColorScale = {\n SUPER_DARK: \"#032026\",\n DARK: \"#084657\",\n MEDIUM: \"#2085BA\",\n MEDIUM_LIGHT: \"#44A8EB\",\n LIGHT: \"#70B9F6\",\n LIGHTEST: \"#9DCBFC\",\n SUPER_LIGHT: \"#C8DFFF\",\n WHITE: \"#f5f9ff\",\n};\n\nexport const LIGHT_PALETTE: ProtonPalette = {\n BASE_COLOR: BACKGROUNDS.WHITE,\n BRAND,\n
|
|
1
|
+
{"version":3,"file":"colors.cjs.js","sources":["../../../src/design/lightTheme/colors.ts"],"sourcesContent":["import {\n BACKGROUNDS,\n BRAND,\n BRAND_PRIMARY_SCALE,\n} from \"../colors\";\nimport { ProtonColorScale, ProtonPalette } from \"../types\";\n\nconst LIGHT_GRAY = \"#DDDDDD\";\nexport const BORDER = LIGHT_GRAY;\nexport const ELEVATION = \"#F7F8F9\";\nexport const LIGHT_GRAYSCALE: ProtonColorScale = {\n SUPER_DARK: \"#141211\",\n DARK: \"#4D4D4D\",\n MEDIUM: \"#7D7D7D\",\n MEDIUM_LIGHT: \"#B1B1B1\",\n LIGHT: LIGHT_GRAY,\n LIGHTEST: \"#F0F1F2\",\n SUPER_LIGHT: ELEVATION,\n WHITE: \"#FFFFFF\",\n};\n\nexport const LIGHT_SECONDARY_SCALE: ProtonColorScale = {\n SUPER_DARK: \"#032026\",\n DARK: \"#084657\",\n MEDIUM: \"#2085BA\",\n MEDIUM_LIGHT: \"#44A8EB\",\n LIGHT: \"#70B9F6\",\n LIGHTEST: \"#9DCBFC\",\n SUPER_LIGHT: \"#C8DFFF\",\n WHITE: \"#f5f9ff\",\n};\n\nexport const LIGHT_PALETTE: ProtonPalette = {\n BASE_COLOR: BACKGROUNDS.WHITE,\n BRAND,\n PRIMARY: BRAND_PRIMARY_SCALE,\n SECONDARY: LIGHT_SECONDARY_SCALE,\n};\n"],"names":["LIGHT_GRAY","BORDER","ELEVATION","LIGHT_GRAYSCALE","LIGHT_SECONDARY_SCALE","LIGHT_PALETTE","BACKGROUNDS","BRAND","BRAND_PRIMARY_SCALE"],"mappings":"oHAOMA,EAAa,UACNC,EAASD,EACTE,EAAY,UACZC,EAAoC,CAC/C,WAAY,UACZ,KAAM,UACN,OAAQ,UACR,aAAc,UACd,MAAOH,EACP,SAAU,UACV,YAAaE,EACb,MAAO,SACT,EAEaE,EAA0C,CACrD,WAAY,UACZ,KAAM,UACN,OAAQ,UACR,aAAc,UACd,MAAO,UACP,SAAU,UACV,YAAa,UACb,MAAO,SACT,EAEaC,EAA+B,CAC1C,WAAYC,EAAAA,YAAY,MAAA,MACxBC,EAAAA,MACA,QAASC,EAAAA,oBACT,UAAWJ,CACb"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { BRAND_PRIMARY_SCALE as E, BRAND as
|
|
2
|
-
const D = "#DDDDDD",
|
|
1
|
+
import { BRAND_PRIMARY_SCALE as E, BRAND as I, BACKGROUNDS as R } from "../colors.es.js";
|
|
2
|
+
const D = "#DDDDDD", F = D, A = "#F7F8F9", G = {
|
|
3
3
|
SUPER_DARK: "#141211",
|
|
4
4
|
DARK: "#4D4D4D",
|
|
5
5
|
MEDIUM: "#7D7D7D",
|
|
6
6
|
MEDIUM_LIGHT: "#B1B1B1",
|
|
7
7
|
LIGHT: D,
|
|
8
8
|
LIGHTEST: "#F0F1F2",
|
|
9
|
-
SUPER_LIGHT:
|
|
9
|
+
SUPER_LIGHT: A,
|
|
10
10
|
WHITE: "#FFFFFF"
|
|
11
|
-
},
|
|
11
|
+
}, T = {
|
|
12
12
|
SUPER_DARK: "#032026",
|
|
13
13
|
DARK: "#084657",
|
|
14
14
|
MEDIUM: "#2085BA",
|
|
@@ -19,16 +19,15 @@ const D = "#DDDDDD", G = D, I = "#F7F8F9", T = {
|
|
|
19
19
|
WHITE: "#f5f9ff"
|
|
20
20
|
}, H = {
|
|
21
21
|
BASE_COLOR: R.WHITE,
|
|
22
|
-
BRAND:
|
|
23
|
-
GRAYSCALE: T,
|
|
22
|
+
BRAND: I,
|
|
24
23
|
PRIMARY: E,
|
|
25
|
-
SECONDARY:
|
|
24
|
+
SECONDARY: T
|
|
26
25
|
};
|
|
27
26
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
F as BORDER,
|
|
28
|
+
A as ELEVATION,
|
|
29
|
+
G as LIGHT_GRAYSCALE,
|
|
31
30
|
H as LIGHT_PALETTE,
|
|
32
|
-
|
|
31
|
+
T as LIGHT_SECONDARY_SCALE
|
|
33
32
|
};
|
|
34
33
|
//# sourceMappingURL=colors.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.es.js","sources":["../../../src/design/lightTheme/colors.ts"],"sourcesContent":["import {\n BACKGROUNDS,\n BRAND,\n BRAND_PRIMARY_SCALE,\n} from \"../colors\";\nimport { ProtonColorScale, ProtonPalette } from \"../types\";\n\nconst LIGHT_GRAY = \"#DDDDDD\";\nexport const BORDER = LIGHT_GRAY;\nexport const ELEVATION = \"#F7F8F9\";\nexport const LIGHT_GRAYSCALE: ProtonColorScale = {\n SUPER_DARK: \"#141211\",\n DARK: \"#4D4D4D\",\n MEDIUM: \"#7D7D7D\",\n MEDIUM_LIGHT: \"#B1B1B1\",\n LIGHT: LIGHT_GRAY,\n LIGHTEST: \"#F0F1F2\",\n SUPER_LIGHT: ELEVATION,\n WHITE: \"#FFFFFF\",\n};\n\nexport const LIGHT_SECONDARY_SCALE: ProtonColorScale = {\n SUPER_DARK: \"#032026\",\n DARK: \"#084657\",\n MEDIUM: \"#2085BA\",\n MEDIUM_LIGHT: \"#44A8EB\",\n LIGHT: \"#70B9F6\",\n LIGHTEST: \"#9DCBFC\",\n SUPER_LIGHT: \"#C8DFFF\",\n WHITE: \"#f5f9ff\",\n};\n\nexport const LIGHT_PALETTE: ProtonPalette = {\n BASE_COLOR: BACKGROUNDS.WHITE,\n BRAND,\n
|
|
1
|
+
{"version":3,"file":"colors.es.js","sources":["../../../src/design/lightTheme/colors.ts"],"sourcesContent":["import {\n BACKGROUNDS,\n BRAND,\n BRAND_PRIMARY_SCALE,\n} from \"../colors\";\nimport { ProtonColorScale, ProtonPalette } from \"../types\";\n\nconst LIGHT_GRAY = \"#DDDDDD\";\nexport const BORDER = LIGHT_GRAY;\nexport const ELEVATION = \"#F7F8F9\";\nexport const LIGHT_GRAYSCALE: ProtonColorScale = {\n SUPER_DARK: \"#141211\",\n DARK: \"#4D4D4D\",\n MEDIUM: \"#7D7D7D\",\n MEDIUM_LIGHT: \"#B1B1B1\",\n LIGHT: LIGHT_GRAY,\n LIGHTEST: \"#F0F1F2\",\n SUPER_LIGHT: ELEVATION,\n WHITE: \"#FFFFFF\",\n};\n\nexport const LIGHT_SECONDARY_SCALE: ProtonColorScale = {\n SUPER_DARK: \"#032026\",\n DARK: \"#084657\",\n MEDIUM: \"#2085BA\",\n MEDIUM_LIGHT: \"#44A8EB\",\n LIGHT: \"#70B9F6\",\n LIGHTEST: \"#9DCBFC\",\n SUPER_LIGHT: \"#C8DFFF\",\n WHITE: \"#f5f9ff\",\n};\n\nexport const LIGHT_PALETTE: ProtonPalette = {\n BASE_COLOR: BACKGROUNDS.WHITE,\n BRAND,\n PRIMARY: BRAND_PRIMARY_SCALE,\n SECONDARY: LIGHT_SECONDARY_SCALE,\n};\n"],"names":["LIGHT_GRAY","BORDER","ELEVATION","LIGHT_GRAYSCALE","LIGHT_SECONDARY_SCALE","LIGHT_PALETTE","BACKGROUNDS","BRAND","BRAND_PRIMARY_SCALE"],"mappings":";AAOA,MAAMA,IAAa,WACNC,IAASD,GACTE,IAAY,WACZC,IAAoC;AAAA,EAC/C,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,OAAOH;AAAA,EACP,UAAU;AAAA,EACV,aAAaE;AAAA,EACb,OAAO;AACT,GAEaE,IAA0C;AAAA,EACrD,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,OAAO;AAAA,EACP,UAAU;AAAA,EACV,aAAa;AAAA,EACb,OAAO;AACT,GAEaC,IAA+B;AAAA,EAC1C,YAAYC,EAAY;AAAA,EACxB,OAAAC;AAAA,EACA,SAASC;AAAA,EACT,WAAWJ;AACb;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.cjs.js","sources":["../../src/hooks/useBreakpoint.tsx"],"sourcesContent":["import { useCallback, useSyncExternalStore } from \"react\";\nimport { Breakpoint } from \"../constants\";\n\
|
|
1
|
+
{"version":3,"file":"useBreakpoint.cjs.js","sources":["../../src/hooks/useBreakpoint.tsx"],"sourcesContent":["import { useCallback, useSyncExternalStore } from \"react\";\nimport type { Breakpoint, BreakpointDirection } from \"../constants\";\n\nexport function useBreakpoint(\n breakpoint: Breakpoint,\n direction: BreakpointDirection = \"down\",\n): boolean {\n const query =\n direction === \"down\"\n ? `(max-width: ${breakpoint}px)`\n : `(min-width: ${breakpoint}px)`;\n\n const subscribe = useCallback(\n (callback: () => void) => {\n const mql = window.matchMedia(query);\n mql.addEventListener(\"change\", callback);\n return () => mql.removeEventListener(\"change\", callback);\n },\n [query],\n );\n\n const getSnapshot = useCallback(\n () => window.matchMedia(query).matches,\n [query],\n );\n\n return useSyncExternalStore(subscribe, getSnapshot, () => direction === \"up\");\n}\n"],"names":["useBreakpoint","breakpoint","direction","query","subscribe","useCallback","callback","mql","getSnapshot","useSyncExternalStore"],"mappings":"yGAGO,SAASA,EACdC,EACAC,EAAiC,OACxB,CACT,MAAMC,EACJD,IAAc,OACV,eAAeD,CAAU,MACzB,eAAeA,CAAU,MAEzBG,EAAYC,EAAAA,YACfC,GAAyB,CACxB,MAAMC,EAAM,OAAO,WAAWJ,CAAK,EACnC,OAAAI,EAAI,iBAAiB,SAAUD,CAAQ,EAChC,IAAMC,EAAI,oBAAoB,SAAUD,CAAQ,CACzD,EACA,CAACH,CAAK,CAAA,EAGFK,EAAcH,EAAAA,YAClB,IAAM,OAAO,WAAWF,CAAK,EAAE,QAC/B,CAACA,CAAK,CAAA,EAGR,OAAOM,EAAAA,qBAAqBL,EAAWI,EAAa,IAAMN,IAAc,IAAI,CAC9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.es.js","sources":["../../src/hooks/useBreakpoint.tsx"],"sourcesContent":["import { useCallback, useSyncExternalStore } from \"react\";\nimport { Breakpoint } from \"../constants\";\n\
|
|
1
|
+
{"version":3,"file":"useBreakpoint.es.js","sources":["../../src/hooks/useBreakpoint.tsx"],"sourcesContent":["import { useCallback, useSyncExternalStore } from \"react\";\nimport type { Breakpoint, BreakpointDirection } from \"../constants\";\n\nexport function useBreakpoint(\n breakpoint: Breakpoint,\n direction: BreakpointDirection = \"down\",\n): boolean {\n const query =\n direction === \"down\"\n ? `(max-width: ${breakpoint}px)`\n : `(min-width: ${breakpoint}px)`;\n\n const subscribe = useCallback(\n (callback: () => void) => {\n const mql = window.matchMedia(query);\n mql.addEventListener(\"change\", callback);\n return () => mql.removeEventListener(\"change\", callback);\n },\n [query],\n );\n\n const getSnapshot = useCallback(\n () => window.matchMedia(query).matches,\n [query],\n );\n\n return useSyncExternalStore(subscribe, getSnapshot, () => direction === \"up\");\n}\n"],"names":["useBreakpoint","breakpoint","direction","query","subscribe","useCallback","callback","mql","getSnapshot","useSyncExternalStore"],"mappings":";AAGO,SAASA,EACdC,GACAC,IAAiC,QACxB;AACT,QAAMC,IACJD,MAAc,SACV,eAAeD,CAAU,QACzB,eAAeA,CAAU,OAEzBG,IAAYC;AAAA,IAChB,CAACC,MAAyB;AACxB,YAAMC,IAAM,OAAO,WAAWJ,CAAK;AACnC,aAAAI,EAAI,iBAAiB,UAAUD,CAAQ,GAChC,MAAMC,EAAI,oBAAoB,UAAUD,CAAQ;AAAA,IACzD;AAAA,IACA,CAACH,CAAK;AAAA,EAAA,GAGFK,IAAcH;AAAA,IAClB,MAAM,OAAO,WAAWF,CAAK,EAAE;AAAA,IAC/B,CAACA,CAAK;AAAA,EAAA;AAGR,SAAOM,EAAqBL,GAAWI,GAAa,MAAMN,MAAc,IAAI;AAC9E;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMergedRef.cjs.js","sources":["../../src/hooks/useMergedRef.ts"],"sourcesContent":["import {\n useCallback,\n type ForwardedRef,\n type
|
|
1
|
+
{"version":3,"file":"useMergedRef.cjs.js","sources":["../../src/hooks/useMergedRef.ts"],"sourcesContent":["import {\n useCallback,\n type ForwardedRef,\n type RefObject,\n type RefCallback,\n} from \"react\";\n\n/**\n * Combines a local ref (for instance access inside the component) with the ref\n * passed into `forwardRef` (object ref or callback ref).\n */\nexport function useMergedRef<T>(\n localRef: RefObject<T | null>,\n forwardedRef: ForwardedRef<T>,\n): RefCallback<T> {\n return useCallback(\n (instance: T | null) => {\n localRef.current = instance;\n if (typeof forwardedRef === \"function\") {\n forwardedRef(instance);\n } else if (forwardedRef != null) {\n forwardedRef.current = instance;\n }\n },\n [localRef, forwardedRef],\n );\n}\n"],"names":["useMergedRef","localRef","forwardedRef","useCallback","instance"],"mappings":"yGAWO,SAASA,EACdC,EACAC,EACgB,CAChB,OAAOC,EAAAA,YACJC,GAAuB,CACtBH,EAAS,QAAUG,EACf,OAAOF,GAAiB,WAC1BA,EAAaE,CAAQ,EACZF,GAAgB,OACzBA,EAAa,QAAUE,EAE3B,EACA,CAACH,EAAUC,CAAY,CAAA,CAE3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMergedRef.es.js","sources":["../../src/hooks/useMergedRef.ts"],"sourcesContent":["import {\n useCallback,\n type ForwardedRef,\n type
|
|
1
|
+
{"version":3,"file":"useMergedRef.es.js","sources":["../../src/hooks/useMergedRef.ts"],"sourcesContent":["import {\n useCallback,\n type ForwardedRef,\n type RefObject,\n type RefCallback,\n} from \"react\";\n\n/**\n * Combines a local ref (for instance access inside the component) with the ref\n * passed into `forwardRef` (object ref or callback ref).\n */\nexport function useMergedRef<T>(\n localRef: RefObject<T | null>,\n forwardedRef: ForwardedRef<T>,\n): RefCallback<T> {\n return useCallback(\n (instance: T | null) => {\n localRef.current = instance;\n if (typeof forwardedRef === \"function\") {\n forwardedRef(instance);\n } else if (forwardedRef != null) {\n forwardedRef.current = instance;\n }\n },\n [localRef, forwardedRef],\n );\n}\n"],"names":["useMergedRef","localRef","forwardedRef","useCallback","instance"],"mappings":";AAWO,SAASA,EACdC,GACAC,GACgB;AAChB,SAAOC;AAAA,IACL,CAACC,MAAuB;AACtB,MAAAH,EAAS,UAAUG,GACf,OAAOF,KAAiB,aAC1BA,EAAaE,CAAQ,IACZF,KAAgB,SACzBA,EAAa,UAAUE;AAAA,IAE3B;AAAA,IACA,CAACH,GAAUC,CAAY;AAAA,EAAA;AAE3B;"}
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ForwardedRef } from 'react';
|
|
2
|
-
import { MutableRefObject } from 'react';
|
|
3
2
|
import { RefCallback } from 'react';
|
|
4
3
|
import { RefObject } from 'react';
|
|
5
4
|
|
|
@@ -37,7 +36,6 @@ declare type ProtonPalette = {
|
|
|
37
36
|
};
|
|
38
37
|
PRIMARY: ProtonColorScale;
|
|
39
38
|
SECONDARY: ProtonColorScale;
|
|
40
|
-
GRAYSCALE: ProtonColorScale;
|
|
41
39
|
};
|
|
42
40
|
|
|
43
41
|
export declare function useBreakpoint(breakpoint: Breakpoint, direction?: BreakpointDirection): boolean;
|
|
@@ -80,7 +78,7 @@ export declare function useLockBodyScroll(isActive?: boolean): void;
|
|
|
80
78
|
* Combines a local ref (for instance access inside the component) with the ref
|
|
81
79
|
* passed into `forwardRef` (object ref or callback ref).
|
|
82
80
|
*/
|
|
83
|
-
export declare function useMergedRef<T>(localRef:
|
|
81
|
+
export declare function useMergedRef<T>(localRef: RefObject<T | null>, forwardedRef: ForwardedRef<T>): RefCallback<T>;
|
|
84
82
|
|
|
85
83
|
/**
|
|
86
84
|
* Generates a palette based on a background image or theme.
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./components/ActionMenu/ActionMenu.cjs.js"),o=require("./components/Badge/Badge.cjs.js"),r=require("./components/Banner/Banner.cjs.js"),e=require("./components/Button/Button.cjs.js"),u=require("./components/ButtonGroup/ButtonGroup.cjs.js"),i=require("./components/ButtonWithSelect/ButtonWithSelect.cjs.js"),l=require("./components/Checkbox/CheckboxInput/CheckboxInput.cjs.js"),c=require("./components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.cjs.js"),s=require("./components/Table/DataTable/DataTable.cjs.js"),T=require("./components/Table/DataTable/DataTableRow.cjs.js"),b=require("./components/Input/CopyInput/CopyInput.cjs.js"),p=require("./components/Overlay/Overlay.cjs.js"),q=require("./components/Elevation/Elevation.cjs.js"),d=require("./components/ImageBackground/ImageBackground.cjs.js"),B=require("./components/Input/BaseInput/Input.cjs.js"),I=require("./components/Input/OTPInput/OTPInput.cjs.js"),h=require("./components/Menu/MenuTrigger.cjs.js"),R=require("./components/Modal/Modal.cjs.js"),v=require("./components/Popover/Popover.cjs.js"),C=require("./components/Input/SearchInput/SearchInput.cjs.js"),S=require("./components/ScreenOverlay/ScreenOverlay.cjs.js"),m=require("./components/Select/Select.cjs.js"),g=require("./components/Switch/Switch.cjs.js"),x=require("./components/Text/TextCountdown/TextCountdown.cjs.js"),w=require("./components/Table/BaseTable/Table.cjs.js"),y=require("./components/Table/BaseTable/elements/TableRow.cjs.js"),A=require("./components/Table/BaseTable/elements/TableCell.cjs.js"),E=require("./components/Table/BaseTable/elements/TableRoot.cjs.js"),M=require("./components/Table/BaseTable/elements/TableHeader.cjs.js"),O=require("./components/Table/BaseTable/elements/TableHeaderRow.cjs.js"),P=require("./components/Table/BaseTable/elements/TableHeaderCell.cjs.js"),k=require("./components/Table/BaseTable/elements/TableBody.cjs.js"),t=require("./components/Table/BaseTable/Collection/useTableCollection.cjs.js"),H=require("./components/Text/TextEllipsis/TextEllipsis.cjs.js"),D=require("./components/Text/TextEmphasis/TextEmphasis.cjs.js"),n=require("./components/ThemeProvider.cjs.js"),G=require("./components/Tombstone/Tombstone.cjs.js"),N=require("./components/Tooltip/ResponsiveTooltip.cjs.js"),V=require("./components/Waveform/Waveform.cjs.js");exports.ActionMenu=a.ActionMenu;exports.Badge=o.Badge;exports.BadgeVariants=o.BadgeVariants;exports.BANNER_VARIANTS=r.BANNER_VARIANTS;exports.Banner=r.Banner;exports.Button=e.Button;exports.ButtonSizes=e.ButtonSizes;exports.ButtonVariants=e.ButtonVariants;exports.ButtonGroup=u.ButtonGroup;exports.ButtonWithSelect=i.ButtonWithSelect;exports.CheckboxInput=l.CheckboxInput;exports.CheckboxRadioGroup=c.CheckboxRadioGroup;exports.DataTable=s.DataTable;exports.DataTableRow=T.DataTableRow;exports.CopyInput=b.CopyInput;exports.Overlay=p.Overlay;exports.Elevation=q.Elevation;exports.ImageBackground=d.ImageBackground;exports.Input=B.Input;exports.OTPInput=I.OTPInput;exports.MenuTrigger=h.MenuTrigger;exports.Modal=R.Modal;exports.Popover=v.Popover;exports.SearchInput=C.SearchInput;exports.ScreenOverlay=S.ScreenOverlay;exports.Select=m.Select;exports.Switch=g.Switch;exports.TextCountdown=x.TextCountdown;exports.Table=w.Table;exports.TableRow=y.TableRow;exports.TableCell=A.TableCell;exports.TableRoot=E.TableRoot;exports.TableHeader=M.TableHeader;exports.TableHeaderRow=O.TableHeaderRow;exports.TableHeaderCell=P.TableHeaderCell;exports.TableBody=k.TableBody;exports.calculateAriaColumnIndex=t.calculateAriaColumnIndex;exports.calculateAriaRowIndex=t.calculateAriaRowIndex;exports.TextEllipsis=H.TextEllipsis;exports.TextEmphasis=D.TextEmphasis;exports.ThemeProvider=n.ThemeProvider;exports.useTheme=n.useTheme;exports.Tombstone=G.Tombstone;exports.Tooltip=N.ResponsiveTooltip;exports.Waveform=V.Waveform;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -174,7 +174,7 @@ declare interface BannerIconProps {
|
|
|
174
174
|
*/
|
|
175
175
|
icon?: boolean | ReactNode;
|
|
176
176
|
/**
|
|
177
|
-
* The data-testid
|
|
177
|
+
* The data-testid for the banner icon.
|
|
178
178
|
*/
|
|
179
179
|
"data-testid"?: string;
|
|
180
180
|
}
|
|
@@ -190,7 +190,7 @@ declare interface BannerProps extends BannerIconProps {
|
|
|
190
190
|
*/
|
|
191
191
|
children: ReactNode;
|
|
192
192
|
/**
|
|
193
|
-
* The data-testid
|
|
193
|
+
* The data-testid for the banner.
|
|
194
194
|
*/
|
|
195
195
|
"data-testid"?: string;
|
|
196
196
|
/**
|
|
@@ -415,7 +415,7 @@ declare interface ButtonProps {
|
|
|
415
415
|
*/
|
|
416
416
|
fullWidth?: boolean;
|
|
417
417
|
/** The prefix to display within the button */
|
|
418
|
-
icon?:
|
|
418
|
+
icon?: ReactNode;
|
|
419
419
|
/** Should the button be non-interactive? */
|
|
420
420
|
isDisabled?: boolean;
|
|
421
421
|
/** The URL that the button should link to. Turns the element into an `a` tag. If the URL is external, you should pass the entire URL to the `to` prop (e.g. `https://example.com`). */
|
|
@@ -429,7 +429,7 @@ declare interface ButtonProps {
|
|
|
429
429
|
/** The test ID for the button */
|
|
430
430
|
"data-testid"?: string;
|
|
431
431
|
/** The content to display within the button */
|
|
432
|
-
children?:
|
|
432
|
+
children?: ReactNode;
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
export declare type ButtonSize = "small" | "medium" | "large" | "xlarge" | "2xlarge";
|
|
@@ -502,7 +502,7 @@ declare interface CheckboxInputProps {
|
|
|
502
502
|
error?: ReactNode | string;
|
|
503
503
|
/** The description attribute of the checkbox input. */
|
|
504
504
|
description?: ReactNode | string;
|
|
505
|
-
/** The test id attribute of the checkbox input. */
|
|
505
|
+
/** The test id attribute of the checkbox `input` element. */
|
|
506
506
|
"data-testid"?: string;
|
|
507
507
|
/**
|
|
508
508
|
* Callback fired when the checkbox state changes.
|
|
@@ -616,7 +616,7 @@ declare interface CheckboxRadioGroupProps {
|
|
|
616
616
|
*/
|
|
617
617
|
round?: boolean;
|
|
618
618
|
/**
|
|
619
|
-
* Test ID for the group.
|
|
619
|
+
* Test ID for the group elemnt `RadixRadioGroup.Root`
|
|
620
620
|
*/
|
|
621
621
|
"data-testid"?: string;
|
|
622
622
|
}
|
|
@@ -802,7 +802,7 @@ export declare interface MenuTriggerProps {
|
|
|
802
802
|
setIsOpen: (isOpen: boolean) => void;
|
|
803
803
|
}
|
|
804
804
|
|
|
805
|
-
export declare const Modal: (({ isOpen, onClose, title, subtitle, body, children, isOverlay,
|
|
805
|
+
export declare const Modal: (({ isOpen, onClose, title, subtitle, body, children, isOverlay, "data-testid": dataTestId, }: ModalProps) => JSX.Element | null) & {
|
|
806
806
|
/**
|
|
807
807
|
* Renders a h2 styled title
|
|
808
808
|
* */
|
|
@@ -868,12 +868,6 @@ declare interface ModalProps {
|
|
|
868
868
|
* Optional title text for the modal header
|
|
869
869
|
* */
|
|
870
870
|
title?: string;
|
|
871
|
-
/**
|
|
872
|
-
* Optional width variant for the modal
|
|
873
|
-
* - type {@link WidthVariant}
|
|
874
|
-
* @default "full"
|
|
875
|
-
* */
|
|
876
|
-
width?: WidthVariant;
|
|
877
871
|
}
|
|
878
872
|
|
|
879
873
|
/**
|
|
@@ -885,7 +879,12 @@ declare interface ModalProps {
|
|
|
885
879
|
export declare const OTPInput: ForwardRefExoticComponent<OTPInputProps & RefAttributes<HTMLDivElement>>;
|
|
886
880
|
|
|
887
881
|
declare interface OTPInputProps {
|
|
888
|
-
/** Test ID for digit inputs
|
|
882
|
+
/** Test ID for digit inputs
|
|
883
|
+
* @important The test id is applied to each digit as:
|
|
884
|
+
* ```
|
|
885
|
+
* ${dataTestId}-digit-${index + 1}
|
|
886
|
+
* ```
|
|
887
|
+
*/
|
|
889
888
|
"data-testid"?: string;
|
|
890
889
|
/** Default value when uncontrolled. */
|
|
891
890
|
defaultValue?: string;
|
|
@@ -988,7 +987,7 @@ declare interface PopoverProps {
|
|
|
988
987
|
*/
|
|
989
988
|
onOpenChange?: (open: boolean) => void;
|
|
990
989
|
/**
|
|
991
|
-
* The trigger element for the
|
|
990
|
+
* The trigger element for the `Popover.Content`.
|
|
992
991
|
*/
|
|
993
992
|
trigger: ReactNode;
|
|
994
993
|
/**
|
|
@@ -1025,7 +1024,6 @@ declare type ProtonPalette = {
|
|
|
1025
1024
|
};
|
|
1026
1025
|
PRIMARY: ProtonColorScale;
|
|
1027
1026
|
SECONDARY: ProtonColorScale;
|
|
1028
|
-
GRAYSCALE: ProtonColorScale;
|
|
1029
1027
|
};
|
|
1030
1028
|
|
|
1031
1029
|
declare interface ProtonStyleSheet {
|
|
@@ -1080,7 +1078,7 @@ declare interface ResponsiveTooltipProps extends Omit<TooltipProps, "placement">
|
|
|
1080
1078
|
* Placement/side of the tooltip/popover.
|
|
1081
1079
|
* @default "top"
|
|
1082
1080
|
*/
|
|
1083
|
-
placement?:
|
|
1081
|
+
placement?: RadixSide;
|
|
1084
1082
|
/**
|
|
1085
1083
|
* Force a specific component type.
|
|
1086
1084
|
* @default "auto"
|
|
@@ -1615,7 +1613,7 @@ declare interface TextEllipsisProps {
|
|
|
1615
1613
|
*/
|
|
1616
1614
|
title?: string;
|
|
1617
1615
|
/**
|
|
1618
|
-
*
|
|
1616
|
+
* Test id for the component.
|
|
1619
1617
|
*/
|
|
1620
1618
|
"data-testid"?: string;
|
|
1621
1619
|
}
|
|
@@ -1829,13 +1827,4 @@ declare interface WaveformProps {
|
|
|
1829
1827
|
totalDuration: number;
|
|
1830
1828
|
}
|
|
1831
1829
|
|
|
1832
|
-
/**
|
|
1833
|
-
* Width variant for the modal (will be standardized in future release)
|
|
1834
|
-
* - medium: 650px (standard modal width on client)
|
|
1835
|
-
* - full: 86vw (default modal width)
|
|
1836
|
-
*/
|
|
1837
|
-
export declare type WidthVariant = "medium" | "full";
|
|
1838
|
-
|
|
1839
|
-
export declare const widthVariants: Record<WidthVariant, string>;
|
|
1840
|
-
|
|
1841
1830
|
export { }
|
package/dist/index.es.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { ActionMenu as e } from "./components/ActionMenu/ActionMenu.es.js";
|
|
2
2
|
import { Badge as p, BadgeVariants as m } from "./components/Badge/Badge.es.js";
|
|
3
3
|
import { BANNER_VARIANTS as a, Banner as f } from "./components/Banner/Banner.es.js";
|
|
4
|
-
import { Button as n, ButtonSizes as T, ButtonVariants as
|
|
5
|
-
import { ButtonGroup as
|
|
6
|
-
import { ButtonWithSelect as
|
|
4
|
+
import { Button as n, ButtonSizes as T, ButtonVariants as u } from "./components/Button/Button.es.js";
|
|
5
|
+
import { ButtonGroup as b } from "./components/ButtonGroup/ButtonGroup.es.js";
|
|
6
|
+
import { ButtonWithSelect as d } from "./components/ButtonWithSelect/ButtonWithSelect.es.js";
|
|
7
7
|
import { CheckboxInput as B } from "./components/Checkbox/CheckboxInput/CheckboxInput.es.js";
|
|
8
|
-
import { CheckboxRadioGroup as
|
|
8
|
+
import { CheckboxRadioGroup as R } from "./components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.es.js";
|
|
9
9
|
import { DataTable as v } from "./components/Table/DataTable/DataTable.es.js";
|
|
10
|
-
import { DataTableRow as
|
|
11
|
-
import { CopyInput as
|
|
10
|
+
import { DataTableRow as S } from "./components/Table/DataTable/DataTableRow.es.js";
|
|
11
|
+
import { CopyInput as w } from "./components/Input/CopyInput/CopyInput.es.js";
|
|
12
12
|
import { Overlay as y } from "./components/Overlay/Overlay.es.js";
|
|
13
|
-
import { Elevation as
|
|
14
|
-
import { ImageBackground as
|
|
15
|
-
import { Input as
|
|
16
|
-
import { OTPInput as
|
|
13
|
+
import { Elevation as k } from "./components/Elevation/Elevation.es.js";
|
|
14
|
+
import { ImageBackground as M } from "./components/ImageBackground/ImageBackground.es.js";
|
|
15
|
+
import { Input as O } from "./components/Input/BaseInput/Input.es.js";
|
|
16
|
+
import { OTPInput as V } from "./components/Input/OTPInput/OTPInput.es.js";
|
|
17
17
|
import { MenuTrigger as G } from "./components/Menu/MenuTrigger.es.js";
|
|
18
|
-
import { Modal as z
|
|
19
|
-
import { Popover as
|
|
20
|
-
import { SearchInput as
|
|
21
|
-
import { ScreenOverlay as
|
|
22
|
-
import { Select as
|
|
23
|
-
import { Switch as
|
|
24
|
-
import { TextCountdown as
|
|
25
|
-
import { Table as
|
|
26
|
-
import { TableRow as
|
|
27
|
-
import { TableCell as
|
|
28
|
-
import { TableRoot as
|
|
29
|
-
import { TableHeader as
|
|
30
|
-
import { TableHeaderRow as
|
|
18
|
+
import { Modal as z } from "./components/Modal/Modal.es.js";
|
|
19
|
+
import { Popover as j } from "./components/Popover/Popover.es.js";
|
|
20
|
+
import { SearchInput as F } from "./components/Input/SearchInput/SearchInput.es.js";
|
|
21
|
+
import { ScreenOverlay as K } from "./components/ScreenOverlay/ScreenOverlay.es.js";
|
|
22
|
+
import { Select as Q } from "./components/Select/Select.es.js";
|
|
23
|
+
import { Switch as X } from "./components/Switch/Switch.es.js";
|
|
24
|
+
import { TextCountdown as Z } from "./components/Text/TextCountdown/TextCountdown.es.js";
|
|
25
|
+
import { Table as oo } from "./components/Table/BaseTable/Table.es.js";
|
|
26
|
+
import { TableRow as eo } from "./components/Table/BaseTable/elements/TableRow.es.js";
|
|
27
|
+
import { TableCell as po } from "./components/Table/BaseTable/elements/TableCell.es.js";
|
|
28
|
+
import { TableRoot as xo } from "./components/Table/BaseTable/elements/TableRoot.es.js";
|
|
29
|
+
import { TableHeader as fo } from "./components/Table/BaseTable/elements/TableHeader.es.js";
|
|
30
|
+
import { TableHeaderRow as no } from "./components/Table/BaseTable/elements/TableHeaderRow.es.js";
|
|
31
31
|
import { TableHeaderCell as uo } from "./components/Table/BaseTable/elements/TableHeaderCell.es.js";
|
|
32
|
-
import { TableBody as
|
|
33
|
-
import { calculateAriaColumnIndex as
|
|
32
|
+
import { TableBody as bo } from "./components/Table/BaseTable/elements/TableBody.es.js";
|
|
33
|
+
import { calculateAriaColumnIndex as so, calculateAriaRowIndex as Bo } from "./components/Table/BaseTable/Collection/useTableCollection.es.js";
|
|
34
34
|
import { TextEllipsis as Ro } from "./components/Text/TextEllipsis/TextEllipsis.es.js";
|
|
35
|
-
import { TextEmphasis as
|
|
35
|
+
import { TextEmphasis as vo } from "./components/Text/TextEmphasis/TextEmphasis.es.js";
|
|
36
36
|
import { ThemeProvider as So, useTheme as go } from "./components/ThemeProvider.es.js";
|
|
37
|
-
import { Tombstone as
|
|
38
|
-
import { ResponsiveTooltip as
|
|
37
|
+
import { Tombstone as Ao } from "./components/Tombstone/Tombstone.es.js";
|
|
38
|
+
import { ResponsiveTooltip as Eo } from "./components/Tooltip/ResponsiveTooltip.es.js";
|
|
39
39
|
import { Waveform as Ho } from "./components/Waveform/Waveform.es.js";
|
|
40
40
|
export {
|
|
41
41
|
e as ActionMenu,
|
|
@@ -44,45 +44,44 @@ export {
|
|
|
44
44
|
m as BadgeVariants,
|
|
45
45
|
f as Banner,
|
|
46
46
|
n as Button,
|
|
47
|
-
|
|
47
|
+
b as ButtonGroup,
|
|
48
48
|
T as ButtonSizes,
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
u as ButtonVariants,
|
|
50
|
+
d as ButtonWithSelect,
|
|
51
51
|
B as CheckboxInput,
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
R as CheckboxRadioGroup,
|
|
53
|
+
w as CopyInput,
|
|
54
54
|
v as DataTable,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
S as DataTableRow,
|
|
56
|
+
k as Elevation,
|
|
57
|
+
M as ImageBackground,
|
|
58
|
+
O as Input,
|
|
59
59
|
G as MenuTrigger,
|
|
60
60
|
z as Modal,
|
|
61
|
-
|
|
61
|
+
V as OTPInput,
|
|
62
62
|
y as Overlay,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
j as Popover,
|
|
64
|
+
K as ScreenOverlay,
|
|
65
|
+
F as SearchInput,
|
|
66
|
+
Q as Select,
|
|
67
|
+
X as Switch,
|
|
68
|
+
oo as Table,
|
|
69
|
+
bo as TableBody,
|
|
70
|
+
po as TableCell,
|
|
71
|
+
fo as TableHeader,
|
|
72
72
|
uo as TableHeaderCell,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
no as TableHeaderRow,
|
|
74
|
+
xo as TableRoot,
|
|
75
|
+
eo as TableRow,
|
|
76
|
+
Z as TextCountdown,
|
|
77
77
|
Ro as TextEllipsis,
|
|
78
|
-
|
|
78
|
+
vo as TextEmphasis,
|
|
79
79
|
So as ThemeProvider,
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
Ao as Tombstone,
|
|
81
|
+
Eo as Tooltip,
|
|
82
82
|
Ho as Waveform,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
go as useTheme
|
|
86
|
-
_ as widthVariants
|
|
83
|
+
so as calculateAriaColumnIndex,
|
|
84
|
+
Bo as calculateAriaRowIndex,
|
|
85
|
+
go as useTheme
|
|
87
86
|
};
|
|
88
87
|
//# sourceMappingURL=index.es.js.map
|