svelte-remix 0.2.1 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +40 -0
  2. package/package.json +10 -9
package/README.md CHANGED
@@ -56,6 +56,38 @@ In a svelte file:
56
56
  <InboxUnarchiveLineBUSINESS />
57
57
  ```
58
58
 
59
+ ## Faster compiling
60
+
61
+ For faster compilation, you can import the icon directly.
62
+
63
+ ```html
64
+ <script>
65
+ import BankFillBUILDINGS from 'svelte-remix/BankFillBUILDINGS.svelte';
66
+ </script>
67
+
68
+ <BankFillBUILDINGS />
69
+ ```
70
+
71
+ If you are TypeScript user, **this require `"typescript": "^5.0.0"`.**
72
+
73
+ As of March 2023, the `typescript@beta` version is now available:
74
+
75
+ ```sh
76
+ pnpm i -D typescript@beta
77
+ ```
78
+
79
+ To avoid any complaints from the editor, add `node16` or `nodenext` to `moduleResolution` in your tsconfig.json file.
80
+
81
+ ```json
82
+ {
83
+ //...
84
+ "compilerOptions": {
85
+ // ...
86
+ "moduleResolution": "nodenext"
87
+ }
88
+ }
89
+ ```
90
+
59
91
  ## Size
60
92
 
61
93
  Use the `size` prop to change the size of icons.
@@ -111,6 +143,14 @@ Use `ariaLabel` prop to modify the `aria-label` value.
111
143
  <BankFillBUILDINGS ariaLabel="bank buildings svg icon" />
112
144
  ```
113
145
 
146
+ ## Unfocusable icon
147
+
148
+ If you want to make an icon unfocusable, add `tabindex="-1"`.
149
+
150
+ ```html
151
+ <BankFillBUILDINGS tabindex="-1" />
152
+ ```
153
+
114
154
  ## Passing down other attributes
115
155
 
116
156
  You can pass other attibutes as well.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-remix",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "description": "Svelte Remix Icon components",
5
5
  "author": {
6
6
  "name": "Shinichi Okada",
@@ -23,13 +23,8 @@
23
23
  "lint": "prettier --plugin-search-dir . --check . && eslint .",
24
24
  "format": "prettier --plugin-search-dir . --write .",
25
25
  "write-package-json": "node ./scripts/package-json-writer.js",
26
- "package:publish": "standard-version && git push --follow-tags origin main && npm run package && npm run write-package-json && npm publish"
27
- },
28
- "exports": {
29
- ".": {
30
- "types": "./dist/index.d.ts",
31
- "svelte": "./dist/index.js"
32
- }
26
+ "add-exports": "node ./scripts/add-exports-to-package-json.js",
27
+ "package:publish": "standard-version && git push --follow-tags origin main && npm run package && npm run add-exports && npm run write-package-json && npm publish"
33
28
  },
34
29
  "files": [
35
30
  "dist"
@@ -70,5 +65,11 @@
70
65
  "repository": {
71
66
  "type": "git",
72
67
  "url": "https://github.com/shinokada/svelte-remix-icons"
68
+ },
69
+ "exports": {
70
+ ".": {
71
+ "types": "./dist/index.d.ts",
72
+ "svelte": "./dist/index.js"
73
+ }
73
74
  }
74
- }
75
+ }