@primer/react 38.0.0-rc.4 → 38.0.0-rc.6
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 +64 -0
- package/dist/ActionList/Item.d.ts +47 -4
- package/dist/ActionList/Item.d.ts.map +1 -1
- package/dist/ActionList/Item.js +11 -3
- package/dist/ActionList/List.d.ts +23 -3
- package/dist/ActionList/List.d.ts.map +1 -1
- package/dist/ActionList/List.js +20 -13
- package/dist/ActionList/index.d.ts +67 -2
- package/dist/ActionList/index.d.ts.map +1 -1
- package/dist/ActionList/shared.d.ts +12 -6
- package/dist/ActionList/shared.d.ts.map +1 -1
- package/dist/ActionList/shared.js +3 -0
- package/dist/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/Autocomplete/AutocompleteMenu.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteMenu.js +2 -2
- package/dist/Avatar/Avatar.d.ts +2 -3
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +38 -46
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +15 -12
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +35 -34
- package/dist/Button/ButtonBase.d.ts.map +1 -1
- package/dist/Button/ButtonBase.js +8 -4
- package/dist/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/dist/CheckboxGroup/index.d.ts +1 -1
- package/dist/CheckboxGroup/index.d.ts.map +1 -1
- package/dist/CircleBadge/CircleBadge-87549d20.css +2 -0
- package/dist/CircleBadge/CircleBadge-87549d20.css.map +1 -0
- package/dist/CircleBadge/CircleBadge.d.ts +14 -14
- package/dist/CircleBadge/CircleBadge.d.ts.map +1 -1
- package/dist/CircleBadge/CircleBadge.js +69 -13
- package/dist/CircleBadge/CircleBadge.module.css.js +5 -0
- package/dist/DataTable/{Table-87f4043f.css → Table-7f5cb3e4.css} +2 -2
- package/dist/DataTable/Table-7f5cb3e4.css.map +1 -0
- package/dist/DataTable/Table.js +1 -1
- package/dist/DataTable/Table.module.css.js +2 -2
- package/dist/Dialog/{Dialog-8a809d11.css → Dialog-1a61e61a.css} +2 -2
- package/dist/Dialog/Dialog-1a61e61a.css.map +1 -0
- package/dist/Dialog/Dialog.d.ts +6 -12
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +11 -26
- package/dist/Dialog/Dialog.module.css.js +2 -2
- package/dist/DialogV1/Dialog.d.ts +13 -11
- package/dist/DialogV1/Dialog.d.ts.map +1 -1
- package/dist/DialogV1/Dialog.js +71 -63
- package/dist/FormControl/FormControl.d.ts +6 -1
- package/dist/FormControl/FormControl.d.ts.map +1 -1
- package/dist/FormControl/FormControl.js +4 -1
- package/dist/FormControl/FormControlCaption.d.ts +2 -1
- package/dist/FormControl/FormControlCaption.d.ts.map +1 -1
- package/dist/FormControl/FormControlCaption.js +12 -9
- package/dist/FormControl/FormControlLabel.d.ts +1 -0
- package/dist/FormControl/FormControlLabel.d.ts.map +1 -1
- package/dist/FormControl/FormControlLeadingVisual.d.ts +3 -1
- package/dist/FormControl/FormControlLeadingVisual.d.ts.map +1 -1
- package/dist/FormControl/FormControlLeadingVisual.js +11 -8
- package/dist/FormControl/_FormControlValidation.d.ts +1 -0
- package/dist/FormControl/_FormControlValidation.d.ts.map +1 -1
- package/dist/FormControl/_FormControlValidation.js +11 -8
- package/dist/Heading/Heading.d.ts +4 -4
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +0 -11
- package/dist/KeybindingHint/components/Chord-d4edcc89.css +2 -0
- package/dist/KeybindingHint/components/Chord-d4edcc89.css.map +1 -0
- package/dist/KeybindingHint/components/Chord.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Chord.js +44 -68
- package/dist/KeybindingHint/components/Chord.module.css.js +5 -0
- package/dist/Label/Label.d.ts +1 -3
- package/dist/Label/Label.d.ts.map +1 -1
- package/dist/Label/Label.js +37 -69
- package/dist/Label/index.d.ts +0 -1
- package/dist/Label/index.d.ts.map +1 -1
- package/dist/LabelGroup/LabelGroup-eda75c0f.css +2 -0
- package/dist/LabelGroup/LabelGroup-eda75c0f.css.map +1 -0
- package/dist/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/dist/LabelGroup/LabelGroup.js +4 -10
- package/dist/LabelGroup/LabelGroup.module.css.js +5 -0
- package/dist/Link/Link-e01bdaee.css +2 -0
- package/dist/Link/Link-e01bdaee.css.map +1 -0
- package/dist/Link/Link.d.ts +11 -5
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +21 -29
- package/dist/Link/Link.module.css.js +1 -1
- package/dist/NavList/NavList-5dc067e3.css +2 -0
- package/dist/NavList/NavList-5dc067e3.css.map +1 -0
- package/dist/NavList/NavList.d.ts +4 -5
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/NavList/NavList.js +214 -420
- package/dist/NavList/NavList.module.css.js +5 -0
- package/dist/Overlay/Overlay.d.ts +1 -2
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js +2 -3
- package/dist/Pagination/{Pagination-e98833e8.css → Pagination-1845feaa.css} +2 -2
- package/dist/Pagination/Pagination-1845feaa.css.map +1 -0
- package/dist/Pagination/Pagination.d.ts +1 -2
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +5 -13
- package/dist/Pagination/Pagination.module.css.js +1 -1
- package/dist/Placeholder.d.ts.map +1 -1
- package/dist/Popover/Popover.d.ts +0 -3
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/ScrollableRegion/ScrollableRegion-c1018dbe.css +2 -0
- package/dist/ScrollableRegion/ScrollableRegion-c1018dbe.css.map +1 -0
- package/dist/ScrollableRegion/ScrollableRegion.d.ts +1 -1
- package/dist/ScrollableRegion/ScrollableRegion.d.ts.map +1 -1
- package/dist/ScrollableRegion/ScrollableRegion.js +37 -31
- package/dist/ScrollableRegion/ScrollableRegion.module.css.js +5 -0
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +20 -1
- package/dist/Skeleton/SkeletonBox.js +2 -2
- package/dist/SkeletonAvatar/SkeletonAvatar.js +2 -2
- package/dist/StateLabel/{StateLabel-50420ff5.css → StateLabel-aaa1d148.css} +2 -2
- package/dist/StateLabel/{StateLabel-50420ff5.css.map → StateLabel-aaa1d148.css.map} +1 -1
- package/dist/StateLabel/StateLabel.module.css.js +1 -1
- package/dist/TabNav/TabNav.d.ts +4 -6
- package/dist/TabNav/TabNav.d.ts.map +1 -1
- package/dist/TabNav/TabNav.js +5 -7
- package/dist/Text/Text.d.ts +1 -2
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +1 -3
- package/dist/TextInput/TextInput.d.ts +1 -1
- package/dist/TextInputWithTokens/{TextInputWithTokens-fb9b5109.css → TextInputWithTokens-946ead3e.css} +2 -2
- package/dist/TextInputWithTokens/TextInputWithTokens-946ead3e.css.map +1 -0
- package/dist/TextInputWithTokens/TextInputWithTokens.d.ts.map +1 -1
- package/dist/TextInputWithTokens/TextInputWithTokens.js +6 -7
- package/dist/TextInputWithTokens/TextInputWithTokens.module.css.js +2 -2
- package/dist/ThemeProvider.js +3 -3
- package/dist/Token/Token.d.ts +1 -2
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/TokenBase.d.ts +1 -2
- package/dist/Token/TokenBase.d.ts.map +1 -1
- package/dist/Token/TokenBase.js +64 -63
- package/dist/Token/_RemoveTokenButton.d.ts +1 -2
- package/dist/Token/_RemoveTokenButton.d.ts.map +1 -1
- package/dist/Token/_RemoveTokenButton.js +38 -104
- package/dist/Token/_TokenTextContainer.d.ts +1 -1
- package/dist/Token/_TokenTextContainer.d.ts.map +1 -1
- package/dist/Token/_TokenTextContainer.js +40 -20
- package/dist/Tooltip/Tooltip.d.ts +1 -2
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +1 -2
- package/dist/TooltipV2/Tooltip.d.ts +16 -3
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +15 -5
- package/dist/UnderlineNav/UnderlineNav.js +2 -2
- package/dist/_VisuallyHidden.d.ts +5 -5
- package/dist/_VisuallyHidden.d.ts.map +1 -1
- package/dist/_VisuallyHidden.js +30 -32
- package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts +1 -2
- package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts.map +1 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +28 -13
- package/dist/hooks/useMnemonics.d.ts +1 -0
- package/dist/hooks/useMnemonics.d.ts.map +1 -1
- package/dist/hooks/useMnemonics.js +99 -57
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +1 -3
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.d.ts +1 -2
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +1 -3
- package/dist/internal/components/ConditionalWrapper.d.ts +2 -3
- package/dist/internal/components/ConditionalWrapper.d.ts.map +1 -1
- package/dist/internal/components/ConditionalWrapper.js +21 -18
- package/dist/internal/components/{InputValidation-057236a4.css → InputValidation-dddeaafd.css} +2 -2
- package/dist/internal/components/{InputValidation-057236a4.css.map → InputValidation-dddeaafd.css.map} +1 -1
- package/dist/internal/components/InputValidation.d.ts +1 -0
- package/dist/internal/components/InputValidation.d.ts.map +1 -1
- package/dist/internal/components/InputValidation.js +4 -4
- package/dist/internal/components/InputValidation.module.css.js +1 -1
- package/dist/internal/components/TextInputInnerAction.d.ts +1 -1
- package/dist/internal/components/UnderlineTabbedInterface.d.ts +11 -12
- package/dist/internal/components/UnderlineTabbedInterface.d.ts.map +1 -1
- package/dist/internal/components/UnderlineTabbedInterface.js +68 -63
- package/dist/internal/components/ValidationAnimationContainer.d.ts.map +1 -1
- package/dist/internal/components/ValidationAnimationContainer.js +5 -4
- package/dist/live-region/Announce.d.ts +2 -2
- package/dist/live-region/Announce.d.ts.map +1 -1
- package/dist/live-region/AriaAlert.d.ts +3 -3
- package/dist/live-region/AriaAlert.d.ts.map +1 -1
- package/dist/live-region/AriaAlert.js +14 -33
- package/dist/live-region/AriaStatus.d.ts +3 -3
- package/dist/live-region/AriaStatus.d.ts.map +1 -1
- package/dist/live-region/AriaStatus.js +14 -33
- package/dist/utils/modern-polymorphic.d.ts +22 -0
- package/dist/utils/modern-polymorphic.d.ts.map +1 -0
- package/dist/utils/modern-polymorphic.js +26 -0
- package/generated/components.json +4 -98
- package/package.json +7 -7
- package/dist/DataTable/Table-87f4043f.css.map +0 -1
- package/dist/Dialog/Dialog-8a809d11.css.map +0 -1
- package/dist/Link/Link-948b910e.css +0 -2
- package/dist/Link/Link-948b910e.css.map +0 -1
- package/dist/Pagination/Pagination-e98833e8.css.map +0 -1
- package/dist/TextInputWithTokens/TextInputWithTokens-fb9b5109.css.map +0 -1
- package/dist/utils/polymorphic2.d.ts +0 -16
- package/dist/utils/polymorphic2.d.ts.map +0 -1
|
@@ -9,8 +9,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
9
9
|
const CheckboxOrRadioGroupLabel = ({
|
|
10
10
|
children,
|
|
11
11
|
className,
|
|
12
|
-
visuallyHidden = false
|
|
13
|
-
sx
|
|
12
|
+
visuallyHidden = false
|
|
14
13
|
}) => {
|
|
15
14
|
const {
|
|
16
15
|
required,
|
|
@@ -21,7 +20,6 @@ const CheckboxOrRadioGroupLabel = ({
|
|
|
21
20
|
isVisible: !visuallyHidden,
|
|
22
21
|
title: required ? 'required field' : undefined,
|
|
23
22
|
"data-label-disabled": disabled ? '' : undefined,
|
|
24
|
-
sx: sx,
|
|
25
23
|
children: required ? /*#__PURE__*/jsxs(Stack, {
|
|
26
24
|
direction: "horizontal",
|
|
27
25
|
gap: "none",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
|
|
3
|
-
export declare const ConditionalWrapper: React.FC<React.PropsWithChildren<{
|
|
2
|
+
export declare const ConditionalWrapper: React.FC<React.PropsWithChildren<React.ComponentPropsWithoutRef<'div'> & {
|
|
4
3
|
if: boolean;
|
|
5
|
-
}
|
|
4
|
+
}>>;
|
|
6
5
|
//# sourceMappingURL=ConditionalWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionalWrapper.d.ts","sourceRoot":"","sources":["../../../src/internal/components/ConditionalWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,
|
|
1
|
+
{"version":3,"file":"ConditionalWrapper.d.ts","sourceRoot":"","sources":["../../../src/internal/components/ConditionalWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CACvC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAAC,EAAE,EAAE,OAAO,CAAA;CAAC,CAAC,CAM/E,CAAA"}
|
|
@@ -1,47 +1,50 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import Box from '../../Box/Box.js';
|
|
3
2
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
4
3
|
|
|
5
4
|
const ConditionalWrapper = props => {
|
|
6
|
-
const $ = c(
|
|
5
|
+
const $ = c(9);
|
|
6
|
+
let children;
|
|
7
7
|
let condition;
|
|
8
8
|
let rest;
|
|
9
9
|
if ($[0] !== props) {
|
|
10
10
|
({
|
|
11
11
|
if: condition,
|
|
12
|
+
children,
|
|
12
13
|
...rest
|
|
13
14
|
} = props);
|
|
14
15
|
$[0] = props;
|
|
15
|
-
$[1] =
|
|
16
|
-
$[2] =
|
|
16
|
+
$[1] = children;
|
|
17
|
+
$[2] = condition;
|
|
18
|
+
$[3] = rest;
|
|
17
19
|
} else {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
children = $[1];
|
|
21
|
+
condition = $[2];
|
|
22
|
+
rest = $[3];
|
|
20
23
|
}
|
|
21
24
|
if (condition) {
|
|
22
25
|
let t0;
|
|
23
|
-
if ($[
|
|
24
|
-
t0 = /*#__PURE__*/jsx(
|
|
26
|
+
if ($[4] !== children || $[5] !== rest) {
|
|
27
|
+
t0 = /*#__PURE__*/jsx("div", {
|
|
25
28
|
...rest,
|
|
26
|
-
children:
|
|
29
|
+
children: children
|
|
27
30
|
});
|
|
28
|
-
$[
|
|
29
|
-
$[
|
|
30
|
-
$[
|
|
31
|
+
$[4] = children;
|
|
32
|
+
$[5] = rest;
|
|
33
|
+
$[6] = t0;
|
|
31
34
|
} else {
|
|
32
|
-
t0 = $[
|
|
35
|
+
t0 = $[6];
|
|
33
36
|
}
|
|
34
37
|
return t0;
|
|
35
38
|
} else {
|
|
36
39
|
let t0;
|
|
37
|
-
if ($[
|
|
40
|
+
if ($[7] !== children) {
|
|
38
41
|
t0 = /*#__PURE__*/jsx(Fragment, {
|
|
39
|
-
children:
|
|
42
|
+
children: children
|
|
40
43
|
});
|
|
41
|
-
$[
|
|
42
|
-
$[
|
|
44
|
+
$[7] = children;
|
|
45
|
+
$[8] = t0;
|
|
43
46
|
} else {
|
|
44
|
-
t0 = $[
|
|
47
|
+
t0 = $[8];
|
|
45
48
|
}
|
|
46
49
|
return t0;
|
|
47
50
|
}
|
package/dist/internal/components/{InputValidation-057236a4.css → InputValidation-dddeaafd.css}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.prc-components-InputValidation-GjS0D{color:var(--inputValidation-fgColor);display:flex;font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-semibold,600)}.prc-components-InputValidation-GjS0D :where(a){color:currentColor;-webkit-text-decoration:underline;text-decoration:underline}.prc-components-InputValidation-GjS0D:where([data-validation-status=success]){--inputValidation-fgColor:var(--fgColor-success,var(--color-success-fg))}.prc-components-InputValidation-GjS0D:where([data-validation-status=error]){--inputValidation-fgColor:var(--fgColor-danger,var(--color-danger-fg))}.prc-components-ValidationIcon-Kdbbr{
|
|
2
|
-
/*# sourceMappingURL=InputValidation-
|
|
1
|
+
.prc-components-InputValidation-GjS0D{color:var(--inputValidation-fgColor);display:flex;font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-semibold,600)}.prc-components-InputValidation-GjS0D :where(a){color:currentColor;-webkit-text-decoration:underline;text-decoration:underline}.prc-components-InputValidation-GjS0D:where([data-validation-status=success]){--inputValidation-fgColor:var(--fgColor-success,var(--color-success-fg))}.prc-components-InputValidation-GjS0D:where([data-validation-status=error]){--inputValidation-fgColor:var(--fgColor-danger,var(--color-danger-fg))}.prc-components-ValidationIcon-Kdbbr{display:flex;margin-top:var(--base-size-2,.125rem);margin-inline-end:var(--base-size-4,.25rem);min-height:var(--inputValidation-iconSize)}.prc-components-ValidationText-jjsBp{line-height:var(--inputValidation-lineHeight)}
|
|
2
|
+
/*# sourceMappingURL=InputValidation-dddeaafd.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/internal/components/InputValidation.module.css"],"names":[],"mappings":"AAAA,sCAKE,oCAAqC,CAJrC,YAAa,CACb,4CAAsC,CACtC,gDAgBF,CAZE,gDACE,kBAAmB,CACnB,iCAA0B,CAA1B,yBACF,CAEA,8EACE,wEACF,CAEA,4EACE,sEACF,CAGF,qCACE,
|
|
1
|
+
{"version":3,"sources":["../../src/internal/components/InputValidation.module.css"],"names":[],"mappings":"AAAA,sCAKE,oCAAqC,CAJrC,YAAa,CACb,4CAAsC,CACtC,gDAgBF,CAZE,gDACE,kBAAmB,CACnB,iCAA0B,CAA1B,yBACF,CAEA,8EACE,wEACF,CAEA,4EACE,sEACF,CAGF,qCACE,YAAa,CACb,qCAA8B,CAC9B,2CAAqC,CACrC,0CACF,CAEA,qCAEE,6CACF","file":"InputValidation-dddeaafd.css","sourcesContent":[".InputValidation {\n display: flex;\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-semibold);\n /* stylelint-disable-next-line primer/colors */\n color: var(--inputValidation-fgColor);\n\n & :where(a) {\n color: currentColor;\n text-decoration: underline;\n }\n\n &:where([data-validation-status='success']) {\n --inputValidation-fgColor: var(--fgColor-success);\n }\n\n &:where([data-validation-status='error']) {\n --inputValidation-fgColor: var(--fgColor-danger);\n }\n}\n\n.ValidationIcon {\n display: flex;\n margin-top: var(--base-size-2);\n margin-inline-end: var(--base-size-4);\n min-height: var(--inputValidation-iconSize);\n}\n\n.ValidationText {\n /* stylelint-disable-next-line primer/typography */\n line-height: var(--inputValidation-lineHeight);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputValidation.d.ts","sourceRoot":"","sources":["../../../src/internal/components/InputValidation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AACpC,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,wCAAwC,CAAA;AAIhF,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"InputValidation.d.ts","sourceRoot":"","sources":["../../../src/internal/components/InputValidation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AACpC,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,wCAAwC,CAAA;AAIhF,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,GAAG,MAAM,CAAA;AAUV,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAuC7D,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -16,7 +16,7 @@ const InputValidation = t0 => {
|
|
|
16
16
|
className,
|
|
17
17
|
id,
|
|
18
18
|
validationStatus,
|
|
19
|
-
|
|
19
|
+
style
|
|
20
20
|
} = t0;
|
|
21
21
|
const IconComponent = validationStatus ? validationIconMap[validationStatus] : undefined;
|
|
22
22
|
let t1;
|
|
@@ -69,14 +69,14 @@ const InputValidation = t0 => {
|
|
|
69
69
|
t4 = $[7];
|
|
70
70
|
}
|
|
71
71
|
let t5;
|
|
72
|
-
if ($[8] !==
|
|
72
|
+
if ($[8] !== style || $[9] !== t1 || $[10] !== t2 || $[11] !== t4 || $[12] !== validationStatus) {
|
|
73
73
|
t5 = /*#__PURE__*/jsxs(Text, {
|
|
74
74
|
className: t1,
|
|
75
75
|
"data-validation-status": validationStatus,
|
|
76
|
-
|
|
76
|
+
style: style,
|
|
77
77
|
children: [t2, t4]
|
|
78
78
|
});
|
|
79
|
-
$[8] =
|
|
79
|
+
$[8] = style;
|
|
80
80
|
$[9] = t1;
|
|
81
81
|
$[10] = t2;
|
|
82
82
|
$[11] = t4;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './InputValidation-
|
|
1
|
+
import './InputValidation-dddeaafd.css';
|
|
2
2
|
|
|
3
3
|
var classes = {"InputValidation":"prc-components-InputValidation-GjS0D","ValidationIcon":"prc-components-ValidationIcon-Kdbbr","ValidationText":"prc-components-ValidationText-jjsBp"};
|
|
4
4
|
|
|
@@ -2,7 +2,7 @@ import type React from 'react';
|
|
|
2
2
|
import type { IconProps } from '@primer/octicons-react';
|
|
3
3
|
import type { ButtonProps } from '../../Button';
|
|
4
4
|
import type { SxProp } from '../../sx';
|
|
5
|
-
declare const TextInputAction: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "
|
|
5
|
+
declare const TextInputAction: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" | "size" | "tooltipDirection"> & {
|
|
6
6
|
/** @deprecated Text input action buttons should only use icon buttons */
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
/** Text that appears in a tooltip. If an icon is passed, this is also used as the label used by assistive technologies. */
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type FC } from 'react';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FC, type ElementType } from 'react';
|
|
3
3
|
import type { IconProps } from '@primer/octicons-react';
|
|
4
|
-
import { type SxProp } from '../../sx';
|
|
5
4
|
import type { ForwardRefComponent as PolymorphicForwardRefComponent } from '../../utils/polymorphic';
|
|
6
5
|
export declare const GAP = 8;
|
|
7
|
-
type UnderlineWrapperProps = {
|
|
6
|
+
type UnderlineWrapperProps<As extends React.ElementType> = {
|
|
8
7
|
slot?: string;
|
|
9
|
-
as?:
|
|
8
|
+
as?: As;
|
|
10
9
|
className?: string;
|
|
11
|
-
ref?: React.Ref<
|
|
12
|
-
}
|
|
13
|
-
export declare const UnderlineWrapper:
|
|
10
|
+
ref?: React.Ref<HTMLElement>;
|
|
11
|
+
};
|
|
12
|
+
export declare const UnderlineWrapper: PolymorphicForwardRefComponent<ElementType, UnderlineWrapperProps<ElementType>>;
|
|
14
13
|
export declare const UnderlineItemList: PolymorphicForwardRefComponent<"ul">;
|
|
15
14
|
export declare const LoadingCounter: () => React.JSX.Element;
|
|
16
|
-
export type UnderlineItemProps = {
|
|
17
|
-
as?:
|
|
15
|
+
export type UnderlineItemProps<As extends React.ElementType> = {
|
|
16
|
+
as?: As | 'a' | 'button';
|
|
18
17
|
className?: string;
|
|
19
18
|
iconsVisible?: boolean;
|
|
20
19
|
loadingCounters?: boolean;
|
|
@@ -22,7 +21,7 @@ export type UnderlineItemProps = {
|
|
|
22
21
|
icon?: FC<IconProps> | React.ReactElement;
|
|
23
22
|
id?: string;
|
|
24
23
|
ref?: React.Ref<unknown>;
|
|
25
|
-
} &
|
|
26
|
-
export declare const UnderlineItem: PolymorphicForwardRefComponent<
|
|
24
|
+
} & React.ComponentPropsWithoutRef<As extends 'a' ? 'a' : As extends 'button' ? 'button' : As>;
|
|
25
|
+
export declare const UnderlineItem: PolymorphicForwardRefComponent<ElementType, UnderlineItemProps<ElementType>>;
|
|
27
26
|
export {};
|
|
28
27
|
//# sourceMappingURL=UnderlineTabbedInterface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnderlineTabbedInterface.d.ts","sourceRoot":"","sources":["../../../src/internal/components/UnderlineTabbedInterface.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"UnderlineTabbedInterface.d.ts","sourceRoot":"","sources":["../../../src/internal/components/UnderlineTabbedInterface.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAgC,KAAK,EAAE,EAA0B,KAAK,WAAW,EAAC,MAAM,OAAO,CAAA;AAEtG,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAErD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,yBAAyB,CAAA;AAMlG,eAAO,MAAM,GAAG,IAAI,CAAA;AAEpB,KAAK,qBAAqB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,IAAI;IACzD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAWvB,8BAA8B,CAAC,WAAW,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAA;AAErF,eAAO,MAAM,iBAAiB,EAMxB,8BAA8B,CAAC,IAAI,CAAC,CAAA;AAE1C,eAAO,MAAM,cAAc,yBAE1B,CAAA;AAED,MAAM,MAAM,kBAAkB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,IAAI;IAC7D,EAAE,CAAC,EAAE,EAAE,GAAG,GAAG,GAAG,QAAQ,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,IAAI,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY,CAAA;IACzC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;CACzB,GAAG,KAAK,CAAC,wBAAwB,CAAC,EAAE,SAAS,GAAG,GAAG,GAAG,GAAG,EAAE,SAAS,QAAQ,GAAG,QAAQ,GAAG,EAAE,CAAC,CAAA;AAE9F,eAAO,MAAM,aAAa,EAuBpB,8BAA8B,CAAC,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAA"}
|
|
@@ -1,58 +1,64 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
3
|
import { isElement } from 'react-is';
|
|
4
4
|
import classes from './UnderlineTabbedInterface.module.css.js';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
|
-
import { BoxWithFallback } from './BoxWithFallback.js';
|
|
7
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
7
|
import CounterLabel from '../../CounterLabel/CounterLabel.js';
|
|
9
8
|
|
|
10
9
|
const GAP = 8;
|
|
11
|
-
const UnderlineWrapper = /*#__PURE__*/forwardRef((
|
|
12
|
-
const $ = c(
|
|
10
|
+
const UnderlineWrapper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
11
|
+
const $ = c(13);
|
|
13
12
|
let children;
|
|
14
13
|
let className;
|
|
15
14
|
let rest;
|
|
16
|
-
|
|
15
|
+
let t0;
|
|
16
|
+
if ($[0] !== props) {
|
|
17
17
|
({
|
|
18
18
|
children,
|
|
19
19
|
className,
|
|
20
|
+
as: t0,
|
|
20
21
|
...rest
|
|
21
|
-
} =
|
|
22
|
-
$[0] =
|
|
22
|
+
} = props);
|
|
23
|
+
$[0] = props;
|
|
23
24
|
$[1] = children;
|
|
24
25
|
$[2] = className;
|
|
25
26
|
$[3] = rest;
|
|
27
|
+
$[4] = t0;
|
|
26
28
|
} else {
|
|
27
29
|
children = $[1];
|
|
28
30
|
className = $[2];
|
|
29
31
|
rest = $[3];
|
|
32
|
+
t0 = $[4];
|
|
30
33
|
}
|
|
34
|
+
const Component = t0 === undefined ? "nav" : t0;
|
|
31
35
|
let t1;
|
|
32
|
-
if ($[
|
|
36
|
+
if ($[5] !== className) {
|
|
33
37
|
t1 = clsx(classes.UnderlineWrapper, className);
|
|
34
|
-
$[
|
|
35
|
-
$[
|
|
38
|
+
$[5] = className;
|
|
39
|
+
$[6] = t1;
|
|
36
40
|
} else {
|
|
37
|
-
t1 = $[
|
|
41
|
+
t1 = $[6];
|
|
38
42
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
const t2 = ref;
|
|
44
|
+
let t3;
|
|
45
|
+
if ($[7] !== Component || $[8] !== children || $[9] !== rest || $[10] !== t1 || $[11] !== t2) {
|
|
46
|
+
t3 = /*#__PURE__*/jsx(Component, {
|
|
42
47
|
className: t1,
|
|
43
|
-
ref:
|
|
48
|
+
ref: t2,
|
|
44
49
|
...rest,
|
|
45
50
|
children: children
|
|
46
51
|
});
|
|
47
|
-
$[
|
|
48
|
-
$[
|
|
49
|
-
$[
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
52
|
+
$[7] = Component;
|
|
53
|
+
$[8] = children;
|
|
54
|
+
$[9] = rest;
|
|
55
|
+
$[10] = t1;
|
|
56
|
+
$[11] = t2;
|
|
57
|
+
$[12] = t3;
|
|
52
58
|
} else {
|
|
53
|
-
|
|
59
|
+
t3 = $[12];
|
|
54
60
|
}
|
|
55
|
-
return
|
|
61
|
+
return t3;
|
|
56
62
|
});
|
|
57
63
|
const UnderlineItemList = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
58
64
|
const $ = c(7);
|
|
@@ -100,7 +106,7 @@ const LoadingCounter = () => {
|
|
|
100
106
|
}
|
|
101
107
|
return t0;
|
|
102
108
|
};
|
|
103
|
-
const UnderlineItem = /*#__PURE__*/forwardRef((
|
|
109
|
+
const UnderlineItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
104
110
|
const $ = c(27);
|
|
105
111
|
let Icon;
|
|
106
112
|
let children;
|
|
@@ -109,10 +115,10 @@ const UnderlineItem = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
109
115
|
let iconsVisible;
|
|
110
116
|
let loadingCounters;
|
|
111
117
|
let rest;
|
|
112
|
-
let
|
|
113
|
-
if ($[0] !==
|
|
118
|
+
let t0;
|
|
119
|
+
if ($[0] !== props) {
|
|
114
120
|
({
|
|
115
|
-
as:
|
|
121
|
+
as: t0,
|
|
116
122
|
children,
|
|
117
123
|
counter,
|
|
118
124
|
icon: Icon,
|
|
@@ -120,8 +126,8 @@ const UnderlineItem = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
120
126
|
loadingCounters,
|
|
121
127
|
className,
|
|
122
128
|
...rest
|
|
123
|
-
} =
|
|
124
|
-
$[0] =
|
|
129
|
+
} = props);
|
|
130
|
+
$[0] = props;
|
|
125
131
|
$[1] = Icon;
|
|
126
132
|
$[2] = children;
|
|
127
133
|
$[3] = className;
|
|
@@ -129,7 +135,7 @@ const UnderlineItem = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
129
135
|
$[5] = iconsVisible;
|
|
130
136
|
$[6] = loadingCounters;
|
|
131
137
|
$[7] = rest;
|
|
132
|
-
$[8] =
|
|
138
|
+
$[8] = t0;
|
|
133
139
|
} else {
|
|
134
140
|
Icon = $[1];
|
|
135
141
|
children = $[2];
|
|
@@ -138,44 +144,44 @@ const UnderlineItem = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
138
144
|
iconsVisible = $[5];
|
|
139
145
|
loadingCounters = $[6];
|
|
140
146
|
rest = $[7];
|
|
141
|
-
|
|
147
|
+
t0 = $[8];
|
|
142
148
|
}
|
|
143
|
-
const
|
|
144
|
-
let
|
|
149
|
+
const Component = t0 === undefined ? "a" : t0;
|
|
150
|
+
let t1;
|
|
145
151
|
if ($[9] !== className) {
|
|
146
|
-
|
|
152
|
+
t1 = clsx(classes.UnderlineItem, className);
|
|
147
153
|
$[9] = className;
|
|
148
|
-
$[10] =
|
|
154
|
+
$[10] = t1;
|
|
149
155
|
} else {
|
|
150
|
-
|
|
156
|
+
t1 = $[10];
|
|
151
157
|
}
|
|
152
|
-
let
|
|
158
|
+
let t2;
|
|
153
159
|
if ($[11] !== Icon || $[12] !== iconsVisible) {
|
|
154
|
-
|
|
160
|
+
t2 = iconsVisible && Icon && /*#__PURE__*/jsx("span", {
|
|
155
161
|
"data-component": "icon",
|
|
156
162
|
children: isElement(Icon) ? Icon : /*#__PURE__*/jsx(Icon, {})
|
|
157
163
|
});
|
|
158
164
|
$[11] = Icon;
|
|
159
165
|
$[12] = iconsVisible;
|
|
160
|
-
$[13] =
|
|
166
|
+
$[13] = t2;
|
|
161
167
|
} else {
|
|
162
|
-
|
|
168
|
+
t2 = $[13];
|
|
163
169
|
}
|
|
164
|
-
let
|
|
170
|
+
let t3;
|
|
165
171
|
if ($[14] !== children) {
|
|
166
|
-
|
|
172
|
+
t3 = children && /*#__PURE__*/jsx("span", {
|
|
167
173
|
"data-component": "text",
|
|
168
174
|
"data-content": children,
|
|
169
175
|
children: children
|
|
170
176
|
});
|
|
171
177
|
$[14] = children;
|
|
172
|
-
$[15] =
|
|
178
|
+
$[15] = t3;
|
|
173
179
|
} else {
|
|
174
|
-
|
|
180
|
+
t3 = $[15];
|
|
175
181
|
}
|
|
176
|
-
let
|
|
182
|
+
let t4;
|
|
177
183
|
if ($[16] !== counter || $[17] !== loadingCounters) {
|
|
178
|
-
|
|
184
|
+
t4 = counter !== undefined ? loadingCounters ? /*#__PURE__*/jsx("span", {
|
|
179
185
|
"data-component": "counter",
|
|
180
186
|
children: /*#__PURE__*/jsx(LoadingCounter, {})
|
|
181
187
|
}) : /*#__PURE__*/jsx("span", {
|
|
@@ -186,31 +192,30 @@ const UnderlineItem = /*#__PURE__*/forwardRef((t0, forwardedRef) => {
|
|
|
186
192
|
}) : null;
|
|
187
193
|
$[16] = counter;
|
|
188
194
|
$[17] = loadingCounters;
|
|
189
|
-
$[18] =
|
|
195
|
+
$[18] = t4;
|
|
190
196
|
} else {
|
|
191
|
-
|
|
197
|
+
t4 = $[18];
|
|
192
198
|
}
|
|
193
|
-
let
|
|
194
|
-
if ($[19] !==
|
|
195
|
-
|
|
196
|
-
ref: forwardedRef,
|
|
197
|
-
as: as,
|
|
198
|
-
className: t2,
|
|
199
|
+
let t5;
|
|
200
|
+
if ($[19] !== Component || $[20] !== ref || $[21] !== rest || $[22] !== t1 || $[23] !== t2 || $[24] !== t3 || $[25] !== t4) {
|
|
201
|
+
t5 = /*#__PURE__*/jsxs(Component, {
|
|
199
202
|
...rest,
|
|
200
|
-
|
|
203
|
+
ref: ref,
|
|
204
|
+
className: t1,
|
|
205
|
+
children: [t2, t3, t4]
|
|
201
206
|
});
|
|
202
|
-
$[19] =
|
|
203
|
-
$[20] =
|
|
207
|
+
$[19] = Component;
|
|
208
|
+
$[20] = ref;
|
|
204
209
|
$[21] = rest;
|
|
205
|
-
$[22] =
|
|
206
|
-
$[23] =
|
|
207
|
-
$[24] =
|
|
208
|
-
$[25] =
|
|
209
|
-
$[26] =
|
|
210
|
+
$[22] = t1;
|
|
211
|
+
$[23] = t2;
|
|
212
|
+
$[24] = t3;
|
|
213
|
+
$[25] = t4;
|
|
214
|
+
$[26] = t5;
|
|
210
215
|
} else {
|
|
211
|
-
|
|
216
|
+
t5 = $[26];
|
|
212
217
|
}
|
|
213
|
-
return
|
|
218
|
+
return t5;
|
|
214
219
|
});
|
|
215
220
|
|
|
216
221
|
export { GAP, LoadingCounter, UnderlineItem, UnderlineItemList, UnderlineWrapper };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidationAnimationContainer.d.ts","sourceRoot":"","sources":["../../../src/internal/components/ValidationAnimationContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ValidationAnimationContainer.d.ts","sourceRoot":"","sources":["../../../src/internal/components/ValidationAnimationContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,UAAU,KAAM,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAmBD,QAAA,MAAM,4BAA4B,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAkB1E,CAAA;AAED,eAAe,4BAA4B,CAAA"}
|
|
@@ -2,7 +2,6 @@ import { c } from 'react-compiler-runtime';
|
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
import styled, { keyframes, css } from 'styled-components';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
import Box from '../../Box/Box.js';
|
|
6
5
|
|
|
7
6
|
const fadeIn = keyframes(["0%{opacity:0;transform:translateY(-100%);}100%{opacity:1;transform:translateY(0);}"]);
|
|
8
7
|
// using easeOutQuint easing fn https://easings.net/#easeOutQuint
|
|
@@ -49,9 +48,11 @@ const ValidationAnimationContainer = t0 => {
|
|
|
49
48
|
const onAnimationEnd = t3;
|
|
50
49
|
let t4;
|
|
51
50
|
if ($[5] !== children || $[6] !== onAnimationEnd || $[7] !== shouldRender || $[8] !== show) {
|
|
52
|
-
t4 = shouldRender ? /*#__PURE__*/jsx(
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
t4 = shouldRender ? /*#__PURE__*/jsx("div", {
|
|
52
|
+
style: {
|
|
53
|
+
height: show ? "auto" : 0,
|
|
54
|
+
overflow: "hidden"
|
|
55
|
+
},
|
|
55
56
|
children: /*#__PURE__*/jsx(AnimatedElement, {
|
|
56
57
|
show: show,
|
|
57
58
|
onAnimationEnd: onAnimationEnd,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { PolymorphicProps } from '../utils/
|
|
3
|
-
export type AnnounceProps<As extends React.ElementType> = PolymorphicProps<'div',
|
|
2
|
+
import type { PolymorphicProps } from '../utils/modern-polymorphic';
|
|
3
|
+
export type AnnounceProps<As extends React.ElementType> = PolymorphicProps<As, 'div', {
|
|
4
4
|
/**
|
|
5
5
|
* Specify if the content of the element should be announced when this
|
|
6
6
|
* component is rendered and is not hidden
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Announce.d.ts","sourceRoot":"","sources":["../../src/live-region/Announce.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"Announce.d.ts","sourceRoot":"","sources":["../../src/live-region/Announce.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAEjE,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,IAAI,gBAAgB,CACxE,EAAE,EACF,KAAK,EACL;IACE;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,UAAU,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAA;CACpC,CACF,CAAA;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EAAE,KAAK,EAAE,aAAa,CAAC,EAAE,CAAC,qBAgGtF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type ElementType } from 'react';
|
|
3
|
-
import type { PolymorphicProps } from '../utils/
|
|
4
|
-
export type AriaAlertProps<As extends ElementType> = PolymorphicProps<'div',
|
|
3
|
+
import type { PolymorphicProps } from '../utils/modern-polymorphic';
|
|
4
|
+
export type AriaAlertProps<As extends ElementType> = PolymorphicProps<As, 'div', {
|
|
5
5
|
/**
|
|
6
6
|
* Specify if the content of the element should be announced when this
|
|
7
7
|
* component is rendered and is not hidden
|
|
@@ -14,5 +14,5 @@ export type AriaAlertProps<As extends ElementType> = PolymorphicProps<'div', As,
|
|
|
14
14
|
*/
|
|
15
15
|
hidden?: boolean;
|
|
16
16
|
}>;
|
|
17
|
-
export declare function AriaAlert<As extends ElementType = 'div'>(
|
|
17
|
+
export declare function AriaAlert<As extends ElementType = 'div'>(props: AriaAlertProps<As>): React.JSX.Element;
|
|
18
18
|
//# sourceMappingURL=AriaAlert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AriaAlert.d.ts","sourceRoot":"","sources":["../../src/live-region/AriaAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,KAAK,WAAW,EAAC,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"AriaAlert.d.ts","sourceRoot":"","sources":["../../src/live-region/AriaAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,KAAK,WAAW,EAAC,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAEjE,MAAM,MAAM,cAAc,CAAC,EAAE,SAAS,WAAW,IAAI,gBAAgB,CACnE,EAAE,EACF,KAAK,EACL;IACE;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CACF,CAAA;AAED,wBAAgB,SAAS,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,EAAE,KAAK,EAAE,cAAc,CAAC,EAAE,CAAC,qBAElF"}
|
|
@@ -2,43 +2,24 @@ import { c } from 'react-compiler-runtime';
|
|
|
2
2
|
import { Announce } from './Announce.js';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
function AriaAlert(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
function AriaAlert(props) {
|
|
6
|
+
var _props$announceOnShow;
|
|
7
|
+
const $ = c(3);
|
|
8
|
+
const t0 = (_props$announceOnShow = props.announceOnShow) !== null && _props$announceOnShow !== void 0 ? _props$announceOnShow : true;
|
|
9
9
|
let t1;
|
|
10
|
-
if ($[0] !== t0) {
|
|
11
|
-
({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = t0);
|
|
16
|
-
$[0] = t0;
|
|
17
|
-
$[1] = children;
|
|
18
|
-
$[2] = rest;
|
|
19
|
-
$[3] = t1;
|
|
20
|
-
} else {
|
|
21
|
-
children = $[1];
|
|
22
|
-
rest = $[2];
|
|
23
|
-
t1 = $[3];
|
|
24
|
-
}
|
|
25
|
-
const announceOnShow = t1 === undefined ? true : t1;
|
|
26
|
-
let t2;
|
|
27
|
-
if ($[4] !== announceOnShow || $[5] !== children || $[6] !== rest) {
|
|
28
|
-
t2 = /*#__PURE__*/jsx(Announce, {
|
|
29
|
-
...rest,
|
|
30
|
-
announceOnShow: announceOnShow,
|
|
31
|
-
politeness: "assertive",
|
|
32
|
-
children: children
|
|
10
|
+
if ($[0] !== props || $[1] !== t0) {
|
|
11
|
+
t1 = /*#__PURE__*/jsx(Announce, {
|
|
12
|
+
...props,
|
|
13
|
+
announceOnShow: t0,
|
|
14
|
+
politeness: "assertive"
|
|
33
15
|
});
|
|
34
|
-
$[
|
|
35
|
-
$[
|
|
36
|
-
$[
|
|
37
|
-
$[7] = t2;
|
|
16
|
+
$[0] = props;
|
|
17
|
+
$[1] = t0;
|
|
18
|
+
$[2] = t1;
|
|
38
19
|
} else {
|
|
39
|
-
|
|
20
|
+
t1 = $[2];
|
|
40
21
|
}
|
|
41
|
-
return
|
|
22
|
+
return t1;
|
|
42
23
|
}
|
|
43
24
|
|
|
44
25
|
export { AriaAlert };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type ElementType } from 'react';
|
|
3
|
-
import type { PolymorphicProps } from '../utils/
|
|
4
|
-
export type AriaStatusProps<As extends ElementType> = PolymorphicProps<'div',
|
|
3
|
+
import type { PolymorphicProps } from '../utils/modern-polymorphic';
|
|
4
|
+
export type AriaStatusProps<As extends ElementType = 'div'> = PolymorphicProps<As, 'div', {
|
|
5
5
|
/**
|
|
6
6
|
* Specify if the content of the element should be announced when this
|
|
7
7
|
* component is rendered and is not hidden
|
|
@@ -18,5 +18,5 @@ export type AriaStatusProps<As extends ElementType> = PolymorphicProps<'div', As
|
|
|
18
18
|
*/
|
|
19
19
|
delayMs?: number;
|
|
20
20
|
}>;
|
|
21
|
-
export declare function AriaStatus<As extends ElementType = 'div'>(
|
|
21
|
+
export declare function AriaStatus<As extends ElementType = 'div'>(props: AriaStatusProps<As>): React.JSX.Element;
|
|
22
22
|
//# sourceMappingURL=AriaStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AriaStatus.d.ts","sourceRoot":"","sources":["../../src/live-region/AriaStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,KAAK,WAAW,EAAC,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"AriaStatus.d.ts","sourceRoot":"","sources":["../../src/live-region/AriaStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,KAAK,WAAW,EAAC,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAEjE,MAAM,MAAM,eAAe,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,gBAAgB,CAC5E,EAAE,EACF,KAAK,EACL;IACE;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CACF,CAAA;AAED,wBAAgB,UAAU,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,EAAE,KAAK,EAAE,eAAe,CAAC,EAAE,CAAC,qBAEpF"}
|