@datalayer/primer-addons 1.0.57 โ†’ 1.0.59

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 (81) hide show
  1. package/README.md +66 -0
  2. package/lib/components/appearance/AppearanceControls.d.ts +3 -3
  3. package/lib/components/appearance/AppearanceControls.js +8 -4
  4. package/lib/components/appearance/AppearanceControls.stories.d.ts +1 -1
  5. package/lib/components/appearance/AppearanceControls.stories.js +1 -1
  6. package/lib/components/appearance/AppearanceMenu.d.ts +1 -1
  7. package/lib/components/buttons/Buttons.stories.d.ts +1 -0
  8. package/lib/components/buttons/Buttons.stories.js +10 -1
  9. package/lib/components/buttons/SplitButton.d.ts +82 -0
  10. package/lib/components/buttons/SplitButton.js +63 -0
  11. package/lib/components/buttons/index.d.ts +1 -0
  12. package/lib/components/buttons/index.js +1 -0
  13. package/lib/components/dialog/Dialog.d.ts +62 -0
  14. package/lib/components/dialog/Dialog.js +117 -0
  15. package/lib/components/dialog/index.d.ts +1 -0
  16. package/lib/components/dialog/index.js +5 -0
  17. package/lib/components/emoji/faceEmojis.js +14 -0
  18. package/lib/components/emoji/fluent/loaders.js +13 -0
  19. package/lib/components/emoji/fluent/svg/1f39e.d.ts +2 -0
  20. package/lib/components/emoji/fluent/svg/1f39e.js +9 -0
  21. package/lib/components/emoji/fluent/svg/1f3c3.d.ts +2 -0
  22. package/lib/components/emoji/fluent/svg/1f3c3.js +9 -0
  23. package/lib/components/emoji/fluent/svg/1f3d3.d.ts +2 -0
  24. package/lib/components/emoji/fluent/svg/1f3d3.js +9 -0
  25. package/lib/components/emoji/fluent/svg/1f3e8.d.ts +2 -0
  26. package/lib/components/emoji/fluent/svg/1f3e8.js +9 -0
  27. package/lib/components/emoji/fluent/svg/1f3ea.d.ts +2 -0
  28. package/lib/components/emoji/fluent/svg/1f3ea.js +9 -0
  29. package/lib/components/emoji/fluent/svg/1f50f.d.ts +2 -0
  30. package/lib/components/emoji/fluent/svg/1f50f.js +9 -0
  31. package/lib/components/emoji/fluent/svg/1f510.d.ts +2 -0
  32. package/lib/components/emoji/fluent/svg/1f510.js +9 -0
  33. package/lib/components/emoji/fluent/svg/1f516.d.ts +2 -0
  34. package/lib/components/emoji/fluent/svg/1f516.js +9 -0
  35. package/lib/components/emoji/fluent/svg/1f526.d.ts +2 -0
  36. package/lib/components/emoji/fluent/svg/1f526.js +9 -0
  37. package/lib/components/emoji/fluent/svg/1f6ce.d.ts +2 -0
  38. package/lib/components/emoji/fluent/svg/1f6ce.js +9 -0
  39. package/lib/components/emoji/fluent/svg/1f9fa.d.ts +2 -0
  40. package/lib/components/emoji/fluent/svg/1f9fa.js +9 -0
  41. package/lib/components/emoji/fluent/svg/21a9.d.ts +2 -0
  42. package/lib/components/emoji/fluent/svg/21a9.js +9 -0
  43. package/lib/components/emoji/fluent/svg/2708.d.ts +2 -0
  44. package/lib/components/emoji/fluent/svg/2708.js +9 -0
  45. package/lib/components/hover-card/HoverCardDetails.d.ts +7 -4
  46. package/lib/components/hover-card/HoverCardDetails.js +65 -41
  47. package/lib/components/hover-card/HoverCardLayer.d.ts +6 -5
  48. package/lib/components/hover-card/HoverCardLayer.js +21 -16
  49. package/lib/components/hover-card/useThemedPortalTarget.d.ts +20 -0
  50. package/lib/components/hover-card/useThemedPortalTarget.js +13 -0
  51. package/lib/components/index.d.ts +2 -0
  52. package/lib/components/index.js +2 -0
  53. package/lib/components/layout/Center.d.ts +32 -0
  54. package/lib/components/layout/Center.js +16 -0
  55. package/lib/components/layout/Cluster.d.ts +32 -0
  56. package/lib/components/layout/Cluster.js +14 -0
  57. package/lib/components/layout/Grid.d.ts +40 -0
  58. package/lib/components/layout/Grid.js +26 -0
  59. package/lib/components/layout/HolyGrail.d.ts +76 -0
  60. package/lib/components/layout/HolyGrail.js +51 -0
  61. package/lib/components/layout/Masonry.d.ts +92 -0
  62. package/lib/components/layout/Masonry.js +109 -0
  63. package/lib/components/layout/Sidebar.d.ts +51 -0
  64. package/lib/components/layout/Sidebar.js +18 -0
  65. package/lib/components/layout/Split.d.ts +42 -0
  66. package/lib/components/layout/Split.js +23 -0
  67. package/lib/components/layout/Stack.d.ts +41 -0
  68. package/lib/components/layout/Stack.js +16 -0
  69. package/lib/components/layout/Switcher.d.ts +31 -0
  70. package/lib/components/layout/Switcher.js +22 -0
  71. package/lib/components/layout/index.d.ts +18 -0
  72. package/lib/components/layout/index.js +22 -0
  73. package/lib/components/layout/layoutProps.d.ts +27 -0
  74. package/lib/components/layout/layoutProps.js +13 -0
  75. package/lib/components/layout/masonryEngine.d.ts +85 -0
  76. package/lib/components/layout/masonryEngine.js +240 -0
  77. package/lib/components/layout/masonryLayout.d.ts +45 -0
  78. package/lib/components/layout/masonryLayout.js +113 -0
  79. package/lib/components/sliding-panel/SlidingPanel.js +7 -2
  80. package/lib/theme/themes/metalThemeStyles.js +3 -0
  81. 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,71 @@ 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
+
134
+ ### Layouts
135
+
136
+ The page and content layouts, each a `Box` with a few props of its own (every other `Box` prop passes through), its gaps on the theme's space scale, responsive without being told โ€” most by the width of what holds them, not the screen's. The gallery's *Layout* page (`/layout`) shows them all, in frames to narrow.
137
+
138
+ | Layout | What it does | Its props |
139
+ | --- | --- | --- |
140
+ | `Stack` | Children one after the other with one gap, down the page or along a line. | `direction` (`vertical` \| `horizontal`, one per breakpoint), `gap`, `align`, `justify`, `wrap` |
141
+ | `Cluster` | Items of their own width on a line that wraps: tags, buttons. | `gap`, `align`, `justify` |
142
+ | `Center` | A column no wider than a measure, in the middle; the gutter outside the measure. | `maxWidth`, `gutter`, `intrinsic` |
143
+ | `Grid` | Equal columns: as many as fit over a minimum width, or a number of them. | `minColumnWidth`, `auto` (`fill` \| `fit`), `columns` (one per breakpoint), `gap` |
144
+ | `Sidebar` | A side of a set width beside the content; the two stack when the content would be under its minimum. | `aside`, `side` (`start` \| `end`), `sideWidth`, `contentMin`, `gap`, `align` |
145
+ | `Split` | Two panes sharing the width by a ratio, stacked under a width of their holder. | `ratio`, `collapseBelow`, `gap`, `align` |
146
+ | `Switcher` | A row of equal shares or a column, never something between. | `threshold`, `limit`, `gap` |
147
+ | `HolyGrail` | Header, footer, and the content with a side on its left, its right or both; one column under a width of its holder (a container query). | `header`, `footer`, `left`, `right`, `leftWidth`, `rightWidth`, `collapseBelow`, `gap`, `landmarks` |
148
+ | `Masonry` | Items of unequal heights packed in columns, in reading order. | `minColumnWidth`, `maxColumns`, `columns` (one per breakpoint), `gap`, `onLayout`; `Masonry.Item span="full"` |
149
+
150
+ ```tsx
151
+ import { Card, Masonry } from '@datalayer/primer-addons';
152
+
153
+ <Masonry minColumnWidth={280} gap={3}>
154
+ {specs.map(spec => <Card key={spec.id} border>โ€ฆ</Card>)}
155
+ {specs.length === 0 && (
156
+ <Masonry.Item span="full"><Card dashed>Nothing matches.</Card></Masonry.Item>
157
+ )}
158
+ </Masonry>
159
+ ```
160
+
161
+ `Masonry` places each item, in its order, at the top of the shortest column (the leftmost of those that are level). An item is never above the one before it, so the order reads down the page and left to right, and the elements stay in that order: Tab and a screen reader follow what is seen โ€” which CSS columns do not give (they read down the first column, then the second). Any child is an item (a `Card`, a link, anything); it gets the column's width and keeps its height.
162
+
163
+ - **Fast.** One `ResizeObserver` watches the masonry's width and every item's height (a picture that loads late, a card that opens); whatever changed, there is one layout per frame (`requestAnimationFrame`). A change of height reads nothing from the page โ€” the observer hands the sizes over; a change of width writes the widths, reads the heights once, writes the places: never a read between two writes. Only the items that move are written, and React renders nothing for a layout. Measured in the gallery (headless Chromium): with 1200 cards, a height change that moves 860 cards takes about 2 ms of script, at 60 frames a second; a new width is laid out in about 11 ms for 300 cards and 17 ms for 600, the browser's own reflow of the cards included, and its frames are shorter than those of the same cards in a CSS grid.
164
+ - **First paint.** Before it can measure โ€” the server's HTML, a browser without `ResizeObserver`, a masonry that is hidden โ€” the items are a CSS grid of the same columns, in the same order, each at its own height. In a browser the packing is done in a layout effect, before the first paint.
165
+ - The masonry is what its items are placed in: pad a parent, not the masonry.
166
+
101
167
  ## Reactor Plugins
102
168
 
103
169
  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 / auto switch centred above the theme
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 / auto switch. Default: shown. */
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 / auto switch alone.
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
- const colorModeSwitch = (_jsxs(SegmentedControl, { "aria-label": "Color mode", size: "small", onChange: (index) => {
64
- const modes = ["light", "dark", "auto"];
65
- onColorModeChange(modes[index]);
66
- }, children: [_jsx(SegmentedControl.IconButton, { selected: colorMode === "light", icon: SunIcon, "aria-label": "Light" }), _jsx(SegmentedControl.IconButton, { selected: colorMode === "dark", icon: MoonIcon, "aria-label": "Dark" }), _jsx(SegmentedControl.IconButton, { selected: colorMode === "auto", icon: DeviceDesktopIcon, "aria-label": "Auto" })] }));
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 / auto switch alone. */
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 / auto switch alone. */
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 / auto
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;
@@ -12,3 +12,4 @@ export default meta;
12
12
  type Story = StoryObj<typeof meta>;
13
13
  export declare const CopyToClipboard: Story;
14
14
  export declare const AllButtons: Story;
15
+ export declare const Split: Story;
@@ -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;
@@ -4,3 +4,4 @@ export * from './DownloadJsonButton';
4
4
  export * from './LongActionButton';
5
5
  export * from './UploadButton';
6
6
  export * from './VariantType';
7
+ export * from './SplitButton';
@@ -8,3 +8,4 @@ export * from './DownloadJsonButton';
8
8
  export * from './LongActionButton';
9
9
  export * from './UploadButton';
10
10
  export * from './VariantType';
11
+ export * from './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";
@@ -0,0 +1,5 @@
1
+ /*
2
+ * Copyright (c) 2021-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ 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>';