Skip to content

Commit 09e29c3

Browse files
BREAKING CHANGE: Change 'border' attribute to 'standalone' (#714)
* change border to standalone and add missing attr JSDocs * fix stories * remove random s from uui-ref-node.story.ts --------- Co-authored-by: Niels Lyngsø <[email protected]>
1 parent b134f77 commit 09e29c3

File tree

8 files changed

+43
-31
lines changed

8 files changed

+43
-31
lines changed

packages/uui-ref-node-data-type/lib/uui-ref-node-data-type.story.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,25 @@ CustomIcon.parameters = {
8181
},
8282
};
8383

84-
export const Border: Story = () => html`
84+
export const Standalone: Story = () => html`
8585
<div style="max-width: 420px;">
86-
<uui-ref-node-data-type border name="TextField" alias="Umbraco.TextField">
86+
<uui-ref-node-data-type
87+
standalone
88+
name="TextField"
89+
alias="Umbraco.TextField">
8790
<uui-action-bar slot="actions">
8891
<uui-button label="Remove">Remove</uui-button>
8992
</uui-action-bar>
9093
</uui-ref-node-data-type>
9194
</div>
9295
`;
9396

94-
Border.parameters = {
97+
Standalone.parameters = {
9598
docs: {
9699
source: {
97100
code: `
98101
<uui-ref-node-data-type
99-
border
102+
standalone
100103
name="TextField"
101104
alias="Umbraco.TextField">
102105
<uui-action-bar slot="actions">

packages/uui-ref-node-document-type/lib/uui-ref-node-document-type.story.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,25 @@ CustomIcon.parameters = {
8181
},
8282
};
8383

84-
export const Border: Story = () => html`
84+
export const Standalone: Story = () => html`
8585
<div style="max-width: 420px;">
86-
<uui-ref-node-document-type border name="Product Page" alias="productPage">
86+
<uui-ref-node-document-type
87+
standalone
88+
name="Product Page"
89+
alias="productPage">
8790
<uui-action-bar slot="actions">
8891
<uui-button label="Remove">Remove</uui-button>
8992
</uui-action-bar>
9093
</uui-ref-node-document-type>
9194
</div>
9295
`;
9396

94-
Border.parameters = {
97+
Standalone.parameters = {
9598
docs: {
9699
source: {
97100
code: `
98101
<uui-ref-node-document-type
99-
border
102+
standalone
100103
name="Product Page"
101104
alias="productPage">
102105
<uui-action-bar slot="actions">

packages/uui-ref-node-form/lib/uui-ref-node-form.story.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ CustomIcon.parameters = {
8282
},
8383
};
8484

85-
export const Border: Story = () => html`
85+
export const Standalone: Story = () => html`
8686
<div style="max-width: 420px;">
8787
<uui-ref-node-form
88-
border
88+
standalone
8989
name="Newsletter Signup"
9090
detail="Signup for newsletter">
9191
<uui-action-bar slot="actions">
@@ -95,12 +95,12 @@ export const Border: Story = () => html`
9595
</div>
9696
`;
9797

98-
Border.parameters = {
98+
Standalone.parameters = {
9999
docs: {
100100
source: {
101101
code: `
102102
<uui-ref-node-form
103-
border
103+
standalone
104104
name="Newsletter Signup"
105105
detail="Signup for newsletter">
106106
<uui-action-bar slot="actions">

packages/uui-ref-node-member/lib/uui-ref-node-member.story.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ CustomIcon.parameters = {
8383
},
8484
};
8585

86-
export const Border: Story = () => html`
86+
export const Standalone: Story = () => html`
8787
<div style="max-width: 420px;">
8888
<uui-ref-node-member
89-
border
89+
standalone
9090
name="Arnold Vitz"
9191
group-name="Visitor, Registered-Member">
9292
<uui-action-bar slot="actions">
@@ -96,12 +96,12 @@ export const Border: Story = () => html`
9696
</div>
9797
`;
9898

99-
Border.parameters = {
99+
Standalone.parameters = {
100100
docs: {
101101
source: {
102102
code: `
103103
<uui-ref-node-member
104-
border
104+
standalone
105105
name="Arnold Vitz"
106106
group-name="Visitor, Registered-Member">
107107
<uui-action-bar slot="actions">

packages/uui-ref-node-package/lib/uui-ref-node-package.story.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ CustomIcon.parameters = {
9393
},
9494
};
9595

96-
export const Border: Story = () => html`
96+
export const Standalone: Story = () => html`
9797
<div style="max-width: 420px;">
9898
<uui-ref-node-package
99-
border
99+
standalone
100100
name="Umbraco Starter Kit"
101101
version="1.1"
102102
author="Umbraco HQ">
@@ -110,12 +110,12 @@ export const Border: Story = () => html`
110110
</div>
111111
`;
112112

113-
Border.parameters = {
113+
Standalone.parameters = {
114114
docs: {
115115
source: {
116116
code: `
117117
<uui-ref-node-package
118-
border
118+
standalone
119119
name="Umbraco Starter Kit"
120120
version="1.1"
121121
author="Umbraco HQ">

packages/uui-ref-node-user/lib/uui-ref-node-user.story.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ CustomIcon.parameters = {
8181
},
8282
};
8383

84-
export const Border: Story = () => html`
84+
export const Standalone: Story = () => html`
8585
<div style="max-width: 420px;">
8686
<uui-ref-node-user
87-
border
87+
standalone
8888
name="Arnold Edits"
8989
group-name="Editor, Translator">
9090
<uui-action-bar slot="actions">
@@ -94,12 +94,12 @@ export const Border: Story = () => html`
9494
</div>
9595
`;
9696

97-
Border.parameters = {
97+
Standalone.parameters = {
9898
docs: {
9999
source: {
100100
code: `
101101
<uui-ref-node-user
102-
border
102+
standalone
103103
name="Arnold Edits"
104104
group-name="Editor, Translator"
105105
<uui-action-bar slot="actions">

packages/uui-ref-node/lib/uui-ref-node.story.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,11 @@ CustomIcon.parameters = {
9191
},
9292
};
9393

94-
export const Border: Story = () => html`
95-
<uui-ref-node border name="Rabbit Suit Product Page" detail="path/to/nowhere">
94+
export const Standalone: Story = () => html`
95+
<uui-ref-node
96+
standalone
97+
name="Rabbit Suit Product Page"
98+
detail="path/to/nowhere">
9699
<uui-tag size="s" slot="tag" color="positive">Published</uui-tag>
97100
<uui-action-bar slot="actions">
98101
<uui-button type="button" label="Delete"
@@ -102,12 +105,12 @@ export const Border: Story = () => html`
102105
</uui-ref-node>
103106
`;
104107

105-
Border.parameters = {
108+
Standalone.parameters = {
106109
docs: {
107110
source: {
108111
code: `
109112
<uui-ref-node
110-
border
113+
standalone
111114
name="Rabbit Suit Product Page"
112115
detail="path/to/nowhere">
113116
<uui-tag size="s" slot="tag" color="positive" >Published</uui-tag>

packages/uui-ref/lib/uui-ref.element.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ import { UUIRefEvent } from './UUIRefEvent';
1313
* @fires {UUISelectableEvent} selected - fires when the ref is selected
1414
* @fires {UUISelectableEvent} deselected - fires when the ref is deselected
1515
* @description - Base ref component to be extended by specific ref elements. Does not have a tag.
16+
* @attr {boolean} [disabled=false] - Set to true to disable
17+
* @attr {boolean} [error=false] - Set to true to display error state
18+
* @attr {boolean} [standalone=false] - Set to true to make element stand out
1619
*/
1720

1821
@defineElement('uui-ref')
@@ -76,7 +79,7 @@ export class UUIRefElement extends SelectOnlyMixin(
7679
inset 0 0 2px 0 var(--uui-color-danger);
7780
}
7881
79-
:host([border]) {
82+
:host([standalone]) {
8083
border: 1px solid var(--uui-color-border);
8184
}
8285
@@ -179,15 +182,15 @@ export class UUIRefElement extends SelectOnlyMixin(
179182
opacity: 1;
180183
}
181184
182-
:host([border]:not([disabled]):hover) {
185+
:host([standalone]:not([disabled]):hover) {
183186
border-color: var(--uui-color-border-emphasis);
184187
}
185188
186189
:host([disabled]) #open-part {
187190
cursor: default;
188191
}
189192
190-
:host([border][disabled]) {
193+
:host([standalone][disabled]) {
191194
border-color: var(--uui-color-disabled-standalone);
192195
}
193196

0 commit comments

Comments
 (0)