Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(navigation, navigation-logo, navigation-user): Add navigation, n…
…avigation-logo & navigation-user components. (#6873) **Related Issue:** #6531 ## Summary This PR adds the following components: - calcite-navigation - calcite-navigation-user - calcite-navigation-logo Co-authored by @macandcheese Extracted from #6829 ## calcite-navigation <!-- Auto Generated Below --> ### Usage #### Basic ```html <calcite-shell> <calcite-navigation slot="header"> <calcite-chip-group slot="content-center"> <calcite-chip>nav item 1</calcite-chip> <calcite-chip>nav item 2</calcite-chip> <calcite-chip>nav item 3</calcite-chip> </calcite-chip-group> </calcite-navigation> </calcite-shell> ``` ### Properties | Property | Attribute | Description | Type | Default | | -------------------- | ------------------- | -------------------------------------------------------------------------------------------------------- | --------- | ----------- | | `label` _(required)_ | `label` | When `navigationAction` is `true`, specifies the label of the `calcite-action`. | `string` | `undefined` | | `navigationAction` | `navigation-action` | When `true`, displays a `calcite-action` and emits a `calciteNavActionSelect` event on selection change. | `boolean` | `false` | ### Events | Event | Description | Type | | ------------------------------- | ----------------------------------------------------------------------------------- | ------------------- | | `calciteNavigationActionSelect` | When `navigationAction` is true, emits when the displayed action selection changes. | `CustomEvent<void>` | ### Methods #### `setFocus() => Promise<void>` When `navigation-action` is `true`, sets focus on the component's action element. ##### Returns Type: `Promise<void>` ### CSS Custom Properties | Name | Description | | ----------------------------------- | ---------------------------------------------------- | | `--calcite-navigation-background` | Specifies the background color of the component. | | `--calcite-navigation-border-color` | Specifies the border color of the component. | | `--calcite-navigation-width` | Specifies the width of the component's content area. | ### Dependencies #### Depends on - [calcite-action](../action) ---------------------------------------------- ## calcite-navigation-logo <!-- Auto Generated Below --> ### Usage #### Basic ```html <calcite-navigation-logo active thumbnail="./_assets/images/esri-logo.svg"></calcite-navigation-user> ``` ### Properties | Property | Attribute | Description | Type | Default | | ------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------- | | `active` | `active` | When true, the component is highlighted. | `boolean` | `undefined` | | `description` | `description` | A description for the component, which displays below the `heading`. | `string` | `undefined` | | `heading` | `heading` | Specifies heading text for the component, such as a product or organization name. | `string` | `undefined` | | `href` | `href` | Specifies the URL destination of the component, which can be set as an absolute or relative path. | `string` | `undefined` | | `label` | `label` | Describes the appearance or function of the `thumbnail`. If no label is provided, context will not be provided to assistive technologies. | `string` | `undefined` | | `rel` | `rel` | Defines the relationship between the `href` value and the current document. | `string` | `undefined` | | `target` | `target` | Specifies where to open the linked document defined in the `href` property. | `string` | `undefined` | | `thumbnail` | `thumbnail` | Specifies the `src` to an image. | `string` | `undefined` | ### Methods #### `setFocus() => Promise<void>` Sets focus on the component. ##### Returns Type: `Promise<void>` ---------------------------------------------- ## calcite-navigation-user <!-- Auto Generated Below --> ### Usage #### Basic ```html <calcite-navigation-user full-name="Jhon Doe" user-id="Jhon123" active></calcite-navigation-user> ``` ### Properties | Property | Attribute | Description | Type | Default | | -------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------ | --------- | ----------- | | `active` | `active` | When true, the component is highlighted. | `boolean` | `undefined` | | `fullName` | `full-name` | Specifies the full name of the user. | `string` | `undefined` | | `label` | `label` | Describes the appearance of the avatar. If no label is provided, context will not be provided to assistive technologies. | `string` | `undefined` | | `textDisabled` | `text-disabled` | When `true`, hides the `fullName` and `username` contents. | `boolean` | `false` | | `thumbnail` | `thumbnail` | Specifies the`src` to an image (remember to add a token if the user is private). | `string` | `undefined` | | `userId` | `user-id` | Specifies the unique id of the user. | `string` | `undefined` | | `username` | `username` | Specifies the username of the user. | `string` | `undefined` | ### Methods #### `setFocus() => Promise<void>` Sets focus on the component. ##### Returns Type: `Promise<void>` ### Dependencies #### Depends on - [calcite-avatar](../avatar) --------- Co-authored-by: Adam <[email protected]> Co-authored-by: Adam Tirella <[email protected]>
- Loading branch information