@dolanske/vui 0.5.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/README.md +5 -4
  2. package/dist/components/Accordion/Accordion.vue.d.ts +3 -2
  3. package/dist/components/Accordion/AccordionGroup.vue.d.ts +5 -2
  4. package/dist/components/Alert/Alert.vue.d.ts +10 -3
  5. package/dist/components/Avatar/Avatar.vue.d.ts +16 -1
  6. package/dist/components/Badge/Badge.vue.d.ts +4 -3
  7. package/dist/components/Breadcrumbs/BreadcrumbItem.vue.d.ts +4 -3
  8. package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts +3 -2
  9. package/dist/components/Button/Button.vue.d.ts +8 -17
  10. package/dist/components/ButtonGroup/ButtonGroup.vue.d.ts +5 -2
  11. package/dist/components/Calendar/Calendar.vue.d.ts +7 -7
  12. package/dist/components/Card/Card.vue.d.ts +4 -3
  13. package/dist/components/Checkbox/Checkbox.vue.d.ts +8 -6
  14. package/dist/components/CopyClipboard/CopyClipboard.vue.d.ts +2 -1
  15. package/dist/components/Divider/Divider.vue.d.ts +3 -2
  16. package/dist/components/Drawer/Drawer.vue.d.ts +6 -5
  17. package/dist/components/Dropdown/Dropdown.vue.d.ts +84 -6
  18. package/dist/components/Dropdown/DropdownItem.vue.d.ts +3 -2
  19. package/dist/components/Dropdown/DropdownTitle.vue.d.ts +6 -2
  20. package/dist/components/Flex/Flex.vue.d.ts +3 -2
  21. package/dist/components/Grid/Grid.vue.d.ts +7 -3
  22. package/dist/components/Input/Color.vue.d.ts +11 -0
  23. package/dist/components/Input/Counter.vue.d.ts +5 -5
  24. package/dist/components/Input/Dropzone.vue.d.ts +96 -11
  25. package/dist/components/Input/File.vue.d.ts +4 -3
  26. package/dist/components/Input/Input.vue.d.ts +9 -8
  27. package/dist/components/Input/Password.vue.d.ts +1 -1
  28. package/dist/components/Input/Textarea.vue.d.ts +7 -6
  29. package/dist/components/Kbd/Kbd.vue.d.ts +1 -1
  30. package/dist/components/Kbd/KbdGroup.vue.d.ts +5 -12
  31. package/dist/components/Modal/Confirm.vue.d.ts +7 -6
  32. package/dist/components/Modal/Modal.vue.d.ts +7 -6
  33. package/dist/components/OTP/OTP.vue.d.ts +7 -6
  34. package/dist/components/OTP/OTPItem.vue.d.ts +1 -1
  35. package/dist/components/Pagination/Pagination.vue.d.ts +6 -2
  36. package/dist/components/Popout/Popout.vue.d.ts +11 -3
  37. package/dist/components/Progress/Progress.vue.d.ts +7 -5
  38. package/dist/components/Radio/Radio.vue.d.ts +8 -6
  39. package/dist/components/Radio/RadioGroup.vue.d.ts +7 -6
  40. package/dist/components/Select/Select.vue.d.ts +6 -8
  41. package/dist/components/Sheet/Sheet.vue.d.ts +9 -5
  42. package/dist/components/Sidebar/Sidebar.vue.d.ts +70 -0
  43. package/dist/components/Skeleton/Skeleton.vue.d.ts +1 -1
  44. package/dist/components/Spinner/Spinner.vue.d.ts +1 -1
  45. package/dist/components/Switch/Switch.vue.d.ts +8 -6
  46. package/dist/components/Table/Cell.vue.d.ts +5 -2
  47. package/dist/components/Table/{Header.vue.d.ts → Head.vue.d.ts} +3 -2
  48. package/dist/components/Table/{Table.vue.d.ts → Root.vue.d.ts} +3 -2
  49. package/dist/components/Table/index.d.ts +6 -0
  50. package/dist/components/Table/table.d.ts +3 -3
  51. package/dist/components/Tabs/Tab.vue.d.ts +17 -3
  52. package/dist/components/Tabs/Tabs.vue.d.ts +8 -7
  53. package/dist/components/Toast/toast.d.ts +245 -0
  54. package/dist/components/Tooltip/Tooltip.vue.d.ts +2 -1
  55. package/dist/index.d.ts +5 -7
  56. package/dist/internal/Backdrop/Backdrop.vue.d.ts +3 -2
  57. package/dist/shared/helpers.d.ts +9 -0
  58. package/dist/shared/theme.d.ts +3 -0
  59. package/dist/vui.css +1 -0
  60. package/dist/vui.js +7160 -6355
  61. package/package.json +22 -18
  62. package/src/App.vue +90 -171
  63. package/src/components/Accordion/accordion.scss +1 -0
  64. package/src/components/Alert/Alert.vue +11 -5
  65. package/src/components/Alert/alert.scss +104 -23
  66. package/src/components/Avatar/Avatar.vue +4 -1
  67. package/src/components/Avatar/avatar.scss +1 -1
  68. package/src/components/Badge/Badge.vue +1 -1
  69. package/src/components/Badge/badge.scss +134 -17
  70. package/src/components/Breadcrumbs/BreadcrumbItem.vue +2 -2
  71. package/src/components/Breadcrumbs/Breadcrumbs.vue +1 -2
  72. package/src/components/Breadcrumbs/breadcrumbs.scss +2 -1
  73. package/src/components/Button/Button.vue +15 -20
  74. package/src/components/Button/button.scss +156 -55
  75. package/src/components/ButtonGroup/ButtonGroup.vue +4 -1
  76. package/src/components/ButtonGroup/button-group.scss +2 -2
  77. package/src/components/Calendar/Calendar.vue +4 -1
  78. package/src/components/Calendar/calendar.scss +25 -2
  79. package/src/components/Card/Card.vue +2 -2
  80. package/src/components/Card/card.scss +4 -4
  81. package/src/components/Checkbox/Checkbox.vue +4 -1
  82. package/src/components/Checkbox/checkbox.scss +17 -12
  83. package/src/components/CopyClipboard/CopyClipboard.vue +15 -6
  84. package/src/components/CopyClipboard/copy-clipboard.scss +10 -2
  85. package/src/components/Drawer/Drawer.vue +4 -4
  86. package/src/components/Drawer/drawer.scss +1 -0
  87. package/src/components/Dropdown/Dropdown.vue +44 -20
  88. package/src/components/Dropdown/DropdownItem.vue +4 -4
  89. package/src/components/Dropdown/DropdownTitle.vue +7 -1
  90. package/src/components/Dropdown/dropdown-item.scss +9 -2
  91. package/src/components/Dropdown/dropdown.scss +21 -7
  92. package/src/components/Grid/Grid.vue +21 -1
  93. package/src/components/Input/Color.vue +26 -0
  94. package/src/components/Input/Counter.vue +12 -16
  95. package/src/components/Input/Dropzone.vue +1 -1
  96. package/src/components/Input/File.vue +1 -1
  97. package/src/components/Input/Input.vue +8 -6
  98. package/src/components/Input/Password.vue +1 -13
  99. package/src/components/Input/Textarea.vue +4 -2
  100. package/src/components/Input/input.scss +110 -16
  101. package/src/components/Kbd/KbdGroup.vue +2 -6
  102. package/src/components/Kbd/kbd.scss +6 -5
  103. package/src/components/Modal/Confirm.vue +1 -1
  104. package/src/components/Modal/Modal.vue +23 -15
  105. package/src/components/Modal/modal.scss +11 -6
  106. package/src/components/OTP/otp.scss +8 -7
  107. package/src/components/Pagination/Pagination.vue +6 -3
  108. package/src/components/Popout/Popout.vue +15 -5
  109. package/src/components/Popout/popout.scss +8 -1
  110. package/src/components/Progress/Progress.vue +18 -5
  111. package/src/components/Progress/progress.scss +7 -1
  112. package/src/components/Radio/Radio.vue +4 -2
  113. package/src/components/Radio/radio.scss +18 -8
  114. package/src/components/Select/Select.vue +49 -18
  115. package/src/components/Select/select.scss +35 -2
  116. package/src/components/Sheet/Sheet.vue +8 -2
  117. package/src/components/Sheet/sheet.scss +9 -0
  118. package/src/components/Sidebar/Sidebar.vue +24 -11
  119. package/src/components/Sidebar/sidebar.scss +6 -5
  120. package/src/components/Spinner/spinner.scss +2 -1
  121. package/src/components/Switch/Switch.vue +4 -3
  122. package/src/components/Switch/switch.scss +39 -6
  123. package/src/components/Table/{Header.vue → Head.vue} +5 -5
  124. package/src/components/Table/{Table.vue → Root.vue} +2 -2
  125. package/src/components/Table/SelectRow.vue +2 -1
  126. package/src/components/Table/index.ts +7 -0
  127. package/src/components/Table/table.scss +25 -5
  128. package/src/components/Table/table.ts +7 -3
  129. package/src/components/Tabs/Tab.vue +7 -9
  130. package/src/components/Tabs/Tabs.vue +5 -4
  131. package/src/components/Tabs/tabs.scss +10 -3
  132. package/src/components/Toast/Toasts.vue +5 -0
  133. package/src/components/Toast/toast.scss +6 -2
  134. package/src/components/Toast/toast.ts +7 -0
  135. package/src/components/Tooltip/Tooltip.vue +9 -9
  136. package/src/components/Tooltip/tooltip.scss +4 -0
  137. package/src/examples/ExampleAccordions.vue +58 -0
  138. package/src/examples/ExampleAlerts.vue +78 -0
  139. package/src/examples/ExampleAvatars.vue +44 -0
  140. package/src/examples/ExampleBadges.vue +48 -0
  141. package/src/examples/ExampleBreadcrumbs.vue +46 -0
  142. package/src/examples/ExampleButtons.vue +140 -0
  143. package/src/examples/ExampleCalendars.vue +40 -0
  144. package/src/examples/ExampleCards.vue +94 -0
  145. package/src/examples/ExampleCheckboxes.vue +123 -0
  146. package/src/examples/ExampleCopyClipboard.vue +47 -0
  147. package/src/examples/ExampleDividers.vue +39 -0
  148. package/src/examples/ExampleDrawers.vue +67 -0
  149. package/src/examples/ExampleDropdowns.vue +114 -0
  150. package/src/examples/ExampleFlexGrid.vue +122 -0
  151. package/src/examples/ExampleInputs.vue +234 -0
  152. package/src/examples/ExampleKBD.vue +65 -0
  153. package/src/examples/ExampleModals.vue +143 -0
  154. package/src/examples/ExamplePalette.vue +159 -0
  155. package/src/examples/ExamplePopouts.vue +41 -0
  156. package/src/examples/ExampleSheets.vue +77 -0
  157. package/src/examples/ExampleSidebars.vue +270 -0
  158. package/src/examples/ExampleSkeletons.vue +26 -0
  159. package/src/examples/ExampleSpinners.vue +78 -0
  160. package/src/examples/ExampleTables.vue +195 -0
  161. package/src/examples/ExampleTabs.vue +119 -0
  162. package/src/examples/ExampleToasts.vue +96 -0
  163. package/src/examples/ExampleTooltips.vue +70 -0
  164. package/src/examples/shared/ExampleColor.vue +28 -0
  165. package/src/index.ts +8 -11
  166. package/src/internal/Backdrop/backdrop.scss +7 -1
  167. package/src/shared/helpers.ts +43 -0
  168. package/src/shared/theme.ts +22 -0
  169. package/src/style/animation.scss +1 -0
  170. package/src/style/core.scss +30 -55
  171. package/src/style/layout.scss +74 -9
  172. package/src/style/text.scss +18 -0
  173. package/src/style/theme.scss +195 -0
  174. package/src/style/tooltip.scss +22 -4
  175. package/src/style/typography.scss +95 -18
  176. package/dist/components/Table/Row.vue.d.ts +0 -16
  177. package/dist/style.css +0 -1
  178. package/src/components/Table/Row.vue +0 -9
@@ -5,8 +5,9 @@
5
5
  // To overwrite any of these styles, simply create a style file and import it
6
6
  // after this one
7
7
  @use './reset.scss';
8
- // @use './text.scss';
8
+ @use './theme.scss';
9
9
 
10
+ // TODO: Split this into based on media query prefers-dark-mode
10
11
  :root {
11
12
  color-scheme: dark;
12
13
 
@@ -17,16 +18,16 @@
17
18
  --container-xl: 1540px;
18
19
  --container-xxl: 1920px;
19
20
 
20
- --border-radius-xs: 2px;
21
- --border-radius-s: 4px;
21
+ --border-radius-xs: 3px;
22
+ --border-radius-s: 5px;
22
23
  --border-radius-m: 8px;
23
24
  --border-radius-l: 12px;
24
25
 
25
26
  --font-size-xxs: 1rem;
26
27
  --font-size-xs: 1.15rem;
27
28
  --font-size-s: 1.3rem;
28
- --font-size-ms: 1.45rem;
29
- --font-size-m: 1.6rem;
29
+ --font-size-m: 1.45rem;
30
+ --font-size-m: 1.5rem;
30
31
  --font-size-l: 1.8rem;
31
32
  --font-size-xl: 2rem;
32
33
  --font-size-xxl: 2.6rem;
@@ -42,63 +43,37 @@
42
43
  --space-xxl: 48px;
43
44
  --space-xxxl: 64px;
44
45
 
45
- --transition-fast: 0.15s all cubic-bezier(0.65, 0, 0.35, 1);
46
+ --transition-fast: 0.1s all ease-in-out;
46
47
  --transition: 0.2s all cubic-bezier(0.65, 0, 0.35, 1);
47
48
  --transition-slow: 0.35s all cubic-bezier(0.65, 0, 0.35, 1);
48
49
 
49
- --color-bg: rgb(18, 18, 18);
50
- --color-bg-raised: rgb(28, 28, 28);
51
- --color-bg-lowered: rgb(14, 14, 14);
52
-
53
- --color-text: rgb(231, 231, 231);
54
- --color-text-light: rgb(158, 158, 158);
55
- --color-text-lighter: rgb(100, 100, 100);
56
- --color-text-lightest: rgb(65, 65, 65);
57
- --color-text-invert: rgb(17, 17, 17);
58
-
59
- --color-button-gray: rgb(28, 28, 28);
60
- --color-button-gray-hover: rgb(38, 38, 38);
61
-
62
- --color-text-red: rgb(243, 78, 70);
63
- --color-bg-red-lowered: rgb(66, 22, 20);
64
- --color-bg-red-raised: rgb(119, 31, 26);
65
- --color-border-red: rgb(94, 23, 19);
66
-
67
- --color-text-green: rgb(44, 214, 52);
68
- --color-text-green-disabled: rgb(109, 193, 113);
69
- --color-bg-green-lowered: rgb(19, 46, 9);
70
- --color-bg-green-raised: rgb(48, 122, 22);
71
- --color-border-green: rgb(27, 70, 12);
72
-
73
- --color-text-yellow: rgb(243, 231, 70);
74
- --color-bg-yellow-lowered: rgb(59, 46, 10);
75
- --color-bg-yellow-raised: rgb(119, 82, 26);
76
- --color-border-yellow: rgb(99, 97, 16);
77
-
78
- --color-text-blue: rgb(85, 141, 245);
79
- --color-bg-blue-lowered: rgb(10, 25, 59);
80
- --color-bg-blue-raised: rgb(26, 59, 119);
81
- --color-border-blue: rgb(20, 45, 112);
82
-
83
- --color-border: rgb(40, 40, 40);
84
- --color-border-strong: rgb(54, 54, 54);
85
- --color-border-weak: rgb(36, 36, 36);
86
-
87
- --color-accent: rgb(238, 120, 17);
88
- --color-accent-disabled: hsl(from var(--color-accent) calc(h) calc(s * 0.4) calc(l));
89
- --color-bg-accent-lowered: hsl(from var(--color-accent) calc(h) s calc(l * 0.2));
90
- --color-bg-accent-raised: hsl(from var(--color-accent) calc(h) s calc(l * 0.45));
91
- --color-border-accent: hsl(from var(--color-accent) calc(h) s calc(l * 0.3));
92
-
93
- --box-shadow: 0 2px 12px rgba(8, 8, 8, 0.2);
94
- --box-shadow-strong: 0 4px 15px rgba(8, 8, 8, 0.4);
95
-
96
- --global-font: Geist, sans-serif;
50
+ --global-font: Inter, sans-serif;
97
51
  --global-font-mono: 'Geist Mono', 'Courier New', Courier, monospace;
98
52
 
53
+ --font-weight-thin: 200;
54
+ --font-weight-light: 300;
55
+ --font-weight: 400;
56
+ --font-weight-medium: 500;
57
+ --font-weight-semibold: 600;
58
+ --font-weight-bold: 700;
59
+ --font-weight-extrabold: 700;
60
+ --font-weight-black: 900;
61
+
99
62
  --interactive-el-height: 34px;
100
63
  }
101
64
 
65
+ @media (prefers-color-scheme: dark) {
66
+ }
67
+
68
+ // Disable motion for users who have requested it
69
+ @media (prefers-reduced-motion: reduce) {
70
+ :root {
71
+ --transition-fast: 0s all linear;
72
+ --transition: 0s all linear;
73
+ --transition-slow: 0s all linear;
74
+ }
75
+ }
76
+
102
77
  :root {
103
78
  font-family: var(--global-font);
104
79
  font-size: 63.5%;
@@ -108,6 +83,7 @@
108
83
 
109
84
  overflow-x: hidden;
110
85
  width: 100%;
86
+ font-weight: var(--font-weight);
111
87
 
112
88
  font-feature-settings: normal;
113
89
  font-variation-settings: normal;
@@ -146,5 +122,4 @@ body {
146
122
  @include meta.load-css('tooltip.scss');
147
123
  @include meta.load-css('utils.scss');
148
124
  @include meta.load-css('text.scss');
149
-
150
125
  @include meta.load-css('media-query.scss');
@@ -19,19 +19,24 @@ $containers: 'xs', 's', 'm', 'l', 'xl', 'xxl';
19
19
  }
20
20
  }
21
21
 
22
- // Layout
23
- .flex {
24
- display: flex;
22
+ $widths: 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100;
23
+
24
+ @each $width in $widths {
25
+ $extra: '%';
26
+ .w-#{$width} {
27
+ width: #{$width + $extra} !important;
28
+ }
25
29
  }
26
30
 
27
- .flex-1 {
28
- flex: 1;
31
+ .w-full {
32
+ width: 100%;
29
33
  }
30
34
 
31
- .inline-flex {
32
- display: inline-flex;
35
+ .w-auto {
36
+ width: auto;
33
37
  }
34
38
 
39
+ // Layout
35
40
  .block {
36
41
  display: block;
37
42
  }
@@ -44,6 +49,28 @@ $containers: 'xs', 's', 'm', 'l', 'xl', 'xxl';
44
49
  display: inline;
45
50
  }
46
51
 
52
+ // Flex stuff
53
+
54
+ .flex {
55
+ display: flex;
56
+ }
57
+
58
+ .flex-col {
59
+ flex-direction: column;
60
+ }
61
+
62
+ .flex-row {
63
+ flex-direction: row;
64
+ }
65
+
66
+ .flex-1 {
67
+ flex: 1;
68
+ }
69
+
70
+ .inline-flex {
71
+ display: inline-flex;
72
+ }
73
+
47
74
  .x-center {
48
75
  justify-content: center;
49
76
  }
@@ -52,12 +79,24 @@ $containers: 'xs', 's', 'm', 'l', 'xl', 'xxl';
52
79
  justify-content: flex-start;
53
80
  }
54
81
 
82
+ .x-between {
83
+ justify-content: space-between;
84
+ }
85
+
86
+ .x-around {
87
+ justify-content: space-around;
88
+ }
89
+
90
+ .x-evenly {
91
+ justify-content: space-evenly;
92
+ }
93
+
55
94
  .x-end {
56
95
  justify-content: flex-end;
57
96
  }
58
97
 
59
98
  .y-start {
60
- align-items: center;
99
+ align-items: flex-start;
61
100
  }
62
101
 
63
102
  .y-end {
@@ -68,6 +107,10 @@ $containers: 'xs', 's', 'm', 'l', 'xl', 'xxl';
68
107
  align-items: center;
69
108
  }
70
109
 
110
+ .y-baseline {
111
+ align-items: baseline;
112
+ }
113
+
71
114
  // Sizes
72
115
  // Paddings & margins
73
116
  .mx-auto {
@@ -83,7 +126,7 @@ $containers: 'xs', 's', 'm', 'l', 'xl', 'xxl';
83
126
  }
84
127
 
85
128
  // Generate layout classes from size styles
86
- $sizes: 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl';
129
+ $sizes: 0, 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl';
87
130
 
88
131
  @each $size in $sizes {
89
132
  // Margin
@@ -166,3 +209,25 @@ $zindexes: 0, 10, 20, 30, 40, 50, auto;
166
209
  z-index: $zindex;
167
210
  }
168
211
  }
212
+
213
+ // Grid
214
+
215
+ .grid {
216
+ display: grid;
217
+ }
218
+
219
+ .inline-grid {
220
+ display: inline-table;
221
+ }
222
+
223
+ $cols: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
224
+
225
+ @each $col in $cols {
226
+ .col-#{$col} {
227
+ grid-template-columns: repeat($col, 1fr);
228
+ }
229
+
230
+ .row {
231
+ grid-template-rows: repeat($col, 1fr);
232
+ }
233
+ }
@@ -72,3 +72,21 @@ $lines: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
72
72
  -webkit-line-clamp: $line;
73
73
  }
74
74
  }
75
+
76
+ // White space
77
+
78
+ .ws-wrap {
79
+ white-space: wrap;
80
+ }
81
+
82
+ .ws-pre {
83
+ white-space: pre;
84
+ }
85
+
86
+ .ws-prewrap {
87
+ white-space: pre-wrap;
88
+ }
89
+
90
+ .ws-nowrap {
91
+ white-space: nowrap;
92
+ }
@@ -0,0 +1,195 @@
1
+ // Light theme
2
+ :root {
3
+ --light-color-bg: rgb(246, 246, 246);
4
+ --light-color-bg-medium: rgb(236, 236, 236);
5
+ --light-color-bg-raised: rgb(222, 222, 222);
6
+ --light-color-bg-lowered: rgb(255, 255, 255);
7
+
8
+ --light-color-text: rgb(8, 8, 8);
9
+ --light-color-text-light: rgb(64, 64, 64);
10
+ --light-color-text-lighter: rgb(92, 92, 92);
11
+ --light-color-text-lightest: rgb(128, 128, 128);
12
+ --light-color-text-invert: rgb(248, 248, 248);
13
+
14
+ --light-color-button-gray: rgb(224, 224, 224);
15
+ --light-color-button-gray-hover: rgb(198, 198, 198);
16
+
17
+ --light-color-button-fill: rgb(12, 12, 12);
18
+ --light-color-button-fill-hover: rgb(52, 52, 52);
19
+
20
+ --light-color-text-red: rgb(209, 60, 52);
21
+ --light-color-bg-red-lowered: rgb(172, 45, 45);
22
+ --light-color-bg-red-raised: rgb(220, 38, 38);
23
+
24
+ --light-color-text-green: rgb(77, 160, 29);
25
+ --light-color-bg-green-lowered: rgb(42, 114, 19);
26
+ --light-color-bg-green-raised: rgb(61, 146, 35);
27
+
28
+ --light-color-text-yellow: rgb(176, 129, 15);
29
+ --light-color-bg-yellow-lowered: rgb(230, 205, 137);
30
+ --light-color-bg-yellow-raised: rgb(253, 200, 86);
31
+
32
+ --light-color-text-blue: rgb(85, 141, 245);
33
+ --light-color-bg-blue-lowered: rgb(196, 214, 255);
34
+ --light-color-bg-blue-raised: rgb(136, 178, 255);
35
+
36
+ --light-color-border: rgb(200, 200, 200);
37
+ --light-color-border-strong: rgb(152, 152, 152);
38
+ --light-color-border-weak: rgb(224, 224, 224);
39
+
40
+ --light-color-accent: rgb(193, 118, 255);
41
+ --light-color-bg-accent-lowered: hsla(from var(--light-color-accent) h s l / 0.6);
42
+ --light-color-bg-accent-raised: hsla(from var(--light-color-accent) h s l / 0.75);
43
+
44
+ --light-box-shadow: 0 2px 12px rgba(8, 8, 8, 0.075);
45
+ --light-box-shadow-strong: 0 4px 15px rgba(8, 8, 8, 0.2);
46
+ }
47
+
48
+ // Dark theme
49
+ :root {
50
+ --dark-color-bg: rgb(17, 17, 17);
51
+ --dark-color-bg-medium: rgb(22, 22, 22);
52
+ --dark-color-bg-raised: rgb(28, 28, 28);
53
+ --dark-color-bg-lowered: rgb(12, 12, 12);
54
+
55
+ --dark-color-text: rgb(231, 231, 231);
56
+ --dark-color-text-light: rgb(180, 180, 180);
57
+ --dark-color-text-lighter: rgb(90, 90, 90);
58
+ --dark-color-text-lightest: rgb(65, 65, 65);
59
+ --dark-color-text-invert: rgb(17, 17, 17);
60
+
61
+ --dark-color-button-gray: rgb(46, 46, 46);
62
+ --dark-color-button-gray-hover: rgb(38, 38, 38);
63
+
64
+ --dark-color-button-fill: rgb(250, 250, 250);
65
+ --dark-color-button-fill-hover: rgb(210, 210, 210);
66
+
67
+ --dark-color-text-red: rgb(243, 78, 70);
68
+ --dark-color-bg-red-lowered: rgb(104, 24, 24);
69
+ --dark-color-bg-red-raised: rgb(127, 29, 29);
70
+
71
+ --dark-color-text-green: rgb(106, 207, 48);
72
+ --dark-color-bg-green-lowered: rgb(40, 95, 8);
73
+ --dark-color-bg-green-raised: rgb(26, 122, 13);
74
+
75
+ --dark-color-text-yellow: rgb(255, 193, 7);
76
+ --dark-color-bg-yellow-lowered: rgb(78, 52, 0);
77
+ --dark-color-bg-yellow-raised: rgb(152, 104, 0);
78
+
79
+ --dark-color-text-blue: rgb(85, 141, 245);
80
+ --dark-color-bg-blue-lowered: rgb(13, 32, 74);
81
+ --dark-color-bg-blue-raised: rgb(26, 59, 119);
82
+
83
+ --dark-color-border: rgb(40, 40, 40);
84
+ --dark-color-border-strong: rgb(54, 54, 54);
85
+ --dark-color-border-weak: rgb(36, 36, 36);
86
+
87
+ --dark-color-accent: rgb(193, 118, 255);
88
+ --dark-color-bg-accent-lowered: hsla(from var(--dark-color-accent) h s l / 0.45);
89
+ --dark-color-bg-accent-raised: hsla(from var(--dark-color-accent) h s l / 0.6);
90
+
91
+ --dark-box-shadow: 0 2px 12px rgba(8, 8, 8, 0.2);
92
+ --dark-box-shadow-strong: 0 4px 15px rgba(8, 8, 8, 0.4);
93
+ }
94
+
95
+ :root.light {
96
+ color-scheme: light;
97
+
98
+ --color-bg: var(--light-color-bg);
99
+ --color-bg-medium: var(--light-color-bg-medium);
100
+ --color-bg-raised: var(--light-color-bg-raised);
101
+ --color-bg-lowered: var(--light-color-bg-lowered);
102
+
103
+ --color-text: var(--light-color-text);
104
+ --color-text-light: var(--light-color-text-light);
105
+ --color-text-lighter: var(--light-color-text-lighter);
106
+ --color-text-lightest: var(--light-color-text-lightest);
107
+ --color-text-invert: var(--light-color-text-invert);
108
+
109
+ --color-button-gray: var(--light-color-button-gray);
110
+ --color-button-gray-hover: var(--light-color-button-gray-hover);
111
+
112
+ --color-button-fill: var(--light-color-button-fill);
113
+ --color-button-fill-hover: var(--light-color-button-fill-hover);
114
+
115
+ --color-text-red: var(--light-color-text-red);
116
+ --color-bg-red-lowered: var(--light-color-bg-red-lowered);
117
+ --color-bg-red-raised: var(--light-color-bg-red-raised);
118
+ --color-border-red: var(--light-color-border-red);
119
+
120
+ --color-text-green: var(--light-color-text-green);
121
+ --color-bg-green-lowered: var(--light-color-bg-green-lowered);
122
+ --color-bg-green-raised: var(--light-color-bg-green-raised);
123
+
124
+ --color-text-yellow: var(--light-color-text-yellow);
125
+ --color-bg-yellow-lowered: var(--light-color-bg-yellow-lowered);
126
+ --color-bg-yellow-raised: var(--light-color-bg-yellow-raised);
127
+ --color-border-yellow: var(--light-color-border-yellow);
128
+
129
+ --color-text-blue: var(--light-color-text-blue);
130
+ --color-bg-blue-lowered: var(--light-color-bg-blue-lowered);
131
+ --color-bg-blue-raised: var(--light-color-bg-blue-raised);
132
+ --color-border-blue: var(--light-color-border-blue);
133
+
134
+ --color-border: var(--light-color-border);
135
+ --color-border-strong: var(--light-color-border-strong);
136
+ --color-border-weak: var(--light-color-border-weak);
137
+
138
+ --color-accent: var(--light-color-accent);
139
+ --color-bg-accent-lowered: var(--light-color-bg-accent-lowered);
140
+ --color-bg-accent-raised: var(--light-color-bg-accent-raised);
141
+
142
+ --box-shadow: var(--light-box-shadow);
143
+ --box-shadow-strong: var(--light-box-shadow-strong);
144
+ }
145
+
146
+ :root.dark {
147
+ color-scheme: dark;
148
+
149
+ --color-bg: var(--dark-color-bg);
150
+ --color-bg-medium: var(--dark-color-bg-medium);
151
+ --color-bg-raised: var(--dark-color-bg-raised);
152
+ --color-bg-lowered: var(--dark-color-bg-lowered);
153
+
154
+ --color-text: var(--dark-color-text);
155
+ --color-text-light: var(--dark-color-text-light);
156
+ --color-text-lighter: var(--dark-color-text-lighter);
157
+ --color-text-lightest: var(--dark-color-text-lightest);
158
+ --color-text-invert: var(--dark-color-text-invert);
159
+
160
+ --color-button-gray: var(--dark-color-button-gray);
161
+ --color-button-gray-hover: var(--dark-color-button-gray-hover);
162
+
163
+ --color-button-fill: var(--dark-color-button-fill);
164
+ --color-button-fill-hover: var(--dark-color-button-fill-hover);
165
+
166
+ --color-text-red: var(--dark-color-text-red);
167
+ --color-bg-red-lowered: var(--dark-color-bg-red-lowered);
168
+ --color-bg-red-raised: var(--dark-color-bg-red-raised);
169
+ --color-border-red: var(--dark-color-border-red);
170
+
171
+ --color-text-green: var(--dark-color-text-green);
172
+ --color-bg-green-lowered: var(--dark-color-bg-green-lowered);
173
+ --color-bg-green-raised: var(--dark-color-bg-green-raised);
174
+
175
+ --color-text-yellow: var(--dark-color-text-yellow);
176
+ --color-bg-yellow-lowered: var(--dark-color-bg-yellow-lowered);
177
+ --color-bg-yellow-raised: var(--dark-color-bg-yellow-raised);
178
+ --color-border-yellow: var(--dark-color-border-yellow);
179
+
180
+ --color-text-blue: var(--dark-color-text-blue);
181
+ --color-bg-blue-lowered: var(--dark-color-bg-blue-lowered);
182
+ --color-bg-blue-raised: var(--dark-color-bg-blue-raised);
183
+ --color-border-blue: var(--dark-color-border-blue);
184
+
185
+ --color-border: var(--dark-color-border);
186
+ --color-border-strong: var(--dark-color-border-strong);
187
+ --color-border-weak: var(--dark-color-border-weak);
188
+
189
+ --color-accent: var(--dark-color-accent);
190
+ --color-bg-accent-lowered: var(--dark-color-bg-accent-lowered);
191
+ --color-bg-accent-raised: var(--dark-color-bg-accent-raised);
192
+
193
+ --box-shadow: var(--dark-box-shadow);
194
+ --box-shadow-strong: var(--dark-box-shadow-strong);
195
+ }
@@ -17,11 +17,12 @@ Available tooltip positions:
17
17
 
18
18
  &:before {
19
19
  font-family: var(--global-font);
20
- font-weight: 400;
21
- background-color: var(--color-bg-raised);
22
- color: var(--color-text);
20
+ font-weight: var(--font-weight-regular);
21
+ background-color: var(--color-button-gray);
22
+ color: var(--color-text) !important;
23
+ box-shadow: var(--box-shadow-strong);
23
24
 
24
- font-size: var(--font-size-ms);
25
+ font-size: var(--font-size-m);
25
26
  position: absolute;
26
27
  padding: 4px 8px;
27
28
  line-height: 1.3em;
@@ -34,6 +35,8 @@ Available tooltip positions:
34
35
  z-index: -1;
35
36
  visibility: hidden;
36
37
  pointer-events: none;
38
+ max-width: 256px;
39
+ width: max-content;
37
40
  }
38
41
 
39
42
  &:hover {
@@ -45,6 +48,21 @@ Available tooltip positions:
45
48
  }
46
49
  }
47
50
 
51
+ :root.light {
52
+ [data-title-left],
53
+ [data-title-right],
54
+ [data-title-bottom],
55
+ [data-title-bottom-left],
56
+ [data-title-bottom-right],
57
+ [data-title-top],
58
+ [data-title-top-left],
59
+ [data-title-top-right] {
60
+ &:before {
61
+ background-color: var(--color-bg-lowered);
62
+ }
63
+ }
64
+ }
65
+
48
66
  [data-title-left]:before {
49
67
  content: attr(data-title-left);
50
68
  top: 50%;
@@ -53,8 +53,9 @@ p {
53
53
  }
54
54
 
55
55
  a {
56
- color: var(--color-text-blue);
56
+ color: var(--color-text);
57
57
  text-decoration: underline;
58
+ text-underline-offset: 3px;
58
59
 
59
60
  &:hover {
60
61
  text-decoration: none;
@@ -62,16 +63,19 @@ p {
62
63
  }
63
64
 
64
65
  code {
65
- border-radius: var(--border-radius-xs);
66
+ font-family: var(--global-font-mono);
67
+ border-radius: var(--border-radius-s);
66
68
  background-color: var(--color-bg-raised);
67
69
  color: var(--color-text);
68
70
  border: 1px solid var(--color-border);
69
- padding: 1px 3px;
71
+ padding: 0px 3px;
72
+ font-weight: var(--font-weight);
73
+ font-size: var(--font-size-s);
70
74
  }
71
75
 
72
76
  strong,
73
77
  b {
74
- font-weight: 700;
78
+ font-weight: var(--font-weight-700);
75
79
  }
76
80
 
77
81
  i {
@@ -90,7 +94,7 @@ hr {
90
94
  span,
91
95
  strong,
92
96
  p {
93
- font-size: var(--font-size-ms);
97
+ font-size: var(--font-size-m);
94
98
  }
95
99
 
96
100
  blockquote {
@@ -135,10 +139,67 @@ pre {
135
139
  table {
136
140
  text-indent: 0;
137
141
  border-collapse: separate;
138
- // width: 100%;
139
142
  overflow-x: auto;
140
143
  max-width: 100%;
141
144
 
145
+ // TODO: add alternating row colors
146
+
147
+ // TODO add only separating header and body with a border, not between rows
148
+
149
+ // &.bg-dark {
150
+ // background-color: var(--color-bg-lowered);
151
+ // }
152
+
153
+ // &.bg-light {
154
+ // background-color: var(--color-bg-lighter);
155
+ // }
156
+
157
+ // &.no-borders {
158
+ // th,
159
+ // td {
160
+ // border: 0 !important;
161
+ // }
162
+ // }
163
+
164
+ thead {
165
+ th {
166
+ border-bottom: 1px solid var(--color-border);
167
+ border-top: 1px solid var(--color-border);
168
+ white-space: nowrap;
169
+
170
+ &:first-child {
171
+ border-top-left-radius: var(--border-radius-s);
172
+ border-bottom-left-radius: 0 !important;
173
+ }
174
+
175
+ &:last-child {
176
+ border-top-right-radius: var(--border-radius-s);
177
+ border-bottom-right-radius: 0 !important;
178
+ }
179
+ }
180
+ }
181
+
182
+ tbody {
183
+ th {
184
+ border-radius: 0;
185
+ border-bottom: 1px solid var(--color-border);
186
+ }
187
+
188
+ &:first-child tr:first-child {
189
+ td {
190
+ border-top: 1px solid var(--color-border);
191
+
192
+ &:first-child {
193
+ border-top-left-radius: var(--border-radius-s);
194
+ }
195
+
196
+ &:last-child {
197
+ border-top-right-radius: var(--border-radius-s);
198
+ }
199
+ }
200
+ }
201
+ }
202
+
142
203
  th,
143
204
  td {
144
205
  text-align: left;
@@ -148,6 +209,7 @@ table {
148
209
  font-size: var(--font-size-m);
149
210
  line-height: 1.4em;
150
211
  font-variant-numeric: tabular-nums;
212
+ vertical-align: top;
151
213
 
152
214
  &:first-child {
153
215
  border-left: 1px solid var(--color-border);
@@ -157,18 +219,9 @@ table {
157
219
  }
158
220
 
159
221
  th {
160
- border-bottom: 1px solid var(--color-border);
161
- border-top: 1px solid var(--color-border);
162
222
  font-weight: 600;
163
- white-space: nowrap;
164
-
165
- &:first-child {
166
- border-top-left-radius: var(--border-radius-s);
167
- }
168
-
169
- &:last-child {
170
- border-top-right-radius: var(--border-radius-s);
171
- }
223
+ font-size: var(--font-size-xs);
224
+ text-transform: uppercase;
172
225
  }
173
226
 
174
227
  tr {
@@ -177,7 +230,31 @@ table {
177
230
  font-weight: 400;
178
231
  }
179
232
 
233
+ &:first-child {
234
+ th {
235
+ border-top: 1px solid var(--color-border);
236
+
237
+ &:first-child {
238
+ border-top-left-radius: var(--border-radius-s);
239
+ }
240
+
241
+ &:last-child {
242
+ border-top-right-radius: var(--border-radius-s);
243
+ }
244
+ }
245
+ }
246
+
180
247
  &:last-child {
248
+ th {
249
+ &:first-child {
250
+ border-bottom-left-radius: var(--border-radius-s);
251
+ }
252
+
253
+ &:last-child {
254
+ border-bottom-right-radius: var(--border-radius-s);
255
+ }
256
+ }
257
+
181
258
  td {
182
259
  &:first-child {
183
260
  border-bottom-left-radius: var(--border-radius-s);
@@ -210,7 +287,7 @@ dl {
210
287
  padding-left: 0;
211
288
  color: var(--color-text-lighter);
212
289
  font-weight: 500;
213
- font-size: var(--font-size-ms);
290
+ font-size: var(--font-size-m);
214
291
  grid-column-start: 1;
215
292
  }
216
293