-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OUTLINE-165: Creating ready to develop placeholders for upcoming components #414
Merged
+2,305
−11
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
314f5e4
feat(outline-core-image): Initial component stub.
himerus 39e0e4a
feat(outline-core-image): Fix for stray file update.
himerus 3cd4636
feat(outline-core-image): Formatting tweaks.
himerus 6db26b1
feat(outline-core-image): Setting up Storybook to look for .mdx files…
himerus dfb2a30
feat(outline-core-card): Stub the `outline-core-card` component.
himerus b64b195
feat(outline-core-alert): Stub the `outline-core-alert` component.
himerus 87e1698
feat(outline-core-icon): Stub the `outline-core-icon` component.
himerus b19baf4
fix(versioning): Updating stubbed components to include a default ver…
himerus a9f3c0a
feat(outline-core-container): Stub the `outline-core-container` compo…
himerus 0cf3972
feat(outline-core-list): Stub the `outline-core-list` component.
himerus dd4a6c2
feat(outline-core-form): Stub the `outline-core-form` component.
himerus fa39a82
feat(outline-core-text): Stub the `outline-core-text` component.
himerus 22f45ea
feat(outline-core-accordion): Stub the `outline-core-accordion` compo…
himerus fc14642
feat(outline-core-youtube): Stub the `outline-core-youtube` component.
himerus 6abb668
feat(outline-core-breadcrumb): Stub the `outline-core-breadcrumb` com…
himerus aa85cf6
feat(outline-core-modal): Stub the `outline-core-modal` component.
himerus 31dadde
feat(release): Updating changeset config, and package defaults.
himerus ec02013
Merge branch 'next' into feature/component-stubs
himerus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
40 changes: 40 additions & 0 deletions
40
packages/outline-core-accordion/docs/outline-core-accordion.mdx
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Meta } from '@storybook/addon-docs'; | ||
|
||
import '@phase2/outline-alert'; | ||
|
||
<Meta | ||
title="In Progress/Accordion" | ||
component="outline-core-accordion" | ||
parameters={{ | ||
viewMode: 'docs', | ||
previewTabs: { | ||
canvas: { | ||
hidden: true, | ||
}, | ||
}, | ||
}} | ||
/> | ||
|
||
[![Latest version for outline-core-accordion](https://img.shields.io/npm/v/@phase2/outline-core-accordion)](https://www.npmjs.com/package/@phase2/outline-core-accordion) | ||
|
||
# `<outline-core-accordion>` `OutlineCoreAccordion` | ||
|
||
The `outline-core-accordion` component ... | ||
|
||
<outline-alert status="warning" size="large"> | ||
<span slot="header">Documentation Status: @TODO</span> | ||
<p>This documentation is in need of completion as the component is built out.</p> | ||
<ul> | ||
<li>**@todo:** Complete component.</li> | ||
<li>**@todo:** Update documentation.</li> | ||
</ul> | ||
</outline-alert> | ||
<br /> | ||
|
||
## Introduction to the **`outline-core-accordion`** component | ||
|
||
|
||
## Usage | ||
|
||
## CSS Variables | ||
|
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* @file Exports for the OutlineCoreAccordion component. | ||
* | ||
* Any export here is then available via the following import, | ||
* which should be available in the consuming application: | ||
* | ||
* @code | ||
* import { OutlineCoreAccordion } from '@phase2/outline-core-accordion'; | ||
* import { constantOne, constantTwo } from '@phase2/outline-core-accordion'; | ||
* import type { ThingType } from '@phase2/outline-core-accordion'; | ||
* @endcode | ||
* | ||
* Any of the above exports can be used in the consuming application | ||
* based on the contents of this file, and creativity of what functionality | ||
* you wish to expose to the consuming application(s). | ||
*/ | ||
|
||
// Export the primary component. | ||
export { OutlineCoreAccordion } from './src/outline-core-accordion'; | ||
|
||
// Export any additional sub-components, variables and methods as required. |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "@phase2/outline-core-accordion", | ||
"private": true, | ||
"version": "0.0.0", | ||
"description": "The Outline Components for the image component", | ||
"keywords": [ | ||
"outline", | ||
"web-components", | ||
"design system", | ||
"image", | ||
"picture" | ||
], | ||
"main": "index.ts", | ||
"types": "index.ts", | ||
"typings": "index.d.ts", | ||
"files": [ | ||
"/dist/", | ||
"/src/", | ||
"!/dist/tsconfig.build.tsbuildinfo" | ||
], | ||
"author": "Phase2 Technology", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/phase2/outline.git", | ||
"directory": "packages/outline-core-accordion" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"scripts": { | ||
"build": "node ../../scripts/build.js", | ||
"package": "yarn publish" | ||
}, | ||
"dependencies": { | ||
"@phase2/outline-core": "^0.2.3", | ||
"lit": "^2.3.1" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"exports": { | ||
".": "./index.ts" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/** | ||
* @file Shared configuration for the `outline-core-accordion` component. | ||
*/ |
33 changes: 33 additions & 0 deletions
33
packages/outline-core-accordion/src/outline-core-accordion.css
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
Styles for `outline-core-accordion.css` | ||
|
||
=== REMOVE BELOW THIS LINE (AFTER READING) === | ||
@todo: Extrapolate these comments/documentation to a more official location | ||
Add any component level, structural CSS for the `COMPONENT-NAME` component. | ||
This would be CSS that is targeted to this component only, | ||
and is dependent on the HTML structure of the component that | ||
is encapsulated in the component's Shadow DOM. | ||
--- | ||
Shoud the need arise to style the component based on slotted content | ||
with an unknown markup structure provided by the consuming application | ||
in the Light DOM via slots provided by the component, | ||
consider the following best practices: | ||
|
||
The root element of a `slot` should either be | ||
- Semantically expected tag at the top level | ||
- `outline-core-link` for instance requires (if slotted) an `a` tag as the root element of the slot. | ||
- `outline-core-button` also requires (if slotted) a `button` tag as the root element of the slot. | ||
- A custom element that provides its own styling and encapsulation | ||
- `outline-core-card` would be a component example that | ||
- Provides its own styling and encapsulation to handle functionality and responsive behaviors | ||
- And also either: | ||
- Instructs the consuming application to provide a custom element as the first level child of a `slot`, thus providing it's own styling. | ||
- Allows for slotted content to be styled by the consuming application | ||
|
||
Upcoming work will allow for the "styling by the consuming application" option to be more easily | ||
implemented in a standardized and simplified way. | ||
|
||
When updates to build tooling is in place, CSS would be added to an `COMPONENT-NAME.global.css` file, | ||
and then processed either to be loaded on the fly, or manually via a standard `*.global.css` file. | ||
=== REMOVE ABOVE THIS LINE (AFTER YOU READ IT) === | ||
*/ |
42 changes: 42 additions & 0 deletions
42
packages/outline-core-accordion/src/outline-core-accordion.ts
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { html, TemplateResult, CSSResultGroup } from 'lit'; | ||
import { customElement } from 'lit/decorators.js'; | ||
|
||
// Our base component, which all others extend. | ||
import { OutlineElement } from '@phase2/outline-core'; | ||
|
||
import componentStyles from './outline-core-accordion.css.lit'; | ||
|
||
/** The element name, reused throughout the codebase */ | ||
const componentName = 'outline-core-accordion'; | ||
|
||
/** | ||
* | ||
* The Outline Core Accordion component | ||
* | ||
* @element outline-core-accordion | ||
* @extends OutlineElement | ||
* @slot - The default slot for this element. | ||
* | ||
* @todo: Complete component. | ||
* @todo: Update `../docs/outline-core-accordion.mdx` to accurately document the component. | ||
* @todo: Run `yarn analyze` to generate README.md. | ||
* @todo: Update `package.json` to remove the `private` flag. | ||
* @todo: Update `.changeset/config.json` to remove this component from the `ignore` list. | ||
* @todo: Create PR for updated and completed component. | ||
*/ | ||
@customElement(componentName) | ||
export class OutlineCoreAccordion extends OutlineElement { | ||
static styles: CSSResultGroup = [componentStyles]; | ||
|
||
render(): TemplateResult { | ||
return html` | ||
<slot></slot> | ||
`; | ||
} | ||
} | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
[componentName]: OutlineCoreAccordion; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "./dist" | ||
}, | ||
"include": ["index.ts", "src/**/*", "tests/**/*"], | ||
"references": [{ "path": "../outline-core/tsconfig.build.json" }] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Meta } from '@storybook/addon-docs'; | ||
|
||
import '@phase2/outline-alert'; | ||
|
||
<Meta | ||
title="In Progress/Alert" | ||
component="outline-core-alert" | ||
parameters={{ | ||
viewMode: 'docs', | ||
previewTabs: { | ||
canvas: { | ||
hidden: true, | ||
}, | ||
}, | ||
}} | ||
/> | ||
|
||
[![Latest version for outline-core-alert](https://img.shields.io/npm/v/@phase2/outline-core-alert)](https://www.npmjs.com/package/@phase2/outline-core-alert) | ||
|
||
# `<outline-core-alert>` `OutlineCoreAlert` | ||
|
||
The `outline-core-alert` component ... | ||
|
||
<outline-alert status="warning" size="large"> | ||
<span slot="header">Documentation Status: @TODO</span> | ||
<p>This documentation is in need of completion as the component is built out.</p> | ||
<ul> | ||
<li>**@todo:** Complete component.</li> | ||
<li>**@todo:** Update documentation.</li> | ||
</ul> | ||
</outline-alert> | ||
<br /> | ||
|
||
## Introduction to the **`outline-core-alert`** component | ||
|
||
|
||
## Usage | ||
|
||
## CSS Variables | ||
|
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* @file Exports for the OutlineCoreAlert component. | ||
* | ||
* Any export here is then available via the following import, | ||
* which should be available in the consuming application: | ||
* | ||
* @code | ||
* import { OutlineCoreAlert } from '@phase2/outline-core-alert'; | ||
* import { constantOne, constantTwo } from '@phase2/outline-core-alert'; | ||
* import type { ThingType } from '@phase2/outline-core-alert'; | ||
* @endcode | ||
* | ||
* Any of the above exports can be used in the consuming application | ||
* based on the contents of this file, and creativity of what functionality | ||
* you wish to expose to the consuming application(s). | ||
*/ | ||
|
||
// Export the primary component. | ||
export { OutlineCoreAlert } from './src/outline-core-alert'; | ||
|
||
// Export any additional sub-components, variables and methods as required. |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "@phase2/outline-core-alert", | ||
"private": true, | ||
"version": "0.0.0", | ||
"description": "The Outline Components for the image component", | ||
"keywords": [ | ||
"outline", | ||
"web-components", | ||
"design system", | ||
"image", | ||
"picture" | ||
], | ||
"main": "index.ts", | ||
"types": "index.ts", | ||
"typings": "index.d.ts", | ||
"files": [ | ||
"/dist/", | ||
"/src/", | ||
"!/dist/tsconfig.build.tsbuildinfo" | ||
], | ||
"author": "Phase2 Technology", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/phase2/outline.git", | ||
"directory": "packages/outline-core-alert" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"scripts": { | ||
"build": "node ../../scripts/build.js", | ||
"package": "yarn publish" | ||
}, | ||
"dependencies": { | ||
"@phase2/outline-core": "^0.2.3", | ||
"lit": "^2.3.1" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"exports": { | ||
".": "./index.ts" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/** | ||
* @file Shared configuration for the `outline-core-alert` component. | ||
*/ |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
Styles for `outline-core-alert.css` | ||
|
||
=== REMOVE BELOW THIS LINE (AFTER READING) === | ||
@todo: Extrapolate these comments/documentation to a more official location | ||
Add any component level, structural CSS for the `COMPONENT-NAME` component. | ||
This would be CSS that is targeted to this component only, | ||
and is dependent on the HTML structure of the component that | ||
is encapsulated in the component's Shadow DOM. | ||
--- | ||
Shoud the need arise to style the component based on slotted content | ||
with an unknown markup structure provided by the consuming application | ||
in the Light DOM via slots provided by the component, | ||
consider the following best practices: | ||
|
||
The root element of a `slot` should either be | ||
- Semantically expected tag at the top level | ||
- `outline-core-link` for instance requires (if slotted) an `a` tag as the root element of the slot. | ||
- `outline-core-button` also requires (if slotted) a `button` tag as the root element of the slot. | ||
- A custom element that provides its own styling and encapsulation | ||
- `outline-core-card` would be a component example that | ||
- Provides its own styling and encapsulation to handle functionality and responsive behaviors | ||
- And also either: | ||
- Instructs the consuming application to provide a custom element as the first level child of a `slot`, thus providing it's own styling. | ||
- Allows for slotted content to be styled by the consuming application | ||
|
||
Upcoming work will allow for the "styling by the consuming application" option to be more easily | ||
implemented in a standardized and simplified way. | ||
|
||
When updates to build tooling is in place, CSS would be added to an `COMPONENT-NAME.global.css` file, | ||
and then processed either to be loaded on the fly, or manually via a standard `*.global.css` file. | ||
=== REMOVE ABOVE THIS LINE (AFTER YOU READ IT) === | ||
*/ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following Is what updates the system to look for
.mdx
file inside any Outline component in the packages directory.Due to the nature of some of the components, we should adopt a policy to utilize a
docs
folder PER component to make the glob for looking for the MDX files much easier.