From 2ef13980a63e569a68202d4a8819c61ca8085852 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Fri, 7 Dec 2018 16:09:23 +0100 Subject: [PATCH] upgrade styleguide the second --- .../components/data-display/Avatar/style.scss | 2 +- .../components/data-display/Table/Table.vue | 22 +- .../components/data-display/Table/style.scss | 29 +- .../data-input/FormItem/FormItem.vue | 9 +- .../data-input/FormItem/InputError.vue | 0 .../data-input/FormItem/InputLabel.vue | 0 .../components/data-input/FormItem/style.scss | 0 .../components/data-input/Input/Input.vue | 3 +- .../components/data-input/Input/demo.md | 0 .../components/data-input/Input/style.scss | 0 .../components/data-input/Select/Select.vue | 248 ++++++++++++-- .../Select/__snapshots__/spec.js.snap | 69 ++++ .../components/data-input/Select/demo.md | 154 +++++++++ .../components/data-input/Select/spec.js | 309 ++++++++++++++++++ .../components/data-input/Select/style.scss | 148 ++++++++- .../components/data-input/shared/input.js | 23 +- .../components/data-input/shared/input.scss | 79 +++-- .../data-input/shared/multiinput.js | 49 +++ .../system/components/layout/Card/Card.vue | 23 +- .../src/system/components/layout/Card/demo.md | 17 + .../components/typography/Chip/Chip.vue | 93 ++++++ .../system/components/typography/Chip/demo.md | 62 ++++ .../components/typography/Chip/style.scss | 81 +++++ .../src/system/styles/shared/_form.scss | 12 +- .../src/system/styles/shared/_mixins.scss | 32 +- styleguide/src/system/tokens/color.yml | 4 + styleguide/src/system/tokens/font-size.yml | 2 +- styleguide/src/system/tokens/z-index.yml | 2 + 28 files changed, 1376 insertions(+), 96 deletions(-) mode change 100644 => 100755 styleguide/src/system/components/data-input/FormItem/FormItem.vue mode change 100644 => 100755 styleguide/src/system/components/data-input/FormItem/InputError.vue mode change 100644 => 100755 styleguide/src/system/components/data-input/FormItem/InputLabel.vue mode change 100644 => 100755 styleguide/src/system/components/data-input/FormItem/style.scss mode change 100644 => 100755 styleguide/src/system/components/data-input/Input/Input.vue mode change 100644 => 100755 styleguide/src/system/components/data-input/Input/demo.md mode change 100644 => 100755 styleguide/src/system/components/data-input/Input/style.scss mode change 100644 => 100755 styleguide/src/system/components/data-input/Select/Select.vue create mode 100755 styleguide/src/system/components/data-input/Select/__snapshots__/spec.js.snap mode change 100644 => 100755 styleguide/src/system/components/data-input/Select/demo.md create mode 100755 styleguide/src/system/components/data-input/Select/spec.js mode change 100644 => 100755 styleguide/src/system/components/data-input/Select/style.scss mode change 100644 => 100755 styleguide/src/system/components/data-input/shared/input.js mode change 100644 => 100755 styleguide/src/system/components/data-input/shared/input.scss create mode 100755 styleguide/src/system/components/data-input/shared/multiinput.js create mode 100755 styleguide/src/system/components/typography/Chip/Chip.vue create mode 100755 styleguide/src/system/components/typography/Chip/demo.md create mode 100755 styleguide/src/system/components/typography/Chip/style.scss diff --git a/styleguide/src/system/components/data-display/Avatar/style.scss b/styleguide/src/system/components/data-display/Avatar/style.scss index a4019a5f2..d6932d85e 100644 --- a/styleguide/src/system/components/data-display/Avatar/style.scss +++ b/styleguide/src/system/components/data-display/Avatar/style.scss @@ -19,7 +19,7 @@ height: 100%; top: 0px; left: 0px; - box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 0 0 1px rgba($color-neutral-0, .1); border-radius: 50%; } diff --git a/styleguide/src/system/components/data-display/Table/Table.vue b/styleguide/src/system/components/data-display/Table/Table.vue index ddc204677..3d21532de 100644 --- a/styleguide/src/system/components/data-display/Table/Table.vue +++ b/styleguide/src/system/components/data-display/Table/Table.vue @@ -5,7 +5,11 @@ + class="ds-table" + :class="[ + condensed && 'ds-table-condensed', + bordered && 'ds-table-bordered' + ]"> + :key="row.key || index"> @@ -75,6 +79,20 @@ export default { default() { return null } + }, + /** + * Should the table be more condense? + */ + condensed: { + type: Boolean, + default: false + }, + /** + * Should the table have borders? + */ + bordered: { + type: Boolean, + default: true } }, computed: { diff --git a/styleguide/src/system/components/data-display/Table/style.scss b/styleguide/src/system/components/data-display/Table/style.scss index bdebc8d23..7d59a6e9d 100644 --- a/styleguide/src/system/components/data-display/Table/style.scss +++ b/styleguide/src/system/components/data-display/Table/style.scss @@ -11,19 +11,34 @@ .ds-table-col { @include reset; - border-bottom: $border-color-softer solid $border-size-base; vertical-align: top; padding: $space-small $space-xx-small; - - &:last-child { - padding-right: 0; - } } .ds-table-head-col { @include reset; - border-bottom: $border-color-softer solid $border-size-base; padding: $space-small $space-xx-small; text-align: left; font-weight: $font-weight-bold; -} \ No newline at end of file +} + +// bordered +.ds-table-bordered { + .ds-table-col, + .ds-table-head-col { + border-bottom: $border-color-softer dotted $border-size-base; + } + + tr:last-child .ds-table-col { + border-bottom: none; + } +} + +// condensed +.ds-table-condensed { + .ds-table-col, + .ds-table-head-col { + padding-top: $space-x-small; + padding-bottom: $space-x-small; + } +} diff --git a/styleguide/src/system/components/data-input/FormItem/FormItem.vue b/styleguide/src/system/components/data-input/FormItem/FormItem.vue old mode 100644 new mode 100755 index 235a3dc46..44ffc1813 --- a/styleguide/src/system/components/data-input/FormItem/FormItem.vue +++ b/styleguide/src/system/components/data-input/FormItem/FormItem.vue @@ -1,10 +1,9 @@