@sb1/ffe-skeleton 100.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -0
- package/less/skeleton.less +42 -0
- package/package.json +31 -0
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# @sb1/ffe-skeleton
|
|
2
|
+
|
|
3
|
+
## Install
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install --save @sb1/ffe-skeleton
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
Full documentation on skeleton usage is available at https://design.sparebank1.no/komponenter/skeleton/.
|
|
12
|
+
|
|
13
|
+
```less
|
|
14
|
+
@import 'path/to/node_modules/@sb1/ffe-skeleton/less/skeleton';
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Importing compiled CSS
|
|
18
|
+
|
|
19
|
+
If your project does not use Less, you can import the compiled styling:
|
|
20
|
+
|
|
21
|
+
```css
|
|
22
|
+
@import '~@sb1/ffe-skeleton/css/skeleton.css';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
See also `@sb1/ffe-skeleton-react`.
|
|
26
|
+
|
|
27
|
+
## Development
|
|
28
|
+
|
|
29
|
+
To start a local development server, run the following from the designsystem root folder:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install
|
|
33
|
+
npm run build
|
|
34
|
+
npm start
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
A local instance of `component-overview` with live reloading will run at http://localhost:1234/.
|
|
38
|
+
|
|
39
|
+
Example implementations using the latest versions of all components are also available at https://sparebank1.github.io/designsystem.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.ffe-skeleton {
|
|
2
|
+
background: var(--ffe-color-surface-neutral-default);
|
|
3
|
+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
4
|
+
|
|
5
|
+
@media (prefers-reduced-motion: reduce) {
|
|
6
|
+
animation: none;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@keyframes pulse {
|
|
11
|
+
50% {
|
|
12
|
+
opacity: 0.5;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ffe-skeleton__box {
|
|
17
|
+
--ffe-skeleton-box-width: 100%;
|
|
18
|
+
--ffe-skeleton-box-height: 1em;
|
|
19
|
+
border-radius: var(--ffe-g-border-radius);
|
|
20
|
+
height: var(--ffe-skeleton-box-height);
|
|
21
|
+
width: var(--ffe-skeleton-box-width);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ffe-skeleton__circle {
|
|
25
|
+
--ffe-skeleton-circle-size: 24px;
|
|
26
|
+
border-radius: 50%;
|
|
27
|
+
width: var(--ffe-skeleton-circle-size);
|
|
28
|
+
height: var(--ffe-skeleton-circle-size);
|
|
29
|
+
|
|
30
|
+
&--sm {
|
|
31
|
+
--ffe-skeleton-circle-size: 20px;
|
|
32
|
+
}
|
|
33
|
+
&--md {
|
|
34
|
+
--ffe-skeleton-circle-size: 24px;
|
|
35
|
+
}
|
|
36
|
+
&--lg {
|
|
37
|
+
--ffe-skeleton-circle-size: 32px;
|
|
38
|
+
}
|
|
39
|
+
&--xl {
|
|
40
|
+
--ffe-skeleton-circle-size: 40px;
|
|
41
|
+
}
|
|
42
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sb1/ffe-skeleton",
|
|
3
|
+
"description": "Skeleton loading in ffe",
|
|
4
|
+
"version": "100.6.1",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "SpareBank1",
|
|
7
|
+
"files": [
|
|
8
|
+
"less",
|
|
9
|
+
"css"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "ssh://git@github.com:SpareBank1/designsystem.git"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"lint": "echo `Linting handled at root level with oxlint`",
|
|
17
|
+
"lint:style": "ffe-buildtool stylelint less/*.less",
|
|
18
|
+
"lint:style:fix": "ffe-buildtool stylelint --fix less/*.less",
|
|
19
|
+
"test": "npm run lint",
|
|
20
|
+
"build": "lessc less/skeleton.less css/skeleton.css --autoprefix"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@sb1/ffe-core": "^100.6.1"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@sb1/ffe-buildtool": "^100.6.1"
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
}
|
|
31
|
+
}
|