@primer/react 38.28.0 → 38.29.0-rc.0d60f51e2
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 +12 -1
- package/dist/ActionList/ActionList-65f7daac.css +2 -0
- package/dist/ActionList/ActionList-65f7daac.css.map +1 -0
- package/dist/ActionList/ActionList.module.css.js +2 -2
- package/dist/ActionList/Group.d.ts +0 -5
- package/dist/ActionList/Group.d.ts.map +1 -1
- package/dist/ActionList/Group.js +2 -5
- package/dist/ActionList/GroupContext.d.ts +8 -0
- package/dist/ActionList/GroupContext.d.ts.map +1 -0
- package/dist/ActionList/GroupContext.js +8 -0
- package/dist/ActionList/Item.js +3 -2
- package/dist/ActionList/List.d.ts.map +1 -1
- package/dist/ActionList/List.js +21 -16
- package/dist/ActionList/Selection.js +1 -1
- package/dist/ActionList/index.d.ts.map +1 -1
- package/dist/ActionList/index.js +2 -1
- package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.js +6 -2
- package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.js +3 -1
- package/dist/Autocomplete/AutocompleteInput.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteInput.js +2 -1
- package/dist/Autocomplete/AutocompleteMenu.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteMenu.js +1 -0
- package/dist/Autocomplete/AutocompleteOverlay.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteOverlay.js +1 -0
- package/dist/Button/IconButton.d.ts.map +1 -1
- package/dist/Button/IconButton.js +3 -2
- package/dist/ConfirmationDialog/ConfirmationDialog.d.ts +0 -9
- package/dist/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/dist/ConfirmationDialog/ConfirmationDialog.js +1 -42
- package/dist/ConfirmationDialog/useConfirm.d.ts +12 -0
- package/dist/ConfirmationDialog/useConfirm.d.ts.map +1 -0
- package/dist/ConfirmationDialog/useConfirm.js +44 -0
- package/dist/Dialog/Dialog.d.ts +0 -1
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +2 -4
- package/dist/Dialog/DialogContext.d.ts +3 -0
- package/dist/Dialog/DialogContext.d.ts.map +1 -0
- package/dist/Dialog/DialogContext.js +5 -0
- package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
- package/dist/FeatureFlags/DefaultFeatureFlags.js +1 -0
- package/dist/FilteredActionList/FilteredActionList.js +2 -1
- package/dist/FilteredActionList/FilteredActionListLoaders.d.ts +2 -10
- package/dist/FilteredActionList/FilteredActionListLoaders.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionListLoaders.js +3 -12
- package/dist/FilteredActionList/constants.d.ts +11 -0
- package/dist/FilteredActionList/constants.d.ts.map +1 -0
- package/dist/FilteredActionList/constants.js +13 -0
- package/dist/FilteredActionList/index.js +0 -1
- package/dist/KeybindingHint/KeybindingHint.d.ts +0 -14
- package/dist/KeybindingHint/KeybindingHint.d.ts.map +1 -1
- package/dist/KeybindingHint/KeybindingHint.js +2 -16
- package/dist/KeybindingHint/components/Chord.d.ts +0 -3
- package/dist/KeybindingHint/components/Chord.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Chord.js +2 -21
- package/dist/KeybindingHint/components/Sequence.d.ts +0 -3
- package/dist/KeybindingHint/components/Sequence.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Sequence.js +2 -5
- package/dist/KeybindingHint/components/utils.d.ts +8 -0
- package/dist/KeybindingHint/components/utils.d.ts.map +1 -0
- package/dist/KeybindingHint/components/utils.js +32 -0
- package/dist/KeybindingHint/index.d.ts +2 -1
- package/dist/KeybindingHint/index.d.ts.map +1 -1
- package/dist/KeybindingHint/utils.d.ts +15 -0
- package/dist/KeybindingHint/utils.d.ts.map +1 -0
- package/dist/KeybindingHint/utils.js +17 -0
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/NavList/NavList.js +4 -0
- package/dist/Overlay/Overlay.d.ts +2 -18
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js +1 -20
- package/dist/Overlay/constants.d.ts +19 -0
- package/dist/Overlay/constants.d.ts.map +1 -0
- package/dist/Overlay/constants.js +20 -0
- package/dist/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/PageHeader/PageHeader.js +63 -35
- package/dist/Portal/Portal.d.ts +0 -14
- package/dist/Portal/Portal.d.ts.map +1 -1
- package/dist/Portal/Portal.js +4 -46
- package/dist/Portal/PortalContext.d.ts +5 -0
- package/dist/Portal/PortalContext.d.ts.map +1 -0
- package/dist/Portal/PortalContext.js +5 -0
- package/dist/Portal/index.d.ts +3 -1
- package/dist/Portal/index.d.ts.map +1 -1
- package/dist/Portal/index.js +0 -1
- package/dist/Portal/portalRoot.d.ts +11 -0
- package/dist/Portal/portalRoot.d.ts.map +1 -0
- package/dist/Portal/portalRoot.js +39 -0
- package/dist/Radio/Radio.js +1 -1
- package/dist/RadioGroup/RadioGroup.d.ts +1 -6
- package/dist/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup/RadioGroup.js +2 -3
- package/dist/RadioGroup/RadioGroupContext.d.ts +7 -0
- package/dist/RadioGroup/RadioGroupContext.d.ts.map +1 -0
- package/dist/RadioGroup/RadioGroupContext.js +5 -0
- package/dist/RadioGroup/index.d.ts +2 -1
- package/dist/RadioGroup/index.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +2 -1
- package/dist/TextInput/TextInput.d.ts +6 -0
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +2 -1
- package/dist/ThemeContext.d.ts +15 -0
- package/dist/ThemeContext.d.ts.map +1 -0
- package/dist/ThemeContext.js +9 -0
- package/dist/ThemeProvider.d.ts +1 -14
- package/dist/ThemeProvider.d.ts.map +1 -1
- package/dist/ThemeProvider.js +3 -18
- package/dist/Timeline/Timeline.d.ts +1 -1
- package/dist/Timeline/Timeline.d.ts.map +1 -1
- package/dist/Timeline/constants.d.ts +2 -0
- package/dist/Timeline/constants.d.ts.map +1 -0
- package/dist/Token/IssueLabelToken.d.ts.map +1 -1
- package/dist/Token/IssueLabelToken.js +3 -1
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +3 -1
- package/dist/Token/TokenBase.d.ts +2 -5
- package/dist/Token/TokenBase.d.ts.map +1 -1
- package/dist/Token/TokenBase.js +3 -14
- package/dist/Token/_RemoveTokenButton.js +1 -1
- package/dist/Token/constants.d.ts +4 -0
- package/dist/Token/constants.d.ts.map +1 -0
- package/dist/Token/constants.js +3 -0
- package/dist/Token/utils.d.ts +3 -0
- package/dist/Token/utils.d.ts.map +1 -0
- package/dist/Token/utils.js +14 -0
- package/dist/Tooltip/Tooltip.d.ts +0 -3
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +2 -3
- package/dist/Tooltip/TooltipContext.d.ts +5 -0
- package/dist/Tooltip/TooltipContext.d.ts.map +1 -0
- package/dist/Tooltip/TooltipContext.js +5 -0
- package/dist/TooltipV2/Tooltip.d.ts +0 -3
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +4 -3
- package/dist/TooltipV2/TooltipContext.d.ts +5 -0
- package/dist/TooltipV2/TooltipContext.d.ts.map +1 -0
- package/dist/TooltipV2/TooltipContext.js +5 -0
- package/dist/TreeView/TreeView.js +1 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts +0 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +2 -5
- package/dist/UnderlineNav/utils.d.ts +3 -0
- package/dist/UnderlineNav/utils.d.ts.map +1 -0
- package/dist/UnderlineNav/utils.js +8 -0
- package/dist/experimental/SelectPanel2/SelectPanel.d.ts.map +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +2 -1
- package/dist/experimental/SelectPanel2/index.d.ts +2 -1
- package/dist/experimental/SelectPanel2/index.d.ts.map +1 -1
- package/dist/experimental/Tabs/Tabs.d.ts +3 -111
- package/dist/experimental/Tabs/Tabs.d.ts.map +1 -1
- package/dist/experimental/Tabs/Tabs.js +3 -237
- package/dist/experimental/Tabs/TabsContext.d.ts +3 -0
- package/dist/experimental/Tabs/TabsContext.d.ts.map +1 -0
- package/dist/experimental/Tabs/TabsContext.js +5 -0
- package/dist/experimental/Tabs/index.d.ts +5 -2
- package/dist/experimental/Tabs/index.d.ts.map +1 -1
- package/dist/experimental/Tabs/types.d.ts +107 -0
- package/dist/experimental/Tabs/types.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTab.d.ts +7 -0
- package/dist/experimental/Tabs/useTab.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTab.js +97 -0
- package/dist/experimental/Tabs/useTabList.d.ts +3 -0
- package/dist/experimental/Tabs/useTabList.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTabList.js +100 -0
- package/dist/experimental/Tabs/useTabPanel.d.ts +4 -0
- package/dist/experimental/Tabs/useTabPanel.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTabPanel.js +37 -0
- package/dist/experimental/Tabs/useTabs.d.ts +3 -0
- package/dist/experimental/Tabs/useTabs.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTabs.js +12 -0
- package/dist/experimental/index.js +7 -3
- package/dist/hooks/MatchMedia.d.ts +23 -0
- package/dist/hooks/MatchMedia.d.ts.map +1 -0
- package/dist/hooks/MatchMediaContext.d.ts +5 -0
- package/dist/hooks/MatchMediaContext.d.ts.map +1 -0
- package/dist/hooks/MatchMediaContext.js +8 -0
- package/dist/hooks/useMedia.d.ts +1 -24
- package/dist/hooks/useMedia.d.ts.map +1 -1
- package/dist/hooks/useMedia.js +15 -6
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/useTheme.d.ts +15 -0
- package/dist/useTheme.d.ts.map +1 -0
- package/dist/useTheme.js +16 -0
- package/dist/utils/story-helpers.d.ts +70 -0
- package/dist/utils/story-helpers.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/ActionList/ActionList-1940009e.css +0 -2
- package/dist/ActionList/ActionList-1940009e.css.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const heightMap: {
|
|
2
|
+
xsmall: string;
|
|
3
|
+
small: string;
|
|
4
|
+
medium: string;
|
|
5
|
+
large: string;
|
|
6
|
+
xlarge: string;
|
|
7
|
+
auto: string;
|
|
8
|
+
initial: string;
|
|
9
|
+
'fit-content': string;
|
|
10
|
+
};
|
|
11
|
+
export declare const widthMap: {
|
|
12
|
+
small: string;
|
|
13
|
+
medium: string;
|
|
14
|
+
large: string;
|
|
15
|
+
xlarge: string;
|
|
16
|
+
xxlarge: string;
|
|
17
|
+
auto: string;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/Overlay/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;CASrB,CAAA;AAED,eAAO,MAAM,QAAQ;;;;;;;CAOpB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const heightMap = {
|
|
2
|
+
xsmall: '192px',
|
|
3
|
+
small: '256px',
|
|
4
|
+
medium: '320px',
|
|
5
|
+
large: '432px',
|
|
6
|
+
xlarge: '600px',
|
|
7
|
+
auto: 'auto',
|
|
8
|
+
initial: 'auto',
|
|
9
|
+
'fit-content': 'fit-content'
|
|
10
|
+
};
|
|
11
|
+
const widthMap = {
|
|
12
|
+
small: '256px',
|
|
13
|
+
medium: '320px',
|
|
14
|
+
large: '480px',
|
|
15
|
+
xlarge: '640px',
|
|
16
|
+
xxlarge: '960px',
|
|
17
|
+
auto: 'auto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;AACD,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAA;AAiEpF,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,eAAe,CAAC,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAA;CAC7F,GAAG,iBAAiB,CAAA;AAsErB,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAC7C,GAAG,iBAAiB,CAAA;AAiDrB,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;AAuBrE,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;IACjD,iBAAiB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAA;CAC5D,GAAG,iBAAiB,CAAA;AAsFrB,eAAO,MAAM,UAAU;;;;;;;;;;;;+CA/GiC,YAAY;;;CA8HlE,CAAA"}
|
|
@@ -162,52 +162,78 @@ const ContextArea = t0 => {
|
|
|
162
162
|
ContextArea.__SLOT__ = Symbol('PageHeader.ContextArea');
|
|
163
163
|
// PageHeader.ParentLink : Only visible on narrow viewports by default to let users navigate up in the hierarchy.
|
|
164
164
|
const ParentLink = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
165
|
-
const $ = c(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
165
|
+
const $ = c(24);
|
|
166
|
+
let ariaLabel;
|
|
167
|
+
let children;
|
|
168
|
+
let className;
|
|
169
|
+
let href;
|
|
170
|
+
let rest;
|
|
171
|
+
let t1;
|
|
172
|
+
let t2;
|
|
173
|
+
if ($[0] !== t0) {
|
|
174
|
+
({
|
|
175
|
+
children,
|
|
176
|
+
className,
|
|
177
|
+
href,
|
|
178
|
+
"aria-label": ariaLabel,
|
|
179
|
+
as: t1,
|
|
180
|
+
hidden: t2,
|
|
181
|
+
...rest
|
|
182
|
+
} = t0);
|
|
183
|
+
$[0] = t0;
|
|
184
|
+
$[1] = ariaLabel;
|
|
185
|
+
$[2] = children;
|
|
186
|
+
$[3] = className;
|
|
187
|
+
$[4] = href;
|
|
188
|
+
$[5] = rest;
|
|
189
|
+
$[6] = t1;
|
|
190
|
+
$[7] = t2;
|
|
191
|
+
} else {
|
|
192
|
+
ariaLabel = $[1];
|
|
193
|
+
children = $[2];
|
|
194
|
+
className = $[3];
|
|
195
|
+
href = $[4];
|
|
196
|
+
rest = $[5];
|
|
197
|
+
t1 = $[6];
|
|
198
|
+
t2 = $[7];
|
|
199
|
+
}
|
|
174
200
|
const as = t1 === undefined ? "a" : t1;
|
|
175
201
|
const hidden = t2 === undefined ? hiddenOnRegularAndWide : t2;
|
|
176
202
|
let t3;
|
|
177
|
-
if ($[
|
|
203
|
+
if ($[8] !== className) {
|
|
178
204
|
t3 = clsx(classes.ParentLink, className);
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
205
|
+
$[8] = className;
|
|
206
|
+
$[9] = t3;
|
|
181
207
|
} else {
|
|
182
|
-
t3 = $[
|
|
208
|
+
t3 = $[9];
|
|
183
209
|
}
|
|
184
210
|
let t4;
|
|
185
|
-
if ($[
|
|
211
|
+
if ($[10] !== hidden) {
|
|
186
212
|
t4 = getHiddenDataAttributes(hidden);
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
213
|
+
$[10] = hidden;
|
|
214
|
+
$[11] = t4;
|
|
189
215
|
} else {
|
|
190
|
-
t4 = $[
|
|
216
|
+
t4 = $[11];
|
|
191
217
|
}
|
|
192
218
|
let t5;
|
|
193
|
-
if ($[
|
|
219
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
194
220
|
t5 = /*#__PURE__*/jsx(ArrowLeftIcon, {});
|
|
195
|
-
$[
|
|
221
|
+
$[12] = t5;
|
|
196
222
|
} else {
|
|
197
|
-
t5 = $[
|
|
223
|
+
t5 = $[12];
|
|
198
224
|
}
|
|
199
225
|
let t6;
|
|
200
|
-
if ($[
|
|
226
|
+
if ($[13] !== children) {
|
|
201
227
|
t6 = /*#__PURE__*/jsx("div", {
|
|
202
228
|
children: children
|
|
203
229
|
});
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
230
|
+
$[13] = children;
|
|
231
|
+
$[14] = t6;
|
|
206
232
|
} else {
|
|
207
|
-
t6 = $[
|
|
233
|
+
t6 = $[14];
|
|
208
234
|
}
|
|
209
235
|
let t7;
|
|
210
|
-
if ($[
|
|
236
|
+
if ($[15] !== ariaLabel || $[16] !== as || $[17] !== href || $[18] !== ref || $[19] !== rest || $[20] !== t3 || $[21] !== t4 || $[22] !== t6) {
|
|
211
237
|
t7 = /*#__PURE__*/jsx(Fragment, {
|
|
212
238
|
children: /*#__PURE__*/jsxs(Link, {
|
|
213
239
|
ref: ref,
|
|
@@ -218,19 +244,21 @@ const ParentLink = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
218
244
|
"data-component": "PageHeader.ParentLink",
|
|
219
245
|
...t4,
|
|
220
246
|
href: href,
|
|
247
|
+
...rest,
|
|
221
248
|
children: [t5, t6]
|
|
222
249
|
})
|
|
223
250
|
});
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
|
|
233
|
-
|
|
251
|
+
$[15] = ariaLabel;
|
|
252
|
+
$[16] = as;
|
|
253
|
+
$[17] = href;
|
|
254
|
+
$[18] = ref;
|
|
255
|
+
$[19] = rest;
|
|
256
|
+
$[20] = t3;
|
|
257
|
+
$[21] = t4;
|
|
258
|
+
$[22] = t6;
|
|
259
|
+
$[23] = t7;
|
|
260
|
+
} else {
|
|
261
|
+
t7 = $[23];
|
|
234
262
|
}
|
|
235
263
|
return t7;
|
|
236
264
|
});
|
package/dist/Portal/Portal.d.ts
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Register a container to serve as a portal root.
|
|
4
|
-
* @param root The element that will be the root for portals created in this container
|
|
5
|
-
* @param name The name of the container, to be used with the `containerName` prop on the Portal Component.
|
|
6
|
-
* If name is not specified, registers the default portal root.
|
|
7
|
-
*/
|
|
8
|
-
export declare function registerPortalRoot(root: Element, name?: string): void;
|
|
9
|
-
/**
|
|
10
|
-
* Provides the ability for component trees to override the portal root container for a sub-set of the experience.
|
|
11
|
-
* The portal will prioritize the context value unless overridden by their own `containerName` prop, and fallback to the default root if neither are specified
|
|
12
|
-
*/
|
|
13
|
-
export declare const PortalContext: React.Context<{
|
|
14
|
-
portalContainerName?: string;
|
|
15
|
-
}>;
|
|
16
2
|
export interface PortalProps {
|
|
17
3
|
/**
|
|
18
4
|
* Called when this portal is added to the DOM
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../src/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../src/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAMvC,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IAEpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CA6CjE,CAAA"}
|
package/dist/Portal/Portal.js
CHANGED
|
@@ -1,51 +1,9 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
import useIsomorphicLayoutEffect from '../utils/useIsomorphicLayoutEffect.js';
|
|
4
|
+
import { PortalContext } from './PortalContext.js';
|
|
5
|
+
import { DEFAULT_PORTAL_CONTAINER_NAME, ensureDefaultPortal, getPortalRoot } from './portalRoot.js';
|
|
4
6
|
|
|
5
|
-
const PRIMER_PORTAL_ROOT_ID = '__primerPortalRoot__';
|
|
6
|
-
const DEFAULT_PORTAL_CONTAINER_NAME = '__default__';
|
|
7
|
-
const portalRootRegistry = {};
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Register a container to serve as a portal root.
|
|
11
|
-
* @param root The element that will be the root for portals created in this container
|
|
12
|
-
* @param name The name of the container, to be used with the `containerName` prop on the Portal Component.
|
|
13
|
-
* If name is not specified, registers the default portal root.
|
|
14
|
-
*/
|
|
15
|
-
function registerPortalRoot(root, name = DEFAULT_PORTAL_CONTAINER_NAME) {
|
|
16
|
-
portalRootRegistry[name] = root;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Ensures that a default portal root exists and is registered. If a DOM element exists
|
|
20
|
-
// with id __primerPortalRoot__, allow that element to serve as the default portal root.
|
|
21
|
-
// Otherwise, create that element and attach it to the end of document.body.
|
|
22
|
-
function ensureDefaultPortal() {
|
|
23
|
-
const existingDefaultPortalContainer = portalRootRegistry[DEFAULT_PORTAL_CONTAINER_NAME];
|
|
24
|
-
if (!existingDefaultPortalContainer || !document.body.contains(existingDefaultPortalContainer)) {
|
|
25
|
-
let defaultPortalContainer = document.getElementById(PRIMER_PORTAL_ROOT_ID);
|
|
26
|
-
if (!(defaultPortalContainer instanceof Element)) {
|
|
27
|
-
defaultPortalContainer = document.createElement('div');
|
|
28
|
-
defaultPortalContainer.setAttribute('id', PRIMER_PORTAL_ROOT_ID);
|
|
29
|
-
defaultPortalContainer.style.position = 'absolute';
|
|
30
|
-
defaultPortalContainer.style.top = '0';
|
|
31
|
-
defaultPortalContainer.style.left = '0';
|
|
32
|
-
defaultPortalContainer.style.width = '100%';
|
|
33
|
-
const suitablePortalRoot = document.querySelector('[data-portal-root]');
|
|
34
|
-
if (suitablePortalRoot) {
|
|
35
|
-
suitablePortalRoot.appendChild(defaultPortalContainer);
|
|
36
|
-
} else {
|
|
37
|
-
document.body.appendChild(defaultPortalContainer);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
registerPortalRoot(defaultPortalContainer);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Provides the ability for component trees to override the portal root container for a sub-set of the experience.
|
|
46
|
-
* The portal will prioritize the context value unless overridden by their own `containerName` prop, and fallback to the default root if neither are specified
|
|
47
|
-
*/
|
|
48
|
-
const PortalContext = /*#__PURE__*/React.createContext({});
|
|
49
7
|
/**
|
|
50
8
|
* Creates a React Portal, placing all children in a separate physical DOM root node.
|
|
51
9
|
* @see https://reactjs.org/docs/portals.html
|
|
@@ -79,7 +37,7 @@ const Portal = ({
|
|
|
79
37
|
containerName = DEFAULT_PORTAL_CONTAINER_NAME;
|
|
80
38
|
ensureDefaultPortal();
|
|
81
39
|
}
|
|
82
|
-
const parentElement =
|
|
40
|
+
const parentElement = getPortalRoot(containerName);
|
|
83
41
|
if (!parentElement) {
|
|
84
42
|
throw new Error(`Portal container '${containerName}' is not yet registered. Container must be registered with registerPortalRoot before use.`);
|
|
85
43
|
}
|
|
@@ -93,4 +51,4 @@ const Portal = ({
|
|
|
93
51
|
return /*#__PURE__*/createPortal(children, element);
|
|
94
52
|
};
|
|
95
53
|
|
|
96
|
-
export { Portal
|
|
54
|
+
export { Portal };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PortalContext.d.ts","sourceRoot":"","sources":["../../src/Portal/PortalContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,aAAa;0BACF,MAAM;EACxB,CAAA"}
|
package/dist/Portal/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { PortalProps } from './Portal';
|
|
2
|
-
import { Portal
|
|
2
|
+
import { Portal } from './Portal';
|
|
3
|
+
import { PortalContext } from './PortalContext';
|
|
4
|
+
import { registerPortalRoot } from './portalRoot';
|
|
3
5
|
export default Portal;
|
|
4
6
|
export { registerPortalRoot };
|
|
5
7
|
export type { PortalProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Portal/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AACzC,OAAO,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Portal/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAC,kBAAkB,EAAC,MAAM,cAAc,CAAA;AAE/C,eAAe,MAAM,CAAA;AACrB,OAAO,EAAC,kBAAkB,EAAC,CAAA;AAC3B,YAAY,EAAC,WAAW,EAAC,CAAA;AACzB,OAAO,EAAC,aAAa,EAAC,CAAA"}
|
package/dist/Portal/index.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DEFAULT_PORTAL_CONTAINER_NAME = "__default__";
|
|
2
|
+
/**
|
|
3
|
+
* Register a container to serve as a portal root.
|
|
4
|
+
* @param root The element that will be the root for portals created in this container
|
|
5
|
+
* @param name The name of the container, to be used with the `containerName` prop on the Portal Component.
|
|
6
|
+
* If name is not specified, registers the default portal root.
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerPortalRoot(root: Element, name?: string): void;
|
|
9
|
+
export declare function ensureDefaultPortal(): void;
|
|
10
|
+
export declare function getPortalRoot(name: string): Element | undefined;
|
|
11
|
+
//# sourceMappingURL=portalRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portalRoot.d.ts","sourceRoot":"","sources":["../../src/Portal/portalRoot.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,6BAA6B,gBAAgB,CAAA;AAI1D;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,SAAgC,GAAG,IAAI,CAE5F;AAED,wBAAgB,mBAAmB,SAqBlC;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,uBAEzC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const PRIMER_PORTAL_ROOT_ID = '__primerPortalRoot__';
|
|
2
|
+
const DEFAULT_PORTAL_CONTAINER_NAME = '__default__';
|
|
3
|
+
const portalRootRegistry = {};
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Register a container to serve as a portal root.
|
|
7
|
+
* @param root The element that will be the root for portals created in this container
|
|
8
|
+
* @param name The name of the container, to be used with the `containerName` prop on the Portal Component.
|
|
9
|
+
* If name is not specified, registers the default portal root.
|
|
10
|
+
*/
|
|
11
|
+
function registerPortalRoot(root, name = DEFAULT_PORTAL_CONTAINER_NAME) {
|
|
12
|
+
portalRootRegistry[name] = root;
|
|
13
|
+
}
|
|
14
|
+
function ensureDefaultPortal() {
|
|
15
|
+
const existingDefaultPortalContainer = portalRootRegistry[DEFAULT_PORTAL_CONTAINER_NAME];
|
|
16
|
+
if (!existingDefaultPortalContainer || !document.body.contains(existingDefaultPortalContainer)) {
|
|
17
|
+
let defaultPortalContainer = document.getElementById(PRIMER_PORTAL_ROOT_ID);
|
|
18
|
+
if (!(defaultPortalContainer instanceof Element)) {
|
|
19
|
+
defaultPortalContainer = document.createElement('div');
|
|
20
|
+
defaultPortalContainer.setAttribute('id', PRIMER_PORTAL_ROOT_ID);
|
|
21
|
+
defaultPortalContainer.style.position = 'absolute';
|
|
22
|
+
defaultPortalContainer.style.top = '0';
|
|
23
|
+
defaultPortalContainer.style.left = '0';
|
|
24
|
+
defaultPortalContainer.style.width = '100%';
|
|
25
|
+
const suitablePortalRoot = document.querySelector('[data-portal-root]');
|
|
26
|
+
if (suitablePortalRoot) {
|
|
27
|
+
suitablePortalRoot.appendChild(defaultPortalContainer);
|
|
28
|
+
} else {
|
|
29
|
+
document.body.appendChild(defaultPortalContainer);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
registerPortalRoot(defaultPortalContainer);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function getPortalRoot(name) {
|
|
36
|
+
return portalRootRegistry[name];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { DEFAULT_PORTAL_CONTAINER_NAME, ensureDefaultPortal, getPortalRoot, registerPortalRoot };
|
package/dist/Radio/Radio.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import React, { useContext } from 'react';
|
|
3
|
-
import { RadioGroupContext } from '../RadioGroup/
|
|
3
|
+
import { RadioGroupContext } from '../RadioGroup/RadioGroupContext.js';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import sharedClasses from '../Checkbox/shared.module.css.js';
|
|
6
6
|
import classes from './Radio.module.css.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChangeEvent,
|
|
1
|
+
import type { ChangeEvent, FC } from 'react';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type { CheckboxOrRadioGroupProps } from '../internal/components/CheckboxOrRadioGroup';
|
|
4
4
|
export type RadioGroupProps = {
|
|
@@ -11,11 +11,6 @@ export type RadioGroupProps = {
|
|
|
11
11
|
*/
|
|
12
12
|
name: string;
|
|
13
13
|
} & CheckboxOrRadioGroupProps;
|
|
14
|
-
export declare const RadioGroupContext: React.Context<{
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
17
|
-
name: string;
|
|
18
|
-
} | null>;
|
|
19
14
|
declare const _default: FC<React.PropsWithChildren<RadioGroupProps>> & {
|
|
20
15
|
Caption: import("..").FCWithSlotMarker<{
|
|
21
16
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../src/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../src/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAsB,EAAE,EAAC,MAAM,OAAO,CAAA;AAC9D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,6CAA6C,CAAA;AAQ1F,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAC/E;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,yBAAyB,CAAA;;;;;;;;;;AAkC7B,wBAIE"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import { createContext } from 'react';
|
|
3
2
|
import CheckboxOrRadioGroupCaption from '../internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js';
|
|
4
3
|
import CheckboxOrRadioGroupLabel from '../internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js';
|
|
5
4
|
import CheckboxOrRadioGroupValidation from '../internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js';
|
|
5
|
+
import { RadioGroupContext } from './RadioGroupContext.js';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
import { useRenderForcingRef } from '../hooks/useRenderForcingRef.js';
|
|
8
8
|
import CheckboxOrRadioGroup from '../internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js';
|
|
9
9
|
|
|
10
|
-
const RadioGroupContext = /*#__PURE__*/createContext(null);
|
|
11
10
|
const RadioGroup = t0 => {
|
|
12
11
|
const $ = c(23);
|
|
13
12
|
let children;
|
|
@@ -118,4 +117,4 @@ var RadioGroup_default = Object.assign(RadioGroup, {
|
|
|
118
117
|
Validation: CheckboxOrRadioGroupValidation
|
|
119
118
|
});
|
|
120
119
|
|
|
121
|
-
export {
|
|
120
|
+
export { RadioGroup_default as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ChangeEventHandler } from 'react';
|
|
2
|
+
export declare const RadioGroupContext: import("react").Context<{
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
5
|
+
name: string;
|
|
6
|
+
} | null>;
|
|
7
|
+
//# sourceMappingURL=RadioGroupContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroupContext.d.ts","sourceRoot":"","sources":["../../src/RadioGroup/RadioGroupContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,kBAAkB,EAAgB,MAAM,OAAO,CAAA;AAE5D,eAAO,MAAM,iBAAiB;eACjB,OAAO;eACP,kBAAkB,CAAC,gBAAgB,CAAC;UACzC,MAAM;SACC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RadioGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RadioGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAA;AACpC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAA;AAErD,YAAY,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA"}
|
|
@@ -8,7 +8,7 @@ import { ButtonComponent } from '../Button/Button.js';
|
|
|
8
8
|
import { useId } from '../hooks/useId.js';
|
|
9
9
|
import { useProvidedStateOrCreate } from '../hooks/useProvidedStateOrCreate.js';
|
|
10
10
|
import useSafeTimeout from '../hooks/useSafeTimeout.js';
|
|
11
|
-
import
|
|
11
|
+
import '../FilteredActionList/FilteredActionListLoaders.js';
|
|
12
12
|
import { announceFromElement, announce } from '@primer/live-region-element';
|
|
13
13
|
import classes from './SelectPanel.module.css.js';
|
|
14
14
|
import { clsx } from 'clsx';
|
|
@@ -22,6 +22,7 @@ import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
|
|
|
22
22
|
import { useProvidedRefOrCreate } from '../hooks/useProvidedRefOrCreate.js';
|
|
23
23
|
import { AnchoredOverlay } from '../AnchoredOverlay/AnchoredOverlay.js';
|
|
24
24
|
import Heading from '../Heading/Heading.js';
|
|
25
|
+
import { FilteredActionListLoadingTypes } from '../FilteredActionList/constants.js';
|
|
25
26
|
|
|
26
27
|
const SHORT_DELAY_MS = 500;
|
|
27
28
|
const LONG_DELAY_MS = 1000;
|
|
@@ -33,6 +33,12 @@ export type TextInputNonPassthroughProps = {
|
|
|
33
33
|
* When the limit is exceeded, validation styling will be applied.
|
|
34
34
|
*/
|
|
35
35
|
characterLimit?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Stable identifier for the underlying input element.
|
|
38
|
+
*
|
|
39
|
+
* TODO: next-major: Remove in favor of data-component="TextInput.Input"
|
|
40
|
+
*/
|
|
41
|
+
'data-component'?: string;
|
|
36
42
|
} & Partial<Pick<StyledWrapperProps, 'block' | 'contrast' | 'disabled' | 'monospace' | 'width' | 'maxWidth' | 'minWidth' | 'variant' | 'size' | 'validationStatus'>>;
|
|
37
43
|
export type TextInputProps = Merge<React.ComponentPropsWithoutRef<'input'>, TextInputNonPassthroughProps>;
|
|
38
44
|
declare const _default: PolymorphicForwardRefComponent<"input", TextInputProps> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../src/TextInput/TextInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAwD,MAAM,OAAO,CAAA;AAE5E,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAO/F,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,yCAAyC,CAAA;AAQ/E,MAAM,MAAM,4BAA4B,GAAG;IACzC,uEAAuE;IACvE,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACxB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;;QAKI;IACJ,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAA;IAChD,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,SAAS,CAAA;IACnD;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,SAAS,CAAA;IACpD;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAAA;IACvE;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3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A;;;;;;;;;;;AAkQzG,wBAGE"}
|
|
@@ -43,6 +43,7 @@ const TextInput = /*#__PURE__*/React.forwardRef(({
|
|
|
43
43
|
onChange,
|
|
44
44
|
value,
|
|
45
45
|
defaultValue,
|
|
46
|
+
'data-component': dataComponent,
|
|
46
47
|
...inputProps
|
|
47
48
|
}, ref) => {
|
|
48
49
|
const [isInputFocused, setIsInputFocused] = useState(false);
|
|
@@ -188,7 +189,7 @@ const TextInput = /*#__PURE__*/React.forwardRef(({
|
|
|
188
189
|
"aria-describedby": characterLimit ? [characterCountStaticMessageId, inputDescribedBy].filter(Boolean).join(' ') || undefined : inputDescribedBy
|
|
189
190
|
// TODO: next-major: Remove in favor of data-component="TextInput.Input"
|
|
190
191
|
,
|
|
191
|
-
"data-component":
|
|
192
|
+
"data-component": dataComponent !== null && dataComponent !== void 0 ? dataComponent : 'input'
|
|
192
193
|
}), loading && /*#__PURE__*/jsx(VisuallyHidden, {
|
|
193
194
|
id: loadingId,
|
|
194
195
|
children: loaderText
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ColorMode, ColorModeWithAuto, Theme } from './ThemeProvider';
|
|
3
|
+
export declare const ThemeContext: React.Context<{
|
|
4
|
+
theme?: Theme;
|
|
5
|
+
colorScheme?: string;
|
|
6
|
+
colorMode?: ColorModeWithAuto;
|
|
7
|
+
resolvedColorMode?: ColorMode;
|
|
8
|
+
resolvedColorScheme?: string;
|
|
9
|
+
dayScheme?: string;
|
|
10
|
+
nightScheme?: string;
|
|
11
|
+
setColorMode: React.Dispatch<React.SetStateAction<ColorModeWithAuto>>;
|
|
12
|
+
setDayScheme: React.Dispatch<React.SetStateAction<string>>;
|
|
13
|
+
setNightScheme: React.Dispatch<React.SetStateAction<string>>;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=ThemeContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../src/ThemeContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAC,SAAS,EAAE,iBAAiB,EAAE,KAAK,EAAC,MAAM,iBAAiB,CAAA;AAExE,eAAO,MAAM,YAAY;YACf,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;EAK5D,CAAA"}
|
package/dist/ThemeProvider.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const defaultColorMode = "day";
|
|
|
3
3
|
export type Theme = {
|
|
4
4
|
[key: string]: any;
|
|
5
5
|
};
|
|
6
|
-
type ColorMode = 'day' | 'night' | 'light' | 'dark';
|
|
6
|
+
export type ColorMode = 'day' | 'night' | 'light' | 'dark';
|
|
7
7
|
export type ColorModeWithAuto = ColorMode | 'auto';
|
|
8
8
|
export type ThemeProviderProps = {
|
|
9
9
|
colorMode?: ColorModeWithAuto;
|
|
@@ -21,18 +21,5 @@ export type ThemeProviderProps = {
|
|
|
21
21
|
contextOnly?: boolean;
|
|
22
22
|
};
|
|
23
23
|
export declare const ThemeProvider: React.FC<React.PropsWithChildren<ThemeProviderProps>>;
|
|
24
|
-
export declare function useTheme(): {
|
|
25
|
-
theme?: Theme;
|
|
26
|
-
colorScheme?: string;
|
|
27
|
-
colorMode?: ColorModeWithAuto;
|
|
28
|
-
resolvedColorMode?: ColorMode;
|
|
29
|
-
resolvedColorScheme?: string;
|
|
30
|
-
dayScheme?: string;
|
|
31
|
-
nightScheme?: string;
|
|
32
|
-
setColorMode: React.Dispatch<React.SetStateAction<ColorModeWithAuto>>;
|
|
33
|
-
setDayScheme: React.Dispatch<React.SetStateAction<string>>;
|
|
34
|
-
setNightScheme: React.Dispatch<React.SetStateAction<string>>;
|
|
35
|
-
};
|
|
36
|
-
export declare function useColorSchemeVar(values: Partial<Record<string, string>>, fallback: string): string;
|
|
37
24
|
export default ThemeProvider;
|
|
38
25
|
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -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;AASzB,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AAKrC,MAAM,MAAM,KAAK,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,CAAA;AACxC,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAA;AAC1D,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;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AA6BD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CA2F/E,CAAA;AAqED,eAAe,aAAa,CAAA"}
|