@gnist/design-system 3.6.0 → 3.8.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/building-blocks/skeletons/CircularSkeleton.d.ts.map +1 -1
- package/dist/building-blocks/skeletons/RectangularSkeleton.d.ts.map +1 -1
- package/dist/building-blocks/skeletons/TextSkeleton.d.ts.map +1 -1
- package/dist/components/actions/buttons/createButtonVariant.d.ts.map +1 -1
- package/dist/components/actions/buttons/styles.css.d.ts +5 -5
- package/dist/components/actions/chips/styles.css.d.ts +7 -7
- package/dist/components/actions/selectionControls/radiobutton.css.d.ts +6 -6
- package/dist/components/actions/selectionControls/shared.d.ts.map +1 -1
- package/dist/components/feedback/alerts/AlertBanner.d.ts.map +1 -1
- package/dist/components/feedback/loaders/LoadingSpinner.d.ts.map +1 -1
- package/dist/components/feedback/notifications/Lozenge.d.ts +2 -2
- package/dist/components/feedback/notifications/lozenge.css.d.ts +2 -2
- package/dist/components/feedback/progress/ProgressBar.css.d.ts +1 -1
- package/dist/components/feedback/progress/ProgressBar.css.d.ts.map +1 -1
- package/dist/components/inputs/pickers/Calendar.css.d.ts +4 -4
- package/dist/components/inputs/pickers/Calendar.css.d.ts.map +1 -1
- package/dist/components/inputs/shared-styles/iconButtonOverlay.css.d.ts +2 -2
- package/dist/components/inputs/shared-styles/inputFieldConstants.css.d.ts +3 -3
- package/dist/components/inputs/shared-styles/inputFieldConstants.css.d.ts.map +1 -1
- package/dist/components/inputs/shared-styles/labelStyles.css.d.ts +6 -6
- package/dist/components/inputs/textFields/TextArea.d.ts.map +1 -1
- package/dist/components/inputs/textFields/TextField.cjs +27 -4
- package/dist/components/inputs/textFields/TextField.d.ts +10 -11
- package/dist/components/inputs/textFields/TextField.d.ts.map +1 -1
- package/dist/components/inputs/textFields/TextField.js +27 -4
- package/dist/components/surfaces/accordion/Accordion.d.ts +3 -3
- package/dist/components/surfaces/accordion/accordion.css.d.ts +3 -3
- package/dist/components/surfaces/cards/cards.css.d.ts +2 -2
- package/dist/components/surfaces/cards/checkboxCard.css.d.ts +2 -2
- package/dist/components/surfaces/cards/internal/SelectionCard.d.ts.map +1 -1
- package/dist/components/surfaces/modal/Modal.cjs +5 -2
- package/dist/components/surfaces/modal/Modal.d.ts +1 -0
- package/dist/components/surfaces/modal/Modal.d.ts.map +1 -1
- package/dist/components/surfaces/modal/Modal.js +4 -3
- package/dist/components/surfaces/modal/modal.css.d.ts +7 -7
- package/dist/foundation/iconography/Icon.css.d.ts +2 -2
- package/dist/foundation/iconography/Icon.css.d.ts.map +1 -1
- package/dist/styles/states.css.d.ts +1 -1
- package/dist/translations/index.d.ts.map +1 -1
- package/dist/utilities/forms/formHelpers.d.ts.map +1 -1
- package/dist/utilities/html/index.d.ts.map +1 -1
- package/dist/utilities/layout/Column.d.ts +10 -10
- package/dist/utilities/layout/Row.d.ts +10 -10
- package/dist/utilities/layout/styles.css.d.ts +20 -20
- package/dist/utilities/time/date.d.ts.map +1 -1
- package/dist/utilities/tokens/tokens.d.ts.map +1 -1
- package/dist/utilities/validation/validation.d.ts.map +1 -1
- package/dist/utilities/validation/validationSteps.d.ts.map +1 -1
- package/dist/utilities/validation/validators.d.ts.map +1 -1
- package/package.json +100 -100
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.8.0](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.7.0...@gnist/design-system@3.8.0) (2025-08-11)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add className prop to Modal ([dea7d5d](https://github.com/mollerdigital/design-system-design-system/commit/dea7d5d0814012321e765cf2ceee05ba8dab2453))
|
|
11
|
+
|
|
12
|
+
## [3.7.0](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.6.0...@gnist/design-system@3.7.0) (2025-07-11)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* add mode prop to TextField ([015a59b](https://github.com/mollerdigital/design-system-design-system/commit/015a59b522fc04d0526a67de9d0e2ecc0fd3396f))
|
|
17
|
+
|
|
6
18
|
## [3.6.0](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.5.6...@gnist/design-system@3.6.0) (2025-07-07)
|
|
7
19
|
|
|
8
20
|
### Features
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircularSkeleton.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/skeletons/CircularSkeleton.tsx"],"names":[],"mappings":"AAiBA,MAAM,WAAW,qBAAqB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"CircularSkeleton.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/skeletons/CircularSkeleton.tsx"],"names":[],"mappings":"AAiBA,MAAM,WAAW,qBAAqB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,+BAI9B,qBAAqB,4CAoBvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RectangularSkeleton.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/skeletons/RectangularSkeleton.tsx"],"names":[],"mappings":"AAKA,UAAU,wBAAwB;IAC9B,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"RectangularSkeleton.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/skeletons/RectangularSkeleton.tsx"],"names":[],"mappings":"AAKA,UAAU,wBAAwB;IAC9B,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,wCAKjC,wBAAwB,4CAmB1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextSkeleton.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/skeletons/TextSkeleton.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"TextSkeleton.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/skeletons/TextSkeleton.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,+BAI1B,iBAAiB,4CAiCnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createButtonVariant.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/createButtonVariant.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,eAAO,MAAM,qBAAqB,GAAI,SAAS,SAAS,WAAW,
|
|
1
|
+
{"version":3,"file":"createButtonVariant.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/createButtonVariant.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,eAAO,MAAM,qBAAqB,GAAI,SAAS,SAAS,WAAW,EAC/D,OAAO,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,EACpE,cAAc,gBAAgB,CAAC,SAAS,CAAC,KAC1C,gBAAgB,CAAC,SAAS,CAuB3B,CAAC"}
|
|
@@ -7,7 +7,7 @@ export declare const buttonRecipe: import("@vanilla-extract/recipes").RuntimeFn<
|
|
|
7
7
|
};
|
|
8
8
|
false: {
|
|
9
9
|
":disabled": {
|
|
10
|
-
color: `var(--${string})
|
|
10
|
+
color: `var(--${string})`;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
};
|
|
@@ -23,7 +23,7 @@ export declare const buttonRecipe: import("@vanilla-extract/recipes").RuntimeFn<
|
|
|
23
23
|
buttonType: {
|
|
24
24
|
box: {
|
|
25
25
|
":disabled": {
|
|
26
|
-
backgroundColor: `var(--${string})
|
|
26
|
+
backgroundColor: `var(--${string})`;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
text: (string | {
|
|
@@ -45,10 +45,10 @@ export declare const boxedButton: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
|
45
45
|
export declare const iconButton: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
46
46
|
showLabel: {
|
|
47
47
|
left: {
|
|
48
|
-
paddingLeft: `var(--${string})
|
|
48
|
+
paddingLeft: `var(--${string})`;
|
|
49
49
|
};
|
|
50
50
|
right: {
|
|
51
|
-
paddingRight: `var(--${string})
|
|
51
|
+
paddingRight: `var(--${string})`;
|
|
52
52
|
};
|
|
53
53
|
none: string;
|
|
54
54
|
};
|
|
@@ -61,7 +61,7 @@ export declare const textButtonText: import("@vanilla-extract/recipes").RuntimeF
|
|
|
61
61
|
[x: string]: {
|
|
62
62
|
borderBottomColor: "inherit";
|
|
63
63
|
} | {
|
|
64
|
-
borderBottomColor: `var(--${string})
|
|
64
|
+
borderBottomColor: `var(--${string})`;
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
67
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const chipRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
2
|
selected: {
|
|
3
3
|
true: {
|
|
4
|
-
backgroundColor: `var(--${string})
|
|
5
|
-
color: `var(--${string})
|
|
6
|
-
borderColor: `var(--${string})
|
|
4
|
+
backgroundColor: `var(--${string})`;
|
|
5
|
+
color: `var(--${string})`;
|
|
6
|
+
borderColor: `var(--${string})`;
|
|
7
7
|
}[];
|
|
8
8
|
false: {};
|
|
9
9
|
};
|
|
@@ -16,15 +16,15 @@ export declare const chipRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
|
16
16
|
minWidth: string;
|
|
17
17
|
border: "none";
|
|
18
18
|
cursor: "not-allowed";
|
|
19
|
-
backgroundColor: `var(--${string})
|
|
19
|
+
backgroundColor: `var(--${string})`;
|
|
20
20
|
})[];
|
|
21
21
|
false: {};
|
|
22
22
|
};
|
|
23
23
|
filled: {
|
|
24
24
|
true: {
|
|
25
|
-
backgroundColor: `var(--${string})
|
|
26
|
-
color: `var(--${string})
|
|
27
|
-
borderColor: `var(--${string})
|
|
25
|
+
backgroundColor: `var(--${string})`;
|
|
26
|
+
color: `var(--${string})`;
|
|
27
|
+
borderColor: `var(--${string})`;
|
|
28
28
|
}[];
|
|
29
29
|
false: {};
|
|
30
30
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export declare const RadioButtonRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
2
|
validity: {
|
|
3
3
|
error: {
|
|
4
|
-
borderColor: `var(--${string})
|
|
4
|
+
borderColor: `var(--${string})`;
|
|
5
5
|
}[];
|
|
6
6
|
none: {};
|
|
7
7
|
success: {};
|
|
8
8
|
};
|
|
9
9
|
disabled: {
|
|
10
10
|
true: {
|
|
11
|
-
backgroundColor: `var(--${string})
|
|
12
|
-
borderColor: `var(--${string})
|
|
11
|
+
backgroundColor: `var(--${string})`;
|
|
12
|
+
borderColor: `var(--${string})`;
|
|
13
13
|
cursor: "not-allowed";
|
|
14
14
|
}[];
|
|
15
15
|
false: {};
|
|
@@ -18,20 +18,20 @@ export declare const RadioButtonRecipe: import("@vanilla-extract/recipes").Runti
|
|
|
18
18
|
export declare const CheckedCircleRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
19
19
|
checked: {
|
|
20
20
|
true: {
|
|
21
|
-
background: `var(--${string})
|
|
21
|
+
background: `var(--${string})`;
|
|
22
22
|
}[];
|
|
23
23
|
false: {};
|
|
24
24
|
};
|
|
25
25
|
validity: {
|
|
26
26
|
error: {
|
|
27
|
-
background: `var(--${string})
|
|
27
|
+
background: `var(--${string})`;
|
|
28
28
|
}[];
|
|
29
29
|
none: {};
|
|
30
30
|
success: {};
|
|
31
31
|
};
|
|
32
32
|
disabled: {
|
|
33
33
|
true: (string | {
|
|
34
|
-
backgroundColor: `var(--${string})
|
|
34
|
+
backgroundColor: `var(--${string})`;
|
|
35
35
|
cursor: "not-allowed";
|
|
36
36
|
})[];
|
|
37
37
|
false: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/selectionControls/shared.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,QAAQ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gBAAgB,4CAuClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/loaders/LoadingSpinner.tsx"],"names":[],"mappings":"AAIA,UAAU,mBAAmB;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;CACpD;AAID;;;;KAIK;AAEL,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/loaders/LoadingSpinner.tsx"],"names":[],"mappings":"AAIA,UAAU,mBAAmB;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;CACpD;AAID;;;;KAIK;AAEL,eAAO,MAAM,cAAc,GAAI,4CAI5B,mBAAmB,mDAgCrB,CAAC"}
|
|
@@ -14,10 +14,10 @@ export declare const Lozenge: import("@gnist/component-utils").VanillaRecipeComp
|
|
|
14
14
|
};
|
|
15
15
|
density: {
|
|
16
16
|
compact: {
|
|
17
|
-
fontSize: `var(--${string})
|
|
17
|
+
fontSize: `var(--${string})`;
|
|
18
18
|
};
|
|
19
19
|
default: {
|
|
20
|
-
fontSize: `var(--${string})
|
|
20
|
+
fontSize: `var(--${string})`;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
}>>;
|
|
@@ -11,10 +11,10 @@ export declare const lozengeRecipe: import("@vanilla-extract/recipes").RuntimeFn
|
|
|
11
11
|
};
|
|
12
12
|
density: {
|
|
13
13
|
compact: {
|
|
14
|
-
fontSize: `var(--${string})
|
|
14
|
+
fontSize: `var(--${string})`;
|
|
15
15
|
};
|
|
16
16
|
default: {
|
|
17
|
-
fontSize: `var(--${string})
|
|
17
|
+
fontSize: `var(--${string})`;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const progressBarStyles: string;
|
|
2
2
|
export declare const progressBar: string;
|
|
3
|
-
export declare const progressPercentage: `var(--${string})
|
|
3
|
+
export declare const progressPercentage: `var(--${string})`;
|
|
4
4
|
export declare const progressAnimation: string;
|
|
5
5
|
//# sourceMappingURL=ProgressBar.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.css.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/progress/ProgressBar.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,QAK5B,CAAC;AAEH,eAAO,MAAM,WAAW,QAEtB,CAAC;AAEH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ProgressBar.css.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/progress/ProgressBar.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,QAK5B,CAAC;AAEH,eAAO,MAAM,WAAW,QAEtB,CAAC;AAEH,eAAO,MAAM,kBAAkB,oBAAc,CAAC;AAO9C,eAAO,MAAM,iBAAiB,QAK5B,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const containerStyle: string;
|
|
2
2
|
export declare const gridStyle: string;
|
|
3
3
|
export declare const rowStyle: string;
|
|
4
|
-
export declare const firstDay: `var(--${string})
|
|
4
|
+
export declare const firstDay: `var(--${string})`;
|
|
5
5
|
export declare const selectMonthRow: string;
|
|
6
6
|
export declare const headerCell: string;
|
|
7
7
|
export declare const cellRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
8
8
|
isToday: {
|
|
9
9
|
true: {
|
|
10
|
-
border: `var(--${string}) var(--${string}) solid
|
|
10
|
+
border: `var(--${string}) var(--${string}) solid`;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
isSelected: {
|
|
@@ -21,13 +21,13 @@ export declare const cellRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
|
21
21
|
};
|
|
22
22
|
isDisabled: {
|
|
23
23
|
true: {
|
|
24
|
-
color: `var(--${string})
|
|
24
|
+
color: `var(--${string})`;
|
|
25
25
|
textDecoration: "line-through";
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
isUnavailable: {
|
|
29
29
|
true: {
|
|
30
|
-
color: `var(--${string})
|
|
30
|
+
color: `var(--${string})`;
|
|
31
31
|
textDecoration: "line-through";
|
|
32
32
|
};
|
|
33
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.css.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/pickers/Calendar.css.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc,QAazB,CAAC;AAEH,eAAO,MAAM,SAAS,QASpB,CAAC;AAEH,eAAO,MAAM,QAAQ,QASnB,CAAC;AAEH,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Calendar.css.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/pickers/Calendar.css.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc,QAazB,CAAC;AAEH,eAAO,MAAM,SAAS,QASpB,CAAC;AAEH,eAAO,MAAM,QAAQ,QASnB,CAAC;AAEH,eAAO,MAAM,QAAQ,oBAAc,CAAC;AAMpC,eAAO,MAAM,cAAc,QAIzB,CAAC;AAEH,eAAO,MAAM,UAAU,QAGrB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuErB,CAAC;AAEH,eAAO,MAAM,SAAS,QAGpB,CAAC;AAEH,eAAO,MAAM,WAAW,QAA6C,CAAC;AAEtE,eAAO,MAAM,iBAAiB,QAQ5B,CAAC"}
|
|
@@ -5,10 +5,10 @@ export declare const iconButtonOverlayRecipe: import("@vanilla-extract/recipes")
|
|
|
5
5
|
};
|
|
6
6
|
placement: {
|
|
7
7
|
left: {
|
|
8
|
-
left: `var(--${string})
|
|
8
|
+
left: `var(--${string})`;
|
|
9
9
|
};
|
|
10
10
|
right: {
|
|
11
|
-
right: `var(--${string})
|
|
11
|
+
right: `var(--${string})`;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const preInputWidth: `var(--${string})
|
|
2
|
-
export declare const postInputWidth: `var(--${string})
|
|
3
|
-
export declare const visibleLines: `var(--${string})
|
|
1
|
+
export declare const preInputWidth: `var(--${string})`;
|
|
2
|
+
export declare const postInputWidth: `var(--${string})`;
|
|
3
|
+
export declare const visibleLines: `var(--${string})`;
|
|
4
4
|
export declare const transitionTime = "250ms";
|
|
5
5
|
//# sourceMappingURL=inputFieldConstants.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputFieldConstants.css.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/shared-styles/inputFieldConstants.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"inputFieldConstants.css.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/shared-styles/inputFieldConstants.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,oBAAc,CAAC;AACzC,eAAO,MAAM,cAAc,oBAAc,CAAC;AAC1C,eAAO,MAAM,YAAY,oBAAc,CAAC;AACxC,eAAO,MAAM,cAAc,UAAU,CAAC"}
|
|
@@ -19,14 +19,14 @@ export declare const labelStyle: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
|
19
19
|
error: {
|
|
20
20
|
selectors: {
|
|
21
21
|
[x: string]: {
|
|
22
|
-
color: `var(--${string})
|
|
22
|
+
color: `var(--${string})`;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
success: {
|
|
27
27
|
selectors: {
|
|
28
28
|
[x: string]: {
|
|
29
|
-
color: `var(--${string})
|
|
29
|
+
color: `var(--${string})`;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
};
|
|
@@ -49,14 +49,14 @@ export declare const labelStyle: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
|
49
49
|
readonly left: 0;
|
|
50
50
|
readonly right: 0;
|
|
51
51
|
readonly top: "5px";
|
|
52
|
-
readonly height: `var(--${string})
|
|
52
|
+
readonly height: `var(--${string})`;
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
color: string;
|
|
56
56
|
lineHeight: "1em";
|
|
57
|
-
fontSize: `var(--${string})
|
|
58
|
-
paddingLeft: `var(--${string})
|
|
59
|
-
paddingRight: `var(--${string})
|
|
57
|
+
fontSize: `var(--${string})`;
|
|
58
|
+
paddingLeft: `var(--${string})`;
|
|
59
|
+
paddingRight: `var(--${string})`;
|
|
60
60
|
left: string;
|
|
61
61
|
};
|
|
62
62
|
false: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/textFields/TextArea.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA4B,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAezE,OAAO,EAGH,cAAc,EAEjB,MAAM,cAAc,CAAC;AAGtB,MAAM,MAAM,aAAa,GAAG,cAAc,GACtC,IAAI,CACA,sBAAsB,CAAC,mBAAmB,CAAC,EAC3C,aAAa,GAAG,OAAO,CAC1B,GAAG;IACA;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEN;;;;;;;;;;;EAWE;AACF,eAAO,MAAM,QAAQ;IA5Bb;;;;;;;OAOG;kBACW,MAAM;IACpB;;;OAGG;mBACY,MAAM;mDAiK3B,CAAC;AAEH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/textFields/TextArea.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA4B,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAezE,OAAO,EAGH,cAAc,EAEjB,MAAM,cAAc,CAAC;AAGtB,MAAM,MAAM,aAAa,GAAG,cAAc,GACtC,IAAI,CACA,sBAAsB,CAAC,mBAAmB,CAAC,EAC3C,aAAa,GAAG,OAAO,CAC1B,GAAG;IACA;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEN;;;;;;;;;;;EAWE;AACF,eAAO,MAAM,QAAQ;IA5Bb;;;;;;;OAOG;kBACW,MAAM;IACpB;;;OAGG;mBACY,MAAM;mDAiK3B,CAAC;AAEH,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,WAMjC,CAAC;AAEpB,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,WACtB,CAAC"}
|
|
@@ -23,17 +23,40 @@ const shared = require("../shared.cjs");
|
|
|
23
23
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
24
24
|
const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
|
|
25
25
|
const TextField = React.forwardRef(function TextField2(props, ref) {
|
|
26
|
-
var _a, _b;
|
|
26
|
+
var _a, _b, _c, _d;
|
|
27
27
|
const { wrapperProps, contentProps, commonInputProps } = shared.useInputFieldLogic(props);
|
|
28
28
|
const { inputProps } = shared.getInputFieldProps(props);
|
|
29
|
+
const isModeCurrencyOrNumberFormatting = ((_a = props.mode) == null ? void 0 : _a.style) === "currency" || ((_b = props.mode) == null ? void 0 : _b.style) === "numberSpacing";
|
|
30
|
+
const onChangeHandler = (event) => {
|
|
31
|
+
var _a2;
|
|
32
|
+
if (isModeCurrencyOrNumberFormatting) {
|
|
33
|
+
event.target.value = event.target.value.replace(new RegExp("(?<!^)-|[^\\d\\W.,]+|[.,]|\\s+", "g"), "");
|
|
34
|
+
}
|
|
35
|
+
(_a2 = inputProps.onChange) == null ? void 0 : _a2.call(inputProps, event);
|
|
36
|
+
};
|
|
37
|
+
if (isModeCurrencyOrNumberFormatting && !!inputProps.value) {
|
|
38
|
+
inputProps.type = "text";
|
|
39
|
+
inputProps.inputMode = "numeric";
|
|
40
|
+
const number = inputProps.value;
|
|
41
|
+
const isNegativeNumber = number[0] === "-";
|
|
42
|
+
inputProps.value = isNegativeNumber ? inputProps.value.slice(1) : inputProps.value;
|
|
43
|
+
const numberPrefix = isNegativeNumber ? "-" : "";
|
|
44
|
+
const formattedValue = new Intl.NumberFormat("nb-NB", {
|
|
45
|
+
style: "currency",
|
|
46
|
+
currency: "NOK",
|
|
47
|
+
minimumFractionDigits: 0,
|
|
48
|
+
maximumFractionDigits: 5
|
|
49
|
+
}).format(parseFloat(inputProps.value)).replaceAll(/[^0-9.,\W]/g, "").trim();
|
|
50
|
+
inputProps.value = numberPrefix + formattedValue;
|
|
51
|
+
}
|
|
29
52
|
return jsxRuntime.jsxs("span", { ref, className: classNames__default.default(wrapperProps.className, inputField_css.wrapperStyle), children: [props.leadingIcon && shared.isClickableIcon(props.leadingIcon) && jsxRuntime.jsx("button", { className: iconButtonOverlay_css.iconButtonOverlayRecipe({
|
|
30
53
|
placement: "left",
|
|
31
54
|
density: wrapperProps.density
|
|
32
55
|
}), title: props.leadingIcon.title, onClick: props.leadingIcon.onClick }), jsxRuntime.jsxs("label", { htmlFor: props.id, className: inputField_css.inputFieldWrapperRecipe({
|
|
33
56
|
disabled: props.disabled,
|
|
34
57
|
density: props.density,
|
|
35
|
-
validityType: (
|
|
36
|
-
}), children: [jsxRuntime.jsx("input", { ...commonInputProps, ...inputProps, className: classNames__default.default(inputField_css.inputFieldStyle, inputProps.className), style: dynamic.assignInlineVars({
|
|
58
|
+
validityType: (_c = props.validity) == null ? void 0 : _c.type
|
|
59
|
+
}), children: [jsxRuntime.jsx("input", { ...commonInputProps, ...inputProps, value: inputProps.value, onChange: onChangeHandler, className: classNames__default.default(inputField_css.inputFieldStyle, inputProps.className), style: dynamic.assignInlineVars({
|
|
37
60
|
[inputFieldConstants_css.preInputWidth]: wrapperProps.preInputWidth,
|
|
38
61
|
[inputFieldConstants_css.postInputWidth]: wrapperProps.postInputWidth
|
|
39
62
|
}), onFocus: (event) => {
|
|
@@ -44,7 +67,7 @@ const TextField = React.forwardRef(function TextField2(props, ref) {
|
|
|
44
67
|
(_b2 = inputProps.onFocus) == null ? void 0 : _b2.call(inputProps, event);
|
|
45
68
|
} }), jsxRuntime.jsxs("span", { className: inputField_css.inputContentWrapper({ density: props.density }), children: [props.leadingIcon && jsxRuntime.jsx(Icon.Icon, { icon: shared.isClickableIcon(props.leadingIcon) ? props.leadingIcon.icon : props.leadingIcon, className: atoms_css_js.atoms({ paddingRight: "xxs" }) }), props.prefix && jsxRuntime.jsx("span", { ref: contentProps.prefixRef, "aria-hidden": true, className: suffixPrefix_css.prefixStyle, children: props.prefix }), jsxRuntime.jsx("label", { id: contentProps.labelId, className: labelStyles_css.labelStyle({
|
|
46
69
|
density: props.density,
|
|
47
|
-
validityType: (
|
|
70
|
+
validityType: (_d = props.validity) == null ? void 0 : _d.type,
|
|
48
71
|
isElevated: !!props.value || props.type === "date" || props.type === "time",
|
|
49
72
|
disabled: props.disabled
|
|
50
73
|
}), style: {
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from "react";
|
|
2
2
|
import { TextInputProps } from "../shared.js";
|
|
3
|
-
export type
|
|
3
|
+
export type TextFieldModeProps = {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* @default text
|
|
5
|
+
* Applies number spacing and numeric input mode
|
|
7
6
|
*/
|
|
8
|
-
|
|
7
|
+
mode?: {
|
|
8
|
+
style: "numberSpacing";
|
|
9
|
+
} | {
|
|
10
|
+
style: "currency";
|
|
11
|
+
currency: "NOK";
|
|
12
|
+
};
|
|
9
13
|
};
|
|
14
|
+
export type TextFieldProps = TextInputProps & TextFieldModeProps & Omit<InputHTMLAttributes<HTMLInputElement>, "placeholder" | "value">;
|
|
10
15
|
/**
|
|
11
16
|
A text field is an input that allows a user to write or edit text. Text fields typically appear in forms and dialogs.
|
|
12
17
|
|
|
@@ -18,11 +23,5 @@ _Accessibility note:_ The leading/trailing icon and prefix/suffix text will not
|
|
|
18
23
|
|
|
19
24
|
Documentation: [TextField](https://gnist.moller.no/developers/components/latest/?path=/docs/components-inputs-textfields-textfield--docs)
|
|
20
25
|
*/
|
|
21
|
-
export declare const TextField: import("react").ForwardRefExoticComponent<TextInputProps & Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "
|
|
22
|
-
/**
|
|
23
|
-
* Input type
|
|
24
|
-
* @default text
|
|
25
|
-
*/
|
|
26
|
-
type?: "email" | "search" | "tel" | "text" | "url" | "password" | "number" | "date" | "time";
|
|
27
|
-
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
26
|
+
export declare const TextField: import("react").ForwardRefExoticComponent<TextInputProps & TextFieldModeProps & Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "placeholder"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
28
27
|
//# sourceMappingURL=TextField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/textFields/TextField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAA4B,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAetE,OAAO,EAGH,cAAc,EAEjB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/textFields/TextField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAA4B,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAetE,OAAO,EAGH,cAAc,EAEjB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,kBAAkB,GAAG;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,eAAe,CAAA;KAAE,GAAG;QAAE,KAAK,EAAE,UAAU,CAAC;QAAC,QAAQ,EAAE,KAAK,CAAA;KAAE,CAAC;CAC9E,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,cAAc,GACvC,kBAAkB,GAClB,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC;AAEzE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,wMAqLpB,CAAC"}
|
|
@@ -19,17 +19,40 @@ import { labelStyle } from "../shared-styles/labelStyles.css.js";
|
|
|
19
19
|
import { prefixStyle, suffixStyle } from "../shared-styles/suffixPrefix.css.js";
|
|
20
20
|
import { useInputFieldLogic, getInputFieldProps, isClickableIcon } from "../shared.js";
|
|
21
21
|
const TextField = forwardRef(function TextField2(props, ref) {
|
|
22
|
-
var _a, _b;
|
|
22
|
+
var _a, _b, _c, _d;
|
|
23
23
|
const { wrapperProps, contentProps, commonInputProps } = useInputFieldLogic(props);
|
|
24
24
|
const { inputProps } = getInputFieldProps(props);
|
|
25
|
+
const isModeCurrencyOrNumberFormatting = ((_a = props.mode) == null ? void 0 : _a.style) === "currency" || ((_b = props.mode) == null ? void 0 : _b.style) === "numberSpacing";
|
|
26
|
+
const onChangeHandler = (event) => {
|
|
27
|
+
var _a2;
|
|
28
|
+
if (isModeCurrencyOrNumberFormatting) {
|
|
29
|
+
event.target.value = event.target.value.replace(new RegExp("(?<!^)-|[^\\d\\W.,]+|[.,]|\\s+", "g"), "");
|
|
30
|
+
}
|
|
31
|
+
(_a2 = inputProps.onChange) == null ? void 0 : _a2.call(inputProps, event);
|
|
32
|
+
};
|
|
33
|
+
if (isModeCurrencyOrNumberFormatting && !!inputProps.value) {
|
|
34
|
+
inputProps.type = "text";
|
|
35
|
+
inputProps.inputMode = "numeric";
|
|
36
|
+
const number = inputProps.value;
|
|
37
|
+
const isNegativeNumber = number[0] === "-";
|
|
38
|
+
inputProps.value = isNegativeNumber ? inputProps.value.slice(1) : inputProps.value;
|
|
39
|
+
const numberPrefix = isNegativeNumber ? "-" : "";
|
|
40
|
+
const formattedValue = new Intl.NumberFormat("nb-NB", {
|
|
41
|
+
style: "currency",
|
|
42
|
+
currency: "NOK",
|
|
43
|
+
minimumFractionDigits: 0,
|
|
44
|
+
maximumFractionDigits: 5
|
|
45
|
+
}).format(parseFloat(inputProps.value)).replaceAll(/[^0-9.,\W]/g, "").trim();
|
|
46
|
+
inputProps.value = numberPrefix + formattedValue;
|
|
47
|
+
}
|
|
25
48
|
return jsxs("span", { ref, className: classNames(wrapperProps.className, wrapperStyle), children: [props.leadingIcon && isClickableIcon(props.leadingIcon) && jsx("button", { className: iconButtonOverlayRecipe({
|
|
26
49
|
placement: "left",
|
|
27
50
|
density: wrapperProps.density
|
|
28
51
|
}), title: props.leadingIcon.title, onClick: props.leadingIcon.onClick }), jsxs("label", { htmlFor: props.id, className: inputFieldWrapperRecipe({
|
|
29
52
|
disabled: props.disabled,
|
|
30
53
|
density: props.density,
|
|
31
|
-
validityType: (
|
|
32
|
-
}), children: [jsx("input", { ...commonInputProps, ...inputProps, className: classNames(inputFieldStyle, inputProps.className), style: assignInlineVars({
|
|
54
|
+
validityType: (_c = props.validity) == null ? void 0 : _c.type
|
|
55
|
+
}), children: [jsx("input", { ...commonInputProps, ...inputProps, value: inputProps.value, onChange: onChangeHandler, className: classNames(inputFieldStyle, inputProps.className), style: assignInlineVars({
|
|
33
56
|
[preInputWidth]: wrapperProps.preInputWidth,
|
|
34
57
|
[postInputWidth]: wrapperProps.postInputWidth
|
|
35
58
|
}), onFocus: (event) => {
|
|
@@ -40,7 +63,7 @@ const TextField = forwardRef(function TextField2(props, ref) {
|
|
|
40
63
|
(_b2 = inputProps.onFocus) == null ? void 0 : _b2.call(inputProps, event);
|
|
41
64
|
} }), jsxs("span", { className: inputContentWrapper({ density: props.density }), children: [props.leadingIcon && jsx(Icon, { icon: isClickableIcon(props.leadingIcon) ? props.leadingIcon.icon : props.leadingIcon, className: atoms({ paddingRight: "xxs" }) }), props.prefix && jsx("span", { ref: contentProps.prefixRef, "aria-hidden": true, className: prefixStyle, children: props.prefix }), jsx("label", { id: contentProps.labelId, className: labelStyle({
|
|
42
65
|
density: props.density,
|
|
43
|
-
validityType: (
|
|
66
|
+
validityType: (_d = props.validity) == null ? void 0 : _d.type,
|
|
44
67
|
isElevated: !!props.value || props.type === "date" || props.type === "time",
|
|
45
68
|
disabled: props.disabled
|
|
46
69
|
}), style: {
|
|
@@ -26,13 +26,13 @@ type AccordionProps = {
|
|
|
26
26
|
export declare const Accordion: import("@gnist/component-utils").VanillaRecipeComponent<import("react").ElementType, import("react").ForwardRefExoticComponent<AccordionProps & import("react").RefAttributes<HTMLDetailsElement>>, import("@gnist/component-utils").VariantSelection<{
|
|
27
27
|
withDivider: {
|
|
28
28
|
true: {
|
|
29
|
-
borderBottom: `var(--${string}) solid var(--${string})
|
|
29
|
+
borderBottom: `var(--${string}) solid var(--${string})`;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
withBackground: {
|
|
33
33
|
true: {
|
|
34
|
-
backgroundColor: `var(--${string})
|
|
35
|
-
color: `var(--${string})
|
|
34
|
+
backgroundColor: `var(--${string})`;
|
|
35
|
+
color: `var(--${string})`;
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
}>>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const accordionRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
2
|
withDivider: {
|
|
3
3
|
true: {
|
|
4
|
-
borderBottom: `var(--${string}) solid var(--${string})
|
|
4
|
+
borderBottom: `var(--${string}) solid var(--${string})`;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
withBackground: {
|
|
8
8
|
true: {
|
|
9
|
-
backgroundColor: `var(--${string})
|
|
10
|
-
color: `var(--${string})
|
|
9
|
+
backgroundColor: `var(--${string})`;
|
|
10
|
+
color: `var(--${string})`;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
}>;
|
|
@@ -22,8 +22,8 @@ export declare const cardsRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
|
22
22
|
checkbox: {};
|
|
23
23
|
info: {
|
|
24
24
|
borderStyle: "solid";
|
|
25
|
-
borderWidth: `var(--${string})
|
|
26
|
-
borderColor: `var(--${string})
|
|
25
|
+
borderWidth: `var(--${string})`;
|
|
26
|
+
borderColor: `var(--${string})`;
|
|
27
27
|
boxShadow: "none";
|
|
28
28
|
}[];
|
|
29
29
|
link: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const StyledCardRecipe: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
2
|
disabled: {
|
|
3
3
|
true: {
|
|
4
|
-
color: `var(--${string})
|
|
4
|
+
color: `var(--${string})`;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
cardStyle: {
|
|
8
8
|
elevation: {
|
|
9
|
-
boxShadow: `var(--${string})
|
|
9
|
+
boxShadow: `var(--${string})`;
|
|
10
10
|
border: "none";
|
|
11
11
|
}[];
|
|
12
12
|
outline: never[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/surfaces/cards/internal/SelectionCard.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,gBAAgB,EAChB,QAAQ,EACX,6CAAoE;AACrE,OAAO,EAAE,gBAAgB,EAAE,+BAAwC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMhD,MAAM,WAAW,cAAc;IAC3B,SAAS,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACvC;AAED,MAAM,MAAM,yBAAyB,GAAG,IAAI,CACxC,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,EACjC,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,GAAG,IAAI,CAC5D,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACnC,+EAA+E;IAC/E,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,kBACb,SAAQ,sBAAsB,EAC1B,aAAa,CAAC,KAAK,CAAC,EACpB,cAAc,EACd,gBAAgB,CAAC,OAAO,CAAC,EACzB,QAAQ,CAAC;IAAE,gBAAgB,EAAE,KAAK,CAAA;CAAE,CAAC;CAAG;AAEhD,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"SelectionCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/surfaces/cards/internal/SelectionCard.tsx"],"names":[],"mappings":"AAMA,OAAO,EACH,gBAAgB,EAChB,QAAQ,EACX,6CAAoE;AACrE,OAAO,EAAE,gBAAgB,EAAE,+BAAwC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMhD,MAAM,WAAW,cAAc;IAC3B,SAAS,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACvC;AAED,MAAM,MAAM,yBAAyB,GAAG,IAAI,CACxC,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,EACjC,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,GAAG,IAAI,CAC5D,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACnC,+EAA+E;IAC/E,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,kBACb,SAAQ,sBAAsB,EAC1B,aAAa,CAAC,KAAK,CAAC,EACpB,cAAc,EACd,gBAAgB,CAAC,OAAO,CAAC,EACzB,QAAQ,CAAC;IAAE,gBAAgB,EAAE,KAAK,CAAA;CAAE,CAAC;CAAG;AAEhD,eAAO,MAAM,mBAAmB,GAAI,oBAGjC;IAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAA;CAAE,GAAG,gBAAgB,4CAcnD,CAAC;AAIF,eAAO,MAAM,oBAAoB,GAAI,4CAKlC,IAAI,CACH,kBAAkB,EAClB,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CACnD,mDAqBA,CAAC"}
|
|
@@ -17,9 +17,11 @@ require("../../actions/chips/TagChip.cjs");
|
|
|
17
17
|
const index$1 = require("../../../foundation/typography/index.cjs");
|
|
18
18
|
const index = require("../../../translations/index.cjs");
|
|
19
19
|
const tokens_css_js = require("@gnist/themes/tokens.css.js");
|
|
20
|
+
const classNames = require("classnames");
|
|
20
21
|
const React = require("react");
|
|
21
22
|
const reactDom = require("react-dom");
|
|
22
23
|
const modal_css = require("./modal.css.cjs");
|
|
24
|
+
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
23
25
|
function _interopNamespaceCompat(e) {
|
|
24
26
|
if (e && typeof e === "object" && "default" in e) return e;
|
|
25
27
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -37,6 +39,7 @@ function _interopNamespaceCompat(e) {
|
|
|
37
39
|
n.default = e;
|
|
38
40
|
return Object.freeze(n);
|
|
39
41
|
}
|
|
42
|
+
const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
|
|
40
43
|
const React__namespace = /* @__PURE__ */ _interopNamespaceCompat(React);
|
|
41
44
|
const hasScroll = (size, height) => {
|
|
42
45
|
switch (size) {
|
|
@@ -50,7 +53,7 @@ const hasScroll = (size, height) => {
|
|
|
50
53
|
return height > 271;
|
|
51
54
|
}
|
|
52
55
|
};
|
|
53
|
-
const Modal = React__namespace.forwardRef(function Modal2({ children, title, isOpen, handleClose, size = "medium", primaryAction, secondaryAction, action, backgroundColor = tokens_css_js.tokens.color.surface,
|
|
56
|
+
const Modal = React__namespace.forwardRef(function Modal2({ children, title, isOpen, handleClose, size = "medium", primaryAction, secondaryAction, action, backgroundColor = tokens_css_js.tokens.color.surface, className }, ref) {
|
|
54
57
|
var _a, _b;
|
|
55
58
|
const text = index.useTranslation((t) => t.components.surfaces.modal);
|
|
56
59
|
const [contentHeight, setContentHeight] = React.useState(0);
|
|
@@ -92,7 +95,7 @@ const Modal = React__namespace.forwardRef(function Modal2({ children, title, isO
|
|
|
92
95
|
if (!renderComponent) {
|
|
93
96
|
return null;
|
|
94
97
|
}
|
|
95
|
-
return reactDom.createPortal(jsxRuntime.jsxs("dialog", { ref: dialogRef, className: isOpen ? modal_css.modalStyle : "", onClick: handleDialogClose, children: [jsxRuntime.jsx("div", { role: "presentation", className: modal_css.backdropStyle, onClick: handleBackdropClick }), jsxRuntime.jsxs("div", { ref, className: modal_css.dialogRecipe({ size }),
|
|
98
|
+
return reactDom.createPortal(jsxRuntime.jsxs("dialog", { ref: dialogRef, className: isOpen ? modal_css.modalStyle : "", onClick: handleDialogClose, children: [jsxRuntime.jsx("div", { role: "presentation", className: modal_css.backdropStyle, onClick: handleBackdropClick }), jsxRuntime.jsxs("div", { ref, className: classNames__default.default(modal_css.dialogRecipe({ size }), className), style: { backgroundColor }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", { className: modal_css.headerRowRecipe({
|
|
96
99
|
size,
|
|
97
100
|
hasScroll: hasScroll(size, contentHeight)
|
|
98
101
|
}), style: { backgroundColor }, children: [title ? jsxRuntime.jsx(index$1.LeadText, { "$as": "h2", className: modal_css.modalHeadingStyle, children: title }) : jsxRuntime.jsx("span", { "aria-hidden": true }), jsxRuntime.jsx(IconButton.IconButton, { icon: "close", label: text.dismissLabel, onClick: handleClose, disabled: (_a = primaryAction == null ? void 0 : primaryAction.loading) == null ? void 0 : _a.isLoading, autoFocus: true })] }), jsxRuntime.jsx("div", { ref: (element) => {
|