cherry-styled-components 0.1.14 → 0.1.16
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/input.js +17 -9
- package/package.json +3 -3
- package/dist/src/App.d.ts +0 -2
- package/dist/src/main.d.ts +0 -1
- package/dist/src/toggle-theme.d.ts +0 -3
package/dist/input.js
CHANGED
|
@@ -8,7 +8,7 @@ import styled, { css } from "styled-components";
|
|
|
8
8
|
//#region src/lib/input.tsx
|
|
9
9
|
var StyledInputWrapper = styled.span.withConfig({
|
|
10
10
|
displayName: "input__StyledInputWrapper",
|
|
11
|
-
componentId: "sc-
|
|
11
|
+
componentId: "sc-a617b4b1-0"
|
|
12
12
|
})([
|
|
13
13
|
`display:inline-flex;flex-wrap:`,
|
|
14
14
|
`;align-items:center;`,
|
|
@@ -17,7 +17,7 @@ var StyledInputWrapper = styled.span.withConfig({
|
|
|
17
17
|
], ({ type }) => type === "checkbox" || type === "radio" ? "nowrap" : "wrap", ({ $label }) => $label && css([`gap:5px;align-items:flex-start;`]), ({ $fullWidth }) => fullWidthStyles($fullWidth));
|
|
18
18
|
var StyledLabel = styled.label.withConfig({
|
|
19
19
|
displayName: "input__StyledLabel",
|
|
20
|
-
componentId: "sc-
|
|
20
|
+
componentId: "sc-a617b4b1-1"
|
|
21
21
|
})([
|
|
22
22
|
`display:inline-block;color:`,
|
|
23
23
|
`;font-size:`,
|
|
@@ -26,7 +26,7 @@ var StyledLabel = styled.label.withConfig({
|
|
|
26
26
|
], ({ theme }) => theme.colors.grayDark, ({ theme }) => theme.fontSizes.small.lg, ({ theme }) => theme.lineHeights.small.lg);
|
|
27
27
|
var StyledInput = styled.input.withConfig({
|
|
28
28
|
displayName: "input__StyledInput",
|
|
29
|
-
componentId: "sc-
|
|
29
|
+
componentId: "sc-a617b4b1-2"
|
|
30
30
|
})([
|
|
31
31
|
``,
|
|
32
32
|
`;`,
|
|
@@ -35,13 +35,21 @@ var StyledInput = styled.input.withConfig({
|
|
|
35
35
|
`;background:`,
|
|
36
36
|
`;border:solid 2px `,
|
|
37
37
|
`;box-shadow:0 0 0 0px `,
|
|
38
|
-
`;transition:all 0.3s ease;word-break:keep-all;white-space:nowrap;display:inline-flex;&[type="date"]{padding:17px 45px 17px 15px;@supports (-moz-appearance:none){padding:13px 15px;}}&::-webkit-datetime-edit{padding:0;margin:0;vertical-align:middle;}&::-webkit-datetime-edit-fields-wrapper{padding:4px 0;margin:0;vertical-align:middle;}&::-webkit-calendar-picker-indicator{background:transparent;cursor:pointer;position:absolute;right:15px;top:50%;transform:translateY(-50%);width:24px;height:24px;}&::-webkit-datetime-edit-text{color:`,
|
|
38
|
+
`;transition:all 0.3s ease;word-break:keep-all;white-space:nowrap;display:inline-flex;&[type="date"],&[type="datetime-local"],&[type="month"],&[type="week"],&[type="time"]{padding:17px 45px 17px 15px;@supports (-moz-appearance:none){padding:13px 15px;}}&::-webkit-datetime-edit{padding:0;margin:0;vertical-align:middle;}&::-webkit-datetime-edit-fields-wrapper{padding:4px 0;margin:0;vertical-align:middle;}&::-webkit-calendar-picker-indicator{background:transparent;cursor:pointer;position:absolute;right:15px;top:50%;transform:translateY(-50%);width:24px;height:24px;}&::-webkit-datetime-edit-text{color:`,
|
|
39
39
|
`;}&::-webkit-datetime-edit-month-field{&:focus{background:`,
|
|
40
40
|
`;color:`,
|
|
41
41
|
`;border-radius:4px;}}&::-webkit-datetime-edit-day-field{&:focus{background:`,
|
|
42
42
|
`;color:`,
|
|
43
43
|
`;border-radius:4px;}}&::-webkit-datetime-edit-year-field{&:focus{background:`,
|
|
44
44
|
`;color:`,
|
|
45
|
+
`;border-radius:4px;}}&::-webkit-datetime-edit-hour-field{&:focus{background:`,
|
|
46
|
+
`;color:`,
|
|
47
|
+
`;border-radius:4px;}}&::-webkit-datetime-edit-minute-field{&:focus{background:`,
|
|
48
|
+
`;color:`,
|
|
49
|
+
`;border-radius:4px;}}&::-webkit-datetime-edit-second-field{&:focus{background:`,
|
|
50
|
+
`;color:`,
|
|
51
|
+
`;border-radius:4px;}}&::-webkit-datetime-edit-ampm-field{&:focus{background:`,
|
|
52
|
+
`;color:`,
|
|
45
53
|
`;border-radius:4px;}}&::placeholder{color:`,
|
|
46
54
|
`;}&:hover:not([disabled]){border-color:`,
|
|
47
55
|
`;}&:focus:not([disabled]){box-shadow:0 0 0 4px `,
|
|
@@ -53,7 +61,7 @@ var StyledInput = styled.input.withConfig({
|
|
|
53
61
|
` `,
|
|
54
62
|
` `,
|
|
55
63
|
``
|
|
56
|
-
], resetButton, resetInput, ({ theme }) => theme.spacing.radius.xs, ({ theme }) => theme.colors.dark, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.gray, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.gray, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primaryLight, ({ $size }) => formElementHeightStyles($size), ({ $size, theme }) => $size === "big" ? `font-size: ${theme.fontSizes.inputBig.lg};
|
|
64
|
+
], resetButton, resetInput, ({ theme }) => theme.spacing.radius.xs, ({ theme }) => theme.colors.dark, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.gray, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.gray, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primaryLight, ({ $size }) => formElementHeightStyles($size), ({ $size, theme }) => $size === "big" ? `font-size: ${theme.fontSizes.inputBig.lg};
|
|
57
65
|
line-height: ${theme.lineHeights.inputBig.lg};
|
|
58
66
|
` : $size === "small" ? `font-size: ${theme.fontSizes.inputSmall.lg};
|
|
59
67
|
line-height: ${theme.lineHeights.inputSmall.lg};
|
|
@@ -68,11 +76,11 @@ var StyledInput = styled.input.withConfig({
|
|
|
68
76
|
`, ({ $fullWidth }) => fullWidthStyles($fullWidth));
|
|
69
77
|
var StyledIconWrapper = styled.span.withConfig({
|
|
70
78
|
displayName: "input__StyledIconWrapper",
|
|
71
|
-
componentId: "sc-
|
|
79
|
+
componentId: "sc-a617b4b1-3"
|
|
72
80
|
})([`display:inline-flex;position:relative;line-height:0;min-width:fit-content;& em{display:block;border-radius:50%;background:`, `;}& svg,& em{object-fit:contain;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(0.7);opacity:0;pointer-events:none;transition:all 0.3s ease;}`], ({ theme }) => theme.colors.primary);
|
|
73
81
|
var StyledRadioCheckboxInput = styled.input.withConfig({
|
|
74
82
|
displayName: "input__StyledRadioCheckboxInput",
|
|
75
|
-
componentId: "sc-
|
|
83
|
+
componentId: "sc-a617b4b1-4"
|
|
76
84
|
})([
|
|
77
85
|
``,
|
|
78
86
|
`;display:inline-block;background:`,
|
|
@@ -157,7 +165,7 @@ var StyledRadioCheckboxInput = styled.input.withConfig({
|
|
|
157
165
|
});
|
|
158
166
|
var StyledCustomIconWrapper = styled.span.withConfig({
|
|
159
167
|
displayName: "input__StyledCustomIconWrapper",
|
|
160
|
-
componentId: "sc-
|
|
168
|
+
componentId: "sc-a617b4b1-5"
|
|
161
169
|
})([
|
|
162
170
|
`position:relative;`,
|
|
163
171
|
`;& svg{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none;width:24px;height:24px;object-fit:contain;color:`,
|
|
@@ -199,7 +207,7 @@ function LocalInput({ ...props }, ref) {
|
|
|
199
207
|
ref
|
|
200
208
|
}),
|
|
201
209
|
props.$iconPosition === "right" && props.$icon && props.$icon,
|
|
202
|
-
props.type === "date" && /* @__PURE__ */ jsx(IconCalendar, { className: "icon-calendar" })
|
|
210
|
+
(props.type === "date" || props.type === "datetime-local" || props.type === "month" || props.type === "week" || props.type === "time") && /* @__PURE__ */ jsx(IconCalendar, { className: "icon-calendar" })
|
|
203
211
|
]
|
|
204
212
|
})]
|
|
205
213
|
});
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cherry-styled-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "Cherry is a design system for the modern web. Designed in Figma, built in React using Typescript.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
|
-
"types": "./dist/lib/index.d.ts",
|
|
8
|
+
"types": "./dist/src/lib/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"types": "./dist/lib/index.d.ts",
|
|
11
|
+
"types": "./dist/src/lib/index.d.ts",
|
|
12
12
|
"import": "./dist/index.js"
|
|
13
13
|
}
|
|
14
14
|
},
|
package/dist/src/App.d.ts
DELETED
package/dist/src/main.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|