Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: propose new taxonomy #142

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 30 additions & 15 deletions src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ export namespace Components {
"color": Color;
"size": Size;
}
interface DHorizontalStack {
"gap": 2 | 4 | 8;
}
interface DIcon {
"icon": string;
"outline": boolean;
Expand All @@ -124,9 +127,6 @@ export namespace Components {
"type": 'text' | 'password' | 'email' | 'number';
"value": string;
}
interface DList {
"gap": 2 | 4 | 8;
}
interface DLoading {
"loading": boolean;
"message": string;
Expand Down Expand Up @@ -185,6 +185,9 @@ export namespace Components {
"color": Color;
"size": Size;
}
interface DVerticalStack {
"gap": 2 | 4 | 8;
}
interface DidroomLogo {
}
}
Expand Down Expand Up @@ -335,6 +338,12 @@ declare global {
prototype: HTMLDHeadingElement;
new (): HTMLDHeadingElement;
};
interface HTMLDHorizontalStackElement extends Components.DHorizontalStack, HTMLStencilElement {
}
var HTMLDHorizontalStackElement: {
prototype: HTMLDHorizontalStackElement;
new (): HTMLDHorizontalStackElement;
};
interface HTMLDIconElement extends Components.DIcon, HTMLStencilElement {
}
var HTMLDIconElement: {
Expand Down Expand Up @@ -371,12 +380,6 @@ declare global {
prototype: HTMLDInputElement;
new (): HTMLDInputElement;
};
interface HTMLDListElement extends Components.DList, HTMLStencilElement {
}
var HTMLDListElement: {
prototype: HTMLDListElement;
new (): HTMLDListElement;
};
interface HTMLDLoadingElement extends Components.DLoading, HTMLStencilElement {
}
var HTMLDLoadingElement: {
Expand Down Expand Up @@ -443,6 +446,12 @@ declare global {
prototype: HTMLDTextElement;
new (): HTMLDTextElement;
};
interface HTMLDVerticalStackElement extends Components.DVerticalStack, HTMLStencilElement {
}
var HTMLDVerticalStackElement: {
prototype: HTMLDVerticalStackElement;
new (): HTMLDVerticalStackElement;
};
interface HTMLDidroomLogoElement extends Components.DidroomLogo, HTMLStencilElement {
}
var HTMLDidroomLogoElement: {
Expand All @@ -466,11 +475,11 @@ declare global {
"d-feedback": HTMLDFeedbackElement;
"d-header": HTMLDHeaderElement;
"d-heading": HTMLDHeadingElement;
"d-horizontal-stack": HTMLDHorizontalStackElement;
"d-icon": HTMLDIconElement;
"d-illustration": HTMLDIllustrationElement;
"d-info-led": HTMLDInfoLedElement;
"d-input": HTMLDInputElement;
"d-list": HTMLDListElement;
"d-loading": HTMLDLoadingElement;
"d-logo": HTMLDLogoElement;
"d-organizations": HTMLDOrganizationsElement;
Expand All @@ -482,6 +491,7 @@ declare global {
"d-tab-button": HTMLDTabButtonElement;
"d-tab-page": HTMLDTabPageElement;
"d-text": HTMLDTextElement;
"d-vertical-stack": HTMLDVerticalStackElement;
"didroom-logo": HTMLDidroomLogoElement;
}
}
Expand Down Expand Up @@ -578,6 +588,9 @@ declare namespace LocalJSX {
"color"?: Color;
"size"?: Size;
}
interface DHorizontalStack {
"gap"?: 2 | 4 | 8;
}
interface DIcon {
"icon"?: string;
"outline"?: boolean;
Expand Down Expand Up @@ -606,9 +619,6 @@ declare namespace LocalJSX {
"type"?: 'text' | 'password' | 'email' | 'number';
"value"?: string;
}
interface DList {
"gap"?: 2 | 4 | 8;
}
interface DLoading {
"loading"?: boolean;
"message"?: string;
Expand Down Expand Up @@ -667,6 +677,9 @@ declare namespace LocalJSX {
"color"?: Color;
"size"?: Size;
}
interface DVerticalStack {
"gap"?: 2 | 4 | 8;
}
interface DidroomLogo {
}
interface IntrinsicElements {
Expand All @@ -686,11 +699,11 @@ declare namespace LocalJSX {
"d-feedback": DFeedback;
"d-header": DHeader;
"d-heading": DHeading;
"d-horizontal-stack": DHorizontalStack;
"d-icon": DIcon;
"d-illustration": DIllustration;
"d-info-led": DInfoLed;
"d-input": DInput;
"d-list": DList;
"d-loading": DLoading;
"d-logo": DLogo;
"d-organizations": DOrganizations;
Expand All @@ -702,6 +715,7 @@ declare namespace LocalJSX {
"d-tab-button": DTabButton;
"d-tab-page": DTabPage;
"d-text": DText;
"d-vertical-stack": DVerticalStack;
"didroom-logo": DidroomLogo;
}
}
Expand All @@ -725,11 +739,11 @@ declare module "@stencil/core" {
"d-feedback": LocalJSX.DFeedback & JSXBase.HTMLAttributes<HTMLDFeedbackElement>;
"d-header": LocalJSX.DHeader & JSXBase.HTMLAttributes<HTMLDHeaderElement>;
"d-heading": LocalJSX.DHeading & JSXBase.HTMLAttributes<HTMLDHeadingElement>;
"d-horizontal-stack": LocalJSX.DHorizontalStack & JSXBase.HTMLAttributes<HTMLDHorizontalStackElement>;
"d-icon": LocalJSX.DIcon & JSXBase.HTMLAttributes<HTMLDIconElement>;
"d-illustration": LocalJSX.DIllustration & JSXBase.HTMLAttributes<HTMLDIllustrationElement>;
"d-info-led": LocalJSX.DInfoLed & JSXBase.HTMLAttributes<HTMLDInfoLedElement>;
"d-input": LocalJSX.DInput & JSXBase.HTMLAttributes<HTMLDInputElement>;
"d-list": LocalJSX.DList & JSXBase.HTMLAttributes<HTMLDListElement>;
"d-loading": LocalJSX.DLoading & JSXBase.HTMLAttributes<HTMLDLoadingElement>;
"d-logo": LocalJSX.DLogo & JSXBase.HTMLAttributes<HTMLDLogoElement>;
"d-organizations": LocalJSX.DOrganizations & JSXBase.HTMLAttributes<HTMLDOrganizationsElement>;
Expand All @@ -741,6 +755,7 @@ declare module "@stencil/core" {
"d-tab-button": LocalJSX.DTabButton & JSXBase.HTMLAttributes<HTMLDTabButtonElement>;
"d-tab-page": LocalJSX.DTabPage & JSXBase.HTMLAttributes<HTMLDTabPageElement>;
"d-text": LocalJSX.DText & JSXBase.HTMLAttributes<HTMLDTextElement>;
"d-vertical-stack": LocalJSX.DVerticalStack & JSXBase.HTMLAttributes<HTMLDVerticalStackElement>;
"didroom-logo": LocalJSX.DidroomLogo & JSXBase.HTMLAttributes<HTMLDidroomLogoElement>;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/activity-card/activity.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DActivityCard } from './d-activity-card';
import { Meta, StoryObj } from '@storybook/html';

const meta = {
title: 'Design System/Molecule/Activity',
title: 'Design System/FEEDBACK & STATUS/Activity',
render: args =>
`<d-activity-card
name="${args.name}"
Expand Down
6 changes: 3 additions & 3 deletions src/components/app-details/app-details.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, StoryObj } from '@storybook/html';
import type { Components } from '../../components.js';

const meta = {
title: 'Design System/Atoms/AppDetails',
title: 'Design System/DATA DISPLAY/AppDetails',
render: args => `<d-app-details version="${args.version}"></d-app-details>`,
} satisfies Meta<Components.DAppDetails>;

Expand All @@ -12,6 +12,6 @@ type Story = StoryObj<Components.DAppDetails>;

export const Default: Story = {
args: {
version: "1.0.9",
}
version: '1.0.9',
},
};
2 changes: 1 addition & 1 deletion src/components/avatar/avatar.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Components } from '../../components.js';
import { ShapeArgTypes, SizeArgTypes } from '../types.js';

const meta = {
title: 'Design System/Atoms/Avatar',
title: 'Design System/MEDIA & ICONS/Avatar',
render: args => `<d-avatar name="${args.name}" src="${args.src}" size="${args.size}" shape="${args.shape}"></d-avatar>`,
argTypes: {
size: SizeArgTypes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DBackgroundIllustration } from './d-background-illustration';
import { Meta, StoryObj } from '@storybook/html';

const meta = {
title: 'Design System/Molecule/Background-illustration',
title: 'Design System/MEDIA & ICONS/Background-illustration',
render: args => {
console.log(args);
return `<d-background-illustration background="${args.background}">
Expand Down
3 changes: 1 addition & 2 deletions src/components/badge/badge.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DBadge } from './d-badge';
import { Meta, StoryObj } from '@storybook/html';

const meta = {
title: 'Design System/Atoms/Badge',
title: 'Design System/DATA DISPLAY/Badge',
render: () =>
`<d-badge>
Address
Expand All @@ -20,4 +20,3 @@ export const Default: Story = {
},
},
};

2 changes: 1 addition & 1 deletion src/components/button/button.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Components } from '../../components.js';
import { ColorArgTypes } from '../types.js';

const meta = {
title: 'Design System/Atoms/Button',
title: 'Design System/FORMS/Button',
render: (args, story) => `<d-button color=${args.color} clear=${args.clear ? "true" : "false"} disabled=${args.disabled} ${args.href ? `href=${args.href}` : ''} size=${args.size} ${args.expand ? 'expand' : ''}>
${Boolean(story.parameters.slot) ? `<div slot="${story.parameters.slot.position}">${story.parameters.slot.icon}</div>` : ''}
${Boolean(story.parameters.slot?.position == 'icon-only') ? '' : 'BUTTON'}</d-button>`,
Expand Down
2 changes: 1 addition & 1 deletion src/components/buttons-group/buttons-group.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Components } from '../../components.js';
import { ColorArgTypes } from '../types.js';

const meta = {
title: 'Design System/Atoms/Buttons-group',
title: 'Design System/FORMS/Buttons-group',
render: () => `<d-buttons-group>
<d-button href='/' size="large">
button 1
Expand Down
6 changes: 2 additions & 4 deletions src/components/credential-card/credential-card.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DCredentialCard } from './d-credential-card';
import { Meta, StoryObj } from '@storybook/html';

const meta = {
title: 'Design System/Molecule/CredentialCard',
title: 'Design System/DATA DISPLAY/CredentialCard',
render: args =>
`<d-credential-card
name="${args.name}"
Expand All @@ -26,7 +26,7 @@ export const Default: Story = {
issuedByLabel: 'issued by',
expirationLabel: 'exp',
expirationDate: '2017-01-01',
verified: false
verified: false,
},
parameters: {
design: {
Expand All @@ -42,5 +42,3 @@ export const Verified: Story = {
verified: true,
},
};


Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, StoryObj } from '@storybook/html';
import type { Components } from '../../components.js';

const meta = {
title: 'Design System/Molecule/CredentialDetail',
title: 'Design System/DATA DISPLAY/CredentialDetail',
render: (args, story) =>
Boolean(story.parameters.slot)
? `<d-credential-detail name="${args.name}" issuer="${args.issuer}" description="${args.description}" ${
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, StoryObj } from '@storybook/html';
import type { Components } from '../../components.js';

const meta = {
title: 'Design System/Molecule/CredentialService',
title: 'Design System/DATA DISPLAY/CredentialService',
render: args => `<d-credential-service name="${args.name}" issuer="${args.issuer}" description="${args.description}" href="${args.href}"></d-credential-service>`,
} satisfies Meta<Components.DCredentialService>;

Expand Down
3 changes: 1 addition & 2 deletions src/components/d-did-box/did-box.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DDidBox } from './d-did-box';
import { Meta, StoryObj } from '@storybook/html';

const meta = {
title: 'Design System/Atoms/DidBox',
title: 'Design System/DATA DISPLAY/DidBox',
render: args =>
`<d-did-box
did="${args.did}"
Expand All @@ -17,4 +17,3 @@ export const Default: Story = {
did: 'did:dyne:sandbox.signroom:JAomV7KF3NjjagBEnTrRNG28DjepXM9XHEyGNYwJS7ke',
},
};

2 changes: 1 addition & 1 deletion src/components/definition/definition.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DDefinition } from './d-definition';
import { Meta, StoryObj } from '@storybook/html';

const meta = {
title: 'Design System/Atoms/Definition',
title: 'Design System/DATA DISPLAY/Definition',
render: args =>
`<d-definition
title="${args.title}"
Expand Down
2 changes: 1 addition & 1 deletion src/components/empty-state/empty-state.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DEmptyState } from './d-empty-state';
import { Meta, StoryObj } from '@storybook/html';

const meta = {
title: 'Design System/Molecule/EmptyState',
title: 'Design System/FEEDBACK & STATUS/EmptyState',
render: (args, parameters) =>
`<d-empty-state
heading="${args.heading}"
Expand Down
2 changes: 1 addition & 1 deletion src/components/feedback/feedback.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { DFeedback } from './d-feedback';
import { Meta, StoryObj } from '@storybook/html';

const meta = {
title: 'Design System/Molecule/Feedback',
title: 'Design System/FEEDBACK & STATUS/Feedback',
render: args =>
`<d-feedback
feedback="${args.feedback}"
Expand Down
2 changes: 1 addition & 1 deletion src/components/header/header.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, StoryObj } from '@storybook/html';
import type { Components } from '../../components.js';

const meta = {
title: 'Design System/Molecule/Header',
title: 'Design System/LAYOUT/Header',
render: args =>
`<d-header back-button='${args.backButton}' settings='${args.settings}'>
title
Expand Down
20 changes: 20 additions & 0 deletions src/components/horizontal-stack/d-horizontal-stack.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component, Host, Prop, h } from '@stencil/core';

@Component({
tag: 'd-horizontal-stack',
styleUrl: 'd-horizontal-stack.css',
shadow: true,
})
export class DHorizontalStack {
@Prop() gap: 2 | 4 | 8 = 2;

render() {
return (
<Host>
<div class={{ 'flex flex-row': true, 'gap-2': this.gap == 2, 'gap-4': this.gap == 4, 'gap-8': this.gap == 8 }}>
<slot></slot>
</div>
</Host>
);
}
}
31 changes: 31 additions & 0 deletions src/components/horizontal-stack/horizontal-stack.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { DHorizontalStack } from './d-horizontal-stack';
import { Meta, StoryObj } from '@storybook/html';

const meta = {
title: 'Design System/LAYOUT/horizontal-stack',
render: args =>
`<d-horizontal-stack ${args.gap && `gap=${args.gap}`}>
<d-credential-service name="credential 1" issuer="issuer 1" organization="org 1"></d-credential-service>
<d-credential-service name="credential 2" issuer="issuer 2" organization="org 2"></d-credential-service>
<d-credential-service name="credential 3" issuer="issuer 3" organization="org 3"></d-credential-service>
</d-horizontal-stack>`,
} satisfies Meta<DHorizontalStack>;

export default meta;
type Story = StoryObj<DHorizontalStack>;

export const Default: Story = {
args: {},
};

export const WithGap4: Story = {
args: {
gap: 4,
},
};

export const WithGap8: Story = {
args: {
gap: 8,
},
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# d-list


# d-vertical-stack

<!-- Auto Generated Below -->

Expand Down
Loading