@procore/core-react 12.42.0 → 12.43.0
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 +49 -1
- package/dist/AnchorNavigation/AnchorNavigation.js +11 -5
- package/dist/AnchorNavigation/AnchorNavigation.js.map +1 -1
- package/dist/AnchorNavigation/AnchorNavigation.styles.d.ts +1 -0
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +7 -3
- package/dist/AnchorNavigation/AnchorNavigation.styles.js.map +1 -1
- package/dist/AnchorNavigation/AnchorNavigation.types.d.ts +7 -1
- package/dist/AnchorNavigation/AnchorNavigation.types.js.map +1 -1
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.styles.d.ts +74 -74
- package/dist/AvatarStack/AvatarStack.styles.js +7 -7
- package/dist/Badge/Badge.styles.js +2 -2
- package/dist/BadgePill/BadgePill.styles.js +4 -4
- package/dist/Banner/Banner.styles.js +10 -10
- package/dist/Box/Box.styles.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
- package/dist/Button/Button.styles.js +5 -5
- package/dist/Button/Button.types.d.ts +1 -4
- package/dist/Button/Button.types.js.map +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js.map +1 -1
- package/dist/Calendar/Calendar.styles.js +9 -9
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.js +1 -0
- package/dist/Checkbox/Checkbox.js.map +1 -1
- package/dist/Checkbox/Checkbox.styles.js +6 -6
- package/dist/ContactItem/ContactItem.styles.js +5 -5
- package/dist/Content/Content.styles.js +2 -2
- package/dist/DateInput/DateInput.js +9 -0
- package/dist/DateInput/DateInput.js.map +1 -1
- package/dist/DateInput/DateInput.styles.js +6 -6
- package/dist/DetailPage/DetailPage.styles.js +7 -7
- package/dist/Dropdown/Dropdown.styles.js +3 -3
- package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
- package/dist/Dropzone/Dropzone.js +1 -1
- package/dist/Dropzone/Dropzone.styles.js +9 -9
- package/dist/EmptyState/EmptyState.styles.js +6 -6
- package/dist/Field/Field.styles.js +3 -3
- package/dist/FileList/FileList.styles.js +3 -3
- package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
- package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
- package/dist/FileSelect/FileSelect.styles.js +2 -2
- package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
- package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
- package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
- package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
- package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.d.ts +1 -1
- package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +6 -6
- package/dist/FileToken/FileTokenInner.js +1 -3
- package/dist/FileToken/FileTokenInner.js.map +1 -1
- package/dist/FilterToken/FilterToken.styles.js +5 -5
- package/dist/FlexList/FlexList.styles.js +1 -1
- package/dist/Form/Form.styles.js +13 -13
- package/dist/Form/StyledFormikForm.styles.d.ts +2 -2
- package/dist/Form/StyledFormikForm.styles.js +2 -2
- package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
- package/dist/Grid/Grid.styles.js +2 -2
- package/dist/GroupSelect/GroupSelect.styles.js +1 -1
- package/dist/Input/Input.styles.js +1 -1
- package/dist/Link/Link.styles.js +1 -1
- package/dist/ListPage/ListPage.styles.js +8 -8
- package/dist/Loader/Loader.styles.js +2 -2
- package/dist/MenuImperative/MenuImperative.styles.js +11 -11
- package/dist/Modal/Modal.js +8 -2
- package/dist/Modal/Modal.js.map +1 -1
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.js +7 -5
- package/dist/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/MultiSelect/MultiSelect.styles.js +8 -8
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/OverlayTrigger/a11yPresets.d.ts +6 -6
- package/dist/PageLayout/PageLayout.styles.d.ts +1 -1
- package/dist/PageLayout/PageLayout.styles.js +16 -16
- package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
- package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
- package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
- package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
- package/dist/Pagination/Pagination.styles.js +5 -5
- package/dist/Panel/Panel.styles.js +11 -11
- package/dist/Pill/Pill.styles.js +3 -3
- package/dist/PillSelect/PillSelect.styles.js +4 -4
- package/dist/Popover/Popover.styles.js +2 -2
- package/dist/Portal/Portal.styles.js +1 -1
- package/dist/ProgressBar/ProgressBar.styles.js +2 -2
- package/dist/RadioButton/RadioButton.styles.js +3 -3
- package/dist/Required/Required.styles.js +3 -3
- package/dist/Search/Search.styles.js +5 -5
- package/dist/Section/Section.styles.js +7 -7
- package/dist/SegmentedController/SegmentedController.styles.js +4 -4
- package/dist/Select/Select.js +3 -2
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/Select.styles.js +8 -8
- package/dist/Semantic/Semantic.styles.d.ts +74 -74
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/Slider/Slider.styles.js +5 -5
- package/dist/Spinner/Spinner.styles.js +7 -7
- package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
- package/dist/SuperSelect/SuperSelect.components.js +35 -22
- package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.d.ts +4 -2
- package/dist/SuperSelect/SuperSelect.styles.js +49 -42
- package/dist/SuperSelect/SuperSelect.styles.js.map +1 -1
- package/dist/SuperSelect/SuperSelect.types.d.ts +3 -4
- package/dist/SuperSelect/SuperSelect.types.js.map +1 -1
- package/dist/SuperSelect/presets/filterPreset.js +7 -2
- package/dist/SuperSelect/presets/filterPreset.js.map +1 -1
- package/dist/SuperSelect/useSuperSelect.d.ts +1 -1
- package/dist/SuperSelect/useSuperSelect.js +115 -88
- package/dist/SuperSelect/useSuperSelect.js.map +1 -1
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +28 -28
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.js +1 -1
- package/dist/Tabs/Tabs.js.map +1 -1
- package/dist/Tabs/Tabs.styles.js +15 -15
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/TextArea/TextArea.styles.js +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/Thumbnail/Thumbnail.hooks.d.ts +58 -58
- package/dist/Thumbnail/Thumbnail.styles.js +17 -17
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.d.ts +1 -1
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- package/dist/TieredSelect/TieredSelect.styles.d.ts +1 -1
- package/dist/TieredSelect/TieredSelect.styles.js +9 -9
- package/dist/Tile/Tile.styles.js +8 -8
- package/dist/Title/Title.styles.js +7 -7
- package/dist/Toast/Toast.styles.js +3 -3
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.js +1 -1
- package/dist/Token/Token.js.map +1 -1
- package/dist/Token/Token.styles.js +3 -3
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- package/dist/ToolLandingPageTemplate/ToolLandingPageTemplate.d.ts +1 -1
- package/dist/Tooltip/Tooltip.styles.js +3 -3
- package/dist/Tree/Tree.js +1 -1
- package/dist/Tree/Tree.styles.js +10 -10
- package/dist/Typeahead/Typeahead.js +7 -3
- package/dist/Typeahead/Typeahead.js.map +1 -1
- package/dist/Typeahead/Typeahead.styles.js +3 -3
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/Typography/Typography.types.d.ts +1 -0
- package/dist/Typography/Typography.types.js.map +1 -1
- package/dist/_hooks/I18n.d.ts +14 -0
- package/dist/_locales/en.json +7 -0
- package/dist/_locales/pseudo.json +7 -0
- package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
- package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
- package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +13 -3
- package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
- package/dist/_typedoc/AvatarStack/AvatarStack.types.json +25 -25
- package/dist/_typedoc/Badge/Badge.types.json +6 -6
- package/dist/_typedoc/Banner/Banner.types.json +15 -15
- package/dist/_typedoc/Box/Box.types.json +72 -72
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +17 -17
- package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
- package/dist/_typedoc/Card/Card.types.json +6 -6
- package/dist/_typedoc/Checkbox/Checkbox.types.json +8 -8
- package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
- package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
- package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +39 -39
- package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +31 -31
- package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
- package/dist/_typedoc/EmptyState/EmptyState.types.json +16 -16
- package/dist/_typedoc/FileList/FileList.types.json +9 -9
- package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
- package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
- package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
- package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
- package/dist/_typedoc/Flex/Flex.types.json +27 -27
- package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
- package/dist/_typedoc/Form/Form.types.json +832 -832
- package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
- package/dist/_typedoc/Grid/Grid.types.json +8 -8
- package/dist/_typedoc/GroupSelect/GroupSelect.types.json +54 -54
- package/dist/_typedoc/Input/Input.types.json +2 -2
- package/dist/_typedoc/Link/Link.types.json +1 -1
- package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
- package/dist/_typedoc/Menu/Menu.types.json +62 -62
- package/dist/_typedoc/MenuImperative/MenuImperative.types.json +84 -84
- package/dist/_typedoc/Modal/Modal.types.json +48 -48
- package/dist/_typedoc/MultiSelect/MultiSelect.types.json +33 -33
- package/dist/_typedoc/NextTile/NextTile.types.json +32 -32
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +54 -54
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +33 -33
- package/dist/_typedoc/PageLayout/PageLayout.types.json +28 -28
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +27 -27
- package/dist/_typedoc/Pill/Pill.types.json +2 -2
- package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
- package/dist/_typedoc/Popover/Popover.types.json +15 -15
- package/dist/_typedoc/ProgressBar/ProgressBar.types.json +7 -7
- package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
- package/dist/_typedoc/Required/Required.types.json +5 -5
- package/dist/_typedoc/Search/Search.types.json +18 -18
- package/dist/_typedoc/Section/Section.types.json +15 -15
- package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
- package/dist/_typedoc/Select/Select.types.json +69 -69
- package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
- package/dist/_typedoc/Slider/Slider.types.json +6 -6
- package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
- package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +14 -14
- package/dist/_typedoc/Table/Table.types.json +102 -102
- package/dist/_typedoc/Tabs/Tabs.types.json +21 -21
- package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
- package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
- package/dist/_typedoc/TextEditor/TextEditor.types.json +11 -11
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
- package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
- package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +43 -43
- package/dist/_typedoc/TieredSelect/TieredSelect.types.json +29 -29
- package/dist/_typedoc/Tile/Tile.types.json +8 -8
- package/dist/_typedoc/Title/Title.types.json +3 -3
- package/dist/_typedoc/Toast/Toast.types.json +4 -4
- package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
- package/dist/_typedoc/Token/Token.types.json +7 -7
- package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
- package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +10 -10
- package/dist/_typedoc/Tooltip/Tooltip.types.json +15 -15
- package/dist/_typedoc/Tree/Tree.types.json +90 -90
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +12 -11
- package/dist/_typedoc/_utils/types.json +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,65 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 12.43.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ca101fc: Export type AsLinkProps and update to accept all link props
|
|
8
|
+
- 2cd5b75: Add `aria-invalid` attribute to `Checkbox` component for improved accessibility
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- e1d693b: Improve `SuperSelect` accessibility
|
|
13
|
+
|
|
14
|
+
- Single-select: `role="combobox"` -> `role="button"`, added `aria-describedby` pointing to selected value
|
|
15
|
+
- Multi-select: `role="combobox"` removed from outer container, inner input gets `role="combobox"` with `aria-activedescendant` for token navigation
|
|
16
|
+
- Removed `role="dialog"` from overlay
|
|
17
|
+
- Search input in overlay: added `role="combobox"`, `aria-haspopup="listbox"`, `aria-expanded`, `aria-activedescendant`
|
|
18
|
+
- Tokens wrapped in semantic `<ul role="list">`/`<li>` markup, removed from tab order (`tabIndex={-1}`)
|
|
19
|
+
- `aria-selected` fixed to reflect actual selection state
|
|
20
|
+
- `aria-disabled` added to disabled options
|
|
21
|
+
|
|
22
|
+
- ca101fc: Fix Tabs roleless variant keyboard firing onclick twice
|
|
23
|
+
- 818727f: Fix double pixel width with Selects. Continue to allow container to set/override widths
|
|
24
|
+
- 5a33cc0: Fixed invalid `aria-controls` attributes in `SuperSelect` and `MultiSelect` that referenced non-existent DOM element IDs when the dropdown is closed.
|
|
25
|
+
- 6a06559: Add keyboard support (Enter, Space) to open DateSelect calendar
|
|
26
|
+
- ce03cf7: Updated `aria-labelledby` logic in Select (PillSelect) to properly integrate with external labels for combobox
|
|
27
|
+
- d4652e3: **AnchorNavigation:** improve accessibility for in-page section navigation.
|
|
28
|
+
|
|
29
|
+
**`@procore/core-react`**
|
|
30
|
+
|
|
31
|
+
- Wrap the list in a `<nav>` landmark with a default accessible name from the new translation key `core.anchorNavigation.landmarkLabel` (English: “On this page”). Only `en.json` is updated for now; other locales can be added by localization.
|
|
32
|
+
- Add optional `aria-label` to override the default landmark name when multiple navigations need distinct names.
|
|
33
|
+
- Use `aria-current="page"` on the active section link and omit `aria-current` on inactive links.
|
|
34
|
+
|
|
35
|
+
**`@procore/core-docs`**
|
|
36
|
+
|
|
37
|
+
- Document the navigation landmark, translation key, `aria-label`, and `aria-current` behavior on the AnchorNavigation page.
|
|
38
|
+
|
|
39
|
+
- 9122889: Token and FileToken: Prevent unnecessary tab stop
|
|
40
|
+
- d49f826: ConfirmModal fix allow additional close methods
|
|
41
|
+
- 19853ef: Typeahead component:
|
|
42
|
+
|
|
43
|
+
- Allow the Clear button to receive focus by removing `tabIndex={-1}` for better keyboard accessibility.
|
|
44
|
+
- Replace the hardcoded `aria-label` with a value from the i18n context.
|
|
45
|
+
- Update focus behavior so that focus returns to the input after pressing the Clear button via keyboard.
|
|
46
|
+
|
|
47
|
+
- Updated dependencies [bf0532b]
|
|
48
|
+
- @procore/core-icons@12.15.0
|
|
49
|
+
|
|
3
50
|
## 12.42.0
|
|
4
51
|
|
|
5
52
|
### Minor Changes
|
|
6
53
|
|
|
7
54
|
- 1b008b9: Update `Modal` documentation for accessibility. `Modal onClose howToClose` should be used to centralize close management, adding Esc Key support, and dialog role. Continue to use `Modal.Heading` to link the dialog to the semantic heading.
|
|
55
|
+
|
|
8
56
|
- Deprecate `onClickOverlay` prop on `Modal`. Use `Modal onClose howToClose={['scrim']}` instead.
|
|
9
57
|
- Deprecate `onClose` prop on `Modal.Header`. Use `Modal onClose howToClose={['x']}` instead.
|
|
10
58
|
- Update `ConfirmModal` to support `role="dialog"` or `"alertdialog"` and `aria-modal`. You should opt-in to one of the roles.
|
|
11
59
|
- `ConfirmModal` add support for both `ModalOnClose` and the legacy `MouseEvent<HTMLButtonElement>` callback
|
|
12
60
|
- Export `ModalOnClose` type from `core-react`
|
|
13
61
|
- Fix, removed duplicate id from `Modal.Header` and `Modal.Heading`
|
|
14
|
-
|
|
62
|
+
|
|
15
63
|
- bcd3b67: Enhance MenuImperative drag and drop accessibility to support keyboard navigation experience. Space Key picks up the item to drag.
|
|
16
64
|
|
|
17
65
|
### Patch Changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useI18nContext } from '../_hooks/I18n';
|
|
3
|
+
import { StyledAnchor, StyledAnchorNavigation, StyledAnchorNavigationLandmark, StyledAnchorSection } from './AnchorNavigation.styles';
|
|
3
4
|
var Anchor = function Anchor(_ref) {
|
|
4
5
|
var label = _ref.label,
|
|
5
6
|
selected = _ref.selected,
|
|
@@ -14,7 +15,7 @@ var Anchor = function Anchor(_ref) {
|
|
|
14
15
|
onClick: onClick,
|
|
15
16
|
onKeyDown: handleKeyDown
|
|
16
17
|
}, /*#__PURE__*/React.createElement(StyledAnchor, {
|
|
17
|
-
"aria-current": selected,
|
|
18
|
+
"aria-current": selected ? 'page' : undefined,
|
|
18
19
|
$selected: selected,
|
|
19
20
|
tabIndex: 0
|
|
20
21
|
}, label));
|
|
@@ -22,8 +23,13 @@ var Anchor = function Anchor(_ref) {
|
|
|
22
23
|
export var AnchorNavigation = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
23
24
|
var sections = _ref2.sections,
|
|
24
25
|
selected = _ref2.selected,
|
|
25
|
-
onSelect = _ref2.onSelect
|
|
26
|
-
|
|
26
|
+
onSelect = _ref2.onSelect,
|
|
27
|
+
ariaLabelProp = _ref2['aria-label'];
|
|
28
|
+
var i18n = useI18nContext();
|
|
29
|
+
var navigationAriaLabel = ariaLabelProp !== null && ariaLabelProp !== void 0 ? ariaLabelProp : i18n.t('core.anchorNavigation.landmarkLabel');
|
|
30
|
+
return /*#__PURE__*/React.createElement(StyledAnchorNavigationLandmark, {
|
|
31
|
+
"aria-label": navigationAriaLabel
|
|
32
|
+
}, /*#__PURE__*/React.createElement(StyledAnchorNavigation, {
|
|
27
33
|
ref: ref
|
|
28
34
|
}, sections.map(function (_ref3) {
|
|
29
35
|
var id = _ref3.id,
|
|
@@ -36,6 +42,6 @@ export var AnchorNavigation = /*#__PURE__*/React.forwardRef(function (_ref2, ref
|
|
|
36
42
|
selected: selected === id,
|
|
37
43
|
label: label
|
|
38
44
|
});
|
|
39
|
-
}));
|
|
45
|
+
})));
|
|
40
46
|
});
|
|
41
47
|
//# sourceMappingURL=AnchorNavigation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnchorNavigation.js","names":["React","StyledAnchor","StyledAnchorNavigation","StyledAnchorSection","Anchor","_ref","label","selected","onClick","handleKeyDown","event","key","createElement","$selected","onKeyDown","tabIndex","AnchorNavigation","forwardRef","_ref2","ref","sections","onSelect","map","_ref3","id"],"sources":["../../src/AnchorNavigation/AnchorNavigation.tsx"],"sourcesContent":["import React from 'react'\nimport {\n StyledAnchor,\n StyledAnchorNavigation,\n StyledAnchorSection,\n} from './AnchorNavigation.styles'\nimport type {\n AnchorNavigationProps,\n AnchorProps,\n} from './AnchorNavigation.types'\n\nconst Anchor = ({ label, selected, onClick }: AnchorProps) => {\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n onClick()\n }\n }\n return (\n <StyledAnchorSection\n $selected={selected}\n onClick={onClick}\n onKeyDown={handleKeyDown}\n >\n <StyledAnchor
|
|
1
|
+
{"version":3,"file":"AnchorNavigation.js","names":["React","useI18nContext","StyledAnchor","StyledAnchorNavigation","StyledAnchorNavigationLandmark","StyledAnchorSection","Anchor","_ref","label","selected","onClick","handleKeyDown","event","key","createElement","$selected","onKeyDown","undefined","tabIndex","AnchorNavigation","forwardRef","_ref2","ref","sections","onSelect","ariaLabelProp","i18n","navigationAriaLabel","t","map","_ref3","id"],"sources":["../../src/AnchorNavigation/AnchorNavigation.tsx"],"sourcesContent":["import React from 'react'\nimport { useI18nContext } from '../_hooks/I18n'\nimport {\n StyledAnchor,\n StyledAnchorNavigation,\n StyledAnchorNavigationLandmark,\n StyledAnchorSection,\n} from './AnchorNavigation.styles'\nimport type {\n AnchorNavigationProps,\n AnchorProps,\n} from './AnchorNavigation.types'\n\nconst Anchor = ({ label, selected, onClick }: AnchorProps) => {\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n onClick()\n }\n }\n return (\n <StyledAnchorSection\n $selected={selected}\n onClick={onClick}\n onKeyDown={handleKeyDown}\n >\n <StyledAnchor\n aria-current={selected ? 'page' : undefined}\n $selected={selected}\n tabIndex={0}\n >\n {label}\n </StyledAnchor>\n </StyledAnchorSection>\n )\n}\n\nexport const AnchorNavigation = React.forwardRef<\n HTMLUListElement,\n AnchorNavigationProps\n>(({ sections, selected, onSelect, 'aria-label': ariaLabelProp }, ref) => {\n const i18n = useI18nContext()\n const navigationAriaLabel =\n ariaLabelProp ?? i18n.t('core.anchorNavigation.landmarkLabel')\n\n return (\n <StyledAnchorNavigationLandmark aria-label={navigationAriaLabel}>\n <StyledAnchorNavigation ref={ref}>\n {sections.map(({ id, label }) => {\n return (\n <Anchor\n key={id}\n onClick={() => onSelect(id)}\n selected={selected === id}\n label={label}\n />\n )\n })}\n </StyledAnchorNavigation>\n </StyledAnchorNavigationLandmark>\n )\n})\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SACEC,YAAY,EACZC,sBAAsB,EACtBC,8BAA8B,EAC9BC,mBAAmB,QACd,2BAA2B;AAMlC,IAAMC,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAAkD;EAAA,IAA5CC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAEC,OAAO,GAAAH,IAAA,CAAPG,OAAO;EACxC,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,KAA0B,EAAK;IACpD,IAAIA,KAAK,CAACC,GAAG,KAAK,OAAO,IAAID,KAAK,CAACC,GAAG,KAAK,GAAG,EAAE;MAC9CH,OAAO,CAAC,CAAC;IACX;EACF,CAAC;EACD,oBACEV,KAAA,CAAAc,aAAA,CAACT,mBAAmB;IAClBU,SAAS,EAAEN,QAAS;IACpBC,OAAO,EAAEA,OAAQ;IACjBM,SAAS,EAAEL;EAAc,gBAEzBX,KAAA,CAAAc,aAAA,CAACZ,YAAY;IACX,gBAAcO,QAAQ,GAAG,MAAM,GAAGQ,SAAU;IAC5CF,SAAS,EAAEN,QAAS;IACpBS,QAAQ,EAAE;EAAE,GAEXV,KACW,CACK,CAAC;AAE1B,CAAC;AAED,OAAO,IAAMW,gBAAgB,gBAAGnB,KAAK,CAACoB,UAAU,CAG9C,UAAAC,KAAA,EAAgEC,GAAG,EAAK;EAAA,IAArEC,QAAQ,GAAAF,KAAA,CAARE,QAAQ;IAAEd,QAAQ,GAAAY,KAAA,CAARZ,QAAQ;IAAEe,QAAQ,GAAAH,KAAA,CAARG,QAAQ;IAAgBC,aAAa,GAAAJ,KAAA,CAA3B,YAAY;EAC7C,IAAMK,IAAI,GAAGzB,cAAc,CAAC,CAAC;EAC7B,IAAM0B,mBAAmB,GACvBF,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAIC,IAAI,CAACE,CAAC,CAAC,qCAAqC,CAAC;EAEhE,oBACE5B,KAAA,CAAAc,aAAA,CAACV,8BAA8B;IAAC,cAAYuB;EAAoB,gBAC9D3B,KAAA,CAAAc,aAAA,CAACX,sBAAsB;IAACmB,GAAG,EAAEA;EAAI,GAC9BC,QAAQ,CAACM,GAAG,CAAC,UAAAC,KAAA,EAAmB;IAAA,IAAhBC,EAAE,GAAAD,KAAA,CAAFC,EAAE;MAAEvB,KAAK,GAAAsB,KAAA,CAALtB,KAAK;IACxB,oBACER,KAAA,CAAAc,aAAA,CAACR,MAAM;MACLO,GAAG,EAAEkB,EAAG;MACRrB,OAAO,EAAE,SAATA,OAAOA,CAAA;QAAA,OAAQc,QAAQ,CAACO,EAAE,CAAC;MAAA,CAAC;MAC5BtB,QAAQ,EAAEA,QAAQ,KAAKsB,EAAG;MAC1BvB,KAAK,EAAEA;IAAM,CACd,CAAC;EAEN,CAAC,CACqB,CACM,CAAC;AAErC,CAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
export declare const StyledAnchorNavigationLandmark: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
2
3
|
export declare const StyledAnchorNavigation: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, never>> & string;
|
|
3
4
|
export declare const StyledAnchorSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {
|
|
4
5
|
$selected: boolean;
|
|
@@ -3,13 +3,17 @@ import { getTypographyIntent } from '../Typography/Typography.styles';
|
|
|
3
3
|
import { colors } from '../_styles/colors';
|
|
4
4
|
import { getEllipsis } from '../_styles/mixins';
|
|
5
5
|
import { spacing } from '../_styles/spacing';
|
|
6
|
+
export var StyledAnchorNavigationLandmark = /*#__PURE__*/styled.nav.withConfig({
|
|
7
|
+
displayName: "StyledAnchorNavigationLandmark",
|
|
8
|
+
componentId: "core-12_43_0__sc-aacdj4-0"
|
|
9
|
+
})([""]);
|
|
6
10
|
export var StyledAnchorNavigation = /*#__PURE__*/styled.ul.withConfig({
|
|
7
11
|
displayName: "StyledAnchorNavigation",
|
|
8
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_43_0__sc-aacdj4-1"
|
|
9
13
|
})(["max-width:200px;margin:0;padding-inline-start:0;"]);
|
|
10
14
|
export var StyledAnchorSection = /*#__PURE__*/styled.li.withConfig({
|
|
11
15
|
displayName: "StyledAnchorSection",
|
|
12
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-12_43_0__sc-aacdj4-2"
|
|
13
17
|
})(["display:flex;cursor:pointer;border-left:", "px solid ", ";background-color:", ";border-top-right-radius:4px;border-bottom-right-radius:4px;:hover{border-left:", "px solid ", ";background-color:", ";}"], spacing.xs, function (_ref) {
|
|
14
18
|
var $selected = _ref.$selected;
|
|
15
19
|
return $selected ? colors.gray15 : colors.gray90;
|
|
@@ -22,7 +26,7 @@ export var StyledAnchorSection = /*#__PURE__*/styled.li.withConfig({
|
|
|
22
26
|
}, colors.gray90);
|
|
23
27
|
export var StyledAnchor = /*#__PURE__*/styled.a.withConfig({
|
|
24
28
|
displayName: "StyledAnchor",
|
|
25
|
-
componentId: "core-
|
|
29
|
+
componentId: "core-12_43_0__sc-aacdj4-3"
|
|
26
30
|
})(["width:100%;padding:6px ", "px;", " ", ";", " :focus-visible{box-shadow:inset 0 0 0 2px ", ";outline:none;}"], spacing.sm, getTypographyIntent('body'), function (_ref4) {
|
|
27
31
|
var $selected = _ref4.$selected;
|
|
28
32
|
return $selected ? css(["font-weight:600;"]) : '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnchorNavigation.styles.js","names":["styled","css","getTypographyIntent","colors","getEllipsis","spacing","
|
|
1
|
+
{"version":3,"file":"AnchorNavigation.styles.js","names":["styled","css","getTypographyIntent","colors","getEllipsis","spacing","StyledAnchorNavigationLandmark","nav","withConfig","displayName","componentId","StyledAnchorNavigation","ul","StyledAnchorSection","li","xs","_ref","$selected","gray15","gray90","_ref2","_ref3","gray60","StyledAnchor","a","sm","_ref4","blue50"],"sources":["../../src/AnchorNavigation/AnchorNavigation.styles.tsx"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { getTypographyIntent } from '../Typography/Typography.styles'\nimport { colors } from '../_styles/colors'\nimport { getEllipsis } from '../_styles/mixins'\nimport { spacing } from '../_styles/spacing'\n\nexport const StyledAnchorNavigationLandmark = styled.nav``\n\nexport const StyledAnchorNavigation = styled.ul`\n max-width: 200px;\n margin: 0;\n padding-inline-start: 0;\n`\n\nexport const StyledAnchorSection = styled.li<{ $selected: boolean }>`\n display: flex;\n cursor: pointer;\n border-left: ${spacing.xs}px solid\n ${({ $selected }) => ($selected ? colors.gray15 : colors.gray90)};\n background-color: ${({ $selected }) =>\n $selected ? colors.gray90 : 'transparent'};\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n\n :hover {\n border-left: ${spacing.xs}px solid\n ${({ $selected }) => ($selected ? colors.gray15 : colors.gray60)};\n background-color: ${colors.gray90};\n }\n`\nexport const StyledAnchor = styled.a<{ $selected: boolean }>`\n width: 100%;\n padding: 6px ${spacing.sm}px;\n ${getTypographyIntent('body')}\n\n ${({ $selected }) =>\n $selected\n ? css`\n font-weight: 600;\n `\n : ''};\n\n ${getEllipsis()}\n\n :focus-visible {\n box-shadow: inset 0 0 0 2px ${colors.blue50};\n outline: none;\n }\n`\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,mBAAmB,QAAQ,iCAAiC;AACrE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,OAAO,IAAMC,8BAA8B,gBAAGN,MAAM,CAACO,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,QAAE;AAE1D,OAAO,IAAMC,sBAAsB,gBAAGX,MAAM,CAACY,EAAE,CAAAJ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wDAI9C;AAED,OAAO,IAAMG,mBAAmB,gBAAGb,MAAM,CAACc,EAAE,CAAAN,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gNAG3BL,OAAO,CAACU,EAAE,EACrB,UAAAC,IAAA;EAAA,IAAGC,SAAS,GAAAD,IAAA,CAATC,SAAS;EAAA,OAAQA,SAAS,GAAGd,MAAM,CAACe,MAAM,GAAGf,MAAM,CAACgB,MAAM;AAAA,CAAC,EAC9C,UAAAC,KAAA;EAAA,IAAGH,SAAS,GAAAG,KAAA,CAATH,SAAS;EAAA,OAC9BA,SAAS,GAAGd,MAAM,CAACgB,MAAM,GAAG,aAAa;AAAA,GAK1Bd,OAAO,CAACU,EAAE,EACrB,UAAAM,KAAA;EAAA,IAAGJ,SAAS,GAAAI,KAAA,CAATJ,SAAS;EAAA,OAAQA,SAAS,GAAGd,MAAM,CAACe,MAAM,GAAGf,MAAM,CAACmB,MAAM;AAAA,CAAC,EAC9CnB,MAAM,CAACgB,MAAM,CAEpC;AACD,OAAO,IAAMI,YAAY,gBAAGvB,MAAM,CAACwB,CAAC,CAAAhB,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,mHAEnBL,OAAO,CAACoB,EAAE,EACvBvB,mBAAmB,CAAC,MAAM,CAAC,EAE3B,UAAAwB,KAAA;EAAA,IAAGT,SAAS,GAAAS,KAAA,CAATT,SAAS;EAAA,OACZA,SAAS,GACLhB,GAAG,yBAGH,EAAE;AAAA,GAENG,WAAW,CAAC,CAAC,EAGiBD,MAAM,CAACwB,MAAM,CAG9C"}
|
|
@@ -18,9 +18,15 @@ export interface AnchorNavigationProps {
|
|
|
18
18
|
selected: string;
|
|
19
19
|
/**
|
|
20
20
|
* Callback function to update the selected section ID.
|
|
21
|
-
@since 12.18.0
|
|
21
|
+
* @since 12.18.0
|
|
22
22
|
*/
|
|
23
23
|
onSelect: (id: string) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Accessible name for the navigation landmark. When omitted, the default
|
|
26
|
+
* translated string `On this page` is used.
|
|
27
|
+
* @since 12.42.0
|
|
28
|
+
*/
|
|
29
|
+
'aria-label'?: string;
|
|
24
30
|
}
|
|
25
31
|
export declare type AnchorProps = {
|
|
26
32
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnchorNavigation.types.js","names":[],"sources":["../../src/AnchorNavigation/AnchorNavigation.types.tsx"],"sourcesContent":["export type AnchorNavigationSection = {\n id: string\n label: string\n}\n\nexport type AnchorNavigationElementSection = AnchorNavigationSection & {\n element: HTMLElement\n}\n\nexport interface AnchorNavigationProps {\n /**\n * An array of sections used in the anchor navigation.\n * @since 12.18.0\n */\n sections: AnchorNavigationSection[]\n /**\n * The ID of the currently selected section.\n * @since 12.18.0\n */\n selected: string\n /**\n * Callback function to update the selected section ID.\n @since 12.18.0\n */\n onSelect: (id: string) => void\n}\n\nexport type AnchorProps = {\n label: string\n selected: boolean\n onClick: () => void\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"AnchorNavigation.types.js","names":[],"sources":["../../src/AnchorNavigation/AnchorNavigation.types.tsx"],"sourcesContent":["export type AnchorNavigationSection = {\n id: string\n label: string\n}\n\nexport type AnchorNavigationElementSection = AnchorNavigationSection & {\n element: HTMLElement\n}\n\nexport interface AnchorNavigationProps {\n /**\n * An array of sections used in the anchor navigation.\n * @since 12.18.0\n */\n sections: AnchorNavigationSection[]\n /**\n * The ID of the currently selected section.\n * @since 12.18.0\n */\n selected: string\n /**\n * Callback function to update the selected section ID.\n * @since 12.18.0\n */\n onSelect: (id: string) => void\n /**\n * Accessible name for the navigation landmark. When omitted, the default\n * translated string `On this page` is used.\n * @since 12.42.0\n */\n 'aria-label'?: string\n}\n\nexport type AnchorProps = {\n label: string\n selected: boolean\n onClick: () => void\n}\n"],"mappings":""}
|
|
@@ -28,26 +28,26 @@ var iconSize = {
|
|
|
28
28
|
};
|
|
29
29
|
export var StyledAvatarOverlay = /*#__PURE__*/styled.div.withConfig({
|
|
30
30
|
displayName: "StyledAvatarOverlay",
|
|
31
|
-
componentId: "core-
|
|
31
|
+
componentId: "core-12_43_0__sc-7q2ydl-0"
|
|
32
32
|
})(["width:100%;height:100%;position:absolute;top:0;left:0;border-radius:100%;opacity:0;"]);
|
|
33
33
|
export var StyledIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34
34
|
displayName: "StyledIconContainer",
|
|
35
|
-
componentId: "core-
|
|
35
|
+
componentId: "core-12_43_0__sc-7q2ydl-1"
|
|
36
36
|
})(["display:inline-flex;"]);
|
|
37
37
|
export var StyledLabelContainer = /*#__PURE__*/styled.div.withConfig({
|
|
38
38
|
displayName: "StyledLabelContainer",
|
|
39
|
-
componentId: "core-
|
|
39
|
+
componentId: "core-12_43_0__sc-7q2ydl-2"
|
|
40
40
|
})(["text-transform:uppercase;"]);
|
|
41
41
|
export var StyledPortraitContainer = /*#__PURE__*/styled.div.withConfig({
|
|
42
42
|
displayName: "StyledPortraitContainer",
|
|
43
|
-
componentId: "core-
|
|
43
|
+
componentId: "core-12_43_0__sc-7q2ydl-3"
|
|
44
44
|
})(["background-color:", ";background-position:center;background-repeat:no-repeat;background-size:cover;height:100%;width:100%;", ""], colors.white, function (_ref) {
|
|
45
45
|
var $imageUrl = _ref.$imageUrl;
|
|
46
46
|
return css(["background-image:url(", ");"], $imageUrl);
|
|
47
47
|
});
|
|
48
48
|
export var StyledAvatarContainer = /*#__PURE__*/styled.div.withConfig({
|
|
49
49
|
displayName: "StyledAvatarContainer",
|
|
50
|
-
componentId: "core-
|
|
50
|
+
componentId: "core-12_43_0__sc-7q2ydl-4"
|
|
51
51
|
})(["display:inline-flex;justify-content:center;align-items:center;border-radius:100%;overflow:hidden;position:relative;cursor:default;color:", ";background-color:", ";text-decoration:none;a:has(> &){text-decoration:none;}&:focus{", "}a:focus:has(> &){", " border-radius:100%;}", " ", ";"], colors.white, colors.gray30, getGapOutlineFocus('outside'), getGapOutlineFocus('outside'), function (_ref2) {
|
|
52
52
|
var _ref2$$size = _ref2.$size,
|
|
53
53
|
$size = _ref2$$size === void 0 ? 'md' : _ref2$$size;
|