Skip to content

DRAFT: preview diff #142

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

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
862a53e
Merge branch 'master' of https://github.com/c0bra/svelma
saravanabalagi Apr 6, 2021
27382a4
Add dynamic add remove tabs sections in docs
saravanabalagi Apr 12, 2021
a34c44c
Add code for destroy and update for dynamic Tab
saravanabalagi Apr 12, 2021
40a7047
Remove expanded, covered by is-fullwidth bulma style
saravanabalagi Apr 12, 2021
ff636fa
Allow bindable active
saravanabalagi Apr 12, 2021
fb54073
Code Refactoring
saravanabalagi Apr 12, 2021
853c0d4
Merge pull request #5 from saravanabalagi/tabs_bindable_prop_active
saravanabalagi Apr 12, 2021
c954882
Keep active within bounds as tabs are added or removed
saravanabalagi Apr 12, 2021
f14ca92
Merge pull request #6 from saravanabalagi/tabs_bindable_prop_active
saravanabalagi Apr 12, 2021
75bdb80
Bumping version
saravanabalagi Apr 13, 2021
e273a7b
Update active only when component is mounted
saravanabalagi Apr 13, 2021
a42a6b8
Bumping version
saravanabalagi Apr 13, 2021
03da8d9
Fix ShowClose
saravanabalagi Sep 16, 2021
2924e9a
Update README
saravanabalagi Sep 16, 2021
7a4cce2
fix(bugs): Bumping version
saravanabalagi Sep 16, 2021
78053e7
Fix by using store
saravanabalagi May 20, 2022
e12f2db
Don't subscribe to store if standalone
saravanabalagi May 20, 2022
9a30848
Merge remote-tracking branch 'upstream/master'
saravanabalagi May 21, 2022
d19af41
Merge branch 'fix_field_type_propogation_to_children'
saravanabalagi May 21, 2022
e34178f
Bump Version
saravanabalagi May 21, 2022
807cd8e
Update node.js.yml
saravanabalagi May 21, 2022
75816e0
Update Packaga name
saravanabalagi May 21, 2022
a963fa9
Major update: v0.4.9
saravanabalagi Sep 19, 2022
41f133a
Add timeout in tooltip
saravanabalagi Jan 9, 2023
e911256
Fix tooltip timeout bug
saravanabalagi Jan 9, 2023
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
4 changes: 2 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
node-version: [10.x, 12.x, 14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -27,4 +27,4 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm run test --if-present
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ addons:
install:
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- npm ci || npm install
- rm -rf node_modules && yarn install --frozen-lockfile || yarn install

script: skip

Expand Down
21 changes: 0 additions & 21 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE → LICENCE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Brian Hann, 2021 Abby Chau
Copyright (c) 2021 Saravanabalagi Ramachandran

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
94 changes: 49 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
# Svelma
<h1 align="center">Svelma</h1>

> Svelma is a set of UI components for [Svelte](https://svelte.dev) based on the [Bulma](http://bulma.io) CSS framework.
<div align="center">

<a href="https://www.npmjs.com/package/svelma"><img src="https://img.shields.io/npm/v/svelma.svg" /></a>
<a href="https://www.npmjs.com/package/svelma"><img src="https://img.shields.io/npm/l/svelma.svg" /></a>
<a href="https://bundlephobia.com/result?p=svelma"><img src="https://badgen.net/bundlephobia/minzip/svelma"></a>
<a href="https://travis-ci.com/c0bra/svelma"><img src="https://travis-ci.com/c0bra/svelma.svg?branch=master"></a>
<a href="https://www.npmjs.com/package/svelma-enhanced"><img src="https://img.shields.io/npm/v/svelma-enhanced.svg" /></a>
<a href="https://www.npmjs.com/package/svelma-enhanced"><img src="https://img.shields.io/npm/l/svelma-enhanced.svg" /></a>
<a href="https://www.npmjs.com/package/svelma-enhanced"><img src="https://img.shields.io/npm/dm/svelma-enhanced"></a>
<a href="https://travis-ci.org/saravanabalagi/svelma"><img src="https://travis-ci.org/saravanabalagi/svelma.svg?branch=master"></a>

Svelma is a set of UI components for [Svelte](https://svelte.dev) based on the [Bulma](http://bulma.io) CSS framework. Some features are experimental and are being developed. Pull requests are welcome. Forked from https://github.com/c0bra/svelma. This fork currently only has bug fixes.

[Change Log](CHANGELOG.md)
</div>

## Documentation

See documentation and demo [here](https://saravanabalagi.github.io/svelma)

# Documentation
## Setup

[See docs + demos site here](https://docs-abbychau.vercel.app/svelma)
#### 1. Install svelma and dependencies via npm

# Quick Start

### 1. Import svelma and dependencies via npm to your project

```bash
$ npm install --save bulma svelma
$ npm install node-sass svelte-preprocess rollup-plugin-postcss --save-dev
```sh
yarn add bulma @saravanbalagi/svelma
yarn add -D node-sass svelte-preprocess rollup-plugin-postcss
```

### 2. Add the postcss plugin to your rollup config
#### 2. Add the postcss plugin to your rollup config

```js
// rollup.config.js
import postcss from 'rollup-plugin-postcss'
import preprocess from 'svelte-preprocess'
import postcss from 'rollup-plugin-postcss';
import preprocess from 'svelte-preprocess';

// ...

Expand All @@ -43,59 +42,64 @@ export default {
}),

postcss(),
}
// ...
]
}
```

### 3. Import Bulma's CSS and Svelma components
#### 3. Import Bulma's CSS and Svelma components

```html
<!-- App.svelte -->
<script>
import 'bulma/css/bulma.css'
import { Button } from 'svelma'
import 'bulma/css/bulma.css';
import { Button } from 'svelma';
</script>

<Button type="is-primary">I'm a Button!</Button>
```
You can [customize](https://bulma.io/documentation/customize/with-node-sass/#6-add-your-own-bulma-styles) Bulma to suit your branding:

### 4. Include [Font Awesome](https://fontawesome.com/) icons
1. Create SASS/SCSS file, say `app.scss`, and add it to App.svelte
1. Import required SASS files from Bulma in `app.scss`
1. Override SASS/SCSS variables

From CDN in your HTML page:
#### 4. Install [Font Awesome](https://fontawesome.com/) icons

```html
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" />
```
Fontawesome Webfonts come with certain side effects and so SVG Icons are recommended for use with svelte.

Or as an npm package imported into your root component:
```sh
# add SVG icons
yarn add -D @fortawesome/fontawesome-svg-core @fortawesome/free-brands-svg-icons @fortawesome/free-regular-svg-icons @fortawesome/free-solid-svg-icons
```

`$ npm install --save @fortawesome/fontawesome-free`
Add fontawesome to your App. The following will add all icons, but you can also add SVG icons [selectively](https://fontawesome.com/how-to-use/on-the-web/advanced/svg-javascript-core) if you wanted to make you app a lot smaller.

```html
<!-- App.svelte -->
<script>
import 'bulma/css/bulma.css'
import '@fortawesome/fontawesome-free/css/all.css'
import 'bulma/css/bulma.css';

// add all fontawesome icons
import { library, dom } from '@fortawesome/fontawesome-svg-core';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { far } from '@fortawesome/free-regular-svg-icons';
import { fab } from '@fortawesome/free-brands-svg-icons';
library.add(fab, fas, far);
dom.watch();
</script>
```

### SSR
Alternatively, you shall also use a link tag in your `index.html` using a [CDN](https://cdnjs.com/libraries/font-awesome), or use [webfonts](https://www.npmjs.com/package/@fortawesome/fontawesome-free) but this is not recommended.

If you are doing server-side rendering with Sapper (or [SvelteKit](https://kit.svelte.dev/)), you'll need to import the .svelte files directly so that your app can compile them, rather than importing from the compiled module.

i.e.:
If you are doing server-side rendering with Sapper (or [SvelteKit](https://kit.svelte.dev/)), you'll need to import the `.svelte` files directly so that your app can compile them, rather than importing from the compiled module.

```js
import Button from 'svelma/src/components/Button.svelte'
import Button from 'svelma/src/components/Button.svelte'; // Use this
// import { Button } from 'svelma'; // Don't use this
```

instead of

```js
import { Button } from 'svelma'
```


# Inspiration
## License

Much thanks to the [Buefy](https://buefy.org) and [Svelma2](https://github.com/abbychau/svelma2) projects! It provided the inspiration and lots of code examples for this version of Svelma.
See attached [Licence](LICENCE)
6 changes: 3 additions & 3 deletions docs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh

# abort on errors
set -e
Expand All @@ -17,6 +17,6 @@ git init
git add -A
git commit -m 'deploy'

git push -f https://${GITHUB_TOKEN_SVELMA}@github.com/c0bra/svelma.git master:gh-pages
git push -f git@github.com:saravanabalagi/svelma.git main:gh-pages

cd -
cd -
Loading