@ptcwebops/ptcw-design 0.6.1 → 0.6.3

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.
Files changed (85) hide show
  1. package/dist/cjs/list-item.cjs.entry.js +1 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/my-component.cjs.entry.js +2 -5
  4. package/dist/cjs/ptc-card_6.cjs.entry.js +488 -0
  5. package/dist/cjs/ptc-checkbox.cjs.entry.js +1 -1
  6. package/dist/cjs/ptc-collapse-list.cjs.entry.js +202 -0
  7. package/dist/cjs/ptc-list.cjs.entry.js +30 -3
  8. package/dist/cjs/ptc-overlay.cjs.entry.js +31 -0
  9. package/dist/cjs/ptc-picture.cjs.entry.js +1 -1
  10. package/dist/cjs/ptc-title.cjs.entry.js +1 -1
  11. package/dist/cjs/ptcw-design.cjs.js +1 -1
  12. package/dist/cjs/utils-1c17977e.js +71 -0
  13. package/dist/collection/collection-manifest.json +1 -0
  14. package/dist/collection/components/icon-asset/media/designer.svg +28 -18
  15. package/dist/collection/components/list-item/list-item.js +1 -0
  16. package/dist/collection/components/ptc-card/ptc-card.css +128 -5
  17. package/dist/collection/components/ptc-card/ptc-card.js +4 -4
  18. package/dist/collection/components/ptc-checkbox/ptc-checkbox.js +1 -1
  19. package/dist/collection/components/ptc-collapse-list/ptc-collapse-list.css +121 -0
  20. package/dist/collection/components/ptc-collapse-list/ptc-collapse-list.js +288 -0
  21. package/dist/collection/components/ptc-list/ptc-list.js +31 -4
  22. package/dist/collection/components/ptc-para/ptc-para.css +4 -0
  23. package/dist/collection/components/ptc-para/ptc-para.js +13 -3
  24. package/dist/collection/components/ptc-picture/ptc-picture.css +3 -0
  25. package/dist/collection/components/ptc-title/ptc-title.css +1 -1
  26. package/dist/collection/utils/utils.js +62 -0
  27. package/dist/custom-elements/index.d.ts +6 -0
  28. package/dist/custom-elements/index.js +311 -14
  29. package/dist/esm/{interfaces-7c0243be.js → interfaces-4caedd26.js} +1 -1
  30. package/dist/esm/list-item.entry.js +1 -0
  31. package/dist/esm/loader.js +1 -1
  32. package/dist/esm/my-component.entry.js +1 -4
  33. package/dist/esm/ptc-card_6.entry.js +479 -0
  34. package/dist/esm/ptc-checkbox.entry.js +1 -1
  35. package/dist/esm/ptc-collapse-list.entry.js +198 -0
  36. package/dist/esm/ptc-list.entry.js +31 -4
  37. package/dist/esm/ptc-overlay.entry.js +27 -0
  38. package/dist/esm/ptc-picture.entry.js +2 -2
  39. package/dist/esm/ptc-title.entry.js +1 -1
  40. package/dist/esm/ptcw-design.js +1 -1
  41. package/dist/esm/utils-4b79ffaf.js +67 -0
  42. package/dist/ptcw-design/media/designer.svg +28 -18
  43. package/dist/ptcw-design/{p-009537ea.entry.js → p-02894b57.entry.js} +1 -1
  44. package/dist/ptcw-design/p-07c07cf9.entry.js +1 -0
  45. package/dist/ptcw-design/p-0da15d87.entry.js +1 -0
  46. package/dist/ptcw-design/p-3a972520.entry.js +1 -0
  47. package/dist/ptcw-design/p-48695e72.entry.js +1 -0
  48. package/dist/ptcw-design/p-62f4a655.js +1 -0
  49. package/dist/ptcw-design/{p-ee1183b2.js → p-711bcdad.js} +1 -1
  50. package/dist/ptcw-design/p-71cecd28.entry.js +1 -0
  51. package/dist/ptcw-design/{p-9b442487.entry.js → p-818df883.entry.js} +1 -1
  52. package/dist/ptcw-design/p-b146377a.entry.js +1 -0
  53. package/dist/ptcw-design/p-d8b48946.entry.js +1 -0
  54. package/dist/ptcw-design/ptcw-design.css +1 -1
  55. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  56. package/dist/types/components/ptc-card/ptc-card.d.ts +1 -1
  57. package/dist/types/components/ptc-collapse-list/ptc-collapse-list.d.ts +39 -0
  58. package/dist/types/components/ptc-list/ptc-list.d.ts +2 -0
  59. package/dist/types/components/ptc-para/ptc-para.d.ts +1 -0
  60. package/dist/types/components.d.ts +21 -2
  61. package/dist/types/utils/utils.d.ts +2 -0
  62. package/package.json +1 -1
  63. package/readme.md +1 -1
  64. package/dist/cjs/ptc-card.cjs.entry.js +0 -79
  65. package/dist/cjs/ptc-date.cjs.entry.js +0 -59
  66. package/dist/cjs/ptc-img_2.cjs.entry.js +0 -185
  67. package/dist/cjs/ptc-pagenation.cjs.entry.js +0 -115
  68. package/dist/cjs/ptc-para.cjs.entry.js +0 -50
  69. package/dist/cjs/ptc-spacer.cjs.entry.js +0 -46
  70. package/dist/esm/ptc-card.entry.js +0 -75
  71. package/dist/esm/ptc-date.entry.js +0 -55
  72. package/dist/esm/ptc-img_2.entry.js +0 -180
  73. package/dist/esm/ptc-pagenation.entry.js +0 -111
  74. package/dist/esm/ptc-para.entry.js +0 -46
  75. package/dist/esm/ptc-spacer.entry.js +0 -42
  76. package/dist/ptcw-design/p-4077cbdf.entry.js +0 -1
  77. package/dist/ptcw-design/p-51c39418.entry.js +0 -1
  78. package/dist/ptcw-design/p-64d01929.entry.js +0 -1
  79. package/dist/ptcw-design/p-679b99ad.entry.js +0 -1
  80. package/dist/ptcw-design/p-7bcc42e1.entry.js +0 -1
  81. package/dist/ptcw-design/p-8e27bb6d.entry.js +0 -1
  82. package/dist/ptcw-design/p-969c178b.entry.js +0 -1
  83. package/dist/ptcw-design/p-df80470b.entry.js +0 -1
  84. package/dist/ptcw-design/p-ec10f846.entry.js +0 -1
  85. package/dist/ptcw-design/p-fa53e5e5.entry.js +0 -1
@@ -1,4 +1,4 @@
1
- import { Component, h, Prop } from '@stencil/core';
1
+ import { Component, h, Host, Prop } from '@stencil/core';
2
2
  export class PtcPara {
3
3
  constructor() {
4
4
  /**
@@ -24,8 +24,10 @@ export class PtcPara {
24
24
  }
25
25
  render() {
26
26
  const classMap = this.getCssClassMap();
27
- return (h("p", { class: classMap, part: "part-para" },
28
- h("slot", null)));
27
+ const colorClass = this.addWhiteClass();
28
+ return (h(Host, { class: colorClass },
29
+ h("p", { class: classMap, part: "part-para" },
30
+ h("slot", null))));
29
31
  }
30
32
  getCssClassMap() {
31
33
  return {
@@ -37,6 +39,14 @@ export class PtcPara {
37
39
  [this.paraLineH]: true
38
40
  };
39
41
  }
42
+ //WEB-2392
43
+ addWhiteClass() {
44
+ if (this.paraColor == "white") {
45
+ return {
46
+ [this.paraColor]: true,
47
+ };
48
+ }
49
+ }
40
50
  static get is() { return "ptc-para"; }
41
51
  static get encapsulation() { return "shadow"; }
42
52
  static get originalStyleUrls() { return {
@@ -2,6 +2,9 @@
2
2
  display: block;
3
3
  overflow: hidden;
4
4
  }
5
+ :host img {
6
+ display: block;
7
+ }
5
8
 
6
9
  :host(.relative) {
7
10
  position: relative;
@@ -238,7 +238,7 @@ div.large h1, div.large h2, div.large h3, div.large h4, div.large h5, div.large
238
238
  div.x-large h1, div.x-large h2, div.x-large h3, div.x-large h4, div.x-large h5, div.x-large h6 {
239
239
  font-size: var(--ptc-font-size-x-large);
240
240
  }
241
- div.xx-large h1, div.xx-large h2, div.xx-large h3 {
241
+ div.xx-large h1, div.xx-large h2, div.xx-large h3, div.xx-large h4 {
242
242
  font-size: var(--ptc-font-size-xx-large);
243
243
  }
244
244
  div.xxx-large h1, div.xxx-large h2, div.xxx-large h3, div.xxx-large h4, div.xxx-large h5, div.xxx-large h6 {
@@ -1,3 +1,65 @@
1
1
  export function format(first, middle, last) {
2
2
  return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
3
3
  }
4
+ export function MapDOM(domElement, selector, toString) {
5
+ let element = selector ? domElement.querySelector(selector) : domElement;
6
+ let treeObject = {};
7
+ let translate = (name) => {
8
+ return name.toLowerCase().replace(/(-\w)/g, (text) => {
9
+ return text.replace(/-/, "").toUpperCase();
10
+ });
11
+ };
12
+ let hasContent = (element) => {
13
+ let result = true;
14
+ if (/^\s*$/.test(element.textContent)) {
15
+ result = false;
16
+ }
17
+ return result;
18
+ };
19
+ let treeHTML = (element, object) => {
20
+ //let nodeName = translate(element.nodeName);
21
+ let nodeList = element.childNodes;
22
+ if (nodeList && nodeList.length > 0) {
23
+ for (let i = 0; i < nodeList.length; i++) {
24
+ let elm = nodeList[i];
25
+ if (elm.nodeType == 1) {
26
+ let letChildNodeName = translate(elm.nodeName);
27
+ if (!object[letChildNodeName]) {
28
+ object[letChildNodeName] = [];
29
+ }
30
+ object[letChildNodeName].push({});
31
+ treeHTML(elm, object[letChildNodeName][object[letChildNodeName].length - 1]);
32
+ }
33
+ else if (elm.nodeType == 3 && hasContent(elm)) {
34
+ object['text'] = (object['text'] || '') + elm.textContent;
35
+ }
36
+ }
37
+ for (const property in object) {
38
+ if (Array.isArray(object[property]) &&
39
+ object[property].length == 1) {
40
+ object[property] = object[property][0];
41
+ }
42
+ }
43
+ }
44
+ if (element.attributes && element.attributes.length > 0) {
45
+ for (let i = 0; i < element.attributes.length; i++) {
46
+ let name = translate(element.attributes[i].nodeName);
47
+ object[name] = element.attributes[i].nodeValue;
48
+ }
49
+ }
50
+ if (element.getAttribute("html") == "true") {
51
+ object["html"] = element.innerHTML;
52
+ }
53
+ };
54
+ treeHTML(element, treeObject);
55
+ return (toString) ? JSON.stringify(treeObject) : treeObject;
56
+ }
57
+ export function generateUUID() {
58
+ let s4 = () => {
59
+ return Math.floor((1 + Math.random()) * 0x10000)
60
+ .toString(16)
61
+ .substring(1);
62
+ };
63
+ return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
64
+ s4() + '-' + s4() + s4() + s4();
65
+ }
@@ -86,6 +86,12 @@ export const PtcCheckbox: {
86
86
  new (): PtcCheckbox;
87
87
  };
88
88
 
89
+ interface PtcCollapseList extends Components.PtcCollapseList, HTMLElement {}
90
+ export const PtcCollapseList: {
91
+ prototype: PtcCollapseList;
92
+ new (): PtcCollapseList;
93
+ };
94
+
89
95
  interface PtcContainer extends Components.PtcContainer, HTMLElement {}
90
96
  export const PtcContainer: {
91
97
  prototype: PtcContainer;