@gnist/design-system 3.9.2 → 3.10.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/feedback/notifications/index.d.ts +1 -0
- package/dist/components/feedback/notifications/index.d.ts.map +1 -1
- package/dist/components/feedback/notifications/lozenge.css.cjs +15 -10
- package/dist/components/feedback/notifications/lozenge.css.d.ts +1 -1
- package/dist/components/feedback/notifications/lozenge.css.d.ts.map +1 -1
- package/dist/components/feedback/notifications/lozenge.css.js +15 -10
- package/dist/components/inputs/dropdowns/SelectBase.cjs +2 -2
- package/dist/components/inputs/dropdowns/SelectBase.js +2 -2
- package/dist/components/inputs/shared.cjs +9 -1
- package/dist/components/inputs/shared.d.ts +6 -13
- package/dist/components/inputs/shared.d.ts.map +1 -1
- package/dist/components/inputs/shared.js +9 -1
- package/package.json +2 -2
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
|
+
## [3.10.0](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.9.3...@gnist/design-system@3.10.0) (2025-09-05)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* export LozengeColorVariants to consumers ([bd384ca](https://github.com/mollerdigital/design-system-design-system/commit/bd384cacfe737893fe50a30156974eb8d00e15fa))
|
|
11
|
+
|
|
12
|
+
## [3.9.3](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.9.2...@gnist/design-system@3.9.3) (2025-09-05)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* only assign className from user to wrapping span component for SelectBase ([2642d4e](https://github.com/mollerdigital/design-system-design-system/commit/2642d4e809af491c2ddb50126551d1532e405dd9))
|
|
17
|
+
|
|
6
18
|
## [3.9.2](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.9.1...@gnist/design-system@3.9.2) (2025-09-03)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/notifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/notifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -6,11 +6,20 @@ const tokens_css_js = require("@gnist/themes/tokens.css.js");
|
|
|
6
6
|
const css = require("@vanilla-extract/css");
|
|
7
7
|
const cssUtils = require("@vanilla-extract/css-utils");
|
|
8
8
|
const recipes = require("@vanilla-extract/recipes");
|
|
9
|
-
const getColors = (variant) =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
const getColors = (variant) => {
|
|
10
|
+
if (variant === "neutral") {
|
|
11
|
+
return atoms_css_js.atoms({
|
|
12
|
+
backgroundColor: "background",
|
|
13
|
+
borderColor: "on-background",
|
|
14
|
+
color: "on-background"
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return atoms_css_js.atoms({
|
|
18
|
+
backgroundColor: `${variant}-container`,
|
|
19
|
+
color: `on-${variant}-container`,
|
|
20
|
+
borderColor: `on-${variant}-container`
|
|
21
|
+
});
|
|
22
|
+
};
|
|
14
23
|
const largeBody = tokens_css_js.tokens.type.large.body;
|
|
15
24
|
const lozengeRecipe = recipes.recipe({
|
|
16
25
|
base: [
|
|
@@ -39,11 +48,7 @@ const lozengeRecipe = recipes.recipe({
|
|
|
39
48
|
success: getColors("success"),
|
|
40
49
|
warning: getColors("warning"),
|
|
41
50
|
error: getColors("error"),
|
|
42
|
-
neutral:
|
|
43
|
-
backgroundColor: "background",
|
|
44
|
-
borderColor: "on-background",
|
|
45
|
-
color: "on-background"
|
|
46
|
-
})
|
|
51
|
+
neutral: getColors("neutral")
|
|
47
52
|
},
|
|
48
53
|
density: {
|
|
49
54
|
compact: { fontSize: tokens_css_js.tokens.type.small.detail.fontSize },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ColorVariants = "primary" | "secondary" | "info" | "success" | "warning" | "error";
|
|
1
|
+
export type ColorVariants = "primary" | "secondary" | "info" | "success" | "warning" | "error" | "neutral";
|
|
2
2
|
export declare const lozengeRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
3
3
|
colorVariant: {
|
|
4
4
|
primary: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lozenge.css.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/notifications/lozenge.css.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,aAAa,GACnB,SAAS,GACT,WAAW,GACX,MAAM,GACN,SAAS,GACT,SAAS,GACT,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"lozenge.css.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/notifications/lozenge.css.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,aAAa,GACnB,SAAS,GACT,WAAW,GACX,MAAM,GACN,SAAS,GACT,SAAS,GACT,OAAO,GACP,SAAS,CAAC;AAmBhB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;EAsCxB,CAAC"}
|
|
@@ -4,11 +4,20 @@ import { tokens } from "@gnist/themes/tokens.css.js";
|
|
|
4
4
|
import { globalStyle } from "@vanilla-extract/css";
|
|
5
5
|
import { calc } from "@vanilla-extract/css-utils";
|
|
6
6
|
import { recipe } from "@vanilla-extract/recipes";
|
|
7
|
-
const getColors = (variant) =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
const getColors = (variant) => {
|
|
8
|
+
if (variant === "neutral") {
|
|
9
|
+
return atoms({
|
|
10
|
+
backgroundColor: "background",
|
|
11
|
+
borderColor: "on-background",
|
|
12
|
+
color: "on-background"
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return atoms({
|
|
16
|
+
backgroundColor: `${variant}-container`,
|
|
17
|
+
color: `on-${variant}-container`,
|
|
18
|
+
borderColor: `on-${variant}-container`
|
|
19
|
+
});
|
|
20
|
+
};
|
|
12
21
|
const largeBody = tokens.type.large.body;
|
|
13
22
|
const lozengeRecipe = recipe({
|
|
14
23
|
base: [
|
|
@@ -37,11 +46,7 @@ const lozengeRecipe = recipe({
|
|
|
37
46
|
success: getColors("success"),
|
|
38
47
|
warning: getColors("warning"),
|
|
39
48
|
error: getColors("error"),
|
|
40
|
-
neutral:
|
|
41
|
-
backgroundColor: "background",
|
|
42
|
-
borderColor: "on-background",
|
|
43
|
-
color: "on-background"
|
|
44
|
-
})
|
|
49
|
+
neutral: getColors("neutral")
|
|
45
50
|
},
|
|
46
51
|
density: {
|
|
47
52
|
compact: { fontSize: tokens.type.small.detail.fontSize },
|
|
@@ -47,12 +47,12 @@ function SelectBase(props, isMultiple) {
|
|
|
47
47
|
disabled: props.disabled,
|
|
48
48
|
density: props.density,
|
|
49
49
|
validityType: props.validity?.type
|
|
50
|
-
}), children: [jsxRuntime.jsx(base.Select, {
|
|
50
|
+
}), children: [jsxRuntime.jsx(base.Select, { ...commonInputProps, ...selectProps, style: {
|
|
51
51
|
...dynamic.assignInlineVars({
|
|
52
52
|
[inputFieldConstants_css.preInputWidth]: wrapperProps.preInputWidth,
|
|
53
53
|
[inputFieldConstants_css.postInputWidth]: wrapperProps.postInputWidth
|
|
54
54
|
})
|
|
55
|
-
},
|
|
55
|
+
}, className: select_css.selectStyle, ref: props.ref, multiple: isMultiple, onListboxOpenChange: (expanded) => setIsExpanded(expanded), slots: {
|
|
56
56
|
listbox: listBoxComponent,
|
|
57
57
|
popup: popUpComponent
|
|
58
58
|
}, onChange: (e, value) => {
|
|
@@ -43,12 +43,12 @@ function SelectBase(props, isMultiple) {
|
|
|
43
43
|
disabled: props.disabled,
|
|
44
44
|
density: props.density,
|
|
45
45
|
validityType: props.validity?.type
|
|
46
|
-
}), children: [jsx(Select, {
|
|
46
|
+
}), children: [jsx(Select, { ...commonInputProps, ...selectProps, style: {
|
|
47
47
|
...assignInlineVars({
|
|
48
48
|
[preInputWidth]: wrapperProps.preInputWidth,
|
|
49
49
|
[postInputWidth]: wrapperProps.postInputWidth
|
|
50
50
|
})
|
|
51
|
-
},
|
|
51
|
+
}, className: selectStyle, ref: props.ref, multiple: isMultiple, onListboxOpenChange: (expanded) => setIsExpanded(expanded), slots: {
|
|
52
52
|
listbox: listBoxComponent,
|
|
53
53
|
popup: popUpComponent
|
|
54
54
|
}, onChange: (e, value) => {
|
|
@@ -107,7 +107,15 @@ function getSelectInputProps({ label, density, leadingIcon, helperText, ...selec
|
|
|
107
107
|
leadingIcon,
|
|
108
108
|
helperText
|
|
109
109
|
},
|
|
110
|
-
selectProps
|
|
110
|
+
selectProps: {
|
|
111
|
+
onChange: selectProps.onChange,
|
|
112
|
+
validity: selectProps.validity,
|
|
113
|
+
id: selectProps.id,
|
|
114
|
+
disabled: selectProps.disabled,
|
|
115
|
+
value: selectProps.value,
|
|
116
|
+
ref: selectProps.ref,
|
|
117
|
+
key: selectProps.key
|
|
118
|
+
}
|
|
111
119
|
};
|
|
112
120
|
}
|
|
113
121
|
exports.getInputFieldProps = getInputFieldProps;
|
|
@@ -135,22 +135,15 @@ export declare function getSelectInputProps<T>({ label, density, leadingIcon, he
|
|
|
135
135
|
helperText: string | undefined;
|
|
136
136
|
};
|
|
137
137
|
selectProps: {
|
|
138
|
-
/**
|
|
139
|
-
* className for the wrapper element, e.g. for used with styled(TextField)
|
|
140
|
-
*/
|
|
141
|
-
className?: string;
|
|
142
|
-
/**
|
|
143
|
-
* onChange prop for setting value to selected options
|
|
144
|
-
*/
|
|
145
138
|
onChange: (value: T) => void;
|
|
146
|
-
|
|
147
|
-
key?: import("react").Key | null | undefined;
|
|
148
|
-
value?: T | undefined;
|
|
149
|
-
id?: string;
|
|
150
|
-
disabled?: boolean;
|
|
151
|
-
validity?: import("../../index.js").InputFieldValidity<{
|
|
139
|
+
validity: import("../../index.js").InputFieldValidity<{
|
|
152
140
|
errorMsgRequired: true;
|
|
153
141
|
}> | undefined;
|
|
142
|
+
id: string | undefined;
|
|
143
|
+
disabled: boolean | undefined;
|
|
144
|
+
value: T | undefined;
|
|
145
|
+
ref: import("react").Ref<HTMLButtonElement> | undefined;
|
|
146
|
+
key: import("react").Key | null | undefined;
|
|
154
147
|
};
|
|
155
148
|
};
|
|
156
149
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/shared.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,yBAAwC;AAE7E,OAAO,EAAE,aAAa,EAAE,WAAW,EAAY,MAAM,OAAO,CAAC;AAC7D,OAAO,EACH,gBAAgB,EAChB,UAAU,EACV,KAAK,EACL,QAAQ,EACX,MAAM,wBAAwB,CAAC;AAchC,wBAAgB,eAAe,CAC3B,IAAI,EAAE,YAAY,GAAG,aAAa,GACnC,IAAI,IAAI,aAAa,CAEvB;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AACD,MAAM,WAAW,cACb,SAAQ,gBAAgB,CAAC,MAAM,CAAC,EAC5B,QAAQ,EACR,UAAU,EACV,KAAK;IACT;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,aAAa,CAAC;IAC3C;;OAEG;IACH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IAAI,CAAC,EACtB,QAAQ,EACR,UAAU,EACV,KAAK;IACT;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;CACnC;AAED,wBAAgB,kBAAkB,CAAC,EAC/B,KAAK,EACL,OAAO,EAAE,QAAoB,EAC7B,QAA2B,EAC3B,EAA6B,EAC7B,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,SAAS,GACZ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwChB;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,EACnC,KAAK,EACL,OAAO,EAAE,QAAoB,EAC7B,QAA2B,EAC3B,EAA6B,EAC7B,WAAW,EACX,QAAQ,EACR,OAAO,EACP,SAAS,GACZ,EAAE,oBAAoB,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCzB;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,EAClC,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAM,EACN,WAAW,EACX,YAAY,EACZ,UAAU,EACV,sBAAsB,EACtB,GAAG,UAAU,EAChB,EAAE,CAAC,GAAG,cAAc;;;;;;;;;;;;EAcpB;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,EACnC,KAAK,EACL,OAAO,EACP,WAAW,EACX,UAAU,EACV,GAAG,WAAW,EACjB,EAAE,oBAAoB,CAAC,CAAC,CAAC;;;;;;;;gCAtIK,IAAI;;;;;;;;;;EAwJlC"}
|
|
@@ -105,7 +105,15 @@ function getSelectInputProps({ label, density, leadingIcon, helperText, ...selec
|
|
|
105
105
|
leadingIcon,
|
|
106
106
|
helperText
|
|
107
107
|
},
|
|
108
|
-
selectProps
|
|
108
|
+
selectProps: {
|
|
109
|
+
onChange: selectProps.onChange,
|
|
110
|
+
validity: selectProps.validity,
|
|
111
|
+
id: selectProps.id,
|
|
112
|
+
disabled: selectProps.disabled,
|
|
113
|
+
value: selectProps.value,
|
|
114
|
+
ref: selectProps.ref,
|
|
115
|
+
key: selectProps.key
|
|
116
|
+
}
|
|
109
117
|
};
|
|
110
118
|
}
|
|
111
119
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gnist/design-system",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"optional": true
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "f9dc0e36c17acc63190ff14f0e2f7dba96084c9e"
|
|
106
106
|
}
|