From 8a3af770bf4f2370a2b1209ca6ba8ada56bf204b Mon Sep 17 00:00:00 2001
From: Parth Shah <68707443+parth-dassana@users.noreply.github.com>
Date: Thu, 3 Dec 2020 15:35:56 -0800
Subject: [PATCH] v0.7.4 -> v0.7.5 (#164)
---
package-lock.json | 213 ++++++++++++++++--
package.json | 2 +-
src/__mocks__/table_mock_data.ts | 28 ++-
src/__snapshots__/storybook.test.ts.snap | 167 ++++++++------
.../ColoredDot/ColoredDot.stories.tsx | 59 +++++
src/components/ColoredDot/ColoredDot.test.tsx | 62 +++++
src/components/ColoredDot/index.tsx | 58 +++++
.../Form/FormToggle/FormToggle.test.tsx | 46 +++-
src/components/Form/FormToggle/index.tsx | 10 +-
src/components/Table/Table.stories.mdx | 19 +-
src/components/Table/Table.stories.tsx | 45 ++--
src/components/Table/__tests__/Table.test.tsx | 35 ++-
.../Table/fixtures/4_sample_data.ts | 26 +++
.../Table/fixtures/5_sample_data.ts | 78 +++++++
src/components/Table/index.tsx | 21 +-
src/components/Table/types.ts | 10 +
src/components/Table/utils.tsx | 20 +-
src/components/index.ts | 1 +
18 files changed, 747 insertions(+), 153 deletions(-)
create mode 100644 src/components/ColoredDot/ColoredDot.stories.tsx
create mode 100644 src/components/ColoredDot/ColoredDot.test.tsx
create mode 100644 src/components/ColoredDot/index.tsx
create mode 100644 src/components/Table/fixtures/4_sample_data.ts
create mode 100644 src/components/Table/fixtures/5_sample_data.ts
diff --git a/package-lock.json b/package-lock.json
index c8af1166..866693e5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@dassana-io/web-components",
- "version": "0.7.3",
+ "version": "0.7.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -12486,6 +12486,19 @@
"@babel/runtime": "^7.3.1",
"jss": "10.4.0",
"jss-preset-default": "10.4.0"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"css-loader": {
@@ -17912,24 +17925,6 @@
"verror": "1.10.0"
}
},
- "jss": {
- "version": "10.4.0",
- "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
- "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
- "requires": {
- "@babel/runtime": "^7.3.1",
- "csstype": "^3.0.2",
- "is-in-browser": "^1.1.3",
- "tiny-warning": "^1.0.2"
- },
- "dependencies": {
- "csstype": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.2.tgz",
- "integrity": "sha512-ofovWglpqoqbfLNOTBNZLSbMuGrblAf1efvvArGKOZMBrIoJeu5UsAipQolkijtyQx5MtAzT/J9IHj/CEY1mJw=="
- }
- }
- },
"jss-plugin-camel-case": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.4.0.tgz",
@@ -17938,6 +17933,19 @@
"@babel/runtime": "^7.3.1",
"hyphenate-style-name": "^1.0.3",
"jss": "10.4.0"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"jss-plugin-compose": {
@@ -17948,6 +17956,19 @@
"@babel/runtime": "^7.3.1",
"jss": "10.4.0",
"tiny-warning": "^1.0.2"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"jss-plugin-default-unit": {
@@ -17957,6 +17978,19 @@
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.4.0"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"jss-plugin-expand": {
@@ -17966,6 +18000,19 @@
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.4.0"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"jss-plugin-extend": {
@@ -17976,6 +18023,19 @@
"@babel/runtime": "^7.3.1",
"jss": "10.4.0",
"tiny-warning": "^1.0.2"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"jss-plugin-global": {
@@ -17985,6 +18045,19 @@
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.4.0"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"jss-plugin-nested": {
@@ -17995,6 +18068,19 @@
"@babel/runtime": "^7.3.1",
"jss": "10.4.0",
"tiny-warning": "^1.0.2"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"jss-plugin-props-sort": {
@@ -18004,6 +18090,19 @@
"requires": {
"@babel/runtime": "^7.3.1",
"jss": "10.4.0"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"jss-plugin-rule-value-function": {
@@ -18014,6 +18113,19 @@
"@babel/runtime": "^7.3.1",
"jss": "10.4.0",
"tiny-warning": "^1.0.2"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"jss-plugin-rule-value-observable": {
@@ -18024,6 +18136,19 @@
"@babel/runtime": "^7.3.1",
"jss": "10.4.0",
"symbol-observable": "^1.2.0"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"jss-plugin-template": {
@@ -18034,6 +18159,19 @@
"@babel/runtime": "^7.3.1",
"jss": "10.4.0",
"tiny-warning": "^1.0.2"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"jss-plugin-vendor-prefixer": {
@@ -18044,6 +18182,19 @@
"@babel/runtime": "^7.3.1",
"css-vendor": "^2.0.8",
"jss": "10.4.0"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"jss-preset-default": {
@@ -18065,6 +18216,19 @@
"jss-plugin-rule-value-observable": "10.4.0",
"jss-plugin-template": "10.4.0",
"jss-plugin-vendor-prefixer": "10.4.0"
+ },
+ "dependencies": {
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
+ }
}
},
"jsx-ast-utils": {
@@ -25723,6 +25887,17 @@
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.1.tgz",
"integrity": "sha512-Qv4LTqO11jepd5Qmlp3M1YEjBumoTHcHFdgPTQ+sFlIL5myi/7xu/POwP7IRu6odBdmLXdtIs1D6TuW6kbwbbg=="
+ },
+ "jss": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.4.0.tgz",
+ "integrity": "sha512-l7EwdwhsDishXzqTc3lbsbyZ83tlUl5L/Hb16pHCvZliA9lRDdNBZmHzeJHP0sxqD0t1mrMmMR8XroR12JBYzw==",
+ "requires": {
+ "@babel/runtime": "^7.3.1",
+ "csstype": "^3.0.2",
+ "is-in-browser": "^1.1.3",
+ "tiny-warning": "^1.0.2"
+ }
}
}
},
diff --git a/package.json b/package.json
index 68204686..b7c5cab2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@dassana-io/web-components",
- "version": "0.7.4",
+ "version": "0.7.5",
"publishConfig": {
"registry": "https://npm.pkg.github.com/dassana-io"
},
diff --git a/src/__mocks__/table_mock_data.ts b/src/__mocks__/table_mock_data.ts
index 01b477d3..5128eac0 100644
--- a/src/__mocks__/table_mock_data.ts
+++ b/src/__mocks__/table_mock_data.ts
@@ -1,3 +1,4 @@
+import { ThemeType } from 'components'
import {
ColumnFormats,
ColumnType,
@@ -6,13 +7,14 @@ import {
} from '../components/Table'
const { component, number, string } = ColumnTypes
-const { none, byte, date, icon, link, toggle, tag } = ColumnFormats
+const { none, byte, date, icon, coloredDot, link, toggle, tag } = ColumnFormats
export interface Data {
byte: number
date: number
+ dot: string
icon: string
- icon_key: string
+ iconKey: string
id: number
link: string
number: number
@@ -73,7 +75,7 @@ const columns: ColumnType[] = [
type: component
},
{
- dataIndex: 'icon_key',
+ dataIndex: 'iconKey',
format: icon,
renderProps: {
type: 'iconKey'
@@ -92,6 +94,23 @@ const columns: ColumnType[] = [
},
title: 'Component - Icon',
type: component
+ },
+ {
+ dataIndex: 'dot',
+ format: coloredDot,
+ renderProps: {
+ colorMap: {
+ test: {
+ colors: {
+ [ThemeType.light]: 'red',
+ [ThemeType.dark]: 'red'
+ },
+ tooltipText: 'Hi I am colored'
+ }
+ }
+ },
+ title: 'Colored Dot',
+ type: component
}
]
@@ -99,8 +118,9 @@ const data: Data[] = [
{
byte: 1024,
date: 1599193037581,
+ dot: 'test',
icon: 'test',
- icon_key: 'dassana',
+ iconKey: 'dassana',
id: 0,
link: 'test',
number: 0,
diff --git a/src/__snapshots__/storybook.test.ts.snap b/src/__snapshots__/storybook.test.ts.snap
index 952fd8cc..0367d0b6 100644
--- a/src/__snapshots__/storybook.test.ts.snap
+++ b/src/__snapshots__/storybook.test.ts.snap
@@ -2,7 +2,7 @@
exports[`Storyshots Avatar Default 1`] = `