@procore/core-react 12.41.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 +69 -0
- 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.js +7 -3
- package/dist/ContactItem/ContactItem.js.map +1 -1
- 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.d.ts +1 -1
- package/dist/MenuImperative/MenuImperative.js +126 -34
- package/dist/MenuImperative/MenuImperative.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.styles.js +15 -15
- package/dist/MenuImperative/MenuImperative.styles.js.map +1 -1
- package/dist/MenuImperative/MenuImperative.types.d.ts +36 -0
- package/dist/MenuImperative/MenuImperative.types.js.map +1 -1
- package/dist/MenuImperative/sensors.d.ts +6 -3
- package/dist/MenuImperative/sensors.js +42 -34
- package/dist/MenuImperative/sensors.js.map +1 -1
- package/dist/Modal/Modal.d.ts +4 -0
- package/dist/Modal/Modal.js +30 -14
- package/dist/Modal/Modal.js.map +1 -1
- package/dist/Modal/Modal.styles.js +13 -13
- package/dist/Modal/Modal.types.d.ts +28 -5
- package/dist/Modal/Modal.types.js.map +1 -1
- package/dist/Modal/index.d.ts +1 -1
- package/dist/Modal/index.js.map +1 -1
- 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 +23 -30
- package/dist/OverlayTrigger/a11yPresets.js +29 -27
- package/dist/OverlayTrigger/a11yPresets.js.map +1 -1
- 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 +4 -4
- package/dist/ProgressBar/ProgressBar.styles.js.map +1 -1
- 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 +117 -90
- 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.js +1 -1
- package/dist/Tearsheet/Tearsheet.js.map +1 -1
- package/dist/Tearsheet/Tearsheet.styles.js +5 -5
- package/dist/Tearsheet/storybook/PageLayoutDemo.js +1 -0
- package/dist/Tearsheet/storybook/PageLayoutDemo.js.map +1 -1
- 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 +28 -0
- package/dist/_locales/en.json +15 -1
- package/dist/_locales/pseudo.json +15 -1
- package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
- package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
- package/dist/_styles/colors.js +1 -3
- package/dist/_styles/colors.js.map +1 -1
- 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 +147 -77
- package/dist/_typedoc/Modal/Modal.types.json +96 -68
- 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 +3 -3
|
@@ -4,9 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import { ariaHideOutside } from '@react-aria/overlays';
|
|
8
7
|
import { useId, useLabels } from '@react-aria/utils';
|
|
9
|
-
import React from 'react';
|
|
10
8
|
var emptyObj = {};
|
|
11
9
|
var returnEmpty = function returnEmpty() {
|
|
12
10
|
return {};
|
|
@@ -53,6 +51,7 @@ var a11yPresets = {
|
|
|
53
51
|
|
|
54
52
|
export function getA11yPreset(role) {
|
|
55
53
|
switch (role) {
|
|
54
|
+
case 'alertdialog':
|
|
56
55
|
case 'dialog':
|
|
57
56
|
case 'listbox':
|
|
58
57
|
case 'menu':
|
|
@@ -167,36 +166,29 @@ export function useLabelledPopup(_ref6) {
|
|
|
167
166
|
* - Focus management props to work with FocusScope
|
|
168
167
|
*
|
|
169
168
|
* For modal dialog experiences (full screen locked experiences):
|
|
170
|
-
* -
|
|
171
|
-
* -
|
|
169
|
+
* - what dialog above does
|
|
170
|
+
* - adds aria-modal="true"
|
|
171
|
+
* - this hook does not determine where to mount or how many modals are open
|
|
172
172
|
*
|
|
173
|
-
* For either experiences, you still MUST support
|
|
174
|
-
*
|
|
175
|
-
* -
|
|
173
|
+
* For either experiences, you still MUST support a way to close by mouse and keyboard.
|
|
174
|
+
*
|
|
175
|
+
* Using `aria-modal`, you need to keep additional overlay content inside, so
|
|
176
|
+
* portals must be smart enough to know where other overlays
|
|
177
|
+
* like tooltips or toasts should go to remain visible to screen readers (inside the aria-modal).
|
|
176
178
|
*
|
|
177
|
-
* _More about 'modal dialog' and `isModal` not using `aria-modal`:_
|
|
178
179
|
* Setting aria-modal="true" tells assistive technologies to let the user know the ability to interact with,
|
|
179
180
|
* or access other content on the page requires the modal dialog to be closed or otherwise lose focus.
|
|
180
181
|
* Modal dialogs are when content is displayed and the user's interaction is limited to only that section until it is dismissed.
|
|
181
182
|
* [MDN aria modal](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-modal).
|
|
182
|
-
* To support the most, like Narrator in Edge, Core React uses `ariaHideOutside` to set `aria-hidden` on
|
|
183
|
-
* all elements outside the dialog, and **all elements outside added while opened**, so the dialog will act as a
|
|
184
|
-
* _modal_ even without `aria-modal` on the dialog itself. See Future Considerations below.
|
|
185
|
-
* [Screen Reader aria modal support table](https://a11ysupport.io/tech/aria/aria-modal_attribute) - [MS Narrator Edge aria modal support](https://a11ysupport.io/tests/apg__modal-dialog-example/aria__aria-modal_attribute/convey_presence/narrator/edge)
|
|
186
|
-
* _Future Considerations:_ Replace ariaHideOutside with aria-modal="true".
|
|
187
|
-
* Using aria-modal, then we would need to involve Portal and so tooltips
|
|
188
|
-
* or Toasts could mount within the visible aria-modal container.
|
|
189
183
|
*/
|
|
190
|
-
|
|
191
184
|
export function useModalDialogLike(_ref7) {
|
|
192
185
|
var ariaDescribedby = _ref7['aria-describedby'],
|
|
193
186
|
ariaDetails = _ref7['aria-details'],
|
|
194
187
|
ariaLabelledby = _ref7['aria-labelledby'],
|
|
195
188
|
ariaLabel = _ref7['aria-label'],
|
|
189
|
+
ariaModal = _ref7['aria-modal'],
|
|
196
190
|
id = _ref7.id,
|
|
197
|
-
isModal = _ref7.isModal,
|
|
198
191
|
isOpen = _ref7.isOpen,
|
|
199
|
-
ref = _ref7.ref,
|
|
200
192
|
_ref7$role = _ref7.role,
|
|
201
193
|
role = _ref7$role === void 0 ? 'dialog' : _ref7$role;
|
|
202
194
|
var _useLabelled2 = useLabelled({
|
|
@@ -207,23 +199,27 @@ export function useModalDialogLike(_ref7) {
|
|
|
207
199
|
}),
|
|
208
200
|
labelProps = _useLabelled2.labelProps,
|
|
209
201
|
widgetProps = _useLabelled2.widgetProps;
|
|
210
|
-
var dialogProps = _objectSpread(_objectSpread({
|
|
202
|
+
var dialogProps = _objectSpread(_objectSpread({
|
|
203
|
+
'aria-modal': ariaModal
|
|
204
|
+
}, widgetProps), {}, {
|
|
211
205
|
id: id,
|
|
212
206
|
role: role,
|
|
213
207
|
tabIndex: -1
|
|
214
208
|
});
|
|
215
209
|
|
|
216
210
|
// usePreventScroll({
|
|
217
|
-
// isDisabled:
|
|
211
|
+
// isDisabled: ariaModal ? !isOpen : true,
|
|
218
212
|
// })
|
|
219
213
|
|
|
220
214
|
// Fills aria-modal=true
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
215
|
+
// import { ariaHideOutside } from '@react-aria/overlays'
|
|
216
|
+
// React.useLayoutEffect(() => {
|
|
217
|
+
// if (isModal && isOpen && ref.current) {
|
|
218
|
+
// // Could add additional visible element refs here
|
|
219
|
+
// return ariaHideOutside([ref.current])
|
|
220
|
+
// }
|
|
221
|
+
// }, [isModal, isOpen, ref])
|
|
222
|
+
|
|
227
223
|
return {
|
|
228
224
|
dialogProps: dialogProps,
|
|
229
225
|
labelProps: labelProps,
|
|
@@ -251,6 +247,11 @@ export function useOverlayTriggerA11y(_ref8) {
|
|
|
251
247
|
id_ = _ref8.id,
|
|
252
248
|
isOpen = _ref8.isOpen,
|
|
253
249
|
role = _ref8.role;
|
|
250
|
+
if (
|
|
251
|
+
// @ts-expect-error Checking for invalid usage
|
|
252
|
+
role === 'alertdialog') {
|
|
253
|
+
console.error('@procore/core-react: useOverlayTriggerA11y role alertdialog is not supported because it requires aria-modal to be true. This is intended for non-modal dialogs.');
|
|
254
|
+
}
|
|
254
255
|
var isDialog = role === 'dialog';
|
|
255
256
|
var id = useId(id_);
|
|
256
257
|
var _getA11yPreset3 = getA11yPreset(role),
|
|
@@ -273,8 +274,9 @@ export function useOverlayTriggerA11y(_ref8) {
|
|
|
273
274
|
'aria-details': ariaDetails,
|
|
274
275
|
'aria-labelledby': ariaLabelledby,
|
|
275
276
|
'aria-label': ariaLabel,
|
|
277
|
+
'aria-modal': undefined,
|
|
278
|
+
// OverlayTrigger only supports non-modal dialogs
|
|
276
279
|
id: id,
|
|
277
|
-
isModal: false,
|
|
278
280
|
isOpen: isOpen
|
|
279
281
|
}),
|
|
280
282
|
dialogProps = _useModalDialogLike.dialogProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11yPresets.js","names":["ariaHideOutside","useId","useLabels","React","emptyObj","returnEmpty","a11yPresets","haspopup","getOverlayProps","_ref","role","overlayId","id","getTriggerProps","_ref2","isVisible","undefined","tooltip","_ref3","_ref4","getA11yPreset","useLabelled","props","_ref5","ariaDescribedby","ariaDetails","ariaLabelledby","ariaLabel","ariaLabelOnly","labelledId","widgetId","fieldProps","descriptionProps","labelProps","widgetProps","_objectSpread","useLabelledPopup","_ref6","_getA11yPreset$getTri","_getA11yPreset","_getA11yPreset$getOve","_getA11yPreset2","id_","isOpen","_ref6$type","type","popupRole","popupId_","popupId","presetArgs","triggerProps","call","overlayProps","_useLabelled","popupProps","useModalDialogLike","_ref7","isModal","ref","_ref7$role","_useLabelled2","dialogProps","tabIndex","useLayoutEffect","current","focusScopeProps","autoFocus","contain","restoreFocus","useOverlayTriggerA11y","_ref8","alwaysAriaVisible","canPropOverlayUp","isDialog","_getA11yPreset3","overlayA11yProps","wrapperA11yProps","_useModalDialogLike","portalProps","wrapperFinalProps","focusScopeFinalProps","wrapperProps"],"sources":["../../src/OverlayTrigger/a11yPresets.ts"],"sourcesContent":["import { ariaHideOutside } from '@react-aria/overlays'\nimport { useId, useLabels } from '@react-aria/utils'\nimport type { AriaAttributes } from 'react'\nimport React from 'react'\nimport type { OverlayTriggerRole } from './OverlayTrigger.types'\n\nconst emptyObj = {}\nconst returnEmpty: GetA11yProps = () => ({})\n\ntype GetA11yProps = (props: {\n role: OverlayTriggerRole\n isVisible: boolean\n overlayId: string\n}) => AriaAttributes & { id?: string }\n\nconst a11yPresets: Record<\n 'tooltip' | 'haspopup',\n {\n getOverlayProps: GetA11yProps\n getTriggerProps: GetA11yProps\n }\n> = {\n haspopup: {\n getOverlayProps: ({ role, overlayId }) => ({\n id: overlayId,\n role,\n }),\n getTriggerProps: ({ role, isVisible, overlayId }) => ({\n 'aria-expanded': isVisible,\n 'aria-controls': isVisible ? overlayId : undefined,\n 'aria-haspopup': role as 'dialog' | 'listbox' | 'menu',\n }),\n },\n tooltip: {\n getOverlayProps: ({ overlayId }) => ({\n role: 'tooltip',\n id: overlayId,\n }),\n getTriggerProps: ({ isVisible, overlayId }) => ({\n 'aria-describedby': isVisible ? overlayId : undefined,\n // 'aria-expanded': isVisible,\n }),\n },\n}\n\nexport function getA11yPreset(role?: OverlayTriggerRole) {\n switch (role) {\n case 'dialog':\n case 'listbox':\n case 'menu':\n return a11yPresets.haspopup\n case 'tooltip':\n return a11yPresets.tooltip\n case 'none':\n return {\n getOverlayProps: (() => ({ role: 'none' })) as GetA11yProps,\n getTriggerProps: returnEmpty,\n }\n default:\n return {\n getOverlayProps: returnEmpty,\n getTriggerProps: returnEmpty,\n }\n }\n}\n\ntype LabelConfig = {\n 'aria-describedby'?: string\n 'aria-details'?: string\n 'aria-labelledby'?: string\n 'aria-label'?: string\n /**\n * ID for the widget itself\n */\n id?: string\n}\n\ntype DialogBase = LabelConfig & {\n isOpen: boolean\n role?: 'dialog'\n}\n\ntype NonModalDialogConfig = DialogBase & {\n isModal?: never | false\n}\n\ntype ModalDialogConfig = DialogBase & {\n /**\n *\n * To enable `ariaHideOutside`. Set `isModal` to false to disable.\n * @a11y Replicates `aria-modal` inert outside content\n * @default false\n */\n isModal: true\n ref: React.RefObject<HTMLElement>\n}\n\ntype ModalDialogLikeConfig = NonModalDialogConfig | ModalDialogConfig\n\ntype OverlayTriggerA11yConfig = LabelConfig & {\n /**\n * Assure `aria-hidden` is not applied. A code side-effect\n * from `ariaHideOutside` hiding everthing outside the scope.\n */\n alwaysAriaVisible?: boolean\n /**\n * When properties should be passed to the overlay UI itself,\n * and not the wrapper element.\n */\n canPropOverlayUp: boolean\n isOpen: boolean\n role?: OverlayTriggerRole\n // ref: React.RefObject<HTMLElement> // Only necessary for modal\n}\n\n/**\n * Manages labelling for an element and the other DOM. Defaults an ID for `aria-labelledby` usage.\n *\n * When `aria-label` and `aria-labelledby` both exist, it combines them into `aria-labelledby` for a screen reader chain.\n * @link [W3 naming with aria-labelledby](https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/#naming_with_aria-labelledby)\n */\nexport function useLabelled(props?: LabelConfig) {\n const {\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id,\n } = props || (emptyObj as LabelConfig)\n const ariaLabelOnly = ariaLabel && !ariaLabelledby\n\n // Generate an ID. We want to use this unless they are using only aria-label\n const labelledId = useId(ariaLabelledby)\n\n // Merges aria-label and aria-labelledby into aria-labelledby when both exist\n const widgetId = useId(id)\n let fieldProps = useLabels({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelOnly ? undefined : labelledId,\n id: widgetId,\n })\n\n return {\n descriptionProps: { id: ariaDescribedby },\n labelProps: { id: ariaLabelOnly ? undefined : labelledId },\n widgetProps: {\n ...fieldProps,\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n },\n }\n}\n\n/**\n * Cover the label links for the trigger (button), the popup element (dialog), and the popup element title (heading).\n * Similar to [React Aria useOverlayTrigger](https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/overlays/src/useOverlayTrigger.ts)\n * but with element title support.\n * @link [MDN aria-haspopup](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup)\n */\nexport function useLabelledPopup({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id: id_,\n isOpen,\n type = 'button',\n popupRole,\n popupId: popupId_,\n}: LabelConfig & {\n isOpen: boolean\n popupId?: string\n type?: 'button' | 'combobox' // Role? Not used. Show concept that popups manage 2 roles\n popupRole: 'dialog' | 'menu' | 'listbox'\n}) {\n /** Web spec default for aria-haspopup=true is menu, unless element has role combobox, which have an implicit aria-haspopup value of listbox. */\n // const popupRole = popupRole_ || type === 'combobox' ? 'listbox' : 'menu'\n const id = useId(id_)\n const popupId = useId(popupId_)\n\n const presetArgs = {\n isVisible: isOpen,\n role: popupRole,\n overlayId: popupId,\n }\n\n const triggerProps = getA11yPreset(popupRole).getTriggerProps?.(presetArgs)\n const overlayProps = getA11yPreset(popupRole).getOverlayProps?.(presetArgs)\n\n const { labelProps, widgetProps } = useLabelled({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id,\n })\n\n return {\n labelProps,\n popupProps: { role: popupRole, ...widgetProps, ...overlayProps },\n triggerProps,\n }\n}\n\n/**\n * For dialog experiences:\n * - Has role dialog and aria linked title props\n * - Focus management props to work with FocusScope\n *\n * For modal dialog experiences (full screen locked experiences):\n * - Hides old and new content outside with aria-hidden with ariaHideOutside (like aria-modal)\n * - (it will in breaking) Prevent scroll\n *\n * For either experiences, you still MUST support:\n * - have Escape key to close (It should!)\n * - have click outside, like scrim click\n *\n * _More about 'modal dialog' and `isModal` not using `aria-modal`:_\n * Setting aria-modal=\"true\" tells assistive technologies to let the user know the ability to interact with,\n * or access other content on the page requires the modal dialog to be closed or otherwise lose focus.\n * Modal dialogs are when content is displayed and the user's interaction is limited to only that section until it is dismissed.\n * [MDN aria modal](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-modal).\n * To support the most, like Narrator in Edge, Core React uses `ariaHideOutside` to set `aria-hidden` on\n * all elements outside the dialog, and **all elements outside added while opened**, so the dialog will act as a\n * _modal_ even without `aria-modal` on the dialog itself. See Future Considerations below.\n * [Screen Reader aria modal support table](https://a11ysupport.io/tech/aria/aria-modal_attribute) - [MS Narrator Edge aria modal support](https://a11ysupport.io/tests/apg__modal-dialog-example/aria__aria-modal_attribute/convey_presence/narrator/edge)\n * _Future Considerations:_ Replace ariaHideOutside with aria-modal=\"true\".\n * Using aria-modal, then we would need to involve Portal and so tooltips\n * or Toasts could mount within the visible aria-modal container.\n */\n\nexport function useModalDialogLike({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id,\n isModal,\n isOpen,\n // @ts-expect-error\n ref,\n role = 'dialog',\n}: ModalDialogLikeConfig) {\n const { labelProps, widgetProps } = useLabelled({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n })\n\n const dialogProps = {\n // 'aria-modal': true,\n ...widgetProps,\n id,\n role,\n tabIndex: -1,\n }\n\n // usePreventScroll({\n // isDisabled: isModal ? !isOpen : true,\n // })\n\n // Fills aria-modal=true\n React.useLayoutEffect(() => {\n if (isModal && isOpen && ref.current) {\n // Could add additional visible element refs here\n return ariaHideOutside([ref.current])\n }\n }, [isModal, isOpen, ref])\n\n return {\n dialogProps,\n labelProps,\n focusScopeProps: {\n autoFocus: true,\n contain: true,\n restoreFocus: true,\n },\n }\n}\n\n/**\n * Takes many roles and determines props necessary for DOM/components.\n * **Side effect of role=\"dialog\"**, current and any content added later\n * outside of the element (like by portals) will get `aria-hidden=true`\n * to replace the `aria-modal=true` `inert` nature.\n * @see useModalDialogLike */\nexport function useOverlayTriggerA11y({\n alwaysAriaVisible,\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n // can we remove this? have it role based? be optional?\n canPropOverlayUp,\n id: id_,\n isOpen,\n role,\n}: OverlayTriggerA11yConfig) {\n const isDialog = role === 'dialog'\n\n const id = useId(id_)\n\n const { getTriggerProps, getOverlayProps } = getA11yPreset(role)\n\n const triggerProps = getTriggerProps?.({\n isVisible: isOpen,\n role: role!,\n overlayId: id,\n })\n\n const overlayA11yProps = getOverlayProps?.({\n isVisible: isOpen,\n role: role!,\n overlayId: id,\n })\n\n const wrapperA11yProps = !canPropOverlayUp ? overlayA11yProps : emptyObj\n const overlayProps = canPropOverlayUp ? overlayA11yProps : emptyObj\n\n const { dialogProps, labelProps, focusScopeProps } = useModalDialogLike({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id,\n isModal: false,\n isOpen,\n })\n\n /** This is a code side-effect from ariaHideOutside hiding everthing */\n const portalProps =\n role === 'tooltip' || alwaysAriaVisible // || !role\n ? { 'data-react-aria-top-layer': true, 'data-live-announcer': true }\n : emptyObj\n\n /**\n * If it is a dialog, we can merge the dialog props with any haspopup props\n */\n const wrapperFinalProps = isDialog\n ? {\n ...wrapperA11yProps,\n ...dialogProps,\n }\n : wrapperA11yProps\n\n /**\n * If it is a dialog, we have opinions on `FocusScope` props.\n */\n const focusScopeFinalProps = isDialog\n ? focusScopeProps\n : (emptyObj as {\n autoFocus?: boolean\n contain?: boolean\n restoreFocus?: boolean\n })\n\n return {\n focusScopeProps: focusScopeFinalProps,\n labelProps,\n overlayProps,\n portalProps,\n triggerProps,\n wrapperProps: wrapperFinalProps,\n }\n}\n\n// WIP Example combobox\n// function useCombox({\n// controls,\n// isOpen = false,\n// }: {\n// controls: 'dialog' | 'menu' | 'listbox'\n// isOpen: boolean\n// }) {\n// const { labelProps, popupProps, triggerProps } = useLabelledPopup({\n// role: controls,\n// type: 'combobox',\n// isOpen,\n// })\n// dispatch between elements.\n// NOTE combobox has two labels, that could be different\n// one for the trigger input (typically the form label)\n// second for the thing it controls (listbox, dialog)\n// - label id=1\n// - input role='combobox' aria-labelledby=1\n// - div role={controls} aria-label\n// Also, any icon only buttons like clear or open should have a\n// label and -1 tabindex. No nested interactive roles.\n// }\n"],"mappings":";;;;;;AAAA,SAASA,eAAe,QAAQ,sBAAsB;AACtD,SAASC,KAAK,EAAEC,SAAS,QAAQ,mBAAmB;AAEpD,OAAOC,KAAK,MAAM,OAAO;AAGzB,IAAMC,QAAQ,GAAG,CAAC,CAAC;AACnB,IAAMC,WAAyB,GAAG,SAA5BA,WAAyBA,CAAA;EAAA,OAAU,CAAC,CAAC;AAAA,CAAC;AAQ5C,IAAMC,WAML,GAAG;EACFC,QAAQ,EAAE;IACRC,eAAe,EAAE,SAAjBA,eAAeA,CAAAC,IAAA;M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,YAAY,EAAEF;EAChB,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
|
1
|
+
{"version":3,"file":"a11yPresets.js","names":["useId","useLabels","emptyObj","returnEmpty","a11yPresets","haspopup","getOverlayProps","_ref","role","overlayId","id","getTriggerProps","_ref2","isVisible","undefined","tooltip","_ref3","_ref4","getA11yPreset","useLabelled","props","_ref5","ariaDescribedby","ariaDetails","ariaLabelledby","ariaLabel","ariaLabelOnly","labelledId","widgetId","fieldProps","descriptionProps","labelProps","widgetProps","_objectSpread","useLabelledPopup","_ref6","_getA11yPreset$getTri","_getA11yPreset","_getA11yPreset$getOve","_getA11yPreset2","id_","isOpen","_ref6$type","type","popupRole","popupId_","popupId","presetArgs","triggerProps","call","overlayProps","_useLabelled","popupProps","useModalDialogLike","_ref7","ariaModal","_ref7$role","_useLabelled2","dialogProps","tabIndex","focusScopeProps","autoFocus","contain","restoreFocus","useOverlayTriggerA11y","_ref8","alwaysAriaVisible","canPropOverlayUp","console","error","isDialog","_getA11yPreset3","overlayA11yProps","wrapperA11yProps","_useModalDialogLike","portalProps","wrapperFinalProps","focusScopeFinalProps","wrapperProps"],"sources":["../../src/OverlayTrigger/a11yPresets.ts"],"sourcesContent":["import { useId, useLabels } from '@react-aria/utils'\nimport type { AriaAttributes } from 'react'\nimport type { OverlayTriggerRole } from './OverlayTrigger.types'\n\nconst emptyObj = {}\nconst returnEmpty: GetA11yProps = () => ({})\n\ntype GetA11yProps = (props: {\n role: OverlayTriggerRole\n isVisible: boolean\n overlayId: string\n}) => AriaAttributes & { id?: string }\n\nconst a11yPresets: Record<\n 'tooltip' | 'haspopup',\n {\n getOverlayProps: GetA11yProps\n getTriggerProps: GetA11yProps\n }\n> = {\n haspopup: {\n getOverlayProps: ({ role, overlayId }) => ({\n id: overlayId,\n role,\n }),\n getTriggerProps: ({ role, isVisible, overlayId }) => ({\n 'aria-expanded': isVisible,\n 'aria-controls': isVisible ? overlayId : undefined,\n 'aria-haspopup': role as 'dialog' | 'listbox' | 'menu',\n }),\n },\n tooltip: {\n getOverlayProps: ({ overlayId }) => ({\n role: 'tooltip',\n id: overlayId,\n }),\n getTriggerProps: ({ isVisible, overlayId }) => ({\n 'aria-describedby': isVisible ? overlayId : undefined,\n // 'aria-expanded': isVisible,\n }),\n },\n}\n\nexport function getA11yPreset(role?: OverlayTriggerRole | 'alertdialog') {\n switch (role) {\n case 'alertdialog':\n case 'dialog':\n case 'listbox':\n case 'menu':\n return a11yPresets.haspopup\n case 'tooltip':\n return a11yPresets.tooltip\n case 'none':\n return {\n getOverlayProps: (() => ({ role: 'none' })) as GetA11yProps,\n getTriggerProps: returnEmpty,\n }\n default:\n return {\n getOverlayProps: returnEmpty,\n getTriggerProps: returnEmpty,\n }\n }\n}\n\ntype LabelConfig = {\n 'aria-describedby'?: string\n 'aria-details'?: string\n 'aria-labelledby'?: string\n 'aria-label'?: string\n /**\n * ID for the widget itself\n */\n id?: string\n}\n\ntype DialogBase = LabelConfig & {\n isOpen: boolean\n role?: 'dialog' | 'alertdialog'\n}\n\ntype NonModalDialogConfig = DialogBase & {\n 'aria-modal'?: never | false\n}\n\ntype ModalDialogConfig = DialogBase & {\n /**\n * @a11y This will add `aria-modal={true}` and rely on browsers to\n * handle making outside content inert.\n * @default false\n */\n 'aria-modal': true\n // ref: React.RefObject<HTMLElement>\n}\n\ntype ModalDialogLikeConfig = NonModalDialogConfig | ModalDialogConfig\n\ntype OverlayTriggerA11yConfig = LabelConfig & {\n /**\n * Assure `aria-hidden` is not applied. A code side-effect\n * from `ariaHideOutside` hiding everthing outside the scope.\n */\n alwaysAriaVisible?: boolean\n /**\n * When properties should be passed to the overlay UI itself,\n * and not the wrapper element.\n */\n canPropOverlayUp: boolean\n isOpen: boolean\n role?: OverlayTriggerRole\n}\n\n/**\n * Manages labelling for an element and the other DOM. Defaults an ID for `aria-labelledby` usage.\n *\n * When `aria-label` and `aria-labelledby` both exist, it combines them into `aria-labelledby` for a screen reader chain.\n * @link [W3 naming with aria-labelledby](https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/#naming_with_aria-labelledby)\n */\nexport function useLabelled(props?: LabelConfig) {\n const {\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id,\n } = props || (emptyObj as LabelConfig)\n const ariaLabelOnly = ariaLabel && !ariaLabelledby\n\n // Generate an ID. We want to use this unless they are using only aria-label\n const labelledId = useId(ariaLabelledby)\n\n // Merges aria-label and aria-labelledby into aria-labelledby when both exist\n const widgetId = useId(id)\n let fieldProps = useLabels({\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelOnly ? undefined : labelledId,\n id: widgetId,\n })\n\n return {\n descriptionProps: { id: ariaDescribedby },\n labelProps: { id: ariaLabelOnly ? undefined : labelledId },\n widgetProps: {\n ...fieldProps,\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n },\n }\n}\n\n/**\n * Cover the label links for the trigger (button), the popup element (dialog), and the popup element title (heading).\n * Similar to [React Aria useOverlayTrigger](https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/overlays/src/useOverlayTrigger.ts)\n * but with element title support.\n * @link [MDN aria-haspopup](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup)\n */\nexport function useLabelledPopup({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id: id_,\n isOpen,\n type = 'button',\n popupRole,\n popupId: popupId_,\n}: LabelConfig & {\n isOpen: boolean\n popupId?: string\n type?: 'button' | 'combobox' // Role? Not used. Show concept that popups manage 2 roles\n popupRole: 'dialog' | 'menu' | 'listbox'\n}) {\n /** Web spec default for aria-haspopup=true is menu, unless element has role combobox, which have an implicit aria-haspopup value of listbox. */\n // const popupRole = popupRole_ || type === 'combobox' ? 'listbox' : 'menu'\n const id = useId(id_)\n const popupId = useId(popupId_)\n\n const presetArgs = {\n isVisible: isOpen,\n role: popupRole,\n overlayId: popupId,\n }\n\n const triggerProps = getA11yPreset(popupRole).getTriggerProps?.(presetArgs)\n const overlayProps = getA11yPreset(popupRole).getOverlayProps?.(presetArgs)\n\n const { labelProps, widgetProps } = useLabelled({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id,\n })\n\n return {\n labelProps,\n popupProps: { role: popupRole, ...widgetProps, ...overlayProps },\n triggerProps,\n }\n}\n\n/**\n * For dialog experiences:\n * - Has role dialog and aria linked title props\n * - Focus management props to work with FocusScope\n *\n * For modal dialog experiences (full screen locked experiences):\n * - what dialog above does\n * - adds aria-modal=\"true\"\n * - this hook does not determine where to mount or how many modals are open\n *\n * For either experiences, you still MUST support a way to close by mouse and keyboard.\n *\n * Using `aria-modal`, you need to keep additional overlay content inside, so\n * portals must be smart enough to know where other overlays\n * like tooltips or toasts should go to remain visible to screen readers (inside the aria-modal).\n *\n * Setting aria-modal=\"true\" tells assistive technologies to let the user know the ability to interact with,\n * or access other content on the page requires the modal dialog to be closed or otherwise lose focus.\n * Modal dialogs are when content is displayed and the user's interaction is limited to only that section until it is dismissed.\n * [MDN aria modal](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-modal).\n */\nexport function useModalDialogLike({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n 'aria-modal': ariaModal,\n id,\n isOpen,\n role = 'dialog',\n}: ModalDialogLikeConfig) {\n const { labelProps, widgetProps } = useLabelled({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n })\n\n const dialogProps = {\n 'aria-modal': ariaModal,\n ...widgetProps,\n id,\n role,\n tabIndex: -1,\n }\n\n // usePreventScroll({\n // isDisabled: ariaModal ? !isOpen : true,\n // })\n\n // Fills aria-modal=true\n // import { ariaHideOutside } from '@react-aria/overlays'\n // React.useLayoutEffect(() => {\n // if (isModal && isOpen && ref.current) {\n // // Could add additional visible element refs here\n // return ariaHideOutside([ref.current])\n // }\n // }, [isModal, isOpen, ref])\n\n return {\n dialogProps,\n labelProps,\n focusScopeProps: {\n autoFocus: true,\n contain: true,\n restoreFocus: true,\n },\n }\n}\n\n/**\n * Takes many roles and determines props necessary for DOM/components.\n * **Side effect of role=\"dialog\"**, current and any content added later\n * outside of the element (like by portals) will get `aria-hidden=true`\n * to replace the `aria-modal=true` `inert` nature.\n * @see useModalDialogLike */\nexport function useOverlayTriggerA11y({\n alwaysAriaVisible,\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n // can we remove this? have it role based? be optional?\n canPropOverlayUp,\n id: id_,\n isOpen,\n role,\n}: OverlayTriggerA11yConfig) {\n if (\n // @ts-expect-error Checking for invalid usage\n role === 'alertdialog'\n ) {\n console.error(\n '@procore/core-react: useOverlayTriggerA11y role alertdialog is not supported because it requires aria-modal to be true. This is intended for non-modal dialogs.'\n )\n }\n const isDialog = role === 'dialog'\n\n const id = useId(id_)\n\n const { getTriggerProps, getOverlayProps } = getA11yPreset(role)\n\n const triggerProps = getTriggerProps?.({\n isVisible: isOpen,\n role: role!,\n overlayId: id,\n })\n\n const overlayA11yProps = getOverlayProps?.({\n isVisible: isOpen,\n role: role!,\n overlayId: id,\n })\n\n const wrapperA11yProps = !canPropOverlayUp ? overlayA11yProps : emptyObj\n const overlayProps = canPropOverlayUp ? overlayA11yProps : emptyObj\n\n const { dialogProps, labelProps, focusScopeProps } = useModalDialogLike({\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n 'aria-modal': undefined, // OverlayTrigger only supports non-modal dialogs\n id,\n isOpen,\n })\n\n /** This is a code side-effect from ariaHideOutside hiding everthing */\n const portalProps =\n role === 'tooltip' || alwaysAriaVisible // || !role\n ? { 'data-react-aria-top-layer': true, 'data-live-announcer': true }\n : emptyObj\n\n /**\n * If it is a dialog, we can merge the dialog props with any haspopup props\n */\n const wrapperFinalProps = isDialog\n ? {\n ...wrapperA11yProps,\n ...dialogProps,\n }\n : wrapperA11yProps\n\n /**\n * If it is a dialog, we have opinions on `FocusScope` props.\n */\n const focusScopeFinalProps = isDialog\n ? focusScopeProps\n : (emptyObj as {\n autoFocus?: boolean\n contain?: boolean\n restoreFocus?: boolean\n })\n\n return {\n focusScopeProps: focusScopeFinalProps,\n labelProps,\n overlayProps,\n portalProps,\n triggerProps,\n wrapperProps: wrapperFinalProps,\n }\n}\n\n// WIP Example combobox\n// function useCombox({\n// controls,\n// isOpen = false,\n// }: {\n// controls: 'dialog' | 'menu' | 'listbox'\n// isOpen: boolean\n// }) {\n// const { labelProps, popupProps, triggerProps } = useLabelledPopup({\n// role: controls,\n// type: 'combobox',\n// isOpen,\n// })\n// dispatch between elements.\n// NOTE combobox has two labels, that could be different\n// one for the trigger input (typically the form label)\n// second for the thing it controls (listbox, dialog)\n// - label id=1\n// - input role='combobox' aria-labelledby=1\n// - div role={controls} aria-label\n// Also, any icon only buttons like clear or open should have a\n// label and -1 tabindex. No nested interactive roles.\n// }\n"],"mappings":";;;;;;AAAA,SAASA,KAAK,EAAEC,SAAS,QAAQ,mBAAmB;AAIpD,IAAMC,QAAQ,GAAG,CAAC,CAAC;AACnB,IAAMC,WAAyB,GAAG,SAA5BA,WAAyBA,CAAA;EAAA,OAAU,CAAC,CAAC;AAAA,CAAC;AAQ5C,IAAMC,WAML,GAAG;EACFC,QAAQ,EAAE;IACRC,eAAe,EAAE,SAAjBA,eAAeA,CAAAC,IAAA;MAAA,IAAKC,IAAI,GAA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@@ export declare const StyledPageTitle: import("styled-components/dist/types").ISt
|
|
|
10
10
|
export declare const StyledPageBreadcrumbs: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
|
|
11
11
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
12
12
|
}, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
13
|
-
ref?:
|
|
13
|
+
ref?: ((instance: HTMLElement | null) => void) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
14
14
|
}>, never>, never>> & string;
|
|
15
15
|
export declare const StyledPageBanner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
|
|
16
16
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
@@ -11,52 +11,52 @@ var outerPageSpacing = spacing.lg;
|
|
|
11
11
|
var outerPageSpacingSmaller = spacing.md;
|
|
12
12
|
export var StyledPageHeader = /*#__PURE__*/styled.div.withConfig({
|
|
13
13
|
displayName: "StyledPageHeader",
|
|
14
|
-
componentId: "core-
|
|
14
|
+
componentId: "core-12_43_0__sc-1cvdbsv-0"
|
|
15
15
|
})(["padding-top:", "px;padding-right:", "px;padding-left:", "px;@media ", "{padding-right:", "px;padding-left:", "px;}", ""], headerVerticalSpacing, outerPageSpacing, outerPageSpacing, mediaBreakpointsDown.tabletMd, outerPageSpacingSmaller, outerPageSpacingSmaller, function (_ref) {
|
|
16
16
|
var $transparent = _ref.$transparent;
|
|
17
17
|
return !$transparent && css(["", " background-color:", ";"], getShadow(1.5), colors.white);
|
|
18
18
|
});
|
|
19
19
|
export var StyledPageHeaderItem = /*#__PURE__*/styled.div.withConfig({
|
|
20
20
|
displayName: "StyledPageHeaderItem",
|
|
21
|
-
componentId: "core-
|
|
21
|
+
componentId: "core-12_43_0__sc-1cvdbsv-1"
|
|
22
22
|
})(["margin-top:", "px;&:first-child{margin-top:0;}"], headerVerticalSpacing);
|
|
23
23
|
export var StyledPageTitle = /*#__PURE__*/styled(StyledPageHeaderItem).withConfig({
|
|
24
24
|
displayName: "StyledPageTitle",
|
|
25
|
-
componentId: "core-
|
|
25
|
+
componentId: "core-12_43_0__sc-1cvdbsv-2"
|
|
26
26
|
})(["&:last-child{padding-bottom:", "px;}"], headerVerticalSpacing);
|
|
27
27
|
export var StyledPageBreadcrumbs = /*#__PURE__*/styled(StyledPageHeaderItem).attrs({
|
|
28
28
|
as: 'nav'
|
|
29
29
|
}).withConfig({
|
|
30
30
|
displayName: "StyledPageBreadcrumbs",
|
|
31
|
-
componentId: "core-
|
|
31
|
+
componentId: "core-12_43_0__sc-1cvdbsv-3"
|
|
32
32
|
})([""]);
|
|
33
33
|
export var StyledPageBanner = /*#__PURE__*/styled(StyledPageHeaderItem).withConfig({
|
|
34
34
|
displayName: "StyledPageBanner",
|
|
35
|
-
componentId: "core-
|
|
35
|
+
componentId: "core-12_43_0__sc-1cvdbsv-4"
|
|
36
36
|
})([""]);
|
|
37
37
|
export var getActions = function getActions() {
|
|
38
38
|
return css(["flex-shrink:0;padding-left:", "px;> button,> a{&:first-child{margin-left:0;}margin-left:", "px;}"], spacing.xl, spacing.sm);
|
|
39
39
|
};
|
|
40
40
|
export var StyledPageActions = /*#__PURE__*/styled.div.withConfig({
|
|
41
41
|
displayName: "StyledPageActions",
|
|
42
|
-
componentId: "core-
|
|
42
|
+
componentId: "core-12_43_0__sc-1cvdbsv-5"
|
|
43
43
|
})(["", ""], getActions());
|
|
44
44
|
export var StyledPageTabs = /*#__PURE__*/styled(StyledPageHeaderItem).withConfig({
|
|
45
45
|
displayName: "StyledPageTabs",
|
|
46
|
-
componentId: "core-
|
|
46
|
+
componentId: "core-12_43_0__sc-1cvdbsv-6"
|
|
47
47
|
})([""]);
|
|
48
48
|
export var StyledBody = /*#__PURE__*/styled.div.withConfig({
|
|
49
49
|
displayName: "StyledBody",
|
|
50
|
-
componentId: "core-
|
|
50
|
+
componentId: "core-12_43_0__sc-1cvdbsv-7"
|
|
51
51
|
})(["padding-top:", "px;padding-left:", "px;padding-right:", "px;@media ", "{padding-top:", "px;padding-left:", "px;padding-right:", "px;}"], outerPageSpacing, outerPageSpacing, outerPageSpacing, mediaBreakpointsDown.tabletMd, outerPageSpacingSmaller, outerPageSpacingSmaller, outerPageSpacingSmaller);
|
|
52
52
|
var navigationWidth = 200;
|
|
53
53
|
export var StyledNavigation = /*#__PURE__*/styled.div.withConfig({
|
|
54
54
|
displayName: "StyledNavigation",
|
|
55
|
-
componentId: "core-
|
|
55
|
+
componentId: "core-12_43_0__sc-1cvdbsv-8"
|
|
56
56
|
})(["float:left;max-height:100vh;min-width:", "px;overflow-y:auto;position:sticky;top:0;width:", "px;", "{padding:20px ", "px 0 0;}@media screen and (max-width:1024px){display:none;}"], navigationWidth, navigationWidth, StyledAnchorNavigation, spacing.sm);
|
|
57
57
|
export var StyledContent = /*#__PURE__*/styled.div.withConfig({
|
|
58
58
|
displayName: "StyledContent",
|
|
59
|
-
componentId: "core-
|
|
59
|
+
componentId: "core-12_43_0__sc-1cvdbsv-9"
|
|
60
60
|
})([""]);
|
|
61
61
|
var panelWidth = 400;
|
|
62
62
|
var zIndexes = {
|
|
@@ -69,7 +69,7 @@ export var animationDuration = {
|
|
|
69
69
|
};
|
|
70
70
|
export var StyledFooter = /*#__PURE__*/styled.div.withConfig({
|
|
71
71
|
displayName: "StyledFooter",
|
|
72
|
-
componentId: "core-
|
|
72
|
+
componentId: "core-12_43_0__sc-1cvdbsv-10"
|
|
73
73
|
})(["background-color:", ";", " position:sticky;bottom:0;z-index:", ";", ""], colors.white, function (_ref2) {
|
|
74
74
|
var $hasShadow = _ref2.$hasShadow;
|
|
75
75
|
return $hasShadow && getShadow(2, 'top');
|
|
@@ -79,7 +79,7 @@ export var StyledFooter = /*#__PURE__*/styled.div.withConfig({
|
|
|
79
79
|
});
|
|
80
80
|
export var StyledAside = /*#__PURE__*/styled.div.withConfig({
|
|
81
81
|
displayName: "StyledAside",
|
|
82
|
-
componentId: "core-
|
|
82
|
+
componentId: "core-12_43_0__sc-1cvdbsv-11"
|
|
83
83
|
})(["", " @media ", "{position:absolute;right:0;}"], function (_ref4) {
|
|
84
84
|
var $closed = _ref4.$closed,
|
|
85
85
|
$open = _ref4.$open;
|
|
@@ -99,7 +99,7 @@ var getPanelAnimation = function getPanelAnimation() {
|
|
|
99
99
|
};
|
|
100
100
|
export var StyledAsidePanel = /*#__PURE__*/styled.div.withConfig({
|
|
101
101
|
displayName: "StyledAsidePanel",
|
|
102
|
-
componentId: "core-
|
|
102
|
+
componentId: "core-12_43_0__sc-1cvdbsv-12"
|
|
103
103
|
})(["", " @media ", "{", "}", " ", " border-left:1px solid ", ";width:", "px;position:fixed;background-color:", ";overflow:auto;z-index:", ";", " ", ""], function (_ref7) {
|
|
104
104
|
var $rightOffset = _ref7.$rightOffset;
|
|
105
105
|
return css(["@media ", "{", " border-left:0;z-index:", ";right:", "px;}"], mediaBreakpointsDown.tabletMd, getShadow(2), zIndexes.panelNarrowScreen, $rightOffset);
|
|
@@ -118,7 +118,7 @@ export var StyledAsidePanel = /*#__PURE__*/styled.div.withConfig({
|
|
|
118
118
|
});
|
|
119
119
|
export var StyledPageMain = /*#__PURE__*/styled.div.withConfig({
|
|
120
120
|
displayName: "StyledPageMain",
|
|
121
|
-
componentId: "core-
|
|
121
|
+
componentId: "core-12_43_0__sc-1cvdbsv-13"
|
|
122
122
|
})(["position:relative;max-width:100%;background-color:", ";", " ", ""], colors.gray96, function () {
|
|
123
123
|
return isIE11() && css(["flex:1 0 0%;"]);
|
|
124
124
|
}, function (_ref10) {
|
|
@@ -133,13 +133,13 @@ export var StyledPageMain = /*#__PURE__*/styled.div.withConfig({
|
|
|
133
133
|
});
|
|
134
134
|
export var StyledPageContainer = /*#__PURE__*/styled.div.withConfig({
|
|
135
135
|
displayName: "StyledPageContainer",
|
|
136
|
-
componentId: "core-
|
|
136
|
+
componentId: "core-12_43_0__sc-1cvdbsv-14"
|
|
137
137
|
})(["display:grid;grid-template-columns:1fr auto;", ""], function () {
|
|
138
138
|
return isIE11() && css(["display:flex;flex-wrap:wrap;"]);
|
|
139
139
|
});
|
|
140
140
|
export var StyledAsideFluidContainer = /*#__PURE__*/styled.div.withConfig({
|
|
141
141
|
displayName: "StyledAsideFluidContainer",
|
|
142
|
-
componentId: "core-
|
|
142
|
+
componentId: "core-12_43_0__sc-1cvdbsv-15"
|
|
143
143
|
})(["", ""], function (_ref11) {
|
|
144
144
|
var $closed = _ref11.$closed,
|
|
145
145
|
$open = _ref11.$open;
|
|
@@ -3,6 +3,6 @@ import { colors } from '../../_styles/colors';
|
|
|
3
3
|
import { spacing } from '../../_styles/spacing';
|
|
4
4
|
export var StyledPageFooter = /*#__PURE__*/styled.footer.withConfig({
|
|
5
5
|
displayName: "StyledPageFooter",
|
|
6
|
-
componentId: "core-
|
|
6
|
+
componentId: "core-12_43_0__sc-1f0zfyf-0"
|
|
7
7
|
})(["display:flex;align-items:center;justify-content:space-between;background-color:", ";padding:", "px;width:100%;box-shadow:0 -2px 6px 0 rgba(0,0,0,0.1);position:sticky;bottom:0;"], colors.white, spacing.lg);
|
|
8
8
|
//# sourceMappingURL=PageFooterTemplate.styles.js.map
|
|
@@ -5,16 +5,16 @@ import { colors } from '../../_styles/colors';
|
|
|
5
5
|
import { spacing } from '../../_styles/spacing';
|
|
6
6
|
export var StyledPageHeader = /*#__PURE__*/styled(Page.Header).withConfig({
|
|
7
7
|
displayName: "StyledPageHeader",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_43_0__sc-1d5kop0-0"
|
|
9
9
|
})(["border-bottom:1px solid ", ";padding-top:", "px;", ""], colors.gray85, spacing.lg, function (p) {
|
|
10
10
|
return p.$hasPaddingBottom && "padding-bottom: ".concat(spacing.lg, "px;");
|
|
11
11
|
});
|
|
12
12
|
export var StyledActions = /*#__PURE__*/styled(Box).withConfig({
|
|
13
13
|
displayName: "StyledActions",
|
|
14
|
-
componentId: "core-
|
|
14
|
+
componentId: "core-12_43_0__sc-1d5kop0-1"
|
|
15
15
|
})(["width:fit-content;"]);
|
|
16
16
|
export var StyledToggleActionBox = /*#__PURE__*/styled(Box).withConfig({
|
|
17
17
|
displayName: "StyledToggleActionBox",
|
|
18
|
-
componentId: "core-
|
|
18
|
+
componentId: "core-12_43_0__sc-1d5kop0-2"
|
|
19
19
|
})(["bottom:", "px;position:relative;padding-left:48px;"], spacing.lg);
|
|
20
20
|
//# sourceMappingURL=PageHeaderTemplate.styles.js.map
|
|
@@ -10,10 +10,10 @@ var panelWidthSmall = 360;
|
|
|
10
10
|
export var mobileBreakpoint = 440;
|
|
11
11
|
export var StyledPageAside = /*#__PURE__*/styled(Page.Aside).withConfig({
|
|
12
12
|
displayName: "StyledPageAside",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-12_43_0__sc-1p7nu53-0"
|
|
14
14
|
})(["position:sticky;top:0;right:0;max-height:100vh;width:100%;height:100%;@media ", "{position:sticky;max-width:", "px;flex-basis:", "px;}", "{@media ", "{max-width:", "px;}}", "{position:sticky;top:0;right:0;box-shadow:none;animation:none;padding-bottom:68px;@media ", "{width:", "px;}@media (max-width:", "px){padding-bottom:0;}}", "{position:fixed;bottom:0;display:flex;width:100%;max-width:400px;@media ", "{max-width:", "px;}}"], mediaBreakpointsDown.tabletLg, panelWidthSmall, panelWidthSmall, StyledAsideFluidContainer, mediaBreakpointsDown.tabletLg, panelWidthSmall, StyledAsidePanel, mediaBreakpointsDown.tabletLg, panelWidthSmall, mobileBreakpoint, StyledPanelFooter, mediaBreakpointsDown.tabletLg, panelWidthSmall);
|
|
15
15
|
export var StyledModal = /*#__PURE__*/styled(Modal).withConfig({
|
|
16
16
|
displayName: "StyledModal",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-12_43_0__sc-1p7nu53-1"
|
|
18
18
|
})(["top:", "px;bottom:", "px;max-width:416px;transform:none;", "{max-height:100vh;}@media (max-width:", "px){top:0;bottom:0;left:0;right:0;max-width:100%;}"], spacing.md, spacing.md, StyledModalContent, mobileBreakpoint);
|
|
19
19
|
//# sourceMappingURL=PagePaneTemplate.styles.js.map
|
|
@@ -5,14 +5,14 @@ import { spacing } from '../../_styles/spacing';
|
|
|
5
5
|
export var mobileBreakpoint = 440;
|
|
6
6
|
export var StyledPageWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
7
7
|
displayName: "StyledPageWrapper",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_43_0__sc-uuo7st-0"
|
|
9
9
|
})(["display:flex;flex-direction:column;"]);
|
|
10
10
|
export var StyledPageBodyWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
11
11
|
displayName: "StyledPageBodyWrapper",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_43_0__sc-uuo7st-1"
|
|
13
13
|
})(["display:grid;grid-template-columns:1fr auto;"]);
|
|
14
14
|
export var StyledPageBody = /*#__PURE__*/styled(Page.Body).withConfig({
|
|
15
15
|
displayName: "StyledPageBody",
|
|
16
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-12_43_0__sc-uuo7st-2"
|
|
17
17
|
})(["padding-bottom:", "px;@media ", "{padding:", "px;}"], spacing.lg, mediaBreakpointsDown.desktopMd, spacing.md);
|
|
18
18
|
//# sourceMappingURL=PageTemplate.styles.js.map
|
|
@@ -5,22 +5,22 @@ import { Typography } from '../Typography/Typography';
|
|
|
5
5
|
import { spacing } from '../_styles/spacing';
|
|
6
6
|
export var StyledContainer = /*#__PURE__*/styled.div.withConfig({
|
|
7
7
|
displayName: "StyledContainer",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_43_0__sc-fy34i1-0"
|
|
9
9
|
})(["display:flex;align-items:center;"]);
|
|
10
10
|
export var StyledPageCount = /*#__PURE__*/styled(Typography).withConfig({
|
|
11
11
|
displayName: "StyledPageCount",
|
|
12
|
-
componentId: "core-
|
|
12
|
+
componentId: "core-12_43_0__sc-fy34i1-1"
|
|
13
13
|
})(["margin-right:", "px;"], spacing.xl);
|
|
14
14
|
export var StyledCurrentPage = /*#__PURE__*/styled(Typography).withConfig({
|
|
15
15
|
displayName: "StyledCurrentPage",
|
|
16
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-12_43_0__sc-fy34i1-2"
|
|
17
17
|
})(["margin-right:", "px;"], spacing.sm);
|
|
18
18
|
export var StyledButton = /*#__PURE__*/styled(Button).withConfig({
|
|
19
19
|
displayName: "StyledButton",
|
|
20
|
-
componentId: "core-
|
|
20
|
+
componentId: "core-12_43_0__sc-fy34i1-3"
|
|
21
21
|
})(["margin-left:", "px;"], spacing.sm);
|
|
22
22
|
export var StyledOverlay = /*#__PURE__*/styled(Card).withConfig({
|
|
23
23
|
displayName: "StyledOverlay",
|
|
24
|
-
componentId: "core-
|
|
24
|
+
componentId: "core-12_43_0__sc-fy34i1-4"
|
|
25
25
|
})(["min-height:80px;max-height:300px;max-width:248px;"]);
|
|
26
26
|
//# sourceMappingURL=Pagination.styles.js.map
|
|
@@ -11,15 +11,15 @@ var gutter = /*#__PURE__*/css(["> * + *{margin-left:", "px;}"], spacing.sm);
|
|
|
11
11
|
var panel = /*#__PURE__*/css(["display:flex;padding:", "px;background:", ";"], spacing.lg, colors.white);
|
|
12
12
|
export var StyledHeader = /*#__PURE__*/styled.div.withConfig({
|
|
13
13
|
displayName: "StyledHeader",
|
|
14
|
-
componentId: "core-
|
|
14
|
+
componentId: "core-12_43_0__sc-lidix2-0"
|
|
15
15
|
})(["border-bottom:1px solid ", ";", ""], colors.gray85, panel);
|
|
16
16
|
export var StyledTitle = /*#__PURE__*/styled(H2).withConfig({
|
|
17
17
|
displayName: "StyledTitle",
|
|
18
|
-
componentId: "core-
|
|
18
|
+
componentId: "core-12_43_0__sc-lidix2-1"
|
|
19
19
|
})(["flex-grow:1;"]);
|
|
20
20
|
export var StyledHeaderBackAction = /*#__PURE__*/styled.div.withConfig({
|
|
21
21
|
displayName: "StyledHeaderBackAction",
|
|
22
|
-
componentId: "core-
|
|
22
|
+
componentId: "core-12_43_0__sc-lidix2-2"
|
|
23
23
|
})(["transition:all 300ms ease-out;flex-shrink:0;width:", "px;margin-right:", "px;opacity:", ";transform:translateX( ", "px );"], function (_ref) {
|
|
24
24
|
var $active = _ref.$active;
|
|
25
25
|
return $active ? headerActionSize : 0;
|
|
@@ -35,38 +35,38 @@ export var StyledHeaderBackAction = /*#__PURE__*/styled.div.withConfig({
|
|
|
35
35
|
});
|
|
36
36
|
export var StyledMoreMenu = /*#__PURE__*/styled(Card).withConfig({
|
|
37
37
|
displayName: "StyledMoreMenu",
|
|
38
|
-
componentId: "core-
|
|
38
|
+
componentId: "core-12_43_0__sc-lidix2-3"
|
|
39
39
|
})(["max-height:128px;"]);
|
|
40
40
|
export var StyledHeaderActions = /*#__PURE__*/styled.div.withConfig({
|
|
41
41
|
displayName: "StyledHeaderActions",
|
|
42
|
-
componentId: "core-
|
|
42
|
+
componentId: "core-12_43_0__sc-lidix2-4"
|
|
43
43
|
})(["display:flex;margin-left:", "px;flex-shrink:0;", ""], spacing.lg, gutter);
|
|
44
44
|
export var StyledCloseButton = /*#__PURE__*/styled.div.withConfig({
|
|
45
45
|
displayName: "StyledCloseButton",
|
|
46
|
-
componentId: "core-
|
|
46
|
+
componentId: "core-12_43_0__sc-lidix2-5"
|
|
47
47
|
})(["margin-left:", "px;"], spacing.sm);
|
|
48
48
|
export var StyledBody = /*#__PURE__*/styled.div.withConfig({
|
|
49
49
|
displayName: "StyledBody",
|
|
50
|
-
componentId: "core-
|
|
50
|
+
componentId: "core-12_43_0__sc-lidix2-6"
|
|
51
51
|
})(["height:100%;background:", ";overflow-y:auto;&:focus-visible{", "}> ", "{padding-left:", "px;padding-right:", "px;", "{padding-left:0;padding-right:0;}&:first-child > ", "{padding-top:", "px;}}"], function (_ref5) {
|
|
52
52
|
var secondaryBgColor = _ref5.secondaryBgColor;
|
|
53
53
|
return secondaryBgColor ? colors.gray96 : colors.white;
|
|
54
54
|
}, getFocusInset(), StyledSection, spacing.lg, spacing.lg, StyledSection, StyledSectionInner, spacing.lg);
|
|
55
55
|
export var StyledPanel = /*#__PURE__*/styled.aside.withConfig({
|
|
56
56
|
displayName: "StyledPanel",
|
|
57
|
-
componentId: "core-
|
|
57
|
+
componentId: "core-12_43_0__sc-lidix2-7"
|
|
58
58
|
})(["display:flex;flex-direction:column;width:100%;height:100%;background:", ";overflow:hidden;"], colors.white);
|
|
59
59
|
export var StyledFooterNotation = /*#__PURE__*/styled.div.withConfig({
|
|
60
60
|
displayName: "StyledFooterNotation",
|
|
61
|
-
componentId: "core-
|
|
61
|
+
componentId: "core-12_43_0__sc-lidix2-8"
|
|
62
62
|
})(["flex-grow:1;"]);
|
|
63
63
|
export var StyledFooterActions = /*#__PURE__*/styled.div.withConfig({
|
|
64
64
|
displayName: "StyledFooterActions",
|
|
65
|
-
componentId: "core-
|
|
65
|
+
componentId: "core-12_43_0__sc-lidix2-9"
|
|
66
66
|
})(["", ""], gutter);
|
|
67
67
|
export var StyledFooter = /*#__PURE__*/styled.div.withConfig({
|
|
68
68
|
displayName: "StyledFooter",
|
|
69
|
-
componentId: "core-
|
|
69
|
+
componentId: "core-12_43_0__sc-lidix2-10"
|
|
70
70
|
})(["border-top:1px solid ", ";justify-content:flex-end;", " ", ""], colors.gray85, panel, function (_ref6) {
|
|
71
71
|
var $hasShadow = _ref6.$hasShadow;
|
|
72
72
|
return $hasShadow && css(["box-shadow:0 -4px 6px 0 #0000001a;z-index:1;"]);
|
package/dist/Pill/Pill.styles.js
CHANGED
|
@@ -6,18 +6,18 @@ import { PillColorPalets } from './Pill.colorPalette';
|
|
|
6
6
|
var pillButtonSize = 16;
|
|
7
7
|
export var StyledPill = /*#__PURE__*/styled.span.withConfig({
|
|
8
8
|
displayName: "StyledPill",
|
|
9
|
-
componentId: "core-
|
|
9
|
+
componentId: "core-12_43_0__sc-99e1t5-0"
|
|
10
10
|
})(["", " display:inline-block;padding:1px ", "px;border:1px solid;border-radius:10px;font-weight:600;& + &{margin-left:", "px;}", ""], getTypographyIntent('small'), spacing.sm, spacing.xs, function (_ref) {
|
|
11
11
|
var $color = _ref.$color;
|
|
12
12
|
return css(["background-color:", ";border-color:", ";color:", ";"], PillColorPalets[$color].backgroundColor, PillColorPalets[$color].borderColor, PillColorPalets[$color].color);
|
|
13
13
|
});
|
|
14
14
|
export var StyledRemove = /*#__PURE__*/styled(Clear).withConfig({
|
|
15
15
|
displayName: "StyledRemove",
|
|
16
|
-
componentId: "core-
|
|
16
|
+
componentId: "core-12_43_0__sc-99e1t5-1"
|
|
17
17
|
})(["border-radius:100%;cursor:pointer;flex:0 0 auto;height:", "px;width:", "px;vertical-align:top;"], pillButtonSize, pillButtonSize);
|
|
18
18
|
export var StyledRemoveButton = /*#__PURE__*/styled.button.withConfig({
|
|
19
19
|
displayName: "StyledRemoveButton",
|
|
20
|
-
componentId: "core-
|
|
20
|
+
componentId: "core-12_43_0__sc-99e1t5-2"
|
|
21
21
|
})(["border:0;padding:0;border-radius:100%;margin:0 -", "px 0 ", "px;color:inherit;", ""], pillButtonSize / 2 - spacing.xxs, spacing.xxs, function (_ref2) {
|
|
22
22
|
var $color = _ref2.$color;
|
|
23
23
|
return css(["&:hover{background:", ";color:", ";}"], PillColorPalets[$color].color, PillColorPalets[$color].backgroundColor);
|
|
@@ -6,19 +6,19 @@ import { spacing } from '../_styles/spacing';
|
|
|
6
6
|
var checkedIconPlaceholderWidth = 32;
|
|
7
7
|
export var PillSelectOptionWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
8
8
|
displayName: "PillSelectOptionWrapper",
|
|
9
|
-
componentId: "core-
|
|
9
|
+
componentId: "core-12_43_0__sc-1ai2ze0-0"
|
|
10
10
|
})(["display:flex;align-items:center;justify-content:space-between;"]);
|
|
11
11
|
export var PillSelectCheckedContainer = /*#__PURE__*/styled.div.withConfig({
|
|
12
12
|
displayName: "PillSelectCheckedContainer",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-12_43_0__sc-1ai2ze0-1"
|
|
14
14
|
})(["align-items:center;color:", ";display:inline-flex;padding-left:", "px;width:", "px;"], colors.blue50, spacing.sm, checkedIconPlaceholderWidth);
|
|
15
15
|
export var PillSelectLabel = /*#__PURE__*/styled(Pill).withConfig({
|
|
16
16
|
displayName: "PillSelectLabel",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-12_43_0__sc-1ai2ze0-2"
|
|
18
18
|
})(["", ""], getEllipsis);
|
|
19
19
|
export var PillSelectLabelWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
20
20
|
displayName: "PillSelectLabelWrapper",
|
|
21
|
-
componentId: "core-
|
|
21
|
+
componentId: "core-12_43_0__sc-1ai2ze0-3"
|
|
22
22
|
})(["display:flex;max-width:100%;pointer-events:auto;", ""], function (_ref) {
|
|
23
23
|
var disabled = _ref.disabled;
|
|
24
24
|
return disabled && css(["pointer-events:none;"]);
|
|
@@ -5,7 +5,7 @@ import { getShadow } from '../_styles/shadows';
|
|
|
5
5
|
export var popoverArrowSize = 6;
|
|
6
6
|
export var StyledPopoverContent = /*#__PURE__*/styled.span.withConfig({
|
|
7
7
|
displayName: "StyledPopoverContent",
|
|
8
|
-
componentId: "core-
|
|
8
|
+
componentId: "core-12_43_0__sc-1cd0ihn-0"
|
|
9
9
|
})(["background-color:", ";border-radius:inherit;color:", ";display:inline-block;max-width:250px;position:relative;", ""], colors.white, colors.gray15, function (_ref) {
|
|
10
10
|
var $block = _ref.$block,
|
|
11
11
|
$fluid = _ref.$fluid;
|
|
@@ -15,6 +15,6 @@ export var StyledPopoverContent = /*#__PURE__*/styled.span.withConfig({
|
|
|
15
15
|
});
|
|
16
16
|
export var StyledPopover = /*#__PURE__*/styled.div.withConfig({
|
|
17
17
|
displayName: "StyledPopover",
|
|
18
|
-
componentId: "core-
|
|
18
|
+
componentId: "core-12_43_0__sc-1cd0ihn-1"
|
|
19
19
|
})(["display:inline-block;border-radius:", "px;", " & + [data-overlay-arrow]{background:", ";}"], borderRadius.md, getShadow(3), colors.white);
|
|
20
20
|
//# sourceMappingURL=Popover.styles.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
export var StyledPortal = /*#__PURE__*/styled.div.withConfig({
|
|
3
3
|
displayName: "StyledPortal",
|
|
4
|
-
componentId: "core-
|
|
4
|
+
componentId: "core-12_43_0__sc-15o1h2-0"
|
|
5
5
|
})(["left:0;pointer-events:none;position:fixed;top:0;> *{pointer-events:all;}"]);
|
|
6
6
|
//# sourceMappingURL=Portal.styles.js.map
|
|
@@ -7,15 +7,15 @@ var animationDelay = '300ms';
|
|
|
7
7
|
var fadeIn = /*#__PURE__*/keyframes(["from{opacity:1;}to{opacity:0;}"]);
|
|
8
8
|
export var StyledProgressBarLoader = /*#__PURE__*/styled(Loader).withConfig({
|
|
9
9
|
displayName: "StyledProgressBarLoader",
|
|
10
|
-
componentId: "core-
|
|
10
|
+
componentId: "core-12_43_0__sc-vdy2wl-0"
|
|
11
11
|
})([""]);
|
|
12
12
|
export var StyledProgressBar = /*#__PURE__*/styled.div.withConfig({
|
|
13
13
|
displayName: "StyledProgressBar",
|
|
14
|
-
componentId: "core-
|
|
15
|
-
})(["
|
|
14
|
+
componentId: "core-12_43_0__sc-vdy2wl-1"
|
|
15
|
+
})(["background-color:", ";border-radius:", "px;border:1px solid ", ";display:block;height:", "px;margin:", "px 0;overflow:hidden;position:relative;transition:background-color 0s linear;", " ", ";"], function (_ref) {
|
|
16
16
|
var $complete = _ref.$complete;
|
|
17
17
|
return $complete ? colors.blue50 : colors.gray94;
|
|
18
|
-
}, loaderGridUnit * 2, loaderGridUnit * 2, function (_ref2) {
|
|
18
|
+
}, loaderGridUnit * 2, colors.gray50, loaderGridUnit, loaderGridUnit * 2, function (_ref2) {
|
|
19
19
|
var $finalized = _ref2.$finalized;
|
|
20
20
|
return $finalized && css(["transition-delay:", ";", "{animation:", " 0 ease-out ", " forwards;}"], animationDelay, StyledProgressBarLoader, fadeIn, animationDelay);
|
|
21
21
|
}, function (_ref3) {
|