@shapesos/clay 0.4.1 → 0.5.1
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/chat.cjs +201 -85
- package/dist/chat.cjs.map +1 -1
- package/dist/chat.d.cts +6 -1
- package/dist/chat.d.ts +6 -1
- package/dist/chat.js +8 -4
- package/dist/chunk-DRBRT57F.js +1 -0
- package/dist/chunk-DRBRT57F.js.map +1 -0
- package/dist/chunk-JC2RQL5O.js +76 -0
- package/dist/chunk-JC2RQL5O.js.map +1 -0
- package/dist/{chunk-6HNZQ2BF.js → chunk-JF3P66JF.js} +2 -1
- package/dist/chunk-JF3P66JF.js.map +1 -0
- package/dist/chunk-K2Q5MQWJ.js +17 -0
- package/dist/chunk-K2Q5MQWJ.js.map +1 -0
- package/dist/chunk-MLCRDVQ2.js +89 -0
- package/dist/chunk-MLCRDVQ2.js.map +1 -0
- package/dist/chunk-OLJIJYB5.js +46 -0
- package/dist/chunk-OLJIJYB5.js.map +1 -0
- package/dist/chunk-SMTOVZ3O.js +19 -0
- package/dist/chunk-SMTOVZ3O.js.map +1 -0
- package/dist/{chunk-EPS4LOOW.js → chunk-SYMZU32H.js} +143 -63
- package/dist/chunk-SYMZU32H.js.map +1 -0
- package/dist/{chunk-A6DKIFWS.js → chunk-WQ2QTUYA.js} +9 -1
- package/dist/chunk-WQ2QTUYA.js.map +1 -0
- package/dist/chunk-WZHNMC6P.js +77 -0
- package/dist/chunk-WZHNMC6P.js.map +1 -0
- package/dist/icon.cjs +31 -16
- package/dist/icon.cjs.map +1 -1
- package/dist/icon.d.cts +6 -2
- package/dist/icon.d.ts +6 -2
- package/dist/icon.js +5 -3
- package/dist/index.cjs +299 -103
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -20
- package/dist/index.d.ts +5 -20
- package/dist/index.js +32 -74
- package/dist/index.js.map +1 -1
- package/dist/keyboard-shortcut.cjs +238 -0
- package/dist/keyboard-shortcut.cjs.map +1 -0
- package/dist/keyboard-shortcut.d.cts +19 -0
- package/dist/keyboard-shortcut.d.ts +19 -0
- package/dist/keyboard-shortcut.js +14 -0
- package/dist/keyboard-shortcut.js.map +1 -0
- package/dist/text-area.cjs +497 -0
- package/dist/text-area.cjs.map +1 -0
- package/dist/text-area.d.cts +18 -0
- package/dist/text-area.d.ts +18 -0
- package/dist/text-area.js +11 -0
- package/dist/text-area.js.map +1 -0
- package/dist/tokens.cjs +9 -0
- package/dist/tokens.cjs.map +1 -1
- package/dist/tokens.d.cts +2 -0
- package/dist/tokens.d.ts +2 -0
- package/dist/tokens.js +2 -2
- package/dist/utils.cjs +60 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +7 -0
- package/dist/utils.d.ts +7 -0
- package/dist/utils.js +13 -0
- package/dist/utils.js.map +1 -0
- package/package.json +17 -1
- package/dist/chunk-6HNZQ2BF.js.map +0 -1
- package/dist/chunk-A6DKIFWS.js.map +0 -1
- package/dist/chunk-AEXYOY5H.js +0 -115
- package/dist/chunk-AEXYOY5H.js.map +0 -1
- package/dist/chunk-EPS4LOOW.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
export { ColorToken, TypographyStyle, TypographyType, colors, fontFamilies, typographyMixin, typographyStyles, typographyTypes } from './tokens.cjs';
|
|
2
|
-
export { ChatContext, ChatContextValue, ChatMessage, ChatMessageType, MessageRole, useChatContext, useCopyToClipboard } from './chat.cjs';
|
|
2
|
+
export { ChatContext, ChatContextValue, ChatMessage, ChatMessageType, MESSAGE_ROLE, MessageRole, useChatContext, useCopyToClipboard } from './chat.cjs';
|
|
3
3
|
export { Icon, IconButton, IconButtonProps, IconButtonSize, IconProps } from './icon.cjs';
|
|
4
|
-
|
|
4
|
+
export { IconCtrl, KEYBOARD_SHORTCUT_VARIANTS, KeyIcon, KeyboardShortcut, KeyboardShortcutProps, KeyboardShortcutVariant } from './keyboard-shortcut.cjs';
|
|
5
5
|
export { Lottie, LottieAnimationData, LottieProps, LottieRef } from './lottie.cjs';
|
|
6
|
+
export { TextArea, TextAreaProps } from './text-area.cjs';
|
|
7
|
+
export { markdownToPlainText, mergeRefs } from './utils.cjs';
|
|
6
8
|
import 'react/jsx-runtime';
|
|
9
|
+
import 'react';
|
|
7
10
|
import 'lottie-web';
|
|
8
|
-
|
|
9
|
-
type KeyIcon = ComponentType<SVGProps<SVGSVGElement>>;
|
|
10
|
-
declare const KEYBOARD_SHORTCUT_VARIANTS: {
|
|
11
|
-
readonly OUTLINED: "outlined";
|
|
12
|
-
readonly FILLED: "filled";
|
|
13
|
-
};
|
|
14
|
-
type KeyboardShortcutVariant = (typeof KEYBOARD_SHORTCUT_VARIANTS)[keyof typeof KEYBOARD_SHORTCUT_VARIANTS];
|
|
15
|
-
interface KeyboardShortcutProps {
|
|
16
|
-
keys: KeyIcon[];
|
|
17
|
-
variant?: KeyboardShortcutVariant;
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
declare function KeyboardShortcut({ keys, variant, className, }: KeyboardShortcutProps): ReactElement;
|
|
22
|
-
|
|
23
|
-
declare function CtrlIcon(props: SVGProps<SVGSVGElement>): ReactElement;
|
|
24
|
-
|
|
25
|
-
export { CtrlIcon, KEYBOARD_SHORTCUT_VARIANTS, type KeyIcon, KeyboardShortcut, type KeyboardShortcutProps, type KeyboardShortcutVariant };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
export { ColorToken, TypographyStyle, TypographyType, colors, fontFamilies, typographyMixin, typographyStyles, typographyTypes } from './tokens.js';
|
|
2
|
-
export { ChatContext, ChatContextValue, ChatMessage, ChatMessageType, MessageRole, useChatContext, useCopyToClipboard } from './chat.js';
|
|
2
|
+
export { ChatContext, ChatContextValue, ChatMessage, ChatMessageType, MESSAGE_ROLE, MessageRole, useChatContext, useCopyToClipboard } from './chat.js';
|
|
3
3
|
export { Icon, IconButton, IconButtonProps, IconButtonSize, IconProps } from './icon.js';
|
|
4
|
-
|
|
4
|
+
export { IconCtrl, KEYBOARD_SHORTCUT_VARIANTS, KeyIcon, KeyboardShortcut, KeyboardShortcutProps, KeyboardShortcutVariant } from './keyboard-shortcut.js';
|
|
5
5
|
export { Lottie, LottieAnimationData, LottieProps, LottieRef } from './lottie.js';
|
|
6
|
+
export { TextArea, TextAreaProps } from './text-area.js';
|
|
7
|
+
export { markdownToPlainText, mergeRefs } from './utils.js';
|
|
6
8
|
import 'react/jsx-runtime';
|
|
9
|
+
import 'react';
|
|
7
10
|
import 'lottie-web';
|
|
8
|
-
|
|
9
|
-
type KeyIcon = ComponentType<SVGProps<SVGSVGElement>>;
|
|
10
|
-
declare const KEYBOARD_SHORTCUT_VARIANTS: {
|
|
11
|
-
readonly OUTLINED: "outlined";
|
|
12
|
-
readonly FILLED: "filled";
|
|
13
|
-
};
|
|
14
|
-
type KeyboardShortcutVariant = (typeof KEYBOARD_SHORTCUT_VARIANTS)[keyof typeof KEYBOARD_SHORTCUT_VARIANTS];
|
|
15
|
-
interface KeyboardShortcutProps {
|
|
16
|
-
keys: KeyIcon[];
|
|
17
|
-
variant?: KeyboardShortcutVariant;
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
declare function KeyboardShortcut({ keys, variant, className, }: KeyboardShortcutProps): ReactElement;
|
|
22
|
-
|
|
23
|
-
declare function CtrlIcon(props: SVGProps<SVGSVGElement>): ReactElement;
|
|
24
|
-
|
|
25
|
-
export { CtrlIcon, KEYBOARD_SHORTCUT_VARIANTS, type KeyIcon, KeyboardShortcut, type KeyboardShortcutProps, type KeyboardShortcutVariant };
|
package/dist/index.js
CHANGED
|
@@ -2,102 +2,60 @@ import "./chunk-C77QMQNT.js";
|
|
|
2
2
|
import {
|
|
3
3
|
ChatContext,
|
|
4
4
|
ChatMessage,
|
|
5
|
+
MESSAGE_ROLE,
|
|
5
6
|
useChatContext,
|
|
6
7
|
useCopyToClipboard
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SYMZU32H.js";
|
|
9
|
+
import "./chunk-72TJUKMV.js";
|
|
10
|
+
import {
|
|
11
|
+
IconButton
|
|
12
|
+
} from "./chunk-MLCRDVQ2.js";
|
|
13
|
+
import {
|
|
14
|
+
Lottie
|
|
15
|
+
} from "./chunk-BIATJTD4.js";
|
|
16
|
+
import {
|
|
17
|
+
TextArea
|
|
18
|
+
} from "./chunk-JC2RQL5O.js";
|
|
8
19
|
import {
|
|
9
20
|
fontFamilies,
|
|
10
21
|
typographyMixin,
|
|
11
22
|
typographyStyles,
|
|
12
23
|
typographyTypes
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-72TJUKMV.js";
|
|
24
|
+
} from "./chunk-WQ2QTUYA.js";
|
|
15
25
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
IconCtrl,
|
|
27
|
+
KEYBOARD_SHORTCUT_VARIANTS,
|
|
28
|
+
KeyboardShortcut
|
|
29
|
+
} from "./chunk-WZHNMC6P.js";
|
|
30
|
+
import {
|
|
31
|
+
Icon
|
|
32
|
+
} from "./chunk-OLJIJYB5.js";
|
|
19
33
|
import {
|
|
20
34
|
colors
|
|
21
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-JF3P66JF.js";
|
|
36
|
+
import "./chunk-DRBRT57F.js";
|
|
22
37
|
import {
|
|
23
|
-
|
|
24
|
-
} from "./chunk-
|
|
38
|
+
markdownToPlainText
|
|
39
|
+
} from "./chunk-SMTOVZ3O.js";
|
|
40
|
+
import {
|
|
41
|
+
mergeRefs
|
|
42
|
+
} from "./chunk-K2Q5MQWJ.js";
|
|
25
43
|
import "./chunk-5WRI5ZAA.js";
|
|
26
|
-
|
|
27
|
-
// src/components/keyboard-shortcut/keyboard-shortcut-styles.ts
|
|
28
|
-
import styled, { css } from "styled-components";
|
|
29
|
-
|
|
30
|
-
// src/components/keyboard-shortcut/types.ts
|
|
31
|
-
var KEYBOARD_SHORTCUT_VARIANTS = {
|
|
32
|
-
OUTLINED: "outlined",
|
|
33
|
-
FILLED: "filled"
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// src/components/keyboard-shortcut/keyboard-shortcut-styles.ts
|
|
37
|
-
var variantStyles = {
|
|
38
|
-
[KEYBOARD_SHORTCUT_VARIANTS.OUTLINED]: css`
|
|
39
|
-
border: 1px solid ${colors["brown-70"]};
|
|
40
|
-
color: ${colors["brown-10"]};
|
|
41
|
-
`,
|
|
42
|
-
[KEYBOARD_SHORTCUT_VARIANTS.FILLED]: css`
|
|
43
|
-
background: ${colors["brown-80"]};
|
|
44
|
-
color: ${colors["brown-10"]};
|
|
45
|
-
`
|
|
46
|
-
};
|
|
47
|
-
var Wrapper = styled.div`
|
|
48
|
-
display: inline-flex;
|
|
49
|
-
align-items: center;
|
|
50
|
-
gap: 2px;
|
|
51
|
-
`;
|
|
52
|
-
var Key = styled.kbd`
|
|
53
|
-
display: inline-flex;
|
|
54
|
-
align-items: center;
|
|
55
|
-
justify-content: center;
|
|
56
|
-
padding: 4px;
|
|
57
|
-
border-radius: 6px;
|
|
58
|
-
${({ $variant }) => variantStyles[$variant]};
|
|
59
|
-
`;
|
|
60
|
-
|
|
61
|
-
// src/components/keyboard-shortcut/keyboard-shortcut.tsx
|
|
62
|
-
import { jsx } from "react/jsx-runtime";
|
|
63
|
-
function KeyboardShortcut({
|
|
64
|
-
keys,
|
|
65
|
-
variant = KEYBOARD_SHORTCUT_VARIANTS.OUTLINED,
|
|
66
|
-
className
|
|
67
|
-
}) {
|
|
68
|
-
return /* @__PURE__ */ jsx(Wrapper, { className, children: keys.map((KeyComponent, index) => /* @__PURE__ */ jsx(Key, { $variant: variant, children: /* @__PURE__ */ jsx(Icon, { icon: KeyComponent, size: 12 }) }, index)) });
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// src/components/keyboard-shortcut/icons/ctrl-icon.tsx
|
|
72
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
73
|
-
function CtrlIcon(props) {
|
|
74
|
-
const { width = 24, height = 24, ...rest } = props;
|
|
75
|
-
return /* @__PURE__ */ jsx2("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width, height, fill: "none", ...rest, children: /* @__PURE__ */ jsx2(
|
|
76
|
-
"text",
|
|
77
|
-
{
|
|
78
|
-
x: "50%",
|
|
79
|
-
y: "50%",
|
|
80
|
-
dominantBaseline: "central",
|
|
81
|
-
textAnchor: "middle",
|
|
82
|
-
fill: "currentColor",
|
|
83
|
-
fontFamily: "Geist, sans-serif",
|
|
84
|
-
fontWeight: 500,
|
|
85
|
-
fontSize: 14,
|
|
86
|
-
children: "Ctrl"
|
|
87
|
-
}
|
|
88
|
-
) });
|
|
89
|
-
}
|
|
90
44
|
export {
|
|
91
45
|
ChatContext,
|
|
92
46
|
ChatMessage,
|
|
93
|
-
CtrlIcon,
|
|
94
47
|
Icon,
|
|
95
48
|
IconButton,
|
|
49
|
+
IconCtrl,
|
|
96
50
|
KEYBOARD_SHORTCUT_VARIANTS,
|
|
97
51
|
KeyboardShortcut,
|
|
98
52
|
Lottie,
|
|
53
|
+
MESSAGE_ROLE,
|
|
54
|
+
TextArea,
|
|
99
55
|
colors,
|
|
100
56
|
fontFamilies,
|
|
57
|
+
markdownToPlainText,
|
|
58
|
+
mergeRefs,
|
|
101
59
|
typographyMixin,
|
|
102
60
|
typographyStyles,
|
|
103
61
|
typographyTypes,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/components/keyboard-shortcut/index.ts
|
|
31
|
+
var keyboard_shortcut_exports = {};
|
|
32
|
+
__export(keyboard_shortcut_exports, {
|
|
33
|
+
IconCtrl: () => IconCtrl,
|
|
34
|
+
KEYBOARD_SHORTCUT_VARIANTS: () => KEYBOARD_SHORTCUT_VARIANTS,
|
|
35
|
+
KeyboardShortcut: () => KeyboardShortcut
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(keyboard_shortcut_exports);
|
|
38
|
+
|
|
39
|
+
// src/components/icon/icon.tsx
|
|
40
|
+
var import_react = require("react");
|
|
41
|
+
|
|
42
|
+
// src/components/icon/icon-styles.ts
|
|
43
|
+
var import_styled_components = __toESM(require("styled-components"), 1);
|
|
44
|
+
var STROKE_WIDTH_BY_SIZE = {
|
|
45
|
+
12: 1.4,
|
|
46
|
+
14: 1.4,
|
|
47
|
+
16: 1.8,
|
|
48
|
+
18: 1.8,
|
|
49
|
+
20: 1.8,
|
|
50
|
+
24: 1.8
|
|
51
|
+
};
|
|
52
|
+
var DEFAULT_STROKE_WIDTH = 1.8;
|
|
53
|
+
function getStrokeWidth(size) {
|
|
54
|
+
return STROKE_WIDTH_BY_SIZE[size] ?? DEFAULT_STROKE_WIDTH;
|
|
55
|
+
}
|
|
56
|
+
var IconWrapper = import_styled_components.default.span`
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
color: ${({ $color }) => $color ?? "currentColor"};
|
|
61
|
+
flex-shrink: 0;
|
|
62
|
+
`;
|
|
63
|
+
|
|
64
|
+
// src/components/icon/icon.tsx
|
|
65
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
66
|
+
var DEFAULT_SIZE = 16;
|
|
67
|
+
var Icon = (0, import_react.forwardRef)(function Icon2({ icon: IconComponent, size = DEFAULT_SIZE, color, className, "aria-label": ariaLabel }, ref) {
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
|
+
IconWrapper,
|
|
70
|
+
{
|
|
71
|
+
ref,
|
|
72
|
+
className,
|
|
73
|
+
$color: color,
|
|
74
|
+
"aria-label": ariaLabel,
|
|
75
|
+
role: ariaLabel ? "img" : void 0,
|
|
76
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconComponent, { width: size, height: size, strokeWidth: getStrokeWidth(size) })
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
// src/components/keyboard-shortcut/keyboard-shortcut-styles.ts
|
|
82
|
+
var import_styled_components2 = __toESM(require("styled-components"), 1);
|
|
83
|
+
|
|
84
|
+
// src/tokens/colors.ts
|
|
85
|
+
var colors = {
|
|
86
|
+
// White
|
|
87
|
+
white: "#FFFFFF",
|
|
88
|
+
"white-alpha-85": "rgba(255, 255, 255, 0.85)",
|
|
89
|
+
"white-alpha-40": "rgba(255, 255, 255, 0.40)",
|
|
90
|
+
// Brown
|
|
91
|
+
"brown-10": "#FAF9F8",
|
|
92
|
+
"brown-20": "#F5F3F0",
|
|
93
|
+
"brown-30": "#EEEBE5",
|
|
94
|
+
"brown-40": "#E6E2DA",
|
|
95
|
+
"brown-50": "#CFCBC4",
|
|
96
|
+
"brown-60": "#A19E99",
|
|
97
|
+
"brown-70": "#73716D",
|
|
98
|
+
"brown-80": "#5C5A57",
|
|
99
|
+
"brown-90": "#2E2D2C",
|
|
100
|
+
"brown-100": "#171716",
|
|
101
|
+
"brown-alpha-12": "rgba(23, 23, 22, 0.12)",
|
|
102
|
+
"brown-alpha-20": "rgba(23, 23, 22, 0.20)",
|
|
103
|
+
"brown-alpha-55": "rgba(23, 23, 22, 0.55)",
|
|
104
|
+
"brown-alpha-70": "rgba(23, 23, 22, 0.70)",
|
|
105
|
+
"brown-alpha-80": "rgba(23, 23, 22, 0.80)",
|
|
106
|
+
"brown-alpha-90": "rgba(23, 23, 22, 0.90)",
|
|
107
|
+
// Fuchsia
|
|
108
|
+
"fuchsia-50": "#FAF5FF",
|
|
109
|
+
"fuchsia-300": "#F0ABFC",
|
|
110
|
+
"fuchsia-500": "#D946EF",
|
|
111
|
+
"fuchsia-600": "#C026D3",
|
|
112
|
+
"fuchsia-800": "#86198F",
|
|
113
|
+
// Pink
|
|
114
|
+
"pink-50": "#FDF2F8",
|
|
115
|
+
"pink-400": "#F472B6",
|
|
116
|
+
"pink-600": "#DB2777",
|
|
117
|
+
"pink-800": "#9D174D",
|
|
118
|
+
// Violet
|
|
119
|
+
"violet-50": "#F5F3FF",
|
|
120
|
+
"violet-400": "#A78BFA",
|
|
121
|
+
"violet-600": "#7C3AED",
|
|
122
|
+
"violet-800": "#5B21B6",
|
|
123
|
+
// Indigo
|
|
124
|
+
"indigo-50": "#EEF2FF",
|
|
125
|
+
"indigo-400": "#818CF8",
|
|
126
|
+
"indigo-500": "#6366F1",
|
|
127
|
+
"indigo-600": "#4F46E5",
|
|
128
|
+
"indigo-800": "#3730A3",
|
|
129
|
+
// Cyan
|
|
130
|
+
"cyan-50": "#E7FEFF",
|
|
131
|
+
"cyan-300": "#67E8F9",
|
|
132
|
+
"cyan-600": "#0891B2",
|
|
133
|
+
"cyan-900": "#164E63",
|
|
134
|
+
// Teal
|
|
135
|
+
"teal-50": "#EBFDF9",
|
|
136
|
+
"teal-300": "#5EEAD4",
|
|
137
|
+
"teal-600": "#0D9488",
|
|
138
|
+
// Rose
|
|
139
|
+
"rose-400": "#FB7185",
|
|
140
|
+
// Purple
|
|
141
|
+
"purple-400": "#C084FC",
|
|
142
|
+
// Blue
|
|
143
|
+
"blue-50": "#EFF6FF",
|
|
144
|
+
"blue-100": "#DBEAFE",
|
|
145
|
+
"blue-300": "#93C5FD",
|
|
146
|
+
"blue-400": "#60A5FA",
|
|
147
|
+
"blue-600": "#2563EB",
|
|
148
|
+
"blue-800": "#1E40AF",
|
|
149
|
+
// Sky
|
|
150
|
+
"sky-300": "#7DD3FC",
|
|
151
|
+
// Green
|
|
152
|
+
"green-50": "#ECF9F0",
|
|
153
|
+
"green-100": "#D4F1D9",
|
|
154
|
+
"green-400": "#3DC269",
|
|
155
|
+
"green-700": "#277C43",
|
|
156
|
+
"green-800": "#1C5930",
|
|
157
|
+
// Orange
|
|
158
|
+
"orange-50": "#FFF7ED",
|
|
159
|
+
"orange-100": "#FFEDD5",
|
|
160
|
+
"orange-200": "#FED7AA",
|
|
161
|
+
"orange-500": "#F97316",
|
|
162
|
+
"orange-600": "#EA580C",
|
|
163
|
+
// Red
|
|
164
|
+
"red-50": "#FEF2F2",
|
|
165
|
+
"red-100": "#FEE2E2",
|
|
166
|
+
"red-200": "#FECACA",
|
|
167
|
+
"red-400": "#F7776C",
|
|
168
|
+
"red-500": "#EF4444",
|
|
169
|
+
"red-600": "#DC2626"
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
// src/components/keyboard-shortcut/types.ts
|
|
173
|
+
var KEYBOARD_SHORTCUT_VARIANTS = {
|
|
174
|
+
OUTLINED: "outlined",
|
|
175
|
+
FILLED: "filled"
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
// src/components/keyboard-shortcut/keyboard-shortcut-styles.ts
|
|
179
|
+
var variantStyles = {
|
|
180
|
+
[KEYBOARD_SHORTCUT_VARIANTS.OUTLINED]: import_styled_components2.css`
|
|
181
|
+
border: 1px solid ${colors["white-alpha-40"]};
|
|
182
|
+
color: ${colors["brown-10"]};
|
|
183
|
+
`,
|
|
184
|
+
[KEYBOARD_SHORTCUT_VARIANTS.FILLED]: import_styled_components2.css`
|
|
185
|
+
background: ${colors["brown-80"]};
|
|
186
|
+
color: ${colors["brown-10"]};
|
|
187
|
+
`
|
|
188
|
+
};
|
|
189
|
+
var Wrapper = import_styled_components2.default.div`
|
|
190
|
+
display: inline-flex;
|
|
191
|
+
align-items: center;
|
|
192
|
+
gap: 2px;
|
|
193
|
+
`;
|
|
194
|
+
var Key = import_styled_components2.default.kbd`
|
|
195
|
+
display: inline-flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
justify-content: center;
|
|
198
|
+
padding: 2px;
|
|
199
|
+
border-radius: 6px;
|
|
200
|
+
${({ $variant }) => variantStyles[$variant]};
|
|
201
|
+
`;
|
|
202
|
+
|
|
203
|
+
// src/components/keyboard-shortcut/keyboard-shortcut.tsx
|
|
204
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
205
|
+
function KeyboardShortcut({
|
|
206
|
+
keys,
|
|
207
|
+
variant = KEYBOARD_SHORTCUT_VARIANTS.OUTLINED,
|
|
208
|
+
className
|
|
209
|
+
}) {
|
|
210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Wrapper, { className, children: keys.map((KeyComponent, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Key, { $variant: variant, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { icon: KeyComponent, size: 12 }) }, index)) });
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// src/components/keyboard-shortcut/icons/icon-ctrl.tsx
|
|
214
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
215
|
+
function IconCtrl(props) {
|
|
216
|
+
const { width = 24, height = 24, ...rest } = props;
|
|
217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width, height, fill: "none", ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
218
|
+
"text",
|
|
219
|
+
{
|
|
220
|
+
x: "50%",
|
|
221
|
+
y: "50%",
|
|
222
|
+
dominantBaseline: "central",
|
|
223
|
+
textAnchor: "middle",
|
|
224
|
+
fill: "currentColor",
|
|
225
|
+
fontFamily: "Geist, sans-serif",
|
|
226
|
+
fontWeight: 300,
|
|
227
|
+
fontSize: 14,
|
|
228
|
+
children: "Ctrl"
|
|
229
|
+
}
|
|
230
|
+
) });
|
|
231
|
+
}
|
|
232
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
233
|
+
0 && (module.exports = {
|
|
234
|
+
IconCtrl,
|
|
235
|
+
KEYBOARD_SHORTCUT_VARIANTS,
|
|
236
|
+
KeyboardShortcut
|
|
237
|
+
});
|
|
238
|
+
//# sourceMappingURL=keyboard-shortcut.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/keyboard-shortcut/index.ts","../src/components/icon/icon.tsx","../src/components/icon/icon-styles.ts","../src/components/keyboard-shortcut/keyboard-shortcut-styles.ts","../src/tokens/colors.ts","../src/components/keyboard-shortcut/types.ts","../src/components/keyboard-shortcut/keyboard-shortcut.tsx","../src/components/keyboard-shortcut/icons/icon-ctrl.tsx"],"sourcesContent":["export { KeyboardShortcut } from \"./keyboard-shortcut\";\nexport { IconCtrl } from \"./icons/icon-ctrl\";\nexport { KEYBOARD_SHORTCUT_VARIANTS } from \"./types\";\nexport type { KeyboardShortcutProps, KeyIcon, KeyboardShortcutVariant } from \"./types\";\n","import { forwardRef } from \"react\";\n\nimport { IconWrapper, getStrokeWidth } from \"./icon-styles\";\nimport type { IconProps } from \"./types\";\n\nconst DEFAULT_SIZE = 16;\n\nexport const Icon = forwardRef<HTMLSpanElement, IconProps>(function Icon(\n { icon: IconComponent, size = DEFAULT_SIZE, color, className, \"aria-label\": ariaLabel },\n ref\n) {\n return (\n <IconWrapper\n ref={ref}\n className={className}\n $color={color}\n aria-label={ariaLabel}\n role={ariaLabel ? \"img\" : undefined}\n >\n <IconComponent width={size} height={size} strokeWidth={getStrokeWidth(size)} />\n </IconWrapper>\n );\n});\n","import styled from \"styled-components\";\n\nexport const STROKE_WIDTH_BY_SIZE: Record<number, number> = {\n 12: 1.4,\n 14: 1.4,\n 16: 1.8,\n 18: 1.8,\n 20: 1.8,\n 24: 1.8,\n};\n\nexport const DEFAULT_STROKE_WIDTH = 1.8;\n\nexport function getStrokeWidth(size: number): number {\n return STROKE_WIDTH_BY_SIZE[size] ?? DEFAULT_STROKE_WIDTH;\n}\n\nexport const IconWrapper = styled.span<{ $color?: string }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: ${({ $color }) => $color ?? \"currentColor\"};\n flex-shrink: 0;\n`;\n","import styled, { css } from \"styled-components\";\n\nimport { colors } from \"../../tokens/colors\";\nimport { KEYBOARD_SHORTCUT_VARIANTS } from \"./types\";\nimport type { KeyboardShortcutVariant } from \"./types\";\n\nconst variantStyles: Record<KeyboardShortcutVariant, ReturnType<typeof css>> = {\n [KEYBOARD_SHORTCUT_VARIANTS.OUTLINED]: css`\n border: 1px solid ${colors[\"white-alpha-40\"]};\n color: ${colors[\"brown-10\"]};\n `,\n [KEYBOARD_SHORTCUT_VARIANTS.FILLED]: css`\n background: ${colors[\"brown-80\"]};\n color: ${colors[\"brown-10\"]};\n `,\n};\n\nexport const Wrapper = styled.div`\n display: inline-flex;\n align-items: center;\n gap: 2px;\n`;\n\nexport const Key = styled.kbd<{ $variant: KeyboardShortcutVariant }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 2px;\n border-radius: 6px;\n ${({ $variant }) => variantStyles[$variant]};\n`;\n","export const colors = {\n // White\n white: \"#FFFFFF\",\n \"white-alpha-85\": \"rgba(255, 255, 255, 0.85)\",\n \"white-alpha-40\": \"rgba(255, 255, 255, 0.40)\",\n\n // Brown\n \"brown-10\": \"#FAF9F8\",\n \"brown-20\": \"#F5F3F0\",\n \"brown-30\": \"#EEEBE5\",\n \"brown-40\": \"#E6E2DA\",\n \"brown-50\": \"#CFCBC4\",\n \"brown-60\": \"#A19E99\",\n \"brown-70\": \"#73716D\",\n \"brown-80\": \"#5C5A57\",\n \"brown-90\": \"#2E2D2C\",\n \"brown-100\": \"#171716\",\n \"brown-alpha-12\": \"rgba(23, 23, 22, 0.12)\",\n \"brown-alpha-20\": \"rgba(23, 23, 22, 0.20)\",\n \"brown-alpha-55\": \"rgba(23, 23, 22, 0.55)\",\n \"brown-alpha-70\": \"rgba(23, 23, 22, 0.70)\",\n \"brown-alpha-80\": \"rgba(23, 23, 22, 0.80)\",\n \"brown-alpha-90\": \"rgba(23, 23, 22, 0.90)\",\n\n // Fuchsia\n \"fuchsia-50\": \"#FAF5FF\",\n \"fuchsia-300\": \"#F0ABFC\",\n \"fuchsia-500\": \"#D946EF\",\n \"fuchsia-600\": \"#C026D3\",\n \"fuchsia-800\": \"#86198F\",\n\n // Pink\n \"pink-50\": \"#FDF2F8\",\n \"pink-400\": \"#F472B6\",\n \"pink-600\": \"#DB2777\",\n \"pink-800\": \"#9D174D\",\n\n // Violet\n \"violet-50\": \"#F5F3FF\",\n \"violet-400\": \"#A78BFA\",\n \"violet-600\": \"#7C3AED\",\n \"violet-800\": \"#5B21B6\",\n\n // Indigo\n \"indigo-50\": \"#EEF2FF\",\n \"indigo-400\": \"#818CF8\",\n \"indigo-500\": \"#6366F1\",\n \"indigo-600\": \"#4F46E5\",\n \"indigo-800\": \"#3730A3\",\n\n // Cyan\n \"cyan-50\": \"#E7FEFF\",\n \"cyan-300\": \"#67E8F9\",\n \"cyan-600\": \"#0891B2\",\n \"cyan-900\": \"#164E63\",\n\n // Teal\n \"teal-50\": \"#EBFDF9\",\n \"teal-300\": \"#5EEAD4\",\n \"teal-600\": \"#0D9488\",\n\n // Rose\n \"rose-400\": \"#FB7185\",\n\n // Purple\n \"purple-400\": \"#C084FC\",\n\n // Blue\n \"blue-50\": \"#EFF6FF\",\n \"blue-100\": \"#DBEAFE\",\n \"blue-300\": \"#93C5FD\",\n \"blue-400\": \"#60A5FA\",\n \"blue-600\": \"#2563EB\",\n \"blue-800\": \"#1E40AF\",\n\n // Sky\n \"sky-300\": \"#7DD3FC\",\n\n // Green\n \"green-50\": \"#ECF9F0\",\n \"green-100\": \"#D4F1D9\",\n \"green-400\": \"#3DC269\",\n \"green-700\": \"#277C43\",\n \"green-800\": \"#1C5930\",\n\n // Orange\n \"orange-50\": \"#FFF7ED\",\n \"orange-100\": \"#FFEDD5\",\n \"orange-200\": \"#FED7AA\",\n \"orange-500\": \"#F97316\",\n \"orange-600\": \"#EA580C\",\n\n // Red\n \"red-50\": \"#FEF2F2\",\n \"red-100\": \"#FEE2E2\",\n \"red-200\": \"#FECACA\",\n \"red-400\": \"#F7776C\",\n \"red-500\": \"#EF4444\",\n \"red-600\": \"#DC2626\",\n} as const;\n\nexport type ColorToken = keyof typeof colors;\n","import type { ComponentType, SVGProps } from \"react\";\n\nexport type KeyIcon = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport const KEYBOARD_SHORTCUT_VARIANTS = {\n OUTLINED: \"outlined\",\n FILLED: \"filled\",\n} as const;\n\nexport type KeyboardShortcutVariant = (typeof KEYBOARD_SHORTCUT_VARIANTS)[keyof typeof KEYBOARD_SHORTCUT_VARIANTS];\n\nexport interface KeyboardShortcutProps {\n keys: KeyIcon[];\n variant?: KeyboardShortcutVariant;\n className?: string;\n}\n","import type { ReactElement } from \"react\";\n\nimport { Icon } from \"../icon/icon\";\nimport { Key, Wrapper } from \"./keyboard-shortcut-styles\";\nimport { KEYBOARD_SHORTCUT_VARIANTS } from \"./types\";\nimport type { KeyboardShortcutProps } from \"./types\";\n\nexport function KeyboardShortcut({\n keys,\n variant = KEYBOARD_SHORTCUT_VARIANTS.OUTLINED,\n className,\n}: KeyboardShortcutProps): ReactElement {\n return (\n <Wrapper className={className}>\n {keys.map((KeyComponent, index) => (\n <Key key={index} $variant={variant}>\n <Icon icon={KeyComponent} size={12} />\n </Key>\n ))}\n </Wrapper>\n );\n}\n","import type { ReactElement, SVGProps } from \"react\";\n\nexport function IconCtrl(props: SVGProps<SVGSVGElement>): ReactElement {\n const { width = 24, height = 24, ...rest } = props;\n\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width={width} height={height} fill=\"none\" {...rest}>\n <text\n x=\"50%\"\n y=\"50%\"\n dominantBaseline=\"central\"\n textAnchor=\"middle\"\n fill=\"currentColor\"\n fontFamily=\"Geist, sans-serif\"\n fontWeight={300}\n fontSize={14}\n >\n Ctrl\n </text>\n </svg>\n );\n}\n"],"mappings":"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","names":["styled","Icon","import_styled_components","styled","import_jsx_runtime","import_jsx_runtime"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentType, SVGProps, ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
type KeyIcon = ComponentType<SVGProps<SVGSVGElement>>;
|
|
4
|
+
declare const KEYBOARD_SHORTCUT_VARIANTS: {
|
|
5
|
+
readonly OUTLINED: "outlined";
|
|
6
|
+
readonly FILLED: "filled";
|
|
7
|
+
};
|
|
8
|
+
type KeyboardShortcutVariant = (typeof KEYBOARD_SHORTCUT_VARIANTS)[keyof typeof KEYBOARD_SHORTCUT_VARIANTS];
|
|
9
|
+
interface KeyboardShortcutProps {
|
|
10
|
+
keys: KeyIcon[];
|
|
11
|
+
variant?: KeyboardShortcutVariant;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare function KeyboardShortcut({ keys, variant, className, }: KeyboardShortcutProps): ReactElement;
|
|
16
|
+
|
|
17
|
+
declare function IconCtrl(props: SVGProps<SVGSVGElement>): ReactElement;
|
|
18
|
+
|
|
19
|
+
export { IconCtrl, KEYBOARD_SHORTCUT_VARIANTS, type KeyIcon, KeyboardShortcut, type KeyboardShortcutProps, type KeyboardShortcutVariant };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentType, SVGProps, ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
type KeyIcon = ComponentType<SVGProps<SVGSVGElement>>;
|
|
4
|
+
declare const KEYBOARD_SHORTCUT_VARIANTS: {
|
|
5
|
+
readonly OUTLINED: "outlined";
|
|
6
|
+
readonly FILLED: "filled";
|
|
7
|
+
};
|
|
8
|
+
type KeyboardShortcutVariant = (typeof KEYBOARD_SHORTCUT_VARIANTS)[keyof typeof KEYBOARD_SHORTCUT_VARIANTS];
|
|
9
|
+
interface KeyboardShortcutProps {
|
|
10
|
+
keys: KeyIcon[];
|
|
11
|
+
variant?: KeyboardShortcutVariant;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare function KeyboardShortcut({ keys, variant, className, }: KeyboardShortcutProps): ReactElement;
|
|
16
|
+
|
|
17
|
+
declare function IconCtrl(props: SVGProps<SVGSVGElement>): ReactElement;
|
|
18
|
+
|
|
19
|
+
export { IconCtrl, KEYBOARD_SHORTCUT_VARIANTS, type KeyIcon, KeyboardShortcut, type KeyboardShortcutProps, type KeyboardShortcutVariant };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IconCtrl,
|
|
3
|
+
KEYBOARD_SHORTCUT_VARIANTS,
|
|
4
|
+
KeyboardShortcut
|
|
5
|
+
} from "./chunk-WZHNMC6P.js";
|
|
6
|
+
import "./chunk-OLJIJYB5.js";
|
|
7
|
+
import "./chunk-JF3P66JF.js";
|
|
8
|
+
import "./chunk-5WRI5ZAA.js";
|
|
9
|
+
export {
|
|
10
|
+
IconCtrl,
|
|
11
|
+
KEYBOARD_SHORTCUT_VARIANTS,
|
|
12
|
+
KeyboardShortcut
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=keyboard-shortcut.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|