@darajs/components 1.16.18 → 1.16.20-alpha.1
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/card/card.d.ts +3 -3
- package/dist/common/card/card.d.ts.map +1 -1
- package/dist/common/card/card.js +4 -2
- package/dist/common/card/card.js.map +1 -1
- package/dist/dara_components-1.16.20a1-py3-none-any.whl +0 -0
- package/dist/umd/dara.components.umd.js +3 -1
- package/package.json +12 -12
- package/dist/dara_components-1.16.18-py3-none-any.whl +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentInstance, LayoutComponentProps } from '@darajs/core';
|
|
1
|
+
import { ComponentInstance, LayoutComponentProps, Variable } from '@darajs/core';
|
|
2
2
|
interface BaseCardProps {
|
|
3
3
|
accent?: boolean;
|
|
4
4
|
}
|
|
@@ -9,9 +9,9 @@ interface CardProps extends LayoutComponentProps {
|
|
|
9
9
|
/** Content to be displayed in the main card */
|
|
10
10
|
children: Array<ComponentInstance>;
|
|
11
11
|
/** Optional subtitle for the card */
|
|
12
|
-
subtitle?: string
|
|
12
|
+
subtitle?: string | Variable<string>;
|
|
13
13
|
/** Optional heading for the card */
|
|
14
|
-
title?: string
|
|
14
|
+
title?: string | Variable<string>;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* A card component for displaying content components. Takes a heading, optional subtitle and content to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../js/common/card/card.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,iBAAiB,EAGjB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../js/common/card/card.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,iBAAiB,EAGjB,oBAAoB,EACpB,QAAQ,EAIX,MAAM,cAAc,CAAC;AAGtB,UAAU,aAAa;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,OAAO,8PAyBlB,CAAC;AAqCH,UAAU,SAAU,SAAQ,oBAAoB;IAC5C,kEAAkE;IAClE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+CAA+C;IAC/C,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACnC,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IACrC,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;CACrC;AAED;;;;;GAKG;AACH,iBAAS,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAyB3C;AAED,eAAe,IAAI,CAAC"}
|
package/dist/common/card/card.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { transparentize } from 'polished';
|
|
3
|
-
import { DisplayCtx, DynamicComponent, injectCss, useComponentStyles, } from '@darajs/core';
|
|
3
|
+
import { DisplayCtx, DynamicComponent, injectCss, useComponentStyles, useVariable, } from '@darajs/core';
|
|
4
4
|
import styled from '@darajs/styled-components';
|
|
5
5
|
export const CardDiv = injectCss(styled.div `
|
|
6
6
|
display: flex;
|
|
@@ -48,8 +48,10 @@ const Subtitle = styled.span `
|
|
|
48
48
|
* @param props - the component props
|
|
49
49
|
*/
|
|
50
50
|
function Card(props) {
|
|
51
|
+
const [title] = useVariable(props.title);
|
|
52
|
+
const [subtitle] = useVariable(props.subtitle);
|
|
51
53
|
const [style, css] = useComponentStyles(props);
|
|
52
|
-
return (_jsxs(CardDiv, { "$rawCss": css, accent: props.accent, style: style, children: [
|
|
54
|
+
return (_jsxs(CardDiv, { "$rawCss": css, accent: props.accent, style: style, children: [title && _jsx(Title, { children: title }), subtitle && _jsx(Subtitle, { hasTitle: props.title !== null, children: subtitle }), _jsx(ChildrenWrapper, { "data-type": "children-wrapper", hasSubtitle: props.subtitle !== null, hasTitle: props.title !== null, style: {
|
|
53
55
|
alignItems: props.align,
|
|
54
56
|
justifyContent: props.justify,
|
|
55
57
|
}, children: _jsx(DisplayCtx.Provider, { value: { component: 'card', direction: 'vertical' }, children: props.children.map((child, idx) => (_jsx(DynamicComponent, { component: child }, `card-${idx}-${child.name}`))) }) })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../js/common/card/card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAEH,UAAU,EACV,gBAAgB,
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../js/common/card/card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAEH,UAAU,EACV,gBAAgB,EAGhB,SAAS,EACT,kBAAkB,EAClB,WAAW,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAM/C,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,CAAe;;;;;;;;aAQ7C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;;kBAE7B,CAAC,KAAK,EAAE,EAAE,CACpB,KAAK,CAAC,MAAM,CAAC,CAAC;IACV,qDAAqD,cAAc,CAC/D,GAAG,EACH,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAChC,QAAQ,cAAc,CACnB,GAAG,EACH,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAC3B,4DAA4D,cAAc,CACvE,GAAG,EACH,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAC3B,QAAQ,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,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K,KAAK,IAAI,YAAG,QAAQ,GAAY,EAC5E,KAAC,eAAe,iBACF,kBAAkB,EAC5B,WAAW,EAAE,KAAK,CAAC,QAAQ,KAAK,IAAI,EACpC,QAAQ,EAAE,KAAK,CAAC,KAAK,KAAK,IAAI,EAC9B,KAAK,EAAE;oBACH,UAAU,EAAE,KAAK,CAAC,KAAK;oBACvB,cAAc,EAAE,KAAK,CAAC,OAAO;iBAChC,YAED,KAAC,UAAU,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,YACnE,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAwB,EAAE,GAAW,EAAE,EAAE,CAAC,CAC3D,KAAC,gBAAgB,IAAC,SAAS,EAAE,KAAK,IAAO,QAAQ,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,CAAI,CAC3E,CAAC,GACgB,GACR,IACZ,CACb,CAAC;AACN,CAAC;AAED,eAAe,IAAI,CAAC"}
|
|
Binary file
|
|
@@ -56266,8 +56266,10 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
56266
56266
|
text-align: left;
|
|
56267
56267
|
`;
|
|
56268
56268
|
function Card$1(props) {
|
|
56269
|
+
const [title] = core$1.useVariable(props.title);
|
|
56270
|
+
const [subtitle] = core$1.useVariable(props.subtitle);
|
|
56269
56271
|
const [style2, css2] = core$1.useComponentStyles(props);
|
|
56270
|
-
return /* @__PURE__ */ React__default.default.createElement(CardDiv, { $rawCss: css2, accent: props.accent, style: style2 },
|
|
56272
|
+
return /* @__PURE__ */ React__default.default.createElement(CardDiv, { $rawCss: css2, accent: props.accent, style: style2 }, title && /* @__PURE__ */ React__default.default.createElement(Title, null, title), subtitle && /* @__PURE__ */ React__default.default.createElement(Subtitle, { hasTitle: props.title !== null }, subtitle), /* @__PURE__ */ React__default.default.createElement(
|
|
56271
56273
|
ChildrenWrapper,
|
|
56272
56274
|
{
|
|
56273
56275
|
"data-type": "children-wrapper",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darajs/components",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.20-alpha.1",
|
|
4
4
|
"description": "Components for the Dara framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"prettier": "@darajs/prettier-config",
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/core": "^7.23.5",
|
|
32
|
-
"@darajs/eslint-config": "1.16.
|
|
33
|
-
"@darajs/prettier-config": "1.16.
|
|
34
|
-
"@darajs/stylelint-config": "1.16.
|
|
32
|
+
"@darajs/eslint-config": "1.16.20-alpha.1",
|
|
33
|
+
"@darajs/prettier-config": "1.16.20-alpha.1",
|
|
34
|
+
"@darajs/stylelint-config": "1.16.20-alpha.1",
|
|
35
35
|
"@testing-library/react-hooks": "^3.4.2",
|
|
36
36
|
"@types/lodash": "^4.14.155",
|
|
37
37
|
"@types/react": "18.2.60",
|
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
"@codemirror/state": "^6.0.0",
|
|
66
66
|
"@codemirror/theme-one-dark": "^6.1.2",
|
|
67
67
|
"@codemirror/view": "^6.0.0",
|
|
68
|
-
"@darajs/core": "1.16.
|
|
69
|
-
"@darajs/styled-components": "1.16.
|
|
70
|
-
"@darajs/ui-causal-graph-editor": "1.16.
|
|
71
|
-
"@darajs/ui-components": "1.16.
|
|
72
|
-
"@darajs/ui-hierarchy-viewer": "1.16.
|
|
73
|
-
"@darajs/ui-icons": "1.16.
|
|
74
|
-
"@darajs/ui-utils": "1.16.
|
|
68
|
+
"@darajs/core": "1.16.20-alpha.1",
|
|
69
|
+
"@darajs/styled-components": "1.16.20-alpha.1",
|
|
70
|
+
"@darajs/ui-causal-graph-editor": "1.16.20-alpha.1",
|
|
71
|
+
"@darajs/ui-components": "1.16.20-alpha.1",
|
|
72
|
+
"@darajs/ui-hierarchy-viewer": "1.16.20-alpha.1",
|
|
73
|
+
"@darajs/ui-icons": "1.16.20-alpha.1",
|
|
74
|
+
"@darajs/ui-utils": "1.16.20-alpha.1",
|
|
75
75
|
"@popperjs/core": "2.4.0",
|
|
76
76
|
"@vscode/codicons": "0.0.36",
|
|
77
77
|
"date-fns": "2.9.0",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"publishConfig": {
|
|
97
97
|
"access": "public"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "65e7599ad8f38e48b2c9a05f27c86391cab451f0"
|
|
100
100
|
}
|
|
Binary file
|