@eccenca/gui-elements 24.0.0-rc.1 → 24.0.0-rc.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/CHANGELOG.md +12 -0
- package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +8 -2
- package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
- package/dist/cjs/components/FlexibleLayout/FlexibleLayoutContainer.js +55 -0
- package/dist/cjs/components/FlexibleLayout/FlexibleLayoutContainer.js.map +1 -0
- package/dist/cjs/components/FlexibleLayout/FlexibleLayoutItem.js +57 -0
- package/dist/cjs/components/FlexibleLayout/FlexibleLayoutItem.js.map +1 -0
- package/dist/cjs/components/FlexibleLayout/index.js +19 -0
- package/dist/cjs/components/FlexibleLayout/index.js.map +1 -0
- package/dist/cjs/components/Icon/canonicalIconNames.js +2 -2
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/Label/Label.js +2 -2
- package/dist/cjs/components/Label/Label.js.map +1 -1
- package/dist/cjs/components/PropertyValuePair/PropertyValueList.js +12 -2
- package/dist/cjs/components/PropertyValuePair/PropertyValueList.js.map +1 -1
- package/dist/cjs/components/PropertyValuePair/PropertyValuePair.js +3 -2
- package/dist/cjs/components/PropertyValuePair/PropertyValuePair.js.map +1 -1
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +8 -2
- package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
- package/dist/esm/components/FlexibleLayout/FlexibleLayoutContainer.js +40 -0
- package/dist/esm/components/FlexibleLayout/FlexibleLayoutContainer.js.map +1 -0
- package/dist/esm/components/FlexibleLayout/FlexibleLayoutItem.js +42 -0
- package/dist/esm/components/FlexibleLayout/FlexibleLayoutItem.js.map +1 -0
- package/dist/esm/components/FlexibleLayout/index.js +3 -0
- package/dist/esm/components/FlexibleLayout/index.js.map +1 -0
- package/dist/esm/components/Icon/canonicalIconNames.js +2 -2
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/components/Label/Label.js +2 -2
- package/dist/esm/components/Label/Label.js.map +1 -1
- package/dist/esm/components/PropertyValuePair/PropertyValueList.js +12 -2
- package/dist/esm/components/PropertyValuePair/PropertyValueList.js.map +1 -1
- package/dist/esm/components/PropertyValuePair/PropertyValuePair.js +3 -2
- package/dist/esm/components/PropertyValuePair/PropertyValuePair.js.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/types/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.d.ts +5 -1
- package/dist/types/components/FlexibleLayout/FlexibleLayoutContainer.d.ts +31 -0
- package/dist/types/components/FlexibleLayout/FlexibleLayoutItem.d.ts +24 -0
- package/dist/types/components/FlexibleLayout/index.d.ts +2 -0
- package/dist/types/components/Label/Label.d.ts +5 -1
- package/dist/types/components/PropertyValuePair/PropertyValueList.d.ts +8 -2
- package/dist/types/components/PropertyValuePair/PropertyValuePair.d.ts +5 -1
- package/dist/types/components/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx +17 -7
- package/src/cmem/markdown/markdown.scss +6 -3
- package/src/cmem/markdown/markdown.utils.ts +18 -0
- package/src/cmem/markdown/markdownutils.test.ts +13 -0
- package/src/components/FlexibleLayout/FlexibleLayoutContainer.tsx +67 -0
- package/src/components/FlexibleLayout/FlexibleLayoutItem.tsx +59 -0
- package/src/components/FlexibleLayout/flexiblelayout.scss +48 -0
- package/src/components/FlexibleLayout/index.ts +2 -0
- package/src/components/FlexibleLayout/stories/FlexibleLayoutContainer.stories.tsx +31 -0
- package/src/components/FlexibleLayout/stories/FlexibleLayoutItem.stories.tsx +28 -0
- package/src/components/Icon/canonicalIconNames.tsx +2 -2
- package/src/components/Label/Label.tsx +6 -1
- package/src/components/Label/label.scss +6 -0
- package/src/components/PropertyValuePair/PropertyValueList.tsx +26 -3
- package/src/components/PropertyValuePair/PropertyValuePair.tsx +7 -1
- package/src/components/PropertyValuePair/propertyvalue.scss +25 -13
- package/src/components/PropertyValuePair/stories/PropertyValueList.stories.tsx +1 -1
- package/src/components/PropertyValuePair/stories/PropertyValuePair.stories.tsx +1 -1
- package/src/components/Typography/typography.scss +51 -0
- package/src/components/index.scss +1 -0
- package/src/components/index.ts +1 -0
- package/src/configuration/_variables.scss +4 -0
|
@@ -18,6 +18,10 @@ export interface PropertyValuePairProps extends React.HTMLAttributes<HTMLDivElem
|
|
|
18
18
|
* Forward the `nowrap` option to it `PropertyName` and `PropertyValue` children.
|
|
19
19
|
*/
|
|
20
20
|
nowrap?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Only use one single column and put property label and value below each other.
|
|
23
|
+
*/
|
|
24
|
+
singleColumn?: boolean;
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
export const PropertyValuePair = ({
|
|
@@ -26,6 +30,7 @@ export const PropertyValuePair = ({
|
|
|
26
30
|
nowrap,
|
|
27
31
|
hasSpacing = false,
|
|
28
32
|
hasDivider = false,
|
|
33
|
+
singleColumn = false,
|
|
29
34
|
...otherProps
|
|
30
35
|
}: PropertyValuePairProps) => {
|
|
31
36
|
const alteredChildren = nowrap
|
|
@@ -44,7 +49,8 @@ export const PropertyValuePair = ({
|
|
|
44
49
|
`${eccgui}-propertyvalue__pair` +
|
|
45
50
|
(className ? " " + className : "") +
|
|
46
51
|
(hasSpacing ? ` ${eccgui}-propertyvalue__pair--hasspacing` : "") +
|
|
47
|
-
(hasDivider ? ` ${eccgui}-propertyvalue__pair--hasdivider` : "")
|
|
52
|
+
(hasDivider ? ` ${eccgui}-propertyvalue__pair--hasdivider` : "") +
|
|
53
|
+
(singleColumn ? ` ${eccgui}-propertyvalue__pair--singlecolumn` : "")
|
|
48
54
|
}
|
|
49
55
|
{...otherProps}
|
|
50
56
|
>
|
|
@@ -34,32 +34,41 @@
|
|
|
34
34
|
display: flex;
|
|
35
35
|
flex-direction: column;
|
|
36
36
|
justify-content: center;
|
|
37
|
-
|
|
37
|
+
|
|
38
|
+
:not(.#{$eccgui}-propertyvalue__pair--singlecolumn) > & {
|
|
39
|
+
min-height: $eccgui-size-textfield-height-regular;
|
|
40
|
+
}
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
.#{$eccgui}-propertyvalue__property {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
:not(.#{$eccgui}-propertyvalue__pair--singlecolumn) > & {
|
|
45
|
+
float: left;
|
|
46
|
+
width: math.div(3, 16) * 100%;
|
|
47
|
+
overflow: hidden;
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
& > div {
|
|
50
|
+
margin-right: $eccgui-size-block-whitespace;
|
|
51
|
+
}
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
54
|
|
|
50
55
|
.#{$eccgui}-propertyvalue__property--small {
|
|
51
|
-
|
|
56
|
+
:not(.#{$eccgui}-propertyvalue__pair--singlecolumn) > & {
|
|
57
|
+
width: math.div(2, 16) * 100%;
|
|
52
58
|
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
& + .#{$eccgui}-propertyvalue__value {
|
|
60
|
+
margin-left: math.div(2, 16) * 100%;
|
|
61
|
+
}
|
|
55
62
|
}
|
|
56
63
|
}
|
|
57
64
|
|
|
58
65
|
.#{$eccgui}-propertyvalue__property--large {
|
|
59
|
-
|
|
66
|
+
:not(.#{$eccgui}-propertyvalue__pair--singlecolumn) > & {
|
|
67
|
+
width: math.div(5, 16) * 100%;
|
|
60
68
|
|
|
61
|
-
|
|
62
|
-
|
|
69
|
+
& + .#{$eccgui}-propertyvalue__value {
|
|
70
|
+
margin-left: math.div(5, 16) * 100%;
|
|
71
|
+
}
|
|
63
72
|
}
|
|
64
73
|
}
|
|
65
74
|
|
|
@@ -70,7 +79,10 @@
|
|
|
70
79
|
|
|
71
80
|
.#{$eccgui}-propertyvalue__value {
|
|
72
81
|
box-sizing: content-box;
|
|
73
|
-
|
|
82
|
+
|
|
83
|
+
:not(.#{$eccgui}-propertyvalue__pair--singlecolumn) > & {
|
|
84
|
+
margin-left: math.div(3, 16) * 100%;
|
|
85
|
+
}
|
|
74
86
|
|
|
75
87
|
&:not(:last-child) {
|
|
76
88
|
.#{$eccgui}-propertyvalue__pair--hasdivider > & {
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
argTypes: {
|
|
15
15
|
children: {
|
|
16
16
|
control: "none",
|
|
17
|
-
description: "
|
|
17
|
+
description: "Should be one or more `<PropertyValuePair />` elements.",
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
} as Meta<typeof PropertyValueList>;
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
argTypes: {
|
|
17
17
|
children: {
|
|
18
18
|
control: "none",
|
|
19
|
-
description: "
|
|
19
|
+
description: "Should be `<PropertyName/>` and `<PropertyValue/>`, 1 of each.",
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
} as Meta<typeof PropertyValuePair>;
|
|
@@ -296,3 +296,54 @@ table {
|
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
+
|
|
300
|
+
// Highlight spots in text bodies
|
|
301
|
+
|
|
302
|
+
:is(#{$eccgui-selector-text-spot-highlight}) {
|
|
303
|
+
position: relative;
|
|
304
|
+
text-decoration: none;
|
|
305
|
+
transition: text-decoration 2s allow-discrete;
|
|
306
|
+
|
|
307
|
+
&::before {
|
|
308
|
+
position: absolute;
|
|
309
|
+
top: 50%;
|
|
310
|
+
left: 50%;
|
|
311
|
+
width: 0;
|
|
312
|
+
height: 0;
|
|
313
|
+
overflow: hidden;
|
|
314
|
+
content: " ";
|
|
315
|
+
background-color: $eccgui-color-primary;
|
|
316
|
+
opacity: 1;
|
|
317
|
+
transition: all 1s ease-in;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
&:empty {
|
|
321
|
+
&::before {
|
|
322
|
+
border-radius: 100%;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
&:target,
|
|
327
|
+
&.#{$eccgui}-typography--spothighlight {
|
|
328
|
+
text-decoration: underline;
|
|
329
|
+
text-decoration-style: dotted;
|
|
330
|
+
text-decoration-color: $eccgui-color-accent;
|
|
331
|
+
|
|
332
|
+
&::before {
|
|
333
|
+
top: -50%;
|
|
334
|
+
left: -50%;
|
|
335
|
+
width: 200%;
|
|
336
|
+
height: 200%;
|
|
337
|
+
opacity: 0;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
&:empty {
|
|
341
|
+
&::before {
|
|
342
|
+
top: -2.5 * $eccgui-size-block-whitespace;
|
|
343
|
+
left: -2.5 * $eccgui-size-block-whitespace;
|
|
344
|
+
width: 5 * $eccgui-size-block-whitespace;
|
|
345
|
+
height: 5 * $eccgui-size-block-whitespace;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
package/src/components/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from "./Checkbox/Checkbox";
|
|
|
12
12
|
export * from "./ContextOverlay";
|
|
13
13
|
export * from "./Depiction/Depiction";
|
|
14
14
|
export * from "./Dialog";
|
|
15
|
+
export * from "./FlexibleLayout";
|
|
15
16
|
export * from "./Form";
|
|
16
17
|
export * from "./Grid";
|
|
17
18
|
export * from "./HoverToggler/HoverToggler";
|
|
@@ -80,6 +80,10 @@ $eccgui-opacity-invisible: 0 !default;
|
|
|
80
80
|
$eccgui-zindex-modals: 8001 !default; // higher than carbon ui shell header
|
|
81
81
|
$eccgui-zindex-overlays: 10001 !default; // add delta to dialog portals
|
|
82
82
|
|
|
83
|
+
// -- Dynamic selectors --------------------------------------------------------
|
|
84
|
+
|
|
85
|
+
$eccgui-selector-text-spot-highlight: "unknownelement" !default;
|
|
86
|
+
|
|
83
87
|
// -- Calculation of more config vars ------------------------------------------
|
|
84
88
|
|
|
85
89
|
/*
|