Skip to content
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
merged 18 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
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 Aug 10, 2023
39e0e4a
feat(outline-core-image): Fix for stray file update.
himerus Aug 10, 2023
3cd4636
feat(outline-core-image): Formatting tweaks.
himerus Aug 10, 2023
6db26b1
feat(outline-core-image): Setting up Storybook to look for .mdx files…
himerus Aug 10, 2023
dfb2a30
feat(outline-core-card): Stub the `outline-core-card` component.
himerus Aug 11, 2023
b64b195
feat(outline-core-alert): Stub the `outline-core-alert` component.
himerus Aug 11, 2023
87e1698
feat(outline-core-icon): Stub the `outline-core-icon` component.
himerus Aug 11, 2023
b19baf4
fix(versioning): Updating stubbed components to include a default ver…
himerus Aug 11, 2023
a9f3c0a
feat(outline-core-container): Stub the `outline-core-container` compo…
himerus Aug 11, 2023
0cf3972
feat(outline-core-list): Stub the `outline-core-list` component.
himerus Aug 11, 2023
dd4a6c2
feat(outline-core-form): Stub the `outline-core-form` component.
himerus Aug 11, 2023
fa39a82
feat(outline-core-text): Stub the `outline-core-text` component.
himerus Aug 11, 2023
22f45ea
feat(outline-core-accordion): Stub the `outline-core-accordion` compo…
himerus Aug 11, 2023
fc14642
feat(outline-core-youtube): Stub the `outline-core-youtube` component.
himerus Aug 11, 2023
6abb668
feat(outline-core-breadcrumb): Stub the `outline-core-breadcrumb` com…
himerus Aug 11, 2023
aa85cf6
feat(outline-core-modal): Stub the `outline-core-modal` component.
himerus Aug 11, 2023
31dadde
feat(release): Updating changeset config, and package defaults.
himerus Aug 11, 2023
ec02013
Merge branch 'next' into feature/component-stubs
himerus Aug 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,18 @@
"access": "restricted",
"baseBranch": "next",
"updateInternalDependencies": "patch",
"ignore": []
"ignore": [
"@phase2/outline-core-accordion",
"@phase2/outline-core-alert",
"@phase2/outline-core-breadcrumb",
"@phase2/outline-core-card",
"@phase2/outline-core-container",
"@phase2/outline-core-form",
"@phase2/outline-core-icon",
"@phase2/outline-core-image",
"@phase2/outline-core-list",
"@phase2/outline-core-modal",
"@phase2/outline-core-text",
"@phase2/outline-core-youtube"
]
}
4 changes: 3 additions & 1 deletion .storybook/main.js
Copy link
Contributor Author

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.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module.exports = {
'../packages/outline-docs/src/guides/tooling/**/*.mdx',
// Documentation stories.
'../packages/outline-docs/src/guides/**/*.@(js|ts|mdx)',
// Component stories.
// Modern component stories.
'../packages/**/docs/*.mdx',
// Old component stories.
'../packages/outline-storybook/stories/**/*.stories.@(js|ts|mdx)',
],
typescript: {
Expand Down
40 changes: 40 additions & 0 deletions packages/outline-core-accordion/docs/outline-core-accordion.mdx
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

21 changes: 21 additions & 0 deletions packages/outline-core-accordion/index.ts
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.
42 changes: 42 additions & 0 deletions packages/outline-core-accordion/package.json
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"
}
}
3 changes: 3 additions & 0 deletions packages/outline-core-accordion/src/config.ts
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 packages/outline-core-accordion/src/outline-core-accordion.css
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 packages/outline-core-accordion/src/outline-core-accordion.ts
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;
}
}
9 changes: 9 additions & 0 deletions packages/outline-core-accordion/tsconfig.build.json
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" }]
}
40 changes: 40 additions & 0 deletions packages/outline-core-alert/docs/outline-core-alert.mdx
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

21 changes: 21 additions & 0 deletions packages/outline-core-alert/index.ts
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.
42 changes: 42 additions & 0 deletions packages/outline-core-alert/package.json
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"
}
}
3 changes: 3 additions & 0 deletions packages/outline-core-alert/src/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/**
* @file Shared configuration for the `outline-core-alert` component.
*/
33 changes: 33 additions & 0 deletions packages/outline-core-alert/src/outline-core-alert.css
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) ===
*/
Loading