-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added sample components from design kit
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
- Loading branch information
Showing
51 changed files
with
267 additions
and
1,503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
23 changes: 0 additions & 23 deletions
23
projects/lfx-component-lib/src/lib/__docs__/lfx-component-lib.stories.ts
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
projects/lfx-component-lib/src/lib/containers/notice/notice.component.html
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
projects/lfx-component-lib/src/lib/containers/notice/notice.component.scss
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
projects/lfx-component-lib/src/lib/containers/notice/notice.component.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 9 additions & 6 deletions
15
projects/lfx-component-lib/src/lib/containers/sections/sections.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
@import "../../styles/constants.scss"; | ||
|
||
// TODO: This should be auto generated from the design tokens | ||
// TODO: use alias instead of the direct primitive values | ||
section { | ||
background-color: #fff; | ||
padding: 20px; | ||
border: 1px solid; | ||
border-radius: 10px; | ||
margin-right: 16px; | ||
margin-bottom: 16px; | ||
background-color: $grey-0; | ||
padding: $dim-24; | ||
border-radius: $dim-8; | ||
margin-right: $dim-16; | ||
margin-bottom: $dim-16; | ||
} |
17 changes: 9 additions & 8 deletions
17
...tainers/notice/__docs__/notice.stories.ts → ...ontainers/toast/__docs__/toast.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,29 @@ | ||
import type { Meta, StoryObj } from '@storybook/angular'; | ||
import { NoticeComponent } from '../notice.component'; | ||
import { ToastComponent } from '../toast.component'; | ||
|
||
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories | ||
const meta: Meta<NoticeComponent> = { | ||
title: 'Example/Containers/Notice', | ||
component: NoticeComponent, | ||
const meta: Meta<ToastComponent> = { | ||
title: 'LFX Components/Containers/Toast', | ||
component: ToastComponent, | ||
tags: ['autodocs'], | ||
argTypes: { | ||
type: { | ||
control: 'select', | ||
options: ['info', 'warning', 'success', 'error'], | ||
options: ['notice', 'warning', 'success', 'error'], | ||
defaultValue: 'notice', | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<NoticeComponent>; | ||
type Story = StoryObj<ToastComponent>; | ||
|
||
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args | ||
export const Info: Story = { | ||
render: (args: any) => ({ | ||
template: `<lfx-notice type="${args.type}"> | ||
template: `<lfx-toast type="${args.type}"> | ||
<h1>Title</h1> | ||
<p>Body paragraph</p> | ||
</lfx-notice>`, | ||
</lfx-toast>`, | ||
}), | ||
}; |
3 changes: 3 additions & 0 deletions
3
projects/lfx-component-lib/src/lib/containers/toast/toast.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div [class]="'lfx-toast ' + type()"> | ||
<ng-content /> | ||
</div> |
27 changes: 27 additions & 0 deletions
27
projects/lfx-component-lib/src/lib/containers/toast/toast.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@import "../../styles/constants.scss"; | ||
|
||
// TODO: This should be auto generated from the design tokens | ||
// TODO: use alias instead of the direct primitive values | ||
.lfx-toast { | ||
padding: $dim-24 $dim-32; | ||
border-radius: $dim-8; | ||
border-left-width: $dim-8; | ||
border-left-style: solid; | ||
|
||
&.notice { | ||
background-color: $blue-50; | ||
border-left-color: $blue-500; | ||
} | ||
&.warning { | ||
background-color: $orange-50; | ||
border-left-color: $orange-500; | ||
} | ||
&.success { | ||
background-color: $green-50; | ||
border-left-color: $green-500; | ||
} | ||
&.error { | ||
background-color: $red-50; | ||
border-left-color: $red-500; | ||
} | ||
} |
15 changes: 7 additions & 8 deletions
15
...ontainers/notice/notice.component.spec.ts → .../containers/toast/toast.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
projects/lfx-component-lib/src/lib/containers/toast/toast.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Component, input } from '@angular/core'; | ||
|
||
type IType = 'notice' | 'warning' | 'success' | 'error'; | ||
@Component({ | ||
selector: 'lfx-toast', | ||
standalone: true, | ||
imports: [], | ||
templateUrl: './toast.component.html', | ||
styleUrl: './toast.component.scss', | ||
}) | ||
export class ToastComponent { | ||
type = input<IType>('notice'); | ||
} |
23 changes: 0 additions & 23 deletions
23
projects/lfx-component-lib/src/lib/lfx-component-lib.component.spec.ts
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
projects/lfx-component-lib/src/lib/lfx-component-lib.component.ts
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
projects/lfx-component-lib/src/lib/lfx-component-lib.service.spec.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
$grey-0: #fafcfe; | ||
$grey-50: #f2f3f4; | ||
$grey-100: #d8dbdd; | ||
$grey-200: #c5cacc; | ||
$grey-300: #aab1b5; | ||
$grey-400: #99a2a7; | ||
$grey-500: #808b91; | ||
$grey-600: #747e84; | ||
$grey-700: #5b6367; | ||
$grey-800: #464c50; | ||
$grey-900: #363a3d; | ||
$grey-1000: #282e32; | ||
$blue-50: #ebf5fc; | ||
$blue-100: #c0e0f5; | ||
$blue-200: #a2d1f0; | ||
$blue-300: #78bbe9; | ||
$blue-400: #5daee5; | ||
$blue-500: #359ade; | ||
$blue-600: #308cca; | ||
$blue-700: #266d9e; | ||
$blue-800: #1d557a; | ||
$blue-900: #16415d; | ||
$blue-1000: #0f2d40; | ||
$green-50: #ecfaf5; | ||
$green-100: #c4efe0; | ||
$green-200: #a7e7d1; | ||
$green-300: #7fdbbd; | ||
$green-400: #66d5b0; | ||
$green-500: #40ca9c; | ||
$green-600: #3ab88e; | ||
$green-700: #2d8f6f; | ||
$green-800: #236f56; | ||
$green-900: #1b5542; | ||
$green-1000: #133b2e; | ||
$red-50: #faece8; | ||
$red-100: #efc4b6; | ||
$red-200: #e7a893; | ||
$red-300: #db8062; | ||
$red-400: #d56744; | ||
$red-500: #ca4115; | ||
$red-600: #b83b13; | ||
$red-700: #8f2e0f; | ||
$red-800: #6f240c; | ||
$red-900: #551b09; | ||
$red-1000: #3b1206; | ||
$yellow-50: #fef8e8; | ||
$yellow-100: #faeab9; | ||
$yellow-200: #f8df97; | ||
$yellow-300: #f5d168; | ||
$yellow-400: #f3c84a; | ||
$yellow-500: #f0ba1d; | ||
$yellow-600: #daa91a; | ||
$yellow-700: #aa8415; | ||
$yellow-800: #846610; | ||
$yellow-900: #654e0c; | ||
$yellow-1000: #463608; | ||
$orange-50: #fcf1e6; | ||
$orange-100: #f5d5b0; | ||
$orange-200: #f0c08a; | ||
$orange-300: #e9a455; | ||
$orange-400: #e59234; | ||
$orange-500: #de7701; | ||
$orange-600: #ca6c01; | ||
$orange-700: #9e5401; | ||
$orange-800: #7a4101; | ||
$orange-900: #5d3200; | ||
$orange-1000: #402300; | ||
$overlay-grey-0-50: #fafcfe80; | ||
$overlay-grey-1000-50: #282e3280; | ||
|
||
$dim-0: 0px; | ||
$dim-1: 1px; | ||
$dim-2: 2px; | ||
$dim-4: 4px; | ||
$dim-6: 6px; | ||
$dim-8: 8px; | ||
$dim-11: 11px; | ||
$dim-12: 12px; | ||
$dim-14: 14px; | ||
$dim-16: 16px; | ||
$dim-18: 18px; | ||
$dim-22: 22px; | ||
$dim-24: 24px; | ||
$dim-27: 27px; | ||
$dim-32: 32px; | ||
$dim-40: 40px; | ||
$dim-48: 48px; | ||
$dim-56: 56px; | ||
$dim-64: 64px; | ||
$dim-88: 88px; | ||
$dim-104: 104px; | ||
$dim-144: 144px; | ||
$dim-160: 160px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.