@procore/core-react 12.48.2 → 12.49.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 +16 -0
- package/dist/AnchorNavigation/AnchorNavigation.styles.js +4 -4
- package/dist/Avatar/Avatar.styles.js +5 -5
- package/dist/AvatarStack/AvatarStack.js +3 -3
- package/dist/AvatarStack/AvatarStack.js.map +1 -1
- package/dist/AvatarStack/AvatarStack.styles.d.ts +2 -0
- package/dist/AvatarStack/AvatarStack.styles.js +14 -9
- package/dist/AvatarStack/AvatarStack.styles.js.map +1 -1
- 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/Calendar/Calendar.styles.js +9 -9
- package/dist/Card/Card.styles.js +1 -1
- package/dist/Checkbox/Checkbox.js +9 -2
- 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.styles.js +6 -6
- package/dist/DetailPage/DetailPage.js +1 -0
- package/dist/DetailPage/DetailPage.js.map +1 -1
- 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.js +6 -6
- package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
- package/dist/FileToken/FileToken.styles.js +6 -6
- 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.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.styles.js +13 -13
- package/dist/MultiSelect/MultiSelect.styles.js +8 -8
- package/dist/NextMenu/NextMenu.styles.js +3 -3
- package/dist/NextTile/NextTile.styles.js +5 -5
- package/dist/Notation/Notation.js +1 -1
- package/dist/NumberInput/NumberInput.js +48 -31
- package/dist/NumberInput/NumberInput.js.map +1 -1
- package/dist/NumberInput/NumberInput.styles.js +7 -7
- package/dist/NumberInput/NumberInput.types.d.ts +14 -0
- package/dist/NumberInput/NumberInput.types.js.map +1 -1
- package/dist/NumberInput/NumberInput.utils.d.ts +1 -0
- package/dist/NumberInput/NumberInput.utils.js +6 -0
- package/dist/NumberInput/NumberInput.utils.js.map +1 -1
- package/dist/Overlay/OverlayArrow.styles.js +1 -1
- package/dist/OverlayTrigger/OverlayTrigger.d.ts +1 -0
- package/dist/OverlayTrigger/OverlayTrigger.js +10 -6
- package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
- package/dist/OverlayTrigger/index.d.ts +1 -1
- package/dist/OverlayTrigger/index.js +1 -1
- package/dist/OverlayTrigger/index.js.map +1 -1
- package/dist/PageLayout/PageLayout.d.ts +4 -3
- package/dist/PageLayout/PageLayout.js +26 -8
- package/dist/PageLayout/PageLayout.js.map +1 -1
- package/dist/PageLayout/PageLayout.styles.d.ts +6 -1
- package/dist/PageLayout/PageLayout.styles.js +30 -21
- package/dist/PageLayout/PageLayout.styles.js.map +1 -1
- package/dist/PageLayout/PageLayout.types.d.ts +19 -0
- package/dist/PageLayout/PageLayout.types.js.map +1 -1
- package/dist/PageLayout/index.d.ts +1 -1
- package/dist/PageLayout/index.js.map +1 -1
- 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.d.ts +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.js +2 -5
- package/dist/Search/Search.js.map +1 -1
- 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.styles.js +8 -8
- package/dist/Semantic/Semantic.styles.js +9 -9
- package/dist/SettingsPage/SettingsPage.d.ts +1 -1
- package/dist/SettingsPage/SettingsPage.js +1 -0
- package/dist/SettingsPage/SettingsPage.js.map +1 -1
- 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.presets.styles.js +1 -1
- package/dist/SuperSelect/SuperSelect.styles.js +40 -40
- package/dist/Switch/Switch.styles.js +4 -4
- package/dist/Table/Table.styles.js +29 -29
- package/dist/TableShelf/TableShelf.styles.js +5 -5
- package/dist/Tabs/Tabs.styles.js +16 -16
- 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 +1 -0
- package/dist/Thumbnail/Thumbnail.styles.js +21 -21
- package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
- 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.js +15 -6
- package/dist/Toast/Toast.js.map +1 -1
- package/dist/Toast/Toast.styles.js +5 -5
- package/dist/Toast/Toast.styles.js.map +1 -1
- package/dist/ToggleButton/ToggleButton.styles.js +1 -1
- package/dist/Token/Token.styles.js +5 -5
- package/dist/ToolHeader/ToolHeader.styles.js +6 -6
- package/dist/ToolLandingPage/ToolLandingPage.js +1 -0
- package/dist/ToolLandingPage/ToolLandingPage.js.map +1 -1
- package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
- 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 +8 -6
- package/dist/Typeahead/Typeahead.js.map +1 -1
- package/dist/Typeahead/Typeahead.styles.d.ts +4 -1
- package/dist/Typeahead/Typeahead.styles.js +15 -10
- package/dist/Typeahead/Typeahead.styles.js.map +1 -1
- package/dist/Typography/Typography.styles.js +1 -1
- package/dist/Typography/Typography.table.story.js +2 -2
- package/dist/_hooks/I18n.d.ts +4 -0
- package/dist/_locales/en.json +3 -1
- package/dist/_locales/pseudo.json +3 -1
- package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
- package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
- package/dist/_styles/colors.js +4 -1
- package/dist/_styles/colors.js.map +1 -1
- package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +4 -4
- 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 +68 -68
- package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
- package/dist/_typedoc/Button/Button.types.json +14 -14
- 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 +14 -14
- package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
- package/dist/_typedoc/Dropdown/Dropdown.types.json +38 -38
- 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 +18 -18
- 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 +842 -762
- 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 +33 -33
- package/dist/_typedoc/Notation/Notation.types.json +4 -4
- package/dist/_typedoc/NumberInput/NumberInput.types.json +88 -48
- package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +33 -33
- package/dist/_typedoc/PageLayout/PageLayout.types.json +140 -28
- package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
- package/dist/_typedoc/Panel/Panel.types.json +28 -28
- 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 +67 -67
- 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 +105 -105
- 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 +1 -1
- 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 +8 -8
- package/dist/_typedoc/Tooltip/Tooltip.types.json +15 -15
- package/dist/_typedoc/Tree/Tree.types.json +88 -88
- package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
- package/dist/_typedoc/Typography/Typography.types.json +9 -9
- package/dist/_typedoc/_utils/types.json +3 -3
- package/dist/_typedoc/a11y-tips.json +1 -1
- package/package.json +2 -2
|
@@ -32,15 +32,15 @@ var screenWidthPixelBreakpoints = {
|
|
|
32
32
|
};
|
|
33
33
|
export var StyledModal = /*#__PURE__*/styled.div.withConfig({
|
|
34
34
|
displayName: "StyledModal",
|
|
35
|
-
componentId: "core-
|
|
35
|
+
componentId: "core-12_49_0__sc-1ijdug2-0"
|
|
36
36
|
})(["display:flex;height:100vh;position:absolute;opacity:0;transition:0.3s opacity ease;width:100vw;z-index:0;pointer-events:none;&.", "{opacity:1;pointer-events:auto;}&.", "{opacity:0;pointer-events:none;}"], fadeInClassName, fadeOutClassName);
|
|
37
37
|
export var StyledModalButtons = /*#__PURE__*/styled.div.withConfig({
|
|
38
38
|
displayName: "StyledModalButtons",
|
|
39
|
-
componentId: "core-
|
|
39
|
+
componentId: "core-12_49_0__sc-1ijdug2-1"
|
|
40
40
|
})(["display:flex;flex:0 0 auto;margin-left:", "px;> * + *{margin-left:", "px;}"], spacing.lg, spacing.sm);
|
|
41
41
|
export var StyledModalContainer = /*#__PURE__*/styled(Card).withConfig({
|
|
42
42
|
displayName: "StyledModalContainer",
|
|
43
|
-
componentId: "core-
|
|
43
|
+
componentId: "core-12_49_0__sc-1ijdug2-2"
|
|
44
44
|
})(["display:flex;flex-direction:row;position:absolute;z-index:2;", " ", " ", ""], function (_ref) {
|
|
45
45
|
var $compact = _ref.$compact;
|
|
46
46
|
if (!$compact) {
|
|
@@ -64,11 +64,11 @@ export var StyledModalContainer = /*#__PURE__*/styled(Card).withConfig({
|
|
|
64
64
|
});
|
|
65
65
|
export var StyledModalFooter = /*#__PURE__*/styled.div.withConfig({
|
|
66
66
|
displayName: "StyledModalFooter",
|
|
67
|
-
componentId: "core-
|
|
67
|
+
componentId: "core-12_49_0__sc-1ijdug2-3"
|
|
68
68
|
})(["align-items:center;display:flex;flex:0 0 auto;flex-wrap:wrap;justify-content:flex-end;padding:", "px ", "px ", "px;"], spacing.xl, spacing.xxl, spacing.xxl);
|
|
69
69
|
export var StyledModalBody = /*#__PURE__*/styled.div.withConfig({
|
|
70
70
|
displayName: "StyledModalBody",
|
|
71
|
-
componentId: "core-
|
|
71
|
+
componentId: "core-12_49_0__sc-1ijdug2-4"
|
|
72
72
|
})(["", " &:focus-visible{", "}box-sizing:border-box;color:", ";display:flex;flex-direction:column;overflow:auto;", " ", " > ", "{padding-left:0;padding-right:0;&:first-child > ", "{padding-top:0;}}", ""], getTypographyIntent('body'), getFocusInset(), colors.gray15, function (_ref4) {
|
|
73
73
|
var $noSideSpacing = _ref4.$noSideSpacing;
|
|
74
74
|
return css(["padding:", "px ", "px;"], spacing.xl, $noSideSpacing ? 0 : spacing.xxl);
|
|
@@ -85,7 +85,7 @@ export var StyledModalBody = /*#__PURE__*/styled.div.withConfig({
|
|
|
85
85
|
});
|
|
86
86
|
export var StyledModalContent = /*#__PURE__*/styled.div.withConfig({
|
|
87
87
|
displayName: "StyledModalContent",
|
|
88
|
-
componentId: "core-
|
|
88
|
+
componentId: "core-12_49_0__sc-1ijdug2-5"
|
|
89
89
|
})(["display:flex;flex-direction:column;max-height:90vh;overflow:hidden;width:100%;", ""], function (_ref7) {
|
|
90
90
|
var _ref7$$compact = _ref7.$compact,
|
|
91
91
|
$compact = _ref7$$compact === void 0 ? false : _ref7$$compact;
|
|
@@ -96,11 +96,11 @@ export var StyledModalContent = /*#__PURE__*/styled.div.withConfig({
|
|
|
96
96
|
});
|
|
97
97
|
export var StyledModalFooterNotation = /*#__PURE__*/styled(Typography).withConfig({
|
|
98
98
|
displayName: "StyledModalFooterNotation",
|
|
99
|
-
componentId: "core-
|
|
99
|
+
componentId: "core-12_49_0__sc-1ijdug2-6"
|
|
100
100
|
})(["flex-grow:1;"]);
|
|
101
101
|
export var StyledModalHeader = /*#__PURE__*/styled.div.withConfig({
|
|
102
102
|
displayName: "StyledModalHeader",
|
|
103
|
-
componentId: "core-
|
|
103
|
+
componentId: "core-12_49_0__sc-1ijdug2-7"
|
|
104
104
|
})(["align-items:flex-start;color:", ";display:flex;flex:0 0 auto;position:relative;", " ", ""], colors.gray10, function (_ref8) {
|
|
105
105
|
var $compact = _ref8.$compact,
|
|
106
106
|
$isBodyScrolled = _ref8.$isBodyScrolled;
|
|
@@ -118,7 +118,7 @@ export var StyledModalHeader = /*#__PURE__*/styled.div.withConfig({
|
|
|
118
118
|
});
|
|
119
119
|
export var StyledModalHeading = /*#__PURE__*/styled.div.withConfig({
|
|
120
120
|
displayName: "StyledModalHeading",
|
|
121
|
-
componentId: "core-
|
|
121
|
+
componentId: "core-12_49_0__sc-1ijdug2-8"
|
|
122
122
|
})(["", " align-items:center;display:flex;flex:1 1 auto;min-height:36px;padding-right:", "px;", ""], function (_ref0) {
|
|
123
123
|
var $compact = _ref0.$compact;
|
|
124
124
|
return getTypographyIntent($compact ? 'h3' : 'h2');
|
|
@@ -134,18 +134,18 @@ export var StyledModalHeading = /*#__PURE__*/styled.div.withConfig({
|
|
|
134
134
|
});
|
|
135
135
|
export var StyledModalCancel = /*#__PURE__*/styled.div.withConfig({
|
|
136
136
|
displayName: "StyledModalCancel",
|
|
137
|
-
componentId: "core-
|
|
137
|
+
componentId: "core-12_49_0__sc-1ijdug2-9"
|
|
138
138
|
})(["flex:0 0 auto;"]);
|
|
139
139
|
export var StyledModalScrim = /*#__PURE__*/styled.div.withConfig({
|
|
140
140
|
displayName: "StyledModalScrim",
|
|
141
|
-
componentId: "core-
|
|
141
|
+
componentId: "core-12_49_0__sc-1ijdug2-10"
|
|
142
142
|
})(["background:hsla(200,8%,10%,0.6);height:100vh;left:0;position:absolute;top:0;width:100vw;z-index:1;"]);
|
|
143
143
|
export var StyledModalWarningIcon = /*#__PURE__*/styled(Warning).withConfig({
|
|
144
144
|
displayName: "StyledModalWarningIcon",
|
|
145
|
-
componentId: "core-
|
|
145
|
+
componentId: "core-12_49_0__sc-1ijdug2-11"
|
|
146
146
|
})(["color:", ";margin-right:", "px;"], colors.yellow40, spacing.sm);
|
|
147
147
|
export var StyledModalFooterSummary = /*#__PURE__*/styled.div.withConfig({
|
|
148
148
|
displayName: "StyledModalFooterSummary",
|
|
149
|
-
componentId: "core-
|
|
149
|
+
componentId: "core-12_49_0__sc-1ijdug2-12"
|
|
150
150
|
})(["", " border-top:1px solid ", ";border-bottom:1px solid ", ";padding:", "px ", "px;color:", ";font-style:italic;background-color:", ";margin:-", "px -", "px ", "px -", "px;flex:1 1 100%;"], getTypographyIntent('small'), colors.gray85, colors.gray85, spacing.md, spacing.xxl, colors.gray15, colors.gray98, spacing.xl, spacing.xxl, spacing.xl, spacing.xxl);
|
|
151
151
|
//# sourceMappingURL=Modal.styles.js.map
|
|
@@ -8,34 +8,34 @@ import { getFocus } from '../_styles/mixins';
|
|
|
8
8
|
import { spacing } from '../_styles/spacing';
|
|
9
9
|
export var StyledMultiSelectInner = /*#__PURE__*/styled.div.withConfig({
|
|
10
10
|
displayName: "StyledMultiSelectInner",
|
|
11
|
-
componentId: "core-
|
|
11
|
+
componentId: "core-12_49_0__sc-s9ym9q-0"
|
|
12
12
|
})(["display:flex;flex-wrap:wrap;margin-bottom:2px;margin-left:", "px;margin-right:", "px;margin-top:2px;min-width:0;width:100%;"], spacing.md, spacing.xs);
|
|
13
13
|
export var StyledMultiSelectValues = /*#__PURE__*/styled.div.withConfig({
|
|
14
14
|
displayName: "StyledMultiSelectValues",
|
|
15
|
-
componentId: "core-
|
|
15
|
+
componentId: "core-12_49_0__sc-s9ym9q-1"
|
|
16
16
|
})(["display:contents;"]);
|
|
17
17
|
export var StyledMultiSelectToken = /*#__PURE__*/styled.div.withConfig({
|
|
18
18
|
displayName: "StyledMultiSelectToken",
|
|
19
|
-
componentId: "core-
|
|
19
|
+
componentId: "core-12_49_0__sc-s9ym9q-2"
|
|
20
20
|
})(["margin-bottom:2px;margin-right:", "px;margin-top:2px;flex:0 1 auto;> div{max-width:178px;width:100%;}"], spacing.xs);
|
|
21
21
|
export var StyledMultiSelectSearchInput = /*#__PURE__*/styled.input.withConfig({
|
|
22
22
|
displayName: "StyledMultiSelectSearchInput",
|
|
23
|
-
componentId: "core-
|
|
23
|
+
componentId: "core-12_49_0__sc-s9ym9q-3"
|
|
24
24
|
})(["background-color:transparent;border-width:0;font-family:inherit;padding:0;height:24px;width:100%;", " ", " &::-ms-clear{display:none;}&:focus{box-shadow:none;outline:none;}&::placeholder{color:", ";}"], getTypographyIntent('body'), function (_ref) {
|
|
25
25
|
var $isNavigatingTokens = _ref.$isNavigatingTokens;
|
|
26
26
|
return $isNavigatingTokens && css(["color:transparent;"]);
|
|
27
27
|
}, colors.gray45);
|
|
28
28
|
export var StyledMultiSelectSearch = /*#__PURE__*/styled.div.withConfig({
|
|
29
29
|
displayName: "StyledMultiSelectSearch",
|
|
30
|
-
componentId: "core-
|
|
30
|
+
componentId: "core-12_49_0__sc-s9ym9q-4"
|
|
31
31
|
})(["margin-bottom:2px;margin-right:", "px;margin-top:2px;flex:1;max-width:100%;min-width:24px;"], spacing.xs);
|
|
32
32
|
export var StyledMultiSelectSearchIcon = /*#__PURE__*/styled.div.withConfig({
|
|
33
33
|
displayName: "StyledMultiSelectSearchIcon",
|
|
34
|
-
componentId: "core-
|
|
34
|
+
componentId: "core-12_49_0__sc-s9ym9q-5"
|
|
35
35
|
})(["align-items:center;align-self:flex-start;display:flex;height:34px;justify-content:flex-end;margin-left:", "px;margin-right:", "px;min-width:40px;width:40px;"], spacing.xs, spacing.md);
|
|
36
36
|
export var StyledMultiSelectClearIcon = /*#__PURE__*/styled(Button).withConfig({
|
|
37
37
|
displayName: "StyledMultiSelectClearIcon",
|
|
38
|
-
componentId: "core-
|
|
38
|
+
componentId: "core-12_49_0__sc-s9ym9q-6"
|
|
39
39
|
})(["", " ", "{pointer-events:none;}"], function (_ref2) {
|
|
40
40
|
var $show = _ref2.$show;
|
|
41
41
|
return css(["opacity:", ";"], $show ? 1 : 0);
|
|
@@ -45,7 +45,7 @@ export var StyledMultiSelectArrow = StyledSelectArrow;
|
|
|
45
45
|
export var StyledMultiSelectMenu = StyledSelectMenu;
|
|
46
46
|
export var StyledMultiSelectButton = /*#__PURE__*/styled(StyledSelectButton).withConfig({
|
|
47
47
|
displayName: "StyledMultiSelectButton",
|
|
48
|
-
componentId: "core-
|
|
48
|
+
componentId: "core-12_49_0__sc-s9ym9q-7"
|
|
49
49
|
})(["height:auto;padding:0;white-space:normal;&:focus-within{", "}", ""], getFocus(), function (_ref3) {
|
|
50
50
|
var $emptyValue = _ref3.$emptyValue;
|
|
51
51
|
return $emptyValue && css(["", "{cursor:pointer;}"], StyledMultiSelectSearchInput);
|
|
@@ -6,14 +6,14 @@ export var optionMinHeight = 32;
|
|
|
6
6
|
export var defaultMenuHeight = 64;
|
|
7
7
|
export var StyledOptions = /*#__PURE__*/styled.div.withConfig({
|
|
8
8
|
displayName: "StyledOptions",
|
|
9
|
-
componentId: "core-
|
|
9
|
+
componentId: "core-12_49_0__sc-3o6zya-0"
|
|
10
10
|
})([""]);
|
|
11
11
|
export var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
|
12
12
|
displayName: "StyledItem",
|
|
13
|
-
componentId: "core-
|
|
13
|
+
componentId: "core-12_49_0__sc-3o6zya-1"
|
|
14
14
|
})(["", ";padding:", "px ", "px;cursor:pointer;list-style-type:none;"], getTypographyIntent('body'), spacing.xs, spacing.md);
|
|
15
15
|
export var StyledGroup = /*#__PURE__*/styled.div.withConfig({
|
|
16
16
|
displayName: "StyledGroup",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-12_49_0__sc-3o6zya-2"
|
|
18
18
|
})(["", ";padding:", "px ", "px ", "px;font-weight:", ";background:white;list-style-type:none;"], getTypographyIntent('body'), spacing.md, spacing.md, spacing.xs, typographyWeights.semibold);
|
|
19
19
|
//# sourceMappingURL=NextMenu.styles.js.map
|
|
@@ -75,26 +75,26 @@ function selectableTileFocusWithinOutlineCss() {
|
|
|
75
75
|
}
|
|
76
76
|
export var StyledNextTileInertContent = /*#__PURE__*/styled.div.withConfig({
|
|
77
77
|
displayName: "StyledNextTileInertContent",
|
|
78
|
-
componentId: "core-
|
|
78
|
+
componentId: "core-12_49_0__sc-17bbrfw-0"
|
|
79
79
|
})(["display:contents;color:", ";& *{color:inherit;}"], disabledText);
|
|
80
80
|
export var StyledNextTileFocusTarget = /*#__PURE__*/styled.div.withConfig({
|
|
81
81
|
displayName: "StyledNextTileFocusTarget",
|
|
82
|
-
componentId: "core-
|
|
82
|
+
componentId: "core-12_49_0__sc-17bbrfw-1"
|
|
83
83
|
})(["border-radius:inherit;min-height:0;outline:none;"]);
|
|
84
84
|
export var StyledNextInteractableTile = /*#__PURE__*/styled(StyledInteractableTile).withConfig({
|
|
85
85
|
displayName: "StyledNextInteractableTile",
|
|
86
|
-
componentId: "core-
|
|
86
|
+
componentId: "core-12_49_0__sc-17bbrfw-2"
|
|
87
87
|
})(["border:", ";position:relative;", ""], nextTileNeutralBorder, function (_ref5) {
|
|
88
88
|
var $disabled = _ref5.$disabled;
|
|
89
89
|
return $disabled && css(["&&{border-color:", ";cursor:not-allowed;pointer-events:none;}&&:focus{border:1px solid ", ";box-shadow:none;outline:none;}", ""], colors.gray85, colors.gray85, disabledInteractableStyles);
|
|
90
90
|
});
|
|
91
91
|
export var StyledNextLinkTile = /*#__PURE__*/styled(StyledLinkTile).withConfig({
|
|
92
92
|
displayName: "StyledNextLinkTile",
|
|
93
|
-
componentId: "core-
|
|
93
|
+
componentId: "core-12_49_0__sc-17bbrfw-3"
|
|
94
94
|
})(["border:", ";position:relative;", ""], nextTileNeutralBorder, nextTileLinkLikeFocusStyles);
|
|
95
95
|
export var StyledNextSelectableTile = /*#__PURE__*/styled(StyledSelectableTile).withConfig({
|
|
96
96
|
displayName: "StyledNextSelectableTile",
|
|
97
|
-
componentId: "core-
|
|
97
|
+
componentId: "core-12_49_0__sc-17bbrfw-4"
|
|
98
98
|
})(["position:relative;", " ", " ", " ", " ", " &:focus{", " outline:none;}", " ", ""], function (p) {
|
|
99
99
|
return nextTileSelectableBorderStyles(p);
|
|
100
100
|
}, function (_ref6) {
|
|
@@ -14,7 +14,7 @@ var variantColorMap = {
|
|
|
14
14
|
};
|
|
15
15
|
var StyledNotation = /*#__PURE__*/styled.i.withConfig({
|
|
16
16
|
displayName: "StyledNotation",
|
|
17
|
-
componentId: "core-
|
|
17
|
+
componentId: "core-12_49_0__sc-160q1m6-0"
|
|
18
18
|
})(["", " color:", ";font-style:italic;"], getTypographyIntent('small'), function (_ref) {
|
|
19
19
|
var $variant = _ref.$variant;
|
|
20
20
|
return $variant ? colors[variantColorMap[$variant]] : colors.gray15;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["aria-label", "aria-labelledby", "decimalScale", "defaultValue", "disabled", "error", "fillDecimalScale", "onChange", "onKeyDown", "onBlur", "prefix", "readOnly", "step", "style", "suffix", "value", "qa"],
|
|
2
|
+
var _excluded = ["aria-label", "aria-labelledby", "decimalScale", "defaultValue", "disabled", "error", "fillDecimalScale", "max", "min", "onChange", "onKeyDown", "onBlur", "prefix", "readOnly", "step", "style", "suffix", "value", "qa"],
|
|
3
3
|
_excluded2 = ["currencyDisplay", "currencyIsoCode", "decimalScale", "fillDecimalScale", "prefix", "suffix"];
|
|
4
4
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -24,7 +24,7 @@ import { mergeRefs } from '../_utils/mergeRefs';
|
|
|
24
24
|
import { defaultCurrencyFillDecimalScale, defaultCurrencyInputPrefix } from './NumberInput.constants';
|
|
25
25
|
import { useNumberFormat, useNumberInputLabel, usePrevious } from './NumberInput.hooks';
|
|
26
26
|
import { addonRootFontFamily, addonRootFontSize, addonRootPadding, inputDefaultXPadding, StyledIncrementerButton, StyledIncrementerWrapper, StyledInput, StyledPrefix, StyledSuffix, StyledWrapper } from './NumberInput.styles';
|
|
27
|
-
import { backspaceKey, commaKey, controlKey, copyKey, defaultLocale, deleteKey, emptyString, format, getNewCursorPosition, getSeparators, highlightAllKey, identicalLocales, identifyPressedKey, maxDigitLength, metaKeyIdentifier, minus, numericKeypadKey, periodKey, prepareValueToFormatting, toFixed, unformat } from './NumberInput.utils';
|
|
27
|
+
import { backspaceKey, clamp, commaKey, controlKey, copyKey, defaultLocale, deleteKey, emptyString, format, getNewCursorPosition, getSeparators, highlightAllKey, identicalLocales, identifyPressedKey, maxDigitLength, metaKeyIdentifier, minus, numericKeypadKey, periodKey, prepareValueToFormatting, toFixed, unformat } from './NumberInput.utils';
|
|
28
28
|
function noop() {}
|
|
29
29
|
var PlusIcon = function PlusIcon() {
|
|
30
30
|
return /*#__PURE__*/React.createElement("svg", {
|
|
@@ -73,6 +73,8 @@ export var NumberInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
73
73
|
error = _ref$error === void 0 ? false : _ref$error,
|
|
74
74
|
_ref$fillDecimalScale = _ref.fillDecimalScale,
|
|
75
75
|
fillDecimalScale = _ref$fillDecimalScale === void 0 ? 'none' : _ref$fillDecimalScale,
|
|
76
|
+
max = _ref.max,
|
|
77
|
+
min = _ref.min,
|
|
76
78
|
_onChange = _ref.onChange,
|
|
77
79
|
_ref$onKeyDown = _ref.onKeyDown,
|
|
78
80
|
_onKeyDown = _ref$onKeyDown === void 0 ? noop : _ref$onKeyDown,
|
|
@@ -272,8 +274,11 @@ export var NumberInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
272
274
|
var diff = toFixed(step, stepPrecision) * (down ? -1 : 1);
|
|
273
275
|
var precision = Math.max(stepPrecision, fixedDecimalScale ? verifiedDecimalScale : prevValuePrecision);
|
|
274
276
|
var significantPrecision = Math.max(prevValueSignificantPrecision, stepPrecision);
|
|
275
|
-
var
|
|
276
|
-
var
|
|
277
|
+
var calculatedNumber = inputValue ? (parsedNumber || 0) + diff : diff;
|
|
278
|
+
var clampedNumber = clamp(calculatedNumber, min, max);
|
|
279
|
+
var wasClamped = clampedNumber !== calculatedNumber;
|
|
280
|
+
var calculated = inputValue ? clampedNumber.toFixed(significantPrecision) : clampedNumber;
|
|
281
|
+
var _getValueLengthInfo = getValueLengthInfo(wasClamped ? clampedNumber : calculated, true),
|
|
277
282
|
isSafeLength = _getValueLengthInfo.isSafeLength,
|
|
278
283
|
isSafeIntegerLength = _getValueLengthInfo.isSafeIntegerLength;
|
|
279
284
|
var rejectStepByLengthLimit = !isSafeLength || !isSafeIntegerLength;
|
|
@@ -281,7 +286,7 @@ export var NumberInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
281
286
|
console.warn("WARNING: Incrementer's step was not fulfilled since result oversteps input ".concat(maxDigitLength, "-digit limit and can't be presented without a loss of precision."));
|
|
282
287
|
return;
|
|
283
288
|
}
|
|
284
|
-
var formatted = format(locale, precision, 'always', calculated, true);
|
|
289
|
+
var formatted = wasClamped ? formatValue(clampedNumber) : format(locale, precision, 'always', calculated, true);
|
|
285
290
|
setInputValue(formatted);
|
|
286
291
|
externalOnChange(formatted);
|
|
287
292
|
};
|
|
@@ -369,33 +374,45 @@ export var NumberInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
369
374
|
var isDecimalSeparatorRedundant = verifiedDecimalScale > 0 && inputValue[inputValue.length - 1] === decimal && !fillDecimalScaleOnBlur;
|
|
370
375
|
var isDecimalScaleNotFilled = verifiedDecimalScale - fraction.length > 0;
|
|
371
376
|
var shouldDecimalScaleBeFilled = fillDecimalScaleOnBlur && isDecimalScaleNotFilled;
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
377
|
+
var getBaseValue = function getBaseValue() {
|
|
378
|
+
if (shouldValueBeCleared) {
|
|
379
|
+
return emptyString;
|
|
380
|
+
}
|
|
381
|
+
if (shouldIntegerPartBeFilled) {
|
|
382
|
+
var numberOfZerosToPad = verifiedDecimalScale - fraction.length;
|
|
383
|
+
return "".concat(integer, "0").concat(decimal).concat(shouldDecimalScaleBeFilled ? fraction.concat(Array.from({
|
|
384
|
+
length: numberOfZerosToPad
|
|
385
|
+
}, function (_) {
|
|
386
|
+
return '0';
|
|
387
|
+
}).join(emptyString)) : fraction);
|
|
388
|
+
}
|
|
389
|
+
if (isDecimalSeparatorRedundant) {
|
|
390
|
+
return inputValue.replace(new RegExp("[".concat(decimal, "]"), 'g'), emptyString);
|
|
391
|
+
}
|
|
392
|
+
if (shouldDecimalScaleBeFilled) {
|
|
393
|
+
return format(locale, verifiedDecimalScale, 'always', inputValue);
|
|
394
|
+
}
|
|
395
|
+
return inputValue;
|
|
396
|
+
};
|
|
397
|
+
var baseValue = getBaseValue();
|
|
398
|
+
var hasBounds = typeof min === 'number' || typeof max === 'number';
|
|
399
|
+
var _unformat5 = unformat(locale, baseValue),
|
|
400
|
+
baseParsed = _unformat5.parsedNumber;
|
|
401
|
+
var clampedParsed = clamp(baseParsed, min, max);
|
|
402
|
+
var needsClamp = hasBounds && Number.isFinite(baseParsed) && clampedParsed !== baseParsed;
|
|
403
|
+
var clampFillScale = fixedDecimalScale || fillDecimalScaleOnBlur ? 'always' : 'none';
|
|
404
|
+
var finalValue = needsClamp ? format(locale, verifiedDecimalScale, clampFillScale, clampedParsed, true) : baseValue;
|
|
405
|
+
if (finalValue !== inputValue) {
|
|
406
|
+
setInputValue(finalValue);
|
|
407
|
+
externalOnChange(finalValue);
|
|
396
408
|
}
|
|
397
409
|
_onBlur(e);
|
|
398
410
|
};
|
|
411
|
+
var _unformat6 = unformat(locale, inputValue),
|
|
412
|
+
currentParsedNumber = _unformat6.parsedNumber;
|
|
413
|
+
var hasFiniteValue = Number.isFinite(currentParsedNumber);
|
|
414
|
+
var isAtMax = hasFiniteValue && Number.isFinite(max) && currentParsedNumber >= max;
|
|
415
|
+
var isAtMin = hasFiniteValue && Number.isFinite(min) && currentParsedNumber <= min;
|
|
399
416
|
return /*#__PURE__*/React.createElement(StyledWrapper, {
|
|
400
417
|
$hasIncrementer: hasIncrementer,
|
|
401
418
|
"data-qa": qa === null || qa === void 0 ? void 0 : qa.wrapper
|
|
@@ -427,7 +444,7 @@ export var NumberInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
427
444
|
}, suffixProps), suffix), hasIncrementer && /*#__PURE__*/React.createElement(StyledIncrementerWrapper, null, /*#__PURE__*/React.createElement(StyledIncrementerButton, {
|
|
428
445
|
"aria-hidden": "true",
|
|
429
446
|
type: "button",
|
|
430
|
-
disabled: disabled,
|
|
447
|
+
disabled: disabled || isAtMax,
|
|
431
448
|
tabIndex: -1,
|
|
432
449
|
"data-qa": qa === null || qa === void 0 ? void 0 : qa.increment,
|
|
433
450
|
onClick: function onClick() {
|
|
@@ -436,7 +453,7 @@ export var NumberInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
436
453
|
}, /*#__PURE__*/React.createElement(PlusIcon, null)), /*#__PURE__*/React.createElement(StyledIncrementerButton, {
|
|
437
454
|
"aria-hidden": "true",
|
|
438
455
|
type: "button",
|
|
439
|
-
disabled: disabled,
|
|
456
|
+
disabled: disabled || isAtMin,
|
|
440
457
|
tabIndex: -1,
|
|
441
458
|
"data-qa": qa === null || qa === void 0 ? void 0 : qa.decrement,
|
|
442
459
|
onClick: function onClick() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.js","names":["formatCurrencyToParts","findIndex","React","useI18nContext","spacing","mergeRefs","defaultCurrencyFillDecimalScale","defaultCurrencyInputPrefix","useNumberFormat","useNumberInputLabel","usePrevious","addonRootFontFamily","addonRootFontSize","addonRootPadding","inputDefaultXPadding","StyledIncrementerButton","StyledIncrementerWrapper","StyledInput","StyledPrefix","StyledSuffix","StyledWrapper","backspaceKey","commaKey","controlKey","copyKey","defaultLocale","deleteKey","emptyString","format","getNewCursorPosition","getSeparators","highlightAllKey","identicalLocales","identifyPressedKey","maxDigitLength","metaKeyIdentifier","minus","numericKeypadKey","periodKey","prepareValueToFormatting","toFixed","unformat","noop","PlusIcon","createElement","width","height","viewBox","xmlns","d","MinusIcon","NumberInput","forwardRef","_ref","ref","ariaLabel","ariaLabelledBy","_ref$decimalScale","decimalScale","defaultValue","_ref$disabled","disabled","_ref$error","error","_ref$fillDecimalScale","fillDecimalScale","_onChange","onChange","_ref$onKeyDown","onKeyDown","_onKeyDown","_ref$onBlur","onBlur","_onBlur","_ref$prefix","prefix","readOnly","_ref$step","step","style","_ref$suffix","suffix","value","qa","props","_objectWithoutProperties","_excluded","I18n","contextLocale","locale","inputRef","useRef","_useNumberFormat","verifiedDecimalScale","fillDecimalScaleOnBlur","fixedDecimalScale","formatValue","getValueLengthInfo","_useNumberInputLabel","id","name","inputProps","prefixProps","suffixProps","isControlled","undefined","isControlledWithoutOnChangeHandlerAndReadOnlyAttribute","hasIncrementer","_React$useMemo","useMemo","group","decimal","decimalSeparatorKey","inputPadding","fontContext","concat","element","document","context","getContext","font","extraBasePadding","suffixPadding","Math","ceil","measureText","getRightPadding","xl","left","right","getValueChange","useCallback","_unformat","parsedNumber","isNaN","externalOnChange","_React$useState","useState","_React$useState2","_slicedToArray","inputValue","setInputValue","_React$useState3","_React$useState4","prevValue","setPrevValue","_React$useState5","selectionStart","selectionEnd","selection","_React$useState6","prevCursorPosition","setPrevCursorPosition","_React$useState7","_React$useState8","pressedKey","setPressedKey","prevLocale","useLayoutEffect","formattedValue","console","useEffect","prev","newValue","_inputRef$current","displayValue","current","lastChar","length","lastCharIsPending","includes","decimals","split","lastDecimalIsZero","onlyMinusDisplayed","getNewValueAndCursorPosition","preparedValue","newCursorPosition","adjustCursor","newPosition","_inputRef$current2","setSelectionRange","setTimeout","_inputRef$current3","makeStep","down","arguments","getSignificantPrecision","fraction","reversedFraction","reverse","indexOfLastSignificantFractionDigit","i","slice","_unformat2","_unformat3","stepFraction","prevValuePrecision","prevValueSignificantPrecision","rawStepPrecision","rawStepPrecisionExceedsDecimalScale","stepPrecision","warn","diff","precision","max","significantPrecision","calculated","_getValueLengthInfo","isSafeLength","isSafeIntegerLength","rejectStepByLengthLimit","formatted","internalOnKeyDown","e","ctrlKey","metaKey","key","_e$target","target","preserveDecimalSeparator","decimalBackspaced","decimalDeleted","nonReplacingKeys","decimalReplacedAsSelection","preserveDecimal","base","shift","cursorPosition","preventDefault","isDecimalSeparatorPreserved","_getValueLengthInfo2","safeIntegerLength","integerLength","fractionLength","decimalSeparatorCanNotBeRemoved","handleIncrementer","internalOnChange","inputType","nativeEvent","_getNewValueAndCursor","internalOnBlur","_unformat4","integer","shouldValueBeCleared","shouldIntegerPartBeFilled","isDecimalSeparatorRedundant","isDecimalScaleNotFilled","shouldDecimalScaleBeFilled","getNewValue","numberOfZerosToPad","Array","from","_","join","replace","RegExp","$hasIncrementer","wrapper","_extends","inputMode","lang","_objectSpread","paddingLeft","paddingRight","$withIncrementer","type","tabIndex","increment","onClick","decrement","displayName","getCurrencyProps","_decimalScale","symbol","currencyIsoCode","currencyDisplay","_parts$find","_parts$find2","currencyOptions","parts","formatterDecimalScale","find","part","placement","object","currencyIsoSymbol","toString","currencyProps","CurrencyInput","_ref2","_ref2$fillDecimalScal","_ref2$prefix","_excluded2"],"sources":["../../src/NumberInput/NumberInput.tsx"],"sourcesContent":["import type {\n CurrencyDisplay,\n CurrencyOptions,\n} from '@procore/globalization-toolkit'\nimport { formatCurrencyToParts } from '@procore/globalization-toolkit'\nimport { findIndex } from 'ramda'\nimport React from 'react'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { spacing } from '../_styles/spacing'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport {\n defaultCurrencyFillDecimalScale,\n defaultCurrencyInputPrefix,\n} from './NumberInput.constants'\nimport {\n useNumberFormat,\n useNumberInputLabel,\n usePrevious,\n} from './NumberInput.hooks'\nimport {\n addonRootFontFamily,\n addonRootFontSize,\n addonRootPadding,\n inputDefaultXPadding,\n StyledIncrementerButton,\n StyledIncrementerWrapper,\n StyledInput,\n StyledPrefix,\n StyledSuffix,\n StyledWrapper,\n} from './NumberInput.styles'\nimport type {\n CurrencyInputProps,\n CurrencyProps,\n CursorPosition,\n NumberInputProps,\n PressedKey,\n} from './NumberInput.types'\nimport {\n backspaceKey,\n commaKey,\n controlKey,\n copyKey,\n defaultLocale,\n deleteKey,\n emptyString,\n format,\n getNewCursorPosition,\n getSeparators,\n highlightAllKey,\n identicalLocales,\n identifyPressedKey,\n maxDigitLength,\n metaKeyIdentifier,\n minus,\n numericKeypadKey,\n periodKey,\n prepareValueToFormatting,\n toFixed,\n unformat,\n} from './NumberInput.utils'\n\nfunction noop() {}\n\nconst PlusIcon = () => (\n <svg\n width=\"8\"\n height=\"8\"\n viewBox=\"0 0 8 8\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M4.5 0H3.5V3.5H0V4.5H3.5V8H4.5V4.5H8V3.5H4.5V0Z\" />\n </svg>\n)\n\nconst MinusIcon = () => (\n <svg\n width=\"8\"\n height=\"2\"\n viewBox=\"0 0 8 2\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M4.5 0.5H3.5H0V1.5H3.5H4.5H8V0.5H4.5Z\" />\n </svg>\n)\n\n/**\n\n The number input allows users to add numbers to a given form or table.\n The currency input will be used for data with a monetary value.\n Both components allow characters 0-9, periods, and commas. In order to avoid\n the loss of precision, the number length is limited by 15 digits.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-numberinput--demo-number-input)\n\n @see [Design Guidelines](https://design.procore.com/number-and-currency-input)\n\n */\nexport const NumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n decimalScale = true,\n defaultValue,\n disabled = false,\n error = false,\n fillDecimalScale = 'none',\n onChange: _onChange,\n onKeyDown: _onKeyDown = noop,\n onBlur: _onBlur = noop,\n prefix = emptyString,\n readOnly,\n step = 0,\n style,\n suffix = emptyString,\n value,\n qa,\n ...props\n },\n ref\n ) => {\n const I18n = useI18nContext()\n const contextLocale = I18n.locale || defaultLocale\n const inputRef = React.useRef<HTMLInputElement>(null)\n\n const {\n decimalScale: verifiedDecimalScale,\n fillDecimalScaleOnBlur,\n fixedDecimalScale,\n formatValue,\n getValueLengthInfo,\n locale,\n } = useNumberFormat({\n decimalScale,\n fillDecimalScale,\n locale: contextLocale,\n })\n\n const { inputProps, prefixProps, suffixProps } = useNumberInputLabel({\n ariaLabel,\n ariaLabelledBy,\n id: props.id,\n name: props.name,\n prefix,\n suffix,\n })\n\n const isControlled = value !== undefined\n const isControlledWithoutOnChangeHandlerAndReadOnlyAttribute =\n isControlled && !_onChange && !readOnly\n const hasIncrementer = step > 0 && !readOnly\n\n const { group, decimal } = React.useMemo(\n () => getSeparators(locale),\n [locale]\n )\n const decimalSeparatorKey = React.useMemo(() => {\n return decimal === periodKey ? periodKey : commaKey\n }, [decimal])\n\n const inputPadding = React.useMemo((): {\n left: number\n right: number | null\n } => {\n const fontContext = `${addonRootFontSize} \"${addonRootFontFamily}\"`\n\n if (prefix || suffix) {\n const element = document.createElement('canvas')\n const context = element?.getContext('2d')\n\n if (context) {\n context.font = fontContext\n\n const extraBasePadding = inputDefaultXPadding + addonRootPadding\n\n const suffixPadding =\n extraBasePadding + Math.ceil(context.measureText(suffix).width)\n\n const getRightPadding = () => {\n if (hasIncrementer && suffix) {\n return suffixPadding + spacing.xl\n }\n if (suffix) {\n return suffixPadding\n }\n return null\n }\n\n return {\n left: prefix\n ? extraBasePadding + Math.ceil(context.measureText(prefix).width)\n : inputDefaultXPadding,\n right: getRightPadding(),\n }\n }\n }\n\n return {\n left: inputDefaultXPadding,\n right: null,\n }\n }, [prefix, suffix, hasIncrementer])\n\n const getValueChange = React.useCallback(\n (value: string) => {\n const { parsedNumber } = unformat(locale, value)\n return {\n value,\n parsedNumber: isNaN(parsedNumber) ? null : parsedNumber,\n }\n },\n [locale]\n )\n\n const externalOnChange = React.useCallback(\n (value: string) => _onChange && _onChange(getValueChange(value)),\n [_onChange, getValueChange]\n )\n\n const [inputValue, setInputValue] = React.useState(\n formatValue(defaultValue)\n )\n const [prevValue, setPrevValue] = React.useState(\n isControlled ? formatValue(value) : inputValue\n )\n const [prevCursorPosition, setPrevCursorPosition] =\n React.useState<CursorPosition>({\n selectionStart: 0,\n selectionEnd: 0,\n selection: emptyString,\n })\n const [pressedKey, setPressedKey] = React.useState()\n const prevLocale = usePrevious(locale)\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n React.useLayoutEffect(() => {\n const formattedValue = formatValue(value)\n if (isControlled && inputValue !== formattedValue) {\n setInputValue(formattedValue)\n }\n\n if (isControlledWithoutOnChangeHandlerAndReadOnlyAttribute) {\n console.error(\n `Warning: Failed prop type: You provided a \\`value\\` prop to a form field without an \\`onChange\\` handler.\n This will render a read-only field. If the field should be mutable use \\`defaultValue\\`.\n Otherwise, set either \\`onChange\\` or \\`readOnly\\`.`\n )\n }\n }, [value])\n\n React.useEffect(() => {\n if (prevLocale && !identicalLocales(prevLocale, locale)) {\n setInputValue((prev) => {\n const newValue = formatValue(unformat(prevLocale, prev).parsedNumber)\n externalOnChange(newValue)\n return newValue\n })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [prevLocale, formatValue])\n\n React.useLayoutEffect(() => {\n const displayValue = inputRef.current?.value || ''\n if (!_onChange || !displayValue) {\n return\n }\n const formattedValue = formatValue(value)\n\n if (displayValue !== formattedValue) {\n const lastChar = displayValue[displayValue.length - 1]\n const lastCharIsPending = [periodKey, commaKey].includes(lastChar)\n\n const decimals = displayValue.split(decimal)[1] || ''\n const lastDecimalIsZero =\n decimals && decimals[decimals.length - 1] === '0'\n\n const onlyMinusDisplayed = displayValue === minus\n\n // a client state and display mismatch is only valid when\n if (lastCharIsPending || lastDecimalIsZero || onlyMinusDisplayed) {\n return\n }\n\n // otherwise sync display with client state\n setInputValue(formattedValue)\n }\n })\n\n const getNewValueAndCursorPosition = (\n value: string,\n pressedKey: PressedKey\n ) => {\n const preparedValue = prepareValueToFormatting(\n decimal,\n decimalSeparatorKey,\n group,\n pressedKey,\n prevCursorPosition,\n prevValue,\n verifiedDecimalScale,\n value\n )\n const newValue = formatValue(preparedValue)\n\n return {\n newValue,\n newCursorPosition: getNewCursorPosition(\n decimal,\n decimalSeparatorKey,\n group,\n newValue,\n pressedKey,\n prevCursorPosition,\n prevValue,\n value,\n verifiedDecimalScale,\n locale,\n fillDecimalScale\n ),\n }\n }\n\n const adjustCursor = (newPosition: number) => {\n inputRef.current?.setSelectionRange(newPosition, newPosition)\n // Mobile Chrome adjustment\n setTimeout(\n () => inputRef.current?.setSelectionRange(newPosition, newPosition),\n 0\n )\n }\n\n const makeStep = (down = false) => {\n const getSignificantPrecision = (fraction: string) => {\n const reversedFraction = fraction.split(emptyString).reverse()\n const indexOfLastSignificantFractionDigit = findIndex(\n (i) => i !== '0',\n reversedFraction\n )\n\n return indexOfLastSignificantFractionDigit > -1\n ? reversedFraction.slice(indexOfLastSignificantFractionDigit).length\n : 0\n }\n\n const { parsedNumber, fraction } = unformat(locale, inputValue)\n const { fraction: stepFraction } = unformat(locale, step)\n\n const prevValuePrecision = fraction.length || 0\n const prevValueSignificantPrecision = getSignificantPrecision(fraction)\n const rawStepPrecision = stepFraction.length || 0\n const rawStepPrecisionExceedsDecimalScale =\n rawStepPrecision > verifiedDecimalScale\n const stepPrecision = rawStepPrecisionExceedsDecimalScale\n ? verifiedDecimalScale\n : rawStepPrecision\n\n if (rawStepPrecisionExceedsDecimalScale) {\n console.warn(\n `WARNING: Step's value was rounded since its scale (${rawStepPrecision}) exceeds the decimal scale (${verifiedDecimalScale}).`\n )\n }\n\n const diff = toFixed(step, stepPrecision) * (down ? -1 : 1)\n const precision = Math.max(\n stepPrecision,\n fixedDecimalScale ? verifiedDecimalScale : prevValuePrecision\n )\n const significantPrecision = Math.max(\n prevValueSignificantPrecision,\n stepPrecision\n )\n const calculated = inputValue\n ? ((parsedNumber || 0) + diff).toFixed(significantPrecision)\n : diff\n\n const { isSafeLength, isSafeIntegerLength } = getValueLengthInfo(\n calculated,\n true\n )\n\n const rejectStepByLengthLimit = !isSafeLength || !isSafeIntegerLength\n\n if (rejectStepByLengthLimit) {\n console.warn(\n `WARNING: Incrementer's step was not fulfilled since result oversteps input ${maxDigitLength}-digit limit and can't be presented without a loss of precision.`\n )\n return\n }\n\n const formatted = format(locale, precision, 'always', calculated, true)\n\n setInputValue(formatted)\n externalOnChange(formatted)\n }\n\n const internalOnKeyDown = (e: any) => {\n const {\n ctrlKey,\n metaKey,\n key,\n target: { value, selectionStart, selectionEnd },\n } = e\n\n const selection = value.slice(selectionStart, selectionEnd)\n\n setPressedKey(key)\n setPrevCursorPosition({\n selectionStart,\n selectionEnd,\n selection,\n })\n setPrevValue(value)\n\n const preserveDecimalSeparator = () => {\n const decimalBackspaced =\n !selection &&\n [backspaceKey].includes(key) &&\n value[selectionEnd - 1] === decimal\n\n const decimalDeleted =\n !selection &&\n [deleteKey, numericKeypadKey].includes(key) &&\n value[selectionEnd] === decimal\n\n const nonReplacingKeys =\n [metaKeyIdentifier, controlKey, highlightAllKey, copyKey].includes(\n key\n ) &&\n (ctrlKey || metaKey)\n\n const decimalReplacedAsSelection =\n selection &&\n selection.includes(decimal) &&\n selection.length < value.length &&\n !nonReplacingKeys\n\n const preserveDecimal =\n decimalBackspaced || decimalDeleted || decimalReplacedAsSelection\n\n if (preserveDecimal) {\n const base = decimalReplacedAsSelection\n ? selectionStart\n : selectionEnd\n\n const shift = (decimalBackspaced && -1) || (decimalDeleted && 1) || 0\n\n const cursorPosition = base + shift\n\n e.preventDefault()\n adjustCursor(cursorPosition)\n }\n }\n\n const isDecimalSeparatorPreserved = () => {\n const { safeIntegerLength, integerLength, fractionLength } =\n getValueLengthInfo(value)\n\n const decimalSeparatorCanNotBeRemoved =\n safeIntegerLength - integerLength < fractionLength\n\n return (\n (fillDecimalScaleOnBlur && decimalSeparatorCanNotBeRemoved) ||\n fixedDecimalScale\n )\n }\n\n if (isDecimalSeparatorPreserved()) {\n preserveDecimalSeparator()\n }\n\n const handleIncrementer = () => {\n switch (key) {\n case 'ArrowUp':\n case 'Up':\n e.preventDefault()\n makeStep()\n break\n case 'ArrowDown':\n case 'Down':\n e.preventDefault()\n makeStep(true)\n break\n }\n }\n\n if (hasIncrementer) {\n handleIncrementer()\n }\n\n _onKeyDown(e)\n }\n\n const internalOnChange = (e: any) => {\n if (isControlledWithoutOnChangeHandlerAndReadOnlyAttribute) return\n\n const {\n target: { value },\n nativeEvent: { inputType },\n } = e\n\n const { newValue, newCursorPosition } = getNewValueAndCursorPosition(\n value,\n identifyPressedKey(\n decimalSeparatorKey,\n inputType,\n pressedKey,\n prevValue,\n value\n )\n )\n // Prevent cursor flickering\n e.target.value = newValue\n\n setInputValue(newValue)\n adjustCursor(newCursorPosition)\n\n if (newValue !== prevValue) {\n externalOnChange(newValue)\n }\n }\n\n const internalOnBlur = (e: any) => {\n const { integer, fraction } = unformat(locale, inputValue)\n\n const shouldValueBeCleared =\n inputValue === minus ||\n inputValue === decimal ||\n inputValue === `${minus}${decimal}`\n const shouldIntegerPartBeFilled =\n fraction.length > 0 && (integer === emptyString || integer === minus)\n const isDecimalSeparatorRedundant =\n verifiedDecimalScale > 0 &&\n inputValue[inputValue.length - 1] === decimal &&\n !fillDecimalScaleOnBlur\n const isDecimalScaleNotFilled = verifiedDecimalScale - fraction.length > 0\n const shouldDecimalScaleBeFilled =\n fillDecimalScaleOnBlur && isDecimalScaleNotFilled\n\n if (\n shouldValueBeCleared ||\n shouldIntegerPartBeFilled ||\n isDecimalSeparatorRedundant ||\n shouldDecimalScaleBeFilled\n ) {\n const getNewValue = () => {\n if (shouldValueBeCleared) {\n return emptyString\n }\n if (shouldIntegerPartBeFilled) {\n const numberOfZerosToPad = verifiedDecimalScale - fraction.length\n return `${integer}0${decimal}${\n shouldDecimalScaleBeFilled\n ? fraction.concat(\n Array.from({ length: numberOfZerosToPad }, (_) => '0').join(\n emptyString\n )\n )\n : fraction\n }`\n }\n if (isDecimalSeparatorRedundant) {\n return inputValue.replace(\n new RegExp(`[${decimal}]`, 'g'),\n emptyString\n )\n }\n if (shouldDecimalScaleBeFilled) {\n return format(locale, verifiedDecimalScale, 'always', inputValue)\n }\n\n return inputValue\n }\n const newValue = getNewValue()\n setInputValue(newValue)\n externalOnChange(newValue)\n }\n\n _onBlur(e)\n }\n\n return (\n <StyledWrapper $hasIncrementer={hasIncrementer} data-qa={qa?.wrapper}>\n <StyledInput\n value={inputValue}\n disabled={disabled}\n error={error}\n onKeyDown={internalOnKeyDown}\n onChange={internalOnChange}\n onBlur={internalOnBlur}\n inputMode=\"numeric\"\n // Chrome- InvalidStateError: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection.\n // Firefox- Uncaught DOMException: An attempt was made to use an object that is not, or is no longer, usable\n // type={hasIncrementer ? 'number' : undefined}\n lang={contextLocale}\n readOnly={readOnly}\n style={{\n ...style,\n ...{\n paddingLeft: `${inputPadding.left}px`,\n paddingRight: `${inputPadding.right}px`,\n },\n }}\n {...inputProps}\n {...props}\n ref={mergeRefs(ref, inputRef)}\n />\n {prefix && (\n <StyledPrefix disabled={disabled} {...prefixProps}>\n {prefix}\n </StyledPrefix>\n )}\n {suffix && (\n <StyledSuffix\n $withIncrementer={hasIncrementer}\n disabled={disabled}\n {...suffixProps}\n >\n {suffix}\n </StyledSuffix>\n )}\n {hasIncrementer && (\n <StyledIncrementerWrapper>\n <StyledIncrementerButton\n aria-hidden=\"true\"\n type=\"button\"\n disabled={disabled}\n tabIndex={-1}\n data-qa={qa?.increment}\n onClick={() => makeStep()}\n >\n <PlusIcon />\n </StyledIncrementerButton>\n <StyledIncrementerButton\n aria-hidden=\"true\"\n type=\"button\"\n disabled={disabled}\n tabIndex={-1}\n data-qa={qa?.decrement}\n onClick={() => makeStep(true)}\n >\n <MinusIcon />\n </StyledIncrementerButton>\n </StyledIncrementerWrapper>\n )}\n </StyledWrapper>\n )\n }\n)\n\nNumberInput.displayName = 'NumberInput'\n\nexport const getCurrencyProps = (\n locale: string,\n _decimalScale: NumberInputProps['decimalScale'],\n symbol?: string,\n currencyIsoCode?: string,\n currencyDisplay?: CurrencyDisplay\n): CurrencyProps => {\n const currencyOptions: CurrencyOptions = {\n locale,\n currencyIsoCode: currencyIsoCode || 'USD',\n currencyDisplay: currencyDisplay || 'narrowSymbol',\n }\n const parts = formatCurrencyToParts(1, currencyOptions)\n\n const formatterDecimalScale =\n parts.find((part) => part.type === 'fraction')?.value.length || 0\n const decimalScale = _decimalScale || formatterDecimalScale\n\n const placement =\n parts.findIndex((object) => {\n return object.type === 'currency'\n }) <\n parts.findIndex((part) => {\n return part.type === 'integer'\n })\n ? 'prefix'\n : 'suffix'\n\n const currencyIsoSymbol = currencyIsoCode\n ? parts.find((part) => part.type === 'currency')?.value.toString()\n : undefined\n\n const currencyProps: CurrencyProps =\n placement === 'prefix'\n ? {\n decimalScale: decimalScale as NumberInputProps['decimalScale'],\n prefix: currencyIsoSymbol || symbol || '',\n }\n : {\n decimalScale: decimalScale as NumberInputProps['decimalScale'],\n suffix: currencyIsoSymbol || symbol || '',\n }\n\n return currencyProps\n}\n\nexport const CurrencyInput = React.forwardRef<\n HTMLInputElement,\n CurrencyInputProps\n>(\n (\n {\n currencyDisplay,\n currencyIsoCode,\n decimalScale: _decimalScale,\n fillDecimalScale = defaultCurrencyFillDecimalScale,\n prefix = defaultCurrencyInputPrefix,\n suffix,\n ...props\n },\n ref\n ) => {\n const I18n = useI18nContext()\n const contextLocale = props.locale || I18n.locale || defaultLocale\n\n const currencyProps: CurrencyProps = getCurrencyProps(\n contextLocale as string,\n _decimalScale,\n prefix || suffix,\n currencyIsoCode,\n currencyDisplay\n )\n\n return (\n <NumberInput\n fillDecimalScale={fillDecimalScale}\n {...props}\n {...currencyProps}\n ref={ref}\n />\n )\n }\n)\n\nCurrencyInput.displayName = 'CurrencyInput'\n"],"mappings":";;;;;;;;;;;;;;;;;AAIA,SAASA,qBAAqB,QAAQ,gCAAgC;AACtE,SAASC,SAAS,QAAQ,OAAO;AACjC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,qBAAqB;AAC/C,SACEC,+BAA+B,EAC/BC,0BAA0B,QACrB,yBAAyB;AAChC,SACEC,eAAe,EACfC,mBAAmB,EACnBC,WAAW,QACN,qBAAqB;AAC5B,SACEC,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAgB,EAChBC,oBAAoB,EACpBC,uBAAuB,EACvBC,wBAAwB,EACxBC,WAAW,EACXC,YAAY,EACZC,YAAY,EACZC,aAAa,QACR,sBAAsB;AAQ7B,SACEC,YAAY,EACZC,QAAQ,EACRC,UAAU,EACVC,OAAO,EACPC,aAAa,EACbC,SAAS,EACTC,WAAW,EACXC,MAAM,EACNC,oBAAoB,EACpBC,aAAa,EACbC,eAAe,EACfC,gBAAgB,EAChBC,kBAAkB,EAClBC,cAAc,EACdC,iBAAiB,EACjBC,KAAK,EACLC,gBAAgB,EAChBC,SAAS,EACTC,wBAAwB,EACxBC,OAAO,EACPC,QAAQ,QACH,qBAAqB;AAE5B,SAASC,IAAIA,CAAA,EAAG,CAAC;AAEjB,IAAMC,QAAQ,GAAG,SAAXA,QAAQA,CAAA;EAAA,oBACZzC,KAAA,CAAA0C,aAAA;IACEC,KAAK,EAAC,GAAG;IACTC,MAAM,EAAC,GAAG;IACVC,OAAO,EAAC,SAAS;IACjBC,KAAK,EA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CAAC;EAC7B,IAAMqF,aAAa,GAAGJ,KAAK,CAACK,MAAM,IAAIF,IAAI,CAACE,MAAM,IAAIhE,aAAa;EAElE,IAAMuQ,aAA4B,GAAGhB,gBAAgB,CACnDxL,aAAa,EACbyL,aAAa,EACbtM,MAAM,IAAIM,MAAM,EAChBkM,eAAe,EACfC,eACF,CAAC;EAED,oBACElR,KAAA,CAAA0C,aAAA,CAACO,WAAW,EAAAgN,QAAA;IACVlM,gBAAgB,EAAEA;EAAiB,GAC/BmB,KAAK,EACL4M,aAAa;IACjB1O,GAAG,EAAEA;EAAI,EACV,CAAC;AAEN,CACF,CAAC;AAED2O,aAAa,CAAClB,WAAW,GAAG,eAAe"}
|
|
1
|
+
{"version":3,"file":"NumberInput.js","names":["formatCurrencyToParts","findIndex","React","useI18nContext","spacing","mergeRefs","defaultCurrencyFillDecimalScale","defaultCurrencyInputPrefix","useNumberFormat","useNumberInputLabel","usePrevious","addonRootFontFamily","addonRootFontSize","addonRootPadding","inputDefaultXPadding","StyledIncrementerButton","StyledIncrementerWrapper","StyledInput","StyledPrefix","StyledSuffix","StyledWrapper","backspaceKey","clamp","commaKey","controlKey","copyKey","defaultLocale","deleteKey","emptyString","format","getNewCursorPosition","getSeparators","highlightAllKey","identicalLocales","identifyPressedKey","maxDigitLength","metaKeyIdentifier","minus","numericKeypadKey","periodKey","prepareValueToFormatting","toFixed","unformat","noop","PlusIcon","createElement","width","height","viewBox","xmlns","d","MinusIcon","NumberInput","forwardRef","_ref","ref","ariaLabel","ariaLabelledBy","_ref$decimalScale","decimalScale","defaultValue","_ref$disabled","disabled","_ref$error","error","_ref$fillDecimalScale","fillDecimalScale","max","min","_onChange","onChange","_ref$onKeyDown","onKeyDown","_onKeyDown","_ref$onBlur","onBlur","_onBlur","_ref$prefix","prefix","readOnly","_ref$step","step","style","_ref$suffix","suffix","value","qa","props","_objectWithoutProperties","_excluded","I18n","contextLocale","locale","inputRef","useRef","_useNumberFormat","verifiedDecimalScale","fillDecimalScaleOnBlur","fixedDecimalScale","formatValue","getValueLengthInfo","_useNumberInputLabel","id","name","inputProps","prefixProps","suffixProps","isControlled","undefined","isControlledWithoutOnChangeHandlerAndReadOnlyAttribute","hasIncrementer","_React$useMemo","useMemo","group","decimal","decimalSeparatorKey","inputPadding","fontContext","concat","element","document","context","getContext","font","extraBasePadding","suffixPadding","Math","ceil","measureText","getRightPadding","xl","left","right","getValueChange","useCallback","_unformat","parsedNumber","isNaN","externalOnChange","_React$useState","useState","_React$useState2","_slicedToArray","inputValue","setInputValue","_React$useState3","_React$useState4","prevValue","setPrevValue","_React$useState5","selectionStart","selectionEnd","selection","_React$useState6","prevCursorPosition","setPrevCursorPosition","_React$useState7","_React$useState8","pressedKey","setPressedKey","prevLocale","useLayoutEffect","formattedValue","console","useEffect","prev","newValue","_inputRef$current","displayValue","current","lastChar","length","lastCharIsPending","includes","decimals","split","lastDecimalIsZero","onlyMinusDisplayed","getNewValueAndCursorPosition","preparedValue","newCursorPosition","adjustCursor","newPosition","_inputRef$current2","setSelectionRange","setTimeout","_inputRef$current3","makeStep","down","arguments","getSignificantPrecision","fraction","reversedFraction","reverse","indexOfLastSignificantFractionDigit","i","slice","_unformat2","_unformat3","stepFraction","prevValuePrecision","prevValueSignificantPrecision","rawStepPrecision","rawStepPrecisionExceedsDecimalScale","stepPrecision","warn","diff","precision","significantPrecision","calculatedNumber","clampedNumber","wasClamped","calculated","_getValueLengthInfo","isSafeLength","isSafeIntegerLength","rejectStepByLengthLimit","formatted","internalOnKeyDown","e","ctrlKey","metaKey","key","_e$target","target","preserveDecimalSeparator","decimalBackspaced","decimalDeleted","nonReplacingKeys","decimalReplacedAsSelection","preserveDecimal","base","shift","cursorPosition","preventDefault","isDecimalSeparatorPreserved","_getValueLengthInfo2","safeIntegerLength","integerLength","fractionLength","decimalSeparatorCanNotBeRemoved","handleIncrementer","internalOnChange","inputType","nativeEvent","_getNewValueAndCursor","internalOnBlur","_unformat4","integer","shouldValueBeCleared","shouldIntegerPartBeFilled","isDecimalSeparatorRedundant","isDecimalScaleNotFilled","shouldDecimalScaleBeFilled","getBaseValue","numberOfZerosToPad","Array","from","_","join","replace","RegExp","baseValue","hasBounds","_unformat5","baseParsed","clampedParsed","needsClamp","Number","isFinite","clampFillScale","finalValue","_unformat6","currentParsedNumber","hasFiniteValue","isAtMax","isAtMin","$hasIncrementer","wrapper","_extends","inputMode","lang","_objectSpread","paddingLeft","paddingRight","$withIncrementer","type","tabIndex","increment","onClick","decrement","displayName","getCurrencyProps","_decimalScale","symbol","currencyIsoCode","currencyDisplay","_parts$find","_parts$find2","currencyOptions","parts","formatterDecimalScale","find","part","placement","object","currencyIsoSymbol","toString","currencyProps","CurrencyInput","_ref2","_ref2$fillDecimalScal","_ref2$prefix","_excluded2"],"sources":["../../src/NumberInput/NumberInput.tsx"],"sourcesContent":["import type {\n CurrencyDisplay,\n CurrencyOptions,\n} from '@procore/globalization-toolkit'\nimport { formatCurrencyToParts } from '@procore/globalization-toolkit'\nimport { findIndex } from 'ramda'\nimport React from 'react'\nimport { useI18nContext } from '../_hooks/I18n'\nimport { spacing } from '../_styles/spacing'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport {\n defaultCurrencyFillDecimalScale,\n defaultCurrencyInputPrefix,\n} from './NumberInput.constants'\nimport {\n useNumberFormat,\n useNumberInputLabel,\n usePrevious,\n} from './NumberInput.hooks'\nimport {\n addonRootFontFamily,\n addonRootFontSize,\n addonRootPadding,\n inputDefaultXPadding,\n StyledIncrementerButton,\n StyledIncrementerWrapper,\n StyledInput,\n StyledPrefix,\n StyledSuffix,\n StyledWrapper,\n} from './NumberInput.styles'\nimport type {\n CurrencyInputProps,\n CurrencyProps,\n CursorPosition,\n FillDecimalScaleVariant,\n NumberInputProps,\n PressedKey,\n} from './NumberInput.types'\nimport {\n backspaceKey,\n clamp,\n commaKey,\n controlKey,\n copyKey,\n defaultLocale,\n deleteKey,\n emptyString,\n format,\n getNewCursorPosition,\n getSeparators,\n highlightAllKey,\n identicalLocales,\n identifyPressedKey,\n maxDigitLength,\n metaKeyIdentifier,\n minus,\n numericKeypadKey,\n periodKey,\n prepareValueToFormatting,\n toFixed,\n unformat,\n} from './NumberInput.utils'\n\nfunction noop() {}\n\nconst PlusIcon = () => (\n <svg\n width=\"8\"\n height=\"8\"\n viewBox=\"0 0 8 8\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M4.5 0H3.5V3.5H0V4.5H3.5V8H4.5V4.5H8V3.5H4.5V0Z\" />\n </svg>\n)\n\nconst MinusIcon = () => (\n <svg\n width=\"8\"\n height=\"2\"\n viewBox=\"0 0 8 2\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M4.5 0.5H3.5H0V1.5H3.5H4.5H8V0.5H4.5Z\" />\n </svg>\n)\n\n/**\n\n The number input allows users to add numbers to a given form or table.\n The currency input will be used for data with a monetary value.\n Both components allow characters 0-9, periods, and commas. In order to avoid\n the loss of precision, the number length is limited by 15 digits.\n\n @since 10.19.0\n\n @see [Storybook](https://stories.core.procore.com/?path=/story/core-react_demos-numberinput--demo-number-input)\n\n @see [Design Guidelines](https://design.procore.com/number-and-currency-input)\n\n */\nexport const NumberInput = React.forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n decimalScale = true,\n defaultValue,\n disabled = false,\n error = false,\n fillDecimalScale = 'none',\n max,\n min,\n onChange: _onChange,\n onKeyDown: _onKeyDown = noop,\n onBlur: _onBlur = noop,\n prefix = emptyString,\n readOnly,\n step = 0,\n style,\n suffix = emptyString,\n value,\n qa,\n ...props\n },\n ref\n ) => {\n const I18n = useI18nContext()\n const contextLocale = I18n.locale || defaultLocale\n const inputRef = React.useRef<HTMLInputElement>(null)\n\n const {\n decimalScale: verifiedDecimalScale,\n fillDecimalScaleOnBlur,\n fixedDecimalScale,\n formatValue,\n getValueLengthInfo,\n locale,\n } = useNumberFormat({\n decimalScale,\n fillDecimalScale,\n locale: contextLocale,\n })\n\n const { inputProps, prefixProps, suffixProps } = useNumberInputLabel({\n ariaLabel,\n ariaLabelledBy,\n id: props.id,\n name: props.name,\n prefix,\n suffix,\n })\n\n const isControlled = value !== undefined\n const isControlledWithoutOnChangeHandlerAndReadOnlyAttribute =\n isControlled && !_onChange && !readOnly\n const hasIncrementer = step > 0 && !readOnly\n\n const { group, decimal } = React.useMemo(\n () => getSeparators(locale),\n [locale]\n )\n const decimalSeparatorKey = React.useMemo(() => {\n return decimal === periodKey ? periodKey : commaKey\n }, [decimal])\n\n const inputPadding = React.useMemo((): {\n left: number\n right: number | null\n } => {\n const fontContext = `${addonRootFontSize} \"${addonRootFontFamily}\"`\n\n if (prefix || suffix) {\n const element = document.createElement('canvas')\n const context = element?.getContext('2d')\n\n if (context) {\n context.font = fontContext\n\n const extraBasePadding = inputDefaultXPadding + addonRootPadding\n\n const suffixPadding =\n extraBasePadding + Math.ceil(context.measureText(suffix).width)\n\n const getRightPadding = () => {\n if (hasIncrementer && suffix) {\n return suffixPadding + spacing.xl\n }\n if (suffix) {\n return suffixPadding\n }\n return null\n }\n\n return {\n left: prefix\n ? extraBasePadding + Math.ceil(context.measureText(prefix).width)\n : inputDefaultXPadding,\n right: getRightPadding(),\n }\n }\n }\n\n return {\n left: inputDefaultXPadding,\n right: null,\n }\n }, [prefix, suffix, hasIncrementer])\n\n const getValueChange = React.useCallback(\n (value: string) => {\n const { parsedNumber } = unformat(locale, value)\n return {\n value,\n parsedNumber: isNaN(parsedNumber) ? null : parsedNumber,\n }\n },\n [locale]\n )\n\n const externalOnChange = React.useCallback(\n (value: string) => _onChange && _onChange(getValueChange(value)),\n [_onChange, getValueChange]\n )\n\n const [inputValue, setInputValue] = React.useState(\n formatValue(defaultValue)\n )\n const [prevValue, setPrevValue] = React.useState(\n isControlled ? formatValue(value) : inputValue\n )\n const [prevCursorPosition, setPrevCursorPosition] =\n React.useState<CursorPosition>({\n selectionStart: 0,\n selectionEnd: 0,\n selection: emptyString,\n })\n const [pressedKey, setPressedKey] = React.useState()\n const prevLocale = usePrevious(locale)\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n React.useLayoutEffect(() => {\n const formattedValue = formatValue(value)\n if (isControlled && inputValue !== formattedValue) {\n setInputValue(formattedValue)\n }\n\n if (isControlledWithoutOnChangeHandlerAndReadOnlyAttribute) {\n console.error(\n `Warning: Failed prop type: You provided a \\`value\\` prop to a form field without an \\`onChange\\` handler.\n This will render a read-only field. If the field should be mutable use \\`defaultValue\\`.\n Otherwise, set either \\`onChange\\` or \\`readOnly\\`.`\n )\n }\n }, [value])\n\n React.useEffect(() => {\n if (prevLocale && !identicalLocales(prevLocale, locale)) {\n setInputValue((prev) => {\n const newValue = formatValue(unformat(prevLocale, prev).parsedNumber)\n externalOnChange(newValue)\n return newValue\n })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [prevLocale, formatValue])\n\n React.useLayoutEffect(() => {\n const displayValue = inputRef.current?.value || ''\n if (!_onChange || !displayValue) {\n return\n }\n const formattedValue = formatValue(value)\n\n if (displayValue !== formattedValue) {\n const lastChar = displayValue[displayValue.length - 1]\n const lastCharIsPending = [periodKey, commaKey].includes(lastChar)\n\n const decimals = displayValue.split(decimal)[1] || ''\n const lastDecimalIsZero =\n decimals && decimals[decimals.length - 1] === '0'\n\n const onlyMinusDisplayed = displayValue === minus\n\n // a client state and display mismatch is only valid when\n if (lastCharIsPending || lastDecimalIsZero || onlyMinusDisplayed) {\n return\n }\n\n // otherwise sync display with client state\n setInputValue(formattedValue)\n }\n })\n\n const getNewValueAndCursorPosition = (\n value: string,\n pressedKey: PressedKey\n ) => {\n const preparedValue = prepareValueToFormatting(\n decimal,\n decimalSeparatorKey,\n group,\n pressedKey,\n prevCursorPosition,\n prevValue,\n verifiedDecimalScale,\n value\n )\n const newValue = formatValue(preparedValue)\n\n return {\n newValue,\n newCursorPosition: getNewCursorPosition(\n decimal,\n decimalSeparatorKey,\n group,\n newValue,\n pressedKey,\n prevCursorPosition,\n prevValue,\n value,\n verifiedDecimalScale,\n locale,\n fillDecimalScale\n ),\n }\n }\n\n const adjustCursor = (newPosition: number) => {\n inputRef.current?.setSelectionRange(newPosition, newPosition)\n // Mobile Chrome adjustment\n setTimeout(\n () => inputRef.current?.setSelectionRange(newPosition, newPosition),\n 0\n )\n }\n\n const makeStep = (down = false) => {\n const getSignificantPrecision = (fraction: string) => {\n const reversedFraction = fraction.split(emptyString).reverse()\n const indexOfLastSignificantFractionDigit = findIndex(\n (i) => i !== '0',\n reversedFraction\n )\n\n return indexOfLastSignificantFractionDigit > -1\n ? reversedFraction.slice(indexOfLastSignificantFractionDigit).length\n : 0\n }\n\n const { parsedNumber, fraction } = unformat(locale, inputValue)\n const { fraction: stepFraction } = unformat(locale, step)\n\n const prevValuePrecision = fraction.length || 0\n const prevValueSignificantPrecision = getSignificantPrecision(fraction)\n const rawStepPrecision = stepFraction.length || 0\n const rawStepPrecisionExceedsDecimalScale =\n rawStepPrecision > verifiedDecimalScale\n const stepPrecision = rawStepPrecisionExceedsDecimalScale\n ? verifiedDecimalScale\n : rawStepPrecision\n\n if (rawStepPrecisionExceedsDecimalScale) {\n console.warn(\n `WARNING: Step's value was rounded since its scale (${rawStepPrecision}) exceeds the decimal scale (${verifiedDecimalScale}).`\n )\n }\n\n const diff = toFixed(step, stepPrecision) * (down ? -1 : 1)\n const precision = Math.max(\n stepPrecision,\n fixedDecimalScale ? verifiedDecimalScale : prevValuePrecision\n )\n const significantPrecision = Math.max(\n prevValueSignificantPrecision,\n stepPrecision\n )\n const calculatedNumber = inputValue ? (parsedNumber || 0) + diff : diff\n const clampedNumber = clamp(calculatedNumber, min, max)\n const wasClamped = clampedNumber !== calculatedNumber\n const calculated = inputValue\n ? clampedNumber.toFixed(significantPrecision)\n : clampedNumber\n\n const { isSafeLength, isSafeIntegerLength } = getValueLengthInfo(\n wasClamped ? clampedNumber : calculated,\n true\n )\n\n const rejectStepByLengthLimit = !isSafeLength || !isSafeIntegerLength\n\n if (rejectStepByLengthLimit) {\n console.warn(\n `WARNING: Incrementer's step was not fulfilled since result oversteps input ${maxDigitLength}-digit limit and can't be presented without a loss of precision.`\n )\n return\n }\n\n const formatted = wasClamped\n ? formatValue(clampedNumber)\n : format(locale, precision, 'always', calculated, true)\n\n setInputValue(formatted)\n externalOnChange(formatted)\n }\n\n const internalOnKeyDown = (e: any) => {\n const {\n ctrlKey,\n metaKey,\n key,\n target: { value, selectionStart, selectionEnd },\n } = e\n\n const selection = value.slice(selectionStart, selectionEnd)\n\n setPressedKey(key)\n setPrevCursorPosition({\n selectionStart,\n selectionEnd,\n selection,\n })\n setPrevValue(value)\n\n const preserveDecimalSeparator = () => {\n const decimalBackspaced =\n !selection &&\n [backspaceKey].includes(key) &&\n value[selectionEnd - 1] === decimal\n\n const decimalDeleted =\n !selection &&\n [deleteKey, numericKeypadKey].includes(key) &&\n value[selectionEnd] === decimal\n\n const nonReplacingKeys =\n [metaKeyIdentifier, controlKey, highlightAllKey, copyKey].includes(\n key\n ) &&\n (ctrlKey || metaKey)\n\n const decimalReplacedAsSelection =\n selection &&\n selection.includes(decimal) &&\n selection.length < value.length &&\n !nonReplacingKeys\n\n const preserveDecimal =\n decimalBackspaced || decimalDeleted || decimalReplacedAsSelection\n\n if (preserveDecimal) {\n const base = decimalReplacedAsSelection\n ? selectionStart\n : selectionEnd\n\n const shift = (decimalBackspaced && -1) || (decimalDeleted && 1) || 0\n\n const cursorPosition = base + shift\n\n e.preventDefault()\n adjustCursor(cursorPosition)\n }\n }\n\n const isDecimalSeparatorPreserved = () => {\n const { safeIntegerLength, integerLength, fractionLength } =\n getValueLengthInfo(value)\n\n const decimalSeparatorCanNotBeRemoved =\n safeIntegerLength - integerLength < fractionLength\n\n return (\n (fillDecimalScaleOnBlur && decimalSeparatorCanNotBeRemoved) ||\n fixedDecimalScale\n )\n }\n\n if (isDecimalSeparatorPreserved()) {\n preserveDecimalSeparator()\n }\n\n const handleIncrementer = () => {\n switch (key) {\n case 'ArrowUp':\n case 'Up':\n e.preventDefault()\n makeStep()\n break\n case 'ArrowDown':\n case 'Down':\n e.preventDefault()\n makeStep(true)\n break\n }\n }\n\n if (hasIncrementer) {\n handleIncrementer()\n }\n\n _onKeyDown(e)\n }\n\n const internalOnChange = (e: any) => {\n if (isControlledWithoutOnChangeHandlerAndReadOnlyAttribute) return\n\n const {\n target: { value },\n nativeEvent: { inputType },\n } = e\n\n const { newValue, newCursorPosition } = getNewValueAndCursorPosition(\n value,\n identifyPressedKey(\n decimalSeparatorKey,\n inputType,\n pressedKey,\n prevValue,\n value\n )\n )\n // Prevent cursor flickering\n e.target.value = newValue\n\n setInputValue(newValue)\n adjustCursor(newCursorPosition)\n\n if (newValue !== prevValue) {\n externalOnChange(newValue)\n }\n }\n\n const internalOnBlur = (e: any) => {\n const { integer, fraction } = unformat(locale, inputValue)\n\n const shouldValueBeCleared =\n inputValue === minus ||\n inputValue === decimal ||\n inputValue === `${minus}${decimal}`\n const shouldIntegerPartBeFilled =\n fraction.length > 0 && (integer === emptyString || integer === minus)\n const isDecimalSeparatorRedundant =\n verifiedDecimalScale > 0 &&\n inputValue[inputValue.length - 1] === decimal &&\n !fillDecimalScaleOnBlur\n const isDecimalScaleNotFilled = verifiedDecimalScale - fraction.length > 0\n const shouldDecimalScaleBeFilled =\n fillDecimalScaleOnBlur && isDecimalScaleNotFilled\n\n const getBaseValue = () => {\n if (shouldValueBeCleared) {\n return emptyString\n }\n if (shouldIntegerPartBeFilled) {\n const numberOfZerosToPad = verifiedDecimalScale - fraction.length\n return `${integer}0${decimal}${\n shouldDecimalScaleBeFilled\n ? fraction.concat(\n Array.from({ length: numberOfZerosToPad }, (_) => '0').join(\n emptyString\n )\n )\n : fraction\n }`\n }\n if (isDecimalSeparatorRedundant) {\n return inputValue.replace(\n new RegExp(`[${decimal}]`, 'g'),\n emptyString\n )\n }\n if (shouldDecimalScaleBeFilled) {\n return format(locale, verifiedDecimalScale, 'always', inputValue)\n }\n\n return inputValue\n }\n\n const baseValue = getBaseValue()\n\n const hasBounds = typeof min === 'number' || typeof max === 'number'\n const { parsedNumber: baseParsed } = unformat(locale, baseValue)\n const clampedParsed = clamp(baseParsed, min, max)\n const needsClamp =\n hasBounds && Number.isFinite(baseParsed) && clampedParsed !== baseParsed\n\n const clampFillScale: FillDecimalScaleVariant =\n fixedDecimalScale || fillDecimalScaleOnBlur ? 'always' : 'none'\n const finalValue = needsClamp\n ? format(\n locale,\n verifiedDecimalScale,\n clampFillScale,\n clampedParsed,\n true\n )\n : baseValue\n\n if (finalValue !== inputValue) {\n setInputValue(finalValue)\n externalOnChange(finalValue)\n }\n\n _onBlur(e)\n }\n\n const { parsedNumber: currentParsedNumber } = unformat(locale, inputValue)\n const hasFiniteValue = Number.isFinite(currentParsedNumber)\n const isAtMax =\n hasFiniteValue &&\n Number.isFinite(max) &&\n currentParsedNumber >= (max as number)\n const isAtMin =\n hasFiniteValue &&\n Number.isFinite(min) &&\n currentParsedNumber <= (min as number)\n\n return (\n <StyledWrapper $hasIncrementer={hasIncrementer} data-qa={qa?.wrapper}>\n <StyledInput\n value={inputValue}\n disabled={disabled}\n error={error}\n onKeyDown={internalOnKeyDown}\n onChange={internalOnChange}\n onBlur={internalOnBlur}\n inputMode=\"numeric\"\n // Chrome- InvalidStateError: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection.\n // Firefox- Uncaught DOMException: An attempt was made to use an object that is not, or is no longer, usable\n // type={hasIncrementer ? 'number' : undefined}\n lang={contextLocale}\n readOnly={readOnly}\n style={{\n ...style,\n ...{\n paddingLeft: `${inputPadding.left}px`,\n paddingRight: `${inputPadding.right}px`,\n },\n }}\n {...inputProps}\n {...props}\n ref={mergeRefs(ref, inputRef)}\n />\n {prefix && (\n <StyledPrefix disabled={disabled} {...prefixProps}>\n {prefix}\n </StyledPrefix>\n )}\n {suffix && (\n <StyledSuffix\n $withIncrementer={hasIncrementer}\n disabled={disabled}\n {...suffixProps}\n >\n {suffix}\n </StyledSuffix>\n )}\n {hasIncrementer && (\n <StyledIncrementerWrapper>\n <StyledIncrementerButton\n aria-hidden=\"true\"\n type=\"button\"\n disabled={disabled || isAtMax}\n tabIndex={-1}\n data-qa={qa?.increment}\n onClick={() => makeStep()}\n >\n <PlusIcon />\n </StyledIncrementerButton>\n <StyledIncrementerButton\n aria-hidden=\"true\"\n type=\"button\"\n disabled={disabled || isAtMin}\n tabIndex={-1}\n data-qa={qa?.decrement}\n onClick={() => makeStep(true)}\n >\n <MinusIcon />\n </StyledIncrementerButton>\n </StyledIncrementerWrapper>\n )}\n </StyledWrapper>\n )\n }\n)\n\nNumberInput.displayName = 'NumberInput'\n\nexport const getCurrencyProps = (\n locale: string,\n _decimalScale: NumberInputProps['decimalScale'],\n symbol?: string,\n currencyIsoCode?: string,\n currencyDisplay?: CurrencyDisplay\n): CurrencyProps => {\n const currencyOptions: CurrencyOptions = {\n locale,\n currencyIsoCode: currencyIsoCode || 'USD',\n currencyDisplay: currencyDisplay || 'narrowSymbol',\n }\n const parts = formatCurrencyToParts(1, currencyOptions)\n\n const formatterDecimalScale =\n parts.find((part) => part.type === 'fraction')?.value.length || 0\n const decimalScale = _decimalScale || formatterDecimalScale\n\n const placement =\n parts.findIndex((object) => {\n return object.type === 'currency'\n }) <\n parts.findIndex((part) => {\n return part.type === 'integer'\n })\n ? 'prefix'\n : 'suffix'\n\n const currencyIsoSymbol = currencyIsoCode\n ? parts.find((part) => part.type === 'currency')?.value.toString()\n : undefined\n\n const currencyProps: CurrencyProps =\n placement === 'prefix'\n ? {\n decimalScale: decimalScale as NumberInputProps['decimalScale'],\n prefix: currencyIsoSymbol || symbol || '',\n }\n : {\n decimalScale: decimalScale as NumberInputProps['decimalScale'],\n suffix: currencyIsoSymbol || symbol || '',\n }\n\n return currencyProps\n}\n\nexport const CurrencyInput = React.forwardRef<\n HTMLInputElement,\n CurrencyInputProps\n>(\n (\n {\n currencyDisplay,\n currencyIsoCode,\n decimalScale: _decimalScale,\n fillDecimalScale = defaultCurrencyFillDecimalScale,\n prefix = defaultCurrencyInputPrefix,\n suffix,\n ...props\n },\n ref\n ) => {\n const I18n = useI18nContext()\n const contextLocale = props.locale || I18n.locale || defaultLocale\n\n const currencyProps: CurrencyProps = getCurrencyProps(\n contextLocale as string,\n _decimalScale,\n prefix || suffix,\n currencyIsoCode,\n currencyDisplay\n )\n\n return (\n <NumberInput\n fillDecimalScale={fillDecimalScale}\n {...props}\n {...currencyProps}\n ref={ref}\n />\n )\n }\n)\n\nCurrencyInput.displayName = 'CurrencyInput'\n"],"mappings":";;;;;;;;;;;;;;;;;AAIA,SAASA,qBAAqB,QAAQ,gCAAgC;AACtE,SAASC,SAAS,QAAQ,OAAO;AACjC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,gBAAgB;AAC/C,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,qBAAqB;AAC/C,SACEC,+BAA+B,EAC/BC,0BAA0B,QACrB,yBAAyB;AAChC,SACEC,eAAe,EACfC,mBAAmB,EACnBC,WAAW,QACN,qBAAqB;AAC5B,SACEC,mBAAmB,EACnBC,iBAAiB,EACjBC,gBAAgB,EAChBC,oBAAoB,EACpBC,uBAAuB,EACvBC,wBAAwB,EACxBC,WAAW,EACXC,YAAY,EACZC,YAAY,EACZC,aAAa,QACR,sBAAsB;AAS7B,SACEC,YAAY,EACZC,KAAK,EACLC,QAAQ,EACRC,UAAU,EACVC,OAAO,EACPC,aAAa,EACbC,SAAS,EACTC,WAAW,EACXC,MAAM,EACNC,oBAAoB,EACpBC,aAAa,EACbC,eAAe,EACfC,gBAAgB,EAChBC,kBAAkB,EAClBC,cAAc,EACdC,iBAAiB,EACjBC,KAAK,EACLC,gBAAgB,EAChBC,SAAS,EACTC,wBAAwB,EACxBC,OAAO,EACPC,QAAQ,QACH,qBAAqB;AAE5B,SAASC,IAAIA,CAAA,EAAG,CAAC;AAEjB,IAAMC,QAAQ,GAAG,SAAX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