@nice-digital/nds-core 4.0.2-alpha.0 → 4.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-digital/nds-core",
3
- "version": "4.0.2-alpha.0",
3
+ "version": "4.0.3",
4
4
  "description": "Core code for the NICE Design System",
5
5
  "author": "Ian Routledge <ian.routledge@nice.org.uk>",
6
6
  "contributors": [
@@ -31,7 +31,7 @@
31
31
  "url": "https://github.com/nice-digital/nice-design-system/issues"
32
32
  },
33
33
  "dependencies": {
34
- "@nice-digital/icons": "^6.0.0-alpha.0",
34
+ "@nice-digital/icons": "^6.0.0",
35
35
  "sass-mq": "^6.0.0"
36
36
  },
37
37
  "peerDependencies": {
@@ -46,5 +46,5 @@
46
46
  "@types/node": "^18.11.9",
47
47
  "typescript": "^4.8.4"
48
48
  },
49
- "gitHead": "4e9cad8a2b94cdf4af05b18a6610835883bedf0e"
49
+ "gitHead": "ae51389ba2e51dbe9ee3849e71d44fd567fb2822"
50
50
  }
@@ -105,9 +105,17 @@ $filter-option-text-before-border: global.$black-tint-1;
105
105
  $filter-input-controls-border: global.$custom-grey-2;
106
106
 
107
107
  // Full bleed
108
- $full-bleed-background: global.$white;
109
- $full-bleed-light-background: global.$nice-teal;
110
- $full-bleed-light-text: global.$white;
108
+ $full-bleed-background: global.$nice-teal;
109
+ $full-bleed-background-dark: global.$nice-blue;
110
+ $full-bleed-background-light: global.$nice-cream-1;
111
+ $full-bleed-background-image-dark: global.$nice-black;
112
+ $full-bleed-background-image-light: global.$white;
113
+ $full-bleed-text: global.$white;
114
+ $full-bleed-text-dark: global.$white;
115
+ $full-bleed-text-light: global.$nice-black;
116
+ $full-bleed-text-transparent: global.$nice-black;
117
+ $full-bleed-text-image-dark: global.$white;
118
+ $full-bleed-text-image-light: global.$nice-black;
111
119
 
112
120
  // Hero
113
121
  $hero-background: global.$nice-blue-tint-1;
@@ -18,18 +18,6 @@ $base-line-height: 1.6;
18
18
  /// @since 3.0.0
19
19
  $link-hover-text-decoration-thickness: 0.1rem;
20
20
 
21
- /// Sans-serif font stack
22
- /// @since 2.0.0
23
- $font-family-sans: 'Inter, Roboto, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif';
24
-
25
- /// Serif font stack
26
- /// @since 2.0.0
27
- $font-family-serif: 'Lora, Georgia, Times, serif';
28
-
29
- /// Mono font stack
30
- /// @since 0.2.0
31
- $font-family-mono: 'Monaco, Menlo, Consolas, "Courier New", monospace';
32
-
33
21
  /// The font families in use across NICE.
34
22
  /// @prop {Font stack} sans [Inter, Helvetica Neue, Helvetica, Arial, sans-serif] The sans-serif font stack
35
23
  /// @prop {Font stack} serif [Lora, Georgia, Times, serif] The serif font stack
@@ -37,9 +25,9 @@ $font-family-mono: 'Monaco, Menlo, Consolas, "Courier New", monospace';
37
25
  /// @see font-family
38
26
  /// @since 0.2.0
39
27
  $font-families: (
40
- sans: $font-family-sans,
41
- serif: $font-family-serif,
42
- mono: $font-family-mono
28
+ sans: var(--sans-font-family),
29
+ serif: var(--serif-font-family),
30
+ mono: var(--mono-font-family)
43
31
  );
44
32
 
45
33
  /// The modular scale ratio to use for typography
@@ -1 +0,0 @@
1
- export {};
package/es/utils.test.js DELETED
@@ -1,64 +0,0 @@
1
- "use strict";
2
- /* eslint-env node, mocha, jquery */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- const utils_1 = require("./utils");
5
- describe("Utils", function () {
6
- describe("slugify", function () {
7
- it("lowercases the input", function () {
8
- let s = (0, utils_1.slugify)("DOGBONE");
9
- expect(s).toEqual("dogbone");
10
- });
11
- it("replaces space characters with dashes", function () {
12
- let s = (0, utils_1.slugify)("dog bone");
13
- expect(s).toEqual("dog-bone");
14
- });
15
- it("replaces multiple space characters with single dash", function () {
16
- let s = (0, utils_1.slugify)("dog bone");
17
- expect(s).toEqual("dog-bone");
18
- });
19
- it("replaces multiple dash characters with single dash", function () {
20
- let s = (0, utils_1.slugify)("dog--bone");
21
- expect(s).toEqual("dog-bone");
22
- });
23
- it("replaces ampersands with the word 'and'", function () {
24
- let s = (0, utils_1.slugify)("dog & bone");
25
- expect(s).toEqual("dog-and-bone");
26
- });
27
- it("replaces non word characters", function () {
28
- let s = (0, utils_1.slugify)("dog () & * bone 2");
29
- expect(s).toEqual("dog-and-bone-2");
30
- });
31
- it("removes dashes from the start", function () {
32
- let s = (0, utils_1.slugify)("* dog");
33
- expect(s).toEqual("dog");
34
- });
35
- it("removes dashes from the end", function () {
36
- let s = (0, utils_1.slugify)("dog *");
37
- expect(s).toEqual("dog");
38
- });
39
- });
40
- describe("nextUniqueId", function () {
41
- it("prefixes with 'uid' by default", function () {
42
- expect((0, utils_1.nextUniqueId)().indexOf("uid-")).toEqual(0);
43
- });
44
- it("prefixes with the given prefix", function () {
45
- expect((0, utils_1.nextUniqueId)("test").indexOf("test-")).toEqual(0);
46
- });
47
- it("increments counter on subsequent calls", function () {
48
- const idA = (0, utils_1.nextUniqueId)().match(/\d+/), idB = (0, utils_1.nextUniqueId)().match(/\d+/);
49
- let a = Number(idA ? idA[0] : null), b = Number(idB ? idB[0] : null);
50
- expect(b).toEqual(a + 1);
51
- });
52
- });
53
- describe("camelCase", function () {
54
- it("turns a Title Case string into a camelCase string", function () {
55
- expect((0, utils_1.camelCase)("Title Case")).toEqual("titleCase");
56
- });
57
- it("turns a Sentence case string into a camelCase string", function () {
58
- expect((0, utils_1.camelCase)("Sentence case")).toEqual("sentenceCase");
59
- });
60
- it("turns a kebab-case string into a camelCase string", function () {
61
- expect((0, utils_1.camelCase)("this-is-kebab-case")).toEqual("thisIsKebabCase");
62
- });
63
- });
64
- });