@gobolt/genesis 0.2.7 → 0.2.9
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/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +2 -3
- package/dist/components/DatePicker/DatePicker.js +16 -3
- package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +16 -3
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/styles.cjs +44 -28
- package/dist/components/Select/styles.d.ts +6 -0
- package/dist/components/Select/styles.js +52 -32
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),t=require("../../providers/useGenesis.cjs"),i=require("../../node_modules/antd/es/date-picker/index.cjs"),n=e=>{const{theme:s}=t.useGenesis();return r.jsx(i,{...e,style:{border:`1px solid ${s.colors.inputs.surface.border}`}})};module.exports=n;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DatePickerProps as AntDatePickerProps } from 'antd';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
declare const DatePicker: import('antd/es/date-picker').DatePickerType;
|
|
2
|
+
export type DatePickerProps = AntDatePickerProps;
|
|
3
|
+
declare const DatePicker: (props: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
4
|
export default DatePicker;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useGenesis as t } from "../../providers/useGenesis.js";
|
|
3
|
+
import s from "../../node_modules/antd/es/date-picker/index.js";
|
|
4
|
+
const p = (r) => {
|
|
5
|
+
const { theme: e } = t();
|
|
6
|
+
return /* @__PURE__ */ o(
|
|
7
|
+
s,
|
|
8
|
+
{
|
|
9
|
+
...r,
|
|
10
|
+
style: {
|
|
11
|
+
border: `1px solid ${e.colors.inputs.surface.border}`
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
};
|
|
3
16
|
export {
|
|
4
|
-
|
|
17
|
+
p as default
|
|
5
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),t=require("../../providers/useGenesis.cjs"),n=require("../../node_modules/antd/es/date-picker/index.cjs"),{RangePicker:i}=n,o=e=>{const{theme:s}=t.useGenesis();return r.jsx(i,{...e,style:{border:`1px solid ${s.colors.inputs.surface.border}`}})};module.exports=o;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RangePickerProps } from 'antd/es/date-picker';
|
|
2
2
|
export type DateRangePickerProps = RangePickerProps;
|
|
3
|
-
declare const DateRangerPicker:
|
|
3
|
+
declare const DateRangerPicker: (props: DateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default DateRangerPicker;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useGenesis as o } from "../../providers/useGenesis.js";
|
|
3
|
+
import s from "../../node_modules/antd/es/date-picker/index.js";
|
|
4
|
+
const { RangePicker: n } = s, m = (e) => {
|
|
5
|
+
const { theme: r } = o();
|
|
6
|
+
return /* @__PURE__ */ t(
|
|
7
|
+
n,
|
|
8
|
+
{
|
|
9
|
+
...e,
|
|
10
|
+
style: {
|
|
11
|
+
border: `1px solid ${r.colors.inputs.surface.border}`
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
};
|
|
3
16
|
export {
|
|
4
|
-
|
|
17
|
+
m as default
|
|
5
18
|
};
|
|
@@ -10,7 +10,7 @@ export interface SelectProps extends Omit<AntSelectProps, "variant"> {
|
|
|
10
10
|
}[];
|
|
11
11
|
variant?: "simple" | "none";
|
|
12
12
|
defaultValue?: string | string[] | number | number[] | unknown;
|
|
13
|
-
onChange?: (value: string) => void;
|
|
13
|
+
onChange?: (value: string | string[]) => void;
|
|
14
14
|
}
|
|
15
15
|
declare const Select: ({ type, state, variant, defaultValue, onChange, ...rest }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export default Select;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("styled-components"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("styled-components"),b=require("../../node_modules/antd/es/select/index.cjs"),h=a.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
border: 2px solid transparent;
|
|
4
4
|
background-color: transparent;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
padding: 1px;
|
|
7
7
|
width: auto;
|
|
8
8
|
|
|
9
|
-
${({$isFocused:e,theme:
|
|
10
|
-
border: 2px solid ${
|
|
9
|
+
${({$isFocused:e,theme:t,type:o="primary"})=>e&&`
|
|
10
|
+
border: 2px solid ${t.colors[o].focussed.ringColor};
|
|
11
11
|
background-color: transparent;
|
|
12
12
|
border-radius: 8px;
|
|
13
13
|
padding: 1px;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
.ant-select-dropdown {
|
|
17
17
|
animation-duration: ${({theme:e})=>`${e.motion.veryfast}s`} !important;
|
|
18
18
|
}
|
|
19
|
-
`,
|
|
19
|
+
`,f=e=>`all ${e.motion.veryfast}s ease-in-out`,$=(e,t,o,r)=>`
|
|
20
20
|
&.ant-select {
|
|
21
21
|
background-color: ${e.surface.secondary};
|
|
22
22
|
border-color: ${e.surface.secondary};
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
.ant-select-selector {
|
|
26
26
|
background-color: ${e.surface.secondary};
|
|
27
27
|
border-color: ${e.surface.secondary};
|
|
28
|
-
border-radius: ${
|
|
28
|
+
border-radius: ${r.BorderRadiusSm}px;
|
|
29
29
|
margin: 0px;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`,m=({colors:e,sizing:t,typography:o,borderRadius:r},n,i,g)=>{var s,d,c,l,p,u;return g==="simple"?$(e,n,i,r):`
|
|
33
33
|
&.ant-select {
|
|
34
|
-
|
|
35
|
-
font-size: ${
|
|
36
|
-
line-height: ${
|
|
34
|
+
|
|
35
|
+
font-size: ${t.Size4}px;
|
|
36
|
+
line-height: ${t.Size6}px;
|
|
37
37
|
letter-spacing: 0;
|
|
38
38
|
font-weight: 400;
|
|
39
39
|
border-width: 1px;
|
|
@@ -43,26 +43,42 @@
|
|
|
43
43
|
height: auto;
|
|
44
44
|
min-height: 32px;
|
|
45
45
|
|
|
46
|
-
background-color: ${e[n][i].backgroundColor}
|
|
46
|
+
background-color: ${((d=(s=e==null?void 0:e[n])==null?void 0:s[i])==null?void 0:d.backgroundColor)??"#fff"}
|
|
47
47
|
|
|
48
|
-
border-radius: ${
|
|
49
|
-
gap: ${
|
|
48
|
+
border-radius: ${r.BorderRadiusMd}px;
|
|
49
|
+
gap: ${t.Size2}px;
|
|
50
50
|
|
|
51
51
|
.ant-select-selector {
|
|
52
52
|
border-color: ${e.inputs.surface.border};
|
|
53
53
|
padding-left: 4px;
|
|
54
54
|
height: auto !important;
|
|
55
55
|
min-height: 32px !important;
|
|
56
|
+
background-color: transparent !important;
|
|
56
57
|
|
|
57
58
|
.ant-select-selection-overflow {
|
|
58
|
-
flex-wrap:
|
|
59
|
+
flex-wrap: nowrap;
|
|
59
60
|
gap: 4px;
|
|
60
|
-
padding:
|
|
61
|
+
padding: 0;
|
|
62
|
+
height: 30px;
|
|
63
|
+
align-items: center;
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
.ant-select-selection-item {
|
|
64
67
|
margin-top: 0;
|
|
65
68
|
margin-bottom: 0;
|
|
69
|
+
background: transparent;
|
|
70
|
+
border: none;
|
|
71
|
+
height: 24px;
|
|
72
|
+
line-height: 24px;
|
|
73
|
+
padding-right: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ant-select-selection-overflow-item-suffix {
|
|
77
|
+
position: absolute;
|
|
78
|
+
right: 0;
|
|
79
|
+
height: 30px;
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
66
82
|
}
|
|
67
83
|
}
|
|
68
84
|
|
|
@@ -75,8 +91,8 @@
|
|
|
75
91
|
}
|
|
76
92
|
|
|
77
93
|
&:active {
|
|
78
|
-
background-color: ${e[n].pressed.backgroundColor};
|
|
79
|
-
border-color: ${e[n].pressed.borderColor};
|
|
94
|
+
background-color: ${((l=(c=e==null?void 0:e[n])==null?void 0:c.pressed)==null?void 0:l.backgroundColor)??"#fff"};
|
|
95
|
+
border-color: ${((u=(p=e==null?void 0:e[n])==null?void 0:p.pressed)==null?void 0:u.borderColor)??"#fff"};
|
|
80
96
|
}
|
|
81
97
|
|
|
82
98
|
// Remove focus styles
|
|
@@ -109,30 +125,30 @@
|
|
|
109
125
|
}
|
|
110
126
|
}
|
|
111
127
|
}
|
|
112
|
-
|
|
128
|
+
`},x=a.div`
|
|
113
129
|
.ant-select-item-option {
|
|
114
|
-
transition: ${({theme:e,type:
|
|
130
|
+
transition: ${({theme:e,type:t})=>f(e)};
|
|
115
131
|
border-radius: 0px;
|
|
116
132
|
|
|
117
133
|
&:hover {
|
|
118
|
-
background-color: ${({theme:e,type:
|
|
119
|
-
color: ${({theme:e,type:
|
|
134
|
+
background-color: ${({theme:e,type:t})=>e.colors.surface.secondary};
|
|
135
|
+
color: ${({theme:e,type:t})=>e.colors.onsurface["copy-dark"]};
|
|
120
136
|
}
|
|
121
137
|
|
|
122
138
|
&.ant-select-item-option-selected {
|
|
123
|
-
background-color: ${({theme:e,type:
|
|
124
|
-
color: ${({theme:e,type:
|
|
139
|
+
background-color: ${({theme:e,type:t})=>e.colors[t].hover.backgroundColor};
|
|
140
|
+
color: ${({theme:e,type:t})=>e.colors[t].active.color};
|
|
125
141
|
font-weight: 400;
|
|
126
142
|
border-radius: 0px;
|
|
127
143
|
|
|
128
144
|
&:hover {
|
|
129
|
-
background-color: ${({theme:e,type:
|
|
130
|
-
color: ${({theme:e,type:
|
|
145
|
+
background-color: ${({theme:e,type:t})=>e.colors[t].hover.backgroundColor};
|
|
146
|
+
color: ${({theme:e,type:t})=>e.colors[t].hover.color};
|
|
131
147
|
border-radius: 0px;
|
|
132
148
|
}
|
|
133
149
|
}
|
|
134
150
|
}
|
|
135
|
-
`,
|
|
151
|
+
`,y=a.div`
|
|
136
152
|
.ant-select-dropdown {
|
|
137
153
|
animation-duration: ${({theme:e})=>`${e.motion.veryfast}s`} !important;
|
|
138
154
|
transition: all ${({theme:e})=>`${e.motion.veryfast}s`}
|
|
@@ -151,6 +167,6 @@
|
|
|
151
167
|
&.ant-slide-up-leave {
|
|
152
168
|
animation-duration: ${({theme:e})=>`${e.motion.veryfast}s`} !important;
|
|
153
169
|
}
|
|
154
|
-
`,
|
|
155
|
-
${({theme:e,type:
|
|
156
|
-
`;exports.Select=
|
|
170
|
+
`,v=a(b)`
|
|
171
|
+
${({theme:e,type:t="primary",state:o="active",$variant:r="none"})=>m(e,t,o,r)}
|
|
172
|
+
`;exports.Select=v;exports.SelectDropdown=y;exports.SelectWrapper=h;exports.StyledMenuItem=x;exports.getGenesisClass=m;
|
|
@@ -13,6 +13,12 @@ interface SelectWrapperProps {
|
|
|
13
13
|
variant?: "simple" | "none";
|
|
14
14
|
}
|
|
15
15
|
export declare const SelectWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SelectWrapperProps>> & string;
|
|
16
|
+
export declare const getGenesisClass: ({ colors, sizing, typography, borderRadius }: {
|
|
17
|
+
colors: any;
|
|
18
|
+
sizing: any;
|
|
19
|
+
typography: any;
|
|
20
|
+
borderRadius: any;
|
|
21
|
+
}, type: any, state: any, $variant: any) => string;
|
|
16
22
|
interface SelectMenuItemProps {
|
|
17
23
|
theme: GenesisTheme;
|
|
18
24
|
type?: keyof typeof TYPE;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import a from "styled-components";
|
|
2
|
-
import
|
|
3
|
-
const
|
|
2
|
+
import g from "../../node_modules/antd/es/select/index.js";
|
|
3
|
+
const v = a.div`
|
|
4
4
|
position: relative;
|
|
5
5
|
border: 2px solid transparent;
|
|
6
6
|
background-color: transparent;
|
|
@@ -8,8 +8,8 @@ const b = a.div`
|
|
|
8
8
|
padding: 1px;
|
|
9
9
|
width: auto;
|
|
10
10
|
|
|
11
|
-
${({ $isFocused: e, theme:
|
|
12
|
-
border: 2px solid ${
|
|
11
|
+
${({ $isFocused: e, theme: t, type: o = "primary" }) => e && `
|
|
12
|
+
border: 2px solid ${t.colors[o].focussed.ringColor};
|
|
13
13
|
background-color: transparent;
|
|
14
14
|
border-radius: 8px;
|
|
15
15
|
padding: 1px;
|
|
@@ -18,7 +18,7 @@ const b = a.div`
|
|
|
18
18
|
.ant-select-dropdown {
|
|
19
19
|
animation-duration: ${({ theme: e }) => `${e.motion.veryfast}s`} !important;
|
|
20
20
|
}
|
|
21
|
-
`,
|
|
21
|
+
`, b = (e) => `all ${e.motion.veryfast}s ease-in-out`, h = (e, t, o, r) => `
|
|
22
22
|
&.ant-select {
|
|
23
23
|
background-color: ${e.surface.secondary};
|
|
24
24
|
border-color: ${e.surface.secondary};
|
|
@@ -27,15 +27,17 @@ const b = a.div`
|
|
|
27
27
|
.ant-select-selector {
|
|
28
28
|
background-color: ${e.surface.secondary};
|
|
29
29
|
border-color: ${e.surface.secondary};
|
|
30
|
-
border-radius: ${
|
|
30
|
+
border-radius: ${r.BorderRadiusSm}px;
|
|
31
31
|
margin: 0px;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
`,
|
|
34
|
+
`, f = ({ colors: e, sizing: t, typography: o, borderRadius: r }, n, i, m) => {
|
|
35
|
+
var s, d, c, p, l, u;
|
|
36
|
+
return m === "simple" ? h(e, n, i, r) : `
|
|
35
37
|
&.ant-select {
|
|
36
|
-
|
|
37
|
-
font-size: ${
|
|
38
|
-
line-height: ${
|
|
38
|
+
|
|
39
|
+
font-size: ${t.Size4}px;
|
|
40
|
+
line-height: ${t.Size6}px;
|
|
39
41
|
letter-spacing: 0;
|
|
40
42
|
font-weight: 400;
|
|
41
43
|
border-width: 1px;
|
|
@@ -45,26 +47,42 @@ const b = a.div`
|
|
|
45
47
|
height: auto;
|
|
46
48
|
min-height: 32px;
|
|
47
49
|
|
|
48
|
-
background-color: ${e[n][i].backgroundColor}
|
|
50
|
+
background-color: ${((d = (s = e == null ? void 0 : e[n]) == null ? void 0 : s[i]) == null ? void 0 : d.backgroundColor) ?? "#fff"}
|
|
49
51
|
|
|
50
|
-
border-radius: ${
|
|
51
|
-
gap: ${
|
|
52
|
+
border-radius: ${r.BorderRadiusMd}px;
|
|
53
|
+
gap: ${t.Size2}px;
|
|
52
54
|
|
|
53
55
|
.ant-select-selector {
|
|
54
56
|
border-color: ${e.inputs.surface.border};
|
|
55
57
|
padding-left: 4px;
|
|
56
58
|
height: auto !important;
|
|
57
59
|
min-height: 32px !important;
|
|
60
|
+
background-color: transparent !important;
|
|
58
61
|
|
|
59
62
|
.ant-select-selection-overflow {
|
|
60
|
-
flex-wrap:
|
|
63
|
+
flex-wrap: nowrap;
|
|
61
64
|
gap: 4px;
|
|
62
|
-
padding:
|
|
65
|
+
padding: 0;
|
|
66
|
+
height: 30px;
|
|
67
|
+
align-items: center;
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
.ant-select-selection-item {
|
|
66
71
|
margin-top: 0;
|
|
67
72
|
margin-bottom: 0;
|
|
73
|
+
background: transparent;
|
|
74
|
+
border: none;
|
|
75
|
+
height: 24px;
|
|
76
|
+
line-height: 24px;
|
|
77
|
+
padding-right: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ant-select-selection-overflow-item-suffix {
|
|
81
|
+
position: absolute;
|
|
82
|
+
right: 0;
|
|
83
|
+
height: 30px;
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
68
86
|
}
|
|
69
87
|
}
|
|
70
88
|
|
|
@@ -77,8 +95,8 @@ const b = a.div`
|
|
|
77
95
|
}
|
|
78
96
|
|
|
79
97
|
&:active {
|
|
80
|
-
background-color: ${e[n].pressed.backgroundColor};
|
|
81
|
-
border-color: ${e[n].pressed.borderColor};
|
|
98
|
+
background-color: ${((p = (c = e == null ? void 0 : e[n]) == null ? void 0 : c.pressed) == null ? void 0 : p.backgroundColor) ?? "#fff"};
|
|
99
|
+
border-color: ${((u = (l = e == null ? void 0 : e[n]) == null ? void 0 : l.pressed) == null ? void 0 : u.borderColor) ?? "#fff"};
|
|
82
100
|
}
|
|
83
101
|
|
|
84
102
|
// Remove focus styles
|
|
@@ -111,30 +129,31 @@ const b = a.div`
|
|
|
111
129
|
}
|
|
112
130
|
}
|
|
113
131
|
}
|
|
114
|
-
|
|
132
|
+
`;
|
|
133
|
+
}, y = a.div`
|
|
115
134
|
.ant-select-item-option {
|
|
116
|
-
transition: ${({ theme: e, type:
|
|
135
|
+
transition: ${({ theme: e, type: t }) => b(e)};
|
|
117
136
|
border-radius: 0px;
|
|
118
137
|
|
|
119
138
|
&:hover {
|
|
120
|
-
background-color: ${({ theme: e, type:
|
|
121
|
-
color: ${({ theme: e, type:
|
|
139
|
+
background-color: ${({ theme: e, type: t }) => e.colors.surface.secondary};
|
|
140
|
+
color: ${({ theme: e, type: t }) => e.colors.onsurface["copy-dark"]};
|
|
122
141
|
}
|
|
123
142
|
|
|
124
143
|
&.ant-select-item-option-selected {
|
|
125
|
-
background-color: ${({ theme: e, type:
|
|
126
|
-
color: ${({ theme: e, type:
|
|
144
|
+
background-color: ${({ theme: e, type: t }) => e.colors[t].hover.backgroundColor};
|
|
145
|
+
color: ${({ theme: e, type: t }) => e.colors[t].active.color};
|
|
127
146
|
font-weight: 400;
|
|
128
147
|
border-radius: 0px;
|
|
129
148
|
|
|
130
149
|
&:hover {
|
|
131
|
-
background-color: ${({ theme: e, type:
|
|
132
|
-
color: ${({ theme: e, type:
|
|
150
|
+
background-color: ${({ theme: e, type: t }) => e.colors[t].hover.backgroundColor};
|
|
151
|
+
color: ${({ theme: e, type: t }) => e.colors[t].hover.color};
|
|
133
152
|
border-radius: 0px;
|
|
134
153
|
}
|
|
135
154
|
}
|
|
136
155
|
}
|
|
137
|
-
`,
|
|
156
|
+
`, k = a.div`
|
|
138
157
|
.ant-select-dropdown {
|
|
139
158
|
animation-duration: ${({ theme: e }) => `${e.motion.veryfast}s`} !important;
|
|
140
159
|
transition: all ${({ theme: e }) => `${e.motion.veryfast}s`}
|
|
@@ -153,12 +172,13 @@ const b = a.div`
|
|
|
153
172
|
&.ant-slide-up-leave {
|
|
154
173
|
animation-duration: ${({ theme: e }) => `${e.motion.veryfast}s`} !important;
|
|
155
174
|
}
|
|
156
|
-
`,
|
|
157
|
-
${({ theme: e, type:
|
|
175
|
+
`, w = a(g)`
|
|
176
|
+
${({ theme: e, type: t = "primary", state: o = "active", $variant: r = "none" }) => f(e, t, o, r)}
|
|
158
177
|
`;
|
|
159
178
|
export {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
179
|
+
w as Select,
|
|
180
|
+
k as SelectDropdown,
|
|
181
|
+
v as SelectWrapper,
|
|
182
|
+
y as StyledMenuItem,
|
|
183
|
+
f as getGenesisClass
|
|
164
184
|
};
|