@primer/react 0.0.0-20260707164108 → 0.0.0-20260707170850
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 +16 -3
- package/dist/PageLayout/PageLayout.d.ts +6 -0
- package/dist/PageLayout/PageLayout.js +549 -535
- package/dist/SplitPageLayout/SplitPageLayout.js +11 -0
- package/dist/Stack/Stack.js +2 -0
- package/dist/StateLabel/StateLabel.js +1 -0
- package/dist/SubNav/SubNav.js +3 -0
- package/dist/TabNav/TabNav.js +3 -1
- package/dist/Text/Text.js +1 -0
- package/dist/Textarea/Textarea.js +1 -0
- package/dist/ThemeProvider.js +1 -0
- package/dist/experimental/SelectPanel2/SelectPanel-b5469dea.css +2 -0
- package/dist/experimental/SelectPanel2/{SelectPanel-608e207e.css.map → SelectPanel-b5469dea.css.map} +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +9 -1
- package/dist/experimental/SelectPanel2/SelectPanel.module.css.js +1 -1
- package/dist/internal/components/ValidationAnimationContainer.js +33 -39
- package/package.json +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel-608e207e.css +0 -2
|
@@ -16,6 +16,7 @@ const Root = (props) => {
|
|
|
16
16
|
let t1;
|
|
17
17
|
if ($[1] !== props) {
|
|
18
18
|
t1 = /*#__PURE__*/ jsx(PageLayout, {
|
|
19
|
+
"data-component": "SplitPageLayout",
|
|
19
20
|
containerWidth: "full",
|
|
20
21
|
padding: "none",
|
|
21
22
|
columnGap: "none",
|
|
@@ -50,6 +51,7 @@ const Header = (t0) => {
|
|
|
50
51
|
let t3;
|
|
51
52
|
if ($[4] !== divider || $[5] !== padding || $[6] !== props) {
|
|
52
53
|
t3 = /*#__PURE__*/ jsx(PageLayout.Header, {
|
|
54
|
+
"data-component": "SplitPageLayout.Header",
|
|
53
55
|
padding,
|
|
54
56
|
divider,
|
|
55
57
|
...props
|
|
@@ -83,6 +85,7 @@ const Content = (t0) => {
|
|
|
83
85
|
let t3;
|
|
84
86
|
if ($[4] !== padding || $[5] !== props || $[6] !== width) {
|
|
85
87
|
t3 = /*#__PURE__*/ jsx(PageLayout.Content, {
|
|
88
|
+
"data-component": "SplitPageLayout.Content",
|
|
86
89
|
width,
|
|
87
90
|
padding,
|
|
88
91
|
...props
|
|
@@ -124,6 +127,7 @@ const Pane = (t0) => {
|
|
|
124
127
|
let t5;
|
|
125
128
|
if ($[6] !== divider || $[7] !== padding || $[8] !== position || $[9] !== props || $[10] !== sticky) {
|
|
126
129
|
t5 = /*#__PURE__*/ jsx(PageLayout.Pane, {
|
|
130
|
+
"data-component": "SplitPageLayout.Pane",
|
|
127
131
|
position,
|
|
128
132
|
sticky,
|
|
129
133
|
padding,
|
|
@@ -165,6 +169,7 @@ const Sidebar = (t0) => {
|
|
|
165
169
|
let t4;
|
|
166
170
|
if ($[5] !== divider || $[6] !== padding || $[7] !== position || $[8] !== props) {
|
|
167
171
|
t4 = /*#__PURE__*/ jsx(PageLayout.Sidebar, {
|
|
172
|
+
"data-component": "SplitPageLayout.Sidebar",
|
|
168
173
|
position,
|
|
169
174
|
padding,
|
|
170
175
|
divider,
|
|
@@ -200,6 +205,7 @@ const Footer = (t0) => {
|
|
|
200
205
|
let t3;
|
|
201
206
|
if ($[4] !== divider || $[5] !== padding || $[6] !== props) {
|
|
202
207
|
t3 = /*#__PURE__*/ jsx(PageLayout.Footer, {
|
|
208
|
+
"data-component": "SplitPageLayout.Footer",
|
|
203
209
|
padding,
|
|
204
210
|
divider,
|
|
205
211
|
...props
|
|
@@ -212,6 +218,11 @@ const Footer = (t0) => {
|
|
|
212
218
|
return t3;
|
|
213
219
|
};
|
|
214
220
|
Footer.displayName = "SplitPageLayout.Footer";
|
|
221
|
+
Header.__SLOT__ = PageLayout.Header.__SLOT__;
|
|
222
|
+
Content.__SLOT__ = PageLayout.Content.__SLOT__;
|
|
223
|
+
Pane.__SLOT__ = PageLayout.Pane.__SLOT__;
|
|
224
|
+
Sidebar.__SLOT__ = PageLayout.Sidebar.__SLOT__;
|
|
225
|
+
Footer.__SLOT__ = PageLayout.Footer.__SLOT__;
|
|
215
226
|
const SplitPageLayout = Object.assign(Root, {
|
|
216
227
|
Header,
|
|
217
228
|
Content,
|
package/dist/Stack/Stack.js
CHANGED
|
@@ -113,6 +113,7 @@ const Stack = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
113
113
|
t16 = /*#__PURE__*/ jsx(Component, {
|
|
114
114
|
ref: forwardedRef,
|
|
115
115
|
...rest,
|
|
116
|
+
"data-component": "Stack",
|
|
116
117
|
className: t7,
|
|
117
118
|
...t8,
|
|
118
119
|
...t9,
|
|
@@ -190,6 +191,7 @@ const StackItem = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
190
191
|
t5 = /*#__PURE__*/ jsx(Component, {
|
|
191
192
|
ref: forwardedRef,
|
|
192
193
|
...rest,
|
|
194
|
+
"data-component": "StackItem",
|
|
193
195
|
className: t2,
|
|
194
196
|
...t3,
|
|
195
197
|
...t4,
|
package/dist/SubNav/SubNav.js
CHANGED
|
@@ -62,6 +62,7 @@ const SubNav = /*#__PURE__*/ React.forwardRef(function SubNav(t0, forwardRef) {
|
|
|
62
62
|
className: t1,
|
|
63
63
|
"aria-label": label,
|
|
64
64
|
...rest,
|
|
65
|
+
"data-component": "SubNav",
|
|
65
66
|
children: [t3, t4]
|
|
66
67
|
});
|
|
67
68
|
$[13] = forwardRef;
|
|
@@ -103,6 +104,7 @@ const SubNavLinks = /*#__PURE__*/ React.forwardRef((t0, forwardRef) => {
|
|
|
103
104
|
ref: forwardRef,
|
|
104
105
|
className: t1,
|
|
105
106
|
...rest,
|
|
107
|
+
"data-component": "SubNav.Links",
|
|
106
108
|
children
|
|
107
109
|
});
|
|
108
110
|
$[6] = children;
|
|
@@ -144,6 +146,7 @@ const SubNavLink = /*#__PURE__*/ React.forwardRef((t0, forwardRef) => {
|
|
|
144
146
|
"data-selected": rest.selected,
|
|
145
147
|
"aria-current": rest.selected,
|
|
146
148
|
...rest,
|
|
149
|
+
"data-component": "SubNav.Link",
|
|
147
150
|
children
|
|
148
151
|
});
|
|
149
152
|
$[6] = children;
|
package/dist/TabNav/TabNav.js
CHANGED
|
@@ -102,6 +102,7 @@ function TabNav(t0) {
|
|
|
102
102
|
t10 = /*#__PURE__*/ jsx("div", {
|
|
103
103
|
...rest,
|
|
104
104
|
ref: t7,
|
|
105
|
+
"data-component": "TabNav",
|
|
105
106
|
children: t9
|
|
106
107
|
});
|
|
107
108
|
$[16] = rest;
|
|
@@ -159,7 +160,8 @@ const TabNavLink = /*#__PURE__*/ React.forwardRef(function TabNavLink(t0, ref) {
|
|
|
159
160
|
tabIndex: -1,
|
|
160
161
|
"aria-selected": t2,
|
|
161
162
|
className: t5,
|
|
162
|
-
...rest
|
|
163
|
+
...rest,
|
|
164
|
+
"data-component": "TabNav.Link"
|
|
163
165
|
});
|
|
164
166
|
$[9] = Component;
|
|
165
167
|
$[10] = ref;
|
package/dist/Text/Text.js
CHANGED
|
@@ -40,6 +40,7 @@ function Text(props, ref) {
|
|
|
40
40
|
if ($[9] !== Component || $[10] !== ref || $[11] !== rest || $[12] !== size || $[13] !== t1 || $[14] !== weight || $[15] !== whiteSpace) {
|
|
41
41
|
t2 = /*#__PURE__*/ jsx(Component, {
|
|
42
42
|
className: t1,
|
|
43
|
+
"data-component": "Text",
|
|
43
44
|
"data-size": size,
|
|
44
45
|
"data-weight": weight,
|
|
45
46
|
"data-white-space": whiteSpace,
|
package/dist/ThemeProvider.js
CHANGED
|
@@ -96,6 +96,7 @@ const ThemeProvider = (t0) => {
|
|
|
96
96
|
let t5;
|
|
97
97
|
if ($[26] !== children || $[27] !== dayScheme || $[28] !== nightScheme || $[29] !== t4) {
|
|
98
98
|
t5 = /*#__PURE__*/ jsx("div", {
|
|
99
|
+
"data-component": "ThemeProvider",
|
|
99
100
|
"data-color-mode": t4,
|
|
100
101
|
"data-light-theme": dayScheme,
|
|
101
102
|
"data-dark-theme": nightScheme,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-SelectPanel2-Overlay--Q-FI{border:none;color:var(--fgColor-default,#1f2328);padding:0;--max-height:0;--position-top:0;--position-left:0}.prc-SelectPanel2-Overlay--Q-FI:where([open]){display:flex}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=anchored]),.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=full-screen]){left:var(--position-left);margin:0;top:var(--position-top)}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=anchored])::backdrop{background-color:transparent}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=full-screen])::backdrop{background-color:transparent}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=modal]){bottom:0;left:0;right:0;top:0}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=modal])::backdrop{background-color:var(--overlay-backdrop-bgColor,#c8d1da66)}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=full-screen]){border-radius:unset;height:100%;left:0;margin:0;max-height:100vh;max-width:100vw;top:0;width:100%}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=bottom-sheet]){border-bottom-left-radius:0;border-bottom-right-radius:0;bottom:0;left:0;margin:0;max-height:calc(100vh - 64px);max-width:100vw;top:auto;width:100%}.prc-SelectPanel2-Form-bZ9HS{width:100%}.prc-SelectPanel2-Container-e5e6-,.prc-SelectPanel2-Form-bZ9HS{display:flex;flex-direction:column}.prc-SelectPanel2-Container-e5e6-{flex-grow:1;flex-shrink:1;justify-content:space-between;overflow:hidden}.prc-SelectPanel2-Container-e5e6- ul{flex-grow:1;overflow-y:auto}.prc-SelectPanel2-Container-e5e6- li:not(:focus,[data-is-active-descendant],[data-active]){contain-intrinsic-size:auto 32px;content-visibility:auto}.prc-SelectPanel2-HeaderContent-MsaAS{align-items:center;display:flex;justify-content:space-between;margin-bottom:0}.prc-SelectPanel2-HeaderContent-MsaAS:where([data-description]){align-items:flex-start}.prc-SelectPanel2-HeaderContent-MsaAS:where([data-search-input]){margin-bottom:var(--base-size-8,.5rem)}.prc-SelectPanel2-TitleWrapper-HzPu3{margin-left:var(--base-size-8,.5rem);margin-top:0}.prc-SelectPanel2-TitleWrapper-HzPu3:where([data-description]){margin-top:2px}.prc-SelectPanel2-TitleWrapper-HzPu3:where([data-on-back]){margin-left:var(--base-size-4,.25rem)}.prc-SelectPanel2-TextInput-lHH1n{padding-left:var(--base-size-8,.5rem)!important}.prc-SelectPanel2-TextInput-lHH1n input[data-empty]~.TextInput-action{display:none}.prc-SelectPanel2-Checkbox-AYR38{margin-top:0}.prc-SelectPanel2-FlexBox-gWPRg{display:flex}.prc-SelectPanel2-Title-T-h3f{font-size:var(--text-body-size-medium,.875rem);font-weight:var(--base-text-weight-semibold,600)}.prc-SelectPanel2-Description-qTXfi{display:block;font-size:var(--text-body-size-small,.75rem)}.prc-SelectPanel2-ClearAction-tQj-f,.prc-SelectPanel2-Description-qTXfi{color:var(--fgColor-muted,#59636e)}.prc-SelectPanel2-ClearAction-tQj-f{background:none}.prc-SelectPanel2-Footer-TibV0{align-items:center;border-top:var(--borderWidth-thin,.0625rem) solid;border-top-color:var(--borderColor-default,#d1d9e0);display:flex;flex-shrink:0;justify-content:space-between;min-height:44px;padding:var(--base-size-16,1rem)}.prc-SelectPanel2-Footer-TibV0:where([data-hide-primary-actions]){padding:var(--base-size-8,.5rem)}.prc-SelectPanel2-FooterContent-UjAOM{flex-grow:0}.prc-SelectPanel2-FooterContent-UjAOM:where([data-hide-primary-actions]){flex-grow:1}.prc-SelectPanel2-FooterActions-T6yQR,.prc-SelectPanel2-SecondaryCheckbox-omkf-{display:flex;gap:var(--stack-gap-condensed,.5rem)}.prc-SelectPanel2-SecondaryCheckbox-omkf-{align-items:center}.prc-SelectPanel2-SmallText-c42ay{font-size:var(--text-body-size-small,.75rem)}.prc-SelectPanel2-SelectPanelLoading-mtyhD{align-items:center;display:flex;flex-direction:column;gap:var(--stack-gap-normal,1rem);height:100%;justify-content:center;min-height:min(calc(var(--max-height) - 150px),324px)}.prc-SelectPanel2-LoadingText-DB0wN{color:var(--fgColor-muted,#59636e);font-size:var(--text-body-size-medium,.875rem)}.prc-SelectPanel2-MessageFull-nY-qF{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:var(--base-size-4,.25rem);height:100%;justify-content:center;min-height:min(calc(var(--max-height) - 150px),324px);padding-left:var(--base-size-24,1.5rem);padding-right:var(--base-size-24,1.5rem);text-align:center}.prc-SelectPanel2-MessageFull-nY-qF a{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.prc-SelectPanel2-Octicon-zt-zU{margin-bottom:var(--base-size-8,.5rem)}.prc-SelectPanel2-Octicon-zt-zU.prc-SelectPanel2-Error-ZrZQQ{color:var(--fgColor-danger,#d1242f)}.prc-SelectPanel2-Octicon-zt-zU.prc-SelectPanel2-Warning-PDsVF{color:var(--fgColor-attention,#9a6700)}.prc-SelectPanel2-MessageTitle-T7v9d{font-size:var(--text-body-size-medium,.875rem);font-weight:var(--base-text-weight-medium,500)}.prc-SelectPanel2-MessageContent-UZ9vY{align-items:center;color:var(--fgColor-muted,#59636e);flex-direction:column;font-size:var(--text-body-size-medium,.875rem)}.prc-SelectPanel2-MessageContent-UZ9vY,.prc-SelectPanel2-MessageInline-sErQf{display:flex;gap:var(--stack-gap-condensed,.5rem)}.prc-SelectPanel2-MessageInline-sErQf{border-bottom:var(--borderWidth-thin,.0625rem) solid;font-size:var(--text-body-size-small,.75rem);padding:var(--base-size-12,.75rem) var(--base-size-16,1rem)}.prc-SelectPanel2-MessageInline-sErQf a{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.prc-SelectPanel2-MessageInline-sErQf:where([data-variant=error]){background-color:var(--bgColor-danger-muted,#ffebe9);border-color:var(--borderColor-danger-muted,#ff818266);color:var(--fgColor-danger,#d1242f)}.prc-SelectPanel2-MessageInline-sErQf:where([data-variant=warning]){background-color:var(--bgColor-attention-muted,#fff8c5);border-color:var(--borderColor-attention-muted,#d4a72c66);color:var(--fgColor-attention,#9a6700)}.prc-SelectPanel2-Header-LKyEJ{border-bottom:var(--borderWidth-thin,.0625rem) solid;border-bottom-color:var(--borderColor-default,#d1d9e0);display:flex;flex-direction:column;padding:var(--base-size-8,.5rem)}
|
|
2
|
+
/*# sourceMappingURL=SelectPanel-b5469dea.css.map */
|
package/dist/experimental/SelectPanel2/{SelectPanel-608e207e.css.map → SelectPanel-b5469dea.css.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/experimental/SelectPanel2/SelectPanel.module.css.js"],"names":[],"mappings":"AAAA,gCAGE,WAAY,CADZ,oCAA6B,CAD7B,SAAU,CAKV,cAAe,CACf,gBAAiB,CACjB,iBAoDF,CAlDE,8CACE,YACF,CAEA,iIAKE,yBAA0B,CAC1B,QAAS,CAHT,uBAQF,CAHE,yEACE,4BACF,CAFA,4EACE,4BACF,CAGF,4DAIE,QAAS,CAFT,MAAO,CACP,OAAQ,CAFR,KAIF,CAEA,sEACE,0DACF,CAEA,kEAQE,mBAAoB,CAHpB,WAAY,CAHZ,MAAO,CAKP,QAAS,CADT,gBAAiB,CAFjB,eAAgB,CAHhB,KAAM,CAEN,UAMF,CAEA,mEASE,2BAA4B,CAD5B,4BAA6B,CAN7B,QAAS,CACT,MAAO,CAIP,QAAS,CADT,6BAA8B,CAD9B,eAAgB,CAJhB,QAAS,CAGT,UAMF,CAGF,6BAEE,UAEF,CAEA,+DALE,YAAa,CAEb,qBAwBF,CArBA,kCAKE,WAAY,CADZ,aAAc,CAEd,6BAA8B,CAJ9B,eAmBF,CAbE,qCAEE,WAAY,CADZ,eAEF,CAMA,2FAEE,gCAAiC,CADjC,uBAEF,CAGF,sCAGE,kBAAmB,CAFnB,YAAa,CACb,6BAA8B,CAE9B,eASF,CAPE,gEACE,sBACF,CAEA,iEACE,sCACF,CAGF,qCAEE,oCAA+B,CAD/B,YAWF,CARE,+DAEE,cACF,CAEA,2DACE,qCACF,CAGF,kCACE,+
|
|
1
|
+
{"version":3,"sources":["../../src/experimental/SelectPanel2/SelectPanel.module.css.js"],"names":[],"mappings":"AAAA,gCAGE,WAAY,CADZ,oCAA6B,CAD7B,SAAU,CAKV,cAAe,CACf,gBAAiB,CACjB,iBAoDF,CAlDE,8CACE,YACF,CAEA,iIAKE,yBAA0B,CAC1B,QAAS,CAHT,uBAQF,CAHE,yEACE,4BACF,CAFA,4EACE,4BACF,CAGF,4DAIE,QAAS,CAFT,MAAO,CACP,OAAQ,CAFR,KAIF,CAEA,sEACE,0DACF,CAEA,kEAQE,mBAAoB,CAHpB,WAAY,CAHZ,MAAO,CAKP,QAAS,CADT,gBAAiB,CAFjB,eAAgB,CAHhB,KAAM,CAEN,UAMF,CAEA,mEASE,2BAA4B,CAD5B,4BAA6B,CAN7B,QAAS,CACT,MAAO,CAIP,QAAS,CADT,6BAA8B,CAD9B,eAAgB,CAJhB,QAAS,CAGT,UAMF,CAGF,6BAEE,UAEF,CAEA,+DALE,YAAa,CAEb,qBAwBF,CArBA,kCAKE,WAAY,CADZ,aAAc,CAEd,6BAA8B,CAJ9B,eAmBF,CAbE,qCAEE,WAAY,CADZ,eAEF,CAMA,2FAEE,gCAAiC,CADjC,uBAEF,CAGF,sCAGE,kBAAmB,CAFnB,YAAa,CACb,6BAA8B,CAE9B,eASF,CAPE,gEACE,sBACF,CAEA,iEACE,sCACF,CAGF,qCAEE,oCAA+B,CAD/B,YAWF,CARE,+DAEE,cACF,CAEA,2DACE,qCACF,CAGF,kCACE,+CAYF,CAHE,sEACE,YACF,CAGF,iCACE,YACF,CAEA,gCACE,YACF,CAEA,8BACE,8CAAuC,CACvC,gDACF,CAEA,oCACE,aAAc,CACd,4CAEF,CAEA,wEAHE,kCAMF,CAHA,oCAEE,eACF,CAEA,+BAOE,kBAAmB,CAHnB,iDAAyC,CACzC,mDAA4C,CAJ5C,YAAa,CAOb,aAAc,CAFd,6BAA8B,CAJ9B,eAAgB,CAChB,gCAUF,CAHE,kEACE,gCACF,CAGF,sCACE,WAKF,CAHE,yEACE,WACF,CAQF,gFAJE,YAAa,CACb,oCAOF,CAJA,0CAEE,kBAEF,CAEA,kCACE,4CACF,CAEA,2CAQE,kBAAmB,CAPnB,YAAa,CAKb,qBAAsB,CAGtB,gCAA4B,CAP5B,WAAY,CAKZ,sBAAuB,CAFvB,qDAKF,CAEA,oCAEE,kCAA2B,CAD3B,8CAEF,CAEA,oCAWE,kBAAmB,CAVnB,YAAa,CAQb,qBAAsB,CAGtB,WAAY,CACZ,6BAAuB,CAXvB,WAAY,CAQZ,sBAAuB,CALvB,qDAAuD,CAEvD,uCAAiC,CADjC,wCAAkC,CAElC,iBAWF,CAJE,sCACE,aAAc,CACd,iCAA0B,CAA1B,yBACF,CAGF,gCACE,sCASF,CAPE,6DACE,mCACF,CAEA,+DACE,sCACF,CAGF,qCACE,8CAAuC,CACvC,8CACF,CAEA,uCAME,kBAAmB,CAHnB,kCAA2B,CAC3B,qBAAsB,CAFtB,8CAKF,CAEA,6EARE,YAAa,CAIb,oCA8BF,CA1BA,sCAOE,oDAA4C,CAD5C,4CAAsC,CADtC,2DAqBF,CAhBE,wCACE,aAAc,CACd,iCAA0B,CAA1B,yBACF,CAEA,kEAEE,oDAA6C,CAC7C,sDAA6C,CAF7C,mCAGF,CAEA,oEAEE,uDAAgD,CAChD,yDAAgD,CAFhD,sCAGF,CAGF,+BAIE,oDAA4C,CAC5C,sDAA+C,CAJ/C,YAAa,CAEb,qBAAsB,CADtB,gCAIF","file":"SelectPanel-b5469dea.css","sourcesContent":[".Overlay {\n padding: 0;\n color: var(--fgColor-default);\n border: none;\n\n /* CSS variables values are passed in via styles */\n --max-height: 0;\n --position-top: 0;\n --position-left: 0;\n\n &:where([open]) {\n display: flex; /* to fit children */\n }\n\n &:where([data-variant='anchored']),\n &:where([data-variant='full-screen']) {\n /* stylelint-disable-next-line primer/spacing */\n top: var(--position-top);\n /* stylelint-disable-next-line primer/spacing */\n left: var(--position-left);\n margin: 0;\n\n &::backdrop {\n background-color: transparent;\n }\n }\n\n &:where([data-variant='modal']) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n &:where([data-variant='modal'])::backdrop {\n background-color: var(--overlay-backdrop-bgColor);\n }\n\n &:where([data-variant='full-screen']) {\n top: 0;\n left: 0;\n width: 100%;\n max-width: 100vw;\n height: 100%;\n max-height: 100vh;\n margin: 0;\n border-radius: unset;\n }\n\n &:where([data-variant='bottom-sheet']) {\n top: auto;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: 100vw;\n max-height: calc(100vh - 64px);\n margin: 0;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n }\n}\n\n.Form {\n display: flex;\n width: 100%;\n flex-direction: column;\n}\n\n.Container {\n display: flex;\n overflow: hidden;\n flex-direction: column;\n flex-shrink: 1;\n flex-grow: 1;\n justify-content: space-between;\n\n ul {\n overflow-y: auto;\n flex-grow: 1;\n }\n\n /* Allow the browser to skip rendering for off-screen items, reducing style recalc and layout costs in long lists.\n Exclude items that show the active indicator line, as content-visibility: auto applies paint containment\n which clips the absolutely-positioned ::after pseudo-element that renders outside the item bounds. */\n /* stylelint-disable-next-line selector-no-qualifying-type */\n li:not(:focus, [data-is-active-descendant], [data-active]) {\n content-visibility: auto;\n contain-intrinsic-size: auto 32px;\n }\n}\n\n.HeaderContent {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0;\n\n &:where([data-description]) {\n align-items: flex-start;\n }\n\n &:where([data-search-input]) {\n margin-bottom: var(--base-size-8);\n }\n}\n\n.TitleWrapper {\n margin-top: 0;\n margin-left: var(--base-size-8);\n\n &:where([data-description]) {\n /* stylelint-disable-next-line primer/spacing */\n margin-top: 2px;\n }\n\n &:where([data-on-back]) {\n margin-left: var(--base-size-4);\n }\n}\n\n.TextInput {\n padding-left: var(--base-size-8) !important;\n\n /*\n * `data-empty` lives on the inner `<input>` (TextInput spreads unknown\n * props onto the input, not its wrapper). The clear-action button is a\n * later sibling of the input within this wrapper, so a general-sibling\n * combinator targets it directly without a `:has()` walk.\n */\n /* stylelint-disable-next-line selector-class-pattern, selector-no-qualifying-type -- `.TextInput-action` is a third-party class on the wrapped TextInput */\n & input[data-empty] ~ :global(.TextInput-action) {\n display: none;\n }\n}\n\n.Checkbox {\n margin-top: 0;\n}\n\n.FlexBox {\n display: flex;\n}\n\n.Title {\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-semibold);\n}\n\n.Description {\n display: block;\n font-size: var(--text-body-size-small);\n color: var(--fgColor-muted);\n}\n\n.ClearAction {\n color: var(--fgColor-muted);\n background: none;\n}\n\n.Footer {\n display: flex;\n min-height: 44px;\n padding: var(--base-size-16);\n border-top: var(--borderWidth-thin) solid;\n border-top-color: var(--borderColor-default);\n justify-content: space-between;\n align-items: center;\n flex-shrink: 0;\n\n &:where([data-hide-primary-actions]) {\n padding: var(--base-size-8);\n }\n}\n\n.FooterContent {\n flex-grow: 0;\n\n &:where([data-hide-primary-actions]) {\n flex-grow: 1;\n }\n}\n\n.FooterActions {\n display: flex;\n gap: var(--stack-gap-condensed);\n}\n\n.SecondaryCheckbox {\n display: flex;\n align-items: center;\n gap: var(--stack-gap-condensed);\n}\n\n.SmallText {\n font-size: var(--text-body-size-small);\n}\n\n.SelectPanelLoading {\n display: flex;\n height: 100%;\n\n /* maxHeight of dialog - (header & footer) */\n min-height: min(calc(var(--max-height) - 150px), 324px);\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: var(--stack-gap-normal);\n}\n\n.LoadingText {\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n}\n\n.MessageFull {\n display: flex;\n height: 100%;\n\n /* maxHeight of dialog - (header & footer) */\n min-height: min(calc(var(--max-height) - 150px), 324px);\n padding-right: var(--base-size-24);\n padding-left: var(--base-size-24);\n text-align: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n gap: var(--base-size-4);\n\n a {\n color: inherit;\n text-decoration: underline;\n }\n}\n\n.Octicon {\n margin-bottom: var(--base-size-8);\n\n &.Error {\n color: var(--fgColor-danger);\n }\n\n &.Warning {\n color: var(--fgColor-attention);\n }\n}\n\n.MessageTitle {\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-medium);\n}\n\n.MessageContent {\n display: flex;\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n flex-direction: column;\n gap: var(--stack-gap-condensed);\n align-items: center;\n}\n\n.MessageInline {\n display: flex;\n padding-top: var(--base-size-12);\n padding-right: var(--base-size-16);\n padding-bottom: var(--base-size-12);\n padding-left: var(--base-size-16);\n font-size: var(--text-body-size-small);\n border-bottom: var(--borderWidth-thin) solid;\n gap: var(--stack-gap-condensed);\n\n a {\n color: inherit;\n text-decoration: underline;\n }\n\n &:where([data-variant='error']) {\n color: var(--fgColor-danger);\n background-color: var(--bgColor-danger-muted);\n border-color: var(--borderColor-danger-muted);\n }\n\n &:where([data-variant='warning']) {\n color: var(--fgColor-attention);\n background-color: var(--bgColor-attention-muted);\n border-color: var(--borderColor-attention-muted);\n }\n}\n\n.Header {\n display: flex;\n padding: var(--base-size-8);\n flex-direction: column;\n border-bottom: var(--borderWidth-thin) solid;\n border-bottom-color: var(--borderColor-default);\n}\n"]}
|
|
@@ -276,9 +276,15 @@ SelectPanelHeader.__SLOT__ = Symbol("SelectPanel.Header");
|
|
|
276
276
|
const SelectPanelSearchInput = ({ onChange: propsOnChange, onKeyDown: propsOnKeyDown, className, ...props }) => {
|
|
277
277
|
const inputRef = /*#__PURE__*/ React.createRef();
|
|
278
278
|
const { setSearchQuery, moveFocusToList } = React.useContext(SelectPanelContext);
|
|
279
|
+
const [uncontrolledEmpty, setUncontrolledEmpty] = React.useState(() => {
|
|
280
|
+
var _ref, _props$value;
|
|
281
|
+
return ((_ref = (_props$value = props.value) !== null && _props$value !== void 0 ? _props$value : props.defaultValue) !== null && _ref !== void 0 ? _ref : "") === "";
|
|
282
|
+
});
|
|
283
|
+
const isEmpty = props.value !== void 0 ? props.value === "" : uncontrolledEmpty;
|
|
279
284
|
const internalOnChange = (event) => {
|
|
280
285
|
if (typeof propsOnChange === "function") propsOnChange(event);
|
|
281
286
|
else setSearchQuery(event.target.value);
|
|
287
|
+
setUncontrolledEmpty(event.target.value === "");
|
|
282
288
|
};
|
|
283
289
|
const internalKeyDown = (event) => {
|
|
284
290
|
if (event.key === "ArrowDown") {
|
|
@@ -303,12 +309,14 @@ const SelectPanelSearchInput = ({ onChange: propsOnChange, onKeyDown: propsOnKey
|
|
|
303
309
|
target: inputRef.current,
|
|
304
310
|
currentTarget: inputRef.current
|
|
305
311
|
});
|
|
312
|
+
setUncontrolledEmpty(true);
|
|
306
313
|
}
|
|
307
314
|
}),
|
|
308
315
|
className: clsx(SelectPanel_module_css_default.TextInput, className),
|
|
309
316
|
onChange: internalOnChange,
|
|
310
317
|
onKeyDown: internalKeyDown,
|
|
311
|
-
...props
|
|
318
|
+
...props,
|
|
319
|
+
"data-empty": isEmpty || void 0
|
|
312
320
|
});
|
|
313
321
|
};
|
|
314
322
|
SelectPanelSearchInput.displayName = "SelectPanelSearchInput";
|
|
@@ -1,44 +1,40 @@
|
|
|
1
1
|
import ValidationAnimationContainer_module_css_default from "./ValidationAnimationContainer.module.css.js";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { useState } from "react";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
5
|
//#region src/internal/components/ValidationAnimationContainer.tsx
|
|
6
6
|
const ValidationAnimationContainer = (t0) => {
|
|
7
|
-
const $ = c(
|
|
8
|
-
|
|
9
|
-
let rest;
|
|
10
|
-
let show;
|
|
11
|
-
let style;
|
|
12
|
-
if ($[0] !== t0) {
|
|
13
|
-
({show, children, style, ...rest} = t0);
|
|
14
|
-
$[0] = t0;
|
|
15
|
-
$[1] = children;
|
|
16
|
-
$[2] = rest;
|
|
17
|
-
$[3] = show;
|
|
18
|
-
$[4] = style;
|
|
19
|
-
} else {
|
|
20
|
-
children = $[1];
|
|
21
|
-
rest = $[2];
|
|
22
|
-
show = $[3];
|
|
23
|
-
style = $[4];
|
|
24
|
-
}
|
|
7
|
+
const $ = c(10);
|
|
8
|
+
const { show, children } = t0;
|
|
25
9
|
const [shouldRender, setRender] = useState(show);
|
|
26
|
-
if (show && !shouldRender) setRender(true);
|
|
27
10
|
let t1;
|
|
28
|
-
|
|
11
|
+
let t2;
|
|
12
|
+
if ($[0] !== show) {
|
|
29
13
|
t1 = () => {
|
|
14
|
+
if (show) setRender(true);
|
|
15
|
+
};
|
|
16
|
+
t2 = [show];
|
|
17
|
+
$[0] = show;
|
|
18
|
+
$[1] = t1;
|
|
19
|
+
$[2] = t2;
|
|
20
|
+
} else {
|
|
21
|
+
t1 = $[1];
|
|
22
|
+
t2 = $[2];
|
|
23
|
+
}
|
|
24
|
+
useEffect(t1, t2);
|
|
25
|
+
let t3;
|
|
26
|
+
if ($[3] !== show) {
|
|
27
|
+
t3 = () => {
|
|
30
28
|
if (!show) setRender(false);
|
|
31
29
|
};
|
|
32
|
-
$[
|
|
33
|
-
$[
|
|
34
|
-
} else
|
|
35
|
-
const onAnimationEnd =
|
|
36
|
-
let
|
|
37
|
-
if ($[
|
|
38
|
-
|
|
39
|
-
...rest,
|
|
30
|
+
$[3] = show;
|
|
31
|
+
$[4] = t3;
|
|
32
|
+
} else t3 = $[4];
|
|
33
|
+
const onAnimationEnd = t3;
|
|
34
|
+
let t4;
|
|
35
|
+
if ($[5] !== children || $[6] !== onAnimationEnd || $[7] !== shouldRender || $[8] !== show) {
|
|
36
|
+
t4 = shouldRender ? /*#__PURE__*/ jsx("div", {
|
|
40
37
|
style: {
|
|
41
|
-
...style,
|
|
42
38
|
height: show ? "auto" : 0,
|
|
43
39
|
overflow: "hidden"
|
|
44
40
|
},
|
|
@@ -49,15 +45,13 @@ const ValidationAnimationContainer = (t0) => {
|
|
|
49
45
|
children
|
|
50
46
|
})
|
|
51
47
|
}) : null;
|
|
52
|
-
$[
|
|
53
|
-
$[
|
|
54
|
-
$[
|
|
55
|
-
$[
|
|
56
|
-
$[
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
} else t2 = $[13];
|
|
60
|
-
return t2;
|
|
48
|
+
$[5] = children;
|
|
49
|
+
$[6] = onAnimationEnd;
|
|
50
|
+
$[7] = shouldRender;
|
|
51
|
+
$[8] = show;
|
|
52
|
+
$[9] = t4;
|
|
53
|
+
} else t4 = $[9];
|
|
54
|
+
return t4;
|
|
61
55
|
};
|
|
62
56
|
//#endregion
|
|
63
57
|
export { ValidationAnimationContainer as default };
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.prc-SelectPanel2-Overlay--Q-FI{border:none;color:var(--fgColor-default,#1f2328);padding:0;--max-height:0;--position-top:0;--position-left:0}.prc-SelectPanel2-Overlay--Q-FI:where([open]){display:flex}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=anchored]),.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=full-screen]){left:var(--position-left);margin:0;top:var(--position-top)}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=anchored])::backdrop{background-color:transparent}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=full-screen])::backdrop{background-color:transparent}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=modal]){bottom:0;left:0;right:0;top:0}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=modal])::backdrop{background-color:var(--overlay-backdrop-bgColor,#c8d1da66)}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=full-screen]){border-radius:unset;height:100%;left:0;margin:0;max-height:100vh;max-width:100vw;top:0;width:100%}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=bottom-sheet]){border-bottom-left-radius:0;border-bottom-right-radius:0;bottom:0;left:0;margin:0;max-height:calc(100vh - 64px);max-width:100vw;top:auto;width:100%}.prc-SelectPanel2-Form-bZ9HS{width:100%}.prc-SelectPanel2-Container-e5e6-,.prc-SelectPanel2-Form-bZ9HS{display:flex;flex-direction:column}.prc-SelectPanel2-Container-e5e6-{flex-grow:1;flex-shrink:1;justify-content:space-between;overflow:hidden}.prc-SelectPanel2-Container-e5e6- ul{flex-grow:1;overflow-y:auto}.prc-SelectPanel2-Container-e5e6- li:not(:focus,[data-is-active-descendant],[data-active]){contain-intrinsic-size:auto 32px;content-visibility:auto}.prc-SelectPanel2-HeaderContent-MsaAS{align-items:center;display:flex;justify-content:space-between;margin-bottom:0}.prc-SelectPanel2-HeaderContent-MsaAS:where([data-description]){align-items:flex-start}.prc-SelectPanel2-HeaderContent-MsaAS:where([data-search-input]){margin-bottom:var(--base-size-8,.5rem)}.prc-SelectPanel2-TitleWrapper-HzPu3{margin-left:var(--base-size-8,.5rem);margin-top:0}.prc-SelectPanel2-TitleWrapper-HzPu3:where([data-description]){margin-top:2px}.prc-SelectPanel2-TitleWrapper-HzPu3:where([data-on-back]){margin-left:var(--base-size-4,.25rem)}.prc-SelectPanel2-TextInput-lHH1n{padding-left:var(--base-size-8,.5rem)!important}.prc-SelectPanel2-TextInput-lHH1n:has(input:placeholder-shown) .TextInput-action{display:none}.prc-SelectPanel2-Checkbox-AYR38{margin-top:0}.prc-SelectPanel2-FlexBox-gWPRg{display:flex}.prc-SelectPanel2-Title-T-h3f{font-size:var(--text-body-size-medium,.875rem);font-weight:var(--base-text-weight-semibold,600)}.prc-SelectPanel2-Description-qTXfi{display:block;font-size:var(--text-body-size-small,.75rem)}.prc-SelectPanel2-ClearAction-tQj-f,.prc-SelectPanel2-Description-qTXfi{color:var(--fgColor-muted,#59636e)}.prc-SelectPanel2-ClearAction-tQj-f{background:none}.prc-SelectPanel2-Footer-TibV0{align-items:center;border-top:var(--borderWidth-thin,.0625rem) solid;border-top-color:var(--borderColor-default,#d1d9e0);display:flex;flex-shrink:0;justify-content:space-between;min-height:44px;padding:var(--base-size-16,1rem)}.prc-SelectPanel2-Footer-TibV0:where([data-hide-primary-actions]){padding:var(--base-size-8,.5rem)}.prc-SelectPanel2-FooterContent-UjAOM{flex-grow:0}.prc-SelectPanel2-FooterContent-UjAOM:where([data-hide-primary-actions]){flex-grow:1}.prc-SelectPanel2-FooterActions-T6yQR,.prc-SelectPanel2-SecondaryCheckbox-omkf-{display:flex;gap:var(--stack-gap-condensed,.5rem)}.prc-SelectPanel2-SecondaryCheckbox-omkf-{align-items:center}.prc-SelectPanel2-SmallText-c42ay{font-size:var(--text-body-size-small,.75rem)}.prc-SelectPanel2-SelectPanelLoading-mtyhD{align-items:center;display:flex;flex-direction:column;gap:var(--stack-gap-normal,1rem);height:100%;justify-content:center;min-height:min(calc(var(--max-height) - 150px),324px)}.prc-SelectPanel2-LoadingText-DB0wN{color:var(--fgColor-muted,#59636e);font-size:var(--text-body-size-medium,.875rem)}.prc-SelectPanel2-MessageFull-nY-qF{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:var(--base-size-4,.25rem);height:100%;justify-content:center;min-height:min(calc(var(--max-height) - 150px),324px);padding-left:var(--base-size-24,1.5rem);padding-right:var(--base-size-24,1.5rem);text-align:center}.prc-SelectPanel2-MessageFull-nY-qF a{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.prc-SelectPanel2-Octicon-zt-zU{margin-bottom:var(--base-size-8,.5rem)}.prc-SelectPanel2-Octicon-zt-zU.prc-SelectPanel2-Error-ZrZQQ{color:var(--fgColor-danger,#d1242f)}.prc-SelectPanel2-Octicon-zt-zU.prc-SelectPanel2-Warning-PDsVF{color:var(--fgColor-attention,#9a6700)}.prc-SelectPanel2-MessageTitle-T7v9d{font-size:var(--text-body-size-medium,.875rem);font-weight:var(--base-text-weight-medium,500)}.prc-SelectPanel2-MessageContent-UZ9vY{align-items:center;color:var(--fgColor-muted,#59636e);flex-direction:column;font-size:var(--text-body-size-medium,.875rem)}.prc-SelectPanel2-MessageContent-UZ9vY,.prc-SelectPanel2-MessageInline-sErQf{display:flex;gap:var(--stack-gap-condensed,.5rem)}.prc-SelectPanel2-MessageInline-sErQf{border-bottom:var(--borderWidth-thin,.0625rem) solid;font-size:var(--text-body-size-small,.75rem);padding:var(--base-size-12,.75rem) var(--base-size-16,1rem)}.prc-SelectPanel2-MessageInline-sErQf a{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.prc-SelectPanel2-MessageInline-sErQf:where([data-variant=error]){background-color:var(--bgColor-danger-muted,#ffebe9);border-color:var(--borderColor-danger-muted,#ff818266);color:var(--fgColor-danger,#d1242f)}.prc-SelectPanel2-MessageInline-sErQf:where([data-variant=warning]){background-color:var(--bgColor-attention-muted,#fff8c5);border-color:var(--borderColor-attention-muted,#d4a72c66);color:var(--fgColor-attention,#9a6700)}.prc-SelectPanel2-Header-LKyEJ{border-bottom:var(--borderWidth-thin,.0625rem) solid;border-bottom-color:var(--borderColor-default,#d1d9e0);display:flex;flex-direction:column;padding:var(--base-size-8,.5rem)}
|
|
2
|
-
/*# sourceMappingURL=SelectPanel-608e207e.css.map */
|