@norges-domstoler/dds-components 0.0.0-dev-20260909073817 → 0.0.0-dev-20260910115112

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/dist/index.css CHANGED
@@ -6299,7 +6299,7 @@ input[data-indeterminate='true'] ~ .dds-SelectionControl-module__selection-contr
6299
6299
  }
6300
6300
  .dds-Feedback-module__rating-container {
6301
6301
  display: flex;
6302
- gap: var(--dds-spacing-x1);
6302
+ gap: var(--dds-spacing-x0-5);
6303
6303
  }
6304
6304
 
6305
6305
  .dds-Feedback-module__rating-container--horizontal {
package/dist/index.mjs CHANGED
@@ -7316,22 +7316,15 @@ const TextArea = ({ id, value, defaultValue, onChange, errorMessage, required =
7316
7316
  };
7317
7317
  TextArea.displayName = "TextArea";
7318
7318
  //#endregion
7319
- //#region src/components/Feedback/utils.tsx
7320
- const getIconSize = (layout) => layout === "vertical" ? "large" : "medium";
7321
- //#endregion
7322
7319
  //#region src/components/Feedback/CommentComponent.tsx
7323
- const CommentComponent = ({ layout, rating, feedbackText, positiveFeedbackLabel, negativeFeedbackLabel, ratingSubmittedTitle, textAreaTip, loading, handleSubmit, handleFeedbackTextChange }) => {
7320
+ const CommentComponent = ({ rating, feedbackText, positiveFeedbackLabel, negativeFeedbackLabel, ratingSubmittedTitle, textAreaTip, loading, handleSubmit, handleFeedbackTextChange }) => {
7324
7321
  const { t } = useTranslation();
7325
7322
  return /* @__PURE__ */ jsxs(VStack, {
7326
7323
  gap: "x1",
7327
7324
  children: [
7328
- /* @__PURE__ */ jsxs("span", {
7325
+ /* @__PURE__ */ jsx("span", {
7329
7326
  className: Feedback_module_default["rating-submitted-title"],
7330
- children: [/* @__PURE__ */ jsx(Icon, {
7331
- icon: rating === "positive" ? ThumbUpFilledIcon : ThumbDownFilledIcon,
7332
- color: "icon-action-resting",
7333
- iconSize: getIconSize(layout)
7334
- }), /* @__PURE__ */ jsxs(Paragraph, { children: [ratingSubmittedTitle, " "] })]
7327
+ children: /* @__PURE__ */ jsxs(Paragraph, { children: [ratingSubmittedTitle, " "] })
7335
7328
  }),
7336
7329
  /* @__PURE__ */ jsx(TextArea, {
7337
7330
  value: feedbackText,
@@ -7357,6 +7350,9 @@ const texts$17 = createTexts({ send: {
7357
7350
  se: "Sádde"
7358
7351
  } });
7359
7352
  //#endregion
7353
+ //#region src/components/Feedback/utils.tsx
7354
+ const getButtonSize = (layout) => layout === "vertical" ? "medium" : "small";
7355
+ //#endregion
7360
7356
  //#region src/components/Tooltip/Tooltip.tsx
7361
7357
  const Tooltip = ({ text, placement = "bottom", children, tooltipId, delay = 100, style, onMouseLeave, onMouseOver, keepMounted = true, id, ref, className, htmlProps, ...rest }) => {
7362
7358
  const generatedId = useId();
@@ -7452,26 +7448,32 @@ Tooltip.displayName = "Tooltip";
7452
7448
  //#region src/components/Feedback/RatingComponent.tsx
7453
7449
  const RatingComponent = ({ layout, ratingLabel, loading, thumbUpTooltip, thumbDownTooltip, handleRatingChange }) => {
7454
7450
  const { t } = useTranslation();
7455
- const button = (rating, layout, tooltip) => /* @__PURE__ */ jsx(InlineIconButton, {
7456
- "aria-label": tooltip,
7457
- onClick: () => handleRatingChange(rating),
7458
- size: getIconSize(layout),
7459
- icon: rating === "positive" ? ThumbUpIcon : ThumbDownIcon,
7460
- color: "icon-medium"
7461
- });
7451
+ const buttonSize = getButtonSize(layout);
7462
7452
  return /* @__PURE__ */ jsxs("div", {
7463
7453
  className: cn(Feedback_module_default["rating-container"], Feedback_module_default[`rating-container--${layout}`]),
7464
7454
  children: [/* @__PURE__ */ jsx("h2", {
7465
7455
  className: typographyStyles_module_default["label-medium"],
7466
7456
  children: ratingLabel
7467
7457
  }), loading ? /* @__PURE__ */ jsx(Spinner, { tooltip: t(texts$16.uploadingFeedback) }) : /* @__PURE__ */ jsxs(HStack, {
7468
- gap: "x1",
7458
+ gap: "x0.75",
7469
7459
  children: [/* @__PURE__ */ jsx(Tooltip, {
7470
7460
  text: thumbUpTooltip,
7471
- children: button("positive", layout, thumbUpTooltip)
7461
+ children: /* @__PURE__ */ jsx(Button, {
7462
+ purpose: "secondary",
7463
+ "aria-label": thumbUpTooltip,
7464
+ onClick: () => handleRatingChange("positive"),
7465
+ size: buttonSize,
7466
+ icon: ThumbUpIcon
7467
+ })
7472
7468
  }), /* @__PURE__ */ jsx(Tooltip, {
7473
7469
  text: thumbDownTooltip,
7474
- children: button("negative", layout, thumbDownTooltip)
7470
+ children: /* @__PURE__ */ jsx(Button, {
7471
+ purpose: "secondary",
7472
+ "aria-label": thumbDownTooltip,
7473
+ onClick: () => handleRatingChange("negative"),
7474
+ size: buttonSize,
7475
+ icon: ThumbDownIcon
7476
+ })
7475
7477
  })]
7476
7478
  })]
7477
7479
  });
@@ -7529,7 +7531,6 @@ const Feedback = ({ layout = "vertical", ratingLabel, positiveFeedbackLabel, neg
7529
7531
  handleRatingChange
7530
7532
  });
7531
7533
  if (!feedbackTextAreaExcluded && !isFeedbackSubmitted) return /* @__PURE__ */ jsx(CommentComponent, {
7532
- layout,
7533
7534
  rating,
7534
7535
  feedbackText,
7535
7536
  positiveFeedbackLabel: tPositiveFeedbackLabel,