@primer/react 0.0.0-20260324015348 → 0.0.0-20260324023447
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 +1 -1
- package/dist/FilteredActionList/FilteredActionList-6808e67a.css +2 -0
- package/dist/FilteredActionList/FilteredActionList-6808e67a.css.map +1 -0
- package/dist/FilteredActionList/FilteredActionList.module.css.js +1 -1
- package/dist/ThemeProvider.d.ts.map +1 -1
- package/dist/ThemeProvider.js +54 -139
- package/package.json +1 -1
- package/dist/FilteredActionList/FilteredActionList-02db90c6.css +0 -2
- package/dist/FilteredActionList/FilteredActionList-02db90c6.css.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-FilteredActionList-Root-QgIk1{display:flex;flex-direction:column;overflow:hidden}.prc-FilteredActionList-Header-y6ihu{box-shadow:0 1px 0 var(--borderColor-default,var(--color-border-default));z-index:1}.prc-FilteredActionList-Container-647gF{display:flex;flex-grow:1;height:100%;overflow:auto}.prc-FilteredActionList-Container-647gF .prc-FilteredActionList-ActionListItem-RSinr:not(:focus,[data-is-active-descendant],[data-active],[data-input-focused]){contain-intrinsic-size:auto 32px;content-visibility:auto}.prc-FilteredActionList-Container-647gF [data-dividers=true] .prc-FilteredActionList-ActionListItem-RSinr{content-visibility:visible}.prc-FilteredActionList-ActionList-3-Bxb{flex-grow:1}.prc-FilteredActionList-ActionListItem-RSinr:focus{background:var(--control-transparent-bgColor-selected,var(--color-action-list-item-default-selected-bg))}.prc-FilteredActionList-ActionListItem-RSinr:focus:after{background:var(--borderColor-accent-emphasis,var(--color-accent-emphasis));border-radius:var(--borderRadius-medium,.375rem);content:"";height:calc(100% - var(--base-size-8,.5rem));left:calc(var(--base-size-8,.5rem)*-1);position:absolute;top:var(--base-size-4,.25rem);width:var(--base-size-4,.25rem)}.prc-FilteredActionList-ActionListItem-RSinr:where([data-input-focused]):where([data-first-child]){background:var(--control-transparent-bgColor-selected,var(--color-action-list-item-default-selected-bg))}.prc-FilteredActionList-ActionListItem-RSinr:where([data-input-focused]):where([data-first-child]):after{background:var(--borderColor-accent-emphasis,var(--color-accent-emphasis));border-radius:var(--borderRadius-medium,.375rem);content:"";height:calc(100% - var(--base-size-8,.5rem));left:calc(var(--base-size-8,.5rem)*-1);position:absolute;top:var(--base-size-4,.25rem);width:var(--base-size-4,.25rem)}@media screen and (max-width:calc(48rem - 0.02px)){@supports (-webkit-touch-callout:none){.prc-FilteredActionList-FullScreenTextInput-CJvWO{font-size:var(--text-title-size-small,1rem)}}}.prc-FilteredActionList-SelectAllContainer-X2ij0{align-items:center;background:var(--bgColor-muted,var(--color-canvas-subtle));border-bottom:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,var(--color-border-default));display:flex;padding-block:var(--base-size-4,.25rem);padding-inline:var(--base-size-16,1rem)}.prc-FilteredActionList-SelectAllCheckbox-Axs5l{margin:var(--base-size-4,.25rem) var(--base-size-8,.5rem) calc(var(--base-size-4,.25rem) - 1px) 0}.prc-FilteredActionList-SelectAllLabel-Bi-PZ{color:var(--fgColor-muted,var(--color-fg-muted));font-size:var(--text-body-size-medium,.875rem)}
|
|
2
|
+
/*# sourceMappingURL=FilteredActionList-6808e67a.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/FilteredActionList/FilteredActionList.module.css.js","../../postcss-preset-primer/src/mixins/activeIndicatorLine.css"],"names":[],"mappings":"AAAA,mCACE,YAAa,CACb,qBAAsB,CACtB,eACF,CAEA,qCAEE,yEAA8C,CAC9C,SACF,CAEA,wCACE,YAAa,CAGb,WAAY,CAFZ,WAAY,CACZ,aAiBF,CAXE,gKAEE,gCAAiC,CADjC,uBAEF,CAKA,0GACE,0BACF,CAGF,yCACE,WACF,CAEA,mDACE,wGAKF,CAHE,yDCjCA,0EAA8C,CAC9C,gDAAyC,CAHzC,UAAW,CADX,4CAAuC,CAFvC,sCAAmC,CAFnC,iBAAkB,CAClB,6BAAuB,CAEvB,+BDuCA,CAGF,mGACE,wGAKF,CAHE,yGCzCA,0EAA8C,CAC9C,gDAAyC,CAHzC,UAAW,CADX,4CAAuC,CAFvC,sCAAmC,CAFnC,iBAAkB,CAClB,6BAAuB,CAEvB,+BD+CA,CAIA,mDAEE,uCAHJ,kDAIM,2CAGN,CAFI,CACF,CAGF,iDAEE,kBAAmB,CAGnB,0DAAgC,CAChC,2GAAuE,CALvE,YAAa,CAEb,uCAAiC,CACjC,uCAGF,CAEA,gDAGE,iGACF,CAEA,6CAEE,gDAA2B,CAD3B,8CAEF","file":"FilteredActionList-6808e67a.css","sourcesContent":[".Root {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.Header {\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: 0 1px 0 var(--borderColor-default);\n z-index: 1;\n}\n\n.Container {\n display: flex;\n height: 100%;\n overflow: auto;\n flex-grow: 1;\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 & .ActionListItem:not(:focus, [data-is-active-descendant], [data-active], [data-input-focused]) {\n content-visibility: auto;\n contain-intrinsic-size: auto 32px;\n }\n\n /* When showDividers is enabled, divider ::before pseudo-elements on ActionListSubContent are\n positioned outside the item bounds (top: -7px). content-visibility: auto applies paint containment\n which clips these, so we must disable it for items in lists with dividers. */\n & [data-dividers='true'] .ActionListItem {\n content-visibility: visible;\n }\n}\n\n.ActionList {\n flex-grow: 1;\n}\n\n.ActionListItem:focus {\n background: var(--control-transparent-bgColor-selected);\n\n &::after {\n @mixin activeIndicatorLine;\n }\n}\n\n.ActionListItem:where([data-input-focused]):where([data-first-child]) {\n background: var(--control-transparent-bgColor-selected);\n\n &::after {\n @mixin activeIndicatorLine;\n }\n}\n\n.FullScreenTextInput {\n @media screen and (--viewportRange-narrow) {\n /* Ensures inputs don't zoom on mobile iPhone but are body-font size on iPad */\n @supports (-webkit-touch-callout: none) {\n font-size: var(--text-title-size-small);\n }\n }\n}\n\n.SelectAllContainer {\n display: flex;\n align-items: center;\n padding-block: var(--base-size-4);\n padding-inline: var(--base-size-16);\n background: var(--bgColor-muted);\n border-bottom: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.SelectAllCheckbox {\n /* -1px hack to offset 1px border-bottom causing uneven alignment */\n /* stylelint-disable-next-line primer/spacing */\n margin: var(--base-size-4) var(--base-size-8) calc(var(--base-size-4) - 1px) 0;\n}\n\n.SelectAllLabel {\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n}\n","@define-mixin activeIndicatorLine {\n position: absolute;\n top: var(--base-size-4);\n left: calc(-1 * var(--base-size-8));\n width: var(--base-size-4);\n height: calc(100% - var(--base-size-8));\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-accent-emphasis);\n border-radius: var(--borderRadius-medium);\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './FilteredActionList-
|
|
1
|
+
import './FilteredActionList-6808e67a.css';
|
|
2
2
|
|
|
3
3
|
var classes = {"Root":"prc-FilteredActionList-Root-QgIk1","Header":"prc-FilteredActionList-Header-y6ihu","Container":"prc-FilteredActionList-Container-647gF","ActionListItem":"prc-FilteredActionList-ActionListItem-RSinr","ActionList":"prc-FilteredActionList-ActionList-3-Bxb","FullScreenTextInput":"prc-FilteredActionList-FullScreenTextInput-CJvWO","SelectAllContainer":"prc-FilteredActionList-SelectAllContainer-X2ij0","SelectAllCheckbox":"prc-FilteredActionList-SelectAllCheckbox-Axs5l","SelectAllLabel":"prc-FilteredActionList-SelectAllLabel-Bi-PZ"};
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AAKrC,MAAM,MAAM,KAAK,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,CAAA;AACxC,KAAK,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAA;AACnD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,MAAM,CAAA;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AA8BD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAsF/E,CAAA;AAED,wBAAgB,QAAQ;YAnHd,KAAK;kBACC,MAAM;gBACR,iBAAiB;wBACT,SAAS;0BACP,MAAM;gBAChB,MAAM;kBACJ,MAAM;kBACN,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;kBACvD,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;oBAC1C,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;EA4G7D;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,UAG1F;AAqGD,eAAe,aAAa,CAAA"}
|
package/dist/ThemeProvider.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import ReactDOM from 'react-dom';
|
|
3
4
|
import theme from './theme.js';
|
|
4
5
|
import deepmerge from 'deepmerge';
|
|
5
6
|
import { useSyncedState } from './hooks/useSyncedState.js';
|
|
@@ -29,99 +30,61 @@ const getServerHandoff = id => {
|
|
|
29
30
|
}
|
|
30
31
|
return {};
|
|
31
32
|
};
|
|
32
|
-
const ThemeProvider =
|
|
33
|
+
const ThemeProvider = ({
|
|
34
|
+
children,
|
|
35
|
+
...props
|
|
36
|
+
}) => {
|
|
33
37
|
var _ref, _props$colorMode, _ref2, _props$dayScheme, _ref3, _props$nightScheme;
|
|
34
|
-
|
|
35
|
-
let children;
|
|
36
|
-
let props;
|
|
37
|
-
if ($[0] !== t0) {
|
|
38
|
-
({
|
|
39
|
-
children,
|
|
40
|
-
...props
|
|
41
|
-
} = t0);
|
|
42
|
-
$[0] = t0;
|
|
43
|
-
$[1] = children;
|
|
44
|
-
$[2] = props;
|
|
45
|
-
} else {
|
|
46
|
-
children = $[1];
|
|
47
|
-
props = $[2];
|
|
48
|
-
}
|
|
38
|
+
// Get fallback values from parent ThemeProvider (if exists)
|
|
49
39
|
const {
|
|
50
40
|
theme: fallbackTheme,
|
|
51
41
|
colorMode: fallbackColorMode,
|
|
52
42
|
dayScheme: fallbackDayScheme,
|
|
53
43
|
nightScheme: fallbackNightScheme
|
|
54
44
|
} = useTheme();
|
|
45
|
+
|
|
46
|
+
// Initialize state
|
|
55
47
|
const theme$1 = fallbackTheme !== null && fallbackTheme !== void 0 ? fallbackTheme : theme;
|
|
56
48
|
const uniqueDataId = useId();
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
$[4] = t1;
|
|
62
|
-
} else {
|
|
63
|
-
t1 = $[4];
|
|
64
|
-
}
|
|
65
|
-
const [serverColorMode, setServerColorMode] = React.useState(t1);
|
|
49
|
+
const {
|
|
50
|
+
resolvedServerColorMode
|
|
51
|
+
} = getServerHandoff(uniqueDataId);
|
|
52
|
+
const resolvedColorModePassthrough = React.useRef(resolvedServerColorMode);
|
|
66
53
|
const [colorMode, setColorMode] = useSyncedState((_ref = (_props$colorMode = props.colorMode) !== null && _props$colorMode !== void 0 ? _props$colorMode : fallbackColorMode) !== null && _ref !== void 0 ? _ref : defaultColorMode);
|
|
67
54
|
const [dayScheme, setDayScheme] = useSyncedState((_ref2 = (_props$dayScheme = props.dayScheme) !== null && _props$dayScheme !== void 0 ? _props$dayScheme : fallbackDayScheme) !== null && _ref2 !== void 0 ? _ref2 : defaultDayScheme);
|
|
68
55
|
const [nightScheme, setNightScheme] = useSyncedState((_ref3 = (_props$nightScheme = props.nightScheme) !== null && _props$nightScheme !== void 0 ? _props$nightScheme : fallbackNightScheme) !== null && _ref3 !== void 0 ? _ref3 : defaultNightScheme);
|
|
69
56
|
const systemColorMode = useSystemColorMode();
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
$[5] = colorMode;
|
|
74
|
-
$[6] = serverColorMode;
|
|
75
|
-
$[7] = systemColorMode;
|
|
76
|
-
$[8] = t2;
|
|
77
|
-
} else {
|
|
78
|
-
t2 = $[8];
|
|
79
|
-
}
|
|
80
|
-
const resolvedColorMode = t2;
|
|
81
|
-
let t3;
|
|
82
|
-
if ($[9] !== dayScheme || $[10] !== nightScheme || $[11] !== resolvedColorMode) {
|
|
83
|
-
t3 = chooseColorScheme(resolvedColorMode, dayScheme, nightScheme);
|
|
84
|
-
$[9] = dayScheme;
|
|
85
|
-
$[10] = nightScheme;
|
|
86
|
-
$[11] = resolvedColorMode;
|
|
87
|
-
$[12] = t3;
|
|
88
|
-
} else {
|
|
89
|
-
t3 = $[12];
|
|
90
|
-
}
|
|
91
|
-
const colorScheme = t3;
|
|
92
|
-
let t4;
|
|
93
|
-
if ($[13] !== colorScheme || $[14] !== theme$1) {
|
|
94
|
-
t4 = applyColorScheme(theme$1, colorScheme);
|
|
95
|
-
$[13] = colorScheme;
|
|
96
|
-
$[14] = theme$1;
|
|
97
|
-
$[15] = t4;
|
|
98
|
-
} else {
|
|
99
|
-
t4 = $[15];
|
|
100
|
-
}
|
|
57
|
+
// eslint-disable-next-line react-hooks/refs
|
|
58
|
+
const resolvedColorMode = resolvedColorModePassthrough.current || resolveColorMode(colorMode, systemColorMode);
|
|
59
|
+
const colorScheme = chooseColorScheme(resolvedColorMode, dayScheme, nightScheme);
|
|
101
60
|
const {
|
|
102
61
|
resolvedTheme,
|
|
103
62
|
resolvedColorScheme
|
|
104
|
-
} =
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
63
|
+
} = React.useMemo(() => applyColorScheme(theme$1, colorScheme), [theme$1, colorScheme]);
|
|
64
|
+
|
|
65
|
+
// this effect will only run on client
|
|
66
|
+
React.useEffect(function updateColorModeAfterServerPassthrough() {
|
|
67
|
+
const resolvedColorModeOnClient = resolveColorMode(colorMode, systemColorMode);
|
|
68
|
+
if (resolvedColorModePassthrough.current) {
|
|
69
|
+
// if the resolved color mode passed on from the server is not the resolved color mode on client, change it!
|
|
70
|
+
if (resolvedColorModePassthrough.current !== resolvedColorModeOnClient) {
|
|
71
|
+
window.setTimeout(() => {
|
|
72
|
+
// use ReactDOM.flushSync to prevent automatic batching of state updates since React 18
|
|
73
|
+
// ref: https://github.com/reactwg/react-18/discussions/21
|
|
74
|
+
ReactDOM.flushSync(() => {
|
|
75
|
+
// override colorMode to whatever is resolved on the client to get a re-render
|
|
76
|
+
setColorMode(resolvedColorModeOnClient);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// immediately after that, set the colorMode to what the user passed to respond to system color mode changes
|
|
80
|
+
setColorMode(colorMode);
|
|
81
|
+
});
|
|
111
82
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
} else {
|
|
118
|
-
t5 = $[17];
|
|
119
|
-
t6 = $[18];
|
|
120
|
-
}
|
|
121
|
-
React.useEffect(t5, t6);
|
|
122
|
-
let t7;
|
|
123
|
-
if ($[19] !== colorMode || $[20] !== colorScheme || $[21] !== dayScheme || $[22] !== nightScheme || $[23] !== resolvedColorMode || $[24] !== resolvedColorScheme || $[25] !== resolvedTheme || $[26] !== setColorMode || $[27] !== setDayScheme || $[28] !== setNightScheme) {
|
|
124
|
-
t7 = {
|
|
83
|
+
resolvedColorModePassthrough.current = null;
|
|
84
|
+
}
|
|
85
|
+
}, [colorMode, systemColorMode, setColorMode]);
|
|
86
|
+
return /*#__PURE__*/jsx(ThemeContext.Provider, {
|
|
87
|
+
value: {
|
|
125
88
|
theme: resolvedTheme,
|
|
126
89
|
colorScheme,
|
|
127
90
|
colorMode,
|
|
@@ -132,72 +95,24 @@ const ThemeProvider = t0 => {
|
|
|
132
95
|
setColorMode,
|
|
133
96
|
setDayScheme,
|
|
134
97
|
setNightScheme
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
$[21] = dayScheme;
|
|
139
|
-
$[22] = nightScheme;
|
|
140
|
-
$[23] = resolvedColorMode;
|
|
141
|
-
$[24] = resolvedColorScheme;
|
|
142
|
-
$[25] = resolvedTheme;
|
|
143
|
-
$[26] = setColorMode;
|
|
144
|
-
$[27] = setDayScheme;
|
|
145
|
-
$[28] = setNightScheme;
|
|
146
|
-
$[29] = t7;
|
|
147
|
-
} else {
|
|
148
|
-
t7 = $[29];
|
|
149
|
-
}
|
|
150
|
-
const contextValue = t7;
|
|
151
|
-
const t8 = colorMode === "auto" ? "auto" : colorScheme.includes("dark") ? "dark" : "light";
|
|
152
|
-
let t9;
|
|
153
|
-
if ($[30] !== props.preventSSRMismatch || $[31] !== resolvedColorMode || $[32] !== uniqueDataId) {
|
|
154
|
-
t9 = props.preventSSRMismatch ? /*#__PURE__*/jsx("script", {
|
|
155
|
-
type: "application/json",
|
|
156
|
-
id: `__PRIMER_DATA_${uniqueDataId}__`,
|
|
157
|
-
dangerouslySetInnerHTML: {
|
|
158
|
-
__html: JSON.stringify({
|
|
159
|
-
resolvedServerColorMode: resolvedColorMode
|
|
160
|
-
})
|
|
161
|
-
}
|
|
162
|
-
}) : null;
|
|
163
|
-
$[30] = props.preventSSRMismatch;
|
|
164
|
-
$[31] = resolvedColorMode;
|
|
165
|
-
$[32] = uniqueDataId;
|
|
166
|
-
$[33] = t9;
|
|
167
|
-
} else {
|
|
168
|
-
t9 = $[33];
|
|
169
|
-
}
|
|
170
|
-
let t10;
|
|
171
|
-
if ($[34] !== children || $[35] !== dayScheme || $[36] !== nightScheme || $[37] !== t8 || $[38] !== t9) {
|
|
172
|
-
t10 = /*#__PURE__*/jsxs("div", {
|
|
173
|
-
"data-color-mode": t8,
|
|
98
|
+
},
|
|
99
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
100
|
+
"data-color-mode": colorMode === 'auto' ? 'auto' : colorScheme.includes('dark') ? 'dark' : 'light',
|
|
174
101
|
"data-light-theme": dayScheme,
|
|
175
102
|
"data-dark-theme": nightScheme,
|
|
176
|
-
children: [children,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
let t11;
|
|
188
|
-
if ($[40] !== contextValue || $[41] !== t10) {
|
|
189
|
-
t11 = /*#__PURE__*/jsx(ThemeContext.Provider, {
|
|
190
|
-
value: contextValue,
|
|
191
|
-
children: t10
|
|
192
|
-
});
|
|
193
|
-
$[40] = contextValue;
|
|
194
|
-
$[41] = t10;
|
|
195
|
-
$[42] = t11;
|
|
196
|
-
} else {
|
|
197
|
-
t11 = $[42];
|
|
198
|
-
}
|
|
199
|
-
return t11;
|
|
103
|
+
children: [children, props.preventSSRMismatch ? /*#__PURE__*/jsx("script", {
|
|
104
|
+
type: "application/json",
|
|
105
|
+
id: `__PRIMER_DATA_${uniqueDataId}__`,
|
|
106
|
+
dangerouslySetInnerHTML: {
|
|
107
|
+
__html: JSON.stringify({
|
|
108
|
+
resolvedServerColorMode: resolvedColorMode
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
}) : null]
|
|
112
|
+
})
|
|
113
|
+
});
|
|
200
114
|
};
|
|
115
|
+
ThemeProvider.displayName = "ThemeProvider";
|
|
201
116
|
function useTheme() {
|
|
202
117
|
return React.useContext(ThemeContext);
|
|
203
118
|
}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.prc-FilteredActionList-Root-QgIk1{display:flex;flex-direction:column;overflow:hidden}.prc-FilteredActionList-Header-y6ihu{box-shadow:0 1px 0 var(--borderColor-default,var(--color-border-default));z-index:1}.prc-FilteredActionList-Container-647gF{display:flex;flex-grow:1;height:100%;overflow:auto}.prc-FilteredActionList-Container-647gF .prc-FilteredActionList-ActionListItem-RSinr:not(:focus,[data-is-active-descendant],[data-active],[data-input-focused]){contain-intrinsic-size:auto 32px;content-visibility:auto}.prc-FilteredActionList-ActionList-3-Bxb{flex-grow:1}.prc-FilteredActionList-ActionListItem-RSinr:focus{background:var(--control-transparent-bgColor-selected,var(--color-action-list-item-default-selected-bg))}.prc-FilteredActionList-ActionListItem-RSinr:focus:after{background:var(--borderColor-accent-emphasis,var(--color-accent-emphasis));border-radius:var(--borderRadius-medium,.375rem);content:"";height:calc(100% - var(--base-size-8,.5rem));left:calc(var(--base-size-8,.5rem)*-1);position:absolute;top:var(--base-size-4,.25rem);width:var(--base-size-4,.25rem)}.prc-FilteredActionList-ActionListItem-RSinr:where([data-input-focused]):where([data-first-child]){background:var(--control-transparent-bgColor-selected,var(--color-action-list-item-default-selected-bg))}.prc-FilteredActionList-ActionListItem-RSinr:where([data-input-focused]):where([data-first-child]):after{background:var(--borderColor-accent-emphasis,var(--color-accent-emphasis));border-radius:var(--borderRadius-medium,.375rem);content:"";height:calc(100% - var(--base-size-8,.5rem));left:calc(var(--base-size-8,.5rem)*-1);position:absolute;top:var(--base-size-4,.25rem);width:var(--base-size-4,.25rem)}@media screen and (max-width:calc(48rem - 0.02px)){@supports (-webkit-touch-callout:none){.prc-FilteredActionList-FullScreenTextInput-CJvWO{font-size:var(--text-title-size-small,1rem)}}}.prc-FilteredActionList-SelectAllContainer-X2ij0{align-items:center;background:var(--bgColor-muted,var(--color-canvas-subtle));border-bottom:var(--borderWidth-thin,.0625rem) solid var(--borderColor-default,var(--color-border-default));display:flex;padding-block:var(--base-size-4,.25rem);padding-inline:var(--base-size-16,1rem)}.prc-FilteredActionList-SelectAllCheckbox-Axs5l{margin:var(--base-size-4,.25rem) var(--base-size-8,.5rem) calc(var(--base-size-4,.25rem) - 1px) 0}.prc-FilteredActionList-SelectAllLabel-Bi-PZ{color:var(--fgColor-muted,var(--color-fg-muted));font-size:var(--text-body-size-medium,.875rem)}
|
|
2
|
-
/*# sourceMappingURL=FilteredActionList-02db90c6.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/FilteredActionList/FilteredActionList.module.css.js","../../postcss-preset-primer/src/mixins/activeIndicatorLine.css"],"names":[],"mappings":"AAAA,mCACE,YAAa,CACb,qBAAsB,CACtB,eACF,CAEA,qCAEE,yEAA8C,CAC9C,SACF,CAEA,wCACE,YAAa,CAGb,WAAY,CAFZ,WAAY,CACZ,aAUF,CAJE,gKAEE,gCAAiC,CADjC,uBAEF,CAGF,yCACE,WACF,CAEA,mDACE,wGAKF,CAHE,yDC1BA,0EAA8C,CAC9C,gDAAyC,CAHzC,UAAW,CADX,4CAAuC,CAFvC,sCAAmC,CAFnC,iBAAkB,CAClB,6BAAuB,CAEvB,+BDgCA,CAGF,mGACE,wGAKF,CAHE,yGClCA,0EAA8C,CAC9C,gDAAyC,CAHzC,UAAW,CADX,4CAAuC,CAFvC,sCAAmC,CAFnC,iBAAkB,CAClB,6BAAuB,CAEvB,+BDwCA,CAIA,mDAEE,uCAHJ,kDAIM,2CAGN,CAFI,CACF,CAGF,iDAEE,kBAAmB,CAGnB,0DAAgC,CAChC,2GAAuE,CALvE,YAAa,CAEb,uCAAiC,CACjC,uCAGF,CAEA,gDAGE,iGACF,CAEA,6CAEE,gDAA2B,CAD3B,8CAEF","file":"FilteredActionList-02db90c6.css","sourcesContent":[".Root {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.Header {\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: 0 1px 0 var(--borderColor-default);\n z-index: 1;\n}\n\n.Container {\n display: flex;\n height: 100%;\n overflow: auto;\n flex-grow: 1;\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 & .ActionListItem:not(:focus, [data-is-active-descendant], [data-active], [data-input-focused]) {\n content-visibility: auto;\n contain-intrinsic-size: auto 32px;\n }\n}\n\n.ActionList {\n flex-grow: 1;\n}\n\n.ActionListItem:focus {\n background: var(--control-transparent-bgColor-selected);\n\n &::after {\n @mixin activeIndicatorLine;\n }\n}\n\n.ActionListItem:where([data-input-focused]):where([data-first-child]) {\n background: var(--control-transparent-bgColor-selected);\n\n &::after {\n @mixin activeIndicatorLine;\n }\n}\n\n.FullScreenTextInput {\n @media screen and (--viewportRange-narrow) {\n /* Ensures inputs don't zoom on mobile iPhone but are body-font size on iPad */\n @supports (-webkit-touch-callout: none) {\n font-size: var(--text-title-size-small);\n }\n }\n}\n\n.SelectAllContainer {\n display: flex;\n align-items: center;\n padding-block: var(--base-size-4);\n padding-inline: var(--base-size-16);\n background: var(--bgColor-muted);\n border-bottom: var(--borderWidth-thin) solid var(--borderColor-default);\n}\n\n.SelectAllCheckbox {\n /* -1px hack to offset 1px border-bottom causing uneven alignment */\n /* stylelint-disable-next-line primer/spacing */\n margin: var(--base-size-4) var(--base-size-8) calc(var(--base-size-4) - 1px) 0;\n}\n\n.SelectAllLabel {\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n}\n","@define-mixin activeIndicatorLine {\n position: absolute;\n top: var(--base-size-4);\n left: calc(-1 * var(--base-size-8));\n width: var(--base-size-4);\n height: calc(100% - var(--base-size-8));\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-accent-emphasis);\n border-radius: var(--borderRadius-medium);\n}\n"]}
|