@ultraviolet/plus 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,9 +5,10 @@ import { forwardRef, useState, useMemo, useEffect, createRef } from 'react';
|
|
|
5
5
|
import { Skeleton } from './Skeleton.js';
|
|
6
6
|
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
7
7
|
|
|
8
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
8
9
|
const activeStyle = theme => /*#__PURE__*/css("&:hover{border:1px solid ", theme.colors.primary.borderHover, ";box-shadow:", theme.shadows.defaultShadow, ";cursor:pointer;}");
|
|
9
10
|
const Card = /*#__PURE__*/_styled("div", {
|
|
10
|
-
target: "
|
|
11
|
+
target: "e2ipnt5"
|
|
11
12
|
})("display:block;text-align:left;padding:0;text-decoration:none;border:1px solid ", _ref => {
|
|
12
13
|
let {
|
|
13
14
|
theme
|
|
@@ -32,7 +33,7 @@ const Card = /*#__PURE__*/_styled("div", {
|
|
|
32
33
|
return onClick || href ? activeStyle(theme) : null;
|
|
33
34
|
}, ";overflow-wrap:break-word;");
|
|
34
35
|
const IconContainer = /*#__PURE__*/_styled("div", {
|
|
35
|
-
target: "
|
|
36
|
+
target: "e2ipnt4"
|
|
36
37
|
})("display:flex;width:fit-content;background:", _ref5 => {
|
|
37
38
|
let {
|
|
38
39
|
theme
|
|
@@ -51,7 +52,7 @@ const IconContainer = /*#__PURE__*/_styled("div", {
|
|
|
51
52
|
}, ";");
|
|
52
53
|
const StyledIconStack = /*#__PURE__*/_styled(Stack, {
|
|
53
54
|
shouldForwardProp: prop => prop !== 'direction',
|
|
54
|
-
target: "
|
|
55
|
+
target: "e2ipnt3"
|
|
55
56
|
})("padding:", _ref8 => {
|
|
56
57
|
let {
|
|
57
58
|
theme,
|
|
@@ -61,7 +62,7 @@ const StyledIconStack = /*#__PURE__*/_styled(Stack, {
|
|
|
61
62
|
}, ";");
|
|
62
63
|
const SubContainer = /*#__PURE__*/_styled(Stack, {
|
|
63
64
|
shouldForwardProp: prop => !['direction', 'href'].includes(prop),
|
|
64
|
-
target: "
|
|
65
|
+
target: "e2ipnt2"
|
|
65
66
|
})("padding:", _ref9 => {
|
|
66
67
|
let {
|
|
67
68
|
theme,
|
|
@@ -77,7 +78,7 @@ const SubContainer = /*#__PURE__*/_styled(Stack, {
|
|
|
77
78
|
}, ";height:fit-content;");
|
|
78
79
|
const Image = /*#__PURE__*/_styled('img', {
|
|
79
80
|
shouldForwardProp: prop => !['direction', 'subContainerHeight'].includes(prop),
|
|
80
|
-
target: "
|
|
81
|
+
target: "e2ipnt1"
|
|
81
82
|
})("object-fit:cover;border-radius:", _ref11 => {
|
|
82
83
|
let {
|
|
83
84
|
theme,
|
|
@@ -91,6 +92,16 @@ const Image = /*#__PURE__*/_styled('img', {
|
|
|
91
92
|
} = _ref12;
|
|
92
93
|
return direction === 'row' ? `max-height: ${subContainerHeight}px` : null;
|
|
93
94
|
}, ";");
|
|
95
|
+
const FullHeightStack = /*#__PURE__*/_styled(Stack, {
|
|
96
|
+
target: "e2ipnt0"
|
|
97
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
98
|
+
name: "13udsys",
|
|
99
|
+
styles: "height:100%"
|
|
100
|
+
} : {
|
|
101
|
+
name: "13udsys",
|
|
102
|
+
styles: "height:100%",
|
|
103
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
104
|
+
});
|
|
94
105
|
/**
|
|
95
106
|
* ContentCard is a component that displays a title, subtitle, description, image and icon in a card.
|
|
96
107
|
* It can take different directions to display the image and the content. You can also add more content
|
|
@@ -106,7 +117,7 @@ const ContentCard = /*#__PURE__*/forwardRef((_ref13, ref) => {
|
|
|
106
117
|
description,
|
|
107
118
|
children,
|
|
108
119
|
href,
|
|
109
|
-
target,
|
|
120
|
+
target = '_blank',
|
|
110
121
|
onClick,
|
|
111
122
|
loading,
|
|
112
123
|
className
|
|
@@ -116,12 +127,12 @@ const ContentCard = /*#__PURE__*/forwardRef((_ref13, ref) => {
|
|
|
116
127
|
const Container = useMemo(() => {
|
|
117
128
|
if (href) {
|
|
118
129
|
return Card.withComponent('a', {
|
|
119
|
-
target: "
|
|
130
|
+
target: "e2ipnt6"
|
|
120
131
|
});
|
|
121
132
|
}
|
|
122
133
|
if (onClick) {
|
|
123
134
|
return Card.withComponent('button', {
|
|
124
|
-
target: "
|
|
135
|
+
target: "e2ipnt7"
|
|
125
136
|
});
|
|
126
137
|
}
|
|
127
138
|
return Card;
|
|
@@ -136,7 +147,7 @@ const ContentCard = /*#__PURE__*/forwardRef((_ref13, ref) => {
|
|
|
136
147
|
className: className,
|
|
137
148
|
children: loading ? jsx(Skeleton, {
|
|
138
149
|
direction: direction
|
|
139
|
-
}) : jsxs(
|
|
150
|
+
}) : jsxs(FullHeightStack, {
|
|
140
151
|
direction: direction,
|
|
141
152
|
children: [image ? jsx(Image, {
|
|
142
153
|
alt: "",
|