cherry-styled-components 0.2.4 → 0.2.6

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-e18fe5e0-0"
118
+ componentId: "sc-1d7e93ff-0"
119
119
  })([
120
120
  `position:relative;display:inline-flex;width:`,
121
121
  `px;height:`,
@@ -123,7 +123,7 @@ 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-e18fe5e0-1"
126
+ componentId: "sc-1d7e93ff-1"
127
127
  })([
128
128
  ``,
129
129
  `;display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:50%;overflow:hidden;border:2px `,
@@ -134,9 +134,9 @@ var StyledAvatarDropzone = styled.button.withConfig({
134
134
  `px;height:`,
135
135
  `px;color:`,
136
136
  `;}& img{width:100%;height:100%;object-fit:cover;display:block;}`,
137
- ` @media (hover:hover){&:hover:not(:disabled){border-color:`,
137
+ ` &:hover:not(:disabled){border-color:`,
138
138
  `;background:`,
139
- `;}}&:focus{border-color:`,
139
+ `;}&:focus{border-color:`,
140
140
  `;box-shadow:0 0 0 4px `,
141
141
  `;}&:disabled{cursor:not-allowed;opacity:0.6;}`
142
142
  ], resetButton, ({ $hasImage }) => $hasImage ? "solid" : "dashed", ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.grayDark, ({ $size }) => avatarSizes[$size ?? "default"].icon, ({ $size }) => avatarSizes[$size ?? "default"].icon, ({ theme }) => theme.colors.primary, ({ theme, $dragOver }) => $dragOver && css([
@@ -146,12 +146,12 @@ 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-e18fe5e0-2"
149
+ componentId: "sc-1d7e93ff-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:`,
153
- `;transition:background 0.3s ease;& svg{width:14px;height:14px;}@media (hover:hover){&:hover:not(:disabled){background:`,
154
- `;}}&:disabled{cursor:not-allowed;opacity:0.6;}`
153
+ `;transition:background 0.3s ease;& svg{width:14px;height:14px;}&:hover:not(:disabled){background:`,
154
+ `;}&:disabled{cursor:not-allowed;opacity:0.6;}`
155
155
  ], resetButton, ({ theme }) => rgba(theme.colors.dark, .6), ({ theme }) => theme.colors.error);
156
156
  //#endregion
157
157
  export { AvatarDropzone };
package/dist/dropzone.js CHANGED
@@ -155,11 +155,11 @@ 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-cf1c3c01-0"
158
+ componentId: "sc-b829ff10-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-cf1c3c01-1"
162
+ componentId: "sc-b829ff10-1"
163
163
  })([
164
164
  ``,
165
165
  `;display:flex;flex-direction:`,
@@ -171,9 +171,9 @@ var StyledDropzone = styled.button.withConfig({
171
171
  `;color:`,
172
172
  `;text-align:`,
173
173
  `;transition:all 0.3s ease;`,
174
- ` @media (hover:hover){&:hover:not(:disabled){border-color:`,
174
+ ` &:hover:not(:disabled){border-color:`,
175
175
  `;background:`,
176
- `;}}&:focus{border-color:`,
176
+ `;}&:focus{border-color:`,
177
177
  `;box-shadow:0 0 0 4px `,
178
178
  `;}&:disabled{cursor:not-allowed;opacity:0.6;}`
179
179
  ], resetButton, ({ $inline }) => $inline ? "row" : "column", ({ $inline }) => $inline ? "10px" : "8px", ({ $inline }) => $inline ? "10px 14px" : "24px 20px", ({ theme }) => theme.spacing.radius.lg, ({ theme }) => theme.colors.grayLight, ({ theme, $inline }) => $inline ? "transparent" : theme.colors.light, ({ theme }) => theme.colors.grayDark, ({ $inline }) => $inline ? "left" : "center", ({ theme, $dragOver }) => $dragOver && css([
@@ -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-cf1c3c01-2"
186
+ componentId: "sc-b829ff10-2"
187
187
  })([
188
188
  `display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:`,
189
189
  `;height:`,
@@ -197,7 +197,7 @@ 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-cf1c3c01-3"
200
+ componentId: "sc-b829ff10-3"
201
201
  })([
202
202
  `display:flex;flex-direction:`,
203
203
  `;flex-wrap:wrap;align-items:baseline;gap:`,
@@ -210,7 +210,7 @@ var StyledDropPrompt = styled.span.withConfig({
210
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);
211
211
  var StyledDropHint = styled.span.withConfig({
212
212
  displayName: "dropzone__StyledDropHint",
213
- componentId: "sc-cf1c3c01-4"
213
+ componentId: "sc-b829ff10-4"
214
214
  })([
215
215
  `font-family:`,
216
216
  `;font-size:`,
@@ -221,11 +221,11 @@ var StyledDropHint = styled.span.withConfig({
221
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;`]));
222
222
  var StyledThumbs = styled.div.withConfig({
223
223
  displayName: "dropzone__StyledThumbs",
224
- componentId: "sc-cf1c3c01-5"
224
+ componentId: "sc-b829ff10-5"
225
225
  })([`display:grid;grid-template-columns:repeat(auto-fill,72px);gap:10px;`, `{grid-template-columns:repeat(auto-fill,84px);}`], mq("sm"));
226
226
  var StyledThumb = styled.div.withConfig({
227
227
  displayName: "dropzone__StyledThumb",
228
- componentId: "sc-cf1c3c01-6"
228
+ componentId: "sc-b829ff10-6"
229
229
  })([
230
230
  `position:relative;width:72px;height:72px;border-radius:`,
231
231
  `;overflow:hidden;border:solid 1px `,
@@ -235,7 +235,7 @@ var StyledThumb = styled.div.withConfig({
235
235
  ], ({ theme }) => theme.spacing.radius.lg, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.colors.light, mq("sm"));
236
236
  var StyledThumbFile = styled.span.withConfig({
237
237
  displayName: "dropzone__StyledThumbFile",
238
- componentId: "sc-cf1c3c01-7"
238
+ componentId: "sc-b829ff10-7"
239
239
  })([
240
240
  `display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:100%;height:100%;padding:6px;color:`,
241
241
  `;& svg{width:20px;height:20px;color:`,
@@ -244,12 +244,12 @@ var StyledThumbFile = styled.span.withConfig({
244
244
  ], ({ theme }) => theme.colors.grayDark, ({ theme }) => theme.colors.primary, ({ theme }) => theme.fonts.text);
245
245
  var StyledThumbRemove = styled.button.withConfig({
246
246
  displayName: "dropzone__StyledThumbRemove",
247
- componentId: "sc-cf1c3c01-8"
247
+ componentId: "sc-b829ff10-8"
248
248
  })([
249
249
  ``,
250
250
  `;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:`,
251
- `;transition:background 0.3s ease;& svg{width:14px;height:14px;}@media (hover:hover){&:hover:not(:disabled){background:`,
252
- `;}}&:disabled{cursor:not-allowed;opacity:0.6;}`
251
+ `;transition:background 0.3s ease;& svg{width:14px;height:14px;}&:hover:not(:disabled){background:`,
252
+ `;}&:disabled{cursor:not-allowed;opacity:0.6;}`
253
253
  ], resetButton, ({ theme }) => rgba(theme.colors.dark, .6), ({ theme }) => theme.colors.error);
254
254
  //#endregion
255
255
  export { Dropzone, matchesAccept };
package/dist/tabs.js CHANGED
@@ -9,11 +9,11 @@ import { rgba } from "polished";
9
9
  //#region src/lib/tabs.tsx
10
10
  var StyledTabs = styled.div.withConfig({
11
11
  displayName: "tabs__StyledTabs",
12
- componentId: "sc-7af80746-0"
12
+ componentId: "sc-225e1742-0"
13
13
  })([`width:100%;`]);
14
14
  var StyledTabsList = styled.div.withConfig({
15
15
  displayName: "tabs__StyledTabsList",
16
- componentId: "sc-7af80746-1"
16
+ componentId: "sc-225e1742-1"
17
17
  })([
18
18
  `display:flex;overflow-x:auto;border-radius:`,
19
19
  ` `,
@@ -23,7 +23,7 @@ var StyledTabsList = styled.div.withConfig({
23
23
  ], ({ theme }) => theme.spacing.radius.lg, ({ theme }) => theme.spacing.radius.lg, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.grayLight);
24
24
  var StyledTabButton = styled.button.withConfig({
25
25
  displayName: "tabs__StyledTabButton",
26
- componentId: "sc-7af80746-2"
26
+ componentId: "sc-225e1742-2"
27
27
  })([
28
28
  ``,
29
29
  `;flex:1;min-width:fit-content;padding:12px 20px;`,
@@ -38,13 +38,13 @@ var StyledTabButton = styled.button.withConfig({
38
38
  `;border-bottom-color:`,
39
39
  `;`
40
40
  ], theme.colors.primary, theme.colors.primary) : css([
41
- `@media (hover:hover){&:hover{color:`,
41
+ `&:hover{color:`,
42
42
  `;background:`,
43
- `;}}`
43
+ `;}`
44
44
  ], theme.colors.primary, rgba(theme.colors.primaryLight, .1)));
45
45
  var StyledTabPanel = styled.div.withConfig({
46
46
  displayName: "tabs__StyledTabPanel",
47
- componentId: "sc-7af80746-3"
47
+ componentId: "sc-225e1742-3"
48
48
  })([
49
49
  ``,
50
50
  `;color:`,
@@ -10,7 +10,7 @@ import { rgba } from "polished";
10
10
  //#region src/lib/theme-toggle.tsx
11
11
  var StyledThemeToggle = styled.button.withConfig({
12
12
  displayName: "theme-toggle__StyledThemeToggle",
13
- componentId: "sc-fe6f1d3-0"
13
+ componentId: "sc-aa19beba-0"
14
14
  })([
15
15
  ``,
16
16
  ` `,
@@ -20,8 +20,8 @@ var StyledThemeToggle = styled.button.withConfig({
20
20
  `;transition:all 0.3s ease;z-index:1;`,
21
21
  `}`,
22
22
  ` & svg{width:16px;height:16px;object-fit:contain;transition:all 0.3s ease;position:relative;z-index:2;}& svg[stroke]{stroke:`,
23
- `;}@media (hover:hover){&:hover svg[stroke]{stroke:`,
24
- `;}}`
23
+ `;}&:hover svg[stroke]{stroke:`,
24
+ `;}`
25
25
  ], resetButton, interactiveStyles, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.grayLight, ({ theme }) => rgba(theme.colors.primaryLight, .2), ({ theme }) => theme.isDark && css([`transform:translateX(26px);`]), ({ $hidden }) => $hidden && css([`display:none;`]), ({ theme }) => theme.colors.primary, ({ theme }) => theme.isDark ? theme.colors.primaryLight : theme.colors.primaryDark);
26
26
  function LocalThemeToggle({ onClick, ...props }, ref) {
27
27
  const { toggleTheme } = useContext(ThemeContext);
package/dist/toast.js CHANGED
@@ -52,17 +52,11 @@ function ToastNotificationsProvider({ children }) {
52
52
  }
53
53
  var StyledNotifications = styled.ul.withConfig({
54
54
  displayName: "toast__StyledNotifications",
55
- componentId: "sc-1f36b7f7-0"
56
- })([
57
- `position:fixed;z-index:99999;margin:0;padding:0;list-style:none;`,
58
- ` `,
59
- ` `,
60
- ` `,
61
- ``
62
- ], ({ $align }) => $align === "center" && css([`left:50%;transform:translateX(-50%);`]), ({ $align }) => $align === "right" && css([`right:20px;`]), ({ $align }) => $align === "left" && css([`left:20px;`]), ({ $bottom }) => $bottom ? css([`bottom:20px;`]) : css([`top:20px;`]));
55
+ componentId: "sc-623506e7-0"
56
+ })([`position:fixed;z-index:99999;margin:0;padding:0;list-style:none;left:20px;right:20px;pointer-events:none;`, ``], ({ $bottom }) => $bottom ? css([`bottom:20px;`]) : css([`top:20px;`]));
63
57
  var StyledNotificationItem = styled.li.withConfig({
64
58
  displayName: "toast__StyledNotificationItem",
65
- componentId: "sc-1f36b7f7-1"
59
+ componentId: "sc-623506e7-1"
66
60
  })([
67
61
  `display:grid;grid-template-rows:0fr;justify-items:center;margin:0;padding:0;opacity:0;pointer-events:none;transform:translateY(`,
68
62
  `);transition:opacity 0.2s ease,transform 0.2s ease,grid-template-rows 0.25s ease 0.15s,margin 0.25s ease 0.15s;`,
@@ -78,7 +72,7 @@ var StyledNotificationItem = styled.li.withConfig({
78
72
  `;}}& .message{flex:1;min-width:0;line-height:1.5;overflow-wrap:anywhere;}& .close-button{flex-shrink:0;}}`,
79
73
  ` `,
80
74
  ``
81
- ], ({ $bottom }) => $bottom ? "20px" : "-20px", ({ $align }) => $align === "right" && css([`justify-items:end;`]), ({ $align }) => $align === "left" && css([`justify-items:start;`]), ({ theme }) => theme.spacing.radius.xl, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.isDark ? theme.shadows.sm : theme.shadows.xs, ({ theme }) => theme.colors.dark, ({ theme }) => theme.fontSizes.small.lg, ({ theme }) => theme.lineHeights.small.lg, ({ theme, $color }) => theme.colors[$color], ({ $visible, $bottom }) => $visible && css([`opacity:1;pointer-events:auto;transform:translateY(0);grid-template-rows:1fr;transition:grid-template-rows 0.25s ease,margin 0.25s ease,opacity 0.2s ease 0.15s,transform 0.2s ease 0.15s;`, ``], $bottom ? css([`margin-top:10px;`]) : css([`margin-bottom:10px;`])), ({ $static }) => $static && css([`position:relative;z-index:10;`]));
75
+ ], ({ $bottom }) => $bottom ? "20px" : "-20px", ({ $align }) => $align === "right" && css([`justify-items:end;`]), ({ $align }) => $align === "left" && css([`justify-items:start;`]), ({ theme }) => theme.spacing.radius.xl, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.isDark ? theme.shadows.sm : theme.shadows.xs, ({ theme }) => theme.colors.dark, ({ theme }) => theme.fontSizes.small.lg, ({ theme }) => theme.lineHeights.small.lg, ({ theme, $color }) => theme.colors[$color], ({ $visible, $bottom }) => $visible && css([`opacity:1;transform:translateY(0);grid-template-rows:1fr;transition:grid-template-rows 0.25s ease,margin 0.25s ease,opacity 0.2s ease 0.15s,transform 0.2s ease 0.15s;& .item{pointer-events:auto;}`, ``], $bottom ? css([`margin-top:10px;`]) : css([`margin-bottom:10px;`])), ({ $static }) => $static && css([`position:relative;z-index:10;`]));
82
76
  function ToastNotifications({ $align = "center", $bottom }) {
83
77
  const { notifications } = useToastNotifications();
84
78
  return /*#__PURE__*/ jsx(StyledNotifications, {
@@ -11,8 +11,8 @@ import { rgba } from "polished";
11
11
  * elements that aren't Buttons.
12
12
  */ var interactiveStyles = css([
13
13
  `transition:all 0.3s ease;border:solid 1px transparent;box-shadow:0 0 0 0px `,
14
- `;@media (hover:hover){&:hover{border-color:`,
15
- `;}}&:focus{border-color:`,
14
+ `;&:hover{border-color:`,
15
+ `;}&:focus{border-color:`,
16
16
  `;box-shadow:0 0 0 4px `,
17
17
  `;}&:active{box-shadow:0 0 0 2px `,
18
18
  `;}`
@@ -23,8 +23,8 @@ import { rgba } from "polished";
23
23
  * same red the $error Button uses). Use for delete/remove affordances.
24
24
  */ var errorInteractiveStyles = css([
25
25
  `transition:all 0.3s ease;border:solid 1px transparent;box-shadow:0 0 0 0px `,
26
- `;@media (hover:hover){&:hover{border-color:`,
27
- `;}}&:focus{border-color:`,
26
+ `;&:hover{border-color:`,
27
+ `;}&:focus{border-color:`,
28
28
  `;box-shadow:0 0 0 4px `,
29
29
  `;}&:active{box-shadow:0 0 0 2px `,
30
30
  `;}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cherry-styled-components",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
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",
@@ -38,6 +38,7 @@
38
38
  "scripts": {
39
39
  "dev": "vite dev",
40
40
  "build": "vite build",
41
+ "build:demo": "vite build --mode demo",
41
42
  "format": "prettier --write .",
42
43
  "screenshots": "node scripts/screenshot-previews.cjs"
43
44
  },