@artsy/palette 37.2.3 → 37.3.1

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/dist/Theme.d.ts CHANGED
@@ -63,7 +63,7 @@ export declare const useTheme: <T extends {
63
63
  6: string;
64
64
  12: string;
65
65
  };
66
- textVariants: Record<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "bq", import("@artsy/palette-tokens/dist/typography/v3").TextTreatment>;
66
+ textVariants: Record<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "xxs" | "bq", import("@artsy/palette-tokens/dist/typography/v3").TextTreatment>;
67
67
  }>() => {
68
68
  theme: T;
69
69
  };
@@ -24,7 +24,7 @@ export declare type BaseTabProps = TextProps & {
24
24
  * or `<BaseTab as={Clickable} onClick={handleClick}>Foo</BaseTab>`
25
25
  */
26
26
  export declare const BaseTab: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & import("..").BoxProps & import("styled-system").TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & Omit<import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, "color"> & {
27
- variant?: import("styled-system").ResponsiveValue<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "bq", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
27
+ variant?: import("styled-system").ResponsiveValue<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "xxs" | "bq", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
28
28
  textColor?: import("styled-system").ResponsiveValue<"black100" | "black60" | "black30" | "black15" | "black10" | "black5" | "white100" | "blue150" | "blue100" | "brand" | "blue10" | "green150" | "green100" | "green10" | "yellow150" | "yellow100" | "yellow10" | "orange150" | "orange100" | "orange10" | "red150" | "red100" | "red10", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
29
29
  lineClamp?: number | undefined;
30
30
  } & {
@@ -33,7 +33,7 @@ export declare const BaseTab: import("styled-components").StyledComponentClass<R
33
33
  textTransform?: import("styled-system").ResponsiveValue<import("../Text").TextTransform, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
34
34
  lineClamp?: import("styled-system").ResponsiveValue<number, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
35
35
  } & BaseTabProps, any, React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & import("..").BoxProps & import("styled-system").TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & Omit<import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, "color"> & {
36
- variant?: import("styled-system").ResponsiveValue<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "bq", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
36
+ variant?: import("styled-system").ResponsiveValue<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "xxs" | "bq", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
37
37
  textColor?: import("styled-system").ResponsiveValue<"black100" | "black60" | "black30" | "black15" | "black10" | "black5" | "white100" | "blue150" | "blue100" | "brand" | "blue10" | "green150" | "green100" | "green10" | "yellow150" | "yellow100" | "yellow10" | "orange150" | "orange100" | "orange10" | "red150" | "red100" | "red10", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
38
38
  lineClamp?: number | undefined;
39
39
  } & {
@@ -2,7 +2,7 @@
2
2
  import { TextProps } from "../Text";
3
3
  export declare type SupProps = TextProps;
4
4
  export declare const Sup: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("..").BoxProps & import("styled-system").TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & Omit<import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, "color"> & {
5
- variant?: import("styled-system").ResponsiveValue<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "bq", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
5
+ variant?: import("styled-system").ResponsiveValue<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "xxs" | "bq", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
6
6
  textColor?: import("styled-system").ResponsiveValue<"black100" | "black60" | "black30" | "black15" | "black10" | "black5" | "white100" | "blue150" | "blue100" | "brand" | "blue10" | "green150" | "green100" | "green10" | "yellow150" | "yellow100" | "yellow10" | "orange150" | "orange100" | "orange10" | "red150" | "red100" | "red10", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
7
7
  lineClamp?: number | undefined;
8
8
  } & {
@@ -11,7 +11,7 @@ export declare const Sup: import("styled-components").StyledComponentClass<impor
11
11
  textTransform?: import("styled-system").ResponsiveValue<import("../Text").TextTransform, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
12
12
  lineClamp?: import("styled-system").ResponsiveValue<number, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
13
13
  }, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("..").BoxProps & import("styled-system").TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & Omit<import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, "color"> & {
14
- variant?: import("styled-system").ResponsiveValue<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "bq", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
14
+ variant?: import("styled-system").ResponsiveValue<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "xxs" | "bq", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
15
15
  textColor?: import("styled-system").ResponsiveValue<"black100" | "black60" | "black30" | "black15" | "black10" | "black5" | "white100" | "blue150" | "blue100" | "brand" | "blue10" | "green150" | "green100" | "green10" | "yellow150" | "yellow100" | "yellow10" | "orange150" | "orange100" | "orange10" | "red150" | "red100" | "red10", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
16
16
  lineClamp?: number | undefined;
17
17
  } & {
@@ -49,7 +49,7 @@ export declare const Text: import("styled-components").StyledComponentClass<impo
49
49
  * ["md", "sm"]
50
50
  * @see {@link TextVariant}
51
51
  */
52
- variant?: ResponsiveValue<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "bq", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
52
+ variant?: ResponsiveValue<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "xxs" | "bq", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
53
53
  textColor?: ResponsiveValue<"black100" | "black60" | "black30" | "black15" | "black10" | "black5" | "white100" | "blue150" | "blue100" | "brand" | "blue10" | "green150" | "green100" | "green10" | "yellow150" | "yellow100" | "yellow10" | "orange150" | "orange100" | "orange10" | "red150" | "red100" | "red10", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
54
54
  /**
55
55
  * Max number of lines before truncating the content with an ellipsis at the end of the last line.
@@ -72,7 +72,7 @@ export declare const Text: import("styled-components").StyledComponentClass<impo
72
72
  * ["md", "sm"]
73
73
  * @see {@link TextVariant}
74
74
  */
75
- variant?: ResponsiveValue<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "bq", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
75
+ variant?: ResponsiveValue<"lg" | "md" | "sm" | "xs" | "xxxl" | "xxl" | "xl" | "lg-display" | "sm-display" | "xxs" | "bq", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
76
76
  textColor?: ResponsiveValue<"black100" | "black60" | "black30" | "black15" | "black10" | "black5" | "white100" | "blue150" | "blue100" | "brand" | "blue10" | "green150" | "green100" | "green10" | "yellow150" | "yellow100" | "yellow10" | "orange150" | "orange100" | "orange10" | "red150" | "red100" | "red10", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
77
77
  /**
78
78
  * Max number of lines before truncating the content with an ellipsis at the end of the last line.
package/dist/styles.css CHANGED
@@ -521,6 +521,11 @@
521
521
  line-height: 20px;
522
522
  font-size: 13px;
523
523
  }
524
+ .sans-xxs {
525
+ font-family: "ll-unica77", "Helvetica Neue", Helvetica, Arial, sans-serif;
526
+ line-height: 14px;
527
+ font-size: 11px;
528
+ }
524
529
  .sans-bq {
525
530
  font-family: "ll-unica77", "Helvetica Neue", Helvetica, Arial, sans-serif;
526
531
  line-height: 60px;
package/dist/tokens.json CHANGED
@@ -93,6 +93,10 @@
93
93
  "fontSize": "13px",
94
94
  "lineHeight": "20px"
95
95
  },
96
+ "xxs": {
97
+ "fontSize": "11px",
98
+ "lineHeight": "14px"
99
+ },
96
100
  "bq": {
97
101
  "fontSize": "50px",
98
102
  "lineHeight": "60px",
@@ -6,10 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.usePortal = void 0;
7
7
  var _react = require("react");
8
8
  var _reactDom = require("react-dom");
9
- var _useDidMount = require("./useDidMount");
10
9
  var usePortal = function usePortal() {
11
10
  var appendEl = (0, _react.useRef)(null);
12
- var isMounted = (0, _useDidMount.useDidMount)();
13
11
  (0, _react.useEffect)(function () {
14
12
  var _appendEl$current;
15
13
  var el = (_appendEl$current = appendEl.current) !== null && _appendEl$current !== void 0 ? _appendEl$current : document.createElement("div");
@@ -25,13 +23,13 @@ var usePortal = function usePortal() {
25
23
  }, []);
26
24
  var createPortal = (0, _react.useCallback)(function (children) {
27
25
  var _appendEl$current2;
28
- if (!isMounted) return null;
26
+ if (typeof window === "undefined") return null;
29
27
 
30
28
  // May execute before effect runs and appendEl is set
31
29
  var el = (_appendEl$current2 = appendEl.current) !== null && _appendEl$current2 !== void 0 ? _appendEl$current2 : document.createElement("div");
32
30
  appendEl.current = el;
33
31
  return /*#__PURE__*/(0, _reactDom.createPortal)(children, el);
34
- }, [isMounted]);
32
+ }, []);
35
33
  return {
36
34
  createPortal: createPortal
37
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"usePortal.js","names":["_react","require","_reactDom","_useDidMount","usePortal","appendEl","useRef","isMounted","useDidMount","useEffect","_appendEl$current","el","current","document","createElement","body","appendChild","removeChild","e","createPortal","useCallback","children","_appendEl$current2","__createPortal__","exports"],"sources":["../../src/utils/usePortal.ts"],"sourcesContent":["import React, { useEffect, useRef, useCallback } from \"react\"\nimport { createPortal as __createPortal__ } from \"react-dom\"\nimport { useDidMount } from \"./useDidMount\"\n\nexport const usePortal = () => {\n const appendEl = useRef<HTMLDivElement | null>(null)\n\n const isMounted = useDidMount()\n\n useEffect(() => {\n const el = appendEl.current ?? document.createElement(\"div\")\n appendEl.current = el\n\n document.body.appendChild(el)\n\n return () => {\n try {\n document.body.removeChild(el)\n } catch (e) {\n // Ignore\n }\n }\n }, [])\n\n const createPortal = useCallback(\n (children: React.ReactNode): React.ReactPortal | null => {\n if (!isMounted) return null\n\n // May execute before effect runs and appendEl is set\n const el = appendEl.current ?? document.createElement(\"div\")\n appendEl.current = el\n\n return __createPortal__(children, el)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AAC;AAAAK,OAAA,CAAApB,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"file":"usePortal.js","names":["_react","require","_reactDom","usePortal","appendEl","useRef","useEffect","_appendEl$current","el","current","document","createElement","body","appendChild","removeChild","e","createPortal","useCallback","children","_appendEl$current2","window","__createPortal__","exports"],"sources":["../../src/utils/usePortal.ts"],"sourcesContent":["import React, { useEffect, useRef, useCallback } from \"react\"\nimport { createPortal as __createPortal__ } from \"react-dom\"\n\nexport const usePortal = () => {\n const appendEl = useRef<HTMLDivElement | null>(null)\n\n useEffect(() => {\n const el = appendEl.current ?? document.createElement(\"div\")\n appendEl.current = el\n\n document.body.appendChild(el)\n\n return () => {\n try {\n document.body.removeChild(el)\n } catch (e) {\n // Ignore\n }\n }\n }, [])\n\n const createPortal = useCallback(\n (children: React.ReactNode): React.ReactPortal | null => {\n if (typeof window === \"undefined\") return null\n\n // May execute before effect runs and appendEl is set\n const el = appendEl.current ?? document.createElement(\"div\")\n appendEl.current = el\n\n return __createPortal__(children, el)\n },\n []\n )\n\n return { createPortal }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAEO,IAAME,SAAS,GAAG,SAAZA,SAASA,CAAA,EAAS;EAC7B,IAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAwB,IAAI,CAAC;EAEpD,IAAAC,gBAAS,EAAC,YAAM;IAAA,IAAAC,iBAAA;IACd,IAAMC,EAAE,IAAAD,iBAAA,GAAGH,QAAQ,CAACK,OAAO,cAAAF,iBAAA,cAAAA,iBAAA,GAAIG,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;IAC5DP,QAAQ,CAACK,OAAO,GAAGD,EAAE;IAErBE,QAAQ,CAACE,IAAI,CAACC,WAAW,CAACL,EAAE,CAAC;IAE7B,OAAO,YAAM;MACX,IAAI;QACFE,QAAQ,CAACE,IAAI,CAACE,WAAW,CAACN,EAAE,CAAC;MAC/B,CAAC,CAAC,OAAOO,CAAC,EAAE;QACV;MAAA;IAEJ,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,IAAMC,YAAY,GAAG,IAAAC,kBAAW,EAC9B,UAACC,QAAyB,EAA+B;IAAA,IAAAC,kBAAA;IACvD,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE,OAAO,IAAI;;IAE9C;IACA,IAAMZ,EAAE,IAAAW,kBAAA,GAAGf,QAAQ,CAACK,OAAO,cAAAU,kBAAA,cAAAA,kBAAA,GAAIT,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;IAC5DP,QAAQ,CAACK,OAAO,GAAGD,EAAE;IAErB,oBAAO,IAAAa,sBAAgB,EAACH,QAAQ,EAAEV,EAAE,CAAC;EACvC,CAAC,EACD,EAAE,CACH;EAED,OAAO;IAAEQ,YAAY,EAAZA;EAAa,CAAC;AACzB,CAAC;AAAAM,OAAA,CAAAnB,SAAA,GAAAA,SAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette",
3
- "version": "37.2.3",
3
+ "version": "37.3.1",
4
4
  "description": "Design system library for react components",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {
@@ -118,7 +118,7 @@
118
118
  },
119
119
  "dependencies": {
120
120
  "@artsy/icons": "^3.2.2",
121
- "@artsy/palette-tokens": "^5.0.0",
121
+ "@artsy/palette-tokens": "^5.1.0",
122
122
  "@seznam/compose-react-refs": "^1.0.6",
123
123
  "@styled-system/theme-get": "^5.1.2",
124
124
  "lodash": "^4.17.21",
@@ -182,5 +182,5 @@
182
182
  "url": "http://localhost"
183
183
  }
184
184
  },
185
- "gitHead": "7d85a4d1603379f85ff9bfd8cbc5817fcda96f52"
185
+ "gitHead": "6f48a1b8f5f6c56e8bde8a436595db5eecf1fa39"
186
186
  }