Skip to content

Commit

Permalink
Merge branch 'feat/cwc-storybook-7-vite' into chore/radio-button-sb-v7
Browse files Browse the repository at this point in the history
  • Loading branch information
kennylam authored Jan 18, 2024
2 parents 71a3bb6 + 7a3a48f commit 80b2dcc
Showing 53 changed files with 4,082 additions and 3,483 deletions.
21 changes: 21 additions & 0 deletions packages/carbon-web-components/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -70,6 +70,8 @@ const stories = glob.sync(
'../src/**/toast-notification.stories.ts',
'../src/**/overflow-menu.mdx',
'../src/**/overflow-menu.stories.ts',
'../src/**/pagination.mdx',
'../src/**/pagination.stories.ts',
'../src/**/progress-bar.mdx',
'../src/**/progress-bar.stories.ts',
'../src/**/progress-indicator.mdx',
@@ -88,10 +90,29 @@ const stories = glob.sync(
'../src/**/skip-to-content.stories.ts',
'../src/**/slider.mdx',
'../src/**/slider.stories.ts',
'../src/**/structured-list.stories.ts',
'../src/**/structured-list.mdx',
'../src/**/tabs.stories.ts',
'../src/**/tabs.mdx',
'../src/**/slug.mdx',
'../src/**/slug.stories.ts',
'../src/**/slug-example.stories.ts',
'../src/**/slug-data-table.stories.ts',
'../src/**/slug-form.stories.ts',
'../src/**/tag.mdx',
'../src/**/tag.stories.ts',
'../src/**/textarea.mdx',
'../src/**/textarea.stories.ts',
'../src/**/text-input.mdx',
'../src/**/text-input.stories.ts',
'../src/**/tooltip.mdx',
'../src/**/tooltip.stories.ts',
'../src/**/ui-shell.mdx',
'../src/**/ui-shell.stories.ts',
'../src/**/toggle.mdx',
'../src/**/toggle.stories.ts',
'../src/**/toggletip.mdx',
'../src/**/toggletip.stories.ts',
],
{
ignore: ['../src/**/docs/*.mdx'],
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" }]]
}
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*
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"includePaths": [
"node_modules",
"../../node_modules"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!--
@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"/>
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/grid.css" />
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/themes.css" />
<style>
/* Suppress custom element until styles are loaded */
cds-toggletip:not(:defined) {
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/toggle-tip.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/link.min.js"></script>
<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/tag/v2/latest/button.min.js"></script>
</head>
<body class="cds-theme-zone-white">
<div data-floating-menu-container style="position: relative; padding: 3rem; display: flex; flex-direction: column; align-items: center;">
<cds-toggletip>
Toggletip label

<p slot="body-text">
Lorem ipsum dolor sit amet, di os consectetur adipiscing elit, sed do eiusmod tempor incididunt ut fsil labore et dolore magna aliqua.
</p>
<cds-link slot="actions">Test</cds-link>
<cds-button slot="actions">Button</cds-button>
</cds-toggletip>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!--
@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"/>

<link rel="stylesheet" href="src/styles.scss" />
<style>
/* Suppress custom element until styles are loaded */
cds-toggletip:not(:defined) {
display: none;
}
</style>
<script type="module" src="src/index.js"></script>
</head>
<body>
<div data-floating-menu-container style="position: relative; padding: 3rem; display: flex; flex-direction: column; align-items: center;">
<cds-toggletip>
Toggletip label

<p slot="body-text">
Lorem ipsum dolor sit amet, di os consectetur adipiscing elit, sed do eiusmod tempor incididunt ut fsil labore et dolore magna aliqua.
</p>
<cds-link slot="actions">Test</cds-link>
<cds-button slot="actions">Button</cds-button>
</cds-toggletip>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "carbon-web-components-toggletip-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/styles": "^1.34.0",
"@carbon/web-components": "latest",
"sass": "^1.64.1"
},
"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"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2022
*
* 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/toggle-tip/index.js';
import '@carbon/web-components/es/components/link/index.js';
import '@carbon/web-components/es/components/button/index.js';
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@use '@carbon/styles/scss/reset';
@use '@carbon/styles/scss/theme';
@use '@carbon/styles/scss/themes';

:root {
@include theme.theme(themes.$white);
background-color: var(--cds-background);
color: var(--cds-text-primary);
}
Original file line number Diff line number Diff line change
@@ -65,17 +65,18 @@ const defaultArgs = {
titleText: 'This is an example title',
value: '',
warn: false,
warnText: 'please notice the warning',
}
warnText: 'please notice the warning',
};

const controls = {
disabled: {
control: 'boolean',
description: `Specify if the dropdown should be disabled, or not.`,
},
direction: {
control: 'select', options: directionOptions,
description: `Dropdown direction`
control: 'select',
options: directionOptions,
description: `Dropdown direction`,
},
hideLabel: {
control: 'boolean',
@@ -102,8 +103,9 @@ const controls = {
description: `Specify if the dropdown should be read only, or not.`,
},
size: {
control: 'select', options: sizes,
description: `Dropdown size.`
control: 'select',
options: sizes,
description: `Dropdown size.`,
},
titleText: {
control: 'text',
@@ -136,7 +138,7 @@ export const Default = {
`
)}
</cds-combo-box>
`
`,
};

export const WithLayer = {
@@ -159,7 +161,7 @@ export const WithLayer = {
</cds-combo-box>
</div>
</sb-template-layers>
`
`,
};

export const Playground = {
@@ -204,8 +206,8 @@ export const Playground = {
`
)}
</cds-combo-box>
`
}
`,
};

const meta = {
title: 'Components/Combo box',
Loading

0 comments on commit 80b2dcc

Please sign in to comment.