Skip to content

Commit

Permalink
Merge pull request #268 from josemarluedke/feat/docs-site
Browse files Browse the repository at this point in the history
Revamp docs site
  • Loading branch information
josemarluedke authored Feb 16, 2024
2 parents 99021be + 47da0b4 commit 88ccad5
Show file tree
Hide file tree
Showing 61 changed files with 5,030 additions and 5,453 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = {
'site/tests/dummy/config/**/*.js',
'site/**/tailwind.config.js',
'site/.docfy-config.js',
'site/lib/docfy-theme/*.js',
'site/lib/*.js',
'test-app/ember-cli-build.js',
'test-app/testem.js',
'test-app/config/**/*.js',
Expand Down
1 change: 1 addition & 0 deletions packages/buttons/src/components/button-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@ import { ButtonGroup } from '@frontile/buttons';

## API

<Signature @package="buttons" @component="ButtonGroup" />
2 changes: 1 addition & 1 deletion packages/buttons/src/components/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ argument `@class` will override and merge TailwindCSS class names.

## API

<ArgsTable @of="Button" />
<Signature @package="buttons" @component="Button" />
1 change: 1 addition & 0 deletions packages/buttons/src/components/chip.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,4 @@ argument `@class` will override and merge TailwindCSS class names.

## API

<Signature @package="buttons" @component="Chip" />
2 changes: 1 addition & 1 deletion packages/buttons/src/components/close-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ import { CloseButton} from '@frontile/buttons';

## API

<ArgsTable @of="CloseButton" />
<Signature @package="buttons" @component="CloseButton" />
1 change: 1 addition & 0 deletions packages/buttons/src/components/toggle-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@ import { ToggleButton } from '@frontile/buttons';

## API

<Signature @package="buttons" @component="ToggleButton" />
2 changes: 1 addition & 1 deletion packages/changeset-form/docs/changeset-form-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default class Demo extends Component {

### Args

<ArgsTable @of="ChangesetForm" class="mb-8" />
<Signature @package="changeset-form" @component="ChangesetForm" class="mb-8" />

### Blocks

Expand Down
1 change: 1 addition & 0 deletions packages/collections/src/components/dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ export default class Example extends Component {

## API

<Signature @package="collections" @component="Dropdown" />
2 changes: 1 addition & 1 deletion packages/forms/src/components/form-checkbox-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## API

<ArgsTable @of="FormCheckboxGroup" />
<Signature @package="forms" @component="FormCheckboxGroup" />
2 changes: 1 addition & 1 deletion packages/forms/src/components/form-checkbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## API

<ArgsTable @of="FormCheckbox" />
<Signature @package="forms" @component="FormCheckbox" />
2 changes: 1 addition & 1 deletion packages/forms/src/components/form-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## API

<ArgsTable @of="FormInput" />
<Signature @package="forms" @component="FormInput" />
2 changes: 1 addition & 1 deletion packages/forms/src/components/form-radio-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## API

<ArgsTable @of="FormRadioGroup" />
<Signature @package="forms" @component="FormRadioGroup" />
2 changes: 1 addition & 1 deletion packages/forms/src/components/form-radio.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## API

<ArgsTable @of="FormRadio" />
<Signature @package="forms" @component="FormRadio" />
2 changes: 1 addition & 1 deletion packages/forms/src/components/form-select.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ In the example below, we have a label, hint, error validation, search and `allow

## API

<ArgsTable @of="FormSelect" />
<Signature @package="forms" @component="FormSelect" />
2 changes: 1 addition & 1 deletion packages/forms/src/components/form-textarea.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## API

<ArgsTable @of="FormTextarea" />
<Signature @package="forms" @component="FormTextarea" />
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ category: components

## API

<ArgsTable @of="NotificationsContainer" />
<Signature @package="notifications" @component="NotificationsContainer" />
2 changes: 1 addition & 1 deletion packages/overlays/src/components/drawer.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ url: drawer

## API

<ArgsTable @of="Drawer" />
<Signature @package="overlays" @component="Drawer" />
2 changes: 1 addition & 1 deletion packages/overlays/src/components/modal.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ url: modal

## API

<ArgsTable @of="Modal" />
<Signature @package="overlays" @component="Modal" />
2 changes: 1 addition & 1 deletion packages/overlays/src/components/overlay.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ It contains all the core features necessary for a great experience.

## API

<ArgsTable @of="Overlay" />
<Signature @package="overlays" @component="Overlays" />
45 changes: 31 additions & 14 deletions packages/overlays/src/components/popover.gts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ interface PopoverSignature {
toggle: () => void;
open: () => void;
close: () => void;
trigger: ModifierLike<{ Element: HTMLElement }>;
trigger: ModifierLike<{
Element: HTMLElement;
Args: { Positional: [eventType?: 'click' | 'hover'] };
}>;
Content: WithBoundArgs<
typeof Content,
'loop' | 'isOpen' | 'id' | 'toggle' | 'blockScroll' | 'backdrop'
Expand Down Expand Up @@ -93,19 +96,30 @@ class Popover extends Component<PopoverSignature> {
}
};

trigger = modifier((el: HTMLElement) => {
this.triggerEl = el as HTMLLIElement;

el.addEventListener('click', this.toggle);
el.setAttribute('aria-haspopup', 'true');
el.setAttribute('aria-controls', this.menuId);
el.setAttribute('aria-expanded', this.isOpen.toString());

return () => {
el.removeEventListener('click', this.toggle);
this.triggerEl = undefined;
};
});
trigger = modifier(
(el: HTMLElement, [eventType]: [eventType?: 'click' | 'hover']) => {
this.triggerEl = el as HTMLLIElement;
if (eventType === 'hover') {
el.addEventListener('mouseenter', this.toggle);
el.addEventListener('mouseleave', this.toggle);
} else {
el.addEventListener('click', this.toggle);
}
el.setAttribute('aria-haspopup', 'true');
el.setAttribute('aria-controls', this.menuId);
el.setAttribute('aria-expanded', this.isOpen.toString());

return () => {
if (eventType === 'hover') {
el.removeEventListener('mouseenter', this.toggle);
el.removeEventListener('mouseleave', this.toggle);
} else {
el.removeEventListener('click', this.toggle);
}
this.triggerEl = undefined;
};
}
);

updateAriaExtanded = modifier((_: HTMLElement) => {
if (this.triggerEl) {
Expand Down Expand Up @@ -207,6 +221,9 @@ interface ContentSignature {
Blocks: { default: [] };
}

/**
* Component yielded from Popover
*/
class Content extends Component<ContentSignature> {
get loop() {
assert(
Expand Down
3 changes: 3 additions & 0 deletions packages/overlays/src/components/popover.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,6 @@ import { Button } from '@frontile/buttons';

## API

<Signature @package="overlays" @component="Popover" />

<Signature @package="overlays" @module="popover" @component="Content" />
2 changes: 2 additions & 0 deletions packages/status/src/components/progress-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,5 @@ Using the class attribute will just append the class names passed in, while the
argument `@class` will override and merge TailwindCSS class names.

## API

<Signature @package="status" @component="ProgressBar" />
2 changes: 1 addition & 1 deletion packages/utilities/src/components/collapsible.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ This component provides unstyled collapsible ability.

## API

<ArgsTable @of="Collapsible" />
<Signature @package="utilities" @component="Collapsible" />
1 change: 1 addition & 0 deletions packages/utilities/src/components/divider.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ import { Divider } from '@frontile/utilities';

## API

<Signature @package="utilities" @component="Divider" />
Loading

0 comments on commit 88ccad5

Please sign in to comment.