@bigbinary/neetoui 8.3.54 → 8.3.55
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 +21 -21
- package/dist/ActionDropdown.js +0 -1
- package/dist/ActionDropdown.js.map +1 -1
- package/dist/Alert.js +6 -6
- package/dist/Alert.js.map +1 -1
- package/dist/Avatar.js +6 -10
- package/dist/Avatar.js.map +1 -1
- package/dist/Checkbox.js +4 -4
- package/dist/Checkbox.js.map +1 -1
- package/dist/ColorPicker.js +3 -4
- package/dist/ColorPicker.js.map +1 -1
- package/dist/DatePicker.js +3 -3
- package/dist/Dropdown.js +2 -2
- package/dist/Dropdown.js.map +1 -1
- package/dist/Input.js +10 -10
- package/dist/Input.js.map +1 -1
- package/dist/Label.js +1 -4
- package/dist/Label.js.map +1 -1
- package/dist/Modal.js +9 -10
- package/dist/Modal.js.map +1 -1
- package/dist/MultiEmailInput.js +11 -11
- package/dist/MultiEmailInput.js.map +1 -1
- package/dist/NoData.js +5 -7
- package/dist/NoData.js.map +1 -1
- package/dist/Pane.js +5 -6
- package/dist/Pane.js.map +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/ProgressBar.js.map +1 -1
- package/dist/Radio.js +6 -6
- package/dist/Radio.js.map +1 -1
- package/dist/Select.js +19 -24
- package/dist/Select.js.map +1 -1
- package/dist/Sidebar.js +10 -11
- package/dist/Sidebar.js.map +1 -1
- package/dist/Slider.js +3 -3
- package/dist/Slider.js.map +1 -1
- package/dist/Spinner.js +1 -2
- package/dist/Spinner.js.map +1 -1
- package/dist/Stepper.js +1 -1
- package/dist/Stepper.js.map +1 -1
- package/dist/Switch.js +5 -7
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.js +3 -4
- package/dist/Tab.js.map +1 -1
- package/dist/Table.js +4 -4
- package/dist/Table.js.map +1 -1
- package/dist/Tag.js +1 -3
- package/dist/Tag.js.map +1 -1
- package/dist/{Textarea-CEwODEM3.js → Textarea-DucQtmjX.js} +6 -6
- package/dist/Textarea-DucQtmjX.js.map +1 -0
- package/dist/Textarea.js +1 -1
- package/dist/TimePicker.js +3 -3
- package/dist/Toastr.js +3 -8
- package/dist/Toastr.js.map +1 -1
- package/dist/Tooltip.js +1 -1
- package/dist/Tooltip.js.map +1 -1
- package/dist/TreeSelect.js +1 -1
- package/dist/TreeSelect.js.map +1 -1
- package/dist/cjs/ActionDropdown.js +0 -1
- package/dist/cjs/ActionDropdown.js.map +1 -1
- package/dist/cjs/Alert.js +6 -6
- package/dist/cjs/Alert.js.map +1 -1
- package/dist/cjs/Avatar.js +5 -9
- package/dist/cjs/Avatar.js.map +1 -1
- package/dist/cjs/Checkbox.js +4 -4
- package/dist/cjs/Checkbox.js.map +1 -1
- package/dist/cjs/ColorPicker.js +3 -4
- package/dist/cjs/ColorPicker.js.map +1 -1
- package/dist/cjs/DatePicker.js +3 -3
- package/dist/cjs/Dropdown.js +2 -2
- package/dist/cjs/Dropdown.js.map +1 -1
- package/dist/cjs/Input.js +10 -10
- package/dist/cjs/Input.js.map +1 -1
- package/dist/cjs/Label.js +1 -4
- package/dist/cjs/Label.js.map +1 -1
- package/dist/cjs/Modal.js +9 -10
- package/dist/cjs/Modal.js.map +1 -1
- package/dist/cjs/MultiEmailInput.js +11 -11
- package/dist/cjs/MultiEmailInput.js.map +1 -1
- package/dist/cjs/NoData.js +5 -7
- package/dist/cjs/NoData.js.map +1 -1
- package/dist/cjs/Pane.js +5 -6
- package/dist/cjs/Pane.js.map +1 -1
- package/dist/cjs/ProgressBar.js +1 -1
- package/dist/cjs/ProgressBar.js.map +1 -1
- package/dist/cjs/Radio.js +6 -6
- package/dist/cjs/Radio.js.map +1 -1
- package/dist/cjs/Select.js +19 -24
- package/dist/cjs/Select.js.map +1 -1
- package/dist/cjs/Sidebar.js +10 -11
- package/dist/cjs/Sidebar.js.map +1 -1
- package/dist/cjs/Slider.js +3 -3
- package/dist/cjs/Slider.js.map +1 -1
- package/dist/cjs/Spinner.js +1 -2
- package/dist/cjs/Spinner.js.map +1 -1
- package/dist/cjs/Stepper.js +1 -1
- package/dist/cjs/Stepper.js.map +1 -1
- package/dist/cjs/Switch.js +5 -7
- package/dist/cjs/Switch.js.map +1 -1
- package/dist/cjs/Tab.js +3 -4
- package/dist/cjs/Tab.js.map +1 -1
- package/dist/cjs/Table.js +4 -4
- package/dist/cjs/Table.js.map +1 -1
- package/dist/cjs/Tag.js +1 -3
- package/dist/cjs/Tag.js.map +1 -1
- package/dist/cjs/{Textarea-CdPvAT3A.js → Textarea-BxE7T1u3.js} +6 -6
- package/dist/cjs/Textarea-BxE7T1u3.js.map +1 -0
- package/dist/cjs/Textarea.js +1 -1
- package/dist/cjs/TimePicker.js +3 -3
- package/dist/cjs/Toastr.js +3 -8
- package/dist/cjs/Toastr.js.map +1 -1
- package/dist/cjs/Tooltip.js +1 -1
- package/dist/cjs/Tooltip.js.map +1 -1
- package/dist/cjs/TreeSelect.js +1 -1
- package/dist/cjs/TreeSelect.js.map +1 -1
- package/dist/cjs/formik/ActionBlock.js +2 -4
- package/dist/cjs/formik/ActionBlock.js.map +1 -1
- package/dist/cjs/formik/BlockNavigation.js +6 -6
- package/dist/cjs/formik/BlockNavigation.js.map +1 -1
- package/dist/cjs/formik/Textarea.js +1 -1
- package/dist/cjs/formik/index.js +2 -2
- package/dist/cjs/{index-ouVGQMJ2.js → index-BGsAR8rN.js} +14 -15
- package/dist/cjs/index-BGsAR8rN.js.map +1 -0
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/{useOverlayManager-BWAg7Jhg.js → useOverlayManager-BMNCjew1.js} +3 -4
- package/dist/cjs/{useOverlayManager-BWAg7Jhg.js.map → useOverlayManager-BMNCjew1.js.map} +1 -1
- package/dist/formik/ActionBlock.js +2 -4
- package/dist/formik/ActionBlock.js.map +1 -1
- package/dist/formik/BlockNavigation.js +6 -6
- package/dist/formik/BlockNavigation.js.map +1 -1
- package/dist/formik/Textarea.js +1 -1
- package/dist/formik/index.js +2 -2
- package/dist/{index-Ui8-igXs.js → index-Dlo3HdFv.js} +14 -15
- package/dist/index-Dlo3HdFv.js.map +1 -0
- package/dist/index.js +3 -3
- package/dist/{useOverlayManager-DGTN4LZe.js → useOverlayManager-Bn2Stdmg.js} +3 -4
- package/dist/{useOverlayManager-DGTN4LZe.js.map → useOverlayManager-Bn2Stdmg.js.map} +1 -1
- package/package.json +1 -1
- package/dist/Textarea-CEwODEM3.js.map +0 -1
- package/dist/cjs/Textarea-CdPvAT3A.js.map +0 -1
- package/dist/cjs/index-ouVGQMJ2.js.map +0 -1
- package/dist/index-Ui8-igXs.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -84,7 +84,7 @@ The auto-migration worked successfully and effectively transitioned the files to
|
|
|
84
84
|
|
|
85
85
|
## 8.2.78 - 2025-04-15
|
|
86
86
|
|
|
87
|
-
- Added: `
|
|
87
|
+
- Added: `dataTestid` prop to *Select* component.
|
|
88
88
|
|
|
89
89
|
## 8.2.77 - 2025-04-11
|
|
90
90
|
|
|
@@ -136,13 +136,13 @@ The auto-migration worked successfully and effectively transitioned the files to
|
|
|
136
136
|
## 8.2.67 - 2025-03-18
|
|
137
137
|
- Fixed issue with *Table* column reordering
|
|
138
138
|
## 8.2.65 - 2025-03-10
|
|
139
|
-
Added: `data-
|
|
139
|
+
Added: `data-testid` labels for *HeaderCellMenu* and *CellContent*.
|
|
140
140
|
## 8.2.62 - 2025-02-19
|
|
141
141
|
- Fixed: Pane footer cut-off issue in iOS Safari.
|
|
142
142
|
iPad Pro (11-inch) - Tested using Xcode
|
|
143
143
|

|
|
144
144
|
## 8.2.60 - 2025-02-11
|
|
145
|
-
Fixed data-
|
|
145
|
+
Fixed data-testid label for *Input*.
|
|
146
146
|
## 8.2.59 - 2025-02-07
|
|
147
147
|
- Fixed TypeError in `useOverlay` hook.
|
|
148
148
|
## 8.2.58 - 2025-02-07
|
|
@@ -152,7 +152,7 @@ Fixed data-cy label for *Input*.
|
|
|
152
152
|
## 8.2.56 - 2025-02-06
|
|
153
153
|
- Added logic to show clear selection callout when all table rows are selected
|
|
154
154
|
## 8.2.53 - 2025-01-23
|
|
155
|
-
- Added: `data-
|
|
155
|
+
- Added: `data-testid` label for *ProgressBar*
|
|
156
156
|
## 8.2.52 - 2025-01-22
|
|
157
157
|
|
|
158
158
|
- Fixed TypeError in Pane component.
|
|
@@ -185,7 +185,7 @@ Fixed data-cy label for *Input*.
|
|
|
185
185
|
|
|
186
186
|
## 8.2.45 - 2024-12-06
|
|
187
187
|
|
|
188
|
-
Changed the `data-
|
|
188
|
+
Changed the `data-testid` prop for *Toast* message component.
|
|
189
189
|
|
|
190
190
|
## 8.2.44 - 2024-12-06
|
|
191
191
|
|
|
@@ -209,17 +209,17 @@ Documentation - https://craig.is/killing/mice
|
|
|
209
209
|
## 8.2.40 - 2024-11-27
|
|
210
210
|
|
|
211
211
|
- The false value of the prop `icon` was ignored in the implementations before v9.0.2.
|
|
212
|
-
|
|
212
|
+
|
|
213
213
|
- After 9.0.2, the [implementation](https://github.com/fkhadra/react-toastify/blob/main/src/components/Toast.tsx#L108-L117) is such that the icon is rendered as passed in the config.
|
|
214
|
-
|
|
214
|
+
|
|
215
215
|
- Since the `false` value was used to show the default icon set internally, replaced it with a function that returns null
|
|
216
216
|
which solved the problem.
|
|
217
|
-
|
|
217
|
+
|
|
218
218
|
- Code ref: https://github.com/fkhadra/react-toastify/blob/v8.0.1/src/components/Toast.tsx#L65-L75.
|
|
219
219
|
- The `if (icon === false)` statement was never success for some reason.
|
|
220
|
-
|
|
220
|
+
|
|
221
221
|
- PR which addressed this issue: https://github.com/fkhadra/react-toastify/pull/758
|
|
222
|
-
|
|
222
|
+
|
|
223
223
|
|
|
224
224
|
## 8.2.39 - 2024-11-27
|
|
225
225
|
|
|
@@ -292,7 +292,7 @@ Upgraded the Rollup package to latest version(4.24.1), and its plugins as well!
|
|
|
292
292
|
|
|
293
293
|
## 8.2.23 - 2024-10-08
|
|
294
294
|
|
|
295
|
-
Added: `data-
|
|
295
|
+
Added: `data-testid` prop to *Check* and *Close* icons in *Switch* component.
|
|
296
296
|
|
|
297
297
|
## 8.2.22 - 2024-10-07
|
|
298
298
|
|
|
@@ -339,7 +339,7 @@ The existing implementation was ignoring the already set fixed columns. This wil
|
|
|
339
339
|
<img width="1438" alt="Screenshot 2024-09-13 at 12 58 28 PM" src="https://github.com/user-attachments/assets/ab934456-c014-4bdb-b03b-709333e98d6a">
|
|
340
340
|
<img width="1159" alt="Screenshot 2024-09-13 at 12 26 11 PM" src="https://github.com/user-attachments/assets/73317b59-15f5-429b-8458-359934b216de">
|
|
341
341
|
## 8.2.13 - 2024-09-10
|
|
342
|
-
Added: `data-
|
|
342
|
+
Added: `data-testid` prop to *Radio* input
|
|
343
343
|
## 8.2.11 - 2024-09-05
|
|
344
344
|
https://deepak-jose.neetorecord.com/watch/ab0a7044-22de-4564-a015-0002ed390736
|
|
345
345
|
## 8.2.7 - 2024-08-26
|
|
@@ -444,7 +444,7 @@ Updates all formik components in neetoUI to use status to show server error and
|
|
|
444
444
|
- Updated: Storybook theme to match the branding.
|
|
445
445
|
- Improved: Documentation readability.
|
|
446
446
|
## 6.8.3 - 2024-06-24
|
|
447
|
-
- Added option to pass data-
|
|
447
|
+
- Added option to pass data-testid to accordion
|
|
448
448
|
|
|
449
449
|
## 6.8.2 - 2024-06-19
|
|
450
450
|
|
|
@@ -612,7 +612,7 @@ After
|
|
|
612
612
|
|
|
613
613
|
## 6.2.5 - 2024-02-12
|
|
614
614
|
|
|
615
|
-
Added: `data-
|
|
615
|
+
Added: `data-testid` to Tag container div.
|
|
616
616
|
|
|
617
617
|
## 6.2.4 - 2024-02-12
|
|
618
618
|
|
|
@@ -643,7 +643,7 @@ Added: Ability to see info about a table column
|
|
|
643
643
|
## 6.0.5 - 2023-12-22
|
|
644
644
|
- Fixed: Pane scroll issue.
|
|
645
645
|
## 6.0.3 - 2023-12-15
|
|
646
|
-
Added: data-
|
|
646
|
+
Added: data-testid to *Spinner*
|
|
647
647
|
**Reviewers**
|
|
648
648
|
<!---
|
|
649
649
|
------------- FORMAT FOR DESCRIPTION -------------
|
|
@@ -734,9 +734,9 @@ Changed: Updated instances of `@reach/autoid` with React `useId`
|
|
|
734
734
|
- Changed: reduced pagination margin top and margin bottom values to make it
|
|
735
735
|
more compact.
|
|
736
736
|
## 5.2.24 - 2023-11-07
|
|
737
|
-
Added: data-
|
|
737
|
+
Added: data-testid attribute to TextArea
|
|
738
738
|
## 5.2.23 - 2023-11-06
|
|
739
|
-
Added: data-
|
|
739
|
+
Added: data-testid attributes to Select, DatePicker and Tags
|
|
740
740
|
## 5.2.21 - 2023-10-27
|
|
741
741
|
Added: `TimePickerInput` component
|
|
742
742
|
## 5.2.20 - 2023-10-26
|
|
@@ -941,7 +941,7 @@ This PR adds the following changes to the *Switch* component.
|
|
|
941
941
|
## 4.4.11 - 2023-03-14
|
|
942
942
|
|
|
943
943
|
- Added: `liveChat` prop to *HelpSection* component.
|
|
944
|
-
- Added: data-
|
|
944
|
+
- Added: data-testid to `helpLink` prop.
|
|
945
945
|
- Changed: label into an optional value in LinkType.
|
|
946
946
|
|
|
947
947
|
## 4.4.10 - 2023-03-14
|
|
@@ -1187,7 +1187,7 @@ Changes documentations to sentence case from title casing.
|
|
|
1187
1187
|
## 4.0.6 - 2022-09-20
|
|
1188
1188
|
- Changed: default value of `defaultPageSize` prop of *Table* component from 100 to 15.
|
|
1189
1189
|
## 4.0.5 - 2022-09-20
|
|
1190
|
-
- Added: type support for data-
|
|
1190
|
+
- Added: type support for data-testid props in all components that are forward referenced to HTML native elements.
|
|
1191
1191
|
## 4.0.4 - 2022-09-16
|
|
1192
1192
|
- Changed: Allowed `hideOnSinglePage` override in *Table* `paginationProps`
|
|
1193
1193
|
## 4.0.3 - 2022-09-13
|
|
@@ -1462,7 +1462,7 @@ Fixed: `TypeError` issue in *Toastr* component.
|
|
|
1462
1462
|
## 3.3.4
|
|
1463
1463
|
- Added: `hideOnTargetExit` prop to *Tooltip* component
|
|
1464
1464
|
## 3.3.3
|
|
1465
|
-
- Added: data-
|
|
1465
|
+
- Added: data-testid for in *Alert* component elements
|
|
1466
1466
|
## 3.3.2
|
|
1467
1467
|
- Fixed: Added override for `onClick` prop in *Dropdown* component
|
|
1468
1468
|
## 3.3.1
|
|
@@ -1485,4 +1485,4 @@ Fixed: `TypeError` issue in *Toastr* component.
|
|
|
1485
1485
|
- Changed: Made *Modal* Header text and Close icon aligned in a line
|
|
1486
1486
|
- Added: new variant for *Danger Button* -`danger-text`
|
|
1487
1487
|
- Added: new accent colors
|
|
1488
|
-
- 
|
|
1488
|
+
- 
|
package/dist/ActionDropdown.js
CHANGED
|
@@ -61,7 +61,6 @@ var ActionDropdown = function ActionDropdown(_ref) {
|
|
|
61
61
|
disabled: disabled,
|
|
62
62
|
label: label,
|
|
63
63
|
onClick: onClick,
|
|
64
|
-
"data-cy": "action-dropdown-btn",
|
|
65
64
|
"data-testid": "action-dropdown-btn",
|
|
66
65
|
size: size !== null && size !== void 0 ? size : buttonSize,
|
|
67
66
|
style: style !== null && style !== void 0 ? style : buttonStyle
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionDropdown.js","sources":["../src/components/ActionDropdown.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport { noop } from \"utils\";\n\nimport Button from \"./Button\";\nimport Dropdown from \"./Dropdown\";\n\nconst BTN_STYLES = { primary: \"primary\", secondary: \"secondary\" };\n\nconst BTN_SIZES = {\n small: \"small\",\n medium: \"medium\",\n large: \"large\",\n};\n\nconst ActionDropdown = ({\n label = \"\",\n buttonStyle = BTN_STYLES.primary,\n buttonSize = BTN_SIZES.medium,\n disabled = false,\n onClick = noop,\n buttonProps: { style, size, ...buttonProps } = {},\n className = \"\",\n dropdownProps,\n children,\n portalProps,\n}) => (\n <div className={classnames([\"neeto-ui-action-dropdown\", className])}>\n <Button\n {...{ disabled, label, onClick }}\n data-
|
|
1
|
+
{"version":3,"file":"ActionDropdown.js","sources":["../src/components/ActionDropdown.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport { noop } from \"utils\";\n\nimport Button from \"./Button\";\nimport Dropdown from \"./Dropdown\";\n\nconst BTN_STYLES = { primary: \"primary\", secondary: \"secondary\" };\n\nconst BTN_SIZES = {\n small: \"small\",\n medium: \"medium\",\n large: \"large\",\n};\n\nconst ActionDropdown = ({\n label = \"\",\n buttonStyle = BTN_STYLES.primary,\n buttonSize = BTN_SIZES.medium,\n disabled = false,\n onClick = noop,\n buttonProps: { style, size, ...buttonProps } = {},\n className = \"\",\n dropdownProps,\n children,\n portalProps,\n}) => (\n <div className={classnames([\"neeto-ui-action-dropdown\", className])}>\n <Button\n {...{ disabled, label, onClick }}\n data-testid=\"action-dropdown-btn\"\n size={size ?? buttonSize}\n style={style ?? buttonStyle}\n {...buttonProps}\n />\n <Dropdown\n {...{ disabled }}\n buttonProps={{ size: size ?? buttonSize }}\n buttonStyle={style ?? buttonStyle}\n {...dropdownProps}\n dropdownProps={{ ...dropdownProps?.dropdownProps, ...portalProps }}\n >\n {children}\n </Dropdown>\n </div>\n);\n\nActionDropdown.Menu = Dropdown.Menu;\nActionDropdown.MenuItem = Dropdown.MenuItem;\nActionDropdown.Divider = Dropdown.Divider;\n\nActionDropdown.propTypes = {\n /**\n * To specify the text to be displayed inside the button.\n */\n label: PropTypes.string,\n /**\n * To specify the style of the button to be rendered as the ActionDropdown target.\n */\n buttonStyle: PropTypes.oneOf(Object.values(BTN_STYLES)),\n /**\n * To specify the size of the ActionDropdown.\n */\n buttonSize: PropTypes.oneOf(Object.values(BTN_SIZES)),\n /**\n * To specify whether the ActionDropdown is disabled or not.\n */\n disabled: PropTypes.bool,\n /**\n * To specify the action to be triggered on click of the button.\n */\n onClick: PropTypes.func,\n /**\n * To specify the props to be passed to the action button and Dropdown target button.\n */\n buttonProps: PropTypes.object,\n /**\n * To specify the props to be passed to the Dropdown target.\n */\n dropdownProps: PropTypes.object,\n /**\n * To specify the props to be passed to the Dropdown portal.\n */\n portalProps: PropTypes.object,\n /**\n * To provide external classnames to ActionDropdown target wrapper.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered inside the Dropdown.\n */\n children: PropTypes.node,\n /**\n * * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-danger mb-2\">\n * Removed\n * </div>\n * _Use `buttonStyle` prop instead._\n */\n style: PropTypes.oneOf(Object.values(BTN_STYLES)),\n /**\n * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-danger mb-2\">\n * Removed\n * </div>\n * _Use `buttonSize` prop instead._\n */\n size: PropTypes.oneOf(Object.values(BTN_SIZES)),\n};\n\nexport default ActionDropdown;\n"],"names":["BTN_STYLES","primary","BTN_SIZES","small","medium","ActionDropdown","_ref","_ref$label","label","_ref$buttonStyle","buttonStyle","_ref$buttonSize","buttonSize","_ref$disabled","disabled","_ref$onClick","onClick","noop","_ref$buttonProps","buttonProps","_ref$buttonProps2","style","size","_objectWithoutProperties","_excluded","_ref$className","className","dropdownProps","children","portalProps","_jsxs","classnames","_jsx","Button","_objectSpread","Dropdown","Menu","MenuItem","Divider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAMA,UAAU,GAAG;AAAEC,EAAAA,OAAO,EAAE,SAAkC,CAAC;AAEjE,IAAMC,SAAS,GAAG;AAChBC,EACAC,MAAM,EAAE,QAEV,CAAC;AAED,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAAC,UAAA,GAAAD,IAAA,CAClBE,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,UAAA;IAAAE,gBAAA,GAAAH,IAAA,CACVI,WAAW;AAAXA,IAA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,aAAA,EAAY,qBAAqB;AACjCM,MAAAA,IAAI,EAAEA,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,MAAA,GAAJA,IAAI,GAAIV,UAAW;AACzBS,MAAAA,KAAK,EAAEA,KAAK,KAAA,IAAA,IAALA,KAAK,KAAA,MAAA,GAALA,KAAK,GAAIX;KAAY,EACxBS,WAAW,CAChB,CAAC,eACFa,GAAA,CAACG,QAAQ,EAAAD,aAAA,CAAAA,aAAA,CAAA;AACDpB,MAAAA,QAAQ,EAARA,QAAQ;AACdK,MAAAA,WAAW,EAAE;AAAEG,QAAAA,IAAI,EAAEA,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,MAAA,GAAJA,IAAI,GAAIV;OAAa;AAC1CF,MAAAA,WAAW,EAAEW,KAAK,KAAA,IAAA,IAALA,KAAK,KAAA,MAAA,GAALA,KAAK,GAAIX;AAAY,KAAA,EAC9BiB,aAAa,CAAA,EAAA,EAAA,EAAA;AACjBA,MAAAA,aAAa,EAAAO,aAAA,CAAAA,aAAA,KAAOP,aAAa,KAAA,IAAA,IAAbA,aAAa,KAAA,MAAA,GAAA,MAAA,GAAbA,aAAa,CAAEA,aAAa,CAAA,EAAKE,WAAW,CAAG;AAAAD,MAAAA,QAAA,EAElEA;AAAQ,KAAA,CACD,CAAC;AAAA,GACR,CAAC;AAAA;AAGRvB,cAAc,CAAC+B,IAAI,GAAGD,QAAQ,CAACC,IAAI;AACnC/B,cAAc,CAACgC,QAAQ,GAAGF,QAAQ,CAACE,QAAQ;AAC3ChC,cAAc,CAACiC,OAAO,GAAGH,QAAQ,CAACG,OAAO;;;;"}
|
package/dist/Alert.js
CHANGED
|
@@ -13,7 +13,7 @@ import '@babel/runtime/helpers/slicedToArray';
|
|
|
13
13
|
import '@tippyjs/react';
|
|
14
14
|
import 'tippy.js';
|
|
15
15
|
import '@bigbinary/neeto-icons/Close';
|
|
16
|
-
import './useOverlayManager-
|
|
16
|
+
import './useOverlayManager-Bn2Stdmg.js';
|
|
17
17
|
import '@babel/runtime/helpers/esm/extends';
|
|
18
18
|
import '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';
|
|
19
19
|
import '@babel/runtime/helpers/esm/inheritsLoose';
|
|
@@ -87,19 +87,19 @@ var Alert = function Alert(_ref) {
|
|
|
87
87
|
isOpen: isOpen,
|
|
88
88
|
onClose: onClose,
|
|
89
89
|
size: size,
|
|
90
|
-
"data-
|
|
90
|
+
"data-testid": "alert-box"
|
|
91
91
|
}, hasCustomFocusableElement && {
|
|
92
92
|
initialFocusRef: initialFocusRef || initialFocusElementRef
|
|
93
93
|
}), {}, {
|
|
94
94
|
children: [/*#__PURE__*/jsx(Modal.Header, {
|
|
95
95
|
children: /*#__PURE__*/jsx(Typography, {
|
|
96
|
-
"data-
|
|
96
|
+
"data-testid": "alert-title",
|
|
97
97
|
style: "h2",
|
|
98
98
|
children: title
|
|
99
99
|
})
|
|
100
100
|
}), /*#__PURE__*/jsx(Modal.Body, {
|
|
101
101
|
children: /*#__PURE__*/jsx(Typography, {
|
|
102
|
-
"data-
|
|
102
|
+
"data-testid": "alert-message",
|
|
103
103
|
lineHeight: "normal",
|
|
104
104
|
style: "body2",
|
|
105
105
|
children: message
|
|
@@ -107,13 +107,13 @@ var Alert = function Alert(_ref) {
|
|
|
107
107
|
}), /*#__PURE__*/jsxs(Modal.Footer, {
|
|
108
108
|
className: "neeto-ui-gap-2 neeto-ui-flex neeto-ui-justify-end neeto-ui-items-center",
|
|
109
109
|
children: [!hideCancelButton && /*#__PURE__*/jsx(Button, {
|
|
110
|
-
"data-
|
|
110
|
+
"data-testid": "alert-cancel-button",
|
|
111
111
|
label: cancelButtonLabel,
|
|
112
112
|
ref: cancelButtonRef,
|
|
113
113
|
style: "tertiary",
|
|
114
114
|
onClick: onClose
|
|
115
115
|
}), /*#__PURE__*/jsx(Button, {
|
|
116
|
-
"data-
|
|
116
|
+
"data-testid": "alert-submit-button",
|
|
117
117
|
disabled: isSubmitting || !isOpen,
|
|
118
118
|
label: submitButtonLabel,
|
|
119
119
|
loading: isSubmitting,
|
package/dist/Alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sources":["../src/components/Alert.jsx"],"sourcesContent":["import React, { useRef } from \"react\";\n\nimport PropTypes from \"prop-types\";\n\nimport Button from \"./Button\";\nimport Modal from \"./Modal\";\nimport Typography from \"./Typography\";\n\nconst SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nconst FOCUSABLE_ELEMENTS = { submit: \"submit\", cancel: \"cancel\" };\n\nconst Alert = ({\n size = SIZES.medium,\n isOpen = false,\n isSubmitting = false,\n className = \"\",\n closeOnEsc = true,\n closeButton = true,\n backdropClassName = \"\",\n closeOnOutsideClick = true,\n onClose = () => {},\n onSubmit = () => {},\n title = \"\",\n message = \"\",\n submitButtonLabel = \"Continue\",\n cancelButtonLabel = \"Cancel\",\n initialFocusRef,\n initialFocusElement,\n hideCancelButton = false,\n}) => {\n const submitButtonRef = useRef(null);\n const cancelButtonRef = useRef(null);\n\n const hasCustomFocusableElement = !!initialFocusRef || initialFocusElement;\n const initialFocusElementRef =\n initialFocusElement === FOCUSABLE_ELEMENTS.submit\n ? submitButtonRef\n : cancelButtonRef;\n\n return (\n <Modal\n {...{\n backdropClassName,\n className,\n closeButton,\n closeOnEsc,\n closeOnOutsideClick,\n isOpen,\n onClose,\n size,\n }}\n data-
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../src/components/Alert.jsx"],"sourcesContent":["import React, { useRef } from \"react\";\n\nimport PropTypes from \"prop-types\";\n\nimport Button from \"./Button\";\nimport Modal from \"./Modal\";\nimport Typography from \"./Typography\";\n\nconst SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nconst FOCUSABLE_ELEMENTS = { submit: \"submit\", cancel: \"cancel\" };\n\nconst Alert = ({\n size = SIZES.medium,\n isOpen = false,\n isSubmitting = false,\n className = \"\",\n closeOnEsc = true,\n closeButton = true,\n backdropClassName = \"\",\n closeOnOutsideClick = true,\n onClose = () => {},\n onSubmit = () => {},\n title = \"\",\n message = \"\",\n submitButtonLabel = \"Continue\",\n cancelButtonLabel = \"Cancel\",\n initialFocusRef,\n initialFocusElement,\n hideCancelButton = false,\n}) => {\n const submitButtonRef = useRef(null);\n const cancelButtonRef = useRef(null);\n\n const hasCustomFocusableElement = !!initialFocusRef || initialFocusElement;\n const initialFocusElementRef =\n initialFocusElement === FOCUSABLE_ELEMENTS.submit\n ? submitButtonRef\n : cancelButtonRef;\n\n return (\n <Modal\n {...{\n backdropClassName,\n className,\n closeButton,\n closeOnEsc,\n closeOnOutsideClick,\n isOpen,\n onClose,\n size,\n }}\n data-testid=\"alert-box\"\n {...(hasCustomFocusableElement && {\n initialFocusRef: initialFocusRef || initialFocusElementRef,\n })}\n >\n <Modal.Header>\n <Typography data-testid=\"alert-title\" style=\"h2\">\n {title}\n </Typography>\n </Modal.Header>\n <Modal.Body>\n <Typography\n data-testid=\"alert-message\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {message}\n </Typography>\n </Modal.Body>\n <Modal.Footer className=\"neeto-ui-gap-2 neeto-ui-flex neeto-ui-justify-end neeto-ui-items-center\">\n {!hideCancelButton && (\n <Button\n data-testid=\"alert-cancel-button\"\n label={cancelButtonLabel}\n ref={cancelButtonRef}\n style=\"tertiary\"\n onClick={onClose}\n />\n )}\n <Button\n data-testid=\"alert-submit-button\"\n disabled={isSubmitting || !isOpen}\n label={submitButtonLabel}\n loading={isSubmitting}\n ref={submitButtonRef}\n style=\"danger\"\n onClick={onSubmit}\n />\n </Modal.Footer>\n </Modal>\n );\n};\n\nAlert.propTypes = {\n /**\n * To specify the size of the Alert.\n */\n size: PropTypes.oneOf(Object.values(SIZES)),\n /**\n * To specify whether the Alert is open or not.\n */\n isOpen: PropTypes.bool,\n /**\n * To specify the callback which will be invoked when the Alert is closed.\n */\n onClose: PropTypes.func,\n /**\n * To specify the callback which will be invoked when the Alert is submitted.\n */\n onSubmit: PropTypes.func,\n /**\n * To provide title to the Alert.\n */\n title: PropTypes.string,\n /**\n * To provide description to the Alert.\n */\n message: PropTypes.node,\n /**\n * To add loading state to submit button\n */\n isSubmitting: PropTypes.bool,\n /**\n * To provide external classNames to the Alert.\n */\n className: PropTypes.string,\n /**\n * To close the Alert on pressing the `Esc` key.\n */\n closeOnEsc: PropTypes.bool,\n /**\n * To specify whether the close button of the Alert should be displayed or not.\n */\n closeButton: PropTypes.bool,\n /**\n * To provide label to the submit button.\n */\n submitButtonLabel: PropTypes.string,\n /**\n * To provide label to the cancel button.\n */\n cancelButtonLabel: PropTypes.string,\n /**\n * To add custom classes to Backdrop component.\n */\n backdropClassName: PropTypes.string,\n /**\n * To close on clicking outside the Alert content.\n */\n closeOnOutsideClick: PropTypes.bool,\n /**\n * To specify the ref of the element which will receive focus when the Alert is opened.\n * If not specified, the focus will be set to the submit button inside the Alert.\n * */\n initialFocusRef: PropTypes.object,\n /**\n * To specify the element which will receive focus when the Alert is opened.\n */\n initialFocusElement: PropTypes.oneOf(Object.values(FOCUSABLE_ELEMENTS)),\n /**\n * To hide the cancel button\n */\n hideCancelButton: PropTypes.bool,\n};\n\nexport default Alert;\n"],"names":["SIZES","small","medium","FOCUSABLE_ELEMENTS","submit","Alert","_ref","_ref$size","size","_ref$isOpen","isOpen","_ref$isSubmitting","isSubmitting","_ref$className","className","_ref$closeOnEsc","closeOnEsc","_ref$closeButton","closeButton","_ref$backdropClassNam","backdropClassName","_ref$closeOnOutsideCl","closeOnOutsideClick","_ref$onClose","onClose","_ref$onSubmit","onSubmit","_ref$title","title","_ref$message","message","_ref$submitButtonLabe","submitButtonLabel","_ref$cancelButtonLabe","cancelButtonLabel","initialFocusRef","initialFocusElement","_ref$hideCancelButton","hideCancelButton","submitButtonRef","useRef","cancelButtonRef","hasCustomFocusableElement","initialFocusElementRef","_jsxs","Modal","_objectSpread","children","_jsx","Header","Typography","style","Body","lineHeight","Footer","Button","label","ref","onClick","disabled","loading"],"mappings":";;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,EAAY,qBAAqB;AACjCI,QAAAA,QAAQ,EAAE/C,YAAY,IAAI,CAACF,MAAO;AAClC8C,QAAAA,KAAK,EAAExB,iBAAkB;AACzB4B,QAAAA,OAAO,EAAEhD,YAAa;AACtB6C,QAAAA,GAAG,EAAElB,eAAgB;AACrBY,QAAAA,KAAK,EAAC,QAAQ;AACdO,QAAAA,OAAO,EAAEhC;AAAS,OACnB,CAAC;AAAA,KACU,CAAC;AAAA,GAAA,CACV,CAAC;AAEZ;;;;"}
|
package/dist/Avatar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
|
-
import
|
|
4
|
+
import { useState } from 'react';
|
|
5
5
|
import Avvvatars from 'avvvatars-react';
|
|
6
6
|
import classnames from 'classnames';
|
|
7
7
|
import { isNil, isEmpty } from 'ramda';
|
|
@@ -67,12 +67,6 @@ var Avatar = function Avatar(_ref) {
|
|
|
67
67
|
"neeto-ui-avatar__status-large": isLarge,
|
|
68
68
|
"neeto-ui-avatar__status-xlarge": isExtraLarge
|
|
69
69
|
});
|
|
70
|
-
var Indicator = function Indicator() {
|
|
71
|
-
return isNil(status) ? React__default.Fragment : /*#__PURE__*/jsx("span", {
|
|
72
|
-
className: statusClasses,
|
|
73
|
-
"data-testid": "indicator"
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
70
|
var shouldDisplayFallbackAvatar = !(imageUrl && !isLoadingFailed);
|
|
77
71
|
return /*#__PURE__*/jsx(Tooltip, _objectSpread(_objectSpread({
|
|
78
72
|
content: name,
|
|
@@ -82,10 +76,12 @@ var Avatar = function Avatar(_ref) {
|
|
|
82
76
|
children: /*#__PURE__*/jsxs("span", _objectSpread(_objectSpread({
|
|
83
77
|
onClick: onClick,
|
|
84
78
|
className: containerClasses,
|
|
85
|
-
"data-
|
|
86
|
-
"data-testid": "avatar"
|
|
79
|
+
"data-testid": "nui-avatar"
|
|
87
80
|
}, otherProps), {}, {
|
|
88
|
-
children: [
|
|
81
|
+
children: [!isNil(status) && /*#__PURE__*/jsx("span", {
|
|
82
|
+
className: statusClasses,
|
|
83
|
+
"data-testid": "indicator"
|
|
84
|
+
}), shouldDisplayFallbackAvatar ? /*#__PURE__*/jsx(Avvvatars, {
|
|
89
85
|
displayValue: getInitials(name),
|
|
90
86
|
size: SIZE[size],
|
|
91
87
|
value: name
|
package/dist/Avatar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sources":["../src/components/Avatar.jsx"],"sourcesContent":["import React, { useState } from \"react\";\n\nimport Avvvatars from \"avvvatars-react\";\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty, isNil } from \"ramda\";\n\nimport Tooltip from \"components/Tooltip\";\n\nconst SIZE = { small: 24, medium: 32, large: 40, extraLarge: 64 };\n\nconst STATUS = { online: \"online\", idle: \"idle\", offline: \"offline\" };\n\nconst getInitials = fullName => {\n if (typeof fullName !== \"string\" || isEmpty(fullName)) return \" \";\n const allNames = fullName.trim().split(\" \");\n if (allNames.length === 1) return fullName.substring(0, 2).toUpperCase();\n\n return `${allNames[0][0]}${allNames[allNames.length - 1][0]}`.toUpperCase();\n};\n\nconst Avatar = ({\n size = \"medium\",\n user = {},\n status = null,\n onClick = () => {},\n className = \"\",\n showTooltip = false,\n tooltipProps = {},\n ...otherProps\n}) => {\n const [isLoadingFailed, setIsLoadingFailed] = useState(false);\n\n const { name = \"\", imageUrl } = user;\n\n const isMedium = size === \"medium\";\n const isLarge = size === \"large\";\n const isExtraLarge = size === \"extraLarge\";\n\n const containerClasses = classNames(\n \"neeto-ui-avatar__container neeto-ui-select-none\",\n {\n \"neeto-ui-avatar__container--medium\": isMedium,\n \"neeto-ui-avatar__container--large\": isLarge,\n \"neeto-ui-avatar__container--xlarge\": isExtraLarge,\n },\n className\n );\n\n const imageClasses = classNames(\"neeto-ui-avatar\", {\n \"neeto-ui-avatar--medium\": isMedium,\n \"neeto-ui-avatar--large\": isLarge,\n \"neeto-ui-avatar--xlarge\": isExtraLarge,\n hidden: isLoadingFailed,\n });\n\n const statusClasses = classNames(\"neeto-ui-avatar__status\", status, {\n \"neeto-ui-avatar__status-medium\": isMedium,\n \"neeto-ui-avatar__status-large\": isLarge,\n \"neeto-ui-avatar__status-xlarge\": isExtraLarge,\n });\n\n const
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../src/components/Avatar.jsx"],"sourcesContent":["import React, { useState } from \"react\";\n\nimport Avvvatars from \"avvvatars-react\";\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty, isNil } from \"ramda\";\n\nimport Tooltip from \"components/Tooltip\";\n\nconst SIZE = { small: 24, medium: 32, large: 40, extraLarge: 64 };\n\nconst STATUS = { online: \"online\", idle: \"idle\", offline: \"offline\" };\n\nconst getInitials = fullName => {\n if (typeof fullName !== \"string\" || isEmpty(fullName)) return \" \";\n const allNames = fullName.trim().split(\" \");\n if (allNames.length === 1) return fullName.substring(0, 2).toUpperCase();\n\n return `${allNames[0][0]}${allNames[allNames.length - 1][0]}`.toUpperCase();\n};\n\nconst Avatar = ({\n size = \"medium\",\n user = {},\n status = null,\n onClick = () => {},\n className = \"\",\n showTooltip = false,\n tooltipProps = {},\n ...otherProps\n}) => {\n const [isLoadingFailed, setIsLoadingFailed] = useState(false);\n\n const { name = \"\", imageUrl } = user;\n\n const isMedium = size === \"medium\";\n const isLarge = size === \"large\";\n const isExtraLarge = size === \"extraLarge\";\n\n const containerClasses = classNames(\n \"neeto-ui-avatar__container neeto-ui-select-none\",\n {\n \"neeto-ui-avatar__container--medium\": isMedium,\n \"neeto-ui-avatar__container--large\": isLarge,\n \"neeto-ui-avatar__container--xlarge\": isExtraLarge,\n },\n className\n );\n\n const imageClasses = classNames(\"neeto-ui-avatar\", {\n \"neeto-ui-avatar--medium\": isMedium,\n \"neeto-ui-avatar--large\": isLarge,\n \"neeto-ui-avatar--xlarge\": isExtraLarge,\n hidden: isLoadingFailed,\n });\n\n const statusClasses = classNames(\"neeto-ui-avatar__status\", status, {\n \"neeto-ui-avatar__status-medium\": isMedium,\n \"neeto-ui-avatar__status-large\": isLarge,\n \"neeto-ui-avatar__status-xlarge\": isExtraLarge,\n });\n\n const shouldDisplayFallbackAvatar = !(imageUrl && !isLoadingFailed);\n\n return (\n <Tooltip\n content={name}\n disabled={!showTooltip}\n position=\"bottom\"\n {...tooltipProps}\n >\n <span\n {...{ onClick }}\n className={containerClasses}\n data-testid=\"nui-avatar\"\n {...otherProps}\n >\n {!isNil(status) && (\n <span className={statusClasses} data-testid=\"indicator\" />\n )}\n {shouldDisplayFallbackAvatar ? (\n <Avvvatars\n displayValue={getInitials(name)}\n size={SIZE[size]}\n value={name}\n />\n ) : (\n <img\n alt={`avatar-${name}`}\n className={imageClasses}\n src={imageUrl}\n onError={() => setIsLoadingFailed(true)}\n />\n )}\n </span>\n </Tooltip>\n );\n};\n\nAvatar.propTypes = {\n /**\n * Specify the dimension for Avatar component.\n */\n size: PropTypes.oneOf(Object.keys(SIZE)),\n user: PropTypes.shape({\n imageUrl: PropTypes.string,\n name: PropTypes.string,\n }),\n /**\n * To specify the action to be triggered on clicking the Avatar.\n */\n onClick: PropTypes.func,\n /**\n * To specify the status of the user if needed in Avatar component.\n */\n status: PropTypes.oneOf(Object.keys(STATUS)),\n /**\n * To display a tooltip with name of the user.\n */\n showTooltip: PropTypes.bool,\n /**\n * To specify the props to be passed to the tooltip.\n */\n tooltipProps: PropTypes.object,\n /**\n * To provide external classnames to Avatar component.\n */\n className: PropTypes.string,\n};\n\nexport default Avatar;\n"],"names":["SIZE","small","medium","large","extraLarge","getInitials","fullName","isEmpty","allNames","trim","split","length","substring","toUpperCase","concat","Avatar","_ref","_ref$size","size","_ref$user","user","_ref$status","status","_ref$onClick","onClick","_ref$className","className","_ref$showTooltip","showTooltip","_ref$tooltipProps","tooltipProps","otherProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isLoadingFailed","setIsLoadingFailed","_user$name","name","imageUrl","isMedium","isLarge","isExtraLarge","containerClasses","classNames","imageClasses","hidden","statusClasses","shouldDisplayFallbackAvatar","_jsx","Tooltip","_objectSpread","content","disabled","position","children","_jsxs","isNil","Avvvatars","displayValue","value","alt","src","onError"],"mappings":";;;;;;;;;;;;;;;AASA,IAAMA,IAAI,GAAG;AAAEC,EAAAA,KAAK,EAAE,EAAE;AAAEC,EAAAA,MAAM,EAAE,EAAE;AAAEC,EAAAA,KAAK,EAAE,EAAE;AAAEC,EAAAA,UAAU,EAAE;AAAG,CAAC;AAIjE,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAGC,QAAQ,EAAI;EAC9B,IAAI,OAAOA,QAAQ,KAAK,QAAQ,IAAIC,OAAO,CAACD,QAAQ,CAAC,EAAE,OAAO,GAAG;EACjE,IAAME,QAAQ,GAAGF,QAAQ,CAACG,IAAI,EAAE,CAACC,KAAK,CAAC,GAAG,CAAC;AAC3C,EAAA,IAAIF,QAAQ,CAACG,MAAM,KAAK,CAAC,EAAE,OAAOL,QAAQ,CAACM,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAACC,WAAW,EAAE;EAExE,OAAO,EAAA,CAAAC,MAAA,CAAGN,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,CAAAM,MAAA,CAAGN,QAAQ,CAACA,QAAQ,CAACG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,CAAGE,WAAW,EAAE;AAC7E,CAAC;AAED,IAAME,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EASN;AAAA,EAAA,IAAAC,SAAA,GAAAD,IAAA,CARJE,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAA,MAAA,GAAG,QAAQ,GAAAA,SAAA;IAA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A,CAAA,MAAA,EAAA;AAAM1B,QAAAA,SAAS,EAAEwB,aAAc;QAAC,aAAA,EAAY;AAAW,OAAE,CAC1D,EACAC,2BAA2B,gBAC1BC,GAAA,CAACS,SAAS,EAAA;AACRC,QAAAA,YAAY,EAAEzD,WAAW,CAACoC,IAAI,CAAE;AAChCvB,QAAAA,IAAI,EAAElB,IAAI,CAACkB,IAAI,CAAE;AACjB6C,QAAAA,KAAK,EAAEtB;OACR,CAAC,gBAEFW,GAAA,CAAA,KAAA,EAAA;AACEY,QAAAA,GAAG,EAAA,SAAA,CAAAlD,MAAA,CAAY2B,IAAI,CAAG;AACtBf,QAAAA,SAAS,EAAEsB,YAAa;AACxBiB,QAAAA,GAAG,EAAEvB,QAAS;QACdwB,OAAO,EAAE,SAATA,OAAOA,GAAA;UAAA,OAAQ3B,kBAAkB,CAAC,IAAI,CAAC;AAAA,QAAA;AAAC,OACzC,CACF;KAAA,CACG;AAAC,GAAA,CACA,CAAC;AAEd;;;;"}
|
package/dist/Checkbox.js
CHANGED
|
@@ -54,7 +54,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
54
54
|
className: classnames(["neeto-ui-checkbox__wrapper", className]),
|
|
55
55
|
children: [/*#__PURE__*/jsxs("div", {
|
|
56
56
|
className: "neeto-ui-checkbox__container",
|
|
57
|
-
"data-
|
|
57
|
+
"data-testid": "nui-checkbox-container",
|
|
58
58
|
children: [/*#__PURE__*/jsx("input", _objectSpread({
|
|
59
59
|
id: id,
|
|
60
60
|
ref: ref,
|
|
@@ -63,19 +63,19 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
63
63
|
"aria-invalid": !!error,
|
|
64
64
|
"aria-required": required,
|
|
65
65
|
className: "neeto-ui-checkbox",
|
|
66
|
-
"data-
|
|
66
|
+
"data-testid": "".concat(hyphenize(renderLabel), "-checkbox-input"),
|
|
67
67
|
name: id,
|
|
68
68
|
type: "checkbox"
|
|
69
69
|
}, otherProps)), renderLabel && /*#__PURE__*/jsx(Label, _objectSpread(_objectSpread({
|
|
70
70
|
required: required,
|
|
71
|
-
"data-
|
|
71
|
+
"data-testid": "".concat(hyphenize(renderLabel), "-checkbox-label"),
|
|
72
72
|
htmlFor: id
|
|
73
73
|
}, labelProps), {}, {
|
|
74
74
|
children: renderLabel
|
|
75
75
|
}))]
|
|
76
76
|
}), !!error && /*#__PURE__*/jsx("p", {
|
|
77
77
|
className: "neeto-ui-input__error",
|
|
78
|
-
"data-
|
|
78
|
+
"data-testid": "".concat(hyphenize(renderLabel), "-checkbox-error"),
|
|
79
79
|
id: errorId,
|
|
80
80
|
children: error
|
|
81
81
|
})]
|
package/dist/Checkbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../src/components/Checkbox.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport { useId } from \"hooks\";\nimport { hyphenize } from \"utils\";\n\nimport Label from \"./Label\";\n\nconst Checkbox = forwardRef(\n (\n {\n label = \"\",\n error = \"\",\n className = \"\",\n required = false,\n labelProps,\n children,\n ...otherProps\n },\n ref\n ) => {\n const id = useId(otherProps.id);\n const errorId = `error_${id}`;\n const renderLabel = label || children;\n\n return (\n <div className={classnames([\"neeto-ui-checkbox__wrapper\", className])}>\n <div\n className=\"neeto-ui-checkbox__container\"\n data-
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":["../src/components/Checkbox.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport { useId } from \"hooks\";\nimport { hyphenize } from \"utils\";\n\nimport Label from \"./Label\";\n\nconst Checkbox = forwardRef(\n (\n {\n label = \"\",\n error = \"\",\n className = \"\",\n required = false,\n labelProps,\n children,\n ...otherProps\n },\n ref\n ) => {\n const id = useId(otherProps.id);\n const errorId = `error_${id}`;\n const renderLabel = label || children;\n\n return (\n <div className={classnames([\"neeto-ui-checkbox__wrapper\", className])}>\n <div\n className=\"neeto-ui-checkbox__container\"\n data-testid=\"nui-checkbox-container\"\n >\n <input\n {...{ id, ref, required }}\n aria-describedby={error ? errorId : undefined}\n aria-invalid={!!error}\n aria-required={required}\n className=\"neeto-ui-checkbox\"\n data-testid={`${hyphenize(renderLabel)}-checkbox-input`}\n name={id}\n type=\"checkbox\"\n {...otherProps}\n />\n {renderLabel && (\n <Label\n {...{ required }}\n data-testid={`${hyphenize(renderLabel)}-checkbox-label`}\n htmlFor={id}\n {...labelProps}\n >\n {renderLabel}\n </Label>\n )}\n </div>\n {!!error && (\n <p\n className=\"neeto-ui-input__error\"\n data-testid={`${hyphenize(renderLabel)}-checkbox-error`}\n id={errorId}\n >\n {error}\n </p>\n )}\n </div>\n );\n }\n);\n\nCheckbox.displayName = \"Checkbox\";\n\nCheckbox.propTypes = {\n /**\n * To specify a unique ID to the Checkbox component.\n */\n id: PropTypes.string,\n /**\n * To specify the text to be displayed next to the Checkbox.\n */\n label: PropTypes.string,\n /**\n * To specify the label props to be passed to the Label component.\n */\n labelProps: PropTypes.object,\n /**\n * To specify the error message to be shown.\n */\n error: PropTypes.string,\n /**\n * To provide external classnames to Checkbox component.\n */\n className: PropTypes.string,\n /**\n * To specify whether the Checkbox is a required field or not.\n */\n required: PropTypes.bool,\n /**\n * To specify the children label to be rendered inside the Checkbox.\n */\n children: PropTypes.string,\n};\n\nexport default Checkbox;\n"],"names":["Checkbox","forwardRef","_ref","ref","_ref$label","label","_ref$error","error","_ref$className","className","_ref$required","required","labelProps","children","otherProps","_objectWithoutProperties","_excluded","id","useId","errorId","concat","renderLabel","_jsxs","classnames","_jsx","_objectSpread","undefined","hyphenize","name","type","Label","htmlFor","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAMA,QAAQ,gBAAGC,UAAU,CACzB,UAAAC,IAAA,EAUEC,GAAG,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AGY,OAAO,GAAGO,SAAU;QAC9C,cAAA,EAAc,CAAC,CAACnB,KAAM;AACtB,QAAA,eAAA,EAAeI,QAAS;AACxBF,QAAAA,SAAS,EAAC,mBAAmB;AAC7B,QAAA,aAAA,EAAA,EAAA,CAAAW,MAAA,CAAgBO,SAAS,CAACN,WAAW,CAAC,EAAA,iBAAA,CAAkB;AACxDO,QAAAA,IAAI,EAAEX,EAAG;AACTY,QAAAA,IAAI,EAAC;AAAU,OAAA,EACXf,UAAU,CACf,CAAC,EACDO,WAAW,iBACVG,GAAA,CAACM,KAAK,EAAAL,aAAA,CAAAA,aAAA,CAAA;AACEd,QAAAA,QAAQ,EAARA,QAAQ;AACd,QAAA,aAAA,EAAA,EAAA,CAAAS,MAAA,CAAgBO,SAAS,CAACN,WAAW,CAAC,EAAA,iBAAA,CAAkB;AACxDU,QAAAA,OAAO,EAAEd;AAAG,OAAA,EACRL,UAAU,CAAA,EAAA,EAAA,EAAA;AAAAC,QAAAA,QAAA,EAEbQ;AAAW,OAAA,CACP,CACR;AAAA,KACE,CAAC,EACL,CAAC,CAACd,KAAK,iBACNiB,GAAA,CAAA,GAAA,EAAA;AACEf,MAAAA,SAAS,EAAC,uBAAuB;AACjC,MAAA,aAAA,EAAA,EAAA,CAAAW,MAAA,CAAgBO,SAAS,CAACN,WAAW,CAAC,EAAA,iBAAA,CAAkB;AACxDJ,MAAAA,EAAE,EAAEE,OAAQ;AAAAN,MAAAA,QAAA,EAEXN;AAAK,KACL,CACJ;AAAA,GACE,CAAC;AAEV,CACF;AAEAP,QAAQ,CAACgC,WAAW,GAAG,UAAU;;;;"}
|
package/dist/ColorPicker.js
CHANGED
|
@@ -115,8 +115,7 @@ var Target = function Target(_ref) {
|
|
|
115
115
|
color = _ref.color,
|
|
116
116
|
colorValue = _ref.colorValue;
|
|
117
117
|
return /*#__PURE__*/jsxs("button", {
|
|
118
|
-
"data-
|
|
119
|
-
"data-testid": "neeto-color-picker",
|
|
118
|
+
"data-testid": "color-picker-target",
|
|
120
119
|
type: "button",
|
|
121
120
|
className: classnames("neeto-ui-colorpicker__target", {
|
|
122
121
|
"neeto-ui-colorpicker__target-size--large": size === TARGET_SIZES.large,
|
|
@@ -306,13 +305,13 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
306
305
|
className: "neeto-ui-input__wrapper",
|
|
307
306
|
children: /*#__PURE__*/jsx("div", {
|
|
308
307
|
className: "neeto-ui-colorpicker__input neeto-ui-input neeto-ui-input--small",
|
|
309
|
-
"data-
|
|
308
|
+
"data-testid": "colorpicker-editable-input",
|
|
310
309
|
children: /*#__PURE__*/jsx(HexColorInput, {
|
|
311
310
|
onBlur: onBlur,
|
|
312
311
|
prefixed: true,
|
|
313
312
|
alpha: !!showTransparencyControl,
|
|
314
313
|
color: colorValue,
|
|
315
|
-
"data-
|
|
314
|
+
"data-testid": "colorpicker-editable-input-textbox",
|
|
316
315
|
onChange: onColorInputChange
|
|
317
316
|
})
|
|
318
317
|
})
|
package/dist/ColorPicker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.js","sources":["../node_modules/use-eye-dropper/lib/use-eye-dropper.module.js","../node_modules/use-eye-dropper/lib/index.module.js","../src/components/ColorPicker/constants.js","../src/components/ColorPicker/Palette.jsx","../src/components/ColorPicker/Target.jsx","../src/components/ColorPicker/index.jsx"],"sourcesContent":["import{useMemo as r,useRef as o,useCallback as n,useEffect as t,useState as e}from\"react\";const i=()=>\"undefined\"!=typeof window&&\"EyeDropper\"in window,s=()=>{throw new Error(\"Unsupported browser.\")},a=a=>{const c=r(()=>{var r;return(r=i()&&new EyeDropper(a))?EyeDropper.prototype.open.bind(r):s},[a]),[p,w]=(()=>{const r=o(),[s,a]=e(!1);t(()=>(r.current=!0,a(i()),()=>{r.current=!1}),[]);const c=n(()=>s,[s]);return[r,c]})(),f=o(),u=n(()=>{void 0!==f.current&&f.current.abort()},[f]),d=n(async function(r){void 0===r&&(r={}),u();const{signal:o,...n}=r,t=new AbortController;f.current=t;const e=void 0!==o?(r=>{if(\"any\"in AbortSignal)return AbortSignal.any(r);const o=new AbortController,n=()=>{o.abort();for(const o of r)o.removeEventListener(\"abort\",n)};for(const o of r){if(o.aborted){n();break}o.addEventListener(\"abort\",n)}return o.signal})([o,t.signal]):t.signal;try{return await c({...n,signal:e})}catch(r){throw p.current||(r.canceled=!0),r}},[f,p,u,c]);return t(()=>u,[u]),{open:d,close:u,isSupported:w}};export{a as default};\n","import { default as DropperDev } from './use-eye-dropper.module.dev.js'\nimport { default as Dropper } from './use-eye-dropper.module.js'\n\nexport default process.env.NODE_ENV === 'production' ? Dropper : DropperDev\n","export const DEFAULT_PALETTE_COLORS = [\n { hex: \"#FFFFFF\" },\n { hex: \"#D6D6D6\" },\n { hex: \"#0A0E13\" },\n { hex: \"#FECE1E\" },\n { hex: \"#F32E48\" },\n { hex: \"#02C39A\" },\n { hex: \"#2A79C4\" },\n { hex: \"#B3E5FC\" },\n { hex: \"#C3C6F9\" },\n { hex: \"#8064CE\" },\n { hex: \"#FE861E\" },\n { hex: \"#FF7DC9\" },\n { hex: \"#028090\" },\n { hex: \"#095482\" },\n];\n\nexport const TARGET_SIZES = {\n large: \"large\",\n medium: \"medium\",\n small: \"small\",\n};\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport tinycolor from \"tinycolor2\";\n\nimport { DEFAULT_PALETTE_COLORS } from \"./constants\";\n\nconst Palette = ({ color, colorList = DEFAULT_PALETTE_COLORS, onChange }) => (\n <div className=\"neeto-ui-flex neeto-ui-flex-row neeto-ui-flex-wrap neeto-ui-items-start neeto-ui-justify-start neeto-ui-color-palette neeto-ui-gap-1\">\n {colorList.map(item => {\n const { hex, rgb } = item;\n const colorObject = tinycolor(hex ?? rgb);\n const isTransparent = colorObject.getAlpha() === 0;\n const isActive = Boolean(\n // hex is case insensitive.\n color?.toLocaleLowerCase() === hex?.toLocaleLowerCase() || color === rgb\n );\n\n return (\n <div\n data-testid=\"color-palette-item\"\n key={hex ?? rgb}\n className={classnames(\n \"neeto-ui-color-palette__item neeto-ui-border\",\n { active: isActive }\n )}\n onClick={() => onChange(hex ?? rgb)}\n >\n <div\n style={{ backgroundColor: hex ?? rgb }}\n className={classnames({\n \"transparent-bg-pattern\": isTransparent,\n })}\n />\n </div>\n );\n })}\n </div>\n);\n\nPalette.propTypes = {\n color: PropTypes.string,\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n hex: PropTypes.string,\n rgb: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({\n r: PropTypes.number,\n g: PropTypes.number,\n b: PropTypes.number,\n }),\n ]),\n })\n ),\n onChange: PropTypes.func,\n};\n\nexport default Palette;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { Down } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\n\nimport { TARGET_SIZES } from \"./constants\";\n\nconst Target = ({ size, showHexValue, color, colorValue }) => (\n <button\n data-cy=\"color-picker-target\"\n data-testid=\"neeto-color-picker\"\n type=\"button\"\n className={classnames(\"neeto-ui-colorpicker__target\", {\n \"neeto-ui-colorpicker__target-size--large\": size === TARGET_SIZES.large,\n \"neeto-ui-colorpicker__target-size--medium\": size === TARGET_SIZES.medium,\n \"neeto-ui-colorpicker__target-size--small\": size === TARGET_SIZES.small,\n })}\n >\n {showHexValue && (\n <span className=\"neeto-ui-colorpicker-target__code\">{color}</span>\n )}\n <span className=\"neeto-ui-colorpicker-target__color-wrapper\">\n <span\n className=\"neeto-ui-colorpicker-target__color neeto-ui-border-gray-200\"\n style={{ backgroundColor: colorValue }}\n />\n <span className=\"neeto-ui-colorpicker-target__icon\">\n <Down size={16} />\n </span>\n </span>\n </button>\n);\n\nTarget.propTypes = {\n size: PropTypes.oneOf(Object.values(TARGET_SIZES)),\n showHexValue: PropTypes.bool,\n color: PropTypes.string,\n colorValue: PropTypes.string,\n};\n\nexport default Target;\n","import React, { useState, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { ColorPicker as ColorPickerIcon } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport {\n HexColorPicker,\n HexColorInput,\n HexAlphaColorPicker,\n} from \"react-colorful\";\nimport { useTranslation } from \"react-i18next\";\nimport tinycolor from \"tinycolor2\";\nimport useEyeDropper from \"use-eye-dropper\";\n\nimport Button from \"components/Button\";\nimport Dropdown from \"components/Dropdown\";\nimport Typography from \"components/Typography\";\nimport { getLocale, noop } from \"utils\";\n\nimport useRecentlyUsedColors from \"./hooks/useRecentlyUsedColors\";\nimport Palette from \"./Palette\";\nimport Target from \"./Target\";\nimport { TARGET_SIZES } from \"./constants\";\n\nconst ColorPicker = ({\n color = \"\",\n size = TARGET_SIZES.large,\n onChange = noop,\n dropdownProps,\n showEyeDropper = true,\n showHexValue = false,\n showTransparencyControl = false,\n showPicker = true,\n showHexPicker = true,\n portalProps,\n colorPalette,\n showRecentlyUsedColors = showPicker,\n}) => {\n const { t, i18n } = useTranslation();\n const [colorInternal, setColorInternal] = useState(color);\n const [isColorSelected, setIsColorSelected] = useState(false);\n const hexColorInputValue = useRef(\"\");\n const { open, isSupported } = useEyeDropper({ pickRadius: 3 });\n const [recentlyUsedColors, setRecentlyUsedColors] = useRecentlyUsedColors();\n\n const PickerComponent = showTransparencyControl\n ? HexAlphaColorPicker\n : HexColorPicker;\n\n const colorValue = color ?? colorInternal ?? \"\";\n\n const getColor = colorValue => {\n const color = tinycolor(colorValue);\n\n if (color.isValid()) {\n let hex = color.toHexString();\n // return `transparent` for transparent colors.\n if (color.getAlpha() === 0) hex = colorValue;\n else if (showTransparencyControl) hex = color.toHex8String();\n\n return { hex, rgb: color.toRgb() };\n }\n\n return { hex: colorValue, rgb: colorValue };\n };\n\n const onColorChange = color => {\n setIsColorSelected(true);\n const changeHandler = onChange ?? setColorInternal;\n\n changeHandler(getColor(color));\n };\n\n const onColorInputChange = hex => {\n // HexColorInput onChange will trigger only if the input value is a valid color\n hexColorInputValue.current = hex;\n if (hex.length !== (showTransparencyControl ? 9 : 7)) return;\n\n onColorChange(hex);\n hexColorInputValue.current = \"\";\n };\n\n const onBlur = () => {\n if (!hexColorInputValue.current) return;\n\n onColorChange(hexColorInputValue.current);\n hexColorInputValue.current = \"\";\n };\n\n const pickColor = async () => {\n try {\n const colorResponse = await open();\n const hex = tinycolor(colorResponse.sRGBHex).toHexString();\n onColorChange(hex);\n } catch {\n // Ensures component is still mounted\n // before calling setState\n // if (!e.canceled) setError(e);\n }\n };\n\n const onClose = () => {\n if (!showRecentlyUsedColors || !isColorSelected) return;\n\n const newColor = getColor(colorValue);\n\n const recentColorsExcludingNew = recentlyUsedColors.filter(\n ({ hex }) => hex !== newColor.hex\n );\n\n const updatedColors = [newColor, ...recentColorsExcludingNew];\n\n if (updatedColors.length > 14) updatedColors.pop();\n\n setRecentlyUsedColors(updatedColors);\n setIsColorSelected(false);\n };\n\n return (\n <Dropdown\n closeOnSelect={false}\n label={colorValue}\n position=\"bottom-start\"\n {...{ ...dropdownProps, onClose }}\n customTarget={<Target {...{ color, colorValue, showHexValue, size }} />}\n dropdownProps={{ ...dropdownProps?.dropdownProps, ...portalProps }}\n className={classnames(\"neeto-ui-colorpicker__dropdown\", {\n \"neeto-ui-colorpicker__dropdown-size--small\":\n size === TARGET_SIZES.small,\n \"neeto-ui-colorpicker__dropdown-size--medium\":\n size === TARGET_SIZES.medium,\n \"neeto-ui-colorpicker__dropdown-size--large\":\n size === TARGET_SIZES.large,\n })}\n >\n <div className=\"neeto-ui-colorpicker__popover\">\n {showPicker && (\n <>\n {showHexPicker && (\n <div\n className=\"neeto-ui-colorpicker__pointer\"\n data-testid=\"neeto-color-picker-section\"\n >\n <PickerComponent color={colorValue} onChange={onColorChange} />\n </div>\n )}\n <div className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-3 neeto-ui-gap-2\">\n {showEyeDropper && isSupported() && (\n <Button\n className=\"neeto-ui-colorpicker__eyedropper-btn\"\n icon={ColorPickerIcon}\n size=\"small\"\n style=\"text\"\n type=\"button\"\n onClick={pickColor}\n />\n )}\n <div className=\"neeto-ui-input__wrapper\">\n <div\n className=\"neeto-ui-colorpicker__input neeto-ui-input neeto-ui-input--small\"\n data-cy=\"colorpicker-editable-input\"\n >\n <HexColorInput\n {...{ onBlur }}\n prefixed\n alpha={!!showTransparencyControl}\n color={colorValue}\n data-cy=\"colorpicker-editable-input-textbox\"\n onChange={onColorInputChange}\n />\n </div>\n </div>\n </div>\n </>\n )}\n <div\n data-testid=\"color-palette\"\n className={classnames(\"neeto-ui-colorpicker__palette-wrapper\", {\n \"neeto-ui-colorpicker__palette-wrapper--hidden-picker\": !showPicker,\n \"neeto-ui-pt-3 neeto-ui-border-t neeto-ui-border-gray-200\":\n showPicker,\n })}\n >\n <Palette\n {...{ color }}\n colorList={colorPalette}\n onChange={onColorChange}\n />\n </div>\n {showRecentlyUsedColors && recentlyUsedColors.length > 0 && (\n <div\n className=\"neeto-ui-colorpicker__palette-wrapper neeto-ui-border-t neeto-ui-border-gray-200 neeto-ui-pt-3\"\n data-testid=\"color-palette-recently-used\"\n >\n <Typography\n className=\"neeto-ui-text-gray-600 mb-2\"\n style=\"body3\"\n weight=\"medium\"\n >\n {getLocale(i18n, t, \"neetoui.colorPicker.recentlyUsed\")}\n </Typography>\n <Palette colorList={recentlyUsedColors} onChange={onColorChange} />\n </div>\n )}\n </div>\n </Dropdown>\n );\n};\n\nColorPicker.propTypes = {\n /**\n * To specify the color value.\n */\n color: PropTypes.string,\n /**\n * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-success mb-2\">\n * New\n * </div>\n * To set the size of the target.\n */\n size: PropTypes.oneOf(Object.values(TARGET_SIZES)),\n /**\n * To specify the action to be triggered on changing the color.\n */\n onChange: PropTypes.func,\n /**\n * To specify the colors shown in the palette.\n */\n colorPalette: PropTypes.arrayOf(\n PropTypes.shape({ hex: PropTypes.string, rgb: PropTypes.string })\n ),\n /**\n * Shows eye dropper to pick color.\n */\n showEyeDropper: PropTypes.bool,\n /**\n * To show hex value near to the color in the dropdown.\n * By default it will be enabled.\n */\n showHexValue: PropTypes.bool,\n /**\n * To show transparency control. By default it will be hidden.\n */\n showTransparencyControl: PropTypes.bool,\n /**\n * To show the color picker. Used to hide the picker in cases where only palette is required. By default it will be true.\n */\n showPicker: PropTypes.bool,\n /**\n * To show the hex color picker (color pointer). Used to hide the picker while keeping the hex input and eye dropper. By default it will be true.\n */\n showHexPicker: PropTypes.bool,\n /**\n * To specify the props to be passed to the dropdown portal.\n */\n portalProps: PropTypes.object,\n /**\n * To show the recently used colors.\n */\n showRecentlyUsedColors: PropTypes.bool,\n};\n\nexport default ColorPicker;\n"],"names":["r","o","e","t","n","Dropper","DEFAULT_PALETTE_COLORS","hex","TARGET_SIZES","large","medium","small","Palette","_ref","color","_ref$colorList","colorList","onChange","_jsx","className","children","map","item","rgb","colorObject","tinycolor","isTransparent","getAlpha","isActive","Boolean","toLocaleLowerCase","classnames","active","onClick","style","backgroundColor","Target","size","showHexValue","colorValue","_jsxs","type","Down","ColorPicker","_ref2","_ref$color","_ref$size","_ref$onChange","noop","dropdownProps","_ref$showEyeDropper","showEyeDropper","_ref$showHexValue","_ref$showTransparency","showTransparencyControl","_ref$showPicker","showPicker","_ref$showHexPicker","showHexPicker","portalProps","colorPalette","_ref$showRecentlyUsed","showRecentlyUsedColors","_useTranslation","useTranslation","i18n","_useState","useState","_useState2","_slicedToArray","colorInternal","setColorInternal","_useState3","_useState4","isColorSelected","setIsColorSelected","hexColorInputValue","useRef","_useEyeDropper","useEyeDropper","pickRadius","open","isSupported","_useRecentlyUsedColor","useRecentlyUsedColors","_useRecentlyUsedColor2","recentlyUsedColors","setRecentlyUsedColors","PickerComponent","HexAlphaColorPicker","HexColorPicker","getColor","isValid","toHexString","toHex8String","toRgb","onColorChange","changeHandler","onColorInputChange","current","length","onBlur","pickColor","_ref3","_asyncToGenerator","_regeneratorRuntime","mark","_callee","colorResponse","wrap","_context","prev","next","sent","sRGBHex","_t","stop","apply","arguments","onClose","newColor","recentColorsExcludingNew","filter","_ref4","updatedColors","concat","_toConsumableArray","pop","Dropdown","_objectSpread","closeOnSelect","label","position","customTarget","_Fragment","Button","icon","ColorPickerIcon","HexColorInput","prefixed","alpha","Typography","weight","getLocale"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA0F,MAAM,CAAC,CAAC,IAAI,WAAW,EAAE,OAAO,MAAM,EAAE,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAACA,OAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAACC,MAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACC,QAAC,CAAC,KAAE,CAAC,CAACC,SAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAACC,WAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAACH,MAAC,EAAE,CAAC,CAAC,CAACG,WAAC,CAAC,IAAI,CAAC,OAAM,GAAG,CA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AAA,SAAS,EAAC,gGAAgG;AAC1G,QAAA,aAAA,EAAY,6BAA6B;QAAAC,QAAA,EAAA,cAEzCF,GAAA,CAAC2H,UAAU,EAAA;AACT1H,UAAAA,SAAS,EAAC,6BAA6B;AACvCe,UAAAA,KAAK,EAAC,OAAO;AACb4G,UAAAA,MAAM,EAAC,QAAQ;AAAA1H,UAAAA,QAAA,EAEd2H,SAAS,CAAC9E,IAAI,EAAE9D,CAAC,EAAE,kCAAkC;AAAC,SAC7C,CAAC,eACbe,GAAA,CAACN,OAAO,EAAA;AAACI,UAAAA,SAAS,EAAEsE,kBAAmB;AAACrE,UAAAA,QAAQ,EAAE+E;AAAc,SAAE,CAAC;AAAA,OAChE,CACN;KACE;AAAC,GAAA,CACE,CAAC;AAEf;;;;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"ColorPicker.js","sources":["../node_modules/use-eye-dropper/lib/use-eye-dropper.module.js","../node_modules/use-eye-dropper/lib/index.module.js","../src/components/ColorPicker/constants.js","../src/components/ColorPicker/Palette.jsx","../src/components/ColorPicker/Target.jsx","../src/components/ColorPicker/index.jsx"],"sourcesContent":["import{useMemo as r,useRef as o,useCallback as n,useEffect as t,useState as e}from\"react\";const i=()=>\"undefined\"!=typeof window&&\"EyeDropper\"in window,s=()=>{throw new Error(\"Unsupported browser.\")},a=a=>{const c=r(()=>{var r;return(r=i()&&new EyeDropper(a))?EyeDropper.prototype.open.bind(r):s},[a]),[p,w]=(()=>{const r=o(),[s,a]=e(!1);t(()=>(r.current=!0,a(i()),()=>{r.current=!1}),[]);const c=n(()=>s,[s]);return[r,c]})(),f=o(),u=n(()=>{void 0!==f.current&&f.current.abort()},[f]),d=n(async function(r){void 0===r&&(r={}),u();const{signal:o,...n}=r,t=new AbortController;f.current=t;const e=void 0!==o?(r=>{if(\"any\"in AbortSignal)return AbortSignal.any(r);const o=new AbortController,n=()=>{o.abort();for(const o of r)o.removeEventListener(\"abort\",n)};for(const o of r){if(o.aborted){n();break}o.addEventListener(\"abort\",n)}return o.signal})([o,t.signal]):t.signal;try{return await c({...n,signal:e})}catch(r){throw p.current||(r.canceled=!0),r}},[f,p,u,c]);return t(()=>u,[u]),{open:d,close:u,isSupported:w}};export{a as default};\n","import { default as DropperDev } from './use-eye-dropper.module.dev.js'\nimport { default as Dropper } from './use-eye-dropper.module.js'\n\nexport default process.env.NODE_ENV === 'production' ? Dropper : DropperDev\n","export const DEFAULT_PALETTE_COLORS = [\n { hex: \"#FFFFFF\" },\n { hex: \"#D6D6D6\" },\n { hex: \"#0A0E13\" },\n { hex: \"#FECE1E\" },\n { hex: \"#F32E48\" },\n { hex: \"#02C39A\" },\n { hex: \"#2A79C4\" },\n { hex: \"#B3E5FC\" },\n { hex: \"#C3C6F9\" },\n { hex: \"#8064CE\" },\n { hex: \"#FE861E\" },\n { hex: \"#FF7DC9\" },\n { hex: \"#028090\" },\n { hex: \"#095482\" },\n];\n\nexport const TARGET_SIZES = {\n large: \"large\",\n medium: \"medium\",\n small: \"small\",\n};\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport tinycolor from \"tinycolor2\";\n\nimport { DEFAULT_PALETTE_COLORS } from \"./constants\";\n\nconst Palette = ({ color, colorList = DEFAULT_PALETTE_COLORS, onChange }) => (\n <div className=\"neeto-ui-flex neeto-ui-flex-row neeto-ui-flex-wrap neeto-ui-items-start neeto-ui-justify-start neeto-ui-color-palette neeto-ui-gap-1\">\n {colorList.map(item => {\n const { hex, rgb } = item;\n const colorObject = tinycolor(hex ?? rgb);\n const isTransparent = colorObject.getAlpha() === 0;\n const isActive = Boolean(\n // hex is case insensitive.\n color?.toLocaleLowerCase() === hex?.toLocaleLowerCase() || color === rgb\n );\n\n return (\n <div\n data-testid=\"color-palette-item\"\n key={hex ?? rgb}\n className={classnames(\n \"neeto-ui-color-palette__item neeto-ui-border\",\n { active: isActive }\n )}\n onClick={() => onChange(hex ?? rgb)}\n >\n <div\n style={{ backgroundColor: hex ?? rgb }}\n className={classnames({\n \"transparent-bg-pattern\": isTransparent,\n })}\n />\n </div>\n );\n })}\n </div>\n);\n\nPalette.propTypes = {\n color: PropTypes.string,\n colorList: PropTypes.arrayOf(\n PropTypes.shape({\n hex: PropTypes.string,\n rgb: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.shape({\n r: PropTypes.number,\n g: PropTypes.number,\n b: PropTypes.number,\n }),\n ]),\n })\n ),\n onChange: PropTypes.func,\n};\n\nexport default Palette;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { Down } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\n\nimport { TARGET_SIZES } from \"./constants\";\n\nconst Target = ({ size, showHexValue, color, colorValue }) => (\n <button\n data-testid=\"color-picker-target\"\n type=\"button\"\n className={classnames(\"neeto-ui-colorpicker__target\", {\n \"neeto-ui-colorpicker__target-size--large\": size === TARGET_SIZES.large,\n \"neeto-ui-colorpicker__target-size--medium\": size === TARGET_SIZES.medium,\n \"neeto-ui-colorpicker__target-size--small\": size === TARGET_SIZES.small,\n })}\n >\n {showHexValue && (\n <span className=\"neeto-ui-colorpicker-target__code\">{color}</span>\n )}\n <span className=\"neeto-ui-colorpicker-target__color-wrapper\">\n <span\n className=\"neeto-ui-colorpicker-target__color neeto-ui-border-gray-200\"\n style={{ backgroundColor: colorValue }}\n />\n <span className=\"neeto-ui-colorpicker-target__icon\">\n <Down size={16} />\n </span>\n </span>\n </button>\n);\n\nTarget.propTypes = {\n size: PropTypes.oneOf(Object.values(TARGET_SIZES)),\n showHexValue: PropTypes.bool,\n color: PropTypes.string,\n colorValue: PropTypes.string,\n};\n\nexport default Target;\n","import React, { useState, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { ColorPicker as ColorPickerIcon } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport {\n HexColorPicker,\n HexColorInput,\n HexAlphaColorPicker,\n} from \"react-colorful\";\nimport { useTranslation } from \"react-i18next\";\nimport tinycolor from \"tinycolor2\";\nimport useEyeDropper from \"use-eye-dropper\";\n\nimport Button from \"components/Button\";\nimport Dropdown from \"components/Dropdown\";\nimport Typography from \"components/Typography\";\nimport { getLocale, noop } from \"utils\";\n\nimport useRecentlyUsedColors from \"./hooks/useRecentlyUsedColors\";\nimport Palette from \"./Palette\";\nimport Target from \"./Target\";\nimport { TARGET_SIZES } from \"./constants\";\n\nconst ColorPicker = ({\n color = \"\",\n size = TARGET_SIZES.large,\n onChange = noop,\n dropdownProps,\n showEyeDropper = true,\n showHexValue = false,\n showTransparencyControl = false,\n showPicker = true,\n showHexPicker = true,\n portalProps,\n colorPalette,\n showRecentlyUsedColors = showPicker,\n}) => {\n const { t, i18n } = useTranslation();\n const [colorInternal, setColorInternal] = useState(color);\n const [isColorSelected, setIsColorSelected] = useState(false);\n const hexColorInputValue = useRef(\"\");\n const { open, isSupported } = useEyeDropper({ pickRadius: 3 });\n const [recentlyUsedColors, setRecentlyUsedColors] = useRecentlyUsedColors();\n\n const PickerComponent = showTransparencyControl\n ? HexAlphaColorPicker\n : HexColorPicker;\n\n const colorValue = color ?? colorInternal ?? \"\";\n\n const getColor = colorValue => {\n const color = tinycolor(colorValue);\n\n if (color.isValid()) {\n let hex = color.toHexString();\n // return `transparent` for transparent colors.\n if (color.getAlpha() === 0) hex = colorValue;\n else if (showTransparencyControl) hex = color.toHex8String();\n\n return { hex, rgb: color.toRgb() };\n }\n\n return { hex: colorValue, rgb: colorValue };\n };\n\n const onColorChange = color => {\n setIsColorSelected(true);\n const changeHandler = onChange ?? setColorInternal;\n\n changeHandler(getColor(color));\n };\n\n const onColorInputChange = hex => {\n // HexColorInput onChange will trigger only if the input value is a valid color\n hexColorInputValue.current = hex;\n if (hex.length !== (showTransparencyControl ? 9 : 7)) return;\n\n onColorChange(hex);\n hexColorInputValue.current = \"\";\n };\n\n const onBlur = () => {\n if (!hexColorInputValue.current) return;\n\n onColorChange(hexColorInputValue.current);\n hexColorInputValue.current = \"\";\n };\n\n const pickColor = async () => {\n try {\n const colorResponse = await open();\n const hex = tinycolor(colorResponse.sRGBHex).toHexString();\n onColorChange(hex);\n } catch {\n // Ensures component is still mounted\n // before calling setState\n // if (!e.canceled) setError(e);\n }\n };\n\n const onClose = () => {\n if (!showRecentlyUsedColors || !isColorSelected) return;\n\n const newColor = getColor(colorValue);\n\n const recentColorsExcludingNew = recentlyUsedColors.filter(\n ({ hex }) => hex !== newColor.hex\n );\n\n const updatedColors = [newColor, ...recentColorsExcludingNew];\n\n if (updatedColors.length > 14) updatedColors.pop();\n\n setRecentlyUsedColors(updatedColors);\n setIsColorSelected(false);\n };\n\n return (\n <Dropdown\n closeOnSelect={false}\n label={colorValue}\n position=\"bottom-start\"\n {...{ ...dropdownProps, onClose }}\n customTarget={<Target {...{ color, colorValue, showHexValue, size }} />}\n dropdownProps={{ ...dropdownProps?.dropdownProps, ...portalProps }}\n className={classnames(\"neeto-ui-colorpicker__dropdown\", {\n \"neeto-ui-colorpicker__dropdown-size--small\":\n size === TARGET_SIZES.small,\n \"neeto-ui-colorpicker__dropdown-size--medium\":\n size === TARGET_SIZES.medium,\n \"neeto-ui-colorpicker__dropdown-size--large\":\n size === TARGET_SIZES.large,\n })}\n >\n <div className=\"neeto-ui-colorpicker__popover\">\n {showPicker && (\n <>\n {showHexPicker && (\n <div\n className=\"neeto-ui-colorpicker__pointer\"\n data-testid=\"neeto-color-picker-section\"\n >\n <PickerComponent color={colorValue} onChange={onColorChange} />\n </div>\n )}\n <div className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-justify-center neeto-ui-mt-3 neeto-ui-gap-2\">\n {showEyeDropper && isSupported() && (\n <Button\n className=\"neeto-ui-colorpicker__eyedropper-btn\"\n icon={ColorPickerIcon}\n size=\"small\"\n style=\"text\"\n type=\"button\"\n onClick={pickColor}\n />\n )}\n <div className=\"neeto-ui-input__wrapper\">\n <div\n className=\"neeto-ui-colorpicker__input neeto-ui-input neeto-ui-input--small\"\n data-testid=\"colorpicker-editable-input\"\n >\n <HexColorInput\n {...{ onBlur }}\n prefixed\n alpha={!!showTransparencyControl}\n color={colorValue}\n data-testid=\"colorpicker-editable-input-textbox\"\n onChange={onColorInputChange}\n />\n </div>\n </div>\n </div>\n </>\n )}\n <div\n data-testid=\"color-palette\"\n className={classnames(\"neeto-ui-colorpicker__palette-wrapper\", {\n \"neeto-ui-colorpicker__palette-wrapper--hidden-picker\": !showPicker,\n \"neeto-ui-pt-3 neeto-ui-border-t neeto-ui-border-gray-200\":\n showPicker,\n })}\n >\n <Palette\n {...{ color }}\n colorList={colorPalette}\n onChange={onColorChange}\n />\n </div>\n {showRecentlyUsedColors && recentlyUsedColors.length > 0 && (\n <div\n className=\"neeto-ui-colorpicker__palette-wrapper neeto-ui-border-t neeto-ui-border-gray-200 neeto-ui-pt-3\"\n data-testid=\"color-palette-recently-used\"\n >\n <Typography\n className=\"neeto-ui-text-gray-600 mb-2\"\n style=\"body3\"\n weight=\"medium\"\n >\n {getLocale(i18n, t, \"neetoui.colorPicker.recentlyUsed\")}\n </Typography>\n <Palette colorList={recentlyUsedColors} onChange={onColorChange} />\n </div>\n )}\n </div>\n </Dropdown>\n );\n};\n\nColorPicker.propTypes = {\n /**\n * To specify the color value.\n */\n color: PropTypes.string,\n /**\n * <div class=\"neeto-ui-tag neeto-ui-tag--size-small neeto-ui-tag--style-outline neeto-ui-tag--style-success mb-2\">\n * New\n * </div>\n * To set the size of the target.\n */\n size: PropTypes.oneOf(Object.values(TARGET_SIZES)),\n /**\n * To specify the action to be triggered on changing the color.\n */\n onChange: PropTypes.func,\n /**\n * To specify the colors shown in the palette.\n */\n colorPalette: PropTypes.arrayOf(\n PropTypes.shape({ hex: PropTypes.string, rgb: PropTypes.string })\n ),\n /**\n * Shows eye dropper to pick color.\n */\n showEyeDropper: PropTypes.bool,\n /**\n * To show hex value near to the color in the dropdown.\n * By default it will be enabled.\n */\n showHexValue: PropTypes.bool,\n /**\n * To show transparency control. By default it will be hidden.\n */\n showTransparencyControl: PropTypes.bool,\n /**\n * To show the color picker. Used to hide the picker in cases where only palette is required. By default it will be true.\n */\n showPicker: PropTypes.bool,\n /**\n * To show the hex color picker (color pointer). Used to hide the picker while keeping the hex input and eye dropper. By default it will be true.\n */\n showHexPicker: PropTypes.bool,\n /**\n * To specify the props to be passed to the dropdown portal.\n */\n portalProps: PropTypes.object,\n /**\n * To show the recently used colors.\n */\n showRecentlyUsedColors: PropTypes.bool,\n};\n\nexport default ColorPicker;\n"],"names":["r","o","e","t","n","Dropper","DEFAULT_PALETTE_COLORS","hex","TARGET_SIZES","large","medium","small","Palette","_ref","color","_ref$colorList","colorList","onChange","_jsx","className","children","map","item","rgb","colorObject","tinycolor","isTransparent","getAlpha","isActive","Boolean","toLocaleLowerCase","classnames","active","onClick","style","backgroundColor","Target","size","showHexValue","colorValue","_jsxs","type","Down","ColorPicker","_ref2","_ref$color","_ref$size","_ref$onChange","noop","dropdownProps","_ref$showEyeDropper","showEyeDropper","_ref$showHexValue","_ref$showTransparency","showTransparencyControl","_ref$showPicker","showPicker","_ref$showHexPicker","showHexPicker","portalProps","colorPalette","_ref$showRecentlyUsed","showRecentlyUsedColors","_useTranslation","useTranslation","i18n","_useState","useState","_useState2","_slicedToArray","colorInternal","setColorInternal","_useState3","_useState4","isColorSelected","setIsColorSelected","hexColorInputValue","useRef","_useEyeDropper","useEyeDropper","pickRadius","open","isSupported","_useRecentlyUsedColor","useRecentlyUsedColors","_useRecentlyUsedColor2","recentlyUsedColors","setRecentlyUsedColors","PickerComponent","HexAlphaColorPicker","HexColorPicker","getColor","isValid","toHexString","toHex8String","toRgb","onColorChange","changeHandler","onColorInputChange","current","length","onBlur","pickColor","_ref3","_asyncToGenerator","_regeneratorRuntime","mark","_callee","colorResponse","wrap","_context","prev","next","sent","sRGBHex","_t","stop","apply","arguments","onClose","newColor","recentColorsExcludingNew","filter","_ref4","updatedColors","concat","_toConsumableArray","pop","Dropdown","_objectSpread","closeOnSelect","label","position","customTarget","_Fragment","Button","icon","ColorPickerIcon","HexColor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