webadwaita 0.1.0 → 0.2.0
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/LICENSE +21 -0
- package/README.md +119 -0
- package/babel.config.cjs +23 -0
- package/package.json +34 -32
- package/src/Box/index.tsx +105 -0
- package/src/Button/index.tsx +153 -0
- package/src/Card/index.tsx +67 -0
- package/src/Checkbox/index.tsx +119 -0
- package/src/Entry/index.tsx +94 -0
- package/src/HeaderBar/index.tsx +78 -0
- package/src/Switch/index.tsx +89 -0
- package/src/index.ts +23 -0
- package/src/theme.ts +19 -0
- package/src/tokens.css.ts +91 -0
- package/dist/Button.d.mts +0 -5
- package/dist/Button.d.ts +0 -5
- package/dist/Button.js +0 -63
- package/dist/Button.mjs +0 -41
- package/dist/button.d.mts +0 -5
- package/dist/button.d.ts +0 -5
- package/dist/button.js +0 -63
- package/dist/button.mjs +0 -15
- package/dist/chunk-FWCSY2DS.mjs +0 -37
- package/dist/styles.css +0 -346
- package/dist/styles.d.mts +0 -2
- package/dist/styles.d.ts +0 -2
- package/dist/styles.js +0 -1
- package/dist/styles.mjs +0 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { css, html } from 'react-strict-dom';
|
|
3
|
+
import { palette, radius, spacing, typography, motion } from '../tokens.css';
|
|
4
|
+
|
|
5
|
+
export type EntryProps = {
|
|
6
|
+
value?: string;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
invalid?: boolean;
|
|
12
|
+
type?: 'text' | 'password' | 'email' | 'search' | 'tel' | 'url' | 'number';
|
|
13
|
+
onChange?: (value: string) => void;
|
|
14
|
+
onSubmit?: (value: string) => void;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Adwaita-style text entry. Underline focus indicator + subtle filled surface,
|
|
19
|
+
* like libadwaita's `AdwEntry`.
|
|
20
|
+
*/
|
|
21
|
+
export function Entry(props: EntryProps) {
|
|
22
|
+
const {
|
|
23
|
+
value,
|
|
24
|
+
defaultValue,
|
|
25
|
+
placeholder,
|
|
26
|
+
disabled = false,
|
|
27
|
+
readOnly = false,
|
|
28
|
+
invalid = false,
|
|
29
|
+
type = 'text',
|
|
30
|
+
onChange,
|
|
31
|
+
onSubmit
|
|
32
|
+
} = props;
|
|
33
|
+
|
|
34
|
+
const latestValueRef = React.useRef<string>(value ?? defaultValue ?? '');
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<html.input
|
|
38
|
+
type={type}
|
|
39
|
+
value={value}
|
|
40
|
+
defaultValue={defaultValue}
|
|
41
|
+
placeholder={placeholder}
|
|
42
|
+
disabled={disabled}
|
|
43
|
+
readOnly={readOnly}
|
|
44
|
+
onChange={(e: { target: { value: string } }) => {
|
|
45
|
+
latestValueRef.current = e.target.value;
|
|
46
|
+
onChange?.(e.target.value);
|
|
47
|
+
}}
|
|
48
|
+
onKeyDown={(e: { key: string }) => {
|
|
49
|
+
if (e.key === 'Enter') onSubmit?.(latestValueRef.current);
|
|
50
|
+
}}
|
|
51
|
+
style={[
|
|
52
|
+
styles.input,
|
|
53
|
+
invalid && styles.invalid,
|
|
54
|
+
disabled && styles.disabled
|
|
55
|
+
]}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const styles = css.create({
|
|
61
|
+
input: {
|
|
62
|
+
backgroundColor: palette.subtleBg,
|
|
63
|
+
color: palette.fg,
|
|
64
|
+
borderWidth: 0,
|
|
65
|
+
borderBottomWidth: 2,
|
|
66
|
+
borderBottomStyle: 'solid',
|
|
67
|
+
borderBottomColor: {
|
|
68
|
+
default: 'transparent',
|
|
69
|
+
':hover': palette.borderStrong,
|
|
70
|
+
':focus': palette.accentBg
|
|
71
|
+
},
|
|
72
|
+
borderTopLeftRadius: radius.sm,
|
|
73
|
+
borderTopRightRadius: radius.sm,
|
|
74
|
+
borderBottomLeftRadius: 0,
|
|
75
|
+
borderBottomRightRadius: 0,
|
|
76
|
+
paddingBlock: spacing.sm,
|
|
77
|
+
paddingInline: spacing.md,
|
|
78
|
+
fontFamily: typography.fontFamily,
|
|
79
|
+
fontSize: typography.bodySize,
|
|
80
|
+
lineHeight: typography.bodyLineHeight,
|
|
81
|
+
minHeight: 36,
|
|
82
|
+
transitionProperty: 'border-color, background-color',
|
|
83
|
+
transitionDuration: motion.durationFast,
|
|
84
|
+
transitionTimingFunction: motion.easing
|
|
85
|
+
},
|
|
86
|
+
invalid: {
|
|
87
|
+
borderBottomColor: {
|
|
88
|
+
default: palette.destructiveBg,
|
|
89
|
+
':hover': palette.destructiveBg,
|
|
90
|
+
':focus': palette.destructiveBg
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
disabled: { opacity: 0.5, cursor: 'not-allowed' }
|
|
94
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { css, html } from 'react-strict-dom';
|
|
3
|
+
import { palette, spacing, typography } from '../tokens.css';
|
|
4
|
+
|
|
5
|
+
export type HeaderBarProps = {
|
|
6
|
+
title?: React.ReactNode;
|
|
7
|
+
subtitle?: React.ReactNode;
|
|
8
|
+
/** Buttons / actions to place at the start (left) of the bar. */
|
|
9
|
+
start?: React.ReactNode;
|
|
10
|
+
/** Buttons / actions to place at the end (right) of the bar. */
|
|
11
|
+
end?: React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Top-level header bar matching libadwaita's AdwHeaderBar — a thin titled
|
|
16
|
+
* strip that sits at the top of a window. Centered title with optional
|
|
17
|
+
* leading/trailing slots.
|
|
18
|
+
*/
|
|
19
|
+
export function HeaderBar(props: HeaderBarProps) {
|
|
20
|
+
const { title, subtitle, start, end } = props;
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<html.header style={styles.bar}>
|
|
24
|
+
<html.div style={styles.side}>{start}</html.div>
|
|
25
|
+
<html.div style={styles.titleBlock}>
|
|
26
|
+
{title != null && (
|
|
27
|
+
<html.span style={styles.title}>{title}</html.span>
|
|
28
|
+
)}
|
|
29
|
+
{subtitle != null && (
|
|
30
|
+
<html.span style={styles.subtitle}>{subtitle}</html.span>
|
|
31
|
+
)}
|
|
32
|
+
</html.div>
|
|
33
|
+
<html.div style={[styles.side, styles.sideEnd]}>{end}</html.div>
|
|
34
|
+
</html.header>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const styles = css.create({
|
|
39
|
+
bar: {
|
|
40
|
+
display: 'flex',
|
|
41
|
+
flexDirection: 'row',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
backgroundColor: palette.headerbarBg,
|
|
44
|
+
borderBottomWidth: 1,
|
|
45
|
+
borderBottomStyle: 'solid',
|
|
46
|
+
borderBottomColor: palette.border,
|
|
47
|
+
paddingBlock: spacing.sm,
|
|
48
|
+
paddingInline: spacing.md,
|
|
49
|
+
gap: spacing.sm,
|
|
50
|
+
minHeight: 46
|
|
51
|
+
},
|
|
52
|
+
side: {
|
|
53
|
+
display: 'flex',
|
|
54
|
+
flexDirection: 'row',
|
|
55
|
+
alignItems: 'center',
|
|
56
|
+
gap: spacing.sm,
|
|
57
|
+
flexBasis: 0,
|
|
58
|
+
flexGrow: 1
|
|
59
|
+
},
|
|
60
|
+
sideEnd: { justifyContent: 'flex-end' },
|
|
61
|
+
titleBlock: {
|
|
62
|
+
display: 'flex',
|
|
63
|
+
flexDirection: 'column',
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
justifyContent: 'center'
|
|
66
|
+
},
|
|
67
|
+
title: {
|
|
68
|
+
fontFamily: typography.fontFamily,
|
|
69
|
+
fontSize: typography.bodySize,
|
|
70
|
+
fontWeight: typography.weightStrong,
|
|
71
|
+
color: palette.fg
|
|
72
|
+
},
|
|
73
|
+
subtitle: {
|
|
74
|
+
fontFamily: typography.fontFamily,
|
|
75
|
+
fontSize: typography.captionSize,
|
|
76
|
+
color: palette.fgMuted
|
|
77
|
+
}
|
|
78
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { css, html } from 'react-strict-dom';
|
|
2
|
+
import { palette, motion } from '../tokens.css';
|
|
3
|
+
|
|
4
|
+
export type SwitchProps = {
|
|
5
|
+
checked: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onChange?: (checked: boolean) => void;
|
|
8
|
+
label?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Adwaita-style toggle switch — pill-shaped track with a sliding thumb.
|
|
13
|
+
* Uses an html.button so it works identically on web and native via
|
|
14
|
+
* react-strict-dom; the inner thumb is positioned absolutely.
|
|
15
|
+
*/
|
|
16
|
+
export function Switch(props: SwitchProps) {
|
|
17
|
+
const { checked, disabled = false, onChange, label } = props;
|
|
18
|
+
|
|
19
|
+
const toggle = () => {
|
|
20
|
+
if (!disabled) onChange?.(!checked);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<html.button
|
|
25
|
+
type="button"
|
|
26
|
+
role="switch"
|
|
27
|
+
aria-checked={checked}
|
|
28
|
+
aria-label={label}
|
|
29
|
+
disabled={disabled}
|
|
30
|
+
onClick={toggle}
|
|
31
|
+
style={[
|
|
32
|
+
styles.track,
|
|
33
|
+
checked ? styles.trackOn : styles.trackOff,
|
|
34
|
+
disabled && styles.disabled
|
|
35
|
+
]}
|
|
36
|
+
>
|
|
37
|
+
<html.span
|
|
38
|
+
style={[styles.thumb, checked ? styles.thumbOn : styles.thumbOff]}
|
|
39
|
+
/>
|
|
40
|
+
</html.button>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const TRACK_W = 48;
|
|
45
|
+
const TRACK_H = 28;
|
|
46
|
+
const THUMB = 22;
|
|
47
|
+
const PAD = (TRACK_H - THUMB) / 2;
|
|
48
|
+
|
|
49
|
+
const styles = css.create({
|
|
50
|
+
track: {
|
|
51
|
+
position: 'relative',
|
|
52
|
+
width: TRACK_W,
|
|
53
|
+
height: TRACK_H,
|
|
54
|
+
borderRadius: TRACK_H / 2,
|
|
55
|
+
borderWidth: 0,
|
|
56
|
+
cursor: 'pointer',
|
|
57
|
+
transitionProperty: 'background-color',
|
|
58
|
+
transitionDuration: motion.durationBase,
|
|
59
|
+
transitionTimingFunction: motion.easing,
|
|
60
|
+
padding: 0
|
|
61
|
+
},
|
|
62
|
+
trackOff: {
|
|
63
|
+
backgroundColor: {
|
|
64
|
+
default: palette.subtleBgHover,
|
|
65
|
+
':hover': palette.subtleBgActive
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
trackOn: {
|
|
69
|
+
backgroundColor: {
|
|
70
|
+
default: palette.accentBg,
|
|
71
|
+
':hover': palette.accentBgHover
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
thumb: {
|
|
75
|
+
position: 'absolute',
|
|
76
|
+
top: PAD,
|
|
77
|
+
width: THUMB,
|
|
78
|
+
height: THUMB,
|
|
79
|
+
borderRadius: THUMB / 2,
|
|
80
|
+
backgroundColor: '#ffffff',
|
|
81
|
+
boxShadow: '0 1px 2px rgba(0, 0, 0, 0.25)',
|
|
82
|
+
transitionProperty: 'left, transform',
|
|
83
|
+
transitionDuration: motion.durationBase,
|
|
84
|
+
transitionTimingFunction: motion.easing
|
|
85
|
+
},
|
|
86
|
+
thumbOff: { left: PAD },
|
|
87
|
+
thumbOn: { left: TRACK_W - THUMB - PAD },
|
|
88
|
+
disabled: { opacity: 0.5, cursor: 'not-allowed' }
|
|
89
|
+
});
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { Button } from './Button';
|
|
2
|
+
export type { ButtonProps, ButtonVariant, ButtonSize } from './Button';
|
|
3
|
+
|
|
4
|
+
export { Entry } from './Entry';
|
|
5
|
+
export type { EntryProps } from './Entry';
|
|
6
|
+
|
|
7
|
+
export { Switch } from './Switch';
|
|
8
|
+
export type { SwitchProps } from './Switch';
|
|
9
|
+
|
|
10
|
+
export { Checkbox } from './Checkbox';
|
|
11
|
+
export type { CheckboxProps } from './Checkbox';
|
|
12
|
+
|
|
13
|
+
export { Card } from './Card';
|
|
14
|
+
export type { CardProps } from './Card';
|
|
15
|
+
|
|
16
|
+
export { HeaderBar } from './HeaderBar';
|
|
17
|
+
export type { HeaderBarProps } from './HeaderBar';
|
|
18
|
+
|
|
19
|
+
export { Box } from './Box';
|
|
20
|
+
export type { BoxProps } from './Box';
|
|
21
|
+
|
|
22
|
+
export { theme, palette, radius, spacing, typography, motion } from './theme';
|
|
23
|
+
export type { Theme } from './theme';
|
package/src/theme.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-export of the design tokens for runtime use by consumer code (e.g. for
|
|
3
|
+
* computing inline styles, reading the accent color in a custom component).
|
|
4
|
+
*
|
|
5
|
+
* The stylex-aware tokens live in `tokens.stylex.ts`. At runtime, defineConsts
|
|
6
|
+
* returns a plain object with the same keys/values — so we just re-export.
|
|
7
|
+
*/
|
|
8
|
+
export {
|
|
9
|
+
palette,
|
|
10
|
+
radius,
|
|
11
|
+
spacing,
|
|
12
|
+
typography,
|
|
13
|
+
motion
|
|
14
|
+
} from './tokens.css';
|
|
15
|
+
|
|
16
|
+
import { palette, radius, spacing, typography, motion } from './tokens.css';
|
|
17
|
+
|
|
18
|
+
export const theme = { palette, radius, spacing, typography, motion } as const;
|
|
19
|
+
export type Theme = typeof theme;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { css } from 'react-strict-dom';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Adwaita-inspired design tokens, exposed via `css.defineConsts` so they can
|
|
5
|
+
* be referenced inside `css.create({...})` calls. StyleX requires shared
|
|
6
|
+
* values to live in a `.stylex.ts` file and to be defined this way.
|
|
7
|
+
*
|
|
8
|
+
* NOTE: defineConsts only accepts string values. Numeric tokens (sizes,
|
|
9
|
+
* weights, line heights) are encoded as strings — CSS accepts them either
|
|
10
|
+
* way, and react-strict-dom forwards them through to RN as well.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export const palette = css.defineConsts({
|
|
14
|
+
accentBg: '#3584e4',
|
|
15
|
+
accentBgHover: '#4a90e9',
|
|
16
|
+
accentBgActive: '#1a6bb8',
|
|
17
|
+
accentFg: '#ffffff',
|
|
18
|
+
|
|
19
|
+
destructiveBg: '#e01b24',
|
|
20
|
+
destructiveBgHover: '#e8434b',
|
|
21
|
+
destructiveBgActive: '#b81920',
|
|
22
|
+
destructiveFg: '#ffffff',
|
|
23
|
+
|
|
24
|
+
successBg: '#26a269',
|
|
25
|
+
warningBg: '#cd9309',
|
|
26
|
+
|
|
27
|
+
windowBg: '#fafafa',
|
|
28
|
+
viewBg: '#ffffff',
|
|
29
|
+
cardBg: '#ffffff',
|
|
30
|
+
headerbarBg: '#ebebeb',
|
|
31
|
+
sidebarBg: '#ebebeb',
|
|
32
|
+
|
|
33
|
+
fg: 'rgba(0, 0, 0, 0.8)',
|
|
34
|
+
fgMuted: 'rgba(0, 0, 0, 0.55)',
|
|
35
|
+
fgDisabled: 'rgba(0, 0, 0, 0.35)',
|
|
36
|
+
fgOnAccent: '#ffffff',
|
|
37
|
+
|
|
38
|
+
border: 'rgba(0, 0, 0, 0.15)',
|
|
39
|
+
borderStrong: 'rgba(0, 0, 0, 0.25)',
|
|
40
|
+
shadow: 'rgba(0, 0, 0, 0.07)',
|
|
41
|
+
|
|
42
|
+
subtleBg: 'rgba(0, 0, 0, 0.07)',
|
|
43
|
+
subtleBgHover: 'rgba(0, 0, 0, 0.12)',
|
|
44
|
+
subtleBgActive: 'rgba(0, 0, 0, 0.18)'
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export const radius = css.defineConsts({
|
|
48
|
+
sm: '6px',
|
|
49
|
+
md: '9px',
|
|
50
|
+
lg: '12px',
|
|
51
|
+
pill: '9999px'
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export const spacing = css.defineConsts({
|
|
55
|
+
xs: '4px',
|
|
56
|
+
sm: '8px',
|
|
57
|
+
md: '12px',
|
|
58
|
+
lg: '16px',
|
|
59
|
+
xl: '24px',
|
|
60
|
+
xxl: '32px'
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export const typography = css.defineConsts({
|
|
64
|
+
fontFamily:
|
|
65
|
+
'"Adwaita Sans", "Cantarell", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif',
|
|
66
|
+
fontFamilyMono:
|
|
67
|
+
'"Adwaita Mono", "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, monospace',
|
|
68
|
+
|
|
69
|
+
weightRegular: '400',
|
|
70
|
+
weightStrong: '600',
|
|
71
|
+
weightBold: '700',
|
|
72
|
+
|
|
73
|
+
bodySize: '14px',
|
|
74
|
+
bodyLineHeight: '1.5',
|
|
75
|
+
captionSize: '12px',
|
|
76
|
+
captionLineHeight: '1.4',
|
|
77
|
+
title4Size: '16px',
|
|
78
|
+
title4LineHeight: '1.3',
|
|
79
|
+
title3Size: '18px',
|
|
80
|
+
title3LineHeight: '1.3',
|
|
81
|
+
title2Size: '22px',
|
|
82
|
+
title2LineHeight: '1.25',
|
|
83
|
+
title1Size: '28px',
|
|
84
|
+
title1LineHeight: '1.2'
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
export const motion = css.defineConsts({
|
|
88
|
+
durationFast: '120ms',
|
|
89
|
+
durationBase: '180ms',
|
|
90
|
+
easing: 'cubic-bezier(0.4, 0, 0.2, 1)'
|
|
91
|
+
});
|
package/dist/Button.d.mts
DELETED
package/dist/Button.d.ts
DELETED
package/dist/Button.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
-
var __spreadValues = (a, b) => {
|
|
12
|
-
for (var prop in b || (b = {}))
|
|
13
|
-
if (__hasOwnProp.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
if (__getOwnPropSymbols)
|
|
16
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
-
if (__propIsEnum.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
}
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
-
var __objRest = (source, exclude) => {
|
|
24
|
-
var target = {};
|
|
25
|
-
for (var prop in source)
|
|
26
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
-
target[prop] = source[prop];
|
|
28
|
-
if (source != null && __getOwnPropSymbols)
|
|
29
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
-
target[prop] = source[prop];
|
|
32
|
-
}
|
|
33
|
-
return target;
|
|
34
|
-
};
|
|
35
|
-
var __export = (target, all) => {
|
|
36
|
-
for (var name in all)
|
|
37
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
38
|
-
};
|
|
39
|
-
var __copyProps = (to, from, except, desc) => {
|
|
40
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
-
for (let key of __getOwnPropNames(from))
|
|
42
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
43
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
44
|
-
}
|
|
45
|
-
return to;
|
|
46
|
-
};
|
|
47
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
48
|
-
|
|
49
|
-
// src/components/atoms/Button/Button.tsx
|
|
50
|
-
var Button_exports = {};
|
|
51
|
-
__export(Button_exports, {
|
|
52
|
-
Button: () => Button
|
|
53
|
-
});
|
|
54
|
-
module.exports = __toCommonJS(Button_exports);
|
|
55
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
56
|
-
var Button = (props) => {
|
|
57
|
-
const _a = props, { children } = _a, restProps = __objRest(_a, ["children"]);
|
|
58
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", __spreadProps(__spreadValues({ className: "rounded-lg bg-blue-600 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600", type: "button" }, restProps), { children }));
|
|
59
|
-
};
|
|
60
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
-
0 && (module.exports = {
|
|
62
|
-
Button
|
|
63
|
-
});
|
package/dist/Button.mjs
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// src/components/atoms/Button/Button.tsx
|
|
34
|
-
import { jsx } from "react/jsx-runtime";
|
|
35
|
-
var Button = (props) => {
|
|
36
|
-
const _a = props, { children } = _a, restProps = __objRest(_a, ["children"]);
|
|
37
|
-
return /* @__PURE__ */ jsx("button", __spreadProps(__spreadValues({ className: "rounded-lg bg-blue-600 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600", type: "button" }, restProps), { children }));
|
|
38
|
-
};
|
|
39
|
-
export {
|
|
40
|
-
Button
|
|
41
|
-
};
|
package/dist/button.d.mts
DELETED
package/dist/button.d.ts
DELETED
package/dist/button.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
-
var __spreadValues = (a, b) => {
|
|
12
|
-
for (var prop in b || (b = {}))
|
|
13
|
-
if (__hasOwnProp.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
if (__getOwnPropSymbols)
|
|
16
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
-
if (__propIsEnum.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
}
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
-
var __objRest = (source, exclude) => {
|
|
24
|
-
var target = {};
|
|
25
|
-
for (var prop in source)
|
|
26
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
-
target[prop] = source[prop];
|
|
28
|
-
if (source != null && __getOwnPropSymbols)
|
|
29
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
-
target[prop] = source[prop];
|
|
32
|
-
}
|
|
33
|
-
return target;
|
|
34
|
-
};
|
|
35
|
-
var __export = (target, all) => {
|
|
36
|
-
for (var name in all)
|
|
37
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
38
|
-
};
|
|
39
|
-
var __copyProps = (to, from, except, desc) => {
|
|
40
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
-
for (let key of __getOwnPropNames(from))
|
|
42
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
43
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
44
|
-
}
|
|
45
|
-
return to;
|
|
46
|
-
};
|
|
47
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
48
|
-
|
|
49
|
-
// src/components/atoms/Button/Button.tsx
|
|
50
|
-
var Button_exports = {};
|
|
51
|
-
__export(Button_exports, {
|
|
52
|
-
Button: () => Button
|
|
53
|
-
});
|
|
54
|
-
module.exports = __toCommonJS(Button_exports);
|
|
55
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
56
|
-
var Button = (props) => {
|
|
57
|
-
const _a = props, { children } = _a, restProps = __objRest(_a, ["children"]);
|
|
58
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", __spreadProps(__spreadValues({ className: "inline-flex items-center gap-2 rounded-xl bg-blue-500 px-5 py-2.5 text-sm font-medium text-black transition-all duration-200 hover:bg-blue-400 hover:shadow-lg hover:shadow-blue-500/25 active:scale-[0.98]", type: "button" }, restProps), { children }));
|
|
59
|
-
};
|
|
60
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
-
0 && (module.exports = {
|
|
62
|
-
Button
|
|
63
|
-
});
|
package/dist/button.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__objRest,
|
|
3
|
-
__spreadProps,
|
|
4
|
-
__spreadValues
|
|
5
|
-
} from "./chunk-FWCSY2DS.mjs";
|
|
6
|
-
|
|
7
|
-
// src/components/atoms/Button/Button.tsx
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
var Button = (props) => {
|
|
10
|
-
const _a = props, { children } = _a, restProps = __objRest(_a, ["children"]);
|
|
11
|
-
return /* @__PURE__ */ jsx("button", __spreadProps(__spreadValues({ className: "inline-flex items-center gap-2 rounded-xl bg-blue-500 px-5 py-2.5 text-sm font-medium text-black transition-all duration-200 hover:bg-blue-400 hover:shadow-lg hover:shadow-blue-500/25 active:scale-[0.98]", type: "button" }, restProps), { children }));
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
Button
|
|
15
|
-
};
|
package/dist/chunk-FWCSY2DS.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export {
|
|
34
|
-
__spreadValues,
|
|
35
|
-
__spreadProps,
|
|
36
|
-
__objRest
|
|
37
|
-
};
|