@ni/fast-foundation 0.0.5 → 10.0.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.
- package/README.md +14 -39
- package/package.json +14 -15
package/README.md
CHANGED
|
@@ -1,58 +1,33 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<p><b>ni | fast | foundation</b></p>
|
|
3
|
+
</div>
|
|
4
|
+
|
|
1
5
|
# FAST Foundation
|
|
2
6
|
|
|
3
|
-
[](https://badge.fury.io/js/%40microsoft%2Ffast-foundation)
|
|
7
|
+
[](https://www.npmjs.com/package/@ni/fast-foundation)
|
|
5
8
|
|
|
6
|
-
The `fast-foundation` package is a library of Web Component classes, templates, and other utilities intended to be composed into registered Web Components by design systems (e.g.
|
|
9
|
+
The `fast-foundation` package is a library of Web Component classes, templates, and other utilities intended to be composed into registered Web Components by design systems (e.g. [NI Nimble Design System](https://nimble.ni.dev/), etc.). The exports of this package can generally be thought of as un-styled base components that implement semantic and accessible markup and behavior.
|
|
7
10
|
|
|
8
11
|
This package does not export Web Components registered as [custom elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) - it exports parts and pieces intended to be *composed* into Web Components, allowing you to implement your own design language by simply applying CSS styles and behaviors without having to write all the JavaScript that's involved in building production-quality component implementations.
|
|
9
12
|
|
|
10
|
-
##
|
|
11
|
-
|
|
12
|
-
### From NPM
|
|
13
|
+
## Getting Started
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
### Installing from NPM
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
npm install --save @microsoft/fast-foundation
|
|
18
|
-
```
|
|
17
|
+
To install the `fast-foundation` library, use `npm` as follows:
|
|
19
18
|
|
|
20
19
|
```shell
|
|
21
|
-
|
|
20
|
+
npm install @ni/fast-foundation
|
|
22
21
|
```
|
|
23
22
|
|
|
24
23
|
Within your JavaScript or TypeScript code, you can then import library APIs like this:
|
|
25
24
|
|
|
26
25
|
```ts
|
|
27
|
-
import { Anchor } from '@
|
|
26
|
+
import { Anchor } from '@ni/fast-foundation';
|
|
28
27
|
```
|
|
29
28
|
|
|
30
|
-
Looking for a setup that integrates with a particular front-end framework or bundler? Check out [
|
|
31
|
-
|
|
32
|
-
### From CDN
|
|
33
|
-
|
|
34
|
-
A pre-bundled script that contains all APIs needed to use FAST Foundation is available on CDN. You can use this script by adding [`type="module"`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) to the script element and then importing from the CDN.
|
|
29
|
+
Looking for a setup that integrates with a particular front-end framework or bundler? Check out the [FAST 1.x: integration docs](https://fast.design/docs/1.x/integrations/introduction).
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
<!DOCTYPE html>
|
|
38
|
-
<html lang="en">
|
|
39
|
-
<head>
|
|
40
|
-
<script type="module">
|
|
41
|
-
import { Anchor } from "https://cdn.jsdelivr.net/npm/@microsoft/fast-foundation/dist/fast-foundation.min.js";
|
|
42
|
-
|
|
43
|
-
// your code here
|
|
44
|
-
</script>
|
|
45
|
-
</head>
|
|
46
|
-
<!-- ... -->
|
|
47
|
-
</html>
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
The markup above always references the latest release. When deploying to production, you will want to ship with a specific version. Here's an example of the markup for that:
|
|
51
|
-
|
|
52
|
-
```html
|
|
53
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@microsoft/fast-foundation@2.26.2/dist/fast-foundation.min.js"></script>
|
|
54
|
-
```
|
|
31
|
+
### Documentation
|
|
55
32
|
|
|
56
|
-
|
|
57
|
-
For simplicity, examples throughout the documentation will assume the library has been installed from NPM, but you can always replace the import location with the CDN URL.
|
|
58
|
-
:::
|
|
33
|
+
See the [FAST 1.x: Creating a Component Library](https://fast.design/docs/1.x/design-systems/creating-a-component-library) documentation and related topics.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@ni/fast-foundation",
|
|
3
3
|
"description": "A library of Web Component building blocks",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.0
|
|
5
|
+
"version": "10.0.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "National Instruments"
|
|
8
8
|
},
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"main": "dist/esm/index.js",
|
|
21
21
|
"types": "dist/fast-foundation.d.ts",
|
|
22
22
|
"unpkg": "dist/fast-foundation.min.js",
|
|
23
|
-
"type": "module",
|
|
24
23
|
"scripts": {
|
|
25
24
|
"build": "npm run clean:dist && npm run build:tsc && npm run build:rollup && npm run doc",
|
|
26
25
|
"pack": "npm pack",
|
|
@@ -29,7 +28,7 @@
|
|
|
29
28
|
"test": "npm run test-chrome:verbose",
|
|
30
29
|
"clean:dist": "rimraf dist",
|
|
31
30
|
"doc": "api-extractor run --local",
|
|
32
|
-
"build:rollup": "rollup -c",
|
|
31
|
+
"build:rollup": "rollup --bundleConfigAsCjs -c",
|
|
33
32
|
"build:tsc": "tsc -p ./tsconfig.json",
|
|
34
33
|
"dev": "tsc -p ./tsconfig.json -w",
|
|
35
34
|
"tdd": "npm run dev & npm run test-chrome:watch",
|
|
@@ -40,24 +39,24 @@
|
|
|
40
39
|
"eslint:fix": "eslint . --ext .ts --fix",
|
|
41
40
|
"test-node": "mocha --reporter min --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'",
|
|
42
41
|
"test-node:verbose": "mocha --reporter spec --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'",
|
|
43
|
-
"test-chrome": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run
|
|
44
|
-
"test-chrome:verbose": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --
|
|
45
|
-
"test-chrome:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --
|
|
42
|
+
"test-chrome": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run",
|
|
43
|
+
"test-chrome:verbose": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --reporter=mocha",
|
|
44
|
+
"test-chrome:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --watch-extensions js",
|
|
46
45
|
"test-chrome:debugger": "karma start karma.conf.cjs --browsers=ChromeDebugging",
|
|
47
|
-
"test-chrome:verbose:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --
|
|
46
|
+
"test-chrome:verbose:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --watch-extensions js --reporter=mocha",
|
|
48
47
|
"test-chrome:verbose:debugger": "karma start karma.conf.cjs --browsers=ChromeDebugging --reporter=mocha",
|
|
49
|
-
"test-firefox": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run
|
|
50
|
-
"test-firefox:verbose": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run --
|
|
51
|
-
"test-firefox:watch": "karma start karma.conf.cjs --browsers=FirefoxHeadless
|
|
48
|
+
"test-firefox": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run",
|
|
49
|
+
"test-firefox:verbose": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run --reporter=mocha",
|
|
50
|
+
"test-firefox:watch": "karma start karma.conf.cjs --browsers=FirefoxHeadless --watch-extensions js"
|
|
52
51
|
},
|
|
53
52
|
"devDependencies": {
|
|
54
53
|
"@microsoft/api-extractor": "7.49.1",
|
|
55
|
-
"@types/chai": "^
|
|
54
|
+
"@types/chai": "^4",
|
|
56
55
|
"@types/chai-spies": "^1.0.3",
|
|
57
56
|
"@types/karma": "^6.3.9",
|
|
58
57
|
"@types/mocha": "^10.0.10",
|
|
59
58
|
"@types/webpack-env": "^1.15.2",
|
|
60
|
-
"chai": "^
|
|
59
|
+
"chai": "^4",
|
|
61
60
|
"chai-spies": "^1.0.0",
|
|
62
61
|
"esm": "^3.2.25",
|
|
63
62
|
"ignore-loader": "^0.1.2",
|
|
@@ -72,6 +71,7 @@
|
|
|
72
71
|
"karma-sourcemap-loader": "^0.4.0",
|
|
73
72
|
"karma-webpack": "^5.0.1",
|
|
74
73
|
"mocha": "^11.0.1",
|
|
74
|
+
"playwright": "1.44.0",
|
|
75
75
|
"prettier": "3.4.2",
|
|
76
76
|
"rimraf": "^6.0.1",
|
|
77
77
|
"rollup": "^4.30.1",
|
|
@@ -83,14 +83,13 @@
|
|
|
83
83
|
"source-map": "^0.7.3",
|
|
84
84
|
"source-map-loader": "^5.0.0",
|
|
85
85
|
"ts-loader": "^9.5.2",
|
|
86
|
-
"ts-node": "^10.9.2",
|
|
87
86
|
"tsconfig-paths": "^4.2.0",
|
|
88
87
|
"typescript": "~5.4.5",
|
|
89
88
|
"webpack": "^5.97.1"
|
|
90
89
|
},
|
|
91
90
|
"dependencies": {
|
|
92
|
-
"@ni/fast-element": "^0.0
|
|
93
|
-
"@ni/fast-web-utilities": "^0.0
|
|
91
|
+
"@ni/fast-element": "^10.0.0",
|
|
92
|
+
"@ni/fast-web-utilities": "^10.0.0",
|
|
94
93
|
"tabbable": "^6.2.0",
|
|
95
94
|
"tslib": "^2.8.1"
|
|
96
95
|
},
|