@primer/view-components 0.20.1 → 0.21.0-rc.136d21a9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- .dropdown{position:relative}.dropdown-caret{border-bottom-color:#0000;border-left-color:#0000;border-right-color:#0000;border-style:solid;border-width:var(--borderWidth-thicker,max(4px,.25rem)) var(--borderWidth-thicker,max(4px,.25rem)) 0;content:"";display:inline-block;height:0;vertical-align:middle;width:0}.dropdown-menu{background-clip:padding-box;background-color:var(--overlay-bgColor,var(--color-canvas-overlay));border:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--borderColor-default,var(--color-border-default));border-radius:var(--borderRadius-medium,.375rem);box-shadow:var(--shadow-floating-large,var(--color-shadow-large));left:0;list-style:none;margin-top:2px;padding-bottom:var(--control-small-paddingBlock,.25rem);padding-top:var(--control-small-paddingBlock,.25rem);position:absolute;top:100%;width:160px;z-index:100}.dropdown-menu:after,.dropdown-menu:before{content:"";display:inline-block;position:absolute}.dropdown-menu:before{border:8px solid #0000;border-bottom:8px solid var(--borderColor-default,var(--color-border-default))}.dropdown-menu:after{border:7px solid #0000;border-bottom:7px solid var(--overlay-bgColor,var(--color-canvas-overlay))}.dropdown-menu>ul{list-style:none}.dropdown-menu-no-overflow{width:auto}.dropdown-menu-no-overflow .dropdown-item{overflow:visible;padding:var(--control-small-paddingBlock,.25rem) var(--control-medium-paddingInline-spacious,1rem);text-overflow:inherit}.dropdown-item{color:var(--fgColor-default,var(--color-fg-default));display:block;overflow:hidden;padding:var(--control-small-paddingBlock,.25rem) var(--control-medium-paddingInline-condensed,.5rem) var(--control-small-paddingBlock,.25rem) var(--control-medium-paddingInline-spacious,1rem);text-overflow:ellipsis;white-space:nowrap}.dropdown-item:hover{background-color:var(--bgColor-accent-emphasis,var(--color-accent-emphasis));color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));-webkit-text-decoration:none;text-decoration:none}.dropdown-item:hover>.octicon{color:inherit;opacity:1}.dropdown-item:hover [class*=color-fg-]{color:inherit!important}.dropdown-item:hover>.Label{border-color:currentcolor;color:inherit!important}.dropdown-item.btn-link,.dropdown-signout{text-align:left;width:100%}.dropdown-signout{background:none;border:0}.dropdown-divider{border-top:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--borderColor-default,var(--color-border-default));display:block;height:0;margin:var(--stack-gap-condensed,.5rem) 0}.dropdown-header{color:var(--fgColor-muted,var(--color-fg-muted));font-size:var(--text-body-size-small,.75rem);padding:var(--control-small-paddingBlock,.25rem) var(--control-medium-paddingInline-spacious,1rem)}.dropdown-item[aria-checked=false] .octicon-check{display:none}.dropdown-menu-w{left:auto;margin-right:8px;margin-top:0;right:100%;top:0;width:auto}.dropdown-menu-w:before{border-color:#0000;border-left-color:var(--borderColor-default,var(--color-border-default));left:auto;right:-16px;top:10px}.dropdown-menu-w:after{border-color:#0000;border-left-color:var(--overlay-bgColor,var(--color-canvas-overlay));left:auto;right:-14px;top:11px}.dropdown-menu-e{left:100%;margin-left:8px;margin-top:0;top:0;width:auto}.dropdown-menu-e:before{border-color:#0000;border-right-color:var(--borderColor-default,var(--color-border-default));left:-16px;top:10px}.dropdown-menu-e:after{border-color:#0000;border-right-color:var(--overlay-bgColor,var(--color-canvas-overlay));left:-14px;top:11px}.dropdown-menu-ne{bottom:100%;left:0;margin-bottom:3px;top:auto}.dropdown-menu-ne:after,.dropdown-menu-ne:before{right:auto;top:auto}.dropdown-menu-ne:before{border-bottom:0;border-left:8px solid #0000;border-right:8px solid #0000;border-top:8px solid var(--borderColor-default,var(--color-border-default));bottom:-8px;left:9px}.dropdown-menu-ne:after{border-bottom:0;border-left:7px solid #0000;border-right:7px solid #0000;border-top:7px solid var(--overlay-bgColor,var(--color-canvas-overlay));bottom:-7px;left:10px}.dropdown-menu-s{left:auto;right:50%;transform:translateX(50%)}.dropdown-menu-s:before{right:50%;top:-16px;transform:translateX(50%)}.dropdown-menu-s:after{right:50%;top:-14px;transform:translateX(50%)}.dropdown-menu-sw{left:auto;right:0}.dropdown-menu-sw:before{left:auto;right:9px;top:-16px}.dropdown-menu-sw:after{left:auto;right:10px;top:-14px}.dropdown-menu-se:before{left:9px;top:-16px}.dropdown-menu-se:after{left:10px;top:-14px}
1
+ .dropdown{position:relative}.dropdown-caret{border-bottom-color:#0000;border-left-color:#0000;border-right-color:#0000;border-style:solid;border-width:var(--borderWidth-thicker,max(4px,.25rem)) var(--borderWidth-thicker,max(4px,.25rem)) 0;content:"";display:inline-block;height:0;vertical-align:middle;width:0}.dropdown-menu{background-clip:padding-box;background-color:var(--overlay-bgColor,var(--color-canvas-overlay));border:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--borderColor-default,var(--color-border-default));border-radius:var(--borderRadius-medium,.375rem);box-shadow:var(--shadow-floating-legacy,var(--color-shadow-large));left:0;list-style:none;margin-top:2px;padding-bottom:var(--control-small-paddingBlock,.25rem);padding-top:var(--control-small-paddingBlock,.25rem);position:absolute;top:100%;width:160px;z-index:100}.dropdown-menu:after,.dropdown-menu:before{content:"";display:inline-block;position:absolute}.dropdown-menu:before{border:8px solid #0000;border-bottom:8px solid var(--borderColor-default,var(--color-border-default))}.dropdown-menu:after{border:7px solid #0000;border-bottom:7px solid var(--overlay-bgColor,var(--color-canvas-overlay))}.dropdown-menu>ul{list-style:none}.dropdown-menu-no-overflow{width:auto}.dropdown-menu-no-overflow .dropdown-item{overflow:visible;padding:var(--control-small-paddingBlock,.25rem) var(--control-medium-paddingInline-spacious,1rem);text-overflow:inherit}.dropdown-item{color:var(--fgColor-default,var(--color-fg-default));display:block;overflow:hidden;padding:var(--control-small-paddingBlock,.25rem) var(--control-medium-paddingInline-condensed,.5rem) var(--control-small-paddingBlock,.25rem) var(--control-medium-paddingInline-spacious,1rem);text-overflow:ellipsis;white-space:nowrap}.dropdown-item:hover{background-color:var(--bgColor-accent-emphasis,var(--color-accent-emphasis));color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));-webkit-text-decoration:none;text-decoration:none}.dropdown-item:hover>.octicon{color:inherit;opacity:1}.dropdown-item:hover [class*=color-fg-]{color:inherit!important}.dropdown-item:hover>.Label{border-color:currentcolor;color:inherit!important}.dropdown-item.btn-link,.dropdown-signout{text-align:left;width:100%}.dropdown-signout{background:none;border:0}.dropdown-divider{border-top:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--borderColor-default,var(--color-border-default));display:block;height:0;margin:var(--stack-gap-condensed,.5rem) 0}.dropdown-header{color:var(--fgColor-muted,var(--color-fg-muted));font-size:var(--text-body-size-small,.75rem);padding:var(--control-small-paddingBlock,.25rem) var(--control-medium-paddingInline-spacious,1rem)}.dropdown-item[aria-checked=false] .octicon-check{display:none}.dropdown-menu-w{left:auto;margin-right:8px;margin-top:0;right:100%;top:0;width:auto}.dropdown-menu-w:before{border-color:#0000;border-left-color:var(--borderColor-default,var(--color-border-default));left:auto;right:-16px;top:10px}.dropdown-menu-w:after{border-color:#0000;border-left-color:var(--overlay-bgColor,var(--color-canvas-overlay));left:auto;right:-14px;top:11px}.dropdown-menu-e{left:100%;margin-left:8px;margin-top:0;top:0;width:auto}.dropdown-menu-e:before{border-color:#0000;border-right-color:var(--borderColor-default,var(--color-border-default));left:-16px;top:10px}.dropdown-menu-e:after{border-color:#0000;border-right-color:var(--overlay-bgColor,var(--color-canvas-overlay));left:-14px;top:11px}.dropdown-menu-ne{bottom:100%;left:0;margin-bottom:3px;top:auto}.dropdown-menu-ne:after,.dropdown-menu-ne:before{right:auto;top:auto}.dropdown-menu-ne:before{border-bottom:0;border-left:8px solid #0000;border-right:8px solid #0000;border-top:8px solid var(--borderColor-default,var(--color-border-default));bottom:-8px;left:9px}.dropdown-menu-ne:after{border-bottom:0;border-left:7px solid #0000;border-right:7px solid #0000;border-top:7px solid var(--overlay-bgColor,var(--color-canvas-overlay));bottom:-7px;left:10px}.dropdown-menu-s{left:auto;right:50%;transform:translateX(50%)}.dropdown-menu-s:before{right:50%;top:-16px;transform:translateX(50%)}.dropdown-menu-s:after{right:50%;top:-14px;transform:translateX(50%)}.dropdown-menu-sw{left:auto;right:0}.dropdown-menu-sw:before{left:auto;right:9px;top:-16px}.dropdown-menu-sw:after{left:auto;right:10px;top:-14px}.dropdown-menu-se:before{left:9px;top:-16px}.dropdown-menu-se:after{left:10px;top:-14px}
@@ -1 +1 @@
1
- .SegmentedControl{--segmentedControl-item-padding:var(--control-small-paddingBlock,0.25rem);background-color:var(--controlTrack-bgColor-rest,var(--color-segmented-control-bg));border-radius:var(--borderRadius-medium,.375rem);display:inline-flex;list-style:none}.SegmentedControl--iconOnly .Button--iconOnly.Button--medium,.SegmentedControl--iconOnly .Button--iconOnly.Button--small{padding-inline:0!important;width:100%}.SegmentedControl--small{--segmentedControl-item-padding:var(--control-xsmall-paddingBlock,0.125rem)}.SegmentedControl--small .SegmentedControl-item{height:var(--control-small-size,1.75rem)}.SegmentedControl--small .SegmentedControl-item .Button{padding-inline:calc(var(--control-xsmall-paddingInline-normal,.5rem) - var(--segmentedControl-item-padding))}.SegmentedControl--small.SegmentedControl--iconOnly .SegmentedControl-item{width:var(--control-small-size,1.75rem)}.SegmentedControl--medium .SegmentedControl-item{height:var(--control-medium-size,2rem)}.SegmentedControl--medium.SegmentedControl--iconOnly .SegmentedControl-item{width:var(--control-medium-size,2rem)}.SegmentedControl-item{border:var(--borderWidth-thin,max(1px,.0625rem)) solid #0000;border-radius:var(--borderRadius-medium,.375rem);display:inline-flex;height:var(--control-medium-size,2rem);justify-content:center;padding:var(--segmentedControl-item-padding);position:relative}.SegmentedControl-item .Button--invisible:hover:not(:disabled){background-color:var(--controlTrack-bgColor-hover,var(--color-action-list-item-default-hover-bg))}.SegmentedControl-item .Button--invisible:active:not(:disabled){background-color:var(--controlTrack-bgColor-active,var(--color-action-list-item-default-active-bg))}.SegmentedControl-item.SegmentedControl-item--selected{background-color:var(--controlKnob-bgColor-rest,var(--color-segmented-control-button-bg));border-color:var(--controlKnob-borderColor-rest,var(--color-segmented-control-button-selected-border))}.SegmentedControl-item.SegmentedControl-item--selected .Button{font-weight:var(--base-text-weight-semibold,600)}.SegmentedControl-item.SegmentedControl-item--selected .Button:hover{background-color:initial}.SegmentedControl-item.SegmentedControl-item--selected:before{border-color:#0000!important}.SegmentedControl-item.SegmentedControl-item--selected+.SegmentedControl-item:before{border-color:#0000}.SegmentedControl-item .Button-label[data-content]:before{content:attr(data-content);display:block;font-weight:var(--base-text-weight-semibold,600);height:0;visibility:hidden}.SegmentedControl-item:not(:first-child):before{border-left:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--borderColor-default,var(--color-border-default));content:"";inset:0 0 0 -1px;margin-bottom:var(--control-medium-paddingBlock,.375rem);margin-top:var(--control-medium-paddingBlock,.375rem);position:absolute}.SegmentedControl-item .Button{border:0;border-radius:calc(var(--borderRadius-medium,.375rem) - var(--segmentedControl-item-padding)/2);font-weight:var(--base-text-weight-normal,400);height:100%;padding-inline:calc(var(--control-medium-paddingInline-normal,.75rem) - var(--segmentedControl-item-padding));width:100%}.SegmentedControl-item .Button:focus-visible{border-radius:calc(var(--borderRadius-medium,.375rem) - var(--segmentedControl-item-padding)/1);outline-offset:calc(var(--segmentedControl-item-padding) - var(--borderWidth-thin,max(1px, .0625rem)))}.SegmentedControl-item .Button--invisible.Button--invisible-noVisuals .Button-label{color:var(--button-default-fgColor-rest,var(--color-btn-text))}.SegmentedControl--fullWidth{display:flex}.SegmentedControl--fullWidth .SegmentedControl-item{flex:1;justify-content:center}
1
+ .SegmentedControl{--segmentedControl-item-padding:var(--control-small-paddingBlock,0.25rem);--overlay-offset:0.5rem;background-color:var(--controlTrack-bgColor-rest,var(--color-segmented-control-bg));border-radius:var(--borderRadius-medium,.375rem);display:inline-flex;list-style:none}.SegmentedControl--iconOnly .Button--iconOnly.Button--medium,.SegmentedControl--iconOnly .Button--iconOnly.Button--small{padding-inline:0!important;width:100%}.SegmentedControl--small{--segmentedControl-item-padding:var(--control-xsmall-paddingBlock,0.125rem)}.SegmentedControl--small .SegmentedControl-item{height:var(--control-small-size,1.75rem)}.SegmentedControl--small .SegmentedControl-item .Button{padding-inline:calc(var(--control-xsmall-paddingInline-normal,.5rem) - var(--segmentedControl-item-padding))}.SegmentedControl--small.SegmentedControl--iconOnly .SegmentedControl-item{width:var(--control-small-size,1.75rem)}.SegmentedControl--medium .SegmentedControl-item{height:var(--control-medium-size,2rem)}.SegmentedControl--medium.SegmentedControl--iconOnly .SegmentedControl-item{width:var(--control-medium-size,2rem)}.SegmentedControl-item{border:var(--borderWidth-thin,max(1px,.0625rem)) solid #0000;border-radius:var(--borderRadius-medium,.375rem);display:inline-flex;height:var(--control-medium-size,2rem);justify-content:center;padding:var(--segmentedControl-item-padding);position:relative}.SegmentedControl-item .Button--invisible:hover:not(:disabled){background-color:var(--controlTrack-bgColor-hover,var(--color-action-list-item-default-hover-bg))}.SegmentedControl-item .Button--invisible:active:not(:disabled){background-color:var(--controlTrack-bgColor-active,var(--color-action-list-item-default-active-bg))}.SegmentedControl-item.SegmentedControl-item--selected{background-color:var(--controlKnob-bgColor-rest,var(--color-segmented-control-button-bg));border-color:var(--controlKnob-borderColor-rest,var(--color-segmented-control-button-selected-border))}.SegmentedControl-item.SegmentedControl-item--selected .Button{font-weight:var(--base-text-weight-semibold,600)}.SegmentedControl-item.SegmentedControl-item--selected .Button:hover{background-color:initial}.SegmentedControl-item.SegmentedControl-item--selected:before{border-color:#0000!important}.SegmentedControl-item.SegmentedControl-item--selected+.SegmentedControl-item:before{border-color:#0000}.SegmentedControl-item .Button-label[data-content]:before{content:attr(data-content);display:block;font-weight:var(--base-text-weight-semibold,600);height:0;visibility:hidden}.SegmentedControl-item:not(:first-child):before{border-left:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--borderColor-default,var(--color-border-default));content:"";inset:0 0 0 -1px;margin-bottom:var(--control-medium-paddingBlock,.375rem);margin-top:var(--control-medium-paddingBlock,.375rem);position:absolute}.SegmentedControl-item .Button{border:0;border-radius:calc(var(--borderRadius-medium,.375rem) - var(--segmentedControl-item-padding)/2);font-weight:var(--base-text-weight-normal,400);height:100%;padding-inline:calc(var(--control-medium-paddingInline-normal,.75rem) - var(--segmentedControl-item-padding));width:100%}.SegmentedControl-item .Button:focus-visible{border-radius:calc(var(--borderRadius-medium,.375rem) - var(--segmentedControl-item-padding)/1);outline-offset:calc(var(--segmentedControl-item-padding) - var(--borderWidth-thin,max(1px, .0625rem)))}.SegmentedControl-item .Button--invisible.Button--invisible-noVisuals .Button-label{color:var(--button-default-fgColor-rest,var(--color-btn-text))}.SegmentedControl--fullWidth{display:flex}.SegmentedControl--fullWidth .SegmentedControl-item{flex:1;justify-content:center}
@@ -32,9 +32,7 @@ const isPopoverOpen = (() => {
32
32
  }
33
33
  return (el) => (selector ? el.matches(selector) : setSelector(el));
34
34
  })();
35
- const TOOLTIP_ARROW_EDGE_OFFSET = 6;
36
35
  const TOOLTIP_SR_ONLY_CLASS = 'sr-only';
37
- const TOOLTIP_OFFSET = 10;
38
36
  const DIRECTION_CLASSES = [
39
37
  'tooltip-n',
40
38
  'tooltip-s',
@@ -84,6 +82,8 @@ class ToolTipElement extends HTMLElement {
84
82
  styles() {
85
83
  return `
86
84
  :host {
85
+ --tooltip-top: var(--tool-tip-position-top, 0);
86
+ --tooltip-left: var(--tool-tip-position-left, 0);
87
87
  padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed) !important;
88
88
  font: var(--text-body-shorthand-small);
89
89
  color: var(--fgColor-onEmphasis, var(--color-fg-on-emphasis)) !important;
@@ -102,27 +102,29 @@ class ToolTipElement extends HTMLElement {
102
102
  word-wrap: break-word;
103
103
  white-space: normal;
104
104
  width: max-content !important;
105
- inset: var(--tool-tip-position-top, 0) auto auto var(--tool-tip-position-left, 0) !important;
105
+ inset: var(--tooltip-top) auto auto var(--tooltip-left) !important;
106
106
  overflow: visible !important;
107
107
  text-wrap: balance;
108
108
  }
109
109
 
110
- :host:before{
111
- position: absolute;
112
- z-index: 1000001;
113
- color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
114
- content: "";
115
- border: 6px solid transparent;
116
- opacity: 0;
110
+ :host(:is(.tooltip-n, .tooltip-nw, .tooltip-ne)) {
111
+ --tooltip-top: calc(var(--tool-tip-position-top, 0) - var(--overlay-offset, 0.25rem));
112
+ --tooltip-left: var(--tool-tip-position-left);
117
113
  }
118
114
 
119
- @keyframes tooltip-appear {
120
- from {
121
- opacity: 0;
122
- }
123
- to {
124
- opacity: 1;
125
- }
115
+ :host(:is(.tooltip-s, .tooltip-sw, .tooltip-se)) {
116
+ --tooltip-top: calc(var(--tool-tip-position-top, 0) + var(--overlay-offset, 0.25rem));
117
+ --tooltip-left: var(--tool-tip-position-left);
118
+ }
119
+
120
+ :host(.tooltip-w) {
121
+ --tooltip-top: var(--tool-tip-position-top);
122
+ --tooltip-left: calc(var(--tool-tip-position-left, 0) - var(--overlay-offset, 0.25rem));
123
+ }
124
+
125
+ :host(.tooltip-e) {
126
+ --tooltip-top: var(--tool-tip-position-top);
127
+ --tooltip-left: calc(var(--tool-tip-position-left, 0) + var(--overlay-offset, 0.25rem));
126
128
  }
127
129
 
128
130
  :host:after{
@@ -134,73 +136,40 @@ class ToolTipElement extends HTMLElement {
134
136
  content: "";
135
137
  }
136
138
 
137
- :host(:popover-open),
138
- :host(:popover-open):before {
139
- animation-name: tooltip-appear;
140
- animation-duration: .1s;
141
- animation-fill-mode: forwards;
142
- animation-timing-function: ease-in;
143
- }
144
-
145
- :host(.\\:popover-open),
146
- :host(.\\:popover-open):before {
147
- animation-name: tooltip-appear;
148
- animation-duration: .1s;
149
- animation-fill-mode: forwards;
150
- animation-timing-function: ease-in;
151
- animation-delay: .4s;
152
- }
153
-
154
- :host(.tooltip-s):before,
155
- :host(.tooltip-n):before {
156
- right: 50%;
157
- margin-right: -${TOOLTIP_ARROW_EDGE_OFFSET}px;
158
- }
159
- :host(.tooltip-s):before,
160
- :host(.tooltip-se):before,
161
- :host(.tooltip-sw):before {
162
- bottom: 100%;
163
- border-bottom-color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
164
- }
165
139
  :host(.tooltip-s):after,
166
140
  :host(.tooltip-se):after,
167
141
  :host(.tooltip-sw):after {
168
142
  bottom: 100%
169
143
  }
170
- :host(.tooltip-n):before,
171
- :host(.tooltip-ne):before,
172
- :host(.tooltip-nw):before {
173
- top: 100%;
174
- border-top-color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
175
- }
144
+
176
145
  :host(.tooltip-n):after,
177
146
  :host(.tooltip-ne):after,
178
147
  :host(.tooltip-nw):after {
179
148
  top: 100%;
180
149
  }
181
- :host(.tooltip-se):before,
182
- :host(.tooltip-ne):before {
183
- left: 0;
184
- margin-left: ${TOOLTIP_ARROW_EDGE_OFFSET}px;
185
- }
186
- :host(.tooltip-sw):before,
187
- :host(.tooltip-nw):before {
188
- right: 0;
189
- margin-right: ${TOOLTIP_ARROW_EDGE_OFFSET}px;
150
+
151
+ @keyframes tooltip-appear {
152
+ from {
153
+ opacity: 0;
154
+ }
155
+ to {
156
+ opacity: 1;
157
+ }
190
158
  }
191
- :host(.tooltip-w):before {
192
- top: 50%;
193
- bottom: 50%;
194
- left: 100%;
195
- margin-top: -6px;
196
- border-left-color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
159
+
160
+ :host(:popover-open),
161
+ :host(:popover-open):before {
162
+ animation-name: tooltip-appear;
163
+ animation-duration: .1s;
164
+ animation-fill-mode: forwards;
165
+ animation-timing-function: ease-in;
197
166
  }
198
- :host(.tooltip-e):before {
199
- top: 50%;
200
- right: 100%;
201
- bottom: 50%;
202
- margin-top: -6px;
203
- border-right-color: var(--bgColor-emphasis, var(--color-neutral-emphasis-plus));
167
+
168
+ :host(.\\:popover-open) {
169
+ animation-name: tooltip-appear;
170
+ animation-duration: .1s;
171
+ animation-fill-mode: forwards;
172
+ animation-timing-function: ease-in;
204
173
  }
205
174
 
206
175
  @media (forced-colors: active) {
@@ -390,7 +359,7 @@ _ToolTipElement_abortController = new WeakMap(), _ToolTipElement_align = new Wea
390
359
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-top', "f");
391
360
  }
392
361
  else if (direction === 'ne') {
393
- __classPrivateFieldSet(this, _ToolTipElement_align, 'start', "f");
362
+ __classPrivateFieldSet(this, _ToolTipElement_align, 'end', "f");
394
363
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-top', "f");
395
364
  }
396
365
  else if (direction === 'e') {
@@ -398,7 +367,7 @@ _ToolTipElement_abortController = new WeakMap(), _ToolTipElement_align = new Wea
398
367
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-right', "f");
399
368
  }
400
369
  else if (direction === 'se') {
401
- __classPrivateFieldSet(this, _ToolTipElement_align, 'start', "f");
370
+ __classPrivateFieldSet(this, _ToolTipElement_align, 'end', "f");
402
371
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-bottom', "f");
403
372
  }
404
373
  else if (direction === 's') {
@@ -406,7 +375,7 @@ _ToolTipElement_abortController = new WeakMap(), _ToolTipElement_align = new Wea
406
375
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-bottom', "f");
407
376
  }
408
377
  else if (direction === 'sw') {
409
- __classPrivateFieldSet(this, _ToolTipElement_align, 'end', "f");
378
+ __classPrivateFieldSet(this, _ToolTipElement_align, 'start', "f");
410
379
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-bottom', "f");
411
380
  }
412
381
  else if (direction === 'w') {
@@ -414,7 +383,7 @@ _ToolTipElement_abortController = new WeakMap(), _ToolTipElement_align = new Wea
414
383
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-left', "f");
415
384
  }
416
385
  else if (direction === 'nw') {
417
- __classPrivateFieldSet(this, _ToolTipElement_align, 'end', "f");
386
+ __classPrivateFieldSet(this, _ToolTipElement_align, 'start', "f");
418
387
  __classPrivateFieldSet(this, _ToolTipElement_side, 'outside-top', "f");
419
388
  }
420
389
  }, _ToolTipElement_updatePosition = function _ToolTipElement_updatePosition() {
@@ -425,7 +394,7 @@ _ToolTipElement_abortController = new WeakMap(), _ToolTipElement_align = new Wea
425
394
  const position = getAnchoredPosition(this, this.control, {
426
395
  side: __classPrivateFieldGet(this, _ToolTipElement_side, "f"),
427
396
  align: __classPrivateFieldGet(this, _ToolTipElement_align, "f"),
428
- anchorOffset: TOOLTIP_OFFSET,
397
+ anchorOffset: 0,
429
398
  });
430
399
  const anchorSide = position.anchorSide;
431
400
  const align = position.anchorAlign;
@@ -1 +1 @@
1
- .Popover{position:absolute;z-index:100}.Popover-message{background-color:var(--overlay-bgColor,var(--color-canvas-overlay));border:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--borderColor-default,var(--color-border-default));border-radius:var(--borderRadius-medium,.375rem);margin-left:auto;margin-right:auto;position:relative;width:232px}.Popover-message:after,.Popover-message:before{content:"";display:inline-block;left:50%;position:absolute}.Popover-message:before{border:8px solid #0000;border-bottom:8px solid var(--borderColor-default,var(--color-border-default));margin-left:-9px;top:-16px}.Popover-message:after{border:7px solid #0000;border-bottom:7px solid var(--overlay-bgColor,var(--color-canvas-overlay));margin-left:-8px;top:-14px}.Popover-message--no-caret:after,.Popover-message--no-caret:before{display:none}.Popover-message--bottom-left:after,.Popover-message--bottom-left:before,.Popover-message--bottom-right:after,.Popover-message--bottom-right:before,.Popover-message--bottom:after,.Popover-message--bottom:before{border-bottom-color:#0000;top:auto}.Popover-message--bottom-left:before,.Popover-message--bottom-right:before,.Popover-message--bottom:before{border-top-color:var(--borderColor-default,var(--color-border-default));bottom:-16px}.Popover-message--bottom-left:after,.Popover-message--bottom-right:after,.Popover-message--bottom:after{border-top-color:var(--overlay-bgColor,var(--color-canvas-overlay));bottom:-14px}.Popover-message--bottom-right,.Popover-message--top-right{margin-right:0;right:-9px}.Popover-message--bottom-right:after,.Popover-message--bottom-right:before,.Popover-message--top-right:after,.Popover-message--top-right:before{left:auto;margin-left:0}.Popover-message--bottom-right:before,.Popover-message--top-right:before{right:20px}.Popover-message--bottom-right:after,.Popover-message--top-right:after{right:21px}.Popover-message--bottom-left,.Popover-message--top-left{left:-9px;margin-left:0}.Popover-message--bottom-left:after,.Popover-message--bottom-left:before,.Popover-message--top-left:after,.Popover-message--top-left:before{left:24px;margin-left:0}.Popover-message--bottom-left:after,.Popover-message--top-left:after{left:25px}.Popover-message--left-bottom:after,.Popover-message--left-bottom:before,.Popover-message--left-top:after,.Popover-message--left-top:before,.Popover-message--left:after,.Popover-message--left:before,.Popover-message--right-bottom:after,.Popover-message--right-bottom:before,.Popover-message--right-top:after,.Popover-message--right-top:before,.Popover-message--right:after,.Popover-message--right:before{border-bottom-color:#0000;left:auto;margin-left:0;top:50%}.Popover-message--left-bottom:before,.Popover-message--left-top:before,.Popover-message--left:before,.Popover-message--right-bottom:before,.Popover-message--right-top:before,.Popover-message--right:before{margin-top:-9px}.Popover-message--left-bottom:after,.Popover-message--left-top:after,.Popover-message--left:after,.Popover-message--right-bottom:after,.Popover-message--right-top:after,.Popover-message--right:after{margin-top:-8px}.Popover-message--right-bottom:before,.Popover-message--right-top:before,.Popover-message--right:before{border-left-color:var(--borderColor-default,var(--color-border-default));right:-16px}.Popover-message--right-bottom:after,.Popover-message--right-top:after,.Popover-message--right:after{border-left-color:var(--overlay-bgColor,var(--color-canvas-overlay));right:-14px}.Popover-message--left-bottom:before,.Popover-message--left-top:before,.Popover-message--left:before{border-right-color:var(--borderColor-default,var(--color-border-default));left:-16px}.Popover-message--left-bottom:after,.Popover-message--left-top:after,.Popover-message--left:after{border-right-color:var(--overlay-bgColor,var(--color-canvas-overlay));left:-14px}.Popover-message--left-top:after,.Popover-message--left-top:before,.Popover-message--right-top:after,.Popover-message--right-top:before{top:24px}.Popover-message--left-bottom:after,.Popover-message--left-bottom:before,.Popover-message--right-bottom:after,.Popover-message--right-bottom:before{top:auto}.Popover-message--left-bottom:before,.Popover-message--right-bottom:before{bottom:16px}.Popover-message--left-bottom:after,.Popover-message--right-bottom:after{bottom:17px}@media (min-width:544px){.Popover-message--large{min-width:320px}}@media (max-width:767.98px){.Popover{bottom:0!important;left:0!important;position:fixed;right:0!important;top:auto!important}.Popover-message{bottom:auto;left:auto;margin:var(--stack-gap-condensed,.5rem);right:auto;top:auto;width:auto!important}.Popover-message>.btn-octicon{padding:var(--control-medium-paddingInline-normal,.75rem)!important}.Popover-message:after,.Popover-message:before{display:none}}
1
+ .Popover{position:absolute;z-index:100}.Popover-message{background-color:var(--overlay-bgColor,var(--color-canvas-overlay));border:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--borderColor-default,var(--color-border-default));border-radius:var(--borderRadius-medium,.375rem);box-shadow:var(--shadow-floating-legacy,var(--color-shadow-large))!important;margin-left:auto;margin-right:auto;position:relative;width:232px}.Popover-message:after,.Popover-message:before{content:"";display:inline-block;left:50%;position:absolute}.Popover-message:before{border:8px solid #0000;border-bottom:8px solid var(--borderColor-default,var(--color-border-default));margin-left:-9px;top:-16px}.Popover-message:after{border:7px solid #0000;border-bottom:7px solid var(--overlay-bgColor,var(--color-canvas-overlay));margin-left:-8px;top:-14px}.Popover-message--no-caret:after,.Popover-message--no-caret:before{display:none}.Popover-message--bottom-left:after,.Popover-message--bottom-left:before,.Popover-message--bottom-right:after,.Popover-message--bottom-right:before,.Popover-message--bottom:after,.Popover-message--bottom:before{border-bottom-color:#0000;top:auto}.Popover-message--bottom-left:before,.Popover-message--bottom-right:before,.Popover-message--bottom:before{border-top-color:var(--borderColor-default,var(--color-border-default));bottom:-16px}.Popover-message--bottom-left:after,.Popover-message--bottom-right:after,.Popover-message--bottom:after{border-top-color:var(--overlay-bgColor,var(--color-canvas-overlay));bottom:-14px}.Popover-message--bottom-right,.Popover-message--top-right{margin-right:0;right:-9px}.Popover-message--bottom-right:after,.Popover-message--bottom-right:before,.Popover-message--top-right:after,.Popover-message--top-right:before{left:auto;margin-left:0}.Popover-message--bottom-right:before,.Popover-message--top-right:before{right:20px}.Popover-message--bottom-right:after,.Popover-message--top-right:after{right:21px}.Popover-message--bottom-left,.Popover-message--top-left{left:-9px;margin-left:0}.Popover-message--bottom-left:after,.Popover-message--bottom-left:before,.Popover-message--top-left:after,.Popover-message--top-left:before{left:24px;margin-left:0}.Popover-message--bottom-left:after,.Popover-message--top-left:after{left:25px}.Popover-message--left-bottom:after,.Popover-message--left-bottom:before,.Popover-message--left-top:after,.Popover-message--left-top:before,.Popover-message--left:after,.Popover-message--left:before,.Popover-message--right-bottom:after,.Popover-message--right-bottom:before,.Popover-message--right-top:after,.Popover-message--right-top:before,.Popover-message--right:after,.Popover-message--right:before{border-bottom-color:#0000;left:auto;margin-left:0;top:50%}.Popover-message--left-bottom:before,.Popover-message--left-top:before,.Popover-message--left:before,.Popover-message--right-bottom:before,.Popover-message--right-top:before,.Popover-message--right:before{margin-top:-9px}.Popover-message--left-bottom:after,.Popover-message--left-top:after,.Popover-message--left:after,.Popover-message--right-bottom:after,.Popover-message--right-top:after,.Popover-message--right:after{margin-top:-8px}.Popover-message--right-bottom:before,.Popover-message--right-top:before,.Popover-message--right:before{border-left-color:var(--borderColor-default,var(--color-border-default));right:-16px}.Popover-message--right-bottom:after,.Popover-message--right-top:after,.Popover-message--right:after{border-left-color:var(--overlay-bgColor,var(--color-canvas-overlay));right:-14px}.Popover-message--left-bottom:before,.Popover-message--left-top:before,.Popover-message--left:before{border-right-color:var(--borderColor-default,var(--color-border-default));left:-16px}.Popover-message--left-bottom:after,.Popover-message--left-top:after,.Popover-message--left:after{border-right-color:var(--overlay-bgColor,var(--color-canvas-overlay));left:-14px}.Popover-message--left-top:after,.Popover-message--left-top:before,.Popover-message--right-top:after,.Popover-message--right-top:before{top:24px}.Popover-message--left-bottom:after,.Popover-message--left-bottom:before,.Popover-message--right-bottom:after,.Popover-message--right-bottom:before{top:auto}.Popover-message--left-bottom:before,.Popover-message--right-bottom:before{bottom:16px}.Popover-message--left-bottom:after,.Popover-message--right-bottom:after{bottom:17px}@media (min-width:544px){.Popover-message--large{min-width:320px}}@media (max-width:767.98px){.Popover{bottom:0!important;left:0!important;position:fixed;right:0!important;top:auto!important}.Popover-message{bottom:auto;left:auto;margin:var(--stack-gap-condensed,.5rem);right:auto;top:auto;width:auto!important}.Popover-message>.btn-octicon{padding:var(--control-medium-paddingInline-normal,.75rem)!important}.Popover-message:after,.Popover-message:before{display:none}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/view-components",
3
- "version": "0.20.1",
3
+ "version": "0.21.0-rc.136d21a9",
4
4
  "description": "ViewComponents for the Primer Design System",
5
5
  "main": "app/assets/javascripts/primer_view_components.js",
6
6
  "module": "app/components/primer/primer.js",
@@ -63,7 +63,7 @@
63
63
  "@github/prettier-config": "0.0.6",
64
64
  "@playwright/test": "^1.35.1",
65
65
  "@primer/css": "21.2.0",
66
- "@primer/primitives": "7.15.8",
66
+ "@primer/primitives": "7.15.12",
67
67
  "@primer/stylelint-config": "^12.7.2",
68
68
  "@rollup/plugin-node-resolve": "^15.2.3",
69
69
  "@rollup/plugin-typescript": "^8.3.3",
@@ -8778,6 +8778,110 @@
8778
8778
  "color-contrast"
8779
8779
  ]
8780
8780
  }
8781
+ },
8782
+ {
8783
+ "preview_path": "primer/alpha/tooltip/tooltip_n",
8784
+ "name": "tooltip_n",
8785
+ "snapshot": "interactive",
8786
+ "skip_rules": {
8787
+ "wont_fix": [
8788
+ "region"
8789
+ ],
8790
+ "will_fix": [
8791
+ "color-contrast"
8792
+ ]
8793
+ }
8794
+ },
8795
+ {
8796
+ "preview_path": "primer/alpha/tooltip/tooltip_s",
8797
+ "name": "tooltip_s",
8798
+ "snapshot": "interactive",
8799
+ "skip_rules": {
8800
+ "wont_fix": [
8801
+ "region"
8802
+ ],
8803
+ "will_fix": [
8804
+ "color-contrast"
8805
+ ]
8806
+ }
8807
+ },
8808
+ {
8809
+ "preview_path": "primer/alpha/tooltip/tooltip_e",
8810
+ "name": "tooltip_e",
8811
+ "snapshot": "interactive",
8812
+ "skip_rules": {
8813
+ "wont_fix": [
8814
+ "region"
8815
+ ],
8816
+ "will_fix": [
8817
+ "color-contrast"
8818
+ ]
8819
+ }
8820
+ },
8821
+ {
8822
+ "preview_path": "primer/alpha/tooltip/tooltip_w",
8823
+ "name": "tooltip_w",
8824
+ "snapshot": "interactive",
8825
+ "skip_rules": {
8826
+ "wont_fix": [
8827
+ "region"
8828
+ ],
8829
+ "will_fix": [
8830
+ "color-contrast"
8831
+ ]
8832
+ }
8833
+ },
8834
+ {
8835
+ "preview_path": "primer/alpha/tooltip/tooltip_se",
8836
+ "name": "tooltip_se",
8837
+ "snapshot": "interactive",
8838
+ "skip_rules": {
8839
+ "wont_fix": [
8840
+ "region"
8841
+ ],
8842
+ "will_fix": [
8843
+ "color-contrast"
8844
+ ]
8845
+ }
8846
+ },
8847
+ {
8848
+ "preview_path": "primer/alpha/tooltip/tooltip_sw",
8849
+ "name": "tooltip_sw",
8850
+ "snapshot": "interactive",
8851
+ "skip_rules": {
8852
+ "wont_fix": [
8853
+ "region"
8854
+ ],
8855
+ "will_fix": [
8856
+ "color-contrast"
8857
+ ]
8858
+ }
8859
+ },
8860
+ {
8861
+ "preview_path": "primer/alpha/tooltip/tooltip_ne",
8862
+ "name": "tooltip_ne",
8863
+ "snapshot": "interactive",
8864
+ "skip_rules": {
8865
+ "wont_fix": [
8866
+ "region"
8867
+ ],
8868
+ "will_fix": [
8869
+ "color-contrast"
8870
+ ]
8871
+ }
8872
+ },
8873
+ {
8874
+ "preview_path": "primer/alpha/tooltip/tooltip_nw",
8875
+ "name": "tooltip_nw",
8876
+ "snapshot": "interactive",
8877
+ "skip_rules": {
8878
+ "wont_fix": [
8879
+ "region"
8880
+ ],
8881
+ "will_fix": [
8882
+ "color-contrast"
8883
+ ]
8884
+ }
8781
8885
  }
8782
8886
  ],
8783
8887
  "subcomponents": [
@@ -6797,6 +6797,110 @@
6797
6797
  "color-contrast"
6798
6798
  ]
6799
6799
  }
6800
+ },
6801
+ {
6802
+ "preview_path": "primer/alpha/tooltip/tooltip_n",
6803
+ "name": "tooltip_n",
6804
+ "snapshot": "interactive",
6805
+ "skip_rules": {
6806
+ "wont_fix": [
6807
+ "region"
6808
+ ],
6809
+ "will_fix": [
6810
+ "color-contrast"
6811
+ ]
6812
+ }
6813
+ },
6814
+ {
6815
+ "preview_path": "primer/alpha/tooltip/tooltip_s",
6816
+ "name": "tooltip_s",
6817
+ "snapshot": "interactive",
6818
+ "skip_rules": {
6819
+ "wont_fix": [
6820
+ "region"
6821
+ ],
6822
+ "will_fix": [
6823
+ "color-contrast"
6824
+ ]
6825
+ }
6826
+ },
6827
+ {
6828
+ "preview_path": "primer/alpha/tooltip/tooltip_e",
6829
+ "name": "tooltip_e",
6830
+ "snapshot": "interactive",
6831
+ "skip_rules": {
6832
+ "wont_fix": [
6833
+ "region"
6834
+ ],
6835
+ "will_fix": [
6836
+ "color-contrast"
6837
+ ]
6838
+ }
6839
+ },
6840
+ {
6841
+ "preview_path": "primer/alpha/tooltip/tooltip_w",
6842
+ "name": "tooltip_w",
6843
+ "snapshot": "interactive",
6844
+ "skip_rules": {
6845
+ "wont_fix": [
6846
+ "region"
6847
+ ],
6848
+ "will_fix": [
6849
+ "color-contrast"
6850
+ ]
6851
+ }
6852
+ },
6853
+ {
6854
+ "preview_path": "primer/alpha/tooltip/tooltip_se",
6855
+ "name": "tooltip_se",
6856
+ "snapshot": "interactive",
6857
+ "skip_rules": {
6858
+ "wont_fix": [
6859
+ "region"
6860
+ ],
6861
+ "will_fix": [
6862
+ "color-contrast"
6863
+ ]
6864
+ }
6865
+ },
6866
+ {
6867
+ "preview_path": "primer/alpha/tooltip/tooltip_sw",
6868
+ "name": "tooltip_sw",
6869
+ "snapshot": "interactive",
6870
+ "skip_rules": {
6871
+ "wont_fix": [
6872
+ "region"
6873
+ ],
6874
+ "will_fix": [
6875
+ "color-contrast"
6876
+ ]
6877
+ }
6878
+ },
6879
+ {
6880
+ "preview_path": "primer/alpha/tooltip/tooltip_ne",
6881
+ "name": "tooltip_ne",
6882
+ "snapshot": "interactive",
6883
+ "skip_rules": {
6884
+ "wont_fix": [
6885
+ "region"
6886
+ ],
6887
+ "will_fix": [
6888
+ "color-contrast"
6889
+ ]
6890
+ }
6891
+ },
6892
+ {
6893
+ "preview_path": "primer/alpha/tooltip/tooltip_nw",
6894
+ "name": "tooltip_nw",
6895
+ "snapshot": "interactive",
6896
+ "skip_rules": {
6897
+ "wont_fix": [
6898
+ "region"
6899
+ ],
6900
+ "will_fix": [
6901
+ "color-contrast"
6902
+ ]
6903
+ }
6800
6904
  }
6801
6905
  ]
6802
6906
  },