@umbraco-ui/uui-ref-node 1.16.0 → 1.17.0-rc.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.
package/lib/index.js CHANGED
@@ -3,7 +3,7 @@ import { demandCustomElement } from '@umbraco-ui/uui-base/lib/utils';
3
3
  import { ifDefined } from 'lit/directives/if-defined.js';
4
4
  import { UUIRefElement } from '@umbraco-ui/uui-ref/lib';
5
5
  import { css, html, nothing } from 'lit';
6
- import { property, state } from 'lit/decorators.js';
6
+ import { property, query, state } from 'lit/decorators.js';
7
7
 
8
8
  var __defProp = Object.defineProperty;
9
9
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -46,6 +46,10 @@ let UUIRefNodeElement = class extends UUIRefElement {
46
46
  super.connectedCallback();
47
47
  demandCustomElement(this, "uui-icon");
48
48
  }
49
+ async focus() {
50
+ await this.updateComplete;
51
+ this._openPart?.focus();
52
+ }
49
53
  renderDetail() {
50
54
  return html`<small id="detail"
51
55
  >${this.detail}<slot name="detail"></slot
@@ -128,12 +132,17 @@ UUIRefNodeElement.styles = [
128
132
  padding: 1px;
129
133
  }
130
134
 
135
+ #actions-container {
136
+ --uui-focus-outline-color: var(--uui-color-focus,#3879ff);
137
+ }
138
+
131
139
  #content {
132
140
  display: flex;
133
141
  flex-grow: 1;
134
142
  align-items: center;
135
143
  line-height: 1.2em;
136
144
  padding: calc(var(--uui-size-3,9px));
145
+ width: calc(100% - 2 * var(--uui-size-3,9px));
137
146
  }
138
147
 
139
148
  #open-part {
@@ -142,6 +151,8 @@ UUIRefNodeElement.styles = [
142
151
  cursor: pointer;
143
152
  display: flex;
144
153
  flex-grow: 1;
154
+ width: calc(100%);
155
+ margin: 0 0 1px 0;
145
156
  }
146
157
 
147
158
  #icon {
@@ -159,12 +170,17 @@ UUIRefNodeElement.styles = [
159
170
  justify-content: center;
160
171
  height: 100%;
161
172
  padding-left: var(--uui-size-2,6px);
173
+ max-width: calc(100% - 2 * var(--uui-size-3,9px) - var(--uui-size-2,6px));
162
174
  margin-top: 1px;
163
175
  }
164
176
 
165
177
  #detail {
166
178
  opacity: 0.6;
167
179
  line-height: 1.2em;
180
+ text-overflow: ellipsis;
181
+ overflow: hidden;
182
+ white-space: nowrap;
183
+ max-width: calc(100%);
168
184
  }
169
185
 
170
186
  :host([selectable]) #open-part {
@@ -214,6 +230,9 @@ __decorateClass([
214
230
  __decorateClass([
215
231
  property({ type: String })
216
232
  ], UUIRefNodeElement.prototype, "rel", 2);
233
+ __decorateClass([
234
+ query("#open-part")
235
+ ], UUIRefNodeElement.prototype, "_openPart", 2);
217
236
  __decorateClass([
218
237
  state()
219
238
  ], UUIRefNodeElement.prototype, "_iconSlotHasContent", 2);
@@ -47,11 +47,13 @@ export declare class UUIRefNodeElement extends UUIRefElement {
47
47
  * @default undefined
48
48
  */
49
49
  rel?: string;
50
+ protected _openPart?: HTMLInputElement;
50
51
  private _iconSlotHasContent;
51
52
  protected fallbackIcon: string;
52
53
  connectedCallback(): void;
53
- protected renderDetail(): import("lit-html").TemplateResult<1>;
54
- render(): import("lit-html").TemplateResult<1>;
54
+ focus(): Promise<void>;
55
+ protected renderDetail(): import("lit").TemplateResult<1>;
56
+ render(): import("lit").TemplateResult<1>;
55
57
  static styles: import("lit").CSSResult[];
56
58
  }
57
59
  declare global {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ui/uui-ref-node",
3
- "version": "1.16.0",
3
+ "version": "1.17.0-rc.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "Umbraco",
@@ -30,9 +30,9 @@
30
30
  "custom-elements.json"
31
31
  ],
32
32
  "dependencies": {
33
- "@umbraco-ui/uui-base": "1.16.0",
34
- "@umbraco-ui/uui-icon": "1.16.0",
35
- "@umbraco-ui/uui-ref": "1.16.0"
33
+ "@umbraco-ui/uui-base": "1.17.0-rc.0",
34
+ "@umbraco-ui/uui-icon": "1.17.0-rc.0",
35
+ "@umbraco-ui/uui-ref": "1.17.0-rc.0"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "npm run analyze && tsc --build && rollup -c rollup.config.js",
@@ -43,5 +43,5 @@
43
43
  "access": "public"
44
44
  },
45
45
  "homepage": "https://uui.umbraco.com/?path=/story/uui-ref-node",
46
- "gitHead": "40e9bb97938eed758af1bc3852b2c2a015f87de6"
46
+ "gitHead": "028e20bd07ebf02164589b086e746c9cc587409c"
47
47
  }