@gnist/design-system 2.0.13 → 2.0.14

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 CHANGED
@@ -3,6 +3,10 @@
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
+ ## <small>2.0.14 (2025-02-20)</small>
7
+
8
+ * fix: pass classname prop for card components ([3fbfa17](https://github.com/mollerdigital/design-system-design-system/commit/3fbfa17))
9
+
6
10
  ## <small>2.0.13 (2025-02-17)</small>
7
11
 
8
12
  * feat: add docs for loading prop for buttons ([268e827](https://github.com/mollerdigital/design-system-design-system/commit/268e827))
@@ -10,13 +10,13 @@ const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in
10
10
  const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
11
11
  const ActionCard = React.forwardRef(function ActionCard2({ $as, as, children, isLoading, density, ...props }, ref) {
12
12
  const cardProps = {
13
- ...props,
14
13
  ref,
15
- className: classNames__default.default(props.className, cards_css.cardsRecipe({
14
+ ...props,
15
+ className: classNames__default.default(cards_css.cardsRecipe({
16
16
  type: "action",
17
17
  isLoading,
18
18
  density
19
- }))
19
+ }), props.className)
20
20
  };
21
21
  return React.createElement($as ?? as ?? "button", cardProps, jsxRuntime.jsx(jsxRuntime.Fragment, { children: isLoading ? jsxRuntime.jsx(SharedComponents.LoadingSkeleton, {}) : children }));
22
22
  });
@@ -6,13 +6,13 @@ import { cardsRecipe } from "./cards.css.js";
6
6
  import { LoadingSkeleton } from "./SharedComponents.js";
7
7
  const ActionCard = forwardRef(function ActionCard2({ $as, as, children, isLoading, density, ...props }, ref) {
8
8
  const cardProps = {
9
- ...props,
10
9
  ref,
11
- className: classNames(props.className, cardsRecipe({
10
+ ...props,
11
+ className: classNames(cardsRecipe({
12
12
  type: "action",
13
13
  isLoading,
14
14
  density
15
- }))
15
+ }), props.className)
16
16
  };
17
17
  return createElement($as ?? as ?? "button", cardProps, jsx(Fragment, { children: isLoading ? jsx(LoadingSkeleton, {}) : children }));
18
18
  });
@@ -7,10 +7,13 @@ const SelectionCard = require("./internal/SelectionCard.cjs");
7
7
  const InfoCard = require("./InfoCard.cjs");
8
8
  const checkboxCard_css = require("./checkboxCard.css.cjs");
9
9
  const React = require("react");
10
+ const classNames = require("classnames");
11
+ const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
12
+ const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
10
13
  const CheckboxCard = React.forwardRef(function CheckboxCard2({ label, description, value, id, onChange, children, isLoading, validity, checkboxProps, cardStyle, ...props }, ref) {
11
- return jsxRuntime.jsx(InfoCard.InfoCard, { ref, className: checkboxCard_css.StyledCardRecipe({
14
+ return jsxRuntime.jsx(InfoCard.InfoCard, { ref, ...props, className: classNames__default.default(checkboxCard_css.StyledCardRecipe({
12
15
  disabled: props.disabled,
13
16
  cardStyle: cardStyle ?? "elevation"
14
- }), ...props, children: isLoading ? jsxRuntime.jsx(SelectionCard.SelectionCardLoader, { type: "checkbox", density: props.density }) : jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Checkbox.Checkbox, { label, value, onChange, validity, id, disabled: props.disabled, ...checkboxProps }), jsxRuntime.jsx(SelectionCard.SelectionCardContent, { description, value, density: props.density, children })] }) });
17
+ }), props.className), children: isLoading ? jsxRuntime.jsx(SelectionCard.SelectionCardLoader, { type: "checkbox", density: props.density }) : jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Checkbox.Checkbox, { label, value, onChange, validity, id, disabled: props.disabled, ...checkboxProps }), jsxRuntime.jsx(SelectionCard.SelectionCardContent, { description, value, density: props.density, children })] }) });
15
18
  });
16
19
  exports.CheckboxCard = CheckboxCard;
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/CheckboxCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,aAAa,EAChB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACH,yBAAyB,EAGzB,kBAAkB,EACrB,MAAM,6BAA6B,CAAC;AAKrC,UAAU,iBAAkB,SAAQ,kBAAkB;IAClD;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACpC;;OAEG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;CAC1D;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,yBAAyB,CACtD,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAqDtE,CAAC"}
1
+ {"version":3,"file":"CheckboxCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/CheckboxCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,aAAa,EAChB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACH,yBAAyB,EAGzB,kBAAkB,EACrB,MAAM,6BAA6B,CAAC;AAMrC,UAAU,iBAAkB,SAAQ,kBAAkB;IAClD;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACpC;;OAEG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;CAC1D;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,yBAAyB,CACtD,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAwDtE,CAAC"}
@@ -5,11 +5,12 @@ import { SelectionCardLoader, SelectionCardContent } from "./internal/SelectionC
5
5
  import { InfoCard } from "./InfoCard.js";
6
6
  import { StyledCardRecipe } from "./checkboxCard.css.js";
7
7
  import { forwardRef } from "react";
8
+ import classNames from "classnames";
8
9
  const CheckboxCard = forwardRef(function CheckboxCard2({ label, description, value, id, onChange, children, isLoading, validity, checkboxProps, cardStyle, ...props }, ref) {
9
- return jsx(InfoCard, { ref, className: StyledCardRecipe({
10
+ return jsx(InfoCard, { ref, ...props, className: classNames(StyledCardRecipe({
10
11
  disabled: props.disabled,
11
12
  cardStyle: cardStyle ?? "elevation"
12
- }), ...props, children: isLoading ? jsx(SelectionCardLoader, { type: "checkbox", density: props.density }) : jsxs(Fragment, { children: [jsx(Checkbox, { label, value, onChange, validity, id, disabled: props.disabled, ...checkboxProps }), jsx(SelectionCardContent, { description, value, density: props.density, children })] }) });
13
+ }), props.className), children: isLoading ? jsx(SelectionCardLoader, { type: "checkbox", density: props.density }) : jsxs(Fragment, { children: [jsx(Checkbox, { label, value, onChange, validity, id, disabled: props.disabled, ...checkboxProps }), jsx(SelectionCardContent, { description, value, density: props.density, children })] }) });
13
14
  });
14
15
  export {
15
16
  CheckboxCard
@@ -9,11 +9,11 @@ const SharedComponents = require("./SharedComponents.cjs");
9
9
  const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
10
10
  const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
11
11
  const InfoCard = React.forwardRef(function InfoCard2({ isLoading, transparent, density, ...props }, ref) {
12
- return jsxRuntime.jsx("div", { ref, ...props, className: classNames__default.default(props.className, cards_css.cardsRecipe({
12
+ return jsxRuntime.jsx("div", { ref, ...props, className: classNames__default.default(cards_css.cardsRecipe({
13
13
  type: "info",
14
14
  isLoading,
15
15
  transparent,
16
16
  density
17
- })), children: isLoading ? jsxRuntime.jsx(SharedComponents.LoadingSkeleton, {}) : props.children });
17
+ }), props.className), children: isLoading ? jsxRuntime.jsx(SharedComponents.LoadingSkeleton, {}) : props.children });
18
18
  });
19
19
  exports.InfoCard = InfoCard;
@@ -5,12 +5,12 @@ import { forwardRef } from "react";
5
5
  import { cardsRecipe } from "./cards.css.js";
6
6
  import { LoadingSkeleton } from "./SharedComponents.js";
7
7
  const InfoCard = forwardRef(function InfoCard2({ isLoading, transparent, density, ...props }, ref) {
8
- return jsx("div", { ref, ...props, className: classNames(props.className, cardsRecipe({
8
+ return jsx("div", { ref, ...props, className: classNames(cardsRecipe({
9
9
  type: "info",
10
10
  isLoading,
11
11
  transparent,
12
12
  density
13
- })), children: isLoading ? jsx(LoadingSkeleton, {}) : props.children });
13
+ }), props.className), children: isLoading ? jsx(LoadingSkeleton, {}) : props.children });
14
14
  });
15
15
  export {
16
16
  InfoCard
@@ -12,11 +12,11 @@ const LinkCard = React.forwardRef(function LinkCard2({ $as, as, children, isLoad
12
12
  const cardProps = {
13
13
  ...props,
14
14
  ref,
15
- className: classNames__default.default(props.className, cards_css.cardsRecipe({
15
+ className: classNames__default.default(cards_css.cardsRecipe({
16
16
  type: "link",
17
17
  isLoading,
18
18
  density
19
- }))
19
+ }), props.className)
20
20
  };
21
21
  return React.createElement($as ?? as ?? "a", cardProps, jsxRuntime.jsx(jsxRuntime.Fragment, { children: isLoading ? jsxRuntime.jsx(SharedComponents.LoadingSkeleton, {}) : children }));
22
22
  });
@@ -8,11 +8,11 @@ const LinkCard = forwardRef(function LinkCard2({ $as, as, children, isLoading, d
8
8
  const cardProps = {
9
9
  ...props,
10
10
  ref,
11
- className: classNames(props.className, cardsRecipe({
11
+ className: classNames(cardsRecipe({
12
12
  type: "link",
13
13
  isLoading,
14
14
  density
15
- }))
15
+ }), props.className)
16
16
  };
17
17
  return createElement($as ?? as ?? "a", cardProps, jsx(Fragment, { children: isLoading ? jsx(LoadingSkeleton, {}) : children }));
18
18
  });
@@ -7,10 +7,13 @@ const SelectionCard = require("./internal/SelectionCard.cjs");
7
7
  const InfoCard = require("./InfoCard.cjs");
8
8
  const React = require("react");
9
9
  const checkboxCard_css = require("./checkboxCard.css.cjs");
10
+ const classNames = require("classnames");
11
+ const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
12
+ const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
10
13
  const RadioCard = React.forwardRef(function RadioCard2({ label, description, value, id, name, onChange, children, isLoading, validity, cardStyle, ...props }, ref) {
11
- return jsxRuntime.jsx(InfoCard.InfoCard, { ...props, ref, className: checkboxCard_css.StyledCardRecipe({
14
+ return jsxRuntime.jsx(InfoCard.InfoCard, { ref, ...props, className: classNames__default.default(checkboxCard_css.StyledCardRecipe({
12
15
  disabled: props.disabled,
13
16
  cardStyle: cardStyle ?? "elevation"
14
- }), children: isLoading ? jsxRuntime.jsx(SelectionCard.SelectionCardLoader, { type: "radio", density: props.density }) : jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(RadioButton.RadioButton, { label, value, onChange, disabled: props.disabled, validity, id, name }), jsxRuntime.jsx(SelectionCard.SelectionCardContent, { description, value, density: props.density, children })] }) });
17
+ }), props.className), children: isLoading ? jsxRuntime.jsx(SelectionCard.SelectionCardLoader, { type: "radio", density: props.density }) : jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(RadioButton.RadioButton, { label, value, onChange, disabled: props.disabled, validity, id, name }), jsxRuntime.jsx(SelectionCard.SelectionCardContent, { description, value, density: props.density, children })] }) });
15
18
  });
16
19
  exports.RadioCard = RadioCard;
@@ -1 +1 @@
1
- {"version":3,"file":"RadioCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/RadioCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,gBAAgB,EACnB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACH,yBAAyB,EAGzB,kBAAkB,EACrB,MAAM,6BAA6B,CAAC;AAKrC,UAAU,cAAe,SAAQ,kBAAkB;IAC/C;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,yBAAyB,CAAC;CAC1C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,yBAAyB,CACnD,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAkDnE,CAAC"}
1
+ {"version":3,"file":"RadioCard.d.ts","sourceRoot":"","sources":["../../../../src/components/surfaces/cards/RadioCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,gBAAgB,EACnB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACH,yBAAyB,EAGzB,kBAAkB,EACrB,MAAM,6BAA6B,CAAC;AAMrC,UAAU,cAAe,SAAQ,kBAAkB;IAC/C;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC/B;;OAEG;IACH,UAAU,CAAC,EAAE,yBAAyB,CAAC;CAC1C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,yBAAyB,CACnD,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAqDnE,CAAC"}
@@ -5,11 +5,12 @@ import { SelectionCardLoader, SelectionCardContent } from "./internal/SelectionC
5
5
  import { InfoCard } from "./InfoCard.js";
6
6
  import { forwardRef } from "react";
7
7
  import { StyledCardRecipe } from "./checkboxCard.css.js";
8
+ import classNames from "classnames";
8
9
  const RadioCard = forwardRef(function RadioCard2({ label, description, value, id, name, onChange, children, isLoading, validity, cardStyle, ...props }, ref) {
9
- return jsx(InfoCard, { ...props, ref, className: StyledCardRecipe({
10
+ return jsx(InfoCard, { ref, ...props, className: classNames(StyledCardRecipe({
10
11
  disabled: props.disabled,
11
12
  cardStyle: cardStyle ?? "elevation"
12
- }), children: isLoading ? jsx(SelectionCardLoader, { type: "radio", density: props.density }) : jsxs(Fragment, { children: [jsx(RadioButton, { label, value, onChange, disabled: props.disabled, validity, id, name }), jsx(SelectionCardContent, { description, value, density: props.density, children })] }) });
13
+ }), props.className), children: isLoading ? jsx(SelectionCardLoader, { type: "radio", density: props.density }) : jsxs(Fragment, { children: [jsx(RadioButton, { label, value, onChange, disabled: props.disabled, validity, id, name }), jsx(SelectionCardContent, { description, value, density: props.density, children })] }) });
13
14
  });
14
15
  export {
15
16
  RadioCard
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnist/design-system",
3
- "version": "2.0.13",
3
+ "version": "2.0.14",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -113,5 +113,5 @@
113
113
  "optional": true
114
114
  }
115
115
  },
116
- "gitHead": "9c213f896b366f56923ab40a62bfd7073977be0a"
116
+ "gitHead": "a64d01c99899cab0ce5db11deab339f79d27872d"
117
117
  }