@infineon/infineon-design-system-stencil 32.0.0--canary.1697.956f8b43f677df8debb18c1468456d6bd06dbccb.0 → 32.0.0--canary.1697.7392dd8955b19e94f9c34f956c5dcdbf9c551369.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.
@@ -1,3 +1,4 @@
1
+ import { action } from "@storybook/addon-actions";
1
2
  export default {
2
3
  title: 'Components/Pagination',
3
4
  // tags: ['autodocs'],
@@ -31,6 +32,15 @@ export default {
31
32
  },
32
33
  },
33
34
  },
35
+ itemsPerPage: {
36
+ description: 'Stringified array of objects setting up the items per page.',
37
+ table: {
38
+ category: 'Ifx-pagination props',
39
+ type: {
40
+ summary: 'string',
41
+ },
42
+ },
43
+ },
34
44
  ifxPageChange: {
35
45
  action: 'ifxPageChange',
36
46
  description: 'Custom event emitted when page is changed.',
@@ -44,15 +54,14 @@ export default {
44
54
  },
45
55
  },
46
56
  };
47
- const DefaultTemplate = args => `<ifx-pagination total="${args.total}" current-page="${args.currentPage}" items-per-page='${args.itemsPerPage}'></ifx-pagination>`;
48
- // const DefaultTemplate = args => {
49
- // const element = document.createElement('ifx-pagination');
50
- // element.setAttribute('total', args.total);
51
- // element.setAttribute('current-page', args.currentPage);
52
- // element.setAttribute('items-per-page', args.itemsPerPage);
53
- // element.addEventListener('ifxPageChange', action('ifxPageChange'));
54
- // return element;
55
- // };
57
+ const DefaultTemplate = args => {
58
+ const element = `<ifx-pagination total="${args.total}" current-page="${args.currentPage}" items-per-page='${args.itemsPerPage}'></ifx-pagination>`;
59
+ setTimeout(() => {
60
+ var _a;
61
+ (_a = document.querySelector('ifx-pagination')) === null || _a === void 0 ? void 0 : _a.addEventListener('ifxPageChange', action('ifxPageChange'));
62
+ }, 0);
63
+ return element;
64
+ };
56
65
  export const Default = DefaultTemplate.bind({});
57
66
  Default.argTypes = {};
58
67
  //# sourceMappingURL=pagination.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.stories.js","sourceRoot":"","sources":["../../../src/components/pagination/pagination.stories.ts"],"names":[],"mappings":"AACA,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,sBAAsB;IAEtB,IAAI,EAAE;QACJ,KAAK,EAAE,EAAE;QACT,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,oGAAoG;KACnH;IACD,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,WAAW,EAAE,sBAAsB;YACnC,KAAK,EAAE;gBACL,QAAQ,EAAE,sBAAsB;gBAChC,YAAY,EAAE;oBACZ,SAAS,EAAE,GAAG;iBACf;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;QAED,KAAK,EAAE;YACL,WAAW,EAAE,wBAAwB;YACrC,KAAK,EAAE;gBACL,QAAQ,EAAE,sBAAsB;gBAChC,YAAY,EAAE;oBACZ,SAAS,EAAE,GAAG;iBACf;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;iBAClB;aACF;SACF;QAED,aAAa,EAAE;YACb,MAAM,EAAE,eAAe;YACvB,WAAW,EAAE,4CAA4C;YACzD,KAAK,EAAE;gBACL,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE;oBACJ,OAAO,EAAE,uBAAuB;oBAChC,MAAM,EACJ,kNAAkN;iBACrN;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAC7B,0BAA0B,IAAI,CAAC,KAAK,mBAAmB,IAAI,CAAC,WAAW,qBAAqB,IAAI,CAAC,YAAY,qBAAqB,CAAA;AAEpI,oCAAoC;AACpC,8DAA8D;AAC9D,+CAA+C;AAC/C,4DAA4D;AAC5D,+DAA+D;AAC/D,wEAAwE;AACxE,oBAAoB;AACpB,KAAK;AAEL,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC","sourcesContent":["\nexport default {\n title: 'Components/Pagination',\n // tags: ['autodocs'],\n\n args: {\n total: 50,\n currentPage: 1,\n itemsPerPage: '[{\"label\":\"10\",\"selected\":true}, {\"label\":\"20\",\"selected\":false}, {\"label\":\"30\",\"selected\":false}]'\n },\n argTypes: {\n currentPage: {\n description: 'Current page number.',\n table: {\n category: 'Ifx-pagination props',\n defaultValue: {\n 'summary': '0'\n },\n type: {\n summary: 'number',\n },\n },\n },\n\n total: {\n description: 'Total number of items.',\n table: {\n category: 'Ifx-pagination props',\n defaultValue: {\n 'summary': '1'\n },\n type: {\n summary: 'number',\n },\n },\n },\n\n ifxPageChange: {\n action: 'ifxPageChange',\n description: 'Custom event emitted when page is changed.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxPageChange={handlePageChange}\\nVue:@ifxPageChange=\"handlePageChange\"\\nAngular:(ifxPageChange)=\"handlePageChange()\"\\nVanillaJs:.addEventListener(\"ifxPageChange\", (event) => {//handle page change});',\n },\n },\n },\n },\n};\n\nconst DefaultTemplate = args => \n `<ifx-pagination total=\"${args.total}\" current-page=\"${args.currentPage}\" items-per-page='${args.itemsPerPage}'></ifx-pagination>`\n\n// const DefaultTemplate = args => {\n// const element = document.createElement('ifx-pagination');\n// element.setAttribute('total', args.total);\n// element.setAttribute('current-page', args.currentPage);\n// element.setAttribute('items-per-page', args.itemsPerPage);\n// element.addEventListener('ifxPageChange', action('ifxPageChange'));\n// return element;\n// };\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argTypes = {};\n"]}
1
+ {"version":3,"file":"pagination.stories.js","sourceRoot":"","sources":["../../../src/components/pagination/pagination.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,sBAAsB;IAEtB,IAAI,EAAE;QACJ,KAAK,EAAE,EAAE;QACT,WAAW,EAAE,CAAC;QACd,YAA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AAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChD,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\n\nexport default {\n title: 'Components/Pagination',\n // tags: ['autodocs'],\n\n args: {\n total: 50,\n currentPage: 1,\n itemsPerPage: '[{\"label\":\"10\",\"selected\":true}, {\"label\":\"20\",\"selected\":false}, {\"label\":\"30\",\"selected\":false}]'\n },\n argTypes: {\n currentPage: {\n description: 'Current page number.',\n table: {\n category: 'Ifx-pagination props',\n defaultValue: {\n 'summary': '0'\n },\n type: {\n summary: 'number',\n },\n },\n },\n\n total: {\n description: 'Total number of items.',\n table: {\n category: 'Ifx-pagination props',\n defaultValue: {\n 'summary': '1'\n },\n type: {\n summary: 'number',\n },\n },\n },\n itemsPerPage: {\n description: 'Stringified array of objects setting up the items per page.',\n table: {\n category: 'Ifx-pagination props',\n type: {\n summary: 'string',\n },\n },\n },\n\n ifxPageChange: {\n action: 'ifxPageChange',\n description: 'Custom event emitted when page is changed.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxPageChange={handlePageChange}\\nVue:@ifxPageChange=\"handlePageChange\"\\nAngular:(ifxPageChange)=\"handlePageChange()\"\\nVanillaJs:.addEventListener(\"ifxPageChange\", (event) => {//handle page change});',\n },\n },\n },\n },\n};\n\n\nconst DefaultTemplate = args => {\n const element = `<ifx-pagination total=\"${args.total}\" current-page=\"${args.currentPage}\" items-per-page='${args.itemsPerPage}'></ifx-pagination>`\n setTimeout(() => {\n document.querySelector('ifx-pagination')?.addEventListener('ifxPageChange', action('ifxPageChange'));\n }, 0);\n return element;\n};\n\nexport const Default = DefaultTemplate.bind({});\nDefault.argTypes = {};\n"]}
@@ -30,6 +30,15 @@ declare const _default: {
30
30
  };
31
31
  };
32
32
  };
33
+ itemsPerPage: {
34
+ description: string;
35
+ table: {
36
+ category: string;
37
+ type: {
38
+ summary: string;
39
+ };
40
+ };
41
+ };
33
42
  ifxPageChange: {
34
43
  action: string;
35
44
  description: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infineon/infineon-design-system-stencil",
3
- "version": "32.0.0--canary.1697.956f8b43f677df8debb18c1468456d6bd06dbccb.0",
3
+ "version": "32.0.0--canary.1697.7392dd8955b19e94f9c34f956c5dcdbf9c551369.0",
4
4
  "private": false,
5
5
  "description": "Infineon design system Stencil web components",
6
6
  "homepage": "https://infineon.github.io/infineon-design-system-stencil",