@sphereon/ui-components.ssi-react 0.4.1-unstable.151 → 0.4.1-unstable.158

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.
@@ -5,6 +5,6 @@ const ContactIcon = (props) => {
5
5
  const iconAspectRatio = 1;
6
6
  const height = size / 16;
7
7
  const width = iconAspectRatio * height;
8
- return (_jsx("div", { style: { ...style, width: `${width}rem`, height: `${height}rem`, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M8 9.54004C9.26746 9.54004 11.1996 9.86248 12.8008 10.5039C13.6006 10.8243 14.2839 11.2113 14.7588 11.6494C15.23 12.0844 15.46 12.5334 15.46 13V15.46H0.540039V13C0.540039 12.5334 0.769958 12.0844 1.24121 11.6494C1.71605 11.2113 2.39941 10.8243 3.19922 10.5039C4.80039 9.86248 6.73254 9.54004 8 9.54004ZM8 0.540039C9.91161 0.540039 11.46 2.08839 11.46 4C11.46 5.91161 9.91161 7.45996 8 7.45996C6.08839 7.45996 4.54004 5.91161 4.54004 4C4.54004 2.08839 6.08839 0.540039 8 0.540039Z", stroke: parseColor(color), "stroke-width": "1.08056" }) }) }));
8
+ return (_jsx("div", { style: { ...style, width: `${width}rem`, height: `${height}rem`, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M8 9.54004C9.26746 9.54004 11.1996 9.86248 12.8008 10.5039C13.6006 10.8243 14.2839 11.2113 14.7588 11.6494C15.23 12.0844 15.46 12.5334 15.46 13V15.46H0.540039V13C0.540039 12.5334 0.769958 12.0844 1.24121 11.6494C1.71605 11.2113 2.39941 10.8243 3.19922 10.5039C4.80039 9.86248 6.73254 9.54004 8 9.54004ZM8 0.540039C9.91161 0.540039 11.46 2.08839 11.46 4C11.46 5.91161 9.91161 7.45996 8 7.45996C6.08839 7.45996 4.54004 5.91161 4.54004 4C4.54004 2.08839 6.08839 0.540039 8 0.540039Z", stroke: parseColor(color), strokeWidth: "1.08056" }) }) }));
9
9
  };
10
10
  export default ContactIcon;
@@ -5,6 +5,6 @@ const ManagementIcon = (props) => {
5
5
  const iconAspectRatio = 1;
6
6
  const height = size / 16;
7
7
  const width = iconAspectRatio * height;
8
- return (_jsx("div", { style: { ...style, width: `${width}rem`, height: `${height}rem`, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("svg", { width: "26", height: "26", viewBox: "0 0 26 26", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M19.8408 1.37402C20.1344 0.808372 20.9495 0.808474 21.2432 1.37402L21.2441 1.37598L21.2705 1.43066V1.43262C21.8097 2.69772 22.733 3.7619 23.9082 4.46973L24.6455 4.91309L24.6465 4.91406L24.6934 4.94434L24.6953 4.94531C25.1681 5.27543 25.1679 5.98407 24.6953 6.31543L24.6943 6.31641L24.667 6.27441L24.6934 6.31641L24.6465 6.3457L24.6455 6.34668L23.9082 6.79102C23.5166 7.02786 23.1521 7.30304 22.8213 7.6123C22.8965 7.98655 22.9375 8.37475 22.9375 8.77148V19.2412C22.9375 22.4489 20.3481 25.0498 17.1543 25.0498H6.73242C3.53882 25.0498 0.950195 22.4491 0.950195 19.2412V8.77148C0.950195 5.56378 3.53865 2.96193 6.73242 2.96191H17.1543C17.6944 2.96191 18.2185 3.03746 18.7148 3.17676C19.1674 2.66002 19.5408 2.07268 19.8135 1.43262L19.8145 1.43066L19.8408 1.37598V1.37402ZM6.73242 4.10938C4.17047 4.10939 2.09302 6.19646 2.09277 8.77051V19.2412C2.09283 21.8156 4.17052 23.9023 6.73242 23.9023H17.1543C19.7164 23.9023 21.7949 21.8154 21.7949 19.2412V8.84082C21.6165 9.11728 21.4575 9.40719 21.3223 9.70898L21.2705 9.82715L21.2695 9.8291L21.2432 9.88379V9.88574C20.959 10.4343 20.1848 10.4515 19.8701 9.9375L19.8135 9.82715L19.7617 9.70898L19.6582 9.49121C19.1248 8.41223 18.3035 7.5001 17.2842 6.8584L17.1748 6.79004V6.78906L16.4385 6.34668C15.8994 6.0223 15.8994 5.23744 16.4385 4.91309L17.1758 4.46973C17.3443 4.36748 17.5067 4.25578 17.665 4.13965C17.4973 4.12128 17.3265 4.10938 17.1543 4.10938H6.73242ZM11.1621 7.15039C11.7658 7.15039 12.2549 7.64216 12.2549 8.24805V12.959C12.2549 13.5649 11.7658 14.0557 11.1621 14.0557H9.67676C9.70003 14.0857 9.72244 14.1174 9.74316 14.1514L12.3496 18.3408C12.2231 17.9662 12.1543 17.5649 12.1543 17.1475C12.1543 15.0965 13.8104 13.4326 15.8525 13.4326C17.8943 13.4329 19.5498 15.0967 19.5498 17.1475C19.5498 19.1982 17.8944 20.862 15.8525 20.8623C14.6266 20.8623 13.54 20.2619 12.8672 19.3389C12.9628 19.9682 12.4863 20.5995 11.7852 20.5996H5.84961C4.99076 20.5996 4.4681 19.6523 4.92188 18.9219L7.8916 14.1514V14.1504L7.93066 14.0898L7.93262 14.0879C7.94077 14.0767 7.95042 14.0666 7.95898 14.0557H6.47168C5.86821 14.0554 5.37988 13.5647 5.37988 12.959V8.24805C5.37988 7.64231 5.86821 7.15063 6.47168 7.15039H11.1621ZM15.8525 14.5801C14.4408 14.5801 13.2969 15.73 13.2969 17.1475C13.297 18.5661 14.4409 19.7148 15.8525 19.7148C17.264 19.7146 18.4071 18.566 18.4072 17.1475C18.4072 15.7301 17.2641 14.5803 15.8525 14.5801ZM5.93945 19.4531H11.6943L8.81641 14.8262L5.93945 19.4531ZM6.52246 12.9092H11.1123V8.29785H6.52246V12.9092ZM20.542 2.5459C19.8909 3.74179 18.9345 4.74838 17.7637 5.45312L17.4688 5.62988L17.7637 5.80762C18.9342 6.51228 19.8909 7.51818 20.542 8.71387C21.1931 7.51801 22.1505 6.51234 23.3213 5.80762L23.6152 5.62988L23.3213 5.45312C22.1503 4.74832 21.1932 3.74202 20.542 2.5459Z", fill: parseColor(color), stroke: parseColor(color), "stroke-width": "0.1" }) }) }) }));
8
+ return (_jsx("div", { style: { ...style, width: `${width}rem`, height: `${height}rem`, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("svg", { width: "26", height: "26", viewBox: "0 0 26 26", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M19.8408 1.37402C20.1344 0.808372 20.9495 0.808474 21.2432 1.37402L21.2441 1.37598L21.2705 1.43066V1.43262C21.8097 2.69772 22.733 3.7619 23.9082 4.46973L24.6455 4.91309L24.6465 4.91406L24.6934 4.94434L24.6953 4.94531C25.1681 5.27543 25.1679 5.98407 24.6953 6.31543L24.6943 6.31641L24.667 6.27441L24.6934 6.31641L24.6465 6.3457L24.6455 6.34668L23.9082 6.79102C23.5166 7.02786 23.1521 7.30304 22.8213 7.6123C22.8965 7.98655 22.9375 8.37475 22.9375 8.77148V19.2412C22.9375 22.4489 20.3481 25.0498 17.1543 25.0498H6.73242C3.53882 25.0498 0.950195 22.4491 0.950195 19.2412V8.77148C0.950195 5.56378 3.53865 2.96193 6.73242 2.96191H17.1543C17.6944 2.96191 18.2185 3.03746 18.7148 3.17676C19.1674 2.66002 19.5408 2.07268 19.8135 1.43262L19.8145 1.43066L19.8408 1.37598V1.37402ZM6.73242 4.10938C4.17047 4.10939 2.09302 6.19646 2.09277 8.77051V19.2412C2.09283 21.8156 4.17052 23.9023 6.73242 23.9023H17.1543C19.7164 23.9023 21.7949 21.8154 21.7949 19.2412V8.84082C21.6165 9.11728 21.4575 9.40719 21.3223 9.70898L21.2705 9.82715L21.2695 9.8291L21.2432 9.88379V9.88574C20.959 10.4343 20.1848 10.4515 19.8701 9.9375L19.8135 9.82715L19.7617 9.70898L19.6582 9.49121C19.1248 8.41223 18.3035 7.5001 17.2842 6.8584L17.1748 6.79004V6.78906L16.4385 6.34668C15.8994 6.0223 15.8994 5.23744 16.4385 4.91309L17.1758 4.46973C17.3443 4.36748 17.5067 4.25578 17.665 4.13965C17.4973 4.12128 17.3265 4.10938 17.1543 4.10938H6.73242ZM11.1621 7.15039C11.7658 7.15039 12.2549 7.64216 12.2549 8.24805V12.959C12.2549 13.5649 11.7658 14.0557 11.1621 14.0557H9.67676C9.70003 14.0857 9.72244 14.1174 9.74316 14.1514L12.3496 18.3408C12.2231 17.9662 12.1543 17.5649 12.1543 17.1475C12.1543 15.0965 13.8104 13.4326 15.8525 13.4326C17.8943 13.4329 19.5498 15.0967 19.5498 17.1475C19.5498 19.1982 17.8944 20.862 15.8525 20.8623C14.6266 20.8623 13.54 20.2619 12.8672 19.3389C12.9628 19.9682 12.4863 20.5995 11.7852 20.5996H5.84961C4.99076 20.5996 4.4681 19.6523 4.92188 18.9219L7.8916 14.1514V14.1504L7.93066 14.0898L7.93262 14.0879C7.94077 14.0767 7.95042 14.0666 7.95898 14.0557H6.47168C5.86821 14.0554 5.37988 13.5647 5.37988 12.959V8.24805C5.37988 7.64231 5.86821 7.15063 6.47168 7.15039H11.1621ZM15.8525 14.5801C14.4408 14.5801 13.2969 15.73 13.2969 17.1475C13.297 18.5661 14.4409 19.7148 15.8525 19.7148C17.264 19.7146 18.4071 18.566 18.4072 17.1475C18.4072 15.7301 17.2641 14.5803 15.8525 14.5801ZM5.93945 19.4531H11.6943L8.81641 14.8262L5.93945 19.4531ZM6.52246 12.9092H11.1123V8.29785H6.52246V12.9092ZM20.542 2.5459C19.8909 3.74179 18.9345 4.74838 17.7637 5.45312L17.4688 5.62988L17.7637 5.80762C18.9342 6.51228 19.8909 7.51818 20.542 8.71387C21.1931 7.51801 22.1505 6.51234 23.3213 5.80762L23.6152 5.62988L23.3213 5.45312C22.1503 4.74832 21.1932 3.74202 20.542 2.5459Z", fill: parseColor(color), stroke: parseColor(color), strokeWidth: "0.1" }) }) }) }));
9
9
  };
10
10
  export default ManagementIcon;
@@ -5,6 +5,6 @@ const UXIcon = (props) => {
5
5
  const iconAspectRatio = 1;
6
6
  const height = size / 16;
7
7
  const width = iconAspectRatio * height;
8
- return (_jsx("div", { style: { ...style, width: `${width}rem`, height: `${height}rem`, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 25 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M22.0664 0.100586C23.295 0.100586 24.2998 1.10542 24.2998 2.33398V22.0664C24.2998 23.295 23.295 24.2998 22.0664 24.2998H2.33398C1.10542 24.2998 0.100586 23.295 0.100586 22.0664V2.33398C0.100586 1.10542 1.10542 0.100586 2.33398 0.100586H22.0664ZM1.36719 22.0664C1.36719 22.5978 1.80255 23.0332 2.33398 23.0332H22.0664C22.5978 23.0332 23.0332 22.5978 23.0332 22.0664V5.63379H1.36719V22.0664ZM13 17.7002C13.3486 17.7002 13.6338 17.9854 13.6338 18.334V21C13.6338 21.3486 13.3486 21.6338 13 21.6338H3.40039C3.05183 21.6338 2.7666 21.3486 2.7666 21V18.334C2.7666 17.9854 3.05183 17.7002 3.40039 17.7002H13ZM21 7.0332C21.3486 7.0332 21.6338 7.31843 21.6338 7.66699V21C21.6338 21.3486 21.3486 21.6338 21 21.6338H15.667C15.3184 21.6338 15.0332 21.3486 15.0332 21V7.66699C15.0332 7.31843 15.3184 7.0332 15.667 7.0332H21ZM16.2998 20.3672H20.3672V8.2998H16.2998V20.3672ZM4.0332 20.3672H12.3672V18.9668H4.0332V20.3672ZM13 7.0332C13.3486 7.0332 13.6338 7.31843 13.6338 7.66699V15.667C13.6337 16.0155 13.3485 16.2998 13 16.2998H3.40039C3.05187 16.2998 2.76667 16.0155 2.7666 15.667V7.66699C2.7666 7.31843 3.05183 7.0332 3.40039 7.0332H13ZM4.0332 15.0332H12.3672V8.2998H4.0332V15.0332ZM2.33398 1.36719C1.80255 1.36719 1.36719 1.80255 1.36719 2.33398V4.36719H23.0332V2.33398C23.0332 1.80255 22.5978 1.36719 22.0664 1.36719H2.33398ZM2.86719 2.2334C3.03105 2.23348 3.2002 2.29604 3.31543 2.42773H3.31445C3.43651 2.55189 3.5 2.70832 3.5 2.86719C3.49991 3.02777 3.43528 3.18581 3.31055 3.31055C3.18581 3.43528 3.02777 3.49991 2.86719 3.5C2.7065 3.5 2.54767 3.43537 2.42285 3.31055C2.29822 3.18583 2.23349 3.0277 2.2334 2.86719C2.2334 2.7086 2.29633 2.55179 2.41797 2.42773L2.46387 2.38184C2.57579 2.28149 2.72363 2.2334 2.86719 2.2334ZM7.13379 2.2334C7.29767 2.23346 7.46678 2.29603 7.58203 2.42773H7.58105C7.70313 2.5519 7.7666 2.7083 7.7666 2.86719C7.76651 3.02777 7.70189 3.18581 7.57715 3.31055C7.4524 3.43528 7.29438 3.49993 7.13379 3.5C6.9731 3.5 6.81427 3.43537 6.68945 3.31055C6.56484 3.18584 6.50009 3.02768 6.5 2.86719C6.5 2.70861 6.56296 2.55178 6.68457 2.42773L6.73047 2.38184C6.84239 2.28147 6.99022 2.2334 7.13379 2.2334ZM4.89355 2.25977C5.0798 2.23415 5.28656 2.29606 5.43555 2.41504L5.44434 2.42285L5.52637 2.52246C5.59712 2.62722 5.63379 2.7467 5.63379 2.86719V2.97363C5.63377 2.99662 5.62814 3.01568 5.62402 3.02734C5.62081 3.03645 5.6148 3.04997 5.61328 3.05371C5.60881 3.06489 5.60646 3.07162 5.60645 3.08008C5.60645 3.12604 5.58462 3.16159 5.57031 3.18066C5.55537 3.20053 5.5364 3.21848 5.52441 3.23047C5.52369 3.23119 5.52325 3.23182 5.5166 3.24512C5.50992 3.25849 5.49657 3.28465 5.4707 3.31055C5.45868 3.32257 5.44004 3.34135 5.41992 3.35645C5.40701 3.36613 5.38629 3.37713 5.36035 3.38477C5.3451 3.39543 5.33366 3.40495 5.3252 3.40918C5.3119 3.41583 5.31127 3.41725 5.31055 3.41797C5.2502 3.478 5.17893 3.47365 5.13379 3.47363H4.91992C4.89701 3.47359 4.87785 3.46797 4.86621 3.46387C4.85693 3.46058 4.84325 3.4545 4.83984 3.45312C4.82861 3.44863 4.822 3.44727 4.81348 3.44727C4.76908 3.44725 4.73362 3.42494 4.71875 3.41602C4.69867 3.40397 4.68536 3.39515 4.66504 3.38477C4.63985 3.37706 4.61909 3.36593 4.60645 3.35645C4.5865 3.34141 4.5676 3.32248 4.55566 3.31055C4.4312 3.18587 4.36727 3.02758 4.36719 2.86719V2.75977C4.36726 2.73692 4.37286 2.71766 4.37695 2.70605C4.3803 2.69665 4.38644 2.68282 4.3877 2.67969C4.39214 2.66855 4.39355 2.6618 4.39355 2.65332C4.39362 2.60746 4.41638 2.57276 4.43066 2.55371C4.44575 2.53362 4.46456 2.51493 4.47656 2.50293C4.47724 2.5023 4.47833 2.50133 4.48438 2.48926C4.49105 2.47591 4.50342 2.44876 4.5293 2.42285C4.5413 2.41085 4.55999 2.39204 4.58008 2.37695C4.59198 2.36803 4.61071 2.35742 4.63379 2.34961C4.65287 2.3357 4.67099 2.32653 4.68652 2.32031C4.70734 2.31199 4.71915 2.30773 4.73926 2.29785C4.76298 2.28052 4.78698 2.27049 4.81055 2.26562L4.89355 2.25977Z", fill: color, stroke: color, "stroke-width": "0.171429" }) }) }));
8
+ return (_jsx("div", { style: { ...style, width: `${width}rem`, height: `${height}rem`, display: 'flex' }, children: _jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 25 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M22.0664 0.100586C23.295 0.100586 24.2998 1.10542 24.2998 2.33398V22.0664C24.2998 23.295 23.295 24.2998 22.0664 24.2998H2.33398C1.10542 24.2998 0.100586 23.295 0.100586 22.0664V2.33398C0.100586 1.10542 1.10542 0.100586 2.33398 0.100586H22.0664ZM1.36719 22.0664C1.36719 22.5978 1.80255 23.0332 2.33398 23.0332H22.0664C22.5978 23.0332 23.0332 22.5978 23.0332 22.0664V5.63379H1.36719V22.0664ZM13 17.7002C13.3486 17.7002 13.6338 17.9854 13.6338 18.334V21C13.6338 21.3486 13.3486 21.6338 13 21.6338H3.40039C3.05183 21.6338 2.7666 21.3486 2.7666 21V18.334C2.7666 17.9854 3.05183 17.7002 3.40039 17.7002H13ZM21 7.0332C21.3486 7.0332 21.6338 7.31843 21.6338 7.66699V21C21.6338 21.3486 21.3486 21.6338 21 21.6338H15.667C15.3184 21.6338 15.0332 21.3486 15.0332 21V7.66699C15.0332 7.31843 15.3184 7.0332 15.667 7.0332H21ZM16.2998 20.3672H20.3672V8.2998H16.2998V20.3672ZM4.0332 20.3672H12.3672V18.9668H4.0332V20.3672ZM13 7.0332C13.3486 7.0332 13.6338 7.31843 13.6338 7.66699V15.667C13.6337 16.0155 13.3485 16.2998 13 16.2998H3.40039C3.05187 16.2998 2.76667 16.0155 2.7666 15.667V7.66699C2.7666 7.31843 3.05183 7.0332 3.40039 7.0332H13ZM4.0332 15.0332H12.3672V8.2998H4.0332V15.0332ZM2.33398 1.36719C1.80255 1.36719 1.36719 1.80255 1.36719 2.33398V4.36719H23.0332V2.33398C23.0332 1.80255 22.5978 1.36719 22.0664 1.36719H2.33398ZM2.86719 2.2334C3.03105 2.23348 3.2002 2.29604 3.31543 2.42773H3.31445C3.43651 2.55189 3.5 2.70832 3.5 2.86719C3.49991 3.02777 3.43528 3.18581 3.31055 3.31055C3.18581 3.43528 3.02777 3.49991 2.86719 3.5C2.7065 3.5 2.54767 3.43537 2.42285 3.31055C2.29822 3.18583 2.23349 3.0277 2.2334 2.86719C2.2334 2.7086 2.29633 2.55179 2.41797 2.42773L2.46387 2.38184C2.57579 2.28149 2.72363 2.2334 2.86719 2.2334ZM7.13379 2.2334C7.29767 2.23346 7.46678 2.29603 7.58203 2.42773H7.58105C7.70313 2.5519 7.7666 2.7083 7.7666 2.86719C7.76651 3.02777 7.70189 3.18581 7.57715 3.31055C7.4524 3.43528 7.29438 3.49993 7.13379 3.5C6.9731 3.5 6.81427 3.43537 6.68945 3.31055C6.56484 3.18584 6.50009 3.02768 6.5 2.86719C6.5 2.70861 6.56296 2.55178 6.68457 2.42773L6.73047 2.38184C6.84239 2.28147 6.99022 2.2334 7.13379 2.2334ZM4.89355 2.25977C5.0798 2.23415 5.28656 2.29606 5.43555 2.41504L5.44434 2.42285L5.52637 2.52246C5.59712 2.62722 5.63379 2.7467 5.63379 2.86719V2.97363C5.63377 2.99662 5.62814 3.01568 5.62402 3.02734C5.62081 3.03645 5.6148 3.04997 5.61328 3.05371C5.60881 3.06489 5.60646 3.07162 5.60645 3.08008C5.60645 3.12604 5.58462 3.16159 5.57031 3.18066C5.55537 3.20053 5.5364 3.21848 5.52441 3.23047C5.52369 3.23119 5.52325 3.23182 5.5166 3.24512C5.50992 3.25849 5.49657 3.28465 5.4707 3.31055C5.45868 3.32257 5.44004 3.34135 5.41992 3.35645C5.40701 3.36613 5.38629 3.37713 5.36035 3.38477C5.3451 3.39543 5.33366 3.40495 5.3252 3.40918C5.3119 3.41583 5.31127 3.41725 5.31055 3.41797C5.2502 3.478 5.17893 3.47365 5.13379 3.47363H4.91992C4.89701 3.47359 4.87785 3.46797 4.86621 3.46387C4.85693 3.46058 4.84325 3.4545 4.83984 3.45312C4.82861 3.44863 4.822 3.44727 4.81348 3.44727C4.76908 3.44725 4.73362 3.42494 4.71875 3.41602C4.69867 3.40397 4.68536 3.39515 4.66504 3.38477C4.63985 3.37706 4.61909 3.36593 4.60645 3.35645C4.5865 3.34141 4.5676 3.32248 4.55566 3.31055C4.4312 3.18587 4.36727 3.02758 4.36719 2.86719V2.75977C4.36726 2.73692 4.37286 2.71766 4.37695 2.70605C4.3803 2.69665 4.38644 2.68282 4.3877 2.67969C4.39214 2.66855 4.39355 2.6618 4.39355 2.65332C4.39362 2.60746 4.41638 2.57276 4.43066 2.55371C4.44575 2.53362 4.46456 2.51493 4.47656 2.50293C4.47724 2.5023 4.47833 2.50133 4.48438 2.48926C4.49105 2.47591 4.50342 2.44876 4.5293 2.42285C4.5413 2.41085 4.55999 2.39204 4.58008 2.37695C4.59198 2.36803 4.61071 2.35742 4.63379 2.34961C4.65287 2.3357 4.67099 2.32653 4.68652 2.32031C4.70734 2.31199 4.71915 2.30773 4.73926 2.29785C4.76298 2.28052 4.78698 2.27049 4.81055 2.26562L4.89355 2.25977Z", fill: color, stroke: color, strokeWidth: "0.171429" }) }) }));
9
9
  };
10
10
  export default UXIcon;
@@ -3,21 +3,21 @@ import { useEffect, useRef, useState } from 'react';
3
3
  import { JsonForms } from '@jsonforms/react';
4
4
  import { materialCells } from '@jsonforms/material-renderers';
5
5
  import Ajv from 'ajv';
6
- import addFormats from "ajv-formats";
6
+ import addFormats from 'ajv-formats';
7
7
  import { formatDate } from '../../../helpers';
8
8
  import { createFormViewAjv } from '../../../utils/Ajv';
9
9
  import { jsonFormsMaterialRenderers } from '../../../renders/jsonFormsRenders';
10
10
  const defaultAjv = new Ajv({ useDefaults: true });
11
11
  addFormats(defaultAjv);
12
12
  defaultAjv.addKeyword({
13
- keyword: 'isoDateFormat',
13
+ keyword: 'dateFormat',
14
14
  modifying: true,
15
- validate: (schema, data, parentSchema, dataCxt) => {
15
+ validate: (dateFormat, data, parentSchema, dataCxt) => {
16
16
  if (typeof data === 'string') {
17
17
  if (!dataCxt?.parentData || dataCxt.parentDataProperty === undefined) {
18
18
  return true;
19
19
  }
20
- const formatted = formatDate(data, schema);
20
+ const formatted = formatDate(data, dateFormat);
21
21
  if (formatted && formatted !== 'Invalid date') {
22
22
  dataCxt.parentData[dataCxt.parentDataProperty] = formatted;
23
23
  }
@@ -6,6 +6,7 @@ type Props<T> = {
6
6
  data: Array<T>;
7
7
  columns: Array<ColumnHeader<T>>;
8
8
  onRowClick?: (data: Row<T>) => Promise<void>;
9
+ onRowDoubleClick?: (data: Row<T>) => Promise<void>;
9
10
  onDelete?: (rows: Array<T>) => Promise<void>;
10
11
  enableRowSelection?: boolean;
11
12
  enableRowHover?: boolean;
@@ -64,7 +64,7 @@ const toRowSelectionObject = (rows) => {
64
64
  return rowSelectionObject;
65
65
  };
66
66
  const SSITableView = (props) => {
67
- const { columns, data, enableRowSelection = false, enableRowHover = true, enableFiltering = false, enableMostRecent = false, enableResultCount = false, columnResizeMode = 'onChange', actions = [], onRowClick, onDelete, pagination, } = props;
67
+ const { columns, data, enableRowSelection = false, enableRowHover = true, enableFiltering = false, enableMostRecent = false, enableResultCount = false, columnResizeMode = 'onChange', actions = [], onRowClick, onRowDoubleClick, onDelete, pagination, } = props;
68
68
  const [rowSelection, setRowSelection] = React.useState([]);
69
69
  const [focusedRowId, setFocusedRowId] = React.useState();
70
70
  const columnHelper = createColumnHelper();
@@ -125,6 +125,9 @@ const SSITableView = (props) => {
125
125
  const onRowClicked = async (row) => {
126
126
  await onRowClick?.(row);
127
127
  };
128
+ const onRowDoubleClicked = async (row) => {
129
+ await onRowDoubleClick?.(row);
130
+ };
128
131
  const onDeleteClicked = async () => {
129
132
  await onDelete?.(rowSelection.map((row) => row.rowData));
130
133
  };
@@ -139,7 +142,7 @@ const SSITableView = (props) => {
139
142
  transform: columnResizeMode === 'onEnd' && header.column.getIsResizing()
140
143
  ? `translateX(${table.getState().columnSizingInfo.deltaOffset}px)`
141
144
  : '',
142
- } })] }, header.id))) }, headerGroup.id))) }), _jsx("tbody", { children: table.getRowModel().rows.map((row) => (_jsx(RowContainer, { enableHover: enableRowHover, onClick: () => onRowClicked(row), onMouseEnter: () => onFocusRow(row.id), onMouseLeave: () => onFocusRow(), style: { ...(row.getIsSelected() && { backgroundColor: selectionElementColors.selectedRow }) }, children: row.getVisibleCells().map((cell) => (_jsx(CellContainer, { style: {
145
+ } })] }, header.id))) }, headerGroup.id))) }), _jsx("tbody", { children: table.getRowModel().rows.map((row) => (_jsx(RowContainer, { enableHover: enableRowHover, onClick: () => onRowClicked(row), onDoubleClick: () => onRowDoubleClicked(row), onMouseEnter: () => onFocusRow(row.id), onMouseLeave: () => onFocusRow(), style: { ...(row.getIsSelected() && { backgroundColor: selectionElementColors.selectedRow }) }, children: row.getVisibleCells().map((cell) => (_jsx(CellContainer, { style: {
143
146
  ...(cell.column.columnDef.minSize && { minWidth: cell.column.columnDef.minSize }),
144
147
  ...(cell.column.columnDef.maxSize && { maxWidth: cell.column.columnDef.maxSize }),
145
148
  ...(cell.column.columnDef.size !== 0 && { width: cell.column.columnDef.size }),
@@ -1,3 +1,2 @@
1
- export type DateFormat = 'date-time' | 'date' | 'time' | undefined;
2
- export declare const formatDate: (dateString?: string, format?: DateFormat) => string;
3
- export declare const formatDateToISO: (dateString?: string, format?: DateFormat) => string;
1
+ export type DateFormat = 'date-time' | 'date' | 'time' | 'iso-date-time' | 'iso-date' | 'iso-time' | undefined;
2
+ export declare const formatDate: (dateString?: string, format?: DateFormat | string) => string;
@@ -1,45 +1,86 @@
1
+ const KNOWN_FORMATS = new Set(['date-time', 'date', 'time', 'iso-date-time', 'iso-date', 'iso-time']);
2
+ const customFormatTokens = {
3
+ yyyy: (date) => date.getFullYear().toString().padStart(4, '0'),
4
+ yy: (date) => date.getFullYear().toString().slice(-2).padStart(2, '0'),
5
+ MM: (date) => (date.getMonth() + 1).toString().padStart(2, '0'),
6
+ M: (date) => (date.getMonth() + 1).toString(),
7
+ dd: (date) => date.getDate().toString().padStart(2, '0'),
8
+ d: (date) => date.getDate().toString(),
9
+ HH: (date) => date.getHours().toString().padStart(2, '0'),
10
+ H: (date) => date.getHours().toString(),
11
+ mm: (date) => date.getMinutes().toString().padStart(2, '0'),
12
+ m: (date) => date.getMinutes().toString(),
13
+ ss: (date) => date.getSeconds().toString().padStart(2, '0'),
14
+ s: (date) => date.getSeconds().toString(),
15
+ };
16
+ const orderedTokens = ['yyyy', 'yy', 'MM', 'dd', 'HH', 'mm', 'ss', 'M', 'd', 'H', 'm', 's'];
17
+ const applyCustomFormat = (date, format) => {
18
+ let result = '';
19
+ let i = 0;
20
+ while (i < format.length) {
21
+ const char = format[i];
22
+ if (char === '[') {
23
+ const closeIdx = format.indexOf(']', i + 1);
24
+ if (closeIdx !== -1) {
25
+ result += format.slice(i + 1, closeIdx);
26
+ i = closeIdx + 1;
27
+ continue;
28
+ }
29
+ }
30
+ const token = orderedTokens.find((t) => format.startsWith(t, i));
31
+ if (token) {
32
+ result += customFormatTokens[token](date);
33
+ i += token.length;
34
+ }
35
+ else {
36
+ result += char;
37
+ i += 1;
38
+ }
39
+ }
40
+ return result;
41
+ };
1
42
  export const formatDate = (dateString, format = 'date-time') => {
2
- const userDateTimeOpts = Intl.DateTimeFormat().resolvedOptions();
3
43
  if (!dateString) {
4
44
  return '';
5
45
  }
6
- const date = dateString === 'now' ? new Date() : new Date(dateString);
46
+ let dateToParse = dateString;
47
+ if (/^\d{4}-\d{2}-\d{2}$/.test(dateString)) {
48
+ dateToParse += 'T00:00:00';
49
+ }
50
+ const date = dateString === 'now' ? new Date() : new Date(dateToParse);
7
51
  if (isNaN(date.getTime())) {
8
52
  console.error('Invalid date:', dateString);
9
53
  return 'Invalid date';
10
54
  }
55
+ const effectiveFormat = format ?? 'date-time';
56
+ if (effectiveFormat === 'iso-date-time')
57
+ return applyCustomFormat(date, 'yyyy-MM-ddTHH:mm:ss');
58
+ if (effectiveFormat === 'iso-date')
59
+ return applyCustomFormat(date, 'yyyy-MM-dd');
60
+ if (effectiveFormat === 'iso-time')
61
+ return applyCustomFormat(date, 'HH:mm:ss');
62
+ if (!KNOWN_FORMATS.has(effectiveFormat)) {
63
+ return applyCustomFormat(date, effectiveFormat);
64
+ }
65
+ const userDateTimeOpts = Intl.DateTimeFormat().resolvedOptions();
11
66
  const formatOptions = {
12
67
  timeZone: userDateTimeOpts.timeZone,
13
68
  };
14
- if (format === 'date-time') {
69
+ if (effectiveFormat === 'date-time') {
15
70
  formatOptions.dateStyle = 'short';
16
71
  formatOptions.timeStyle = 'short';
17
72
  }
18
- else if (format === 'date') {
73
+ else if (effectiveFormat === 'date') {
19
74
  formatOptions.dateStyle = 'short';
20
75
  }
21
- else if (format === 'time') {
76
+ else if (effectiveFormat === 'time') {
22
77
  formatOptions.timeStyle = 'short';
23
78
  }
24
- return new Intl.DateTimeFormat(userDateTimeOpts.locale, formatOptions).format(date);
25
- };
26
- export const formatDateToISO = (dateString, format = 'date-time') => {
27
- if (!dateString) {
28
- return '';
29
- }
30
- const date = dateString === 'now' ? new Date() : new Date(dateString);
31
- if (isNaN(date.getTime())) {
32
- console.error('Invalid date:', dateString);
33
- return 'Invalid date';
34
- }
35
- const isoString = date.toISOString();
36
- if (format === 'date-time') {
37
- return isoString.slice(0, 19).replace('T', ' ');
38
- }
39
- else if (format === 'date') {
40
- return isoString.slice(0, 10);
79
+ try {
80
+ return new Intl.DateTimeFormat(userDateTimeOpts.locale, formatOptions).format(date);
41
81
  }
42
- else {
43
- return isoString.slice(11, 19);
82
+ catch (error) {
83
+ console.error('Intl formatting error', error);
84
+ return date.toString();
44
85
  }
45
86
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sphereon/ui-components.ssi-react",
3
3
  "private": false,
4
- "version": "0.4.1-unstable.151+b3cd72d",
4
+ "version": "0.4.1-unstable.158+2ea744b",
5
5
  "description": "SSI UI components for React",
6
6
  "repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
7
7
  "author": "Sphereon <dev@sphereon.com>",
@@ -50,7 +50,7 @@
50
50
  "@mui/x-date-pickers": "^8.18.0",
51
51
  "@sphereon/ssi-sdk.data-store": "0.34.1-feature.SSISDK.45.94",
52
52
  "@sphereon/ssi-types": "0.34.1-feature.SSISDK.45.94",
53
- "@sphereon/ui-components.core": "0.4.1-unstable.151+b3cd72d",
53
+ "@sphereon/ui-components.core": "0.4.1-unstable.158+2ea744b",
54
54
  "@tanstack/react-table": "^8.9.3",
55
55
  "ajv": "^8.17.1",
56
56
  "ajv-formats": "^3.0.1",
@@ -72,5 +72,5 @@
72
72
  "peerDependencies": {
73
73
  "react": ">= 18"
74
74
  },
75
- "gitHead": "b3cd72dcef59c82c8fe454666e0d77f00a98f815"
75
+ "gitHead": "2ea744b590935165982ce48a99b9513b6a44e291"
76
76
  }