@jordan-mace/chaser-design-system 1.2.3 → 1.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.
- package/dist/components/Accordion/Accordion.d.ts +16 -0
- package/dist/components/Accordion/Accordion.js +43 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +1 -0
- package/dist/components/Accordion/styles.css.d.ts +7 -0
- package/dist/components/Accordion/styles.css.js +65 -0
- package/dist/components/Alert/Alert.d.ts +9 -0
- package/dist/components/Alert/Alert.js +8 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/Alert/index.js +1 -0
- package/dist/components/Alert/styles.css.d.ts +4 -0
- package/dist/components/Alert/styles.css.js +54 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +9 -0
- package/dist/components/AspectRatio/AspectRatio.js +12 -0
- package/dist/components/AspectRatio/index.d.ts +2 -0
- package/dist/components/AspectRatio/index.js +1 -0
- package/dist/components/Avatar/Avatar.d.ts +11 -0
- package/dist/components/Avatar/Avatar.js +13 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Avatar/index.js +1 -0
- package/dist/components/Avatar/styles.css.d.ts +4 -0
- package/dist/components/Avatar/styles.css.js +151 -0
- package/dist/components/Badge/Badge.d.ts +11 -0
- package/dist/components/Badge/Badge.js +8 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.js +1 -0
- package/dist/components/Badge/styles.css.d.ts +5 -0
- package/dist/components/Badge/styles.css.js +77 -0
- package/dist/components/Box/Box.d.ts +11 -0
- package/dist/components/Box/Box.js +54 -0
- package/dist/components/Box/index.d.ts +2 -0
- package/dist/components/Box/index.js +1 -0
- package/dist/components/Box/reset.css.d.ts +1 -0
- package/dist/components/Box/reset.css.js +15 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +12 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +8 -0
- package/dist/components/Breadcrumb/index.d.ts +1 -0
- package/dist/components/Breadcrumb/index.js +1 -0
- package/dist/components/Breadcrumb/styles.css.d.ts +6 -0
- package/dist/components/Breadcrumb/styles.css.js +50 -0
- package/dist/components/Button/Button.d.ts +9 -0
- package/dist/components/Button/Button.js +8 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.js +1 -0
- package/dist/components/Button/styles.css.d.ts +2 -0
- package/dist/components/Button/styles.css.js +30 -0
- package/dist/components/Card/Card.d.ts +8 -0
- package/dist/components/Card/Card.js +8 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Card/index.js +1 -0
- package/dist/components/Card/styles.css.d.ts +2 -0
- package/dist/components/Card/styles.css.js +25 -0
- package/dist/components/Checkbox/Checkbox.d.ts +6 -0
- package/dist/components/Checkbox/Checkbox.js +25 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Checkbox/index.js +1 -0
- package/dist/components/Checkbox/styles.css.d.ts +3 -0
- package/dist/components/Checkbox/styles.css.js +31 -0
- package/dist/components/Collapse/Collapse.d.ts +12 -0
- package/dist/components/Collapse/Collapse.js +56 -0
- package/dist/components/Collapse/index.d.ts +2 -0
- package/dist/components/Collapse/index.js +1 -0
- package/dist/components/Collapse/styles.css.d.ts +3 -0
- package/dist/components/Collapse/styles.css.js +36 -0
- package/dist/components/Combobox/Combobox.d.ts +23 -0
- package/dist/components/Combobox/Combobox.js +104 -0
- package/dist/components/Combobox/index.d.ts +2 -0
- package/dist/components/Combobox/index.js +1 -0
- package/dist/components/Combobox/styles.css.d.ts +13 -0
- package/dist/components/Combobox/styles.css.js +142 -0
- package/dist/components/Container/Container.d.ts +11 -0
- package/dist/components/Container/Container.js +21 -0
- package/dist/components/Container/index.d.ts +2 -0
- package/dist/components/Container/index.js +1 -0
- package/dist/components/Divider/Divider.d.ts +9 -0
- package/dist/components/Divider/Divider.js +8 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Divider/index.js +1 -0
- package/dist/components/Divider/styles.css.d.ts +4 -0
- package/dist/components/Divider/styles.css.js +41 -0
- package/dist/components/Drawer/Drawer.d.ts +16 -0
- package/dist/components/Drawer/Drawer.js +65 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Drawer/index.js +1 -0
- package/dist/components/Drawer/styles.css.d.ts +8 -0
- package/dist/components/Drawer/styles.css.js +125 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +23 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +43 -0
- package/dist/components/DropdownMenu/index.d.ts +2 -0
- package/dist/components/DropdownMenu/index.js +1 -0
- package/dist/components/DropdownMenu/styles.css.d.ts +9 -0
- package/dist/components/DropdownMenu/styles.css.js +93 -0
- package/dist/components/EmptyState/EmptyState.d.ts +10 -0
- package/dist/components/EmptyState/EmptyState.js +8 -0
- package/dist/components/EmptyState/index.d.ts +2 -0
- package/dist/components/EmptyState/index.js +1 -0
- package/dist/components/EmptyState/styles.css.d.ts +5 -0
- package/dist/components/EmptyState/styles.css.js +30 -0
- package/dist/components/FileUpload/FileUpload.d.ts +27 -0
- package/dist/components/FileUpload/FileUpload.js +102 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/FileUpload/index.js +1 -0
- package/dist/components/FileUpload/styles.css.d.ts +19 -0
- package/dist/components/FileUpload/styles.css.js +145 -0
- package/dist/components/Form/Form.d.ts +7 -0
- package/dist/components/Form/Form.js +8 -0
- package/dist/components/Form/FormInput.d.ts +5 -0
- package/dist/components/Form/FormInput.js +9 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Form/index.js +2 -0
- package/dist/components/Form/styles.css.d.ts +2 -0
- package/dist/components/Form/styles.css.js +11 -0
- package/dist/components/Grid/Grid.d.ts +13 -0
- package/dist/components/Grid/Grid.js +25 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Grid/index.js +1 -0
- package/dist/components/Icon/Icon.d.ts +12 -0
- package/dist/components/Icon/Icon.js +21 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Icon/index.js +1 -0
- package/dist/components/Icon/styles.css.d.ts +1 -0
- package/dist/components/Icon/styles.css.js +9 -0
- package/dist/components/Input/Input.d.ts +7 -0
- package/dist/components/Input/Input.js +9 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/index.js +1 -0
- package/dist/components/Input/styles.css.d.ts +2 -0
- package/dist/components/Input/styles.css.js +8 -0
- package/dist/components/Kbd/Kbd.d.ts +7 -0
- package/dist/components/Kbd/Kbd.js +6 -0
- package/dist/components/Kbd/index.d.ts +2 -0
- package/dist/components/Kbd/index.js +1 -0
- package/dist/components/Kbd/styles.css.d.ts +1 -0
- package/dist/components/Kbd/styles.css.js +16 -0
- package/dist/components/List/List.d.ts +5 -0
- package/dist/components/List/List.js +7 -0
- package/dist/components/List/ListItem.d.ts +5 -0
- package/dist/components/List/ListItem.js +7 -0
- package/dist/components/List/index.d.ts +2 -0
- package/dist/components/List/index.js +2 -0
- package/dist/components/List/styles.css.d.ts +2 -0
- package/dist/components/List/styles.css.js +11 -0
- package/dist/components/Modal/Modal.d.ts +13 -0
- package/dist/components/Modal/Modal.js +35 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/index.js +1 -0
- package/dist/components/Modal/styles.css.d.ts +7 -0
- package/dist/components/Modal/styles.css.js +92 -0
- package/dist/components/Navbar/Navbar.d.ts +6 -0
- package/dist/components/Navbar/Navbar.js +8 -0
- package/dist/components/Navbar/NavbarItem.d.ts +6 -0
- package/dist/components/Navbar/NavbarItem.js +8 -0
- package/dist/components/Navbar/index.d.ts +2 -0
- package/dist/components/Navbar/index.js +2 -0
- package/dist/components/Navbar/styles.css.d.ts +2 -0
- package/dist/components/Navbar/styles.css.js +3 -0
- package/dist/components/NumberInput/NumberInput.d.ts +20 -0
- package/dist/components/NumberInput/NumberInput.js +39 -0
- package/dist/components/NumberInput/index.d.ts +2 -0
- package/dist/components/NumberInput/index.js +1 -0
- package/dist/components/NumberInput/styles.css.d.ts +10 -0
- package/dist/components/NumberInput/styles.css.js +117 -0
- package/dist/components/Pagination/Pagination.d.ts +10 -0
- package/dist/components/Pagination/Pagination.js +47 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/index.js +1 -0
- package/dist/components/Pagination/styles.css.d.ts +4 -0
- package/dist/components/Pagination/styles.css.js +44 -0
- package/dist/components/Popover/Popover.d.ts +18 -0
- package/dist/components/Popover/Popover.js +55 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Popover/index.js +1 -0
- package/dist/components/Popover/styles.css.d.ts +11 -0
- package/dist/components/Popover/styles.css.js +185 -0
- package/dist/components/Progress/Progress.d.ts +10 -0
- package/dist/components/Progress/Progress.js +9 -0
- package/dist/components/Progress/index.d.ts +1 -0
- package/dist/components/Progress/index.js +1 -0
- package/dist/components/Progress/styles.css.d.ts +4 -0
- package/dist/components/Progress/styles.css.js +71 -0
- package/dist/components/Radio/Radio.d.ts +16 -0
- package/dist/components/Radio/Radio.js +25 -0
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/Radio/index.js +1 -0
- package/dist/components/Radio/styles.css.d.ts +5 -0
- package/dist/components/Radio/styles.css.js +42 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +11 -0
- package/dist/components/ScrollArea/ScrollArea.js +12 -0
- package/dist/components/ScrollArea/index.d.ts +2 -0
- package/dist/components/ScrollArea/index.js +1 -0
- package/dist/components/ScrollArea/styles.css.d.ts +3 -0
- package/dist/components/ScrollArea/styles.css.js +25 -0
- package/dist/components/Select/Select.d.ts +13 -0
- package/dist/components/Select/Select.js +10 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Select/index.js +1 -0
- package/dist/components/Select/styles.css.d.ts +4 -0
- package/dist/components/Select/styles.css.js +82 -0
- package/dist/components/Separator/Separator.d.ts +8 -0
- package/dist/components/Separator/Separator.js +8 -0
- package/dist/components/Separator/index.d.ts +2 -0
- package/dist/components/Separator/index.js +1 -0
- package/dist/components/Separator/styles.css.d.ts +4 -0
- package/dist/components/Separator/styles.css.js +28 -0
- package/dist/components/Skeleton/Skeleton.d.ts +14 -0
- package/dist/components/Skeleton/Skeleton.js +13 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/index.js +1 -0
- package/dist/components/Skeleton/styles.css.d.ts +4 -0
- package/dist/components/Skeleton/styles.css.js +56 -0
- package/dist/components/Spinner/Spinner.d.ts +10 -0
- package/dist/components/Spinner/Spinner.js +8 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Spinner/index.js +1 -0
- package/dist/components/Spinner/styles.css.d.ts +4 -0
- package/dist/components/Spinner/styles.css.js +55 -0
- package/dist/components/Stack/Stack.d.ts +16 -0
- package/dist/components/Stack/Stack.js +24 -0
- package/dist/components/Stack/index.d.ts +2 -0
- package/dist/components/Stack/index.js +1 -0
- package/dist/components/Stepper/Stepper.d.ts +18 -0
- package/dist/components/Stepper/Stepper.js +25 -0
- package/dist/components/Stepper/index.d.ts +2 -0
- package/dist/components/Stepper/index.js +1 -0
- package/dist/components/Stepper/styles.css.d.ts +14 -0
- package/dist/components/Stepper/styles.css.js +104 -0
- package/dist/components/Table/Table.d.ts +42 -0
- package/dist/components/Table/Table.js +39 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.js +1 -0
- package/dist/components/Table/styles.css.d.ts +8 -0
- package/dist/components/Table/styles.css.js +49 -0
- package/dist/components/Tabs/Tabs.d.ts +29 -0
- package/dist/components/Tabs/Tabs.js +52 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tabs/index.js +1 -0
- package/dist/components/Tabs/styles.css.d.ts +6 -0
- package/dist/components/Tabs/styles.css.js +100 -0
- package/dist/components/Tag/Tag.d.ts +16 -0
- package/dist/components/Tag/Tag.js +18 -0
- package/dist/components/Tag/index.d.ts +1 -0
- package/dist/components/Tag/index.js +1 -0
- package/dist/components/Tag/styles.css.d.ts +3 -0
- package/dist/components/Tag/styles.css.js +93 -0
- package/dist/components/Text/Header.d.ts +8 -0
- package/dist/components/Text/Header.js +8 -0
- package/dist/components/Text/P.d.ts +7 -0
- package/dist/components/Text/P.js +8 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/Text/index.js +2 -0
- package/dist/components/Text/styles.css.d.ts +2 -0
- package/dist/components/Text/styles.css.js +13 -0
- package/dist/components/TextArea/TextArea.d.ts +7 -0
- package/dist/components/TextArea/TextArea.js +9 -0
- package/dist/components/TextArea/index.d.ts +2 -0
- package/dist/components/TextArea/index.js +1 -0
- package/dist/components/TextArea/styles.css.d.ts +2 -0
- package/dist/components/TextArea/styles.css.js +10 -0
- package/dist/components/Toast/Toast.d.ts +34 -0
- package/dist/components/Toast/Toast.js +177 -0
- package/dist/components/Toast/index.d.ts +1 -0
- package/dist/components/Toast/index.js +1 -0
- package/dist/components/Toast/styles.css.d.ts +21 -0
- package/dist/components/Toast/styles.css.js +192 -0
- package/dist/components/Toggle/Toggle.d.ts +10 -0
- package/dist/components/Toggle/Toggle.js +17 -0
- package/dist/components/Toggle/index.d.ts +2 -0
- package/dist/components/Toggle/index.js +1 -0
- package/dist/components/Toggle/styles.css.d.ts +12 -0
- package/dist/components/Toggle/styles.css.js +118 -0
- package/dist/components/Tooltip/Tooltip.d.ts +10 -0
- package/dist/components/Tooltip/Tooltip.js +16 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/index.js +1 -0
- package/dist/components/Tooltip/styles.css.d.ts +8 -0
- package/dist/components/Tooltip/styles.css.js +86 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +8 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +9 -0
- package/dist/components/VisuallyHidden/index.d.ts +2 -0
- package/dist/components/VisuallyHidden/index.js +1 -0
- package/dist/components/VisuallyHidden/styles.css.d.ts +1 -0
- package/dist/components/VisuallyHidden/styles.css.js +12 -0
- package/dist/components/index.d.ts +68 -0
- package/dist/components/index.js +47 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/styles/layers.css.d.ts +3 -0
- package/dist/styles/layers.css.js +3 -0
- package/dist/styles/sprinkles.css.d.ts +241 -0
- package/dist/styles/sprinkles.css.js +165 -0
- package/dist/styles/theme.css.d.ts +38 -0
- package/dist/styles/theme.css.js +51 -0
- package/dist/styles/utils.d.ts +2 -0
- package/dist/styles/utils.js +7 -0
- package/package.json +8 -12
- package/dist/index.cjs +0 -4894
- package/dist/index.d.cts +0 -1111
- package/dist/index.d.mts +0 -1111
- package/dist/index.mjs +0 -4812
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface EmptyStateProps {
|
|
3
|
+
icon?: React.ReactNode;
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const EmptyState: ({ icon, title, description, action, className, }: EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default EmptyState;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { emptyState, emptyStateIcon, emptyStateTitle, emptyStateDescription, emptyStateAction, } from './styles.css';
|
|
4
|
+
import Box from '../Box';
|
|
5
|
+
const EmptyState = ({ icon, title, description, action, className, }) => {
|
|
6
|
+
return (_jsxs(Box, { className: clsx(emptyState, className), role: "status", children: [icon && (_jsx(Box, { className: emptyStateIcon, "aria-hidden": "true", children: icon })), title && (_jsx(Box, { as: "h3", className: emptyStateTitle, children: title })), description && (_jsx(Box, { as: "p", className: emptyStateDescription, children: description })), action && (_jsx(Box, { className: emptyStateAction, children: action }))] }));
|
|
7
|
+
};
|
|
8
|
+
export default EmptyState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EmptyState } from './EmptyState';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { vars } from '../../styles/theme.css';
|
|
2
|
+
import { styleWithLayer } from '../../styles/utils';
|
|
3
|
+
export const emptyState = styleWithLayer({
|
|
4
|
+
display: 'flex',
|
|
5
|
+
flexDirection: 'column',
|
|
6
|
+
alignItems: 'center',
|
|
7
|
+
justifyContent: 'center',
|
|
8
|
+
padding: '2rem',
|
|
9
|
+
textAlign: 'center',
|
|
10
|
+
});
|
|
11
|
+
export const emptyStateIcon = styleWithLayer({
|
|
12
|
+
fontSize: '48px',
|
|
13
|
+
marginBottom: '1rem',
|
|
14
|
+
color: vars.colors.textSecondary,
|
|
15
|
+
});
|
|
16
|
+
export const emptyStateTitle = styleWithLayer({
|
|
17
|
+
fontSize: '18px',
|
|
18
|
+
fontWeight: '600',
|
|
19
|
+
color: vars.colors.textPrimary,
|
|
20
|
+
margin: '0 0 0.5rem 0',
|
|
21
|
+
});
|
|
22
|
+
export const emptyStateDescription = styleWithLayer({
|
|
23
|
+
fontSize: '14px',
|
|
24
|
+
color: vars.colors.textSecondary,
|
|
25
|
+
margin: '0 0 1rem 0',
|
|
26
|
+
maxWidth: '400px',
|
|
27
|
+
});
|
|
28
|
+
export const emptyStateAction = styleWithLayer({
|
|
29
|
+
marginTop: '0.5rem',
|
|
30
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FileUploadFile {
|
|
3
|
+
id: string;
|
|
4
|
+
file: File;
|
|
5
|
+
name: string;
|
|
6
|
+
size: number;
|
|
7
|
+
progress: number;
|
|
8
|
+
status: 'uploading' | 'success' | 'error';
|
|
9
|
+
errorMessage?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface FileUploadProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
label?: string;
|
|
13
|
+
files?: FileUploadFile[];
|
|
14
|
+
onFilesChange?: (files: FileUploadFile[]) => void;
|
|
15
|
+
onFileAdd?: (files: File[]) => void;
|
|
16
|
+
onFileRemove?: (fileId: string) => void;
|
|
17
|
+
accept?: string;
|
|
18
|
+
multiple?: boolean;
|
|
19
|
+
maxFileSize?: number;
|
|
20
|
+
maxFiles?: number;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
dropzoneText?: string;
|
|
23
|
+
hint?: string;
|
|
24
|
+
showProgress?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare const FileUpload: ({ label, files, onFilesChange, onFileAdd, onFileRemove, accept, multiple, maxFileSize, maxFiles, disabled, dropzoneText, hint, showProgress, className, ...props }: FileUploadProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default FileUpload;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useState, useRef, useCallback } from 'react';
|
|
4
|
+
import { fileUploadContainer, fileUploadDropzone, fileUploadDropzoneVariants, fileUploadLabel, fileUploadText, fileUploadHint, fileUploadInput, fileUploadList, fileUploadItem, fileUploadItemInfo, fileUploadItemName, fileUploadItemSize, fileUploadRemoveButton, fileUploadError, fileUploadIcon, fileUploadProgressBar, fileUploadProgressFill, fileUploadProgressFillVariants, } from './styles.css';
|
|
5
|
+
import Box from '../Box';
|
|
6
|
+
const formatFileSize = (bytes) => {
|
|
7
|
+
if (bytes === 0)
|
|
8
|
+
return '0 Bytes';
|
|
9
|
+
const k = 1024;
|
|
10
|
+
const sizes = ['Bytes', 'KB', 'MB', 'GB'];
|
|
11
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
12
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
|
13
|
+
};
|
|
14
|
+
const FileUpload = ({ label, files = [], onFilesChange, onFileAdd, onFileRemove, accept, multiple = false, maxFileSize, maxFiles, disabled = false, dropzoneText = 'Drag and drop files here, or click to browse', hint, showProgress = true, className, ...props }) => {
|
|
15
|
+
const [isDragOver, setIsDragOver] = useState(false);
|
|
16
|
+
const [error, setError] = useState(null);
|
|
17
|
+
const inputRef = useRef(null);
|
|
18
|
+
const validateFile = (file) => {
|
|
19
|
+
if (maxFileSize && file.size > maxFileSize) {
|
|
20
|
+
return `File size exceeds ${formatFileSize(maxFileSize)}`;
|
|
21
|
+
}
|
|
22
|
+
if (accept) {
|
|
23
|
+
const acceptedTypes = accept.split(',').map(type => type.trim());
|
|
24
|
+
const isAccepted = acceptedTypes.some(type => {
|
|
25
|
+
if (type.includes('*')) {
|
|
26
|
+
return file.type.startsWith(type.replace('/*', ''));
|
|
27
|
+
}
|
|
28
|
+
return file.type === type || file.name.endsWith(type);
|
|
29
|
+
});
|
|
30
|
+
if (!isAccepted) {
|
|
31
|
+
return `File type not accepted. Allowed: ${accept}`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
};
|
|
36
|
+
const handleFiles = useCallback((fileList) => {
|
|
37
|
+
if (!fileList || disabled)
|
|
38
|
+
return;
|
|
39
|
+
const newFiles = [];
|
|
40
|
+
const errors = [];
|
|
41
|
+
Array.from(fileList).forEach(file => {
|
|
42
|
+
const validationError = validateFile(file);
|
|
43
|
+
if (validationError) {
|
|
44
|
+
errors.push(`${file.name}: ${validationError}`);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
newFiles.push(file);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
if (maxFiles && files.length + newFiles.length > maxFiles) {
|
|
51
|
+
errors.push(`Maximum ${maxFiles} files allowed`);
|
|
52
|
+
newFiles.splice(maxFiles - files.length);
|
|
53
|
+
}
|
|
54
|
+
if (errors.length > 0) {
|
|
55
|
+
setError(errors.join(', '));
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
setError(null);
|
|
59
|
+
}
|
|
60
|
+
if (newFiles.length > 0) {
|
|
61
|
+
onFileAdd?.(newFiles);
|
|
62
|
+
}
|
|
63
|
+
}, [disabled, files.length, maxFileSize, maxFiles, accept, onFileAdd]);
|
|
64
|
+
const handleDragOver = (e) => {
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
if (!disabled) {
|
|
67
|
+
setIsDragOver(true);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const handleDragLeave = (e) => {
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
setIsDragOver(false);
|
|
73
|
+
};
|
|
74
|
+
const handleDrop = (e) => {
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
setIsDragOver(false);
|
|
77
|
+
handleFiles(e.dataTransfer.files);
|
|
78
|
+
};
|
|
79
|
+
const handleClick = () => {
|
|
80
|
+
if (!disabled) {
|
|
81
|
+
inputRef.current?.click();
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
const handleInputChange = (e) => {
|
|
85
|
+
handleFiles(e.target.files);
|
|
86
|
+
e.target.value = '';
|
|
87
|
+
};
|
|
88
|
+
const handleRemove = (fileId) => {
|
|
89
|
+
onFileRemove?.(fileId);
|
|
90
|
+
};
|
|
91
|
+
const getVariant = () => {
|
|
92
|
+
if (disabled)
|
|
93
|
+
return 'disabled';
|
|
94
|
+
if (error)
|
|
95
|
+
return 'error';
|
|
96
|
+
if (isDragOver)
|
|
97
|
+
return 'dragOver';
|
|
98
|
+
return 'default';
|
|
99
|
+
};
|
|
100
|
+
return (_jsxs(Box, { className: clsx(fileUploadContainer, className), ...props, children: [label && (_jsx(Box, { as: "label", className: fileUploadLabel, children: label })), _jsxs(Box, { as: "div", className: clsx(fileUploadDropzone, fileUploadDropzoneVariants[getVariant()]), onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: handleClick, role: "button", tabIndex: disabled ? -1 : 0, "aria-disabled": disabled, children: [_jsx(Box, { className: fileUploadIcon, "aria-hidden": "true", children: _jsxs("svg", { width: "48", height: "48", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), _jsx("polyline", { points: "17,8 12,3 7,8" }), _jsx("line", { x1: "12", y1: "3", x2: "12", y2: "15" })] }) }), _jsx(Box, { as: "p", className: fileUploadText, children: dropzoneText }), hint && (_jsx(Box, { as: "p", className: fileUploadHint, children: hint })), _jsx(Box, { as: "input", ref: inputRef, type: "file", className: fileUploadInput, onChange: handleInputChange, accept: accept, multiple: multiple, disabled: disabled, "aria-label": "File upload input" })] }), error && (_jsx(Box, { as: "p", className: fileUploadError, role: "alert", children: error })), files.length > 0 && (_jsx(Box, { as: "ul", className: fileUploadList, "aria-label": "Uploaded files", children: files.map((file) => (_jsxs(Box, { as: "li", className: fileUploadItem, children: [_jsxs(Box, { className: fileUploadItemInfo, children: [_jsx(Box, { as: "p", className: fileUploadItemName, title: file.name, children: file.name }), _jsxs(Box, { as: "p", className: fileUploadItemSize, children: [formatFileSize(file.size), file.status === 'uploading' && showProgress && ' • Uploading...', file.status === 'success' && ' • Complete', file.status === 'error' && file.errorMessage && ` • ${file.errorMessage}`] }), showProgress && file.status === 'uploading' && (_jsx(Box, { className: fileUploadProgressBar, children: _jsx(Box, { className: clsx(fileUploadProgressFill, fileUploadProgressFillVariants[file.status]), style: { width: `${file.progress}%` } }) }))] }), _jsx(Box, { as: "button", className: fileUploadRemoveButton, onClick: () => handleRemove(file.id), type: "button", "aria-label": `Remove ${file.name}`, children: "\u00D7" })] }, file.id))) }))] }));
|
|
101
|
+
};
|
|
102
|
+
export default FileUpload;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as FileUpload } from './FileUpload';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const fileUploadContainer: string;
|
|
2
|
+
export declare const fileUploadDropzone: string;
|
|
3
|
+
export declare const fileUploadDropzoneVariants: Record<"default" | "disabled" | "error" | "dragOver", string>;
|
|
4
|
+
export declare const fileUploadLabel: string;
|
|
5
|
+
export declare const fileUploadText: string;
|
|
6
|
+
export declare const fileUploadHint: string;
|
|
7
|
+
export declare const fileUploadInput: string;
|
|
8
|
+
export declare const fileUploadList: string;
|
|
9
|
+
export declare const fileUploadItem: string;
|
|
10
|
+
export declare const fileUploadItemInfo: string;
|
|
11
|
+
export declare const fileUploadItemName: string;
|
|
12
|
+
export declare const fileUploadItemSize: string;
|
|
13
|
+
export declare const fileUploadItemProgress: string;
|
|
14
|
+
export declare const fileUploadRemoveButton: string;
|
|
15
|
+
export declare const fileUploadError: string;
|
|
16
|
+
export declare const fileUploadIcon: string;
|
|
17
|
+
export declare const fileUploadProgressBar: string;
|
|
18
|
+
export declare const fileUploadProgressFill: string;
|
|
19
|
+
export declare const fileUploadProgressFillVariants: Record<"success" | "error" | "uploading", string>;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { styleVariants } from '@vanilla-extract/css';
|
|
2
|
+
import { vars } from '../../styles/theme.css';
|
|
3
|
+
import { styleWithLayer } from '../../styles/utils';
|
|
4
|
+
export const fileUploadContainer = styleWithLayer({
|
|
5
|
+
width: '100%',
|
|
6
|
+
});
|
|
7
|
+
export const fileUploadDropzone = styleWithLayer({
|
|
8
|
+
border: `2px dashed ${vars.colors.borderDefault}`,
|
|
9
|
+
borderRadius: '12px',
|
|
10
|
+
padding: '2rem',
|
|
11
|
+
textAlign: 'center',
|
|
12
|
+
cursor: 'pointer',
|
|
13
|
+
transition: 'all 0.2s ease',
|
|
14
|
+
backgroundColor: vars.colors.backgroundMuted,
|
|
15
|
+
':hover': {
|
|
16
|
+
borderColor: vars.colors.inputBorderFocused,
|
|
17
|
+
backgroundColor: vars.colors.alertInfoBackground,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
export const fileUploadDropzoneVariants = styleVariants({
|
|
21
|
+
default: {},
|
|
22
|
+
dragOver: {
|
|
23
|
+
borderColor: vars.colors.buttonBackgroundPrimary,
|
|
24
|
+
backgroundColor: vars.colors.alertInfoBackground,
|
|
25
|
+
borderStyle: 'solid',
|
|
26
|
+
},
|
|
27
|
+
error: {
|
|
28
|
+
borderColor: vars.colors.alertErrorBorder,
|
|
29
|
+
backgroundColor: vars.colors.alertErrorBackground,
|
|
30
|
+
},
|
|
31
|
+
disabled: {
|
|
32
|
+
cursor: 'not-allowed',
|
|
33
|
+
opacity: 0.6,
|
|
34
|
+
':hover': {
|
|
35
|
+
borderColor: vars.colors.borderDefault,
|
|
36
|
+
backgroundColor: vars.colors.backgroundMuted,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
export const fileUploadLabel = styleWithLayer({
|
|
41
|
+
display: 'block',
|
|
42
|
+
fontSize: '14px',
|
|
43
|
+
fontWeight: '500',
|
|
44
|
+
color: vars.colors.textPrimary,
|
|
45
|
+
marginBottom: '8px',
|
|
46
|
+
});
|
|
47
|
+
export const fileUploadText = styleWithLayer({
|
|
48
|
+
fontSize: '14px',
|
|
49
|
+
color: vars.colors.textSecondary,
|
|
50
|
+
marginTop: '0.5rem',
|
|
51
|
+
});
|
|
52
|
+
export const fileUploadHint = styleWithLayer({
|
|
53
|
+
fontSize: '12px',
|
|
54
|
+
color: vars.colors.textSecondary,
|
|
55
|
+
marginTop: '0.5rem',
|
|
56
|
+
});
|
|
57
|
+
export const fileUploadInput = styleWithLayer({
|
|
58
|
+
display: 'none',
|
|
59
|
+
});
|
|
60
|
+
export const fileUploadList = styleWithLayer({
|
|
61
|
+
marginTop: '1rem',
|
|
62
|
+
display: 'flex',
|
|
63
|
+
flexDirection: 'column',
|
|
64
|
+
gap: '0.75rem',
|
|
65
|
+
});
|
|
66
|
+
export const fileUploadItem = styleWithLayer({
|
|
67
|
+
display: 'flex',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
gap: '0.75rem',
|
|
70
|
+
padding: '0.75rem',
|
|
71
|
+
backgroundColor: vars.colors.backgroundDefault,
|
|
72
|
+
border: `1px solid ${vars.colors.borderMuted}`,
|
|
73
|
+
borderRadius: '8px',
|
|
74
|
+
});
|
|
75
|
+
export const fileUploadItemInfo = styleWithLayer({
|
|
76
|
+
flex: 1,
|
|
77
|
+
minWidth: 0,
|
|
78
|
+
});
|
|
79
|
+
export const fileUploadItemName = styleWithLayer({
|
|
80
|
+
fontSize: '14px',
|
|
81
|
+
fontWeight: '500',
|
|
82
|
+
color: vars.colors.textPrimary,
|
|
83
|
+
whiteSpace: 'nowrap',
|
|
84
|
+
overflow: 'hidden',
|
|
85
|
+
textOverflow: 'ellipsis',
|
|
86
|
+
});
|
|
87
|
+
export const fileUploadItemSize = styleWithLayer({
|
|
88
|
+
fontSize: '12px',
|
|
89
|
+
color: vars.colors.textSecondary,
|
|
90
|
+
marginTop: '2px',
|
|
91
|
+
});
|
|
92
|
+
export const fileUploadItemProgress = styleWithLayer({
|
|
93
|
+
flex: 1,
|
|
94
|
+
maxWidth: '200px',
|
|
95
|
+
});
|
|
96
|
+
export const fileUploadRemoveButton = styleWithLayer({
|
|
97
|
+
background: 'none',
|
|
98
|
+
border: 'none',
|
|
99
|
+
cursor: 'pointer',
|
|
100
|
+
padding: '0.25rem',
|
|
101
|
+
color: vars.colors.textSecondary,
|
|
102
|
+
fontSize: '18px',
|
|
103
|
+
display: 'flex',
|
|
104
|
+
alignItems: 'center',
|
|
105
|
+
justifyContent: 'center',
|
|
106
|
+
borderRadius: '4px',
|
|
107
|
+
transition: 'all 0.15s ease',
|
|
108
|
+
':hover': {
|
|
109
|
+
color: vars.colors.alertErrorText,
|
|
110
|
+
backgroundColor: vars.colors.alertErrorBackground,
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
export const fileUploadError = styleWithLayer({
|
|
114
|
+
fontSize: '12px',
|
|
115
|
+
color: vars.colors.alertErrorText,
|
|
116
|
+
marginTop: '0.5rem',
|
|
117
|
+
});
|
|
118
|
+
export const fileUploadIcon = styleWithLayer({
|
|
119
|
+
fontSize: '24px',
|
|
120
|
+
color: vars.colors.textSecondary,
|
|
121
|
+
});
|
|
122
|
+
export const fileUploadProgressBar = styleWithLayer({
|
|
123
|
+
width: '100%',
|
|
124
|
+
height: '4px',
|
|
125
|
+
backgroundColor: vars.colors.borderMuted,
|
|
126
|
+
borderRadius: '2px',
|
|
127
|
+
overflow: 'hidden',
|
|
128
|
+
marginTop: '0.5rem',
|
|
129
|
+
});
|
|
130
|
+
export const fileUploadProgressFill = styleWithLayer({
|
|
131
|
+
height: '100%',
|
|
132
|
+
backgroundColor: vars.colors.buttonBackgroundPrimary,
|
|
133
|
+
transition: 'width 0.3s ease',
|
|
134
|
+
});
|
|
135
|
+
export const fileUploadProgressFillVariants = styleVariants({
|
|
136
|
+
uploading: {
|
|
137
|
+
backgroundColor: vars.colors.buttonBackgroundPrimary,
|
|
138
|
+
},
|
|
139
|
+
success: {
|
|
140
|
+
backgroundColor: vars.colors.alertSuccessBorder,
|
|
141
|
+
},
|
|
142
|
+
error: {
|
|
143
|
+
backgroundColor: vars.colors.alertErrorBorder,
|
|
144
|
+
},
|
|
145
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { formStyle } from './styles.css';
|
|
4
|
+
import Box from '../Box';
|
|
5
|
+
const Form = (props) => {
|
|
6
|
+
return (_jsx(Box, { as: "form", gap: "medium", paddingX: "large", className: clsx(formStyle, props.className), ...props, children: props.children }));
|
|
7
|
+
};
|
|
8
|
+
export default Form;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputProps } from '../Input/Input';
|
|
3
|
+
type FormInputProps = React.InputHTMLAttributes<HTMLInputElement> & InputProps;
|
|
4
|
+
declare const FormInput: (props: FormInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default FormInput;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { formInputStyle } from './styles.css';
|
|
4
|
+
import { Input } from '../..';
|
|
5
|
+
import Box from '../Box';
|
|
6
|
+
const FormInput = (props) => {
|
|
7
|
+
return (_jsx(Box, { as: Input, padding: "small", className: clsx(formInputStyle, props.className), label: props.label, ...props }));
|
|
8
|
+
};
|
|
9
|
+
export default FormInput;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styleWithLayer } from '../../styles/utils';
|
|
2
|
+
export const formStyle = styleWithLayer({
|
|
3
|
+
display: 'grid',
|
|
4
|
+
gridTemplateRows: 'min-content 1fr min-content',
|
|
5
|
+
});
|
|
6
|
+
export const formInputStyle = styleWithLayer({
|
|
7
|
+
display: 'flex',
|
|
8
|
+
flexDirection: 'row',
|
|
9
|
+
justifyContent: 'space-between',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type GridColumns = 1 | 2 | 3 | 4 | 5 | 6 | 12;
|
|
3
|
+
export type GridGap = 'none' | 'small' | 'medium' | 'large';
|
|
4
|
+
export interface GridProps {
|
|
5
|
+
columns?: GridColumns;
|
|
6
|
+
gap?: GridGap;
|
|
7
|
+
minChildWidth?: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLElement>>;
|
|
13
|
+
export default Grid;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import Box from '../Box';
|
|
4
|
+
const gapMap = {
|
|
5
|
+
none: '0',
|
|
6
|
+
small: '0.5rem',
|
|
7
|
+
medium: '1rem',
|
|
8
|
+
large: '2rem',
|
|
9
|
+
};
|
|
10
|
+
const Grid = forwardRef(({ columns, gap = 'medium', minChildWidth, children, className, style }, ref) => {
|
|
11
|
+
const gapValue = gap;
|
|
12
|
+
const gridStyle = {
|
|
13
|
+
display: 'grid',
|
|
14
|
+
gap: gapMap[gapValue],
|
|
15
|
+
};
|
|
16
|
+
if (minChildWidth) {
|
|
17
|
+
gridStyle.gridTemplateColumns = `repeat(auto-fit, minmax(${minChildWidth}, 1fr))`;
|
|
18
|
+
}
|
|
19
|
+
else if (columns) {
|
|
20
|
+
gridStyle.gridTemplateColumns = `repeat(${columns}, 1fr)`;
|
|
21
|
+
}
|
|
22
|
+
return (_jsx(Box, { ref: ref, className: className, style: { ...gridStyle, ...style }, children: children }));
|
|
23
|
+
});
|
|
24
|
+
Grid.displayName = 'Grid';
|
|
25
|
+
export default Grid;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Grid } from './Grid';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type IconProps = {
|
|
3
|
+
name?: string;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const IconComponent: {
|
|
9
|
+
({ name, children, className, color }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export default IconComponent;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { icon } from './styles.css';
|
|
4
|
+
import Box from '../Box';
|
|
5
|
+
const IconComponent = ({ name, children, className, color }) => {
|
|
6
|
+
const iconMap = {
|
|
7
|
+
check: '✓',
|
|
8
|
+
error: '✗',
|
|
9
|
+
warning: '⚠',
|
|
10
|
+
info: 'i',
|
|
11
|
+
success: '✓',
|
|
12
|
+
close: '×',
|
|
13
|
+
};
|
|
14
|
+
const displayContent = children || (name ? iconMap[name] : undefined);
|
|
15
|
+
if (!displayContent) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
return (_jsx(Box, { as: "span", className: clsx(icon, className), style: { color }, "aria-hidden": "true", children: displayContent }));
|
|
19
|
+
};
|
|
20
|
+
IconComponent.displayName = 'Icon';
|
|
21
|
+
export default IconComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Icon } from './Icon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Icon } from './Icon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const icon: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { inputStyle, label } from './styles.css';
|
|
4
|
+
import { text } from '../Text/styles.css';
|
|
5
|
+
import Box from '../Box';
|
|
6
|
+
const Input = (props) => {
|
|
7
|
+
return (_jsxs(Box, { display: "flex", flexDirection: { mobile: 'column', tablet: 'row' }, gap: "small", children: [props.label && (_jsx(Box, { as: "label", className: clsx(text, label), marginX: { mobile: 'auto', tablet: 'none' }, marginY: { mobile: 'none', tablet: 'auto' }, htmlFor: props.id, children: props.label })), _jsx(Box, { as: "input", className: clsx(inputStyle, props.className), width: props.fullWidth ? '100%' : undefined, ...props })] }));
|
|
8
|
+
};
|
|
9
|
+
export default Input;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Input } from './Input';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Input } from './Input';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Kbd } from './Kbd';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const kbd: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { vars } from '../../styles/theme.css';
|
|
2
|
+
import { styleWithLayer } from '../../styles/utils';
|
|
3
|
+
export const kbd = styleWithLayer({
|
|
4
|
+
display: 'inline-block',
|
|
5
|
+
padding: '0.125rem 0.375rem',
|
|
6
|
+
fontFamily: 'monospace',
|
|
7
|
+
fontSize: '0.85em',
|
|
8
|
+
fontWeight: '600',
|
|
9
|
+
lineHeight: '1.5',
|
|
10
|
+
color: vars.colors.textPrimary,
|
|
11
|
+
backgroundColor: vars.colors.backgroundMuted,
|
|
12
|
+
border: `1px solid ${vars.colors.borderDefault}`,
|
|
13
|
+
borderRadius: '4px',
|
|
14
|
+
boxShadow: '0 2px 0 rgba(0, 0, 0, 0.1)',
|
|
15
|
+
whiteSpace: 'nowrap',
|
|
16
|
+
});
|