@dnb/eufemia 9.44.0 → 9.45.0
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/CHANGELOG.md +12 -0
- package/cjs/components/avatar/Avatar.d.ts +1 -1
- package/cjs/components/lib.d.ts +7 -7
- package/cjs/components/section/style/themes/dnb-section-theme-ui.css +2 -7
- package/cjs/components/section/style/themes/dnb-section-theme-ui.min.css +1 -1
- package/cjs/components/space/SpacingHelper.d.ts +1 -2
- package/cjs/components/space/SpacingHelper.js +0 -6
- package/cjs/components/space/SpacingUtils.d.ts +30 -19
- package/cjs/components/space/SpacingUtils.js +151 -132
- package/cjs/components/space/types.d.ts +13 -6
- package/cjs/components/tag/Tag.d.ts +1 -1
- package/cjs/elements/Anchor.d.ts +1 -1
- package/cjs/elements/Dd.d.ts +1 -1
- package/cjs/elements/Dt.d.ts +1 -1
- package/cjs/elements/Element.d.ts +1 -1
- package/cjs/elements/Link.d.ts +1 -1
- package/cjs/elements/lib.d.ts +5 -5
- package/cjs/fragments/lib.d.ts +1 -1
- package/cjs/fragments/scroll-view/ScrollView.d.ts +1 -1
- package/cjs/shared/Eufemia.js +1 -1
- package/cjs/shared/index.d.ts +1 -1
- package/cjs/shared/index.js +1 -1
- package/cjs/style/dnb-ui-elements.css +12 -39
- package/cjs/style/dnb-ui-elements.min.css +1 -1
- package/cjs/style/dnb-ui-tags.css +21 -59
- package/cjs/style/dnb-ui-tags.min.css +1 -1
- package/cjs/style/elements/_anchor-mixins.scss +9 -14
- package/cjs/style/elements/anchor.scss +1 -1
- package/cjs/style/themes/theme-eiendom/dnb-theme-eiendom.css +14 -46
- package/cjs/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +2 -2
- package/cjs/style/themes/theme-ui/dnb-theme-ui.css +14 -46
- package/cjs/style/themes/theme-ui/dnb-theme-ui.min.css +2 -2
- package/components/avatar/Avatar.d.ts +1 -1
- package/components/lib.d.ts +7 -7
- package/components/section/style/themes/dnb-section-theme-ui.css +2 -7
- package/components/section/style/themes/dnb-section-theme-ui.min.css +1 -1
- package/components/space/SpacingHelper.d.ts +1 -2
- package/components/space/SpacingHelper.js +2 -2
- package/components/space/SpacingUtils.d.ts +30 -19
- package/components/space/SpacingUtils.js +121 -109
- package/components/space/types.d.ts +13 -6
- package/components/tag/Tag.d.ts +1 -1
- package/elements/Anchor.d.ts +1 -1
- package/elements/Dd.d.ts +1 -1
- package/elements/Dt.d.ts +1 -1
- package/elements/Element.d.ts +1 -1
- package/elements/Link.d.ts +1 -1
- package/elements/lib.d.ts +5 -5
- package/es/components/avatar/Avatar.d.ts +1 -1
- package/es/components/lib.d.ts +7 -7
- package/es/components/section/style/themes/dnb-section-theme-ui.css +2 -7
- package/es/components/section/style/themes/dnb-section-theme-ui.min.css +1 -1
- package/es/components/space/SpacingHelper.d.ts +1 -2
- package/es/components/space/SpacingHelper.js +2 -2
- package/es/components/space/SpacingUtils.d.ts +30 -19
- package/es/components/space/SpacingUtils.js +81 -76
- package/es/components/space/types.d.ts +13 -6
- package/es/components/tag/Tag.d.ts +1 -1
- package/es/elements/Anchor.d.ts +1 -1
- package/es/elements/Dd.d.ts +1 -1
- package/es/elements/Dt.d.ts +1 -1
- package/es/elements/Element.d.ts +1 -1
- package/es/elements/Link.d.ts +1 -1
- package/es/elements/lib.d.ts +5 -5
- package/es/fragments/lib.d.ts +1 -1
- package/es/fragments/scroll-view/ScrollView.d.ts +1 -1
- package/es/shared/Eufemia.js +1 -1
- package/es/shared/index.d.ts +1 -1
- package/es/shared/index.js +2 -2
- package/es/style/dnb-ui-elements.css +12 -39
- package/es/style/dnb-ui-elements.min.css +1 -1
- package/es/style/dnb-ui-tags.css +21 -59
- package/es/style/dnb-ui-tags.min.css +1 -1
- package/es/style/elements/_anchor-mixins.scss +9 -14
- package/es/style/elements/anchor.scss +1 -1
- package/es/style/themes/theme-eiendom/dnb-theme-eiendom.css +14 -46
- package/es/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +2 -2
- package/es/style/themes/theme-ui/dnb-theme-ui.css +14 -46
- package/es/style/themes/theme-ui/dnb-theme-ui.min.css +2 -2
- package/esm/dnb-ui-basis.min.mjs +1 -1
- package/esm/dnb-ui-components.min.mjs +1 -1
- package/esm/dnb-ui-elements.min.mjs +2 -2
- package/esm/dnb-ui-extensions.min.mjs +1 -1
- package/esm/dnb-ui-lib.min.mjs +2 -2
- package/esm/dnb-ui-web-components.min.mjs +2 -2
- package/fragments/lib.d.ts +1 -1
- package/fragments/scroll-view/ScrollView.d.ts +1 -1
- package/package.json +1 -1
- package/shared/Eufemia.js +1 -1
- package/shared/index.d.ts +1 -1
- package/shared/index.js +2 -2
- package/style/dnb-ui-elements.css +12 -39
- package/style/dnb-ui-elements.min.css +1 -1
- package/style/dnb-ui-tags.css +21 -59
- package/style/dnb-ui-tags.min.css +1 -1
- package/style/elements/_anchor-mixins.scss +9 -14
- package/style/elements/anchor.scss +1 -1
- package/style/themes/theme-eiendom/dnb-theme-eiendom.css +14 -46
- package/style/themes/theme-eiendom/dnb-theme-eiendom.min.css +2 -2
- package/style/themes/theme-ui/dnb-theme-ui.css +14 -46
- package/style/themes/theme-ui/dnb-theme-ui.min.css +2 -2
- package/umd/dnb-ui-basis.min.js +1 -1
- package/umd/dnb-ui-components.min.js +1 -1
- package/umd/dnb-ui-elements.min.js +2 -2
- package/umd/dnb-ui-extensions.min.js +4 -4
- package/umd/dnb-ui-lib.min.js +2 -2
- package/umd/dnb-ui-web-components.min.js +2 -2
- package/cjs/shared/SpacingHelper.d.ts +0 -6
- package/cjs/shared/SpacingHelper.js +0 -11
- package/es/shared/SpacingHelper.d.ts +0 -6
- package/es/shared/SpacingHelper.js +0 -2
- package/shared/SpacingHelper.d.ts +0 -6
- package/shared/SpacingHelper.js +0 -2
package/components/lib.d.ts
CHANGED
|
@@ -3,16 +3,16 @@ export function getComponents(): {
|
|
|
3
3
|
Autocomplete: typeof Autocomplete;
|
|
4
4
|
Avatar: {
|
|
5
5
|
(localProps: import("./avatar/Avatar").AvatarProps & import("./space/types").SpacingElementProps & {
|
|
6
|
-
space?: import("./space/types").
|
|
6
|
+
space?: import("./space/types").SpaceType | import("./space/types").SpacingElementProps;
|
|
7
7
|
}): JSX.Element;
|
|
8
8
|
Group: (localProps: import("./avatar/AvatarGroup").AvatarGroupProps & import("./space/types").SpacingElementProps & {
|
|
9
|
-
space?: import("./space/types").
|
|
9
|
+
space?: import("./space/types").SpaceType | import("./space/types").SpacingElementProps;
|
|
10
10
|
}) => JSX.Element;
|
|
11
11
|
};
|
|
12
12
|
Badge: typeof Badge;
|
|
13
13
|
Breadcrumb: {
|
|
14
14
|
(localProps: import("./breadcrumb/Breadcrumb").BreadcrumbProps & import("./space/types").SpacingElementProps & {
|
|
15
|
-
space?: import("./space/types").
|
|
15
|
+
space?: import("./space/types").SpaceType | import("./space/types").SpacingElementProps;
|
|
16
16
|
}): JSX.Element;
|
|
17
17
|
Item: (localProps: import("./breadcrumb/BreadcrumbItem").BreadcrumbItemProps) => JSX.Element;
|
|
18
18
|
};
|
|
@@ -34,7 +34,7 @@ export function getComponents(): {
|
|
|
34
34
|
Icon: typeof Icon;
|
|
35
35
|
IconPrimary: typeof IconPrimary;
|
|
36
36
|
InfoCard: (localProps: import("./info-card/InfoCard").InfoCardProps & import("./space/types").SpacingElementProps & {
|
|
37
|
-
space?: import("./space/types").
|
|
37
|
+
space?: import("./space/types").SpaceType | import("./space/types").SpacingElementProps;
|
|
38
38
|
}) => JSX.Element;
|
|
39
39
|
Input: typeof Input;
|
|
40
40
|
InputMasked: import("react").FC<import("./input-masked/InputMasked").InputMaskedProps>;
|
|
@@ -58,16 +58,16 @@ export function getComponents(): {
|
|
|
58
58
|
Tabs: typeof Tabs;
|
|
59
59
|
Tag: {
|
|
60
60
|
(localProps: import("./tag/Tag").TagProps & import("./space/types").SpacingElementProps & {
|
|
61
|
-
space?: import("./space/types").
|
|
61
|
+
space?: import("./space/types").SpaceType | import("./space/types").SpacingElementProps;
|
|
62
62
|
}): JSX.Element;
|
|
63
63
|
Group: (localProps: import("./tag/TagGroup").TagGroupProps & import("./space/types").SpacingElementProps & {
|
|
64
|
-
space?: import("./space/types").
|
|
64
|
+
space?: import("./space/types").SpaceType | import("./space/types").SpacingElementProps;
|
|
65
65
|
}) => JSX.Element;
|
|
66
66
|
};
|
|
67
67
|
Textarea: typeof Textarea;
|
|
68
68
|
Timeline: {
|
|
69
69
|
(localProps: import("./timeline/Timeline").TimelineProps & import("./space/types").SpacingElementProps & {
|
|
70
|
-
space?: import("./space/types").
|
|
70
|
+
space?: import("./space/types").SpaceType | import("./space/types").SpacingElementProps;
|
|
71
71
|
}): JSX.Element;
|
|
72
72
|
Item: (localProps: import("./timeline/TimelineItem").TimelineItemProps) => JSX.Element;
|
|
73
73
|
};
|
|
@@ -104,11 +104,7 @@
|
|
|
104
104
|
.dnb-section--emerald-green .dnb-anchor,
|
|
105
105
|
.dnb-section--sea-green .dnb-anchor {
|
|
106
106
|
color: #fff;
|
|
107
|
-
color: var(--color-white);
|
|
108
|
-
-webkit-box-shadow: 0 0.09375rem 0 0 #fff;
|
|
109
|
-
box-shadow: 0 0.09375rem 0 0 #fff;
|
|
110
|
-
-webkit-box-shadow: 0 0.09375rem 0 0 var(--color-white);
|
|
111
|
-
box-shadow: 0 0.09375rem 0 0 var(--color-white); }
|
|
107
|
+
color: var(--color-white); }
|
|
112
108
|
.dnb-section--fire-red .dnb-anchor:hover, .dnb-section--fire-red .dnb-anchor:active,
|
|
113
109
|
.dnb-section--emerald-green .dnb-anchor:hover,
|
|
114
110
|
.dnb-section--emerald-green .dnb-anchor:active,
|
|
@@ -118,8 +114,7 @@
|
|
|
118
114
|
color: var(--color-emerald-green);
|
|
119
115
|
background-color: #fff;
|
|
120
116
|
background-color: var(--color-white);
|
|
121
|
-
-
|
|
122
|
-
box-shadow: none; }
|
|
117
|
+
text-decoration: none; }
|
|
123
118
|
.dnb-section--fire-red .dnb-anchor:active,
|
|
124
119
|
.dnb-section--emerald-green .dnb-anchor:active,
|
|
125
120
|
.dnb-section--sea-green .dnb-anchor:active {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.dnb-section--divider{color:#333;color:var(--color-black-80)}.dnb-section--divider:after{-webkit-box-shadow:99vw 0 0 0 currentColor,198vw 0 0 0 currentColor,297vw 0 0 0 currentColor,396vw 0 0 0 currentColor,0 .0625rem 0 0 #d2f0e9,99vw .0625rem 0 0 #d2f0e9,0 -.0625rem 0 0 #d2f0e9,99vw -.0625rem 0 0 #d2f0e9,198vw .0625rem 0 0 #d2f0e9,198vw -.0625rem 0 0 #d2f0e9;box-shadow:99vw 0 0 0 currentColor,198vw 0 0 0 currentColor,297vw 0 0 0 currentColor,396vw 0 0 0 currentColor,0 .0625rem 0 0 #d2f0e9,99vw .0625rem 0 0 #d2f0e9,0 -.0625rem 0 0 #d2f0e9,99vw -.0625rem 0 0 #d2f0e9,198vw .0625rem 0 0 #d2f0e9,198vw -.0625rem 0 0 #d2f0e9;-webkit-box-shadow:99vw 0 0 0 currentColor,198vw 0 0 0 currentColor,297vw 0 0 0 currentColor,396vw 0 0 0 currentColor,0 .0625rem 0 0 var(--color-mint-green-50),99vw .0625rem 0 0 var(--color-mint-green-50),0 -.0625rem 0 0 var(--color-mint-green-50),99vw -.0625rem 0 0 var(--color-mint-green-50),198vw .0625rem 0 0 var(--color-mint-green-50),198vw -.0625rem 0 0 var(--color-mint-green-50);box-shadow:99vw 0 0 0 currentColor,198vw 0 0 0 currentColor,297vw 0 0 0 currentColor,396vw 0 0 0 currentColor,0 .0625rem 0 0 var(--color-mint-green-50),99vw .0625rem 0 0 var(--color-mint-green-50),0 -.0625rem 0 0 var(--color-mint-green-50),99vw -.0625rem 0 0 var(--color-mint-green-50),198vw .0625rem 0 0 var(--color-mint-green-50),198vw -.0625rem 0 0 var(--color-mint-green-50);color:#fff;color:var(--color-white)}.dnb-section--transparent:after{color:transparent}.dnb-section--mint-green-12{color:#333;color:var(--color-black-80)}.dnb-section--mint-green-12:after{color:#f4fbf9;color:var(--color-mint-green-12)}.dnb-section--white{color:#333;color:var(--color-black-80)}.dnb-section--white:after{color:#fff;color:var(--color-white)}.dnb-section--mint-green{color:#333;color:var(--color-black-80)}.dnb-section--mint-green:after{color:#a5e1d2;color:var(--color-mint-green)}.dnb-section--lavender{color:#333;color:var(--color-black-80)}.dnb-section--lavender:after{color:#f2f2f5;color:var(--color-lavender)}.dnb-section--sand-yellow{color:#333;color:var(--color-black-80)}.dnb-section--sand-yellow:after{color:#fbf6ec;color:var(--color-sand-yellow)}.dnb-section--pistachio{color:#333;color:var(--color-black-80)}.dnb-section--pistachio:after{color:#f2f4ec;color:var(--color-pistachio)}.dnb-section--black-3{color:#333;color:var(--color-black-80)}.dnb-section--black-3:after{color:#f8f8f8;color:var(--color-black-3)}.dnb-section--emerald-green{color:#a5e1d2;color:var(--color-mint-green)}.dnb-section--emerald-green:after{color:#14555a;color:var(--color-emerald-green)}.dnb-section--sea-green{color:#fff;color:var(--color-white)}.dnb-section--sea-green:after{color:#007272;color:var(--color-sea-green)}.dnb-section--fire-red{color:#fff;color:var(--color-white)}.dnb-section--fire-red:after{color:#dc2a2a;color:var(--color-fire-red)}.dnb-section--fire-red-8{color:#333;color:var(--color-black-80)}.dnb-section--fire-red-8:after{color:#fdeeee;color:var(--color-fire-red-8)}.dnb-section--emerald-green .dnb-anchor,.dnb-section--fire-red .dnb-anchor,.dnb-section--sea-green .dnb-anchor{
|
|
1
|
+
.dnb-section--divider{color:#333;color:var(--color-black-80)}.dnb-section--divider:after{-webkit-box-shadow:99vw 0 0 0 currentColor,198vw 0 0 0 currentColor,297vw 0 0 0 currentColor,396vw 0 0 0 currentColor,0 .0625rem 0 0 #d2f0e9,99vw .0625rem 0 0 #d2f0e9,0 -.0625rem 0 0 #d2f0e9,99vw -.0625rem 0 0 #d2f0e9,198vw .0625rem 0 0 #d2f0e9,198vw -.0625rem 0 0 #d2f0e9;box-shadow:99vw 0 0 0 currentColor,198vw 0 0 0 currentColor,297vw 0 0 0 currentColor,396vw 0 0 0 currentColor,0 .0625rem 0 0 #d2f0e9,99vw .0625rem 0 0 #d2f0e9,0 -.0625rem 0 0 #d2f0e9,99vw -.0625rem 0 0 #d2f0e9,198vw .0625rem 0 0 #d2f0e9,198vw -.0625rem 0 0 #d2f0e9;-webkit-box-shadow:99vw 0 0 0 currentColor,198vw 0 0 0 currentColor,297vw 0 0 0 currentColor,396vw 0 0 0 currentColor,0 .0625rem 0 0 var(--color-mint-green-50),99vw .0625rem 0 0 var(--color-mint-green-50),0 -.0625rem 0 0 var(--color-mint-green-50),99vw -.0625rem 0 0 var(--color-mint-green-50),198vw .0625rem 0 0 var(--color-mint-green-50),198vw -.0625rem 0 0 var(--color-mint-green-50);box-shadow:99vw 0 0 0 currentColor,198vw 0 0 0 currentColor,297vw 0 0 0 currentColor,396vw 0 0 0 currentColor,0 .0625rem 0 0 var(--color-mint-green-50),99vw .0625rem 0 0 var(--color-mint-green-50),0 -.0625rem 0 0 var(--color-mint-green-50),99vw -.0625rem 0 0 var(--color-mint-green-50),198vw .0625rem 0 0 var(--color-mint-green-50),198vw -.0625rem 0 0 var(--color-mint-green-50);color:#fff;color:var(--color-white)}.dnb-section--transparent:after{color:transparent}.dnb-section--mint-green-12{color:#333;color:var(--color-black-80)}.dnb-section--mint-green-12:after{color:#f4fbf9;color:var(--color-mint-green-12)}.dnb-section--white{color:#333;color:var(--color-black-80)}.dnb-section--white:after{color:#fff;color:var(--color-white)}.dnb-section--mint-green{color:#333;color:var(--color-black-80)}.dnb-section--mint-green:after{color:#a5e1d2;color:var(--color-mint-green)}.dnb-section--lavender{color:#333;color:var(--color-black-80)}.dnb-section--lavender:after{color:#f2f2f5;color:var(--color-lavender)}.dnb-section--sand-yellow{color:#333;color:var(--color-black-80)}.dnb-section--sand-yellow:after{color:#fbf6ec;color:var(--color-sand-yellow)}.dnb-section--pistachio{color:#333;color:var(--color-black-80)}.dnb-section--pistachio:after{color:#f2f4ec;color:var(--color-pistachio)}.dnb-section--black-3{color:#333;color:var(--color-black-80)}.dnb-section--black-3:after{color:#f8f8f8;color:var(--color-black-3)}.dnb-section--emerald-green{color:#a5e1d2;color:var(--color-mint-green)}.dnb-section--emerald-green:after{color:#14555a;color:var(--color-emerald-green)}.dnb-section--sea-green{color:#fff;color:var(--color-white)}.dnb-section--sea-green:after{color:#007272;color:var(--color-sea-green)}.dnb-section--fire-red{color:#fff;color:var(--color-white)}.dnb-section--fire-red:after{color:#dc2a2a;color:var(--color-fire-red)}.dnb-section--fire-red-8{color:#333;color:var(--color-black-80)}.dnb-section--fire-red-8:after{color:#fdeeee;color:var(--color-fire-red-8)}.dnb-section--emerald-green .dnb-anchor,.dnb-section--fire-red .dnb-anchor,.dnb-section--sea-green .dnb-anchor{color:#fff;color:var(--color-white)}.dnb-section--emerald-green .dnb-anchor:active,.dnb-section--emerald-green .dnb-anchor:hover,.dnb-section--fire-red .dnb-anchor:active,.dnb-section--fire-red .dnb-anchor:hover,.dnb-section--sea-green .dnb-anchor:active,.dnb-section--sea-green .dnb-anchor:hover{background-color:#fff;background-color:var(--color-white);color:#14555a;color:var(--color-emerald-green);text-decoration:none}.dnb-section--emerald-green .dnb-anchor:active,.dnb-section--fire-red .dnb-anchor:active,.dnb-section--sea-green .dnb-anchor:active{background-color:#fff;background-color:var(--color-white);color:#14555a;color:var(--color-emerald-green)}.dnb-section--emerald-green .dnb-anchor:not(:disabled):focus,.dnb-section--fire-red .dnb-anchor:not(:disabled):focus,.dnb-section--sea-green .dnb-anchor:not(:disabled):focus{background-color:transparent;color:#fff;color:var(--color-white);outline:none}html[data-whatinput=keyboard] .dnb-section--emerald-green .dnb-anchor:not(:disabled):focus,html[data-whatinput=keyboard] .dnb-section--fire-red .dnb-anchor:not(:disabled):focus,html[data-whatinput=keyboard] .dnb-section--sea-green .dnb-anchor:not(:disabled):focus{--border-color:var(--color-white);border-color:transparent;-webkit-box-shadow:0 0 0 .125rem var(--border-color);box-shadow:0 0 0 .125rem var(--border-color)}@media screen and (-ms-high-contrast:none){html[data-whatinput=keyboard] .dnb-section--emerald-green .dnb-anchor:not(:disabled):focus,html[data-whatinput=keyboard] .dnb-section--fire-red .dnb-anchor:not(:disabled):focus,html[data-whatinput=keyboard] .dnb-section--sea-green .dnb-anchor:not(:disabled):focus{-webkit-box-shadow:0 0 0 .125rem #fff;box-shadow:0 0 0 .125rem #fff;-webkit-box-shadow:0 0 0 .125rem var(--color-white);box-shadow:0 0 0 .125rem var(--color-white)}}.dnb-section--emerald-green .dnb-button--tertiary,.dnb-section--emerald-green .dnb-button--tertiary:hover,.dnb-section--fire-red .dnb-button--tertiary,.dnb-section--fire-red .dnb-button--tertiary:hover,.dnb-section--sea-green .dnb-button--tertiary,.dnb-section--sea-green .dnb-button--tertiary:hover{color:#fff;color:var(--color-white)}.dnb-section--emerald-green .dnb-button--tertiary:hover .dnb-button__text:after,.dnb-section--fire-red .dnb-button--tertiary:hover .dnb-button__text:after,.dnb-section--sea-green .dnb-button--tertiary:hover .dnb-button__text:after{color:#fff!important;color:var(--color-white)!important}.dnb-section--emerald-green .dnb-button--tertiary:focus,.dnb-section--fire-red .dnb-button--tertiary:focus,.dnb-section--sea-green .dnb-button--tertiary:focus{color:#fff;color:var(--color-white)}.dnb-section--emerald-green .dnb-button--tertiary:focus:before,.dnb-section--fire-red .dnb-button--tertiary:focus:before,.dnb-section--sea-green .dnb-button--tertiary:focus:before{outline:none}html[data-whatinput=keyboard] .dnb-section--emerald-green .dnb-button--tertiary:focus:before,html[data-whatinput=keyboard] .dnb-section--fire-red .dnb-button--tertiary:focus:before,html[data-whatinput=keyboard] .dnb-section--sea-green .dnb-button--tertiary:focus:before{--border-color:var(--color-white);border-color:transparent;-webkit-box-shadow:0 0 0 .125rem var(--border-color);box-shadow:0 0 0 .125rem var(--border-color)}@media screen and (-ms-high-contrast:none){html[data-whatinput=keyboard] .dnb-section--emerald-green .dnb-button--tertiary:focus:before,html[data-whatinput=keyboard] .dnb-section--fire-red .dnb-button--tertiary:focus:before,html[data-whatinput=keyboard] .dnb-section--sea-green .dnb-button--tertiary:focus:before{-webkit-box-shadow:0 0 0 .125rem #fff;box-shadow:0 0 0 .125rem #fff;-webkit-box-shadow:0 0 0 .125rem var(--color-white);box-shadow:0 0 0 .125rem var(--color-white)}}.dnb-section--signal-orange{color:#00343e;color:var(--color-ocean-green)}.dnb-section--signal-orange:after{color:#ff5400;color:var(--color-signal-orange)}.dnb-section--fire-red ::-moz-selection,.dnb-section--mint-green ::-moz-selection,.dnb-section--signal-orange ::-moz-selection{background-color:#fff;background-color:var(--color-white)}.dnb-section--fire-red ::selection,.dnb-section--mint-green ::selection,.dnb-section--signal-orange ::selection{background-color:#fff;background-color:var(--color-white)}
|
|
@@ -12,6 +12,5 @@ export namespace spacingPropTypes {
|
|
|
12
12
|
}
|
|
13
13
|
import { createSpacingClasses } from "./SpacingUtils";
|
|
14
14
|
import { removeSpaceProps } from "./SpacingUtils";
|
|
15
|
-
import { createStyleObject } from "./SpacingUtils";
|
|
16
15
|
import PropTypes from "prop-types";
|
|
17
|
-
export { createSpacingClasses, removeSpaceProps
|
|
16
|
+
export { createSpacingClasses, removeSpaceProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import { createSpacingClasses, removeSpaceProps
|
|
3
|
-
export { createSpacingClasses, removeSpaceProps
|
|
2
|
+
import { createSpacingClasses, removeSpaceProps } from './SpacingUtils';
|
|
3
|
+
export { createSpacingClasses, removeSpaceProps };
|
|
4
4
|
export var spacingPropTypes = {
|
|
5
5
|
space: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool, PropTypes.shape({
|
|
6
6
|
top: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
|
|
@@ -2,14 +2,8 @@
|
|
|
2
2
|
* Space helper
|
|
3
3
|
*
|
|
4
4
|
*/
|
|
5
|
-
import type { SpacingProps } from './types';
|
|
6
|
-
declare type
|
|
7
|
-
declare type StyleObjectProps = {
|
|
8
|
-
maxWidth?: string;
|
|
9
|
-
maxHeight?: string;
|
|
10
|
-
width?: string;
|
|
11
|
-
height?: string;
|
|
12
|
-
};
|
|
5
|
+
import type { StyleObjectProps, SpaceType, SpacingUnknownProps, SpacingProps } from './types';
|
|
6
|
+
declare type SpaceNumber = number;
|
|
13
7
|
export declare const spacingDefaultProps: {
|
|
14
8
|
space: any;
|
|
15
9
|
top: any;
|
|
@@ -27,17 +21,34 @@ export declare const spacePatterns: {
|
|
|
27
21
|
'xx-large': number;
|
|
28
22
|
'xx-large-x2': number;
|
|
29
23
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Helper function to generate a calc(var(--spacing-large) + var(--spacing-small))
|
|
26
|
+
*
|
|
27
|
+
* @param types 'small', '16px', '1rem'
|
|
28
|
+
* @returns e.g. calc(var(--spacing-large) + var(--spacing-small))
|
|
29
|
+
*/
|
|
30
|
+
export declare const calc: (...types: Array<SpaceType>) => string;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a valid space CSS class out from given space types
|
|
33
|
+
*
|
|
34
|
+
* @param props
|
|
35
|
+
* @param Element to check if it should be handled as inline
|
|
36
|
+
* @returns "dnb-space__large dnb-space__small"
|
|
37
|
+
*/
|
|
38
|
+
export declare const createSpacingClasses: (props: SpacingProps
|
|
39
|
+
/**
|
|
40
|
+
* To support typical not defined props form components
|
|
41
|
+
*/
|
|
42
|
+
| SpacingUnknownProps, Element?: any) => any[];
|
|
43
|
+
export declare const translateSpace: (type: SpaceType) => any;
|
|
44
|
+
export declare const splitTypes: (types: SpaceType | Array<SpaceType>) => SpaceType[];
|
|
45
|
+
export declare const sumTypes: (types: SpaceType | Array<SpaceType>) => any;
|
|
46
|
+
export declare const createTypeModifiers: (types: SpaceType) => Array<SpaceType>;
|
|
47
|
+
export declare const findType: (num: SpaceNumber) => SpaceType;
|
|
48
|
+
export declare const findTypeAll: (num: SpaceNumber) => Array<SpaceType>;
|
|
49
|
+
export declare const findNearestTypes: (num: SpaceNumber, multiply?: boolean) => any[];
|
|
38
50
|
export declare const isValidSpaceProp: (propName: string) => boolean;
|
|
39
|
-
export declare const removeSpaceProps: (props:
|
|
40
|
-
export declare const
|
|
41
|
-
export declare const createStyleObject: (props: Props & StyleObjectProps) => {};
|
|
51
|
+
export declare const removeSpaceProps: (props: StyleObjectProps) => StyleObjectProps;
|
|
52
|
+
export declare const createStyleObject: (props: StyleObjectProps) => {};
|
|
42
53
|
export declare const isInline: (elementName: string) => boolean;
|
|
43
54
|
export {};
|
|
@@ -2,32 +2,33 @@ import "core-js/modules/es.object.keys.js";
|
|
|
2
2
|
import "core-js/modules/es.symbol.js";
|
|
3
3
|
import "core-js/modules/es.object.get-own-property-descriptor.js";
|
|
4
4
|
import "core-js/modules/es.object.get-own-property-descriptors.js";
|
|
5
|
-
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
6
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
5
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
8
6
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
9
|
|
|
10
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
11
11
|
|
|
12
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
13
13
|
|
|
14
|
+
import "core-js/modules/es.object.to-string.js";
|
|
15
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
|
16
|
+
import "core-js/modules/es.array.join.js";
|
|
17
|
+
import "core-js/modules/es.object.is-frozen.js";
|
|
18
|
+
import "core-js/modules/es.array.reduce.js";
|
|
19
|
+
import "core-js/modules/es.object.entries.js";
|
|
20
|
+
import "core-js/modules/es.array.concat.js";
|
|
21
|
+
import "core-js/modules/es.array.map.js";
|
|
14
22
|
import "core-js/modules/es.regexp.exec.js";
|
|
15
23
|
import "core-js/modules/es.string.replace.js";
|
|
16
24
|
import "core-js/modules/es.string.split.js";
|
|
17
25
|
import "core-js/modules/es.array.filter.js";
|
|
18
|
-
import "core-js/modules/es.object.to-string.js";
|
|
19
|
-
import "core-js/modules/es.array.reduce.js";
|
|
20
|
-
import "core-js/modules/es.array.map.js";
|
|
21
26
|
import "core-js/modules/es.parse-float.js";
|
|
22
|
-
import "core-js/modules/web.dom-collections.for-each.js";
|
|
23
27
|
import "core-js/modules/es.array.find.js";
|
|
24
|
-
import "core-js/modules/es.object.entries.js";
|
|
25
28
|
import "core-js/modules/es.array.reverse.js";
|
|
26
|
-
import "core-js/modules/es.array.index-of.js";
|
|
27
|
-
import "core-js/modules/es.array.concat.js";
|
|
28
29
|
import "core-js/modules/es.array.includes.js";
|
|
29
|
-
import "core-js/modules/es.
|
|
30
|
-
import "core-js/modules/es.array.
|
|
30
|
+
import "core-js/modules/es.string.includes.js";
|
|
31
|
+
import "core-js/modules/es.array.index-of.js";
|
|
31
32
|
import { warn } from '../../shared/component-helper';
|
|
32
33
|
export var spacingDefaultProps = {
|
|
33
34
|
space: null,
|
|
@@ -46,25 +47,95 @@ export var spacePatterns = {
|
|
|
46
47
|
'xx-large': 3.5,
|
|
47
48
|
'xx-large-x2': 7
|
|
48
49
|
};
|
|
50
|
+
export var calc = function calc() {
|
|
51
|
+
var result = [];
|
|
52
|
+
|
|
53
|
+
for (var _len = arguments.length, types = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
54
|
+
types[_key] = arguments[_key];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
types.forEach(function (rawTypes) {
|
|
58
|
+
createTypeModifiers(rawTypes).forEach(function (type) {
|
|
59
|
+
result.push("var(--spacing-".concat(type, ")"));
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
return result.length ? "calc(".concat(result.join(' + '), ")") : null;
|
|
63
|
+
};
|
|
64
|
+
export var createSpacingClasses = function createSpacingClasses(props) {
|
|
65
|
+
var Element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
66
|
+
var p = Object.isFrozen(props) ? _objectSpread({}, props) : props;
|
|
67
|
+
|
|
68
|
+
if (typeof p.space !== 'undefined') {
|
|
69
|
+
if (typeof p.space === 'string' || typeof p.space === 'number' || typeof p.space === 'boolean' && p.space) {
|
|
70
|
+
p.top = p.right = p.bottom = p.left = p.space;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (_typeof(p.space) === 'object') {
|
|
74
|
+
for (var i in p.space) {
|
|
75
|
+
if (!p[i] && isValidSpaceProp(i)) {
|
|
76
|
+
p[i] = p.space[i];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
delete p.space;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return Object.entries(p).reduce(function (acc, _ref) {
|
|
85
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
86
|
+
direction = _ref2[0],
|
|
87
|
+
cur = _ref2[1];
|
|
88
|
+
|
|
89
|
+
if (isValidSpaceProp(direction)) {
|
|
90
|
+
if (String(cur) === '0' || String(cur) === 'false') {
|
|
91
|
+
acc.push("dnb-space__".concat(direction, "--zero"));
|
|
92
|
+
} else if (cur) {
|
|
93
|
+
var typeModifiers = createTypeModifiers(cur);
|
|
94
|
+
var sum = sumTypes(typeModifiers);
|
|
95
|
+
|
|
96
|
+
if (sum > 10) {
|
|
97
|
+
warn("Spacing of more than 10rem is not supported! You used ".concat(sum, " / (").concat(typeModifiers.join(','), ")"));
|
|
98
|
+
} else {
|
|
99
|
+
var nearestTypes = findNearestTypes(sum, true);
|
|
100
|
+
acc = [].concat(_toConsumableArray(acc), _toConsumableArray(nearestTypes.map(function (type) {
|
|
101
|
+
return "dnb-space__".concat(direction, "--").concat(type);
|
|
102
|
+
})));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
} else if (direction === 'no_collapse') {
|
|
106
|
+
acc.push('dnb-space--no-collapse');
|
|
107
|
+
|
|
108
|
+
if (Element && isInline(Element)) {
|
|
109
|
+
acc.push('dnb-space--inline');
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return acc;
|
|
114
|
+
}, []);
|
|
115
|
+
};
|
|
49
116
|
export var translateSpace = function translateSpace(type) {
|
|
50
|
-
if (/-x2$/.test(type)) {
|
|
51
|
-
return spacePatterns[type.replace(/-x2$/, '')] * 2;
|
|
117
|
+
if (/-x2$/.test(String(type))) {
|
|
118
|
+
return spacePatterns[String(type).replace(/-x2$/, '')] * 2;
|
|
52
119
|
}
|
|
53
120
|
|
|
54
|
-
return spacePatterns[type] || 0;
|
|
121
|
+
return spacePatterns[String(type)] || 0;
|
|
55
122
|
};
|
|
56
123
|
export var splitTypes = function splitTypes(types) {
|
|
57
124
|
if (typeof types === 'string') {
|
|
58
|
-
|
|
125
|
+
return clean(types.split(/ /g));
|
|
59
126
|
} else if (typeof types === 'boolean') {
|
|
60
127
|
return ['small'];
|
|
61
128
|
} else if (typeof types === 'number') {
|
|
62
129
|
return [types];
|
|
63
130
|
}
|
|
64
131
|
|
|
65
|
-
return types
|
|
66
|
-
|
|
67
|
-
|
|
132
|
+
return clean(types) || null;
|
|
133
|
+
|
|
134
|
+
function clean(t) {
|
|
135
|
+
return t === null || t === void 0 ? void 0 : t.filter(function (r) {
|
|
136
|
+
return r && String(r).length > 0;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
68
139
|
};
|
|
69
140
|
export var sumTypes = function sumTypes(types) {
|
|
70
141
|
return splitTypes(types).map(function (type) {
|
|
@@ -80,18 +151,14 @@ export var sumTypes = function sumTypes(types) {
|
|
|
80
151
|
}, 0);
|
|
81
152
|
};
|
|
82
153
|
export var createTypeModifiers = function createTypeModifiers(types) {
|
|
83
|
-
if (typeof types === 'number') {
|
|
84
|
-
types = String(types);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
154
|
return (splitTypes(types) || []).reduce(function (acc, type) {
|
|
88
155
|
if (type) {
|
|
89
|
-
var firstLetter = type[0];
|
|
156
|
+
var firstLetter = String(type)[0];
|
|
90
157
|
|
|
91
158
|
if (parseFloat(firstLetter) > -1) {
|
|
92
|
-
var num = parseFloat(type);
|
|
159
|
+
var num = parseFloat(String(type));
|
|
93
160
|
|
|
94
|
-
if (num >= 8 && /[0-9]px/.test(type)) {
|
|
161
|
+
if (num >= 8 && /[0-9]px/.test(String(type))) {
|
|
95
162
|
num = num / 16;
|
|
96
163
|
}
|
|
97
164
|
|
|
@@ -108,7 +175,7 @@ export var createTypeModifiers = function createTypeModifiers(types) {
|
|
|
108
175
|
}
|
|
109
176
|
}
|
|
110
177
|
|
|
111
|
-
if (!(parseFloat(type) > 0)) {
|
|
178
|
+
if (!(parseFloat(String(type)) > 0)) {
|
|
112
179
|
acc.push(type);
|
|
113
180
|
}
|
|
114
181
|
}
|
|
@@ -117,52 +184,49 @@ export var createTypeModifiers = function createTypeModifiers(types) {
|
|
|
117
184
|
}, []);
|
|
118
185
|
};
|
|
119
186
|
export var findType = function findType(num) {
|
|
120
|
-
var
|
|
121
|
-
_ref$returnObject = _ref.returnObject,
|
|
122
|
-
returnObject = _ref$returnObject === void 0 ? false : _ref$returnObject;
|
|
123
|
-
|
|
124
|
-
var found = Object.entries(spacePatterns).find(function (_ref2) {
|
|
125
|
-
var _ref3 = _slicedToArray(_ref2, 2),
|
|
126
|
-
k = _ref3[0],
|
|
127
|
-
v = _ref3[1];
|
|
128
|
-
|
|
129
|
-
return k && v === num;
|
|
130
|
-
}) || null;
|
|
131
|
-
|
|
132
|
-
if (returnObject) {
|
|
133
|
-
return found;
|
|
134
|
-
}
|
|
187
|
+
var found = findTypeAll(num);
|
|
135
188
|
|
|
136
189
|
if (found) {
|
|
137
190
|
return found[0];
|
|
138
191
|
}
|
|
139
192
|
|
|
193
|
+
return null;
|
|
194
|
+
};
|
|
195
|
+
export var findTypeAll = function findTypeAll(num) {
|
|
196
|
+
var found = Object.entries(spacePatterns).find(function (_ref3) {
|
|
197
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
198
|
+
k = _ref4[0],
|
|
199
|
+
v = _ref4[1];
|
|
200
|
+
|
|
201
|
+
return k && v === num;
|
|
202
|
+
}) || null;
|
|
140
203
|
return found;
|
|
141
204
|
};
|
|
142
205
|
export var findNearestTypes = function findNearestTypes(num) {
|
|
206
|
+
var multiply = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
143
207
|
var res = [];
|
|
144
|
-
var near = Object.entries(spacePatterns).reverse().
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
208
|
+
var near = Object.entries(spacePatterns).reverse().filter(function (k) {
|
|
209
|
+
return multiply ? true : !k[0].includes('-x');
|
|
210
|
+
}).find(function (_ref5) {
|
|
211
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
212
|
+
k = _ref6[0],
|
|
213
|
+
v = _ref6[1];
|
|
148
214
|
|
|
149
215
|
return k && num >= v;
|
|
150
216
|
});
|
|
151
217
|
var nearNum = near && near[1] || num;
|
|
152
|
-
var
|
|
153
|
-
returnObject: true
|
|
154
|
-
});
|
|
218
|
+
var types = findTypeAll(nearNum);
|
|
155
219
|
|
|
156
|
-
if (
|
|
157
|
-
var nearType =
|
|
220
|
+
if (types) {
|
|
221
|
+
var nearType = types[0];
|
|
158
222
|
res.push(nearType);
|
|
159
|
-
var leftOver = num - parseFloat(String(
|
|
160
|
-
var foundMoreTypes = findNearestTypes(leftOver);
|
|
223
|
+
var leftOver = num - parseFloat(String(types[1]));
|
|
224
|
+
var foundMoreTypes = findNearestTypes(leftOver, multiply);
|
|
161
225
|
foundMoreTypes.forEach(function (type) {
|
|
162
226
|
var index = res.indexOf(type);
|
|
163
227
|
|
|
164
228
|
if (index !== -1) {
|
|
165
|
-
res[index] = "".concat(type, "-x2");
|
|
229
|
+
res[index] = multiply ? "".concat(type, "-x2") : type;
|
|
166
230
|
}
|
|
167
231
|
});
|
|
168
232
|
res = [].concat(_toConsumableArray(res), _toConsumableArray(foundMoreTypes));
|
|
@@ -184,58 +248,6 @@ export var removeSpaceProps = function removeSpaceProps(props) {
|
|
|
184
248
|
|
|
185
249
|
return p;
|
|
186
250
|
};
|
|
187
|
-
export var createSpacingClasses = function createSpacingClasses(props) {
|
|
188
|
-
var Element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
189
|
-
var p = Object.isFrozen(props) ? _objectSpread({}, props) : props;
|
|
190
|
-
|
|
191
|
-
if (typeof p.space !== 'undefined') {
|
|
192
|
-
if (typeof p.space === 'string' || typeof p.space === 'number' || typeof p.space === 'boolean' && p.space) {
|
|
193
|
-
p.top = p.right = p.bottom = p.left = p.space;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (_typeof(p.space) === 'object') {
|
|
197
|
-
for (var i in p.space) {
|
|
198
|
-
if (!p[i] && isValidSpaceProp(i)) {
|
|
199
|
-
p[i] = p.space[i];
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
delete p.space;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
return Object.entries(p).reduce(function (acc, _ref6) {
|
|
208
|
-
var _ref7 = _slicedToArray(_ref6, 2),
|
|
209
|
-
direction = _ref7[0],
|
|
210
|
-
cur = _ref7[1];
|
|
211
|
-
|
|
212
|
-
if (isValidSpaceProp(direction)) {
|
|
213
|
-
if (String(cur) === '0' || String(cur) === 'false') {
|
|
214
|
-
acc.push("dnb-space__".concat(direction, "--zero"));
|
|
215
|
-
} else if (cur) {
|
|
216
|
-
var typeModifiers = createTypeModifiers(cur);
|
|
217
|
-
var sum = sumTypes(typeModifiers);
|
|
218
|
-
|
|
219
|
-
if (sum > 10) {
|
|
220
|
-
warn("Spacing of more than 10rem is not supported! You used ".concat(sum, " / (").concat(typeModifiers.join(','), ")"));
|
|
221
|
-
} else {
|
|
222
|
-
var nearestTypes = findNearestTypes(sum);
|
|
223
|
-
acc = [].concat(_toConsumableArray(acc), _toConsumableArray(nearestTypes.map(function (type) {
|
|
224
|
-
return "dnb-space__".concat(direction, "--").concat(type);
|
|
225
|
-
})));
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
} else if (direction === 'no_collapse') {
|
|
229
|
-
acc.push('dnb-space--no-collapse');
|
|
230
|
-
|
|
231
|
-
if (Element && isInline(Element)) {
|
|
232
|
-
acc.push('dnb-space--inline');
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
return acc;
|
|
237
|
-
}, []);
|
|
238
|
-
};
|
|
239
251
|
export var createStyleObject = function createStyleObject(props) {
|
|
240
252
|
var p = Object.isFrozen(props) ? _objectSpread({}, props) : props;
|
|
241
253
|
|
|
@@ -262,10 +274,10 @@ export var createStyleObject = function createStyleObject(props) {
|
|
|
262
274
|
maxHeight: p.maxHeight && "".concat(p.maxHeight, "rem"),
|
|
263
275
|
width: p.width && "".concat(p.width, "rem"),
|
|
264
276
|
height: p.height && "".concat(p.height, "rem")
|
|
265
|
-
}).reduce(function (acc,
|
|
266
|
-
var
|
|
267
|
-
key =
|
|
268
|
-
val =
|
|
277
|
+
}).reduce(function (acc, _ref7) {
|
|
278
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
|
279
|
+
key = _ref8[0],
|
|
280
|
+
val = _ref8[1];
|
|
269
281
|
|
|
270
282
|
if (typeof val !== 'undefined') {
|
|
271
283
|
acc[key] = val;
|
|
@@ -3,26 +3,33 @@ export declare type SpacingElementProps = {
|
|
|
3
3
|
* Use spacing values like: `small`, `1rem`, `1` or , `16px`. Will use `margin-top`.
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
-
top?:
|
|
6
|
+
top?: SpaceType;
|
|
7
7
|
/**
|
|
8
8
|
* Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-right`.
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
right?:
|
|
11
|
+
right?: SpaceType;
|
|
12
12
|
/**
|
|
13
13
|
* Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-bottom`.
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
|
-
bottom?:
|
|
16
|
+
bottom?: SpaceType;
|
|
17
17
|
/**
|
|
18
18
|
* Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-left`.
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
|
-
left?:
|
|
21
|
+
left?: SpaceType;
|
|
22
22
|
};
|
|
23
|
-
export declare type
|
|
23
|
+
export declare type SpaceType = string | boolean | number;
|
|
24
24
|
export declare type SpacingProps = SpacingElementProps & {
|
|
25
|
-
space?:
|
|
25
|
+
space?: SpaceType | SpacingElementProps;
|
|
26
|
+
};
|
|
27
|
+
export declare type SpacingUnknownProps = Record<string, unknown>;
|
|
28
|
+
export declare type StyleObjectProps = SpacingProps & {
|
|
29
|
+
maxWidth?: string;
|
|
30
|
+
maxHeight?: string;
|
|
31
|
+
width?: string;
|
|
32
|
+
height?: string;
|
|
26
33
|
};
|
|
27
34
|
/**
|
|
28
35
|
* @deprecated Use SpacingElementProps instead
|
package/components/tag/Tag.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ export declare const defaultProps: {
|
|
|
61
61
|
declare const Tag: {
|
|
62
62
|
(localProps: TagProps & SpacingProps): JSX.Element;
|
|
63
63
|
Group: (localProps: import("./TagGroup").TagGroupProps & import("../space/types").SpacingElementProps & {
|
|
64
|
-
space?: import("../space/types").
|
|
64
|
+
space?: import("../space/types").SpaceType | import("../space/types").SpacingElementProps;
|
|
65
65
|
}) => JSX.Element;
|
|
66
66
|
};
|
|
67
67
|
export default Tag;
|
package/elements/Anchor.d.ts
CHANGED
|
@@ -23,6 +23,6 @@ export declare type AnchorProps = {
|
|
|
23
23
|
export declare type AnchorAllProps = AnchorProps & React.HTMLAttributes<HTMLAnchorElement> & SpacingProps;
|
|
24
24
|
export declare function AnchorInstance(localProps: AnchorAllProps): JSX.Element;
|
|
25
25
|
declare const Anchor: React.ForwardRefExoticComponent<AnchorProps & React.HTMLAttributes<HTMLAnchorElement> & import("../shared/types").SpacingElementProps & {
|
|
26
|
-
space?: import("../shared/types").
|
|
26
|
+
space?: import("../shared/types").SpaceType | import("../shared/types").SpacingElementProps;
|
|
27
27
|
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
28
28
|
export default Anchor;
|
package/elements/Dd.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export declare type DdProps = {
|
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
};
|
|
10
10
|
declare const Dd: React.ForwardRefExoticComponent<DdProps & import("../shared/types").SpacingElementProps & {
|
|
11
|
-
space?: import("../shared/types").
|
|
11
|
+
space?: import("../shared/types").SpaceType | import("../shared/types").SpacingElementProps;
|
|
12
12
|
} & React.RefAttributes<unknown>>;
|
|
13
13
|
export default Dd;
|
package/elements/Dt.d.ts
CHANGED
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
export declare type DtProps = React.AllHTMLAttributes<HTMLDListElement>;
|
|
7
7
|
declare const Dt: React.ForwardRefExoticComponent<DtProps & import("../shared/types").SpacingElementProps & {
|
|
8
|
-
space?: import("../shared/types").
|
|
8
|
+
space?: import("../shared/types").SpaceType | import("../shared/types").SpacingElementProps;
|
|
9
9
|
} & React.RefAttributes<unknown>>;
|
|
10
10
|
export default Dt;
|
package/elements/Element.d.ts
CHANGED
|
@@ -48,6 +48,6 @@ declare const Element: React.ForwardRefExoticComponent<Pick<{
|
|
|
48
48
|
/** @deprecated use skeletonMethod instead */
|
|
49
49
|
skeleton_method?: SkeletonMethods;
|
|
50
50
|
} & import("../shared/types").SpacingElementProps & {
|
|
51
|
-
space?: import("../shared/types").
|
|
51
|
+
space?: import("../shared/types").SpaceType | import("../shared/types").SpacingElementProps;
|
|
52
52
|
} & ElementInternalProps & React.HTMLProps<HTMLElement>, "aria-hidden" | "cite" | "data" | "dir" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "accessKey" | "key" | "value" | "top" | "right" | "bottom" | "left" | "space" | "width" | "height" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "className" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "innerRef" | "list" | "step" | "size" | "skeleton" | "alt" | "src" | "shape" | "content" | "inner_ref" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "sizes" | "srcDoc" | "srcLang" | "srcSet" | "start" | "target" | "type" | "useMap" | "wmode" | "wrap" | "class" | "skeletonMethod" | "internalClass" | "css" | "skeleton_method"> & React.RefAttributes<unknown>>;
|
|
53
53
|
export default Element;
|
package/elements/Link.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export default Link;
|
|
2
2
|
declare const Link: import("react").ForwardRefExoticComponent<import("./Anchor").AnchorProps & import("react").HTMLAttributes<HTMLAnchorElement> & import("../shared/types").SpacingElementProps & {
|
|
3
|
-
space?: import("../shared/types").
|
|
3
|
+
space?: import("../shared/types").SpaceType | import("../shared/types").SpacingElementProps;
|
|
4
4
|
} & import("react").RefAttributes<HTMLAnchorElement>>;
|