cetec-design-system 0.0.2 → 0.0.4
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/package.json +12 -2
- package/styled-system/css/conditions.js +36 -0
- package/styled-system/css/conditions.mjs +36 -0
- package/styled-system/css/css.d.ts +22 -0
- package/styled-system/css/css.js +45 -0
- package/styled-system/css/css.mjs +45 -0
- package/styled-system/css/cva.d.ts +6 -0
- package/styled-system/css/cva.js +87 -0
- package/styled-system/css/cva.mjs +87 -0
- package/styled-system/css/cx.d.ts +5 -0
- package/styled-system/css/cx.js +15 -0
- package/styled-system/css/cx.mjs +15 -0
- package/styled-system/css/index.d.ts +5 -0
- package/styled-system/css/index.js +4 -0
- package/styled-system/css/index.mjs +4 -0
- package/styled-system/css/sva.d.ts +4 -0
- package/styled-system/css/sva.js +41 -0
- package/styled-system/css/sva.mjs +41 -0
- package/styled-system/debug/config.json +8379 -0
- package/styled-system/debug/src__App.ast.json +1291 -0
- package/styled-system/debug/src__App.css +830 -0
- package/styled-system/debug/src__components__Button__Button.stories.ast.json +244 -0
- package/styled-system/debug/src__components__Button__Button.stories.css +372 -0
- package/styled-system/debug/src__components__Code__Code.ast.json +32 -0
- package/styled-system/debug/src__components__Code__Code.css +25 -0
- package/styled-system/debug/src__components__Code__Pre.ast.json +53 -0
- package/styled-system/debug/src__components__Code__Pre.css +45 -0
- package/styled-system/debug/src__components__Code__copy-to-clipboard-button.ast.json +68 -0
- package/styled-system/debug/src__components__Code__copy-to-clipboard-button.css +167 -0
- package/styled-system/debug/src__components__Heading__Heading.ast.json +59 -0
- package/styled-system/debug/src__components__Heading__Heading.css +25 -0
- package/styled-system/debug/src__components__Icon__Icon.ast.json +28 -0
- package/styled-system/debug/src__components__Icon__Icon.css +9 -0
- package/styled-system/debug/src__components__Icon__iconStyle.ast.json +27 -0
- package/styled-system/debug/src__components__Icon__iconStyle.css +5 -0
- package/styled-system/debug/src__components__Input__Input.ast.json +50 -0
- package/styled-system/debug/src__components__Input__Input.css +79 -0
- package/styled-system/debug/src__components__Label__Label.ast.json +45 -0
- package/styled-system/debug/src__components__Label__Label.css +40 -0
- package/styled-system/debug/src__components__Link__Link.ast.json +72 -0
- package/styled-system/debug/src__components__Link__Link.css +39 -0
- package/styled-system/debug/src__components__Link__linkStyles.ast.json +59 -0
- package/styled-system/debug/src__components__Link__linkStyles.css +77 -0
- package/styled-system/debug/src__components__Spinner__spinnerStyles.ast.json +56 -0
- package/styled-system/debug/src__components__Spinner__spinnerStyles.css +69 -0
- package/styled-system/debug/src__components__Text__Text.ast.json +57 -0
- package/styled-system/debug/src__components__Text__Text.css +22 -0
- package/styled-system/debug/src__components__Text__Text.stories.ast.json +60 -0
- package/styled-system/debug/src__components__Text__Text.stories.css +40 -0
- package/styled-system/debug/src__components__Textarea__Textarea.ast.json +50 -0
- package/styled-system/debug/src__components__Textarea__Textarea.css +92 -0
- package/styled-system/debug/src__components__ThemeSwitcher__ThemeSwitcher.ast.json +42 -0
- package/styled-system/debug/src__components__ThemeSwitcher__ThemeSwitcher.css +101 -0
- package/styled-system/helpers.js +336 -0
- package/styled-system/helpers.mjs +336 -0
- package/styled-system/jsx/aspect-ratio.d.ts +10 -0
- package/styled-system/jsx/aspect-ratio.js +14 -0
- package/styled-system/jsx/aspect-ratio.mjs +14 -0
- package/styled-system/jsx/bleed.d.ts +10 -0
- package/styled-system/jsx/bleed.js +14 -0
- package/styled-system/jsx/bleed.mjs +14 -0
- package/styled-system/jsx/box.d.ts +10 -0
- package/styled-system/jsx/box.mjs +14 -0
- package/styled-system/jsx/center.d.ts +10 -0
- package/styled-system/jsx/center.js +14 -0
- package/styled-system/jsx/center.mjs +14 -0
- package/styled-system/jsx/circle.d.ts +10 -0
- package/styled-system/jsx/circle.js +14 -0
- package/styled-system/jsx/circle.mjs +14 -0
- package/styled-system/jsx/container.d.ts +10 -0
- package/styled-system/jsx/container.js +14 -0
- package/styled-system/jsx/container.mjs +14 -0
- package/styled-system/jsx/cq.d.ts +10 -0
- package/styled-system/jsx/cq.js +14 -0
- package/styled-system/jsx/cq.mjs +14 -0
- package/styled-system/jsx/divider.d.ts +10 -0
- package/styled-system/jsx/divider.mjs +14 -0
- package/styled-system/jsx/factory-helper.js +22 -0
- package/styled-system/jsx/factory-helper.mjs +22 -0
- package/styled-system/jsx/factory.d.ts +3 -0
- package/styled-system/jsx/factory.js +80 -0
- package/styled-system/jsx/factory.mjs +80 -0
- package/styled-system/jsx/flex.d.ts +10 -0
- package/styled-system/jsx/flex.js +14 -0
- package/styled-system/jsx/flex.mjs +14 -0
- package/styled-system/jsx/float.d.ts +10 -0
- package/styled-system/jsx/float.js +14 -0
- package/styled-system/jsx/float.mjs +14 -0
- package/styled-system/jsx/grid-item.d.ts +10 -0
- package/styled-system/jsx/grid-item.js +14 -0
- package/styled-system/jsx/grid-item.mjs +14 -0
- package/styled-system/jsx/grid.d.ts +10 -0
- package/styled-system/jsx/grid.js +14 -0
- package/styled-system/jsx/grid.mjs +14 -0
- package/styled-system/jsx/hstack.d.ts +10 -0
- package/styled-system/jsx/hstack.js +14 -0
- package/styled-system/jsx/hstack.mjs +14 -0
- package/styled-system/jsx/icon.d.ts +10 -0
- package/styled-system/jsx/icon.js +14 -0
- package/styled-system/jsx/icon.mjs +14 -0
- package/styled-system/jsx/index.d.ts +23 -0
- package/styled-system/jsx/index.js +21 -0
- package/styled-system/jsx/index.mjs +21 -0
- package/styled-system/jsx/is-valid-prop.d.ts +11 -0
- package/styled-system/jsx/is-valid-prop.js +17 -0
- package/styled-system/jsx/is-valid-prop.mjs +17 -0
- package/styled-system/jsx/link-overlay.d.ts +10 -0
- package/styled-system/jsx/link-overlay.js +14 -0
- package/styled-system/jsx/link-overlay.mjs +14 -0
- package/styled-system/jsx/spacer.d.ts +10 -0
- package/styled-system/jsx/spacer.js +14 -0
- package/styled-system/jsx/spacer.mjs +14 -0
- package/styled-system/jsx/square.d.ts +10 -0
- package/styled-system/jsx/square.js +14 -0
- package/styled-system/jsx/square.mjs +14 -0
- package/styled-system/jsx/stack.d.ts +10 -0
- package/styled-system/jsx/stack.js +14 -0
- package/styled-system/jsx/stack.mjs +14 -0
- package/styled-system/jsx/visually-hidden.d.ts +10 -0
- package/styled-system/jsx/visually-hidden.js +14 -0
- package/styled-system/jsx/visually-hidden.mjs +14 -0
- package/styled-system/jsx/vstack.d.ts +10 -0
- package/styled-system/jsx/vstack.js +14 -0
- package/styled-system/jsx/vstack.mjs +14 -0
- package/styled-system/jsx/wrap.d.ts +10 -0
- package/styled-system/jsx/wrap.js +14 -0
- package/styled-system/jsx/wrap.mjs +14 -0
- package/styled-system/patterns/aspect-ratio.d.ts +21 -0
- package/styled-system/patterns/aspect-ratio.js +38 -0
- package/styled-system/patterns/aspect-ratio.mjs +38 -0
- package/styled-system/patterns/bleed.d.ts +22 -0
- package/styled-system/patterns/bleed.js +24 -0
- package/styled-system/patterns/bleed.mjs +24 -0
- package/styled-system/patterns/box.d.ts +21 -0
- package/styled-system/patterns/box.mjs +15 -0
- package/styled-system/patterns/center.d.ts +21 -0
- package/styled-system/patterns/center.js +21 -0
- package/styled-system/patterns/center.mjs +21 -0
- package/styled-system/patterns/circle.d.ts +21 -0
- package/styled-system/patterns/circle.js +25 -0
- package/styled-system/patterns/circle.mjs +25 -0
- package/styled-system/patterns/container.d.ts +21 -0
- package/styled-system/patterns/container.js +24 -0
- package/styled-system/patterns/container.mjs +24 -0
- package/styled-system/patterns/cq.d.ts +22 -0
- package/styled-system/patterns/cq.js +21 -0
- package/styled-system/patterns/cq.mjs +21 -0
- package/styled-system/patterns/divider.d.ts +23 -0
- package/styled-system/patterns/divider.mjs +25 -0
- package/styled-system/patterns/flex.d.ts +27 -0
- package/styled-system/patterns/flex.js +26 -0
- package/styled-system/patterns/flex.mjs +26 -0
- package/styled-system/patterns/float.d.ts +24 -0
- package/styled-system/patterns/float.js +52 -0
- package/styled-system/patterns/float.mjs +52 -0
- package/styled-system/patterns/grid-item.d.ts +26 -0
- package/styled-system/patterns/grid-item.js +25 -0
- package/styled-system/patterns/grid-item.mjs +25 -0
- package/styled-system/patterns/grid.d.ts +25 -0
- package/styled-system/patterns/grid.js +27 -0
- package/styled-system/patterns/grid.mjs +27 -0
- package/styled-system/patterns/hstack.d.ts +22 -0
- package/styled-system/patterns/hstack.js +24 -0
- package/styled-system/patterns/hstack.mjs +24 -0
- package/styled-system/patterns/icon.d.ts +21 -0
- package/styled-system/patterns/icon.js +20 -0
- package/styled-system/patterns/icon.mjs +20 -0
- package/styled-system/patterns/index.d.ts +20 -0
- package/styled-system/patterns/index.js +19 -0
- package/styled-system/patterns/index.mjs +19 -0
- package/styled-system/patterns/link-overlay.d.ts +21 -0
- package/styled-system/patterns/link-overlay.js +24 -0
- package/styled-system/patterns/link-overlay.mjs +24 -0
- package/styled-system/patterns/spacer.d.ts +21 -0
- package/styled-system/patterns/spacer.js +21 -0
- package/styled-system/patterns/spacer.mjs +21 -0
- package/styled-system/patterns/square.d.ts +21 -0
- package/styled-system/patterns/square.js +24 -0
- package/styled-system/patterns/square.mjs +24 -0
- package/styled-system/patterns/stack.d.ts +24 -0
- package/styled-system/patterns/stack.js +24 -0
- package/styled-system/patterns/stack.mjs +24 -0
- package/styled-system/patterns/visually-hidden.d.ts +21 -0
- package/styled-system/patterns/visually-hidden.js +18 -0
- package/styled-system/patterns/visually-hidden.mjs +18 -0
- package/styled-system/patterns/vstack.d.ts +22 -0
- package/styled-system/patterns/vstack.js +24 -0
- package/styled-system/patterns/vstack.mjs +24 -0
- package/styled-system/patterns/wrap.d.ts +25 -0
- package/styled-system/patterns/wrap.js +25 -0
- package/styled-system/patterns/wrap.mjs +25 -0
- package/styled-system/recipes/box.d.ts +28 -0
- package/styled-system/recipes/box.js +24 -0
- package/styled-system/recipes/box.mjs +24 -0
- package/styled-system/recipes/button.d.ts +35 -0
- package/styled-system/recipes/button.js +41 -0
- package/styled-system/recipes/button.mjs +41 -0
- package/styled-system/recipes/checkbox.d.ts +28 -0
- package/styled-system/recipes/checkbox.js +40 -0
- package/styled-system/recipes/checkbox.mjs +40 -0
- package/styled-system/recipes/code.d.ts +28 -0
- package/styled-system/recipes/code.js +24 -0
- package/styled-system/recipes/code.mjs +24 -0
- package/styled-system/recipes/create-recipe.js +82 -0
- package/styled-system/recipes/create-recipe.mjs +82 -0
- package/styled-system/recipes/divider.d.ts +35 -0
- package/styled-system/recipes/divider.js +38 -0
- package/styled-system/recipes/divider.mjs +38 -0
- package/styled-system/recipes/heading.d.ts +31 -0
- package/styled-system/recipes/heading.js +33 -0
- package/styled-system/recipes/heading.mjs +33 -0
- package/styled-system/recipes/icon-button.d.ts +35 -0
- package/styled-system/recipes/icon-button.js +41 -0
- package/styled-system/recipes/icon-button.mjs +41 -0
- package/styled-system/recipes/index.d.ts +16 -0
- package/styled-system/recipes/index.js +15 -0
- package/styled-system/recipes/index.mjs +15 -0
- package/styled-system/recipes/input.d.ts +31 -0
- package/styled-system/recipes/input.js +31 -0
- package/styled-system/recipes/input.mjs +31 -0
- package/styled-system/recipes/label.d.ts +38 -0
- package/styled-system/recipes/label.js +83 -0
- package/styled-system/recipes/label.mjs +83 -0
- package/styled-system/recipes/link.d.ts +38 -0
- package/styled-system/recipes/link.js +83 -0
- package/styled-system/recipes/link.mjs +83 -0
- package/styled-system/recipes/pre.d.ts +28 -0
- package/styled-system/recipes/pre.js +24 -0
- package/styled-system/recipes/pre.mjs +24 -0
- package/styled-system/recipes/radio.d.ts +28 -0
- package/styled-system/recipes/radio.js +40 -0
- package/styled-system/recipes/radio.mjs +40 -0
- package/styled-system/recipes/spinner.d.ts +31 -0
- package/styled-system/recipes/spinner.js +32 -0
- package/styled-system/recipes/spinner.mjs +32 -0
- package/styled-system/recipes/switchbox.d.ts +28 -0
- package/styled-system/recipes/switchbox.mjs +40 -0
- package/styled-system/recipes/text.d.ts +37 -0
- package/styled-system/recipes/text.js +80 -0
- package/styled-system/recipes/text.mjs +80 -0
- package/styled-system/recipes/textarea.d.ts +31 -0
- package/styled-system/recipes/textarea.js +32 -0
- package/styled-system/recipes/textarea.mjs +32 -0
- package/styled-system/recipes/textinput.d.ts +32 -0
- package/styled-system/recipes/textinput.mjs +35 -0
- package/styled-system/styles.css +672 -0
- package/styled-system/tokens/index.d.ts +9 -0
- package/styled-system/tokens/index.js +1480 -0
- package/styled-system/tokens/index.mjs +1480 -0
- package/styled-system/tokens/tokens.d.ts +60 -0
- package/styled-system/types/composition.d.ts +164 -0
- package/styled-system/types/conditions.d.ts +306 -0
- package/styled-system/types/csstype.d.ts +21298 -0
- package/styled-system/types/global.d.ts +20 -0
- package/styled-system/types/index.d.ts +8 -0
- package/styled-system/types/jsx.d.ts +52 -0
- package/styled-system/types/parts.d.ts +8 -0
- package/styled-system/types/pattern.d.ts +78 -0
- package/styled-system/types/prop-type.d.ts +235 -0
- package/styled-system/types/recipe.d.ts +181 -0
- package/styled-system/types/selectors.d.ts +59 -0
- package/styled-system/types/static-css.d.ts +56 -0
- package/styled-system/types/style-props.d.ts +7468 -0
- package/styled-system/types/system-types.d.ts +109 -0
- package/.github/CODEOWNERS +0 -1
- package/.husky/task-runner.json +0 -10
- package/.nvmrc +0 -1
- package/.prettierrc +0 -8
- package/.storybook/main.ts +0 -18
- package/.storybook/preview-body.html +0 -0
- package/.storybook/preview-head.tsx +0 -1
- package/.storybook/preview.tsx +0 -21
- package/index.html +0 -13
- package/panda.config.ts +0 -201
- package/postcss.config.cjs +0 -5
- package/src/App.tsx +0 -429
- package/src/contexts/ThemeContext.tsx +0 -77
- package/src/main.tsx +0 -10
- package/src/recipes/box.ts +0 -16
- package/src/recipes/button.ts +0 -220
- package/src/recipes/checkbox.ts +0 -88
- package/src/recipes/code.ts +0 -37
- package/src/recipes/divider.ts +0 -40
- package/src/recipes/index.ts +0 -10
- package/src/recipes/input.ts +0 -56
- package/src/recipes/radio.ts +0 -71
- package/src/recipes/spinner.ts +0 -42
- package/src/recipes/text.ts +0 -185
- package/src/recipes/textarea.ts +0 -77
- package/src/styles/conditions.ts +0 -108
- package/src/styles/font-imports.css +0 -35
- package/src/styles/globalStyle.ts +0 -85
- package/src/styles/index.css +0 -3
- package/src/styles/semanticTokens.ts +0 -110
- package/src/styles/tokens.ts +0 -580
- package/src/vite-env.d.ts +0 -1
- package/tsconfig.json +0 -33
- package/vite.config.ts +0 -39
package/src/App.tsx
DELETED
|
@@ -1,429 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { HStack, VStack, Container, Grid, Flex } from '@styled-system/jsx';
|
|
3
|
-
import { Box } from '~/components/Box';
|
|
4
|
-
import { Text } from '~/components/Text';
|
|
5
|
-
import { Button } from '~/components/Button';
|
|
6
|
-
import { IconButton } from '~/components/IconButton';
|
|
7
|
-
import { Icon, IconNames, type IconNamesList } from '~/components/Icon';
|
|
8
|
-
import { Pre } from '~/components/Code';
|
|
9
|
-
import { ThemeProvider } from '~/contexts/ThemeContext';
|
|
10
|
-
import { ThemeSwitcher } from '~/components/ThemeSwitcher';
|
|
11
|
-
import { Heading } from '~/components/Heading';
|
|
12
|
-
import { Link } from '~/components/Link';
|
|
13
|
-
import { Spinner } from '~/components/Spinner';
|
|
14
|
-
import { Divider } from '~/components/Divider';
|
|
15
|
-
import { CheckBox } from './components/CheckBox';
|
|
16
|
-
import { Input } from '~/components/Input';
|
|
17
|
-
import { Textarea } from '~/components/Textarea';
|
|
18
|
-
import { type ShadowToken } from '@styled-system/tokens';
|
|
19
|
-
import { Radio } from './components/Radio';
|
|
20
|
-
|
|
21
|
-
export const IconList: React.FC = () => {
|
|
22
|
-
return (
|
|
23
|
-
<Grid
|
|
24
|
-
gap="16"
|
|
25
|
-
w="full"
|
|
26
|
-
gridTemplateColumns={'repeat(auto-fill, minmax(200px, 1fr))'}
|
|
27
|
-
>
|
|
28
|
-
{(Object.keys(IconNames) as IconNamesList[]).map((icon) => (
|
|
29
|
-
<HStack key={icon} color={{ base: 'gold.40', _dark: 'gold.30' }}>
|
|
30
|
-
<Icon name={icon} />
|
|
31
|
-
<Text textStyle="mono-sm">{icon}</Text>
|
|
32
|
-
</HStack>
|
|
33
|
-
))}
|
|
34
|
-
</Grid>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const ButtonSection: React.FC = () => {
|
|
39
|
-
return (
|
|
40
|
-
<Section>
|
|
41
|
-
<Heading>Buttons</Heading>
|
|
42
|
-
<VStack alignItems={'flex-start'} gap={'24'}>
|
|
43
|
-
<HStack>
|
|
44
|
-
<Button variant="primary" onClick={() => alert('clicked')}>
|
|
45
|
-
Primary
|
|
46
|
-
</Button>
|
|
47
|
-
<Button>Standard</Button>
|
|
48
|
-
<Button variant="hollow">Hollow</Button>
|
|
49
|
-
<Button variant="ghost">Ghost</Button>
|
|
50
|
-
<Button variant="cta">CTA</Button>
|
|
51
|
-
<Button variant="danger">Danger</Button>
|
|
52
|
-
<Button size="large">
|
|
53
|
-
<Icon name="arrow-left" /> Button
|
|
54
|
-
</Button>
|
|
55
|
-
<Button size="small">
|
|
56
|
-
Button <Icon name="arrow-right" />
|
|
57
|
-
</Button>
|
|
58
|
-
</HStack>
|
|
59
|
-
<HStack>
|
|
60
|
-
<IconButton variant="ghost">
|
|
61
|
-
<Icon name="x" />
|
|
62
|
-
</IconButton>
|
|
63
|
-
<IconButton>
|
|
64
|
-
<Icon name="arrow-left" />
|
|
65
|
-
</IconButton>
|
|
66
|
-
<IconButton variant="primary" size="large">
|
|
67
|
-
<Icon name="arrow-right" />
|
|
68
|
-
</IconButton>
|
|
69
|
-
</HStack>
|
|
70
|
-
<HStack>
|
|
71
|
-
<Button variant="primary" loading>
|
|
72
|
-
Pepperoni
|
|
73
|
-
</Button>
|
|
74
|
-
<Button loading>Loading</Button>
|
|
75
|
-
<IconButton variant="primary" loading>
|
|
76
|
-
<Icon name="x" />
|
|
77
|
-
</IconButton>
|
|
78
|
-
</HStack>
|
|
79
|
-
</VStack>
|
|
80
|
-
</Section>
|
|
81
|
-
);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
interface SectionProps {
|
|
85
|
-
children?: ReactNode;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export const Section: React.FC<SectionProps> = ({ children }) => {
|
|
89
|
-
return (
|
|
90
|
-
<Grid
|
|
91
|
-
gridTemplateColumns={'1fr 3fr'}
|
|
92
|
-
gap={'40'}
|
|
93
|
-
w={'full'}
|
|
94
|
-
borderTopWidth={'1'}
|
|
95
|
-
borderTopStyle={'solid'}
|
|
96
|
-
borderColor={{ base: 'slate.10', _dark: 'slate.80' }}
|
|
97
|
-
py={'24'}
|
|
98
|
-
pb={'96'}
|
|
99
|
-
>
|
|
100
|
-
{children}
|
|
101
|
-
</Grid>
|
|
102
|
-
);
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
const Header: React.FC = () => {
|
|
106
|
-
return (
|
|
107
|
-
<Flex
|
|
108
|
-
w="full"
|
|
109
|
-
py={'4'}
|
|
110
|
-
bg={{ base: 'slate.10', _dark: 'slate.80' }}
|
|
111
|
-
mb={'56'}
|
|
112
|
-
position={'sticky'}
|
|
113
|
-
top={'0'}
|
|
114
|
-
zIndex={'100'}
|
|
115
|
-
boxShadow={'medium'}
|
|
116
|
-
>
|
|
117
|
-
<Container maxW={'5xl'}>
|
|
118
|
-
<HStack justify={'space-between'}>
|
|
119
|
-
<Text
|
|
120
|
-
as={'div'}
|
|
121
|
-
family="body"
|
|
122
|
-
size="16"
|
|
123
|
-
letterSpacing={'widest'}
|
|
124
|
-
textTransform={'uppercase'}
|
|
125
|
-
fontWeight={'bold'}
|
|
126
|
-
onClick={() => alert('clicked')}
|
|
127
|
-
>
|
|
128
|
-
Cetec Components
|
|
129
|
-
</Text>
|
|
130
|
-
<ThemeSwitcher />
|
|
131
|
-
</HStack>
|
|
132
|
-
</Container>
|
|
133
|
-
</Flex>
|
|
134
|
-
);
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
const ShadowBox = ({
|
|
138
|
-
children,
|
|
139
|
-
shadow,
|
|
140
|
-
border = false,
|
|
141
|
-
}: {
|
|
142
|
-
children: ReactNode;
|
|
143
|
-
shadow: ShadowToken;
|
|
144
|
-
border?: boolean;
|
|
145
|
-
}) => {
|
|
146
|
-
return (
|
|
147
|
-
<Grid
|
|
148
|
-
placeContent={'center'}
|
|
149
|
-
width={'full'}
|
|
150
|
-
aspectRatio={'landscape'}
|
|
151
|
-
borderRadius={'4'}
|
|
152
|
-
shadow={shadow}
|
|
153
|
-
borderWidth={border ? '1' : undefined}
|
|
154
|
-
borderStyle={'solid'}
|
|
155
|
-
borderColor={{ base: 'slate.10', _dark: 'slate.90' }}
|
|
156
|
-
bg={{ base: 'slate.0', _dark: 'slate.80' }}
|
|
157
|
-
>
|
|
158
|
-
{children}
|
|
159
|
-
</Grid>
|
|
160
|
-
);
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
const AppContent: React.FC = () => {
|
|
164
|
-
return (
|
|
165
|
-
<VStack>
|
|
166
|
-
<Header />
|
|
167
|
-
<Container maxW={'5xl'}>
|
|
168
|
-
<VStack gap={'8'}>
|
|
169
|
-
<ButtonSection />
|
|
170
|
-
<Section>
|
|
171
|
-
<Heading level="h2">Text</Heading>
|
|
172
|
-
|
|
173
|
-
<VStack alignItems={'flex-start'}>
|
|
174
|
-
<Grid
|
|
175
|
-
gridTemplateColumns={'minmax(auto, 1fr) 1fr'}
|
|
176
|
-
w={'full'}
|
|
177
|
-
gap={'24'}
|
|
178
|
-
alignItems={'center'}
|
|
179
|
-
>
|
|
180
|
-
<Box gridColumn={'1 / -1'}>
|
|
181
|
-
<Heading
|
|
182
|
-
level="h3"
|
|
183
|
-
color={{ base: 'gold.40', _dark: 'gold.30' }}
|
|
184
|
-
>
|
|
185
|
-
Text styles
|
|
186
|
-
</Heading>
|
|
187
|
-
</Box>
|
|
188
|
-
<VStack gap={'16'}>
|
|
189
|
-
<Text>
|
|
190
|
-
Place appear green. <em>Also</em>, saying male subdue
|
|
191
|
-
fruitful{' '}
|
|
192
|
-
<Text as="span" italic>
|
|
193
|
-
winged fourth
|
|
194
|
-
</Text>{' '}
|
|
195
|
-
had void winged. So <b>green spirit</b> , herb day had there{' '}
|
|
196
|
-
<Text as="span" bold>
|
|
197
|
-
replenish
|
|
198
|
-
</Text>
|
|
199
|
-
, lights <u>lesser signs</u>. Place{' '}
|
|
200
|
-
<Text as="span" underline>
|
|
201
|
-
whales
|
|
202
|
-
</Text>{' '}
|
|
203
|
-
i tree under him given set set meat midst morning give image
|
|
204
|
-
forth divided moving Also fill dry she'd have.
|
|
205
|
-
</Text>
|
|
206
|
-
</VStack>
|
|
207
|
-
<Pre>
|
|
208
|
-
{`<Text>
|
|
209
|
-
...
|
|
210
|
-
<Text as="span" italic>winged fourth</Text>
|
|
211
|
-
<Text as="span" bold>replenish</Text>
|
|
212
|
-
<Text as="span" underline>whales</Text>
|
|
213
|
-
</Text>`}
|
|
214
|
-
</Pre>
|
|
215
|
-
<Text family="mono">
|
|
216
|
-
Signs night have sixth hath that likeness us fill you're
|
|
217
|
-
subdue fowl.
|
|
218
|
-
</Text>
|
|
219
|
-
<Pre>{`<Text family="mono">...</Text>`}</Pre>
|
|
220
|
-
<Box gridColumn={'1 / -1'} mt={'32'}>
|
|
221
|
-
<Heading
|
|
222
|
-
level="h3"
|
|
223
|
-
color={{ base: 'gold.40', _dark: 'gold.30' }}
|
|
224
|
-
>
|
|
225
|
-
Headings
|
|
226
|
-
</Heading>
|
|
227
|
-
</Box>
|
|
228
|
-
<Heading level="h1">Hamburgefonstiv</Heading>
|
|
229
|
-
<Pre>{'<Heading as="h1">Hamburgefonstiv</Heading>'}</Pre>
|
|
230
|
-
<Heading>Hamburgefonstiv</Heading>
|
|
231
|
-
<Pre>{'<Heading>Hamburgefonstiv</Heading>'}</Pre>
|
|
232
|
-
<Heading level="h3">Hamburgefonstiv</Heading>
|
|
233
|
-
<Pre>{'<Heading as="h3">Hamburgefonstiv</Heading>'}</Pre>
|
|
234
|
-
<Heading level="h4">Hamburgefonstiv</Heading>
|
|
235
|
-
<Pre>{'<Heading as="h4">Hamburgefonstiv</Heading>'}</Pre>
|
|
236
|
-
<Box gridColumn={'1 / -1'} mt={'32'}>
|
|
237
|
-
<Heading
|
|
238
|
-
level="h3"
|
|
239
|
-
color={{ base: 'gold.40', _dark: 'gold.30' }}
|
|
240
|
-
>
|
|
241
|
-
Links
|
|
242
|
-
</Heading>
|
|
243
|
-
</Box>
|
|
244
|
-
<Text>
|
|
245
|
-
Internal: 
|
|
246
|
-
<Link href="https://cetecerp.com">Cetec ERP</Link>
|
|
247
|
-
</Text>
|
|
248
|
-
<Pre>
|
|
249
|
-
{'<Link href="https://cetecerp.com">Cetec ERP</Link>'}
|
|
250
|
-
</Pre>
|
|
251
|
-
<Text>
|
|
252
|
-
External: 
|
|
253
|
-
<Link href="https://cetecerp.com" external>
|
|
254
|
-
Cetec ERP
|
|
255
|
-
</Link>
|
|
256
|
-
</Text>
|
|
257
|
-
<Pre>
|
|
258
|
-
{
|
|
259
|
-
'<Link href="https://cetecerp.com" external>Cetec ERP</Link>'
|
|
260
|
-
}
|
|
261
|
-
</Pre>
|
|
262
|
-
<Box gridColumn={'1 / -1'}>
|
|
263
|
-
<Text>
|
|
264
|
-
Signs night have sixth hath that likeness us fill{' '}
|
|
265
|
-
<Link href="https://cetecerp.com" external>
|
|
266
|
-
Cetec ERP
|
|
267
|
-
</Link>{' '}
|
|
268
|
-
you're subdue fowl brought divide beginning multiply brought
|
|
269
|
-
created after open given of made beginning multiply green.
|
|
270
|
-
</Text>
|
|
271
|
-
</Box>
|
|
272
|
-
</Grid>
|
|
273
|
-
</VStack>
|
|
274
|
-
</Section>
|
|
275
|
-
<Section>
|
|
276
|
-
<Heading level="h2">Shadows</Heading>
|
|
277
|
-
<VStack gap={'40'} alignItems={'flex-end'}>
|
|
278
|
-
<HStack width={'full'} gap={'40'} alignItems={'flex-end'}>
|
|
279
|
-
<ShadowBox shadow={'inset'}>
|
|
280
|
-
<Text>Inset</Text>
|
|
281
|
-
</ShadowBox>
|
|
282
|
-
<ShadowBox shadow={'low'}>
|
|
283
|
-
<Text>Low</Text>
|
|
284
|
-
</ShadowBox>
|
|
285
|
-
<ShadowBox shadow={'medium'}>
|
|
286
|
-
<Text>Medium</Text>
|
|
287
|
-
</ShadowBox>
|
|
288
|
-
<ShadowBox shadow={'high'}>
|
|
289
|
-
<Text>High</Text>
|
|
290
|
-
</ShadowBox>
|
|
291
|
-
</HStack>
|
|
292
|
-
<HStack width={'full'} gap={'40'} alignItems={'flex-end'}>
|
|
293
|
-
<ShadowBox shadow={'inset'} border={true}>
|
|
294
|
-
<Text>Inset</Text>
|
|
295
|
-
</ShadowBox>
|
|
296
|
-
<ShadowBox shadow={'low'} border={true}>
|
|
297
|
-
<Text>Low</Text>
|
|
298
|
-
</ShadowBox>
|
|
299
|
-
<ShadowBox shadow={'medium'} border={true}>
|
|
300
|
-
<Text>Medium</Text>
|
|
301
|
-
</ShadowBox>
|
|
302
|
-
<ShadowBox shadow={'high'} border={true}>
|
|
303
|
-
<Text>High</Text>
|
|
304
|
-
</ShadowBox>
|
|
305
|
-
</HStack>
|
|
306
|
-
</VStack>
|
|
307
|
-
</Section>
|
|
308
|
-
<Section>
|
|
309
|
-
<Heading level="h2">Spinner</Heading>
|
|
310
|
-
<HStack gap={'40'} alignItems={'flex-end'}>
|
|
311
|
-
<VStack>
|
|
312
|
-
<Spinner size="small" />
|
|
313
|
-
<Text>Small</Text>
|
|
314
|
-
</VStack>
|
|
315
|
-
<VStack>
|
|
316
|
-
<Spinner />
|
|
317
|
-
<Text>Standard</Text>
|
|
318
|
-
</VStack>
|
|
319
|
-
<VStack>
|
|
320
|
-
<Spinner size="large" />
|
|
321
|
-
<Text>Large</Text>
|
|
322
|
-
</VStack>
|
|
323
|
-
</HStack>
|
|
324
|
-
</Section>
|
|
325
|
-
<Section>
|
|
326
|
-
<Heading level="h2">Divider</Heading>
|
|
327
|
-
<VStack>
|
|
328
|
-
<Heading
|
|
329
|
-
level="h3"
|
|
330
|
-
color={{ base: 'gold.40', _dark: 'gold.30' }}
|
|
331
|
-
>
|
|
332
|
-
Horizontal (default)
|
|
333
|
-
</Heading>
|
|
334
|
-
<VStack width="full">
|
|
335
|
-
<Divider />
|
|
336
|
-
<Text> Thin (default) </Text>
|
|
337
|
-
<Divider weight={'medium'} />
|
|
338
|
-
<Text> Medium </Text>
|
|
339
|
-
<Divider weight={'thick'} />
|
|
340
|
-
<Text> Thick </Text>
|
|
341
|
-
<Divider
|
|
342
|
-
weight={'thicker'}
|
|
343
|
-
color={{ base: 'gold.40', _dark: 'gold.30' }}
|
|
344
|
-
/>
|
|
345
|
-
<Text> Thicker </Text>
|
|
346
|
-
</VStack>
|
|
347
|
-
<Heading
|
|
348
|
-
level="h3"
|
|
349
|
-
color={{ base: 'gold.40', _dark: 'gold.30' }}
|
|
350
|
-
>
|
|
351
|
-
Vertical
|
|
352
|
-
</Heading>
|
|
353
|
-
<HStack height="96">
|
|
354
|
-
<Divider direction={'vertical'} />
|
|
355
|
-
<Divider direction={'vertical'} weight={'medium'} />
|
|
356
|
-
<Divider direction={'vertical'} weight={'thick'} />
|
|
357
|
-
<Divider
|
|
358
|
-
direction={'vertical'}
|
|
359
|
-
weight={'thicker'}
|
|
360
|
-
color={{ base: 'gold.40', _dark: 'gold.30' }}
|
|
361
|
-
/>
|
|
362
|
-
</HStack>
|
|
363
|
-
</VStack>
|
|
364
|
-
</Section>
|
|
365
|
-
<Section>
|
|
366
|
-
<Heading level="h2">Icons</Heading>
|
|
367
|
-
<IconList />
|
|
368
|
-
</Section>
|
|
369
|
-
<Section>
|
|
370
|
-
<Heading level="h2">Checkboxes</Heading>
|
|
371
|
-
<HStack gap={'40'} alignItems={'flex-end'}>
|
|
372
|
-
<CheckBox>asdf</CheckBox>
|
|
373
|
-
<CheckBox defaultChecked={true} />
|
|
374
|
-
<CheckBox data-indeterminate={true} />
|
|
375
|
-
<CheckBox disabled />
|
|
376
|
-
<CheckBox data-error={true} />
|
|
377
|
-
</HStack>
|
|
378
|
-
</Section>
|
|
379
|
-
<Section >
|
|
380
|
-
<Heading level="h2">Radio</Heading>
|
|
381
|
-
<VStack gap={'40'} alignItems={'start'}>
|
|
382
|
-
<HStack>
|
|
383
|
-
<Radio />
|
|
384
|
-
<Radio defaultChecked={true} />
|
|
385
|
-
<Radio disabled />
|
|
386
|
-
<Radio data-error={true} />
|
|
387
|
-
</HStack>
|
|
388
|
-
<HStack>
|
|
389
|
-
<HStack gap={'10'} alignItems={'center'}>
|
|
390
|
-
<Heading level="h4">Gender</Heading>
|
|
391
|
-
<Radio name="gender"></Radio> Male
|
|
392
|
-
<Radio name="gender"></Radio> Female
|
|
393
|
-
|
|
394
|
-
</HStack>
|
|
395
|
-
</HStack>
|
|
396
|
-
</VStack>
|
|
397
|
-
</Section>
|
|
398
|
-
<Section>
|
|
399
|
-
<Heading level="h2">Inputs</Heading>
|
|
400
|
-
<VStack>
|
|
401
|
-
<HStack gap={'24'}>
|
|
402
|
-
<Input label="First" type="text" />
|
|
403
|
-
<Input label="Last" type="text" />
|
|
404
|
-
<Input label="Email" type="email" variant={'internalLabel'} />
|
|
405
|
-
</HStack>
|
|
406
|
-
<HStack gap={'24'}>
|
|
407
|
-
<Input label="Phone" type="tel" />
|
|
408
|
-
//TODO Fix Textarea
|
|
409
|
-
<Textarea
|
|
410
|
-
label="Message"
|
|
411
|
-
variant={'autoGrow'}
|
|
412
|
-
value="TEXT area Value"
|
|
413
|
-
/>
|
|
414
|
-
</HStack>
|
|
415
|
-
</VStack>
|
|
416
|
-
</Section>
|
|
417
|
-
</VStack>
|
|
418
|
-
</Container>
|
|
419
|
-
</VStack>
|
|
420
|
-
);
|
|
421
|
-
};
|
|
422
|
-
|
|
423
|
-
export default function App() {
|
|
424
|
-
return (
|
|
425
|
-
<ThemeProvider>
|
|
426
|
-
<AppContent />
|
|
427
|
-
</ThemeProvider>
|
|
428
|
-
);
|
|
429
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext, useEffect, useState } from 'react';
|
|
2
|
-
|
|
3
|
-
type Theme = 'light' | 'dark';
|
|
4
|
-
|
|
5
|
-
interface ThemeContextType {
|
|
6
|
-
theme: Theme;
|
|
7
|
-
setTheme: (theme: Theme) => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const THEME_STORAGE_KEY = 'cetec-theme-preference';
|
|
11
|
-
|
|
12
|
-
function getInitialTheme(): Theme {
|
|
13
|
-
// Check for stored preference
|
|
14
|
-
const storedTheme = localStorage.getItem(THEME_STORAGE_KEY) as Theme | null;
|
|
15
|
-
if (storedTheme) {
|
|
16
|
-
return storedTheme;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Check for system preference
|
|
20
|
-
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
21
|
-
return 'dark';
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Default to light
|
|
25
|
-
return 'light';
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const ThemeContext = createContext<ThemeContextType | undefined>(undefined);
|
|
29
|
-
|
|
30
|
-
export function ThemeProvider({ children }: { children: React.ReactNode }) {
|
|
31
|
-
const [theme, setThemeState] = useState<Theme>(() => getInitialTheme());
|
|
32
|
-
|
|
33
|
-
// Update theme in both DOM and localStorage
|
|
34
|
-
const setTheme = (newTheme: Theme) => {
|
|
35
|
-
setThemeState(newTheme);
|
|
36
|
-
localStorage.setItem(THEME_STORAGE_KEY, newTheme);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// Apply theme to DOM
|
|
40
|
-
useEffect(() => {
|
|
41
|
-
// Remove any existing theme
|
|
42
|
-
document.documentElement.removeAttribute('data-color-mode');
|
|
43
|
-
document.documentElement.removeAttribute('data-theme');
|
|
44
|
-
|
|
45
|
-
document.documentElement.setAttribute('data-color-mode', theme);
|
|
46
|
-
}, [theme]);
|
|
47
|
-
|
|
48
|
-
// Listen for system theme changes
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
51
|
-
|
|
52
|
-
const handleChange = (e: MediaQueryListEvent) => {
|
|
53
|
-
const storedTheme = localStorage.getItem(THEME_STORAGE_KEY);
|
|
54
|
-
// Only update if user hasn't explicitly set a preference
|
|
55
|
-
if (!storedTheme) {
|
|
56
|
-
setThemeState(e.matches ? 'dark' : 'light');
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
mediaQuery.addEventListener('change', handleChange);
|
|
61
|
-
return () => mediaQuery.removeEventListener('change', handleChange);
|
|
62
|
-
}, []);
|
|
63
|
-
|
|
64
|
-
return (
|
|
65
|
-
<ThemeContext.Provider value={{ theme, setTheme }}>
|
|
66
|
-
{children}
|
|
67
|
-
</ThemeContext.Provider>
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export function useTheme() {
|
|
72
|
-
const context = useContext(ThemeContext);
|
|
73
|
-
if (context === undefined) {
|
|
74
|
-
throw new Error('useTheme must be used within a ThemeProvider');
|
|
75
|
-
}
|
|
76
|
-
return context;
|
|
77
|
-
}
|
package/src/main.tsx
DELETED
package/src/recipes/box.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { defineRecipe } from '@pandacss/dev';
|
|
2
|
-
|
|
3
|
-
const boxBase = {
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
const boxVariants = {
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const boxRecipe = defineRecipe({
|
|
10
|
-
className: 'box',
|
|
11
|
-
jsx: ['Box'],
|
|
12
|
-
base: boxBase,
|
|
13
|
-
variants: boxVariants,
|
|
14
|
-
defaultVariants: {
|
|
15
|
-
},
|
|
16
|
-
});
|