@digital-ai/dot-illustrations 2.0.42 → 2.0.43

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 (2) hide show
  1. package/README.md +172 -58
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,102 +1,216 @@
1
- # dot-illustrations and integrations
1
+ # dot-illustrations
2
2
 
3
- A central place for the design team to keep illustrations all graphical assets for dev teams to find them.
3
+ Central asset library for Digital.ai UX illustrations and integration logos for use in products and documentation.
4
4
 
5
- Files are organized in 2 separate folders
6
- - illustrations
7
- - integrations
5
+ 📖 **[Browse the demo →](https://digital-ai.github.io/dot-illustrations/demo/)**
8
6
 
9
- ## Illustrations
10
- ![image](https://github.com/user-attachments/assets/58b7283a-f595-4c28-a1f8-f2d98ccdb33b)
7
+ ---
11
8
 
9
+ ## Contents
12
10
 
13
- In each one of those, there is a light and dark folder to match the color style if you using a material theme do not forget to update the illustration folder directory light / dark to match the theme of the switch
11
+ - [Asset types](#asset-types)
12
+ - [Browse the demo](#browse-the-demo)
13
+ - [Using illustrations](#using-illustrations)
14
+ - [Using integration logos](#using-integration-logos)
15
+ - [Adding a new illustration or integration logo](#adding-a-new-illustration-or-integration-logo)
16
+ - [Option A — Upload via demo UI (recommended)](#option-a--upload-via-demo-ui-recommended)
17
+ - [Option B — Manual contribution](#option-b--manual-contribution)
18
+ - [Troubleshooting](#troubleshooting)
14
19
 
20
+ ---
15
21
 
16
- ## Illustrations usage
22
+ ## Asset types
17
23
 
18
- ### React Component via `dot-components`
24
+ | Type | Folder | Themes | React component |
25
+ |---|---|---|---|
26
+ | **Illustrations** | `illustrations/light/` + `illustrations/dark/` | Light + Dark | `DotIllustration` |
27
+ | **Integration logos** | `integrations/` | Single (no dark variant) | — (HTML only) |
19
28
 
20
- (PENDING WIP): If you are already consuming `dot-components` then the easiest way would be to use the `DotIllustration` component, [documentation is available here](https://digital-ai.github.io/dot-components/?path=/story/components-illustration--default)
29
+ ---
21
30
 
22
- ### Standard HTML
31
+ ## Browse the demo
32
+
33
+ **https://digital-ai.github.io/dot-illustrations/demo/**
34
+
35
+ The demo lets you:
36
+ - Browse **72 illustrations** (Global and Dashboards) and **113 integration logos**
37
+ - Switch between **Illustrations** and **Integrations** using the section switcher next to the search bar
38
+ - **Search** with fuzzy autocomplete across both sections
39
+ - Filter illustrations by **A–Z** (integrations only — 113 logos benefit from alphabet navigation)
40
+ - **Click any card** to open a detail modal with the copy-ready code snippet
41
+ - **Star items** to save them in your Favourites (persisted in your browser)
42
+ - **Upload a new illustration or integration logo** directly from the browser
43
+
44
+ ---
45
+
46
+ ## Using illustrations
47
+
48
+ ### React — `DotIllustration` via `dot-components`
49
+
50
+ ```tsx
51
+ import { DotIllustration } from '@digital-ai/dot-components';
52
+
53
+ // Light (default)
54
+ <DotIllustration illustrationId="empty" />
55
+
56
+ // Dark
57
+ <DotIllustration illustrationId="done" theme="dark" />
58
+
59
+ // With tooltip
60
+ <DotIllustration illustrationId="features" tooltip="See all features" />
61
+ ```
62
+
63
+ [Full `DotIllustration` documentation →](https://digital-ai.github.io/dot-components/?path=/story/components-illustration--default)
23
64
 
24
- If not using `dot-components` then import `@digital-ai/dot-illustrations` into your project as an npm package or as a git submodule. You can also download the contents of this repository and copy the `index.css` and asset folders into your project.
65
+ ### Standard HTML
25
66
 
26
67
  ```html
27
68
  <link rel="stylesheet" href="./index.css" />
28
69
 
29
- ...
70
+ <!-- Light theme -->
71
+ <span class="dot-illustration">
72
+ <img class="done light" />
73
+ </span>
30
74
 
75
+ <!-- Dark theme -->
31
76
  <span class="dot-illustration">
32
- <img class="${illustration-ID}"/>
77
+ <img class="done dark" />
33
78
  </span>
34
79
  ```
35
80
 
36
- ## Integrations
81
+ Always set an explicit `width` and `height` — the library has no built-in sizing defaults.
37
82
 
38
- ![image](https://github.com/user-attachments/assets/1ce8ed3e-fa44-48ce-8903-f9532d6dcf1a)
83
+ ---
39
84
 
40
- ## Integrations usage
85
+ ## Using integration logos
41
86
 
42
- ### React Component via `dot-components` COMING UP SOON
87
+ There is no React component for integrations use the HTML approach directly.
43
88
 
44
- (PENDING WIP): If you are already consuming `dot-components` then the easiest way would be to use the `DotIllustration` component, [documentation is available here](https://digital-ai.github.io/dot-components/?path=/story/components-illustration--default)
89
+ ```html
90
+ <link rel="stylesheet" href="./index.css" />
45
91
 
46
- ### Standard HTML
92
+ <span class="dot-integration">
93
+ <img class="jenkins" />
94
+ </span>
95
+ ```
47
96
 
48
- If not using `dot-components` then import `@digital-ai/dot-illustrations` into your project as an npm package or as a git submodule. You can also download the contents of this repository and copy the `./integrations/index.css` and asset folders into your project.
97
+ > Integration logos are **single-theme only** they have no dark variant.
49
98
 
50
- ```html
51
- <link rel="stylesheet" href="./integrations/index.css" />
99
+ ---
52
100
 
53
- ...
101
+ ## Adding a new illustration or integration logo
54
102
 
55
- <span class="dot-integration">
56
- <img class="${integration-ID}"/>
57
- </span>
103
+ ### Option A — Upload via demo UI (recommended)
104
+
105
+ The demo includes a built-in upload flow that handles everything automatically.
106
+
107
+ #### Prerequisites
108
+
109
+ Run the local proxy once so the demo can authenticate as you without entering a token:
110
+
111
+ ```bash
112
+ # From the repo root (requires gh CLI authenticated: gh auth login)
113
+ node demo/local-proxy.js
58
114
  ```
59
115
 
60
- ## Contributing
116
+ #### Steps
61
117
 
62
- To add new illustrations, first add the new file to the appropriate location in one of the asset folders (illustrations or integrations.). The file names should not contain spaces or special characters, and they must be uniquely named project wide.
118
+ 1. Open **https://digital-ai.github.io/dot-illustrations/demo/** (or your local server)
119
+ 2. Click **Upload New** in the header
120
+ 3. Choose what you are uploading:
63
121
 
64
- Next, add new class selectors to `index.css` that set the content to your new files. Define the light version first, then if you have a dark version, define it second with an additional .dark-theme class selector. For example:
65
- ```css
66
- /* ------------------ GLOBAL ILLUSTRATIONS -------------------- */
67
- /*Path: --------- './illustrations/light/global/*.svg ----- light */
68
- /*Path: --------- './illustrations/dark/global/*.svg ------ dark */
122
+ **Illustration**
123
+ - Enter the **Illustration ID** (lowercase, hyphens only — e.g. `my-new-state`)
124
+ - Select the **Category**: Global or Dashboards
125
+ - Upload the **Light SVG** (☀️) and **Dark SVG** (🌙) — both are required
126
+ - Click **Connect GitHub** then **Create Pull Request**
69
127
 
70
- .dot-illustration img.done.light {
71
- content: url('./illustrations/light/global/done.svg');
72
- }
128
+ **Integration logo**
129
+ - Enter the **Integration ID** (lowercase, hyphens — e.g. `my-tool`)
130
+ - Upload the single **SVG** file (no dark variant needed)
131
+ - Click **Connect GitHub** then **Create Pull Request**
73
132
 
74
- .dot-illustration img.done.dark {
75
- content: url('./illustrations/dark/global/done.svg');
76
- }
77
- ```
133
+ The PR is created automatically with:
134
+ - SVG file(s) committed to the correct folder
135
+ - CSS rule added to `index.css`
136
+ - ID added to `demo/script.js` in alphabetical order
78
137
 
79
- Finally, update `demo/script.js` by adding your new illustrations in function "doMagic" by ID name like so:
138
+ > The local proxy uses your existing `gh auth` credentials no token input required.
80
139
 
81
- ```js
82
- // Global arrange from A-Z
83
- "add-new",
84
- "add-new-grid",
85
- "add-team",
86
- "add-user",
87
- "assets",
88
- ```
140
+ ---
141
+
142
+ ### Option B — Manual contribution
143
+
144
+ Use this if the upload UI is not available.
145
+
146
+ #### Adding an illustration
147
+
148
+ 1. Add your SVG files to the correct folders:
149
+ ```
150
+ illustrations/light/global/my-new-state.svg
151
+ illustrations/dark/global/my-new-state.svg
152
+ ```
153
+ Use `dashboards/` instead of `global/` for dashboard-specific illustrations.
154
+
155
+ 2. Add CSS rules to `index.css`:
156
+ ```css
157
+ .dot-illustration img.my-new-state.light {
158
+ content: url('./illustrations/light/global/my-new-state.svg');
159
+ }
160
+ .dot-illustration img.my-new-state.dark {
161
+ content: url('./illustrations/dark/global/my-new-state.svg');
162
+ }
163
+ ```
164
+
165
+ 3. Add the ID to `demo/script.js` inside the correct list (`globalList` or `dashboardsList`), **alphabetically ordered**:
166
+ ```js
167
+ const globalList = [
168
+ "add-new",
169
+ "my-new-state", // ← inserted alphabetically
170
+ "no-chat",
171
+ ];
172
+ ```
89
173
 
90
- Once complete, please submit a pull request with the updated files and request someone to review in the [#dot-components](https://app.slack.com/client/T02GN6UQX/C01GVS9T7GV) channel on slack.
174
+ #### Adding an integration logo
91
175
 
92
- More information is available in the [.dot design system](https://zeroheight.com/4a9ac476a/p/86a804-illustrations)
176
+ 1. Add your SVG to `integrations/my-tool.svg`
177
+
178
+ 2. Add a CSS rule to `index.css`:
179
+ ```css
180
+ .dot-integration img.my-tool {
181
+ content: url('./integrations/my-tool.svg');
182
+ }
183
+ ```
184
+
185
+ 3. Add the ID to `demo/script.js` inside `integrationsList`, **alphabetically ordered**:
186
+ ```js
187
+ const integrationsList = [
188
+ "microsoft-teams",
189
+ "my-tool", // ← inserted alphabetically
190
+ "mysql",
191
+ ];
192
+ ```
193
+
194
+ 4. Open a pull request and post in [#dot-components](https://app.slack.com/client/T02GN6UQX/C01GVS9T7GV) on Slack for review.
195
+
196
+ ---
93
197
 
94
198
  ## Troubleshooting
95
199
 
96
- If for some reason the latest version of `dot-illustrations` is not available in `dot-components` then you can update your `package.json` to use the latest version of `dot-illustrations` by adding the following to your `resolutions` section.
200
+ **Latest `dot-illustrations` not picked up by `dot-components`**
201
+
202
+ Add a `resolutions` entry to your `package.json`:
97
203
 
98
204
  ```json
99
- "resolutions": {
100
- "@digital-ai/dot-illustrations": "latest",
101
- }
102
- ```
205
+ "resolutions": {
206
+ "@digital-ai/dot-illustrations": "latest"
207
+ }
208
+ ```
209
+
210
+ **Integration image not showing**
211
+
212
+ Make sure the CSS is imported: `<link rel="stylesheet" href="./index.css" />`. The library uses `content: url()` on `<img>` elements — the `<img>` tag must have **no `src` attribute** and the class must match the integration ID exactly.
213
+
214
+ ---
215
+
216
+ More information: [dot design system — Illustrations](https://zeroheight.com/4a9ac476a/p/86a804-illustrations)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-illustrations",
3
- "version": "2.0.42",
3
+ "version": "2.0.43",
4
4
  "description": "A central place for the design team to keep illustrations and for dev teams to find them.",
5
5
  "main": "./index.css",
6
6
  "scripts": {