Skip to content

Commit

Permalink
Merge branch 'main' into dropdown-pcss
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrohan authored Nov 14, 2022
2 parents 5a4eca7 + 62dd946 commit 8aec239
Show file tree
Hide file tree
Showing 19 changed files with 350 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"@primer/view-components": patch
---

Move labels styles to PVC
Move `Popover` styles to PVC
5 changes: 0 additions & 5 deletions .changeset/cool-kiwis-laugh.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fast-spies-fry.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/hip-zebras-remain.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/many-turtles-taste.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/rare-birds-heal.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/silent-starfishes-shake.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"@primer/view-components": patch
---

Move `Subhead` styles to PVC
Move `TimelineItem` styles to PVC
5 changes: 0 additions & 5 deletions .changeset/slow-grapes-dance.md

This file was deleted.

22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# CHANGELOG

## 0.0.110

### Patch Changes

- [#1583](https://github.com/primer/view_components/pull/1583) [`a06f52cf`](https://github.com/primer/view_components/commit/a06f52cf77eff76f5a9003a9b224dc425de78f4b) Thanks [@jonrohan](https://github.com/jonrohan)! - Migrating progress bar component to beta folder, and adding progress bar css.

* [#1579](https://github.com/primer/view_components/pull/1579) [`05e07bb1`](https://github.com/primer/view_components/commit/05e07bb1ff0a7d42fca94c0a922e24e7558af939) Thanks [@camertron](https://github.com/camertron)! - Move Banner to alpha namespace

- [#1592](https://github.com/primer/view_components/pull/1592) [`f743267e`](https://github.com/primer/view_components/commit/f743267e791222a8388084433b2fa4143b11b129) Thanks [@simurai](https://github.com/simurai)! - Move `Breadcrumbs` styles to PVC

* [#1584](https://github.com/primer/view_components/pull/1584) [`cad5c235`](https://github.com/primer/view_components/commit/cad5c23548ad5682c8dce0d8f2831b08c2628889) Thanks [@simurai](https://github.com/simurai)! - Move `blankslate` styles to PVC

- [#1574](https://github.com/primer/view_components/pull/1574) [`b3e351d2`](https://github.com/primer/view_components/commit/b3e351d23bc0f545ddb21384dc2567d08c07ed83) Thanks [@mxriverlynn](https://github.com/mxriverlynn)! - adding a test suite to show all component-specific selectors are used in previews, and updating various component previews for lookbook

* [#1587](https://github.com/primer/view_components/pull/1587) [`ac54ecc4`](https://github.com/primer/view_components/commit/ac54ecc4c2870cbb89d326d5d1808e6a36c543ec) Thanks [@simurai](https://github.com/simurai)! - Move labels styles to PVC

- [#1594](https://github.com/primer/view_components/pull/1594) [`55f0d4df`](https://github.com/primer/view_components/commit/55f0d4dfd6fa111b4b3c551e087119637255f617) Thanks [@simurai](https://github.com/simurai)! - Move `Subhead` styles to PVC

* [#1593](https://github.com/primer/view_components/pull/1593) [`7042b5f5`](https://github.com/primer/view_components/commit/7042b5f5ef7f52fcef0a268023b6f096bd1d43e5) Thanks [@simurai](https://github.com/simurai)! - Move `ToggleSwitch` styles to PVC

- [#1590](https://github.com/primer/view_components/pull/1590) [`820022c3`](https://github.com/primer/view_components/commit/820022c3fbd69ab7d16aadcd46f23e74673bd2b0) Thanks [@simurai](https://github.com/simurai)! - Move `Truncate` styles to PVC

## 0.0.109

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
primer_view_components (0.0.109)
primer_view_components (0.0.110)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
octicons (>= 17.0.0)
Expand Down
225 changes: 225 additions & 0 deletions app/components/primer/popover_component.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
/* Popover */

.Popover {
position: absolute;
z-index: 100;
}

.Popover-message {
position: relative;
width: 232px;
margin-right: auto;
margin-left: auto;
background-color: var(--color-canvas-overlay);
border: var(--primer-borderWidth-thin, 1px) solid var(--color-border-default);
border-radius: var(--primer-borderRadius-medium, 6px);

/* Carets */
&::before,
&::after {
position: absolute;
left: 50%;
display: inline-block;
content: '';
}

&::before {
top: -16px;
margin-left: -9px;
border: 8px solid transparent;
border-bottom-color: var(--color-border-default);
}

&::after {
top: -14px;
margin-left: -8px;
border: 7px solid transparent;
border-bottom-color: var(--color-canvas-overlay);
}
}

/* No caret */
.Popover-message--no-caret {
&::before,
&::after {
display: none;
}
}

/* Bottom-oriented carets */
.Popover-message--bottom,
.Popover-message--bottom-right,
.Popover-message--bottom-left {
&::before,
&::after {
top: auto;
border-bottom-color: transparent;
}

&::before {
bottom: -16px;
border-top-color: var(--color-border-default);
}

&::after {
bottom: -14px;
border-top-color: var(--color-canvas-overlay);
}
}

/* Top & Bottom: Right-oriented carets */
.Popover-message--top-right,
.Popover-message--bottom-right {
right: -9px;
margin-right: 0;

&::before,
&::after {
left: auto;
margin-left: 0;
}

&::before {
right: 20px;
}

&::after {
right: 21px;
}
}

/* Top & Bottom: Left-oriented carets */
.Popover-message--top-left,
.Popover-message--bottom-left {
left: -9px;
margin-left: 0;

&::before,
&::after {
left: 24px;
margin-left: 0;
}

&::after {
left: 25px;
}
}

/* Right- & Left-oriented carets */
.Popover-message--right,
.Popover-message--right-top,
.Popover-message--right-bottom,
.Popover-message--left,
.Popover-message--left-top,
.Popover-message--left-bottom {
&::before,
&::after {
top: 50%;
left: auto;
margin-left: 0;
border-bottom-color: transparent;
}

&::before {
margin-top: -9px;
}

&::after {
margin-top: -8px;
}
}

/* Right-oriented carets */
.Popover-message--right,
.Popover-message--right-top,
.Popover-message--right-bottom {
&::before {
right: -16px;
border-left-color: var(--color-border-default);
}

&::after {
right: -14px;
border-left-color: var(--color-canvas-overlay);
}
}

/* Left-oriented carets */
.Popover-message--left,
.Popover-message--left-top,
.Popover-message--left-bottom {
&::before {
left: -16px;
border-right-color: var(--color-border-default);
}

&::after {
left: -14px;
border-right-color: var(--color-canvas-overlay);
}
}

/* Right & Left: Top-oriented carets */
.Popover-message--right-top,
.Popover-message--left-top {
&::before,
&::after {
top: 24px;
}
}

/* Right & Left: Bottom-oriented carets */
.Popover-message--right-bottom,
.Popover-message--left-bottom {
&::before,
&::after {
top: auto;
}

&::before {
bottom: 16px;
}

&::after {
bottom: 17px;
}
}

@media (min-width: 544px) {
.Popover-message--large {
min-width: 320px;
}
}

/* Responsive Popover
** For < md it will show full-width anchored to the bottom */

@media (max-width: 767.98px) {
.Popover {
position: fixed;
top: auto !important;
right: 0 !important;
bottom: 0 !important;
left: 0 !important;
}

.Popover-message {
top: auto;
right: auto;
bottom: auto;
left: auto;
width: auto !important;
margin: var(--primer-stack-gap-condensed, 8px);
}

/* Increase tap area for touch input */
.Popover-message > .btn-octicon {
padding: var(--primer-control-medium-paddingInline-normal, 12px) !important;
}

/* Remove caret */
.Popover-message::after,
.Popover-message::before {
display: none;
}
}
2 changes: 2 additions & 0 deletions app/components/primer/primer.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
@import "./beta/progress_bar.pcss";
@import "./beta/truncate.pcss";
@import "./dropdown.pcss";
@import "./popover_component.pcss";
@import "./state_component.pcss";
@import "./subhead_component.pcss";
@import "./timeline_item_component.pcss";
@import "./truncate.pcss";
Loading

0 comments on commit 8aec239

Please sign in to comment.