@miljodirektoratet/md-css 1.0.3 → 1.0.4

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/README.md CHANGED
@@ -21,6 +21,6 @@ const MyComponent = () => {
21
21
 
22
22
  **For more documentation, please refer to the [Storybook](https://miljodir.github.io/md-components/)**
23
23
 
24
- **For HTML structure for each component, see the README.md for each css-file, located in /src. This must be followed if stylesheets are used as standalone, without React components.**
24
+ **For HTML structure for each component, see the README.md for each css-file, located in /src, or the `Docs`-section in the [Storybook](https://miljodir.github.io/md-components/) for each component. This must be followed if stylesheets are used as standalone, without React components.**
25
25
 
26
26
  _For React components, see [@miljodirektoratet/md-react](https://www.npmjs.com/package/@miljodirektoratet/md-react)_
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miljodirektoratet/md-css",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "CSS for Miljødirektoratet",
5
5
  "author": "Miljødirektoratet",
6
6
  "main": "./src/index.css",
@@ -1,6 +1,6 @@
1
- # AccordionItem
1
+ # Structure
2
2
 
3
- To use the `AccordionItem` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `AccordionItem` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -1,6 +1,6 @@
1
- # Button
1
+ # Structure
2
2
 
3
- To use the `Button` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `Button` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -1,6 +1,6 @@
1
- # Chips
1
+ # Structure
2
2
 
3
- To use the `Chips` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `Chips` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -1,6 +1,6 @@
1
- # FileList
1
+ # Structure
2
2
 
3
- To use the `FileList` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `FileList` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -1,6 +1,6 @@
1
- # Checkbox
1
+ # Structure
2
2
 
3
- To use the `Checkbox` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `Checkbox` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -1,6 +1,6 @@
1
- # CheckboxGroup
1
+ # Structure
2
2
 
3
- To use the `CheckboxGroup` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `CheckboxGroup` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -1,6 +1,6 @@
1
- # FileUpload
1
+ # Structure
2
2
 
3
- To use the `FileUpload` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `FileUpload` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -1,6 +1,6 @@
1
- # Input
1
+ # Structure
2
2
 
3
- To use the `Input` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `Input` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -1,6 +1,6 @@
1
- # Multiselect
1
+ # Structure
2
2
 
3
- To use the `Multiselect` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `Multiselect` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -0,0 +1,50 @@
1
+ # Structure
2
+
3
+ To use the `RadioGroup` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
+
5
+ Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
+
7
+ See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
8
+
9
+ ```html
10
+ <div className="md-radiogroup [md-radiogroup--disabled]">
11
+ <div className="md-radiogroup__label">
12
+ <div>{label}</div>
13
+
14
+ <div className="md-multiselect__help-button">
15
+ <MdHelpButton/> <- see MdHelpButton styles
16
+ </div>
17
+ </div>
18
+
19
+ <div className="md-multiselect__help-text [md-multiselect__help-text--open]">
20
+ <MdHelpText>{ helpText }</MdHelpText> <- see MdHelpText styles
21
+ </div>
22
+
23
+ <div className="md-radiogroup__options [md-radiogroup__options--vertical]">
24
+ <label className="md-radiogroup-option">
25
+ <span className="md-radiogroup-option__check-area" id="">
26
+ <!-- if selected option -->
27
+ <span className="md-radiogroup-option__selected-dot" ></span>
28
+ </span>
29
+ <input
30
+ id=""
31
+ type="radio"
32
+ value="some value"
33
+ checked={true/false}
34
+ onChange={handleChange}
35
+ disabled={true/false}
36
+ onFocus={handleFocus}
37
+ onBlur={handleBlur}
38
+ />
39
+ <span className="md-radiogroup-option__text">
40
+ {option.text}
41
+ </span>
42
+ </label>
43
+ ...
44
+ ...
45
+ </div>
46
+
47
+ <!-- if error -->
48
+ <div className="md-radiogroup__error">{error}</div>
49
+ </div>
50
+ ```
@@ -1,6 +1,6 @@
1
- # Select
1
+ # Structure
2
2
 
3
- To use the `Select` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `Select` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -1,6 +1,6 @@
1
- # Textarea
1
+ # Structure
2
2
 
3
- To use the `Textarea` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `Textarea` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -16,7 +16,6 @@ See [Storybook](https://miljodir.github.io/md-components) for examples and more
16
16
  <div className="md-textarea__help-button">
17
17
  {button to trigger help text}
18
18
  </div>
19
- }
20
19
  </div>
21
20
 
22
21
  <div className="md-textarea__help-text [md-textarea__help-text--open]">
@@ -1,6 +1,6 @@
1
- # Help
1
+ # Structure
2
2
 
3
- To use the `Help` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `Help` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
package/src/index.css CHANGED
@@ -18,7 +18,7 @@
18
18
  @import './formElements/checkboxgroup/checkboxgroup.css';
19
19
  @import './formElements/textarea/textarea.css';
20
20
  @import './formElements/select/select.css';
21
- @import './formElements/radiogroup.css';
21
+ @import './formElements/radiogroup/radiogroup.css';
22
22
  @import './formElements/multiselect/multiselect.css';
23
23
  @import './formElements/fileupload/fileupload.css';
24
24
  @import './utils.css';
@@ -1,6 +1,6 @@
1
- # InfoTags
1
+ # Structure
2
2
 
3
- To use the `InfoTags` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `InfoTags` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -1,6 +1,6 @@
1
- # Link
1
+ # Structure
2
2
 
3
- To use the `Link` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `Link` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -0,0 +1,23 @@
1
+ # Structure
2
+
3
+ To use the `AlertMessage` css as a standalone, without the accompanying React component, please use the following HTML structure.
4
+
5
+ Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
+
7
+ See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
8
+
9
+ ```html
10
+ <div className="md-alert-message [md-alert-message--confirm, md-alert-message--warning, md-alert-message--error]">
11
+ <div className="md-alert-message__content">
12
+ {Icon width="20" height="20"}
13
+ {label}
14
+ </div>
15
+
16
+ <button
17
+ className="md-alert-message__button"
18
+ onClick={handleClick}
19
+ >
20
+ {Icon width="16" height="16"}
21
+ </button>
22
+ </div>
23
+ ```
@@ -0,0 +1,14 @@
1
+ # Structure
2
+
3
+ To use the `InfoBox` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
+
5
+ Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
+
7
+ See [Storybook](https://miljodir.github.io/md-components) for examples and more info.
8
+
9
+ ```html
10
+ <div className="md-info-box">
11
+ {Icon width="20" height="20"}
12
+ {label}
13
+ </div>
14
+ ```
@@ -1,6 +1,6 @@
1
- # Info box
1
+ # Structure
2
2
 
3
- To use the `InfoBox` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `InfoBox` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -13,8 +13,6 @@ See [Storybook](https://miljodir.github.io/md-components) for examples and more
13
13
  </div>
14
14
  ```
15
15
 
16
- # Alert message
17
-
18
16
  To use the `AlertMessage` css as a standalone, without the accompanying React component, please use the following HTML structure.
19
17
 
20
18
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
@@ -1,6 +1,6 @@
1
- # Modal
1
+ # Structure
2
2
 
3
- To use the `Modal` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `Modal` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -1,6 +1,6 @@
1
- # Tabs
1
+ # Structure
2
2
 
3
- To use the `Tabs` css as a standalone, without the accompanying React component, please use the following HTML structure. The styling for this component applies to the tab-buttons, content and what to show is up to you.
3
+ To use the `Tabs` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure. The styling for this component applies to the tab-buttons, content and what to show is up to you.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -1,6 +1,6 @@
1
- # Tiles
1
+ # Structure
2
2
 
3
- To use the `Tile` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `Tile` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6
 
@@ -1,6 +1,6 @@
1
- # Toggle
1
+ # Structure
2
2
 
3
- To use the `Toggle` css as a standalone, without the accompanying React component, please use the following HTML structure.
3
+ To use the `Toggle` css in `@miljodirektoratet/md-css` as a standalone, without the accompanying React component, please use the following HTML structure.
4
4
 
5
5
  Class names in brackets [] are optional-/togglable-/decorator- or state dependant classes.
6
6