@shapesos/clay 0.3.1 → 0.4.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/dist/index.d.cts CHANGED
@@ -1,7 +1,16 @@
1
1
  export { ColorToken, TypographyStyle, TypographyType, colors, fontFamilies, typographyMixin, typographyStyles, typographyTypes } from './tokens.cjs';
2
2
  export { Chat, ChatContextValue, ChatMessage, MessageRole } from './chat.cjs';
3
3
  export { Icon, IconButton, IconButtonProps, IconButtonSize, IconProps } from './icon.cjs';
4
+ import { ReactElement } from 'react';
4
5
  export { Lottie, LottieAnimationData, LottieProps, LottieRef } from './lottie.cjs';
5
6
  import 'react/jsx-runtime';
6
- import 'react';
7
7
  import 'lottie-web';
8
+
9
+ interface KeyboardShortcutProps {
10
+ keys: string[];
11
+ className?: string;
12
+ }
13
+
14
+ declare function KeyboardShortcut({ keys, className }: KeyboardShortcutProps): ReactElement;
15
+
16
+ export { KeyboardShortcut, type KeyboardShortcutProps };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,16 @@
1
1
  export { ColorToken, TypographyStyle, TypographyType, colors, fontFamilies, typographyMixin, typographyStyles, typographyTypes } from './tokens.js';
2
2
  export { Chat, ChatContextValue, ChatMessage, MessageRole } from './chat.js';
3
3
  export { Icon, IconButton, IconButtonProps, IconButtonSize, IconProps } from './icon.js';
4
+ import { ReactElement } from 'react';
4
5
  export { Lottie, LottieAnimationData, LottieProps, LottieRef } from './lottie.js';
5
6
  import 'react/jsx-runtime';
6
- import 'react';
7
7
  import 'lottie-web';
8
+
9
+ interface KeyboardShortcutProps {
10
+ keys: string[];
11
+ className?: string;
12
+ }
13
+
14
+ declare function KeyboardShortcut({ keys, className }: KeyboardShortcutProps): ReactElement;
15
+
16
+ export { KeyboardShortcut, type KeyboardShortcutProps };
package/dist/index.js CHANGED
@@ -20,10 +20,33 @@ import {
20
20
  Lottie
21
21
  } from "./chunk-UKM5VQKW.js";
22
22
  import "./chunk-5WRI5ZAA.js";
23
+
24
+ // src/keyboard-shortcut/keyboard-shortcut-styles.ts
25
+ import styled from "styled-components";
26
+ var Wrapper = styled.div`
27
+ display: inline-flex;
28
+ align-items: center;
29
+ gap: 4px;
30
+ `;
31
+ var Key = styled.kbd`
32
+ padding: 1px 4px;
33
+ border-radius: 4px;
34
+ border: 1px solid ${colors["brown-70"]};
35
+ border-bottom-width: 2px;
36
+ ${typographyMixin(typographyTypes.GEIST_LABEL_CAPTION_MEDIUM)};
37
+ color: inherit;
38
+ `;
39
+
40
+ // src/keyboard-shortcut/keyboard-shortcut.tsx
41
+ import { jsx } from "react/jsx-runtime";
42
+ function KeyboardShortcut({ keys, className }) {
43
+ return /* @__PURE__ */ jsx(Wrapper, { className, children: keys.map((key) => /* @__PURE__ */ jsx(Key, { children: key }, key)) });
44
+ }
23
45
  export {
24
46
  Chat,
25
47
  Icon,
26
48
  IconButton,
49
+ KeyboardShortcut,
27
50
  Lottie,
28
51
  colors,
29
52
  fontFamilies,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"sources":["../src/keyboard-shortcut/keyboard-shortcut-styles.ts","../src/keyboard-shortcut/keyboard-shortcut.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { colors } from \"../tokens/colors\";\nimport { typographyMixin, typographyTypes } from \"../tokens/typography\";\n\nexport const Wrapper = styled.div`\n display: inline-flex;\n align-items: center;\n gap: 4px;\n`;\n\nexport const Key = styled.kbd`\n padding: 1px 4px;\n border-radius: 4px;\n border: 1px solid ${colors[\"brown-70\"]};\n border-bottom-width: 2px;\n ${typographyMixin(typographyTypes.GEIST_LABEL_CAPTION_MEDIUM)};\n color: inherit;\n`;\n","import type { ReactElement } from \"react\";\n\nimport { Key, Wrapper } from \"./keyboard-shortcut-styles\";\nimport type { KeyboardShortcutProps } from \"./types\";\n\nexport function KeyboardShortcut({ keys, className }: KeyboardShortcutProps): ReactElement {\n return (\n <Wrapper className={className}>\n {keys.map((key) => (\n <Key key={key}>{key}</Key>\n ))}\n </Wrapper>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,YAAY;AAKZ,IAAM,UAAU,OAAO;AAAA;AAAA;AAAA;AAAA;AAMvB,IAAM,MAAM,OAAO;AAAA;AAAA;AAAA,sBAGJ,OAAO,UAAU,CAAC;AAAA;AAAA,IAEpC,gBAAgB,gBAAgB,0BAA0B,CAAC;AAAA;AAAA;;;ACPvD;AAJD,SAAS,iBAAiB,EAAE,MAAM,UAAU,GAAwC;AACzF,SACE,oBAAC,WAAQ,WACN,eAAK,IAAI,CAAC,QACT,oBAAC,OAAe,iBAAN,GAAU,CACrB,GACH;AAEJ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapesos/clay",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "devDependencies": {