@infonomic/uikit 3.8.0 → 3.10.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/components/dropdown/dropdown_module.css +1 -1
- package/dist/components/forms/calendar_module.css +12 -45
- package/dist/components/forms/radio-group_module.css +2 -2
- package/dist/components/notifications/alert_module.css +15 -15
- package/dist/components/table/table_module.css +2 -2
- package/dist/components/tabs/tabs_module.css +4 -5
- package/dist/styles/styles.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/widgets/datepicker/datepicker.js +2 -2
- package/dist/widgets/datepicker/datepicker_module.css +13 -13
- package/dist/widgets/drawer/drawer_module.css +6 -6
- package/dist/widgets/modal/modal_module.css +12 -12
- package/dist/widgets/timeline/timeline_module.css +7 -7
- package/package.json +1 -1
- package/src/components/accordion/accordion.stories.tsx +2 -2
- package/src/components/avatar/avatar.stories.tsx +1 -1
- package/src/components/badge/badge.stories.tsx +1 -1
- package/src/components/button/button-group.stories.tsx +1 -1
- package/src/components/button/button-intents.stories.tsx +1 -1
- package/src/components/button/button-variants.stories.tsx +1 -1
- package/src/components/button/control-buttons.stories.tsx +2 -2
- package/src/components/button/icon-button.stories.tsx +2 -2
- package/src/components/card/card.stories.tsx +2 -2
- package/src/components/container/container.stories.tsx +4 -10
- package/src/components/dropdown/dropdown.module.css +1 -1
- package/src/components/dropdown/dropdown.stories.tsx +1 -1
- package/src/components/forms/calendar.module.css +12 -58
- 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/radio-group.module.css +2 -2
- package/src/components/forms/text-area.stories.tsx +2 -2
- package/src/components/notifications/alert.module.css +15 -15
- package/src/components/notifications/alert.stories.tsx +1 -1
- 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.module.css +2 -2
- package/src/components/table/table.stories.tsx +1 -1
- package/src/components/tabs/tabs.module.css +7 -5
- package/src/components/tabs/tabs.stories.tsx +1 -1
- package/src/loaders/loaders.stories.tsx +1 -1
- package/src/styles/base/base.css +1 -0
- package/src/styles/base/size.css +24 -0
- package/src/styles/base/spacing.css +20 -17
- package/src/styles/functional/borders.css +23 -0
- package/src/styles/functional/colors.css +51 -94
- package/src/styles/functional/functional.css +3 -0
- package/src/styles/functional/grid-flex.css +11 -11
- package/src/styles/functional/surfaces.css +115 -0
- package/src/styles/functional/typography.css +44 -0
- package/src/styles/local-fonts.css +72 -0
- package/src/styles/theme/autofill.css +14 -5
- package/src/styles/theme/defaults.css +75 -0
- package/src/styles/theme/scrollers.css +4 -2
- package/src/styles/theme/theme.css +15 -130
- package/src/styles/theme/theme.stories.tsx +7 -6
- package/src/styles/typography/code.stories.tsx +3 -3
- package/src/styles/typography/default.stories.tsx +1 -1
- package/src/styles/typography/lists.stories.tsx +1 -1
- package/src/styles/typography/prose.css +9 -9
- package/src/styles/typography/quote.stories.tsx +1 -1
- package/src/styles/utils/utility-classes.css +190 -58
- package/src/widgets/datepicker/datepicker.module.css +13 -13
- package/src/widgets/datepicker/datepicker.stories.tsx +1 -1
- package/src/widgets/datepicker/datepicker.tsx +2 -2
- package/src/widgets/drawer/drawer.module.css +6 -6
- package/src/widgets/modal/modal.module.css +12 -12
- package/src/widgets/modal/modal.stories.tsx +2 -9
- package/src/widgets/search/search.stories.tsx +1 -1
- package/src/widgets/timeline/timeline.module.css +7 -7
- package/src/widgets/timeline/timeline.stories.tsx +1 -1
- package/src/styles/theme/typography.css +0 -26
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SURFACE FUNCTIONAL TOKENS
|
|
3
|
+
*
|
|
4
|
+
* Semantic tokens for surfaces, backgrounds, shadows, and depth.
|
|
5
|
+
* These tokens define the canvas on which content sits.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@layer infonomic-functional {
|
|
9
|
+
:root {
|
|
10
|
+
--background: var(--canvas-25);
|
|
11
|
+
--foreground: var(--gray-900);
|
|
12
|
+
--shadow: var(--shadow-md);
|
|
13
|
+
--loader-color: var(--fill-primary-strong);
|
|
14
|
+
|
|
15
|
+
/* SURFACE TOKENS (for panels, dropdowns, menus, lists)
|
|
16
|
+
----------------------------------------------------------------- */
|
|
17
|
+
|
|
18
|
+
/* Panel/container backgrounds */
|
|
19
|
+
--surface-panel: var(--canvas-25);
|
|
20
|
+
--surface-panel-elevated: white; /* For dropdowns/popovers with shadow */
|
|
21
|
+
--surface-panel-border: var(--border-color);
|
|
22
|
+
|
|
23
|
+
/* Item backgrounds (default transparent, inherits panel) */
|
|
24
|
+
--surface-item: transparent;
|
|
25
|
+
--surface-item-hover: var(--canvas-50);
|
|
26
|
+
--surface-item-active: var(--canvas-100);
|
|
27
|
+
|
|
28
|
+
/* Item text colors */
|
|
29
|
+
--surface-item-text: var(--text);
|
|
30
|
+
--surface-item-text-hover: var(--text);
|
|
31
|
+
--surface-item-text-active: var(--text);
|
|
32
|
+
--surface-item-text-disabled: var(--gray-400);
|
|
33
|
+
|
|
34
|
+
/* Panel scrollers */
|
|
35
|
+
--surface-panel-scrollbar: var(--gray-50);
|
|
36
|
+
--surface-panel-scrollbar-thumb: var(--primary-100);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* 🌙 Dark via `.dark` class or [data-theme="dark"] attribute.
|
|
40
|
+
* We rely on the consuming application to detect a user's
|
|
41
|
+
* preferred color scheme - either by header or cookie, and to set
|
|
42
|
+
* a root html class accordingly (for now), which unfortunately means
|
|
43
|
+
* relying on either a server-side render or JS to set the theme
|
|
44
|
+
* on initial load.
|
|
45
|
+
*/
|
|
46
|
+
.dark,
|
|
47
|
+
[data-theme="dark"],
|
|
48
|
+
[data-theme="dark"] ::backdrop
|
|
49
|
+
{
|
|
50
|
+
--background: var(--canvas-900);
|
|
51
|
+
--foreground: var(--gray-50);
|
|
52
|
+
--shadow: var(--shadow-lg);
|
|
53
|
+
--loader-color: var(--fill-primary-strong);
|
|
54
|
+
|
|
55
|
+
/* SURFACE TOKENS (Dark Mode)
|
|
56
|
+
----------------------------------------------------------------- */
|
|
57
|
+
|
|
58
|
+
/* Panel/container backgrounds - slightly elevated from canvas-900 base */
|
|
59
|
+
--surface-panel: var(--canvas-800);
|
|
60
|
+
--surface-panel-elevated: var(--canvas-800);
|
|
61
|
+
--surface-panel-border: var(--border-color);
|
|
62
|
+
|
|
63
|
+
/* Item backgrounds - lighter than panel for hover/active */
|
|
64
|
+
--surface-item: transparent;
|
|
65
|
+
--surface-item-hover: var(--canvas-700);
|
|
66
|
+
--surface-item-active: var(--canvas-600);
|
|
67
|
+
|
|
68
|
+
/* Item text colors */
|
|
69
|
+
--surface-item-text: var(--text);
|
|
70
|
+
--surface-item-text-hover: var(--text);
|
|
71
|
+
--surface-item-text-active: var(--text);
|
|
72
|
+
--surface-item-text-disabled: var(--gray-500);
|
|
73
|
+
|
|
74
|
+
/* Panel scrollers */
|
|
75
|
+
--surface-panel-scrollbar: var(--canvas-700);
|
|
76
|
+
--surface-panel-scrollbar-thumb: var(--primary-400);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* ===================================================================
|
|
80
|
+
* .NOT-DARK OVERRIDE
|
|
81
|
+
* .not-dark override: Forces light mode tokens by re-declaring :root values.
|
|
82
|
+
* This duplication is intentional - it ensures .not-dark always wins over .dark
|
|
83
|
+
* regardless of DOM order, without needing complex :not() selectors.
|
|
84
|
+
* Alternative approaches (revert-layer, :not() patterns) would be more fragile.
|
|
85
|
+
*/
|
|
86
|
+
.not-dark {
|
|
87
|
+
--background: var(--canvas-25);
|
|
88
|
+
--foreground: var(--gray-900);
|
|
89
|
+
--shadow: var(--shadow-md);
|
|
90
|
+
--loader-color: var(--fill-primary-strong);
|
|
91
|
+
|
|
92
|
+
/* SURFACE TOKENS (for panels, dropdowns, menus, lists)
|
|
93
|
+
----------------------------------------------------------------- */
|
|
94
|
+
|
|
95
|
+
/* Panel/container backgrounds */
|
|
96
|
+
--surface-panel: var(--canvas-25);
|
|
97
|
+
--surface-panel-elevated: white; /* For dropdowns/popovers with shadow */
|
|
98
|
+
--surface-panel-border: var(--border-color);
|
|
99
|
+
|
|
100
|
+
/* Item backgrounds (default transparent, inherits panel) */
|
|
101
|
+
--surface-item: transparent;
|
|
102
|
+
--surface-item-hover: var(--canvas-50);
|
|
103
|
+
--surface-item-active: var(--canvas-100);
|
|
104
|
+
|
|
105
|
+
/* Item text colors */
|
|
106
|
+
--surface-item-text: var(--text);
|
|
107
|
+
--surface-item-text-hover: var(--text);
|
|
108
|
+
--surface-item-text-active: var(--text);
|
|
109
|
+
--surface-item-text-disabled: var(--gray-400);
|
|
110
|
+
|
|
111
|
+
/* Panel scrollers */
|
|
112
|
+
--surface-panel-scrollbar: var(--gray-50);
|
|
113
|
+
--surface-panel-scrollbar-thumb: var(--primary-100);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TYPOGRAPHY FUNCTIONAL TOKENS
|
|
3
|
+
*
|
|
4
|
+
* Semantic tokens for text colors and typography-related variables.
|
|
5
|
+
* Separate from typography.css in the typography/ directory which defines
|
|
6
|
+
* actual typographic styles and scales.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
@layer infonomic-functional {
|
|
10
|
+
:root {
|
|
11
|
+
--text: var(--gray-900);
|
|
12
|
+
--headings: var(--primary-700);
|
|
13
|
+
--muted: oklch(from var(--foreground) calc(l * 2) c h);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* 🌙 Dark via `.dark` class or [data-theme="dark"] attribute.
|
|
17
|
+
* We rely on the consuming application to detect a user's
|
|
18
|
+
* preferred color scheme - either by header or cookie, and to set
|
|
19
|
+
* a root html class accordingly (for now), which unfortunately means
|
|
20
|
+
* relying on either a server-side render or JS to set the theme
|
|
21
|
+
* on initial load.
|
|
22
|
+
*/
|
|
23
|
+
.dark,
|
|
24
|
+
[data-theme="dark"],
|
|
25
|
+
[data-theme="dark"] ::backdrop
|
|
26
|
+
{
|
|
27
|
+
--text: var(--gray-50);
|
|
28
|
+
--headings: var(--gray-50);
|
|
29
|
+
--muted: oklch(from var(--foreground) calc(l * 0.75) c h);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* ===================================================================
|
|
33
|
+
* .NOT-DARK OVERRIDE
|
|
34
|
+
* .not-dark override: Forces light mode tokens by re-declaring :root values.
|
|
35
|
+
* This duplication is intentional - it ensures .not-dark always wins over .dark
|
|
36
|
+
* regardless of DOM order, without needing complex :not() selectors.
|
|
37
|
+
* Alternative approaches (revert-layer, :not() patterns) would be more fragile.
|
|
38
|
+
*/
|
|
39
|
+
.not-dark {
|
|
40
|
+
--text: var(--gray-900);
|
|
41
|
+
--headings: var(--primary-800);
|
|
42
|
+
--muted: oklch(from var(--foreground) calc(l * 2) c h);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -32,10 +32,10 @@ select:-webkit-autofill:focus, select:autofill:focus {
|
|
|
32
32
|
background-color: rgb(250, 217, 167) !important;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
/* 🌙 Dark via `.dark` class
|
|
36
|
-
* consuming application to detect a user's preferred
|
|
37
|
-
* color scheme - either by header or cookie
|
|
38
|
-
*
|
|
35
|
+
/* 🌙 Dark via `.dark` class or [data-theme="dark"] attribute.
|
|
36
|
+
* We rely on the consuming application to detect a user's preferred
|
|
37
|
+
* color scheme - either by header or cookie, and set a root html
|
|
38
|
+
* class or data attribute accordingly.
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
41
|
.dark input:autofill,
|
|
@@ -46,7 +46,16 @@ select:-webkit-autofill:focus, select:autofill:focus {
|
|
|
46
46
|
.dark textarea:autofill:focus,
|
|
47
47
|
.dark select:autofill,
|
|
48
48
|
.dark select:autofill:hover,
|
|
49
|
-
.dark select:autofill:focus
|
|
49
|
+
.dark select:autofill:focus,
|
|
50
|
+
[data-theme="dark"] input:autofill,
|
|
51
|
+
[data-theme="dark"] input:autofill:hover,
|
|
52
|
+
[data-theme="dark"] input:autofill:focus,
|
|
53
|
+
[data-theme="dark"] textarea:autofill,
|
|
54
|
+
[data-theme="dark"] textarea:autofill:hover,
|
|
55
|
+
[data-theme="dark"] textarea:autofill:focus,
|
|
56
|
+
[data-theme="dark"] select:autofill,
|
|
57
|
+
[data-theme="dark"] select:autofill:hover,
|
|
58
|
+
[data-theme="dark"] select:autofill:focus {
|
|
50
59
|
border: 1px solid var(--theme-600) !important;
|
|
51
60
|
-webkit-text-fill-color: white !important;
|
|
52
61
|
-webkit-box-shadow: 0 0 0px 1000px var(--theme-600) inset !important;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTML ELEMENT DEFAULTS
|
|
3
|
+
*
|
|
4
|
+
* Opinionated starter styles for HTML elements to provide sensible defaults
|
|
5
|
+
* for new installations. These live in the infonomic-theme layer and are
|
|
6
|
+
* easily overridden by consuming applications.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
@layer infonomic-theme {
|
|
10
|
+
html {
|
|
11
|
+
font-size: 1rem;
|
|
12
|
+
color: var(--text);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Redeclared here to change the specificity and scope of --prose-body */
|
|
16
|
+
html .not-dark {
|
|
17
|
+
color: var(--text);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Default (light mode) */
|
|
21
|
+
::selection {
|
|
22
|
+
background-color: var(--theme-600);
|
|
23
|
+
color: white;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Dark mode */
|
|
27
|
+
.dark ::selection,
|
|
28
|
+
[data-theme="dark"] ::selection {
|
|
29
|
+
background-color: var(--theme-200);
|
|
30
|
+
color: var(--gray-900);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Headings */
|
|
34
|
+
h1 {
|
|
35
|
+
font-size: 1.75rem;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
line-height: 1.125;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
h2 {
|
|
41
|
+
font-size: 1.5rem;
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
line-height: 1.125;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
h3 {
|
|
47
|
+
font-size: 1.25rem;
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
line-height: 1.1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
h4 {
|
|
53
|
+
font-size: 1rem;
|
|
54
|
+
font-weight: 600;
|
|
55
|
+
line-height: 1.1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* External link indicator */
|
|
59
|
+
.external-link::after {
|
|
60
|
+
content: "";
|
|
61
|
+
display: inline-block;
|
|
62
|
+
background-image: url("/external-link-light.svg");
|
|
63
|
+
background-repeat: no-repeat;
|
|
64
|
+
background-position: 20% 50%;
|
|
65
|
+
background-size: 65% auto;
|
|
66
|
+
width: 1.1rem;
|
|
67
|
+
height: 1.1rem;
|
|
68
|
+
margin-right: -5px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.dark .external-link::after,
|
|
72
|
+
[data-theme="dark"] .external-link::after {
|
|
73
|
+
background-image: url("/external-link-dark.svg");
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
/* rgb(44, 47, 86) = theme secondary 900 */
|
|
8
|
-
:root.dark
|
|
8
|
+
:root.dark,
|
|
9
|
+
:root[data-theme="dark"] {
|
|
9
10
|
--scroll-bar-thumb: var(--canvas-700);
|
|
10
11
|
--scroll-bar-track: var(--canvas-900);
|
|
11
12
|
}
|
|
@@ -39,7 +40,8 @@
|
|
|
39
40
|
--scroll-bar-track: var(--scroll-bar-track);
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
.dark .component--scroller
|
|
43
|
+
.dark .component--scroller,
|
|
44
|
+
[data-theme="dark"] .component--scroller {
|
|
43
45
|
--scroll-bar-thumb: var(--scroll-bar-thumb);
|
|
44
46
|
--scroll-bar-track: var(--scroll-bar-track);
|
|
45
47
|
}
|
|
@@ -1,132 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THEME
|
|
3
|
+
*
|
|
4
|
+
* This file now primarily serves as a convenient import aggregator for
|
|
5
|
+
* theme-related concerns: autofill behavior, scrollbar styling, and
|
|
6
|
+
* HTML element defaults.
|
|
7
|
+
*
|
|
8
|
+
* CSS variable definitions have been moved to functional token files:
|
|
9
|
+
* - functional/surfaces.css (backgrounds, shadows, loader)
|
|
10
|
+
* - functional/typography-tokens.css (text, headings, muted)
|
|
11
|
+
* - functional/borders.css (border colors)
|
|
12
|
+
* - functional/colors.css (intent-based color tokens)
|
|
13
|
+
*/
|
|
14
|
+
|
|
1
15
|
@import "./autofill.css";
|
|
2
16
|
@import "./scrollers.css";
|
|
3
|
-
@import "./
|
|
4
|
-
|
|
5
|
-
@layer infonomic-theme {
|
|
6
|
-
:root {
|
|
7
|
-
--background: var(--canvas-25);
|
|
8
|
-
--foreground: var(--gray-900);
|
|
9
|
-
--text: var(--gray-900);
|
|
10
|
-
--headings: var(--primary-700);
|
|
11
|
-
--muted: oklch(from var(--foreground) calc(l * 2) c h);
|
|
12
|
-
--border-color: var(--gray-100);
|
|
13
|
-
--shadow: var(--shadow-md);
|
|
14
|
-
--loader-color: var(--primary-500);
|
|
15
|
-
|
|
16
|
-
--invert-background: var(--canvas-900);
|
|
17
|
-
--invert-foreground: var(--gray-50);
|
|
18
|
-
--invert-text: var(--gray-50);
|
|
19
|
-
--invert-headings: var(--gray-50);
|
|
20
|
-
--invert-muted: oklch(from var(--foreground) calc(l * 0.75) c h);
|
|
21
|
-
--invert-border-color: var(--canvas-700);
|
|
22
|
-
--invert-shadow: var(--shadow-lg);
|
|
23
|
-
--invert-loader-color: var(--gray-50);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* 🌙 Dark via `.dark` class. We rely on the consuming
|
|
27
|
-
* application to detect a user's preferred color scheme
|
|
28
|
-
* - either by header or cookie, and to set a root html
|
|
29
|
-
* class accordingly
|
|
30
|
-
*/
|
|
31
|
-
.dark {
|
|
32
|
-
--background: var(--invert-background);
|
|
33
|
-
--foreground: var(--invert-foreground);
|
|
34
|
-
--text: var(--invert-text);
|
|
35
|
-
--headings: var(--invert-headings);
|
|
36
|
-
--border-color: var(--invert-border-color);
|
|
37
|
-
--shadow: var(--invert-shadow);
|
|
38
|
-
--muted: var(--invert-muted);
|
|
39
|
-
--loader-color: var(--invert-loader-color);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/* .not-dark override: Forces light mode tokens by re-declaring :root values.
|
|
43
|
-
* This duplication is intentional - it ensures .not-dark always wins over .dark
|
|
44
|
-
* regardless of DOM order, without needing complex :not() selectors.
|
|
45
|
-
* Alternative approaches (revert-layer, :not() patterns) would be more fragile.
|
|
46
|
-
*/
|
|
47
|
-
.not-dark {
|
|
48
|
-
--background: var(--canvas-25);
|
|
49
|
-
--foreground: var(--gray-900);
|
|
50
|
-
--text: var(--gray-900);
|
|
51
|
-
--headings: var(--primary-800);
|
|
52
|
-
--muted: oklch(from var(--foreground) calc(l * 2) c h);
|
|
53
|
-
--border-color: var(--gray-100);
|
|
54
|
-
--shadow: var(--shadow-md);
|
|
55
|
-
--loader-color: var(--primary-500);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
html {
|
|
59
|
-
font-size: 1rem;
|
|
60
|
-
color: var(--text);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* Redeclared here to change the specificity and scope of --prose-body */
|
|
64
|
-
html .not-dark {
|
|
65
|
-
color: var(--text);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* Default (light mode) */
|
|
69
|
-
::selection {
|
|
70
|
-
background-color: var(--theme-600);
|
|
71
|
-
color: white;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* Dark mode */
|
|
75
|
-
.dark ::selection {
|
|
76
|
-
background-color: var(--theme-200);
|
|
77
|
-
color: var(--gray-900);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.background {
|
|
81
|
-
background-color: var(--background);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.foreground {
|
|
85
|
-
color: var(--foreground);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.text {
|
|
89
|
-
color: var(--text);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.headings {
|
|
93
|
-
color: var(--headings);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.muted {
|
|
97
|
-
font-size: 0.925rem;
|
|
98
|
-
color: var(--muted);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.shadow {
|
|
102
|
-
box-shadow: var(--shadow);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.border-color {
|
|
106
|
-
border-color: var(--border-color);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.border {
|
|
110
|
-
border-color: var(--border-color);
|
|
111
|
-
border-width: var(--border-width-thin);
|
|
112
|
-
border-style: var(--border-style-solid);
|
|
113
|
-
border-radius: var(--border-radius-sm);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/* External link */
|
|
117
|
-
.external-link::after {
|
|
118
|
-
content: "";
|
|
119
|
-
display: inline-block;
|
|
120
|
-
background-image: url("/external-link-light.svg");
|
|
121
|
-
background-repeat: no-repeat;
|
|
122
|
-
background-position: 20% 50%;
|
|
123
|
-
background-size: 65% auto;
|
|
124
|
-
width: 1.1rem;
|
|
125
|
-
height: 1.1rem;
|
|
126
|
-
margin-right: -5px;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.dark .external-link::after {
|
|
130
|
-
background-image: url("/external-link-dark.svg");
|
|
131
|
-
}
|
|
132
|
-
}
|
|
17
|
+
@import "./defaults.css";
|
|
@@ -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' }}>
|
|
8
|
-
<div className="
|
|
7
|
+
<div style={{ maxWidth: '700px', margin: '2rem auto' }}>
|
|
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>
|
|
@@ -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,8 +43,8 @@ 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
50
|
This is a <code>inline code here</code> of text that we'll use for our typography
|
|
@@ -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,
|
|
@@ -366,7 +366,7 @@
|
|
|
366
366
|
|
|
367
367
|
.prose :where(pre):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
368
368
|
color: var(--prose-pre-code);
|
|
369
|
-
background-color: var(--prose-pre-
|
|
369
|
+
background-color: var(--prose-pre-background);
|
|
370
370
|
overflow-x: auto;
|
|
371
371
|
font-weight: 400;
|
|
372
372
|
line-height: 1.7142857;
|
|
@@ -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
|