@websolutespa/bom-mixer-ui 1.8.11 → 1.8.13
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 +18 -0
- package/dist/cjs/index.js +54 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/container/container.js +25 -7
- package/dist/esm/components/container/container.js.map +1 -1
- package/dist/esm/components/css.js +1 -1
- package/dist/esm/components/css.js.map +1 -1
- package/dist/esm/components/drawer/drawer-base.js +8 -3
- package/dist/esm/components/drawer/drawer-base.js.map +1 -1
- package/dist/esm/components/media/media-image.js +19 -3
- package/dist/esm/components/media/media-image.js.map +1 -1
- package/dist/esm/components/text/text.js +1 -0
- package/dist/esm/components/text/text.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/types/components/container/container.d.ts +5 -3
- package/dist/types/components/container/container.d.ts.map +1 -1
- package/dist/types/components/css.d.ts +2 -1
- package/dist/types/components/css.d.ts.map +1 -1
- package/dist/types/components/drawer/drawer-base.d.ts.map +1 -1
- package/dist/types/components/media/media-image.d.ts.map +1 -1
- package/dist/types/components/text/text.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/container/container.tsx +10 -4
- package/src/components/css.ts +1 -1
- package/src/components/drawer/drawer-base.tsx +12 -3
- package/src/components/media/media-image.tsx +20 -3
- package/src/components/text/text.tsx +1 -0
- package/src/theme/global.vars.scss +218 -218
- package/src/theme/global.vars.ts +645 -645
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @websolutespa/bom-mixer-ui
|
|
2
2
|
|
|
3
|
+
## 1.8.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Modified: Text added letter-spacing, MediaImage
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @websolutespa/bom-mixer-models@1.8.8
|
|
11
|
+
- @websolutespa/bom-core@1.8.10
|
|
12
|
+
|
|
13
|
+
## 1.8.12
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Modified: Container
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @websolutespa/bom-core@1.8.9
|
|
20
|
+
|
|
3
21
|
## 1.8.11
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -473,9 +473,9 @@ const CssObj = {
|
|
|
473
473
|
/*
|
|
474
474
|
"fontSizeAdjust": "font-size-adjust",
|
|
475
475
|
"fontStretch": "font-stretch",
|
|
476
|
-
"fontStyle": "font-style",
|
|
477
476
|
"fontVariant": "font-variant",
|
|
478
477
|
*/
|
|
478
|
+
'fontStyle': 'font-style',
|
|
479
479
|
'fontWeight': 'font-weight',
|
|
480
480
|
'gap': 'gap',
|
|
481
481
|
'grid': 'grid',
|
|
@@ -2024,21 +2024,39 @@ const Code = styled__default.default.div`
|
|
|
2024
2024
|
${props => getCssResponsive(props)}
|
|
2025
2025
|
`;
|
|
2026
2026
|
|
|
2027
|
-
const
|
|
2027
|
+
const StyledContainer = styled__default.default.div`
|
|
2028
2028
|
width: 100%;
|
|
2029
2029
|
margin: 0 auto;
|
|
2030
2030
|
${props => getContainer(props)}
|
|
2031
2031
|
${props => getCssResponsive(props)}
|
|
2032
2032
|
`;
|
|
2033
|
+
const ContainerBase = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
2034
|
+
var {
|
|
2035
|
+
children,
|
|
2036
|
+
as = 'div',
|
|
2037
|
+
className
|
|
2038
|
+
} = _a,
|
|
2039
|
+
props = __rest(_a, ["children", "as", "className"]);
|
|
2040
|
+
return jsxRuntime.jsx(StyledContainer, Object.assign({
|
|
2041
|
+
ref: ref,
|
|
2042
|
+
as: as,
|
|
2043
|
+
className: bomCore.getClassNames('container', className)
|
|
2044
|
+
}, props, {
|
|
2045
|
+
children: children
|
|
2046
|
+
}));
|
|
2047
|
+
});
|
|
2048
|
+
ContainerBase.displayName = 'ContainerBase';
|
|
2033
2049
|
const ContainerFluid = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
2034
2050
|
var {
|
|
2035
2051
|
children,
|
|
2036
|
-
as = 'div'
|
|
2052
|
+
as = 'div',
|
|
2053
|
+
className
|
|
2037
2054
|
} = _a,
|
|
2038
|
-
props = __rest(_a, ["children", "as"]);
|
|
2039
|
-
return jsxRuntime.jsx(
|
|
2055
|
+
props = __rest(_a, ["children", "as", "className"]);
|
|
2056
|
+
return jsxRuntime.jsx(StyledContainer, Object.assign({
|
|
2040
2057
|
ref: ref,
|
|
2041
|
-
as: as
|
|
2058
|
+
as: as,
|
|
2059
|
+
className: bomCore.getClassNames('container-fluid', className)
|
|
2042
2060
|
}, props, {
|
|
2043
2061
|
variant: "fluid",
|
|
2044
2062
|
children: children
|
|
@@ -2921,17 +2939,23 @@ const DrawerBase = _a => {
|
|
|
2921
2939
|
props = __rest(_a, ["name", "visible", "onClose", "placement", "className", "variant", "variants", "children"]);
|
|
2922
2940
|
const [drawer, openDrawer, closeDrawer] = bomMixerHooks.useDrawer();
|
|
2923
2941
|
const onClose = () => {
|
|
2942
|
+
console.log('onClose', name, drawer);
|
|
2924
2943
|
if (outerOnClose) {
|
|
2925
2944
|
outerOnClose();
|
|
2926
2945
|
}
|
|
2927
|
-
|
|
2946
|
+
if (drawer === name) {
|
|
2947
|
+
closeDrawer();
|
|
2948
|
+
}
|
|
2928
2949
|
};
|
|
2929
|
-
|
|
2950
|
+
const open = typeof outerVisible === 'undefined' ? drawer === name : outerVisible;
|
|
2951
|
+
/*
|
|
2952
|
+
useEffect(() => {
|
|
2930
2953
|
if (typeof outerVisible === 'undefined') {
|
|
2931
2954
|
return;
|
|
2932
2955
|
}
|
|
2933
2956
|
outerVisible ? openDrawer(name) : closeDrawer();
|
|
2934
2957
|
}, [closeDrawer, name, openDrawer, outerVisible]);
|
|
2958
|
+
*/
|
|
2935
2959
|
const classNames = bomCore.getClassNames('drawer', className, placement);
|
|
2936
2960
|
const globalVariants = useVariants('drawer', drawerVariants);
|
|
2937
2961
|
variants = variants || globalVariants;
|
|
@@ -2942,7 +2966,7 @@ const DrawerBase = _a => {
|
|
|
2942
2966
|
variants
|
|
2943
2967
|
},
|
|
2944
2968
|
children: jsxRuntime.jsx(AriaKit__namespace.DialogProvider, {
|
|
2945
|
-
open:
|
|
2969
|
+
open: open,
|
|
2946
2970
|
children: jsxRuntime.jsx(DrawerBaseStyle, Object.assign({
|
|
2947
2971
|
onClose: () => onClose(),
|
|
2948
2972
|
className: classNames,
|
|
@@ -4721,6 +4745,7 @@ const StyledText$1 = styled__default.default.div`
|
|
|
4721
4745
|
${font.size ? styled.css`font-size: var(--font-${variant}-size, 1rem);` : ''}
|
|
4722
4746
|
${font.lineHeight ? styled.css`line-height: var(--font-${variant}-line-height, 1);` : ''}
|
|
4723
4747
|
${font.fontWeight ? styled.css`font-weight: var(--font-${variant}-font-weight, inherit);` : ''}
|
|
4748
|
+
${font.letterSpacing ? styled.css`letter-spacing: var(--font-${variant}-letter-spacing, inherit);` : ''}
|
|
4724
4749
|
`)};
|
|
4725
4750
|
${props => props.gradient ? styled.css`
|
|
4726
4751
|
display: -webkit-inline-box;
|
|
@@ -5161,7 +5186,7 @@ function getImageProps(_a, mediaQuery) {
|
|
|
5161
5186
|
src
|
|
5162
5187
|
} = _a,
|
|
5163
5188
|
props = __rest(_a, ["src"]);
|
|
5164
|
-
if (IMAGE_STRATEGY === bomCore.ImageStrategy.None || !
|
|
5189
|
+
if (IMAGE_STRATEGY === bomCore.ImageStrategy.None || !isValidSrc(src)) {
|
|
5165
5190
|
return Object.assign({
|
|
5166
5191
|
src
|
|
5167
5192
|
}, props);
|
|
@@ -5254,7 +5279,7 @@ function getImageSrc(src, width, ratio, focalX, focalY, quality) {
|
|
|
5254
5279
|
if (quality === void 0) {
|
|
5255
5280
|
quality = IMAGE_QUALITY;
|
|
5256
5281
|
}
|
|
5257
|
-
if (
|
|
5282
|
+
if (!isValidSrc(src)) {
|
|
5258
5283
|
return src;
|
|
5259
5284
|
}
|
|
5260
5285
|
switch (IMAGE_STRATEGY) {
|
|
@@ -5305,7 +5330,7 @@ function getImageSrcset(src, sizes, focalX, focalY, quality) {
|
|
|
5305
5330
|
if (quality === void 0) {
|
|
5306
5331
|
quality = IMAGE_QUALITY;
|
|
5307
5332
|
}
|
|
5308
|
-
if (
|
|
5333
|
+
if (!isValidSrc(src)) {
|
|
5309
5334
|
return undefined;
|
|
5310
5335
|
}
|
|
5311
5336
|
return sizes.length > 1 ? sizes.map(size => getImageSrc(src, size[0], size[2], focalX, focalY, quality) + ` ${size[0]}w`).join(', ') : undefined;
|
|
@@ -5313,6 +5338,22 @@ function getImageSrcset(src, sizes, focalX, focalY, quality) {
|
|
|
5313
5338
|
function getImageSizes(sizes) {
|
|
5314
5339
|
return sizes.length > 1 ? sizes.map((size, i) => `${i < sizes.length - 1 ? `(max-width: ${sizes[i + 1][1] - 1}px) ` : ''}${size[0]}px`).join(', ') : undefined;
|
|
5315
5340
|
}
|
|
5341
|
+
function isValidSrc(src) {
|
|
5342
|
+
// undefined
|
|
5343
|
+
if (!src) {
|
|
5344
|
+
return false;
|
|
5345
|
+
}
|
|
5346
|
+
// svg
|
|
5347
|
+
if (isSVG(src)) {
|
|
5348
|
+
return false;
|
|
5349
|
+
}
|
|
5350
|
+
// data image
|
|
5351
|
+
if (src.indexOf('data:') === 0) {
|
|
5352
|
+
return false;
|
|
5353
|
+
}
|
|
5354
|
+
// valid
|
|
5355
|
+
return true;
|
|
5356
|
+
}
|
|
5316
5357
|
function isSVG(src) {
|
|
5317
5358
|
return src.indexOf('.svg') !== -1;
|
|
5318
5359
|
}
|
|
@@ -12739,6 +12780,7 @@ exports.Section = Section;
|
|
|
12739
12780
|
exports.Select = Select;
|
|
12740
12781
|
exports.SelectLegacy = SelectLegacy;
|
|
12741
12782
|
exports.Skeleton = Skeleton;
|
|
12783
|
+
exports.StyledContainer = StyledContainer;
|
|
12742
12784
|
exports.Svg = Svg;
|
|
12743
12785
|
exports.SvgAnimation = SvgAnimation;
|
|
12744
12786
|
exports.SwiperComponent = SwiperComponent;
|