-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
259 changed files
with
1,787 additions
and
2,766 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './lib/components'; | ||
export * from './lib/enums'; | ||
export * from './shared/design-system'; | ||
export { setLocale } from './shared/localization'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,28 @@ | ||
import type { FoundationElementDefinition } from '@microsoft/fast-foundation'; | ||
import { registerFactory } from '../../shared/design-system'; | ||
import { iconRegistries } from '../icon/definition'; | ||
import { createRegisterFunction } from '../../shared/design-system/createRegisterFunction'; | ||
import { iconDefinition } from '../icon/definition'; | ||
import { defineVividComponent } from '../../shared/design-system/defineVividComponent'; | ||
import styles from './accordion-item.scss?inline'; | ||
|
||
import { AccordionItem } from './accordion-item'; | ||
import { AccordionItemTemplate as template } from './accordion-item.template'; | ||
|
||
/** | ||
* | ||
* @internal | ||
*/ | ||
export const accordionItemDefinition = | ||
AccordionItem.compose<FoundationElementDefinition>({ | ||
baseName: 'accordion-item', | ||
template: template as any, | ||
export const accordionItemDefinition = defineVividComponent( | ||
'accordion-item', | ||
AccordionItem, | ||
template, | ||
[iconDefinition], | ||
{ | ||
styles, | ||
}); | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const accordionItemRegistries = [ | ||
accordionItemDefinition(), | ||
...iconRegistries, | ||
]; | ||
} | ||
); | ||
|
||
/** | ||
* Registers the accordion item elements with the design system. | ||
* | ||
* @param prefix - the prefix to use for the component name | ||
*/ | ||
export const registerAccordionItem = registerFactory(accordionItemRegistries); | ||
export const registerAccordionItem = createRegisterFunction( | ||
accordionItemDefinition | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
import { elements, html, slotted } from '@microsoft/fast-element'; | ||
import type { ViewTemplate } from '@microsoft/fast-element'; | ||
import { classNames } from '@microsoft/fast-web-utilities'; | ||
import type { Accordion } from './accordion'; | ||
|
||
const getClasses = (_: Accordion) => classNames('base'); | ||
|
||
/** | ||
* @public | ||
*/ | ||
export const AccordionTemplate: () => ViewTemplate<Accordion> = | ||
() => html<Accordion>` | ||
<div class="${getClasses}"> | ||
<slot | ||
${slotted({ property: 'accordionItems', filter: elements() })} | ||
></slot> | ||
</div> | ||
`; | ||
export const AccordionTemplate = html<Accordion>` | ||
<div class="${getClasses}"> | ||
<slot ${slotted({ property: 'accordionItems', filter: elements() })}></slot> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,28 @@ | ||
import type { FoundationElementDefinition } from '@microsoft/fast-foundation'; | ||
import { registerFactory } from '../../shared/design-system'; | ||
import { accordionItemRegistries } from '../accordion-item/definition'; // cf https://github.com/Vonage/vivid-3/discussions/929 | ||
import { createRegisterFunction } from '../../shared/design-system/createRegisterFunction'; | ||
import { accordionItemDefinition } from '../accordion-item/definition'; | ||
import { defineVividComponent } from '../../shared/design-system/defineVividComponent'; | ||
import styles from './accordion.scss?inline'; | ||
|
||
import { Accordion } from './accordion'; | ||
import { AccordionTemplate as template } from './accordion.template'; | ||
|
||
export type { AccordionExpandMode } from '@microsoft/fast-foundation'; | ||
|
||
/** | ||
* | ||
* @internal | ||
*/ | ||
export const accordionDefinition = | ||
Accordion.compose<FoundationElementDefinition>({ | ||
baseName: 'accordion', | ||
template: template as any, | ||
export const accordionDefinition = defineVividComponent( | ||
'accordion', | ||
Accordion, | ||
template, | ||
[accordionItemDefinition], | ||
{ | ||
styles, | ||
}); | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const accordionRegistries = [ | ||
accordionDefinition(), | ||
...accordionItemRegistries, | ||
]; | ||
} | ||
); | ||
|
||
/** | ||
* Registers the accordion elements with the design system. | ||
* | ||
* @param prefix - the prefix to use for the component name | ||
*/ | ||
export const registerAccordion = registerFactory(accordionRegistries); | ||
export const registerAccordion = createRegisterFunction(accordionDefinition); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,29 @@ | ||
import type { FoundationElementDefinition } from '@microsoft/fast-foundation'; | ||
import { registerFactory } from '../../shared/design-system'; | ||
import { createRegisterFunction } from '../../shared/design-system/createRegisterFunction'; | ||
import { defineVividComponent } from '../../shared/design-system/defineVividComponent'; | ||
import styles from './action-group.scss?inline'; | ||
|
||
import { ActionGroup } from './action-group'; | ||
import { ActionGroupTemplate as template } from './action-group.template'; | ||
|
||
export type { ActionGroupShape, ActionGroupAppearance } from './action-group'; | ||
|
||
/** | ||
* | ||
* @internal | ||
*/ | ||
export const actionGroupDefinition = | ||
ActionGroup.compose<FoundationElementDefinition>({ | ||
baseName: 'action-group', | ||
template: template as any, | ||
export const actionGroupDefinition = defineVividComponent( | ||
'action-group', | ||
ActionGroup, | ||
template, | ||
[], | ||
{ | ||
styles, | ||
}); | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const actionGroupRegistries = [actionGroupDefinition()]; | ||
} | ||
); | ||
|
||
/** | ||
* Registers the action-group elements with the design system. | ||
* | ||
* @param prefix - the prefix to use for the component name | ||
*/ | ||
export const registerActionGroup = registerFactory(actionGroupRegistries); | ||
export const registerActionGroup = createRegisterFunction( | ||
actionGroupDefinition | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.