Skip to content

Commit

Permalink
feat(components): toggletip
Browse files Browse the repository at this point in the history
- adds new toggletip component
- refactor to new floating-ui top layer support

Signed-off-by: Cory Rylan <cory@coryrylan.com>
  • Loading branch information
coryrylan committed Feb 2, 2024
1 parent fae5b39 commit 20b5227
Show file tree
Hide file tree
Showing 24 changed files with 1,180 additions and 1,432 deletions.
1 change: 1 addition & 0 deletions docs/src/_layouts/base.11ty.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/src/_pages/components/dialog.11ty.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ ${getExample(data.schema, 'small')}
${getExample(data.schema, 'large')}
${getExample(data.schema, 'footer')}
${getExample(data.schema, 'non-modal')}
${getImport(data.schema)}
Expand Down
26 changes: 26 additions & 0 deletions docs/src/_pages/components/toggletip.11ty.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import schema from '../../../../packages/components/dist/drafter/schema.json' assert { type: 'json' };
import { getImport, getExample, getAPI } from '../../_includes/utils/index.js';

export const data = {
title: 'Toggletip',
aria: 'https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/',
schema: schema.find(c => c.name === 'toggletip')
};

export function render() {
return /* markdown */`
The toggletip component is used to provide explanations, definitions, or supplementary interactions for a given element. It should be used to provide additional information or actions that are not essential to the user's understanding of the content, but that may be helpful or informative.
${getExample(data.schema, 'example')}
${getExample(data.schema, 'position')}
${getImport(data.schema)}
## Accessibility
- The component should be fully navigable using only the keyboard, allowing users to easily move between different toggletip.
- The component should also provide a clear visual indication of focus for keyboard only users.
${getAPI(data.schema)}
`;
}

0 comments on commit 20b5227

Please sign in to comment.