@pingux/astro 2.0.0-beta.0 → 2.0.0-rc.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 +60 -0
- package/README.md +5 -5
- package/lib/MIGRATION.md +100 -0
- package/lib/README.md +92 -0
- package/lib/cjs/components/Bracket/Bracket.stories.js +0 -1
- package/lib/cjs/components/Button/Button.js +3 -1
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +8 -4
- package/lib/cjs/components/ComboBox/ComboBoxInput.js +12 -11
- package/lib/cjs/components/DataTable/DataTable.styles.js +2 -2
- package/lib/cjs/components/IconButton/IconButton.js +3 -1
- package/lib/cjs/components/ListItem/ListItem.stories.js +8 -3
- package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +4 -4
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +1 -1
- package/lib/cjs/components/NumberField/NumberField.js +2 -2
- package/lib/cjs/components/NumberField/NumberField.test.js +3 -3
- package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +23 -7
- package/lib/cjs/components/OverlayPanel/OverlayPanel.styles.js +1 -0
- package/lib/cjs/components/PasswordField/PasswordField.js +7 -4
- package/lib/cjs/components/PasswordField/PasswordField.test.js +12 -0
- package/lib/cjs/components/PopoverMenu/PopoverMenu.test.js +10 -0
- package/lib/cjs/components/SearchField/Search.styles.js +3 -0
- package/lib/cjs/{styles/theme-ui → docs/theme}/ThemeView.js +1 -1
- package/lib/cjs/hooks/index.js +7 -0
- package/lib/cjs/patterns/AttributeMappingDisplayViewPattern.stories.hidden.js +2 -2
- package/lib/cjs/patterns/AttributeMappingEditViewPattern.stories.hidden.js +3 -3
- package/lib/cjs/recipes/CountryPicker.stories.js +2 -2
- package/lib/cjs/recipes/LinkedListView.stories.js +2 -2
- package/lib/cjs/recipes/PageHeader.stories.js +16 -32
- package/lib/cjs/recipes/RadioButtonsWithLinks.stories.js +1 -1
- package/lib/cjs/styles/themeOverrides/uiLibraryOverride.js +18 -2
- package/lib/cjs/styles/themeOverrides/withUiLibraryCss.js +5 -3
- package/lib/cjs/styles/themes/end-user/end-user.js +15 -14
- package/lib/components/Bracket/Bracket.stories.js +0 -1
- package/lib/components/Button/Button.js +4 -2
- package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +8 -4
- package/lib/components/ComboBox/ComboBoxInput.js +12 -11
- package/lib/components/DataTable/DataTable.styles.js +2 -2
- package/lib/components/IconButton/IconButton.js +4 -2
- package/lib/components/ListItem/ListItem.stories.js +8 -3
- package/lib/components/ListViewItem/ListViewItem.styles.js +4 -4
- package/lib/components/MultivaluesField/MultivaluesField.js +1 -1
- package/lib/components/NumberField/NumberField.js +2 -2
- package/lib/components/NumberField/NumberField.test.js +3 -3
- package/lib/components/OverlayPanel/OverlayPanel.stories.js +20 -4
- package/lib/components/OverlayPanel/OverlayPanel.styles.js +1 -0
- package/lib/components/PasswordField/PasswordField.js +7 -4
- package/lib/components/PasswordField/PasswordField.test.js +12 -0
- package/lib/components/PopoverMenu/PopoverMenu.test.js +10 -0
- package/lib/components/SearchField/Search.styles.js +3 -0
- package/lib/{styles/theme-ui → docs/theme}/ThemeView.js +1 -1
- package/lib/hooks/index.js +1 -0
- package/lib/patterns/AttributeMappingDisplayViewPattern.stories.hidden.js +2 -2
- package/lib/patterns/AttributeMappingEditViewPattern.stories.hidden.js +3 -3
- package/lib/recipes/CountryPicker.stories.js +2 -2
- package/lib/recipes/LinkedListView.stories.js +2 -2
- package/lib/recipes/PageHeader.stories.js +17 -33
- package/lib/recipes/RadioButtonsWithLinks.stories.js +1 -1
- package/lib/styles/themeOverrides/uiLibraryOverride.js +18 -2
- package/lib/styles/themeOverrides/withUiLibraryCss.js +5 -2
- package/lib/styles/themes/end-user/end-user.js +15 -14
- package/package.json +4 -5
- package/lib/cjs/docs/theme/ThemeDocumentation.js +0 -16
- package/lib/docs/theme/ThemeDocumentation.js +0 -7
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,66 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [1.44.1](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.44.0...@pingux/astro@1.44.1) (2023-03-22)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @pingux/astro
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
# [1.44.0](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.43.0...@pingux/astro@1.44.0) (2023-03-21)
|
15
|
+
|
16
|
+
|
17
|
+
### Bug Fixes
|
18
|
+
|
19
|
+
* [UIP-6040] NumberField: fix increment and decrement buttons focus ([9147d19](https://gitlab.corp.pingidentity.com/ux/pingux/commit/9147d196d8e07b7040ae2c1e5d835c37ee24a7a3))
|
20
|
+
* [UIP-6114] Overlay Panel Colorfield Doesnt Update ([f806c76](https://gitlab.corp.pingidentity.com/ux/pingux/commit/f806c761101ccf8b28b7338cb95a66821295effd))
|
21
|
+
* [UIP-6180] Update Close Button Aria Label ([f0489f8](https://gitlab.corp.pingidentity.com/ux/pingux/commit/f0489f8a6249afecf468d7c9a6f7cb60ea95210b))
|
22
|
+
* [UIP-6182] Add aria-labels to list-item buttons ([634a755](https://gitlab.corp.pingidentity.com/ux/pingux/commit/634a755a4e313eb38940c1bba6fd87ba202073f3))
|
23
|
+
* [UIP-6184] OverlayPanel: add visibility css prop ([8b69e03](https://gitlab.corp.pingidentity.com/ux/pingux/commit/8b69e030a933cf968336dbc73060fb1a72973b05))
|
24
|
+
* [UIP-6194] Update PageHeader Recipe to match mock changes ([401f62f](https://gitlab.corp.pingidentity.com/ux/pingux/commit/401f62fcc280a58c4bdbaf92221a5b79e10ea164))
|
25
|
+
* [UIP-6200] CollapsiblePanel Breadcrumbs Accessibility ([e0b569c](https://gitlab.corp.pingidentity.com/ux/pingux/commit/e0b569cc9ccc7b4ac79dde7807a6c1ff22e1d1a8))
|
26
|
+
* [UIP-6202] Multivalues Select Item Screen Reader ([26e7571](https://gitlab.corp.pingidentity.com/ux/pingux/commit/26e7571076e04083d45af742cf40f0f6cf589fe0))
|
27
|
+
|
28
|
+
|
29
|
+
### Features
|
30
|
+
|
31
|
+
* [UIP-6206] Add requirementsListProps to PasswordField ([705f977](https://gitlab.corp.pingidentity.com/ux/pingux/commit/705f9777f0d8c5ce2841c1a649eb57d5e013ad0f))
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
# [1.43.0](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.42.3...@pingux/astro@1.43.0) (2023-03-16)
|
38
|
+
|
39
|
+
|
40
|
+
### Bug Fixes
|
41
|
+
|
42
|
+
* [UIP-6152] UI Library overrides doesn't override hover for some buttons ([ed8b4b6](https://gitlab.corp.pingidentity.com/ux/pingux/commit/ed8b4b67661cf197c20eb1f2618942caabc18487))
|
43
|
+
* [UIP-6183] Table Cell Support Ellipsis ([b564a3a](https://gitlab.corp.pingidentity.com/ux/pingux/commit/b564a3a85eebfff3c97fbce68b937226d0de2629))
|
44
|
+
* [UIP-6203]: add useCopyToClipboard to list of hook exports ([66580ec](https://gitlab.corp.pingidentity.com/ux/pingux/commit/66580ec2322ae9ed3e5df6f6e23aa5cfb1b22c50))
|
45
|
+
|
46
|
+
|
47
|
+
### Features
|
48
|
+
|
49
|
+
* [UIP-6092] NavBar: possibility to add external link as primary item ([a6d3208](https://gitlab.corp.pingidentity.com/ux/pingux/commit/a6d320899b183b21f718122d86334595cbe46d1c))
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
## [1.42.3](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.42.2...@pingux/astro@1.42.3) (2023-03-07)
|
56
|
+
|
57
|
+
|
58
|
+
### Bug Fixes
|
59
|
+
|
60
|
+
* [UIP-6181] DataTable error ([a99481e](https://gitlab.corp.pingidentity.com/ux/pingux/commit/a99481e31c31e74619cff883a7fde3c2da7a7ba5))
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
|
6
66
|
## [1.42.2](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.42.1...@pingux/astro@1.42.2) (2023-02-22)
|
7
67
|
|
8
68
|
|
package/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# `@pingux/astro`
|
2
2
|
|
3
|
-
Astro is a lightweight, composable, and themeable React component library. Astro was created to help developers and designers create consistent, user friendly, and accessible UIs across all Ping products. Please visit https://pingidentity.design for more information
|
3
|
+
Astro is a lightweight, composable, and themeable React component library. Astro was created to help developers and designers create consistent, user friendly, and accessible UIs across all Ping products. Please visit https://pingidentity.design for more information. To read individual component documentation, [our Storybook docs site](https://storybook.pingidentity.design) is a great resource.
|
4
4
|
|
5
5
|
## Installing
|
6
6
|
|
@@ -21,8 +21,8 @@ Yarn:
|
|
21
21
|
|
22
22
|
All apps should be wrapped in an `<AstroWrapper>` for full functionality and styling.
|
23
23
|
|
24
|
-
```
|
25
|
-
import { AstroWrapper } from
|
24
|
+
```js
|
25
|
+
import { AstroWrapper } from '@pingux/astro';
|
26
26
|
|
27
27
|
<AstroWrapper>
|
28
28
|
<App />
|
@@ -37,9 +37,9 @@ Astro uses [Storybook](https://storybook.js.org/) for component documentation. O
|
|
37
37
|
|
38
38
|
The Storybook server defaults to `https://localhost:6006`. This port can be customized by running the command start -p 9009. For example, this will start Storybook on port 9009. More information on customizing Storybook CLI options can be found at https://storybook.js.org/docs/react/api/cli-options.
|
39
39
|
|
40
|
-
Component prop documentation is available under the
|
40
|
+
Component prop documentation is available under the "documentation" tab per each component story. Most props can be toggled and configured for preview purposes within the prop table.
|
41
41
|
|
42
|
-
For example, to view the disabled button styling, navigate to the Button story’s props table, locate the
|
42
|
+
For example, to view the disabled button styling, navigate to the Button story’s props table, locate the "isDisabled" prop, and toggle to "true". This change allows you to preview the disabled button’s styling and functionality.
|
43
43
|
|
44
44
|
## Yarn
|
45
45
|
We use a modern version of [Yarn](https://yarnpkg.com/getting-started) for package management with the [Plug'n'Play](https://yarnpkg.com/features/pnp) feature enabled. This allows for a [Zero Install](https://yarnpkg.com/features/zero-installs) approach to be used.
|
package/lib/MIGRATION.md
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
# Astro Version Migration Guide
|
2
|
+
This document contains detailed information about breaking and non-breaking changes between versions and how to migrate from one version to another.
|
3
|
+
|
4
|
+
|
5
|
+
1. [Troubleshooting](#troubleshooting)
|
6
|
+
2. [1.x to 2.0.0](#1.x-to-2.0.0)
|
7
|
+
1. Introduction
|
8
|
+
2. Why Update
|
9
|
+
3. Non-breaking Changes
|
10
|
+
1. Yarn 2 Upgrade
|
11
|
+
5. Breaking Changes
|
12
|
+
1. Theme Restructuring
|
13
|
+
2. Deprecated Components and Variants
|
14
|
+
3. Field Component Prop Refactoring
|
15
|
+
|
16
|
+
## Troubleshooting
|
17
|
+
For internal Ping users please reach out via #ui-astro or a UX Development team member.
|
18
|
+
For external users, please reach out via ux-development@pingidentity.com or open an issue in our GitHub repo.
|
19
|
+
|
20
|
+
## 1.x to 2.0.0
|
21
|
+
|
22
|
+
### Introduction
|
23
|
+
V1 of the Astro component library was released in December of 2021. Since its initial release, the UX development team has identified areas of improvement including required dependency upgrades, removal of deprecated components and design patterns, and prop consistency. Unfortunately, necessary upgrades will potentially require breaking changes which must be released in a major version.
|
24
|
+
|
25
|
+
**It is important to note this is not a design system change.** There will be no major visual design or design pattern changes.
|
26
|
+
|
27
|
+
### Why Update
|
28
|
+
The UX Development team recommends upgrading ASAP for continued support for the Astro library. UX Development will not be continuing 1.x development so if you need any future fixes or enhancements, you’ll need to update eventually.
|
29
|
+
|
30
|
+
We’ve also written an ESLint plugin - `eslint-plugin-pingux-astro` - that should help point out code which needs to be changed. This includes linting rules for variant name changes and deprecated components.
|
31
|
+
|
32
|
+
### Non-breaking Changes
|
33
|
+
|
34
|
+
#### Yarn 2 Upgrade
|
35
|
+
Upgrading to Yarn 2 offers several benefits to developers, including:
|
36
|
+
|
37
|
+
* Improved performance
|
38
|
+
* Better support for monorepos
|
39
|
+
* Enhanced security
|
40
|
+
* Improved developer experience
|
41
|
+
|
42
|
+
Upgrading Astro to utilize Yarn 2 also guarantees that it will not impede applications that rely on Astro from following suit. A [migration guide](https://yarnpkg.com/getting-started/migration) is available for reference if your team is interested in making the switch.
|
43
|
+
|
44
|
+
### Breaking Changes
|
45
|
+
|
46
|
+
#### Theme Restructuring
|
47
|
+
|
48
|
+
The structure of the Astro theme has been altered in Astro V2. While variants used internally by components should be updated automatically, this may cause breaking changes and visual regressions if custom variants and themes are not properly remapped. To identify which variant mappings have been changed and their updates, please take the following steps:
|
49
|
+
1. Follow the install steps in the README within the [ESLint Plugin for Astro repo](https://gitlab.corp.pingidentity.com/ux/eslint-plugin-pingux-astro).
|
50
|
+
2. After upgrading to Astro V2, run `yarn lint`.
|
51
|
+
3. The linter should return a series of warnings that detail the old variant mapping and the new one suggested.
|
52
|
+
4. Depending on your code editor, you should be able to find and replace all instances of the old variant with the new variant mappings. Re-run yarn lint after replacing to ensure the update has been made and there are no visual regressions.
|
53
|
+
|
54
|
+
If you have custom themes built and applied (not those shipped with the Astro library - astro-nano, end-user, uiLibraryOverride) and have questions about the restructuring please reach out via #ui-astro.
|
55
|
+
|
56
|
+
#### Deprecated Components and Variants
|
57
|
+
The following components and variants have been removed from the Astro Library. Please see the table below for replacement suggestions:
|
58
|
+
|
59
|
+
|Component / Variant|Replacement|
|
60
|
+
|---|---|
|
61
|
+
|List Component|ListView Component|
|
62
|
+
|Modal, Variant=”dark”|No replacement, this style should not be used.|
|
63
|
+
|Button, Variant= “icon”|IconButton Component|
|
64
|
+
|Button, Variant=”danger”|Variant=”critical”|
|
65
|
+
|Button, Variant=”text”|Variant=”link”|
|
66
|
+
|Chip|Renamed to Badge|
|
67
|
+
|Variants with “chip” in the name|The text has been swapped from “chip” to “badge” in all cases|
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
#### Field Component Prop Refactoring
|
72
|
+
Astro’s field components are composed components consisting of a wrapper, label, input, and help text. In order to help user’s better target specific elements these components contain the following props:
|
73
|
+
|
74
|
+
|Prop|Target|
|
75
|
+
|---|---|
|
76
|
+
|ContainerProps|Surrounds the label, wrapper, control, and help text|
|
77
|
+
|WrapperProps|Directly surrounds the control|
|
78
|
+
|ControlProps|The input|
|
79
|
+
|LabelProps|The label|
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
However, some field components did not include these props or they were not placed consistently in V1. The following components have changes, highlighted components are considered to have breaking changes:
|
84
|
+
|
85
|
+
|
86
|
+
|Component|Updates|
|
87
|
+
|---|---|
|
88
|
+
|ColorField|Wrapper has been added and accepts wrapperProps|
|
89
|
+
|ComboBox|Wrapper has been moved to consistently match other container to inside to target the control|
|
90
|
+
|FileInputField|containerProps and wrapperProps have been switched|
|
91
|
+
|ImageUploadField|Now accepts wrapperProps|
|
92
|
+
|NumberField|Wrapper box now accepts wrapperProps|
|
93
|
+
|PasswordField|Wrapper box now accepts wrapperProps|
|
94
|
+
|RadioField|Wrapper box added and now accepts wrapperProps|
|
95
|
+
|SearchField|Wrapper box now accepts wrapperProps|
|
96
|
+
|SelectField|Wrapper box added and now accepts wrapperProps|
|
97
|
+
|SwitchField|Wrapper box added and now accepts wrapperProps|
|
98
|
+
|TextAreaField|Wrapper box added and now accepts wrapperProps|
|
99
|
+
|
100
|
+
|
package/lib/README.md
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
# `@pingux/astro`
|
2
|
+
|
3
|
+
Astro is a lightweight, composable, and themeable React component library. Astro was created to help developers and designers create consistent, user friendly, and accessible UIs across all Ping products. Please visit https://pingidentity.design for more information. To read individual component documentation, [our Storybook docs site](https://storybook.pingidentity.design) is a great resource.
|
4
|
+
|
5
|
+
## Installing
|
6
|
+
|
7
|
+
To consume Astro within your own project, install it via NPM or Yarn.
|
8
|
+
|
9
|
+
NPM:
|
10
|
+
`npm install @pingux/astro`
|
11
|
+
|
12
|
+
Yarn:
|
13
|
+
`yarn add @pingux/astro`
|
14
|
+
|
15
|
+
## Requirements
|
16
|
+
|
17
|
+
- Node: 16+
|
18
|
+
- React: 16.8+
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
All apps should be wrapped in an `<AstroWrapper>` for full functionality and styling.
|
23
|
+
|
24
|
+
```js
|
25
|
+
import { AstroWrapper } from '@pingux/astro';
|
26
|
+
|
27
|
+
<AstroWrapper>
|
28
|
+
<App />
|
29
|
+
</AstroWrapper>
|
30
|
+
```
|
31
|
+
|
32
|
+
## Running Storybook Locally
|
33
|
+
|
34
|
+
Astro uses [Storybook](https://storybook.js.org/) for component documentation. Once Astro has been cloned, run the following commands to start a local Storybook server:
|
35
|
+
|
36
|
+
`yarn start`
|
37
|
+
|
38
|
+
The Storybook server defaults to `https://localhost:6006`. This port can be customized by running the command start -p 9009. For example, this will start Storybook on port 9009. More information on customizing Storybook CLI options can be found at https://storybook.js.org/docs/react/api/cli-options.
|
39
|
+
|
40
|
+
Component prop documentation is available under the "documentation" tab per each component story. Most props can be toggled and configured for preview purposes within the prop table.
|
41
|
+
|
42
|
+
For example, to view the disabled button styling, navigate to the Button story’s props table, locate the "isDisabled" prop, and toggle to "true". This change allows you to preview the disabled button’s styling and functionality.
|
43
|
+
|
44
|
+
## Yarn
|
45
|
+
We use a modern version of [Yarn](https://yarnpkg.com/getting-started) for package management with the [Plug'n'Play](https://yarnpkg.com/features/pnp) feature enabled. This allows for a [Zero Install](https://yarnpkg.com/features/zero-installs) approach to be used.
|
46
|
+
|
47
|
+
## Browser Compatibility
|
48
|
+
|
49
|
+
Astro fully supports the following browsers and versions:
|
50
|
+
|
51
|
+
| Browser | Version |
|
52
|
+
| ----------- | ----------- |
|
53
|
+
| Chrome | 80+ |
|
54
|
+
| Firefox | 76+ |
|
55
|
+
| Safari | 12+ |
|
56
|
+
| Edge | 44+ |
|
57
|
+
|
58
|
+
|
59
|
+
Support for IE11 is left up to developers and is not tested by the Astro team. Polyfills are necessary for full functionality.
|
60
|
+
|
61
|
+
## Changelog
|
62
|
+
|
63
|
+
Astro’s [changelog](CHANGELOG.md) notes all features and bug fixes within each release. Refactors and documentation updates are not included within the changelog.
|
64
|
+
|
65
|
+
## Contributing and Bug Reports
|
66
|
+
|
67
|
+
Astro is closed for open contributions. However, we are appreciative of bug reports and suggestions. Please use GitHub Issues to submit bug reports and suggestions.
|
68
|
+
|
69
|
+
## VS Code Linting
|
70
|
+
The Astro development team prefers to use VS Code as a code editor. To enable code highlighting and autolinting on save you will need to install the ESLint, Prettier and ZipFS plugins, plus add the
|
71
|
+
following settings in your `settings.json` file.
|
72
|
+
|
73
|
+
```
|
74
|
+
{
|
75
|
+
"eslint.format.enable": true,
|
76
|
+
"editor.codeActionsOnSave": {
|
77
|
+
"source.fixAll.eslint": true
|
78
|
+
},
|
79
|
+
"eslint.validate": [
|
80
|
+
"javascript",
|
81
|
+
],
|
82
|
+
}
|
83
|
+
```
|
84
|
+
|
85
|
+
You will need to have the monorepo open at the root directory in VS Code for linting and highlighting to work.
|
86
|
+
|
87
|
+
Note: To make linting and highlighting work with Yarn 2, `yarn dlx @yarnpkg/sdks vscode` needs to be run in the root directory of the monorepo. If any changes are made to any
|
88
|
+
ESLint packages or versions these features may stop working. Run this command again to solve the issue. Be sure to commit the changes so others don't run into the same issue.
|
89
|
+
|
90
|
+
## Licensing
|
91
|
+
|
92
|
+
This project is licensed under the Apache license. See the [LICENSE](LICENSE) file for more information.
|
@@ -56,6 +56,8 @@ var Button = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
56
56
|
var _useFocusRing = (0, _reactAria.useFocusRing)(),
|
57
57
|
isFocusVisible = _useFocusRing.isFocusVisible,
|
58
58
|
focusProps = _useFocusRing.focusProps;
|
59
|
+
var _usePress = (0, _interactions.usePress)(buttonRef),
|
60
|
+
isPressedFromContext = _usePress.isPressed;
|
59
61
|
var _useButton = (0, _reactAria.useButton)(_objectSpread({
|
60
62
|
elementType: 'button'
|
61
63
|
}, props), buttonRef),
|
@@ -66,7 +68,7 @@ var Button = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
66
68
|
isHovered = _useHover.isHovered;
|
67
69
|
var _useStatusClasses = (0, _hooks.useStatusClasses)(className, {
|
68
70
|
isHovered: isHovered,
|
69
|
-
isPressed: isPressed,
|
71
|
+
isPressed: isPressed || isPressedFromContext,
|
70
72
|
isFocused: isFocusVisible,
|
71
73
|
isDisabled: isDisabled
|
72
74
|
}),
|
@@ -208,13 +208,17 @@ var CollapsiblePanelWithBadge = function CollapsiblePanelWithBadge(args) {
|
|
208
208
|
}), (0, _react2.jsx)(_index.Breadcrumbs, {
|
209
209
|
icon: _ChevronRightIcon["default"]
|
210
210
|
}, (0, _react2.jsx)(_index.Item, {
|
211
|
+
"aria-label": "Ed Nepomuceno",
|
212
|
+
"data-id": "home",
|
213
|
+
href: "https://www.pingidentity.com",
|
211
214
|
key: "home",
|
212
|
-
variant: "link"
|
213
|
-
"data-id": "home"
|
215
|
+
variant: "buttons.link"
|
214
216
|
}, "Ed Nepomuceno"), (0, _react2.jsx)(_index.Item, {
|
217
|
+
"aria-label": "edit groups",
|
218
|
+
"data-id": "editGroups",
|
219
|
+
href: "https://www.pingidentity.com",
|
215
220
|
key: "editGroups",
|
216
|
-
variant: "
|
217
|
-
"data-id": "editGroups"
|
221
|
+
variant: "buttons.link"
|
218
222
|
}, "Edit Groups"))), (0, _react2.jsx)(_index.Box, {
|
219
223
|
isRow: true
|
220
224
|
}, (0, _react2.jsx)(_index.IconButton, {
|
@@ -58,22 +58,19 @@ var ComboBoxInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
58
58
|
onSelectionChange = props.onSelectionChange,
|
59
59
|
wrapperProps = props.wrapperProps,
|
60
60
|
others = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
61
|
-
var _useHover = (0, _interactions.useHover)({}),
|
62
|
-
hoverProps = _useHover.hoverProps,
|
63
|
-
isHovered = _useHover.isHovered;
|
64
61
|
var textFieldProps = _objectSpread({
|
65
62
|
isDisabled: isDisabled,
|
66
63
|
isReadOnly: isReadOnly,
|
67
|
-
containerProps:
|
68
|
-
sx: style,
|
69
|
-
variant: 'forms.comboBox.container'
|
70
|
-
}, hoverProps), containerProps)
|
64
|
+
containerProps: containerProps
|
71
65
|
}, (0, _reactAria.mergeProps)(inputProps, others));
|
72
66
|
|
73
67
|
// istanbul ignore next
|
74
68
|
(0, _react.useImperativeHandle)(ref, function () {
|
75
69
|
return inputRef.current;
|
76
70
|
});
|
71
|
+
var _useHover = (0, _interactions.useHover)({}),
|
72
|
+
hoverProps = _useHover.hoverProps,
|
73
|
+
isHovered = _useHover.isHovered;
|
77
74
|
|
78
75
|
// START - minimum delay time for loading indicator = 500ms
|
79
76
|
var _useState = (0, _react.useState)(false),
|
@@ -138,10 +135,14 @@ var ComboBoxInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
138
135
|
focusClass: "is-focused",
|
139
136
|
focusRingClass: "focus-ring",
|
140
137
|
autoFocus: hasAutoFocus
|
141
|
-
}, (0, _react2.jsx)(_.
|
142
|
-
|
138
|
+
}, (0, _react2.jsx)(_.Box, (0, _extends2["default"])({
|
139
|
+
isRow: true,
|
140
|
+
style: style,
|
141
|
+
variant: "forms.comboBox.container"
|
142
|
+
}, hoverProps, wrapperProps), (0, _react2.jsx)(_.TextField, (0, _extends2["default"])({}, textFieldProps, {
|
143
|
+
wrapperProps: {
|
143
144
|
ref: inputWrapperRef
|
144
|
-
},
|
145
|
+
},
|
145
146
|
controlProps: _objectSpread({
|
146
147
|
variant: 'forms.comboBox.input'
|
147
148
|
}, controlProps),
|
@@ -152,7 +153,7 @@ var ComboBoxInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
152
153
|
slots: {
|
153
154
|
inContainer: button
|
154
155
|
}
|
155
|
-
})));
|
156
|
+
}))));
|
156
157
|
});
|
157
158
|
ComboBoxInput.propTypes = _objectSpread({
|
158
159
|
containerProps: _propTypes["default"].shape({}),
|
@@ -42,12 +42,12 @@ var tableCell = _objectSpread(_objectSpread({}, _Text.text.tableData), {}, {
|
|
42
42
|
});
|
43
43
|
var tableCellContents = {
|
44
44
|
flex: '1 1 0%',
|
45
|
-
minWidth: '0px',
|
46
45
|
overflow: 'hidden',
|
47
46
|
whiteSpace: 'nowrap',
|
48
47
|
textOverflow: 'ellipsis',
|
49
48
|
fontWeight: '400',
|
50
|
-
justifyContent: 'center'
|
49
|
+
justifyContent: 'center',
|
50
|
+
maxWidth: '100%'
|
51
51
|
};
|
52
52
|
var tableRow = {
|
53
53
|
position: 'relative',
|
@@ -57,6 +57,8 @@ var IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
57
57
|
(0, _react.useImperativeHandle)(ref, function () {
|
58
58
|
return buttonRef.current;
|
59
59
|
});
|
60
|
+
var _usePress = (0, _interactions.usePress)(buttonRef),
|
61
|
+
isPressedFromContext = _usePress.isPressed;
|
60
62
|
var _useButton = (0, _reactAria.useButton)(_objectSpread({}, props), buttonRef),
|
61
63
|
buttonProps = _useButton.buttonProps,
|
62
64
|
isPressed = _useButton.isPressed;
|
@@ -70,7 +72,7 @@ var IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
70
72
|
focusProps = _useFocusRing.focusProps;
|
71
73
|
var _useStatusClasses = (0, _hooks.useStatusClasses)(className, {
|
72
74
|
isHovered: isHovered,
|
73
|
-
isPressed: isPressed,
|
75
|
+
isPressed: isPressed || isPressedFromContext,
|
74
76
|
isFocused: isFocusVisible,
|
75
77
|
isDisabled: isDisabled
|
76
78
|
}),
|
@@ -60,7 +60,9 @@ var Default = function Default(args) {
|
|
60
60
|
}, "Fons Vernall")), (0, _react2.jsx)(_index.Box, {
|
61
61
|
isRow: true,
|
62
62
|
alignSelf: "center"
|
63
|
-
}, (0, _react2.jsx)(_index.IconButton,
|
63
|
+
}, (0, _react2.jsx)(_index.IconButton, {
|
64
|
+
"aria-label": "filter"
|
65
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
64
66
|
icon: _MoreVertIcon["default"],
|
65
67
|
size: "sm",
|
66
68
|
color: "neutral.20"
|
@@ -90,7 +92,9 @@ var WithSubtitle = function WithSubtitle(args) {
|
|
90
92
|
}, "fvernall0@google.it"))), (0, _react2.jsx)(_index.Box, {
|
91
93
|
isRow: true,
|
92
94
|
alignSelf: "center"
|
93
|
-
}, (0, _react2.jsx)(_index.IconButton,
|
95
|
+
}, (0, _react2.jsx)(_index.IconButton, {
|
96
|
+
"aria-label": "filter"
|
97
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
94
98
|
icon: _MoreVertIcon["default"],
|
95
99
|
size: "sm",
|
96
100
|
color: "neutral.20"
|
@@ -140,7 +144,8 @@ var WithHoverHandlers = function WithHoverHandlers(args) {
|
|
140
144
|
isRow: true,
|
141
145
|
alignSelf: "center"
|
142
146
|
}, (0, _react2.jsx)(_index.IconButton, {
|
143
|
-
size: 26
|
147
|
+
size: 26,
|
148
|
+
"aria-label": "filter"
|
144
149
|
}, (0, _react2.jsx)(_index.Icon, {
|
145
150
|
icon: _MoreVertIcon["default"],
|
146
151
|
size: 20,
|
@@ -24,11 +24,11 @@ var container = {
|
|
24
24
|
justifyContent: 'center',
|
25
25
|
bg: 'accent.99',
|
26
26
|
outline: 'none',
|
27
|
-
'& li': {
|
28
|
-
bg: 'white'
|
29
|
-
},
|
30
27
|
'&.is-selected': {
|
31
|
-
bg: 'white'
|
28
|
+
bg: 'white',
|
29
|
+
'& li': {
|
30
|
+
bg: 'white'
|
31
|
+
}
|
32
32
|
},
|
33
33
|
'&.is-hovered': {
|
34
34
|
bg: 'white',
|
@@ -335,7 +335,7 @@ var MultivaluesField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
|
|
335
335
|
label: item.name,
|
336
336
|
slots: item.slots
|
337
337
|
}, item.badgeProps), (0, _react2.jsx)(_.IconButton, (0, _extends2["default"])({
|
338
|
-
"aria-label": "delete",
|
338
|
+
"aria-label": "delete ".concat(item.name),
|
339
339
|
onPress: function onPress() {
|
340
340
|
return deleteItem(item.key);
|
341
341
|
},
|
@@ -78,14 +78,14 @@ var NumberField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
78
78
|
variant: "forms.numberField.arrows"
|
79
79
|
}, (0, _react2.jsx)(_.IconButton, (0, _extends2["default"])({}, incrementButtonProps, {
|
80
80
|
ref: decRef,
|
81
|
-
tabIndex: "
|
81
|
+
tabIndex: "0",
|
82
82
|
p: 0
|
83
83
|
}), (0, _react2.jsx)(_.Icon, {
|
84
84
|
icon: _MenuUpIcon["default"],
|
85
85
|
size: 18
|
86
86
|
})), (0, _react2.jsx)(_.IconButton, (0, _extends2["default"])({}, decrementButtonProps, {
|
87
87
|
ref: incrRef,
|
88
|
-
tabIndex: "
|
88
|
+
tabIndex: "0",
|
89
89
|
p: 0
|
90
90
|
}), (0, _react2.jsx)(_.Icon, {
|
91
91
|
icon: _MenuDownIcon["default"],
|
@@ -122,14 +122,14 @@ test('should show hintText text if prop is passed', function () {
|
|
122
122
|
_react2.fireEvent.mouseEnter(helpHintButton);
|
123
123
|
expect(_testWrapper.screen.getByText(hintText)).toBeInTheDocument();
|
124
124
|
});
|
125
|
-
test('increment and decrement buttons
|
125
|
+
test('increment and decrement buttons should be able to be focused via keyboard', function () {
|
126
126
|
getComponent();
|
127
127
|
_userEvent["default"].tab();
|
128
128
|
expect(_testWrapper.screen.getByLabelText(testLabel)).toHaveFocus();
|
129
129
|
_userEvent["default"].tab();
|
130
|
-
expect(_testWrapper.screen.getByLabelText('arrow-up')).
|
130
|
+
expect(_testWrapper.screen.getByLabelText('arrow-up')).toHaveFocus();
|
131
131
|
_userEvent["default"].tab();
|
132
|
-
expect(_testWrapper.screen.getByLabelText('arrow-down')).
|
132
|
+
expect(_testWrapper.screen.getByLabelText('arrow-down')).toHaveFocus();
|
133
133
|
});
|
134
134
|
test('number field input receiving name attribute', function () {
|
135
135
|
var testName = 'testName';
|
@@ -9,10 +9,12 @@ _Object$defineProperty(exports, "__esModule", {
|
|
9
9
|
value: true
|
10
10
|
});
|
11
11
|
exports["default"] = exports.InnerPanel = exports.Expandable = exports.Default = exports.CustomWidth = void 0;
|
12
|
+
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
12
13
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
13
14
|
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectDestructuringEmpty"));
|
14
15
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
15
16
|
var _react = _interopRequireWildcard(require("react"));
|
17
|
+
var _reactStately = require("react-stately");
|
16
18
|
var _ArrowCollapseIcon = _interopRequireDefault(require("mdi-react/ArrowCollapseIcon"));
|
17
19
|
var _ArrowTopRightBottomLeftIcon = _interopRequireDefault(require("mdi-react/ArrowTopRightBottomLeftIcon"));
|
18
20
|
var _ChevronRightIcon = _interopRequireDefault(require("mdi-react/ChevronRightIcon"));
|
@@ -150,7 +152,7 @@ var InnerPanel = function InnerPanel(_ref2) {
|
|
150
152
|
}, "Children render here."), (0, _react2.jsx)(_index.ListView, {
|
151
153
|
items: items
|
152
154
|
}, function (item) {
|
153
|
-
return (0, _react2.jsx)(
|
155
|
+
return (0, _react2.jsx)(_reactStately.Item, {
|
154
156
|
key: item.id
|
155
157
|
}, (0, _react2.jsx)(_index.Text, {
|
156
158
|
variant: "itemTitle",
|
@@ -176,7 +178,7 @@ var InnerPanel = function InnerPanel(_ref2) {
|
|
176
178
|
zIndex: 11
|
177
179
|
},
|
178
180
|
onClose: toggleMessagesOpen
|
179
|
-
}, (0, _react2.jsx)(
|
181
|
+
}, (0, _react2.jsx)(_reactStately.Item, {
|
180
182
|
key: "message2",
|
181
183
|
status: "success"
|
182
184
|
}, "Z Index higher than inner pannel")))
|
@@ -297,6 +299,19 @@ var Expandable = function Expandable() {
|
|
297
299
|
var onCloseHandler = function onCloseHandler() {
|
298
300
|
return onClose(state, triggerRef);
|
299
301
|
};
|
302
|
+
var _useState5 = (0, _react.useState)('#EACE91'),
|
303
|
+
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
304
|
+
color = _useState6[0],
|
305
|
+
setColor = _useState6[1];
|
306
|
+
var handleColorChange = (0, _react.useCallback)(function (_ref3) {
|
307
|
+
var _context, _context2, _context3;
|
308
|
+
var rgb = _ref3.rgb;
|
309
|
+
var r = rgb.r,
|
310
|
+
b = rgb.b,
|
311
|
+
g = rgb.g,
|
312
|
+
a = rgb.a;
|
313
|
+
setColor((0, _concat["default"])(_context = (0, _concat["default"])(_context2 = (0, _concat["default"])(_context3 = "rgba(".concat(r, ", ")).call(_context3, g, ", ")).call(_context2, b, ", ")).call(_context, a, ")"));
|
314
|
+
}, []);
|
300
315
|
var header = (0, _react2.jsx)(_index.Box, {
|
301
316
|
sx: sx.header
|
302
317
|
}, (0, _react2.jsx)(_index.Box, {
|
@@ -339,10 +354,10 @@ var Expandable = function Expandable() {
|
|
339
354
|
sx: sx.header.breadcrumbsContainer
|
340
355
|
}, (0, _react2.jsx)(_index.Breadcrumbs, {
|
341
356
|
icon: _ChevronRightIcon["default"]
|
342
|
-
}, (0, _react2.jsx)(
|
357
|
+
}, (0, _react2.jsx)(_reactStately.Item, {
|
343
358
|
key: "home",
|
344
359
|
"data-id": "home"
|
345
|
-
}, "Capability"), (0, _react2.jsx)(
|
360
|
+
}, "Capability"), (0, _react2.jsx)(_reactStately.Item, {
|
346
361
|
key: "editGroups",
|
347
362
|
variant: "neutralText",
|
348
363
|
"data-id": "editGroups"
|
@@ -356,11 +371,12 @@ var Expandable = function Expandable() {
|
|
356
371
|
label: "Node Description",
|
357
372
|
defaultValue: "The Value of the Text Input"
|
358
373
|
}), (0, _react2.jsx)(_index.ColorField, {
|
359
|
-
value:
|
374
|
+
value: color,
|
360
375
|
label: "Node Background Color",
|
361
376
|
buttonProps: {
|
362
377
|
sx: sx.colorField
|
363
|
-
}
|
378
|
+
},
|
379
|
+
onChange: handleColorChange
|
364
380
|
}), (0, _react2.jsx)(_index.SwitchField, {
|
365
381
|
hintText: "Example Hint",
|
366
382
|
labelProps: {
|
@@ -382,7 +398,7 @@ var Expandable = function Expandable() {
|
|
382
398
|
hintText: 'Example Hint'
|
383
399
|
}
|
384
400
|
}, function (item) {
|
385
|
-
return (0, _react2.jsx)(
|
401
|
+
return (0, _react2.jsx)(_reactStately.Item, {
|
386
402
|
key: item.key,
|
387
403
|
"data-id": item.name
|
388
404
|
}, item.name);
|