@drivy/cobalt 0.50.5 → 0.51.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.
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import cx from 'classnames';
3
3
 
4
- const Note = ({ children, fullWidth = false, className }) => (React.createElement("div", { className: cx("cobalt-Note", className, {
4
+ const Note = ({ children, fullWidth = false, className, isError = false, }) => (React.createElement("div", { className: cx("cobalt-Note", className, {
5
5
  "cobalt-Note--fullWidth": fullWidth,
6
+ "cobalt-Note--error": isError,
6
7
  }) }, children));
7
8
 
8
9
  export { Note, Note as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Note/index.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\n\nexport interface NoteProps {\n children: React.ReactNode\n /**\n * will fill available width\n * @default false\n */\n fullWidth?: boolean\n className?: string\n}\n\nexport const Note = ({ children, fullWidth = false, className }: NoteProps) => (\n <div\n className={cx(\"cobalt-Note\", className, {\n \"cobalt-Note--fullWidth\": fullWidth,\n })}\n >\n {children}\n </div>\n)\n\nexport default Note\n"],"names":[],"mappings":";;;AAaa,MAAA,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,GAAG,KAAK,EAAE,SAAS,EAAa,MACxE,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE;AACtC,QAAA,wBAAwB,EAAE,SAAS;AACpC,KAAA,CAAC,EAED,EAAA,QAAQ,CACL;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Note/index.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\n\nexport interface NoteProps {\n children: React.ReactNode\n /**\n * will fill available width\n * @default false\n */\n fullWidth?: boolean\n className?: string\n isError?: boolean\n}\n\nexport const Note = ({\n children,\n fullWidth = false,\n className,\n isError = false,\n}: NoteProps) => (\n <div\n className={cx(\"cobalt-Note\", className, {\n \"cobalt-Note--fullWidth\": fullWidth,\n \"cobalt-Note--error\": isError,\n })}\n >\n {children}\n </div>\n)\n\nexport default Note\n"],"names":[],"mappings":";;;AAcO,MAAM,IAAI,GAAG,CAAC,EACnB,QAAQ,EACR,SAAS,GAAG,KAAK,EACjB,SAAS,EACT,OAAO,GAAG,KAAK,GACL,MACV,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE;AACtC,QAAA,wBAAwB,EAAE,SAAS;AACnC,QAAA,oBAAoB,EAAE,OAAO;AAC9B,KAAA,CAAC,EAED,EAAA,QAAQ,CACL;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drivy/cobalt",
3
- "version": "0.50.5",
3
+ "version": "0.51.0",
4
4
  "description": "Opinionated design system for Drivy's projects.",
5
5
  "main": "src/index.js",
6
6
  "types": "types/src/index.d.ts",
@@ -1,15 +1,9 @@
1
1
  .cobalt- {
2
2
  &Note {
3
- @include c-text-body-md;
4
- @include text-color(info);
5
- @include bg-color(info);
3
+ @apply c-text-body-md c-bg-info c-text-info c-p-sm c-rounded-lg;
6
4
 
7
5
  display: inline-block;
8
6
 
9
- padding: spacing(sm);
10
-
11
- border-radius: border-radius(lg);
12
-
13
7
  a {
14
8
  color: inherit;
15
9
  }
@@ -18,4 +12,8 @@
18
12
  &Note--fullWidth {
19
13
  display: block;
20
14
  }
15
+
16
+ &Note--error {
17
+ @apply c-bg-errorAlt c-text-error;
18
+ }
21
19
  }
@@ -7,6 +7,7 @@ export interface NoteProps {
7
7
  */
8
8
  fullWidth?: boolean;
9
9
  className?: string;
10
+ isError?: boolean;
10
11
  }
11
- export declare const Note: ({ children, fullWidth, className }: NoteProps) => React.JSX.Element;
12
+ export declare const Note: ({ children, fullWidth, className, isError, }: NoteProps) => React.JSX.Element;
12
13
  export default Note;
@@ -1 +1 @@
1
- {"version":3,"file":"getCobaltTailwindcssConfig.js","sources":["../../utils/getCobaltTailwindcssConfig.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireGetCobaltTailwindcssConfig } from \"/Users/cedric/Dev/drivy/cobalt/utils/getCobaltTailwindcssConfig.js\";\nvar getCobaltTailwindcssConfigExports = requireGetCobaltTailwindcssConfig();\nexport { getCobaltTailwindcssConfigExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(getCobaltTailwindcssConfigExports);"],"names":[],"mappings":";;;AAEA,IAAI,iCAAiC,GAAG,iCAAiC,EAAE,CAAC;AAE5E,iCAAe,aAAa,uBAAuB,CAAC,iCAAiC,CAAC;;;;"}
1
+ {"version":3,"file":"getCobaltTailwindcssConfig.js","sources":["../../utils/getCobaltTailwindcssConfig.js?commonjs-entry"],"sourcesContent":["import { getDefaultExportFromCjs } from \"\u0000commonjsHelpers.js\";\nimport { __require as requireGetCobaltTailwindcssConfig } from \"/Users/thibaudesnouf/sources/cobalt/utils/getCobaltTailwindcssConfig.js\";\nvar getCobaltTailwindcssConfigExports = requireGetCobaltTailwindcssConfig();\nexport { getCobaltTailwindcssConfigExports as __moduleExports };\nexport default /*@__PURE__*/getDefaultExportFromCjs(getCobaltTailwindcssConfigExports);"],"names":[],"mappings":";;;AAEA,IAAI,iCAAiC,GAAG,iCAAiC,EAAE,CAAC;AAE5E,iCAAe,aAAa,uBAAuB,CAAC,iCAAiC,CAAC;;;;"}