@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.
Files changed (68) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +8 -2
  3. package/dist/cjs/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
  4. package/dist/cjs/components/FlexibleLayout/FlexibleLayoutContainer.js +55 -0
  5. package/dist/cjs/components/FlexibleLayout/FlexibleLayoutContainer.js.map +1 -0
  6. package/dist/cjs/components/FlexibleLayout/FlexibleLayoutItem.js +57 -0
  7. package/dist/cjs/components/FlexibleLayout/FlexibleLayoutItem.js.map +1 -0
  8. package/dist/cjs/components/FlexibleLayout/index.js +19 -0
  9. package/dist/cjs/components/FlexibleLayout/index.js.map +1 -0
  10. package/dist/cjs/components/Icon/canonicalIconNames.js +2 -2
  11. package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
  12. package/dist/cjs/components/Label/Label.js +2 -2
  13. package/dist/cjs/components/Label/Label.js.map +1 -1
  14. package/dist/cjs/components/PropertyValuePair/PropertyValueList.js +12 -2
  15. package/dist/cjs/components/PropertyValuePair/PropertyValueList.js.map +1 -1
  16. package/dist/cjs/components/PropertyValuePair/PropertyValuePair.js +3 -2
  17. package/dist/cjs/components/PropertyValuePair/PropertyValuePair.js.map +1 -1
  18. package/dist/cjs/components/index.js +1 -0
  19. package/dist/cjs/components/index.js.map +1 -1
  20. package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js +8 -2
  21. package/dist/esm/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.js.map +1 -1
  22. package/dist/esm/components/FlexibleLayout/FlexibleLayoutContainer.js +40 -0
  23. package/dist/esm/components/FlexibleLayout/FlexibleLayoutContainer.js.map +1 -0
  24. package/dist/esm/components/FlexibleLayout/FlexibleLayoutItem.js +42 -0
  25. package/dist/esm/components/FlexibleLayout/FlexibleLayoutItem.js.map +1 -0
  26. package/dist/esm/components/FlexibleLayout/index.js +3 -0
  27. package/dist/esm/components/FlexibleLayout/index.js.map +1 -0
  28. package/dist/esm/components/Icon/canonicalIconNames.js +2 -2
  29. package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
  30. package/dist/esm/components/Label/Label.js +2 -2
  31. package/dist/esm/components/Label/Label.js.map +1 -1
  32. package/dist/esm/components/PropertyValuePair/PropertyValueList.js +12 -2
  33. package/dist/esm/components/PropertyValuePair/PropertyValueList.js.map +1 -1
  34. package/dist/esm/components/PropertyValuePair/PropertyValuePair.js +3 -2
  35. package/dist/esm/components/PropertyValuePair/PropertyValuePair.js.map +1 -1
  36. package/dist/esm/components/index.js +1 -0
  37. package/dist/esm/components/index.js.map +1 -1
  38. package/dist/types/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.d.ts +5 -1
  39. package/dist/types/components/FlexibleLayout/FlexibleLayoutContainer.d.ts +31 -0
  40. package/dist/types/components/FlexibleLayout/FlexibleLayoutItem.d.ts +24 -0
  41. package/dist/types/components/FlexibleLayout/index.d.ts +2 -0
  42. package/dist/types/components/Label/Label.d.ts +5 -1
  43. package/dist/types/components/PropertyValuePair/PropertyValueList.d.ts +8 -2
  44. package/dist/types/components/PropertyValuePair/PropertyValuePair.d.ts +5 -1
  45. package/dist/types/components/index.d.ts +1 -0
  46. package/package.json +1 -1
  47. package/src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx +17 -7
  48. package/src/cmem/markdown/markdown.scss +6 -3
  49. package/src/cmem/markdown/markdown.utils.ts +18 -0
  50. package/src/cmem/markdown/markdownutils.test.ts +13 -0
  51. package/src/components/FlexibleLayout/FlexibleLayoutContainer.tsx +67 -0
  52. package/src/components/FlexibleLayout/FlexibleLayoutItem.tsx +59 -0
  53. package/src/components/FlexibleLayout/flexiblelayout.scss +48 -0
  54. package/src/components/FlexibleLayout/index.ts +2 -0
  55. package/src/components/FlexibleLayout/stories/FlexibleLayoutContainer.stories.tsx +31 -0
  56. package/src/components/FlexibleLayout/stories/FlexibleLayoutItem.stories.tsx +28 -0
  57. package/src/components/Icon/canonicalIconNames.tsx +2 -2
  58. package/src/components/Label/Label.tsx +6 -1
  59. package/src/components/Label/label.scss +6 -0
  60. package/src/components/PropertyValuePair/PropertyValueList.tsx +26 -3
  61. package/src/components/PropertyValuePair/PropertyValuePair.tsx +7 -1
  62. package/src/components/PropertyValuePair/propertyvalue.scss +25 -13
  63. package/src/components/PropertyValuePair/stories/PropertyValueList.stories.tsx +1 -1
  64. package/src/components/PropertyValuePair/stories/PropertyValuePair.stories.tsx +1 -1
  65. package/src/components/Typography/typography.scss +51 -0
  66. package/src/components/index.scss +1 -0
  67. package/src/components/index.ts +1 -0
  68. 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
- min-height: $eccgui-size-textfield-height-regular;
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
- float: left;
42
- width: math.div(3, 16) * 100%;
43
- overflow: hidden;
44
+ :not(.#{$eccgui}-propertyvalue__pair--singlecolumn) > & {
45
+ float: left;
46
+ width: math.div(3, 16) * 100%;
47
+ overflow: hidden;
44
48
 
45
- & > div {
46
- margin-right: $eccgui-size-block-whitespace;
49
+ & > div {
50
+ margin-right: $eccgui-size-block-whitespace;
51
+ }
47
52
  }
48
53
  }
49
54
 
50
55
  .#{$eccgui}-propertyvalue__property--small {
51
- width: math.div(2, 16) * 100%;
56
+ :not(.#{$eccgui}-propertyvalue__pair--singlecolumn) > & {
57
+ width: math.div(2, 16) * 100%;
52
58
 
53
- & + .#{$eccgui}-propertyvalue__value {
54
- margin-left: math.div(2, 16) * 100%;
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
- width: math.div(5, 16) * 100%;
66
+ :not(.#{$eccgui}-propertyvalue__pair--singlecolumn) > & {
67
+ width: math.div(5, 16) * 100%;
60
68
 
61
- & + .#{$eccgui}-propertyvalue__value {
62
- margin-left: math.div(5, 16) * 100%;
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
- margin-left: math.div(3, 16) * 100%;
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: "Shoukd be one or more `<PropertyValuePair />` elements.",
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: "Shoukd be `<PropertyName/>` and `<PropertyValue/>`, 1 of each.",
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
+ }
@@ -6,6 +6,7 @@
6
6
  @import "./Checkbox/checkbox";
7
7
  @import "./Depiction/depiction";
8
8
  @import "./Dialog/dialog";
9
+ @import "./FlexibleLayout/flexiblelayout";
9
10
  @import "./Form/form";
10
11
  @import "./Grid/grid";
11
12
  @import "./HoverToggler/hovertoggler";
@@ -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
  /*