@ultraviolet/plus 0.5.1 → 0.5.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.
- package/dist/index.d.ts +1 -1
- package/dist/src/components/EstimateCost/Components/Item.js +2 -2
- package/dist/src/components/EstimateCost/EstimateCostContent.js +4 -7
- package/dist/src/components/EstimateCost/OverlayComponent.js +1 -1
- package/dist/src/components/EstimateCost/componentStyle.js +5 -5
- package/dist/src/components/EstimateCost/constants.js +1 -1
- package/dist/src/index.js +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -322,4 +322,4 @@ declare const EstimateCost: {
|
|
|
322
322
|
}) => _emotion_react_jsx_runtime.JSX.Element;
|
|
323
323
|
};
|
|
324
324
|
|
|
325
|
-
export { CodeEditor, ContentCard, ContentCardGroup, EstimateCost };
|
|
325
|
+
export { CodeEditor, ContentCard, ContentCardGroup, EstimateCost, _default as estimateCostDefaultLocales };
|
|
@@ -239,7 +239,7 @@ const Item = _ref6 => {
|
|
|
239
239
|
hideFromOverlay: hideFromOverlay,
|
|
240
240
|
children: [jsx(Cell$1, {
|
|
241
241
|
width: !isOverlay ? MAX_CELL_WIDTH : 'inherit',
|
|
242
|
-
hasBorder: !isLastElement && !noBorder,
|
|
242
|
+
hasBorder: !isLastElement && !noBorder && !isOverlay,
|
|
243
243
|
tabulation: tabulation,
|
|
244
244
|
children: jsxs(LeftSide, {
|
|
245
245
|
children: [jsxs(Stack, {
|
|
@@ -306,7 +306,7 @@ const Item = _ref6 => {
|
|
|
306
306
|
}) : null, !priceText && computedMaxItemPrice > 0 ? ` - ${formatNumber(computedMaxItemPrice, {
|
|
307
307
|
maximumFractionDigits: formatMaximumFractionDigits
|
|
308
308
|
})}` : null]
|
|
309
|
-
}), amount - amountFree
|
|
309
|
+
}), amount - amountFree !== 1 && computedItemPrice > 0 || maxAmount > 0 && computedMaxItemPrice > 0 ? jsxs(TextAlignRight, {
|
|
310
310
|
as: "p",
|
|
311
311
|
variant: "body",
|
|
312
312
|
children: [formatNumber(calculatePrice({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import { Text, Stack, Alert, Icon } from '@ultraviolet/ui';
|
|
3
|
-
import { useState, useMemo, useEffect, Children, cloneElement } from 'react';
|
|
3
|
+
import { useState, useMemo, useEffect, Children, isValidElement, cloneElement } from 'react';
|
|
4
4
|
import flattenChildren from 'react-flatten-children';
|
|
5
5
|
import { useInView } from 'react-intersection-observer';
|
|
6
6
|
import { CustomUnitInput } from './Components/CustomUnitInput.js';
|
|
@@ -60,7 +60,7 @@ const StyledPriceCell = /*#__PURE__*/_styled(Cell.withComponent('th', {
|
|
|
60
60
|
theme
|
|
61
61
|
} = _ref4;
|
|
62
62
|
return PriceCell(theme);
|
|
63
|
-
}, ";");
|
|
63
|
+
}, " padding:0;");
|
|
64
64
|
const DEFAULT_UNIT_LIST = ['hours', 'days', 'months'];
|
|
65
65
|
const EstimateCostContent = _ref5 => {
|
|
66
66
|
let {
|
|
@@ -215,15 +215,12 @@ const EstimateCostContent = _ref5 => {
|
|
|
215
215
|
})]
|
|
216
216
|
})
|
|
217
217
|
}) : null, jsx("tbody", {
|
|
218
|
-
children: Children.map(list, (child, index) =>
|
|
219
|
-
|
|
220
|
-
/* @ts-expect-error I'm too dumb to understand this sorcery */
|
|
221
|
-
cloneElement(child, {
|
|
218
|
+
children: Children.map(list, (child, index) => /*#__PURE__*/isValidElement(child) ? /*#__PURE__*/cloneElement(child, {
|
|
222
219
|
isLastElement: index === list.length - 1,
|
|
223
220
|
productsCallback,
|
|
224
221
|
iteration,
|
|
225
222
|
discount: discount && !child.props.discount ? discount : child.props.discount
|
|
226
|
-
}))
|
|
223
|
+
}) : child)
|
|
227
224
|
})]
|
|
228
225
|
}) : null, !hideTotal ? jsxs(EmptyTable, {
|
|
229
226
|
cellPadding: "0",
|
|
@@ -23,7 +23,7 @@ const OverlayContainer = /*#__PURE__*/_styled("div", {
|
|
|
23
23
|
theme
|
|
24
24
|
} = _ref2;
|
|
25
25
|
return theme.colors.neutral.background;
|
|
26
|
-
}, ";margin:0 0 0
|
|
26
|
+
}, ";margin:0 0 0 260px;display:flex;justify-content:center;box-shadow:", _ref3 => {
|
|
27
27
|
let {
|
|
28
28
|
inView,
|
|
29
29
|
theme
|
|
@@ -81,7 +81,7 @@ const TotalPriceCell = /*#__PURE__*/_styled(Cell, {
|
|
|
81
81
|
theme
|
|
82
82
|
} = _ref8;
|
|
83
83
|
return theme.colors.neutral.border;
|
|
84
|
-
}, ";border-style:solid;border-width:0 1px 1px 1px;border-radius:0 0 4px 4px;min-width:
|
|
84
|
+
}, ";border-style:solid;border-width:0 1px 1px 1px;border-radius:0 0 4px 4px;min-width:202px;height:56px;background-color:", _ref9 => {
|
|
85
85
|
let {
|
|
86
86
|
theme
|
|
87
87
|
} = _ref9;
|
|
@@ -123,11 +123,11 @@ const EmptyCell = /*#__PURE__*/_styled("td", {
|
|
|
123
123
|
const TimeCell = /*#__PURE__*/_styled("div", {
|
|
124
124
|
target: "e1xb5k8j5"
|
|
125
125
|
})(process.env.NODE_ENV === "production" ? {
|
|
126
|
-
name: "
|
|
127
|
-
styles: "max-width:
|
|
126
|
+
name: "1dh7njz",
|
|
127
|
+
styles: "max-width:200px;padding:16px;align-items:start;text-align:left;float:right"
|
|
128
128
|
} : {
|
|
129
|
-
name: "
|
|
130
|
-
styles: "max-width:
|
|
129
|
+
name: "1dh7njz",
|
|
130
|
+
styles: "max-width:200px;padding:16px;align-items:start;text-align:left;float:right",
|
|
131
131
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
132
132
|
});
|
|
133
133
|
const BadgeBeta = /*#__PURE__*/_styled(Badge, {
|
package/dist/src/index.js
CHANGED
|
@@ -2,3 +2,4 @@ export { ContentCard } from './components/ContentCard/index.js';
|
|
|
2
2
|
export { ContentCardGroup } from './components/ContentCardGroup/index.js';
|
|
3
3
|
export { CodeEditor } from './components/CodeEditor/CodeEditor.js';
|
|
4
4
|
export { EstimateCost } from './components/EstimateCost/EstimateCost.js';
|
|
5
|
+
export { default as estimateCostDefaultLocales } from './components/EstimateCost/locales/en.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultraviolet/plus",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Ultraviolet Plus",
|
|
5
5
|
"homepage": "https://github.com/scaleway/ultraviolet#readme",
|
|
6
6
|
"repository": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"react-flatten-children": "1.1.2",
|
|
57
57
|
"react-intersection-observer": "9.5.3",
|
|
58
58
|
"@ultraviolet/themes": "1.5.0",
|
|
59
|
-
"@ultraviolet/ui": "1.27.
|
|
59
|
+
"@ultraviolet/ui": "1.27.2"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "rollup -c ../../rollup.config.mjs"
|