@c2n/kbd 0.0.13 → 0.0.15
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/custom-elements.json +1 -1
- package/package.json +3 -3
- package/react.d.ts +2 -3
- package/types/src/kbd.d.ts +2 -0
- package/types/src/kbd.d.ts.map +1 -1
package/custom-elements.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":"1.0.0","readme":"","modules":[{"kind":"javascript-module","path":"src/kbd.ts","declarations":[{"kind":"class","description":"Displays a keyboard key or shortcut with the semantics of the native `kbd` element. Use one element for a complete\nshortcut (`Ctrl + K`) or place several beside descriptive text. The component is presentational and never enters the\ntab order; when it repeats a shortcut already announced by a surrounding control, set `aria-hidden=\"true\"` on the\nhost.","name":"Kbd","cssProperties":[{"type":{"text":"pixel"},"name":"--c2-kbd--min-width","default":"24px"},{"type":{"text":"pixel"},"name":"--c2-kbd--height","default":"24px"},{"type":{"text":"padding"},"name":"--c2-kbd--padding-left","default":"6px"},{"type":{"text":"padding"},"name":"--c2-kbd--padding-right","default":"6px"},{"type":{"text":"pixel"},"description":"Space between multiple slotted nodes.","name":"--c2-kbd--gap","default":"4px"},{"type":{"text":"color"},"name":"--c2-kbd--background-color","default":"#f4f4f5"},{"type":{"text":"color"},"name":"--c2-kbd--color","default":"#52525b"},{"type":{"text":"border"},"name":"--c2-kbd--border","default":"1px solid #d4d4d8"},{"type":{"text":"border-radius"},"name":"--c2-kbd--border-radius","default":"5px"},{"type":{"text":"box-shadow"},"name":"--c2-kbd--box-shadow","default":"0 1px 0 #a1a1aa"},{"type":{"text":"font-family"},"name":"--c2-kbd--font-family","default":"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"},{"type":{"text":"font-size"},"name":"--c2-kbd--font-size","default":"12px"},{"type":{"text":"font-weight"},"name":"--c2-kbd--font-weight","default":"500"},{"type":{"text":"line-height"},"name":"--c2-kbd--line-height","default":"1"},{"type":{"text":"pixel"},"name":"--c2-kbd--letter-spacing","default":"0.01em"},{"type":{"text":"text-transform"},"name":"--c2-kbd--text-transform","default":"none"}],"cssParts":[{"
|
|
1
|
+
{"schemaVersion":"1.0.0","readme":"","modules":[{"kind":"javascript-module","path":"src/kbd.ts","declarations":[{"kind":"class","description":"Displays a keyboard key or shortcut with the semantics of the native `kbd` element. Use one element for a complete\nshortcut (`Ctrl + K`) or place several beside descriptive text. The component is presentational and never enters the\ntab order; when it repeats a shortcut already announced by a surrounding control, set `aria-hidden=\"true\"` on the\nhost.","name":"Kbd","cssProperties":[{"type":{"text":"pixel"},"name":"--c2-kbd--min-width","default":"24px"},{"type":{"text":"pixel"},"name":"--c2-kbd--height","default":"24px"},{"type":{"text":"padding"},"name":"--c2-kbd--padding-left","default":"6px"},{"type":{"text":"padding"},"name":"--c2-kbd--padding-right","default":"6px"},{"type":{"text":"pixel"},"description":"Space between multiple slotted nodes.","name":"--c2-kbd--gap","default":"4px"},{"type":{"text":"color"},"name":"--c2-kbd--background-color","default":"#f4f4f5"},{"type":{"text":"color"},"name":"--c2-kbd--color","default":"#52525b"},{"type":{"text":"border"},"name":"--c2-kbd--border","default":"1px solid #d4d4d8"},{"type":{"text":"border-radius"},"name":"--c2-kbd--border-radius","default":"5px"},{"type":{"text":"box-shadow"},"name":"--c2-kbd--box-shadow","default":"0 1px 0 #a1a1aa"},{"type":{"text":"font-family"},"name":"--c2-kbd--font-family","default":"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"},{"type":{"text":"font-size"},"name":"--c2-kbd--font-size","default":"12px"},{"type":{"text":"font-weight"},"name":"--c2-kbd--font-weight","default":"500"},{"type":{"text":"line-height"},"name":"--c2-kbd--line-height","default":"1"},{"type":{"text":"pixel"},"name":"--c2-kbd--letter-spacing","default":"0.01em"},{"type":{"text":"text-transform"},"name":"--c2-kbd--text-transform","default":"none"}],"cssParts":[{"description":"The native `<kbd>` element containing the key or shortcut.","name":"kbd"}],"slots":[{"description":"Key name or shortcut to display.","name":""}],"members":[],"superclass":{"name":"LitElement","package":"lit"},"tagName":"c2-kbd","customElement":true}],"exports":[{"kind":"js","name":"Kbd","declaration":{"name":"Kbd","module":"src/kbd.ts"}},{"kind":"custom-element-definition","name":"c2-kbd","declaration":{"name":"Kbd","module":"src/kbd.ts"}}]}]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c2n/kbd",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/kbd.js",
|
|
6
6
|
"exports": {
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@c2n/core": "0.0.
|
|
66
|
+
"@c2n/core": "0.0.15",
|
|
67
67
|
"lit": "3.3.3"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@c2n/config": "*"
|
|
71
71
|
},
|
|
72
72
|
"customElements": "custom-elements.json",
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "129a6e537c68c04ed2a36508789bf42c9781e196"
|
|
74
74
|
}
|
package/react.d.ts
CHANGED
|
@@ -9,15 +9,14 @@
|
|
|
9
9
|
//
|
|
10
10
|
// On a server-rendered page (Next.js, React Router SSR) write a camelCase property by its kebab-case attribute
|
|
11
11
|
// name ('row-key', not rowKey): the server emits props verbatim, HTML lowercases them, and hydration does not
|
|
12
|
-
// set properties. Those names are listed next to the properties below.
|
|
12
|
+
// set properties. Those names are listed next to the properties below. Structured converter-backed values
|
|
13
|
+
// also accept their serialized string form, so server JSX can emit the same JSON/CSV attribute used by HTML.
|
|
13
14
|
|
|
14
15
|
import type { DetailedHTMLProps, HTMLAttributes } from 'react'
|
|
15
16
|
import type { Kbd } from '@c2n/kbd'
|
|
16
17
|
|
|
17
18
|
/** Standard React host-element attributes plus the element's own public properties. */
|
|
18
19
|
type C2Props<T> = DetailedHTMLProps<HTMLAttributes<T>, T> & Partial<Omit<T, keyof HTMLElement>>
|
|
19
|
-
/** What React writes to a custom element's attribute: true becomes the empty string, false removes it. */
|
|
20
|
-
type Attribute = string | number | boolean
|
|
21
20
|
|
|
22
21
|
declare module 'react' {
|
|
23
22
|
namespace JSX {
|
package/types/src/kbd.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ import { LitElement } from 'lit';
|
|
|
9
9
|
*
|
|
10
10
|
* @slot - Key name or shortcut to display.
|
|
11
11
|
*
|
|
12
|
+
* @csspart kbd - The native `<kbd>` element containing the key or shortcut.
|
|
13
|
+
*
|
|
12
14
|
* @cssproperty {pixel} [--c2-kbd--min-width=24px]
|
|
13
15
|
* @cssproperty {pixel} [--c2-kbd--height=24px]
|
|
14
16
|
* @cssproperty {padding} [--c2-kbd--padding-left=6px]
|
package/types/src/kbd.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kbd.d.ts","sourceRoot":"","sources":["../../src/kbd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAA;AAIjD
|
|
1
|
+
{"version":3,"file":"kbd.d.ts","sourceRoot":"","sources":["../../src/kbd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAA;AAIjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBACa,GAAI,SAAQ,UAAU;IACjC,OAAgB,MAAM,0BAAoB;IAEjC,MAAM;CAGhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,QAAQ,EAAE,GAAG,CAAA;KACd;CACF"}
|