Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
3c897bb
added Drawer.stories.svelte
hobbitronics May 26, 2021
225acd1
added a theme for stories
hobbitronics May 26, 2021
d80dc57
added Badge.stories.svelte
hobbitronics May 27, 2021
272c3ec
added $$props.class to Badge
hobbitronics May 27, 2021
7c06330
updated README storybook instructions
hobbitronics May 27, 2021
008be90
added {$$props.class} to components
hobbitronics May 27, 2021
fa9e2e3
added CustomCard.stories.svelte
hobbitronics May 27, 2021
9d48578
added $$props.class to Form
hobbitronics May 27, 2021
7db15b4
added $$props.class to StaticChip
hobbitronics May 27, 2021
0829dfb
added StaticChip.stories.svelte
hobbitronics May 27, 2021
a87dc0c
added Tour.stories.svelte
hobbitronics May 27, 2021
221e952
added $$props.class to Tour
hobbitronics May 27, 2021
266c183
updated CHANGELOG
hobbitronics May 27, 2021
9efc5fb
added onAlertChosen
hobbitronics May 27, 2021
b1cb7b3
fixed replace key with value
hobbitronics May 27, 2021
2c91190
added Data
hobbitronics May 27, 2021
e2d99fc
added Form.stories.svelte
hobbitronics May 27, 2021
41ac931
updated CHANGELOG
hobbitronics May 27, 2021
acb535a
Merge pull request #29 from silinternational/feature/more-stories
hobbitronics May 28, 2021
6804e1b
added global.scss
hobbitronics May 28, 2021
be91a8d
compiled global.css from global.scss for docs & SB
hobbitronics May 28, 2021
067de3c
Merge branch 'develop' into feature/generate-global-classes
hobbitronics May 28, 2021
2412596
updated changelog
hobbitronics May 28, 2021
4a5dc51
X and Y padding had an extra @each loop
hobbitronics May 31, 2021
8ad242d
updated README to link to global.scss
hobbitronics Jun 1, 2021
35fa1f8
deleted global.css and added to .gitignore
hobbitronics Jun 1, 2021
68b0452
add compile global.css to dev script
hobbitronics Jun 1, 2021
65c39ab
add compile global.css to Storybook depoly build
hobbitronics Jun 1, 2021
86bb59f
rebuilt package-lock
hobbitronics Jun 1, 2021
f0907cf
updated CHANGELOG
hobbitronics Jun 1, 2021
479ab45
changed version to 1.2.0
hobbitronics Jun 1, 2021
26d9731
trigger build on develop branch
hobbitronics Jun 1, 2021
b1508e5
Merge pull request #30 from silinternational/feature/generate-global-…
hobbitronics Jun 1, 2021
4132fac
Update gh-pages.yml
hobbitronics Jun 1, 2021
e3c9295
Merge pull request #31 from silinternational/hobbitronics-patch-1
hobbitronics Jun 1, 2021
b482458
compile global.css before building storybook
hobbitronics Jun 1, 2021
31675e3
install sass & moved compile cmd to package.json
hobbitronics Jun 1, 2021
5e50d25
Merge pull request #32 from silinternational/feature/sass-deployment
hobbitronics Jun 1, 2021
66bff77
Update gh-pages.yml
hobbitronics Jun 1, 2021
86d839e
Merge pull request #33 from silinternational/hobbitronics-patch-2
hobbitronics Jun 1, 2021
c4ef9ca
generate height and width in %, increment by 5
hobbitronics Jun 1, 2021
dcba6c7
reordered margin & padding sides
hobbitronics Jun 1, 2021
d82db21
added fixed and relative position utilities
hobbitronics Jun 2, 2021
29b7c40
added z-0 to z-10 loop to global.scss
hobbitronics Jun 2, 2021
a9ff6ac
added labels and moved pointer utility to misc
hobbitronics Jun 2, 2021
40a7b75
added inline & block display utils to global.scss
hobbitronics Jun 2, 2021
98b014b
add start and end text-align utils to global.scss
hobbitronics Jun 2, 2021
bea3f31
added text prefix to text-align utils
hobbitronics Jun 2, 2021
7d4bf40
.aligned to .align-items-center & more classes
hobbitronics Jun 2, 2021
aa11333
updated changelog and version
hobbitronics Jun 2, 2021
8d6195c
added .fs-10 global class
hobbitronics Jun 2, 2021
2b4a6e0
bgColorIsVariant default changed to false
hobbitronics Jun 2, 2021
aa1894c
barColorProvided default changed to false
hobbitronics Jun 2, 2021
9368b9f
updated CHANGELOG
hobbitronics Jun 2, 2021
f0be5c1
aligned to align-items-center in components
hobbitronics Jun 2, 2021
c35f374
align-center change to text-align-center
hobbitronics Jun 2, 2021
e6b368c
align-left changed to text-align-left
hobbitronics Jun 2, 2021
a5e434c
height and width increments in 5 not 10
hobbitronics Jun 2, 2021
1a256ba
Merge pull request #34 from silinternational/feature/more-global-classes
hobbitronics Jun 2, 2021
3093613
rm'd barColorProvided & use --progress-bar-color
hobbitronics Jun 2, 2021
6c29d4b
rewording CHANGELOG
hobbitronics Jun 2, 2021
4c398a6
Merge pull request #35 from silinternational/feature/progress-linear-…
hobbitronics Jun 2, 2021
67be437
Merge branch 'develop' into feature/Drawer-story
hobbitronics Jun 2, 2021
0ca417e
removed TopAppBar from Drawer
hobbitronics Jun 3, 2021
dd1f25e
moved to Atoms, unused code, added an icon
hobbitronics Jun 4, 2021
6c7169d
missing list and core-styles per README
hobbitronics Jun 4, 2021
722c5cc
imported _index.scss for sample theme
hobbitronics Jun 4, 2021
19313ed
added TopAppBar in if block and props.
hobbitronics Jun 7, 2021
462441e
added body to Drawer story
hobbitronics Jun 7, 2021
e292a40
npm i after merging develop
hobbitronics Jun 7, 2021
73d46f8
removed toggle
hobbitronics Jun 7, 2021
423d125
added toggle prop and reactive statements
hobbitronics Jun 7, 2021
667743a
added dismissible story and buttons, modlecule
hobbitronics Jun 7, 2021
c76c0eb
used global classes
hobbitronics Jun 7, 2021
0455449
set modal to false by default
hobbitronics Jun 7, 2021
33b5127
no need to set modal to false when dismissible
hobbitronics Jun 7, 2021
7805aed
check dismissible before turning modal off
hobbitronics Jun 7, 2021
7dd8c32
updated README and CHANGELOG
hobbitronics Jun 7, 2021
1cac5c2
removed colors and add a color from theme
hobbitronics Jun 7, 2021
94cc4f2
typo in CHANGELOG
hobbitronics Jun 7, 2021
49e8862
Merge pull request #36 from silinternational/feature/Drawer-story
hobbitronics Jun 7, 2021
effa064
keep the topAppBar button for dismissible Drawer
hobbitronics Jun 8, 2021
3f6a1ac
oggle to false so Drawer will open when set true
hobbitronics Jun 8, 2021
6d33d3d
Merge pull request #37 from silinternational/feature/Drawer-story
hobbitronics Jun 8, 2021
3324e02
added a demo typography for storybook
hobbitronics Jun 11, 2021
4b2f5dc
Merge pull request #38 from silinternational/feature/demo-typography
hobbitronics Jun 12, 2021
76fcb5c
typography was not applied to some components
hobbitronics Jul 1, 2021
5c1e437
update README
hobbitronics Jul 1, 2021
39a6f5b
updated CHANGELOG
hobbitronics Jul 1, 2021
462a7d1
Merge pull request #39 from silinternational/feature/fix-typography
hobbitronics Jul 1, 2021
d3a2f00
updated non breaking non sb devDependencies
hobbitronics Jul 1, 2021
eb6ccff
updated and added devDependencies for storybook
hobbitronics Jul 1, 2021
72bcc5f
updated @storybook/addon-svelte-csf
hobbitronics Jul 1, 2021
1c5bc38
Merge pull request #40 from silinternational/feature/update-dependencies
hobbitronics Jul 1, 2021
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
7 changes: 4 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: github pages
on:
push:
branches:
- main # Set a branch name to trigger deployment
- develop # Set a branch name to trigger deployment

jobs:
deploy:
Expand All @@ -24,6 +24,7 @@ jobs:
restore-keys: |
${{ runner.os }}-node-

- run: npm install -g sass
- run: npm ci
- run: npm test

Expand All @@ -32,7 +33,7 @@ jobs:

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/develop'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static
publish_dir: ./storybook-static
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,8 @@ dist
.tern-port

# MacOs
.DS_Store
.DS_Store

#CSS compiled for Storybook
global.css.map
global.css
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0.0](https://github.com/silinternational/ui-components/releases/tag/v2.0.0) - 2021-07-02
### Changed
- README - Instructions for running Storybook locally
- global.css is compiled during Storybook dev and deployment build from global.scss and used only for Storybook
- _index.scss uses global.scss

### BREAKING CHANGES
- .align-center, .align-left and .align-right global classes are now .text-align-center, .text-align-left and .text-align-right.
- .aligned global class is now .align-items-center
- Progress.Linear barColorProvided prop deleted
- Progress.Linear uses --progress-bar-color instead of --sil-primary-blue from the apps _theme file and falls back to --mdc-theme-primary
- TopAppBar prop bgColorIsVariant default value is now false

### Added
- $$props.class to Badge, Form, CustomCard, Tour and StaticChip so they can accept global classes
- mdc-typography class to Badge, StaticChip and Card as it was not being applied
- Badge, CustomCard, Drawer, Form, StaticChip and Tour stories to Storybook
- global.scss to generate full range of padding and margin from 1rem to 8rem, height and width from 0 to 100% in increments of 5, z-index from 0 to 10.
- align-item and align-self flex utilites to global.scss
- .text-align-start, .text-align-end, .d-inline, .d-block, .relative, .fixed and .fs-10 added to global.scss
- toggle (opens and closes Drawer when modal or dismissible), dismissible(Drawer is hidden by default) and hasTopAppBar props to Drawer

### Removed
- global.css was removed and added to .gitignore
- barColorProvided from Progress.Linear

### Fixed
- Tour was failing to replace key with value of data prop in steps content.

## [1.1.0](https://github.com/silinternational/ui-components/releases/tag/v1.1.0) - 2021-05-26
### Changed
- package.json version to 1.1.0
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Reusable Svelte components for some internal applications
To install to your Svelte project, open your project's root directory in a terminal. Type `npm i @silintl/ui-components` and press enter.

### bundler configuration
Your Svelte project will need the bundler (rollup most likely) configured to compile Sass files. If you are using rollup your plugins in your "rollup.config.js" should look something like this taking special note of postcss and svelte (it may work still without autoPreprocess):
Your Svelte project will need the bundler (rollup most likely) configured to compile Sass files. If you are using rollup your plugins in your "rollup.config.js" should look something like this taking special note of postcss and svelte:
```
import postcss from 'rollup-plugin-postcss';
import autoPreprocess from 'svelte-preprocess';
Expand Down Expand Up @@ -58,7 +58,7 @@ Dialog [
Dialog.Alert (open, title, defaultAction), Dialog.Simple(open, title)
]

Drawer (title, subtitle, menuItems)
Drawer (title, subtitle, menuItems, toggle, modal, dismissible, hasTopAppBar)

Fab (icon, label, url)

Expand All @@ -69,7 +69,7 @@ List (twoLine, avatar) [
]

Progress [
Progress.Circular, Progress.Linear (indeterminate, value, barColorProvided)
Progress.Circular, Progress.Linear (indeterminate, value)
]

Select (options, width, disabled, selectedID)
Expand Down Expand Up @@ -179,10 +179,11 @@ An example of using Drawer:
```

### storybook
Try out our components at https://silinternational.github.io/ui-components/
Try out our components and see examples at https://silinternational.github.io/ui-components/
or run storybook locally. Just copy this repo to your machine and run `npm install` then `npm run dev.` Storybook should open a browser window when it finishes building.

### CSS utility classes
Classes from [global.css](https://github.com/silinternational/ui-components/blob/develop/components/global.css) can be applied to all components and even components and elements from your app.
Classes from [global.scss](https://github.com/silinternational/ui-components/blob/develop/components/global.scss) can be applied to all components and even components and elements from your app.

### theming
If you are using an [MDC theme](https://material.io/develop/web/docs/theming) and [typography](https://material.io/develop/web/components/typography) then import your _index.scss file to the App.svelte file so they get applied to the ui-components.
2 changes: 1 addition & 1 deletion components/Badge.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
}
</style>

<span class="dib align-center white fs-16 br-50 background" style="--theme-color: {color}" ><slot /></span>
<span class="mdc-typography dib text-align-center white fs-16 br-50 background {$$props.class}" style="--theme-color: {color}" ><slot /></span>
4 changes: 2 additions & 2 deletions components/CustomCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
}
</style>

<Card class="h-100 py-1">
<Card class="h-100 py-1 {$$props.class}">
<div class="flex justify-center">
<img class="w-100" {src} {alt} class:disabled/>
</div>

<div class="flex justify-between aligned black">
<div class="flex justify-between align-items-center black">
<h4>{title}</h4>

<span class="material-icons">{icon}</span>
Expand Down
2 changes: 1 addition & 1 deletion components/Form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
}
</style>

<form class="w-100" on:submit|preventDefault autocomplete="off">
<form class="w-100 {$$props.class}" on:submit|preventDefault autocomplete="off">
<slot />
</form>
4 changes: 2 additions & 2 deletions components/StaticChip.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
}
</style>

<div class="chip black flex justify-center aligned mb-1 mr-2 fs-14 br-16px">
<div class="chip-content flex aligned">
<div class="mdc-typography chip black flex justify-center align-items-center mb-1 mr-2 fs-14 br-16px {$$props.class}">
<div class="chip-content flex align-items-center">
<slot></slot>
</div>
</div>
8 changes: 4 additions & 4 deletions components/Tour.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
tourTitle = thisStep.title || ''
target = thisStep.target || ''
for (const [key, value] of Object.entries(data)) {
tourMessage = tourMessage.replace(`{${key}}`, value)
tourTitle = tourTitle.replace(`{${key}}`, value)
target = target.replace(`{${key}}`, value)
tourMessage = tourMessage.replace(key, value)
tourTitle = tourTitle.replace(key, value)
target = target.replace(key, value)
}

buttons = [
Expand All @@ -68,4 +68,4 @@
}
</script>

<Dialog.Alert title={tourTitle} on:chosen={event => alertChosen(event.detail)} open={openDialog} {buttons}>{@html tourMessage}</Dialog.Alert>
<Dialog.Alert class="{$$props.class}" title={tourTitle} on:chosen={event => alertChosen(event.detail)} open={openDialog} {buttons}>{@html tourMessage}</Dialog.Alert>
Loading