@vacano/ui 1.15.6 → 1.15.7
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 +1 -1
- package/dist/{ToggleGroup-C3ReF8j7.cjs → ToggleGroup-DXq3FgdQ.cjs} +67 -63
- package/dist/ToggleGroup-DXq3FgdQ.cjs.map +1 -0
- package/dist/{ToggleGroup-TWO3UOqH.js → ToggleGroup-Do3q0qhi.js} +837 -833
- package/dist/ToggleGroup-Do3q0qhi.js.map +1 -0
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{index-GSZAZ6Cz.cjs → index-BUoqL3Q7.cjs} +2 -2
- package/dist/{index-GSZAZ6Cz.cjs.map → index-BUoqL3Q7.cjs.map} +1 -1
- package/dist/{index-Abn5L42P.js → index-B_4jp70c.js} +2 -2
- package/dist/{index-Abn5L42P.js.map → index-B_4jp70c.js.map} +1 -1
- package/dist/index.cjs +99 -97
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +934 -931
- package/dist/index.js.map +1 -1
- package/dist/{keyboard-D8zOi0jU.cjs → keyboard-Cexig8lu.cjs} +3 -3
- package/dist/keyboard-Cexig8lu.cjs.map +1 -0
- package/dist/{keyboard-D00e_brg.js → keyboard-D5qN_1XD.js} +24 -16
- package/dist/keyboard-D5qN_1XD.js.map +1 -0
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.ts +9 -0
- package/dist/lib.js +14 -13
- package/package.json +1 -1
- package/dist/ToggleGroup-C3ReF8j7.cjs.map +0 -1
- package/dist/ToggleGroup-TWO3UOqH.js.map +0 -1
- package/dist/keyboard-D00e_brg.js.map +0 -1
- package/dist/keyboard-D8zOi0jU.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const f=require("react"),e=require("@emotion/react"),u=t=>t.length===1&&/[a-z]/i.test(t)?t.toUpperCase():t,g=(t,
|
|
1
|
+
"use strict";const f=require("react"),e=require("@emotion/react"),u=t=>t.length===1&&/[a-z]/i.test(t)?t.toUpperCase():t,g=(t,o)=>{const r=f.useRef(new Set),a=f.useRef(o);a.current=o,f.useEffect(()=>{const i=new Set(t),w=()=>{if(i.size!==r.current.size)return!1;for(const n of i)if(!r.current.has(n))return!1;return!0},m=n=>{const s=u(n.key);r.current.add(s),w()&&a.current&&(n.preventDefault(),a.current())},c=n=>{const s=u(n.key);r.current.delete(s)},l=()=>{r.current.clear()};return window.addEventListener("keydown",m),window.addEventListener("keyup",c),window.addEventListener("blur",l),()=>{window.removeEventListener("keydown",m),window.removeEventListener("keyup",c),window.removeEventListener("blur",l)}},[t])},d=t=>{const o=Math.max(0,Math.min(100,t));return Math.round(o/100*255).toString(16).padStart(2,"0")},y=t=>/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(t),k=(t,o)=>{if(!y(t))return"#000000FF";const r=t.replace("#","").slice(0,6),a=d(o);return`#${r}${a}`},p=()=>{if(typeof navigator>"u")return"unknown";const t=navigator.userAgent.toLowerCase();return/iphone|ipad|ipod/.test(t)?"ios":/android/.test(t)?"android":/mac/.test(t)?"macos":/win/.test(t)?"windows":/linux/.test(t)?"linux":"unknown"},E=()=>{if(typeof navigator>"u")return"unknown";const t=navigator.userAgent.toLowerCase();return/edg/.test(t)?"edge":/opr|opera/.test(t)?"opera":/chrome/.test(t)?"chrome":/safari/.test(t)?"safari":/firefox/.test(t)?"firefox":"unknown"},Y={sm:640,md:768,lg:1024,xl:1280,"2xl":1536},S={black:"#212529",white:"#ffffff",red:"#C1121F",green:"#16a34a",yellow:"#ffb703",gray:"#e5e7eb","steel-blue":"#0582ca","iron-grey":"#495057","baltic-blue":"#1e6091"},O={dropdown:100,modalOverlay:1e3,modal:1001,portalDropdown:1002,confirmation:1003,confirmationBar:1004},v={rotate:e.keyframes`
|
|
2
2
|
to {
|
|
3
3
|
transform: rotate(1turn);
|
|
4
4
|
}
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
`,slideOutBottomFade:e.keyframes`
|
|
48
48
|
from { opacity: 1; transform: translateY(0); }
|
|
49
49
|
to { opacity: 0; transform: translateY(100%); }
|
|
50
|
-
`},h={Meta:{mac:"⌘",other:"Win"},Control:{mac:"⌃",other:"Ctrl"},Alt:{mac:"⌥",other:"Alt"},Shift:{mac:"⇧",other:"⇧"},ArrowUp:{mac:"↑",other:"↑"},ArrowDown:{mac:"↓",other:"↓"},ArrowLeft:{mac:"←",other:"←"},ArrowRight:{mac:"→",other:"→"},Home:{mac:"↖",other:"↖"},End:{mac:"↘",other:"↘"},PageUp:{mac:"⇞",other:"⇞"},PageDown:{mac:"⇟",other:"⇟"}," ":{mac:"␣",other:"␣"},Enter:{mac:"Enter",other:"Enter"},Tab:{mac:"⇥",other:"⇥"},Backspace:{mac:"⌫",other:"⌫"},Delete:{mac:"⌦",other:"⌦"},Escape:{mac:"Esc",other:"Esc"},Insert:{mac:"Ins",other:"Ins"},CapsLock:{mac:"⇪",other:"⇪"},NumLock:{mac:"⇭",other:"⇭"}},
|
|
51
|
-
//# sourceMappingURL=keyboard-
|
|
50
|
+
`},h={Meta:{mac:"⌘",other:"Win"},Control:{mac:"⌃",other:"Ctrl"},Alt:{mac:"⌥",other:"Alt"},Shift:{mac:"⇧",other:"⇧"},ArrowUp:{mac:"↑",other:"↑"},ArrowDown:{mac:"↓",other:"↓"},ArrowLeft:{mac:"←",other:"←"},ArrowRight:{mac:"→",other:"→"},Home:{mac:"↖",other:"↖"},End:{mac:"↘",other:"↘"},PageUp:{mac:"⇞",other:"⇞"},PageDown:{mac:"⇟",other:"⇟"}," ":{mac:"␣",other:"␣"},Enter:{mac:"Enter",other:"Enter"},Tab:{mac:"⇥",other:"⇥"},Backspace:{mac:"⌫",other:"⌫"},Delete:{mac:"⌦",other:"⌦"},Escape:{mac:"Esc",other:"Esc"},Insert:{mac:"Ins",other:"Ins"},CapsLock:{mac:"⇪",other:"⇪"},NumLock:{mac:"⇭",other:"⇭"}},L=t=>{if(!t)return[];const o=p();return t.map(r=>{const a=h[r];return a?o==="macos"?a.mac:a.other:r})};exports.BREAKPOINTS=Y;exports.COLORS=S;exports.KEYFRAMES=v;exports.KEY_SYMBOLS=h;exports.Z_INDEX=O;exports.alpha=k;exports.getBrowser=E;exports.getKeySymbols=L;exports.getOperatingSystem=p;exports.isValid=y;exports.toHEX=d;exports.useKeyBinding=g;
|
|
51
|
+
//# sourceMappingURL=keyboard-Cexig8lu.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard-Cexig8lu.cjs","sources":["../src/lib/hooks/useKeyBinding.ts","../src/lib/utils/colors.ts","../src/lib/utils/platform.ts","../src/lib/constants.ts","../src/lib/utils/keyboard.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\nimport { KeyboardEventKey } from '../types'\n\nconst normalizeKey = (key: string): string => {\n if (key.length === 1 && /[a-z]/i.test(key)) {\n return key.toUpperCase()\n }\n return key\n}\n\nexport const useKeyBinding = (keys: KeyboardEventKey[], cb?: () => void) => {\n const pressedKeys = useRef<Set<string>>(new Set())\n const cbRef = useRef(cb)\n\n cbRef.current = cb\n\n useEffect(() => {\n const keysSet = new Set(keys)\n\n const checkMatch = () => {\n if (keysSet.size !== pressedKeys.current.size) {\n return false\n }\n\n for (const key of keysSet) {\n if (!pressedKeys.current.has(key)) {\n return false\n }\n }\n\n return true\n }\n\n const handleKeyDown = (e: KeyboardEvent) => {\n const key = normalizeKey(e.key)\n pressedKeys.current.add(key)\n\n if (checkMatch() && cbRef.current) {\n e.preventDefault()\n cbRef.current()\n }\n }\n\n const handleKeyUp = (e: KeyboardEvent) => {\n const key = normalizeKey(e.key)\n pressedKeys.current.delete(key)\n }\n\n const handleBlur = () => {\n pressedKeys.current.clear()\n }\n\n window.addEventListener('keydown', handleKeyDown)\n window.addEventListener('keyup', handleKeyUp)\n window.addEventListener('blur', handleBlur)\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown)\n window.removeEventListener('keyup', handleKeyUp)\n window.removeEventListener('blur', handleBlur)\n }\n }, [keys])\n}\n","export const toHEX = (n: number): string => {\n const clamped = Math.max(0, Math.min(100, n))\n const value = Math.round((clamped / 100) * 255)\n\n return value.toString(16).padStart(2, '0')\n}\n\nexport const isValid = (hexColor: string): boolean => {\n return /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(hexColor)\n}\n\nexport const alpha = (hexColor: string, percentage: number): string => {\n if (!isValid(hexColor)) {\n return '#000000FF'\n }\n\n const hex = hexColor.replace('#', '').slice(0, 6)\n const alphaHex = toHEX(percentage)\n\n return `#${hex}${alphaHex}`\n}\n","import { Browser, OperatingSystem } from '../types'\n\nexport const getOperatingSystem = (): OperatingSystem => {\n if (typeof navigator === 'undefined') {\n return 'unknown'\n }\n\n const ua = navigator.userAgent.toLowerCase()\n\n if (/iphone|ipad|ipod/.test(ua)) return 'ios'\n if (/android/.test(ua)) return 'android'\n if (/mac/.test(ua)) return 'macos'\n if (/win/.test(ua)) return 'windows'\n if (/linux/.test(ua)) return 'linux'\n\n return 'unknown'\n}\n\nexport const getBrowser = (): Browser => {\n if (typeof navigator === 'undefined') {\n return 'unknown'\n }\n\n const ua = navigator.userAgent.toLowerCase()\n\n if (/edg/.test(ua)) return 'edge'\n if (/opr|opera/.test(ua)) return 'opera'\n if (/chrome/.test(ua)) return 'chrome'\n if (/safari/.test(ua)) return 'safari'\n if (/firefox/.test(ua)) return 'firefox'\n\n return 'unknown'\n}\n","import { keyframes } from '@emotion/react'\n\nimport { KeyboardEventKey } from './types'\n\nexport const BREAKPOINTS = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n} as const\n\nexport const COLORS = {\n black: '#212529',\n white: '#ffffff',\n red: '#C1121F',\n green: '#16a34a',\n yellow: '#ffb703',\n gray: '#e5e7eb',\n 'steel-blue': '#0582ca',\n 'iron-grey': '#495057',\n 'baltic-blue': '#1e6091',\n} as const\n\nexport const Z_INDEX = {\n dropdown: 100,\n modalOverlay: 1000,\n modal: 1001,\n portalDropdown: 1002,\n confirmation: 1003,\n confirmationBar: 1004,\n} as const\n\nexport const KEYFRAMES = {\n rotate: keyframes`\n to {\n transform: rotate(1turn);\n }\n `,\n fadeIn: keyframes`\n from { opacity: 0; }\n to { opacity: 1; }\n `,\n fadeOut: keyframes`\n from { opacity: 1; }\n to { opacity: 0; }\n `,\n slideInLeft: keyframes`\n from { transform: translateX(-100%); }\n to { transform: translateX(0); }\n `,\n slideOutLeft: keyframes`\n from { transform: translateX(0); }\n to { transform: translateX(-100%); }\n `,\n slideInRight: keyframes`\n from { transform: translateX(100%); }\n to { transform: translateX(0); }\n `,\n slideOutRight: keyframes`\n from { transform: translateX(0); }\n to { transform: translateX(100%); }\n `,\n slideInTop: keyframes`\n from { transform: translateY(-100%); }\n to { transform: translateY(0); }\n `,\n slideOutTop: keyframes`\n from { transform: translateY(0); }\n to { transform: translateY(-100%); }\n `,\n slideInBottom: keyframes`\n from { transform: translateY(100%); }\n to { transform: translateY(0); }\n `,\n slideOutBottom: keyframes`\n from { transform: translateY(0); }\n to { transform: translateY(100%); }\n `,\n scaleIn: keyframes`\n from { opacity: 0; transform: scale(0.95); }\n to { opacity: 1; transform: scale(1); }\n `,\n slideInTopFade: keyframes`\n from { opacity: 0; transform: translateY(-100%); }\n to { opacity: 1; transform: translateY(0); }\n `,\n slideOutTopFade: keyframes`\n from { opacity: 1; transform: translateY(0); }\n to { opacity: 0; transform: translateY(-100%); }\n `,\n slideInBottomFade: keyframes`\n from { opacity: 0; transform: translateY(100%); }\n to { opacity: 1; transform: translateY(0); }\n `,\n slideOutBottomFade: keyframes`\n from { opacity: 1; transform: translateY(0); }\n to { opacity: 0; transform: translateY(100%); }\n `,\n}\n\nexport const KEY_SYMBOLS: Partial<Record<KeyboardEventKey, { mac: string; other: string }>> = {\n // Modifiers\n Meta: { mac: '⌘', other: 'Win' },\n Control: { mac: '⌃', other: 'Ctrl' },\n Alt: { mac: '⌥', other: 'Alt' },\n Shift: { mac: '⇧', other: '⇧' },\n\n // Navigation\n ArrowUp: { mac: '↑', other: '↑' },\n ArrowDown: { mac: '↓', other: '↓' },\n ArrowLeft: { mac: '←', other: '←' },\n ArrowRight: { mac: '→', other: '→' },\n Home: { mac: '↖', other: '↖' },\n End: { mac: '↘', other: '↘' },\n PageUp: { mac: '⇞', other: '⇞' },\n PageDown: { mac: '⇟', other: '⇟' },\n\n // Whitespace & Enter\n ' ': { mac: '␣', other: '␣' },\n Enter: { mac: 'Enter', other: 'Enter' },\n Tab: { mac: '⇥', other: '⇥' },\n\n // Editing\n Backspace: { mac: '⌫', other: '⌫' },\n Delete: { mac: '⌦', other: '⌦' },\n Escape: { mac: 'Esc', other: 'Esc' },\n Insert: { mac: 'Ins', other: 'Ins' },\n\n // System\n CapsLock: { mac: '⇪', other: '⇪' },\n NumLock: { mac: '⇭', other: '⇭' },\n}\n","import { getOperatingSystem } from './platform'\nimport { KEY_SYMBOLS } from '../constants'\nimport { KeyboardEventKey } from '../types'\n\nexport const getKeySymbols = (keys?: KeyboardEventKey[]): string[] => {\n if (!keys) {\n return []\n }\n\n const os = getOperatingSystem()\n\n return keys.map((key) => {\n const symbol = KEY_SYMBOLS[key]\n\n if (!symbol) {\n return key\n }\n\n return os === 'macos' ? symbol.mac : symbol.other\n })\n}\n"],"names":["normalizeKey","key","useKeyBinding","keys","cb","pressedKeys","useRef","cbRef","useEffect","keysSet","checkMatch","handleKeyDown","e","handleKeyUp","handleBlur","toHEX","n","clamped","isValid","hexColor","alpha","percentage","hex","alphaHex","getOperatingSystem","ua","getBrowser","BREAKPOINTS","COLORS","Z_INDEX","KEYFRAMES","keyframes","KEY_SYMBOLS","getKeySymbols","os","symbol"],"mappings":"kEAIMA,EAAgBC,GAChBA,EAAI,SAAW,GAAK,SAAS,KAAKA,CAAG,EAChCA,EAAI,YAAA,EAENA,EAGIC,EAAgB,CAACC,E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OAAQ,CAAE,IAAK,MAAO,MAAO,KAAA,EAC7B,OAAQ,CAAE,IAAK,MAAO,MAAO,KAAA,EAG7B,SAAU,CAAE,IAAK,IAAK,MAAO,GAAA,EAC7B,QAAS,CAAE,IAAK,IAAK,MAAO,GAAA,CAC9B,EChIaC,EAAiB9B,GAAwC,CACpE,GAAI,CAACA,EACH,MAAO,CAAA,EAGT,MAAM+B,EAAKV,EAAA,EAEX,OAAOrB,EAAK,IAAKF,GAAQ,CACvB,MAAMkC,EAASH,EAAY/B,CAAG,EAE9B,OAAKkC,EAIED,IAAO,QAAUC,EAAO,IAAMA,EAAO,MAHnClC,CAIX,CAAC,CACH"}
|
|
@@ -3,24 +3,24 @@ import { keyframes as r } from "@emotion/react";
|
|
|
3
3
|
const u = (t) => t.length === 1 && /[a-z]/i.test(t) ? t.toUpperCase() : t, v = (t, o) => {
|
|
4
4
|
const e = l(/* @__PURE__ */ new Set()), a = l(o);
|
|
5
5
|
a.current = o, p(() => {
|
|
6
|
-
const
|
|
7
|
-
if (
|
|
6
|
+
const i = new Set(t), d = () => {
|
|
7
|
+
if (i.size !== e.current.size)
|
|
8
8
|
return !1;
|
|
9
|
-
for (const n of
|
|
9
|
+
for (const n of i)
|
|
10
10
|
if (!e.current.has(n))
|
|
11
11
|
return !1;
|
|
12
12
|
return !0;
|
|
13
|
-
},
|
|
13
|
+
}, c = (n) => {
|
|
14
14
|
const s = u(n.key);
|
|
15
15
|
e.current.add(s), d() && a.current && (n.preventDefault(), a.current());
|
|
16
|
-
},
|
|
16
|
+
}, f = (n) => {
|
|
17
17
|
const s = u(n.key);
|
|
18
18
|
e.current.delete(s);
|
|
19
19
|
}, m = () => {
|
|
20
20
|
e.current.clear();
|
|
21
21
|
};
|
|
22
|
-
return window.addEventListener("keydown",
|
|
23
|
-
window.removeEventListener("keydown",
|
|
22
|
+
return window.addEventListener("keydown", c), window.addEventListener("keyup", f), window.addEventListener("blur", m), () => {
|
|
23
|
+
window.removeEventListener("keydown", c), window.removeEventListener("keyup", f), window.removeEventListener("blur", m);
|
|
24
24
|
};
|
|
25
25
|
}, [t]);
|
|
26
26
|
}, h = (t) => {
|
|
@@ -41,13 +41,13 @@ const u = (t) => t.length === 1 && /[a-z]/i.test(t) ? t.toUpperCase() : t, v = (
|
|
|
41
41
|
return "unknown";
|
|
42
42
|
const t = navigator.userAgent.toLowerCase();
|
|
43
43
|
return /edg/.test(t) ? "edge" : /opr|opera/.test(t) ? "opera" : /chrome/.test(t) ? "chrome" : /safari/.test(t) ? "safari" : /firefox/.test(t) ? "firefox" : "unknown";
|
|
44
|
-
},
|
|
44
|
+
}, I = {
|
|
45
45
|
sm: 640,
|
|
46
46
|
md: 768,
|
|
47
47
|
lg: 1024,
|
|
48
48
|
xl: 1280,
|
|
49
49
|
"2xl": 1536
|
|
50
|
-
},
|
|
50
|
+
}, O = {
|
|
51
51
|
black: "#212529",
|
|
52
52
|
white: "#ffffff",
|
|
53
53
|
red: "#C1121F",
|
|
@@ -57,7 +57,14 @@ const u = (t) => t.length === 1 && /[a-z]/i.test(t) ? t.toUpperCase() : t, v = (
|
|
|
57
57
|
"steel-blue": "#0582ca",
|
|
58
58
|
"iron-grey": "#495057",
|
|
59
59
|
"baltic-blue": "#1e6091"
|
|
60
|
-
},
|
|
60
|
+
}, S = {
|
|
61
|
+
dropdown: 100,
|
|
62
|
+
modalOverlay: 1e3,
|
|
63
|
+
modal: 1001,
|
|
64
|
+
portalDropdown: 1002,
|
|
65
|
+
confirmation: 1003,
|
|
66
|
+
confirmationBar: 1004
|
|
67
|
+
}, b = {
|
|
61
68
|
rotate: r`
|
|
62
69
|
to {
|
|
63
70
|
transform: rotate(1turn);
|
|
@@ -150,7 +157,7 @@ const u = (t) => t.length === 1 && /[a-z]/i.test(t) ? t.toUpperCase() : t, v = (
|
|
|
150
157
|
// System
|
|
151
158
|
CapsLock: { mac: "⇪", other: "⇪" },
|
|
152
159
|
NumLock: { mac: "⇭", other: "⇭" }
|
|
153
|
-
},
|
|
160
|
+
}, B = (t) => {
|
|
154
161
|
if (!t)
|
|
155
162
|
return [];
|
|
156
163
|
const o = y();
|
|
@@ -160,16 +167,17 @@ const u = (t) => t.length === 1 && /[a-z]/i.test(t) ? t.toUpperCase() : t, v = (
|
|
|
160
167
|
});
|
|
161
168
|
};
|
|
162
169
|
export {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
170
|
+
I as B,
|
|
171
|
+
O as C,
|
|
172
|
+
b as K,
|
|
173
|
+
S as Z,
|
|
166
174
|
L as a,
|
|
167
175
|
y as b,
|
|
168
176
|
k as c,
|
|
169
177
|
g as d,
|
|
170
|
-
|
|
178
|
+
B as g,
|
|
171
179
|
w as i,
|
|
172
180
|
h as t,
|
|
173
181
|
v as u
|
|
174
182
|
};
|
|
175
|
-
//# sourceMappingURL=keyboard-
|
|
183
|
+
//# sourceMappingURL=keyboard-D5qN_1XD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard-D5qN_1XD.js","sources":["../src/lib/hooks/useKeyBinding.ts","../src/lib/utils/colors.ts","../src/lib/utils/platform.ts","../src/lib/constants.ts","../src/lib/utils/keyboard.ts"],"sourcesContent":["import { useEffect, useRef } from 'react'\n\nimport { KeyboardEventKey } from '../types'\n\nconst normalizeKey = (key: string): string => {\n if (key.length === 1 && /[a-z]/i.test(key)) {\n return key.toUpperCase()\n }\n return key\n}\n\nexport const useKeyBinding = (keys: KeyboardEventKey[], cb?: () => void) => {\n const pressedKeys = useRef<Set<string>>(new Set())\n const cbRef = useRef(cb)\n\n cbRef.current = cb\n\n useEffect(() => {\n const keysSet = new Set(keys)\n\n const checkMatch = () => {\n if (keysSet.size !== pressedKeys.current.size) {\n return false\n }\n\n for (const key of keysSet) {\n if (!pressedKeys.current.has(key)) {\n return false\n }\n }\n\n return true\n }\n\n const handleKeyDown = (e: KeyboardEvent) => {\n const key = normalizeKey(e.key)\n pressedKeys.current.add(key)\n\n if (checkMatch() && cbRef.current) {\n e.preventDefault()\n cbRef.current()\n }\n }\n\n const handleKeyUp = (e: KeyboardEvent) => {\n const key = normalizeKey(e.key)\n pressedKeys.current.delete(key)\n }\n\n const handleBlur = () => {\n pressedKeys.current.clear()\n }\n\n window.addEventListener('keydown', handleKeyDown)\n window.addEventListener('keyup', handleKeyUp)\n window.addEventListener('blur', handleBlur)\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown)\n window.removeEventListener('keyup', handleKeyUp)\n window.removeEventListener('blur', handleBlur)\n }\n }, [keys])\n}\n","export const toHEX = (n: number): string => {\n const clamped = Math.max(0, Math.min(100, n))\n const value = Math.round((clamped / 100) * 255)\n\n return value.toString(16).padStart(2, '0')\n}\n\nexport const isValid = (hexColor: string): boolean => {\n return /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(hexColor)\n}\n\nexport const alpha = (hexColor: string, percentage: number): string => {\n if (!isValid(hexColor)) {\n return '#000000FF'\n }\n\n const hex = hexColor.replace('#', '').slice(0, 6)\n const alphaHex = toHEX(percentage)\n\n return `#${hex}${alphaHex}`\n}\n","import { Browser, OperatingSystem } from '../types'\n\nexport const getOperatingSystem = (): OperatingSystem => {\n if (typeof navigator === 'undefined') {\n return 'unknown'\n }\n\n const ua = navigator.userAgent.toLowerCase()\n\n if (/iphone|ipad|ipod/.test(ua)) return 'ios'\n if (/android/.test(ua)) return 'android'\n if (/mac/.test(ua)) return 'macos'\n if (/win/.test(ua)) return 'windows'\n if (/linux/.test(ua)) return 'linux'\n\n return 'unknown'\n}\n\nexport const getBrowser = (): Browser => {\n if (typeof navigator === 'undefined') {\n return 'unknown'\n }\n\n const ua = navigator.userAgent.toLowerCase()\n\n if (/edg/.test(ua)) return 'edge'\n if (/opr|opera/.test(ua)) return 'opera'\n if (/chrome/.test(ua)) return 'chrome'\n if (/safari/.test(ua)) return 'safari'\n if (/firefox/.test(ua)) return 'firefox'\n\n return 'unknown'\n}\n","import { keyframes } from '@emotion/react'\n\nimport { KeyboardEventKey } from './types'\n\nexport const BREAKPOINTS = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n} as const\n\nexport const COLORS = {\n black: '#212529',\n white: '#ffffff',\n red: '#C1121F',\n green: '#16a34a',\n yellow: '#ffb703',\n gray: '#e5e7eb',\n 'steel-blue': '#0582ca',\n 'iron-grey': '#495057',\n 'baltic-blue': '#1e6091',\n} as const\n\nexport const Z_INDEX = {\n dropdown: 100,\n modalOverlay: 1000,\n modal: 1001,\n portalDropdown: 1002,\n confirmation: 1003,\n confirmationBar: 1004,\n} as const\n\nexport const KEYFRAMES = {\n rotate: keyframes`\n to {\n transform: rotate(1turn);\n }\n `,\n fadeIn: keyframes`\n from { opacity: 0; }\n to { opacity: 1; }\n `,\n fadeOut: keyframes`\n from { opacity: 1; }\n to { opacity: 0; }\n `,\n slideInLeft: keyframes`\n from { transform: translateX(-100%); }\n to { transform: translateX(0); }\n `,\n slideOutLeft: keyframes`\n from { transform: translateX(0); }\n to { transform: translateX(-100%); }\n `,\n slideInRight: keyframes`\n from { transform: translateX(100%); }\n to { transform: translateX(0); }\n `,\n slideOutRight: keyframes`\n from { transform: translateX(0); }\n to { transform: translateX(100%); }\n `,\n slideInTop: keyframes`\n from { transform: translateY(-100%); }\n to { transform: translateY(0); }\n `,\n slideOutTop: keyframes`\n from { transform: translateY(0); }\n to { transform: translateY(-100%); }\n `,\n slideInBottom: keyframes`\n from { transform: translateY(100%); }\n to { transform: translateY(0); }\n `,\n slideOutBottom: keyframes`\n from { transform: translateY(0); }\n to { transform: translateY(100%); }\n `,\n scaleIn: keyframes`\n from { opacity: 0; transform: scale(0.95); }\n to { opacity: 1; transform: scale(1); }\n `,\n slideInTopFade: keyframes`\n from { opacity: 0; transform: translateY(-100%); }\n to { opacity: 1; transform: translateY(0); }\n `,\n slideOutTopFade: keyframes`\n from { opacity: 1; transform: translateY(0); }\n to { opacity: 0; transform: translateY(-100%); }\n `,\n slideInBottomFade: keyframes`\n from { opacity: 0; transform: translateY(100%); }\n to { opacity: 1; transform: translateY(0); }\n `,\n slideOutBottomFade: keyframes`\n from { opacity: 1; transform: translateY(0); }\n to { opacity: 0; transform: translateY(100%); }\n `,\n}\n\nexport const KEY_SYMBOLS: Partial<Record<KeyboardEventKey, { mac: string; other: string }>> = {\n // Modifiers\n Meta: { mac: '⌘', other: 'Win' },\n Control: { mac: '⌃', other: 'Ctrl' },\n Alt: { mac: '⌥', other: 'Alt' },\n Shift: { mac: '⇧', other: '⇧' },\n\n // Navigation\n ArrowUp: { mac: '↑', other: '↑' },\n ArrowDown: { mac: '↓', other: '↓' },\n ArrowLeft: { mac: '←', other: '←' },\n ArrowRight: { mac: '→', other: '→' },\n Home: { mac: '↖', other: '↖' },\n End: { mac: '↘', other: '↘' },\n PageUp: { mac: '⇞', other: '⇞' },\n PageDown: { mac: '⇟', other: '⇟' },\n\n // Whitespace & Enter\n ' ': { mac: '␣', other: '␣' },\n Enter: { mac: 'Enter', other: 'Enter' },\n Tab: { mac: '⇥', other: '⇥' },\n\n // Editing\n Backspace: { mac: '⌫', other: '⌫' },\n Delete: { mac: '⌦', other: '⌦' },\n Escape: { mac: 'Esc', other: 'Esc' },\n Insert: { mac: 'Ins', other: 'Ins' },\n\n // System\n CapsLock: { mac: '⇪', other: '⇪' },\n NumLock: { mac: '⇭', other: '⇭' },\n}\n","import { getOperatingSystem } from './platform'\nimport { KEY_SYMBOLS } from '../constants'\nimport { KeyboardEventKey } from '../types'\n\nexport const getKeySymbols = (keys?: KeyboardEventKey[]): string[] => {\n if (!keys) {\n return []\n }\n\n const os = getOperatingSystem()\n\n return keys.map((key) => {\n const symbol = KEY_SYMBOLS[key]\n\n if (!symbol) {\n return key\n }\n\n return os === 'macos' ? symbol.mac : symbol.other\n })\n}\n"],"names":["normalizeKey","key","useKeyBinding","keys","cb","pressedKeys","useRef","cbRef","useEffect","keysSet","checkMatch","handleKeyDown","e","handleKeyUp","handleBlur","toHEX","n","clamped","isValid","hexColor","alpha","percentage","hex","alphaHex","getOperatingSystem","ua","getBrowser","BREAKPOINTS","COLORS","Z_INDEX","KEYFRAMES","keyframes","KEY_SYMBOLS","getKeySymbols","os","symbol"],"mappings":";;AAIA,MAAMA,IAAe,CAACC,MAChBA,EAAI,WAAW,KAAK,SAAS,KAAKA,CAAG,IAChCA,EAAI,YAAA,IAENA,GAGIC,IAAgB,CAACC,GAA0BC,MAAoB;AAC1E,QAAMC,IAAcC,EAAoB,oBAAI,KAAK,GAC3CC,IAAQD,EAAOF,CAAE;AAEvB,EAAAG,EAAM,UAAUH,GAEhBI,EAAU,MAAM;AACd,UAAMC,IAAU,IAAI,IAAIN,CAAI,GAEtBO,IAAa,MAAM;AACvB,UAAID,EAAQ,SAASJ,EAAY,QAAQ;AACvC,eAAO;AAGT,iBAAWJ,KAAOQ;AAChB,YAAI,CAACJ,EAAY,QAAQ,IAAIJ,CAAG;AAC9B,iBAAO;AAIX,aAAO;AAAA,IACT,GAEMU,IAAgB,CAACC,MAAqB;AAC1C,YAAMX,IAAMD,EAAaY,EAAE,GAAG;AAC9B,MAAAP,EAAY,QAAQ,IAAIJ,CAAG,GAEvBS,EAAA,KAAgBH,EAAM,YACxBK,EAAE,eAAA,GACFL,EAAM,QAAA;AAAA,IAEV,GAEMM,IAAc,CAACD,MAAqB;AACxC,YAAMX,IAAMD,EAAaY,EAAE,GAAG;AAC9B,MAAAP,EAAY,QAAQ,OAAOJ,CAAG;AAAA,IAChC,GAEMa,IAAa,MAAM;AACvB,MAAAT,EAAY,QAAQ,MAAA;AAAA,IACtB;AAEA,kBAAO,iBAAiB,WAAWM,CAAa,GAChD,OAAO,iBAAiB,SAASE,CAAW,GAC5C,OAAO,iBAAiB,QAAQC,CAAU,GAEnC,MAAM;AACX,aAAO,oBAAoB,WAAWH,CAAa,GACnD,OAAO,oBAAoB,SAASE,CAAW,GAC/C,OAAO,oBAAoB,QAAQC,CAAU;AAAA,IAC/C;AAAA,EACF,GAAG,CAACX,CAAI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E,KAAK,KAAK,OAAO,IAAA;AAAA,EAC/B,MAAM,EAAE,KAAK,KAAK,OAAO,IAAA;AAAA,EACzB,KAAK,EAAE,KAAK,KAAK,OAAO,IAAA;AAAA,EACxB,QAAQ,EAAE,KAAK,KAAK,OAAO,IAAA;AAAA,EAC3B,UAAU,EAAE,KAAK,KAAK,OAAO,IAAA;AAAA;AAAA,EAG7B,KAAK,EAAE,KAAK,KAAK,OAAO,IAAA;AAAA,EACxB,OAAO,EAAE,KAAK,SAAS,OAAO,QAAA;AAAA,EAC9B,KAAK,EAAE,KAAK,KAAK,OAAO,IAAA;AAAA;AAAA,EAGxB,WAAW,EAAE,KAAK,KAAK,OAAO,IAAA;AAAA,EAC9B,QAAQ,EAAE,KAAK,KAAK,OAAO,IAAA;AAAA,EAC3B,QAAQ,EAAE,KAAK,OAAO,OAAO,MAAA;AAAA,EAC7B,QAAQ,EAAE,KAAK,OAAO,OAAO,MAAA;AAAA;AAAA,EAG7B,UAAU,EAAE,KAAK,KAAK,OAAO,IAAA;AAAA,EAC7B,SAAS,EAAE,KAAK,KAAK,OAAO,IAAA;AAC9B,GChIaC,IAAgB,CAAC9B,MAAwC;AACpE,MAAI,CAACA;AACH,WAAO,CAAA;AAGT,QAAM+B,IAAKV,EAAA;AAEX,SAAOrB,EAAK,IAAI,CAACF,MAAQ;AACvB,UAAMkC,IAASH,EAAY/B,CAAG;AAE9B,WAAKkC,IAIED,MAAO,UAAUC,EAAO,MAAMA,EAAO,QAHnClC;AAAA,EAIX,CAAC;AACH;"}
|
package/dist/lib.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./keyboard-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./keyboard-Cexig8lu.cjs"),t=require("./index-BUoqL3Q7.cjs"),i=require("./tooling-Dflq0Y98.cjs");exports.BREAKPOINTS=e.BREAKPOINTS;exports.COLORS=e.COLORS;exports.KEYFRAMES=e.KEYFRAMES;exports.KEY_SYMBOLS=e.KEY_SYMBOLS;exports.Z_INDEX=e.Z_INDEX;exports.alpha=e.alpha;exports.getBrowser=e.getBrowser;exports.getKeySymbols=e.getKeySymbols;exports.getOperatingSystem=e.getOperatingSystem;exports.isValid=e.isValid;exports.toHEX=e.toHEX;exports.useKeyBinding=e.useKeyBinding;exports.mediaBetween=t.mediaBetween;exports.mediaDown=t.mediaDown;exports.mediaUp=t.mediaUp;exports.validation=t.index;exports.newClassNameGetter=i.newClassNameGetter;
|
|
2
2
|
//# sourceMappingURL=lib.cjs.map
|
package/dist/lib.d.ts
CHANGED
|
@@ -220,4 +220,13 @@ export declare namespace validation {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
+
export declare const Z_INDEX: {
|
|
224
|
+
readonly dropdown: 100;
|
|
225
|
+
readonly modalOverlay: 1000;
|
|
226
|
+
readonly modal: 1001;
|
|
227
|
+
readonly portalDropdown: 1002;
|
|
228
|
+
readonly confirmation: 1003;
|
|
229
|
+
readonly confirmationBar: 1004;
|
|
230
|
+
};
|
|
231
|
+
|
|
223
232
|
export { }
|
package/dist/lib.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { B as e, C as t, K as i, d as o,
|
|
2
|
-
import { b as K, a as l, m as
|
|
3
|
-
import { n as
|
|
1
|
+
import { B as e, C as t, K as i, d as o, Z as m, a as r, c as n, g as d, b as S, i as g, t as p, u as B } from "./keyboard-D5qN_1XD.js";
|
|
2
|
+
import { b as K, a as l, m as O, i as w } from "./index-B_4jp70c.js";
|
|
3
|
+
import { n as b } from "./tooling-YDHxmiMT.js";
|
|
4
4
|
export {
|
|
5
5
|
e as BREAKPOINTS,
|
|
6
6
|
t as COLORS,
|
|
7
7
|
i as KEYFRAMES,
|
|
8
8
|
o as KEY_SYMBOLS,
|
|
9
|
-
m as
|
|
10
|
-
r as
|
|
11
|
-
n as
|
|
12
|
-
d as
|
|
13
|
-
S as
|
|
9
|
+
m as Z_INDEX,
|
|
10
|
+
r as alpha,
|
|
11
|
+
n as getBrowser,
|
|
12
|
+
d as getKeySymbols,
|
|
13
|
+
S as getOperatingSystem,
|
|
14
|
+
g as isValid,
|
|
14
15
|
K as mediaBetween,
|
|
15
16
|
l as mediaDown,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
O as mediaUp,
|
|
18
|
+
b as newClassNameGetter,
|
|
19
|
+
p as toHEX,
|
|
20
|
+
B as useKeyBinding,
|
|
21
|
+
w as validation
|
|
21
22
|
};
|
|
22
23
|
//# sourceMappingURL=lib.js.map
|