@usememos/ui 26.10.0 → 26.10.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/LICENSE +21 -0
- package/README.md +67 -92
- package/dist/index.js +3 -48
- package/dist/index.js.map +7 -0
- package/dist/styles.css +1 -0
- package/dist/tokens.css +1 -0
- package/dist/types/components/avatar/index.d.ts +16 -0
- package/dist/types/components/badge/index.d.ts +10 -0
- package/dist/types/components/button/index.d.ts +29 -0
- package/dist/types/components/checkbox/index.d.ts +11 -0
- package/dist/types/components/collapsible/index.d.ts +15 -0
- package/dist/types/components/combobox/index.d.ts +66 -0
- package/dist/types/components/dialog/alert-dialog.d.ts +19 -0
- package/dist/types/components/dialog/index.d.ts +22 -0
- package/dist/types/components/dialog/parts.d.ts +34 -0
- package/dist/types/components/field/fieldset.d.ts +11 -0
- package/dist/types/components/field/index.d.ts +24 -0
- package/dist/types/components/input/index.d.ts +19 -0
- package/dist/types/components/kbd/index.d.ts +5 -0
- package/dist/types/components/link/index.d.ts +11 -0
- package/dist/types/components/menu/index.d.ts +67 -0
- package/dist/types/components/popover/index.d.ts +28 -0
- package/dist/types/components/prose/index.d.ts +11 -0
- package/dist/types/components/radio-group/index.d.ts +15 -0
- package/dist/types/components/select/index.d.ts +46 -0
- package/dist/types/components/separator/index.d.ts +5 -0
- package/dist/types/components/skeleton/index.d.ts +13 -0
- package/dist/types/components/spinner/index.d.ts +10 -0
- package/dist/types/components/switch/index.d.ts +11 -0
- package/dist/types/components/table/index.d.ts +42 -0
- package/dist/types/components/tabs/index.d.ts +22 -0
- package/dist/types/components/textarea/index.d.ts +9 -0
- package/dist/types/components/toast/index.d.ts +19 -0
- package/dist/types/components/toggle/index.d.ts +11 -0
- package/dist/types/components/toggle-group/index.d.ts +13 -0
- package/dist/types/components/tooltip/index.d.ts +24 -0
- package/dist/types/index.d.ts +30 -0
- package/dist/types/internal/class-name.d.ts +7 -0
- package/dist/types/internal/popup.d.ts +9 -0
- package/dist/types/internal/size.d.ts +5 -0
- package/dist/types/types.d.ts +7 -0
- package/llms-full.txt +2181 -0
- package/llms.txt +53 -0
- package/package.json +34 -157
- package/dist/button.cjs +0 -74
- package/dist/button.d.cts +0 -15
- package/dist/button.d.ts +0 -15
- package/dist/button.js +0 -7
- package/dist/checkbox.cjs +0 -98
- package/dist/checkbox.d.cts +0 -16
- package/dist/checkbox.d.ts +0 -16
- package/dist/checkbox.js +0 -7
- package/dist/chunk-3DNMGJFC.js +0 -216
- package/dist/chunk-3VYNJ6UM.js +0 -27
- package/dist/chunk-3YY2G3JK.js +0 -125
- package/dist/chunk-5GQEJQKE.js +0 -60
- package/dist/chunk-6TNEFWVX.js +0 -9
- package/dist/chunk-BH4MPO4N.js +0 -25
- package/dist/chunk-F6GH4X7N.js +0 -34
- package/dist/chunk-HYN2P4OY.js +0 -84
- package/dist/chunk-OIUVLPTE.js +0 -54
- package/dist/chunk-S6LVYCE6.js +0 -157
- package/dist/chunk-SNSDJKJP.js +0 -44
- package/dist/chunk-WPO54YPG.js +0 -328
- package/dist/chunk-Z3ME5VRQ.js +0 -98
- package/dist/control-size-Bz2gyuyO.d.cts +0 -3
- package/dist/control-size-Bz2gyuyO.d.ts +0 -3
- package/dist/dialog.cjs +0 -203
- package/dist/dialog.d.cts +0 -34
- package/dist/dialog.d.ts +0 -34
- package/dist/dialog.js +0 -8
- package/dist/dropdown-menu.cjs +0 -378
- package/dist/dropdown-menu.d.cts +0 -60
- package/dist/dropdown-menu.d.ts +0 -60
- package/dist/dropdown-menu.js +0 -8
- package/dist/index.cjs +0 -1223
- package/dist/index.d.cts +0 -21
- package/dist/index.d.ts +0 -21
- package/dist/input.cjs +0 -67
- package/dist/input.d.cts +0 -11
- package/dist/input.d.ts +0 -11
- package/dist/input.js +0 -7
- package/dist/popover.cjs +0 -175
- package/dist/popover.d.cts +0 -53
- package/dist/popover.d.ts +0 -53
- package/dist/popover.js +0 -8
- package/dist/radio-group.cjs +0 -122
- package/dist/radio-group.d.cts +0 -25
- package/dist/radio-group.d.ts +0 -25
- package/dist/radio-group.js +0 -7
- package/dist/select.cjs +0 -266
- package/dist/select.d.cts +0 -45
- package/dist/select.d.ts +0 -45
- package/dist/select.js +0 -8
- package/dist/separator.cjs +0 -82
- package/dist/separator.d.cts +0 -12
- package/dist/separator.d.ts +0 -12
- package/dist/separator.js +0 -7
- package/dist/switch.cjs +0 -92
- package/dist/switch.d.cts +0 -16
- package/dist/switch.d.ts +0 -16
- package/dist/switch.js +0 -7
- package/dist/theme.css +0 -1097
- package/dist/tooltip.cjs +0 -148
- package/dist/tooltip.d.cts +0 -24
- package/dist/tooltip.d.ts +0 -24
- package/dist/tooltip.js +0 -8
package/llms.txt
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Memos UI (@usememos/ui)
|
|
2
|
+
|
|
3
|
+
> Memos UI is one calm, dense and tactile system for every product we build: memos (the app), the website, the web clipper and whatever comes next. It reads like ink on paper: pure grays, black ink for the one thing that matters, and no brand color competing with what people write. Controls have a little physical depth, so you can tell at a glance what holds a value and what you can press.
|
|
4
|
+
|
|
5
|
+
React components on Base UI, CSS tokens and foundation styles. Load `@usememos/ui/tokens.css`, then `@usememos/ui/styles.css`; set `data-theme` to `light`, `dark` or `contrast` on the root element. Components are compound parts named after Base UI's anatomy (`Menu.Root`, `Menu.Trigger`, `Menu.Popup`, `Menu.Item`); icons are Lucide elements. Every docs page is in llms-full.txt next to this file.
|
|
6
|
+
|
|
7
|
+
## Docs
|
|
8
|
+
|
|
9
|
+
- [Principles and voice](https://github.com/usememos/ui/blob/main/docs/principles.md): The taste in six rules, and how interface text is written
|
|
10
|
+
- [Color](https://github.com/usememos/ui/blob/main/docs/color.md): Color roles, every color token in Light, Dark and High contrast, and how themes are chosen
|
|
11
|
+
- [Depth](https://github.com/usememos/ui/blob/main/docs/depth.md): The tactile model: recessed, key, raised, popup and flat; shadow tokens
|
|
12
|
+
- [Typography](https://github.com/usememos/ui/blob/main/docs/typography.md): The system font, the type scale and text rules
|
|
13
|
+
- [Size, spacing and layout](https://github.com/usememos/ui/blob/main/docs/layout.md): Control sizes, the 4px scale, radius, layout widths, breakpoints and layers
|
|
14
|
+
- [Motion](https://github.com/usememos/ui/blob/main/docs/motion.md): Press, settle and fade timing, and reduced motion
|
|
15
|
+
- [States](https://github.com/usememos/ui/blob/main/docs/states.md): Hover, pressed, loading, disabled, invalid and focus
|
|
16
|
+
- [Icons](https://github.com/usememos/ui/blob/main/docs/icons.md): Lucide, sizes, fixed stroke widths and accessibility
|
|
17
|
+
- [Components](https://github.com/usememos/ui/blob/main/docs/components/README.md): The 28 components, what was left out, and one page per component
|
|
18
|
+
- [Patterns](https://github.com/usememos/ui/blob/main/docs/patterns.md): Page, form, entry, confirmation, loading, empty state and mobile
|
|
19
|
+
- [Building on it](https://github.com/usememos/ui/blob/main/docs/building.md): Base UI, loading the CSS, scoping inside a host page, theme selection and API conventions
|
|
20
|
+
|
|
21
|
+
## Components
|
|
22
|
+
|
|
23
|
+
- [Button](https://github.com/usememos/ui/blob/main/docs/components/button.md): Starts an action.
|
|
24
|
+
- [Toggle](https://github.com/usememos/ui/blob/main/docs/components/toggle.md): Turns one option on or off and stays pressed while on.
|
|
25
|
+
- [ToggleGroup](https://github.com/usememos/ui/blob/main/docs/components/toggle-group.md): A row of related Toggles. With `multiple`: a toolbar of independent on/off toggles. Without: one choice among peers, the same control as Tabs without a panel.
|
|
26
|
+
- [Menu](https://github.com/usememos/ui/blob/main/docs/components/menu.md): Lists actions for one thing, opened from a trigger.
|
|
27
|
+
- [Link](https://github.com/usememos/ui/blob/main/docs/components/link.md): Goes somewhere.
|
|
28
|
+
- [Field and Fieldset](https://github.com/usememos/ui/blob/main/docs/components/field.md): Field gives one control its label, description and error, wired for screen readers. Fieldset groups checkboxes, radios or switches under one legend.
|
|
29
|
+
- [Input](https://github.com/usememos/ui/blob/main/docs/components/input.md): Takes one line of text.
|
|
30
|
+
- [Textarea](https://github.com/usememos/ui/blob/main/docs/components/textarea.md): Takes a few lines of plain text.
|
|
31
|
+
- [Select](https://github.com/usememos/ui/blob/main/docs/components/select.md): Picks one value from a short list.
|
|
32
|
+
- [Combobox](https://github.com/usememos/ui/blob/main/docs/components/combobox.md): Picks one value from a long list by typing to filter it.
|
|
33
|
+
- [Checkbox](https://github.com/usememos/ui/blob/main/docs/components/checkbox.md): Includes or excludes one item, saved with a form.
|
|
34
|
+
- [Switch](https://github.com/usememos/ui/blob/main/docs/components/switch.md): Turns a setting on or off at once.
|
|
35
|
+
- [RadioGroup](https://github.com/usememos/ui/blob/main/docs/components/radio-group.md): Picks exactly one option from a short list that is always visible.
|
|
36
|
+
- [Tabs](https://github.com/usememos/ui/blob/main/docs/components/tabs.md): Switches between sections of the same page.
|
|
37
|
+
- [Collapsible](https://github.com/usememos/ui/blob/main/docs/components/collapsible.md): Hides content behind one trigger until people ask for it.
|
|
38
|
+
- [Dialog](https://github.com/usememos/ui/blob/main/docs/components/dialog.md): Dialog asks for a short form or a decision on top of the page. AlertDialog asks to confirm an action and closes only through its buttons.
|
|
39
|
+
- [Popover](https://github.com/usememos/ui/blob/main/docs/components/popover.md): A small floating panel of controls next to its trigger, such as a share panel or a link editor.
|
|
40
|
+
- [Tooltip](https://github.com/usememos/ui/blob/main/docs/components/tooltip.md): Names an icon-only control and shows its shortcut.
|
|
41
|
+
- [Toast](https://github.com/usememos/ui/blob/main/docs/components/toast.md): Confirms that something happened, or that it failed, without blocking the page.
|
|
42
|
+
- [Avatar](https://github.com/usememos/ui/blob/main/docs/components/avatar.md): Shows a person.
|
|
43
|
+
- [Badge](https://github.com/usememos/ui/blob/main/docs/components/badge.md): Labels a thing with a tag or a status.
|
|
44
|
+
- [Kbd](https://github.com/usememos/ui/blob/main/docs/components/kbd.md): Shows one keyboard key in help text, menus and empty states.
|
|
45
|
+
- [Separator](https://github.com/usememos/ui/blob/main/docs/components/separator.md): A line between groups of content, horizontal or vertical.
|
|
46
|
+
- [Spinner](https://github.com/usememos/ui/blob/main/docs/components/spinner.md): Shows that something short is in progress.
|
|
47
|
+
- [Skeleton](https://github.com/usememos/ui/blob/main/docs/components/skeleton.md): Holds the place of content that is still loading.
|
|
48
|
+
- [Table](https://github.com/usememos/ui/blob/main/docs/components/table.md): Lists things with the same attributes, such as tokens, users or webhooks.
|
|
49
|
+
- [Prose](https://github.com/usememos/ui/blob/main/docs/components/prose.md): Styles rendered Markdown: the body of a note, a comment, a changelog, a page on the website.
|
|
50
|
+
|
|
51
|
+
## Optional
|
|
52
|
+
|
|
53
|
+
- [llms-full.txt](llms-full.txt): every page above in one file
|
package/package.json
CHANGED
|
@@ -1,172 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usememos/ui",
|
|
3
|
-
"version": "26.10.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "26.10.2",
|
|
4
|
+
"description": "The Memos UI design system: tokens, foundation styles and React components for usememos products.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"ui",
|
|
8
|
+
"components",
|
|
9
|
+
"design-system",
|
|
10
|
+
"base-ui"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/usememos/ui.git",
|
|
16
|
+
"directory": "packages/ui"
|
|
17
|
+
},
|
|
5
18
|
"type": "module",
|
|
6
|
-
"main": "./dist/index.cjs",
|
|
7
|
-
"module": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"style": "./dist/theme.css",
|
|
10
19
|
"sideEffects": [
|
|
11
|
-
"
|
|
20
|
+
"*.css"
|
|
12
21
|
],
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"llms.txt",
|
|
25
|
+
"llms-full.txt"
|
|
26
|
+
],
|
|
27
|
+
"types": "./dist/types/index.d.ts",
|
|
13
28
|
"exports": {
|
|
14
29
|
".": {
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
"default": "./dist/index.js"
|
|
18
|
-
},
|
|
19
|
-
"require": {
|
|
20
|
-
"types": "./dist/index.d.cts",
|
|
21
|
-
"default": "./dist/index.cjs"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"./theme.css": "./dist/theme.css",
|
|
25
|
-
"./button": {
|
|
26
|
-
"import": {
|
|
27
|
-
"types": "./dist/button.d.ts",
|
|
28
|
-
"default": "./dist/button.js"
|
|
29
|
-
},
|
|
30
|
-
"require": {
|
|
31
|
-
"types": "./dist/button.d.cts",
|
|
32
|
-
"default": "./dist/button.cjs"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"./checkbox": {
|
|
36
|
-
"import": {
|
|
37
|
-
"types": "./dist/checkbox.d.ts",
|
|
38
|
-
"default": "./dist/checkbox.js"
|
|
39
|
-
},
|
|
40
|
-
"require": {
|
|
41
|
-
"types": "./dist/checkbox.d.cts",
|
|
42
|
-
"default": "./dist/checkbox.cjs"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"./input": {
|
|
46
|
-
"import": {
|
|
47
|
-
"types": "./dist/input.d.ts",
|
|
48
|
-
"default": "./dist/input.js"
|
|
49
|
-
},
|
|
50
|
-
"require": {
|
|
51
|
-
"types": "./dist/input.d.cts",
|
|
52
|
-
"default": "./dist/input.cjs"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"./dialog": {
|
|
56
|
-
"import": {
|
|
57
|
-
"types": "./dist/dialog.d.ts",
|
|
58
|
-
"default": "./dist/dialog.js"
|
|
59
|
-
},
|
|
60
|
-
"require": {
|
|
61
|
-
"types": "./dist/dialog.d.cts",
|
|
62
|
-
"default": "./dist/dialog.cjs"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"./dropdown-menu": {
|
|
66
|
-
"import": {
|
|
67
|
-
"types": "./dist/dropdown-menu.d.ts",
|
|
68
|
-
"default": "./dist/dropdown-menu.js"
|
|
69
|
-
},
|
|
70
|
-
"require": {
|
|
71
|
-
"types": "./dist/dropdown-menu.d.cts",
|
|
72
|
-
"default": "./dist/dropdown-menu.cjs"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"./popover": {
|
|
76
|
-
"import": {
|
|
77
|
-
"types": "./dist/popover.d.ts",
|
|
78
|
-
"default": "./dist/popover.js"
|
|
79
|
-
},
|
|
80
|
-
"require": {
|
|
81
|
-
"types": "./dist/popover.d.cts",
|
|
82
|
-
"default": "./dist/popover.cjs"
|
|
83
|
-
}
|
|
30
|
+
"types": "./dist/types/index.d.ts",
|
|
31
|
+
"default": "./dist/index.js"
|
|
84
32
|
},
|
|
85
|
-
"./
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"default": "./dist/radio-group.js"
|
|
89
|
-
},
|
|
90
|
-
"require": {
|
|
91
|
-
"types": "./dist/radio-group.d.cts",
|
|
92
|
-
"default": "./dist/radio-group.cjs"
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
"./select": {
|
|
96
|
-
"import": {
|
|
97
|
-
"types": "./dist/select.d.ts",
|
|
98
|
-
"default": "./dist/select.js"
|
|
99
|
-
},
|
|
100
|
-
"require": {
|
|
101
|
-
"types": "./dist/select.d.cts",
|
|
102
|
-
"default": "./dist/select.cjs"
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"./separator": {
|
|
106
|
-
"import": {
|
|
107
|
-
"types": "./dist/separator.d.ts",
|
|
108
|
-
"default": "./dist/separator.js"
|
|
109
|
-
},
|
|
110
|
-
"require": {
|
|
111
|
-
"types": "./dist/separator.d.cts",
|
|
112
|
-
"default": "./dist/separator.cjs"
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
"./switch": {
|
|
116
|
-
"import": {
|
|
117
|
-
"types": "./dist/switch.d.ts",
|
|
118
|
-
"default": "./dist/switch.js"
|
|
119
|
-
},
|
|
120
|
-
"require": {
|
|
121
|
-
"types": "./dist/switch.d.cts",
|
|
122
|
-
"default": "./dist/switch.cjs"
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
"./tooltip": {
|
|
126
|
-
"import": {
|
|
127
|
-
"types": "./dist/tooltip.d.ts",
|
|
128
|
-
"default": "./dist/tooltip.js"
|
|
129
|
-
},
|
|
130
|
-
"require": {
|
|
131
|
-
"types": "./dist/tooltip.d.cts",
|
|
132
|
-
"default": "./dist/tooltip.cjs"
|
|
133
|
-
}
|
|
134
|
-
}
|
|
33
|
+
"./tokens.css": "./dist/tokens.css",
|
|
34
|
+
"./styles.css": "./dist/styles.css",
|
|
35
|
+
"./package.json": "./package.json"
|
|
135
36
|
},
|
|
136
|
-
"files": [
|
|
137
|
-
"dist"
|
|
138
|
-
],
|
|
139
37
|
"scripts": {
|
|
140
|
-
"build": "
|
|
141
|
-
"
|
|
142
|
-
"check:package": "pnpm exec publint . && pnpm exec attw --pack --profile node16 --exclude-entrypoints ./theme.css ."
|
|
38
|
+
"build": "node scripts/build.mjs",
|
|
39
|
+
"prepack": "npm run build"
|
|
143
40
|
},
|
|
144
41
|
"peerDependencies": {
|
|
145
|
-
"react": "
|
|
146
|
-
"react
|
|
42
|
+
"lucide-react": ">=1.0.0",
|
|
43
|
+
"react": ">=18",
|
|
44
|
+
"react-dom": ">=18"
|
|
147
45
|
},
|
|
148
46
|
"dependencies": {
|
|
149
|
-
"@base-ui/react": "
|
|
150
|
-
|
|
151
|
-
"lucide-react": "^0.523.0"
|
|
152
|
-
},
|
|
153
|
-
"devDependencies": {
|
|
154
|
-
"@types/react": "^18.2.43",
|
|
155
|
-
"@types/react-dom": "^18.2.17",
|
|
156
|
-
"tsup": "^8.3.5",
|
|
157
|
-
"typescript": "^6.0.2"
|
|
158
|
-
},
|
|
159
|
-
"keywords": [
|
|
160
|
-
"react",
|
|
161
|
-
"ui",
|
|
162
|
-
"components",
|
|
163
|
-
"design-system",
|
|
164
|
-
"theme"
|
|
165
|
-
],
|
|
166
|
-
"repository": "https://github.com/usememos/ui",
|
|
167
|
-
"homepage": "https://github.com/usememos/ui",
|
|
168
|
-
"bugs": {
|
|
169
|
-
"url": "https://github.com/usememos/ui/issues"
|
|
170
|
-
},
|
|
171
|
-
"license": "MIT"
|
|
47
|
+
"@base-ui/react": "1.9.0"
|
|
48
|
+
}
|
|
172
49
|
}
|
package/dist/button.cjs
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/button.ts
|
|
31
|
-
var button_exports = {};
|
|
32
|
-
__export(button_exports, {
|
|
33
|
-
Button: () => Button
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(button_exports);
|
|
36
|
-
|
|
37
|
-
// src/foundation/button.tsx
|
|
38
|
-
var React = __toESM(require("react"), 1);
|
|
39
|
-
|
|
40
|
-
// src/shared/cx.ts
|
|
41
|
-
var import_clsx = require("clsx");
|
|
42
|
-
function cx(...values) {
|
|
43
|
-
return (0, import_clsx.clsx)(values);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// src/foundation/button.tsx
|
|
47
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
48
|
-
var Button = React.forwardRef(
|
|
49
|
-
({
|
|
50
|
-
className,
|
|
51
|
-
variant = "default",
|
|
52
|
-
size = "md",
|
|
53
|
-
disabled,
|
|
54
|
-
...props
|
|
55
|
-
}, ref) => {
|
|
56
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
|
-
"button",
|
|
58
|
-
{
|
|
59
|
-
ref,
|
|
60
|
-
className: cx("mui-button", className),
|
|
61
|
-
"data-size": size,
|
|
62
|
-
"data-variant": variant,
|
|
63
|
-
"data-disabled": disabled ? "" : void 0,
|
|
64
|
-
disabled,
|
|
65
|
-
...props
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
Button.displayName = "Button";
|
|
71
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
72
|
-
0 && (module.exports = {
|
|
73
|
-
Button
|
|
74
|
-
});
|
package/dist/button.d.cts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { C as ControlSize } from './control-size-Bz2gyuyO.cjs';
|
|
3
|
-
|
|
4
|
-
type ButtonVariant = "default" | "secondary" | "outline" | "ghost" | "destructive" | "link";
|
|
5
|
-
type ButtonSize = ControlSize | "icon";
|
|
6
|
-
type ButtonProps = React.ComponentPropsWithoutRef<"button"> & {
|
|
7
|
-
variant?: ButtonVariant;
|
|
8
|
-
size?: ButtonSize;
|
|
9
|
-
};
|
|
10
|
-
declare const Button: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
11
|
-
variant?: ButtonVariant;
|
|
12
|
-
size?: ButtonSize;
|
|
13
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
-
|
|
15
|
-
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant };
|
package/dist/button.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { C as ControlSize } from './control-size-Bz2gyuyO.js';
|
|
3
|
-
|
|
4
|
-
type ButtonVariant = "default" | "secondary" | "outline" | "ghost" | "destructive" | "link";
|
|
5
|
-
type ButtonSize = ControlSize | "icon";
|
|
6
|
-
type ButtonProps = React.ComponentPropsWithoutRef<"button"> & {
|
|
7
|
-
variant?: ButtonVariant;
|
|
8
|
-
size?: ButtonSize;
|
|
9
|
-
};
|
|
10
|
-
declare const Button: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
11
|
-
variant?: ButtonVariant;
|
|
12
|
-
size?: ButtonSize;
|
|
13
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
-
|
|
15
|
-
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant };
|
package/dist/button.js
DELETED
package/dist/checkbox.cjs
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/checkbox.ts
|
|
31
|
-
var checkbox_exports = {};
|
|
32
|
-
__export(checkbox_exports, {
|
|
33
|
-
Checkbox: () => Checkbox2
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(checkbox_exports);
|
|
36
|
-
|
|
37
|
-
// src/foundation/checkbox.tsx
|
|
38
|
-
var import_lucide_react = require("lucide-react");
|
|
39
|
-
|
|
40
|
-
// ../primitives/src/foundation/checkbox.tsx
|
|
41
|
-
var import_checkbox = require("@base-ui/react/checkbox");
|
|
42
|
-
var React = __toESM(require("react"), 1);
|
|
43
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
-
var Root = React.forwardRef((props, ref) => {
|
|
45
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
-
import_checkbox.Checkbox.Root,
|
|
47
|
-
{
|
|
48
|
-
ref,
|
|
49
|
-
"data-scope": "checkbox",
|
|
50
|
-
"data-part": "root",
|
|
51
|
-
...props
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
});
|
|
55
|
-
var Indicator = React.forwardRef((props, ref) => {
|
|
56
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
|
-
import_checkbox.Checkbox.Indicator,
|
|
58
|
-
{
|
|
59
|
-
ref,
|
|
60
|
-
"data-scope": "checkbox",
|
|
61
|
-
"data-part": "indicator",
|
|
62
|
-
...props
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
});
|
|
66
|
-
Root.displayName = "Checkbox.Root";
|
|
67
|
-
Indicator.displayName = "Checkbox.Indicator";
|
|
68
|
-
var Checkbox = {
|
|
69
|
-
Root,
|
|
70
|
-
Indicator
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
// src/shared/cx.ts
|
|
74
|
-
var import_clsx = require("clsx");
|
|
75
|
-
function cx(...values) {
|
|
76
|
-
return (0, import_clsx.clsx)(values);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// src/foundation/checkbox.tsx
|
|
80
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
81
|
-
function Checkbox2({ className, children, size = "md", ...props }) {
|
|
82
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
83
|
-
Checkbox.Root,
|
|
84
|
-
{
|
|
85
|
-
className: cx("mui-checkbox", className),
|
|
86
|
-
"data-size": size,
|
|
87
|
-
...props,
|
|
88
|
-
children: [
|
|
89
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Checkbox.Indicator, { className: "mui-checkbox__indicator", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.CheckIcon, { size: 10, strokeWidth: 3 }) }),
|
|
90
|
-
children
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
96
|
-
0 && (module.exports = {
|
|
97
|
-
Checkbox
|
|
98
|
-
});
|
package/dist/checkbox.d.cts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import * as _base_ui_react from '@base-ui/react';
|
|
4
|
-
import { C as ControlSize } from './control-size-Bz2gyuyO.cjs';
|
|
5
|
-
|
|
6
|
-
declare const Checkbox$1: {
|
|
7
|
-
Root: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.CheckboxRootProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
8
|
-
Indicator: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.CheckboxIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
type CheckboxProps = React.ComponentPropsWithoutRef<typeof Checkbox$1.Root> & {
|
|
12
|
-
size?: ControlSize;
|
|
13
|
-
};
|
|
14
|
-
declare function Checkbox({ className, children, size, ...props }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
15
|
-
|
|
16
|
-
export { Checkbox, type CheckboxProps };
|
package/dist/checkbox.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import * as _base_ui_react from '@base-ui/react';
|
|
4
|
-
import { C as ControlSize } from './control-size-Bz2gyuyO.js';
|
|
5
|
-
|
|
6
|
-
declare const Checkbox$1: {
|
|
7
|
-
Root: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.CheckboxRootProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
8
|
-
Indicator: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.CheckboxIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
type CheckboxProps = React.ComponentPropsWithoutRef<typeof Checkbox$1.Root> & {
|
|
12
|
-
size?: ControlSize;
|
|
13
|
-
};
|
|
14
|
-
declare function Checkbox({ className, children, size, ...props }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
15
|
-
|
|
16
|
-
export { Checkbox, type CheckboxProps };
|