@decidables/decidables-elements 0.0.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 (49) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +54 -0
  3. package/gulpfile.js +25 -0
  4. package/lib/decidablesElements.esm.js +4889 -0
  5. package/lib/decidablesElements.esm.js.map +1 -0
  6. package/lib/decidablesElements.esm.min.js +13 -0
  7. package/lib/decidablesElements.esm.min.js.map +1 -0
  8. package/lib/decidablesElements.umd.js +4907 -0
  9. package/lib/decidablesElements.umd.js.map +1 -0
  10. package/lib/decidablesElements.umd.min.js +13 -0
  11. package/lib/decidablesElements.umd.min.js.map +1 -0
  12. package/package.json +46 -0
  13. package/src/button.js +93 -0
  14. package/src/converter-array.js +15 -0
  15. package/src/converter-set.js +15 -0
  16. package/src/decidables-element.js +264 -0
  17. package/src/index.js +11 -0
  18. package/src/slider.js +333 -0
  19. package/src/spinner.js +149 -0
  20. package/src/switch.js +179 -0
  21. package/src/toggle-option.js +163 -0
  22. package/src/toggle.js +58 -0
  23. package/test/button.test.js +29 -0
  24. package/test/converter-array.test.js +14 -0
  25. package/test/converter-set.test.js +15 -0
  26. package/test/coverage/lcov-report/base.css +224 -0
  27. package/test/coverage/lcov-report/block-navigation.js +87 -0
  28. package/test/coverage/lcov-report/button.js.html +364 -0
  29. package/test/coverage/lcov-report/converter-array.js.html +130 -0
  30. package/test/coverage/lcov-report/converter-set.js.html +130 -0
  31. package/test/coverage/lcov-report/decidables-element.js.html +877 -0
  32. package/test/coverage/lcov-report/favicon.png +0 -0
  33. package/test/coverage/lcov-report/index.html +236 -0
  34. package/test/coverage/lcov-report/prettify.css +1 -0
  35. package/test/coverage/lcov-report/prettify.js +2 -0
  36. package/test/coverage/lcov-report/slider.js.html +1084 -0
  37. package/test/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  38. package/test/coverage/lcov-report/sorter.js +196 -0
  39. package/test/coverage/lcov-report/spinner.js.html +532 -0
  40. package/test/coverage/lcov-report/switch.js.html +622 -0
  41. package/test/coverage/lcov-report/toggle-option.js.html +574 -0
  42. package/test/coverage/lcov-report/toggle.js.html +259 -0
  43. package/test/coverage/lcov.info +1480 -0
  44. package/test/decidables-element.test.js +10 -0
  45. package/test/slider.test.js +64 -0
  46. package/test/spinner.test.js +55 -0
  47. package/test/switch.test.js +71 -0
  48. package/test/toggle-option.test.js +62 -0
  49. package/test/toggle.test.js +98 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ### 0.0.1 (2022-03-02)
7
+
8
+ **Note:** Version bump only for package @decidables/decidables-elements
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ <!--lint ignore first-heading-level-->
2
+
3
+ # decidables-elements: Basic UI Web Components for [**decidables**](https://github.com/decidables/decidables)
4
+
5
+ ## Contents
6
+
7
+ - Base class
8
+ - `DecidablesElement`: Base class for all *decidables* web components
9
+ - Elements
10
+ - `DecidablesButton`: Button for taking actions
11
+ - `DecidablesSlider`: Slider w/spinner for selecting a numeric value from a range
12
+ - `DecidablesSpinner`: Text field w/spinner arrows for selecting a continuous numeric value
13
+ - `DecidablesSwitch`: Switch for turning an option on or off
14
+ - `DecidablesToggle`: Toggle for selecting one option from a set
15
+ - `DecidablesToggleOption`: One option in a toggle set
16
+ - Utilities
17
+ - `DecidablesConverterArray`: Utility for attributes that can take an array of values
18
+ - `DecidablesConverterSet`: Utility for attributes that can take a set of values
19
+
20
+ ---
21
+
22
+ ## Features/Bugs/Notes
23
+
24
+ - Custom spinner that looks better than User Agent spinners?
25
+ - Edge/IE11 - slider shadow is clipped
26
+ - Edge/IE11 - no arrows for numeric controls
27
+ - Firefox - spinner arrows look ugly and asymmetrical
28
+ - IE11 - No CSS variables outside custom elements (and not patched by ShadyCSS!)
29
+
30
+ ---
31
+
32
+ ## Development Tooling
33
+
34
+ ### Local Scripts
35
+
36
+ - `yarn lint`
37
+ - Lints markdown, scripts and styles
38
+ - `yarn test`
39
+ - Runs tests and reports coverage in `test/coverage/`
40
+ - `yarn build`
41
+ - Builds bundles from `src/` to `lib/`
42
+
43
+ ---
44
+
45
+ ## File Organization
46
+
47
+ - `decidables-elements/`
48
+ - `lib/` (Bundles created from `src/` by `build`) **\[autogenerated\]**
49
+ - `src/` (Source files)
50
+ - `test/` (Testing files)
51
+ - `coverage/` (Code coverage results) **\[autogenerated\]**
52
+ - `gulpfile.js` (Config for *gulp*)
53
+ - `package.json` (Config for *yarn* and *npm*)
54
+ - `README.md` (This file)
package/gulpfile.js ADDED
@@ -0,0 +1,25 @@
1
+
2
+ // devDependencies
3
+ import gulp from 'gulp';
4
+
5
+ // Local dependencies
6
+ import * as cleans from '../../scripts/clean.js';
7
+ import * as lints from '../../scripts/lint.js';
8
+ import * as builds from '../../scripts/build.js';
9
+
10
+ // Re-export
11
+ export * from '../../scripts/clean.js';
12
+ export * from '../../scripts/lint.js';
13
+ export * from '../../scripts/build.js';
14
+
15
+ // Tasks
16
+ export const lint = gulp.parallel(
17
+ lints.lintMarkdown,
18
+ lints.lintScripts,
19
+ lints.lintStyles,
20
+ );
21
+
22
+ export const build = gulp.series(
23
+ cleans.cleanLib,
24
+ builds.buildLibrary,
25
+ );