@brand-map/primitives 0.0.0-broken.1 → 0.0.0-broken.2
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/package.json +2 -9
- package/src/accordion/accordion.tsx +17 -17
- package/src/accordion/accordion.web.tsx +13 -13
- package/src/alert-dialog/alert-dialog.tsx +28 -28
- package/src/alert-dialog/alert-dialog.web.tsx +18 -18
- package/src/alert-dialog/types.ts +3 -3
- package/src/aspect-ratio/aspect-ratio.tsx +3 -3
- package/src/avatar/avatar.tsx +10 -10
- package/src/avatar/types.ts +2 -2
- package/src/checkbox/checkbox.tsx +9 -9
- package/src/checkbox/checkbox.web.tsx +8 -8
- package/src/collapsible/collapsible.tsx +33 -35
- package/src/collapsible/collapsible.web.tsx +9 -9
- package/src/context-menu/context-menu.tsx +45 -45
- package/src/context-menu/context-menu.web.tsx +44 -44
- package/src/dialog/dialog.tsx +11 -11
- package/src/dialog/dialog.web.tsx +15 -15
- package/src/dialog/types.ts +5 -5
- package/src/dropdown-menu/dropdown-menu.tsx +43 -43
- package/src/dropdown-menu/dropdown-menu.web.tsx +45 -45
- package/src/hooks/use-Isomorphic-layout-effect.tsx +1 -2
- package/src/hooks/use-relative-position.tsx +2 -2
- package/src/hover-card/hover-card.tsx +40 -42
- package/src/hover-card/hover-card.web.tsx +9 -9
- package/src/label/label.tsx +3 -4
- package/src/label/label.web.tsx +5 -5
- package/src/menubar/menubar.tsx +45 -45
- package/src/menubar/menubar.web.tsx +47 -47
- package/src/navigation-menu/navigation-menu.tsx +23 -23
- package/src/navigation-menu/navigation-menu.web.tsx +26 -26
- package/src/popover/popover.tsx +20 -20
- package/src/popover/popover.web.tsx +14 -14
- package/src/progress/progress.tsx +4 -4
- package/src/progress/progress.web.tsx +5 -5
- package/src/radio-group/radio-group.tsx +11 -11
- package/src/radio-group/radio-group.web.tsx +9 -9
- package/src/render/index.ts +1 -0
- package/src/{slot/slot.tsx → render/render.tsx} +26 -27
- package/src/select/select.tsx +28 -28
- package/src/select/select.web.tsx +22 -22
- package/src/separator/separator.tsx +3 -3
- package/src/slider/slider.tsx +8 -8
- package/src/slider/slider.web.tsx +6 -6
- package/src/switch/switch.context.ts +16 -0
- package/src/switch/switch.tsx +68 -38
- package/src/switch/switch.web.tsx +9 -9
- package/src/switch/types.ts +27 -6
- package/src/table/table.tsx +9 -9
- package/src/tabs/tabs.tsx +13 -13
- package/src/tabs/tabs.web.tsx +10 -10
- package/src/toast/toast.tsx +14 -14
- package/src/toggle/toggle.tsx +5 -5
- package/src/toggle/toggle.web.tsx +5 -5
- package/src/toggle-group/toggle-group.tsx +11 -11
- package/src/toggle-group/toggle-group.web.tsx +10 -10
- package/src/toolbar/toolbar.tsx +12 -12
- package/src/toolbar/toolbar.web.tsx +12 -12
- package/src/tooltip/tooltip.tsx +17 -17
- package/src/tooltip/tooltip.web.tsx +11 -11
- package/src/types/index.ts +5 -15
- package/.changeset/README.md +0 -8
- package/.changeset/config.json +0 -11
- package/.oxfmtrc.json +0 -35
- package/.oxlintrc.json +0 -166
- package/README.md +0 -78
- package/bun.lock +0 -904
- package/mise.toml +0 -3
- package/src/slot/index.ts +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// import * as Toolbar from "@radix-ui/react-toolbar";
|
|
2
|
-
//
|
|
2
|
+
//
|
|
3
3
|
// import { Pressable, View, type GestureResponderEvent } from "react-native";
|
|
4
4
|
|
|
5
|
-
// import * as
|
|
5
|
+
// import * as Render from "../render";
|
|
6
6
|
// import { ToggleGroupUtils } from "../utils";
|
|
7
7
|
|
|
8
8
|
// import type {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
// ToggleItemRef,
|
|
21
21
|
// } from "./types";
|
|
22
22
|
|
|
23
|
-
// const Root =
|
|
23
|
+
// const Root = forwardRef<RootRef, RootProps>(({ orientation, dir, loop, style, ...props }, ref) => {
|
|
24
24
|
//
|
|
25
25
|
// return (
|
|
26
26
|
// <Toolbar.Root
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
|
|
40
40
|
// Root.displayName = "RootWebToolbar";
|
|
41
41
|
|
|
42
|
-
// const ToggleGroupContext =
|
|
42
|
+
// const ToggleGroupContext = createContext<ToggleGroupProps | null>(null);
|
|
43
43
|
|
|
44
|
-
// const ToggleGroup =
|
|
44
|
+
// const ToggleGroup = forwardRef<ToggleGroupRef, ToggleGroupProps>(
|
|
45
45
|
// ({ render, type, value, onValueChange, disabled = false, style, ...viewProps }, ref) => {
|
|
46
46
|
//
|
|
47
47
|
// return (
|
|
@@ -75,18 +75,18 @@
|
|
|
75
75
|
// ToggleGroup.displayName = "ToggleGroupWebToolbar";
|
|
76
76
|
|
|
77
77
|
// function useToggleGroupContext() {
|
|
78
|
-
// const context =
|
|
78
|
+
// const context = useContext(ToggleGroupContext);
|
|
79
79
|
// if (!context) {
|
|
80
80
|
// throw new Error("ToggleGroup compound components cannot be rendered outside the ToggleGroup component");
|
|
81
81
|
// }
|
|
82
82
|
// return context;
|
|
83
83
|
// }
|
|
84
84
|
|
|
85
|
-
// const ToggleItem =
|
|
85
|
+
// const ToggleItem = forwardRef<ToggleItemRef, ToggleItemProps>(
|
|
86
86
|
// ({ render, value: itemValue, disabled: disabledProp = false, onPress: onPressProp, style, ...props }, ref) => {
|
|
87
87
|
// const { type, disabled, value, onValueChange } = useToggleGroupContext();
|
|
88
88
|
|
|
89
|
-
// function onPress(
|
|
89
|
+
// function onPress(event: GestureResponderEvent) {
|
|
90
90
|
// if (disabled || disabledProp) return;
|
|
91
91
|
// if (type === "single") {
|
|
92
92
|
// onValueChange(ToggleGroupUtils.getNewSingleValue(value, itemValue));
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
// if (type === "multiple") {
|
|
95
95
|
// onValueChange(ToggleGroupUtils.getNewMultipleValue(value, itemValue));
|
|
96
96
|
// }
|
|
97
|
-
// onPressProp?.(
|
|
97
|
+
// onPressProp?.(event);
|
|
98
98
|
// }
|
|
99
99
|
|
|
100
100
|
//
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
|
|
117
117
|
// ToggleItem.displayName = "ToggleItemWebToolbar";
|
|
118
118
|
|
|
119
|
-
// const Separator =
|
|
119
|
+
// const Separator = forwardRef<SeparatorRef, SeparatorProps>(({ style, ...props }, ref) => {
|
|
120
120
|
//
|
|
121
121
|
// return (
|
|
122
122
|
// <Component
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
|
|
129
129
|
// Separator.displayName = "SeparatorWebToolbar";
|
|
130
130
|
|
|
131
|
-
// const Link =
|
|
131
|
+
// const Link = forwardRef<LinkRef, LinkProps>(({ style, ...props }, ref) => {
|
|
132
132
|
//
|
|
133
133
|
// return (
|
|
134
134
|
// <Toolbar.Link render>
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
|
|
143
143
|
// Link.displayName = "LinkWebToolbar";
|
|
144
144
|
|
|
145
|
-
// const Button =
|
|
145
|
+
// const Button = forwardRef<ButtonRef, ButtonProps>(({ style, ...props }, ref) => {
|
|
146
146
|
//
|
|
147
147
|
// return (
|
|
148
148
|
// <Toolbar.Button render>
|
package/src/tooltip/tooltip.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createContext, forwardRef, useId, useState, useContext, useEffect } from "react";
|
|
2
2
|
import { BackHandler, Pressable, View, type GestureResponderEvent, type LayoutChangeEvent, type LayoutRectangle } from "react-native";
|
|
3
3
|
|
|
4
4
|
import { useAugmentedRef, useRelativePosition, type LayoutPosition } from "../hooks";
|
|
5
5
|
import { Portal as RNPPortal } from "../portal";
|
|
6
|
-
import * as
|
|
6
|
+
import * as Render from "../render";
|
|
7
7
|
|
|
8
8
|
import type { ContentProps, ContentRef, BackdropProps, BackdropRef, PortalProps, RootProps, RootRef, TriggerProps, TriggerRef } from "./types";
|
|
9
9
|
|
|
@@ -17,9 +17,9 @@ interface RootContextInterface {
|
|
|
17
17
|
nativeID: string;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
const RootContext =
|
|
20
|
+
const RootContext = createContext<RootContextInterface | null>(null);
|
|
21
21
|
|
|
22
|
-
const Root =
|
|
22
|
+
const Root = forwardRef<RootRef, RootProps>(
|
|
23
23
|
(
|
|
24
24
|
{
|
|
25
25
|
render,
|
|
@@ -31,10 +31,10 @@ const Root = React.forwardRef<RootRef, RootProps>(
|
|
|
31
31
|
},
|
|
32
32
|
ref,
|
|
33
33
|
) => {
|
|
34
|
-
const nativeID =
|
|
35
|
-
const [triggerPosition, setTriggerPosition] =
|
|
36
|
-
const [contentLayout, setContentLayout] =
|
|
37
|
-
const [open, setOpen] =
|
|
34
|
+
const nativeID = useId();
|
|
35
|
+
const [triggerPosition, setTriggerPosition] = useState<LayoutPosition | null>(null);
|
|
36
|
+
const [contentLayout, setContentLayout] = useState<LayoutRectangle | null>(null);
|
|
37
|
+
const [open, setOpen] = useState(false);
|
|
38
38
|
|
|
39
39
|
function onOpenChange(value: boolean) {
|
|
40
40
|
setOpen(value);
|
|
@@ -65,14 +65,14 @@ const Root = React.forwardRef<RootRef, RootProps>(
|
|
|
65
65
|
Root.displayName = "RootNativeTooltip";
|
|
66
66
|
|
|
67
67
|
function useTooltipContext() {
|
|
68
|
-
const context =
|
|
68
|
+
const context = useContext(RootContext);
|
|
69
69
|
if (!context) {
|
|
70
70
|
throw new Error("Tooltip compound components cannot be rendered outside the Tooltip component");
|
|
71
71
|
}
|
|
72
72
|
return context;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
const Trigger =
|
|
75
|
+
const Trigger = forwardRef<TriggerRef, TriggerProps>(({ onPress: onPressProp, disabled = false, ...props }, ref) => {
|
|
76
76
|
const { open, onOpenChange, setTriggerPosition } = useTooltipContext();
|
|
77
77
|
|
|
78
78
|
const augmentedRef = useAugmentedRef({
|
|
@@ -91,14 +91,14 @@ const Trigger = React.forwardRef<TriggerRef, TriggerProps>(({ onPress: onPressPr
|
|
|
91
91
|
},
|
|
92
92
|
});
|
|
93
93
|
|
|
94
|
-
function onPress(
|
|
94
|
+
function onPress(event: GestureResponderEvent) {
|
|
95
95
|
if (disabled) return;
|
|
96
96
|
augmentedRef.current?.measure((_x, _y, width, height, pageX, pageY) => {
|
|
97
97
|
setTriggerPosition({ width, pageX, pageY: pageY, height });
|
|
98
98
|
});
|
|
99
99
|
const newValue = !open;
|
|
100
100
|
onOpenChange(newValue);
|
|
101
|
-
onPressProp?.(
|
|
101
|
+
onPressProp?.(event);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
return (
|
|
@@ -141,16 +141,16 @@ function Portal({ keepMounted, hostName, children }: PortalProps) {
|
|
|
141
141
|
);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
const Backdrop =
|
|
144
|
+
const Backdrop = forwardRef<BackdropRef, BackdropProps>(({ keepMounted, onPress: onPressProp, closeOnPress = true, ...props }, ref) => {
|
|
145
145
|
const { open, onOpenChange, setContentLayout, setTriggerPosition } = useTooltipContext();
|
|
146
146
|
|
|
147
|
-
function onPress(
|
|
147
|
+
function onPress(event: GestureResponderEvent) {
|
|
148
148
|
if (closeOnPress) {
|
|
149
149
|
setTriggerPosition(null);
|
|
150
150
|
setContentLayout(null);
|
|
151
151
|
onOpenChange(false);
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
onPressProp?.(event);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
if (!keepMounted) {
|
|
@@ -173,7 +173,7 @@ Backdrop.displayName = "BackdropNativeTooltip";
|
|
|
173
173
|
/**
|
|
174
174
|
* @info `position`, `top`, `left`, and `maxWidth` style properties are controlled internally. Opt out of this behavior on native by setting `disablePositioningStyle` to `true`.
|
|
175
175
|
*/
|
|
176
|
-
const Content =
|
|
176
|
+
const Content = forwardRef<ContentRef, ContentProps>(
|
|
177
177
|
(
|
|
178
178
|
{
|
|
179
179
|
render = false,
|
|
@@ -193,7 +193,7 @@ const Content = React.forwardRef<ContentRef, ContentProps>(
|
|
|
193
193
|
) => {
|
|
194
194
|
const { open, onOpenChange, nativeID, contentLayout, setContentLayout, setTriggerPosition, triggerPosition } = useTooltipContext();
|
|
195
195
|
|
|
196
|
-
|
|
196
|
+
useEffect(() => {
|
|
197
197
|
const backHandler = BackHandler.addEventListener("hardwareBackPress", () => {
|
|
198
198
|
setTriggerPosition(null);
|
|
199
199
|
setContentLayout(null);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
// import * as Tooltip from "@radix-ui/react-tooltip";
|
|
2
|
-
//
|
|
2
|
+
//
|
|
3
3
|
// import { Pressable, View, type GestureResponderEvent } from "react-native";
|
|
4
4
|
|
|
5
5
|
// import { useAugmentedRef, useIsomorphicLayoutEffect } from "../hooks";
|
|
6
|
-
// import * as
|
|
6
|
+
// import * as Render from "../render";
|
|
7
7
|
|
|
8
8
|
// import type { ContentProps, ContentRef, BackdropProps, BackdropRef, PortalProps, RootProps, RootRef, TriggerProps, TriggerRef } from "./types";
|
|
9
9
|
|
|
10
|
-
// const RootContext =
|
|
10
|
+
// const RootContext = createContext<{
|
|
11
11
|
// open: boolean;
|
|
12
12
|
// onOpenChange: (open: boolean) => void;
|
|
13
13
|
// } | null>(null);
|
|
14
14
|
|
|
15
|
-
// const Root =
|
|
15
|
+
// const Root = forwardRef<RootRef, RootProps>(
|
|
16
16
|
// ({ render, delayDuration, skipDelayDuration, disableHoverableContent, onOpenChange: onOpenChangeProp, ...viewProps }, ref) => {
|
|
17
|
-
// const [open, setOpen] =
|
|
17
|
+
// const [open, setOpen] = useState(false);
|
|
18
18
|
|
|
19
19
|
// function onOpenChange(value: boolean) {
|
|
20
20
|
// setOpen(value);
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
// Root.displayName = "RootWebTooltip";
|
|
50
50
|
|
|
51
51
|
// function useTooltipContext() {
|
|
52
|
-
// const context =
|
|
52
|
+
// const context = useContext(RootContext);
|
|
53
53
|
// if (!context) {
|
|
54
54
|
// throw new Error("Tooltip compound components cannot be rendered outside the Tooltip component");
|
|
55
55
|
// }
|
|
56
56
|
// return context;
|
|
57
57
|
// }
|
|
58
58
|
|
|
59
|
-
// const Trigger =
|
|
59
|
+
// const Trigger = forwardRef<TriggerRef, TriggerProps>(({ onPress: onPressProp, role: _role, disabled, ...props }, ref) => {
|
|
60
60
|
// const { onOpenChange, open } = useTooltipContext();
|
|
61
61
|
// const augmentedRef = useAugmentedRef({
|
|
62
62
|
// ref,
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
// },
|
|
70
70
|
// },
|
|
71
71
|
// });
|
|
72
|
-
// function onPress(
|
|
72
|
+
// function onPress(event: GestureResponderEvent) {
|
|
73
73
|
// if (onPressProp) {
|
|
74
|
-
// onPressProp(
|
|
74
|
+
// onPressProp(event);
|
|
75
75
|
// }
|
|
76
76
|
// onOpenChange(!open);
|
|
77
77
|
// }
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
// );
|
|
114
114
|
// }
|
|
115
115
|
|
|
116
|
-
// const Backdrop =
|
|
116
|
+
// const Backdrop = forwardRef<BackdropRef, BackdropProps>(({ keepMounted, ...props }, ref) => {
|
|
117
117
|
//
|
|
118
118
|
// return (
|
|
119
119
|
// <Component
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
|
|
126
126
|
// Backdrop.displayName = "BackdropWebTooltip";
|
|
127
127
|
|
|
128
|
-
// const Content =
|
|
128
|
+
// const Content = forwardRef<ContentRef, ContentProps>(
|
|
129
129
|
// (
|
|
130
130
|
// {
|
|
131
131
|
// render = false,
|
package/src/types/index.ts
CHANGED
|
@@ -1,31 +1,22 @@
|
|
|
1
|
-
import type { Pressable, Text, View, ViewStyle } from "react-native";
|
|
2
|
-
|
|
3
|
-
type ComponentPropsWithRender<T extends React.ElementType> = BrandMapUIComponentProps<T>;
|
|
1
|
+
import type { Insets, Pressable, Text, View, ViewStyle } from "react-native";
|
|
4
2
|
|
|
3
|
+
type TextRef = React.ComponentRef<typeof Text>;
|
|
5
4
|
type ViewRef = React.ComponentRef<typeof View>;
|
|
6
5
|
type PressableRef = React.ComponentRef<typeof Pressable>;
|
|
7
|
-
type TextRef = React.ComponentRef<typeof Text>;
|
|
8
6
|
|
|
7
|
+
type RenderTextProps = BrandMapUIComponentProps<typeof Text>;
|
|
9
8
|
type RenderViewProps<S = {}> = BrandMapUIComponentProps<typeof View, S>;
|
|
10
9
|
type RenderPressableProps<S = {}> = BrandMapUIComponentProps<typeof Pressable, S> & {
|
|
11
10
|
/**
|
|
12
11
|
* @platform: WEB ONLY
|
|
13
12
|
*/
|
|
14
|
-
onKeyDown?: (
|
|
13
|
+
onKeyDown?: (event: React.KeyboardEvent) => void;
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* @platform: WEB ONLY
|
|
18
17
|
*/
|
|
19
|
-
onKeyUp?: (
|
|
18
|
+
onKeyUp?: (event: React.KeyboardEvent) => void;
|
|
20
19
|
};
|
|
21
|
-
type RenderTextProps = BrandMapUIComponentProps<typeof Text>;
|
|
22
|
-
|
|
23
|
-
interface Insets {
|
|
24
|
-
top?: number;
|
|
25
|
-
bottom?: number;
|
|
26
|
-
left?: number;
|
|
27
|
-
right?: number;
|
|
28
|
-
}
|
|
29
20
|
|
|
30
21
|
type PointerDownOutsideEvent = CustomEvent<{ originalEvent: PointerEvent }>;
|
|
31
22
|
type FocusOutsideEvent = CustomEvent<{ originalEvent: FocusEvent }>;
|
|
@@ -128,7 +119,6 @@ type BrandMapUIComponentProps<
|
|
|
128
119
|
export type {
|
|
129
120
|
BrandMapUIComponentProps,
|
|
130
121
|
ComponentRenderFn,
|
|
131
|
-
ComponentPropsWithRender,
|
|
132
122
|
KeepMountable,
|
|
133
123
|
Insets,
|
|
134
124
|
PositionedContentProps,
|
package/.changeset/README.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Changesets
|
|
2
|
-
|
|
3
|
-
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
-
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
-
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
-
|
|
7
|
-
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
-
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
package/.changeset/config.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
|
|
3
|
-
"changelog": "@changesets/cli/changelog",
|
|
4
|
-
"commit": false,
|
|
5
|
-
"fixed": [],
|
|
6
|
-
"linked": [],
|
|
7
|
-
"access": "restricted",
|
|
8
|
-
"baseBranch": "main",
|
|
9
|
-
"updateInternalDependencies": "patch",
|
|
10
|
-
"ignore": []
|
|
11
|
-
}
|
package/.oxfmtrc.json
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
|
3
|
-
"ignorePatterns": ["*.hbs", "brand-map-postgres.schema.d.ts", ".yaml", "_*", "*.gen.ts"],
|
|
4
|
-
"printWidth": 160,
|
|
5
|
-
"tabWidth": 2,
|
|
6
|
-
"semi": true,
|
|
7
|
-
"arrowParens": "always",
|
|
8
|
-
"experimentalSortPackageJson": {
|
|
9
|
-
"sortScripts": true
|
|
10
|
-
},
|
|
11
|
-
"useTabs": false,
|
|
12
|
-
"trailingComma": "all",
|
|
13
|
-
"singleQuote": false,
|
|
14
|
-
"singleAttributePerLine": true,
|
|
15
|
-
"quoteProps": "consistent",
|
|
16
|
-
"insertFinalNewline": true,
|
|
17
|
-
"embeddedLanguageFormatting": "auto",
|
|
18
|
-
"bracketSpacing": true,
|
|
19
|
-
"objectWrap": "preserve",
|
|
20
|
-
"endOfLine": "lf",
|
|
21
|
-
"jsxSingleQuote": false,
|
|
22
|
-
"bracketSameLine": false,
|
|
23
|
-
"experimentalTailwindcss": { "functions": ["cn", "cvax", "clsx", "cx"] },
|
|
24
|
-
"experimentalSortImports": {
|
|
25
|
-
"groups": [
|
|
26
|
-
["side-effect"],
|
|
27
|
-
["builtin"],
|
|
28
|
-
["external", "external-type"],
|
|
29
|
-
["internal", "internal-type"],
|
|
30
|
-
["parent", "parent-type"],
|
|
31
|
-
["sibling", "sibling-type"],
|
|
32
|
-
["index", "index-type"]
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
}
|
package/.oxlintrc.json
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
-
"plugins": ["unicorn", "typescript", "oxc", "import"],
|
|
4
|
-
"categories": {},
|
|
5
|
-
"rules": {
|
|
6
|
-
"constructor-super": "warn",
|
|
7
|
-
"for-direction": "warn",
|
|
8
|
-
"no-async-promise-executor": "warn",
|
|
9
|
-
"no-caller": "warn",
|
|
10
|
-
"promise/always-return": "error",
|
|
11
|
-
"oxc/approx-constant": "error",
|
|
12
|
-
"no-class-assign": "warn",
|
|
13
|
-
"no-compare-neg-zero": "warn",
|
|
14
|
-
"no-cond-assign": "warn",
|
|
15
|
-
"no-const-assign": "warn",
|
|
16
|
-
"eslint/accessor-pairs": "error",
|
|
17
|
-
"typescript/adjacent-overload-signatures": "error",
|
|
18
|
-
"no-constant-binary-expression": "warn",
|
|
19
|
-
"no-constant-condition": "warn",
|
|
20
|
-
"no-control-regex": "warn",
|
|
21
|
-
"no-debugger": "warn",
|
|
22
|
-
"no-delete-var": "warn",
|
|
23
|
-
"no-dupe-class-members": "warn",
|
|
24
|
-
"no-dupe-else-if": "warn",
|
|
25
|
-
"no-dupe-keys": "warn",
|
|
26
|
-
"no-duplicate-case": "warn",
|
|
27
|
-
"no-empty-character-class": "warn",
|
|
28
|
-
"no-empty-pattern": "warn",
|
|
29
|
-
"no-empty-static-block": "warn",
|
|
30
|
-
"no-eval": "warn",
|
|
31
|
-
"no-ex-assign": "warn",
|
|
32
|
-
"no-extra-boolean-cast": "warn",
|
|
33
|
-
"no-func-assign": "warn",
|
|
34
|
-
"no-global-assign": "warn",
|
|
35
|
-
"no-import-assign": "error",
|
|
36
|
-
"no-invalid-regexp": "warn",
|
|
37
|
-
"no-irregular-whitespace": "warn",
|
|
38
|
-
"no-loss-of-precision": "warn",
|
|
39
|
-
"no-new-native-nonconstructor": "warn",
|
|
40
|
-
"no-nonoctal-decimal-escape": "warn",
|
|
41
|
-
"typescript/no-require-imports": "error",
|
|
42
|
-
"eslint/no-else-return": "error",
|
|
43
|
-
"no-obj-calls": "warn",
|
|
44
|
-
"no-self-assign": "warn",
|
|
45
|
-
"no-setter-return": "warn",
|
|
46
|
-
"no-shadow-restricted-names": "warn",
|
|
47
|
-
"no-sparse-arrays": "warn",
|
|
48
|
-
"no-this-before-super": "warn",
|
|
49
|
-
"no-unassigned-vars": "warn",
|
|
50
|
-
"no-unsafe-finally": "warn",
|
|
51
|
-
"no-unsafe-negation": "warn",
|
|
52
|
-
"no-unsafe-optional-chaining": "warn",
|
|
53
|
-
"no-unused-expressions": "allow",
|
|
54
|
-
"no-unused-labels": "warn",
|
|
55
|
-
"no-unused-private-class-members": "error",
|
|
56
|
-
"no-unused-vars": "error",
|
|
57
|
-
"no-useless-backreference": "warn",
|
|
58
|
-
"no-useless-catch": "warn",
|
|
59
|
-
"no-useless-escape": "warn",
|
|
60
|
-
"no-useless-rename": "warn",
|
|
61
|
-
"no-with": "error",
|
|
62
|
-
"require-yield": "warn",
|
|
63
|
-
"use-isnan": "error",
|
|
64
|
-
"valid-typeof": "error",
|
|
65
|
-
"oxc/bad-array-method-on-arguments": "warn",
|
|
66
|
-
"oxc/bad-char-at-comparison": "warn",
|
|
67
|
-
"oxc/bad-comparison-sequence": "warn",
|
|
68
|
-
"typescript/ban-ts-comment": "error",
|
|
69
|
-
"oxc/bad-min-max-func": "warn",
|
|
70
|
-
"oxc/bad-object-literal-comparison": "warn",
|
|
71
|
-
"oxc/bad-replace-all-arg": "warn",
|
|
72
|
-
"oxc/const-comparisons": "warn",
|
|
73
|
-
"oxc/double-comparisons": "warn",
|
|
74
|
-
"oxc/erasing-op": "warn",
|
|
75
|
-
"oxc/missing-throw": "warn",
|
|
76
|
-
"oxc/number-arg-out-of-range": "warn",
|
|
77
|
-
"oxc/only-used-in-recursion": "warn",
|
|
78
|
-
"oxc/uninvoked-array-callback": "warn",
|
|
79
|
-
"typescript/consistent-type-specifier-style": "error",
|
|
80
|
-
"eslint/array-callback-return": "error",
|
|
81
|
-
"import/group-exports": "allow",
|
|
82
|
-
"no-barrel-file": "error",
|
|
83
|
-
"eslint/no-duplicate-imports": "error",
|
|
84
|
-
"import/no-unassigned-import": "error",
|
|
85
|
-
"typescript/await-thenable": "warn",
|
|
86
|
-
"typescript/no-array-delete": "warn",
|
|
87
|
-
"typescript/no-base-to-string": "warn",
|
|
88
|
-
"typescript/no-duplicate-enum-values": "error",
|
|
89
|
-
"typescript/no-duplicate-type-constituents": "warn",
|
|
90
|
-
"typescript/no-extra-non-null-assertion": "warn",
|
|
91
|
-
"typescript/no-floating-promises": "warn",
|
|
92
|
-
"typescript/no-for-in-array": "warn",
|
|
93
|
-
"typescript/no-implied-eval": "error",
|
|
94
|
-
"typescript/no-meaningless-void-operator": "warn",
|
|
95
|
-
"typescript/no-misused-new": "error",
|
|
96
|
-
"typescript/no-misused-spread": "error",
|
|
97
|
-
"typescript/no-non-null-asserted-optional-chain": "warn",
|
|
98
|
-
"typescript/no-redundant-type-constituents": "warn",
|
|
99
|
-
"typescript/no-this-alias": "error",
|
|
100
|
-
"typescript/no-unnecessary-parameter-property-assignment": "warn",
|
|
101
|
-
"typescript/no-unsafe-declaration-merging": "warn",
|
|
102
|
-
"typescript/no-unsafe-unary-minus": "warn",
|
|
103
|
-
"typescript/no-useless-empty-export": "error",
|
|
104
|
-
"typescript/no-wrapper-object-types": "warn",
|
|
105
|
-
"typescript/prefer-as-const": "warn",
|
|
106
|
-
"typescript/require-array-sort-compare": "warn",
|
|
107
|
-
"typescript/restrict-template-expressions": "warn",
|
|
108
|
-
"typescript/triple-slash-reference": "warn",
|
|
109
|
-
"typescript/unbound-method": "warn",
|
|
110
|
-
"unicorn/no-await-in-promise-methods": "warn",
|
|
111
|
-
"unicorn/no-empty-file": "error",
|
|
112
|
-
"unicorn/no-invalid-fetch-options": "warn",
|
|
113
|
-
"unicorn/no-invalid-remove-event-listener": "warn",
|
|
114
|
-
"unicorn/no-new-array": "warn",
|
|
115
|
-
"unicorn/no-single-promise-in-promise-methods": "error",
|
|
116
|
-
"unicorn/no-thenable": "warn",
|
|
117
|
-
"unicorn/no-unnecessary-await": "warn",
|
|
118
|
-
"unicorn/no-useless-fallback-in-spread": "warn",
|
|
119
|
-
"unicorn/no-useless-length-check": "warn",
|
|
120
|
-
"unicorn/no-useless-spread": "warn",
|
|
121
|
-
"unicorn/prefer-set-size": "warn",
|
|
122
|
-
"import/no-empty-named-blocks": "error",
|
|
123
|
-
"unicorn/prefer-string-starts-ends-with": "warn",
|
|
124
|
-
"typescript/no-empty-function": "error"
|
|
125
|
-
},
|
|
126
|
-
"settings": {
|
|
127
|
-
"jsx-a11y": {
|
|
128
|
-
"polymorphicPropName": null,
|
|
129
|
-
"components": {},
|
|
130
|
-
"attributes": {}
|
|
131
|
-
},
|
|
132
|
-
"next": {
|
|
133
|
-
"rootDir": []
|
|
134
|
-
},
|
|
135
|
-
"react": {
|
|
136
|
-
"formComponents": [],
|
|
137
|
-
"linkComponents": [],
|
|
138
|
-
"version": null
|
|
139
|
-
},
|
|
140
|
-
"jsdoc": {
|
|
141
|
-
"ignorePrivate": false,
|
|
142
|
-
"ignoreInternal": false,
|
|
143
|
-
"ignoreReplacesDocs": true,
|
|
144
|
-
"overrideReplacesDocs": true,
|
|
145
|
-
"augmentsExtendsReplacesDocs": false,
|
|
146
|
-
"implementsReplacesDocs": false,
|
|
147
|
-
"exemptDestructuredRootsFromChecks": false,
|
|
148
|
-
"tagNamePreference": {}
|
|
149
|
-
},
|
|
150
|
-
"vitest": {
|
|
151
|
-
"typecheck": false
|
|
152
|
-
},
|
|
153
|
-
"typescript": {
|
|
154
|
-
"ts-expect-error": "allow-with-description",
|
|
155
|
-
"ts-ignore": true,
|
|
156
|
-
"ts-nocheck": { "descriptionFormat": "^: TS\\d+ because .+$" },
|
|
157
|
-
"ts-check": false,
|
|
158
|
-
"minimumDescriptionLength": 3
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
"env": {
|
|
162
|
-
"builtin": true
|
|
163
|
-
},
|
|
164
|
-
"globals": {},
|
|
165
|
-
"ignorePatterns": [".dagger", "__generated__", "brand-map-postgres.schema.d.ts"]
|
|
166
|
-
}
|
package/README.md
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
# Brand-Map Primitives
|
|
2
|
-
|
|
3
|
-
Universal Style agnostic and accessible react-native components
|
|
4
|
-
|
|
5
|
-
## Unstyled Nature
|
|
6
|
-
|
|
7
|
-
Brand-Map Primitives provides unstyled components, offering a high degree of customization freedom. By default, the components come without any predefined styles, allowing developers to seamlessly match their app's aesthetics.
|
|
8
|
-
|
|
9
|
-
## Accessibility
|
|
10
|
-
|
|
11
|
-
Accessibility is a significant focus within Brand-Map Primitives. We are dedicated to ensuring our components align with accessibility standards. Our ongoing efforts involve designing and testing components with appropriate labels, roles, and behaviors, aiming to provide an inclusive user experience.
|
|
12
|
-
|
|
13
|
-
### Getting started for contributors
|
|
14
|
-
|
|
15
|
-
1. Fork, clone, and install the dependencies with `pnpm`
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
pnpm i
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
2. Build and watch all of the primitive packages:
|
|
22
|
-
|
|
23
|
-
> This builds all of the primitive packages, it watches them for changes. This prevents the need to run the `build` command every time a primitive file is changed.
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
pnpm dev:primitives
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
3. Start the app of your choice:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
# Start the Expo NativeWind app
|
|
33
|
-
pnpm dev:expo-nativewind
|
|
34
|
-
# Or start the Nextjs NativeWind app
|
|
35
|
-
pnpm dev:nextjs-nativewind
|
|
36
|
-
# Or the Documentation app
|
|
37
|
-
pnpm dev:docs
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Primitives
|
|
41
|
-
|
|
42
|
-
#### Core
|
|
43
|
-
|
|
44
|
-
- `accordion`
|
|
45
|
-
- `alert-dialog`
|
|
46
|
-
- `aspect-ratio`
|
|
47
|
-
- `avatar`
|
|
48
|
-
- `checkbox`
|
|
49
|
-
- `collapsible`
|
|
50
|
-
- `context-menu`
|
|
51
|
-
- `dialog`
|
|
52
|
-
- `dropdown-menu`
|
|
53
|
-
- `hover-card`
|
|
54
|
-
- `label`
|
|
55
|
-
- `menubar`
|
|
56
|
-
- `navigation-menu`
|
|
57
|
-
- `popover`
|
|
58
|
-
- `progress`
|
|
59
|
-
- `radio-group`
|
|
60
|
-
- `select`
|
|
61
|
-
- `separator`
|
|
62
|
-
- `slider`
|
|
63
|
-
- `switch`
|
|
64
|
-
- `table`
|
|
65
|
-
- `tabs`
|
|
66
|
-
- `toast`
|
|
67
|
-
- `toggle`
|
|
68
|
-
- `toggle-group`
|
|
69
|
-
- `toolbar`
|
|
70
|
-
- `tooltip`
|
|
71
|
-
|
|
72
|
-
#### Shared
|
|
73
|
-
|
|
74
|
-
- `hooks`
|
|
75
|
-
- `portal`
|
|
76
|
-
- `slot`
|
|
77
|
-
- `types`
|
|
78
|
-
- `utils`
|