onchain-uikit 0.0.2 → 0.0.6

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 (49) hide show
  1. package/.storybook/preview.tsx +31 -0
  2. package/config/theme.ts +34 -0
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.es.js +581 -311
  5. package/dist/index.umd.js +30 -0
  6. package/dist/src/App.d.ts +5 -0
  7. package/dist/src/components/PlmMosaic/index.d.ts +5 -0
  8. package/dist/src/index.d.ts +3 -0
  9. package/dist/src/main.d.ts +0 -0
  10. package/dist/src/stories/Button.d.ts +14 -0
  11. package/dist/src/stories/Button.stories.d.ts +23 -0
  12. package/dist/src/stories/Header.d.ts +11 -0
  13. package/dist/src/stories/Header.stories.d.ts +18 -0
  14. package/dist/src/stories/OnChainProvider.d.ts +12 -0
  15. package/dist/src/stories/Page.d.ts +2 -0
  16. package/dist/src/stories/Page.stories.d.ts +12 -0
  17. package/dist/src/stories/PlmMosaic.stories.d.ts +14 -0
  18. package/dist/src/stories/PlmSelect/PlmSelect.stories.d.ts +21 -0
  19. package/dist/src/stories/PlmSelect/index.d.ts +20 -0
  20. package/dist/src/stories/XsButton.d.ts +22 -0
  21. package/dist/src/stories/XsButton.stories.d.ts +14 -0
  22. package/dist/src/utils/authority/basicsAuthority.d.ts +22 -0
  23. package/dist/src/utils/authority/index.d.ts +10 -0
  24. package/dist/vite.config.d.ts +2 -0
  25. package/package.json +23 -3
  26. package/src/App.tsx +30 -7
  27. package/src/assets/styles/antd.custom.less +1144 -0
  28. package/src/assets/styles/mixins.less +5 -0
  29. package/src/components/PlmMosaic/index.module.less +6 -0
  30. package/src/components/PlmMosaic/index.tsx +15 -0
  31. package/src/global.less +973 -0
  32. package/src/index.ts +5 -2
  33. package/src/main.tsx +7 -4
  34. package/src/stories/OnChainProvider.tsx +37 -0
  35. package/src/stories/PlmMosaic.stories.ts +35 -0
  36. package/src/stories/PlmSelect/PlmSelect.stories.ts +50 -0
  37. package/src/stories/PlmSelect/index.module.less +73 -0
  38. package/src/stories/PlmSelect/index.tsx +136 -0
  39. package/src/stories/XsButton.stories.ts +30 -0
  40. package/src/stories/XsButton.tsx +33 -0
  41. package/src/typings.d.ts +636 -0
  42. package/src/utils/authority/basicsAuthority.ts +46 -0
  43. package/src/utils/authority/index.tsx +28 -0
  44. package/tsconfig.json +84 -5
  45. package/typings.d.ts +130 -0
  46. package/vite.config.ts +63 -5
  47. package/.storybook/preview.ts +0 -14
  48. package/dist/index.cjs.js +0 -30
  49. package/dist/onchain-uikit.css +0 -1
package/tsconfig.json CHANGED
@@ -1,7 +1,86 @@
1
+ // {
2
+ // "files": [],
3
+ // "references": [
4
+ // { "path": "./tsconfig.app.json" },
5
+ // { "path": "./tsconfig.node.json" }
6
+ // ]
7
+ // }
1
8
  {
2
- "files": [],
3
- "references": [
4
- { "path": "./tsconfig.app.json" },
5
- { "path": "./tsconfig.node.json" }
6
- ]
9
+ "compilerOptions": {
10
+ "strict": false,
11
+ "strictNullChecks": true,
12
+ "allowUnusedLabels": false,
13
+ "allowUnreachableCode": false,
14
+ "exactOptionalPropertyTypes": false,
15
+ "noFallthroughCasesInSwitch": true,
16
+ "noImplicitOverride": true,
17
+ "noImplicitReturns": false,
18
+ "noPropertyAccessFromIndexSignature": false,
19
+ "noUncheckedIndexedAccess": false,
20
+ "noUnusedLocals": false,
21
+ "noUnusedParameters": false,
22
+
23
+ "isolatedModules": true,
24
+
25
+ "allowJs": true,
26
+ "checkJs": false,
27
+
28
+ "esModuleInterop": true,
29
+ "skipLibCheck": true,
30
+ "forceConsistentCasingInFileNames": true,
31
+
32
+ "lib": ["dom", "dom.iterable", "esnext"],
33
+ // "jsx": "preserve",
34
+ "jsx": "react-jsx",
35
+ "module": "esnext",
36
+ "target": "es2022",
37
+ "moduleResolution": "bundler",
38
+ "moduleDetection": "force",
39
+ "allowImportingTsExtensions": false,
40
+ "resolveJsonModule": true,
41
+ "noEmit": true,
42
+ "incremental": true,
43
+ "declaration": false,
44
+ "declarationMap": false,
45
+ "sourceMap": true,
46
+ "pretty": true,
47
+ "preserveWatchOutput": true,
48
+
49
+ // "tsBuildInfoFile": "tsconfig.tsbuildinfo",
50
+
51
+ "baseUrl": "src",
52
+ "paths": {
53
+ "@/*": ["./*"],
54
+ // "@/*": ["src/*"],
55
+ "~@/*": ["src/*.less"]
56
+ },
57
+ "plugins": [
58
+ {
59
+ "name": "next"
60
+ }
61
+ ]
62
+ },
63
+ "include": [
64
+ "../PLM_MAIN/typings/**/*",
65
+ "mock/**/*",
66
+ "src/**/*",
67
+ "src/typings.d.ts",
68
+ "typings.d.ts", //解决引入样式报错
69
+ "vite.config.ts",
70
+ "next-env.d.ts",
71
+ ".next/types/**/*.ts",
72
+ "src/**/*.ts",
73
+ "src/**/*.tsx",
74
+ "src/**/*.cts",
75
+ "src/**/*.ctsx",
76
+ "src/**/*.mts",
77
+ "src/**/*.mtsx",
78
+ "src/**/*.js",
79
+ "src/**/*.jsx",
80
+ "src/**/*.cjs",
81
+ "src/**/*.cjsx",
82
+ "src/**/*.mjs",
83
+ "src/**/*.mjsx"
84
+ ],
85
+ "exclude": ["node_modules"]
7
86
  }
package/typings.d.ts ADDED
@@ -0,0 +1,130 @@
1
+ declare module "*.css";
2
+ declare module "*.less";
3
+ // declare module '*.module.less' {
4
+ // const classes: { [key: string]: string };
5
+ // const classes: CSSModuleClasses
6
+ // export default classes
7
+ // }
8
+ declare module "*.webp";
9
+ declare module "*.png";
10
+ declare module "*classnames";
11
+ declare module "*.svg" {
12
+ export function ReactComponent(
13
+ props: React.SVGProps<SVGSVGElement>
14
+ ): React.ReactElement;
15
+ const url: string;
16
+ export default url;
17
+ }
18
+ declare module "@multiavatar/multiavatar";
19
+
20
+ /**
21
+ * 可更改所有属性
22
+ */
23
+ declare type Writeable<T> = {
24
+ -readonly [P in keyof T]: T[P];
25
+ };
26
+
27
+ type PageRouteConfig = {
28
+ path: string;
29
+ component?: string | (() => any);
30
+ wrappers?: (string | (() => any))[];
31
+ redirect?: string;
32
+ exact?: boolean;
33
+ routes?: PageRouteConfig[];
34
+ [k: string]: any;
35
+ };
36
+
37
+ declare interface BasicsFn<Result, Params = any> {
38
+ (...params: Params[]): Result;
39
+ }
40
+
41
+ declare interface CacheFn<Result, Value = Result, Params = any>
42
+ extends BasicsFn<Result, Params> {
43
+ (...params: Params[]): Result;
44
+ _value?: Value | null;
45
+ clearCache?: () => void;
46
+ }
47
+
48
+ declare const ICONFONT_URL: string;
49
+
50
+ declare const FULLSCREEN_PATH: string;
51
+
52
+ declare const PRODUCT_PATHNAME: string;
53
+
54
+ declare const FOLDER_PATHNAME: string;
55
+
56
+ declare const STOREHOUSE_PATHNAME: string;
57
+
58
+ declare const INSTANCE_PATHNAME: string;
59
+
60
+ declare const ES_API_PREFIX: string;
61
+
62
+ declare const TRANSMIT_API_PREFIX: string;
63
+
64
+ declare const CHAT_API_PREFIX: string;
65
+ /** 全部用户 */
66
+ declare const ALL_USER: string;
67
+ /** 全部产品清单 */
68
+ declare const ALL_PRODUCT: string;
69
+ /** 产品内全部用户 */
70
+ declare const ALL_IN_PRODUCT_USER: string;
71
+
72
+ declare const FIX_INS_TAbTABLE_COLUMNMAP: Record<string, string>;
73
+
74
+ declare const PREFERENCE: string;
75
+
76
+ declare const PREFERENCE_TAB: Record<string, string>;
77
+
78
+ // declare const FAV_LIST: Record<string, any>[];
79
+
80
+ declare const USER_PATHNAME: string;
81
+
82
+ declare const CHANGE_ITEMCODE: Number[];
83
+
84
+ declare const RECYCLE_BIN: string;
85
+
86
+ declare const WORKFLOW_ERROR_PATHNAME: string;
87
+
88
+ // declare const WORKFLOW_ACTION: Record<string, any>[];
89
+
90
+ declare const CHAT_PATHNAME: string;
91
+
92
+ declare const ALL_USERGROUP: string;
93
+
94
+ declare const ROUTES: Record<string, any>[];
95
+
96
+ declare const WORKFLOW_API_PREFIX: string;
97
+
98
+ declare const EXT_PATHNAME: string;
99
+ declare const isDevelopment: boolean;
100
+
101
+ interface Window {
102
+ moudleQiankunAppLifeCycles: any;
103
+ proxy: any;
104
+ }
105
+
106
+ interface ImportMetaEnv {
107
+ [key: string]: any;
108
+ BASE_URL: string;
109
+ MODE: string;
110
+ DEV: boolean;
111
+ PROD: boolean;
112
+ SSR: boolean;
113
+ }
114
+
115
+ // interface ImportMeta {
116
+ // url: string;
117
+
118
+ // readonly hot?: import('vite/types/hot').ViteHotContext;
119
+
120
+ // readonly env: ImportMetaEnv;
121
+
122
+ // glob: import('vite/types/importGlob').ImportGlobFunction;
123
+ // }
124
+
125
+ declare const GLOBAL_TABLE_TOP_CLASS: string;
126
+ declare const GLOBAL_ATTR_TITLE: string;
127
+
128
+ declare const DEPLOY_VERSION: string;
129
+
130
+ interface Window {}
package/vite.config.ts CHANGED
@@ -1,18 +1,74 @@
1
1
  import { defineConfig } from "vite";
2
2
  import react from "@vitejs/plugin-react";
3
+ import theme from "./config/theme";
4
+ import dts from "vite-plugin-dts";
5
+ const path = require("path");
3
6
 
4
7
  // https://vite.dev/config/
5
8
  export default defineConfig({
6
- plugins: [react()],
9
+ plugins: [
10
+ react({}),
11
+ // react({
12
+ // babel: {
13
+ // plugins: [
14
+ // [
15
+ // "import",
16
+ // {
17
+ // libraryName: "antd",
18
+ // libraryDirectory: "es",
19
+ // style: false, // 不使用 less 样式
20
+ // },
21
+ // ],
22
+ // ],
23
+ // },
24
+ // }),
25
+ dts({
26
+ // outDir: "lib",
27
+ // copyDtsFiles: true,
28
+ insertTypesEntry: true,
29
+ }),
30
+ ],
31
+ css: {
32
+ // modules: {
33
+ // hashPrefix: "prefix",
34
+ // generateScopedName: "[name]__[local]__[hash:base64:5]",
35
+ // },
36
+ preprocessorOptions: {
37
+ less: {
38
+ modifyVars: theme,
39
+ javascriptEnabled: true,
40
+ },
41
+ },
42
+ },
43
+ // build: {
44
+ // lib: {
45
+ // entry: path.resolve(__dirname, "lib/instance.js"),
46
+ // name: "instance",
47
+ // fileName: (format) => `instance.${format}.mjs`,
48
+ // formats: ["es", "umd", "cjs"],
49
+ // },
50
+ // rollupOptions: {
51
+ // input: {
52
+ // main: "./src/index.ts", // 这里的 './src/main.js' 是你想要打包的入口文件路径
53
+ // },
54
+ // external: ["less", "umi"],
55
+ // // 确保外部化处理那些你不想打包进库的依赖
56
+ // output: {
57
+ // dir: "lib",
58
+ // },
59
+ // },
60
+ // },
7
61
  build: {
8
62
  lib: {
9
- entry: "./src/index.ts",
10
- // name: "onchain-uikit",
11
- formats: ["es", "cjs"],
63
+ entry: "./src/index.ts", // 组件库入口文件
64
+ name: "onchain-uikit-library", // 组件库的名称
65
+ formats: ["es", "umd"], // 打包格式,这里同时生成 ES 模块和 UMD 模块
66
+ // formats: ["es", "cjs"],
12
67
  fileName: (format) => `index.${format}.js`,
13
68
  },
14
69
  rollupOptions: {
15
- external: ["react", "react-dom"],
70
+ // 确保 external React 和 ReactDOM 排除在打包之外
71
+ external: ["react", "react-dom", "antd"],
16
72
  // output: {
17
73
  // format: "es",
18
74
  // // entryFileNames: "[name]_[hash].js",
@@ -21,9 +77,11 @@ export default defineConfig({
21
77
  // },
22
78
 
23
79
  output: {
80
+ // 使用 UMD 格式时需要手动指定 React 的全局变量名
24
81
  globals: {
25
82
  react: "React",
26
83
  "react-dom": "ReactDOM",
84
+ antd: "antd",
27
85
  },
28
86
  },
29
87
  },
@@ -1,14 +0,0 @@
1
- import type { Preview } from "@storybook/react";
2
-
3
- const preview: Preview = {
4
- parameters: {
5
- controls: {
6
- matchers: {
7
- color: /(background|color)$/i,
8
- date: /Date$/i,
9
- },
10
- },
11
- },
12
- };
13
-
14
- export default preview;
package/dist/index.cjs.js DELETED
@@ -1,30 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pe=require("react");var U={exports:{}},I={};/**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Te;function fr(){if(Te)return I;Te=1;var x=Pe,h=Symbol.for("react.element"),k=Symbol.for("react.fragment"),g=Object.prototype.hasOwnProperty,O=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S={key:!0,ref:!0,__self:!0,__source:!0};function D(R,f,P){var p,y={},_=null,W=null;P!==void 0&&(_=""+P),f.key!==void 0&&(_=""+f.key),f.ref!==void 0&&(W=f.ref);for(p in f)g.call(f,p)&&!S.hasOwnProperty(p)&&(y[p]=f[p]);if(R&&R.defaultProps)for(p in f=R.defaultProps,f)y[p]===void 0&&(y[p]=f[p]);return{$$typeof:h,type:R,key:_,ref:W,props:y,_owner:O.current}}return I.Fragment=k,I.jsx=D,I.jsxs=D,I}var $={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Oe;function cr(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&function(){var x=Pe,h=Symbol.for("react.element"),k=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),R=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),H=Symbol.iterator,Ce="@@iterator";function we(e){if(e===null||typeof e!="object")return null;var r=H&&e[H]||e[Ce];return typeof r=="function"?r:null}var C=x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];je("error",e,t)}}function je(e,r,t){{var n=C.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var xe=!1,ke=!1,De=!1,Fe=!1,Ae=!1,Z;Z=Symbol.for("react.module.reference");function Ie(e){return!!(typeof e=="string"||typeof e=="function"||e===g||e===S||Ae||e===O||e===P||e===p||Fe||e===W||xe||ke||De||typeof e=="object"&&e!==null&&(e.$$typeof===_||e.$$typeof===y||e.$$typeof===D||e.$$typeof===R||e.$$typeof===f||e.$$typeof===Z||e.getModuleId!==void 0))}function $e(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function Q(e){return e.displayName||"Context"}function E(e){if(e==null)return null;if(typeof e.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case g:return"Fragment";case k:return"Portal";case S:return"Profiler";case O:return"StrictMode";case P:return"Suspense";case p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case R:var r=e;return Q(r)+".Consumer";case D:var t=e;return Q(t._context)+".Provider";case f:return $e(e,e.render,"ForwardRef");case y:var n=e.displayName||null;return n!==null?n:E(e.type)||"Memo";case _:{var i=e,u=i._payload,o=i._init;try{return E(o(u))}catch{return null}}}return null}var m=Object.assign,F=0,ee,re,te,ne,ae,oe,ie;function ue(){}ue.__reactDisabledLog=!0;function We(){{if(F===0){ee=console.log,re=console.info,te=console.warn,ne=console.error,ae=console.group,oe=console.groupCollapsed,ie=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ue,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}F++}}function Ye(){{if(F--,F===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:m({},e,{value:ee}),info:m({},e,{value:re}),warn:m({},e,{value:te}),error:m({},e,{value:ne}),group:m({},e,{value:ae}),groupCollapsed:m({},e,{value:oe}),groupEnd:m({},e,{value:ie})})}F<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var N=C.ReactCurrentDispatcher,q;function Y(e,r,t){{if(q===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);q=n&&n[1]||""}return`
18
- `+q+e}}var B=!1,L;{var Le=typeof WeakMap=="function"?WeakMap:Map;L=new Le}function se(e,r){if(!e||B)return"";{var t=L.get(e);if(t!==void 0)return t}var n;B=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=N.current,N.current=null,We();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(v){n=v}Reflect.construct(e,[],o)}else{try{o.call()}catch(v){n=v}e.call(o.prototype)}}else{try{throw Error()}catch(v){n=v}e()}}catch(v){if(v&&n&&typeof v.stack=="string"){for(var a=v.stack.split(`
19
- `),d=n.stack.split(`
20
- `),s=a.length-1,l=d.length-1;s>=1&&l>=0&&a[s]!==d[l];)l--;for(;s>=1&&l>=0;s--,l--)if(a[s]!==d[l]){if(s!==1||l!==1)do if(s--,l--,l<0||a[s]!==d[l]){var b=`
21
- `+a[s].replace(" at new "," at ");return e.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",e.displayName)),typeof e=="function"&&L.set(e,b),b}while(s>=1&&l>=0);break}}}finally{B=!1,N.current=u,Ye(),Error.prepareStackTrace=i}var j=e?e.displayName||e.name:"",T=j?Y(j):"";return typeof e=="function"&&L.set(e,T),T}function Me(e,r,t){return se(e,!1)}function Ve(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function M(e,r,t){if(e==null)return"";if(typeof e=="function")return se(e,Ve(e));if(typeof e=="string")return Y(e);switch(e){case P:return Y("Suspense");case p:return Y("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return Me(e.render);case y:return M(e.type,r,t);case _:{var n=e,i=n._payload,u=n._init;try{return M(u(i),r,t)}catch{}}}return""}var A=Object.prototype.hasOwnProperty,le={},fe=C.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,t=M(e.type,e._source,r?r.type:null);fe.setExtraStackFrame(t)}else fe.setExtraStackFrame(null)}function Ue(e,r,t,n,i){{var u=Function.call.bind(A);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var d=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(V(i),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof a),V(null)),a instanceof Error&&!(a.message in le)&&(le[a.message]=!0,V(i),c("Failed %s type: %s",t,a.message),V(null))}}}var Ne=Array.isArray;function J(e){return Ne(e)}function qe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Be(e){try{return ce(e),!1}catch{return!0}}function ce(e){return""+e}function de(e){if(Be(e))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qe(e)),ce(e)}var ve=C.ReactCurrentOwner,Je={key:!0,ref:!0,__self:!0,__source:!0},pe,be;function Ke(e){if(A.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ge(e){if(A.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Xe(e,r){typeof e.ref=="string"&&ve.current}function ze(e,r){{var t=function(){pe||(pe=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function He(e,r){{var t=function(){be||(be=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var Ze=function(e,r,t,n,i,u,o){var a={$$typeof:h,type:e,key:r,ref:t,props:o,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function Qe(e,r,t,n,i){{var u,o={},a=null,d=null;t!==void 0&&(de(t),a=""+t),Ge(r)&&(de(r.key),a=""+r.key),Ke(r)&&(d=r.ref,Xe(r,i));for(u in r)A.call(r,u)&&!Je.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)o[u]===void 0&&(o[u]=s[u])}if(a||d){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ze(o,l),d&&He(o,l)}return Ze(e,a,d,i,n,ve.current,o)}}var K=C.ReactCurrentOwner,ye=C.ReactDebugCurrentFrame;function w(e){if(e){var r=e._owner,t=M(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}var G;G=!1;function X(e){return typeof e=="object"&&e!==null&&e.$$typeof===h}function ge(){{if(K.current){var e=E(K.current.type);if(e)return`
22
-
23
- Check the render method of \``+e+"`."}return""}}function er(e){return""}var Ee={};function rr(e){{var r=ge();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
24
-
25
- Check the top-level render call using <`+t+">.")}return r}}function he(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=rr(r);if(Ee[t])return;Ee[t]=!0;var n="";e&&e._owner&&e._owner!==K.current&&(n=" It was passed a child from "+E(e._owner.type)+"."),w(e),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),w(null)}}function Re(e,r){{if(typeof e!="object")return;if(J(e))for(var t=0;t<e.length;t++){var n=e[t];X(n)&&he(n,r)}else if(X(e))e._store&&(e._store.validated=!0);else if(e){var i=we(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)X(o.value)&&he(o.value,r)}}}function tr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===f||r.$$typeof===y))t=r.propTypes;else return;if(t){var n=E(r);Ue(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!G){G=!0;var i=E(r);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function nr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){w(e),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),w(null);break}}e.ref!==null&&(w(e),c("Invalid attribute `ref` supplied to `React.Fragment`."),w(null))}}var _e={};function me(e,r,t,n,i,u){{var o=Ie(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var d=er();d?a+=d:a+=ge();var s;e===null?s="null":J(e)?s="array":e!==void 0&&e.$$typeof===h?(s="<"+(E(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var l=Qe(e,r,t,i,u);if(l==null)return l;if(o){var b=r.children;if(b!==void 0)if(n)if(J(b)){for(var j=0;j<b.length;j++)Re(b[j],e);Object.freeze&&Object.freeze(b)}else c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Re(b,e)}if(A.call(r,"key")){var T=E(e),v=Object.keys(r).filter(function(lr){return lr!=="key"}),z=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!_e[T+z]){var sr=v.length>0?"{"+v.join(": ..., ")+": ...}":"{}";c(`A props object containing a "key" prop is being spread into JSX:
26
- let props = %s;
27
- <%s {...props} />
28
- React keys must be passed directly to JSX without using spread:
29
- let props = %s;
30
- <%s key={someKey} {...props} />`,z,T,sr,T),_e[T+z]=!0}}return e===g?nr(l):tr(l),l}}function ar(e,r,t){return me(e,r,t,!0)}function or(e,r,t){return me(e,r,t,!1)}var ir=or,ur=ar;$.Fragment=g,$.jsx=ir,$.jsxs=ur}()),$}var Se;function dr(){return Se||(Se=1,process.env.NODE_ENV==="production"?U.exports=fr():U.exports=cr()),U.exports}var vr=dr();const pr=({primary:x=!1,size:h="medium",backgroundColor:k,label:g,...O})=>{const S=x?"storybook-button--primary":"storybook-button--secondary";return vr.jsx("button",{type:"button",className:["storybook-button",`storybook-button--${h}`,S].join(" "),style:{backgroundColor:k},...O,children:g})};exports.XsButton=pr;
@@ -1 +0,0 @@
1
- .storybook-button{display:inline-block;cursor:pointer;border:0;border-radius:3em;font-weight:700;line-height:1;font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif}.storybook-button--primary{background-color:#555ab9;color:#fff}.storybook-button--secondary{box-shadow:#00000026 0 0 0 1px inset;background-color:transparent;color:#333}.storybook-button--small{padding:10px 16px;font-size:12px}.storybook-button--medium{padding:11px 20px;font-size:14px}.storybook-button--large{padding:12px 24px;font-size:16px}