Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components: Add Popover #29084

Merged
merged 5 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 37 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
"@wordpress/primitives": "file:../primitives",
"@wordpress/rich-text": "file:../rich-text",
"@wordpress/warning": "file:../warning",
"@wp-g2/components": "^0.0.156",
"@wp-g2/context": "^0.0.156",
"@wp-g2/styles": "^0.0.156",
"@wp-g2/utils": "^0.0.156",
"@wp-g2/components": "^0.0.159",
"@wp-g2/context": "^0.0.159",
"@wp-g2/styles": "^0.0.159",
"@wp-g2/utils": "^0.0.159",
"classnames": "^2.2.5",
"dom-scroll-into-view": "^1.2.1",
"downshift": "^6.0.15",
Expand Down
30 changes: 15 additions & 15 deletions packages/components/src/ui/card/test/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ Snapshot Diff:
title="WordPress.org"
/>
<div
- class="components-card-inner-body wp-components-card-inner-body css-1n7epz"
+ class="components-scrollable wp-components-scrollable components-card-body wp-components-card-body css-1hp1ar"
- class="components-card-inner-body wp-components-card-inner-body ic-b8zmsr ic-192yz5d css-1n7epz"
+ class="components-scrollable wp-components-scrollable components-card-body wp-components-card-body ic-1reds0m ic-y3p1xi ic-192yz5d css-1hp1ar"
data-g2-c16t="true"
- data-g2-component="CardInnerBody"
+ data-g2-component="CardBody"
>
Code is Poetry.
</div>
<div
class="components-flex wp-components-flex components-card-footer wp-components-card-footer css-1qwgs3h"
class="components-flex wp-components-flex components-card-footer wp-components-card-footer ic-i2oc6g ic-17cs4ki ic-192yz5d css-1qwgs3h"
`;

exports[`props should render correctly 1`] = `
Expand Down Expand Up @@ -411,29 +411,29 @@ exports[`props should render correctly 1`] = `
}

<div
class="components-surface wp-components-surface components-card wp-components-card emotion-6"
class="components-surface wp-components-surface components-card wp-components-card ic-1vr61kr ic-15506ld ic-192yz5d emotion-6"
data-g2-c16t="true"
data-g2-component="Card"
>
<div
class="emotion-3"
class="ic-192yz5d emotion-3"
data-g2-component="CardContent"
>
<div
class="components-flex wp-components-flex components-card-header wp-components-card-header emotion-0"
class="components-flex wp-components-flex components-card-header wp-components-card-header ic-1jf72r7 ic-17cs4ki ic-192yz5d emotion-0"
data-g2-c16t="true"
data-g2-component="CardHeader"
title="WordPress.org"
/>
<div
class="components-scrollable wp-components-scrollable components-card-body wp-components-card-body emotion-1"
class="components-scrollable wp-components-scrollable components-card-body wp-components-card-body ic-1reds0m ic-y3p1xi ic-192yz5d emotion-1"
data-g2-c16t="true"
data-g2-component="CardBody"
>
Code is Poetry.
</div>
<div
class="components-flex wp-components-flex components-card-footer wp-components-card-footer emotion-2"
class="components-flex wp-components-flex components-card-footer wp-components-card-footer ic-i2oc6g ic-17cs4ki ic-192yz5d emotion-2"
data-g2-c16t="true"
data-g2-component="CardFooter"
>
Expand All @@ -444,13 +444,13 @@ exports[`props should render correctly 1`] = `
</div>
<div
aria-hidden="true"
class="components-elevation wp-components-elevation emotion-4"
class="components-elevation wp-components-elevation ic-i1zzlu ic-192yz5d emotion-4"
data-g2-c16t="true"
data-g2-component="CardElevation"
/>
<div
aria-hidden="true"
class="components-elevation wp-components-elevation emotion-5"
class="components-elevation wp-components-elevation ic-i1zzlu ic-192yz5d emotion-5"
data-g2-c16t="true"
data-g2-component="CardElevation"
/>
Expand All @@ -463,20 +463,20 @@ Snapshot Diff:
+ Second value

@@ -7,16 +7,16 @@
class="css-1kk7lqu"
class="ic-192yz5d css-1kk7lqu"
data-g2-component="CardContent"
/>
<div
aria-hidden="true"
- class="components-elevation wp-components-elevation css-1vg495v"
+ class="components-elevation wp-components-elevation css-1wkolpp"
- class="components-elevation wp-components-elevation ic-i1zzlu ic-192yz5d css-1vg495v"
+ class="components-elevation wp-components-elevation ic-i1zzlu ic-192yz5d css-1wkolpp"
data-g2-c16t="true"
data-g2-component="CardElevation"
/>
<div
aria-hidden="true"
- class="components-elevation wp-components-elevation css-dgxm8l"
+ class="components-elevation wp-components-elevation css-1zwi7l"
- class="components-elevation wp-components-elevation ic-i1zzlu ic-192yz5d css-dgxm8l"
+ class="components-elevation wp-components-elevation ic-i1zzlu ic-192yz5d css-1zwi7l"
data-g2-c16t="true"
data-g2-component="CardElevation"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,13 @@ exports[`props should render correctly 1`] = `
}

<div
class="components-flex wp-components-flex components-control-group wp-components-control-group emotion-6"
class="components-flex wp-components-flex components-control-group wp-components-control-group ic-s9h86e ic-17cs4ki ic-192yz5d emotion-6"
data-g2-c16t="true"
data-g2-component="ControlGroup"
>
<button
aria-busy="false"
class="components-flex wp-components-flex components-base-button wp-components-base-button components-button wp-components-button emotion-2"
class="components-flex wp-components-flex ic-17cs4ki components-base-button wp-components-base-button components-button wp-components-button ic-i0z4gr ic-1d6ec17 ic-192yz5d emotion-2"
data-active="false"
data-destructive="false"
data-focused="false"
Expand All @@ -356,21 +356,21 @@ exports[`props should render correctly 1`] = `
data-icon="false"
>
<span
class="components-flex-item wp-components-flex-item emotion-0"
class="components-flex-item wp-components-flex-item ic-1p3tlc8 ic-192yz5d emotion-0"
data-g2-c16t="true"
data-g2-component="ButtonContent"
>
Code is Poetry
</span>
<span
class="components-elevation wp-components-elevation emotion-1"
class="components-elevation wp-components-elevation ic-i1zzlu ic-192yz5d emotion-1"
data-g2-c16t="true"
data-g2-component="ButtonElevation"
/>
</button>
<button
aria-busy="false"
class="components-flex wp-components-flex components-base-button wp-components-base-button components-button wp-components-button emotion-2"
class="components-flex wp-components-flex ic-17cs4ki components-base-button wp-components-base-button components-button wp-components-button ic-i0z4gr ic-1d6ec17 ic-192yz5d emotion-2"
data-active="false"
data-destructive="false"
data-focused="false"
Expand All @@ -379,14 +379,14 @@ exports[`props should render correctly 1`] = `
data-icon="false"
>
<span
class="components-flex-item wp-components-flex-item emotion-0"
class="components-flex-item wp-components-flex-item ic-1p3tlc8 ic-192yz5d emotion-0"
data-g2-c16t="true"
data-g2-component="ButtonContent"
>
WordPress.org
</span>
<span
class="components-elevation wp-components-elevation emotion-1"
class="components-elevation wp-components-elevation ic-i1zzlu ic-192yz5d emotion-1"
data-g2-c16t="true"
data-g2-component="ButtonElevation"
/>
Expand Down Expand Up @@ -1229,33 +1229,33 @@ exports[`props should render mixed control types 1`] = `
}

<div
class="components-flex wp-components-flex components-control-group wp-components-control-group emotion-10"
class="components-flex wp-components-flex components-control-group wp-components-control-group ic-s9h86e ic-17cs4ki ic-192yz5d emotion-10"
data-g2-c16t="true"
data-g2-component="ControlGroup"
>
<div
class="components-flex wp-components-flex components-base-field wp-components-base-field components-select wp-components-select emotion-4"
class="components-flex wp-components-flex components-base-field wp-components-base-field ic-172ogxm ic-17cs4ki components-select wp-components-select ic-gutgg1 ic-192yz5d emotion-4"
data-g2-c16t="true"
data-g2-component="SelectWrapper"
>
<select
class="emotion-0"
class="ic-192yz5d emotion-0"
data-g2-c16t="true"
data-g2-component="Select"
id="salutations"
/>
<div
class="components-flex-item wp-components-flex-item emotion-3"
class="components-flex-item wp-components-flex-item ic-knvlgp ic-192yz5d ic-1p3tlc8 ic-192yz5d emotion-3"
data-g2-c16t="true"
data-g2-component="FlexItem"
>
<span
class="components-truncate wp-components-truncate components-text wp-components-text emotion-2"
class="components-truncate wp-components-truncate components-text wp-components-text ic-7u3orf ic-1m45iq3 ic-192yz5d emotion-2"
data-g2-c16t="true"
data-g2-component="Text"
>
<div
class="components-icon wp-components-icon emotion-1"
class="components-icon wp-components-icon ic-2q44rw ic-192yz5d emotion-1"
data-g2-c16t="true"
data-g2-component="Icon"
>
Expand All @@ -1278,13 +1278,13 @@ exports[`props should render mixed control types 1`] = `
</div>
</div>
<div
class="components-flex wp-components-flex components-base-field wp-components-base-field components-text-input wp-components-text-input emotion-6"
class="components-flex wp-components-flex components-base-field wp-components-base-field ic-172ogxm ic-17cs4ki components-text-input wp-components-text-input ic-19funlj ic-192yz5d emotion-6"
data-g2-c16t="true"
data-g2-component="TextInputWrapper"
>
<input
autocomplete="off"
class="emotion-5"
class="ic-192yz5d emotion-5"
data-g2-c16t="true"
data-g2-component="TextInput"
id="fname"
Expand All @@ -1295,7 +1295,7 @@ exports[`props should render mixed control types 1`] = `
</div>
<button
aria-busy="false"
class="components-flex wp-components-flex components-base-button wp-components-base-button components-button wp-components-button emotion-9"
class="components-flex wp-components-flex ic-17cs4ki components-base-button wp-components-base-button components-button wp-components-button ic-i0z4gr ic-1d6ec17 ic-192yz5d emotion-9"
data-active="false"
data-destructive="false"
data-focused="false"
Expand All @@ -1304,14 +1304,14 @@ exports[`props should render mixed control types 1`] = `
data-icon="false"
>
<span
class="components-flex-item wp-components-flex-item emotion-7"
class="components-flex-item wp-components-flex-item ic-1p3tlc8 ic-192yz5d emotion-7"
data-g2-c16t="true"
data-g2-component="ButtonContent"
>
Code is Poetry
</span>
<span
class="components-elevation wp-components-elevation emotion-8"
class="components-elevation wp-components-elevation ic-i1zzlu ic-192yz5d emotion-8"
data-g2-c16t="true"
data-g2-component="ButtonElevation"
/>
Expand Down
Loading