@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/README.md
CHANGED
|
@@ -39,6 +39,7 @@ This project has been [shared in a discussion](https://github.com/primer/react/d
|
|
|
39
39
|
- [x] Slider
|
|
40
40
|
- [x] Sliding Panel
|
|
41
41
|
- [x] Sparklines
|
|
42
|
+
- [x] Split Button (a main part that runs the current choice, a caret that opens the menu of choices)
|
|
42
43
|
- [x] Status Labels and Visibility Label
|
|
43
44
|
- [x] Timeline
|
|
44
45
|
- [x] Toast Panel and its queue (`toastQueue`)
|
|
@@ -98,6 +99,38 @@ toolbar, its parent and every item (an item that draws nothing takes no room).
|
|
|
98
99
|
(`flex: 1 1 0; min-width: 0`): that box's width is the room it measures.
|
|
99
100
|
- The gallery's *Toolbar* page shows an editor strip and a header row narrowing.
|
|
100
101
|
|
|
102
|
+
### Split Button
|
|
103
|
+
|
|
104
|
+
`SplitButton` is a main part that runs the current choice and a caret beside
|
|
105
|
+
it that opens the menu of choices (Primer's `ButtonGroup`, `Button`,
|
|
106
|
+
`IconButton` and `ActionMenu`, so it wears the theme, light and dark). A
|
|
107
|
+
choice picked in the menu becomes the current one, and the main part says it
|
|
108
|
+
and runs it (`onRun`); `onChange` hears the pick, `value` holds the current
|
|
109
|
+
choice in the host (`defaultValue` otherwise). An option marked `action` runs
|
|
110
|
+
at once when picked (`onSelect`) and leaves the current choice alone โ a
|
|
111
|
+
*Clear*, a colour, `selected` marking the one in use; `group` puts options in a
|
|
112
|
+
titled section. `pressed` makes the main part a toggle (`aria-pressed`): a tool
|
|
113
|
+
switched on and off.
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
<SplitButton
|
|
117
|
+
aria-label="Copy"
|
|
118
|
+
menuLabel="Copy options"
|
|
119
|
+
options={[
|
|
120
|
+
{ value: 'text', label: 'Copy', icon: CopyIcon },
|
|
121
|
+
{ value: 'link', label: 'Copy link', icon: LinkIcon },
|
|
122
|
+
{ value: 'clear', label: 'Clear', action: true, variant: 'danger' },
|
|
123
|
+
]}
|
|
124
|
+
onRun={copy}
|
|
125
|
+
onSelect={clear}
|
|
126
|
+
/>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The keyboard is Primer's: Enter or Space on either part, the arrows in the
|
|
130
|
+
menu, Escape closes it and puts the focus back on the caret, which says it
|
|
131
|
+
opens a menu (`aria-haspopup`) and whether it is open (`aria-expanded`). The
|
|
132
|
+
gallery's *Split Button* page (`/split-button`) shows it.
|
|
133
|
+
|
|
101
134
|
## Reactor Plugins
|
|
102
135
|
|
|
103
136
|
Three plugins for hosts built on [`@datalayer/reactor`](https://github.com/datalayer/reactor), imported by path so a page without a reactor never pulls it in:
|
|
@@ -4,7 +4,7 @@ import { type ThemeState } from "../../theme/useThemeStore";
|
|
|
4
4
|
import { type ColorMode, type ThemeVariant } from "../../theme";
|
|
5
5
|
/**
|
|
6
6
|
* How the controls are laid out:
|
|
7
|
-
* - `stacked` โ the light / dark /
|
|
7
|
+
* - `stacked` โ the light / dark / system switch centred above the theme
|
|
8
8
|
* swatches (lines of `themesPerLine`), optionally the chosen theme's
|
|
9
9
|
* preview under them: the appearance menu's panel.
|
|
10
10
|
* - `inline` โ one row: a small round button per theme, then the switch: a
|
|
@@ -37,12 +37,12 @@ export interface AppearanceControlsProps {
|
|
|
37
37
|
onThemeChange?: (theme: ThemeVariant) => void;
|
|
38
38
|
/** `stacked` by default; see {@link AppearanceControlsLayout}. */
|
|
39
39
|
layout?: AppearanceControlsLayout;
|
|
40
|
-
/** Show the light / dark /
|
|
40
|
+
/** Show the light / dark / system switch. Default: shown. */
|
|
41
41
|
showColorMode?: boolean;
|
|
42
42
|
/**
|
|
43
43
|
* Show the theme chooser (the swatches, and with `showThemePreviews` the
|
|
44
44
|
* chosen theme's preview). Default: shown; `false` for a site that wears
|
|
45
|
-
* one theme, where the controls are the light / dark /
|
|
45
|
+
* one theme, where the controls are the light / dark / system switch alone.
|
|
46
46
|
*/
|
|
47
47
|
showThemeChooser?: boolean;
|
|
48
48
|
/** Stacked, with the chooser: the chosen theme's name, description and preview under its swatches. Default: swatches only. */
|
|
@@ -5,6 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
5
5
|
*/
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { Button, IconButton, SegmentedControl, Tooltip } from "@primer/react";
|
|
8
|
+
import { FeatureFlags } from "@primer/react/experimental";
|
|
8
9
|
import { CircleIcon as SwatchIcon, DeviceDesktopIcon, MoonIcon, SunIcon, } from "@primer/octicons-react";
|
|
9
10
|
import { Box } from "../box/Box";
|
|
10
11
|
import { useThemeStore } from "../../theme/useThemeStore";
|
|
@@ -60,10 +61,13 @@ export function AppearanceControls({ withStore = true, useStore = useThemeStore,
|
|
|
60
61
|
};
|
|
61
62
|
const [isPreviewOpen, setIsPreviewOpen] = useState(false);
|
|
62
63
|
const selectedTheme = themeConfigs[themeVariant];
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
// Each choice wears Primer's label tooltip (Tooltip v2), which names the
|
|
65
|
+
// button too: "Light", "Dark", "System". Primer keeps the segmented
|
|
66
|
+
// control's tooltips behind this flag.
|
|
67
|
+
const colorModeSwitch = (_jsx(FeatureFlags, { flags: { primer_react_segmented_control_tooltip: true }, children: _jsxs(SegmentedControl, { "aria-label": "Color mode", size: "small", onChange: (index) => {
|
|
68
|
+
const modes = ["light", "dark", "auto"];
|
|
69
|
+
onColorModeChange(modes[index]);
|
|
70
|
+
}, children: [_jsx(SegmentedControl.IconButton, { selected: colorMode === "light", icon: SunIcon, "aria-label": "Light", tooltipDirection: "s" }), _jsx(SegmentedControl.IconButton, { selected: colorMode === "dark", icon: MoonIcon, "aria-label": "Dark", tooltipDirection: "s" }), _jsx(SegmentedControl.IconButton, { selected: colorMode === "auto", icon: DeviceDesktopIcon, "aria-label": "System", tooltipDirection: "s" })] }) }));
|
|
67
71
|
if (layout === "inline") {
|
|
68
72
|
// One row, as a page header carries it: a round button per theme, then the switch.
|
|
69
73
|
return (_jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 3 }, children: [showThemeChooser ? (_jsx(Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: themeVariants.map((variant) => {
|
|
@@ -40,7 +40,7 @@ type Story = StoryObj<typeof meta>;
|
|
|
40
40
|
export declare const Default: Story;
|
|
41
41
|
/** With the chosen theme's name, description and a live preview under the swatches. */
|
|
42
42
|
export declare const WithThemePreviews: Story;
|
|
43
|
-
/** The light / dark /
|
|
43
|
+
/** The light / dark / system switch alone. */
|
|
44
44
|
export declare const ColorModeOnly: Story;
|
|
45
45
|
/** The theme chooser alone. */
|
|
46
46
|
export declare const ThemeChooserOnly: Story;
|
|
@@ -70,7 +70,7 @@ export const WithThemePreviews = {
|
|
|
70
70
|
},
|
|
71
71
|
render: (args) => _jsx(ThemedAppearanceControls, { ...args }),
|
|
72
72
|
};
|
|
73
|
-
/** The light / dark /
|
|
73
|
+
/** The light / dark / system switch alone. */
|
|
74
74
|
export const ColorModeOnly = {
|
|
75
75
|
args: {
|
|
76
76
|
showThemeChooser: false,
|
|
@@ -19,7 +19,7 @@ export interface AppearanceMenuProps {
|
|
|
19
19
|
/**
|
|
20
20
|
* Whether the overlay offers the themes (their swatches, and with
|
|
21
21
|
* `showThemePreviews` the chosen one's preview). Default: shown; `false`
|
|
22
|
-
* for a site that wears one theme โ the overlay is the light / dark /
|
|
22
|
+
* for a site that wears one theme โ the overlay is the light / dark / system
|
|
23
23
|
* switch alone.
|
|
24
24
|
*/
|
|
25
25
|
showThemeChooser?: boolean;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { SyncIcon } from '@primer/octicons-react';
|
|
2
|
+
import { CopyIcon, LinkIcon, SyncIcon } from '@primer/octicons-react';
|
|
3
3
|
import { Box } from '../box/Box';
|
|
4
4
|
import { CopyToClipboardButton } from './CopyToClipboardButton';
|
|
5
5
|
import { DownloadCSVButton } from './DownloadCSVButton';
|
|
6
6
|
import { DownloadJsonButton } from './DownloadJsonButton';
|
|
7
7
|
import { LongActionButton } from './LongActionButton';
|
|
8
|
+
import { SplitButton } from './SplitButton';
|
|
8
9
|
import { UploadButton, UploadIconButton } from './UploadButton';
|
|
9
10
|
const meta = {
|
|
10
11
|
title: 'Components/Buttons',
|
|
@@ -22,3 +23,11 @@ export const AllButtons = {
|
|
|
22
23
|
args: { value: 'copied' },
|
|
23
24
|
render: args => (_jsxs(Box, { p: 3, bg: "canvas.default", display: "flex", gap: 3, alignItems: "center", children: [_jsx(CopyToClipboardButton, { ...args }), _jsx(LongActionButton, { label: "Refresh", icon: SyncIcon, onClick: () => wait(2000) }), _jsx(UploadButton, { label: "Upload", upload: () => wait(100) }), _jsx(UploadIconButton, { label: "Upload a file", upload: () => wait(100) }), _jsx(DownloadCSVButton, { data: [{ name: 'alpha', runs: 12 }], fileName: "runs" }), _jsx(DownloadJsonButton, { data: [{ name: 'alpha', runs: 12 }], fileName: "runs" })] })),
|
|
24
25
|
};
|
|
26
|
+
export const Split = {
|
|
27
|
+
args: { value: 'copied' },
|
|
28
|
+
render: () => (_jsx(Box, { p: 3, bg: "canvas.default", children: _jsx(SplitButton, { "aria-label": "Copy", menuLabel: "Copy options", options: [
|
|
29
|
+
{ value: 'text', label: 'Copy', icon: CopyIcon },
|
|
30
|
+
{ value: 'link', label: 'Copy link', icon: LinkIcon },
|
|
31
|
+
{ value: 'clear', label: 'Clear', action: true, variant: 'danger' },
|
|
32
|
+
] }) })),
|
|
33
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A split button: a main part that runs the current choice, and a caret
|
|
3
|
+
* beside it that opens the menu of choices.
|
|
4
|
+
*
|
|
5
|
+
* Picking a choice in the menu makes it the current one โ the main part then
|
|
6
|
+
* says it and runs it. An option marked `action` runs at once when picked
|
|
7
|
+
* (`onSelect`) and leaves the current choice as it was: what a menu offers
|
|
8
|
+
* beside the choices, a *Clear* or a colour. The main part may be a toggle
|
|
9
|
+
* (`pressed`): pressing it switches the current choice on and off.
|
|
10
|
+
*
|
|
11
|
+
* Primer's `ButtonGroup`, `Button`, `IconButton` and `ActionMenu`, so it wears
|
|
12
|
+
* the theme in force, light and dark, and the keyboard is theirs: Enter or
|
|
13
|
+
* Space on either part, the arrows in the menu, Escape closes it and gives the
|
|
14
|
+
* caret the focus back. The caret says it opens a menu (`aria-haspopup`) and
|
|
15
|
+
* whether it is open (`aria-expanded`).
|
|
16
|
+
*
|
|
17
|
+
* @module components/buttons/SplitButton
|
|
18
|
+
*/
|
|
19
|
+
import type { ElementType, ReactNode } from 'react';
|
|
20
|
+
/** One entry of a split button's menu. */
|
|
21
|
+
export type SplitButtonOption<T extends string = string> = {
|
|
22
|
+
/** What it is, handed back to `onChange`, `onRun` and `onSelect`. */
|
|
23
|
+
value: T;
|
|
24
|
+
/** Its name, in the menu and on the main part once it is the current choice. */
|
|
25
|
+
label: string;
|
|
26
|
+
/** An octicon, beside its name in the menu and on the main part. */
|
|
27
|
+
icon?: ElementType;
|
|
28
|
+
/** Drawn before its name in the menu instead of `icon`: a colour swatch, say. */
|
|
29
|
+
leadingVisual?: ReactNode;
|
|
30
|
+
/** A line under its name in the menu. */
|
|
31
|
+
description?: string;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
/** `danger` for what cannot be undone. */
|
|
34
|
+
variant?: 'default' | 'danger';
|
|
35
|
+
/**
|
|
36
|
+
* Runs at once when picked (`onSelect`) and never becomes the current
|
|
37
|
+
* choice: a *Clear*, a colour.
|
|
38
|
+
*/
|
|
39
|
+
action?: boolean;
|
|
40
|
+
/** An action drawn as chosen (a colour in use); the choices are by `value`. */
|
|
41
|
+
selected?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The menu's section it sits in, its title shown above it; sections keep
|
|
44
|
+
* the order they first appear in, a line between each. Without one, the
|
|
45
|
+
* choices share a section and the actions another.
|
|
46
|
+
*/
|
|
47
|
+
group?: string;
|
|
48
|
+
};
|
|
49
|
+
export type SplitButtonProps<T extends string = string> = {
|
|
50
|
+
/** The menu's entries: the choices, and any actions. */
|
|
51
|
+
options: readonly SplitButtonOption<T>[];
|
|
52
|
+
/** The current choice, when the host holds it. */
|
|
53
|
+
value?: T;
|
|
54
|
+
/** The first current choice, when the button holds it; the first choice when absent. */
|
|
55
|
+
defaultValue?: T;
|
|
56
|
+
/** Another choice was picked in the menu. */
|
|
57
|
+
onChange?: (value: T) => void;
|
|
58
|
+
/** The main part was pressed: run the current choice. */
|
|
59
|
+
onRun?: (value: T) => void;
|
|
60
|
+
/** An `action` was picked in the menu. */
|
|
61
|
+
onSelect?: (value: T) => void;
|
|
62
|
+
/** The main part is a toggle, on when true (`aria-pressed`). */
|
|
63
|
+
pressed?: boolean;
|
|
64
|
+
/** The main part's words, instead of the current choice's name. */
|
|
65
|
+
children?: ReactNode;
|
|
66
|
+
/** What the pair is, for a screen reader (the group's name). */
|
|
67
|
+
'aria-label'?: string;
|
|
68
|
+
/** The caret's name; "More options" when absent. */
|
|
69
|
+
menuLabel?: string;
|
|
70
|
+
size?: 'small' | 'medium' | 'large';
|
|
71
|
+
variant?: 'default' | 'primary' | 'invisible' | 'danger';
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
/** The menu's alignment under the caret. */
|
|
74
|
+
align?: 'start' | 'end';
|
|
75
|
+
className?: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* The main part runs the current choice; the caret opens the menu that
|
|
79
|
+
* changes it.
|
|
80
|
+
*/
|
|
81
|
+
export declare function SplitButton<T extends string = string>({ options, value, defaultValue, onChange, onRun, onSelect, pressed, children, 'aria-label': ariaLabel, menuLabel, size, variant, disabled, align, className, }: SplitButtonProps<T>): import("react").JSX.Element;
|
|
82
|
+
export default SplitButton;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment, useState } from 'react';
|
|
3
|
+
import { ActionList, ActionMenu, Button, ButtonGroup, IconButton } from '@primer/react';
|
|
4
|
+
import { TriangleDownIcon } from '@primer/octicons-react';
|
|
5
|
+
/**
|
|
6
|
+
* The menu's sections, in the order they first appear. An option without a
|
|
7
|
+
* group sits with the other choices, or the other actions: a section of
|
|
8
|
+
* choices is a single selection, and an action among them would read as one
|
|
9
|
+
* more choice.
|
|
10
|
+
*/
|
|
11
|
+
const sectionsOf = (options) => {
|
|
12
|
+
const sections = [];
|
|
13
|
+
for (const option of options) {
|
|
14
|
+
const key = option.group !== undefined ? `group:${option.group}` : option.action ? 'actions' : 'choices';
|
|
15
|
+
let section = sections.find(each => each.key === key);
|
|
16
|
+
if (!section) {
|
|
17
|
+
section = { key, title: option.group, options: [] };
|
|
18
|
+
sections.push(section);
|
|
19
|
+
}
|
|
20
|
+
section.options.push(option);
|
|
21
|
+
}
|
|
22
|
+
return sections;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* The main part runs the current choice; the caret opens the menu that
|
|
26
|
+
* changes it.
|
|
27
|
+
*/
|
|
28
|
+
export function SplitButton({ options, value, defaultValue, onChange, onRun, onSelect, pressed, children, 'aria-label': ariaLabel, menuLabel = 'More options', size = 'medium', variant = 'default', disabled = false, align = 'end', className, }) {
|
|
29
|
+
const choices = options.filter(option => !option.action);
|
|
30
|
+
const [held, setHeld] = useState(defaultValue ?? choices[0]?.value);
|
|
31
|
+
const current = value ?? held;
|
|
32
|
+
const choice = choices.find(option => option.value === current);
|
|
33
|
+
const [open, setOpen] = useState(false);
|
|
34
|
+
const pick = (option) => {
|
|
35
|
+
if (option.action) {
|
|
36
|
+
onSelect?.(option.value);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (value === undefined) {
|
|
40
|
+
setHeld(option.value);
|
|
41
|
+
}
|
|
42
|
+
if (option.value !== current) {
|
|
43
|
+
onChange?.(option.value);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
return (_jsxs(ButtonGroup, { role: "group", "aria-label": ariaLabel, className: className, children: [_jsx(Button, { size: size, variant: variant, disabled: disabled || !choice, leadingVisual: choice?.icon, "aria-pressed": pressed, onClick: () => {
|
|
47
|
+
if (choice) {
|
|
48
|
+
onRun?.(choice.value);
|
|
49
|
+
}
|
|
50
|
+
}, children: children ?? choice?.label }), _jsxs(ActionMenu, { open: open, onOpenChange: setOpen, children: [_jsx(ActionMenu.Anchor, { children: _jsx(IconButton, { size: size, variant: variant, disabled: disabled, icon: TriangleDownIcon, "aria-label": menuLabel }) }), _jsx(ActionMenu.Overlay, { align: align, children: _jsx(ActionList, { children: sectionsOf(options).map((section, at) => {
|
|
51
|
+
const chooses = section.options.some(option => !option.action || option.selected !== undefined);
|
|
52
|
+
return (_jsxs(Fragment, { children: [at > 0 && _jsx(ActionList.Divider, {}), _jsxs(ActionList.Group, { selectionVariant: chooses ? 'single' : undefined, children: [section.title && _jsx(ActionList.GroupHeading, { children: section.title }), section.options.map(option => {
|
|
53
|
+
const Icon = option.icon;
|
|
54
|
+
const visual = option.leadingVisual ?? (Icon ? _jsx(Icon, {}) : null);
|
|
55
|
+
return (_jsxs(ActionList.Item, { disabled: option.disabled, variant: option.variant, selected: chooses
|
|
56
|
+
? option.action
|
|
57
|
+
? Boolean(option.selected)
|
|
58
|
+
: option.value === current
|
|
59
|
+
: undefined, onSelect: () => pick(option), children: [visual && _jsx(ActionList.LeadingVisual, { children: visual }), option.label, option.description && (_jsx(ActionList.Description, { variant: "block", children: option.description }))] }, option.value));
|
|
60
|
+
})] })] }, section.key));
|
|
61
|
+
}) }) })] })] }));
|
|
62
|
+
}
|
|
63
|
+
export default SplitButton;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Dialog`: a modal panel over the page, on a backdrop that is either
|
|
3
|
+
* `frosted` (the page under it blurred and dimmed, the default) or `dim`
|
|
4
|
+
* (only dimmed).
|
|
5
|
+
*
|
|
6
|
+
* A modal in full: `role="dialog"` and `aria-modal`, named by the caller
|
|
7
|
+
* (`aria-labelledby` or `aria-label`); the focus put inside when it opens
|
|
8
|
+
* (`initialFocus`, else the first focusable, else the panel), kept inside
|
|
9
|
+
* while it is open (Tab and Shift+Tab wrap) and given back when it closes
|
|
10
|
+
* (`restoreFocus`); closed by Escape and by a press on the backdrop; the page
|
|
11
|
+
* under it holds still. Its keys are its own: from a portal they would still
|
|
12
|
+
* bubble, through React, to whatever the dialog is written in.
|
|
13
|
+
*
|
|
14
|
+
* Drawn from a portal: into `container` when given, else the element on full
|
|
15
|
+
* screen, else the theme provider's element (`useThemedPortalTarget`, inside
|
|
16
|
+
* the theme's custom properties and out of any ancestor with a transform).
|
|
17
|
+
* Theme tokens only, in every colour mode; it rises and the backdrop fades in,
|
|
18
|
+
* with no motion under `prefers-reduced-motion`; on a phone its padding and
|
|
19
|
+
* corner are smaller.
|
|
20
|
+
*
|
|
21
|
+
* `keepMounted` leaves it in the page while closed, hidden, so that a
|
|
22
|
+
* launcher's `aria-controls` can name it.
|
|
23
|
+
*
|
|
24
|
+
* @module components/dialog/Dialog
|
|
25
|
+
*/
|
|
26
|
+
import { type HTMLAttributes, type JSX, type ReactNode } from "react";
|
|
27
|
+
/** What is under the dialog: the page blurred and dimmed, or only dimmed. */
|
|
28
|
+
export type DialogBackdrop = "frosted" | "dim";
|
|
29
|
+
/** The focusable elements of the dialog, in their order: what Tab walks. */
|
|
30
|
+
export declare const DIALOG_FOCUSABLE = "button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
31
|
+
/** Where Tab goes from `at` among `count` focusables, wrapping at both ends. */
|
|
32
|
+
export declare const dialogTrappedIndex: (at: number, count: number, back: boolean) => number;
|
|
33
|
+
/** Any `data-*` attribute, for the backdrop. */
|
|
34
|
+
type DataAttributes = {
|
|
35
|
+
[name: `data-${string}`]: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
export declare const DIALOG_CSS = "\n.dla-dialog-backdrop[hidden] { display: none; }\n.dla-dialog-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: color-mix(in srgb, var(--bgColor-emphasis) 38%, transparent); animation: dla-dialog-fade 180ms ease-out; }\n.dla-dialog-backdrop[data-backdrop=\"frosted\"] { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }\n@keyframes dla-dialog-fade { from { opacity: 0; } to { opacity: 1; } }\n.dla-dialog { box-sizing: border-box; position: relative; max-width: 100%; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; border-radius: 24px; border: 1px solid var(--borderColor-default); background: var(--overlay-bgColor, var(--bgColor-default)); box-shadow: var(--shadow-floating-xlarge); text-align: left; animation: dla-dialog-rise 240ms cubic-bezier(0.2, 0.8, 0.2, 1); }\n.dla-dialog[data-padding=\"none\"] { padding: 0; }\n.dla-dialog:focus { outline: none; }\n@keyframes dla-dialog-rise { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }\n@media (max-width: 639px) {\n .dla-dialog { padding: 16px; border-radius: 20px; }\n .dla-dialog[data-padding=\"none\"] { padding: 0; }\n}\n@media (prefers-reduced-motion: reduce) {\n .dla-dialog-backdrop, .dla-dialog { animation: none; }\n}\n";
|
|
38
|
+
export type DialogProps = Omit<HTMLAttributes<HTMLDivElement>, "role"> & {
|
|
39
|
+
/** Whether it is open. */
|
|
40
|
+
open: boolean;
|
|
41
|
+
/** Called on Escape and on a press on the backdrop. */
|
|
42
|
+
onClose: () => void;
|
|
43
|
+
/** The page under it blurred and dimmed (`frosted`, the default), or only dimmed. */
|
|
44
|
+
backdrop?: DialogBackdrop;
|
|
45
|
+
/** The panel's width, a CSS length; never wider than the screen. `min(640px, 100%)` by default. */
|
|
46
|
+
width?: string;
|
|
47
|
+
/** The panel's padding: 24px (16px on a phone), or none, for a picture that runs to its edges. */
|
|
48
|
+
padding?: "normal" | "none";
|
|
49
|
+
/** Where the focus goes when it opens: the first focusable by default. */
|
|
50
|
+
initialFocus?: () => HTMLElement | null | undefined;
|
|
51
|
+
/** Give the focus back, when it closes, to what had it before it opened. True by default. */
|
|
52
|
+
restoreFocus?: boolean;
|
|
53
|
+
/** Stay in the page while closed, hidden. */
|
|
54
|
+
keepMounted?: boolean;
|
|
55
|
+
/** Where to draw it; see the module's notes for the default. */
|
|
56
|
+
container?: HTMLElement | null;
|
|
57
|
+
/** Attributes for the backdrop element (a test id, a class). */
|
|
58
|
+
backdropProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
|
|
59
|
+
children?: ReactNode;
|
|
60
|
+
};
|
|
61
|
+
export declare function Dialog({ open, onClose, backdrop, width, padding, initialFocus, restoreFocus, keepMounted, container, backdropProps, className, style, onKeyDown, children, ...panelProps }: DialogProps): JSX.Element | null;
|
|
62
|
+
export default Dialog;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021-2026 Datalayer, Inc.
|
|
4
|
+
* Distributed under the terms of the Modified BSD License.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* `Dialog`: a modal panel over the page, on a backdrop that is either
|
|
8
|
+
* `frosted` (the page under it blurred and dimmed, the default) or `dim`
|
|
9
|
+
* (only dimmed).
|
|
10
|
+
*
|
|
11
|
+
* A modal in full: `role="dialog"` and `aria-modal`, named by the caller
|
|
12
|
+
* (`aria-labelledby` or `aria-label`); the focus put inside when it opens
|
|
13
|
+
* (`initialFocus`, else the first focusable, else the panel), kept inside
|
|
14
|
+
* while it is open (Tab and Shift+Tab wrap) and given back when it closes
|
|
15
|
+
* (`restoreFocus`); closed by Escape and by a press on the backdrop; the page
|
|
16
|
+
* under it holds still. Its keys are its own: from a portal they would still
|
|
17
|
+
* bubble, through React, to whatever the dialog is written in.
|
|
18
|
+
*
|
|
19
|
+
* Drawn from a portal: into `container` when given, else the element on full
|
|
20
|
+
* screen, else the theme provider's element (`useThemedPortalTarget`, inside
|
|
21
|
+
* the theme's custom properties and out of any ancestor with a transform).
|
|
22
|
+
* Theme tokens only, in every colour mode; it rises and the backdrop fades in,
|
|
23
|
+
* with no motion under `prefers-reduced-motion`; on a phone its padding and
|
|
24
|
+
* corner are smaller.
|
|
25
|
+
*
|
|
26
|
+
* `keepMounted` leaves it in the page while closed, hidden, so that a
|
|
27
|
+
* launcher's `aria-controls` can name it.
|
|
28
|
+
*
|
|
29
|
+
* @module components/dialog/Dialog
|
|
30
|
+
*/
|
|
31
|
+
import { useEffect, useRef, } from "react";
|
|
32
|
+
import { createPortal } from "react-dom";
|
|
33
|
+
import { useThemedPortalTarget } from "../hover-card/useThemedPortalTarget";
|
|
34
|
+
/** The focusable elements of the dialog, in their order: what Tab walks. */
|
|
35
|
+
export const DIALOG_FOCUSABLE = 'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
36
|
+
/** Where Tab goes from `at` among `count` focusables, wrapping at both ends. */
|
|
37
|
+
export const dialogTrappedIndex = (at, count, back) => back ? (at <= 0 ? count - 1 : at - 1) : at >= count - 1 ? 0 : at + 1;
|
|
38
|
+
export const DIALOG_CSS = `
|
|
39
|
+
.dla-dialog-backdrop[hidden] { display: none; }
|
|
40
|
+
.dla-dialog-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: color-mix(in srgb, var(--bgColor-emphasis) 38%, transparent); animation: dla-dialog-fade 180ms ease-out; }
|
|
41
|
+
.dla-dialog-backdrop[data-backdrop="frosted"] { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
|
|
42
|
+
@keyframes dla-dialog-fade { from { opacity: 0; } to { opacity: 1; } }
|
|
43
|
+
.dla-dialog { box-sizing: border-box; position: relative; max-width: 100%; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; border-radius: 24px; border: 1px solid var(--borderColor-default); background: var(--overlay-bgColor, var(--bgColor-default)); box-shadow: var(--shadow-floating-xlarge); text-align: left; animation: dla-dialog-rise 240ms cubic-bezier(0.2, 0.8, 0.2, 1); }
|
|
44
|
+
.dla-dialog[data-padding="none"] { padding: 0; }
|
|
45
|
+
.dla-dialog:focus { outline: none; }
|
|
46
|
+
@keyframes dla-dialog-rise { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
|
|
47
|
+
@media (max-width: 639px) {
|
|
48
|
+
.dla-dialog { padding: 16px; border-radius: 20px; }
|
|
49
|
+
.dla-dialog[data-padding="none"] { padding: 0; }
|
|
50
|
+
}
|
|
51
|
+
@media (prefers-reduced-motion: reduce) {
|
|
52
|
+
.dla-dialog-backdrop, .dla-dialog { animation: none; }
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
export function Dialog({ open, onClose, backdrop = "frosted", width = "min(640px, 100%)", padding = "normal", initialFocus, restoreFocus = true, keepMounted = false, container, backdropProps, className, style, onKeyDown, children, ...panelProps }) {
|
|
56
|
+
const panel = useRef(null);
|
|
57
|
+
const { marker, target } = useThemedPortalTarget();
|
|
58
|
+
const latest = useRef({ initialFocus, restoreFocus });
|
|
59
|
+
latest.current = { initialFocus, restoreFocus };
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (!open) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
const before = document.activeElement;
|
|
65
|
+
const focus = latest.current.initialFocus?.() ??
|
|
66
|
+
panel.current?.querySelector(DIALOG_FOCUSABLE) ??
|
|
67
|
+
panel.current;
|
|
68
|
+
focus?.focus();
|
|
69
|
+
// The page under the dialog holds still.
|
|
70
|
+
const overflow = document.body.style.overflow;
|
|
71
|
+
document.body.style.overflow = "hidden";
|
|
72
|
+
return () => {
|
|
73
|
+
document.body.style.overflow = overflow;
|
|
74
|
+
if (latest.current.restoreFocus && before?.isConnected) {
|
|
75
|
+
before.focus();
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}, [open]);
|
|
79
|
+
const keyDown = (event) => {
|
|
80
|
+
// Modal: its keys are its own.
|
|
81
|
+
event.stopPropagation();
|
|
82
|
+
if (event.key === "Escape") {
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
onClose();
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (event.key === "Tab") {
|
|
88
|
+
const focusables = Array.from(panel.current?.querySelectorAll(DIALOG_FOCUSABLE) ?? []);
|
|
89
|
+
event.preventDefault();
|
|
90
|
+
if (focusables.length === 0) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const at = focusables.indexOf(document.activeElement);
|
|
94
|
+
focusables[dialogTrappedIndex(at, focusables.length, event.shiftKey)].focus();
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
onKeyDown?.(event);
|
|
98
|
+
};
|
|
99
|
+
const host = container ??
|
|
100
|
+
(open ? document.fullscreenElement : null) ??
|
|
101
|
+
target;
|
|
102
|
+
if (!open && !keepMounted) {
|
|
103
|
+
return container ? null : marker;
|
|
104
|
+
}
|
|
105
|
+
const { onMouseDown, className: backdropClassName, ...restBackdrop } = backdropProps ?? {};
|
|
106
|
+
const drawn = (_jsxs("div", { ...restBackdrop, hidden: !open, className: ["dla-dialog-backdrop", backdropClassName]
|
|
107
|
+
.filter(Boolean)
|
|
108
|
+
.join(" "), "data-backdrop": backdrop, onMouseDown: event => {
|
|
109
|
+
onMouseDown?.(event);
|
|
110
|
+
// A press outside the panel closes it.
|
|
111
|
+
if (event.target === event.currentTarget) {
|
|
112
|
+
onClose();
|
|
113
|
+
}
|
|
114
|
+
}, children: [_jsx("style", { children: DIALOG_CSS }), _jsx("div", { tabIndex: -1, ...panelProps, ref: panel, role: "dialog", "aria-modal": "true", className: ["dla-dialog", className].filter(Boolean).join(" "), "data-padding": padding, style: { width, ...style }, onKeyDown: keyDown, children: children })] }));
|
|
115
|
+
return (_jsxs(_Fragment, { children: [container ? null : marker, host ? createPortal(drawn, host) : null] }));
|
|
116
|
+
}
|
|
117
|
+
export default Dialog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Dialog";
|
|
@@ -35,6 +35,20 @@ export const FACE_EMOJIS = [
|
|
|
35
35
|
'๐ง ',
|
|
36
36
|
'๐',
|
|
37
37
|
'๐งฎ',
|
|
38
|
+
// The examples' (agentspecs agents marked example: true).
|
|
39
|
+
'๐ฆ',
|
|
40
|
+
'๐๏ธ',
|
|
41
|
+
'๐',
|
|
42
|
+
'๐ช',
|
|
43
|
+
'๐จ',
|
|
44
|
+
'๐',
|
|
45
|
+
'๐',
|
|
46
|
+
'โฉ๏ธ',
|
|
47
|
+
'๐งบ',
|
|
48
|
+
'๐๏ธ',
|
|
49
|
+
'๐',
|
|
50
|
+
'๐',
|
|
51
|
+
'โ๏ธ',
|
|
38
52
|
// The avatars of the profile's set, as emoji.
|
|
39
53
|
'๐พ',
|
|
40
54
|
'๐ฝ',
|
|
@@ -24,6 +24,19 @@ export const FLUENT_EMOJI_LOADERS = {
|
|
|
24
24
|
'1f9e0': () => import('./svg/1f9e0'),
|
|
25
25
|
'1f6df': () => import('./svg/1f6df'),
|
|
26
26
|
'1f9ee': () => import('./svg/1f9ee'),
|
|
27
|
+
'1f526': () => import('./svg/1f526'),
|
|
28
|
+
'1f39e': () => import('./svg/1f39e'),
|
|
29
|
+
'1f3c3': () => import('./svg/1f3c3'),
|
|
30
|
+
'1f3ea': () => import('./svg/1f3ea'),
|
|
31
|
+
'1f3e8': () => import('./svg/1f3e8'),
|
|
32
|
+
'1f516': () => import('./svg/1f516'),
|
|
33
|
+
'1f3d3': () => import('./svg/1f3d3'),
|
|
34
|
+
'21a9': () => import('./svg/21a9'),
|
|
35
|
+
'1f9fa': () => import('./svg/1f9fa'),
|
|
36
|
+
'1f6ce': () => import('./svg/1f6ce'),
|
|
37
|
+
'1f510': () => import('./svg/1f510'),
|
|
38
|
+
'1f50f': () => import('./svg/1f50f'),
|
|
39
|
+
'2708': () => import('./svg/2708'),
|
|
27
40
|
'1f47e': () => import('./svg/1f47e'),
|
|
28
41
|
'1f47d': () => import('./svg/1f47d'),
|
|
29
42
|
'1f9d1-200d-1f680': () => import('./svg/1f9d1-200d-1f680'),
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M30 8.91016H2V22.9802H30V8.91016Z\" fill=\"#83CBFF\"/> <path d=\"M30 10.02V5.82C30 5.37 29.63 5 29.18 5H2.82C2.37 5 2 5.37 2 5.82V10.02H5.74C6.8 10.02 7.66 10.88 7.66 11.94V20C7.66 21.06 6.8 21.92 5.74 21.92H2V26.12C2 26.57 2.37 26.94 2.82 26.94H29.18C29.63 26.94 30 26.57 30 26.12V21.92H26.26C25.2 21.92 24.34 21.06 24.34 20V11.94C24.34 10.88 25.2 10.02 26.26 10.02H30ZM20.11 21.92H11.89C10.83 21.92 9.97 21.06 9.97 20V11.94C9.97 10.88 10.83 10.02 11.89 10.02H20.11C21.17 10.02 22.03 10.88 22.03 11.94V20C22.03 21.06 21.17 21.92 20.11 21.92ZM5.77001 23.39C5.95001 23.39 6.09001 23.53 6.09001 23.71V25.09C6.09001 25.27 5.95001 25.41 5.77001 25.41H4.39001C4.21001 25.41 4.07001 25.27 4.07001 25.09V23.71C4.07001 23.53 4.21001 23.39 4.39001 23.39H5.77001ZM11.23 23.39C11.41 23.39 11.55 23.53 11.55 23.71V25.09C11.55 25.27 11.41 25.41 11.23 25.41H9.85003C9.67003 25.41 9.53003 25.27 9.53003 25.09V23.71C9.53003 23.53 9.67003 23.39 9.85003 23.39H11.23ZM15.31 23.39H16.69C16.87 23.39 17.01 23.53 17.01 23.71V25.09C17.01 25.27 16.87 25.41 16.69 25.41H15.31C15.13 25.41 14.99 25.27 14.99 25.09V23.71C14.99 23.53 15.13 23.39 15.31 23.39ZM22.15 23.39C22.32 23.39 22.47 23.53 22.47 23.71V25.09C22.47 25.27 22.33 25.41 22.15 25.41H20.77C20.59 25.41 20.45 25.27 20.45 25.09V23.71C20.45 23.53 20.59 23.39 20.77 23.39H22.15ZM26.23 23.39H27.61C27.78 23.39 27.93 23.53 27.93 23.71V25.09C27.93 25.27 27.79 25.41 27.61 25.41H26.23C26.05 25.41 25.91 25.27 25.91 25.09V23.71C25.91 23.53 26.05 23.39 26.23 23.39ZM4.39001 6.47998H5.77001C5.95001 6.47998 6.09001 6.62998 6.09001 6.79998V8.17998C6.09001 8.35998 5.95001 8.49998 5.77001 8.49998H4.39001C4.21001 8.49998 4.07001 8.35998 4.07001 8.17998V6.79998C4.07001 6.61998 4.21001 6.47998 4.39001 6.47998ZM9.85003 6.47998H11.23C11.41 6.47998 11.55 6.62998 11.55 6.79998V8.17998C11.55 8.35998 11.41 8.49998 11.23 8.49998H9.85003C9.67003 8.49998 9.53003 8.35998 9.53003 8.17998V6.79998C9.53003 6.61998 9.67003 6.47998 9.85003 6.47998ZM16.69 6.47998C16.87 6.47998 17.01 6.62998 17.01 6.79998V8.17998C17.01 8.35998 16.87 8.49998 16.69 8.49998H15.31C15.13 8.49998 14.99 8.35998 14.99 8.17998V6.79998C14.99 6.61998 15.13 6.47998 15.31 6.47998H16.69ZM20.77 6.47998H22.15C22.32 6.47998 22.47 6.62998 22.47 6.79998V8.17998C22.47 8.35998 22.33 8.49998 22.15 8.49998H20.77C20.59 8.49998 20.45 8.35998 20.45 8.17998V6.79998C20.45 6.61998 20.59 6.47998 20.77 6.47998ZM27.61 6.47998C27.78 6.47998 27.93 6.62998 27.93 6.79998V8.17998C27.93 8.35998 27.79 8.49998 27.61 8.49998H26.23C26.05 8.49998 25.91 8.35998 25.91 8.17998V6.79998C25.91 6.61998 26.05 6.47998 26.23 6.47998H27.61Z\" fill=\"#433B6B\"/> </svg>";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
* ๐๏ธ film frames โ Fluent Emoji, Flat, by Microsoft (MIT,
|
|
7
|
+
* see ../LICENSE). Written by scripts/generate-fluent-emoji.py: do not edit.
|
|
8
|
+
*/
|
|
9
|
+
export default '<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M30 8.91016H2V22.9802H30V8.91016Z" fill="#83CBFF"/> <path d="M30 10.02V5.82C30 5.37 29.63 5 29.18 5H2.82C2.37 5 2 5.37 2 5.82V10.02H5.74C6.8 10.02 7.66 10.88 7.66 11.94V20C7.66 21.06 6.8 21.92 5.74 21.92H2V26.12C2 26.57 2.37 26.94 2.82 26.94H29.18C29.63 26.94 30 26.57 30 26.12V21.92H26.26C25.2 21.92 24.34 21.06 24.34 20V11.94C24.34 10.88 25.2 10.02 26.26 10.02H30ZM20.11 21.92H11.89C10.83 21.92 9.97 21.06 9.97 20V11.94C9.97 10.88 10.83 10.02 11.89 10.02H20.11C21.17 10.02 22.03 10.88 22.03 11.94V20C22.03 21.06 21.17 21.92 20.11 21.92ZM5.77001 23.39C5.95001 23.39 6.09001 23.53 6.09001 23.71V25.09C6.09001 25.27 5.95001 25.41 5.77001 25.41H4.39001C4.21001 25.41 4.07001 25.27 4.07001 25.09V23.71C4.07001 23.53 4.21001 23.39 4.39001 23.39H5.77001ZM11.23 23.39C11.41 23.39 11.55 23.53 11.55 23.71V25.09C11.55 25.27 11.41 25.41 11.23 25.41H9.85003C9.67003 25.41 9.53003 25.27 9.53003 25.09V23.71C9.53003 23.53 9.67003 23.39 9.85003 23.39H11.23ZM15.31 23.39H16.69C16.87 23.39 17.01 23.53 17.01 23.71V25.09C17.01 25.27 16.87 25.41 16.69 25.41H15.31C15.13 25.41 14.99 25.27 14.99 25.09V23.71C14.99 23.53 15.13 23.39 15.31 23.39ZM22.15 23.39C22.32 23.39 22.47 23.53 22.47 23.71V25.09C22.47 25.27 22.33 25.41 22.15 25.41H20.77C20.59 25.41 20.45 25.27 20.45 25.09V23.71C20.45 23.53 20.59 23.39 20.77 23.39H22.15ZM26.23 23.39H27.61C27.78 23.39 27.93 23.53 27.93 23.71V25.09C27.93 25.27 27.79 25.41 27.61 25.41H26.23C26.05 25.41 25.91 25.27 25.91 25.09V23.71C25.91 23.53 26.05 23.39 26.23 23.39ZM4.39001 6.47998H5.77001C5.95001 6.47998 6.09001 6.62998 6.09001 6.79998V8.17998C6.09001 8.35998 5.95001 8.49998 5.77001 8.49998H4.39001C4.21001 8.49998 4.07001 8.35998 4.07001 8.17998V6.79998C4.07001 6.61998 4.21001 6.47998 4.39001 6.47998ZM9.85003 6.47998H11.23C11.41 6.47998 11.55 6.62998 11.55 6.79998V8.17998C11.55 8.35998 11.41 8.49998 11.23 8.49998H9.85003C9.67003 8.49998 9.53003 8.35998 9.53003 8.17998V6.79998C9.53003 6.61998 9.67003 6.47998 9.85003 6.47998ZM16.69 6.47998C16.87 6.47998 17.01 6.62998 17.01 6.79998V8.17998C17.01 8.35998 16.87 8.49998 16.69 8.49998H15.31C15.13 8.49998 14.99 8.35998 14.99 8.17998V6.79998C14.99 6.61998 15.13 6.47998 15.31 6.47998H16.69ZM20.77 6.47998H22.15C22.32 6.47998 22.47 6.62998 22.47 6.79998V8.17998C22.47 8.35998 22.33 8.49998 22.15 8.49998H20.77C20.59 8.49998 20.45 8.35998 20.45 8.17998V6.79998C20.45 6.61998 20.59 6.47998 20.77 6.47998ZM27.61 6.47998C27.78 6.47998 27.93 6.62998 27.93 6.79998V8.17998C27.93 8.35998 27.79 8.49998 27.61 8.49998H26.23C26.05 8.49998 25.91 8.35998 25.91 8.17998V6.79998C25.91 6.61998 26.05 6.47998 26.23 6.47998H27.61Z" fill="#433B6B"/> </svg>';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: "<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M18.1058 9.89008C18.2324 9.83686 18.3709 9.81847 18.507 9.8368C18.6431 9.85514 18.7718 9.90954 18.8798 9.99436L21.3028 11.8822C21.3234 12.1937 21.4212 12.586 21.78 12.6099H22.3C22.3 12.6099 22.47 12.9699 22.8 12.8599C23.1006 12.7328 23.3676 12.5377 23.58 12.2899C23.86 11.9599 24.1 11.4199 23.99 11.1499C23.8063 10.8745 23.5681 10.6396 23.29 10.4599L22.59 9.93994L20.3004 8.18555C19.8703 7.84824 19.3559 7.63038 18.8141 7.55739C18.2761 7.48491 17.7285 7.55641 17.2273 7.76446L13.9475 9.06042L14.2363 9.79139L13.8052 9.46289C12.8534 10.712 11.445 11.5326 9.88887 11.7446C8.44014 11.942 6.9736 11.5968 5.7684 10.7824C5.70981 10.4986 5.56892 10.1235 5.2301 9.95992C5.15025 9.90482 5.05272 9.88146 4.95657 9.8944C4.86042 9.90734 4.77254 9.95566 4.7101 10.0299C4.7101 10.0299 4.5201 9.66992 4.1901 9.80992C3.89158 9.96282 3.62908 10.1776 3.4201 10.4399C3.30162 10.6135 3.22466 10.812 3.19518 11.0201C3.16571 11.2282 3.1845 11.4403 3.2501 11.6399C3.395 11.9012 3.5966 12.1268 3.8401 12.2999L4.24425 12.5222C5.95944 13.7711 8.09295 14.3105 10.1993 14.0236C12.353 13.7302 14.303 12.5967 15.6238 10.8711L18.0943 9.89491L18.1058 9.89008Z\" fill=\"#FFC83D\"/> <path d=\"M17.9201 15.5699L17.4701 15.2799C17.5382 15.4074 17.5955 15.5394 17.6418 15.6745L13.375 19.2734L10.7067 19.2489L10.0501 19.8099C9.57624 20.4992 9.22131 21.2632 9.00015 22.0699L6.90015 27.6899L8.31015 28.6199L11.8701 22.3799L15.6294 19.5033L17.6401 22.3299C17.8674 22.6473 18.1826 22.8912 18.5469 23.0316C18.9111 23.172 19.3085 23.2027 19.6901 23.1199L25.8901 21.7299L25.2801 19.9999L19.8301 20.4799L17.7857 16.4604C17.7771 16.1934 17.7288 15.9285 17.6418 15.6745L17.9201 15.5699Z\" fill=\"#FFC83D\"/> <path d=\"M13.7301 7L14.7801 9.05L12.6801 10.15L11.6301 8.05L13.7301 7Z\" fill=\"#FCB100\"/> <path d=\"M12.4752 8.41123C12.9243 8.16904 13.2933 7.81084 13.5402 7.37748L13.8902 6.09393L14.2902 4.76249C14.2875 4.29582 14.0928 3.84899 13.7483 3.519C13.4038 3.18901 12.9374 3.00252 12.4502 3H11.2502C11.0064 3 10.765 3.04615 10.5399 3.1358C10.3148 3.22545 10.1104 3.35684 9.93848 3.52241C9.76656 3.68797 9.6305 3.88446 9.53812 4.10056C9.44573 4.31667 9.39886 4.54813 9.40017 4.78164V5.49996C9.40017 5.49997 9.40018 5.49995 9.40017 5.49996C9.24537 5.78754 9.12796 5.94446 9.04694 6.05273C8.95525 6.17527 8.91016 6.23553 8.91016 6.3525C8.92487 6.46677 8.98292 6.57187 9.07327 6.64782C9.16362 6.72376 9.27996 6.76525 9.40016 6.76438C9.40144 6.76438 9.40271 6.76438 9.40397 6.76436C9.42862 7.90545 9.6135 8.74724 11.0002 8.74724C11.515 8.76984 12.0261 8.65341 12.4752 8.41123Z\" fill=\"#FFC83D\"/> <path d=\"M27.3635 23.9119L25 21.7981L25.0847 19.9366L26.2292 19.5289C26.3509 19.4851 26.485 19.4913 26.6022 19.5459C26.7195 19.6006 26.8103 19.6994 26.855 19.8208C26.855 19.8208 27.9471 22.8156 28.1183 23.4515C28.1851 23.6661 27.5642 24.0899 27.3635 23.9119Z\" fill=\"#533566\"/> <path d=\"M4.00016 27.1499H7.19016L8.30016 28.6599L7.76016 29.6599C7.73073 29.7171 7.6901 29.7678 7.64069 29.809C7.59128 29.8502 7.53409 29.8811 7.47252 29.8997C7.41095 29.9184 7.34626 29.9245 7.2823 29.9176C7.21833 29.9108 7.15639 29.8912 7.10016 29.8599C7.10016 29.8599 4.30016 28.3599 3.74016 27.9999C3.56016 27.8799 3.74016 27.1499 4.00016 27.1499Z\" fill=\"#533566\"/> <path d=\"M14.6401 18.2099L17.1401 21.6499L19.3801 20.2299C19.6416 20.0596 19.8265 19.7942 19.8956 19.4899C19.9647 19.1856 19.9125 18.8664 19.7501 18.5999L17.8201 15.4099L14.6401 18.2099Z\" fill=\"#636363\"/> <path d=\"M10.6953 19.2383L13.2102 21.6999C13.3397 21.8281 13.4954 21.9267 13.6666 21.989C13.8378 22.0512 14.0205 22.0755 14.2021 22.0603C14.3837 22.0451 14.5598 21.9907 14.7183 21.9009C14.8768 21.811 15.0139 21.6879 15.1202 21.5399L17.4102 18.3499C17.4102 18.3499 18.4102 16.9099 18.0602 16.0099C17.9765 15.645 17.8125 15.3034 17.5802 15.0099L12.7402 17.4899\" fill=\"#9B9B9B\"/> <path opacity=\"0.51\" d=\"M4.79281 10.0423C4.83846 10.0941 4.83349 10.1731 4.7817 10.2188C4.58325 10.3937 4.41135 10.5966 4.27139 10.821C4.24447 10.8932 4.24641 10.9481 4.25844 10.9888C4.27136 11.0324 4.29893 11.0695 4.33517 11.0981C4.37215 11.1272 4.41386 11.144 4.44688 11.1491C4.46367 11.1518 4.47306 11.1509 4.47722 11.1502C4.5742 11.0555 4.66667 10.9563 4.75431 10.853C4.77454 10.817 4.79533 10.7893 4.81474 10.7682C4.91523 10.6586 4.99775 10.6998 5.03538 10.7454C5.07302 10.7909 5.07365 10.8566 5.03688 10.9028C5.01257 10.9334 4.98787 10.9636 4.96278 10.9936C4.9599 10.9995 4.95697 11.0059 4.954 11.0128C4.91647 11.1007 4.87455 11.2748 4.89382 11.5976C4.89793 11.6665 4.8454 11.7257 4.77649 11.7298C4.70758 11.7339 4.64838 11.6814 4.64426 11.6125C4.63818 11.5105 4.63759 11.4199 4.64125 11.3393C4.57237 11.4029 4.47707 11.4069 4.40839 11.3962C4.3311 11.3841 4.24968 11.349 4.18041 11.2944C4.1104 11.2392 4.0486 11.1607 4.01871 11.0597C3.98845 10.9574 3.99376 10.8416 4.04298 10.7186C4.04566 10.7119 4.04891 10.7054 4.0527 10.6993C4.20668 10.4501 4.39662 10.225 4.61638 10.0312C4.64989 10.0017 4.69479 9.99335 4.73468 10.0052C4.75643 10.0116 4.7767 10.0241 4.79281 10.0423Z\" fill=\"#ED9200\"/> <path d=\"M12.74 17.52L17.92 15.57C17.4467 14.7133 16.3999 12.6869 15.9993 11.4343C15.9606 9.25221 14.7302 8.69996 14.7302 8.69996C14.3362 8.55681 13.9114 8.52026 13.4987 8.59401C13.0861 8.66776 12.7002 8.84919 12.3802 9.11996C12.0938 9.34395 11.8609 9.62886 11.6983 9.95403C11.6188 10.113 11.5571 10.2797 11.514 10.451L11.51 10.45C11.2049 11.6485 11.1568 12.898 11.3688 14.1165C11.5808 15.335 12.0481 16.4949 12.74 17.52Z\" fill=\"#FF6723\"/> <path d=\"M12.6501 5.13995C12.6501 5.13995 12.6501 4.18995 11.0901 4.18995C9.76009 4.18995 9.40009 3.72995 9.42009 2.99995C9.40956 2.86594 9.42821 2.73125 9.47474 2.60515C9.52127 2.47904 9.59458 2.36452 9.68963 2.26948C9.78467 2.17443 9.89919 2.10112 10.0253 2.05459C10.1514 2.00806 10.2861 1.98941 10.4201 1.99995C10.8705 1.99995 11.1146 2.06558 11.3188 2.12052C11.5863 2.19244 11.7855 2.24601 12.2901 2.10995C13.4901 1.75995 15.2901 1.95995 15.2901 3.95995C15.2901 6.43483 14.4622 6.65786 14.313 6.67795C14.3711 6.67424 14.4296 6.68065 14.4856 6.69696C14.549 6.71541 14.6082 6.74618 14.6598 6.7875C14.7113 6.82882 14.7542 6.87989 14.786 6.93779C14.8178 6.99569 14.8379 7.05928 14.8451 7.12495C14.8523 7.19061 14.8465 7.25705 14.8281 7.32047C14.8096 7.3839 14.7789 7.44307 14.7375 7.49461C14.6962 7.54614 14.6451 7.58904 14.5873 7.62084C14.5294 7.65264 14.4658 7.67272 14.4001 7.67994C14.351 7.67994 14.2941 7.68427 14.2325 7.68895C13.8546 7.71765 13.3001 7.75976 13.3001 6.89995C13.3001 6.71414 13.2939 6.54784 13.2827 6.39901C13.3399 6.33824 13.3867 6.26823 13.4209 6.19179C13.4642 6.09527 13.4866 5.99068 13.4866 5.88489C13.4866 5.7791 13.4642 5.67451 13.4209 5.57798C13.3776 5.48146 13.3144 5.39518 13.2354 5.32482C13.1564 5.25446 13.0634 5.20161 12.9626 5.16974C12.8681 5.13989 12.7687 5.12907 12.6702 5.13783C12.6595 5.1383 12.6521 5.13957 12.6501 5.13995C12.6499 5.13997 12.6503 5.13992 12.6501 5.13995Z\" fill=\"#F1A11E\"/> <path d=\"M10.5596 6.99141C10.6251 7.01321 10.6605 7.08399 10.6387 7.14949C10.5826 7.31818 10.4622 7.45791 10.3036 7.53833C10.1451 7.61876 9.96117 7.63338 9.7919 7.57903C9.72617 7.55793 9.68999 7.48754 9.7111 7.42181C9.7322 7.35608 9.80259 7.3199 9.86833 7.341C9.9749 7.37522 10.0907 7.36601 10.1905 7.31538C10.2903 7.26474 10.3662 7.17676 10.4015 7.07055C10.4233 7.00505 10.4941 6.96962 10.5596 6.99141Z\" fill=\"#990839\"/> <path d=\"M9.87013 5.90999C9.85173 5.90872 9.83376 5.90383 9.81725 5.8956C9.80075 5.88737 9.78603 5.87595 9.77395 5.86201C9.76187 5.84807 9.75266 5.83188 9.74686 5.81438C9.74105 5.79687 9.73877 5.77839 9.74013 5.75999V5.75999C9.74271 5.68775 9.7595 5.61672 9.78955 5.55098C9.8196 5.48523 9.86232 5.42605 9.91526 5.37683C9.9682 5.32761 10.0303 5.2893 10.0981 5.2641C10.1658 5.23891 10.2379 5.22732 10.3101 5.22999C10.3824 5.22732 10.4544 5.23891 10.5222 5.2641C10.5899 5.2893 10.6521 5.32761 10.705 5.37683C10.7579 5.42605 10.8007 5.48523 10.8307 5.55098C10.8608 5.61672 10.8775 5.68775 10.8801 5.75999V5.75999C10.8815 5.77839 10.8792 5.79687 10.8734 5.81438C10.8676 5.83188 10.8584 5.84807 10.8463 5.86201C10.8342 5.87595 10.8195 5.88737 10.803 5.8956C10.7865 5.90383 10.7685 5.90872 10.7501 5.90999H9.87013Z\" fill=\"white\"/> <path d=\"M9.97272 4.53111C10.2854 4.48945 10.6025 4.56476 10.8632 4.74258C10.9225 4.78305 10.9377 4.86393 10.8973 4.92324C10.8568 4.98255 10.7759 4.99782 10.7166 4.95735C10.5089 4.81565 10.2562 4.75564 10.007 4.78883C9.93587 4.79831 9.8705 4.7483 9.86102 4.67713C9.85154 4.60596 9.90155 4.54058 9.97272 4.53111Z\" fill=\"#D37034\"/> <path d=\"M10.4413 5.91003C10.4518 5.86687 10.4575 5.821 10.4575 5.77344C10.4575 5.51887 10.2956 5.3125 10.0959 5.3125C9.89625 5.3125 9.73438 5.51887 9.73438 5.77344C9.73438 5.821 9.74002 5.86687 9.75051 5.91003H10.4413Z\" fill=\"#7D4533\"/> <path d=\"M10.2614 5.91003C10.2734 5.87269 10.2801 5.83104 10.2801 5.78711C10.2801 5.62639 10.1903 5.49609 10.0795 5.49609C9.96872 5.49609 9.87891 5.62639 9.87891 5.78711C9.87891 5.83104 9.88562 5.87269 9.89763 5.91003H10.2614Z\" fill=\"#1C1C1C\"/> <path d=\"M9.91009 5.66999C9.94875 5.66999 9.98009 5.6297 9.98009 5.57999C9.98009 5.53028 9.94875 5.48999 9.91009 5.48999C9.87143 5.48999 9.84009 5.53028 9.84009 5.57999C9.84009 5.6297 9.87143 5.66999 9.91009 5.66999Z\" fill=\"white\"/> <path d=\"M14.3373 11.2567C13.5371 11.4711 12.7146 10.9963 12.5002 10.1961V10.1961C12.2858 9.39587 12.7607 8.57336 13.5609 8.35895L16.9416 7.45308L17.7181 10.3509L14.3373 11.2567Z\" fill=\"#FF8101\"/> </svg>";
|
|
2
|
+
export default _default;
|