@gobolt/genesis 0.2.6 → 0.2.8
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/__stories__/Select.stories.d.ts +1 -0
- package/dist/components/Select/styles.cjs +39 -25
- package/dist/components/Select/styles.d.ts +6 -0
- package/dist/components/Select/styles.js +47 -29
- 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
|
};
|
|
@@ -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"),g=require("../../node_modules/antd/es/select/index.cjs"),f=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
|
+
`,h=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};
|
|
@@ -29,27 +29,41 @@
|
|
|
29
29
|
margin: 0px;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`,m=({colors:e,sizing:t,typography:o,borderRadius:r},n,i,b)=>{var s,d,c,l,p,u;return b==="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;
|
|
40
40
|
|
|
41
41
|
width: 100%;
|
|
42
42
|
min-width: 250px;
|
|
43
|
-
height:
|
|
43
|
+
height: auto;
|
|
44
|
+
min-height: 32px;
|
|
44
45
|
|
|
45
|
-
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"}
|
|
46
47
|
|
|
47
48
|
border-radius: ${r.BorderRadiusMd}px;
|
|
48
|
-
gap: ${
|
|
49
|
+
gap: ${t.Size2}px;
|
|
49
50
|
|
|
50
51
|
.ant-select-selector {
|
|
51
52
|
border-color: ${e.inputs.surface.border};
|
|
52
53
|
padding-left: 4px;
|
|
54
|
+
height: auto !important;
|
|
55
|
+
min-height: 32px !important;
|
|
56
|
+
|
|
57
|
+
.ant-select-selection-overflow {
|
|
58
|
+
flex-wrap: wrap;
|
|
59
|
+
gap: 4px;
|
|
60
|
+
padding: 4px 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ant-select-selection-item {
|
|
64
|
+
margin-top: 0;
|
|
65
|
+
margin-bottom: 0;
|
|
66
|
+
}
|
|
53
67
|
}
|
|
54
68
|
|
|
55
69
|
.ant-select-selection-item {
|
|
@@ -61,8 +75,8 @@
|
|
|
61
75
|
}
|
|
62
76
|
|
|
63
77
|
&:active {
|
|
64
|
-
background-color: ${e[n].pressed.backgroundColor};
|
|
65
|
-
border-color: ${e[n].pressed.borderColor};
|
|
78
|
+
background-color: ${((l=(c=e==null?void 0:e[n])==null?void 0:c.pressed)==null?void 0:l.backgroundColor)??"#fff"};
|
|
79
|
+
border-color: ${((u=(p=e==null?void 0:e[n])==null?void 0:p.pressed)==null?void 0:u.borderColor)??"#fff"};
|
|
66
80
|
}
|
|
67
81
|
|
|
68
82
|
// Remove focus styles
|
|
@@ -95,30 +109,30 @@
|
|
|
95
109
|
}
|
|
96
110
|
}
|
|
97
111
|
}
|
|
98
|
-
|
|
112
|
+
`},x=a.div`
|
|
99
113
|
.ant-select-item-option {
|
|
100
|
-
transition: ${({theme:e,type:
|
|
114
|
+
transition: ${({theme:e,type:t})=>h(e)};
|
|
101
115
|
border-radius: 0px;
|
|
102
116
|
|
|
103
117
|
&:hover {
|
|
104
|
-
background-color: ${({theme:e,type:
|
|
105
|
-
color: ${({theme:e,type:
|
|
118
|
+
background-color: ${({theme:e,type:t})=>e.colors.surface.secondary};
|
|
119
|
+
color: ${({theme:e,type:t})=>e.colors.onsurface["copy-dark"]};
|
|
106
120
|
}
|
|
107
121
|
|
|
108
122
|
&.ant-select-item-option-selected {
|
|
109
|
-
background-color: ${({theme:e,type:
|
|
110
|
-
color: ${({theme:e,type:
|
|
123
|
+
background-color: ${({theme:e,type:t})=>e.colors[t].hover.backgroundColor};
|
|
124
|
+
color: ${({theme:e,type:t})=>e.colors[t].active.color};
|
|
111
125
|
font-weight: 400;
|
|
112
126
|
border-radius: 0px;
|
|
113
127
|
|
|
114
128
|
&:hover {
|
|
115
|
-
background-color: ${({theme:e,type:
|
|
116
|
-
color: ${({theme:e,type:
|
|
129
|
+
background-color: ${({theme:e,type:t})=>e.colors[t].hover.backgroundColor};
|
|
130
|
+
color: ${({theme:e,type:t})=>e.colors[t].hover.color};
|
|
117
131
|
border-radius: 0px;
|
|
118
132
|
}
|
|
119
133
|
}
|
|
120
134
|
}
|
|
121
|
-
`,
|
|
135
|
+
`,y=a.div`
|
|
122
136
|
.ant-select-dropdown {
|
|
123
137
|
animation-duration: ${({theme:e})=>`${e.motion.veryfast}s`} !important;
|
|
124
138
|
transition: all ${({theme:e})=>`${e.motion.veryfast}s`}
|
|
@@ -137,6 +151,6 @@
|
|
|
137
151
|
&.ant-slide-up-leave {
|
|
138
152
|
animation-duration: ${({theme:e})=>`${e.motion.veryfast}s`} !important;
|
|
139
153
|
}
|
|
140
|
-
`,
|
|
141
|
-
${({theme:e,type:
|
|
142
|
-
`;exports.Select=
|
|
154
|
+
`,v=a(g)`
|
|
155
|
+
${({theme:e,type:t="primary",state:o="active",$variant:r="none"})=>m(e,t,o,r)}
|
|
156
|
+
`;exports.Select=v;exports.SelectDropdown=y;exports.SelectWrapper=f;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 b 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
|
+
`, g = (e) => `all ${e.motion.veryfast}s ease-in-out`, f = (e, t, o, r) => `
|
|
22
22
|
&.ant-select {
|
|
23
23
|
background-color: ${e.surface.secondary};
|
|
24
24
|
border-color: ${e.surface.secondary};
|
|
@@ -31,27 +31,43 @@ const b = a.div`
|
|
|
31
31
|
margin: 0px;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
`,
|
|
34
|
+
`, h = ({ colors: e, sizing: t, typography: o, borderRadius: r }, n, i, m) => {
|
|
35
|
+
var d, s, c, p, l, u;
|
|
36
|
+
return m === "simple" ? f(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;
|
|
42
44
|
|
|
43
45
|
width: 100%;
|
|
44
46
|
min-width: 250px;
|
|
45
|
-
height:
|
|
47
|
+
height: auto;
|
|
48
|
+
min-height: 32px;
|
|
46
49
|
|
|
47
|
-
background-color: ${e[n][i].backgroundColor}
|
|
50
|
+
background-color: ${((s = (d = e == null ? void 0 : e[n]) == null ? void 0 : d[i]) == null ? void 0 : s.backgroundColor) ?? "#fff"}
|
|
48
51
|
|
|
49
52
|
border-radius: ${r.BorderRadiusMd}px;
|
|
50
|
-
gap: ${
|
|
53
|
+
gap: ${t.Size2}px;
|
|
51
54
|
|
|
52
55
|
.ant-select-selector {
|
|
53
56
|
border-color: ${e.inputs.surface.border};
|
|
54
57
|
padding-left: 4px;
|
|
58
|
+
height: auto !important;
|
|
59
|
+
min-height: 32px !important;
|
|
60
|
+
|
|
61
|
+
.ant-select-selection-overflow {
|
|
62
|
+
flex-wrap: wrap;
|
|
63
|
+
gap: 4px;
|
|
64
|
+
padding: 4px 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ant-select-selection-item {
|
|
68
|
+
margin-top: 0;
|
|
69
|
+
margin-bottom: 0;
|
|
70
|
+
}
|
|
55
71
|
}
|
|
56
72
|
|
|
57
73
|
.ant-select-selection-item {
|
|
@@ -63,8 +79,8 @@ const b = a.div`
|
|
|
63
79
|
}
|
|
64
80
|
|
|
65
81
|
&:active {
|
|
66
|
-
background-color: ${e[n].pressed.backgroundColor};
|
|
67
|
-
border-color: ${e[n].pressed.borderColor};
|
|
82
|
+
background-color: ${((p = (c = e == null ? void 0 : e[n]) == null ? void 0 : c.pressed) == null ? void 0 : p.backgroundColor) ?? "#fff"};
|
|
83
|
+
border-color: ${((u = (l = e == null ? void 0 : e[n]) == null ? void 0 : l.pressed) == null ? void 0 : u.borderColor) ?? "#fff"};
|
|
68
84
|
}
|
|
69
85
|
|
|
70
86
|
// Remove focus styles
|
|
@@ -97,30 +113,31 @@ const b = a.div`
|
|
|
97
113
|
}
|
|
98
114
|
}
|
|
99
115
|
}
|
|
100
|
-
|
|
116
|
+
`;
|
|
117
|
+
}, y = a.div`
|
|
101
118
|
.ant-select-item-option {
|
|
102
|
-
transition: ${({ theme: e, type:
|
|
119
|
+
transition: ${({ theme: e, type: t }) => g(e)};
|
|
103
120
|
border-radius: 0px;
|
|
104
121
|
|
|
105
122
|
&:hover {
|
|
106
|
-
background-color: ${({ theme: e, type:
|
|
107
|
-
color: ${({ theme: e, type:
|
|
123
|
+
background-color: ${({ theme: e, type: t }) => e.colors.surface.secondary};
|
|
124
|
+
color: ${({ theme: e, type: t }) => e.colors.onsurface["copy-dark"]};
|
|
108
125
|
}
|
|
109
126
|
|
|
110
127
|
&.ant-select-item-option-selected {
|
|
111
|
-
background-color: ${({ theme: e, type:
|
|
112
|
-
color: ${({ theme: e, type:
|
|
128
|
+
background-color: ${({ theme: e, type: t }) => e.colors[t].hover.backgroundColor};
|
|
129
|
+
color: ${({ theme: e, type: t }) => e.colors[t].active.color};
|
|
113
130
|
font-weight: 400;
|
|
114
131
|
border-radius: 0px;
|
|
115
132
|
|
|
116
133
|
&:hover {
|
|
117
|
-
background-color: ${({ theme: e, type:
|
|
118
|
-
color: ${({ theme: e, type:
|
|
134
|
+
background-color: ${({ theme: e, type: t }) => e.colors[t].hover.backgroundColor};
|
|
135
|
+
color: ${({ theme: e, type: t }) => e.colors[t].hover.color};
|
|
119
136
|
border-radius: 0px;
|
|
120
137
|
}
|
|
121
138
|
}
|
|
122
139
|
}
|
|
123
|
-
`,
|
|
140
|
+
`, k = a.div`
|
|
124
141
|
.ant-select-dropdown {
|
|
125
142
|
animation-duration: ${({ theme: e }) => `${e.motion.veryfast}s`} !important;
|
|
126
143
|
transition: all ${({ theme: e }) => `${e.motion.veryfast}s`}
|
|
@@ -139,12 +156,13 @@ const b = a.div`
|
|
|
139
156
|
&.ant-slide-up-leave {
|
|
140
157
|
animation-duration: ${({ theme: e }) => `${e.motion.veryfast}s`} !important;
|
|
141
158
|
}
|
|
142
|
-
`,
|
|
143
|
-
${({ theme: e, type:
|
|
159
|
+
`, w = a(b)`
|
|
160
|
+
${({ theme: e, type: t = "primary", state: o = "active", $variant: r = "none" }) => h(e, t, o, r)}
|
|
144
161
|
`;
|
|
145
162
|
export {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
163
|
+
w as Select,
|
|
164
|
+
k as SelectDropdown,
|
|
165
|
+
v as SelectWrapper,
|
|
166
|
+
y as StyledMenuItem,
|
|
167
|
+
h as getGenesisClass
|
|
150
168
|
};
|