@umbraco-ui/uui-card 0.1.1 → 1.0.0-alpha.0

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 (2) hide show
  1. package/lib/index.js +19 -44
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -52,26 +52,35 @@ UUICardElement.styles = [
52
52
  box-shadow: var(--uui-shadow-depth-1,0 1px 3px rgba(0,0,0,0.12) , 0 1px 2px rgba(0,0,0,0.24));
53
53
  border-radius: var(--uui-border-radius,3px);
54
54
  min-height: var(--uui-layout-medium);
55
- background-color: var(--uui-interface-surface,#fefefe);
55
+ background-color: var(--uui-color-surface,#fff);
56
56
  --uui-card-border-width: 3px;
57
57
  transition: box-shadow 100ms ease-out;
58
58
  }
59
59
 
60
60
  :host(*) * {
61
61
  /* TODO: implement globally shared outline style */
62
- outline-color: var(--uui-interface-outline,#3879ff);
62
+ outline-color: var(--uui-color-focus,#3879ff);
63
63
  outline-offset: 4px;
64
64
  }
65
65
 
66
66
  :host(:focus) {
67
- outline-color: var(--uui-interface-outline,#3879ff);
67
+ outline-color: var(--uui-color-focus,#3879ff);
68
68
  outline-width: var(--uui-card-border-width);
69
69
  outline-style: solid;
70
70
  outline-offset: var(--uui-card-border-width);
71
71
  }
72
72
 
73
- :host([error]) {
74
- border: var(--uui-card-border-width) solid var(--uui-look-danger-border,#d42054);
73
+ :host([error])::before {
74
+ content: '';
75
+ position: absolute;
76
+ pointer-events: none;
77
+ inset: 0;
78
+ width: 100%;
79
+ height: 100%;
80
+ z-index: 1;
81
+ box-sizing: border-box;
82
+ border: var(--uui-card-border-width) solid var(--uui-color-danger,#d42054);
83
+ border-radius: var(--uui-border-radius,3px);
75
84
  }
76
85
 
77
86
  :host([selectable]) {
@@ -79,8 +88,8 @@ UUICardElement.styles = [
79
88
  }
80
89
 
81
90
  :host([disabled]) {
82
- background: var(--uui-interface-surface-disabled,rgb(228, 228, 228));
83
- color: var(--uui-interface-contrast-disabled,rgb(115, 113, 110));
91
+ background: var(--uui-color-disabled,#f3f3f5);
92
+ color: var(--uui-color-disabled-contrast,#c4c4c4);
84
93
  }
85
94
 
86
95
  :host([selectable])::after {
@@ -88,10 +97,10 @@ UUICardElement.styles = [
88
97
  position: absolute;
89
98
  pointer-events: none;
90
99
  inset: calc(var(--uui-card-border-width) * -1);
91
- width: calc(100% + var(--uui-card-border-width) * 2);
92
- height: calc(100% + var(--uui-card-border-width) * 2);
100
+ width: calc(100% + calc(var(--uui-card-border-width) * 2));
101
+ height: calc(100% + calc(var(--uui-card-border-width) * 2));
93
102
  box-sizing: border-box;
94
- border: var(--uui-card-border-width) solid var(--uui-interface-select,#3544b1);
103
+ border: var(--uui-card-border-width) solid var(--uui-color-selected,#3544b1);
95
104
  border-radius: calc(
96
105
  var(--uui-border-radius,3px) + var(--uui-card-border-width)
97
106
  );
@@ -108,40 +117,6 @@ UUICardElement.styles = [
108
117
  opacity: 1;
109
118
  }
110
119
 
111
- :host([selectable]:not([selected]):hover) #select-border::after {
112
- animation: not-selected--hover 1.2s infinite;
113
- }
114
- @keyframes not-selected--hover {
115
- 0%,
116
- 100% {
117
- opacity: 0.66;
118
- }
119
- 50% {
120
- opacity: 1;
121
- }
122
- }
123
-
124
- :host([selectable][selected]:hover) #select-border::after {
125
- animation: selected--hover 1.4s infinite;
126
- }
127
- @keyframes selected--hover {
128
- 0%,
129
- 100% {
130
- opacity: 1;
131
- }
132
- 50% {
133
- opacity: 0.66;
134
- }
135
- }
136
- :host([selectable]) #open-part:hover + #select-border::after {
137
- animation: none;
138
- }
139
- :host([error])::after {
140
- inset: calc(var(--uui-card-border-width) * -2);
141
- width: calc(100% + calc(var(--uui-card-border-width) * 4));
142
- height: calc(100% + calc(var(--uui-card-border-width) * 4));
143
- }
144
-
145
120
  :host([select-only]) *,
146
121
  :host([select-only]) ::slotted(*) {
147
122
  pointer-events: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-card",
3
- "version": "0.1.1",
3
+ "version": "1.0.0-alpha.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Umbraco",
@@ -30,7 +30,7 @@
30
30
  "custom-elements.json"
31
31
  ],
32
32
  "dependencies": {
33
- "@umbraco-ui/uui-base": "0.1.1"
33
+ "@umbraco-ui/uui-base": "1.0.0-alpha.0"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
@@ -41,5 +41,5 @@
41
41
  "access": "public"
42
42
  },
43
43
  "homepage": "https://uui.umbraco.com/?path=/story/uui-card",
44
- "gitHead": "d91d346a0659f52de2a3c4746065c554f95e6328"
44
+ "gitHead": "7d7608bf2fb63a8a077fcd8f0346dea73584b878"
45
45
  }