@ptcwebops/ptcw-design 6.4.27-beta → 6.4.28-beta
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/dist/cjs/event-podcast-slider-example.cjs.entry.js +1 -1
- package/dist/cjs/featured-events-slider-example.cjs.entry.js +1 -1
- package/dist/cjs/homepage-jumbotron.cjs.entry.js +1 -1
- package/dist/cjs/icon-asset_17.cjs.entry.js +1660 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-case-studies-slider.cjs.entry.js +1 -1
- package/dist/cjs/ptc-icon-card-slider-example.cjs.entry.js +1 -1
- package/dist/cjs/ptc-icon-component.cjs.entry.js +1 -1
- package/dist/cjs/ptc-search-field.cjs.entry.js +95 -0
- package/dist/cjs/ptc-subnav-v2.cjs.entry.js +2 -1
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/cjs/storefront-enhanced-product-list-alt-example.cjs.entry.js +1 -1
- package/dist/cjs/storefront-enhanced-product-list-example.cjs.entry.js +1 -1
- package/dist/collection/components/organism-bundles/event-podcast-slider-example/event-podcast-slider-example.css +16 -11
- package/dist/collection/components/organism-bundles/featured-events-slider-example/featured-events-slider-example.css +16 -11
- package/dist/collection/components/organism-bundles/homepage-jumbotron/homepage-jumbotron.css +16 -11
- package/dist/collection/components/organism-bundles/ptc-icon-card-slider-example/ptc-icon-card-slider-example.css +16 -11
- package/dist/collection/components/organism-bundles/storefront-enhanced-product-list-example/storefront-enhanced-product-list-example.css +16 -11
- package/dist/collection/components/ptc-case-studies-slider/ptc-case-studies-slider.css +16 -11
- package/dist/collection/components/ptc-icon-component/ptc-icon-component.css +16 -11
- package/dist/collection/components/ptc-product-card/ptc-product-card.css +14 -0
- package/dist/collection/components/ptc-seo-title/ptc-seo-title.js +3 -3
- package/dist/collection/components/ptc-subnav-v2/ptc-subnav-v2.js +2 -1
- package/dist/custom-elements/index.js +9 -8
- package/dist/esm/blog-detail-content_2.entry.js +1 -1
- package/dist/esm/blog-detail-layout.entry.js +1 -1
- package/dist/esm/blogs-search-section.entry.js +1 -1
- package/dist/esm/event-podcast-slider-example.entry.js +1 -1
- package/dist/esm/featured-events-slider-example.entry.js +1 -1
- package/dist/esm/homepage-jumbotron.entry.js +2 -2
- package/dist/esm/homepage-toggled-content.entry.js +1 -1
- package/dist/esm/icon-asset_17.entry.js +1640 -0
- package/dist/esm/innovator-toggle-container.entry.js +1 -1
- package/dist/esm/{interfaces-4caedd26.js → interfaces-7c0243be.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/most-popular-news.entry.js +1 -1
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/ptc-accordion-item.entry.js +1 -1
- package/dist/esm/ptc-background-video.entry.js +1 -1
- package/dist/esm/ptc-case-studies-slider.entry.js +1 -1
- package/dist/esm/ptc-collapse-list.entry.js +1 -1
- package/dist/esm/ptc-form-checkbox_4.entry.js +1 -1
- package/dist/esm/ptc-homepage-image-feature.entry.js +1 -1
- package/dist/esm/ptc-homepage-video-background.entry.js +1 -1
- package/dist/esm/ptc-icon-card-slider-example.entry.js +1 -1
- package/dist/esm/ptc-icon-card.entry.js +1 -1
- package/dist/esm/ptc-icon-component.entry.js +1 -1
- package/dist/esm/ptc-img.entry.js +1 -1
- package/dist/esm/ptc-link.entry.js +1 -1
- package/dist/esm/ptc-media-card.entry.js +1 -1
- package/dist/esm/ptc-pricing-packaging-table.entry.js +1 -1
- package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
- package/dist/esm/ptc-search-field.entry.js +91 -0
- package/dist/esm/ptc-social-icons-footer.entry.js +1 -1
- package/dist/esm/ptc-subnav-v2.entry.js +2 -1
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/esm/storefront-enhanced-product-list-alt-example.entry.js +1 -1
- package/dist/esm/storefront-enhanced-product-list-example.entry.js +1 -1
- package/dist/esm/{utils-bdd0cc16.js → utils-a64ba942.js} +1 -1
- package/dist/ptcw-design/p-045c468a.entry.js +1 -0
- package/dist/ptcw-design/{p-2efd18d8.entry.js → p-0824f503.entry.js} +1 -1
- package/dist/ptcw-design/{p-cf41ac32.entry.js → p-1b1fd60d.entry.js} +1 -1
- package/dist/ptcw-design/{p-c7e948b2.js → p-22cf00e7.js} +1 -1
- package/dist/ptcw-design/{p-a318a793.entry.js → p-2fa5814b.entry.js} +1 -1
- package/dist/ptcw-design/{p-b154bbdb.entry.js → p-3596ce5a.entry.js} +1 -1
- package/dist/ptcw-design/p-4e8c1ba6.entry.js +1 -0
- package/dist/ptcw-design/p-5aed43be.entry.js +1 -0
- package/dist/ptcw-design/p-63da8f22.entry.js +1 -0
- package/dist/ptcw-design/{p-2f7b6437.entry.js → p-681d26ef.entry.js} +1 -1
- package/dist/ptcw-design/{p-9df3c31f.entry.js → p-7398874a.entry.js} +1 -1
- package/dist/ptcw-design/{p-7777753a.entry.js → p-7524411a.entry.js} +1 -1
- package/dist/ptcw-design/{p-850e6e8c.entry.js → p-83632220.entry.js} +1 -1
- package/dist/ptcw-design/{p-87215e3a.entry.js → p-87a9a028.entry.js} +1 -1
- package/dist/ptcw-design/{p-3fbcfe0f.entry.js → p-8e24e586.entry.js} +1 -1
- package/dist/ptcw-design/p-8ffdd794.entry.js +1 -0
- package/dist/ptcw-design/{p-a81833cd.entry.js → p-9461c4eb.entry.js} +1 -1
- package/dist/ptcw-design/{p-804dac0c.entry.js → p-a31f22a1.entry.js} +1 -1
- package/dist/ptcw-design/{p-d3c11c68.entry.js → p-b9966f20.entry.js} +1 -1
- package/dist/ptcw-design/{p-75c8fceb.entry.js → p-bdb2e42c.entry.js} +1 -1
- package/dist/ptcw-design/p-ca63a0c9.entry.js +1 -0
- package/dist/ptcw-design/p-da4b7e23.entry.js +1 -0
- package/dist/ptcw-design/{p-83dabf2e.entry.js → p-e2da8109.entry.js} +1 -1
- package/dist/ptcw-design/p-e50a5a46.entry.js +1 -0
- package/dist/ptcw-design/p-e69a0445.entry.js +1 -0
- package/dist/ptcw-design/p-e9f834fa.entry.js +1 -0
- package/dist/ptcw-design/p-eabf87be.entry.js +1 -0
- package/dist/ptcw-design/{p-562a3e36.entry.js → p-ed49544c.entry.js} +1 -1
- package/dist/ptcw-design/{p-e65cbdb9.entry.js → p-edaf241d.entry.js} +1 -1
- package/dist/ptcw-design/{p-711bcdad.js → p-ee1183b2.js} +1 -1
- package/dist/ptcw-design/p-efd6ee3b.entry.js +1 -0
- package/dist/ptcw-design/{p-5b00a563.entry.js → p-fa045097.entry.js} +1 -1
- package/dist/ptcw-design/{p-b2fcbbd8.entry.js → p-fb0f4459.entry.js} +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components.d.ts +62 -62
- package/package.json +101 -101
- package/readme.md +23 -23
- package/dist/cjs/icon-asset_2.cjs.entry.js +0 -154
- package/dist/cjs/list-item.cjs.entry.js +0 -52
- package/dist/cjs/ptc-back-to-top.cjs.entry.js +0 -100
- package/dist/cjs/ptc-breadcrumb.cjs.entry.js +0 -63
- package/dist/cjs/ptc-button.cjs.entry.js +0 -117
- package/dist/cjs/ptc-para.cjs.entry.js +0 -139
- package/dist/cjs/ptc-picture.cjs.entry.js +0 -185
- package/dist/cjs/ptc-product-card.cjs.entry.js +0 -61
- package/dist/cjs/ptc-product-category.cjs.entry.js +0 -20
- package/dist/cjs/ptc-product-dropdown.cjs.entry.js +0 -80
- package/dist/cjs/ptc-product-highlight-card.cjs.entry.js +0 -28
- package/dist/cjs/ptc-product-list.cjs.entry.js +0 -172
- package/dist/cjs/ptc-product-sidebar.cjs.entry.js +0 -178
- package/dist/cjs/ptc-readmore.cjs.entry.js +0 -186
- package/dist/cjs/ptc-spacer.cjs.entry.js +0 -38
- package/dist/cjs/ptc-title.cjs.entry.js +0 -161
- package/dist/cjs/ptc-tooltip.cjs.entry.js +0 -113
- package/dist/esm/icon-asset_2.entry.js +0 -149
- package/dist/esm/list-item.entry.js +0 -48
- package/dist/esm/ptc-back-to-top.entry.js +0 -96
- package/dist/esm/ptc-breadcrumb.entry.js +0 -59
- package/dist/esm/ptc-button.entry.js +0 -113
- package/dist/esm/ptc-para.entry.js +0 -135
- package/dist/esm/ptc-picture.entry.js +0 -181
- package/dist/esm/ptc-product-card.entry.js +0 -57
- package/dist/esm/ptc-product-category.entry.js +0 -16
- package/dist/esm/ptc-product-dropdown.entry.js +0 -76
- package/dist/esm/ptc-product-highlight-card.entry.js +0 -24
- package/dist/esm/ptc-product-list.entry.js +0 -168
- package/dist/esm/ptc-product-sidebar.entry.js +0 -174
- package/dist/esm/ptc-readmore.entry.js +0 -182
- package/dist/esm/ptc-spacer.entry.js +0 -34
- package/dist/esm/ptc-title.entry.js +0 -157
- package/dist/esm/ptc-tooltip.entry.js +0 -109
- package/dist/ptcw-design/p-03a1e1a5.entry.js +0 -1
- package/dist/ptcw-design/p-068b64a1.entry.js +0 -1
- package/dist/ptcw-design/p-183ba1ca.entry.js +0 -1
- package/dist/ptcw-design/p-1acd3617.entry.js +0 -1
- package/dist/ptcw-design/p-1b3394a7.entry.js +0 -1
- package/dist/ptcw-design/p-2e288e60.entry.js +0 -1
- package/dist/ptcw-design/p-2f82de8f.entry.js +0 -1
- package/dist/ptcw-design/p-36d6e662.entry.js +0 -1
- package/dist/ptcw-design/p-3ed57ccf.entry.js +0 -1
- package/dist/ptcw-design/p-4313edfb.entry.js +0 -1
- package/dist/ptcw-design/p-47aa1583.entry.js +0 -1
- package/dist/ptcw-design/p-561a622f.entry.js +0 -1
- package/dist/ptcw-design/p-674c828e.entry.js +0 -1
- package/dist/ptcw-design/p-709cc1f0.entry.js +0 -1
- package/dist/ptcw-design/p-7226670f.entry.js +0 -1
- package/dist/ptcw-design/p-73293d32.entry.js +0 -1
- package/dist/ptcw-design/p-89da867f.entry.js +0 -1
- package/dist/ptcw-design/p-8efaac1b.entry.js +0 -1
- package/dist/ptcw-design/p-a3ef1660.entry.js +0 -1
- package/dist/ptcw-design/p-b07df607.entry.js +0 -1
- package/dist/ptcw-design/p-b227c7f7.entry.js +0 -1
- package/dist/ptcw-design/p-c9762c88.entry.js +0 -1
- package/dist/ptcw-design/p-ce8480e3.entry.js +0 -1
- package/dist/ptcw-design/p-d428ba40.entry.js +0 -1
- package/dist/ptcw-design/p-e00c5964.entry.js +0 -1
- package/dist/ptcw-design/p-e1373325.entry.js +0 -1
- package/dist/ptcw-design/p-ec22d0b8.entry.js +0 -1
package/package.json
CHANGED
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@ptcwebops/ptcw-design",
|
|
3
|
-
"version": "6.4.
|
|
4
|
-
"description": "Stencil Component Starter",
|
|
5
|
-
"main": "dist/index.cjs.js",
|
|
6
|
-
"module": "./dist/index.js",
|
|
7
|
-
"es2015": "dist/esm/index.mjs",
|
|
8
|
-
"es2017": "dist/esm/index.mjs",
|
|
9
|
-
"types": "dist/custom-elements/index.d.ts",
|
|
10
|
-
"collection": "dist/collection/collection-manifest.json",
|
|
11
|
-
"collection:main": "dist/collection/index.js",
|
|
12
|
-
"unpkg": "dist/ptcw-design/ptcw-design.esm.js",
|
|
13
|
-
"files": [
|
|
14
|
-
"dist/",
|
|
15
|
-
"loader/"
|
|
16
|
-
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "stencil build --docs",
|
|
19
|
-
"start": "stencil build --dev --watch --serve",
|
|
20
|
-
"test": "stencil test --spec --e2e",
|
|
21
|
-
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
22
|
-
"test.unit": "stencil test --spec",
|
|
23
|
-
"test.end-to-end": "stencil test --e2e",
|
|
24
|
-
"test.unit.watch": "stencil test --spec --watch",
|
|
25
|
-
"generate": "stencil generate",
|
|
26
|
-
"prepare": "stencil build --docs",
|
|
27
|
-
"storybook": "storybook dev -p 6006",
|
|
28
|
-
"build-storybook": "storybook build",
|
|
29
|
-
"generate-story": "node scripts/storyGenerator",
|
|
30
|
-
"generate-unit-tests": "node scripts/unitTestGenerator",
|
|
31
|
-
"generate-bulk-tests": "node scripts/bulkTestGenerator",
|
|
32
|
-
"start:tailwind": "npx tailwindcss -i ./src/global/tailwindcss/input.css -o ./src/global/tailwindcss/output.css --watch",
|
|
33
|
-
"start:tailwind-stencil": "npx tailwindcss -i ./src/global/tailwindcss/input.css -o ./src/global/tailwindcss/output.css && npm run start",
|
|
34
|
-
"build:tailwind-stencil": "npx tailwindcss -i ./src/global/tailwindcss/input.css -o ./src/global/tailwindcss/output.css --minify && npm run build",
|
|
35
|
-
"format:prettier": "prettier --write \"src/**/*.{tsx,html,scss}\""
|
|
36
|
-
},
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"@daveberning/griddle": "^0.3.0",
|
|
39
|
-
"@material/checkbox": "^14.0.0",
|
|
40
|
-
"@material/form-field": "^14.0.0",
|
|
41
|
-
"@material/select": "^14.0.0",
|
|
42
|
-
"@material/textfield": "^14.0.0",
|
|
43
|
-
"@stencil/core": "^2.20.0",
|
|
44
|
-
"@stencil/postcss": "^2.1.0",
|
|
45
|
-
"@teamhive/lottie-player": "^1.0.0",
|
|
46
|
-
"@types/intl-tel-input": "^17.0.6",
|
|
47
|
-
"autoprefixer": "^10.4.21",
|
|
48
|
-
"dayjs": "^1.11.13",
|
|
49
|
-
"focus-trap": "^7.6.4",
|
|
50
|
-
"intl-tel-input": "^18.2.1",
|
|
51
|
-
"npmrc": "^1.1.1",
|
|
52
|
-
"postcss": "^8.5.6",
|
|
53
|
-
"resize-observer-polyfill": "^1.5.1",
|
|
54
|
-
"swiper": "^9.1.1"
|
|
55
|
-
},
|
|
56
|
-
"license": "MIT",
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@babel/preset-env": "^7.22.4",
|
|
59
|
-
"@stencil/sass": "^1.4.1",
|
|
60
|
-
"@storybook/addon-designs": "^7.0.7",
|
|
61
|
-
"@storybook/addon-essentials": "^7.1.0-alpha.29",
|
|
62
|
-
"@storybook/addon-links": "^7.1.0-alpha.29",
|
|
63
|
-
"@storybook/blocks": "^7.1.0-alpha.29",
|
|
64
|
-
"@storybook/web-components": "^7.1.0-alpha.29",
|
|
65
|
-
"@storybook/web-components-webpack5": "^7.1.0-alpha.29",
|
|
66
|
-
"@types/jest": "^27.0.3",
|
|
67
|
-
"ejs": "^3.1.9",
|
|
68
|
-
"jest": "^27.4.5",
|
|
69
|
-
"jest-cli": "^27.4.5",
|
|
70
|
-
"lit": "^2.7.4",
|
|
71
|
-
"marked": "^5.1.0",
|
|
72
|
-
"mobile-select": "^1.1.2",
|
|
73
|
-
"node-html-parser": "^6.1.5",
|
|
74
|
-
"prettier": "3.6.2",
|
|
75
|
-
"puppeteer": "^10.0.0",
|
|
76
|
-
"react": "^18.2.0",
|
|
77
|
-
"react-dom": "^18.2.0",
|
|
78
|
-
"stencil-inline-svg": "^1.1.0",
|
|
79
|
-
"storybook": "^7.1.0-alpha.29",
|
|
80
|
-
"tailwindcss": "^3.4.17",
|
|
81
|
-
"util": "^0.12.5",
|
|
82
|
-
"yargs": "^17.7.2"
|
|
83
|
-
},
|
|
84
|
-
"directories": {
|
|
85
|
-
"doc": "docs"
|
|
86
|
-
},
|
|
87
|
-
"repository": {
|
|
88
|
-
"type": "git",
|
|
89
|
-
"url": "git+https://@bitbucket.org/ptc-sitecore-workspace/ptc-design-system.git"
|
|
90
|
-
},
|
|
91
|
-
"keywords": [
|
|
92
|
-
"design system",
|
|
93
|
-
"web components",
|
|
94
|
-
"stenciljs"
|
|
95
|
-
],
|
|
96
|
-
"author": "Yunfeng Qian",
|
|
97
|
-
"homepage": "https://bitbucket.org/ptc-sitecore-workspace/ptc-design-system#readme",
|
|
98
|
-
"publishConfig": {
|
|
99
|
-
"registry": "https://registry.npmjs.org/"
|
|
100
|
-
}
|
|
101
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@ptcwebops/ptcw-design",
|
|
3
|
+
"version": "6.4.28-beta",
|
|
4
|
+
"description": "Stencil Component Starter",
|
|
5
|
+
"main": "dist/index.cjs.js",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"es2015": "dist/esm/index.mjs",
|
|
8
|
+
"es2017": "dist/esm/index.mjs",
|
|
9
|
+
"types": "dist/custom-elements/index.d.ts",
|
|
10
|
+
"collection": "dist/collection/collection-manifest.json",
|
|
11
|
+
"collection:main": "dist/collection/index.js",
|
|
12
|
+
"unpkg": "dist/ptcw-design/ptcw-design.esm.js",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist/",
|
|
15
|
+
"loader/"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "stencil build --docs",
|
|
19
|
+
"start": "stencil build --dev --watch --serve",
|
|
20
|
+
"test": "stencil test --spec --e2e",
|
|
21
|
+
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
22
|
+
"test.unit": "stencil test --spec",
|
|
23
|
+
"test.end-to-end": "stencil test --e2e",
|
|
24
|
+
"test.unit.watch": "stencil test --spec --watch",
|
|
25
|
+
"generate": "stencil generate",
|
|
26
|
+
"prepare": "stencil build --docs",
|
|
27
|
+
"storybook": "storybook dev -p 6006",
|
|
28
|
+
"build-storybook": "storybook build",
|
|
29
|
+
"generate-story": "node scripts/storyGenerator",
|
|
30
|
+
"generate-unit-tests": "node scripts/unitTestGenerator",
|
|
31
|
+
"generate-bulk-tests": "node scripts/bulkTestGenerator",
|
|
32
|
+
"start:tailwind": "npx tailwindcss -i ./src/global/tailwindcss/input.css -o ./src/global/tailwindcss/output.css --watch",
|
|
33
|
+
"start:tailwind-stencil": "npx tailwindcss -i ./src/global/tailwindcss/input.css -o ./src/global/tailwindcss/output.css && npm run start",
|
|
34
|
+
"build:tailwind-stencil": "npx tailwindcss -i ./src/global/tailwindcss/input.css -o ./src/global/tailwindcss/output.css --minify && npm run build",
|
|
35
|
+
"format:prettier": "prettier --write \"src/**/*.{tsx,html,scss}\""
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@daveberning/griddle": "^0.3.0",
|
|
39
|
+
"@material/checkbox": "^14.0.0",
|
|
40
|
+
"@material/form-field": "^14.0.0",
|
|
41
|
+
"@material/select": "^14.0.0",
|
|
42
|
+
"@material/textfield": "^14.0.0",
|
|
43
|
+
"@stencil/core": "^2.20.0",
|
|
44
|
+
"@stencil/postcss": "^2.1.0",
|
|
45
|
+
"@teamhive/lottie-player": "^1.0.0",
|
|
46
|
+
"@types/intl-tel-input": "^17.0.6",
|
|
47
|
+
"autoprefixer": "^10.4.21",
|
|
48
|
+
"dayjs": "^1.11.13",
|
|
49
|
+
"focus-trap": "^7.6.4",
|
|
50
|
+
"intl-tel-input": "^18.2.1",
|
|
51
|
+
"npmrc": "^1.1.1",
|
|
52
|
+
"postcss": "^8.5.6",
|
|
53
|
+
"resize-observer-polyfill": "^1.5.1",
|
|
54
|
+
"swiper": "^9.1.1"
|
|
55
|
+
},
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@babel/preset-env": "^7.22.4",
|
|
59
|
+
"@stencil/sass": "^1.4.1",
|
|
60
|
+
"@storybook/addon-designs": "^7.0.7",
|
|
61
|
+
"@storybook/addon-essentials": "^7.1.0-alpha.29",
|
|
62
|
+
"@storybook/addon-links": "^7.1.0-alpha.29",
|
|
63
|
+
"@storybook/blocks": "^7.1.0-alpha.29",
|
|
64
|
+
"@storybook/web-components": "^7.1.0-alpha.29",
|
|
65
|
+
"@storybook/web-components-webpack5": "^7.1.0-alpha.29",
|
|
66
|
+
"@types/jest": "^27.0.3",
|
|
67
|
+
"ejs": "^3.1.9",
|
|
68
|
+
"jest": "^27.4.5",
|
|
69
|
+
"jest-cli": "^27.4.5",
|
|
70
|
+
"lit": "^2.7.4",
|
|
71
|
+
"marked": "^5.1.0",
|
|
72
|
+
"mobile-select": "^1.1.2",
|
|
73
|
+
"node-html-parser": "^6.1.5",
|
|
74
|
+
"prettier": "3.6.2",
|
|
75
|
+
"puppeteer": "^10.0.0",
|
|
76
|
+
"react": "^18.2.0",
|
|
77
|
+
"react-dom": "^18.2.0",
|
|
78
|
+
"stencil-inline-svg": "^1.1.0",
|
|
79
|
+
"storybook": "^7.1.0-alpha.29",
|
|
80
|
+
"tailwindcss": "^3.4.17",
|
|
81
|
+
"util": "^0.12.5",
|
|
82
|
+
"yargs": "^17.7.2"
|
|
83
|
+
},
|
|
84
|
+
"directories": {
|
|
85
|
+
"doc": "docs"
|
|
86
|
+
},
|
|
87
|
+
"repository": {
|
|
88
|
+
"type": "git",
|
|
89
|
+
"url": "git+https://@bitbucket.org/ptc-sitecore-workspace/ptc-design-system.git"
|
|
90
|
+
},
|
|
91
|
+
"keywords": [
|
|
92
|
+
"design system",
|
|
93
|
+
"web components",
|
|
94
|
+
"stenciljs"
|
|
95
|
+
],
|
|
96
|
+
"author": "Yunfeng Qian",
|
|
97
|
+
"homepage": "https://bitbucket.org/ptc-sitecore-workspace/ptc-design-system#readme",
|
|
98
|
+
"publishConfig": {
|
|
99
|
+
"registry": "https://registry.npmjs.org/"
|
|
100
|
+
}
|
|
101
|
+
}
|
package/readme.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
|
-
# PTC Design 6.4.
|
|
4
|
-
|
|
5
|
-
The site is the place for documentation on PTC Design System
|
|
6
|
-
|
|
7
|
-
## Building the Site
|
|
8
|
-
|
|
9
|
-
To build the site from the source, ensure you're using the most recent versions of Node and Npm, and pull the latest from master. Next, run `npm install`, `npm run docs` to build the docs files and `npm run start` to launch the site in development mode.
|
|
10
|
-
|
|
11
|
-
## Project Tools
|
|
12
|
-
|
|
13
|
-
- stenciljs 2.20.0
|
|
14
|
-
- Node 18.13.0
|
|
15
|
-
- npm 8.19.3
|
|
16
|
-
- jest 27.4.5
|
|
17
|
-
- puppeteer 10.0.0
|
|
18
|
-
|
|
19
|
-
## License
|
|
20
|
-
|
|
21
|
-
## Release notes
|
|
22
|
-
|
|
23
|
-
TODO: figure out how to do release notes with npm
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# PTC Design 6.4.28-beta
|
|
4
|
+
|
|
5
|
+
The site is the place for documentation on PTC Design System
|
|
6
|
+
|
|
7
|
+
## Building the Site
|
|
8
|
+
|
|
9
|
+
To build the site from the source, ensure you're using the most recent versions of Node and Npm, and pull the latest from master. Next, run `npm install`, `npm run docs` to build the docs files and `npm run start` to launch the site in development mode.
|
|
10
|
+
|
|
11
|
+
## Project Tools
|
|
12
|
+
|
|
13
|
+
- stenciljs 2.20.0
|
|
14
|
+
- Node 18.13.0
|
|
15
|
+
- npm 8.19.3
|
|
16
|
+
- jest 27.4.5
|
|
17
|
+
- puppeteer 10.0.0
|
|
18
|
+
|
|
19
|
+
## License
|
|
20
|
+
|
|
21
|
+
## Release notes
|
|
22
|
+
|
|
23
|
+
TODO: figure out how to do release notes with npm
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-63ddc79c.js');
|
|
6
|
-
|
|
7
|
-
const iconAssetCss = ".svg-inline--fa.sc-icon-asset,svg.sc-icon-asset:not(:root).svg-inline--fa{overflow:visible}.svg-inline--fa.sc-icon-asset{display:inline-block;font-size:inherit;height:1em;vertical-align:-.125em}.svg-inline--fa.fa-lg.sc-icon-asset{vertical-align:-.225em}.svg-inline--fa.fa-w-1.sc-icon-asset{width:.0625em}.svg-inline--fa.fa-w-2.sc-icon-asset{width:.125em}.svg-inline--fa.fa-w-3.sc-icon-asset{width:.1875em}.svg-inline--fa.fa-w-4.sc-icon-asset{width:.25em}.svg-inline--fa.fa-w-5.sc-icon-asset{width:.3125em}.svg-inline--fa.fa-w-6.sc-icon-asset{width:.375em}.svg-inline--fa.fa-w-7.sc-icon-asset{width:.4375em}.svg-inline--fa.fa-w-8.sc-icon-asset{width:.5em}.svg-inline--fa.fa-w-9.sc-icon-asset{width:.5625em}.svg-inline--fa.fa-w-10.sc-icon-asset{width:.625em}.svg-inline--fa.fa-w-11.sc-icon-asset{width:.6875em}.svg-inline--fa.fa-w-12.sc-icon-asset{width:.75em}.svg-inline--fa.fa-w-13.sc-icon-asset{width:.8125em}.svg-inline--fa.fa-w-14.sc-icon-asset{width:.875em}.svg-inline--fa.fa-w-15.sc-icon-asset{width:.9375em}.svg-inline--fa.fa-w-16.sc-icon-asset{width:1em}.svg-inline--fa.fa-w-17.sc-icon-asset{width:1.0625em}.svg-inline--fa.fa-w-18.sc-icon-asset{width:1.125em}.svg-inline--fa.fa-w-19.sc-icon-asset{width:1.1875em}.svg-inline--fa.fa-w-20.sc-icon-asset{width:1.25em}.svg-inline--fa.fa-pull-left.sc-icon-asset{margin-right:.3em;width:auto}.svg-inline--fa.fa-pull-right.sc-icon-asset{margin-left:.3em;width:auto}.svg-inline--fa.fa-border.sc-icon-asset{height:1.5em}.svg-inline--fa.fa-li.sc-icon-asset{width:2em}.svg-inline--fa.fa-fw.sc-icon-asset{width:1.25em}.fa-layers.sc-icon-asset svg.svg-inline--fa.sc-icon-asset{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers.sc-icon-asset{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-.125em;width:1em}.fa-layers.sc-icon-asset svg.svg-inline--fa.sc-icon-asset{-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter.sc-icon-asset,.fa-layers-text.sc-icon-asset{display:inline-block;position:absolute;text-align:center}.fa-layers-text.sc-icon-asset{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter.sc-icon-asset{background-color:#ff253a;border-radius:1em;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:0;text-overflow:ellipsis;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-bottom-right.sc-icon-asset{bottom:0;right:0;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom right;transform-origin:bottom right}.fa-layers-bottom-left.sc-icon-asset{bottom:0;left:0;right:auto;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom left;transform-origin:bottom left}.fa-layers-top-right.sc-icon-asset{right:0;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-top-left.sc-icon-asset{left:0;right:auto;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top left;transform-origin:top left}.fa-lg.sc-icon-asset{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs.sc-icon-asset{font-size:.75em}.fa-sm.sc-icon-asset{font-size:.875em}.fa-1x.sc-icon-asset{font-size:1em}.fa-2x.sc-icon-asset{font-size:2em}.fa-3x.sc-icon-asset{font-size:3em}.fa-4x.sc-icon-asset{font-size:4em}.fa-5x.sc-icon-asset{font-size:5em}.fa-6x.sc-icon-asset{font-size:6em}.fa-7x.sc-icon-asset{font-size:7em}.fa-8x.sc-icon-asset{font-size:8em}.fa-9x.sc-icon-asset{font-size:9em}.fa-10x.sc-icon-asset{font-size:10em}.fa-fw.sc-icon-asset{text-align:center;width:1.25em}.fa-ul.sc-icon-asset{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul.sc-icon-asset>li.sc-icon-asset{position:relative}.fa-li.sc-icon-asset{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border.sc-icon-asset{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left.sc-icon-asset{float:left}.fa-pull-right.sc-icon-asset{float:right}.fa.fa-pull-left.sc-icon-asset,.fab.fa-pull-left.sc-icon-asset,.fal.fa-pull-left.sc-icon-asset,.far.fa-pull-left.sc-icon-asset,.fas.fa-pull-left.sc-icon-asset{margin-right:.3em}.fa.fa-pull-right.sc-icon-asset,.fab.fa-pull-right.sc-icon-asset,.fal.fa-pull-right.sc-icon-asset,.far.fa-pull-right.sc-icon-asset,.fas.fa-pull-right.sc-icon-asset{margin-left:.3em}.fa-spin.sc-icon-asset{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse.sc-icon-asset{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.fa-rotate-90.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical.sc-icon-asset{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.fa-flip-both.sc-icon-asset,.fa-flip-horizontal.fa-flip-vertical.sc-icon-asset,.fa-flip-vertical.sc-icon-asset{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\"}.fa-flip-both.sc-icon-asset,.fa-flip-horizontal.fa-flip-vertical.sc-icon-asset{-webkit-transform:scale(-1);transform:scale(-1)}.sc-icon-asset:root .fa-flip-both.sc-icon-asset,.sc-icon-asset:root .fa-flip-horizontal.sc-icon-asset,.sc-icon-asset:root .fa-flip-vertical.sc-icon-asset,.sc-icon-asset:root .fa-rotate-90.sc-icon-asset,.sc-icon-asset:root .fa-rotate-180.sc-icon-asset,.sc-icon-asset:root .fa-rotate-270.sc-icon-asset{-webkit-filter:none;filter:none}.fa-stack.sc-icon-asset{display:inline-block;height:2em;position:relative;width:2.5em}.fa-stack-1x.sc-icon-asset,.fa-stack-2x.sc-icon-asset{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x.sc-icon-asset{height:1em;width:1.25em}.svg-inline--fa.fa-stack-2x.sc-icon-asset{height:2em;width:2.5em}.fa-inverse.sc-icon-asset{color:#fff}.sr-only.sc-icon-asset{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable.sc-icon-asset:active,.sr-only-focusable.sc-icon-asset:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.svg-inline--fa.sc-icon-asset .fa-primary.sc-icon-asset{fill:var(--fa-primary-color,currentColor);opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa.sc-icon-asset .fa-secondary.sc-icon-asset{fill:var(--fa-secondary-color,currentColor)}.svg-inline--fa.sc-icon-asset .fa-secondary.sc-icon-asset,.svg-inline--fa.fa-swap-opacity.sc-icon-asset .fa-primary.sc-icon-asset{opacity:.4;opacity:var(--fa-secondary-opacity,.4)}.svg-inline--fa.fa-swap-opacity.sc-icon-asset .fa-secondary.sc-icon-asset{opacity:1;opacity:var(--fa-primary-opacity,1)}.svg-inline--fa.sc-icon-asset mask.sc-icon-asset .fa-primary.sc-icon-asset,.svg-inline--fa.sc-icon-asset mask.sc-icon-asset .fa-secondary.sc-icon-asset{fill:#000}.fad.fa-inverse.sc-icon-asset{color:#fff}h1.sc-icon-asset,h2.sc-icon-asset,h3.sc-icon-asset,h4.sc-icon-asset,h5.sc-icon-asset,h6.sc-icon-asset,p.sc-icon-asset,ul.sc-icon-asset,li.sc-icon-asset,ptc-subnav.sc-icon-asset,ptc-tab-list.sc-icon-asset,ptc-link.sc-icon-asset,ptc-square-card.sc-icon-asset,.hyphenate-text.sc-icon-asset,ptc-footer.sc-icon-asset{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1.sc-icon-asset,h2.sc-icon-asset,h3.sc-icon-asset,h4.sc-icon-asset,h5.sc-icon-asset,h6.sc-icon-asset,p.sc-icon-asset,ul.sc-icon-asset,li.sc-icon-asset,ptc-subnav.sc-icon-asset,ptc-tab-list.sc-icon-asset,ptc-link.sc-icon-asset,ptc-square-card.sc-icon-asset,.hyphenate-text.sc-icon-asset,ptc-footer.sc-icon-asset{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}icon-asset.sc-icon-asset{vertical-align:middle}svg.sc-icon-asset{transition:all var(--ptc-transition-medium) var(--ptc-ease-inout)}svg.micro.sc-icon-asset{width:calc(var(--ptc-font-size-x-small) / 2);height:calc(var(--ptc-font-size-x-small) / 2)}svg.xxx-small.sc-icon-asset{width:var(--ptc-font-size-xxx-small);height:var(--ptc-font-size-xxx-small)}svg.xx-small.sc-icon-asset{width:var(--ptc-font-size-xx-small);height:var(--ptc-font-size-xx-small)}svg.x-small.sc-icon-asset{width:var(--ptc-font-size-x-small);height:var(--ptc-font-size-x-small)}svg.small.sc-icon-asset{width:var(--ptc-font-size-small);height:var(--ptc-font-size-small)}svg.medium.sc-icon-asset{width:var(--ptc-font-size-medium);height:var(--ptc-font-size-medium)}svg.large.sc-icon-asset{width:var(--ptc-font-size-large);height:var(--ptc-font-size-large)}svg.x-large.sc-icon-asset{width:var(--ptc-font-size-x-large);height:var(--ptc-font-size-x-large)}svg.xx-large.sc-icon-asset{width:var(--ptc-font-size-xx-large);height:var(--ptc-font-size-xx-large)}svg.xxx-large.sc-icon-asset{width:var(--ptc-font-size-xxx-large);height:var(--ptc-font-size-xxx-large)}svg.xxxx-large.sc-icon-asset{width:var(--ptc-font-size-xxxx-large);height:var(--ptc-font-size-xxxx-large)}svg.white.sc-icon-asset{fill:var(--color-white)}svg.white.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.white.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.white.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-white)}svg.black.sc-icon-asset{fill:var(--color-black)}svg.black.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.black.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.black.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-black)}svg.ptc-green.sc-icon-asset{fill:var(--color-green-07)}svg.ptc-green.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.ptc-green.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.ptc-green.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-green-07)}svg.gray.sc-icon-asset{fill:var(--color-gray-06)}svg.gray.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.gray.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.gray.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-gray-06)}svg.light-gray.sc-icon-asset{fill:var(--color-gray-05)}svg.light-gray.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.light-gray.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.light-gray.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-gray-05)}svg.disabled.sc-icon-asset{fill:var(--color-gray-03)}svg.disabled.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.disabled.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.disabled.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:var(--color-gray-03)}svg.primary-gray.sc-icon-asset{fill:var(--color-gray-10)}svg.inherit.sc-icon-asset{fill:inherit}svg.inherit.sc-icon-asset use[href$=\"#minus\"].sc-icon-asset,svg.inherit.sc-icon-asset use[href$=\"#plus\"].sc-icon-asset,svg.inherit.sc-icon-asset use[href$=\"#checkmark\"].sc-icon-asset{stroke:inherit}svg.sc-icon-asset:focus{outline:none !important}svg[tabIndex=\"0\"].sc-icon-asset:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}svg[tabIndex=\"0\"].sc-icon-asset:focus{outline:none !important}";
|
|
8
|
-
|
|
9
|
-
const IconAsset = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.ready = index.createEvent(this, "ready", 7);
|
|
13
|
-
this.regularSprite = index.getAssetPath("./media/regular.svg");
|
|
14
|
-
this.solidSprite = index.getAssetPath("./media/solid.svg");
|
|
15
|
-
this.brandSprite = index.getAssetPath("./media/brands.svg");
|
|
16
|
-
this.ptcSprite = index.getAssetPath("./media/designer-v6.0.7.svg");
|
|
17
|
-
this.name = undefined;
|
|
18
|
-
this.size = "xx-small";
|
|
19
|
-
this.type = "regular";
|
|
20
|
-
this.spin = "";
|
|
21
|
-
this.pulse = "";
|
|
22
|
-
this.color = "default";
|
|
23
|
-
this.isMobileSelect = undefined;
|
|
24
|
-
this.injectedStyle = undefined;
|
|
25
|
-
this.focusOn = false;
|
|
26
|
-
this.trackerId = "";
|
|
27
|
-
}
|
|
28
|
-
componentDidLoad() {
|
|
29
|
-
this.ready.emit({
|
|
30
|
-
"regular-icons": this.regularSprite,
|
|
31
|
-
"sold-icons": this.solidSprite,
|
|
32
|
-
"brand-icons": this.brandSprite,
|
|
33
|
-
"ptc-icons": this.ptcSprite,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
render() {
|
|
37
|
-
const classMap = this.getCssClassMap();
|
|
38
|
-
if (this.type == "brands") {
|
|
39
|
-
return (index.h(index.Host, null, this.injectedStyle && index.h("style", null, this.injectedStyle), index.h("svg", { class: classMap }, index.h("use", { href: `${this.brandSprite}#${this.name}` }))));
|
|
40
|
-
}
|
|
41
|
-
else if (this.type == "solid") {
|
|
42
|
-
return (index.h(index.Host, null, this.injectedStyle && index.h("style", null, this.injectedStyle), index.h("svg", { class: classMap }, index.h("use", { href: `${this.solidSprite}#${this.name}` }))));
|
|
43
|
-
}
|
|
44
|
-
else if (this.type == "ptc") {
|
|
45
|
-
return (index.h(index.Host, null, this.injectedStyle && index.h("style", null, this.injectedStyle), index.h("svg", { class: classMap, "aria-hidden": this.isMobileSelect && "true", tabindex: this.focusOn ? 0 : -1, id: this.trackerId }, index.h("use", { href: `${this.ptcSprite}#${this.name}` }))));
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
return (index.h(index.Host, null, this.injectedStyle && index.h("style", null, this.injectedStyle), index.h("svg", { class: classMap }, index.h("use", { href: `${this.regularSprite}#${this.name}` }))));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
getCssClassMap() {
|
|
52
|
-
return {
|
|
53
|
-
[this.size]: true,
|
|
54
|
-
[this.spin]: true,
|
|
55
|
-
[this.pulse]: true,
|
|
56
|
-
[this.color]: true,
|
|
57
|
-
["ismobileselect"]: this.isMobileSelect ? true : false,
|
|
58
|
-
["mf-listen"]: this.trackerId !== "" ? true : false,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
static get assetsDirs() { return ["media"]; }
|
|
62
|
-
};
|
|
63
|
-
IconAsset.style = iconAssetCss;
|
|
64
|
-
|
|
65
|
-
const ptcSearchFieldCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host .search-div{position:relative;display:flex;align-items:stretch;height:51px;border-radius:var(--ptc-border-radius-standard)}:host .search-div:focus-visible{outline:5px solid var(--keyboard-nav-outline) !important;border-radius:var(--ptc-border-radius-standard) !important}:host .search-div .input-wrap{position:relative;width:100%;box-sizing:border-box;display:flex}:host .search-div .input-wrap input{height:100%}:host .search-div input{background-color:var(--color-white);height:-webkit-fill-available;border:0 solid var(--color-gray-12);border-radius:var(--ptc-border-radius-standard) 0 0 var(--ptc-border-radius-standard);flex-grow:2;padding-left:var(--ptc-element-spacing-04);line-height:var(--ptc-line-height-loose);padding-right:54px;width:100%;box-sizing:border-box;margin-right:0px}:host .search-div input:focus-visible{border-radius:var(--ptc-border-radius-standard) 0 0 var(--ptc-border-radius-standard);outline:none}:host .search-div input::-moz-placeholder{font-family:var(--ptc-font-latin);font-style:var(--ptc-font-style-normal);font-weight:var(--ptc-font-weight-regular);font-size:var(--ptc-font-size-small);position:relative;top:1px;color:var(--color-gray-10)}:host .search-div input::placeholder{font-family:var(--ptc-font-latin);font-style:var(--ptc-font-style-normal);font-weight:var(--ptc-font-weight-regular);font-size:var(--ptc-font-size-small);position:relative;top:1px;color:var(--color-gray-10)}:host .search-div div#searchBtnID{z-index:1}:host .search-div .search-btn{cursor:pointer;height:51px;min-width:51px;border-radius:0 var(--ptc-border-radius-standard) var(--ptc-border-radius-standard) 0;background-color:var(--color-gray-12);border:0 solid var(--color-gray-12);transition:background-color var(--ptc-ease-inout) var(--ptc-transition-medium);margin:0}:host .search-div .search-btn:active{transition:none;background-color:var(--color-black)}:host .search-div .search-btn:hover{background-color:var(--color-gray-10)}:host .search-div .search-btn:focus-visible{z-index:1;border-radius:var(--ptc-border-radius-standard);border:2px solid white;outline:5px solid var(--keyboard-nav-outline)}:host(.dark){z-index:999;position:relative;margin-top:20px}:host(.dark) .search-div{height:43px;width:208px}@media (max-width: 480px){:host(.dark) .search-div{width:100%}}@media only screen and (min-width: 992px){:host(.dark) .search-div{width:246px}}:host(.dark) .search-div input{background-color:var(--color-gray-12);border:1px solid var(--color-gray-08);color:var(--color-white);padding-left:unset;text-indent:var(--ptc-element-spacing-04);padding-right:2px}:host(.dark) .search-div input::-moz-placeholder{color:var(--color-white);font-size:var(--ptc-font-size-x-small)}:host(.dark) .search-div input::placeholder{color:var(--color-white);font-size:var(--ptc-font-size-x-small)}:host(.dark) .search-div .search-btn{height:43px;width:43px;background-color:var(--color-gray-10);border:1px solid var(--color-gray-08);border-left:0}:host(.dark) .search-div .search-btn:hover{background-color:var(--color-gray-08)}:host(.news){z-index:999;position:relative;margin-top:20px}:host(.news) .search-div{height:43px}@media (max-width: 480px){:host(.news) .search-div{width:100%}}@media only screen and (min-width: 992px){:host(.news) .search-div{width:246px}}:host(.news) .search-div .search-btn{height:43px}:host(.x-small) .search-div{box-shadow:var(--ptc-shadow-x-small)}:host(.small) .search-div{box-shadow:var(--ptc-shadow-small)}:host(.medium) .search-div{box-shadow:var(--ptc-shadow-medium)}:host(.large) .search-div{box-shadow:var(--ptc-shadow-large)}:host(.x-large) .search-div{box-shadow:var(--ptc-shadow-x-large)}@media (max-width: 480px){input{width:75%}}.icon-wrapper{padding:16px 20px 0;background-color:transparent;position:absolute;right:0;top:-2px;height:100%;box-sizing:border-box}.icon-wrapper .cls{cursor:pointer;display:block}:host(.dark) .icon-wrapper{padding:12px 20px 0;background-color:var(--color-gray-12);border:1px solid var(--color-gray-08);border-left-width:0;position:initial;right:auto;top:auto}:host(.dark):host(.enable-clear) input{border-right-width:0}@media only screen and (min-width: 992px){.cls{display:none}}.tracker-div{display:inline}";
|
|
66
|
-
|
|
67
|
-
const PtcSearchField = class {
|
|
68
|
-
constructor(hostRef) {
|
|
69
|
-
index.registerInstance(this, hostRef);
|
|
70
|
-
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
|
71
|
-
this.clicked = index.createEvent(this, "clicked", 7);
|
|
72
|
-
this.textValue = undefined;
|
|
73
|
-
this.placeholderLabel = undefined;
|
|
74
|
-
this.darkTheme = undefined;
|
|
75
|
-
this.isNews = undefined;
|
|
76
|
-
this.elevation = "small";
|
|
77
|
-
this.enableClear = false;
|
|
78
|
-
this.styles = undefined;
|
|
79
|
-
}
|
|
80
|
-
textChangedHandler(event) {
|
|
81
|
-
this.valueChanged.emit({
|
|
82
|
-
sender: this,
|
|
83
|
-
event: event,
|
|
84
|
-
searchTerm: this.getSearchValue(),
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
buttonClickHandler(event) {
|
|
88
|
-
this.clicked.emit({
|
|
89
|
-
sender: this,
|
|
90
|
-
event: event,
|
|
91
|
-
searchTerm: this.getSearchValue(),
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
keyDownHandler(event) {
|
|
95
|
-
if (event.key == "Enter") {
|
|
96
|
-
this.clicked.emit({
|
|
97
|
-
sender: this,
|
|
98
|
-
event: event,
|
|
99
|
-
searchTerm: this.getSearchValue(),
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
if (this.getSearchValue() && this.enableClear) ;
|
|
103
|
-
}
|
|
104
|
-
keyUpHandler() {
|
|
105
|
-
if (!this.darkTheme) {
|
|
106
|
-
this.enableClear = !(this.getSearchValue() == "");
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
getSearchValue() {
|
|
110
|
-
let result = "";
|
|
111
|
-
let input = this.el.shadowRoot.querySelector("input");
|
|
112
|
-
if (input) {
|
|
113
|
-
result = input.value;
|
|
114
|
-
}
|
|
115
|
-
return result;
|
|
116
|
-
}
|
|
117
|
-
async clearSearchValue() {
|
|
118
|
-
this.textValue = "";
|
|
119
|
-
let input = this.el.shadowRoot.querySelector("input");
|
|
120
|
-
if (input) {
|
|
121
|
-
input.value = "";
|
|
122
|
-
this.enableClear = false;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
render() {
|
|
126
|
-
const classMap = this.getCssClassMap();
|
|
127
|
-
const clearIconColor = this.darkTheme ? "white" : "black";
|
|
128
|
-
return (index.h(index.Host, { class: classMap }, this.styles && index.h("style", null, this.styles), index.h("div", { class: "search-div" }, index.h("div", { class: "input-wrap mf-listen", id: "searchTextID" }, index.h("input", { id: "ptc-search-input", type: "text", value: this.textValue, placeholder: this.placeholderLabel, onKeyDown: (e) => {
|
|
129
|
-
this.keyDownHandler(e);
|
|
130
|
-
}, onKeyUp: () => {
|
|
131
|
-
this.keyUpHandler();
|
|
132
|
-
}, onChange: (e) => {
|
|
133
|
-
this.textChangedHandler(e);
|
|
134
|
-
} }), this.enableClear && (index.h("div", { class: "icon-wrapper" }, index.h("icon-asset", { class: "cls", type: "ptc", color: clearIconColor, name: "times", size: "xxx-small", onClick: (e) => {
|
|
135
|
-
this.clearSearchValue();
|
|
136
|
-
this.buttonClickHandler(e);
|
|
137
|
-
} })))), index.h("div", { class: "tracker-div mf-listen", id: "searchBtnID" }, index.h("button", { type: "button", color: "blackgrey", class: "search-btn", onClick: (e) => {
|
|
138
|
-
this.buttonClickHandler(e);
|
|
139
|
-
} }, index.h("icon-asset", { type: "ptc", size: "medium", name: "new-search", color: "white" }))))));
|
|
140
|
-
}
|
|
141
|
-
getCssClassMap() {
|
|
142
|
-
return {
|
|
143
|
-
["dark"]: this.darkTheme ? true : false,
|
|
144
|
-
[this.elevation]: true,
|
|
145
|
-
["enable-clear"]: this.enableClear,
|
|
146
|
-
["news"]: this.isNews ? true : false,
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
get el() { return index.getElement(this); }
|
|
150
|
-
};
|
|
151
|
-
PtcSearchField.style = ptcSearchFieldCss;
|
|
152
|
-
|
|
153
|
-
exports.icon_asset = IconAsset;
|
|
154
|
-
exports.ptc_search_field = PtcSearchField;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-63ddc79c.js');
|
|
6
|
-
|
|
7
|
-
const listItemCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host(.list-primary){display:block}:host(.flush-before) li::before{content:\"\" !important}:host(.breadcrumb){display:inline-block}:host(.breadcrumb) li{position:relative;display:inline-block;color:var(--color-white);font-weight:var(--ptc-font-weight-bold);font-size:var(--ptc-font-size-xxx-small);line-height:var(--ptc-line-height-densest);display:flex;align-items:baseline}:host(.breadcrumb) li::before{content:\"/\";top:0;left:0;margin-left:2px}:host(.breadcrumb) li a.item-link{color:var(--color-white);font-weight:var(--ptc-font-weight-bold) !important;font-size:var(--ptc-font-size-xxx-small) !important;line-height:var(--ptc-line-height-densest);text-decoration:underline;text-decoration-color:transparent;text-underline-offset:2px;text-decoration-thickness:1px;outline:none;transition:text-decoration-color var(--ptc-transition-medium) var(--ptc-ease-inout)}:host(.breadcrumb) li a.item-link:hover{text-decoration:underline;text-decoration-color:var(--color-green-07);outline:none}:host(.breadcrumb) li a.item-link:focus-visible{transition:none;border-radius:var(--ptc-border-radius-standard);border:2px solid white;outline:5px solid var(--keyboard-nav-outline);padding-bottom:5px;padding-right:5px}:host(.breadcrumb-center) li{display:inline}:host(.list-green){display:block;margin-bottom:16px}:host(.list-green) li a{font-size:var(--ptc-font-size-xx-small);color:var(--color-gray-10);text-decoration:underline;text-decoration-thickness:1.5px;text-decoration-color:var(--color-green-04);font-weight:var(--ptc-font-weight-bold);transition:color var(--ptc-transition-medium) var(--ptc-ease-inout);line-height:var(--ptc-line-height-p);text-underline-offset:4px}:host(.list-green) li a:hover{color:var(--color-green-04)}:host(:not(.flush-before)) li::before{margin-right:2px}:host(.list-footer) li{display:inline-block;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-regular);font-style:normal;font-stretch:normal;line-height:var(--ptc-line-height-denser);letter-spacing:normal;color:var(--color-white);margin:0 0.5rem}:host(.list-footer) li a{color:var(--color-white-grey);border-bottom:1px solid transparent;display:inline-block;text-decoration:none}:host(.list-footer) li a:hover,:host(.list-footer) li a:focus{text-decoration:none;border-bottom:1px solid var(--color-green-06);color:var(--color-white-grey);transition:border var(--ptc-ease-inout) var(--ptc-transition-medium)}:host(.list-footer) li a:active{text-decoration:none;border-bottom:1px solid var(--color-green-06);color:var(--color-white-grey)}:host(.list-footer) li a:focus{outline:3px solid var(--color-blue-07);outline-offset:2px;border-radius:var(--ptc-border-radius-standard);text-decoration:none;border-color:transparent !important}:host(.list-footer) li a:focus-visible{border-radius:var(--ptc-border-radius-standard);border:2px solid white;outline:5px solid var(--keyboard-nav-outline);transition:none !important;border-color:white !important}:host(.white) li{color:var(--color-white)}:host(.white) li a.item-link{color:var(--color-white)}:host(.light-gray) li{color:var(--color-gray-01)}:host(.light-gray) li a.item-link{color:var(--color-gray-01)}:host(.primary-gray) li{color:var(--color-gray-10)}:host(.primary-gray) li a.item-link{color:var(--color-gray-10)}:host(.list-underline) li{color:var(--color-gray-10);list-style:none;-webkit-text-decoration:underline 1px solid;text-decoration:underline 1px solid;text-underline-offset:2px;line-height:var(--ptc-line-height-p)}:host(.list-underline) li a{display:inline-block;padding:4px 0}:host(.list-underline) li a.item-link{color:var(--color-gray-10)}:host(.list-underline) li a:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host li .has-before-home-icon{display:block}@media only screen and (min-width: 480px){:host li .has-before-home-icon{display:none}}";
|
|
8
|
-
|
|
9
|
-
const ListItem = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.listType = "list-primary";
|
|
13
|
-
this.linkHref = undefined;
|
|
14
|
-
this.flushBefore = false;
|
|
15
|
-
this.linkTarget = "_self";
|
|
16
|
-
this.hasBeforeHomeIcon = false;
|
|
17
|
-
this.trackerId = undefined;
|
|
18
|
-
this.color = undefined;
|
|
19
|
-
this.styles = undefined;
|
|
20
|
-
this.ariaLabel = "";
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
const classMap = this.getCssClassMap();
|
|
24
|
-
return (index.h(index.Host, { class: classMap }, this.styles && index.h("style", null, this.styles), index.h("li", { id: this.trackerId }, this.linkHref ? (index.h("a", Object.assign({ class: "item-link", target: this.linkTarget }, (this.linkHref ? { href: this.linkHref } : {}), (this.ariaLabel !== ""
|
|
25
|
-
? { "aria-label": this.ariaLabel }
|
|
26
|
-
: {}), { tabindex: "0" }), index.h("slot", null))) : (index.h("slot", null)))));
|
|
27
|
-
}
|
|
28
|
-
getCssClassMap() {
|
|
29
|
-
let bcEnable = false;
|
|
30
|
-
if (this.hostElement && this.hostElement.parentElement) {
|
|
31
|
-
try {
|
|
32
|
-
bcEnable =
|
|
33
|
-
this.hostElement.parentElement.classList.contains("center") &&
|
|
34
|
-
this.hostElement.parentElement.tagName === "PTC-BREADCRUMB";
|
|
35
|
-
}
|
|
36
|
-
catch (err) {
|
|
37
|
-
console.log(err);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
[this.listType]: true,
|
|
42
|
-
["flush-before"]: this.flushBefore ? true : false,
|
|
43
|
-
[this.color]: !!this.color ? true : false,
|
|
44
|
-
["breadcrumb-center"]: bcEnable,
|
|
45
|
-
["mf-listen"]: true,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
get hostElement() { return index.getElement(this); }
|
|
49
|
-
};
|
|
50
|
-
ListItem.style = listItemCss;
|
|
51
|
-
|
|
52
|
-
exports.list_item = ListItem;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-63ddc79c.js');
|
|
6
|
-
|
|
7
|
-
const ptcBackToTopCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}:host .back-to-top-button{right:24px;width:64px;height:auto;border:1px solid var(--color-gray-10);border-radius:var(--ptc-border-radius-standard);background-color:var(--color-white);color:var(--color-gray-10);font-size:12px;font-weight:var(--ptc-font-weight-semibold);outline:none;cursor:pointer;transition:opacity 0.3s ease-in-out;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:var(--ptc-shadow-small);padding-top:4px;padding-bottom:4px;z-index:1050}:host .back-to-top-button:hover{opacity:1}:host .back-to-top-button:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .back-to-top-button-fixed{position:fixed;bottom:140px}:host .back-to-top-button-absolute{position:absolute;bottom:150px}:host .arrow{margin-bottom:5px}";
|
|
8
|
-
|
|
9
|
-
const PtcBackToTop = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.handleScroll = () => {
|
|
13
|
-
const scrollY = window.pageYOffset || document.documentElement.scrollTop;
|
|
14
|
-
const containerHeight = document.querySelector(".ptc-container-relative");
|
|
15
|
-
this.showButton = scrollY > window.innerHeight * 1;
|
|
16
|
-
if (containerHeight) {
|
|
17
|
-
if (this.showButton &&
|
|
18
|
-
scrollY <= containerHeight.clientHeight - window.innerHeight) {
|
|
19
|
-
const btnelement = this.el.shadowRoot.querySelector(".back-to-top-button");
|
|
20
|
-
if (btnelement) {
|
|
21
|
-
if (!btnelement.classList.contains("back-to-top-button-fixed")) {
|
|
22
|
-
btnelement.classList.add("back-to-top-button-fixed");
|
|
23
|
-
}
|
|
24
|
-
if (btnelement.classList.contains("back-to-top-button-absolute")) {
|
|
25
|
-
btnelement.classList.remove("back-to-top-button-absolute");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
else if (this.showButton &&
|
|
30
|
-
scrollY > containerHeight.clientHeight - window.innerHeight) {
|
|
31
|
-
const btnelement = this.el.shadowRoot.querySelector(".back-to-top-button");
|
|
32
|
-
if (btnelement) {
|
|
33
|
-
if (btnelement.classList.contains("back-to-top-button-fixed")) {
|
|
34
|
-
btnelement.classList.remove("back-to-top-button-fixed");
|
|
35
|
-
}
|
|
36
|
-
if (!btnelement.classList.contains("back-to-top-button-absolute")) {
|
|
37
|
-
btnelement.classList.add("back-to-top-button-absolute");
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
if (this.showButton) {
|
|
44
|
-
const btnelement = this.el.shadowRoot.querySelector(".back-to-top-button");
|
|
45
|
-
if (btnelement) {
|
|
46
|
-
if (!btnelement.classList.contains("back-to-top-button-fixed")) {
|
|
47
|
-
btnelement.classList.add("back-to-top-button-fixed");
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
this.showButton = false;
|
|
54
|
-
this.backToTop = "Back to Top";
|
|
55
|
-
}
|
|
56
|
-
componentDidLoad() {
|
|
57
|
-
window.addEventListener("scroll", this.handleScroll);
|
|
58
|
-
}
|
|
59
|
-
disconnectedCallback() {
|
|
60
|
-
window.removeEventListener("scroll", this.handleScroll);
|
|
61
|
-
}
|
|
62
|
-
handleClick() {
|
|
63
|
-
this.scrollToTop();
|
|
64
|
-
}
|
|
65
|
-
scrollToTop() {
|
|
66
|
-
if ("scrollBehavior" in document.documentElement.style) {
|
|
67
|
-
// Smooth scrolling is supported
|
|
68
|
-
window.scrollTo({
|
|
69
|
-
top: 0,
|
|
70
|
-
behavior: "smooth",
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
// Fallback for browsers that do not support smooth scrolling
|
|
75
|
-
window.scrollTo(0, 0);
|
|
76
|
-
}
|
|
77
|
-
// Focus the first focusable element after a short delay to ensure scroll completes
|
|
78
|
-
setTimeout(() => {
|
|
79
|
-
const focusableSelector = [
|
|
80
|
-
"a[href]",
|
|
81
|
-
"button:not([disabled])",
|
|
82
|
-
"textarea:not([disabled])",
|
|
83
|
-
'input:not([type="hidden"]):not([disabled])',
|
|
84
|
-
"select:not([disabled])",
|
|
85
|
-
'[tabindex]:not([tabindex="-1"])',
|
|
86
|
-
].join(",");
|
|
87
|
-
const focusableElements = document.querySelectorAll(focusableSelector);
|
|
88
|
-
if (focusableElements.length > 0) {
|
|
89
|
-
focusableElements[1].focus();
|
|
90
|
-
}
|
|
91
|
-
}, 300);
|
|
92
|
-
}
|
|
93
|
-
render() {
|
|
94
|
-
return (index.h(index.Host, null, this.showButton && (index.h("button", { class: "back-to-top-button hyphenate-text", title: this.backToTop }, index.h("span", { class: "arrow" }, index.h("svg", { width: "18", height: "12", viewBox: "0 0 18 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M15.5248 11.625L8.9998 5.1L2.4748 11.625L0.112305 9.2625L8.9998 0.375L17.8873 9.2625L15.5248 11.625Z", fill: "#323B42" }))), index.h("span", { class: "text" }, this.backToTop)))));
|
|
95
|
-
}
|
|
96
|
-
get el() { return index.getElement(this); }
|
|
97
|
-
};
|
|
98
|
-
PtcBackToTop.style = ptcBackToTopCss;
|
|
99
|
-
|
|
100
|
-
exports.ptc_back_to_top = PtcBackToTop;
|