@spaced-out/ui-design-system 0.1.29 → 0.1.30

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.
@@ -108,7 +108,7 @@ module.exports = {
108
108
  config.resolve.extensions.push('.js', '.jsx');
109
109
  return config;
110
110
  },
111
- staticDirs: ['public'],
111
+ staticDirs: ['public', '../design-tokens'],
112
112
  framework: {
113
113
  name: '@storybook/react-webpack5',
114
114
  options: {},
@@ -113,7 +113,7 @@
113
113
  font-family: 'Centra No 2';
114
114
  }
115
115
 
116
- .sbdocs *:not(i) {
116
+ .sbdocs *:not(i):not(pre span) {
117
117
  font-family: 'Centra No 2' !important;
118
118
  }
119
119
 
@@ -149,6 +149,11 @@
149
149
  background-color: #f1f1f5 !important;
150
150
  box-shadow: none !important;
151
151
  border-color: #d3d2e0 !important;
152
+ font-family: 'Monaco' !important;
153
+ }
154
+
155
+ pre span {
156
+ font-family: 'Monaco' !important;
152
157
  }
153
158
 
154
159
  a.sbdocs {
package/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.30](https://github.com/spaced-out/ui-design-system/compare/v0.1.29...v0.1.30) (2023-06-06)
6
+
7
+
8
+ ### Features
9
+
10
+ * 🛸 download tokens textarea placeholder fixes 🛸 ([763829a](https://github.com/spaced-out/ui-design-system/commit/763829a08a3355613b50133288bb89b98745e88b))
11
+ * hooks and utils stories ([74e22fa](https://github.com/spaced-out/ui-design-system/commit/74e22fa1c315eb7d415501e8da39aa93ef968167))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * added import docs for utils and hooks ([2f8d3a8](https://github.com/spaced-out/ui-design-system/commit/2f8d3a8e0fe99d37c9f6f00a681affaaf9938efa))
17
+ * stories fixes ([62fa978](https://github.com/spaced-out/ui-design-system/commit/62fa97803eb8250b0d1b227b68cf68f50a1ebc19))
18
+ * typo fixes ([29c50ad](https://github.com/spaced-out/ui-design-system/commit/29c50ad526996f4d9f95e575ee5d239ad68e6c5c))
19
+
5
20
  ### [0.1.29](https://github.com/spaced-out/ui-design-system/compare/v0.1.28...v0.1.29) (2023-06-01)
6
21
 
7
22
 
@@ -1,5 +1,7 @@
1
- const { readdirSync, statSync } = require("fs");
2
- const { join } = require("path");
1
+ const {readdirSync, statSync} = require('fs');
2
+ const {join} = require('path');
3
+
4
+
3
5
  const dirs = (p) =>
4
6
  readdirSync(p).filter((f) => statSync(join(p, f)).isDirectory());
5
- module.exports = dirs(__dirname);
7
+ module.exports = dirs(__dirname);
@@ -94,6 +94,10 @@
94
94
  background-color: colorFillDisabled;
95
95
  }
96
96
 
97
+ textarea::placeholder {
98
+ color: colorTextSecondary;
99
+ }
100
+
97
101
  .inputDisabled textarea::placeholder {
98
102
  color: inherit;
99
103
  }
@@ -1,5 +1,4 @@
1
1
  // @flow strict
2
-
3
2
  import * as React from 'react';
4
3
 
5
4
  import classify from '../classify';
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getSortedTokenNames = exports.getRandomDataVariation = exports.filterTableDataBySearchText = exports.dataVariations = void 0;
6
+ exports.handleDownload = exports.getSortedTokenNames = exports.getRandomDataVariation = exports.filterTableDataBySearchText = exports.dataVariations = void 0;
7
7
 
8
8
  const dataVariations = [{
9
9
  title: 'The Great HTML Escape 🎩🌐',
@@ -151,4 +151,18 @@ const getRandomDataVariation = () => {
151
151
  const randomIndex = Math.floor(Math.random() * dataVariations.length);
152
152
  return dataVariations[randomIndex];
153
153
  };
154
- exports.getRandomDataVariation = getRandomDataVariation;
154
+ exports.getRandomDataVariation = getRandomDataVariation;
155
+ const handleDownload = (path, fileName) => {
156
+ const filePath = `../../../${path}`;
157
+ fetch(filePath).then(response => response.blob()).then(blob => {
158
+ const url = URL.createObjectURL(blob);
159
+ const link = document.createElement('a');
160
+ link.href = url;
161
+ link.download = fileName;
162
+ link.click();
163
+ URL.revokeObjectURL(url);
164
+ }).catch(error => {
165
+ console.error('Error downloading the JSON file:', error);
166
+ });
167
+ };
168
+ exports.handleDownload = handleDownload;
@@ -226,3 +226,21 @@ export const getRandomDataVariation = (): DataVariation => {
226
226
  const randomIndex: number = Math.floor(Math.random() * dataVariations.length);
227
227
  return dataVariations[randomIndex];
228
228
  };
229
+
230
+ export const handleDownload = (path: string, fileName: string) => {
231
+ const filePath = `../../../${path}`;
232
+
233
+ fetch(filePath)
234
+ .then((response) => response.blob())
235
+ .then((blob) => {
236
+ const url = URL.createObjectURL(blob);
237
+ const link = document.createElement('a');
238
+ link.href = url;
239
+ link.download = fileName;
240
+ link.click();
241
+ URL.revokeObjectURL(url);
242
+ })
243
+ .catch((error) => {
244
+ console.error('Error downloading the JSON file:', error);
245
+ });
246
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {