Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

feat(codesandbox): add examples #908

Merged
merged 29 commits into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9e62c1c
feat(codesandbox): add examples
ariellalgilmore Dec 11, 2021
880872d
Merge branch 'master' into feat/codesandbox
ariellalgilmore Dec 13, 2021
16274e9
Update src/components/tag/tag-story-angular.ts
ariellalgilmore Dec 13, 2021
8f3c338
Update src/components/tag/tag-story-angular.ts
ariellalgilmore Dec 13, 2021
03b03e4
Update src/components/tag/tag-story-angular.ts
ariellalgilmore Dec 13, 2021
d25631f
Update src/components/tag/tag-story-angular.ts
ariellalgilmore Dec 13, 2021
8f2b8cd
Update src/components/tag/tag-story.ts
ariellalgilmore Dec 13, 2021
2797441
Update src/components/tag/tag-story.ts
ariellalgilmore Dec 13, 2021
7320e9a
Update src/components/tag/tag-story.ts
ariellalgilmore Dec 13, 2021
d43e426
Update src/components/tag/tag-story.ts
ariellalgilmore Dec 13, 2021
c5a8140
Update src/components/tag/tag-story.ts
ariellalgilmore Dec 13, 2021
d7b2ae2
Update src/components/tag/tag-story-angular.ts
ariellalgilmore Dec 13, 2021
820e41f
Update src/components/tag/tag-story-angular.ts
ariellalgilmore Dec 13, 2021
8a350db
Update src/components/tag/tag-story-react.tsx
ariellalgilmore Dec 13, 2021
d5b8118
Update src/components/tag/tag-story.ts
ariellalgilmore Dec 13, 2021
ead76bb
Update src/components/tag/tag-story.ts
ariellalgilmore Dec 13, 2021
e537426
Update src/components/tag/tag-story-vue.ts
ariellalgilmore Dec 13, 2021
feb82c4
Update src/components/tag/tag-story-vue.ts
ariellalgilmore Dec 13, 2021
7b091ec
Update src/components/tag/tag-story-vue.ts
ariellalgilmore Dec 13, 2021
ddc13bc
Update src/components/tag/tag-story.ts
ariellalgilmore Dec 13, 2021
491cd42
Update src/components/tag/tag-story.ts
ariellalgilmore Dec 13, 2021
6e001c0
Update src/components/tag/tag-story.ts
ariellalgilmore Dec 13, 2021
ccc3fe6
Update src/components/tag/tag-story.ts
ariellalgilmore Dec 13, 2021
d29c72f
Update src/components/tag/tag-story.ts
ariellalgilmore Dec 13, 2021
bf050c5
feat(codesandbox): test format error
ariellalgilmore Dec 13, 2021
cfe59f0
feat(codesandbox): test format error
ariellalgilmore Dec 13, 2021
322bac3
feat(codesandbox): format
ariellalgilmore Dec 13, 2021
8e5c7a1
Merge branch 'master' into feat/codesandbox
ariellalgilmore Dec 13, 2021
e290fce
Merge branch 'master' into feat/codesandbox
kodiakhq[bot] Dec 15, 2021
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
22 changes: 22 additions & 0 deletions examples/codesandbox/basic/components/accordion/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"targets": [
"last 1 version",
"Firefox ESR",
"not opera > 0",
"not op_mini > 0",
"not op_mob > 0",
"not android > 0",
"not edge > 0",
"not ie > 0",
"not ie_mob > 0"
]
}
]
],
"plugins": [["@babel/plugin-transform-runtime", { "version": "7.3.0" }]]
}
22 changes: 22 additions & 0 deletions examples/codesandbox/basic/components/accordion/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.cache
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
46 changes: 46 additions & 0 deletions examples/codesandbox/basic/components/accordion/cdn.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!--
@license

Copyright IBM Corp. 2020

This source code is licensed under the Apache-2.0 license found in the
LICENSE file in the root directory of this source tree.
-->

<html>
<head>
<title>@carbon/ibmdotcom-web-components example</title>
<meta charset="UTF-8"/>
<link rel="stylesheet"
href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css"/>
<style>
/* Suppress custom element until styles are loaded */
bx-accordion:not(:defined) {
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/accordion.min.js"></script>
</head>
<body>
<bx-accordion>
<bx-accordion-item title-text="Lorem Ipsum">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
</bx-accordion-item>
<bx-accordion-item title-text="Lorem Ipsum">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
</bx-accordion-item>
<bx-accordion-item title-text="Lorem Ipsum">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
</bx-accordion-item>
</bx-accordion>
</body>
</html>
46 changes: 46 additions & 0 deletions examples/codesandbox/basic/components/accordion/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!--
@license

Copyright IBM Corp. 2020

This source code is licensed under the Apache-2.0 license found in the
LICENSE file in the root directory of this source tree.
-->

<html>
<head>
<title>carbon-web-components example</title>
<meta charset="UTF-8" />
<link rel="stylesheet"
href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css"/>
<style>
/* Suppress custom element until styles are loaded */
bx-accordion:not(:defined) {
display: none;
}
</style>
<script type="module" src="src/index.js"></script>
</head>
<body>
<bx-accordion>
<bx-accordion-item title-text="Lorem Ipsum">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
</bx-accordion-item>
<bx-accordion-item title-text="Lorem Ipsum">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
</bx-accordion-item>
<bx-accordion-item title-text="Lorem Ipsum">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
</bx-accordion-item>
</bx-accordion>
</body>
</html>
21 changes: 21 additions & 0 deletions examples/codesandbox/basic/components/accordion/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "carbon-web-components-accordion-example",
"version": "0.1.0",
"private": true,
"description": "Sample project for getting started with the Web Components from Carbon.",
"license": "Apache-2",
"main": "index.html",
"scripts": {
"build": "parcel build *.html --no-minify --public-url ./",
"clean": "rimraf node_modules dist .cache",
"start": "parcel index.html --port=9000 --no-hmr"
},
"dependencies": {
"carbon-web-components": "latest"
},
"devDependencies": {
"@babel/core": "^7.0.0-0",
"parcel-bundler": "1.12.3",
"rimraf": "^3.0.2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"template": "node"
}
10 changes: 10 additions & 0 deletions examples/codesandbox/basic/components/accordion/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/accordion/index.js';
22 changes: 22 additions & 0 deletions examples/codesandbox/basic/components/breadcrumb/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"targets": [
"last 1 version",
"Firefox ESR",
"not opera > 0",
"not op_mini > 0",
"not op_mob > 0",
"not android > 0",
"not edge > 0",
"not ie > 0",
"not ie_mob > 0"
]
}
]
],
"plugins": [["@babel/plugin-transform-runtime", { "version": "7.3.0" }]]
}
22 changes: 22 additions & 0 deletions examples/codesandbox/basic/components/breadcrumb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.cache
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
37 changes: 37 additions & 0 deletions examples/codesandbox/basic/components/breadcrumb/cdn.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!--
@license

Copyright IBM Corp. 2020

This source code is licensed under the Apache-2.0 license found in the
LICENSE file in the root directory of this source tree.
-->

<html>
<head>
<title>@carbon/ibmdotcom-web-components example</title>
<meta charset="UTF-8"/>
<link rel="stylesheet"
href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css"/>
<style>
/* Suppress custom element until styles are loaded */
bx-breadcrumb:not(:defined) {
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/latest/breadcrumb.min.js"></script>
</head>
<body>
<bx-breadcrumb>
<bx-breadcrumb-item>
<bx-breadcrumb-link href="/#">Breadcrumb 1</bx-breadcrumb-link>
</bx-breadcrumb-item>
<bx-breadcrumb-item>
<bx-breadcrumb-link href="/#">Breadcrumb 2</bx-breadcrumb-link>
</bx-breadcrumb-item>
<bx-breadcrumb-item>
<bx-breadcrumb-link href="/#" aria-current="page">Breadcrumb 3</bx-breadcrumb-link>
</bx-breadcrumb-item>
</bx-breadcrumb>
</body>
</html>
37 changes: 37 additions & 0 deletions examples/codesandbox/basic/components/breadcrumb/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!--
@license

Copyright IBM Corp. 2020

This source code is licensed under the Apache-2.0 license found in the
LICENSE file in the root directory of this source tree.
-->

<html>
<head>
<title>carbon-web-components example</title>
<meta charset="UTF-8" />
<link rel="stylesheet"
href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css"/>
<style>
/* Suppress custom element until styles are loaded */
bx-breadcrumb:not(:defined) {
display: none;
}
</style>
<script type="module" src="src/index.js"></script>
</head>
<body>
<bx-breadcrumb>
<bx-breadcrumb-item>
<bx-breadcrumb-link href="/#">Breadcrumb 1</bx-breadcrumb-link>
</bx-breadcrumb-item>
<bx-breadcrumb-item>
<bx-breadcrumb-link href="/#">Breadcrumb 2</bx-breadcrumb-link>
</bx-breadcrumb-item>
<bx-breadcrumb-item>
<bx-breadcrumb-link href="/#" aria-current="page">Breadcrumb 3</bx-breadcrumb-link>
</bx-breadcrumb-item>
</bx-breadcrumb>
</body>
</html>
21 changes: 21 additions & 0 deletions examples/codesandbox/basic/components/breadcrumb/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "carbon-web-components-breadcrumb-example",
"version": "0.1.0",
"private": true,
"description": "Sample project for getting started with the Web Components from Carbon.",
"license": "Apache-2",
"main": "index.html",
"scripts": {
"build": "parcel build *.html --no-minify --public-url ./",
"clean": "rimraf node_modules dist .cache",
"start": "parcel index.html --port=9000 --no-hmr"
},
"dependencies": {
"carbon-web-components": "latest"
},
"devDependencies": {
"@babel/core": "^7.0.0-0",
"parcel-bundler": "1.12.3",
"rimraf": "^3.0.2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"template": "node"
}
10 changes: 10 additions & 0 deletions examples/codesandbox/basic/components/breadcrumb/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import 'carbon-web-components/es/components/breadcrumb/index.js';
22 changes: 22 additions & 0 deletions examples/codesandbox/basic/components/button/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"targets": [
"last 1 version",
"Firefox ESR",
"not opera > 0",
"not op_mini > 0",
"not op_mob > 0",
"not android > 0",
"not edge > 0",
"not ie > 0",
"not ie_mob > 0"
]
}
]
],
"plugins": [["@babel/plugin-transform-runtime", { "version": "7.3.0" }]]
}
22 changes: 22 additions & 0 deletions examples/codesandbox/basic/components/button/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.cache
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
Loading