From b0a0d146483923e4b556adb6ccbbc5c2a32c0a25 Mon Sep 17 00:00:00 2001 From: RDMStreet Date: Thu, 22 Apr 2021 12:00:01 +0300 Subject: [PATCH 1/5] UNK-659 Implement hierarchical table --- src/components/Table/SHierarchicalTable.vue | 76 +++++++++++++++++++ src/components/Table/STable.vue | 9 +++ src/components/Table/STableColumn.vue | 2 +- src/components/Table/index.ts | 2 + src/components/index.ts | 3 +- src/index.ts | 3 + .../Table/SHierarchicalTable.stories.ts | 60 +++++++++++++++ src/types/components.ts | 1 + 8 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 src/components/Table/SHierarchicalTable.vue create mode 100644 src/stories/Table/SHierarchicalTable.stories.ts diff --git a/src/components/Table/SHierarchicalTable.vue b/src/components/Table/SHierarchicalTable.vue new file mode 100644 index 00000000..cb9d2210 --- /dev/null +++ b/src/components/Table/SHierarchicalTable.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/src/components/Table/STable.vue b/src/components/Table/STable.vue index b240df43..fc249316 100644 --- a/src/components/Table/STable.vue +++ b/src/components/Table/STable.vue @@ -1,5 +1,6 @@ - - + + + + + diff --git a/src/components/Table/STableColumn.vue b/src/components/Table/STableColumn.vue index 715eaa05..6de202dc 100644 --- a/src/components/Table/STableColumn.vue +++ b/src/components/Table/STableColumn.vue @@ -1,207 +1,205 @@ - - - + + + diff --git a/src/stories/Table/SHierarchicalTable.stories.ts b/src/stories/Table/SHierarchicalTable.stories.ts index 30256af4..96a147c7 100644 --- a/src/stories/Table/SHierarchicalTable.stories.ts +++ b/src/stories/Table/SHierarchicalTable.stories.ts @@ -1,60 +1,67 @@ -import { withKnobs } from '@storybook/addon-knobs' - -import { SHierarchicalTable } from '../../components' - -export default { - component: SHierarchicalTable, - title: 'Design System/Components/Table/Hierarchical Table', - decorators: [withKnobs], - excludeStories: /.*Data$/ -} - -export const tableData = [ - { - name: 'id', - label: 'ID', - content: [ - 'id-1', - 'id-2', - 'id-3', - 'id-4', - 'id-5' - ] - }, - { - name: 'date', - label: 'Date', - content: [ - '01.01.1970', - '02.01.1970', - '03.01.1970', - '04.01.1970', - '05.01.1970' - ] - }, - { - name: 'file', - label: 'File', - content: [ - 'file-1.txt', - 'file-2.txt', - 'file-3.txt', - 'file-4.txt', - 'file-5.txt' - ] - } -] - -export const configurable = () => ({ - components: { SHierarchicalTable }, - template: ` - - `, - data: () => ({ - tableData: tableData - }) -}) +import { withKnobs, select } from '@storybook/addon-knobs' + +import { SHierarchicalTable } from '../../components' +import { Size } from '../../types' + +export default { + component: SHierarchicalTable, + title: 'Design System/Components/Table/Hierarchical Table', + decorators: [withKnobs], + excludeStories: /.*Data$/ +} + +export const tableData = [ + { + name: 'id', + label: 'ID', + content: [ + 'id-1', + 'id-2', + 'id-3', + 'id-4', + 'id-5' + ] + }, + { + name: 'date', + label: 'Date', + content: [ + '01.01.1970', + '02.01.1970', + '03.01.1970', + '04.01.1970', + '05.01.1970' + ] + }, + { + name: 'file', + label: 'File', + content: [ + 'file-1.txt', + 'file-2.txt', + 'file-3.txt', + 'file-4.txt', + 'file-5.txt' + ] + } +] + +export const configurable = () => ({ + components: { SHierarchicalTable }, + template: ` + + `, + data: () => ({ + tableData: tableData + }), + props: { + size: { + default: select('Size', Object.values(Size), Size.BIG) + } + } +}) From 1ba08b6875c399fa89f49cce21fed4e5b4d8b30c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 May 2021 10:19:37 +0000 Subject: [PATCH 3/5] Bump postcss from 7.0.32 to 8.2.10 Bumps [postcss](https://github.com/postcss/postcss) from 7.0.32 to 8.2.10. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/7.0.32...8.2.10) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 31 ++++++++++++++++++++----------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index c4c078e8..7d3bef69 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "jest": "^26.0.1", "lint-staged": "^9.5.0", "node-sass": "^4.12.0", - "postcss": "^7.0.23", + "postcss": "^8.2.10", "rollup": "^1.27.8", "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-copy": "^3.3.0", diff --git a/yarn.lock b/yarn.lock index aeae21c0..89b86a7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4882,10 +4882,10 @@ color@^3.0.0: color-convert "^1.9.1" color-string "^1.5.2" -colorette@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.0.tgz#45306add826d196e8c87236ac05d797f25982e63" - integrity sha512-soRSroY+OF/8OdA3PTQXwaDJeMc7TfknKKrxeSCencL2a4+Tx5zhxmmv7hdpCjhKBjehzp8+bwe/T68K0hpIjw== +colorette@^1.1.0, colorette@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" + integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== colors@^1.1.2: version "1.4.0" @@ -9561,12 +9561,7 @@ jmespath@^0.15.0: resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" integrity sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc= -js-base64@^2.1.8: - version "2.5.2" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.2.tgz#313b6274dda718f714d00b3330bbae6e38e90209" - integrity sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ== - -js-base64@^2.1.9: +js-base64@^2.1.8, js-base64@^2.1.9: version "2.6.1" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.1.tgz#c328374225d2e65569791ded73c258e2c59334c7" integrity sha512-G5x2saUTupU9D/xBY9snJs3TxvwX8EkpLFiYlPpDt/VmMHOXprnSU1nxiTmFbijCX4BLF/cMRIfAcC5BiMYgFQ== @@ -10750,6 +10745,11 @@ nan@^2.12.1, nan@^2.13.2: resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== +nanoid@^3.1.22: + version "3.1.23" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81" + integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -12126,7 +12126,7 @@ postcss@^6.0.1: source-map "^0.6.1" supports-color "^5.4.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.23, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.30, postcss@^7.0.5, postcss@^7.0.6: +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.26, postcss@^7.0.27, postcss@^7.0.30, postcss@^7.0.5, postcss@^7.0.6: version "7.0.32" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d" integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw== @@ -12135,6 +12135,15 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.2 source-map "^0.6.1" supports-color "^6.1.0" +postcss@^8.2.10: + version "8.2.10" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.10.tgz#ca7a042aa8aff494b334d0ff3e9e77079f6f702b" + integrity sha512-b/h7CPV7QEdrqIxtAf2j31U5ef05uBDuvoXv6L51Q4rcS1jdlXAVKJv+atCFdUXYl9dyTHGyoMzIepwowRJjFw== + dependencies: + colorette "^1.2.2" + nanoid "^3.1.22" + source-map "^0.6.1" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" From db880f9ca5074c4c6e558ce1d76b099db0942bf5 Mon Sep 17 00:00:00 2001 From: RDMStreet Date: Wed, 19 May 2021 10:55:22 +0300 Subject: [PATCH 4/5] Some fixes --- src/components/Table/SHierarchicalTable.vue | 42 +++++++++++--------- src/styles/table.scss | 44 +++++++++++++++++++++ 2 files changed, 68 insertions(+), 18 deletions(-) diff --git a/src/components/Table/SHierarchicalTable.vue b/src/components/Table/SHierarchicalTable.vue index 6d49bd26..e0af3c06 100644 --- a/src/components/Table/SHierarchicalTable.vue +++ b/src/components/Table/SHierarchicalTable.vue @@ -1,15 +1,19 @@