@datalayer/primer-addons 1.0.57 → 1.0.58
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 +33 -0
- package/lib/components/appearance/AppearanceControls.d.ts +3 -3
- package/lib/components/appearance/AppearanceControls.js +8 -4
- package/lib/components/appearance/AppearanceControls.stories.d.ts +1 -1
- package/lib/components/appearance/AppearanceControls.stories.js +1 -1
- package/lib/components/appearance/AppearanceMenu.d.ts +1 -1
- package/lib/components/buttons/Buttons.stories.d.ts +1 -0
- package/lib/components/buttons/Buttons.stories.js +10 -1
- package/lib/components/buttons/SplitButton.d.ts +82 -0
- package/lib/components/buttons/SplitButton.js +63 -0
- package/lib/components/buttons/index.d.ts +1 -0
- package/lib/components/buttons/index.js +1 -0
- package/lib/components/dialog/Dialog.d.ts +62 -0
- package/lib/components/dialog/Dialog.js +117 -0
- package/lib/components/dialog/index.d.ts +1 -0
- package/lib/components/dialog/index.js +5 -0
- package/lib/components/emoji/faceEmojis.js +14 -0
- package/lib/components/emoji/fluent/loaders.js +13 -0
- package/lib/components/emoji/fluent/svg/1f39e.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f39e.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3c3.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3c3.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3d3.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3d3.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3e8.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3e8.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3ea.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3ea.js +9 -0
- package/lib/components/emoji/fluent/svg/1f50f.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f50f.js +9 -0
- package/lib/components/emoji/fluent/svg/1f510.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f510.js +9 -0
- package/lib/components/emoji/fluent/svg/1f516.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f516.js +9 -0
- package/lib/components/emoji/fluent/svg/1f526.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f526.js +9 -0
- package/lib/components/emoji/fluent/svg/1f6ce.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6ce.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9fa.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9fa.js +9 -0
- package/lib/components/emoji/fluent/svg/21a9.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/21a9.js +9 -0
- package/lib/components/emoji/fluent/svg/2708.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2708.js +9 -0
- package/lib/components/hover-card/HoverCardDetails.d.ts +7 -4
- package/lib/components/hover-card/HoverCardDetails.js +65 -41
- package/lib/components/hover-card/HoverCardLayer.d.ts +6 -5
- package/lib/components/hover-card/HoverCardLayer.js +21 -16
- package/lib/components/hover-card/useThemedPortalTarget.d.ts +20 -0
- package/lib/components/hover-card/useThemedPortalTarget.js +13 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/sliding-panel/SlidingPanel.js +7 -2
- package/lib/theme/themes/metalThemeStyles.js +3 -0
- package/package.json +1 -1
package/lib/components/index.js
CHANGED
|
@@ -20,6 +20,7 @@ export * from "./color";
|
|
|
20
20
|
export * from "./color-picker";
|
|
21
21
|
export * from "./content-loader/ContentLoader";
|
|
22
22
|
export * from "./date-picker";
|
|
23
|
+
export * from "./dialog";
|
|
23
24
|
export * from "./closeable-flash/CloseableFlash";
|
|
24
25
|
export * from "./icons/CircleIcon";
|
|
25
26
|
export * from "./side-overlay/SideOverlay";
|
|
@@ -4,9 +4,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
* Distributed under the terms of the Modified BSD License.
|
|
5
5
|
*/
|
|
6
6
|
import { useEffect, useMemo, useState } from 'react';
|
|
7
|
-
import { IconButton } from '@primer/react';
|
|
7
|
+
import { IconButton, useTheme } from '@primer/react';
|
|
8
8
|
import { XIcon } from '@primer/octicons-react';
|
|
9
9
|
import { Box } from '../box/Box';
|
|
10
|
+
import { panelBackground } from '../hover-card/HoverCardDetails';
|
|
10
11
|
const variantStyles = {
|
|
11
12
|
default: {
|
|
12
13
|
bg: 'var(--bgColor-default, #ffffff)',
|
|
@@ -164,6 +165,7 @@ export const SlidingPanel = ({ isOpen, message, details, onDismiss, position = '
|
|
|
164
165
|
return null;
|
|
165
166
|
}
|
|
166
167
|
const style = variantStyles[variant];
|
|
168
|
+
const { theme } = useTheme();
|
|
167
169
|
const alerting = variant === 'error' || variant === 'danger';
|
|
168
170
|
// Over the viewport, or over its own region of the page.
|
|
169
171
|
const across = contained ? '100%' : '100vw';
|
|
@@ -216,7 +218,10 @@ export const SlidingPanel = ({ isOpen, message, details, onDismiss, position = '
|
|
|
216
218
|
borderRight: edgeBorder.borderRight,
|
|
217
219
|
borderBottom: edgeBorder.borderBottom,
|
|
218
220
|
borderLeft: edgeBorder.borderLeft,
|
|
219
|
-
|
|
221
|
+
// Opaque in every theme: the variant's tint over the panel background the hover card uses
|
|
222
|
+
// (the canvas over its overlay colour), since a theme's muted tints and even its default
|
|
223
|
+
// canvas (metal's, in dark mode) are translucent.
|
|
224
|
+
background: `linear-gradient(${style.bg}, ${style.bg}), ${panelBackground(theme)}`,
|
|
220
225
|
color: style.fg,
|
|
221
226
|
textAlign: 'left',
|
|
222
227
|
px: 4,
|
|
@@ -225,6 +225,9 @@ const metalPainted = {
|
|
|
225
225
|
'--bgColor-accent-muted': 'rgba(255, 255, 255, 0.09)',
|
|
226
226
|
'--borderColor-accent-muted': 'rgba(255, 255, 255, 0.22)',
|
|
227
227
|
'--overlay-bgColor': '#25343F',
|
|
228
|
+
// A field's border reads on the glass: the hairline (18% white) all but vanished around a prompt.
|
|
229
|
+
'--control-borderColor-rest': 'rgba(255, 255, 255, 0.34)',
|
|
230
|
+
'--control-borderColor-emphasis': 'rgba(255, 255, 255, 0.5)',
|
|
228
231
|
'--metal-primary-image': 'none',
|
|
229
232
|
'--metal-primary-shadow': 'none',
|
|
230
233
|
'--fgColor-default': '#FFFFFF',
|