@gnist/design-system 5.6.0 → 5.6.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.
- package/CHANGELOG.md +4 -0
- package/README.md +2 -0
- package/dist/components/actions/selectionControls/Checkbox.js +1 -1
- package/dist/components/actions/selectionControls/RadioButton.js +2 -2
- package/dist/components/actions/selectionControls/Switch.cjs +19 -9
- package/dist/components/actions/selectionControls/Switch.d.ts +1 -1
- package/dist/components/actions/selectionControls/Switch.d.ts.map +1 -1
- package/dist/components/actions/selectionControls/Switch.js +21 -11
- package/dist/components/actions/selectionControls/switch.css.cjs +123 -48
- package/dist/components/actions/selectionControls/switch.css.d.ts +10 -12
- package/dist/components/actions/selectionControls/switch.css.d.ts.map +1 -1
- package/dist/components/actions/selectionControls/switch.css.js +124 -49
- package/dist/components/feedback/alerts/AlertBanner.js +1 -1
- package/dist/components/inputs/dropdowns/SelectBase.js +1 -1
- package/dist/components/inputs/pickers/Calendar.css.js +1 -1
- package/dist/components/inputs/textFields/TextArea.js +1 -1
- package/dist/components/inputs/textFields/TextField.js +1 -1
- package/dist/components/surfaces/modal/Modal.js +1 -1
- package/dist/foundation/logos/svg/index.cjs +27 -27
- package/dist/index.cjs +26 -26
- package/dist/utilities/validation/validation.js +1 -1
- package/dist/utilities/validation/validators.js +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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
|
+
## [5.6.1](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@5.6.0...@gnist/design-system@5.6.1) (2026-04-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @gnist/design-system
|
|
9
|
+
|
|
6
10
|
## [5.6.0](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@5.5.3...@gnist/design-system@5.6.0) (2026-03-20)
|
|
7
11
|
|
|
8
12
|
### Features
|
package/README.md
CHANGED
|
@@ -100,6 +100,8 @@ export const App: React.FC = () => {
|
|
|
100
100
|
};
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
+
> Note: The `brandless` and `gnist` themes are for **internal use only**. Both use the "Geist" font family, so if you are using either of these themes, import `@gnist/design-system/fonts/tools` as your font.
|
|
104
|
+
|
|
103
105
|
### Next.js projects
|
|
104
106
|
|
|
105
107
|
If you are setting up in a Next.js project, the procedure is quite the same.
|
|
@@ -9,7 +9,7 @@ import "../../../foundation/iconography/IconVariantProvider.js";
|
|
|
9
9
|
import "../../../foundation/iconography/icons.js";
|
|
10
10
|
import { Icon } from "../../../foundation/iconography/Icon.js";
|
|
11
11
|
import { CheckboxRecipe, checkbox } from "./checkbox.css.js";
|
|
12
|
-
import { InputWrapper,
|
|
12
|
+
import { InputWrapper, InputStyleRecipe, LabelStyle, LabelRecipe, indentedDescriptionStyle } from "./shared.css.js";
|
|
13
13
|
import { SelectionDescription, HelperTextWrapper } from "./shared.js";
|
|
14
14
|
const CustomCheckbox = ({ value, disabled }) => {
|
|
15
15
|
if (!value) {
|
|
@@ -5,8 +5,8 @@ import { ScreenReaderOnly } from "../../../utilities/accessibility/ScreenReaderO
|
|
|
5
5
|
import "../../../utilities/accessibility/visuallyHidden.css.js";
|
|
6
6
|
import { createValidHtmlId } from "../../../utilities/html/index.js";
|
|
7
7
|
import classNames from "classnames";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { CheckedCircleRecipe, RadioButtonRecipe } from "./radiobutton.css.js";
|
|
9
|
+
import { InputStyleRecipe, LabelStyle, LabelRecipe, InputWrapper, indentedDescriptionStyle } from "./shared.css.js";
|
|
10
10
|
import { SelectionDescription, HelperTextWrapper } from "./shared.js";
|
|
11
11
|
import { useRadio } from "./RadioGroup.js";
|
|
12
12
|
const CustomRadioButton = ({ isChecked, disabled, validity }) => {
|
|
@@ -2,33 +2,43 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const InputHelperText = require("../../../building-blocks/inputs/InputHelperText.cjs");
|
|
5
6
|
const ScreenReaderOnly = require("../../../utilities/accessibility/ScreenReaderOnly.cjs");
|
|
6
7
|
require("../../../utilities/accessibility/visuallyHidden.css.cjs");
|
|
7
8
|
const index = require("../../../utilities/html/index.cjs");
|
|
9
|
+
require("../../../foundation/iconography/ExtraIconsProvider.cjs");
|
|
10
|
+
require("../../../foundation/iconography/IconVariantProvider.cjs");
|
|
11
|
+
require("../../../foundation/iconography/icons.cjs");
|
|
12
|
+
const Icon = require("../../../foundation/iconography/Icon.cjs");
|
|
8
13
|
const switch_css = require("./switch.css.cjs");
|
|
9
14
|
const shared_css = require("./shared.css.cjs");
|
|
15
|
+
const shared = require("./shared.cjs");
|
|
10
16
|
const atoms_css_js = require("@gnist/themes/atoms.css.js");
|
|
11
|
-
function Switch({ label, description, value = false, onChange, disabled, id = index.createValidHtmlId(label || "toggle"), position = "left", hideLabel = false, className, ref, ...rest }) {
|
|
17
|
+
function Switch({ label, description, value = false, onChange, disabled, id = index.createValidHtmlId(label || "toggle"), position = "left", hideLabel = false, canShowErrorMessage = false, className, ref, ...rest }) {
|
|
12
18
|
const inputId = id;
|
|
19
|
+
const helperId = `${id}-helper`;
|
|
20
|
+
const { helperTextProps, inputAriaProps } = InputHelperText.useInputHelperText({
|
|
21
|
+
id: helperId,
|
|
22
|
+
reserveSpaceForMessage: canShowErrorMessage
|
|
23
|
+
});
|
|
13
24
|
const LabelElement = () => {
|
|
14
|
-
return jsxRuntime.
|
|
15
|
-
disabled,
|
|
16
|
-
side: position === "right" ? "left" : "right"
|
|
17
|
-
}), children: [label, description && jsxRuntime.jsx("div", { className: switch_css.switchDescription, children: description })] });
|
|
25
|
+
return jsxRuntime.jsx("span", { className: switch_css.switchLabelContent, children: jsxRuntime.jsx("span", { className: switch_css.SwitchLabelRecipe({ disabled }), children: label }) });
|
|
18
26
|
};
|
|
19
|
-
|
|
27
|
+
const descriptionElement = description ?? jsxRuntime.jsx(shared.SelectionDescription, { disabled, children: jsxRuntime.jsx("div", { className: switch_css.switchDescription, children: description }) });
|
|
28
|
+
const switchElement = jsxRuntime.jsxs("span", { className: `${switch_css.switchField} ${className ?? ""}`, ref, children: [jsxRuntime.jsxs("span", { className: `${shared_css.InputWrapper} ${switch_css.focusContainer} ${atoms_css_js.atoms({ borderRadius: hideLabel ? "full" : "input" })}`, children: [jsxRuntime.jsx("input", { type: "checkbox", id: inputId, disabled, onChange, checked: value === true, className: shared_css.InputStyleRecipe({ disabled }), style: {
|
|
20
29
|
position: "absolute",
|
|
21
30
|
opacity: 0,
|
|
22
31
|
width: "100%",
|
|
23
32
|
height: "100%",
|
|
24
33
|
margin: 0,
|
|
25
34
|
cursor: disabled ? "not-allowed" : "pointer"
|
|
26
|
-
}, ...rest }), jsxRuntime.jsxs("label", { htmlFor: inputId, className: switch_css.
|
|
35
|
+
}, ...inputAriaProps, ...rest }), jsxRuntime.jsxs("label", { htmlFor: inputId, className: switch_css.switchRow, children: [position === "right" && !hideLabel && jsxRuntime.jsx(LabelElement, {}), jsxRuntime.jsx("span", { className: switch_css.SwitchRecipe({
|
|
27
36
|
selected: value,
|
|
28
37
|
disabled
|
|
29
38
|
}), children: jsxRuntime.jsx("span", { className: switch_css.SwitchThumbRecipe({
|
|
30
|
-
selected: value
|
|
39
|
+
selected: value,
|
|
31
40
|
disabled
|
|
32
|
-
}) }) }), position === "left" && !hideLabel && jsxRuntime.jsx(LabelElement, {}), hideLabel && jsxRuntime.jsx(ScreenReaderOnly.ScreenReaderOnly, { children: label })] })] });
|
|
41
|
+
}), children: (value && !disabled) ?? jsxRuntime.jsx("span", { className: switch_css.switchThumbIcon, "aria-hidden": true, children: jsxRuntime.jsx(Icon.Icon, { icon: "check", size: "xs" }) }) }) }), position === "left" && !hideLabel && jsxRuntime.jsx(LabelElement, {}), hideLabel && jsxRuntime.jsx(ScreenReaderOnly.ScreenReaderOnly, { children: label })] })] }), descriptionElement] });
|
|
42
|
+
return jsxRuntime.jsx(shared.HelperTextWrapper, { ...helperTextProps, children: switchElement });
|
|
33
43
|
}
|
|
34
44
|
exports.Switch = Switch;
|
|
@@ -13,5 +13,5 @@ export interface SwitchProps extends Omit<SelectionControlProps<boolean>, "rende
|
|
|
13
13
|
*
|
|
14
14
|
* Documentation: [Switch](https://gnist.moller.no/developers/components/latest/?path=/docs/components-actions-selectioncontrols-switch--docs)
|
|
15
15
|
*/
|
|
16
|
-
export declare function Switch({ label, description, value, onChange, disabled, id, position, hideLabel, className, ref, ...rest }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function Switch({ label, description, value, onChange, disabled, id, position, hideLabel, canShowErrorMessage, className, ref, ...rest }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
//# sourceMappingURL=Switch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/selectionControls/Switch.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/selectionControls/Switch.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAc5B,OAAO,EAEH,qBAAqB,EAExB,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,WACb,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IACnE,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,EACnB,KAAK,EACL,WAAW,EACX,KAAa,EACb,QAAQ,EACR,QAAQ,EACR,EAAyC,EACzC,QAAiB,EACjB,SAAiB,EACjB,mBAA2B,EAC3B,SAAS,EACT,GAAG,EACH,GAAG,IAAI,EACV,EAAE,WAAW,2CAkFb"}
|
|
@@ -1,33 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useInputHelperText } from "../../../building-blocks/inputs/InputHelperText.js";
|
|
3
4
|
import { ScreenReaderOnly } from "../../../utilities/accessibility/ScreenReaderOnly.js";
|
|
4
5
|
import "../../../utilities/accessibility/visuallyHidden.css.js";
|
|
5
6
|
import { createValidHtmlId } from "../../../utilities/html/index.js";
|
|
6
|
-
import
|
|
7
|
+
import "../../../foundation/iconography/ExtraIconsProvider.js";
|
|
8
|
+
import "../../../foundation/iconography/IconVariantProvider.js";
|
|
9
|
+
import "../../../foundation/iconography/icons.js";
|
|
10
|
+
import { Icon } from "../../../foundation/iconography/Icon.js";
|
|
11
|
+
import { switchDescription, switchField, focusContainer, switchRow, switchThumbIcon, SwitchThumbRecipe, SwitchRecipe, switchLabelContent, SwitchLabelRecipe } from "./switch.css.js";
|
|
7
12
|
import { InputWrapper, InputStyleRecipe } from "./shared.css.js";
|
|
13
|
+
import { SelectionDescription, HelperTextWrapper } from "./shared.js";
|
|
8
14
|
import { atoms } from "@gnist/themes/atoms.css.js";
|
|
9
|
-
function Switch({ label, description, value = false, onChange, disabled, id = createValidHtmlId(label || "toggle"), position = "left", hideLabel = false, className, ref, ...rest }) {
|
|
15
|
+
function Switch({ label, description, value = false, onChange, disabled, id = createValidHtmlId(label || "toggle"), position = "left", hideLabel = false, canShowErrorMessage = false, className, ref, ...rest }) {
|
|
10
16
|
const inputId = id;
|
|
17
|
+
const helperId = `${id}-helper`;
|
|
18
|
+
const { helperTextProps, inputAriaProps } = useInputHelperText({
|
|
19
|
+
id: helperId,
|
|
20
|
+
reserveSpaceForMessage: canShowErrorMessage
|
|
21
|
+
});
|
|
11
22
|
const LabelElement = () => {
|
|
12
|
-
return
|
|
13
|
-
disabled,
|
|
14
|
-
side: position === "right" ? "left" : "right"
|
|
15
|
-
}), children: [label, description && jsx("div", { className: switchDescription, children: description })] });
|
|
23
|
+
return jsx("span", { className: switchLabelContent, children: jsx("span", { className: SwitchLabelRecipe({ disabled }), children: label }) });
|
|
16
24
|
};
|
|
17
|
-
|
|
25
|
+
const descriptionElement = description ?? jsx(SelectionDescription, { disabled, children: jsx("div", { className: switchDescription, children: description }) });
|
|
26
|
+
const switchElement = jsxs("span", { className: `${switchField} ${className ?? ""}`, ref, children: [jsxs("span", { className: `${InputWrapper} ${focusContainer} ${atoms({ borderRadius: hideLabel ? "full" : "input" })}`, children: [jsx("input", { type: "checkbox", id: inputId, disabled, onChange, checked: value === true, className: InputStyleRecipe({ disabled }), style: {
|
|
18
27
|
position: "absolute",
|
|
19
28
|
opacity: 0,
|
|
20
29
|
width: "100%",
|
|
21
30
|
height: "100%",
|
|
22
31
|
margin: 0,
|
|
23
32
|
cursor: disabled ? "not-allowed" : "pointer"
|
|
24
|
-
}, ...rest }), jsxs("label", { htmlFor: inputId, className:
|
|
33
|
+
}, ...inputAriaProps, ...rest }), jsxs("label", { htmlFor: inputId, className: switchRow, children: [position === "right" && !hideLabel && jsx(LabelElement, {}), jsx("span", { className: SwitchRecipe({
|
|
25
34
|
selected: value,
|
|
26
35
|
disabled
|
|
27
36
|
}), children: jsx("span", { className: SwitchThumbRecipe({
|
|
28
|
-
selected: value
|
|
37
|
+
selected: value,
|
|
29
38
|
disabled
|
|
30
|
-
}) }) }), position === "left" && !hideLabel && jsx(LabelElement, {}), hideLabel && jsx(ScreenReaderOnly, { children: label })] })] });
|
|
39
|
+
}), children: (value && !disabled) ?? jsx("span", { className: switchThumbIcon, "aria-hidden": true, children: jsx(Icon, { icon: "check", size: "xs" }) }) }) }), position === "left" && !hideLabel && jsx(LabelElement, {}), hideLabel && jsx(ScreenReaderOnly, { children: label })] })] }), descriptionElement] });
|
|
40
|
+
return jsx(HelperTextWrapper, { ...helperTextProps, children: switchElement });
|
|
31
41
|
}
|
|
32
42
|
export {
|
|
33
43
|
Switch
|
|
@@ -3,56 +3,79 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const atoms_css_js = require("@gnist/themes/atoms.css.js");
|
|
5
5
|
const tokens_css_js = require("@gnist/themes/tokens.css.js");
|
|
6
|
+
const cssUtils = require("@vanilla-extract/css-utils");
|
|
6
7
|
const recipes = require("@vanilla-extract/recipes");
|
|
7
8
|
const css = require("@vanilla-extract/css");
|
|
8
9
|
const focusContainer = css.style({
|
|
9
10
|
display: "inline-flex",
|
|
10
11
|
alignItems: "center",
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
position: "relative",
|
|
13
|
+
flexShrink: 0
|
|
14
|
+
});
|
|
15
|
+
const switchField = css.style({
|
|
16
|
+
display: "inline-flex",
|
|
17
|
+
flexDirection: "column",
|
|
18
|
+
gap: tokens_css_js.tokens.spacing.base
|
|
17
19
|
});
|
|
18
|
-
const
|
|
19
|
-
display: "flex"
|
|
20
|
+
const switchRow = css.style({
|
|
21
|
+
display: "inline-flex",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
gap: tokens_css_js.tokens.spacing.xxs
|
|
24
|
+
});
|
|
25
|
+
const switchLabelContent = css.style({
|
|
26
|
+
display: "inline-flex",
|
|
27
|
+
flexDirection: "column",
|
|
28
|
+
gap: tokens_css_js.tokens.spacing.base,
|
|
29
|
+
minWidth: 0
|
|
20
30
|
});
|
|
21
31
|
const switchContainer = css.style([
|
|
22
32
|
{
|
|
23
33
|
position: "relative",
|
|
24
34
|
display: "inline-flex",
|
|
35
|
+
alignItems: "center",
|
|
36
|
+
flexShrink: 0,
|
|
25
37
|
cursor: "pointer",
|
|
26
|
-
|
|
38
|
+
overflow: "hidden",
|
|
39
|
+
transition: "background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease"
|
|
27
40
|
},
|
|
28
41
|
atoms_css_js.atoms({
|
|
29
42
|
borderRadius: "full",
|
|
30
43
|
width: "xxl",
|
|
31
|
-
height: "
|
|
44
|
+
height: "m"
|
|
32
45
|
})
|
|
33
46
|
]);
|
|
34
47
|
const SwitchRecipe = recipes.recipe({
|
|
35
48
|
base: [
|
|
36
49
|
switchContainer,
|
|
37
|
-
atoms_css_js.atoms({
|
|
38
|
-
borderColor: "outline"
|
|
39
|
-
}),
|
|
40
50
|
{
|
|
41
|
-
borderWidth:
|
|
51
|
+
borderWidth: tokens_css_js.tokens.stroke.small,
|
|
42
52
|
borderStyle: "solid",
|
|
43
|
-
boxSizing: "border-box"
|
|
53
|
+
boxSizing: "border-box",
|
|
54
|
+
selectors: {
|
|
55
|
+
[`${focusContainer}:has(input:focus-visible) &`]: {
|
|
56
|
+
boxShadow: `0 0 0 ${tokens_css_js.tokens.stroke.medium} ${tokens_css_js.tokens.color.interactive}`
|
|
57
|
+
},
|
|
58
|
+
[`${focusContainer}:has(input:not(:disabled):hover) &`]: {
|
|
59
|
+
filter: "brightness(0.98)"
|
|
60
|
+
},
|
|
61
|
+
[`${focusContainer}:has(input:not(:disabled):active) &`]: {
|
|
62
|
+
filter: "brightness(0.94)"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
44
65
|
}
|
|
45
66
|
],
|
|
46
67
|
variants: {
|
|
47
68
|
selected: {
|
|
48
69
|
true: [
|
|
49
70
|
atoms_css_js.atoms({
|
|
50
|
-
backgroundColor: "success"
|
|
71
|
+
backgroundColor: "success",
|
|
72
|
+
borderColor: "success"
|
|
51
73
|
})
|
|
52
74
|
],
|
|
53
75
|
false: [
|
|
54
76
|
atoms_css_js.atoms({
|
|
55
|
-
backgroundColor: "surface-variant"
|
|
77
|
+
backgroundColor: "surface-variant",
|
|
78
|
+
borderColor: "on-surface"
|
|
56
79
|
})
|
|
57
80
|
]
|
|
58
81
|
},
|
|
@@ -60,53 +83,114 @@ const SwitchRecipe = recipes.recipe({
|
|
|
60
83
|
true: [
|
|
61
84
|
atoms_css_js.atoms({
|
|
62
85
|
backgroundColor: "disabled",
|
|
63
|
-
borderColor: "disabled"
|
|
86
|
+
borderColor: "on-disabled"
|
|
64
87
|
}),
|
|
65
88
|
{
|
|
66
|
-
cursor: "not-allowed"
|
|
67
|
-
opacity: 0.6
|
|
89
|
+
cursor: "not-allowed"
|
|
68
90
|
}
|
|
69
91
|
],
|
|
70
92
|
false: {}
|
|
71
93
|
}
|
|
72
|
-
}
|
|
94
|
+
},
|
|
95
|
+
compoundVariants: [
|
|
96
|
+
{
|
|
97
|
+
variants: {
|
|
98
|
+
selected: true,
|
|
99
|
+
disabled: true
|
|
100
|
+
},
|
|
101
|
+
style: [
|
|
102
|
+
atoms_css_js.atoms({
|
|
103
|
+
backgroundColor: "on-disabled",
|
|
104
|
+
borderColor: "on-disabled"
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
]
|
|
73
109
|
});
|
|
74
110
|
const switchThumb = css.style({
|
|
75
111
|
position: "absolute",
|
|
76
112
|
top: "50%",
|
|
77
113
|
transform: "translateY(-50%)",
|
|
78
|
-
|
|
114
|
+
display: "inline-flex",
|
|
115
|
+
alignItems: "center",
|
|
116
|
+
justifyContent: "center",
|
|
117
|
+
transition: "left 0.2s ease, transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease",
|
|
79
118
|
borderRadius: "50%",
|
|
80
|
-
backgroundColor: tokens_css_js.tokens.
|
|
81
|
-
|
|
119
|
+
backgroundColor: tokens_css_js.tokens.color.surface,
|
|
120
|
+
selectors: {
|
|
121
|
+
[`${focusContainer}:has(input:not(:disabled):active) &`]: {
|
|
122
|
+
transform: "translateY(-50%) scale(0.94)"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
82
125
|
});
|
|
83
126
|
const SwitchThumbRecipe = recipes.recipe({
|
|
84
127
|
base: [
|
|
85
128
|
switchThumb,
|
|
86
129
|
atoms_css_js.atoms({
|
|
87
|
-
width: "
|
|
88
|
-
height: "
|
|
89
|
-
})
|
|
130
|
+
width: "s",
|
|
131
|
+
height: "s"
|
|
132
|
+
}),
|
|
133
|
+
{
|
|
134
|
+
borderWidth: tokens_css_js.tokens.stroke.small,
|
|
135
|
+
borderStyle: "solid",
|
|
136
|
+
boxSizing: "border-box"
|
|
137
|
+
}
|
|
90
138
|
],
|
|
91
139
|
variants: {
|
|
92
140
|
selected: {
|
|
93
|
-
true:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
141
|
+
true: [
|
|
142
|
+
atoms_css_js.atoms({
|
|
143
|
+
borderColor: "on-surface"
|
|
144
|
+
}),
|
|
145
|
+
{
|
|
146
|
+
left: cssUtils.calc.subtract("100%", cssUtils.calc.add(tokens_css_js.tokens.size.s, tokens_css_js.tokens.stroke.small))
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
false: [
|
|
150
|
+
atoms_css_js.atoms({
|
|
151
|
+
borderColor: "on-surface"
|
|
152
|
+
}),
|
|
153
|
+
{
|
|
154
|
+
left: tokens_css_js.tokens.stroke.small
|
|
155
|
+
}
|
|
156
|
+
]
|
|
99
157
|
},
|
|
100
158
|
disabled: {
|
|
101
159
|
true: [
|
|
102
160
|
atoms_css_js.atoms({
|
|
103
|
-
backgroundColor: "
|
|
161
|
+
backgroundColor: "surface",
|
|
162
|
+
borderColor: "on-disabled"
|
|
104
163
|
})
|
|
105
164
|
],
|
|
106
165
|
false: {}
|
|
107
166
|
}
|
|
108
|
-
}
|
|
167
|
+
},
|
|
168
|
+
compoundVariants: [
|
|
169
|
+
{
|
|
170
|
+
variants: {
|
|
171
|
+
selected: true,
|
|
172
|
+
disabled: true
|
|
173
|
+
},
|
|
174
|
+
style: [
|
|
175
|
+
atoms_css_js.atoms({
|
|
176
|
+
borderColor: "surface"
|
|
177
|
+
})
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
]
|
|
109
181
|
});
|
|
182
|
+
const switchThumbIcon = css.style([
|
|
183
|
+
{
|
|
184
|
+
display: "inline-flex",
|
|
185
|
+
alignItems: "center",
|
|
186
|
+
justifyContent: "center",
|
|
187
|
+
lineHeight: 0,
|
|
188
|
+
pointerEvents: "none"
|
|
189
|
+
},
|
|
190
|
+
atoms_css_js.atoms({
|
|
191
|
+
color: "on-surface"
|
|
192
|
+
})
|
|
193
|
+
]);
|
|
110
194
|
const switchLabel = css.style([
|
|
111
195
|
{
|
|
112
196
|
userSelect: "none",
|
|
@@ -127,18 +211,6 @@ const SwitchLabelRecipe = recipes.recipe({
|
|
|
127
211
|
})
|
|
128
212
|
],
|
|
129
213
|
false: {}
|
|
130
|
-
},
|
|
131
|
-
side: {
|
|
132
|
-
left: [
|
|
133
|
-
atoms_css_js.atoms({
|
|
134
|
-
marginRight: "xxs"
|
|
135
|
-
})
|
|
136
|
-
],
|
|
137
|
-
right: [
|
|
138
|
-
atoms_css_js.atoms({
|
|
139
|
-
marginLeft: "xxs"
|
|
140
|
-
})
|
|
141
|
-
]
|
|
142
214
|
}
|
|
143
215
|
}
|
|
144
216
|
});
|
|
@@ -152,7 +224,10 @@ exports.SwitchRecipe = SwitchRecipe;
|
|
|
152
224
|
exports.SwitchThumbRecipe = SwitchThumbRecipe;
|
|
153
225
|
exports.focusContainer = focusContainer;
|
|
154
226
|
exports.switchContainer = switchContainer;
|
|
155
|
-
exports.switchContainerStyle = switchContainerStyle;
|
|
156
227
|
exports.switchDescription = switchDescription;
|
|
228
|
+
exports.switchField = switchField;
|
|
157
229
|
exports.switchLabel = switchLabel;
|
|
230
|
+
exports.switchLabelContent = switchLabelContent;
|
|
231
|
+
exports.switchRow = switchRow;
|
|
158
232
|
exports.switchThumb = switchThumb;
|
|
233
|
+
exports.switchThumbIcon = switchThumbIcon;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const focusContainer: string;
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const switchField: string;
|
|
3
|
+
export declare const switchRow: string;
|
|
4
|
+
export declare const switchLabelContent: string;
|
|
3
5
|
export declare const switchContainer: string;
|
|
4
6
|
export declare const SwitchRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
5
7
|
selected: {
|
|
@@ -9,7 +11,6 @@ export declare const SwitchRecipe: import("@vanilla-extract/recipes").RuntimeFn<
|
|
|
9
11
|
disabled: {
|
|
10
12
|
true: (string | {
|
|
11
13
|
cursor: "not-allowed";
|
|
12
|
-
opacity: number;
|
|
13
14
|
})[];
|
|
14
15
|
false: {};
|
|
15
16
|
};
|
|
@@ -17,28 +18,25 @@ export declare const SwitchRecipe: import("@vanilla-extract/recipes").RuntimeFn<
|
|
|
17
18
|
export declare const switchThumb: string;
|
|
18
19
|
export declare const SwitchThumbRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
19
20
|
selected: {
|
|
20
|
-
true: {
|
|
21
|
-
left:
|
|
22
|
-
};
|
|
23
|
-
false: {
|
|
24
|
-
left:
|
|
25
|
-
};
|
|
21
|
+
true: (string | {
|
|
22
|
+
left: string;
|
|
23
|
+
})[];
|
|
24
|
+
false: (string | {
|
|
25
|
+
left: `var(--${string})`;
|
|
26
|
+
})[];
|
|
26
27
|
};
|
|
27
28
|
disabled: {
|
|
28
29
|
true: string[];
|
|
29
30
|
false: {};
|
|
30
31
|
};
|
|
31
32
|
}>;
|
|
33
|
+
export declare const switchThumbIcon: string;
|
|
32
34
|
export declare const switchLabel: string;
|
|
33
35
|
export declare const SwitchLabelRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
34
36
|
disabled: {
|
|
35
37
|
true: string[];
|
|
36
38
|
false: {};
|
|
37
39
|
};
|
|
38
|
-
side: {
|
|
39
|
-
left: string[];
|
|
40
|
-
right: string[];
|
|
41
|
-
};
|
|
42
40
|
}>;
|
|
43
41
|
export declare const switchDescription: string;
|
|
44
42
|
//# sourceMappingURL=switch.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.css.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/selectionControls/switch.css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"switch.css.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/selectionControls/switch.css.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,QAKzB,CAAC;AAEH,eAAO,MAAM,WAAW,QAItB,CAAC;AAEH,eAAO,MAAM,SAAS,QAIpB,CAAC;AAEH,eAAO,MAAM,kBAAkB,QAK7B,CAAC;AAEH,eAAO,MAAM,eAAe,QAgB1B,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;EA8DvB,CAAC;AAEH,eAAO,MAAM,WAAW,QAgBtB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;EA0D5B,CAAC;AAEH,eAAO,MAAM,eAAe,QAW1B,CAAC;AAEH,eAAO,MAAM,WAAW,QAStB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;EAY5B,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAI5B,CAAC"}
|
|
@@ -1,56 +1,79 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { atoms } from "@gnist/themes/atoms.css.js";
|
|
3
3
|
import { tokens } from "@gnist/themes/tokens.css.js";
|
|
4
|
+
import { calc } from "@vanilla-extract/css-utils";
|
|
4
5
|
import { recipe } from "@vanilla-extract/recipes";
|
|
5
6
|
import { style } from "@vanilla-extract/css";
|
|
6
7
|
const focusContainer = style({
|
|
7
8
|
display: "inline-flex",
|
|
8
9
|
alignItems: "center",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
position: "relative",
|
|
11
|
+
flexShrink: 0
|
|
12
|
+
});
|
|
13
|
+
const switchField = style({
|
|
14
|
+
display: "inline-flex",
|
|
15
|
+
flexDirection: "column",
|
|
16
|
+
gap: tokens.spacing.base
|
|
15
17
|
});
|
|
16
|
-
const
|
|
17
|
-
display: "flex"
|
|
18
|
+
const switchRow = style({
|
|
19
|
+
display: "inline-flex",
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
gap: tokens.spacing.xxs
|
|
22
|
+
});
|
|
23
|
+
const switchLabelContent = style({
|
|
24
|
+
display: "inline-flex",
|
|
25
|
+
flexDirection: "column",
|
|
26
|
+
gap: tokens.spacing.base,
|
|
27
|
+
minWidth: 0
|
|
18
28
|
});
|
|
19
29
|
const switchContainer = style([
|
|
20
30
|
{
|
|
21
31
|
position: "relative",
|
|
22
32
|
display: "inline-flex",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
flexShrink: 0,
|
|
23
35
|
cursor: "pointer",
|
|
24
|
-
|
|
36
|
+
overflow: "hidden",
|
|
37
|
+
transition: "background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease"
|
|
25
38
|
},
|
|
26
39
|
atoms({
|
|
27
40
|
borderRadius: "full",
|
|
28
41
|
width: "xxl",
|
|
29
|
-
height: "
|
|
42
|
+
height: "m"
|
|
30
43
|
})
|
|
31
44
|
]);
|
|
32
45
|
const SwitchRecipe = recipe({
|
|
33
46
|
base: [
|
|
34
47
|
switchContainer,
|
|
35
|
-
atoms({
|
|
36
|
-
borderColor: "outline"
|
|
37
|
-
}),
|
|
38
48
|
{
|
|
39
|
-
borderWidth:
|
|
49
|
+
borderWidth: tokens.stroke.small,
|
|
40
50
|
borderStyle: "solid",
|
|
41
|
-
boxSizing: "border-box"
|
|
51
|
+
boxSizing: "border-box",
|
|
52
|
+
selectors: {
|
|
53
|
+
[`${focusContainer}:has(input:focus-visible) &`]: {
|
|
54
|
+
boxShadow: `0 0 0 ${tokens.stroke.medium} ${tokens.color.interactive}`
|
|
55
|
+
},
|
|
56
|
+
[`${focusContainer}:has(input:not(:disabled):hover) &`]: {
|
|
57
|
+
filter: "brightness(0.98)"
|
|
58
|
+
},
|
|
59
|
+
[`${focusContainer}:has(input:not(:disabled):active) &`]: {
|
|
60
|
+
filter: "brightness(0.94)"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
42
63
|
}
|
|
43
64
|
],
|
|
44
65
|
variants: {
|
|
45
66
|
selected: {
|
|
46
67
|
true: [
|
|
47
68
|
atoms({
|
|
48
|
-
backgroundColor: "success"
|
|
69
|
+
backgroundColor: "success",
|
|
70
|
+
borderColor: "success"
|
|
49
71
|
})
|
|
50
72
|
],
|
|
51
73
|
false: [
|
|
52
74
|
atoms({
|
|
53
|
-
backgroundColor: "surface-variant"
|
|
75
|
+
backgroundColor: "surface-variant",
|
|
76
|
+
borderColor: "on-surface"
|
|
54
77
|
})
|
|
55
78
|
]
|
|
56
79
|
},
|
|
@@ -58,53 +81,114 @@ const SwitchRecipe = recipe({
|
|
|
58
81
|
true: [
|
|
59
82
|
atoms({
|
|
60
83
|
backgroundColor: "disabled",
|
|
61
|
-
borderColor: "disabled"
|
|
84
|
+
borderColor: "on-disabled"
|
|
62
85
|
}),
|
|
63
86
|
{
|
|
64
|
-
cursor: "not-allowed"
|
|
65
|
-
opacity: 0.6
|
|
87
|
+
cursor: "not-allowed"
|
|
66
88
|
}
|
|
67
89
|
],
|
|
68
90
|
false: {}
|
|
69
91
|
}
|
|
70
|
-
}
|
|
92
|
+
},
|
|
93
|
+
compoundVariants: [
|
|
94
|
+
{
|
|
95
|
+
variants: {
|
|
96
|
+
selected: true,
|
|
97
|
+
disabled: true
|
|
98
|
+
},
|
|
99
|
+
style: [
|
|
100
|
+
atoms({
|
|
101
|
+
backgroundColor: "on-disabled",
|
|
102
|
+
borderColor: "on-disabled"
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
]
|
|
71
107
|
});
|
|
72
108
|
const switchThumb = style({
|
|
73
109
|
position: "absolute",
|
|
74
110
|
top: "50%",
|
|
75
111
|
transform: "translateY(-50%)",
|
|
76
|
-
|
|
112
|
+
display: "inline-flex",
|
|
113
|
+
alignItems: "center",
|
|
114
|
+
justifyContent: "center",
|
|
115
|
+
transition: "left 0.2s ease, transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease",
|
|
77
116
|
borderRadius: "50%",
|
|
78
|
-
backgroundColor: tokens.
|
|
79
|
-
|
|
117
|
+
backgroundColor: tokens.color.surface,
|
|
118
|
+
selectors: {
|
|
119
|
+
[`${focusContainer}:has(input:not(:disabled):active) &`]: {
|
|
120
|
+
transform: "translateY(-50%) scale(0.94)"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
80
123
|
});
|
|
81
124
|
const SwitchThumbRecipe = recipe({
|
|
82
125
|
base: [
|
|
83
126
|
switchThumb,
|
|
84
127
|
atoms({
|
|
85
|
-
width: "
|
|
86
|
-
height: "
|
|
87
|
-
})
|
|
128
|
+
width: "s",
|
|
129
|
+
height: "s"
|
|
130
|
+
}),
|
|
131
|
+
{
|
|
132
|
+
borderWidth: tokens.stroke.small,
|
|
133
|
+
borderStyle: "solid",
|
|
134
|
+
boxSizing: "border-box"
|
|
135
|
+
}
|
|
88
136
|
],
|
|
89
137
|
variants: {
|
|
90
138
|
selected: {
|
|
91
|
-
true:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
139
|
+
true: [
|
|
140
|
+
atoms({
|
|
141
|
+
borderColor: "on-surface"
|
|
142
|
+
}),
|
|
143
|
+
{
|
|
144
|
+
left: calc.subtract("100%", calc.add(tokens.size.s, tokens.stroke.small))
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
false: [
|
|
148
|
+
atoms({
|
|
149
|
+
borderColor: "on-surface"
|
|
150
|
+
}),
|
|
151
|
+
{
|
|
152
|
+
left: tokens.stroke.small
|
|
153
|
+
}
|
|
154
|
+
]
|
|
97
155
|
},
|
|
98
156
|
disabled: {
|
|
99
157
|
true: [
|
|
100
158
|
atoms({
|
|
101
|
-
backgroundColor: "
|
|
159
|
+
backgroundColor: "surface",
|
|
160
|
+
borderColor: "on-disabled"
|
|
102
161
|
})
|
|
103
162
|
],
|
|
104
163
|
false: {}
|
|
105
164
|
}
|
|
106
|
-
}
|
|
165
|
+
},
|
|
166
|
+
compoundVariants: [
|
|
167
|
+
{
|
|
168
|
+
variants: {
|
|
169
|
+
selected: true,
|
|
170
|
+
disabled: true
|
|
171
|
+
},
|
|
172
|
+
style: [
|
|
173
|
+
atoms({
|
|
174
|
+
borderColor: "surface"
|
|
175
|
+
})
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
]
|
|
107
179
|
});
|
|
180
|
+
const switchThumbIcon = style([
|
|
181
|
+
{
|
|
182
|
+
display: "inline-flex",
|
|
183
|
+
alignItems: "center",
|
|
184
|
+
justifyContent: "center",
|
|
185
|
+
lineHeight: 0,
|
|
186
|
+
pointerEvents: "none"
|
|
187
|
+
},
|
|
188
|
+
atoms({
|
|
189
|
+
color: "on-surface"
|
|
190
|
+
})
|
|
191
|
+
]);
|
|
108
192
|
const switchLabel = style([
|
|
109
193
|
{
|
|
110
194
|
userSelect: "none",
|
|
@@ -125,18 +209,6 @@ const SwitchLabelRecipe = recipe({
|
|
|
125
209
|
})
|
|
126
210
|
],
|
|
127
211
|
false: {}
|
|
128
|
-
},
|
|
129
|
-
side: {
|
|
130
|
-
left: [
|
|
131
|
-
atoms({
|
|
132
|
-
marginRight: "xxs"
|
|
133
|
-
})
|
|
134
|
-
],
|
|
135
|
-
right: [
|
|
136
|
-
atoms({
|
|
137
|
-
marginLeft: "xxs"
|
|
138
|
-
})
|
|
139
|
-
]
|
|
140
212
|
}
|
|
141
213
|
}
|
|
142
214
|
});
|
|
@@ -151,8 +223,11 @@ export {
|
|
|
151
223
|
SwitchThumbRecipe,
|
|
152
224
|
focusContainer,
|
|
153
225
|
switchContainer,
|
|
154
|
-
switchContainerStyle,
|
|
155
226
|
switchDescription,
|
|
227
|
+
switchField,
|
|
156
228
|
switchLabel,
|
|
157
|
-
|
|
229
|
+
switchLabelContent,
|
|
230
|
+
switchRow,
|
|
231
|
+
switchThumb,
|
|
232
|
+
switchThumbIcon
|
|
158
233
|
};
|
|
@@ -18,7 +18,7 @@ import "../../actions/buttons/styles.css.js";
|
|
|
18
18
|
import "../../../styles/states.css.js";
|
|
19
19
|
import { TextButton } from "../../actions/buttons/TextButton.js";
|
|
20
20
|
import { IconButton } from "../../actions/buttons/IconButton.js";
|
|
21
|
-
import { bannerHeading, icon,
|
|
21
|
+
import { bannerHeading, icon, closeButton, messageContainer, actionButton, mainContentContainer, banner } from "./AlertBanner.css.js";
|
|
22
22
|
const BannerHeading = component("BannerHeading", bannerHeading, "h2");
|
|
23
23
|
const AlertBanner = ({ type, heading, message, dismiss, action, density = "default", headingLevel = "h2", className }) => {
|
|
24
24
|
const text = useTranslation((t) => t.components.feedback.alerts);
|
|
@@ -4,7 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { Select } from "@base-ui/react/select";
|
|
6
6
|
import classNames from "classnames";
|
|
7
|
-
import {
|
|
7
|
+
import { inputContentWrapper, inputFieldWrapperRecipe, wrapperStyle } from "../shared-styles/inputField.css.js";
|
|
8
8
|
import { selectStyle, popUpStyle, listBoxStyle, optionStyle, optionBackground, singleOptionStyle } from "./select.css.js";
|
|
9
9
|
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
10
10
|
import { postInputWidth, preInputWidth } from "../shared-styles/inputFieldConstants.css.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { focusStyle, stateLayers } from "../../../styles/states.css.js";
|
|
3
3
|
import { atoms } from "@gnist/themes/atoms.css.js";
|
|
4
4
|
import { tokens } from "@gnist/themes/tokens.css.js";
|
|
5
5
|
import { style, createVar, globalStyle } from "@vanilla-extract/css";
|
|
@@ -15,7 +15,7 @@ import "../../../foundation/logos/Logo.css.js";
|
|
|
15
15
|
import { atoms } from "@gnist/themes/atoms.css.js";
|
|
16
16
|
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
17
17
|
import { iconButtonOverlayRecipe } from "../shared-styles/iconButtonOverlay.css.js";
|
|
18
|
-
import {
|
|
18
|
+
import { inputFieldStyle, inputContentWrapper, inputFieldWrapperRecipe, wrapperStyle } from "../shared-styles/inputField.css.js";
|
|
19
19
|
import { postInputWidth, preInputWidth, visibleLines } from "../shared-styles/inputFieldConstants.css.js";
|
|
20
20
|
import { labelStyle } from "../shared-styles/labelStyles.css.js";
|
|
21
21
|
import { prefixStyle, suffixStyle } from "../shared-styles/suffixPrefix.css.js";
|
|
@@ -12,7 +12,7 @@ import "../../../utilities/layout/Row.js";
|
|
|
12
12
|
import "@gnist/themes/tokens.css.js";
|
|
13
13
|
import "react-content-loader";
|
|
14
14
|
import { iconButtonOverlayRecipe } from "../shared-styles/iconButtonOverlay.css.js";
|
|
15
|
-
import {
|
|
15
|
+
import { inputFieldStyle, inputContentWrapper, inputFieldWrapperRecipe, wrapperStyle } from "../shared-styles/inputField.css.js";
|
|
16
16
|
import { postInputWidth, preInputWidth } from "../shared-styles/inputFieldConstants.css.js";
|
|
17
17
|
import { labelStyle } from "../shared-styles/labelStyles.css.js";
|
|
18
18
|
import { prefixStyle, suffixStyle } from "../shared-styles/suffixPrefix.css.js";
|
|
@@ -30,7 +30,7 @@ import "../../../styles/animations.css.js";
|
|
|
30
30
|
import "../../actions/chips/styles.css.js";
|
|
31
31
|
import { useTranslation } from "../../../translations/index.js";
|
|
32
32
|
import { createPortal } from "react-dom";
|
|
33
|
-
import { modalStyle, backdropStyle,
|
|
33
|
+
import { modalStyle, backdropStyle, modalHeadingStyle, headerRowRecipe, contentContainerRecipe, actionRowRecipe, dialogRecipe } from "./modal.css.js";
|
|
34
34
|
const hasScroll = (size, height) => {
|
|
35
35
|
switch (size) {
|
|
36
36
|
case "fullscreen":
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const index = require("./bilhold/index.cjs");
|
|
5
|
-
const index$
|
|
6
|
-
const index$
|
|
7
|
-
const index$
|
|
8
|
-
const index$
|
|
4
|
+
const index$3 = require("./bilhold/index.cjs");
|
|
5
|
+
const index$7 = require("./mollerbil/index.cjs");
|
|
6
|
+
const index$8 = require("./skoda/index.cjs");
|
|
7
|
+
const index$6 = require("./gumpen/index.cjs");
|
|
8
|
+
const index$9 = require("./vw/index.cjs");
|
|
9
9
|
const index$5 = require("./dahles/index.cjs");
|
|
10
|
-
const index$
|
|
11
|
-
const index$
|
|
12
|
-
const index$
|
|
13
|
-
const index
|
|
14
|
-
exports.bilhold = index.bilhold;
|
|
15
|
-
exports.mollerbil = index$
|
|
16
|
-
exports.skoda = index$
|
|
17
|
-
exports.gumpen = index$
|
|
18
|
-
exports.vw = index$
|
|
19
|
-
exports.vwnytte = index$
|
|
10
|
+
const index$2 = require("./autoria/index.cjs");
|
|
11
|
+
const index$1 = require("./audi/index.cjs");
|
|
12
|
+
const index$4 = require("./cupra/index.cjs");
|
|
13
|
+
const index = require("./others/index.cjs");
|
|
14
|
+
exports.bilhold = index$3.bilhold;
|
|
15
|
+
exports.mollerbil = index$7.mollerbil;
|
|
16
|
+
exports.skoda = index$8.skoda;
|
|
17
|
+
exports.gumpen = index$6.gumpen;
|
|
18
|
+
exports.vw = index$9.vw;
|
|
19
|
+
exports.vwnytte = index$9.vwnytte;
|
|
20
20
|
exports.dahles = index$5.dahles;
|
|
21
|
-
exports.autoria = index$
|
|
22
|
-
exports.audi = index$
|
|
23
|
-
exports.cupra = index$
|
|
24
|
-
exports.albjerk = index
|
|
25
|
-
exports.alta = index
|
|
26
|
-
exports.berge = index
|
|
27
|
-
exports.fremme = index
|
|
28
|
-
exports.kirkenes = index
|
|
29
|
-
exports.mobile = index
|
|
30
|
-
exports.slatlem = index
|
|
31
|
-
exports.sulland = index
|
|
32
|
-
exports.svebjorn = index
|
|
21
|
+
exports.autoria = index$2.autoria;
|
|
22
|
+
exports.audi = index$1.audi;
|
|
23
|
+
exports.cupra = index$4.cupra;
|
|
24
|
+
exports.albjerk = index.albjerk;
|
|
25
|
+
exports.alta = index.alta;
|
|
26
|
+
exports.berge = index.berge;
|
|
27
|
+
exports.fremme = index.fremme;
|
|
28
|
+
exports.kirkenes = index.kirkenes;
|
|
29
|
+
exports.mobile = index.mobile;
|
|
30
|
+
exports.slatlem = index.slatlem;
|
|
31
|
+
exports.sulland = index.sulland;
|
|
32
|
+
exports.svebjorn = index.svebjorn;
|
package/dist/index.cjs
CHANGED
|
@@ -34,14 +34,14 @@ const LinkCard = require("./components/surfaces/cards/LinkCard.cjs");
|
|
|
34
34
|
const RadioCard = require("./components/surfaces/cards/RadioCard.cjs");
|
|
35
35
|
const Modal = require("./components/surfaces/modal/Modal.cjs");
|
|
36
36
|
const Accordion = require("./components/surfaces/accordion/Accordion.cjs");
|
|
37
|
-
const index
|
|
37
|
+
const index = require("./fonts/index.cjs");
|
|
38
38
|
const ExtraIconsProvider = require("./foundation/iconography/ExtraIconsProvider.cjs");
|
|
39
39
|
const IconVariantProvider = require("./foundation/iconography/IconVariantProvider.cjs");
|
|
40
40
|
const icons = require("./foundation/iconography/icons.cjs");
|
|
41
41
|
const Icon = require("./foundation/iconography/Icon.cjs");
|
|
42
|
-
const index$
|
|
42
|
+
const index$1 = require("./foundation/typography/index.cjs");
|
|
43
43
|
const Logo = require("./foundation/logos/Logo.cjs");
|
|
44
|
-
const index = require("./translations/index.cjs");
|
|
44
|
+
const index$2 = require("./translations/index.cjs");
|
|
45
45
|
const ScreenReaderOnly = require("./utilities/accessibility/ScreenReaderOnly.cjs");
|
|
46
46
|
const visuallyHidden_css = require("./utilities/accessibility/visuallyHidden.css.cjs");
|
|
47
47
|
const formContext = require("./utilities/forms/formContext.cjs");
|
|
@@ -90,34 +90,34 @@ exports.LinkCard = LinkCard.LinkCard;
|
|
|
90
90
|
exports.RadioCard = RadioCard.RadioCard;
|
|
91
91
|
exports.Modal = Modal.Modal;
|
|
92
92
|
exports.Accordion = Accordion.Accordion;
|
|
93
|
-
exports.AudiFont = index
|
|
94
|
-
exports.AutoriaFont = index
|
|
95
|
-
exports.BilholdFont = index
|
|
96
|
-
exports.CupraFont = index
|
|
97
|
-
exports.DahlesFont = index
|
|
98
|
-
exports.GumpenFont = index
|
|
99
|
-
exports.MollerFont = index
|
|
100
|
-
exports.SkodaFont = index
|
|
101
|
-
exports.ToolsFont = index
|
|
102
|
-
exports.VWFont = index
|
|
93
|
+
exports.AudiFont = index.AudiFont;
|
|
94
|
+
exports.AutoriaFont = index.AutoriaFont;
|
|
95
|
+
exports.BilholdFont = index.BilholdFont;
|
|
96
|
+
exports.CupraFont = index.CupraFont;
|
|
97
|
+
exports.DahlesFont = index.DahlesFont;
|
|
98
|
+
exports.GumpenFont = index.GumpenFont;
|
|
99
|
+
exports.MollerFont = index.MollerFont;
|
|
100
|
+
exports.SkodaFont = index.SkodaFont;
|
|
101
|
+
exports.ToolsFont = index.ToolsFont;
|
|
102
|
+
exports.VWFont = index.VWFont;
|
|
103
103
|
exports.ExtraIconsProvider = ExtraIconsProvider.ExtraIconsProvider;
|
|
104
104
|
exports.IconVariantProvider = IconVariantProvider.IconVariantProvider;
|
|
105
105
|
exports.defineIcons = icons.defineIcons;
|
|
106
106
|
exports.Icon = Icon.Icon;
|
|
107
|
-
exports.BodyText = index$
|
|
108
|
-
exports.DetailText = index$
|
|
109
|
-
exports.DisplayText = index$
|
|
110
|
-
exports.HeaderLevels = index$
|
|
111
|
-
exports.Heading1Text = index$
|
|
112
|
-
exports.Heading2Text = index$
|
|
113
|
-
exports.Heading3Text = index$
|
|
114
|
-
exports.LeadText = index$
|
|
115
|
-
exports.Link = index$
|
|
116
|
-
exports.TextContainer = index$
|
|
107
|
+
exports.BodyText = index$1.BodyText;
|
|
108
|
+
exports.DetailText = index$1.DetailText;
|
|
109
|
+
exports.DisplayText = index$1.DisplayText;
|
|
110
|
+
exports.HeaderLevels = index$1.HeaderLevels;
|
|
111
|
+
exports.Heading1Text = index$1.Heading1Text;
|
|
112
|
+
exports.Heading2Text = index$1.Heading2Text;
|
|
113
|
+
exports.Heading3Text = index$1.Heading3Text;
|
|
114
|
+
exports.LeadText = index$1.LeadText;
|
|
115
|
+
exports.Link = index$1.Link;
|
|
116
|
+
exports.TextContainer = index$1.TextContainer;
|
|
117
117
|
exports.Logo = Logo.Logo;
|
|
118
|
-
exports.sliceTranslate = index.sliceTranslate;
|
|
119
|
-
exports.translate = index.translate;
|
|
120
|
-
exports.useTranslation = index.useTranslation;
|
|
118
|
+
exports.sliceTranslate = index$2.sliceTranslate;
|
|
119
|
+
exports.translate = index$2.translate;
|
|
120
|
+
exports.useTranslation = index$2.useTranslation;
|
|
121
121
|
exports.ScreenReaderOnly = ScreenReaderOnly.ScreenReaderOnly;
|
|
122
122
|
exports.visuallyHidden = visuallyHidden_css.visuallyHidden;
|
|
123
123
|
exports.FormProvider = formContext.FormProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { translations, translate } from "../../translations/index.js";
|
|
3
3
|
import { WHITE_SPACE } from "./regex.js";
|
|
4
4
|
function getValidationMessage(result, messagePrefix, lang) {
|
|
5
5
|
if (!result) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { sliceTranslate } from "../../translations/index.js";
|
|
3
|
-
import { VALID_ADDRESS, VALID_DIGITS, VALID_EMAIL, VALID_NAME,
|
|
3
|
+
import { VALID_ADDRESS, VALID_FIRST_CELL_PHONE_DIGIT, VALID_DIGITS, VALID_EMAIL, VALID_NAME, REG_NO_FULL_LENGTH, REG_NO_FULL_PATTERN } from "./regex.js";
|
|
4
4
|
import { validation, stripWhitespace } from "./validation.js";
|
|
5
5
|
import { matchesRegex, hasLength, maxLength } from "./validationSteps.js";
|
|
6
6
|
const texts = sliceTranslate((t) => t.validation.errors);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gnist/design-system",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@base-ui/react": "1.0.0",
|
|
51
51
|
"@formkit/auto-animate": "^0.8.2",
|
|
52
|
-
"@gnist/component-utils": "3.0.
|
|
53
|
-
"@gnist/themes": "^3.
|
|
52
|
+
"@gnist/component-utils": "3.0.14",
|
|
53
|
+
"@gnist/themes": "^3.29.0",
|
|
54
54
|
"@vanilla-extract/css": "^1.17.4",
|
|
55
55
|
"@vanilla-extract/css-utils": "^0.1.6",
|
|
56
56
|
"@vanilla-extract/dynamic": "^2.1.5",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"@gnist/eslint-config": "",
|
|
71
71
|
"@gnist/ts-config": "",
|
|
72
72
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
73
|
-
"@tsconfig/
|
|
74
|
-
"@types/node": "^
|
|
73
|
+
"@tsconfig/node24": "^24.0.0",
|
|
74
|
+
"@types/node": "^24.0.0",
|
|
75
75
|
"@types/react": "19.2.7",
|
|
76
76
|
"@types/react-dom": "19.2.3",
|
|
77
77
|
"@types/semver": "^7.7.0",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"tslib": "^2.8.1",
|
|
91
91
|
"tsx": "^4.20.4",
|
|
92
92
|
"typescript-transform-paths": "^3.5.5",
|
|
93
|
-
"vite": "7.
|
|
93
|
+
"vite": "7.3.2",
|
|
94
94
|
"vite-plugin-svgr": "^4.3.0",
|
|
95
95
|
"vite-tsconfig-paths": "^5.1.4"
|
|
96
96
|
},
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"optional": true
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "1b5b7189ae8c3576e8fec2c28f1d418667a544d4"
|
|
106
106
|
}
|