@ariakit/solid-core 0.0.1 → 0.1.1

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.
Files changed (149) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/as/as/package.json +8 -0
  3. package/cjs/__chunks/53WPOLZU.cjs +7 -0
  4. package/cjs/__chunks/AUGTJ473.cjs +7 -0
  5. package/cjs/__chunks/GVOD7RTZ.cjs +21 -0
  6. package/cjs/__chunks/JFCGWMZC.cjs +35 -0
  7. package/cjs/__chunks/RLO4RIGL.cjs +42 -0
  8. package/cjs/__chunks/T5IUBZJK.cjs +39 -0
  9. package/cjs/__chunks/V3ZEI37L.cjs +61 -0
  10. package/cjs/__chunks/V5YR7HBG.cjs +37 -0
  11. package/cjs/as/as.cjs +7 -0
  12. package/cjs/as/as.d.cts +30 -0
  13. package/cjs/as/as.d.ts +30 -0
  14. package/cjs/focus-trap/focus-trap-region.cjs +68 -0
  15. package/cjs/focus-trap/focus-trap-region.d.cts +38 -0
  16. package/cjs/focus-trap/focus-trap-region.d.ts +38 -0
  17. package/cjs/focus-trap/focus-trap.cjs +11 -0
  18. package/cjs/focus-trap/focus-trap.d.cts +27 -0
  19. package/cjs/focus-trap/focus-trap.d.ts +27 -0
  20. package/cjs/group/group-label-context.cjs +6 -0
  21. package/cjs/group/group-label-context.d.cts +2 -0
  22. package/cjs/group/group-label-context.d.ts +2 -0
  23. package/cjs/group/group-label.cjs +41 -0
  24. package/cjs/group/group-label.d.cts +34 -0
  25. package/cjs/group/group-label.d.ts +34 -0
  26. package/cjs/group/group.cjs +43 -0
  27. package/cjs/group/group.d.cts +28 -0
  28. package/cjs/group/group.d.ts +28 -0
  29. package/cjs/heading/heading-context.cjs +6 -0
  30. package/cjs/heading/heading-context.d.cts +3 -0
  31. package/cjs/heading/heading-context.d.ts +3 -0
  32. package/cjs/heading/heading-level.cjs +23 -0
  33. package/cjs/heading/heading-level.d.cts +27 -0
  34. package/cjs/heading/heading-level.d.ts +27 -0
  35. package/cjs/heading/heading.cjs +45 -0
  36. package/cjs/heading/heading.d.cts +39 -0
  37. package/cjs/heading/heading.d.ts +39 -0
  38. package/cjs/heading/utils.cjs +1 -0
  39. package/cjs/heading/utils.d.cts +1 -0
  40. package/cjs/heading/utils.d.ts +1 -0
  41. package/cjs/role/role.cjs +26 -0
  42. package/cjs/role/role.d.cts +33 -0
  43. package/cjs/role/role.d.ts +33 -0
  44. package/cjs/separator/separator.cjs +30 -0
  45. package/cjs/separator/separator.d.cts +32 -0
  46. package/cjs/separator/separator.d.ts +32 -0
  47. package/cjs/utils/misc.cjs +8 -0
  48. package/cjs/utils/misc.d.cts +16 -0
  49. package/cjs/utils/misc.d.ts +16 -0
  50. package/cjs/utils/reactivity.cjs +12 -0
  51. package/cjs/utils/reactivity.d.cts +109 -0
  52. package/cjs/utils/reactivity.d.ts +109 -0
  53. package/cjs/utils/system.cjs +13 -0
  54. package/cjs/utils/system.d.cts +45 -0
  55. package/cjs/utils/system.d.ts +45 -0
  56. package/cjs/utils/types.cjs +1 -0
  57. package/cjs/utils/types.d.cts +56 -0
  58. package/cjs/utils/types.d.ts +56 -0
  59. package/cjs/visually-hidden/visually-hidden.cjs +10 -0
  60. package/cjs/visually-hidden/visually-hidden.d.cts +34 -0
  61. package/cjs/visually-hidden/visually-hidden.d.ts +34 -0
  62. package/esm/__chunks/I7JSIDPD.js +7 -0
  63. package/esm/__chunks/ILGMKAYU.js +37 -0
  64. package/esm/__chunks/NX66AMGW.js +39 -0
  65. package/esm/__chunks/OKOFCLOZ.js +61 -0
  66. package/esm/__chunks/QKOHDUFI.js +42 -0
  67. package/esm/__chunks/SFKMELHD.js +35 -0
  68. package/esm/__chunks/UKDBTPK5.js +21 -0
  69. package/esm/__chunks/VOWRNGOM.js +7 -0
  70. package/esm/as/as.d.ts +30 -0
  71. package/esm/as/as.js +7 -0
  72. package/esm/focus-trap/focus-trap-region.d.ts +38 -0
  73. package/esm/focus-trap/focus-trap-region.js +68 -0
  74. package/esm/focus-trap/focus-trap.d.ts +27 -0
  75. package/esm/focus-trap/focus-trap.js +11 -0
  76. package/esm/group/group-label-context.d.ts +2 -0
  77. package/esm/group/group-label-context.js +6 -0
  78. package/esm/group/group-label.d.ts +34 -0
  79. package/esm/group/group-label.js +41 -0
  80. package/esm/group/group.d.ts +28 -0
  81. package/esm/group/group.js +43 -0
  82. package/esm/heading/heading-context.d.ts +3 -0
  83. package/esm/heading/heading-context.js +6 -0
  84. package/esm/heading/heading-level.d.ts +27 -0
  85. package/esm/heading/heading-level.js +23 -0
  86. package/esm/heading/heading.d.ts +39 -0
  87. package/esm/heading/heading.js +45 -0
  88. package/esm/heading/utils.d.ts +1 -0
  89. package/esm/heading/utils.js +0 -0
  90. package/esm/role/role.d.ts +33 -0
  91. package/esm/role/role.js +26 -0
  92. package/esm/separator/separator.d.ts +32 -0
  93. package/esm/separator/separator.js +30 -0
  94. package/esm/utils/misc.d.ts +16 -0
  95. package/esm/utils/misc.js +8 -0
  96. package/esm/utils/reactivity.d.ts +109 -0
  97. package/esm/utils/reactivity.js +12 -0
  98. package/esm/utils/system.d.ts +45 -0
  99. package/esm/utils/system.js +13 -0
  100. package/esm/utils/types.d.ts +56 -0
  101. package/esm/utils/types.js +0 -0
  102. package/esm/visually-hidden/visually-hidden.d.ts +34 -0
  103. package/esm/visually-hidden/visually-hidden.js +10 -0
  104. package/focus-trap/focus-trap/package.json +8 -0
  105. package/focus-trap/focus-trap-region/package.json +8 -0
  106. package/group/group/package.json +8 -0
  107. package/group/group-label/package.json +8 -0
  108. package/group/group-label-context/package.json +8 -0
  109. package/heading/heading/package.json +8 -0
  110. package/heading/heading-context/package.json +8 -0
  111. package/heading/heading-level/package.json +8 -0
  112. package/heading/utils/package.json +8 -0
  113. package/index.ts +1 -0
  114. package/license +21 -0
  115. package/package.json +181 -6
  116. package/readme.md +19 -0
  117. package/role/role/package.json +8 -0
  118. package/separator/separator/package.json +8 -0
  119. package/solid/__chunks/ALJQAVR2.jsx +42 -0
  120. package/solid/__chunks/HBI7B4XO.jsx +52 -0
  121. package/solid/__chunks/HUX7TBVM.jsx +37 -0
  122. package/solid/__chunks/KXVBEYOF.jsx +21 -0
  123. package/solid/__chunks/O5QTZ2VS.jsx +42 -0
  124. package/solid/__chunks/PIGECGWJ.jsx +40 -0
  125. package/solid/__chunks/TCHPU5P4.jsx +7 -0
  126. package/solid/__chunks/VAA446IN.jsx +7 -0
  127. package/solid/as/as.jsx +7 -0
  128. package/solid/focus-trap/focus-trap-region.jsx +63 -0
  129. package/solid/focus-trap/focus-trap.jsx +11 -0
  130. package/solid/group/group-label-context.jsx +6 -0
  131. package/solid/group/group-label.jsx +50 -0
  132. package/solid/group/group.jsx +45 -0
  133. package/solid/heading/heading-context.jsx +6 -0
  134. package/solid/heading/heading-level.jsx +22 -0
  135. package/solid/heading/heading.jsx +52 -0
  136. package/solid/heading/utils.jsx +0 -0
  137. package/solid/role/role.jsx +59 -0
  138. package/solid/separator/separator.jsx +36 -0
  139. package/solid/utils/misc.jsx +8 -0
  140. package/solid/utils/reactivity.jsx +12 -0
  141. package/solid/utils/system.jsx +13 -0
  142. package/solid/utils/types.jsx +0 -0
  143. package/solid/visually-hidden/visually-hidden.jsx +10 -0
  144. package/tsconfig.build.json +4 -0
  145. package/utils/misc/package.json +8 -0
  146. package/utils/reactivity/package.json +8 -0
  147. package/utils/system/package.json +8 -0
  148. package/utils/types/package.json +8 -0
  149. package/visually-hidden/visually-hidden/package.json +8 -0
package/package.json CHANGED
@@ -1,11 +1,186 @@
1
1
  {
2
2
  "name": "@ariakit/solid-core",
3
- "version": "0.0.1",
4
- "description": "",
5
- "main": "index.js",
3
+ "version": "0.1.1",
4
+ "description": "Ariakit Solid core",
5
+ "sideEffects": false,
6
+ "license": "MIT",
7
+ "homepage": "https://ariakit.org",
8
+ "type": "module",
9
+ "main": "cjs/index.cjs",
10
+ "module": "esm/index.js",
11
+ "types": "cjs/index.d.ts",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/ariakit/ariakit.git",
15
+ "directory": "packages/ariakit-solid-core"
16
+ },
17
+ "author": {
18
+ "name": "Dani Guardiola",
19
+ "email": "hi@daniguardio.la",
20
+ "url": "https://dio.la"
21
+ },
22
+ "contributors": [
23
+ {
24
+ "name": "Diego Haz",
25
+ "email": "hazdiego@gmail.com",
26
+ "url": "https://github.com/diegohaz"
27
+ }
28
+ ],
6
29
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
30
+ "lint": "biome check .",
31
+ "build": "node ../../scripts/build/build.js",
32
+ "clean": "node ../../scripts/build/clean.js"
33
+ },
34
+ "keywords": [
35
+ "ariakit",
36
+ "solid",
37
+ "core"
38
+ ],
39
+ "dependencies": {
40
+ "@ariakit/core": "0.4.15",
41
+ "@solid-primitives/props": "3.2.0",
42
+ "@solid-primitives/utils": "6.3.0"
43
+ },
44
+ "peerDependencies": {
45
+ "solid-js": "^1.8"
8
46
  },
9
- "author": "",
10
- "license": "MIT"
47
+ "exports": {
48
+ "./as/as": {
49
+ "solid": "./solid/as/as.jsx",
50
+ "import": "./esm/as/as.js",
51
+ "require": {
52
+ "types": "./cjs/as/as.d.cts",
53
+ "default": "./cjs/as/as.cjs"
54
+ }
55
+ },
56
+ "./focus-trap/focus-trap-region": {
57
+ "solid": "./solid/focus-trap/focus-trap-region.jsx",
58
+ "import": "./esm/focus-trap/focus-trap-region.js",
59
+ "require": {
60
+ "types": "./cjs/focus-trap/focus-trap-region.d.cts",
61
+ "default": "./cjs/focus-trap/focus-trap-region.cjs"
62
+ }
63
+ },
64
+ "./focus-trap/focus-trap": {
65
+ "solid": "./solid/focus-trap/focus-trap.jsx",
66
+ "import": "./esm/focus-trap/focus-trap.js",
67
+ "require": {
68
+ "types": "./cjs/focus-trap/focus-trap.d.cts",
69
+ "default": "./cjs/focus-trap/focus-trap.cjs"
70
+ }
71
+ },
72
+ "./group/group-label-context": {
73
+ "solid": "./solid/group/group-label-context.jsx",
74
+ "import": "./esm/group/group-label-context.js",
75
+ "require": {
76
+ "types": "./cjs/group/group-label-context.d.cts",
77
+ "default": "./cjs/group/group-label-context.cjs"
78
+ }
79
+ },
80
+ "./group/group-label": {
81
+ "solid": "./solid/group/group-label.jsx",
82
+ "import": "./esm/group/group-label.js",
83
+ "require": {
84
+ "types": "./cjs/group/group-label.d.cts",
85
+ "default": "./cjs/group/group-label.cjs"
86
+ }
87
+ },
88
+ "./group/group": {
89
+ "solid": "./solid/group/group.jsx",
90
+ "import": "./esm/group/group.js",
91
+ "require": {
92
+ "types": "./cjs/group/group.d.cts",
93
+ "default": "./cjs/group/group.cjs"
94
+ }
95
+ },
96
+ "./heading/heading-context": {
97
+ "solid": "./solid/heading/heading-context.jsx",
98
+ "import": "./esm/heading/heading-context.js",
99
+ "require": {
100
+ "types": "./cjs/heading/heading-context.d.cts",
101
+ "default": "./cjs/heading/heading-context.cjs"
102
+ }
103
+ },
104
+ "./heading/heading-level": {
105
+ "solid": "./solid/heading/heading-level.jsx",
106
+ "import": "./esm/heading/heading-level.js",
107
+ "require": {
108
+ "types": "./cjs/heading/heading-level.d.cts",
109
+ "default": "./cjs/heading/heading-level.cjs"
110
+ }
111
+ },
112
+ "./heading/heading": {
113
+ "solid": "./solid/heading/heading.jsx",
114
+ "import": "./esm/heading/heading.js",
115
+ "require": {
116
+ "types": "./cjs/heading/heading.d.cts",
117
+ "default": "./cjs/heading/heading.cjs"
118
+ }
119
+ },
120
+ "./heading/utils": {
121
+ "solid": "./solid/heading/utils.jsx",
122
+ "import": "./esm/heading/utils.js",
123
+ "require": {
124
+ "types": "./cjs/heading/utils.d.cts",
125
+ "default": "./cjs/heading/utils.cjs"
126
+ }
127
+ },
128
+ "./role/role": {
129
+ "solid": "./solid/role/role.jsx",
130
+ "import": "./esm/role/role.js",
131
+ "require": {
132
+ "types": "./cjs/role/role.d.cts",
133
+ "default": "./cjs/role/role.cjs"
134
+ }
135
+ },
136
+ "./separator/separator": {
137
+ "solid": "./solid/separator/separator.jsx",
138
+ "import": "./esm/separator/separator.js",
139
+ "require": {
140
+ "types": "./cjs/separator/separator.d.cts",
141
+ "default": "./cjs/separator/separator.cjs"
142
+ }
143
+ },
144
+ "./utils/misc": {
145
+ "solid": "./solid/utils/misc.jsx",
146
+ "import": "./esm/utils/misc.js",
147
+ "require": {
148
+ "types": "./cjs/utils/misc.d.cts",
149
+ "default": "./cjs/utils/misc.cjs"
150
+ }
151
+ },
152
+ "./utils/reactivity": {
153
+ "solid": "./solid/utils/reactivity.jsx",
154
+ "import": "./esm/utils/reactivity.js",
155
+ "require": {
156
+ "types": "./cjs/utils/reactivity.d.cts",
157
+ "default": "./cjs/utils/reactivity.cjs"
158
+ }
159
+ },
160
+ "./utils/system": {
161
+ "solid": "./solid/utils/system.jsx",
162
+ "import": "./esm/utils/system.js",
163
+ "require": {
164
+ "types": "./cjs/utils/system.d.cts",
165
+ "default": "./cjs/utils/system.cjs"
166
+ }
167
+ },
168
+ "./utils/types": {
169
+ "solid": "./solid/utils/types.jsx",
170
+ "import": "./esm/utils/types.js",
171
+ "require": {
172
+ "types": "./cjs/utils/types.d.cts",
173
+ "default": "./cjs/utils/types.cjs"
174
+ }
175
+ },
176
+ "./visually-hidden/visually-hidden": {
177
+ "solid": "./solid/visually-hidden/visually-hidden.jsx",
178
+ "import": "./esm/visually-hidden/visually-hidden.js",
179
+ "require": {
180
+ "types": "./cjs/visually-hidden/visually-hidden.d.cts",
181
+ "default": "./cjs/visually-hidden/visually-hidden.cjs"
182
+ }
183
+ },
184
+ "./package.json": "./package.json"
185
+ }
11
186
  }
package/readme.md ADDED
@@ -0,0 +1,19 @@
1
+ # Ariakit Solid Core
2
+
3
+ **Important:** This package is an internal dependency of Ariakit and does not follow semantic versioning, meaning breaking changes may occur in patch and minor versions. You probably want to use [`@ariakit/solid`](https://npmjs.org/package/@ariakit/solid) instead.
4
+
5
+ ## Installation
6
+
7
+ ```
8
+ npm i @ariakit/solid-core
9
+ ```
10
+
11
+ ## Core Team
12
+
13
+ - [Diego Haz](https://bsky.app/profile/haz.dev)
14
+ - [Ben Rodri](https://bsky.app/profile/ben.ariakit.org)
15
+ - [Dani Guardiola](https://bsky.app/profile/dio.la)
16
+
17
+ ## Contributing
18
+
19
+ Follow the instructions on the [contributing guide](https://github.com/ariakit/ariakit/blob/main/contributing.md).
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@ariakit/solid-core/role/role",
3
+ "private": true,
4
+ "sideEffects": false,
5
+ "main": "../../cjs/role/role.cjs",
6
+ "module": "../../esm/role/role.js",
7
+ "types": "../../cjs/role/role.d.ts"
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@ariakit/solid-core/separator/separator",
3
+ "private": true,
4
+ "sideEffects": false,
5
+ "main": "../../cjs/separator/separator.cjs",
6
+ "module": "../../esm/separator/separator.js",
7
+ "types": "../../cjs/separator/separator.d.ts"
8
+ }
@@ -0,0 +1,42 @@
1
+ // src/utils/reactivity.ts
2
+ import { combineProps } from "@solid-primitives/props";
3
+ import {
4
+ createSignal,
5
+ mergeProps as solidMergeProps,
6
+ splitProps,
7
+ untrack
8
+ } from "solid-js";
9
+ function stableAccessor(value, callback) {
10
+ return () => callback(value);
11
+ }
12
+ function extractPropsWithDefaults(props, defaults) {
13
+ const [own, rest] = splitProps(props, Object.keys(defaults));
14
+ return [
15
+ solidMergeProps(defaults, own),
16
+ rest
17
+ ];
18
+ }
19
+ function createRef(initialValue) {
20
+ const [get, set] = createSignal(initialValue);
21
+ return {
22
+ get current() {
23
+ return untrack(() => get());
24
+ },
25
+ get,
26
+ set,
27
+ reset: () => set(initialValue)
28
+ };
29
+ }
30
+ function mergeProps(base, overrides, skipProps) {
31
+ return combineProps(
32
+ [base, skipProps ? splitProps(overrides, skipProps)[1] : overrides],
33
+ { reverseEventHandlers: true }
34
+ );
35
+ }
36
+
37
+ export {
38
+ stableAccessor,
39
+ extractPropsWithDefaults,
40
+ createRef,
41
+ mergeProps
42
+ };
@@ -0,0 +1,52 @@
1
+ import {
2
+ extractPropsWithDefaults
3
+ } from "./ALJQAVR2.jsx";
4
+
5
+ // src/utils/system.tsx
6
+ import { mergeProps, splitProps } from "solid-js";
7
+ import { Dynamic } from "solid-js/web";
8
+ function createInstance(Component, props) {
9
+ const [features, rest] = splitProps(props, ["render", "wrapInstance"]);
10
+ const withRender = () => {
11
+ var _a;
12
+ return (
13
+ // TODO: replace with LazyDynamic
14
+ <Dynamic
15
+ {...rest}
16
+ component={(_a = features.render) != null ? _a : Component}
17
+ />
18
+ );
19
+ };
20
+ let tree = withRender;
21
+ if (features.wrapInstance) {
22
+ for (const element of features.wrapInstance) {
23
+ const children = tree;
24
+ tree = () => (
25
+ // TODO: replace with LazyDynamic
26
+ <Dynamic component={element}>{children()}</Dynamic>
27
+ );
28
+ }
29
+ }
30
+ return tree();
31
+ }
32
+ function wrapInstance(props, element) {
33
+ var _a;
34
+ const wrapInstance2 = [...(_a = props.wrapInstance) != null ? _a : [], element];
35
+ return mergeProps(props, { wrapInstance: wrapInstance2 });
36
+ }
37
+ function createHook(useProps) {
38
+ return useProps;
39
+ }
40
+ function withOptions(defaults, useProps) {
41
+ return function usePropsWithOptions(props) {
42
+ const [options, rest] = extractPropsWithDefaults(props, defaults);
43
+ return useProps(rest, options);
44
+ };
45
+ }
46
+
47
+ export {
48
+ createInstance,
49
+ wrapInstance,
50
+ createHook,
51
+ withOptions
52
+ };
@@ -0,0 +1,37 @@
1
+ import {
2
+ mergeProps
3
+ } from "./ALJQAVR2.jsx";
4
+
5
+ // src/as/as.tsx
6
+ import { Dynamic } from "solid-js/web";
7
+ var cache = /* @__PURE__ */ new Map();
8
+ var As = new Proxy(
9
+ function As2(props) {
10
+ return (parentProps) => (
11
+ // TODO: replace with LazyDynamic
12
+ <Dynamic
13
+ {...mergeProps(parentProps, props)}
14
+ component={props.component}
15
+ />
16
+ );
17
+ },
18
+ {
19
+ get: (_, key) => {
20
+ let component = cache.get(key);
21
+ if (!component) {
22
+ component = function AsElement(props) {
23
+ return (parentProps) => (
24
+ // TODO: replace with LazyDynamic
25
+ <Dynamic {...mergeProps(parentProps, props)} component={key} />
26
+ );
27
+ };
28
+ cache.set(key, component);
29
+ }
30
+ return component;
31
+ }
32
+ }
33
+ );
34
+
35
+ export {
36
+ As
37
+ };
@@ -0,0 +1,21 @@
1
+ // src/utils/misc.ts
2
+ import { access } from "@solid-primitives/utils";
3
+ import { createUniqueId } from "solid-js";
4
+ function createId(defaultId) {
5
+ const id = createUniqueId();
6
+ return () => {
7
+ var _a;
8
+ return (_a = access(defaultId)) != null ? _a : id;
9
+ };
10
+ }
11
+ function extractTagName(element, fallback) {
12
+ return () => {
13
+ var _a, _b;
14
+ return (_b = (_a = access(element)) == null ? void 0 : _a.tagName.toLowerCase()) != null ? _b : typeof fallback === "string" ? fallback : void 0;
15
+ };
16
+ }
17
+
18
+ export {
19
+ createId,
20
+ extractTagName
21
+ };
@@ -0,0 +1,42 @@
1
+ import {
2
+ useVisuallyHidden
3
+ } from "./PIGECGWJ.jsx";
4
+ import {
5
+ createHook,
6
+ createInstance
7
+ } from "./HBI7B4XO.jsx";
8
+ import {
9
+ mergeProps
10
+ } from "./ALJQAVR2.jsx";
11
+
12
+ // src/focus-trap/focus-trap.tsx
13
+ var TagName = "span";
14
+ var useFocusTrap = createHook(
15
+ function useFocusTrap2(props) {
16
+ props = mergeProps(
17
+ {
18
+ "data-focus-trap": "",
19
+ tabIndex: 0,
20
+ "aria-hidden": true,
21
+ style: {
22
+ // Prevents unintended scroll jumps.
23
+ position: "fixed",
24
+ top: 0,
25
+ left: 0
26
+ }
27
+ },
28
+ props
29
+ );
30
+ props = useVisuallyHidden(props);
31
+ return props;
32
+ }
33
+ );
34
+ function FocusTrap(props) {
35
+ const htmlProps = useFocusTrap(props);
36
+ return createInstance(TagName, htmlProps);
37
+ }
38
+
39
+ export {
40
+ useFocusTrap,
41
+ FocusTrap
42
+ };
@@ -0,0 +1,40 @@
1
+ import {
2
+ createHook,
3
+ createInstance
4
+ } from "./HBI7B4XO.jsx";
5
+ import {
6
+ mergeProps
7
+ } from "./ALJQAVR2.jsx";
8
+
9
+ // src/visually-hidden/visually-hidden.tsx
10
+ var TagName = "span";
11
+ var useVisuallyHidden = createHook(
12
+ function useVisuallyHidden2(props) {
13
+ props = mergeProps(
14
+ {
15
+ style: {
16
+ border: 0,
17
+ clip: "rect(0 0 0 0)",
18
+ height: "1px",
19
+ margin: "-1px",
20
+ overflow: "hidden",
21
+ padding: 0,
22
+ position: "absolute",
23
+ "white-space": "nowrap",
24
+ width: "1px"
25
+ }
26
+ },
27
+ props
28
+ );
29
+ return props;
30
+ }
31
+ );
32
+ function VisuallyHidden(props) {
33
+ const htmlProps = useVisuallyHidden(props);
34
+ return createInstance(TagName, htmlProps);
35
+ }
36
+
37
+ export {
38
+ useVisuallyHidden,
39
+ VisuallyHidden
40
+ };
@@ -0,0 +1,7 @@
1
+ // src/group/group-label-context.tsx
2
+ import { createContext } from "solid-js";
3
+ var GroupLabelContext = createContext();
4
+
5
+ export {
6
+ GroupLabelContext
7
+ };
@@ -0,0 +1,7 @@
1
+ // src/heading/heading-context.tsx
2
+ import { createContext } from "solid-js";
3
+ var HeadingContext = createContext();
4
+
5
+ export {
6
+ HeadingContext
7
+ };
@@ -0,0 +1,7 @@
1
+ import {
2
+ As
3
+ } from "../__chunks/HUX7TBVM.jsx";
4
+ import "../__chunks/ALJQAVR2.jsx";
5
+ export {
6
+ As
7
+ };
@@ -0,0 +1,63 @@
1
+ import {
2
+ FocusTrap
3
+ } from "../__chunks/O5QTZ2VS.jsx";
4
+ import "../__chunks/PIGECGWJ.jsx";
5
+ import {
6
+ createHook,
7
+ createInstance,
8
+ withOptions,
9
+ wrapInstance
10
+ } from "../__chunks/HBI7B4XO.jsx";
11
+ import {
12
+ createRef,
13
+ mergeProps
14
+ } from "../__chunks/ALJQAVR2.jsx";
15
+
16
+ // src/focus-trap/focus-trap-region.tsx
17
+ import { getAllTabbableIn } from "@ariakit/core/utils/focus";
18
+ import { Show } from "solid-js";
19
+ var TagName = "div";
20
+ var useFocusTrapRegion = createHook(
21
+ withOptions({ enabled: false }, function useFocusTrapRegion2(props, options) {
22
+ const ref = createRef();
23
+ props = wrapInstance(props, (wrapperProps) => {
24
+ const renderFocusTrap = () => {
25
+ return <Show when={options.enabled}>
26
+ <FocusTrap
27
+ onFocus={(event) => {
28
+ const container = ref.current;
29
+ if (!container) return;
30
+ const tabbables = getAllTabbableIn(container, true);
31
+ const first = tabbables[0];
32
+ const last = tabbables[tabbables.length - 1];
33
+ if (!tabbables.length) {
34
+ container.focus();
35
+ return;
36
+ }
37
+ if (event.relatedTarget === first) {
38
+ last == null ? void 0 : last.focus();
39
+ } else {
40
+ first == null ? void 0 : first.focus();
41
+ }
42
+ }}
43
+ />
44
+ </Show>;
45
+ };
46
+ return <>
47
+ {renderFocusTrap()}
48
+ {wrapperProps.children}
49
+ {renderFocusTrap()}
50
+ </>;
51
+ });
52
+ props = mergeProps({ ref: ref.set }, props);
53
+ return props;
54
+ })
55
+ );
56
+ var FocusTrapRegion = function FocusTrapRegion2(props) {
57
+ const htmlProps = useFocusTrapRegion(props);
58
+ return createInstance(TagName, htmlProps);
59
+ };
60
+ export {
61
+ FocusTrapRegion,
62
+ useFocusTrapRegion
63
+ };
@@ -0,0 +1,11 @@
1
+ import {
2
+ FocusTrap,
3
+ useFocusTrap
4
+ } from "../__chunks/O5QTZ2VS.jsx";
5
+ import "../__chunks/PIGECGWJ.jsx";
6
+ import "../__chunks/HBI7B4XO.jsx";
7
+ import "../__chunks/ALJQAVR2.jsx";
8
+ export {
9
+ FocusTrap,
10
+ useFocusTrap
11
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ GroupLabelContext
3
+ } from "../__chunks/TCHPU5P4.jsx";
4
+ export {
5
+ GroupLabelContext
6
+ };
@@ -0,0 +1,50 @@
1
+ import {
2
+ createId
3
+ } from "../__chunks/KXVBEYOF.jsx";
4
+ import {
5
+ createHook,
6
+ createInstance
7
+ } from "../__chunks/HBI7B4XO.jsx";
8
+ import {
9
+ mergeProps,
10
+ stableAccessor
11
+ } from "../__chunks/ALJQAVR2.jsx";
12
+ import {
13
+ GroupLabelContext
14
+ } from "../__chunks/TCHPU5P4.jsx";
15
+
16
+ // src/group/group-label.tsx
17
+ import {
18
+ createEffect,
19
+ onCleanup,
20
+ useContext
21
+ } from "solid-js";
22
+ var TagName = "div";
23
+ var useGroupLabel = createHook(
24
+ function useGroupLabel2(props) {
25
+ const setLabelId = useContext(GroupLabelContext);
26
+ const id = createId(stableAccessor(props, (p) => p.id));
27
+ createEffect(() => {
28
+ setLabelId == null ? void 0 : setLabelId(id());
29
+ onCleanup(() => setLabelId == null ? void 0 : setLabelId(void 0));
30
+ });
31
+ props = mergeProps(
32
+ {
33
+ get id() {
34
+ return id();
35
+ },
36
+ "aria-hidden": true
37
+ },
38
+ props
39
+ );
40
+ return props;
41
+ }
42
+ );
43
+ var GroupLabel = function GroupLabel2(props) {
44
+ const htmlProps = useGroupLabel(props);
45
+ return createInstance(TagName, htmlProps);
46
+ };
47
+ export {
48
+ GroupLabel,
49
+ useGroupLabel
50
+ };
@@ -0,0 +1,45 @@
1
+ import {
2
+ As
3
+ } from "../__chunks/HUX7TBVM.jsx";
4
+ import {
5
+ createHook,
6
+ createInstance,
7
+ wrapInstance
8
+ } from "../__chunks/HBI7B4XO.jsx";
9
+ import {
10
+ mergeProps
11
+ } from "../__chunks/ALJQAVR2.jsx";
12
+ import {
13
+ GroupLabelContext
14
+ } from "../__chunks/TCHPU5P4.jsx";
15
+
16
+ // src/group/group.tsx
17
+ import { createSignal } from "solid-js";
18
+ var TagName = "div";
19
+ var useGroup = createHook(
20
+ function useGroup2(props) {
21
+ const [labelId, setLabelId] = createSignal();
22
+ props = wrapInstance(
23
+ props,
24
+ <As component={GroupLabelContext.Provider} value={setLabelId} />
25
+ );
26
+ props = mergeProps(
27
+ {
28
+ role: "group",
29
+ get "aria-labelledby"() {
30
+ return labelId();
31
+ }
32
+ },
33
+ props
34
+ );
35
+ return props;
36
+ }
37
+ );
38
+ var Group = function Group2(props) {
39
+ const htmlProps = useGroup(props);
40
+ return createInstance(TagName, htmlProps);
41
+ };
42
+ export {
43
+ Group,
44
+ useGroup
45
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ HeadingContext
3
+ } from "../__chunks/VAA446IN.jsx";
4
+ export {
5
+ HeadingContext
6
+ };