@primer/react 37.32.0-rc.f8e94f384 → 38.0.0-rc.1
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/CHANGELOG.md +36 -1
- package/dist/browser.esm.js +3 -3
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +3 -3
- package/dist/browser.umd.js.map +1 -1
- package/dist/components.css +162 -125
- package/generated/components.json +87 -200
- package/lib/Autocomplete/AutocompleteMenu.js +7 -7
- package/lib/CircleOcticon/CircleOcticon.d.ts +3 -0
- package/lib/CircleOcticon/CircleOcticon.d.ts.map +1 -1
- package/lib/CircleOcticon/CircleOcticon.js +3 -0
- package/lib/ConfirmationDialog/ConfirmationDialog.d.ts +8 -0
- package/lib/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/lib/ConfirmationDialog/ConfirmationDialog.js +6 -2
- package/lib/FilteredActionList/FilteredActionList-96b126d7.css +2 -0
- package/lib/FilteredActionList/FilteredActionList-96b126d7.css.map +1 -0
- package/lib/FilteredActionList/FilteredActionList.d.ts.map +1 -1
- package/lib/FilteredActionList/FilteredActionList.js +3 -6
- package/lib/FilteredActionList/FilteredActionList.module.css.js +2 -2
- package/lib/PointerBox/PointerBox.d.ts +1 -1
- package/lib/PointerBox/PointerBox.d.ts.map +1 -1
- package/lib/PointerBox/PointerBox.js +1 -1
- package/lib/ProgressBar/ProgressBar-a0957632.css +2 -0
- package/lib/ProgressBar/ProgressBar-a0957632.css.map +1 -0
- package/lib/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/lib/ProgressBar/ProgressBar.js +53 -49
- package/lib/ProgressBar/ProgressBar.module.css.js +1 -1
- package/lib/Radio/{Radio-b2a92b7d.css → Radio-df9a5c02.css} +2 -2
- package/lib/Radio/{Radio-b2a92b7d.css.map → Radio-df9a5c02.css.map} +1 -1
- package/lib/Radio/Radio.module.css.js +1 -1
- package/lib/Select/Select.js +61 -53
- package/lib/SelectPanel/SelectPanel.js +2 -2
- package/lib/SplitPageLayout/SplitPageLayout.d.ts +1 -2
- package/lib/SplitPageLayout/SplitPageLayout.d.ts.map +1 -1
- package/lib/Stack/Stack.d.ts.map +1 -1
- package/lib/Stack/Stack.js +110 -111
- package/lib/StateLabel/StateLabel-cd27f475.css +2 -0
- package/lib/StateLabel/StateLabel-cd27f475.css.map +1 -0
- package/lib/StateLabel/StateLabel.d.ts +1 -2
- package/lib/StateLabel/StateLabel.d.ts.map +1 -1
- package/lib/StateLabel/StateLabel.js +3 -5
- package/lib/StateLabel/StateLabel.module.css.js +7 -0
- package/lib/SubNav/SubNav.d.ts +8 -16
- package/lib/SubNav/SubNav.d.ts.map +1 -1
- package/lib/SubNav/SubNav.js +3 -6
- package/lib/ToggleSwitch/ToggleSwitch-65936b4b.css +4 -0
- package/lib/ToggleSwitch/ToggleSwitch-65936b4b.css.map +1 -0
- package/lib/ToggleSwitch/ToggleSwitch.d.ts +1 -2
- package/lib/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
- package/lib/ToggleSwitch/ToggleSwitch.js +163 -213
- package/lib/ToggleSwitch/ToggleSwitch.module.css.js +7 -0
- package/lib/ToggleSwitch/ToggleSwitchStoryWrapper.d.ts.map +1 -1
- package/lib/Token/index.d.ts +0 -1
- package/lib/Token/index.d.ts.map +1 -1
- package/lib/TreeView/shared.js +2 -2
- package/lib/VisuallyHidden/VisuallyHidden.d.ts +1 -2
- package/lib/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/lib/VisuallyHidden/VisuallyHidden.js +1 -3
- package/lib/deprecated/UnderlineNav/UnderlineNav.d.ts +2 -3
- package/lib/deprecated/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/lib/deprecated/UnderlineNav/UnderlineNav.js +2 -3
- package/lib/deprecated/index.d.ts +0 -2
- package/lib/deprecated/index.d.ts.map +1 -1
- package/lib/deprecated/index.js +0 -2
- package/lib/hooks/useMnemonics.js +1 -2
- package/lib/index.d.ts +1 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -6
- package/lib/{Caret.d.ts → internal/components/Caret.d.ts} +1 -1
- package/lib/internal/components/Caret.d.ts.map +1 -0
- package/lib-esm/Autocomplete/AutocompleteMenu.js +1 -1
- package/lib-esm/CircleOcticon/CircleOcticon.d.ts +3 -0
- package/lib-esm/CircleOcticon/CircleOcticon.js +3 -0
- package/lib-esm/ConfirmationDialog/ConfirmationDialog.d.ts +8 -0
- package/lib-esm/ConfirmationDialog/ConfirmationDialog.js +6 -2
- package/lib-esm/FilteredActionList/FilteredActionList-96b126d7.css +2 -0
- package/lib-esm/FilteredActionList/FilteredActionList-96b126d7.css.map +1 -0
- package/lib-esm/FilteredActionList/FilteredActionList.js +3 -6
- package/lib-esm/FilteredActionList/FilteredActionList.module.css.js +2 -2
- package/lib-esm/PointerBox/PointerBox.d.ts +1 -1
- package/lib-esm/PointerBox/PointerBox.js +1 -1
- package/lib-esm/ProgressBar/ProgressBar-a0957632.css +2 -0
- package/lib-esm/ProgressBar/ProgressBar-a0957632.css.map +1 -0
- package/lib-esm/ProgressBar/ProgressBar.js +53 -49
- package/lib-esm/ProgressBar/ProgressBar.module.css.js +1 -1
- package/lib-esm/Radio/{Radio-b2a92b7d.css → Radio-df9a5c02.css} +2 -2
- package/lib-esm/Radio/{Radio-b2a92b7d.css.map → Radio-df9a5c02.css.map} +1 -1
- package/lib-esm/Radio/Radio.module.css.js +1 -1
- package/lib-esm/Select/Select.js +61 -53
- package/lib-esm/SelectPanel/SelectPanel.js +1 -1
- package/lib-esm/SplitPageLayout/SplitPageLayout.d.ts +1 -2
- package/lib-esm/Stack/Stack.js +110 -111
- package/lib-esm/StateLabel/StateLabel-cd27f475.css +2 -0
- package/lib-esm/StateLabel/StateLabel-cd27f475.css.map +1 -0
- package/lib-esm/StateLabel/StateLabel.d.ts +1 -2
- package/lib-esm/StateLabel/StateLabel.js +3 -5
- package/lib-esm/StateLabel/StateLabel.module.css.js +5 -0
- package/lib-esm/SubNav/SubNav.d.ts +8 -16
- package/lib-esm/SubNav/SubNav.js +3 -6
- package/lib-esm/ToggleSwitch/ToggleSwitch-65936b4b.css +4 -0
- package/lib-esm/ToggleSwitch/ToggleSwitch-65936b4b.css.map +1 -0
- package/lib-esm/ToggleSwitch/ToggleSwitch.d.ts +1 -2
- package/lib-esm/ToggleSwitch/ToggleSwitch.js +163 -213
- package/lib-esm/ToggleSwitch/ToggleSwitch.module.css.js +5 -0
- package/lib-esm/Token/index.d.ts +0 -1
- package/lib-esm/TreeView/shared.js +2 -2
- package/lib-esm/VisuallyHidden/VisuallyHidden.d.ts +1 -2
- package/lib-esm/VisuallyHidden/VisuallyHidden.js +1 -3
- package/lib-esm/deprecated/UnderlineNav/UnderlineNav.d.ts +2 -3
- package/lib-esm/deprecated/UnderlineNav/UnderlineNav.js +2 -3
- package/lib-esm/deprecated/index.d.ts +0 -2
- package/lib-esm/deprecated/index.js +0 -1
- package/lib-esm/hooks/useMnemonics.js +1 -2
- package/lib-esm/index.d.ts +1 -5
- package/lib-esm/index.js +0 -3
- package/lib-esm/{Caret.d.ts → internal/components/Caret.d.ts} +1 -1
- package/package.json +13 -14
- package/lib/Caret.d.ts.map +0 -1
- package/lib/FilteredActionList/FilteredActionList-d1d6d026.css +0 -2
- package/lib/FilteredActionList/FilteredActionList-d1d6d026.css.map +0 -1
- package/lib/ProgressBar/ProgressBar-430cdef7.css +0 -2
- package/lib/ProgressBar/ProgressBar-430cdef7.css.map +0 -1
- package/lib/Token/AvatarToken-ff45cc85.css +0 -2
- package/lib/Token/AvatarToken-ff45cc85.css.map +0 -1
- package/lib/Token/AvatarToken.d.ts +0 -8
- package/lib/Token/AvatarToken.d.ts.map +0 -1
- package/lib/Token/AvatarToken.js +0 -99
- package/lib/Token/AvatarToken.module.css.js +0 -7
- package/lib/deprecated/AvatarPair/AvatarPair-68990abe.css +0 -2
- package/lib/deprecated/AvatarPair/AvatarPair-68990abe.css.map +0 -1
- package/lib/deprecated/AvatarPair/AvatarPair.d.ts +0 -14
- package/lib/deprecated/AvatarPair/AvatarPair.d.ts.map +0 -1
- package/lib/deprecated/AvatarPair/AvatarPair.js +0 -95
- package/lib/deprecated/AvatarPair/AvatarPair.module.css.js +0 -7
- package/lib/deprecated/AvatarPair/index.d.ts +0 -3
- package/lib/deprecated/AvatarPair/index.d.ts.map +0 -1
- package/lib/node_modules/@github/mini-throttle/dist/index.js +0 -43
- package/lib-esm/FilteredActionList/FilteredActionList-d1d6d026.css +0 -2
- package/lib-esm/FilteredActionList/FilteredActionList-d1d6d026.css.map +0 -1
- package/lib-esm/ProgressBar/ProgressBar-430cdef7.css +0 -2
- package/lib-esm/ProgressBar/ProgressBar-430cdef7.css.map +0 -1
- package/lib-esm/Token/AvatarToken-ff45cc85.css +0 -2
- package/lib-esm/Token/AvatarToken-ff45cc85.css.map +0 -1
- package/lib-esm/Token/AvatarToken.d.ts +0 -8
- package/lib-esm/Token/AvatarToken.js +0 -97
- package/lib-esm/Token/AvatarToken.module.css.js +0 -5
- package/lib-esm/deprecated/AvatarPair/AvatarPair-68990abe.css +0 -2
- package/lib-esm/deprecated/AvatarPair/AvatarPair-68990abe.css.map +0 -1
- package/lib-esm/deprecated/AvatarPair/AvatarPair.d.ts +0 -14
- package/lib-esm/deprecated/AvatarPair/AvatarPair.js +0 -89
- package/lib-esm/deprecated/AvatarPair/AvatarPair.module.css.js +0 -5
- package/lib-esm/deprecated/AvatarPair/index.d.ts +0 -3
- package/lib-esm/node_modules/@github/mini-throttle/dist/index.js +0 -40
- /package/lib/{Caret.js → internal/components/Caret.js} +0 -0
- /package/lib-esm/{Caret.js → internal/components/Caret.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ToggleSwitch/ToggleSwitch.module.css"],"names":[],"mappings":"AAAA,qCAEE,kBAAmB,CADnB,mBAAoB,CAEpB,0BACF,CAEA,uEACE,kBACF,CAEA,mCAIE,oDAA6B,CAE7B,cAAe,CADf,8CAAuC,CAJvC,oCAA+B,CAC/B,qCAAgC,CAChC,iBAIF,CAEA,oDACE,4CACF,CAEA,uDACE,gDAA2B,CAC3B,kBACF,CAEA,uCACE,gBACF,CAEA,yDAEE,QAAS,CADT,iBAEF,CAEA,sCAEE,kBAAmB,CADnB,YAAa,CAGb,WAAY,CACZ,eAAgB,CAFhB,UAGF,CAEA,gCAGE,cAAe,CAFf,WAAY,CACZ,aAAc,CAGd,aAAc,CAEd,wBAAyB,CADzB,6BAEF,CAEA,8CACE,oIAA2G,CAC3G,uBACF,CAEA,kEACE,2BACF,CAEA,kEACE;;GAIF,CAEA,+CACE,8GAA2F,CAC3F,0BACF,CAEA,mEACE,uBACF,CAEA,mEACE,sIACF","file":"ToggleSwitch-65936b4b.css","sourcesContent":[".ToggleSwitch {\n display: inline-flex;\n align-items: center;\n flex-direction: row-reverse;\n}\n\n.ToggleSwitch[data-status-label-position='start'] {\n flex-direction: row;\n}\n\n.StatusText {\n margin-left: var(--base-size-8);\n margin-right: var(--base-size-8);\n position: relative;\n color: var(--fgColor-default);\n font-size: var(--text-body-size-medium);\n cursor: pointer;\n}\n\n.StatusText[data-size='small'] {\n font-size: var(--text-body-size-small);\n}\n\n.StatusText[data-disabled='true'] {\n color: var(--fgColor-muted);\n cursor: not-allowed;\n}\n\n.StatusTextItem {\n text-align: right;\n}\n\n.StatusTextItem[data-hidden='true'] {\n visibility: hidden;\n height: 0;\n}\n\n.IconContainer {\n display: flex;\n align-items: center;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n.IconBox {\n flex-grow: 1;\n flex-shrink: 0;\n flex-basis: 50%;\n /* stylelint-disable-next-line primer/typography */\n line-height: 0;\n transition-property: transform;\n transition-duration: 80ms;\n}\n\n.IconBox[data-type='on'] {\n color: var(--control-checked-fgColor-rest, var(--color-switch-track-checked-fg, var(--fgColor-onEmphasis)));\n transform: translateX(0);\n}\n\n.IconBox[data-type='on'][data-checked='false'] {\n transform: translateX(-100%);\n}\n\n.IconBox[data-type='on'][data-disabled='true'] {\n color: var(\n --control-checked-fgColor-disabled,\n var(--color-switch-track-checked-disabled-fg, var(--fgColor-onEmphasis))\n );\n}\n\n.IconBox[data-type='off'] {\n color: var(--controlTrack-fgColor-rest, var(--color-switch-track-fg, var(--fgColor-muted)));\n transform: translateX(100%);\n}\n\n.IconBox[data-type='off'][data-checked='false'] {\n transform: translateX(0);\n}\n\n.IconBox[data-type='off'][data-disabled='true'] {\n color: var(--controlTrack-fgColor-disabled, var(--color-switch-track-disabled-fg, var(--fgColor-onEmphasis)));\n}\n"]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { MouseEventHandler } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { SxProp } from '../sx';
|
|
4
3
|
import type { CellAlignment } from '../DataTable/column';
|
|
5
|
-
export interface ToggleSwitchProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'
|
|
4
|
+
export interface ToggleSwitchProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
6
5
|
/** The id of the DOM node that labels the switch */
|
|
7
6
|
['aria-labelledby']: string;
|
|
8
7
|
/** Uncontrolled - whether the switch is turned on */
|
|
@@ -2,18 +2,17 @@ import { c } from 'react-compiler-runtime';
|
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
4
|
import { variant } from 'styled-system';
|
|
5
|
+
import { clsx } from 'clsx';
|
|
5
6
|
import { get } from '../constants.js';
|
|
6
|
-
import sx from '../sx.js';
|
|
7
7
|
import getGlobalFocusStyles from '../internal/utils/getGlobalFocusStyles.js';
|
|
8
8
|
import VisuallyHidden from '../_VisuallyHidden.js';
|
|
9
9
|
import useSafeTimeout from '../hooks/useSafeTimeout.js';
|
|
10
|
+
import classes from './ToggleSwitch.module.css.js';
|
|
10
11
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
12
|
import { useProvidedStateOrCreate } from '../hooks/useProvidedStateOrCreate.js';
|
|
12
13
|
import { useId } from '../hooks/useId.js';
|
|
13
|
-
import Box from '../Box/Box.js';
|
|
14
14
|
import { AriaStatus } from '../live-region/AriaStatus.js';
|
|
15
15
|
import StyledSpinner from '../Spinner/Spinner.js';
|
|
16
|
-
import Text from '../Text/Text.js';
|
|
17
16
|
|
|
18
17
|
const TRANSITION_DURATION = '80ms';
|
|
19
18
|
const EASE_OUT_QUAD_CURVE = 'cubic-bezier(0.5, 1, 0.89, 1)';
|
|
@@ -101,7 +100,7 @@ const LineIcon = t0 => {
|
|
|
101
100
|
const SwitchButton = styled.button.withConfig({
|
|
102
101
|
displayName: "ToggleSwitch__SwitchButton",
|
|
103
102
|
componentId: "sc-e6gszy-0"
|
|
104
|
-
})(["vertical-align:middle;cursor:pointer;user-select:none;appearance:none;text-decoration:none;padding:0;transition-property:background-color,border-color;transition-duration:", ";transition-timing-function:", ";border-radius:", ";border-style:solid;border-width:1px;display:block;height:32px;width:64px;position:relative;overflow:hidden;", ";@media (pointer:coarse){&:before{content:'';position:absolute;left:0;right:0;transform:translateY(-50%);top:50%;min-height:44px;}}@media (prefers-reduced-motion){transition:none;*{transition:none;}}&:hover:not(:disabled):not([aria-disabled='true']),&:focus:focus-visible{background-color:", ";}&:active,&:active:focus-visible{background-color:", ";}", " ", "
|
|
103
|
+
})(["vertical-align:middle;cursor:pointer;user-select:none;appearance:none;text-decoration:none;padding:0;transition-property:background-color,border-color;transition-duration:", ";transition-timing-function:", ";border-radius:", ";border-style:solid;border-width:1px;display:block;height:32px;width:64px;position:relative;overflow:hidden;", ";@media (pointer:coarse){&:before{content:'';position:absolute;left:0;right:0;transform:translateY(-50%);top:50%;min-height:44px;}}@media (prefers-reduced-motion){transition:none;*{transition:none;}}&:hover:not(:disabled):not([aria-disabled='true']),&:focus:focus-visible{background-color:", ";}&:active,&:active:focus-visible{background-color:", ";}", " ", ""], TRANSITION_DURATION, EASE_OUT_QUAD_CURVE, get('radii.2'), getGlobalFocusStyles('3px'), get('colors.switchTrack.hoverBg'), get('colors.switchTrack.activeBg'), props => {
|
|
105
104
|
if (props['aria-disabled']) {
|
|
106
105
|
return css(["@media (forced-colors:active){border-color:GrayText;}background-color:", ";border-color:transparent;cursor:not-allowed;transition-property:none;"], get('colors.switchTrack.disabledBg'));
|
|
107
106
|
}
|
|
@@ -110,7 +109,7 @@ const SwitchButton = styled.button.withConfig({
|
|
|
110
109
|
} else {
|
|
111
110
|
return css(["background-color:", ";border-color:var(--controlTrack-borderColor-rest,transparent);&:active{background-color:", ";}"], get('colors.switchTrack.bg'), get('colors.switchTrack.activeBg'));
|
|
112
111
|
}
|
|
113
|
-
},
|
|
112
|
+
}, sizeVariants);
|
|
114
113
|
const ToggleKnob = styled.div.withConfig({
|
|
115
114
|
displayName: "ToggleSwitch__ToggleKnob",
|
|
116
115
|
componentId: "sc-e6gszy-1"
|
|
@@ -122,22 +121,18 @@ const ToggleKnob = styled.div.withConfig({
|
|
|
122
121
|
return css(["border-color:", ";"], get('colors.switchKnob.checked.border'));
|
|
123
122
|
}
|
|
124
123
|
});
|
|
125
|
-
const hiddenTextStyles = {
|
|
126
|
-
visibility: 'hidden',
|
|
127
|
-
height: 0
|
|
128
|
-
};
|
|
129
124
|
const ToggleSwitch = /*#__PURE__*/React.forwardRef(function ToggleSwitch(props, ref) {
|
|
130
|
-
const $ = c(
|
|
125
|
+
const $ = c(89);
|
|
131
126
|
let ariaDescribedby;
|
|
132
127
|
let ariaLabelledby;
|
|
133
128
|
let checked;
|
|
129
|
+
let className;
|
|
134
130
|
let defaultChecked;
|
|
135
131
|
let disabled;
|
|
136
132
|
let loading;
|
|
137
133
|
let onChange;
|
|
138
134
|
let onClick;
|
|
139
135
|
let rest;
|
|
140
|
-
let sxProp;
|
|
141
136
|
let t0;
|
|
142
137
|
let t1;
|
|
143
138
|
let t2;
|
|
@@ -158,20 +153,20 @@ const ToggleSwitch = /*#__PURE__*/React.forwardRef(function ToggleSwitch(props,
|
|
|
158
153
|
statusLabelPosition: t2,
|
|
159
154
|
loadingLabelDelay: t3,
|
|
160
155
|
loadingLabel: t4,
|
|
161
|
-
|
|
156
|
+
className,
|
|
162
157
|
...rest
|
|
163
158
|
} = props);
|
|
164
159
|
$[0] = props;
|
|
165
160
|
$[1] = ariaDescribedby;
|
|
166
161
|
$[2] = ariaLabelledby;
|
|
167
162
|
$[3] = checked;
|
|
168
|
-
$[4] =
|
|
169
|
-
$[5] =
|
|
170
|
-
$[6] =
|
|
171
|
-
$[7] =
|
|
172
|
-
$[8] =
|
|
173
|
-
$[9] =
|
|
174
|
-
$[10] =
|
|
163
|
+
$[4] = className;
|
|
164
|
+
$[5] = defaultChecked;
|
|
165
|
+
$[6] = disabled;
|
|
166
|
+
$[7] = loading;
|
|
167
|
+
$[8] = onChange;
|
|
168
|
+
$[9] = onClick;
|
|
169
|
+
$[10] = rest;
|
|
175
170
|
$[11] = t0;
|
|
176
171
|
$[12] = t1;
|
|
177
172
|
$[13] = t2;
|
|
@@ -181,13 +176,13 @@ const ToggleSwitch = /*#__PURE__*/React.forwardRef(function ToggleSwitch(props,
|
|
|
181
176
|
ariaDescribedby = $[1];
|
|
182
177
|
ariaLabelledby = $[2];
|
|
183
178
|
checked = $[3];
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
179
|
+
className = $[4];
|
|
180
|
+
defaultChecked = $[5];
|
|
181
|
+
disabled = $[6];
|
|
182
|
+
loading = $[7];
|
|
183
|
+
onChange = $[8];
|
|
184
|
+
onClick = $[9];
|
|
185
|
+
rest = $[10];
|
|
191
186
|
t0 = $[11];
|
|
192
187
|
t1 = $[12];
|
|
193
188
|
t2 = $[13];
|
|
@@ -279,10 +274,17 @@ const ToggleSwitch = /*#__PURE__*/React.forwardRef(function ToggleSwitch(props,
|
|
|
279
274
|
if (ariaDescribedby) {
|
|
280
275
|
switchButtonDescribedBy = `${switchButtonDescribedBy} ${ariaDescribedby}`;
|
|
281
276
|
}
|
|
282
|
-
|
|
277
|
+
let t10;
|
|
278
|
+
if ($[35] !== className) {
|
|
279
|
+
t10 = clsx(classes.ToggleSwitch, className);
|
|
280
|
+
$[35] = className;
|
|
281
|
+
$[36] = t10;
|
|
282
|
+
} else {
|
|
283
|
+
t10 = $[36];
|
|
284
|
+
}
|
|
283
285
|
const t11 = isLoadingLabelVisible && loadingLabel;
|
|
284
286
|
let t12;
|
|
285
|
-
if ($[
|
|
287
|
+
if ($[37] !== loadingLabelId || $[38] !== t11) {
|
|
286
288
|
t12 = /*#__PURE__*/jsx(VisuallyHidden, {
|
|
287
289
|
children: /*#__PURE__*/jsx(AriaStatus, {
|
|
288
290
|
announceOnShow: true,
|
|
@@ -290,251 +292,199 @@ const ToggleSwitch = /*#__PURE__*/React.forwardRef(function ToggleSwitch(props,
|
|
|
290
292
|
children: t11
|
|
291
293
|
})
|
|
292
294
|
});
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
295
|
+
$[37] = loadingLabelId;
|
|
296
|
+
$[38] = t11;
|
|
297
|
+
$[39] = t12;
|
|
296
298
|
} else {
|
|
297
|
-
t12 = $[
|
|
299
|
+
t12 = $[39];
|
|
298
300
|
}
|
|
299
301
|
let t13;
|
|
300
|
-
if ($[
|
|
302
|
+
if ($[40] !== loading) {
|
|
301
303
|
t13 = loading ? /*#__PURE__*/jsx(StyledSpinner, {
|
|
302
304
|
size: "small",
|
|
303
305
|
srText: null
|
|
304
306
|
}) : null;
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
307
|
-
} else {
|
|
308
|
-
t13 = $[39];
|
|
309
|
-
}
|
|
310
|
-
const t14 = acceptsInteraction ? "fg.default" : "fg.muted";
|
|
311
|
-
const t15 = size === "small" ? 0 : 1;
|
|
312
|
-
const t16 = acceptsInteraction ? "pointer" : "not-allowed";
|
|
313
|
-
let t17;
|
|
314
|
-
if ($[40] !== t16) {
|
|
315
|
-
t17 = {
|
|
316
|
-
position: "relative",
|
|
317
|
-
cursor: t16
|
|
318
|
-
};
|
|
319
|
-
$[40] = t16;
|
|
320
|
-
$[41] = t17;
|
|
307
|
+
$[40] = loading;
|
|
308
|
+
$[41] = t13;
|
|
321
309
|
} else {
|
|
322
|
-
|
|
310
|
+
t13 = $[41];
|
|
323
311
|
}
|
|
324
|
-
const
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
312
|
+
const t14 = !acceptsInteraction;
|
|
313
|
+
const t15 = !isOn;
|
|
314
|
+
let t16;
|
|
315
|
+
if ($[42] !== t15) {
|
|
316
|
+
t16 = /*#__PURE__*/jsx("div", {
|
|
317
|
+
className: classes.StatusTextItem,
|
|
318
|
+
"data-hidden": t15,
|
|
330
319
|
children: "On"
|
|
331
320
|
});
|
|
332
|
-
$[42] =
|
|
333
|
-
$[43] =
|
|
321
|
+
$[42] = t15;
|
|
322
|
+
$[43] = t16;
|
|
334
323
|
} else {
|
|
335
|
-
|
|
324
|
+
t16 = $[43];
|
|
336
325
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
sx: t20,
|
|
326
|
+
let t17;
|
|
327
|
+
if ($[44] !== isOn) {
|
|
328
|
+
t17 = /*#__PURE__*/jsx("div", {
|
|
329
|
+
className: classes.StatusTextItem,
|
|
330
|
+
"data-hidden": isOn,
|
|
343
331
|
children: "Off"
|
|
344
332
|
});
|
|
345
|
-
$[44] =
|
|
346
|
-
$[45] =
|
|
333
|
+
$[44] = isOn;
|
|
334
|
+
$[45] = t17;
|
|
347
335
|
} else {
|
|
348
|
-
|
|
336
|
+
t17 = $[45];
|
|
349
337
|
}
|
|
350
|
-
let
|
|
351
|
-
if ($[46] !== handleToggleClick || $[47] !==
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
338
|
+
let t18;
|
|
339
|
+
if ($[46] !== handleToggleClick || $[47] !== size || $[48] !== t14 || $[49] !== t16 || $[50] !== t17) {
|
|
340
|
+
t18 = /*#__PURE__*/jsxs("span", {
|
|
341
|
+
className: classes.StatusText,
|
|
342
|
+
"data-size": size,
|
|
343
|
+
"data-disabled": t14,
|
|
356
344
|
"aria-hidden": "true",
|
|
357
|
-
sx: t17,
|
|
358
345
|
onClick: handleToggleClick,
|
|
359
|
-
children: [
|
|
346
|
+
children: [t16, t17]
|
|
360
347
|
});
|
|
361
348
|
$[46] = handleToggleClick;
|
|
362
|
-
$[47] =
|
|
363
|
-
$[48] =
|
|
364
|
-
$[49] =
|
|
365
|
-
$[50] =
|
|
366
|
-
$[51] =
|
|
367
|
-
$[52] = t22;
|
|
368
|
-
} else {
|
|
369
|
-
t22 = $[52];
|
|
370
|
-
}
|
|
371
|
-
const t23 = isLoadingLabelVisible || ariaDescribedby ? switchButtonDescribedBy : undefined;
|
|
372
|
-
const t24 = !acceptsInteraction;
|
|
373
|
-
const t25 = acceptsInteraction ? "switchTrack.checked.fg" : "switchTrack.checked.disabledFg";
|
|
374
|
-
const t26 = `translateX(${isOn ? "0" : "-100%"})`;
|
|
375
|
-
let t27;
|
|
376
|
-
if ($[53] !== t26) {
|
|
377
|
-
t27 = {
|
|
378
|
-
transform: t26,
|
|
379
|
-
transitionProperty: "transform",
|
|
380
|
-
transitionDuration: TRANSITION_DURATION
|
|
381
|
-
};
|
|
382
|
-
$[53] = t26;
|
|
383
|
-
$[54] = t27;
|
|
349
|
+
$[47] = size;
|
|
350
|
+
$[48] = t14;
|
|
351
|
+
$[49] = t16;
|
|
352
|
+
$[50] = t17;
|
|
353
|
+
$[51] = t18;
|
|
384
354
|
} else {
|
|
385
|
-
|
|
355
|
+
t18 = $[51];
|
|
386
356
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
357
|
+
const t19 = isLoadingLabelVisible || ariaDescribedby ? switchButtonDescribedBy : undefined;
|
|
358
|
+
const t20 = !acceptsInteraction;
|
|
359
|
+
const t21 = !acceptsInteraction;
|
|
360
|
+
let t22;
|
|
361
|
+
if ($[52] !== size) {
|
|
362
|
+
t22 = /*#__PURE__*/jsx(LineIcon, {
|
|
390
363
|
size: size
|
|
391
364
|
});
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
365
|
+
$[52] = size;
|
|
366
|
+
$[53] = t22;
|
|
394
367
|
} else {
|
|
395
|
-
|
|
368
|
+
t22 = $[53];
|
|
396
369
|
}
|
|
397
|
-
let
|
|
398
|
-
if ($[
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
sx: t27,
|
|
406
|
-
children: t28
|
|
370
|
+
let t23;
|
|
371
|
+
if ($[54] !== isOn || $[55] !== t21 || $[56] !== t22) {
|
|
372
|
+
t23 = /*#__PURE__*/jsx("div", {
|
|
373
|
+
className: classes.IconBox,
|
|
374
|
+
"data-type": "on",
|
|
375
|
+
"data-checked": isOn,
|
|
376
|
+
"data-disabled": t21,
|
|
377
|
+
children: t22
|
|
407
378
|
});
|
|
408
|
-
$[
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
411
|
-
$[
|
|
412
|
-
} else {
|
|
413
|
-
t29 = $[60];
|
|
414
|
-
}
|
|
415
|
-
const t30 = acceptsInteraction ? "switchTrack.fg" : "switchTrack.disabledFg";
|
|
416
|
-
const t31 = `translateX(${isOn ? "100%" : "0"})`;
|
|
417
|
-
let t32;
|
|
418
|
-
if ($[61] !== t31) {
|
|
419
|
-
t32 = {
|
|
420
|
-
transform: t31,
|
|
421
|
-
transitionProperty: "transform",
|
|
422
|
-
transitionDuration: TRANSITION_DURATION
|
|
423
|
-
};
|
|
424
|
-
$[61] = t31;
|
|
425
|
-
$[62] = t32;
|
|
379
|
+
$[54] = isOn;
|
|
380
|
+
$[55] = t21;
|
|
381
|
+
$[56] = t22;
|
|
382
|
+
$[57] = t23;
|
|
426
383
|
} else {
|
|
427
|
-
|
|
384
|
+
t23 = $[57];
|
|
428
385
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
386
|
+
const t24 = !acceptsInteraction;
|
|
387
|
+
let t25;
|
|
388
|
+
if ($[58] !== size) {
|
|
389
|
+
t25 = /*#__PURE__*/jsx(CircleIcon, {
|
|
432
390
|
size: size
|
|
433
391
|
});
|
|
434
|
-
$[
|
|
435
|
-
$[
|
|
392
|
+
$[58] = size;
|
|
393
|
+
$[59] = t25;
|
|
436
394
|
} else {
|
|
437
|
-
|
|
395
|
+
t25 = $[59];
|
|
438
396
|
}
|
|
439
|
-
let
|
|
440
|
-
if ($[
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
sx: t32,
|
|
448
|
-
children: t33
|
|
397
|
+
let t26;
|
|
398
|
+
if ($[60] !== isOn || $[61] !== t24 || $[62] !== t25) {
|
|
399
|
+
t26 = /*#__PURE__*/jsx("div", {
|
|
400
|
+
className: classes.IconBox,
|
|
401
|
+
"data-type": "off",
|
|
402
|
+
"data-checked": isOn,
|
|
403
|
+
"data-disabled": t24,
|
|
404
|
+
children: t25
|
|
449
405
|
});
|
|
450
|
-
$[
|
|
451
|
-
$[
|
|
452
|
-
$[
|
|
453
|
-
$[
|
|
406
|
+
$[60] = isOn;
|
|
407
|
+
$[61] = t24;
|
|
408
|
+
$[62] = t25;
|
|
409
|
+
$[63] = t26;
|
|
454
410
|
} else {
|
|
455
|
-
|
|
411
|
+
t26 = $[63];
|
|
456
412
|
}
|
|
457
|
-
let
|
|
458
|
-
if ($[
|
|
459
|
-
|
|
413
|
+
let t27;
|
|
414
|
+
if ($[64] !== t23 || $[65] !== t26) {
|
|
415
|
+
t27 = /*#__PURE__*/jsxs("div", {
|
|
460
416
|
"aria-hidden": "true",
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
width: "100%",
|
|
464
|
-
height: "100%",
|
|
465
|
-
overflow: "hidden",
|
|
466
|
-
children: [t29, t34]
|
|
417
|
+
className: classes.IconContainer,
|
|
418
|
+
children: [t23, t26]
|
|
467
419
|
});
|
|
468
|
-
$[
|
|
469
|
-
$[
|
|
470
|
-
$[
|
|
420
|
+
$[64] = t23;
|
|
421
|
+
$[65] = t26;
|
|
422
|
+
$[66] = t27;
|
|
471
423
|
} else {
|
|
472
|
-
|
|
424
|
+
t27 = $[66];
|
|
473
425
|
}
|
|
474
|
-
const
|
|
475
|
-
let
|
|
476
|
-
if ($[
|
|
477
|
-
|
|
426
|
+
const t28 = !acceptsInteraction;
|
|
427
|
+
let t29;
|
|
428
|
+
if ($[67] !== isOn || $[68] !== t28) {
|
|
429
|
+
t29 = /*#__PURE__*/jsx(ToggleKnob, {
|
|
478
430
|
"aria-hidden": "true",
|
|
479
|
-
"aria-disabled":
|
|
431
|
+
"aria-disabled": t28,
|
|
480
432
|
checked: isOn
|
|
481
433
|
});
|
|
482
|
-
$[
|
|
483
|
-
$[
|
|
484
|
-
$[
|
|
434
|
+
$[67] = isOn;
|
|
435
|
+
$[68] = t28;
|
|
436
|
+
$[69] = t29;
|
|
485
437
|
} else {
|
|
486
|
-
|
|
438
|
+
t29 = $[69];
|
|
487
439
|
}
|
|
488
|
-
let
|
|
489
|
-
if ($[
|
|
490
|
-
|
|
440
|
+
let t30;
|
|
441
|
+
if ($[70] !== ariaLabelledby || $[71] !== buttonType || $[72] !== handleToggleClick || $[73] !== isOn || $[74] !== ref || $[75] !== size || $[76] !== t19 || $[77] !== t20 || $[78] !== t27 || $[79] !== t29) {
|
|
442
|
+
t30 = /*#__PURE__*/jsxs(SwitchButton, {
|
|
491
443
|
ref: ref,
|
|
492
444
|
type: buttonType,
|
|
493
445
|
onClick: handleToggleClick,
|
|
494
446
|
"aria-labelledby": ariaLabelledby,
|
|
495
|
-
"aria-describedby":
|
|
447
|
+
"aria-describedby": t19,
|
|
496
448
|
"aria-pressed": isOn,
|
|
497
449
|
checked: isOn,
|
|
498
450
|
size: size,
|
|
499
|
-
"aria-disabled":
|
|
500
|
-
children: [
|
|
451
|
+
"aria-disabled": t20,
|
|
452
|
+
children: [t27, t29]
|
|
501
453
|
});
|
|
502
|
-
$[
|
|
503
|
-
$[
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
509
|
-
$[
|
|
510
|
-
$[
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
454
|
+
$[70] = ariaLabelledby;
|
|
455
|
+
$[71] = buttonType;
|
|
456
|
+
$[72] = handleToggleClick;
|
|
457
|
+
$[73] = isOn;
|
|
458
|
+
$[74] = ref;
|
|
459
|
+
$[75] = size;
|
|
460
|
+
$[76] = t19;
|
|
461
|
+
$[77] = t20;
|
|
462
|
+
$[78] = t27;
|
|
463
|
+
$[79] = t29;
|
|
464
|
+
$[80] = t30;
|
|
513
465
|
} else {
|
|
514
|
-
|
|
466
|
+
t30 = $[80];
|
|
515
467
|
}
|
|
516
|
-
let
|
|
517
|
-
if ($[
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
flexDirection: t10,
|
|
522
|
-
sx: sxProp,
|
|
468
|
+
let t31;
|
|
469
|
+
if ($[81] !== rest || $[82] !== statusLabelPosition || $[83] !== t10 || $[84] !== t12 || $[85] !== t13 || $[86] !== t18 || $[87] !== t30) {
|
|
470
|
+
t31 = /*#__PURE__*/jsxs("div", {
|
|
471
|
+
className: t10,
|
|
472
|
+
"data-status-label-position": statusLabelPosition,
|
|
523
473
|
...rest,
|
|
524
|
-
children: [t12, t13,
|
|
474
|
+
children: [t12, t13, t18, t30]
|
|
525
475
|
});
|
|
526
|
-
$[
|
|
527
|
-
$[
|
|
528
|
-
$[
|
|
529
|
-
$[
|
|
530
|
-
$[
|
|
531
|
-
$[
|
|
532
|
-
$[
|
|
533
|
-
$[
|
|
476
|
+
$[81] = rest;
|
|
477
|
+
$[82] = statusLabelPosition;
|
|
478
|
+
$[83] = t10;
|
|
479
|
+
$[84] = t12;
|
|
480
|
+
$[85] = t13;
|
|
481
|
+
$[86] = t18;
|
|
482
|
+
$[87] = t30;
|
|
483
|
+
$[88] = t31;
|
|
534
484
|
} else {
|
|
535
|
-
|
|
485
|
+
t31 = $[88];
|
|
536
486
|
}
|
|
537
|
-
return
|
|
487
|
+
return t31;
|
|
538
488
|
});
|
|
539
489
|
if (process.env.NODE_ENV !== "production") {
|
|
540
490
|
ToggleSwitch.displayName = 'ToggleSwitch';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './ToggleSwitch-65936b4b.css';
|
|
2
|
+
|
|
3
|
+
var classes = {"ToggleSwitch":"prc-ToggleSwitch-ToggleSwitch-E4lp0","StatusText":"prc-ToggleSwitch-StatusText-hWpj2","StatusTextItem":"prc-ToggleSwitch-StatusTextItem-fvvXa","IconContainer":"prc-ToggleSwitch-IconContainer-zLC02","IconBox":"prc-ToggleSwitch-IconBox-NNOYG"};
|
|
4
|
+
|
|
5
|
+
export { classes as default };
|
package/lib-esm/Token/index.d.ts
CHANGED
|
@@ -3,5 +3,4 @@ export { default } from './Token';
|
|
|
3
3
|
export type { TokenProps } from './Token';
|
|
4
4
|
export { default as IssueLabelToken } from './IssueLabelToken';
|
|
5
5
|
export type { IssueLabelTokenProps } from './IssueLabelToken';
|
|
6
|
-
export { default as AvatarToken } from './AvatarToken';
|
|
7
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Returns the accessible name of an element
|
|
3
3
|
*/
|
|
4
4
|
function getAccessibleName(element) {
|
|
5
|
-
var _document$getElementB, _document$getElementB2
|
|
5
|
+
var _document$getElementB, _document$getElementB2;
|
|
6
6
|
const label = element.getAttribute('aria-label');
|
|
7
7
|
const labelledby = element.getAttribute('aria-labelledby');
|
|
8
8
|
if (label) return label;
|
|
9
9
|
if (labelledby) return (_document$getElementB = (_document$getElementB2 = document.getElementById(labelledby)) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2.textContent) !== null && _document$getElementB !== void 0 ? _document$getElementB : '';
|
|
10
|
-
return
|
|
10
|
+
return element.textContent;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export { getAccessibleName };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { SxProp } from '../sx';
|
|
2
1
|
import type React from 'react';
|
|
3
2
|
import { type HTMLAttributes } from 'react';
|
|
4
3
|
/**
|
|
@@ -14,5 +13,5 @@ import { type HTMLAttributes } from 'react';
|
|
|
14
13
|
export declare const VisuallyHidden: ({ className, children, ...rest }: VisuallyHiddenProps) => React.JSX.Element;
|
|
15
14
|
export type VisuallyHiddenProps = React.PropsWithChildren<HTMLAttributes<HTMLSpanElement> & {
|
|
16
15
|
className?: string;
|
|
17
|
-
}
|
|
16
|
+
}>;
|
|
18
17
|
//# sourceMappingURL=VisuallyHidden.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import classes from './VisuallyHidden.module.css.js';
|
|
4
|
-
import { BoxWithFallback } from '../internal/components/BoxWithFallback.js';
|
|
5
4
|
import { jsx } from 'react/jsx-runtime';
|
|
6
5
|
|
|
7
6
|
const VisuallyHidden = t0 => {
|
|
@@ -34,8 +33,7 @@ const VisuallyHidden = t0 => {
|
|
|
34
33
|
}
|
|
35
34
|
let t2;
|
|
36
35
|
if ($[6] !== children || $[7] !== rest || $[8] !== t1) {
|
|
37
|
-
t2 = /*#__PURE__*/jsx(
|
|
38
|
-
as: "span",
|
|
36
|
+
t2 = /*#__PURE__*/jsx("span", {
|
|
39
37
|
className: t1,
|
|
40
38
|
...rest,
|
|
41
39
|
children: children
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { To } from 'history';
|
|
2
2
|
import type React from 'react';
|
|
3
|
-
import type { SxProp } from '../../sx';
|
|
4
3
|
import type { ComponentProps } from '../../utils/types';
|
|
5
|
-
declare const UnderlineNavBase: import("styled-components").StyledComponent<"nav", any,
|
|
4
|
+
declare const UnderlineNavBase: import("styled-components").StyledComponent<"nav", any, {}, never>;
|
|
6
5
|
export type UnderlineNavProps = {
|
|
7
6
|
actions?: React.ReactNode;
|
|
8
7
|
align?: 'right';
|
|
@@ -13,7 +12,7 @@ declare function UnderlineNav({ actions, className, align, children, full, label
|
|
|
13
12
|
type StyledUnderlineNavLinkProps = {
|
|
14
13
|
to?: To;
|
|
15
14
|
selected?: boolean;
|
|
16
|
-
}
|
|
15
|
+
};
|
|
17
16
|
declare const UnderlineNavLink: import("styled-components").StyledComponent<"a", any, StyledUnderlineNavLinkProps, never>;
|
|
18
17
|
export type UnderlineNavLinkProps = ComponentProps<typeof UnderlineNavLink>;
|
|
19
18
|
/**
|
|
@@ -2,7 +2,6 @@ import { c } from 'react-compiler-runtime';
|
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { get } from '../../constants.js';
|
|
5
|
-
import sx from '../../sx.js';
|
|
6
5
|
import getGlobalFocusStyles from '../../internal/utils/getGlobalFocusStyles.js';
|
|
7
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
7
|
|
|
@@ -11,7 +10,7 @@ const SELECTED_CLASS = 'PRC-selected';
|
|
|
11
10
|
const UnderlineNavBase = styled.nav.withConfig({
|
|
12
11
|
displayName: "UnderlineNav__UnderlineNavBase",
|
|
13
12
|
componentId: "sc-11ejk33-0"
|
|
14
|
-
})(["display:flex;justify-content:space-between;border-bottom:1px solid ", ";&.PRC-UnderlineNav--right{justify-content:flex-end;.PRC-UnderlineNav-item{margin-right:0;margin-left:", ";}.PRC-UnderlineNav-actions{flex:1 1 auto;}}&.PRC-UnderlineNav--full{display:block;}.PRC-UnderlineNav-body{display:flex;margin-bottom:-1px;}.PRC-UnderlineNav-actions{align-self:center;}"
|
|
13
|
+
})(["display:flex;justify-content:space-between;border-bottom:1px solid ", ";&.PRC-UnderlineNav--right{justify-content:flex-end;.PRC-UnderlineNav-item{margin-right:0;margin-left:", ";}.PRC-UnderlineNav-actions{flex:1 1 auto;}}&.PRC-UnderlineNav--full{display:block;}.PRC-UnderlineNav-body{display:flex;margin-bottom:-1px;}.PRC-UnderlineNav-actions{align-self:center;}"], get('colors.border.muted'), get('space.3'));
|
|
15
14
|
function UnderlineNav(t0) {
|
|
16
15
|
const $ = c(24);
|
|
17
16
|
let actions;
|
|
@@ -113,7 +112,7 @@ const UnderlineNavLink = styled.a.attrs(props => ({
|
|
|
113
112
|
})).withConfig({
|
|
114
113
|
displayName: "UnderlineNav__UnderlineNavLink",
|
|
115
114
|
componentId: "sc-11ejk33-1"
|
|
116
|
-
})(["padding:", " ", ";margin-right:", ";font-size:", ";line-height:", ";color:", ";text-align:center;border-bottom:2px solid transparent;text-decoration:none;&:hover,&:focus{color:", ";text-decoration:none;border-bottom-color:", ";transition:border-bottom-color 0.2s ease;.PRC-UnderlineNav-octicon{color:", ";}}&.PRC-selected{color:", ";border-bottom-color:", ";.PRC-UnderlineNav-octicon{color:", ";}}", ";"
|
|
115
|
+
})(["padding:", " ", ";margin-right:", ";font-size:", ";line-height:", ";color:", ";text-align:center;border-bottom:2px solid transparent;text-decoration:none;&:hover,&:focus{color:", ";text-decoration:none;border-bottom-color:", ";transition:border-bottom-color 0.2s ease;.PRC-UnderlineNav-octicon{color:", ";}}&.PRC-selected{color:", ";border-bottom-color:", ";.PRC-UnderlineNav-octicon{color:", ";}}", ";"], get('space.3'), get('space.2'), get('space.3'), get('fontSizes.1'), get('lineHeights.default'), get('colors.fg.default'), get('colors.fg.default'), get('colors.neutral.muted'), get('colors.fg.muted'), get('colors.fg.default'), get('colors.primer.border.active'), get('colors.fg.default'), getGlobalFocusStyles('-8px'));
|
|
117
116
|
UnderlineNavLink.displayName = 'UnderlineNav.Link';
|
|
118
117
|
/**
|
|
119
118
|
* @deprecated UnderlineNav is deprecated and will be replaced by the draft `UnderlineNav` in the next major release. See https://primer.style/react/drafts/UnderlineNav2 for more details.
|
|
@@ -23,6 +23,4 @@ export { default as TabNav } from '../TabNav';
|
|
|
23
23
|
export type { TabNavProps, TabNavLinkProps } from '../TabNav';
|
|
24
24
|
export { default as Tooltip } from '../Tooltip/Tooltip';
|
|
25
25
|
export type { TooltipProps } from '../Tooltip/Tooltip';
|
|
26
|
-
export { default as AvatarPair } from './AvatarPair';
|
|
27
|
-
export type { AvatarPairProps } from './AvatarPair';
|
|
28
26
|
//# sourceMappingURL=index.d.ts.map
|