@gnist/design-system 7.3.0 → 7.4.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/CHANGELOG.md +12 -0
- package/dist/components/actions/chips/StatusIndicator.cjs +48 -0
- package/dist/components/actions/chips/StatusIndicator.d.ts +21 -0
- package/dist/components/actions/chips/StatusIndicator.d.ts.map +1 -0
- package/dist/components/actions/chips/StatusIndicator.js +46 -0
- package/dist/components/actions/chips/index.cjs +2 -0
- package/dist/components/actions/chips/index.d.ts +3 -0
- package/dist/components/actions/chips/index.d.ts.map +1 -1
- package/dist/components/actions/chips/index.js +2 -1
- package/dist/components/actions/chips/statusIndicator.css.cjs +85 -0
- package/dist/components/actions/chips/statusIndicator.css.d.ts +44 -0
- package/dist/components/actions/chips/statusIndicator.css.d.ts.map +1 -0
- package/dist/components/actions/chips/statusIndicator.css.js +82 -0
- package/dist/components/actions/index.cjs +2 -0
- package/dist/components/actions/index.js +2 -1
- package/dist/components/index.cjs +2 -0
- package/dist/components/index.js +2 -1
- package/dist/index.cjs +2 -0
- package/dist/index.js +2 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [7.4.0](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@7.3.1...@gnist/design-system@7.4.0) (2026-08-24)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* status indicator component ([54375be](https://github.com/mollerdigital/design-system-design-system/commit/54375be112849c841dab2177a491cf250eee3ddb))
|
|
11
|
+
|
|
12
|
+
## [7.3.1](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@7.3.0...@gnist/design-system@7.3.1) (2026-08-14)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* attempt to fix Show code in storybook ([ecf8686](https://github.com/mollerdigital/design-system-design-system/commit/ecf86863c107960a580e7297ae7f89c9689b8a47))
|
|
17
|
+
|
|
6
18
|
## [7.3.0](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@7.2.1...@gnist/design-system@7.3.0) (2026-07-20)
|
|
7
19
|
|
|
8
20
|
### Features
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_Icon = require("../../../foundation/iconography/Icon.cjs");
|
|
4
|
+
require("../../../foundation/index.cjs");
|
|
5
|
+
const require_statusIndicator_css = require("./statusIndicator.css.cjs");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let classnames = require("classnames");
|
|
8
|
+
classnames = require_runtime.__toESM(classnames, 1);
|
|
9
|
+
//#region src/components/actions/chips/StatusIndicator.tsx
|
|
10
|
+
var iconFor = (type) => {
|
|
11
|
+
switch (type) {
|
|
12
|
+
case "success": return "success";
|
|
13
|
+
case "warning": return "warning";
|
|
14
|
+
case "error": return "error";
|
|
15
|
+
case "info": return "info";
|
|
16
|
+
case "neutral": return "info";
|
|
17
|
+
default: return "info";
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A Status Indicator visually represents the state or condition of an item, process, or system. It provides users with quick, at-a-glance feedback — often using color, iconography, and text — to communicate whether something is active, in progress, completed, warning, or error.
|
|
22
|
+
*
|
|
23
|
+
* Status indicators help users understand system health, task progress, or connectivity without needing to read detailed information.
|
|
24
|
+
*
|
|
25
|
+
* Documentation: [StatusIndicator](https://gnist.moller.no/developers/components/latest/?path=/docs/components-actions-chips-statusindicator--docs)
|
|
26
|
+
*/
|
|
27
|
+
var StatusIndicator = ({ type, label, showIcon = true, className, "aria-label": ariaLabel }) => {
|
|
28
|
+
const iconOnly = !label;
|
|
29
|
+
const accessibleLabel = label ? void 0 : ariaLabel ?? type;
|
|
30
|
+
return (0, react_jsx_runtime.jsxs)("span", {
|
|
31
|
+
className: (0, classnames.default)(className, require_statusIndicator_css.statusIndicatorRecipe()),
|
|
32
|
+
"aria-label": accessibleLabel,
|
|
33
|
+
role: iconOnly ? "img" : void 0,
|
|
34
|
+
children: [showIcon ? (0, react_jsx_runtime.jsx)("span", {
|
|
35
|
+
className: require_statusIndicator_css.iconContainerRecipe({ type }),
|
|
36
|
+
children: (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
37
|
+
icon: iconFor(type),
|
|
38
|
+
size: "m"
|
|
39
|
+
})
|
|
40
|
+
}) : (0, react_jsx_runtime.jsx)("span", {
|
|
41
|
+
className: require_statusIndicator_css.dotRecipe({ type }),
|
|
42
|
+
"aria-hidden": true,
|
|
43
|
+
children: (0, react_jsx_runtime.jsx)("span", { className: require_statusIndicator_css.dotInnerRecipe({ type }) })
|
|
44
|
+
}), label && (0, react_jsx_runtime.jsx)("span", { children: label })]
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
exports.StatusIndicator = StatusIndicator;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StatusIndicatorType } from "./statusIndicator.css.js";
|
|
2
|
+
export interface StatusIndicatorProps {
|
|
3
|
+
/** Semantic status — drives color and default icon */
|
|
4
|
+
type: StatusIndicatorType;
|
|
5
|
+
/** Optional label. When omitted, renders an icon-only (or dot-only) chip. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Show the status icon glyph. When false, renders a filled colored dot instead. Default: true */
|
|
8
|
+
showIcon?: boolean;
|
|
9
|
+
/** Accessible label used when no visible label is provided */
|
|
10
|
+
"aria-label"?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A Status Indicator visually represents the state or condition of an item, process, or system. It provides users with quick, at-a-glance feedback — often using color, iconography, and text — to communicate whether something is active, in progress, completed, warning, or error.
|
|
15
|
+
*
|
|
16
|
+
* Status indicators help users understand system health, task progress, or connectivity without needing to read detailed information.
|
|
17
|
+
*
|
|
18
|
+
* Documentation: [StatusIndicator](https://gnist.moller.no/developers/components/latest/?path=/docs/components-actions-chips-statusindicator--docs)
|
|
19
|
+
*/
|
|
20
|
+
export declare const StatusIndicator: ({ type, label, showIcon, className, "aria-label": ariaLabel, }: StatusIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=StatusIndicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusIndicator.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/chips/StatusIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKH,mBAAmB,EACtB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,oBAAoB;IACjC,sDAAsD;IACtD,IAAI,EAAE,mBAAmB,CAAC;IAC1B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kGAAkG;IAClG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAmBD;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,mEAMzB,oBAAoB,4CAsBtB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Icon } from "../../../foundation/iconography/Icon.js";
|
|
3
|
+
import "../../../foundation/index.js";
|
|
4
|
+
import { dotInnerRecipe, dotRecipe, iconContainerRecipe, statusIndicatorRecipe } from "./statusIndicator.css.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import classNames from "classnames";
|
|
7
|
+
//#region src/components/actions/chips/StatusIndicator.tsx
|
|
8
|
+
var iconFor = (type) => {
|
|
9
|
+
switch (type) {
|
|
10
|
+
case "success": return "success";
|
|
11
|
+
case "warning": return "warning";
|
|
12
|
+
case "error": return "error";
|
|
13
|
+
case "info": return "info";
|
|
14
|
+
case "neutral": return "info";
|
|
15
|
+
default: return "info";
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A Status Indicator visually represents the state or condition of an item, process, or system. It provides users with quick, at-a-glance feedback — often using color, iconography, and text — to communicate whether something is active, in progress, completed, warning, or error.
|
|
20
|
+
*
|
|
21
|
+
* Status indicators help users understand system health, task progress, or connectivity without needing to read detailed information.
|
|
22
|
+
*
|
|
23
|
+
* Documentation: [StatusIndicator](https://gnist.moller.no/developers/components/latest/?path=/docs/components-actions-chips-statusindicator--docs)
|
|
24
|
+
*/
|
|
25
|
+
var StatusIndicator = ({ type, label, showIcon = true, className, "aria-label": ariaLabel }) => {
|
|
26
|
+
const iconOnly = !label;
|
|
27
|
+
const accessibleLabel = label ? void 0 : ariaLabel ?? type;
|
|
28
|
+
return jsxs("span", {
|
|
29
|
+
className: classNames(className, statusIndicatorRecipe()),
|
|
30
|
+
"aria-label": accessibleLabel,
|
|
31
|
+
role: iconOnly ? "img" : void 0,
|
|
32
|
+
children: [showIcon ? jsx("span", {
|
|
33
|
+
className: iconContainerRecipe({ type }),
|
|
34
|
+
children: jsx(Icon, {
|
|
35
|
+
icon: iconFor(type),
|
|
36
|
+
size: "m"
|
|
37
|
+
})
|
|
38
|
+
}) : jsx("span", {
|
|
39
|
+
className: dotRecipe({ type }),
|
|
40
|
+
"aria-hidden": true,
|
|
41
|
+
children: jsx("span", { className: dotInnerRecipe({ type }) })
|
|
42
|
+
}), label && jsx("span", { children: label })]
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { StatusIndicator };
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_ActionChip = require("./ActionChip.cjs");
|
|
4
4
|
const require_FilterChip = require("./FilterChip.cjs");
|
|
5
|
+
const require_StatusIndicator = require("./StatusIndicator.cjs");
|
|
5
6
|
const require_TagChip = require("./TagChip.cjs");
|
|
6
7
|
exports.ActionChip = require_ActionChip.ActionChip;
|
|
7
8
|
exports.FilterChip = require_FilterChip.FilterChip;
|
|
9
|
+
exports.StatusIndicator = require_StatusIndicator.StatusIndicator;
|
|
8
10
|
exports.TagChip = require_TagChip.TagChip;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { ActionChip } from "./ActionChip.js";
|
|
2
2
|
export { FilterChip } from "./FilterChip.js";
|
|
3
|
+
export { StatusIndicator } from "./StatusIndicator.js";
|
|
4
|
+
export type { StatusIndicatorProps } from "./StatusIndicator.js";
|
|
5
|
+
export type { StatusIndicatorType } from "./statusIndicator.css.js";
|
|
3
6
|
export { TagChip } from "./TagChip.js";
|
|
4
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/chips/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/chips/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ActionChip } from "./ActionChip.js";
|
|
3
3
|
import { FilterChip } from "./FilterChip.js";
|
|
4
|
+
import { StatusIndicator } from "./StatusIndicator.js";
|
|
4
5
|
import { TagChip } from "./TagChip.js";
|
|
5
|
-
export { ActionChip, FilterChip, TagChip };
|
|
6
|
+
export { ActionChip, FilterChip, StatusIndicator, TagChip };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
let _gnist_themes_atoms_css_js = require("@gnist/themes/atoms.css.js");
|
|
3
|
+
let _gnist_themes_layers_css_js = require("@gnist/themes/layers.css.js");
|
|
4
|
+
let _gnist_themes_tokens_css_js = require("@gnist/themes/tokens.css.js");
|
|
5
|
+
//#region src/components/actions/chips/statusIndicator.css.ts
|
|
6
|
+
var typeColors = (type) => {
|
|
7
|
+
if (type === "neutral") return (0, _gnist_themes_atoms_css_js.atoms)({
|
|
8
|
+
backgroundColor: "background",
|
|
9
|
+
color: "on-background",
|
|
10
|
+
borderColor: "on-background"
|
|
11
|
+
});
|
|
12
|
+
return (0, _gnist_themes_atoms_css_js.atoms)({
|
|
13
|
+
backgroundColor: `${type}-container`,
|
|
14
|
+
color: `on-${type}-container`,
|
|
15
|
+
borderColor: `on-${type}-container`
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
var statusIndicatorRecipe = (0, _gnist_themes_layers_css_js.gnistRecipe)({ base: [(0, _gnist_themes_atoms_css_js.atoms)({
|
|
19
|
+
display: "inline-flex",
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
gap: "xxs"
|
|
22
|
+
}), {
|
|
23
|
+
textWrap: "nowrap",
|
|
24
|
+
fontFamily: _gnist_themes_tokens_css_js.tokens.type.medium.body.fontFamily,
|
|
25
|
+
fontWeight: _gnist_themes_tokens_css_js.tokens.type.medium.body.fontWeight,
|
|
26
|
+
lineHeight: _gnist_themes_tokens_css_js.tokens.type.medium.body.lineHeight,
|
|
27
|
+
letterSpacing: _gnist_themes_tokens_css_js.tokens.type.medium.body.letterSpacing,
|
|
28
|
+
fontSize: _gnist_themes_tokens_css_js.tokens.type.medium.body.fontSize
|
|
29
|
+
}] });
|
|
30
|
+
var iconContainerRecipe = (0, _gnist_themes_layers_css_js.gnistRecipe)({
|
|
31
|
+
base: [(0, _gnist_themes_atoms_css_js.atoms)({
|
|
32
|
+
display: "inline-flex",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
justifyContent: "center",
|
|
35
|
+
borderRadius: "medium",
|
|
36
|
+
borderWidth: "small"
|
|
37
|
+
}), { borderStyle: "solid" }],
|
|
38
|
+
variants: { type: {
|
|
39
|
+
neutral: typeColors("neutral"),
|
|
40
|
+
info: typeColors("info"),
|
|
41
|
+
success: typeColors("success"),
|
|
42
|
+
warning: typeColors("warning"),
|
|
43
|
+
error: typeColors("error")
|
|
44
|
+
} },
|
|
45
|
+
defaultVariants: { type: "neutral" }
|
|
46
|
+
});
|
|
47
|
+
var dotRecipe = (0, _gnist_themes_layers_css_js.gnistRecipe)({
|
|
48
|
+
base: [(0, _gnist_themes_atoms_css_js.atoms)({
|
|
49
|
+
borderRadius: "full",
|
|
50
|
+
display: "inline-flex",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
justifyContent: "center"
|
|
53
|
+
}), {
|
|
54
|
+
width: _gnist_themes_tokens_css_js.tokens.size.s,
|
|
55
|
+
height: _gnist_themes_tokens_css_js.tokens.size.s
|
|
56
|
+
}],
|
|
57
|
+
variants: { type: {
|
|
58
|
+
neutral: typeColors("neutral"),
|
|
59
|
+
info: typeColors("info"),
|
|
60
|
+
success: typeColors("success"),
|
|
61
|
+
warning: typeColors("warning"),
|
|
62
|
+
error: typeColors("error")
|
|
63
|
+
} }
|
|
64
|
+
});
|
|
65
|
+
var dotInnerRecipe = (0, _gnist_themes_layers_css_js.gnistRecipe)({
|
|
66
|
+
base: [(0, _gnist_themes_atoms_css_js.atoms)({
|
|
67
|
+
borderRadius: "full",
|
|
68
|
+
display: "inline-flex"
|
|
69
|
+
}), {
|
|
70
|
+
width: _gnist_themes_tokens_css_js.tokens.size.xxs,
|
|
71
|
+
height: _gnist_themes_tokens_css_js.tokens.size.xxs
|
|
72
|
+
}],
|
|
73
|
+
variants: { type: {
|
|
74
|
+
neutral: { background: _gnist_themes_tokens_css_js.tokens.palette.neutral["10"] },
|
|
75
|
+
info: { background: _gnist_themes_tokens_css_js.tokens.palette.info["10"] },
|
|
76
|
+
success: { background: _gnist_themes_tokens_css_js.tokens.palette.success["10"] },
|
|
77
|
+
warning: { background: _gnist_themes_tokens_css_js.tokens.palette.warning["10"] },
|
|
78
|
+
error: { background: _gnist_themes_tokens_css_js.tokens.palette.error["10"] }
|
|
79
|
+
} }
|
|
80
|
+
});
|
|
81
|
+
//#endregion
|
|
82
|
+
exports.dotInnerRecipe = dotInnerRecipe;
|
|
83
|
+
exports.dotRecipe = dotRecipe;
|
|
84
|
+
exports.iconContainerRecipe = iconContainerRecipe;
|
|
85
|
+
exports.statusIndicatorRecipe = statusIndicatorRecipe;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type StatusIndicatorType = "neutral" | "info" | "success" | "warning" | "error";
|
|
2
|
+
export declare const statusIndicatorRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
3
|
+
[x: string]: {
|
|
4
|
+
[x: string]: string | import("@vanilla-extract/css").ComplexStyleRule;
|
|
5
|
+
};
|
|
6
|
+
}>;
|
|
7
|
+
export declare const iconContainerRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
8
|
+
type: {
|
|
9
|
+
neutral: string;
|
|
10
|
+
info: string;
|
|
11
|
+
success: string;
|
|
12
|
+
warning: string;
|
|
13
|
+
error: string;
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
export declare const dotRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
17
|
+
type: {
|
|
18
|
+
neutral: string;
|
|
19
|
+
info: string;
|
|
20
|
+
success: string;
|
|
21
|
+
warning: string;
|
|
22
|
+
error: string;
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
25
|
+
export declare const dotInnerRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
26
|
+
type: {
|
|
27
|
+
neutral: {
|
|
28
|
+
background: `var(--${string})`;
|
|
29
|
+
};
|
|
30
|
+
info: {
|
|
31
|
+
background: `var(--${string})`;
|
|
32
|
+
};
|
|
33
|
+
success: {
|
|
34
|
+
background: `var(--${string})`;
|
|
35
|
+
};
|
|
36
|
+
warning: {
|
|
37
|
+
background: `var(--${string})`;
|
|
38
|
+
};
|
|
39
|
+
error: {
|
|
40
|
+
background: `var(--${string})`;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}>;
|
|
44
|
+
//# sourceMappingURL=statusIndicator.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusIndicator.css.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/chips/statusIndicator.css.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,mBAAmB,GACzB,SAAS,GACT,MAAM,GACN,SAAS,GACT,SAAS,GACT,OAAO,CAAC;AAiBd,eAAO,MAAM,qBAAqB;;;;EAgBhC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;EAuB9B,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;EAsBpB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;EAiBzB,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { atoms } from "@gnist/themes/atoms.css.js";
|
|
3
|
+
import { gnistRecipe } from "@gnist/themes/layers.css.js";
|
|
4
|
+
import { tokens } from "@gnist/themes/tokens.css.js";
|
|
5
|
+
//#region src/components/actions/chips/statusIndicator.css.ts
|
|
6
|
+
var typeColors = (type) => {
|
|
7
|
+
if (type === "neutral") return atoms({
|
|
8
|
+
backgroundColor: "background",
|
|
9
|
+
color: "on-background",
|
|
10
|
+
borderColor: "on-background"
|
|
11
|
+
});
|
|
12
|
+
return atoms({
|
|
13
|
+
backgroundColor: `${type}-container`,
|
|
14
|
+
color: `on-${type}-container`,
|
|
15
|
+
borderColor: `on-${type}-container`
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
var statusIndicatorRecipe = gnistRecipe({ base: [atoms({
|
|
19
|
+
display: "inline-flex",
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
gap: "xxs"
|
|
22
|
+
}), {
|
|
23
|
+
textWrap: "nowrap",
|
|
24
|
+
fontFamily: tokens.type.medium.body.fontFamily,
|
|
25
|
+
fontWeight: tokens.type.medium.body.fontWeight,
|
|
26
|
+
lineHeight: tokens.type.medium.body.lineHeight,
|
|
27
|
+
letterSpacing: tokens.type.medium.body.letterSpacing,
|
|
28
|
+
fontSize: tokens.type.medium.body.fontSize
|
|
29
|
+
}] });
|
|
30
|
+
var iconContainerRecipe = gnistRecipe({
|
|
31
|
+
base: [atoms({
|
|
32
|
+
display: "inline-flex",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
justifyContent: "center",
|
|
35
|
+
borderRadius: "medium",
|
|
36
|
+
borderWidth: "small"
|
|
37
|
+
}), { borderStyle: "solid" }],
|
|
38
|
+
variants: { type: {
|
|
39
|
+
neutral: typeColors("neutral"),
|
|
40
|
+
info: typeColors("info"),
|
|
41
|
+
success: typeColors("success"),
|
|
42
|
+
warning: typeColors("warning"),
|
|
43
|
+
error: typeColors("error")
|
|
44
|
+
} },
|
|
45
|
+
defaultVariants: { type: "neutral" }
|
|
46
|
+
});
|
|
47
|
+
var dotRecipe = gnistRecipe({
|
|
48
|
+
base: [atoms({
|
|
49
|
+
borderRadius: "full",
|
|
50
|
+
display: "inline-flex",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
justifyContent: "center"
|
|
53
|
+
}), {
|
|
54
|
+
width: tokens.size.s,
|
|
55
|
+
height: tokens.size.s
|
|
56
|
+
}],
|
|
57
|
+
variants: { type: {
|
|
58
|
+
neutral: typeColors("neutral"),
|
|
59
|
+
info: typeColors("info"),
|
|
60
|
+
success: typeColors("success"),
|
|
61
|
+
warning: typeColors("warning"),
|
|
62
|
+
error: typeColors("error")
|
|
63
|
+
} }
|
|
64
|
+
});
|
|
65
|
+
var dotInnerRecipe = gnistRecipe({
|
|
66
|
+
base: [atoms({
|
|
67
|
+
borderRadius: "full",
|
|
68
|
+
display: "inline-flex"
|
|
69
|
+
}), {
|
|
70
|
+
width: tokens.size.xxs,
|
|
71
|
+
height: tokens.size.xxs
|
|
72
|
+
}],
|
|
73
|
+
variants: { type: {
|
|
74
|
+
neutral: { background: tokens.palette.neutral["10"] },
|
|
75
|
+
info: { background: tokens.palette.info["10"] },
|
|
76
|
+
success: { background: tokens.palette.success["10"] },
|
|
77
|
+
warning: { background: tokens.palette.warning["10"] },
|
|
78
|
+
error: { background: tokens.palette.error["10"] }
|
|
79
|
+
} }
|
|
80
|
+
});
|
|
81
|
+
//#endregion
|
|
82
|
+
export { dotInnerRecipe, dotRecipe, iconContainerRecipe, statusIndicatorRecipe };
|
|
@@ -15,6 +15,7 @@ const require_Switch = require("./selectionControls/Switch.cjs");
|
|
|
15
15
|
require("./selectionControls/index.cjs");
|
|
16
16
|
const require_ActionChip = require("./chips/ActionChip.cjs");
|
|
17
17
|
const require_FilterChip = require("./chips/FilterChip.cjs");
|
|
18
|
+
const require_StatusIndicator = require("./chips/StatusIndicator.cjs");
|
|
18
19
|
const require_TagChip = require("./chips/TagChip.cjs");
|
|
19
20
|
require("./chips/index.cjs");
|
|
20
21
|
exports.ActionChip = require_ActionChip.ActionChip;
|
|
@@ -27,6 +28,7 @@ exports.PrimaryButton = require_PrimaryButton.PrimaryButton;
|
|
|
27
28
|
exports.RadioButton = require_RadioButton.RadioButton;
|
|
28
29
|
exports.RadioGroup = require_RadioGroup.RadioGroup;
|
|
29
30
|
exports.SecondaryButton = require_SecondaryButton.SecondaryButton;
|
|
31
|
+
exports.StatusIndicator = require_StatusIndicator.StatusIndicator;
|
|
30
32
|
exports.SuccessButton = require_SuccessButton.SuccessButton;
|
|
31
33
|
exports.Switch = require_Switch.Switch;
|
|
32
34
|
exports.TagChip = require_TagChip.TagChip;
|
|
@@ -14,6 +14,7 @@ import { Switch } from "./selectionControls/Switch.js";
|
|
|
14
14
|
import "./selectionControls/index.js";
|
|
15
15
|
import { ActionChip } from "./chips/ActionChip.js";
|
|
16
16
|
import { FilterChip } from "./chips/FilterChip.js";
|
|
17
|
+
import { StatusIndicator } from "./chips/StatusIndicator.js";
|
|
17
18
|
import { TagChip } from "./chips/TagChip.js";
|
|
18
19
|
import "./chips/index.js";
|
|
19
|
-
export { ActionChip, Checkbox, DangerButton, FilterChip, GhostButton, IconButton, PrimaryButton, RadioButton, RadioGroup, SecondaryButton, SuccessButton, Switch, TagChip, TextButton };
|
|
20
|
+
export { ActionChip, Checkbox, DangerButton, FilterChip, GhostButton, IconButton, PrimaryButton, RadioButton, RadioGroup, SecondaryButton, StatusIndicator, SuccessButton, Switch, TagChip, TextButton };
|
|
@@ -15,6 +15,7 @@ const require_RadioButton = require("./actions/selectionControls/RadioButton.cjs
|
|
|
15
15
|
const require_Switch = require("./actions/selectionControls/Switch.cjs");
|
|
16
16
|
const require_ActionChip = require("./actions/chips/ActionChip.cjs");
|
|
17
17
|
const require_FilterChip = require("./actions/chips/FilterChip.cjs");
|
|
18
|
+
const require_StatusIndicator = require("./actions/chips/StatusIndicator.cjs");
|
|
18
19
|
const require_TagChip = require("./actions/chips/TagChip.cjs");
|
|
19
20
|
require("./actions/index.cjs");
|
|
20
21
|
const require_AlertBanner = require("./feedback/alerts/AlertBanner.cjs");
|
|
@@ -65,6 +66,7 @@ exports.RadioGroup = require_RadioGroup.RadioGroup;
|
|
|
65
66
|
exports.SecondaryButton = require_SecondaryButton.SecondaryButton;
|
|
66
67
|
exports.SingleSelect = require_SingleSelect.SingleSelect;
|
|
67
68
|
exports.Spinner = require_Spinner.Spinner;
|
|
69
|
+
exports.StatusIndicator = require_StatusIndicator.StatusIndicator;
|
|
68
70
|
exports.SuccessButton = require_SuccessButton.SuccessButton;
|
|
69
71
|
exports.Switch = require_Switch.Switch;
|
|
70
72
|
exports.TagChip = require_TagChip.TagChip;
|
package/dist/components/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import { RadioButton } from "./actions/selectionControls/RadioButton.js";
|
|
|
14
14
|
import { Switch } from "./actions/selectionControls/Switch.js";
|
|
15
15
|
import { ActionChip } from "./actions/chips/ActionChip.js";
|
|
16
16
|
import { FilterChip } from "./actions/chips/FilterChip.js";
|
|
17
|
+
import { StatusIndicator } from "./actions/chips/StatusIndicator.js";
|
|
17
18
|
import { TagChip } from "./actions/chips/TagChip.js";
|
|
18
19
|
import "./actions/index.js";
|
|
19
20
|
import { AlertBanner } from "./feedback/alerts/AlertBanner.js";
|
|
@@ -36,4 +37,4 @@ import { RadioCard } from "./surfaces/cards/RadioCard.js";
|
|
|
36
37
|
import { Modal } from "./surfaces/modal/Modal.js";
|
|
37
38
|
import { Accordion } from "./surfaces/accordion/Accordion.js";
|
|
38
39
|
import "./surfaces/index.js";
|
|
39
|
-
export { Accordion, ActionCard, ActionChip, AlertBanner, Calendar, Checkbox, CheckboxCard, DangerButton, FilterChip, GhostButton, IconButton, InfoCard, LinkCard, LoadingBar, LoadingBarComponent, LoadingSpinner, Lozenge, Modal, MultiSelect, PrimaryButton, ProgressBar, ProgressBarComponent, RadioButton, RadioCard, RadioGroup, SecondaryButton, SingleSelect, Spinner, SuccessButton, Switch, TagChip, TextArea, TextButton, TextField, characterCount, wordCount };
|
|
40
|
+
export { Accordion, ActionCard, ActionChip, AlertBanner, Calendar, Checkbox, CheckboxCard, DangerButton, FilterChip, GhostButton, IconButton, InfoCard, LinkCard, LoadingBar, LoadingBarComponent, LoadingSpinner, Lozenge, Modal, MultiSelect, PrimaryButton, ProgressBar, ProgressBarComponent, RadioButton, RadioCard, RadioGroup, SecondaryButton, SingleSelect, Spinner, StatusIndicator, SuccessButton, Switch, TagChip, TextArea, TextButton, TextField, characterCount, wordCount };
|
package/dist/index.cjs
CHANGED
|
@@ -30,6 +30,7 @@ const require_RadioButton = require("./components/actions/selectionControls/Radi
|
|
|
30
30
|
const require_Switch = require("./components/actions/selectionControls/Switch.cjs");
|
|
31
31
|
const require_ActionChip = require("./components/actions/chips/ActionChip.cjs");
|
|
32
32
|
const require_FilterChip = require("./components/actions/chips/FilterChip.cjs");
|
|
33
|
+
const require_StatusIndicator = require("./components/actions/chips/StatusIndicator.cjs");
|
|
33
34
|
const require_TagChip = require("./components/actions/chips/TagChip.cjs");
|
|
34
35
|
const require_LocalizationProvider = require("./translations/LocalizationProvider.cjs");
|
|
35
36
|
const require_index$5 = require("./translations/index.cjs");
|
|
@@ -112,6 +113,7 @@ exports.SecondaryButton = require_SecondaryButton.SecondaryButton;
|
|
|
112
113
|
exports.SingleSelect = require_SingleSelect.SingleSelect;
|
|
113
114
|
exports.SkodaFont = require_index$7.SkodaFont;
|
|
114
115
|
exports.Spinner = require_Spinner.Spinner;
|
|
116
|
+
exports.StatusIndicator = require_StatusIndicator.StatusIndicator;
|
|
115
117
|
exports.SuccessButton = require_SuccessButton.SuccessButton;
|
|
116
118
|
exports.Switch = require_Switch.Switch;
|
|
117
119
|
exports.TagChip = require_TagChip.TagChip;
|
package/dist/index.js
CHANGED
|
@@ -29,6 +29,7 @@ import { RadioButton } from "./components/actions/selectionControls/RadioButton.
|
|
|
29
29
|
import { Switch } from "./components/actions/selectionControls/Switch.js";
|
|
30
30
|
import { ActionChip } from "./components/actions/chips/ActionChip.js";
|
|
31
31
|
import { FilterChip } from "./components/actions/chips/FilterChip.js";
|
|
32
|
+
import { StatusIndicator } from "./components/actions/chips/StatusIndicator.js";
|
|
32
33
|
import { TagChip } from "./components/actions/chips/TagChip.js";
|
|
33
34
|
import { LocalizationProvider, useLanguage } from "./translations/LocalizationProvider.js";
|
|
34
35
|
import { sliceTranslate, translate, useTranslation } from "./translations/index.js";
|
|
@@ -56,4 +57,4 @@ import { FormProvider, useForm } from "./utilities/forms/formContext.js";
|
|
|
56
57
|
import { formInputs } from "./utilities/forms/formInputs.js";
|
|
57
58
|
import { useLocalFormState } from "./utilities/forms/useLocalFormState.js";
|
|
58
59
|
import "./utilities/index.js";
|
|
59
|
-
export { Accordion, ActionCard, ActionChip, AlertBanner, AudiFont, AutoriaFont, BilholdFont, BodyText, Calendar, Checkbox, CheckboxCard, Column, CupraFont, DahlesFont, DangerButton, DetailText, DisplayText, ExtraIconsProvider, FilterChip, FormProvider, GhostButton, GumpenFont, HeaderLevels, Heading1Text, Heading2Text, Heading3Text, Icon, IconButton, IconVariantProvider, InfoCard, InputHelperText, LeadText, Link, LinkCard, LoadingBar, LoadingBarComponent, LoadingSpinner, LocalizationProvider, Logo, Lozenge, Modal, MollerFont, MultiSelect, PrimaryButton, ProgressBar, ProgressBarComponent, RadioButton, RadioCard, RadioGroup, Row, ScreenReaderOnly, SecondaryButton, SingleSelect, SkodaFont, Spinner, SuccessButton, Switch, TagChip, TextArea, TextButton, TextContainer, TextField, ToolsFont, VWFont, addDays, addMonths, breakpointDesktop, breakpointMobile, breakpointTablet, characterCount, defineIcons, formInputs, getStartOfDay, isNorwegianHoliday, isSameDate, maxDayOfMonth, minDayOfMonth, nextMonth, sliceTranslate, today, translate, useForm, useInputHelperText, useLanguage, useLocalFormState, useTranslation, visuallyHidden, wordCount };
|
|
60
|
+
export { Accordion, ActionCard, ActionChip, AlertBanner, AudiFont, AutoriaFont, BilholdFont, BodyText, Calendar, Checkbox, CheckboxCard, Column, CupraFont, DahlesFont, DangerButton, DetailText, DisplayText, ExtraIconsProvider, FilterChip, FormProvider, GhostButton, GumpenFont, HeaderLevels, Heading1Text, Heading2Text, Heading3Text, Icon, IconButton, IconVariantProvider, InfoCard, InputHelperText, LeadText, Link, LinkCard, LoadingBar, LoadingBarComponent, LoadingSpinner, LocalizationProvider, Logo, Lozenge, Modal, MollerFont, MultiSelect, PrimaryButton, ProgressBar, ProgressBarComponent, RadioButton, RadioCard, RadioGroup, Row, ScreenReaderOnly, SecondaryButton, SingleSelect, SkodaFont, Spinner, StatusIndicator, SuccessButton, Switch, TagChip, TextArea, TextButton, TextContainer, TextField, ToolsFont, VWFont, addDays, addMonths, breakpointDesktop, breakpointMobile, breakpointTablet, characterCount, defineIcons, formInputs, getStartOfDay, isNorwegianHoliday, isSameDate, maxDayOfMonth, minDayOfMonth, nextMonth, sliceTranslate, today, translate, useForm, useInputHelperText, useLanguage, useLocalFormState, useTranslation, visuallyHidden, wordCount };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gnist/design-system",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@base-ui/react": "1.0.0",
|
|
52
52
|
"@formkit/auto-animate": "^0.8.2",
|
|
53
|
-
"@gnist/component-utils": "3.0.
|
|
54
|
-
"@gnist/themes": "^4.
|
|
53
|
+
"@gnist/component-utils": "3.0.16",
|
|
54
|
+
"@gnist/themes": "^4.1.1",
|
|
55
55
|
"@material-symbols/svg-400": "^0.42.3",
|
|
56
56
|
"@vanilla-extract/css": "1.20.1",
|
|
57
57
|
"@vanilla-extract/css-utils": "^0.1.6",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"@gnist/eslint-config": "",
|
|
73
73
|
"@gnist/ts-config": "",
|
|
74
74
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
75
|
-
"@tsconfig/node24": "^24.0.
|
|
76
|
-
"@types/node": "^24.
|
|
75
|
+
"@tsconfig/node24": "^24.0.4",
|
|
76
|
+
"@types/node": "^24.11.0",
|
|
77
77
|
"@types/react": "19.2.7",
|
|
78
78
|
"@types/react-dom": "19.2.3",
|
|
79
79
|
"@types/semver": "^7.7.0",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"react-dom": "19.2.3",
|
|
88
88
|
"rollup-plugin-copy": "^3.5.0",
|
|
89
89
|
"semver": "^7.7.2",
|
|
90
|
-
"svgo": "^3.3.
|
|
90
|
+
"svgo": "^3.3.4",
|
|
91
91
|
"svgo-autocrop": "^1.1.2",
|
|
92
92
|
"tslib": "^2.8.1",
|
|
93
93
|
"tsx": "^4.20.4",
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"optional": true
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "dc3b27539c1baaf0867cb90798522fbe86ef42eb"
|
|
108
108
|
}
|