@miljodirektoratet/md-css 4.1.0 → 4.1.2
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.
- package/package.json +1 -1
- package/src/button/README.md +5 -5
- package/src/chips/README.md +4 -4
- package/src/filelist/README.md +4 -2
- package/src/formElements/autocomplete/README.md +16 -14
- package/src/formElements/autocomplete/autocomplete.css +0 -1
- package/src/formElements/checkbox/README.md +4 -4
- package/src/formElements/input/README.md +14 -12
- package/src/formElements/multiautocomplete/README.md +39 -58
- package/src/formElements/multiautocomplete/multiautocomplete.css +0 -1
- package/src/formElements/multiselect/README.md +14 -13
- package/src/formElements/radiobutton/README.md +3 -3
- package/src/formElements/radiogroup/README.md +7 -7
- package/src/formElements/select/README.md +16 -14
- package/src/formElements/textarea/README.md +7 -7
- package/src/iconButton/README.md +2 -4
- package/src/infoTag/README.md +3 -3
- package/src/link/README.md +1 -1
- package/src/messages/AlertMessage.md +7 -5
- package/src/messages/InfoBox.md +1 -1
- package/src/messages/README.md +7 -4
- package/src/modal/README.md +4 -2
- package/src/tile/README.md +19 -14
- package/src/toggle/README.md +7 -7
- package/src/tooltip/README.md +2 -2
package/package.json
CHANGED
package/src/button/README.md
CHANGED
|
@@ -8,13 +8,13 @@ See [Storybook](https://miljodir.github.io/md-components) for examples and more
|
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
10
|
<button
|
|
11
|
-
|
|
11
|
+
class="md-button [md-button--small, md-button--secondary, md-button--tertiary, md-button--danger, md-button--column]"
|
|
12
12
|
>
|
|
13
|
-
<div
|
|
14
|
-
<div
|
|
15
|
-
<div
|
|
13
|
+
<div class="md-button__topIcon">{topIcon}</div>
|
|
14
|
+
<div class="md-button__content">
|
|
15
|
+
<div class="md-button__leftIcon">{leftIcon}</div>
|
|
16
16
|
BUTTON TEXT
|
|
17
|
-
<div
|
|
17
|
+
<div class="md-button__rightIcon">{rightIcon}</div>
|
|
18
18
|
</div>
|
|
19
19
|
</button>
|
|
20
20
|
```
|
package/src/chips/README.md
CHANGED
|
@@ -7,11 +7,11 @@ Class names in brackets [] are optional-/togglable-/decorator- or state dependan
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<button
|
|
11
|
-
<div
|
|
10
|
+
<button class="md-chip [md-chip--active, md-chip--disabled, md-chip--solid]">
|
|
11
|
+
<div class="md-chip__left-icon">{leftIcon}</div>
|
|
12
12
|
|
|
13
|
-
<div
|
|
13
|
+
<div class="md-chip__label">{label}</div>
|
|
14
14
|
|
|
15
|
-
<div
|
|
15
|
+
<div class="md-chip__right-icon">{rightIcon}</div>
|
|
16
16
|
</button>
|
|
17
17
|
```
|
package/src/filelist/README.md
CHANGED
|
@@ -18,8 +18,10 @@ See [Storybook](https://miljodir.github.io/md-components) for examples and more
|
|
|
18
18
|
</div>
|
|
19
19
|
|
|
20
20
|
<div class="md-filelist__file-actions">
|
|
21
|
-
|
|
22
|
-
<MdIconButton
|
|
21
|
+
<!-- Use html/css from MdIconButton for this button -->
|
|
22
|
+
<MdIconButton class="md-icon-button md-icon-button--plain">{downloadIcon}</MdIconButton>
|
|
23
|
+
<!-- Use html/css from MdIconButton for this button -->
|
|
24
|
+
<MdIconButton class="md-icon-button md-icon-button--plain">{deleteIcon}</MdIconButton>
|
|
23
25
|
</div>
|
|
24
26
|
</div>
|
|
25
27
|
|
|
@@ -7,52 +7,54 @@ Class names in brackets [] are optional-/togglable-/decorator- or state dependan
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<div
|
|
11
|
-
<div
|
|
10
|
+
<div class="md-autocomplete [md-autocomplete--open, md-autocomplete--disabled, md-autocomplete--medium, md-autocomplete--small, md-autocomplete--error]">
|
|
11
|
+
<div class="md-autocomplete__label">
|
|
12
12
|
<div>{label}</div>
|
|
13
|
-
<div
|
|
13
|
+
<div class="md-autocomplete__help-button">
|
|
14
14
|
{button to trigger help text}
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
|
-
<div
|
|
18
|
+
<div class="md-autocomplete__help-text [md-autocomplete__help-text--open]">
|
|
19
19
|
{helpText}
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
22
|
<MdClickOutsideWrapper> <- optional wrapper to close autocomplete box when clicking outside
|
|
23
23
|
<!-- Optional prefix-icon -->
|
|
24
|
-
<div
|
|
24
|
+
<div class="md-autocomplete__input__prefix [md-autocomplete__input__prefix--disabled]">
|
|
25
25
|
{prefixIcon}
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
28
|
<input
|
|
29
29
|
id=""
|
|
30
|
-
|
|
30
|
+
class="md-autocomplete__input [md-autocomplete__input--open, md-autocomplete__input--error, md-autocomplete__input--has-prefix]"
|
|
31
31
|
value={value}
|
|
32
32
|
...
|
|
33
33
|
/>
|
|
34
34
|
|
|
35
|
-
<div
|
|
36
|
-
|
|
35
|
+
<div class="md-autocomplete__input-icon">
|
|
36
|
+
<!-- use MdIconChevronForward or icon from Material Symbols here -->
|
|
37
|
+
<MdIconChevronForward />
|
|
37
38
|
</div>
|
|
38
39
|
|
|
39
|
-
<div
|
|
40
|
+
<div class="md-autocomplete__dropdown">
|
|
40
41
|
<button
|
|
41
42
|
tabIndex={open ? 0: -1}
|
|
42
|
-
|
|
43
|
+
class="md-autocomplete__dropdown-item [md-autocomplete__dropdown-item--selected]"
|
|
43
44
|
onClick={function to handle select|deselect option}
|
|
44
45
|
>
|
|
45
|
-
<div
|
|
46
|
+
<div class="md-autocomplete__dropdown-item-text">{option.text}</div>
|
|
46
47
|
|
|
47
48
|
{if seleceted option
|
|
48
|
-
<div
|
|
49
|
-
|
|
49
|
+
<div class="md-autocomplete__dropdown-item-clear" title="Klikk for å fjerne valg">
|
|
50
|
+
<!-- use MdIconClose or icon from Material Symbols here -->
|
|
51
|
+
<MdIconClose />
|
|
50
52
|
</div>
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
</button>
|
|
54
56
|
</div>
|
|
55
57
|
</MdClickOutsideWrapper>
|
|
56
|
-
<div
|
|
58
|
+
<div class="md-autocomplete__error">{errorText}</div>
|
|
57
59
|
</div>
|
|
58
60
|
```
|
|
@@ -7,17 +7,17 @@ Class names in brackets [] are optional-/togglable-/decorator- or state dependan
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<div
|
|
10
|
+
<div class="md-checkbox [md-checkbox--disabled]">
|
|
11
11
|
<input
|
|
12
|
-
|
|
12
|
+
class="md-checkbox__input"
|
|
13
13
|
checked="{true|false}"
|
|
14
14
|
type="checkbox"
|
|
15
15
|
value="{value}"
|
|
16
16
|
disabled="{disabled}"
|
|
17
17
|
{...otherProps}
|
|
18
18
|
/>
|
|
19
|
-
<label
|
|
20
|
-
<span
|
|
19
|
+
<label class="md-checkbox__label">
|
|
20
|
+
<span class="md-checkbox__labelText">{label}</span>
|
|
21
21
|
</label>
|
|
22
22
|
</div>
|
|
23
23
|
```
|
|
@@ -7,45 +7,47 @@ Class names in brackets [] are optional-/togglable-/decorator- or state dependan
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<div
|
|
11
|
-
<div
|
|
10
|
+
<div class="md-input__outer-wrapper">
|
|
11
|
+
<div class="md-input__label">
|
|
12
12
|
<label> {label} </label>
|
|
13
13
|
|
|
14
14
|
<!-- Optional button for handling help text -->
|
|
15
|
-
<div
|
|
15
|
+
<div class="md-input__help-button">
|
|
16
16
|
<MdHelpButton />
|
|
17
17
|
</div>
|
|
18
18
|
}
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
<!-- Optional container for displaying helpt text -->
|
|
22
|
-
<div
|
|
22
|
+
<div class="md-input__help-text [md-input__help-text--open]">
|
|
23
|
+
<!-- See MdHelpText html/css for this -->
|
|
23
24
|
<MdHelpText>{ helpText }</MdHelpText>
|
|
24
25
|
</div>
|
|
25
26
|
|
|
26
|
-
<div
|
|
27
|
+
<div class="md-input__wrapper [md-input__wrapper--small]">
|
|
27
28
|
<!-- Optional prefix-icon -->
|
|
28
|
-
<div
|
|
29
|
+
<div class="md-input__prefix [md-input__prefix--disabled]">{prefixIcon}</div>
|
|
29
30
|
|
|
30
31
|
<input
|
|
31
32
|
id=""
|
|
32
|
-
|
|
33
|
+
class="md-input [md-input--small, md-input--disabled, md-input--readonly, md-input--error, md-input--has-suffix, md-input--has-prefix]"
|
|
33
34
|
value="{value}"
|
|
34
35
|
...
|
|
35
36
|
/>
|
|
36
37
|
|
|
37
38
|
<!-- Optional container for suffix -->
|
|
38
|
-
<div
|
|
39
|
-
<div
|
|
39
|
+
<div class="md-input__suffix">
|
|
40
|
+
<div class="md-input__suffix-content">{suffix}</div>
|
|
40
41
|
|
|
41
|
-
<div
|
|
42
|
-
|
|
42
|
+
<div class="md-input__error-icon">
|
|
43
|
+
<!-- Use MdIconWarning or icon from Material Symbols here -->
|
|
44
|
+
<MdIconWarning />
|
|
43
45
|
<!-- Warning icon -->
|
|
44
46
|
</div>
|
|
45
47
|
</div>
|
|
46
48
|
</div>
|
|
47
49
|
|
|
48
50
|
<!-- Optional container for error text -->
|
|
49
|
-
<div
|
|
51
|
+
<div class="md-input__error">{errorText}</div>
|
|
50
52
|
</div>
|
|
51
53
|
```
|
|
@@ -7,68 +7,49 @@ Class names in brackets [] are optional-/togglable-/decorator- or state dependan
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<div
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
<div
|
|
11
|
+
class="md-multiautocomplete [md-multiautocomplete--open, md-multiautocomplete--disabled, md-multiautocomplete--medium, md-multiautocomplete--small, md-multiautocomplete--error]"
|
|
12
|
+
>
|
|
13
|
+
<div class="md-multiautocomplete__label">
|
|
14
|
+
<div>{label}</div>
|
|
15
|
+
<div class="md-multiautocomplete__help-button">{button to trigger help text}</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div class="md-multiautocomplete__help-text [md-multiautocomplete__help-text--open]">{helpText}</div>
|
|
19
|
+
|
|
20
|
+
<MdClickOutsideWrapper>
|
|
21
|
+
<- optional wrapper to close multiautocomplete box when clicking outside
|
|
22
|
+
<!-- Optional prefix-icon -->
|
|
23
|
+
<div class="md-multiautocomplete__input__prefix [md-multiautocomplete__input__prefix--disabled]">{prefixIcon}</div>
|
|
24
|
+
|
|
25
|
+
<input
|
|
26
|
+
id=""
|
|
27
|
+
class="md-multiautocomplete__input [md-multiautocomplete__input--open, md-multiautocomplete__input--error, md-multiautocomplete__input--has-prefix]"
|
|
28
|
+
value="{value}"
|
|
29
|
+
...
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
{number of selected items > 1 && !open &&
|
|
33
|
+
<div class="md-multiautocomplete__button-hasmultiple">+{selected.length - 1}</div>
|
|
34
|
+
}
|
|
35
|
+
<div class="md-multiautocomplete__input-icon">
|
|
36
|
+
<!-- use MdIconChevronForward or icon from Material Symbols here -->
|
|
37
|
+
<MdIconChevronForward />
|
|
16
38
|
</div>
|
|
17
39
|
|
|
18
|
-
<div
|
|
19
|
-
|
|
40
|
+
<div class="md-multiautocomplete__dropdown [md-multiautocomplete__dropdown--open]">
|
|
41
|
+
<div class="md-multiautocomplete__dropdown-item [md-multiautocomplete__dropdown-item--selected]">
|
|
42
|
+
{IMPORTANT! see MdCheckbox styles for description for the individual checkboxes}
|
|
43
|
+
<MdCheckbox ... />
|
|
44
|
+
...
|
|
45
|
+
</div>
|
|
20
46
|
</div>
|
|
47
|
+
</MdClickOutsideWrapper>
|
|
21
48
|
|
|
22
|
-
|
|
23
|
-
<!-- Optional prefix-icon -->
|
|
24
|
-
<div className="md-multiautocomplete__input__prefix [md-multiautocomplete__input__prefix--disabled]">
|
|
25
|
-
{prefixIcon}
|
|
26
|
-
</div>
|
|
49
|
+
<div class="md-multiautocomplete__error">{errorText}</div>
|
|
27
50
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
value={value}
|
|
32
|
-
...
|
|
33
|
-
/>
|
|
34
|
-
|
|
35
|
-
{number of selected items > 1 && !open &&
|
|
36
|
-
<div className="md-multiautocomplete__button-hasmultiple">+{selected.length - 1}</div>
|
|
37
|
-
}
|
|
38
|
-
<div className="md-multiautocomplete__input-icon">
|
|
39
|
-
<MdChevronIcon />
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
<div className="md-multiautocomplete__dropdown [md-multiautocomplete__dropdown--open]">
|
|
43
|
-
<div className="md-multiautocomplete__dropdown-item [md-multiautocomplete__dropdown-item--selected]">
|
|
44
|
-
{IMPORTANT! see MdCheckbox styles for description for the individual checkboxes}
|
|
45
|
-
<MdCheckbox
|
|
46
|
-
label="{option.text}"
|
|
47
|
-
tabIndex="{open"
|
|
48
|
-
?
|
|
49
|
-
0
|
|
50
|
-
:
|
|
51
|
-
-1}
|
|
52
|
-
checked="{true|false}"
|
|
53
|
-
value="{option.value}"
|
|
54
|
-
id="id-for-checkbox"
|
|
55
|
-
disabled="{true|false}"
|
|
56
|
-
data-value="{option.value}"
|
|
57
|
-
data-text="{option.text}"
|
|
58
|
-
onChange="{function"
|
|
59
|
-
for
|
|
60
|
-
change
|
|
61
|
-
handling}
|
|
62
|
-
/>
|
|
63
|
-
... ...
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</MdClickOutsideWrapper>
|
|
67
|
-
|
|
68
|
-
<div className="md-multiautocomplete__error">{errorText}</div>
|
|
69
|
-
|
|
70
|
-
<div className="md-multiautocomplete__chips">
|
|
71
|
-
To show input chips for selected options, see doc for MdInputChip. These can be listed here.
|
|
72
|
-
</div>
|
|
51
|
+
<div class="md-multiautocomplete__chips">
|
|
52
|
+
To show input chips for selected options, see doc for MdInputChip. These can be listed here.
|
|
53
|
+
</div>
|
|
73
54
|
</div>
|
|
74
55
|
```
|
|
@@ -8,39 +8,40 @@ See [Storybook](https://miljodir.github.io/md-components) for examples and more
|
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
10
|
<div
|
|
11
|
-
|
|
11
|
+
class="md-select [md-multiselect--open, md-multiselect--disabled, md-multiselect--error, md-multiselect--medium, md-multiselect--small]"
|
|
12
12
|
>
|
|
13
|
-
<div
|
|
13
|
+
<div class="md-multiselect__label">
|
|
14
14
|
<div>{label}</div>
|
|
15
15
|
|
|
16
|
-
<div
|
|
16
|
+
<div class="md-multiselect__help-button"><MdHelpButton /> <- see MdHelpButton styles</div>
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
<div
|
|
19
|
+
<div class="md-multiselect__help-text [md-multiselect__help-text--open]">
|
|
20
20
|
<MdHelpText>{ helpText }</MdHelpText> <- see MdHelpText styles
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
23
|
<MdClickOutsideWrapper>
|
|
24
24
|
<- optional wrapper to close selectbox when clicking outside
|
|
25
25
|
<button
|
|
26
|
-
|
|
26
|
+
class="md-multiselect__button [md-multiselect__button--open]"
|
|
27
27
|
tabindex="{0}"
|
|
28
28
|
onClick="{function"
|
|
29
29
|
to
|
|
30
30
|
toggle
|
|
31
31
|
expand|collapse}
|
|
32
32
|
>
|
|
33
|
-
<div
|
|
33
|
+
<div class="md-multiselect__button-text">{displayValue}</div>
|
|
34
34
|
{number of selected items > 1 && !open &&
|
|
35
|
-
<div
|
|
35
|
+
<div class="md-multiselect__button-hasmultiple">+{selected.length - 1}</div>
|
|
36
36
|
}
|
|
37
|
-
<div
|
|
38
|
-
|
|
37
|
+
<div class="md-multiselect__button-icon">
|
|
38
|
+
<!-- use MdIconChevronForward or icon from Material Symbols here -->
|
|
39
|
+
<MdIconChevronForward />
|
|
39
40
|
</div>
|
|
40
41
|
</button>
|
|
41
42
|
|
|
42
|
-
<div
|
|
43
|
-
<div
|
|
43
|
+
<div class="md-multiselect__dropdown [md-multiselect__dropdown--open]">
|
|
44
|
+
<div class="md-multiselect__dropdown-item [md-multiselect__dropdown-item--selected]">
|
|
44
45
|
{IMPORTANT! see MdCheckbox styles for description for the individual checkboxes}
|
|
45
46
|
<MdCheckbox
|
|
46
47
|
label="{option.text}"
|
|
@@ -65,9 +66,9 @@ See [Storybook](https://miljodir.github.io/md-components) for examples and more
|
|
|
65
66
|
</div>
|
|
66
67
|
</MdClickOutsideWrapper>
|
|
67
68
|
|
|
68
|
-
<div
|
|
69
|
+
<div class="md-multiselect__error">{errorText}</div>
|
|
69
70
|
|
|
70
|
-
<div
|
|
71
|
+
<div class="md-multiselect__chips">
|
|
71
72
|
To show input chips for selected options, see doc for MdInputChip. These can be listed here.
|
|
72
73
|
</div>
|
|
73
74
|
}
|
|
@@ -7,9 +7,9 @@ Class names in brackets [] are optional-/togglable-/decorator- or state dependan
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<div
|
|
11
|
-
<span
|
|
12
|
-
<span
|
|
10
|
+
<div class="md-radiobutton [md-checkbox--disabled]">
|
|
11
|
+
<span class="md-radiobutton__check-area">
|
|
12
|
+
<span class="md-radiobutton__selected-dot" />
|
|
13
13
|
</span>
|
|
14
14
|
<input
|
|
15
15
|
id="{radioGroupId}"
|
|
@@ -7,22 +7,22 @@ Class names in brackets [] are optional-/togglable-/decorator- or state dependan
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<div
|
|
11
|
-
<div
|
|
10
|
+
<div class="md-radiogroup [md-radiogroup--disabled]">
|
|
11
|
+
<div class="md-radiogroup__label">
|
|
12
12
|
<div>{label}</div>
|
|
13
13
|
|
|
14
|
-
<div
|
|
14
|
+
<div class="md-radiogroup_help-button"><MdHelpButton /> <- see MdHelpButton styles</div>
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
|
-
<div
|
|
17
|
+
<div class="md-radiogroup_help-text [md-radiogroup_help-text--open]">
|
|
18
18
|
<MdHelpText>{ helpText }</MdHelpText> <- see MdHelpText styles
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
|
-
<div
|
|
22
|
-
|
|
21
|
+
<div class="md-radiogroup__options [md-radiogroup__options--vertical]">
|
|
22
|
+
<MdRadioButton /> <- see MdRadioButton styles
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
25
|
<!-- if error -->
|
|
26
|
-
<div
|
|
26
|
+
<div class="md-radiogroup__error">{error}</div>
|
|
27
27
|
</div>
|
|
28
28
|
```
|
|
@@ -7,47 +7,49 @@ Class names in brackets [] are optional-/togglable-/decorator- or state dependan
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<div
|
|
11
|
-
<div
|
|
10
|
+
<div class="md-select [md-select--open, md-select--disabled, md-select--medium, md-select--small]">
|
|
11
|
+
<div class="md-select__label">
|
|
12
12
|
<div>{label}</div>
|
|
13
|
-
<div
|
|
13
|
+
<div class="md-select__help-button">
|
|
14
14
|
{button to trigger help text}
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
|
-
<div
|
|
18
|
+
<div class="md-select__help-text [md-select__help-text--open]">
|
|
19
19
|
{helpText}
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
22
|
<MdClickOutsideWrapper> <- optional wrapper to close selectbox when clicking outside
|
|
23
23
|
<button
|
|
24
|
-
|
|
24
|
+
class="md-select__button [md-select__button--open]"
|
|
25
25
|
tabIndex={0}
|
|
26
26
|
onClick={function to toggle expand|collapse}
|
|
27
27
|
>
|
|
28
|
-
<div
|
|
29
|
-
<div
|
|
30
|
-
|
|
28
|
+
<div class="md-select__button-text">{displayValue}</div>
|
|
29
|
+
<div class="md-select__button-icon">
|
|
30
|
+
<!-- Use MdIconChevronForward or icon from Material Symbols here -->
|
|
31
|
+
<MdIconChevronForwward />
|
|
31
32
|
</div>
|
|
32
33
|
</button>
|
|
33
34
|
|
|
34
|
-
<div
|
|
35
|
+
<div class="md-select__dropdown">
|
|
35
36
|
<button
|
|
36
37
|
tabIndex={open ? 0: -1}
|
|
37
|
-
|
|
38
|
+
class="md-select__dropdown-item [md-select__dropdown-item--selected]"
|
|
38
39
|
onClick={function to handle select|deselect option}
|
|
39
40
|
>
|
|
40
|
-
<div
|
|
41
|
+
<div class="md-select__dropdown-item-text">{option.text}</div>
|
|
41
42
|
|
|
42
43
|
{if seleceted option
|
|
43
|
-
<div
|
|
44
|
-
|
|
44
|
+
<div class="md-select__dropdown-item-clear" title="Klikk for å fjerne valg">
|
|
45
|
+
<!-- Use MdIconClose or icon from Material Symbols here -->
|
|
46
|
+
<MdIconClose />
|
|
45
47
|
</div>
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
</button>
|
|
49
51
|
</div>
|
|
50
52
|
</MdClickOutsideWrapper>
|
|
51
|
-
<div
|
|
53
|
+
<div class="md-select__error">{errorText}</div>
|
|
52
54
|
</div>
|
|
53
55
|
```
|
|
@@ -7,21 +7,21 @@ Class names in brackets [] are optional-/togglable-/decorator- or state dependan
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<div
|
|
11
|
-
<div
|
|
10
|
+
<div class="md-textarea__outer-wrapper">
|
|
11
|
+
<div class="md-textarea__label">
|
|
12
12
|
<label htmlFor="id-for-text-area"> {label} </label>
|
|
13
13
|
|
|
14
|
-
<div
|
|
14
|
+
<div class="md-textarea__help-button">{button to trigger help text}</div>
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
|
-
<div
|
|
17
|
+
<div class="md-textarea__help-text [md-textarea__help-text--open]">{helpText}</div>
|
|
18
18
|
|
|
19
|
-
<div
|
|
20
|
-
<textarea id="id-for-text-area"
|
|
19
|
+
<div class="md-textarea__wrapper">
|
|
20
|
+
<textarea id="id-for-text-area" class="md-textarea [md-textarea--disabled, md-textarea--readonly,
|
|
21
21
|
md-textarea--error]" value={value} rows={number} placeholder="Placeholder text" disabled={true requires class
|
|
22
22
|
'md-textarea--disabled'} readOnly={true requires class 'md-textarea--readonly'} ... />
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
|
-
<div
|
|
25
|
+
<div class="md-textarea__error">{errorText}</div>
|
|
26
26
|
</div>
|
|
27
27
|
```
|
package/src/iconButton/README.md
CHANGED
|
@@ -7,9 +7,7 @@ Class names and elements in brackets [] are optional-/togglable-/decorator- or s
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<button
|
|
11
|
-
<div
|
|
12
|
-
ICON
|
|
13
|
-
</div>
|
|
10
|
+
<button class="md-icon-button [md-icon-button--border, md-icon-button--plain]">
|
|
11
|
+
<div class="md-icon-button__icon">ICON</div>
|
|
14
12
|
</button>
|
|
15
13
|
```
|
package/src/infoTag/README.md
CHANGED
|
@@ -7,8 +7,8 @@ Class names in brackets [] are optional-/togglable-/decorator- or state dependan
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<div
|
|
11
|
-
<div
|
|
12
|
-
<div
|
|
10
|
+
<div class="md-info-tag [md-info-tag--secondary, md-info-tag--warning, md-info-tag--danger]">
|
|
11
|
+
<div class="md-info-tag__label">{label}</div>
|
|
12
|
+
<div class="md-info-tag__icon">{icon}</div>
|
|
13
13
|
</div>
|
|
14
14
|
```
|
package/src/link/README.md
CHANGED
|
@@ -8,15 +8,17 @@ See [Storybook](https://miljodir.github.io/md-components) for examples and more
|
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
10
|
<div
|
|
11
|
-
|
|
11
|
+
class="md-alert-message [md-alert-message--confirm, md-alert-message--warning, md-alert-message--error, md-alert-message--fullWidth]"
|
|
12
12
|
>
|
|
13
|
-
<div
|
|
14
|
-
|
|
13
|
+
<div class="md-alert-message__content">
|
|
14
|
+
<!-- Use MdIconWarning or warning icon from Material Symbols here -->
|
|
15
|
+
<Icon class="md-alert-message__icon" width="20" height="20" />
|
|
15
16
|
{label}
|
|
16
17
|
</div>
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
<!-- Use html/css from MdIconButton for this button -->
|
|
20
|
+
<MdIconButton class="md-alert-message__button md-icon-button md-icon-button--plain" onClick="{handleClick}">
|
|
21
|
+
{icon}
|
|
20
22
|
</MdIconButton>
|
|
21
23
|
</div>
|
|
22
24
|
```
|
package/src/messages/InfoBox.md
CHANGED
|
@@ -7,5 +7,5 @@ Class names in brackets [] are optional-/togglable-/decorator- or state dependan
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<div
|
|
10
|
+
<div class="md-info-box [md-info-box--fullWidth]">{Icon width="20" height="20"} {label}</div>
|
|
11
11
|
```
|
package/src/messages/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Class names in brackets [] are optional-/togglable-/decorator- or state dependan
|
|
|
7
7
|
See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
|
-
<div
|
|
10
|
+
<div class="md-info-box [md-info-box--fullWidth]">{Icon width="20" height="20"} {label}</div>
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
To use the `AlertMessage` css as a standalone, without the accompanying React component, please use the following HTML structure.
|
|
@@ -18,10 +18,13 @@ See [Storybook](https://miljodir.github.io/md-components) for examples and more
|
|
|
18
18
|
|
|
19
19
|
```html
|
|
20
20
|
<div
|
|
21
|
-
|
|
21
|
+
class="md-alert-message [md-alert-message--confirm, md-alert-message--warning, md-alert-message--error, md-alert-message--fullWidth]"
|
|
22
22
|
>
|
|
23
|
-
<div
|
|
23
|
+
<div class="md-alert-message__content">{Icon width="20" height="20"} {label}</div>
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
<!-- Use html/css from MdIconButton for this button -->
|
|
26
|
+
<MdIconButton class="md-alert-message__button md-icon-button md-icon-button--plain" onClick="{handleClick}"
|
|
27
|
+
>{icon}</MdIconButton
|
|
28
|
+
>
|
|
26
29
|
</div>
|
|
27
30
|
```
|
package/src/modal/README.md
CHANGED
|
@@ -18,9 +18,11 @@ See [Storybook](https://miljodir.github.io/md-components) for examples and more
|
|
|
18
18
|
<MdClickOutsideWrapper class="md-modal__inner-wrapper">
|
|
19
19
|
<div class="md-modal__header">
|
|
20
20
|
<div>{heading}</div>
|
|
21
|
+
|
|
22
|
+
<!-- Use html/css from MdIconButton for this button -->
|
|
21
23
|
<MdIconButton class="md-modal__close-button md-icon-button md-icon-button--plain">
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
<!-- Use MdIconClose or icon from Material Symbols here -->
|
|
25
|
+
<MdIconClose class="md-icon-button__icon" />
|
|
24
26
|
</MdIconButton>
|
|
25
27
|
</div>
|
|
26
28
|
<div class="md-modal__content-inner">MODAL CONTENT GOES HERE</div>
|
package/src/tile/README.md
CHANGED
|
@@ -9,17 +9,22 @@ See [Storybook](https://miljodir.github.io/md-components) for examples and more
|
|
|
9
9
|
## Tile horizontal
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
|
-
<a
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
<a
|
|
13
|
+
class="md-tile [md-tile--secondary, md-tile--small, md-tile--medium, md-tile--fullWidth]"
|
|
14
|
+
href="{href}"
|
|
15
|
+
onClick="{handleClick}"
|
|
16
|
+
>
|
|
17
|
+
<div class="md-tile__content">
|
|
18
|
+
<div class="md-tile__content-icon">{icon}</div>
|
|
19
|
+
<div class="md-tile__content-text">
|
|
20
|
+
<div class="md-tile__content-heading">{heading}</div>
|
|
21
|
+
<div class="md-tile__content-description">{description}</div>
|
|
18
22
|
</div>
|
|
19
23
|
</div>
|
|
20
24
|
|
|
21
|
-
<div
|
|
22
|
-
|
|
25
|
+
<div class="md-tile__arrow">
|
|
26
|
+
<!-- Can be replaced with chevron down icon from Material Symbols -->
|
|
27
|
+
<MdIconChevronForward height="{25}" />
|
|
23
28
|
</div>
|
|
24
29
|
</a>
|
|
25
30
|
```
|
|
@@ -28,15 +33,15 @@ See [Storybook](https://miljodir.github.io/md-components) for examples and more
|
|
|
28
33
|
|
|
29
34
|
```html
|
|
30
35
|
<a
|
|
31
|
-
|
|
36
|
+
class="md-tile-vertical [md-tile-vertical--secondary, md-tile-vertical--small, md-tile-vertical--large]"
|
|
32
37
|
href="{href}"
|
|
33
38
|
onClick="{handleClick}"
|
|
34
39
|
>
|
|
35
|
-
<div
|
|
36
|
-
<div
|
|
37
|
-
<div
|
|
38
|
-
<div
|
|
39
|
-
<div
|
|
40
|
+
<div class="md-tile-vertical__content">
|
|
41
|
+
<div class="md-tile-vertical__content-icon">{icon}</div>
|
|
42
|
+
<div class="md-tile-vertical__content-text">
|
|
43
|
+
<div class="md-tile-vertical__content-heading">{heading}</div>
|
|
44
|
+
<div class="md-tile-vertical__content-description">{description}</div>
|
|
40
45
|
</div>
|
|
41
46
|
</div>
|
|
42
47
|
</a>
|
package/src/toggle/README.md
CHANGED
|
@@ -8,15 +8,15 @@ See [Storybook](https://miljodir.github.io/md-components) for examples and more
|
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
10
|
<div>
|
|
11
|
-
<div
|
|
12
|
-
<input
|
|
13
|
-
<label
|
|
14
|
-
<div
|
|
15
|
-
<div
|
|
16
|
-
<span
|
|
11
|
+
<div class="md-toggle__wrapper">
|
|
12
|
+
<input class="md-toggle__checkbox" type="checkbox" checked="{true|false}" onChange="{}" />
|
|
13
|
+
<label class="md-toggle__label-wrapper [md-toggle__label-wrapper--disabled]">
|
|
14
|
+
<div class="md-toggle__label-text">{label}</div>
|
|
15
|
+
<div class="md-toggle__label [md-toggle__label--checked, md-toggle__label--disabled]">
|
|
16
|
+
<span class="md-toggle__button" />
|
|
17
17
|
</div>
|
|
18
18
|
</label>
|
|
19
19
|
</div>
|
|
20
|
-
<div
|
|
20
|
+
<div class="md-toggle__error">{errorText}</div>
|
|
21
21
|
</div>
|
|
22
22
|
```
|
package/src/tooltip/README.md
CHANGED
|
@@ -8,9 +8,9 @@ See [Storybook](https://miljodir.github.io/md-components) for examples and more
|
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
10
|
<div>
|
|
11
|
-
<div
|
|
11
|
+
<div class="md-tooltip__child">{children}</div>
|
|
12
12
|
<div
|
|
13
|
-
|
|
13
|
+
class="md-tooltip [md-tooltip--show,
|
|
14
14
|
md-tooltip--bottom,
|
|
15
15
|
md-tooltip--top,
|
|
16
16
|
md-tooltip--right,
|