AlaskaAirlines / auro-form

Custom element that ....
https://auro.alaskaair.com/components/auro/form
Apache License 2.0
0 stars 0 forks source link

add select@3.3.0 #46

Open sun-mota opened 1 week ago

sun-mota commented 1 week ago

Alaska Airlines Pull Request

This is to add Auro-select into Auro-formkit This select is using auro-formkit/menu and @aurodesignsystem/auro-dropdown@3.2.0 currently and will have another PR of a revision to replace the use of @aurodesignsystem/auro-dropdown@3.2.0 to auro-formkit/dropdown

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I have performed a self-review of my own update.

Summary by Sourcery

Add the auro-select component to the project, integrating it with auro-menu and auro-dropdown to provide a comprehensive dropdown menu solution. Enhance the auro-input component with new date input types and improve validation. Update build scripts and dependencies to support new components and ensure compatibility. Expand documentation and tests to cover new features and changes.

New Features:

Enhancements:

Build:

Documentation:

Tests:

sourcery-ai[bot] commented 1 week ago

Reviewer's Guide by Sourcery

This PR adds select@3.3.0 to Auro-formkit, introducing a new select component that uses auro-formkit/menu and auro-dropdown@3.2.0. The implementation includes comprehensive component files, tests, documentation, and styling for the select, menu, and checkbox components.

Class diagram for AuroSelect component

classDiagram
    class AuroSelect {
        +String validity
        +String setCustomValidity
        +String setCustomValidityCustomError
        +String setCustomValidityValueMissing
        +String error
        +Boolean noValidate
        +Boolean required
        +Boolean flexMenuWidth
        +String placeholder
        +String value
        +Boolean disabled
        +Boolean noCheckmark
        +Object optionSelected
        +slot label
        +slot helpText
        +auroSelect-ready()
        +auroSelect-valueSet()
        +auroFormElement-validated()
        +register(name="auro-select")
        +updateDisplayedValue(option)
        +configureDropdown()
        +configureMenu()
        +configureSelect()
        +handleFocusin()
        +notifyReady()
        +checkReadiness()
        +generateOptionsArray()
        +readyActions()
        +performUpdate()
        +firstUpdated()
        +updated(changedProperties)
        +labelForSr()
    }
    AuroSelect --> AuroDropdown
    AuroSelect --> AuroMenu
    AuroSelect --> AuroFormValidation
    AuroSelect --> AuroLibraryRuntimeUtils
    AuroSelect --> AuroDependencyVersioning

Class diagram for BaseInput modifications

classDiagram
    class BaseInput {
        +String[] dateTypes
        +String[] autoFormattingTypes
        +handleClickClear()
        +setCustomValidityForType
        +dateStrLength
        +helpText
        +placeholder
    }
    note for BaseInput "Added new date types: 'month', 'year', 'fullYear'"
    note for BaseInput "Updated handleClickClear to set value to an empty string"

File-Level Changes

Change Details Files
Added new select component with menu and dropdown integration
  • Created auro-select component with menu and dropdown functionality
  • Added support for placeholder text, disabled state, and error handling
  • Implemented keyboard navigation and accessibility features
  • Added support for nested menus and checkmark toggles
components/select/src/auro-select.js
components/select/src/style.scss
components/select/src/color.scss
Added menu component implementation
  • Created auro-menu and auro-menuoption components
  • Added support for nested menus and option selection
  • Implemented keyboard navigation and focus management
  • Added styling for menu items and states
components/menu/src/auro-menu.js
components/menu/src/auro-menuoption.js
components/menu/src/style-menu.scss
components/menu/src/style-menuoption.scss
Added checkbox component implementation
  • Created auro-checkbox and auro-checkbox-group components
  • Added support for disabled state and error handling
  • Implemented form validation features
  • Added styling for checkbox states
components/checkbox/src/auro-checkbox.js
components/checkbox/src/auro-checkbox-group.js
components/checkbox/src/auro-checkbox.scss
components/checkbox/src/auro-checkbox-group.scss
Added comprehensive test coverage
  • Added unit tests for select component functionality
  • Added tests for menu and menuoption components
  • Added tests for checkbox components
  • Implemented test utilities and fixtures
components/select/test/auro-select.test.js
components/menu/test/auro-menu.test.js
components/checkbox/test/auro-checkbox.test.js
Added documentation and examples
  • Created API documentation for all components
  • Added usage examples and code samples
  • Created demo pages with interactive examples
  • Added design notes and implementation guidelines
components/select/docs/api.md
components/menu/docs/api.md
components/checkbox/docs/api.md
components/select/demo/index.md
components/menu/demo/index.md
components/checkbox/demo/index.md

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).