@darajs/components 1.1.3 → 1.1.4
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/common/image/image.d.ts.map +1 -1
- package/dist/common/image/image.js +2 -4
- package/dist/common/image/image.js.map +1 -1
- package/dist/dara_components-1.1.4-py3-none-any.whl +0 -0
- package/dist/umd/dara.components.umd.js +1 -2
- package/package.json +3 -3
- package/dist/dara_components-1.1.3-py3-none-any.whl +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../js/common/image/image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../js/common/image/image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAiD,MAAM,cAAc,CAAC;AAGnG,UAAU,UAAW,SAAQ,oBAAoB;IAC7C;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAQD;;;;GAIG;AACH,iBAAS,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAU7C;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { injectCss, useComponentStyles } from '@darajs/core';
|
|
2
|
+
import { injectCss, prependBaseUrl, useComponentStyles } from '@darajs/core';
|
|
3
3
|
import styled from '@darajs/styled-components';
|
|
4
4
|
const ImageComponent = styled.div `
|
|
5
5
|
display: flex;
|
|
@@ -11,10 +11,8 @@ const StyledImg = injectCss(ImageComponent);
|
|
|
11
11
|
* @param {ImageProps} props - the component props
|
|
12
12
|
*/
|
|
13
13
|
function Image(props) {
|
|
14
|
-
var _a, _b;
|
|
15
14
|
const [style, css] = useComponentStyles(props);
|
|
16
|
-
|
|
17
|
-
const source = ((_b = (_a = window.dara) === null || _a === void 0 ? void 0 : _a.base_url) !== null && _b !== void 0 ? _b : '') + props.src;
|
|
15
|
+
const source = prependBaseUrl(props.src);
|
|
18
16
|
return (_jsx(StyledImg, { "$rawCss": css, style: style, children: _jsx("img", { alt: `Could not load ${source}`, loading: "lazy", src: source }) }));
|
|
19
17
|
}
|
|
20
18
|
export default Image;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../../js/common/image/image.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAwB,SAAS,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"image.js","sourceRoot":"","sources":["../../../js/common/image/image.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAwB,SAAS,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAS/C,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAsB;;CAEtD,CAAC;AAEF,MAAM,SAAS,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;AAE5C;;;;GAIG;AACH,SAAS,KAAK,CAAC,KAAiB;IAC5B,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAE/C,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEzC,OAAO,CACH,KAAC,SAAS,eAAU,GAAG,EAAE,KAAK,EAAE,KAAK,YACjC,cAAK,GAAG,EAAE,kBAAkB,MAAM,EAAE,EAAE,OAAO,EAAC,MAAM,EAAC,GAAG,EAAE,MAAM,GAAI,GAC5D,CACf,CAAC;AACN,CAAC;AAED,eAAe,KAAK,CAAC"}
|
|
Binary file
|
|
@@ -42983,9 +42983,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
42983
42983
|
`;
|
|
42984
42984
|
const StyledImg$1 = core$2.injectCss(ImageComponent);
|
|
42985
42985
|
function Image$1(props) {
|
|
42986
|
-
var _a3, _b;
|
|
42987
42986
|
const [style2, css2] = core$2.useComponentStyles(props);
|
|
42988
|
-
const source = (
|
|
42987
|
+
const source = core$2.prependBaseUrl(props.src);
|
|
42989
42988
|
return /* @__PURE__ */ React__default.default.createElement(StyledImg$1, { $rawCss: css2, style: style2 }, /* @__PURE__ */ React__default.default.createElement("img", { alt: `Could not load ${source}`, loading: "lazy", src: source }));
|
|
42990
42989
|
}
|
|
42991
42990
|
const StyledInput$2 = core$2.injectCss(Input$3);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darajs/components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Components for the Dara framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@bokeh/bokehjs": "~3.1.1",
|
|
54
|
-
"@darajs/core": "1.1.
|
|
54
|
+
"@darajs/core": "1.1.4",
|
|
55
55
|
"@darajs/styled-components": "~1.0.0",
|
|
56
56
|
"@darajs/ui-causal-graph-editor": "~1.0.0",
|
|
57
57
|
"@darajs/ui-code-editor": "~1.0.0",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "4780629f4a7bb79ae60396953b6920552ffc70d6"
|
|
86
86
|
}
|
|
Binary file
|