@coolon/angular-ui-powerups 12.4.0-alpha.34 → 12.4.0-alpha.36

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.
@@ -1,6 +1,6 @@
1
1
  @mixin floating-label-style() {
2
2
  font-weight: 400;
3
- font-size: calc(14px * .75);
3
+ font-size: calc(1em * .75);
4
4
  color: rgba(0, 0, 0, 0.57);
5
5
  white-space: nowrap;
6
6
  }
@@ -1,50 +1,67 @@
1
1
  @use "../../forms/mixins";
2
+ @use "~@angular/material/core/typography/typography-utils";
2
3
 
3
- aup-inline-string-editor {
4
- display: inline-block;
4
+ @mixin apply-theme($color-config, $typography-config) {
5
5
 
6
- .content {
6
+ aup-inline-string-editor {
7
+ display: inline-block;
7
8
 
8
- display: grid;
9
- grid-template-areas: "label edit-control" "content edit-control";
10
- grid-template-columns: 1fr auto;
11
- grid-template-rows: 26px 24px;
9
+ .content {
10
+ position: relative;
11
+ display: grid;
12
+ grid-template-areas: "label edit-control" "content edit-control";
13
+ grid-template-columns: 1fr auto;
14
+ grid-template-rows: auto;
12
15
 
13
- > label {
14
- grid-area: label;
15
- align-self: end;
16
- @include mixins.floating-label-style();
17
- }
16
+ font-size: typography-utils.font-size($typography-config, input);
18
17
 
19
- > p {
20
- grid-area: content;
21
- //height: 42px;
22
- box-sizing: border-box;
23
- font-size: 14px;
24
- font-weight: 400;
25
- flex: 1;
26
- padding: 1px 0 0 0;
27
- margin: 0;
28
-
29
- &.editing-enabled {
30
- cursor: pointer;
31
- }
18
+ //box-sizing: border-box;
19
+ // copied from mat input...
20
+ border-top: 0.84375em solid transparent;
21
+ padding-bottom: 1.34375em;
22
+
23
+ $top-padding-tweak: 1px;
24
+ padding-top: $top-padding-tweak;
32
25
 
33
- &.place-holder {
34
- color: rgba(0,0,0,0.5); // TODO: get the angular theme value for disabled form elements...
26
+ > label {
27
+ position: absolute;
28
+ transform: translateY(-100%);
29
+ @include mixins.floating-label-style();
35
30
  }
36
31
 
37
- }
32
+ > p {
33
+ grid-area: content;
34
+ @include typography-utils.typography-level($typography-config, input);
35
+
36
+ // copied from mat input...
37
+ padding: 0.5em 0;
38
+ margin: -0.0625em 0 0 0;
38
39
 
39
- &:hover {
40
+ box-sizing: border-box;
41
+ flex: 1;
42
+
43
+ &.editing-enabled {
44
+ cursor: pointer;
45
+ }
46
+
47
+ &.place-holder {
48
+ color: rgba(0,0,0,0.5); // TODO: get the angular theme value for disabled form elements...
49
+ }
50
+
51
+ }
52
+
53
+ &:hover {
40
54
  //background-color: rgba(0, 0, 0, 0.03);
41
- }
55
+ }
42
56
 
43
- > aup-command {
44
- grid-area: edit-control;
45
- align-self: end;
46
- transform: translateY(3px); // hack to line up with activity actions...!
57
+ > aup-command {
58
+ grid-area: edit-control;
59
+ align-self: end;
60
+ transform: translateY(3px); // hack to line up with activity actions...!
61
+ }
47
62
  }
48
63
  }
49
-
50
64
  }
65
+
66
+
67
+
@@ -3,6 +3,11 @@
3
3
  @use "./interaction/editor/inline-string-editor";
4
4
  @use "./interaction/input-activity";
5
5
 
6
+ @mixin apply-theme($color-config, $typography-config) {
7
+ @include inline-string-editor.apply-theme($color-config, $typography-config)
8
+ }
9
+
10
+
6
11
  .dialog-interaction-context {
7
12
  max-width: 95vw !important;
8
13
  max-height: 95vh !important;
@@ -29,6 +29,7 @@
29
29
 
30
30
  @include activities.apply-theme($color-config, $typography);
31
31
  @include cards.apply-theme($color-config, $typography);
32
+ @include interaction.apply-theme($color-config, $typography);
32
33
 
33
34
  :root {
34
35
  --aup-default-padding: var(--default-padding, 16px);
@@ -6923,7 +6923,7 @@
6923
6923
  exports.InlineStringEditorComponent.decorators = [
6924
6924
  { type: i0.Component, args: [{
6925
6925
  selector: 'aup-inline-string-editor',
6926
- template: "<ng-container *ngIf=\"!editorModel.isEditing()\">\n <div class=\"content\" [class.editable]=\"editCommand.enabled.value\">\n <label>{{label}}</label>\n <p [class.place-holder]=\"empty.value\" [class.editing-enabled]=\"editingEnabled.value\" (click)=\"editCommand.execute()\">{{displayValue.value}}</p>\n <aup-command *ngIf=\"editCommand.enabled.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n </div>\n</ng-container>\n<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n\n"
6926
+ template: "<ng-container *ngIf=\"!editorModel.isEditing()\">\n <div class=\"content\" [class.editable]=\"editCommand.enabled.value\">\n <label>{{label}}</label>\n <p [class.place-holder]=\"empty.value\" [class.editing-enabled]=\"editingEnabled.value\" (click)=\"startEdit()\">{{displayValue.value}}</p>\n <aup-command *ngIf=\"editCommand.enabled.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n </div>\n</ng-container>\n<aup-in-place-interaction-context [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n"
6927
6927
  },] }
6928
6928
  ];
6929
6929
  exports.InlineStringEditorComponent.ctorParameters = function () { return [