@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.
Files changed (67) hide show
  1. package/README.md +10 -0
  2. package/dist/components/ActionMenu/ActionMenu.cjs.js.map +1 -1
  3. package/dist/components/ActionMenu/ActionMenu.es.js.map +1 -1
  4. package/dist/components/Banner/Banner.cjs.js.map +1 -1
  5. package/dist/components/Banner/Banner.es.js.map +1 -1
  6. package/dist/components/Button/Button.cjs.js.map +1 -1
  7. package/dist/components/Button/Button.es.js.map +1 -1
  8. package/dist/components/ButtonGroup/ButtonGroup.cjs.js +1 -1
  9. package/dist/components/ButtonGroup/ButtonGroup.cjs.js.map +1 -1
  10. package/dist/components/ButtonGroup/ButtonGroup.es.js +10 -10
  11. package/dist/components/ButtonGroup/ButtonGroup.es.js.map +1 -1
  12. package/dist/components/Checkbox/CheckboxInput/CheckboxInput.cjs.js.map +1 -1
  13. package/dist/components/Checkbox/CheckboxInput/CheckboxInput.es.js.map +1 -1
  14. package/dist/components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.cjs.js.map +1 -1
  15. package/dist/components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.es.js.map +1 -1
  16. package/dist/components/Input/BaseInput/Input.cjs.js.map +1 -1
  17. package/dist/components/Input/BaseInput/Input.es.js.map +1 -1
  18. package/dist/components/Input/OTPInput/OTPInput.cjs.js.map +1 -1
  19. package/dist/components/Input/OTPInput/OTPInput.es.js.map +1 -1
  20. package/dist/components/Modal/Modal.cjs.js +1 -1
  21. package/dist/components/Modal/Modal.cjs.js.map +1 -1
  22. package/dist/components/Modal/Modal.es.js +34 -42
  23. package/dist/components/Modal/Modal.es.js.map +1 -1
  24. package/dist/components/Popover/Popover.cjs.js +1 -1
  25. package/dist/components/Popover/Popover.cjs.js.map +1 -1
  26. package/dist/components/Popover/Popover.es.js +21 -14
  27. package/dist/components/Popover/Popover.es.js.map +1 -1
  28. package/dist/components/ScreenOverlay/ScreenOverlay.cjs.js.map +1 -1
  29. package/dist/components/ScreenOverlay/ScreenOverlay.es.js.map +1 -1
  30. package/dist/components/Select/Select.cjs.js.map +1 -1
  31. package/dist/components/Select/Select.es.js.map +1 -1
  32. package/dist/components/Text/TextEllipsis/TextEllipsis.cjs.js.map +1 -1
  33. package/dist/components/Text/TextEllipsis/TextEllipsis.es.js.map +1 -1
  34. package/dist/components/Tooltip/ResponsiveTooltip.cjs.js.map +1 -1
  35. package/dist/components/Tooltip/ResponsiveTooltip.es.js.map +1 -1
  36. package/dist/constants/breakpoint.cjs.js.map +1 -1
  37. package/dist/constants/breakpoint.es.js.map +1 -1
  38. package/dist/constants.d.ts +2 -0
  39. package/dist/dark.d.ts +0 -1
  40. package/dist/design/darkTheme/colors.cjs.js +1 -1
  41. package/dist/design/darkTheme/colors.cjs.js.map +1 -1
  42. package/dist/design/darkTheme/colors.es.js +7 -8
  43. package/dist/design/darkTheme/colors.es.js.map +1 -1
  44. package/dist/design/generateStylesheet.cjs.js.map +1 -1
  45. package/dist/design/generateStylesheet.es.js +0 -1
  46. package/dist/design/generateStylesheet.es.js.map +1 -1
  47. package/dist/design/lightTheme/colors.cjs.js +1 -1
  48. package/dist/design/lightTheme/colors.cjs.js.map +1 -1
  49. package/dist/design/lightTheme/colors.es.js +10 -11
  50. package/dist/design/lightTheme/colors.es.js.map +1 -1
  51. package/dist/hooks/useBreakpoint.cjs.js.map +1 -1
  52. package/dist/hooks/useBreakpoint.es.js.map +1 -1
  53. package/dist/hooks/useMergedRef.cjs.js.map +1 -1
  54. package/dist/hooks/useMergedRef.es.js.map +1 -1
  55. package/dist/hooks.d.ts +1 -3
  56. package/dist/index.cjs.js +1 -1
  57. package/dist/index.d.ts +16 -27
  58. package/dist/index.es.js +57 -58
  59. package/dist/light.d.ts +0 -1
  60. package/dist/style.css +1 -1
  61. package/dist/theme.d.ts +0 -1
  62. package/dist/utils/palette.cjs.js +1 -1
  63. package/dist/utils/palette.cjs.js.map +1 -1
  64. package/dist/utils/palette.es.js +64 -77
  65. package/dist/utils/palette.es.js.map +1 -1
  66. package/dist/utils.d.ts +0 -1
  67. package/package.json +1 -1
@@ -1,5 +1,7 @@
1
1
  export declare type Breakpoint = (typeof BREAKPOINTS)[keyof typeof BREAKPOINTS];
2
2
 
3
+ export declare type BreakpointDirection = "up" | "down";
4
+
3
5
  export declare const BREAKPOINTS: {
4
6
  SMALL: number;
5
7
  MEDIUM: number;
package/dist/dark.d.ts CHANGED
@@ -42,7 +42,6 @@ declare type ProtonPalette = {
42
42
  };
43
43
  PRIMARY: ProtonColorScale;
44
44
  SECONDARY: ProtonColorScale;
45
- GRAYSCALE: ProtonColorScale;
46
45
  };
47
46
 
48
47
  declare interface ProtonStyleSheet {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../colors.cjs.js"),A="#f7f9fb",L=A,T="rgba(174, 175, 177, 0.21)",E={SUPER_DARK:"#111212",DARK:"#1e1f21",MEDIUM:"#232629",MEDIUM_LIGHT:"#2b2d30",LIGHT:"#43464a",LIGHTEST:"#63676b",SUPER_LIGHT:"#8a8e91",WHITE:A},D={SUPER_DARK:"#142736",DARK:"#22445d",MEDIUM:"#306082",MEDIUM_LIGHT:"#3e7ca8",LIGHT:"#5795c1",LIGHTEST:"#a2c4dd",SUPER_LIGHT:"#dae7f1",WHITE:A},I={BASE_COLOR:R.BACKGROUNDS.BLACK,BRAND:R.BRAND,GRAYSCALE:E,PRIMARY:R.BRAND_PRIMARY_SCALE,SECONDARY:D};exports.BORDER=L;exports.DARK_GRAYSCALE=E;exports.DARK_PALETTE=I;exports.DARK_SECONDARY=D;exports.ELEVATION=T;
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 GRAYSCALE: DARK_GRAYSCALE,\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,UAAWJ,EACX,QAASK,EAAAA,oBACT,UAAWJ,CACb"}
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", S = R, _ = "rgba(174, 175, 177, 0.21)", I = {
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
- }, L = {
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: L
24
+ SECONDARY: I
26
25
  };
27
26
  export {
28
- S as BORDER,
29
- I as DARK_GRAYSCALE,
27
+ T as BORDER,
28
+ _ as DARK_GRAYSCALE,
30
29
  G as DARK_PALETTE,
31
- L as DARK_SECONDARY,
32
- _ as ELEVATION
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 GRAYSCALE: DARK_GRAYSCALE,\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,WAAWJ;AAAA,EACX,SAASK;AAAA,EACT,WAAWJ;AACb;"}
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\n //TODO: add newly generated grayscale color scale\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"}
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\n //TODO: add newly generated grayscale color scale\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;AAAA;"}
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",I=D,A="#F7F8F9",R={SUPER_DARK:"#141211",DARK:"#4D4D4D",MEDIUM:"#7D7D7D",MEDIUM_LIGHT:"#B1B1B1",LIGHT:D,LIGHTEST:"#F0F1F2",SUPER_LIGHT:A,WHITE:"#FFFFFF"},T={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,GRAYSCALE:R,PRIMARY:E.BRAND_PRIMARY_SCALE,SECONDARY:T};exports.BORDER=I;exports.ELEVATION=A;exports.LIGHT_GRAYSCALE=R;exports.LIGHT_PALETTE=L;exports.LIGHT_SECONDARY_SCALE=T;
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 GRAYSCALE: LIGHT_GRAYSCALE,\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,UAAWJ,EACX,QAASK,EAAAA,oBACT,UAAWJ,CACb"}
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 A, BACKGROUNDS as R } from "../colors.es.js";
2
- const D = "#DDDDDD", G = D, I = "#F7F8F9", T = {
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: I,
9
+ SUPER_LIGHT: A,
10
10
  WHITE: "#FFFFFF"
11
- }, L = {
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: A,
23
- GRAYSCALE: T,
22
+ BRAND: I,
24
23
  PRIMARY: E,
25
- SECONDARY: L
24
+ SECONDARY: T
26
25
  };
27
26
  export {
28
- G as BORDER,
29
- I as ELEVATION,
30
- T as LIGHT_GRAYSCALE,
27
+ F as BORDER,
28
+ A as ELEVATION,
29
+ G as LIGHT_GRAYSCALE,
31
30
  H as LIGHT_PALETTE,
32
- L as LIGHT_SECONDARY_SCALE
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 GRAYSCALE: LIGHT_GRAYSCALE,\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,WAAWJ;AAAA,EACX,SAASK;AAAA,EACT,WAAWJ;AACb;"}
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\ntype BreakpointDirection = \"up\" | \"down\";\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":"yGAKO,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
+ {"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\ntype BreakpointDirection = \"up\" | \"down\";\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":";AAKO,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
+ {"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 MutableRefObject,\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: MutableRefObject<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
+ {"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 MutableRefObject,\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: MutableRefObject<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;"}
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: MutableRefObject<T | null>, forwardedRef: ForwardedRef<T>): RefCallback<T>;
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 u=require("./components/ActionMenu/ActionMenu.cjs.js"),t=require("./components/Badge/Badge.cjs.js"),r=require("./components/Banner/Banner.cjs.js"),e=require("./components/Button/Button.cjs.js"),i=require("./components/ButtonGroup/ButtonGroup.cjs.js"),l=require("./components/ButtonWithSelect/ButtonWithSelect.cjs.js"),c=require("./components/Checkbox/CheckboxInput/CheckboxInput.cjs.js"),s=require("./components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.cjs.js"),T=require("./components/Table/DataTable/DataTable.cjs.js"),b=require("./components/Table/DataTable/DataTableRow.cjs.js"),d=require("./components/Input/CopyInput/CopyInput.cjs.js"),p=require("./components/Overlay/Overlay.cjs.js"),q=require("./components/Elevation/Elevation.cjs.js"),B=require("./components/ImageBackground/ImageBackground.cjs.js"),h=require("./components/Input/BaseInput/Input.cjs.js"),I=require("./components/Input/OTPInput/OTPInput.cjs.js"),R=require("./components/Menu/MenuTrigger.cjs.js"),o=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"),w=require("./components/Text/TextCountdown/TextCountdown.cjs.js"),x=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"),n=require("./components/Table/BaseTable/Collection/useTableCollection.cjs.js"),H=require("./components/Text/TextEllipsis/TextEllipsis.cjs.js"),V=require("./components/Text/TextEmphasis/TextEmphasis.cjs.js"),a=require("./components/ThemeProvider.cjs.js"),D=require("./components/Tombstone/Tombstone.cjs.js"),G=require("./components/Tooltip/ResponsiveTooltip.cjs.js"),N=require("./components/Waveform/Waveform.cjs.js");exports.ActionMenu=u.ActionMenu;exports.Badge=t.Badge;exports.BadgeVariants=t.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=i.ButtonGroup;exports.ButtonWithSelect=l.ButtonWithSelect;exports.CheckboxInput=c.CheckboxInput;exports.CheckboxRadioGroup=s.CheckboxRadioGroup;exports.DataTable=T.DataTable;exports.DataTableRow=b.DataTableRow;exports.CopyInput=d.CopyInput;exports.Overlay=p.Overlay;exports.Elevation=q.Elevation;exports.ImageBackground=B.ImageBackground;exports.Input=h.Input;exports.OTPInput=I.OTPInput;exports.MenuTrigger=R.MenuTrigger;exports.Modal=o.Modal;exports.widthVariants=o.widthVariants;exports.Popover=v.Popover;exports.SearchInput=C.SearchInput;exports.ScreenOverlay=S.ScreenOverlay;exports.Select=m.Select;exports.Switch=g.Switch;exports.TextCountdown=w.TextCountdown;exports.Table=x.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=n.calculateAriaColumnIndex;exports.calculateAriaRowIndex=n.calculateAriaRowIndex;exports.TextEllipsis=H.TextEllipsis;exports.TextEmphasis=V.TextEmphasis;exports.ThemeProvider=a.ThemeProvider;exports.useTheme=a.useTheme;exports.Tombstone=D.Tombstone;exports.Tooltip=G.ResponsiveTooltip;exports.Waveform=N.Waveform;
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 to display within the banner.
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 to display within the banner.
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?: React.ReactNode;
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?: React.ReactNode;
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, width, "data-testid": dataTestId, }: ModalProps) => JSX.Element | null) & {
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 popover.
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?: TooltipPlacement;
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
- * A test ID.
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 i } from "./components/Button/Button.es.js";
5
- import { ButtonGroup as d } from "./components/ButtonGroup/ButtonGroup.es.js";
6
- import { ButtonWithSelect as c } from "./components/ButtonWithSelect/ButtonWithSelect.es.js";
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 I } from "./components/Checkbox/CheckboxRadioGroup/CheckboxRadioGroup.es.js";
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 C } from "./components/Table/DataTable/DataTableRow.es.js";
11
- import { CopyInput as g } from "./components/Input/CopyInput/CopyInput.es.js";
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 V } from "./components/Elevation/Elevation.es.js";
14
- import { ImageBackground as H } from "./components/ImageBackground/ImageBackground.es.js";
15
- import { Input as N } from "./components/Input/BaseInput/Input.es.js";
16
- import { OTPInput as P } from "./components/Input/OTPInput/OTPInput.es.js";
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, widthVariants as _ } from "./components/Modal/Modal.es.js";
19
- import { Popover as q } from "./components/Popover/Popover.es.js";
20
- import { SearchInput as J } from "./components/Input/SearchInput/SearchInput.es.js";
21
- import { ScreenOverlay as L } from "./components/ScreenOverlay/ScreenOverlay.es.js";
22
- import { Select as U } from "./components/Select/Select.es.js";
23
- import { Switch as Y } from "./components/Switch/Switch.es.js";
24
- import { TextCountdown as $ } from "./components/Text/TextCountdown/TextCountdown.es.js";
25
- import { Table as ro } from "./components/Table/BaseTable/Table.es.js";
26
- import { TableRow as to } from "./components/Table/BaseTable/elements/TableRow.es.js";
27
- import { TableCell as mo } from "./components/Table/BaseTable/elements/TableCell.es.js";
28
- import { TableRoot as ao } from "./components/Table/BaseTable/elements/TableRoot.es.js";
29
- import { TableHeader as lo } from "./components/Table/BaseTable/elements/TableHeader.es.js";
30
- import { TableHeaderRow as To } from "./components/Table/BaseTable/elements/TableHeaderRow.es.js";
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 co } from "./components/Table/BaseTable/elements/TableBody.es.js";
33
- import { calculateAriaColumnIndex as Bo, calculateAriaRowIndex as ho } from "./components/Table/BaseTable/Collection/useTableCollection.es.js";
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 wo } from "./components/Text/TextEmphasis/TextEmphasis.es.js";
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 yo } from "./components/Tombstone/Tombstone.es.js";
38
- import { ResponsiveTooltip as Vo } from "./components/Tooltip/ResponsiveTooltip.es.js";
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
- d as ButtonGroup,
47
+ b as ButtonGroup,
48
48
  T as ButtonSizes,
49
- i as ButtonVariants,
50
- c as ButtonWithSelect,
49
+ u as ButtonVariants,
50
+ d as ButtonWithSelect,
51
51
  B as CheckboxInput,
52
- I as CheckboxRadioGroup,
53
- g as CopyInput,
52
+ R as CheckboxRadioGroup,
53
+ w as CopyInput,
54
54
  v as DataTable,
55
- C as DataTableRow,
56
- V as Elevation,
57
- H as ImageBackground,
58
- N as Input,
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
- P as OTPInput,
61
+ V as OTPInput,
62
62
  y as Overlay,
63
- q as Popover,
64
- L as ScreenOverlay,
65
- J as SearchInput,
66
- U as Select,
67
- Y as Switch,
68
- ro as Table,
69
- co as TableBody,
70
- mo as TableCell,
71
- lo as TableHeader,
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
- To as TableHeaderRow,
74
- ao as TableRoot,
75
- to as TableRow,
76
- $ as TextCountdown,
73
+ no as TableHeaderRow,
74
+ xo as TableRoot,
75
+ eo as TableRow,
76
+ Z as TextCountdown,
77
77
  Ro as TextEllipsis,
78
- wo as TextEmphasis,
78
+ vo as TextEmphasis,
79
79
  So as ThemeProvider,
80
- yo as Tombstone,
81
- Vo as Tooltip,
80
+ Ao as Tombstone,
81
+ Eo as Tooltip,
82
82
  Ho as Waveform,
83
- Bo as calculateAriaColumnIndex,
84
- ho as calculateAriaRowIndex,
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
package/dist/light.d.ts CHANGED
@@ -33,7 +33,6 @@ declare type ProtonPalette = {
33
33
  };
34
34
  PRIMARY: ProtonColorScale;
35
35
  SECONDARY: ProtonColorScale;
36
- GRAYSCALE: ProtonColorScale;
37
36
  };
38
37
 
39
38
  declare interface ProtonStyleSheet {