@gobolt/genesis 0.2.3 → 0.2.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/README.md +0 -1
- package/dist/_virtual/index5.cjs +1 -1
- package/dist/_virtual/index5.js +4 -4
- package/dist/_virtual/index6.cjs +1 -1
- package/dist/_virtual/index6.js +4 -4
- package/dist/components/Avatar/Avatar.cjs +1 -1
- package/dist/components/Avatar/Avatar.d.ts +7 -3
- package/dist/components/Avatar/Avatar.js +61 -30
- package/dist/components/Avatar/__stories__/Avatar.stories.d.ts +4 -2
- package/dist/components/Avatar/styles.cjs +1 -1
- package/dist/components/Avatar/styles.d.ts +12 -1
- package/dist/components/Avatar/styles.js +1 -1
- package/dist/components/Badge/styles.cjs +3 -3
- package/dist/components/Badge/styles.d.ts +8 -1
- package/dist/components/Badge/styles.js +1 -1
- package/dist/components/Breadcrumb/styles.cjs +10 -10
- package/dist/components/Breadcrumb/styles.d.ts +23 -2
- package/dist/components/Breadcrumb/styles.js +1 -1
- package/dist/components/Button/icon-button-styles.cjs +5 -5
- package/dist/components/Button/icon-button-styles.d.ts +12 -1
- package/dist/components/Button/icon-button-styles.js +5 -5
- package/dist/components/Button/styles.cjs +11 -11
- package/dist/components/Button/styles.d.ts +16 -1
- package/dist/components/Button/styles.js +14 -14
- package/dist/components/Card/styles.cjs +4 -4
- package/dist/components/Card/styles.d.ts +10 -1
- package/dist/components/Card/styles.js +1 -1
- package/dist/components/Checkbox/styles.cjs +2 -2
- package/dist/components/Checkbox/styles.d.ts +6 -1
- package/dist/components/Checkbox/styles.js +1 -1
- package/dist/components/Dashboard/styles.d.ts +8 -1
- package/dist/components/ErrorBoundary/styles.d.ts +8 -1
- package/dist/components/ErrorBoundaryFallback/styles.cjs +1 -1
- package/dist/components/ErrorBoundaryFallback/styles.d.ts +1 -1
- package/dist/components/ErrorBoundaryFallback/styles.js +1 -1
- package/dist/components/Form/styles.cjs +1 -1
- package/dist/components/Form/styles.js +1 -1
- package/dist/components/Glyph/styles.d.ts +8 -1
- package/dist/components/Input/styles.cjs +2 -2
- package/dist/components/Input/styles.d.ts +15 -1
- package/dist/components/Input/styles.js +1 -1
- package/dist/components/Layout/Content/styles.cjs +2 -2
- package/dist/components/Layout/Content/styles.d.ts +7 -1
- package/dist/components/Layout/Content/styles.js +1 -1
- package/dist/components/Layout/MainLayout/styles.d.ts +4 -4
- package/dist/components/Message/styles.cjs +4 -4
- package/dist/components/Message/styles.d.ts +9 -3
- package/dist/components/Message/styles.js +1 -1
- package/dist/components/Notification/NotificationBadge/styles.cjs +3 -3
- package/dist/components/Notification/NotificationBadge/styles.d.ts +3 -3
- package/dist/components/Notification/NotificationBadge/styles.js +1 -1
- package/dist/components/Notification/styles.cjs +7 -7
- package/dist/components/Notification/styles.d.ts +16 -5
- package/dist/components/Notification/styles.js +1 -1
- package/dist/components/Popover/styles.cjs +1 -1
- package/dist/components/Popover/styles.d.ts +13 -1
- package/dist/components/Popover/styles.js +1 -1
- package/dist/components/Progress/styles.cjs +1 -1
- package/dist/components/Progress/styles.d.ts +13 -1
- package/dist/components/Progress/styles.js +1 -1
- package/dist/components/Radio/Radio.cjs +2 -2
- package/dist/components/Radio/Radio.d.ts +4 -1
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/Row/RowActions/RowActions.cjs +1 -1
- package/dist/components/Row/RowActions/RowActions.js +9 -24
- package/dist/components/Row/RowActions/styles.cjs +2 -22
- package/dist/components/Row/RowActions/styles.d.ts +1 -2
- package/dist/components/Row/RowActions/styles.js +3 -24
- package/dist/components/Row/RowLabelValue/styles.cjs +3 -3
- package/dist/components/Row/RowLabelValue/styles.d.ts +12 -2
- package/dist/components/Row/RowLabelValue/styles.js +1 -1
- package/dist/components/Row/styles.cjs +6 -6
- package/dist/components/Row/styles.d.ts +9 -1
- package/dist/components/Row/styles.js +1 -1
- package/dist/components/SegmentedControls/styles.cjs +4 -4
- package/dist/components/SegmentedControls/styles.d.ts +9 -1
- package/dist/components/SegmentedControls/styles.js +1 -1
- package/dist/components/Select/styles.cjs +4 -4
- package/dist/components/Select/styles.d.ts +21 -4
- package/dist/components/Select/styles.js +1 -1
- package/dist/components/Switch/styles.cjs +2 -2
- package/dist/components/Switch/styles.d.ts +7 -1
- package/dist/components/Switch/styles.js +1 -1
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.cjs +1 -1
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.js +1 -1
- package/dist/components/Table/TableControls/styles.d.ts +8 -1
- package/dist/components/Table/styles.cjs +2 -2
- package/dist/components/Table/styles.js +1 -1
- package/dist/components/Tabs/styles.cjs +2 -2
- package/dist/components/Tabs/styles.d.ts +9 -1
- package/dist/components/Tabs/styles.js +1 -1
- package/dist/components/Tile/styles.cjs +4 -4
- package/dist/components/Tile/styles.d.ts +7 -1
- package/dist/components/Tile/styles.js +1 -1
- package/dist/components/Toast/styles.cjs +5 -5
- package/dist/components/Toast/styles.d.ts +9 -3
- package/dist/components/Toast/styles.js +1 -1
- package/dist/components/Tooltip/styles.cjs +2 -2
- package/dist/components/Tooltip/styles.d.ts +14 -1
- package/dist/components/Tooltip/styles.js +1 -1
- package/dist/components/Typography/styles.cjs +12 -12
- package/dist/components/Typography/styles.d.ts +21 -3
- package/dist/components/Typography/styles.js +1 -1
- package/dist/genesis/styles.d.ts +11 -2
- package/dist/node_modules/antd/es/typography/hooks/useCopyClick.cjs +1 -1
- package/dist/node_modules/antd/es/typography/hooks/useCopyClick.js +1 -1
- package/dist/styles/global-styles.d.ts +1 -1
- package/dist/utils/styled.cjs +1 -1
- package/dist/utils/styled.d.ts +5 -6
- package/dist/utils/styled.js +6 -20
- package/dist/utils/user-util.cjs +1 -0
- package/dist/utils/user-util.d.ts +2 -0
- package/dist/utils/user-util.js +10 -0
- package/package.json +1 -6
- package/dist/components/Button/Button.native.d.ts +0 -12
- package/dist/components/Button/__stories__/Button.native.stories.d.ts +0 -8
- package/dist/components/Button/styles.native.d.ts +0 -2
package/README.md
CHANGED
|
@@ -17,7 +17,6 @@ It unifies frontend app development around these core libraries:
|
|
|
17
17
|
- [Typescript](https://www.typescriptlang.org/) v5
|
|
18
18
|
- [React](https://react.dev/) v18
|
|
19
19
|
|
|
20
|
-
This library is intended to be universally imported into both React & React-Native apps.
|
|
21
20
|
|
|
22
21
|
## 📦 Development
|
|
23
22
|
|
package/dist/_virtual/index5.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=require("./_commonjsHelpers.cjs"),e=require("../node_modules/copy-to-clipboard/index.cjs");var o=e.__require();const s=r.getDefaultExportFromCjs(o);module.exports=s;
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as r } from "../node_modules/
|
|
3
|
-
var
|
|
4
|
-
const a = /* @__PURE__ */
|
|
1
|
+
import { getDefaultExportFromCjs as o } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as r } from "../node_modules/copy-to-clipboard/index.js";
|
|
3
|
+
var p = r();
|
|
4
|
+
const a = /* @__PURE__ */ o(p);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
package/dist/_virtual/index6.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const e=require("./_commonjsHelpers.cjs"),r=require("../node_modules/debounce/index.cjs");var o=r.__require();const s=e.getDefaultExportFromCjs(o);module.exports=s;
|
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as r } from "../node_modules/
|
|
3
|
-
var
|
|
4
|
-
const a = /* @__PURE__ */ o
|
|
1
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as r } from "../node_modules/debounce/index.js";
|
|
3
|
+
var o = /* @__PURE__ */ r();
|
|
4
|
+
const a = /* @__PURE__ */ e(o);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),n=require("./styles.cjs"),m=require("../../utils/user-util.cjs"),s=require("../Typography/Typography.cjs"),o=a=>a.includes("[")&&a.includes("]")?a.split("]")[1].trim():a,y=({size:a=48,shape:l="circle",children:c,backgroundColor:r="#00282B",user:t=null})=>{if(console.log("Avatar",t),!t)return i.jsx(n.Avatar,{"data-testid":"avatar",shape:l,size:a,alt:"Default Avatar",style:{backgroundColor:r}});const e=`${o(t.first_name)} ${t.last_name}`;if(t&&!(t!=null&&t.image_url)){const v={first_name:o(t.first_name),last_name:t.last_name},d=m.createInitials(v);return i.jsx(n.Avatar,{"data-testid":"avatar",shape:l,size:a,alt:e,style:{backgroundColor:r},children:i.jsx(s,{variant:"body2",color:"white",style:{fontWeight:600},children:d})})}return typeof c=="string"?i.jsx(n.Avatar,{"data-testid":"avatar",shape:l,size:a,src:t==null?void 0:t.image_url,alt:e,style:{backgroundColor:r},children:i.jsx(s,{variant:"body2",color:"white",style:{fontWeight:600},children:c})}):i.jsx(n.Avatar,{"data-testid":"avatar",shape:l,size:a,src:t==null?void 0:t.image_url,alt:e})};module.exports=y;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
export type GoBoltUser = {
|
|
3
|
+
first_name: string;
|
|
4
|
+
last_name: string;
|
|
5
|
+
image_url?: string;
|
|
6
|
+
};
|
|
2
7
|
export interface AvatarProps {
|
|
3
8
|
size?: number;
|
|
4
9
|
icon?: React.ReactNode;
|
|
5
10
|
shape?: "circle" | "square";
|
|
6
|
-
imageUrl?: string;
|
|
7
|
-
altText?: string;
|
|
8
11
|
children?: string;
|
|
9
12
|
backgroundColor?: string;
|
|
13
|
+
user?: GoBoltUser;
|
|
10
14
|
}
|
|
11
|
-
declare const Avatar: ({ size, shape,
|
|
15
|
+
declare const Avatar: ({ size, shape, children, backgroundColor, user, }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
16
|
export default Avatar;
|
|
@@ -1,34 +1,65 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Avatar as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar as n } from "./styles.js";
|
|
3
|
+
import { createInitials as v } from "../../utils/user-util.js";
|
|
3
4
|
import c from "../Typography/Typography.js";
|
|
4
|
-
const
|
|
5
|
-
size:
|
|
6
|
-
shape:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
const e = (a) => a.includes("[") && a.includes("]") ? a.split("]")[1].trim() : a, s = ({
|
|
6
|
+
size: a = 48,
|
|
7
|
+
shape: l = "circle",
|
|
8
|
+
children: m,
|
|
9
|
+
backgroundColor: r = "#00282B",
|
|
10
|
+
user: t = null
|
|
11
|
+
}) => {
|
|
12
|
+
if (console.log("Avatar", t), !t)
|
|
13
|
+
return /* @__PURE__ */ i(
|
|
14
|
+
n,
|
|
15
|
+
{
|
|
16
|
+
"data-testid": "avatar",
|
|
17
|
+
shape: l,
|
|
18
|
+
size: a,
|
|
19
|
+
alt: "Default Avatar",
|
|
20
|
+
style: { backgroundColor: r }
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
const o = `${e(t.first_name)} ${t.last_name}`;
|
|
24
|
+
if (t && !(t != null && t.image_url)) {
|
|
25
|
+
const f = {
|
|
26
|
+
first_name: e(t.first_name),
|
|
27
|
+
last_name: t.last_name
|
|
28
|
+
}, d = v(f);
|
|
29
|
+
return /* @__PURE__ */ i(
|
|
30
|
+
n,
|
|
31
|
+
{
|
|
32
|
+
"data-testid": "avatar",
|
|
33
|
+
shape: l,
|
|
34
|
+
size: a,
|
|
35
|
+
alt: o,
|
|
36
|
+
style: { backgroundColor: r },
|
|
37
|
+
children: /* @__PURE__ */ i(c, { variant: "body2", color: "white", style: { fontWeight: 600 }, children: d })
|
|
38
|
+
}
|
|
39
|
+
);
|
|
21
40
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
)
|
|
41
|
+
return typeof m == "string" ? /* @__PURE__ */ i(
|
|
42
|
+
n,
|
|
43
|
+
{
|
|
44
|
+
"data-testid": "avatar",
|
|
45
|
+
shape: l,
|
|
46
|
+
size: a,
|
|
47
|
+
src: t == null ? void 0 : t.image_url,
|
|
48
|
+
alt: o,
|
|
49
|
+
style: { backgroundColor: r },
|
|
50
|
+
children: /* @__PURE__ */ i(c, { variant: "body2", color: "white", style: { fontWeight: 600 }, children: m })
|
|
51
|
+
}
|
|
52
|
+
) : /* @__PURE__ */ i(
|
|
53
|
+
n,
|
|
54
|
+
{
|
|
55
|
+
"data-testid": "avatar",
|
|
56
|
+
shape: l,
|
|
57
|
+
size: a,
|
|
58
|
+
src: t == null ? void 0 : t.image_url,
|
|
59
|
+
alt: o
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
};
|
|
32
63
|
export {
|
|
33
|
-
|
|
64
|
+
s as default
|
|
34
65
|
};
|
|
@@ -3,5 +3,7 @@ import { default as Avatar } from '../Avatar';
|
|
|
3
3
|
declare const meta: Meta<typeof Avatar>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Avatar>;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
6
|
+
export declare const UserWithImage: Story;
|
|
7
|
+
export declare const SimpleFirstNameUserNoImage: Story;
|
|
8
|
+
export declare const UserWithComplexNameNoImage: Story;
|
|
9
|
+
export declare const UndefinedUser: Story;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("styled-components"),a=require("../../node_modules/antd/es/avatar/index.cjs"),r=({colors:e,borderRadius:t,sizing:s},o="primary",c="active")=>"",n=i(a)`
|
|
2
2
|
${({theme:e,type:t,state:s})=>r(e,t,s)}
|
|
3
3
|
`;exports.Avatar=n;exports.getGenesisClass=r;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
+
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
2
|
+
interface StyledAvatarProps {
|
|
3
|
+
theme?: GenesisTheme;
|
|
4
|
+
type?: "primary" | "secondary";
|
|
5
|
+
state?: "active" | "disabled";
|
|
6
|
+
}
|
|
1
7
|
export declare const getGenesisClass: ({ colors, borderRadius, sizing }: {
|
|
2
8
|
colors: any;
|
|
3
9
|
borderRadius: any;
|
|
4
10
|
sizing: any;
|
|
5
11
|
}, type?: string, state?: string) => string;
|
|
6
|
-
export declare const Avatar:
|
|
12
|
+
export declare const Avatar: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<import('antd').AvatarProps & import('react').RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
13
|
+
ref?: import('react').Ref<HTMLSpanElement>;
|
|
14
|
+
}, StyledAvatarProps>> & string & Omit<import('react').ForwardRefExoticComponent<import('antd').AvatarProps & import('react').RefAttributes<HTMLSpanElement>> & {
|
|
15
|
+
Group: import('react').FC<import('antd/es/avatar/AvatarGroup').AvatarGroupProps>;
|
|
16
|
+
}, keyof import('react').Component<any, {}, any>>;
|
|
17
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "styled-components";
|
|
2
2
|
import o from "../../node_modules/antd/es/avatar/index.js";
|
|
3
3
|
const a = ({ colors: r, borderRadius: t, sizing: s }, i = "primary", m = "active") => "", c = e(o)`
|
|
4
4
|
${({ theme: r, type: t, state: s }) => a(r, t, s)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("styled-components"),e=(o,r)=>r==="hollow"?o.colors.inputs.surface.border:o.colors.status[r].surface,n=(o,r,d,s)=>`
|
|
2
2
|
display: flex;
|
|
3
3
|
gap: 4px;
|
|
4
4
|
justify-content: center;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
padding-left: ${o.components.badge["left-padding"]}px;
|
|
10
10
|
padding-right: ${o.components.badge["right-padding"]}px;
|
|
11
11
|
border-radius: ${o.components.badge.radius}px;
|
|
12
|
-
border: 1px solid ${
|
|
12
|
+
border: 1px solid ${e(o,r)};
|
|
13
13
|
background-color: ${o.colors.status[r].surface};
|
|
14
14
|
|
|
15
15
|
&:not(:disabled):hover {
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
cursor: not-allowed;
|
|
27
27
|
}
|
|
28
28
|
`:""}
|
|
29
|
-
`,t=
|
|
29
|
+
`,t=a.div`
|
|
30
30
|
${({theme:o,state:r,label:d,disabled:s})=>n(o,r,d,s)}
|
|
31
31
|
`;exports.Badge=t;exports.getGenesisClass=n;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
2
2
|
import { State } from './Badge';
|
|
3
|
+
interface StyledBadgeProps {
|
|
4
|
+
theme?: GenesisTheme;
|
|
5
|
+
state?: State;
|
|
6
|
+
label?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
3
9
|
export declare const getGenesisClass: (theme: GenesisTheme, state: State, label?: string, disabled?: boolean) => string;
|
|
4
|
-
export declare const Badge:
|
|
10
|
+
export declare const Badge: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledBadgeProps>> & string;
|
|
11
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("styled-components"),i=require("../../node_modules/antd/es/breadcrumb/Breadcrumb.cjs"),a=({colors:n,typography:e},o="wide")=>`
|
|
2
2
|
&.ant-breadcrumb {
|
|
3
|
-
font-size: ${
|
|
3
|
+
font-size: ${e[o].body1.fontSize};
|
|
4
4
|
|
|
5
5
|
.ant-breadcrumb-link,
|
|
6
6
|
span[class*="ant-breadcrumb-link"] > a {
|
|
7
|
-
color: ${
|
|
7
|
+
color: ${n.interactive.link.active};
|
|
8
8
|
transition: color 0.2s ease-in-out;
|
|
9
9
|
text-decoration: underline;
|
|
10
10
|
background: none !important;
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
span[class*="ant-breadcrumb-link"] > span,
|
|
17
17
|
span[class*="ant-breadcrumb-link"] > a {
|
|
18
18
|
text-decoration: none !important;
|
|
19
|
-
color: ${
|
|
19
|
+
color: ${n.onsurface["copy-light"]} !important;
|
|
20
20
|
cursor: default !important;
|
|
21
21
|
pointer-events: none;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.ant-breadcrumb-separator {
|
|
26
|
-
color: ${
|
|
26
|
+
color: ${n.interactive.link.active};
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.ant-dropdown-menu-item,
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
background: none !important;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
`,s=r.
|
|
47
|
-
${({$isDisabled:
|
|
46
|
+
`,s=r.div`
|
|
47
|
+
${({$isDisabled:n})=>n&&`
|
|
48
48
|
cursor: not-allowed;
|
|
49
49
|
.ant-breadcrumb {
|
|
50
50
|
pointer-events: none;
|
|
51
51
|
opacity: 0.5;
|
|
52
52
|
}
|
|
53
53
|
`}
|
|
54
|
-
opacity: ${({$isDisabled:
|
|
55
|
-
`,t=r
|
|
56
|
-
${({theme:
|
|
54
|
+
opacity: ${({$isDisabled:n})=>n?.5:1};
|
|
55
|
+
`,t=r(i)`
|
|
56
|
+
${({theme:n,breakpoint:e})=>n&&a(n,e)}
|
|
57
57
|
`;exports.Breadcrumb=t;exports.BreadcrumbWrapper=s;exports.default=t;exports.getGenesisClass=a;
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
2
|
+
interface StyledBreadcrumbProps {
|
|
3
|
+
theme?: GenesisTheme;
|
|
4
|
+
$isDisabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface StyledBreadcrumbComponentProps extends StyledBreadcrumbProps {
|
|
7
|
+
type?: string;
|
|
8
|
+
state?: string;
|
|
9
|
+
breakpoint?: string;
|
|
10
|
+
role?: string;
|
|
11
|
+
}
|
|
2
12
|
export declare const getGenesisClass: ({ colors, typography }: GenesisTheme, breakpoint?: string) => string;
|
|
3
|
-
export declare const BreadcrumbWrapper:
|
|
4
|
-
export declare const Breadcrumb:
|
|
13
|
+
export declare const BreadcrumbWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledBreadcrumbProps>> & string;
|
|
14
|
+
export declare const Breadcrumb: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('antd').BreadcrumbProps<import('antd/es/_util/type').AnyObject>, StyledBreadcrumbComponentProps>> & string & Omit<{
|
|
15
|
+
<T extends import('antd/es/_util/type').AnyObject = import('antd/es/_util/type').AnyObject>(props: import('antd').BreadcrumbProps<T>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
16
|
+
Item: React.FC<import('antd').BreadcrumbItemProps> & {
|
|
17
|
+
__ANT_BREADCRUMB_ITEM: boolean;
|
|
18
|
+
};
|
|
19
|
+
Separator: React.FC<{
|
|
20
|
+
children?: React.ReactNode | undefined;
|
|
21
|
+
}> & {
|
|
22
|
+
__ANT_BREADCRUMB_SEPARATOR: boolean;
|
|
23
|
+
};
|
|
24
|
+
displayName: string;
|
|
25
|
+
}, keyof import('react').Component<any, {}, any>>;
|
|
5
26
|
export default Breadcrumb;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("styled-components"),e=(o,d)=>o==="small"?`${d.Size1}px ${d.Size1}px`:`${d.Size2}px ${d.Size2}px`,b=({colors:o,sizing:d,borderRadius:n,components:t},r,a,i,l)=>`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
letter-spacing: 0;
|
|
10
10
|
font-weight: 400;
|
|
11
11
|
border-width: 1px;
|
|
12
|
-
|
|
12
|
+
cursor: pointer;
|
|
13
13
|
width: auto; !important;
|
|
14
14
|
height: auto; !important;
|
|
15
15
|
|
|
16
|
-
background-color:${
|
|
17
|
-
padding: ${e(
|
|
16
|
+
background-color:${l?o[r].hover.backgroundColor:o[r][a].backgroundColor};
|
|
17
|
+
padding: ${e(i,d)};
|
|
18
18
|
|
|
19
19
|
box-shadow: ${r==="utility"?"0px 1px 2px 0px #00000026":"none"};
|
|
20
20
|
|
|
@@ -56,6 +56,6 @@
|
|
|
56
56
|
`,c=(o,d,n,t,r)=>`
|
|
57
57
|
font-family: 'Inter', sans-serif;
|
|
58
58
|
${b(o,d,n,t,r)}
|
|
59
|
-
`,s=u.
|
|
59
|
+
`,s=u.button`
|
|
60
60
|
${({theme:o,$themeType:d,$state:n,size:t,$isSelected:r})=>c(o,d,n,t,r)}
|
|
61
61
|
`;exports.Button=s;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
2
|
+
interface StyledIconButtonProps {
|
|
3
|
+
theme?: GenesisTheme;
|
|
4
|
+
$themeType?: "primary" | "secondary" | "tertiary" | "utility" | "icon";
|
|
5
|
+
$state?: "active" | "hover" | "pressed" | "focus" | "disabled" | "selected";
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
$isIconButton?: boolean;
|
|
8
|
+
$isSelected?: boolean;
|
|
9
|
+
size?: "small" | "normal" | "large";
|
|
10
|
+
}
|
|
11
|
+
export declare const Button: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, StyledIconButtonProps>> & string;
|
|
12
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
const b = (o, d) => o === "small" ? `${d.Size1}px ${d.Size1}px` : `${d.Size2}px ${d.Size2}px`, c = ({ colors: o, sizing: d, borderRadius: n, components: a }, r, i,
|
|
1
|
+
import u from "styled-components";
|
|
2
|
+
const b = (o, d) => o === "small" ? `${d.Size1}px ${d.Size1}px` : `${d.Size2}px ${d.Size2}px`, c = ({ colors: o, sizing: d, borderRadius: n, components: a }, r, i, t, l) => `
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
justify-content: center;
|
|
@@ -10,12 +10,12 @@ const b = (o, d) => o === "small" ? `${d.Size1}px ${d.Size1}px` : `${d.Size2}px
|
|
|
10
10
|
letter-spacing: 0;
|
|
11
11
|
font-weight: 400;
|
|
12
12
|
border-width: 1px;
|
|
13
|
-
|
|
13
|
+
cursor: pointer;
|
|
14
14
|
width: auto; !important;
|
|
15
15
|
height: auto; !important;
|
|
16
16
|
|
|
17
|
-
background-color:${
|
|
18
|
-
padding: ${b(
|
|
17
|
+
background-color:${l ? o[r].hover.backgroundColor : o[r][i].backgroundColor};
|
|
18
|
+
padding: ${b(t, d)};
|
|
19
19
|
|
|
20
20
|
box-shadow: ${r === "utility" ? "0px 1px 2px 0px #00000026" : "none"};
|
|
21
21
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("styled-components"),e=require("../../node_modules/antd/es/button/button.cjs"),i=(r,l,d,n)=>n&&(r==="normal"||r==="large")?`${d.Size2}px ${d.Size2}px`:n&&r==="small"?`${d.Size1}px ${d.Size1}px`:l==="utility"&&r==="small"?`${d.Size1_5}px ${d.Size2}px`:l==="utility"&&(r==="normal"||r==="large")?`${d.Size2_5}px ${d.Size3}px`:r==="small"?`${d.Size1_5}px ${d.Size4}px`:r==="normal"||r==="large"?`${d.Size2_5}px ${d.Size6}px`:`${d.Size2}px ${d.Size2}px`,c=r=>r==="normal"||r==="large"?"40px":r==="small"?"32px":"40px",x=({colors:r,sizing:l,borderRadius:d,components:n},o,a,t,u)=>(r[o][a].backgroundColor,`
|
|
2
2
|
&.ant-btn {
|
|
3
3
|
|
|
4
|
-
color: ${r[o][
|
|
4
|
+
color: ${r[o][a].color};
|
|
5
5
|
font-size: ${l.Size4}px;
|
|
6
6
|
line-height: ${l.Size6}px;
|
|
7
7
|
letter-spacing: 0;
|
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
line-height: 1 !important;
|
|
11
11
|
|
|
12
12
|
width: auto; !important;
|
|
13
|
-
height:
|
|
13
|
+
height: ${c(t)}; !important;
|
|
14
14
|
|
|
15
|
-
background-color: ${r[o][
|
|
15
|
+
background-color: ${r[o][a].backgroundColor};
|
|
16
16
|
padding: ${i(t,o,l,u)};
|
|
17
17
|
|
|
18
18
|
box-shadow: ${o==="utility"?"0px 1px 2px 0px #00000026":"none"};
|
|
19
19
|
|
|
20
20
|
border-radius: ${d.BorderRadiusMd}px;
|
|
21
|
-
gap: ${
|
|
21
|
+
gap: ${n.button.gap}px;
|
|
22
22
|
border-style: solid;
|
|
23
|
-
border-color: ${r[o][
|
|
23
|
+
border-color: ${r[o][a].borderColor};
|
|
24
24
|
|
|
25
25
|
transition: all 0.2s ease-in-out;
|
|
26
26
|
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
`),
|
|
58
|
+
`),f=(r,l,d,n,o)=>`
|
|
59
59
|
&.ant-btn {
|
|
60
60
|
font-family: 'Inter', sans-serif;
|
|
61
61
|
|
|
62
|
-
${
|
|
62
|
+
${x(r,l,d,o,n)}
|
|
63
63
|
}
|
|
64
|
-
`,
|
|
65
|
-
${({theme:r,$themeType:l,$state:d,children:
|
|
66
|
-
`;exports.Button=
|
|
64
|
+
`,p=b(e)`
|
|
65
|
+
${({theme:r,$themeType:l,$state:d,children:n,$isIconButton:o,size:a})=>f(r,l,d,o,a)}
|
|
66
|
+
`;exports.Button=p;
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { ButtonProps as AntButtonProps } from 'antd/es/button';
|
|
2
|
+
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
3
|
+
interface StyledButtonProps extends Omit<AntButtonProps, "type" | "size"> {
|
|
4
|
+
theme?: GenesisTheme;
|
|
5
|
+
$themeType?: "primary" | "secondary" | "tertiary" | "utility" | "icon";
|
|
6
|
+
$state?: "active" | "hover" | "pressed" | "focus" | "disabled" | "selected";
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
$isIconButton?: boolean;
|
|
9
|
+
size?: "small" | "normal" | "large";
|
|
10
|
+
}
|
|
11
|
+
export declare const Button: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<AntButtonProps & import('react').RefAttributes<HTMLAnchorElement | HTMLButtonElement>, "ref"> & {
|
|
12
|
+
ref?: import('react').Ref<HTMLAnchorElement | HTMLButtonElement>;
|
|
13
|
+
}, StyledButtonProps>> & string & Omit<import('react').ForwardRefExoticComponent<AntButtonProps & import('react').RefAttributes<HTMLAnchorElement | HTMLButtonElement>> & {
|
|
14
|
+
Group: import('react').FC<import('antd/es/button').ButtonGroupProps>;
|
|
15
|
+
}, keyof import('react').Component<any, {}, any>>;
|
|
16
|
+
export {};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import b from "styled-components";
|
|
2
|
+
import x from "../../node_modules/antd/es/button/button.js";
|
|
3
|
+
const i = (r, l, d, a) => a && (r === "normal" || r === "large") ? `${d.Size2}px ${d.Size2}px` : a && r === "small" ? `${d.Size1}px ${d.Size1}px` : l === "utility" && r === "small" ? `${d.Size1_5}px ${d.Size2}px` : l === "utility" && (r === "normal" || r === "large") ? `${d.Size2_5}px ${d.Size3}px` : r === "small" ? `${d.Size1_5}px ${d.Size4}px` : r === "normal" || r === "large" ? `${d.Size2_5}px ${d.Size6}px` : `${d.Size2}px ${d.Size2}px`, c = (r) => r === "normal" || r === "large" ? "40px" : r === "small" ? "32px" : "40px", e = ({ colors: r, sizing: l, borderRadius: d, components: a }, o, n, t, u) => (r[o][n].backgroundColor, `
|
|
4
4
|
&.ant-btn {
|
|
5
5
|
|
|
6
6
|
color: ${r[o][n].color};
|
|
7
|
-
font-size: ${
|
|
8
|
-
line-height: ${
|
|
7
|
+
font-size: ${l.Size4}px;
|
|
8
|
+
line-height: ${l.Size6}px;
|
|
9
9
|
letter-spacing: 0;
|
|
10
10
|
font-weight: 400;
|
|
11
11
|
border-width: 1px;
|
|
12
12
|
line-height: 1 !important;
|
|
13
13
|
|
|
14
14
|
width: auto; !important;
|
|
15
|
-
height:
|
|
15
|
+
height: ${c(t)}; !important;
|
|
16
16
|
|
|
17
17
|
background-color: ${r[o][n].backgroundColor};
|
|
18
|
-
padding: ${
|
|
18
|
+
padding: ${i(t, o, l, u)};
|
|
19
19
|
|
|
20
20
|
box-shadow: ${o === "utility" ? "0px 1px 2px 0px #00000026" : "none"};
|
|
21
21
|
|
|
22
22
|
border-radius: ${d.BorderRadiusMd}px;
|
|
23
|
-
gap: ${
|
|
23
|
+
gap: ${a.button.gap}px;
|
|
24
24
|
border-style: solid;
|
|
25
25
|
border-color: ${r[o][n].borderColor};
|
|
26
26
|
|
|
@@ -57,21 +57,21 @@ const x = (r, a, d, l) => l && (r === "normal" || r === "large") ? `${d.Size2}px
|
|
|
57
57
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
`),
|
|
60
|
+
`), f = (r, l, d, a, o) => `
|
|
61
61
|
&.ant-btn {
|
|
62
62
|
font-family: 'Inter', sans-serif;
|
|
63
63
|
|
|
64
|
-
${
|
|
64
|
+
${e(r, l, d, o, a)}
|
|
65
65
|
}
|
|
66
|
-
`,
|
|
67
|
-
${({ theme: r, $themeType:
|
|
66
|
+
`, S = b(x)`
|
|
67
|
+
${({ theme: r, $themeType: l, $state: d, children: a, $isIconButton: o, size: n }) => f(
|
|
68
68
|
r,
|
|
69
|
-
|
|
69
|
+
l,
|
|
70
70
|
d,
|
|
71
71
|
o,
|
|
72
72
|
n
|
|
73
73
|
)}
|
|
74
74
|
`;
|
|
75
75
|
export {
|
|
76
|
-
|
|
76
|
+
S as Button
|
|
77
77
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("styled-components"),a=require("../../node_modules/antd/es/card/index.cjs"),t=({colors:e,borderRadius:s,sizing:r},o="primary",c="active")=>`
|
|
2
2
|
.class-name-here {
|
|
3
3
|
}
|
|
4
|
-
`,n=i
|
|
5
|
-
${({theme:e,type:s,state:
|
|
6
|
-
`;exports.Card=n;exports.getGenesisClass=
|
|
4
|
+
`,n=i(a)`
|
|
5
|
+
${({theme:e,type:s,state:r})=>t(e,s,r)}
|
|
6
|
+
`;exports.Card=n;exports.getGenesisClass=t;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
2
|
+
interface StyledCardProps {
|
|
3
|
+
theme?: GenesisTheme;
|
|
4
|
+
type?: "primary" | "secondary";
|
|
5
|
+
state?: "active" | "disabled";
|
|
6
|
+
}
|
|
1
7
|
export declare const getGenesisClass: ({ colors, borderRadius, sizing }: {
|
|
2
8
|
colors: any;
|
|
3
9
|
borderRadius: any;
|
|
4
10
|
sizing: any;
|
|
5
11
|
}, type?: string, state?: string) => string;
|
|
6
|
-
export declare const Card:
|
|
12
|
+
export declare const Card: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<import('antd').CardProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
|
|
13
|
+
ref?: import('react').Ref<HTMLDivElement>;
|
|
14
|
+
}, StyledCardProps>> & string & Omit<import('antd/es/card').CardInterface, keyof import('react').Component<any, {}, any>>;
|
|
15
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("styled-components"),b=require("../../node_modules/antd/es/checkbox/index.cjs"),r=({colors:e,borderRadius:c},o="primary",n="active")=>`
|
|
2
2
|
.ant-checkbox-inner {
|
|
3
3
|
background-color: #FFFFFF;
|
|
4
4
|
border-color: #9A9A9A;
|
|
@@ -137,6 +137,6 @@
|
|
|
137
137
|
border-color: #9A9A9A;
|
|
138
138
|
transition: box-shadow 0.2s ease-in-out;
|
|
139
139
|
}
|
|
140
|
-
`,t=a
|
|
140
|
+
`,t=a(b)`
|
|
141
141
|
${({theme:e,type:c,state:o})=>r(e,c,o)}
|
|
142
142
|
`;exports.StyledCheckbox=t;exports.getGenesisClass=r;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CheckboxProps } from './Checkbox';
|
|
1
2
|
import { GenesisTheme } from '../../styles/theme/genesis-theme.types';
|
|
2
3
|
declare module "styled-components" {
|
|
3
4
|
interface DefaultTheme extends GenesisTheme {
|
|
@@ -7,4 +8,8 @@ export declare const getGenesisClass: ({ colors, borderRadius }: {
|
|
|
7
8
|
colors: any;
|
|
8
9
|
borderRadius: any;
|
|
9
10
|
}, type?: string, state?: string) => string;
|
|
10
|
-
export declare const StyledCheckbox:
|
|
11
|
+
export declare const StyledCheckbox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<import('antd').CheckboxProps & import('react').RefAttributes<import('rc-checkbox').CheckboxRef>, "ref"> & {
|
|
12
|
+
ref?: import('react').Ref<import('rc-checkbox').CheckboxRef>;
|
|
13
|
+
}, CheckboxProps>> & string & Omit<import('react').ForwardRefExoticComponent<import('antd').CheckboxProps & import('react').RefAttributes<import('rc-checkbox').CheckboxRef>> & {
|
|
14
|
+
Group: <T = any>(props: import('antd/es/checkbox').CheckboxGroupProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement;
|
|
15
|
+
}, keyof import('react').Component<any, {}, any>>;
|