@wrdagency/blockout 1.0.8 → 1.0.10
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/hooks/index.d.ts +2 -1
- package/dist/hooks/index.js +11 -8
- package/dist/hooks/keyboard.js +1 -1
- package/dist/hooks/theme.d.ts +9 -0
- package/dist/hooks/theme.js +19 -0
- package/dist/index.js +57 -54
- package/dist/utils/object.js +3 -5
- package/package.json +1 -1
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { useSplitInput } from './input';
|
|
2
|
-
export { useModifiers } from './keyboard';
|
|
2
|
+
export { useHotkey, useModifiers } from './keyboard';
|
|
3
3
|
export { useSelection, type Selection, type SelectionMode } from './selection';
|
|
4
4
|
export { useObjectState } from './state';
|
|
5
5
|
export { useTemporaryChange } from './temporary';
|
|
6
|
+
export { useTheme } from './theme';
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { useSplitInput as r } from "./input.js";
|
|
2
|
-
import {
|
|
3
|
-
import { useSelection as
|
|
4
|
-
import { useObjectState as
|
|
5
|
-
import { useTemporaryChange as
|
|
2
|
+
import { useHotkey as p, useModifiers as m } from "./keyboard.js";
|
|
3
|
+
import { useSelection as u } from "./selection.js";
|
|
4
|
+
import { useObjectState as x } from "./state.js";
|
|
5
|
+
import { useTemporaryChange as a } from "./temporary.js";
|
|
6
|
+
import { useTheme as S } from "./theme.js";
|
|
6
7
|
export {
|
|
7
|
-
p as
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
p as useHotkey,
|
|
9
|
+
m as useModifiers,
|
|
10
|
+
x as useObjectState,
|
|
11
|
+
u as useSelection,
|
|
10
12
|
r as useSplitInput,
|
|
11
|
-
|
|
13
|
+
a as useTemporaryChange,
|
|
14
|
+
S as useTheme
|
|
12
15
|
};
|
package/dist/hooks/keyboard.js
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { u as m } from "../index-D7vLJIGX.js";
|
|
2
|
+
import { useEffect as r } from "react";
|
|
3
|
+
function h() {
|
|
4
|
+
const [e, t] = m("blockout__theme", "light");
|
|
5
|
+
return r(() => {
|
|
6
|
+
document.documentElement.dataset.colourScheme = e;
|
|
7
|
+
}, [e]), {
|
|
8
|
+
theme: e,
|
|
9
|
+
isDark: e === "dark",
|
|
10
|
+
isLight: e === "light",
|
|
11
|
+
toggle: () => {
|
|
12
|
+
t((o) => o === "light" ? "dark" : "light");
|
|
13
|
+
},
|
|
14
|
+
set: t
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
h as useTheme
|
|
19
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -4,13 +4,13 @@ import { Breadcrumbs as x } from "./components/breadcrumbs/index.js";
|
|
|
4
4
|
import { Button as a } from "./components/button/index.js";
|
|
5
5
|
import { BaseControl as n } from "./components/controls/base-control/index.js";
|
|
6
6
|
import { CardNumberControl as C } from "./components/controls/card-number-control/index.js";
|
|
7
|
-
import { CheckboxControl as
|
|
7
|
+
import { CheckboxControl as i } from "./components/controls/checkbox-control/index.js";
|
|
8
8
|
import { ChoiceControl as g } from "./components/controls/choice-control/index.js";
|
|
9
9
|
import { DateControl as b } from "./components/controls/date-control/index.js";
|
|
10
|
-
import { ListControl as
|
|
10
|
+
import { ListControl as H } from "./components/controls/list-control/index.js";
|
|
11
11
|
import { MarkdownControl as h } from "./components/controls/markdown-control/index.js";
|
|
12
12
|
import { NumberControl as y } from "./components/controls/number-control/index.js";
|
|
13
|
-
import { PasswordControl as
|
|
13
|
+
import { PasswordControl as F } from "./components/controls/password-control/index.js";
|
|
14
14
|
import { RecurrenceControl as D } from "./components/controls/recurrence-control/index.js";
|
|
15
15
|
import { SelectControl as P } from "./components/controls/select-control/control.js";
|
|
16
16
|
import { o as v } from "./options-Cfoqhxw2.js";
|
|
@@ -30,30 +30,31 @@ import { createForm as po } from "./components/form/types/form.js";
|
|
|
30
30
|
import { Menu as fo } from "./components/menu/index.js";
|
|
31
31
|
import { Progress as lo } from "./components/progress/index.js";
|
|
32
32
|
import { Shell as so } from "./components/shell/index.js";
|
|
33
|
-
import { Tabs as
|
|
33
|
+
import { Tabs as uo } from "./components/tabs/index.js";
|
|
34
34
|
import { Tag as co } from "./components/tag/index.js";
|
|
35
35
|
import { Toolbar as To } from "./components/toolbar/index.js";
|
|
36
|
-
import { Window as
|
|
36
|
+
import { Window as Ho } from "./components/window/index.js";
|
|
37
37
|
import { useSplitInput as ho } from "./hooks/input.js";
|
|
38
|
-
import {
|
|
39
|
-
import { useSelection as
|
|
40
|
-
import { useObjectState as
|
|
41
|
-
import { useTemporaryChange as
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
38
|
+
import { useHotkey as yo, useModifiers as ko } from "./hooks/keyboard.js";
|
|
39
|
+
import { useSelection as Bo } from "./hooks/selection.js";
|
|
40
|
+
import { useObjectState as Lo } from "./hooks/state.js";
|
|
41
|
+
import { useTemporaryChange as Ro } from "./hooks/temporary.js";
|
|
42
|
+
import { useTheme as Mo } from "./hooks/theme.js";
|
|
43
|
+
import { Colourway as Vo } from "./primitives/colourway/index.js";
|
|
44
|
+
import { Draggable as Io } from "./primitives/draggable/index.js";
|
|
45
|
+
import { IconLabel as jo } from "./primitives/icon-label/index.js";
|
|
46
|
+
import { Link as Go } from "./primitives/link/index.js";
|
|
47
|
+
import { NavLink as qo } from "./primitives/nav-link/index.js";
|
|
48
|
+
import { Popover as Jo } from "./primitives/popover/index.js";
|
|
49
|
+
import { Resizable as Qo } from "./primitives/resizable/index.js";
|
|
50
|
+
import { ScrollArea as Xo } from "./primitives/scroll-area/index.js";
|
|
51
|
+
import { Symbol as Zo } from "./primitives/symbol/index.js";
|
|
52
|
+
import { Tooltip as $o } from "./primitives/tooltip/index.js";
|
|
53
|
+
import { Truncate as rr } from "./primitives/truncate/index.js";
|
|
54
|
+
import { H1 as tr, H2 as mr, H3 as pr, H4 as xr, H5 as fr, H6 as ar, Heading as lr } from "./primitives/typography/heading.js";
|
|
55
|
+
import { Paragraph as sr } from "./primitives/typography/paragraph.js";
|
|
56
|
+
import { VisuallyHidden as ur } from "./primitives/visually-hidden/index.js";
|
|
57
|
+
import { getRandomTheme as cr } from "./primitives/colourway/util.js";
|
|
57
58
|
import './assets/index.css';export {
|
|
58
59
|
e as Avatar,
|
|
59
60
|
m as Badge,
|
|
@@ -61,43 +62,43 @@ import './assets/index.css';export {
|
|
|
61
62
|
x as Breadcrumbs,
|
|
62
63
|
a as Button,
|
|
63
64
|
C as CardNumberControl,
|
|
64
|
-
|
|
65
|
+
i as CheckboxControl,
|
|
65
66
|
g as ChoiceControl,
|
|
66
|
-
|
|
67
|
+
Vo as Colourway,
|
|
67
68
|
K as DataForm,
|
|
68
69
|
$ as DataView,
|
|
69
70
|
b as DateControl,
|
|
70
|
-
|
|
71
|
+
Io as Draggable,
|
|
71
72
|
ro as Filesystem,
|
|
72
73
|
Z as Filters,
|
|
73
74
|
to as Form,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
tr as H1,
|
|
76
|
+
mr as H2,
|
|
77
|
+
pr as H3,
|
|
78
|
+
xr as H4,
|
|
79
|
+
fr as H5,
|
|
80
|
+
ar as H6,
|
|
81
|
+
lr as Heading,
|
|
82
|
+
jo as IconLabel,
|
|
83
|
+
Go as Link,
|
|
84
|
+
H as ListControl,
|
|
84
85
|
h as MarkdownControl,
|
|
85
86
|
fo as Menu,
|
|
86
|
-
|
|
87
|
+
qo as NavLink,
|
|
87
88
|
y as NumberControl,
|
|
88
89
|
v as Options,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
sr as Paragraph,
|
|
91
|
+
F as PasswordControl,
|
|
92
|
+
Jo as Popover,
|
|
92
93
|
lo as Progress,
|
|
93
94
|
D as RecurrenceControl,
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
Qo as Resizable,
|
|
96
|
+
Xo as ScrollArea,
|
|
96
97
|
N as Select,
|
|
97
98
|
P as SelectControl,
|
|
98
99
|
so as Shell,
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
Zo as Symbol,
|
|
101
|
+
uo as Tabs,
|
|
101
102
|
co as Tag,
|
|
102
103
|
A as TagControl,
|
|
103
104
|
O as TextControl,
|
|
@@ -105,17 +106,19 @@ import './assets/index.css';export {
|
|
|
105
106
|
W as ToggleControl,
|
|
106
107
|
E as ToggleGroupControl,
|
|
107
108
|
To as Toolbar,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
$o as Tooltip,
|
|
110
|
+
rr as Truncate,
|
|
111
|
+
ur as VisuallyHidden,
|
|
112
|
+
Ho as Window,
|
|
112
113
|
po as createForm,
|
|
113
|
-
|
|
114
|
-
yo as
|
|
115
|
-
|
|
114
|
+
cr as getRandomTheme,
|
|
115
|
+
yo as useHotkey,
|
|
116
|
+
ko as useModifiers,
|
|
117
|
+
Lo as useObjectState,
|
|
116
118
|
U as useSchema,
|
|
117
|
-
|
|
119
|
+
Bo as useSelection,
|
|
118
120
|
ho as useSplitInput,
|
|
119
|
-
|
|
121
|
+
Ro as useTemporaryChange,
|
|
122
|
+
Mo as useTheme,
|
|
120
123
|
X as useView
|
|
121
124
|
};
|
package/dist/utils/object.js
CHANGED