@lion/ui 0.11.6 → 0.12.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.
Files changed (53) hide show
  1. package/README.md +1 -1
  2. package/components/input-amount/src/parsers.js +1 -1
  3. package/components/input-amount/test/parsers.test.js +5 -0
  4. package/dist-types/tsconfig.tsbuildinfo +1 -1
  5. package/docs/components/checkbox-group/overview.md +2 -2
  6. package/docs/components/collapsible/overview.md +1 -1
  7. package/docs/components/combobox/overview.md +1 -1
  8. package/docs/components/combobox/use-cases.md +1 -1
  9. package/docs/components/dialog/overview.md +1 -1
  10. package/docs/components/fieldset/overview.md +5 -5
  11. package/docs/components/form/overview.md +3 -3
  12. package/docs/components/form/use-cases.md +2 -2
  13. package/docs/components/icon/use-cases.md +1 -1
  14. package/docs/components/input/overview.md +1 -1
  15. package/docs/components/input-amount/overview.md +3 -3
  16. package/docs/components/input-date/overview.md +3 -3
  17. package/docs/components/input-datepicker/overview.md +5 -5
  18. package/docs/components/input-email/overview.md +2 -2
  19. package/docs/components/input-file/overview.md +1 -1
  20. package/docs/components/input-iban/overview.md +2 -2
  21. package/docs/components/input-range/overview.md +2 -2
  22. package/docs/components/input-stepper/overview.md +1 -1
  23. package/docs/components/input-tel/overview.md +1 -1
  24. package/docs/components/input-tel/use-cases.md +6 -6
  25. package/docs/components/input-tel-dropdown/overview.md +1 -1
  26. package/docs/components/listbox/use-cases.md +1 -1
  27. package/docs/components/radio-group/overview.md +3 -3
  28. package/docs/components/select/use-cases.md +1 -1
  29. package/docs/components/select-rich/use-cases.md +1 -1
  30. package/docs/components/tabs/examples.md +1 -1
  31. package/docs/fundamentals/index.md +4 -4
  32. package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
  33. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
  34. package/docs/fundamentals/rationales/accessibility.md +1 -1
  35. package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
  36. package/docs/fundamentals/systems/core/overview.md +1 -1
  37. package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
  38. package/docs/fundamentals/systems/form/model-value.md +1 -1
  39. package/docs/fundamentals/systems/form/overview.md +28 -28
  40. package/docs/fundamentals/systems/form/validate.md +2 -2
  41. package/docs/fundamentals/systems/localize/overview.md +4 -4
  42. package/docs/fundamentals/systems/overlays/configuration.md +2 -2
  43. package/docs/fundamentals/systems/overlays/overview.md +5 -5
  44. package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
  45. package/docs/fundamentals/tools/helpers/overview.md +1 -1
  46. package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
  47. package/docs/guides/how-to/create-a-custom-field.md +5 -5
  48. package/docs/guides/how-to/create-a-form.md +4 -4
  49. package/docs/guides/how-to/extend-a-native-input.md +2 -2
  50. package/docs/guides/index.md +8 -8
  51. package/docs/guides/principles/index.md +5 -5
  52. package/docs/guides/principles/styling.md +1 -1
  53. package/package.json +1 -1
package/README.md CHANGED
@@ -44,7 +44,7 @@ They provide an unopinionated, white-label layer that can be extended to your ow
44
44
  - **High Performance:** Focused on great performance in all relevant browsers with a minimal number of dependencies.
45
45
  - **Accessibility:** Aimed at compliance with the WCAG 2.2 AA standard to create components that are accessible for everybody.
46
46
  - **Flexibility:** Provides solutions through Web Components and JavaScript classes which can be used, adopted and extended to fit all needs.
47
- - **Modern Code:** Lion is distributed as pure es modules.
47
+ - **Modern Code:** Lion is distributed as pure ES modules.
48
48
  - **Exposes functions/classes and Web Components:** Ships a functionality in its most appropriate form.
49
49
 
50
50
  > Note: Our demo examples might look simple and not very stylish. This is on purpose. They are designed to be basic so you can easily add your own styles to them to match your intended design, without dealing with styles that are already there.
@@ -31,7 +31,7 @@ function round(value, decimals) {
31
31
  * @param {FormatNumberOptions} [givenOptions] Locale Options
32
32
  */
33
33
  export function parseAmount(value, givenOptions) {
34
- const unmatchedInput = value.match(/[^0-9,.\- ]/g);
34
+ const unmatchedInput = value.match(/[^0-9,.\-\u2212 ]/g);
35
35
  // for the full paste behavior documentation:
36
36
  // ./docs/components/input-amount/use-cases.md#paste-behavior
37
37
  if (unmatchedInput && givenOptions?.mode !== 'pasted') {
@@ -71,4 +71,9 @@ describe('parseAmount()', async () => {
71
71
  parseAmount('123.456,78', { mode: 'user-edited', viewValueStates: ['formatted'] }),
72
72
  ).to.equal(123456.78);
73
73
  });
74
+
75
+ it('parses negative numbers', async () => {
76
+ expect(parseAmount('−15.00')).to.equal(-15);
77
+ expect(parseAmount('-333.33')).to.equal(-333.33);
78
+ });
74
79
  });