@brand-map/primitives 0.0.0-broken.0
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/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/.oxfmtrc.json +35 -0
- package/.oxlintrc.json +166 -0
- package/README.md +78 -0
- package/bun.lock +904 -0
- package/mise.toml +3 -0
- package/package.json +61 -0
- package/src/accordion/accordion.tsx +189 -0
- package/src/accordion/accordion.web.tsx +282 -0
- package/src/accordion/index.ts +2 -0
- package/src/accordion/types.ts +44 -0
- package/src/alert-dialog/alert-dialog.tsx +238 -0
- package/src/alert-dialog/alert-dialog.web.tsx +260 -0
- package/src/alert-dialog/index.ts +2 -0
- package/src/alert-dialog/types.ts +81 -0
- package/src/aspect-ratio/aspect-ratio.tsx +27 -0
- package/src/aspect-ratio/index.ts +1 -0
- package/src/avatar/avatar.tsx +122 -0
- package/src/avatar/index.ts +2 -0
- package/src/avatar/types.ts +20 -0
- package/src/checkbox/checkbox.tsx +95 -0
- package/src/checkbox/checkbox.web.tsx +111 -0
- package/src/checkbox/index.ts +2 -0
- package/src/checkbox/types.ts +14 -0
- package/src/collapsible/collapsible.tsx +98 -0
- package/src/collapsible/collapsible.web.tsx +149 -0
- package/src/collapsible/index.ts +2 -0
- package/src/collapsible/types.ts +23 -0
- package/src/context-menu/context-menu.tsx +616 -0
- package/src/context-menu/context-menu.web.tsx +560 -0
- package/src/context-menu/index.ts +2 -0
- package/src/context-menu/types.ts +136 -0
- package/src/dialog/dialog.tsx +286 -0
- package/src/dialog/dialog.web.tsx +215 -0
- package/src/dialog/index.ts +2 -0
- package/src/dialog/types.ts +92 -0
- package/src/dropdown-menu/dropdown-menu.tsx +575 -0
- package/src/dropdown-menu/dropdown-menu.web.tsx +565 -0
- package/src/dropdown-menu/index.ts +2 -0
- package/src/dropdown-menu/types.ts +121 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/use-Isomorphic-layout-effect.tsx +12 -0
- package/src/hooks/use-augmented-ref.tsx +25 -0
- package/src/hooks/use-controllable-state.tsx +70 -0
- package/src/hooks/use-relative-position.tsx +175 -0
- package/src/hover-card/hover-card.tsx +255 -0
- package/src/hover-card/hover-card.web.tsx +161 -0
- package/src/hover-card/index.ts +2 -0
- package/src/hover-card/types.ts +56 -0
- package/src/label/index.ts +2 -0
- package/src/label/label.tsx +36 -0
- package/src/label/label.web.tsx +38 -0
- package/src/label/types.ts +24 -0
- package/src/menubar/index.ts +2 -0
- package/src/menubar/menubar.tsx +602 -0
- package/src/menubar/menubar.web.tsx +575 -0
- package/src/menubar/types.ts +126 -0
- package/src/navigation-menu/index.ts +2 -0
- package/src/navigation-menu/navigation-menu.tsx +302 -0
- package/src/navigation-menu/navigation-menu.web.tsx +259 -0
- package/src/navigation-menu/types.ts +85 -0
- package/src/popover/index.ts +2 -0
- package/src/popover/popover.tsx +279 -0
- package/src/popover/popover.web.tsx +217 -0
- package/src/popover/types.ts +44 -0
- package/src/portal/index.ts +1 -0
- package/src/portal/portal.tsx +56 -0
- package/src/progress/index.ts +2 -0
- package/src/progress/progress.tsx +59 -0
- package/src/progress/progress.web.tsx +46 -0
- package/src/progress/types.ts +14 -0
- package/src/radio-group/index.ts +2 -0
- package/src/radio-group/radio-group.tsx +106 -0
- package/src/radio-group/radio-group.web.tsx +85 -0
- package/src/radio-group/types.ts +24 -0
- package/src/select/index.ts +2 -0
- package/src/select/select.tsx +447 -0
- package/src/select/select.web.tsx +368 -0
- package/src/select/types.ts +145 -0
- package/src/separator/index.ts +2 -0
- package/src/separator/separator.tsx +21 -0
- package/src/separator/types.ts +10 -0
- package/src/slider/index.ts +2 -0
- package/src/slider/slider.tsx +77 -0
- package/src/slider/slider.web.tsx +75 -0
- package/src/slider/types.ts +39 -0
- package/src/slot/index.ts +1 -0
- package/src/slot/slot.tsx +224 -0
- package/src/switch/index.ts +2 -0
- package/src/switch/switch.tsx +49 -0
- package/src/switch/switch.web.tsx +60 -0
- package/src/switch/types.ts +19 -0
- package/src/table/index.ts +1 -0
- package/src/table/table.tsx +121 -0
- package/src/tabs/index.ts +2 -0
- package/src/tabs/tabs.tsx +120 -0
- package/src/tabs/tabs.web.tsx +106 -0
- package/src/tabs/types.ts +37 -0
- package/src/toast/index.ts +2 -0
- package/src/toast/toast.tsx +124 -0
- package/src/toast/types.ts +20 -0
- package/src/toggle/index.ts +2 -0
- package/src/toggle/toggle.tsx +35 -0
- package/src/toggle/toggle.web.tsx +36 -0
- package/src/toggle/types.ts +11 -0
- package/src/toggle-group/index.ts +2 -0
- package/src/toggle-group/toggle-group.tsx +100 -0
- package/src/toggle-group/toggle-group.web.tsx +103 -0
- package/src/toggle-group/types.ts +46 -0
- package/src/toolbar/index.ts +2 -0
- package/src/toolbar/toolbar.tsx +141 -0
- package/src/toolbar/toolbar.web.tsx +158 -0
- package/src/toolbar/types.ts +64 -0
- package/src/tooltip/index.ts +2 -0
- package/src/tooltip/tooltip.tsx +261 -0
- package/src/tooltip/tooltip.web.tsx +175 -0
- package/src/tooltip/types.ts +61 -0
- package/src/types/index.ts +141 -0
- package/src/utils/index.ts +69 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,8 @@
|
|
|
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)
|
|
@@ -0,0 +1,11 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
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`
|