@new-ui/effects 0.1.0

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.
@@ -0,0 +1,20 @@
1
+ name: Publish npm package
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+ - uses: actions/setup-node@v3
13
+ with:
14
+ node-version: 18.11.0
15
+ - run: npm install && npm run build
16
+ - uses: JS-DevTools/npm-publish@v1
17
+ with:
18
+ token: ${{ secrets.NPM_TOKEN }}
19
+ access: public
20
+
package/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # New UI Effects
2
+
3
+ ![](assets/cover.png)
4
+
5
+ ## Install
6
+ Install New UI Effects from your terminal via npm.
7
+ ```
8
+ npm i @new-ui/effects
9
+ ```
10
+
11
+ To get started quickly, you can use the CDN files.
12
+ ```html
13
+ <!-- Place this at the html head -->
14
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@new-ui/effects@<version>/dist/index.css">
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ```scss
20
+ // Place this at the top of your SCSS/CSS file
21
+ @import "@new-ui/effects";
22
+ ```
23
+
24
+ ## Usage Guide
25
+
26
+ - Tokens defined in the figma file matches variables declared in CSS
27
+ - All classes associated with the design system are prefixed with a global namespace followed by a hyphen: `nu-`
28
+ - In addition to a global namespace, we added prefixes to each class to make it more apparent what job that class is doing using BEM syntax
29
+ * `c-` for UI components, such as `.nu-c-h1` or `.nu-c-card`
30
+ * `l-` for layout-related styles, such as `.nu-l-grid__item` or `.nu-l--two-column`
31
+ * `u-` for utilities, such as `.nu-u-mb-<spacing-token>` or `.nu-u-margin-bottom-pt2`
32
+ * `is-` and has- for specific states, such as `.nu-is-active` or `.nu-is-disabled`. These state-based classes - would apply to
33
+ * `js-` for targeting JavaScript-specific functionality, such as `.js-modal-trigger`. No styles are bound to these classes; they’re reserved for behavior only. For most cases, these `js-` classes would toggle - state-based classes to an element.
34
+
Binary file
package/dist/index.css ADDED
@@ -0,0 +1,2 @@
1
+ :root{--dialog-strong:0px 16px 48px #0000003d;--dialog:0px 4px 8px #0000001f;--content:0px 2px 4px #00000014;--canvas:0px 0px 0px #0000;--keyboard-key:0 2px 0px var(--grey4);--focus-default:0px 0px 0px 2px var(--blue5);--focus-accent:0px 0px 0px 2px var(--blue8);--focus-inverse:0px 0px 0px 2px var(--white);--border-muted-width-01:inset 0px 0px 0px 1px var(--grey2);--border-muted-width-02:inset 0px 0px 0px 2px var(--grey2);--border-muted-width-04:inset 0px 0px 0px 4px var(--grey2);--border-width-01:inset 0px 0px 0px 1px var(--grey4);--border-width-02:inset 0px 0px 0px 2px var(--grey4);--border-width-04:inset 0px 0px 0px 4px var(--grey4);--border-strong-muted-width-01:inset 0px 0px 0px 1px var(--grey6);--border-strong-muted-width-02:inset 0px 0px 0px 2px var(--grey6);--border-strong-muted-width-04:inset 0px 0px 0px 4px var(--grey6);--border-bottom-muted-width-01:inset 0px -1px 0px var(--grey2);--border-bottom-width-01:inset 0px -1px 0px var(--grey4);--border-bottom-strong-width-01:inset 0px -1px 0px var(--grey6);--border-bottom-muted-width-02:inset 0px -2px 0px var(--grey2);--border-bottom-width-02:inset 0px -2px 0px var(--grey4);--border-bottom-strong-width-02:inset 0px -2px 0px var(--grey6)}.sh-dialog--strong{box-shadow:var(--dialog--strong)}.sh-dialog{box-shadow:var(--dialog)}.sh-content{box-shadow:var(--content)}.sh-canvas{box-shadow:var(--canvas)}.sh-default{box-shadow:var(--focus-default)}.sh-accent{box-shadow:var(--focus-accent)}.sh-inverse{box-shadow:var(--focus-inverse)}
2
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"mappings":"AEAA,0rCCAA,oDAIA,oCAIA,sCAIA,oCAIA,4CAIA,0CAIA","sources":["index.css","src/index.scss","src/_variables.scss","src/_utilities.scss"],"sourcesContent":[":root {\n --dialog-strong: 0px 16px 48px #0000003d;\n --dialog: 0px 4px 8px #0000001f;\n --content: 0px 2px 4px #00000014;\n --canvas: 0px 0px 0px #0000;\n --keyboard-key: 0 2px 0px var(--grey4);\n --focus-default: 0px 0px 0px 2px var(--blue5);\n --focus-accent: 0px 0px 0px 2px var(--blue8);\n --focus-inverse: 0px 0px 0px 2px var(--white);\n --border-muted-width-01: inset 0px 0px 0px 1px var(--grey2);\n --border-muted-width-02: inset 0px 0px 0px 2px var(--grey2);\n --border-muted-width-04: inset 0px 0px 0px 4px var(--grey2);\n --border-width-01: inset 0px 0px 0px 1px var(--grey4);\n --border-width-02: inset 0px 0px 0px 2px var(--grey4);\n --border-width-04: inset 0px 0px 0px 4px var(--grey4);\n --border-strong-muted-width-01: inset 0px 0px 0px 1px var(--grey6);\n --border-strong-muted-width-02: inset 0px 0px 0px 2px var(--grey6);\n --border-strong-muted-width-04: inset 0px 0px 0px 4px var(--grey6);\n --border-bottom-muted-width-01: inset 0px -1px 0px var(--grey2);\n --border-bottom-width-01: inset 0px -1px 0px var(--grey4);\n --border-bottom-strong-width-01: inset 0px -1px 0px var(--grey6);\n --border-bottom-muted-width-02: inset 0px -2px 0px var(--grey2);\n --border-bottom-width-02: inset 0px -2px 0px var(--grey4);\n --border-bottom-strong-width-02: inset 0px -2px 0px var(--grey6);\n}\n\n.sh-dialog--strong {\n box-shadow: var(--dialog--strong);\n}\n\n.sh-dialog {\n box-shadow: var(--dialog);\n}\n\n.sh-content {\n box-shadow: var(--content);\n}\n\n.sh-canvas {\n box-shadow: var(--canvas);\n}\n\n.sh-default {\n box-shadow: var(--focus-default);\n}\n\n.sh-accent {\n box-shadow: var(--focus-accent);\n}\n\n.sh-inverse {\n box-shadow: var(--focus-inverse);\n}\n\n/*# sourceMappingURL=index.css.map */\n","@import 'variables';\n@import 'utilities';\n@import 'components';",":root {\n // Shadows\n --dialog-strong: 0px 16px 48px rgba(0, 0, 0, 0.24);\n --dialog: 0px 4px 8px rgba(0, 0, 0, 0.12);\n --content: 0px 2px 4px rgba(0, 0, 0, 0.08);\n --canvas: 0px 0px 0px rgba(0, 0, 0, 0);\n --keyboard-key: 0 2px 0px var(--grey4);\n\n // Focus\n --focus-default: 0px 0px 0px 2px var(--blue5);\n --focus-accent: 0px 0px 0px 2px var(--blue8);\n --focus-inverse: 0px 0px 0px 2px var(--white);\n\n // Border widths\n --border-muted-width-01: inset 0px 0px 0px 1px var(--grey2);\n --border-muted-width-02: inset 0px 0px 0px 2px var(--grey2);\n --border-muted-width-04: inset 0px 0px 0px 4px var(--grey2);\n --border-width-01: inset 0px 0px 0px 1px var(--grey4);\n --border-width-02: inset 0px 0px 0px 2px var(--grey4);\n --border-width-04: inset 0px 0px 0px 4px var(--grey4);\n --border-strong-muted-width-01: inset 0px 0px 0px 1px var(--grey6);\n --border-strong-muted-width-02: inset 0px 0px 0px 2px var(--grey6);\n --border-strong-muted-width-04: inset 0px 0px 0px 4px var(--grey6);\n --border-bottom-muted-width-01: inset 0px -1px 0px var(--grey2);\n --border-bottom-width-01: inset 0px -1px 0px var(--grey4);\n --border-bottom-strong-width-01: inset 0px -1px 0px var(--grey6);\n --border-bottom-muted-width-02: inset 0px -2px 0px var(--grey2);\n --border-bottom-width-02: inset 0px -2px 0px var(--grey4);\n --border-bottom-strong-width-02: inset 0px -2px 0px var(--grey6);\n}",".sh-dialog--strong {\n box-shadow: var(--dialog--strong);\n}\n\n.sh-dialog {\n box-shadow: var(--dialog);\n}\n\n.sh-content {\n box-shadow: var(--content);\n}\n\n.sh-canvas {\n box-shadow: var(--canvas);\n}\n\n.sh-default {\n box-shadow: var(--focus-default);\n}\n\n.sh-accent {\n box-shadow: var(--focus-accent);\n}\n\n.sh-inverse {\n box-shadow: var(--focus-inverse);\n}"],"names":[],"version":3,"file":"index.css.map"}
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@new-ui/effects",
3
+ "version": "0.1.0",
4
+ "description": "![](cover/cover.png)",
5
+ "source": "src/index.scss",
6
+ "main": "dist/index.css",
7
+ "targets": {
8
+ "main": false
9
+ },
10
+ "scripts": {
11
+ "watch": "parcel watch",
12
+ "build": "parcel build"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/NewDesignFile/effects.git"
17
+ },
18
+ "author": "Abhimanyu Rana",
19
+ "license": "MIT",
20
+ "bugs": {
21
+ "url": "https://github.com/NewDesignFile/effects/issues"
22
+ },
23
+ "homepage": "https://github.com/NewDesignFile/effects#readme",
24
+ "devDependencies": {
25
+ "@parcel/transformer-sass": "^2.8.3",
26
+ "autoprefixer": "^10.4.13",
27
+ "parcel": "^2.8.3"
28
+ }
29
+ }
File without changes
@@ -0,0 +1,27 @@
1
+ .sh-dialog--strong {
2
+ box-shadow: var(--dialog--strong);
3
+ }
4
+
5
+ .sh-dialog {
6
+ box-shadow: var(--dialog);
7
+ }
8
+
9
+ .sh-content {
10
+ box-shadow: var(--content);
11
+ }
12
+
13
+ .sh-canvas {
14
+ box-shadow: var(--canvas);
15
+ }
16
+
17
+ .sh-default {
18
+ box-shadow: var(--focus-default);
19
+ }
20
+
21
+ .sh-accent {
22
+ box-shadow: var(--focus-accent);
23
+ }
24
+
25
+ .sh-inverse {
26
+ box-shadow: var(--focus-inverse);
27
+ }
@@ -0,0 +1,30 @@
1
+ :root {
2
+ // Shadows
3
+ --dialog-strong: 0px 16px 48px rgba(0, 0, 0, 0.24);
4
+ --dialog: 0px 4px 8px rgba(0, 0, 0, 0.12);
5
+ --content: 0px 2px 4px rgba(0, 0, 0, 0.08);
6
+ --canvas: 0px 0px 0px rgba(0, 0, 0, 0);
7
+ --keyboard-key: 0 2px 0px var(--grey4);
8
+
9
+ // Focus
10
+ --focus-default: 0px 0px 0px 2px var(--blue5);
11
+ --focus-accent: 0px 0px 0px 2px var(--blue8);
12
+ --focus-inverse: 0px 0px 0px 2px var(--white);
13
+
14
+ // Border widths
15
+ --border-muted-width-01: inset 0px 0px 0px 1px var(--grey2);
16
+ --border-muted-width-02: inset 0px 0px 0px 2px var(--grey2);
17
+ --border-muted-width-04: inset 0px 0px 0px 4px var(--grey2);
18
+ --border-width-01: inset 0px 0px 0px 1px var(--grey4);
19
+ --border-width-02: inset 0px 0px 0px 2px var(--grey4);
20
+ --border-width-04: inset 0px 0px 0px 4px var(--grey4);
21
+ --border-strong-muted-width-01: inset 0px 0px 0px 1px var(--grey6);
22
+ --border-strong-muted-width-02: inset 0px 0px 0px 2px var(--grey6);
23
+ --border-strong-muted-width-04: inset 0px 0px 0px 4px var(--grey6);
24
+ --border-bottom-muted-width-01: inset 0px -1px 0px var(--grey2);
25
+ --border-bottom-width-01: inset 0px -1px 0px var(--grey4);
26
+ --border-bottom-strong-width-01: inset 0px -1px 0px var(--grey6);
27
+ --border-bottom-muted-width-02: inset 0px -2px 0px var(--grey2);
28
+ --border-bottom-width-02: inset 0px -2px 0px var(--grey4);
29
+ --border-bottom-strong-width-02: inset 0px -2px 0px var(--grey6);
30
+ }
package/src/index.scss ADDED
@@ -0,0 +1,3 @@
1
+ @import 'variables';
2
+ @import 'utilities';
3
+ @import 'components';