@docubook/ui-react 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Wildan Nursahidan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -45,6 +45,37 @@ import { Modal, Collapse, Input, Navbar } from "@docubook/ui-react";
45
45
  | `Toggle`, `ToggleGroup` | `@docubook/ui-react/toggle` | Toggle switch with label/description |
46
46
  | `Dropdown`, `DropdownItem`, `DropdownLink` | `@docubook/ui-react/dropdown` | Details-based dropdown menu |
47
47
 
48
+ #### FnKey with Lucide Icons
49
+
50
+ `FnKey` renders HTML entities by default. Call `FnKey.configure()` once at your app entry point to use Lucide icons instead:
51
+
52
+ ```tsx
53
+ // app/layout.tsx or main.tsx
54
+ import {
55
+ Command, Option, ChevronUp, ArrowBigUp,
56
+ CircleArrowOutUpLeft, Space, Delete, ArrowRightToLine,
57
+ ChevronDown, ChevronLeft, ChevronRight,
58
+ } from "lucide-react";
59
+ import { FnKey } from "@docubook/ui-react/kbd";
60
+
61
+ FnKey.configure({
62
+ Command, Option, ChevronUp, ArrowBigUp,
63
+ CircleArrowOutUpLeft, Space, Delete, ArrowRightToLine,
64
+ ChevronDown, ChevronLeft, ChevronRight,
65
+ });
66
+ ```
67
+
68
+ Then use `FnKey` anywhere — icons are applied globally:
69
+
70
+ ```tsx
71
+ import { Kbd, FnKey } from "@docubook/ui-react/kbd";
72
+
73
+ <Kbd><FnKey.Cmd /></Kbd> // → Command icon
74
+ <Kbd><FnKey.Shift /></Kbd> // → ArrowBigUp icon
75
+ ```
76
+
77
+ Without `configure()`, all keys fall back to HTML entities automatically.
78
+
48
79
  #### PaginationDocs with Custom Icons
49
80
 
50
81
  ```tsx
@@ -0,0 +1,45 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues,
5
+ cn
6
+ } from "./chunk-GRADTONK.js";
7
+
8
+ // src/base/kbd.tsx
9
+ import { forwardRef } from "react";
10
+ import { jsx } from "react/jsx-runtime";
11
+ var Kbd = forwardRef(
12
+ (_a, ref) => {
13
+ var _b = _a, { children, className, size } = _b, props = __objRest(_b, ["children", "className", "size"]);
14
+ return /* @__PURE__ */ jsx("kbd", __spreadProps(__spreadValues({ ref, className: cn("kbd", size && `kbd-${size}`, className) }, props), { children }));
15
+ }
16
+ );
17
+ Kbd.displayName = "Kbd";
18
+ var _icons = {};
19
+ var iconSize = 12;
20
+ function Key({ icon: Icon, entity }) {
21
+ if (Icon) return /* @__PURE__ */ jsx(Icon, { size: iconSize });
22
+ return /* @__PURE__ */ jsx("span", { style: { fontSize: iconSize }, children: entity });
23
+ }
24
+ var FnKey = {
25
+ configure(icons) {
26
+ _icons = icons;
27
+ },
28
+ Cmd: () => /* @__PURE__ */ jsx(Key, { icon: _icons.Command, entity: "\u2318" }),
29
+ Option: () => /* @__PURE__ */ jsx(Key, { icon: _icons.Option, entity: "\u2325" }),
30
+ Ctrl: () => /* @__PURE__ */ jsx(Key, { icon: _icons.ChevronUp, entity: "\u2303" }),
31
+ Shift: () => /* @__PURE__ */ jsx(Key, { icon: _icons.ArrowBigUp, entity: "\u21E7" }),
32
+ Esc: () => /* @__PURE__ */ jsx(Key, { icon: _icons.CircleArrowOutUpLeft, entity: "\u238B" }),
33
+ Space: () => /* @__PURE__ */ jsx(Key, { icon: _icons.Space, entity: "\u2423" }),
34
+ Delete: () => /* @__PURE__ */ jsx(Key, { icon: _icons.Delete, entity: "\u232B" }),
35
+ Tab: () => /* @__PURE__ */ jsx(Key, { icon: _icons.ArrowRightToLine, entity: "\u21E5" }),
36
+ Up: () => /* @__PURE__ */ jsx(Key, { icon: _icons.ChevronUp, entity: "\u2191" }),
37
+ Down: () => /* @__PURE__ */ jsx(Key, { icon: _icons.ChevronDown, entity: "\u2193" }),
38
+ Left: () => /* @__PURE__ */ jsx(Key, { icon: _icons.ChevronLeft, entity: "\u2190" }),
39
+ Right: () => /* @__PURE__ */ jsx(Key, { icon: _icons.ChevronRight, entity: "\u2192" })
40
+ };
41
+
42
+ export {
43
+ Kbd,
44
+ FnKey
45
+ };
@@ -0,0 +1,45 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+ var _chunk2DFF5NELcjs = require('./chunk-2DFF5NEL.cjs');
7
+
8
+ // src/base/kbd.tsx
9
+ var _react = require('react');
10
+ var _jsxruntime = require('react/jsx-runtime');
11
+ var Kbd = _react.forwardRef.call(void 0,
12
+ (_a, ref) => {
13
+ var _b = _a, { children, className, size } = _b, props = _chunk2DFF5NELcjs.__objRest.call(void 0, _b, ["children", "className", "size"]);
14
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "kbd", _chunk2DFF5NELcjs.__spreadProps.call(void 0, _chunk2DFF5NELcjs.__spreadValues.call(void 0, { ref, className: _chunk2DFF5NELcjs.cn.call(void 0, "kbd", size && `kbd-${size}`, className) }, props), { children }));
15
+ }
16
+ );
17
+ Kbd.displayName = "Kbd";
18
+ var _icons = {};
19
+ var iconSize = 12;
20
+ function Key({ icon: Icon, entity }) {
21
+ if (Icon) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Icon, { size: iconSize });
22
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { fontSize: iconSize }, children: entity });
23
+ }
24
+ var FnKey = {
25
+ configure(icons) {
26
+ _icons = icons;
27
+ },
28
+ Cmd: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Key, { icon: _icons.Command, entity: "\u2318" }),
29
+ Option: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Key, { icon: _icons.Option, entity: "\u2325" }),
30
+ Ctrl: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Key, { icon: _icons.ChevronUp, entity: "\u2303" }),
31
+ Shift: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Key, { icon: _icons.ArrowBigUp, entity: "\u21E7" }),
32
+ Esc: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Key, { icon: _icons.CircleArrowOutUpLeft, entity: "\u238B" }),
33
+ Space: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Key, { icon: _icons.Space, entity: "\u2423" }),
34
+ Delete: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Key, { icon: _icons.Delete, entity: "\u232B" }),
35
+ Tab: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Key, { icon: _icons.ArrowRightToLine, entity: "\u21E5" }),
36
+ Up: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Key, { icon: _icons.ChevronUp, entity: "\u2191" }),
37
+ Down: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Key, { icon: _icons.ChevronDown, entity: "\u2193" }),
38
+ Left: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Key, { icon: _icons.ChevronLeft, entity: "\u2190" }),
39
+ Right: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Key, { icon: _icons.ChevronRight, entity: "\u2192" })
40
+ };
41
+
42
+
43
+
44
+
45
+ exports.Kbd = Kbd; exports.FnKey = FnKey;
package/dist/index.cjs CHANGED
@@ -47,7 +47,7 @@ var _chunkMWJV72OMcjs = require('./chunk-MWJV72OM.cjs');
47
47
 
48
48
 
49
49
 
50
- var _chunkK6B7XOJ5cjs = require('./chunk-K6B7XOJ5.cjs');
50
+ var _chunkTDFVUBGOcjs = require('./chunk-TDFVUBGO.cjs');
51
51
 
52
52
 
53
53
  var _chunk2DFF5NELcjs = require('./chunk-2DFF5NEL.cjs');
@@ -81,4 +81,4 @@ var _chunk2DFF5NELcjs = require('./chunk-2DFF5NEL.cjs');
81
81
 
82
82
 
83
83
 
84
- exports.Accordion = _chunkSV4L2FGTcjs.Accordion; exports.Breadcrumb = _chunkRDRDPR67cjs.Breadcrumb; exports.BreadcrumbItem = _chunkRDRDPR67cjs.BreadcrumbItem; exports.BreadcrumbList = _chunkRDRDPR67cjs.BreadcrumbList; exports.BreadcrumbPage = _chunkRDRDPR67cjs.BreadcrumbPage; exports.Collapse = _chunkSV4L2FGTcjs.Collapse; exports.Drawer = _chunkBHHZBMD4cjs.Drawer; exports.DrawerContent = _chunkBHHZBMD4cjs.DrawerContent; exports.DrawerSidePanel = _chunkBHHZBMD4cjs.DrawerSidePanel; exports.DrawerTrigger = _chunkBHHZBMD4cjs.DrawerTrigger; exports.Dropdown = _chunkLUVR2YGTcjs.Dropdown; exports.DropdownItem = _chunkLUVR2YGTcjs.DropdownItem; exports.DropdownLink = _chunkLUVR2YGTcjs.DropdownLink; exports.FnKey = _chunkK6B7XOJ5cjs.FnKey; exports.Input = _chunkMWJV72OMcjs.Input; exports.InputGroup = _chunkMWJV72OMcjs.InputGroup; exports.Kbd = _chunkK6B7XOJ5cjs.Kbd; exports.Logo = _chunk6B7U7IWTcjs.Logo; exports.Modal = _chunkHTH2UTCLcjs.Modal; exports.NavMenu = _chunk6B7U7IWTcjs.NavMenu; exports.NavMenuLink = _chunk6B7U7IWTcjs.NavMenuLink; exports.Navbar = _chunk6B7U7IWTcjs.Navbar; exports.PaginationDocs = _chunkK22HSWMWcjs.PaginationDocs; exports.ThemeControllerToggle = _chunk5SA5UPFQcjs.ThemeControllerToggle; exports.Toggle = _chunkOO3HHTPVcjs.Toggle; exports.ToggleGroup = _chunkOO3HHTPVcjs.ToggleGroup; exports.cn = _chunk2DFF5NELcjs.cn; exports.useDrawerState = _chunkBHHZBMD4cjs.useDrawerState; exports.useModal = _chunkHTH2UTCLcjs.useModal;
84
+ exports.Accordion = _chunkSV4L2FGTcjs.Accordion; exports.Breadcrumb = _chunkRDRDPR67cjs.Breadcrumb; exports.BreadcrumbItem = _chunkRDRDPR67cjs.BreadcrumbItem; exports.BreadcrumbList = _chunkRDRDPR67cjs.BreadcrumbList; exports.BreadcrumbPage = _chunkRDRDPR67cjs.BreadcrumbPage; exports.Collapse = _chunkSV4L2FGTcjs.Collapse; exports.Drawer = _chunkBHHZBMD4cjs.Drawer; exports.DrawerContent = _chunkBHHZBMD4cjs.DrawerContent; exports.DrawerSidePanel = _chunkBHHZBMD4cjs.DrawerSidePanel; exports.DrawerTrigger = _chunkBHHZBMD4cjs.DrawerTrigger; exports.Dropdown = _chunkLUVR2YGTcjs.Dropdown; exports.DropdownItem = _chunkLUVR2YGTcjs.DropdownItem; exports.DropdownLink = _chunkLUVR2YGTcjs.DropdownLink; exports.FnKey = _chunkTDFVUBGOcjs.FnKey; exports.Input = _chunkMWJV72OMcjs.Input; exports.InputGroup = _chunkMWJV72OMcjs.InputGroup; exports.Kbd = _chunkTDFVUBGOcjs.Kbd; exports.Logo = _chunk6B7U7IWTcjs.Logo; exports.Modal = _chunkHTH2UTCLcjs.Modal; exports.NavMenu = _chunk6B7U7IWTcjs.NavMenu; exports.NavMenuLink = _chunk6B7U7IWTcjs.NavMenuLink; exports.Navbar = _chunk6B7U7IWTcjs.Navbar; exports.PaginationDocs = _chunkK22HSWMWcjs.PaginationDocs; exports.ThemeControllerToggle = _chunk5SA5UPFQcjs.ThemeControllerToggle; exports.Toggle = _chunkOO3HHTPVcjs.Toggle; exports.ToggleGroup = _chunkOO3HHTPVcjs.ToggleGroup; exports.cn = _chunk2DFF5NELcjs.cn; exports.useDrawerState = _chunkBHHZBMD4cjs.useDrawerState; exports.useModal = _chunkHTH2UTCLcjs.useModal;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { cn } from './cn.cjs';
2
2
  export { Input, InputColor, InputGroup, InputGroupProps, InputProps, InputSize } from './input.cjs';
3
- export { FnKey, Kbd, KbdProps, KbdSize } from './kbd.cjs';
3
+ export { FnKey, FnKeyIcons, Kbd, KbdProps, KbdSize } from './kbd.cjs';
4
4
  export { Toggle, ToggleColor, ToggleGroup, ToggleGroupItem, ToggleGroupProps, ToggleProps, ToggleSize } from './toggle.cjs';
5
5
  export { Dropdown, DropdownItem, DropdownItemProps, DropdownLink, DropdownProps } from './dropdown.cjs';
6
6
  export { Modal, ModalProps, useModal } from './modal.cjs';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { cn } from './cn.js';
2
2
  export { Input, InputColor, InputGroup, InputGroupProps, InputProps, InputSize } from './input.js';
3
- export { FnKey, Kbd, KbdProps, KbdSize } from './kbd.js';
3
+ export { FnKey, FnKeyIcons, Kbd, KbdProps, KbdSize } from './kbd.js';
4
4
  export { Toggle, ToggleColor, ToggleGroup, ToggleGroupItem, ToggleGroupProps, ToggleProps, ToggleSize } from './toggle.js';
5
5
  export { Dropdown, DropdownItem, DropdownItemProps, DropdownLink, DropdownProps } from './dropdown.js';
6
6
  export { Modal, ModalProps, useModal } from './modal.js';
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ import {
47
47
  import {
48
48
  FnKey,
49
49
  Kbd
50
- } from "./chunk-7BWAXCW2.js";
50
+ } from "./chunk-QOGH6NKS.js";
51
51
  import {
52
52
  cn
53
53
  } from "./chunk-GRADTONK.js";
package/dist/kbd.cjs CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkK6B7XOJ5cjs = require('./chunk-K6B7XOJ5.cjs');
5
+ var _chunkTDFVUBGOcjs = require('./chunk-TDFVUBGO.cjs');
6
6
  require('./chunk-2DFF5NEL.cjs');
7
7
 
8
8
 
9
9
 
10
- exports.FnKey = _chunkK6B7XOJ5cjs.FnKey; exports.Kbd = _chunkK6B7XOJ5cjs.Kbd;
10
+ exports.FnKey = _chunkTDFVUBGOcjs.FnKey; exports.Kbd = _chunkTDFVUBGOcjs.Kbd;
package/dist/kbd.d.cts CHANGED
@@ -9,7 +9,24 @@ interface KbdProps extends React.HTMLAttributes<HTMLElement> {
9
9
  }
10
10
  declare const Kbd: react.ForwardRefExoticComponent<KbdProps & react.RefAttributes<HTMLElement>>;
11
11
 
12
+ type IconComponent = React.ComponentType<{
13
+ size?: number;
14
+ }>;
15
+ interface FnKeyIcons {
16
+ Command?: IconComponent;
17
+ Option?: IconComponent;
18
+ ArrowBigUp?: IconComponent;
19
+ CircleArrowOutUpLeft?: IconComponent;
20
+ Space?: IconComponent;
21
+ Delete?: IconComponent;
22
+ ArrowRightToLine?: IconComponent;
23
+ ChevronUp?: IconComponent;
24
+ ChevronDown?: IconComponent;
25
+ ChevronLeft?: IconComponent;
26
+ ChevronRight?: IconComponent;
27
+ }
12
28
  declare const FnKey: {
29
+ configure(icons: FnKeyIcons): void;
13
30
  Cmd: () => react_jsx_runtime.JSX.Element;
14
31
  Option: () => react_jsx_runtime.JSX.Element;
15
32
  Ctrl: () => react_jsx_runtime.JSX.Element;
@@ -24,4 +41,4 @@ declare const FnKey: {
24
41
  Right: () => react_jsx_runtime.JSX.Element;
25
42
  };
26
43
 
27
- export { FnKey, Kbd, type KbdProps, type KbdSize };
44
+ export { FnKey, type FnKeyIcons, Kbd, type KbdProps, type KbdSize };
package/dist/kbd.d.ts CHANGED
@@ -9,7 +9,24 @@ interface KbdProps extends React.HTMLAttributes<HTMLElement> {
9
9
  }
10
10
  declare const Kbd: react.ForwardRefExoticComponent<KbdProps & react.RefAttributes<HTMLElement>>;
11
11
 
12
+ type IconComponent = React.ComponentType<{
13
+ size?: number;
14
+ }>;
15
+ interface FnKeyIcons {
16
+ Command?: IconComponent;
17
+ Option?: IconComponent;
18
+ ArrowBigUp?: IconComponent;
19
+ CircleArrowOutUpLeft?: IconComponent;
20
+ Space?: IconComponent;
21
+ Delete?: IconComponent;
22
+ ArrowRightToLine?: IconComponent;
23
+ ChevronUp?: IconComponent;
24
+ ChevronDown?: IconComponent;
25
+ ChevronLeft?: IconComponent;
26
+ ChevronRight?: IconComponent;
27
+ }
12
28
  declare const FnKey: {
29
+ configure(icons: FnKeyIcons): void;
13
30
  Cmd: () => react_jsx_runtime.JSX.Element;
14
31
  Option: () => react_jsx_runtime.JSX.Element;
15
32
  Ctrl: () => react_jsx_runtime.JSX.Element;
@@ -24,4 +41,4 @@ declare const FnKey: {
24
41
  Right: () => react_jsx_runtime.JSX.Element;
25
42
  };
26
43
 
27
- export { FnKey, Kbd, type KbdProps, type KbdSize };
44
+ export { FnKey, type FnKeyIcons, Kbd, type KbdProps, type KbdSize };
package/dist/kbd.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  FnKey,
4
4
  Kbd
5
- } from "./chunk-7BWAXCW2.js";
5
+ } from "./chunk-QOGH6NKS.js";
6
6
  import "./chunk-GRADTONK.js";
7
7
  export {
8
8
  FnKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docubook/ui-react",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "React + DaisyUI component library for documentation sites",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -143,16 +143,6 @@
143
143
  "README.md"
144
144
  ],
145
145
  "sideEffects": false,
146
- "scripts": {
147
- "build": "tsup",
148
- "dev": "tsup --watch",
149
- "typecheck": "tsc --noEmit",
150
- "lint": "eslint src --ext .ts,.tsx",
151
- "test": "vitest run",
152
- "test:watch": "vitest",
153
- "clean": "rm -rf dist",
154
- "prepublishOnly": "pnpm run clean && pnpm run build && pnpm run lint && pnpm run typecheck && pnpm run test"
155
- },
156
146
  "peerDependencies": {
157
147
  "daisyui": ">=5.0.0 <6.0.0",
158
148
  "lucide-react": ">=1.0.0",
@@ -173,12 +163,12 @@
173
163
  "react-dom": "^19.2.0",
174
164
  "tsup": "^8.5.0",
175
165
  "typescript": "^5.9.3",
176
- "vitest": "^4.1.6"
166
+ "vitest": "^4.1.8"
177
167
  },
178
168
  "publishConfig": {
179
169
  "access": "public"
180
170
  },
181
- "homepage": "https://docubook.pro/",
171
+ "homepage": "https://github.com/DocuBook/docubook/tree/main/packages/ui/react",
182
172
  "repository": {
183
173
  "type": "git",
184
174
  "url": "git+https://github.com/DocuBook/docubook.git",
@@ -200,5 +190,14 @@
200
190
  "dependencies": {
201
191
  "clsx": "^2.1.1",
202
192
  "tailwind-merge": "^2.6.1"
193
+ },
194
+ "scripts": {
195
+ "build": "tsup",
196
+ "dev": "tsup --watch",
197
+ "typecheck": "tsc --noEmit",
198
+ "lint": "eslint src --ext .ts,.tsx",
199
+ "test": "vitest run",
200
+ "test:watch": "vitest",
201
+ "clean": "rm -rf dist"
203
202
  }
204
- }
203
+ }
@@ -1,37 +0,0 @@
1
- import {
2
- __objRest,
3
- __spreadProps,
4
- __spreadValues,
5
- cn
6
- } from "./chunk-GRADTONK.js";
7
-
8
- // src/base/kbd.tsx
9
- import { forwardRef } from "react";
10
- import { jsx } from "react/jsx-runtime";
11
- var Kbd = forwardRef(
12
- (_a, ref) => {
13
- var _b = _a, { children, className, size } = _b, props = __objRest(_b, ["children", "className", "size"]);
14
- return /* @__PURE__ */ jsx("kbd", __spreadProps(__spreadValues({ ref, className: cn("kbd", size && `kbd-${size}`, className) }, props), { children }));
15
- }
16
- );
17
- Kbd.displayName = "Kbd";
18
- var iconSize = 12;
19
- var FnKey = {
20
- Cmd: () => /* @__PURE__ */ jsx("span", { style: { fontSize: iconSize }, children: "\u2318" }),
21
- Option: () => /* @__PURE__ */ jsx("span", { style: { fontSize: iconSize }, children: "\u2325" }),
22
- Ctrl: () => /* @__PURE__ */ jsx("span", { style: { fontSize: iconSize }, children: "\u2303" }),
23
- Shift: () => /* @__PURE__ */ jsx("span", { style: { fontSize: iconSize }, children: "\u21E7" }),
24
- Esc: () => /* @__PURE__ */ jsx("span", { style: { fontSize: iconSize }, children: "\u238B" }),
25
- Space: () => /* @__PURE__ */ jsx("span", { style: { fontSize: iconSize }, children: "\u2423" }),
26
- Delete: () => /* @__PURE__ */ jsx("span", { style: { fontSize: iconSize }, children: "\u232B" }),
27
- Tab: () => /* @__PURE__ */ jsx("span", { style: { fontSize: iconSize }, children: "\u21E5" }),
28
- Up: () => /* @__PURE__ */ jsx("span", { style: { fontSize: iconSize }, children: "\u2191" }),
29
- Down: () => /* @__PURE__ */ jsx("span", { style: { fontSize: iconSize }, children: "\u2193" }),
30
- Left: () => /* @__PURE__ */ jsx("span", { style: { fontSize: iconSize }, children: "\u2190" }),
31
- Right: () => /* @__PURE__ */ jsx("span", { style: { fontSize: iconSize }, children: "\u2192" })
32
- };
33
-
34
- export {
35
- Kbd,
36
- FnKey
37
- };
@@ -1,37 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
-
6
- var _chunk2DFF5NELcjs = require('./chunk-2DFF5NEL.cjs');
7
-
8
- // src/base/kbd.tsx
9
- var _react = require('react');
10
- var _jsxruntime = require('react/jsx-runtime');
11
- var Kbd = _react.forwardRef.call(void 0,
12
- (_a, ref) => {
13
- var _b = _a, { children, className, size } = _b, props = _chunk2DFF5NELcjs.__objRest.call(void 0, _b, ["children", "className", "size"]);
14
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "kbd", _chunk2DFF5NELcjs.__spreadProps.call(void 0, _chunk2DFF5NELcjs.__spreadValues.call(void 0, { ref, className: _chunk2DFF5NELcjs.cn.call(void 0, "kbd", size && `kbd-${size}`, className) }, props), { children }));
15
- }
16
- );
17
- Kbd.displayName = "Kbd";
18
- var iconSize = 12;
19
- var FnKey = {
20
- Cmd: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { fontSize: iconSize }, children: "\u2318" }),
21
- Option: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { fontSize: iconSize }, children: "\u2325" }),
22
- Ctrl: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { fontSize: iconSize }, children: "\u2303" }),
23
- Shift: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { fontSize: iconSize }, children: "\u21E7" }),
24
- Esc: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { fontSize: iconSize }, children: "\u238B" }),
25
- Space: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { fontSize: iconSize }, children: "\u2423" }),
26
- Delete: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { fontSize: iconSize }, children: "\u232B" }),
27
- Tab: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { fontSize: iconSize }, children: "\u21E5" }),
28
- Up: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { fontSize: iconSize }, children: "\u2191" }),
29
- Down: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { fontSize: iconSize }, children: "\u2193" }),
30
- Left: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { fontSize: iconSize }, children: "\u2190" }),
31
- Right: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: { fontSize: iconSize }, children: "\u2192" })
32
- };
33
-
34
-
35
-
36
-
37
- exports.Kbd = Kbd; exports.FnKey = FnKey;