cherry-styled-components 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.
@@ -115,7 +115,7 @@ function LocalAvatarDropzone({ $size, $icon = "User", $maxBytes, "aria-label": a
115
115
  var AvatarDropzone = /*#__PURE__*/ forwardRef(LocalAvatarDropzone);
116
116
  var StyledAvatarDropzoneWrapper = styled.span.withConfig({
117
117
  displayName: "avatar-dropzone__StyledAvatarDropzoneWrapper",
118
- componentId: "sc-1d7e93ff-0"
118
+ componentId: "sc-38b0b6de-0"
119
119
  })([
120
120
  `position:relative;display:inline-flex;width:`,
121
121
  `px;height:`,
@@ -123,10 +123,10 @@ var StyledAvatarDropzoneWrapper = styled.span.withConfig({
123
123
  ], ({ $size }) => avatarSizes[$size ?? "default"].box, ({ $size }) => avatarSizes[$size ?? "default"].box);
124
124
  var StyledAvatarDropzone = styled.button.withConfig({
125
125
  displayName: "avatar-dropzone__StyledAvatarDropzone",
126
- componentId: "sc-1d7e93ff-1"
126
+ componentId: "sc-38b0b6de-1"
127
127
  })([
128
128
  ``,
129
- `;display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:50%;overflow:hidden;border:2px `,
129
+ `;font-family:inherit;display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:50%;overflow:hidden;border:2px `,
130
130
  ` `,
131
131
  `;background:`,
132
132
  `;color:`,
@@ -146,7 +146,7 @@ var StyledAvatarDropzone = styled.button.withConfig({
146
146
  ], theme.colors.primary, rgba(theme.colors.primary, theme.isDark ? .12 : .05)), ({ theme }) => theme.colors.primary, ({ theme }) => rgba(theme.colors.primary, theme.isDark ? .1 : .04), ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primaryLight);
147
147
  var StyledAvatarRemove = styled.button.withConfig({
148
148
  displayName: "avatar-dropzone__StyledAvatarRemove",
149
- componentId: "sc-1d7e93ff-2"
149
+ componentId: "sc-38b0b6de-2"
150
150
  })([
151
151
  ``,
152
152
  `;position:absolute;top:0;right:0;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;color:#ffffff;background:`,
package/dist/dropzone.js CHANGED
@@ -155,14 +155,14 @@ function LocalDropzone({ $prompt = "Drag & drop files here", $browse, $hint, $ic
155
155
  var Dropzone = /*#__PURE__*/ forwardRef(LocalDropzone);
156
156
  var StyledDropzoneWrapper = styled.div.withConfig({
157
157
  displayName: "dropzone__StyledDropzoneWrapper",
158
- componentId: "sc-b829ff10-0"
158
+ componentId: "sc-4b43e6a9-0"
159
159
  })([`display:flex;flex-direction:column;gap:12px;width:100%;`]);
160
160
  var StyledDropzone = styled.button.withConfig({
161
161
  displayName: "dropzone__StyledDropzone",
162
- componentId: "sc-b829ff10-1"
162
+ componentId: "sc-4b43e6a9-1"
163
163
  })([
164
164
  ``,
165
- `;display:flex;flex-direction:`,
165
+ `;font-family:inherit;display:flex;flex-direction:`,
166
166
  `;align-items:center;justify-content:center;gap:`,
167
167
  `;width:100%;padding:`,
168
168
  `;border-radius:`,
@@ -183,7 +183,7 @@ var StyledDropzone = styled.button.withConfig({
183
183
  ], theme.colors.primary, rgba(theme.colors.primary, theme.isDark ? .12 : .05)), ({ theme }) => theme.colors.primary, ({ theme }) => rgba(theme.colors.primary, theme.isDark ? .1 : .04), ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primaryLight);
184
184
  var StyledDropIcon = styled.span.withConfig({
185
185
  displayName: "dropzone__StyledDropIcon",
186
- componentId: "sc-b829ff10-2"
186
+ componentId: "sc-4b43e6a9-2"
187
187
  })([
188
188
  `display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:`,
189
189
  `;height:`,
@@ -197,35 +197,33 @@ var StyledDropIcon = styled.span.withConfig({
197
197
  ], ({ $inline }) => $inline ? "32px" : "44px", ({ $inline }) => $inline ? "32px" : "44px", ({ theme }) => theme.spacing.radius.lg, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.colors.primary, ({ $inline }) => $inline ? "18px" : "22px", ({ $inline }) => $inline ? "18px" : "22px");
198
198
  var StyledDropPrompt = styled.span.withConfig({
199
199
  displayName: "dropzone__StyledDropPrompt",
200
- componentId: "sc-b829ff10-3"
200
+ componentId: "sc-4b43e6a9-3"
201
201
  })([
202
202
  `display:flex;flex-direction:`,
203
203
  `;flex-wrap:wrap;align-items:baseline;gap:`,
204
- `;font-family:`,
205
- `;font-size:`,
204
+ `;font-family:inherit;font-size:`,
206
205
  `;line-height:`,
207
206
  `;font-weight:600;color:`,
208
207
  `;& span{font-weight:500;color:`,
209
208
  `;}`
210
- ], ({ $inline }) => $inline ? "row" : "column", ({ $inline }) => $inline ? "0 6px" : "2px", ({ theme }) => theme.fonts.text, ({ theme }) => theme.fontSizes.text.xs, ({ theme }) => theme.lineHeights.text.xs, ({ theme }) => theme.colors.dark, ({ theme }) => theme.colors.grayDark);
209
+ ], ({ $inline }) => $inline ? "row" : "column", ({ $inline }) => $inline ? "0 6px" : "2px", ({ theme }) => theme.fontSizes.text.xs, ({ theme }) => theme.lineHeights.text.xs, ({ theme }) => theme.colors.dark, ({ theme }) => theme.colors.grayDark);
211
210
  var StyledDropHint = styled.span.withConfig({
212
211
  displayName: "dropzone__StyledDropHint",
213
- componentId: "sc-b829ff10-4"
212
+ componentId: "sc-4b43e6a9-4"
214
213
  })([
215
- `font-family:`,
216
- `;font-size:`,
214
+ `font-family:inherit;font-size:`,
217
215
  `;line-height:`,
218
216
  `;color:`,
219
217
  `;`,
220
218
  ``
221
- ], ({ theme }) => theme.fonts.text, ({ theme }) => theme.fontSizes.small.xs, ({ theme }) => theme.lineHeights.small.xs, ({ theme }) => theme.colors.gray, ({ $inline }) => $inline && css([`margin-left:auto;`]));
219
+ ], ({ theme }) => theme.fontSizes.small.xs, ({ theme }) => theme.lineHeights.small.xs, ({ theme }) => theme.colors.gray, ({ $inline }) => $inline && css([`margin-left:auto;`]));
222
220
  var StyledThumbs = styled.div.withConfig({
223
221
  displayName: "dropzone__StyledThumbs",
224
- componentId: "sc-b829ff10-5"
222
+ componentId: "sc-4b43e6a9-5"
225
223
  })([`display:grid;grid-template-columns:repeat(auto-fill,72px);gap:10px;`, `{grid-template-columns:repeat(auto-fill,84px);}`], mq("sm"));
226
224
  var StyledThumb = styled.div.withConfig({
227
225
  displayName: "dropzone__StyledThumb",
228
- componentId: "sc-b829ff10-6"
226
+ componentId: "sc-4b43e6a9-6"
229
227
  })([
230
228
  `position:relative;width:72px;height:72px;border-radius:`,
231
229
  `;overflow:hidden;border:solid 1px `,
@@ -235,16 +233,15 @@ var StyledThumb = styled.div.withConfig({
235
233
  ], ({ theme }) => theme.spacing.radius.lg, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.colors.light, mq("sm"));
236
234
  var StyledThumbFile = styled.span.withConfig({
237
235
  displayName: "dropzone__StyledThumbFile",
238
- componentId: "sc-b829ff10-7"
236
+ componentId: "sc-4b43e6a9-7"
239
237
  })([
240
238
  `display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:100%;height:100%;padding:6px;color:`,
241
239
  `;& svg{width:20px;height:20px;color:`,
242
- `;}& span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:`,
243
- `;font-size:10px;line-height:1.2;}`
244
- ], ({ theme }) => theme.colors.grayDark, ({ theme }) => theme.colors.primary, ({ theme }) => theme.fonts.text);
240
+ `;}& span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:inherit;font-size:10px;line-height:1.2;}`
241
+ ], ({ theme }) => theme.colors.grayDark, ({ theme }) => theme.colors.primary);
245
242
  var StyledThumbRemove = styled.button.withConfig({
246
243
  displayName: "dropzone__StyledThumbRemove",
247
- componentId: "sc-b829ff10-8"
244
+ componentId: "sc-4b43e6a9-8"
248
245
  })([
249
246
  ``,
250
247
  `;position:absolute;top:4px;right:4px;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;color:#ffffff;background:`,
package/dist/input.d.ts CHANGED
@@ -18,7 +18,7 @@ interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
18
18
  $success?: boolean;
19
19
  $fullWidth?: boolean;
20
20
  }
21
- export declare const StyledInputWrapper: IStyledComponent<"web", React.HTMLAttributes<HTMLSpanElement> & Pick<InputProps, "$label" | "$fullWidth" | "type">>;
21
+ export declare const StyledInputWrapper: IStyledComponent<"web", React.HTMLAttributes<HTMLSpanElement> & Pick<InputProps, "$label" | "$fullWidth" | "type" | "$size">>;
22
22
  export declare const StyledLabel: IStyledComponent<"web", LabelProps>;
23
23
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
24
24
  export { Input };
package/dist/input.js CHANGED
@@ -8,16 +8,19 @@ 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-f9d22714-0"
11
+ componentId: "sc-5e52a0cd-0"
12
12
  })([
13
13
  `display:inline-flex;flex-wrap:`,
14
14
  `;align-items:center;`,
15
- ` & .icon-calendar{position:absolute;top:50%;right:17px;left:initial;transform:translateY(-50%);pointer-events:none;width:24px;height:24px;@supports (-moz-appearance:none){display:none;}}`,
15
+ ` & .icon-calendar{position:absolute;top:50%;right:`,
16
+ `;left:initial;transform:translateY(-50%);pointer-events:none;width:`,
17
+ `;height:`,
18
+ `;@supports (-moz-appearance:none){display:none;}}`,
16
19
  ``
17
- ], ({ type }) => type === "checkbox" || type === "radio" ? "nowrap" : "wrap", ({ $label }) => $label && css([`gap:5px;align-items:flex-start;align-content:flex-start;`]), ({ $fullWidth }) => fullWidthStyles($fullWidth));
20
+ ], ({ type }) => type === "checkbox" || type === "radio" ? "nowrap" : "wrap", ({ $label }) => $label && css([`gap:5px;align-items:flex-start;align-content:flex-start;`]), ({ $size }) => $size === "small" ? "14px" : "17px", ({ $size }) => $size === "small" ? "18px" : "24px", ({ $size }) => $size === "small" ? "18px" : "24px", ({ $fullWidth }) => fullWidthStyles($fullWidth));
18
21
  var StyledLabel = styled.label.withConfig({
19
22
  displayName: "input__StyledLabel",
20
- componentId: "sc-f9d22714-1"
23
+ componentId: "sc-5e52a0cd-1"
21
24
  })([
22
25
  `display:inline-block;color:`,
23
26
  `;font-size:`,
@@ -26,7 +29,7 @@ var StyledLabel = styled.label.withConfig({
26
29
  ], ({ theme }) => theme.colors.grayDark, ({ theme }) => theme.fontSizes.small.lg, ({ theme }) => theme.lineHeights.small.lg);
27
30
  var StyledInput = styled.input.withConfig({
28
31
  displayName: "input__StyledInput",
29
- componentId: "sc-f9d22714-2"
32
+ componentId: "sc-5e52a0cd-2"
30
33
  })([
31
34
  ``,
32
35
  `;`,
@@ -66,6 +69,12 @@ var StyledInput = styled.input.withConfig({
66
69
  ` : $size === "small" ? `font-size: ${theme.fontSizes.inputSmall.lg};
67
70
  line-height: ${theme.lineHeights.inputSmall.lg};
68
71
  padding: 12px 12px;
72
+
73
+ &::-webkit-calendar-picker-indicator {
74
+ right: 12px;
75
+ width: 18px;
76
+ height: 18px;
77
+ }
69
78
  ` : `font-size: ${theme.fontSizes.input.lg};
70
79
  line-height: ${theme.lineHeights.input.lg};`, ({ $error, $success, theme }) => {
71
80
  return statusBorderStyles($error, $success, theme);
@@ -76,11 +85,11 @@ var StyledInput = styled.input.withConfig({
76
85
  `, ({ $fullWidth }) => fullWidthStyles($fullWidth));
77
86
  var StyledIconWrapper = styled.span.withConfig({
78
87
  displayName: "input__StyledIconWrapper",
79
- componentId: "sc-f9d22714-3"
88
+ componentId: "sc-5e52a0cd-3"
80
89
  })([`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);
81
90
  var StyledRadioCheckboxInput = styled.input.withConfig({
82
91
  displayName: "input__StyledRadioCheckboxInput",
83
- componentId: "sc-f9d22714-4"
92
+ componentId: "sc-5e52a0cd-4"
84
93
  })([
85
94
  ``,
86
95
  `;display:inline-block;background:`,
@@ -165,7 +174,7 @@ var StyledRadioCheckboxInput = styled.input.withConfig({
165
174
  });
166
175
  var StyledCustomIconWrapper = styled.span.withConfig({
167
176
  displayName: "input__StyledCustomIconWrapper",
168
- componentId: "sc-f9d22714-5"
177
+ componentId: "sc-5e52a0cd-5"
169
178
  })([
170
179
  `position:relative;`,
171
180
  `;& svg{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none;width:24px;height:24px;object-fit:contain;color:`,
@@ -191,6 +200,7 @@ function LocalInput({ ...props }, ref) {
191
200
  $fullWidth: props.$fullWidth,
192
201
  type: props.type,
193
202
  $label: props.$label,
203
+ $size: props.$size,
194
204
  className: props.$wrapperClassName,
195
205
  children: [props.$label && /*#__PURE__*/ jsx(StyledLabel, {
196
206
  htmlFor: props.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cherry-styled-components",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
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",