@ukic/canary-web-components 2.0.0-canary.37 → 2.0.0-canary.38

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 (38) hide show
  1. package/dist/cjs/ic-data-table.cjs.entry.js +6 -2
  2. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  3. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  4. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ic-tree-item.cjs.entry.js +1 -1
  6. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
  7. package/dist/collection/components/ic-data-table/ic-data-table.js +6 -2
  8. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  9. package/dist/collection/components/ic-data-table/story-data.js +155 -0
  10. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  11. package/dist/collection/components/ic-tree-item/ic-tree-item.css +22 -3
  12. package/dist/components/ic-data-table.js +6 -2
  13. package/dist/components/ic-data-table.js.map +1 -1
  14. package/dist/components/ic-radio-option.js +1 -1
  15. package/dist/components/ic-radio-option.js.map +1 -1
  16. package/dist/components/ic-tree-item.js +1 -1
  17. package/dist/components/ic-tree-item.js.map +1 -1
  18. package/dist/core/core.esm.js +1 -1
  19. package/dist/core/{p-b4f824a6.entry.js → p-3ebd4703.entry.js} +2 -2
  20. package/dist/core/p-3ebd4703.entry.js.map +1 -0
  21. package/dist/core/p-bd0328f3.entry.js +2 -0
  22. package/dist/core/p-bd0328f3.entry.js.map +1 -0
  23. package/dist/core/p-cc0e0b46.entry.js +2 -0
  24. package/dist/core/p-cc0e0b46.entry.js.map +1 -0
  25. package/dist/esm/ic-data-table.entry.js +6 -2
  26. package/dist/esm/ic-data-table.entry.js.map +1 -1
  27. package/dist/esm/ic-radio-option.entry.js +1 -1
  28. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  29. package/dist/esm/ic-tree-item.entry.js +1 -1
  30. package/dist/esm/ic-tree-item.entry.js.map +1 -1
  31. package/dist/types/components/ic-data-table/story-data.d.ts +57 -0
  32. package/hydrate/index.js +8 -4
  33. package/package.json +3 -3
  34. package/dist/core/p-89112e37.entry.js +0 -2
  35. package/dist/core/p-89112e37.entry.js.map +0 -1
  36. package/dist/core/p-b4f824a6.entry.js.map +0 -1
  37. package/dist/core/p-fe105ed0.entry.js +0 -2
  38. package/dist/core/p-fe105ed0.entry.js.map +0 -1
@@ -829,6 +829,34 @@ export const COLS_ELEMENTS = [
829
829
  dataType: "address",
830
830
  },
831
831
  ];
832
+ export const COLS_ELEMENTS_SINGLE_ACTION = [
833
+ {
834
+ key: "actions",
835
+ title: "Actions",
836
+ dataType: "element",
837
+ columnAlignment: { horizontal: "center" },
838
+ },
839
+ {
840
+ key: "firstName",
841
+ title: "First name",
842
+ dataType: "string",
843
+ },
844
+ {
845
+ key: "age",
846
+ title: "Age",
847
+ dataType: "number",
848
+ },
849
+ {
850
+ key: "jobTitle",
851
+ title: "Job title",
852
+ dataType: "string",
853
+ },
854
+ {
855
+ key: "address",
856
+ title: "Address",
857
+ dataType: "address",
858
+ },
859
+ ];
832
860
  export const DATA_ELEMENTS = [
833
861
  {
834
862
  actions: `<ic-button variant='destructive' onClick='this.closest("tr").remove()'>Delete</ic-button>`,
@@ -879,6 +907,86 @@ export const DATA_ELEMENTS = [
879
907
  address: "5 New Street, Town, Country, Postcode",
880
908
  },
881
909
  ];
910
+ export const DATA_ELEMENTS_PAGINATION = [
911
+ {
912
+ actions: `<ic-button onClick='console.log("1")'>1</ic-button>`,
913
+ firstName: {
914
+ data: "Joe",
915
+ href: "https://www.example.com",
916
+ target: "_blank",
917
+ rel: "noopener noreferrer",
918
+ },
919
+ age: 30,
920
+ jobTitle: "Developer",
921
+ address: "1 Main Street, Town, County, Postcode",
922
+ },
923
+ {
924
+ actions: `<ic-button onClick='console.log("2")'>2</ic-button>`,
925
+ firstName: {
926
+ data: "Sarah",
927
+ href: "https://www.example.org",
928
+ },
929
+ age: 28,
930
+ jobTitle: "Senior Software Developer, Site Reliability Engineering",
931
+ address: "2 Main Street, Town, Country, Postcode",
932
+ },
933
+ {
934
+ actions: `<ic-button onClick='console.log("3")'>3</ic-button>`,
935
+ firstName: "Mark",
936
+ age: 45,
937
+ jobTitle: "Team Lead",
938
+ address: "12 Key Street, Town, Country, Postcode",
939
+ },
940
+ {
941
+ actions: `<ic-button onClick='console.log("4")'>4</ic-button>`,
942
+ firstName: "Naomi",
943
+ age: 32,
944
+ jobTitle: "Analyst",
945
+ address: "8 Side Street, Town, Country, Postcode",
946
+ },
947
+ {
948
+ actions: `<ic-button onClick='console.log("5")'>5</ic-button>`,
949
+ firstName: "Luke",
950
+ age: 18,
951
+ jobTitle: "Junior Developer",
952
+ address: "5 New Street, Town, Country, Postcode",
953
+ },
954
+ {
955
+ actions: `<ic-button onClick='console.log("6")'>6</ic-button>`,
956
+ firstName: "Dave",
957
+ age: 33,
958
+ jobTitle: "Analyst",
959
+ address: "4 Extra Street, Town, County, Postcode",
960
+ },
961
+ {
962
+ actions: `<ic-button onClick='console.log("7")'>7</ic-button>`,
963
+ firstName: "Amy",
964
+ age: 27,
965
+ jobTitle: "Analyst",
966
+ address: "3 Main Street, Town, Country, Postcode",
967
+ },
968
+ {
969
+ actions: `<ic-button onClick='console.log("8")'>8</ic-button>`,
970
+ firstName: "Mary",
971
+ age: 31,
972
+ jobTitle: "Developer",
973
+ address: "8 Main Street, Town, County, Postcode",
974
+ },
975
+ {
976
+ actions: `<ic-button onClick='console.log("9")'>9</ic-button>`,
977
+ firstName: "Alice",
978
+ age: 38,
979
+ jobTitle: "Team Lead",
980
+ address: "10 High Street, Town, Country, Postcode",
981
+ },
982
+ {
983
+ actions: `<ic-button onClick='console.log("10")'>10</ic-button>`,
984
+ firstName: "Ben",
985
+ age: 40,
986
+ jobTitle: "Team Lead",
987
+ address: "14 High Street, Town, Country, Postcode",
988
+ },
989
+ ];
882
990
  export const DATA_REACT_ELEMENTS = [
883
991
  {
884
992
  firstName: {
@@ -919,6 +1027,39 @@ export const DATA_REACT_ELEMENTS = [
919
1027
  address: "5 New Street, Town, Country, Postcode",
920
1028
  },
921
1029
  ];
1030
+ export const DATA_REACT_ELEMENTS_PAGINATION = [
1031
+ ...DATA_REACT_ELEMENTS,
1032
+ {
1033
+ firstName: "Dave",
1034
+ age: 33,
1035
+ jobTitle: "Analyst",
1036
+ address: "4 Extra Street, Town, County, Postcode",
1037
+ },
1038
+ {
1039
+ firstName: "Amy",
1040
+ age: 27,
1041
+ jobTitle: "Analyst",
1042
+ address: "3 Main Street, Town, Country, Postcode",
1043
+ },
1044
+ {
1045
+ firstName: "Mary",
1046
+ age: 31,
1047
+ jobTitle: "Developer",
1048
+ address: "8 Main Street, Town, County, Postcode",
1049
+ },
1050
+ {
1051
+ firstName: "Alice",
1052
+ age: 38,
1053
+ jobTitle: "Team Lead",
1054
+ address: "10 High Street, Town, Country, Postcode",
1055
+ },
1056
+ {
1057
+ firstName: "Ben",
1058
+ age: 40,
1059
+ jobTitle: "Team Lead",
1060
+ address: "14 High Street, Town, Country, Postcode",
1061
+ },
1062
+ ];
922
1063
  export const DATA_REACT_ELEMENTS_WITH_ICONS = [
923
1064
  {
924
1065
  firstName: {
@@ -1328,6 +1469,20 @@ export const ColumnOverrides = () => createDataTableElement("Column Overrides",
1328
1469
  export const RowOverrides = () => createDataTableElement("Row Overrides", ROW_HEADER_COLS, ROW_ALIGNMENT);
1329
1470
  export const CellOverrides = () => createDataTableElement("Cell Overrides", COLS, DATA_CELL_ALIGNMENT);
1330
1471
  export const LinksHTMLElements = () => createDataTableElement("Links and HTML Elements Overrides", COLS_ELEMENTS, DATA_ELEMENTS);
1472
+ export const SlottedElementsWithPagination = () => {
1473
+ const dataTable = createDataTableElement("Slotted elements with pagination", COLS_ELEMENTS_SINGLE_ACTION, DATA_ELEMENTS_PAGINATION);
1474
+ dataTable.setAttribute("show-pagination", "true");
1475
+ dataTable.paginationBarOptions = {
1476
+ itemsPerPageOptions: [
1477
+ { label: "5", value: "5" },
1478
+ { label: "10", value: "10" },
1479
+ ],
1480
+ showItemsPerPageControl: true,
1481
+ showGoToPageControl: true,
1482
+ selectedItemsPerPage: 5,
1483
+ };
1484
+ return dataTable;
1485
+ };
1331
1486
  export const Empty = () => createDataTableElement("Empty State", COLS, null);
1332
1487
  export const EmptySlotted = () => {
1333
1488
  const dataTable = createDataTableElement("Empty State", COLS, null);