cherry-styled-components 0.2.9 → 0.2.10
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/README.md +19 -0
- package/dist/accordion.js +12 -10
- package/dist/index.js +1 -2
- package/dist/input.js +18 -11
- package/dist/select.js +9 -5
- package/dist/tabs.js +7 -7
- package/dist/utils/global.js +1 -3
- package/dist/utils/index.d.ts +0 -1
- package/package.json +2 -2
- package/dist/utils/icons.d.ts +0 -9
- package/dist/utils/icons.js +0 -75
package/README.md
CHANGED
|
@@ -107,6 +107,25 @@ if (!req.cookies.get("theme")?.value && hint) {
|
|
|
107
107
|
|
|
108
108
|
In a client-only app (like this repo's demo, see `src/main.tsx`), resolve the initial theme synchronously from the cookie, `localStorage`, or `matchMedia` before rendering and pass it as `$initial`.
|
|
109
109
|
|
|
110
|
+
## AI assistant skill
|
|
111
|
+
|
|
112
|
+
Cherry ships a guide that teaches Claude and other LLMs to build with the library correctly: use Cherry components for every button and form control, read design values from the theme instead of hardcoding them, and wire up the provider. It lives in [`skills/cherry-design-system`](./skills/cherry-design-system) and is documentation only (it is not part of the published npm package).
|
|
113
|
+
|
|
114
|
+
Install it with the [`skills` CLI](https://github.com/vercel-labs/skills), a cross-agent installer that supports Claude Code, Cursor, Codex, and many others and detects your agent automatically:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# add to the current project
|
|
118
|
+
npx -y skills add cherry-design-system/styled-components
|
|
119
|
+
|
|
120
|
+
# preview what would be installed
|
|
121
|
+
npx -y skills add cherry-design-system/styled-components --list
|
|
122
|
+
|
|
123
|
+
# install globally for Claude Code, no prompts
|
|
124
|
+
npx -y skills add cherry-design-system/styled-components --skill cherry-design-system -g -a claude-code -y
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Update later with `npx skills update cherry-design-system`. `skills` is a third-party CLI; if you would rather not use it, an Agent Skill is just a folder, so copy `skills/cherry-design-system` into `.claude/skills/` (per project) or `~/.claude/skills/` (personal). For other agents, put the folder's `AGENTS.md` at your repo root. The `references/` files load on demand. See the [skill README](./skills/cherry-design-system/README.md) for per-tool setup.
|
|
128
|
+
|
|
110
129
|
## Development
|
|
111
130
|
|
|
112
131
|
To work on the library itself, clone the repo and use pnpm. Node.js v20+ is required for the dev tooling.
|
package/dist/accordion.js
CHANGED
|
@@ -8,7 +8,7 @@ import styled, { css } from "styled-components";
|
|
|
8
8
|
//#region src/lib/accordion.tsx
|
|
9
9
|
var StyledAccordion = styled.div.withConfig({
|
|
10
10
|
displayName: "accordion__StyledAccordion",
|
|
11
|
-
componentId: "sc-
|
|
11
|
+
componentId: "sc-20594240-0"
|
|
12
12
|
})([
|
|
13
13
|
`text-align:left;border-radius:`,
|
|
14
14
|
`;margin:0;`,
|
|
@@ -16,21 +16,23 @@ var StyledAccordion = styled.div.withConfig({
|
|
|
16
16
|
`;`,
|
|
17
17
|
``
|
|
18
18
|
], ({ theme, $inline }) => $inline ? "0" : theme.spacing.radius.lg, ({ theme }) => styledText(theme), ({ theme }) => theme.colors.light, ({ theme, $inline }) => !$inline && css([`border:solid 1px `, `;`], theme.colors.grayLight));
|
|
19
|
-
var StyledAccordionTitle = styled.
|
|
19
|
+
var StyledAccordionTitle = styled.button.withConfig({
|
|
20
20
|
displayName: "accordion__StyledAccordionTitle",
|
|
21
|
-
componentId: "sc-
|
|
21
|
+
componentId: "sc-20594240-1"
|
|
22
22
|
})([
|
|
23
|
-
`cursor:pointer;margin:0;`,
|
|
23
|
+
`appearance:none;border:none;background:none;font-family:inherit;text-align:left;width:100%;box-sizing:border-box;font-weight:700;cursor:pointer;margin:0;`,
|
|
24
24
|
`;color:`,
|
|
25
25
|
`;transition:color 0.3s ease;position:relative;padding:`,
|
|
26
26
|
`;&:hover{color:`,
|
|
27
|
-
`;}
|
|
27
|
+
`;}&:focus-visible{border-radius:`,
|
|
28
|
+
`;outline:solid 2px `,
|
|
29
|
+
`;border-bottom-color:transparent;}& .lucide-chevron-down{position:absolute;top:50%;transform:translateY(-50%);right:`,
|
|
28
30
|
`;transition:transform 0.3s ease;`,
|
|
29
31
|
`}`
|
|
30
|
-
], ({ theme }) => styledText(theme), ({ theme }) => theme.colors.primary, ({ $inline }) => $inline ? "8px 40px 8px 0" : "20px 50px 20px 20px", ({ theme }) => theme.colors.primaryDark, ({ $inline }) => $inline ? "0" : "20px", ({ $isOpen }) => $isOpen && css([`transform:translateY(-50%) rotate(180deg);`]));
|
|
32
|
+
], ({ theme }) => styledText(theme), ({ theme }) => theme.colors.primary, ({ $inline }) => $inline ? "8px 40px 8px 0" : "20px 50px 20px 20px", ({ theme }) => theme.colors.primaryDark, ({ theme }) => theme.spacing.radius.xs, ({ theme }) => theme.colors.primary, ({ $inline }) => $inline ? "0" : "20px", ({ $isOpen }) => $isOpen && css([`transform:translateY(-50%) rotate(180deg);`]));
|
|
31
33
|
var StyledAccordionContent = styled.div.withConfig({
|
|
32
34
|
displayName: "accordion__StyledAccordionContent",
|
|
33
|
-
componentId: "sc-
|
|
35
|
+
componentId: "sc-20594240-2"
|
|
34
36
|
})([
|
|
35
37
|
`display:grid;grid-template-rows:`,
|
|
36
38
|
`;visibility:`,
|
|
@@ -38,11 +40,11 @@ var StyledAccordionContent = styled.div.withConfig({
|
|
|
38
40
|
], ({ $isOpen }) => $isOpen ? "1fr" : "0fr", ({ $isOpen }) => $isOpen ? "visible" : "hidden");
|
|
39
41
|
var StyledAccordionInner = styled.div.withConfig({
|
|
40
42
|
displayName: "accordion__StyledAccordionInner",
|
|
41
|
-
componentId: "sc-
|
|
43
|
+
componentId: "sc-20594240-3"
|
|
42
44
|
})([`min-height:0;overflow:clip;`]);
|
|
43
45
|
var StyledAccordionBody = styled.div.withConfig({
|
|
44
46
|
displayName: "accordion__StyledAccordionBody",
|
|
45
|
-
componentId: "sc-
|
|
47
|
+
componentId: "sc-20594240-4"
|
|
46
48
|
})([
|
|
47
49
|
``,
|
|
48
50
|
`;color:`,
|
|
@@ -64,10 +66,10 @@ function Accordion({ children, title, onToggle, $inline, defaultOpen, open, ...r
|
|
|
64
66
|
$inline,
|
|
65
67
|
...rest,
|
|
66
68
|
children: [/*#__PURE__*/ jsxs(StyledAccordionTitle, {
|
|
69
|
+
type: "button",
|
|
67
70
|
onClick: handleToggle,
|
|
68
71
|
$isOpen: isOpen,
|
|
69
72
|
$inline,
|
|
70
|
-
role: "button",
|
|
71
73
|
"aria-expanded": isOpen,
|
|
72
74
|
children: [
|
|
73
75
|
title,
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { GlobalStyles } from "./utils/global.js";
|
|
2
|
-
import { IconArrow, IconCalendar, IconCheck } from "./utils/icons.js";
|
|
3
2
|
import { breakpoints, colors, colorsDark, fontSizes, fonts, lineHeights, mq, shadows, shadowsDark, spacing, theme, themeDark } from "./utils/theme.js";
|
|
4
3
|
import { errorInteractiveStyles, formElementHeightStyles, fullWidthStyles, generateAlignContentStyles, generateAlignItemsStyles, generateColSpanStyles, generateColsStyles, generateDirectionStyles, generateGapStyles, generateJustifyContentStyles, generatePaddingStyles, interactiveStyles, resetButton, resetInput, statusBorderStyles } from "./utils/mixins.js";
|
|
5
4
|
import { createTypographyStyle, styledBlockquote, styledButton, styledButtonBig, styledCode, styledH1, styledH2, styledH3, styledH4, styledH5, styledH6, styledHero1, styledHero2, styledHero3, styledInput, styledInputBig, styledSmall, styledStrong, styledText } from "./utils/typography.js";
|
|
@@ -31,4 +30,4 @@ import { Textarea } from "./textarea.js";
|
|
|
31
30
|
import { ThemeToggle } from "./theme-toggle.js";
|
|
32
31
|
import { StyledNotificationItem, StyledNotifications, ToastNotifications, ToastNotificationsContext, ToastNotificationsProvider, useToastNotifications } from "./toast.js";
|
|
33
32
|
import { Toggle } from "./toggle.js";
|
|
34
|
-
export { Accordion, AvatarDropzone, Box, Button, CherryThemeProvider, ClientThemeProvider, Col, Container, Dropzone, Flex, GlobalStyles, Grid, Icon,
|
|
33
|
+
export { Accordion, AvatarDropzone, Box, Button, CherryThemeProvider, ClientThemeProvider, Col, Container, Dropzone, Flex, GlobalStyles, Grid, Icon, IconButton, Input, MaxWidth, Modal, Password, Range, Select, Space, StyledComponentsRegistry, StyledIconWrapper, StyledInputWrapper, StyledLabel, StyledNotificationItem, StyledNotifications, TabContent, Tabs, Textarea, ThemeContext, ThemeToggle, ToastNotifications, ToastNotificationsContext, ToastNotificationsProvider, Toggle, breakpoints, buttonStyles, colors, colorsDark, createThemeInitScript, createTypographyStyle, errorInteractiveStyles, fontSizes, fonts, formElementHeightStyles, fullWidthStyles, generateAlignContentStyles, generateAlignItemsStyles, generateColSpanStyles, generateColsStyles, generateDirectionStyles, generateGapStyles, generateJustifyContentStyles, generatePaddingStyles, iconButtonStyles, interactiveStyles, lineHeights, matchesAccept, mq, resetButton, resetInput, resolveTheme, shadows, shadowsDark, spacing, statusBorderStyles, styledBlockquote, styledButton, styledButtonBig, styledCode, styledH1, styledH2, styledH3, styledH4, styledH5, styledH6, styledHero1, styledHero2, styledHero3, styledInput, styledInputBig, styledSmall, styledStrong, styledText, theme, themeDark, themeInitScript, useOnClickOutside, useToastNotifications };
|
package/dist/input.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import { IconCalendar, IconCheck } from "./utils/icons.js";
|
|
4
3
|
import { formElementHeightStyles, fullWidthStyles, resetButton, resetInput, statusBorderStyles } from "./utils/mixins.js";
|
|
4
|
+
import { Icon } from "./icon.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { forwardRef } from "react";
|
|
7
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-f294a26b-0"
|
|
12
12
|
})([
|
|
13
13
|
`display:inline-flex;flex-wrap:`,
|
|
14
14
|
`;align-items:center;`,
|
|
@@ -20,7 +20,7 @@ var StyledInputWrapper = styled.span.withConfig({
|
|
|
20
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));
|
|
21
21
|
var StyledLabel = styled.label.withConfig({
|
|
22
22
|
displayName: "input__StyledLabel",
|
|
23
|
-
componentId: "sc-
|
|
23
|
+
componentId: "sc-f294a26b-1"
|
|
24
24
|
})([
|
|
25
25
|
`display:inline-block;color:`,
|
|
26
26
|
`;font-size:`,
|
|
@@ -29,7 +29,7 @@ var StyledLabel = styled.label.withConfig({
|
|
|
29
29
|
], ({ theme }) => theme.colors.grayDark, ({ theme }) => theme.fontSizes.small.lg, ({ theme }) => theme.lineHeights.small.lg);
|
|
30
30
|
var StyledInput = styled.input.withConfig({
|
|
31
31
|
displayName: "input__StyledInput",
|
|
32
|
-
componentId: "sc-
|
|
32
|
+
componentId: "sc-f294a26b-2"
|
|
33
33
|
})([
|
|
34
34
|
``,
|
|
35
35
|
`;`,
|
|
@@ -85,11 +85,15 @@ var StyledInput = styled.input.withConfig({
|
|
|
85
85
|
`, ({ $fullWidth }) => fullWidthStyles($fullWidth));
|
|
86
86
|
var StyledIconWrapper = styled.span.withConfig({
|
|
87
87
|
displayName: "input__StyledIconWrapper",
|
|
88
|
-
componentId: "sc-
|
|
89
|
-
})([
|
|
88
|
+
componentId: "sc-f294a26b-3"
|
|
89
|
+
})([
|
|
90
|
+
`display:inline-flex;position:relative;line-height:0;min-width:fit-content;& em{display:block;border-radius:50%;background:`,
|
|
91
|
+
`;}& svg,& em{object-fit:contain;position:absolute;top:50%;left:50%;color:`,
|
|
92
|
+
`;transform:translate(-50%,-50%) scale(0.7);opacity:0;pointer-events:none;transition:all 0.3s ease;}`
|
|
93
|
+
], ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primary);
|
|
90
94
|
var StyledRadioCheckboxInput = styled.input.withConfig({
|
|
91
95
|
displayName: "input__StyledRadioCheckboxInput",
|
|
92
|
-
componentId: "sc-
|
|
96
|
+
componentId: "sc-f294a26b-4"
|
|
93
97
|
})([
|
|
94
98
|
``,
|
|
95
99
|
`;display:inline-block;background:`,
|
|
@@ -103,7 +107,7 @@ var StyledRadioCheckboxInput = styled.input.withConfig({
|
|
|
103
107
|
` `,
|
|
104
108
|
` `,
|
|
105
109
|
` `,
|
|
106
|
-
` &:checked ~ svg,&:checked ~ em{opacity:1;transform:translate(-50%,-50%) scale(1);}`
|
|
110
|
+
` & ~ svg{stroke-width:6px;}&:checked ~ svg,&:checked ~ em{opacity:1;transform:translate(-50%,-50%) scale(1);}`
|
|
107
111
|
], resetButton, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primaryLight, ({ type, theme }) => type === "checkbox" ? `border-radius: ${theme.spacing.radius.xs};` : `border-radius: 50%;`, ({ disabled, theme }) => disabled && `cursor: not-allowed;
|
|
108
112
|
background: ${theme.colors.grayLight};
|
|
109
113
|
border: solid 2px ${theme.colors.gray};
|
|
@@ -174,7 +178,7 @@ var StyledRadioCheckboxInput = styled.input.withConfig({
|
|
|
174
178
|
});
|
|
175
179
|
var StyledCustomIconWrapper = styled.span.withConfig({
|
|
176
180
|
displayName: "input__StyledCustomIconWrapper",
|
|
177
|
-
componentId: "sc-
|
|
181
|
+
componentId: "sc-f294a26b-5"
|
|
178
182
|
})([
|
|
179
183
|
`position:relative;`,
|
|
180
184
|
`;& svg{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none;width:24px;height:24px;object-fit:contain;color:`,
|
|
@@ -191,7 +195,7 @@ function LocalInput({ ...props }, ref) {
|
|
|
191
195
|
...props,
|
|
192
196
|
"aria-invalid": props.$error || void 0,
|
|
193
197
|
ref
|
|
194
|
-
}), !props.disabled && props.type === "checkbox" ? /*#__PURE__*/ jsx(
|
|
198
|
+
}), !props.disabled && props.type === "checkbox" ? /*#__PURE__*/ jsx(Icon, { name: "Check" }) : /*#__PURE__*/ jsx("em", {})] }), props.$label && /*#__PURE__*/ jsx(StyledLabel, {
|
|
195
199
|
htmlFor: props.id,
|
|
196
200
|
children: props.$label
|
|
197
201
|
})]
|
|
@@ -217,7 +221,10 @@ function LocalInput({ ...props }, ref) {
|
|
|
217
221
|
ref
|
|
218
222
|
}),
|
|
219
223
|
props.$iconPosition === "right" && props.$icon && props.$icon,
|
|
220
|
-
(props.type === "date" || props.type === "datetime-local" || props.type === "month" || props.type === "week" || props.type === "time") && /*#__PURE__*/ jsx(
|
|
224
|
+
(props.type === "date" || props.type === "datetime-local" || props.type === "month" || props.type === "week" || props.type === "time") && /*#__PURE__*/ jsx(Icon, {
|
|
225
|
+
name: "CalendarDays",
|
|
226
|
+
className: "icon-calendar"
|
|
227
|
+
})
|
|
221
228
|
]
|
|
222
229
|
})]
|
|
223
230
|
});
|
package/dist/select.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import { IconArrow } from "./utils/icons.js";
|
|
4
3
|
import { formElementHeightStyles, fullWidthStyles, resetButton, resetInput, statusBorderStyles } from "./utils/mixins.js";
|
|
4
|
+
import { Icon } from "./icon.js";
|
|
5
5
|
import { StyledInputWrapper, StyledLabel } from "./input.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { forwardRef } from "react";
|
|
@@ -9,7 +9,7 @@ import styled from "styled-components";
|
|
|
9
9
|
//#region src/lib/select.tsx
|
|
10
10
|
var StyledSelect = styled.select.withConfig({
|
|
11
11
|
displayName: "select__StyledSelect",
|
|
12
|
-
componentId: "sc-
|
|
12
|
+
componentId: "sc-65975d95-0"
|
|
13
13
|
})([
|
|
14
14
|
``,
|
|
15
15
|
`;`,
|
|
@@ -38,8 +38,12 @@ var StyledSelect = styled.select.withConfig({
|
|
|
38
38
|
`, ({ $fullWidth }) => fullWidthStyles($fullWidth));
|
|
39
39
|
var StyledIconWrapper = styled.span.withConfig({
|
|
40
40
|
displayName: "select__StyledIconWrapper",
|
|
41
|
-
componentId: "sc-
|
|
42
|
-
})([
|
|
41
|
+
componentId: "sc-65975d95-1"
|
|
42
|
+
})([
|
|
43
|
+
`position:relative;`,
|
|
44
|
+
` & svg{position:absolute;top:50%;right:15px;width:24px;height:24px;color:`,
|
|
45
|
+
`;transform:translateY(-50%) rotate(0);transition:all 0.3s ease;pointer-events:none;}& select{padding-right:40px;}& select:active:not([disabled]) ~ svg,& select:focus:not([disabled]) ~ svg{transform:translateY(-50%) rotate(180deg);}`
|
|
46
|
+
], ({ $fullWidth }) => fullWidthStyles($fullWidth), ({ theme }) => theme.colors.primary);
|
|
43
47
|
function LocalSelect({ ...props }, ref) {
|
|
44
48
|
return /*#__PURE__*/ jsxs(StyledInputWrapper, {
|
|
45
49
|
$fullWidth: props.$fullWidth,
|
|
@@ -55,7 +59,7 @@ function LocalSelect({ ...props }, ref) {
|
|
|
55
59
|
"aria-invalid": props.$error || void 0,
|
|
56
60
|
ref,
|
|
57
61
|
children: props.children
|
|
58
|
-
}), /*#__PURE__*/ jsx(
|
|
62
|
+
}), /*#__PURE__*/ jsx(Icon, { name: "ChevronDown" })]
|
|
59
63
|
})]
|
|
60
64
|
});
|
|
61
65
|
}
|
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-
|
|
12
|
+
componentId: "sc-a3686838-0"
|
|
13
13
|
})([`width:100%;`]);
|
|
14
14
|
var StyledTabsList = styled.div.withConfig({
|
|
15
15
|
displayName: "tabs__StyledTabsList",
|
|
16
|
-
componentId: "sc-
|
|
16
|
+
componentId: "sc-a3686838-1"
|
|
17
17
|
})([
|
|
18
18
|
`display:flex;overflow-x:auto;border-radius:`,
|
|
19
19
|
` `,
|
|
@@ -23,17 +23,17 @@ 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-
|
|
26
|
+
componentId: "sc-a3686838-2"
|
|
27
27
|
})([
|
|
28
28
|
``,
|
|
29
29
|
`;flex:1;min-width:fit-content;padding:12px 20px;`,
|
|
30
|
-
`;font-weight:
|
|
30
|
+
`;font-weight:700;color:`,
|
|
31
31
|
`;border-bottom:solid 3px transparent;transition:color 0.2s ease,background 0.2s ease,border-color 0.2s ease;@media (prefers-reduced-motion:reduce){transition:none;}&:not(:last-child){border-right:solid 1px `,
|
|
32
32
|
`;}&:focus-visible{border-radius:`,
|
|
33
33
|
`;outline:solid 2px `,
|
|
34
|
-
`;outline-offset:-
|
|
34
|
+
`;outline-offset:-2px;border-bottom-color:transparent;}`,
|
|
35
35
|
``
|
|
36
|
-
], resetButton, ({ theme }) => styledText(theme), ({ theme }) => theme.colors.dark, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.spacing.radius.
|
|
36
|
+
], resetButton, ({ theme }) => styledText(theme), ({ theme }) => theme.colors.dark, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.spacing.radius.lg, ({ theme }) => theme.colors.primary, ({ theme, $isActive }) => $isActive ? css([
|
|
37
37
|
`color:`,
|
|
38
38
|
`;border-bottom-color:`,
|
|
39
39
|
`;`
|
|
@@ -44,7 +44,7 @@ var StyledTabButton = styled.button.withConfig({
|
|
|
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-
|
|
47
|
+
componentId: "sc-a3686838-3"
|
|
48
48
|
})([
|
|
49
49
|
``,
|
|
50
50
|
`;color:`,
|
package/dist/utils/global.js
CHANGED
|
@@ -6,10 +6,8 @@ var GlobalStyles = (theme) => createGlobalStyle([
|
|
|
6
6
|
`html,body{margin:0;padding:0;min-height:100%;scroll-behavior:smooth;background-color:`,
|
|
7
7
|
`;}body{font-family:"Inter",sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;}*{box-sizing:border-box;min-width:0;}pre,code,kbd,samp{font-family:monospace,monospace;}pre,code,kbd,samp,blockquote,p,a,h1,h2,h3,h4,h5,h6,ul li,ol li{margin:0;padding:0;color:`,
|
|
8
8
|
`;}a{color:`,
|
|
9
|
-
`;}a:focus-visible{outline:none;border-radius:`,
|
|
10
|
-
`;box-shadow:0 0 0 2px `,
|
|
11
9
|
`;}ol,ul{list-style:none;margin:0;padding:0;}figure{margin:0;}fieldset{appearance:none;border:none;}button,input,a,img,svg,svg *{transition:all 0.3s ease;}strong,b{font-weight:700;}hr{margin:20px 0;border:none;border-bottom:1px solid `,
|
|
12
10
|
`;}`
|
|
13
|
-
], theme.colors.light, theme.colors.dark, theme.isDark ? theme.colors.dark : theme.colors.primary, theme.
|
|
11
|
+
], theme.colors.light, theme.colors.dark, theme.isDark ? theme.colors.dark : theme.colors.primary, theme.colors.grayLight);
|
|
14
12
|
//#endregion
|
|
15
13
|
export { GlobalStyles };
|
package/dist/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cherry-styled-components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
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",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"styled-components": "^6.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@swc/plugin-styled-components": "^12.
|
|
55
|
+
"@swc/plugin-styled-components": "^12.15.0",
|
|
56
56
|
"@types/node": "^26.1.0",
|
|
57
57
|
"@types/react": "^19.2.17",
|
|
58
58
|
"@types/react-dom": "^19.2.3",
|
package/dist/utils/icons.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { Theme } from './theme';
|
|
3
|
-
interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
4
|
-
theme?: Theme;
|
|
5
|
-
}
|
|
6
|
-
declare function IconCheck({ ...props }: IconProps): React.JSX.Element;
|
|
7
|
-
declare function IconArrow({ ...props }: IconProps): React.JSX.Element;
|
|
8
|
-
declare function IconCalendar({ ...props }: IconProps): React.JSX.Element;
|
|
9
|
-
export { IconCheck, IconArrow, IconCalendar };
|
package/dist/utils/icons.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { useTheme } from "styled-components";
|
|
5
|
-
//#region src/lib/utils/icons.tsx
|
|
6
|
-
function IconCheck({ ...props }) {
|
|
7
|
-
const theme = useTheme();
|
|
8
|
-
return /*#__PURE__*/ jsx("svg", {
|
|
9
|
-
width: "12",
|
|
10
|
-
height: "10",
|
|
11
|
-
viewBox: "0 0 12 10",
|
|
12
|
-
fill: "none",
|
|
13
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
-
...props,
|
|
15
|
-
children: /*#__PURE__*/ jsx("path", {
|
|
16
|
-
d: "M10 2L4.4 8L2 5.75",
|
|
17
|
-
stroke: theme.colors.primary,
|
|
18
|
-
strokeWidth: "3",
|
|
19
|
-
strokeLinecap: "round",
|
|
20
|
-
strokeLinejoin: "round"
|
|
21
|
-
})
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function IconArrow({ ...props }) {
|
|
25
|
-
const theme = useTheme();
|
|
26
|
-
return /*#__PURE__*/ jsx("svg", {
|
|
27
|
-
width: "16",
|
|
28
|
-
height: "10",
|
|
29
|
-
viewBox: "0 0 16 10",
|
|
30
|
-
fill: "none",
|
|
31
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
32
|
-
...props,
|
|
33
|
-
children: /*#__PURE__*/ jsx("path", {
|
|
34
|
-
d: "M2 2L8 8L14 2",
|
|
35
|
-
stroke: theme.colors.primary,
|
|
36
|
-
strokeWidth: "3",
|
|
37
|
-
strokeLinecap: "round",
|
|
38
|
-
strokeLinejoin: "round"
|
|
39
|
-
})
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
function IconCalendar({ ...props }) {
|
|
43
|
-
return /*#__PURE__*/ jsxs("svg", {
|
|
44
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
45
|
-
width: "24",
|
|
46
|
-
height: "24",
|
|
47
|
-
viewBox: "0 0 24 24",
|
|
48
|
-
fill: "none",
|
|
49
|
-
stroke: useTheme().colors.primary,
|
|
50
|
-
strokeWidth: "2",
|
|
51
|
-
strokeLinecap: "round",
|
|
52
|
-
strokeLinejoin: "round",
|
|
53
|
-
...props,
|
|
54
|
-
children: [
|
|
55
|
-
/*#__PURE__*/ jsx("path", { d: "M8 2v4" }),
|
|
56
|
-
/*#__PURE__*/ jsx("path", { d: "M16 2v4" }),
|
|
57
|
-
/*#__PURE__*/ jsx("rect", {
|
|
58
|
-
width: "18",
|
|
59
|
-
height: "18",
|
|
60
|
-
x: "3",
|
|
61
|
-
y: "4",
|
|
62
|
-
rx: "2"
|
|
63
|
-
}),
|
|
64
|
-
/*#__PURE__*/ jsx("path", { d: "M3 10h18" }),
|
|
65
|
-
/*#__PURE__*/ jsx("path", { d: "M8 14h.01" }),
|
|
66
|
-
/*#__PURE__*/ jsx("path", { d: "M12 14h.01" }),
|
|
67
|
-
/*#__PURE__*/ jsx("path", { d: "M16 14h.01" }),
|
|
68
|
-
/*#__PURE__*/ jsx("path", { d: "M8 18h.01" }),
|
|
69
|
-
/*#__PURE__*/ jsx("path", { d: "M12 18h.01" }),
|
|
70
|
-
/*#__PURE__*/ jsx("path", { d: "M16 18h.01" })
|
|
71
|
-
]
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
//#endregion
|
|
75
|
-
export { IconArrow, IconCalendar, IconCheck };
|