@entur/grid 0.3.19 → 0.3.21
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/LICENSE.md +0 -71
- package/dist/BaseGrid.d.ts +2 -2
- package/dist/GridContainer.d.ts +2 -2
- package/dist/GridItem.d.ts +2 -2
- package/dist/grid.cjs.development.js +23 -33
- package/dist/grid.cjs.development.js.map +1 -1
- package/dist/grid.cjs.production.min.js +1 -1
- package/dist/grid.cjs.production.min.js.map +1 -1
- package/dist/grid.esm.js +23 -33
- package/dist/grid.esm.js.map +1 -1
- package/package.json +5 -5
- package/CHANGELOG.md +0 -144
package/LICENSE.md
CHANGED
|
@@ -208,74 +208,3 @@ The European Commission may update this Appendix to later versions of the above
|
|
|
208
208
|
a new version of the EUPL, as long as they provide the rights granted in Article 2 of this Licence and protect the
|
|
209
209
|
covered Source Code from exclusive appropriation.
|
|
210
210
|
All other changes or additions to this Appendix require the production of a new EUPL version.
|
|
211
|
-
|
|
212
|
-
# Standard Nucleo License
|
|
213
|
-
|
|
214
|
-
- Last updated: July 2, 2018
|
|
215
|
-
- [Github repo](https://github.com/NucleoApp/license-standard)
|
|
216
|
-
|
|
217
|
-
By purchasing the Nucleo icons, you have the right to:
|
|
218
|
-
|
|
219
|
-
- Use the Nucleo icons in unlimited personal and commercial projects, for yourself or a client, with no limitation to the number of impressions for your end product.
|
|
220
|
-
- Use the Nucleo icons in applications, software, UI/UX design, print, and logo design.
|
|
221
|
-
- Modify the Nucleo icons to create your icon variations.
|
|
222
|
-
|
|
223
|
-
You don't have the right to:
|
|
224
|
-
|
|
225
|
-
- Sublicense, resell, share, transfer, or otherwise redistribute the Nucleo icons (even for free or within a more complex downloadable file).
|
|
226
|
-
- Use the Nucleo icons in a product that is directly competitive with Nucleo.
|
|
227
|
-
|
|
228
|
-
## Limitations & Extended license
|
|
229
|
-
|
|
230
|
-
- **For each project, you can use a maximum of 250 Nucleo icons** (intended per unique style: for example, if you're using the same icon in both the outline and glyph styles, or in 2 different sizes, you're using 2 icons). You can lift this limit by purchasing an Extended License.
|
|
231
|
-
- If you're using Nucleo icons in templates, themes or plugins offered for sale, you can use a maximum of 100 Nucleo icons. You can lift this limit by purchasing an Extended License.
|
|
232
|
-
- If you're using the Nucleo icons in open source projects, you can use a maximum of 100 Nucleo icons.
|
|
233
|
-
- If you're interested in using the Nucleo icons in items offered for sale (or for free) where the Nucleo icons contribute to the core value of the product being sold/shared, you will need an Extended License (e.g., a CMS where users can browse the Nucleo icons and pick the ones to include in their design).
|
|
234
|
-
|
|
235
|
-
[Learn more about the Extended License](https://nucleoapp.com/extended-license)
|
|
236
|
-
|
|
237
|
-
## Freelance Projects & Contracted work
|
|
238
|
-
|
|
239
|
-
If you're working on a project for a client, you can share with your client a maximum of 250 Nucleo icons per project. You can't share the Nucleo source files unless the client purchases a license.
|
|
240
|
-
|
|
241
|
-
If the Nucleo icons contribute to the core value of the product being sold/shared, or if you (or your client) wish to include more than 250 icons in the project, the [Extended License](https://nucleoapp.com/extended-license) is required.
|
|
242
|
-
|
|
243
|
-
## Templates, Themes, UI Kits & Plugins
|
|
244
|
-
|
|
245
|
-
If you're using Nucleo icons in templates, themes or plugins offered for sale (e.g., UI kits, Wordpress Themes, HTML/CSS Templates), **you can include up to 100 icons in the downloadable source files**. This limitation applies to the icon fonts as well.
|
|
246
|
-
|
|
247
|
-
The downloadable source file has to include the [Nucleo Copyright Notice](https://nucleoapp.com/copyright-notice).
|
|
248
|
-
|
|
249
|
-
If the Nucleo icons contribute to the core value of the template, theme or plugin sold (e.g., a theme builder where users can browse Nucleo icons and pick the ones to include in their design), or if you wish to use more than 100 Nucleo icons, you will need an [Extended License](https://nucleoapp.com/extended-license).
|
|
250
|
-
|
|
251
|
-
It's not possible to purchase an Extended License if the template, theme or plugin is distributed for free.
|
|
252
|
-
|
|
253
|
-
If you're offering a free and pro version of your product, the free version cannot include more than 100 icons even if you purchased an Extended License to lift the limit. The Extended License applies only to the pro version of your product.
|
|
254
|
-
|
|
255
|
-
## Open source projects
|
|
256
|
-
|
|
257
|
-
If you're using the Nucleo icons in open source projects, **you can include up to 100 icons in the downloadable source files**. This limitation applies to the icon fonts as well.
|
|
258
|
-
|
|
259
|
-
The downloadable source file has to include the [Nucleo Copyright Notice](https://nucleoapp.com/copyright-notice).
|
|
260
|
-
|
|
261
|
-
It's not possible to purchase an Extended License for open source projects.
|
|
262
|
-
|
|
263
|
-
## Sharing Nucleo icons with team members
|
|
264
|
-
|
|
265
|
-
If you're the sole owner of a Nucleo license, you can share with your team members only the icons used in your work, with a maximum of 250 icons (e.g., if you're a designer, you can share with the developers of your team only the Nucleo icons used in your design files).
|
|
266
|
-
|
|
267
|
-
Your team members cannot reuse the Nucleo icons in other projects unless they purchase a license.
|
|
268
|
-
|
|
269
|
-
If more than one team member needs access to the Nucleo icons, you can consider purchasing a [team license](https://nucleoapp.com/pricing).
|
|
270
|
-
|
|
271
|
-
## Design systems
|
|
272
|
-
|
|
273
|
-
If you wish to include the Nucleo icons in a design system available on a public server, you can use a maximum of 250 Nucleo icons, even if your team purchased a Nucleo team license.
|
|
274
|
-
|
|
275
|
-
If the design system is accessible only by the members of your organization (e.g., is hosted on a password protected server), but you're the sole owner of a Nucleo license, you can share with your colleagues a maximum of 250 Nucleo icons.
|
|
276
|
-
|
|
277
|
-
If the design system is on a public server, you can lift the 250 icons limit by buying an [Extended License](https://nucleoapp.com/extended-license). However, please keep in mind you can't provide a link/button to download all the icons.
|
|
278
|
-
|
|
279
|
-
If your team purchased a Nucleo team license that covers all the users with access to the design system, and the design system is not public (e.g., is hosted on a password protected server), then there's no limitation to the number of icons that can be included.
|
|
280
|
-
|
|
281
|
-
If you're still unclear about what is or isn't allowed under this license, please contact us at info@nucleoapp.com.
|
package/dist/BaseGrid.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PolymorphicComponentProps } from '@entur/utils';
|
|
3
3
|
import './Grid.scss';
|
|
4
|
-
|
|
4
|
+
type BaseGridOwnProps = {
|
|
5
5
|
/** Om det er en GridContainer
|
|
6
6
|
* @default false
|
|
7
7
|
*/
|
|
@@ -36,6 +36,6 @@ declare type BaseGridOwnProps = {
|
|
|
36
36
|
children?: React.ReactNode;
|
|
37
37
|
};
|
|
38
38
|
declare const defaultElement = "code";
|
|
39
|
-
export
|
|
39
|
+
export type BaseGridProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, BaseGridOwnProps>;
|
|
40
40
|
export declare const BaseGrid: <E extends React.ElementType<any> = "code">({ item, container, children, className, spacing, rowSpacing, small, medium, large, as, ...rest }: BaseGridProps<E>) => JSX.Element;
|
|
41
41
|
export {};
|
package/dist/GridContainer.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PolymorphicComponentProps } from '@entur/utils';
|
|
3
3
|
import './Grid.scss';
|
|
4
|
-
export
|
|
4
|
+
export type GridContainerOwnProps = {
|
|
5
5
|
/** Mellomromet mellom hver GridItem, basert på spacing-tokens
|
|
6
6
|
* @default none
|
|
7
7
|
*/
|
|
@@ -17,7 +17,7 @@ export declare type GridContainerOwnProps = {
|
|
|
17
17
|
/** Ekstra klassenavn */
|
|
18
18
|
className?: string;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type GridContainerProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, GridContainerOwnProps>;
|
|
21
21
|
declare const defaultElement = "div";
|
|
22
22
|
export declare const GridContainer: <E extends React.ElementType<any> = "div">({ children, className, spacing, rowSpacing, as, ...rest }: GridContainerProps<E>) => JSX.Element;
|
|
23
23
|
export {};
|
package/dist/GridItem.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PolymorphicComponentProps } from '@entur/utils';
|
|
3
3
|
import './Grid.scss';
|
|
4
|
-
export
|
|
4
|
+
export type GridItemOwnProps = {
|
|
5
5
|
/** Antall kolonner en Item bruker på små flater (og oppover)
|
|
6
6
|
* @default 1
|
|
7
7
|
*/
|
|
@@ -17,7 +17,7 @@ export declare type GridItemOwnProps = {
|
|
|
17
17
|
/** Ekstra klassenavn */
|
|
18
18
|
className?: string;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type GridItemProps<T extends React.ElementType = typeof defaultElement> = PolymorphicComponentProps<T, GridItemOwnProps>;
|
|
21
21
|
declare const defaultElement = "div";
|
|
22
22
|
export declare const GridItem: <E extends React.ElementType<any> = "div">({ children, className, small, medium, large, as, ...rest }: GridItemProps<E>) => JSX.Element;
|
|
23
23
|
export {};
|
|
@@ -12,35 +12,29 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
12
12
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
13
13
|
|
|
14
14
|
function _extends() {
|
|
15
|
-
_extends = Object.assign
|
|
15
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
16
16
|
for (var i = 1; i < arguments.length; i++) {
|
|
17
17
|
var source = arguments[i];
|
|
18
|
-
|
|
19
18
|
for (var key in source) {
|
|
20
19
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
21
20
|
target[key] = source[key];
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
|
-
|
|
26
24
|
return target;
|
|
27
25
|
};
|
|
28
|
-
|
|
29
26
|
return _extends.apply(this, arguments);
|
|
30
27
|
}
|
|
31
|
-
|
|
32
28
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
33
29
|
if (source == null) return {};
|
|
34
30
|
var target = {};
|
|
35
31
|
var sourceKeys = Object.keys(source);
|
|
36
32
|
var key, i;
|
|
37
|
-
|
|
38
33
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
39
34
|
key = sourceKeys[i];
|
|
40
35
|
if (excluded.indexOf(key) >= 0) continue;
|
|
41
36
|
target[key] = source[key];
|
|
42
37
|
}
|
|
43
|
-
|
|
44
38
|
return target;
|
|
45
39
|
}
|
|
46
40
|
|
|
@@ -48,20 +42,18 @@ var _excluded$2 = ["item", "container", "children", "className", "spacing", "row
|
|
|
48
42
|
var defaultElement$2 = 'code';
|
|
49
43
|
var BaseGrid = function BaseGrid(_ref) {
|
|
50
44
|
var _ref2, _ref3, _ref4, _ref5, _ref6;
|
|
51
|
-
|
|
52
45
|
var item = _ref.item,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
46
|
+
container = _ref.container,
|
|
47
|
+
children = _ref.children,
|
|
48
|
+
className = _ref.className,
|
|
49
|
+
spacing = _ref.spacing,
|
|
50
|
+
rowSpacing = _ref.rowSpacing,
|
|
51
|
+
_ref$small = _ref.small,
|
|
52
|
+
small = _ref$small === void 0 ? 1 : _ref$small,
|
|
53
|
+
medium = _ref.medium,
|
|
54
|
+
large = _ref.large,
|
|
55
|
+
as = _ref.as,
|
|
56
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
65
57
|
var Element = as || defaultElement$2;
|
|
66
58
|
var classList = classnames__default["default"](['eds-grid', className, {
|
|
67
59
|
'eds-grid__item': item
|
|
@@ -77,13 +69,12 @@ var _excluded$1 = ["children", "className", "small", "medium", "large", "as"];
|
|
|
77
69
|
var defaultElement$1 = 'div';
|
|
78
70
|
var GridItem = function GridItem(_ref) {
|
|
79
71
|
var children = _ref.children,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
72
|
+
className = _ref.className,
|
|
73
|
+
small = _ref.small,
|
|
74
|
+
medium = _ref.medium,
|
|
75
|
+
large = _ref.large,
|
|
76
|
+
as = _ref.as,
|
|
77
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
87
78
|
var Element = as || defaultElement$1;
|
|
88
79
|
return React__default["default"].createElement(BaseGrid, _extends({
|
|
89
80
|
as: Element,
|
|
@@ -99,12 +90,11 @@ var _excluded = ["children", "className", "spacing", "rowSpacing", "as"];
|
|
|
99
90
|
var defaultElement = 'div';
|
|
100
91
|
var GridContainer = function GridContainer(_ref) {
|
|
101
92
|
var children = _ref.children,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
93
|
+
className = _ref.className,
|
|
94
|
+
spacing = _ref.spacing,
|
|
95
|
+
rowSpacing = _ref.rowSpacing,
|
|
96
|
+
as = _ref.as,
|
|
97
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
108
98
|
var Element = as || defaultElement;
|
|
109
99
|
return React__default["default"].createElement(BaseGrid, _extends({
|
|
110
100
|
container: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.cjs.development.js","sources":["../src/BaseGrid.tsx","../src/GridItem.tsx","../src/GridContainer.tsx","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\ntype BaseGridOwnProps = {\n /** Om det er en GridContainer\n * @default false\n */\n container?: boolean;\n /** Om det er et GridItem\n * @default false\n */\n item?: boolean;\n /** Mellomromet mellom hver GridItem, basert på spacing-tokens\n * @default none\n */\n spacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Vertikalt mellomrom for hver GridItem\n * @default Verdien til spacing\n */\n rowSpacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Antall kolonner en Item bruker på små flater (og oppover)\n * @default 1\n */\n small?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på medium flater (og oppover) */\n medium?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på store flater. */\n large?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** HTML-elementet eller React-komponenten som lager Grid-elementet\n * @default \"div\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet til Grid containeren/item */\n children?: React.ReactNode;\n};\nconst defaultElement = 'code';\n\nexport type BaseGridProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, BaseGridOwnProps>;\n\nexport const BaseGrid = <E extends React.ElementType = typeof defaultElement>({\n item,\n container,\n children,\n className,\n spacing,\n rowSpacing,\n small = 1,\n medium,\n large,\n as,\n ...rest\n}: BaseGridProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classnames([\n 'eds-grid',\n className,\n { 'eds-grid__item': item },\n { 'eds-grid__container': container },\n { [`eds-grid--spacing-${spacing}`]: spacing && container },\n { [`eds-grid--spacing-row-${rowSpacing}`]: spacing !== rowSpacing },\n { [`eds-grid--small-${small}`]: small && item },\n { [`eds-grid--medium-${medium}`]: medium && item },\n { [`eds-grid--large-${large}`]: large && item },\n ]);\n return (\n <Element className={classList} {...rest}>\n {children}\n </Element>\n );\n};\n","import React from 'react';\nimport { BaseGrid } from './BaseGrid';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\nexport type GridItemOwnProps = {\n /** Antall kolonner en Item bruker på små flater (og oppover)\n * @default 1\n */\n small?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på medium flater (og oppover) */\n medium?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på store flater. */\n large?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** HTML-elementet eller React-komponenten som lager Grid-elementet*/\n as?: 'div' | React.ElementType;\n /** Innholdet til Grid containeren/item */\n children?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type GridItemProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, GridItemOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const GridItem = <E extends React.ElementType = typeof defaultElement>({\n children,\n className,\n small,\n medium,\n large,\n as,\n ...rest\n}: GridItemProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseGrid\n as={Element}\n item\n className={className}\n small={small}\n medium={medium}\n large={large}\n {...rest}\n >\n {children}\n </BaseGrid>\n );\n};\n","import React from 'react';\nimport { BaseGrid } from './BaseGrid';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\nexport type GridContainerOwnProps = {\n /** Mellomromet mellom hver GridItem, basert på spacing-tokens\n * @default none\n */\n spacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Mellomrom mellom hver rad\n * @default Verdien til spacing\n */\n rowSpacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** HTML-elementet eller React-komponenten som lager Grid-elementet*/\n as?: 'div' | React.ElementType;\n /** Innholdet til Grid-containeren */\n children?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type GridContainerProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, GridContainerOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const GridContainer = <\n E extends React.ElementType = typeof defaultElement,\n>({\n children,\n className,\n spacing,\n rowSpacing,\n as,\n ...rest\n}: GridContainerProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseGrid\n container\n as={Element}\n className={className}\n spacing={spacing}\n rowSpacing={rowSpacing}\n {...rest}\n >\n {children}\n </BaseGrid>\n );\n};\n","import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('grid');\n\nexport * from './GridItem';\nexport * from './GridContainer';\n"],"names":["defaultElement","BaseGrid","item","container","children","className","spacing","rowSpacing","small","medium","large","as","rest","Element","classList","classnames","React","GridItem","GridContainer","warnAboutMissingStyles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"grid.cjs.development.js","sources":["../src/BaseGrid.tsx","../src/GridItem.tsx","../src/GridContainer.tsx","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\ntype BaseGridOwnProps = {\n /** Om det er en GridContainer\n * @default false\n */\n container?: boolean;\n /** Om det er et GridItem\n * @default false\n */\n item?: boolean;\n /** Mellomromet mellom hver GridItem, basert på spacing-tokens\n * @default none\n */\n spacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Vertikalt mellomrom for hver GridItem\n * @default Verdien til spacing\n */\n rowSpacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Antall kolonner en Item bruker på små flater (og oppover)\n * @default 1\n */\n small?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på medium flater (og oppover) */\n medium?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på store flater. */\n large?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** HTML-elementet eller React-komponenten som lager Grid-elementet\n * @default \"div\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet til Grid containeren/item */\n children?: React.ReactNode;\n};\nconst defaultElement = 'code';\n\nexport type BaseGridProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, BaseGridOwnProps>;\n\nexport const BaseGrid = <E extends React.ElementType = typeof defaultElement>({\n item,\n container,\n children,\n className,\n spacing,\n rowSpacing,\n small = 1,\n medium,\n large,\n as,\n ...rest\n}: BaseGridProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classnames([\n 'eds-grid',\n className,\n { 'eds-grid__item': item },\n { 'eds-grid__container': container },\n { [`eds-grid--spacing-${spacing}`]: spacing && container },\n { [`eds-grid--spacing-row-${rowSpacing}`]: spacing !== rowSpacing },\n { [`eds-grid--small-${small}`]: small && item },\n { [`eds-grid--medium-${medium}`]: medium && item },\n { [`eds-grid--large-${large}`]: large && item },\n ]);\n return (\n <Element className={classList} {...rest}>\n {children}\n </Element>\n );\n};\n","import React from 'react';\nimport { BaseGrid } from './BaseGrid';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\nexport type GridItemOwnProps = {\n /** Antall kolonner en Item bruker på små flater (og oppover)\n * @default 1\n */\n small?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på medium flater (og oppover) */\n medium?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på store flater. */\n large?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** HTML-elementet eller React-komponenten som lager Grid-elementet*/\n as?: 'div' | React.ElementType;\n /** Innholdet til Grid containeren/item */\n children?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type GridItemProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, GridItemOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const GridItem = <E extends React.ElementType = typeof defaultElement>({\n children,\n className,\n small,\n medium,\n large,\n as,\n ...rest\n}: GridItemProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseGrid\n as={Element}\n item\n className={className}\n small={small}\n medium={medium}\n large={large}\n {...rest}\n >\n {children}\n </BaseGrid>\n );\n};\n","import React from 'react';\nimport { BaseGrid } from './BaseGrid';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\nexport type GridContainerOwnProps = {\n /** Mellomromet mellom hver GridItem, basert på spacing-tokens\n * @default none\n */\n spacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Mellomrom mellom hver rad\n * @default Verdien til spacing\n */\n rowSpacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** HTML-elementet eller React-komponenten som lager Grid-elementet*/\n as?: 'div' | React.ElementType;\n /** Innholdet til Grid-containeren */\n children?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type GridContainerProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, GridContainerOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const GridContainer = <\n E extends React.ElementType = typeof defaultElement,\n>({\n children,\n className,\n spacing,\n rowSpacing,\n as,\n ...rest\n}: GridContainerProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseGrid\n container\n as={Element}\n className={className}\n spacing={spacing}\n rowSpacing={rowSpacing}\n {...rest}\n >\n {children}\n </BaseGrid>\n );\n};\n","import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('grid');\n\nexport * from './GridItem';\nexport * from './GridContainer';\n"],"names":["defaultElement","BaseGrid","item","container","children","className","spacing","rowSpacing","small","medium","large","as","rest","_excluded","Element","classList","classnames","React","createElement","GridItem","GridContainer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IANvChB,QAAQ,QAARA,QAAQ;AACRC,IAAAA,SAAS,QAATA,SAAS;AACTC,IAAAA,OAAO,QAAPA,OAAO;AACPC,IAAAA,UAAU,QAAVA,UAAU;AACVI,IAAAA,EAAE,QAAFA,EAAE;IACCC,IAAI,GAAA,6BAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;AAEP,EAAA,IAAME,OAAO,GAAsBH,EAAE,IAAIX,cAAc,CAAA;AACvD,EAAA,OACEiB,yBAAC,CAAAC,aAAA,CAAAjB,QAAQ,EAAA,QAAA,CAAA;AACPE,IAAAA,SAAS,EACT,IAAA;AAAAQ,IAAAA,EAAE,EAAEG,OAAO;AACXT,IAAAA,SAAS,EAAEA,SAAS;AACpBC,IAAAA,OAAO,EAAEA,OAAO;AAChBC,IAAAA,UAAU,EAAEA,UAAAA;GACRK,EAAAA,IAAI,CAEPR,EAAAA,QAAQ,CACA,CAAA;AAEf;;AC9DAiB,4BAAsB,CAAC,MAAM,CAAC;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@entur/utils"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@entur/utils"),a=require("react"),r=require("classnames");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(a),s=i(r);function t(){return t=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},t.apply(this,arguments)}function l(e,a){if(null==e)return{};var r,i,n={},s=Object.keys(e);for(i=0;i<s.length;i++)a.indexOf(r=s[i])>=0||(n[r]=e[r]);return n}var c=["item","container","children","className","spacing","rowSpacing","small","medium","large","as"],d=function(e){var a,r,i,d,u,m=e.item,o=e.container,g=e.children,p=e.className,f=e.spacing,v=e.rowSpacing,h=e.small,N=void 0===h?1:h,b=e.medium,w=e.large,y=e.as,O=l(e,c),j=y||"code",S=s.default(["eds-grid",p,{"eds-grid__item":m},{"eds-grid__container":o},(a={},a["eds-grid--spacing-"+f]=f&&o,a),(r={},r["eds-grid--spacing-row-"+v]=f!==v,r),(i={},i["eds-grid--small-"+N]=N&&m,i),(d={},d["eds-grid--medium-"+b]=b&&m,d),(u={},u["eds-grid--large-"+w]=w&&m,u)]);return n.default.createElement(j,t({className:S},O),g)},u=["children","className","small","medium","large","as"],m=["children","className","spacing","rowSpacing","as"];e.warnAboutMissingStyles("grid"),exports.GridContainer=function(e){var a=e.children,r=e.className,i=e.spacing,s=e.rowSpacing,c=e.as,u=l(e,m);return n.default.createElement(d,t({container:!0,as:c||"div",className:r,spacing:i,rowSpacing:s},u),a)},exports.GridItem=function(e){var a=e.children,r=e.className,i=e.small,s=e.medium,c=e.large,m=e.as,o=l(e,u);return n.default.createElement(d,t({as:m||"div",item:!0,className:r,small:i,medium:s,large:c},o),a)};
|
|
2
2
|
//# sourceMappingURL=grid.cjs.production.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.cjs.production.min.js","sources":["../src/BaseGrid.tsx","../src/index.tsx","../src/GridContainer.tsx","../src/GridItem.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\ntype BaseGridOwnProps = {\n /** Om det er en GridContainer\n * @default false\n */\n container?: boolean;\n /** Om det er et GridItem\n * @default false\n */\n item?: boolean;\n /** Mellomromet mellom hver GridItem, basert på spacing-tokens\n * @default none\n */\n spacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Vertikalt mellomrom for hver GridItem\n * @default Verdien til spacing\n */\n rowSpacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Antall kolonner en Item bruker på små flater (og oppover)\n * @default 1\n */\n small?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på medium flater (og oppover) */\n medium?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på store flater. */\n large?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** HTML-elementet eller React-komponenten som lager Grid-elementet\n * @default \"div\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet til Grid containeren/item */\n children?: React.ReactNode;\n};\nconst defaultElement = 'code';\n\nexport type BaseGridProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, BaseGridOwnProps>;\n\nexport const BaseGrid = <E extends React.ElementType = typeof defaultElement>({\n item,\n container,\n children,\n className,\n spacing,\n rowSpacing,\n small = 1,\n medium,\n large,\n as,\n ...rest\n}: BaseGridProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classnames([\n 'eds-grid',\n className,\n { 'eds-grid__item': item },\n { 'eds-grid__container': container },\n { [`eds-grid--spacing-${spacing}`]: spacing && container },\n { [`eds-grid--spacing-row-${rowSpacing}`]: spacing !== rowSpacing },\n { [`eds-grid--small-${small}`]: small && item },\n { [`eds-grid--medium-${medium}`]: medium && item },\n { [`eds-grid--large-${large}`]: large && item },\n ]);\n return (\n <Element className={classList} {...rest}>\n {children}\n </Element>\n );\n};\n","import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('grid');\n\nexport * from './GridItem';\nexport * from './GridContainer';\n","import React from 'react';\nimport { BaseGrid } from './BaseGrid';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\nexport type GridContainerOwnProps = {\n /** Mellomromet mellom hver GridItem, basert på spacing-tokens\n * @default none\n */\n spacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Mellomrom mellom hver rad\n * @default Verdien til spacing\n */\n rowSpacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** HTML-elementet eller React-komponenten som lager Grid-elementet*/\n as?: 'div' | React.ElementType;\n /** Innholdet til Grid-containeren */\n children?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type GridContainerProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, GridContainerOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const GridContainer = <\n E extends React.ElementType = typeof defaultElement,\n>({\n children,\n className,\n spacing,\n rowSpacing,\n as,\n ...rest\n}: GridContainerProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseGrid\n container\n as={Element}\n className={className}\n spacing={spacing}\n rowSpacing={rowSpacing}\n {...rest}\n >\n {children}\n </BaseGrid>\n );\n};\n","import React from 'react';\nimport { BaseGrid } from './BaseGrid';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\nexport type GridItemOwnProps = {\n /** Antall kolonner en Item bruker på små flater (og oppover)\n * @default 1\n */\n small?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på medium flater (og oppover) */\n medium?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på store flater. */\n large?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** HTML-elementet eller React-komponenten som lager Grid-elementet*/\n as?: 'div' | React.ElementType;\n /** Innholdet til Grid containeren/item */\n children?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type GridItemProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, GridItemOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const GridItem = <E extends React.ElementType = typeof defaultElement>({\n children,\n className,\n small,\n medium,\n large,\n as,\n ...rest\n}: GridItemProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseGrid\n as={Element}\n item\n className={className}\n small={small}\n medium={medium}\n large={large}\n {...rest}\n >\n {children}\n </BaseGrid>\n );\n};\n"],"names":["BaseGrid","item","container","children","className","spacing","rowSpacing","small","medium","large","as","rest","Element","classList","classnames","React","warnAboutMissingStyles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"grid.cjs.production.min.js","sources":["../src/BaseGrid.tsx","../src/index.tsx","../src/GridContainer.tsx","../src/GridItem.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\ntype BaseGridOwnProps = {\n /** Om det er en GridContainer\n * @default false\n */\n container?: boolean;\n /** Om det er et GridItem\n * @default false\n */\n item?: boolean;\n /** Mellomromet mellom hver GridItem, basert på spacing-tokens\n * @default none\n */\n spacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Vertikalt mellomrom for hver GridItem\n * @default Verdien til spacing\n */\n rowSpacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Antall kolonner en Item bruker på små flater (og oppover)\n * @default 1\n */\n small?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på medium flater (og oppover) */\n medium?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på store flater. */\n large?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** HTML-elementet eller React-komponenten som lager Grid-elementet\n * @default \"div\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet til Grid containeren/item */\n children?: React.ReactNode;\n};\nconst defaultElement = 'code';\n\nexport type BaseGridProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, BaseGridOwnProps>;\n\nexport const BaseGrid = <E extends React.ElementType = typeof defaultElement>({\n item,\n container,\n children,\n className,\n spacing,\n rowSpacing,\n small = 1,\n medium,\n large,\n as,\n ...rest\n}: BaseGridProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classnames([\n 'eds-grid',\n className,\n { 'eds-grid__item': item },\n { 'eds-grid__container': container },\n { [`eds-grid--spacing-${spacing}`]: spacing && container },\n { [`eds-grid--spacing-row-${rowSpacing}`]: spacing !== rowSpacing },\n { [`eds-grid--small-${small}`]: small && item },\n { [`eds-grid--medium-${medium}`]: medium && item },\n { [`eds-grid--large-${large}`]: large && item },\n ]);\n return (\n <Element className={classList} {...rest}>\n {children}\n </Element>\n );\n};\n","import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('grid');\n\nexport * from './GridItem';\nexport * from './GridContainer';\n","import React from 'react';\nimport { BaseGrid } from './BaseGrid';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\nexport type GridContainerOwnProps = {\n /** Mellomromet mellom hver GridItem, basert på spacing-tokens\n * @default none\n */\n spacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Mellomrom mellom hver rad\n * @default Verdien til spacing\n */\n rowSpacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** HTML-elementet eller React-komponenten som lager Grid-elementet*/\n as?: 'div' | React.ElementType;\n /** Innholdet til Grid-containeren */\n children?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type GridContainerProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, GridContainerOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const GridContainer = <\n E extends React.ElementType = typeof defaultElement,\n>({\n children,\n className,\n spacing,\n rowSpacing,\n as,\n ...rest\n}: GridContainerProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseGrid\n container\n as={Element}\n className={className}\n spacing={spacing}\n rowSpacing={rowSpacing}\n {...rest}\n >\n {children}\n </BaseGrid>\n );\n};\n","import React from 'react';\nimport { BaseGrid } from './BaseGrid';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\nexport type GridItemOwnProps = {\n /** Antall kolonner en Item bruker på små flater (og oppover)\n * @default 1\n */\n small?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på medium flater (og oppover) */\n medium?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på store flater. */\n large?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** HTML-elementet eller React-komponenten som lager Grid-elementet*/\n as?: 'div' | React.ElementType;\n /** Innholdet til Grid containeren/item */\n children?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type GridItemProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, GridItemOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const GridItem = <E extends React.ElementType = typeof defaultElement>({\n children,\n className,\n small,\n medium,\n large,\n as,\n ...rest\n}: GridItemProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseGrid\n as={Element}\n item\n className={className}\n small={small}\n medium={medium}\n large={large}\n {...rest}\n >\n {children}\n </BaseGrid>\n );\n};\n"],"names":["BaseGrid","_ref","_ref2","_ref3","_ref4","_ref5","_ref6","item","container","children","className","spacing","rowSpacing","_ref$small","small","medium","large","as","rest","_objectWithoutPropertiesLoose","_excluded","Element","classList","classnames","React","createElement","_extends","warnAboutMissingStyles"],"mappings":"srBA0DaA,EAAW,SAYYC,GAAA,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAXlCC,IAAAA,KACAC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,UACAC,IAAAA,QACAC,IAAAA,WAAUC,EAAAZ,EACVa,MAAAA,aAAQ,EAACD,EACTE,IAAAA,OACAC,IAAAA,MACAC,IAAAA,GACGC,EAAIC,EAAAlB,EAAAmB,GAEDC,EAA6BJ,GAlBd,OAmBfK,EAAYC,EAAAA,QAAW,CAC3B,WACAb,EACA,CAAE,iBAAkBH,GACpB,CAAE,sBAAuBC,IACDG,EAAAA,GAAAA,EAAAA,qBAAAA,GAAYA,GAAWH,EACnBI,IAAAA,EAAAA,GAAAA,EAAAA,yBAAAA,GAAeD,IAAYC,gCACjCE,GAAUA,GAASP,EAAIH,IAAAC,EAAA,GAAAA,EAAA,oBACtBU,GAAWA,GAAUR,EACtBS,IAAAA,EAAAA,GAAAA,EAAAA,mBAAAA,GAAUA,GAAST,OAE3C,OACEiB,UAAAC,cAACJ,EAAOK,EAAA,CAAChB,UAAWY,GAAeJ,GAChCT,oHClFPkB,EAAsBA,uBAAC,8BCuCM,SASY1B,GAAA,IANvCQ,IAAAA,SACAC,IAAAA,UACAC,IAAAA,QACAC,IAAAA,WACAK,IAAAA,GACGC,EAAIC,EAAAlB,EAAAmB,GAGP,OACEI,UAACC,cAAAzB,EAAQ0B,EAAA,CACPlB,WACA,EAAAS,GAJ+BA,GAZd,MAiBjBP,UAAWA,EACXC,QAASA,EACTC,WAAYA,GACRM,GAEHT,qBCnCiB,SAQYR,GAAA,IAPlCQ,IAAAA,SACAC,IAAAA,UACAI,IAAAA,MACAC,IAAAA,OACAC,IAAAA,MACAC,IAAAA,GACGC,EAAIC,EAAAlB,EAAAmB,GAGP,OACEI,UAAAC,cAACzB,EAAQ0B,EAAA,CACPT,GAH+BA,GAXd,MAejBV,MAAI,EACJG,UAAWA,EACXI,MAAOA,EACPC,OAAQA,EACRC,MAAOA,GACHE,GAEHT"}
|
package/dist/grid.esm.js
CHANGED
|
@@ -3,35 +3,29 @@ import React from 'react';
|
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
|
|
5
5
|
function _extends() {
|
|
6
|
-
_extends = Object.assign
|
|
6
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
7
7
|
for (var i = 1; i < arguments.length; i++) {
|
|
8
8
|
var source = arguments[i];
|
|
9
|
-
|
|
10
9
|
for (var key in source) {
|
|
11
10
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12
11
|
target[key] = source[key];
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
|
-
|
|
17
15
|
return target;
|
|
18
16
|
};
|
|
19
|
-
|
|
20
17
|
return _extends.apply(this, arguments);
|
|
21
18
|
}
|
|
22
|
-
|
|
23
19
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
24
20
|
if (source == null) return {};
|
|
25
21
|
var target = {};
|
|
26
22
|
var sourceKeys = Object.keys(source);
|
|
27
23
|
var key, i;
|
|
28
|
-
|
|
29
24
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
30
25
|
key = sourceKeys[i];
|
|
31
26
|
if (excluded.indexOf(key) >= 0) continue;
|
|
32
27
|
target[key] = source[key];
|
|
33
28
|
}
|
|
34
|
-
|
|
35
29
|
return target;
|
|
36
30
|
}
|
|
37
31
|
|
|
@@ -39,20 +33,18 @@ var _excluded$2 = ["item", "container", "children", "className", "spacing", "row
|
|
|
39
33
|
var defaultElement$2 = 'code';
|
|
40
34
|
var BaseGrid = function BaseGrid(_ref) {
|
|
41
35
|
var _ref2, _ref3, _ref4, _ref5, _ref6;
|
|
42
|
-
|
|
43
36
|
var item = _ref.item,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
37
|
+
container = _ref.container,
|
|
38
|
+
children = _ref.children,
|
|
39
|
+
className = _ref.className,
|
|
40
|
+
spacing = _ref.spacing,
|
|
41
|
+
rowSpacing = _ref.rowSpacing,
|
|
42
|
+
_ref$small = _ref.small,
|
|
43
|
+
small = _ref$small === void 0 ? 1 : _ref$small,
|
|
44
|
+
medium = _ref.medium,
|
|
45
|
+
large = _ref.large,
|
|
46
|
+
as = _ref.as,
|
|
47
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
56
48
|
var Element = as || defaultElement$2;
|
|
57
49
|
var classList = classnames(['eds-grid', className, {
|
|
58
50
|
'eds-grid__item': item
|
|
@@ -68,13 +60,12 @@ var _excluded$1 = ["children", "className", "small", "medium", "large", "as"];
|
|
|
68
60
|
var defaultElement$1 = 'div';
|
|
69
61
|
var GridItem = function GridItem(_ref) {
|
|
70
62
|
var children = _ref.children,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
63
|
+
className = _ref.className,
|
|
64
|
+
small = _ref.small,
|
|
65
|
+
medium = _ref.medium,
|
|
66
|
+
large = _ref.large,
|
|
67
|
+
as = _ref.as,
|
|
68
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
78
69
|
var Element = as || defaultElement$1;
|
|
79
70
|
return React.createElement(BaseGrid, _extends({
|
|
80
71
|
as: Element,
|
|
@@ -90,12 +81,11 @@ var _excluded = ["children", "className", "spacing", "rowSpacing", "as"];
|
|
|
90
81
|
var defaultElement = 'div';
|
|
91
82
|
var GridContainer = function GridContainer(_ref) {
|
|
92
83
|
var children = _ref.children,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
84
|
+
className = _ref.className,
|
|
85
|
+
spacing = _ref.spacing,
|
|
86
|
+
rowSpacing = _ref.rowSpacing,
|
|
87
|
+
as = _ref.as,
|
|
88
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
99
89
|
var Element = as || defaultElement;
|
|
100
90
|
return React.createElement(BaseGrid, _extends({
|
|
101
91
|
container: true,
|
package/dist/grid.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.esm.js","sources":["../src/BaseGrid.tsx","../src/GridItem.tsx","../src/GridContainer.tsx","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\ntype BaseGridOwnProps = {\n /** Om det er en GridContainer\n * @default false\n */\n container?: boolean;\n /** Om det er et GridItem\n * @default false\n */\n item?: boolean;\n /** Mellomromet mellom hver GridItem, basert på spacing-tokens\n * @default none\n */\n spacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Vertikalt mellomrom for hver GridItem\n * @default Verdien til spacing\n */\n rowSpacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Antall kolonner en Item bruker på små flater (og oppover)\n * @default 1\n */\n small?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på medium flater (og oppover) */\n medium?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på store flater. */\n large?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** HTML-elementet eller React-komponenten som lager Grid-elementet\n * @default \"div\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet til Grid containeren/item */\n children?: React.ReactNode;\n};\nconst defaultElement = 'code';\n\nexport type BaseGridProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, BaseGridOwnProps>;\n\nexport const BaseGrid = <E extends React.ElementType = typeof defaultElement>({\n item,\n container,\n children,\n className,\n spacing,\n rowSpacing,\n small = 1,\n medium,\n large,\n as,\n ...rest\n}: BaseGridProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classnames([\n 'eds-grid',\n className,\n { 'eds-grid__item': item },\n { 'eds-grid__container': container },\n { [`eds-grid--spacing-${spacing}`]: spacing && container },\n { [`eds-grid--spacing-row-${rowSpacing}`]: spacing !== rowSpacing },\n { [`eds-grid--small-${small}`]: small && item },\n { [`eds-grid--medium-${medium}`]: medium && item },\n { [`eds-grid--large-${large}`]: large && item },\n ]);\n return (\n <Element className={classList} {...rest}>\n {children}\n </Element>\n );\n};\n","import React from 'react';\nimport { BaseGrid } from './BaseGrid';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\nexport type GridItemOwnProps = {\n /** Antall kolonner en Item bruker på små flater (og oppover)\n * @default 1\n */\n small?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på medium flater (og oppover) */\n medium?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på store flater. */\n large?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** HTML-elementet eller React-komponenten som lager Grid-elementet*/\n as?: 'div' | React.ElementType;\n /** Innholdet til Grid containeren/item */\n children?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type GridItemProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, GridItemOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const GridItem = <E extends React.ElementType = typeof defaultElement>({\n children,\n className,\n small,\n medium,\n large,\n as,\n ...rest\n}: GridItemProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseGrid\n as={Element}\n item\n className={className}\n small={small}\n medium={medium}\n large={large}\n {...rest}\n >\n {children}\n </BaseGrid>\n );\n};\n","import React from 'react';\nimport { BaseGrid } from './BaseGrid';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\nexport type GridContainerOwnProps = {\n /** Mellomromet mellom hver GridItem, basert på spacing-tokens\n * @default none\n */\n spacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Mellomrom mellom hver rad\n * @default Verdien til spacing\n */\n rowSpacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** HTML-elementet eller React-komponenten som lager Grid-elementet*/\n as?: 'div' | React.ElementType;\n /** Innholdet til Grid-containeren */\n children?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type GridContainerProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, GridContainerOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const GridContainer = <\n E extends React.ElementType = typeof defaultElement,\n>({\n children,\n className,\n spacing,\n rowSpacing,\n as,\n ...rest\n}: GridContainerProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseGrid\n container\n as={Element}\n className={className}\n spacing={spacing}\n rowSpacing={rowSpacing}\n {...rest}\n >\n {children}\n </BaseGrid>\n );\n};\n","import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('grid');\n\nexport * from './GridItem';\nexport * from './GridContainer';\n"],"names":["defaultElement","BaseGrid","item","container","children","className","spacing","rowSpacing","small","medium","large","as","rest","Element","classList","classnames","React","GridItem","GridContainer","warnAboutMissingStyles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"grid.esm.js","sources":["../src/BaseGrid.tsx","../src/GridItem.tsx","../src/GridContainer.tsx","../src/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\ntype BaseGridOwnProps = {\n /** Om det er en GridContainer\n * @default false\n */\n container?: boolean;\n /** Om det er et GridItem\n * @default false\n */\n item?: boolean;\n /** Mellomromet mellom hver GridItem, basert på spacing-tokens\n * @default none\n */\n spacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Vertikalt mellomrom for hver GridItem\n * @default Verdien til spacing\n */\n rowSpacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Antall kolonner en Item bruker på små flater (og oppover)\n * @default 1\n */\n small?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på medium flater (og oppover) */\n medium?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på store flater. */\n large?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** HTML-elementet eller React-komponenten som lager Grid-elementet\n * @default \"div\"\n */\n as?: string | React.ElementType;\n /** Ekstra klassenavn */\n className?: string;\n /** Innholdet til Grid containeren/item */\n children?: React.ReactNode;\n};\nconst defaultElement = 'code';\n\nexport type BaseGridProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, BaseGridOwnProps>;\n\nexport const BaseGrid = <E extends React.ElementType = typeof defaultElement>({\n item,\n container,\n children,\n className,\n spacing,\n rowSpacing,\n small = 1,\n medium,\n large,\n as,\n ...rest\n}: BaseGridProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n const classList = classnames([\n 'eds-grid',\n className,\n { 'eds-grid__item': item },\n { 'eds-grid__container': container },\n { [`eds-grid--spacing-${spacing}`]: spacing && container },\n { [`eds-grid--spacing-row-${rowSpacing}`]: spacing !== rowSpacing },\n { [`eds-grid--small-${small}`]: small && item },\n { [`eds-grid--medium-${medium}`]: medium && item },\n { [`eds-grid--large-${large}`]: large && item },\n ]);\n return (\n <Element className={classList} {...rest}>\n {children}\n </Element>\n );\n};\n","import React from 'react';\nimport { BaseGrid } from './BaseGrid';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\nexport type GridItemOwnProps = {\n /** Antall kolonner en Item bruker på små flater (og oppover)\n * @default 1\n */\n small?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på medium flater (og oppover) */\n medium?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** Antall kolonner en Item bruker på store flater. */\n large?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n /** HTML-elementet eller React-komponenten som lager Grid-elementet*/\n as?: 'div' | React.ElementType;\n /** Innholdet til Grid containeren/item */\n children?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type GridItemProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, GridItemOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const GridItem = <E extends React.ElementType = typeof defaultElement>({\n children,\n className,\n small,\n medium,\n large,\n as,\n ...rest\n}: GridItemProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseGrid\n as={Element}\n item\n className={className}\n small={small}\n medium={medium}\n large={large}\n {...rest}\n >\n {children}\n </BaseGrid>\n );\n};\n","import React from 'react';\nimport { BaseGrid } from './BaseGrid';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport './Grid.scss';\n\nexport type GridContainerOwnProps = {\n /** Mellomromet mellom hver GridItem, basert på spacing-tokens\n * @default none\n */\n spacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** Mellomrom mellom hver rad\n * @default Verdien til spacing\n */\n rowSpacing?:\n | 'none'\n | 'extraSmall2'\n | 'extraSmall'\n | 'small'\n | 'medium'\n | 'large'\n | 'extraLarge';\n /** HTML-elementet eller React-komponenten som lager Grid-elementet*/\n as?: 'div' | React.ElementType;\n /** Innholdet til Grid-containeren */\n children?: React.ReactNode;\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type GridContainerProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, GridContainerOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const GridContainer = <\n E extends React.ElementType = typeof defaultElement,\n>({\n children,\n className,\n spacing,\n rowSpacing,\n as,\n ...rest\n}: GridContainerProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n return (\n <BaseGrid\n container\n as={Element}\n className={className}\n spacing={spacing}\n rowSpacing={rowSpacing}\n {...rest}\n >\n {children}\n </BaseGrid>\n );\n};\n","import { warnAboutMissingStyles } from '@entur/utils';\nimport './index.scss';\n\nwarnAboutMissingStyles('grid');\n\nexport * from './GridItem';\nexport * from './GridContainer';\n"],"names":["defaultElement","BaseGrid","item","container","children","className","spacing","rowSpacing","small","medium","large","as","rest","_excluded","Element","classList","classnames","React","createElement","GridItem","GridContainer","warnAboutMissingStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,IAAMA,gBAAc,GAAG,MAAM,CAAA;AAKtB,IAAMC,QAAQ,GAAG,SAAXA,QAAQ,CAYe,IAAA,EAAA;AAAA,EAAA,IAAA,KAAA,EAAA,KAAA,EAAA,KAAA,EAAA,KAAA,EAAA,KAAA,CAAA;EAAA,IAXlCC,IAAI,QAAJA,IAAI;AACJC,IAAAA,SAAS,QAATA,SAAS;AACTC,IAAAA,QAAQ,Q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,CAAA;AACPE,IAAAA,SAAS,EACT,IAAA;AAAAQ,IAAAA,EAAE,EAAEG,OAAO;AACXT,IAAAA,SAAS,EAAEA,SAAS;AACpBC,IAAAA,OAAO,EAAEA,OAAO;AAChBC,IAAAA,UAAU,EAAEA,UAAAA;GACRK,EAAAA,IAAI,CAEPR,EAAAA,QAAQ,CACA,CAAA;AAEf;;AC9DAiB,sBAAsB,CAAC,MAAM,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entur/grid",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.21",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/grid.esm.js",
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
"start": "dts watch --noClean",
|
|
21
21
|
"build": "dts build",
|
|
22
22
|
"test": "dts test",
|
|
23
|
-
"lint": "dts lint"
|
|
23
|
+
"lint": "dts lint src"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@entur/tokens": "^3.
|
|
27
|
-
"@entur/utils": "^0.5.
|
|
26
|
+
"@entur/tokens": "^3.5.0",
|
|
27
|
+
"@entur/utils": "^0.5.2",
|
|
28
28
|
"classnames": "^2.3.1"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": ">=16.8.0",
|
|
32
32
|
"react-dom": ">=16.8.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "30b38034aaafba9fb308fb3d8c8bfaab9608d720"
|
|
35
35
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [0.3.18](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.17...@entur/grid@0.3.18) (2023-01-19)
|
|
7
|
-
|
|
8
|
-
### Performance Improvements
|
|
9
|
-
|
|
10
|
-
- **packages:** remove all referenves to react-polymorphic-types npm-package ([e47a304](https://bitbucket.org/enturas/design-system/commits/e47a304d87eb77adae5dd002e89f03026c7eadce))
|
|
11
|
-
|
|
12
|
-
## [0.3.17](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.14...@entur/grid@0.3.17) (2022-12-09)
|
|
13
|
-
|
|
14
|
-
**Note:** Version bump only for package @entur/grid
|
|
15
|
-
|
|
16
|
-
## [0.3.16](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.15...@entur/grid@0.3.16) (2022-11-24)
|
|
17
|
-
|
|
18
|
-
**Note:** Version bump only for package @entur/grid
|
|
19
|
-
|
|
20
|
-
## [0.3.15](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.14...@entur/grid@0.3.15) (2022-10-31)
|
|
21
|
-
|
|
22
|
-
**Note:** Version bump only for package @entur/grid
|
|
23
|
-
|
|
24
|
-
## [0.3.14](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.13...@entur/grid@0.3.14) (2022-08-31)
|
|
25
|
-
|
|
26
|
-
**Note:** Version bump only for package @entur/grid
|
|
27
|
-
|
|
28
|
-
## [0.3.13](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.12...@entur/grid@0.3.13) (2022-08-24)
|
|
29
|
-
|
|
30
|
-
**Note:** Version bump only for package @entur/grid
|
|
31
|
-
|
|
32
|
-
## [0.3.12](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.11...@entur/grid@0.3.12) (2022-08-09)
|
|
33
|
-
|
|
34
|
-
**Note:** Version bump only for package @entur/grid
|
|
35
|
-
|
|
36
|
-
## [0.3.11](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.10...@entur/grid@0.3.11) (2022-04-27)
|
|
37
|
-
|
|
38
|
-
**Note:** Version bump only for package @entur/grid
|
|
39
|
-
|
|
40
|
-
## [0.3.10](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.9...@entur/grid@0.3.10) (2022-02-09)
|
|
41
|
-
|
|
42
|
-
**Note:** Version bump only for package @entur/grid
|
|
43
|
-
|
|
44
|
-
## [0.3.9](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.8...@entur/grid@0.3.9) (2021-11-17)
|
|
45
|
-
|
|
46
|
-
**Note:** Version bump only for package @entur/grid
|
|
47
|
-
|
|
48
|
-
## [0.3.8](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.7...@entur/grid@0.3.8) (2021-09-23)
|
|
49
|
-
|
|
50
|
-
**Note:** Version bump only for package @entur/grid
|
|
51
|
-
|
|
52
|
-
## [0.3.7](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.6...@entur/grid@0.3.7) (2021-09-07)
|
|
53
|
-
|
|
54
|
-
### Bug Fixes
|
|
55
|
-
|
|
56
|
-
- fix lint warnings ([6007bac](https://bitbucket.org/enturas/design-system/commits/6007bac502253a1a81f803f511d7e87097822528))
|
|
57
|
-
|
|
58
|
-
## [0.3.6](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.5...@entur/grid@0.3.6) (2021-06-25)
|
|
59
|
-
|
|
60
|
-
### Bug Fixes
|
|
61
|
-
|
|
62
|
-
- update dependencies ([a49ee42](https://bitbucket.org/enturas/design-system/commits/a49ee4289a6ad56a9b799e1c766ea461667ddced))
|
|
63
|
-
|
|
64
|
-
## [0.3.5](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.4...@entur/grid@0.3.5) (2021-05-05)
|
|
65
|
-
|
|
66
|
-
### Bug Fixes
|
|
67
|
-
|
|
68
|
-
- **griditem:** fix large prop not following grid ([fc09ab9](https://bitbucket.org/enturas/design-system/commits/fc09ab9555f7496601bd084cbcd39117dc51d717))
|
|
69
|
-
|
|
70
|
-
## [0.3.4](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.3...@entur/grid@0.3.4) (2021-04-23)
|
|
71
|
-
|
|
72
|
-
**Note:** Version bump only for package @entur/grid
|
|
73
|
-
|
|
74
|
-
## [0.3.3](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.2...@entur/grid@0.3.3) (2021-02-17)
|
|
75
|
-
|
|
76
|
-
### Bug Fixes
|
|
77
|
-
|
|
78
|
-
- **polymorphism:** update polymorphism dependency ([dc4c31d](https://bitbucket.org/enturas/design-system/commits/dc4c31d8e891a46c1f0c1fbd0a6a026c1638accc))
|
|
79
|
-
- update grid components to new polymorphism dependency ([011b8a5](https://bitbucket.org/enturas/design-system/commits/011b8a5be61f27f8d4f6bcee65fcd42352d7a68e))
|
|
80
|
-
|
|
81
|
-
## [0.3.2](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.1...@entur/grid@0.3.2) (2021-01-20)
|
|
82
|
-
|
|
83
|
-
**Note:** Version bump only for package @entur/grid
|
|
84
|
-
|
|
85
|
-
## [0.3.1](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.3.0...@entur/grid@0.3.1) (2021-01-13)
|
|
86
|
-
|
|
87
|
-
**Note:** Version bump only for package @entur/grid
|
|
88
|
-
|
|
89
|
-
# [0.3.0](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.2.11...@entur/grid@0.3.0) (2020-12-04)
|
|
90
|
-
|
|
91
|
-
### Features
|
|
92
|
-
|
|
93
|
-
- **grid:** add support for polymorphic component typings ([627406f](https://bitbucket.org/enturas/design-system/commits/627406f1390338c82cd5bdfa9cfd15f023f51221))
|
|
94
|
-
|
|
95
|
-
## [0.2.11](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.2.10...@entur/grid@0.2.11) (2020-10-09)
|
|
96
|
-
|
|
97
|
-
**Note:** Version bump only for package @entur/grid
|
|
98
|
-
|
|
99
|
-
## [0.2.10](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.2.9...@entur/grid@0.2.10) (2020-09-02)
|
|
100
|
-
|
|
101
|
-
**Note:** Version bump only for package @entur/grid
|
|
102
|
-
|
|
103
|
-
## [0.2.9](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.2.8...@entur/grid@0.2.9) (2020-08-11)
|
|
104
|
-
|
|
105
|
-
**Note:** Version bump only for package @entur/grid
|
|
106
|
-
|
|
107
|
-
## [0.2.8](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.2.7...@entur/grid@0.2.8) (2020-07-03)
|
|
108
|
-
|
|
109
|
-
**Note:** Version bump only for package @entur/grid
|
|
110
|
-
|
|
111
|
-
## [0.2.7](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.2.6...@entur/grid@0.2.7) (2020-06-17)
|
|
112
|
-
|
|
113
|
-
**Note:** Version bump only for package @entur/grid
|
|
114
|
-
|
|
115
|
-
## [0.2.6](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.2.5...@entur/grid@0.2.6) (2020-05-27)
|
|
116
|
-
|
|
117
|
-
**Note:** Version bump only for package @entur/grid
|
|
118
|
-
|
|
119
|
-
## [0.2.5](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.2.4...@entur/grid@0.2.5) (2020-05-26)
|
|
120
|
-
|
|
121
|
-
**Note:** Version bump only for package @entur/grid
|
|
122
|
-
|
|
123
|
-
## [0.2.4](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.2.3...@entur/grid@0.2.4) (2020-05-20)
|
|
124
|
-
|
|
125
|
-
**Note:** Version bump only for package @entur/grid
|
|
126
|
-
|
|
127
|
-
## [0.2.3](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.2.2...@entur/grid@0.2.3) (2020-04-27)
|
|
128
|
-
|
|
129
|
-
**Note:** Version bump only for package @entur/grid
|
|
130
|
-
|
|
131
|
-
## [0.2.2](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.2.1...@entur/grid@0.2.2) (2020-04-23)
|
|
132
|
-
|
|
133
|
-
**Note:** Version bump only for package @entur/grid
|
|
134
|
-
|
|
135
|
-
## [0.2.1](https://bitbucket.org/enturas/design-system/compare/@entur/grid@0.2.0...@entur/grid@0.2.1) (2020-03-20)
|
|
136
|
-
|
|
137
|
-
**Note:** Version bump only for package @entur/grid
|
|
138
|
-
|
|
139
|
-
# 0.2.0 (2020-03-18)
|
|
140
|
-
|
|
141
|
-
### Features
|
|
142
|
-
|
|
143
|
-
- add gridcontainer and griditem components ([3bee945](https://bitbucket.org/enturas/design-system/commits/3bee945397b57fe26f8e1d9a629aa5a404eca3e1))
|
|
144
|
-
- adding the grid component ([74d89d4](https://bitbucket.org/enturas/design-system/commits/74d89d4bb9ef515ca741855dc7737d60d221f29b))
|