kahuna-base-react-components 1.0.3 → 1.0.5

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/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var t=require("react/jsx-runtime");exports.KButton=function(e){return t.jsx("button",{disabled:e.disabled,"data-testid":"".concat(e.testIdPrefix),className:"",onClick:function(){},children:t.jsx("span",{children:e.label})})};
1
+ "use strict";var t=require("react/jsx-runtime");exports.KButton=function(e){return t.jsx("button",{disabled:e.disabled,"data-testid":"".concat(e.testIdPrefix),className:"",onClick:function(){},children:t.jsx("span",{children:e.label})})},exports.KSpan=function(e){return t.jsx("span",{children:e.text})};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/components/KButton/KButton.tsx"],"sourcesContent":["import React, {useState} from \"react\";\nimport {KButtonProps} from \"./KButton.types\";\n\nconst KButton: React.FC<KButtonProps> = (props) => {\n return (\n <button\n disabled={props.disabled}\n data-testid={`${props.testIdPrefix}`}\n className={``}\n onClick={() => {\n }}\n >\n <span>{props.label}</span>\n </button>\n );\n};\n\nexport default KButton;"],"names":["props","_jsx","disabled","concat","testIdPrefix","className","onClick","children","label"],"mappings":"gEAGwC,SAACA,GACvC,OACEC,EAAAA,IACE,SAAA,CAAAC,SAAUF,EAAME,SACH,cAAA,GAAAC,OAAGH,EAAMI,cACtBC,UAAW,GACXC,QAAS,aACRC,SAEDN,uBAAOD,EAAMQ,SAGnB"}
1
+ {"version":3,"file":"index.js","sources":["../../src/components/KButton/KButton.tsx","../../src/components/KSpan/KSpan.tsx"],"sourcesContent":["import React from \"react\";\n\nexport interface KButtonProps {\n testIdPrefix: string;\n label?: string;\n theme: \"primary\" | \"secondary\";\n disabled?: boolean;\n}\n\nconst KButton: React.FC<KButtonProps> = (props) => {\n return (\n <button\n disabled={props.disabled}\n data-testid={`${props.testIdPrefix}`}\n className={``}\n onClick={() => {\n }}\n >\n <span>{props.label}</span>\n </button>\n );\n};\n\nexport default KButton;","import React from \"react\";\n\nexport interface KSpanProps {\n testIdPrefix: string;\n text?: string;\n theme: \"primary\" | \"secondary\";\n}\n\nconst KSpan: React.FC<KSpanProps> = (props) => {\n return (\n <span>{props.text}</span>\n );\n};\n\nexport default KSpan;"],"names":["props","_jsx","disabled","concat","testIdPrefix","className","onClick","children","label","text"],"mappings":"gEASwC,SAACA,GACvC,OACEC,EAAAA,IACE,SAAA,CAAAC,SAAUF,EAAME,SACH,cAAA,GAAAC,OAAGH,EAAMI,cACtBC,UAAW,GACXC,QAAS,aACRC,SAEDN,uBAAOD,EAAMQ,SAGnB,gBCboC,SAACR,GACnC,OACEC,EAAAA,IAAO,OAAA,CAAAM,SAAAP,EAAMS,MAEjB"}
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";var e=function(e){return t("button",{disabled:e.disabled,"data-testid":"".concat(e.testIdPrefix),className:"",onClick:function(){},children:t("span",{children:e.label})})};export{e as KButton};
1
+ import{jsx as t}from"react/jsx-runtime";var n=function(n){return t("button",{disabled:n.disabled,"data-testid":"".concat(n.testIdPrefix),className:"",onClick:function(){},children:t("span",{children:n.label})})},e=function(n){return t("span",{children:n.text})};export{n as KButton,e as KSpan};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/components/KButton/KButton.tsx"],"sourcesContent":["import React, {useState} from \"react\";\nimport {KButtonProps} from \"./KButton.types\";\n\nconst KButton: React.FC<KButtonProps> = (props) => {\n return (\n <button\n disabled={props.disabled}\n data-testid={`${props.testIdPrefix}`}\n className={``}\n onClick={() => {\n }}\n >\n <span>{props.label}</span>\n </button>\n );\n};\n\nexport default KButton;"],"names":["KButton","props","_jsx","disabled","concat","testIdPrefix","className","onClick","children","label"],"mappings":"wCAGM,IAAAA,EAAkC,SAACC,GACvC,OACEC,EACE,SAAA,CAAAC,SAAUF,EAAME,SACH,cAAA,GAAAC,OAAGH,EAAMI,cACtBC,UAAW,GACXC,QAAS,aACRC,SAEDN,mBAAOD,EAAMQ,SAGnB"}
1
+ {"version":3,"file":"index.js","sources":["../../src/components/KButton/KButton.tsx","../../src/components/KSpan/KSpan.tsx"],"sourcesContent":["import React from \"react\";\n\nexport interface KButtonProps {\n testIdPrefix: string;\n label?: string;\n theme: \"primary\" | \"secondary\";\n disabled?: boolean;\n}\n\nconst KButton: React.FC<KButtonProps> = (props) => {\n return (\n <button\n disabled={props.disabled}\n data-testid={`${props.testIdPrefix}`}\n className={``}\n onClick={() => {\n }}\n >\n <span>{props.label}</span>\n </button>\n );\n};\n\nexport default KButton;","import React from \"react\";\n\nexport interface KSpanProps {\n testIdPrefix: string;\n text?: string;\n theme: \"primary\" | \"secondary\";\n}\n\nconst KSpan: React.FC<KSpanProps> = (props) => {\n return (\n <span>{props.text}</span>\n );\n};\n\nexport default KSpan;"],"names":["KButton","props","_jsx","disabled","concat","testIdPrefix","className","onClick","children","label","KSpan","text"],"mappings":"wCASM,IAAAA,EAAkC,SAACC,GACvC,OACEC,EACE,SAAA,CAAAC,SAAUF,EAAME,SACH,cAAA,GAAAC,OAAGH,EAAMI,cACtBC,UAAW,GACXC,QAAS,aACRC,SAEDN,mBAAOD,EAAMQ,SAGnB,ECbMC,EAA8B,SAACT,GACnC,OACEC,EAAO,OAAA,CAAAM,SAAAP,EAAMU,MAEjB"}
package/dist/types.d.ts CHANGED
@@ -6,7 +6,13 @@ interface KButtonProps {
6
6
  theme: "primary" | "secondary";
7
7
  disabled?: boolean;
8
8
  }
9
-
10
9
  declare const KButton: React.FC<KButtonProps>;
11
10
 
12
- export { KButton };
11
+ interface KSpanProps {
12
+ testIdPrefix: string;
13
+ text?: string;
14
+ theme: "primary" | "secondary";
15
+ }
16
+ declare const KSpan: React.FC<KSpanProps>;
17
+
18
+ export { KButton, KSpan };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "kahuna-base-react-components",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Kahuna Base React Components",
5
- "main": "dist/cjs/index.js",
6
- "module": "dist/esm/index.js",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.esm.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
9
9
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -2,21 +2,21 @@ import {Meta, StoryFn} from "@storybook/react";
2
2
  import KButton from "./KButton";
3
3
 
4
4
  export default {
5
- title: "ReactComponentLibrary/Rating",
5
+ title: "ReactComponentLibrary/KButton",
6
6
  component: KButton,
7
7
  } as Meta<typeof KButton>;
8
8
 
9
9
  const Template: StoryFn<typeof KButton> = (args) => <KButton {...args} />;
10
10
 
11
- export const RatingTest = Template.bind({});
12
- RatingTest.args = {
11
+ export const ButtonTest = Template.bind({});
12
+ ButtonTest.args = {
13
13
  label: "Save Me!",
14
14
  theme: "primary",
15
15
  testIdPrefix: "rating",
16
16
  };
17
17
 
18
- export const RatingSecondary = Template.bind({});
19
- RatingSecondary.args = {
18
+ export const ButtonSecondary = Template.bind({});
19
+ ButtonSecondary.args = {
20
20
  label: "Secondary theme Save V2",
21
21
  theme: "secondary",
22
22
  testIdPrefix: "rating",
@@ -1,5 +1,11 @@
1
- import React, {useState} from "react";
2
- import {KButtonProps} from "./KButton.types";
1
+ import React from "react";
2
+
3
+ export interface KButtonProps {
4
+ testIdPrefix: string;
5
+ label?: string;
6
+ theme: "primary" | "secondary";
7
+ disabled?: boolean;
8
+ }
3
9
 
4
10
  const KButton: React.FC<KButtonProps> = (props) => {
5
11
  return (
@@ -0,0 +1,17 @@
1
+ import {Meta, StoryFn} from "@storybook/react";
2
+ import KButton from "./KSpan";
3
+ import KSpan from "./KSpan";
4
+
5
+ export default {
6
+ title: "ReactComponentLibrary/KSpan",
7
+ component: KSpan,
8
+ } as Meta<typeof KSpan>;
9
+
10
+ const Template: StoryFn<typeof KButton> = (args) => <KButton {...args} />;
11
+
12
+ export const SpanTest = Template.bind({});
13
+ SpanTest.args = {
14
+ text: "Spanning :))!",
15
+ theme: "primary",
16
+ testIdPrefix: "rating",
17
+ };
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+
3
+ export interface KSpanProps {
4
+ testIdPrefix: string;
5
+ text?: string;
6
+ theme: "primary" | "secondary";
7
+ }
8
+
9
+ const KSpan: React.FC<KSpanProps> = (props) => {
10
+ return (
11
+ <span>{props.text}</span>
12
+ );
13
+ };
14
+
15
+ export default KSpan;
@@ -0,0 +1 @@
1
+ export {default} from './KSpan';
package/src/index.ts CHANGED
@@ -1,5 +1,6 @@
1
- import KButton from "./components/KButton/KButton"
1
+ import KButton from "./components/KButton"
2
+ import KSpan from "./components/KSpan"
2
3
 
3
4
  export {
4
- KButton
5
+ KButton, KSpan
5
6
  }
@@ -1,6 +0,0 @@
1
- export interface KButtonProps {
2
- testIdPrefix: string;
3
- label?: string;
4
- theme: "primary" | "secondary";
5
- disabled?: boolean;
6
- }
@@ -1 +0,0 @@
1
- export * from './KButton';