@datalayer/primer-addons 1.0.39 → 1.0.41
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/README.md +19 -8
- package/lib/components/box/boxCss.js +17 -1
- package/lib/components/box/boxTokens.d.ts +2 -1
- package/lib/components/box/boxTokens.js +2 -1
- package/lib/components/card/Card.d.ts +119 -5
- package/lib/components/card/Card.js +60 -46
- package/lib/components/card/Card.stories.d.ts +6 -0
- package/lib/components/card/Card.stories.js +26 -0
- package/lib/components/date-picker/TimeColumns.d.ts +5 -0
- package/lib/components/date-picker/TimeColumns.js +44 -3
- package/lib/components/entity-avatar/EntityAvatar.d.ts +73 -0
- package/lib/components/entity-avatar/EntityAvatar.js +63 -0
- package/lib/components/entity-avatar/index.d.ts +1 -0
- package/lib/components/entity-avatar/index.js +5 -0
- package/lib/components/hover-card/HoverCard.d.ts +63 -0
- package/lib/components/hover-card/HoverCard.js +55 -0
- package/lib/components/hover-card/HoverCardAnchor.d.ts +33 -0
- package/lib/components/hover-card/HoverCardAnchor.js +26 -0
- package/lib/components/hover-card/HoverCardDetails.d.ts +36 -0
- package/lib/components/hover-card/HoverCardDetails.js +65 -0
- package/lib/components/hover-card/HoverCardLayer.d.ts +34 -0
- package/lib/components/hover-card/HoverCardLayer.js +57 -0
- package/lib/components/hover-card/index.d.ts +12 -0
- package/lib/components/hover-card/index.js +16 -0
- package/lib/components/hover-card/useHoverCard.d.ts +57 -0
- package/lib/components/hover-card/useHoverCard.js +200 -0
- package/lib/components/hover-card/usePrefersReducedMotion.d.ts +10 -0
- package/lib/components/hover-card/usePrefersReducedMotion.js +28 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +2 -0
- package/lib/components/logo/DatalayerLogo.js +18 -1
- package/lib/components/toolbar/ToolbarButton.d.ts +2 -2
- package/lib/components/toolbar/ToolbarButton.js +23 -21
- package/lib/components/toolbar/ToolbarDropdown.js +3 -1
- package/lib/theme/colors/index.d.ts +1 -0
- package/lib/theme/colors/index.js +3 -0
- package/lib/theme/colors/vscodeColors.d.ts +280 -0
- package/lib/theme/colors/vscodeColors.js +129 -0
- package/lib/theme/css/createThemeCSSVars.d.ts +18 -1
- package/lib/theme/css/createThemeCSSVars.js +17 -1
- package/lib/theme/css/primerBaseVars.js +59 -0
- package/lib/theme/css/primerComponentsCss.d.ts +47 -0
- package/lib/theme/css/primerComponentsCss.js +72 -0
- package/lib/theme/index.d.ts +2 -0
- package/lib/theme/index.js +2 -0
- package/lib/theme/palettes/ColorPalette.js +41 -1
- package/lib/theme/themeRegistry.js +2 -0
- package/lib/theme/themeTokens.d.ts +1 -1
- package/lib/theme/themeTokens.js +61 -1
- package/lib/theme/themes/loopThemeStyles.d.ts +4 -31
- package/lib/theme/themes/loopThemeStyles.js +17 -44
- package/lib/theme/themes/vscodeEditorsCss.d.ts +12 -0
- package/lib/theme/themes/vscodeEditorsCss.js +239 -0
- package/lib/theme/themes/vscodeTheme.d.ts +1085 -0
- package/lib/theme/themes/vscodeTheme.js +17 -0
- package/lib/theme/themes/vscodeThemeStyles.d.ts +7 -0
- package/lib/theme/themes/vscodeThemeStyles.js +246 -0
- package/package.json +3 -2
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2026 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The VS Code theme's face for the editors a page may hold: JupyterLab's
|
|
7
|
+
* variables, a notebook's cells and CodeMirror, and Excalidraw's, each read
|
|
8
|
+
* from the editor's own `--vscode-*` colours. Part of the theme's stylesheet
|
|
9
|
+
* (`ThemeStyles.css`), scoped to the theme's element: a page without a
|
|
10
|
+
* notebook pays nothing but a few unused rules.
|
|
11
|
+
*
|
|
12
|
+
* The `!important`s stand against JupyterLab's and CodeMirror's own
|
|
13
|
+
* stylesheets, which set these on their elements.
|
|
14
|
+
*/
|
|
15
|
+
/** The JupyterLab, CodeMirror and Excalidraw rules of the VS Code theme. */
|
|
16
|
+
export const vscodeEditorsCss = `
|
|
17
|
+
:scope {
|
|
18
|
+
/* JupyterLab's variables, each the editor's colour */
|
|
19
|
+
--jp-layout-color0: var(--vscode-editor-background);
|
|
20
|
+
--jp-layout-color1: var(--vscode-sideBar-background);
|
|
21
|
+
--jp-layout-color2: var(--vscode-editorWidget-background);
|
|
22
|
+
--jp-layout-color3: var(--vscode-input-background);
|
|
23
|
+
--jp-layout-color4: var(--vscode-dropdown-background);
|
|
24
|
+
|
|
25
|
+
--jp-ui-font-color0: var(--vscode-editor-foreground);
|
|
26
|
+
--jp-ui-font-color1: var(--vscode-foreground);
|
|
27
|
+
--jp-ui-font-color2: var(--vscode-descriptionForeground);
|
|
28
|
+
--jp-ui-font-color3: var(--vscode-disabledForeground);
|
|
29
|
+
|
|
30
|
+
--jp-border-color0: var(--vscode-panel-border);
|
|
31
|
+
--jp-border-color1: var(--vscode-editorWidget-border);
|
|
32
|
+
--jp-border-color2: var(--vscode-input-border);
|
|
33
|
+
|
|
34
|
+
--jp-brand-color1: var(--vscode-button-background);
|
|
35
|
+
--jp-accent-color1: var(--vscode-focusBorder);
|
|
36
|
+
|
|
37
|
+
--jp-error-color1: var(--vscode-errorForeground);
|
|
38
|
+
--jp-warn-color1: var(--vscode-editorWarning-foreground);
|
|
39
|
+
--jp-success-color1: var(--vscode-terminal-ansiGreen);
|
|
40
|
+
--jp-info-color1: var(--vscode-editorInfo-foreground);
|
|
41
|
+
|
|
42
|
+
/* The editor */
|
|
43
|
+
--jp-editor-background: var(--vscode-editor-background);
|
|
44
|
+
--jp-editor-foreground: var(--vscode-editor-foreground);
|
|
45
|
+
--jp-editor-border-color: var(--vscode-editorWidget-border);
|
|
46
|
+
--jp-editor-selected-background: var(--vscode-editor-selectionBackground);
|
|
47
|
+
|
|
48
|
+
/* A cell */
|
|
49
|
+
--jp-cell-editor-background: var(--vscode-notebook-cellEditorBackground, var(--vscode-editor-background));
|
|
50
|
+
--jp-cell-editor-border-color: var(--vscode-notebook-cellBorderColor, var(--vscode-editorWidget-border));
|
|
51
|
+
|
|
52
|
+
/* Input and output */
|
|
53
|
+
--jp-input-background: var(--vscode-input-background);
|
|
54
|
+
--jp-input-foreground: var(--vscode-input-foreground);
|
|
55
|
+
--jp-input-border: var(--vscode-input-border);
|
|
56
|
+
|
|
57
|
+
/* Lists */
|
|
58
|
+
--jp-list-hover-background: var(--vscode-list-hoverBackground);
|
|
59
|
+
--jp-list-selected-background: var(--vscode-list-activeSelectionBackground);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* No black gap: the notebook and its frame wear the editor's background */
|
|
63
|
+
:scope #notebook-editor,
|
|
64
|
+
:scope .dla-Jupyter-Notebook,
|
|
65
|
+
:scope .jp-Notebook {
|
|
66
|
+
background-color: var(--vscode-editor-background) !important;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* CodeMirror's editor */
|
|
70
|
+
:scope .cm-editor,
|
|
71
|
+
:scope .cm-content {
|
|
72
|
+
background-color: var(--vscode-notebook-cellEditorBackground, var(--vscode-editor-background)) !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* A notebook's cells */
|
|
76
|
+
:scope .jp-Cell {
|
|
77
|
+
background-color: var(--vscode-editor-background) !important;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:scope .jp-InputArea-editor {
|
|
81
|
+
background-color: var(--vscode-notebook-cellEditorBackground, var(--vscode-editor-background)) !important;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* The toolbar */
|
|
85
|
+
:scope .jp-Toolbar {
|
|
86
|
+
background-color: var(--vscode-editorWidget-background) !important;
|
|
87
|
+
border-bottom: 1px solid var(--vscode-panel-border) !important;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* The sidebar */
|
|
91
|
+
:scope .jp-SideBar {
|
|
92
|
+
background-color: var(--vscode-sideBar-background) !important;
|
|
93
|
+
border-color: var(--vscode-panel-border) !important;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Every widget inside a cell, the cell sidebar's included */
|
|
97
|
+
:scope .jp-Cell .lm-Widget {
|
|
98
|
+
background-color: var(--vscode-editor-background) !important;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:scope .dla-CellSidebar-Container {
|
|
102
|
+
background-color: var(--vscode-editor-background) !important;
|
|
103
|
+
color: var(--vscode-editor-foreground) !important;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:scope .dla-CellSidebar-Container * {
|
|
107
|
+
background-color: inherit !important;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:scope .dla-CellSidebar-Container button {
|
|
111
|
+
background-color: transparent !important;
|
|
112
|
+
color: var(--vscode-editor-foreground) !important;
|
|
113
|
+
border: none !important;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:scope .dla-CellSidebar-Container button:hover {
|
|
117
|
+
background-color: var(--vscode-list-hoverBackground) !important;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* CodeMirror's selection: its layer, and ::selection on every token */
|
|
121
|
+
:scope .cm-selectionBackground,
|
|
122
|
+
:scope .cm-editor .cm-selectionBackground,
|
|
123
|
+
:scope .cm-editor > .cm-scroller > .cm-selectionLayer .cm-selectionBackground,
|
|
124
|
+
:scope .cm-editor.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground {
|
|
125
|
+
background: var(--vscode-editor-selectionBackground) !important;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:scope .cm-editor .cm-line ::selection,
|
|
129
|
+
:scope .cm-editor .cm-line > *::selection,
|
|
130
|
+
:scope .cm-editor .cm-line span::selection,
|
|
131
|
+
:scope .cm-editor .cm-content ::selection,
|
|
132
|
+
:scope .cm-editor .cm-activeLine ::selection,
|
|
133
|
+
:scope .cm-editor *::selection {
|
|
134
|
+
background: var(--vscode-editor-selectionBackground) !important;
|
|
135
|
+
background-color: var(--vscode-editor-selectionBackground) !important;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Excalidraw, dark */
|
|
139
|
+
:scope .ExcalidrawModal__row .excalidraw.theme--dark {
|
|
140
|
+
--color-primary: var(--vscode-button-background, #0e639c);
|
|
141
|
+
--color-primary-darker: var(--vscode-button-hoverBackground, #1177bb);
|
|
142
|
+
--color-primary-darkest: var(--vscode-button-hoverBackground, #0a5285);
|
|
143
|
+
--color-primary-hover: var(--vscode-button-hoverBackground, #1177bb);
|
|
144
|
+
--color-primary-light: var(--vscode-list-activeSelectionBackground, #094771);
|
|
145
|
+
--color-surface-primary: var(--vscode-editor-background, #1e1e1e);
|
|
146
|
+
--default-bg-color: var(--vscode-editor-background, #1e1e1e);
|
|
147
|
+
--color-on-surface: var(--vscode-editor-foreground, #d4d4d4);
|
|
148
|
+
--text-primary-color: var(--vscode-editor-foreground, #d4d4d4);
|
|
149
|
+
--popup-text-color: var(--vscode-editor-foreground, #d4d4d4);
|
|
150
|
+
--color-surface-primary-container: var(--vscode-list-activeSelectionBackground, #094771);
|
|
151
|
+
--color-on-primary-container: var(--vscode-list-activeSelectionForeground, #ffffff);
|
|
152
|
+
--color-brand-hover: var(--vscode-button-hoverBackground, #1177bb);
|
|
153
|
+
--color-brand-active: var(--vscode-focusBorder, #007fd4);
|
|
154
|
+
--color-icon-white: #ffffff;
|
|
155
|
+
--island-bg-color: var(--vscode-editorWidget-background, #252526);
|
|
156
|
+
--sidebar-bg-color: var(--vscode-sideBar-background, #252526);
|
|
157
|
+
--popup-bg-color: var(--vscode-editorWidget-background, #252526);
|
|
158
|
+
--popup-secondary-bg-color: var(--vscode-dropdown-background, #3c3c3c);
|
|
159
|
+
--color-surface-high: var(--vscode-editorWidget-background, #2e2d39);
|
|
160
|
+
--color-surface-mid: var(--vscode-sideBar-background, #252526);
|
|
161
|
+
--color-surface-low: var(--vscode-editor-background, #1e1e1e);
|
|
162
|
+
--color-surface-lowest: var(--vscode-editor-background, #1e1e1e);
|
|
163
|
+
--button-gray-1: var(--vscode-button-secondaryBackground, #3a3d41);
|
|
164
|
+
--button-gray-2: var(--vscode-button-secondaryHoverBackground, #45494e);
|
|
165
|
+
--button-gray-3: var(--vscode-button-secondaryHoverBackground, #45494e);
|
|
166
|
+
--button-hover-bg: var(--vscode-list-hoverBackground, #2a2d2e);
|
|
167
|
+
--button-active-bg: var(--vscode-list-activeSelectionBackground, #094771);
|
|
168
|
+
--button-color: var(--vscode-button-foreground, #ffffff);
|
|
169
|
+
--button-hover-color: var(--vscode-button-foreground, #ffffff);
|
|
170
|
+
--button-bg: var(--vscode-button-background, #0e639c);
|
|
171
|
+
--input-bg-color: var(--vscode-input-background, #3c3c3c);
|
|
172
|
+
--input-border-color: var(--vscode-input-border, #3c3c3c);
|
|
173
|
+
--input-hover-bg-color: var(--vscode-list-hoverBackground, #2a2d2e);
|
|
174
|
+
--default-border-color: var(--vscode-panel-border, #3c3c3c);
|
|
175
|
+
--color-border-outline: var(--vscode-editorWidget-border, #454545);
|
|
176
|
+
--color-border-outline-variant: var(--vscode-panel-border, #3c3c3c);
|
|
177
|
+
--sidebar-border-color: var(--vscode-panel-border, #3c3c3c);
|
|
178
|
+
--dialog-border-color: var(--vscode-editorWidget-border, #454545);
|
|
179
|
+
--focus-highlight-color: var(--vscode-focusBorder, #007fd4);
|
|
180
|
+
--select-highlight-color: var(--vscode-editor-selectionBackground, #264f78);
|
|
181
|
+
--color-selection: var(--vscode-editor-selectionBackground, #264f78);
|
|
182
|
+
--button-active-border: var(--vscode-focusBorder, #007fd4);
|
|
183
|
+
--link-color: var(--vscode-textLink-foreground, #3794ff);
|
|
184
|
+
--scrollbar-thumb: var(--vscode-scrollbarSlider-background, rgba(121, 121, 121, 0.4));
|
|
185
|
+
--scrollbar-thumb-hover: var(--vscode-scrollbarSlider-hoverBackground, rgba(100, 100, 100, 0.7));
|
|
186
|
+
--icon-fill-color: var(--vscode-icon-foreground, #c5c5c5);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Excalidraw, light */
|
|
190
|
+
:scope .ExcalidrawModal__row .excalidraw.theme--light {
|
|
191
|
+
--color-primary: var(--vscode-button-background, #007acc);
|
|
192
|
+
--color-primary-darker: var(--vscode-button-hoverBackground, #005a9e);
|
|
193
|
+
--color-primary-darkest: var(--vscode-button-hoverBackground, #004578);
|
|
194
|
+
--color-primary-hover: var(--vscode-button-hoverBackground, #005a9e);
|
|
195
|
+
--color-primary-light: var(--vscode-list-activeSelectionBackground, #0060c0);
|
|
196
|
+
--color-surface-primary: var(--vscode-editor-background, #ffffff);
|
|
197
|
+
--default-bg-color: var(--vscode-editor-background, #ffffff);
|
|
198
|
+
--color-on-surface: var(--vscode-editor-foreground, #000000);
|
|
199
|
+
--text-primary-color: var(--vscode-editor-foreground, #000000);
|
|
200
|
+
--popup-text-color: var(--vscode-editor-foreground, #000000);
|
|
201
|
+
--color-surface-primary-container: var(--vscode-list-activeSelectionBackground, #0060c0);
|
|
202
|
+
--color-on-primary-container: var(--vscode-list-activeSelectionForeground, #ffffff);
|
|
203
|
+
--color-brand-hover: var(--vscode-button-hoverBackground, #005a9e);
|
|
204
|
+
--color-brand-active: var(--vscode-focusBorder, #0090f1);
|
|
205
|
+
--color-icon-white: #ffffff;
|
|
206
|
+
--island-bg-color: var(--vscode-editorWidget-background, #f3f3f3);
|
|
207
|
+
--sidebar-bg-color: var(--vscode-sideBar-background, #f3f3f3);
|
|
208
|
+
--popup-bg-color: var(--vscode-editorWidget-background, #f3f3f3);
|
|
209
|
+
--popup-secondary-bg-color: var(--vscode-dropdown-background, #ffffff);
|
|
210
|
+
--color-surface-high: var(--vscode-editorWidget-background, #f1f0ff);
|
|
211
|
+
--color-surface-mid: var(--vscode-sideBar-background, #f3f3f3);
|
|
212
|
+
--color-surface-low: var(--vscode-editor-background, #ffffff);
|
|
213
|
+
--color-surface-lowest: var(--vscode-editor-background, #ffffff);
|
|
214
|
+
--button-gray-1: var(--vscode-button-secondaryBackground, #e1e1e1);
|
|
215
|
+
--button-gray-2: var(--vscode-button-secondaryHoverBackground, #d0d0d0);
|
|
216
|
+
--button-gray-3: var(--vscode-button-secondaryHoverBackground, #d0d0d0);
|
|
217
|
+
--button-hover-bg: var(--vscode-list-hoverBackground, #f0f0f0);
|
|
218
|
+
--button-active-bg: var(--vscode-list-activeSelectionBackground, #0060c0);
|
|
219
|
+
--button-color: var(--vscode-button-foreground, #ffffff);
|
|
220
|
+
--button-hover-color: var(--vscode-button-foreground, #ffffff);
|
|
221
|
+
--button-bg: var(--vscode-button-background, #007acc);
|
|
222
|
+
--input-bg-color: var(--vscode-input-background, #ffffff);
|
|
223
|
+
--input-border-color: var(--vscode-input-border, #cecece);
|
|
224
|
+
--input-hover-bg-color: var(--vscode-list-hoverBackground, #f0f0f0);
|
|
225
|
+
--default-border-color: var(--vscode-panel-border, #e0e0e0);
|
|
226
|
+
--color-border-outline: var(--vscode-editorWidget-border, #c8c8c8);
|
|
227
|
+
--color-border-outline-variant: var(--vscode-panel-border, #e0e0e0);
|
|
228
|
+
--sidebar-border-color: var(--vscode-panel-border, #e0e0e0);
|
|
229
|
+
--dialog-border-color: var(--vscode-editorWidget-border, #c8c8c8);
|
|
230
|
+
--focus-highlight-color: var(--vscode-focusBorder, #0090f1);
|
|
231
|
+
--select-highlight-color: var(--vscode-editor-selectionBackground, #add6ff);
|
|
232
|
+
--color-selection: var(--vscode-editor-selectionBackground, #add6ff);
|
|
233
|
+
--button-active-border: var(--vscode-focusBorder, #0090f1);
|
|
234
|
+
--link-color: var(--vscode-textLink-foreground, #006ab1);
|
|
235
|
+
--scrollbar-thumb: var(--vscode-scrollbarSlider-background, rgba(100, 100, 100, 0.4));
|
|
236
|
+
--scrollbar-thumb-hover: var(--vscode-scrollbarSlider-hoverBackground, rgba(100, 100, 100, 0.7));
|
|
237
|
+
--icon-fill-color: var(--vscode-icon-foreground, #424242);
|
|
238
|
+
}
|
|
239
|
+
`;
|