@nice-digital/nds-core 4.0.17-alpha-node-update.0 → 4.0.18-alpha.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/es/utils.d.ts
CHANGED
|
@@ -68,11 +68,13 @@ export declare const nextUniqueId: (prefix?: string) => string;
|
|
|
68
68
|
* @param {string} str The string to camel case
|
|
69
69
|
*/
|
|
70
70
|
export declare const camelCase: (str: string) => string;
|
|
71
|
+
export declare const isValidHeadingLevel: (level: number) => boolean;
|
|
71
72
|
declare const _default: {
|
|
72
73
|
throttle: (fn: Function, threshold?: number, scope?: Object | null) => () => void;
|
|
73
74
|
debounce: (func: Function, execAsap?: boolean, threshold?: number, scope?: Object | null) => () => void;
|
|
74
75
|
slugify: (str: string) => string;
|
|
75
76
|
nextUniqueId: (prefix?: string) => string;
|
|
76
77
|
camelCase: (str: string) => string;
|
|
78
|
+
isValidHeadingLevel: (level: number) => boolean;
|
|
77
79
|
};
|
|
78
80
|
export default _default;
|
package/es/utils.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Utility functions
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.camelCase = exports.nextUniqueId = exports.slugify = exports.debounce = exports.throttle = exports.trim = void 0;
|
|
7
|
+
exports.isValidHeadingLevel = exports.camelCase = exports.nextUniqueId = exports.slugify = exports.debounce = exports.throttle = exports.trim = void 0;
|
|
8
8
|
/**
|
|
9
9
|
* Trims whitespace characters from the start and end of a string.
|
|
10
10
|
* This utility method exists because String.prototype.trim is
|
|
@@ -131,10 +131,15 @@ const camelCase = function (str) {
|
|
|
131
131
|
.replace(/\s+/g, "");
|
|
132
132
|
};
|
|
133
133
|
exports.camelCase = camelCase;
|
|
134
|
+
const isValidHeadingLevel = (level) => {
|
|
135
|
+
return Number.isInteger(level) && level >= 1 && level <= 6;
|
|
136
|
+
};
|
|
137
|
+
exports.isValidHeadingLevel = isValidHeadingLevel;
|
|
134
138
|
exports.default = {
|
|
135
139
|
throttle: exports.throttle,
|
|
136
140
|
debounce: exports.debounce,
|
|
137
141
|
slugify: exports.slugify,
|
|
138
142
|
nextUniqueId: exports.nextUniqueId,
|
|
139
|
-
camelCase: exports.camelCase
|
|
143
|
+
camelCase: exports.camelCase,
|
|
144
|
+
isValidHeadingLevel: exports.isValidHeadingLevel
|
|
140
145
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-digital/nds-core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.18-alpha.0",
|
|
4
4
|
"description": "Core code for the NICE Design System",
|
|
5
5
|
"author": "Ian Routledge <ian.routledge@nice.org.uk>",
|
|
6
6
|
"contributors": [
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"@types/node": "22.19.0",
|
|
48
48
|
"typescript": "^5.9.3"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "d1bac6f89a952c97aeaf5d9d0ee9d99ee35a3ed3"
|
|
51
51
|
}
|
|
@@ -9,7 +9,7 @@ $link-visited: global.$custom-purple-1;
|
|
|
9
9
|
$link-active: global.$nice-black;
|
|
10
10
|
$link-focus: global.$custom-blue-1;
|
|
11
11
|
$link-inverse: global.$white;
|
|
12
|
-
$link-inverse-hover: global.$
|
|
12
|
+
$link-inverse-hover: global.$white;
|
|
13
13
|
$link-inverse-visited: global.$white;
|
|
14
14
|
$link-inverse-active: global.$custom-blue-3-tint;
|
|
15
15
|
$link-inverse-focus: global.$white;
|
|
@@ -78,8 +78,8 @@ $accrordion-label-text-hover: global.$nice-blue-tint-4;
|
|
|
78
78
|
// Action banner
|
|
79
79
|
$action-banner-default-background: global.$nice-blue;
|
|
80
80
|
$action-banner-default-border: global.$nice-black;
|
|
81
|
-
$action-banner-subtle-background: global.$nice-cream;
|
|
82
|
-
$action-banner-subtle-border: global.$nice-cream;
|
|
81
|
+
$action-banner-subtle-background: global.$nice-cream-1;
|
|
82
|
+
$action-banner-subtle-border: global.$nice-cream-1;
|
|
83
83
|
$action-banner-full-width-background: global.$nice-teal;
|
|
84
84
|
$action-banner-full-width-border: global.$nice-teal;
|
|
85
85
|
$action-banner-full-width-subtle-background: global.$nice-cream-3;
|
|
@@ -109,6 +109,7 @@ $enhanced-pagination-link-hover-background: global.$white;
|
|
|
109
109
|
// Filters
|
|
110
110
|
$filter-panel-background: global.$custom-grey-4;
|
|
111
111
|
$filter-panel-heading-button-background: global.$custom-grey-2;
|
|
112
|
+
$filter-group-border: global.$black-tint-2;
|
|
112
113
|
$filter-group-heading-background: global.$custom-grey-2;
|
|
113
114
|
$filter-group-heading-button-background: global.$custom-grey-2;
|
|
114
115
|
$filter-group-heading-button-background-hover: global.$custom-grey-1;
|
|
@@ -157,7 +158,7 @@ $page-header-full-width-dark-background-text-colour: global.$white;
|
|
|
157
158
|
$page-header-second-section-border-colour: global.$black-tint-2;
|
|
158
159
|
|
|
159
160
|
// Panels
|
|
160
|
-
$panel-default-background: global.$nice-cream;
|
|
161
|
+
$panel-default-background: global.$nice-cream-3;
|
|
161
162
|
$panel-default-border: global.$custom-grey-2;
|
|
162
163
|
$panel-impact-background: global.$nice-blue;
|
|
163
164
|
$panel-impact-border: global.$nice-blue;
|
|
@@ -137,15 +137,6 @@
|
|
|
137
137
|
padding: 0;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
/// Text truncate
|
|
141
|
-
/// Requires inline-block or block for proper styling
|
|
142
|
-
/// @since 0.1.0
|
|
143
|
-
@mixin text-truncate {
|
|
144
|
-
overflow: hidden;
|
|
145
|
-
text-overflow: ellipsis;
|
|
146
|
-
white-space: nowrap;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
140
|
/// Set and element to display as block and align
|
|
150
141
|
/// centrally via auto left/right margins
|
|
151
142
|
/// @since 0.1.0
|
|
@@ -16,7 +16,7 @@ $base-line-height: 1.6;
|
|
|
16
16
|
|
|
17
17
|
/// Default text decoration thickness for link hover
|
|
18
18
|
/// @since 3.0.0
|
|
19
|
-
$link-hover-text-decoration-thickness: 0.
|
|
19
|
+
$link-hover-text-decoration-thickness: max(3px, 0.1875rem, 0.12em);
|
|
20
20
|
|
|
21
21
|
/// The font families in use across NICE.
|
|
22
22
|
/// @prop {Font stack} sans [Inter, Helvetica Neue, Helvetica, Arial, sans-serif] The sans-serif font stack
|