@behivetech/icons.key 0.0.0-stage → 0.1.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/README.md +15 -2
- package/dist/index.cjs +43 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +16 -0
- package/docs.json +68 -0
- package/index.ts +1 -0
- package/key.example.tsx +14 -0
- package/key.tsx +13 -0
- package/package.json +60 -3
package/README.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Key icon
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The key icon: a 24 by 24 stroke glyph that takes its colour from the text around it.
|
|
4
|
+
|
|
5
|
+
Docs: https://platform.behivetech.com/behivetech/icons/key
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { KeyIcon } from '@behivetech/icons.key';
|
|
11
|
+
|
|
12
|
+
<KeyIcon />
|
|
13
|
+
<KeyIcon size="lg" titleAccess="Key" />
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The icon is hidden from assistive technology unless it is named: pass `titleAccess` (rendered as the svg's `<title>`) or `aria-label`. It sizes through `size` (`sm`, `md`, `lg`, `xl`) with the stylesheet of `@behivetech/icons.base`, which the app imports once. The default export is the same component.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
KeyIcon: () => KeyIcon,
|
|
24
|
+
default: () => key_default
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
|
|
28
|
+
// key.tsx
|
|
29
|
+
var import_icons = require("@behivetech/icons.base");
|
|
30
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
+
var KeyIcon = /* @__PURE__ */ (0, import_icons.createIcon)(
|
|
32
|
+
"KeyIcon",
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
34
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "7.5", cy: "15.5", r: "5.5" }),
|
|
35
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m21 2-9.6 9.6" }),
|
|
36
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m15.5 7.5 3 3L22 7l-3-3" })
|
|
37
|
+
] })
|
|
38
|
+
);
|
|
39
|
+
var key_default = KeyIcon;
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
KeyIcon
|
|
43
|
+
});
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// key.tsx
|
|
2
|
+
import { createIcon } from "@behivetech/icons.base";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
var KeyIcon = /* @__PURE__ */ createIcon(
|
|
5
|
+
"KeyIcon",
|
|
6
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7
|
+
/* @__PURE__ */ jsx("circle", { cx: "7.5", cy: "15.5", r: "5.5" }),
|
|
8
|
+
/* @__PURE__ */ jsx("path", { d: "m21 2-9.6 9.6" }),
|
|
9
|
+
/* @__PURE__ */ jsx("path", { d: "m15.5 7.5 3 3L22 7l-3-3" })
|
|
10
|
+
] })
|
|
11
|
+
);
|
|
12
|
+
var key_default = KeyIcon;
|
|
13
|
+
export {
|
|
14
|
+
KeyIcon,
|
|
15
|
+
key_default as default
|
|
16
|
+
};
|
package/docs.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://github.com/behivetech/bht-component-registry/docs.schema.json",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"generatedAt": "2026-11-11T04:40:09.329Z",
|
|
5
|
+
"docs": [
|
|
6
|
+
{
|
|
7
|
+
"displayName": "KeyIcon",
|
|
8
|
+
"description": "The key icon: a stroke glyph on a 24 by 24 grid that inherits the text colour.",
|
|
9
|
+
"extendsNative": false,
|
|
10
|
+
"props": [
|
|
11
|
+
{
|
|
12
|
+
"name": "className",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"required": false,
|
|
15
|
+
"defaultValue": null,
|
|
16
|
+
"description": "Additional class names to merge with the component root element"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "ref",
|
|
20
|
+
"type": "Ref<SVGSVGElement>",
|
|
21
|
+
"required": false,
|
|
22
|
+
"defaultValue": null,
|
|
23
|
+
"description": "Ref to the root svg element"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "size",
|
|
27
|
+
"type": "\"sm\" | \"md\" | \"lg\" | \"xl\"",
|
|
28
|
+
"required": false,
|
|
29
|
+
"defaultValue": null,
|
|
30
|
+
"description": "Controls width/height; defaults to md"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "titleAccess",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"required": false,
|
|
36
|
+
"defaultValue": null,
|
|
37
|
+
"description": "Accessible name of the icon, rendered as the svg's `<title>`. When set\nthe icon is exposed as an image with this name; without it (and without\n`aria-label` or `aria-labelledby`) the icon is decorative and hidden from\nassistive technology. Pass an already translated string."
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"functions": [
|
|
43
|
+
{
|
|
44
|
+
"name": "KeyIcon",
|
|
45
|
+
"kind": "function",
|
|
46
|
+
"description": "The key icon: a stroke glyph on a 24 by 24 grid that inherits the text colour.",
|
|
47
|
+
"signatures": [
|
|
48
|
+
{
|
|
49
|
+
"text": "KeyIcon(props: import(\"@behivetech/icons.base\").IconBaseProps): import(\"react\").ReactNode",
|
|
50
|
+
"params": [
|
|
51
|
+
{
|
|
52
|
+
"name": "props",
|
|
53
|
+
"type": "import(\"@behivetech/icons.base\").IconBaseProps",
|
|
54
|
+
"optional": false,
|
|
55
|
+
"defaultValue": null,
|
|
56
|
+
"description": ""
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"returns": {
|
|
60
|
+
"type": "import(\"react\").ReactNode",
|
|
61
|
+
"description": ""
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"examples": []
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
package/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { KeyIcon, default } from "./key.js";
|
package/key.example.tsx
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { KeyIcon } from "./key.js";
|
|
2
|
+
|
|
3
|
+
/** The icon at each size; it takes its colour from the surrounding text. */
|
|
4
|
+
export const KeyIconSizes = () => (
|
|
5
|
+
<>
|
|
6
|
+
<KeyIcon size="sm" />
|
|
7
|
+
<KeyIcon />
|
|
8
|
+
<KeyIcon size="lg" />
|
|
9
|
+
<KeyIcon size="xl" />
|
|
10
|
+
</>
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
/** Named with `titleAccess`, so assistive technology announces it. */
|
|
14
|
+
export const NamedKeyIcon = () => <KeyIcon titleAccess="Key" />;
|
package/key.tsx
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createIcon } from "@behivetech/icons.base";
|
|
2
|
+
|
|
3
|
+
/** The key icon: a stroke glyph on a 24 by 24 grid that inherits the text colour. */
|
|
4
|
+
export const KeyIcon = /*#__PURE__*/ createIcon(
|
|
5
|
+
"KeyIcon",
|
|
6
|
+
<>
|
|
7
|
+
<circle cx="7.5" cy="15.5" r="5.5" />
|
|
8
|
+
<path d="m21 2-9.6 9.6" />
|
|
9
|
+
<path d="m15.5 7.5 3 3L22 7l-3-3" />
|
|
10
|
+
</>,
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export default KeyIcon;
|
package/package.json
CHANGED
|
@@ -1,6 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@behivetech/icons.key",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "The key icon: a 24 by 24 stroke glyph that takes its colour from the text around it.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"private": false,
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md",
|
|
19
|
+
"index.ts",
|
|
20
|
+
"key.tsx",
|
|
21
|
+
"*.example.tsx",
|
|
22
|
+
"docs.json"
|
|
23
|
+
],
|
|
24
|
+
"registry": {
|
|
25
|
+
"status": "stable",
|
|
26
|
+
"tags": [
|
|
27
|
+
"icon"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@behivetech/icons.base": "^0.4.0"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"react": "^19.2.7",
|
|
35
|
+
"react-dom": "^19.2.7"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@bht-component-registry/env": "0.1.0",
|
|
39
|
+
"@types/react": "19.2.17",
|
|
40
|
+
"@types/react-dom": "19.2.3",
|
|
41
|
+
"eslint": "^9.39.5",
|
|
42
|
+
"tsup": "^8.5.1",
|
|
43
|
+
"typescript": "^6.0.3",
|
|
44
|
+
"vitest": "^4.1.10"
|
|
45
|
+
},
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "https://github.com/behivetech/bht-galaxy.git",
|
|
49
|
+
"directory": "registry/behivetech/icons/key"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://platform.behivetech.com/behivetech/icons/key",
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"registry": "https://npm.pkg.github.com",
|
|
54
|
+
"access": "public"
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "tsup && bht-registry-docgen",
|
|
58
|
+
"dev": "tsup --watch",
|
|
59
|
+
"lint": "eslint . --max-warnings 0",
|
|
60
|
+
"check-types": "tsc --noEmit",
|
|
61
|
+
"test": "vitest run"
|
|
62
|
+
}
|
|
6
63
|
}
|