@gnist/design-system 7.4.0 → 7.5.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/components/feedback/feedbackInput/FeedbackInput.cjs +72 -0
  3. package/dist/components/feedback/feedbackInput/FeedbackInput.css.cjs +28 -0
  4. package/dist/components/feedback/feedbackInput/FeedbackInput.css.d.ts +5 -0
  5. package/dist/components/feedback/feedbackInput/FeedbackInput.css.d.ts.map +1 -0
  6. package/dist/components/feedback/feedbackInput/FeedbackInput.css.js +25 -0
  7. package/dist/components/feedback/feedbackInput/FeedbackInput.d.ts +39 -0
  8. package/dist/components/feedback/feedbackInput/FeedbackInput.d.ts.map +1 -0
  9. package/dist/components/feedback/feedbackInput/FeedbackInput.js +70 -0
  10. package/dist/components/feedback/feedbackInput/index.cjs +4 -0
  11. package/dist/components/feedback/feedbackInput/index.d.ts +4 -0
  12. package/dist/components/feedback/feedbackInput/index.d.ts.map +1 -0
  13. package/dist/components/feedback/feedbackInput/index.js +3 -0
  14. package/dist/components/feedback/feedbackInput/internal/RatingScale.cjs +59 -0
  15. package/dist/components/feedback/feedbackInput/internal/RatingScale.css.cjs +64 -0
  16. package/dist/components/feedback/feedbackInput/internal/RatingScale.css.d.ts +7 -0
  17. package/dist/components/feedback/feedbackInput/internal/RatingScale.css.d.ts.map +1 -0
  18. package/dist/components/feedback/feedbackInput/internal/RatingScale.css.js +59 -0
  19. package/dist/components/feedback/feedbackInput/internal/RatingScale.d.ts +9 -0
  20. package/dist/components/feedback/feedbackInput/internal/RatingScale.d.ts.map +1 -0
  21. package/dist/components/feedback/feedbackInput/internal/RatingScale.js +57 -0
  22. package/dist/components/feedback/feedbackInput/package.json +7 -0
  23. package/dist/components/feedback/feedbackInput/types.d.ts +7 -0
  24. package/dist/components/feedback/feedbackInput/types.d.ts.map +1 -0
  25. package/dist/components/feedback/index.cjs +3 -0
  26. package/dist/components/feedback/index.d.ts +1 -0
  27. package/dist/components/feedback/index.d.ts.map +1 -1
  28. package/dist/components/feedback/index.js +3 -1
  29. package/dist/components/index.cjs +3 -1
  30. package/dist/components/index.js +3 -2
  31. package/dist/components/inputs/dropdowns/SelectBase.cjs +2 -2
  32. package/dist/components/inputs/dropdowns/SelectBase.js +2 -2
  33. package/dist/components/inputs/index.cjs +1 -1
  34. package/dist/components/inputs/index.js +1 -1
  35. package/dist/components/inputs/textFields/TextArea.cjs +2 -2
  36. package/dist/components/inputs/textFields/TextArea.js +2 -2
  37. package/dist/components/inputs/textFields/TextField.cjs +2 -2
  38. package/dist/components/inputs/textFields/TextField.js +2 -2
  39. package/dist/components/surfaces/accordion/accordion.css.cjs +1 -1
  40. package/dist/components/surfaces/accordion/accordion.css.js +1 -1
  41. package/dist/index.cjs +3 -1
  42. package/dist/index.js +3 -2
  43. package/dist/utilities/forms/internal/components.cjs +1 -1
  44. package/dist/utilities/forms/internal/components.js +1 -1
  45. 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
+ ## [7.5.1](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@7.5.0...@gnist/design-system@7.5.1) (2026-09-04)
7
+
8
+ ### Bug Fixes
9
+
10
+ * adjust spacing for Accordion ([79a6ad3](https://github.com/mollerdigital/design-system-design-system/commit/79a6ad381ee6d12b11bd24999da3f9eac5107266))
11
+
12
+ ## [7.5.0](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@7.4.0...@gnist/design-system@7.5.0) (2026-08-31)
13
+
14
+ ### Features
15
+
16
+ * add feedback component ([1042a91](https://github.com/mollerdigital/design-system-design-system/commit/1042a9189cd0ee489e8f70e141d4aa127f201c7a))
17
+
6
18
  ## [7.4.0](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@7.3.1...@gnist/design-system@7.4.0) (2026-08-24)
7
19
 
8
20
  ### Features
@@ -0,0 +1,72 @@
1
+ "use client";
2
+ const require_runtime = require("../../../_virtual/_rolldown/runtime.cjs");
3
+ const require_index = require("../../../foundation/typography/index.cjs");
4
+ const require_visuallyHidden_css = require("../../../utilities/accessibility/visuallyHidden.css.cjs");
5
+ require("../../../utilities/accessibility/index.cjs");
6
+ const require_PrimaryButton = require("../../actions/buttons/PrimaryButton.cjs");
7
+ const require_TextArea = require("../../inputs/textFields/TextArea.cjs");
8
+ const require_FeedbackInput_css = require("./FeedbackInput.css.cjs");
9
+ const require_RatingScale = require("./internal/RatingScale.cjs");
10
+ let react_jsx_runtime = require("react/jsx-runtime");
11
+ let react = require("react");
12
+ let classnames = require("classnames");
13
+ classnames = require_runtime.__toESM(classnames, 1);
14
+ //#region src/components/feedback/feedbackInput/FeedbackInput.tsx
15
+ /**
16
+ * FeedbackInput renders a controlled score prompt with optional free-text feedback and a submit action.
17
+ *
18
+ * Documentation: [FeedbackInput](https://gnist.moller.no/developers/components/latest/?path=/docs/components-feedback-feedbackinput--docs)
19
+ */
20
+ function FeedbackInput({ questionLabel, selectedScore, onSelectScore, getScoreButtonLabel, feedbackDescriptionLabel, feedbackLabel, feedbackHelperTextLabel, feedbackValue, onFeedbackChange, maxLength, getCharacterCountLabel, getMaxLengthDescription, getMaxLengthExceededMessage, submitLabel, loadingLabel, onSubmit, submitButtonDisabled = false, status, afterSubmitLabel, className }) {
21
+ const textAreaId = (0, react.useId)();
22
+ const hasMaxLength = maxLength !== void 0;
23
+ const isMaxLengthExceeded = hasMaxLength && feedbackValue.length > maxLength;
24
+ return (0, react_jsx_runtime.jsxs)("div", {
25
+ className: (0, classnames.default)(className, require_FeedbackInput_css.feedbackInputRoot),
26
+ children: [(0, react_jsx_runtime.jsx)("div", {
27
+ role: "status",
28
+ "aria-live": "polite",
29
+ "aria-atomic": "true",
30
+ className: (0, classnames.default)(status !== "done" && require_visuallyHidden_css.visuallyHidden),
31
+ children: (0, react_jsx_runtime.jsx)(require_index.BodyText, { children: status === "done" ? afterSubmitLabel : null })
32
+ }), status !== "done" && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(require_RatingScale.RatingScale, {
33
+ label: questionLabel,
34
+ selectedScore,
35
+ onSelectScore,
36
+ getScoreButtonLabel
37
+ }), selectedScore !== null && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(require_index.BodyText, {
38
+ "$as": "p",
39
+ className: (0, classnames.default)(require_FeedbackInput_css.feedbackDescription),
40
+ children: feedbackDescriptionLabel
41
+ }), (0, react_jsx_runtime.jsxs)("div", {
42
+ className: require_FeedbackInput_css.feedbackInputFeedback,
43
+ children: [(0, react_jsx_runtime.jsx)(require_TextArea.TextArea, {
44
+ id: textAreaId,
45
+ label: feedbackLabel,
46
+ value: feedbackValue,
47
+ onChange: (event) => onFeedbackChange(event.target.value),
48
+ helperText: hasMaxLength ? `${feedbackHelperTextLabel} ${getMaxLengthDescription(maxLength)}` : feedbackHelperTextLabel,
49
+ counterText: hasMaxLength ? getCharacterCountLabel(feedbackValue.length, maxLength) : void 0,
50
+ validity: isMaxLengthExceeded ? {
51
+ type: "error",
52
+ message: getMaxLengthExceededMessage(maxLength)
53
+ } : { type: "none" }
54
+ }), (0, react_jsx_runtime.jsx)(require_PrimaryButton.PrimaryButton, {
55
+ className: (0, classnames.default)(require_FeedbackInput_css.submitButton),
56
+ type: "button",
57
+ disabled: submitButtonDisabled || isMaxLengthExceeded,
58
+ onClick: () => onSubmit({
59
+ score: selectedScore,
60
+ feedback: feedbackValue
61
+ }),
62
+ loading: {
63
+ isLoading: status === "pending",
64
+ loadingText: loadingLabel
65
+ },
66
+ children: submitLabel
67
+ })]
68
+ })] })] })]
69
+ });
70
+ }
71
+ //#endregion
72
+ exports.FeedbackInput = FeedbackInput;
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ let _gnist_themes_atoms_css_js = require("@gnist/themes/atoms.css.js");
3
+ let _gnist_themes_layers_css_js = require("@gnist/themes/layers.css.js");
4
+ let _gnist_themes_tokens_css_js = require("@gnist/themes/tokens.css.js");
5
+ //#region src/components/feedback/feedbackInput/FeedbackInput.css.ts
6
+ var feedbackInputRoot = (0, _gnist_themes_layers_css_js.gnistStyle)({
7
+ display: "flex",
8
+ width: "fit-content",
9
+ flexDirection: "column",
10
+ gap: _gnist_themes_tokens_css_js.tokens.spacing.base,
11
+ marginBlock: _gnist_themes_tokens_css_js.tokens.spacing.base,
12
+ marginInline: "auto"
13
+ });
14
+ var feedbackDescription = (0, _gnist_themes_layers_css_js.gnistStyle)([(0, _gnist_themes_atoms_css_js.atoms)({ margin: "none" }), {
15
+ marginTop: _gnist_themes_tokens_css_js.tokens.spacing.xl,
16
+ marginBottom: _gnist_themes_tokens_css_js.tokens.spacing.xxs
17
+ }]);
18
+ var feedbackInputFeedback = (0, _gnist_themes_layers_css_js.gnistStyle)({
19
+ display: "flex",
20
+ flexDirection: "column",
21
+ gap: _gnist_themes_tokens_css_js.tokens.spacing.s
22
+ });
23
+ var submitButton = (0, _gnist_themes_layers_css_js.gnistStyle)({ marginLeft: "auto" });
24
+ //#endregion
25
+ exports.feedbackDescription = feedbackDescription;
26
+ exports.feedbackInputFeedback = feedbackInputFeedback;
27
+ exports.feedbackInputRoot = feedbackInputRoot;
28
+ exports.submitButton = submitButton;
@@ -0,0 +1,5 @@
1
+ export declare const feedbackInputRoot: string;
2
+ export declare const feedbackDescription: string;
3
+ export declare const feedbackInputFeedback: string;
4
+ export declare const submitButton: string;
5
+ //# sourceMappingURL=FeedbackInput.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeedbackInput.css.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/feedbackInput/FeedbackInput.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,QAU5B,CAAC;AAEH,eAAO,MAAM,mBAAmB,QAM9B,CAAC;AAEH,eAAO,MAAM,qBAAqB,QAIhC,CAAC;AAEH,eAAO,MAAM,YAAY,QAEvB,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ import { atoms } from "@gnist/themes/atoms.css.js";
3
+ import { gnistStyle } from "@gnist/themes/layers.css.js";
4
+ import { tokens } from "@gnist/themes/tokens.css.js";
5
+ //#region src/components/feedback/feedbackInput/FeedbackInput.css.ts
6
+ var feedbackInputRoot = gnistStyle({
7
+ display: "flex",
8
+ width: "fit-content",
9
+ flexDirection: "column",
10
+ gap: tokens.spacing.base,
11
+ marginBlock: tokens.spacing.base,
12
+ marginInline: "auto"
13
+ });
14
+ var feedbackDescription = gnistStyle([atoms({ margin: "none" }), {
15
+ marginTop: tokens.spacing.xl,
16
+ marginBottom: tokens.spacing.xxs
17
+ }]);
18
+ var feedbackInputFeedback = gnistStyle({
19
+ display: "flex",
20
+ flexDirection: "column",
21
+ gap: tokens.spacing.s
22
+ });
23
+ var submitButton = gnistStyle({ marginLeft: "auto" });
24
+ //#endregion
25
+ export { feedbackDescription, feedbackInputFeedback, feedbackInputRoot, submitButton };
@@ -0,0 +1,39 @@
1
+ import type { FeedbackInputStatus, FeedbackScore, FeedbackSubmission } from "./types.js";
2
+ interface FeedbackInputBaseProps {
3
+ questionLabel: string;
4
+ selectedScore: FeedbackScore | null;
5
+ onSelectScore: (score: FeedbackScore) => void;
6
+ getScoreButtonLabel: (score: FeedbackScore) => string;
7
+ feedbackDescriptionLabel: string;
8
+ feedbackLabel: string;
9
+ feedbackHelperTextLabel: string;
10
+ feedbackValue: string;
11
+ onFeedbackChange: (feedback: string) => void;
12
+ submitLabel: string;
13
+ loadingLabel: string;
14
+ onSubmit: (submission: FeedbackSubmission) => void;
15
+ submitButtonDisabled?: boolean;
16
+ status: FeedbackInputStatus;
17
+ afterSubmitLabel: string;
18
+ className?: string;
19
+ }
20
+ type FeedbackLengthProps = {
21
+ maxLength: number;
22
+ getCharacterCountLabel: (characterCount: number, maxLength: number) => string;
23
+ getMaxLengthDescription: (maxLength: number) => string;
24
+ getMaxLengthExceededMessage: (maxLength: number) => string;
25
+ } | {
26
+ maxLength?: undefined;
27
+ getCharacterCountLabel?: never;
28
+ getMaxLengthDescription?: never;
29
+ getMaxLengthExceededMessage?: never;
30
+ };
31
+ export type FeedbackInputProps = FeedbackInputBaseProps & FeedbackLengthProps;
32
+ /**
33
+ * FeedbackInput renders a controlled score prompt with optional free-text feedback and a submit action.
34
+ *
35
+ * Documentation: [FeedbackInput](https://gnist.moller.no/developers/components/latest/?path=/docs/components-feedback-feedbackinput--docs)
36
+ */
37
+ export declare function FeedbackInput({ questionLabel, selectedScore, onSelectScore, getScoreButtonLabel, feedbackDescriptionLabel, feedbackLabel, feedbackHelperTextLabel, feedbackValue, onFeedbackChange, maxLength, getCharacterCountLabel, getMaxLengthDescription, getMaxLengthExceededMessage, submitLabel, loadingLabel, onSubmit, submitButtonDisabled, status, afterSubmitLabel, className, }: FeedbackInputProps): import("react/jsx-runtime").JSX.Element;
38
+ export {};
39
+ //# sourceMappingURL=FeedbackInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeedbackInput.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/feedbackInput/FeedbackInput.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACR,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EACrB,MAAM,YAAY,CAAC;AAEpB,UAAU,sBAAsB;IAE5B,aAAa,EAAE,MAAM,CAAC;IAEtB,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,aAAa,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C,mBAAmB,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,MAAM,CAAC;IAEtD,wBAAwB,EAAE,MAAM,CAAC;IAEjC,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB,EAAE,MAAM,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAE7C,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACnD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,KAAK,mBAAmB,GAClB;IACI,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,EAAE,CACpB,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM,KAChB,MAAM,CAAC;IACZ,uBAAuB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IACvD,2BAA2B,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;CAC9D,GACD;IACI,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,sBAAsB,CAAC,EAAE,KAAK,CAAC;IAC/B,uBAAuB,CAAC,EAAE,KAAK,CAAC;IAChC,2BAA2B,CAAC,EAAE,KAAK,CAAC;CACvC,CAAC;AAER,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GAAG,mBAAmB,CAAC;AAE9E;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC1B,aAAa,EACb,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,wBAAwB,EACxB,aAAa,EACb,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,sBAAsB,EACtB,uBAAuB,EACvB,2BAA2B,EAC3B,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,oBAA4B,EAC5B,MAAM,EACN,gBAAgB,EAChB,SAAS,GACZ,EAAE,kBAAkB,2CAkGpB"}
@@ -0,0 +1,70 @@
1
+ "use client";
2
+ import { BodyText } from "../../../foundation/typography/index.js";
3
+ import { visuallyHidden } from "../../../utilities/accessibility/visuallyHidden.css.js";
4
+ import "../../../utilities/accessibility/index.js";
5
+ import { PrimaryButton } from "../../actions/buttons/PrimaryButton.js";
6
+ import { TextArea } from "../../inputs/textFields/TextArea.js";
7
+ import { feedbackDescription, feedbackInputFeedback, feedbackInputRoot, submitButton } from "./FeedbackInput.css.js";
8
+ import { RatingScale } from "./internal/RatingScale.js";
9
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
+ import { useId } from "react";
11
+ import classNames from "classnames";
12
+ //#region src/components/feedback/feedbackInput/FeedbackInput.tsx
13
+ /**
14
+ * FeedbackInput renders a controlled score prompt with optional free-text feedback and a submit action.
15
+ *
16
+ * Documentation: [FeedbackInput](https://gnist.moller.no/developers/components/latest/?path=/docs/components-feedback-feedbackinput--docs)
17
+ */
18
+ function FeedbackInput({ questionLabel, selectedScore, onSelectScore, getScoreButtonLabel, feedbackDescriptionLabel, feedbackLabel, feedbackHelperTextLabel, feedbackValue, onFeedbackChange, maxLength, getCharacterCountLabel, getMaxLengthDescription, getMaxLengthExceededMessage, submitLabel, loadingLabel, onSubmit, submitButtonDisabled = false, status, afterSubmitLabel, className }) {
19
+ const textAreaId = useId();
20
+ const hasMaxLength = maxLength !== void 0;
21
+ const isMaxLengthExceeded = hasMaxLength && feedbackValue.length > maxLength;
22
+ return jsxs("div", {
23
+ className: classNames(className, feedbackInputRoot),
24
+ children: [jsx("div", {
25
+ role: "status",
26
+ "aria-live": "polite",
27
+ "aria-atomic": "true",
28
+ className: classNames(status !== "done" && visuallyHidden),
29
+ children: jsx(BodyText, { children: status === "done" ? afterSubmitLabel : null })
30
+ }), status !== "done" && jsxs(Fragment, { children: [jsx(RatingScale, {
31
+ label: questionLabel,
32
+ selectedScore,
33
+ onSelectScore,
34
+ getScoreButtonLabel
35
+ }), selectedScore !== null && jsxs(Fragment, { children: [jsx(BodyText, {
36
+ "$as": "p",
37
+ className: classNames(feedbackDescription),
38
+ children: feedbackDescriptionLabel
39
+ }), jsxs("div", {
40
+ className: feedbackInputFeedback,
41
+ children: [jsx(TextArea, {
42
+ id: textAreaId,
43
+ label: feedbackLabel,
44
+ value: feedbackValue,
45
+ onChange: (event) => onFeedbackChange(event.target.value),
46
+ helperText: hasMaxLength ? `${feedbackHelperTextLabel} ${getMaxLengthDescription(maxLength)}` : feedbackHelperTextLabel,
47
+ counterText: hasMaxLength ? getCharacterCountLabel(feedbackValue.length, maxLength) : void 0,
48
+ validity: isMaxLengthExceeded ? {
49
+ type: "error",
50
+ message: getMaxLengthExceededMessage(maxLength)
51
+ } : { type: "none" }
52
+ }), jsx(PrimaryButton, {
53
+ className: classNames(submitButton),
54
+ type: "button",
55
+ disabled: submitButtonDisabled || isMaxLengthExceeded,
56
+ onClick: () => onSubmit({
57
+ score: selectedScore,
58
+ feedback: feedbackValue
59
+ }),
60
+ loading: {
61
+ isLoading: status === "pending",
62
+ loadingText: loadingLabel
63
+ },
64
+ children: submitLabel
65
+ })]
66
+ })] })] })]
67
+ });
68
+ }
69
+ //#endregion
70
+ export { FeedbackInput };
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const require_FeedbackInput = require("./FeedbackInput.cjs");
4
+ exports.FeedbackInput = require_FeedbackInput.FeedbackInput;
@@ -0,0 +1,4 @@
1
+ export { FeedbackInput } from "./FeedbackInput.js";
2
+ export type { FeedbackInputProps } from "./FeedbackInput.js";
3
+ export type { FeedbackInputStatus, FeedbackScore, FeedbackSubmission, } from "./types.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/feedbackInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,YAAY,EACR,mBAAmB,EACnB,aAAa,EACb,kBAAkB,GACrB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import { FeedbackInput } from "./FeedbackInput.js";
3
+ export { FeedbackInput };
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ const require_runtime = require("../../../../_virtual/_rolldown/runtime.cjs");
3
+ const require_Icon = require("../../../../foundation/iconography/Icon.cjs");
4
+ require("../../../../foundation/iconography/index.cjs");
5
+ const require_index$1 = require("../../../../foundation/typography/index.cjs");
6
+ const require_RatingScale_css = require("./RatingScale.css.cjs");
7
+ let react_jsx_runtime = require("react/jsx-runtime");
8
+ let classnames = require("classnames");
9
+ classnames = require_runtime.__toESM(classnames, 1);
10
+ //#region src/components/feedback/feedbackInput/internal/RatingScale.tsx
11
+ var ratingScaleIcons = {
12
+ 1: "sentiment_very_dissatisfied",
13
+ 2: "sentiment_dissatisfied",
14
+ 3: "sentiment_neutral",
15
+ 4: "sentiment_satisfied",
16
+ 5: "sentiment_very_satisfied"
17
+ };
18
+ function RatingScale({ label, selectedScore, onSelectScore, getScoreButtonLabel }) {
19
+ return (0, react_jsx_runtime.jsxs)("fieldset", {
20
+ className: require_RatingScale_css.ratingScaleFieldset,
21
+ children: [(0, react_jsx_runtime.jsx)(require_index$1.BodyText, {
22
+ "$as": "legend",
23
+ className: require_RatingScale_css.ratingScaleLegend,
24
+ children: label
25
+ }), (0, react_jsx_runtime.jsx)("div", {
26
+ className: require_RatingScale_css.ratingScaleContainer,
27
+ children: [
28
+ 1,
29
+ 2,
30
+ 3,
31
+ 4,
32
+ 5
33
+ ].map((score) => {
34
+ const isSelected = selectedScore === score;
35
+ const isLocked = selectedScore !== null;
36
+ const isDisabled = isLocked && !isSelected;
37
+ return (0, react_jsx_runtime.jsx)("button", {
38
+ type: "button",
39
+ "aria-label": getScoreButtonLabel(score),
40
+ "aria-pressed": isSelected,
41
+ "aria-disabled": isLocked,
42
+ disabled: isDisabled,
43
+ className: (0, classnames.default)(require_RatingScale_css.ratingScaleButtonBase, isSelected && require_RatingScale_css.ratingScaleButtonSelected, isLocked && require_RatingScale_css.ratingScaleButtonDisabled),
44
+ onClick: () => {
45
+ if (!isLocked) onSelectScore(score);
46
+ },
47
+ children: (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
48
+ icon: ratingScaleIcons[score],
49
+ size: "l",
50
+ variantOverride: isSelected ? "filled" : "round",
51
+ "aria-hidden": true
52
+ })
53
+ }, score);
54
+ })
55
+ })]
56
+ });
57
+ }
58
+ //#endregion
59
+ exports.RatingScale = RatingScale;
@@ -0,0 +1,64 @@
1
+ "use client";
2
+ const require_states_css = require("../../../../styles/states.css.cjs");
3
+ let _gnist_themes_atoms_css_js = require("@gnist/themes/atoms.css.js");
4
+ let _gnist_themes_layers_css_js = require("@gnist/themes/layers.css.js");
5
+ let _gnist_themes_tokens_css_js = require("@gnist/themes/tokens.css.js");
6
+ //#region src/components/feedback/feedbackInput/internal/RatingScale.css.ts
7
+ var ratingScaleFieldset = (0, _gnist_themes_layers_css_js.gnistStyle)({
8
+ border: "none",
9
+ margin: 0,
10
+ padding: 0
11
+ });
12
+ var ratingScaleLegend = (0, _gnist_themes_layers_css_js.gnistStyle)({
13
+ width: "100%",
14
+ marginBottom: _gnist_themes_tokens_css_js.tokens.spacing.base,
15
+ textAlign: "center"
16
+ });
17
+ var ratingScaleContainer = (0, _gnist_themes_layers_css_js.gnistStyle)({
18
+ display: "flex",
19
+ justifyContent: "center",
20
+ gap: _gnist_themes_tokens_css_js.tokens.spacing.m
21
+ });
22
+ var ratingScaleButtonBase = (0, _gnist_themes_layers_css_js.gnistStyle)([
23
+ require_states_css.focusStyle,
24
+ (0, _gnist_themes_atoms_css_js.atoms)({
25
+ display: "inline-flex",
26
+ alignItems: "center",
27
+ justifyContent: "center",
28
+ padding: "none",
29
+ borderRadius: "full"
30
+ }),
31
+ {
32
+ appearance: "none",
33
+ border: "none",
34
+ boxSizing: "border-box",
35
+ width: "44px",
36
+ height: "44px",
37
+ margin: "0",
38
+ backgroundColor: "transparent",
39
+ color: _gnist_themes_tokens_css_js.tokens.color["on-background"],
40
+ transition: "transform 120ms ease, background-color 120ms ease, color 120ms ease, opacity 120ms ease",
41
+ cursor: "pointer",
42
+ selectors: {
43
+ "&:hover:not(:disabled):not([aria-disabled='true'])": {
44
+ transform: "scale(1.1)",
45
+ backgroundColor: _gnist_themes_tokens_css_js.tokens.color.surface,
46
+ color: _gnist_themes_tokens_css_js.tokens.color["on-surface"]
47
+ },
48
+ "&:active:not(:disabled):not([aria-disabled='true'])": { transform: "scale(1.05)" }
49
+ }
50
+ }
51
+ ]);
52
+ var ratingScaleButtonSelected = (0, _gnist_themes_layers_css_js.gnistStyle)({ color: _gnist_themes_tokens_css_js.tokens.color["on-surface"] });
53
+ var ratingScaleButtonDisabled = (0, _gnist_themes_layers_css_js.gnistStyle)({
54
+ cursor: "not-allowed",
55
+ opacity: .2,
56
+ selectors: { "&[aria-pressed='true']": { opacity: .7 } }
57
+ });
58
+ //#endregion
59
+ exports.ratingScaleButtonBase = ratingScaleButtonBase;
60
+ exports.ratingScaleButtonDisabled = ratingScaleButtonDisabled;
61
+ exports.ratingScaleButtonSelected = ratingScaleButtonSelected;
62
+ exports.ratingScaleContainer = ratingScaleContainer;
63
+ exports.ratingScaleFieldset = ratingScaleFieldset;
64
+ exports.ratingScaleLegend = ratingScaleLegend;
@@ -0,0 +1,7 @@
1
+ export declare const ratingScaleFieldset: string;
2
+ export declare const ratingScaleLegend: string;
3
+ export declare const ratingScaleContainer: string;
4
+ export declare const ratingScaleButtonBase: string;
5
+ export declare const ratingScaleButtonSelected: string;
6
+ export declare const ratingScaleButtonDisabled: string;
7
+ //# sourceMappingURL=RatingScale.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RatingScale.css.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/feedbackInput/internal/RatingScale.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB,QAI9B,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAI5B,CAAC;AAEH,eAAO,MAAM,oBAAoB,QAI/B,CAAC;AAEH,eAAO,MAAM,qBAAqB,QAgChC,CAAC;AAEH,eAAO,MAAM,yBAAyB,QAEpC,CAAC;AAEH,eAAO,MAAM,yBAAyB,QAQpC,CAAC"}
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ import { focusStyle } from "../../../../styles/states.css.js";
3
+ import { atoms } from "@gnist/themes/atoms.css.js";
4
+ import { gnistStyle } from "@gnist/themes/layers.css.js";
5
+ import { tokens } from "@gnist/themes/tokens.css.js";
6
+ //#region src/components/feedback/feedbackInput/internal/RatingScale.css.ts
7
+ var ratingScaleFieldset = gnistStyle({
8
+ border: "none",
9
+ margin: 0,
10
+ padding: 0
11
+ });
12
+ var ratingScaleLegend = gnistStyle({
13
+ width: "100%",
14
+ marginBottom: tokens.spacing.base,
15
+ textAlign: "center"
16
+ });
17
+ var ratingScaleContainer = gnistStyle({
18
+ display: "flex",
19
+ justifyContent: "center",
20
+ gap: tokens.spacing.m
21
+ });
22
+ var ratingScaleButtonBase = gnistStyle([
23
+ focusStyle,
24
+ atoms({
25
+ display: "inline-flex",
26
+ alignItems: "center",
27
+ justifyContent: "center",
28
+ padding: "none",
29
+ borderRadius: "full"
30
+ }),
31
+ {
32
+ appearance: "none",
33
+ border: "none",
34
+ boxSizing: "border-box",
35
+ width: "44px",
36
+ height: "44px",
37
+ margin: "0",
38
+ backgroundColor: "transparent",
39
+ color: tokens.color["on-background"],
40
+ transition: "transform 120ms ease, background-color 120ms ease, color 120ms ease, opacity 120ms ease",
41
+ cursor: "pointer",
42
+ selectors: {
43
+ "&:hover:not(:disabled):not([aria-disabled='true'])": {
44
+ transform: "scale(1.1)",
45
+ backgroundColor: tokens.color.surface,
46
+ color: tokens.color["on-surface"]
47
+ },
48
+ "&:active:not(:disabled):not([aria-disabled='true'])": { transform: "scale(1.05)" }
49
+ }
50
+ }
51
+ ]);
52
+ var ratingScaleButtonSelected = gnistStyle({ color: tokens.color["on-surface"] });
53
+ var ratingScaleButtonDisabled = gnistStyle({
54
+ cursor: "not-allowed",
55
+ opacity: .2,
56
+ selectors: { "&[aria-pressed='true']": { opacity: .7 } }
57
+ });
58
+ //#endregion
59
+ export { ratingScaleButtonBase, ratingScaleButtonDisabled, ratingScaleButtonSelected, ratingScaleContainer, ratingScaleFieldset, ratingScaleLegend };
@@ -0,0 +1,9 @@
1
+ import type { FeedbackScore } from "../types.js";
2
+ export interface RatingScaleProps {
3
+ label: string;
4
+ selectedScore: FeedbackScore | null;
5
+ onSelectScore: (score: FeedbackScore) => void;
6
+ getScoreButtonLabel: (score: FeedbackScore) => string;
7
+ }
8
+ export declare function RatingScale({ label, selectedScore, onSelectScore, getScoreButtonLabel, }: RatingScaleProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=RatingScale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RatingScale.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/feedbackInput/internal/RatingScale.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAyBjD,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,aAAa,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C,mBAAmB,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,MAAM,CAAC;CACzD;AAED,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,aAAa,EACb,aAAa,EACb,mBAAmB,GACtB,EAAE,gBAAgB,2CA8ClB"}
@@ -0,0 +1,57 @@
1
+ "use client";
2
+ import { Icon } from "../../../../foundation/iconography/Icon.js";
3
+ import "../../../../foundation/iconography/index.js";
4
+ import { BodyText } from "../../../../foundation/typography/index.js";
5
+ import { ratingScaleButtonBase, ratingScaleButtonDisabled, ratingScaleButtonSelected, ratingScaleContainer, ratingScaleFieldset, ratingScaleLegend } from "./RatingScale.css.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import classNames from "classnames";
8
+ //#region src/components/feedback/feedbackInput/internal/RatingScale.tsx
9
+ var ratingScaleIcons = {
10
+ 1: "sentiment_very_dissatisfied",
11
+ 2: "sentiment_dissatisfied",
12
+ 3: "sentiment_neutral",
13
+ 4: "sentiment_satisfied",
14
+ 5: "sentiment_very_satisfied"
15
+ };
16
+ function RatingScale({ label, selectedScore, onSelectScore, getScoreButtonLabel }) {
17
+ return jsxs("fieldset", {
18
+ className: ratingScaleFieldset,
19
+ children: [jsx(BodyText, {
20
+ "$as": "legend",
21
+ className: ratingScaleLegend,
22
+ children: label
23
+ }), jsx("div", {
24
+ className: ratingScaleContainer,
25
+ children: [
26
+ 1,
27
+ 2,
28
+ 3,
29
+ 4,
30
+ 5
31
+ ].map((score) => {
32
+ const isSelected = selectedScore === score;
33
+ const isLocked = selectedScore !== null;
34
+ const isDisabled = isLocked && !isSelected;
35
+ return jsx("button", {
36
+ type: "button",
37
+ "aria-label": getScoreButtonLabel(score),
38
+ "aria-pressed": isSelected,
39
+ "aria-disabled": isLocked,
40
+ disabled: isDisabled,
41
+ className: classNames(ratingScaleButtonBase, isSelected && ratingScaleButtonSelected, isLocked && ratingScaleButtonDisabled),
42
+ onClick: () => {
43
+ if (!isLocked) onSelectScore(score);
44
+ },
45
+ children: jsx(Icon, {
46
+ icon: ratingScaleIcons[score],
47
+ size: "l",
48
+ variantOverride: isSelected ? "filled" : "round",
49
+ "aria-hidden": true
50
+ })
51
+ }, score);
52
+ })
53
+ })]
54
+ });
55
+ }
56
+ //#endregion
57
+ export { RatingScale };
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "module",
3
+ "internal": true,
4
+ "main": "./index.cjs",
5
+ "module": "./index.js",
6
+ "types": "./index.d.ts"
7
+ }
@@ -0,0 +1,7 @@
1
+ export type FeedbackInputStatus = "not-asked" | "pending" | "done";
2
+ export type FeedbackScore = 1 | 2 | 3 | 4 | 5;
3
+ export interface FeedbackSubmission {
4
+ score: FeedbackScore;
5
+ feedback: string;
6
+ }
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/feedbackInput/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;AACnE,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE9C,MAAM,WAAW,kBAAkB;IAC/B,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CACpB"}
@@ -5,11 +5,14 @@ require("./alerts/index.cjs");
5
5
  const require_LoadingSpinner = require("./loaders/LoadingSpinner.cjs");
6
6
  const require_LoadingBar = require("./loaders/LoadingBar.cjs");
7
7
  require("./loaders/index.cjs");
8
+ const require_FeedbackInput = require("./feedbackInput/FeedbackInput.cjs");
9
+ require("./feedbackInput/index.cjs");
8
10
  const require_Lozenge = require("./notifications/Lozenge.cjs");
9
11
  require("./notifications/index.cjs");
10
12
  const require_ProgressBar = require("./progress/ProgressBar.cjs");
11
13
  require("./progress/index.cjs");
12
14
  exports.AlertBanner = require_AlertBanner.AlertBanner;
15
+ exports.FeedbackInput = require_FeedbackInput.FeedbackInput;
13
16
  exports.LoadingBar = require_LoadingBar.LoadingBar;
14
17
  exports.LoadingBarComponent = require_LoadingBar.LoadingBarComponent;
15
18
  exports.LoadingSpinner = require_LoadingSpinner.LoadingSpinner;
@@ -1,5 +1,6 @@
1
1
  export * from "./alerts/index.js";
2
2
  export * from "./loaders/index.js";
3
+ export * from "./feedbackInput/index.js";
3
4
  export * from "./notifications/index.js";
4
5
  export * from "./progress/index.js";
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/feedback/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/feedback/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC"}
@@ -4,8 +4,10 @@ import "./alerts/index.js";
4
4
  import { LoadingSpinner } from "./loaders/LoadingSpinner.js";
5
5
  import { LoadingBar, LoadingBarComponent } from "./loaders/LoadingBar.js";
6
6
  import "./loaders/index.js";
7
+ import { FeedbackInput } from "./feedbackInput/FeedbackInput.js";
8
+ import "./feedbackInput/index.js";
7
9
  import { Lozenge } from "./notifications/Lozenge.js";
8
10
  import "./notifications/index.js";
9
11
  import { ProgressBar, ProgressBarComponent } from "./progress/ProgressBar.js";
10
12
  import "./progress/index.js";
11
- export { AlertBanner, LoadingBar, LoadingBarComponent, LoadingSpinner, Lozenge, ProgressBar, ProgressBarComponent };
13
+ export { AlertBanner, FeedbackInput, LoadingBar, LoadingBarComponent, LoadingSpinner, Lozenge, ProgressBar, ProgressBarComponent };
@@ -21,13 +21,14 @@ require("./actions/index.cjs");
21
21
  const require_AlertBanner = require("./feedback/alerts/AlertBanner.cjs");
22
22
  const require_LoadingSpinner = require("./feedback/loaders/LoadingSpinner.cjs");
23
23
  const require_LoadingBar = require("./feedback/loaders/LoadingBar.cjs");
24
+ const require_TextArea = require("./inputs/textFields/TextArea.cjs");
25
+ const require_FeedbackInput = require("./feedback/feedbackInput/FeedbackInput.cjs");
24
26
  const require_Lozenge = require("./feedback/notifications/Lozenge.cjs");
25
27
  const require_ProgressBar = require("./feedback/progress/ProgressBar.cjs");
26
28
  require("./feedback/index.cjs");
27
29
  const require_MultiSelect = require("./inputs/dropdowns/MultiSelect.cjs");
28
30
  const require_SingleSelect = require("./inputs/dropdowns/SingleSelect.cjs");
29
31
  const require_calendar = require("./inputs/pickers/calendar.cjs");
30
- const require_TextArea = require("./inputs/textFields/TextArea.cjs");
31
32
  const require_TextField = require("./inputs/textFields/TextField.cjs");
32
33
  require("./inputs/index.cjs");
33
34
  const require_ActionCard = require("./surfaces/cards/ActionCard.cjs");
@@ -46,6 +47,7 @@ exports.Calendar = require_calendar.Calendar;
46
47
  exports.Checkbox = require_Checkbox.Checkbox;
47
48
  exports.CheckboxCard = require_CheckboxCard.CheckboxCard;
48
49
  exports.DangerButton = require_DangerButton.DangerButton;
50
+ exports.FeedbackInput = require_FeedbackInput.FeedbackInput;
49
51
  exports.FilterChip = require_FilterChip.FilterChip;
50
52
  exports.GhostButton = require_GhostButton.GhostButton;
51
53
  exports.IconButton = require_IconButton.IconButton;
@@ -20,13 +20,14 @@ import "./actions/index.js";
20
20
  import { AlertBanner } from "./feedback/alerts/AlertBanner.js";
21
21
  import { LoadingSpinner } from "./feedback/loaders/LoadingSpinner.js";
22
22
  import { LoadingBar, LoadingBarComponent } from "./feedback/loaders/LoadingBar.js";
23
+ import { TextArea, characterCount, wordCount } from "./inputs/textFields/TextArea.js";
24
+ import { FeedbackInput } from "./feedback/feedbackInput/FeedbackInput.js";
23
25
  import { Lozenge } from "./feedback/notifications/Lozenge.js";
24
26
  import { ProgressBar, ProgressBarComponent } from "./feedback/progress/ProgressBar.js";
25
27
  import "./feedback/index.js";
26
28
  import { MultiSelect } from "./inputs/dropdowns/MultiSelect.js";
27
29
  import { SingleSelect } from "./inputs/dropdowns/SingleSelect.js";
28
30
  import { Calendar } from "./inputs/pickers/calendar.js";
29
- import { TextArea, characterCount, wordCount } from "./inputs/textFields/TextArea.js";
30
31
  import { TextField } from "./inputs/textFields/TextField.js";
31
32
  import "./inputs/index.js";
32
33
  import { ActionCard } from "./surfaces/cards/ActionCard.js";
@@ -37,4 +38,4 @@ import { RadioCard } from "./surfaces/cards/RadioCard.js";
37
38
  import { Modal } from "./surfaces/modal/Modal.js";
38
39
  import { Accordion } from "./surfaces/accordion/Accordion.js";
39
40
  import "./surfaces/index.js";
40
- export { Accordion, ActionCard, ActionChip, AlertBanner, Calendar, Checkbox, CheckboxCard, DangerButton, FilterChip, GhostButton, IconButton, InfoCard, LinkCard, LoadingBar, LoadingBarComponent, LoadingSpinner, Lozenge, Modal, MultiSelect, PrimaryButton, ProgressBar, ProgressBarComponent, RadioButton, RadioCard, RadioGroup, SecondaryButton, SingleSelect, Spinner, StatusIndicator, SuccessButton, Switch, TagChip, TextArea, TextButton, TextField, characterCount, wordCount };
41
+ export { Accordion, ActionCard, ActionChip, AlertBanner, Calendar, Checkbox, CheckboxCard, DangerButton, FeedbackInput, FilterChip, GhostButton, IconButton, InfoCard, LinkCard, LoadingBar, LoadingBarComponent, LoadingSpinner, Lozenge, Modal, MultiSelect, PrimaryButton, ProgressBar, ProgressBarComponent, RadioButton, RadioCard, RadioGroup, SecondaryButton, SingleSelect, Spinner, StatusIndicator, SuccessButton, Switch, TagChip, TextArea, TextButton, TextField, characterCount, wordCount };
@@ -8,9 +8,9 @@ require("../../../building-blocks/index.cjs");
8
8
  require("../../actions/index.cjs");
9
9
  const require_inputFieldConstants_css = require("../shared-styles/inputFieldConstants.css.cjs");
10
10
  const require_inputField_css = require("../shared-styles/inputField.css.cjs");
11
- const require_select_css = require("./select.css.cjs");
12
- const require_shared = require("../shared.cjs");
13
11
  const require_labelStyles_css = require("../shared-styles/labelStyles.css.cjs");
12
+ const require_shared = require("../shared.cjs");
13
+ const require_select_css = require("./select.css.cjs");
14
14
  let react_jsx_runtime = require("react/jsx-runtime");
15
15
  let _gnist_themes_atoms_css_js = require("@gnist/themes/atoms.css.js");
16
16
  let react = require("react");
@@ -7,9 +7,9 @@ import "../../../building-blocks/index.js";
7
7
  import "../../actions/index.js";
8
8
  import { postInputWidth, preInputWidth } from "../shared-styles/inputFieldConstants.css.js";
9
9
  import { inputContentWrapper, inputFieldWrapperRecipe, wrapperStyle } from "../shared-styles/inputField.css.js";
10
- import { listBoxStyle, optionBackground, optionStyle, popUpStyle, selectStyle, singleOptionStyle } from "./select.css.js";
11
- import { useSelectInputLogic } from "../shared.js";
12
10
  import { labelStyle } from "../shared-styles/labelStyles.css.js";
11
+ import { useSelectInputLogic } from "../shared.js";
12
+ import { listBoxStyle, optionBackground, optionStyle, popUpStyle, selectStyle, singleOptionStyle } from "./select.css.js";
13
13
  import { jsx, jsxs } from "react/jsx-runtime";
14
14
  import { atoms } from "@gnist/themes/atoms.css.js";
15
15
  import * as React from "react";
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const require_TextArea = require("./textFields/TextArea.cjs");
3
4
  const require_MultiSelect = require("./dropdowns/MultiSelect.cjs");
4
5
  const require_SingleSelect = require("./dropdowns/SingleSelect.cjs");
5
6
  require("./dropdowns/index.cjs");
6
7
  const require_calendar = require("./pickers/calendar.cjs");
7
8
  require("./pickers/index.cjs");
8
- const require_TextArea = require("./textFields/TextArea.cjs");
9
9
  const require_TextField = require("./textFields/TextField.cjs");
10
10
  require("./textFields/index.cjs");
11
11
  exports.Calendar = require_calendar.Calendar;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
+ import { TextArea, characterCount, wordCount } from "./textFields/TextArea.js";
2
3
  import { MultiSelect } from "./dropdowns/MultiSelect.js";
3
4
  import { SingleSelect } from "./dropdowns/SingleSelect.js";
4
5
  import "./dropdowns/index.js";
5
6
  import { Calendar } from "./pickers/calendar.js";
6
7
  import "./pickers/index.js";
7
- import { TextArea, characterCount, wordCount } from "./textFields/TextArea.js";
8
8
  import { TextField } from "./textFields/TextField.js";
9
9
  import "./textFields/index.js";
10
10
  export { Calendar, MultiSelect, SingleSelect, TextArea, TextField, characterCount, wordCount };
@@ -4,12 +4,12 @@ const require_Icon = require("../../../foundation/iconography/Icon.cjs");
4
4
  require("../../../foundation/index.cjs");
5
5
  const require_InputHelperText = require("../../../building-blocks/inputs/InputHelperText.cjs");
6
6
  require("../../../building-blocks/index.cjs");
7
+ const require_iconButtonOverlay_css = require("../shared-styles/iconButtonOverlay.css.cjs");
7
8
  const require_inputFieldConstants_css = require("../shared-styles/inputFieldConstants.css.cjs");
8
9
  const require_inputField_css = require("../shared-styles/inputField.css.cjs");
9
- const require_shared = require("../shared.cjs");
10
10
  const require_labelStyles_css = require("../shared-styles/labelStyles.css.cjs");
11
- const require_iconButtonOverlay_css = require("../shared-styles/iconButtonOverlay.css.cjs");
12
11
  const require_suffixPrefix_css = require("../shared-styles/suffixPrefix.css.cjs");
12
+ const require_shared = require("../shared.cjs");
13
13
  const require_textArea_css = require("./textArea.css.cjs");
14
14
  let react_jsx_runtime = require("react/jsx-runtime");
15
15
  let _gnist_themes_atoms_css_js = require("@gnist/themes/atoms.css.js");
@@ -3,12 +3,12 @@ import { Icon } from "../../../foundation/iconography/Icon.js";
3
3
  import "../../../foundation/index.js";
4
4
  import { InputHelperText } from "../../../building-blocks/inputs/InputHelperText.js";
5
5
  import "../../../building-blocks/index.js";
6
+ import { iconButtonOverlayRecipe } from "../shared-styles/iconButtonOverlay.css.js";
6
7
  import { postInputWidth, preInputWidth, visibleLines } from "../shared-styles/inputFieldConstants.css.js";
7
8
  import { inputContentWrapper, inputFieldStyle, inputFieldWrapperRecipe, wrapperStyle } from "../shared-styles/inputField.css.js";
8
- import { getInputFieldProps, isClickableIcon, useInputFieldLogic } from "../shared.js";
9
9
  import { labelStyle } from "../shared-styles/labelStyles.css.js";
10
- import { iconButtonOverlayRecipe } from "../shared-styles/iconButtonOverlay.css.js";
11
10
  import { prefixStyle, suffixStyle } from "../shared-styles/suffixPrefix.css.js";
11
+ import { getInputFieldProps, isClickableIcon, useInputFieldLogic } from "../shared.js";
12
12
  import { wordCounterStyle } from "./textArea.css.js";
13
13
  import { jsx, jsxs } from "react/jsx-runtime";
14
14
  import { atoms } from "@gnist/themes/atoms.css.js";
@@ -4,12 +4,12 @@ const require_Icon = require("../../../foundation/iconography/Icon.cjs");
4
4
  require("../../../foundation/iconography/index.cjs");
5
5
  const require_InputHelperText = require("../../../building-blocks/inputs/InputHelperText.cjs");
6
6
  require("../../../building-blocks/index.cjs");
7
+ const require_iconButtonOverlay_css = require("../shared-styles/iconButtonOverlay.css.cjs");
7
8
  const require_inputFieldConstants_css = require("../shared-styles/inputFieldConstants.css.cjs");
8
9
  const require_inputField_css = require("../shared-styles/inputField.css.cjs");
9
- const require_shared = require("../shared.cjs");
10
10
  const require_labelStyles_css = require("../shared-styles/labelStyles.css.cjs");
11
- const require_iconButtonOverlay_css = require("../shared-styles/iconButtonOverlay.css.cjs");
12
11
  const require_suffixPrefix_css = require("../shared-styles/suffixPrefix.css.cjs");
12
+ const require_shared = require("../shared.cjs");
13
13
  let react_jsx_runtime = require("react/jsx-runtime");
14
14
  let _gnist_themes_atoms_css_js = require("@gnist/themes/atoms.css.js");
15
15
  let _vanilla_extract_dynamic = require("@vanilla-extract/dynamic");
@@ -3,12 +3,12 @@ import { Icon } from "../../../foundation/iconography/Icon.js";
3
3
  import "../../../foundation/iconography/index.js";
4
4
  import { InputHelperText } from "../../../building-blocks/inputs/InputHelperText.js";
5
5
  import "../../../building-blocks/index.js";
6
+ import { iconButtonOverlayRecipe } from "../shared-styles/iconButtonOverlay.css.js";
6
7
  import { postInputWidth, preInputWidth } from "../shared-styles/inputFieldConstants.css.js";
7
8
  import { inputContentWrapper, inputFieldStyle, inputFieldWrapperRecipe, wrapperStyle } from "../shared-styles/inputField.css.js";
8
- import { getInputFieldProps, isClickableIcon, useInputFieldLogic } from "../shared.js";
9
9
  import { labelStyle } from "../shared-styles/labelStyles.css.js";
10
- import { iconButtonOverlayRecipe } from "../shared-styles/iconButtonOverlay.css.js";
11
10
  import { prefixStyle, suffixStyle } from "../shared-styles/suffixPrefix.css.js";
11
+ import { getInputFieldProps, isClickableIcon, useInputFieldLogic } from "../shared.js";
12
12
  import { jsx, jsxs } from "react/jsx-runtime";
13
13
  import { atoms } from "@gnist/themes/atoms.css.js";
14
14
  import { assignInlineVars } from "@vanilla-extract/dynamic";
@@ -18,9 +18,9 @@ var head = (0, _gnist_themes_layers_css_js.gnistStyle)([(0, _gnist_themes_atoms_
18
18
  display: "flex",
19
19
  justifyContent: "space-between",
20
20
  alignItems: "center",
21
- padding: "xs",
22
21
  typography: "heading3-small"
23
22
  }), {
23
+ padding: `${_gnist_themes_tokens_css_js.tokens.spacing.xxs} ${_gnist_themes_tokens_css_js.tokens.spacing.xxs}`,
24
24
  cursor: "pointer",
25
25
  position: "relative",
26
26
  selectors: { "&:focus": { outline: `${_gnist_themes_tokens_css_js.tokens.stroke.medium} solid ${_gnist_themes_tokens_css_js.tokens.color.interactive}` } }
@@ -18,9 +18,9 @@ var head = gnistStyle([atoms({
18
18
  display: "flex",
19
19
  justifyContent: "space-between",
20
20
  alignItems: "center",
21
- padding: "xs",
22
21
  typography: "heading3-small"
23
22
  }), {
23
+ padding: `${tokens.spacing.xxs} ${tokens.spacing.xxs}`,
24
24
  cursor: "pointer",
25
25
  position: "relative",
26
26
  selectors: { "&:focus": { outline: `${tokens.stroke.medium} solid ${tokens.color.interactive}` } }
package/dist/index.cjs CHANGED
@@ -37,13 +37,14 @@ const require_index$5 = require("./translations/index.cjs");
37
37
  const require_AlertBanner = require("./components/feedback/alerts/AlertBanner.cjs");
38
38
  const require_LoadingSpinner = require("./components/feedback/loaders/LoadingSpinner.cjs");
39
39
  const require_LoadingBar = require("./components/feedback/loaders/LoadingBar.cjs");
40
+ const require_TextArea = require("./components/inputs/textFields/TextArea.cjs");
41
+ const require_FeedbackInput = require("./components/feedback/feedbackInput/FeedbackInput.cjs");
40
42
  const require_Lozenge = require("./components/feedback/notifications/Lozenge.cjs");
41
43
  const require_ProgressBar = require("./components/feedback/progress/ProgressBar.cjs");
42
44
  const require_MultiSelect = require("./components/inputs/dropdowns/MultiSelect.cjs");
43
45
  const require_SingleSelect = require("./components/inputs/dropdowns/SingleSelect.cjs");
44
46
  const require_date = require("./utilities/time/date.cjs");
45
47
  const require_calendar = require("./components/inputs/pickers/calendar.cjs");
46
- const require_TextArea = require("./components/inputs/textFields/TextArea.cjs");
47
48
  const require_TextField = require("./components/inputs/textFields/TextField.cjs");
48
49
  const require_ActionCard = require("./components/surfaces/cards/ActionCard.cjs");
49
50
  const require_InfoCard = require("./components/surfaces/cards/InfoCard.cjs");
@@ -76,6 +77,7 @@ exports.DangerButton = require_DangerButton.DangerButton;
76
77
  exports.DetailText = require_index.DetailText;
77
78
  exports.DisplayText = require_index.DisplayText;
78
79
  exports.ExtraIconsProvider = require_ExtraIconsProvider.ExtraIconsProvider;
80
+ exports.FeedbackInput = require_FeedbackInput.FeedbackInput;
79
81
  exports.FilterChip = require_FilterChip.FilterChip;
80
82
  exports.FormProvider = require_formContext.FormProvider;
81
83
  exports.GhostButton = require_GhostButton.GhostButton;
package/dist/index.js CHANGED
@@ -36,13 +36,14 @@ import { sliceTranslate, translate, useTranslation } from "./translations/index.
36
36
  import { AlertBanner } from "./components/feedback/alerts/AlertBanner.js";
37
37
  import { LoadingSpinner } from "./components/feedback/loaders/LoadingSpinner.js";
38
38
  import { LoadingBar, LoadingBarComponent } from "./components/feedback/loaders/LoadingBar.js";
39
+ import { TextArea, characterCount, wordCount } from "./components/inputs/textFields/TextArea.js";
40
+ import { FeedbackInput } from "./components/feedback/feedbackInput/FeedbackInput.js";
39
41
  import { Lozenge } from "./components/feedback/notifications/Lozenge.js";
40
42
  import { ProgressBar, ProgressBarComponent } from "./components/feedback/progress/ProgressBar.js";
41
43
  import { MultiSelect } from "./components/inputs/dropdowns/MultiSelect.js";
42
44
  import { SingleSelect } from "./components/inputs/dropdowns/SingleSelect.js";
43
45
  import { addDays, addMonths, getStartOfDay, isNorwegianHoliday, isSameDate, maxDayOfMonth, minDayOfMonth, nextMonth, today } from "./utilities/time/date.js";
44
46
  import { Calendar } from "./components/inputs/pickers/calendar.js";
45
- import { TextArea, characterCount, wordCount } from "./components/inputs/textFields/TextArea.js";
46
47
  import { TextField } from "./components/inputs/textFields/TextField.js";
47
48
  import { ActionCard } from "./components/surfaces/cards/ActionCard.js";
48
49
  import { InfoCard } from "./components/surfaces/cards/InfoCard.js";
@@ -57,4 +58,4 @@ import { FormProvider, useForm } from "./utilities/forms/formContext.js";
57
58
  import { formInputs } from "./utilities/forms/formInputs.js";
58
59
  import { useLocalFormState } from "./utilities/forms/useLocalFormState.js";
59
60
  import "./utilities/index.js";
60
- export { Accordion, ActionCard, ActionChip, AlertBanner, AudiFont, AutoriaFont, BilholdFont, BodyText, Calendar, Checkbox, CheckboxCard, Column, CupraFont, DahlesFont, DangerButton, DetailText, DisplayText, ExtraIconsProvider, FilterChip, FormProvider, GhostButton, GumpenFont, HeaderLevels, Heading1Text, Heading2Text, Heading3Text, Icon, IconButton, IconVariantProvider, InfoCard, InputHelperText, LeadText, Link, LinkCard, LoadingBar, LoadingBarComponent, LoadingSpinner, LocalizationProvider, Logo, Lozenge, Modal, MollerFont, MultiSelect, PrimaryButton, ProgressBar, ProgressBarComponent, RadioButton, RadioCard, RadioGroup, Row, ScreenReaderOnly, SecondaryButton, SingleSelect, SkodaFont, Spinner, StatusIndicator, SuccessButton, Switch, TagChip, TextArea, TextButton, TextContainer, TextField, ToolsFont, VWFont, addDays, addMonths, breakpointDesktop, breakpointMobile, breakpointTablet, characterCount, defineIcons, formInputs, getStartOfDay, isNorwegianHoliday, isSameDate, maxDayOfMonth, minDayOfMonth, nextMonth, sliceTranslate, today, translate, useForm, useInputHelperText, useLanguage, useLocalFormState, useTranslation, visuallyHidden, wordCount };
61
+ export { Accordion, ActionCard, ActionChip, AlertBanner, AudiFont, AutoriaFont, BilholdFont, BodyText, Calendar, Checkbox, CheckboxCard, Column, CupraFont, DahlesFont, DangerButton, DetailText, DisplayText, ExtraIconsProvider, FeedbackInput, FilterChip, FormProvider, GhostButton, GumpenFont, HeaderLevels, Heading1Text, Heading2Text, Heading3Text, Icon, IconButton, IconVariantProvider, InfoCard, InputHelperText, LeadText, Link, LinkCard, LoadingBar, LoadingBarComponent, LoadingSpinner, LocalizationProvider, Logo, Lozenge, Modal, MollerFont, MultiSelect, PrimaryButton, ProgressBar, ProgressBarComponent, RadioButton, RadioCard, RadioGroup, Row, ScreenReaderOnly, SecondaryButton, SingleSelect, SkodaFont, Spinner, StatusIndicator, SuccessButton, Switch, TagChip, TextArea, TextButton, TextContainer, TextField, ToolsFont, VWFont, addDays, addMonths, breakpointDesktop, breakpointMobile, breakpointTablet, characterCount, defineIcons, formInputs, getStartOfDay, isNorwegianHoliday, isSameDate, maxDayOfMonth, minDayOfMonth, nextMonth, sliceTranslate, today, translate, useForm, useInputHelperText, useLanguage, useLocalFormState, useTranslation, visuallyHidden, wordCount };
@@ -2,9 +2,9 @@
2
2
  const require_Checkbox = require("../../../components/actions/selectionControls/Checkbox.cjs");
3
3
  const require_RadioGroup = require("../../../components/actions/selectionControls/RadioGroup.cjs");
4
4
  const require_LocalizationProvider = require("../../../translations/LocalizationProvider.cjs");
5
+ const require_TextArea = require("../../../components/inputs/textFields/TextArea.cjs");
5
6
  const require_MultiSelect = require("../../../components/inputs/dropdowns/MultiSelect.cjs");
6
7
  const require_SingleSelect = require("../../../components/inputs/dropdowns/SingleSelect.cjs");
7
- const require_TextArea = require("../../../components/inputs/textFields/TextArea.cjs");
8
8
  const require_TextField = require("../../../components/inputs/textFields/TextField.cjs");
9
9
  const require_formContext = require("../formContext.cjs");
10
10
  const require_validation = require("../../validation/validation.cjs");
@@ -2,9 +2,9 @@
2
2
  import { Checkbox } from "../../../components/actions/selectionControls/Checkbox.js";
3
3
  import { RadioGroup } from "../../../components/actions/selectionControls/RadioGroup.js";
4
4
  import { useLanguage } from "../../../translations/LocalizationProvider.js";
5
+ import { TextArea } from "../../../components/inputs/textFields/TextArea.js";
5
6
  import { MultiSelect } from "../../../components/inputs/dropdowns/MultiSelect.js";
6
7
  import { SingleSelect } from "../../../components/inputs/dropdowns/SingleSelect.js";
7
- import { TextArea } from "../../../components/inputs/textFields/TextArea.js";
8
8
  import { TextField } from "../../../components/inputs/textFields/TextField.js";
9
9
  import { useForm } from "../formContext.js";
10
10
  import { addNecessityIndicator } from "../../validation/validation.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnist/design-system",
3
- "version": "7.4.0",
3
+ "version": "7.5.1",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -104,5 +104,5 @@
104
104
  "optional": true
105
105
  }
106
106
  },
107
- "gitHead": "dc3b27539c1baaf0867cb90798522fbe86ef42eb"
107
+ "gitHead": "4e12dd447dcc938bd4ecc9bc3cec94cf1009085e"
108
108
  }