Skip to content

Commit 5ed53ef

Browse files
authored
Merge pull request #10 from appinteractive/fix-some-issues
Fix some issues
2 parents b416bf4 + 4ea1699 commit 5ed53ef

File tree

15 files changed

+61
-26
lines changed

15 files changed

+61
-26
lines changed

src/styleguide/components/ComponentOptionsDoc.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
slot="name"
1111
slot-scope="{row}">
1212
<ds-code inline>
13-
{{ row.name }}
13+
{{ row.name | kebabCase }}
1414
</ds-code>
1515
<div v-if="row.required">
1616
<ds-tag v-if="row.required" color="warning">required</ds-tag>
1717
</div>
1818
<ds-space :margin-bottom="null" margin-top="small">
1919
<div v-if="row.options">
20-
<ds-chip v-for="option in row.options" :key="option">
20+
<ds-chip size="small" v-for="option in row.options" :key="option">
2121
{{ option }}
2222
</ds-chip>
2323
</div>

src/styleguide/components/Navigation.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
<ds-input
66
v-model="searchString"
77
placeholder="Filter menu ..."
8-
icon="search"
9-
size="small" />
8+
icon="search" />
109
</div>
1110
<ds-menu
1211
@navigate="$emit('navigate')"

src/system/components/data-input/Input/Input.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
iconRight && `ds-input-has-icon-right`
1414
]"
1515
:id="id"
16-
:name="model"
16+
:name="name ? name : model"
1717
:type="type"
1818
:autofocus="autofocus"
1919
:placeholder="placeholder"

src/system/components/data-input/Input/demo.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Basic usage
22

33
```
4-
<ds-input placeholder="Name ..."/>
4+
<ds-input placeholder="Name ..." />
55
```
66

77
## Usage with label
@@ -10,7 +10,13 @@
1010
<ds-input
1111
id="name"
1212
label="Your name"
13-
placeholder="Name ..."/>
13+
placeholder="Name ..." />
14+
```
15+
16+
## Disabled
17+
18+
```
19+
<ds-input placeholder="Name ..." disabled />
1420
```
1521

1622
## Input types

src/system/components/data-input/Select/Select.vue

+4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@
4848
<input
4949
ref="search"
5050
class="ds-select-search"
51+
autocomplete="off"
5152
:id="id"
53+
:name="name ? name : model"
5254
:autofocus="autofocus"
5355
:placeholder="placeholder"
5456
:tabindex="tabindex"
@@ -83,7 +85,9 @@
8385
v-if="!multiple"
8486
ref="search"
8587
class="ds-select-search"
88+
autocomplete="off"
8689
:id="id"
90+
:name="name ? name : model"
8791
:autofocus="autofocus"
8892
:placeholder="placeholder"
8993
:tabindex="tabindex"

src/system/components/data-input/shared/input.js

+7
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ export default {
3030
type: String,
3131
default: null
3232
},
33+
/**
34+
* Name to use on the input for accessibility
35+
*/
36+
name: {
37+
type: String,
38+
default: null
39+
},
3340
/**
3441
* The label of the input.
3542
*/

src/system/components/data-input/shared/input.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
opacity: $opacity-disabled;
3838
pointer-events: none;
3939
cursor: not-allowed;
40+
background-color: $background-color-disabled;
4041
}
4142

4243
.ds-input-is-readonly & {
@@ -122,5 +123,5 @@
122123
.ds-input-size-large & {
123124
padding-right: $input-height-large;
124125
}
125-
}
126+
}
126127
}

src/system/components/layout/Space/Space.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
:style="styles"
55
class="ds-space"
66
:class="[
7-
centered && `ds-space-centered`,
7+
centered && `ds-space-centered`
88
]"
99
>
1010
<slot />

src/system/components/navigation/Menu/Menu.vue

+8-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@
1313
:route="route"
1414
:parents="[]"
1515
:name="route.name">
16-
<ds-menu-item
17-
:key="route.path ? route.path : index"
18-
:route="route" />
16+
<!-- @slot Scoped slot for providing a custom menu item -->
17+
<slot
18+
:route="route"
19+
name="menuitem">
20+
<ds-menu-item
21+
:key="route.path ? route.path : index"
22+
:route="route" />
23+
</slot>
1924
</slot>
2025
</slot>
2126
</ul>

src/system/components/navigation/Menu/demo.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ If you want to keep the sub menu for this menu item, be sure to use the `ds-menu
214214
<ds-menu :routes="routes">
215215
<ds-menu-item
216216
@click="handleClick"
217-
slot="Navigation"
217+
slot="menuitem"
218218
slot-scope="item"
219219
:route="item.route"
220220
:parents="item.parents">

src/system/components/typography/Chip/style.scss

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
.ds-chip {
22
@include reset;
33
@include stack-space($space-xx-small);
4+
@include inline-space($font-space-xx-small);
45
position: relative;
56
display: inline-block;
67
font-family: $font-family-text;
78
line-height: $line-height-base;
8-
padding: $space-xx-small $space-x-small;
9+
padding: $font-space-xx-small $font-space-large;
910
border-radius: $border-radius-base;
1011
font-weight: $font-weight-bold;
1112
color: $text-color-base;
@@ -45,23 +46,24 @@
4546
border-radius: $border-radius-rounded;
4647
}
4748

48-
.ds-chip-size-base {
49-
font-size: $font-size-small;
49+
.ds-chip-size-small {
50+
font-size: $font-size-xx-small;
51+
padding: $font-space-xxx-small $font-space-large;
5052
}
5153

52-
.ds-chip-size-small {
53-
font-size: $font-size-x-small;
54-
padding: $space-xxx-small $space-x-small;
54+
.ds-chip-size-base {
55+
font-size: $font-size-small;
5556
}
5657

5758
.ds-chip-size-large {
5859
font-size: $font-size-base;
60+
padding: $font-space-xx-small $font-space-x-large;
5961
}
6062

6163
.ds-chip-close {
6264
@include reset-button;
6365
position: absolute;
64-
right: $space-xx-small;
66+
right: $font-space-base;
6567
top: 50%;
6668
transform: translateY(-50%);
6769
display: inline-flex;
@@ -71,12 +73,11 @@
7173
width: $space-small;
7274
height: $space-small;
7375
border-radius: $border-radius-circle;
74-
//background-color: $background-color-base;
7576
opacity: $opacity-soft;
7677
cursor: pointer;
7778
transition: all $duration-short $ease-out-sharp;
7879

7980
&:hover {
8081
opacity: 1;
8182
}
82-
}
83+
}

src/system/components/typography/Tag/style.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.ds-tag {
22
@include reset;
33
@include stack-space($space-xx-small);
4+
@include inline-space($font-space-xx-small);
45
display: inline-block;
56
font-family: $font-family-text;
67
line-height: $line-height-base;
@@ -52,4 +53,4 @@
5253

5354
.ds-tag-size-large {
5455
font-size: $font-size-small;
55-
}
56+
}

src/system/mixins/media-query.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ function initListener() {
2323
if (init) {
2424
return
2525
}
26-
if (window && typeof window !== 'undefined') {
27-
window.addEventListener('resize', updateWindowSize)
28-
updateWindowSize()
26+
try {
27+
if (window && typeof window !== 'undefined') {
28+
window.addEventListener('resize', updateWindowSize)
29+
updateWindowSize()
30+
}
31+
init = true
32+
} catch (err) {
2933
init = true
34+
return false
3035
}
3136
}
3237

src/system/tokens/color.yml

+4
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ props:
218218
value: *color-neutral-30
219219
category: background-color
220220

221+
- name: background-color-disabled
222+
value: *color-neutral-90
223+
category: background-color
224+
221225
- name: background-color-primary
222226
value: *color-primary
223227
category: background-color

src/system/tokens/font-spacing.yml

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ props:
2222
value: "0.3em"
2323
- name: font-space-xx-small
2424
value: "0.2em"
25+
- name: font-space-xxx-small
26+
value: "0.1em"
2527
global:
2628
type: number
2729
category: font-spacing

0 commit comments

Comments
 (0)