citry-ui 0.1.0__tar.gz

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.
Files changed (155) hide show
  1. citry_ui-0.1.0/CHANGELOG.md +14 -0
  2. citry_ui-0.1.0/LICENSE +22 -0
  3. citry_ui-0.1.0/MANIFEST.in +1 -0
  4. citry_ui-0.1.0/PKG-INFO +170 -0
  5. citry_ui-0.1.0/README.md +143 -0
  6. citry_ui-0.1.0/THIRD_PARTY_LICENSES.md +56 -0
  7. citry_ui-0.1.0/citry_ui/__init__.py +965 -0
  8. citry_ui-0.1.0/citry_ui/components/__init__.py +1181 -0
  9. citry_ui-0.1.0/citry_ui/components/_active_descendant.py +178 -0
  10. citry_ui-0.1.0/citry_ui/components/_anchored_layer.py +815 -0
  11. citry_ui-0.1.0/citry_ui/components/_aria.py +20 -0
  12. citry_ui-0.1.0/citry_ui/components/_attrs.py +121 -0
  13. citry_ui-0.1.0/citry_ui/components/_context.py +6 -0
  14. citry_ui-0.1.0/citry_ui/components/_dialog_controller.py +573 -0
  15. citry_ui-0.1.0/citry_ui/components/_form_control_runtime.py +88 -0
  16. citry_ui-0.1.0/citry_ui/components/_i18n.py +29 -0
  17. citry_ui-0.1.0/citry_ui/components/_scroll_geometry.py +21 -0
  18. citry_ui-0.1.0/citry_ui/components/_shared_component_assets.py +82 -0
  19. citry_ui-0.1.0/citry_ui/components/_validation.py +70 -0
  20. citry_ui-0.1.0/citry_ui/components/caccordion/__init__.py +29 -0
  21. citry_ui-0.1.0/citry_ui/components/caccordion/caccordion.py +1981 -0
  22. citry_ui-0.1.0/citry_ui/components/calert/__init__.py +23 -0
  23. citry_ui-0.1.0/citry_ui/components/calert/calert.py +704 -0
  24. citry_ui-0.1.0/citry_ui/components/calert_dialog/__init__.py +27 -0
  25. citry_ui-0.1.0/citry_ui/components/calert_dialog/calert_dialog.py +332 -0
  26. citry_ui-0.1.0/citry_ui/components/cavatar/__init__.py +19 -0
  27. citry_ui-0.1.0/citry_ui/components/cavatar/cavatar.py +542 -0
  28. citry_ui-0.1.0/citry_ui/components/cbadge/__init__.py +21 -0
  29. citry_ui-0.1.0/citry_ui/components/cbadge/cbadge.py +318 -0
  30. citry_ui-0.1.0/citry_ui/components/cbreadcrumbs/__init__.py +17 -0
  31. citry_ui-0.1.0/citry_ui/components/cbreadcrumbs/cbreadcrumbs.py +378 -0
  32. citry_ui-0.1.0/citry_ui/components/cbutton/__init__.py +27 -0
  33. citry_ui-0.1.0/citry_ui/components/cbutton/cbutton.py +817 -0
  34. citry_ui-0.1.0/citry_ui/components/cbutton_group/__init__.py +9 -0
  35. citry_ui-0.1.0/citry_ui/components/cbutton_group/cbutton_group.py +224 -0
  36. citry_ui-0.1.0/citry_ui/components/ccard/__init__.py +27 -0
  37. citry_ui-0.1.0/citry_ui/components/ccard/ccard.py +422 -0
  38. citry_ui-0.1.0/citry_ui/components/ccarousel/__init__.py +23 -0
  39. citry_ui-0.1.0/citry_ui/components/ccarousel/ccarousel.py +978 -0
  40. citry_ui-0.1.0/citry_ui/components/ccheckbox/__init__.py +19 -0
  41. citry_ui-0.1.0/citry_ui/components/ccheckbox/ccheckbox.py +1032 -0
  42. citry_ui-0.1.0/citry_ui/components/ccombobox/__init__.py +23 -0
  43. citry_ui-0.1.0/citry_ui/components/ccombobox/ccombobox.py +2027 -0
  44. citry_ui-0.1.0/citry_ui/components/ccommand_palette/__init__.py +35 -0
  45. citry_ui-0.1.0/citry_ui/components/ccommand_palette/ccommand_palette.py +2444 -0
  46. citry_ui-0.1.0/citry_ui/components/ccontext_menu/__init__.py +15 -0
  47. citry_ui-0.1.0/citry_ui/components/ccontext_menu/ccontext_menu.py +627 -0
  48. citry_ui-0.1.0/citry_ui/components/cdialog/__init__.py +27 -0
  49. citry_ui-0.1.0/citry_ui/components/cdialog/cdialog.py +754 -0
  50. citry_ui-0.1.0/citry_ui/components/cdisclosure/__init__.py +25 -0
  51. citry_ui-0.1.0/citry_ui/components/cdisclosure/cdisclosure.py +1884 -0
  52. citry_ui-0.1.0/citry_ui/components/cdivider/__init__.py +19 -0
  53. citry_ui-0.1.0/citry_ui/components/cdivider/cdivider.py +386 -0
  54. citry_ui-0.1.0/citry_ui/components/cdrawer/__init__.py +29 -0
  55. citry_ui-0.1.0/citry_ui/components/cdrawer/cdrawer.py +1034 -0
  56. citry_ui-0.1.0/citry_ui/components/ceditable/__init__.py +25 -0
  57. citry_ui-0.1.0/citry_ui/components/ceditable/ceditable.py +1103 -0
  58. citry_ui-0.1.0/citry_ui/components/cfield/__init__.py +29 -0
  59. citry_ui-0.1.0/citry_ui/components/cfield/cfield.py +1184 -0
  60. citry_ui-0.1.0/citry_ui/components/cfile_input/__init__.py +17 -0
  61. citry_ui-0.1.0/citry_ui/components/cfile_input/cfile_input.py +1091 -0
  62. citry_ui-0.1.0/citry_ui/components/cflow/__init__.py +23 -0
  63. citry_ui-0.1.0/citry_ui/components/cflow/cflow.py +391 -0
  64. citry_ui-0.1.0/citry_ui/components/cform/__init__.py +17 -0
  65. citry_ui-0.1.0/citry_ui/components/cform/cform.py +314 -0
  66. citry_ui-0.1.0/citry_ui/components/cgrid/__init__.py +29 -0
  67. citry_ui-0.1.0/citry_ui/components/cgrid/cgrid.py +649 -0
  68. citry_ui-0.1.0/citry_ui/components/chover_card/__init__.py +19 -0
  69. citry_ui-0.1.0/citry_ui/components/chover_card/chover_card.py +1184 -0
  70. citry_ui-0.1.0/citry_ui/components/cicon/__init__.py +5 -0
  71. citry_ui-0.1.0/citry_ui/components/cicon/_catalog.py +156 -0
  72. citry_ui-0.1.0/citry_ui/components/cicon/cicon.py +300 -0
  73. citry_ui-0.1.0/citry_ui/components/cimage/__init__.py +27 -0
  74. citry_ui-0.1.0/citry_ui/components/cimage/cimage.py +1403 -0
  75. citry_ui-0.1.0/citry_ui/components/clist/__init__.py +27 -0
  76. citry_ui-0.1.0/citry_ui/components/clist/clist.py +498 -0
  77. citry_ui-0.1.0/citry_ui/components/clistbox/__init__.py +33 -0
  78. citry_ui-0.1.0/citry_ui/components/clistbox/clistbox.py +1465 -0
  79. citry_ui-0.1.0/citry_ui/components/cmenu/__init__.py +69 -0
  80. citry_ui-0.1.0/citry_ui/components/cmenu/cmenu.py +5297 -0
  81. citry_ui-0.1.0/citry_ui/components/cmulti_select/__init__.py +25 -0
  82. citry_ui-0.1.0/citry_ui/components/cmulti_select/cmulti_select.py +851 -0
  83. citry_ui-0.1.0/citry_ui/components/cnative_select/__init__.py +19 -0
  84. citry_ui-0.1.0/citry_ui/components/cnative_select/cnative_select.py +1107 -0
  85. citry_ui-0.1.0/citry_ui/components/cnavigation_menu/__init__.py +29 -0
  86. citry_ui-0.1.0/citry_ui/components/cnavigation_menu/cnavigation_menu.py +1102 -0
  87. citry_ui-0.1.0/citry_ui/components/cpagination/__init__.py +10 -0
  88. citry_ui-0.1.0/citry_ui/components/cpagination/cpagination.py +619 -0
  89. citry_ui-0.1.0/citry_ui/components/cpopover/__init__.py +23 -0
  90. citry_ui-0.1.0/citry_ui/components/cpopover/cpopover.py +1067 -0
  91. citry_ui-0.1.0/citry_ui/components/cprogress/__init__.py +13 -0
  92. citry_ui-0.1.0/citry_ui/components/cprogress/cprogress.py +530 -0
  93. citry_ui-0.1.0/citry_ui/components/cradio/__init__.py +27 -0
  94. citry_ui-0.1.0/citry_ui/components/cradio/cradio.py +952 -0
  95. citry_ui-0.1.0/citry_ui/components/cscroll_area/__init__.py +19 -0
  96. citry_ui-0.1.0/citry_ui/components/cscroll_area/cscroll_area.py +437 -0
  97. citry_ui-0.1.0/citry_ui/components/cselect/__init__.py +25 -0
  98. citry_ui-0.1.0/citry_ui/components/cselect/cselect.py +1625 -0
  99. citry_ui-0.1.0/citry_ui/components/cskeleton/__init__.py +5 -0
  100. citry_ui-0.1.0/citry_ui/components/cskeleton/cskeleton.py +322 -0
  101. citry_ui-0.1.0/citry_ui/components/cspinner/__init__.py +5 -0
  102. citry_ui-0.1.0/citry_ui/components/cspinner/cspinner.py +315 -0
  103. citry_ui-0.1.0/citry_ui/components/csplitbutton/__init__.py +19 -0
  104. citry_ui-0.1.0/citry_ui/components/csplitbutton/_submit_registry.py +172 -0
  105. citry_ui-0.1.0/citry_ui/components/csplitbutton/csplitbutton.py +946 -0
  106. citry_ui-0.1.0/citry_ui/components/csplitter/__init__.py +25 -0
  107. citry_ui-0.1.0/citry_ui/components/csplitter/csplitter.py +952 -0
  108. citry_ui-0.1.0/citry_ui/components/cstepper/__init__.py +29 -0
  109. citry_ui-0.1.0/citry_ui/components/cstepper/cstepper.py +854 -0
  110. citry_ui-0.1.0/citry_ui/components/cswitch/__init__.py +17 -0
  111. citry_ui-0.1.0/citry_ui/components/cswitch/cswitch.py +760 -0
  112. citry_ui-0.1.0/citry_ui/components/ctable/__init__.py +43 -0
  113. citry_ui-0.1.0/citry_ui/components/ctable/ctable.py +995 -0
  114. citry_ui-0.1.0/citry_ui/components/ctabs/__init__.py +31 -0
  115. citry_ui-0.1.0/citry_ui/components/ctabs/ctabs.py +1267 -0
  116. citry_ui-0.1.0/citry_ui/components/ctag/__init__.py +35 -0
  117. citry_ui-0.1.0/citry_ui/components/ctag/ctag.py +1125 -0
  118. citry_ui-0.1.0/citry_ui/components/ctags_input/__init__.py +25 -0
  119. citry_ui-0.1.0/citry_ui/components/ctags_input/ctags_input.py +823 -0
  120. citry_ui-0.1.0/citry_ui/components/ctextarea/__init__.py +17 -0
  121. citry_ui-0.1.0/citry_ui/components/ctextarea/ctextarea.py +791 -0
  122. citry_ui-0.1.0/citry_ui/components/ctoast/__init__.py +19 -0
  123. citry_ui-0.1.0/citry_ui/components/ctoast/ctoast.py +1350 -0
  124. citry_ui-0.1.0/citry_ui/components/ctoggle/__init__.py +25 -0
  125. citry_ui-0.1.0/citry_ui/components/ctoggle/ctoggle.py +688 -0
  126. citry_ui-0.1.0/citry_ui/components/ctoolbar/__init__.py +17 -0
  127. citry_ui-0.1.0/citry_ui/components/ctoolbar/ctoolbar.py +526 -0
  128. citry_ui-0.1.0/citry_ui/components/ctooltip/__init__.py +15 -0
  129. citry_ui-0.1.0/citry_ui/components/ctooltip/ctooltip.py +1119 -0
  130. citry_ui-0.1.0/citry_ui/components/ctree/__init__.py +29 -0
  131. citry_ui-0.1.0/citry_ui/components/ctree/ctree.py +899 -0
  132. citry_ui-0.1.0/citry_ui/py.typed +1 -0
  133. citry_ui-0.1.0/citry_ui.egg-info/PKG-INFO +170 -0
  134. citry_ui-0.1.0/citry_ui.egg-info/SOURCES.txt +153 -0
  135. citry_ui-0.1.0/citry_ui.egg-info/dependency_links.txt +1 -0
  136. citry_ui-0.1.0/citry_ui.egg-info/requires.txt +1 -0
  137. citry_ui-0.1.0/citry_ui.egg-info/top_level.txt +2 -0
  138. citry_ui-0.1.0/citry_ui_i18n/__init__.py +3 -0
  139. citry_ui-0.1.0/citry_ui_i18n/_compiled/__init__.py +1 -0
  140. citry_ui-0.1.0/citry_ui_i18n/_compiled/link.json +1 -0
  141. citry_ui-0.1.0/citry_ui_i18n/_compiled/manifest.json +1 -0
  142. citry_ui-0.1.0/citry_ui_i18n/_compiled/server.json +1 -0
  143. citry_ui-0.1.0/citry_ui_i18n/_generate_catalog.py +44 -0
  144. citry_ui-0.1.0/citry_ui_i18n/citry-i18n.toml +3 -0
  145. citry_ui-0.1.0/citry_ui_i18n/formats.json +1 -0
  146. citry_ui-0.1.0/citry_ui_i18n/locales/en-US/citry-ui.ftl +87 -0
  147. citry_ui-0.1.0/pyproject.toml +83 -0
  148. citry_ui-0.1.0/setup.cfg +4 -0
  149. citry_ui-0.1.0/tests/test_asset_budgets.py +66 -0
  150. citry_ui-0.1.0/tests/test_citry_ui_registration.py +892 -0
  151. citry_ui-0.1.0/tests/test_component_contracts.py +1606 -0
  152. citry_ui-0.1.0/tests/test_component_families.py +1690 -0
  153. citry_ui-0.1.0/tests/test_csp_compatibility.py +66 -0
  154. citry_ui-0.1.0/tests/test_i18n_catalog.py +213 -0
  155. citry_ui-0.1.0/tests/test_storybook_spike.py +425 -0
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+
3
+ ## [0.1.0] - 2026-08-19
4
+
5
+ ### Added
6
+
7
+ - Build application interfaces from 55 styled component families by registering `citry_ui` once with a Citry instance.
8
+ - Use the same components in Citry templates or compose them from typed Python invocations.
9
+ - Customize light and dark themes through documented CSS variables, parts, variants, sizes, slots, and attributes.
10
+ - Render accessible server HTML, add keyboard and pointer interaction through
11
+ Citry's client runtime, and localize built-in labels through the bundled
12
+ catalog.
13
+
14
+ [0.1.0]: https://github.com/citry-dev/citry/releases/tag/citry-ui%400.1.0
citry_ui-0.1.0/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 citry
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1 @@
1
+ include CHANGELOG.md
@@ -0,0 +1,170 @@
1
+ Metadata-Version: 2.4
2
+ Name: citry-ui
3
+ Version: 0.1.0
4
+ Summary: First-party styled component library for Citry
5
+ Author-email: Juro Oravec <juraj.oravec.josefson@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://citry.dev
8
+ Project-URL: Documentation, https://citry.dev/ui-library/
9
+ Project-URL: Repository, https://github.com/citry-dev/citry
10
+ Project-URL: Issues, https://github.com/citry-dev/citry/issues
11
+ Project-URL: Changelog, https://github.com/citry-dev/citry/blob/main/packages/py/citry_ui/CHANGELOG.md
12
+ Keywords: citry,components,frontend,ui
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Requires-Python: <4.0,>=3.10
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ License-File: THIRD_PARTY_LICENSES.md
25
+ Requires-Dist: citry<0.5.0,>=0.4.0
26
+ Dynamic: license-file
27
+
28
+ # Citry UI
29
+
30
+ Citry UI is Citry's own styled component library.
31
+
32
+ It gives you the building blocks for polished application interfaces without
33
+ assembling a separate frontend component stack:
34
+
35
+ - forms, navigation, dialogs, menus, feedback, layout, and data display;
36
+ - accessible HTML with keyboard and pointer interactions;
37
+ - useful server-rendered output before browser behavior starts;
38
+ - consistent light and dark styling with theme variables and component parts;
39
+ - built-in labels that applications can translate and override; and
40
+ - Python composition alongside ordinary Citry template tags.
41
+
42
+ Browse the [component catalog](https://citry.dev/ui-library/) for current
43
+ guides and API references.
44
+
45
+ ## Alpha release
46
+
47
+ Citry UI is in alpha.
48
+
49
+ Components that already exist won't be removed (for example, `CButton` stays
50
+ `CButton`), but component inputs may yet change before v1.0.
51
+
52
+ ## Installation
53
+
54
+ Install it with Python 3.10 or newer. Needs `citry>=0.4`:
55
+
56
+ ```console
57
+ python -m pip install citry-ui
58
+ ```
59
+
60
+ ## Usage
61
+
62
+ Register components with `Citry.register_library()`:
63
+
64
+ ```python
65
+ import citry_ui
66
+ from citry import Citry, Component
67
+
68
+ app = Citry()
69
+ installed = app.register_library(citry_ui)
70
+
71
+ class Page(Component):
72
+ citry = app
73
+ template = """
74
+ <main>
75
+ <c-CButton type="submit">
76
+ Save
77
+ </c-CButton>
78
+ </main>
79
+ """
80
+ ```
81
+
82
+ You can also directly import the components:
83
+
84
+ ```python
85
+ from citry_ui import CButton
86
+
87
+ button = CButton(
88
+ loading=True,
89
+ class_=["toolbar-action", {"is-prominent": True}],
90
+ style={"inline-size": "100%"},
91
+ slots={"default": "Save"},
92
+ )
93
+ rendered = button.render(citry=app)
94
+ ```
95
+
96
+ See [`docs/design/ui_components/button.md`](https://github.com/citry-dev/citry/blob/main/docs/design/ui_components/button.md).
97
+
98
+ Note: Calling `str(button)` or `button.render()` without `citry=app` raises
99
+ `LibraryComponentContextError`.
100
+
101
+ ## Locales
102
+
103
+ To add selectable translations, named Citry UI format
104
+ profiles, or browser-side locale switching, configure the catalog package that
105
+ ships in this same wheel:
106
+
107
+ ```python
108
+ app = Citry(
109
+ autodiscover=False,
110
+ extensions_defaults={
111
+ "i18n": {
112
+ "source_locale": "en-US",
113
+ "locales": ("en-US", "cs-CZ"),
114
+ "catalogs": ("citry_ui_i18n", "my_app_i18n"),
115
+ }
116
+ },
117
+ )
118
+ app.register_library(citry_ui)
119
+ ```
120
+
121
+ Place an application catalog after `citry_ui_i18n` to override selected public
122
+ keys. Components render their initial strings on the server. Under a
123
+ client-enabled `<c-i18n>` provider, stable Citry UI text and attributes follow
124
+ locale changes through `$c-tr`, while values created by component JavaScript
125
+ use the same provider through `i18n.bind()`. Explicit component label inputs or
126
+ slots always win for that instance and are not replaced after a locale switch.
127
+ Each component reference ends with a structured **Translation keys** table.
128
+
129
+ ## Subclassing
130
+
131
+ Advanced code can access or subclass the concrete class installed for this
132
+ Citry instance:
133
+
134
+ ```python
135
+ import citry_ui
136
+ from citry import Citry, Component
137
+
138
+ app = Citry()
139
+ installed = app.register_library(citry_ui)
140
+ ...
141
+ BoundButton = installed[CButton]
142
+ ```
143
+
144
+ ## Development
145
+
146
+ Each family lives in one `citry_ui/components/c*/` directory. Its runtime module owns
147
+ its schemas, behavior, template, and CSS. `components/__init__.py` contains the
148
+ only ordered definition catalog, and the package root combines it with
149
+ `ComponentLibrary`. Citry owns materialization, registration rollback,
150
+ invocation resolution, and installation records.
151
+
152
+ For editor completion and diagnostics without a host application, point the
153
+ Citry VS Code setting directly at the same manifest:
154
+
155
+ ```json
156
+ {
157
+ "citry.app": "citry_ui:__citry_library__"
158
+ }
159
+ ```
160
+
161
+ Contributors can read the
162
+ [component-authoring guide](https://github.com/citry-dev/citry/blob/main/packages/py/citry_ui/docs/component-authoring.md)
163
+ for the specification and source-formatting rules.
164
+
165
+ ## Early-access feedback
166
+
167
+ Please report bugs, missing component states, accessibility problems, and API
168
+ friction in the [Citry issue tracker](https://github.com/citry-dev/citry/issues).
169
+ Include the component name, Citry UI version, browser, and a small reproduction
170
+ when possible.
@@ -0,0 +1,143 @@
1
+ # Citry UI
2
+
3
+ Citry UI is Citry's own styled component library.
4
+
5
+ It gives you the building blocks for polished application interfaces without
6
+ assembling a separate frontend component stack:
7
+
8
+ - forms, navigation, dialogs, menus, feedback, layout, and data display;
9
+ - accessible HTML with keyboard and pointer interactions;
10
+ - useful server-rendered output before browser behavior starts;
11
+ - consistent light and dark styling with theme variables and component parts;
12
+ - built-in labels that applications can translate and override; and
13
+ - Python composition alongside ordinary Citry template tags.
14
+
15
+ Browse the [component catalog](https://citry.dev/ui-library/) for current
16
+ guides and API references.
17
+
18
+ ## Alpha release
19
+
20
+ Citry UI is in alpha.
21
+
22
+ Components that already exist won't be removed (for example, `CButton` stays
23
+ `CButton`), but component inputs may yet change before v1.0.
24
+
25
+ ## Installation
26
+
27
+ Install it with Python 3.10 or newer. Needs `citry>=0.4`:
28
+
29
+ ```console
30
+ python -m pip install citry-ui
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ Register components with `Citry.register_library()`:
36
+
37
+ ```python
38
+ import citry_ui
39
+ from citry import Citry, Component
40
+
41
+ app = Citry()
42
+ installed = app.register_library(citry_ui)
43
+
44
+ class Page(Component):
45
+ citry = app
46
+ template = """
47
+ <main>
48
+ <c-CButton type="submit">
49
+ Save
50
+ </c-CButton>
51
+ </main>
52
+ """
53
+ ```
54
+
55
+ You can also directly import the components:
56
+
57
+ ```python
58
+ from citry_ui import CButton
59
+
60
+ button = CButton(
61
+ loading=True,
62
+ class_=["toolbar-action", {"is-prominent": True}],
63
+ style={"inline-size": "100%"},
64
+ slots={"default": "Save"},
65
+ )
66
+ rendered = button.render(citry=app)
67
+ ```
68
+
69
+ See [`docs/design/ui_components/button.md`](https://github.com/citry-dev/citry/blob/main/docs/design/ui_components/button.md).
70
+
71
+ Note: Calling `str(button)` or `button.render()` without `citry=app` raises
72
+ `LibraryComponentContextError`.
73
+
74
+ ## Locales
75
+
76
+ To add selectable translations, named Citry UI format
77
+ profiles, or browser-side locale switching, configure the catalog package that
78
+ ships in this same wheel:
79
+
80
+ ```python
81
+ app = Citry(
82
+ autodiscover=False,
83
+ extensions_defaults={
84
+ "i18n": {
85
+ "source_locale": "en-US",
86
+ "locales": ("en-US", "cs-CZ"),
87
+ "catalogs": ("citry_ui_i18n", "my_app_i18n"),
88
+ }
89
+ },
90
+ )
91
+ app.register_library(citry_ui)
92
+ ```
93
+
94
+ Place an application catalog after `citry_ui_i18n` to override selected public
95
+ keys. Components render their initial strings on the server. Under a
96
+ client-enabled `<c-i18n>` provider, stable Citry UI text and attributes follow
97
+ locale changes through `$c-tr`, while values created by component JavaScript
98
+ use the same provider through `i18n.bind()`. Explicit component label inputs or
99
+ slots always win for that instance and are not replaced after a locale switch.
100
+ Each component reference ends with a structured **Translation keys** table.
101
+
102
+ ## Subclassing
103
+
104
+ Advanced code can access or subclass the concrete class installed for this
105
+ Citry instance:
106
+
107
+ ```python
108
+ import citry_ui
109
+ from citry import Citry, Component
110
+
111
+ app = Citry()
112
+ installed = app.register_library(citry_ui)
113
+ ...
114
+ BoundButton = installed[CButton]
115
+ ```
116
+
117
+ ## Development
118
+
119
+ Each family lives in one `citry_ui/components/c*/` directory. Its runtime module owns
120
+ its schemas, behavior, template, and CSS. `components/__init__.py` contains the
121
+ only ordered definition catalog, and the package root combines it with
122
+ `ComponentLibrary`. Citry owns materialization, registration rollback,
123
+ invocation resolution, and installation records.
124
+
125
+ For editor completion and diagnostics without a host application, point the
126
+ Citry VS Code setting directly at the same manifest:
127
+
128
+ ```json
129
+ {
130
+ "citry.app": "citry_ui:__citry_library__"
131
+ }
132
+ ```
133
+
134
+ Contributors can read the
135
+ [component-authoring guide](https://github.com/citry-dev/citry/blob/main/packages/py/citry_ui/docs/component-authoring.md)
136
+ for the specification and source-formatting rules.
137
+
138
+ ## Early-access feedback
139
+
140
+ Please report bugs, missing component states, accessibility problems, and API
141
+ friction in the [Citry issue tracker](https://github.com/citry-dev/citry/issues).
142
+ Include the component name, Citry UI version, browser, and a small reproduction
143
+ when possible.
@@ -0,0 +1,56 @@
1
+ # Third-party licenses
2
+
3
+ Citry UI vendors a selected, unmodified set of SVG icon geometries from
4
+ Lucide 1.30.0. The source mapping and SHA-256 digest for every vendored SVG
5
+ live in `citry_ui/components/cicon/_catalog.py`.
6
+
7
+ ## Lucide
8
+
9
+ ISC License
10
+
11
+ Copyright (c) 2026 Lucide Icons and Contributors
12
+
13
+ Permission to use, copy, modify, and/or distribute this software for any
14
+ purpose with or without fee is hereby granted, provided that the above
15
+ copyright notice and this permission notice appear in all copies.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
18
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
19
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
20
+ SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
21
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
22
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
23
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
24
+
25
+ ## Feather-derived Lucide icons
26
+
27
+ The following vendored icons are identified by Lucide as derived from Feather:
28
+ `arrow-down`, `arrow-left`, `arrow-right`, `arrow-up`, `calendar`, `check`,
29
+ `chevron-down`, `chevron-left`, `chevron-right`, `chevron-up`, `clock`,
30
+ `circle-question-mark` (published as `circle-help`), `circle-x`, `download`,
31
+ `external-link`, `info` (published by Citry UI as `circle-info`),
32
+ `link`, `lock`, `minus`, `ellipsis` (published as `more-horizontal`),
33
+ `ellipsis-vertical` (published as `more-vertical`), `plus`, `search`, `trash`,
34
+ `triangle-alert` (legacy Lucide name `alert-triangle`), `upload`, and `x`.
35
+
36
+ The MIT License (MIT)
37
+
38
+ Copyright (c) 2013-present Cole Bemis
39
+
40
+ Permission is hereby granted, free of charge, to any person obtaining a copy
41
+ of this software and associated documentation files (the "Software"), to deal
42
+ in the Software without restriction, including without limitation the rights
43
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
44
+ copies of the Software, and to permit persons to whom the Software is
45
+ furnished to do so, subject to the following conditions:
46
+
47
+ The above copyright notice and this permission notice shall be included in all
48
+ copies or substantial portions of the Software.
49
+
50
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
51
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
52
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
53
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
54
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
55
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56
+ SOFTWARE.