@open-resource-discovery/ui-components 0.0.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +191 -0
- package/README.md +131 -1
- package/dist/index.d.ts +2 -0
- package/dist/src/components/avatar/Avatar.d.ts +20 -0
- package/dist/src/components/avatar/Avatar.d.ts.map +1 -0
- package/dist/src/components/avatar/index.d.ts +3 -0
- package/dist/src/components/avatar/index.d.ts.map +1 -0
- package/dist/src/components/badge/Badge.d.ts +12 -0
- package/dist/src/components/badge/Badge.d.ts.map +1 -0
- package/dist/src/components/badge/index.d.ts +3 -0
- package/dist/src/components/badge/index.d.ts.map +1 -0
- package/dist/src/components/button/Button.d.ts +12 -0
- package/dist/src/components/button/Button.d.ts.map +1 -0
- package/dist/src/components/button/index.d.ts +3 -0
- package/dist/src/components/button/index.d.ts.map +1 -0
- package/dist/src/components/card/Card.d.ts +16 -0
- package/dist/src/components/card/Card.d.ts.map +1 -0
- package/dist/src/components/card/SimpleCard.d.ts +9 -0
- package/dist/src/components/card/SimpleCard.d.ts.map +1 -0
- package/dist/src/components/card/index.d.ts +5 -0
- package/dist/src/components/card/index.d.ts.map +1 -0
- package/dist/src/components/chat-input/ChatInput.d.ts +16 -0
- package/dist/src/components/chat-input/ChatInput.d.ts.map +1 -0
- package/dist/src/components/chat-input/index.d.ts +3 -0
- package/dist/src/components/chat-input/index.d.ts.map +1 -0
- package/dist/src/components/chat-message/ChatMessage.d.ts +18 -0
- package/dist/src/components/chat-message/ChatMessage.d.ts.map +1 -0
- package/dist/src/components/chat-message/index.d.ts +3 -0
- package/dist/src/components/chat-message/index.d.ts.map +1 -0
- package/dist/src/components/checkbox/Checkbox.d.ts +13 -0
- package/dist/src/components/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/src/components/checkbox/index.d.ts +3 -0
- package/dist/src/components/checkbox/index.d.ts.map +1 -0
- package/dist/src/components/code-block/CodeBlock.d.ts +30 -0
- package/dist/src/components/code-block/CodeBlock.d.ts.map +1 -0
- package/dist/src/components/code-block/index.d.ts +3 -0
- package/dist/src/components/code-block/index.d.ts.map +1 -0
- package/dist/src/components/code-editor/CodeEditor.d.ts +13 -0
- package/dist/src/components/code-editor/CodeEditor.d.ts.map +1 -0
- package/dist/src/components/code-editor/index.d.ts +3 -0
- package/dist/src/components/code-editor/index.d.ts.map +1 -0
- package/dist/src/components/collapsible-section/CollapsibleSection.d.ts +27 -0
- package/dist/src/components/collapsible-section/CollapsibleSection.d.ts.map +1 -0
- package/dist/src/components/collapsible-section/index.d.ts +3 -0
- package/dist/src/components/collapsible-section/index.d.ts.map +1 -0
- package/dist/src/components/combobox/Combobox.d.ts +35 -0
- package/dist/src/components/combobox/Combobox.d.ts.map +1 -0
- package/dist/src/components/combobox/SimpleCombobox.d.ts +16 -0
- package/dist/src/components/combobox/SimpleCombobox.d.ts.map +1 -0
- package/dist/src/components/combobox/index.d.ts +5 -0
- package/dist/src/components/combobox/index.d.ts.map +1 -0
- package/dist/src/components/connection-card/ConnectionCard.d.ts +15 -0
- package/dist/src/components/connection-card/ConnectionCard.d.ts.map +1 -0
- package/dist/src/components/connection-card/index.d.ts +3 -0
- package/dist/src/components/connection-card/index.d.ts.map +1 -0
- package/dist/src/components/dialog/Dialog.d.ts +31 -0
- package/dist/src/components/dialog/Dialog.d.ts.map +1 -0
- package/dist/src/components/dialog/SimpleDialog.d.ts +14 -0
- package/dist/src/components/dialog/SimpleDialog.d.ts.map +1 -0
- package/dist/src/components/dialog/index.d.ts +5 -0
- package/dist/src/components/dialog/index.d.ts.map +1 -0
- package/dist/src/components/field/Field.d.ts +21 -0
- package/dist/src/components/field/Field.d.ts.map +1 -0
- package/dist/src/components/field/index.d.ts +3 -0
- package/dist/src/components/field/index.d.ts.map +1 -0
- package/dist/src/components/http-log-entry/HttpLogEntry.d.ts +37 -0
- package/dist/src/components/http-log-entry/HttpLogEntry.d.ts.map +1 -0
- package/dist/src/components/http-log-entry/index.d.ts +3 -0
- package/dist/src/components/http-log-entry/index.d.ts.map +1 -0
- package/dist/src/components/info-card/InfoCard.d.ts +25 -0
- package/dist/src/components/info-card/InfoCard.d.ts.map +1 -0
- package/dist/src/components/info-card/index.d.ts +3 -0
- package/dist/src/components/info-card/index.d.ts.map +1 -0
- package/dist/src/components/input/Input.d.ts +5 -0
- package/dist/src/components/input/Input.d.ts.map +1 -0
- package/dist/src/components/input/index.d.ts +3 -0
- package/dist/src/components/input/index.d.ts.map +1 -0
- package/dist/src/components/markdown-text/MarkdownText.d.ts +8 -0
- package/dist/src/components/markdown-text/MarkdownText.d.ts.map +1 -0
- package/dist/src/components/markdown-text/index.d.ts +3 -0
- package/dist/src/components/markdown-text/index.d.ts.map +1 -0
- package/dist/src/components/password-input/PasswordInput.d.ts +5 -0
- package/dist/src/components/password-input/PasswordInput.d.ts.map +1 -0
- package/dist/src/components/password-input/index.d.ts +3 -0
- package/dist/src/components/password-input/index.d.ts.map +1 -0
- package/dist/src/components/progress/Progress.d.ts +12 -0
- package/dist/src/components/progress/Progress.d.ts.map +1 -0
- package/dist/src/components/progress/index.d.ts +3 -0
- package/dist/src/components/progress/index.d.ts.map +1 -0
- package/dist/src/components/radio-group/RadioGroup.d.ts +11 -0
- package/dist/src/components/radio-group/RadioGroup.d.ts.map +1 -0
- package/dist/src/components/radio-group/index.d.ts +3 -0
- package/dist/src/components/radio-group/index.d.ts.map +1 -0
- package/dist/src/components/scroll-area/ScrollArea.d.ts +8 -0
- package/dist/src/components/scroll-area/ScrollArea.d.ts.map +1 -0
- package/dist/src/components/scroll-area/index.d.ts +3 -0
- package/dist/src/components/scroll-area/index.d.ts.map +1 -0
- package/dist/src/components/section-card/SectionCard.d.ts +28 -0
- package/dist/src/components/section-card/SectionCard.d.ts.map +1 -0
- package/dist/src/components/section-card/index.d.ts +3 -0
- package/dist/src/components/section-card/index.d.ts.map +1 -0
- package/dist/src/components/select/Select.d.ts +43 -0
- package/dist/src/components/select/Select.d.ts.map +1 -0
- package/dist/src/components/select/SimpleSelect.d.ts +20 -0
- package/dist/src/components/select/SimpleSelect.d.ts.map +1 -0
- package/dist/src/components/select/index.d.ts +5 -0
- package/dist/src/components/select/index.d.ts.map +1 -0
- package/dist/src/components/separator/Separator.d.ts +8 -0
- package/dist/src/components/separator/Separator.d.ts.map +1 -0
- package/dist/src/components/separator/index.d.ts +3 -0
- package/dist/src/components/separator/index.d.ts.map +1 -0
- package/dist/src/components/sheet/Sheet.d.ts +39 -0
- package/dist/src/components/sheet/Sheet.d.ts.map +1 -0
- package/dist/src/components/sheet/SimpleSheet.d.ts +15 -0
- package/dist/src/components/sheet/SimpleSheet.d.ts.map +1 -0
- package/dist/src/components/sheet/index.d.ts +5 -0
- package/dist/src/components/sheet/index.d.ts.map +1 -0
- package/dist/src/components/spinner/Spinner.d.ts +11 -0
- package/dist/src/components/spinner/Spinner.d.ts.map +1 -0
- package/dist/src/components/spinner/index.d.ts +3 -0
- package/dist/src/components/spinner/index.d.ts.map +1 -0
- package/dist/src/components/split-pane/SplitPane.d.ts +46 -0
- package/dist/src/components/split-pane/SplitPane.d.ts.map +1 -0
- package/dist/src/components/split-pane/index.d.ts +3 -0
- package/dist/src/components/split-pane/index.d.ts.map +1 -0
- package/dist/src/components/switch/Switch.d.ts +11 -0
- package/dist/src/components/switch/Switch.d.ts.map +1 -0
- package/dist/src/components/switch/index.d.ts +3 -0
- package/dist/src/components/switch/index.d.ts.map +1 -0
- package/dist/src/components/tabs/Tabs.d.ts +17 -0
- package/dist/src/components/tabs/Tabs.d.ts.map +1 -0
- package/dist/src/components/tabs/index.d.ts +3 -0
- package/dist/src/components/tabs/index.d.ts.map +1 -0
- package/dist/src/components/textarea/Textarea.d.ts +5 -0
- package/dist/src/components/textarea/Textarea.d.ts.map +1 -0
- package/dist/src/components/textarea/index.d.ts +3 -0
- package/dist/src/components/textarea/index.d.ts.map +1 -0
- package/dist/src/components/tooltip/Tooltip.d.ts +33 -0
- package/dist/src/components/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/src/components/tooltip/index.d.ts +3 -0
- package/dist/src/components/tooltip/index.d.ts.map +1 -0
- package/dist/src/components/typing-indicator/TypingIndicator.d.ts +4 -0
- package/dist/src/components/typing-indicator/TypingIndicator.d.ts.map +1 -0
- package/dist/src/components/typing-indicator/index.d.ts +3 -0
- package/dist/src/components/typing-indicator/index.d.ts.map +1 -0
- package/dist/src/components/validation-entry/ValidationEntry.d.ts +10 -0
- package/dist/src/components/validation-entry/ValidationEntry.d.ts.map +1 -0
- package/dist/src/components/validation-entry/index.d.ts +3 -0
- package/dist/src/components/validation-entry/index.d.ts.map +1 -0
- package/dist/src/components/validation-pass/ValidationPass.d.ts +7 -0
- package/dist/src/components/validation-pass/ValidationPass.d.ts.map +1 -0
- package/dist/src/components/validation-pass/index.d.ts +3 -0
- package/dist/src/components/validation-pass/index.d.ts.map +1 -0
- package/dist/src/index.d.ts +84 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/theme/ThemeRoot.d.ts +11 -0
- package/dist/src/theme/ThemeRoot.d.ts.map +1 -0
- package/dist/src/theme/useTheme.d.ts +9 -0
- package/dist/src/theme/useTheme.d.ts.map +1 -0
- package/dist/src/utils/cn.d.ts +3 -0
- package/dist/src/utils/cn.d.ts.map +1 -0
- package/dist/ui-components.cjs +15 -0
- package/dist/ui-components.css +3 -0
- package/dist/ui-components.js +9836 -0
- package/package.json +119 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2026 SAP SE and contributors
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1 +1,131 @@
|
|
|
1
|
-
#
|
|
1
|
+
# UI Components
|
|
2
|
+
|
|
3
|
+
A general-purpose React UI component library with accessible, themeable components.
|
|
4
|
+
|
|
5
|
+
📖 **[Browse the components on Storybook](https://open-resource-discovery.github.io/ui-components/)**
|
|
6
|
+
|
|
7
|
+
> AI-agent-friendly project map: [`llms.txt`](./llms.txt).
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @open-resource-discovery/ui-components
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { ThemeRoot, Button, Card } from "@open-resource-discovery/ui-components";
|
|
19
|
+
import "@open-resource-discovery/ui-components/styles";
|
|
20
|
+
|
|
21
|
+
function App() {
|
|
22
|
+
return (
|
|
23
|
+
<ThemeRoot>
|
|
24
|
+
<Card>
|
|
25
|
+
<Button>Click me</Button>
|
|
26
|
+
</Card>
|
|
27
|
+
</ThemeRoot>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Wrap your application with `<ThemeRoot>` to provide theming context and CSS variables to all components.
|
|
33
|
+
|
|
34
|
+
## Theming
|
|
35
|
+
|
|
36
|
+
Components are styled using CSS custom properties. Override them to match your brand:
|
|
37
|
+
|
|
38
|
+
```css
|
|
39
|
+
.ord-ui {
|
|
40
|
+
--ord-primary: #6366f1;
|
|
41
|
+
--ord-primary-foreground: #ffffff;
|
|
42
|
+
--ord-radius: 0.75rem;
|
|
43
|
+
--ord-border: #e2e8f0;
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Available tokens include `--ord-background`, `--ord-foreground`, `--ord-primary`, `--ord-secondary`, `--ord-muted`, `--ord-accent`, `--ord-destructive`, `--ord-success`, `--ord-warning`, `--ord-border`, `--ord-ring`, `--ord-card`, `--ord-popover`, and their `-foreground` variants.
|
|
48
|
+
|
|
49
|
+
## Dark Mode
|
|
50
|
+
|
|
51
|
+
Use the `useTheme` hook to toggle between light and dark modes:
|
|
52
|
+
|
|
53
|
+
```tsx
|
|
54
|
+
import { useTheme } from "@open-resource-discovery/ui-components";
|
|
55
|
+
|
|
56
|
+
function ThemeToggle() {
|
|
57
|
+
const { theme, setTheme } = useTheme();
|
|
58
|
+
|
|
59
|
+
return <button onClick={() => setTheme(theme === "dark" ? "light" : "dark")}>Toggle theme</button>;
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The `ThemeRoot` component accepts a `defaultTheme` prop (`'light'`, `'dark'`, or `'system'`). When set to `'system'`, the library automatically follows the user's OS preference.
|
|
64
|
+
|
|
65
|
+
## Components
|
|
66
|
+
|
|
67
|
+
### Layout & Structure
|
|
68
|
+
|
|
69
|
+
- **Card** - Container with header, content, and footer sections
|
|
70
|
+
- **Separator** - Visual divider between content sections
|
|
71
|
+
- **ScrollArea** - Custom scrollbar container
|
|
72
|
+
|
|
73
|
+
### Forms & Inputs
|
|
74
|
+
|
|
75
|
+
- **Button** - Primary action trigger with variants and sizes
|
|
76
|
+
- **Input** - Text input field
|
|
77
|
+
- **Textarea** - Multi-line text input
|
|
78
|
+
- **PasswordInput** - Input with show/hide password toggle
|
|
79
|
+
- **NumberField** - Numeric input with increment/decrement
|
|
80
|
+
- **Checkbox** - Single checkbox control
|
|
81
|
+
- **CheckboxGroup** - Group of related checkboxes
|
|
82
|
+
- **Radio** - Single radio option
|
|
83
|
+
- **RadioGroup** - Group of mutually exclusive radio options
|
|
84
|
+
- **Select** - Dropdown selection
|
|
85
|
+
- **Combobox** - Searchable dropdown selection
|
|
86
|
+
- **Switch** - Toggle control
|
|
87
|
+
- **Slider** - Range selection control
|
|
88
|
+
- **Field** - Form field wrapper with label, description, and error
|
|
89
|
+
|
|
90
|
+
### Feedback & Status
|
|
91
|
+
|
|
92
|
+
- **Badge** - Small status indicator label
|
|
93
|
+
- **Spinner** - Loading spinner animation
|
|
94
|
+
- **Skeleton** - Placeholder loading state
|
|
95
|
+
- **Progress** - Determinate progress bar
|
|
96
|
+
- **Meter** - Value within a known range
|
|
97
|
+
- **Toast** - Temporary notification message
|
|
98
|
+
|
|
99
|
+
### Overlays & Disclosure
|
|
100
|
+
|
|
101
|
+
- **Dialog** - Modal dialog window
|
|
102
|
+
- **Drawer** - Slide-in panel overlay
|
|
103
|
+
- **Popover** - Floating content panel
|
|
104
|
+
- **Tooltip** - Contextual hover information
|
|
105
|
+
- **Accordion** - Expandable content sections
|
|
106
|
+
- **Collapsible** - Single expandable section
|
|
107
|
+
- **Tabs** - Tabbed content panels
|
|
108
|
+
|
|
109
|
+
### Data Display
|
|
110
|
+
|
|
111
|
+
- **Avatar** - User profile image or initials
|
|
112
|
+
- **CodeBlock** - Syntax-highlighted code display
|
|
113
|
+
|
|
114
|
+
### Theming
|
|
115
|
+
|
|
116
|
+
- **ThemeRoot** - Theme provider wrapper component
|
|
117
|
+
- **useTheme** - Hook for programmatic theme control
|
|
118
|
+
|
|
119
|
+
## Storybook
|
|
120
|
+
|
|
121
|
+
The latest published Storybook is at [open-resource-discovery.github.io/ui-components](https://open-resource-discovery.github.io/ui-components/).
|
|
122
|
+
|
|
123
|
+
To run it locally:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npm run storybook
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## License
|
|
130
|
+
|
|
131
|
+
[Apache-2.0](./LICENSE)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
import { Avatar as BaseAvatar } from '@base-ui/react/avatar';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
5
|
+
import { AvatarRootProps, AvatarImageProps, AvatarFallbackProps } from '@base-ui/react';
|
|
6
|
+
declare const avatarRootVariants: (props?: ({
|
|
7
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
8
|
+
} & ClassProp) | undefined) => string;
|
|
9
|
+
export type AvatarRootProps = ComponentPropsWithoutRef<typeof BaseAvatar.Root> & VariantProps<typeof avatarRootVariants>;
|
|
10
|
+
export type AvatarImageProps = ComponentPropsWithoutRef<typeof BaseAvatar.Image>;
|
|
11
|
+
export type AvatarFallbackProps = ComponentPropsWithoutRef<typeof BaseAvatar.Fallback>;
|
|
12
|
+
export declare const Avatar: {
|
|
13
|
+
Root: ForwardRefExoticComponent<Omit<Omit< AvatarRootProps, "ref"> & RefAttributes<HTMLSpanElement>, "ref"> & VariantProps<(props?: ({
|
|
14
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
15
|
+
} & ClassProp) | undefined) => string> & RefAttributes<HTMLSpanElement>>;
|
|
16
|
+
Image: ForwardRefExoticComponent<Omit<Omit< AvatarImageProps, "ref"> & RefAttributes<HTMLImageElement>, "ref"> & RefAttributes<HTMLImageElement>>;
|
|
17
|
+
Fallback: ForwardRefExoticComponent<Omit<Omit< AvatarFallbackProps, "ref"> & RefAttributes<HTMLSpanElement>, "ref"> & RefAttributes<HTMLSpanElement>>;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../src/components/avatar/Avatar.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,kBAAkB;;8EAWtB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,wBAAwB,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,GAC5E,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAQ1C,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,CAAC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;AAQjF,MAAM,MAAM,mBAAmB,GAAG,wBAAwB,CAAC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;AAevF,eAAO,MAAM,MAAM;;;;;;CAOlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/avatar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTMLAttributes, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
4
|
+
declare const badgeVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "success" | "warning" | "highlight" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | null | undefined;
|
|
7
|
+
} & ClassProp) | undefined) => string;
|
|
8
|
+
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
9
|
+
}
|
|
10
|
+
declare const Badge: ForwardRefExoticComponent<BadgeProps & RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
export { Badge, badgeVariants };
|
|
12
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../src/components/badge/Badge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,aAAa;;;8EAuBlB,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,eAAe,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAE1G,QAAA,MAAM,KAAK,wGAET,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/badge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
4
|
+
declare const buttonVariants: (props?: ({
|
|
5
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
7
|
+
} & ClassProp) | undefined) => string;
|
|
8
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
9
|
+
}
|
|
10
|
+
declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants };
|
|
12
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAc,KAAK,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,cAAc;;;8EA4BnB,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;CAAG;AAEpH,QAAA,MAAM,MAAM,2GAEV,CAAC;AAGH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAClD,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
type CardRootProps = ComponentPropsWithoutRef<"div">;
|
|
3
|
+
type CardHeaderProps = ComponentPropsWithoutRef<"div">;
|
|
4
|
+
type CardTitleProps = ComponentPropsWithoutRef<"h3">;
|
|
5
|
+
type CardDescriptionProps = ComponentPropsWithoutRef<"p">;
|
|
6
|
+
type CardContentProps = ComponentPropsWithoutRef<"div">;
|
|
7
|
+
type CardFooterProps = ComponentPropsWithoutRef<"div">;
|
|
8
|
+
export declare const Card: ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>> & {
|
|
9
|
+
Header: ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Title: ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & RefAttributes<HTMLHeadingElement>>;
|
|
11
|
+
Description: ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & RefAttributes<HTMLParagraphElement>>;
|
|
12
|
+
Content: ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Footer: ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
14
|
+
};
|
|
15
|
+
export type { CardRootProps, CardHeaderProps, CardTitleProps, CardDescriptionProps, CardContentProps, CardFooterProps };
|
|
16
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAIlE,KAAK,aAAa,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAYrD,KAAK,eAAe,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAQvD,KAAK,cAAc,GAAG,wBAAwB,CAAC,IAAI,CAAC,CAAC;AAQrD,KAAK,oBAAoB,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAC;AAQ1D,KAAK,gBAAgB,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAQxD,KAAK,eAAe,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAQvD,eAAO,MAAM,IAAI;;;;;;CAMf,CAAC;AAEH,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export interface SimpleCardProps extends Omit<ComponentPropsWithoutRef<"div">, "title" | "content"> {
|
|
3
|
+
title?: ReactNode;
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
content?: ReactNode;
|
|
6
|
+
buttons?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const SimpleCard: React.ForwardRefExoticComponent<SimpleCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
//# sourceMappingURL=SimpleCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimpleCard.d.ts","sourceRoot":"","sources":["../../../../src/components/card/SimpleCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzF,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjG,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,wFAatB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Card } from './Card';
|
|
2
|
+
export type { CardRootProps, CardHeaderProps, CardTitleProps, CardDescriptionProps, CardContentProps, CardFooterProps, } from './Card';
|
|
3
|
+
export { SimpleCard } from './SimpleCard';
|
|
4
|
+
export type { SimpleCardProps } from './SimpleCard';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EACV,aAAa,EACb,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,GAChB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ForwardRefExoticComponent, DetailedHTMLProps, FormHTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
export type ChatInputProps = Omit<ComponentPropsWithoutRef<"form">, "onSubmit"> & {
|
|
3
|
+
onSubmit?: (value: string) => void;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
onCancel?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const ChatInput: ForwardRefExoticComponent<Omit<Omit< DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref">, "onSubmit"> & {
|
|
10
|
+
onSubmit?: (value: string) => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
onCancel?: () => void;
|
|
15
|
+
} & RefAttributes<HTMLFormElement>>;
|
|
16
|
+
//# sourceMappingURL=ChatInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-input/ChatInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,wBAAwB,EAAsB,MAAM,OAAO,CAAC;AAI3G,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAChF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,SAAS;eAPT,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;kBACpB,MAAM;eACT,OAAO;cACR,OAAO;eACN,MAAM,IAAI;mDAwFtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode, ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
export type ChatMessageProps = ComponentPropsWithoutRef<"div"> & {
|
|
3
|
+
role: "user" | "agent";
|
|
4
|
+
timestamp?: Date | string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
onCopy?: () => void;
|
|
7
|
+
onRetry?: () => void;
|
|
8
|
+
status?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare const ChatMessage: ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
11
|
+
role: "user" | "agent";
|
|
12
|
+
timestamp?: Date | string;
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
onCopy?: () => void;
|
|
15
|
+
onRetry?: () => void;
|
|
16
|
+
status?: ReactNode;
|
|
17
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
18
|
+
//# sourceMappingURL=ChatMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-message/ChatMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlF,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC/D,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,WAAW;UARhB,MAAM,GAAG,OAAO;gBACV,IAAI,GAAG,MAAM;WAClB,SAAS;aACP,MAAM,IAAI;cACT,MAAM,IAAI;aACX,SAAS;kDAwFnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-message/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';
|
|
3
|
+
import { CheckboxIndicatorProps } from '@base-ui/react';
|
|
4
|
+
export interface CheckboxProps extends ComponentPropsWithoutRef<typeof BaseCheckbox.Root> {
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Checkbox: {
|
|
8
|
+
Root: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
Indicator: React.ForwardRefExoticComponent<Omit<Omit< CheckboxIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
10
|
+
className?: string;
|
|
11
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/checkbox/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAc,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAkBnE,MAAM,WAAW,aAAc,SAAQ,wBAAwB,CAAC,OAAO,YAAY,CAAC,IAAI,CAAC;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAgCD,eAAO,MAAM,QAAQ;;;oBAbqD,MAAM;;CAmB/E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
type HighlighterLike = {
|
|
3
|
+
codeToHtml: (code: string, options: Record<string, unknown>) => string;
|
|
4
|
+
};
|
|
5
|
+
export type CodeBlockProps = ComponentPropsWithoutRef<"div"> & {
|
|
6
|
+
code: string;
|
|
7
|
+
language?: string;
|
|
8
|
+
filename?: string;
|
|
9
|
+
highlighter?: HighlighterLike;
|
|
10
|
+
lightTheme?: string;
|
|
11
|
+
darkTheme?: string;
|
|
12
|
+
showLineNumbers?: boolean;
|
|
13
|
+
showCopyButton?: boolean;
|
|
14
|
+
onCopy?: (code: string) => void;
|
|
15
|
+
maxHeight?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const CodeBlock: ForwardRefExoticComponent<Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
18
|
+
code: string;
|
|
19
|
+
language?: string;
|
|
20
|
+
filename?: string;
|
|
21
|
+
highlighter?: HighlighterLike;
|
|
22
|
+
lightTheme?: string;
|
|
23
|
+
darkTheme?: string;
|
|
24
|
+
showLineNumbers?: boolean;
|
|
25
|
+
showCopyButton?: boolean;
|
|
26
|
+
onCopy?: (code: string) => void;
|
|
27
|
+
maxHeight?: string;
|
|
28
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=CodeBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/code-block/CodeBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8C,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAIlG,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;CACxE,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,SAAS;UAZd,MAAM;eACD,MAAM;eACN,MAAM;kBACH,eAAe;iBAChB,MAAM;gBACP,MAAM;sBACA,OAAO;qBACR,OAAO;aACf,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI;gBACnB,MAAM;kDA8InB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/code-block/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
export interface CodeEditorProps extends Omit<ComponentPropsWithoutRef<"div">, "onChange" | "defaultValue"> {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange?: (value: string) => void;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
language?: string;
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
lineNumbers?: "on" | "off";
|
|
9
|
+
minHeight?: string;
|
|
10
|
+
showToolbar?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const CodeEditor: ForwardRefExoticComponent<CodeEditorProps & RefAttributes<HTMLDivElement>>;
|
|
13
|
+
//# sourceMappingURL=CodeEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/code-editor/CodeEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwD,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAK5G,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,cAAc,CAAC;IACzG,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAgCD,eAAO,MAAM,UAAU,4GA4NtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/code-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|