@carbon/ibm-products-web-components 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.ts +13 -5
- package/CHANGELOG.md +21 -0
- package/es/components/side-panel/defs.js.map +1 -1
- package/es/components/side-panel/side-panel.d.ts +4 -4
- package/es/components/side-panel/side-panel.js +9 -18
- package/es/components/side-panel/side-panel.js.map +1 -1
- package/es/components/side-panel/side-panel.scss.js +1 -1
- package/es/components/side-panel/side-panel.test.js.map +1 -1
- package/es/components/tearsheet/defs.js.map +1 -1
- package/es/components/tearsheet/tearsheet.js +5 -14
- package/es/components/tearsheet/tearsheet.js.map +1 -1
- package/es/components/tearsheet/tearsheet.scss.js +1 -1
- package/es/components/tearsheet/tearsheet.test.js.map +1 -1
- package/es/globals/internal/storybook-cdn.js +80 -0
- package/es/globals/internal/storybook-cdn.js.map +1 -0
- package/es/globals/settings.js.map +1 -1
- package/es/packages/ibm-products-web-components/package.json.js +121 -0
- package/es/packages/ibm-products-web-components/package.json.js.map +1 -0
- package/lib/components/side-panel/defs.js.map +1 -1
- package/lib/components/side-panel/side-panel.d.ts +4 -4
- package/lib/components/tearsheet/defs.js.map +1 -1
- package/lib/globals/settings.js.map +1 -1
- package/package.json +11 -10
- package/scss/components/tearsheet/tearsheet.scss +6 -0
- package/src/components/side-panel/side-panel.mdx +1 -10
- package/src/components/side-panel/side-panel.stories.ts +1 -1
- package/src/components/side-panel/side-panel.ts +5 -5
- package/src/components/tearsheet/tearsheet.mdx +1 -9
- package/src/components/tearsheet/tearsheet.scss +6 -0
- package/src/components/tearsheet/tearsheet.stories.ts +52 -41
- package/src/components/tearsheet/tearsheet.ts +1 -1
- package/src/globals/internal/storybook-cdn.ts +69 -0
- package/tasks/build.js +2 -0
@@ -0,0 +1,80 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import packageJson from '../../packages/ibm-products-web-components/package.json.js';
|
9
|
+
|
10
|
+
/**
|
11
|
+
* @license
|
12
|
+
*
|
13
|
+
* Copyright IBM Corp. 2021, 2024
|
14
|
+
*
|
15
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
17
|
+
*/
|
18
|
+
|
19
|
+
|
20
|
+
/* eslint-disable max-len */
|
21
|
+
|
22
|
+
/**
|
23
|
+
*
|
24
|
+
*/
|
25
|
+
/**
|
26
|
+
* Renders the component(s) script tag content and returns back the string
|
27
|
+
*
|
28
|
+
* @param {Array} components array of component names
|
29
|
+
* @param {string} tag tag folder
|
30
|
+
*/
|
31
|
+
function _renderScript(components, tag) {
|
32
|
+
let scripts = '';
|
33
|
+
components.forEach((component) => {
|
34
|
+
scripts += `<script type="module" src="https://1.www.s81c.com/common/carbon/web-components/${tag}/${component}.min.js"></script>\n`;
|
35
|
+
});
|
36
|
+
return scripts;
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* This is the markdown block for JS via CDN
|
41
|
+
*
|
42
|
+
* @param {Array} components array of components to render
|
43
|
+
* @param components.components components to render
|
44
|
+
*/
|
45
|
+
const cdnJs = ({ components }) => {
|
46
|
+
return `
|
47
|
+
### JS (via CDN)
|
48
|
+
|
49
|
+
> NOTE: Only one version of artifacts should be used. Mixing versions will cause rendering issues.
|
50
|
+
|
51
|
+
\`\`\`html
|
52
|
+
// SPECIFIC VERSION (available starting v2.0.0)
|
53
|
+
${_renderScript(components, `version/v${packageJson.version}`)}
|
54
|
+
\`\`\`
|
55
|
+
|
56
|
+
#### Right-to-left (RTL) versions
|
57
|
+
|
58
|
+
\`\`\`html
|
59
|
+
// SPECIFIC VERSION (available starting v2.0.0)
|
60
|
+
${_renderScript(components, `version/v${packageJson.version}`)}
|
61
|
+
\`\`\`
|
62
|
+
`;
|
63
|
+
};
|
64
|
+
|
65
|
+
/**
|
66
|
+
* This is the markdown block for CSS via CDN
|
67
|
+
*/
|
68
|
+
const cdnCss = () => {
|
69
|
+
return `
|
70
|
+
### Carbon CDN style helpers (optional)
|
71
|
+
|
72
|
+
There are optional CDN artifacts available that can assist with global Carbon
|
73
|
+
styles in lieu of including into your specific application bundle.
|
74
|
+
|
75
|
+
[Click here to learn more](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/main/packages/web-components/docs/carbon-cdn-style-helpers.md)\n\n
|
76
|
+
`;
|
77
|
+
};
|
78
|
+
|
79
|
+
export { cdnCss, cdnJs };
|
80
|
+
//# sourceMappingURL=storybook-cdn.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"storybook-cdn.js","sources":["../../../src/globals/internal/storybook-cdn.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2021, 2024\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport packageJson from '../../../package.json';\n\n/* eslint-disable max-len */\n\n/**\n *\n */\n/**\n * Renders the component(s) script tag content and returns back the string\n *\n * @param {Array} components array of component names\n * @param {string} tag tag folder\n */\nfunction _renderScript(components, tag) {\n let scripts = '';\n components.forEach((component) => {\n scripts += `<script type=\"module\" src=\"https://1.www.s81c.com/common/carbon/web-components/${tag}/${component}.min.js\"></script>\\n`;\n });\n return scripts;\n}\n\n/**\n * This is the markdown block for JS via CDN\n *\n * @param {Array} components array of components to render\n * @param components.components components to render\n */\nexport const cdnJs = ({ components }) => {\n return `\n### JS (via CDN)\n\n > NOTE: Only one version of artifacts should be used. Mixing versions will cause rendering issues.\n\n \\`\\`\\`html\n // SPECIFIC VERSION (available starting v2.0.0)\n ${_renderScript(components, `version/v${packageJson.version}`)}\n \\`\\`\\`\n\n #### Right-to-left (RTL) versions\n\n \\`\\`\\`html\n // SPECIFIC VERSION (available starting v2.0.0)\n ${_renderScript(components, `version/v${packageJson.version}`)}\n \\`\\`\\`\n `;\n};\n\n/**\n * This is the markdown block for CSS via CDN\n */\nexport const cdnCss = () => {\n return `\n### Carbon CDN style helpers (optional)\n\nThere are optional CDN artifacts available that can assist with global Carbon\nstyles in lieu of including into your specific application bundle.\n\n[Click here to learn more](https://github.com/carbon-design-system/carbon-for-ibm-dotcom/blob/main/packages/web-components/docs/carbon-cdn-style-helpers.md)\\n\\n\n `;\n};\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAIA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa,CAAC,UAAU,EAAE,GAAG,EAAE;AACxC,EAAE,IAAI,OAAO,GAAG,EAAE;AAClB,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,KAAK;AACpC,IAAI,OAAO,IAAI,CAAC,+EAA+E,EAAE,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,oBAAoB,CAAC;AACvI,GAAG,CAAC;AACJ,EAAE,OAAO,OAAO;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,KAAK,GAAG,CAAC,EAAE,UAAU,EAAE,KAAK;AACzC,EAAE,OAAO;AACT;;AAEA;;AAEA;AACA;AACA,CAAC,EAAE,aAAa,CAAC,UAAU,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/D;;AAEA;;AAEA;AACA;AACA,CAAC,EAAE,aAAa,CAAC,UAAU,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/D;AACA,GAAG,CAAC;AACJ;;AAEA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM;AAC5B,EAAE,OAAO;AACT;;AAEA;AACA;;AAEA;AACA,EAAE,CAAC;AACH;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.js","sources":["../../src/globals/settings.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;AAMG;AAEG,MAAA,MAAM,GAAG
|
1
|
+
{"version":3,"file":"settings.js","sources":["../../src/globals/settings.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;AAMG;AAEG,MAAA,MAAM,GAAG;AACT,MAAA,YAAY,GAAG;AAErB;;;AAGG;AACH,MAAM,gBAAgB,GAAG;IACrB,MAAM,CAAA;IACN,MAAM,CAAA;IACN,MAAM,CAAA;;;;;"}
|
@@ -0,0 +1,121 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
var name = "@carbon/ibm-products-web-components";
|
9
|
+
var description = "Carbon for IBM Products Web Components";
|
10
|
+
var version = "0.4.0-rc.0";
|
11
|
+
var license = "Apache-2.0";
|
12
|
+
var main = "es/index.js";
|
13
|
+
var module = "es/index.js";
|
14
|
+
var type = "module";
|
15
|
+
var bugs = "https://github.com/carbon-design-system/ibm-products/issues";
|
16
|
+
var repository = {
|
17
|
+
type: "git",
|
18
|
+
url: "https://github.com/carbon-design-system/ibm-products.git",
|
19
|
+
directory: "packages/ibm-products-web-components"
|
20
|
+
};
|
21
|
+
var publishConfig = {
|
22
|
+
access: "public",
|
23
|
+
provenance: true
|
24
|
+
};
|
25
|
+
var exports = {
|
26
|
+
"./es/components/*": {
|
27
|
+
node: "./lib/components/*",
|
28
|
+
"default": "./es/components/*"
|
29
|
+
},
|
30
|
+
"./es/globals/*": {
|
31
|
+
node: "./lib/globals/*",
|
32
|
+
"default": "./es/globals/*"
|
33
|
+
},
|
34
|
+
"./es/*": "./es/*",
|
35
|
+
"./lib/*": "./lib/*",
|
36
|
+
"./custom-elements.json": "./custom-elements.json",
|
37
|
+
"./package.json": "./package.json"
|
38
|
+
};
|
39
|
+
var keywords = [
|
40
|
+
"carbon",
|
41
|
+
"carbon design system",
|
42
|
+
"carbon community",
|
43
|
+
"carbon for ibm products",
|
44
|
+
"carbon for ibm products web components",
|
45
|
+
"web components"
|
46
|
+
];
|
47
|
+
var scripts = {
|
48
|
+
build: "node tasks/build.js && yarn wca",
|
49
|
+
"build:storybook": "storybook build",
|
50
|
+
clean: "rimraf es lib scss dist storybook-static",
|
51
|
+
preview: "vite preview",
|
52
|
+
storybook: "storybook dev -p 3000",
|
53
|
+
test: "vitest run",
|
54
|
+
"test:ui": "vitest --ui",
|
55
|
+
wca: "web-component-analyzer analyze src --outFile custom-elements.json"
|
56
|
+
};
|
57
|
+
var dependencies = {
|
58
|
+
"@carbon/ibm-products-styles": "^2.51.0-rc.0",
|
59
|
+
"@carbon/styles": "1.69.0",
|
60
|
+
"@carbon/web-components": "2.17.0",
|
61
|
+
lit: "^3.1.0"
|
62
|
+
};
|
63
|
+
var devDependencies = {
|
64
|
+
"@carbon/icons": "^11.52.0",
|
65
|
+
"@carbon/motion": "^11.24.0",
|
66
|
+
"@mordech/vite-lit-loader": "^0.35.0",
|
67
|
+
"@rollup/plugin-alias": "^5.1.1",
|
68
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
69
|
+
"@rollup/plugin-json": "^6.1.0",
|
70
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
71
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
72
|
+
"@storybook/addon-essentials": "^8.3.6",
|
73
|
+
"@storybook/addon-links": "^8.3.6",
|
74
|
+
"@storybook/addon-storysource": "^8.3.6",
|
75
|
+
"@storybook/addon-toolbars": "^8.3.6",
|
76
|
+
"@storybook/blocks": "^8.3.6",
|
77
|
+
"@storybook/theming": "^8.3.6",
|
78
|
+
"@storybook/web-components": "^8.3.6",
|
79
|
+
"@storybook/web-components-vite": "^8.3.6",
|
80
|
+
"@types/jest": "^29.5.13",
|
81
|
+
"@vitest/browser": "latest",
|
82
|
+
"@vitest/ui": "latest",
|
83
|
+
autoprefixer: "^10.4.20",
|
84
|
+
cssnano: "^7.0.6",
|
85
|
+
eslint: "^9.11.1",
|
86
|
+
"eslint-config-carbon": "3.17.1",
|
87
|
+
globby: "^14.0.2",
|
88
|
+
"happy-dom": "^15.11.6",
|
89
|
+
postcss: "^8.4.47",
|
90
|
+
"remark-gfm": "^4.0.0",
|
91
|
+
rimraf: "^5.0.5",
|
92
|
+
rollup: "^4.27.3",
|
93
|
+
"rollup-plugin-copy": "^3.5.0",
|
94
|
+
sass: "^1.80.6",
|
95
|
+
storybook: "^8.2.8",
|
96
|
+
"storybook-addon-accessibility-checker": "^3.1.61-rc.3",
|
97
|
+
typescript: "^5.5.3",
|
98
|
+
vite: "^5.4.1",
|
99
|
+
vitest: "^2.1.2",
|
100
|
+
"web-component-analyzer": "2.0.0"
|
101
|
+
};
|
102
|
+
var packageJson = {
|
103
|
+
name: name,
|
104
|
+
description: description,
|
105
|
+
version: version,
|
106
|
+
license: license,
|
107
|
+
main: main,
|
108
|
+
module: module,
|
109
|
+
type: type,
|
110
|
+
bugs: bugs,
|
111
|
+
repository: repository,
|
112
|
+
publishConfig: publishConfig,
|
113
|
+
exports: exports,
|
114
|
+
keywords: keywords,
|
115
|
+
scripts: scripts,
|
116
|
+
dependencies: dependencies,
|
117
|
+
devDependencies: devDependencies
|
118
|
+
};
|
119
|
+
|
120
|
+
export { bugs, packageJson as default, dependencies, description, devDependencies, exports, keywords, license, main, module, name, publishConfig, repository, scripts, type, version };
|
121
|
+
//# sourceMappingURL=package.json.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"package.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"defs.js","sources":["../../../src/components/side-panel/defs.ts"],"sourcesContent":[null],"names":["SIDE_PANEL_SIZE","SIDE_PANEL_PLACEMENT"],"mappings":";;;;;;;;;AAAA;;;;;;;AAOG;AAEH;;AAEG;AACSA
|
1
|
+
{"version":3,"file":"defs.js","sources":["../../../src/components/side-panel/defs.ts"],"sourcesContent":[null],"names":["SIDE_PANEL_SIZE","SIDE_PANEL_PLACEMENT"],"mappings":";;;;;;;;;AAAA;;;;;;;AAOG;AAEH;;AAEG;AACSA;AAAZ,CAAA,UAAY,eAAe,EAAA;AACzB;;AAEG;AACH,IAAA,eAAA,CAAA,aAAA,CAAA,GAAA,IAAkB;AAElB;;AAEG;AACH,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,IAAY;AAEZ;;AAEG;AACH,IAAA,eAAA,CAAA,QAAA,CAAA,GAAA,IAAa;AAEb;;AAEG;AACH,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,IAAY;AAEZ;;AAEG;AACH,IAAA,eAAA,CAAA,mBAAA,CAAA,GAAA,KAAyB;AAC3B,CAAC,EAzBWA,uBAAe,KAAfA,uBAAe,GAyB1B,EAAA,CAAA,CAAA;AAEWC;AAAZ,CAAA,UAAY,oBAAoB,EAAA;;AAE9B,IAAA,oBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;;AAGf,IAAA,oBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EANWA,4BAAoB,KAApBA,4BAAoB,GAM/B,EAAA,CAAA,CAAA;;"}
|
@@ -338,13 +338,13 @@ declare const CDSSidePanel_base: {
|
|
338
338
|
/**
|
339
339
|
* SidePanel.
|
340
340
|
*
|
341
|
-
* @element
|
341
|
+
* @element c4p-side-panel
|
342
342
|
* @csspart dialog The dialog.
|
343
|
-
* @fires
|
343
|
+
* @fires c4p-side-panel-beingclosed
|
344
344
|
* The custom event fired before this side-panel is being closed upon a user gesture.
|
345
345
|
* Cancellation of this event stops the user-initiated action of closing this side-panel.
|
346
|
-
* @fires
|
347
|
-
* @fires
|
346
|
+
* @fires c4p-side-panel-closed - The custom event fired after this side-panel is closed upon a user gesture.
|
347
|
+
* @fires c4p-side-panel-navigate-back - custom event fired when clicking navigate back (available when step > 0)
|
348
348
|
*/
|
349
349
|
declare class CDSSidePanel extends CDSSidePanel_base {
|
350
350
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"defs.js","sources":["../../../src/components/tearsheet/defs.ts"],"sourcesContent":[null],"names":["TEARSHEET_INFLUENCER_PLACEMENT","TEARSHEET_INFLUENCER_WIDTH","TEARSHEET_WIDTH"],"mappings":";;;;;;;;;AAAA;;;;;;;AAOG;AAESA
|
1
|
+
{"version":3,"file":"defs.js","sources":["../../../src/components/tearsheet/defs.ts"],"sourcesContent":[null],"names":["TEARSHEET_INFLUENCER_PLACEMENT","TEARSHEET_INFLUENCER_WIDTH","TEARSHEET_WIDTH"],"mappings":";;;;;;;;;AAAA;;;;;;;AAOG;AAESA;AAAZ,CAAA,UAAY,8BAA8B,EAAA;;AAExC,IAAA,8BAAA,CAAA,OAAA,CAAA,GAAA,OAAe;;AAGf,IAAA,8BAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EANWA,sCAA8B,KAA9BA,sCAA8B,GAMzC,EAAA,CAAA,CAAA;AAEWC;AAAZ,CAAA,UAAY,0BAA0B,EAAA;;AAEpC,IAAA,0BAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;;AAEjB,IAAA,0BAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EALWA,kCAA0B,KAA1BA,kCAA0B,GAKrC,EAAA,CAAA,CAAA;AAEWC;AAAZ,CAAA,UAAY,eAAe,EAAA;;AAEzB,IAAA,eAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;;AAEjB,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EALWA,uBAAe,KAAfA,uBAAe,GAK1B,EAAA,CAAA,CAAA;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.js","sources":["../../src/globals/settings.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;AAMG;AAEG,MAAA,MAAM,GAAG
|
1
|
+
{"version":3,"file":"settings.js","sources":["../../src/globals/settings.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;AAMG;AAEG,MAAA,MAAM,GAAG;AACT,MAAA,YAAY,GAAG;AAErB;;;AAGG;AACH,MAAM,gBAAgB,GAAG;IACrB,MAAM,CAAA;IACN,MAAM,CAAA;IACN,MAAM,CAAA;;;;;;;"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carbon/ibm-products-web-components",
|
3
3
|
"description": "Carbon for IBM Products Web Components",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.4.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "es/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -49,9 +49,9 @@
|
|
49
49
|
"wca": "web-component-analyzer analyze src --outFile custom-elements.json"
|
50
50
|
},
|
51
51
|
"dependencies": {
|
52
|
-
"@carbon/ibm-products-styles": "^2.
|
53
|
-
"@carbon/styles": "1.
|
54
|
-
"@carbon/web-components": "2.
|
52
|
+
"@carbon/ibm-products-styles": "^2.51.0",
|
53
|
+
"@carbon/styles": "1.69.0",
|
54
|
+
"@carbon/web-components": "2.17.0",
|
55
55
|
"lit": "^3.1.0"
|
56
56
|
},
|
57
57
|
"devDependencies": {
|
@@ -59,9 +59,10 @@
|
|
59
59
|
"@carbon/motion": "^11.24.0",
|
60
60
|
"@mordech/vite-lit-loader": "^0.35.0",
|
61
61
|
"@rollup/plugin-alias": "^5.1.1",
|
62
|
-
"@rollup/plugin-commonjs": "^28.0.
|
62
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
63
|
+
"@rollup/plugin-json": "^6.1.0",
|
63
64
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
64
|
-
"@rollup/plugin-typescript": "^12.1.
|
65
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
65
66
|
"@storybook/addon-essentials": "^8.3.6",
|
66
67
|
"@storybook/addon-links": "^8.3.6",
|
67
68
|
"@storybook/addon-storysource": "^8.3.6",
|
@@ -78,13 +79,13 @@
|
|
78
79
|
"eslint": "^9.11.1",
|
79
80
|
"eslint-config-carbon": "3.17.1",
|
80
81
|
"globby": "^14.0.2",
|
81
|
-
"happy-dom": "^15.
|
82
|
+
"happy-dom": "^15.11.6",
|
82
83
|
"postcss": "^8.4.47",
|
83
84
|
"remark-gfm": "^4.0.0",
|
84
85
|
"rimraf": "^5.0.5",
|
85
|
-
"rollup": "^
|
86
|
+
"rollup": "^4.27.3",
|
86
87
|
"rollup-plugin-copy": "^3.5.0",
|
87
|
-
"sass": "^1.
|
88
|
+
"sass": "^1.80.6",
|
88
89
|
"storybook": "^8.2.8",
|
89
90
|
"storybook-addon-accessibility-checker": "^3.1.61-rc.3",
|
90
91
|
"typescript": "^5.5.3",
|
@@ -92,5 +93,5 @@
|
|
92
93
|
"vitest": "^2.1.2",
|
93
94
|
"web-component-analyzer": "2.0.0"
|
94
95
|
},
|
95
|
-
"gitHead": "
|
96
|
+
"gitHead": "7cbca46dca691777aee495a9626b1967ad9e3be9"
|
96
97
|
}
|
@@ -102,6 +102,12 @@ $motion-duration: $duration-moderate-02;
|
|
102
102
|
.#{$block-class}__influencer[wide] {
|
103
103
|
@extend .#{$block-class}__influencer--wide;
|
104
104
|
}
|
105
|
+
::slotted(#{$carbon-prefix}-slug) {
|
106
|
+
display: flex;
|
107
|
+
inset-inline-end: 0;
|
108
|
+
margin-block: 6px;
|
109
|
+
margin-inline-end: 1rem;
|
110
|
+
}
|
105
111
|
}
|
106
112
|
|
107
113
|
:host(#{$prefix}-tearsheet[open]) {
|
@@ -6,12 +6,6 @@ import * as SidePanelStories from './side-panel.stories';
|
|
6
6
|
|
7
7
|
# SidePanel
|
8
8
|
|
9
|
-
> 💡 Check our
|
10
|
-
> [CodeSandbox](https://codesandbox.io/s/github/carbon-design-system/carbon/tree/main/packages/web-components/examples/components/side-panel)
|
11
|
-
> example implementation.
|
12
|
-
|
13
|
-
[](https://codesandbox.io/s/github/carbon-design-system/carbon/tree/main/packages/web-components/examples/components/side-panel)
|
14
|
-
|
15
9
|
Side panels keep users in-context of a page while performing tasks like
|
16
10
|
navigating, editing, viewing details, or configuring something new.
|
17
11
|
|
@@ -22,16 +16,13 @@ Here's a quick example to get you started.
|
|
22
16
|
### JS (via import)
|
23
17
|
|
24
18
|
```javascript
|
25
|
-
import '@carbon/web-components/es/components/side-panel/index.js';
|
19
|
+
import '@carbon/ibm-products-web-components/es/components/side-panel/index.js';
|
26
20
|
// The following are used for slotted fields
|
27
21
|
import '@carbon/web-components/es/components/text-input/index.js';
|
28
22
|
import '@carbon/web-components/es/components/textarea/index.js';
|
29
23
|
import '@carbon/web-components/es/components/button/index.js';
|
30
24
|
```
|
31
25
|
|
32
|
-
<Markdown>{`${cdnJs({ components: ['side-panel'] })}`}</Markdown>
|
33
|
-
<Markdown>{`${cdnCss()}`}</Markdown>
|
34
|
-
|
35
26
|
### HTML
|
36
27
|
|
37
28
|
```html
|
@@ -432,7 +432,7 @@ const defaultTemplate = {
|
|
432
432
|
size=${args.size}
|
433
433
|
?slide-in=${args.slideIn}
|
434
434
|
.title=${args.title}
|
435
|
-
@
|
435
|
+
@c4p-side-panel-navigate-back=${prevStep}
|
436
436
|
>
|
437
437
|
<!-- default slotted content -->
|
438
438
|
${args.content}
|
@@ -85,13 +85,13 @@ function tryFocusElements(elements: NodeListOf<HTMLElement>, reverse: boolean) {
|
|
85
85
|
/**
|
86
86
|
* SidePanel.
|
87
87
|
*
|
88
|
-
* @element
|
88
|
+
* @element c4p-side-panel
|
89
89
|
* @csspart dialog The dialog.
|
90
|
-
* @fires
|
90
|
+
* @fires c4p-side-panel-beingclosed
|
91
91
|
* The custom event fired before this side-panel is being closed upon a user gesture.
|
92
92
|
* Cancellation of this event stops the user-initiated action of closing this side-panel.
|
93
|
-
* @fires
|
94
|
-
* @fires
|
93
|
+
* @fires c4p-side-panel-closed - The custom event fired after this side-panel is closed upon a user gesture.
|
94
|
+
* @fires c4p-side-panel-navigate-back - custom event fired when clicking navigate back (available when step > 0)
|
95
95
|
*/
|
96
96
|
@customElement(`${prefix}-side-panel`)
|
97
97
|
class CDSSidePanel extends HostListenerMixin(LitElement) {
|
@@ -913,7 +913,7 @@ class CDSSidePanel extends HostListenerMixin(LitElement) {
|
|
913
913
|
await (this.constructor as typeof CDSSidePanel)._delay();
|
914
914
|
if (focusNode) {
|
915
915
|
// For cases where a `carbon-web-components` component (e.g. `<cds-button>`) being `primaryFocusNode`,
|
916
|
-
// where its first update/render cycle that makes it focusable happens after `<
|
916
|
+
// where its first update/render cycle that makes it focusable happens after `<c4p-side-panel>`'s first update/render cycle
|
917
917
|
(focusNode as HTMLElement).focus();
|
918
918
|
} else if (
|
919
919
|
!tryFocusElements(
|
@@ -6,12 +6,6 @@ import * as TearsheetStories from './tearsheet.stories';
|
|
6
6
|
|
7
7
|
# Tearsheet
|
8
8
|
|
9
|
-
> 💡 Check our
|
10
|
-
> [Stackblitz](https://stackblitz.com/github/carbon-design-system/carbon/tree/main/packages/web-components/examples/components/tearsheet)
|
11
|
-
> example implementation.
|
12
|
-
|
13
|
-
[](https://stackblitz.com/github/carbon-design-system/carbon/tree/main/packages/web-components/examples/components/tearsheet)
|
14
|
-
|
15
9
|
Tearsheets keep users in-context of a page while performing tasks like
|
16
10
|
navigating, editing, viewing details, or configuring something new.
|
17
11
|
|
@@ -22,15 +16,13 @@ Here's a quick example to get you started.
|
|
22
16
|
### JS (via import)
|
23
17
|
|
24
18
|
```javascript
|
25
|
-
import '@carbon/web-components/es/components/tearsheet/index.js';
|
19
|
+
import '@carbon/ibm-products-web-components/es/components/tearsheet/index.js';
|
26
20
|
// The following are used for slotted fields
|
27
21
|
import '@carbon/web-components/es/components/text-input/index.js';
|
28
22
|
import '@carbon/web-components/es/components/textarea/index.js';
|
29
23
|
import '@carbon/web-components/es/components/button/index.js';
|
30
24
|
```
|
31
25
|
|
32
|
-
<Markdown>{`${cdnJs({ components: ['tearsheet'] })}`}</Markdown>
|
33
|
-
<Markdown>{`${cdnCss()}`}</Markdown>
|
34
26
|
|
35
27
|
### HTML
|
36
28
|
|
@@ -102,6 +102,12 @@ $motion-duration: $duration-moderate-02;
|
|
102
102
|
.#{$block-class}__influencer[wide] {
|
103
103
|
@extend .#{$block-class}__influencer--wide;
|
104
104
|
}
|
105
|
+
::slotted(#{$carbon-prefix}-slug) {
|
106
|
+
display: flex;
|
107
|
+
inset-inline-end: 0;
|
108
|
+
margin-block: 6px;
|
109
|
+
margin-inline-end: 1rem;
|
110
|
+
}
|
105
111
|
}
|
106
112
|
|
107
113
|
:host(#{$prefix}-tearsheet[open]) {
|