@gouno/ui 0.3.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/CHANGELOG.md +120 -0
- package/LICENSE +21 -0
- package/README.md +144 -0
- package/dist/base.css +239 -0
- package/dist/bootstrap.js +22 -0
- package/dist/components/primitives/alert-dialog.d.ts +18 -0
- package/dist/components/primitives/alert-dialog.js +43 -0
- package/dist/components/primitives/alert.d.ts +9 -0
- package/dist/components/primitives/alert.js +25 -0
- package/dist/components/primitives/avatar.d.ts +14 -0
- package/dist/components/primitives/avatar.js +42 -0
- package/dist/components/primitives/badge.d.ts +9 -0
- package/dist/components/primitives/badge.js +25 -0
- package/dist/components/primitives/button.d.ts +10 -0
- package/dist/components/primitives/button.js +36 -0
- package/dist/components/primitives/checkbox.d.ts +4 -0
- package/dist/components/primitives/checkbox.js +10 -0
- package/dist/components/primitives/dialog.d.ts +20 -0
- package/dist/components/primitives/dialog.js +37 -0
- package/dist/components/primitives/dropdown-menu.d.ts +25 -0
- package/dist/components/primitives/dropdown-menu.js +51 -0
- package/dist/components/primitives/empty.d.ts +11 -0
- package/dist/components/primitives/empty.js +33 -0
- package/dist/components/primitives/field.d.ts +24 -0
- package/dist/components/primitives/field.js +75 -0
- package/dist/components/primitives/input.d.ts +3 -0
- package/dist/components/primitives/input.js +7 -0
- package/dist/components/primitives/label.d.ts +4 -0
- package/dist/components/primitives/label.js +8 -0
- package/dist/components/primitives/popover.d.ts +16 -0
- package/dist/components/primitives/popover.js +31 -0
- package/dist/components/primitives/radio-group.d.ts +5 -0
- package/dist/components/primitives/radio-group.js +13 -0
- package/dist/components/primitives/select.d.ts +15 -0
- package/dist/components/primitives/select.js +38 -0
- package/dist/components/primitives/separator.d.ts +4 -0
- package/dist/components/primitives/separator.js +8 -0
- package/dist/components/primitives/sheet.d.ts +17 -0
- package/dist/components/primitives/sheet.js +41 -0
- package/dist/components/primitives/skeleton.d.ts +2 -0
- package/dist/components/primitives/skeleton.js +6 -0
- package/dist/components/primitives/switch.d.ts +6 -0
- package/dist/components/primitives/switch.js +8 -0
- package/dist/components/primitives/table.d.ts +28 -0
- package/dist/components/primitives/table.js +44 -0
- package/dist/components/primitives/tabs.d.ts +11 -0
- package/dist/components/primitives/tabs.js +30 -0
- package/dist/components/primitives/textarea.d.ts +3 -0
- package/dist/components/primitives/textarea.js +7 -0
- package/dist/components/primitives/tooltip.d.ts +13 -0
- package/dist/components/primitives/tooltip.js +24 -0
- package/dist/core/affix.d.ts +14 -0
- package/dist/core/affix.js +29 -0
- package/dist/core/alert.d.ts +54 -0
- package/dist/core/alert.js +56 -0
- package/dist/core/anchor.d.ts +16 -0
- package/dist/core/anchor.js +31 -0
- package/dist/core/app.d.ts +5 -0
- package/dist/core/app.js +5 -0
- package/dist/core/aspect-ratio.d.ts +6 -0
- package/dist/core/aspect-ratio.js +6 -0
- package/dist/core/autocomplete.d.ts +24 -0
- package/dist/core/autocomplete.js +139 -0
- package/dist/core/avatar.d.ts +26 -0
- package/dist/core/avatar.js +20 -0
- package/dist/core/badge.d.ts +16 -0
- package/dist/core/badge.js +22 -0
- package/dist/core/breadcrumb.d.ts +55 -0
- package/dist/core/breadcrumb.js +69 -0
- package/dist/core/button.d.ts +49 -0
- package/dist/core/button.js +66 -0
- package/dist/core/calendar.d.ts +48 -0
- package/dist/core/calendar.js +179 -0
- package/dist/core/card.d.ts +30 -0
- package/dist/core/card.js +12 -0
- package/dist/core/carousel.d.ts +49 -0
- package/dist/core/carousel.js +166 -0
- package/dist/core/cascader.d.ts +19 -0
- package/dist/core/cascader.js +45 -0
- package/dist/core/code-block.d.ts +16 -0
- package/dist/core/code-block.js +47 -0
- package/dist/core/collapse.d.ts +49 -0
- package/dist/core/collapse.js +96 -0
- package/dist/core/color-picker.d.ts +9 -0
- package/dist/core/color-picker.js +8 -0
- package/dist/core/config-provider.d.ts +10 -0
- package/dist/core/config-provider.js +14 -0
- package/dist/core/control-types.d.ts +2 -0
- package/dist/core/control-types.js +7 -0
- package/dist/core/date-picker.d.ts +13 -0
- package/dist/core/date-picker.js +14 -0
- package/dist/core/date-range-picker.d.ts +26 -0
- package/dist/core/date-range-picker.js +10 -0
- package/dist/core/descriptions.d.ts +41 -0
- package/dist/core/descriptions.js +133 -0
- package/dist/core/drawer.d.ts +9 -0
- package/dist/core/drawer.js +58 -0
- package/dist/core/empty.d.ts +8 -0
- package/dist/core/empty.js +5 -0
- package/dist/core/feedback.d.ts +5 -0
- package/dist/core/feedback.js +5 -0
- package/dist/core/field.d.ts +15 -0
- package/dist/core/field.js +19 -0
- package/dist/core/float-button.d.ts +13 -0
- package/dist/core/float-button.js +22 -0
- package/dist/core/form.d.ts +19 -0
- package/dist/core/form.js +56 -0
- package/dist/core/icon-button.d.ts +7 -0
- package/dist/core/icon-button.js +4 -0
- package/dist/core/icon.d.ts +17 -0
- package/dist/core/icon.js +35 -0
- package/dist/core/image.d.ts +76 -0
- package/dist/core/image.js +189 -0
- package/dist/core/index.d.ts +79 -0
- package/dist/core/index.js +77 -0
- package/dist/core/input-number.d.ts +24 -0
- package/dist/core/input-number.js +70 -0
- package/dist/core/input-otp.d.ts +14 -0
- package/dist/core/input-otp.js +76 -0
- package/dist/core/input.d.ts +14 -0
- package/dist/core/input.js +51 -0
- package/dist/core/kbd.d.ts +8 -0
- package/dist/core/kbd.js +11 -0
- package/dist/core/layout-primitives.d.ts +11 -0
- package/dist/core/layout-primitives.js +8 -0
- package/dist/core/layout.d.ts +71 -0
- package/dist/core/layout.js +119 -0
- package/dist/core/list.d.ts +37 -0
- package/dist/core/list.js +35 -0
- package/dist/core/locale.d.ts +48 -0
- package/dist/core/locale.js +32 -0
- package/dist/core/mentions.d.ts +10 -0
- package/dist/core/mentions.js +112 -0
- package/dist/core/menu.d.ts +79 -0
- package/dist/core/menu.js +265 -0
- package/dist/core/message.d.ts +16 -0
- package/dist/core/message.js +36 -0
- package/dist/core/modal.d.ts +40 -0
- package/dist/core/modal.js +67 -0
- package/dist/core/notification.d.ts +15 -0
- package/dist/core/notification.js +39 -0
- package/dist/core/page-layout.d.ts +6 -0
- package/dist/core/page-layout.js +7 -0
- package/dist/core/pagination.d.ts +28 -0
- package/dist/core/pagination.js +69 -0
- package/dist/core/popconfirm.d.ts +13 -0
- package/dist/core/popconfirm.js +42 -0
- package/dist/core/progress.d.ts +6 -0
- package/dist/core/progress.js +8 -0
- package/dist/core/public-props.d.ts +82 -0
- package/dist/core/public-props.js +1 -0
- package/dist/core/qrcode.d.ts +14 -0
- package/dist/core/qrcode.js +17 -0
- package/dist/core/rate.d.ts +11 -0
- package/dist/core/rate.js +48 -0
- package/dist/core/result.d.ts +12 -0
- package/dist/core/result.js +19 -0
- package/dist/core/segmented.d.ts +29 -0
- package/dist/core/segmented.js +38 -0
- package/dist/core/select.d.ts +27 -0
- package/dist/core/select.js +143 -0
- package/dist/core/selection-controls.d.ts +12 -0
- package/dist/core/selection-controls.js +23 -0
- package/dist/core/separator.d.ts +24 -0
- package/dist/core/separator.js +17 -0
- package/dist/core/slider.d.ts +2 -0
- package/dist/core/slider.js +6 -0
- package/dist/core/spin.d.ts +7 -0
- package/dist/core/spin.js +7 -0
- package/dist/core/spinner.d.ts +3 -0
- package/dist/core/spinner.js +6 -0
- package/dist/core/splitter.d.ts +44 -0
- package/dist/core/splitter.js +208 -0
- package/dist/core/statistic.d.ts +12 -0
- package/dist/core/statistic.js +6 -0
- package/dist/core/steps.d.ts +54 -0
- package/dist/core/steps.js +106 -0
- package/dist/core/tabs.d.ts +40 -0
- package/dist/core/tabs.js +80 -0
- package/dist/core/tag.d.ts +19 -0
- package/dist/core/tag.js +29 -0
- package/dist/core/textarea.d.ts +8 -0
- package/dist/core/textarea.js +14 -0
- package/dist/core/time-picker.d.ts +9 -0
- package/dist/core/time-picker.js +8 -0
- package/dist/core/timeline.d.ts +37 -0
- package/dist/core/timeline.js +48 -0
- package/dist/core/tour.d.ts +18 -0
- package/dist/core/tour.js +51 -0
- package/dist/core/transfer.d.ts +16 -0
- package/dist/core/transfer.js +46 -0
- package/dist/core/tree-select.d.ts +19 -0
- package/dist/core/tree-select.js +19 -0
- package/dist/core/tree.d.ts +89 -0
- package/dist/core/tree.js +386 -0
- package/dist/core/typography.d.ts +20 -0
- package/dist/core/typography.js +12 -0
- package/dist/core/upload.d.ts +20 -0
- package/dist/core/upload.js +72 -0
- package/dist/core/watermark.d.ts +10 -0
- package/dist/core/watermark.js +21 -0
- package/dist/fonts/inter-LICENSE +93 -0
- package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-LICENSE +93 -0
- package/dist/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
- package/dist/gouno/app-shell.d.ts +22 -0
- package/dist/gouno/app-shell.js +27 -0
- package/dist/gouno/index.d.ts +4 -0
- package/dist/gouno/index.js +4 -0
- package/dist/gouno/page-container.d.ts +4 -0
- package/dist/gouno/page-container.js +6 -0
- package/dist/gouno/page-header.d.ts +8 -0
- package/dist/gouno/page-header.js +6 -0
- package/dist/hooks/use-overlay-body.d.ts +6 -0
- package/dist/hooks/use-overlay-body.js +18 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +5 -0
- package/dist/patterns/bulk-action-bar.d.ts +8 -0
- package/dist/patterns/bulk-action-bar.js +7 -0
- package/dist/patterns/index.d.ts +5 -0
- package/dist/patterns/index.js +5 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme/provider.d.ts +22 -0
- package/dist/theme/provider.js +76 -0
- package/dist/theme/theme-toggle.d.ts +6 -0
- package/dist/theme/theme-toggle.js +10 -0
- package/dist/tokens.css +164 -0
- package/package.json +111 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) JetBrainsMono-Italic[wght].ttf: Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface AppShellProps {
|
|
3
|
+
brand: ReactNode;
|
|
4
|
+
navigation: (close: () => void) => ReactNode;
|
|
5
|
+
toolbar?: ReactNode;
|
|
6
|
+
breadcrumbs?: ReactNode;
|
|
7
|
+
account?: ReactNode;
|
|
8
|
+
footer?: ReactNode;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
navigationLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Application-level chrome for Gouno product surfaces. Routing, permissions,
|
|
14
|
+
* authentication and product state remain owned by the consuming application.
|
|
15
|
+
*/
|
|
16
|
+
export declare function AppShell({ brand, navigation, toolbar, breadcrumbs, account, footer, children, navigationLabel, }: AppShellProps): import("react").JSX.Element;
|
|
17
|
+
export interface NavigationGroupProps {
|
|
18
|
+
label?: string;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare function NavigationGroup({ label, children }: NavigationGroupProps): import("react").JSX.Element;
|
|
22
|
+
export declare const navigationItemClass = "flex min-h-10 min-w-0 items-center gap-2 rounded-md px-3 py-2 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0 aria-[current=page]:bg-accent aria-[current=page]:font-semibold aria-[current=page]:text-accent-foreground";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId, useRef, useState } from "react";
|
|
3
|
+
import { Menu } from "lucide-react";
|
|
4
|
+
import { IconButton } from "../core/icon-button.js";
|
|
5
|
+
import { Sheet, SheetContent, SheetHeader, SheetTitle, } from "../components/primitives/sheet.js";
|
|
6
|
+
/**
|
|
7
|
+
* Application-level chrome for Gouno product surfaces. Routing, permissions,
|
|
8
|
+
* authentication and product state remain owned by the consuming application.
|
|
9
|
+
*/
|
|
10
|
+
export function AppShell({ brand, navigation, toolbar, breadcrumbs, account, footer, children, navigationLabel = "应用导航", }) {
|
|
11
|
+
const [open, setOpen] = useState(false);
|
|
12
|
+
const navigationTrigger = useRef(null);
|
|
13
|
+
const instanceId = useId().replaceAll(":", "");
|
|
14
|
+
const mainId = `app-shell-main-${instanceId}`;
|
|
15
|
+
return (_jsxs("div", { "data-slot": "app-shell", className: "min-h-dvh bg-canvas text-foreground", children: [_jsx("a", { href: `#${mainId}`, className: "sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-popover focus:p-3", children: "\u8DF3\u81F3\u4E3B\u8981\u5185\u5BB9" }), _jsxs("header", { className: "sticky top-0 z-30 flex h-16 items-center gap-4 border-b bg-background px-4 lg:px-6", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3 lg:w-[264px]", children: [_jsx(IconButton, { ref: navigationTrigger, className: "lg:hidden", label: navigationLabel, icon: _jsx(Menu, {}), onClick: () => setOpen(true) }), _jsx("div", { className: "min-w-0 truncate text-base font-semibold tracking-tight text-primary", children: brand })] }), _jsx("div", { className: "hidden min-w-0 flex-1 text-sm text-muted-foreground md:block", children: breadcrumbs }), _jsxs("div", { className: "ml-auto flex items-center gap-2", children: [toolbar, account] })] }), _jsxs("div", { className: "grid min-h-[calc(100dvh-64px)] lg:grid-cols-[288px_minmax(0,1fr)]", children: [_jsxs("aside", { className: "sticky top-16 hidden h-[calc(100dvh-64px)] flex-col border-r bg-sidebar px-3 py-5 lg:flex", children: [_jsx("nav", { "aria-label": navigationLabel, className: "min-h-0 flex-1 overflow-y-auto", children: navigation(() => { }) }), footer ? _jsx("div", { className: "mt-4 border-t pt-4", children: footer }) : null] }), _jsx("main", { id: mainId, tabIndex: -1, className: "min-w-0 px-4 py-6 outline-none md:px-6 xl:px-8", children: children })] }), _jsx(Sheet, { open: open, onOpenChange: setOpen, children: _jsxs(SheetContent, { side: "left", className: "flex w-[320px] max-w-[calc(100vw-1rem)] flex-col bg-sidebar", "aria-describedby": undefined, onCloseAutoFocus: (event) => {
|
|
16
|
+
event.preventDefault();
|
|
17
|
+
navigationTrigger.current?.focus();
|
|
18
|
+
}, children: [_jsx(SheetHeader, { children: _jsx(SheetTitle, { children: brand }) }), _jsx("nav", { "aria-label": navigationLabel, className: "flex-1 overflow-auto px-3", children: navigation(() => setOpen(false)) }), footer ? _jsx("div", { className: "p-4", children: footer }) : null] }) })] }));
|
|
19
|
+
}
|
|
20
|
+
const navigationGroupClass = "mb-6 flex flex-col gap-1";
|
|
21
|
+
export function NavigationGroup({ label, children }) {
|
|
22
|
+
if (!label) {
|
|
23
|
+
return (_jsx("div", { "data-slot": "navigation-group", className: navigationGroupClass, children: children }));
|
|
24
|
+
}
|
|
25
|
+
return (_jsxs("section", { "data-slot": "navigation-group", className: navigationGroupClass, children: [_jsx("h2", { className: "px-3 pb-2 text-xs font-medium text-muted-foreground", children: label }), children] }));
|
|
26
|
+
}
|
|
27
|
+
export const navigationItemClass = "flex min-h-10 min-w-0 items-center gap-2 rounded-md px-3 py-2 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0 aria-[current=page]:bg-accent aria-[current=page]:font-semibold aria-[current=page]:text-accent-foreground";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Canonical Gouno product-family application structure. */
|
|
2
|
+
export { AppShell, NavigationGroup, navigationItemClass, type AppShellProps, type NavigationGroupProps, } from "./app-shell.js";
|
|
3
|
+
export { PageContainer, type PageContainerProps } from "./page-container.js";
|
|
4
|
+
export { PageHeader, type PageHeaderProps } from "./page-header.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export type PageContainerProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
/** Standard content-width and vertical-rhythm container for Gouno product pages. */
|
|
4
|
+
export declare function PageContainer({ className, ...props }: PageContainerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
/** Standard content-width and vertical-rhythm container for Gouno product pages. */
|
|
4
|
+
export function PageContainer({ className, ...props }) {
|
|
5
|
+
return (_jsx("div", { ...props, "data-slot": "page-container", className: cn("mx-auto flex w-full min-w-0 max-w-[1440px] flex-col gap-6", className) }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface PageHeaderProps {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
actions?: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function PageHeader({ title, description, actions, className, }: PageHeaderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Heading, Text } from "../core/typography.js";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
export function PageHeader({ title, description, actions, className, }) {
|
|
5
|
+
return (_jsxs("header", { "data-slot": "page-header", className: cn("flex flex-col gap-4 md:flex-row md:items-start md:justify-between", className), children: [_jsxs("div", { className: "min-w-0", children: [_jsx(Heading, { level: 1, className: "text-2xl leading-tight tracking-tight", children: title }), description ? (_jsx(Text, { tone: "muted", size: "sm", className: "mt-2 max-w-3xl leading-relaxed", children: description })) : null] }), actions ? (_jsx("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: actions })) : null] }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/** A detached portal retains form state without keeping a closed focus scope mounted. */
|
|
3
|
+
export declare function useOverlayBody(children: ReactNode, open: boolean, destroyOnClose: boolean): {
|
|
4
|
+
body: import("react").JSX.Element;
|
|
5
|
+
portal: import("react").ReactPortal | null;
|
|
6
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useState } from "react";
|
|
3
|
+
import { createPortal } from "react-dom";
|
|
4
|
+
/** A detached portal retains form state without keeping a closed focus scope mounted. */
|
|
5
|
+
export function useOverlayBody(children, open, destroyOnClose) {
|
|
6
|
+
const [host] = useState(() => typeof document === "undefined" ? null : document.createElement("div"));
|
|
7
|
+
const [visited, setVisited] = useState(open);
|
|
8
|
+
useEffect(() => { if (open)
|
|
9
|
+
setVisited(true); }, [open]);
|
|
10
|
+
const attach = useCallback((node) => {
|
|
11
|
+
if (node && host)
|
|
12
|
+
node.appendChild(host);
|
|
13
|
+
}, [host]);
|
|
14
|
+
return {
|
|
15
|
+
body: _jsx("div", { ref: attach }),
|
|
16
|
+
portal: host && (open || (visited && !destroyOnClose)) ? createPortal(children, host) : null,
|
|
17
|
+
};
|
|
18
|
+
}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface BulkActionBarProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "role"> {
|
|
3
|
+
selectionLabel: ReactNode;
|
|
4
|
+
onCancel: () => void;
|
|
5
|
+
cancelLabel?: ReactNode;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function BulkActionBar({ selectionLabel, onCancel, cancelLabel, children, className, "aria-label": ariaLabel, ...props }: BulkActionBarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "../core/button.js";
|
|
3
|
+
import { Text } from "../core/typography.js";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
export function BulkActionBar({ selectionLabel, onCancel, cancelLabel = "取消", children, className, "aria-label": ariaLabel = "批量操作", ...props }) {
|
|
6
|
+
return (_jsxs("div", { ...props, role: "toolbar", "aria-label": ariaLabel, "data-slot": "bulk-action-bar", className: cn("sticky bottom-4 z-20 flex flex-col gap-3 rounded-lg border border-primary/30 bg-card p-4 sm:flex-row sm:items-center", className), children: [_jsx(Text, { size: "sm", className: "font-medium sm:mr-auto", children: selectionLabel }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", "data-slot": "bulk-action-bar-actions", children: [children, _jsx(Button, { size: "small", variant: "text", onClick: onCancel, children: cancelLabel })] })] }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type ThemeMode = "light" | "dark" | "system";
|
|
3
|
+
export type Brand = "blog" | "blog-admin" | "gosso-admin";
|
|
4
|
+
export type Density = "comfortable" | "compact";
|
|
5
|
+
export declare const brandNames: Record<Brand, string>;
|
|
6
|
+
export declare function resolveMode(mode: ThemeMode, systemDark: boolean): "light" | "dark";
|
|
7
|
+
export declare function readMode(key: string): ThemeMode;
|
|
8
|
+
interface ThemeContextValue {
|
|
9
|
+
mode: ThemeMode;
|
|
10
|
+
resolvedMode: "light" | "dark";
|
|
11
|
+
brand: Brand;
|
|
12
|
+
setMode: (mode: ThemeMode) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const useTheme: () => ThemeContextValue;
|
|
15
|
+
export interface ThemeProviderProps {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
brand: Brand;
|
|
18
|
+
storageKey: string;
|
|
19
|
+
density?: Density;
|
|
20
|
+
}
|
|
21
|
+
export declare function ThemeProvider({ children, brand, storageKey, density, }: ThemeProviderProps): import("react").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext, useEffect, useLayoutEffect, useMemo, useState, } from "react";
|
|
3
|
+
export const brandNames = {
|
|
4
|
+
blog: "Blog",
|
|
5
|
+
"blog-admin": "Blog Admin",
|
|
6
|
+
"gosso-admin": "Gosso Admin",
|
|
7
|
+
};
|
|
8
|
+
export function resolveMode(mode, systemDark) {
|
|
9
|
+
return mode === "system" ? (systemDark ? "dark" : "light") : mode;
|
|
10
|
+
}
|
|
11
|
+
export function readMode(key) {
|
|
12
|
+
try {
|
|
13
|
+
const value = localStorage.getItem(key);
|
|
14
|
+
return value === "light" || value === "dark" ? value : "system";
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return "system";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const ThemeContext = createContext({
|
|
21
|
+
mode: "system",
|
|
22
|
+
resolvedMode: "light",
|
|
23
|
+
brand: "blog",
|
|
24
|
+
setMode: () => { },
|
|
25
|
+
});
|
|
26
|
+
export const useTheme = () => useContext(ThemeContext);
|
|
27
|
+
export function ThemeProvider({ children, brand, storageKey, density = "comfortable", }) {
|
|
28
|
+
const [mode, updateMode] = useState(() => readMode(storageKey));
|
|
29
|
+
const [systemDark, setSystemDark] = useState(() => typeof matchMedia === "function" &&
|
|
30
|
+
matchMedia("(prefers-color-scheme: dark)").matches);
|
|
31
|
+
const resolvedMode = resolveMode(mode, systemDark);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (typeof window.matchMedia !== "function")
|
|
34
|
+
return;
|
|
35
|
+
const query = window.matchMedia("(prefers-color-scheme: dark)");
|
|
36
|
+
const update = () => setSystemDark(query.matches);
|
|
37
|
+
const storage = (event) => {
|
|
38
|
+
if (event.key === storageKey || event.key === null)
|
|
39
|
+
updateMode(readMode(storageKey));
|
|
40
|
+
};
|
|
41
|
+
update();
|
|
42
|
+
query.addEventListener("change", update);
|
|
43
|
+
window.addEventListener("storage", storage);
|
|
44
|
+
return () => {
|
|
45
|
+
query.removeEventListener("change", update);
|
|
46
|
+
window.removeEventListener("storage", storage);
|
|
47
|
+
};
|
|
48
|
+
}, [storageKey]);
|
|
49
|
+
useLayoutEffect(() => {
|
|
50
|
+
const root = document.documentElement;
|
|
51
|
+
root.dataset.theme = resolvedMode;
|
|
52
|
+
root.dataset.density = density;
|
|
53
|
+
root.style.colorScheme = resolvedMode;
|
|
54
|
+
document
|
|
55
|
+
.querySelector('meta[name="theme-color"]')
|
|
56
|
+
?.setAttribute("content", resolvedMode === "dark" ? "#11151b" : "#ffffff");
|
|
57
|
+
}, [resolvedMode, density]);
|
|
58
|
+
useLayoutEffect(() => {
|
|
59
|
+
document.documentElement.dataset.brand = brand;
|
|
60
|
+
}, [brand]);
|
|
61
|
+
const value = useMemo(() => ({
|
|
62
|
+
mode,
|
|
63
|
+
resolvedMode,
|
|
64
|
+
brand,
|
|
65
|
+
setMode: (next) => {
|
|
66
|
+
updateMode(next);
|
|
67
|
+
try {
|
|
68
|
+
localStorage.setItem(storageKey, next);
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
/* In-memory preference still works. */
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
}), [mode, resolvedMode, brand, storageKey]);
|
|
75
|
+
return (_jsx(ThemeContext.Provider, { value: value, children: children }));
|
|
76
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Monitor, Moon, Sun } from "lucide-react";
|
|
3
|
+
import { IconButton } from "../core/icon-button.js";
|
|
4
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger, } from "../components/primitives/dropdown-menu.js";
|
|
5
|
+
import { useTheme } from "./provider.js";
|
|
6
|
+
export function ThemeToggle({ label = "主题", labels = { light: "浅色", dark: "深色", system: "跟随系统" }, }) {
|
|
7
|
+
const { mode, resolvedMode, setMode } = useTheme();
|
|
8
|
+
const Icon = mode === "system" ? Monitor : resolvedMode === "dark" ? Moon : Sun;
|
|
9
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(IconButton, { label: label, icon: _jsx(Icon, {}), "aria-pressed": resolvedMode === "dark" }) }), _jsx(DropdownMenuContent, { align: "end", children: _jsx(DropdownMenuGroup, { children: _jsx(DropdownMenuRadioGroup, { value: mode, onValueChange: (next) => setMode(next), children: ["light", "dark", "system"].map((value) => (_jsx(DropdownMenuRadioItem, { value: value, children: labels[value] }, value))) }) }) })] }));
|
|
10
|
+
}
|