@everlywell/ui-kit 0.0.2 → 0.2.0-next
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/.yarn/install-state.gz +0 -0
- package/index.d.mts +6 -2
- package/index.d.ts +6 -2
- package/index.js +78 -1
- package/index.mjs +329 -67
- package/lib/components/Fonts/Fonts.d.ts +2 -0
- package/lib/components/Fonts/index.d.ts +1 -0
- package/lib/components/ThemeProvider/ThemeProvider.d.ts +5 -0
- package/lib/components/ThemeProvider/index.d.ts +1 -0
- package/lib/theme/{forms/Button/config.d.ts → actions/Button/Button.config.d.ts} +5 -5
- package/lib/theme/index.d.ts +137 -10
- package/lib/theme/layout/Box/Box.d.ts +3 -0
- package/lib/theme/layout/Grid/Grid.d.ts +48 -0
- package/lib/theme/layout/Grid/GridItem.d.ts +5 -0
- package/lib/theme/layout/Grid/index.d.ts +2 -0
- package/lib/theme/navigation/Link/Link.config.d.ts +31 -0
- package/lib/theme/typography/Heading/Heading.config.d.ts +47 -0
- package/lib/theme/typography/Heading/Heading.d.ts +3 -0
- package/lib/theme/typography/Text/Text.config.d.ts +36 -0
- package/package.json +1 -1
- /package/lib/theme/{forms → actions}/Button/Button.d.ts +0 -0
|
Binary file
|
package/index.d.mts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
export { default as Button, type ButtonProps, } from './lib/theme/
|
|
2
|
-
export {
|
|
1
|
+
export { default as Button, type ButtonProps, } from './lib/theme/actions/Button/Button';
|
|
2
|
+
export { default as Box, type BoxProps } from './lib/theme/layout/Box/Box';
|
|
3
|
+
export { Grid, GridItem, type GridProps, type GridItemProps, } from './lib/theme/layout/Grid';
|
|
4
|
+
export { default as Heading, type HeadingProps, } from './lib/theme/typography/Heading/Heading';
|
|
5
|
+
export { default as ThemeProvider } from './lib/components/ThemeProvider';
|
|
6
|
+
export { extendBaseTheme as extendTheme } from '@chakra-ui/react';
|
|
3
7
|
export { default as styled } from '@emotion/styled';
|
|
4
8
|
export { theme } from './lib/theme';
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
export { default as Button, type ButtonProps, } from './lib/theme/
|
|
2
|
-
export {
|
|
1
|
+
export { default as Button, type ButtonProps, } from './lib/theme/actions/Button/Button';
|
|
2
|
+
export { default as Box, type BoxProps } from './lib/theme/layout/Box/Box';
|
|
3
|
+
export { Grid, GridItem, type GridProps, type GridItemProps, } from './lib/theme/layout/Grid';
|
|
4
|
+
export { default as Heading, type HeadingProps, } from './lib/theme/typography/Heading/Heading';
|
|
5
|
+
export { default as ThemeProvider } from './lib/components/ThemeProvider';
|
|
6
|
+
export { extendBaseTheme as extendTheme } from '@chakra-ui/react';
|
|
3
7
|
export { default as styled } from '@emotion/styled';
|
|
4
8
|
export { theme } from './lib/theme';
|
package/index.js
CHANGED
|
@@ -1 +1,78 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@chakra-ui/react"),a=require("react/jsx-runtime"),f=require("react"),b=require("@emotion/react"),w=require("@emotion/styled"),y=f.createContext({spacing:0,columns:1}),F=f.forwardRef(({children:o,alignEdges:t=!0,width:n,columns:c=1,spacing:l,...i},m)=>{const d=r.useTheme(),s=l??d.space[5],h=Array.isArray(s)?s.map(x=>-1*x):-1*s;return a.jsx(y.Provider,{value:{spacing:s,columns:c},children:a.jsx(r.Box,{m:t?h:void 0,children:a.jsx(r.Flex,{flexWrap:"wrap",pl:s,pt:s,width:n??"100%",...i,ref:m,children:o})})})});F.displayName="Grid";const p=f.forwardRef(({children:o,width:t,...n},c)=>{const{columns:l,spacing:i}=f.useContext(y),m=Array.isArray(t)?t.map(s=>s==="auto"?1:0):t==="auto"?1:0,d=()=>(Array.isArray(l)?l:[l]).map(h=>`${100/h}%`);return a.jsx(r.Box,{width:t??d()??"100%",pr:i,pb:i,...n,sx:{flexGrow:m,...n.sx},ref:c,children:o})});p.displayName="GridItem";const u=()=>a.jsx(b.Global,{styles:`
|
|
2
|
+
/* PP Agrandir */
|
|
3
|
+
/* Agrandir is used for page headers, section titles, brand moments and quotations. */
|
|
4
|
+
@font-face {
|
|
5
|
+
font-family: 'PP Agrandir';
|
|
6
|
+
src: url('https://cdn.everlywell.com/fonts/PP Agrandir/PPAgrandir-Variable.woff2') format('woff2');
|
|
7
|
+
font-style: normal;
|
|
8
|
+
font-display: swap;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* DM Sans */
|
|
12
|
+
/* Used for: Body copy, button copy and smaller sizes. */
|
|
13
|
+
@font-face {
|
|
14
|
+
font-family: 'DM Sans';
|
|
15
|
+
src: url('https://cdn.everlywell.com/fonts/DM Sans/DMSans-Italic-VariableFont_opsz,wght.woff2') format('woff2');
|
|
16
|
+
font-style: italic;
|
|
17
|
+
font-stretch: normal;
|
|
18
|
+
font-display: swap;
|
|
19
|
+
}
|
|
20
|
+
@font-face {
|
|
21
|
+
font-family: 'DM Sans';
|
|
22
|
+
src: url('https://cdn.everlywell.com/fonts/DM Sans/DMSans-VariableFont_opsz,wght.woff2') format('woff2');
|
|
23
|
+
font-style: normal;
|
|
24
|
+
font-stretch: normal;
|
|
25
|
+
font-display: swap;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* DM Mono */
|
|
29
|
+
/* Used for: Body copy, button copy and smaller sizes. */
|
|
30
|
+
@font-face {
|
|
31
|
+
font-family: 'DM Mono';
|
|
32
|
+
src: url('https://cdn.everlywell.com/fonts/DM Mono/DMMono-Light.woff2') format('woff2');
|
|
33
|
+
font-style: normal;
|
|
34
|
+
font-weight: 300;
|
|
35
|
+
font-stretch: normal;
|
|
36
|
+
font-display: swap;
|
|
37
|
+
}
|
|
38
|
+
@font-face {
|
|
39
|
+
font-family: 'DM Mono';
|
|
40
|
+
src: url('https://cdn.everlywell.com/fonts/DM Mono/DMMono-LightItalic.woff2') format('woff2');
|
|
41
|
+
font-style: italic;
|
|
42
|
+
font-weight: 300;
|
|
43
|
+
font-stretch: normal;
|
|
44
|
+
font-display: swap;
|
|
45
|
+
}
|
|
46
|
+
@font-face {
|
|
47
|
+
font-family: 'DM Mono';
|
|
48
|
+
src: url('https://cdn.everlywell.com/fonts/DM Mono/DMMono-Regular.woff2') format('woff2');
|
|
49
|
+
font-style: normal;
|
|
50
|
+
font-weight: 400;
|
|
51
|
+
font-stretch: normal;
|
|
52
|
+
font-display: swap;
|
|
53
|
+
}
|
|
54
|
+
@font-face {
|
|
55
|
+
font-family: 'DM Mono';
|
|
56
|
+
src: url('https://cdn.everlywell.com/fonts/DM Mono/DMMono-Italic.woff2') format('woff2');
|
|
57
|
+
font-style: italic;
|
|
58
|
+
font-weight: 400;
|
|
59
|
+
font-stretch: normal;
|
|
60
|
+
font-display: swap;
|
|
61
|
+
}
|
|
62
|
+
@font-face {
|
|
63
|
+
font-family: 'DM Mono';
|
|
64
|
+
src: url('https://cdn.everlywell.com/fonts/DM Mono/DMMono-Medium.woff2') format('woff2');
|
|
65
|
+
font-style: normal;
|
|
66
|
+
font-weight: 500;
|
|
67
|
+
font-stretch: normal;
|
|
68
|
+
font-display: swap;
|
|
69
|
+
}
|
|
70
|
+
@font-face {
|
|
71
|
+
font-family: 'DM Mono';
|
|
72
|
+
src: url('https://cdn.everlywell.com/fonts/DM Mono/DMMono-MediumItalic.woff2') format('woff2');
|
|
73
|
+
font-style: italic;
|
|
74
|
+
font-weight: 500;
|
|
75
|
+
font-stretch: normal;
|
|
76
|
+
font-display: swap;
|
|
77
|
+
}
|
|
78
|
+
`}),M=({children:o,...t})=>a.jsxs(r.ChakraBaseProvider,{...t,children:[a.jsx(u,{}),o]}),g=["green","red"],S=r.defineStyleConfig({baseStyle:{fontWeight:"medium",lineHeight:"body",letterSpacing:"normal",borderRadius:"50px",_disabled:{span:{display:"inline-flex"}}},sizes:{sm:{fontSize:["md","lg"],px:[4,5],py:[2,3],".chakra-button__icon > svg":{width:"1.25rem",height:"1.25rem"}},md:{fontSize:["lg","xl"],px:[5,6],py:[4,5],svg:{width:["1.25rem","1.5rem"],height:["1.25rem","1.5rem"]}},wide:{fontSize:"xl",px:9,py:5,width:"100%",".chakra-button__icon > svg":{width:"1.5rem",height:"1.5rem"}}},variants:{primary:o=>{const{colorScheme:t}=o;return g.includes(t)?{bg:`${t}.base`,color:"white.base",":hover, &.hover":{bg:`${t}.dark`},":active, &.active":{bg:`${t}.dark`},":disabled":{bg:"grayscale.lightGrey",color:"grayscale.mediumGrey"}}:{bg:"white.base",color:"black.base",":hover, &.hover":{bg:"green.wash"},":active, &.active":{bg:"green.wash"},":disabled":{bg:"grayscale.lightGrey",color:"grayscale.mediumGrey"}}},secondary:o=>{const{colorScheme:t}=o;return g.includes(t)?{color:`${t}.base`,boxShadow:n=>`inset 0 0 0 2px ${n.colors[t].base}`,":hover, &.hover":{color:`${t}.dark`,boxShadow:n=>`inset 0 0 0 2px ${n.colors[t].dark}`},":active, &.active":{color:`${t}.dark`,boxShadow:n=>`inset 0 0 0 2px ${n.colors[t].dark}`},":disabled":{color:"grayscale.lightGrey",boxShadow:n=>`inset 0 0 0 2px ${n.colors.grayscale.lightGrey}`,opacity:.7}}:{color:"white.base",boxShadow:n=>`inset 0 0 0 2px ${n.colors.white.base}`,":hover, &.hover":{color:"white.base",boxShadow:n=>`inset 0 0 0 2px ${n.colors.green.wash}`},":active, &.active":{color:"white.base",boxShadow:n=>`inset 0 0 0 2px ${n.colors.green.wash}`},":disabled":{color:"grayscale.lightGrey",boxShadow:n=>`inset 0 0 0 2px ${n.colors.grayscale.lightGrey}`,opacity:.7}}}},defaultProps:{size:"md",variant:"primary",colorScheme:"green"}}),D=r.defineStyleConfig({baseStyle:{color:"green.base",fontWeight:"normal",_hover:{textDecoration:"underline",cursor:"pointer"}},variants:{},sizes:{sm:{fontSize:["3xs","xs"],lineHeight:"150%"},md:{fontSize:["2xs","sm"],lineHeight:"150%"},lg:{fontSize:["xs","md"],lineHeight:"150%"}},defaultProps:{size:"md"}}),v=r.defineStyleConfig({baseStyle:{fontFamily:o=>`${o.fonts.heading}`,fontWeight:"normal"},sizes:{"3xl":{fontSize:["6xl","11xl"],lineHeight:"shorter"},"2xl":{fontSize:["6xl","9xl"],lineHeight:"shorter"},xl:{fontSize:["4xl","7xl"],lineHeight:"shorter"},lg:{fontFamily:o=>`${o.fonts.body}`,fontWeight:"medium",fontSize:["3xl","6xl"],lineHeight:"short"},md:{fontFamily:o=>`${o.fonts.body}`,fontWeight:"medium",fontSize:["2xl","4xl"],lineHeight:"short"},sm:{fontFamily:o=>`${o.fonts.body}`,fontWeight:"medium",fontSize:["lg","3xl"],lineHeight:"140%"}},defaultProps:{size:"md"}}),C=r.defineStyleConfig({baseStyle:{fontWeight:"normal",lineHeight:"base",letterSpacing:"normal",fontSize:"md",p:0},sizes:{xs:{fontSize:["2xs","xs"]},sm:{fontSize:["xs","sm"]},md:{fontSize:["sm","md"]},lg:{fontSize:["md","lg"]},xl:{fontSize:["lg","2xl"],lineHeight:["short","shorter"]}},defaultProps:{size:"lg"}}),z={white:{...r.baseTheme.colors.whiteAlpha,base:"#FFFFFF"},black:{...r.baseTheme.colors.blackAlpha,base:"#0F0F0F"},grayscale:{darkGrey:"#545454",grey:"#949494",mediumGrey:"#A9A9A9",lightGrey:"#EEEEEE",darkCream:"#EDEDE8",cream:"#F2F2ED",lightCream:"#F9F9F6"},red:{50:"#FFF4F4",100:"#FFC9C7",200:"#FF9E99",300:"#FF6B62",400:"#FF6B62",500:"#FF6B62",600:"#FF6B62",700:"#FF6B62",800:"#FF6B62",900:"#650500",wash:"#FFF4F4",lighter:"#FFC9C7",light:"#FF9E99",base:"#FF6B62",dark:"#650500"},yellow:{wash:"#FFFEF2",lighter:"#FFF8BC",light:"#FFF386",base:"#FFEC42",dark:"#5C5300"},green:{50:"#EFF9F5",100:"#A1DEC1",200:"#68CA9C",300:"#28724F",400:"#28724F",500:"#28724F",600:"#28724F",700:"#28724F",800:"#28724F",900:"#143927",wash:"#EFF9F5",lighter:"#A1DEC1",light:"#68CA9C",base:"#28724F",dark:"#143927"},lightBlue:{wash:"#F5FBFE",lighter:"#CBECF9",light:"#A1DDF5",base:"#6BCAEF",dark:"#073243"},blue:{wash:"#DFF6FF",lighter:"#61D1FD",light:"#0387BB",base:"#012B3B",dark:"#000C11"},indigo:{wash:"#F5FBFE",lighter:"#CBECF9",light:"#A1DDF5",base:"#6BCAEF",dark:"#073243"},violet:{wash:"#FAEFFF",lighter:"#E6ADFF",light:"#D36BFF",base:"#B917FF",dark:"#380050"}},{semanticTokens:k,sizes:P,space:$,...B}=r.baseTheme,e=o=>`${o/16}rem`,A=o=>o,E=A({...B,fonts:{body:"'DM Sans', sans-serif",heading:"PP Agrandir, sans-serif",mono:"DM Mono, monospace"},fontWeights:{thin:"100",xlight:"200",light:"300",normal:"400",medium:"500",semiBold:"600",bold:"700",xbold:"800",black:"900"},fontSizes:{"3xs":e(6),"2xs":e(8),xs:e(10),sm:e(12),md:e(14),lg:e(16),xl:e(18),"2xl":e(20),"3xl":e(24),"4xl":e(28),"5xl":e(32),"6xl":e(36),"7xl":e(40),"9xl":e(48),"10xl":e(56),"11xl":e(68)},letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{body:1.5,normal:"normal",none:1,shorter:1.1,short:1.3,base:1.5,tall:1.5},sizes:{max:"max-content",min:"min-content",full:"100%"},space:{0:0,1:e(2),2:e(4),3:e(8),4:e(12),5:e(16),6:e(24),7:e(32),8:e(40),9:e(48),10:e(64),11:e(80)},colors:z,components:{Button:S,Link:D,Heading:v,Text:C}});Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>r.Box});Object.defineProperty(exports,"Button",{enumerable:!0,get:()=>r.Button});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>r.Heading});Object.defineProperty(exports,"extendTheme",{enumerable:!0,get:()=>r.extendBaseTheme});exports.styled=w;exports.Grid=F;exports.GridItem=p;exports.ThemeProvider=M;exports.theme=E;
|
package/index.mjs
CHANGED
|
@@ -1,11 +1,148 @@
|
|
|
1
|
-
import { defineStyleConfig as i, baseTheme as
|
|
2
|
-
import { Button as
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { useTheme as x, Box as F, Flex as b, ChakraBaseProvider as u, defineStyleConfig as i, baseTheme as h } from "@chakra-ui/react";
|
|
2
|
+
import { Box as q, Button as J, Heading as K, extendBaseTheme as Q } from "@chakra-ui/react";
|
|
3
|
+
import { jsx as s, jsxs as M } from "react/jsx-runtime";
|
|
4
|
+
import y, { createContext as S, useContext as D } from "react";
|
|
5
|
+
import { Global as v } from "@emotion/react";
|
|
6
|
+
import { default as Y } from "@emotion/styled";
|
|
7
|
+
const p = S({ spacing: 0, columns: 1 }), z = y.forwardRef(
|
|
8
|
+
({
|
|
9
|
+
children: o,
|
|
10
|
+
alignEdges: t = !0,
|
|
11
|
+
width: n,
|
|
12
|
+
columns: f = 1,
|
|
13
|
+
spacing: a,
|
|
14
|
+
...l
|
|
15
|
+
}, c) => {
|
|
16
|
+
const d = x(), r = a ?? d.space[5], m = Array.isArray(r) ? r.map((w) => -1 * w) : -1 * r;
|
|
17
|
+
return /* @__PURE__ */ s(p.Provider, { value: { spacing: r, columns: f }, children: /* @__PURE__ */ s(F, { m: t ? m : void 0, children: /* @__PURE__ */ s(
|
|
18
|
+
b,
|
|
19
|
+
{
|
|
20
|
+
flexWrap: "wrap",
|
|
21
|
+
pl: r,
|
|
22
|
+
pt: r,
|
|
23
|
+
width: n ?? "100%",
|
|
24
|
+
...l,
|
|
25
|
+
ref: c,
|
|
26
|
+
children: o
|
|
27
|
+
}
|
|
28
|
+
) }) });
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
z.displayName = "Grid";
|
|
32
|
+
const C = y.forwardRef(
|
|
33
|
+
({ children: o, width: t, ...n }, f) => {
|
|
34
|
+
const { columns: a, spacing: l } = D(p), c = Array.isArray(t) ? t.map((r) => r === "auto" ? 1 : 0) : t === "auto" ? 1 : 0;
|
|
35
|
+
return /* @__PURE__ */ s(
|
|
36
|
+
F,
|
|
37
|
+
{
|
|
38
|
+
width: t ?? (Array.isArray(a) ? a : [a]).map((m) => `${100 / m}%`) ?? "100%",
|
|
39
|
+
pr: l,
|
|
40
|
+
pb: l,
|
|
41
|
+
...n,
|
|
42
|
+
sx: {
|
|
43
|
+
flexGrow: c,
|
|
44
|
+
...n.sx
|
|
45
|
+
},
|
|
46
|
+
ref: f,
|
|
47
|
+
children: o
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
C.displayName = "GridItem";
|
|
53
|
+
const B = () => /* @__PURE__ */ s(
|
|
54
|
+
v,
|
|
55
|
+
{
|
|
56
|
+
styles: `
|
|
57
|
+
/* PP Agrandir */
|
|
58
|
+
/* Agrandir is used for page headers, section titles, brand moments and quotations. */
|
|
59
|
+
@font-face {
|
|
60
|
+
font-family: 'PP Agrandir';
|
|
61
|
+
src: url('https://cdn.everlywell.com/fonts/PP Agrandir/PPAgrandir-Variable.woff2') format('woff2');
|
|
62
|
+
font-style: normal;
|
|
63
|
+
font-display: swap;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* DM Sans */
|
|
67
|
+
/* Used for: Body copy, button copy and smaller sizes. */
|
|
68
|
+
@font-face {
|
|
69
|
+
font-family: 'DM Sans';
|
|
70
|
+
src: url('https://cdn.everlywell.com/fonts/DM Sans/DMSans-Italic-VariableFont_opsz,wght.woff2') format('woff2');
|
|
71
|
+
font-style: italic;
|
|
72
|
+
font-stretch: normal;
|
|
73
|
+
font-display: swap;
|
|
74
|
+
}
|
|
75
|
+
@font-face {
|
|
76
|
+
font-family: 'DM Sans';
|
|
77
|
+
src: url('https://cdn.everlywell.com/fonts/DM Sans/DMSans-VariableFont_opsz,wght.woff2') format('woff2');
|
|
78
|
+
font-style: normal;
|
|
79
|
+
font-stretch: normal;
|
|
80
|
+
font-display: swap;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* DM Mono */
|
|
84
|
+
/* Used for: Body copy, button copy and smaller sizes. */
|
|
85
|
+
@font-face {
|
|
86
|
+
font-family: 'DM Mono';
|
|
87
|
+
src: url('https://cdn.everlywell.com/fonts/DM Mono/DMMono-Light.woff2') format('woff2');
|
|
88
|
+
font-style: normal;
|
|
89
|
+
font-weight: 300;
|
|
90
|
+
font-stretch: normal;
|
|
91
|
+
font-display: swap;
|
|
92
|
+
}
|
|
93
|
+
@font-face {
|
|
94
|
+
font-family: 'DM Mono';
|
|
95
|
+
src: url('https://cdn.everlywell.com/fonts/DM Mono/DMMono-LightItalic.woff2') format('woff2');
|
|
96
|
+
font-style: italic;
|
|
97
|
+
font-weight: 300;
|
|
98
|
+
font-stretch: normal;
|
|
99
|
+
font-display: swap;
|
|
100
|
+
}
|
|
101
|
+
@font-face {
|
|
102
|
+
font-family: 'DM Mono';
|
|
103
|
+
src: url('https://cdn.everlywell.com/fonts/DM Mono/DMMono-Regular.woff2') format('woff2');
|
|
104
|
+
font-style: normal;
|
|
105
|
+
font-weight: 400;
|
|
106
|
+
font-stretch: normal;
|
|
107
|
+
font-display: swap;
|
|
108
|
+
}
|
|
109
|
+
@font-face {
|
|
110
|
+
font-family: 'DM Mono';
|
|
111
|
+
src: url('https://cdn.everlywell.com/fonts/DM Mono/DMMono-Italic.woff2') format('woff2');
|
|
112
|
+
font-style: italic;
|
|
113
|
+
font-weight: 400;
|
|
114
|
+
font-stretch: normal;
|
|
115
|
+
font-display: swap;
|
|
116
|
+
}
|
|
117
|
+
@font-face {
|
|
118
|
+
font-family: 'DM Mono';
|
|
119
|
+
src: url('https://cdn.everlywell.com/fonts/DM Mono/DMMono-Medium.woff2') format('woff2');
|
|
120
|
+
font-style: normal;
|
|
121
|
+
font-weight: 500;
|
|
122
|
+
font-stretch: normal;
|
|
123
|
+
font-display: swap;
|
|
124
|
+
}
|
|
125
|
+
@font-face {
|
|
126
|
+
font-family: 'DM Mono';
|
|
127
|
+
src: url('https://cdn.everlywell.com/fonts/DM Mono/DMMono-MediumItalic.woff2') format('woff2');
|
|
128
|
+
font-style: italic;
|
|
129
|
+
font-weight: 500;
|
|
130
|
+
font-stretch: normal;
|
|
131
|
+
font-display: swap;
|
|
132
|
+
}
|
|
133
|
+
`
|
|
134
|
+
}
|
|
135
|
+
), R = ({
|
|
136
|
+
children: o,
|
|
137
|
+
...t
|
|
138
|
+
}) => /* @__PURE__ */ M(u, { ...t, children: [
|
|
139
|
+
/* @__PURE__ */ s(B, {}),
|
|
140
|
+
o
|
|
141
|
+
] }), g = ["green", "red"], A = i({
|
|
5
142
|
// The styles all button have in common
|
|
6
143
|
baseStyle: {
|
|
7
|
-
fontWeight: "
|
|
8
|
-
lineHeight: "
|
|
144
|
+
fontWeight: "medium",
|
|
145
|
+
lineHeight: "body",
|
|
9
146
|
letterSpacing: "normal",
|
|
10
147
|
borderRadius: "50px",
|
|
11
148
|
// <-- border radius is same for all variants and sizes
|
|
@@ -19,7 +156,7 @@ const s = ["green", "red"], l = i({
|
|
|
19
156
|
// Two sizes: sm and md
|
|
20
157
|
sizes: {
|
|
21
158
|
sm: {
|
|
22
|
-
fontSize: "
|
|
159
|
+
fontSize: ["md", "lg"],
|
|
23
160
|
px: [4, 5],
|
|
24
161
|
// <-- px is short for paddingLeft and paddingRight
|
|
25
162
|
py: [2, 3],
|
|
@@ -30,7 +167,7 @@ const s = ["green", "red"], l = i({
|
|
|
30
167
|
}
|
|
31
168
|
},
|
|
32
169
|
md: {
|
|
33
|
-
fontSize: "
|
|
170
|
+
fontSize: ["lg", "xl"],
|
|
34
171
|
px: [5, 6],
|
|
35
172
|
// <-- px is short for paddingLeft and paddingRight
|
|
36
173
|
py: [4, 5],
|
|
@@ -41,7 +178,7 @@ const s = ["green", "red"], l = i({
|
|
|
41
178
|
}
|
|
42
179
|
},
|
|
43
180
|
wide: {
|
|
44
|
-
fontSize: "
|
|
181
|
+
fontSize: "xl",
|
|
45
182
|
px: 9,
|
|
46
183
|
// <-- these values are tokens from the design system
|
|
47
184
|
py: 5,
|
|
@@ -53,18 +190,18 @@ const s = ["green", "red"], l = i({
|
|
|
53
190
|
}
|
|
54
191
|
}
|
|
55
192
|
},
|
|
56
|
-
// Two variants:
|
|
193
|
+
// Two variants: primary and secondary
|
|
57
194
|
variants: {
|
|
58
|
-
|
|
59
|
-
const { colorScheme:
|
|
60
|
-
return
|
|
61
|
-
bg: `${
|
|
195
|
+
primary: (o) => {
|
|
196
|
+
const { colorScheme: t } = o;
|
|
197
|
+
return g.includes(t) ? {
|
|
198
|
+
bg: `${t}.base`,
|
|
62
199
|
color: "white.base",
|
|
63
200
|
":hover, &.hover": {
|
|
64
|
-
bg: `${
|
|
201
|
+
bg: `${t}.dark`
|
|
65
202
|
},
|
|
66
203
|
":active, &.active": {
|
|
67
|
-
bg: `${
|
|
204
|
+
bg: `${t}.dark`
|
|
68
205
|
},
|
|
69
206
|
":disabled": {
|
|
70
207
|
bg: "grayscale.lightGrey",
|
|
@@ -85,52 +222,156 @@ const s = ["green", "red"], l = i({
|
|
|
85
222
|
}
|
|
86
223
|
};
|
|
87
224
|
},
|
|
88
|
-
|
|
89
|
-
const { colorScheme:
|
|
90
|
-
return
|
|
91
|
-
color: `${
|
|
92
|
-
boxShadow: (
|
|
225
|
+
secondary: (o) => {
|
|
226
|
+
const { colorScheme: t } = o;
|
|
227
|
+
return g.includes(t) ? {
|
|
228
|
+
color: `${t}.base`,
|
|
229
|
+
boxShadow: (n) => `inset 0 0 0 2px ${n.colors[t].base}`,
|
|
93
230
|
":hover, &.hover": {
|
|
94
|
-
color: `${
|
|
95
|
-
boxShadow: (
|
|
231
|
+
color: `${t}.dark`,
|
|
232
|
+
boxShadow: (n) => `inset 0 0 0 2px ${n.colors[t].dark}`
|
|
96
233
|
},
|
|
97
234
|
":active, &.active": {
|
|
98
|
-
color: `${
|
|
99
|
-
boxShadow: (
|
|
235
|
+
color: `${t}.dark`,
|
|
236
|
+
boxShadow: (n) => `inset 0 0 0 2px ${n.colors[t].dark}`
|
|
100
237
|
},
|
|
101
238
|
":disabled": {
|
|
102
239
|
color: "grayscale.lightGrey",
|
|
103
|
-
boxShadow: (
|
|
240
|
+
boxShadow: (n) => `inset 0 0 0 2px ${n.colors.grayscale.lightGrey}`,
|
|
104
241
|
opacity: 0.7
|
|
105
242
|
}
|
|
106
243
|
} : {
|
|
107
244
|
color: "white.base",
|
|
108
|
-
boxShadow: (
|
|
245
|
+
boxShadow: (n) => `inset 0 0 0 2px ${n.colors.white.base}`,
|
|
109
246
|
":hover, &.hover": {
|
|
110
247
|
color: "white.base",
|
|
111
|
-
boxShadow: (
|
|
248
|
+
boxShadow: (n) => `inset 0 0 0 2px ${n.colors.green.wash}`
|
|
112
249
|
},
|
|
113
250
|
":active, &.active": {
|
|
114
251
|
color: "white.base",
|
|
115
|
-
boxShadow: (
|
|
252
|
+
boxShadow: (n) => `inset 0 0 0 2px ${n.colors.green.wash}`
|
|
116
253
|
},
|
|
117
254
|
":disabled": {
|
|
118
255
|
color: "grayscale.lightGrey",
|
|
119
|
-
boxShadow: (
|
|
256
|
+
boxShadow: (n) => `inset 0 0 0 2px ${n.colors.grayscale.lightGrey}`,
|
|
120
257
|
opacity: 0.7
|
|
121
258
|
}
|
|
122
259
|
};
|
|
123
260
|
}
|
|
261
|
+
// tertiary = text/link button
|
|
124
262
|
},
|
|
125
263
|
// The default size and variant values
|
|
126
264
|
defaultProps: {
|
|
127
265
|
size: "md",
|
|
128
|
-
variant: "
|
|
266
|
+
variant: "primary",
|
|
129
267
|
colorScheme: "green"
|
|
130
268
|
}
|
|
131
|
-
}),
|
|
132
|
-
|
|
133
|
-
|
|
269
|
+
}), E = i({
|
|
270
|
+
baseStyle: {
|
|
271
|
+
color: "green.base",
|
|
272
|
+
fontWeight: "normal",
|
|
273
|
+
_hover: {
|
|
274
|
+
textDecoration: "underline",
|
|
275
|
+
cursor: "pointer"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
variants: {},
|
|
279
|
+
sizes: {
|
|
280
|
+
sm: {
|
|
281
|
+
fontSize: ["3xs", "xs"],
|
|
282
|
+
lineHeight: "150%"
|
|
283
|
+
},
|
|
284
|
+
md: {
|
|
285
|
+
fontSize: ["2xs", "sm"],
|
|
286
|
+
lineHeight: "150%"
|
|
287
|
+
},
|
|
288
|
+
lg: {
|
|
289
|
+
fontSize: ["xs", "md"],
|
|
290
|
+
lineHeight: "150%"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
// The default size and variant values
|
|
294
|
+
defaultProps: {
|
|
295
|
+
size: "md"
|
|
296
|
+
}
|
|
297
|
+
}), k = i({
|
|
298
|
+
baseStyle: {
|
|
299
|
+
fontFamily: (o) => `${o.fonts.heading}`,
|
|
300
|
+
fontWeight: "normal"
|
|
301
|
+
},
|
|
302
|
+
sizes: {
|
|
303
|
+
"3xl": {
|
|
304
|
+
// Home header
|
|
305
|
+
fontSize: ["6xl", "11xl"],
|
|
306
|
+
lineHeight: "shorter"
|
|
307
|
+
},
|
|
308
|
+
"2xl": {
|
|
309
|
+
// Section header
|
|
310
|
+
fontSize: ["6xl", "9xl"],
|
|
311
|
+
lineHeight: "shorter"
|
|
312
|
+
},
|
|
313
|
+
xl: {
|
|
314
|
+
// Product header
|
|
315
|
+
fontSize: ["4xl", "7xl"],
|
|
316
|
+
lineHeight: "shorter"
|
|
317
|
+
},
|
|
318
|
+
lg: {
|
|
319
|
+
// Large title
|
|
320
|
+
fontFamily: (o) => `${o.fonts.body}`,
|
|
321
|
+
fontWeight: "medium",
|
|
322
|
+
fontSize: ["3xl", "6xl"],
|
|
323
|
+
lineHeight: "short"
|
|
324
|
+
},
|
|
325
|
+
md: {
|
|
326
|
+
// Medium title
|
|
327
|
+
fontFamily: (o) => `${o.fonts.body}`,
|
|
328
|
+
fontWeight: "medium",
|
|
329
|
+
fontSize: ["2xl", "4xl"],
|
|
330
|
+
lineHeight: "short"
|
|
331
|
+
},
|
|
332
|
+
sm: {
|
|
333
|
+
// Small title
|
|
334
|
+
fontFamily: (o) => `${o.fonts.body}`,
|
|
335
|
+
fontWeight: "medium",
|
|
336
|
+
fontSize: ["lg", "3xl"],
|
|
337
|
+
lineHeight: "140%"
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
defaultProps: {
|
|
341
|
+
size: "md"
|
|
342
|
+
}
|
|
343
|
+
}), $ = i({
|
|
344
|
+
baseStyle: {
|
|
345
|
+
fontWeight: "normal",
|
|
346
|
+
lineHeight: "base",
|
|
347
|
+
letterSpacing: "normal",
|
|
348
|
+
fontSize: "md",
|
|
349
|
+
p: 0
|
|
350
|
+
},
|
|
351
|
+
sizes: {
|
|
352
|
+
xs: {
|
|
353
|
+
fontSize: ["2xs", "xs"]
|
|
354
|
+
},
|
|
355
|
+
sm: {
|
|
356
|
+
fontSize: ["xs", "sm"]
|
|
357
|
+
},
|
|
358
|
+
md: {
|
|
359
|
+
fontSize: ["sm", "md"]
|
|
360
|
+
},
|
|
361
|
+
lg: {
|
|
362
|
+
fontSize: ["md", "lg"]
|
|
363
|
+
},
|
|
364
|
+
xl: {
|
|
365
|
+
fontSize: ["lg", "2xl"],
|
|
366
|
+
lineHeight: ["short", "shorter"]
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
defaultProps: {
|
|
370
|
+
size: "lg"
|
|
371
|
+
}
|
|
372
|
+
}), G = {
|
|
373
|
+
white: { ...h.colors.whiteAlpha, base: "#FFFFFF" },
|
|
374
|
+
black: { ...h.colors.blackAlpha, base: "#0F0F0F" },
|
|
134
375
|
grayscale: {
|
|
135
376
|
darkGrey: "#545454",
|
|
136
377
|
grey: "#949494",
|
|
@@ -229,46 +470,60 @@ const s = ["green", "red"], l = i({
|
|
|
229
470
|
base: "#B917FF",
|
|
230
471
|
dark: "#380050"
|
|
231
472
|
}
|
|
232
|
-
}, { semanticTokens:
|
|
233
|
-
...
|
|
473
|
+
}, { semanticTokens: L, sizes: V, space: j, ...P } = h, e = (o) => `${o / 16}rem`, H = (o) => o, N = H({
|
|
474
|
+
...P,
|
|
234
475
|
fonts: {
|
|
235
|
-
body: '
|
|
236
|
-
heading:
|
|
237
|
-
mono: "
|
|
476
|
+
body: "'DM Sans', sans-serif",
|
|
477
|
+
heading: "PP Agrandir, sans-serif",
|
|
478
|
+
mono: "DM Mono, monospace"
|
|
238
479
|
},
|
|
239
480
|
fontWeights: {
|
|
240
|
-
// TODO: redefine font weights with design
|
|
241
481
|
thin: "100",
|
|
242
482
|
xlight: "200",
|
|
243
483
|
light: "300",
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
484
|
+
normal: "400",
|
|
485
|
+
medium: "500",
|
|
486
|
+
semiBold: "600",
|
|
487
|
+
bold: "700",
|
|
488
|
+
xbold: "800",
|
|
489
|
+
black: "900"
|
|
248
490
|
},
|
|
249
491
|
fontSizes: {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
"
|
|
258
|
-
"
|
|
492
|
+
"3xs": e(6),
|
|
493
|
+
"2xs": e(8),
|
|
494
|
+
xs: e(10),
|
|
495
|
+
sm: e(12),
|
|
496
|
+
md: e(14),
|
|
497
|
+
lg: e(16),
|
|
498
|
+
xl: e(18),
|
|
499
|
+
"2xl": e(20),
|
|
500
|
+
"3xl": e(24),
|
|
501
|
+
"4xl": e(28),
|
|
502
|
+
"5xl": e(32),
|
|
503
|
+
"6xl": e(36),
|
|
504
|
+
"7xl": e(40),
|
|
505
|
+
"9xl": e(48),
|
|
506
|
+
"10xl": e(56),
|
|
507
|
+
"11xl": e(68)
|
|
259
508
|
},
|
|
260
509
|
letterSpacings: {
|
|
261
510
|
// TODO: redefine letter spacings with design
|
|
262
|
-
|
|
263
|
-
tight: "0.
|
|
264
|
-
normal: "0
|
|
265
|
-
wide: "0.
|
|
266
|
-
|
|
511
|
+
tighter: "-0.05em",
|
|
512
|
+
tight: "-0.025em",
|
|
513
|
+
normal: "0",
|
|
514
|
+
wide: "0.025em",
|
|
515
|
+
wider: "0.05em",
|
|
516
|
+
widest: "0.1em"
|
|
267
517
|
},
|
|
268
518
|
lineHeights: {
|
|
269
519
|
// TODO: redefine line heights with design
|
|
270
|
-
body:
|
|
271
|
-
|
|
520
|
+
body: 1.5,
|
|
521
|
+
normal: "normal",
|
|
522
|
+
none: 1,
|
|
523
|
+
shorter: 1.1,
|
|
524
|
+
short: 1.3,
|
|
525
|
+
base: 1.5,
|
|
526
|
+
tall: 1.5
|
|
272
527
|
},
|
|
273
528
|
sizes: {
|
|
274
529
|
max: "max-content",
|
|
@@ -295,15 +550,22 @@ const s = ["green", "red"], l = i({
|
|
|
295
550
|
10: e(64),
|
|
296
551
|
11: e(80)
|
|
297
552
|
},
|
|
298
|
-
colors:
|
|
553
|
+
colors: G,
|
|
299
554
|
components: {
|
|
300
|
-
Button:
|
|
555
|
+
Button: A,
|
|
556
|
+
Link: E,
|
|
557
|
+
Heading: k,
|
|
558
|
+
Text: $
|
|
301
559
|
}
|
|
302
560
|
});
|
|
303
561
|
export {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
562
|
+
q as Box,
|
|
563
|
+
J as Button,
|
|
564
|
+
z as Grid,
|
|
565
|
+
C as GridItem,
|
|
566
|
+
K as Heading,
|
|
567
|
+
R as ThemeProvider,
|
|
568
|
+
Q as extendTheme,
|
|
569
|
+
Y as styled,
|
|
570
|
+
N as theme
|
|
309
571
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Fonts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ThemeProvider';
|
|
@@ -13,7 +13,7 @@ declare const _default: {
|
|
|
13
13
|
} | undefined;
|
|
14
14
|
sizes?: {
|
|
15
15
|
sm: {
|
|
16
|
-
fontSize:
|
|
16
|
+
fontSize: ("md" | "lg")[];
|
|
17
17
|
px: number[];
|
|
18
18
|
py: number[];
|
|
19
19
|
'.chakra-button__icon > svg': {
|
|
@@ -22,7 +22,7 @@ declare const _default: {
|
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
md: {
|
|
25
|
-
fontSize:
|
|
25
|
+
fontSize: ("lg" | "xl")[];
|
|
26
26
|
px: number[];
|
|
27
27
|
py: number[];
|
|
28
28
|
svg: {
|
|
@@ -42,7 +42,7 @@ declare const _default: {
|
|
|
42
42
|
};
|
|
43
43
|
} | undefined;
|
|
44
44
|
variants?: {
|
|
45
|
-
|
|
45
|
+
primary: (props: StyleFunctionProps) => {
|
|
46
46
|
bg: string;
|
|
47
47
|
color: string;
|
|
48
48
|
':hover, &.hover': {
|
|
@@ -56,7 +56,7 @@ declare const _default: {
|
|
|
56
56
|
color: string;
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
|
-
|
|
59
|
+
secondary: (props: StyleFunctionProps) => {
|
|
60
60
|
color: string;
|
|
61
61
|
boxShadow: (theme: Record<string, any>) => string;
|
|
62
62
|
':hover, &.hover': {
|
|
@@ -76,7 +76,7 @@ declare const _default: {
|
|
|
76
76
|
} | undefined;
|
|
77
77
|
defaultProps?: {
|
|
78
78
|
size?: "sm" | "md" | "wide" | undefined;
|
|
79
|
-
variant?: "
|
|
79
|
+
variant?: "primary" | "secondary" | undefined;
|
|
80
80
|
colorScheme?: string | undefined;
|
|
81
81
|
} | undefined;
|
|
82
82
|
};
|
package/lib/theme/index.d.ts
CHANGED
|
@@ -8,12 +8,16 @@ export declare const theme: {
|
|
|
8
8
|
thin: string;
|
|
9
9
|
xlight: string;
|
|
10
10
|
light: string;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
normal: string;
|
|
12
|
+
medium: string;
|
|
13
|
+
semiBold: string;
|
|
13
14
|
bold: string;
|
|
14
15
|
xbold: string;
|
|
16
|
+
black: string;
|
|
15
17
|
};
|
|
16
18
|
fontSizes: {
|
|
19
|
+
'3xs': string;
|
|
20
|
+
'2xs': string;
|
|
17
21
|
xs: string;
|
|
18
22
|
sm: string;
|
|
19
23
|
md: string;
|
|
@@ -22,17 +26,29 @@ export declare const theme: {
|
|
|
22
26
|
'2xl': string;
|
|
23
27
|
'3xl': string;
|
|
24
28
|
'4xl': string;
|
|
29
|
+
'5xl': string;
|
|
30
|
+
'6xl': string;
|
|
31
|
+
'7xl': string;
|
|
32
|
+
'9xl': string;
|
|
33
|
+
'10xl': string;
|
|
34
|
+
'11xl': string;
|
|
25
35
|
};
|
|
26
36
|
letterSpacings: {
|
|
27
|
-
|
|
37
|
+
tighter: string;
|
|
28
38
|
tight: string;
|
|
29
39
|
normal: string;
|
|
30
40
|
wide: string;
|
|
41
|
+
wider: string;
|
|
31
42
|
widest: string;
|
|
32
43
|
};
|
|
33
44
|
lineHeights: {
|
|
34
|
-
body:
|
|
35
|
-
|
|
45
|
+
body: number;
|
|
46
|
+
normal: string;
|
|
47
|
+
none: number;
|
|
48
|
+
shorter: number;
|
|
49
|
+
short: number;
|
|
50
|
+
base: number;
|
|
51
|
+
tall: number;
|
|
36
52
|
};
|
|
37
53
|
sizes: {
|
|
38
54
|
max: string;
|
|
@@ -180,7 +196,7 @@ export declare const theme: {
|
|
|
180
196
|
} | undefined;
|
|
181
197
|
sizes?: {
|
|
182
198
|
sm: {
|
|
183
|
-
fontSize:
|
|
199
|
+
fontSize: ("md" | "lg")[];
|
|
184
200
|
px: number[];
|
|
185
201
|
py: number[];
|
|
186
202
|
'.chakra-button__icon > svg': {
|
|
@@ -189,7 +205,7 @@ export declare const theme: {
|
|
|
189
205
|
};
|
|
190
206
|
};
|
|
191
207
|
md: {
|
|
192
|
-
fontSize:
|
|
208
|
+
fontSize: ("lg" | "xl")[];
|
|
193
209
|
px: number[];
|
|
194
210
|
py: number[];
|
|
195
211
|
svg: {
|
|
@@ -209,7 +225,7 @@ export declare const theme: {
|
|
|
209
225
|
};
|
|
210
226
|
} | undefined;
|
|
211
227
|
variants?: {
|
|
212
|
-
|
|
228
|
+
primary: (props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
|
|
213
229
|
bg: string;
|
|
214
230
|
color: string;
|
|
215
231
|
':hover, &.hover': {
|
|
@@ -223,7 +239,7 @@ export declare const theme: {
|
|
|
223
239
|
color: string;
|
|
224
240
|
};
|
|
225
241
|
};
|
|
226
|
-
|
|
242
|
+
secondary: (props: import("@chakra-ui/styled-system").StyleFunctionProps) => {
|
|
227
243
|
color: string;
|
|
228
244
|
boxShadow: (theme: Record<string, any>) => string;
|
|
229
245
|
':hover, &.hover': {
|
|
@@ -243,7 +259,118 @@ export declare const theme: {
|
|
|
243
259
|
} | undefined;
|
|
244
260
|
defaultProps?: {
|
|
245
261
|
size?: "sm" | "md" | "wide" | undefined;
|
|
246
|
-
variant?: "
|
|
262
|
+
variant?: "primary" | "secondary" | undefined;
|
|
263
|
+
colorScheme?: string | undefined;
|
|
264
|
+
} | undefined;
|
|
265
|
+
};
|
|
266
|
+
Link: {
|
|
267
|
+
baseStyle?: {
|
|
268
|
+
color: string;
|
|
269
|
+
fontWeight: string;
|
|
270
|
+
_hover: {
|
|
271
|
+
textDecoration: string;
|
|
272
|
+
cursor: string;
|
|
273
|
+
};
|
|
274
|
+
} | undefined;
|
|
275
|
+
sizes?: {
|
|
276
|
+
sm: {
|
|
277
|
+
fontSize: ("3xs" | "xs")[];
|
|
278
|
+
lineHeight: string;
|
|
279
|
+
};
|
|
280
|
+
md: {
|
|
281
|
+
fontSize: ("sm" | "2xs")[];
|
|
282
|
+
lineHeight: string;
|
|
283
|
+
};
|
|
284
|
+
lg: {
|
|
285
|
+
fontSize: ("md" | "xs")[];
|
|
286
|
+
lineHeight: string;
|
|
287
|
+
};
|
|
288
|
+
} | undefined;
|
|
289
|
+
variants?: {} | undefined;
|
|
290
|
+
defaultProps?: {
|
|
291
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
292
|
+
variant?: undefined;
|
|
293
|
+
colorScheme?: string | undefined;
|
|
294
|
+
} | undefined;
|
|
295
|
+
};
|
|
296
|
+
Heading: {
|
|
297
|
+
baseStyle?: {
|
|
298
|
+
fontFamily: (theme: Record<string, any>) => string;
|
|
299
|
+
fontWeight: string;
|
|
300
|
+
} | undefined;
|
|
301
|
+
sizes?: {
|
|
302
|
+
'3xl': {
|
|
303
|
+
fontSize: ("6xl" | "11xl")[];
|
|
304
|
+
lineHeight: string;
|
|
305
|
+
};
|
|
306
|
+
'2xl': {
|
|
307
|
+
fontSize: ("6xl" | "9xl")[];
|
|
308
|
+
lineHeight: string;
|
|
309
|
+
};
|
|
310
|
+
xl: {
|
|
311
|
+
fontSize: ("4xl" | "7xl")[];
|
|
312
|
+
lineHeight: string;
|
|
313
|
+
};
|
|
314
|
+
lg: {
|
|
315
|
+
fontFamily: (theme: Record<string, any>) => string;
|
|
316
|
+
fontWeight: string;
|
|
317
|
+
fontSize: ("3xl" | "6xl")[];
|
|
318
|
+
lineHeight: string;
|
|
319
|
+
};
|
|
320
|
+
md: {
|
|
321
|
+
fontFamily: (theme: Record<string, any>) => string;
|
|
322
|
+
fontWeight: string;
|
|
323
|
+
fontSize: ("2xl" | "4xl")[];
|
|
324
|
+
lineHeight: string;
|
|
325
|
+
};
|
|
326
|
+
sm: {
|
|
327
|
+
fontFamily: (theme: Record<string, any>) => string;
|
|
328
|
+
fontWeight: string;
|
|
329
|
+
fontSize: ("lg" | "3xl")[];
|
|
330
|
+
lineHeight: string;
|
|
331
|
+
};
|
|
332
|
+
} | undefined;
|
|
333
|
+
variants?: {
|
|
334
|
+
[key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
|
|
335
|
+
} | undefined;
|
|
336
|
+
defaultProps?: {
|
|
337
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | undefined;
|
|
338
|
+
variant?: string | number | undefined;
|
|
339
|
+
colorScheme?: string | undefined;
|
|
340
|
+
} | undefined;
|
|
341
|
+
};
|
|
342
|
+
Text: {
|
|
343
|
+
baseStyle?: {
|
|
344
|
+
fontWeight: string;
|
|
345
|
+
lineHeight: string;
|
|
346
|
+
letterSpacing: string;
|
|
347
|
+
fontSize: string;
|
|
348
|
+
p: number;
|
|
349
|
+
} | undefined;
|
|
350
|
+
sizes?: {
|
|
351
|
+
xs: {
|
|
352
|
+
fontSize: ("2xs" | "xs")[];
|
|
353
|
+
};
|
|
354
|
+
sm: {
|
|
355
|
+
fontSize: ("sm" | "xs")[];
|
|
356
|
+
};
|
|
357
|
+
md: {
|
|
358
|
+
fontSize: ("sm" | "md")[];
|
|
359
|
+
};
|
|
360
|
+
lg: {
|
|
361
|
+
fontSize: ("md" | "lg")[];
|
|
362
|
+
};
|
|
363
|
+
xl: {
|
|
364
|
+
fontSize: ("lg" | "2xl")[];
|
|
365
|
+
lineHeight: ("shorter" | "short")[];
|
|
366
|
+
};
|
|
367
|
+
} | undefined;
|
|
368
|
+
variants?: {
|
|
369
|
+
[key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
|
|
370
|
+
} | undefined;
|
|
371
|
+
defaultProps?: {
|
|
372
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
373
|
+
variant?: string | number | undefined;
|
|
247
374
|
colorScheme?: string | undefined;
|
|
248
375
|
} | undefined;
|
|
249
376
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FlexProps } from '@chakra-ui/react';
|
|
3
|
+
type Spacing = number | Array<number>;
|
|
4
|
+
type NumberFrom1To12 = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
5
|
+
type Columns = NumberFrom1To12 | NumberFrom1To12[];
|
|
6
|
+
type GridContextType = {
|
|
7
|
+
spacing: Spacing;
|
|
8
|
+
columns: Columns;
|
|
9
|
+
};
|
|
10
|
+
export declare const GridContext: React.Context<GridContextType>;
|
|
11
|
+
export type GridProps = {
|
|
12
|
+
/**
|
|
13
|
+
* Aligns the grid items within the container to the edges.
|
|
14
|
+
* Essentially removing the spacing around the container
|
|
15
|
+
*/
|
|
16
|
+
alignEdges?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Define the spacing between elements using the spacing values defined
|
|
19
|
+
* in the design system. Default is the theme horizontal page spacing defined
|
|
20
|
+
* in the app's theme.
|
|
21
|
+
*/
|
|
22
|
+
spacing?: Spacing;
|
|
23
|
+
/**
|
|
24
|
+
* Indicates the number of columns
|
|
25
|
+
*/
|
|
26
|
+
columns?: Columns;
|
|
27
|
+
} & FlexProps;
|
|
28
|
+
/**
|
|
29
|
+
* Flexbox Grid component
|
|
30
|
+
*/
|
|
31
|
+
declare const Grid: React.ForwardRefExoticComponent<{
|
|
32
|
+
/**
|
|
33
|
+
* Aligns the grid items within the container to the edges.
|
|
34
|
+
* Essentially removing the spacing around the container
|
|
35
|
+
*/
|
|
36
|
+
alignEdges?: boolean | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Define the spacing between elements using the spacing values defined
|
|
39
|
+
* in the design system. Default is the theme horizontal page spacing defined
|
|
40
|
+
* in the app's theme.
|
|
41
|
+
*/
|
|
42
|
+
spacing?: Spacing | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Indicates the number of columns
|
|
45
|
+
*/
|
|
46
|
+
columns?: Columns | undefined;
|
|
47
|
+
} & FlexProps & React.RefAttributes<unknown>>;
|
|
48
|
+
export default Grid;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
baseStyle?: {
|
|
3
|
+
color: string;
|
|
4
|
+
fontWeight: string;
|
|
5
|
+
_hover: {
|
|
6
|
+
textDecoration: string;
|
|
7
|
+
cursor: string;
|
|
8
|
+
};
|
|
9
|
+
} | undefined;
|
|
10
|
+
sizes?: {
|
|
11
|
+
sm: {
|
|
12
|
+
fontSize: ("3xs" | "xs")[];
|
|
13
|
+
lineHeight: string;
|
|
14
|
+
};
|
|
15
|
+
md: {
|
|
16
|
+
fontSize: ("sm" | "2xs")[];
|
|
17
|
+
lineHeight: string;
|
|
18
|
+
};
|
|
19
|
+
lg: {
|
|
20
|
+
fontSize: ("md" | "xs")[];
|
|
21
|
+
lineHeight: string;
|
|
22
|
+
};
|
|
23
|
+
} | undefined;
|
|
24
|
+
variants?: {} | undefined;
|
|
25
|
+
defaultProps?: {
|
|
26
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
27
|
+
variant?: undefined;
|
|
28
|
+
colorScheme?: string | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
baseStyle?: {
|
|
3
|
+
fontFamily: (theme: Record<string, any>) => string;
|
|
4
|
+
fontWeight: string;
|
|
5
|
+
} | undefined;
|
|
6
|
+
sizes?: {
|
|
7
|
+
'3xl': {
|
|
8
|
+
fontSize: ("6xl" | "11xl")[];
|
|
9
|
+
lineHeight: string;
|
|
10
|
+
};
|
|
11
|
+
'2xl': {
|
|
12
|
+
fontSize: ("6xl" | "9xl")[];
|
|
13
|
+
lineHeight: string;
|
|
14
|
+
};
|
|
15
|
+
xl: {
|
|
16
|
+
fontSize: ("4xl" | "7xl")[];
|
|
17
|
+
lineHeight: string;
|
|
18
|
+
};
|
|
19
|
+
lg: {
|
|
20
|
+
fontFamily: (theme: Record<string, any>) => string;
|
|
21
|
+
fontWeight: string;
|
|
22
|
+
fontSize: ("3xl" | "6xl")[];
|
|
23
|
+
lineHeight: string;
|
|
24
|
+
};
|
|
25
|
+
md: {
|
|
26
|
+
fontFamily: (theme: Record<string, any>) => string;
|
|
27
|
+
fontWeight: string;
|
|
28
|
+
fontSize: ("2xl" | "4xl")[];
|
|
29
|
+
lineHeight: string;
|
|
30
|
+
};
|
|
31
|
+
sm: {
|
|
32
|
+
fontFamily: (theme: Record<string, any>) => string;
|
|
33
|
+
fontWeight: string;
|
|
34
|
+
fontSize: ("lg" | "3xl")[];
|
|
35
|
+
lineHeight: string;
|
|
36
|
+
};
|
|
37
|
+
} | undefined;
|
|
38
|
+
variants?: {
|
|
39
|
+
[key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
|
|
40
|
+
} | undefined;
|
|
41
|
+
defaultProps?: {
|
|
42
|
+
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | undefined;
|
|
43
|
+
variant?: string | number | undefined;
|
|
44
|
+
colorScheme?: string | undefined;
|
|
45
|
+
} | undefined;
|
|
46
|
+
};
|
|
47
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
baseStyle?: {
|
|
3
|
+
fontWeight: string;
|
|
4
|
+
lineHeight: string;
|
|
5
|
+
letterSpacing: string;
|
|
6
|
+
fontSize: string;
|
|
7
|
+
p: number;
|
|
8
|
+
} | undefined;
|
|
9
|
+
sizes?: {
|
|
10
|
+
xs: {
|
|
11
|
+
fontSize: ("2xs" | "xs")[];
|
|
12
|
+
};
|
|
13
|
+
sm: {
|
|
14
|
+
fontSize: ("sm" | "xs")[];
|
|
15
|
+
};
|
|
16
|
+
md: {
|
|
17
|
+
fontSize: ("sm" | "md")[];
|
|
18
|
+
};
|
|
19
|
+
lg: {
|
|
20
|
+
fontSize: ("md" | "lg")[];
|
|
21
|
+
};
|
|
22
|
+
xl: {
|
|
23
|
+
fontSize: ("lg" | "2xl")[];
|
|
24
|
+
lineHeight: ("shorter" | "short")[];
|
|
25
|
+
};
|
|
26
|
+
} | undefined;
|
|
27
|
+
variants?: {
|
|
28
|
+
[key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
|
|
29
|
+
} | undefined;
|
|
30
|
+
defaultProps?: {
|
|
31
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
32
|
+
variant?: string | number | undefined;
|
|
33
|
+
colorScheme?: string | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
};
|
|
36
|
+
export default _default;
|
package/package.json
CHANGED
|
File without changes
|