@obosbbl/grunnmuren-react 2.0.0-canary.25 → 2.0.0-canary.27

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 (2) hide show
  1. package/dist/index.mjs +12 -5
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -330,11 +330,12 @@ function ErrorMessage(props) {
330
330
  });
331
331
  }
332
332
 
333
+ const descriptionClasses = 'text-sm font-light leading-6';
333
334
  function Description(props) {
334
335
  const { className, ...restProps } = props;
335
336
  return /*#__PURE__*/ jsx(Text, {
336
337
  ...restProps,
337
- className: cx(className, 'text-sm font-light leading-6'),
338
+ className: cx(className, descriptionClasses),
338
339
  slot: "description"
339
340
  });
340
341
  }
@@ -394,9 +395,11 @@ function Checkbox(props, ref) {
394
395
  children
395
396
  ]
396
397
  }),
397
- description && /*#__PURE__*/ jsx(Description, {
398
- className: "block",
398
+ description && // {/* Use a div instead of the Description component to avoid infinite re-render loops in React until this bug in RAC is fixed: https://github.com/adobe/react-spectrum/issues/6229 */}
399
+ /*#__PURE__*/ jsx("div", {
399
400
  id: descriptionId,
401
+ slot: "description",
402
+ className: cx('block', descriptionClasses),
400
403
  children: description
401
404
  }),
402
405
  errorMessage && /*#__PURE__*/ jsx(ErrorMessage, {
@@ -706,7 +709,9 @@ function TextField(props, ref) {
706
709
  children: description
707
710
  }),
708
711
  leftAddon || rightAddon ? /*#__PURE__*/ jsxs(Group, {
709
- className: inputGroup,
712
+ className: cx(inputGroup, {
713
+ 'w-fit': !!size
714
+ }),
710
715
  children: [
711
716
  leftAddon,
712
717
  withAddonDivider && leftAddon && /*#__PURE__*/ jsx(InputAddonDivider, {}),
@@ -767,7 +772,9 @@ function NumberField(props, ref) {
767
772
  children: description
768
773
  }),
769
774
  leftAddon || rightAddon ? /*#__PURE__*/ jsxs(Group, {
770
- className: inputGroup,
775
+ className: cx(inputGroup, {
776
+ 'w-fit': !!size
777
+ }),
771
778
  children: [
772
779
  leftAddon,
773
780
  withAddonDivider && leftAddon && /*#__PURE__*/ jsx(InputAddonDivider, {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obosbbl/grunnmuren-react",
3
- "version": "2.0.0-canary.25",
3
+ "version": "2.0.0-canary.27",
4
4
  "description": "Grunnmuren components in React",
5
5
  "repository": {
6
6
  "url": "https://github.com/code-obos/grunnmuren"