@douglasneuroinformatics/libui 1.0.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/LICENSE ADDED
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ <!-- PROJECT LOGO -->
2
+ <div align="center">
3
+ <a href="https://github.com/DouglasNeuroInformatics/libui">
4
+ <img src="https://raw.githubusercontent.com/DouglasNeuroInformatics/libui/main/src/assets/libui-logo.svg" alt="Logo" width="100" >
5
+ </a>
6
+ <h3 align="center">@douglasneuroinformatics/libui</h3>
7
+ <p align="center">
8
+ Generic UI components for DNP projects, built using React and TailwindCSS
9
+ <br />
10
+ <a href="https://douglasneuroinformatics.github.io/libui">
11
+ <strong>Explore the docs »
12
+ </strong>
13
+ </a>
14
+ <br />
15
+ <br />
16
+ <a href="https://github.com/DouglasNeuroInformatics/libui/issues" rel="noreferrer" target="_blank">Report Bug</a>
17
+ ·
18
+ <a href="https://github.com/DouglasNeuroInformatics/libui/issues" rel="noreferrer" target="_blank">Request Feature</a>
19
+ </p>
20
+ </div>
21
+
22
+ <!-- PROJECT SHIELDS -->
23
+ <div align="center">
24
+
25
+ ![license](https://img.shields.io/github/license/DouglasNeuroInformatics/libui)
26
+ ![version](https://img.shields.io/github/package-json/v/DouglasNeuroInformatics/libui)
27
+
28
+ </div>
29
+ <hr />
30
+
31
+ ## About
32
+
33
+ A React component library built by the Douglas Neuroinformatics Platform (DNP) using [shadcn/ui](https://github.com/shadcn-ui/ui) with [React](https://react.dev/) and [TailwindCSS](https://tailwindcss.com/). Although primarily intended for internal use in our platforms, it is
34
+ designed as a generic implementation.
35
+
36
+ ## Installation
37
+
38
+ ```sh
39
+ pnpm install @douglasneuroinformatics/libui
40
+ ```
41
+
42
+ ## Contributing
43
+
44
+ We welcome contributions! If you're interested in improving the library or adding new features, please refer to our contribution guide.
45
+
46
+ ## License
47
+
48
+ Copyright (C) 2024 Douglas Neuroinformatics Platform
49
+
50
+ This program is free software: you can redistribute it and/or modify
51
+ it under the terms of the GNU Lesser General Public License as published by
52
+ the Free Software Foundation, either version 3 of the License, or
53
+ (at your option) any later version.
@@ -0,0 +1,11 @@
1
+ // src/utils.ts
2
+ import { clsx } from "clsx";
3
+ import { twMerge } from "tailwind-merge";
4
+ function cn(...inputs) {
5
+ return twMerge(clsx(inputs));
6
+ }
7
+
8
+ export {
9
+ cn
10
+ };
11
+ //# sourceMappingURL=chunk-57KC6SAE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";AAAA,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;","names":[]}
@@ -0,0 +1,311 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import React__default from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+ import { Simplify } from 'type-fest';
6
+ import * as LabelPrimitive from '@radix-ui/react-label';
7
+
8
+ declare const BUTTON_ICON_SIZE: {
9
+ lg: number;
10
+ md: number;
11
+ sm: number;
12
+ };
13
+ declare const buttonVariants: (props?: ({
14
+ size?: "md" | "icon" | "lg" | "sm" | null | undefined;
15
+ variant?: "primary" | "danger" | "ghost" | "link" | "outline" | "secondary" | null | undefined;
16
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
17
+ type ButtonProps = Simplify<React__default.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonVariants> & {
18
+ asChild?: boolean;
19
+ /** @deprecated - use children */
20
+ label?: string;
21
+ }>;
22
+ declare const Button: React__default.ForwardRefExoticComponent<{
23
+ disabled?: boolean | undefined;
24
+ form?: string | undefined;
25
+ formAction?: string | undefined;
26
+ formEncType?: string | undefined;
27
+ formMethod?: string | undefined;
28
+ formNoValidate?: boolean | undefined;
29
+ formTarget?: string | undefined;
30
+ name?: string | undefined;
31
+ type?: "button" | "submit" | "reset" | undefined;
32
+ value?: string | number | readonly string[] | undefined;
33
+ defaultChecked?: boolean | undefined;
34
+ defaultValue?: string | number | readonly string[] | undefined;
35
+ suppressContentEditableWarning?: boolean | undefined;
36
+ suppressHydrationWarning?: boolean | undefined;
37
+ accessKey?: string | undefined;
38
+ autoFocus?: boolean | undefined;
39
+ className?: string | undefined;
40
+ contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
41
+ contextMenu?: string | undefined;
42
+ dir?: string | undefined;
43
+ draggable?: (boolean | "true" | "false") | undefined;
44
+ hidden?: boolean | undefined;
45
+ id?: string | undefined;
46
+ lang?: string | undefined;
47
+ nonce?: string | undefined;
48
+ slot?: string | undefined;
49
+ spellCheck?: (boolean | "true" | "false") | undefined;
50
+ style?: React__default.CSSProperties | undefined;
51
+ tabIndex?: number | undefined;
52
+ title?: string | undefined;
53
+ translate?: "yes" | "no" | undefined;
54
+ radioGroup?: string | undefined;
55
+ role?: React__default.AriaRole | undefined;
56
+ about?: string | undefined;
57
+ content?: string | undefined;
58
+ datatype?: string | undefined;
59
+ inlist?: any;
60
+ prefix?: string | undefined;
61
+ property?: string | undefined;
62
+ rel?: string | undefined;
63
+ resource?: string | undefined;
64
+ rev?: string | undefined;
65
+ typeof?: string | undefined;
66
+ vocab?: string | undefined;
67
+ autoCapitalize?: string | undefined;
68
+ autoCorrect?: string | undefined;
69
+ autoSave?: string | undefined;
70
+ color?: string | undefined;
71
+ itemProp?: string | undefined;
72
+ itemScope?: boolean | undefined;
73
+ itemType?: string | undefined;
74
+ itemID?: string | undefined;
75
+ itemRef?: string | undefined;
76
+ results?: number | undefined;
77
+ security?: string | undefined;
78
+ unselectable?: "on" | "off" | undefined;
79
+ inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
80
+ is?: string | undefined;
81
+ "aria-activedescendant"?: string | undefined;
82
+ "aria-atomic"?: (boolean | "true" | "false") | undefined;
83
+ "aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
84
+ "aria-braillelabel"?: string | undefined;
85
+ "aria-brailleroledescription"?: string | undefined;
86
+ "aria-busy"?: (boolean | "true" | "false") | undefined;
87
+ "aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
88
+ "aria-colcount"?: number | undefined;
89
+ "aria-colindex"?: number | undefined;
90
+ "aria-colindextext"?: string | undefined;
91
+ "aria-colspan"?: number | undefined;
92
+ "aria-controls"?: string | undefined;
93
+ "aria-current"?: boolean | "true" | "false" | "page" | "step" | "location" | "date" | "time" | undefined;
94
+ "aria-describedby"?: string | undefined;
95
+ "aria-description"?: string | undefined;
96
+ "aria-details"?: string | undefined;
97
+ "aria-disabled"?: (boolean | "true" | "false") | undefined;
98
+ "aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
99
+ "aria-errormessage"?: string | undefined;
100
+ "aria-expanded"?: (boolean | "true" | "false") | undefined;
101
+ "aria-flowto"?: string | undefined;
102
+ "aria-grabbed"?: (boolean | "true" | "false") | undefined;
103
+ "aria-haspopup"?: boolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree" | undefined;
104
+ "aria-hidden"?: (boolean | "true" | "false") | undefined;
105
+ "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
106
+ "aria-keyshortcuts"?: string | undefined;
107
+ "aria-label"?: string | undefined;
108
+ "aria-labelledby"?: string | undefined;
109
+ "aria-level"?: number | undefined;
110
+ "aria-live"?: "off" | "assertive" | "polite" | undefined;
111
+ "aria-modal"?: (boolean | "true" | "false") | undefined;
112
+ "aria-multiline"?: (boolean | "true" | "false") | undefined;
113
+ "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
114
+ "aria-orientation"?: "horizontal" | "vertical" | undefined;
115
+ "aria-owns"?: string | undefined;
116
+ "aria-placeholder"?: string | undefined;
117
+ "aria-posinset"?: number | undefined;
118
+ "aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
119
+ "aria-readonly"?: (boolean | "true" | "false") | undefined;
120
+ "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
121
+ "aria-required"?: (boolean | "true" | "false") | undefined;
122
+ "aria-roledescription"?: string | undefined;
123
+ "aria-rowcount"?: number | undefined;
124
+ "aria-rowindex"?: number | undefined;
125
+ "aria-rowindextext"?: string | undefined;
126
+ "aria-rowspan"?: number | undefined;
127
+ "aria-selected"?: (boolean | "true" | "false") | undefined;
128
+ "aria-setsize"?: number | undefined;
129
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
130
+ "aria-valuemax"?: number | undefined;
131
+ "aria-valuemin"?: number | undefined;
132
+ "aria-valuenow"?: number | undefined;
133
+ "aria-valuetext"?: string | undefined;
134
+ children?: React__default.ReactNode;
135
+ dangerouslySetInnerHTML?: {
136
+ __html: string | TrustedHTML;
137
+ } | undefined;
138
+ onCopy?: React__default.ClipboardEventHandler<HTMLButtonElement> | undefined;
139
+ onCopyCapture?: React__default.ClipboardEventHandler<HTMLButtonElement> | undefined;
140
+ onCut?: React__default.ClipboardEventHandler<HTMLButtonElement> | undefined;
141
+ onCutCapture?: React__default.ClipboardEventHandler<HTMLButtonElement> | undefined;
142
+ onPaste?: React__default.ClipboardEventHandler<HTMLButtonElement> | undefined;
143
+ onPasteCapture?: React__default.ClipboardEventHandler<HTMLButtonElement> | undefined;
144
+ onCompositionEnd?: React__default.CompositionEventHandler<HTMLButtonElement> | undefined;
145
+ onCompositionEndCapture?: React__default.CompositionEventHandler<HTMLButtonElement> | undefined;
146
+ onCompositionStart?: React__default.CompositionEventHandler<HTMLButtonElement> | undefined;
147
+ onCompositionStartCapture?: React__default.CompositionEventHandler<HTMLButtonElement> | undefined;
148
+ onCompositionUpdate?: React__default.CompositionEventHandler<HTMLButtonElement> | undefined;
149
+ onCompositionUpdateCapture?: React__default.CompositionEventHandler<HTMLButtonElement> | undefined;
150
+ onFocus?: React__default.FocusEventHandler<HTMLButtonElement> | undefined;
151
+ onFocusCapture?: React__default.FocusEventHandler<HTMLButtonElement> | undefined;
152
+ onBlur?: React__default.FocusEventHandler<HTMLButtonElement> | undefined;
153
+ onBlurCapture?: React__default.FocusEventHandler<HTMLButtonElement> | undefined;
154
+ onChange?: React__default.FormEventHandler<HTMLButtonElement> | undefined;
155
+ onChangeCapture?: React__default.FormEventHandler<HTMLButtonElement> | undefined;
156
+ onBeforeInput?: React__default.FormEventHandler<HTMLButtonElement> | undefined;
157
+ onBeforeInputCapture?: React__default.FormEventHandler<HTMLButtonElement> | undefined;
158
+ onInput?: React__default.FormEventHandler<HTMLButtonElement> | undefined;
159
+ onInputCapture?: React__default.FormEventHandler<HTMLButtonElement> | undefined;
160
+ onReset?: React__default.FormEventHandler<HTMLButtonElement> | undefined;
161
+ onResetCapture?: React__default.FormEventHandler<HTMLButtonElement> | undefined;
162
+ onSubmit?: React__default.FormEventHandler<HTMLButtonElement> | undefined;
163
+ onSubmitCapture?: React__default.FormEventHandler<HTMLButtonElement> | undefined;
164
+ onInvalid?: React__default.FormEventHandler<HTMLButtonElement> | undefined;
165
+ onInvalidCapture?: React__default.FormEventHandler<HTMLButtonElement> | undefined;
166
+ onLoad?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
167
+ onLoadCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
168
+ onError?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
169
+ onErrorCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
170
+ onKeyDown?: React__default.KeyboardEventHandler<HTMLButtonElement> | undefined;
171
+ onKeyDownCapture?: React__default.KeyboardEventHandler<HTMLButtonElement> | undefined;
172
+ onKeyPress?: React__default.KeyboardEventHandler<HTMLButtonElement> | undefined;
173
+ onKeyPressCapture?: React__default.KeyboardEventHandler<HTMLButtonElement> | undefined;
174
+ onKeyUp?: React__default.KeyboardEventHandler<HTMLButtonElement> | undefined;
175
+ onKeyUpCapture?: React__default.KeyboardEventHandler<HTMLButtonElement> | undefined;
176
+ onAbort?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
177
+ onAbortCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
178
+ onCanPlay?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
179
+ onCanPlayCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
180
+ onCanPlayThrough?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
181
+ onCanPlayThroughCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
182
+ onDurationChange?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
183
+ onDurationChangeCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
184
+ onEmptied?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
185
+ onEmptiedCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
186
+ onEncrypted?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
187
+ onEncryptedCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
188
+ onEnded?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
189
+ onEndedCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
190
+ onLoadedData?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
191
+ onLoadedDataCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
192
+ onLoadedMetadata?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
193
+ onLoadedMetadataCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
194
+ onLoadStart?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
195
+ onLoadStartCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
196
+ onPause?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
197
+ onPauseCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
198
+ onPlay?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
199
+ onPlayCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
200
+ onPlaying?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
201
+ onPlayingCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
202
+ onProgress?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
203
+ onProgressCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
204
+ onRateChange?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
205
+ onRateChangeCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
206
+ onResize?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
207
+ onResizeCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
208
+ onSeeked?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
209
+ onSeekedCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
210
+ onSeeking?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
211
+ onSeekingCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
212
+ onStalled?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
213
+ onStalledCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
214
+ onSuspend?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
215
+ onSuspendCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
216
+ onTimeUpdate?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
217
+ onTimeUpdateCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
218
+ onVolumeChange?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
219
+ onVolumeChangeCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
220
+ onWaiting?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
221
+ onWaitingCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
222
+ onAuxClick?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
223
+ onAuxClickCapture?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
224
+ onClick?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
225
+ onClickCapture?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
226
+ onContextMenu?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
227
+ onContextMenuCapture?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
228
+ onDoubleClick?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
229
+ onDoubleClickCapture?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
230
+ onDrag?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
231
+ onDragCapture?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
232
+ onDragEnd?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
233
+ onDragEndCapture?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
234
+ onDragEnter?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
235
+ onDragEnterCapture?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
236
+ onDragExit?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
237
+ onDragExitCapture?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
238
+ onDragLeave?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
239
+ onDragLeaveCapture?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
240
+ onDragOver?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
241
+ onDragOverCapture?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
242
+ onDragStart?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
243
+ onDragStartCapture?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
244
+ onDrop?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
245
+ onDropCapture?: React__default.DragEventHandler<HTMLButtonElement> | undefined;
246
+ onMouseDown?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
247
+ onMouseDownCapture?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
248
+ onMouseEnter?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
249
+ onMouseLeave?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
250
+ onMouseMove?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
251
+ onMouseMoveCapture?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
252
+ onMouseOut?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
253
+ onMouseOutCapture?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
254
+ onMouseOver?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
255
+ onMouseOverCapture?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
256
+ onMouseUp?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
257
+ onMouseUpCapture?: React__default.MouseEventHandler<HTMLButtonElement> | undefined;
258
+ onSelect?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
259
+ onSelectCapture?: React__default.ReactEventHandler<HTMLButtonElement> | undefined;
260
+ onTouchCancel?: React__default.TouchEventHandler<HTMLButtonElement> | undefined;
261
+ onTouchCancelCapture?: React__default.TouchEventHandler<HTMLButtonElement> | undefined;
262
+ onTouchEnd?: React__default.TouchEventHandler<HTMLButtonElement> | undefined;
263
+ onTouchEndCapture?: React__default.TouchEventHandler<HTMLButtonElement> | undefined;
264
+ onTouchMove?: React__default.TouchEventHandler<HTMLButtonElement> | undefined;
265
+ onTouchMoveCapture?: React__default.TouchEventHandler<HTMLButtonElement> | undefined;
266
+ onTouchStart?: React__default.TouchEventHandler<HTMLButtonElement> | undefined;
267
+ onTouchStartCapture?: React__default.TouchEventHandler<HTMLButtonElement> | undefined;
268
+ onPointerDown?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
269
+ onPointerDownCapture?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
270
+ onPointerMove?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
271
+ onPointerMoveCapture?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
272
+ onPointerUp?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
273
+ onPointerUpCapture?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
274
+ onPointerCancel?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
275
+ onPointerCancelCapture?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
276
+ onPointerEnter?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
277
+ onPointerEnterCapture?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
278
+ onPointerLeave?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
279
+ onPointerLeaveCapture?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
280
+ onPointerOver?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
281
+ onPointerOverCapture?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
282
+ onPointerOut?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
283
+ onPointerOutCapture?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
284
+ onGotPointerCapture?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
285
+ onGotPointerCaptureCapture?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
286
+ onLostPointerCapture?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
287
+ onLostPointerCaptureCapture?: React__default.PointerEventHandler<HTMLButtonElement> | undefined;
288
+ onScroll?: React__default.UIEventHandler<HTMLButtonElement> | undefined;
289
+ onScrollCapture?: React__default.UIEventHandler<HTMLButtonElement> | undefined;
290
+ onWheel?: React__default.WheelEventHandler<HTMLButtonElement> | undefined;
291
+ onWheelCapture?: React__default.WheelEventHandler<HTMLButtonElement> | undefined;
292
+ onAnimationStart?: React__default.AnimationEventHandler<HTMLButtonElement> | undefined;
293
+ onAnimationStartCapture?: React__default.AnimationEventHandler<HTMLButtonElement> | undefined;
294
+ onAnimationEnd?: React__default.AnimationEventHandler<HTMLButtonElement> | undefined;
295
+ onAnimationEndCapture?: React__default.AnimationEventHandler<HTMLButtonElement> | undefined;
296
+ onAnimationIteration?: React__default.AnimationEventHandler<HTMLButtonElement> | undefined;
297
+ onAnimationIterationCapture?: React__default.AnimationEventHandler<HTMLButtonElement> | undefined;
298
+ onTransitionEnd?: React__default.TransitionEventHandler<HTMLButtonElement> | undefined;
299
+ onTransitionEndCapture?: React__default.TransitionEventHandler<HTMLButtonElement> | undefined;
300
+ size?: "md" | "icon" | "lg" | "sm" | null | undefined;
301
+ variant?: "primary" | "danger" | "ghost" | "link" | "outline" | "secondary" | null | undefined;
302
+ asChild?: boolean | undefined;
303
+ label?: string | undefined;
304
+ } & React__default.RefAttributes<HTMLButtonElement>>;
305
+
306
+ type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
307
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
308
+
309
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
310
+
311
+ export { BUTTON_ICON_SIZE, Button, type ButtonProps, Input, type InputProps, Label, buttonVariants };
@@ -0,0 +1,82 @@
1
+ import {
2
+ cn
3
+ } from "../chunk-57KC6SAE.js";
4
+
5
+ // src/components/Button/Button.tsx
6
+ import React from "react";
7
+ import { Slot } from "@radix-ui/react-slot";
8
+ import { cva } from "class-variance-authority";
9
+ import { jsxs } from "react/jsx-runtime";
10
+ var BUTTON_ICON_SIZE = {
11
+ lg: 18,
12
+ md: 16,
13
+ sm: 14
14
+ };
15
+ var buttonVariants = cva(
16
+ "flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
17
+ {
18
+ defaultVariants: {
19
+ size: "md",
20
+ variant: "primary"
21
+ },
22
+ variants: {
23
+ size: {
24
+ icon: "h-9 w-9",
25
+ lg: "h-10 rounded-md px-8",
26
+ md: "h-9 px-4 py-2",
27
+ sm: "h-8 rounded-md px-3 text-xs"
28
+ },
29
+ variant: {
30
+ danger: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
31
+ ghost: "hover:bg-accent hover:text-accent-foreground",
32
+ link: "text-primary underline-offset-4 hover:underline",
33
+ outline: "border border-input bg-inherit shadow-sm",
34
+ primary: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
35
+ secondary: "bg-secondary border text-secondary-foreground shadow-sm hover:bg-secondary/80"
36
+ }
37
+ }
38
+ }
39
+ );
40
+ var Button = React.forwardRef(function Button2({ asChild = false, children, className, label, size = "md", variant = "primary", ...props }, ref) {
41
+ const Comp = asChild ? Slot : "button";
42
+ return /* @__PURE__ */ jsxs(Comp, { className: cn(buttonVariants({ className, size, variant })), ref, ...props, children: [
43
+ label,
44
+ children
45
+ ] });
46
+ });
47
+
48
+ // src/components/Input/Input.tsx
49
+ import * as React2 from "react";
50
+ import { jsx } from "react/jsx-runtime";
51
+ var Input = React2.forwardRef(function Input2({ className, type, ...props }, ref) {
52
+ return /* @__PURE__ */ jsx(
53
+ "input",
54
+ {
55
+ className: cn(
56
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
57
+ className
58
+ ),
59
+ ref,
60
+ type,
61
+ ...props
62
+ }
63
+ );
64
+ });
65
+
66
+ // src/components/Label/Label.tsx
67
+ import * as React3 from "react";
68
+ import * as LabelPrimitive from "@radix-ui/react-label";
69
+ import { cva as cva2 } from "class-variance-authority";
70
+ import { jsx as jsx2 } from "react/jsx-runtime";
71
+ var labelVariants = cva2("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
72
+ var Label = React3.forwardRef(function Label2({ className, ...props }, ref) {
73
+ return /* @__PURE__ */ jsx2(LabelPrimitive.Root, { className: cn(labelVariants(), className), ref, ...props });
74
+ });
75
+ export {
76
+ BUTTON_ICON_SIZE,
77
+ Button,
78
+ Input,
79
+ Label,
80
+ buttonVariants
81
+ };
82
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Button/Button.tsx","../../src/components/Input/Input.tsx","../../src/components/Label/Label.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport type { Simplify } from 'type-fest';\n\nimport { cn } from '@/utils';\n\nexport const BUTTON_ICON_SIZE = {\n lg: 18,\n md: 16,\n sm: 14\n};\n\nexport const buttonVariants = cva(\n 'flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n {\n defaultVariants: {\n size: 'md',\n variant: 'primary'\n },\n variants: {\n size: {\n icon: 'h-9 w-9',\n lg: 'h-10 rounded-md px-8',\n md: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-xs'\n },\n variant: {\n danger: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n outline: 'border border-input bg-inherit shadow-sm',\n primary: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',\n secondary: 'bg-secondary border text-secondary-foreground shadow-sm hover:bg-secondary/80'\n }\n }\n }\n);\n\nexport type ButtonProps = Simplify<\n React.ButtonHTMLAttributes<HTMLButtonElement> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n /** @deprecated - use children */\n label?: string;\n }\n>;\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n { asChild = false, children, className, label, size = 'md', variant = 'primary', ...props },\n ref\n) {\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp className={cn(buttonVariants({ className, size, variant }))} ref={ref} {...props}>\n {label}\n {children}\n </Comp>\n );\n});\n","import * as React from 'react';\n\nimport { cn } from '@/utils';\n\nexport type InputProps = React.InputHTMLAttributes<HTMLInputElement>;\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(function Input({ className, type, ...props }, ref) {\n return (\n <input\n className={cn(\n 'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n ref={ref}\n type={type}\n {...props}\n />\n );\n});\n","import * as React from 'react';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { type VariantProps, cva } from 'class-variance-authority';\n\nimport { cn } from '@/utils';\n\nconst labelVariants = cva('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70');\n\nexport const Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>\n>(function Label({ className, ...props }, ref) {\n return <LabelPrimitive.Root className={cn(labelVariants(), className)} ref={ref} {...props} />;\n});\n"],"mappings":";;;;;AAAA,OAAO,WAAW;AAElB,SAAS,YAAY;AACrB,SAA4B,WAAW;AAoDnC;AA/CG,IAAM,mBAAmB;AAAA,EAC9B,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,IAAM,iBAAiB;AAAA,EAC5B;AAAA,EACA;AAAA,IACE,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,SAAS;AAAA,QACP,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,QACT,WAAW;AAAA,MACb;AAAA,IACF;AAAA,EACF;AACF;AAWO,IAAM,SAAS,MAAM,WAA2C,SAASA,QAC9E,EAAE,UAAU,OAAO,UAAU,WAAW,OAAO,OAAO,MAAM,UAAU,WAAW,GAAG,MAAM,GAC1F,KACA;AACA,QAAM,OAAO,UAAU,OAAO;AAC9B,SACE,qBAAC,QAAK,WAAW,GAAG,eAAe,EAAE,WAAW,MAAM,QAAQ,CAAC,CAAC,GAAG,KAAW,GAAG,OAC9E;AAAA;AAAA,IACA;AAAA,KACH;AAEJ,CAAC;;;AC5DD,YAAYC,YAAW;AAQnB;AAFG,IAAM,QAAc,kBAAyC,SAASC,OAAM,EAAE,WAAW,MAAM,GAAG,MAAM,GAAG,KAAK;AACrH,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ,CAAC;;;AClBD,YAAYC,YAAW;AAEvB,YAAY,oBAAoB;AAChC,SAA4B,OAAAC,YAAW;AAU9B,gBAAAC,YAAA;AANT,IAAM,gBAAgBC,KAAI,4FAA4F;AAE/G,IAAM,QAAc,kBAGzB,SAASC,OAAM,EAAE,WAAW,GAAG,MAAM,GAAG,KAAK;AAC7C,SAAO,gBAAAF,KAAgB,qBAAf,EAAoB,WAAW,GAAG,cAAc,GAAG,SAAS,GAAG,KAAW,GAAG,OAAO;AAC9F,CAAC;","names":["Button","React","Input","React","cva","jsx","cva","Label"]}