From b75f643af593e243293cde15dfacf144c8a3824f Mon Sep 17 00:00:00 2001 From: phoebus-84 <83974413+phoebus-84@users.noreply.github.com> Date: Sat, 12 Oct 2024 11:52:46 +0200 Subject: [PATCH] feat: qr code card (#174) * feat: qr code card * tests --- src/components.d.ts | 23 ++++++++++++ src/components/heading/readme.md | 2 ++ src/components/qr-code/d-qr-code.css | 3 ++ src/components/qr-code/d-qr-code.tsx | 33 +++++++++++++++++ src/components/qr-code/qr-code.stories.ts | 32 +++++++++++++++++ src/components/qr-code/readme.md | 36 +++++++++++++++++++ src/components/qr-code/test/d-qr-code.e2e.ts | 11 ++++++ .../qr-code/test/d-qr-code.spec.tsx | 28 +++++++++++++++ src/components/text/readme.md | 2 ++ 9 files changed, 170 insertions(+) create mode 100644 src/components/qr-code/d-qr-code.css create mode 100644 src/components/qr-code/d-qr-code.tsx create mode 100644 src/components/qr-code/qr-code.stories.ts create mode 100644 src/components/qr-code/readme.md create mode 100644 src/components/qr-code/test/d-qr-code.e2e.ts create mode 100644 src/components/qr-code/test/d-qr-code.spec.tsx diff --git a/src/components.d.ts b/src/components.d.ts index 1c6ea7d..3fe9cd5 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -145,6 +145,13 @@ export namespace Components { "description"?: string; "title": string; } + interface DQrCode { + "generationDate": string; + "generationHour": string; + "qr": string; + "sessionId": string; + "sessionIdLabel": string; + } interface DScanButton { "href": string; } @@ -457,6 +464,12 @@ declare global { prototype: HTMLDPageDescriptionElement; new (): HTMLDPageDescriptionElement; }; + interface HTMLDQrCodeElement extends Components.DQrCode, HTMLStencilElement { + } + var HTMLDQrCodeElement: { + prototype: HTMLDQrCodeElement; + new (): HTMLDQrCodeElement; + }; interface HTMLDScanButtonElement extends Components.DScanButton, HTMLStencilElement { } var HTMLDScanButtonElement: { @@ -558,6 +571,7 @@ declare global { "d-logo": HTMLDLogoElement; "d-organizations": HTMLDOrganizationsElement; "d-page-description": HTMLDPageDescriptionElement; + "d-qr-code": HTMLDQrCodeElement; "d-scan-button": HTMLDScanButtonElement; "d-session-card": HTMLDSessionCardElement; "d-settings-menu": HTMLDSettingsMenuElement; @@ -714,6 +728,13 @@ declare namespace LocalJSX { "description"?: string; "title"?: string; } + interface DQrCode { + "generationDate"?: string; + "generationHour"?: string; + "qr"?: string; + "sessionId"?: string; + "sessionIdLabel"?: string; + } interface DScanButton { "href"?: string; } @@ -803,6 +824,7 @@ declare namespace LocalJSX { "d-logo": DLogo; "d-organizations": DOrganizations; "d-page-description": DPageDescription; + "d-qr-code": DQrCode; "d-scan-button": DScanButton; "d-session-card": DSessionCard; "d-settings-menu": DSettingsMenu; @@ -845,6 +867,7 @@ declare module "@stencil/core" { "d-logo": LocalJSX.DLogo & JSXBase.HTMLAttributes; "d-organizations": LocalJSX.DOrganizations & JSXBase.HTMLAttributes; "d-page-description": LocalJSX.DPageDescription & JSXBase.HTMLAttributes; + "d-qr-code": LocalJSX.DQrCode & JSXBase.HTMLAttributes; "d-scan-button": LocalJSX.DScanButton & JSXBase.HTMLAttributes; "d-session-card": LocalJSX.DSessionCard & JSXBase.HTMLAttributes; "d-settings-menu": LocalJSX.DSettingsMenu & JSXBase.HTMLAttributes; diff --git a/src/components/heading/readme.md b/src/components/heading/readme.md index 02ffe0f..0dfda0f 100644 --- a/src/components/heading/readme.md +++ b/src/components/heading/readme.md @@ -22,6 +22,7 @@ - [d-logo](../logo) - [d-organizations](../organizations) - [d-page-description](../page-description) + - [d-qr-code](../qr-code) - [d-session-card](../session-card) - [d-swipable-page](../swipable-page) @@ -33,6 +34,7 @@ graph TD; d-logo --> d-heading d-organizations --> d-heading d-page-description --> d-heading + d-qr-code --> d-heading d-session-card --> d-heading d-swipable-page --> d-heading style d-heading fill:#f9f,stroke:#333,stroke-width:4px diff --git a/src/components/qr-code/d-qr-code.css b/src/components/qr-code/d-qr-code.css new file mode 100644 index 0000000..5d4e87f --- /dev/null +++ b/src/components/qr-code/d-qr-code.css @@ -0,0 +1,3 @@ +:host { + display: block; +} diff --git a/src/components/qr-code/d-qr-code.tsx b/src/components/qr-code/d-qr-code.tsx new file mode 100644 index 0000000..4d49492 --- /dev/null +++ b/src/components/qr-code/d-qr-code.tsx @@ -0,0 +1,33 @@ +import { Component, Host, Prop, h } from '@stencil/core'; + +@Component({ + tag: 'd-qr-code', + styleUrl: 'd-qr-code.css', + shadow: true, +}) +export class DQrCode { + @Prop() qr: string; + @Prop() sessionIdLabel: string = 'Session ID:'; + @Prop() sessionId: string; + @Prop() generationDate: string; + @Prop() generationHour: string; + + render() { + return ( + +
+
+ qrCode +
+ + + {this.sessionIdLabel} + + {this.sessionId} + {this.generationDate} + {this.generationHour} +
+
+ ); + } +} diff --git a/src/components/qr-code/qr-code.stories.ts b/src/components/qr-code/qr-code.stories.ts new file mode 100644 index 0000000..1431155 --- /dev/null +++ b/src/components/qr-code/qr-code.stories.ts @@ -0,0 +1,32 @@ +import { Meta, StoryObj } from '@storybook/html'; +import type { Components } from '../../components.js'; + +const meta = { + title: 'Design System/DATA DISPLAY/QrCode', + render: args => ``, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Default: Story = { + args: { + sessionIdLabel: 'Session ID:', + sessionId: '12345', + generationDate: '05/09/2024', + generationHour: '12:00:00', + qr: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASQAAAEkCAYAAACG+UzsAAAAAXNSR0IArs4c6QAAIABJREFUeF7t3dFyG0mMrGHP+z+0N+JcDaUNfudfVLVoD+YWVUAikchuUmPpn9+/f//+tf8tA8vAMvABDPyzhvQBU1gIy8Ay8P8YWENaISwDy8DHMLCG9DGjWCDLwDKwhrQaWAaWgY9hYA3pY0axQJaBZWANaTWwDCwDH8PAGtLHjGKBLAPLwBrSamAZWAY+hoE1pI8ZxQJZBpaBNaTVwDKwDHwMA2tIHzOKBbIMLANrSKuBZWAZ+BgG1pA+ZhQLZBlYBtaQVgPLwDLwMQysIX3MKBbIMrAMjA3pn3/+eZTF+uubvuL7en8aV/OVn9rf1/rTfipe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7QFrAus/pSv8q/zVYDT89KXFqbe1/kpPzV/rVfzSz/it873P/eR7fRAJAgZ5jS+hvT+T6FrYaQHLaQWTvU1P+WX/qb51X/tT/2sIYEhDUSCmBqO7ktwp/GrXwnudLwaivhSf6qn++q/5q/1an7pZw3pd/t9PVWAGrAGWgcow1Fc/QnP6X61cKfjdR7ia8qH7qt/9aP7MoiaX/pRPeH9No/b3yFVQBLMlKC64MKvfFMBVD6EV/l0X/xrIad8VL6neMWH8Oh+nYcMQHhqXPiFR/fXkIY/5peA6gJogWu9LAD8Y17hk8Gc5qMuVK1fF0x4Ts9D+ISnxoVfeHR/DWkN6UUDMpQ1pPcrpQXPCxl/20N9YAnvVA+13zWkNaQ1pDdbU5/4WvC6oDIE4ROeGhd+4dH964ZUAdTzegWvBEkAwlfxVEGon4pf+dTvNK7+a/5p/xWPztf46TdQ8Sd89Y1L9Wr8+I/9K4B6vhqA8ldBVwFVvFPBqN81pLM/pZ3Ot+pJ5zX/qb5u62cNKX6pK0Fo4NO4nmAS5G1Bqb761/3T/Vc8Ol/jVU86L/6ET/ze1s8a0hqSNHw0XhdCxesbbn2jqQuq/oRX+NaQpIiNLwPLwDJwiIHxG9IhHJtmGVgGloFfa0grgmVgGfgYBtaQPmYUC2QZWAbWkFYDy8Ay8DEMrCF9zCgWyDKwDKwhrQaWgWXgYxhYQ/qYUSyQZWAZWENaDSwDy8DHMLCG9DGjWCDLwDKwhrQaWAaWgY9hYA3pY0axQJaBZWANaTWwDCwDH8PAGtLHjGKBLAPLwBrSamAZWAY+hoE1pI8ZxQJZBpaB/wHVqLuwJTYFEgAAAABJRU5ErkJggg==', + }, + parameters: { + design: { + type: 'figma', + url: 'https://www.figma.com/design/pdwfO3dMKtaCAQakht0JE6/DIDRoom-%2B-Signroom---WF-and-GUI---Dyne.org?node-id=3603-35766&node-type=frame&t=tJgEDXcrsNlriD0U-0', + }, + }, +}; diff --git a/src/components/qr-code/readme.md b/src/components/qr-code/readme.md new file mode 100644 index 0000000..2790295 --- /dev/null +++ b/src/components/qr-code/readme.md @@ -0,0 +1,36 @@ +# d-qr-code + + + + + + +## Properties + +| Property | Attribute | Description | Type | Default | +| ---------------- | ------------------ | ----------- | -------- | --------------- | +| `generationDate` | `generation-date` | | `string` | `undefined` | +| `generationHour` | `generation-hour` | | `string` | `undefined` | +| `qr` | `qr` | | `string` | `undefined` | +| `sessionId` | `session-id` | | `string` | `undefined` | +| `sessionIdLabel` | `session-id-label` | | `string` | `'Session ID:'` | + + +## Dependencies + +### Depends on + +- [d-text](../text) +- [d-heading](../heading) + +### Graph +```mermaid +graph TD; + d-qr-code --> d-text + d-qr-code --> d-heading + style d-qr-code fill:#f9f,stroke:#333,stroke-width:4px +``` + +---------------------------------------------- + +*Built with [StencilJS](https://stenciljs.com/)* diff --git a/src/components/qr-code/test/d-qr-code.e2e.ts b/src/components/qr-code/test/d-qr-code.e2e.ts new file mode 100644 index 0000000..bcf453f --- /dev/null +++ b/src/components/qr-code/test/d-qr-code.e2e.ts @@ -0,0 +1,11 @@ +import { newE2EPage } from '@stencil/core/testing'; + +describe('d-qr-code', () => { + it('renders', async () => { + const page = await newE2EPage(); + await page.setContent(''); + + const element = await page.find('d-qr-code'); + expect(element).toHaveClass('hydrated'); + }); +}); diff --git a/src/components/qr-code/test/d-qr-code.spec.tsx b/src/components/qr-code/test/d-qr-code.spec.tsx new file mode 100644 index 0000000..334dad8 --- /dev/null +++ b/src/components/qr-code/test/d-qr-code.spec.tsx @@ -0,0 +1,28 @@ +import { newSpecPage } from '@stencil/core/testing'; +import { DQrCode } from '../d-qr-code'; + +describe('d-qr-code', () => { + it('renders', async () => { + const page = await newSpecPage({ + components: [DQrCode], + html: ``, + }); + expect(page.root).toEqualHtml(` + + +
+
+ qrCode +
+ + Session ID: + + + + +
+
+
+ `); + }); +}); diff --git a/src/components/text/readme.md b/src/components/text/readme.md index 7d154fb..c3d91ad 100644 --- a/src/components/text/readme.md +++ b/src/components/text/readme.md @@ -28,6 +28,7 @@ - [d-feedback](../feedback) - [d-input](../input) - [d-page-description](../page-description) + - [d-qr-code](../qr-code) - [d-session-card](../session-card) - [d-swipable-page](../swipable-page) - [d-tab-button](../tab-button) @@ -47,6 +48,7 @@ graph TD; d-feedback --> d-text d-input --> d-text d-page-description --> d-text + d-qr-code --> d-text d-session-card --> d-text d-swipable-page --> d-text d-tab-button --> d-text