Skip to content

Commit

Permalink
Release 0.8.0 (#105)
Browse files Browse the repository at this point in the history
* Release 0.8.0

* Table: add breakpoints (#106)

* IconButton + CopyText updates (#107)

* Icon button: add label + preset

* CopyText: update to use IconButton copy preset

* Checkbox: add note and error (#108)

* Checkbox: add note and error

* Update prop description

* Toggle: settings example (#112)

* Update dependencies GitHub Action (#110)

* Textarea component (#109)

* Textarea component

* Update props description
  • Loading branch information
quietbits authored Mar 10, 2022
1 parent 6539aad commit 1345794
Show file tree
Hide file tree
Showing 26 changed files with 559 additions and 95 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/update_deps.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Monthly dependency updates
on:
schedule:
# First of every month
- cron: 0 0 1 * *
# First of every other month
- cron: 0 0 1 */2 *

jobs:
create_issue:
Expand All @@ -22,6 +22,7 @@ jobs:
```
Make sure there are no issues in the code editor, code compiles, and it runs without issues in the browser.
pinned: false
close-previous: false
close-previous: true
labels: "design-system, dependencies"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion @stellar/design-system-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lint-tsc": "tsc --noEmit"
},
"dependencies": {
"@stellar/design-system": "^0.7.0",
"@stellar/design-system": "^0.8.0",
"lodash": "^4.17.21",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;

.TableContainer .Table {
--table-min-width: 400px;
}
}

&__code {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { selects } from "constants/details/selects";
import { statusBars } from "constants/details/statusBars";
import { tables } from "constants/details/tables";
import { tags } from "constants/details/tags";
import { textareas } from "constants/details/textareas";
import { textLinks } from "constants/details/textLinks";
import { toggles } from "constants/details/toggles";
import { tooltips } from "constants/details/tooltips";
Expand Down Expand Up @@ -51,6 +52,7 @@ export const componentDetails: ComponentDetailsList = {
statusBars,
tables,
tags,
textareas,
textLinks,
toggles,
tooltips,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ export const componentsInDisplayOrder: ComponentsInDisplayOrder[] = [
id: ComponentDetailsId.selects,
label: "Selects",
},
{
id: ComponentDetailsId.textareas,
label: "Textareas",
},
{
id: ComponentDetailsId.checkboxes,
label: "Checkboxes",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ export const checkboxes: ComponentDetails = {
/>,
],
},
{
title: "Checkbox with note / error",
description: "",
component: [
<Checkbox
id="checkbox-7"
label="Lorem ipsum dolor sit amet consectetur adipisicing elit. Quia reprehenderit ipsam facilis"
note="Note message"
/>,
<Checkbox
id="checkbox-8"
label="Illum odio veritatis corporis nihil asperiores eum nam in error"
error="Error message"
/>,
],
},
],
props: [
{
Expand All @@ -66,6 +82,20 @@ export const checkboxes: ComponentDetails = {
optional: true,
description: "Label of the checkbox",
},
{
prop: "note",
type: ["string", "ReactNode"],
default: null,
optional: true,
description: "Note message of the checkbox",
},
{
prop: "error",
type: ["string", "ReactNode"],
default: null,
optional: true,
description: "Error message of the checkbox",
},
],
externalProps: {
link: "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attributes",
Expand Down
17 changes: 6 additions & 11 deletions @stellar/design-system-website/src/constants/details/copyTexts.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CopyText, TextLink } from "@stellar/design-system";
import { CopyText, TextLink, IconButton } from "@stellar/design-system";
import { ComponentDetails, ComponentDetailsId } from "types/types.d";

export const copyTexts: ComponentDetails = {
Expand Down Expand Up @@ -32,16 +32,18 @@ export const copyTexts: ComponentDetails = {
],
},
{
title: "With copy icon",
title: "Using Icon button copy preset",
description: "Text link with copy icon and tooltip",
component: [
<CopyText
textToCopy="Test copy"
showCopyIcon
showTooltip
tooltipPosition={CopyText.tooltipPosition.RIGHT}
>
<TextLink>Copy</TextLink>
<IconButton
preset={IconButton.preset.copy}
variant={IconButton.variant.highlight}
/>
</CopyText>,
],
},
Expand All @@ -54,13 +56,6 @@ export const copyTexts: ComponentDetails = {
optional: false,
description: "Text to copy",
},
{
prop: "showCopyIcon",
type: ["boolean"],
default: null,
optional: true,
description: "Flag to enable copy icon",
},
{
prop: "showTooltip",
type: ["boolean"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export const iconButtons: ComponentDetails = {
<code>IconButton</code> is similar to the <code>Button</code>, and is used
to trigger an action. There are five variants (color is the only
difference): <code>default</code>, <code>error</code>,{" "}
<code>success</code>, <code>warning</code>, <code>highlight</code>.
<code>success</code>, <code>warning</code>, <code>highlight</code>; and
two presets: <code>copy</code> and <code>download</code>.
</>
),
shortDescription: "Similar to the Button, and is used to trigger an action",
Expand All @@ -22,6 +23,19 @@ export const iconButtons: ComponentDetails = {
<IconButton icon={<Icon.Info />} altText="Default" disabled />,
],
},
{
title: "Default with label",
description: "",
component: [
<IconButton icon={<Icon.Info />} label="Default" altText="Default" />,
<IconButton
icon={<Icon.Info />}
label="Default"
altText="Default"
disabled
/>,
],
},
{
title: "Success",
description: "",
Expand Down Expand Up @@ -90,6 +104,36 @@ export const iconButtons: ComponentDetails = {
/>,
],
},
{
title: "Preset: copy",
description: "",
component: [
<IconButton
preset={IconButton.preset.copy}
variant={IconButton.variant.highlight}
/>,
<IconButton
preset={IconButton.preset.copy}
variant={IconButton.variant.highlight}
disabled
/>,
],
},
{
title: "Preset: download",
description: "",
component: [
<IconButton
preset={IconButton.preset.download}
variant={IconButton.variant.highlight}
/>,
<IconButton
preset={IconButton.preset.download}
variant={IconButton.variant.highlight}
disabled
/>,
],
},
{
title: "Custom color",
description: "",
Expand Down Expand Up @@ -124,8 +168,34 @@ export const iconButtons: ComponentDetails = {
/>,
],
},
{
title: "Custom size with label",
description: "",
component: [
<IconButton
icon={<Icon.Info />}
altText="Custom size"
label="Custom"
customSize="2rem"
/>,
<IconButton
icon={<Icon.Info />}
altText="Custom size"
label="Custom"
customSize="2rem"
disabled
/>,
],
},
],
props: [
{
prop: "IconButtonDefaultProps",
type: [],
default: null,
optional: false,
description: "",
},
{
prop: "icon",
type: ["ReactNode"],
Expand All @@ -140,13 +210,41 @@ export const iconButtons: ComponentDetails = {
optional: false,
description: "Alternative text to show on hover",
},
{
prop: "IconButtonPresetProps",
type: [],
default: null,
optional: false,
description: "",
},
{
prop: "preset",
type: ["copy", "download"],
default: null,
optional: false,
description: "Predefined set of icon buttons",
},
{
prop: "IconButtonBaseProps",
type: [],
default: null,
optional: false,
description: "",
},
{
prop: "variant",
type: ["default", "error", "success", "warning", "highlight"],
default: "default",
optional: true,
description: "Variant of the component",
},
{
prop: "label",
type: ["string"],
default: null,
optional: true,
description: "Component label",
},
{
prop: "customColor",
type: ["string"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
// used to illustrate a Formik <Field /> in examples
export const Field = (props: any) => <input {...props} />;

export const TextareaField = (props: any) => <textarea {...props} />;
11 changes: 11 additions & 0 deletions @stellar/design-system-website/src/constants/details/tables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const tables: ComponentDetails = {
data={tableData}
renderItemRow={renderItemRow}
hideNumberColumn
breakpoint={400}
/>,
],
},
Expand All @@ -96,6 +97,7 @@ export const tables: ComponentDetails = {
data={tableData}
renderItemRow={renderItemRow}
pageSize={2}
breakpoint={400}
/>,
],
},
Expand All @@ -108,6 +110,7 @@ export const tables: ComponentDetails = {
data={tableData}
renderItemRow={renderItemRow}
pageSize={2}
breakpoint={400}
isLoading
/>,
],
Expand All @@ -120,6 +123,7 @@ export const tables: ComponentDetails = {
columnLabels={sortableTableLabels}
data={[]}
renderItemRow={renderItemRow}
breakpoint={400}
/>,
],
},
Expand Down Expand Up @@ -153,6 +157,13 @@ export const tables: ComponentDetails = {
optional: false,
description: "Function to render table rows",
},
{
prop: "breakpoint",
type: ["300", "400", "500", "600", "700", "800", "900"],
default: null,
optional: false,
description: "Media query breakpoint to show sticky column layout",
},
{
prop: "hideNumberColumn",
type: ["boolean"],
Expand Down
Loading

0 comments on commit 1345794

Please sign in to comment.