@digital-ai/dot-illustrations 2.0.21 → 2.0.23

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/demo/demo.css CHANGED
@@ -7,68 +7,6 @@ body {
7
7
  margin: 0 auto;
8
8
  height: 100%;
9
9
  text-align: center;
10
- overflow-y: hidden;
11
- }
12
-
13
- .search-wrapper {
14
- border-radius: 4px;
15
- border: #878f9a 1px solid;
16
- top: 0;
17
- background-color: #fff;
18
- z-index: 999;
19
- display: flex;
20
- width: 720px;
21
- height: 48px;
22
- flex-direction: column;
23
- margin: 24px auto;
24
- gap: 4px;
25
- padding-left: 12px;
26
- padding-right: 12px;
27
- }
28
-
29
- input {
30
- font-size: 16px;
31
- font-weight: 500;
32
- }
33
-
34
- .demo-wrapper {
35
- display: flex;
36
- flex-wrap: wrap;
37
- font-size: 2.5rem;
38
- justify-content: center;
39
- width: 100vw;
40
- height: calc(100vh - 200px);
41
- overflow-y: auto;
42
- padding-bottom: 200px;
43
- align-content: flex-start;
44
- }
45
-
46
- .demo-wrapper > div {
47
- z-index: 1;
48
- display: grid;
49
- grid-template-rows: 1fr 1fr;
50
- width: 220px;
51
- height: 240px;
52
- min-width: 220px;
53
- max-width: 460px;
54
- max-height: 520px;
55
- min-height: 220px;
56
- overflow: hidden;
57
- background: #fff;
58
- margin: 16px;
59
- padding: 24px;
60
- border: solid 1px #e1e5eb;
61
- border-radius: 4px;
62
- transition: opacity 0.3s ease;
63
- /* DropShadow/dropshadow-normal */
64
- box-shadow: 0px 8px 16px 0px rgba(59, 72, 92, 0.16);
65
- position: relative;
66
- }
67
-
68
- .demo-wrapper > div:hover {
69
- opacity: 0.7;
70
- background: var(--Overlay-colors-default-overlay, #3B485C);
71
- z-index: 2;
72
10
  }
73
11
 
74
12
  img {
@@ -94,41 +32,9 @@ span {
94
32
  z-index: 0;
95
33
  }
96
34
 
97
-
98
35
  .copy-container{}
99
36
 
100
- /* Align buttons vertically in the nested div */
101
- .demo-wrapper .button-group {
102
- display: flex;
103
- flex-direction: column; /* Stack buttons vertically */
104
- align-items: center; /* Center buttons horizontally */
105
- gap: 8px; /* Add spacing between the buttons */
106
- margin-top: -102px;
107
- margin-bottom: 24px;
108
- }
109
-
110
- .button {
111
- position: relative; /* Make tooltip positioning relative to button */
112
- opacity: 0;
113
- transition: opacity 0.3s ease;
114
- border: solid 1px #667385;
115
- border-radius: 4px;
116
- background: #FFF;
117
- color: rgb(43, 50, 55);
118
- cursor: pointer;
119
- font-size: 16px;
120
- padding: 8px 16px;
121
- z-index: 29;
122
- }
123
-
124
- .demo-wrapper div:hover .button {
125
- opacity: 1;
126
- }
127
-
128
- .demo-wrapper div:hover img {
129
- opacity: 0.5;
130
- }
131
-
37
+ /* Tooltip for copy buttons */
132
38
  .tooltiptext {
133
39
  visibility: hidden;
134
40
  background-color: black;
@@ -138,12 +44,12 @@ span {
138
44
  padding: 5px;
139
45
  position: absolute;
140
46
  z-index: 1;
141
- bottom: 125%; /* Position the tooltip above the button */
47
+ bottom: 125%;
142
48
  left: 50%;
143
49
  transform: translateX(-50%);
144
50
  opacity: 0;
145
51
  transition: opacity 0.3s;
146
- white-space: nowrap; /* Prevent text wrapping */
52
+ white-space: nowrap;
147
53
  }
148
54
 
149
55
  .button:hover .tooltiptext {
@@ -151,27 +57,26 @@ span {
151
57
  opacity: 1;
152
58
  }
153
59
 
154
-
155
60
  .codeBlock {
156
61
  visibility: hidden;
157
- white-space: pre-wrap; /* Preserve code formatting */
62
+ white-space: pre-wrap;
158
63
  background-color: #f4f4f4;
159
64
  padding: 10px;
160
65
  border: 1px solid #ddd;
161
66
  border-radius: 5px;
162
- max-width: 300px; /* Optional: limit code block width */
163
- overflow: auto; /* Scroll if content is too wide */
67
+ max-width: 300px;
68
+ overflow: auto;
164
69
  }
165
70
 
166
71
  .codeInclude {
167
72
  color: rgb(43, 50, 55);
168
- white-space: pre-wrap; /* Preserve code formatting */
73
+ white-space: pre-wrap;
169
74
  background-color: #f4f4f4;
170
75
  padding: 10px;
171
76
  border: 1px solid #ddd;
172
77
  border-radius: 5px;
173
- max-width: 300px; /* Optional: limit code block width */
174
- overflow: auto; /* Scroll if content is too wide */
78
+ max-width: 300px;
79
+ overflow: auto;
175
80
  }
176
81
 
177
82
  /* When dark mode is active */
@@ -183,5 +88,94 @@ body.dark-mode .dot-illustration img.dark {
183
88
  display: block;
184
89
  background-color: #232E40;
185
90
  border-radius: 8px;
91
+ }
92
+
93
+ #floating-bar {
94
+ pointer-events: none;
95
+ opacity: 0;
96
+ transform: translateY(-100%);
97
+ }
98
+ #floating-bar.floating-bar-visible {
99
+ pointer-events: auto;
100
+ opacity: 1;
101
+ transform: translateY(0);
102
+ transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s cubic-bezier(0.4,0,0.2,1);
103
+ }
104
+ .floating-search {
105
+ min-width: 0;
106
+ width: 120px;
107
+ max-width: 200px;
108
+ }
109
+ @media (min-width: 640px) {
110
+ .floating-search {
111
+ width: 200px;
112
+ max-width: 320px;
113
+ }
114
+ }
115
+ .floating-tab {
116
+ min-width: 60px;
117
+ padding-left: 0.75rem;
118
+ padding-right: 0.75rem;
119
+ font-size: 0.85rem;
120
+ }
186
121
 
122
+ /* Modal styles */
123
+ #illustration-modal {
124
+ display: none;
125
+ align-items: center;
126
+ justify-content: center;
127
+ background: rgba(0,0,0,0.5);
128
+ }
129
+ #illustration-modal.active {
130
+ display: flex;
131
+ }
132
+ #illustration-modal .modal-content {
133
+ background: white;
134
+ border-radius: 1rem;
135
+ box-shadow: 0 10px 40px rgba(0,0,0,0.2);
136
+ max-width: 90vw;
137
+ max-height: 90vh;
138
+ overflow-y: auto;
139
+ padding: 2rem;
140
+ position: relative;
141
+ }
142
+ #illustration-modal .modal-image img {
143
+ width: 220px;
144
+ height: 220px;
145
+ object-fit: contain;
146
+ border-radius: 0.75rem;
147
+ background: #f3f4f6;
148
+ margin-bottom: 1rem;
149
+ }
150
+ #illustration-modal .iconID {
151
+ font-size: 1.2rem;
152
+ font-weight: 600;
153
+ }
154
+ #illustration-modal .button-group {
155
+ margin-bottom: 1rem;
156
+ }
157
+ #illustration-modal #modal-close {
158
+ position: absolute;
159
+ top: 1rem;
160
+ right: 1rem;
161
+ background: none;
162
+ border: none;
163
+ font-size: 2rem;
164
+ color: #aaa;
165
+ cursor: pointer;
166
+ z-index: 10;
167
+ transition: color 0.2s;
168
+ }
169
+ #illustration-modal #modal-close:hover {
170
+ color: #333;
171
+ }
172
+ @media (max-width: 600px) {
173
+ #illustration-modal .modal-content {
174
+ padding: 1rem;
175
+ max-width: 98vw;
176
+ }
177
+ #illustration-modal .modal-image img {
178
+ width: 140px;
179
+ height: 140px;
180
+ }
187
181
  }
@@ -0,0 +1,67 @@
1
+ {
2
+ "add-new": "This is the add-new illustration.",
3
+ "ai": "This is the ai illustration.",
4
+ "add-new-grid": "This is the add-new-grid illustration.",
5
+ "add-team": "This is the add-team illustration.",
6
+ "add-user": "This is the add-user illustration.",
7
+ "assets": "This is the assets illustration.",
8
+ "analysis-circle": "This is the analysis-circle illustration.",
9
+ "community": "This is the community illustration.",
10
+ "chart": "This is the chart illustration.",
11
+ "custom-dashboards": "This is the custom-dashboards illustration.",
12
+ "dependency-down": "This is the dependency-down illustration.",
13
+ "dependency-up": "This is the dependency-up illustration.",
14
+ "disconnected": "This is the disconnected illustration.",
15
+ "done": "This is the done illustration.",
16
+ "dora-metrics-circle": "This is the dora-metrics-circle illustration.",
17
+ "download": "This is the download illustration.",
18
+ "empty": "This is the empty illustration.",
19
+ "error-fourhundredfour": "This is the error-fourhundredfour illustration.",
20
+ "error-fivehundred": "This is the error-fivehundred illustration.",
21
+ "error-fivehundredthree": "This is the error-fivehundredthree illustration.",
22
+ "error-fourhundredthree": "This is the error-fourhundredthree illustration.",
23
+ "favorite": "This is the favorite illustration.",
24
+ "features": "This is the features illustration.",
25
+ "folder-versioning": "This is the folder-versioning illustration.",
26
+ "forbiden-access": "This is the forbiden-access illustration.",
27
+ "filter-empty": "This is the filter-empty illustration.",
28
+ "launch": "This is the launch illustration.",
29
+ "no-files": "This is the no-files illustration.",
30
+ "no-filters": "This is the no-filters illustration.",
31
+ "nothing-defined": "This is the nothing-defined illustration.",
32
+ "password-token": "This is the password-token illustration.",
33
+ "protection-in-progress": "This is the protection-in-progress illustration.",
34
+ "reports": "This is the reports illustration.",
35
+ "scan-document": "This is the scan-document illustration.",
36
+ "survey": "This is the survey illustration.",
37
+ "user": "This is the user illustration.",
38
+ "ui-ux-improvements": "This is the ui-ux-improvements illustration.",
39
+ "upload": "This is the upload illustration.",
40
+ "work-item": "This is the work-item illustration.",
41
+ "workflows-main": "This is the workflows-main illustration.",
42
+ "research": "This is the research illustration.",
43
+ "commitrepo": "This is the commitrepo illustration.",
44
+ "analysis": "This is the analysis illustration.",
45
+ "automation": "This is the automation illustration.",
46
+ "burn-down": "This is the burn-down illustration.",
47
+ "burn-up": "This is the burn-up illustration.",
48
+ "change-credit-score": "This is the change-credit-score illustration.",
49
+ "change-data-quality": "This is the change-data-quality illustration.",
50
+ "change-executive": "This is the change-executive illustration.",
51
+ "change-impact-detection": "This is the change-impact-detection illustration.",
52
+ "change-impact-hotspots": "This is the change-impact-hotspots illustration.",
53
+ "change-failure-factors": "This is the change-failure-factors illustration.",
54
+ "change-failure-prediction": "This is the change-failure-prediction illustration.",
55
+ "CRP-failure-prediction-monitoring": "This is the CRP-failure-prediction-monitoring illustration.",
56
+ "custom": "This is the custom illustration.",
57
+ "defect": "This is the defect illustration.",
58
+ "dependency": "This is the dependency illustration.",
59
+ "dora": "This is the dora illustration.",
60
+ "executive": "This is the executive illustration.",
61
+ "change-impact": "This is the change-impact illustration.",
62
+ "item": "This is the item illustration.",
63
+ "late-task": "This is the late-task illustration.",
64
+ "onboarding": "This is the onboarding illustration.",
65
+ "data-extraction": "This is the data-extraction illustration.",
66
+ "workflow": "This is the workflow illustration."
67
+ }
package/demo/index.html CHANGED
@@ -3,23 +3,85 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <title>Dot Illustrations Library</title>
6
+ <!-- Tailwind CSS CDN -->
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <!-- Heroicons CDN for Tailwind icons -->
9
+ <script src="https://unpkg.com/@heroicons/vue@2.0.18/dist/heroicons.min.js"></script>
6
10
  <link rel="stylesheet" href="../index.css" />
7
11
  <link rel="stylesheet" href="./demo.css" />
8
12
  <script src="script.js" defer></script>
13
+ <script>
14
+ // Tailwind dark mode config
15
+ tailwind.config = { darkMode: 'class' };
16
+ </script>
9
17
  </head>
10
- <body>
11
- <h1>Dot Illustrations</h1>
12
- <p>
13
- For more details please see
14
- <a href="https://github.com/digital-ai/dot-illustrations" target="_blank">
15
- https://github.com/digital-ai/dot-illustrations
16
- </a>
17
- </p> <p>For using illustrations as HTML include <code class="codeInclude">link rel="stylesheet" href="./index.css"</code></p>
18
- </p>
19
- <input class="search-wrapper" type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for illustrations...">
20
- <button id="theme-toggle">Switch to dark mode</button>
21
- <div id="illustration-list" class="demo-wrapper dot-illustration">
22
-
18
+ <body class="bg-gray-50 dark:bg-gray-900 min-h-screen transition-colors duration-300">
19
+ <div id="floating-bar" class="fixed top-0 left-0 w-full z-50 flex items-center justify-center bg-white/90 dark:bg-gray-900/90 shadow-md px-2 py-1 transition-transform duration-300 -translate-y-full" style="backdrop-filter: blur(6px);">
20
+ <div class="flex flex-row items-center gap-2 w-full max-w-5xl">
21
+ <input class="floating-search flex-1 px-2 py-1 border border-gray-300 dark:border-gray-700 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 bg-white dark:bg-gray-800 text-gray-900 dark:text-white text-sm" type="text" id="floatingInput" autocomplete="off" placeholder="Search...">
22
+ <nav class="inline-flex rounded shadow overflow-hidden border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800" role="tablist">
23
+ <button class="floating-tab tab-btn px-3 py-1 text-xs font-medium focus:outline-none transition-colors duration-200 text-blue-600 dark:text-blue-400 bg-blue-100 dark:bg-blue-900" id="floating-tab-all" data-tab="all" aria-selected="true" role="tab">All</button>
24
+ <button class="floating-tab tab-btn px-3 py-1 text-xs font-medium focus:outline-none transition-colors duration-200 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700" id="floating-tab-global" data-tab="global" aria-selected="false" role="tab">Global</button>
25
+ <button class="floating-tab tab-btn px-3 py-1 text-xs font-medium focus:outline-none transition-colors duration-200 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700" id="floating-tab-dashboards" data-tab="dashboards" aria-selected="false" role="tab">Dashboards</button>
26
+ <button class="floating-tab tab-btn px-3 py-1 text-xs font-medium focus:outline-none transition-colors duration-200 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700" id="floating-tab-favourites" data-tab="favourites" aria-selected="false" role="tab">Favourites</button>
27
+ </nav>
23
28
  </div>
29
+ </div>
30
+ <div class="container mx-auto px-4 py-8">
31
+ <div class="flex flex-col md:flex-row items-center justify-between mb-6 gap-4">
32
+ <h1 class="text-3xl md:text-5xl font-bold text-center md:text-left text-gray-900 dark:text-white">Dot Illustrations</h1>
33
+ <button id="theme-toggle" aria-label="Toggle dark mode" class="flex items-center gap-2 px-4 py-2 bg-gray-200 dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-full shadow hover:bg-gray-300 dark:hover:bg-gray-700 transition focus:outline-none focus:ring-2 focus:ring-blue-500">
34
+ <span id="theme-icon" class="transition-transform duration-300">
35
+ <!-- Sun/Moon icon will be injected by JS -->
36
+ </span>
37
+ <span class="hidden sm:inline">Switch theme</span>
38
+ </button>
39
+ </div>
40
+ <p class="text-center text-gray-700 dark:text-gray-300 mb-2">
41
+ For more details please see
42
+ <a href="https://github.com/digital-ai/dot-illustrations" target="_blank" class="text-blue-600 dark:text-blue-400 underline hover:text-blue-800 dark:hover:text-blue-200 transition">https://github.com/digital-ai/dot-illustrations</a>
43
+ </p>
44
+ <p class="text-center text-gray-600 dark:text-gray-400 mb-6">For using illustrations as HTML include <code class="bg-gray-200 dark:bg-gray-800 px-2 py-1 rounded text-sm font-mono">link rel="stylesheet" href="./index.css"</code></p>
45
+ <div class="flex flex-col md:flex-row items-center justify-center gap-4 mb-8 relative">
46
+ <input class="search-wrapper w-full md:w-1/2 px-4 py-2 border border-gray-300 dark:border-gray-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 bg-white dark:bg-gray-800 text-gray-900 dark:text-white transition" type="text" id="myInput" autocomplete="off" placeholder="Search for illustrations...">
47
+ <div id="search-suggestions" class="absolute top-full left-1/2 -translate-x-1/2 w-full md:w-1/2 z-50 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-b-lg shadow-lg hidden max-h-72 overflow-y-auto"></div>
48
+ </div>
49
+ <!-- Tabs -->
50
+ <div class="mb-8 flex justify-center">
51
+ <nav class="inline-flex rounded-lg shadow overflow-hidden border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800" role="tablist">
52
+ <button class="tab-btn px-6 py-2 text-sm font-medium focus:outline-none transition-colors duration-200 text-blue-600 dark:text-blue-400 bg-blue-100 dark:bg-blue-900" id="tab-all" data-tab="all" aria-selected="true" role="tab">All Illustrations</button>
53
+ <button class="tab-btn px-6 py-2 text-sm font-medium focus:outline-none transition-colors duration-200 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700" id="tab-global" data-tab="global" aria-selected="false" role="tab">Global</button>
54
+ <button class="tab-btn px-6 py-2 text-sm font-medium focus:outline-none transition-colors duration-200 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700" id="tab-dashboards" data-tab="dashboards" aria-selected="false" role="tab">Dashboards</button>
55
+ <button class="tab-btn px-6 py-2 text-sm font-medium focus:outline-none transition-colors duration-200 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700" id="tab-favourites" data-tab="favourites" aria-selected="false" role="tab">Favourites</button>
56
+ </nav>
57
+ </div>
58
+ <div id="illustration-list" class="demo-wrapper dot-illustration grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6 gap-6 max-h-[calc(100vh-300px)] overflow-y-auto px-2">
59
+ <!-- Illustrations will be injected here -->
60
+ </div>
61
+ </div>
62
+ <!-- Modal for illustration details -->
63
+ <div id="illustration-modal" class="fixed inset-0 z-50 flex items-center justify-center bg-black/50 dark:bg-black/70 hidden">
64
+ <div class="bg-white dark:bg-gray-900 rounded-xl shadow-2xl max-w-lg w-full p-6 relative flex flex-col items-center">
65
+ <button id="modal-close" class="absolute top-3 right-3 text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 text-2xl font-bold focus:outline-none">&times;</button>
66
+ <h2 class="text-xl font-semibold mb-4 w-full text-center text-gray-900 dark:text-gray-100">Illustration preview</h2>
67
+ <div id="modal-image" class="mb-4"></div>
68
+ <div class="w-full flex flex-col gap-2 mb-2">
69
+ <label class="text-xs font-medium text-gray-500 dark:text-gray-400" for="modal-id-input">Image ID</label>
70
+ <div class="flex flex-row items-center gap-2">
71
+ <input id="modal-id-input" class="flex-1 px-2 py-1 border border-gray-300 dark:border-gray-700 rounded bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white text-base font-mono" readonly />
72
+ <button id="modal-copy-id" class="button flex items-center justify-center px-2 py-1 text-xs text-gray-400 border border-gray-300 dark:border-gray-700 rounded bg-white dark:bg-gray-800 font-normal hover:bg-blue-100 dark:hover:bg-blue-900 transition relative text-center">Copy ID</button>
73
+ </div>
74
+ </div>
75
+ <div id="modal-description" class="w-full text-center text-sm text-gray-700 dark:text-gray-300 mb-4"></div>
76
+ <div class="w-full flex flex-col gap-2 mb-2">
77
+ <label class="text-xs font-medium text-gray-500 dark:text-gray-400" for="modal-code">Code</label>
78
+ <div class="flex flex-row items-center gap-2">
79
+ <textarea id="modal-code" class="flex-1 px-2 py-1 border border-gray-300 dark:border-gray-700 rounded bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white text-xs font-mono resize-none" rows="2" readonly></textarea>
80
+ <button id="modal-copy-code" class="button flex items-center justify-center px-2 py-1 text-xs text-gray-400 border border-gray-300 dark:border-gray-700 rounded bg-white dark:bg-gray-800 font-normal hover:bg-blue-100 dark:hover:bg-blue-900 transition relative text-center">Copy Code</button>
81
+ </div>
82
+ </div>
83
+ <button id="modal-close-bottom" class="mt-4 px-4 py-2 rounded bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 font-medium hover:bg-gray-300 dark:hover:bg-gray-600 transition">Close</button>
84
+ </div>
85
+ </div>
24
86
  </body>
25
87
  </html>