@digibib/deichman-ui
Advanced tools
Comparing version 6.0.1 to 6.1.0
@@ -1196,2 +1196,51 @@ import React, { Component, Fragment } from 'react'; | ||
var Sorter = function Sorter(_ref) { | ||
var active = _ref.active, | ||
direction = _ref.direction, | ||
children = _ref.children, | ||
onClick = _ref.onClick; | ||
var sorterClass = classNames({ | ||
sorter: true, | ||
'sorter--asc': active && direction === 'asc', | ||
'sorter--des': active && direction === 'des' | ||
}); | ||
return React.createElement( | ||
'button', | ||
{ className: sorterClass, onClick: onClick }, | ||
React.createElement( | ||
'span', | ||
{ className: 'sorter__inner' }, | ||
children, | ||
React.createElement( | ||
'span', | ||
{ className: 'sorter__icons' }, | ||
React.createElement( | ||
'span', | ||
{ className: 'sorter__icon-up' }, | ||
React.createElement(Icon, { type: 'arrow-up', size: '23' }) | ||
), | ||
React.createElement( | ||
'span', | ||
{ className: 'sorter__icon-down' }, | ||
React.createElement(Icon, { type: 'arrow-down', size: '23' }) | ||
) | ||
) | ||
) | ||
); | ||
}; | ||
Sorter.defaultProps = { | ||
active: false, | ||
direction: '' | ||
}; | ||
Sorter.propTypes = { | ||
active: PropTypes.bool, | ||
direction: PropTypes.string, | ||
children: PropTypes.node.isRequired, | ||
onClick: PropTypes.func.isRequired | ||
}; | ||
var Head = function Head(_ref) { | ||
@@ -1689,3 +1738,3 @@ var children = _ref.children; | ||
export { Accordion, Banner, Block, Burger, Button, Button$1 as Checkbox, CircleButton, Container, Hr, Flex, Grid, GridItem, Icon, IconLoader, Input, List, Loader, Modal, Overlay, Overflow, Select, ShowMore, Sidebar, Table, Tag, TagList, Text, Textarea }; | ||
export { Accordion, Banner, Block, Burger, Button, Button$1 as Checkbox, CircleButton, Container, Hr, Flex, Grid, GridItem, Icon, IconLoader, Input, List, Loader, Modal, Overlay, Overflow, Select, ShowMore, Sidebar, Sorter, Table, Tag, TagList, Text, Textarea }; | ||
//# sourceMappingURL=index.es.js.map |
@@ -1203,2 +1203,51 @@ 'use strict'; | ||
var Sorter = function Sorter(_ref) { | ||
var active = _ref.active, | ||
direction = _ref.direction, | ||
children = _ref.children, | ||
onClick = _ref.onClick; | ||
var sorterClass = classNames({ | ||
sorter: true, | ||
'sorter--asc': active && direction === 'asc', | ||
'sorter--des': active && direction === 'des' | ||
}); | ||
return React__default.createElement( | ||
'button', | ||
{ className: sorterClass, onClick: onClick }, | ||
React__default.createElement( | ||
'span', | ||
{ className: 'sorter__inner' }, | ||
children, | ||
React__default.createElement( | ||
'span', | ||
{ className: 'sorter__icons' }, | ||
React__default.createElement( | ||
'span', | ||
{ className: 'sorter__icon-up' }, | ||
React__default.createElement(Icon, { type: 'arrow-up', size: '23' }) | ||
), | ||
React__default.createElement( | ||
'span', | ||
{ className: 'sorter__icon-down' }, | ||
React__default.createElement(Icon, { type: 'arrow-down', size: '23' }) | ||
) | ||
) | ||
) | ||
); | ||
}; | ||
Sorter.defaultProps = { | ||
active: false, | ||
direction: '' | ||
}; | ||
Sorter.propTypes = { | ||
active: PropTypes.bool, | ||
direction: PropTypes.string, | ||
children: PropTypes.node.isRequired, | ||
onClick: PropTypes.func.isRequired | ||
}; | ||
var Head = function Head(_ref) { | ||
@@ -1719,2 +1768,3 @@ var children = _ref.children; | ||
exports.Sidebar = Sidebar; | ||
exports.Sorter = Sorter; | ||
exports.Table = Table; | ||
@@ -1721,0 +1771,0 @@ exports.Tag = Tag; |
{ | ||
"name": "@digibib/deichman-ui", | ||
"version": "6.0.1", | ||
"version": "6.1.0", | ||
"description": "Deichman style-guide and component library", | ||
@@ -39,4 +39,4 @@ "main": "dist/index.js", | ||
"prop-types": "^15.6.2", | ||
"react": ">=16.4.0", | ||
"react-dom": ">=16.6.1" | ||
"react": ">=16.8.6", | ||
"react-dom": ">=16.8.6" | ||
}, | ||
@@ -43,0 +43,0 @@ "devDependencies": { |
@@ -11,2 +11,10 @@ ## Deichman-ui | ||
### Built with | ||
- [React](https://reactjs.org/) | ||
- [PostCSS](https://preset-env.cssdb.org/) CSS processing | ||
- [Backpack.css](https://github.com/chris-pearce/backpack.css) CSS foundation for applications | ||
- [Rollup](https://rollupjs.org/guide/en) JavaScript module bundler | ||
- [Storybook](https://storybook.js.org/) UI Development Environment | ||
### Developing | ||
@@ -21,13 +29,18 @@ | ||
### Built with | ||
### New components | ||
- [React](https://reactjs.org/) | ||
- [PostCSS](https://preset-env.cssdb.org/) CSS processing | ||
- [Backpack.css](https://github.com/chris-pearce/backpack.css) CSS foundation for applications | ||
- [Rollup](https://rollupjs.org/guide/en) JavaScript module bundler | ||
- [Storybook](https://storybook.js.org/) UI Development Environment | ||
Before adding a new Component, make sure this is a generic utility-component. If it's not, add it to the project where it will be used. I.E, an "Accordion" is generic, a "LibraryDetailsCard" is probably not. | ||
##### New component checklist: | ||
| | Requirement | Description | | ||
| --- | --------------------------- | --------------------------------------------------------------------------------- | | ||
| ✅ | The component is semantic | Use HTML5 markup, the correct font hierarchy etc. | | ||
| ✅ | The component is documented | Ensure the component has a `Component.md` file, a story and proptype definitions. | | ||
| ✅ | The component is accessible | Usable with a keyboard, correct `:focus`-styles, correct `aria-roles`. | | ||
| ✅ | The component is tested | Cross-browser testing. | | ||
### Publishing | ||
Make sure to update the [changelog](CHANGELOG.md) | ||
Make sure to update the [changelog](CHANGELOG.md) if there's any breaking changes. | ||
@@ -34,0 +47,0 @@ To publish a new version of the library to npm: |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
724910
3755
63
Updatedreact@>=16.8.6
Updatedreact-dom@>=16.8.6