@infonomic/uikit 3.9.0 → 3.11.0
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/styles/typography.css +1 -1
- package/package.json +1 -1
- package/src/components/container/container.stories.tsx +2 -2
- package/src/components/dropdown/dropdown.stories.tsx +1 -1
- package/src/components/forms/calendar.stories.tsx +3 -3
- package/src/components/forms/checkbox.stories.tsx +1 -1
- package/src/components/forms/input.stories.tsx +1 -1
- package/src/components/forms/text-area.stories.tsx +2 -2
- package/src/components/notifications/toast.stories.tsx +1 -1
- package/src/components/pager/pagination.stories.tsx +3 -3
- package/src/components/scroll-area/scroll-area.stories.tsx +1 -1
- package/src/components/table/table.stories.tsx +1 -1
- package/src/styles/base/colors.stories.tsx +1 -1
- package/src/styles/local-fonts.css +72 -0
- package/src/styles/theme/theme.stories.tsx +6 -5
- package/src/styles/typography/article.stories.tsx +40 -0
- package/src/styles/typography/code.stories.tsx +4 -4
- package/src/styles/typography/default.stories.tsx +1 -1
- package/src/styles/typography/lists.stories.tsx +1 -1
- package/src/styles/typography/prose.css +23 -21
- package/src/styles/typography/quote.stories.tsx +2 -2
- package/src/widgets/datepicker/datepicker.stories.tsx +1 -1
- package/src/widgets/modal/modal.stories.tsx +2 -9
- package/src/widgets/search/search.stories.tsx +1 -1
- package/src/widgets/timeline/timeline.stories.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer infonomic-typography{:root{--font-sans:"Inter",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-display:"Roboto",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-serif:"Merriweather",Georgia,Cambria,"Times New Roman",Times,serif;--font-mono:"Source Code Pro",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}.sans{font-family:var(--font-sans)}.serif{font-family:var(--font-serif)}.mono{font-family:var(--font-mono)}.display{font-family:var(--font-display)}:root{--prose-body:var(--gray-900);--prose-headings:var(--gray-900);--prose-lead:#4b5563;--prose-links:var(--accent-950);--prose-counters:#6b7280;--prose-bullets:#d1d5db;--prose-hr:#e5e7eb;--prose-quotes:var(--accent-700);--prose-quote-borders:var(--accent-700);--prose-captions:#6b7280;--prose-kbd:#111827;--prose-kbd-shadows:17 24 39;--prose-code:#1e293b;--prose-code-background:#efefef;--prose-code-borders:#ccc;--prose-pre-code:#e5e7eb;--prose-pre-
|
|
1
|
+
@layer infonomic-typography{:root{--font-sans:"Inter",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-display:"Roboto",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-serif:"Merriweather",Georgia,Cambria,"Times New Roman",Times,serif;--font-mono:"Source Code Pro",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}.sans{font-family:var(--font-sans)}.serif{font-family:var(--font-serif)}.mono{font-family:var(--font-mono)}.display{font-family:var(--font-display)}:root{--prose-body:var(--gray-900);--prose-headings:var(--gray-900);--prose-lead:#4b5563;--prose-links:var(--accent-950);--prose-counters:#6b7280;--prose-bullets:#d1d5db;--prose-hr:#e5e7eb;--prose-quotes:var(--accent-700);--prose-quote-borders:var(--accent-700);--prose-captions:#6b7280;--prose-kbd:#111827;--prose-kbd-shadows:17 24 39;--prose-code:#1e293b;--prose-code-background:#efefef;--prose-code-borders:#ccc;--prose-pre-code:#e5e7eb;--prose-pre-background:#1f2937;--prose-invert-body:var(--gray-50);--prose-invert-headings:var(--gray-50);--prose-invert-lead:#9ca3af;--prose-invert-links:var(--accent-500);--prose-invert-counters:#9ca3af;--prose-invert-bullets:#4b5563;--prose-invert-hr:#374151;--prose-invert-quotes:var(--accent-400);--prose-invert-quote-borders:var(--accent-400);--prose-invert-captions:#9ca3af;--prose-invert-kbd:#fff;--prose-invert-kbd-shadows:255 255 255;--prose-invert-code:#f1f5f9;--prose-invert-code-background:#222;--prose-invert-code-borders:#333;--prose-invert-pre-code:#d1d5db;--prose-invert-pre-background:#161d27;--prose-invert-th-borders:#4b5563;--prose-invert-td-borders:#374151}.dark{--prose-body:var(--prose-invert-body);--prose-headings:var(--prose-invert-headings);--prose-lead:var(--prose-invert-lead);--prose-links:var(--prose-invert-links);--prose-counters:var(--prose-invert-counters);--prose-bullets:var(--prose-invert-bullets);--prose-hr:var(--prose-invert-hr);--prose-quotes:var(--prose-invert-quotes);--prose-quote-borders:var(--prose-invert-quote-borders);--prose-captions:var(--prose-invert-captions);--prose-kbd:var(--prose-invert-kbd);--prose-kbd-shadows:var(--prose-invert-kbd-shadows);--prose-code:var(--prose-invert-code);--prose-code-background:var(--prose-invert-code-background);--prose-code-borders:var(--prose-invert-code-borders);--prose-pre-code:var(--prose-invert-pre-code);--prose-pre-background:var(--prose-invert-pre-background)}.not-dark{--prose-body:var(--gray-900);--prose-headings:var(--gray-900);--prose-lead:#4b5563;--prose-links:var(--accent-950);--prose-counters:#6b7280;--prose-bullets:#d1d5db;--prose-hr:#e5e7eb;--prose-quotes:var(--accent-700);--prose-quote-borders:var(--accent-700);--prose-captions:#6b7280;--prose-kbd:#111827;--prose-kbd-shadows:17 24 39;--prose-code:#1e293b;--prose-code-background:#efefef;--prose-code-borders:#ccc;--prose-pre-code:#e5e7eb;--prose-pre-background:#1f2937}html{color:var(--prose-body);font-size:1rem}html .not-dark{color:var(--prose-body)}article,.editor-text,.break-long-words{overflow-wrap:anywhere}article,.dynamic-text{font-size:1.25rem;line-height:1.6}@media screen and (width>=48rem){article,.dynamic-text{font-size:1.125rem;line-height:1.64}}.prose{& h1,& h2,& h3,& h4,& h5{color:var(--prose-headings)}}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:1rem;font-size:2.5rem;font-weight:600;line-height:1.125}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.5rem;margin-bottom:.75rem;font-size:2rem;font-weight:600;line-height:1.2}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25rem;margin-bottom:.75rem;font-size:1.75rem;font-weight:600;line-height:1.1}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25rem;margin-bottom:.65rem;font-size:1.55rem;font-weight:600;line-height:1.1}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose-lg :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;font-size:1.125rem;line-height:1.64}.prose-xl :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;font-size:1.25rem;line-height:1.6}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.4}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-bold);font-weight:500}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-headings);margin-top:1.25em;font-weight:500}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-quotes);quotes:none;border-inline-start-width:.25rem;border-inline-start-color:var(--prose-quote-borders);margin-top:1.3rem;margin-bottom:1.3rem;margin-right:2rem;padding-inline-start:1rem;font-size:1.2em;font-style:normal;font-weight:600;line-height:1.3}@media (width>=48rem){.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2em;line-height:1.3}}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-kbd);box-shadow:0 0 0 1px rgb(var(--prose-kbd-shadows)/10%),0 3px 0 rgb(var(--prose-kbd-shadows)/10%);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-code);background-color:var(--prose-code-background);border-color:var(--prose-code-borders);border-width:1px;border-radius:.25rem;padding:.125rem .375rem;font-size:.875em;font-weight:400}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--prose-pre-code);background-color:var(--prose-pre-background);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-weight:400;line-height:1.71429;overflow-x:auto}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:initial;font-weight:inherit;color:inherit;font-family:inherit;line-height:inherit;padding:0;border-width:0;border-radius:0;padding:0;font-size:1em!important}html,.font-sans{font-family:var(--font-sans)}.font-display{font-family:var(--font-display)}.font-serif{font-family:var(--font-serif)}.font-mono{font-family:var(--font-mono)}}
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@ export default meta
|
|
|
19
19
|
|
|
20
20
|
export const Container = (): React.JSX.Element => {
|
|
21
21
|
return (
|
|
22
|
-
<Section style={{ height: '100vh' }}>
|
|
22
|
+
<Section style={{ height: '100vh', margin: '2rem auto' }}>
|
|
23
23
|
<ContainerComponent
|
|
24
24
|
className="primary-strong"
|
|
25
25
|
style={{
|
|
@@ -29,7 +29,7 @@ export const Container = (): React.JSX.Element => {
|
|
|
29
29
|
justifyContent: 'center',
|
|
30
30
|
}}
|
|
31
31
|
>
|
|
32
|
-
<p>I'm in a container
|
|
32
|
+
<p>I'm in a container with shy edges.</p>
|
|
33
33
|
</ContainerComponent>
|
|
34
34
|
</Section>
|
|
35
35
|
)
|
|
@@ -25,7 +25,7 @@ export const Calendar = (): React.JSX.Element => {
|
|
|
25
25
|
const calendarRef = useRef<HTMLDivElement | null>(null)
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
|
-
<div style={{ height: '100vh' }}>
|
|
28
|
+
<div style={{ height: '100vh', margin: '2rem 0' }}>
|
|
29
29
|
<div ref={calendarRef} style={{ position: 'relative', width: 'fit-content', margin: 'auto' }}>
|
|
30
30
|
<CalendarComponent
|
|
31
31
|
required
|
|
@@ -79,7 +79,7 @@ export const Multiple = (): React.JSX.Element => {
|
|
|
79
79
|
const calendarRef = useRef<HTMLDivElement | null>(null)
|
|
80
80
|
|
|
81
81
|
return (
|
|
82
|
-
<div style={{ height: '100vh' }}>
|
|
82
|
+
<div style={{ height: '100vh', margin: '2rem 0' }}>
|
|
83
83
|
<div ref={calendarRef} style={{ position: 'relative', width: 'fit-content', margin: 'auto' }}>
|
|
84
84
|
<CalendarComponent
|
|
85
85
|
required
|
|
@@ -112,7 +112,7 @@ export const Range = (): React.JSX.Element => {
|
|
|
112
112
|
const calendarRef = useRef<HTMLDivElement | null>(null)
|
|
113
113
|
|
|
114
114
|
return (
|
|
115
|
-
<div style={{ height: '100vh' }}>
|
|
115
|
+
<div style={{ height: '100vh', margin: '2rem 0' }}>
|
|
116
116
|
<div ref={calendarRef} style={{ position: 'relative', width: 'fit-content', margin: 'auto' }}>
|
|
117
117
|
<CalendarComponent
|
|
118
118
|
required
|
|
@@ -19,7 +19,7 @@ export const Default = (): React.JSX.Element => {
|
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
21
|
<>
|
|
22
|
-
<div style={{ maxWidth: '800px', margin: '
|
|
22
|
+
<div style={{ maxWidth: '800px', margin: '2rem auto 2rem' }}>
|
|
23
23
|
<h2 className="text-xl" style={{ marginBottom: '1rem' }}>
|
|
24
24
|
Outlined
|
|
25
25
|
</h2>
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
export const Default = (): React.JSX.Element => {
|
|
14
14
|
return (
|
|
15
15
|
<>
|
|
16
|
-
<div style={{ maxWidth: '600px', margin: '
|
|
16
|
+
<div style={{ maxWidth: '600px', margin: '2rem auto' }}>
|
|
17
17
|
<TextArea
|
|
18
18
|
required
|
|
19
19
|
id="message"
|
|
@@ -33,7 +33,7 @@ export const Default = (): React.JSX.Element => {
|
|
|
33
33
|
export const Error = (): React.JSX.Element => {
|
|
34
34
|
return (
|
|
35
35
|
<>
|
|
36
|
-
<div style={{ maxWidth: '600px', margin: '
|
|
36
|
+
<div style={{ maxWidth: '600px', margin: '2rem auto' }}>
|
|
37
37
|
<TextArea
|
|
38
38
|
required
|
|
39
39
|
id="message"
|
|
@@ -15,7 +15,7 @@ export const Toast = (): React.JSX.Element => {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<div
|
|
18
|
+
<div style={{ maxWidth: '600px', margin: '2rem 0' }}>
|
|
19
19
|
<Button onClick={handleOpenToastClick}>Open Toast</Button>
|
|
20
20
|
<ToastComponent
|
|
21
21
|
title="Note"
|
|
@@ -32,7 +32,7 @@ const DefaultPager = (): React.JSX.Element => {
|
|
|
32
32
|
}
|
|
33
33
|
`}
|
|
34
34
|
</style>
|
|
35
|
-
<div style={{
|
|
35
|
+
<div style={{ margin: '2rem 0', maxWidth: '600px' }}>
|
|
36
36
|
<p style={{ marginBottom: '1rem' }}>Stateful Pagers: Current page: {page}</p>
|
|
37
37
|
<EventPager
|
|
38
38
|
page={page}
|
|
@@ -83,7 +83,7 @@ const ClassicPager = (): React.JSX.Element => {
|
|
|
83
83
|
}
|
|
84
84
|
`}
|
|
85
85
|
</style>
|
|
86
|
-
<div style={{
|
|
86
|
+
<div style={{ margin: '2rem 0', maxWidth: '600px' }}>
|
|
87
87
|
<p style={{ marginBottom: '1rem' }}>Stateful Pagers: Current page: {page}</p>
|
|
88
88
|
<EventPager
|
|
89
89
|
variant="classic"
|
|
@@ -137,7 +137,7 @@ const DashboardPager = (): React.JSX.Element => {
|
|
|
137
137
|
}
|
|
138
138
|
`}
|
|
139
139
|
</style>
|
|
140
|
-
<div style={{
|
|
140
|
+
<div style={{ margin: '2rem 0', maxWidth: '600px' }}>
|
|
141
141
|
<p style={{ marginBottom: '1rem' }}>Stateful Pagers: Current page: {page}</p>
|
|
142
142
|
<EventPager
|
|
143
143
|
variant="dashboard"
|
|
@@ -17,7 +17,7 @@ const TAGS = Array.from({ length: 50 }).map((_, i, a) => `v1.2.0-beta.${a.length
|
|
|
17
17
|
|
|
18
18
|
export const ScrollArea = (): React.JSX.Element => {
|
|
19
19
|
return (
|
|
20
|
-
<div style={{ height: '100vh' }}>
|
|
20
|
+
<div style={{ height: '100vh', margin: '2rem 0' }}>
|
|
21
21
|
<ScrollAreaComponent
|
|
22
22
|
style={{ width: '200px', height: '300px', margin: '0 auto', border: '1px solid #ccc' }}
|
|
23
23
|
>
|
|
@@ -18,7 +18,7 @@ export default meta
|
|
|
18
18
|
|
|
19
19
|
export const Table = (): React.JSX.Element => {
|
|
20
20
|
return (
|
|
21
|
-
<div style={{ maxWidth: '960px', margin: '
|
|
21
|
+
<div style={{ maxWidth: '960px', margin: '2rem auto' }}>
|
|
22
22
|
<TableComponent.Container>
|
|
23
23
|
<TableComponent>
|
|
24
24
|
<TableComponent.Header>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
NOTE: Not included in the the distribution bundle.
|
|
3
|
+
Used to load the fonts below in Storybook.
|
|
4
|
+
A consumer of the UI kit should self-host these fonts and
|
|
5
|
+
use its own method to load them.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@font-face {
|
|
9
|
+
font-family: "Inter";
|
|
10
|
+
src: url("/fonts/Inter/Inter-VariableFont_opsz_wght.woff2") format("woff2");
|
|
11
|
+
font-weight: 300 900;
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-display: swap;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@font-face {
|
|
17
|
+
font-family: "Inter";
|
|
18
|
+
src: url("/fonts/Inter/Inter-Italic-VariableFont_opsz_wght.woff2") format("woff2");
|
|
19
|
+
font-weight: 300 900;
|
|
20
|
+
font-style: italic;
|
|
21
|
+
font-display: swap;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@font-face {
|
|
25
|
+
font-family: "Roboto";
|
|
26
|
+
src: url("/fonts/Roboto/Roboto-VariableFont_wdth_wght.woff2") format("woff2");
|
|
27
|
+
font-weight: 100 900;
|
|
28
|
+
font-stretch: 75% 100%;
|
|
29
|
+
font-style: normal;
|
|
30
|
+
font-display: swap;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@font-face {
|
|
34
|
+
font-family: "Roboto";
|
|
35
|
+
src: url("/fonts/Roboto/Roboto-Italic-VariableFont_wdth_wght.woff2") format("woff2");
|
|
36
|
+
font-weight: 100 900;
|
|
37
|
+
font-stretch: 75% 100%;
|
|
38
|
+
font-style: italic;
|
|
39
|
+
font-display: swap;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@font-face {
|
|
43
|
+
font-family: "Rubik";
|
|
44
|
+
src: url("/fonts/Rubik/Rubik-VariableFont_wght.woff2") format("woff2");
|
|
45
|
+
font-weight: 300 900;
|
|
46
|
+
font-style: normal;
|
|
47
|
+
font-display: swap;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@font-face {
|
|
51
|
+
font-family: "Rubik";
|
|
52
|
+
src: url("/fonts/Rubik/Rubik-Italic-VariableFont_wght.woff2") format("woff2");
|
|
53
|
+
font-weight: 300 900;
|
|
54
|
+
font-style: italic;
|
|
55
|
+
font-display: swap;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@font-face {
|
|
59
|
+
font-family: "Public Sans";
|
|
60
|
+
src: url("/fonts/Public_Sans/PublicSans-VariableFont_wght.woff2") format("woff2");
|
|
61
|
+
font-weight: 100 900;
|
|
62
|
+
font-style: normal;
|
|
63
|
+
font-display: swap;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@font-face {
|
|
67
|
+
font-family: "Public Sans";
|
|
68
|
+
src: url("/fonts/Public_Sans/PublicSans-Italic-VariableFont_wght.woff2") format("woff2");
|
|
69
|
+
font-weight: 100 900;
|
|
70
|
+
font-style: italic;
|
|
71
|
+
font-display: swap;
|
|
72
|
+
}
|
|
@@ -4,15 +4,16 @@ export const Default = (): React.JSX.Element => {
|
|
|
4
4
|
return (
|
|
5
5
|
<>
|
|
6
6
|
<div style={{ marginBottom: '48px' }}>
|
|
7
|
-
<div style={{ maxWidth: '700px', margin: 'auto' }}>
|
|
7
|
+
<div style={{ maxWidth: '700px', margin: '2rem auto' }}>
|
|
8
8
|
<div className="p-5 shadow border-thin rounded">
|
|
9
9
|
<h2>Heading 2</h2>
|
|
10
10
|
<span className="muted">Muted text here.</span>
|
|
11
11
|
<p>
|
|
12
|
-
This is a paragraph of text that we'll use for our theme
|
|
13
|
-
a paragraph of text that
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
This is a paragraph of text that we'll use for our theme Storybook page. This is
|
|
13
|
+
a paragraph of text that has been styled with our default or starter HTML element settings
|
|
14
|
+
from our styles/theme/theme.css source CSS file, and does NOT have 'prose' applied.
|
|
15
|
+
Prose is part of our separately installed typography system via styles/typography/typography.css
|
|
16
|
+
- examples of which are available under the Typography category in Storybook.
|
|
16
17
|
</p>
|
|
17
18
|
</div>
|
|
18
19
|
</div>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react-vite'
|
|
2
|
+
|
|
3
|
+
export const Article = (): React.JSX.Element => {
|
|
4
|
+
return (
|
|
5
|
+
<>
|
|
6
|
+
<div style={{ marginBottom: '48px' }}>
|
|
7
|
+
<article style={{ maxWidth: '700px', margin: '2rem auto' }} className="prose">
|
|
8
|
+
<h1>An Article</h1>
|
|
9
|
+
<p>
|
|
10
|
+
This is text that that has been placed in an article element. Text in articles
|
|
11
|
+
as well as within .dynamic-text class selectors will automatically increase in size on
|
|
12
|
+
mobile devices for better readability. This is a paragraph of text that we'll
|
|
13
|
+
use for our typography storybook page. This is a paragraph of text that we'll
|
|
14
|
+
use for our typography storybook page.
|
|
15
|
+
</p>
|
|
16
|
+
<blockquote>This is some text inside a blockquote.
|
|
17
|
+
Note that we've used em to size text in the blockquote,
|
|
18
|
+
so that it also changes size in the article.</blockquote>
|
|
19
|
+
<p>
|
|
20
|
+
This is a paragraph of text that we'll use for our typography storybook page. This
|
|
21
|
+
is a paragraph of text that we'll use for our typography storybook page. This is a
|
|
22
|
+
paragraph of text that we'll use for our typography storybook page. This is a
|
|
23
|
+
paragraph of text that we'll use for our typography storybook page.
|
|
24
|
+
</p>
|
|
25
|
+
</article>
|
|
26
|
+
</div>
|
|
27
|
+
</>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const meta: Meta = {
|
|
32
|
+
/* 👇 The title prop is optional.
|
|
33
|
+
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
|
|
34
|
+
* to learn how to generate automatic titles
|
|
35
|
+
*/
|
|
36
|
+
title: 'Typography',
|
|
37
|
+
component: Article,
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default meta
|
|
@@ -20,7 +20,7 @@ function CodeDemo({ code, className, language = 'jsx' }: CodeProps): React.JSX.E
|
|
|
20
20
|
return (
|
|
21
21
|
<Highlight theme={themes.nightOwl} code={code} language={language}>
|
|
22
22
|
{({ tokens, getLineProps, getTokenProps }) => (
|
|
23
|
-
<pre
|
|
23
|
+
<pre className={className}>
|
|
24
24
|
{tokens.map((line, i) => {
|
|
25
25
|
const lineProps = getLineProps({ line, key: i })
|
|
26
26
|
return (
|
|
@@ -43,11 +43,11 @@ function CodeDemo({ code, className, language = 'jsx' }: CodeProps): React.JSX.E
|
|
|
43
43
|
export const Code = (): React.JSX.Element => {
|
|
44
44
|
return (
|
|
45
45
|
<>
|
|
46
|
-
<div style={{
|
|
47
|
-
<div style={{ maxWidth: '700px', margin: 'auto' }} className="prose">
|
|
46
|
+
<div style={{ margin: '48px' }}>
|
|
47
|
+
<div style={{ maxWidth: '700px', margin: '2rem auto' }} className="prose">
|
|
48
48
|
<h1>Heading 1</h1>
|
|
49
49
|
<p>
|
|
50
|
-
This is
|
|
50
|
+
This is an example of <code>inline code here</code> and text that we'll use for our typography
|
|
51
51
|
and code storybook page. This is a paragraph of text that we'll use for our
|
|
52
52
|
typography and code storybook page. Here is a code block...
|
|
53
53
|
</p>
|
|
@@ -4,7 +4,7 @@ export const Default = (): React.JSX.Element => {
|
|
|
4
4
|
return (
|
|
5
5
|
<>
|
|
6
6
|
<div style={{ marginBottom: '48px' }}>
|
|
7
|
-
<div style={{ maxWidth: '700px', margin: 'auto' }} className="prose">
|
|
7
|
+
<div style={{ maxWidth: '700px', margin: '2rem auto' }} className="prose">
|
|
8
8
|
<h1>Heading 1 - With Some More Text to Test on Mobile</h1>
|
|
9
9
|
<p>
|
|
10
10
|
This is a paragraph of text that we'll use for our typography storybook page. This
|
|
@@ -4,7 +4,7 @@ export const Lists = (): React.JSX.Element => {
|
|
|
4
4
|
return (
|
|
5
5
|
<>
|
|
6
6
|
<div style={{ marginBottom: '48px' }}>
|
|
7
|
-
<div style={{ maxWidth: '700px', margin: 'auto' }} className="prose">
|
|
7
|
+
<div style={{ maxWidth: '700px', margin: '2rem auto' }} className="prose">
|
|
8
8
|
<h1>Lists</h1>
|
|
9
9
|
<p>
|
|
10
10
|
This is a paragraph of text that we'll use for our typography storybook page. This
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
--prose-code-background: #efefef;
|
|
31
31
|
--prose-code-borders: #cccccc;
|
|
32
32
|
--prose-pre-code: #e5e7eb;
|
|
33
|
-
--prose-pre-
|
|
33
|
+
--prose-pre-background: #1f2937;
|
|
34
34
|
--prose-invert-body: var(--gray-50);
|
|
35
35
|
--prose-invert-headings: var(--gray-50);
|
|
36
36
|
--prose-invert-lead: #9ca3af;
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
--prose-invert-code-background: #222222;
|
|
48
48
|
--prose-invert-code-borders: #333333;
|
|
49
49
|
--prose-invert-pre-code: #d1d5db;
|
|
50
|
-
--prose-invert-pre-
|
|
50
|
+
--prose-invert-pre-background: #161d27;
|
|
51
51
|
--prose-invert-th-borders: #4b5563;
|
|
52
52
|
--prose-invert-td-borders: #374151;
|
|
53
53
|
}
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
--prose-code-background: var(--prose-invert-code-background);
|
|
70
70
|
--prose-code-borders: var(--prose-invert-code-borders);
|
|
71
71
|
--prose-pre-code: var(--prose-invert-pre-code);
|
|
72
|
-
--prose-pre-
|
|
72
|
+
--prose-pre-background: var(--prose-invert-pre-background);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
/* Brute force our not-dark class for now until we figure out
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
--prose-code-background: #efefef;
|
|
94
94
|
--prose-code-borders: #cccccc;
|
|
95
95
|
--prose-pre-code: #e5e7eb;
|
|
96
|
-
--prose-pre-
|
|
96
|
+
--prose-pre-background: #1f2937;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
@@ -124,20 +124,20 @@
|
|
|
124
124
|
line-height: 1.6;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
/*
|
|
127
|
+
/*
|
|
128
|
+
NOTE: Increase font size for smaller screens to improve readability
|
|
129
|
+
at medium breakpoint (consider large breakpoint as well?)
|
|
130
|
+
*/
|
|
128
131
|
@media screen and (min-width: 48rem) {
|
|
129
|
-
|
|
130
132
|
article,
|
|
131
133
|
.dynamic-text {
|
|
132
134
|
font-size: 1.125rem;
|
|
133
135
|
line-height: 1.64;
|
|
134
136
|
}
|
|
135
|
-
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
/* Default headings - will be overridden by prose sections below */
|
|
139
140
|
.prose {
|
|
140
|
-
|
|
141
141
|
h1,
|
|
142
142
|
h2,
|
|
143
143
|
h3,
|
|
@@ -299,20 +299,29 @@
|
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
.prose :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
302
|
-
font-weight:
|
|
302
|
+
font-weight: 600;
|
|
303
303
|
font-style: normal;
|
|
304
304
|
color: var(--prose-quotes);
|
|
305
305
|
quotes: none;
|
|
306
|
-
margin-top: 1.
|
|
307
|
-
margin-bottom: 1.
|
|
306
|
+
margin-top: 1.3rem;
|
|
307
|
+
margin-bottom: 1.3rem;
|
|
308
308
|
margin-right: 2rem;
|
|
309
|
-
|
|
310
|
-
|
|
309
|
+
/* Font size must be em - so that it changes in articles or text that has dynamic font sizes on smaller screens */
|
|
310
|
+
font-size: 1.2em;
|
|
311
|
+
line-height: 1.3;
|
|
311
312
|
padding-inline-start: 1rem;
|
|
312
313
|
border-inline-start-width: 0.25rem;
|
|
313
314
|
border-inline-start-color: var(--prose-quote-borders);
|
|
314
315
|
}
|
|
315
316
|
|
|
317
|
+
/* The same as above - for the moment */
|
|
318
|
+
@media (min-width: 48rem) {
|
|
319
|
+
.prose :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
320
|
+
font-size: 1.2em;
|
|
321
|
+
line-height: 1.3;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
316
325
|
.prose :where(blockquote p:first-of-type):not( :where([class~="not-prose"], [class~="not-prose"] *))::before {
|
|
317
326
|
content: open-quote;
|
|
318
327
|
}
|
|
@@ -366,7 +375,7 @@
|
|
|
366
375
|
|
|
367
376
|
.prose :where(pre):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
368
377
|
color: var(--prose-pre-code);
|
|
369
|
-
background-color: var(--prose-pre-
|
|
378
|
+
background-color: var(--prose-pre-background);
|
|
370
379
|
overflow-x: auto;
|
|
371
380
|
font-weight: 400;
|
|
372
381
|
line-height: 1.7142857;
|
|
@@ -394,11 +403,4 @@
|
|
|
394
403
|
padding-top: 0;
|
|
395
404
|
padding-bottom: 0;
|
|
396
405
|
}
|
|
397
|
-
|
|
398
|
-
@media (min-width: 48rem) {
|
|
399
|
-
.prose :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
400
|
-
font-size: 1.7rem;
|
|
401
|
-
line-height: 1.2;
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
406
|
}
|
|
@@ -4,7 +4,7 @@ export const Quote = (): React.JSX.Element => {
|
|
|
4
4
|
return (
|
|
5
5
|
<>
|
|
6
6
|
<div style={{ marginBottom: '48px' }}>
|
|
7
|
-
<div style={{ maxWidth: '700px', margin: 'auto' }} className="prose">
|
|
7
|
+
<div style={{ maxWidth: '700px', margin: '2rem auto' }} className="prose">
|
|
8
8
|
<h1>Heading 1</h1>
|
|
9
9
|
<p>
|
|
10
10
|
This is a paragraph of text that we'll use for our typography storybook page. This
|
|
@@ -12,7 +12,7 @@ export const Quote = (): React.JSX.Element => {
|
|
|
12
12
|
paragraph of text that we'll use for our typography storybook page. This is a
|
|
13
13
|
paragraph of text that we'll use for our typography storybook page.
|
|
14
14
|
</p>
|
|
15
|
-
<blockquote>This is some text inside a blockquote.</blockquote>
|
|
15
|
+
<blockquote>This is some text inside a blockquote. We'll make this a little longer to see how it looks when it wraps.</blockquote>
|
|
16
16
|
<p>
|
|
17
17
|
This is a paragraph of text that we'll use for our typography storybook page. This
|
|
18
18
|
is a paragraph of text that we'll use for our typography storybook page. This is a
|
|
@@ -16,15 +16,8 @@ export default {
|
|
|
16
16
|
export const Default = (): React.JSX.Element => {
|
|
17
17
|
const { onDismiss, onOpen, isOpen, setIsOpen } = useModal()
|
|
18
18
|
|
|
19
|
-
const whiteIcon = `
|
|
20
|
-
.white-icon {
|
|
21
|
-
fill: white;
|
|
22
|
-
}
|
|
23
|
-
`
|
|
24
|
-
|
|
25
19
|
return (
|
|
26
|
-
|
|
27
|
-
<style>{whiteIcon}</style>
|
|
20
|
+
<div style={{ margin: '2rem 0' }}>
|
|
28
21
|
<Button
|
|
29
22
|
onClick={() => {
|
|
30
23
|
setIsOpen(true)
|
|
@@ -66,6 +59,6 @@ export const Default = (): React.JSX.Element => {
|
|
|
66
59
|
</Modal.Actions>
|
|
67
60
|
</Modal.Container>
|
|
68
61
|
</Modal>
|
|
69
|
-
|
|
62
|
+
</div>
|
|
70
63
|
)
|
|
71
64
|
}
|